@pixerate/editor 0.259.0 → 0.260.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/agent/index.cjs +2 -2
- package/dist/agent/index.js +1 -1
- package/dist/animation-editor/index.cjs +61 -59
- package/dist/animation-editor/index.js +5 -3
- package/dist/brushes/index.cjs +52 -52
- package/dist/brushes/index.js +6 -6
- package/dist/{brushstrokeRender-JI4W6F2G.js → brushstrokeRender-25Q5BEY6.js} +17 -7
- package/dist/{brushstrokeRender-MQ6PSDM5.cjs → brushstrokeRender-N6UPZSQS.cjs} +31 -21
- package/dist/canvas/brushTypes.d.cts +5 -0
- package/dist/canvas/brushTypes.d.ts +5 -0
- package/dist/canvas/drawController.d.cts +15 -1
- package/dist/canvas/drawController.d.ts +15 -1
- package/dist/canvas/index.cjs +136 -102
- package/dist/canvas/index.js +35 -1
- package/dist/{chunk-3PPJRMIG.js → chunk-3O47TPGX.js} +197 -18
- package/dist/{chunk-5Q5MLXAD.cjs → chunk-3TQW5MPW.cjs} +23 -23
- package/dist/{chunk-JBBJE76O.cjs → chunk-3ZRNK3RO.cjs} +1138 -85
- package/dist/{chunk-YSGW7VV4.cjs → chunk-43NT242D.cjs} +1401 -228
- package/dist/{chunk-SMTUQWGY.js → chunk-5IW65VQ6.js} +1 -1
- package/dist/{chunk-YQ4PQTBB.js → chunk-6NZL24W4.js} +9 -1
- package/dist/{chunk-O3ZVZSNJ.cjs → chunk-7AUQ2UJ3.cjs} +137 -129
- package/dist/{chunk-4M4E3N6X.js → chunk-CQVTGBQI.js} +1 -1
- package/dist/{chunk-SSFMWJDK.js → chunk-D4TE5JNW.js} +1192 -19
- package/dist/{chunk-AORZ5M5C.js → chunk-EHALWBBD.js} +1 -1
- package/dist/{chunk-6WCQ35GI.cjs → chunk-NHA26O5X.cjs} +2 -2
- package/dist/{chunk-DPYAO5U6.cjs → chunk-PVJMTLPJ.cjs} +197 -18
- package/dist/{chunk-MQGQTKVW.cjs → chunk-PYTJBVW5.cjs} +29 -29
- package/dist/{chunk-IXQZHCOF.js → chunk-QAR2N7HZ.js} +1 -1
- package/dist/{chunk-5P4JEOIV.js → chunk-TMDDMJCR.js} +2 -2
- package/dist/{chunk-RSIKDWOP.cjs → chunk-TZOX7KWV.cjs} +15 -15
- package/dist/{chunk-IPUTIUGQ.cjs → chunk-UVZ7RQOE.cjs} +1 -1
- package/dist/{chunk-A7GJ6BXI.js → chunk-WJ4WQJCC.js} +1062 -9
- package/dist/{chunk-ICTPLVSR.js → chunk-X2EXYY4J.js} +1 -1
- package/dist/{chunk-WQCNC4DK.js → chunk-XC6DPRYI.js} +695 -4
- package/dist/{chunk-KBYB7OWB.cjs → chunk-YHDHFJUC.cjs} +776 -85
- package/dist/{chunk-P3PZ63M3.cjs → chunk-YLUIFXSL.cjs} +35 -35
- package/dist/commands/index.cjs +2 -2
- package/dist/commands/index.js +1 -1
- package/dist/image-editor/index.cjs +1385 -2484
- package/dist/image-editor/index.js +139 -1238
- package/dist/image-editor/selection-worker.cjs +3 -4
- package/dist/image-editor/selection-worker.js +1 -2
- package/dist/paint/index.cjs +3 -5
- package/dist/paint/index.js +40 -42
- package/dist/paint-editor/contract.d.cts +29 -0
- package/dist/paint-editor/contract.d.ts +29 -0
- package/dist/paint-editor/dab-stroke.d.cts +5 -0
- package/dist/paint-editor/dab-stroke.d.ts +5 -0
- package/dist/paint-editor/index.cjs +402 -258
- package/dist/paint-editor/index.d.cts +1 -0
- package/dist/paint-editor/index.d.ts +1 -0
- package/dist/paint-editor/index.js +197 -53
- package/dist/paint-editor/stamp-tip.d.cts +17 -0
- package/dist/paint-editor/stamp-tip.d.ts +17 -0
- package/dist/paint-editor/ui.d.cts +21 -1
- package/dist/paint-editor/ui.d.ts +21 -1
- package/dist/raster/index.cjs +2 -4
- package/dist/raster/index.js +6 -8
- package/dist/vector/brushstroke.d.cts +6 -0
- package/dist/vector/brushstroke.d.ts +6 -0
- package/dist/vector/controller.d.cts +11 -2
- package/dist/vector/controller.d.ts +11 -2
- package/dist/vector/index.cjs +990 -973
- package/dist/vector/index.js +28 -11
- package/package.json +1 -1
- package/skills/pixerate-brushes/SKILL.md +1 -1
- package/skills/pixerate-canvas/SKILL.md +3 -1
- package/skills/pixerate-vector/SKILL.md +2 -2
- package/dist/chunk-2VJAVXLI.js +0 -192
- package/dist/chunk-62Z5WLRA.js +0 -700
- package/dist/chunk-BOHDJJ2O.cjs +0 -192
- package/dist/chunk-NKGB64CW.cjs +0 -700
- package/dist/chunk-SS53NNZO.cjs +0 -1066
- package/dist/chunk-ZNA3IQZF.js +0 -1066
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkTZOX7KWVcjs = require('./chunk-TZOX7KWV.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunkCVFAAZXEcjs = require('./chunk-CVFAAZXE.cjs');
|
|
@@ -51,6 +51,9 @@ var _chunkGF2RBSDMcjs = require('./chunk-GF2RBSDM.cjs');
|
|
|
51
51
|
var _chunkNM3G4VQTcjs = require('./chunk-NM3G4VQT.cjs');
|
|
52
52
|
|
|
53
53
|
|
|
54
|
+
var _chunkLRTR4ASZcjs = require('./chunk-LRTR4ASZ.cjs');
|
|
55
|
+
|
|
56
|
+
|
|
54
57
|
|
|
55
58
|
|
|
56
59
|
|
|
@@ -2533,11 +2536,11 @@ function vectorExtrudeFaces(path, params) {
|
|
|
2533
2536
|
|
|
2534
2537
|
// src/vector/brushstroke.ts
|
|
2535
2538
|
var VECTOR_BRUSHSTROKE_SCALE = 2;
|
|
2536
|
-
var PRESETS =
|
|
2539
|
+
var PRESETS = _chunkTZOX7KWVcjs.listPresets.call(void 0, _chunkTZOX7KWVcjs.VECTOR_PROFILE).map((spec) => _chunkTZOX7KWVcjs.BUILTIN_BRUSHES.find((b) => b.id === spec.id));
|
|
2537
2540
|
function admitted(spec) {
|
|
2538
2541
|
try {
|
|
2539
|
-
const brush =
|
|
2540
|
-
return
|
|
2542
|
+
const brush = _chunkTZOX7KWVcjs.normalizeBrushSpec.call(void 0, spec);
|
|
2543
|
+
return _chunkTZOX7KWVcjs.checkBrush.call(void 0, brush, _chunkTZOX7KWVcjs.VECTOR_PROFILE).ok && _chunkPXDIAYB6cjs.isBrushstrokeBrush.call(void 0, _chunkTZOX7KWVcjs.resolveBrush.call(void 0, brush)) ? brush : null;
|
|
2541
2544
|
} catch (e4) {
|
|
2542
2545
|
return null;
|
|
2543
2546
|
}
|
|
@@ -2546,7 +2549,7 @@ function vectorBrushstrokeBrushes(user = []) {
|
|
|
2546
2549
|
const out = [...PRESETS];
|
|
2547
2550
|
for (const raw of user) {
|
|
2548
2551
|
const brush = admitted(raw);
|
|
2549
|
-
if (brush && !out.some((b) => b.id === brush.id)) out.push(
|
|
2552
|
+
if (brush && !out.some((b) => b.id === brush.id)) out.push(_chunkTZOX7KWVcjs.resolveBrush.call(void 0, brush));
|
|
2550
2553
|
}
|
|
2551
2554
|
return out;
|
|
2552
2555
|
}
|
|
@@ -2556,7 +2559,7 @@ function vectorBrushstrokeBrush(id) {
|
|
|
2556
2559
|
function vectorBrushstrokeBrushOf(brush) {
|
|
2557
2560
|
if (brush.spec) {
|
|
2558
2561
|
const saved = admitted(brush.spec);
|
|
2559
|
-
return saved && saved.id === brush.brushId ?
|
|
2562
|
+
return saved && saved.id === brush.brushId ? _chunkTZOX7KWVcjs.resolveBrush.call(void 0, saved) : null;
|
|
2560
2563
|
}
|
|
2561
2564
|
return vectorBrushstrokeBrush(brush.brushId);
|
|
2562
2565
|
}
|
|
@@ -2564,11 +2567,15 @@ function vectorBrushstrokeBrushError(id, user = []) {
|
|
|
2564
2567
|
if (vectorBrushstrokeBrush(id)) return null;
|
|
2565
2568
|
const saved = user.find((b) => b.id === id);
|
|
2566
2569
|
const ids = vectorBrushstrokeBrushes(user).map((b) => b.id);
|
|
2567
|
-
const reasons = (b) =>
|
|
2570
|
+
const reasons = (b) => _chunkTZOX7KWVcjs.checkBrush.call(void 0, b, _chunkTZOX7KWVcjs.VECTOR_PROFILE).issues.filter((i) => i.severity === "error").map((i) => `${i.reason} ${i.fix}`).join(" ") || "it is not a dry dab brush.";
|
|
2568
2571
|
if (saved) return admitted(saved) ? null : `Brush "${id}" (${saved.name}) can't paint a brushstroke: ${reasons(saved)} Use one of: ${ids.join(", ")}.`;
|
|
2569
|
-
const preset =
|
|
2572
|
+
const preset = _chunkTZOX7KWVcjs.BRUSH_PRESETS.find((b) => b.id === id);
|
|
2570
2573
|
if (preset) return `Brush "${id}" (${preset.name}) can't paint a brushstroke: ${reasons(preset)} Use one of: ${ids.join(", ")}.`;
|
|
2571
|
-
return `Unknown brush "${id}". ${
|
|
2574
|
+
return `Unknown brush "${id}". ${_chunkTZOX7KWVcjs.closest.call(void 0, id, ids)}Use one of: ${ids.join(", ")} (vector.listBrushes lists them).`;
|
|
2575
|
+
}
|
|
2576
|
+
function vectorBrushstrokeDefaultColour(id, user = [], scheme = "light") {
|
|
2577
|
+
const brush = _nullishCoalesce(_chunkTZOX7KWVcjs.BRUSH_PRESETS.find((b) => b.id === id), () => ( user.find((b) => b.id === id)));
|
|
2578
|
+
return brush ? _chunkLRTR4ASZcjs.brushColourHex.call(void 0, _optionalChain([brush, 'access', _55 => _55.colour, 'optionalAccess', _56 => _56.default]), scheme) : null;
|
|
2572
2579
|
}
|
|
2573
2580
|
function sanitizeVectorBrushstroke(value, user = []) {
|
|
2574
2581
|
if (!value || typeof value !== "object") return null;
|
|
@@ -2638,7 +2645,7 @@ var layerCache = /* @__PURE__ */ new WeakMap();
|
|
|
2638
2645
|
function vectorBrushstrokeImages(node, layer) {
|
|
2639
2646
|
if (!isVectorBrushstrokeLayer(layer)) return [];
|
|
2640
2647
|
let byLayer = layerCache.get(node);
|
|
2641
|
-
const hit = _optionalChain([byLayer, 'optionalAccess',
|
|
2648
|
+
const hit = _optionalChain([byLayer, 'optionalAccess', _57 => _57.get, 'call', _58 => _58(layer)]);
|
|
2642
2649
|
if (hit) return hit;
|
|
2643
2650
|
const preset = vectorBrushstrokeBrushOf(layer.brush);
|
|
2644
2651
|
const brush = layer.brush.size ? { ...preset, tip: { ...preset.tip, size: layer.brush.size } } : preset;
|
|
@@ -2748,7 +2755,7 @@ function withVectorFills(node, fills) {
|
|
|
2748
2755
|
const next = { ...node };
|
|
2749
2756
|
if (fills.length === 0 || fills.length === 1 && isPlainVectorPaintLayer(fills[0])) {
|
|
2750
2757
|
delete next.fills;
|
|
2751
|
-
next.fill = _nullishCoalesce(_optionalChain([fills, 'access',
|
|
2758
|
+
next.fill = _nullishCoalesce(_optionalChain([fills, 'access', _59 => _59[0], 'optionalAccess', _60 => _60.paint]), () => ( null));
|
|
2752
2759
|
return next;
|
|
2753
2760
|
}
|
|
2754
2761
|
next.fills = fills.map((l) => ({ ...l }));
|
|
@@ -2773,8 +2780,8 @@ function withVectorStrokes(node, strokes) {
|
|
|
2773
2780
|
var json = (v2) => JSON.stringify(_nullishCoalesce(v2, () => ( null)));
|
|
2774
2781
|
function strokeShorthandDiff(node, top) {
|
|
2775
2782
|
const out = [];
|
|
2776
|
-
if (json(node.stroke) !== json(_optionalChain([top, 'optionalAccess',
|
|
2777
|
-
for (const key of VECTOR_STROKE_SETTING_KEYS) if (json(node[key]) !== json(_optionalChain([top, 'optionalAccess',
|
|
2783
|
+
if (json(node.stroke) !== json(_optionalChain([top, 'optionalAccess', _61 => _61.paint]))) out.push("stroke");
|
|
2784
|
+
for (const key of VECTOR_STROKE_SETTING_KEYS) if (json(node[key]) !== json(_optionalChain([top, 'optionalAccess', _62 => _62[key]]))) out.push(key);
|
|
2778
2785
|
return out;
|
|
2779
2786
|
}
|
|
2780
2787
|
var checked = /* @__PURE__ */ new WeakSet();
|
|
@@ -2791,7 +2798,7 @@ function normalizeVectorPaintStacks(node, prefer = "shorthand") {
|
|
|
2791
2798
|
if (Array.isArray(node.fills)) {
|
|
2792
2799
|
let fills = node.fills;
|
|
2793
2800
|
const top = fills[fills.length - 1];
|
|
2794
|
-
if (prefer === "shorthand" && json(node.fill) !== json(_optionalChain([top, 'optionalAccess',
|
|
2801
|
+
if (prefer === "shorthand" && json(node.fill) !== json(_optionalChain([top, 'optionalAccess', _63 => _63.paint]))) {
|
|
2795
2802
|
if (!draws(node.fill)) fills = [];
|
|
2796
2803
|
else fills = top ? [...fills.slice(0, -1), { ...top, paint: node.fill }] : [{ paint: node.fill }];
|
|
2797
2804
|
}
|
|
@@ -3007,8 +3014,8 @@ var Measured = class {
|
|
|
3007
3014
|
append(sa, sb, out) {
|
|
3008
3015
|
for (const piece of _chunkGF2RBSDMcjs.trimSegments.call(void 0, this.segs, sa, sb, this.lens)) {
|
|
3009
3016
|
if (degenerate(piece)) continue;
|
|
3010
|
-
const last = _optionalChain([out, 'access',
|
|
3011
|
-
const end = _optionalChain([last, 'optionalAccess',
|
|
3017
|
+
const last = _optionalChain([out, 'access', _64 => _64[out.length - 1], 'optionalAccess', _65 => _65.segs]);
|
|
3018
|
+
const end = _optionalChain([last, 'optionalAccess', _66 => _66[last.length - 1], 'optionalAccess', _67 => _67.at, 'call', _68 => _68(-1)]);
|
|
3012
3019
|
if (!end || Math.hypot(end[0] - piece[0][0], end[1] - piece[0][1]) > 1e-6) out.push({ segs: [piece], closed: false });
|
|
3013
3020
|
else last.push(piece);
|
|
3014
3021
|
}
|
|
@@ -3320,9 +3327,9 @@ function vectorRepeaterCopies(r, pivot) {
|
|
|
3320
3327
|
for (let i = 0; i < n; i++) {
|
|
3321
3328
|
const k = i + offset;
|
|
3322
3329
|
let m = translateMatrix(-pivot.x, -pivot.y);
|
|
3323
|
-
m = multiplyMatrices(m, scaleMatrix(Math.pow((_nullishCoalesce(_optionalChain([r, 'access',
|
|
3330
|
+
m = multiplyMatrices(m, scaleMatrix(Math.pow((_nullishCoalesce(_optionalChain([r, 'access', _69 => _69.scale, 'optionalAccess', _70 => _70.x]), () => ( 100))) / 100, k), Math.pow((_nullishCoalesce(_optionalChain([r, 'access', _71 => _71.scale, 'optionalAccess', _72 => _72.y]), () => ( 100))) / 100, k)));
|
|
3324
3331
|
m = multiplyMatrices(m, rotateMatrix((_nullishCoalesce(r.rotation, () => ( 0))) * k));
|
|
3325
|
-
m = multiplyMatrices(m, translateMatrix(pivot.x + (_nullishCoalesce(_optionalChain([r, 'access',
|
|
3332
|
+
m = multiplyMatrices(m, translateMatrix(pivot.x + (_nullishCoalesce(_optionalChain([r, 'access', _73 => _73.position, 'optionalAccess', _74 => _74.x]), () => ( 0))) * k, pivot.y + (_nullishCoalesce(_optionalChain([r, 'access', _75 => _75.position, 'optionalAccess', _76 => _76.y]), () => ( 0))) * k));
|
|
3326
3333
|
const t = n > 1 ? i / (n - 1) : 0;
|
|
3327
3334
|
const partial = i + 1 === n && fract > 0 ? fract : 1;
|
|
3328
3335
|
out.push({ index: i, matrix: m, opacity: Math.min(1, Math.max(0, (so + (eo - so) * t) * partial)) });
|
|
@@ -3486,7 +3493,7 @@ function mapBezierPath(path, f, tolerance = 0.1, options = {}) {
|
|
|
3486
3493
|
|
|
3487
3494
|
// src/vector/frames.ts
|
|
3488
3495
|
function isVectorFrame(node) {
|
|
3489
|
-
return _optionalChain([node, 'optionalAccess',
|
|
3496
|
+
return _optionalChain([node, 'optionalAccess', _77 => _77.type]) === "group" && !!node.frame && !node.blend && !node.liveBoolean && !node.mask;
|
|
3490
3497
|
}
|
|
3491
3498
|
function vectorFrameRectPath(frame) {
|
|
3492
3499
|
const { x, y, width: w, height: h } = frame;
|
|
@@ -3531,8 +3538,8 @@ function placeSpan(rule, a0, a1, f0, f1, g0, g1) {
|
|
|
3531
3538
|
}
|
|
3532
3539
|
}
|
|
3533
3540
|
function vectorFrameChildMatrix(resizing, box, from, to) {
|
|
3534
|
-
const [x0, x1] = placeSpan(_nullishCoalesce(H[_nullishCoalesce(_optionalChain([resizing, 'optionalAccess',
|
|
3535
|
-
const [y0, y1] = placeSpan(_nullishCoalesce(V[_nullishCoalesce(_optionalChain([resizing, 'optionalAccess',
|
|
3541
|
+
const [x0, x1] = placeSpan(_nullishCoalesce(H[_nullishCoalesce(_optionalChain([resizing, 'optionalAccess', _78 => _78.horizontal]), () => ( "left"))], () => ( "start")), box.x, box.x + box.width, from.x, from.x + from.width, to.x, to.x + to.width);
|
|
3542
|
+
const [y0, y1] = placeSpan(_nullishCoalesce(V[_nullishCoalesce(_optionalChain([resizing, 'optionalAccess', _79 => _79.vertical]), () => ( "top"))], () => ( "start")), box.y, box.y + box.height, from.y, from.y + from.height, to.y, to.y + to.height);
|
|
3536
3543
|
const sx = box.width > 1e-9 ? (x1 - x0) / box.width : 1;
|
|
3537
3544
|
const sy = box.height > 1e-9 ? (y1 - y0) / box.height : 1;
|
|
3538
3545
|
return [sx, 0, 0, sy, x0 - sx * box.x, y0 - sy * box.y];
|
|
@@ -3588,7 +3595,7 @@ function vectorFrameDocument(doc, id, find) {
|
|
|
3588
3595
|
height,
|
|
3589
3596
|
...doc.background ? { background: doc.background } : {},
|
|
3590
3597
|
nodes: [placed],
|
|
3591
|
-
..._optionalChain([doc, 'access',
|
|
3598
|
+
..._optionalChain([doc, 'access', _80 => _80.symbols, 'optionalAccess', _81 => _81.length]) ? { symbols: doc.symbols } : {}
|
|
3592
3599
|
};
|
|
3593
3600
|
}
|
|
3594
3601
|
function getVectorFramePanel(state) {
|
|
@@ -3608,7 +3615,7 @@ function getVectorFramePanel(state) {
|
|
|
3608
3615
|
const one = (values) => values.every((v2) => v2 === values[0]) ? values[0] : "mixed";
|
|
3609
3616
|
return {
|
|
3610
3617
|
frame: f ? { id: f.id, name: _nullishCoalesce(f.name, () => ( "Frame")), artboard: parents.get(f.id) === null, frame: f.frame } : null,
|
|
3611
|
-
resizing: children.length ? { ids: children.map((c) => c.id), horizontal: one(children.map((c) => _nullishCoalesce(_optionalChain([c, 'access',
|
|
3618
|
+
resizing: children.length ? { ids: children.map((c) => c.id), horizontal: one(children.map((c) => _nullishCoalesce(_optionalChain([c, 'access', _82 => _82.resizing, 'optionalAccess', _83 => _83.horizontal]), () => ( "left")))), vertical: one(children.map((c) => _nullishCoalesce(_optionalChain([c, 'access', _84 => _84.resizing, 'optionalAccess', _85 => _85.vertical]), () => ( "top")))) } : null
|
|
3612
3619
|
};
|
|
3613
3620
|
}
|
|
3614
3621
|
|
|
@@ -3994,7 +4001,7 @@ function normalizeVectorFilterParams(type, params, base) {
|
|
|
3994
4001
|
if (!isVectorFilterType(type)) return null;
|
|
3995
4002
|
const out = { ...VECTOR_FILTER_DEFAULTS[type], ..._nullishCoalesce(base, () => ( {})) };
|
|
3996
4003
|
for (const spec of VECTOR_FILTER_PARAM_SPECS[type]) {
|
|
3997
|
-
const v2 = _optionalChain([params, 'optionalAccess',
|
|
4004
|
+
const v2 = _optionalChain([params, 'optionalAccess', _86 => _86[spec.key]]);
|
|
3998
4005
|
if (v2 === void 0) continue;
|
|
3999
4006
|
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));
|
|
4000
4007
|
else if (spec.kind === "color" && typeof v2 === "string" && v2.trim()) out[spec.key] = v2.trim();
|
|
@@ -4126,7 +4133,7 @@ function vectorFilterSvg(filters, id, bounds) {
|
|
|
4126
4133
|
primitives.push(fe("feGaussianBlur", { in: body, stdDeviation: round(f.params.radius / 2), result: name("body") }));
|
|
4127
4134
|
body = name("body");
|
|
4128
4135
|
}
|
|
4129
|
-
const lastResult = _optionalChain([primitives, 'access',
|
|
4136
|
+
const lastResult = _optionalChain([primitives, 'access', _87 => _87[primitives.length - 1], 'optionalAccess', _88 => _88.attrs, 'access', _89 => _89.result]);
|
|
4130
4137
|
if (lastResult !== body) primitives.push(fe("feMerge", {}, [fe("feMergeNode", { in: body })]));
|
|
4131
4138
|
const pad = vectorFilterReach(active) + 2;
|
|
4132
4139
|
return {
|
|
@@ -4141,7 +4148,7 @@ function vectorFilterSvg(filters, id, bounds) {
|
|
|
4141
4148
|
var escapeAttr = (value) => value.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
4142
4149
|
function primitiveMarkup(p) {
|
|
4143
4150
|
const attrs = Object.entries(p.attrs).map(([k, v2]) => ` ${k}="${escapeAttr(String(v2))}"`).join("");
|
|
4144
|
-
return _optionalChain([p, 'access',
|
|
4151
|
+
return _optionalChain([p, 'access', _90 => _90.children, 'optionalAccess', _91 => _91.length]) ? `<${p.tag}${attrs}>${p.children.map(primitiveMarkup).join("")}</${p.tag}>` : `<${p.tag}${attrs}/>`;
|
|
4145
4152
|
}
|
|
4146
4153
|
function vectorFilterMarkup(filter, extra = "") {
|
|
4147
4154
|
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>`;
|
|
@@ -4159,7 +4166,7 @@ function sanitizeVectorMask(value) {
|
|
|
4159
4166
|
return r.invert === true ? { type: r.type, invert: true } : { type: r.type };
|
|
4160
4167
|
}
|
|
4161
4168
|
function isVectorMaskGroup(node) {
|
|
4162
|
-
return _optionalChain([node, 'optionalAccess',
|
|
4169
|
+
return _optionalChain([node, 'optionalAccess', _92 => _92.type]) === "group" && !!node.mask && isVectorMaskType(node.mask.type) && !node.blend && !node.liveBoolean && node.children.length > 0;
|
|
4163
4170
|
}
|
|
4164
4171
|
function isVectorMaskActive(node) {
|
|
4165
4172
|
return isVectorMaskGroup(node) && node.children[0].visible !== false;
|
|
@@ -4194,7 +4201,7 @@ function vectorMaskRegionShapes(node, type, parent = IDENTITY_MATRIX, self = tru
|
|
|
4194
4201
|
if (!self && node.visible === false) return [];
|
|
4195
4202
|
if (isVectorFrame(node)) node = vectorFrameDrawn(node);
|
|
4196
4203
|
const m = multiplyMatrices(nodeMatrix(node), parent);
|
|
4197
|
-
if (isVectorMaskActive(node) || node.type === "group" && _optionalChain([node, 'access',
|
|
4204
|
+
if (isVectorMaskActive(node) || node.type === "group" && _optionalChain([node, 'access', _93 => _93.effects, 'optionalAccess', _94 => _94.length])) {
|
|
4198
4205
|
return vectorAppearanceShapes(node).flatMap((s) => regionOfPath(s.path, s.source, type, m));
|
|
4199
4206
|
}
|
|
4200
4207
|
const drawn = expandVectorAppearance(node);
|
|
@@ -4399,7 +4406,7 @@ function fitRuns(runs, length2, fallback) {
|
|
|
4399
4406
|
}
|
|
4400
4407
|
if (left2 > 0) {
|
|
4401
4408
|
if (out.length) out[out.length - 1] = { ...out[out.length - 1], length: out[out.length - 1].length + left2 };
|
|
4402
|
-
else out.push({ length: left2, style: _nullishCoalesce(_optionalChain([runs, 'access',
|
|
4409
|
+
else out.push({ length: left2, style: _nullishCoalesce(_optionalChain([runs, 'access', _95 => _95[runs.length - 1], 'optionalAccess', _96 => _96.style]), () => ( fallback)) });
|
|
4403
4410
|
}
|
|
4404
4411
|
return compact(out);
|
|
4405
4412
|
}
|
|
@@ -4409,7 +4416,7 @@ function styleAt(runs, index, fallback) {
|
|
|
4409
4416
|
if (index < at2 + r.length) return r.style;
|
|
4410
4417
|
at2 += r.length;
|
|
4411
4418
|
}
|
|
4412
|
-
return _nullishCoalesce(_optionalChain([runs, 'access',
|
|
4419
|
+
return _nullishCoalesce(_optionalChain([runs, 'access', _97 => _97[runs.length - 1], 'optionalAccess', _98 => _98.style]), () => ( fallback));
|
|
4413
4420
|
}
|
|
4414
4421
|
function restyleRange(runs, start, end, patch) {
|
|
4415
4422
|
const out = [];
|
|
@@ -4465,7 +4472,7 @@ function paragraphRanges(text) {
|
|
|
4465
4472
|
return out;
|
|
4466
4473
|
}
|
|
4467
4474
|
function fitParagraphRuns(runs, text) {
|
|
4468
|
-
const fallback = _nullishCoalesce(_optionalChain([runs, 'access',
|
|
4475
|
+
const fallback = _nullishCoalesce(_optionalChain([runs, 'access', _99 => _99[0], 'optionalAccess', _100 => _100.style]), () => ( {}));
|
|
4469
4476
|
const out = compact(paragraphRanges(text).map((p) => ({ length: p.end - p.start, style: styleAt(runs, p.start, fallback) })));
|
|
4470
4477
|
return out.length ? out : [{ length: 0, style: fallback }];
|
|
4471
4478
|
}
|
|
@@ -4515,7 +4522,7 @@ function textLineRect(l) {
|
|
|
4515
4522
|
var layoutCache = /* @__PURE__ */ new WeakMap();
|
|
4516
4523
|
function layoutText(layer, shaper) {
|
|
4517
4524
|
let byShaper = layoutCache.get(layer);
|
|
4518
|
-
const hit = _optionalChain([byShaper, 'optionalAccess',
|
|
4525
|
+
const hit = _optionalChain([byShaper, 'optionalAccess', _101 => _101.get, 'call', _102 => _102(shaper.id)]);
|
|
4519
4526
|
if (hit) return hit;
|
|
4520
4527
|
const out = computeLayout(layer, shaper);
|
|
4521
4528
|
if (!byShaper) {
|
|
@@ -4579,7 +4586,7 @@ function computeLayout(layer, shaper) {
|
|
|
4579
4586
|
const code = seg.charCodeAt(k);
|
|
4580
4587
|
if (isLow(code) && index > 0 && isHigh(text.charCodeAt(index - 1))) {
|
|
4581
4588
|
const prev = chars[chars.length - 1];
|
|
4582
|
-
if (_optionalChain([prev, 'optionalAccess',
|
|
4589
|
+
if (_optionalChain([prev, 'optionalAccess', _103 => _103.up])) {
|
|
4583
4590
|
chars.push({ index, ch: seg[k], advance: 0, style, up: prev.up, low: true });
|
|
4584
4591
|
} else chars.push({ index, ch: seg[k], advance, style, low: true });
|
|
4585
4592
|
continue;
|
|
@@ -4907,7 +4914,7 @@ function createCanvasTextShaper(options = {}) {
|
|
|
4907
4914
|
return null;
|
|
4908
4915
|
})));
|
|
4909
4916
|
const canvas = make(1, 1);
|
|
4910
|
-
const ctx = _optionalChain([canvas, 'optionalAccess',
|
|
4917
|
+
const ctx = _optionalChain([canvas, 'optionalAccess', _104 => _104.getContext, 'call', _105 => _105("2d")]);
|
|
4911
4918
|
if (!ctx || typeof ctx.measureText !== "function") return null;
|
|
4912
4919
|
const fallback = _nullishCoalesce(options.fallbackFamily, () => ( "sans-serif"));
|
|
4913
4920
|
const available = /* @__PURE__ */ new Map();
|
|
@@ -4980,10 +4987,10 @@ function createOutlineTextShaper(fonts, options = {}) {
|
|
|
4980
4987
|
const entries = fonts.map((f) => {
|
|
4981
4988
|
const e = "face" in f ? f : { face: f };
|
|
4982
4989
|
const names = e.face.names;
|
|
4983
|
-
const family = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(e.family, () => ( _optionalChain([names, 'optionalAccess',
|
|
4984
|
-
const weight = _nullishCoalesce(_nullishCoalesce(e.weight, () => ( _optionalChain([e, 'access',
|
|
4985
|
-
const italic = _nullishCoalesce(e.italic, () => ( Boolean((_nullishCoalesce(_optionalChain([e, 'access',
|
|
4986
|
-
const postScript = _nullishCoalesce(_optionalChain([names, 'optionalAccess',
|
|
4990
|
+
const family = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(e.family, () => ( _optionalChain([names, 'optionalAccess', _106 => _106.fontFamily, 'optionalAccess', _107 => _107.en]))), () => ( Object.values(_nullishCoalesce(_optionalChain([names, 'optionalAccess', _108 => _108.fontFamily]), () => ( {})))[0])), () => ( "Font"));
|
|
4991
|
+
const weight = _nullishCoalesce(_nullishCoalesce(e.weight, () => ( _optionalChain([e, 'access', _109 => _109.face, 'access', _110 => _110.tables, 'optionalAccess', _111 => _111.os2, 'optionalAccess', _112 => _112.usWeightClass]))), () => ( 400));
|
|
4992
|
+
const italic = _nullishCoalesce(e.italic, () => ( Boolean((_nullishCoalesce(_optionalChain([e, 'access', _113 => _113.face, 'access', _114 => _114.tables, 'optionalAccess', _115 => _115.os2, 'optionalAccess', _116 => _116.fsSelection]), () => ( 0))) & 1)));
|
|
4993
|
+
const postScript = _nullishCoalesce(_optionalChain([names, 'optionalAccess', _117 => _117.postScriptName, 'optionalAccess', _118 => _118.en]), () => ( Object.values(_nullishCoalesce(_optionalChain([names, 'optionalAccess', _119 => _119.postScriptName]), () => ( {})))[0]));
|
|
4987
4994
|
return { face: e.face, family, key: family.toLowerCase(), weight, italic, postScript };
|
|
4988
4995
|
});
|
|
4989
4996
|
const fallbackKey = (_nullishCoalesce(options.fallback, () => ( entries[0].family))).toLowerCase();
|
|
@@ -5030,12 +5037,12 @@ function createOutlineTextShaper(fonts, options = {}) {
|
|
|
5030
5037
|
return out;
|
|
5031
5038
|
},
|
|
5032
5039
|
outline(text, font, x, y, opts) {
|
|
5033
|
-
return toPath(pick(font).entry.face.getPath(text, x, y, font.size, _optionalChain([opts, 'optionalAccess',
|
|
5040
|
+
return toPath(pick(font).entry.face.getPath(text, x, y, font.size, _optionalChain([opts, 'optionalAccess', _120 => _120.vertical]) ? { kerning: true, vertical: true } : { kerning: true }).commands);
|
|
5034
5041
|
},
|
|
5035
5042
|
vertical(char, font) {
|
|
5036
5043
|
const { face } = pick(font).entry;
|
|
5037
5044
|
const k = font.size / face.unitsPerEm;
|
|
5038
|
-
const v2 = _optionalChain([face, 'access',
|
|
5045
|
+
const v2 = _optionalChain([face, 'access', _121 => _121.getVerticalMetrics, 'optionalCall', _122 => _122(char)]);
|
|
5039
5046
|
if (v2) return { advance: v2.advance * k, originY: v2.originY * k, alternate: v2.alternate };
|
|
5040
5047
|
return { advance: (face.ascender - face.descender) * k, originY: face.ascender * k, alternate: false };
|
|
5041
5048
|
},
|
|
@@ -5096,7 +5103,7 @@ function vectorTextHasOutlines() {
|
|
|
5096
5103
|
return typeof getVectorTextShaper().outline === "function";
|
|
5097
5104
|
}
|
|
5098
5105
|
function vectorTextFamilies() {
|
|
5099
|
-
return _nullishCoalesce(_optionalChain([getVectorTextShaper, 'call',
|
|
5106
|
+
return _nullishCoalesce(_optionalChain([getVectorTextShaper, 'call', _123 => _123(), 'access', _124 => _124.families, 'optionalCall', _125 => _125()]), () => ( ["sans-serif", "serif", "monospace"]));
|
|
5100
5107
|
}
|
|
5101
5108
|
var DEFAULT_VECTOR_FONT = { fontFamily: "sans-serif", fontWeight: 400, fontSize: 24 };
|
|
5102
5109
|
var VECTOR_CHARACTER_STYLE_KEYS = ["fontFamily", "fontWeight", "italic", "fontSize", "tracking", "leading", "baselineShift", "underline", "strikethrough", "upright"];
|
|
@@ -5272,7 +5279,7 @@ function computeLayout2(node, shaper) {
|
|
|
5272
5279
|
const fragments = [];
|
|
5273
5280
|
const lines = [];
|
|
5274
5281
|
let overflow = false;
|
|
5275
|
-
const fillOf = (f) => _optionalChain([runs, 'access',
|
|
5282
|
+
const fillOf = (f) => _optionalChain([runs, 'access', _126 => _126.find, 'call', _127 => _127((r) => f.start >= r.start && f.start < r.end), 'optionalAccess', _128 => _128.fill]);
|
|
5276
5283
|
const styleOf = (f) => {
|
|
5277
5284
|
const { color: _c, opacity: _o, postScriptName: _p, ...style } = f.style;
|
|
5278
5285
|
return style;
|
|
@@ -5311,11 +5318,11 @@ function computeLayout2(node, shaper) {
|
|
|
5311
5318
|
} else {
|
|
5312
5319
|
const line = text.lines[0];
|
|
5313
5320
|
const measure = measureVectorPath(subpathPath(frame.path), !!frame.flip);
|
|
5314
|
-
const align = _nullishCoalesce(_optionalChain([node, 'access',
|
|
5321
|
+
const align = _nullishCoalesce(_optionalChain([node, 'access', _129 => _129.paragraph, 'optionalAccess', _130 => _130.align]), () => ( "left"));
|
|
5315
5322
|
const start = Math.max(0, _nullishCoalesce(frame.start, () => ( 0)));
|
|
5316
5323
|
const end = Math.max(0, _nullishCoalesce(frame.end, () => ( 0)));
|
|
5317
5324
|
const upright = frame.orientation === "upright";
|
|
5318
|
-
const baselineOffset = pathBaselineOffset(_nullishCoalesce(frame.baseline, () => ( "baseline")), _nullishCoalesce(_optionalChain([line, 'optionalAccess',
|
|
5325
|
+
const baselineOffset = pathBaselineOffset(_nullishCoalesce(frame.baseline, () => ( "baseline")), _nullishCoalesce(_optionalChain([line, 'optionalAccess', _131 => _131.ascent]), () => ( 0)), _nullishCoalesce(_optionalChain([line, 'optionalAccess', _132 => _132.descent]), () => ( 0)));
|
|
5319
5326
|
if (line) {
|
|
5320
5327
|
const chars = line.chars.filter((c) => {
|
|
5321
5328
|
const lo = block.text.charCodeAt(c.index);
|
|
@@ -5324,7 +5331,7 @@ function computeLayout2(node, shaper) {
|
|
|
5324
5331
|
const advanceOf = (c) => {
|
|
5325
5332
|
const pair = charAt(block.text, c.index).length === 2;
|
|
5326
5333
|
const low = pair ? line.chars.find((d) => d.index === c.index + 1) : void 0;
|
|
5327
|
-
return c.advance + (_nullishCoalesce(_optionalChain([low, 'optionalAccess',
|
|
5334
|
+
return c.advance + (_nullishCoalesce(_optionalChain([low, 'optionalAccess', _133 => _133.advance]), () => ( 0)));
|
|
5328
5335
|
};
|
|
5329
5336
|
const pivots = chars.map((c) => c.x + advanceOf(c) / 2);
|
|
5330
5337
|
const positions = vectorPathTextPositions(pivots, [line.x, line.x + line.width], align, measure.length, start, end);
|
|
@@ -5379,7 +5386,7 @@ function computeLayout2(node, shaper) {
|
|
|
5379
5386
|
if (x0 < Infinity) bounds = { x: x0, y: y0, width: x1 - x0, height: y1 - y0 };
|
|
5380
5387
|
else if (frame.kind === "point") {
|
|
5381
5388
|
const l = text.lines[0];
|
|
5382
|
-
bounds = { x: frame.x, y: frame.y - (_nullishCoalesce(_optionalChain([l, 'optionalAccess',
|
|
5389
|
+
bounds = { x: frame.x, y: frame.y - (_nullishCoalesce(_optionalChain([l, 'optionalAccess', _134 => _134.ascent]), () => ( 0))), width: 0, height: (_nullishCoalesce(_optionalChain([l, 'optionalAccess', _135 => _135.ascent]), () => ( 0))) + (_nullishCoalesce(_optionalChain([l, 'optionalAccess', _136 => _136.descent]), () => ( 0))) };
|
|
5383
5390
|
}
|
|
5384
5391
|
}
|
|
5385
5392
|
return { shaper: shaper.id, glyphs, fragments, lines, origin, text, bounds, overflow, missingFonts: text.missingFonts };
|
|
@@ -5500,7 +5507,7 @@ function vectorTextCaret(node, index) {
|
|
|
5500
5507
|
const t = { x: Math.cos(r), y: Math.sin(r) };
|
|
5501
5508
|
const n2 = { x: -t.y, y: t.x };
|
|
5502
5509
|
const o = { x: g2.x + t.x * u, y: g2.y + t.y * u };
|
|
5503
|
-
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',
|
|
5510
|
+
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', _137 => _137.fragments, 'access', _138 => _138[g2.fragment], 'optionalAccess', _139 => _139.line]), () => ( 0)) };
|
|
5504
5511
|
};
|
|
5505
5512
|
if (node.frame.kind !== "path") {
|
|
5506
5513
|
const c = caretAt(layout.text, index);
|
|
@@ -5640,7 +5647,7 @@ function sanitizeVectorTextFrame(value, path = "frame") {
|
|
|
5640
5647
|
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) };
|
|
5641
5648
|
if (f.kind === "path") {
|
|
5642
5649
|
const sp = f.path;
|
|
5643
|
-
if (!sp || !Array.isArray(sp.anchors) || sp.anchors.length < 2 || !sp.anchors.every((a) => isNum(_optionalChain([a, 'optionalAccess',
|
|
5650
|
+
if (!sp || !Array.isArray(sp.anchors) || sp.anchors.length < 2 || !sp.anchors.every((a) => isNum(_optionalChain([a, 'optionalAccess', _140 => _140.x])) && isNum(_optionalChain([a, 'optionalAccess', _141 => _141.y])))) fail(`${path}.path must be a subpath with at least two anchors.`);
|
|
5644
5651
|
const out = { kind: "path", path: { closed: !!sp.closed, anchors: sp.anchors.map((a) => ({ ...a })) } };
|
|
5645
5652
|
if (f.start !== void 0 && f.start !== 0) out.start = num2(f.start, `${path}.start`, 0, 1e7);
|
|
5646
5653
|
if (f.end !== void 0 && f.end !== 0) out.end = num2(f.end, `${path}.end`, 0, 1e7);
|
|
@@ -5658,7 +5665,7 @@ function sanitizeVectorTextFrame(value, path = "frame") {
|
|
|
5658
5665
|
return fail(`${path}.kind must be point, area or path, got ${JSON.stringify(f.kind)}.`);
|
|
5659
5666
|
}
|
|
5660
5667
|
function normalizeVectorTextRuns(text, runs) {
|
|
5661
|
-
if (!_optionalChain([runs, 'optionalAccess',
|
|
5668
|
+
if (!_optionalChain([runs, 'optionalAccess', _142 => _142.length])) return null;
|
|
5662
5669
|
const cleaned = fitVectorTextRuns(
|
|
5663
5670
|
runs.map((r) => ({ length: r.length, style: stripUndefined(r.style) })),
|
|
5664
5671
|
text.length
|
|
@@ -5698,7 +5705,7 @@ function replaceVectorText(node, start, end, insert) {
|
|
|
5698
5705
|
const clean2 = insert.replace(/\r\n?/g, "\n");
|
|
5699
5706
|
const text = node.text.slice(0, start) + clean2 + node.text.slice(end);
|
|
5700
5707
|
let runs = null;
|
|
5701
|
-
if (_optionalChain([node, 'access',
|
|
5708
|
+
if (_optionalChain([node, 'access', _143 => _143.runs, 'optionalAccess', _144 => _144.length])) {
|
|
5702
5709
|
const fitted = fitVectorTextRuns(node.runs, node.text.length);
|
|
5703
5710
|
const style = styleAt(fitted, start > 0 ? start - 1 : start, {});
|
|
5704
5711
|
runs = normalizeVectorTextRuns(text, spliceRuns(fitted, start, end, clean2.length, style));
|
|
@@ -5714,7 +5721,7 @@ function styleVectorText(node, start, end, patch) {
|
|
|
5714
5721
|
if (whole) {
|
|
5715
5722
|
let next2 = { ...node, font: patchVectorCharacterStyle(node.font, fields, "style") };
|
|
5716
5723
|
const keys = Object.keys(fields).filter((k) => fields[k] !== void 0);
|
|
5717
|
-
if (_optionalChain([next2, 'access',
|
|
5724
|
+
if (_optionalChain([next2, 'access', _145 => _145.runs, 'optionalAccess', _146 => _146.length]) && (keys.length || fill !== void 0)) {
|
|
5718
5725
|
const runs2 = normalizeVectorTextRuns(
|
|
5719
5726
|
next2.text,
|
|
5720
5727
|
next2.runs.map((r) => {
|
|
@@ -5759,7 +5766,7 @@ function bakeVectorTextGeometry(node, m) {
|
|
|
5759
5766
|
...s.baselineShift !== void 0 ? { baselineShift: s.baselineShift * k } : {}
|
|
5760
5767
|
});
|
|
5761
5768
|
const font = scaleStyle(node.font);
|
|
5762
|
-
const runs = _optionalChain([node, 'access',
|
|
5769
|
+
const runs = _optionalChain([node, 'access', _147 => _147.runs, 'optionalAccess', _148 => _148.map, 'call', _149 => _149((r) => ({ length: r.length, style: scaleStyle(r.style) }))]);
|
|
5763
5770
|
const p = node.paragraph;
|
|
5764
5771
|
const paragraph = p ? {
|
|
5765
5772
|
...p,
|
|
@@ -6048,7 +6055,7 @@ function vectorInstanceGroup(node, bake) {
|
|
|
6048
6055
|
const m = _nullishCoalesce(node.transform, () => ( [1, 0, 0, 1, 0, 0]));
|
|
6049
6056
|
const { rigid, residual } = decomposeRigid(m);
|
|
6050
6057
|
const k = Math.sqrt(Math.abs(residual[0] * residual[3] - residual[1] * residual[2]));
|
|
6051
|
-
const hidden = new Set(_nullishCoalesce(_optionalChain([node, 'access',
|
|
6058
|
+
const hidden = new Set(_nullishCoalesce(_optionalChain([node, 'access', _150 => _150.overrides, 'optionalAccess', _151 => _151.hidden]), () => ( [])));
|
|
6052
6059
|
const keep = (list) => list.filter((n) => !hidden.has(n.id)).map((n) => n.type === "group" ? { ...n, children: keep(n.children) } : n);
|
|
6053
6060
|
let children = prefixVectorIds(keep(_nullishCoalesce(node.art, () => ( []))), node.id);
|
|
6054
6061
|
if (!isIdentityMatrix(residual)) children = children.map((c) => bake(c, residual));
|
|
@@ -6061,8 +6068,8 @@ function vectorInstanceGroup(node, bake) {
|
|
|
6061
6068
|
if (node.locked) group.locked = true;
|
|
6062
6069
|
if (node.opacity !== void 0) group.opacity = node.opacity;
|
|
6063
6070
|
if (node.blendMode) group.blendMode = node.blendMode;
|
|
6064
|
-
if (_optionalChain([node, 'access',
|
|
6065
|
-
if (_optionalChain([node, 'access',
|
|
6071
|
+
if (_optionalChain([node, 'access', _152 => _152.filters, 'optionalAccess', _153 => _153.length])) group.filters = node.filters;
|
|
6072
|
+
if (_optionalChain([node, 'access', _154 => _154.effects, 'optionalAccess', _155 => _155.length])) group.effects = node.effects;
|
|
6066
6073
|
if (node.booleanOperation) group.booleanOperation = node.booleanOperation;
|
|
6067
6074
|
if (node.blendStep) group.blendStep = true;
|
|
6068
6075
|
return group;
|
|
@@ -6315,8 +6322,8 @@ function vectorLensDrawn(node) {
|
|
|
6315
6322
|
if (wire) {
|
|
6316
6323
|
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)) }));
|
|
6317
6324
|
} else if (recolour) {
|
|
6318
|
-
const fills = _optionalChain([shape, 'access',
|
|
6319
|
-
const strokes = _optionalChain([shape, 'access',
|
|
6325
|
+
const fills = _optionalChain([shape, 'access', _156 => _156.source, 'access', _157 => _157.fills, 'optionalAccess', _158 => _158.map, 'call', _159 => _159((l) => ({ ...l, paint: _nullishCoalesce(mapVectorPaintColors(l.paint, recolour), () => ( null)) }))]);
|
|
6326
|
+
const strokes = _optionalChain([shape, 'access', _160 => _160.source, 'access', _161 => _161.strokes, 'optionalAccess', _162 => _162.map, 'call', _163 => _163((l) => ({ ...l, paint: _nullishCoalesce(mapVectorPaintColors(l.paint, recolour), () => ( null)) }))]);
|
|
6320
6327
|
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 } : {} }));
|
|
6321
6328
|
} else contents.push(shapePath(shape, id, changed));
|
|
6322
6329
|
}
|
|
@@ -6329,7 +6336,7 @@ function vectorLensDrawn(node) {
|
|
|
6329
6336
|
const { lens: _l, lensView: _v, transform: _t, opacity: _o, effects: _e, blendMode: _bm, filters: _f, ...style } = node;
|
|
6330
6337
|
const fillOpacity = lens.type === "transparency" ? 1 - Math.min(100, Math.max(0, lens.amount)) / 100 : 0;
|
|
6331
6338
|
children.push({ ...style, id: `${node.id}~lens-fill`, stroke: null, strokes: void 0, opacity: fillOpacity });
|
|
6332
|
-
const stroked = (_nullishCoalesce(_optionalChain([node, 'access',
|
|
6339
|
+
const stroked = (_nullishCoalesce(_optionalChain([node, 'access', _164 => _164.strokes, 'optionalAccess', _165 => _165.length]), () => ( 0))) > 0 || node.stroke != null && node.stroke !== "none";
|
|
6333
6340
|
if (stroked) children.push({ ...style, id: `${node.id}~lens-stroke`, fill: null, fills: void 0 });
|
|
6334
6341
|
const out = {
|
|
6335
6342
|
id: node.id,
|
|
@@ -6338,7 +6345,7 @@ function vectorLensDrawn(node) {
|
|
|
6338
6345
|
...node.transform ? { transform: node.transform } : {},
|
|
6339
6346
|
...node.opacity !== void 0 ? { opacity: node.opacity } : {},
|
|
6340
6347
|
...node.blendMode ? { blendMode: node.blendMode } : {},
|
|
6341
|
-
..._optionalChain([node, 'access',
|
|
6348
|
+
..._optionalChain([node, 'access', _166 => _166.filters, 'optionalAccess', _167 => _167.length]) ? { filters: node.filters } : {},
|
|
6342
6349
|
children
|
|
6343
6350
|
};
|
|
6344
6351
|
drawnCache2.set(node, out);
|
|
@@ -7339,7 +7346,7 @@ function normalizeVectorEffectParams(type, params, base) {
|
|
|
7339
7346
|
if (!defaults) return null;
|
|
7340
7347
|
const out = { ...defaults, ..._nullishCoalesce(base, () => ( {})) };
|
|
7341
7348
|
for (const spec of VECTOR_EFFECT_PARAM_SPECS[type]) {
|
|
7342
|
-
const v2 = _optionalChain([params, 'optionalAccess',
|
|
7349
|
+
const v2 = _optionalChain([params, 'optionalAccess', _168 => _168[spec.key]]);
|
|
7343
7350
|
if (v2 === void 0) continue;
|
|
7344
7351
|
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));
|
|
7345
7352
|
else if (spec.kind === "boolean" && typeof v2 === "boolean") out[spec.key] = v2;
|
|
@@ -7351,7 +7358,7 @@ function normalizeVectorEffectParams(type, params, base) {
|
|
|
7351
7358
|
const o = out;
|
|
7352
7359
|
o.rows = Math.round(o.rows);
|
|
7353
7360
|
o.columns = Math.round(o.columns);
|
|
7354
|
-
const given = _optionalChain([params, 'optionalAccess',
|
|
7361
|
+
const given = _optionalChain([params, 'optionalAccess', _169 => _169.mesh]);
|
|
7355
7362
|
let mesh = given !== void 0 ? isValidWarpMesh(given) ? cloneMesh(given) : null : o.mesh;
|
|
7356
7363
|
if (o.style !== "mesh") mesh = null;
|
|
7357
7364
|
if (mesh && given !== void 0) {
|
|
@@ -7368,10 +7375,10 @@ function createVectorEffect(type, id, params) {
|
|
|
7368
7375
|
}
|
|
7369
7376
|
var isEnabled = (e) => e.enabled !== false && !!VECTOR_EFFECT_DEFAULTS[e.type];
|
|
7370
7377
|
function activeVectorEffects(node) {
|
|
7371
|
-
return _nullishCoalesce(_optionalChain([node, 'access',
|
|
7378
|
+
return _nullishCoalesce(_optionalChain([node, 'access', _170 => _170.effects, 'optionalAccess', _171 => _171.filter, 'call', _172 => _172(isEnabled)]), () => ( []));
|
|
7372
7379
|
}
|
|
7373
7380
|
function hasOwnVectorAppearance(node) {
|
|
7374
|
-
return node.type === "text" || node.type === "instance" || node.type === "group" && !!node.liveBoolean || isVectorFrame(node) || isVectorSymmetryGroup(node) || isVectorLens(node) || !!_optionalChain([node, 'access',
|
|
7381
|
+
return node.type === "text" || node.type === "instance" || node.type === "group" && !!node.liveBoolean || isVectorFrame(node) || isVectorSymmetryGroup(node) || isVectorLens(node) || !!_optionalChain([node, 'access', _173 => _173.effects, 'optionalAccess', _174 => _174.some, 'call', _175 => _175(isEnabled)]);
|
|
7375
7382
|
}
|
|
7376
7383
|
var liveCache = /* @__PURE__ */ new WeakMap();
|
|
7377
7384
|
function hasVectorAppearance(node) {
|
|
@@ -7383,7 +7390,7 @@ function hasVectorAppearance(node) {
|
|
|
7383
7390
|
return v2;
|
|
7384
7391
|
}
|
|
7385
7392
|
function isVectorLiveBoolean(node) {
|
|
7386
|
-
return _optionalChain([node, 'optionalAccess',
|
|
7393
|
+
return _optionalChain([node, 'optionalAccess', _176 => _176.type]) === "group" && !!node.liveBoolean;
|
|
7387
7394
|
}
|
|
7388
7395
|
function vectorOperandOperation(group, child) {
|
|
7389
7396
|
return _nullishCoalesce(_nullishCoalesce(child.booleanOperation, () => ( group.liveBoolean)), () => ( "union"));
|
|
@@ -7500,7 +7507,7 @@ var compareOrder = (a, b) => {
|
|
|
7500
7507
|
for (let i = 0; i < n; i++) if (a[i] !== b[i]) return a[i] - b[i];
|
|
7501
7508
|
return a.length - b.length;
|
|
7502
7509
|
};
|
|
7503
|
-
var add3 = (a, b) => ({ x: a.x + (_nullishCoalesce(_optionalChain([b, 'optionalAccess',
|
|
7510
|
+
var add3 = (a, b) => ({ x: a.x + (_nullishCoalesce(_optionalChain([b, 'optionalAccess', _177 => _177.x]), () => ( 0))), y: a.y + (_nullishCoalesce(_optionalChain([b, 'optionalAccess', _178 => _178.y]), () => ( 0))) });
|
|
7504
7511
|
var mapPaths = (shapes, fn) => {
|
|
7505
7512
|
const out = fn(shapes.map((s) => s.path));
|
|
7506
7513
|
return shapes.map((s, i) => ({ ...s, path: _nullishCoalesce(out[i], () => ( [])) }));
|
|
@@ -7528,7 +7535,7 @@ function contourShapes(shapes, c) {
|
|
|
7528
7535
|
const power = 2 ** (Math.min(100, Math.max(-100, c.acceleration)) / 50);
|
|
7529
7536
|
for (let k = 1; k <= n; k++) {
|
|
7530
7537
|
const [path] = offsetPaths([s.path], (outside ? 1 : -1) * step * k, c.join, c.miterLimit, 1, 0);
|
|
7531
|
-
if (!_optionalChain([path, 'optionalAccess',
|
|
7538
|
+
if (!_optionalChain([path, 'optionalAccess', _179 => _179.length])) break;
|
|
7532
7539
|
const t = (k / n) ** power;
|
|
7533
7540
|
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 };
|
|
7534
7541
|
out.push({ source, path, opacity: s.opacity, order: [outside ? n - k : k, ...s.order] });
|
|
@@ -7603,8 +7610,8 @@ function bevelShapes(shapes, b) {
|
|
|
7603
7610
|
out.push({ source, path: f.path, opacity: s.opacity, order: [...s.order, 1, k] });
|
|
7604
7611
|
});
|
|
7605
7612
|
const [middle] = offsetPaths([s.path], -b.width, "miter", 4, 1, 0);
|
|
7606
|
-
if (_optionalChain([middle, 'optionalAccess',
|
|
7607
|
-
const hasStroke = _optionalChain([s, 'access',
|
|
7613
|
+
if (_optionalChain([middle, 'optionalAccess', _180 => _180.length])) out.push({ ...s, source: fillOnly, path: middle, order: [...s.order, 2] });
|
|
7614
|
+
const hasStroke = _optionalChain([s, 'access', _181 => _181.source, 'access', _182 => _182.strokes, 'optionalAccess', _183 => _183.length]) || s.source.stroke != null && s.source.stroke !== "none";
|
|
7608
7615
|
if (hasStroke) out.push({ ...s, source: { ...s.source, fill: null, fills: void 0 }, order: [...s.order, 3] });
|
|
7609
7616
|
}
|
|
7610
7617
|
return out;
|
|
@@ -7737,10 +7744,10 @@ function vectorEffectInputBounds(node, effectId) {
|
|
|
7737
7744
|
return paths ? pathsBounds(paths) : null;
|
|
7738
7745
|
}
|
|
7739
7746
|
function vectorNodeEnvelope(node) {
|
|
7740
|
-
return _nullishCoalesce(_optionalChain([node, 'optionalAccess',
|
|
7747
|
+
return _nullishCoalesce(_optionalChain([node, 'optionalAccess', _184 => _184.effects, 'optionalAccess', _185 => _185.find, 'call', _186 => _186((e) => e.type === "envelope" && e.enabled !== false)]), () => ( null));
|
|
7741
7748
|
}
|
|
7742
7749
|
function vectorEnvelopeFrame(node, effectId) {
|
|
7743
|
-
const e = effectId ? _optionalChain([node, 'access',
|
|
7750
|
+
const e = effectId ? _optionalChain([node, 'access', _187 => _187.effects, 'optionalAccess', _188 => _188.find, 'call', _189 => _189((x) => x.id === effectId)]) : vectorNodeEnvelope(node);
|
|
7744
7751
|
if (!e || e.type !== "envelope") return null;
|
|
7745
7752
|
const bounds = vectorEffectInputBounds(node, e.id);
|
|
7746
7753
|
if (!bounds || !(bounds.width > 0 && bounds.height > 0)) return null;
|
|
@@ -7801,7 +7808,7 @@ function placement(node) {
|
|
|
7801
7808
|
...node.blendStep ? { blendStep: true } : {},
|
|
7802
7809
|
...node.booleanOperation ? { booleanOperation: node.booleanOperation } : {},
|
|
7803
7810
|
...node.blendMode ? { blendMode: node.blendMode } : {},
|
|
7804
|
-
..._optionalChain([node, 'access',
|
|
7811
|
+
..._optionalChain([node, 'access', _190 => _190.filters, 'optionalAccess', _191 => _191.length]) ? { filters: node.filters } : {}
|
|
7805
7812
|
};
|
|
7806
7813
|
}
|
|
7807
7814
|
function vectorAppearanceNodes(node) {
|
|
@@ -7933,7 +7940,7 @@ function vectorMasterPages(doc) {
|
|
|
7933
7940
|
function fillTokens(node, page, pages) {
|
|
7934
7941
|
const map = (s) => s.replace(/\{page\}/g, String(page)).replace(/\{pages\}/g, String(pages));
|
|
7935
7942
|
if (!/\{pages?\}/.test(node.text)) return node;
|
|
7936
|
-
if (!_optionalChain([node, 'access',
|
|
7943
|
+
if (!_optionalChain([node, 'access', _192 => _192.runs, 'optionalAccess', _193 => _193.length])) return { ...node, text: map(node.text) };
|
|
7937
7944
|
let at2 = 0;
|
|
7938
7945
|
let text = "";
|
|
7939
7946
|
const runs = [];
|
|
@@ -7956,7 +7963,7 @@ function vectorMasterArt(master, page, number, count) {
|
|
|
7956
7963
|
const f = page.frame;
|
|
7957
7964
|
const key = `${page.id}|${f.x}|${f.y}|${f.width}|${f.height}|${number}|${count}`;
|
|
7958
7965
|
let byKey = artCache.get(master);
|
|
7959
|
-
const hit = _optionalChain([byKey, 'optionalAccess',
|
|
7966
|
+
const hit = _optionalChain([byKey, 'optionalAccess', _194 => _194.get, 'call', _195 => _195(key)]);
|
|
7960
7967
|
if (hit) return hit;
|
|
7961
7968
|
const art = master.children.filter((c) => c.visible !== false).map((c) => {
|
|
7962
7969
|
const box = vectorNodeBounds(c);
|
|
@@ -8001,7 +8008,7 @@ function stripVectorMasterArt(doc) {
|
|
|
8001
8008
|
// src/vector/connectors.ts
|
|
8002
8009
|
var SIDES = ["top", "right", "bottom", "left", "center"];
|
|
8003
8010
|
function isVectorConnector(node) {
|
|
8004
|
-
return _optionalChain([node, 'optionalAccess',
|
|
8011
|
+
return _optionalChain([node, 'optionalAccess', _196 => _196.type]) === "path" && !!node.connector;
|
|
8005
8012
|
}
|
|
8006
8013
|
function vectorConnectionSites(nodes, id) {
|
|
8007
8014
|
const node = findVectorNode(nodes, id);
|
|
@@ -8058,7 +8065,7 @@ function facingSite(sites, toward) {
|
|
|
8058
8065
|
}
|
|
8059
8066
|
function storedEnds(node, world) {
|
|
8060
8067
|
const sp = node.subpaths[0];
|
|
8061
|
-
if (!_optionalChain([sp, 'optionalAccess',
|
|
8068
|
+
if (!_optionalChain([sp, 'optionalAccess', _197 => _197.anchors, 'access', _198 => _198.length])) return null;
|
|
8062
8069
|
const a = sp.anchors[0];
|
|
8063
8070
|
const b = sp.anchors[sp.anchors.length - 1];
|
|
8064
8071
|
return [applyMatrix(world, a), applyMatrix(world, b)];
|
|
@@ -8165,8 +8172,8 @@ function routeVectorConnector(nodes, id) {
|
|
|
8165
8172
|
}));
|
|
8166
8173
|
return {
|
|
8167
8174
|
subpaths: [{ closed: false, anchors: local }],
|
|
8168
|
-
startSide: _nullishCoalesce(_optionalChain([s, 'optionalAccess',
|
|
8169
|
-
endSide: _nullishCoalesce(_optionalChain([e, 'optionalAccess',
|
|
8175
|
+
startSide: _nullishCoalesce(_optionalChain([s, 'optionalAccess', _199 => _199.side]), () => ( null)),
|
|
8176
|
+
endSide: _nullishCoalesce(_optionalChain([e, 'optionalAccess', _200 => _200.side]), () => ( null)),
|
|
8170
8177
|
dropped: { start: !!startGlue && !s, end: !!endGlue && !e }
|
|
8171
8178
|
};
|
|
8172
8179
|
}
|
|
@@ -8178,7 +8185,7 @@ function sameSubpaths(a, b) {
|
|
|
8178
8185
|
const o = b[i];
|
|
8179
8186
|
return sp.closed === o.closed && sp.anchors.length === o.anchors.length && sp.anchors.every((p, k) => {
|
|
8180
8187
|
const q = o.anchors[k];
|
|
8181
|
-
return samePoint(p, q) && samePoint(p.in, q.in) && samePoint(p.out, q.out) && (_nullishCoalesce(_optionalChain([p, 'access',
|
|
8188
|
+
return samePoint(p, q) && samePoint(p.in, q.in) && samePoint(p.out, q.out) && (_nullishCoalesce(_optionalChain([p, 'access', _201 => _201.corner, 'optionalAccess', _202 => _202.radius]), () => ( 0))) === (_nullishCoalesce(_optionalChain([q, 'access', _203 => _203.corner, 'optionalAccess', _204 => _204.radius]), () => ( 0)));
|
|
8182
8189
|
});
|
|
8183
8190
|
});
|
|
8184
8191
|
}
|
|
@@ -8457,7 +8464,7 @@ function applyVectorCornersAttribute(subpaths, value) {
|
|
|
8457
8464
|
for (const item of value.trim().split(/\s+/)) {
|
|
8458
8465
|
const m = /^(\d+)\.(\d+):([\d.eE+-]+)(?::([a-z]+))?$/.exec(item);
|
|
8459
8466
|
if (!m) continue;
|
|
8460
|
-
const a = _optionalChain([subpaths, 'access',
|
|
8467
|
+
const a = _optionalChain([subpaths, 'access', _205 => _205[+m[1]], 'optionalAccess', _206 => _206.anchors, 'access', _207 => _207[+m[2]]]);
|
|
8461
8468
|
const radius = parseFloat(m[3]);
|
|
8462
8469
|
if (!a || !(radius > 0)) continue;
|
|
8463
8470
|
const kind = VECTOR_CORNER_KINDS.includes(m[4]) ? m[4] : void 0;
|
|
@@ -8482,7 +8489,7 @@ function vectorPaintToSvg(paint, gradientId, options = {}) {
|
|
|
8482
8489
|
const area2 = bounds2 ? { x: bounds2.x - reach2, y: bounds2.y - reach2, width: bounds2.width + 2 * reach2, height: bounds2.height + 2 * reach2 } : null;
|
|
8483
8490
|
const key2 = `${gradientId}|${_nullishCoalesce(options.role, () => ( "fill"))}|${_nullishCoalesce(options.precision, () => ( 3))}|${area2 ? [area2.x, area2.y, area2.width, area2.height].join(",") : ""}`;
|
|
8484
8491
|
let byKey2 = paintCache.get(paint);
|
|
8485
|
-
const hit = _optionalChain([byKey2, 'optionalAccess',
|
|
8492
|
+
const hit = _optionalChain([byKey2, 'optionalAccess', _208 => _208.get, 'call', _209 => _209(key2)]);
|
|
8486
8493
|
if (hit) return { value: `url(#${gradientId})`, defs: hit };
|
|
8487
8494
|
const defs2 = vectorShadedSvgDefs(paint, gradientId, { bounds: bounds2, area: area2, precision: _nullishCoalesce(options.precision, () => ( 3)) });
|
|
8488
8495
|
if (!byKey2) paintCache.set(paint, byKey2 = /* @__PURE__ */ new Map());
|
|
@@ -8494,7 +8501,7 @@ function vectorPaintToSvg(paint, gradientId, options = {}) {
|
|
|
8494
8501
|
const precision = _nullishCoalesce(options.precision, () => ( 3));
|
|
8495
8502
|
const key = `${gradientId}|${role}|${precision}`;
|
|
8496
8503
|
const owner = _nullishCoalesce(options.node, () => ( paint));
|
|
8497
|
-
const cached = _optionalChain([paintCache, 'access',
|
|
8504
|
+
const cached = _optionalChain([paintCache, 'access', _210 => _210.get, 'call', _211 => _211(owner), 'optionalAccess', _212 => _212.get, 'call', _213 => _213(key)]);
|
|
8498
8505
|
if (cached && (!options.node || (role === "fill" ? options.node.fill : options.node.stroke) === paint)) return { value: `url(#${gradientId})`, defs: cached };
|
|
8499
8506
|
const node = options.node;
|
|
8500
8507
|
const bounds = node ? vectorPathLocalBounds(node) : null;
|
|
@@ -8548,7 +8555,7 @@ function vectorNodeLocalPaintBounds(node) {
|
|
|
8548
8555
|
}
|
|
8549
8556
|
var filterCache = /* @__PURE__ */ new WeakMap();
|
|
8550
8557
|
function vectorNodeFilterSvg(node, id) {
|
|
8551
|
-
if (!_optionalChain([node, 'access',
|
|
8558
|
+
if (!_optionalChain([node, 'access', _214 => _214.filters, 'optionalAccess', _215 => _215.length])) return null;
|
|
8552
8559
|
const hit = filterCache.get(node);
|
|
8553
8560
|
if (hit && hit.id === id) return hit.filter;
|
|
8554
8561
|
const active = activeVectorFilters(node);
|
|
@@ -8634,7 +8641,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8634
8641
|
if (node.type === "path" && node.lens) out2 += ` data-vector-lens="${escapeAttr2(JSON.stringify(node.lens))}"`;
|
|
8635
8642
|
const blend = vectorBlendModeCss(node.blendMode);
|
|
8636
8643
|
if (blend) out2 += ` style="mix-blend-mode:${blend}"`;
|
|
8637
|
-
if (_optionalChain([node, 'access',
|
|
8644
|
+
if (_optionalChain([node, 'access', _216 => _216.filters, 'optionalAccess', _217 => _217.length])) {
|
|
8638
8645
|
const filter = vectorNodeFilterSvg(node, `${prefix}filter-${node.id}`);
|
|
8639
8646
|
const data = ` data-vector-filters="${escapeAttr2(JSON.stringify(node.filters))}"`;
|
|
8640
8647
|
if (filter) {
|
|
@@ -8681,7 +8688,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8681
8688
|
let out2 = ` stroke="${escapeAttr2(strokeValue)}" stroke-width="${num3(width)}"`;
|
|
8682
8689
|
if (node.strokeLinecap && node.strokeLinecap !== "butt") out2 += ` stroke-linecap="${node.strokeLinecap}"`;
|
|
8683
8690
|
if (node.strokeLinejoin && node.strokeLinejoin !== "miter") out2 += ` stroke-linejoin="${node.strokeLinejoin}"`;
|
|
8684
|
-
if (_optionalChain([node, 'access',
|
|
8691
|
+
if (_optionalChain([node, 'access', _218 => _218.strokeDasharray, 'optionalAccess', _219 => _219.length])) out2 += ` stroke-dasharray="${node.strokeDasharray.map(num3).join(" ")}"`;
|
|
8685
8692
|
return out2;
|
|
8686
8693
|
};
|
|
8687
8694
|
const liveCorners = (node) => {
|
|
@@ -8730,7 +8737,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8730
8737
|
};
|
|
8731
8738
|
const emit2 = (node, depth) => {
|
|
8732
8739
|
if (node.visible === false && !options.includeHidden) return;
|
|
8733
|
-
const wrappers = _nullishCoalesce(_optionalChain([options, 'access',
|
|
8740
|
+
const wrappers = _nullishCoalesce(_optionalChain([options, 'access', _220 => _220.wrap, 'optionalAccess', _221 => _221[node.id]]), () => ( []));
|
|
8734
8741
|
wrappers.forEach((w2, i) => {
|
|
8735
8742
|
let attrs = w2.id !== void 0 ? ` id="${escapeAttr2(w2.id)}"` : "";
|
|
8736
8743
|
if (w2.transform) attrs += ` transform="${escapeAttr2(w2.transform)}"`;
|
|
@@ -8751,7 +8758,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8751
8758
|
};
|
|
8752
8759
|
const emitMaskGroup = (node, depth) => {
|
|
8753
8760
|
const [source, ...contents] = node.children;
|
|
8754
|
-
const body = _optionalChain([node, 'access',
|
|
8761
|
+
const body = _optionalChain([node, 'access', _222 => _222.effects, 'optionalAccess', _223 => _223.length]) && contents.length ? [{ id: `${node.id}~content`, type: "group", effects: node.effects, children: contents }] : contents;
|
|
8755
8762
|
const settings = { type: node.mask.type, ...node.mask.invert ? { invert: true } : {} };
|
|
8756
8763
|
lines.push(`${indent(depth)}<g${common(node)} data-vector-mask="${escapeAttr2(JSON.stringify(settings))}">`);
|
|
8757
8764
|
const mask = vectorMaskRenderData(node, `${prefix}mask-${node.id}`, `${prefix}mask-filter-${node.id}`, precision);
|
|
@@ -8768,7 +8775,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8768
8775
|
lines.push(`${indent(depth + 1)}<g data-vector-part="mask-source" display="none">`);
|
|
8769
8776
|
emitNode(source, depth + 2);
|
|
8770
8777
|
lines.push(`${indent(depth + 1)}</g>`);
|
|
8771
|
-
if (_optionalChain([mask, 'optionalAccess',
|
|
8778
|
+
if (_optionalChain([mask, 'optionalAccess', _224 => _224.clip])) {
|
|
8772
8779
|
defs.push(`<clipPath id="${escapeAttr2(mask.id)}">${mask.clip.map((c) => `<path d="${c.d}" clip-rule="${c.clipRule}"/>`).join("")}</clipPath>`);
|
|
8773
8780
|
ref = ` clip-path="url(#${escapeAttr2(mask.id)})"`;
|
|
8774
8781
|
}
|
|
@@ -8780,7 +8787,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8780
8787
|
};
|
|
8781
8788
|
const emitTextElement = (node, depth, attrs) => {
|
|
8782
8789
|
const geometry = vectorTextGeometryNode(node);
|
|
8783
|
-
const fields = { text: node.text, font: node.font, ..._optionalChain([node, 'access',
|
|
8790
|
+
const fields = { text: node.text, font: node.font, ..._optionalChain([node, 'access', _225 => _225.runs, 'optionalAccess', _226 => _226.length]) ? { runs: node.runs } : {}, ...node.paragraph ? { paragraph: node.paragraph } : {}, frame: node.frame, ...node.orientation ? { orientation: node.orientation } : {}, ..._optionalChain([node, 'access', _227 => _227.effects, 'optionalAccess', _228 => _228.length]) ? { effects: node.effects } : {} };
|
|
8784
8791
|
let data = ` data-vector-text="${escapeAttr2(JSON.stringify(fields))}"`;
|
|
8785
8792
|
if (hasVectorPaintStacks(node)) data += ` data-vector-fills="${escapeAttr2(JSON.stringify(vectorFills(node)))}" data-vector-strokes="${escapeAttr2(JSON.stringify(vectorStrokes(node)))}"`;
|
|
8786
8793
|
else {
|
|
@@ -8822,12 +8829,12 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8822
8829
|
};
|
|
8823
8830
|
const emitText = (node, depth) => {
|
|
8824
8831
|
const outlines = vectorTextPaths(node).outlines;
|
|
8825
|
-
const effects = !!_optionalChain([node, 'access',
|
|
8832
|
+
const effects = !!_optionalChain([node, 'access', _229 => _229.effects, 'optionalAccess', _230 => _230.some, 'call', _231 => _231((e) => e.enabled !== false)]);
|
|
8826
8833
|
if (!outlines || !effects && options.text !== "outlines") {
|
|
8827
8834
|
emitTextElement(node, depth, common(node));
|
|
8828
8835
|
return;
|
|
8829
8836
|
}
|
|
8830
|
-
lines.push(`${indent(depth)}<g${common(node)} data-vector-live="${escapeAttr2(JSON.stringify({ kind: "text", ..._optionalChain([node, 'access',
|
|
8837
|
+
lines.push(`${indent(depth)}<g${common(node)} data-vector-live="${escapeAttr2(JSON.stringify({ kind: "text", ..._optionalChain([node, 'access', _232 => _232.effects, 'optionalAccess', _233 => _233.length]) ? { effects: node.effects } : {} }))}">`);
|
|
8831
8838
|
lines.push(`${indent(depth + 1)}<g data-vector-part="appearance">`);
|
|
8832
8839
|
for (const shape of vectorAppearanceNodes(node)) emit2(shape, depth + 2);
|
|
8833
8840
|
lines.push(`${indent(depth + 1)}</g>`);
|
|
@@ -8841,7 +8848,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8841
8848
|
const symbolRef = (symbolId) => {
|
|
8842
8849
|
const hit = symbolIds.get(symbolId);
|
|
8843
8850
|
if (hit) return hit;
|
|
8844
|
-
const sym2 = _optionalChain([doc, 'access',
|
|
8851
|
+
const sym2 = _optionalChain([doc, 'access', _234 => _234.symbols, 'optionalAccess', _235 => _235.find, 'call', _236 => _236((x) => x.id === symbolId)]);
|
|
8845
8852
|
if (!sym2) return null;
|
|
8846
8853
|
const id = `${prefix}symbol-${symbolId}`;
|
|
8847
8854
|
symbolIds.set(symbolId, id);
|
|
@@ -8851,20 +8858,20 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8851
8858
|
};
|
|
8852
8859
|
const emitInstance = (node, depth) => {
|
|
8853
8860
|
const data = { symbolId: node.symbolId, ...node.scaleStrokes === false ? { scaleStrokes: false } : {}, ...node.overrides ? { overrides: node.overrides } : {} };
|
|
8854
|
-
const exact2 = !node.overrides && node.scaleStrokes !== false && !_optionalChain([node, 'access',
|
|
8861
|
+
const exact2 = !node.overrides && node.scaleStrokes !== false && !_optionalChain([node, 'access', _237 => _237.effects, 'optionalAccess', _238 => _238.length]) && !_optionalChain([node, 'access', _239 => _239.filters, 'optionalAccess', _240 => _240.length]);
|
|
8855
8862
|
const ref = symbolRef(node.symbolId);
|
|
8856
8863
|
if (exact2 && ref) {
|
|
8857
8864
|
lines.push(`${indent(depth)}<use${common(node)} href="#${escapeAttr2(ref)}" data-vector-instance="${escapeAttr2(JSON.stringify(data))}"/>`);
|
|
8858
8865
|
return;
|
|
8859
8866
|
}
|
|
8860
|
-
const full = { ...data, ...node.transform ? { transform: node.transform } : {}, ..._optionalChain([node, 'access',
|
|
8867
|
+
const full = { ...data, ...node.transform ? { transform: node.transform } : {}, ..._optionalChain([node, 'access', _241 => _241.effects, 'optionalAccess', _242 => _242.length]) ? { effects: node.effects } : {} };
|
|
8861
8868
|
lines.push(`${indent(depth)}<g data-vector-instance="${escapeAttr2(JSON.stringify(full))}">`);
|
|
8862
8869
|
emitNode(vectorInstanceDrawn(node), depth + 1);
|
|
8863
8870
|
lines.push(`${indent(depth)}</g>`);
|
|
8864
8871
|
};
|
|
8865
8872
|
const emitFrame = (node, depth) => {
|
|
8866
8873
|
const f = node.frame;
|
|
8867
|
-
const data = { ...f, ..._optionalChain([node, 'access',
|
|
8874
|
+
const data = { ...f, ..._optionalChain([node, 'access', _243 => _243.effects, 'optionalAccess', _244 => _244.length]) ? { effects: node.effects } : {} };
|
|
8868
8875
|
lines.push(`${indent(depth)}<g${common(node)} data-vector-frame="${escapeAttr2(JSON.stringify(data))}">`);
|
|
8869
8876
|
const rect = vectorFrameRectPath(f);
|
|
8870
8877
|
if (f.fill !== void 0 && f.fill !== null && f.fill !== "none") {
|
|
@@ -8879,7 +8886,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8879
8886
|
ref = ` clip-path="url(#${escapeAttr2(id)})"`;
|
|
8880
8887
|
}
|
|
8881
8888
|
lines.push(`${indent(depth + 1)}<g data-vector-part="frame-contents"${ref}>`);
|
|
8882
|
-
if (_optionalChain([node, 'access',
|
|
8889
|
+
if (_optionalChain([node, 'access', _245 => _245.masterArt, 'optionalAccess', _246 => _246.length])) {
|
|
8883
8890
|
lines.push(`${indent(depth + 2)}<g data-vector-part="frame-master">`);
|
|
8884
8891
|
for (const child of node.masterArt) emit2(child, depth + 3);
|
|
8885
8892
|
lines.push(`${indent(depth + 2)}</g>`);
|
|
@@ -8908,7 +8915,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8908
8915
|
if (hasOwnVectorAppearance(node)) {
|
|
8909
8916
|
const live2 = {
|
|
8910
8917
|
kind: node.type,
|
|
8911
|
-
..._optionalChain([node, 'access',
|
|
8918
|
+
..._optionalChain([node, 'access', _247 => _247.effects, 'optionalAccess', _248 => _248.length]) ? { effects: node.effects } : {},
|
|
8912
8919
|
...node.type === "group" && node.liveBoolean ? { liveBoolean: node.liveBoolean } : {},
|
|
8913
8920
|
...node.type === "group" && node.symmetry ? { symmetry: node.symmetry } : {}
|
|
8914
8921
|
};
|
|
@@ -8959,7 +8966,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8959
8966
|
data += ` data-vector-width-profile="${widthProfileToAttribute(profile)}"`;
|
|
8960
8967
|
if (node.strokeLinecap && node.strokeLinecap !== "butt") data += ` data-vector-stroke-linecap="${node.strokeLinecap}"`;
|
|
8961
8968
|
if (node.strokeLinejoin && node.strokeLinejoin !== "miter") data += ` data-vector-stroke-linejoin="${node.strokeLinejoin}"`;
|
|
8962
|
-
if (_optionalChain([node, 'access',
|
|
8969
|
+
if (_optionalChain([node, 'access', _249 => _249.strokeDasharray, 'optionalAccess', _250 => _250.length])) data += ` data-vector-stroke-dasharray="${node.strokeDasharray.map(num3).join(" ")}"`;
|
|
8963
8970
|
}
|
|
8964
8971
|
lines.push(`${indent(depth)}<g${common(node)}${data}>`);
|
|
8965
8972
|
lines.push(`${indent(depth + 1)}<path data-vector-part="fill" d="${d}"${fillAttrs}${live}/>`);
|
|
@@ -9140,7 +9147,7 @@ function readStyle(el, parent, cssRules) {
|
|
|
9140
9147
|
const { mixBlendMode: _m, filter: _f, ...inherited } = parent;
|
|
9141
9148
|
const out = { ...inherited };
|
|
9142
9149
|
for (const [attr, key] of Object.entries(STYLE_KEYS)) if (el.attrs[attr] !== void 0) out[key] = el.attrs[attr].trim();
|
|
9143
|
-
if (_optionalChain([cssRules, 'optionalAccess',
|
|
9150
|
+
if (_optionalChain([cssRules, 'optionalAccess', _251 => _251.length])) {
|
|
9144
9151
|
for (const rule of cssRules) {
|
|
9145
9152
|
if (matchesSelector(el, rule.selector)) {
|
|
9146
9153
|
for (const [prop, val] of Object.entries(rule.properties)) {
|
|
@@ -9196,7 +9203,7 @@ function attrOrStyle(el, name) {
|
|
|
9196
9203
|
return el.attrs[name];
|
|
9197
9204
|
}
|
|
9198
9205
|
function urlId(value) {
|
|
9199
|
-
return _nullishCoalesce(_optionalChain([/^url\(\s*['"]?#([^'")\s]+)['"]?\s*\)/, 'access',
|
|
9206
|
+
return _nullishCoalesce(_optionalChain([/^url\(\s*['"]?#([^'")\s]+)['"]?\s*\)/, 'access', _252 => _252.exec, 'call', _253 => _253((_nullishCoalesce(value, () => ( ""))).trim()), 'optionalAccess', _254 => _254[1]]), () => ( null));
|
|
9200
9207
|
}
|
|
9201
9208
|
function clipRulesAsFillRules(el) {
|
|
9202
9209
|
const attrs = { ...el.attrs };
|
|
@@ -9261,9 +9268,9 @@ function resolveGradient(id, raw) {
|
|
|
9261
9268
|
for (let el = first; el && !chain.includes(el) && chain.length < 32; ) {
|
|
9262
9269
|
chain.push(el);
|
|
9263
9270
|
const href = _nullishCoalesce(el.attrs.href, () => ( el.attrs["xlink:href"]));
|
|
9264
|
-
el = _optionalChain([href, 'optionalAccess',
|
|
9271
|
+
el = _optionalChain([href, 'optionalAccess', _255 => _255.startsWith, 'call', _256 => _256("#")]) ? raw.get(href.slice(1)) : void 0;
|
|
9265
9272
|
}
|
|
9266
|
-
const attr = (name) => _optionalChain([chain, 'access',
|
|
9273
|
+
const attr = (name) => _optionalChain([chain, 'access', _257 => _257.find, 'call', _258 => _258((el) => el.attrs[name] !== void 0), 'optionalAccess', _259 => _259.attrs, 'access', _260 => _260[name]]);
|
|
9267
9274
|
const stops = _nullishCoalesce(chain.map(readStops).find((s) => s.length), () => ( []));
|
|
9268
9275
|
if (!stops.length) return null;
|
|
9269
9276
|
const user = attr("gradientUnits") === "userSpaceOnUse";
|
|
@@ -9435,7 +9442,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9435
9442
|
const stackedPath = (g, _style, m, meta) => {
|
|
9436
9443
|
const fillEl = g.children.find((c) => c.name === "path" && c.attrs["data-vector-part"] === "fill");
|
|
9437
9444
|
const subpaths = fillEl ? shapeOf(fillEl) : null;
|
|
9438
|
-
if (!_optionalChain([subpaths, 'optionalAccess',
|
|
9445
|
+
if (!_optionalChain([subpaths, 'optionalAccess', _261 => _261.length])) return null;
|
|
9439
9446
|
const parse = (v2) => {
|
|
9440
9447
|
try {
|
|
9441
9448
|
return v2 ? JSON.parse(v2) : [];
|
|
@@ -9454,7 +9461,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9454
9461
|
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))]);
|
|
9455
9462
|
for (const n of nodes2) {
|
|
9456
9463
|
const prev = out[out.length - 1];
|
|
9457
|
-
if (_optionalChain([prev, 'optionalAccess',
|
|
9464
|
+
if (_optionalChain([prev, 'optionalAccess', _262 => _262.type]) === "path" && n.type === "path" && key(prev) === key(n)) {
|
|
9458
9465
|
const fills = vectorFills(n);
|
|
9459
9466
|
const strokesBefore = vectorStrokes(prev);
|
|
9460
9467
|
if (!(fills.length && strokesBefore.length)) {
|
|
@@ -9472,7 +9479,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9472
9479
|
const part = (name) => g.children.find((c) => c.name === "path" && c.attrs["data-vector-part"] === name);
|
|
9473
9480
|
const fillEl = part("fill");
|
|
9474
9481
|
const subpaths = fillEl ? shapeOf(fillEl) : null;
|
|
9475
|
-
if (!fillEl || !_optionalChain([subpaths, 'optionalAccess',
|
|
9482
|
+
if (!fillEl || !_optionalChain([subpaths, 'optionalAccess', _263 => _263.length])) return null;
|
|
9476
9483
|
const a = g.attrs;
|
|
9477
9484
|
const fs = readStyle(fillEl, style, styleRules);
|
|
9478
9485
|
const strokeEl = part("stroke");
|
|
@@ -9509,7 +9516,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9509
9516
|
...profile.length ? { strokeWidthProfile: profile } : {},
|
|
9510
9517
|
...keptCap ? { strokeLinecap: keptCap } : {},
|
|
9511
9518
|
...keptJoin ? { strokeLinejoin: keptJoin } : {},
|
|
9512
|
-
..._optionalChain([keptDash, 'optionalAccess',
|
|
9519
|
+
..._optionalChain([keptDash, 'optionalAccess', _264 => _264.length]) ? { strokeDasharray: keptDash } : {}
|
|
9513
9520
|
};
|
|
9514
9521
|
return placed(node, m);
|
|
9515
9522
|
};
|
|
@@ -9574,8 +9581,8 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9574
9581
|
} else {
|
|
9575
9582
|
const fill = json2(g.attrs["data-vector-fill"]);
|
|
9576
9583
|
const stroke = json2(g.attrs["data-vector-stroke"]);
|
|
9577
|
-
node.fill = fill == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call',
|
|
9578
|
-
node.stroke = stroke == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call',
|
|
9584
|
+
node.fill = fill == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call', _265 => _265([{ paint: fill }]), 'access', _266 => _266[0], 'optionalAccess', _267 => _267.paint]), () => ( null));
|
|
9585
|
+
node.stroke = stroke == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call', _268 => _268([{ paint: stroke }]), 'access', _269 => _269[0], 'optionalAccess', _270 => _270.paint]), () => ( null));
|
|
9579
9586
|
const settings = json2(g.attrs["data-vector-stroke-settings"]);
|
|
9580
9587
|
if (settings && typeof settings === "object") {
|
|
9581
9588
|
const strokes = sanitizeVectorStrokes([{ paint: _nullishCoalesce(node.stroke, () => ( "#000")), ...settings }]);
|
|
@@ -9611,8 +9618,8 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9611
9618
|
const anchor = attrOrStyle(el, "text-anchor");
|
|
9612
9619
|
const first0 = (v2) => _nullishCoalesce(numberList(v2)[0], () => ( 0));
|
|
9613
9620
|
const tspan = el.children.find((c) => c.name === "tspan");
|
|
9614
|
-
const x = el.attrs.x !== void 0 ? first0(el.attrs.x) : first0(_optionalChain([tspan, 'optionalAccess',
|
|
9615
|
-
const y = el.attrs.y !== void 0 ? first0(el.attrs.y) : first0(_optionalChain([tspan, 'optionalAccess',
|
|
9621
|
+
const x = el.attrs.x !== void 0 ? first0(el.attrs.x) : first0(_optionalChain([tspan, 'optionalAccess', _271 => _271.attrs, 'access', _272 => _272.x]));
|
|
9622
|
+
const y = el.attrs.y !== void 0 ? first0(el.attrs.y) : first0(_optionalChain([tspan, 'optionalAccess', _273 => _273.attrs, 'access', _274 => _274.y]));
|
|
9616
9623
|
const fillValue = _nullishCoalesce(attrOrStyle(el, "fill"), () => ( style.fill));
|
|
9617
9624
|
let node = {
|
|
9618
9625
|
id: idFor(el),
|
|
@@ -9643,12 +9650,12 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9643
9650
|
if (symbolOfElement.has(el)) return symbolOfElement.get(el);
|
|
9644
9651
|
symbolOfElement.set(el, null);
|
|
9645
9652
|
const own = json2(el.attrs["data-vector-symbol"]);
|
|
9646
|
-
let id = typeof _optionalChain([own, 'optionalAccess',
|
|
9653
|
+
let id = typeof _optionalChain([own, 'optionalAccess', _275 => _275.id]) === "string" && own.id ? own.id : _nullishCoalesce(el.attrs.id, () => ( createId()));
|
|
9647
9654
|
while (usedSymbolIds.has(id)) id = `${id}-${usedSymbolIds.size}`;
|
|
9648
9655
|
usedSymbolIds.add(id);
|
|
9649
9656
|
const style = readStyle(el, rootStyle, styleRules);
|
|
9650
9657
|
const nodes2 = el.name === "symbol" ? visit2(el, style, IDENTITY_MATRIX) : visitOne({ ...el, attrs: { ...el.attrs, transform: "" } }, rootStyle, parseSvgTransform(el.attrs.transform));
|
|
9651
|
-
symbols.push({ id, name: typeof _optionalChain([own, 'optionalAccess',
|
|
9658
|
+
symbols.push({ id, name: typeof _optionalChain([own, 'optionalAccess', _276 => _276.name]) === "string" && own.name ? own.name : _nullishCoalesce(el.attrs.id, () => ( "Symbol")), nodes: nodes2 });
|
|
9652
9659
|
symbolOfElement.set(el, id);
|
|
9653
9660
|
return id;
|
|
9654
9661
|
};
|
|
@@ -9660,13 +9667,13 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9660
9667
|
if (!symbolId) return null;
|
|
9661
9668
|
const own = json2(el.attrs["data-vector-instance"]);
|
|
9662
9669
|
const place2 = multiplyMatrices(translateMatrix(length(el.attrs.x), length(el.attrs.y)), m);
|
|
9663
|
-
const node = { id: idFor(el), type: "instance", ...meta, symbolId, ..._optionalChain([own, 'optionalAccess',
|
|
9670
|
+
const node = { id: idFor(el), type: "instance", ...meta, symbolId, ..._optionalChain([own, 'optionalAccess', _277 => _277.scaleStrokes]) === false ? { scaleStrokes: false } : {}, ..._optionalChain([own, 'optionalAccess', _278 => _278.overrides]) ? { overrides: own.overrides } : {} };
|
|
9664
9671
|
return isIdentityMatrix(place2) ? node : { ...node, transform: place2 };
|
|
9665
9672
|
};
|
|
9666
9673
|
const ownInstance = (g, m, meta) => {
|
|
9667
9674
|
const raw = json2(g.attrs["data-vector-instance"]);
|
|
9668
9675
|
if (!raw || typeof raw.symbolId !== "string") return null;
|
|
9669
|
-
const sym2 = [...byId.values()].find((e) => e.name === "symbol" && _optionalChain([json2, 'call',
|
|
9676
|
+
const sym2 = [...byId.values()].find((e) => e.name === "symbol" && _optionalChain([json2, 'call', _279 => _279(e.attrs["data-vector-symbol"]), 'optionalAccess', _280 => _280.id]) === raw.symbolId);
|
|
9670
9677
|
const symbolId = sym2 ? symbolFor(sym2) : raw.symbolId;
|
|
9671
9678
|
if (!symbolId) return null;
|
|
9672
9679
|
const t = Array.isArray(raw.transform) && raw.transform.length === 6 && raw.transform.every(Number.isFinite) ? raw.transform : IDENTITY_MATRIX;
|
|
@@ -9674,7 +9681,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9674
9681
|
const drawn = g.children.find((c) => c.name === "g");
|
|
9675
9682
|
const effects = sanitizeVectorEffects(raw.effects);
|
|
9676
9683
|
const node = {
|
|
9677
|
-
id: _nullishCoalesce(_optionalChain([drawn, 'optionalAccess',
|
|
9684
|
+
id: _nullishCoalesce(_optionalChain([drawn, 'optionalAccess', _281 => _281.attrs, 'access', _282 => _282.id]), () => ( idFor(g))),
|
|
9678
9685
|
type: "instance",
|
|
9679
9686
|
...meta,
|
|
9680
9687
|
symbolId,
|
|
@@ -9731,12 +9738,12 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9731
9738
|
const masked = (el, nodes2, m) => {
|
|
9732
9739
|
let out = nodes2;
|
|
9733
9740
|
const clipEl = rawMasks.get(_nullishCoalesce(urlId(attrOrStyle(el, "clip-path")), () => ( "")));
|
|
9734
|
-
if (_optionalChain([clipEl, 'optionalAccess',
|
|
9741
|
+
if (_optionalChain([clipEl, 'optionalAccess', _283 => _283.name]) === "clipPath") {
|
|
9735
9742
|
const source = maskNode(clipEl, m, out, clipEl.attrs.clipPathUnits);
|
|
9736
9743
|
if (source) out = [{ id: idFor({ name: "g", attrs: {}, children: [] }), type: "group", name: "Clip Group", mask: { type: "clip" }, children: [source, ...out] }];
|
|
9737
9744
|
}
|
|
9738
9745
|
const maskEl = rawMasks.get(_nullishCoalesce(urlId(attrOrStyle(el, "mask")), () => ( "")));
|
|
9739
|
-
if (_optionalChain([maskEl, 'optionalAccess',
|
|
9746
|
+
if (_optionalChain([maskEl, 'optionalAccess', _284 => _284.name]) === "mask") {
|
|
9740
9747
|
const source = maskNode(maskEl, m, out, maskEl.attrs.maskContentUnits);
|
|
9741
9748
|
const type = attrOrStyle(maskEl, "mask-type") === "alpha" ? "alpha" : "luminance";
|
|
9742
9749
|
if (source) out = [{ id: idFor({ name: "g", attrs: {}, children: [] }), type: "group", name: "Opacity Mask", mask: { type }, children: [source, ...out] }];
|
|
@@ -9758,19 +9765,19 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9758
9765
|
let sourceEl = part("mask-source");
|
|
9759
9766
|
if (!sourceEl) {
|
|
9760
9767
|
const el = rawMasks.get(_nullishCoalesce(urlId(maskedEl.attrs.mask), () => ( "")));
|
|
9761
|
-
const invert2 = _optionalChain([el, 'optionalAccess',
|
|
9768
|
+
const invert2 = _optionalChain([el, 'optionalAccess', _285 => _285.children, 'access', _286 => _286.find, 'call', _287 => _287((c) => c.name === "g" && c.attrs["data-vector-part"] === "mask-invert")]);
|
|
9762
9769
|
sourceEl = _nullishCoalesce(invert2, () => ( el));
|
|
9763
9770
|
}
|
|
9764
9771
|
const source = sourceEl ? visit2(sourceEl, style, m)[0] : void 0;
|
|
9765
9772
|
let contents = visit2(maskedEl, style, m);
|
|
9766
9773
|
let effects;
|
|
9767
9774
|
const wrapper = contents.length === 1 && contents[0].type === "group" && contents[0].id === `${id}~content` ? contents[0] : null;
|
|
9768
|
-
if (_optionalChain([wrapper, 'optionalAccess',
|
|
9775
|
+
if (_optionalChain([wrapper, 'optionalAccess', _288 => _288.type]) === "group") {
|
|
9769
9776
|
effects = _nullishCoalesce(wrapper.effects, () => ( void 0));
|
|
9770
9777
|
contents = wrapper.children;
|
|
9771
9778
|
}
|
|
9772
9779
|
if (!source) return contents.length ? { id, type: "group", ...meta, children: contents } : null;
|
|
9773
|
-
return { id, type: "group", ...meta, mask, ..._optionalChain([effects, 'optionalAccess',
|
|
9780
|
+
return { id, type: "group", ...meta, mask, ..._optionalChain([effects, 'optionalAccess', _289 => _289.length]) ? { effects } : {}, children: [source, ...contents] };
|
|
9774
9781
|
};
|
|
9775
9782
|
const frameGroup = (g, style, m, meta) => {
|
|
9776
9783
|
const raw = parseJson(g.attrs["data-vector-frame"]);
|
|
@@ -9782,7 +9789,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9782
9789
|
const { rigid, residual } = decomposeRigid(m);
|
|
9783
9790
|
const r = _chunkGF2RBSDMcjs.bezierPathBounds.call(void 0, _chunkGF2RBSDMcjs.transformBezierPath.call(void 0, subpathsToBezier(vectorFrameRectPath(frame)), residual));
|
|
9784
9791
|
const back = invertMatrix(rigid);
|
|
9785
|
-
const effects = sanitizeVectorEffects(_optionalChain([raw, 'optionalAccess',
|
|
9792
|
+
const effects = sanitizeVectorEffects(_optionalChain([raw, 'optionalAccess', _290 => _290.effects]));
|
|
9786
9793
|
return {
|
|
9787
9794
|
id,
|
|
9788
9795
|
type: "group",
|
|
@@ -10254,13 +10261,13 @@ function hitTestVectorNode(node, p, tolerance = 0, parent = IDENTITY_MATRIX, opt
|
|
|
10254
10261
|
}
|
|
10255
10262
|
if (isVectorMaskGroup(node)) {
|
|
10256
10263
|
const m = multiplyMatrices(nodeMatrix(node), parent);
|
|
10257
|
-
const entered = !!_optionalChain([options, 'access',
|
|
10264
|
+
const entered = !!_optionalChain([options, 'access', _291 => _291.entered, 'optionalAccess', _292 => _292.has, 'call', _293 => _293(node.id)]);
|
|
10258
10265
|
if (!entered && isVectorMaskActive(node) && !vectorMaskContains(node, applyMatrix(invertMatrix(m), p), tolerance)) return false;
|
|
10259
10266
|
const shown = !entered && hasOwnVectorAppearance(node) ? expandVectorAppearance(node).children : node.children;
|
|
10260
10267
|
for (let i = shown.length - 1; i >= 1; i--) if (hitTestVectorNode(shown[i], p, tolerance, m, options)) return true;
|
|
10261
10268
|
return entered && hitTestVectorMaskSource(node, p, tolerance, m, options);
|
|
10262
10269
|
}
|
|
10263
|
-
if (!(node.type === "group" && (!hasOwnVectorAppearance(node) || _optionalChain([options, 'access',
|
|
10270
|
+
if (!(node.type === "group" && (!hasOwnVectorAppearance(node) || _optionalChain([options, 'access', _294 => _294.entered, 'optionalAccess', _295 => _295.has, 'call', _296 => _296(node.id)])))) node = expandVectorAppearance(node);
|
|
10264
10271
|
if (node.type === "group") {
|
|
10265
10272
|
const m = multiplyMatrices(nodeMatrix(node), parent);
|
|
10266
10273
|
return node.children.some((c) => hitTestVectorNode(c, p, tolerance, m, options));
|
|
@@ -10272,7 +10279,7 @@ function hitTestVectorNode(node, p, tolerance = 0, parent = IDENTITY_MATRIX, opt
|
|
|
10272
10279
|
function hitTestVectorMaskSource(group, p, tolerance, m, options) {
|
|
10273
10280
|
const source = group.children[0];
|
|
10274
10281
|
if (source.visible === false) return false;
|
|
10275
|
-
if (_optionalChain([group, 'access',
|
|
10282
|
+
if (_optionalChain([group, 'access', _297 => _297.mask, 'optionalAccess', _298 => _298.type]) !== "clip") return hitTestVectorNode(source, p, tolerance, m, options);
|
|
10276
10283
|
const paths = collectPathNodes(source).filter((n) => n.visible !== false);
|
|
10277
10284
|
const pt2 = [p.x, p.y];
|
|
10278
10285
|
return paths.some((n) => {
|
|
@@ -10321,24 +10328,24 @@ function mapAnchor(a, m) {
|
|
|
10321
10328
|
}
|
|
10322
10329
|
function bakeIntoGeometry(node, m) {
|
|
10323
10330
|
if (isIdentityMatrix(m)) return node;
|
|
10324
|
-
if (_optionalChain([node, 'access',
|
|
10331
|
+
if (_optionalChain([node, 'access', _299 => _299.effects, 'optionalAccess', _300 => _300.length])) node = { ...node, effects: transformVectorEffects(node.effects, m, node) };
|
|
10325
10332
|
if (isVectorFrame(node)) return bakeFrame(node, m);
|
|
10326
10333
|
if (node.type === "group") {
|
|
10327
10334
|
const group = node;
|
|
10328
10335
|
const children = group.children.map((c) => transformVectorNode(c, m));
|
|
10329
10336
|
const sym2 = group.symmetry ? { symmetry: transformVectorSymmetry(group.symmetry, m) } : {};
|
|
10330
|
-
const spine = _optionalChain([group, 'access',
|
|
10337
|
+
const spine = _optionalChain([group, 'access', _301 => _301.blend, 'optionalAccess', _302 => _302.spine]);
|
|
10331
10338
|
if (!spine) return { ...group, ...sym2, children };
|
|
10332
10339
|
const moved = { closed: spine.closed, anchors: spine.anchors.map((a) => mapAnchor(a, m)) };
|
|
10333
10340
|
return { ...group, children, blend: { ...group.blend, spine: moved } };
|
|
10334
10341
|
}
|
|
10335
10342
|
const path = node.type === "text" ? bakeVectorTextGeometry(node, m) : node;
|
|
10336
10343
|
const flips = m[0] * m[3] - m[1] * m[2] < 0;
|
|
10337
|
-
const mirrored = flips && _optionalChain([path, 'access',
|
|
10344
|
+
const mirrored = flips && _optionalChain([path, 'access', _303 => _303.strokeWidthProfile, 'optionalAccess', _304 => _304.length]);
|
|
10338
10345
|
const layer = (l) => ({
|
|
10339
10346
|
...l,
|
|
10340
10347
|
...isVectorGradient(l.paint) || isVectorShadedPaint(l.paint) ? { paint: transformVectorPaint(l.paint, m) } : {},
|
|
10341
|
-
...flips && _optionalChain([l, 'access',
|
|
10348
|
+
...flips && _optionalChain([l, 'access', _305 => _305.strokeWidthProfile, 'optionalAccess', _306 => _306.length]) ? { strokeWidthProfile: mirrorWidthProfile(l.strokeWidthProfile) } : {}
|
|
10342
10349
|
});
|
|
10343
10350
|
return {
|
|
10344
10351
|
...path,
|
|
@@ -10573,7 +10580,7 @@ function roundSubpaths(subpaths, precision = 3) {
|
|
|
10573
10580
|
|
|
10574
10581
|
// src/vector/symmetry.ts
|
|
10575
10582
|
function isVectorSymmetryGroup(node) {
|
|
10576
|
-
return _optionalChain([node, 'optionalAccess',
|
|
10583
|
+
return _optionalChain([node, 'optionalAccess', _307 => _307.type]) === "group" && !!node.symmetry && !node.blend && !node.liveBoolean && !node.mask && !node.frame;
|
|
10577
10584
|
}
|
|
10578
10585
|
var rad = (deg) => deg * Math.PI / 180;
|
|
10579
10586
|
var exact = (v2) => Math.abs(v2) < 1e-12 ? 0 : v2;
|
|
@@ -11161,4 +11168,5 @@ function transformVectorSymmetry(s, m) {
|
|
|
11161
11168
|
|
|
11162
11169
|
|
|
11163
11170
|
|
|
11164
|
-
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.vectorBrushstrokeBrushOf = vectorBrushstrokeBrushOf; exports.vectorBrushstrokeBrushError = vectorBrushstrokeBrushError; exports.sanitizeVectorBrushstroke = sanitizeVectorBrushstroke; exports.VECTOR_BRUSHSTROKE_MAX_SEED = VECTOR_BRUSHSTROKE_MAX_SEED; exports.sanitizeVectorBrushstrokePaper = sanitizeVectorBrushstrokePaper; exports.vectorBrushstrokeCharacterError = vectorBrushstrokeCharacterError; exports.randomVectorBrushstrokeSeed = randomVectorBrushstrokeSeed; 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.transformTextRect = transformTextRect; exports.lineToTextSpace = lineToTextSpace; exports.layoutText = layoutText; exports.textIndexAt = textIndexAt; exports.caretAt = caretAt; exports.textSelectionQuads = textSelectionQuads; exports.textArrowStep = textArrowStep; exports.textLineMove = textLineMove; exports.textDecorations = textDecorations; exports.textRectPath = textRectPath; exports.textFragmentOutline = textFragmentOutline; exports.drawTextFragment = drawTextFragment; 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.vectorTextOrientation = vectorTextOrientation; 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;
|
|
11171
|
+
|
|
11172
|
+
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.vectorBrushstrokeBrushOf = vectorBrushstrokeBrushOf; exports.vectorBrushstrokeBrushError = vectorBrushstrokeBrushError; exports.vectorBrushstrokeDefaultColour = vectorBrushstrokeDefaultColour; exports.sanitizeVectorBrushstroke = sanitizeVectorBrushstroke; exports.VECTOR_BRUSHSTROKE_MAX_SEED = VECTOR_BRUSHSTROKE_MAX_SEED; exports.sanitizeVectorBrushstrokePaper = sanitizeVectorBrushstrokePaper; exports.vectorBrushstrokeCharacterError = vectorBrushstrokeCharacterError; exports.randomVectorBrushstrokeSeed = randomVectorBrushstrokeSeed; 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.transformTextRect = transformTextRect; exports.lineToTextSpace = lineToTextSpace; exports.layoutText = layoutText; exports.textIndexAt = textIndexAt; exports.caretAt = caretAt; exports.textSelectionQuads = textSelectionQuads; exports.textArrowStep = textArrowStep; exports.textLineMove = textLineMove; exports.textDecorations = textDecorations; exports.textRectPath = textRectPath; exports.textFragmentOutline = textFragmentOutline; exports.drawTextFragment = drawTextFragment; 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.vectorTextOrientation = vectorTextOrientation; 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;
|