@pixerate/editor 0.129.0 → 0.132.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animation-editor/index.cjs +55 -55
- package/dist/animation-editor/index.d.cts +5 -5
- package/dist/animation-editor/index.d.ts +5 -5
- package/dist/animation-editor/index.js +2 -2
- package/dist/{bezier-DP4NnJp3.d.ts → bezier-0IHDCvv_.d.ts} +1 -1
- package/dist/{bezier-CvgQiYRg.d.cts → bezier-oCBfrGDG.d.cts} +1 -1
- package/dist/canvas/index.d.cts +7 -7
- package/dist/canvas/index.d.ts +7 -7
- package/dist/{chunk-XLUYXUBD.cjs → chunk-55UEZIU4.cjs} +119 -90
- package/dist/chunk-55UEZIU4.cjs.map +1 -0
- package/dist/{chunk-A6KHMKI4.js → chunk-ECVI5QRE.js} +2 -2
- package/dist/{chunk-F7Q2NE2Y.js → chunk-G5FX56KX.js} +39 -10
- package/dist/{chunk-F7Q2NE2Y.js.map → chunk-G5FX56KX.js.map} +1 -1
- package/dist/{chunk-ROZFX4QI.js → chunk-IEYXYMRQ.js} +556 -13
- package/dist/chunk-IEYXYMRQ.js.map +1 -0
- package/dist/{chunk-BEGEWQHD.cjs → chunk-OYPJGGF3.cjs} +36 -36
- package/dist/{chunk-BEGEWQHD.cjs.map → chunk-OYPJGGF3.cjs.map} +1 -1
- package/dist/{chunk-ORE334I6.cjs → chunk-YYJKIESX.cjs} +619 -76
- package/dist/chunk-YYJKIESX.cjs.map +1 -0
- package/dist/effects/index.d.cts +4 -4
- package/dist/effects/index.d.ts +4 -4
- package/dist/{export-DotEEyXj.d.ts → export-ByJvAvR7.d.ts} +26 -4
- package/dist/{export-Cbr9IqpJ.d.cts → export-CfAogLEr.d.cts} +1 -1
- package/dist/{export-ClPKUB-v.d.ts → export-Crl82sbE.d.ts} +1 -1
- package/dist/{export-DRzNhrdx.d.cts → export-D-gkjBkB.d.cts} +26 -4
- package/dist/{helpers-CPWcK504.d.ts → helpers-BCd2-PAR.d.ts} +67 -3
- package/dist/{helpers-C5aAd44p.d.cts → helpers-CoIeXQnW.d.cts} +67 -3
- package/dist/image-editor/index.cjs +775 -723
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +8 -8
- package/dist/image-editor/index.d.ts +8 -8
- package/dist/image-editor/index.js +59 -7
- package/dist/image-editor/index.js.map +1 -1
- package/dist/index.cjs +11 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/dist/{opentype-BOewaGQx.d.cts → opentype-BDahNRTe.d.cts} +2 -2
- package/dist/{opentype-sQrF3Ry1.d.ts → opentype-BQFEvy-t.d.ts} +2 -2
- package/dist/paint-editor/index.cjs +7 -7
- package/dist/paint-editor/index.d.cts +5 -5
- package/dist/paint-editor/index.d.ts +5 -5
- package/dist/paint-editor/index.js +2 -2
- package/dist/{pathfinder-CnkW7zLI.d.cts → pathfinder-01ZgAwqV.d.cts} +1 -1
- package/dist/{pathfinder-BwJx0_zM.d.ts → pathfinder-DaVdT8jq.d.ts} +1 -1
- package/dist/{pool-CTrtciaN.d.ts → pool-D2A3WTt9.d.ts} +1 -1
- package/dist/{pool-C7GtrL34.d.cts → pool-D6a45MoE.d.cts} +1 -1
- package/dist/{svg-C4LlFnEw.d.cts → svg-CcDz7Zq2.d.cts} +2 -2
- package/dist/{svg-CUzZa0EO.d.ts → svg-DELNVerw.d.ts} +2 -2
- package/dist/{tools-BpCmUNxb.d.cts → tools-BFvkFnRj.d.cts} +1 -1
- package/dist/{tools-AugT22z3.d.ts → tools-D7ws-OKL.d.ts} +1 -1
- package/dist/vector/index.cjs +1149 -1017
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.d.cts +106 -10
- package/dist/vector/index.d.ts +106 -10
- package/dist/vector/index.js +142 -10
- 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-CIsO617e.d.ts → warp-2N9wkOkL.d.ts} +2 -2
- package/dist/{warp-D62N_5VK.d.cts → warp-DErXW5rz.d.cts} +2 -2
- package/package.json +2 -2
- package/skills/pixerate-image-editor/SKILL.md +6 -2
- package/skills/pixerate-image-editor/references/color-management.md +1 -1
- package/skills/pixerate-image-editor/references/photoshop-files.md +2 -2
- package/skills/pixerate-image-editor/references/retouching.md +9 -1
- package/skills/pixerate-vector/SKILL.md +18 -1
- package/skills/pixerate-vector/references/commands.md +20 -0
- package/dist/chunk-ORE334I6.cjs.map +0 -1
- package/dist/chunk-ROZFX4QI.js.map +0 -1
- package/dist/chunk-XLUYXUBD.cjs.map +0 -1
- /package/dist/{chunk-A6KHMKI4.js.map → chunk-ECVI5QRE.js.map} +0 -0
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
+
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
var _chunkBJTCSLF6cjs = require('./chunk-BJTCSLF6.cjs');
|
|
@@ -73,6 +74,7 @@ var VECTOR_BLEND_MODES = [
|
|
|
73
74
|
];
|
|
74
75
|
var VECTOR_HORIZONTAL_RESIZING = ["left", "right", "leftRight", "center", "scale"];
|
|
75
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"];
|
|
76
78
|
var VECTOR_CONNECTOR_SIDES = ["auto", "top", "right", "bottom", "left", "center"];
|
|
77
79
|
var VECTOR_CONNECTOR_ROUTES = ["straight", "elbow", "curved"];
|
|
78
80
|
var VECTOR_BLEND_SPACINGS = ["steps", "distance", "smoothColor"];
|
|
@@ -124,7 +126,7 @@ var VECTOR_TOOLS = [
|
|
|
124
126
|
];
|
|
125
127
|
var VECTOR_TRANSFORM_HANDLES = ["nw", "n", "ne", "e", "se", "s", "sw", "w", "rotate"];
|
|
126
128
|
var VECTOR_PATHFINDER_OPERATIONS = ["divide", "trim", "merge", "crop", "outline", "minusBack"];
|
|
127
|
-
var VECTOR_EFFECT_TYPES = ["trim", "roundCorners", "puckerBloat", "twist", "zigzag", "wiggle", "offset", "merge", "repeater", "envelope", "contour", "blockShadow"];
|
|
129
|
+
var VECTOR_EFFECT_TYPES = ["trim", "roundCorners", "puckerBloat", "twist", "zigzag", "wiggle", "offset", "merge", "repeater", "envelope", "contour", "blockShadow", "extrude", "bevel"];
|
|
128
130
|
var VECTOR_MERGE_MODES = ["merge", "add", "subtract", "intersect", "exclude"];
|
|
129
131
|
var VECTOR_FILTER_TYPES = ["dropShadow", "innerShadow", "outerGlow", "innerGlow", "layerBlur", "feather"];
|
|
130
132
|
|
|
@@ -5550,6 +5552,458 @@ function vectorInstanceGroup(node, bake) {
|
|
|
5550
5552
|
}
|
|
5551
5553
|
var composeVectorMatrices = (a, b) => multiplyMatrices(a, b);
|
|
5552
5554
|
|
|
5555
|
+
// src/vector/extrude.ts
|
|
5556
|
+
function vectorPaintSolid(paint) {
|
|
5557
|
+
if (paint == null || paint === "none") return null;
|
|
5558
|
+
if (typeof paint === "string") return paint;
|
|
5559
|
+
const stops = paint.stops;
|
|
5560
|
+
if (_optionalChain([stops, 'optionalAccess', _143 => _143.length])) return stops.reduce((a, b) => Math.abs(b.offset - 0.5) < Math.abs(a.offset - 0.5) ? b : a).color;
|
|
5561
|
+
const colors = paint.colors;
|
|
5562
|
+
if (_optionalChain([colors, 'optionalAccess', _144 => _144.length])) return colors[0];
|
|
5563
|
+
const points = paint.points;
|
|
5564
|
+
return _nullishCoalesce(_optionalChain([points, 'optionalAccess', _145 => _145.find, 'call', _146 => _146((p) => typeof p.color === "string"), 'optionalAccess', _147 => _147.color]), () => ( null));
|
|
5565
|
+
}
|
|
5566
|
+
function shadeVectorColor(color2, amount) {
|
|
5567
|
+
const c = parseVectorColor(color2);
|
|
5568
|
+
if (!c) return color2;
|
|
5569
|
+
const a = Math.min(1, Math.max(-1, amount));
|
|
5570
|
+
const target = a >= 0 ? 1 : 0;
|
|
5571
|
+
const h = (v2) => Math.round(Math.min(1, Math.max(0, v2)) * 255).toString(16).padStart(2, "0");
|
|
5572
|
+
const m = [0, 1, 2].map((k) => c[k] + (target - c[k]) * Math.abs(a));
|
|
5573
|
+
return `#${h(m[0])}${h(m[1])}${h(m[2])}`;
|
|
5574
|
+
}
|
|
5575
|
+
function vectorPathRings(path, tolerance = 0.5) {
|
|
5576
|
+
const rings = [];
|
|
5577
|
+
for (const contour of _chunkBJTCSLF6cjs.pathToContours.call(void 0, path)) {
|
|
5578
|
+
const ring = _chunkBJTCSLF6cjs.flattenChain.call(void 0, _chunkBJTCSLF6cjs.closeContour.call(void 0, contour, true), Math.max(1e-3, tolerance));
|
|
5579
|
+
if (ring.length >= 2) rings.push(ring);
|
|
5580
|
+
}
|
|
5581
|
+
return rings;
|
|
5582
|
+
}
|
|
5583
|
+
function vectorExtrudeFaces(path, params) {
|
|
5584
|
+
const box = _chunkBJTCSLF6cjs.bezierPathBounds.call(void 0, path);
|
|
5585
|
+
if (!box || !path.length) return [];
|
|
5586
|
+
const perspective = params.mode === "perspective";
|
|
5587
|
+
const rad2 = params.angle * Math.PI / 180;
|
|
5588
|
+
const d = [Math.cos(rad2) * Math.max(0, params.depth), Math.sin(rad2) * Math.max(0, params.depth)];
|
|
5589
|
+
const vp = [(box.minX + box.maxX) / 2 + params.vanishingPoint.x, (box.minY + box.maxY) / 2 + params.vanishingPoint.y];
|
|
5590
|
+
const pull = Math.min(1, Math.max(0, params.toward / 100));
|
|
5591
|
+
const back = (p) => perspective ? [p[0] + (vp[0] - p[0]) * pull, p[1] + (vp[1] - p[1]) * pull] : [p[0] + d[0], p[1] + d[1]];
|
|
5592
|
+
if (perspective ? pull <= 0 : Math.hypot(d[0], d[1]) < 1e-9) return [];
|
|
5593
|
+
const lr = params.lightAngle * Math.PI / 180;
|
|
5594
|
+
const light = [Math.cos(lr), Math.sin(lr)];
|
|
5595
|
+
const strength = Math.min(1, Math.max(0, params.shading / 100));
|
|
5596
|
+
const u = perspective ? [0, 0] : [d[0] / Math.hypot(d[0], d[1]), d[1] / Math.hypot(d[0], d[1])];
|
|
5597
|
+
const centre = [(box.minX + box.maxX) / 2, (box.minY + box.maxY) / 2];
|
|
5598
|
+
const aim = Math.atan2(centre[1] - vp[1], centre[0] - vp[0]);
|
|
5599
|
+
const across = (p) => {
|
|
5600
|
+
if (!perspective) return -p[0] * u[1] + p[1] * u[0];
|
|
5601
|
+
let a = Math.atan2(p[1] - vp[1], p[0] - vp[0]) - aim;
|
|
5602
|
+
while (a > Math.PI) a -= 2 * Math.PI;
|
|
5603
|
+
while (a <= -Math.PI) a += 2 * Math.PI;
|
|
5604
|
+
return a;
|
|
5605
|
+
};
|
|
5606
|
+
const towardBack = (p, q, l) => {
|
|
5607
|
+
const lp = across(p);
|
|
5608
|
+
const lq = across(q);
|
|
5609
|
+
const t = Math.abs(lq - lp) < 1e-12 ? 0.5 : Math.min(1, Math.max(0, (l - lp) / (lq - lp)));
|
|
5610
|
+
const x = [p[0] + (q[0] - p[0]) * t, p[1] + (q[1] - p[1]) * t];
|
|
5611
|
+
return perspective ? -Math.hypot(vp[0] - x[0], vp[1] - x[1]) : x[0] * u[0] + x[1] * u[1];
|
|
5612
|
+
};
|
|
5613
|
+
const faces = [];
|
|
5614
|
+
for (const ring of vectorPathRings(path, 0.25)) {
|
|
5615
|
+
for (let i = 0; i < ring.length; i++) {
|
|
5616
|
+
const p = ring[i];
|
|
5617
|
+
const q = ring[(i + 1) % ring.length];
|
|
5618
|
+
const ex = q[0] - p[0];
|
|
5619
|
+
const ey = q[1] - p[1];
|
|
5620
|
+
const len2 = Math.hypot(ex, ey);
|
|
5621
|
+
if (len2 < 1e-9) continue;
|
|
5622
|
+
const pb = back(p);
|
|
5623
|
+
const qb = back(q);
|
|
5624
|
+
const mid = [(p[0] + q[0]) / 2, (p[1] + q[1]) / 2];
|
|
5625
|
+
const away = perspective ? [vp[0] - mid[0], vp[1] - mid[1]] : d;
|
|
5626
|
+
let n2 = [ey / len2, -ex / len2];
|
|
5627
|
+
if (n2[0] * away[0] + n2[1] * away[1] < 0) n2 = [-n2[0], -n2[1]];
|
|
5628
|
+
const shade = (n2[0] * light[0] + n2[1] * light[1]) * strength;
|
|
5629
|
+
const lp = across(p);
|
|
5630
|
+
const lq = across(q);
|
|
5631
|
+
faces.push({
|
|
5632
|
+
p,
|
|
5633
|
+
q,
|
|
5634
|
+
lo: Math.min(lp, lq),
|
|
5635
|
+
hi: Math.max(lp, lq),
|
|
5636
|
+
key: towardBack(p, q, (lp + lq) / 2),
|
|
5637
|
+
face: {
|
|
5638
|
+
shade,
|
|
5639
|
+
path: [{ type: "M", x: p[0], y: p[1] }, { type: "L", x: q[0], y: q[1] }, { type: "L", x: qb[0], y: qb[1] }, { type: "L", x: pb[0], y: pb[1] }, { type: "Z" }]
|
|
5640
|
+
}
|
|
5641
|
+
});
|
|
5642
|
+
}
|
|
5643
|
+
}
|
|
5644
|
+
faces.sort((a, b) => a.key - b.key);
|
|
5645
|
+
const n = faces.length;
|
|
5646
|
+
const after = faces.map(() => []);
|
|
5647
|
+
const before = new Array(n).fill(0);
|
|
5648
|
+
const eps = 1e-9;
|
|
5649
|
+
for (let i = 0; i < n; i++) {
|
|
5650
|
+
for (let j = i + 1; j < n; j++) {
|
|
5651
|
+
const lo = Math.max(faces[i].lo, faces[j].lo);
|
|
5652
|
+
const hi = Math.min(faces[i].hi, faces[j].hi);
|
|
5653
|
+
if (hi - lo <= eps * Math.max(1, Math.abs(hi))) continue;
|
|
5654
|
+
const l = (lo + hi) / 2;
|
|
5655
|
+
const di = towardBack(faces[i].p, faces[i].q, l);
|
|
5656
|
+
const dj = towardBack(faces[j].p, faces[j].q, l);
|
|
5657
|
+
if (Math.abs(di - dj) < 1e-9) continue;
|
|
5658
|
+
const [back0, front] = di < dj ? [i, j] : [j, i];
|
|
5659
|
+
after[back0].push(front);
|
|
5660
|
+
before[front]++;
|
|
5661
|
+
}
|
|
5662
|
+
}
|
|
5663
|
+
const order = [];
|
|
5664
|
+
const done = new Array(n).fill(false);
|
|
5665
|
+
let next = 0;
|
|
5666
|
+
while (order.length < n) {
|
|
5667
|
+
let pick = -1;
|
|
5668
|
+
for (let i = next; i < n; i++) {
|
|
5669
|
+
if (!done[i] && before[i] === 0) {
|
|
5670
|
+
pick = i;
|
|
5671
|
+
break;
|
|
5672
|
+
}
|
|
5673
|
+
}
|
|
5674
|
+
if (pick < 0) pick = done.indexOf(false);
|
|
5675
|
+
done[pick] = true;
|
|
5676
|
+
order.push(pick);
|
|
5677
|
+
for (const k of after[pick]) before[k]--;
|
|
5678
|
+
while (next < n && done[next]) next++;
|
|
5679
|
+
}
|
|
5680
|
+
return order.map((i) => faces[i].face);
|
|
5681
|
+
}
|
|
5682
|
+
|
|
5683
|
+
// src/vector/bevel.ts
|
|
5684
|
+
var MITER_LIMIT = 4;
|
|
5685
|
+
function crossing2(a, b, c, d) {
|
|
5686
|
+
const rx = b[0] - a[0];
|
|
5687
|
+
const ry = b[1] - a[1];
|
|
5688
|
+
const sx = d[0] - c[0];
|
|
5689
|
+
const sy = d[1] - c[1];
|
|
5690
|
+
const den = rx * sy - ry * sx;
|
|
5691
|
+
if (Math.abs(den) < 1e-12) return null;
|
|
5692
|
+
const t = ((c[0] - a[0]) * sy - (c[1] - a[1]) * sx) / den;
|
|
5693
|
+
const u = ((c[0] - a[0]) * ry - (c[1] - a[1]) * rx) / den;
|
|
5694
|
+
return t > 1e-9 && t <= 1 && u >= 0 && u <= 1 ? t : null;
|
|
5695
|
+
}
|
|
5696
|
+
function vectorBevelFaces(path, params, fillRule = "nonzero") {
|
|
5697
|
+
const width = Math.max(0, params.width);
|
|
5698
|
+
if (!path.length || width <= 0) return [];
|
|
5699
|
+
const rings = vectorPathRings(path, 0.25).filter((r) => r.length >= 3);
|
|
5700
|
+
const lr = params.lightAngle * Math.PI / 180;
|
|
5701
|
+
const light = [Math.cos(lr), Math.sin(lr)];
|
|
5702
|
+
const strength = Math.min(1, Math.max(0, params.shading / 100));
|
|
5703
|
+
const faces = [];
|
|
5704
|
+
for (const ring of rings) {
|
|
5705
|
+
const n = ring.length;
|
|
5706
|
+
let best = 0;
|
|
5707
|
+
let bestLen = -1;
|
|
5708
|
+
for (let i = 0; i < n; i++) {
|
|
5709
|
+
const q = ring[(i + 1) % n];
|
|
5710
|
+
const l = Math.hypot(q[0] - ring[i][0], q[1] - ring[i][1]);
|
|
5711
|
+
if (l > bestLen) [best, bestLen] = [i, l];
|
|
5712
|
+
}
|
|
5713
|
+
if (bestLen < 1e-9) continue;
|
|
5714
|
+
const bp = ring[best];
|
|
5715
|
+
const bq = ring[(best + 1) % n];
|
|
5716
|
+
const left2 = [-(bq[1] - bp[1]) / bestLen, (bq[0] - bp[0]) / bestLen];
|
|
5717
|
+
const probe = Math.min(bestLen / 4, 1e-3 * Math.max(1, bestLen));
|
|
5718
|
+
const sign = _chunkBJTCSLF6cjs.pointInRings.call(void 0, [(bp[0] + bq[0]) / 2 + left2[0] * probe, (bp[1] + bq[1]) / 2 + left2[1] * probe], rings, fillRule) ? 1 : -1;
|
|
5719
|
+
const normals = ring.map((p, i) => {
|
|
5720
|
+
const q = ring[(i + 1) % n];
|
|
5721
|
+
const l = Math.hypot(q[0] - p[0], q[1] - p[1]);
|
|
5722
|
+
return l < 1e-9 ? null : [-(q[1] - p[1]) / l * sign, (q[0] - p[0]) / l * sign];
|
|
5723
|
+
});
|
|
5724
|
+
const normalAt = (i, step) => {
|
|
5725
|
+
for (let k = 0; k < n; k++) {
|
|
5726
|
+
const v2 = normals[((i + step * k) % n + n) % n];
|
|
5727
|
+
if (v2) return v2;
|
|
5728
|
+
}
|
|
5729
|
+
return [0, 0];
|
|
5730
|
+
};
|
|
5731
|
+
const inset = ring.map((p, i) => {
|
|
5732
|
+
const a = normalAt(i - 1, -1);
|
|
5733
|
+
const b = normalAt(i, 1);
|
|
5734
|
+
let bx = a[0] + b[0];
|
|
5735
|
+
let by = a[1] + b[1];
|
|
5736
|
+
const bl = Math.hypot(bx, by);
|
|
5737
|
+
if (bl < 1e-9) [bx, by] = [b[0], b[1]];
|
|
5738
|
+
else [bx, by] = [bx / bl, by / bl];
|
|
5739
|
+
const cos = bx * b[0] + by * b[1];
|
|
5740
|
+
let len2 = width / Math.max(cos, 1 / MITER_LIMIT);
|
|
5741
|
+
const end = [p[0] + bx * len2, p[1] + by * len2];
|
|
5742
|
+
let t = 1;
|
|
5743
|
+
for (const other of rings) {
|
|
5744
|
+
const m = other.length;
|
|
5745
|
+
for (let j = 0; j < m; j++) {
|
|
5746
|
+
const c = other[j];
|
|
5747
|
+
const d = other[(j + 1) % m];
|
|
5748
|
+
if (c === p || d === p) continue;
|
|
5749
|
+
const hit = crossing2(p, end, c, d);
|
|
5750
|
+
if (hit !== null && hit < t) t = hit;
|
|
5751
|
+
}
|
|
5752
|
+
}
|
|
5753
|
+
if (t < 1) len2 *= t / 2;
|
|
5754
|
+
return [p[0] + bx * len2, p[1] + by * len2];
|
|
5755
|
+
});
|
|
5756
|
+
for (let i = 0; i < n; i++) {
|
|
5757
|
+
const nrm = normals[i];
|
|
5758
|
+
if (!nrm) continue;
|
|
5759
|
+
const j = (i + 1) % n;
|
|
5760
|
+
const shade = (-nrm[0] * light[0] - nrm[1] * light[1]) * strength;
|
|
5761
|
+
faces.push({
|
|
5762
|
+
shade,
|
|
5763
|
+
path: [
|
|
5764
|
+
{ type: "M", x: ring[i][0], y: ring[i][1] },
|
|
5765
|
+
{ type: "L", x: ring[j][0], y: ring[j][1] },
|
|
5766
|
+
{ type: "L", x: inset[j][0], y: inset[j][1] },
|
|
5767
|
+
{ type: "L", x: inset[i][0], y: inset[i][1] },
|
|
5768
|
+
{ type: "Z" }
|
|
5769
|
+
]
|
|
5770
|
+
});
|
|
5771
|
+
}
|
|
5772
|
+
}
|
|
5773
|
+
return faces;
|
|
5774
|
+
}
|
|
5775
|
+
|
|
5776
|
+
// src/vector/lens.ts
|
|
5777
|
+
function isVectorLens(node) {
|
|
5778
|
+
return !!node && node.type === "path" && !!node.lens && VECTOR_LENS_TYPES.includes(node.lens.type);
|
|
5779
|
+
}
|
|
5780
|
+
var VECTOR_LENS_LABELS = {
|
|
5781
|
+
transparency: "Transparency",
|
|
5782
|
+
magnify: "Magnify",
|
|
5783
|
+
fisheye: "Fish Eye",
|
|
5784
|
+
brighten: "Brighten",
|
|
5785
|
+
invert: "Invert",
|
|
5786
|
+
tintedGrayscale: "Tinted Grayscale",
|
|
5787
|
+
colorAdd: "Color Add",
|
|
5788
|
+
colorLimit: "Color Limit",
|
|
5789
|
+
heatMap: "Heat Map",
|
|
5790
|
+
wireframe: "Wireframe"
|
|
5791
|
+
};
|
|
5792
|
+
var VECTOR_LENS_SPECS = {
|
|
5793
|
+
transparency: { min: 0, max: 100, amount: 50, color: null, unit: "percent see-through" },
|
|
5794
|
+
magnify: { min: 1, max: 20, amount: 2, color: null, unit: "times" },
|
|
5795
|
+
fisheye: { min: -100, max: 100, amount: 50, color: null, unit: "percent, negative pinches" },
|
|
5796
|
+
brighten: { min: -100, max: 100, amount: 40, color: null, unit: "percent, negative darkens" },
|
|
5797
|
+
invert: { min: 0, max: 100, amount: 100, color: null, unit: "percent strength" },
|
|
5798
|
+
tintedGrayscale: { min: 0, max: 100, amount: 100, color: "#b45309", unit: "percent strength" },
|
|
5799
|
+
colorAdd: { min: 0, max: 100, amount: 50, color: "#ff0000", unit: "percent of the colour added" },
|
|
5800
|
+
colorLimit: { min: 0, max: 100, amount: 100, color: "#22c55e", unit: "percent strength" },
|
|
5801
|
+
heatMap: { min: 0, max: 100, amount: 0, color: null, unit: "percent the palette is turned" },
|
|
5802
|
+
wireframe: { min: 0, max: 100, amount: 100, color: "#0f172a", unit: "percent outline opacity" }
|
|
5803
|
+
};
|
|
5804
|
+
function sanitizeVectorLens(value) {
|
|
5805
|
+
if (!value || typeof value !== "object") return null;
|
|
5806
|
+
const r = value;
|
|
5807
|
+
if (typeof r.type !== "string" || !VECTOR_LENS_TYPES.includes(r.type)) return null;
|
|
5808
|
+
const type = r.type;
|
|
5809
|
+
const spec = VECTOR_LENS_SPECS[type];
|
|
5810
|
+
const amount = typeof r.amount === "number" && Number.isFinite(r.amount) ? Math.min(spec.max, Math.max(spec.min, r.amount)) : spec.amount;
|
|
5811
|
+
const out = { type, amount };
|
|
5812
|
+
if (spec.color !== null) out.color = typeof r.color === "string" && parseVectorColor(r.color) ? r.color : spec.color;
|
|
5813
|
+
return out;
|
|
5814
|
+
}
|
|
5815
|
+
var hex22 = (v2) => Math.round(Math.min(1, Math.max(0, v2)) * 255).toString(16).padStart(2, "0");
|
|
5816
|
+
var formatRgba = (c) => c[3] >= 1 ? `#${hex22(c[0])}${hex22(c[1])}${hex22(c[2])}` : `rgba(${Math.round(c[0] * 255)}, ${Math.round(c[1] * 255)}, ${Math.round(c[2] * 255)}, ${Math.round(c[3] * 1e3) / 1e3})`;
|
|
5817
|
+
var luma = (c) => 0.2126 * c[0] + 0.7152 * c[1] + 0.0722 * c[2];
|
|
5818
|
+
var mix = (a, b, t) => [a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t, a[2] + (b[2] - a[2]) * t, a[3]];
|
|
5819
|
+
var HEAT = [
|
|
5820
|
+
[0, "#1e1b4b"],
|
|
5821
|
+
[0.25, "#2563eb"],
|
|
5822
|
+
[0.5, "#22c55e"],
|
|
5823
|
+
[0.7, "#facc15"],
|
|
5824
|
+
[0.85, "#f97316"],
|
|
5825
|
+
[1, "#dc2626"]
|
|
5826
|
+
];
|
|
5827
|
+
var heatAt = (t) => {
|
|
5828
|
+
const u = (t % 1 + 1) % 1;
|
|
5829
|
+
for (let i = 1; i < HEAT.length; i++) {
|
|
5830
|
+
if (u <= HEAT[i][0]) {
|
|
5831
|
+
const a = parseVectorColor(HEAT[i - 1][1]);
|
|
5832
|
+
const b = parseVectorColor(HEAT[i][1]);
|
|
5833
|
+
const k = (u - HEAT[i - 1][0]) / (HEAT[i][0] - HEAT[i - 1][0]);
|
|
5834
|
+
return [0, 1, 2].map((c) => a[c] + (b[c] - a[c]) * k);
|
|
5835
|
+
}
|
|
5836
|
+
}
|
|
5837
|
+
return parseVectorColor(HEAT[HEAT.length - 1][1]).slice(0, 3);
|
|
5838
|
+
};
|
|
5839
|
+
function vectorLensColorMap(lens) {
|
|
5840
|
+
const tint = _nullishCoalesce(parseVectorColor(_nullishCoalesce(lens.color, () => ( "#000000"))), () => ( [0, 0, 0, 1]));
|
|
5841
|
+
const s = Math.min(1, Math.max(0, lens.amount / 100));
|
|
5842
|
+
switch (lens.type) {
|
|
5843
|
+
case "brighten": {
|
|
5844
|
+
const a = Math.min(1, Math.max(-1, lens.amount / 100));
|
|
5845
|
+
return (c) => a >= 0 ? mix(c, [1, 1, 1], a) : mix(c, [0, 0, 0], -a);
|
|
5846
|
+
}
|
|
5847
|
+
case "invert":
|
|
5848
|
+
return (c) => mix(c, [1 - c[0], 1 - c[1], 1 - c[2]], s);
|
|
5849
|
+
case "tintedGrayscale":
|
|
5850
|
+
return (c) => {
|
|
5851
|
+
const l = luma(c);
|
|
5852
|
+
const duo = l < 0.5 ? [tint[0] * 2 * l, tint[1] * 2 * l, tint[2] * 2 * l] : [0, 1, 2].map((k) => tint[k] + (1 - tint[k]) * (2 * l - 1));
|
|
5853
|
+
return mix(c, duo, s);
|
|
5854
|
+
};
|
|
5855
|
+
case "colorAdd":
|
|
5856
|
+
return (c) => [Math.min(1, c[0] + tint[0] * s), Math.min(1, c[1] + tint[1] * s), Math.min(1, c[2] + tint[2] * s), c[3]];
|
|
5857
|
+
case "colorLimit":
|
|
5858
|
+
return (c) => [c[0] * (1 - s + s * tint[0]), c[1] * (1 - s + s * tint[1]), c[2] * (1 - s + s * tint[2]), c[3]];
|
|
5859
|
+
case "heatMap":
|
|
5860
|
+
return (c) => [...heatAt(luma(c) + lens.amount / 100), c[3]];
|
|
5861
|
+
default:
|
|
5862
|
+
return null;
|
|
5863
|
+
}
|
|
5864
|
+
}
|
|
5865
|
+
function mapVectorPaintColors(paint, f) {
|
|
5866
|
+
const one = (color2) => {
|
|
5867
|
+
const c = parseVectorColor(color2);
|
|
5868
|
+
return c ? formatRgba(f(c)) : color2;
|
|
5869
|
+
};
|
|
5870
|
+
if (paint == null || paint === "none") return paint;
|
|
5871
|
+
if (typeof paint === "string") return one(paint);
|
|
5872
|
+
const p = paint;
|
|
5873
|
+
const out = { ...p };
|
|
5874
|
+
if (Array.isArray(p.stops)) out.stops = p.stops.map((s) => ({ ...s, color: one(s.color) }));
|
|
5875
|
+
if (Array.isArray(p.colors)) out.colors = p.colors.map(one);
|
|
5876
|
+
if (Array.isArray(p.points)) out.points = p.points.map((q) => typeof q.color === "string" ? { ...q, color: one(q.color) } : q);
|
|
5877
|
+
return out;
|
|
5878
|
+
}
|
|
5879
|
+
var drawnCache2 = /* @__PURE__ */ new WeakMap();
|
|
5880
|
+
var STYLE_OFF = { effects: void 0, transform: void 0, opacity: void 0, blendMode: void 0, filters: void 0, lens: void 0, lensView: void 0, connector: void 0 };
|
|
5881
|
+
function shapePath(shape, id, path, extra = {}) {
|
|
5882
|
+
const { id: _i, subpaths: _s, booleanOperation: _b, blendStep: _bs, locked: _l, visible: _v, ...style } = shape.source;
|
|
5883
|
+
return { ...style, ...STYLE_OFF, id, type: "path", subpaths: bezierToSubpaths(path), ...shape.opacity < 1 ? { opacity: shape.opacity } : {}, ...extra };
|
|
5884
|
+
}
|
|
5885
|
+
function vectorLensDrawn(node) {
|
|
5886
|
+
const hit = drawnCache2.get(node);
|
|
5887
|
+
if (hit) return hit;
|
|
5888
|
+
const { lens } = node;
|
|
5889
|
+
const own = subpathsToBezier(node.subpaths);
|
|
5890
|
+
const box = _chunkBJTCSLF6cjs.bezierPathBounds.call(void 0, own);
|
|
5891
|
+
const children = [];
|
|
5892
|
+
if (box && lens.type !== "transparency") {
|
|
5893
|
+
const c = { x: (box.minX + box.maxX) / 2, y: (box.minY + box.maxY) / 2 };
|
|
5894
|
+
const inv = node.transform && !isIdentityMatrix(node.transform) ? invertMatrix(node.transform) : null;
|
|
5895
|
+
const k = lens.type === "magnify" ? Math.max(1, lens.amount) : 1;
|
|
5896
|
+
const reach = { minX: c.x - (c.x - box.minX) / k, maxX: c.x + (box.maxX - c.x) / k, minY: c.y - (c.y - box.minY) / k, maxY: c.y + (box.maxY - c.y) / k };
|
|
5897
|
+
let map = null;
|
|
5898
|
+
if (lens.type === "magnify") {
|
|
5899
|
+
const m = [k, 0, 0, k, c.x * (1 - k), c.y * (1 - k)];
|
|
5900
|
+
map = (p) => _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, p, m);
|
|
5901
|
+
} else if (lens.type === "fisheye") {
|
|
5902
|
+
const a = Math.min(100, Math.max(-100, lens.amount));
|
|
5903
|
+
const gamma = a >= 0 ? 1 / (1 + a / 25) : 1 - a / 25;
|
|
5904
|
+
const rx = Math.max(1e-9, (box.maxX - box.minX) / 2);
|
|
5905
|
+
const ry = Math.max(1e-9, (box.maxY - box.minY) / 2);
|
|
5906
|
+
const warp = (p) => {
|
|
5907
|
+
const dx = (p.x - c.x) / rx;
|
|
5908
|
+
const dy = (p.y - c.y) / ry;
|
|
5909
|
+
const u = Math.hypot(dx, dy);
|
|
5910
|
+
if (u >= 1 || u < 1e-12) return p;
|
|
5911
|
+
const f = u ** gamma / u;
|
|
5912
|
+
return { x: c.x + dx * f * rx, y: c.y + dy * f * ry };
|
|
5913
|
+
};
|
|
5914
|
+
map = (p) => mapBezierPath(p, warp, 0.25);
|
|
5915
|
+
}
|
|
5916
|
+
const recolour = vectorLensColorMap(lens);
|
|
5917
|
+
const wire = lens.type === "wireframe" ? _nullishCoalesce(lens.color, () => ( "#000000")) : null;
|
|
5918
|
+
const contents = [];
|
|
5919
|
+
(_nullishCoalesce(node.lensView, () => ( []))).forEach((below, i) => {
|
|
5920
|
+
for (const shape of vectorChildAppearanceShapes(below, i)) {
|
|
5921
|
+
const path = inv ? _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, shape.path, inv) : shape.path;
|
|
5922
|
+
const b = _chunkBJTCSLF6cjs.bezierPathBounds.call(void 0, path);
|
|
5923
|
+
if (!b || b.maxX < reach.minX || b.minX > reach.maxX || b.maxY < reach.minY || b.minY > reach.maxY) continue;
|
|
5924
|
+
const id = `${node.id}~lens${contents.length}`;
|
|
5925
|
+
const changed = map ? map(path) : path;
|
|
5926
|
+
if (wire) {
|
|
5927
|
+
contents.push(shapePath(shape, id, changed, { fill: null, fills: void 0, stroke: wire, strokes: void 0, strokeWidth: 1, strokeAlign: void 0, strokeDasharray: void 0, strokeWidthProfile: void 0, opacity: Math.min(1, Math.max(0, lens.amount / 100)) }));
|
|
5928
|
+
} else if (recolour) {
|
|
5929
|
+
const fills = _optionalChain([shape, 'access', _148 => _148.source, 'access', _149 => _149.fills, 'optionalAccess', _150 => _150.map, 'call', _151 => _151((l) => ({ ...l, paint: _nullishCoalesce(mapVectorPaintColors(l.paint, recolour), () => ( null)) }))]);
|
|
5930
|
+
const strokes = _optionalChain([shape, 'access', _152 => _152.source, 'access', _153 => _153.strokes, 'optionalAccess', _154 => _154.map, 'call', _155 => _155((l) => ({ ...l, paint: _nullishCoalesce(mapVectorPaintColors(l.paint, recolour), () => ( null)) }))]);
|
|
5931
|
+
contents.push(shapePath(shape, id, changed, { fill: _nullishCoalesce(mapVectorPaintColors(shape.source.fill, recolour), () => ( null)), stroke: _nullishCoalesce(mapVectorPaintColors(shape.source.stroke, recolour), () => ( null)), ...fills ? { fills } : {}, ...strokes ? { strokes } : {} }));
|
|
5932
|
+
} else contents.push(shapePath(shape, id, changed));
|
|
5933
|
+
}
|
|
5934
|
+
});
|
|
5935
|
+
if (contents.length) {
|
|
5936
|
+
const outline = { id: `${node.id}~lens-clip`, type: "path", subpaths: node.subpaths, fill: "#000000", stroke: null, ...node.fillRule ? { fillRule: node.fillRule } : {} };
|
|
5937
|
+
children.push({ id: `${node.id}~lens-view`, type: "group", mask: { type: "clip" }, children: [outline, ...contents] });
|
|
5938
|
+
}
|
|
5939
|
+
}
|
|
5940
|
+
const { lens: _l, lensView: _v, transform: _t, opacity: _o, effects: _e, blendMode: _bm, filters: _f, ...style } = node;
|
|
5941
|
+
const fillOpacity = lens.type === "transparency" ? 1 - Math.min(100, Math.max(0, lens.amount)) / 100 : 0;
|
|
5942
|
+
children.push({ ...style, id: `${node.id}~lens-fill`, stroke: null, strokes: void 0, opacity: fillOpacity });
|
|
5943
|
+
const stroked = (_nullishCoalesce(_optionalChain([node, 'access', _156 => _156.strokes, 'optionalAccess', _157 => _157.length]), () => ( 0))) > 0 || node.stroke != null && node.stroke !== "none";
|
|
5944
|
+
if (stroked) children.push({ ...style, id: `${node.id}~lens-stroke`, fill: null, fills: void 0 });
|
|
5945
|
+
const out = {
|
|
5946
|
+
id: node.id,
|
|
5947
|
+
type: "group",
|
|
5948
|
+
...node.name !== void 0 ? { name: node.name } : {},
|
|
5949
|
+
...node.transform ? { transform: node.transform } : {},
|
|
5950
|
+
...node.opacity !== void 0 ? { opacity: node.opacity } : {},
|
|
5951
|
+
...node.blendMode ? { blendMode: node.blendMode } : {},
|
|
5952
|
+
..._optionalChain([node, 'access', _158 => _158.filters, 'optionalAccess', _159 => _159.length]) ? { filters: node.filters } : {},
|
|
5953
|
+
children
|
|
5954
|
+
};
|
|
5955
|
+
drawnCache2.set(node, out);
|
|
5956
|
+
return out;
|
|
5957
|
+
}
|
|
5958
|
+
var sameMatrix = (a, b) => !a && !b || !!a && !!b && a.every((v2, i) => Math.abs(v2 - b[i]) < 1e-12);
|
|
5959
|
+
function sameView(a, b) {
|
|
5960
|
+
if (!a || a.length !== b.length) return false;
|
|
5961
|
+
return a.every((n, i) => {
|
|
5962
|
+
const m = b[i];
|
|
5963
|
+
if (n === m) return true;
|
|
5964
|
+
return n.type === "group" && m.type === "group" && n.id === m.id && n.id.endsWith("~below") && sameMatrix(n.transform, m.transform) && sameView(n.children, m.children);
|
|
5965
|
+
});
|
|
5966
|
+
}
|
|
5967
|
+
function hasLens(nodes) {
|
|
5968
|
+
return nodes.some((n) => isVectorLens(n) || n.type === "group" && hasLens(n.children));
|
|
5969
|
+
}
|
|
5970
|
+
function resolveVectorLenses(doc) {
|
|
5971
|
+
if (!hasLens(doc.nodes)) return doc;
|
|
5972
|
+
let changed = false;
|
|
5973
|
+
const walk = (list, outer, depth) => {
|
|
5974
|
+
const below = outer.slice();
|
|
5975
|
+
const out = list.map((n) => {
|
|
5976
|
+
let next = n;
|
|
5977
|
+
if (isVectorLens(n)) {
|
|
5978
|
+
if (!sameView(n.lensView, below)) next = { ...n, lensView: below.slice() };
|
|
5979
|
+
} else if (n.type === "group" && hasLens(n.children)) {
|
|
5980
|
+
const m = n.transform && !isIdentityMatrix(n.transform) ? invertMatrix(n.transform) : null;
|
|
5981
|
+
const inner = below.length ? m ? [{ id: `${n.id}:${depth}~below`, type: "group", transform: m, children: below.slice() }] : below.slice() : [];
|
|
5982
|
+
const children = walk(n.children, inner, depth + 1);
|
|
5983
|
+
if (children !== n.children) next = { ...n, children };
|
|
5984
|
+
}
|
|
5985
|
+
if (next !== n) changed = true;
|
|
5986
|
+
below.push(next);
|
|
5987
|
+
return next;
|
|
5988
|
+
});
|
|
5989
|
+
return out.some((n, i) => n !== list[i]) ? out : list;
|
|
5990
|
+
};
|
|
5991
|
+
const nodes = walk(doc.nodes, [], 0);
|
|
5992
|
+
return changed ? { ...doc, nodes } : doc;
|
|
5993
|
+
}
|
|
5994
|
+
function stripVectorLensViews(doc) {
|
|
5995
|
+
if (!hasLens(doc.nodes)) return doc;
|
|
5996
|
+
const strip2 = (list) => list.map((n) => {
|
|
5997
|
+
if (n.type === "path" && n.lensView) {
|
|
5998
|
+
const { lensView: _v, ...rest } = n;
|
|
5999
|
+
return rest;
|
|
6000
|
+
}
|
|
6001
|
+
if (n.type === "group") return { ...n, children: strip2(n.children) };
|
|
6002
|
+
return n;
|
|
6003
|
+
});
|
|
6004
|
+
return { ...doc, nodes: strip2(doc.nodes) };
|
|
6005
|
+
}
|
|
6006
|
+
|
|
5553
6007
|
// src/geom/warp.ts
|
|
5554
6008
|
var WARP_STYLES = [
|
|
5555
6009
|
"arc",
|
|
@@ -6269,7 +6723,9 @@ var VECTOR_EFFECT_DEFAULTS = {
|
|
|
6269
6723
|
},
|
|
6270
6724
|
envelope: { style: "arc", bend: 50, horizontal: 0, vertical: 0, orientation: "horizontal", rows: 2, columns: 2, mesh: null },
|
|
6271
6725
|
contour: { direction: "inside", steps: 4, offset: 6, join: "round", miterLimit: 4, fillColor: "#ffffff", strokeColor: null, acceleration: 0 },
|
|
6272
|
-
blockShadow: { angle: 45, distance: 20, color: "#1e293b", opacity: 100, endOpacity: 100 }
|
|
6726
|
+
blockShadow: { angle: 45, distance: 20, color: "#1e293b", opacity: 100, endOpacity: 100 },
|
|
6727
|
+
extrude: { mode: "parallel", angle: 45, depth: 30, vanishingPoint: { x: 0, y: -300 }, toward: 30, color: null, lightAngle: -135, shading: 60 },
|
|
6728
|
+
bevel: { width: 8, lightAngle: -135, shading: 60, color: null }
|
|
6273
6729
|
};
|
|
6274
6730
|
var VECTOR_EFFECT_LABELS = {
|
|
6275
6731
|
trim: "Trim Paths",
|
|
@@ -6283,7 +6739,9 @@ var VECTOR_EFFECT_LABELS = {
|
|
|
6283
6739
|
repeater: "Repeater",
|
|
6284
6740
|
envelope: "Envelope",
|
|
6285
6741
|
contour: "Contour",
|
|
6286
|
-
blockShadow: "Block Shadow"
|
|
6742
|
+
blockShadow: "Block Shadow",
|
|
6743
|
+
extrude: "Extrude",
|
|
6744
|
+
bevel: "Bevel"
|
|
6287
6745
|
};
|
|
6288
6746
|
var VECTOR_EFFECT_PARAM_SPECS = {
|
|
6289
6747
|
trim: [
|
|
@@ -6385,6 +6843,30 @@ var VECTOR_EFFECT_PARAM_SPECS = {
|
|
|
6385
6843
|
{ key: "opacity", label: "Opacity %", kind: "number", min: 0, max: 100, step: 1, slider: true },
|
|
6386
6844
|
{ key: "endOpacity", label: "End opacity %", kind: "number", min: 0, max: 100, step: 1, slider: true }
|
|
6387
6845
|
],
|
|
6846
|
+
extrude: [
|
|
6847
|
+
{
|
|
6848
|
+
key: "mode",
|
|
6849
|
+
label: "Mode",
|
|
6850
|
+
kind: "select",
|
|
6851
|
+
options: [
|
|
6852
|
+
{ value: "parallel", label: "Parallel" },
|
|
6853
|
+
{ value: "perspective", label: "Perspective" }
|
|
6854
|
+
]
|
|
6855
|
+
},
|
|
6856
|
+
{ key: "angle", label: "Angle \xB0", kind: "number", min: -360, max: 360, step: 1, slider: true },
|
|
6857
|
+
{ key: "depth", label: "Depth", kind: "number", min: 0, max: 2e3, step: 1, slider: true },
|
|
6858
|
+
{ key: "vanishingPoint", label: "Vanishing point", kind: "vec2", step: 1 },
|
|
6859
|
+
{ key: "toward", label: "Toward VP %", kind: "number", min: 0, max: 100, step: 1, slider: true },
|
|
6860
|
+
{ key: "color", label: "Colour", kind: "color" },
|
|
6861
|
+
{ key: "lightAngle", label: "Light \xB0", kind: "number", min: -360, max: 360, step: 1, slider: true },
|
|
6862
|
+
{ key: "shading", label: "Shading %", kind: "number", min: 0, max: 100, step: 1, slider: true }
|
|
6863
|
+
],
|
|
6864
|
+
bevel: [
|
|
6865
|
+
{ key: "width", label: "Width", kind: "number", min: 0, max: 500, step: 0.5, slider: true },
|
|
6866
|
+
{ key: "lightAngle", label: "Light \xB0", kind: "number", min: -360, max: 360, step: 1, slider: true },
|
|
6867
|
+
{ key: "shading", label: "Shading %", kind: "number", min: 0, max: 100, step: 1, slider: true },
|
|
6868
|
+
{ key: "color", label: "Colour", kind: "color" }
|
|
6869
|
+
],
|
|
6388
6870
|
repeater: [
|
|
6389
6871
|
{ key: "copies", label: "Copies", kind: "number", min: 0, max: 50, step: 0.1, slider: true },
|
|
6390
6872
|
{ key: "offset", label: "Offset", kind: "number", min: -10, max: 10, step: 0.1, slider: true },
|
|
@@ -6468,7 +6950,7 @@ function normalizeVectorEffectParams(type, params, base) {
|
|
|
6468
6950
|
if (!defaults) return null;
|
|
6469
6951
|
const out = { ...defaults, ..._nullishCoalesce(base, () => ( {})) };
|
|
6470
6952
|
for (const spec of VECTOR_EFFECT_PARAM_SPECS[type]) {
|
|
6471
|
-
const v2 = _optionalChain([params, 'optionalAccess',
|
|
6953
|
+
const v2 = _optionalChain([params, 'optionalAccess', _160 => _160[spec.key]]);
|
|
6472
6954
|
if (v2 === void 0) continue;
|
|
6473
6955
|
if (spec.kind === "number" && typeof v2 === "number" && Number.isFinite(v2)) out[spec.key] = Math.min(_nullishCoalesce(spec.max, () => ( Infinity)), Math.max(_nullishCoalesce(spec.min, () => ( -Infinity)), v2));
|
|
6474
6956
|
else if (spec.kind === "boolean" && typeof v2 === "boolean") out[spec.key] = v2;
|
|
@@ -6480,7 +6962,7 @@ function normalizeVectorEffectParams(type, params, base) {
|
|
|
6480
6962
|
const o = out;
|
|
6481
6963
|
o.rows = Math.round(o.rows);
|
|
6482
6964
|
o.columns = Math.round(o.columns);
|
|
6483
|
-
const given = _optionalChain([params, 'optionalAccess',
|
|
6965
|
+
const given = _optionalChain([params, 'optionalAccess', _161 => _161.mesh]);
|
|
6484
6966
|
let mesh = given !== void 0 ? isValidWarpMesh(given) ? cloneMesh(given) : null : o.mesh;
|
|
6485
6967
|
if (o.style !== "mesh") mesh = null;
|
|
6486
6968
|
if (mesh && given !== void 0) {
|
|
@@ -6497,10 +6979,10 @@ function createVectorEffect(type, id, params) {
|
|
|
6497
6979
|
}
|
|
6498
6980
|
var isEnabled = (e) => e.enabled !== false && !!VECTOR_EFFECT_DEFAULTS[e.type];
|
|
6499
6981
|
function activeVectorEffects(node) {
|
|
6500
|
-
return _nullishCoalesce(_optionalChain([node, 'access',
|
|
6982
|
+
return _nullishCoalesce(_optionalChain([node, 'access', _162 => _162.effects, 'optionalAccess', _163 => _163.filter, 'call', _164 => _164(isEnabled)]), () => ( []));
|
|
6501
6983
|
}
|
|
6502
6984
|
function hasOwnVectorAppearance(node) {
|
|
6503
|
-
return node.type === "text" || node.type === "instance" || node.type === "group" && !!node.liveBoolean || isVectorFrame(node) || isVectorSymmetryGroup(node) || !!_optionalChain([node, 'access',
|
|
6985
|
+
return node.type === "text" || node.type === "instance" || node.type === "group" && !!node.liveBoolean || isVectorFrame(node) || isVectorSymmetryGroup(node) || isVectorLens(node) || !!_optionalChain([node, 'access', _165 => _165.effects, 'optionalAccess', _166 => _166.some, 'call', _167 => _167(isEnabled)]);
|
|
6504
6986
|
}
|
|
6505
6987
|
var liveCache = /* @__PURE__ */ new WeakMap();
|
|
6506
6988
|
function hasVectorAppearance(node) {
|
|
@@ -6512,7 +6994,7 @@ function hasVectorAppearance(node) {
|
|
|
6512
6994
|
return v2;
|
|
6513
6995
|
}
|
|
6514
6996
|
function isVectorLiveBoolean(node) {
|
|
6515
|
-
return _optionalChain([node, 'optionalAccess',
|
|
6997
|
+
return _optionalChain([node, 'optionalAccess', _168 => _168.type]) === "group" && !!node.liveBoolean;
|
|
6516
6998
|
}
|
|
6517
6999
|
function vectorOperandOperation(group, child) {
|
|
6518
7000
|
return _nullishCoalesce(_nullishCoalesce(child.booleanOperation, () => ( group.liveBoolean)), () => ( "union"));
|
|
@@ -6629,7 +7111,7 @@ var compareOrder = (a, b) => {
|
|
|
6629
7111
|
for (let i = 0; i < n; i++) if (a[i] !== b[i]) return a[i] - b[i];
|
|
6630
7112
|
return a.length - b.length;
|
|
6631
7113
|
};
|
|
6632
|
-
var add3 = (a, b) => ({ x: a.x + (_nullishCoalesce(_optionalChain([b, 'optionalAccess',
|
|
7114
|
+
var add3 = (a, b) => ({ x: a.x + (_nullishCoalesce(_optionalChain([b, 'optionalAccess', _169 => _169.x]), () => ( 0))), y: a.y + (_nullishCoalesce(_optionalChain([b, 'optionalAccess', _170 => _170.y]), () => ( 0))) });
|
|
6633
7115
|
var mapPaths = (shapes, fn) => {
|
|
6634
7116
|
const out = fn(shapes.map((s) => s.path));
|
|
6635
7117
|
return shapes.map((s, i) => ({ ...s, path: _nullishCoalesce(out[i], () => ( [])) }));
|
|
@@ -6657,7 +7139,7 @@ function contourShapes(shapes, c) {
|
|
|
6657
7139
|
const power = 2 ** (Math.min(100, Math.max(-100, c.acceleration)) / 50);
|
|
6658
7140
|
for (let k = 1; k <= n; k++) {
|
|
6659
7141
|
const [path] = offsetPaths([s.path], (outside ? 1 : -1) * step * k, c.join, c.miterLimit, 1, 0);
|
|
6660
|
-
if (!_optionalChain([path, 'optionalAccess',
|
|
7142
|
+
if (!_optionalChain([path, 'optionalAccess', _171 => _171.length])) break;
|
|
6661
7143
|
const t = (k / n) ** power;
|
|
6662
7144
|
const source = { ...s.source, fill: _nullishCoalesce(blendPaint(s.source.fill, c.fillColor, t), () => ( null)), stroke: _nullishCoalesce(blendPaint(s.source.stroke, c.strokeColor, t), () => ( null)), fills: void 0, strokes: void 0 };
|
|
6663
7145
|
out.push({ source, path, opacity: s.opacity, order: [outside ? n - k : k, ...s.order] });
|
|
@@ -6701,6 +7183,43 @@ function blockShadowShapes(shapes, b) {
|
|
|
6701
7183
|
}
|
|
6702
7184
|
return [...shadows, ...shapes.map((s) => ({ ...s, order: [1, ...s.order] }))];
|
|
6703
7185
|
}
|
|
7186
|
+
function extrudeShapes(shapes, x) {
|
|
7187
|
+
const out = [];
|
|
7188
|
+
for (const s of shapes) {
|
|
7189
|
+
const base = _nullishCoalesce(_nullishCoalesce(x.color, () => ( vectorPaintSolid(s.source.fill))), () => ( "#808080"));
|
|
7190
|
+
vectorExtrudeFaces(s.path, x).forEach((f, k) => {
|
|
7191
|
+
const color2 = shadeVectorColor(base, f.shade);
|
|
7192
|
+
const source = { ...s.source, fill: color2, stroke: color2, strokeWidth: 0.5, strokeLinejoin: "round", strokeAlign: void 0, fills: void 0, strokes: void 0, fillRule: "nonzero", startArrow: void 0, endArrow: void 0, strokeDasharray: void 0, strokeWidthProfile: void 0, filters: void 0 };
|
|
7193
|
+
out.push({ source, path: f.path, opacity: s.opacity, order: [...s.order, 0, k] });
|
|
7194
|
+
});
|
|
7195
|
+
out.push({ ...s, order: [...s.order, 1] });
|
|
7196
|
+
}
|
|
7197
|
+
return out;
|
|
7198
|
+
}
|
|
7199
|
+
function bevelShapes(shapes, b) {
|
|
7200
|
+
const out = [];
|
|
7201
|
+
for (const s of shapes) {
|
|
7202
|
+
const fillRule = s.source.fillRule === "evenodd" ? "evenodd" : "nonzero";
|
|
7203
|
+
const faces = vectorBevelFaces(s.path, b, fillRule);
|
|
7204
|
+
if (!faces.length) {
|
|
7205
|
+
out.push(s);
|
|
7206
|
+
continue;
|
|
7207
|
+
}
|
|
7208
|
+
const base = _nullishCoalesce(_nullishCoalesce(b.color, () => ( vectorPaintSolid(s.source.fill))), () => ( "#808080"));
|
|
7209
|
+
const fillOnly = { ...s.source, stroke: null, strokes: void 0 };
|
|
7210
|
+
out.push({ ...s, source: fillOnly, order: [...s.order, 0] });
|
|
7211
|
+
faces.forEach((f, k) => {
|
|
7212
|
+
const color2 = shadeVectorColor(base, f.shade);
|
|
7213
|
+
const source = { ...s.source, fill: color2, stroke: color2, strokeWidth: 0.5, strokeLinejoin: "round", strokeAlign: void 0, fills: void 0, strokes: void 0, fillRule: "nonzero", startArrow: void 0, endArrow: void 0, strokeDasharray: void 0, strokeWidthProfile: void 0, filters: void 0 };
|
|
7214
|
+
out.push({ source, path: f.path, opacity: s.opacity, order: [...s.order, 1, k] });
|
|
7215
|
+
});
|
|
7216
|
+
const [middle] = offsetPaths([s.path], -b.width, "miter", 4, 1, 0);
|
|
7217
|
+
if (_optionalChain([middle, 'optionalAccess', _172 => _172.length])) out.push({ ...s, source: fillOnly, path: middle, order: [...s.order, 2] });
|
|
7218
|
+
const hasStroke = _optionalChain([s, 'access', _173 => _173.source, 'access', _174 => _174.strokes, 'optionalAccess', _175 => _175.length]) || s.source.stroke != null && s.source.stroke !== "none";
|
|
7219
|
+
if (hasStroke) out.push({ ...s, source: { ...s.source, fill: null, fills: void 0 }, order: [...s.order, 3] });
|
|
7220
|
+
}
|
|
7221
|
+
return out;
|
|
7222
|
+
}
|
|
6704
7223
|
function applyVectorEffects(shapes, effects) {
|
|
6705
7224
|
let list = shapes.slice();
|
|
6706
7225
|
for (const e of _nullishCoalesce(effects, () => ( []))) {
|
|
@@ -6747,6 +7266,12 @@ function applyVectorEffects(shapes, effects) {
|
|
|
6747
7266
|
case "blockShadow":
|
|
6748
7267
|
list = blockShadowShapes(list, e.params);
|
|
6749
7268
|
break;
|
|
7269
|
+
case "extrude":
|
|
7270
|
+
list = extrudeShapes(list, e.params);
|
|
7271
|
+
break;
|
|
7272
|
+
case "bevel":
|
|
7273
|
+
list = bevelShapes(list, e.params);
|
|
7274
|
+
break;
|
|
6750
7275
|
case "repeater": {
|
|
6751
7276
|
const r = e.params;
|
|
6752
7277
|
const copies = repeatPaths(
|
|
@@ -6823,10 +7348,10 @@ function vectorEffectInputBounds(node, effectId) {
|
|
|
6823
7348
|
return paths ? pathsBounds(paths) : null;
|
|
6824
7349
|
}
|
|
6825
7350
|
function vectorNodeEnvelope(node) {
|
|
6826
|
-
return _nullishCoalesce(_optionalChain([node, 'optionalAccess',
|
|
7351
|
+
return _nullishCoalesce(_optionalChain([node, 'optionalAccess', _176 => _176.effects, 'optionalAccess', _177 => _177.find, 'call', _178 => _178((e) => e.type === "envelope" && e.enabled !== false)]), () => ( null));
|
|
6827
7352
|
}
|
|
6828
7353
|
function vectorEnvelopeFrame(node, effectId) {
|
|
6829
|
-
const e = effectId ? _optionalChain([node, 'access',
|
|
7354
|
+
const e = effectId ? _optionalChain([node, 'access', _179 => _179.effects, 'optionalAccess', _180 => _180.find, 'call', _181 => _181((x) => x.id === effectId)]) : vectorNodeEnvelope(node);
|
|
6830
7355
|
if (!e || e.type !== "envelope") return null;
|
|
6831
7356
|
const bounds = vectorEffectInputBounds(node, e.id);
|
|
6832
7357
|
if (!bounds || !(bounds.width > 0 && bounds.height > 0)) return null;
|
|
@@ -6887,7 +7412,7 @@ function placement(node) {
|
|
|
6887
7412
|
...node.blendStep ? { blendStep: true } : {},
|
|
6888
7413
|
...node.booleanOperation ? { booleanOperation: node.booleanOperation } : {},
|
|
6889
7414
|
...node.blendMode ? { blendMode: node.blendMode } : {},
|
|
6890
|
-
..._optionalChain([node, 'access',
|
|
7415
|
+
..._optionalChain([node, 'access', _182 => _182.filters, 'optionalAccess', _183 => _183.length]) ? { filters: node.filters } : {}
|
|
6891
7416
|
};
|
|
6892
7417
|
}
|
|
6893
7418
|
function vectorAppearanceNodes(node) {
|
|
@@ -6903,8 +7428,8 @@ function expandVectorAppearance(node) {
|
|
|
6903
7428
|
expandCache.set(node, [vectorTextShaperGeneration(), drawn]);
|
|
6904
7429
|
return drawn;
|
|
6905
7430
|
}
|
|
6906
|
-
if (isVectorFrame(node) || isVectorSymmetryGroup(node)) {
|
|
6907
|
-
const drawn = isVectorFrame(node) ? vectorFrameDrawn(node) : vectorSymmetryDrawn(node);
|
|
7431
|
+
if (isVectorFrame(node) || isVectorSymmetryGroup(node) || isVectorLens(node)) {
|
|
7432
|
+
const drawn = isVectorFrame(node) ? vectorFrameDrawn(node) : isVectorLens(node) ? vectorLensDrawn(node) : vectorSymmetryDrawn(node);
|
|
6908
7433
|
const out2 = hasVectorAppearance(drawn) ? expandVectorAppearance(drawn) : drawn;
|
|
6909
7434
|
expandCache.set(node, [vectorTextShaperGeneration(), out2]);
|
|
6910
7435
|
return out2;
|
|
@@ -7009,7 +7534,7 @@ function vectorEnteredGroups(nodes, ids) {
|
|
|
7009
7534
|
// src/vector/connectors.ts
|
|
7010
7535
|
var SIDES = ["top", "right", "bottom", "left", "center"];
|
|
7011
7536
|
function isVectorConnector(node) {
|
|
7012
|
-
return _optionalChain([node, 'optionalAccess',
|
|
7537
|
+
return _optionalChain([node, 'optionalAccess', _184 => _184.type]) === "path" && !!node.connector;
|
|
7013
7538
|
}
|
|
7014
7539
|
function vectorConnectionSites(nodes, id) {
|
|
7015
7540
|
const node = findVectorNode(nodes, id);
|
|
@@ -7066,7 +7591,7 @@ function facingSite(sites, toward) {
|
|
|
7066
7591
|
}
|
|
7067
7592
|
function storedEnds(node, world) {
|
|
7068
7593
|
const sp = node.subpaths[0];
|
|
7069
|
-
if (!_optionalChain([sp, 'optionalAccess',
|
|
7594
|
+
if (!_optionalChain([sp, 'optionalAccess', _185 => _185.anchors, 'access', _186 => _186.length])) return null;
|
|
7070
7595
|
const a = sp.anchors[0];
|
|
7071
7596
|
const b = sp.anchors[sp.anchors.length - 1];
|
|
7072
7597
|
return [applyMatrix(world, a), applyMatrix(world, b)];
|
|
@@ -7173,8 +7698,8 @@ function routeVectorConnector(nodes, id) {
|
|
|
7173
7698
|
}));
|
|
7174
7699
|
return {
|
|
7175
7700
|
subpaths: [{ closed: false, anchors: local }],
|
|
7176
|
-
startSide: _nullishCoalesce(_optionalChain([s, 'optionalAccess',
|
|
7177
|
-
endSide: _nullishCoalesce(_optionalChain([e, 'optionalAccess',
|
|
7701
|
+
startSide: _nullishCoalesce(_optionalChain([s, 'optionalAccess', _187 => _187.side]), () => ( null)),
|
|
7702
|
+
endSide: _nullishCoalesce(_optionalChain([e, 'optionalAccess', _188 => _188.side]), () => ( null)),
|
|
7178
7703
|
dropped: { start: !!startGlue && !s, end: !!endGlue && !e }
|
|
7179
7704
|
};
|
|
7180
7705
|
}
|
|
@@ -7186,7 +7711,7 @@ function sameSubpaths(a, b) {
|
|
|
7186
7711
|
const o = b[i];
|
|
7187
7712
|
return sp.closed === o.closed && sp.anchors.length === o.anchors.length && sp.anchors.every((p, k) => {
|
|
7188
7713
|
const q = o.anchors[k];
|
|
7189
|
-
return samePoint(p, q) && samePoint(p.in, q.in) && samePoint(p.out, q.out) && (_nullishCoalesce(_optionalChain([p, 'access',
|
|
7714
|
+
return samePoint(p, q) && samePoint(p.in, q.in) && samePoint(p.out, q.out) && (_nullishCoalesce(_optionalChain([p, 'access', _189 => _189.corner, 'optionalAccess', _190 => _190.radius]), () => ( 0))) === (_nullishCoalesce(_optionalChain([q, 'access', _191 => _191.corner, 'optionalAccess', _192 => _192.radius]), () => ( 0)));
|
|
7190
7715
|
});
|
|
7191
7716
|
});
|
|
7192
7717
|
}
|
|
@@ -7465,7 +7990,7 @@ function applyVectorCornersAttribute(subpaths, value) {
|
|
|
7465
7990
|
for (const item of value.trim().split(/\s+/)) {
|
|
7466
7991
|
const m = /^(\d+)\.(\d+):([\d.eE+-]+)(?::([a-z]+))?$/.exec(item);
|
|
7467
7992
|
if (!m) continue;
|
|
7468
|
-
const a = _optionalChain([subpaths, 'access',
|
|
7993
|
+
const a = _optionalChain([subpaths, 'access', _193 => _193[+m[1]], 'optionalAccess', _194 => _194.anchors, 'access', _195 => _195[+m[2]]]);
|
|
7469
7994
|
const radius = parseFloat(m[3]);
|
|
7470
7995
|
if (!a || !(radius > 0)) continue;
|
|
7471
7996
|
const kind = VECTOR_CORNER_KINDS.includes(m[4]) ? m[4] : void 0;
|
|
@@ -7490,7 +8015,7 @@ function vectorPaintToSvg(paint, gradientId, options = {}) {
|
|
|
7490
8015
|
const area2 = bounds2 ? { x: bounds2.x - reach2, y: bounds2.y - reach2, width: bounds2.width + 2 * reach2, height: bounds2.height + 2 * reach2 } : null;
|
|
7491
8016
|
const key2 = `${gradientId}|${_nullishCoalesce(options.role, () => ( "fill"))}|${_nullishCoalesce(options.precision, () => ( 3))}|${area2 ? [area2.x, area2.y, area2.width, area2.height].join(",") : ""}`;
|
|
7492
8017
|
let byKey2 = paintCache.get(paint);
|
|
7493
|
-
const hit = _optionalChain([byKey2, 'optionalAccess',
|
|
8018
|
+
const hit = _optionalChain([byKey2, 'optionalAccess', _196 => _196.get, 'call', _197 => _197(key2)]);
|
|
7494
8019
|
if (hit) return { value: `url(#${gradientId})`, defs: hit };
|
|
7495
8020
|
const defs2 = vectorShadedSvgDefs(paint, gradientId, { bounds: bounds2, area: area2, precision: _nullishCoalesce(options.precision, () => ( 3)) });
|
|
7496
8021
|
if (!byKey2) paintCache.set(paint, byKey2 = /* @__PURE__ */ new Map());
|
|
@@ -7502,7 +8027,7 @@ function vectorPaintToSvg(paint, gradientId, options = {}) {
|
|
|
7502
8027
|
const precision = _nullishCoalesce(options.precision, () => ( 3));
|
|
7503
8028
|
const key = `${gradientId}|${role}|${precision}`;
|
|
7504
8029
|
const owner = _nullishCoalesce(options.node, () => ( paint));
|
|
7505
|
-
const cached = _optionalChain([paintCache, 'access',
|
|
8030
|
+
const cached = _optionalChain([paintCache, 'access', _198 => _198.get, 'call', _199 => _199(owner), 'optionalAccess', _200 => _200.get, 'call', _201 => _201(key)]);
|
|
7506
8031
|
if (cached && (!options.node || (role === "fill" ? options.node.fill : options.node.stroke) === paint)) return { value: `url(#${gradientId})`, defs: cached };
|
|
7507
8032
|
const node = options.node;
|
|
7508
8033
|
const bounds = node ? vectorPathLocalBounds(node) : null;
|
|
@@ -7556,7 +8081,7 @@ function vectorNodeLocalPaintBounds(node) {
|
|
|
7556
8081
|
}
|
|
7557
8082
|
var filterCache = /* @__PURE__ */ new WeakMap();
|
|
7558
8083
|
function vectorNodeFilterSvg(node, id) {
|
|
7559
|
-
if (!_optionalChain([node, 'access',
|
|
8084
|
+
if (!_optionalChain([node, 'access', _202 => _202.filters, 'optionalAccess', _203 => _203.length])) return null;
|
|
7560
8085
|
const hit = filterCache.get(node);
|
|
7561
8086
|
if (hit && hit.id === id) return hit.filter;
|
|
7562
8087
|
const active = activeVectorFilters(node);
|
|
@@ -7619,7 +8144,7 @@ function blendFromAttribute(value, m) {
|
|
|
7619
8144
|
return out;
|
|
7620
8145
|
}
|
|
7621
8146
|
function vectorDocumentToSvg(doc, options = {}) {
|
|
7622
|
-
doc = resolveVectorSymbols(doc);
|
|
8147
|
+
doc = resolveVectorLenses(resolveVectorSymbols(doc));
|
|
7623
8148
|
const precision = _nullishCoalesce(options.precision, () => ( 3));
|
|
7624
8149
|
const prefix = _nullishCoalesce(options.idPrefix, () => ( "vg-"));
|
|
7625
8150
|
const pretty = options.pretty !== false;
|
|
@@ -7638,9 +8163,10 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
7638
8163
|
if (node.resizing) out2 += ` data-vector-resizing="${escapeAttr2(JSON.stringify(node.resizing))}"`;
|
|
7639
8164
|
if (node.type === "path" && isVectorShadedPaint(node.fill)) out2 += ` data-vector-shading="${escapeAttr2(JSON.stringify(node.fill))}"`;
|
|
7640
8165
|
if (node.type === "path" && node.connector) out2 += ` data-vector-connector="${escapeAttr2(JSON.stringify(node.connector))}"`;
|
|
8166
|
+
if (node.type === "path" && node.lens) out2 += ` data-vector-lens="${escapeAttr2(JSON.stringify(node.lens))}"`;
|
|
7641
8167
|
const blend = vectorBlendModeCss(node.blendMode);
|
|
7642
8168
|
if (blend) out2 += ` style="mix-blend-mode:${blend}"`;
|
|
7643
|
-
if (_optionalChain([node, 'access',
|
|
8169
|
+
if (_optionalChain([node, 'access', _204 => _204.filters, 'optionalAccess', _205 => _205.length])) {
|
|
7644
8170
|
const filter = vectorNodeFilterSvg(node, `${prefix}filter-${node.id}`);
|
|
7645
8171
|
const data = ` data-vector-filters="${escapeAttr2(JSON.stringify(node.filters))}"`;
|
|
7646
8172
|
if (filter) {
|
|
@@ -7687,7 +8213,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
7687
8213
|
let out2 = ` stroke="${escapeAttr2(strokeValue)}" stroke-width="${num3(width)}"`;
|
|
7688
8214
|
if (node.strokeLinecap && node.strokeLinecap !== "butt") out2 += ` stroke-linecap="${node.strokeLinecap}"`;
|
|
7689
8215
|
if (node.strokeLinejoin && node.strokeLinejoin !== "miter") out2 += ` stroke-linejoin="${node.strokeLinejoin}"`;
|
|
7690
|
-
if (_optionalChain([node, 'access',
|
|
8216
|
+
if (_optionalChain([node, 'access', _206 => _206.strokeDasharray, 'optionalAccess', _207 => _207.length])) out2 += ` stroke-dasharray="${node.strokeDasharray.map(num3).join(" ")}"`;
|
|
7691
8217
|
return out2;
|
|
7692
8218
|
};
|
|
7693
8219
|
const liveCorners = (node) => {
|
|
@@ -7730,7 +8256,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
7730
8256
|
};
|
|
7731
8257
|
const emit2 = (node, depth) => {
|
|
7732
8258
|
if (node.visible === false && !options.includeHidden) return;
|
|
7733
|
-
const wrappers = _nullishCoalesce(_optionalChain([options, 'access',
|
|
8259
|
+
const wrappers = _nullishCoalesce(_optionalChain([options, 'access', _208 => _208.wrap, 'optionalAccess', _209 => _209[node.id]]), () => ( []));
|
|
7734
8260
|
wrappers.forEach((w2, i) => {
|
|
7735
8261
|
let attrs = w2.id !== void 0 ? ` id="${escapeAttr2(w2.id)}"` : "";
|
|
7736
8262
|
if (w2.transform) attrs += ` transform="${escapeAttr2(w2.transform)}"`;
|
|
@@ -7751,7 +8277,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
7751
8277
|
};
|
|
7752
8278
|
const emitMaskGroup = (node, depth) => {
|
|
7753
8279
|
const [source, ...contents] = node.children;
|
|
7754
|
-
const body = _optionalChain([node, 'access',
|
|
8280
|
+
const body = _optionalChain([node, 'access', _210 => _210.effects, 'optionalAccess', _211 => _211.length]) && contents.length ? [{ id: `${node.id}~content`, type: "group", effects: node.effects, children: contents }] : contents;
|
|
7755
8281
|
const settings = { type: node.mask.type, ...node.mask.invert ? { invert: true } : {} };
|
|
7756
8282
|
lines.push(`${indent(depth)}<g${common(node)} data-vector-mask="${escapeAttr2(JSON.stringify(settings))}">`);
|
|
7757
8283
|
const mask = vectorMaskRenderData(node, `${prefix}mask-${node.id}`, `${prefix}mask-filter-${node.id}`, precision);
|
|
@@ -7768,7 +8294,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
7768
8294
|
lines.push(`${indent(depth + 1)}<g data-vector-part="mask-source" display="none">`);
|
|
7769
8295
|
emitNode(source, depth + 2);
|
|
7770
8296
|
lines.push(`${indent(depth + 1)}</g>`);
|
|
7771
|
-
if (_optionalChain([mask, 'optionalAccess',
|
|
8297
|
+
if (_optionalChain([mask, 'optionalAccess', _212 => _212.clip])) {
|
|
7772
8298
|
defs.push(`<clipPath id="${escapeAttr2(mask.id)}">${mask.clip.map((c) => `<path d="${c.d}" clip-rule="${c.clipRule}"/>`).join("")}</clipPath>`);
|
|
7773
8299
|
ref = ` clip-path="url(#${escapeAttr2(mask.id)})"`;
|
|
7774
8300
|
}
|
|
@@ -7780,7 +8306,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
7780
8306
|
};
|
|
7781
8307
|
const emitTextElement = (node, depth, attrs) => {
|
|
7782
8308
|
const geometry = vectorTextGeometryNode(node);
|
|
7783
|
-
const fields = { text: node.text, font: node.font, ..._optionalChain([node, 'access',
|
|
8309
|
+
const fields = { text: node.text, font: node.font, ..._optionalChain([node, 'access', _213 => _213.runs, 'optionalAccess', _214 => _214.length]) ? { runs: node.runs } : {}, ...node.paragraph ? { paragraph: node.paragraph } : {}, frame: node.frame, ..._optionalChain([node, 'access', _215 => _215.effects, 'optionalAccess', _216 => _216.length]) ? { effects: node.effects } : {} };
|
|
7784
8310
|
let data = ` data-vector-text="${escapeAttr2(JSON.stringify(fields))}"`;
|
|
7785
8311
|
if (hasVectorPaintStacks(node)) data += ` data-vector-fills="${escapeAttr2(JSON.stringify(vectorFills(node)))}" data-vector-strokes="${escapeAttr2(JSON.stringify(vectorStrokes(node)))}"`;
|
|
7786
8312
|
else {
|
|
@@ -7822,12 +8348,12 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
7822
8348
|
};
|
|
7823
8349
|
const emitText = (node, depth) => {
|
|
7824
8350
|
const outlines = vectorTextPaths(node).outlines;
|
|
7825
|
-
const effects = !!_optionalChain([node, 'access',
|
|
8351
|
+
const effects = !!_optionalChain([node, 'access', _217 => _217.effects, 'optionalAccess', _218 => _218.some, 'call', _219 => _219((e) => e.enabled !== false)]);
|
|
7826
8352
|
if (!outlines || !effects && options.text !== "outlines") {
|
|
7827
8353
|
emitTextElement(node, depth, common(node));
|
|
7828
8354
|
return;
|
|
7829
8355
|
}
|
|
7830
|
-
lines.push(`${indent(depth)}<g${common(node)} data-vector-live="${escapeAttr2(JSON.stringify({ kind: "text", ..._optionalChain([node, 'access',
|
|
8356
|
+
lines.push(`${indent(depth)}<g${common(node)} data-vector-live="${escapeAttr2(JSON.stringify({ kind: "text", ..._optionalChain([node, 'access', _220 => _220.effects, 'optionalAccess', _221 => _221.length]) ? { effects: node.effects } : {} }))}">`);
|
|
7831
8357
|
lines.push(`${indent(depth + 1)}<g data-vector-part="appearance">`);
|
|
7832
8358
|
for (const shape of vectorAppearanceNodes(node)) emit2(shape, depth + 2);
|
|
7833
8359
|
lines.push(`${indent(depth + 1)}</g>`);
|
|
@@ -7841,7 +8367,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
7841
8367
|
const symbolRef = (symbolId) => {
|
|
7842
8368
|
const hit = symbolIds.get(symbolId);
|
|
7843
8369
|
if (hit) return hit;
|
|
7844
|
-
const sym2 = _optionalChain([doc, 'access',
|
|
8370
|
+
const sym2 = _optionalChain([doc, 'access', _222 => _222.symbols, 'optionalAccess', _223 => _223.find, 'call', _224 => _224((x) => x.id === symbolId)]);
|
|
7845
8371
|
if (!sym2) return null;
|
|
7846
8372
|
const id = `${prefix}symbol-${symbolId}`;
|
|
7847
8373
|
symbolIds.set(symbolId, id);
|
|
@@ -7851,20 +8377,20 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
7851
8377
|
};
|
|
7852
8378
|
const emitInstance = (node, depth) => {
|
|
7853
8379
|
const data = { symbolId: node.symbolId, ...node.scaleStrokes === false ? { scaleStrokes: false } : {}, ...node.overrides ? { overrides: node.overrides } : {} };
|
|
7854
|
-
const exact2 = !node.overrides && node.scaleStrokes !== false && !_optionalChain([node, 'access',
|
|
8380
|
+
const exact2 = !node.overrides && node.scaleStrokes !== false && !_optionalChain([node, 'access', _225 => _225.effects, 'optionalAccess', _226 => _226.length]) && !_optionalChain([node, 'access', _227 => _227.filters, 'optionalAccess', _228 => _228.length]);
|
|
7855
8381
|
const ref = symbolRef(node.symbolId);
|
|
7856
8382
|
if (exact2 && ref) {
|
|
7857
8383
|
lines.push(`${indent(depth)}<use${common(node)} href="#${escapeAttr2(ref)}" data-vector-instance="${escapeAttr2(JSON.stringify(data))}"/>`);
|
|
7858
8384
|
return;
|
|
7859
8385
|
}
|
|
7860
|
-
const full = { ...data, ...node.transform ? { transform: node.transform } : {}, ..._optionalChain([node, 'access',
|
|
8386
|
+
const full = { ...data, ...node.transform ? { transform: node.transform } : {}, ..._optionalChain([node, 'access', _229 => _229.effects, 'optionalAccess', _230 => _230.length]) ? { effects: node.effects } : {} };
|
|
7861
8387
|
lines.push(`${indent(depth)}<g data-vector-instance="${escapeAttr2(JSON.stringify(full))}">`);
|
|
7862
8388
|
emitNode(vectorInstanceDrawn(node), depth + 1);
|
|
7863
8389
|
lines.push(`${indent(depth)}</g>`);
|
|
7864
8390
|
};
|
|
7865
8391
|
const emitFrame = (node, depth) => {
|
|
7866
8392
|
const f = node.frame;
|
|
7867
|
-
const data = { ...f, ..._optionalChain([node, 'access',
|
|
8393
|
+
const data = { ...f, ..._optionalChain([node, 'access', _231 => _231.effects, 'optionalAccess', _232 => _232.length]) ? { effects: node.effects } : {} };
|
|
7868
8394
|
lines.push(`${indent(depth)}<g${common(node)} data-vector-frame="${escapeAttr2(JSON.stringify(data))}">`);
|
|
7869
8395
|
const rect = vectorFrameRectPath(f);
|
|
7870
8396
|
if (f.fill !== void 0 && f.fill !== null && f.fill !== "none") {
|
|
@@ -7903,17 +8429,17 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
7903
8429
|
if (hasOwnVectorAppearance(node)) {
|
|
7904
8430
|
const live2 = {
|
|
7905
8431
|
kind: node.type,
|
|
7906
|
-
..._optionalChain([node, 'access',
|
|
8432
|
+
..._optionalChain([node, 'access', _233 => _233.effects, 'optionalAccess', _234 => _234.length]) ? { effects: node.effects } : {},
|
|
7907
8433
|
...node.type === "group" && node.liveBoolean ? { liveBoolean: node.liveBoolean } : {},
|
|
7908
8434
|
...node.type === "group" && node.symmetry ? { symmetry: node.symmetry } : {}
|
|
7909
8435
|
};
|
|
7910
8436
|
lines.push(`${indent(depth)}<g${common(node)} data-vector-live="${escapeAttr2(JSON.stringify(live2))}">`);
|
|
7911
8437
|
lines.push(`${indent(depth + 1)}<g data-vector-part="appearance">`);
|
|
7912
|
-
for (const shape of vectorAppearanceNodes(node)) emit2(shape, depth + 2);
|
|
8438
|
+
for (const shape of isVectorLens(node) ? vectorLensDrawn(node).children : vectorAppearanceNodes(node)) emit2(shape, depth + 2);
|
|
7913
8439
|
lines.push(`${indent(depth + 1)}</g>`);
|
|
7914
8440
|
lines.push(`${indent(depth + 1)}<g data-vector-part="source" display="none">`);
|
|
7915
8441
|
if (node.type === "path") {
|
|
7916
|
-
const { effects: _e, transform: _t, opacity: _o, visible: _v, booleanOperation: _b, blendStep: _s, blendMode: _bm, filters: _f, ...source } = node;
|
|
8442
|
+
const { effects: _e, transform: _t, opacity: _o, visible: _v, booleanOperation: _b, blendStep: _s, blendMode: _bm, filters: _f, lens: _l, lensView: _lv, ...source } = node;
|
|
7917
8443
|
emit2({ ...source, id: `${node.id}~src` }, depth + 2);
|
|
7918
8444
|
} else for (const child of node.children) emit2(child, depth + 2);
|
|
7919
8445
|
lines.push(`${indent(depth + 1)}</g>`);
|
|
@@ -7954,7 +8480,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
7954
8480
|
data += ` data-vector-width-profile="${widthProfileToAttribute(profile)}"`;
|
|
7955
8481
|
if (node.strokeLinecap && node.strokeLinecap !== "butt") data += ` data-vector-stroke-linecap="${node.strokeLinecap}"`;
|
|
7956
8482
|
if (node.strokeLinejoin && node.strokeLinejoin !== "miter") data += ` data-vector-stroke-linejoin="${node.strokeLinejoin}"`;
|
|
7957
|
-
if (_optionalChain([node, 'access',
|
|
8483
|
+
if (_optionalChain([node, 'access', _235 => _235.strokeDasharray, 'optionalAccess', _236 => _236.length])) data += ` data-vector-stroke-dasharray="${node.strokeDasharray.map(num3).join(" ")}"`;
|
|
7958
8484
|
}
|
|
7959
8485
|
lines.push(`${indent(depth)}<g${common(node)}${data}>`);
|
|
7960
8486
|
lines.push(`${indent(depth + 1)}<path data-vector-part="fill" d="${d}"${fillAttrs}${live}/>`);
|
|
@@ -8122,7 +8648,7 @@ function attrOrStyle(el, name) {
|
|
|
8122
8648
|
return el.attrs[name];
|
|
8123
8649
|
}
|
|
8124
8650
|
function urlId(value) {
|
|
8125
|
-
return _nullishCoalesce(_optionalChain([/^url\(\s*['"]?#([^'")\s]+)['"]?\s*\)/, 'access',
|
|
8651
|
+
return _nullishCoalesce(_optionalChain([/^url\(\s*['"]?#([^'")\s]+)['"]?\s*\)/, 'access', _237 => _237.exec, 'call', _238 => _238((_nullishCoalesce(value, () => ( ""))).trim()), 'optionalAccess', _239 => _239[1]]), () => ( null));
|
|
8126
8652
|
}
|
|
8127
8653
|
function clipRulesAsFillRules(el) {
|
|
8128
8654
|
const attrs = { ...el.attrs };
|
|
@@ -8187,9 +8713,9 @@ function resolveGradient(id, raw) {
|
|
|
8187
8713
|
for (let el = first; el && !chain.includes(el) && chain.length < 32; ) {
|
|
8188
8714
|
chain.push(el);
|
|
8189
8715
|
const href = _nullishCoalesce(el.attrs.href, () => ( el.attrs["xlink:href"]));
|
|
8190
|
-
el = _optionalChain([href, 'optionalAccess',
|
|
8716
|
+
el = _optionalChain([href, 'optionalAccess', _240 => _240.startsWith, 'call', _241 => _241("#")]) ? raw.get(href.slice(1)) : void 0;
|
|
8191
8717
|
}
|
|
8192
|
-
const attr = (name) => _optionalChain([chain, 'access',
|
|
8718
|
+
const attr = (name) => _optionalChain([chain, 'access', _242 => _242.find, 'call', _243 => _243((el) => el.attrs[name] !== void 0), 'optionalAccess', _244 => _244.attrs, 'access', _245 => _245[name]]);
|
|
8193
8719
|
const stops = _nullishCoalesce(chain.map(readStops).find((s) => s.length), () => ( []));
|
|
8194
8720
|
if (!stops.length) return null;
|
|
8195
8721
|
const user = attr("gradientUnits") === "userSpaceOnUse";
|
|
@@ -8359,7 +8885,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8359
8885
|
const stackedPath = (g, _style, m, meta) => {
|
|
8360
8886
|
const fillEl = g.children.find((c) => c.name === "path" && c.attrs["data-vector-part"] === "fill");
|
|
8361
8887
|
const subpaths = fillEl ? shapeOf(fillEl) : null;
|
|
8362
|
-
if (!_optionalChain([subpaths, 'optionalAccess',
|
|
8888
|
+
if (!_optionalChain([subpaths, 'optionalAccess', _246 => _246.length])) return null;
|
|
8363
8889
|
const parse = (v2) => {
|
|
8364
8890
|
try {
|
|
8365
8891
|
return v2 ? JSON.parse(v2) : [];
|
|
@@ -8378,7 +8904,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8378
8904
|
const key = (n) => JSON.stringify([n.subpaths, _nullishCoalesce(n.transform, () => ( null)), _nullishCoalesce(n.opacity, () => ( 1)), n.visible !== false, _nullishCoalesce(n.filters, () => ( null)), _nullishCoalesce(n.blendMode, () => ( "normal")), _nullishCoalesce(n.fillRule, () => ( "nonzero")), _nullishCoalesce(n.booleanOperation, () => ( null))]);
|
|
8379
8905
|
for (const n of nodes2) {
|
|
8380
8906
|
const prev = out[out.length - 1];
|
|
8381
|
-
if (_optionalChain([prev, 'optionalAccess',
|
|
8907
|
+
if (_optionalChain([prev, 'optionalAccess', _247 => _247.type]) === "path" && n.type === "path" && key(prev) === key(n)) {
|
|
8382
8908
|
const fills = vectorFills(n);
|
|
8383
8909
|
const strokesBefore = vectorStrokes(prev);
|
|
8384
8910
|
if (!(fills.length && strokesBefore.length)) {
|
|
@@ -8396,7 +8922,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8396
8922
|
const part = (name) => g.children.find((c) => c.name === "path" && c.attrs["data-vector-part"] === name);
|
|
8397
8923
|
const fillEl = part("fill");
|
|
8398
8924
|
const subpaths = fillEl ? shapeOf(fillEl) : null;
|
|
8399
|
-
if (!fillEl || !_optionalChain([subpaths, 'optionalAccess',
|
|
8925
|
+
if (!fillEl || !_optionalChain([subpaths, 'optionalAccess', _248 => _248.length])) return null;
|
|
8400
8926
|
const a = g.attrs;
|
|
8401
8927
|
const fs = readStyle(fillEl, style);
|
|
8402
8928
|
const strokeEl = part("stroke");
|
|
@@ -8433,7 +8959,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8433
8959
|
...profile.length ? { strokeWidthProfile: profile } : {},
|
|
8434
8960
|
...keptCap ? { strokeLinecap: keptCap } : {},
|
|
8435
8961
|
...keptJoin ? { strokeLinejoin: keptJoin } : {},
|
|
8436
|
-
..._optionalChain([keptDash, 'optionalAccess',
|
|
8962
|
+
..._optionalChain([keptDash, 'optionalAccess', _249 => _249.length]) ? { strokeDasharray: keptDash } : {}
|
|
8437
8963
|
};
|
|
8438
8964
|
return placed(node, m);
|
|
8439
8965
|
};
|
|
@@ -8498,8 +9024,8 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8498
9024
|
} else {
|
|
8499
9025
|
const fill = json2(g.attrs["data-vector-fill"]);
|
|
8500
9026
|
const stroke = json2(g.attrs["data-vector-stroke"]);
|
|
8501
|
-
node.fill = fill == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call',
|
|
8502
|
-
node.stroke = stroke == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call',
|
|
9027
|
+
node.fill = fill == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call', _250 => _250([{ paint: fill }]), 'access', _251 => _251[0], 'optionalAccess', _252 => _252.paint]), () => ( null));
|
|
9028
|
+
node.stroke = stroke == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call', _253 => _253([{ paint: stroke }]), 'access', _254 => _254[0], 'optionalAccess', _255 => _255.paint]), () => ( null));
|
|
8503
9029
|
const settings = json2(g.attrs["data-vector-stroke-settings"]);
|
|
8504
9030
|
if (settings && typeof settings === "object") {
|
|
8505
9031
|
const strokes = sanitizeVectorStrokes([{ paint: _nullishCoalesce(node.stroke, () => ( "#000")), ...settings }]);
|
|
@@ -8535,8 +9061,8 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8535
9061
|
const anchor = attrOrStyle(el, "text-anchor");
|
|
8536
9062
|
const first0 = (v2) => _nullishCoalesce(numberList(v2)[0], () => ( 0));
|
|
8537
9063
|
const tspan = el.children.find((c) => c.name === "tspan");
|
|
8538
|
-
const x = el.attrs.x !== void 0 ? first0(el.attrs.x) : first0(_optionalChain([tspan, 'optionalAccess',
|
|
8539
|
-
const y = el.attrs.y !== void 0 ? first0(el.attrs.y) : first0(_optionalChain([tspan, 'optionalAccess',
|
|
9064
|
+
const x = el.attrs.x !== void 0 ? first0(el.attrs.x) : first0(_optionalChain([tspan, 'optionalAccess', _256 => _256.attrs, 'access', _257 => _257.x]));
|
|
9065
|
+
const y = el.attrs.y !== void 0 ? first0(el.attrs.y) : first0(_optionalChain([tspan, 'optionalAccess', _258 => _258.attrs, 'access', _259 => _259.y]));
|
|
8540
9066
|
const fillValue = _nullishCoalesce(attrOrStyle(el, "fill"), () => ( style.fill));
|
|
8541
9067
|
let node = {
|
|
8542
9068
|
id: idFor(el),
|
|
@@ -8567,12 +9093,12 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8567
9093
|
if (symbolOfElement.has(el)) return symbolOfElement.get(el);
|
|
8568
9094
|
symbolOfElement.set(el, null);
|
|
8569
9095
|
const own = json2(el.attrs["data-vector-symbol"]);
|
|
8570
|
-
let id = typeof _optionalChain([own, 'optionalAccess',
|
|
9096
|
+
let id = typeof _optionalChain([own, 'optionalAccess', _260 => _260.id]) === "string" && own.id ? own.id : _nullishCoalesce(el.attrs.id, () => ( createId()));
|
|
8571
9097
|
while (usedSymbolIds.has(id)) id = `${id}-${usedSymbolIds.size}`;
|
|
8572
9098
|
usedSymbolIds.add(id);
|
|
8573
9099
|
const style = readStyle(el, rootStyle);
|
|
8574
9100
|
const nodes2 = el.name === "symbol" ? visit2(el, style, IDENTITY_MATRIX) : visitOne({ ...el, attrs: { ...el.attrs, transform: "" } }, rootStyle, parseSvgTransform(el.attrs.transform));
|
|
8575
|
-
symbols.push({ id, name: typeof _optionalChain([own, 'optionalAccess',
|
|
9101
|
+
symbols.push({ id, name: typeof _optionalChain([own, 'optionalAccess', _261 => _261.name]) === "string" && own.name ? own.name : _nullishCoalesce(el.attrs.id, () => ( "Symbol")), nodes: nodes2 });
|
|
8576
9102
|
symbolOfElement.set(el, id);
|
|
8577
9103
|
return id;
|
|
8578
9104
|
};
|
|
@@ -8584,13 +9110,13 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8584
9110
|
if (!symbolId) return null;
|
|
8585
9111
|
const own = json2(el.attrs["data-vector-instance"]);
|
|
8586
9112
|
const place2 = multiplyMatrices(translateMatrix(length(el.attrs.x), length(el.attrs.y)), m);
|
|
8587
|
-
const node = { id: idFor(el), type: "instance", ...meta, symbolId, ..._optionalChain([own, 'optionalAccess',
|
|
9113
|
+
const node = { id: idFor(el), type: "instance", ...meta, symbolId, ..._optionalChain([own, 'optionalAccess', _262 => _262.scaleStrokes]) === false ? { scaleStrokes: false } : {}, ..._optionalChain([own, 'optionalAccess', _263 => _263.overrides]) ? { overrides: own.overrides } : {} };
|
|
8588
9114
|
return isIdentityMatrix(place2) ? node : { ...node, transform: place2 };
|
|
8589
9115
|
};
|
|
8590
9116
|
const ownInstance = (g, m, meta) => {
|
|
8591
9117
|
const raw = json2(g.attrs["data-vector-instance"]);
|
|
8592
9118
|
if (!raw || typeof raw.symbolId !== "string") return null;
|
|
8593
|
-
const sym2 = [...byId.values()].find((e) => e.name === "symbol" && _optionalChain([json2, 'call',
|
|
9119
|
+
const sym2 = [...byId.values()].find((e) => e.name === "symbol" && _optionalChain([json2, 'call', _264 => _264(e.attrs["data-vector-symbol"]), 'optionalAccess', _265 => _265.id]) === raw.symbolId);
|
|
8594
9120
|
const symbolId = sym2 ? symbolFor(sym2) : raw.symbolId;
|
|
8595
9121
|
if (!symbolId) return null;
|
|
8596
9122
|
const t = Array.isArray(raw.transform) && raw.transform.length === 6 && raw.transform.every(Number.isFinite) ? raw.transform : IDENTITY_MATRIX;
|
|
@@ -8598,7 +9124,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8598
9124
|
const drawn = g.children.find((c) => c.name === "g");
|
|
8599
9125
|
const effects = sanitizeVectorEffects(raw.effects);
|
|
8600
9126
|
const node = {
|
|
8601
|
-
id: _nullishCoalesce(_optionalChain([drawn, 'optionalAccess',
|
|
9127
|
+
id: _nullishCoalesce(_optionalChain([drawn, 'optionalAccess', _266 => _266.attrs, 'access', _267 => _267.id]), () => ( idFor(g))),
|
|
8602
9128
|
type: "instance",
|
|
8603
9129
|
...meta,
|
|
8604
9130
|
symbolId,
|
|
@@ -8655,12 +9181,12 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8655
9181
|
const masked = (el, nodes2, m) => {
|
|
8656
9182
|
let out = nodes2;
|
|
8657
9183
|
const clipEl = rawMasks.get(_nullishCoalesce(urlId(attrOrStyle(el, "clip-path")), () => ( "")));
|
|
8658
|
-
if (_optionalChain([clipEl, 'optionalAccess',
|
|
9184
|
+
if (_optionalChain([clipEl, 'optionalAccess', _268 => _268.name]) === "clipPath") {
|
|
8659
9185
|
const source = maskNode(clipEl, m, out, clipEl.attrs.clipPathUnits);
|
|
8660
9186
|
if (source) out = [{ id: idFor({ name: "g", attrs: {}, children: [] }), type: "group", name: "Clip Group", mask: { type: "clip" }, children: [source, ...out] }];
|
|
8661
9187
|
}
|
|
8662
9188
|
const maskEl = rawMasks.get(_nullishCoalesce(urlId(attrOrStyle(el, "mask")), () => ( "")));
|
|
8663
|
-
if (_optionalChain([maskEl, 'optionalAccess',
|
|
9189
|
+
if (_optionalChain([maskEl, 'optionalAccess', _269 => _269.name]) === "mask") {
|
|
8664
9190
|
const source = maskNode(maskEl, m, out, maskEl.attrs.maskContentUnits);
|
|
8665
9191
|
const type = attrOrStyle(maskEl, "mask-type") === "alpha" ? "alpha" : "luminance";
|
|
8666
9192
|
if (source) out = [{ id: idFor({ name: "g", attrs: {}, children: [] }), type: "group", name: "Opacity Mask", mask: { type }, children: [source, ...out] }];
|
|
@@ -8682,19 +9208,19 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8682
9208
|
let sourceEl = part("mask-source");
|
|
8683
9209
|
if (!sourceEl) {
|
|
8684
9210
|
const el = rawMasks.get(_nullishCoalesce(urlId(maskedEl.attrs.mask), () => ( "")));
|
|
8685
|
-
const invert2 = _optionalChain([el, 'optionalAccess',
|
|
9211
|
+
const invert2 = _optionalChain([el, 'optionalAccess', _270 => _270.children, 'access', _271 => _271.find, 'call', _272 => _272((c) => c.name === "g" && c.attrs["data-vector-part"] === "mask-invert")]);
|
|
8686
9212
|
sourceEl = _nullishCoalesce(invert2, () => ( el));
|
|
8687
9213
|
}
|
|
8688
9214
|
const source = sourceEl ? visit2(sourceEl, style, m)[0] : void 0;
|
|
8689
9215
|
let contents = visit2(maskedEl, style, m);
|
|
8690
9216
|
let effects;
|
|
8691
9217
|
const wrapper = contents.length === 1 && contents[0].type === "group" && contents[0].id === `${id}~content` ? contents[0] : null;
|
|
8692
|
-
if (_optionalChain([wrapper, 'optionalAccess',
|
|
9218
|
+
if (_optionalChain([wrapper, 'optionalAccess', _273 => _273.type]) === "group") {
|
|
8693
9219
|
effects = _nullishCoalesce(wrapper.effects, () => ( void 0));
|
|
8694
9220
|
contents = wrapper.children;
|
|
8695
9221
|
}
|
|
8696
9222
|
if (!source) return contents.length ? { id, type: "group", ...meta, children: contents } : null;
|
|
8697
|
-
return { id, type: "group", ...meta, mask, ..._optionalChain([effects, 'optionalAccess',
|
|
9223
|
+
return { id, type: "group", ...meta, mask, ..._optionalChain([effects, 'optionalAccess', _274 => _274.length]) ? { effects } : {}, children: [source, ...contents] };
|
|
8698
9224
|
};
|
|
8699
9225
|
const frameGroup = (g, style, m, meta) => {
|
|
8700
9226
|
const raw = parseJson(g.attrs["data-vector-frame"]);
|
|
@@ -8706,7 +9232,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8706
9232
|
const { rigid, residual } = decomposeRigid(m);
|
|
8707
9233
|
const r = _chunkBJTCSLF6cjs.bezierPathBounds.call(void 0, _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, subpathsToBezier(vectorFrameRectPath(frame)), residual));
|
|
8708
9234
|
const back = invertMatrix(rigid);
|
|
8709
|
-
const effects = sanitizeVectorEffects(_optionalChain([raw, 'optionalAccess',
|
|
9235
|
+
const effects = sanitizeVectorEffects(_optionalChain([raw, 'optionalAccess', _275 => _275.effects]));
|
|
8710
9236
|
return {
|
|
8711
9237
|
id,
|
|
8712
9238
|
type: "group",
|
|
@@ -8740,6 +9266,8 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8740
9266
|
if (resizing) meta.resizing = resizing;
|
|
8741
9267
|
const connector = child.attrs["data-vector-connector"] !== void 0 ? sanitizeVectorConnector(parseJson(child.attrs["data-vector-connector"])) : null;
|
|
8742
9268
|
if (connector) meta.connector = connector;
|
|
9269
|
+
const lens = child.attrs["data-vector-lens"] !== void 0 ? sanitizeVectorLens(parseJson(child.attrs["data-vector-lens"])) : null;
|
|
9270
|
+
if (lens) meta.lens = lens;
|
|
8743
9271
|
if (child.name === "g" && child.attrs["data-vector-frame"] !== void 0) {
|
|
8744
9272
|
const node2 = frameGroup(child, s, m, meta);
|
|
8745
9273
|
if (node2) out.push(node2);
|
|
@@ -9170,13 +9698,13 @@ function hitTestVectorNode(node, p, tolerance = 0, parent = IDENTITY_MATRIX, opt
|
|
|
9170
9698
|
}
|
|
9171
9699
|
if (isVectorMaskGroup(node)) {
|
|
9172
9700
|
const m = multiplyMatrices(nodeMatrix(node), parent);
|
|
9173
|
-
const entered = !!_optionalChain([options, 'access',
|
|
9701
|
+
const entered = !!_optionalChain([options, 'access', _276 => _276.entered, 'optionalAccess', _277 => _277.has, 'call', _278 => _278(node.id)]);
|
|
9174
9702
|
if (!entered && isVectorMaskActive(node) && !vectorMaskContains(node, applyMatrix(invertMatrix(m), p), tolerance)) return false;
|
|
9175
9703
|
const shown = !entered && hasOwnVectorAppearance(node) ? expandVectorAppearance(node).children : node.children;
|
|
9176
9704
|
for (let i = shown.length - 1; i >= 1; i--) if (hitTestVectorNode(shown[i], p, tolerance, m, options)) return true;
|
|
9177
9705
|
return entered && hitTestVectorMaskSource(node, p, tolerance, m, options);
|
|
9178
9706
|
}
|
|
9179
|
-
if (!(node.type === "group" && (!hasOwnVectorAppearance(node) || _optionalChain([options, 'access',
|
|
9707
|
+
if (!(node.type === "group" && (!hasOwnVectorAppearance(node) || _optionalChain([options, 'access', _279 => _279.entered, 'optionalAccess', _280 => _280.has, 'call', _281 => _281(node.id)])))) node = expandVectorAppearance(node);
|
|
9180
9708
|
if (node.type === "group") {
|
|
9181
9709
|
const m = multiplyMatrices(nodeMatrix(node), parent);
|
|
9182
9710
|
return node.children.some((c) => hitTestVectorNode(c, p, tolerance, m, options));
|
|
@@ -9188,7 +9716,7 @@ function hitTestVectorNode(node, p, tolerance = 0, parent = IDENTITY_MATRIX, opt
|
|
|
9188
9716
|
function hitTestVectorMaskSource(group, p, tolerance, m, options) {
|
|
9189
9717
|
const source = group.children[0];
|
|
9190
9718
|
if (source.visible === false) return false;
|
|
9191
|
-
if (_optionalChain([group, 'access',
|
|
9719
|
+
if (_optionalChain([group, 'access', _282 => _282.mask, 'optionalAccess', _283 => _283.type]) !== "clip") return hitTestVectorNode(source, p, tolerance, m, options);
|
|
9192
9720
|
const paths = collectPathNodes(source).filter((n) => n.visible !== false);
|
|
9193
9721
|
const pt2 = [p.x, p.y];
|
|
9194
9722
|
return paths.some((n) => {
|
|
@@ -9237,24 +9765,24 @@ function mapAnchor(a, m) {
|
|
|
9237
9765
|
}
|
|
9238
9766
|
function bakeIntoGeometry(node, m) {
|
|
9239
9767
|
if (isIdentityMatrix(m)) return node;
|
|
9240
|
-
if (_optionalChain([node, 'access',
|
|
9768
|
+
if (_optionalChain([node, 'access', _284 => _284.effects, 'optionalAccess', _285 => _285.length])) node = { ...node, effects: transformVectorEffects(node.effects, m, node) };
|
|
9241
9769
|
if (isVectorFrame(node)) return bakeFrame(node, m);
|
|
9242
9770
|
if (node.type === "group") {
|
|
9243
9771
|
const group = node;
|
|
9244
9772
|
const children = group.children.map((c) => transformVectorNode(c, m));
|
|
9245
9773
|
const sym2 = group.symmetry ? { symmetry: transformVectorSymmetry(group.symmetry, m) } : {};
|
|
9246
|
-
const spine = _optionalChain([group, 'access',
|
|
9774
|
+
const spine = _optionalChain([group, 'access', _286 => _286.blend, 'optionalAccess', _287 => _287.spine]);
|
|
9247
9775
|
if (!spine) return { ...group, ...sym2, children };
|
|
9248
9776
|
const moved = { closed: spine.closed, anchors: spine.anchors.map((a) => mapAnchor(a, m)) };
|
|
9249
9777
|
return { ...group, children, blend: { ...group.blend, spine: moved } };
|
|
9250
9778
|
}
|
|
9251
9779
|
const path = node.type === "text" ? bakeVectorTextGeometry(node, m) : node;
|
|
9252
9780
|
const flips = m[0] * m[3] - m[1] * m[2] < 0;
|
|
9253
|
-
const mirrored = flips && _optionalChain([path, 'access',
|
|
9781
|
+
const mirrored = flips && _optionalChain([path, 'access', _288 => _288.strokeWidthProfile, 'optionalAccess', _289 => _289.length]);
|
|
9254
9782
|
const layer = (l) => ({
|
|
9255
9783
|
...l,
|
|
9256
9784
|
...isVectorGradient(l.paint) || isVectorShadedPaint(l.paint) ? { paint: transformVectorPaint(l.paint, m) } : {},
|
|
9257
|
-
...flips && _optionalChain([l, 'access',
|
|
9785
|
+
...flips && _optionalChain([l, 'access', _290 => _290.strokeWidthProfile, 'optionalAccess', _291 => _291.length]) ? { strokeWidthProfile: mirrorWidthProfile(l.strokeWidthProfile) } : {}
|
|
9258
9786
|
});
|
|
9259
9787
|
return {
|
|
9260
9788
|
...path,
|
|
@@ -9489,7 +10017,7 @@ function roundSubpaths(subpaths, precision = 3) {
|
|
|
9489
10017
|
|
|
9490
10018
|
// src/vector/symmetry.ts
|
|
9491
10019
|
function isVectorSymmetryGroup(node) {
|
|
9492
|
-
return _optionalChain([node, 'optionalAccess',
|
|
10020
|
+
return _optionalChain([node, 'optionalAccess', _292 => _292.type]) === "group" && !!node.symmetry && !node.blend && !node.liveBoolean && !node.mask && !node.frame;
|
|
9493
10021
|
}
|
|
9494
10022
|
var rad = (deg) => deg * Math.PI / 180;
|
|
9495
10023
|
var exact = (v2) => Math.abs(v2) < 1e-12 ? 0 : v2;
|
|
@@ -9518,14 +10046,14 @@ function renamed(node, k) {
|
|
|
9518
10046
|
if (node.type === "group") return { ...node, id, children: node.children.map((c) => renamed(c, k)) };
|
|
9519
10047
|
return { ...node, id };
|
|
9520
10048
|
}
|
|
9521
|
-
var
|
|
10049
|
+
var drawnCache3 = /* @__PURE__ */ new WeakMap();
|
|
9522
10050
|
function vectorSymmetryDrawn(node) {
|
|
9523
|
-
let hit =
|
|
10051
|
+
let hit = drawnCache3.get(node);
|
|
9524
10052
|
if (hit) return hit;
|
|
9525
10053
|
const { symmetry, ...group } = node;
|
|
9526
10054
|
const copies = vectorSymmetryMatrices(symmetry).flatMap((m, k) => node.children.map((c) => ({ ...renamed(transformVectorNode(c, m), k + 1), locked: true })));
|
|
9527
10055
|
hit = { ...group, children: [...node.children, ...copies] };
|
|
9528
|
-
|
|
10056
|
+
drawnCache3.set(node, hit);
|
|
9529
10057
|
return hit;
|
|
9530
10058
|
}
|
|
9531
10059
|
function vectorSymmetryAxes(s, box) {
|
|
@@ -10036,5 +10564,20 @@ function transformVectorSymmetry(s, m) {
|
|
|
10036
10564
|
|
|
10037
10565
|
|
|
10038
10566
|
|
|
10039
|
-
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.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;
|
|
10040
|
-
|
|
10567
|
+
|
|
10568
|
+
|
|
10569
|
+
|
|
10570
|
+
|
|
10571
|
+
|
|
10572
|
+
|
|
10573
|
+
|
|
10574
|
+
|
|
10575
|
+
|
|
10576
|
+
|
|
10577
|
+
|
|
10578
|
+
|
|
10579
|
+
|
|
10580
|
+
|
|
10581
|
+
|
|
10582
|
+
exports.isVectorMeshGradient = isVectorMeshGradient; exports.isVectorFreeformGradient = isVectorFreeformGradient; exports.isVectorShadedPaint = isVectorShadedPaint; exports.vectorRgbaToCss = vectorRgbaToCss; exports.VECTOR_MESH_MAX = VECTOR_MESH_MAX; exports.createVectorMeshGradient = createVectorMeshGradient; exports.vectorMeshPointAt = vectorMeshPointAt; exports.vectorMeshColorAt = vectorMeshColorAt; exports.vectorMeshLines = vectorMeshLines; exports.vectorFreeformSpreadScale = vectorFreeformSpreadScale; exports.vectorFreeformLineSegments = vectorFreeformLineSegments; exports.vectorFreeformField = vectorFreeformField; exports.sampleVectorFreeform = sampleVectorFreeform; exports.autoVectorFreeformGradient = autoVectorFreeformGradient; exports.vectorShadedSvgDefs = vectorShadedSvgDefs; exports.mapVectorShadedPaint = mapVectorShadedPaint; exports.transformVectorShadedPaint = transformVectorShadedPaint; exports.sanitizeVectorShadedPaint = sanitizeVectorShadedPaint; exports.removeVectorFreeformPoint = removeVectorFreeformPoint; exports.nearestVectorShadingPoint = nearestVectorShadingPoint; exports.VECTOR_CORNER_KINDS = VECTOR_CORNER_KINDS; exports.VECTOR_GRADIENT_TYPES = VECTOR_GRADIENT_TYPES; exports.VECTOR_GRADIENT_SPREADS = VECTOR_GRADIENT_SPREADS; exports.VECTOR_GRADIENT_INTERPOLATIONS = VECTOR_GRADIENT_INTERPOLATIONS; exports.VECTOR_STROKE_GRADIENT_MODES = VECTOR_STROKE_GRADIENT_MODES; exports.VECTOR_ARROWHEADS = VECTOR_ARROWHEADS; exports.VECTOR_BLEND_MODES = VECTOR_BLEND_MODES; exports.VECTOR_HORIZONTAL_RESIZING = VECTOR_HORIZONTAL_RESIZING; exports.VECTOR_VERTICAL_RESIZING = VECTOR_VERTICAL_RESIZING; exports.VECTOR_LENS_TYPES = VECTOR_LENS_TYPES; exports.VECTOR_CONNECTOR_SIDES = VECTOR_CONNECTOR_SIDES; exports.VECTOR_CONNECTOR_ROUTES = VECTOR_CONNECTOR_ROUTES; exports.VECTOR_BLEND_SPACINGS = VECTOR_BLEND_SPACINGS; exports.VECTOR_MASK_TYPES = VECTOR_MASK_TYPES; exports.VECTOR_SYMMETRY_MODES = VECTOR_SYMMETRY_MODES; exports.VECTOR_TEXT_ALIGNS = VECTOR_TEXT_ALIGNS; exports.VECTOR_PATH_TEXT_BASELINES = VECTOR_PATH_TEXT_BASELINES; exports.VECTOR_CONSTRAINT_KINDS = VECTOR_CONSTRAINT_KINDS; exports.VECTOR_TOOLS = VECTOR_TOOLS; exports.VECTOR_TRANSFORM_HANDLES = VECTOR_TRANSFORM_HANDLES; exports.VECTOR_PATHFINDER_OPERATIONS = VECTOR_PATHFINDER_OPERATIONS; exports.VECTOR_EFFECT_TYPES = VECTOR_EFFECT_TYPES; exports.VECTOR_MERGE_MODES = VECTOR_MERGE_MODES; exports.VECTOR_FILTER_TYPES = VECTOR_FILTER_TYPES; exports.isVectorGradient = isVectorGradient; exports.parseVectorColor = parseVectorColor; exports.VECTOR_GRADIENT_MIN_STOPS = VECTOR_GRADIENT_MIN_STOPS; exports.gradientMidpointRemap = gradientMidpointRemap; exports.sortedVectorGradientStops = sortedVectorGradientStops; exports.vectorGradientNeedsExpansion = vectorGradientNeedsExpansion; exports.vectorGradientRamp = vectorGradientRamp; exports.sampleVectorGradient = sampleVectorGradient; exports.expandVectorGradientStops = expandVectorGradientStops; exports.samplePlainStops = samplePlainStops; exports.reverseVectorGradient = reverseVectorGradient; exports.insertVectorGradientStop = insertVectorGradientStop; exports.moveVectorGradientStop = moveVectorGradientStop; exports.removeVectorGradientStop = removeVectorGradientStop; exports.vectorGradientMidpointPosition = vectorGradientMidpointPosition; exports.vectorGradientMidpointFromPosition = vectorGradientMidpointFromPosition; exports.spanVectorGradientStops = spanVectorGradientStops; exports.hasExplicitGradientGeometry = hasExplicitGradientGeometry; exports.vectorGradientPoints = vectorGradientPoints; exports.vectorBoxMatrix = vectorBoxMatrix; exports.vectorGradientUnitsMatrix = vectorGradientUnitsMatrix; exports.vectorGradientMatrix = vectorGradientMatrix; exports.vectorGradientFocalParam = vectorGradientFocalParam; exports.vectorGradientParam = vectorGradientParam; exports.applyVectorGradientSpread = applyVectorGradientSpread; exports.vectorGradientTAt = vectorGradientTAt; exports.sampleVectorGradientAt = sampleVectorGradientAt; exports.vectorGradientAspect = vectorGradientAspect; exports.explicitVectorGradient = explicitVectorGradient; exports.pinVectorGradient = pinVectorGradient; exports.transformVectorGradient = transformVectorGradient; exports.mapVectorGradient = mapVectorGradient; exports.mapVectorPaint = mapVectorPaint; exports.transformVectorPaint = transformVectorPaint; exports.isCentredVectorGradient = isCentredVectorGradient; exports.vectorGradientHandles = vectorGradientHandles; exports.moveVectorGradientHandle = moveVectorGradientHandle; exports.setVectorGradientVector = setVectorGradientVector; exports.VECTOR_GRADIENT_MAX_PERIODS = VECTOR_GRADIENT_MAX_PERIODS; exports.periodicVectorGradientStops = periodicVectorGradientStops; exports.expandVectorGradientSpread = expandVectorGradientSpread; exports.vectorGradientArea = vectorGradientArea; exports.patternAttrs = patternAttrs; exports.vectorGradientSvgDefs = vectorGradientSvgDefs; exports.sampleVectorPaintDefAt = sampleVectorPaintDefAt; exports.sanitizeVectorGradient = sanitizeVectorGradient; exports.convertVectorGradient = convertVectorGradient; exports.defaultVectorGradient = defaultVectorGradient; exports.applyVectorGradientPatch = applyVectorGradientPatch; exports.IDENTITY_MATRIX = IDENTITY_MATRIX; exports.multiplyMatrices = multiplyMatrices; exports.translateMatrix = translateMatrix; exports.scaleMatrix = scaleMatrix; exports.rotateMatrix = rotateMatrix; exports.matrixAbout = matrixAbout; exports.skewMatrix = skewMatrix; exports.applyMatrix = applyMatrix; exports.isIdentityMatrix = isIdentityMatrix; exports.invertMatrix = invertMatrix; exports.applyMatrixLinear = applyMatrixLinear; exports.matrixRotation = matrixRotation; exports.decomposeRigid = decomposeRigid; exports.isVectorSymmetryGroup = isVectorSymmetryGroup; exports.vectorSymmetryMatrices = vectorSymmetryMatrices; exports.vectorSymmetryDrawn = vectorSymmetryDrawn; exports.vectorSymmetryAxes = vectorSymmetryAxes; exports.sanitizeVectorSymmetry = sanitizeVectorSymmetry; exports.VECTOR_SYMMETRY_MODE_LABELS = VECTOR_SYMMETRY_MODE_LABELS; exports.transformVectorSymmetry = transformVectorSymmetry; exports.vectorCornerAt = vectorCornerAt; exports.vectorCorners = vectorCorners; exports.cornerSetback = cornerSetback; exports.fitCornerRadius = fitCornerRadius; exports.cornerBisectorPoint = cornerBisectorPoint; exports.cornerRadiusChange = cornerRadiusChange; exports.hasVectorCorners = hasVectorCorners; exports.expandVectorCornersOf = expandVectorCornersOf; exports.expandVectorCorners = expandVectorCorners; exports.setAnchorCorner = setAnchorCorner; exports.nextVectorCornerKind = nextVectorCornerKind; exports.setSubpathCorners = setSubpathCorners; exports.VECTOR_WIDTH_PROFILE_MAX_POINTS = VECTOR_WIDTH_PROFILE_MAX_POINTS; exports.VECTOR_WIDTH_PROFILE_MAX_SCALE = VECTOR_WIDTH_PROFILE_MAX_SCALE; exports.VECTOR_WIDTH_SAME_T = VECTOR_WIDTH_SAME_T; exports.VECTOR_WIDTH_PRESETS = VECTOR_WIDTH_PRESETS; exports.VECTOR_WIDTH_PRESET_IDS = VECTOR_WIDTH_PRESET_IDS; exports.sanitizeWidthProfile = sanitizeWidthProfile; exports.isUniformWidthProfile = isUniformWidthProfile; exports.widthProfileAt = widthProfileAt; exports.widthProfileMaxScale = widthProfileMaxScale; exports.widthProfilePreset = widthProfilePreset; exports.widthProfilePresetId = widthProfilePresetId; exports.reverseWidthProfile = reverseWidthProfile; exports.mirrorWidthProfile = mirrorWidthProfile; exports.insertWidthPoint = insertWidthPoint; exports.setWidthPoint = setWidthPoint; exports.removeWidthPoints = removeWidthPoints; exports.taperWaveFactor = taperWaveFactor; exports.generateWidthProfile = generateWidthProfile; exports.VECTOR_PRESSURE_NOMINAL = VECTOR_PRESSURE_NOMINAL; exports.pressureWidthProfile = pressureWidthProfile; exports.dashIntervals = dashIntervals; exports.variableStrokeRings = variableStrokeRings; exports.variableStrokeOutline = variableStrokeOutline; exports.nearestStrokePosition = nearestStrokePosition; exports.strokePositionPoint = strokePositionPoint; exports.isClosedBezierShape = isClosedBezierShape; exports.effectiveStrokeAlign = effectiveStrokeAlign; exports.strokeWidthProfileOf = strokeWidthProfileOf; exports.hasStrokeExtras = hasStrokeExtras; exports.vectorStrokeLineArea = vectorStrokeLineArea; exports.arrowheadWeight = arrowheadWeight; exports.arrowheadInset = arrowheadInset; exports.arrowheadPath = arrowheadPath; exports.vectorStrokeParts = vectorStrokeParts; exports.vectorStrokeOutlinePath = vectorStrokeOutlinePath; exports.hitTestVectorStroke = hitTestVectorStroke; exports.vectorStrokeReach = vectorStrokeReach; exports.VECTOR_STROKE_SETTING_KEYS = VECTOR_STROKE_SETTING_KEYS; exports.VECTOR_BLEND_MODE_LABELS = VECTOR_BLEND_MODE_LABELS; exports.isVectorBlendMode = isVectorBlendMode; exports.vectorBlendModeCss = vectorBlendModeCss; exports.vectorBlendModeFromCss = vectorBlendModeFromCss; exports.isPlainVectorPaintLayer = isPlainVectorPaintLayer; exports.isDrawnVectorPaintLayer = isDrawnVectorPaintLayer; exports.vectorFills = vectorFills; exports.vectorStrokeSettings = vectorStrokeSettings; exports.vectorStrokes = vectorStrokes; exports.hasVectorPaintStacks = hasVectorPaintStacks; exports.withVectorFills = withVectorFills; exports.withVectorStrokes = withVectorStrokes; exports.normalizeVectorPaintStacks = normalizeVectorPaintStacks; exports.sanitizeVectorFills = sanitizeVectorFills; exports.sanitizeVectorStrokeSettings = sanitizeVectorStrokeSettings; exports.sanitizeVectorStrokes = sanitizeVectorStrokes; exports.vectorPaintLayerNodes = vectorPaintLayerNodes; exports.needsVectorPaintLayers = needsVectorPaintLayers; exports.vectorStrokeStackReach = vectorStrokeStackReach; exports.hitTestVectorPaintLayer = hitTestVectorPaintLayer; exports.hitTestVectorPaintStack = hitTestVectorPaintStack; exports.vectorStacksHaveGradient = vectorStacksHaveGradient; exports.newVectorStrokeLayer = newVectorStrokeLayer; exports.vectorTargetPaint = vectorTargetPaint; exports.withVectorTargetPaint = withVectorTargetPaint; exports.effectPathLength = effectPathLength; exports.effectPathVertexCount = effectPathVertexCount; exports.trimIntervals = trimIntervals; exports.trimPaths = trimPaths; exports.trimPathsIndividually = trimPathsIndividually; exports.puckerBloatPaths = puckerBloatPaths; exports.roundCornerPaths = roundCornerPaths; exports.offsetPaths = offsetPaths; exports.sweepPath = sweepPath; exports.twistPaths = twistPaths; exports.zigzagPaths = zigzagPaths; exports.wigglePaths = wigglePaths; exports.mergePaths = mergePaths; exports.vectorRepeaterCopies = vectorRepeaterCopies; exports.repeatPaths = repeatPaths; exports.pathsCenter = pathsCenter; exports.mapVectorPoints = mapVectorPoints; exports.mapVectorSubpaths = mapVectorSubpaths; exports.mapBezierPath = mapBezierPath; exports.isVectorFrame = isVectorFrame; exports.vectorFrameRectPath = vectorFrameRectPath; exports.vectorFrameDrawn = vectorFrameDrawn; exports.vectorFrameContains = vectorFrameContains; exports.vectorFrameChildMatrix = vectorFrameChildMatrix; exports.sanitizeVectorFrame = sanitizeVectorFrame; exports.sanitizeVectorResizing = sanitizeVectorResizing; exports.VECTOR_HORIZONTAL_RESIZING_LABELS = VECTOR_HORIZONTAL_RESIZING_LABELS; exports.VECTOR_VERTICAL_RESIZING_LABELS = VECTOR_VERTICAL_RESIZING_LABELS; exports.vectorBoundsInside = vectorBoundsInside; exports.vectorArtboards = vectorArtboards; exports.vectorFrameDocument = vectorFrameDocument; exports.getVectorFramePanel = getVectorFramePanel; exports.splitIntoFaces = splitIntoFaces; exports.knifePath = knifePath; exports.eraserRegion = eraserRegion; exports.eraseFromFill = eraseFromFill; exports.eraseFromOutline = eraseFromOutline; exports.polylineBounds = polylineBounds; exports.simplifyPolyline = simplifyPolyline; exports.VECTOR_FILTER_DEFAULTS = VECTOR_FILTER_DEFAULTS; exports.VECTOR_FILTER_LABELS = VECTOR_FILTER_LABELS; exports.VECTOR_FILTER_PARAM_SPECS = VECTOR_FILTER_PARAM_SPECS; exports.isVectorFilterType = isVectorFilterType; exports.normalizeVectorFilterParams = normalizeVectorFilterParams; exports.vectorFilterParamKeys = vectorFilterParamKeys; exports.createVectorFilter = createVectorFilter; exports.sanitizeVectorFilters = sanitizeVectorFilters; exports.activeVectorFilters = activeVectorFilters; exports.vectorFilterReach = vectorFilterReach; exports.vectorFilterSvg = vectorFilterSvg; exports.vectorFilterMarkup = vectorFilterMarkup; exports.VECTOR_FILTER_MENU = VECTOR_FILTER_MENU; exports.isVectorMaskType = isVectorMaskType; exports.sanitizeVectorMask = sanitizeVectorMask; exports.isVectorMaskGroup = isVectorMaskGroup; exports.isVectorMaskActive = isVectorMaskActive; exports.vectorMaskSource = vectorMaskSource; exports.vectorMaskContents = vectorMaskContents; exports.vectorMaskOwner = vectorMaskOwner; exports.vectorMaskSummary = vectorMaskSummary; exports.vectorMaskRegionShapes = vectorMaskRegionShapes; exports.vectorMaskRegion = vectorMaskRegion; exports.vectorMaskRegionPath = vectorMaskRegionPath; exports.vectorMaskContains = vectorMaskContains; exports.vectorMaskedShapes = vectorMaskedShapes; exports.vectorMaskedGeometry = vectorMaskedGeometry; exports.vectorMaskedLocalBounds = vectorMaskedLocalBounds; exports.vectorMaskContentBounds = vectorMaskContentBounds; exports.vectorMaskRenderData = vectorMaskRenderData; exports.DEFAULT_TEXT_STYLE = DEFAULT_TEXT_STYLE; exports.DEFAULT_AUTO_LEADING = DEFAULT_AUTO_LEADING; exports.fitRuns = fitRuns; exports.styleAt = styleAt; exports.restyleRange = restyleRange; exports.spliceRuns = spliceRuns; exports.paragraphRanges = paragraphRanges; exports.fitParagraphRuns = fitParagraphRuns; exports.fontOf = fontOf; exports.isTextSpace = isTextSpace; exports.layoutText = layoutText; exports.textIndexAt = textIndexAt; exports.caretAt = caretAt; exports.textDecorations = textDecorations; exports.textRectPath = textRectPath; exports.textFragmentOutline = textFragmentOutline; exports.cssFontFamily = cssFontFamily; exports.cssFont = cssFont; exports.createCanvasTextShaper = createCanvasTextShaper; exports.createOutlineTextShaper = createOutlineTextShaper; exports.createMetricTextShaper = createMetricTextShaper; exports.setVectorTextShaper = setVectorTextShaper; exports.getVectorTextShaper = getVectorTextShaper; exports.vectorTextShaperGeneration = vectorTextShaperGeneration; exports.vectorTextHasOutlines = vectorTextHasOutlines; exports.vectorTextFamilies = vectorTextFamilies; exports.DEFAULT_VECTOR_FONT = DEFAULT_VECTOR_FONT; exports.VECTOR_CHARACTER_STYLE_KEYS = VECTOR_CHARACTER_STYLE_KEYS; exports.VECTOR_PARAGRAPH_STYLE_KEYS = VECTOR_PARAGRAPH_STYLE_KEYS; exports.VectorTextError = VectorTextError; exports.fitVectorTextRuns = fitVectorTextRuns; exports.vectorTextRuns = vectorTextRuns; exports.vectorTextStyleAt = vectorTextStyleAt; exports.measureVectorPath = measureVectorPath; exports.vectorPathAt = vectorPathAt; exports.vectorPathTextPositions = vectorPathTextPositions; exports.layoutVectorText = layoutVectorText; exports.glyphBox = glyphBox; exports.vectorTextPaths = vectorTextPaths; exports.vectorTextPaintSource = vectorTextPaintSource; exports.vectorTextCaret = vectorTextCaret; exports.vectorTextIndexAt = vectorTextIndexAt; exports.vectorTextSelectionQuads = vectorTextSelectionQuads; exports.patchVectorCharacterStyle = patchVectorCharacterStyle; exports.patchVectorParagraphStyle = patchVectorParagraphStyle; exports.sanitizeVectorTextFrame = sanitizeVectorTextFrame; exports.normalizeVectorTextRuns = normalizeVectorTextRuns; exports.sanitizeVectorTextFields = sanitizeVectorTextFields; exports.vectorTextRange = vectorTextRange; exports.replaceVectorText = replaceVectorText; exports.styleVectorText = styleVectorText; exports.bakeVectorTextGeometry = bakeVectorTextGeometry; exports.vectorTextName = vectorTextName; exports.pathTextFrameFromBezier = pathTextFrameFromBezier; exports.vectorTextBoxOutline = vectorTextBoxOutline; exports.vectorTextSpans = vectorTextSpans; exports.vectorTextGeometryNode = vectorTextGeometryNode; exports.vectorTextSpanSvg = vectorTextSpanSvg; exports.VECTOR_SYMBOL_MAX_DEPTH = VECTOR_SYMBOL_MAX_DEPTH; exports.vectorSymbolsUsedIn = vectorSymbolsUsedIn; exports.vectorSymbolUses = vectorSymbolUses; exports.resolveVectorSymbols = resolveVectorSymbols; exports.stripVectorSymbolArt = stripVectorSymbolArt; exports.scaleVectorStrokeWidths = scaleVectorStrokeWidths; exports.tintVectorNode = tintVectorNode; exports.prefixVectorIds = prefixVectorIds; exports.vectorInstanceGroup = vectorInstanceGroup; exports.composeVectorMatrices = composeVectorMatrices; exports.vectorPaintSolid = vectorPaintSolid; exports.shadeVectorColor = shadeVectorColor; exports.vectorPathRings = vectorPathRings; exports.vectorExtrudeFaces = vectorExtrudeFaces; exports.vectorBevelFaces = vectorBevelFaces; exports.isVectorLens = isVectorLens; exports.VECTOR_LENS_LABELS = VECTOR_LENS_LABELS; exports.VECTOR_LENS_SPECS = VECTOR_LENS_SPECS; exports.sanitizeVectorLens = sanitizeVectorLens; exports.vectorLensColorMap = vectorLensColorMap; exports.mapVectorPaintColors = mapVectorPaintColors; exports.vectorLensDrawn = vectorLensDrawn; exports.resolveVectorLenses = resolveVectorLenses; exports.stripVectorLensViews = stripVectorLensViews; exports.WARP_STYLES = WARP_STYLES; exports.WARP_STYLE_LABELS = WARP_STYLE_LABELS; exports.warpPresetGrid = warpPresetGrid; exports.warpPresetMesh = warpPresetMesh; exports.warpMeshColumns = warpMeshColumns; exports.warpMeshRows = warpMeshRows; exports.isValidWarpMesh = isValidWarpMesh; exports.fitWarpMesh = fitWarpMesh; exports.identityWarpMesh = identityWarpMesh; exports.evalWarpMesh = evalWarpMesh; exports.splitWarpMeshU = splitWarpMeshU; exports.splitWarpMeshV = splitWarpMeshV; exports.removeWarpMeshSplitU = removeWarpMeshSplitU; exports.removeWarpMeshSplitV = removeWarpMeshSplitV; exports.mapWarpMeshPoints = mapWarpMeshPoints; exports.resizeWarpMesh = resizeWarpMesh; exports.warpMeshControlBounds = warpMeshControlBounds; exports.warpMeshParamAt = warpMeshParamAt; exports.dragWarpMeshPoint = dragWarpMeshPoint; exports.pullWarpMesh = pullWarpMesh; exports.warpMeshEditPoints = warpMeshEditPoints; exports.warpMeshGridCurves = warpMeshGridCurves; exports.vectorMeshFromOutline = vectorMeshFromOutline; exports.vectorMeshOutline = vectorMeshOutline; exports.VECTOR_EFFECT_DEFAULTS = VECTOR_EFFECT_DEFAULTS; exports.VECTOR_EFFECT_LABELS = VECTOR_EFFECT_LABELS; exports.VECTOR_EFFECT_PARAM_SPECS = VECTOR_EFFECT_PARAM_SPECS; exports.vectorEnvelopeMesh = vectorEnvelopeMesh; exports.vectorEnvelopeMap = vectorEnvelopeMap; exports.normalizeVectorEffectParams = normalizeVectorEffectParams; exports.createVectorEffect = createVectorEffect; exports.activeVectorEffects = activeVectorEffects; exports.hasOwnVectorAppearance = hasOwnVectorAppearance; exports.hasVectorAppearance = hasVectorAppearance; exports.isVectorLiveBoolean = isVectorLiveBoolean; exports.vectorOperandOperation = vectorOperandOperation; exports.vectorLiveBooleanSteps = vectorLiveBooleanSteps; exports.clearVectorLiveBooleanCache = clearVectorLiveBooleanCache; exports.foldVectorBooleanOperands = foldVectorBooleanOperands; exports.applyVectorEffects = applyVectorEffects; exports.vectorInstanceDrawn = vectorInstanceDrawn; exports.vectorChildAppearanceShapes = vectorChildAppearanceShapes; exports.vectorEffectInputPaths = vectorEffectInputPaths; exports.vectorEffectInputBounds = vectorEffectInputBounds; exports.vectorNodeEnvelope = vectorNodeEnvelope; exports.vectorEnvelopeFrame = vectorEnvelopeFrame; exports.vectorAppearanceShapes = vectorAppearanceShapes; exports.vectorAppearanceOutline = vectorAppearanceOutline; exports.vectorAppearanceNodes = vectorAppearanceNodes; exports.expandVectorAppearance = expandVectorAppearance; exports.expandVectorAppearances = expandVectorAppearances; exports.sanitizeVectorEffects = sanitizeVectorEffects; exports.transformVectorEffects = transformVectorEffects; exports.vectorEnteredGroups = vectorEnteredGroups; exports.isVectorConnector = isVectorConnector; exports.vectorConnectionSites = vectorConnectionSites; exports.nearestVectorConnectionSite = nearestVectorConnectionSite; exports.vectorConnectorWorldAnchors = vectorConnectorWorldAnchors; exports.routeVectorConnector = routeVectorConnector; exports.rerouteVectorConnectors = rerouteVectorConnectors; exports.sanitizeVectorConnector = sanitizeVectorConnector; exports.VECTOR_CONNECTOR_ROUTE_LABELS = VECTOR_CONNECTOR_ROUTE_LABELS; exports.VECTOR_CONNECTOR_SIDE_LABELS = VECTOR_CONNECTOR_SIDE_LABELS; exports.getVectorConnectorPanel = getVectorConnectorPanel; exports.vectorConnectorTargetAt = vectorConnectorTargetAt; exports.vectorStrokeGradientDefs = vectorStrokeGradientDefs; exports.vectorCornersAttribute = vectorCornersAttribute; exports.applyVectorCornersAttribute = applyVectorCornersAttribute; exports.vectorPathLocalBounds = vectorPathLocalBounds; exports.vectorPaintToSvg = vectorPaintToSvg; exports.vectorStrokeSvgParts = vectorStrokeSvgParts; exports.vectorNodeLocalPaintBounds = vectorNodeLocalPaintBounds; exports.vectorNodeFilterSvg = vectorNodeFilterSvg; exports.widthProfileToAttribute = widthProfileToAttribute; exports.widthProfileFromAttribute = widthProfileFromAttribute; exports.vectorDocumentToSvg = vectorDocumentToSvg; exports.parseSvgTransform = parseSvgTransform; exports.parseVectorSvg = parseVectorSvg; exports.VECTOR_SPATIAL_MIN = VECTOR_SPATIAL_MIN; exports.VectorRTree = VectorRTree; exports.vectorNodePaintBox = vectorNodePaintBox; exports.vectorSpatialIndex = vectorSpatialIndex; exports.vectorNodesNear = vectorNodesNear; exports.cloneAnchor = cloneAnchor; exports.cloneSubpath = cloneSubpath; exports.cloneVectorNode = cloneVectorNode; exports.cloneVectorDocument = cloneVectorDocument; exports.hasPaint = hasPaint; exports.subpathSegmentCount = subpathSegmentCount; exports.subpathSegment = subpathSegment; exports.subpathsToBezier = subpathsToBezier; exports.vectorNodeToBezier = vectorNodeToBezier; exports.vectorPathData = vectorPathData; exports.inferAnchorType = inferAnchorType; exports.bezierToSubpaths = bezierToSubpaths; exports.walkVectorNodes = walkVectorNodes; exports.findVectorNode = findVectorNode; exports.locateVectorNode = locateVectorNode; exports.collectPaintedNodes = collectPaintedNodes; exports.collectPathNodes = collectPathNodes; exports.nodeMatrix = nodeMatrix; exports.vectorPathWorldBezier = vectorPathWorldBezier; exports.vectorNodeBounds = vectorNodeBounds; exports.unionBounds = unionBounds; exports.boundsIntersect = boundsIntersect; exports.boundsFromPoints = boundsFromPoints; exports.hitTestVectorNode = hitTestVectorNode; exports.vectorStrokeOutline = vectorStrokeOutline; exports.hitTestVectorNodes = hitTestVectorNodes; exports.nearestSegment = nearestSegment; exports.transformVectorNode = transformVectorNode; exports.vectorNodeRotation = vectorNodeRotation; exports.vectorWorldMatrix = vectorWorldMatrix; exports.vectorParentMatrix = vectorParentMatrix; exports.translateAnchor = translateAnchor; exports.moveAnchorHandle = moveAnchorHandle; exports.convertAnchor = convertAnchor; exports.insertAnchor = insertAnchor; exports.removeAnchors = removeAnchors; exports.reverseSubpath = reverseSubpath; exports.KAPPA = KAPPA2; exports.rectSubpath = rectSubpath; exports.ellipseSubpath = ellipseSubpath; exports.polygonSubpath = polygonSubpath; exports.starSubpath = starSubpath; exports.lineSubpath = lineSubpath; exports.roundSubpaths = roundSubpaths;
|
|
10583
|
+
//# sourceMappingURL=chunk-YYJKIESX.cjs.map
|