@pixerate/editor 0.136.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 +60 -55
- package/dist/animation-editor/index.cjs.map +1 -1
- package/dist/animation-editor/index.d.cts +4 -4
- package/dist/animation-editor/index.d.ts +4 -4
- package/dist/animation-editor/index.js +7 -2
- package/dist/animation-editor/index.js.map +1 -1
- package/dist/{bezier-CdccFsF8.d.cts → bezier-CZ2AhjID.d.cts} +1 -1
- package/dist/{bezier-DG9qNZQV.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 +7 -7
- package/dist/canvas/index.d.ts +7 -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-MAHQC3SK.js → chunk-3D77LOBM.js} +222 -135
- 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-2R3UW57U.cjs → chunk-5OOIUXNJ.cjs} +333 -246
- package/dist/chunk-5OOIUXNJ.cjs.map +1 -0
- package/dist/{chunk-KZXLZCQ7.js → chunk-6S6362D2.js} +2 -2
- 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-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-UYQUPUR6.js → chunk-HUO3TI4C.js} +3 -3
- 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-B2CUCM7Y.cjs → chunk-PRSRYHQD.cjs} +36 -36
- package/dist/{chunk-B2CUCM7Y.cjs.map → chunk-PRSRYHQD.cjs.map} +1 -1
- package/dist/{chunk-6GFRKLLS.cjs → chunk-QBWEH3IM.cjs} +429 -112
- package/dist/chunk-QBWEH3IM.cjs.map +1 -0
- package/dist/{chunk-6QQR4LKE.js → chunk-SYT2TLQF.js} +35 -37
- package/dist/{chunk-6QQR4LKE.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-JLGNZMUV.cjs → chunk-XN2NBLV5.cjs} +313 -315
- package/dist/chunk-XN2NBLV5.cjs.map +1 -0
- package/dist/effects/index.d.cts +4 -4
- package/dist/effects/index.d.ts +4 -4
- package/dist/{export-Ds7zgGD8.d.ts → export-41rL6Cne.d.ts} +1 -1
- package/dist/{export-BOheWw2R.d.cts → export-CyJdfP_Z.d.cts} +5 -4
- package/dist/{export-CEYeRQXH.d.cts → export-D9mXp05Q.d.cts} +1 -1
- package/dist/{export-ByKKIA2S.d.ts → export-DwnZ_hvQ.d.ts} +5 -4
- package/dist/{helpers--ns3W2D7.d.ts → helpers-C-RgeyvH.d.ts} +18 -7
- package/dist/{helpers-BVkU4oUi.d.cts → helpers-v6GMazzg.d.cts} +18 -7
- package/dist/image-editor/index.cjs +984 -987
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +12 -11
- package/dist/image-editor/index.d.ts +12 -11
- package/dist/image-editor/index.js +92 -95
- package/dist/image-editor/index.js.map +1 -1
- package/dist/{opentype-yi-Kz4ND.d.cts → opentype-KR_jj6b_.d.cts} +1 -1
- package/dist/{opentype-DfoVYgmG.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 +403 -404
- package/dist/paint-editor/index.cjs.map +1 -1
- package/dist/paint-editor/index.d.cts +12 -748
- package/dist/paint-editor/index.d.ts +12 -748
- package/dist/paint-editor/index.js +77 -78
- package/dist/paint-editor/index.js.map +1 -1
- package/dist/{pathfinder-7JkMwYvC.d.cts → pathfinder-BHS4vQNm.d.cts} +1 -1
- package/dist/{pathfinder-GM3UWdBZ.d.ts → pathfinder-BVvTIBMo.d.ts} +1 -1
- package/dist/{pool-CkTxlLMC.d.ts → pool-CZQOrSXZ.d.ts} +1 -1
- package/dist/{pool-04qp8iW4.d.cts → pool-FjZZmZ80.d.cts} +1 -1
- 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-rV6_HPmn.d.ts → svg-CSz3mzkw.d.ts} +2 -2
- package/dist/{svg-BDDKvWWY.d.cts → svg-DTb40ICU.d.cts} +2 -2
- package/dist/{tools-DPYerqeR.d.ts → tools-B0wXP5cF.d.ts} +1 -1
- package/dist/{tools-BAjSbTdY.d.cts → tools-Ca0kI1qo.d.cts} +1 -1
- package/dist/vector/index.cjs +1459 -1259
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.d.cts +87 -11
- package/dist/vector/index.d.ts +87 -11
- package/dist/vector/index.js +213 -13
- package/dist/vector/index.js.map +1 -1
- package/dist/video-editor/index.d.cts +4 -4
- package/dist/video-editor/index.d.ts +4 -4
- package/dist/{warp-DQh9R7Ie.d.cts → warp-DTOp0lON.d.cts} +1 -1
- package/dist/{warp-XVL6SpSh.d.ts → warp-pd7hrH4T.d.ts} +1 -1
- package/package.json +1 -1
- package/skills/pixerate-vector/SKILL.md +8 -0
- package/dist/brushstrokeRender-JNHVEUFG.cjs.map +0 -1
- package/dist/chunk-2R3UW57U.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-J5BA3BQ6.cjs.map +0 -1
- package/dist/chunk-JLGNZMUV.cjs.map +0 -1
- package/dist/chunk-MAHQC3SK.js.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-KZXLZCQ7.js.map → chunk-6S6362D2.js.map} +0 -0
- /package/dist/{chunk-SVYE5HIM.js.map → chunk-EQQMGO42.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
|
@@ -1,5 +1,8 @@
|
|
|
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
|
+
|
|
3
6
|
var _chunkQ6OUXEK3cjs = require('./chunk-Q6OUXEK3.cjs');
|
|
4
7
|
|
|
5
8
|
|
|
@@ -42,6 +45,11 @@ var _chunkIZ4WRXZAcjs = require('./chunk-IZ4WRXZA.cjs');
|
|
|
42
45
|
|
|
43
46
|
|
|
44
47
|
|
|
48
|
+
|
|
49
|
+
var _chunkQBWEH3IMcjs = require('./chunk-QBWEH3IM.cjs');
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
45
53
|
var _chunkMR3Z4OQIcjs = require('./chunk-MR3Z4OQI.cjs');
|
|
46
54
|
|
|
47
55
|
|
|
@@ -2387,6 +2395,193 @@ function vectorStrokeReach(style) {
|
|
|
2387
2395
|
return reach;
|
|
2388
2396
|
}
|
|
2389
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
|
+
|
|
2390
2585
|
// src/vector/paintLayers.ts
|
|
2391
2586
|
var VECTOR_STROKE_SETTING_KEYS = [
|
|
2392
2587
|
"strokeWidth",
|
|
@@ -2469,7 +2664,7 @@ function withVectorFills(node, fills) {
|
|
|
2469
2664
|
const next = { ...node };
|
|
2470
2665
|
if (fills.length === 0 || fills.length === 1 && isPlainVectorPaintLayer(fills[0])) {
|
|
2471
2666
|
delete next.fills;
|
|
2472
|
-
next.fill = _nullishCoalesce(_optionalChain([fills, 'access',
|
|
2667
|
+
next.fill = _nullishCoalesce(_optionalChain([fills, 'access', _57 => _57[0], 'optionalAccess', _58 => _58.paint]), () => ( null));
|
|
2473
2668
|
return next;
|
|
2474
2669
|
}
|
|
2475
2670
|
next.fills = fills.map((l) => ({ ...l }));
|
|
@@ -2494,8 +2689,8 @@ function withVectorStrokes(node, strokes) {
|
|
|
2494
2689
|
var json = (v2) => JSON.stringify(_nullishCoalesce(v2, () => ( null)));
|
|
2495
2690
|
function strokeShorthandDiff(node, top) {
|
|
2496
2691
|
const out = [];
|
|
2497
|
-
if (json(node.stroke) !== json(_optionalChain([top, 'optionalAccess',
|
|
2498
|
-
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);
|
|
2499
2694
|
return out;
|
|
2500
2695
|
}
|
|
2501
2696
|
var checked = /* @__PURE__ */ new WeakSet();
|
|
@@ -2512,7 +2707,7 @@ function normalizeVectorPaintStacks(node, prefer = "shorthand") {
|
|
|
2512
2707
|
if (Array.isArray(node.fills)) {
|
|
2513
2708
|
let fills = node.fills;
|
|
2514
2709
|
const top = fills[fills.length - 1];
|
|
2515
|
-
if (prefer === "shorthand" && json(node.fill) !== json(_optionalChain([top, 'optionalAccess',
|
|
2710
|
+
if (prefer === "shorthand" && json(node.fill) !== json(_optionalChain([top, 'optionalAccess', _61 => _61.paint]))) {
|
|
2516
2711
|
if (!draws(node.fill)) fills = [];
|
|
2517
2712
|
else fills = top ? [...fills.slice(0, -1), { ...top, paint: node.fill }] : [{ paint: node.fill }];
|
|
2518
2713
|
}
|
|
@@ -2586,6 +2781,10 @@ function sanitizeVectorStrokeSettings(raw) {
|
|
|
2586
2781
|
function sanitizeVectorStrokes(value) {
|
|
2587
2782
|
if (!Array.isArray(value)) return [];
|
|
2588
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
|
+
}
|
|
2589
2788
|
if (raw.kind !== void 0 && raw.kind !== "paint") return { ...raw };
|
|
2590
2789
|
return { ...sanitizeLayerBase(raw), ...sanitizeVectorStrokeSettings(raw) };
|
|
2591
2790
|
});
|
|
@@ -2616,7 +2815,10 @@ function needsVectorPaintLayers(node) {
|
|
|
2616
2815
|
}
|
|
2617
2816
|
function vectorStrokeStackReach(node) {
|
|
2618
2817
|
let reach = 0;
|
|
2619
|
-
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
|
+
}
|
|
2620
2822
|
return reach;
|
|
2621
2823
|
}
|
|
2622
2824
|
function hitTestVectorPaintLayer(node, path, p, tolerance = 0) {
|
|
@@ -2721,8 +2923,8 @@ var Measured = class {
|
|
|
2721
2923
|
append(sa, sb, out) {
|
|
2722
2924
|
for (const piece of _chunkBJTCSLF6cjs.trimSegments.call(void 0, this.segs, sa, sb, this.lens)) {
|
|
2723
2925
|
if (degenerate(piece)) continue;
|
|
2724
|
-
const last = _optionalChain([out, 'access',
|
|
2725
|
-
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)]);
|
|
2726
2928
|
if (!end || Math.hypot(end[0] - piece[0][0], end[1] - piece[0][1]) > 1e-6) out.push({ segs: [piece], closed: false });
|
|
2727
2929
|
else last.push(piece);
|
|
2728
2930
|
}
|
|
@@ -3034,9 +3236,9 @@ function vectorRepeaterCopies(r, pivot) {
|
|
|
3034
3236
|
for (let i = 0; i < n; i++) {
|
|
3035
3237
|
const k = i + offset;
|
|
3036
3238
|
let m = translateMatrix(-pivot.x, -pivot.y);
|
|
3037
|
-
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)));
|
|
3038
3240
|
m = multiplyMatrices(m, rotateMatrix((_nullishCoalesce(r.rotation, () => ( 0))) * k));
|
|
3039
|
-
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));
|
|
3040
3242
|
const t = n > 1 ? i / (n - 1) : 0;
|
|
3041
3243
|
const partial = i + 1 === n && fract > 0 ? fract : 1;
|
|
3042
3244
|
out.push({ index: i, matrix: m, opacity: Math.min(1, Math.max(0, (so + (eo - so) * t) * partial)) });
|
|
@@ -3200,7 +3402,7 @@ function mapBezierPath(path, f, tolerance = 0.1, options = {}) {
|
|
|
3200
3402
|
|
|
3201
3403
|
// src/vector/frames.ts
|
|
3202
3404
|
function isVectorFrame(node) {
|
|
3203
|
-
return _optionalChain([node, 'optionalAccess',
|
|
3405
|
+
return _optionalChain([node, 'optionalAccess', _75 => _75.type]) === "group" && !!node.frame && !node.blend && !node.liveBoolean && !node.mask;
|
|
3204
3406
|
}
|
|
3205
3407
|
function vectorFrameRectPath(frame) {
|
|
3206
3408
|
const { x, y, width: w, height: h } = frame;
|
|
@@ -3245,8 +3447,8 @@ function placeSpan(rule, a0, a1, f0, f1, g0, g1) {
|
|
|
3245
3447
|
}
|
|
3246
3448
|
}
|
|
3247
3449
|
function vectorFrameChildMatrix(resizing, box, from, to) {
|
|
3248
|
-
const [x0, x1] = placeSpan(_nullishCoalesce(H[_nullishCoalesce(_optionalChain([resizing, 'optionalAccess',
|
|
3249
|
-
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);
|
|
3250
3452
|
const sx = box.width > 1e-9 ? (x1 - x0) / box.width : 1;
|
|
3251
3453
|
const sy = box.height > 1e-9 ? (y1 - y0) / box.height : 1;
|
|
3252
3454
|
return [sx, 0, 0, sy, x0 - sx * box.x, y0 - sy * box.y];
|
|
@@ -3302,7 +3504,7 @@ function vectorFrameDocument(doc, id, find) {
|
|
|
3302
3504
|
height,
|
|
3303
3505
|
...doc.background ? { background: doc.background } : {},
|
|
3304
3506
|
nodes: [placed],
|
|
3305
|
-
..._optionalChain([doc, 'access',
|
|
3507
|
+
..._optionalChain([doc, 'access', _78 => _78.symbols, 'optionalAccess', _79 => _79.length]) ? { symbols: doc.symbols } : {}
|
|
3306
3508
|
};
|
|
3307
3509
|
}
|
|
3308
3510
|
function getVectorFramePanel(state) {
|
|
@@ -3322,7 +3524,7 @@ function getVectorFramePanel(state) {
|
|
|
3322
3524
|
const one = (values) => values.every((v2) => v2 === values[0]) ? values[0] : "mixed";
|
|
3323
3525
|
return {
|
|
3324
3526
|
frame: f ? { id: f.id, name: _nullishCoalesce(f.name, () => ( "Frame")), artboard: parents.get(f.id) === null, frame: f.frame } : null,
|
|
3325
|
-
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
|
|
3326
3528
|
};
|
|
3327
3529
|
}
|
|
3328
3530
|
|
|
@@ -3708,7 +3910,7 @@ function normalizeVectorFilterParams(type, params, base) {
|
|
|
3708
3910
|
if (!isVectorFilterType(type)) return null;
|
|
3709
3911
|
const out = { ...VECTOR_FILTER_DEFAULTS[type], ..._nullishCoalesce(base, () => ( {})) };
|
|
3710
3912
|
for (const spec of VECTOR_FILTER_PARAM_SPECS[type]) {
|
|
3711
|
-
const v2 = _optionalChain([params, 'optionalAccess',
|
|
3913
|
+
const v2 = _optionalChain([params, 'optionalAccess', _84 => _84[spec.key]]);
|
|
3712
3914
|
if (v2 === void 0) continue;
|
|
3713
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));
|
|
3714
3916
|
else if (spec.kind === "color" && typeof v2 === "string" && v2.trim()) out[spec.key] = v2.trim();
|
|
@@ -3840,7 +4042,7 @@ function vectorFilterSvg(filters, id, bounds) {
|
|
|
3840
4042
|
primitives.push(fe("feGaussianBlur", { in: body, stdDeviation: round(f.params.radius / 2), result: name("body") }));
|
|
3841
4043
|
body = name("body");
|
|
3842
4044
|
}
|
|
3843
|
-
const lastResult = _optionalChain([primitives, 'access',
|
|
4045
|
+
const lastResult = _optionalChain([primitives, 'access', _85 => _85[primitives.length - 1], 'optionalAccess', _86 => _86.attrs, 'access', _87 => _87.result]);
|
|
3844
4046
|
if (lastResult !== body) primitives.push(fe("feMerge", {}, [fe("feMergeNode", { in: body })]));
|
|
3845
4047
|
const pad = vectorFilterReach(active) + 2;
|
|
3846
4048
|
return {
|
|
@@ -3855,7 +4057,7 @@ function vectorFilterSvg(filters, id, bounds) {
|
|
|
3855
4057
|
var escapeAttr = (value) => value.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
3856
4058
|
function primitiveMarkup(p) {
|
|
3857
4059
|
const attrs = Object.entries(p.attrs).map(([k, v2]) => ` ${k}="${escapeAttr(String(v2))}"`).join("");
|
|
3858
|
-
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}/>`;
|
|
3859
4061
|
}
|
|
3860
4062
|
function vectorFilterMarkup(filter, extra = "") {
|
|
3861
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>`;
|
|
@@ -3873,7 +4075,7 @@ function sanitizeVectorMask(value) {
|
|
|
3873
4075
|
return r.invert === true ? { type: r.type, invert: true } : { type: r.type };
|
|
3874
4076
|
}
|
|
3875
4077
|
function isVectorMaskGroup(node) {
|
|
3876
|
-
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;
|
|
3877
4079
|
}
|
|
3878
4080
|
function isVectorMaskActive(node) {
|
|
3879
4081
|
return isVectorMaskGroup(node) && node.children[0].visible !== false;
|
|
@@ -3908,7 +4110,7 @@ function vectorMaskRegionShapes(node, type, parent = IDENTITY_MATRIX, self = tru
|
|
|
3908
4110
|
if (!self && node.visible === false) return [];
|
|
3909
4111
|
if (isVectorFrame(node)) node = vectorFrameDrawn(node);
|
|
3910
4112
|
const m = multiplyMatrices(nodeMatrix(node), parent);
|
|
3911
|
-
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])) {
|
|
3912
4114
|
return vectorAppearanceShapes(node).flatMap((s) => regionOfPath(s.path, s.source, type, m));
|
|
3913
4115
|
}
|
|
3914
4116
|
const drawn = expandVectorAppearance(node);
|
|
@@ -4113,7 +4315,7 @@ function fitRuns(runs, length2, fallback) {
|
|
|
4113
4315
|
}
|
|
4114
4316
|
if (left2 > 0) {
|
|
4115
4317
|
if (out.length) out[out.length - 1] = { ...out[out.length - 1], length: out[out.length - 1].length + left2 };
|
|
4116
|
-
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)) });
|
|
4117
4319
|
}
|
|
4118
4320
|
return compact(out);
|
|
4119
4321
|
}
|
|
@@ -4123,7 +4325,7 @@ function styleAt(runs, index, fallback) {
|
|
|
4123
4325
|
if (index < at2 + r.length) return r.style;
|
|
4124
4326
|
at2 += r.length;
|
|
4125
4327
|
}
|
|
4126
|
-
return _nullishCoalesce(_optionalChain([runs, 'access',
|
|
4328
|
+
return _nullishCoalesce(_optionalChain([runs, 'access', _95 => _95[runs.length - 1], 'optionalAccess', _96 => _96.style]), () => ( fallback));
|
|
4127
4329
|
}
|
|
4128
4330
|
function restyleRange(runs, start, end, patch) {
|
|
4129
4331
|
const out = [];
|
|
@@ -4179,7 +4381,7 @@ function paragraphRanges(text) {
|
|
|
4179
4381
|
return out;
|
|
4180
4382
|
}
|
|
4181
4383
|
function fitParagraphRuns(runs, text) {
|
|
4182
|
-
const fallback = _nullishCoalesce(_optionalChain([runs, 'access',
|
|
4384
|
+
const fallback = _nullishCoalesce(_optionalChain([runs, 'access', _97 => _97[0], 'optionalAccess', _98 => _98.style]), () => ( {}));
|
|
4183
4385
|
const out = compact(paragraphRanges(text).map((p) => ({ length: p.end - p.start, style: styleAt(runs, p.start, fallback) })));
|
|
4184
4386
|
return out.length ? out : [{ length: 0, style: fallback }];
|
|
4185
4387
|
}
|
|
@@ -4195,7 +4397,7 @@ var isWide = (code) => code >= 11904 && code <= 40959 || code >= 44032 && code <
|
|
|
4195
4397
|
var layoutCache = /* @__PURE__ */ new WeakMap();
|
|
4196
4398
|
function layoutText(layer, shaper) {
|
|
4197
4399
|
let byShaper = layoutCache.get(layer);
|
|
4198
|
-
const hit = _optionalChain([byShaper, 'optionalAccess',
|
|
4400
|
+
const hit = _optionalChain([byShaper, 'optionalAccess', _99 => _99.get, 'call', _100 => _100(shaper.id)]);
|
|
4199
4401
|
if (hit) return hit;
|
|
4200
4402
|
const out = computeLayout(layer, shaper);
|
|
4201
4403
|
if (!byShaper) {
|
|
@@ -4432,7 +4634,7 @@ function createCanvasTextShaper(options = {}) {
|
|
|
4432
4634
|
return null;
|
|
4433
4635
|
})));
|
|
4434
4636
|
const canvas = make(1, 1);
|
|
4435
|
-
const ctx = _optionalChain([canvas, 'optionalAccess',
|
|
4637
|
+
const ctx = _optionalChain([canvas, 'optionalAccess', _101 => _101.getContext, 'call', _102 => _102("2d")]);
|
|
4436
4638
|
if (!ctx || typeof ctx.measureText !== "function") return null;
|
|
4437
4639
|
const fallback = _nullishCoalesce(options.fallbackFamily, () => ( "sans-serif"));
|
|
4438
4640
|
const available = /* @__PURE__ */ new Map();
|
|
@@ -4505,10 +4707,10 @@ function createOutlineTextShaper(fonts, options = {}) {
|
|
|
4505
4707
|
const entries = fonts.map((f) => {
|
|
4506
4708
|
const e = "face" in f ? f : { face: f };
|
|
4507
4709
|
const names = e.face.names;
|
|
4508
|
-
const family = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(e.family, () => ( _optionalChain([names, 'optionalAccess',
|
|
4509
|
-
const weight = _nullishCoalesce(_nullishCoalesce(e.weight, () => ( _optionalChain([e, 'access',
|
|
4510
|
-
const italic = _nullishCoalesce(e.italic, () => ( Boolean((_nullishCoalesce(_optionalChain([e, 'access',
|
|
4511
|
-
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]));
|
|
4512
4714
|
return { face: e.face, family, key: family.toLowerCase(), weight, italic, postScript };
|
|
4513
4715
|
});
|
|
4514
4716
|
const fallbackKey = (_nullishCoalesce(options.fallback, () => ( entries[0].family))).toLowerCase();
|
|
@@ -4614,7 +4816,7 @@ function vectorTextHasOutlines() {
|
|
|
4614
4816
|
return typeof getVectorTextShaper().outline === "function";
|
|
4615
4817
|
}
|
|
4616
4818
|
function vectorTextFamilies() {
|
|
4617
|
-
return _nullishCoalesce(_optionalChain([getVectorTextShaper, 'call',
|
|
4819
|
+
return _nullishCoalesce(_optionalChain([getVectorTextShaper, 'call', _117 => _117(), 'access', _118 => _118.families, 'optionalCall', _119 => _119()]), () => ( ["sans-serif", "serif", "monospace"]));
|
|
4618
4820
|
}
|
|
4619
4821
|
var DEFAULT_VECTOR_FONT = { fontFamily: "sans-serif", fontWeight: 400, fontSize: 24 };
|
|
4620
4822
|
var VECTOR_CHARACTER_STYLE_KEYS = ["fontFamily", "fontWeight", "italic", "fontSize", "tracking", "leading", "baselineShift", "underline", "strikethrough"];
|
|
@@ -4789,7 +4991,7 @@ function computeLayout2(node, shaper) {
|
|
|
4789
4991
|
const fragments = [];
|
|
4790
4992
|
const lines = [];
|
|
4791
4993
|
let overflow = false;
|
|
4792
|
-
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]);
|
|
4793
4995
|
const styleOf = (f) => {
|
|
4794
4996
|
const { color: _c, opacity: _o, postScriptName: _p, ...style } = f.style;
|
|
4795
4997
|
return style;
|
|
@@ -4820,11 +5022,11 @@ function computeLayout2(node, shaper) {
|
|
|
4820
5022
|
} else {
|
|
4821
5023
|
const line = text.lines[0];
|
|
4822
5024
|
const measure = measureVectorPath(subpathPath(frame.path), !!frame.flip);
|
|
4823
|
-
const align = _nullishCoalesce(_optionalChain([node, 'access',
|
|
5025
|
+
const align = _nullishCoalesce(_optionalChain([node, 'access', _123 => _123.paragraph, 'optionalAccess', _124 => _124.align]), () => ( "left"));
|
|
4824
5026
|
const start = Math.max(0, _nullishCoalesce(frame.start, () => ( 0)));
|
|
4825
5027
|
const end = Math.max(0, _nullishCoalesce(frame.end, () => ( 0)));
|
|
4826
5028
|
const upright = frame.orientation === "upright";
|
|
4827
|
-
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)));
|
|
4828
5030
|
if (line) {
|
|
4829
5031
|
const chars = line.chars.filter((c) => {
|
|
4830
5032
|
const lo = block.text.charCodeAt(c.index);
|
|
@@ -4833,7 +5035,7 @@ function computeLayout2(node, shaper) {
|
|
|
4833
5035
|
const advanceOf = (c) => {
|
|
4834
5036
|
const pair = charAt(block.text, c.index).length === 2;
|
|
4835
5037
|
const low = pair ? line.chars.find((d) => d.index === c.index + 1) : void 0;
|
|
4836
|
-
return c.advance + (_nullishCoalesce(_optionalChain([low, 'optionalAccess',
|
|
5038
|
+
return c.advance + (_nullishCoalesce(_optionalChain([low, 'optionalAccess', _127 => _127.advance]), () => ( 0)));
|
|
4837
5039
|
};
|
|
4838
5040
|
const pivots = chars.map((c) => c.x + advanceOf(c) / 2);
|
|
4839
5041
|
const positions = vectorPathTextPositions(pivots, [line.x, line.x + line.width], align, measure.length, start, end);
|
|
@@ -4888,7 +5090,7 @@ function computeLayout2(node, shaper) {
|
|
|
4888
5090
|
if (x0 < Infinity) bounds = { x: x0, y: y0, width: x1 - x0, height: y1 - y0 };
|
|
4889
5091
|
else if (frame.kind === "point") {
|
|
4890
5092
|
const l = text.lines[0];
|
|
4891
|
-
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))) };
|
|
4892
5094
|
}
|
|
4893
5095
|
}
|
|
4894
5096
|
return { shaper: shaper.id, glyphs, fragments, lines, origin, text, bounds, overflow, missingFonts: text.missingFonts };
|
|
@@ -5009,7 +5211,7 @@ function vectorTextCaret(node, index) {
|
|
|
5009
5211
|
const t = { x: Math.cos(r), y: Math.sin(r) };
|
|
5010
5212
|
const n2 = { x: -t.y, y: t.x };
|
|
5011
5213
|
const o = { x: g2.x + t.x * u, y: g2.y + t.y * u };
|
|
5012
|
-
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)) };
|
|
5013
5215
|
};
|
|
5014
5216
|
if (node.frame.kind !== "path") {
|
|
5015
5217
|
const c = caretAt(layout.text, index);
|
|
@@ -5144,7 +5346,7 @@ function sanitizeVectorTextFrame(value, path = "frame") {
|
|
|
5144
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) };
|
|
5145
5347
|
if (f.kind === "path") {
|
|
5146
5348
|
const sp = f.path;
|
|
5147
|
-
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.`);
|
|
5148
5350
|
const out = { kind: "path", path: { closed: !!sp.closed, anchors: sp.anchors.map((a) => ({ ...a })) } };
|
|
5149
5351
|
if (f.start !== void 0 && f.start !== 0) out.start = num2(f.start, `${path}.start`, 0, 1e7);
|
|
5150
5352
|
if (f.end !== void 0 && f.end !== 0) out.end = num2(f.end, `${path}.end`, 0, 1e7);
|
|
@@ -5162,7 +5364,7 @@ function sanitizeVectorTextFrame(value, path = "frame") {
|
|
|
5162
5364
|
return fail(`${path}.kind must be point, area or path, got ${JSON.stringify(f.kind)}.`);
|
|
5163
5365
|
}
|
|
5164
5366
|
function normalizeVectorTextRuns(text, runs) {
|
|
5165
|
-
if (!_optionalChain([runs, 'optionalAccess',
|
|
5367
|
+
if (!_optionalChain([runs, 'optionalAccess', _136 => _136.length])) return null;
|
|
5166
5368
|
const cleaned = fitVectorTextRuns(
|
|
5167
5369
|
runs.map((r) => ({ length: r.length, style: stripUndefined(r.style) })),
|
|
5168
5370
|
text.length
|
|
@@ -5196,7 +5398,7 @@ function replaceVectorText(node, start, end, insert) {
|
|
|
5196
5398
|
const clean2 = insert.replace(/\r\n?/g, "\n");
|
|
5197
5399
|
const text = node.text.slice(0, start) + clean2 + node.text.slice(end);
|
|
5198
5400
|
let runs = null;
|
|
5199
|
-
if (_optionalChain([node, 'access',
|
|
5401
|
+
if (_optionalChain([node, 'access', _137 => _137.runs, 'optionalAccess', _138 => _138.length])) {
|
|
5200
5402
|
const fitted = fitVectorTextRuns(node.runs, node.text.length);
|
|
5201
5403
|
const style = styleAt(fitted, start > 0 ? start - 1 : start, {});
|
|
5202
5404
|
runs = normalizeVectorTextRuns(text, spliceRuns(fitted, start, end, clean2.length, style));
|
|
@@ -5212,7 +5414,7 @@ function styleVectorText(node, start, end, patch) {
|
|
|
5212
5414
|
if (whole) {
|
|
5213
5415
|
let next2 = { ...node, font: patchVectorCharacterStyle(node.font, fields, "style") };
|
|
5214
5416
|
const keys = Object.keys(fields).filter((k) => fields[k] !== void 0);
|
|
5215
|
-
if (_optionalChain([next2, 'access',
|
|
5417
|
+
if (_optionalChain([next2, 'access', _139 => _139.runs, 'optionalAccess', _140 => _140.length]) && (keys.length || fill !== void 0)) {
|
|
5216
5418
|
const runs2 = normalizeVectorTextRuns(
|
|
5217
5419
|
next2.text,
|
|
5218
5420
|
next2.runs.map((r) => {
|
|
@@ -5257,7 +5459,7 @@ function bakeVectorTextGeometry(node, m) {
|
|
|
5257
5459
|
...s.baselineShift !== void 0 ? { baselineShift: s.baselineShift * k } : {}
|
|
5258
5460
|
});
|
|
5259
5461
|
const font = scaleStyle(node.font);
|
|
5260
|
-
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) }))]);
|
|
5261
5463
|
const p = node.paragraph;
|
|
5262
5464
|
const paragraph = p ? {
|
|
5263
5465
|
...p,
|
|
@@ -5539,7 +5741,7 @@ function vectorInstanceGroup(node, bake) {
|
|
|
5539
5741
|
const m = _nullishCoalesce(node.transform, () => ( [1, 0, 0, 1, 0, 0]));
|
|
5540
5742
|
const { rigid, residual } = decomposeRigid(m);
|
|
5541
5743
|
const k = Math.sqrt(Math.abs(residual[0] * residual[3] - residual[1] * residual[2]));
|
|
5542
|
-
const hidden = new Set(_nullishCoalesce(_optionalChain([node, 'access',
|
|
5744
|
+
const hidden = new Set(_nullishCoalesce(_optionalChain([node, 'access', _144 => _144.overrides, 'optionalAccess', _145 => _145.hidden]), () => ( [])));
|
|
5543
5745
|
const keep = (list) => list.filter((n) => !hidden.has(n.id)).map((n) => n.type === "group" ? { ...n, children: keep(n.children) } : n);
|
|
5544
5746
|
let children = prefixVectorIds(keep(_nullishCoalesce(node.art, () => ( []))), node.id);
|
|
5545
5747
|
if (!isIdentityMatrix(residual)) children = children.map((c) => bake(c, residual));
|
|
@@ -5552,142 +5754,14 @@ function vectorInstanceGroup(node, bake) {
|
|
|
5552
5754
|
if (node.locked) group.locked = true;
|
|
5553
5755
|
if (node.opacity !== void 0) group.opacity = node.opacity;
|
|
5554
5756
|
if (node.blendMode) group.blendMode = node.blendMode;
|
|
5555
|
-
if (_optionalChain([node, 'access',
|
|
5556
|
-
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;
|
|
5557
5759
|
if (node.booleanOperation) group.booleanOperation = node.booleanOperation;
|
|
5558
5760
|
if (node.blendStep) group.blendStep = true;
|
|
5559
5761
|
return group;
|
|
5560
5762
|
}
|
|
5561
5763
|
var composeVectorMatrices = (a, b) => multiplyMatrices(a, b);
|
|
5562
5764
|
|
|
5563
|
-
// src/vector/extrude.ts
|
|
5564
|
-
function vectorPaintSolid(paint) {
|
|
5565
|
-
if (paint == null || paint === "none") return null;
|
|
5566
|
-
if (typeof paint === "string") return paint;
|
|
5567
|
-
const stops = paint.stops;
|
|
5568
|
-
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;
|
|
5569
|
-
const colors = paint.colors;
|
|
5570
|
-
if (_optionalChain([colors, 'optionalAccess', _144 => _144.length])) return colors[0];
|
|
5571
|
-
const points = paint.points;
|
|
5572
|
-
return _nullishCoalesce(_optionalChain([points, 'optionalAccess', _145 => _145.find, 'call', _146 => _146((p) => typeof p.color === "string"), 'optionalAccess', _147 => _147.color]), () => ( null));
|
|
5573
|
-
}
|
|
5574
|
-
function shadeVectorColor(color2, amount) {
|
|
5575
|
-
const c = parseVectorColor(color2);
|
|
5576
|
-
if (!c) return color2;
|
|
5577
|
-
const a = Math.min(1, Math.max(-1, amount));
|
|
5578
|
-
const target = a >= 0 ? 1 : 0;
|
|
5579
|
-
const h = (v2) => Math.round(Math.min(1, Math.max(0, v2)) * 255).toString(16).padStart(2, "0");
|
|
5580
|
-
const m = [0, 1, 2].map((k) => c[k] + (target - c[k]) * Math.abs(a));
|
|
5581
|
-
return `#${h(m[0])}${h(m[1])}${h(m[2])}`;
|
|
5582
|
-
}
|
|
5583
|
-
function vectorPathRings(path, tolerance = 0.5) {
|
|
5584
|
-
const rings = [];
|
|
5585
|
-
for (const contour of _chunkBJTCSLF6cjs.pathToContours.call(void 0, path)) {
|
|
5586
|
-
const ring = _chunkBJTCSLF6cjs.flattenChain.call(void 0, _chunkBJTCSLF6cjs.closeContour.call(void 0, contour, true), Math.max(1e-3, tolerance));
|
|
5587
|
-
if (ring.length >= 2) rings.push(ring);
|
|
5588
|
-
}
|
|
5589
|
-
return rings;
|
|
5590
|
-
}
|
|
5591
|
-
function vectorExtrudeFaces(path, params) {
|
|
5592
|
-
const box = _chunkBJTCSLF6cjs.bezierPathBounds.call(void 0, path);
|
|
5593
|
-
if (!box || !path.length) return [];
|
|
5594
|
-
const perspective = params.mode === "perspective";
|
|
5595
|
-
const rad2 = params.angle * Math.PI / 180;
|
|
5596
|
-
const d = [Math.cos(rad2) * Math.max(0, params.depth), Math.sin(rad2) * Math.max(0, params.depth)];
|
|
5597
|
-
const vp = [(box.minX + box.maxX) / 2 + params.vanishingPoint.x, (box.minY + box.maxY) / 2 + params.vanishingPoint.y];
|
|
5598
|
-
const pull = Math.min(1, Math.max(0, params.toward / 100));
|
|
5599
|
-
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]];
|
|
5600
|
-
if (perspective ? pull <= 0 : Math.hypot(d[0], d[1]) < 1e-9) return [];
|
|
5601
|
-
const lr = params.lightAngle * Math.PI / 180;
|
|
5602
|
-
const light = [Math.cos(lr), Math.sin(lr)];
|
|
5603
|
-
const strength = Math.min(1, Math.max(0, params.shading / 100));
|
|
5604
|
-
const u = perspective ? [0, 0] : [d[0] / Math.hypot(d[0], d[1]), d[1] / Math.hypot(d[0], d[1])];
|
|
5605
|
-
const centre = [(box.minX + box.maxX) / 2, (box.minY + box.maxY) / 2];
|
|
5606
|
-
const aim = Math.atan2(centre[1] - vp[1], centre[0] - vp[0]);
|
|
5607
|
-
const across = (p) => {
|
|
5608
|
-
if (!perspective) return -p[0] * u[1] + p[1] * u[0];
|
|
5609
|
-
let a = Math.atan2(p[1] - vp[1], p[0] - vp[0]) - aim;
|
|
5610
|
-
while (a > Math.PI) a -= 2 * Math.PI;
|
|
5611
|
-
while (a <= -Math.PI) a += 2 * Math.PI;
|
|
5612
|
-
return a;
|
|
5613
|
-
};
|
|
5614
|
-
const towardBack = (p, q, l) => {
|
|
5615
|
-
const lp = across(p);
|
|
5616
|
-
const lq = across(q);
|
|
5617
|
-
const t = Math.abs(lq - lp) < 1e-12 ? 0.5 : Math.min(1, Math.max(0, (l - lp) / (lq - lp)));
|
|
5618
|
-
const x = [p[0] + (q[0] - p[0]) * t, p[1] + (q[1] - p[1]) * t];
|
|
5619
|
-
return perspective ? -Math.hypot(vp[0] - x[0], vp[1] - x[1]) : x[0] * u[0] + x[1] * u[1];
|
|
5620
|
-
};
|
|
5621
|
-
const faces = [];
|
|
5622
|
-
for (const ring of vectorPathRings(path, 0.25)) {
|
|
5623
|
-
for (let i = 0; i < ring.length; i++) {
|
|
5624
|
-
const p = ring[i];
|
|
5625
|
-
const q = ring[(i + 1) % ring.length];
|
|
5626
|
-
const ex = q[0] - p[0];
|
|
5627
|
-
const ey = q[1] - p[1];
|
|
5628
|
-
const len2 = Math.hypot(ex, ey);
|
|
5629
|
-
if (len2 < 1e-9) continue;
|
|
5630
|
-
const pb = back(p);
|
|
5631
|
-
const qb = back(q);
|
|
5632
|
-
const mid = [(p[0] + q[0]) / 2, (p[1] + q[1]) / 2];
|
|
5633
|
-
const away = perspective ? [vp[0] - mid[0], vp[1] - mid[1]] : d;
|
|
5634
|
-
let n2 = [ey / len2, -ex / len2];
|
|
5635
|
-
if (n2[0] * away[0] + n2[1] * away[1] < 0) n2 = [-n2[0], -n2[1]];
|
|
5636
|
-
const shade = (n2[0] * light[0] + n2[1] * light[1]) * strength;
|
|
5637
|
-
const lp = across(p);
|
|
5638
|
-
const lq = across(q);
|
|
5639
|
-
faces.push({
|
|
5640
|
-
p,
|
|
5641
|
-
q,
|
|
5642
|
-
lo: Math.min(lp, lq),
|
|
5643
|
-
hi: Math.max(lp, lq),
|
|
5644
|
-
key: towardBack(p, q, (lp + lq) / 2),
|
|
5645
|
-
face: {
|
|
5646
|
-
shade,
|
|
5647
|
-
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" }]
|
|
5648
|
-
}
|
|
5649
|
-
});
|
|
5650
|
-
}
|
|
5651
|
-
}
|
|
5652
|
-
faces.sort((a, b) => a.key - b.key);
|
|
5653
|
-
const n = faces.length;
|
|
5654
|
-
const after = faces.map(() => []);
|
|
5655
|
-
const before = new Array(n).fill(0);
|
|
5656
|
-
const eps = 1e-9;
|
|
5657
|
-
for (let i = 0; i < n; i++) {
|
|
5658
|
-
for (let j = i + 1; j < n; j++) {
|
|
5659
|
-
const lo = Math.max(faces[i].lo, faces[j].lo);
|
|
5660
|
-
const hi = Math.min(faces[i].hi, faces[j].hi);
|
|
5661
|
-
if (hi - lo <= eps * Math.max(1, Math.abs(hi))) continue;
|
|
5662
|
-
const l = (lo + hi) / 2;
|
|
5663
|
-
const di = towardBack(faces[i].p, faces[i].q, l);
|
|
5664
|
-
const dj = towardBack(faces[j].p, faces[j].q, l);
|
|
5665
|
-
if (Math.abs(di - dj) < 1e-9) continue;
|
|
5666
|
-
const [back0, front] = di < dj ? [i, j] : [j, i];
|
|
5667
|
-
after[back0].push(front);
|
|
5668
|
-
before[front]++;
|
|
5669
|
-
}
|
|
5670
|
-
}
|
|
5671
|
-
const order = [];
|
|
5672
|
-
const done = new Array(n).fill(false);
|
|
5673
|
-
let next = 0;
|
|
5674
|
-
while (order.length < n) {
|
|
5675
|
-
let pick = -1;
|
|
5676
|
-
for (let i = next; i < n; i++) {
|
|
5677
|
-
if (!done[i] && before[i] === 0) {
|
|
5678
|
-
pick = i;
|
|
5679
|
-
break;
|
|
5680
|
-
}
|
|
5681
|
-
}
|
|
5682
|
-
if (pick < 0) pick = done.indexOf(false);
|
|
5683
|
-
done[pick] = true;
|
|
5684
|
-
order.push(pick);
|
|
5685
|
-
for (const k of after[pick]) before[k]--;
|
|
5686
|
-
while (next < n && done[next]) next++;
|
|
5687
|
-
}
|
|
5688
|
-
return order.map((i) => faces[i].face);
|
|
5689
|
-
}
|
|
5690
|
-
|
|
5691
5765
|
// src/vector/bevel.ts
|
|
5692
5766
|
var MITER_LIMIT = 4;
|
|
5693
5767
|
function crossing2(a, b, c, d) {
|
|
@@ -5934,8 +6008,8 @@ function vectorLensDrawn(node) {
|
|
|
5934
6008
|
if (wire) {
|
|
5935
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)) }));
|
|
5936
6010
|
} else if (recolour) {
|
|
5937
|
-
const fills = _optionalChain([shape, 'access',
|
|
5938
|
-
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)) }))]);
|
|
5939
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 } : {} }));
|
|
5940
6014
|
} else contents.push(shapePath(shape, id, changed));
|
|
5941
6015
|
}
|
|
@@ -5948,7 +6022,7 @@ function vectorLensDrawn(node) {
|
|
|
5948
6022
|
const { lens: _l, lensView: _v, transform: _t, opacity: _o, effects: _e, blendMode: _bm, filters: _f, ...style } = node;
|
|
5949
6023
|
const fillOpacity = lens.type === "transparency" ? 1 - Math.min(100, Math.max(0, lens.amount)) / 100 : 0;
|
|
5950
6024
|
children.push({ ...style, id: `${node.id}~lens-fill`, stroke: null, strokes: void 0, opacity: fillOpacity });
|
|
5951
|
-
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";
|
|
5952
6026
|
if (stroked) children.push({ ...style, id: `${node.id}~lens-stroke`, fill: null, fills: void 0 });
|
|
5953
6027
|
const out = {
|
|
5954
6028
|
id: node.id,
|
|
@@ -5957,7 +6031,7 @@ function vectorLensDrawn(node) {
|
|
|
5957
6031
|
...node.transform ? { transform: node.transform } : {},
|
|
5958
6032
|
...node.opacity !== void 0 ? { opacity: node.opacity } : {},
|
|
5959
6033
|
...node.blendMode ? { blendMode: node.blendMode } : {},
|
|
5960
|
-
..._optionalChain([node, 'access',
|
|
6034
|
+
..._optionalChain([node, 'access', _160 => _160.filters, 'optionalAccess', _161 => _161.length]) ? { filters: node.filters } : {},
|
|
5961
6035
|
children
|
|
5962
6036
|
};
|
|
5963
6037
|
drawnCache2.set(node, out);
|
|
@@ -6958,7 +7032,7 @@ function normalizeVectorEffectParams(type, params, base) {
|
|
|
6958
7032
|
if (!defaults) return null;
|
|
6959
7033
|
const out = { ...defaults, ..._nullishCoalesce(base, () => ( {})) };
|
|
6960
7034
|
for (const spec of VECTOR_EFFECT_PARAM_SPECS[type]) {
|
|
6961
|
-
const v2 = _optionalChain([params, 'optionalAccess',
|
|
7035
|
+
const v2 = _optionalChain([params, 'optionalAccess', _162 => _162[spec.key]]);
|
|
6962
7036
|
if (v2 === void 0) continue;
|
|
6963
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));
|
|
6964
7038
|
else if (spec.kind === "boolean" && typeof v2 === "boolean") out[spec.key] = v2;
|
|
@@ -6970,7 +7044,7 @@ function normalizeVectorEffectParams(type, params, base) {
|
|
|
6970
7044
|
const o = out;
|
|
6971
7045
|
o.rows = Math.round(o.rows);
|
|
6972
7046
|
o.columns = Math.round(o.columns);
|
|
6973
|
-
const given = _optionalChain([params, 'optionalAccess',
|
|
7047
|
+
const given = _optionalChain([params, 'optionalAccess', _163 => _163.mesh]);
|
|
6974
7048
|
let mesh = given !== void 0 ? isValidWarpMesh(given) ? cloneMesh(given) : null : o.mesh;
|
|
6975
7049
|
if (o.style !== "mesh") mesh = null;
|
|
6976
7050
|
if (mesh && given !== void 0) {
|
|
@@ -6987,10 +7061,10 @@ function createVectorEffect(type, id, params) {
|
|
|
6987
7061
|
}
|
|
6988
7062
|
var isEnabled = (e) => e.enabled !== false && !!VECTOR_EFFECT_DEFAULTS[e.type];
|
|
6989
7063
|
function activeVectorEffects(node) {
|
|
6990
|
-
return _nullishCoalesce(_optionalChain([node, 'access',
|
|
7064
|
+
return _nullishCoalesce(_optionalChain([node, 'access', _164 => _164.effects, 'optionalAccess', _165 => _165.filter, 'call', _166 => _166(isEnabled)]), () => ( []));
|
|
6991
7065
|
}
|
|
6992
7066
|
function hasOwnVectorAppearance(node) {
|
|
6993
|
-
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)]);
|
|
6994
7068
|
}
|
|
6995
7069
|
var liveCache = /* @__PURE__ */ new WeakMap();
|
|
6996
7070
|
function hasVectorAppearance(node) {
|
|
@@ -7002,7 +7076,7 @@ function hasVectorAppearance(node) {
|
|
|
7002
7076
|
return v2;
|
|
7003
7077
|
}
|
|
7004
7078
|
function isVectorLiveBoolean(node) {
|
|
7005
|
-
return _optionalChain([node, 'optionalAccess',
|
|
7079
|
+
return _optionalChain([node, 'optionalAccess', _170 => _170.type]) === "group" && !!node.liveBoolean;
|
|
7006
7080
|
}
|
|
7007
7081
|
function vectorOperandOperation(group, child) {
|
|
7008
7082
|
return _nullishCoalesce(_nullishCoalesce(child.booleanOperation, () => ( group.liveBoolean)), () => ( "union"));
|
|
@@ -7119,7 +7193,7 @@ var compareOrder = (a, b) => {
|
|
|
7119
7193
|
for (let i = 0; i < n; i++) if (a[i] !== b[i]) return a[i] - b[i];
|
|
7120
7194
|
return a.length - b.length;
|
|
7121
7195
|
};
|
|
7122
|
-
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))) });
|
|
7123
7197
|
var mapPaths = (shapes, fn) => {
|
|
7124
7198
|
const out = fn(shapes.map((s) => s.path));
|
|
7125
7199
|
return shapes.map((s, i) => ({ ...s, path: _nullishCoalesce(out[i], () => ( [])) }));
|
|
@@ -7147,7 +7221,7 @@ function contourShapes(shapes, c) {
|
|
|
7147
7221
|
const power = 2 ** (Math.min(100, Math.max(-100, c.acceleration)) / 50);
|
|
7148
7222
|
for (let k = 1; k <= n; k++) {
|
|
7149
7223
|
const [path] = offsetPaths([s.path], (outside ? 1 : -1) * step * k, c.join, c.miterLimit, 1, 0);
|
|
7150
|
-
if (!_optionalChain([path, 'optionalAccess',
|
|
7224
|
+
if (!_optionalChain([path, 'optionalAccess', _173 => _173.length])) break;
|
|
7151
7225
|
const t = (k / n) ** power;
|
|
7152
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 };
|
|
7153
7227
|
out.push({ source, path, opacity: s.opacity, order: [outside ? n - k : k, ...s.order] });
|
|
@@ -7222,8 +7296,8 @@ function bevelShapes(shapes, b) {
|
|
|
7222
7296
|
out.push({ source, path: f.path, opacity: s.opacity, order: [...s.order, 1, k] });
|
|
7223
7297
|
});
|
|
7224
7298
|
const [middle] = offsetPaths([s.path], -b.width, "miter", 4, 1, 0);
|
|
7225
|
-
if (_optionalChain([middle, 'optionalAccess',
|
|
7226
|
-
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";
|
|
7227
7301
|
if (hasStroke) out.push({ ...s, source: { ...s.source, fill: null, fills: void 0 }, order: [...s.order, 3] });
|
|
7228
7302
|
}
|
|
7229
7303
|
return out;
|
|
@@ -7356,10 +7430,10 @@ function vectorEffectInputBounds(node, effectId) {
|
|
|
7356
7430
|
return paths ? pathsBounds(paths) : null;
|
|
7357
7431
|
}
|
|
7358
7432
|
function vectorNodeEnvelope(node) {
|
|
7359
|
-
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));
|
|
7360
7434
|
}
|
|
7361
7435
|
function vectorEnvelopeFrame(node, effectId) {
|
|
7362
|
-
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);
|
|
7363
7437
|
if (!e || e.type !== "envelope") return null;
|
|
7364
7438
|
const bounds = vectorEffectInputBounds(node, e.id);
|
|
7365
7439
|
if (!bounds || !(bounds.width > 0 && bounds.height > 0)) return null;
|
|
@@ -7420,7 +7494,7 @@ function placement(node) {
|
|
|
7420
7494
|
...node.blendStep ? { blendStep: true } : {},
|
|
7421
7495
|
...node.booleanOperation ? { booleanOperation: node.booleanOperation } : {},
|
|
7422
7496
|
...node.blendMode ? { blendMode: node.blendMode } : {},
|
|
7423
|
-
..._optionalChain([node, 'access',
|
|
7497
|
+
..._optionalChain([node, 'access', _184 => _184.filters, 'optionalAccess', _185 => _185.length]) ? { filters: node.filters } : {}
|
|
7424
7498
|
};
|
|
7425
7499
|
}
|
|
7426
7500
|
function vectorAppearanceNodes(node) {
|
|
@@ -7552,7 +7626,7 @@ function vectorMasterPages(doc) {
|
|
|
7552
7626
|
function fillTokens(node, page, pages) {
|
|
7553
7627
|
const map = (s) => s.replace(/\{page\}/g, String(page)).replace(/\{pages\}/g, String(pages));
|
|
7554
7628
|
if (!/\{pages?\}/.test(node.text)) return node;
|
|
7555
|
-
if (!_optionalChain([node, 'access',
|
|
7629
|
+
if (!_optionalChain([node, 'access', _186 => _186.runs, 'optionalAccess', _187 => _187.length])) return { ...node, text: map(node.text) };
|
|
7556
7630
|
let at2 = 0;
|
|
7557
7631
|
let text = "";
|
|
7558
7632
|
const runs = [];
|
|
@@ -7575,7 +7649,7 @@ function vectorMasterArt(master, page, number, count) {
|
|
|
7575
7649
|
const f = page.frame;
|
|
7576
7650
|
const key = `${page.id}|${f.x}|${f.y}|${f.width}|${f.height}|${number}|${count}`;
|
|
7577
7651
|
let byKey = artCache.get(master);
|
|
7578
|
-
const hit = _optionalChain([byKey, 'optionalAccess',
|
|
7652
|
+
const hit = _optionalChain([byKey, 'optionalAccess', _188 => _188.get, 'call', _189 => _189(key)]);
|
|
7579
7653
|
if (hit) return hit;
|
|
7580
7654
|
const art = master.children.filter((c) => c.visible !== false).map((c) => {
|
|
7581
7655
|
const box = vectorNodeBounds(c);
|
|
@@ -7620,7 +7694,7 @@ function stripVectorMasterArt(doc) {
|
|
|
7620
7694
|
// src/vector/connectors.ts
|
|
7621
7695
|
var SIDES = ["top", "right", "bottom", "left", "center"];
|
|
7622
7696
|
function isVectorConnector(node) {
|
|
7623
|
-
return _optionalChain([node, 'optionalAccess',
|
|
7697
|
+
return _optionalChain([node, 'optionalAccess', _190 => _190.type]) === "path" && !!node.connector;
|
|
7624
7698
|
}
|
|
7625
7699
|
function vectorConnectionSites(nodes, id) {
|
|
7626
7700
|
const node = findVectorNode(nodes, id);
|
|
@@ -7677,7 +7751,7 @@ function facingSite(sites, toward) {
|
|
|
7677
7751
|
}
|
|
7678
7752
|
function storedEnds(node, world) {
|
|
7679
7753
|
const sp = node.subpaths[0];
|
|
7680
|
-
if (!_optionalChain([sp, 'optionalAccess',
|
|
7754
|
+
if (!_optionalChain([sp, 'optionalAccess', _191 => _191.anchors, 'access', _192 => _192.length])) return null;
|
|
7681
7755
|
const a = sp.anchors[0];
|
|
7682
7756
|
const b = sp.anchors[sp.anchors.length - 1];
|
|
7683
7757
|
return [applyMatrix(world, a), applyMatrix(world, b)];
|
|
@@ -7784,8 +7858,8 @@ function routeVectorConnector(nodes, id) {
|
|
|
7784
7858
|
}));
|
|
7785
7859
|
return {
|
|
7786
7860
|
subpaths: [{ closed: false, anchors: local }],
|
|
7787
|
-
startSide: _nullishCoalesce(_optionalChain([s, 'optionalAccess',
|
|
7788
|
-
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)),
|
|
7789
7863
|
dropped: { start: !!startGlue && !s, end: !!endGlue && !e }
|
|
7790
7864
|
};
|
|
7791
7865
|
}
|
|
@@ -7797,7 +7871,7 @@ function sameSubpaths(a, b) {
|
|
|
7797
7871
|
const o = b[i];
|
|
7798
7872
|
return sp.closed === o.closed && sp.anchors.length === o.anchors.length && sp.anchors.every((p, k) => {
|
|
7799
7873
|
const q = o.anchors[k];
|
|
7800
|
-
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)));
|
|
7801
7875
|
});
|
|
7802
7876
|
});
|
|
7803
7877
|
}
|
|
@@ -8076,7 +8150,7 @@ function applyVectorCornersAttribute(subpaths, value) {
|
|
|
8076
8150
|
for (const item of value.trim().split(/\s+/)) {
|
|
8077
8151
|
const m = /^(\d+)\.(\d+):([\d.eE+-]+)(?::([a-z]+))?$/.exec(item);
|
|
8078
8152
|
if (!m) continue;
|
|
8079
|
-
const a = _optionalChain([subpaths, 'access',
|
|
8153
|
+
const a = _optionalChain([subpaths, 'access', _199 => _199[+m[1]], 'optionalAccess', _200 => _200.anchors, 'access', _201 => _201[+m[2]]]);
|
|
8080
8154
|
const radius = parseFloat(m[3]);
|
|
8081
8155
|
if (!a || !(radius > 0)) continue;
|
|
8082
8156
|
const kind = VECTOR_CORNER_KINDS.includes(m[4]) ? m[4] : void 0;
|
|
@@ -8101,7 +8175,7 @@ function vectorPaintToSvg(paint, gradientId, options = {}) {
|
|
|
8101
8175
|
const area2 = bounds2 ? { x: bounds2.x - reach2, y: bounds2.y - reach2, width: bounds2.width + 2 * reach2, height: bounds2.height + 2 * reach2 } : null;
|
|
8102
8176
|
const key2 = `${gradientId}|${_nullishCoalesce(options.role, () => ( "fill"))}|${_nullishCoalesce(options.precision, () => ( 3))}|${area2 ? [area2.x, area2.y, area2.width, area2.height].join(",") : ""}`;
|
|
8103
8177
|
let byKey2 = paintCache.get(paint);
|
|
8104
|
-
const hit = _optionalChain([byKey2, 'optionalAccess',
|
|
8178
|
+
const hit = _optionalChain([byKey2, 'optionalAccess', _202 => _202.get, 'call', _203 => _203(key2)]);
|
|
8105
8179
|
if (hit) return { value: `url(#${gradientId})`, defs: hit };
|
|
8106
8180
|
const defs2 = vectorShadedSvgDefs(paint, gradientId, { bounds: bounds2, area: area2, precision: _nullishCoalesce(options.precision, () => ( 3)) });
|
|
8107
8181
|
if (!byKey2) paintCache.set(paint, byKey2 = /* @__PURE__ */ new Map());
|
|
@@ -8113,7 +8187,7 @@ function vectorPaintToSvg(paint, gradientId, options = {}) {
|
|
|
8113
8187
|
const precision = _nullishCoalesce(options.precision, () => ( 3));
|
|
8114
8188
|
const key = `${gradientId}|${role}|${precision}`;
|
|
8115
8189
|
const owner = _nullishCoalesce(options.node, () => ( paint));
|
|
8116
|
-
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)]);
|
|
8117
8191
|
if (cached && (!options.node || (role === "fill" ? options.node.fill : options.node.stroke) === paint)) return { value: `url(#${gradientId})`, defs: cached };
|
|
8118
8192
|
const node = options.node;
|
|
8119
8193
|
const bounds = node ? vectorPathLocalBounds(node) : null;
|
|
@@ -8167,7 +8241,7 @@ function vectorNodeLocalPaintBounds(node) {
|
|
|
8167
8241
|
}
|
|
8168
8242
|
var filterCache = /* @__PURE__ */ new WeakMap();
|
|
8169
8243
|
function vectorNodeFilterSvg(node, id) {
|
|
8170
|
-
if (!_optionalChain([node, 'access',
|
|
8244
|
+
if (!_optionalChain([node, 'access', _208 => _208.filters, 'optionalAccess', _209 => _209.length])) return null;
|
|
8171
8245
|
const hit = filterCache.get(node);
|
|
8172
8246
|
if (hit && hit.id === id) return hit.filter;
|
|
8173
8247
|
const active = activeVectorFilters(node);
|
|
@@ -8253,7 +8327,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8253
8327
|
if (node.type === "path" && node.lens) out2 += ` data-vector-lens="${escapeAttr2(JSON.stringify(node.lens))}"`;
|
|
8254
8328
|
const blend = vectorBlendModeCss(node.blendMode);
|
|
8255
8329
|
if (blend) out2 += ` style="mix-blend-mode:${blend}"`;
|
|
8256
|
-
if (_optionalChain([node, 'access',
|
|
8330
|
+
if (_optionalChain([node, 'access', _210 => _210.filters, 'optionalAccess', _211 => _211.length])) {
|
|
8257
8331
|
const filter = vectorNodeFilterSvg(node, `${prefix}filter-${node.id}`);
|
|
8258
8332
|
const data = ` data-vector-filters="${escapeAttr2(JSON.stringify(node.filters))}"`;
|
|
8259
8333
|
if (filter) {
|
|
@@ -8300,7 +8374,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8300
8374
|
let out2 = ` stroke="${escapeAttr2(strokeValue)}" stroke-width="${num3(width)}"`;
|
|
8301
8375
|
if (node.strokeLinecap && node.strokeLinecap !== "butt") out2 += ` stroke-linecap="${node.strokeLinecap}"`;
|
|
8302
8376
|
if (node.strokeLinejoin && node.strokeLinejoin !== "miter") out2 += ` stroke-linejoin="${node.strokeLinejoin}"`;
|
|
8303
|
-
if (_optionalChain([node, 'access',
|
|
8377
|
+
if (_optionalChain([node, 'access', _212 => _212.strokeDasharray, 'optionalAccess', _213 => _213.length])) out2 += ` stroke-dasharray="${node.strokeDasharray.map(num3).join(" ")}"`;
|
|
8304
8378
|
return out2;
|
|
8305
8379
|
};
|
|
8306
8380
|
const liveCorners = (node) => {
|
|
@@ -8313,13 +8387,19 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8313
8387
|
let data = ` data-vector-path="" data-vector-fills="${escapeAttr2(JSON.stringify(vectorFills(node)))}" data-vector-strokes="${escapeAttr2(JSON.stringify(vectorStrokes(node)))}"`;
|
|
8314
8388
|
if (node.fillRule === "evenodd") data += ` data-vector-fill-rule="evenodd"`;
|
|
8315
8389
|
lines.push(`${indent(depth)}<g${common(node)}${data}>`);
|
|
8316
|
-
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);
|
|
8317
8391
|
let geometry = liveCorners(node);
|
|
8318
8392
|
if (!layers.some((l) => l.kind === "fill")) {
|
|
8319
8393
|
lines.push(`${indent(depth + 1)}<path data-vector-part="fill" d="${d}" fill="none"${rule}${geometry}/>`);
|
|
8320
8394
|
geometry = "";
|
|
8321
8395
|
}
|
|
8322
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
|
+
}
|
|
8323
8403
|
const id = `${prefix}${l.kind}-${node.id}-${l.index}`;
|
|
8324
8404
|
const paint = vectorPaintToSvg(l.layer.paint, id, { node: l.node, precision, ...l.kind === "stroke" ? { role: "stroke" } : {} });
|
|
8325
8405
|
defs.push(...paintMarkup(l.layer.paint, paint.defs));
|
|
@@ -8343,7 +8423,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8343
8423
|
};
|
|
8344
8424
|
const emit2 = (node, depth) => {
|
|
8345
8425
|
if (node.visible === false && !options.includeHidden) return;
|
|
8346
|
-
const wrappers = _nullishCoalesce(_optionalChain([options, 'access',
|
|
8426
|
+
const wrappers = _nullishCoalesce(_optionalChain([options, 'access', _214 => _214.wrap, 'optionalAccess', _215 => _215[node.id]]), () => ( []));
|
|
8347
8427
|
wrappers.forEach((w2, i) => {
|
|
8348
8428
|
let attrs = w2.id !== void 0 ? ` id="${escapeAttr2(w2.id)}"` : "";
|
|
8349
8429
|
if (w2.transform) attrs += ` transform="${escapeAttr2(w2.transform)}"`;
|
|
@@ -8364,7 +8444,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8364
8444
|
};
|
|
8365
8445
|
const emitMaskGroup = (node, depth) => {
|
|
8366
8446
|
const [source, ...contents] = node.children;
|
|
8367
|
-
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;
|
|
8368
8448
|
const settings = { type: node.mask.type, ...node.mask.invert ? { invert: true } : {} };
|
|
8369
8449
|
lines.push(`${indent(depth)}<g${common(node)} data-vector-mask="${escapeAttr2(JSON.stringify(settings))}">`);
|
|
8370
8450
|
const mask = vectorMaskRenderData(node, `${prefix}mask-${node.id}`, `${prefix}mask-filter-${node.id}`, precision);
|
|
@@ -8381,7 +8461,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8381
8461
|
lines.push(`${indent(depth + 1)}<g data-vector-part="mask-source" display="none">`);
|
|
8382
8462
|
emitNode(source, depth + 2);
|
|
8383
8463
|
lines.push(`${indent(depth + 1)}</g>`);
|
|
8384
|
-
if (_optionalChain([mask, 'optionalAccess',
|
|
8464
|
+
if (_optionalChain([mask, 'optionalAccess', _218 => _218.clip])) {
|
|
8385
8465
|
defs.push(`<clipPath id="${escapeAttr2(mask.id)}">${mask.clip.map((c) => `<path d="${c.d}" clip-rule="${c.clipRule}"/>`).join("")}</clipPath>`);
|
|
8386
8466
|
ref = ` clip-path="url(#${escapeAttr2(mask.id)})"`;
|
|
8387
8467
|
}
|
|
@@ -8393,7 +8473,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8393
8473
|
};
|
|
8394
8474
|
const emitTextElement = (node, depth, attrs) => {
|
|
8395
8475
|
const geometry = vectorTextGeometryNode(node);
|
|
8396
|
-
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 } : {} };
|
|
8397
8477
|
let data = ` data-vector-text="${escapeAttr2(JSON.stringify(fields))}"`;
|
|
8398
8478
|
if (hasVectorPaintStacks(node)) data += ` data-vector-fills="${escapeAttr2(JSON.stringify(vectorFills(node)))}" data-vector-strokes="${escapeAttr2(JSON.stringify(vectorStrokes(node)))}"`;
|
|
8399
8479
|
else {
|
|
@@ -8435,12 +8515,12 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8435
8515
|
};
|
|
8436
8516
|
const emitText = (node, depth) => {
|
|
8437
8517
|
const outlines = vectorTextPaths(node).outlines;
|
|
8438
|
-
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)]);
|
|
8439
8519
|
if (!outlines || !effects && options.text !== "outlines") {
|
|
8440
8520
|
emitTextElement(node, depth, common(node));
|
|
8441
8521
|
return;
|
|
8442
8522
|
}
|
|
8443
|
-
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 } : {} }))}">`);
|
|
8444
8524
|
lines.push(`${indent(depth + 1)}<g data-vector-part="appearance">`);
|
|
8445
8525
|
for (const shape of vectorAppearanceNodes(node)) emit2(shape, depth + 2);
|
|
8446
8526
|
lines.push(`${indent(depth + 1)}</g>`);
|
|
@@ -8454,7 +8534,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8454
8534
|
const symbolRef = (symbolId) => {
|
|
8455
8535
|
const hit = symbolIds.get(symbolId);
|
|
8456
8536
|
if (hit) return hit;
|
|
8457
|
-
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)]);
|
|
8458
8538
|
if (!sym2) return null;
|
|
8459
8539
|
const id = `${prefix}symbol-${symbolId}`;
|
|
8460
8540
|
symbolIds.set(symbolId, id);
|
|
@@ -8464,20 +8544,20 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8464
8544
|
};
|
|
8465
8545
|
const emitInstance = (node, depth) => {
|
|
8466
8546
|
const data = { symbolId: node.symbolId, ...node.scaleStrokes === false ? { scaleStrokes: false } : {}, ...node.overrides ? { overrides: node.overrides } : {} };
|
|
8467
|
-
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]);
|
|
8468
8548
|
const ref = symbolRef(node.symbolId);
|
|
8469
8549
|
if (exact2 && ref) {
|
|
8470
8550
|
lines.push(`${indent(depth)}<use${common(node)} href="#${escapeAttr2(ref)}" data-vector-instance="${escapeAttr2(JSON.stringify(data))}"/>`);
|
|
8471
8551
|
return;
|
|
8472
8552
|
}
|
|
8473
|
-
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 } : {} };
|
|
8474
8554
|
lines.push(`${indent(depth)}<g data-vector-instance="${escapeAttr2(JSON.stringify(full))}">`);
|
|
8475
8555
|
emitNode(vectorInstanceDrawn(node), depth + 1);
|
|
8476
8556
|
lines.push(`${indent(depth)}</g>`);
|
|
8477
8557
|
};
|
|
8478
8558
|
const emitFrame = (node, depth) => {
|
|
8479
8559
|
const f = node.frame;
|
|
8480
|
-
const data = { ...f, ..._optionalChain([node, 'access',
|
|
8560
|
+
const data = { ...f, ..._optionalChain([node, 'access', _237 => _237.effects, 'optionalAccess', _238 => _238.length]) ? { effects: node.effects } : {} };
|
|
8481
8561
|
lines.push(`${indent(depth)}<g${common(node)} data-vector-frame="${escapeAttr2(JSON.stringify(data))}">`);
|
|
8482
8562
|
const rect = vectorFrameRectPath(f);
|
|
8483
8563
|
if (f.fill !== void 0 && f.fill !== null && f.fill !== "none") {
|
|
@@ -8492,7 +8572,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8492
8572
|
ref = ` clip-path="url(#${escapeAttr2(id)})"`;
|
|
8493
8573
|
}
|
|
8494
8574
|
lines.push(`${indent(depth + 1)}<g data-vector-part="frame-contents"${ref}>`);
|
|
8495
|
-
if (_optionalChain([node, 'access',
|
|
8575
|
+
if (_optionalChain([node, 'access', _239 => _239.masterArt, 'optionalAccess', _240 => _240.length])) {
|
|
8496
8576
|
lines.push(`${indent(depth + 2)}<g data-vector-part="frame-master">`);
|
|
8497
8577
|
for (const child of node.masterArt) emit2(child, depth + 3);
|
|
8498
8578
|
lines.push(`${indent(depth + 2)}</g>`);
|
|
@@ -8521,7 +8601,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8521
8601
|
if (hasOwnVectorAppearance(node)) {
|
|
8522
8602
|
const live2 = {
|
|
8523
8603
|
kind: node.type,
|
|
8524
|
-
..._optionalChain([node, 'access',
|
|
8604
|
+
..._optionalChain([node, 'access', _241 => _241.effects, 'optionalAccess', _242 => _242.length]) ? { effects: node.effects } : {},
|
|
8525
8605
|
...node.type === "group" && node.liveBoolean ? { liveBoolean: node.liveBoolean } : {},
|
|
8526
8606
|
...node.type === "group" && node.symmetry ? { symmetry: node.symmetry } : {}
|
|
8527
8607
|
};
|
|
@@ -8572,7 +8652,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8572
8652
|
data += ` data-vector-width-profile="${widthProfileToAttribute(profile)}"`;
|
|
8573
8653
|
if (node.strokeLinecap && node.strokeLinecap !== "butt") data += ` data-vector-stroke-linecap="${node.strokeLinecap}"`;
|
|
8574
8654
|
if (node.strokeLinejoin && node.strokeLinejoin !== "miter") data += ` data-vector-stroke-linejoin="${node.strokeLinejoin}"`;
|
|
8575
|
-
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(" ")}"`;
|
|
8576
8656
|
}
|
|
8577
8657
|
lines.push(`${indent(depth)}<g${common(node)}${data}>`);
|
|
8578
8658
|
lines.push(`${indent(depth + 1)}<path data-vector-part="fill" d="${d}"${fillAttrs}${live}/>`);
|
|
@@ -8740,7 +8820,7 @@ function attrOrStyle(el, name) {
|
|
|
8740
8820
|
return el.attrs[name];
|
|
8741
8821
|
}
|
|
8742
8822
|
function urlId(value) {
|
|
8743
|
-
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));
|
|
8744
8824
|
}
|
|
8745
8825
|
function clipRulesAsFillRules(el) {
|
|
8746
8826
|
const attrs = { ...el.attrs };
|
|
@@ -8805,9 +8885,9 @@ function resolveGradient(id, raw) {
|
|
|
8805
8885
|
for (let el = first; el && !chain.includes(el) && chain.length < 32; ) {
|
|
8806
8886
|
chain.push(el);
|
|
8807
8887
|
const href = _nullishCoalesce(el.attrs.href, () => ( el.attrs["xlink:href"]));
|
|
8808
|
-
el = _optionalChain([href, 'optionalAccess',
|
|
8888
|
+
el = _optionalChain([href, 'optionalAccess', _248 => _248.startsWith, 'call', _249 => _249("#")]) ? raw.get(href.slice(1)) : void 0;
|
|
8809
8889
|
}
|
|
8810
|
-
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]]);
|
|
8811
8891
|
const stops = _nullishCoalesce(chain.map(readStops).find((s) => s.length), () => ( []));
|
|
8812
8892
|
if (!stops.length) return null;
|
|
8813
8893
|
const user = attr("gradientUnits") === "userSpaceOnUse";
|
|
@@ -8977,7 +9057,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8977
9057
|
const stackedPath = (g, _style, m, meta) => {
|
|
8978
9058
|
const fillEl = g.children.find((c) => c.name === "path" && c.attrs["data-vector-part"] === "fill");
|
|
8979
9059
|
const subpaths = fillEl ? shapeOf(fillEl) : null;
|
|
8980
|
-
if (!_optionalChain([subpaths, 'optionalAccess',
|
|
9060
|
+
if (!_optionalChain([subpaths, 'optionalAccess', _254 => _254.length])) return null;
|
|
8981
9061
|
const parse = (v2) => {
|
|
8982
9062
|
try {
|
|
8983
9063
|
return v2 ? JSON.parse(v2) : [];
|
|
@@ -8996,7 +9076,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
8996
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))]);
|
|
8997
9077
|
for (const n of nodes2) {
|
|
8998
9078
|
const prev = out[out.length - 1];
|
|
8999
|
-
if (_optionalChain([prev, 'optionalAccess',
|
|
9079
|
+
if (_optionalChain([prev, 'optionalAccess', _255 => _255.type]) === "path" && n.type === "path" && key(prev) === key(n)) {
|
|
9000
9080
|
const fills = vectorFills(n);
|
|
9001
9081
|
const strokesBefore = vectorStrokes(prev);
|
|
9002
9082
|
if (!(fills.length && strokesBefore.length)) {
|
|
@@ -9014,7 +9094,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9014
9094
|
const part = (name) => g.children.find((c) => c.name === "path" && c.attrs["data-vector-part"] === name);
|
|
9015
9095
|
const fillEl = part("fill");
|
|
9016
9096
|
const subpaths = fillEl ? shapeOf(fillEl) : null;
|
|
9017
|
-
if (!fillEl || !_optionalChain([subpaths, 'optionalAccess',
|
|
9097
|
+
if (!fillEl || !_optionalChain([subpaths, 'optionalAccess', _256 => _256.length])) return null;
|
|
9018
9098
|
const a = g.attrs;
|
|
9019
9099
|
const fs = readStyle(fillEl, style);
|
|
9020
9100
|
const strokeEl = part("stroke");
|
|
@@ -9051,7 +9131,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9051
9131
|
...profile.length ? { strokeWidthProfile: profile } : {},
|
|
9052
9132
|
...keptCap ? { strokeLinecap: keptCap } : {},
|
|
9053
9133
|
...keptJoin ? { strokeLinejoin: keptJoin } : {},
|
|
9054
|
-
..._optionalChain([keptDash, 'optionalAccess',
|
|
9134
|
+
..._optionalChain([keptDash, 'optionalAccess', _257 => _257.length]) ? { strokeDasharray: keptDash } : {}
|
|
9055
9135
|
};
|
|
9056
9136
|
return placed(node, m);
|
|
9057
9137
|
};
|
|
@@ -9116,8 +9196,8 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9116
9196
|
} else {
|
|
9117
9197
|
const fill = json2(g.attrs["data-vector-fill"]);
|
|
9118
9198
|
const stroke = json2(g.attrs["data-vector-stroke"]);
|
|
9119
|
-
node.fill = fill == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call',
|
|
9120
|
-
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));
|
|
9121
9201
|
const settings = json2(g.attrs["data-vector-stroke-settings"]);
|
|
9122
9202
|
if (settings && typeof settings === "object") {
|
|
9123
9203
|
const strokes = sanitizeVectorStrokes([{ paint: _nullishCoalesce(node.stroke, () => ( "#000")), ...settings }]);
|
|
@@ -9153,8 +9233,8 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9153
9233
|
const anchor = attrOrStyle(el, "text-anchor");
|
|
9154
9234
|
const first0 = (v2) => _nullishCoalesce(numberList(v2)[0], () => ( 0));
|
|
9155
9235
|
const tspan = el.children.find((c) => c.name === "tspan");
|
|
9156
|
-
const x = el.attrs.x !== void 0 ? first0(el.attrs.x) : first0(_optionalChain([tspan, 'optionalAccess',
|
|
9157
|
-
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]));
|
|
9158
9238
|
const fillValue = _nullishCoalesce(attrOrStyle(el, "fill"), () => ( style.fill));
|
|
9159
9239
|
let node = {
|
|
9160
9240
|
id: idFor(el),
|
|
@@ -9185,12 +9265,12 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9185
9265
|
if (symbolOfElement.has(el)) return symbolOfElement.get(el);
|
|
9186
9266
|
symbolOfElement.set(el, null);
|
|
9187
9267
|
const own = json2(el.attrs["data-vector-symbol"]);
|
|
9188
|
-
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()));
|
|
9189
9269
|
while (usedSymbolIds.has(id)) id = `${id}-${usedSymbolIds.size}`;
|
|
9190
9270
|
usedSymbolIds.add(id);
|
|
9191
9271
|
const style = readStyle(el, rootStyle);
|
|
9192
9272
|
const nodes2 = el.name === "symbol" ? visit2(el, style, IDENTITY_MATRIX) : visitOne({ ...el, attrs: { ...el.attrs, transform: "" } }, rootStyle, parseSvgTransform(el.attrs.transform));
|
|
9193
|
-
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 });
|
|
9194
9274
|
symbolOfElement.set(el, id);
|
|
9195
9275
|
return id;
|
|
9196
9276
|
};
|
|
@@ -9202,13 +9282,13 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9202
9282
|
if (!symbolId) return null;
|
|
9203
9283
|
const own = json2(el.attrs["data-vector-instance"]);
|
|
9204
9284
|
const place2 = multiplyMatrices(translateMatrix(length(el.attrs.x), length(el.attrs.y)), m);
|
|
9205
|
-
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 } : {} };
|
|
9206
9286
|
return isIdentityMatrix(place2) ? node : { ...node, transform: place2 };
|
|
9207
9287
|
};
|
|
9208
9288
|
const ownInstance = (g, m, meta) => {
|
|
9209
9289
|
const raw = json2(g.attrs["data-vector-instance"]);
|
|
9210
9290
|
if (!raw || typeof raw.symbolId !== "string") return null;
|
|
9211
|
-
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);
|
|
9212
9292
|
const symbolId = sym2 ? symbolFor(sym2) : raw.symbolId;
|
|
9213
9293
|
if (!symbolId) return null;
|
|
9214
9294
|
const t = Array.isArray(raw.transform) && raw.transform.length === 6 && raw.transform.every(Number.isFinite) ? raw.transform : IDENTITY_MATRIX;
|
|
@@ -9216,7 +9296,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9216
9296
|
const drawn = g.children.find((c) => c.name === "g");
|
|
9217
9297
|
const effects = sanitizeVectorEffects(raw.effects);
|
|
9218
9298
|
const node = {
|
|
9219
|
-
id: _nullishCoalesce(_optionalChain([drawn, 'optionalAccess',
|
|
9299
|
+
id: _nullishCoalesce(_optionalChain([drawn, 'optionalAccess', _274 => _274.attrs, 'access', _275 => _275.id]), () => ( idFor(g))),
|
|
9220
9300
|
type: "instance",
|
|
9221
9301
|
...meta,
|
|
9222
9302
|
symbolId,
|
|
@@ -9273,12 +9353,12 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9273
9353
|
const masked = (el, nodes2, m) => {
|
|
9274
9354
|
let out = nodes2;
|
|
9275
9355
|
const clipEl = rawMasks.get(_nullishCoalesce(urlId(attrOrStyle(el, "clip-path")), () => ( "")));
|
|
9276
|
-
if (_optionalChain([clipEl, 'optionalAccess',
|
|
9356
|
+
if (_optionalChain([clipEl, 'optionalAccess', _276 => _276.name]) === "clipPath") {
|
|
9277
9357
|
const source = maskNode(clipEl, m, out, clipEl.attrs.clipPathUnits);
|
|
9278
9358
|
if (source) out = [{ id: idFor({ name: "g", attrs: {}, children: [] }), type: "group", name: "Clip Group", mask: { type: "clip" }, children: [source, ...out] }];
|
|
9279
9359
|
}
|
|
9280
9360
|
const maskEl = rawMasks.get(_nullishCoalesce(urlId(attrOrStyle(el, "mask")), () => ( "")));
|
|
9281
|
-
if (_optionalChain([maskEl, 'optionalAccess',
|
|
9361
|
+
if (_optionalChain([maskEl, 'optionalAccess', _277 => _277.name]) === "mask") {
|
|
9282
9362
|
const source = maskNode(maskEl, m, out, maskEl.attrs.maskContentUnits);
|
|
9283
9363
|
const type = attrOrStyle(maskEl, "mask-type") === "alpha" ? "alpha" : "luminance";
|
|
9284
9364
|
if (source) out = [{ id: idFor({ name: "g", attrs: {}, children: [] }), type: "group", name: "Opacity Mask", mask: { type }, children: [source, ...out] }];
|
|
@@ -9300,19 +9380,19 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9300
9380
|
let sourceEl = part("mask-source");
|
|
9301
9381
|
if (!sourceEl) {
|
|
9302
9382
|
const el = rawMasks.get(_nullishCoalesce(urlId(maskedEl.attrs.mask), () => ( "")));
|
|
9303
|
-
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")]);
|
|
9304
9384
|
sourceEl = _nullishCoalesce(invert2, () => ( el));
|
|
9305
9385
|
}
|
|
9306
9386
|
const source = sourceEl ? visit2(sourceEl, style, m)[0] : void 0;
|
|
9307
9387
|
let contents = visit2(maskedEl, style, m);
|
|
9308
9388
|
let effects;
|
|
9309
9389
|
const wrapper = contents.length === 1 && contents[0].type === "group" && contents[0].id === `${id}~content` ? contents[0] : null;
|
|
9310
|
-
if (_optionalChain([wrapper, 'optionalAccess',
|
|
9390
|
+
if (_optionalChain([wrapper, 'optionalAccess', _281 => _281.type]) === "group") {
|
|
9311
9391
|
effects = _nullishCoalesce(wrapper.effects, () => ( void 0));
|
|
9312
9392
|
contents = wrapper.children;
|
|
9313
9393
|
}
|
|
9314
9394
|
if (!source) return contents.length ? { id, type: "group", ...meta, children: contents } : null;
|
|
9315
|
-
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] };
|
|
9316
9396
|
};
|
|
9317
9397
|
const frameGroup = (g, style, m, meta) => {
|
|
9318
9398
|
const raw = parseJson(g.attrs["data-vector-frame"]);
|
|
@@ -9324,7 +9404,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9324
9404
|
const { rigid, residual } = decomposeRigid(m);
|
|
9325
9405
|
const r = _chunkBJTCSLF6cjs.bezierPathBounds.call(void 0, _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, subpathsToBezier(vectorFrameRectPath(frame)), residual));
|
|
9326
9406
|
const back = invertMatrix(rigid);
|
|
9327
|
-
const effects = sanitizeVectorEffects(_optionalChain([raw, 'optionalAccess',
|
|
9407
|
+
const effects = sanitizeVectorEffects(_optionalChain([raw, 'optionalAccess', _283 => _283.effects]));
|
|
9328
9408
|
return {
|
|
9329
9409
|
id,
|
|
9330
9410
|
type: "group",
|
|
@@ -9796,13 +9876,13 @@ function hitTestVectorNode(node, p, tolerance = 0, parent = IDENTITY_MATRIX, opt
|
|
|
9796
9876
|
}
|
|
9797
9877
|
if (isVectorMaskGroup(node)) {
|
|
9798
9878
|
const m = multiplyMatrices(nodeMatrix(node), parent);
|
|
9799
|
-
const entered = !!_optionalChain([options, 'access',
|
|
9879
|
+
const entered = !!_optionalChain([options, 'access', _284 => _284.entered, 'optionalAccess', _285 => _285.has, 'call', _286 => _286(node.id)]);
|
|
9800
9880
|
if (!entered && isVectorMaskActive(node) && !vectorMaskContains(node, applyMatrix(invertMatrix(m), p), tolerance)) return false;
|
|
9801
9881
|
const shown = !entered && hasOwnVectorAppearance(node) ? expandVectorAppearance(node).children : node.children;
|
|
9802
9882
|
for (let i = shown.length - 1; i >= 1; i--) if (hitTestVectorNode(shown[i], p, tolerance, m, options)) return true;
|
|
9803
9883
|
return entered && hitTestVectorMaskSource(node, p, tolerance, m, options);
|
|
9804
9884
|
}
|
|
9805
|
-
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);
|
|
9806
9886
|
if (node.type === "group") {
|
|
9807
9887
|
const m = multiplyMatrices(nodeMatrix(node), parent);
|
|
9808
9888
|
return node.children.some((c) => hitTestVectorNode(c, p, tolerance, m, options));
|
|
@@ -9814,7 +9894,7 @@ function hitTestVectorNode(node, p, tolerance = 0, parent = IDENTITY_MATRIX, opt
|
|
|
9814
9894
|
function hitTestVectorMaskSource(group, p, tolerance, m, options) {
|
|
9815
9895
|
const source = group.children[0];
|
|
9816
9896
|
if (source.visible === false) return false;
|
|
9817
|
-
if (_optionalChain([group, 'access',
|
|
9897
|
+
if (_optionalChain([group, 'access', _290 => _290.mask, 'optionalAccess', _291 => _291.type]) !== "clip") return hitTestVectorNode(source, p, tolerance, m, options);
|
|
9818
9898
|
const paths = collectPathNodes(source).filter((n) => n.visible !== false);
|
|
9819
9899
|
const pt2 = [p.x, p.y];
|
|
9820
9900
|
return paths.some((n) => {
|
|
@@ -9863,24 +9943,24 @@ function mapAnchor(a, m) {
|
|
|
9863
9943
|
}
|
|
9864
9944
|
function bakeIntoGeometry(node, m) {
|
|
9865
9945
|
if (isIdentityMatrix(m)) return node;
|
|
9866
|
-
if (_optionalChain([node, 'access',
|
|
9946
|
+
if (_optionalChain([node, 'access', _292 => _292.effects, 'optionalAccess', _293 => _293.length])) node = { ...node, effects: transformVectorEffects(node.effects, m, node) };
|
|
9867
9947
|
if (isVectorFrame(node)) return bakeFrame(node, m);
|
|
9868
9948
|
if (node.type === "group") {
|
|
9869
9949
|
const group = node;
|
|
9870
9950
|
const children = group.children.map((c) => transformVectorNode(c, m));
|
|
9871
9951
|
const sym2 = group.symmetry ? { symmetry: transformVectorSymmetry(group.symmetry, m) } : {};
|
|
9872
|
-
const spine = _optionalChain([group, 'access',
|
|
9952
|
+
const spine = _optionalChain([group, 'access', _294 => _294.blend, 'optionalAccess', _295 => _295.spine]);
|
|
9873
9953
|
if (!spine) return { ...group, ...sym2, children };
|
|
9874
9954
|
const moved = { closed: spine.closed, anchors: spine.anchors.map((a) => mapAnchor(a, m)) };
|
|
9875
9955
|
return { ...group, children, blend: { ...group.blend, spine: moved } };
|
|
9876
9956
|
}
|
|
9877
9957
|
const path = node.type === "text" ? bakeVectorTextGeometry(node, m) : node;
|
|
9878
9958
|
const flips = m[0] * m[3] - m[1] * m[2] < 0;
|
|
9879
|
-
const mirrored = flips && _optionalChain([path, 'access',
|
|
9959
|
+
const mirrored = flips && _optionalChain([path, 'access', _296 => _296.strokeWidthProfile, 'optionalAccess', _297 => _297.length]);
|
|
9880
9960
|
const layer = (l) => ({
|
|
9881
9961
|
...l,
|
|
9882
9962
|
...isVectorGradient(l.paint) || isVectorShadedPaint(l.paint) ? { paint: transformVectorPaint(l.paint, m) } : {},
|
|
9883
|
-
...flips && _optionalChain([l, 'access',
|
|
9963
|
+
...flips && _optionalChain([l, 'access', _298 => _298.strokeWidthProfile, 'optionalAccess', _299 => _299.length]) ? { strokeWidthProfile: mirrorWidthProfile(l.strokeWidthProfile) } : {}
|
|
9884
9964
|
});
|
|
9885
9965
|
return {
|
|
9886
9966
|
...path,
|
|
@@ -10115,7 +10195,7 @@ function roundSubpaths(subpaths, precision = 3) {
|
|
|
10115
10195
|
|
|
10116
10196
|
// src/vector/symmetry.ts
|
|
10117
10197
|
function isVectorSymmetryGroup(node) {
|
|
10118
|
-
return _optionalChain([node, 'optionalAccess',
|
|
10198
|
+
return _optionalChain([node, 'optionalAccess', _300 => _300.type]) === "group" && !!node.symmetry && !node.blend && !node.liveBoolean && !node.mask && !node.frame;
|
|
10119
10199
|
}
|
|
10120
10200
|
var rad = (deg) => deg * Math.PI / 180;
|
|
10121
10201
|
var exact = (v2) => Math.abs(v2) < 1e-12 ? 0 : v2;
|
|
@@ -10684,5 +10764,12 @@ function transformVectorSymmetry(s, m) {
|
|
|
10684
10764
|
|
|
10685
10765
|
|
|
10686
10766
|
|
|
10687
|
-
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;
|
|
10688
|
-
|
|
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
|