@pixerate/editor 0.130.0 → 0.132.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.
- package/dist/animation-editor/index.cjs +55 -55
- package/dist/animation-editor/index.d.cts +4 -4
- package/dist/animation-editor/index.d.ts +4 -4
- package/dist/animation-editor/index.js +2 -2
- package/dist/{bezier-CigmusV_.d.ts → bezier-0IHDCvv_.d.ts} +1 -1
- package/dist/{bezier-CdoGygwG.d.cts → bezier-oCBfrGDG.d.cts} +1 -1
- package/dist/canvas/index.d.cts +7 -7
- package/dist/canvas/index.d.ts +7 -7
- package/dist/{chunk-PMHPXCJC.cjs → chunk-55UEZIU4.cjs} +119 -90
- package/dist/chunk-55UEZIU4.cjs.map +1 -0
- package/dist/{chunk-L5OTIYOO.js → chunk-ECVI5QRE.js} +2 -2
- package/dist/{chunk-ERYGCA72.js → chunk-G5FX56KX.js} +39 -10
- package/dist/{chunk-ERYGCA72.js.map → chunk-G5FX56KX.js.map} +1 -1
- package/dist/{chunk-PRYMC442.js → chunk-IEYXYMRQ.js} +255 -10
- package/dist/chunk-IEYXYMRQ.js.map +1 -0
- package/dist/{chunk-2PXRKMOH.cjs → chunk-OYPJGGF3.cjs} +36 -36
- package/dist/{chunk-2PXRKMOH.cjs.map → chunk-OYPJGGF3.cjs.map} +1 -1
- package/dist/{chunk-LXGOYRPE.cjs → chunk-YYJKIESX.cjs} +320 -75
- package/dist/chunk-YYJKIESX.cjs.map +1 -0
- package/dist/effects/index.d.cts +4 -4
- package/dist/effects/index.d.ts +4 -4
- package/dist/{export-B4r8b9Ft.d.ts → export-ByJvAvR7.d.ts} +26 -4
- package/dist/{export-5WDKJqTy.d.cts → export-CfAogLEr.d.cts} +1 -1
- package/dist/{export-CU_ARP3A.d.ts → export-Crl82sbE.d.ts} +1 -1
- package/dist/{export-CejjC2iI.d.cts → export-D-gkjBkB.d.cts} +26 -4
- package/dist/{helpers-X_rycLNJ.d.ts → helpers-BCd2-PAR.d.ts} +34 -1
- package/dist/{helpers-CzZu51eI.d.cts → helpers-CoIeXQnW.d.cts} +34 -1
- package/dist/image-editor/index.cjs +775 -723
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +8 -8
- package/dist/image-editor/index.d.ts +8 -8
- package/dist/image-editor/index.js +59 -7
- package/dist/image-editor/index.js.map +1 -1
- package/dist/index.cjs +11 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/dist/{opentype-DlRMYcCW.d.cts → opentype-BDahNRTe.d.cts} +1 -1
- package/dist/{opentype-CrHAsKh3.d.ts → opentype-BQFEvy-t.d.ts} +1 -1
- package/dist/paint-editor/index.cjs +7 -7
- package/dist/paint-editor/index.d.cts +5 -5
- package/dist/paint-editor/index.d.ts +5 -5
- package/dist/paint-editor/index.js +2 -2
- package/dist/{pathfinder-CKfKOVP4.d.cts → pathfinder-01ZgAwqV.d.cts} +1 -1
- package/dist/{pathfinder-Dlss70hL.d.ts → pathfinder-DaVdT8jq.d.ts} +1 -1
- package/dist/{pool-DDOo0xJH.d.ts → pool-D2A3WTt9.d.ts} +1 -1
- package/dist/{pool-DKic69LD.d.cts → pool-D6a45MoE.d.cts} +1 -1
- package/dist/{svg-BRaii3pI.d.cts → svg-CcDz7Zq2.d.cts} +2 -2
- package/dist/{svg-BYVZeVo0.d.ts → svg-DELNVerw.d.ts} +2 -2
- package/dist/{tools-CtheDLDr.d.cts → tools-BFvkFnRj.d.cts} +1 -1
- package/dist/{tools-D8bZ-7YG.d.ts → tools-D7ws-OKL.d.ts} +1 -1
- package/dist/vector/index.cjs +1136 -1014
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.d.cts +63 -10
- package/dist/vector/index.d.ts +63 -10
- package/dist/vector/index.js +129 -7
- package/dist/vector/index.js.map +1 -1
- package/dist/video-editor/index.d.cts +4 -4
- package/dist/video-editor/index.d.ts +4 -4
- package/dist/{warp-CZVC8pB5.d.ts → warp-2N9wkOkL.d.ts} +1 -1
- package/dist/{warp-BFoYxy_s.d.cts → warp-DErXW5rz.d.cts} +1 -1
- package/package.json +2 -2
- package/skills/pixerate-image-editor/SKILL.md +6 -2
- package/skills/pixerate-image-editor/references/color-management.md +1 -1
- package/skills/pixerate-image-editor/references/photoshop-files.md +2 -2
- package/skills/pixerate-image-editor/references/retouching.md +9 -1
- package/skills/pixerate-vector/SKILL.md +17 -0
- package/skills/pixerate-vector/references/commands.md +19 -0
- package/dist/chunk-LXGOYRPE.cjs.map +0 -1
- package/dist/chunk-PMHPXCJC.cjs.map +0 -1
- package/dist/chunk-PRYMC442.js.map +0 -1
- /package/dist/{chunk-L5OTIYOO.js.map → chunk-ECVI5QRE.js.map} +0 -0
|
@@ -74,6 +74,7 @@ var VECTOR_BLEND_MODES = [
|
|
|
74
74
|
];
|
|
75
75
|
var VECTOR_HORIZONTAL_RESIZING = ["left", "right", "leftRight", "center", "scale"];
|
|
76
76
|
var VECTOR_VERTICAL_RESIZING = ["top", "bottom", "topBottom", "center", "scale"];
|
|
77
|
+
var VECTOR_LENS_TYPES = ["transparency", "magnify", "fisheye", "brighten", "invert", "tintedGrayscale", "colorAdd", "colorLimit", "heatMap", "wireframe"];
|
|
77
78
|
var VECTOR_CONNECTOR_SIDES = ["auto", "top", "right", "bottom", "left", "center"];
|
|
78
79
|
var VECTOR_CONNECTOR_ROUTES = ["straight", "elbow", "curved"];
|
|
79
80
|
var VECTOR_BLEND_SPACINGS = ["steps", "distance", "smoothColor"];
|
|
@@ -5772,6 +5773,237 @@ function vectorBevelFaces(path, params, fillRule = "nonzero") {
|
|
|
5772
5773
|
return faces;
|
|
5773
5774
|
}
|
|
5774
5775
|
|
|
5776
|
+
// src/vector/lens.ts
|
|
5777
|
+
function isVectorLens(node) {
|
|
5778
|
+
return !!node && node.type === "path" && !!node.lens && VECTOR_LENS_TYPES.includes(node.lens.type);
|
|
5779
|
+
}
|
|
5780
|
+
var VECTOR_LENS_LABELS = {
|
|
5781
|
+
transparency: "Transparency",
|
|
5782
|
+
magnify: "Magnify",
|
|
5783
|
+
fisheye: "Fish Eye",
|
|
5784
|
+
brighten: "Brighten",
|
|
5785
|
+
invert: "Invert",
|
|
5786
|
+
tintedGrayscale: "Tinted Grayscale",
|
|
5787
|
+
colorAdd: "Color Add",
|
|
5788
|
+
colorLimit: "Color Limit",
|
|
5789
|
+
heatMap: "Heat Map",
|
|
5790
|
+
wireframe: "Wireframe"
|
|
5791
|
+
};
|
|
5792
|
+
var VECTOR_LENS_SPECS = {
|
|
5793
|
+
transparency: { min: 0, max: 100, amount: 50, color: null, unit: "percent see-through" },
|
|
5794
|
+
magnify: { min: 1, max: 20, amount: 2, color: null, unit: "times" },
|
|
5795
|
+
fisheye: { min: -100, max: 100, amount: 50, color: null, unit: "percent, negative pinches" },
|
|
5796
|
+
brighten: { min: -100, max: 100, amount: 40, color: null, unit: "percent, negative darkens" },
|
|
5797
|
+
invert: { min: 0, max: 100, amount: 100, color: null, unit: "percent strength" },
|
|
5798
|
+
tintedGrayscale: { min: 0, max: 100, amount: 100, color: "#b45309", unit: "percent strength" },
|
|
5799
|
+
colorAdd: { min: 0, max: 100, amount: 50, color: "#ff0000", unit: "percent of the colour added" },
|
|
5800
|
+
colorLimit: { min: 0, max: 100, amount: 100, color: "#22c55e", unit: "percent strength" },
|
|
5801
|
+
heatMap: { min: 0, max: 100, amount: 0, color: null, unit: "percent the palette is turned" },
|
|
5802
|
+
wireframe: { min: 0, max: 100, amount: 100, color: "#0f172a", unit: "percent outline opacity" }
|
|
5803
|
+
};
|
|
5804
|
+
function sanitizeVectorLens(value) {
|
|
5805
|
+
if (!value || typeof value !== "object") return null;
|
|
5806
|
+
const r = value;
|
|
5807
|
+
if (typeof r.type !== "string" || !VECTOR_LENS_TYPES.includes(r.type)) return null;
|
|
5808
|
+
const type = r.type;
|
|
5809
|
+
const spec = VECTOR_LENS_SPECS[type];
|
|
5810
|
+
const amount = typeof r.amount === "number" && Number.isFinite(r.amount) ? Math.min(spec.max, Math.max(spec.min, r.amount)) : spec.amount;
|
|
5811
|
+
const out = { type, amount };
|
|
5812
|
+
if (spec.color !== null) out.color = typeof r.color === "string" && parseVectorColor(r.color) ? r.color : spec.color;
|
|
5813
|
+
return out;
|
|
5814
|
+
}
|
|
5815
|
+
var hex22 = (v2) => Math.round(Math.min(1, Math.max(0, v2)) * 255).toString(16).padStart(2, "0");
|
|
5816
|
+
var formatRgba = (c) => c[3] >= 1 ? `#${hex22(c[0])}${hex22(c[1])}${hex22(c[2])}` : `rgba(${Math.round(c[0] * 255)}, ${Math.round(c[1] * 255)}, ${Math.round(c[2] * 255)}, ${Math.round(c[3] * 1e3) / 1e3})`;
|
|
5817
|
+
var luma = (c) => 0.2126 * c[0] + 0.7152 * c[1] + 0.0722 * c[2];
|
|
5818
|
+
var mix = (a, b, t) => [a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t, a[2] + (b[2] - a[2]) * t, a[3]];
|
|
5819
|
+
var HEAT = [
|
|
5820
|
+
[0, "#1e1b4b"],
|
|
5821
|
+
[0.25, "#2563eb"],
|
|
5822
|
+
[0.5, "#22c55e"],
|
|
5823
|
+
[0.7, "#facc15"],
|
|
5824
|
+
[0.85, "#f97316"],
|
|
5825
|
+
[1, "#dc2626"]
|
|
5826
|
+
];
|
|
5827
|
+
var heatAt = (t) => {
|
|
5828
|
+
const u = (t % 1 + 1) % 1;
|
|
5829
|
+
for (let i = 1; i < HEAT.length; i++) {
|
|
5830
|
+
if (u <= HEAT[i][0]) {
|
|
5831
|
+
const a = parseVectorColor(HEAT[i - 1][1]);
|
|
5832
|
+
const b = parseVectorColor(HEAT[i][1]);
|
|
5833
|
+
const k = (u - HEAT[i - 1][0]) / (HEAT[i][0] - HEAT[i - 1][0]);
|
|
5834
|
+
return [0, 1, 2].map((c) => a[c] + (b[c] - a[c]) * k);
|
|
5835
|
+
}
|
|
5836
|
+
}
|
|
5837
|
+
return parseVectorColor(HEAT[HEAT.length - 1][1]).slice(0, 3);
|
|
5838
|
+
};
|
|
5839
|
+
function vectorLensColorMap(lens) {
|
|
5840
|
+
const tint = _nullishCoalesce(parseVectorColor(_nullishCoalesce(lens.color, () => ( "#000000"))), () => ( [0, 0, 0, 1]));
|
|
5841
|
+
const s = Math.min(1, Math.max(0, lens.amount / 100));
|
|
5842
|
+
switch (lens.type) {
|
|
5843
|
+
case "brighten": {
|
|
5844
|
+
const a = Math.min(1, Math.max(-1, lens.amount / 100));
|
|
5845
|
+
return (c) => a >= 0 ? mix(c, [1, 1, 1], a) : mix(c, [0, 0, 0], -a);
|
|
5846
|
+
}
|
|
5847
|
+
case "invert":
|
|
5848
|
+
return (c) => mix(c, [1 - c[0], 1 - c[1], 1 - c[2]], s);
|
|
5849
|
+
case "tintedGrayscale":
|
|
5850
|
+
return (c) => {
|
|
5851
|
+
const l = luma(c);
|
|
5852
|
+
const duo = l < 0.5 ? [tint[0] * 2 * l, tint[1] * 2 * l, tint[2] * 2 * l] : [0, 1, 2].map((k) => tint[k] + (1 - tint[k]) * (2 * l - 1));
|
|
5853
|
+
return mix(c, duo, s);
|
|
5854
|
+
};
|
|
5855
|
+
case "colorAdd":
|
|
5856
|
+
return (c) => [Math.min(1, c[0] + tint[0] * s), Math.min(1, c[1] + tint[1] * s), Math.min(1, c[2] + tint[2] * s), c[3]];
|
|
5857
|
+
case "colorLimit":
|
|
5858
|
+
return (c) => [c[0] * (1 - s + s * tint[0]), c[1] * (1 - s + s * tint[1]), c[2] * (1 - s + s * tint[2]), c[3]];
|
|
5859
|
+
case "heatMap":
|
|
5860
|
+
return (c) => [...heatAt(luma(c) + lens.amount / 100), c[3]];
|
|
5861
|
+
default:
|
|
5862
|
+
return null;
|
|
5863
|
+
}
|
|
5864
|
+
}
|
|
5865
|
+
function mapVectorPaintColors(paint, f) {
|
|
5866
|
+
const one = (color2) => {
|
|
5867
|
+
const c = parseVectorColor(color2);
|
|
5868
|
+
return c ? formatRgba(f(c)) : color2;
|
|
5869
|
+
};
|
|
5870
|
+
if (paint == null || paint === "none") return paint;
|
|
5871
|
+
if (typeof paint === "string") return one(paint);
|
|
5872
|
+
const p = paint;
|
|
5873
|
+
const out = { ...p };
|
|
5874
|
+
if (Array.isArray(p.stops)) out.stops = p.stops.map((s) => ({ ...s, color: one(s.color) }));
|
|
5875
|
+
if (Array.isArray(p.colors)) out.colors = p.colors.map(one);
|
|
5876
|
+
if (Array.isArray(p.points)) out.points = p.points.map((q) => typeof q.color === "string" ? { ...q, color: one(q.color) } : q);
|
|
5877
|
+
return out;
|
|
5878
|
+
}
|
|
5879
|
+
var drawnCache2 = /* @__PURE__ */ new WeakMap();
|
|
5880
|
+
var STYLE_OFF = { effects: void 0, transform: void 0, opacity: void 0, blendMode: void 0, filters: void 0, lens: void 0, lensView: void 0, connector: void 0 };
|
|
5881
|
+
function shapePath(shape, id, path, extra = {}) {
|
|
5882
|
+
const { id: _i, subpaths: _s, booleanOperation: _b, blendStep: _bs, locked: _l, visible: _v, ...style } = shape.source;
|
|
5883
|
+
return { ...style, ...STYLE_OFF, id, type: "path", subpaths: bezierToSubpaths(path), ...shape.opacity < 1 ? { opacity: shape.opacity } : {}, ...extra };
|
|
5884
|
+
}
|
|
5885
|
+
function vectorLensDrawn(node) {
|
|
5886
|
+
const hit = drawnCache2.get(node);
|
|
5887
|
+
if (hit) return hit;
|
|
5888
|
+
const { lens } = node;
|
|
5889
|
+
const own = subpathsToBezier(node.subpaths);
|
|
5890
|
+
const box = _chunkBJTCSLF6cjs.bezierPathBounds.call(void 0, own);
|
|
5891
|
+
const children = [];
|
|
5892
|
+
if (box && lens.type !== "transparency") {
|
|
5893
|
+
const c = { x: (box.minX + box.maxX) / 2, y: (box.minY + box.maxY) / 2 };
|
|
5894
|
+
const inv = node.transform && !isIdentityMatrix(node.transform) ? invertMatrix(node.transform) : null;
|
|
5895
|
+
const k = lens.type === "magnify" ? Math.max(1, lens.amount) : 1;
|
|
5896
|
+
const reach = { minX: c.x - (c.x - box.minX) / k, maxX: c.x + (box.maxX - c.x) / k, minY: c.y - (c.y - box.minY) / k, maxY: c.y + (box.maxY - c.y) / k };
|
|
5897
|
+
let map = null;
|
|
5898
|
+
if (lens.type === "magnify") {
|
|
5899
|
+
const m = [k, 0, 0, k, c.x * (1 - k), c.y * (1 - k)];
|
|
5900
|
+
map = (p) => _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, p, m);
|
|
5901
|
+
} else if (lens.type === "fisheye") {
|
|
5902
|
+
const a = Math.min(100, Math.max(-100, lens.amount));
|
|
5903
|
+
const gamma = a >= 0 ? 1 / (1 + a / 25) : 1 - a / 25;
|
|
5904
|
+
const rx = Math.max(1e-9, (box.maxX - box.minX) / 2);
|
|
5905
|
+
const ry = Math.max(1e-9, (box.maxY - box.minY) / 2);
|
|
5906
|
+
const warp = (p) => {
|
|
5907
|
+
const dx = (p.x - c.x) / rx;
|
|
5908
|
+
const dy = (p.y - c.y) / ry;
|
|
5909
|
+
const u = Math.hypot(dx, dy);
|
|
5910
|
+
if (u >= 1 || u < 1e-12) return p;
|
|
5911
|
+
const f = u ** gamma / u;
|
|
5912
|
+
return { x: c.x + dx * f * rx, y: c.y + dy * f * ry };
|
|
5913
|
+
};
|
|
5914
|
+
map = (p) => mapBezierPath(p, warp, 0.25);
|
|
5915
|
+
}
|
|
5916
|
+
const recolour = vectorLensColorMap(lens);
|
|
5917
|
+
const wire = lens.type === "wireframe" ? _nullishCoalesce(lens.color, () => ( "#000000")) : null;
|
|
5918
|
+
const contents = [];
|
|
5919
|
+
(_nullishCoalesce(node.lensView, () => ( []))).forEach((below, i) => {
|
|
5920
|
+
for (const shape of vectorChildAppearanceShapes(below, i)) {
|
|
5921
|
+
const path = inv ? _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, shape.path, inv) : shape.path;
|
|
5922
|
+
const b = _chunkBJTCSLF6cjs.bezierPathBounds.call(void 0, path);
|
|
5923
|
+
if (!b || b.maxX < reach.minX || b.minX > reach.maxX || b.maxY < reach.minY || b.minY > reach.maxY) continue;
|
|
5924
|
+
const id = `${node.id}~lens${contents.length}`;
|
|
5925
|
+
const changed = map ? map(path) : path;
|
|
5926
|
+
if (wire) {
|
|
5927
|
+
contents.push(shapePath(shape, id, changed, { fill: null, fills: void 0, stroke: wire, strokes: void 0, strokeWidth: 1, strokeAlign: void 0, strokeDasharray: void 0, strokeWidthProfile: void 0, opacity: Math.min(1, Math.max(0, lens.amount / 100)) }));
|
|
5928
|
+
} else if (recolour) {
|
|
5929
|
+
const fills = _optionalChain([shape, 'access', _148 => _148.source, 'access', _149 => _149.fills, 'optionalAccess', _150 => _150.map, 'call', _151 => _151((l) => ({ ...l, paint: _nullishCoalesce(mapVectorPaintColors(l.paint, recolour), () => ( null)) }))]);
|
|
5930
|
+
const strokes = _optionalChain([shape, 'access', _152 => _152.source, 'access', _153 => _153.strokes, 'optionalAccess', _154 => _154.map, 'call', _155 => _155((l) => ({ ...l, paint: _nullishCoalesce(mapVectorPaintColors(l.paint, recolour), () => ( null)) }))]);
|
|
5931
|
+
contents.push(shapePath(shape, id, changed, { fill: _nullishCoalesce(mapVectorPaintColors(shape.source.fill, recolour), () => ( null)), stroke: _nullishCoalesce(mapVectorPaintColors(shape.source.stroke, recolour), () => ( null)), ...fills ? { fills } : {}, ...strokes ? { strokes } : {} }));
|
|
5932
|
+
} else contents.push(shapePath(shape, id, changed));
|
|
5933
|
+
}
|
|
5934
|
+
});
|
|
5935
|
+
if (contents.length) {
|
|
5936
|
+
const outline = { id: `${node.id}~lens-clip`, type: "path", subpaths: node.subpaths, fill: "#000000", stroke: null, ...node.fillRule ? { fillRule: node.fillRule } : {} };
|
|
5937
|
+
children.push({ id: `${node.id}~lens-view`, type: "group", mask: { type: "clip" }, children: [outline, ...contents] });
|
|
5938
|
+
}
|
|
5939
|
+
}
|
|
5940
|
+
const { lens: _l, lensView: _v, transform: _t, opacity: _o, effects: _e, blendMode: _bm, filters: _f, ...style } = node;
|
|
5941
|
+
const fillOpacity = lens.type === "transparency" ? 1 - Math.min(100, Math.max(0, lens.amount)) / 100 : 0;
|
|
5942
|
+
children.push({ ...style, id: `${node.id}~lens-fill`, stroke: null, strokes: void 0, opacity: fillOpacity });
|
|
5943
|
+
const stroked = (_nullishCoalesce(_optionalChain([node, 'access', _156 => _156.strokes, 'optionalAccess', _157 => _157.length]), () => ( 0))) > 0 || node.stroke != null && node.stroke !== "none";
|
|
5944
|
+
if (stroked) children.push({ ...style, id: `${node.id}~lens-stroke`, fill: null, fills: void 0 });
|
|
5945
|
+
const out = {
|
|
5946
|
+
id: node.id,
|
|
5947
|
+
type: "group",
|
|
5948
|
+
...node.name !== void 0 ? { name: node.name } : {},
|
|
5949
|
+
...node.transform ? { transform: node.transform } : {},
|
|
5950
|
+
...node.opacity !== void 0 ? { opacity: node.opacity } : {},
|
|
5951
|
+
...node.blendMode ? { blendMode: node.blendMode } : {},
|
|
5952
|
+
..._optionalChain([node, 'access', _158 => _158.filters, 'optionalAccess', _159 => _159.length]) ? { filters: node.filters } : {},
|
|
5953
|
+
children
|
|
5954
|
+
};
|
|
5955
|
+
drawnCache2.set(node, out);
|
|
5956
|
+
return out;
|
|
5957
|
+
}
|
|
5958
|
+
var sameMatrix = (a, b) => !a && !b || !!a && !!b && a.every((v2, i) => Math.abs(v2 - b[i]) < 1e-12);
|
|
5959
|
+
function sameView(a, b) {
|
|
5960
|
+
if (!a || a.length !== b.length) return false;
|
|
5961
|
+
return a.every((n, i) => {
|
|
5962
|
+
const m = b[i];
|
|
5963
|
+
if (n === m) return true;
|
|
5964
|
+
return n.type === "group" && m.type === "group" && n.id === m.id && n.id.endsWith("~below") && sameMatrix(n.transform, m.transform) && sameView(n.children, m.children);
|
|
5965
|
+
});
|
|
5966
|
+
}
|
|
5967
|
+
function hasLens(nodes) {
|
|
5968
|
+
return nodes.some((n) => isVectorLens(n) || n.type === "group" && hasLens(n.children));
|
|
5969
|
+
}
|
|
5970
|
+
function resolveVectorLenses(doc) {
|
|
5971
|
+
if (!hasLens(doc.nodes)) return doc;
|
|
5972
|
+
let changed = false;
|
|
5973
|
+
const walk = (list, outer, depth) => {
|
|
5974
|
+
const below = outer.slice();
|
|
5975
|
+
const out = list.map((n) => {
|
|
5976
|
+
let next = n;
|
|
5977
|
+
if (isVectorLens(n)) {
|
|
5978
|
+
if (!sameView(n.lensView, below)) next = { ...n, lensView: below.slice() };
|
|
5979
|
+
} else if (n.type === "group" && hasLens(n.children)) {
|
|
5980
|
+
const m = n.transform && !isIdentityMatrix(n.transform) ? invertMatrix(n.transform) : null;
|
|
5981
|
+
const inner = below.length ? m ? [{ id: `${n.id}:${depth}~below`, type: "group", transform: m, children: below.slice() }] : below.slice() : [];
|
|
5982
|
+
const children = walk(n.children, inner, depth + 1);
|
|
5983
|
+
if (children !== n.children) next = { ...n, children };
|
|
5984
|
+
}
|
|
5985
|
+
if (next !== n) changed = true;
|
|
5986
|
+
below.push(next);
|
|
5987
|
+
return next;
|
|
5988
|
+
});
|
|
5989
|
+
return out.some((n, i) => n !== list[i]) ? out : list;
|
|
5990
|
+
};
|
|
5991
|
+
const nodes = walk(doc.nodes, [], 0);
|
|
5992
|
+
return changed ? { ...doc, nodes } : doc;
|
|
5993
|
+
}
|
|
5994
|
+
function stripVectorLensViews(doc) {
|
|
5995
|
+
if (!hasLens(doc.nodes)) return doc;
|
|
5996
|
+
const strip2 = (list) => list.map((n) => {
|
|
5997
|
+
if (n.type === "path" && n.lensView) {
|
|
5998
|
+
const { lensView: _v, ...rest } = n;
|
|
5999
|
+
return rest;
|
|
6000
|
+
}
|
|
6001
|
+
if (n.type === "group") return { ...n, children: strip2(n.children) };
|
|
6002
|
+
return n;
|
|
6003
|
+
});
|
|
6004
|
+
return { ...doc, nodes: strip2(doc.nodes) };
|
|
6005
|
+
}
|
|
6006
|
+
|
|
5775
6007
|
// src/geom/warp.ts
|
|
5776
6008
|
var WARP_STYLES = [
|
|
5777
6009
|
"arc",
|
|
@@ -6718,7 +6950,7 @@ function normalizeVectorEffectParams(type, params, base) {
|
|
|
6718
6950
|
if (!defaults) return null;
|
|
6719
6951
|
const out = { ...defaults, ..._nullishCoalesce(base, () => ( {})) };
|
|
6720
6952
|
for (const spec of VECTOR_EFFECT_PARAM_SPECS[type]) {
|
|
6721
|
-
const v2 = _optionalChain([params, 'optionalAccess',
|
|
6953
|
+
const v2 = _optionalChain([params, 'optionalAccess', _160 => _160[spec.key]]);
|
|
6722
6954
|
if (v2 === void 0) continue;
|
|
6723
6955
|
if (spec.kind === "number" && typeof v2 === "number" && Number.isFinite(v2)) out[spec.key] = Math.min(_nullishCoalesce(spec.max, () => ( Infinity)), Math.max(_nullishCoalesce(spec.min, () => ( -Infinity)), v2));
|
|
6724
6956
|
else if (spec.kind === "boolean" && typeof v2 === "boolean") out[spec.key] = v2;
|
|
@@ -6730,7 +6962,7 @@ function normalizeVectorEffectParams(type, params, base) {
|
|
|
6730
6962
|
const o = out;
|
|
6731
6963
|
o.rows = Math.round(o.rows);
|
|
6732
6964
|
o.columns = Math.round(o.columns);
|
|
6733
|
-
const given = _optionalChain([params, 'optionalAccess',
|
|
6965
|
+
const given = _optionalChain([params, 'optionalAccess', _161 => _161.mesh]);
|
|
6734
6966
|
let mesh = given !== void 0 ? isValidWarpMesh(given) ? cloneMesh(given) : null : o.mesh;
|
|
6735
6967
|
if (o.style !== "mesh") mesh = null;
|
|
6736
6968
|
if (mesh && given !== void 0) {
|
|
@@ -6747,10 +6979,10 @@ function createVectorEffect(type, id, params) {
|
|
|
6747
6979
|
}
|
|
6748
6980
|
var isEnabled = (e) => e.enabled !== false && !!VECTOR_EFFECT_DEFAULTS[e.type];
|
|
6749
6981
|
function activeVectorEffects(node) {
|
|
6750
|
-
return _nullishCoalesce(_optionalChain([node, 'access',
|
|
6982
|
+
return _nullishCoalesce(_optionalChain([node, 'access', _162 => _162.effects, 'optionalAccess', _163 => _163.filter, 'call', _164 => _164(isEnabled)]), () => ( []));
|
|
6751
6983
|
}
|
|
6752
6984
|
function hasOwnVectorAppearance(node) {
|
|
6753
|
-
return node.type === "text" || node.type === "instance" || node.type === "group" && !!node.liveBoolean || isVectorFrame(node) || isVectorSymmetryGroup(node) || !!_optionalChain([node, 'access',
|
|
6985
|
+
return node.type === "text" || node.type === "instance" || node.type === "group" && !!node.liveBoolean || isVectorFrame(node) || isVectorSymmetryGroup(node) || isVectorLens(node) || !!_optionalChain([node, 'access', _165 => _165.effects, 'optionalAccess', _166 => _166.some, 'call', _167 => _167(isEnabled)]);
|
|
6754
6986
|
}
|
|
6755
6987
|
var liveCache = /* @__PURE__ */ new WeakMap();
|
|
6756
6988
|
function hasVectorAppearance(node) {
|
|
@@ -6762,7 +6994,7 @@ function hasVectorAppearance(node) {
|
|
|
6762
6994
|
return v2;
|
|
6763
6995
|
}
|
|
6764
6996
|
function isVectorLiveBoolean(node) {
|
|
6765
|
-
return _optionalChain([node, 'optionalAccess',
|
|
6997
|
+
return _optionalChain([node, 'optionalAccess', _168 => _168.type]) === "group" && !!node.liveBoolean;
|
|
6766
6998
|
}
|
|
6767
6999
|
function vectorOperandOperation(group, child) {
|
|
6768
7000
|
return _nullishCoalesce(_nullishCoalesce(child.booleanOperation, () => ( group.liveBoolean)), () => ( "union"));
|
|
@@ -6879,7 +7111,7 @@ var compareOrder = (a, b) => {
|
|
|
6879
7111
|
for (let i = 0; i < n; i++) if (a[i] !== b[i]) return a[i] - b[i];
|
|
6880
7112
|
return a.length - b.length;
|
|
6881
7113
|
};
|
|
6882
|
-
var add3 = (a, b) => ({ x: a.x + (_nullishCoalesce(_optionalChain([b, 'optionalAccess',
|
|
7114
|
+
var add3 = (a, b) => ({ x: a.x + (_nullishCoalesce(_optionalChain([b, 'optionalAccess', _169 => _169.x]), () => ( 0))), y: a.y + (_nullishCoalesce(_optionalChain([b, 'optionalAccess', _170 => _170.y]), () => ( 0))) });
|
|
6883
7115
|
var mapPaths = (shapes, fn) => {
|
|
6884
7116
|
const out = fn(shapes.map((s) => s.path));
|
|
6885
7117
|
return shapes.map((s, i) => ({ ...s, path: _nullishCoalesce(out[i], () => ( [])) }));
|
|
@@ -6907,7 +7139,7 @@ function contourShapes(shapes, c) {
|
|
|
6907
7139
|
const power = 2 ** (Math.min(100, Math.max(-100, c.acceleration)) / 50);
|
|
6908
7140
|
for (let k = 1; k <= n; k++) {
|
|
6909
7141
|
const [path] = offsetPaths([s.path], (outside ? 1 : -1) * step * k, c.join, c.miterLimit, 1, 0);
|
|
6910
|
-
if (!_optionalChain([path, 'optionalAccess',
|
|
7142
|
+
if (!_optionalChain([path, 'optionalAccess', _171 => _171.length])) break;
|
|
6911
7143
|
const t = (k / n) ** power;
|
|
6912
7144
|
const source = { ...s.source, fill: _nullishCoalesce(blendPaint(s.source.fill, c.fillColor, t), () => ( null)), stroke: _nullishCoalesce(blendPaint(s.source.stroke, c.strokeColor, t), () => ( null)), fills: void 0, strokes: void 0 };
|
|
6913
7145
|
out.push({ source, path, opacity: s.opacity, order: [outside ? n - k : k, ...s.order] });
|
|
@@ -6982,8 +7214,8 @@ function bevelShapes(shapes, b) {
|
|
|
6982
7214
|
out.push({ source, path: f.path, opacity: s.opacity, order: [...s.order, 1, k] });
|
|
6983
7215
|
});
|
|
6984
7216
|
const [middle] = offsetPaths([s.path], -b.width, "miter", 4, 1, 0);
|
|
6985
|
-
if (_optionalChain([middle, 'optionalAccess',
|
|
6986
|
-
const hasStroke = _optionalChain([s, 'access',
|
|
7217
|
+
if (_optionalChain([middle, 'optionalAccess', _172 => _172.length])) out.push({ ...s, source: fillOnly, path: middle, order: [...s.order, 2] });
|
|
7218
|
+
const hasStroke = _optionalChain([s, 'access', _173 => _173.source, 'access', _174 => _174.strokes, 'optionalAccess', _175 => _175.length]) || s.source.stroke != null && s.source.stroke !== "none";
|
|
6987
7219
|
if (hasStroke) out.push({ ...s, source: { ...s.source, fill: null, fills: void 0 }, order: [...s.order, 3] });
|
|
6988
7220
|
}
|
|
6989
7221
|
return out;
|
|
@@ -7116,10 +7348,10 @@ function vectorEffectInputBounds(node, effectId) {
|
|
|
7116
7348
|
return paths ? pathsBounds(paths) : null;
|
|
7117
7349
|
}
|
|
7118
7350
|
function vectorNodeEnvelope(node) {
|
|
7119
|
-
return _nullishCoalesce(_optionalChain([node, 'optionalAccess',
|
|
7351
|
+
return _nullishCoalesce(_optionalChain([node, 'optionalAccess', _176 => _176.effects, 'optionalAccess', _177 => _177.find, 'call', _178 => _178((e) => e.type === "envelope" && e.enabled !== false)]), () => ( null));
|
|
7120
7352
|
}
|
|
7121
7353
|
function vectorEnvelopeFrame(node, effectId) {
|
|
7122
|
-
const e = effectId ? _optionalChain([node, 'access',
|
|
7354
|
+
const e = effectId ? _optionalChain([node, 'access', _179 => _179.effects, 'optionalAccess', _180 => _180.find, 'call', _181 => _181((x) => x.id === effectId)]) : vectorNodeEnvelope(node);
|
|
7123
7355
|
if (!e || e.type !== "envelope") return null;
|
|
7124
7356
|
const bounds = vectorEffectInputBounds(node, e.id);
|
|
7125
7357
|
if (!bounds || !(bounds.width > 0 && bounds.height > 0)) return null;
|
|
@@ -7180,7 +7412,7 @@ function placement(node) {
|
|
|
7180
7412
|
...node.blendStep ? { blendStep: true } : {},
|
|
7181
7413
|
...node.booleanOperation ? { booleanOperation: node.booleanOperation } : {},
|
|
7182
7414
|
...node.blendMode ? { blendMode: node.blendMode } : {},
|
|
7183
|
-
..._optionalChain([node, 'access',
|
|
7415
|
+
..._optionalChain([node, 'access', _182 => _182.filters, 'optionalAccess', _183 => _183.length]) ? { filters: node.filters } : {}
|
|
7184
7416
|
};
|
|
7185
7417
|
}
|
|
7186
7418
|
function vectorAppearanceNodes(node) {
|
|
@@ -7196,8 +7428,8 @@ function expandVectorAppearance(node) {
|
|
|
7196
7428
|
expandCache.set(node, [vectorTextShaperGeneration(), drawn]);
|
|
7197
7429
|
return drawn;
|
|
7198
7430
|
}
|
|
7199
|
-
if (isVectorFrame(node) || isVectorSymmetryGroup(node)) {
|
|
7200
|
-
const drawn = isVectorFrame(node) ? vectorFrameDrawn(node) : vectorSymmetryDrawn(node);
|
|
7431
|
+
if (isVectorFrame(node) || isVectorSymmetryGroup(node) || isVectorLens(node)) {
|
|
7432
|
+
const drawn = isVectorFrame(node) ? vectorFrameDrawn(node) : isVectorLens(node) ? vectorLensDrawn(node) : vectorSymmetryDrawn(node);
|
|
7201
7433
|
const out2 = hasVectorAppearance(drawn) ? expandVectorAppearance(drawn) : drawn;
|
|
7202
7434
|
expandCache.set(node, [vectorTextShaperGeneration(), out2]);
|
|
7203
7435
|
return out2;
|
|
@@ -7302,7 +7534,7 @@ function vectorEnteredGroups(nodes, ids) {
|
|
|
7302
7534
|
// src/vector/connectors.ts
|
|
7303
7535
|
var SIDES = ["top", "right", "bottom", "left", "center"];
|
|
7304
7536
|
function isVectorConnector(node) {
|
|
7305
|
-
return _optionalChain([node, 'optionalAccess',
|
|
7537
|
+
return _optionalChain([node, 'optionalAccess', _184 => _184.type]) === "path" && !!node.connector;
|
|
7306
7538
|
}
|
|
7307
7539
|
function vectorConnectionSites(nodes, id) {
|
|
7308
7540
|
const node = findVectorNode(nodes, id);
|
|
@@ -7359,7 +7591,7 @@ function facingSite(sites, toward) {
|
|
|
7359
7591
|
}
|
|
7360
7592
|
function storedEnds(node, world) {
|
|
7361
7593
|
const sp = node.subpaths[0];
|
|
7362
|
-
if (!_optionalChain([sp, 'optionalAccess',
|
|
7594
|
+
if (!_optionalChain([sp, 'optionalAccess', _185 => _185.anchors, 'access', _186 => _186.length])) return null;
|
|
7363
7595
|
const a = sp.anchors[0];
|
|
7364
7596
|
const b = sp.anchors[sp.anchors.length - 1];
|
|
7365
7597
|
return [applyMatrix(world, a), applyMatrix(world, b)];
|
|
@@ -7466,8 +7698,8 @@ function routeVectorConnector(nodes, id) {
|
|
|
7466
7698
|
}));
|
|
7467
7699
|
return {
|
|
7468
7700
|
subpaths: [{ closed: false, anchors: local }],
|
|
7469
|
-
startSide: _nullishCoalesce(_optionalChain([s, 'optionalAccess',
|
|
7470
|
-
endSide: _nullishCoalesce(_optionalChain([e, 'optionalAccess',
|
|
7701
|
+
startSide: _nullishCoalesce(_optionalChain([s, 'optionalAccess', _187 => _187.side]), () => ( null)),
|
|
7702
|
+
endSide: _nullishCoalesce(_optionalChain([e, 'optionalAccess', _188 => _188.side]), () => ( null)),
|
|
7471
7703
|
dropped: { start: !!startGlue && !s, end: !!endGlue && !e }
|
|
7472
7704
|
};
|
|
7473
7705
|
}
|
|
@@ -7479,7 +7711,7 @@ function sameSubpaths(a, b) {
|
|
|
7479
7711
|
const o = b[i];
|
|
7480
7712
|
return sp.closed === o.closed && sp.anchors.length === o.anchors.length && sp.anchors.every((p, k) => {
|
|
7481
7713
|
const q = o.anchors[k];
|
|
7482
|
-
return samePoint(p, q) && samePoint(p.in, q.in) && samePoint(p.out, q.out) && (_nullishCoalesce(_optionalChain([p, 'access',
|
|
7714
|
+
return samePoint(p, q) && samePoint(p.in, q.in) && samePoint(p.out, q.out) && (_nullishCoalesce(_optionalChain([p, 'access', _189 => _189.corner, 'optionalAccess', _190 => _190.radius]), () => ( 0))) === (_nullishCoalesce(_optionalChain([q, 'access', _191 => _191.corner, 'optionalAccess', _192 => _192.radius]), () => ( 0)));
|
|
7483
7715
|
});
|
|
7484
7716
|
});
|
|
7485
7717
|
}
|
|
@@ -7758,7 +7990,7 @@ function applyVectorCornersAttribute(subpaths, value) {
|
|
|
7758
7990
|
for (const item of value.trim().split(/\s+/)) {
|
|
7759
7991
|
const m = /^(\d+)\.(\d+):([\d.eE+-]+)(?::([a-z]+))?$/.exec(item);
|
|
7760
7992
|
if (!m) continue;
|
|
7761
|
-
const a = _optionalChain([subpaths, 'access',
|
|
7993
|
+
const a = _optionalChain([subpaths, 'access', _193 => _193[+m[1]], 'optionalAccess', _194 => _194.anchors, 'access', _195 => _195[+m[2]]]);
|
|
7762
7994
|
const radius = parseFloat(m[3]);
|
|
7763
7995
|
if (!a || !(radius > 0)) continue;
|
|
7764
7996
|
const kind = VECTOR_CORNER_KINDS.includes(m[4]) ? m[4] : void 0;
|
|
@@ -7783,7 +8015,7 @@ function vectorPaintToSvg(paint, gradientId, options = {}) {
|
|
|
7783
8015
|
const area2 = bounds2 ? { x: bounds2.x - reach2, y: bounds2.y - reach2, width: bounds2.width + 2 * reach2, height: bounds2.height + 2 * reach2 } : null;
|
|
7784
8016
|
const key2 = `${gradientId}|${_nullishCoalesce(options.role, () => ( "fill"))}|${_nullishCoalesce(options.precision, () => ( 3))}|${area2 ? [area2.x, area2.y, area2.width, area2.height].join(",") : ""}`;
|
|
7785
8017
|
let byKey2 = paintCache.get(paint);
|
|
7786
|
-
const hit = _optionalChain([byKey2, 'optionalAccess',
|
|
8018
|
+
const hit = _optionalChain([byKey2, 'optionalAccess', _196 => _196.get, 'call', _197 => _197(key2)]);
|
|
7787
8019
|
if (hit) return { value: `url(#${gradientId})`, defs: hit };
|
|
7788
8020
|
const defs2 = vectorShadedSvgDefs(paint, gradientId, { bounds: bounds2, area: area2, precision: _nullishCoalesce(options.precision, () => ( 3)) });
|
|
7789
8021
|
if (!byKey2) paintCache.set(paint, byKey2 = /* @__PURE__ */ new Map());
|
|
@@ -7795,7 +8027,7 @@ function vectorPaintToSvg(paint, gradientId, options = {}) {
|
|
|
7795
8027
|
const precision = _nullishCoalesce(options.precision, () => ( 3));
|
|
7796
8028
|
const key = `${gradientId}|${role}|${precision}`;
|
|
7797
8029
|
const owner = _nullishCoalesce(options.node, () => ( paint));
|
|
7798
|
-
const cached = _optionalChain([paintCache, 'access',
|
|
8030
|
+
const cached = _optionalChain([paintCache, 'access', _198 => _198.get, 'call', _199 => _199(owner), 'optionalAccess', _200 => _200.get, 'call', _201 => _201(key)]);
|
|
7799
8031
|
if (cached && (!options.node || (role === "fill" ? options.node.fill : options.node.stroke) === paint)) return { value: `url(#${gradientId})`, defs: cached };
|
|
7800
8032
|
const node = options.node;
|
|
7801
8033
|
const bounds = node ? vectorPathLocalBounds(node) : null;
|
|
@@ -7849,7 +8081,7 @@ function vectorNodeLocalPaintBounds(node) {
|
|
|
7849
8081
|
}
|
|
7850
8082
|
var filterCache = /* @__PURE__ */ new WeakMap();
|
|
7851
8083
|
function vectorNodeFilterSvg(node, id) {
|
|
7852
|
-
if (!_optionalChain([node, 'access',
|
|
8084
|
+
if (!_optionalChain([node, 'access', _202 => _202.filters, 'optionalAccess', _203 => _203.length])) return null;
|
|
7853
8085
|
const hit = filterCache.get(node);
|
|
7854
8086
|
if (hit && hit.id === id) return hit.filter;
|
|
7855
8087
|
const active = activeVectorFilters(node);
|
|
@@ -7912,7 +8144,7 @@ function blendFromAttribute(value, m) {
|
|
|
7912
8144
|
return out;
|
|
7913
8145
|
}
|
|
7914
8146
|
function vectorDocumentToSvg(doc, options = {}) {
|
|
7915
|
-
doc = resolveVectorSymbols(doc);
|
|
8147
|
+
doc = resolveVectorLenses(resolveVectorSymbols(doc));
|
|
7916
8148
|
const precision = _nullishCoalesce(options.precision, () => ( 3));
|
|
7917
8149
|
const prefix = _nullishCoalesce(options.idPrefix, () => ( "vg-"));
|
|
7918
8150
|
const pretty = options.pretty !== false;
|
|
@@ -7931,9 +8163,10 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
7931
8163
|
if (node.resizing) out2 += ` data-vector-resizing="${escapeAttr2(JSON.stringify(node.resizing))}"`;
|
|
7932
8164
|
if (node.type === "path" && isVectorShadedPaint(node.fill)) out2 += ` data-vector-shading="${escapeAttr2(JSON.stringify(node.fill))}"`;
|
|
7933
8165
|
if (node.type === "path" && node.connector) out2 += ` data-vector-connector="${escapeAttr2(JSON.stringify(node.connector))}"`;
|
|
8166
|
+
if (node.type === "path" && node.lens) out2 += ` data-vector-lens="${escapeAttr2(JSON.stringify(node.lens))}"`;
|
|
7934
8167
|
const blend = vectorBlendModeCss(node.blendMode);
|
|
7935
8168
|
if (blend) out2 += ` style="mix-blend-mode:${blend}"`;
|
|
7936
|
-
if (_optionalChain([node, 'access',
|
|
8169
|
+
if (_optionalChain([node, 'access', _204 => _204.filters, 'optionalAccess', _205 => _205.length])) {
|
|
7937
8170
|
const filter = vectorNodeFilterSvg(node, `${prefix}filter-${node.id}`);
|
|
7938
8171
|
const data = ` data-vector-filters="${escapeAttr2(JSON.stringify(node.filters))}"`;
|
|
7939
8172
|
if (filter) {
|
|
@@ -7980,7 +8213,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
7980
8213
|
let out2 = ` stroke="${escapeAttr2(strokeValue)}" stroke-width="${num3(width)}"`;
|
|
7981
8214
|
if (node.strokeLinecap && node.strokeLinecap !== "butt") out2 += ` stroke-linecap="${node.strokeLinecap}"`;
|
|
7982
8215
|
if (node.strokeLinejoin && node.strokeLinejoin !== "miter") out2 += ` stroke-linejoin="${node.strokeLinejoin}"`;
|
|
7983
|
-
if (_optionalChain([node, 'access',
|
|
8216
|
+
if (_optionalChain([node, 'access', _206 => _206.strokeDasharray, 'optionalAccess', _207 => _207.length])) out2 += ` stroke-dasharray="${node.strokeDasharray.map(num3).join(" ")}"`;
|
|
7984
8217
|
return out2;
|
|
7985
8218
|
};
|
|
7986
8219
|
const liveCorners = (node) => {
|
|
@@ -8023,7 +8256,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8023
8256
|
};
|
|
8024
8257
|
const emit2 = (node, depth) => {
|
|
8025
8258
|
if (node.visible === false && !options.includeHidden) return;
|
|
8026
|
-
const wrappers = _nullishCoalesce(_optionalChain([options, 'access',
|
|
8259
|
+
const wrappers = _nullishCoalesce(_optionalChain([options, 'access', _208 => _208.wrap, 'optionalAccess', _209 => _209[node.id]]), () => ( []));
|
|
8027
8260
|
wrappers.forEach((w2, i) => {
|
|
8028
8261
|
let attrs = w2.id !== void 0 ? ` id="${escapeAttr2(w2.id)}"` : "";
|
|
8029
8262
|
if (w2.transform) attrs += ` transform="${escapeAttr2(w2.transform)}"`;
|
|
@@ -8044,7 +8277,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8044
8277
|
};
|
|
8045
8278
|
const emitMaskGroup = (node, depth) => {
|
|
8046
8279
|
const [source, ...contents] = node.children;
|
|
8047
|
-
const body = _optionalChain([node, 'access',
|
|
8280
|
+
const body = _optionalChain([node, 'access', _210 => _210.effects, 'optionalAccess', _211 => _211.length]) && contents.length ? [{ id: `${node.id}~content`, type: "group", effects: node.effects, children: contents }] : contents;
|
|
8048
8281
|
const settings = { type: node.mask.type, ...node.mask.invert ? { invert: true } : {} };
|
|
8049
8282
|
lines.push(`${indent(depth)}<g${common(node)} data-vector-mask="${escapeAttr2(JSON.stringify(settings))}">`);
|
|
8050
8283
|
const mask = vectorMaskRenderData(node, `${prefix}mask-${node.id}`, `${prefix}mask-filter-${node.id}`, precision);
|
|
@@ -8061,7 +8294,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8061
8294
|
lines.push(`${indent(depth + 1)}<g data-vector-part="mask-source" display="none">`);
|
|
8062
8295
|
emitNode(source, depth + 2);
|
|
8063
8296
|
lines.push(`${indent(depth + 1)}</g>`);
|
|
8064
|
-
if (_optionalChain([mask, 'optionalAccess',
|
|
8297
|
+
if (_optionalChain([mask, 'optionalAccess', _212 => _212.clip])) {
|
|
8065
8298
|
defs.push(`<clipPath id="${escapeAttr2(mask.id)}">${mask.clip.map((c) => `<path d="${c.d}" clip-rule="${c.clipRule}"/>`).join("")}</clipPath>`);
|
|
8066
8299
|
ref = ` clip-path="url(#${escapeAttr2(mask.id)})"`;
|
|
8067
8300
|
}
|
|
@@ -8073,7 +8306,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8073
8306
|
};
|
|
8074
8307
|
const emitTextElement = (node, depth, attrs) => {
|
|
8075
8308
|
const geometry = vectorTextGeometryNode(node);
|
|
8076
|
-
const fields = { text: node.text, font: node.font, ..._optionalChain([node, 'access',
|
|
8309
|
+
const fields = { text: node.text, font: node.font, ..._optionalChain([node, 'access', _213 => _213.runs, 'optionalAccess', _214 => _214.length]) ? { runs: node.runs } : {}, ...node.paragraph ? { paragraph: node.paragraph } : {}, frame: node.frame, ..._optionalChain([node, 'access', _215 => _215.effects, 'optionalAccess', _216 => _216.length]) ? { effects: node.effects } : {} };
|
|
8077
8310
|
let data = ` data-vector-text="${escapeAttr2(JSON.stringify(fields))}"`;
|
|
8078
8311
|
if (hasVectorPaintStacks(node)) data += ` data-vector-fills="${escapeAttr2(JSON.stringify(vectorFills(node)))}" data-vector-strokes="${escapeAttr2(JSON.stringify(vectorStrokes(node)))}"`;
|
|
8079
8312
|
else {
|
|
@@ -8115,12 +8348,12 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8115
8348
|
};
|
|
8116
8349
|
const emitText = (node, depth) => {
|
|
8117
8350
|
const outlines = vectorTextPaths(node).outlines;
|
|
8118
|
-
const effects = !!_optionalChain([node, 'access',
|
|
8351
|
+
const effects = !!_optionalChain([node, 'access', _217 => _217.effects, 'optionalAccess', _218 => _218.some, 'call', _219 => _219((e) => e.enabled !== false)]);
|
|
8119
8352
|
if (!outlines || !effects && options.text !== "outlines") {
|
|
8120
8353
|
emitTextElement(node, depth, common(node));
|
|
8121
8354
|
return;
|
|
8122
8355
|
}
|
|
8123
|
-
lines.push(`${indent(depth)}<g${common(node)} data-vector-live="${escapeAttr2(JSON.stringify({ kind: "text", ..._optionalChain([node, 'access',
|
|
8356
|
+
lines.push(`${indent(depth)}<g${common(node)} data-vector-live="${escapeAttr2(JSON.stringify({ kind: "text", ..._optionalChain([node, 'access', _220 => _220.effects, 'optionalAccess', _221 => _221.length]) ? { effects: node.effects } : {} }))}">`);
|
|
8124
8357
|
lines.push(`${indent(depth + 1)}<g data-vector-part="appearance">`);
|
|
8125
8358
|
for (const shape of vectorAppearanceNodes(node)) emit2(shape, depth + 2);
|
|
8126
8359
|
lines.push(`${indent(depth + 1)}</g>`);
|
|
@@ -8134,7 +8367,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8134
8367
|
const symbolRef = (symbolId) => {
|
|
8135
8368
|
const hit = symbolIds.get(symbolId);
|
|
8136
8369
|
if (hit) return hit;
|
|
8137
|
-
const sym2 = _optionalChain([doc, 'access',
|
|
8370
|
+
const sym2 = _optionalChain([doc, 'access', _222 => _222.symbols, 'optionalAccess', _223 => _223.find, 'call', _224 => _224((x) => x.id === symbolId)]);
|
|
8138
8371
|
if (!sym2) return null;
|
|
8139
8372
|
const id = `${prefix}symbol-${symbolId}`;
|
|
8140
8373
|
symbolIds.set(symbolId, id);
|
|
@@ -8144,20 +8377,20 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8144
8377
|
};
|
|
8145
8378
|
const emitInstance = (node, depth) => {
|
|
8146
8379
|
const data = { symbolId: node.symbolId, ...node.scaleStrokes === false ? { scaleStrokes: false } : {}, ...node.overrides ? { overrides: node.overrides } : {} };
|
|
8147
|
-
const exact2 = !node.overrides && node.scaleStrokes !== false && !_optionalChain([node, 'access',
|
|
8380
|
+
const exact2 = !node.overrides && node.scaleStrokes !== false && !_optionalChain([node, 'access', _225 => _225.effects, 'optionalAccess', _226 => _226.length]) && !_optionalChain([node, 'access', _227 => _227.filters, 'optionalAccess', _228 => _228.length]);
|
|
8148
8381
|
const ref = symbolRef(node.symbolId);
|
|
8149
8382
|
if (exact2 && ref) {
|
|
8150
8383
|
lines.push(`${indent(depth)}<use${common(node)} href="#${escapeAttr2(ref)}" data-vector-instance="${escapeAttr2(JSON.stringify(data))}"/>`);
|
|
8151
8384
|
return;
|
|
8152
8385
|
}
|
|
8153
|
-
const full = { ...data, ...node.transform ? { transform: node.transform } : {}, ..._optionalChain([node, 'access',
|
|
8386
|
+
const full = { ...data, ...node.transform ? { transform: node.transform } : {}, ..._optionalChain([node, 'access', _229 => _229.effects, 'optionalAccess', _230 => _230.length]) ? { effects: node.effects } : {} };
|
|
8154
8387
|
lines.push(`${indent(depth)}<g data-vector-instance="${escapeAttr2(JSON.stringify(full))}">`);
|
|
8155
8388
|
emitNode(vectorInstanceDrawn(node), depth + 1);
|
|
8156
8389
|
lines.push(`${indent(depth)}</g>`);
|
|
8157
8390
|
};
|
|
8158
8391
|
const emitFrame = (node, depth) => {
|
|
8159
8392
|
const f = node.frame;
|
|
8160
|
-
const data = { ...f, ..._optionalChain([node, 'access',
|
|
8393
|
+
const data = { ...f, ..._optionalChain([node, 'access', _231 => _231.effects, 'optionalAccess', _232 => _232.length]) ? { effects: node.effects } : {} };
|
|
8161
8394
|
lines.push(`${indent(depth)}<g${common(node)} data-vector-frame="${escapeAttr2(JSON.stringify(data))}">`);
|
|
8162
8395
|
const rect = vectorFrameRectPath(f);
|
|
8163
8396
|
if (f.fill !== void 0 && f.fill !== null && f.fill !== "none") {
|
|
@@ -8196,17 +8429,17 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8196
8429
|
if (hasOwnVectorAppearance(node)) {
|
|
8197
8430
|
const live2 = {
|
|
8198
8431
|
kind: node.type,
|
|
8199
|
-
..._optionalChain([node, 'access',
|
|
8432
|
+
..._optionalChain([node, 'access', _233 => _233.effects, 'optionalAccess', _234 => _234.length]) ? { effects: node.effects } : {},
|
|
8200
8433
|
...node.type === "group" && node.liveBoolean ? { liveBoolean: node.liveBoolean } : {},
|
|
8201
8434
|
...node.type === "group" && node.symmetry ? { symmetry: node.symmetry } : {}
|
|
8202
8435
|
};
|
|
8203
8436
|
lines.push(`${indent(depth)}<g${common(node)} data-vector-live="${escapeAttr2(JSON.stringify(live2))}">`);
|
|
8204
8437
|
lines.push(`${indent(depth + 1)}<g data-vector-part="appearance">`);
|
|
8205
|
-
for (const shape of vectorAppearanceNodes(node)) emit2(shape, depth + 2);
|
|
8438
|
+
for (const shape of isVectorLens(node) ? vectorLensDrawn(node).children : vectorAppearanceNodes(node)) emit2(shape, depth + 2);
|
|
8206
8439
|
lines.push(`${indent(depth + 1)}</g>`);
|
|
8207
8440
|
lines.push(`${indent(depth + 1)}<g data-vector-part="source" display="none">`);
|
|
8208
8441
|
if (node.type === "path") {
|
|
8209
|
-
const { effects: _e, transform: _t, opacity: _o, visible: _v, booleanOperation: _b, blendStep: _s, blendMode: _bm, filters: _f, ...source } = node;
|
|
8442
|
+
const { effects: _e, transform: _t, opacity: _o, visible: _v, booleanOperation: _b, blendStep: _s, blendMode: _bm, filters: _f, lens: _l, lensView: _lv, ...source } = node;
|
|
8210
8443
|
emit2({ ...source, id: `${node.id}~src` }, depth + 2);
|
|
8211
8444
|
} else for (const child of node.children) emit2(child, depth + 2);
|
|
8212
8445
|
lines.push(`${indent(depth + 1)}</g>`);
|
|
@@ -8247,7 +8480,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8247
8480
|
data += ` data-vector-width-profile="${widthProfileToAttribute(profile)}"`;
|
|
8248
8481
|
if (node.strokeLinecap && node.strokeLinecap !== "butt") data += ` data-vector-stroke-linecap="${node.strokeLinecap}"`;
|
|
8249
8482
|
if (node.strokeLinejoin && node.strokeLinejoin !== "miter") data += ` data-vector-stroke-linejoin="${node.strokeLinejoin}"`;
|
|
8250
|
-
if (_optionalChain([node, 'access',
|
|
8483
|
+
if (_optionalChain([node, 'access', _235 => _235.strokeDasharray, 'optionalAccess', _236 => _236.length])) data += ` data-vector-stroke-dasharray="${node.strokeDasharray.map(num3).join(" ")}"`;
|
|
8251
8484
|
}
|
|
8252
8485
|
lines.push(`${indent(depth)}<g${common(node)}${data}>`);
|
|
8253
8486
|
lines.push(`${indent(depth + 1)}<path data-vector-part="fill" d="${d}"${fillAttrs}${live}/>`);
|
|
@@ -8415,7 +8648,7 @@ function attrOrStyle(el, name) {
|
|
|
8415
8648
|
return el.attrs[name];
|
|
8416
8649
|
}
|
|
8417
8650
|
function urlId(value) {
|
|
8418
|
-
return _nullishCoalesce(_optionalChain([/^url\(\s*['"]?#([^'")\s]+)['"]?\s*\)/, 'access',
|
|
8651
|
+
return _nullishCoalesce(_optionalChain([/^url\(\s*['"]?#([^'")\s]+)['"]?\s*\)/, 'access', _237 => _237.exec, 'call', _238 => _238((_nullishCoalesce(value, () => ( ""))).trim()), 'optionalAccess', _239 => _239[1]]), () => ( null));
|
|
8419
8652
|
}
|
|
8420
8653
|
function clipRulesAsFillRules(el) {
|
|
8421
8654
|
const attrs = { ...el.attrs };
|
|
@@ -8480,9 +8713,9 @@ function resolveGradient(id, raw) {
|
|
|
8480
8713
|
for (let el = first; el && !chain.includes(el) && chain.length < 32; ) {
|
|
8481
8714
|
chain.push(el);
|
|
8482
8715
|
const href = _nullishCoalesce(el.attrs.href, () => ( el.attrs["xlink:href"]));
|
|
8483
|
-
el = _optionalChain([href, 'optionalAccess',
|
|
8716
|
+
el = _optionalChain([href, 'optionalAccess', _240 => _240.startsWith, 'call', _241 => _241("#")]) ? raw.get(href.slice(1)) : void 0;
|
|
8484
8717
|
}
|
|
8485
|
-
const attr = (name) => _optionalChain([chain, 'access',
|
|
8718
|
+
const attr = (name) => _optionalChain([chain, 'access', _242 => _242.find, 'call', _243 => _243((el) => el.attrs[name] !== void 0), 'optionalAccess', _244 => _244.attrs, 'access', _245 => _245[name]]);
|
|
8486
8719
|
const stops = _nullishCoalesce(chain.map(readStops).find((s) => s.length), () => ( []));
|
|
8487
8720
|
if (!stops.length) return null;
|
|
8488
8721
|
const user = attr("gradientUnits") === "userSpaceOnUse";
|
|
@@ -8652,7 +8885,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8652
8885
|
const stackedPath = (g, _style, m, meta) => {
|
|
8653
8886
|
const fillEl = g.children.find((c) => c.name === "path" && c.attrs["data-vector-part"] === "fill");
|
|
8654
8887
|
const subpaths = fillEl ? shapeOf(fillEl) : null;
|
|
8655
|
-
if (!_optionalChain([subpaths, 'optionalAccess',
|
|
8888
|
+
if (!_optionalChain([subpaths, 'optionalAccess', _246 => _246.length])) return null;
|
|
8656
8889
|
const parse = (v2) => {
|
|
8657
8890
|
try {
|
|
8658
8891
|
return v2 ? JSON.parse(v2) : [];
|
|
@@ -8671,7 +8904,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8671
8904
|
const key = (n) => JSON.stringify([n.subpaths, _nullishCoalesce(n.transform, () => ( null)), _nullishCoalesce(n.opacity, () => ( 1)), n.visible !== false, _nullishCoalesce(n.filters, () => ( null)), _nullishCoalesce(n.blendMode, () => ( "normal")), _nullishCoalesce(n.fillRule, () => ( "nonzero")), _nullishCoalesce(n.booleanOperation, () => ( null))]);
|
|
8672
8905
|
for (const n of nodes2) {
|
|
8673
8906
|
const prev = out[out.length - 1];
|
|
8674
|
-
if (_optionalChain([prev, 'optionalAccess',
|
|
8907
|
+
if (_optionalChain([prev, 'optionalAccess', _247 => _247.type]) === "path" && n.type === "path" && key(prev) === key(n)) {
|
|
8675
8908
|
const fills = vectorFills(n);
|
|
8676
8909
|
const strokesBefore = vectorStrokes(prev);
|
|
8677
8910
|
if (!(fills.length && strokesBefore.length)) {
|
|
@@ -8689,7 +8922,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8689
8922
|
const part = (name) => g.children.find((c) => c.name === "path" && c.attrs["data-vector-part"] === name);
|
|
8690
8923
|
const fillEl = part("fill");
|
|
8691
8924
|
const subpaths = fillEl ? shapeOf(fillEl) : null;
|
|
8692
|
-
if (!fillEl || !_optionalChain([subpaths, 'optionalAccess',
|
|
8925
|
+
if (!fillEl || !_optionalChain([subpaths, 'optionalAccess', _248 => _248.length])) return null;
|
|
8693
8926
|
const a = g.attrs;
|
|
8694
8927
|
const fs = readStyle(fillEl, style);
|
|
8695
8928
|
const strokeEl = part("stroke");
|
|
@@ -8726,7 +8959,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8726
8959
|
...profile.length ? { strokeWidthProfile: profile } : {},
|
|
8727
8960
|
...keptCap ? { strokeLinecap: keptCap } : {},
|
|
8728
8961
|
...keptJoin ? { strokeLinejoin: keptJoin } : {},
|
|
8729
|
-
..._optionalChain([keptDash, 'optionalAccess',
|
|
8962
|
+
..._optionalChain([keptDash, 'optionalAccess', _249 => _249.length]) ? { strokeDasharray: keptDash } : {}
|
|
8730
8963
|
};
|
|
8731
8964
|
return placed(node, m);
|
|
8732
8965
|
};
|
|
@@ -8791,8 +9024,8 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8791
9024
|
} else {
|
|
8792
9025
|
const fill = json2(g.attrs["data-vector-fill"]);
|
|
8793
9026
|
const stroke = json2(g.attrs["data-vector-stroke"]);
|
|
8794
|
-
node.fill = fill == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call',
|
|
8795
|
-
node.stroke = stroke == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call',
|
|
9027
|
+
node.fill = fill == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call', _250 => _250([{ paint: fill }]), 'access', _251 => _251[0], 'optionalAccess', _252 => _252.paint]), () => ( null));
|
|
9028
|
+
node.stroke = stroke == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call', _253 => _253([{ paint: stroke }]), 'access', _254 => _254[0], 'optionalAccess', _255 => _255.paint]), () => ( null));
|
|
8796
9029
|
const settings = json2(g.attrs["data-vector-stroke-settings"]);
|
|
8797
9030
|
if (settings && typeof settings === "object") {
|
|
8798
9031
|
const strokes = sanitizeVectorStrokes([{ paint: _nullishCoalesce(node.stroke, () => ( "#000")), ...settings }]);
|
|
@@ -8828,8 +9061,8 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8828
9061
|
const anchor = attrOrStyle(el, "text-anchor");
|
|
8829
9062
|
const first0 = (v2) => _nullishCoalesce(numberList(v2)[0], () => ( 0));
|
|
8830
9063
|
const tspan = el.children.find((c) => c.name === "tspan");
|
|
8831
|
-
const x = el.attrs.x !== void 0 ? first0(el.attrs.x) : first0(_optionalChain([tspan, 'optionalAccess',
|
|
8832
|
-
const y = el.attrs.y !== void 0 ? first0(el.attrs.y) : first0(_optionalChain([tspan, 'optionalAccess',
|
|
9064
|
+
const x = el.attrs.x !== void 0 ? first0(el.attrs.x) : first0(_optionalChain([tspan, 'optionalAccess', _256 => _256.attrs, 'access', _257 => _257.x]));
|
|
9065
|
+
const y = el.attrs.y !== void 0 ? first0(el.attrs.y) : first0(_optionalChain([tspan, 'optionalAccess', _258 => _258.attrs, 'access', _259 => _259.y]));
|
|
8833
9066
|
const fillValue = _nullishCoalesce(attrOrStyle(el, "fill"), () => ( style.fill));
|
|
8834
9067
|
let node = {
|
|
8835
9068
|
id: idFor(el),
|
|
@@ -8860,12 +9093,12 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8860
9093
|
if (symbolOfElement.has(el)) return symbolOfElement.get(el);
|
|
8861
9094
|
symbolOfElement.set(el, null);
|
|
8862
9095
|
const own = json2(el.attrs["data-vector-symbol"]);
|
|
8863
|
-
let id = typeof _optionalChain([own, 'optionalAccess',
|
|
9096
|
+
let id = typeof _optionalChain([own, 'optionalAccess', _260 => _260.id]) === "string" && own.id ? own.id : _nullishCoalesce(el.attrs.id, () => ( createId()));
|
|
8864
9097
|
while (usedSymbolIds.has(id)) id = `${id}-${usedSymbolIds.size}`;
|
|
8865
9098
|
usedSymbolIds.add(id);
|
|
8866
9099
|
const style = readStyle(el, rootStyle);
|
|
8867
9100
|
const nodes2 = el.name === "symbol" ? visit2(el, style, IDENTITY_MATRIX) : visitOne({ ...el, attrs: { ...el.attrs, transform: "" } }, rootStyle, parseSvgTransform(el.attrs.transform));
|
|
8868
|
-
symbols.push({ id, name: typeof _optionalChain([own, 'optionalAccess',
|
|
9101
|
+
symbols.push({ id, name: typeof _optionalChain([own, 'optionalAccess', _261 => _261.name]) === "string" && own.name ? own.name : _nullishCoalesce(el.attrs.id, () => ( "Symbol")), nodes: nodes2 });
|
|
8869
9102
|
symbolOfElement.set(el, id);
|
|
8870
9103
|
return id;
|
|
8871
9104
|
};
|
|
@@ -8877,13 +9110,13 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8877
9110
|
if (!symbolId) return null;
|
|
8878
9111
|
const own = json2(el.attrs["data-vector-instance"]);
|
|
8879
9112
|
const place2 = multiplyMatrices(translateMatrix(length(el.attrs.x), length(el.attrs.y)), m);
|
|
8880
|
-
const node = { id: idFor(el), type: "instance", ...meta, symbolId, ..._optionalChain([own, 'optionalAccess',
|
|
9113
|
+
const node = { id: idFor(el), type: "instance", ...meta, symbolId, ..._optionalChain([own, 'optionalAccess', _262 => _262.scaleStrokes]) === false ? { scaleStrokes: false } : {}, ..._optionalChain([own, 'optionalAccess', _263 => _263.overrides]) ? { overrides: own.overrides } : {} };
|
|
8881
9114
|
return isIdentityMatrix(place2) ? node : { ...node, transform: place2 };
|
|
8882
9115
|
};
|
|
8883
9116
|
const ownInstance = (g, m, meta) => {
|
|
8884
9117
|
const raw = json2(g.attrs["data-vector-instance"]);
|
|
8885
9118
|
if (!raw || typeof raw.symbolId !== "string") return null;
|
|
8886
|
-
const sym2 = [...byId.values()].find((e) => e.name === "symbol" && _optionalChain([json2, 'call',
|
|
9119
|
+
const sym2 = [...byId.values()].find((e) => e.name === "symbol" && _optionalChain([json2, 'call', _264 => _264(e.attrs["data-vector-symbol"]), 'optionalAccess', _265 => _265.id]) === raw.symbolId);
|
|
8887
9120
|
const symbolId = sym2 ? symbolFor(sym2) : raw.symbolId;
|
|
8888
9121
|
if (!symbolId) return null;
|
|
8889
9122
|
const t = Array.isArray(raw.transform) && raw.transform.length === 6 && raw.transform.every(Number.isFinite) ? raw.transform : IDENTITY_MATRIX;
|
|
@@ -8891,7 +9124,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8891
9124
|
const drawn = g.children.find((c) => c.name === "g");
|
|
8892
9125
|
const effects = sanitizeVectorEffects(raw.effects);
|
|
8893
9126
|
const node = {
|
|
8894
|
-
id: _nullishCoalesce(_optionalChain([drawn, 'optionalAccess',
|
|
9127
|
+
id: _nullishCoalesce(_optionalChain([drawn, 'optionalAccess', _266 => _266.attrs, 'access', _267 => _267.id]), () => ( idFor(g))),
|
|
8895
9128
|
type: "instance",
|
|
8896
9129
|
...meta,
|
|
8897
9130
|
symbolId,
|
|
@@ -8948,12 +9181,12 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8948
9181
|
const masked = (el, nodes2, m) => {
|
|
8949
9182
|
let out = nodes2;
|
|
8950
9183
|
const clipEl = rawMasks.get(_nullishCoalesce(urlId(attrOrStyle(el, "clip-path")), () => ( "")));
|
|
8951
|
-
if (_optionalChain([clipEl, 'optionalAccess',
|
|
9184
|
+
if (_optionalChain([clipEl, 'optionalAccess', _268 => _268.name]) === "clipPath") {
|
|
8952
9185
|
const source = maskNode(clipEl, m, out, clipEl.attrs.clipPathUnits);
|
|
8953
9186
|
if (source) out = [{ id: idFor({ name: "g", attrs: {}, children: [] }), type: "group", name: "Clip Group", mask: { type: "clip" }, children: [source, ...out] }];
|
|
8954
9187
|
}
|
|
8955
9188
|
const maskEl = rawMasks.get(_nullishCoalesce(urlId(attrOrStyle(el, "mask")), () => ( "")));
|
|
8956
|
-
if (_optionalChain([maskEl, 'optionalAccess',
|
|
9189
|
+
if (_optionalChain([maskEl, 'optionalAccess', _269 => _269.name]) === "mask") {
|
|
8957
9190
|
const source = maskNode(maskEl, m, out, maskEl.attrs.maskContentUnits);
|
|
8958
9191
|
const type = attrOrStyle(maskEl, "mask-type") === "alpha" ? "alpha" : "luminance";
|
|
8959
9192
|
if (source) out = [{ id: idFor({ name: "g", attrs: {}, children: [] }), type: "group", name: "Opacity Mask", mask: { type }, children: [source, ...out] }];
|
|
@@ -8975,19 +9208,19 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8975
9208
|
let sourceEl = part("mask-source");
|
|
8976
9209
|
if (!sourceEl) {
|
|
8977
9210
|
const el = rawMasks.get(_nullishCoalesce(urlId(maskedEl.attrs.mask), () => ( "")));
|
|
8978
|
-
const invert2 = _optionalChain([el, 'optionalAccess',
|
|
9211
|
+
const invert2 = _optionalChain([el, 'optionalAccess', _270 => _270.children, 'access', _271 => _271.find, 'call', _272 => _272((c) => c.name === "g" && c.attrs["data-vector-part"] === "mask-invert")]);
|
|
8979
9212
|
sourceEl = _nullishCoalesce(invert2, () => ( el));
|
|
8980
9213
|
}
|
|
8981
9214
|
const source = sourceEl ? visit2(sourceEl, style, m)[0] : void 0;
|
|
8982
9215
|
let contents = visit2(maskedEl, style, m);
|
|
8983
9216
|
let effects;
|
|
8984
9217
|
const wrapper = contents.length === 1 && contents[0].type === "group" && contents[0].id === `${id}~content` ? contents[0] : null;
|
|
8985
|
-
if (_optionalChain([wrapper, 'optionalAccess',
|
|
9218
|
+
if (_optionalChain([wrapper, 'optionalAccess', _273 => _273.type]) === "group") {
|
|
8986
9219
|
effects = _nullishCoalesce(wrapper.effects, () => ( void 0));
|
|
8987
9220
|
contents = wrapper.children;
|
|
8988
9221
|
}
|
|
8989
9222
|
if (!source) return contents.length ? { id, type: "group", ...meta, children: contents } : null;
|
|
8990
|
-
return { id, type: "group", ...meta, mask, ..._optionalChain([effects, 'optionalAccess',
|
|
9223
|
+
return { id, type: "group", ...meta, mask, ..._optionalChain([effects, 'optionalAccess', _274 => _274.length]) ? { effects } : {}, children: [source, ...contents] };
|
|
8991
9224
|
};
|
|
8992
9225
|
const frameGroup = (g, style, m, meta) => {
|
|
8993
9226
|
const raw = parseJson(g.attrs["data-vector-frame"]);
|
|
@@ -8999,7 +9232,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8999
9232
|
const { rigid, residual } = decomposeRigid(m);
|
|
9000
9233
|
const r = _chunkBJTCSLF6cjs.bezierPathBounds.call(void 0, _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, subpathsToBezier(vectorFrameRectPath(frame)), residual));
|
|
9001
9234
|
const back = invertMatrix(rigid);
|
|
9002
|
-
const effects = sanitizeVectorEffects(_optionalChain([raw, 'optionalAccess',
|
|
9235
|
+
const effects = sanitizeVectorEffects(_optionalChain([raw, 'optionalAccess', _275 => _275.effects]));
|
|
9003
9236
|
return {
|
|
9004
9237
|
id,
|
|
9005
9238
|
type: "group",
|
|
@@ -9033,6 +9266,8 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9033
9266
|
if (resizing) meta.resizing = resizing;
|
|
9034
9267
|
const connector = child.attrs["data-vector-connector"] !== void 0 ? sanitizeVectorConnector(parseJson(child.attrs["data-vector-connector"])) : null;
|
|
9035
9268
|
if (connector) meta.connector = connector;
|
|
9269
|
+
const lens = child.attrs["data-vector-lens"] !== void 0 ? sanitizeVectorLens(parseJson(child.attrs["data-vector-lens"])) : null;
|
|
9270
|
+
if (lens) meta.lens = lens;
|
|
9036
9271
|
if (child.name === "g" && child.attrs["data-vector-frame"] !== void 0) {
|
|
9037
9272
|
const node2 = frameGroup(child, s, m, meta);
|
|
9038
9273
|
if (node2) out.push(node2);
|
|
@@ -9463,13 +9698,13 @@ function hitTestVectorNode(node, p, tolerance = 0, parent = IDENTITY_MATRIX, opt
|
|
|
9463
9698
|
}
|
|
9464
9699
|
if (isVectorMaskGroup(node)) {
|
|
9465
9700
|
const m = multiplyMatrices(nodeMatrix(node), parent);
|
|
9466
|
-
const entered = !!_optionalChain([options, 'access',
|
|
9701
|
+
const entered = !!_optionalChain([options, 'access', _276 => _276.entered, 'optionalAccess', _277 => _277.has, 'call', _278 => _278(node.id)]);
|
|
9467
9702
|
if (!entered && isVectorMaskActive(node) && !vectorMaskContains(node, applyMatrix(invertMatrix(m), p), tolerance)) return false;
|
|
9468
9703
|
const shown = !entered && hasOwnVectorAppearance(node) ? expandVectorAppearance(node).children : node.children;
|
|
9469
9704
|
for (let i = shown.length - 1; i >= 1; i--) if (hitTestVectorNode(shown[i], p, tolerance, m, options)) return true;
|
|
9470
9705
|
return entered && hitTestVectorMaskSource(node, p, tolerance, m, options);
|
|
9471
9706
|
}
|
|
9472
|
-
if (!(node.type === "group" && (!hasOwnVectorAppearance(node) || _optionalChain([options, 'access',
|
|
9707
|
+
if (!(node.type === "group" && (!hasOwnVectorAppearance(node) || _optionalChain([options, 'access', _279 => _279.entered, 'optionalAccess', _280 => _280.has, 'call', _281 => _281(node.id)])))) node = expandVectorAppearance(node);
|
|
9473
9708
|
if (node.type === "group") {
|
|
9474
9709
|
const m = multiplyMatrices(nodeMatrix(node), parent);
|
|
9475
9710
|
return node.children.some((c) => hitTestVectorNode(c, p, tolerance, m, options));
|
|
@@ -9481,7 +9716,7 @@ function hitTestVectorNode(node, p, tolerance = 0, parent = IDENTITY_MATRIX, opt
|
|
|
9481
9716
|
function hitTestVectorMaskSource(group, p, tolerance, m, options) {
|
|
9482
9717
|
const source = group.children[0];
|
|
9483
9718
|
if (source.visible === false) return false;
|
|
9484
|
-
if (_optionalChain([group, 'access',
|
|
9719
|
+
if (_optionalChain([group, 'access', _282 => _282.mask, 'optionalAccess', _283 => _283.type]) !== "clip") return hitTestVectorNode(source, p, tolerance, m, options);
|
|
9485
9720
|
const paths = collectPathNodes(source).filter((n) => n.visible !== false);
|
|
9486
9721
|
const pt2 = [p.x, p.y];
|
|
9487
9722
|
return paths.some((n) => {
|
|
@@ -9530,24 +9765,24 @@ function mapAnchor(a, m) {
|
|
|
9530
9765
|
}
|
|
9531
9766
|
function bakeIntoGeometry(node, m) {
|
|
9532
9767
|
if (isIdentityMatrix(m)) return node;
|
|
9533
|
-
if (_optionalChain([node, 'access',
|
|
9768
|
+
if (_optionalChain([node, 'access', _284 => _284.effects, 'optionalAccess', _285 => _285.length])) node = { ...node, effects: transformVectorEffects(node.effects, m, node) };
|
|
9534
9769
|
if (isVectorFrame(node)) return bakeFrame(node, m);
|
|
9535
9770
|
if (node.type === "group") {
|
|
9536
9771
|
const group = node;
|
|
9537
9772
|
const children = group.children.map((c) => transformVectorNode(c, m));
|
|
9538
9773
|
const sym2 = group.symmetry ? { symmetry: transformVectorSymmetry(group.symmetry, m) } : {};
|
|
9539
|
-
const spine = _optionalChain([group, 'access',
|
|
9774
|
+
const spine = _optionalChain([group, 'access', _286 => _286.blend, 'optionalAccess', _287 => _287.spine]);
|
|
9540
9775
|
if (!spine) return { ...group, ...sym2, children };
|
|
9541
9776
|
const moved = { closed: spine.closed, anchors: spine.anchors.map((a) => mapAnchor(a, m)) };
|
|
9542
9777
|
return { ...group, children, blend: { ...group.blend, spine: moved } };
|
|
9543
9778
|
}
|
|
9544
9779
|
const path = node.type === "text" ? bakeVectorTextGeometry(node, m) : node;
|
|
9545
9780
|
const flips = m[0] * m[3] - m[1] * m[2] < 0;
|
|
9546
|
-
const mirrored = flips && _optionalChain([path, 'access',
|
|
9781
|
+
const mirrored = flips && _optionalChain([path, 'access', _288 => _288.strokeWidthProfile, 'optionalAccess', _289 => _289.length]);
|
|
9547
9782
|
const layer = (l) => ({
|
|
9548
9783
|
...l,
|
|
9549
9784
|
...isVectorGradient(l.paint) || isVectorShadedPaint(l.paint) ? { paint: transformVectorPaint(l.paint, m) } : {},
|
|
9550
|
-
...flips && _optionalChain([l, 'access',
|
|
9785
|
+
...flips && _optionalChain([l, 'access', _290 => _290.strokeWidthProfile, 'optionalAccess', _291 => _291.length]) ? { strokeWidthProfile: mirrorWidthProfile(l.strokeWidthProfile) } : {}
|
|
9551
9786
|
});
|
|
9552
9787
|
return {
|
|
9553
9788
|
...path,
|
|
@@ -9782,7 +10017,7 @@ function roundSubpaths(subpaths, precision = 3) {
|
|
|
9782
10017
|
|
|
9783
10018
|
// src/vector/symmetry.ts
|
|
9784
10019
|
function isVectorSymmetryGroup(node) {
|
|
9785
|
-
return _optionalChain([node, 'optionalAccess',
|
|
10020
|
+
return _optionalChain([node, 'optionalAccess', _292 => _292.type]) === "group" && !!node.symmetry && !node.blend && !node.liveBoolean && !node.mask && !node.frame;
|
|
9786
10021
|
}
|
|
9787
10022
|
var rad = (deg) => deg * Math.PI / 180;
|
|
9788
10023
|
var exact = (v2) => Math.abs(v2) < 1e-12 ? 0 : v2;
|
|
@@ -9811,14 +10046,14 @@ function renamed(node, k) {
|
|
|
9811
10046
|
if (node.type === "group") return { ...node, id, children: node.children.map((c) => renamed(c, k)) };
|
|
9812
10047
|
return { ...node, id };
|
|
9813
10048
|
}
|
|
9814
|
-
var
|
|
10049
|
+
var drawnCache3 = /* @__PURE__ */ new WeakMap();
|
|
9815
10050
|
function vectorSymmetryDrawn(node) {
|
|
9816
|
-
let hit =
|
|
10051
|
+
let hit = drawnCache3.get(node);
|
|
9817
10052
|
if (hit) return hit;
|
|
9818
10053
|
const { symmetry, ...group } = node;
|
|
9819
10054
|
const copies = vectorSymmetryMatrices(symmetry).flatMap((m, k) => node.children.map((c) => ({ ...renamed(transformVectorNode(c, m), k + 1), locked: true })));
|
|
9820
10055
|
hit = { ...group, children: [...node.children, ...copies] };
|
|
9821
|
-
|
|
10056
|
+
drawnCache3.set(node, hit);
|
|
9822
10057
|
return hit;
|
|
9823
10058
|
}
|
|
9824
10059
|
function vectorSymmetryAxes(s, box) {
|
|
@@ -10334,5 +10569,15 @@ function transformVectorSymmetry(s, m) {
|
|
|
10334
10569
|
|
|
10335
10570
|
|
|
10336
10571
|
|
|
10337
|
-
exports.isVectorMeshGradient = isVectorMeshGradient; exports.isVectorFreeformGradient = isVectorFreeformGradient; exports.isVectorShadedPaint = isVectorShadedPaint; exports.vectorRgbaToCss = vectorRgbaToCss; exports.VECTOR_MESH_MAX = VECTOR_MESH_MAX; exports.createVectorMeshGradient = createVectorMeshGradient; exports.vectorMeshPointAt = vectorMeshPointAt; exports.vectorMeshColorAt = vectorMeshColorAt; exports.vectorMeshLines = vectorMeshLines; exports.vectorFreeformSpreadScale = vectorFreeformSpreadScale; exports.vectorFreeformLineSegments = vectorFreeformLineSegments; exports.vectorFreeformField = vectorFreeformField; exports.sampleVectorFreeform = sampleVectorFreeform; exports.autoVectorFreeformGradient = autoVectorFreeformGradient; exports.vectorShadedSvgDefs = vectorShadedSvgDefs; exports.mapVectorShadedPaint = mapVectorShadedPaint; exports.transformVectorShadedPaint = transformVectorShadedPaint; exports.sanitizeVectorShadedPaint = sanitizeVectorShadedPaint; exports.removeVectorFreeformPoint = removeVectorFreeformPoint; exports.nearestVectorShadingPoint = nearestVectorShadingPoint; exports.VECTOR_CORNER_KINDS = VECTOR_CORNER_KINDS; exports.VECTOR_GRADIENT_TYPES = VECTOR_GRADIENT_TYPES; exports.VECTOR_GRADIENT_SPREADS = VECTOR_GRADIENT_SPREADS; exports.VECTOR_GRADIENT_INTERPOLATIONS = VECTOR_GRADIENT_INTERPOLATIONS; exports.VECTOR_STROKE_GRADIENT_MODES = VECTOR_STROKE_GRADIENT_MODES; exports.VECTOR_ARROWHEADS = VECTOR_ARROWHEADS; exports.VECTOR_BLEND_MODES = VECTOR_BLEND_MODES; exports.VECTOR_HORIZONTAL_RESIZING = VECTOR_HORIZONTAL_RESIZING; exports.VECTOR_VERTICAL_RESIZING = VECTOR_VERTICAL_RESIZING; exports.VECTOR_CONNECTOR_SIDES = VECTOR_CONNECTOR_SIDES; exports.VECTOR_CONNECTOR_ROUTES = VECTOR_CONNECTOR_ROUTES; exports.VECTOR_BLEND_SPACINGS = VECTOR_BLEND_SPACINGS; exports.VECTOR_MASK_TYPES = VECTOR_MASK_TYPES; exports.VECTOR_SYMMETRY_MODES = VECTOR_SYMMETRY_MODES; exports.VECTOR_TEXT_ALIGNS = VECTOR_TEXT_ALIGNS; exports.VECTOR_PATH_TEXT_BASELINES = VECTOR_PATH_TEXT_BASELINES; exports.VECTOR_CONSTRAINT_KINDS = VECTOR_CONSTRAINT_KINDS; exports.VECTOR_TOOLS = VECTOR_TOOLS; exports.VECTOR_TRANSFORM_HANDLES = VECTOR_TRANSFORM_HANDLES; exports.VECTOR_PATHFINDER_OPERATIONS = VECTOR_PATHFINDER_OPERATIONS; exports.VECTOR_EFFECT_TYPES = VECTOR_EFFECT_TYPES; exports.VECTOR_MERGE_MODES = VECTOR_MERGE_MODES; exports.VECTOR_FILTER_TYPES = VECTOR_FILTER_TYPES; exports.isVectorGradient = isVectorGradient; exports.parseVectorColor = parseVectorColor; exports.VECTOR_GRADIENT_MIN_STOPS = VECTOR_GRADIENT_MIN_STOPS; exports.gradientMidpointRemap = gradientMidpointRemap; exports.sortedVectorGradientStops = sortedVectorGradientStops; exports.vectorGradientNeedsExpansion = vectorGradientNeedsExpansion; exports.vectorGradientRamp = vectorGradientRamp; exports.sampleVectorGradient = sampleVectorGradient; exports.expandVectorGradientStops = expandVectorGradientStops; exports.samplePlainStops = samplePlainStops; exports.reverseVectorGradient = reverseVectorGradient; exports.insertVectorGradientStop = insertVectorGradientStop; exports.moveVectorGradientStop = moveVectorGradientStop; exports.removeVectorGradientStop = removeVectorGradientStop; exports.vectorGradientMidpointPosition = vectorGradientMidpointPosition; exports.vectorGradientMidpointFromPosition = vectorGradientMidpointFromPosition; exports.spanVectorGradientStops = spanVectorGradientStops; exports.hasExplicitGradientGeometry = hasExplicitGradientGeometry; exports.vectorGradientPoints = vectorGradientPoints; exports.vectorBoxMatrix = vectorBoxMatrix; exports.vectorGradientUnitsMatrix = vectorGradientUnitsMatrix; exports.vectorGradientMatrix = vectorGradientMatrix; exports.vectorGradientFocalParam = vectorGradientFocalParam; exports.vectorGradientParam = vectorGradientParam; exports.applyVectorGradientSpread = applyVectorGradientSpread; exports.vectorGradientTAt = vectorGradientTAt; exports.sampleVectorGradientAt = sampleVectorGradientAt; exports.vectorGradientAspect = vectorGradientAspect; exports.explicitVectorGradient = explicitVectorGradient; exports.pinVectorGradient = pinVectorGradient; exports.transformVectorGradient = transformVectorGradient; exports.mapVectorGradient = mapVectorGradient; exports.mapVectorPaint = mapVectorPaint; exports.transformVectorPaint = transformVectorPaint; exports.isCentredVectorGradient = isCentredVectorGradient; exports.vectorGradientHandles = vectorGradientHandles; exports.moveVectorGradientHandle = moveVectorGradientHandle; exports.setVectorGradientVector = setVectorGradientVector; exports.VECTOR_GRADIENT_MAX_PERIODS = VECTOR_GRADIENT_MAX_PERIODS; exports.periodicVectorGradientStops = periodicVectorGradientStops; exports.expandVectorGradientSpread = expandVectorGradientSpread; exports.vectorGradientArea = vectorGradientArea; exports.patternAttrs = patternAttrs; exports.vectorGradientSvgDefs = vectorGradientSvgDefs; exports.sampleVectorPaintDefAt = sampleVectorPaintDefAt; exports.sanitizeVectorGradient = sanitizeVectorGradient; exports.convertVectorGradient = convertVectorGradient; exports.defaultVectorGradient = defaultVectorGradient; exports.applyVectorGradientPatch = applyVectorGradientPatch; exports.IDENTITY_MATRIX = IDENTITY_MATRIX; exports.multiplyMatrices = multiplyMatrices; exports.translateMatrix = translateMatrix; exports.scaleMatrix = scaleMatrix; exports.rotateMatrix = rotateMatrix; exports.matrixAbout = matrixAbout; exports.skewMatrix = skewMatrix; exports.applyMatrix = applyMatrix; exports.isIdentityMatrix = isIdentityMatrix; exports.invertMatrix = invertMatrix; exports.applyMatrixLinear = applyMatrixLinear; exports.matrixRotation = matrixRotation; exports.decomposeRigid = decomposeRigid; exports.isVectorSymmetryGroup = isVectorSymmetryGroup; exports.vectorSymmetryMatrices = vectorSymmetryMatrices; exports.vectorSymmetryDrawn = vectorSymmetryDrawn; exports.vectorSymmetryAxes = vectorSymmetryAxes; exports.sanitizeVectorSymmetry = sanitizeVectorSymmetry; exports.VECTOR_SYMMETRY_MODE_LABELS = VECTOR_SYMMETRY_MODE_LABELS; exports.transformVectorSymmetry = transformVectorSymmetry; exports.vectorCornerAt = vectorCornerAt; exports.vectorCorners = vectorCorners; exports.cornerSetback = cornerSetback; exports.fitCornerRadius = fitCornerRadius; exports.cornerBisectorPoint = cornerBisectorPoint; exports.cornerRadiusChange = cornerRadiusChange; exports.hasVectorCorners = hasVectorCorners; exports.expandVectorCornersOf = expandVectorCornersOf; exports.expandVectorCorners = expandVectorCorners; exports.setAnchorCorner = setAnchorCorner; exports.nextVectorCornerKind = nextVectorCornerKind; exports.setSubpathCorners = setSubpathCorners; exports.VECTOR_WIDTH_PROFILE_MAX_POINTS = VECTOR_WIDTH_PROFILE_MAX_POINTS; exports.VECTOR_WIDTH_PROFILE_MAX_SCALE = VECTOR_WIDTH_PROFILE_MAX_SCALE; exports.VECTOR_WIDTH_SAME_T = VECTOR_WIDTH_SAME_T; exports.VECTOR_WIDTH_PRESETS = VECTOR_WIDTH_PRESETS; exports.VECTOR_WIDTH_PRESET_IDS = VECTOR_WIDTH_PRESET_IDS; exports.sanitizeWidthProfile = sanitizeWidthProfile; exports.isUniformWidthProfile = isUniformWidthProfile; exports.widthProfileAt = widthProfileAt; exports.widthProfileMaxScale = widthProfileMaxScale; exports.widthProfilePreset = widthProfilePreset; exports.widthProfilePresetId = widthProfilePresetId; exports.reverseWidthProfile = reverseWidthProfile; exports.mirrorWidthProfile = mirrorWidthProfile; exports.insertWidthPoint = insertWidthPoint; exports.setWidthPoint = setWidthPoint; exports.removeWidthPoints = removeWidthPoints; exports.taperWaveFactor = taperWaveFactor; exports.generateWidthProfile = generateWidthProfile; exports.VECTOR_PRESSURE_NOMINAL = VECTOR_PRESSURE_NOMINAL; exports.pressureWidthProfile = pressureWidthProfile; exports.dashIntervals = dashIntervals; exports.variableStrokeRings = variableStrokeRings; exports.variableStrokeOutline = variableStrokeOutline; exports.nearestStrokePosition = nearestStrokePosition; exports.strokePositionPoint = strokePositionPoint; exports.isClosedBezierShape = isClosedBezierShape; exports.effectiveStrokeAlign = effectiveStrokeAlign; exports.strokeWidthProfileOf = strokeWidthProfileOf; exports.hasStrokeExtras = hasStrokeExtras; exports.vectorStrokeLineArea = vectorStrokeLineArea; exports.arrowheadWeight = arrowheadWeight; exports.arrowheadInset = arrowheadInset; exports.arrowheadPath = arrowheadPath; exports.vectorStrokeParts = vectorStrokeParts; exports.vectorStrokeOutlinePath = vectorStrokeOutlinePath; exports.hitTestVectorStroke = hitTestVectorStroke; exports.vectorStrokeReach = vectorStrokeReach; exports.VECTOR_STROKE_SETTING_KEYS = VECTOR_STROKE_SETTING_KEYS; exports.VECTOR_BLEND_MODE_LABELS = VECTOR_BLEND_MODE_LABELS; exports.isVectorBlendMode = isVectorBlendMode; exports.vectorBlendModeCss = vectorBlendModeCss; exports.vectorBlendModeFromCss = vectorBlendModeFromCss; exports.isPlainVectorPaintLayer = isPlainVectorPaintLayer; exports.isDrawnVectorPaintLayer = isDrawnVectorPaintLayer; exports.vectorFills = vectorFills; exports.vectorStrokeSettings = vectorStrokeSettings; exports.vectorStrokes = vectorStrokes; exports.hasVectorPaintStacks = hasVectorPaintStacks; exports.withVectorFills = withVectorFills; exports.withVectorStrokes = withVectorStrokes; exports.normalizeVectorPaintStacks = normalizeVectorPaintStacks; exports.sanitizeVectorFills = sanitizeVectorFills; exports.sanitizeVectorStrokeSettings = sanitizeVectorStrokeSettings; exports.sanitizeVectorStrokes = sanitizeVectorStrokes; exports.vectorPaintLayerNodes = vectorPaintLayerNodes; exports.needsVectorPaintLayers = needsVectorPaintLayers; exports.vectorStrokeStackReach = vectorStrokeStackReach; exports.hitTestVectorPaintLayer = hitTestVectorPaintLayer; exports.hitTestVectorPaintStack = hitTestVectorPaintStack; exports.vectorStacksHaveGradient = vectorStacksHaveGradient; exports.newVectorStrokeLayer = newVectorStrokeLayer; exports.vectorTargetPaint = vectorTargetPaint; exports.withVectorTargetPaint = withVectorTargetPaint; exports.effectPathLength = effectPathLength; exports.effectPathVertexCount = effectPathVertexCount; exports.trimIntervals = trimIntervals; exports.trimPaths = trimPaths; exports.trimPathsIndividually = trimPathsIndividually; exports.puckerBloatPaths = puckerBloatPaths; exports.roundCornerPaths = roundCornerPaths; exports.offsetPaths = offsetPaths; exports.sweepPath = sweepPath; exports.twistPaths = twistPaths; exports.zigzagPaths = zigzagPaths; exports.wigglePaths = wigglePaths; exports.mergePaths = mergePaths; exports.vectorRepeaterCopies = vectorRepeaterCopies; exports.repeatPaths = repeatPaths; exports.pathsCenter = pathsCenter; exports.mapVectorPoints = mapVectorPoints; exports.mapVectorSubpaths = mapVectorSubpaths; exports.mapBezierPath = mapBezierPath; exports.isVectorFrame = isVectorFrame; exports.vectorFrameRectPath = vectorFrameRectPath; exports.vectorFrameDrawn = vectorFrameDrawn; exports.vectorFrameContains = vectorFrameContains; exports.vectorFrameChildMatrix = vectorFrameChildMatrix; exports.sanitizeVectorFrame = sanitizeVectorFrame; exports.sanitizeVectorResizing = sanitizeVectorResizing; exports.VECTOR_HORIZONTAL_RESIZING_LABELS = VECTOR_HORIZONTAL_RESIZING_LABELS; exports.VECTOR_VERTICAL_RESIZING_LABELS = VECTOR_VERTICAL_RESIZING_LABELS; exports.vectorBoundsInside = vectorBoundsInside; exports.vectorArtboards = vectorArtboards; exports.vectorFrameDocument = vectorFrameDocument; exports.getVectorFramePanel = getVectorFramePanel; exports.splitIntoFaces = splitIntoFaces; exports.knifePath = knifePath; exports.eraserRegion = eraserRegion; exports.eraseFromFill = eraseFromFill; exports.eraseFromOutline = eraseFromOutline; exports.polylineBounds = polylineBounds; exports.simplifyPolyline = simplifyPolyline; exports.VECTOR_FILTER_DEFAULTS = VECTOR_FILTER_DEFAULTS; exports.VECTOR_FILTER_LABELS = VECTOR_FILTER_LABELS; exports.VECTOR_FILTER_PARAM_SPECS = VECTOR_FILTER_PARAM_SPECS; exports.isVectorFilterType = isVectorFilterType; exports.normalizeVectorFilterParams = normalizeVectorFilterParams; exports.vectorFilterParamKeys = vectorFilterParamKeys; exports.createVectorFilter = createVectorFilter; exports.sanitizeVectorFilters = sanitizeVectorFilters; exports.activeVectorFilters = activeVectorFilters; exports.vectorFilterReach = vectorFilterReach; exports.vectorFilterSvg = vectorFilterSvg; exports.vectorFilterMarkup = vectorFilterMarkup; exports.VECTOR_FILTER_MENU = VECTOR_FILTER_MENU; exports.isVectorMaskType = isVectorMaskType; exports.sanitizeVectorMask = sanitizeVectorMask; exports.isVectorMaskGroup = isVectorMaskGroup; exports.isVectorMaskActive = isVectorMaskActive; exports.vectorMaskSource = vectorMaskSource; exports.vectorMaskContents = vectorMaskContents; exports.vectorMaskOwner = vectorMaskOwner; exports.vectorMaskSummary = vectorMaskSummary; exports.vectorMaskRegionShapes = vectorMaskRegionShapes; exports.vectorMaskRegion = vectorMaskRegion; exports.vectorMaskRegionPath = vectorMaskRegionPath; exports.vectorMaskContains = vectorMaskContains; exports.vectorMaskedShapes = vectorMaskedShapes; exports.vectorMaskedGeometry = vectorMaskedGeometry; exports.vectorMaskedLocalBounds = vectorMaskedLocalBounds; exports.vectorMaskContentBounds = vectorMaskContentBounds; exports.vectorMaskRenderData = vectorMaskRenderData; exports.DEFAULT_TEXT_STYLE = DEFAULT_TEXT_STYLE; exports.DEFAULT_AUTO_LEADING = DEFAULT_AUTO_LEADING; exports.fitRuns = fitRuns; exports.styleAt = styleAt; exports.restyleRange = restyleRange; exports.spliceRuns = spliceRuns; exports.paragraphRanges = paragraphRanges; exports.fitParagraphRuns = fitParagraphRuns; exports.fontOf = fontOf; exports.isTextSpace = isTextSpace; exports.layoutText = layoutText; exports.textIndexAt = textIndexAt; exports.caretAt = caretAt; exports.textDecorations = textDecorations; exports.textRectPath = textRectPath; exports.textFragmentOutline = textFragmentOutline; exports.cssFontFamily = cssFontFamily; exports.cssFont = cssFont; exports.createCanvasTextShaper = createCanvasTextShaper; exports.createOutlineTextShaper = createOutlineTextShaper; exports.createMetricTextShaper = createMetricTextShaper; exports.setVectorTextShaper = setVectorTextShaper; exports.getVectorTextShaper = getVectorTextShaper; exports.vectorTextShaperGeneration = vectorTextShaperGeneration; exports.vectorTextHasOutlines = vectorTextHasOutlines; exports.vectorTextFamilies = vectorTextFamilies; exports.DEFAULT_VECTOR_FONT = DEFAULT_VECTOR_FONT; exports.VECTOR_CHARACTER_STYLE_KEYS = VECTOR_CHARACTER_STYLE_KEYS; exports.VECTOR_PARAGRAPH_STYLE_KEYS = VECTOR_PARAGRAPH_STYLE_KEYS; exports.VectorTextError = VectorTextError; exports.fitVectorTextRuns = fitVectorTextRuns; exports.vectorTextRuns = vectorTextRuns; exports.vectorTextStyleAt = vectorTextStyleAt; exports.measureVectorPath = measureVectorPath; exports.vectorPathAt = vectorPathAt; exports.vectorPathTextPositions = vectorPathTextPositions; exports.layoutVectorText = layoutVectorText; exports.glyphBox = glyphBox; exports.vectorTextPaths = vectorTextPaths; exports.vectorTextPaintSource = vectorTextPaintSource; exports.vectorTextCaret = vectorTextCaret; exports.vectorTextIndexAt = vectorTextIndexAt; exports.vectorTextSelectionQuads = vectorTextSelectionQuads; exports.patchVectorCharacterStyle = patchVectorCharacterStyle; exports.patchVectorParagraphStyle = patchVectorParagraphStyle; exports.sanitizeVectorTextFrame = sanitizeVectorTextFrame; exports.normalizeVectorTextRuns = normalizeVectorTextRuns; exports.sanitizeVectorTextFields = sanitizeVectorTextFields; exports.vectorTextRange = vectorTextRange; exports.replaceVectorText = replaceVectorText; exports.styleVectorText = styleVectorText; exports.bakeVectorTextGeometry = bakeVectorTextGeometry; exports.vectorTextName = vectorTextName; exports.pathTextFrameFromBezier = pathTextFrameFromBezier; exports.vectorTextBoxOutline = vectorTextBoxOutline; exports.vectorTextSpans = vectorTextSpans; exports.vectorTextGeometryNode = vectorTextGeometryNode; exports.vectorTextSpanSvg = vectorTextSpanSvg; exports.VECTOR_SYMBOL_MAX_DEPTH = VECTOR_SYMBOL_MAX_DEPTH; exports.vectorSymbolsUsedIn = vectorSymbolsUsedIn; exports.vectorSymbolUses = vectorSymbolUses; exports.resolveVectorSymbols = resolveVectorSymbols; exports.stripVectorSymbolArt = stripVectorSymbolArt; exports.scaleVectorStrokeWidths = scaleVectorStrokeWidths; exports.tintVectorNode = tintVectorNode; exports.prefixVectorIds = prefixVectorIds; exports.vectorInstanceGroup = vectorInstanceGroup; exports.composeVectorMatrices = composeVectorMatrices; exports.vectorPaintSolid = vectorPaintSolid; exports.shadeVectorColor = shadeVectorColor; exports.vectorPathRings = vectorPathRings; exports.vectorExtrudeFaces = vectorExtrudeFaces; exports.vectorBevelFaces = vectorBevelFaces; exports.WARP_STYLES = WARP_STYLES; exports.WARP_STYLE_LABELS = WARP_STYLE_LABELS; exports.warpPresetGrid = warpPresetGrid; exports.warpPresetMesh = warpPresetMesh; exports.warpMeshColumns = warpMeshColumns; exports.warpMeshRows = warpMeshRows; exports.isValidWarpMesh = isValidWarpMesh; exports.fitWarpMesh = fitWarpMesh; exports.identityWarpMesh = identityWarpMesh; exports.evalWarpMesh = evalWarpMesh; exports.splitWarpMeshU = splitWarpMeshU; exports.splitWarpMeshV = splitWarpMeshV; exports.removeWarpMeshSplitU = removeWarpMeshSplitU; exports.removeWarpMeshSplitV = removeWarpMeshSplitV; exports.mapWarpMeshPoints = mapWarpMeshPoints; exports.resizeWarpMesh = resizeWarpMesh; exports.warpMeshControlBounds = warpMeshControlBounds; exports.warpMeshParamAt = warpMeshParamAt; exports.dragWarpMeshPoint = dragWarpMeshPoint; exports.pullWarpMesh = pullWarpMesh; exports.warpMeshEditPoints = warpMeshEditPoints; exports.warpMeshGridCurves = warpMeshGridCurves; exports.vectorMeshFromOutline = vectorMeshFromOutline; exports.vectorMeshOutline = vectorMeshOutline; exports.VECTOR_EFFECT_DEFAULTS = VECTOR_EFFECT_DEFAULTS; exports.VECTOR_EFFECT_LABELS = VECTOR_EFFECT_LABELS; exports.VECTOR_EFFECT_PARAM_SPECS = VECTOR_EFFECT_PARAM_SPECS; exports.vectorEnvelopeMesh = vectorEnvelopeMesh; exports.vectorEnvelopeMap = vectorEnvelopeMap; exports.normalizeVectorEffectParams = normalizeVectorEffectParams; exports.createVectorEffect = createVectorEffect; exports.activeVectorEffects = activeVectorEffects; exports.hasOwnVectorAppearance = hasOwnVectorAppearance; exports.hasVectorAppearance = hasVectorAppearance; exports.isVectorLiveBoolean = isVectorLiveBoolean; exports.vectorOperandOperation = vectorOperandOperation; exports.vectorLiveBooleanSteps = vectorLiveBooleanSteps; exports.clearVectorLiveBooleanCache = clearVectorLiveBooleanCache; exports.foldVectorBooleanOperands = foldVectorBooleanOperands; exports.applyVectorEffects = applyVectorEffects; exports.vectorInstanceDrawn = vectorInstanceDrawn; exports.vectorChildAppearanceShapes = vectorChildAppearanceShapes; exports.vectorEffectInputPaths = vectorEffectInputPaths; exports.vectorEffectInputBounds = vectorEffectInputBounds; exports.vectorNodeEnvelope = vectorNodeEnvelope; exports.vectorEnvelopeFrame = vectorEnvelopeFrame; exports.vectorAppearanceShapes = vectorAppearanceShapes; exports.vectorAppearanceOutline = vectorAppearanceOutline; exports.vectorAppearanceNodes = vectorAppearanceNodes; exports.expandVectorAppearance = expandVectorAppearance; exports.expandVectorAppearances = expandVectorAppearances; exports.sanitizeVectorEffects = sanitizeVectorEffects; exports.transformVectorEffects = transformVectorEffects; exports.vectorEnteredGroups = vectorEnteredGroups; exports.isVectorConnector = isVectorConnector; exports.vectorConnectionSites = vectorConnectionSites; exports.nearestVectorConnectionSite = nearestVectorConnectionSite; exports.vectorConnectorWorldAnchors = vectorConnectorWorldAnchors; exports.routeVectorConnector = routeVectorConnector; exports.rerouteVectorConnectors = rerouteVectorConnectors; exports.sanitizeVectorConnector = sanitizeVectorConnector; exports.VECTOR_CONNECTOR_ROUTE_LABELS = VECTOR_CONNECTOR_ROUTE_LABELS; exports.VECTOR_CONNECTOR_SIDE_LABELS = VECTOR_CONNECTOR_SIDE_LABELS; exports.getVectorConnectorPanel = getVectorConnectorPanel; exports.vectorConnectorTargetAt = vectorConnectorTargetAt; exports.vectorStrokeGradientDefs = vectorStrokeGradientDefs; exports.vectorCornersAttribute = vectorCornersAttribute; exports.applyVectorCornersAttribute = applyVectorCornersAttribute; exports.vectorPathLocalBounds = vectorPathLocalBounds; exports.vectorPaintToSvg = vectorPaintToSvg; exports.vectorStrokeSvgParts = vectorStrokeSvgParts; exports.vectorNodeLocalPaintBounds = vectorNodeLocalPaintBounds; exports.vectorNodeFilterSvg = vectorNodeFilterSvg; exports.widthProfileToAttribute = widthProfileToAttribute; exports.widthProfileFromAttribute = widthProfileFromAttribute; exports.vectorDocumentToSvg = vectorDocumentToSvg; exports.parseSvgTransform = parseSvgTransform; exports.parseVectorSvg = parseVectorSvg; exports.VECTOR_SPATIAL_MIN = VECTOR_SPATIAL_MIN; exports.VectorRTree = VectorRTree; exports.vectorNodePaintBox = vectorNodePaintBox; exports.vectorSpatialIndex = vectorSpatialIndex; exports.vectorNodesNear = vectorNodesNear; exports.cloneAnchor = cloneAnchor; exports.cloneSubpath = cloneSubpath; exports.cloneVectorNode = cloneVectorNode; exports.cloneVectorDocument = cloneVectorDocument; exports.hasPaint = hasPaint; exports.subpathSegmentCount = subpathSegmentCount; exports.subpathSegment = subpathSegment; exports.subpathsToBezier = subpathsToBezier; exports.vectorNodeToBezier = vectorNodeToBezier; exports.vectorPathData = vectorPathData; exports.inferAnchorType = inferAnchorType; exports.bezierToSubpaths = bezierToSubpaths; exports.walkVectorNodes = walkVectorNodes; exports.findVectorNode = findVectorNode; exports.locateVectorNode = locateVectorNode; exports.collectPaintedNodes = collectPaintedNodes; exports.collectPathNodes = collectPathNodes; exports.nodeMatrix = nodeMatrix; exports.vectorPathWorldBezier = vectorPathWorldBezier; exports.vectorNodeBounds = vectorNodeBounds; exports.unionBounds = unionBounds; exports.boundsIntersect = boundsIntersect; exports.boundsFromPoints = boundsFromPoints; exports.hitTestVectorNode = hitTestVectorNode; exports.vectorStrokeOutline = vectorStrokeOutline; exports.hitTestVectorNodes = hitTestVectorNodes; exports.nearestSegment = nearestSegment; exports.transformVectorNode = transformVectorNode; exports.vectorNodeRotation = vectorNodeRotation; exports.vectorWorldMatrix = vectorWorldMatrix; exports.vectorParentMatrix = vectorParentMatrix; exports.translateAnchor = translateAnchor; exports.moveAnchorHandle = moveAnchorHandle; exports.convertAnchor = convertAnchor; exports.insertAnchor = insertAnchor; exports.removeAnchors = removeAnchors; exports.reverseSubpath = reverseSubpath; exports.KAPPA = KAPPA2; exports.rectSubpath = rectSubpath; exports.ellipseSubpath = ellipseSubpath; exports.polygonSubpath = polygonSubpath; exports.starSubpath = starSubpath; exports.lineSubpath = lineSubpath; exports.roundSubpaths = roundSubpaths;
|
|
10338
|
-
|
|
10572
|
+
|
|
10573
|
+
|
|
10574
|
+
|
|
10575
|
+
|
|
10576
|
+
|
|
10577
|
+
|
|
10578
|
+
|
|
10579
|
+
|
|
10580
|
+
|
|
10581
|
+
|
|
10582
|
+
exports.isVectorMeshGradient = isVectorMeshGradient; exports.isVectorFreeformGradient = isVectorFreeformGradient; exports.isVectorShadedPaint = isVectorShadedPaint; exports.vectorRgbaToCss = vectorRgbaToCss; exports.VECTOR_MESH_MAX = VECTOR_MESH_MAX; exports.createVectorMeshGradient = createVectorMeshGradient; exports.vectorMeshPointAt = vectorMeshPointAt; exports.vectorMeshColorAt = vectorMeshColorAt; exports.vectorMeshLines = vectorMeshLines; exports.vectorFreeformSpreadScale = vectorFreeformSpreadScale; exports.vectorFreeformLineSegments = vectorFreeformLineSegments; exports.vectorFreeformField = vectorFreeformField; exports.sampleVectorFreeform = sampleVectorFreeform; exports.autoVectorFreeformGradient = autoVectorFreeformGradient; exports.vectorShadedSvgDefs = vectorShadedSvgDefs; exports.mapVectorShadedPaint = mapVectorShadedPaint; exports.transformVectorShadedPaint = transformVectorShadedPaint; exports.sanitizeVectorShadedPaint = sanitizeVectorShadedPaint; exports.removeVectorFreeformPoint = removeVectorFreeformPoint; exports.nearestVectorShadingPoint = nearestVectorShadingPoint; exports.VECTOR_CORNER_KINDS = VECTOR_CORNER_KINDS; exports.VECTOR_GRADIENT_TYPES = VECTOR_GRADIENT_TYPES; exports.VECTOR_GRADIENT_SPREADS = VECTOR_GRADIENT_SPREADS; exports.VECTOR_GRADIENT_INTERPOLATIONS = VECTOR_GRADIENT_INTERPOLATIONS; exports.VECTOR_STROKE_GRADIENT_MODES = VECTOR_STROKE_GRADIENT_MODES; exports.VECTOR_ARROWHEADS = VECTOR_ARROWHEADS; exports.VECTOR_BLEND_MODES = VECTOR_BLEND_MODES; exports.VECTOR_HORIZONTAL_RESIZING = VECTOR_HORIZONTAL_RESIZING; exports.VECTOR_VERTICAL_RESIZING = VECTOR_VERTICAL_RESIZING; exports.VECTOR_LENS_TYPES = VECTOR_LENS_TYPES; exports.VECTOR_CONNECTOR_SIDES = VECTOR_CONNECTOR_SIDES; exports.VECTOR_CONNECTOR_ROUTES = VECTOR_CONNECTOR_ROUTES; exports.VECTOR_BLEND_SPACINGS = VECTOR_BLEND_SPACINGS; exports.VECTOR_MASK_TYPES = VECTOR_MASK_TYPES; exports.VECTOR_SYMMETRY_MODES = VECTOR_SYMMETRY_MODES; exports.VECTOR_TEXT_ALIGNS = VECTOR_TEXT_ALIGNS; exports.VECTOR_PATH_TEXT_BASELINES = VECTOR_PATH_TEXT_BASELINES; exports.VECTOR_CONSTRAINT_KINDS = VECTOR_CONSTRAINT_KINDS; exports.VECTOR_TOOLS = VECTOR_TOOLS; exports.VECTOR_TRANSFORM_HANDLES = VECTOR_TRANSFORM_HANDLES; exports.VECTOR_PATHFINDER_OPERATIONS = VECTOR_PATHFINDER_OPERATIONS; exports.VECTOR_EFFECT_TYPES = VECTOR_EFFECT_TYPES; exports.VECTOR_MERGE_MODES = VECTOR_MERGE_MODES; exports.VECTOR_FILTER_TYPES = VECTOR_FILTER_TYPES; exports.isVectorGradient = isVectorGradient; exports.parseVectorColor = parseVectorColor; exports.VECTOR_GRADIENT_MIN_STOPS = VECTOR_GRADIENT_MIN_STOPS; exports.gradientMidpointRemap = gradientMidpointRemap; exports.sortedVectorGradientStops = sortedVectorGradientStops; exports.vectorGradientNeedsExpansion = vectorGradientNeedsExpansion; exports.vectorGradientRamp = vectorGradientRamp; exports.sampleVectorGradient = sampleVectorGradient; exports.expandVectorGradientStops = expandVectorGradientStops; exports.samplePlainStops = samplePlainStops; exports.reverseVectorGradient = reverseVectorGradient; exports.insertVectorGradientStop = insertVectorGradientStop; exports.moveVectorGradientStop = moveVectorGradientStop; exports.removeVectorGradientStop = removeVectorGradientStop; exports.vectorGradientMidpointPosition = vectorGradientMidpointPosition; exports.vectorGradientMidpointFromPosition = vectorGradientMidpointFromPosition; exports.spanVectorGradientStops = spanVectorGradientStops; exports.hasExplicitGradientGeometry = hasExplicitGradientGeometry; exports.vectorGradientPoints = vectorGradientPoints; exports.vectorBoxMatrix = vectorBoxMatrix; exports.vectorGradientUnitsMatrix = vectorGradientUnitsMatrix; exports.vectorGradientMatrix = vectorGradientMatrix; exports.vectorGradientFocalParam = vectorGradientFocalParam; exports.vectorGradientParam = vectorGradientParam; exports.applyVectorGradientSpread = applyVectorGradientSpread; exports.vectorGradientTAt = vectorGradientTAt; exports.sampleVectorGradientAt = sampleVectorGradientAt; exports.vectorGradientAspect = vectorGradientAspect; exports.explicitVectorGradient = explicitVectorGradient; exports.pinVectorGradient = pinVectorGradient; exports.transformVectorGradient = transformVectorGradient; exports.mapVectorGradient = mapVectorGradient; exports.mapVectorPaint = mapVectorPaint; exports.transformVectorPaint = transformVectorPaint; exports.isCentredVectorGradient = isCentredVectorGradient; exports.vectorGradientHandles = vectorGradientHandles; exports.moveVectorGradientHandle = moveVectorGradientHandle; exports.setVectorGradientVector = setVectorGradientVector; exports.VECTOR_GRADIENT_MAX_PERIODS = VECTOR_GRADIENT_MAX_PERIODS; exports.periodicVectorGradientStops = periodicVectorGradientStops; exports.expandVectorGradientSpread = expandVectorGradientSpread; exports.vectorGradientArea = vectorGradientArea; exports.patternAttrs = patternAttrs; exports.vectorGradientSvgDefs = vectorGradientSvgDefs; exports.sampleVectorPaintDefAt = sampleVectorPaintDefAt; exports.sanitizeVectorGradient = sanitizeVectorGradient; exports.convertVectorGradient = convertVectorGradient; exports.defaultVectorGradient = defaultVectorGradient; exports.applyVectorGradientPatch = applyVectorGradientPatch; exports.IDENTITY_MATRIX = IDENTITY_MATRIX; exports.multiplyMatrices = multiplyMatrices; exports.translateMatrix = translateMatrix; exports.scaleMatrix = scaleMatrix; exports.rotateMatrix = rotateMatrix; exports.matrixAbout = matrixAbout; exports.skewMatrix = skewMatrix; exports.applyMatrix = applyMatrix; exports.isIdentityMatrix = isIdentityMatrix; exports.invertMatrix = invertMatrix; exports.applyMatrixLinear = applyMatrixLinear; exports.matrixRotation = matrixRotation; exports.decomposeRigid = decomposeRigid; exports.isVectorSymmetryGroup = isVectorSymmetryGroup; exports.vectorSymmetryMatrices = vectorSymmetryMatrices; exports.vectorSymmetryDrawn = vectorSymmetryDrawn; exports.vectorSymmetryAxes = vectorSymmetryAxes; exports.sanitizeVectorSymmetry = sanitizeVectorSymmetry; exports.VECTOR_SYMMETRY_MODE_LABELS = VECTOR_SYMMETRY_MODE_LABELS; exports.transformVectorSymmetry = transformVectorSymmetry; exports.vectorCornerAt = vectorCornerAt; exports.vectorCorners = vectorCorners; exports.cornerSetback = cornerSetback; exports.fitCornerRadius = fitCornerRadius; exports.cornerBisectorPoint = cornerBisectorPoint; exports.cornerRadiusChange = cornerRadiusChange; exports.hasVectorCorners = hasVectorCorners; exports.expandVectorCornersOf = expandVectorCornersOf; exports.expandVectorCorners = expandVectorCorners; exports.setAnchorCorner = setAnchorCorner; exports.nextVectorCornerKind = nextVectorCornerKind; exports.setSubpathCorners = setSubpathCorners; exports.VECTOR_WIDTH_PROFILE_MAX_POINTS = VECTOR_WIDTH_PROFILE_MAX_POINTS; exports.VECTOR_WIDTH_PROFILE_MAX_SCALE = VECTOR_WIDTH_PROFILE_MAX_SCALE; exports.VECTOR_WIDTH_SAME_T = VECTOR_WIDTH_SAME_T; exports.VECTOR_WIDTH_PRESETS = VECTOR_WIDTH_PRESETS; exports.VECTOR_WIDTH_PRESET_IDS = VECTOR_WIDTH_PRESET_IDS; exports.sanitizeWidthProfile = sanitizeWidthProfile; exports.isUniformWidthProfile = isUniformWidthProfile; exports.widthProfileAt = widthProfileAt; exports.widthProfileMaxScale = widthProfileMaxScale; exports.widthProfilePreset = widthProfilePreset; exports.widthProfilePresetId = widthProfilePresetId; exports.reverseWidthProfile = reverseWidthProfile; exports.mirrorWidthProfile = mirrorWidthProfile; exports.insertWidthPoint = insertWidthPoint; exports.setWidthPoint = setWidthPoint; exports.removeWidthPoints = removeWidthPoints; exports.taperWaveFactor = taperWaveFactor; exports.generateWidthProfile = generateWidthProfile; exports.VECTOR_PRESSURE_NOMINAL = VECTOR_PRESSURE_NOMINAL; exports.pressureWidthProfile = pressureWidthProfile; exports.dashIntervals = dashIntervals; exports.variableStrokeRings = variableStrokeRings; exports.variableStrokeOutline = variableStrokeOutline; exports.nearestStrokePosition = nearestStrokePosition; exports.strokePositionPoint = strokePositionPoint; exports.isClosedBezierShape = isClosedBezierShape; exports.effectiveStrokeAlign = effectiveStrokeAlign; exports.strokeWidthProfileOf = strokeWidthProfileOf; exports.hasStrokeExtras = hasStrokeExtras; exports.vectorStrokeLineArea = vectorStrokeLineArea; exports.arrowheadWeight = arrowheadWeight; exports.arrowheadInset = arrowheadInset; exports.arrowheadPath = arrowheadPath; exports.vectorStrokeParts = vectorStrokeParts; exports.vectorStrokeOutlinePath = vectorStrokeOutlinePath; exports.hitTestVectorStroke = hitTestVectorStroke; exports.vectorStrokeReach = vectorStrokeReach; exports.VECTOR_STROKE_SETTING_KEYS = VECTOR_STROKE_SETTING_KEYS; exports.VECTOR_BLEND_MODE_LABELS = VECTOR_BLEND_MODE_LABELS; exports.isVectorBlendMode = isVectorBlendMode; exports.vectorBlendModeCss = vectorBlendModeCss; exports.vectorBlendModeFromCss = vectorBlendModeFromCss; exports.isPlainVectorPaintLayer = isPlainVectorPaintLayer; exports.isDrawnVectorPaintLayer = isDrawnVectorPaintLayer; exports.vectorFills = vectorFills; exports.vectorStrokeSettings = vectorStrokeSettings; exports.vectorStrokes = vectorStrokes; exports.hasVectorPaintStacks = hasVectorPaintStacks; exports.withVectorFills = withVectorFills; exports.withVectorStrokes = withVectorStrokes; exports.normalizeVectorPaintStacks = normalizeVectorPaintStacks; exports.sanitizeVectorFills = sanitizeVectorFills; exports.sanitizeVectorStrokeSettings = sanitizeVectorStrokeSettings; exports.sanitizeVectorStrokes = sanitizeVectorStrokes; exports.vectorPaintLayerNodes = vectorPaintLayerNodes; exports.needsVectorPaintLayers = needsVectorPaintLayers; exports.vectorStrokeStackReach = vectorStrokeStackReach; exports.hitTestVectorPaintLayer = hitTestVectorPaintLayer; exports.hitTestVectorPaintStack = hitTestVectorPaintStack; exports.vectorStacksHaveGradient = vectorStacksHaveGradient; exports.newVectorStrokeLayer = newVectorStrokeLayer; exports.vectorTargetPaint = vectorTargetPaint; exports.withVectorTargetPaint = withVectorTargetPaint; exports.effectPathLength = effectPathLength; exports.effectPathVertexCount = effectPathVertexCount; exports.trimIntervals = trimIntervals; exports.trimPaths = trimPaths; exports.trimPathsIndividually = trimPathsIndividually; exports.puckerBloatPaths = puckerBloatPaths; exports.roundCornerPaths = roundCornerPaths; exports.offsetPaths = offsetPaths; exports.sweepPath = sweepPath; exports.twistPaths = twistPaths; exports.zigzagPaths = zigzagPaths; exports.wigglePaths = wigglePaths; exports.mergePaths = mergePaths; exports.vectorRepeaterCopies = vectorRepeaterCopies; exports.repeatPaths = repeatPaths; exports.pathsCenter = pathsCenter; exports.mapVectorPoints = mapVectorPoints; exports.mapVectorSubpaths = mapVectorSubpaths; exports.mapBezierPath = mapBezierPath; exports.isVectorFrame = isVectorFrame; exports.vectorFrameRectPath = vectorFrameRectPath; exports.vectorFrameDrawn = vectorFrameDrawn; exports.vectorFrameContains = vectorFrameContains; exports.vectorFrameChildMatrix = vectorFrameChildMatrix; exports.sanitizeVectorFrame = sanitizeVectorFrame; exports.sanitizeVectorResizing = sanitizeVectorResizing; exports.VECTOR_HORIZONTAL_RESIZING_LABELS = VECTOR_HORIZONTAL_RESIZING_LABELS; exports.VECTOR_VERTICAL_RESIZING_LABELS = VECTOR_VERTICAL_RESIZING_LABELS; exports.vectorBoundsInside = vectorBoundsInside; exports.vectorArtboards = vectorArtboards; exports.vectorFrameDocument = vectorFrameDocument; exports.getVectorFramePanel = getVectorFramePanel; exports.splitIntoFaces = splitIntoFaces; exports.knifePath = knifePath; exports.eraserRegion = eraserRegion; exports.eraseFromFill = eraseFromFill; exports.eraseFromOutline = eraseFromOutline; exports.polylineBounds = polylineBounds; exports.simplifyPolyline = simplifyPolyline; exports.VECTOR_FILTER_DEFAULTS = VECTOR_FILTER_DEFAULTS; exports.VECTOR_FILTER_LABELS = VECTOR_FILTER_LABELS; exports.VECTOR_FILTER_PARAM_SPECS = VECTOR_FILTER_PARAM_SPECS; exports.isVectorFilterType = isVectorFilterType; exports.normalizeVectorFilterParams = normalizeVectorFilterParams; exports.vectorFilterParamKeys = vectorFilterParamKeys; exports.createVectorFilter = createVectorFilter; exports.sanitizeVectorFilters = sanitizeVectorFilters; exports.activeVectorFilters = activeVectorFilters; exports.vectorFilterReach = vectorFilterReach; exports.vectorFilterSvg = vectorFilterSvg; exports.vectorFilterMarkup = vectorFilterMarkup; exports.VECTOR_FILTER_MENU = VECTOR_FILTER_MENU; exports.isVectorMaskType = isVectorMaskType; exports.sanitizeVectorMask = sanitizeVectorMask; exports.isVectorMaskGroup = isVectorMaskGroup; exports.isVectorMaskActive = isVectorMaskActive; exports.vectorMaskSource = vectorMaskSource; exports.vectorMaskContents = vectorMaskContents; exports.vectorMaskOwner = vectorMaskOwner; exports.vectorMaskSummary = vectorMaskSummary; exports.vectorMaskRegionShapes = vectorMaskRegionShapes; exports.vectorMaskRegion = vectorMaskRegion; exports.vectorMaskRegionPath = vectorMaskRegionPath; exports.vectorMaskContains = vectorMaskContains; exports.vectorMaskedShapes = vectorMaskedShapes; exports.vectorMaskedGeometry = vectorMaskedGeometry; exports.vectorMaskedLocalBounds = vectorMaskedLocalBounds; exports.vectorMaskContentBounds = vectorMaskContentBounds; exports.vectorMaskRenderData = vectorMaskRenderData; exports.DEFAULT_TEXT_STYLE = DEFAULT_TEXT_STYLE; exports.DEFAULT_AUTO_LEADING = DEFAULT_AUTO_LEADING; exports.fitRuns = fitRuns; exports.styleAt = styleAt; exports.restyleRange = restyleRange; exports.spliceRuns = spliceRuns; exports.paragraphRanges = paragraphRanges; exports.fitParagraphRuns = fitParagraphRuns; exports.fontOf = fontOf; exports.isTextSpace = isTextSpace; exports.layoutText = layoutText; exports.textIndexAt = textIndexAt; exports.caretAt = caretAt; exports.textDecorations = textDecorations; exports.textRectPath = textRectPath; exports.textFragmentOutline = textFragmentOutline; exports.cssFontFamily = cssFontFamily; exports.cssFont = cssFont; exports.createCanvasTextShaper = createCanvasTextShaper; exports.createOutlineTextShaper = createOutlineTextShaper; exports.createMetricTextShaper = createMetricTextShaper; exports.setVectorTextShaper = setVectorTextShaper; exports.getVectorTextShaper = getVectorTextShaper; exports.vectorTextShaperGeneration = vectorTextShaperGeneration; exports.vectorTextHasOutlines = vectorTextHasOutlines; exports.vectorTextFamilies = vectorTextFamilies; exports.DEFAULT_VECTOR_FONT = DEFAULT_VECTOR_FONT; exports.VECTOR_CHARACTER_STYLE_KEYS = VECTOR_CHARACTER_STYLE_KEYS; exports.VECTOR_PARAGRAPH_STYLE_KEYS = VECTOR_PARAGRAPH_STYLE_KEYS; exports.VectorTextError = VectorTextError; exports.fitVectorTextRuns = fitVectorTextRuns; exports.vectorTextRuns = vectorTextRuns; exports.vectorTextStyleAt = vectorTextStyleAt; exports.measureVectorPath = measureVectorPath; exports.vectorPathAt = vectorPathAt; exports.vectorPathTextPositions = vectorPathTextPositions; exports.layoutVectorText = layoutVectorText; exports.glyphBox = glyphBox; exports.vectorTextPaths = vectorTextPaths; exports.vectorTextPaintSource = vectorTextPaintSource; exports.vectorTextCaret = vectorTextCaret; exports.vectorTextIndexAt = vectorTextIndexAt; exports.vectorTextSelectionQuads = vectorTextSelectionQuads; exports.patchVectorCharacterStyle = patchVectorCharacterStyle; exports.patchVectorParagraphStyle = patchVectorParagraphStyle; exports.sanitizeVectorTextFrame = sanitizeVectorTextFrame; exports.normalizeVectorTextRuns = normalizeVectorTextRuns; exports.sanitizeVectorTextFields = sanitizeVectorTextFields; exports.vectorTextRange = vectorTextRange; exports.replaceVectorText = replaceVectorText; exports.styleVectorText = styleVectorText; exports.bakeVectorTextGeometry = bakeVectorTextGeometry; exports.vectorTextName = vectorTextName; exports.pathTextFrameFromBezier = pathTextFrameFromBezier; exports.vectorTextBoxOutline = vectorTextBoxOutline; exports.vectorTextSpans = vectorTextSpans; exports.vectorTextGeometryNode = vectorTextGeometryNode; exports.vectorTextSpanSvg = vectorTextSpanSvg; exports.VECTOR_SYMBOL_MAX_DEPTH = VECTOR_SYMBOL_MAX_DEPTH; exports.vectorSymbolsUsedIn = vectorSymbolsUsedIn; exports.vectorSymbolUses = vectorSymbolUses; exports.resolveVectorSymbols = resolveVectorSymbols; exports.stripVectorSymbolArt = stripVectorSymbolArt; exports.scaleVectorStrokeWidths = scaleVectorStrokeWidths; exports.tintVectorNode = tintVectorNode; exports.prefixVectorIds = prefixVectorIds; exports.vectorInstanceGroup = vectorInstanceGroup; exports.composeVectorMatrices = composeVectorMatrices; exports.vectorPaintSolid = vectorPaintSolid; exports.shadeVectorColor = shadeVectorColor; exports.vectorPathRings = vectorPathRings; exports.vectorExtrudeFaces = vectorExtrudeFaces; exports.vectorBevelFaces = vectorBevelFaces; exports.isVectorLens = isVectorLens; exports.VECTOR_LENS_LABELS = VECTOR_LENS_LABELS; exports.VECTOR_LENS_SPECS = VECTOR_LENS_SPECS; exports.sanitizeVectorLens = sanitizeVectorLens; exports.vectorLensColorMap = vectorLensColorMap; exports.mapVectorPaintColors = mapVectorPaintColors; exports.vectorLensDrawn = vectorLensDrawn; exports.resolveVectorLenses = resolveVectorLenses; exports.stripVectorLensViews = stripVectorLensViews; exports.WARP_STYLES = WARP_STYLES; exports.WARP_STYLE_LABELS = WARP_STYLE_LABELS; exports.warpPresetGrid = warpPresetGrid; exports.warpPresetMesh = warpPresetMesh; exports.warpMeshColumns = warpMeshColumns; exports.warpMeshRows = warpMeshRows; exports.isValidWarpMesh = isValidWarpMesh; exports.fitWarpMesh = fitWarpMesh; exports.identityWarpMesh = identityWarpMesh; exports.evalWarpMesh = evalWarpMesh; exports.splitWarpMeshU = splitWarpMeshU; exports.splitWarpMeshV = splitWarpMeshV; exports.removeWarpMeshSplitU = removeWarpMeshSplitU; exports.removeWarpMeshSplitV = removeWarpMeshSplitV; exports.mapWarpMeshPoints = mapWarpMeshPoints; exports.resizeWarpMesh = resizeWarpMesh; exports.warpMeshControlBounds = warpMeshControlBounds; exports.warpMeshParamAt = warpMeshParamAt; exports.dragWarpMeshPoint = dragWarpMeshPoint; exports.pullWarpMesh = pullWarpMesh; exports.warpMeshEditPoints = warpMeshEditPoints; exports.warpMeshGridCurves = warpMeshGridCurves; exports.vectorMeshFromOutline = vectorMeshFromOutline; exports.vectorMeshOutline = vectorMeshOutline; exports.VECTOR_EFFECT_DEFAULTS = VECTOR_EFFECT_DEFAULTS; exports.VECTOR_EFFECT_LABELS = VECTOR_EFFECT_LABELS; exports.VECTOR_EFFECT_PARAM_SPECS = VECTOR_EFFECT_PARAM_SPECS; exports.vectorEnvelopeMesh = vectorEnvelopeMesh; exports.vectorEnvelopeMap = vectorEnvelopeMap; exports.normalizeVectorEffectParams = normalizeVectorEffectParams; exports.createVectorEffect = createVectorEffect; exports.activeVectorEffects = activeVectorEffects; exports.hasOwnVectorAppearance = hasOwnVectorAppearance; exports.hasVectorAppearance = hasVectorAppearance; exports.isVectorLiveBoolean = isVectorLiveBoolean; exports.vectorOperandOperation = vectorOperandOperation; exports.vectorLiveBooleanSteps = vectorLiveBooleanSteps; exports.clearVectorLiveBooleanCache = clearVectorLiveBooleanCache; exports.foldVectorBooleanOperands = foldVectorBooleanOperands; exports.applyVectorEffects = applyVectorEffects; exports.vectorInstanceDrawn = vectorInstanceDrawn; exports.vectorChildAppearanceShapes = vectorChildAppearanceShapes; exports.vectorEffectInputPaths = vectorEffectInputPaths; exports.vectorEffectInputBounds = vectorEffectInputBounds; exports.vectorNodeEnvelope = vectorNodeEnvelope; exports.vectorEnvelopeFrame = vectorEnvelopeFrame; exports.vectorAppearanceShapes = vectorAppearanceShapes; exports.vectorAppearanceOutline = vectorAppearanceOutline; exports.vectorAppearanceNodes = vectorAppearanceNodes; exports.expandVectorAppearance = expandVectorAppearance; exports.expandVectorAppearances = expandVectorAppearances; exports.sanitizeVectorEffects = sanitizeVectorEffects; exports.transformVectorEffects = transformVectorEffects; exports.vectorEnteredGroups = vectorEnteredGroups; exports.isVectorConnector = isVectorConnector; exports.vectorConnectionSites = vectorConnectionSites; exports.nearestVectorConnectionSite = nearestVectorConnectionSite; exports.vectorConnectorWorldAnchors = vectorConnectorWorldAnchors; exports.routeVectorConnector = routeVectorConnector; exports.rerouteVectorConnectors = rerouteVectorConnectors; exports.sanitizeVectorConnector = sanitizeVectorConnector; exports.VECTOR_CONNECTOR_ROUTE_LABELS = VECTOR_CONNECTOR_ROUTE_LABELS; exports.VECTOR_CONNECTOR_SIDE_LABELS = VECTOR_CONNECTOR_SIDE_LABELS; exports.getVectorConnectorPanel = getVectorConnectorPanel; exports.vectorConnectorTargetAt = vectorConnectorTargetAt; exports.vectorStrokeGradientDefs = vectorStrokeGradientDefs; exports.vectorCornersAttribute = vectorCornersAttribute; exports.applyVectorCornersAttribute = applyVectorCornersAttribute; exports.vectorPathLocalBounds = vectorPathLocalBounds; exports.vectorPaintToSvg = vectorPaintToSvg; exports.vectorStrokeSvgParts = vectorStrokeSvgParts; exports.vectorNodeLocalPaintBounds = vectorNodeLocalPaintBounds; exports.vectorNodeFilterSvg = vectorNodeFilterSvg; exports.widthProfileToAttribute = widthProfileToAttribute; exports.widthProfileFromAttribute = widthProfileFromAttribute; exports.vectorDocumentToSvg = vectorDocumentToSvg; exports.parseSvgTransform = parseSvgTransform; exports.parseVectorSvg = parseVectorSvg; exports.VECTOR_SPATIAL_MIN = VECTOR_SPATIAL_MIN; exports.VectorRTree = VectorRTree; exports.vectorNodePaintBox = vectorNodePaintBox; exports.vectorSpatialIndex = vectorSpatialIndex; exports.vectorNodesNear = vectorNodesNear; exports.cloneAnchor = cloneAnchor; exports.cloneSubpath = cloneSubpath; exports.cloneVectorNode = cloneVectorNode; exports.cloneVectorDocument = cloneVectorDocument; exports.hasPaint = hasPaint; exports.subpathSegmentCount = subpathSegmentCount; exports.subpathSegment = subpathSegment; exports.subpathsToBezier = subpathsToBezier; exports.vectorNodeToBezier = vectorNodeToBezier; exports.vectorPathData = vectorPathData; exports.inferAnchorType = inferAnchorType; exports.bezierToSubpaths = bezierToSubpaths; exports.walkVectorNodes = walkVectorNodes; exports.findVectorNode = findVectorNode; exports.locateVectorNode = locateVectorNode; exports.collectPaintedNodes = collectPaintedNodes; exports.collectPathNodes = collectPathNodes; exports.nodeMatrix = nodeMatrix; exports.vectorPathWorldBezier = vectorPathWorldBezier; exports.vectorNodeBounds = vectorNodeBounds; exports.unionBounds = unionBounds; exports.boundsIntersect = boundsIntersect; exports.boundsFromPoints = boundsFromPoints; exports.hitTestVectorNode = hitTestVectorNode; exports.vectorStrokeOutline = vectorStrokeOutline; exports.hitTestVectorNodes = hitTestVectorNodes; exports.nearestSegment = nearestSegment; exports.transformVectorNode = transformVectorNode; exports.vectorNodeRotation = vectorNodeRotation; exports.vectorWorldMatrix = vectorWorldMatrix; exports.vectorParentMatrix = vectorParentMatrix; exports.translateAnchor = translateAnchor; exports.moveAnchorHandle = moveAnchorHandle; exports.convertAnchor = convertAnchor; exports.insertAnchor = insertAnchor; exports.removeAnchors = removeAnchors; exports.reverseSubpath = reverseSubpath; exports.KAPPA = KAPPA2; exports.rectSubpath = rectSubpath; exports.ellipseSubpath = ellipseSubpath; exports.polygonSubpath = polygonSubpath; exports.starSubpath = starSubpath; exports.lineSubpath = lineSubpath; exports.roundSubpaths = roundSubpaths;
|
|
10583
|
+
//# sourceMappingURL=chunk-YYJKIESX.cjs.map
|