@pixerate/editor 0.130.0 → 0.133.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-BAGdL89w.d.ts} +1 -1
- package/dist/{bezier-CdoGygwG.d.cts → bezier-DL2wPsFf.d.cts} +1 -1
- package/dist/canvas/index.d.cts +7 -7
- package/dist/canvas/index.d.ts +7 -7
- package/dist/{chunk-MZXQTKUM.cjs → chunk-24ATT2PE.cjs} +10 -6
- package/dist/chunk-24ATT2PE.cjs.map +1 -0
- package/dist/{chunk-AHUYMDYW.js → chunk-2HC4DRF4.js} +10 -6
- package/dist/chunk-2HC4DRF4.js.map +1 -0
- package/dist/{chunk-2PXRKMOH.cjs → chunk-2QKUD3E2.cjs} +36 -36
- package/dist/{chunk-2PXRKMOH.cjs.map → chunk-2QKUD3E2.cjs.map} +1 -1
- package/dist/{chunk-PMHPXCJC.cjs → chunk-65GNHOD4.cjs} +268 -199
- package/dist/chunk-65GNHOD4.cjs.map +1 -0
- package/dist/{chunk-YRZ6NVE3.js → chunk-6CTZAGZ2.js} +235 -4
- package/dist/chunk-6CTZAGZ2.js.map +1 -0
- package/dist/{chunk-ERYGCA72.js → chunk-AOCFL7L7.js} +88 -19
- package/dist/chunk-AOCFL7L7.js.map +1 -0
- package/dist/{chunk-LXGOYRPE.cjs → chunk-F7GGEAO2.cjs} +322 -75
- package/dist/chunk-F7GGEAO2.cjs.map +1 -0
- package/dist/{chunk-PRYMC442.js → chunk-FOBB6AIO.js} +257 -10
- package/dist/chunk-FOBB6AIO.js.map +1 -0
- package/dist/{chunk-W6M7C7R3.cjs → chunk-NVTHUPJ6.cjs} +236 -5
- package/dist/chunk-NVTHUPJ6.cjs.map +1 -0
- package/dist/{chunk-L5OTIYOO.js → chunk-VGZSIXX3.js} +2 -2
- package/dist/effects/index.d.cts +4 -4
- package/dist/effects/index.d.ts +4 -4
- package/dist/{export-CejjC2iI.d.cts → export-BICOEM9d.d.cts} +33 -11
- package/dist/{export-5WDKJqTy.d.cts → export-CeFplzAW.d.cts} +1 -1
- package/dist/{export-B4r8b9Ft.d.ts → export-XnuX8FZ2.d.ts} +33 -11
- package/dist/{export-CU_ARP3A.d.ts → export-zB4HITwP.d.ts} +1 -1
- package/dist/{helpers-CzZu51eI.d.cts → helpers-BuKdqUlM.d.cts} +56 -1
- package/dist/{helpers-X_rycLNJ.d.ts → helpers-cssRNUzH.d.ts} +56 -1
- package/dist/image-editor/index.cjs +1064 -903
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +32 -13
- package/dist/image-editor/index.d.ts +32 -13
- package/dist/image-editor/index.js +180 -19
- 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-C3iyIFRx.d.cts} +1 -1
- package/dist/{opentype-CrHAsKh3.d.ts → opentype-DG5Lkwul.d.ts} +1 -1
- package/dist/paint/index.cjs +8 -2
- package/dist/paint/index.cjs.map +1 -1
- package/dist/paint/index.d.cts +14 -3
- package/dist/paint/index.d.ts +14 -3
- package/dist/paint/index.js +7 -1
- package/dist/paint-editor/index.cjs +78 -78
- package/dist/paint-editor/index.d.cts +7 -7
- package/dist/paint-editor/index.d.ts +7 -7
- package/dist/paint-editor/index.js +3 -3
- package/dist/{pathfinder-CKfKOVP4.d.cts → pathfinder-8vXik95z.d.cts} +1 -1
- package/dist/{pathfinder-Dlss70hL.d.ts → pathfinder-DKLt4UDG.d.ts} +1 -1
- package/dist/{pool-DDOo0xJH.d.ts → pool-C69pkWRz.d.ts} +1 -1
- package/dist/{pool-DKic69LD.d.cts → pool-VAWcYUbs.d.cts} +1 -1
- package/dist/{rand-pQQ2sJTk.d.ts → rand-BaqEOs1Y.d.ts} +17 -4
- package/dist/{rand-DTXAssW1.d.cts → rand-DdpFzCo6.d.cts} +17 -4
- package/dist/raster/index.cjs +2 -2
- package/dist/raster/index.d.cts +4 -4
- package/dist/raster/index.d.ts +4 -4
- package/dist/raster/index.js +1 -1
- package/dist/{svg-BRaii3pI.d.cts → svg-BThlZmja.d.cts} +2 -2
- package/dist/{svg-BYVZeVo0.d.ts → svg-CEYpvsgH.d.ts} +2 -2
- package/dist/{tools-CtheDLDr.d.cts → tools-CRnZJXXr.d.cts} +1 -1
- package/dist/{tools-D8bZ-7YG.d.ts → tools-CVGqEpO8.d.ts} +1 -1
- package/dist/vector/index.cjs +1493 -1032
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.d.cts +155 -12
- package/dist/vector/index.d.ts +155 -12
- package/dist/vector/index.js +469 -8
- 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-BFoYxy_s.d.cts → warp-ChcFDdlT.d.cts} +1 -1
- package/dist/{warp-CZVC8pB5.d.ts → warp-mKylbLiF.d.ts} +1 -1
- package/package.json +2 -2
- package/skills/pixerate-image-editor/SKILL.md +7 -3
- 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 +12 -3
- package/skills/pixerate-vector/SKILL.md +17 -0
- package/skills/pixerate-vector/references/commands.md +19 -0
- package/dist/chunk-AHUYMDYW.js.map +0 -1
- package/dist/chunk-ERYGCA72.js.map +0 -1
- package/dist/chunk-LXGOYRPE.cjs.map +0 -1
- package/dist/chunk-MZXQTKUM.cjs.map +0 -1
- package/dist/chunk-PMHPXCJC.cjs.map +0 -1
- package/dist/chunk-PRYMC442.js.map +0 -1
- package/dist/chunk-W6M7C7R3.cjs.map +0 -1
- package/dist/chunk-YRZ6NVE3.js.map +0 -1
- /package/dist/{chunk-L5OTIYOO.js.map → chunk-VGZSIXX3.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"];
|
|
@@ -81,6 +82,7 @@ var VECTOR_MASK_TYPES = ["clip", "alpha", "luminance"];
|
|
|
81
82
|
var VECTOR_SYMMETRY_MODES = ["vertical", "horizontal", "dual", "diagonal", "radial"];
|
|
82
83
|
var VECTOR_TEXT_ALIGNS = ["left", "center", "right", "justify"];
|
|
83
84
|
var VECTOR_PATH_TEXT_BASELINES = ["baseline", "ascender", "descender", "center"];
|
|
85
|
+
var VECTOR_PERSPECTIVE_PLANES = ["floor", "left", "right", "side", "front"];
|
|
84
86
|
var VECTOR_CONSTRAINT_KINDS = [
|
|
85
87
|
"coincident",
|
|
86
88
|
"collinear",
|
|
@@ -5772,6 +5774,237 @@ function vectorBevelFaces(path, params, fillRule = "nonzero") {
|
|
|
5772
5774
|
return faces;
|
|
5773
5775
|
}
|
|
5774
5776
|
|
|
5777
|
+
// src/vector/lens.ts
|
|
5778
|
+
function isVectorLens(node) {
|
|
5779
|
+
return !!node && node.type === "path" && !!node.lens && VECTOR_LENS_TYPES.includes(node.lens.type);
|
|
5780
|
+
}
|
|
5781
|
+
var VECTOR_LENS_LABELS = {
|
|
5782
|
+
transparency: "Transparency",
|
|
5783
|
+
magnify: "Magnify",
|
|
5784
|
+
fisheye: "Fish Eye",
|
|
5785
|
+
brighten: "Brighten",
|
|
5786
|
+
invert: "Invert",
|
|
5787
|
+
tintedGrayscale: "Tinted Grayscale",
|
|
5788
|
+
colorAdd: "Color Add",
|
|
5789
|
+
colorLimit: "Color Limit",
|
|
5790
|
+
heatMap: "Heat Map",
|
|
5791
|
+
wireframe: "Wireframe"
|
|
5792
|
+
};
|
|
5793
|
+
var VECTOR_LENS_SPECS = {
|
|
5794
|
+
transparency: { min: 0, max: 100, amount: 50, color: null, unit: "percent see-through" },
|
|
5795
|
+
magnify: { min: 1, max: 20, amount: 2, color: null, unit: "times" },
|
|
5796
|
+
fisheye: { min: -100, max: 100, amount: 50, color: null, unit: "percent, negative pinches" },
|
|
5797
|
+
brighten: { min: -100, max: 100, amount: 40, color: null, unit: "percent, negative darkens" },
|
|
5798
|
+
invert: { min: 0, max: 100, amount: 100, color: null, unit: "percent strength" },
|
|
5799
|
+
tintedGrayscale: { min: 0, max: 100, amount: 100, color: "#b45309", unit: "percent strength" },
|
|
5800
|
+
colorAdd: { min: 0, max: 100, amount: 50, color: "#ff0000", unit: "percent of the colour added" },
|
|
5801
|
+
colorLimit: { min: 0, max: 100, amount: 100, color: "#22c55e", unit: "percent strength" },
|
|
5802
|
+
heatMap: { min: 0, max: 100, amount: 0, color: null, unit: "percent the palette is turned" },
|
|
5803
|
+
wireframe: { min: 0, max: 100, amount: 100, color: "#0f172a", unit: "percent outline opacity" }
|
|
5804
|
+
};
|
|
5805
|
+
function sanitizeVectorLens(value) {
|
|
5806
|
+
if (!value || typeof value !== "object") return null;
|
|
5807
|
+
const r = value;
|
|
5808
|
+
if (typeof r.type !== "string" || !VECTOR_LENS_TYPES.includes(r.type)) return null;
|
|
5809
|
+
const type = r.type;
|
|
5810
|
+
const spec = VECTOR_LENS_SPECS[type];
|
|
5811
|
+
const amount = typeof r.amount === "number" && Number.isFinite(r.amount) ? Math.min(spec.max, Math.max(spec.min, r.amount)) : spec.amount;
|
|
5812
|
+
const out = { type, amount };
|
|
5813
|
+
if (spec.color !== null) out.color = typeof r.color === "string" && parseVectorColor(r.color) ? r.color : spec.color;
|
|
5814
|
+
return out;
|
|
5815
|
+
}
|
|
5816
|
+
var hex22 = (v2) => Math.round(Math.min(1, Math.max(0, v2)) * 255).toString(16).padStart(2, "0");
|
|
5817
|
+
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})`;
|
|
5818
|
+
var luma = (c) => 0.2126 * c[0] + 0.7152 * c[1] + 0.0722 * c[2];
|
|
5819
|
+
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]];
|
|
5820
|
+
var HEAT = [
|
|
5821
|
+
[0, "#1e1b4b"],
|
|
5822
|
+
[0.25, "#2563eb"],
|
|
5823
|
+
[0.5, "#22c55e"],
|
|
5824
|
+
[0.7, "#facc15"],
|
|
5825
|
+
[0.85, "#f97316"],
|
|
5826
|
+
[1, "#dc2626"]
|
|
5827
|
+
];
|
|
5828
|
+
var heatAt = (t) => {
|
|
5829
|
+
const u = (t % 1 + 1) % 1;
|
|
5830
|
+
for (let i = 1; i < HEAT.length; i++) {
|
|
5831
|
+
if (u <= HEAT[i][0]) {
|
|
5832
|
+
const a = parseVectorColor(HEAT[i - 1][1]);
|
|
5833
|
+
const b = parseVectorColor(HEAT[i][1]);
|
|
5834
|
+
const k = (u - HEAT[i - 1][0]) / (HEAT[i][0] - HEAT[i - 1][0]);
|
|
5835
|
+
return [0, 1, 2].map((c) => a[c] + (b[c] - a[c]) * k);
|
|
5836
|
+
}
|
|
5837
|
+
}
|
|
5838
|
+
return parseVectorColor(HEAT[HEAT.length - 1][1]).slice(0, 3);
|
|
5839
|
+
};
|
|
5840
|
+
function vectorLensColorMap(lens) {
|
|
5841
|
+
const tint = _nullishCoalesce(parseVectorColor(_nullishCoalesce(lens.color, () => ( "#000000"))), () => ( [0, 0, 0, 1]));
|
|
5842
|
+
const s = Math.min(1, Math.max(0, lens.amount / 100));
|
|
5843
|
+
switch (lens.type) {
|
|
5844
|
+
case "brighten": {
|
|
5845
|
+
const a = Math.min(1, Math.max(-1, lens.amount / 100));
|
|
5846
|
+
return (c) => a >= 0 ? mix(c, [1, 1, 1], a) : mix(c, [0, 0, 0], -a);
|
|
5847
|
+
}
|
|
5848
|
+
case "invert":
|
|
5849
|
+
return (c) => mix(c, [1 - c[0], 1 - c[1], 1 - c[2]], s);
|
|
5850
|
+
case "tintedGrayscale":
|
|
5851
|
+
return (c) => {
|
|
5852
|
+
const l = luma(c);
|
|
5853
|
+
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));
|
|
5854
|
+
return mix(c, duo, s);
|
|
5855
|
+
};
|
|
5856
|
+
case "colorAdd":
|
|
5857
|
+
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]];
|
|
5858
|
+
case "colorLimit":
|
|
5859
|
+
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]];
|
|
5860
|
+
case "heatMap":
|
|
5861
|
+
return (c) => [...heatAt(luma(c) + lens.amount / 100), c[3]];
|
|
5862
|
+
default:
|
|
5863
|
+
return null;
|
|
5864
|
+
}
|
|
5865
|
+
}
|
|
5866
|
+
function mapVectorPaintColors(paint, f) {
|
|
5867
|
+
const one = (color2) => {
|
|
5868
|
+
const c = parseVectorColor(color2);
|
|
5869
|
+
return c ? formatRgba(f(c)) : color2;
|
|
5870
|
+
};
|
|
5871
|
+
if (paint == null || paint === "none") return paint;
|
|
5872
|
+
if (typeof paint === "string") return one(paint);
|
|
5873
|
+
const p = paint;
|
|
5874
|
+
const out = { ...p };
|
|
5875
|
+
if (Array.isArray(p.stops)) out.stops = p.stops.map((s) => ({ ...s, color: one(s.color) }));
|
|
5876
|
+
if (Array.isArray(p.colors)) out.colors = p.colors.map(one);
|
|
5877
|
+
if (Array.isArray(p.points)) out.points = p.points.map((q) => typeof q.color === "string" ? { ...q, color: one(q.color) } : q);
|
|
5878
|
+
return out;
|
|
5879
|
+
}
|
|
5880
|
+
var drawnCache2 = /* @__PURE__ */ new WeakMap();
|
|
5881
|
+
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 };
|
|
5882
|
+
function shapePath(shape, id, path, extra = {}) {
|
|
5883
|
+
const { id: _i, subpaths: _s, booleanOperation: _b, blendStep: _bs, locked: _l, visible: _v, ...style } = shape.source;
|
|
5884
|
+
return { ...style, ...STYLE_OFF, id, type: "path", subpaths: bezierToSubpaths(path), ...shape.opacity < 1 ? { opacity: shape.opacity } : {}, ...extra };
|
|
5885
|
+
}
|
|
5886
|
+
function vectorLensDrawn(node) {
|
|
5887
|
+
const hit = drawnCache2.get(node);
|
|
5888
|
+
if (hit) return hit;
|
|
5889
|
+
const { lens } = node;
|
|
5890
|
+
const own = subpathsToBezier(node.subpaths);
|
|
5891
|
+
const box = _chunkBJTCSLF6cjs.bezierPathBounds.call(void 0, own);
|
|
5892
|
+
const children = [];
|
|
5893
|
+
if (box && lens.type !== "transparency") {
|
|
5894
|
+
const c = { x: (box.minX + box.maxX) / 2, y: (box.minY + box.maxY) / 2 };
|
|
5895
|
+
const inv = node.transform && !isIdentityMatrix(node.transform) ? invertMatrix(node.transform) : null;
|
|
5896
|
+
const k = lens.type === "magnify" ? Math.max(1, lens.amount) : 1;
|
|
5897
|
+
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 };
|
|
5898
|
+
let map = null;
|
|
5899
|
+
if (lens.type === "magnify") {
|
|
5900
|
+
const m = [k, 0, 0, k, c.x * (1 - k), c.y * (1 - k)];
|
|
5901
|
+
map = (p) => _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, p, m);
|
|
5902
|
+
} else if (lens.type === "fisheye") {
|
|
5903
|
+
const a = Math.min(100, Math.max(-100, lens.amount));
|
|
5904
|
+
const gamma = a >= 0 ? 1 / (1 + a / 25) : 1 - a / 25;
|
|
5905
|
+
const rx = Math.max(1e-9, (box.maxX - box.minX) / 2);
|
|
5906
|
+
const ry = Math.max(1e-9, (box.maxY - box.minY) / 2);
|
|
5907
|
+
const warp = (p) => {
|
|
5908
|
+
const dx = (p.x - c.x) / rx;
|
|
5909
|
+
const dy = (p.y - c.y) / ry;
|
|
5910
|
+
const u = Math.hypot(dx, dy);
|
|
5911
|
+
if (u >= 1 || u < 1e-12) return p;
|
|
5912
|
+
const f = u ** gamma / u;
|
|
5913
|
+
return { x: c.x + dx * f * rx, y: c.y + dy * f * ry };
|
|
5914
|
+
};
|
|
5915
|
+
map = (p) => mapBezierPath(p, warp, 0.25);
|
|
5916
|
+
}
|
|
5917
|
+
const recolour = vectorLensColorMap(lens);
|
|
5918
|
+
const wire = lens.type === "wireframe" ? _nullishCoalesce(lens.color, () => ( "#000000")) : null;
|
|
5919
|
+
const contents = [];
|
|
5920
|
+
(_nullishCoalesce(node.lensView, () => ( []))).forEach((below, i) => {
|
|
5921
|
+
for (const shape of vectorChildAppearanceShapes(below, i)) {
|
|
5922
|
+
const path = inv ? _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, shape.path, inv) : shape.path;
|
|
5923
|
+
const b = _chunkBJTCSLF6cjs.bezierPathBounds.call(void 0, path);
|
|
5924
|
+
if (!b || b.maxX < reach.minX || b.minX > reach.maxX || b.maxY < reach.minY || b.minY > reach.maxY) continue;
|
|
5925
|
+
const id = `${node.id}~lens${contents.length}`;
|
|
5926
|
+
const changed = map ? map(path) : path;
|
|
5927
|
+
if (wire) {
|
|
5928
|
+
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)) }));
|
|
5929
|
+
} else if (recolour) {
|
|
5930
|
+
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)) }))]);
|
|
5931
|
+
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)) }))]);
|
|
5932
|
+
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 } : {} }));
|
|
5933
|
+
} else contents.push(shapePath(shape, id, changed));
|
|
5934
|
+
}
|
|
5935
|
+
});
|
|
5936
|
+
if (contents.length) {
|
|
5937
|
+
const outline = { id: `${node.id}~lens-clip`, type: "path", subpaths: node.subpaths, fill: "#000000", stroke: null, ...node.fillRule ? { fillRule: node.fillRule } : {} };
|
|
5938
|
+
children.push({ id: `${node.id}~lens-view`, type: "group", mask: { type: "clip" }, children: [outline, ...contents] });
|
|
5939
|
+
}
|
|
5940
|
+
}
|
|
5941
|
+
const { lens: _l, lensView: _v, transform: _t, opacity: _o, effects: _e, blendMode: _bm, filters: _f, ...style } = node;
|
|
5942
|
+
const fillOpacity = lens.type === "transparency" ? 1 - Math.min(100, Math.max(0, lens.amount)) / 100 : 0;
|
|
5943
|
+
children.push({ ...style, id: `${node.id}~lens-fill`, stroke: null, strokes: void 0, opacity: fillOpacity });
|
|
5944
|
+
const stroked = (_nullishCoalesce(_optionalChain([node, 'access', _156 => _156.strokes, 'optionalAccess', _157 => _157.length]), () => ( 0))) > 0 || node.stroke != null && node.stroke !== "none";
|
|
5945
|
+
if (stroked) children.push({ ...style, id: `${node.id}~lens-stroke`, fill: null, fills: void 0 });
|
|
5946
|
+
const out = {
|
|
5947
|
+
id: node.id,
|
|
5948
|
+
type: "group",
|
|
5949
|
+
...node.name !== void 0 ? { name: node.name } : {},
|
|
5950
|
+
...node.transform ? { transform: node.transform } : {},
|
|
5951
|
+
...node.opacity !== void 0 ? { opacity: node.opacity } : {},
|
|
5952
|
+
...node.blendMode ? { blendMode: node.blendMode } : {},
|
|
5953
|
+
..._optionalChain([node, 'access', _158 => _158.filters, 'optionalAccess', _159 => _159.length]) ? { filters: node.filters } : {},
|
|
5954
|
+
children
|
|
5955
|
+
};
|
|
5956
|
+
drawnCache2.set(node, out);
|
|
5957
|
+
return out;
|
|
5958
|
+
}
|
|
5959
|
+
var sameMatrix = (a, b) => !a && !b || !!a && !!b && a.every((v2, i) => Math.abs(v2 - b[i]) < 1e-12);
|
|
5960
|
+
function sameView(a, b) {
|
|
5961
|
+
if (!a || a.length !== b.length) return false;
|
|
5962
|
+
return a.every((n, i) => {
|
|
5963
|
+
const m = b[i];
|
|
5964
|
+
if (n === m) return true;
|
|
5965
|
+
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);
|
|
5966
|
+
});
|
|
5967
|
+
}
|
|
5968
|
+
function hasLens(nodes) {
|
|
5969
|
+
return nodes.some((n) => isVectorLens(n) || n.type === "group" && hasLens(n.children));
|
|
5970
|
+
}
|
|
5971
|
+
function resolveVectorLenses(doc) {
|
|
5972
|
+
if (!hasLens(doc.nodes)) return doc;
|
|
5973
|
+
let changed = false;
|
|
5974
|
+
const walk = (list, outer, depth) => {
|
|
5975
|
+
const below = outer.slice();
|
|
5976
|
+
const out = list.map((n) => {
|
|
5977
|
+
let next = n;
|
|
5978
|
+
if (isVectorLens(n)) {
|
|
5979
|
+
if (!sameView(n.lensView, below)) next = { ...n, lensView: below.slice() };
|
|
5980
|
+
} else if (n.type === "group" && hasLens(n.children)) {
|
|
5981
|
+
const m = n.transform && !isIdentityMatrix(n.transform) ? invertMatrix(n.transform) : null;
|
|
5982
|
+
const inner = below.length ? m ? [{ id: `${n.id}:${depth}~below`, type: "group", transform: m, children: below.slice() }] : below.slice() : [];
|
|
5983
|
+
const children = walk(n.children, inner, depth + 1);
|
|
5984
|
+
if (children !== n.children) next = { ...n, children };
|
|
5985
|
+
}
|
|
5986
|
+
if (next !== n) changed = true;
|
|
5987
|
+
below.push(next);
|
|
5988
|
+
return next;
|
|
5989
|
+
});
|
|
5990
|
+
return out.some((n, i) => n !== list[i]) ? out : list;
|
|
5991
|
+
};
|
|
5992
|
+
const nodes = walk(doc.nodes, [], 0);
|
|
5993
|
+
return changed ? { ...doc, nodes } : doc;
|
|
5994
|
+
}
|
|
5995
|
+
function stripVectorLensViews(doc) {
|
|
5996
|
+
if (!hasLens(doc.nodes)) return doc;
|
|
5997
|
+
const strip2 = (list) => list.map((n) => {
|
|
5998
|
+
if (n.type === "path" && n.lensView) {
|
|
5999
|
+
const { lensView: _v, ...rest } = n;
|
|
6000
|
+
return rest;
|
|
6001
|
+
}
|
|
6002
|
+
if (n.type === "group") return { ...n, children: strip2(n.children) };
|
|
6003
|
+
return n;
|
|
6004
|
+
});
|
|
6005
|
+
return { ...doc, nodes: strip2(doc.nodes) };
|
|
6006
|
+
}
|
|
6007
|
+
|
|
5775
6008
|
// src/geom/warp.ts
|
|
5776
6009
|
var WARP_STYLES = [
|
|
5777
6010
|
"arc",
|
|
@@ -6718,7 +6951,7 @@ function normalizeVectorEffectParams(type, params, base) {
|
|
|
6718
6951
|
if (!defaults) return null;
|
|
6719
6952
|
const out = { ...defaults, ..._nullishCoalesce(base, () => ( {})) };
|
|
6720
6953
|
for (const spec of VECTOR_EFFECT_PARAM_SPECS[type]) {
|
|
6721
|
-
const v2 = _optionalChain([params, 'optionalAccess',
|
|
6954
|
+
const v2 = _optionalChain([params, 'optionalAccess', _160 => _160[spec.key]]);
|
|
6722
6955
|
if (v2 === void 0) continue;
|
|
6723
6956
|
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
6957
|
else if (spec.kind === "boolean" && typeof v2 === "boolean") out[spec.key] = v2;
|
|
@@ -6730,7 +6963,7 @@ function normalizeVectorEffectParams(type, params, base) {
|
|
|
6730
6963
|
const o = out;
|
|
6731
6964
|
o.rows = Math.round(o.rows);
|
|
6732
6965
|
o.columns = Math.round(o.columns);
|
|
6733
|
-
const given = _optionalChain([params, 'optionalAccess',
|
|
6966
|
+
const given = _optionalChain([params, 'optionalAccess', _161 => _161.mesh]);
|
|
6734
6967
|
let mesh = given !== void 0 ? isValidWarpMesh(given) ? cloneMesh(given) : null : o.mesh;
|
|
6735
6968
|
if (o.style !== "mesh") mesh = null;
|
|
6736
6969
|
if (mesh && given !== void 0) {
|
|
@@ -6747,10 +6980,10 @@ function createVectorEffect(type, id, params) {
|
|
|
6747
6980
|
}
|
|
6748
6981
|
var isEnabled = (e) => e.enabled !== false && !!VECTOR_EFFECT_DEFAULTS[e.type];
|
|
6749
6982
|
function activeVectorEffects(node) {
|
|
6750
|
-
return _nullishCoalesce(_optionalChain([node, 'access',
|
|
6983
|
+
return _nullishCoalesce(_optionalChain([node, 'access', _162 => _162.effects, 'optionalAccess', _163 => _163.filter, 'call', _164 => _164(isEnabled)]), () => ( []));
|
|
6751
6984
|
}
|
|
6752
6985
|
function hasOwnVectorAppearance(node) {
|
|
6753
|
-
return node.type === "text" || node.type === "instance" || node.type === "group" && !!node.liveBoolean || isVectorFrame(node) || isVectorSymmetryGroup(node) || !!_optionalChain([node, 'access',
|
|
6986
|
+
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
6987
|
}
|
|
6755
6988
|
var liveCache = /* @__PURE__ */ new WeakMap();
|
|
6756
6989
|
function hasVectorAppearance(node) {
|
|
@@ -6762,7 +6995,7 @@ function hasVectorAppearance(node) {
|
|
|
6762
6995
|
return v2;
|
|
6763
6996
|
}
|
|
6764
6997
|
function isVectorLiveBoolean(node) {
|
|
6765
|
-
return _optionalChain([node, 'optionalAccess',
|
|
6998
|
+
return _optionalChain([node, 'optionalAccess', _168 => _168.type]) === "group" && !!node.liveBoolean;
|
|
6766
6999
|
}
|
|
6767
7000
|
function vectorOperandOperation(group, child) {
|
|
6768
7001
|
return _nullishCoalesce(_nullishCoalesce(child.booleanOperation, () => ( group.liveBoolean)), () => ( "union"));
|
|
@@ -6879,7 +7112,7 @@ var compareOrder = (a, b) => {
|
|
|
6879
7112
|
for (let i = 0; i < n; i++) if (a[i] !== b[i]) return a[i] - b[i];
|
|
6880
7113
|
return a.length - b.length;
|
|
6881
7114
|
};
|
|
6882
|
-
var add3 = (a, b) => ({ x: a.x + (_nullishCoalesce(_optionalChain([b, 'optionalAccess',
|
|
7115
|
+
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
7116
|
var mapPaths = (shapes, fn) => {
|
|
6884
7117
|
const out = fn(shapes.map((s) => s.path));
|
|
6885
7118
|
return shapes.map((s, i) => ({ ...s, path: _nullishCoalesce(out[i], () => ( [])) }));
|
|
@@ -6907,7 +7140,7 @@ function contourShapes(shapes, c) {
|
|
|
6907
7140
|
const power = 2 ** (Math.min(100, Math.max(-100, c.acceleration)) / 50);
|
|
6908
7141
|
for (let k = 1; k <= n; k++) {
|
|
6909
7142
|
const [path] = offsetPaths([s.path], (outside ? 1 : -1) * step * k, c.join, c.miterLimit, 1, 0);
|
|
6910
|
-
if (!_optionalChain([path, 'optionalAccess',
|
|
7143
|
+
if (!_optionalChain([path, 'optionalAccess', _171 => _171.length])) break;
|
|
6911
7144
|
const t = (k / n) ** power;
|
|
6912
7145
|
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
7146
|
out.push({ source, path, opacity: s.opacity, order: [outside ? n - k : k, ...s.order] });
|
|
@@ -6982,8 +7215,8 @@ function bevelShapes(shapes, b) {
|
|
|
6982
7215
|
out.push({ source, path: f.path, opacity: s.opacity, order: [...s.order, 1, k] });
|
|
6983
7216
|
});
|
|
6984
7217
|
const [middle] = offsetPaths([s.path], -b.width, "miter", 4, 1, 0);
|
|
6985
|
-
if (_optionalChain([middle, 'optionalAccess',
|
|
6986
|
-
const hasStroke = _optionalChain([s, 'access',
|
|
7218
|
+
if (_optionalChain([middle, 'optionalAccess', _172 => _172.length])) out.push({ ...s, source: fillOnly, path: middle, order: [...s.order, 2] });
|
|
7219
|
+
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
7220
|
if (hasStroke) out.push({ ...s, source: { ...s.source, fill: null, fills: void 0 }, order: [...s.order, 3] });
|
|
6988
7221
|
}
|
|
6989
7222
|
return out;
|
|
@@ -7116,10 +7349,10 @@ function vectorEffectInputBounds(node, effectId) {
|
|
|
7116
7349
|
return paths ? pathsBounds(paths) : null;
|
|
7117
7350
|
}
|
|
7118
7351
|
function vectorNodeEnvelope(node) {
|
|
7119
|
-
return _nullishCoalesce(_optionalChain([node, 'optionalAccess',
|
|
7352
|
+
return _nullishCoalesce(_optionalChain([node, 'optionalAccess', _176 => _176.effects, 'optionalAccess', _177 => _177.find, 'call', _178 => _178((e) => e.type === "envelope" && e.enabled !== false)]), () => ( null));
|
|
7120
7353
|
}
|
|
7121
7354
|
function vectorEnvelopeFrame(node, effectId) {
|
|
7122
|
-
const e = effectId ? _optionalChain([node, 'access',
|
|
7355
|
+
const e = effectId ? _optionalChain([node, 'access', _179 => _179.effects, 'optionalAccess', _180 => _180.find, 'call', _181 => _181((x) => x.id === effectId)]) : vectorNodeEnvelope(node);
|
|
7123
7356
|
if (!e || e.type !== "envelope") return null;
|
|
7124
7357
|
const bounds = vectorEffectInputBounds(node, e.id);
|
|
7125
7358
|
if (!bounds || !(bounds.width > 0 && bounds.height > 0)) return null;
|
|
@@ -7180,7 +7413,7 @@ function placement(node) {
|
|
|
7180
7413
|
...node.blendStep ? { blendStep: true } : {},
|
|
7181
7414
|
...node.booleanOperation ? { booleanOperation: node.booleanOperation } : {},
|
|
7182
7415
|
...node.blendMode ? { blendMode: node.blendMode } : {},
|
|
7183
|
-
..._optionalChain([node, 'access',
|
|
7416
|
+
..._optionalChain([node, 'access', _182 => _182.filters, 'optionalAccess', _183 => _183.length]) ? { filters: node.filters } : {}
|
|
7184
7417
|
};
|
|
7185
7418
|
}
|
|
7186
7419
|
function vectorAppearanceNodes(node) {
|
|
@@ -7196,8 +7429,8 @@ function expandVectorAppearance(node) {
|
|
|
7196
7429
|
expandCache.set(node, [vectorTextShaperGeneration(), drawn]);
|
|
7197
7430
|
return drawn;
|
|
7198
7431
|
}
|
|
7199
|
-
if (isVectorFrame(node) || isVectorSymmetryGroup(node)) {
|
|
7200
|
-
const drawn = isVectorFrame(node) ? vectorFrameDrawn(node) : vectorSymmetryDrawn(node);
|
|
7432
|
+
if (isVectorFrame(node) || isVectorSymmetryGroup(node) || isVectorLens(node)) {
|
|
7433
|
+
const drawn = isVectorFrame(node) ? vectorFrameDrawn(node) : isVectorLens(node) ? vectorLensDrawn(node) : vectorSymmetryDrawn(node);
|
|
7201
7434
|
const out2 = hasVectorAppearance(drawn) ? expandVectorAppearance(drawn) : drawn;
|
|
7202
7435
|
expandCache.set(node, [vectorTextShaperGeneration(), out2]);
|
|
7203
7436
|
return out2;
|
|
@@ -7302,7 +7535,7 @@ function vectorEnteredGroups(nodes, ids) {
|
|
|
7302
7535
|
// src/vector/connectors.ts
|
|
7303
7536
|
var SIDES = ["top", "right", "bottom", "left", "center"];
|
|
7304
7537
|
function isVectorConnector(node) {
|
|
7305
|
-
return _optionalChain([node, 'optionalAccess',
|
|
7538
|
+
return _optionalChain([node, 'optionalAccess', _184 => _184.type]) === "path" && !!node.connector;
|
|
7306
7539
|
}
|
|
7307
7540
|
function vectorConnectionSites(nodes, id) {
|
|
7308
7541
|
const node = findVectorNode(nodes, id);
|
|
@@ -7359,7 +7592,7 @@ function facingSite(sites, toward) {
|
|
|
7359
7592
|
}
|
|
7360
7593
|
function storedEnds(node, world) {
|
|
7361
7594
|
const sp = node.subpaths[0];
|
|
7362
|
-
if (!_optionalChain([sp, 'optionalAccess',
|
|
7595
|
+
if (!_optionalChain([sp, 'optionalAccess', _185 => _185.anchors, 'access', _186 => _186.length])) return null;
|
|
7363
7596
|
const a = sp.anchors[0];
|
|
7364
7597
|
const b = sp.anchors[sp.anchors.length - 1];
|
|
7365
7598
|
return [applyMatrix(world, a), applyMatrix(world, b)];
|
|
@@ -7466,8 +7699,8 @@ function routeVectorConnector(nodes, id) {
|
|
|
7466
7699
|
}));
|
|
7467
7700
|
return {
|
|
7468
7701
|
subpaths: [{ closed: false, anchors: local }],
|
|
7469
|
-
startSide: _nullishCoalesce(_optionalChain([s, 'optionalAccess',
|
|
7470
|
-
endSide: _nullishCoalesce(_optionalChain([e, 'optionalAccess',
|
|
7702
|
+
startSide: _nullishCoalesce(_optionalChain([s, 'optionalAccess', _187 => _187.side]), () => ( null)),
|
|
7703
|
+
endSide: _nullishCoalesce(_optionalChain([e, 'optionalAccess', _188 => _188.side]), () => ( null)),
|
|
7471
7704
|
dropped: { start: !!startGlue && !s, end: !!endGlue && !e }
|
|
7472
7705
|
};
|
|
7473
7706
|
}
|
|
@@ -7479,7 +7712,7 @@ function sameSubpaths(a, b) {
|
|
|
7479
7712
|
const o = b[i];
|
|
7480
7713
|
return sp.closed === o.closed && sp.anchors.length === o.anchors.length && sp.anchors.every((p, k) => {
|
|
7481
7714
|
const q = o.anchors[k];
|
|
7482
|
-
return samePoint(p, q) && samePoint(p.in, q.in) && samePoint(p.out, q.out) && (_nullishCoalesce(_optionalChain([p, 'access',
|
|
7715
|
+
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
7716
|
});
|
|
7484
7717
|
});
|
|
7485
7718
|
}
|
|
@@ -7758,7 +7991,7 @@ function applyVectorCornersAttribute(subpaths, value) {
|
|
|
7758
7991
|
for (const item of value.trim().split(/\s+/)) {
|
|
7759
7992
|
const m = /^(\d+)\.(\d+):([\d.eE+-]+)(?::([a-z]+))?$/.exec(item);
|
|
7760
7993
|
if (!m) continue;
|
|
7761
|
-
const a = _optionalChain([subpaths, 'access',
|
|
7994
|
+
const a = _optionalChain([subpaths, 'access', _193 => _193[+m[1]], 'optionalAccess', _194 => _194.anchors, 'access', _195 => _195[+m[2]]]);
|
|
7762
7995
|
const radius = parseFloat(m[3]);
|
|
7763
7996
|
if (!a || !(radius > 0)) continue;
|
|
7764
7997
|
const kind = VECTOR_CORNER_KINDS.includes(m[4]) ? m[4] : void 0;
|
|
@@ -7783,7 +8016,7 @@ function vectorPaintToSvg(paint, gradientId, options = {}) {
|
|
|
7783
8016
|
const area2 = bounds2 ? { x: bounds2.x - reach2, y: bounds2.y - reach2, width: bounds2.width + 2 * reach2, height: bounds2.height + 2 * reach2 } : null;
|
|
7784
8017
|
const key2 = `${gradientId}|${_nullishCoalesce(options.role, () => ( "fill"))}|${_nullishCoalesce(options.precision, () => ( 3))}|${area2 ? [area2.x, area2.y, area2.width, area2.height].join(",") : ""}`;
|
|
7785
8018
|
let byKey2 = paintCache.get(paint);
|
|
7786
|
-
const hit = _optionalChain([byKey2, 'optionalAccess',
|
|
8019
|
+
const hit = _optionalChain([byKey2, 'optionalAccess', _196 => _196.get, 'call', _197 => _197(key2)]);
|
|
7787
8020
|
if (hit) return { value: `url(#${gradientId})`, defs: hit };
|
|
7788
8021
|
const defs2 = vectorShadedSvgDefs(paint, gradientId, { bounds: bounds2, area: area2, precision: _nullishCoalesce(options.precision, () => ( 3)) });
|
|
7789
8022
|
if (!byKey2) paintCache.set(paint, byKey2 = /* @__PURE__ */ new Map());
|
|
@@ -7795,7 +8028,7 @@ function vectorPaintToSvg(paint, gradientId, options = {}) {
|
|
|
7795
8028
|
const precision = _nullishCoalesce(options.precision, () => ( 3));
|
|
7796
8029
|
const key = `${gradientId}|${role}|${precision}`;
|
|
7797
8030
|
const owner = _nullishCoalesce(options.node, () => ( paint));
|
|
7798
|
-
const cached = _optionalChain([paintCache, 'access',
|
|
8031
|
+
const cached = _optionalChain([paintCache, 'access', _198 => _198.get, 'call', _199 => _199(owner), 'optionalAccess', _200 => _200.get, 'call', _201 => _201(key)]);
|
|
7799
8032
|
if (cached && (!options.node || (role === "fill" ? options.node.fill : options.node.stroke) === paint)) return { value: `url(#${gradientId})`, defs: cached };
|
|
7800
8033
|
const node = options.node;
|
|
7801
8034
|
const bounds = node ? vectorPathLocalBounds(node) : null;
|
|
@@ -7849,7 +8082,7 @@ function vectorNodeLocalPaintBounds(node) {
|
|
|
7849
8082
|
}
|
|
7850
8083
|
var filterCache = /* @__PURE__ */ new WeakMap();
|
|
7851
8084
|
function vectorNodeFilterSvg(node, id) {
|
|
7852
|
-
if (!_optionalChain([node, 'access',
|
|
8085
|
+
if (!_optionalChain([node, 'access', _202 => _202.filters, 'optionalAccess', _203 => _203.length])) return null;
|
|
7853
8086
|
const hit = filterCache.get(node);
|
|
7854
8087
|
if (hit && hit.id === id) return hit.filter;
|
|
7855
8088
|
const active = activeVectorFilters(node);
|
|
@@ -7912,7 +8145,7 @@ function blendFromAttribute(value, m) {
|
|
|
7912
8145
|
return out;
|
|
7913
8146
|
}
|
|
7914
8147
|
function vectorDocumentToSvg(doc, options = {}) {
|
|
7915
|
-
doc = resolveVectorSymbols(doc);
|
|
8148
|
+
doc = resolveVectorLenses(resolveVectorSymbols(doc));
|
|
7916
8149
|
const precision = _nullishCoalesce(options.precision, () => ( 3));
|
|
7917
8150
|
const prefix = _nullishCoalesce(options.idPrefix, () => ( "vg-"));
|
|
7918
8151
|
const pretty = options.pretty !== false;
|
|
@@ -7931,9 +8164,10 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
7931
8164
|
if (node.resizing) out2 += ` data-vector-resizing="${escapeAttr2(JSON.stringify(node.resizing))}"`;
|
|
7932
8165
|
if (node.type === "path" && isVectorShadedPaint(node.fill)) out2 += ` data-vector-shading="${escapeAttr2(JSON.stringify(node.fill))}"`;
|
|
7933
8166
|
if (node.type === "path" && node.connector) out2 += ` data-vector-connector="${escapeAttr2(JSON.stringify(node.connector))}"`;
|
|
8167
|
+
if (node.type === "path" && node.lens) out2 += ` data-vector-lens="${escapeAttr2(JSON.stringify(node.lens))}"`;
|
|
7934
8168
|
const blend = vectorBlendModeCss(node.blendMode);
|
|
7935
8169
|
if (blend) out2 += ` style="mix-blend-mode:${blend}"`;
|
|
7936
|
-
if (_optionalChain([node, 'access',
|
|
8170
|
+
if (_optionalChain([node, 'access', _204 => _204.filters, 'optionalAccess', _205 => _205.length])) {
|
|
7937
8171
|
const filter = vectorNodeFilterSvg(node, `${prefix}filter-${node.id}`);
|
|
7938
8172
|
const data = ` data-vector-filters="${escapeAttr2(JSON.stringify(node.filters))}"`;
|
|
7939
8173
|
if (filter) {
|
|
@@ -7980,7 +8214,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
7980
8214
|
let out2 = ` stroke="${escapeAttr2(strokeValue)}" stroke-width="${num3(width)}"`;
|
|
7981
8215
|
if (node.strokeLinecap && node.strokeLinecap !== "butt") out2 += ` stroke-linecap="${node.strokeLinecap}"`;
|
|
7982
8216
|
if (node.strokeLinejoin && node.strokeLinejoin !== "miter") out2 += ` stroke-linejoin="${node.strokeLinejoin}"`;
|
|
7983
|
-
if (_optionalChain([node, 'access',
|
|
8217
|
+
if (_optionalChain([node, 'access', _206 => _206.strokeDasharray, 'optionalAccess', _207 => _207.length])) out2 += ` stroke-dasharray="${node.strokeDasharray.map(num3).join(" ")}"`;
|
|
7984
8218
|
return out2;
|
|
7985
8219
|
};
|
|
7986
8220
|
const liveCorners = (node) => {
|
|
@@ -8023,7 +8257,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8023
8257
|
};
|
|
8024
8258
|
const emit2 = (node, depth) => {
|
|
8025
8259
|
if (node.visible === false && !options.includeHidden) return;
|
|
8026
|
-
const wrappers = _nullishCoalesce(_optionalChain([options, 'access',
|
|
8260
|
+
const wrappers = _nullishCoalesce(_optionalChain([options, 'access', _208 => _208.wrap, 'optionalAccess', _209 => _209[node.id]]), () => ( []));
|
|
8027
8261
|
wrappers.forEach((w2, i) => {
|
|
8028
8262
|
let attrs = w2.id !== void 0 ? ` id="${escapeAttr2(w2.id)}"` : "";
|
|
8029
8263
|
if (w2.transform) attrs += ` transform="${escapeAttr2(w2.transform)}"`;
|
|
@@ -8044,7 +8278,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8044
8278
|
};
|
|
8045
8279
|
const emitMaskGroup = (node, depth) => {
|
|
8046
8280
|
const [source, ...contents] = node.children;
|
|
8047
|
-
const body = _optionalChain([node, 'access',
|
|
8281
|
+
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
8282
|
const settings = { type: node.mask.type, ...node.mask.invert ? { invert: true } : {} };
|
|
8049
8283
|
lines.push(`${indent(depth)}<g${common(node)} data-vector-mask="${escapeAttr2(JSON.stringify(settings))}">`);
|
|
8050
8284
|
const mask = vectorMaskRenderData(node, `${prefix}mask-${node.id}`, `${prefix}mask-filter-${node.id}`, precision);
|
|
@@ -8061,7 +8295,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8061
8295
|
lines.push(`${indent(depth + 1)}<g data-vector-part="mask-source" display="none">`);
|
|
8062
8296
|
emitNode(source, depth + 2);
|
|
8063
8297
|
lines.push(`${indent(depth + 1)}</g>`);
|
|
8064
|
-
if (_optionalChain([mask, 'optionalAccess',
|
|
8298
|
+
if (_optionalChain([mask, 'optionalAccess', _212 => _212.clip])) {
|
|
8065
8299
|
defs.push(`<clipPath id="${escapeAttr2(mask.id)}">${mask.clip.map((c) => `<path d="${c.d}" clip-rule="${c.clipRule}"/>`).join("")}</clipPath>`);
|
|
8066
8300
|
ref = ` clip-path="url(#${escapeAttr2(mask.id)})"`;
|
|
8067
8301
|
}
|
|
@@ -8073,7 +8307,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8073
8307
|
};
|
|
8074
8308
|
const emitTextElement = (node, depth, attrs) => {
|
|
8075
8309
|
const geometry = vectorTextGeometryNode(node);
|
|
8076
|
-
const fields = { text: node.text, font: node.font, ..._optionalChain([node, 'access',
|
|
8310
|
+
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
8311
|
let data = ` data-vector-text="${escapeAttr2(JSON.stringify(fields))}"`;
|
|
8078
8312
|
if (hasVectorPaintStacks(node)) data += ` data-vector-fills="${escapeAttr2(JSON.stringify(vectorFills(node)))}" data-vector-strokes="${escapeAttr2(JSON.stringify(vectorStrokes(node)))}"`;
|
|
8079
8313
|
else {
|
|
@@ -8115,12 +8349,12 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8115
8349
|
};
|
|
8116
8350
|
const emitText = (node, depth) => {
|
|
8117
8351
|
const outlines = vectorTextPaths(node).outlines;
|
|
8118
|
-
const effects = !!_optionalChain([node, 'access',
|
|
8352
|
+
const effects = !!_optionalChain([node, 'access', _217 => _217.effects, 'optionalAccess', _218 => _218.some, 'call', _219 => _219((e) => e.enabled !== false)]);
|
|
8119
8353
|
if (!outlines || !effects && options.text !== "outlines") {
|
|
8120
8354
|
emitTextElement(node, depth, common(node));
|
|
8121
8355
|
return;
|
|
8122
8356
|
}
|
|
8123
|
-
lines.push(`${indent(depth)}<g${common(node)} data-vector-live="${escapeAttr2(JSON.stringify({ kind: "text", ..._optionalChain([node, 'access',
|
|
8357
|
+
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
8358
|
lines.push(`${indent(depth + 1)}<g data-vector-part="appearance">`);
|
|
8125
8359
|
for (const shape of vectorAppearanceNodes(node)) emit2(shape, depth + 2);
|
|
8126
8360
|
lines.push(`${indent(depth + 1)}</g>`);
|
|
@@ -8134,7 +8368,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8134
8368
|
const symbolRef = (symbolId) => {
|
|
8135
8369
|
const hit = symbolIds.get(symbolId);
|
|
8136
8370
|
if (hit) return hit;
|
|
8137
|
-
const sym2 = _optionalChain([doc, 'access',
|
|
8371
|
+
const sym2 = _optionalChain([doc, 'access', _222 => _222.symbols, 'optionalAccess', _223 => _223.find, 'call', _224 => _224((x) => x.id === symbolId)]);
|
|
8138
8372
|
if (!sym2) return null;
|
|
8139
8373
|
const id = `${prefix}symbol-${symbolId}`;
|
|
8140
8374
|
symbolIds.set(symbolId, id);
|
|
@@ -8144,20 +8378,20 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8144
8378
|
};
|
|
8145
8379
|
const emitInstance = (node, depth) => {
|
|
8146
8380
|
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',
|
|
8381
|
+
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
8382
|
const ref = symbolRef(node.symbolId);
|
|
8149
8383
|
if (exact2 && ref) {
|
|
8150
8384
|
lines.push(`${indent(depth)}<use${common(node)} href="#${escapeAttr2(ref)}" data-vector-instance="${escapeAttr2(JSON.stringify(data))}"/>`);
|
|
8151
8385
|
return;
|
|
8152
8386
|
}
|
|
8153
|
-
const full = { ...data, ...node.transform ? { transform: node.transform } : {}, ..._optionalChain([node, 'access',
|
|
8387
|
+
const full = { ...data, ...node.transform ? { transform: node.transform } : {}, ..._optionalChain([node, 'access', _229 => _229.effects, 'optionalAccess', _230 => _230.length]) ? { effects: node.effects } : {} };
|
|
8154
8388
|
lines.push(`${indent(depth)}<g data-vector-instance="${escapeAttr2(JSON.stringify(full))}">`);
|
|
8155
8389
|
emitNode(vectorInstanceDrawn(node), depth + 1);
|
|
8156
8390
|
lines.push(`${indent(depth)}</g>`);
|
|
8157
8391
|
};
|
|
8158
8392
|
const emitFrame = (node, depth) => {
|
|
8159
8393
|
const f = node.frame;
|
|
8160
|
-
const data = { ...f, ..._optionalChain([node, 'access',
|
|
8394
|
+
const data = { ...f, ..._optionalChain([node, 'access', _231 => _231.effects, 'optionalAccess', _232 => _232.length]) ? { effects: node.effects } : {} };
|
|
8161
8395
|
lines.push(`${indent(depth)}<g${common(node)} data-vector-frame="${escapeAttr2(JSON.stringify(data))}">`);
|
|
8162
8396
|
const rect = vectorFrameRectPath(f);
|
|
8163
8397
|
if (f.fill !== void 0 && f.fill !== null && f.fill !== "none") {
|
|
@@ -8196,17 +8430,17 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8196
8430
|
if (hasOwnVectorAppearance(node)) {
|
|
8197
8431
|
const live2 = {
|
|
8198
8432
|
kind: node.type,
|
|
8199
|
-
..._optionalChain([node, 'access',
|
|
8433
|
+
..._optionalChain([node, 'access', _233 => _233.effects, 'optionalAccess', _234 => _234.length]) ? { effects: node.effects } : {},
|
|
8200
8434
|
...node.type === "group" && node.liveBoolean ? { liveBoolean: node.liveBoolean } : {},
|
|
8201
8435
|
...node.type === "group" && node.symmetry ? { symmetry: node.symmetry } : {}
|
|
8202
8436
|
};
|
|
8203
8437
|
lines.push(`${indent(depth)}<g${common(node)} data-vector-live="${escapeAttr2(JSON.stringify(live2))}">`);
|
|
8204
8438
|
lines.push(`${indent(depth + 1)}<g data-vector-part="appearance">`);
|
|
8205
|
-
for (const shape of vectorAppearanceNodes(node)) emit2(shape, depth + 2);
|
|
8439
|
+
for (const shape of isVectorLens(node) ? vectorLensDrawn(node).children : vectorAppearanceNodes(node)) emit2(shape, depth + 2);
|
|
8206
8440
|
lines.push(`${indent(depth + 1)}</g>`);
|
|
8207
8441
|
lines.push(`${indent(depth + 1)}<g data-vector-part="source" display="none">`);
|
|
8208
8442
|
if (node.type === "path") {
|
|
8209
|
-
const { effects: _e, transform: _t, opacity: _o, visible: _v, booleanOperation: _b, blendStep: _s, blendMode: _bm, filters: _f, ...source } = node;
|
|
8443
|
+
const { effects: _e, transform: _t, opacity: _o, visible: _v, booleanOperation: _b, blendStep: _s, blendMode: _bm, filters: _f, lens: _l, lensView: _lv, ...source } = node;
|
|
8210
8444
|
emit2({ ...source, id: `${node.id}~src` }, depth + 2);
|
|
8211
8445
|
} else for (const child of node.children) emit2(child, depth + 2);
|
|
8212
8446
|
lines.push(`${indent(depth + 1)}</g>`);
|
|
@@ -8247,7 +8481,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8247
8481
|
data += ` data-vector-width-profile="${widthProfileToAttribute(profile)}"`;
|
|
8248
8482
|
if (node.strokeLinecap && node.strokeLinecap !== "butt") data += ` data-vector-stroke-linecap="${node.strokeLinecap}"`;
|
|
8249
8483
|
if (node.strokeLinejoin && node.strokeLinejoin !== "miter") data += ` data-vector-stroke-linejoin="${node.strokeLinejoin}"`;
|
|
8250
|
-
if (_optionalChain([node, 'access',
|
|
8484
|
+
if (_optionalChain([node, 'access', _235 => _235.strokeDasharray, 'optionalAccess', _236 => _236.length])) data += ` data-vector-stroke-dasharray="${node.strokeDasharray.map(num3).join(" ")}"`;
|
|
8251
8485
|
}
|
|
8252
8486
|
lines.push(`${indent(depth)}<g${common(node)}${data}>`);
|
|
8253
8487
|
lines.push(`${indent(depth + 1)}<path data-vector-part="fill" d="${d}"${fillAttrs}${live}/>`);
|
|
@@ -8415,7 +8649,7 @@ function attrOrStyle(el, name) {
|
|
|
8415
8649
|
return el.attrs[name];
|
|
8416
8650
|
}
|
|
8417
8651
|
function urlId(value) {
|
|
8418
|
-
return _nullishCoalesce(_optionalChain([/^url\(\s*['"]?#([^'")\s]+)['"]?\s*\)/, 'access',
|
|
8652
|
+
return _nullishCoalesce(_optionalChain([/^url\(\s*['"]?#([^'")\s]+)['"]?\s*\)/, 'access', _237 => _237.exec, 'call', _238 => _238((_nullishCoalesce(value, () => ( ""))).trim()), 'optionalAccess', _239 => _239[1]]), () => ( null));
|
|
8419
8653
|
}
|
|
8420
8654
|
function clipRulesAsFillRules(el) {
|
|
8421
8655
|
const attrs = { ...el.attrs };
|
|
@@ -8480,9 +8714,9 @@ function resolveGradient(id, raw) {
|
|
|
8480
8714
|
for (let el = first; el && !chain.includes(el) && chain.length < 32; ) {
|
|
8481
8715
|
chain.push(el);
|
|
8482
8716
|
const href = _nullishCoalesce(el.attrs.href, () => ( el.attrs["xlink:href"]));
|
|
8483
|
-
el = _optionalChain([href, 'optionalAccess',
|
|
8717
|
+
el = _optionalChain([href, 'optionalAccess', _240 => _240.startsWith, 'call', _241 => _241("#")]) ? raw.get(href.slice(1)) : void 0;
|
|
8484
8718
|
}
|
|
8485
|
-
const attr = (name) => _optionalChain([chain, 'access',
|
|
8719
|
+
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
8720
|
const stops = _nullishCoalesce(chain.map(readStops).find((s) => s.length), () => ( []));
|
|
8487
8721
|
if (!stops.length) return null;
|
|
8488
8722
|
const user = attr("gradientUnits") === "userSpaceOnUse";
|
|
@@ -8652,7 +8886,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8652
8886
|
const stackedPath = (g, _style, m, meta) => {
|
|
8653
8887
|
const fillEl = g.children.find((c) => c.name === "path" && c.attrs["data-vector-part"] === "fill");
|
|
8654
8888
|
const subpaths = fillEl ? shapeOf(fillEl) : null;
|
|
8655
|
-
if (!_optionalChain([subpaths, 'optionalAccess',
|
|
8889
|
+
if (!_optionalChain([subpaths, 'optionalAccess', _246 => _246.length])) return null;
|
|
8656
8890
|
const parse = (v2) => {
|
|
8657
8891
|
try {
|
|
8658
8892
|
return v2 ? JSON.parse(v2) : [];
|
|
@@ -8671,7 +8905,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8671
8905
|
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
8906
|
for (const n of nodes2) {
|
|
8673
8907
|
const prev = out[out.length - 1];
|
|
8674
|
-
if (_optionalChain([prev, 'optionalAccess',
|
|
8908
|
+
if (_optionalChain([prev, 'optionalAccess', _247 => _247.type]) === "path" && n.type === "path" && key(prev) === key(n)) {
|
|
8675
8909
|
const fills = vectorFills(n);
|
|
8676
8910
|
const strokesBefore = vectorStrokes(prev);
|
|
8677
8911
|
if (!(fills.length && strokesBefore.length)) {
|
|
@@ -8689,7 +8923,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8689
8923
|
const part = (name) => g.children.find((c) => c.name === "path" && c.attrs["data-vector-part"] === name);
|
|
8690
8924
|
const fillEl = part("fill");
|
|
8691
8925
|
const subpaths = fillEl ? shapeOf(fillEl) : null;
|
|
8692
|
-
if (!fillEl || !_optionalChain([subpaths, 'optionalAccess',
|
|
8926
|
+
if (!fillEl || !_optionalChain([subpaths, 'optionalAccess', _248 => _248.length])) return null;
|
|
8693
8927
|
const a = g.attrs;
|
|
8694
8928
|
const fs = readStyle(fillEl, style);
|
|
8695
8929
|
const strokeEl = part("stroke");
|
|
@@ -8726,7 +8960,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8726
8960
|
...profile.length ? { strokeWidthProfile: profile } : {},
|
|
8727
8961
|
...keptCap ? { strokeLinecap: keptCap } : {},
|
|
8728
8962
|
...keptJoin ? { strokeLinejoin: keptJoin } : {},
|
|
8729
|
-
..._optionalChain([keptDash, 'optionalAccess',
|
|
8963
|
+
..._optionalChain([keptDash, 'optionalAccess', _249 => _249.length]) ? { strokeDasharray: keptDash } : {}
|
|
8730
8964
|
};
|
|
8731
8965
|
return placed(node, m);
|
|
8732
8966
|
};
|
|
@@ -8791,8 +9025,8 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8791
9025
|
} else {
|
|
8792
9026
|
const fill = json2(g.attrs["data-vector-fill"]);
|
|
8793
9027
|
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',
|
|
9028
|
+
node.fill = fill == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call', _250 => _250([{ paint: fill }]), 'access', _251 => _251[0], 'optionalAccess', _252 => _252.paint]), () => ( null));
|
|
9029
|
+
node.stroke = stroke == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call', _253 => _253([{ paint: stroke }]), 'access', _254 => _254[0], 'optionalAccess', _255 => _255.paint]), () => ( null));
|
|
8796
9030
|
const settings = json2(g.attrs["data-vector-stroke-settings"]);
|
|
8797
9031
|
if (settings && typeof settings === "object") {
|
|
8798
9032
|
const strokes = sanitizeVectorStrokes([{ paint: _nullishCoalesce(node.stroke, () => ( "#000")), ...settings }]);
|
|
@@ -8828,8 +9062,8 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8828
9062
|
const anchor = attrOrStyle(el, "text-anchor");
|
|
8829
9063
|
const first0 = (v2) => _nullishCoalesce(numberList(v2)[0], () => ( 0));
|
|
8830
9064
|
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',
|
|
9065
|
+
const x = el.attrs.x !== void 0 ? first0(el.attrs.x) : first0(_optionalChain([tspan, 'optionalAccess', _256 => _256.attrs, 'access', _257 => _257.x]));
|
|
9066
|
+
const y = el.attrs.y !== void 0 ? first0(el.attrs.y) : first0(_optionalChain([tspan, 'optionalAccess', _258 => _258.attrs, 'access', _259 => _259.y]));
|
|
8833
9067
|
const fillValue = _nullishCoalesce(attrOrStyle(el, "fill"), () => ( style.fill));
|
|
8834
9068
|
let node = {
|
|
8835
9069
|
id: idFor(el),
|
|
@@ -8860,12 +9094,12 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8860
9094
|
if (symbolOfElement.has(el)) return symbolOfElement.get(el);
|
|
8861
9095
|
symbolOfElement.set(el, null);
|
|
8862
9096
|
const own = json2(el.attrs["data-vector-symbol"]);
|
|
8863
|
-
let id = typeof _optionalChain([own, 'optionalAccess',
|
|
9097
|
+
let id = typeof _optionalChain([own, 'optionalAccess', _260 => _260.id]) === "string" && own.id ? own.id : _nullishCoalesce(el.attrs.id, () => ( createId()));
|
|
8864
9098
|
while (usedSymbolIds.has(id)) id = `${id}-${usedSymbolIds.size}`;
|
|
8865
9099
|
usedSymbolIds.add(id);
|
|
8866
9100
|
const style = readStyle(el, rootStyle);
|
|
8867
9101
|
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',
|
|
9102
|
+
symbols.push({ id, name: typeof _optionalChain([own, 'optionalAccess', _261 => _261.name]) === "string" && own.name ? own.name : _nullishCoalesce(el.attrs.id, () => ( "Symbol")), nodes: nodes2 });
|
|
8869
9103
|
symbolOfElement.set(el, id);
|
|
8870
9104
|
return id;
|
|
8871
9105
|
};
|
|
@@ -8877,13 +9111,13 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8877
9111
|
if (!symbolId) return null;
|
|
8878
9112
|
const own = json2(el.attrs["data-vector-instance"]);
|
|
8879
9113
|
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',
|
|
9114
|
+
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
9115
|
return isIdentityMatrix(place2) ? node : { ...node, transform: place2 };
|
|
8882
9116
|
};
|
|
8883
9117
|
const ownInstance = (g, m, meta) => {
|
|
8884
9118
|
const raw = json2(g.attrs["data-vector-instance"]);
|
|
8885
9119
|
if (!raw || typeof raw.symbolId !== "string") return null;
|
|
8886
|
-
const sym2 = [...byId.values()].find((e) => e.name === "symbol" && _optionalChain([json2, 'call',
|
|
9120
|
+
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
9121
|
const symbolId = sym2 ? symbolFor(sym2) : raw.symbolId;
|
|
8888
9122
|
if (!symbolId) return null;
|
|
8889
9123
|
const t = Array.isArray(raw.transform) && raw.transform.length === 6 && raw.transform.every(Number.isFinite) ? raw.transform : IDENTITY_MATRIX;
|
|
@@ -8891,7 +9125,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8891
9125
|
const drawn = g.children.find((c) => c.name === "g");
|
|
8892
9126
|
const effects = sanitizeVectorEffects(raw.effects);
|
|
8893
9127
|
const node = {
|
|
8894
|
-
id: _nullishCoalesce(_optionalChain([drawn, 'optionalAccess',
|
|
9128
|
+
id: _nullishCoalesce(_optionalChain([drawn, 'optionalAccess', _266 => _266.attrs, 'access', _267 => _267.id]), () => ( idFor(g))),
|
|
8895
9129
|
type: "instance",
|
|
8896
9130
|
...meta,
|
|
8897
9131
|
symbolId,
|
|
@@ -8948,12 +9182,12 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8948
9182
|
const masked = (el, nodes2, m) => {
|
|
8949
9183
|
let out = nodes2;
|
|
8950
9184
|
const clipEl = rawMasks.get(_nullishCoalesce(urlId(attrOrStyle(el, "clip-path")), () => ( "")));
|
|
8951
|
-
if (_optionalChain([clipEl, 'optionalAccess',
|
|
9185
|
+
if (_optionalChain([clipEl, 'optionalAccess', _268 => _268.name]) === "clipPath") {
|
|
8952
9186
|
const source = maskNode(clipEl, m, out, clipEl.attrs.clipPathUnits);
|
|
8953
9187
|
if (source) out = [{ id: idFor({ name: "g", attrs: {}, children: [] }), type: "group", name: "Clip Group", mask: { type: "clip" }, children: [source, ...out] }];
|
|
8954
9188
|
}
|
|
8955
9189
|
const maskEl = rawMasks.get(_nullishCoalesce(urlId(attrOrStyle(el, "mask")), () => ( "")));
|
|
8956
|
-
if (_optionalChain([maskEl, 'optionalAccess',
|
|
9190
|
+
if (_optionalChain([maskEl, 'optionalAccess', _269 => _269.name]) === "mask") {
|
|
8957
9191
|
const source = maskNode(maskEl, m, out, maskEl.attrs.maskContentUnits);
|
|
8958
9192
|
const type = attrOrStyle(maskEl, "mask-type") === "alpha" ? "alpha" : "luminance";
|
|
8959
9193
|
if (source) out = [{ id: idFor({ name: "g", attrs: {}, children: [] }), type: "group", name: "Opacity Mask", mask: { type }, children: [source, ...out] }];
|
|
@@ -8975,19 +9209,19 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8975
9209
|
let sourceEl = part("mask-source");
|
|
8976
9210
|
if (!sourceEl) {
|
|
8977
9211
|
const el = rawMasks.get(_nullishCoalesce(urlId(maskedEl.attrs.mask), () => ( "")));
|
|
8978
|
-
const invert2 = _optionalChain([el, 'optionalAccess',
|
|
9212
|
+
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
9213
|
sourceEl = _nullishCoalesce(invert2, () => ( el));
|
|
8980
9214
|
}
|
|
8981
9215
|
const source = sourceEl ? visit2(sourceEl, style, m)[0] : void 0;
|
|
8982
9216
|
let contents = visit2(maskedEl, style, m);
|
|
8983
9217
|
let effects;
|
|
8984
9218
|
const wrapper = contents.length === 1 && contents[0].type === "group" && contents[0].id === `${id}~content` ? contents[0] : null;
|
|
8985
|
-
if (_optionalChain([wrapper, 'optionalAccess',
|
|
9219
|
+
if (_optionalChain([wrapper, 'optionalAccess', _273 => _273.type]) === "group") {
|
|
8986
9220
|
effects = _nullishCoalesce(wrapper.effects, () => ( void 0));
|
|
8987
9221
|
contents = wrapper.children;
|
|
8988
9222
|
}
|
|
8989
9223
|
if (!source) return contents.length ? { id, type: "group", ...meta, children: contents } : null;
|
|
8990
|
-
return { id, type: "group", ...meta, mask, ..._optionalChain([effects, 'optionalAccess',
|
|
9224
|
+
return { id, type: "group", ...meta, mask, ..._optionalChain([effects, 'optionalAccess', _274 => _274.length]) ? { effects } : {}, children: [source, ...contents] };
|
|
8991
9225
|
};
|
|
8992
9226
|
const frameGroup = (g, style, m, meta) => {
|
|
8993
9227
|
const raw = parseJson(g.attrs["data-vector-frame"]);
|
|
@@ -8999,7 +9233,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8999
9233
|
const { rigid, residual } = decomposeRigid(m);
|
|
9000
9234
|
const r = _chunkBJTCSLF6cjs.bezierPathBounds.call(void 0, _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, subpathsToBezier(vectorFrameRectPath(frame)), residual));
|
|
9001
9235
|
const back = invertMatrix(rigid);
|
|
9002
|
-
const effects = sanitizeVectorEffects(_optionalChain([raw, 'optionalAccess',
|
|
9236
|
+
const effects = sanitizeVectorEffects(_optionalChain([raw, 'optionalAccess', _275 => _275.effects]));
|
|
9003
9237
|
return {
|
|
9004
9238
|
id,
|
|
9005
9239
|
type: "group",
|
|
@@ -9033,6 +9267,8 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9033
9267
|
if (resizing) meta.resizing = resizing;
|
|
9034
9268
|
const connector = child.attrs["data-vector-connector"] !== void 0 ? sanitizeVectorConnector(parseJson(child.attrs["data-vector-connector"])) : null;
|
|
9035
9269
|
if (connector) meta.connector = connector;
|
|
9270
|
+
const lens = child.attrs["data-vector-lens"] !== void 0 ? sanitizeVectorLens(parseJson(child.attrs["data-vector-lens"])) : null;
|
|
9271
|
+
if (lens) meta.lens = lens;
|
|
9036
9272
|
if (child.name === "g" && child.attrs["data-vector-frame"] !== void 0) {
|
|
9037
9273
|
const node2 = frameGroup(child, s, m, meta);
|
|
9038
9274
|
if (node2) out.push(node2);
|
|
@@ -9463,13 +9699,13 @@ function hitTestVectorNode(node, p, tolerance = 0, parent = IDENTITY_MATRIX, opt
|
|
|
9463
9699
|
}
|
|
9464
9700
|
if (isVectorMaskGroup(node)) {
|
|
9465
9701
|
const m = multiplyMatrices(nodeMatrix(node), parent);
|
|
9466
|
-
const entered = !!_optionalChain([options, 'access',
|
|
9702
|
+
const entered = !!_optionalChain([options, 'access', _276 => _276.entered, 'optionalAccess', _277 => _277.has, 'call', _278 => _278(node.id)]);
|
|
9467
9703
|
if (!entered && isVectorMaskActive(node) && !vectorMaskContains(node, applyMatrix(invertMatrix(m), p), tolerance)) return false;
|
|
9468
9704
|
const shown = !entered && hasOwnVectorAppearance(node) ? expandVectorAppearance(node).children : node.children;
|
|
9469
9705
|
for (let i = shown.length - 1; i >= 1; i--) if (hitTestVectorNode(shown[i], p, tolerance, m, options)) return true;
|
|
9470
9706
|
return entered && hitTestVectorMaskSource(node, p, tolerance, m, options);
|
|
9471
9707
|
}
|
|
9472
|
-
if (!(node.type === "group" && (!hasOwnVectorAppearance(node) || _optionalChain([options, 'access',
|
|
9708
|
+
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
9709
|
if (node.type === "group") {
|
|
9474
9710
|
const m = multiplyMatrices(nodeMatrix(node), parent);
|
|
9475
9711
|
return node.children.some((c) => hitTestVectorNode(c, p, tolerance, m, options));
|
|
@@ -9481,7 +9717,7 @@ function hitTestVectorNode(node, p, tolerance = 0, parent = IDENTITY_MATRIX, opt
|
|
|
9481
9717
|
function hitTestVectorMaskSource(group, p, tolerance, m, options) {
|
|
9482
9718
|
const source = group.children[0];
|
|
9483
9719
|
if (source.visible === false) return false;
|
|
9484
|
-
if (_optionalChain([group, 'access',
|
|
9720
|
+
if (_optionalChain([group, 'access', _282 => _282.mask, 'optionalAccess', _283 => _283.type]) !== "clip") return hitTestVectorNode(source, p, tolerance, m, options);
|
|
9485
9721
|
const paths = collectPathNodes(source).filter((n) => n.visible !== false);
|
|
9486
9722
|
const pt2 = [p.x, p.y];
|
|
9487
9723
|
return paths.some((n) => {
|
|
@@ -9530,24 +9766,24 @@ function mapAnchor(a, m) {
|
|
|
9530
9766
|
}
|
|
9531
9767
|
function bakeIntoGeometry(node, m) {
|
|
9532
9768
|
if (isIdentityMatrix(m)) return node;
|
|
9533
|
-
if (_optionalChain([node, 'access',
|
|
9769
|
+
if (_optionalChain([node, 'access', _284 => _284.effects, 'optionalAccess', _285 => _285.length])) node = { ...node, effects: transformVectorEffects(node.effects, m, node) };
|
|
9534
9770
|
if (isVectorFrame(node)) return bakeFrame(node, m);
|
|
9535
9771
|
if (node.type === "group") {
|
|
9536
9772
|
const group = node;
|
|
9537
9773
|
const children = group.children.map((c) => transformVectorNode(c, m));
|
|
9538
9774
|
const sym2 = group.symmetry ? { symmetry: transformVectorSymmetry(group.symmetry, m) } : {};
|
|
9539
|
-
const spine = _optionalChain([group, 'access',
|
|
9775
|
+
const spine = _optionalChain([group, 'access', _286 => _286.blend, 'optionalAccess', _287 => _287.spine]);
|
|
9540
9776
|
if (!spine) return { ...group, ...sym2, children };
|
|
9541
9777
|
const moved = { closed: spine.closed, anchors: spine.anchors.map((a) => mapAnchor(a, m)) };
|
|
9542
9778
|
return { ...group, children, blend: { ...group.blend, spine: moved } };
|
|
9543
9779
|
}
|
|
9544
9780
|
const path = node.type === "text" ? bakeVectorTextGeometry(node, m) : node;
|
|
9545
9781
|
const flips = m[0] * m[3] - m[1] * m[2] < 0;
|
|
9546
|
-
const mirrored = flips && _optionalChain([path, 'access',
|
|
9782
|
+
const mirrored = flips && _optionalChain([path, 'access', _288 => _288.strokeWidthProfile, 'optionalAccess', _289 => _289.length]);
|
|
9547
9783
|
const layer = (l) => ({
|
|
9548
9784
|
...l,
|
|
9549
9785
|
...isVectorGradient(l.paint) || isVectorShadedPaint(l.paint) ? { paint: transformVectorPaint(l.paint, m) } : {},
|
|
9550
|
-
...flips && _optionalChain([l, 'access',
|
|
9786
|
+
...flips && _optionalChain([l, 'access', _290 => _290.strokeWidthProfile, 'optionalAccess', _291 => _291.length]) ? { strokeWidthProfile: mirrorWidthProfile(l.strokeWidthProfile) } : {}
|
|
9551
9787
|
});
|
|
9552
9788
|
return {
|
|
9553
9789
|
...path,
|
|
@@ -9782,7 +10018,7 @@ function roundSubpaths(subpaths, precision = 3) {
|
|
|
9782
10018
|
|
|
9783
10019
|
// src/vector/symmetry.ts
|
|
9784
10020
|
function isVectorSymmetryGroup(node) {
|
|
9785
|
-
return _optionalChain([node, 'optionalAccess',
|
|
10021
|
+
return _optionalChain([node, 'optionalAccess', _292 => _292.type]) === "group" && !!node.symmetry && !node.blend && !node.liveBoolean && !node.mask && !node.frame;
|
|
9786
10022
|
}
|
|
9787
10023
|
var rad = (deg) => deg * Math.PI / 180;
|
|
9788
10024
|
var exact = (v2) => Math.abs(v2) < 1e-12 ? 0 : v2;
|
|
@@ -9811,14 +10047,14 @@ function renamed(node, k) {
|
|
|
9811
10047
|
if (node.type === "group") return { ...node, id, children: node.children.map((c) => renamed(c, k)) };
|
|
9812
10048
|
return { ...node, id };
|
|
9813
10049
|
}
|
|
9814
|
-
var
|
|
10050
|
+
var drawnCache3 = /* @__PURE__ */ new WeakMap();
|
|
9815
10051
|
function vectorSymmetryDrawn(node) {
|
|
9816
|
-
let hit =
|
|
10052
|
+
let hit = drawnCache3.get(node);
|
|
9817
10053
|
if (hit) return hit;
|
|
9818
10054
|
const { symmetry, ...group } = node;
|
|
9819
10055
|
const copies = vectorSymmetryMatrices(symmetry).flatMap((m, k) => node.children.map((c) => ({ ...renamed(transformVectorNode(c, m), k + 1), locked: true })));
|
|
9820
10056
|
hit = { ...group, children: [...node.children, ...copies] };
|
|
9821
|
-
|
|
10057
|
+
drawnCache3.set(node, hit);
|
|
9822
10058
|
return hit;
|
|
9823
10059
|
}
|
|
9824
10060
|
function vectorSymmetryAxes(s, box) {
|
|
@@ -10334,5 +10570,16 @@ function transformVectorSymmetry(s, m) {
|
|
|
10334
10570
|
|
|
10335
10571
|
|
|
10336
10572
|
|
|
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
|
-
|
|
10573
|
+
|
|
10574
|
+
|
|
10575
|
+
|
|
10576
|
+
|
|
10577
|
+
|
|
10578
|
+
|
|
10579
|
+
|
|
10580
|
+
|
|
10581
|
+
|
|
10582
|
+
|
|
10583
|
+
|
|
10584
|
+
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_PERSPECTIVE_PLANES = VECTOR_PERSPECTIVE_PLANES; 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;
|
|
10585
|
+
//# sourceMappingURL=chunk-F7GGEAO2.cjs.map
|