# Vector plugin MIT-licensed editable SVG and Figma clipboard export for SnapDOM. The plugin lives inside the official `packages/plugins` workspace and requires core 3.x. SVD lives in `svd/` as an internal format; no additional npm package is needed. ```js import { snapdom } from '@zumer/snapdom' import { vector } from '@zumer/snapdom-plugins/vector' const result = await snapdom(element, { plugins: [vector()] }) const svg = await result.toVector() copyButton.addEventListener('click', () => result.toFigma()) // HTTPS or localhost ``` `exclude` accepts a selector, a predicate, or an array of either. Export-time exclusions override the factory default. Keep the source element connected through export. `toVector()` returns a string; `toFigma()` resolves without a return value after writing the clipboard. Register per capture to avoid applying the render hook to unrelated captures. SVG preserves editable text and supported shapes; unsupported paint is diagnosed by the engine. The plugin is available on npm in `@zumer/snapdom-plugins` 4.x. Run `npm run test:vector` from the monorepo root. The migrated baselines are unchanged. Inline SVG export omits inactive mask longhands from unmasked nodes, while retaining active masks and embedded stylesheet behavior. `src/public.js` defines the public `toVector()` and `toFigma()` contract. `src/index.js` and the emitters retain the internal engine used by the suites. `figma-plugin/` is the optional SVD consumer exercised by those suites; the public clipboard export does not require installing that plugin. ## Live demo Run `npm run compile` and `npm run site` from the monorepo root, then open `/plugins/vector/` or `/showcase/`. The demo exports real SVG and can copy artwork to Figma. The retained `/pro/` URL does not denote a paid product. See [the public contract](CONTRACT.md) for supported behavior and limits.