@pixerate/editor 0.56.0 → 0.58.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5195,6 +5195,21 @@ function vectorDocumentToSvg(doc, options = {}) {
5195
5195
  };
5196
5196
  const emit2 = (node, depth) => {
5197
5197
  if (node.visible === false && !options.includeHidden) return;
5198
+ const wrappers = options.wrap?.[node.id] ?? [];
5199
+ wrappers.forEach((w2, i) => {
5200
+ let attrs = w2.id !== void 0 ? ` id="${escapeAttr(w2.id)}"` : "";
5201
+ if (w2.transform) attrs += ` transform="${escapeAttr(w2.transform)}"`;
5202
+ if (w2.clip) {
5203
+ const shape = Object.entries(w2.clip.attrs).map(([k, v2]) => ` ${k}="${formatNumber(v2, 4)}"`).join("");
5204
+ defs.push(`<clipPath id="${escapeAttr(w2.clip.id)}" clipPathUnits="objectBoundingBox"><${w2.clip.shape}${w2.clip.shapeId !== void 0 ? ` id="${escapeAttr(w2.clip.shapeId)}"` : ""}${shape}/></clipPath>`);
5205
+ attrs += ` clip-path="url(#${escapeAttr(w2.clip.id)})"`;
5206
+ }
5207
+ lines.push(`${indent(depth + i)}<g${attrs}>`);
5208
+ });
5209
+ emitNode(node, depth + wrappers.length);
5210
+ for (let i = wrappers.length - 1; i >= 0; i--) lines.push(`${indent(depth + i)}</g>`);
5211
+ };
5212
+ const emitNode = (node, depth) => {
5198
5213
  if (hasOwnVectorAppearance(node)) {
5199
5214
  const live2 = {
5200
5215
  kind: node.type,
@@ -5976,4 +5991,4 @@ export {
5976
5991
  parseSvgTransform,
5977
5992
  parseVectorSvg
5978
5993
  };
5979
- //# sourceMappingURL=chunk-NONDTTH7.js.map
5994
+ //# sourceMappingURL=chunk-PYMV7HLI.js.map