@pixerate/editor 0.135.0 → 0.137.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 +63 -55
- package/dist/animation-editor/index.cjs.map +1 -1
- package/dist/animation-editor/index.d.cts +8 -5
- package/dist/animation-editor/index.d.ts +8 -5
- package/dist/animation-editor/index.js +10 -2
- package/dist/animation-editor/index.js.map +1 -1
- package/dist/{bezier-J8i4uqSH.d.cts → bezier-CZ2AhjID.d.cts} +1 -1
- package/dist/{bezier-lNEOp0Jx.d.ts → bezier-Dywv3Bw8.d.ts} +1 -1
- package/dist/blending-D7jCmjO6.d.cts +1026 -0
- package/dist/blending-NgF3qo3d.d.ts +1026 -0
- package/dist/brushes-CnvZSYYU.d.cts +744 -0
- package/dist/brushes-DJmUbIgz.d.ts +744 -0
- package/dist/{brushstrokeRender-SII6MG4R.js → brushstrokeRender-2FAXA3XC.js} +13 -16
- package/dist/{brushstrokeRender-SII6MG4R.js.map → brushstrokeRender-2FAXA3XC.js.map} +1 -1
- package/dist/{brushstrokeRender-JNHVEUFG.cjs → brushstrokeRender-IMFY3FF6.cjs} +16 -19
- package/dist/brushstrokeRender-IMFY3FF6.cjs.map +1 -0
- package/dist/canvas/index.cjs +10 -10
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +10 -7
- package/dist/canvas/index.d.ts +10 -7
- package/dist/canvas/index.js +4 -4
- package/dist/{chunk-W4LNKTHT.cjs → chunk-2XS6LTUP.cjs} +63 -63
- package/dist/{chunk-W4LNKTHT.cjs.map → chunk-2XS6LTUP.cjs.map} +1 -1
- package/dist/{chunk-HHTCDFZC.js → chunk-3D77LOBM.js} +234 -136
- package/dist/chunk-3D77LOBM.js.map +1 -0
- package/dist/{chunk-BR7EKQUP.js → chunk-3G6J7UFV.js} +322 -2
- package/dist/chunk-3G6J7UFV.js.map +1 -0
- package/dist/{chunk-62XUO5LB.js → chunk-3X6IAJUQ.js} +2 -2
- package/dist/{chunk-EM3FMJWE.js → chunk-5FSRTP6E.js} +320 -3
- package/dist/chunk-5FSRTP6E.js.map +1 -0
- package/dist/{chunk-Z2H7KECK.cjs → chunk-5OOIUXNJ.cjs} +345 -247
- package/dist/chunk-5OOIUXNJ.cjs.map +1 -0
- package/dist/{chunk-7RJ6P7MI.js → chunk-6S6362D2.js} +2 -2
- package/dist/chunk-A3BVTI3G.js +150 -0
- package/dist/chunk-A3BVTI3G.js.map +1 -0
- package/dist/{chunk-24ATT2PE.cjs → chunk-AEAAN4AD.cjs} +120 -120
- package/dist/{chunk-24ATT2PE.cjs.map → chunk-AEAAN4AD.cjs.map} +1 -1
- package/dist/chunk-ECCXGELC.cjs +727 -0
- package/dist/chunk-ECCXGELC.cjs.map +1 -0
- package/dist/{chunk-SVYE5HIM.js → chunk-EQQMGO42.js} +2 -2
- package/dist/{chunk-FHPVDTI2.cjs → chunk-F2Y4E4GU.cjs} +22 -22
- package/dist/{chunk-FHPVDTI2.cjs.map → chunk-F2Y4E4GU.cjs.map} +1 -1
- package/dist/{chunk-OXSV64JX.js → chunk-G6IKY6PL.js} +4 -4
- package/dist/{chunk-UYQUPUR6.js → chunk-HUO3TI4C.js} +3 -3
- package/dist/chunk-I52DRGGJ.js +727 -0
- package/dist/chunk-I52DRGGJ.js.map +1 -0
- package/dist/{chunk-DDSO4HS7.cjs → chunk-KEENUAFN.cjs} +2 -2
- package/dist/{chunk-DDSO4HS7.cjs.map → chunk-KEENUAFN.cjs.map} +1 -1
- package/dist/{chunk-2HC4DRF4.js → chunk-LLFHCSU2.js} +2 -2
- package/dist/{chunk-J5BA3BQ6.cjs → chunk-O7LUD7MH.cjs} +323 -3
- package/dist/chunk-O7LUD7MH.cjs.map +1 -0
- package/dist/{chunk-ILYFOJUN.js → chunk-OIBIRXRG.js} +3 -3
- package/dist/{chunk-FWEO3HSL.js → chunk-PQQF5KOW.js} +8 -8
- package/dist/{chunk-T6TV6HY6.cjs → chunk-PRSRYHQD.cjs} +36 -36
- package/dist/{chunk-T6TV6HY6.cjs.map → chunk-PRSRYHQD.cjs.map} +1 -1
- package/dist/chunk-Q6OUXEK3.cjs +150 -0
- package/dist/chunk-Q6OUXEK3.cjs.map +1 -0
- package/dist/{chunk-6GFRKLLS.cjs → chunk-QBWEH3IM.cjs} +429 -112
- package/dist/chunk-QBWEH3IM.cjs.map +1 -0
- package/dist/{chunk-ESIWZMMK.js → chunk-SYT2TLQF.js} +35 -37
- package/dist/{chunk-ESIWZMMK.js.map → chunk-SYT2TLQF.js.map} +1 -1
- package/dist/{chunk-YT3JL7YM.cjs → chunk-TLCTTQFF.cjs} +53 -53
- package/dist/{chunk-YT3JL7YM.cjs.map → chunk-TLCTTQFF.cjs.map} +1 -1
- package/dist/{chunk-P3RQ5UJE.cjs → chunk-UTQKC66X.cjs} +4 -4
- package/dist/{chunk-P3RQ5UJE.cjs.map → chunk-UTQKC66X.cjs.map} +1 -1
- package/dist/{chunk-J3B45HTA.cjs → chunk-XB25WOC2.cjs} +6 -6
- package/dist/{chunk-J3B45HTA.cjs.map → chunk-XB25WOC2.cjs.map} +1 -1
- package/dist/{chunk-YAFS2QFZ.cjs → chunk-XN2NBLV5.cjs} +313 -315
- package/dist/chunk-XN2NBLV5.cjs.map +1 -0
- package/dist/effects/index.d.cts +7 -4
- package/dist/effects/index.d.ts +7 -4
- package/dist/{export-DMeG6E06.d.ts → export-41rL6Cne.d.ts} +1 -1
- package/dist/{export-AZSwX087.d.cts → export-CyJdfP_Z.d.cts} +5 -4
- package/dist/{export-KzubBKo7.d.cts → export-D9mXp05Q.d.cts} +1 -1
- package/dist/{export-BDkyDNM8.d.ts → export-DwnZ_hvQ.d.ts} +5 -4
- package/dist/extensions/index.cjs +3 -3
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.js +2 -2
- package/dist/generation/index.cjs +150 -945
- package/dist/generation/index.cjs.map +1 -1
- package/dist/generation/index.d.cts +3 -423
- package/dist/generation/index.d.ts +3 -423
- package/dist/generation/index.js +59 -854
- package/dist/generation/index.js.map +1 -1
- package/dist/grammar/index.cjs +3 -3
- package/dist/grammar/index.cjs.map +1 -1
- package/dist/grammar/index.js +2 -2
- package/dist/{helpers-Coa4e2j_.d.ts → helpers-C-RgeyvH.d.ts} +25 -8
- package/dist/{helpers-DHl28yLO.d.cts → helpers-v6GMazzg.d.cts} +25 -8
- package/dist/image-editor/index.cjs +986 -986
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +15 -11
- package/dist/image-editor/index.d.ts +15 -11
- package/dist/image-editor/index.js +94 -94
- package/dist/index.cjs +28 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +36 -36
- package/dist/{opentype-BWR7Qv8W.d.cts → opentype-KR_jj6b_.d.cts} +1 -1
- package/dist/{opentype-Dfcx6wFx.d.ts → opentype-a1KAW-qs.d.ts} +1 -1
- package/dist/paint/index.cjs +5 -8
- package/dist/paint/index.cjs.map +1 -1
- package/dist/paint/index.d.cts +4 -2
- package/dist/paint/index.d.ts +4 -2
- package/dist/paint/index.js +15 -18
- package/dist/paint-editor/index.cjs +405 -403
- package/dist/paint-editor/index.cjs.map +1 -1
- package/dist/paint-editor/index.d.cts +15 -748
- package/dist/paint-editor/index.d.ts +15 -748
- package/dist/paint-editor/index.js +79 -77
- package/dist/paint-editor/index.js.map +1 -1
- package/dist/{pathfinder-D8KQ6blQ.d.cts → pathfinder-BHS4vQNm.d.cts} +1 -1
- package/dist/{pathfinder-Celbi3e6.d.ts → pathfinder-BVvTIBMo.d.ts} +1 -1
- package/dist/{pool-8JZGWHvR.d.ts → pool-CZQOrSXZ.d.ts} +1 -1
- package/dist/{pool-BfuxBKTd.d.cts → pool-FjZZmZ80.d.cts} +1 -1
- package/dist/provenance-DmlcgdzT.d.cts +426 -0
- package/dist/provenance-uh5r2TQ8.d.ts +426 -0
- package/dist/rand-8xbUb6ur.d.ts +1118 -0
- package/dist/rand-Cw9VLrVC.d.cts +1118 -0
- package/dist/raster/index.cjs +17 -19
- package/dist/raster/index.cjs.map +1 -1
- package/dist/raster/index.js +9 -11
- package/dist/raster/index.js.map +1 -1
- package/dist/{svg-CxxqG3_W.d.ts → svg-CSz3mzkw.d.ts} +2 -2
- package/dist/{svg-pwXWq6s2.d.cts → svg-DTb40ICU.d.cts} +2 -2
- package/dist/{tools-y1M6O3UT.d.ts → tools-B0wXP5cF.d.ts} +1 -1
- package/dist/{tools-3EBjR91b.d.cts → tools-Ca0kI1qo.d.cts} +1 -1
- package/dist/vector/index.cjs +2698 -1674
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.d.cts +390 -72
- package/dist/vector/index.d.ts +390 -72
- package/dist/vector/index.js +1665 -641
- package/dist/vector/index.js.map +1 -1
- package/dist/video-editor/index.d.cts +7 -4
- package/dist/video-editor/index.d.ts +7 -4
- package/dist/{warp-Ceqdz7kj.d.cts → warp-DTOp0lON.d.cts} +1 -1
- package/dist/{warp-C1gwu2G_.d.ts → warp-pd7hrH4T.d.ts} +1 -1
- package/package.json +1 -1
- package/skills/pixerate-vector/SKILL.md +22 -0
- package/dist/brushstrokeRender-JNHVEUFG.cjs.map +0 -1
- package/dist/chunk-64PYNEHJ.js +0 -340
- package/dist/chunk-64PYNEHJ.js.map +0 -1
- package/dist/chunk-6GFRKLLS.cjs.map +0 -1
- package/dist/chunk-7QN76ESJ.js +0 -323
- package/dist/chunk-7QN76ESJ.js.map +0 -1
- package/dist/chunk-BR7EKQUP.js.map +0 -1
- package/dist/chunk-DCLJNVZS.cjs +0 -323
- package/dist/chunk-DCLJNVZS.cjs.map +0 -1
- package/dist/chunk-EM3FMJWE.js.map +0 -1
- package/dist/chunk-HHTCDFZC.js.map +0 -1
- package/dist/chunk-J5BA3BQ6.cjs.map +0 -1
- package/dist/chunk-YAFS2QFZ.cjs.map +0 -1
- package/dist/chunk-Z2H7KECK.cjs.map +0 -1
- package/dist/chunk-Z6OUCS2K.cjs +0 -340
- package/dist/chunk-Z6OUCS2K.cjs.map +0 -1
- package/dist/rand-BszBST4s.d.ts +0 -2140
- package/dist/rand-DOH_aMvm.d.cts +0 -2140
- /package/dist/{chunk-62XUO5LB.js.map → chunk-3X6IAJUQ.js.map} +0 -0
- /package/dist/{chunk-7RJ6P7MI.js.map → chunk-6S6362D2.js.map} +0 -0
- /package/dist/{chunk-SVYE5HIM.js.map → chunk-EQQMGO42.js.map} +0 -0
- /package/dist/{chunk-OXSV64JX.js.map → chunk-G6IKY6PL.js.map} +0 -0
- /package/dist/{chunk-UYQUPUR6.js.map → chunk-HUO3TI4C.js.map} +0 -0
- /package/dist/{chunk-2HC4DRF4.js.map → chunk-LLFHCSU2.js.map} +0 -0
- /package/dist/{chunk-ILYFOJUN.js.map → chunk-OIBIRXRG.js.map} +0 -0
- /package/dist/{chunk-FWEO3HSL.js.map → chunk-PQQF5KOW.js.map} +0 -0
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2;
|
|
2
2
|
|
|
3
|
+
var _chunk2XS6LTUPcjs = require('./chunk-2XS6LTUP.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkQ6OUXEK3cjs = require('./chunk-Q6OUXEK3.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
3
9
|
|
|
4
10
|
|
|
5
11
|
|
|
@@ -39,6 +45,11 @@ var _chunkIZ4WRXZAcjs = require('./chunk-IZ4WRXZA.cjs');
|
|
|
39
45
|
|
|
40
46
|
|
|
41
47
|
|
|
48
|
+
|
|
49
|
+
var _chunkQBWEH3IMcjs = require('./chunk-QBWEH3IM.cjs');
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
42
53
|
var _chunkMR3Z4OQIcjs = require('./chunk-MR3Z4OQI.cjs');
|
|
43
54
|
|
|
44
55
|
|
|
@@ -123,7 +134,8 @@ var VECTOR_TOOLS = [
|
|
|
123
134
|
"type",
|
|
124
135
|
"typePath",
|
|
125
136
|
"frame",
|
|
126
|
-
"connector"
|
|
137
|
+
"connector",
|
|
138
|
+
"distort"
|
|
127
139
|
];
|
|
128
140
|
var VECTOR_TRANSFORM_HANDLES = ["nw", "n", "ne", "e", "se", "s", "sw", "w", "rotate"];
|
|
129
141
|
var VECTOR_PATHFINDER_OPERATIONS = ["divide", "trim", "merge", "crop", "outline", "minusBack"];
|
|
@@ -2383,6 +2395,193 @@ function vectorStrokeReach(style) {
|
|
|
2383
2395
|
return reach;
|
|
2384
2396
|
}
|
|
2385
2397
|
|
|
2398
|
+
// src/vector/extrude.ts
|
|
2399
|
+
function vectorPaintSolid(paint) {
|
|
2400
|
+
if (paint == null || paint === "none") return null;
|
|
2401
|
+
if (typeof paint === "string") return paint;
|
|
2402
|
+
const stops = paint.stops;
|
|
2403
|
+
if (_optionalChain([stops, 'optionalAccess', _50 => _50.length])) return stops.reduce((a, b) => Math.abs(b.offset - 0.5) < Math.abs(a.offset - 0.5) ? b : a).color;
|
|
2404
|
+
const colors = paint.colors;
|
|
2405
|
+
if (_optionalChain([colors, 'optionalAccess', _51 => _51.length])) return colors[0];
|
|
2406
|
+
const points = paint.points;
|
|
2407
|
+
return _nullishCoalesce(_optionalChain([points, 'optionalAccess', _52 => _52.find, 'call', _53 => _53((p) => typeof p.color === "string"), 'optionalAccess', _54 => _54.color]), () => ( null));
|
|
2408
|
+
}
|
|
2409
|
+
function shadeVectorColor(color2, amount) {
|
|
2410
|
+
const c = parseVectorColor(color2);
|
|
2411
|
+
if (!c) return color2;
|
|
2412
|
+
const a = Math.min(1, Math.max(-1, amount));
|
|
2413
|
+
const target = a >= 0 ? 1 : 0;
|
|
2414
|
+
const h = (v2) => Math.round(Math.min(1, Math.max(0, v2)) * 255).toString(16).padStart(2, "0");
|
|
2415
|
+
const m = [0, 1, 2].map((k) => c[k] + (target - c[k]) * Math.abs(a));
|
|
2416
|
+
return `#${h(m[0])}${h(m[1])}${h(m[2])}`;
|
|
2417
|
+
}
|
|
2418
|
+
function vectorPathRings(path, tolerance = 0.5) {
|
|
2419
|
+
const rings = [];
|
|
2420
|
+
for (const contour of _chunkBJTCSLF6cjs.pathToContours.call(void 0, path)) {
|
|
2421
|
+
const ring = _chunkBJTCSLF6cjs.flattenChain.call(void 0, _chunkBJTCSLF6cjs.closeContour.call(void 0, contour, true), Math.max(1e-3, tolerance));
|
|
2422
|
+
if (ring.length >= 2) rings.push(ring);
|
|
2423
|
+
}
|
|
2424
|
+
return rings;
|
|
2425
|
+
}
|
|
2426
|
+
function vectorExtrudeFaces(path, params) {
|
|
2427
|
+
const box = _chunkBJTCSLF6cjs.bezierPathBounds.call(void 0, path);
|
|
2428
|
+
if (!box || !path.length) return [];
|
|
2429
|
+
const perspective = params.mode === "perspective";
|
|
2430
|
+
const rad2 = params.angle * Math.PI / 180;
|
|
2431
|
+
const d = [Math.cos(rad2) * Math.max(0, params.depth), Math.sin(rad2) * Math.max(0, params.depth)];
|
|
2432
|
+
const vp = [(box.minX + box.maxX) / 2 + params.vanishingPoint.x, (box.minY + box.maxY) / 2 + params.vanishingPoint.y];
|
|
2433
|
+
const pull = Math.min(1, Math.max(0, params.toward / 100));
|
|
2434
|
+
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]];
|
|
2435
|
+
if (perspective ? pull <= 0 : Math.hypot(d[0], d[1]) < 1e-9) return [];
|
|
2436
|
+
const lr = params.lightAngle * Math.PI / 180;
|
|
2437
|
+
const light = [Math.cos(lr), Math.sin(lr)];
|
|
2438
|
+
const strength = Math.min(1, Math.max(0, params.shading / 100));
|
|
2439
|
+
const u = perspective ? [0, 0] : [d[0] / Math.hypot(d[0], d[1]), d[1] / Math.hypot(d[0], d[1])];
|
|
2440
|
+
const centre = [(box.minX + box.maxX) / 2, (box.minY + box.maxY) / 2];
|
|
2441
|
+
const aim = Math.atan2(centre[1] - vp[1], centre[0] - vp[0]);
|
|
2442
|
+
const across = (p) => {
|
|
2443
|
+
if (!perspective) return -p[0] * u[1] + p[1] * u[0];
|
|
2444
|
+
let a = Math.atan2(p[1] - vp[1], p[0] - vp[0]) - aim;
|
|
2445
|
+
while (a > Math.PI) a -= 2 * Math.PI;
|
|
2446
|
+
while (a <= -Math.PI) a += 2 * Math.PI;
|
|
2447
|
+
return a;
|
|
2448
|
+
};
|
|
2449
|
+
const towardBack = (p, q, l) => {
|
|
2450
|
+
const lp = across(p);
|
|
2451
|
+
const lq = across(q);
|
|
2452
|
+
const t = Math.abs(lq - lp) < 1e-12 ? 0.5 : Math.min(1, Math.max(0, (l - lp) / (lq - lp)));
|
|
2453
|
+
const x = [p[0] + (q[0] - p[0]) * t, p[1] + (q[1] - p[1]) * t];
|
|
2454
|
+
return perspective ? -Math.hypot(vp[0] - x[0], vp[1] - x[1]) : x[0] * u[0] + x[1] * u[1];
|
|
2455
|
+
};
|
|
2456
|
+
const faces = [];
|
|
2457
|
+
for (const ring of vectorPathRings(path, 0.25)) {
|
|
2458
|
+
for (let i = 0; i < ring.length; i++) {
|
|
2459
|
+
const p = ring[i];
|
|
2460
|
+
const q = ring[(i + 1) % ring.length];
|
|
2461
|
+
const ex = q[0] - p[0];
|
|
2462
|
+
const ey = q[1] - p[1];
|
|
2463
|
+
const len2 = Math.hypot(ex, ey);
|
|
2464
|
+
if (len2 < 1e-9) continue;
|
|
2465
|
+
const pb = back(p);
|
|
2466
|
+
const qb = back(q);
|
|
2467
|
+
const mid = [(p[0] + q[0]) / 2, (p[1] + q[1]) / 2];
|
|
2468
|
+
const away = perspective ? [vp[0] - mid[0], vp[1] - mid[1]] : d;
|
|
2469
|
+
let n2 = [ey / len2, -ex / len2];
|
|
2470
|
+
if (n2[0] * away[0] + n2[1] * away[1] < 0) n2 = [-n2[0], -n2[1]];
|
|
2471
|
+
const shade = (n2[0] * light[0] + n2[1] * light[1]) * strength;
|
|
2472
|
+
const lp = across(p);
|
|
2473
|
+
const lq = across(q);
|
|
2474
|
+
faces.push({
|
|
2475
|
+
p,
|
|
2476
|
+
q,
|
|
2477
|
+
lo: Math.min(lp, lq),
|
|
2478
|
+
hi: Math.max(lp, lq),
|
|
2479
|
+
key: towardBack(p, q, (lp + lq) / 2),
|
|
2480
|
+
face: {
|
|
2481
|
+
shade,
|
|
2482
|
+
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" }]
|
|
2483
|
+
}
|
|
2484
|
+
});
|
|
2485
|
+
}
|
|
2486
|
+
}
|
|
2487
|
+
faces.sort((a, b) => a.key - b.key);
|
|
2488
|
+
const n = faces.length;
|
|
2489
|
+
const after = faces.map(() => []);
|
|
2490
|
+
const before = new Array(n).fill(0);
|
|
2491
|
+
const eps = 1e-9;
|
|
2492
|
+
for (let i = 0; i < n; i++) {
|
|
2493
|
+
for (let j = i + 1; j < n; j++) {
|
|
2494
|
+
const lo = Math.max(faces[i].lo, faces[j].lo);
|
|
2495
|
+
const hi = Math.min(faces[i].hi, faces[j].hi);
|
|
2496
|
+
if (hi - lo <= eps * Math.max(1, Math.abs(hi))) continue;
|
|
2497
|
+
const l = (lo + hi) / 2;
|
|
2498
|
+
const di = towardBack(faces[i].p, faces[i].q, l);
|
|
2499
|
+
const dj = towardBack(faces[j].p, faces[j].q, l);
|
|
2500
|
+
if (Math.abs(di - dj) < 1e-9) continue;
|
|
2501
|
+
const [back0, front] = di < dj ? [i, j] : [j, i];
|
|
2502
|
+
after[back0].push(front);
|
|
2503
|
+
before[front]++;
|
|
2504
|
+
}
|
|
2505
|
+
}
|
|
2506
|
+
const order = [];
|
|
2507
|
+
const done = new Array(n).fill(false);
|
|
2508
|
+
let next = 0;
|
|
2509
|
+
while (order.length < n) {
|
|
2510
|
+
let pick = -1;
|
|
2511
|
+
for (let i = next; i < n; i++) {
|
|
2512
|
+
if (!done[i] && before[i] === 0) {
|
|
2513
|
+
pick = i;
|
|
2514
|
+
break;
|
|
2515
|
+
}
|
|
2516
|
+
}
|
|
2517
|
+
if (pick < 0) pick = done.indexOf(false);
|
|
2518
|
+
done[pick] = true;
|
|
2519
|
+
order.push(pick);
|
|
2520
|
+
for (const k of after[pick]) before[k]--;
|
|
2521
|
+
while (next < n && done[next]) next++;
|
|
2522
|
+
}
|
|
2523
|
+
return order.map((i) => faces[i].face);
|
|
2524
|
+
}
|
|
2525
|
+
|
|
2526
|
+
// src/vector/brushstroke.ts
|
|
2527
|
+
var VECTOR_BRUSHSTROKE_SCALE = 2;
|
|
2528
|
+
function vectorBrushstrokeBrushes() {
|
|
2529
|
+
return _chunk2XS6LTUPcjs.BUILTIN_BRUSHES.filter((b) => _chunkQBWEH3IMcjs.isBrushstrokeBrush.call(void 0, b));
|
|
2530
|
+
}
|
|
2531
|
+
function vectorBrushstrokeBrush(id) {
|
|
2532
|
+
return _nullishCoalesce(vectorBrushstrokeBrushes().find((b) => b.id === id), () => ( null));
|
|
2533
|
+
}
|
|
2534
|
+
function sanitizeVectorBrushstroke(value) {
|
|
2535
|
+
if (!value || typeof value !== "object") return null;
|
|
2536
|
+
const r = value;
|
|
2537
|
+
if (typeof r.brushId !== "string" || !vectorBrushstrokeBrush(r.brushId)) return null;
|
|
2538
|
+
const out = { brushId: r.brushId };
|
|
2539
|
+
if (typeof r.size === "number" && Number.isFinite(r.size) && r.size > 0) out.size = Math.min(500, r.size);
|
|
2540
|
+
if (Array.isArray(r.pressure)) {
|
|
2541
|
+
const p = r.pressure.filter((v2) => typeof v2 === "number" && Number.isFinite(v2)).map((v2) => Math.min(1, Math.max(0, v2)));
|
|
2542
|
+
if (p.length) out.pressure = p.slice(0, 64);
|
|
2543
|
+
}
|
|
2544
|
+
return out;
|
|
2545
|
+
}
|
|
2546
|
+
function isVectorBrushstrokeLayer(layer) {
|
|
2547
|
+
return layer.kind === "brushstroke" && !!layer.brush && !!vectorBrushstrokeBrush(layer.brush.brushId);
|
|
2548
|
+
}
|
|
2549
|
+
function vectorBrushstrokeReach(layer) {
|
|
2550
|
+
if (!isVectorBrushstrokeLayer(layer)) return 0;
|
|
2551
|
+
return (_nullishCoalesce(layer.brush.size, () => ( vectorBrushstrokeBrush(layer.brush.brushId).tip.size))) / 2;
|
|
2552
|
+
}
|
|
2553
|
+
var cache = new (0, _chunkQBWEH3IMcjs.BrushstrokeCache)(256);
|
|
2554
|
+
var urls = /* @__PURE__ */ new WeakMap();
|
|
2555
|
+
var layerCache = /* @__PURE__ */ new WeakMap();
|
|
2556
|
+
function vectorBrushstrokeImages(node, layer) {
|
|
2557
|
+
if (!isVectorBrushstrokeLayer(layer)) return [];
|
|
2558
|
+
let byLayer = layerCache.get(node);
|
|
2559
|
+
const hit = _optionalChain([byLayer, 'optionalAccess', _55 => _55.get, 'call', _56 => _56(layer)]);
|
|
2560
|
+
if (hit) return hit;
|
|
2561
|
+
const preset = vectorBrushstrokeBrush(layer.brush.brushId);
|
|
2562
|
+
const brush = layer.brush.size ? { ...preset, tip: { ...preset.tip, size: layer.brush.size } } : preset;
|
|
2563
|
+
const solid = _nullishCoalesce(vectorPaintSolid(layer.paint), () => ( "#000000"));
|
|
2564
|
+
const c = _nullishCoalesce(parseVectorColor(solid), () => ( [0, 0, 0, 1]));
|
|
2565
|
+
const color2 = [c[0] * 255, c[1] * 255, c[2] * 255, c[3] * 255].map(Math.round);
|
|
2566
|
+
const out = [];
|
|
2567
|
+
for (const sp of node.subpaths) {
|
|
2568
|
+
if (sp.anchors.length < 2) continue;
|
|
2569
|
+
for (const contour of _chunkBJTCSLF6cjs.pathToContours.call(void 0, subpathsToBezier([sp]))) {
|
|
2570
|
+
const ring = _chunkBJTCSLF6cjs.flattenChain.call(void 0, _chunkBJTCSLF6cjs.closeContour.call(void 0, contour, contour.closed), 0.25);
|
|
2571
|
+
if (contour.closed && ring.length > 2) ring.push(ring[0]);
|
|
2572
|
+
if (ring.length < 2) continue;
|
|
2573
|
+
const stroke = cache.render({ points: ring.map(([x, y]) => ({ x, y })), ...layer.brush.pressure ? { pressure: layer.brush.pressure } : {} }, brush, { scale: VECTOR_BRUSHSTROKE_SCALE, color: color2, maxPixels: 2048 * 2048 });
|
|
2574
|
+
if (!stroke.bounds) continue;
|
|
2575
|
+
let href = urls.get(stroke);
|
|
2576
|
+
if (!href) urls.set(stroke, href = _chunkQBWEH3IMcjs.brushstrokeDataUrl.call(void 0, stroke));
|
|
2577
|
+
out.push({ href, ...stroke.bounds });
|
|
2578
|
+
}
|
|
2579
|
+
}
|
|
2580
|
+
if (!byLayer) layerCache.set(node, byLayer = /* @__PURE__ */ new Map());
|
|
2581
|
+
byLayer.set(layer, out);
|
|
2582
|
+
return out;
|
|
2583
|
+
}
|
|
2584
|
+
|
|
2386
2585
|
// src/vector/paintLayers.ts
|
|
2387
2586
|
var VECTOR_STROKE_SETTING_KEYS = [
|
|
2388
2587
|
"strokeWidth",
|
|
@@ -2465,7 +2664,7 @@ function withVectorFills(node, fills) {
|
|
|
2465
2664
|
const next = { ...node };
|
|
2466
2665
|
if (fills.length === 0 || fills.length === 1 && isPlainVectorPaintLayer(fills[0])) {
|
|
2467
2666
|
delete next.fills;
|
|
2468
|
-
next.fill = _nullishCoalesce(_optionalChain([fills, 'access',
|
|
2667
|
+
next.fill = _nullishCoalesce(_optionalChain([fills, 'access', _57 => _57[0], 'optionalAccess', _58 => _58.paint]), () => ( null));
|
|
2469
2668
|
return next;
|
|
2470
2669
|
}
|
|
2471
2670
|
next.fills = fills.map((l) => ({ ...l }));
|
|
@@ -2490,8 +2689,8 @@ function withVectorStrokes(node, strokes) {
|
|
|
2490
2689
|
var json = (v2) => JSON.stringify(_nullishCoalesce(v2, () => ( null)));
|
|
2491
2690
|
function strokeShorthandDiff(node, top) {
|
|
2492
2691
|
const out = [];
|
|
2493
|
-
if (json(node.stroke) !== json(_optionalChain([top, 'optionalAccess',
|
|
2494
|
-
for (const key of VECTOR_STROKE_SETTING_KEYS) if (json(node[key]) !== json(_optionalChain([top, 'optionalAccess',
|
|
2692
|
+
if (json(node.stroke) !== json(_optionalChain([top, 'optionalAccess', _59 => _59.paint]))) out.push("stroke");
|
|
2693
|
+
for (const key of VECTOR_STROKE_SETTING_KEYS) if (json(node[key]) !== json(_optionalChain([top, 'optionalAccess', _60 => _60[key]]))) out.push(key);
|
|
2495
2694
|
return out;
|
|
2496
2695
|
}
|
|
2497
2696
|
var checked = /* @__PURE__ */ new WeakSet();
|
|
@@ -2508,7 +2707,7 @@ function normalizeVectorPaintStacks(node, prefer = "shorthand") {
|
|
|
2508
2707
|
if (Array.isArray(node.fills)) {
|
|
2509
2708
|
let fills = node.fills;
|
|
2510
2709
|
const top = fills[fills.length - 1];
|
|
2511
|
-
if (prefer === "shorthand" && json(node.fill) !== json(_optionalChain([top, 'optionalAccess',
|
|
2710
|
+
if (prefer === "shorthand" && json(node.fill) !== json(_optionalChain([top, 'optionalAccess', _61 => _61.paint]))) {
|
|
2512
2711
|
if (!draws(node.fill)) fills = [];
|
|
2513
2712
|
else fills = top ? [...fills.slice(0, -1), { ...top, paint: node.fill }] : [{ paint: node.fill }];
|
|
2514
2713
|
}
|
|
@@ -2582,6 +2781,10 @@ function sanitizeVectorStrokeSettings(raw) {
|
|
|
2582
2781
|
function sanitizeVectorStrokes(value) {
|
|
2583
2782
|
if (!Array.isArray(value)) return [];
|
|
2584
2783
|
return value.filter((l) => !!l && typeof l === "object").map((raw) => {
|
|
2784
|
+
if (raw.kind === "brushstroke") {
|
|
2785
|
+
const brush = sanitizeVectorBrushstroke(raw.brush);
|
|
2786
|
+
if (brush) return { ...sanitizeLayerBase(raw), kind: "brushstroke", brush };
|
|
2787
|
+
}
|
|
2585
2788
|
if (raw.kind !== void 0 && raw.kind !== "paint") return { ...raw };
|
|
2586
2789
|
return { ...sanitizeLayerBase(raw), ...sanitizeVectorStrokeSettings(raw) };
|
|
2587
2790
|
});
|
|
@@ -2612,7 +2815,10 @@ function needsVectorPaintLayers(node) {
|
|
|
2612
2815
|
}
|
|
2613
2816
|
function vectorStrokeStackReach(node) {
|
|
2614
2817
|
let reach = 0;
|
|
2615
|
-
for (const l of vectorPaintLayerNodes(node))
|
|
2818
|
+
for (const l of vectorPaintLayerNodes(node)) {
|
|
2819
|
+
if (l.kind === "stroke" && l.drawn) reach = Math.max(reach, vectorStrokeReach(l.node));
|
|
2820
|
+
else if (l.kind === "stroke" && l.layer.visible !== false) reach = Math.max(reach, vectorBrushstrokeReach(l.layer));
|
|
2821
|
+
}
|
|
2616
2822
|
return reach;
|
|
2617
2823
|
}
|
|
2618
2824
|
function hitTestVectorPaintLayer(node, path, p, tolerance = 0) {
|
|
@@ -2717,8 +2923,8 @@ var Measured = class {
|
|
|
2717
2923
|
append(sa, sb, out) {
|
|
2718
2924
|
for (const piece of _chunkBJTCSLF6cjs.trimSegments.call(void 0, this.segs, sa, sb, this.lens)) {
|
|
2719
2925
|
if (degenerate(piece)) continue;
|
|
2720
|
-
const last = _optionalChain([out, 'access',
|
|
2721
|
-
const end = _optionalChain([last, 'optionalAccess',
|
|
2926
|
+
const last = _optionalChain([out, 'access', _62 => _62[out.length - 1], 'optionalAccess', _63 => _63.segs]);
|
|
2927
|
+
const end = _optionalChain([last, 'optionalAccess', _64 => _64[last.length - 1], 'optionalAccess', _65 => _65.at, 'call', _66 => _66(-1)]);
|
|
2722
2928
|
if (!end || Math.hypot(end[0] - piece[0][0], end[1] - piece[0][1]) > 1e-6) out.push({ segs: [piece], closed: false });
|
|
2723
2929
|
else last.push(piece);
|
|
2724
2930
|
}
|
|
@@ -3030,9 +3236,9 @@ function vectorRepeaterCopies(r, pivot) {
|
|
|
3030
3236
|
for (let i = 0; i < n; i++) {
|
|
3031
3237
|
const k = i + offset;
|
|
3032
3238
|
let m = translateMatrix(-pivot.x, -pivot.y);
|
|
3033
|
-
m = multiplyMatrices(m, scaleMatrix(Math.pow((_nullishCoalesce(_optionalChain([r, 'access',
|
|
3239
|
+
m = multiplyMatrices(m, scaleMatrix(Math.pow((_nullishCoalesce(_optionalChain([r, 'access', _67 => _67.scale, 'optionalAccess', _68 => _68.x]), () => ( 100))) / 100, k), Math.pow((_nullishCoalesce(_optionalChain([r, 'access', _69 => _69.scale, 'optionalAccess', _70 => _70.y]), () => ( 100))) / 100, k)));
|
|
3034
3240
|
m = multiplyMatrices(m, rotateMatrix((_nullishCoalesce(r.rotation, () => ( 0))) * k));
|
|
3035
|
-
m = multiplyMatrices(m, translateMatrix(pivot.x + (_nullishCoalesce(_optionalChain([r, 'access',
|
|
3241
|
+
m = multiplyMatrices(m, translateMatrix(pivot.x + (_nullishCoalesce(_optionalChain([r, 'access', _71 => _71.position, 'optionalAccess', _72 => _72.x]), () => ( 0))) * k, pivot.y + (_nullishCoalesce(_optionalChain([r, 'access', _73 => _73.position, 'optionalAccess', _74 => _74.y]), () => ( 0))) * k));
|
|
3036
3242
|
const t = n > 1 ? i / (n - 1) : 0;
|
|
3037
3243
|
const partial = i + 1 === n && fract > 0 ? fract : 1;
|
|
3038
3244
|
out.push({ index: i, matrix: m, opacity: Math.min(1, Math.max(0, (so + (eo - so) * t) * partial)) });
|
|
@@ -3196,7 +3402,7 @@ function mapBezierPath(path, f, tolerance = 0.1, options = {}) {
|
|
|
3196
3402
|
|
|
3197
3403
|
// src/vector/frames.ts
|
|
3198
3404
|
function isVectorFrame(node) {
|
|
3199
|
-
return _optionalChain([node, 'optionalAccess',
|
|
3405
|
+
return _optionalChain([node, 'optionalAccess', _75 => _75.type]) === "group" && !!node.frame && !node.blend && !node.liveBoolean && !node.mask;
|
|
3200
3406
|
}
|
|
3201
3407
|
function vectorFrameRectPath(frame) {
|
|
3202
3408
|
const { x, y, width: w, height: h } = frame;
|
|
@@ -3241,8 +3447,8 @@ function placeSpan(rule, a0, a1, f0, f1, g0, g1) {
|
|
|
3241
3447
|
}
|
|
3242
3448
|
}
|
|
3243
3449
|
function vectorFrameChildMatrix(resizing, box, from, to) {
|
|
3244
|
-
const [x0, x1] = placeSpan(_nullishCoalesce(H[_nullishCoalesce(_optionalChain([resizing, 'optionalAccess',
|
|
3245
|
-
const [y0, y1] = placeSpan(_nullishCoalesce(V[_nullishCoalesce(_optionalChain([resizing, 'optionalAccess',
|
|
3450
|
+
const [x0, x1] = placeSpan(_nullishCoalesce(H[_nullishCoalesce(_optionalChain([resizing, 'optionalAccess', _76 => _76.horizontal]), () => ( "left"))], () => ( "start")), box.x, box.x + box.width, from.x, from.x + from.width, to.x, to.x + to.width);
|
|
3451
|
+
const [y0, y1] = placeSpan(_nullishCoalesce(V[_nullishCoalesce(_optionalChain([resizing, 'optionalAccess', _77 => _77.vertical]), () => ( "top"))], () => ( "start")), box.y, box.y + box.height, from.y, from.y + from.height, to.y, to.y + to.height);
|
|
3246
3452
|
const sx = box.width > 1e-9 ? (x1 - x0) / box.width : 1;
|
|
3247
3453
|
const sy = box.height > 1e-9 ? (y1 - y0) / box.height : 1;
|
|
3248
3454
|
return [sx, 0, 0, sy, x0 - sx * box.x, y0 - sy * box.y];
|
|
@@ -3298,7 +3504,7 @@ function vectorFrameDocument(doc, id, find) {
|
|
|
3298
3504
|
height,
|
|
3299
3505
|
...doc.background ? { background: doc.background } : {},
|
|
3300
3506
|
nodes: [placed],
|
|
3301
|
-
..._optionalChain([doc, 'access',
|
|
3507
|
+
..._optionalChain([doc, 'access', _78 => _78.symbols, 'optionalAccess', _79 => _79.length]) ? { symbols: doc.symbols } : {}
|
|
3302
3508
|
};
|
|
3303
3509
|
}
|
|
3304
3510
|
function getVectorFramePanel(state) {
|
|
@@ -3318,7 +3524,7 @@ function getVectorFramePanel(state) {
|
|
|
3318
3524
|
const one = (values) => values.every((v2) => v2 === values[0]) ? values[0] : "mixed";
|
|
3319
3525
|
return {
|
|
3320
3526
|
frame: f ? { id: f.id, name: _nullishCoalesce(f.name, () => ( "Frame")), artboard: parents.get(f.id) === null, frame: f.frame } : null,
|
|
3321
|
-
resizing: children.length ? { ids: children.map((c) => c.id), horizontal: one(children.map((c) => _nullishCoalesce(_optionalChain([c, 'access',
|
|
3527
|
+
resizing: children.length ? { ids: children.map((c) => c.id), horizontal: one(children.map((c) => _nullishCoalesce(_optionalChain([c, 'access', _80 => _80.resizing, 'optionalAccess', _81 => _81.horizontal]), () => ( "left")))), vertical: one(children.map((c) => _nullishCoalesce(_optionalChain([c, 'access', _82 => _82.resizing, 'optionalAccess', _83 => _83.vertical]), () => ( "top")))) } : null
|
|
3322
3528
|
};
|
|
3323
3529
|
}
|
|
3324
3530
|
|
|
@@ -3704,7 +3910,7 @@ function normalizeVectorFilterParams(type, params, base) {
|
|
|
3704
3910
|
if (!isVectorFilterType(type)) return null;
|
|
3705
3911
|
const out = { ...VECTOR_FILTER_DEFAULTS[type], ..._nullishCoalesce(base, () => ( {})) };
|
|
3706
3912
|
for (const spec of VECTOR_FILTER_PARAM_SPECS[type]) {
|
|
3707
|
-
const v2 = _optionalChain([params, 'optionalAccess',
|
|
3913
|
+
const v2 = _optionalChain([params, 'optionalAccess', _84 => _84[spec.key]]);
|
|
3708
3914
|
if (v2 === void 0) continue;
|
|
3709
3915
|
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));
|
|
3710
3916
|
else if (spec.kind === "color" && typeof v2 === "string" && v2.trim()) out[spec.key] = v2.trim();
|
|
@@ -3836,7 +4042,7 @@ function vectorFilterSvg(filters, id, bounds) {
|
|
|
3836
4042
|
primitives.push(fe("feGaussianBlur", { in: body, stdDeviation: round(f.params.radius / 2), result: name("body") }));
|
|
3837
4043
|
body = name("body");
|
|
3838
4044
|
}
|
|
3839
|
-
const lastResult = _optionalChain([primitives, 'access',
|
|
4045
|
+
const lastResult = _optionalChain([primitives, 'access', _85 => _85[primitives.length - 1], 'optionalAccess', _86 => _86.attrs, 'access', _87 => _87.result]);
|
|
3840
4046
|
if (lastResult !== body) primitives.push(fe("feMerge", {}, [fe("feMergeNode", { in: body })]));
|
|
3841
4047
|
const pad = vectorFilterReach(active) + 2;
|
|
3842
4048
|
return {
|
|
@@ -3851,7 +4057,7 @@ function vectorFilterSvg(filters, id, bounds) {
|
|
|
3851
4057
|
var escapeAttr = (value) => value.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
3852
4058
|
function primitiveMarkup(p) {
|
|
3853
4059
|
const attrs = Object.entries(p.attrs).map(([k, v2]) => ` ${k}="${escapeAttr(String(v2))}"`).join("");
|
|
3854
|
-
return _optionalChain([p, 'access',
|
|
4060
|
+
return _optionalChain([p, 'access', _88 => _88.children, 'optionalAccess', _89 => _89.length]) ? `<${p.tag}${attrs}>${p.children.map(primitiveMarkup).join("")}</${p.tag}>` : `<${p.tag}${attrs}/>`;
|
|
3855
4061
|
}
|
|
3856
4062
|
function vectorFilterMarkup(filter, extra = "") {
|
|
3857
4063
|
return `<filter id="${escapeAttr(filter.id)}" filterUnits="userSpaceOnUse" x="${filter.x}" y="${filter.y}" width="${filter.width}" height="${filter.height}" color-interpolation-filters="sRGB"${extra}>${filter.primitives.map(primitiveMarkup).join("")}</filter>`;
|
|
@@ -3869,7 +4075,7 @@ function sanitizeVectorMask(value) {
|
|
|
3869
4075
|
return r.invert === true ? { type: r.type, invert: true } : { type: r.type };
|
|
3870
4076
|
}
|
|
3871
4077
|
function isVectorMaskGroup(node) {
|
|
3872
|
-
return _optionalChain([node, 'optionalAccess',
|
|
4078
|
+
return _optionalChain([node, 'optionalAccess', _90 => _90.type]) === "group" && !!node.mask && isVectorMaskType(node.mask.type) && !node.blend && !node.liveBoolean && node.children.length > 0;
|
|
3873
4079
|
}
|
|
3874
4080
|
function isVectorMaskActive(node) {
|
|
3875
4081
|
return isVectorMaskGroup(node) && node.children[0].visible !== false;
|
|
@@ -3904,7 +4110,7 @@ function vectorMaskRegionShapes(node, type, parent = IDENTITY_MATRIX, self = tru
|
|
|
3904
4110
|
if (!self && node.visible === false) return [];
|
|
3905
4111
|
if (isVectorFrame(node)) node = vectorFrameDrawn(node);
|
|
3906
4112
|
const m = multiplyMatrices(nodeMatrix(node), parent);
|
|
3907
|
-
if (isVectorMaskActive(node) || node.type === "group" && _optionalChain([node, 'access',
|
|
4113
|
+
if (isVectorMaskActive(node) || node.type === "group" && _optionalChain([node, 'access', _91 => _91.effects, 'optionalAccess', _92 => _92.length])) {
|
|
3908
4114
|
return vectorAppearanceShapes(node).flatMap((s) => regionOfPath(s.path, s.source, type, m));
|
|
3909
4115
|
}
|
|
3910
4116
|
const drawn = expandVectorAppearance(node);
|
|
@@ -4109,7 +4315,7 @@ function fitRuns(runs, length2, fallback) {
|
|
|
4109
4315
|
}
|
|
4110
4316
|
if (left2 > 0) {
|
|
4111
4317
|
if (out.length) out[out.length - 1] = { ...out[out.length - 1], length: out[out.length - 1].length + left2 };
|
|
4112
|
-
else out.push({ length: left2, style: _nullishCoalesce(_optionalChain([runs, 'access',
|
|
4318
|
+
else out.push({ length: left2, style: _nullishCoalesce(_optionalChain([runs, 'access', _93 => _93[runs.length - 1], 'optionalAccess', _94 => _94.style]), () => ( fallback)) });
|
|
4113
4319
|
}
|
|
4114
4320
|
return compact(out);
|
|
4115
4321
|
}
|
|
@@ -4119,7 +4325,7 @@ function styleAt(runs, index, fallback) {
|
|
|
4119
4325
|
if (index < at2 + r.length) return r.style;
|
|
4120
4326
|
at2 += r.length;
|
|
4121
4327
|
}
|
|
4122
|
-
return _nullishCoalesce(_optionalChain([runs, 'access',
|
|
4328
|
+
return _nullishCoalesce(_optionalChain([runs, 'access', _95 => _95[runs.length - 1], 'optionalAccess', _96 => _96.style]), () => ( fallback));
|
|
4123
4329
|
}
|
|
4124
4330
|
function restyleRange(runs, start, end, patch) {
|
|
4125
4331
|
const out = [];
|
|
@@ -4175,7 +4381,7 @@ function paragraphRanges(text) {
|
|
|
4175
4381
|
return out;
|
|
4176
4382
|
}
|
|
4177
4383
|
function fitParagraphRuns(runs, text) {
|
|
4178
|
-
const fallback = _nullishCoalesce(_optionalChain([runs, 'access',
|
|
4384
|
+
const fallback = _nullishCoalesce(_optionalChain([runs, 'access', _97 => _97[0], 'optionalAccess', _98 => _98.style]), () => ( {}));
|
|
4179
4385
|
const out = compact(paragraphRanges(text).map((p) => ({ length: p.end - p.start, style: styleAt(runs, p.start, fallback) })));
|
|
4180
4386
|
return out.length ? out : [{ length: 0, style: fallback }];
|
|
4181
4387
|
}
|
|
@@ -4191,7 +4397,7 @@ var isWide = (code) => code >= 11904 && code <= 40959 || code >= 44032 && code <
|
|
|
4191
4397
|
var layoutCache = /* @__PURE__ */ new WeakMap();
|
|
4192
4398
|
function layoutText(layer, shaper) {
|
|
4193
4399
|
let byShaper = layoutCache.get(layer);
|
|
4194
|
-
const hit = _optionalChain([byShaper, 'optionalAccess',
|
|
4400
|
+
const hit = _optionalChain([byShaper, 'optionalAccess', _99 => _99.get, 'call', _100 => _100(shaper.id)]);
|
|
4195
4401
|
if (hit) return hit;
|
|
4196
4402
|
const out = computeLayout(layer, shaper);
|
|
4197
4403
|
if (!byShaper) {
|
|
@@ -4428,7 +4634,7 @@ function createCanvasTextShaper(options = {}) {
|
|
|
4428
4634
|
return null;
|
|
4429
4635
|
})));
|
|
4430
4636
|
const canvas = make(1, 1);
|
|
4431
|
-
const ctx = _optionalChain([canvas, 'optionalAccess',
|
|
4637
|
+
const ctx = _optionalChain([canvas, 'optionalAccess', _101 => _101.getContext, 'call', _102 => _102("2d")]);
|
|
4432
4638
|
if (!ctx || typeof ctx.measureText !== "function") return null;
|
|
4433
4639
|
const fallback = _nullishCoalesce(options.fallbackFamily, () => ( "sans-serif"));
|
|
4434
4640
|
const available = /* @__PURE__ */ new Map();
|
|
@@ -4501,10 +4707,10 @@ function createOutlineTextShaper(fonts, options = {}) {
|
|
|
4501
4707
|
const entries = fonts.map((f) => {
|
|
4502
4708
|
const e = "face" in f ? f : { face: f };
|
|
4503
4709
|
const names = e.face.names;
|
|
4504
|
-
const family = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(e.family, () => ( _optionalChain([names, 'optionalAccess',
|
|
4505
|
-
const weight = _nullishCoalesce(_nullishCoalesce(e.weight, () => ( _optionalChain([e, 'access',
|
|
4506
|
-
const italic = _nullishCoalesce(e.italic, () => ( Boolean((_nullishCoalesce(_optionalChain([e, 'access',
|
|
4507
|
-
const postScript = _nullishCoalesce(_optionalChain([names, 'optionalAccess',
|
|
4710
|
+
const family = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(e.family, () => ( _optionalChain([names, 'optionalAccess', _103 => _103.fontFamily, 'optionalAccess', _104 => _104.en]))), () => ( Object.values(_nullishCoalesce(_optionalChain([names, 'optionalAccess', _105 => _105.fontFamily]), () => ( {})))[0])), () => ( "Font"));
|
|
4711
|
+
const weight = _nullishCoalesce(_nullishCoalesce(e.weight, () => ( _optionalChain([e, 'access', _106 => _106.face, 'access', _107 => _107.tables, 'optionalAccess', _108 => _108.os2, 'optionalAccess', _109 => _109.usWeightClass]))), () => ( 400));
|
|
4712
|
+
const italic = _nullishCoalesce(e.italic, () => ( Boolean((_nullishCoalesce(_optionalChain([e, 'access', _110 => _110.face, 'access', _111 => _111.tables, 'optionalAccess', _112 => _112.os2, 'optionalAccess', _113 => _113.fsSelection]), () => ( 0))) & 1)));
|
|
4713
|
+
const postScript = _nullishCoalesce(_optionalChain([names, 'optionalAccess', _114 => _114.postScriptName, 'optionalAccess', _115 => _115.en]), () => ( Object.values(_nullishCoalesce(_optionalChain([names, 'optionalAccess', _116 => _116.postScriptName]), () => ( {})))[0]));
|
|
4508
4714
|
return { face: e.face, family, key: family.toLowerCase(), weight, italic, postScript };
|
|
4509
4715
|
});
|
|
4510
4716
|
const fallbackKey = (_nullishCoalesce(options.fallback, () => ( entries[0].family))).toLowerCase();
|
|
@@ -4610,7 +4816,7 @@ function vectorTextHasOutlines() {
|
|
|
4610
4816
|
return typeof getVectorTextShaper().outline === "function";
|
|
4611
4817
|
}
|
|
4612
4818
|
function vectorTextFamilies() {
|
|
4613
|
-
return _nullishCoalesce(_optionalChain([getVectorTextShaper, 'call',
|
|
4819
|
+
return _nullishCoalesce(_optionalChain([getVectorTextShaper, 'call', _117 => _117(), 'access', _118 => _118.families, 'optionalCall', _119 => _119()]), () => ( ["sans-serif", "serif", "monospace"]));
|
|
4614
4820
|
}
|
|
4615
4821
|
var DEFAULT_VECTOR_FONT = { fontFamily: "sans-serif", fontWeight: 400, fontSize: 24 };
|
|
4616
4822
|
var VECTOR_CHARACTER_STYLE_KEYS = ["fontFamily", "fontWeight", "italic", "fontSize", "tracking", "leading", "baselineShift", "underline", "strikethrough"];
|
|
@@ -4785,7 +4991,7 @@ function computeLayout2(node, shaper) {
|
|
|
4785
4991
|
const fragments = [];
|
|
4786
4992
|
const lines = [];
|
|
4787
4993
|
let overflow = false;
|
|
4788
|
-
const fillOf = (f) => _optionalChain([runs, 'access',
|
|
4994
|
+
const fillOf = (f) => _optionalChain([runs, 'access', _120 => _120.find, 'call', _121 => _121((r) => f.start >= r.start && f.start < r.end), 'optionalAccess', _122 => _122.fill]);
|
|
4789
4995
|
const styleOf = (f) => {
|
|
4790
4996
|
const { color: _c, opacity: _o, postScriptName: _p, ...style } = f.style;
|
|
4791
4997
|
return style;
|
|
@@ -4816,11 +5022,11 @@ function computeLayout2(node, shaper) {
|
|
|
4816
5022
|
} else {
|
|
4817
5023
|
const line = text.lines[0];
|
|
4818
5024
|
const measure = measureVectorPath(subpathPath(frame.path), !!frame.flip);
|
|
4819
|
-
const align = _nullishCoalesce(_optionalChain([node, 'access',
|
|
5025
|
+
const align = _nullishCoalesce(_optionalChain([node, 'access', _123 => _123.paragraph, 'optionalAccess', _124 => _124.align]), () => ( "left"));
|
|
4820
5026
|
const start = Math.max(0, _nullishCoalesce(frame.start, () => ( 0)));
|
|
4821
5027
|
const end = Math.max(0, _nullishCoalesce(frame.end, () => ( 0)));
|
|
4822
5028
|
const upright = frame.orientation === "upright";
|
|
4823
|
-
const baselineOffset = pathBaselineOffset(_nullishCoalesce(frame.baseline, () => ( "baseline")), _nullishCoalesce(_optionalChain([line, 'optionalAccess',
|
|
5029
|
+
const baselineOffset = pathBaselineOffset(_nullishCoalesce(frame.baseline, () => ( "baseline")), _nullishCoalesce(_optionalChain([line, 'optionalAccess', _125 => _125.ascent]), () => ( 0)), _nullishCoalesce(_optionalChain([line, 'optionalAccess', _126 => _126.descent]), () => ( 0)));
|
|
4824
5030
|
if (line) {
|
|
4825
5031
|
const chars = line.chars.filter((c) => {
|
|
4826
5032
|
const lo = block.text.charCodeAt(c.index);
|
|
@@ -4829,7 +5035,7 @@ function computeLayout2(node, shaper) {
|
|
|
4829
5035
|
const advanceOf = (c) => {
|
|
4830
5036
|
const pair = charAt(block.text, c.index).length === 2;
|
|
4831
5037
|
const low = pair ? line.chars.find((d) => d.index === c.index + 1) : void 0;
|
|
4832
|
-
return c.advance + (_nullishCoalesce(_optionalChain([low, 'optionalAccess',
|
|
5038
|
+
return c.advance + (_nullishCoalesce(_optionalChain([low, 'optionalAccess', _127 => _127.advance]), () => ( 0)));
|
|
4833
5039
|
};
|
|
4834
5040
|
const pivots = chars.map((c) => c.x + advanceOf(c) / 2);
|
|
4835
5041
|
const positions = vectorPathTextPositions(pivots, [line.x, line.x + line.width], align, measure.length, start, end);
|
|
@@ -4884,7 +5090,7 @@ function computeLayout2(node, shaper) {
|
|
|
4884
5090
|
if (x0 < Infinity) bounds = { x: x0, y: y0, width: x1 - x0, height: y1 - y0 };
|
|
4885
5091
|
else if (frame.kind === "point") {
|
|
4886
5092
|
const l = text.lines[0];
|
|
4887
|
-
bounds = { x: frame.x, y: frame.y - (_nullishCoalesce(_optionalChain([l, 'optionalAccess',
|
|
5093
|
+
bounds = { x: frame.x, y: frame.y - (_nullishCoalesce(_optionalChain([l, 'optionalAccess', _128 => _128.ascent]), () => ( 0))), width: 0, height: (_nullishCoalesce(_optionalChain([l, 'optionalAccess', _129 => _129.ascent]), () => ( 0))) + (_nullishCoalesce(_optionalChain([l, 'optionalAccess', _130 => _130.descent]), () => ( 0))) };
|
|
4888
5094
|
}
|
|
4889
5095
|
}
|
|
4890
5096
|
return { shaper: shaper.id, glyphs, fragments, lines, origin, text, bounds, overflow, missingFonts: text.missingFonts };
|
|
@@ -5005,7 +5211,7 @@ function vectorTextCaret(node, index) {
|
|
|
5005
5211
|
const t = { x: Math.cos(r), y: Math.sin(r) };
|
|
5006
5212
|
const n2 = { x: -t.y, y: t.x };
|
|
5007
5213
|
const o = { x: g2.x + t.x * u, y: g2.y + t.y * u };
|
|
5008
|
-
return { top: { x: o.x - n2.x * g2.ascent, y: o.y - n2.y * g2.ascent }, bottom: { x: o.x + n2.x * g2.descent, y: o.y + n2.y * g2.descent }, line: _nullishCoalesce(_optionalChain([layout, 'access',
|
|
5214
|
+
return { top: { x: o.x - n2.x * g2.ascent, y: o.y - n2.y * g2.ascent }, bottom: { x: o.x + n2.x * g2.descent, y: o.y + n2.y * g2.descent }, line: _nullishCoalesce(_optionalChain([layout, 'access', _131 => _131.fragments, 'access', _132 => _132[g2.fragment], 'optionalAccess', _133 => _133.line]), () => ( 0)) };
|
|
5009
5215
|
};
|
|
5010
5216
|
if (node.frame.kind !== "path") {
|
|
5011
5217
|
const c = caretAt(layout.text, index);
|
|
@@ -5140,7 +5346,7 @@ function sanitizeVectorTextFrame(value, path = "frame") {
|
|
|
5140
5346
|
return { kind: "area", x: num2(f.x, `${path}.x`, -1e7, 1e7), y: num2(f.y, `${path}.y`, -1e7, 1e7), width: num2(f.width, `${path}.width`, 0, 1e7), height: num2(f.height, `${path}.height`, 0, 1e7) };
|
|
5141
5347
|
if (f.kind === "path") {
|
|
5142
5348
|
const sp = f.path;
|
|
5143
|
-
if (!sp || !Array.isArray(sp.anchors) || sp.anchors.length < 2 || !sp.anchors.every((a) => isNum(_optionalChain([a, 'optionalAccess',
|
|
5349
|
+
if (!sp || !Array.isArray(sp.anchors) || sp.anchors.length < 2 || !sp.anchors.every((a) => isNum(_optionalChain([a, 'optionalAccess', _134 => _134.x])) && isNum(_optionalChain([a, 'optionalAccess', _135 => _135.y])))) fail(`${path}.path must be a subpath with at least two anchors.`);
|
|
5144
5350
|
const out = { kind: "path", path: { closed: !!sp.closed, anchors: sp.anchors.map((a) => ({ ...a })) } };
|
|
5145
5351
|
if (f.start !== void 0 && f.start !== 0) out.start = num2(f.start, `${path}.start`, 0, 1e7);
|
|
5146
5352
|
if (f.end !== void 0 && f.end !== 0) out.end = num2(f.end, `${path}.end`, 0, 1e7);
|
|
@@ -5158,7 +5364,7 @@ function sanitizeVectorTextFrame(value, path = "frame") {
|
|
|
5158
5364
|
return fail(`${path}.kind must be point, area or path, got ${JSON.stringify(f.kind)}.`);
|
|
5159
5365
|
}
|
|
5160
5366
|
function normalizeVectorTextRuns(text, runs) {
|
|
5161
|
-
if (!_optionalChain([runs, 'optionalAccess',
|
|
5367
|
+
if (!_optionalChain([runs, 'optionalAccess', _136 => _136.length])) return null;
|
|
5162
5368
|
const cleaned = fitVectorTextRuns(
|
|
5163
5369
|
runs.map((r) => ({ length: r.length, style: stripUndefined(r.style) })),
|
|
5164
5370
|
text.length
|
|
@@ -5192,7 +5398,7 @@ function replaceVectorText(node, start, end, insert) {
|
|
|
5192
5398
|
const clean2 = insert.replace(/\r\n?/g, "\n");
|
|
5193
5399
|
const text = node.text.slice(0, start) + clean2 + node.text.slice(end);
|
|
5194
5400
|
let runs = null;
|
|
5195
|
-
if (_optionalChain([node, 'access',
|
|
5401
|
+
if (_optionalChain([node, 'access', _137 => _137.runs, 'optionalAccess', _138 => _138.length])) {
|
|
5196
5402
|
const fitted = fitVectorTextRuns(node.runs, node.text.length);
|
|
5197
5403
|
const style = styleAt(fitted, start > 0 ? start - 1 : start, {});
|
|
5198
5404
|
runs = normalizeVectorTextRuns(text, spliceRuns(fitted, start, end, clean2.length, style));
|
|
@@ -5208,7 +5414,7 @@ function styleVectorText(node, start, end, patch) {
|
|
|
5208
5414
|
if (whole) {
|
|
5209
5415
|
let next2 = { ...node, font: patchVectorCharacterStyle(node.font, fields, "style") };
|
|
5210
5416
|
const keys = Object.keys(fields).filter((k) => fields[k] !== void 0);
|
|
5211
|
-
if (_optionalChain([next2, 'access',
|
|
5417
|
+
if (_optionalChain([next2, 'access', _139 => _139.runs, 'optionalAccess', _140 => _140.length]) && (keys.length || fill !== void 0)) {
|
|
5212
5418
|
const runs2 = normalizeVectorTextRuns(
|
|
5213
5419
|
next2.text,
|
|
5214
5420
|
next2.runs.map((r) => {
|
|
@@ -5253,7 +5459,7 @@ function bakeVectorTextGeometry(node, m) {
|
|
|
5253
5459
|
...s.baselineShift !== void 0 ? { baselineShift: s.baselineShift * k } : {}
|
|
5254
5460
|
});
|
|
5255
5461
|
const font = scaleStyle(node.font);
|
|
5256
|
-
const runs = _optionalChain([node, 'access',
|
|
5462
|
+
const runs = _optionalChain([node, 'access', _141 => _141.runs, 'optionalAccess', _142 => _142.map, 'call', _143 => _143((r) => ({ length: r.length, style: scaleStyle(r.style) }))]);
|
|
5257
5463
|
const p = node.paragraph;
|
|
5258
5464
|
const paragraph = p ? {
|
|
5259
5465
|
...p,
|
|
@@ -5535,7 +5741,7 @@ function vectorInstanceGroup(node, bake) {
|
|
|
5535
5741
|
const m = _nullishCoalesce(node.transform, () => ( [1, 0, 0, 1, 0, 0]));
|
|
5536
5742
|
const { rigid, residual } = decomposeRigid(m);
|
|
5537
5743
|
const k = Math.sqrt(Math.abs(residual[0] * residual[3] - residual[1] * residual[2]));
|
|
5538
|
-
const hidden = new Set(_nullishCoalesce(_optionalChain([node, 'access',
|
|
5744
|
+
const hidden = new Set(_nullishCoalesce(_optionalChain([node, 'access', _144 => _144.overrides, 'optionalAccess', _145 => _145.hidden]), () => ( [])));
|
|
5539
5745
|
const keep = (list) => list.filter((n) => !hidden.has(n.id)).map((n) => n.type === "group" ? { ...n, children: keep(n.children) } : n);
|
|
5540
5746
|
let children = prefixVectorIds(keep(_nullishCoalesce(node.art, () => ( []))), node.id);
|
|
5541
5747
|
if (!isIdentityMatrix(residual)) children = children.map((c) => bake(c, residual));
|
|
@@ -5548,142 +5754,14 @@ function vectorInstanceGroup(node, bake) {
|
|
|
5548
5754
|
if (node.locked) group.locked = true;
|
|
5549
5755
|
if (node.opacity !== void 0) group.opacity = node.opacity;
|
|
5550
5756
|
if (node.blendMode) group.blendMode = node.blendMode;
|
|
5551
|
-
if (_optionalChain([node, 'access',
|
|
5552
|
-
if (_optionalChain([node, 'access',
|
|
5757
|
+
if (_optionalChain([node, 'access', _146 => _146.filters, 'optionalAccess', _147 => _147.length])) group.filters = node.filters;
|
|
5758
|
+
if (_optionalChain([node, 'access', _148 => _148.effects, 'optionalAccess', _149 => _149.length])) group.effects = node.effects;
|
|
5553
5759
|
if (node.booleanOperation) group.booleanOperation = node.booleanOperation;
|
|
5554
5760
|
if (node.blendStep) group.blendStep = true;
|
|
5555
5761
|
return group;
|
|
5556
5762
|
}
|
|
5557
5763
|
var composeVectorMatrices = (a, b) => multiplyMatrices(a, b);
|
|
5558
5764
|
|
|
5559
|
-
// src/vector/extrude.ts
|
|
5560
|
-
function vectorPaintSolid(paint) {
|
|
5561
|
-
if (paint == null || paint === "none") return null;
|
|
5562
|
-
if (typeof paint === "string") return paint;
|
|
5563
|
-
const stops = paint.stops;
|
|
5564
|
-
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;
|
|
5565
|
-
const colors = paint.colors;
|
|
5566
|
-
if (_optionalChain([colors, 'optionalAccess', _144 => _144.length])) return colors[0];
|
|
5567
|
-
const points = paint.points;
|
|
5568
|
-
return _nullishCoalesce(_optionalChain([points, 'optionalAccess', _145 => _145.find, 'call', _146 => _146((p) => typeof p.color === "string"), 'optionalAccess', _147 => _147.color]), () => ( null));
|
|
5569
|
-
}
|
|
5570
|
-
function shadeVectorColor(color2, amount) {
|
|
5571
|
-
const c = parseVectorColor(color2);
|
|
5572
|
-
if (!c) return color2;
|
|
5573
|
-
const a = Math.min(1, Math.max(-1, amount));
|
|
5574
|
-
const target = a >= 0 ? 1 : 0;
|
|
5575
|
-
const h = (v2) => Math.round(Math.min(1, Math.max(0, v2)) * 255).toString(16).padStart(2, "0");
|
|
5576
|
-
const m = [0, 1, 2].map((k) => c[k] + (target - c[k]) * Math.abs(a));
|
|
5577
|
-
return `#${h(m[0])}${h(m[1])}${h(m[2])}`;
|
|
5578
|
-
}
|
|
5579
|
-
function vectorPathRings(path, tolerance = 0.5) {
|
|
5580
|
-
const rings = [];
|
|
5581
|
-
for (const contour of _chunkBJTCSLF6cjs.pathToContours.call(void 0, path)) {
|
|
5582
|
-
const ring = _chunkBJTCSLF6cjs.flattenChain.call(void 0, _chunkBJTCSLF6cjs.closeContour.call(void 0, contour, true), Math.max(1e-3, tolerance));
|
|
5583
|
-
if (ring.length >= 2) rings.push(ring);
|
|
5584
|
-
}
|
|
5585
|
-
return rings;
|
|
5586
|
-
}
|
|
5587
|
-
function vectorExtrudeFaces(path, params) {
|
|
5588
|
-
const box = _chunkBJTCSLF6cjs.bezierPathBounds.call(void 0, path);
|
|
5589
|
-
if (!box || !path.length) return [];
|
|
5590
|
-
const perspective = params.mode === "perspective";
|
|
5591
|
-
const rad2 = params.angle * Math.PI / 180;
|
|
5592
|
-
const d = [Math.cos(rad2) * Math.max(0, params.depth), Math.sin(rad2) * Math.max(0, params.depth)];
|
|
5593
|
-
const vp = [(box.minX + box.maxX) / 2 + params.vanishingPoint.x, (box.minY + box.maxY) / 2 + params.vanishingPoint.y];
|
|
5594
|
-
const pull = Math.min(1, Math.max(0, params.toward / 100));
|
|
5595
|
-
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]];
|
|
5596
|
-
if (perspective ? pull <= 0 : Math.hypot(d[0], d[1]) < 1e-9) return [];
|
|
5597
|
-
const lr = params.lightAngle * Math.PI / 180;
|
|
5598
|
-
const light = [Math.cos(lr), Math.sin(lr)];
|
|
5599
|
-
const strength = Math.min(1, Math.max(0, params.shading / 100));
|
|
5600
|
-
const u = perspective ? [0, 0] : [d[0] / Math.hypot(d[0], d[1]), d[1] / Math.hypot(d[0], d[1])];
|
|
5601
|
-
const centre = [(box.minX + box.maxX) / 2, (box.minY + box.maxY) / 2];
|
|
5602
|
-
const aim = Math.atan2(centre[1] - vp[1], centre[0] - vp[0]);
|
|
5603
|
-
const across = (p) => {
|
|
5604
|
-
if (!perspective) return -p[0] * u[1] + p[1] * u[0];
|
|
5605
|
-
let a = Math.atan2(p[1] - vp[1], p[0] - vp[0]) - aim;
|
|
5606
|
-
while (a > Math.PI) a -= 2 * Math.PI;
|
|
5607
|
-
while (a <= -Math.PI) a += 2 * Math.PI;
|
|
5608
|
-
return a;
|
|
5609
|
-
};
|
|
5610
|
-
const towardBack = (p, q, l) => {
|
|
5611
|
-
const lp = across(p);
|
|
5612
|
-
const lq = across(q);
|
|
5613
|
-
const t = Math.abs(lq - lp) < 1e-12 ? 0.5 : Math.min(1, Math.max(0, (l - lp) / (lq - lp)));
|
|
5614
|
-
const x = [p[0] + (q[0] - p[0]) * t, p[1] + (q[1] - p[1]) * t];
|
|
5615
|
-
return perspective ? -Math.hypot(vp[0] - x[0], vp[1] - x[1]) : x[0] * u[0] + x[1] * u[1];
|
|
5616
|
-
};
|
|
5617
|
-
const faces = [];
|
|
5618
|
-
for (const ring of vectorPathRings(path, 0.25)) {
|
|
5619
|
-
for (let i = 0; i < ring.length; i++) {
|
|
5620
|
-
const p = ring[i];
|
|
5621
|
-
const q = ring[(i + 1) % ring.length];
|
|
5622
|
-
const ex = q[0] - p[0];
|
|
5623
|
-
const ey = q[1] - p[1];
|
|
5624
|
-
const len2 = Math.hypot(ex, ey);
|
|
5625
|
-
if (len2 < 1e-9) continue;
|
|
5626
|
-
const pb = back(p);
|
|
5627
|
-
const qb = back(q);
|
|
5628
|
-
const mid = [(p[0] + q[0]) / 2, (p[1] + q[1]) / 2];
|
|
5629
|
-
const away = perspective ? [vp[0] - mid[0], vp[1] - mid[1]] : d;
|
|
5630
|
-
let n2 = [ey / len2, -ex / len2];
|
|
5631
|
-
if (n2[0] * away[0] + n2[1] * away[1] < 0) n2 = [-n2[0], -n2[1]];
|
|
5632
|
-
const shade = (n2[0] * light[0] + n2[1] * light[1]) * strength;
|
|
5633
|
-
const lp = across(p);
|
|
5634
|
-
const lq = across(q);
|
|
5635
|
-
faces.push({
|
|
5636
|
-
p,
|
|
5637
|
-
q,
|
|
5638
|
-
lo: Math.min(lp, lq),
|
|
5639
|
-
hi: Math.max(lp, lq),
|
|
5640
|
-
key: towardBack(p, q, (lp + lq) / 2),
|
|
5641
|
-
face: {
|
|
5642
|
-
shade,
|
|
5643
|
-
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" }]
|
|
5644
|
-
}
|
|
5645
|
-
});
|
|
5646
|
-
}
|
|
5647
|
-
}
|
|
5648
|
-
faces.sort((a, b) => a.key - b.key);
|
|
5649
|
-
const n = faces.length;
|
|
5650
|
-
const after = faces.map(() => []);
|
|
5651
|
-
const before = new Array(n).fill(0);
|
|
5652
|
-
const eps = 1e-9;
|
|
5653
|
-
for (let i = 0; i < n; i++) {
|
|
5654
|
-
for (let j = i + 1; j < n; j++) {
|
|
5655
|
-
const lo = Math.max(faces[i].lo, faces[j].lo);
|
|
5656
|
-
const hi = Math.min(faces[i].hi, faces[j].hi);
|
|
5657
|
-
if (hi - lo <= eps * Math.max(1, Math.abs(hi))) continue;
|
|
5658
|
-
const l = (lo + hi) / 2;
|
|
5659
|
-
const di = towardBack(faces[i].p, faces[i].q, l);
|
|
5660
|
-
const dj = towardBack(faces[j].p, faces[j].q, l);
|
|
5661
|
-
if (Math.abs(di - dj) < 1e-9) continue;
|
|
5662
|
-
const [back0, front] = di < dj ? [i, j] : [j, i];
|
|
5663
|
-
after[back0].push(front);
|
|
5664
|
-
before[front]++;
|
|
5665
|
-
}
|
|
5666
|
-
}
|
|
5667
|
-
const order = [];
|
|
5668
|
-
const done = new Array(n).fill(false);
|
|
5669
|
-
let next = 0;
|
|
5670
|
-
while (order.length < n) {
|
|
5671
|
-
let pick = -1;
|
|
5672
|
-
for (let i = next; i < n; i++) {
|
|
5673
|
-
if (!done[i] && before[i] === 0) {
|
|
5674
|
-
pick = i;
|
|
5675
|
-
break;
|
|
5676
|
-
}
|
|
5677
|
-
}
|
|
5678
|
-
if (pick < 0) pick = done.indexOf(false);
|
|
5679
|
-
done[pick] = true;
|
|
5680
|
-
order.push(pick);
|
|
5681
|
-
for (const k of after[pick]) before[k]--;
|
|
5682
|
-
while (next < n && done[next]) next++;
|
|
5683
|
-
}
|
|
5684
|
-
return order.map((i) => faces[i].face);
|
|
5685
|
-
}
|
|
5686
|
-
|
|
5687
5765
|
// src/vector/bevel.ts
|
|
5688
5766
|
var MITER_LIMIT = 4;
|
|
5689
5767
|
function crossing2(a, b, c, d) {
|
|
@@ -5930,8 +6008,8 @@ function vectorLensDrawn(node) {
|
|
|
5930
6008
|
if (wire) {
|
|
5931
6009
|
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)) }));
|
|
5932
6010
|
} else if (recolour) {
|
|
5933
|
-
const fills = _optionalChain([shape, 'access',
|
|
5934
|
-
const strokes = _optionalChain([shape, 'access',
|
|
6011
|
+
const fills = _optionalChain([shape, 'access', _150 => _150.source, 'access', _151 => _151.fills, 'optionalAccess', _152 => _152.map, 'call', _153 => _153((l) => ({ ...l, paint: _nullishCoalesce(mapVectorPaintColors(l.paint, recolour), () => ( null)) }))]);
|
|
6012
|
+
const strokes = _optionalChain([shape, 'access', _154 => _154.source, 'access', _155 => _155.strokes, 'optionalAccess', _156 => _156.map, 'call', _157 => _157((l) => ({ ...l, paint: _nullishCoalesce(mapVectorPaintColors(l.paint, recolour), () => ( null)) }))]);
|
|
5935
6013
|
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 } : {} }));
|
|
5936
6014
|
} else contents.push(shapePath(shape, id, changed));
|
|
5937
6015
|
}
|
|
@@ -5944,7 +6022,7 @@ function vectorLensDrawn(node) {
|
|
|
5944
6022
|
const { lens: _l, lensView: _v, transform: _t, opacity: _o, effects: _e, blendMode: _bm, filters: _f, ...style } = node;
|
|
5945
6023
|
const fillOpacity = lens.type === "transparency" ? 1 - Math.min(100, Math.max(0, lens.amount)) / 100 : 0;
|
|
5946
6024
|
children.push({ ...style, id: `${node.id}~lens-fill`, stroke: null, strokes: void 0, opacity: fillOpacity });
|
|
5947
|
-
const stroked = (_nullishCoalesce(_optionalChain([node, 'access',
|
|
6025
|
+
const stroked = (_nullishCoalesce(_optionalChain([node, 'access', _158 => _158.strokes, 'optionalAccess', _159 => _159.length]), () => ( 0))) > 0 || node.stroke != null && node.stroke !== "none";
|
|
5948
6026
|
if (stroked) children.push({ ...style, id: `${node.id}~lens-stroke`, fill: null, fills: void 0 });
|
|
5949
6027
|
const out = {
|
|
5950
6028
|
id: node.id,
|
|
@@ -5953,7 +6031,7 @@ function vectorLensDrawn(node) {
|
|
|
5953
6031
|
...node.transform ? { transform: node.transform } : {},
|
|
5954
6032
|
...node.opacity !== void 0 ? { opacity: node.opacity } : {},
|
|
5955
6033
|
...node.blendMode ? { blendMode: node.blendMode } : {},
|
|
5956
|
-
..._optionalChain([node, 'access',
|
|
6034
|
+
..._optionalChain([node, 'access', _160 => _160.filters, 'optionalAccess', _161 => _161.length]) ? { filters: node.filters } : {},
|
|
5957
6035
|
children
|
|
5958
6036
|
};
|
|
5959
6037
|
drawnCache2.set(node, out);
|
|
@@ -6954,7 +7032,7 @@ function normalizeVectorEffectParams(type, params, base) {
|
|
|
6954
7032
|
if (!defaults) return null;
|
|
6955
7033
|
const out = { ...defaults, ..._nullishCoalesce(base, () => ( {})) };
|
|
6956
7034
|
for (const spec of VECTOR_EFFECT_PARAM_SPECS[type]) {
|
|
6957
|
-
const v2 = _optionalChain([params, 'optionalAccess',
|
|
7035
|
+
const v2 = _optionalChain([params, 'optionalAccess', _162 => _162[spec.key]]);
|
|
6958
7036
|
if (v2 === void 0) continue;
|
|
6959
7037
|
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));
|
|
6960
7038
|
else if (spec.kind === "boolean" && typeof v2 === "boolean") out[spec.key] = v2;
|
|
@@ -6966,7 +7044,7 @@ function normalizeVectorEffectParams(type, params, base) {
|
|
|
6966
7044
|
const o = out;
|
|
6967
7045
|
o.rows = Math.round(o.rows);
|
|
6968
7046
|
o.columns = Math.round(o.columns);
|
|
6969
|
-
const given = _optionalChain([params, 'optionalAccess',
|
|
7047
|
+
const given = _optionalChain([params, 'optionalAccess', _163 => _163.mesh]);
|
|
6970
7048
|
let mesh = given !== void 0 ? isValidWarpMesh(given) ? cloneMesh(given) : null : o.mesh;
|
|
6971
7049
|
if (o.style !== "mesh") mesh = null;
|
|
6972
7050
|
if (mesh && given !== void 0) {
|
|
@@ -6983,10 +7061,10 @@ function createVectorEffect(type, id, params) {
|
|
|
6983
7061
|
}
|
|
6984
7062
|
var isEnabled = (e) => e.enabled !== false && !!VECTOR_EFFECT_DEFAULTS[e.type];
|
|
6985
7063
|
function activeVectorEffects(node) {
|
|
6986
|
-
return _nullishCoalesce(_optionalChain([node, 'access',
|
|
7064
|
+
return _nullishCoalesce(_optionalChain([node, 'access', _164 => _164.effects, 'optionalAccess', _165 => _165.filter, 'call', _166 => _166(isEnabled)]), () => ( []));
|
|
6987
7065
|
}
|
|
6988
7066
|
function hasOwnVectorAppearance(node) {
|
|
6989
|
-
return node.type === "text" || node.type === "instance" || node.type === "group" && !!node.liveBoolean || isVectorFrame(node) || isVectorSymmetryGroup(node) || isVectorLens(node) || !!_optionalChain([node, 'access',
|
|
7067
|
+
return node.type === "text" || node.type === "instance" || node.type === "group" && !!node.liveBoolean || isVectorFrame(node) || isVectorSymmetryGroup(node) || isVectorLens(node) || !!_optionalChain([node, 'access', _167 => _167.effects, 'optionalAccess', _168 => _168.some, 'call', _169 => _169(isEnabled)]);
|
|
6990
7068
|
}
|
|
6991
7069
|
var liveCache = /* @__PURE__ */ new WeakMap();
|
|
6992
7070
|
function hasVectorAppearance(node) {
|
|
@@ -6998,7 +7076,7 @@ function hasVectorAppearance(node) {
|
|
|
6998
7076
|
return v2;
|
|
6999
7077
|
}
|
|
7000
7078
|
function isVectorLiveBoolean(node) {
|
|
7001
|
-
return _optionalChain([node, 'optionalAccess',
|
|
7079
|
+
return _optionalChain([node, 'optionalAccess', _170 => _170.type]) === "group" && !!node.liveBoolean;
|
|
7002
7080
|
}
|
|
7003
7081
|
function vectorOperandOperation(group, child) {
|
|
7004
7082
|
return _nullishCoalesce(_nullishCoalesce(child.booleanOperation, () => ( group.liveBoolean)), () => ( "union"));
|
|
@@ -7115,7 +7193,7 @@ var compareOrder = (a, b) => {
|
|
|
7115
7193
|
for (let i = 0; i < n; i++) if (a[i] !== b[i]) return a[i] - b[i];
|
|
7116
7194
|
return a.length - b.length;
|
|
7117
7195
|
};
|
|
7118
|
-
var add3 = (a, b) => ({ x: a.x + (_nullishCoalesce(_optionalChain([b, 'optionalAccess',
|
|
7196
|
+
var add3 = (a, b) => ({ x: a.x + (_nullishCoalesce(_optionalChain([b, 'optionalAccess', _171 => _171.x]), () => ( 0))), y: a.y + (_nullishCoalesce(_optionalChain([b, 'optionalAccess', _172 => _172.y]), () => ( 0))) });
|
|
7119
7197
|
var mapPaths = (shapes, fn) => {
|
|
7120
7198
|
const out = fn(shapes.map((s) => s.path));
|
|
7121
7199
|
return shapes.map((s, i) => ({ ...s, path: _nullishCoalesce(out[i], () => ( [])) }));
|
|
@@ -7143,7 +7221,7 @@ function contourShapes(shapes, c) {
|
|
|
7143
7221
|
const power = 2 ** (Math.min(100, Math.max(-100, c.acceleration)) / 50);
|
|
7144
7222
|
for (let k = 1; k <= n; k++) {
|
|
7145
7223
|
const [path] = offsetPaths([s.path], (outside ? 1 : -1) * step * k, c.join, c.miterLimit, 1, 0);
|
|
7146
|
-
if (!_optionalChain([path, 'optionalAccess',
|
|
7224
|
+
if (!_optionalChain([path, 'optionalAccess', _173 => _173.length])) break;
|
|
7147
7225
|
const t = (k / n) ** power;
|
|
7148
7226
|
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 };
|
|
7149
7227
|
out.push({ source, path, opacity: s.opacity, order: [outside ? n - k : k, ...s.order] });
|
|
@@ -7218,8 +7296,8 @@ function bevelShapes(shapes, b) {
|
|
|
7218
7296
|
out.push({ source, path: f.path, opacity: s.opacity, order: [...s.order, 1, k] });
|
|
7219
7297
|
});
|
|
7220
7298
|
const [middle] = offsetPaths([s.path], -b.width, "miter", 4, 1, 0);
|
|
7221
|
-
if (_optionalChain([middle, 'optionalAccess',
|
|
7222
|
-
const hasStroke = _optionalChain([s, 'access',
|
|
7299
|
+
if (_optionalChain([middle, 'optionalAccess', _174 => _174.length])) out.push({ ...s, source: fillOnly, path: middle, order: [...s.order, 2] });
|
|
7300
|
+
const hasStroke = _optionalChain([s, 'access', _175 => _175.source, 'access', _176 => _176.strokes, 'optionalAccess', _177 => _177.length]) || s.source.stroke != null && s.source.stroke !== "none";
|
|
7223
7301
|
if (hasStroke) out.push({ ...s, source: { ...s.source, fill: null, fills: void 0 }, order: [...s.order, 3] });
|
|
7224
7302
|
}
|
|
7225
7303
|
return out;
|
|
@@ -7352,10 +7430,10 @@ function vectorEffectInputBounds(node, effectId) {
|
|
|
7352
7430
|
return paths ? pathsBounds(paths) : null;
|
|
7353
7431
|
}
|
|
7354
7432
|
function vectorNodeEnvelope(node) {
|
|
7355
|
-
return _nullishCoalesce(_optionalChain([node, 'optionalAccess',
|
|
7433
|
+
return _nullishCoalesce(_optionalChain([node, 'optionalAccess', _178 => _178.effects, 'optionalAccess', _179 => _179.find, 'call', _180 => _180((e) => e.type === "envelope" && e.enabled !== false)]), () => ( null));
|
|
7356
7434
|
}
|
|
7357
7435
|
function vectorEnvelopeFrame(node, effectId) {
|
|
7358
|
-
const e = effectId ? _optionalChain([node, 'access',
|
|
7436
|
+
const e = effectId ? _optionalChain([node, 'access', _181 => _181.effects, 'optionalAccess', _182 => _182.find, 'call', _183 => _183((x) => x.id === effectId)]) : vectorNodeEnvelope(node);
|
|
7359
7437
|
if (!e || e.type !== "envelope") return null;
|
|
7360
7438
|
const bounds = vectorEffectInputBounds(node, e.id);
|
|
7361
7439
|
if (!bounds || !(bounds.width > 0 && bounds.height > 0)) return null;
|
|
@@ -7416,7 +7494,7 @@ function placement(node) {
|
|
|
7416
7494
|
...node.blendStep ? { blendStep: true } : {},
|
|
7417
7495
|
...node.booleanOperation ? { booleanOperation: node.booleanOperation } : {},
|
|
7418
7496
|
...node.blendMode ? { blendMode: node.blendMode } : {},
|
|
7419
|
-
..._optionalChain([node, 'access',
|
|
7497
|
+
..._optionalChain([node, 'access', _184 => _184.filters, 'optionalAccess', _185 => _185.length]) ? { filters: node.filters } : {}
|
|
7420
7498
|
};
|
|
7421
7499
|
}
|
|
7422
7500
|
function vectorAppearanceNodes(node) {
|
|
@@ -7548,7 +7626,7 @@ function vectorMasterPages(doc) {
|
|
|
7548
7626
|
function fillTokens(node, page, pages) {
|
|
7549
7627
|
const map = (s) => s.replace(/\{page\}/g, String(page)).replace(/\{pages\}/g, String(pages));
|
|
7550
7628
|
if (!/\{pages?\}/.test(node.text)) return node;
|
|
7551
|
-
if (!_optionalChain([node, 'access',
|
|
7629
|
+
if (!_optionalChain([node, 'access', _186 => _186.runs, 'optionalAccess', _187 => _187.length])) return { ...node, text: map(node.text) };
|
|
7552
7630
|
let at2 = 0;
|
|
7553
7631
|
let text = "";
|
|
7554
7632
|
const runs = [];
|
|
@@ -7571,7 +7649,7 @@ function vectorMasterArt(master, page, number, count) {
|
|
|
7571
7649
|
const f = page.frame;
|
|
7572
7650
|
const key = `${page.id}|${f.x}|${f.y}|${f.width}|${f.height}|${number}|${count}`;
|
|
7573
7651
|
let byKey = artCache.get(master);
|
|
7574
|
-
const hit = _optionalChain([byKey, 'optionalAccess',
|
|
7652
|
+
const hit = _optionalChain([byKey, 'optionalAccess', _188 => _188.get, 'call', _189 => _189(key)]);
|
|
7575
7653
|
if (hit) return hit;
|
|
7576
7654
|
const art = master.children.filter((c) => c.visible !== false).map((c) => {
|
|
7577
7655
|
const box = vectorNodeBounds(c);
|
|
@@ -7616,7 +7694,7 @@ function stripVectorMasterArt(doc) {
|
|
|
7616
7694
|
// src/vector/connectors.ts
|
|
7617
7695
|
var SIDES = ["top", "right", "bottom", "left", "center"];
|
|
7618
7696
|
function isVectorConnector(node) {
|
|
7619
|
-
return _optionalChain([node, 'optionalAccess',
|
|
7697
|
+
return _optionalChain([node, 'optionalAccess', _190 => _190.type]) === "path" && !!node.connector;
|
|
7620
7698
|
}
|
|
7621
7699
|
function vectorConnectionSites(nodes, id) {
|
|
7622
7700
|
const node = findVectorNode(nodes, id);
|
|
@@ -7673,7 +7751,7 @@ function facingSite(sites, toward) {
|
|
|
7673
7751
|
}
|
|
7674
7752
|
function storedEnds(node, world) {
|
|
7675
7753
|
const sp = node.subpaths[0];
|
|
7676
|
-
if (!_optionalChain([sp, 'optionalAccess',
|
|
7754
|
+
if (!_optionalChain([sp, 'optionalAccess', _191 => _191.anchors, 'access', _192 => _192.length])) return null;
|
|
7677
7755
|
const a = sp.anchors[0];
|
|
7678
7756
|
const b = sp.anchors[sp.anchors.length - 1];
|
|
7679
7757
|
return [applyMatrix(world, a), applyMatrix(world, b)];
|
|
@@ -7780,8 +7858,8 @@ function routeVectorConnector(nodes, id) {
|
|
|
7780
7858
|
}));
|
|
7781
7859
|
return {
|
|
7782
7860
|
subpaths: [{ closed: false, anchors: local }],
|
|
7783
|
-
startSide: _nullishCoalesce(_optionalChain([s, 'optionalAccess',
|
|
7784
|
-
endSide: _nullishCoalesce(_optionalChain([e, 'optionalAccess',
|
|
7861
|
+
startSide: _nullishCoalesce(_optionalChain([s, 'optionalAccess', _193 => _193.side]), () => ( null)),
|
|
7862
|
+
endSide: _nullishCoalesce(_optionalChain([e, 'optionalAccess', _194 => _194.side]), () => ( null)),
|
|
7785
7863
|
dropped: { start: !!startGlue && !s, end: !!endGlue && !e }
|
|
7786
7864
|
};
|
|
7787
7865
|
}
|
|
@@ -7793,7 +7871,7 @@ function sameSubpaths(a, b) {
|
|
|
7793
7871
|
const o = b[i];
|
|
7794
7872
|
return sp.closed === o.closed && sp.anchors.length === o.anchors.length && sp.anchors.every((p, k) => {
|
|
7795
7873
|
const q = o.anchors[k];
|
|
7796
|
-
return samePoint(p, q) && samePoint(p.in, q.in) && samePoint(p.out, q.out) && (_nullishCoalesce(_optionalChain([p, 'access',
|
|
7874
|
+
return samePoint(p, q) && samePoint(p.in, q.in) && samePoint(p.out, q.out) && (_nullishCoalesce(_optionalChain([p, 'access', _195 => _195.corner, 'optionalAccess', _196 => _196.radius]), () => ( 0))) === (_nullishCoalesce(_optionalChain([q, 'access', _197 => _197.corner, 'optionalAccess', _198 => _198.radius]), () => ( 0)));
|
|
7797
7875
|
});
|
|
7798
7876
|
});
|
|
7799
7877
|
}
|
|
@@ -8072,7 +8150,7 @@ function applyVectorCornersAttribute(subpaths, value) {
|
|
|
8072
8150
|
for (const item of value.trim().split(/\s+/)) {
|
|
8073
8151
|
const m = /^(\d+)\.(\d+):([\d.eE+-]+)(?::([a-z]+))?$/.exec(item);
|
|
8074
8152
|
if (!m) continue;
|
|
8075
|
-
const a = _optionalChain([subpaths, 'access',
|
|
8153
|
+
const a = _optionalChain([subpaths, 'access', _199 => _199[+m[1]], 'optionalAccess', _200 => _200.anchors, 'access', _201 => _201[+m[2]]]);
|
|
8076
8154
|
const radius = parseFloat(m[3]);
|
|
8077
8155
|
if (!a || !(radius > 0)) continue;
|
|
8078
8156
|
const kind = VECTOR_CORNER_KINDS.includes(m[4]) ? m[4] : void 0;
|
|
@@ -8097,7 +8175,7 @@ function vectorPaintToSvg(paint, gradientId, options = {}) {
|
|
|
8097
8175
|
const area2 = bounds2 ? { x: bounds2.x - reach2, y: bounds2.y - reach2, width: bounds2.width + 2 * reach2, height: bounds2.height + 2 * reach2 } : null;
|
|
8098
8176
|
const key2 = `${gradientId}|${_nullishCoalesce(options.role, () => ( "fill"))}|${_nullishCoalesce(options.precision, () => ( 3))}|${area2 ? [area2.x, area2.y, area2.width, area2.height].join(",") : ""}`;
|
|
8099
8177
|
let byKey2 = paintCache.get(paint);
|
|
8100
|
-
const hit = _optionalChain([byKey2, 'optionalAccess',
|
|
8178
|
+
const hit = _optionalChain([byKey2, 'optionalAccess', _202 => _202.get, 'call', _203 => _203(key2)]);
|
|
8101
8179
|
if (hit) return { value: `url(#${gradientId})`, defs: hit };
|
|
8102
8180
|
const defs2 = vectorShadedSvgDefs(paint, gradientId, { bounds: bounds2, area: area2, precision: _nullishCoalesce(options.precision, () => ( 3)) });
|
|
8103
8181
|
if (!byKey2) paintCache.set(paint, byKey2 = /* @__PURE__ */ new Map());
|
|
@@ -8109,7 +8187,7 @@ function vectorPaintToSvg(paint, gradientId, options = {}) {
|
|
|
8109
8187
|
const precision = _nullishCoalesce(options.precision, () => ( 3));
|
|
8110
8188
|
const key = `${gradientId}|${role}|${precision}`;
|
|
8111
8189
|
const owner = _nullishCoalesce(options.node, () => ( paint));
|
|
8112
|
-
const cached = _optionalChain([paintCache, 'access',
|
|
8190
|
+
const cached = _optionalChain([paintCache, 'access', _204 => _204.get, 'call', _205 => _205(owner), 'optionalAccess', _206 => _206.get, 'call', _207 => _207(key)]);
|
|
8113
8191
|
if (cached && (!options.node || (role === "fill" ? options.node.fill : options.node.stroke) === paint)) return { value: `url(#${gradientId})`, defs: cached };
|
|
8114
8192
|
const node = options.node;
|
|
8115
8193
|
const bounds = node ? vectorPathLocalBounds(node) : null;
|
|
@@ -8163,7 +8241,7 @@ function vectorNodeLocalPaintBounds(node) {
|
|
|
8163
8241
|
}
|
|
8164
8242
|
var filterCache = /* @__PURE__ */ new WeakMap();
|
|
8165
8243
|
function vectorNodeFilterSvg(node, id) {
|
|
8166
|
-
if (!_optionalChain([node, 'access',
|
|
8244
|
+
if (!_optionalChain([node, 'access', _208 => _208.filters, 'optionalAccess', _209 => _209.length])) return null;
|
|
8167
8245
|
const hit = filterCache.get(node);
|
|
8168
8246
|
if (hit && hit.id === id) return hit.filter;
|
|
8169
8247
|
const active = activeVectorFilters(node);
|
|
@@ -8245,10 +8323,11 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8245
8323
|
if (node.resizing) out2 += ` data-vector-resizing="${escapeAttr2(JSON.stringify(node.resizing))}"`;
|
|
8246
8324
|
if (node.type === "path" && isVectorShadedPaint(node.fill)) out2 += ` data-vector-shading="${escapeAttr2(JSON.stringify(node.fill))}"`;
|
|
8247
8325
|
if (node.type === "path" && node.connector) out2 += ` data-vector-connector="${escapeAttr2(JSON.stringify(node.connector))}"`;
|
|
8326
|
+
if (node.type === "group" && node.generation) out2 += ` data-vector-generation="${escapeAttr2(JSON.stringify(node.generation))}"`;
|
|
8248
8327
|
if (node.type === "path" && node.lens) out2 += ` data-vector-lens="${escapeAttr2(JSON.stringify(node.lens))}"`;
|
|
8249
8328
|
const blend = vectorBlendModeCss(node.blendMode);
|
|
8250
8329
|
if (blend) out2 += ` style="mix-blend-mode:${blend}"`;
|
|
8251
|
-
if (_optionalChain([node, 'access',
|
|
8330
|
+
if (_optionalChain([node, 'access', _210 => _210.filters, 'optionalAccess', _211 => _211.length])) {
|
|
8252
8331
|
const filter = vectorNodeFilterSvg(node, `${prefix}filter-${node.id}`);
|
|
8253
8332
|
const data = ` data-vector-filters="${escapeAttr2(JSON.stringify(node.filters))}"`;
|
|
8254
8333
|
if (filter) {
|
|
@@ -8295,7 +8374,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8295
8374
|
let out2 = ` stroke="${escapeAttr2(strokeValue)}" stroke-width="${num3(width)}"`;
|
|
8296
8375
|
if (node.strokeLinecap && node.strokeLinecap !== "butt") out2 += ` stroke-linecap="${node.strokeLinecap}"`;
|
|
8297
8376
|
if (node.strokeLinejoin && node.strokeLinejoin !== "miter") out2 += ` stroke-linejoin="${node.strokeLinejoin}"`;
|
|
8298
|
-
if (_optionalChain([node, 'access',
|
|
8377
|
+
if (_optionalChain([node, 'access', _212 => _212.strokeDasharray, 'optionalAccess', _213 => _213.length])) out2 += ` stroke-dasharray="${node.strokeDasharray.map(num3).join(" ")}"`;
|
|
8299
8378
|
return out2;
|
|
8300
8379
|
};
|
|
8301
8380
|
const liveCorners = (node) => {
|
|
@@ -8308,13 +8387,19 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8308
8387
|
let data = ` data-vector-path="" data-vector-fills="${escapeAttr2(JSON.stringify(vectorFills(node)))}" data-vector-strokes="${escapeAttr2(JSON.stringify(vectorStrokes(node)))}"`;
|
|
8309
8388
|
if (node.fillRule === "evenodd") data += ` data-vector-fill-rule="evenodd"`;
|
|
8310
8389
|
lines.push(`${indent(depth)}<g${common(node)}${data}>`);
|
|
8311
|
-
const layers = vectorPaintLayerNodes(node).filter((l) => l.drawn);
|
|
8390
|
+
const layers = vectorPaintLayerNodes(node).filter((l) => l.drawn || l.kind === "stroke" && isVectorBrushstrokeLayer(l.layer) && l.layer.visible !== false);
|
|
8312
8391
|
let geometry = liveCorners(node);
|
|
8313
8392
|
if (!layers.some((l) => l.kind === "fill")) {
|
|
8314
8393
|
lines.push(`${indent(depth + 1)}<path data-vector-part="fill" d="${d}" fill="none"${rule}${geometry}/>`);
|
|
8315
8394
|
geometry = "";
|
|
8316
8395
|
}
|
|
8317
8396
|
for (const l of layers) {
|
|
8397
|
+
if (l.kind === "stroke" && isVectorBrushstrokeLayer(l.layer)) {
|
|
8398
|
+
lines.push(`${indent(depth + 1)}<g data-vector-part="brushstroke" data-vector-layer="${l.index}"${layerAttrs(l.layer)}>`);
|
|
8399
|
+
for (const im of vectorBrushstrokeImages(node, l.layer)) lines.push(`${indent(depth + 2)}<image href="${im.href}" x="${num3(im.x)}" y="${num3(im.y)}" width="${num3(im.width)}" height="${num3(im.height)}" preserveAspectRatio="none"/>`);
|
|
8400
|
+
lines.push(`${indent(depth + 1)}</g>`);
|
|
8401
|
+
continue;
|
|
8402
|
+
}
|
|
8318
8403
|
const id = `${prefix}${l.kind}-${node.id}-${l.index}`;
|
|
8319
8404
|
const paint = vectorPaintToSvg(l.layer.paint, id, { node: l.node, precision, ...l.kind === "stroke" ? { role: "stroke" } : {} });
|
|
8320
8405
|
defs.push(...paintMarkup(l.layer.paint, paint.defs));
|
|
@@ -8338,7 +8423,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8338
8423
|
};
|
|
8339
8424
|
const emit2 = (node, depth) => {
|
|
8340
8425
|
if (node.visible === false && !options.includeHidden) return;
|
|
8341
|
-
const wrappers = _nullishCoalesce(_optionalChain([options, 'access',
|
|
8426
|
+
const wrappers = _nullishCoalesce(_optionalChain([options, 'access', _214 => _214.wrap, 'optionalAccess', _215 => _215[node.id]]), () => ( []));
|
|
8342
8427
|
wrappers.forEach((w2, i) => {
|
|
8343
8428
|
let attrs = w2.id !== void 0 ? ` id="${escapeAttr2(w2.id)}"` : "";
|
|
8344
8429
|
if (w2.transform) attrs += ` transform="${escapeAttr2(w2.transform)}"`;
|
|
@@ -8359,7 +8444,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8359
8444
|
};
|
|
8360
8445
|
const emitMaskGroup = (node, depth) => {
|
|
8361
8446
|
const [source, ...contents] = node.children;
|
|
8362
|
-
const body = _optionalChain([node, 'access',
|
|
8447
|
+
const body = _optionalChain([node, 'access', _216 => _216.effects, 'optionalAccess', _217 => _217.length]) && contents.length ? [{ id: `${node.id}~content`, type: "group", effects: node.effects, children: contents }] : contents;
|
|
8363
8448
|
const settings = { type: node.mask.type, ...node.mask.invert ? { invert: true } : {} };
|
|
8364
8449
|
lines.push(`${indent(depth)}<g${common(node)} data-vector-mask="${escapeAttr2(JSON.stringify(settings))}">`);
|
|
8365
8450
|
const mask = vectorMaskRenderData(node, `${prefix}mask-${node.id}`, `${prefix}mask-filter-${node.id}`, precision);
|
|
@@ -8376,7 +8461,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8376
8461
|
lines.push(`${indent(depth + 1)}<g data-vector-part="mask-source" display="none">`);
|
|
8377
8462
|
emitNode(source, depth + 2);
|
|
8378
8463
|
lines.push(`${indent(depth + 1)}</g>`);
|
|
8379
|
-
if (_optionalChain([mask, 'optionalAccess',
|
|
8464
|
+
if (_optionalChain([mask, 'optionalAccess', _218 => _218.clip])) {
|
|
8380
8465
|
defs.push(`<clipPath id="${escapeAttr2(mask.id)}">${mask.clip.map((c) => `<path d="${c.d}" clip-rule="${c.clipRule}"/>`).join("")}</clipPath>`);
|
|
8381
8466
|
ref = ` clip-path="url(#${escapeAttr2(mask.id)})"`;
|
|
8382
8467
|
}
|
|
@@ -8388,7 +8473,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8388
8473
|
};
|
|
8389
8474
|
const emitTextElement = (node, depth, attrs) => {
|
|
8390
8475
|
const geometry = vectorTextGeometryNode(node);
|
|
8391
|
-
const fields = { text: node.text, font: node.font, ..._optionalChain([node, 'access',
|
|
8476
|
+
const fields = { text: node.text, font: node.font, ..._optionalChain([node, 'access', _219 => _219.runs, 'optionalAccess', _220 => _220.length]) ? { runs: node.runs } : {}, ...node.paragraph ? { paragraph: node.paragraph } : {}, frame: node.frame, ..._optionalChain([node, 'access', _221 => _221.effects, 'optionalAccess', _222 => _222.length]) ? { effects: node.effects } : {} };
|
|
8392
8477
|
let data = ` data-vector-text="${escapeAttr2(JSON.stringify(fields))}"`;
|
|
8393
8478
|
if (hasVectorPaintStacks(node)) data += ` data-vector-fills="${escapeAttr2(JSON.stringify(vectorFills(node)))}" data-vector-strokes="${escapeAttr2(JSON.stringify(vectorStrokes(node)))}"`;
|
|
8394
8479
|
else {
|
|
@@ -8430,12 +8515,12 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8430
8515
|
};
|
|
8431
8516
|
const emitText = (node, depth) => {
|
|
8432
8517
|
const outlines = vectorTextPaths(node).outlines;
|
|
8433
|
-
const effects = !!_optionalChain([node, 'access',
|
|
8518
|
+
const effects = !!_optionalChain([node, 'access', _223 => _223.effects, 'optionalAccess', _224 => _224.some, 'call', _225 => _225((e) => e.enabled !== false)]);
|
|
8434
8519
|
if (!outlines || !effects && options.text !== "outlines") {
|
|
8435
8520
|
emitTextElement(node, depth, common(node));
|
|
8436
8521
|
return;
|
|
8437
8522
|
}
|
|
8438
|
-
lines.push(`${indent(depth)}<g${common(node)} data-vector-live="${escapeAttr2(JSON.stringify({ kind: "text", ..._optionalChain([node, 'access',
|
|
8523
|
+
lines.push(`${indent(depth)}<g${common(node)} data-vector-live="${escapeAttr2(JSON.stringify({ kind: "text", ..._optionalChain([node, 'access', _226 => _226.effects, 'optionalAccess', _227 => _227.length]) ? { effects: node.effects } : {} }))}">`);
|
|
8439
8524
|
lines.push(`${indent(depth + 1)}<g data-vector-part="appearance">`);
|
|
8440
8525
|
for (const shape of vectorAppearanceNodes(node)) emit2(shape, depth + 2);
|
|
8441
8526
|
lines.push(`${indent(depth + 1)}</g>`);
|
|
@@ -8449,7 +8534,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8449
8534
|
const symbolRef = (symbolId) => {
|
|
8450
8535
|
const hit = symbolIds.get(symbolId);
|
|
8451
8536
|
if (hit) return hit;
|
|
8452
|
-
const sym2 = _optionalChain([doc, 'access',
|
|
8537
|
+
const sym2 = _optionalChain([doc, 'access', _228 => _228.symbols, 'optionalAccess', _229 => _229.find, 'call', _230 => _230((x) => x.id === symbolId)]);
|
|
8453
8538
|
if (!sym2) return null;
|
|
8454
8539
|
const id = `${prefix}symbol-${symbolId}`;
|
|
8455
8540
|
symbolIds.set(symbolId, id);
|
|
@@ -8459,20 +8544,20 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8459
8544
|
};
|
|
8460
8545
|
const emitInstance = (node, depth) => {
|
|
8461
8546
|
const data = { symbolId: node.symbolId, ...node.scaleStrokes === false ? { scaleStrokes: false } : {}, ...node.overrides ? { overrides: node.overrides } : {} };
|
|
8462
|
-
const exact2 = !node.overrides && node.scaleStrokes !== false && !_optionalChain([node, 'access',
|
|
8547
|
+
const exact2 = !node.overrides && node.scaleStrokes !== false && !_optionalChain([node, 'access', _231 => _231.effects, 'optionalAccess', _232 => _232.length]) && !_optionalChain([node, 'access', _233 => _233.filters, 'optionalAccess', _234 => _234.length]);
|
|
8463
8548
|
const ref = symbolRef(node.symbolId);
|
|
8464
8549
|
if (exact2 && ref) {
|
|
8465
8550
|
lines.push(`${indent(depth)}<use${common(node)} href="#${escapeAttr2(ref)}" data-vector-instance="${escapeAttr2(JSON.stringify(data))}"/>`);
|
|
8466
8551
|
return;
|
|
8467
8552
|
}
|
|
8468
|
-
const full = { ...data, ...node.transform ? { transform: node.transform } : {}, ..._optionalChain([node, 'access',
|
|
8553
|
+
const full = { ...data, ...node.transform ? { transform: node.transform } : {}, ..._optionalChain([node, 'access', _235 => _235.effects, 'optionalAccess', _236 => _236.length]) ? { effects: node.effects } : {} };
|
|
8469
8554
|
lines.push(`${indent(depth)}<g data-vector-instance="${escapeAttr2(JSON.stringify(full))}">`);
|
|
8470
8555
|
emitNode(vectorInstanceDrawn(node), depth + 1);
|
|
8471
8556
|
lines.push(`${indent(depth)}</g>`);
|
|
8472
8557
|
};
|
|
8473
8558
|
const emitFrame = (node, depth) => {
|
|
8474
8559
|
const f = node.frame;
|
|
8475
|
-
const data = { ...f, ..._optionalChain([node, 'access',
|
|
8560
|
+
const data = { ...f, ..._optionalChain([node, 'access', _237 => _237.effects, 'optionalAccess', _238 => _238.length]) ? { effects: node.effects } : {} };
|
|
8476
8561
|
lines.push(`${indent(depth)}<g${common(node)} data-vector-frame="${escapeAttr2(JSON.stringify(data))}">`);
|
|
8477
8562
|
const rect = vectorFrameRectPath(f);
|
|
8478
8563
|
if (f.fill !== void 0 && f.fill !== null && f.fill !== "none") {
|
|
@@ -8487,7 +8572,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8487
8572
|
ref = ` clip-path="url(#${escapeAttr2(id)})"`;
|
|
8488
8573
|
}
|
|
8489
8574
|
lines.push(`${indent(depth + 1)}<g data-vector-part="frame-contents"${ref}>`);
|
|
8490
|
-
if (_optionalChain([node, 'access',
|
|
8575
|
+
if (_optionalChain([node, 'access', _239 => _239.masterArt, 'optionalAccess', _240 => _240.length])) {
|
|
8491
8576
|
lines.push(`${indent(depth + 2)}<g data-vector-part="frame-master">`);
|
|
8492
8577
|
for (const child of node.masterArt) emit2(child, depth + 3);
|
|
8493
8578
|
lines.push(`${indent(depth + 2)}</g>`);
|
|
@@ -8516,7 +8601,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8516
8601
|
if (hasOwnVectorAppearance(node)) {
|
|
8517
8602
|
const live2 = {
|
|
8518
8603
|
kind: node.type,
|
|
8519
|
-
..._optionalChain([node, 'access',
|
|
8604
|
+
..._optionalChain([node, 'access', _241 => _241.effects, 'optionalAccess', _242 => _242.length]) ? { effects: node.effects } : {},
|
|
8520
8605
|
...node.type === "group" && node.liveBoolean ? { liveBoolean: node.liveBoolean } : {},
|
|
8521
8606
|
...node.type === "group" && node.symmetry ? { symmetry: node.symmetry } : {}
|
|
8522
8607
|
};
|
|
@@ -8567,7 +8652,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8567
8652
|
data += ` data-vector-width-profile="${widthProfileToAttribute(profile)}"`;
|
|
8568
8653
|
if (node.strokeLinecap && node.strokeLinecap !== "butt") data += ` data-vector-stroke-linecap="${node.strokeLinecap}"`;
|
|
8569
8654
|
if (node.strokeLinejoin && node.strokeLinejoin !== "miter") data += ` data-vector-stroke-linejoin="${node.strokeLinejoin}"`;
|
|
8570
|
-
if (_optionalChain([node, 'access',
|
|
8655
|
+
if (_optionalChain([node, 'access', _243 => _243.strokeDasharray, 'optionalAccess', _244 => _244.length])) data += ` data-vector-stroke-dasharray="${node.strokeDasharray.map(num3).join(" ")}"`;
|
|
8571
8656
|
}
|
|
8572
8657
|
lines.push(`${indent(depth)}<g${common(node)}${data}>`);
|
|
8573
8658
|
lines.push(`${indent(depth + 1)}<path data-vector-part="fill" d="${d}"${fillAttrs}${live}/>`);
|
|
@@ -8735,7 +8820,7 @@ function attrOrStyle(el, name) {
|
|
|
8735
8820
|
return el.attrs[name];
|
|
8736
8821
|
}
|
|
8737
8822
|
function urlId(value) {
|
|
8738
|
-
return _nullishCoalesce(_optionalChain([/^url\(\s*['"]?#([^'")\s]+)['"]?\s*\)/, 'access',
|
|
8823
|
+
return _nullishCoalesce(_optionalChain([/^url\(\s*['"]?#([^'")\s]+)['"]?\s*\)/, 'access', _245 => _245.exec, 'call', _246 => _246((_nullishCoalesce(value, () => ( ""))).trim()), 'optionalAccess', _247 => _247[1]]), () => ( null));
|
|
8739
8824
|
}
|
|
8740
8825
|
function clipRulesAsFillRules(el) {
|
|
8741
8826
|
const attrs = { ...el.attrs };
|
|
@@ -8800,9 +8885,9 @@ function resolveGradient(id, raw) {
|
|
|
8800
8885
|
for (let el = first; el && !chain.includes(el) && chain.length < 32; ) {
|
|
8801
8886
|
chain.push(el);
|
|
8802
8887
|
const href = _nullishCoalesce(el.attrs.href, () => ( el.attrs["xlink:href"]));
|
|
8803
|
-
el = _optionalChain([href, 'optionalAccess',
|
|
8888
|
+
el = _optionalChain([href, 'optionalAccess', _248 => _248.startsWith, 'call', _249 => _249("#")]) ? raw.get(href.slice(1)) : void 0;
|
|
8804
8889
|
}
|
|
8805
|
-
const attr = (name) => _optionalChain([chain, 'access',
|
|
8890
|
+
const attr = (name) => _optionalChain([chain, 'access', _250 => _250.find, 'call', _251 => _251((el) => el.attrs[name] !== void 0), 'optionalAccess', _252 => _252.attrs, 'access', _253 => _253[name]]);
|
|
8806
8891
|
const stops = _nullishCoalesce(chain.map(readStops).find((s) => s.length), () => ( []));
|
|
8807
8892
|
if (!stops.length) return null;
|
|
8808
8893
|
const user = attr("gradientUnits") === "userSpaceOnUse";
|
|
@@ -8972,7 +9057,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8972
9057
|
const stackedPath = (g, _style, m, meta) => {
|
|
8973
9058
|
const fillEl = g.children.find((c) => c.name === "path" && c.attrs["data-vector-part"] === "fill");
|
|
8974
9059
|
const subpaths = fillEl ? shapeOf(fillEl) : null;
|
|
8975
|
-
if (!_optionalChain([subpaths, 'optionalAccess',
|
|
9060
|
+
if (!_optionalChain([subpaths, 'optionalAccess', _254 => _254.length])) return null;
|
|
8976
9061
|
const parse = (v2) => {
|
|
8977
9062
|
try {
|
|
8978
9063
|
return v2 ? JSON.parse(v2) : [];
|
|
@@ -8991,7 +9076,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8991
9076
|
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))]);
|
|
8992
9077
|
for (const n of nodes2) {
|
|
8993
9078
|
const prev = out[out.length - 1];
|
|
8994
|
-
if (_optionalChain([prev, 'optionalAccess',
|
|
9079
|
+
if (_optionalChain([prev, 'optionalAccess', _255 => _255.type]) === "path" && n.type === "path" && key(prev) === key(n)) {
|
|
8995
9080
|
const fills = vectorFills(n);
|
|
8996
9081
|
const strokesBefore = vectorStrokes(prev);
|
|
8997
9082
|
if (!(fills.length && strokesBefore.length)) {
|
|
@@ -9009,7 +9094,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9009
9094
|
const part = (name) => g.children.find((c) => c.name === "path" && c.attrs["data-vector-part"] === name);
|
|
9010
9095
|
const fillEl = part("fill");
|
|
9011
9096
|
const subpaths = fillEl ? shapeOf(fillEl) : null;
|
|
9012
|
-
if (!fillEl || !_optionalChain([subpaths, 'optionalAccess',
|
|
9097
|
+
if (!fillEl || !_optionalChain([subpaths, 'optionalAccess', _256 => _256.length])) return null;
|
|
9013
9098
|
const a = g.attrs;
|
|
9014
9099
|
const fs = readStyle(fillEl, style);
|
|
9015
9100
|
const strokeEl = part("stroke");
|
|
@@ -9046,7 +9131,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9046
9131
|
...profile.length ? { strokeWidthProfile: profile } : {},
|
|
9047
9132
|
...keptCap ? { strokeLinecap: keptCap } : {},
|
|
9048
9133
|
...keptJoin ? { strokeLinejoin: keptJoin } : {},
|
|
9049
|
-
..._optionalChain([keptDash, 'optionalAccess',
|
|
9134
|
+
..._optionalChain([keptDash, 'optionalAccess', _257 => _257.length]) ? { strokeDasharray: keptDash } : {}
|
|
9050
9135
|
};
|
|
9051
9136
|
return placed(node, m);
|
|
9052
9137
|
};
|
|
@@ -9111,8 +9196,8 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9111
9196
|
} else {
|
|
9112
9197
|
const fill = json2(g.attrs["data-vector-fill"]);
|
|
9113
9198
|
const stroke = json2(g.attrs["data-vector-stroke"]);
|
|
9114
|
-
node.fill = fill == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call',
|
|
9115
|
-
node.stroke = stroke == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call',
|
|
9199
|
+
node.fill = fill == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call', _258 => _258([{ paint: fill }]), 'access', _259 => _259[0], 'optionalAccess', _260 => _260.paint]), () => ( null));
|
|
9200
|
+
node.stroke = stroke == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call', _261 => _261([{ paint: stroke }]), 'access', _262 => _262[0], 'optionalAccess', _263 => _263.paint]), () => ( null));
|
|
9116
9201
|
const settings = json2(g.attrs["data-vector-stroke-settings"]);
|
|
9117
9202
|
if (settings && typeof settings === "object") {
|
|
9118
9203
|
const strokes = sanitizeVectorStrokes([{ paint: _nullishCoalesce(node.stroke, () => ( "#000")), ...settings }]);
|
|
@@ -9148,8 +9233,8 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9148
9233
|
const anchor = attrOrStyle(el, "text-anchor");
|
|
9149
9234
|
const first0 = (v2) => _nullishCoalesce(numberList(v2)[0], () => ( 0));
|
|
9150
9235
|
const tspan = el.children.find((c) => c.name === "tspan");
|
|
9151
|
-
const x = el.attrs.x !== void 0 ? first0(el.attrs.x) : first0(_optionalChain([tspan, 'optionalAccess',
|
|
9152
|
-
const y = el.attrs.y !== void 0 ? first0(el.attrs.y) : first0(_optionalChain([tspan, 'optionalAccess',
|
|
9236
|
+
const x = el.attrs.x !== void 0 ? first0(el.attrs.x) : first0(_optionalChain([tspan, 'optionalAccess', _264 => _264.attrs, 'access', _265 => _265.x]));
|
|
9237
|
+
const y = el.attrs.y !== void 0 ? first0(el.attrs.y) : first0(_optionalChain([tspan, 'optionalAccess', _266 => _266.attrs, 'access', _267 => _267.y]));
|
|
9153
9238
|
const fillValue = _nullishCoalesce(attrOrStyle(el, "fill"), () => ( style.fill));
|
|
9154
9239
|
let node = {
|
|
9155
9240
|
id: idFor(el),
|
|
@@ -9180,12 +9265,12 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9180
9265
|
if (symbolOfElement.has(el)) return symbolOfElement.get(el);
|
|
9181
9266
|
symbolOfElement.set(el, null);
|
|
9182
9267
|
const own = json2(el.attrs["data-vector-symbol"]);
|
|
9183
|
-
let id = typeof _optionalChain([own, 'optionalAccess',
|
|
9268
|
+
let id = typeof _optionalChain([own, 'optionalAccess', _268 => _268.id]) === "string" && own.id ? own.id : _nullishCoalesce(el.attrs.id, () => ( createId()));
|
|
9184
9269
|
while (usedSymbolIds.has(id)) id = `${id}-${usedSymbolIds.size}`;
|
|
9185
9270
|
usedSymbolIds.add(id);
|
|
9186
9271
|
const style = readStyle(el, rootStyle);
|
|
9187
9272
|
const nodes2 = el.name === "symbol" ? visit2(el, style, IDENTITY_MATRIX) : visitOne({ ...el, attrs: { ...el.attrs, transform: "" } }, rootStyle, parseSvgTransform(el.attrs.transform));
|
|
9188
|
-
symbols.push({ id, name: typeof _optionalChain([own, 'optionalAccess',
|
|
9273
|
+
symbols.push({ id, name: typeof _optionalChain([own, 'optionalAccess', _269 => _269.name]) === "string" && own.name ? own.name : _nullishCoalesce(el.attrs.id, () => ( "Symbol")), nodes: nodes2 });
|
|
9189
9274
|
symbolOfElement.set(el, id);
|
|
9190
9275
|
return id;
|
|
9191
9276
|
};
|
|
@@ -9197,13 +9282,13 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9197
9282
|
if (!symbolId) return null;
|
|
9198
9283
|
const own = json2(el.attrs["data-vector-instance"]);
|
|
9199
9284
|
const place2 = multiplyMatrices(translateMatrix(length(el.attrs.x), length(el.attrs.y)), m);
|
|
9200
|
-
const node = { id: idFor(el), type: "instance", ...meta, symbolId, ..._optionalChain([own, 'optionalAccess',
|
|
9285
|
+
const node = { id: idFor(el), type: "instance", ...meta, symbolId, ..._optionalChain([own, 'optionalAccess', _270 => _270.scaleStrokes]) === false ? { scaleStrokes: false } : {}, ..._optionalChain([own, 'optionalAccess', _271 => _271.overrides]) ? { overrides: own.overrides } : {} };
|
|
9201
9286
|
return isIdentityMatrix(place2) ? node : { ...node, transform: place2 };
|
|
9202
9287
|
};
|
|
9203
9288
|
const ownInstance = (g, m, meta) => {
|
|
9204
9289
|
const raw = json2(g.attrs["data-vector-instance"]);
|
|
9205
9290
|
if (!raw || typeof raw.symbolId !== "string") return null;
|
|
9206
|
-
const sym2 = [...byId.values()].find((e) => e.name === "symbol" && _optionalChain([json2, 'call',
|
|
9291
|
+
const sym2 = [...byId.values()].find((e) => e.name === "symbol" && _optionalChain([json2, 'call', _272 => _272(e.attrs["data-vector-symbol"]), 'optionalAccess', _273 => _273.id]) === raw.symbolId);
|
|
9207
9292
|
const symbolId = sym2 ? symbolFor(sym2) : raw.symbolId;
|
|
9208
9293
|
if (!symbolId) return null;
|
|
9209
9294
|
const t = Array.isArray(raw.transform) && raw.transform.length === 6 && raw.transform.every(Number.isFinite) ? raw.transform : IDENTITY_MATRIX;
|
|
@@ -9211,7 +9296,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9211
9296
|
const drawn = g.children.find((c) => c.name === "g");
|
|
9212
9297
|
const effects = sanitizeVectorEffects(raw.effects);
|
|
9213
9298
|
const node = {
|
|
9214
|
-
id: _nullishCoalesce(_optionalChain([drawn, 'optionalAccess',
|
|
9299
|
+
id: _nullishCoalesce(_optionalChain([drawn, 'optionalAccess', _274 => _274.attrs, 'access', _275 => _275.id]), () => ( idFor(g))),
|
|
9215
9300
|
type: "instance",
|
|
9216
9301
|
...meta,
|
|
9217
9302
|
symbolId,
|
|
@@ -9268,12 +9353,12 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9268
9353
|
const masked = (el, nodes2, m) => {
|
|
9269
9354
|
let out = nodes2;
|
|
9270
9355
|
const clipEl = rawMasks.get(_nullishCoalesce(urlId(attrOrStyle(el, "clip-path")), () => ( "")));
|
|
9271
|
-
if (_optionalChain([clipEl, 'optionalAccess',
|
|
9356
|
+
if (_optionalChain([clipEl, 'optionalAccess', _276 => _276.name]) === "clipPath") {
|
|
9272
9357
|
const source = maskNode(clipEl, m, out, clipEl.attrs.clipPathUnits);
|
|
9273
9358
|
if (source) out = [{ id: idFor({ name: "g", attrs: {}, children: [] }), type: "group", name: "Clip Group", mask: { type: "clip" }, children: [source, ...out] }];
|
|
9274
9359
|
}
|
|
9275
9360
|
const maskEl = rawMasks.get(_nullishCoalesce(urlId(attrOrStyle(el, "mask")), () => ( "")));
|
|
9276
|
-
if (_optionalChain([maskEl, 'optionalAccess',
|
|
9361
|
+
if (_optionalChain([maskEl, 'optionalAccess', _277 => _277.name]) === "mask") {
|
|
9277
9362
|
const source = maskNode(maskEl, m, out, maskEl.attrs.maskContentUnits);
|
|
9278
9363
|
const type = attrOrStyle(maskEl, "mask-type") === "alpha" ? "alpha" : "luminance";
|
|
9279
9364
|
if (source) out = [{ id: idFor({ name: "g", attrs: {}, children: [] }), type: "group", name: "Opacity Mask", mask: { type }, children: [source, ...out] }];
|
|
@@ -9295,19 +9380,19 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9295
9380
|
let sourceEl = part("mask-source");
|
|
9296
9381
|
if (!sourceEl) {
|
|
9297
9382
|
const el = rawMasks.get(_nullishCoalesce(urlId(maskedEl.attrs.mask), () => ( "")));
|
|
9298
|
-
const invert2 = _optionalChain([el, 'optionalAccess',
|
|
9383
|
+
const invert2 = _optionalChain([el, 'optionalAccess', _278 => _278.children, 'access', _279 => _279.find, 'call', _280 => _280((c) => c.name === "g" && c.attrs["data-vector-part"] === "mask-invert")]);
|
|
9299
9384
|
sourceEl = _nullishCoalesce(invert2, () => ( el));
|
|
9300
9385
|
}
|
|
9301
9386
|
const source = sourceEl ? visit2(sourceEl, style, m)[0] : void 0;
|
|
9302
9387
|
let contents = visit2(maskedEl, style, m);
|
|
9303
9388
|
let effects;
|
|
9304
9389
|
const wrapper = contents.length === 1 && contents[0].type === "group" && contents[0].id === `${id}~content` ? contents[0] : null;
|
|
9305
|
-
if (_optionalChain([wrapper, 'optionalAccess',
|
|
9390
|
+
if (_optionalChain([wrapper, 'optionalAccess', _281 => _281.type]) === "group") {
|
|
9306
9391
|
effects = _nullishCoalesce(wrapper.effects, () => ( void 0));
|
|
9307
9392
|
contents = wrapper.children;
|
|
9308
9393
|
}
|
|
9309
9394
|
if (!source) return contents.length ? { id, type: "group", ...meta, children: contents } : null;
|
|
9310
|
-
return { id, type: "group", ...meta, mask, ..._optionalChain([effects, 'optionalAccess',
|
|
9395
|
+
return { id, type: "group", ...meta, mask, ..._optionalChain([effects, 'optionalAccess', _282 => _282.length]) ? { effects } : {}, children: [source, ...contents] };
|
|
9311
9396
|
};
|
|
9312
9397
|
const frameGroup = (g, style, m, meta) => {
|
|
9313
9398
|
const raw = parseJson(g.attrs["data-vector-frame"]);
|
|
@@ -9319,7 +9404,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9319
9404
|
const { rigid, residual } = decomposeRigid(m);
|
|
9320
9405
|
const r = _chunkBJTCSLF6cjs.bezierPathBounds.call(void 0, _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, subpathsToBezier(vectorFrameRectPath(frame)), residual));
|
|
9321
9406
|
const back = invertMatrix(rigid);
|
|
9322
|
-
const effects = sanitizeVectorEffects(_optionalChain([raw, 'optionalAccess',
|
|
9407
|
+
const effects = sanitizeVectorEffects(_optionalChain([raw, 'optionalAccess', _283 => _283.effects]));
|
|
9323
9408
|
return {
|
|
9324
9409
|
id,
|
|
9325
9410
|
type: "group",
|
|
@@ -9353,6 +9438,12 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9353
9438
|
if (resizing) meta.resizing = resizing;
|
|
9354
9439
|
const connector = child.attrs["data-vector-connector"] !== void 0 ? sanitizeVectorConnector(parseJson(child.attrs["data-vector-connector"])) : null;
|
|
9355
9440
|
if (connector) meta.connector = connector;
|
|
9441
|
+
if (child.attrs["data-vector-generation"] !== void 0) {
|
|
9442
|
+
try {
|
|
9443
|
+
meta.generation = _chunkQ6OUXEK3cjs.parseProvenance.call(void 0, parseJson(child.attrs["data-vector-generation"]));
|
|
9444
|
+
} catch (e13) {
|
|
9445
|
+
}
|
|
9446
|
+
}
|
|
9356
9447
|
const lens = child.attrs["data-vector-lens"] !== void 0 ? sanitizeVectorLens(parseJson(child.attrs["data-vector-lens"])) : null;
|
|
9357
9448
|
if (lens) meta.lens = lens;
|
|
9358
9449
|
if (child.name === "g" && child.attrs["data-vector-frame"] !== void 0) {
|
|
@@ -9785,13 +9876,13 @@ function hitTestVectorNode(node, p, tolerance = 0, parent = IDENTITY_MATRIX, opt
|
|
|
9785
9876
|
}
|
|
9786
9877
|
if (isVectorMaskGroup(node)) {
|
|
9787
9878
|
const m = multiplyMatrices(nodeMatrix(node), parent);
|
|
9788
|
-
const entered = !!_optionalChain([options, 'access',
|
|
9879
|
+
const entered = !!_optionalChain([options, 'access', _284 => _284.entered, 'optionalAccess', _285 => _285.has, 'call', _286 => _286(node.id)]);
|
|
9789
9880
|
if (!entered && isVectorMaskActive(node) && !vectorMaskContains(node, applyMatrix(invertMatrix(m), p), tolerance)) return false;
|
|
9790
9881
|
const shown = !entered && hasOwnVectorAppearance(node) ? expandVectorAppearance(node).children : node.children;
|
|
9791
9882
|
for (let i = shown.length - 1; i >= 1; i--) if (hitTestVectorNode(shown[i], p, tolerance, m, options)) return true;
|
|
9792
9883
|
return entered && hitTestVectorMaskSource(node, p, tolerance, m, options);
|
|
9793
9884
|
}
|
|
9794
|
-
if (!(node.type === "group" && (!hasOwnVectorAppearance(node) || _optionalChain([options, 'access',
|
|
9885
|
+
if (!(node.type === "group" && (!hasOwnVectorAppearance(node) || _optionalChain([options, 'access', _287 => _287.entered, 'optionalAccess', _288 => _288.has, 'call', _289 => _289(node.id)])))) node = expandVectorAppearance(node);
|
|
9795
9886
|
if (node.type === "group") {
|
|
9796
9887
|
const m = multiplyMatrices(nodeMatrix(node), parent);
|
|
9797
9888
|
return node.children.some((c) => hitTestVectorNode(c, p, tolerance, m, options));
|
|
@@ -9803,7 +9894,7 @@ function hitTestVectorNode(node, p, tolerance = 0, parent = IDENTITY_MATRIX, opt
|
|
|
9803
9894
|
function hitTestVectorMaskSource(group, p, tolerance, m, options) {
|
|
9804
9895
|
const source = group.children[0];
|
|
9805
9896
|
if (source.visible === false) return false;
|
|
9806
|
-
if (_optionalChain([group, 'access',
|
|
9897
|
+
if (_optionalChain([group, 'access', _290 => _290.mask, 'optionalAccess', _291 => _291.type]) !== "clip") return hitTestVectorNode(source, p, tolerance, m, options);
|
|
9807
9898
|
const paths = collectPathNodes(source).filter((n) => n.visible !== false);
|
|
9808
9899
|
const pt2 = [p.x, p.y];
|
|
9809
9900
|
return paths.some((n) => {
|
|
@@ -9852,24 +9943,24 @@ function mapAnchor(a, m) {
|
|
|
9852
9943
|
}
|
|
9853
9944
|
function bakeIntoGeometry(node, m) {
|
|
9854
9945
|
if (isIdentityMatrix(m)) return node;
|
|
9855
|
-
if (_optionalChain([node, 'access',
|
|
9946
|
+
if (_optionalChain([node, 'access', _292 => _292.effects, 'optionalAccess', _293 => _293.length])) node = { ...node, effects: transformVectorEffects(node.effects, m, node) };
|
|
9856
9947
|
if (isVectorFrame(node)) return bakeFrame(node, m);
|
|
9857
9948
|
if (node.type === "group") {
|
|
9858
9949
|
const group = node;
|
|
9859
9950
|
const children = group.children.map((c) => transformVectorNode(c, m));
|
|
9860
9951
|
const sym2 = group.symmetry ? { symmetry: transformVectorSymmetry(group.symmetry, m) } : {};
|
|
9861
|
-
const spine = _optionalChain([group, 'access',
|
|
9952
|
+
const spine = _optionalChain([group, 'access', _294 => _294.blend, 'optionalAccess', _295 => _295.spine]);
|
|
9862
9953
|
if (!spine) return { ...group, ...sym2, children };
|
|
9863
9954
|
const moved = { closed: spine.closed, anchors: spine.anchors.map((a) => mapAnchor(a, m)) };
|
|
9864
9955
|
return { ...group, children, blend: { ...group.blend, spine: moved } };
|
|
9865
9956
|
}
|
|
9866
9957
|
const path = node.type === "text" ? bakeVectorTextGeometry(node, m) : node;
|
|
9867
9958
|
const flips = m[0] * m[3] - m[1] * m[2] < 0;
|
|
9868
|
-
const mirrored = flips && _optionalChain([path, 'access',
|
|
9959
|
+
const mirrored = flips && _optionalChain([path, 'access', _296 => _296.strokeWidthProfile, 'optionalAccess', _297 => _297.length]);
|
|
9869
9960
|
const layer = (l) => ({
|
|
9870
9961
|
...l,
|
|
9871
9962
|
...isVectorGradient(l.paint) || isVectorShadedPaint(l.paint) ? { paint: transformVectorPaint(l.paint, m) } : {},
|
|
9872
|
-
...flips && _optionalChain([l, 'access',
|
|
9963
|
+
...flips && _optionalChain([l, 'access', _298 => _298.strokeWidthProfile, 'optionalAccess', _299 => _299.length]) ? { strokeWidthProfile: mirrorWidthProfile(l.strokeWidthProfile) } : {}
|
|
9873
9964
|
});
|
|
9874
9965
|
return {
|
|
9875
9966
|
...path,
|
|
@@ -10104,7 +10195,7 @@ function roundSubpaths(subpaths, precision = 3) {
|
|
|
10104
10195
|
|
|
10105
10196
|
// src/vector/symmetry.ts
|
|
10106
10197
|
function isVectorSymmetryGroup(node) {
|
|
10107
|
-
return _optionalChain([node, 'optionalAccess',
|
|
10198
|
+
return _optionalChain([node, 'optionalAccess', _300 => _300.type]) === "group" && !!node.symmetry && !node.blend && !node.liveBoolean && !node.mask && !node.frame;
|
|
10108
10199
|
}
|
|
10109
10200
|
var rad = (deg) => deg * Math.PI / 180;
|
|
10110
10201
|
var exact = (v2) => Math.abs(v2) < 1e-12 ? 0 : v2;
|
|
@@ -10673,5 +10764,12 @@ function transformVectorSymmetry(s, m) {
|
|
|
10673
10764
|
|
|
10674
10765
|
|
|
10675
10766
|
|
|
10676
|
-
exports.isVectorMeshGradient = isVectorMeshGradient; exports.isVectorFreeformGradient = isVectorFreeformGradient; exports.isVectorShadedPaint = isVectorShadedPaint; exports.vectorRgbaToCss = vectorRgbaToCss; exports.VECTOR_MESH_MAX = VECTOR_MESH_MAX; exports.createVectorMeshGradient = createVectorMeshGradient; exports.vectorMeshPointAt = vectorMeshPointAt; exports.vectorMeshColorAt = vectorMeshColorAt; exports.vectorMeshLines = vectorMeshLines; exports.vectorFreeformSpreadScale = vectorFreeformSpreadScale; exports.vectorFreeformLineSegments = vectorFreeformLineSegments; exports.vectorFreeformField = vectorFreeformField; exports.sampleVectorFreeform = sampleVectorFreeform; exports.autoVectorFreeformGradient = autoVectorFreeformGradient; exports.vectorShadedSvgDefs = vectorShadedSvgDefs; exports.mapVectorShadedPaint = mapVectorShadedPaint; exports.transformVectorShadedPaint = transformVectorShadedPaint; exports.sanitizeVectorShadedPaint = sanitizeVectorShadedPaint; exports.removeVectorFreeformPoint = removeVectorFreeformPoint; exports.nearestVectorShadingPoint = nearestVectorShadingPoint; exports.VECTOR_CORNER_KINDS = VECTOR_CORNER_KINDS; exports.VECTOR_GRADIENT_TYPES = VECTOR_GRADIENT_TYPES; exports.VECTOR_GRADIENT_SPREADS = VECTOR_GRADIENT_SPREADS; exports.VECTOR_GRADIENT_INTERPOLATIONS = VECTOR_GRADIENT_INTERPOLATIONS; exports.VECTOR_STROKE_GRADIENT_MODES = VECTOR_STROKE_GRADIENT_MODES; exports.VECTOR_ARROWHEADS = VECTOR_ARROWHEADS; exports.VECTOR_BLEND_MODES = VECTOR_BLEND_MODES; exports.VECTOR_HORIZONTAL_RESIZING = VECTOR_HORIZONTAL_RESIZING; exports.VECTOR_VERTICAL_RESIZING = VECTOR_VERTICAL_RESIZING; exports.VECTOR_LENS_TYPES = VECTOR_LENS_TYPES; exports.VECTOR_CONNECTOR_SIDES = VECTOR_CONNECTOR_SIDES; exports.VECTOR_CONNECTOR_ROUTES = VECTOR_CONNECTOR_ROUTES; exports.VECTOR_BLEND_SPACINGS = VECTOR_BLEND_SPACINGS; exports.VECTOR_MASK_TYPES = VECTOR_MASK_TYPES; exports.VECTOR_SYMMETRY_MODES = VECTOR_SYMMETRY_MODES; exports.VECTOR_TEXT_ALIGNS = VECTOR_TEXT_ALIGNS; exports.VECTOR_PATH_TEXT_BASELINES = VECTOR_PATH_TEXT_BASELINES; exports.VECTOR_PERSPECTIVE_PLANES = VECTOR_PERSPECTIVE_PLANES; exports.VECTOR_CONSTRAINT_KINDS = VECTOR_CONSTRAINT_KINDS; exports.VECTOR_TOOLS = VECTOR_TOOLS; exports.VECTOR_TRANSFORM_HANDLES = VECTOR_TRANSFORM_HANDLES; exports.VECTOR_PATHFINDER_OPERATIONS = VECTOR_PATHFINDER_OPERATIONS; exports.VECTOR_EFFECT_TYPES = VECTOR_EFFECT_TYPES; exports.VECTOR_MERGE_MODES = VECTOR_MERGE_MODES; exports.VECTOR_FILTER_TYPES = VECTOR_FILTER_TYPES; exports.isVectorGradient = isVectorGradient; exports.parseVectorColor = parseVectorColor; exports.VECTOR_GRADIENT_MIN_STOPS = VECTOR_GRADIENT_MIN_STOPS; exports.gradientMidpointRemap = gradientMidpointRemap; exports.sortedVectorGradientStops = sortedVectorGradientStops; exports.vectorGradientNeedsExpansion = vectorGradientNeedsExpansion; exports.vectorGradientRamp = vectorGradientRamp; exports.sampleVectorGradient = sampleVectorGradient; exports.expandVectorGradientStops = expandVectorGradientStops; exports.samplePlainStops = samplePlainStops; exports.reverseVectorGradient = reverseVectorGradient; exports.insertVectorGradientStop = insertVectorGradientStop; exports.moveVectorGradientStop = moveVectorGradientStop; exports.removeVectorGradientStop = removeVectorGradientStop; exports.vectorGradientMidpointPosition = vectorGradientMidpointPosition; exports.vectorGradientMidpointFromPosition = vectorGradientMidpointFromPosition; exports.spanVectorGradientStops = spanVectorGradientStops; exports.hasExplicitGradientGeometry = hasExplicitGradientGeometry; exports.vectorGradientPoints = vectorGradientPoints; exports.vectorBoxMatrix = vectorBoxMatrix; exports.vectorGradientUnitsMatrix = vectorGradientUnitsMatrix; exports.vectorGradientMatrix = vectorGradientMatrix; exports.vectorGradientFocalParam = vectorGradientFocalParam; exports.vectorGradientParam = vectorGradientParam; exports.applyVectorGradientSpread = applyVectorGradientSpread; exports.vectorGradientTAt = vectorGradientTAt; exports.sampleVectorGradientAt = sampleVectorGradientAt; exports.vectorGradientAspect = vectorGradientAspect; exports.explicitVectorGradient = explicitVectorGradient; exports.pinVectorGradient = pinVectorGradient; exports.transformVectorGradient = transformVectorGradient; exports.mapVectorGradient = mapVectorGradient; exports.mapVectorPaint = mapVectorPaint; exports.transformVectorPaint = transformVectorPaint; exports.isCentredVectorGradient = isCentredVectorGradient; exports.vectorGradientHandles = vectorGradientHandles; exports.moveVectorGradientHandle = moveVectorGradientHandle; exports.setVectorGradientVector = setVectorGradientVector; exports.VECTOR_GRADIENT_MAX_PERIODS = VECTOR_GRADIENT_MAX_PERIODS; exports.periodicVectorGradientStops = periodicVectorGradientStops; exports.expandVectorGradientSpread = expandVectorGradientSpread; exports.vectorGradientArea = vectorGradientArea; exports.patternAttrs = patternAttrs; exports.vectorGradientSvgDefs = vectorGradientSvgDefs; exports.sampleVectorPaintDefAt = sampleVectorPaintDefAt; exports.sanitizeVectorGradient = sanitizeVectorGradient; exports.convertVectorGradient = convertVectorGradient; exports.defaultVectorGradient = defaultVectorGradient; exports.applyVectorGradientPatch = applyVectorGradientPatch; exports.IDENTITY_MATRIX = IDENTITY_MATRIX; exports.multiplyMatrices = multiplyMatrices; exports.translateMatrix = translateMatrix; exports.scaleMatrix = scaleMatrix; exports.rotateMatrix = rotateMatrix; exports.matrixAbout = matrixAbout; exports.skewMatrix = skewMatrix; exports.applyMatrix = applyMatrix; exports.isIdentityMatrix = isIdentityMatrix; exports.invertMatrix = invertMatrix; exports.applyMatrixLinear = applyMatrixLinear; exports.matrixRotation = matrixRotation; exports.decomposeRigid = decomposeRigid; exports.isVectorSymmetryGroup = isVectorSymmetryGroup; exports.vectorSymmetryMatrices = vectorSymmetryMatrices; exports.vectorSymmetryDrawn = vectorSymmetryDrawn; exports.vectorSymmetryAxes = vectorSymmetryAxes; exports.sanitizeVectorSymmetry = sanitizeVectorSymmetry; exports.VECTOR_SYMMETRY_MODE_LABELS = VECTOR_SYMMETRY_MODE_LABELS; exports.transformVectorSymmetry = transformVectorSymmetry; exports.vectorCornerAt = vectorCornerAt; exports.vectorCorners = vectorCorners; exports.cornerSetback = cornerSetback; exports.fitCornerRadius = fitCornerRadius; exports.cornerBisectorPoint = cornerBisectorPoint; exports.cornerRadiusChange = cornerRadiusChange; exports.hasVectorCorners = hasVectorCorners; exports.expandVectorCornersOf = expandVectorCornersOf; exports.expandVectorCorners = expandVectorCorners; exports.setAnchorCorner = setAnchorCorner; exports.nextVectorCornerKind = nextVectorCornerKind; exports.setSubpathCorners = setSubpathCorners; exports.VECTOR_WIDTH_PROFILE_MAX_POINTS = VECTOR_WIDTH_PROFILE_MAX_POINTS; exports.VECTOR_WIDTH_PROFILE_MAX_SCALE = VECTOR_WIDTH_PROFILE_MAX_SCALE; exports.VECTOR_WIDTH_SAME_T = VECTOR_WIDTH_SAME_T; exports.VECTOR_WIDTH_PRESETS = VECTOR_WIDTH_PRESETS; exports.VECTOR_WIDTH_PRESET_IDS = VECTOR_WIDTH_PRESET_IDS; exports.sanitizeWidthProfile = sanitizeWidthProfile; exports.isUniformWidthProfile = isUniformWidthProfile; exports.widthProfileAt = widthProfileAt; exports.widthProfileMaxScale = widthProfileMaxScale; exports.widthProfilePreset = widthProfilePreset; exports.widthProfilePresetId = widthProfilePresetId; exports.reverseWidthProfile = reverseWidthProfile; exports.mirrorWidthProfile = mirrorWidthProfile; exports.insertWidthPoint = insertWidthPoint; exports.setWidthPoint = setWidthPoint; exports.removeWidthPoints = removeWidthPoints; exports.taperWaveFactor = taperWaveFactor; exports.generateWidthProfile = generateWidthProfile; exports.VECTOR_PRESSURE_NOMINAL = VECTOR_PRESSURE_NOMINAL; exports.pressureWidthProfile = pressureWidthProfile; exports.dashIntervals = dashIntervals; exports.variableStrokeRings = variableStrokeRings; exports.variableStrokeOutline = variableStrokeOutline; exports.nearestStrokePosition = nearestStrokePosition; exports.strokePositionPoint = strokePositionPoint; exports.isClosedBezierShape = isClosedBezierShape; exports.effectiveStrokeAlign = effectiveStrokeAlign; exports.strokeWidthProfileOf = strokeWidthProfileOf; exports.hasStrokeExtras = hasStrokeExtras; exports.vectorStrokeLineArea = vectorStrokeLineArea; exports.arrowheadWeight = arrowheadWeight; exports.arrowheadInset = arrowheadInset; exports.arrowheadPath = arrowheadPath; exports.vectorStrokeParts = vectorStrokeParts; exports.vectorStrokeOutlinePath = vectorStrokeOutlinePath; exports.hitTestVectorStroke = hitTestVectorStroke; exports.vectorStrokeReach = vectorStrokeReach; exports.VECTOR_STROKE_SETTING_KEYS = VECTOR_STROKE_SETTING_KEYS; exports.VECTOR_BLEND_MODE_LABELS = VECTOR_BLEND_MODE_LABELS; exports.isVectorBlendMode = isVectorBlendMode; exports.vectorBlendModeCss = vectorBlendModeCss; exports.vectorBlendModeFromCss = vectorBlendModeFromCss; exports.isPlainVectorPaintLayer = isPlainVectorPaintLayer; exports.isDrawnVectorPaintLayer = isDrawnVectorPaintLayer; exports.vectorFills = vectorFills; exports.vectorStrokeSettings = vectorStrokeSettings; exports.vectorStrokes = vectorStrokes; exports.hasVectorPaintStacks = hasVectorPaintStacks; exports.withVectorFills = withVectorFills; exports.withVectorStrokes = withVectorStrokes; exports.normalizeVectorPaintStacks = normalizeVectorPaintStacks; exports.sanitizeVectorFills = sanitizeVectorFills; exports.sanitizeVectorStrokeSettings = sanitizeVectorStrokeSettings; exports.sanitizeVectorStrokes = sanitizeVectorStrokes; exports.vectorPaintLayerNodes = vectorPaintLayerNodes; exports.needsVectorPaintLayers = needsVectorPaintLayers; exports.vectorStrokeStackReach = vectorStrokeStackReach; exports.hitTestVectorPaintLayer = hitTestVectorPaintLayer; exports.hitTestVectorPaintStack = hitTestVectorPaintStack; exports.vectorStacksHaveGradient = vectorStacksHaveGradient; exports.newVectorStrokeLayer = newVectorStrokeLayer; exports.vectorTargetPaint = vectorTargetPaint; exports.withVectorTargetPaint = withVectorTargetPaint; exports.effectPathLength = effectPathLength; exports.effectPathVertexCount = effectPathVertexCount; exports.trimIntervals = trimIntervals; exports.trimPaths = trimPaths; exports.trimPathsIndividually = trimPathsIndividually; exports.puckerBloatPaths = puckerBloatPaths; exports.roundCornerPaths = roundCornerPaths; exports.offsetPaths = offsetPaths; exports.sweepPath = sweepPath; exports.twistPaths = twistPaths; exports.zigzagPaths = zigzagPaths; exports.wigglePaths = wigglePaths; exports.mergePaths = mergePaths; exports.vectorRepeaterCopies = vectorRepeaterCopies; exports.repeatPaths = repeatPaths; exports.pathsCenter = pathsCenter; exports.mapVectorPoints = mapVectorPoints; exports.mapVectorSubpaths = mapVectorSubpaths; exports.mapBezierPath = mapBezierPath; exports.isVectorFrame = isVectorFrame; exports.vectorFrameRectPath = vectorFrameRectPath; exports.vectorFrameDrawn = vectorFrameDrawn; exports.vectorFrameContains = vectorFrameContains; exports.vectorFrameChildMatrix = vectorFrameChildMatrix; exports.sanitizeVectorFrame = sanitizeVectorFrame; exports.sanitizeVectorResizing = sanitizeVectorResizing; exports.VECTOR_HORIZONTAL_RESIZING_LABELS = VECTOR_HORIZONTAL_RESIZING_LABELS; exports.VECTOR_VERTICAL_RESIZING_LABELS = VECTOR_VERTICAL_RESIZING_LABELS; exports.vectorBoundsInside = vectorBoundsInside; exports.vectorArtboards = vectorArtboards; exports.vectorFrameDocument = vectorFrameDocument; exports.getVectorFramePanel = getVectorFramePanel; exports.splitIntoFaces = splitIntoFaces; exports.knifePath = knifePath; exports.eraserRegion = eraserRegion; exports.eraseFromFill = eraseFromFill; exports.eraseFromOutline = eraseFromOutline; exports.polylineBounds = polylineBounds; exports.simplifyPolyline = simplifyPolyline; exports.VECTOR_FILTER_DEFAULTS = VECTOR_FILTER_DEFAULTS; exports.VECTOR_FILTER_LABELS = VECTOR_FILTER_LABELS; exports.VECTOR_FILTER_PARAM_SPECS = VECTOR_FILTER_PARAM_SPECS; exports.isVectorFilterType = isVectorFilterType; exports.normalizeVectorFilterParams = normalizeVectorFilterParams; exports.vectorFilterParamKeys = vectorFilterParamKeys; exports.createVectorFilter = createVectorFilter; exports.sanitizeVectorFilters = sanitizeVectorFilters; exports.activeVectorFilters = activeVectorFilters; exports.vectorFilterReach = vectorFilterReach; exports.vectorFilterSvg = vectorFilterSvg; exports.vectorFilterMarkup = vectorFilterMarkup; exports.VECTOR_FILTER_MENU = VECTOR_FILTER_MENU; exports.isVectorMaskType = isVectorMaskType; exports.sanitizeVectorMask = sanitizeVectorMask; exports.isVectorMaskGroup = isVectorMaskGroup; exports.isVectorMaskActive = isVectorMaskActive; exports.vectorMaskSource = vectorMaskSource; exports.vectorMaskContents = vectorMaskContents; exports.vectorMaskOwner = vectorMaskOwner; exports.vectorMaskSummary = vectorMaskSummary; exports.vectorMaskRegionShapes = vectorMaskRegionShapes; exports.vectorMaskRegion = vectorMaskRegion; exports.vectorMaskRegionPath = vectorMaskRegionPath; exports.vectorMaskContains = vectorMaskContains; exports.vectorMaskedShapes = vectorMaskedShapes; exports.vectorMaskedGeometry = vectorMaskedGeometry; exports.vectorMaskedLocalBounds = vectorMaskedLocalBounds; exports.vectorMaskContentBounds = vectorMaskContentBounds; exports.vectorMaskRenderData = vectorMaskRenderData; exports.DEFAULT_TEXT_STYLE = DEFAULT_TEXT_STYLE; exports.DEFAULT_AUTO_LEADING = DEFAULT_AUTO_LEADING; exports.fitRuns = fitRuns; exports.styleAt = styleAt; exports.restyleRange = restyleRange; exports.spliceRuns = spliceRuns; exports.paragraphRanges = paragraphRanges; exports.fitParagraphRuns = fitParagraphRuns; exports.fontOf = fontOf; exports.isTextSpace = isTextSpace; exports.layoutText = layoutText; exports.textIndexAt = textIndexAt; exports.caretAt = caretAt; exports.textDecorations = textDecorations; exports.textRectPath = textRectPath; exports.textFragmentOutline = textFragmentOutline; exports.cssFontFamily = cssFontFamily; exports.cssFont = cssFont; exports.createCanvasTextShaper = createCanvasTextShaper; exports.createOutlineTextShaper = createOutlineTextShaper; exports.createMetricTextShaper = createMetricTextShaper; exports.setVectorTextShaper = setVectorTextShaper; exports.getVectorTextShaper = getVectorTextShaper; exports.vectorTextShaperGeneration = vectorTextShaperGeneration; exports.vectorTextHasOutlines = vectorTextHasOutlines; exports.vectorTextFamilies = vectorTextFamilies; exports.DEFAULT_VECTOR_FONT = DEFAULT_VECTOR_FONT; exports.VECTOR_CHARACTER_STYLE_KEYS = VECTOR_CHARACTER_STYLE_KEYS; exports.VECTOR_PARAGRAPH_STYLE_KEYS = VECTOR_PARAGRAPH_STYLE_KEYS; exports.VectorTextError = VectorTextError; exports.fitVectorTextRuns = fitVectorTextRuns; exports.vectorTextRuns = vectorTextRuns; exports.vectorTextStyleAt = vectorTextStyleAt; exports.measureVectorPath = measureVectorPath; exports.vectorPathAt = vectorPathAt; exports.vectorPathTextPositions = vectorPathTextPositions; exports.layoutVectorText = layoutVectorText; exports.glyphBox = glyphBox; exports.vectorTextPaths = vectorTextPaths; exports.vectorTextPaintSource = vectorTextPaintSource; exports.vectorTextCaret = vectorTextCaret; exports.vectorTextIndexAt = vectorTextIndexAt; exports.vectorTextSelectionQuads = vectorTextSelectionQuads; exports.patchVectorCharacterStyle = patchVectorCharacterStyle; exports.patchVectorParagraphStyle = patchVectorParagraphStyle; exports.sanitizeVectorTextFrame = sanitizeVectorTextFrame; exports.normalizeVectorTextRuns = normalizeVectorTextRuns; exports.sanitizeVectorTextFields = sanitizeVectorTextFields; exports.vectorTextRange = vectorTextRange; exports.replaceVectorText = replaceVectorText; exports.styleVectorText = styleVectorText; exports.bakeVectorTextGeometry = bakeVectorTextGeometry; exports.vectorTextName = vectorTextName; exports.pathTextFrameFromBezier = pathTextFrameFromBezier; exports.vectorTextBoxOutline = vectorTextBoxOutline; exports.vectorTextSpans = vectorTextSpans; exports.vectorTextGeometryNode = vectorTextGeometryNode; exports.vectorTextSpanSvg = vectorTextSpanSvg; exports.VECTOR_SYMBOL_MAX_DEPTH = VECTOR_SYMBOL_MAX_DEPTH; exports.vectorSymbolsUsedIn = vectorSymbolsUsedIn; exports.vectorSymbolUses = vectorSymbolUses; exports.resolveVectorSymbols = resolveVectorSymbols; exports.stripVectorSymbolArt = stripVectorSymbolArt; exports.scaleVectorStrokeWidths = scaleVectorStrokeWidths; exports.tintVectorNode = tintVectorNode; exports.prefixVectorIds = prefixVectorIds; exports.vectorInstanceGroup = vectorInstanceGroup; exports.composeVectorMatrices = composeVectorMatrices; exports.vectorPaintSolid = vectorPaintSolid; exports.shadeVectorColor = shadeVectorColor; exports.vectorPathRings = vectorPathRings; exports.vectorExtrudeFaces = vectorExtrudeFaces; exports.vectorBevelFaces = vectorBevelFaces; exports.isVectorLens = isVectorLens; exports.VECTOR_LENS_LABELS = VECTOR_LENS_LABELS; exports.VECTOR_LENS_SPECS = VECTOR_LENS_SPECS; exports.sanitizeVectorLens = sanitizeVectorLens; exports.vectorLensColorMap = vectorLensColorMap; exports.mapVectorPaintColors = mapVectorPaintColors; exports.vectorLensDrawn = vectorLensDrawn; exports.resolveVectorLenses = resolveVectorLenses; exports.stripVectorLensViews = stripVectorLensViews; exports.WARP_STYLES = WARP_STYLES; exports.WARP_STYLE_LABELS = WARP_STYLE_LABELS; exports.warpPresetGrid = warpPresetGrid; exports.warpPresetMesh = warpPresetMesh; exports.warpMeshColumns = warpMeshColumns; exports.warpMeshRows = warpMeshRows; exports.isValidWarpMesh = isValidWarpMesh; exports.fitWarpMesh = fitWarpMesh; exports.identityWarpMesh = identityWarpMesh; exports.evalWarpMesh = evalWarpMesh; exports.splitWarpMeshU = splitWarpMeshU; exports.splitWarpMeshV = splitWarpMeshV; exports.removeWarpMeshSplitU = removeWarpMeshSplitU; exports.removeWarpMeshSplitV = removeWarpMeshSplitV; exports.mapWarpMeshPoints = mapWarpMeshPoints; exports.resizeWarpMesh = resizeWarpMesh; exports.warpMeshControlBounds = warpMeshControlBounds; exports.warpMeshParamAt = warpMeshParamAt; exports.dragWarpMeshPoint = dragWarpMeshPoint; exports.pullWarpMesh = pullWarpMesh; exports.warpMeshEditPoints = warpMeshEditPoints; exports.warpMeshGridCurves = warpMeshGridCurves; exports.vectorMeshFromOutline = vectorMeshFromOutline; exports.vectorMeshOutline = vectorMeshOutline; exports.VECTOR_EFFECT_DEFAULTS = VECTOR_EFFECT_DEFAULTS; exports.VECTOR_EFFECT_LABELS = VECTOR_EFFECT_LABELS; exports.VECTOR_EFFECT_PARAM_SPECS = VECTOR_EFFECT_PARAM_SPECS; exports.vectorEnvelopeMesh = vectorEnvelopeMesh; exports.vectorEnvelopeMap = vectorEnvelopeMap; exports.normalizeVectorEffectParams = normalizeVectorEffectParams; exports.createVectorEffect = createVectorEffect; exports.activeVectorEffects = activeVectorEffects; exports.hasOwnVectorAppearance = hasOwnVectorAppearance; exports.hasVectorAppearance = hasVectorAppearance; exports.isVectorLiveBoolean = isVectorLiveBoolean; exports.vectorOperandOperation = vectorOperandOperation; exports.vectorLiveBooleanSteps = vectorLiveBooleanSteps; exports.clearVectorLiveBooleanCache = clearVectorLiveBooleanCache; exports.foldVectorBooleanOperands = foldVectorBooleanOperands; exports.applyVectorEffects = applyVectorEffects; exports.vectorInstanceDrawn = vectorInstanceDrawn; exports.vectorChildAppearanceShapes = vectorChildAppearanceShapes; exports.vectorEffectInputPaths = vectorEffectInputPaths; exports.vectorEffectInputBounds = vectorEffectInputBounds; exports.vectorNodeEnvelope = vectorNodeEnvelope; exports.vectorEnvelopeFrame = vectorEnvelopeFrame; exports.vectorAppearanceShapes = vectorAppearanceShapes; exports.vectorAppearanceOutline = vectorAppearanceOutline; exports.vectorAppearanceNodes = vectorAppearanceNodes; exports.expandVectorAppearance = expandVectorAppearance; exports.expandVectorAppearances = expandVectorAppearances; exports.sanitizeVectorEffects = sanitizeVectorEffects; exports.transformVectorEffects = transformVectorEffects; exports.vectorEnteredGroups = vectorEnteredGroups; exports.isVectorMasterPage = isVectorMasterPage; exports.vectorPages = vectorPages; exports.vectorMasterPages = vectorMasterPages; exports.vectorMasterArt = vectorMasterArt; exports.resolveVectorMasterPages = resolveVectorMasterPages; exports.stripVectorMasterArt = stripVectorMasterArt; 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;
|
|
10677
|
-
|
|
10767
|
+
|
|
10768
|
+
|
|
10769
|
+
|
|
10770
|
+
|
|
10771
|
+
|
|
10772
|
+
|
|
10773
|
+
|
|
10774
|
+
exports.isVectorMeshGradient = isVectorMeshGradient; exports.isVectorFreeformGradient = isVectorFreeformGradient; exports.isVectorShadedPaint = isVectorShadedPaint; exports.vectorRgbaToCss = vectorRgbaToCss; exports.VECTOR_MESH_MAX = VECTOR_MESH_MAX; exports.createVectorMeshGradient = createVectorMeshGradient; exports.vectorMeshPointAt = vectorMeshPointAt; exports.vectorMeshColorAt = vectorMeshColorAt; exports.vectorMeshLines = vectorMeshLines; exports.vectorFreeformSpreadScale = vectorFreeformSpreadScale; exports.vectorFreeformLineSegments = vectorFreeformLineSegments; exports.vectorFreeformField = vectorFreeformField; exports.sampleVectorFreeform = sampleVectorFreeform; exports.autoVectorFreeformGradient = autoVectorFreeformGradient; exports.vectorShadedSvgDefs = vectorShadedSvgDefs; exports.mapVectorShadedPaint = mapVectorShadedPaint; exports.transformVectorShadedPaint = transformVectorShadedPaint; exports.sanitizeVectorShadedPaint = sanitizeVectorShadedPaint; exports.removeVectorFreeformPoint = removeVectorFreeformPoint; exports.nearestVectorShadingPoint = nearestVectorShadingPoint; exports.VECTOR_CORNER_KINDS = VECTOR_CORNER_KINDS; exports.VECTOR_GRADIENT_TYPES = VECTOR_GRADIENT_TYPES; exports.VECTOR_GRADIENT_SPREADS = VECTOR_GRADIENT_SPREADS; exports.VECTOR_GRADIENT_INTERPOLATIONS = VECTOR_GRADIENT_INTERPOLATIONS; exports.VECTOR_STROKE_GRADIENT_MODES = VECTOR_STROKE_GRADIENT_MODES; exports.VECTOR_ARROWHEADS = VECTOR_ARROWHEADS; exports.VECTOR_BLEND_MODES = VECTOR_BLEND_MODES; exports.VECTOR_HORIZONTAL_RESIZING = VECTOR_HORIZONTAL_RESIZING; exports.VECTOR_VERTICAL_RESIZING = VECTOR_VERTICAL_RESIZING; exports.VECTOR_LENS_TYPES = VECTOR_LENS_TYPES; exports.VECTOR_CONNECTOR_SIDES = VECTOR_CONNECTOR_SIDES; exports.VECTOR_CONNECTOR_ROUTES = VECTOR_CONNECTOR_ROUTES; exports.VECTOR_BLEND_SPACINGS = VECTOR_BLEND_SPACINGS; exports.VECTOR_MASK_TYPES = VECTOR_MASK_TYPES; exports.VECTOR_SYMMETRY_MODES = VECTOR_SYMMETRY_MODES; exports.VECTOR_TEXT_ALIGNS = VECTOR_TEXT_ALIGNS; exports.VECTOR_PATH_TEXT_BASELINES = VECTOR_PATH_TEXT_BASELINES; exports.VECTOR_PERSPECTIVE_PLANES = VECTOR_PERSPECTIVE_PLANES; exports.VECTOR_CONSTRAINT_KINDS = VECTOR_CONSTRAINT_KINDS; exports.VECTOR_TOOLS = VECTOR_TOOLS; exports.VECTOR_TRANSFORM_HANDLES = VECTOR_TRANSFORM_HANDLES; exports.VECTOR_PATHFINDER_OPERATIONS = VECTOR_PATHFINDER_OPERATIONS; exports.VECTOR_EFFECT_TYPES = VECTOR_EFFECT_TYPES; exports.VECTOR_MERGE_MODES = VECTOR_MERGE_MODES; exports.VECTOR_FILTER_TYPES = VECTOR_FILTER_TYPES; exports.isVectorGradient = isVectorGradient; exports.parseVectorColor = parseVectorColor; exports.VECTOR_GRADIENT_MIN_STOPS = VECTOR_GRADIENT_MIN_STOPS; exports.gradientMidpointRemap = gradientMidpointRemap; exports.sortedVectorGradientStops = sortedVectorGradientStops; exports.vectorGradientNeedsExpansion = vectorGradientNeedsExpansion; exports.vectorGradientRamp = vectorGradientRamp; exports.sampleVectorGradient = sampleVectorGradient; exports.expandVectorGradientStops = expandVectorGradientStops; exports.samplePlainStops = samplePlainStops; exports.reverseVectorGradient = reverseVectorGradient; exports.insertVectorGradientStop = insertVectorGradientStop; exports.moveVectorGradientStop = moveVectorGradientStop; exports.removeVectorGradientStop = removeVectorGradientStop; exports.vectorGradientMidpointPosition = vectorGradientMidpointPosition; exports.vectorGradientMidpointFromPosition = vectorGradientMidpointFromPosition; exports.spanVectorGradientStops = spanVectorGradientStops; exports.hasExplicitGradientGeometry = hasExplicitGradientGeometry; exports.vectorGradientPoints = vectorGradientPoints; exports.vectorBoxMatrix = vectorBoxMatrix; exports.vectorGradientUnitsMatrix = vectorGradientUnitsMatrix; exports.vectorGradientMatrix = vectorGradientMatrix; exports.vectorGradientFocalParam = vectorGradientFocalParam; exports.vectorGradientParam = vectorGradientParam; exports.applyVectorGradientSpread = applyVectorGradientSpread; exports.vectorGradientTAt = vectorGradientTAt; exports.sampleVectorGradientAt = sampleVectorGradientAt; exports.vectorGradientAspect = vectorGradientAspect; exports.explicitVectorGradient = explicitVectorGradient; exports.pinVectorGradient = pinVectorGradient; exports.transformVectorGradient = transformVectorGradient; exports.mapVectorGradient = mapVectorGradient; exports.mapVectorPaint = mapVectorPaint; exports.transformVectorPaint = transformVectorPaint; exports.isCentredVectorGradient = isCentredVectorGradient; exports.vectorGradientHandles = vectorGradientHandles; exports.moveVectorGradientHandle = moveVectorGradientHandle; exports.setVectorGradientVector = setVectorGradientVector; exports.VECTOR_GRADIENT_MAX_PERIODS = VECTOR_GRADIENT_MAX_PERIODS; exports.periodicVectorGradientStops = periodicVectorGradientStops; exports.expandVectorGradientSpread = expandVectorGradientSpread; exports.vectorGradientArea = vectorGradientArea; exports.patternAttrs = patternAttrs; exports.vectorGradientSvgDefs = vectorGradientSvgDefs; exports.sampleVectorPaintDefAt = sampleVectorPaintDefAt; exports.sanitizeVectorGradient = sanitizeVectorGradient; exports.convertVectorGradient = convertVectorGradient; exports.defaultVectorGradient = defaultVectorGradient; exports.applyVectorGradientPatch = applyVectorGradientPatch; exports.IDENTITY_MATRIX = IDENTITY_MATRIX; exports.multiplyMatrices = multiplyMatrices; exports.translateMatrix = translateMatrix; exports.scaleMatrix = scaleMatrix; exports.rotateMatrix = rotateMatrix; exports.matrixAbout = matrixAbout; exports.skewMatrix = skewMatrix; exports.applyMatrix = applyMatrix; exports.isIdentityMatrix = isIdentityMatrix; exports.invertMatrix = invertMatrix; exports.applyMatrixLinear = applyMatrixLinear; exports.matrixRotation = matrixRotation; exports.decomposeRigid = decomposeRigid; exports.isVectorSymmetryGroup = isVectorSymmetryGroup; exports.vectorSymmetryMatrices = vectorSymmetryMatrices; exports.vectorSymmetryDrawn = vectorSymmetryDrawn; exports.vectorSymmetryAxes = vectorSymmetryAxes; exports.sanitizeVectorSymmetry = sanitizeVectorSymmetry; exports.VECTOR_SYMMETRY_MODE_LABELS = VECTOR_SYMMETRY_MODE_LABELS; exports.transformVectorSymmetry = transformVectorSymmetry; exports.vectorCornerAt = vectorCornerAt; exports.vectorCorners = vectorCorners; exports.cornerSetback = cornerSetback; exports.fitCornerRadius = fitCornerRadius; exports.cornerBisectorPoint = cornerBisectorPoint; exports.cornerRadiusChange = cornerRadiusChange; exports.hasVectorCorners = hasVectorCorners; exports.expandVectorCornersOf = expandVectorCornersOf; exports.expandVectorCorners = expandVectorCorners; exports.setAnchorCorner = setAnchorCorner; exports.nextVectorCornerKind = nextVectorCornerKind; exports.setSubpathCorners = setSubpathCorners; exports.VECTOR_WIDTH_PROFILE_MAX_POINTS = VECTOR_WIDTH_PROFILE_MAX_POINTS; exports.VECTOR_WIDTH_PROFILE_MAX_SCALE = VECTOR_WIDTH_PROFILE_MAX_SCALE; exports.VECTOR_WIDTH_SAME_T = VECTOR_WIDTH_SAME_T; exports.VECTOR_WIDTH_PRESETS = VECTOR_WIDTH_PRESETS; exports.VECTOR_WIDTH_PRESET_IDS = VECTOR_WIDTH_PRESET_IDS; exports.sanitizeWidthProfile = sanitizeWidthProfile; exports.isUniformWidthProfile = isUniformWidthProfile; exports.widthProfileAt = widthProfileAt; exports.widthProfileMaxScale = widthProfileMaxScale; exports.widthProfilePreset = widthProfilePreset; exports.widthProfilePresetId = widthProfilePresetId; exports.reverseWidthProfile = reverseWidthProfile; exports.mirrorWidthProfile = mirrorWidthProfile; exports.insertWidthPoint = insertWidthPoint; exports.setWidthPoint = setWidthPoint; exports.removeWidthPoints = removeWidthPoints; exports.taperWaveFactor = taperWaveFactor; exports.generateWidthProfile = generateWidthProfile; exports.VECTOR_PRESSURE_NOMINAL = VECTOR_PRESSURE_NOMINAL; exports.pressureWidthProfile = pressureWidthProfile; exports.dashIntervals = dashIntervals; exports.variableStrokeRings = variableStrokeRings; exports.variableStrokeOutline = variableStrokeOutline; exports.nearestStrokePosition = nearestStrokePosition; exports.strokePositionPoint = strokePositionPoint; exports.isClosedBezierShape = isClosedBezierShape; exports.effectiveStrokeAlign = effectiveStrokeAlign; exports.strokeWidthProfileOf = strokeWidthProfileOf; exports.hasStrokeExtras = hasStrokeExtras; exports.vectorStrokeLineArea = vectorStrokeLineArea; exports.arrowheadWeight = arrowheadWeight; exports.arrowheadInset = arrowheadInset; exports.arrowheadPath = arrowheadPath; exports.vectorStrokeParts = vectorStrokeParts; exports.vectorStrokeOutlinePath = vectorStrokeOutlinePath; exports.hitTestVectorStroke = hitTestVectorStroke; exports.vectorStrokeReach = vectorStrokeReach; exports.vectorPaintSolid = vectorPaintSolid; exports.shadeVectorColor = shadeVectorColor; exports.vectorPathRings = vectorPathRings; exports.vectorExtrudeFaces = vectorExtrudeFaces; exports.VECTOR_BRUSHSTROKE_SCALE = VECTOR_BRUSHSTROKE_SCALE; exports.vectorBrushstrokeBrushes = vectorBrushstrokeBrushes; exports.vectorBrushstrokeBrush = vectorBrushstrokeBrush; exports.sanitizeVectorBrushstroke = sanitizeVectorBrushstroke; exports.isVectorBrushstrokeLayer = isVectorBrushstrokeLayer; exports.vectorBrushstrokeReach = vectorBrushstrokeReach; exports.vectorBrushstrokeImages = vectorBrushstrokeImages; 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.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.isVectorMasterPage = isVectorMasterPage; exports.vectorPages = vectorPages; exports.vectorMasterPages = vectorMasterPages; exports.vectorMasterArt = vectorMasterArt; exports.resolveVectorMasterPages = resolveVectorMasterPages; exports.stripVectorMasterArt = stripVectorMasterArt; 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;
|
|
10775
|
+
//# sourceMappingURL=chunk-5OOIUXNJ.cjs.map
|