@pixerate/editor 0.192.0 → 0.194.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animation-editor/index.cjs +56 -56
- package/dist/animation-editor/index.js +2 -2
- package/dist/{chunk-ZQGZWFPU.cjs → chunk-3T5VCDIV.cjs} +97 -5
- package/dist/{chunk-RQ2EM5TY.js → chunk-5OC22IEO.js} +97 -5
- package/dist/{chunk-EGZM52EO.cjs → chunk-BRKVNXDZ.cjs} +354 -125
- package/dist/{chunk-XCDGM7TD.cjs → chunk-FR2Q2LVF.cjs} +35 -35
- package/dist/{chunk-LPIKXPBM.js → chunk-GHCXLQ47.js} +262 -33
- package/dist/{chunk-VRXXAXUT.js → chunk-MLC7HUHO.js} +1 -1
- package/dist/{chunk-2UR4OX3B.cjs → chunk-UYXL6ZWQ.cjs} +114 -97
- package/dist/{chunk-TXYXF32N.js → chunk-ZIDUPSP4.js} +35 -18
- package/dist/image-editor/controller.d.cts +16 -6
- package/dist/image-editor/controller.d.ts +16 -6
- package/dist/image-editor/index.cjs +945 -831
- package/dist/image-editor/index.d.cts +1 -0
- package/dist/image-editor/index.d.ts +1 -0
- package/dist/image-editor/index.js +181 -67
- package/dist/image-editor/layers/model.d.cts +7 -2
- package/dist/image-editor/layers/model.d.ts +7 -2
- package/dist/image-editor/layers/serialize.d.cts +2 -0
- package/dist/image-editor/layers/serialize.d.ts +2 -0
- package/dist/image-editor/layers/shape-type-ui.d.cts +8 -2
- package/dist/image-editor/layers/shape-type-ui.d.ts +8 -2
- package/dist/image-editor/layers/text.d.cts +6 -2
- package/dist/image-editor/layers/text.d.ts +6 -2
- package/dist/image-editor/psd/type.d.cts +2 -1
- package/dist/image-editor/psd/type.d.ts +2 -1
- package/dist/image-editor/tool-groups.d.cts +35 -0
- package/dist/image-editor/tool-groups.d.ts +35 -0
- package/dist/image-editor/tools.d.cts +1 -1
- package/dist/image-editor/tools.d.ts +1 -1
- package/dist/image-editor/type-tools.d.cts +2 -2
- package/dist/image-editor/type-tools.d.ts +2 -2
- package/dist/paint-editor/index.cjs +7 -7
- package/dist/paint-editor/index.js +2 -2
- package/dist/text/layout.d.cts +93 -12
- package/dist/text/layout.d.ts +93 -12
- package/dist/text/opentype.d.cts +13 -3
- package/dist/text/opentype.d.ts +13 -3
- package/dist/text/shapers.d.cts +12 -0
- package/dist/text/shapers.d.ts +12 -0
- package/dist/text/types.d.cts +36 -2
- package/dist/text/types.d.ts +36 -2
- package/dist/vector/controller.d.cts +8 -0
- package/dist/vector/controller.d.ts +8 -0
- package/dist/vector/index.cjs +1039 -967
- package/dist/vector/index.js +90 -18
- package/dist/vector/text.d.cts +5 -3
- package/dist/vector/text.d.ts +5 -3
- package/dist/vector/textPanel.d.cts +6 -0
- package/dist/vector/textPanel.d.ts +6 -0
- package/dist/vector/types.d.cts +9 -0
- package/dist/vector/types.d.ts +9 -0
- package/package.json +1 -1
- package/skills/pixerate-image-editor/SKILL.md +4 -3
- package/skills/pixerate-image-editor/references/shapes-and-type.md +17 -5
- package/skills/pixerate-vector/SKILL.md +9 -3
|
@@ -4435,6 +4435,40 @@ var isBreakAfter = (c) => c === " " || c === " " || c === "-" || c === "\u2010"
|
|
|
4435
4435
|
var isTextSpace = (c) => c === " " || c === " ";
|
|
4436
4436
|
var isSpace = isTextSpace;
|
|
4437
4437
|
var isWide = (code) => code >= 11904 && code <= 40959 || code >= 44032 && code <= 55215 || code >= 63744 && code <= 64255 || code >= 65280 && code <= 65519;
|
|
4438
|
+
var isHigh = (code) => code >= 55296 && code <= 56319;
|
|
4439
|
+
var isLow = (code) => code >= 56320 && code <= 57343;
|
|
4440
|
+
var TR = /* @__PURE__ */ new Set([8229, 8230, 12296, 12297, 12298, 12299, 12300, 12301, 12302, 12303, 12304, 12305, 12308, 12309, 12310, 12311, 12312, 12313, 12314, 12315, 12316, 12336, 12448, 12540, 65288, 65289, 65293, 65306, 65307, 65309, 65339, 65341, 65343, 65371, 65372, 65373, 65374]);
|
|
4441
|
+
var TU = /* @__PURE__ */ new Set([12289, 12290, 65292, 65294, 12353, 12355, 12357, 12359, 12361, 12387, 12419, 12421, 12423, 12430, 12437, 12438, 12449, 12451, 12453, 12455, 12457, 12483, 12515, 12517, 12519, 12526, 12533, 12534]);
|
|
4442
|
+
var CORNER = /* @__PURE__ */ new Set([12289, 12290, 65292, 65294]);
|
|
4443
|
+
function verticalOrientationOf(cp) {
|
|
4444
|
+
if (TR.has(cp)) return "Tr";
|
|
4445
|
+
if (TU.has(cp) || cp >= 12784 && cp <= 12799) return "Tu";
|
|
4446
|
+
if (cp >= 4352 && cp <= 4607 || cp >= 11904 && cp <= 19903 || cp >= 19968 && cp <= 40959 || cp >= 40960 && cp <= 42191 || cp >= 43360 && cp <= 43391 || cp >= 44032 && cp <= 55295 || cp >= 63744 && cp <= 64255 || cp >= 65040 && cp <= 65055 || cp >= 65072 && cp <= 65103 || cp >= 65280 && cp <= 65376 || cp >= 65504 && cp <= 65511 || cp >= 126976 && cp <= 129791 || cp >= 131072 && cp <= 262143)
|
|
4447
|
+
return "U";
|
|
4448
|
+
return "R";
|
|
4449
|
+
}
|
|
4450
|
+
var applyMatrix2 = (m, x, y) => m ? { x: m[0] * x + m[2] * y + m[4], y: m[1] * x + m[3] * y + m[5] } : { x, y };
|
|
4451
|
+
function invertMatrix2(m) {
|
|
4452
|
+
const [a, b, c, d, e, f] = m;
|
|
4453
|
+
const det = a * d - b * c || 1;
|
|
4454
|
+
return [d / det, -b / det, -c / det, a / det, (c * f - d * e) / det, (b * e - a * f) / det];
|
|
4455
|
+
}
|
|
4456
|
+
function transformTextRect(m, r) {
|
|
4457
|
+
if (!m) return r;
|
|
4458
|
+
const pts = [applyMatrix2(m, r.x, r.y), applyMatrix2(m, r.x + r.width, r.y), applyMatrix2(m, r.x + r.width, r.y + r.height), applyMatrix2(m, r.x, r.y + r.height)];
|
|
4459
|
+
const x0 = Math.min(...pts.map((p) => p.x));
|
|
4460
|
+
const y0 = Math.min(...pts.map((p) => p.y));
|
|
4461
|
+
return { x: x0, y: y0, width: Math.max(...pts.map((p) => p.x)) - x0, height: Math.max(...pts.map((p) => p.y)) - y0 };
|
|
4462
|
+
}
|
|
4463
|
+
function lineToTextSpace(layout, p) {
|
|
4464
|
+
return applyMatrix2(layout.matrix, p.x, p.y);
|
|
4465
|
+
}
|
|
4466
|
+
function textToLineSpace(layout, p) {
|
|
4467
|
+
return layout.matrix ? applyMatrix2(invertMatrix2(layout.matrix), p.x, p.y) : { x: p.x, y: p.y };
|
|
4468
|
+
}
|
|
4469
|
+
function textLineRect(l) {
|
|
4470
|
+
return transformTextRect(l.matrix, { x: l.x, y: l.baseline - l.ascent, width: l.width, height: l.ascent + l.descent });
|
|
4471
|
+
}
|
|
4438
4472
|
var layoutCache = /* @__PURE__ */ new WeakMap();
|
|
4439
4473
|
function layoutText(layer, shaper) {
|
|
4440
4474
|
let byShaper = layoutCache.get(layer);
|
|
@@ -4450,6 +4484,7 @@ function layoutText(layer, shaper) {
|
|
|
4450
4484
|
}
|
|
4451
4485
|
function computeLayout(layer, shaper) {
|
|
4452
4486
|
const { text, frame } = layer;
|
|
4487
|
+
const vertical = layer.orientation === "vertical";
|
|
4453
4488
|
const runs = fitRuns(layer.runs, text.length, DEFAULT_TEXT_STYLE);
|
|
4454
4489
|
const missing = /* @__PURE__ */ new Set();
|
|
4455
4490
|
const resolved = /* @__PURE__ */ new Map();
|
|
@@ -4465,7 +4500,15 @@ function computeLayout(layer, shaper) {
|
|
|
4465
4500
|
return fam;
|
|
4466
4501
|
};
|
|
4467
4502
|
const resolvedFont = (style) => ({ ...fontOf(style), family: familyOf(fontOf(style)) });
|
|
4503
|
+
const verticalOf = (ch, style) => {
|
|
4504
|
+
const font = resolvedFont(style);
|
|
4505
|
+
if (shaper.vertical) return shaper.vertical(ch, font);
|
|
4506
|
+
const m = shaper.metrics(font);
|
|
4507
|
+
return { advance: m.ascent + m.descent, originY: m.ascent, alternate: false };
|
|
4508
|
+
};
|
|
4468
4509
|
const box = frame.kind === "box" ? frame : null;
|
|
4510
|
+
const inlineSize = box ? vertical ? box.height : box.width : 0;
|
|
4511
|
+
const matrix = vertical ? [0, 1, -1, 0, box ? box.width : 0, 0] : void 0;
|
|
4469
4512
|
const lines = [];
|
|
4470
4513
|
let y = 0;
|
|
4471
4514
|
let first = true;
|
|
@@ -4483,7 +4526,38 @@ function computeLayout(layer, shaper) {
|
|
|
4483
4526
|
const seg = text.slice(i, j);
|
|
4484
4527
|
const carets = shaper.measure(seg, resolvedFont(style));
|
|
4485
4528
|
const track = (_nullishCoalesce(style.tracking, () => ( 0))) / 1e3 * style.fontSize;
|
|
4486
|
-
for (let k = 0; k < seg.length; k++)
|
|
4529
|
+
for (let k = 0; k < seg.length; k++) {
|
|
4530
|
+
const index = i + k;
|
|
4531
|
+
const advance = (_nullishCoalesce(carets[k + 1], () => ( 0))) - (_nullishCoalesce(carets[k], () => ( 0)));
|
|
4532
|
+
if (!vertical) {
|
|
4533
|
+
chars.push({ index, ch: seg[k], advance: advance + track, style });
|
|
4534
|
+
continue;
|
|
4535
|
+
}
|
|
4536
|
+
const code = seg.charCodeAt(k);
|
|
4537
|
+
if (isLow(code) && index > 0 && isHigh(text.charCodeAt(index - 1))) {
|
|
4538
|
+
const prev = chars[chars.length - 1];
|
|
4539
|
+
if (_optionalChain([prev, 'optionalAccess', _101 => _101.up])) {
|
|
4540
|
+
chars.push({ index, ch: seg[k], advance: 0, style, up: prev.up, low: true });
|
|
4541
|
+
} else chars.push({ index, ch: seg[k], advance, style, low: true });
|
|
4542
|
+
continue;
|
|
4543
|
+
}
|
|
4544
|
+
const cp = _nullishCoalesce(text.codePointAt(index), () => ( code));
|
|
4545
|
+
const kind = verticalOrientationOf(cp);
|
|
4546
|
+
let upright = kind === "U" || kind === "Tu" || kind === "R" && Boolean(style.upright) && !isSpace(seg[k]) && seg[k] !== "\n";
|
|
4547
|
+
let vm = null;
|
|
4548
|
+
const char = cp > 65535 ? text.slice(index, index + 2) : seg[k];
|
|
4549
|
+
if (upright || kind === "Tr") {
|
|
4550
|
+
vm = verticalOf(char, style);
|
|
4551
|
+
if (kind === "Tr") upright = vm.alternate;
|
|
4552
|
+
}
|
|
4553
|
+
if (!upright || !vm) {
|
|
4554
|
+
chars.push({ index, ch: seg[k], advance: advance + track, style });
|
|
4555
|
+
continue;
|
|
4556
|
+
}
|
|
4557
|
+
const corner = kind === "Tu" && !vm.alternate && CORNER.has(cp) ? style.fontSize * 0.55 : 0;
|
|
4558
|
+
const alone = shaper.measure(char, resolvedFont(style));
|
|
4559
|
+
chars.push({ index, ch: seg[k], advance: vm.advance + track, style, up: { width: _nullishCoalesce(alone[alone.length - 1], () => ( advance)), originY: vm.originY, vert: vm.alternate, dx: corner, dy: -corner } });
|
|
4560
|
+
}
|
|
4487
4561
|
i = j;
|
|
4488
4562
|
}
|
|
4489
4563
|
const startIndent = _nullishCoalesce(pstyle.startIndent, () => ( 0));
|
|
@@ -4494,13 +4568,13 @@ function computeLayout(layer, shaper) {
|
|
|
4494
4568
|
else {
|
|
4495
4569
|
let s = 0;
|
|
4496
4570
|
while (s < chars.length) {
|
|
4497
|
-
const avail =
|
|
4571
|
+
const avail = inlineSize - startIndent - endIndent - (breaks.length === 0 ? firstIndent : 0);
|
|
4498
4572
|
let w = 0;
|
|
4499
4573
|
let e = s;
|
|
4500
4574
|
let lastBreak = -1;
|
|
4501
4575
|
while (e < chars.length) {
|
|
4502
4576
|
const c = chars[e];
|
|
4503
|
-
if (!isSpace(c.ch) && w + c.advance > avail && e > s) break;
|
|
4577
|
+
if (!isSpace(c.ch) && w + c.advance > avail && e > s && !c.low) break;
|
|
4504
4578
|
w += c.advance;
|
|
4505
4579
|
if (isBreakAfter(c.ch) || isWide(c.ch.charCodeAt(0)) || e + 1 < chars.length && isWide(chars[e + 1].ch.charCodeAt(0))) lastBreak = e + 1;
|
|
4506
4580
|
e++;
|
|
@@ -4521,9 +4595,14 @@ function computeLayout(layer, shaper) {
|
|
|
4521
4595
|
let descent = 0;
|
|
4522
4596
|
let leading = 0;
|
|
4523
4597
|
for (const st of styles) {
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4598
|
+
if (vertical) {
|
|
4599
|
+
ascent = Math.max(ascent, st.fontSize / 2);
|
|
4600
|
+
descent = ascent;
|
|
4601
|
+
} else {
|
|
4602
|
+
const m = shaper.metrics(resolvedFont(st));
|
|
4603
|
+
ascent = Math.max(ascent, m.ascent);
|
|
4604
|
+
descent = Math.max(descent, m.descent);
|
|
4605
|
+
}
|
|
4527
4606
|
leading = Math.max(leading, _nullishCoalesce(st.leading, () => ( autoLeading * st.fontSize)));
|
|
4528
4607
|
}
|
|
4529
4608
|
if (first) {
|
|
@@ -4537,13 +4616,13 @@ function computeLayout(layer, shaper) {
|
|
|
4537
4616
|
let extraPerSpace = 0;
|
|
4538
4617
|
if (box && align === "justify" && !lastLine) {
|
|
4539
4618
|
const spaces = lineChars.slice(0, visibleEnd).filter((c) => isSpace(c.ch)).length;
|
|
4540
|
-
const avail =
|
|
4619
|
+
const avail = inlineSize - startIndent - endIndent - (li === 0 ? firstIndent : 0);
|
|
4541
4620
|
if (spaces > 0 && avail > width) extraPerSpace = (avail - width) / spaces;
|
|
4542
4621
|
}
|
|
4543
4622
|
let x0;
|
|
4544
4623
|
const fullWidth = width + extraPerSpace * lineChars.slice(0, visibleEnd).filter((c) => isSpace(c.ch)).length;
|
|
4545
4624
|
if (box) {
|
|
4546
|
-
const avail =
|
|
4625
|
+
const avail = inlineSize - startIndent - endIndent - (li === 0 ? firstIndent : 0);
|
|
4547
4626
|
x0 = indent + (align === "center" ? (avail - fullWidth) / 2 : align === "right" ? avail - fullWidth : 0);
|
|
4548
4627
|
} else x0 = indent + (align === "center" ? -fullWidth / 2 : align === "right" ? -fullWidth : 0);
|
|
4549
4628
|
const laid = [];
|
|
@@ -4557,27 +4636,57 @@ function computeLayout(layer, shaper) {
|
|
|
4557
4636
|
let k = 0;
|
|
4558
4637
|
while (k < lineChars.length) {
|
|
4559
4638
|
const st = lineChars[k].style;
|
|
4639
|
+
const up = Boolean(lineChars[k].up);
|
|
4560
4640
|
let m = k + 1;
|
|
4561
|
-
while (m < lineChars.length && lineChars[m].style === st) m++;
|
|
4641
|
+
while (m < lineChars.length && lineChars[m].style === st && Boolean(lineChars[m].up) === up) m++;
|
|
4562
4642
|
const font = resolvedFont(st);
|
|
4563
4643
|
const fx = laid[k].x;
|
|
4564
4644
|
const carets = [0];
|
|
4565
4645
|
for (let q = k; q < m; q++) carets.push(laid[q].x + laid[q].advance - fx);
|
|
4566
|
-
|
|
4646
|
+
const shift = _nullishCoalesce(st.baselineShift, () => ( 0));
|
|
4647
|
+
let fy = y - shift;
|
|
4648
|
+
if (vertical && !up) {
|
|
4649
|
+
const hm = shaper.metrics(font);
|
|
4650
|
+
fy = y + (hm.ascent - hm.descent) / 2 - shift;
|
|
4651
|
+
}
|
|
4652
|
+
const fragment = {
|
|
4567
4653
|
start: lineChars[k].index,
|
|
4568
4654
|
end: lineChars[m - 1].index + 1,
|
|
4569
4655
|
style: st,
|
|
4570
4656
|
font,
|
|
4571
4657
|
family: font.family,
|
|
4572
4658
|
x: fx,
|
|
4573
|
-
y:
|
|
4659
|
+
y: fy,
|
|
4574
4660
|
carets,
|
|
4575
|
-
spaced: Boolean(st.tracking) || extraPerSpace > 0
|
|
4576
|
-
}
|
|
4661
|
+
spaced: Boolean(st.tracking) || extraPerSpace > 0 || up
|
|
4662
|
+
};
|
|
4663
|
+
if (vertical) {
|
|
4664
|
+
const glyphs = [];
|
|
4665
|
+
for (let q = k; q < m; q++) {
|
|
4666
|
+
const c = lineChars[q];
|
|
4667
|
+
const lc = laid[q];
|
|
4668
|
+
if (c.low && q > k) {
|
|
4669
|
+
const g = glyphs[glyphs.length - 1];
|
|
4670
|
+
g.length = 2;
|
|
4671
|
+
if (!up) g.advance += lc.advance;
|
|
4672
|
+
continue;
|
|
4673
|
+
}
|
|
4674
|
+
const p = applyMatrix2(matrix, lc.x, fy);
|
|
4675
|
+
if (c.up) {
|
|
4676
|
+
const u = c.up;
|
|
4677
|
+
glyphs.push({ index: c.index, length: 1, x: p.x - u.width / 2 + u.dx, y: p.y + u.originY + u.dy, angle: 0, advance: u.width, ascent: u.originY + u.dy, descent: lc.advance - u.originY - u.dy, vert: u.vert });
|
|
4678
|
+
} else glyphs.push({ index: c.index, length: 1, x: p.x, y: p.y, angle: 90, advance: lc.advance, ascent: fy - (y - ascent), descent: y + descent - fy, vert: false });
|
|
4679
|
+
}
|
|
4680
|
+
fragment.upright = up;
|
|
4681
|
+
fragment.glyphs = glyphs;
|
|
4682
|
+
}
|
|
4683
|
+
fragments.push(fragment);
|
|
4577
4684
|
k = m;
|
|
4578
4685
|
}
|
|
4579
4686
|
const lineStart = lineChars.length ? lineChars[0].index : para.start;
|
|
4580
|
-
|
|
4687
|
+
const line = { start: lineStart, end: lineChars.length ? lineChars[lineChars.length - 1].index + 1 : para.start, baseline: y, ascent, descent, x: x0, width, chars: laid, fragments };
|
|
4688
|
+
if (matrix) line.matrix = matrix;
|
|
4689
|
+
lines.push(line);
|
|
4581
4690
|
});
|
|
4582
4691
|
y += _nullishCoalesce(pstyle.spaceAfter, () => ( 0));
|
|
4583
4692
|
});
|
|
@@ -4594,12 +4703,15 @@ function computeLayout(layer, shaper) {
|
|
|
4594
4703
|
const top = lines.length ? lines[0].baseline - lines[0].ascent : 0;
|
|
4595
4704
|
const last = lines[lines.length - 1];
|
|
4596
4705
|
const bottom = last ? last.baseline + last.descent : 0;
|
|
4597
|
-
bounds = { x: x0, y: top, width: Math.max(0, x1 - x0), height: Math.max(0, bottom - top) };
|
|
4706
|
+
bounds = transformTextRect(matrix, { x: x0, y: top, width: Math.max(0, x1 - x0), height: Math.max(0, bottom - top) });
|
|
4598
4707
|
}
|
|
4599
|
-
|
|
4708
|
+
const out = { lines, bounds, missingFonts: [...missing], orientation: vertical ? "vertical" : "horizontal" };
|
|
4709
|
+
if (matrix) out.matrix = matrix;
|
|
4710
|
+
return out;
|
|
4600
4711
|
}
|
|
4601
|
-
function textIndexAt(layout,
|
|
4712
|
+
function textIndexAt(layout, point) {
|
|
4602
4713
|
if (!layout.lines.length) return 0;
|
|
4714
|
+
const p = textToLineSpace(layout, point);
|
|
4603
4715
|
let line = layout.lines[layout.lines.length - 1];
|
|
4604
4716
|
for (const l of layout.lines) {
|
|
4605
4717
|
if (p.y <= l.baseline + l.descent) {
|
|
@@ -4614,23 +4726,60 @@ function textIndexAt(layout, p) {
|
|
|
4614
4726
|
}
|
|
4615
4727
|
function caretAt(layout, index) {
|
|
4616
4728
|
const lines = layout.lines;
|
|
4617
|
-
|
|
4729
|
+
const caret = (x, l2, line) => {
|
|
4730
|
+
const top = l2.baseline - l2.ascent;
|
|
4731
|
+
const bottom = l2.baseline + l2.descent;
|
|
4732
|
+
return { x, top, bottom, line, from: applyMatrix2(l2.matrix, x, top), to: applyMatrix2(l2.matrix, x, bottom) };
|
|
4733
|
+
};
|
|
4734
|
+
if (!lines.length) return { x: 0, top: 0, bottom: 0, line: 0, from: { x: 0, y: 0 }, to: { x: 0, y: 0 } };
|
|
4618
4735
|
for (let li = 0; li < lines.length; li++) {
|
|
4619
4736
|
const l2 = lines[li];
|
|
4620
4737
|
const next = lines[li + 1];
|
|
4621
4738
|
if (next && index >= next.start && (next.chars.length || index > l2.end || next.start > l2.end)) continue;
|
|
4622
4739
|
const c = l2.chars.find((ch) => ch.index === index);
|
|
4623
4740
|
const prev = l2.chars.find((ch) => ch.index === index - 1);
|
|
4624
|
-
|
|
4625
|
-
return { x, top: l2.baseline - l2.ascent, bottom: l2.baseline + l2.descent, line: li };
|
|
4741
|
+
return caret(c ? c.x : prev ? prev.x + prev.advance : l2.x, l2, li);
|
|
4626
4742
|
}
|
|
4627
4743
|
const l = lines[lines.length - 1];
|
|
4628
|
-
return
|
|
4744
|
+
return caret(l.x + l.width, l, lines.length - 1);
|
|
4745
|
+
}
|
|
4746
|
+
function textSelectionQuads(layout, start, end) {
|
|
4747
|
+
const out = [];
|
|
4748
|
+
if (end <= start) return out;
|
|
4749
|
+
for (const l of layout.lines) {
|
|
4750
|
+
const chars = l.chars.filter((c) => c.index >= start && c.index < end);
|
|
4751
|
+
if (!chars.length) continue;
|
|
4752
|
+
const x0 = chars[0].x;
|
|
4753
|
+
const x1 = chars[chars.length - 1].x + chars[chars.length - 1].advance;
|
|
4754
|
+
const top = l.baseline - l.ascent;
|
|
4755
|
+
const bottom = l.baseline + l.descent;
|
|
4756
|
+
out.push([applyMatrix2(l.matrix, x0, top), applyMatrix2(l.matrix, x1, top), applyMatrix2(l.matrix, x1, bottom), applyMatrix2(l.matrix, x0, bottom)]);
|
|
4757
|
+
}
|
|
4758
|
+
return out;
|
|
4759
|
+
}
|
|
4760
|
+
function textArrowStep(orientation, key) {
|
|
4761
|
+
if (orientation === "vertical") return key === "ArrowUp" ? "previous" : key === "ArrowDown" ? "next" : key === "ArrowRight" ? "line-before" : "line-after";
|
|
4762
|
+
return key === "ArrowLeft" ? "previous" : key === "ArrowRight" ? "next" : key === "ArrowUp" ? "line-before" : "line-after";
|
|
4763
|
+
}
|
|
4764
|
+
function textLineMove(layout, index, dir, length2) {
|
|
4765
|
+
if (!layout.lines.length) return dir < 0 ? 0 : length2;
|
|
4766
|
+
const c = caretAt(layout, index);
|
|
4767
|
+
const target = layout.lines[c.line + dir];
|
|
4768
|
+
if (!target) return dir < 0 ? 0 : length2;
|
|
4769
|
+
const hit = target.chars.find((ch) => c.x < ch.x + ch.advance / 2);
|
|
4770
|
+
const last = target.chars[target.chars.length - 1];
|
|
4771
|
+
return hit ? hit.index : last ? last.index + 1 : target.start;
|
|
4629
4772
|
}
|
|
4630
4773
|
function textDecorations(f, l) {
|
|
4631
4774
|
const out = [];
|
|
4632
4775
|
const t = Math.max(1, f.style.fontSize / 15);
|
|
4633
4776
|
const w = f.carets[f.carets.length - 1];
|
|
4777
|
+
if (l.matrix) {
|
|
4778
|
+
const centre = l.baseline - (_nullishCoalesce(f.style.baselineShift, () => ( 0)));
|
|
4779
|
+
if (f.style.underline) out.push(transformTextRect(l.matrix, { x: f.x, y: centre - l.ascent, width: w, height: t }));
|
|
4780
|
+
if (f.style.strikethrough) out.push(transformTextRect(l.matrix, { x: f.x, y: centre - t / 2, width: w, height: t }));
|
|
4781
|
+
return out;
|
|
4782
|
+
}
|
|
4634
4783
|
if (f.style.underline) out.push({ x: f.x, y: f.y + Math.max(t, l.descent * 0.35), width: w, height: t });
|
|
4635
4784
|
if (f.style.strikethrough) out.push({ x: f.x, y: f.y - l.ascent * 0.3 - t / 2, width: w, height: t });
|
|
4636
4785
|
return out;
|
|
@@ -4642,7 +4791,25 @@ var textRectPath = (r) => [
|
|
|
4642
4791
|
{ type: "L", x: r.x, y: r.y + r.height },
|
|
4643
4792
|
{ type: "Z" }
|
|
4644
4793
|
];
|
|
4794
|
+
function turnPath(path, x, y) {
|
|
4795
|
+
return path.map((c) => {
|
|
4796
|
+
if (c.type === "Z") return c;
|
|
4797
|
+
if (c.type === "M" || c.type === "L") return { type: c.type, x: x - c.y, y: y + c.x };
|
|
4798
|
+
if (c.type === "Q") return { type: "Q", x1: x - c.y1, y1: y + c.x1, x: x - c.y, y: y + c.x };
|
|
4799
|
+
return { type: "C", x1: x - c.y1, y1: y + c.x1, x2: x - c.y2, y2: y + c.x2, x: x - c.y, y: y + c.x };
|
|
4800
|
+
});
|
|
4801
|
+
}
|
|
4645
4802
|
function textFragmentOutline(shaper, text, f) {
|
|
4803
|
+
if (f.glyphs) {
|
|
4804
|
+
const out2 = [];
|
|
4805
|
+
for (const g of f.glyphs) {
|
|
4806
|
+
const ch = text.slice(g.index, g.index + g.length);
|
|
4807
|
+
if (isSpace(ch)) continue;
|
|
4808
|
+
const opts = g.vert ? { vertical: true } : void 0;
|
|
4809
|
+
out2.push(...g.angle ? turnPath(shaper.outline(ch, f.font, 0, 0, opts), g.x, g.y) : shaper.outline(ch, f.font, g.x, g.y, opts));
|
|
4810
|
+
}
|
|
4811
|
+
return out2;
|
|
4812
|
+
}
|
|
4646
4813
|
const s = text.slice(f.start, f.end);
|
|
4647
4814
|
if (!f.spaced) return shaper.outline(s, f.font, f.x, f.y);
|
|
4648
4815
|
const out = [];
|
|
@@ -4652,6 +4819,28 @@ function textFragmentOutline(shaper, text, f) {
|
|
|
4652
4819
|
}
|
|
4653
4820
|
return out;
|
|
4654
4821
|
}
|
|
4822
|
+
function drawTextFragment(ctx, shaper, text, f) {
|
|
4823
|
+
if (f.glyphs) {
|
|
4824
|
+
for (const g of f.glyphs) {
|
|
4825
|
+
const ch = text.slice(g.index, g.index + g.length);
|
|
4826
|
+
if (isSpace(ch)) continue;
|
|
4827
|
+
const opts = g.vert ? { vertical: true } : void 0;
|
|
4828
|
+
if (!g.angle) {
|
|
4829
|
+
shaper.draw(ctx, ch, f.font, g.x, g.y, opts);
|
|
4830
|
+
continue;
|
|
4831
|
+
}
|
|
4832
|
+
ctx.save();
|
|
4833
|
+
ctx.translate(g.x, g.y);
|
|
4834
|
+
ctx.rotate(Math.PI / 2);
|
|
4835
|
+
shaper.draw(ctx, ch, f.font, 0, 0, opts);
|
|
4836
|
+
ctx.restore();
|
|
4837
|
+
}
|
|
4838
|
+
return;
|
|
4839
|
+
}
|
|
4840
|
+
const s = text.slice(f.start, f.end);
|
|
4841
|
+
if (!f.spaced) shaper.draw(ctx, s, f.font, f.x, f.y);
|
|
4842
|
+
else for (let k = 0; k < s.length; k++) if (!isSpace(s[k])) shaper.draw(ctx, s[k], f.font, f.x + f.carets[k], f.y);
|
|
4843
|
+
}
|
|
4655
4844
|
|
|
4656
4845
|
// src/text/shapers.ts
|
|
4657
4846
|
var GENERIC = /* @__PURE__ */ new Set(["serif", "sans-serif", "monospace", "cursive", "fantasy", "system-ui", "ui-serif", "ui-sans-serif", "ui-monospace", "ui-rounded", "math", "emoji", "fangsong"]);
|
|
@@ -4675,7 +4864,7 @@ function createCanvasTextShaper(options = {}) {
|
|
|
4675
4864
|
return null;
|
|
4676
4865
|
})));
|
|
4677
4866
|
const canvas = make(1, 1);
|
|
4678
|
-
const ctx = _optionalChain([canvas, 'optionalAccess',
|
|
4867
|
+
const ctx = _optionalChain([canvas, 'optionalAccess', _102 => _102.getContext, 'call', _103 => _103("2d")]);
|
|
4679
4868
|
if (!ctx || typeof ctx.measureText !== "function") return null;
|
|
4680
4869
|
const fallback = _nullishCoalesce(options.fallbackFamily, () => ( "sans-serif"));
|
|
4681
4870
|
const available = /* @__PURE__ */ new Map();
|
|
@@ -4748,10 +4937,10 @@ function createOutlineTextShaper(fonts, options = {}) {
|
|
|
4748
4937
|
const entries = fonts.map((f) => {
|
|
4749
4938
|
const e = "face" in f ? f : { face: f };
|
|
4750
4939
|
const names = e.face.names;
|
|
4751
|
-
const family = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(e.family, () => ( _optionalChain([names, 'optionalAccess',
|
|
4752
|
-
const weight = _nullishCoalesce(_nullishCoalesce(e.weight, () => ( _optionalChain([e, 'access',
|
|
4753
|
-
const italic = _nullishCoalesce(e.italic, () => ( Boolean((_nullishCoalesce(_optionalChain([e, 'access',
|
|
4754
|
-
const postScript = _nullishCoalesce(_optionalChain([names, 'optionalAccess',
|
|
4940
|
+
const family = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(e.family, () => ( _optionalChain([names, 'optionalAccess', _104 => _104.fontFamily, 'optionalAccess', _105 => _105.en]))), () => ( Object.values(_nullishCoalesce(_optionalChain([names, 'optionalAccess', _106 => _106.fontFamily]), () => ( {})))[0])), () => ( "Font"));
|
|
4941
|
+
const weight = _nullishCoalesce(_nullishCoalesce(e.weight, () => ( _optionalChain([e, 'access', _107 => _107.face, 'access', _108 => _108.tables, 'optionalAccess', _109 => _109.os2, 'optionalAccess', _110 => _110.usWeightClass]))), () => ( 400));
|
|
4942
|
+
const italic = _nullishCoalesce(e.italic, () => ( Boolean((_nullishCoalesce(_optionalChain([e, 'access', _111 => _111.face, 'access', _112 => _112.tables, 'optionalAccess', _113 => _113.os2, 'optionalAccess', _114 => _114.fsSelection]), () => ( 0))) & 1)));
|
|
4943
|
+
const postScript = _nullishCoalesce(_optionalChain([names, 'optionalAccess', _115 => _115.postScriptName, 'optionalAccess', _116 => _116.en]), () => ( Object.values(_nullishCoalesce(_optionalChain([names, 'optionalAccess', _117 => _117.postScriptName]), () => ( {})))[0]));
|
|
4755
4944
|
return { face: e.face, family, key: family.toLowerCase(), weight, italic, postScript };
|
|
4756
4945
|
});
|
|
4757
4946
|
const fallbackKey = (_nullishCoalesce(options.fallback, () => ( entries[0].family))).toLowerCase();
|
|
@@ -4797,8 +4986,15 @@ function createOutlineTextShaper(fonts, options = {}) {
|
|
|
4797
4986
|
for (let i = 1; i <= text.length; i++) out.push(face.getAdvanceWidth(text.slice(0, i), font.size, { kerning: true }));
|
|
4798
4987
|
return out;
|
|
4799
4988
|
},
|
|
4800
|
-
outline(text, font, x, y) {
|
|
4801
|
-
return toPath(pick(font).entry.face.getPath(text, x, y, font.size, { kerning: true }).commands);
|
|
4989
|
+
outline(text, font, x, y, opts) {
|
|
4990
|
+
return toPath(pick(font).entry.face.getPath(text, x, y, font.size, _optionalChain([opts, 'optionalAccess', _118 => _118.vertical]) ? { kerning: true, vertical: true } : { kerning: true }).commands);
|
|
4991
|
+
},
|
|
4992
|
+
vertical(char, font) {
|
|
4993
|
+
const { face } = pick(font).entry;
|
|
4994
|
+
const k = font.size / face.unitsPerEm;
|
|
4995
|
+
const v2 = _optionalChain([face, 'access', _119 => _119.getVerticalMetrics, 'optionalCall', _120 => _120(char)]);
|
|
4996
|
+
if (v2) return { advance: v2.advance * k, originY: v2.originY * k, alternate: v2.alternate };
|
|
4997
|
+
return { advance: (face.ascender - face.descender) * k, originY: face.ascender * k, alternate: false };
|
|
4802
4998
|
},
|
|
4803
4999
|
families() {
|
|
4804
5000
|
return [...new Set(entries.map((e) => e.family))];
|
|
@@ -4857,10 +5053,10 @@ function vectorTextHasOutlines() {
|
|
|
4857
5053
|
return typeof getVectorTextShaper().outline === "function";
|
|
4858
5054
|
}
|
|
4859
5055
|
function vectorTextFamilies() {
|
|
4860
|
-
return _nullishCoalesce(_optionalChain([getVectorTextShaper, 'call',
|
|
5056
|
+
return _nullishCoalesce(_optionalChain([getVectorTextShaper, 'call', _121 => _121(), 'access', _122 => _122.families, 'optionalCall', _123 => _123()]), () => ( ["sans-serif", "serif", "monospace"]));
|
|
4861
5057
|
}
|
|
4862
5058
|
var DEFAULT_VECTOR_FONT = { fontFamily: "sans-serif", fontWeight: 400, fontSize: 24 };
|
|
4863
|
-
var VECTOR_CHARACTER_STYLE_KEYS = ["fontFamily", "fontWeight", "italic", "fontSize", "tracking", "leading", "baselineShift", "underline", "strikethrough"];
|
|
5059
|
+
var VECTOR_CHARACTER_STYLE_KEYS = ["fontFamily", "fontWeight", "italic", "fontSize", "tracking", "leading", "baselineShift", "underline", "strikethrough", "upright"];
|
|
4864
5060
|
var VECTOR_PARAGRAPH_STYLE_KEYS = ["align", "autoLeading", "firstLineIndent", "startIndent", "endIndent", "spaceBefore", "spaceAfter"];
|
|
4865
5061
|
var VectorTextError = class extends Error {
|
|
4866
5062
|
};
|
|
@@ -5005,7 +5201,8 @@ function textBlock(node) {
|
|
|
5005
5201
|
return { length: r.end - r.start, style: { ...r.style, color: `#${i}` } };
|
|
5006
5202
|
}),
|
|
5007
5203
|
paragraphs: [{ length: text.length, style: { ..._nullishCoalesce(node.paragraph, () => ( {})), ...node.frame.kind === "path" ? { align: "left" } : {} } }],
|
|
5008
|
-
frame: node.frame.kind === "area" ? { kind: "box", width: Math.max(0, node.frame.width), height: Math.max(0, node.frame.height) } : { kind: "point" }
|
|
5204
|
+
frame: node.frame.kind === "area" ? { kind: "box", width: Math.max(0, node.frame.width), height: Math.max(0, node.frame.height) } : { kind: "point" },
|
|
5205
|
+
...node.orientation === "vertical" && node.frame.kind !== "path" ? { orientation: "vertical" } : {}
|
|
5009
5206
|
};
|
|
5010
5207
|
}
|
|
5011
5208
|
var charAt = (text, i) => {
|
|
@@ -5032,20 +5229,28 @@ function computeLayout2(node, shaper) {
|
|
|
5032
5229
|
const fragments = [];
|
|
5033
5230
|
const lines = [];
|
|
5034
5231
|
let overflow = false;
|
|
5035
|
-
const fillOf = (f) => _optionalChain([runs, 'access',
|
|
5232
|
+
const fillOf = (f) => _optionalChain([runs, 'access', _124 => _124.find, 'call', _125 => _125((r) => f.start >= r.start && f.start < r.end), 'optionalAccess', _126 => _126.fill]);
|
|
5036
5233
|
const styleOf = (f) => {
|
|
5037
5234
|
const { color: _c, opacity: _o, postScriptName: _p, ...style } = f.style;
|
|
5038
5235
|
return style;
|
|
5039
5236
|
};
|
|
5040
5237
|
if (frame.kind !== "path") {
|
|
5041
5238
|
text.lines.forEach((l, li) => {
|
|
5042
|
-
if (frame.kind === "area" && li > 0 && l.baseline + l.descent > frame.height + 1e-6) {
|
|
5239
|
+
if (frame.kind === "area" && li > 0 && l.baseline + l.descent > (l.matrix ? frame.width : frame.height) + 1e-6) {
|
|
5043
5240
|
overflow = true;
|
|
5044
5241
|
return;
|
|
5045
5242
|
}
|
|
5046
|
-
|
|
5243
|
+
if (l.matrix) {
|
|
5244
|
+
const top = lineToTextSpace(text, { x: l.x, y: l.baseline });
|
|
5245
|
+
lines.push({ start: l.start, end: l.end, baseline: origin.x + top.x, x: origin.y + top.y, width: l.width });
|
|
5246
|
+
} else lines.push({ start: l.start, end: l.end, baseline: origin.y + l.baseline, x: origin.x + l.x, width: l.width });
|
|
5047
5247
|
for (const f of l.fragments) {
|
|
5048
5248
|
const from = glyphs.length;
|
|
5249
|
+
if (f.glyphs) {
|
|
5250
|
+
for (const g of f.glyphs) glyphs.push({ index: g.index, char: block.text.slice(g.index, g.index + g.length), x: origin.x + g.x, y: origin.y + g.y, angle: g.angle, advance: g.advance, ascent: g.ascent, descent: g.descent, fragment: fragments.length });
|
|
5251
|
+
fragments.push({ style: styleOf(f), font: f.font, ...fillOf(f) !== void 0 ? { fill: fillOf(f) } : {}, from, to: glyphs.length, line: lines.length - 1, laid: { fragment: f, line: l } });
|
|
5252
|
+
continue;
|
|
5253
|
+
}
|
|
5049
5254
|
for (let k = 0; k < f.end - f.start; k++) {
|
|
5050
5255
|
const index = f.start + k;
|
|
5051
5256
|
const ch = block.text[index];
|
|
@@ -5063,11 +5268,11 @@ function computeLayout2(node, shaper) {
|
|
|
5063
5268
|
} else {
|
|
5064
5269
|
const line = text.lines[0];
|
|
5065
5270
|
const measure = measureVectorPath(subpathPath(frame.path), !!frame.flip);
|
|
5066
|
-
const align = _nullishCoalesce(_optionalChain([node, 'access',
|
|
5271
|
+
const align = _nullishCoalesce(_optionalChain([node, 'access', _127 => _127.paragraph, 'optionalAccess', _128 => _128.align]), () => ( "left"));
|
|
5067
5272
|
const start = Math.max(0, _nullishCoalesce(frame.start, () => ( 0)));
|
|
5068
5273
|
const end = Math.max(0, _nullishCoalesce(frame.end, () => ( 0)));
|
|
5069
5274
|
const upright = frame.orientation === "upright";
|
|
5070
|
-
const baselineOffset = pathBaselineOffset(_nullishCoalesce(frame.baseline, () => ( "baseline")), _nullishCoalesce(_optionalChain([line, 'optionalAccess',
|
|
5275
|
+
const baselineOffset = pathBaselineOffset(_nullishCoalesce(frame.baseline, () => ( "baseline")), _nullishCoalesce(_optionalChain([line, 'optionalAccess', _129 => _129.ascent]), () => ( 0)), _nullishCoalesce(_optionalChain([line, 'optionalAccess', _130 => _130.descent]), () => ( 0)));
|
|
5071
5276
|
if (line) {
|
|
5072
5277
|
const chars = line.chars.filter((c) => {
|
|
5073
5278
|
const lo = block.text.charCodeAt(c.index);
|
|
@@ -5076,7 +5281,7 @@ function computeLayout2(node, shaper) {
|
|
|
5076
5281
|
const advanceOf = (c) => {
|
|
5077
5282
|
const pair = charAt(block.text, c.index).length === 2;
|
|
5078
5283
|
const low = pair ? line.chars.find((d) => d.index === c.index + 1) : void 0;
|
|
5079
|
-
return c.advance + (_nullishCoalesce(_optionalChain([low, 'optionalAccess',
|
|
5284
|
+
return c.advance + (_nullishCoalesce(_optionalChain([low, 'optionalAccess', _131 => _131.advance]), () => ( 0)));
|
|
5080
5285
|
};
|
|
5081
5286
|
const pivots = chars.map((c) => c.x + advanceOf(c) / 2);
|
|
5082
5287
|
const positions = vectorPathTextPositions(pivots, [line.x, line.x + line.width], align, measure.length, start, end);
|
|
@@ -5131,7 +5336,7 @@ function computeLayout2(node, shaper) {
|
|
|
5131
5336
|
if (x0 < Infinity) bounds = { x: x0, y: y0, width: x1 - x0, height: y1 - y0 };
|
|
5132
5337
|
else if (frame.kind === "point") {
|
|
5133
5338
|
const l = text.lines[0];
|
|
5134
|
-
bounds = { x: frame.x, y: frame.y - (_nullishCoalesce(_optionalChain([l, 'optionalAccess',
|
|
5339
|
+
bounds = { x: frame.x, y: frame.y - (_nullishCoalesce(_optionalChain([l, 'optionalAccess', _132 => _132.ascent]), () => ( 0))), width: 0, height: (_nullishCoalesce(_optionalChain([l, 'optionalAccess', _133 => _133.ascent]), () => ( 0))) + (_nullishCoalesce(_optionalChain([l, 'optionalAccess', _134 => _134.descent]), () => ( 0))) };
|
|
5135
5340
|
}
|
|
5136
5341
|
}
|
|
5137
5342
|
return { shaper: shaper.id, glyphs, fragments, lines, origin, text, bounds, overflow, missingFonts: text.missingFonts };
|
|
@@ -5192,7 +5397,7 @@ function vectorTextPaths(node) {
|
|
|
5192
5397
|
const glyphs = layout.glyphs.slice(f.from, f.to);
|
|
5193
5398
|
if (!glyphs.length) return;
|
|
5194
5399
|
if (!outlines) {
|
|
5195
|
-
if (node.frame.kind === "path") {
|
|
5400
|
+
if (node.frame.kind === "path" || layout.text.orientation === "vertical") {
|
|
5196
5401
|
for (const g of glyphs) if (!isTextSpace(g.char)) out.push(...polygon2(glyphBox(g)));
|
|
5197
5402
|
} else {
|
|
5198
5403
|
const first = glyphs[0];
|
|
@@ -5234,7 +5439,7 @@ function polygon2(pts) {
|
|
|
5234
5439
|
return [{ type: "M", x: pts[0].x, y: pts[0].y }, ...pts.slice(1).map((p) => ({ type: "L", x: p.x, y: p.y })), { type: "Z" }];
|
|
5235
5440
|
}
|
|
5236
5441
|
function vectorTextPaintSource(node, fill, subpaths = []) {
|
|
5237
|
-
const { type: _t, text: _x, font: _f, runs: _r, paragraph: _p, frame: _fr, ...rest } = node;
|
|
5442
|
+
const { type: _t, text: _x, font: _f, runs: _r, paragraph: _p, frame: _fr, orientation: _o, ...rest } = node;
|
|
5238
5443
|
const out = { ...rest, type: "path", subpaths, fillRule: "nonzero" };
|
|
5239
5444
|
if (fill === void 0) return out;
|
|
5240
5445
|
if (Array.isArray(out.fills) && out.fills.length) {
|
|
@@ -5252,12 +5457,12 @@ function vectorTextCaret(node, index) {
|
|
|
5252
5457
|
const t = { x: Math.cos(r), y: Math.sin(r) };
|
|
5253
5458
|
const n2 = { x: -t.y, y: t.x };
|
|
5254
5459
|
const o = { x: g2.x + t.x * u, y: g2.y + t.y * u };
|
|
5255
|
-
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',
|
|
5460
|
+
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', _135 => _135.fragments, 'access', _136 => _136[g2.fragment], 'optionalAccess', _137 => _137.line]), () => ( 0)) };
|
|
5256
5461
|
};
|
|
5257
5462
|
if (node.frame.kind !== "path") {
|
|
5258
5463
|
const c = caretAt(layout.text, index);
|
|
5259
5464
|
const o = layout.origin;
|
|
5260
|
-
return { top: { x: o.x + c.x, y: o.y + c.
|
|
5465
|
+
return { top: { x: o.x + c.from.x, y: o.y + c.from.y }, bottom: { x: o.x + c.to.x, y: o.y + c.to.y }, line: c.line };
|
|
5261
5466
|
}
|
|
5262
5467
|
const g = glyphs.find((x) => x.index >= index);
|
|
5263
5468
|
if (g && g.index === index) return at2(g, 0);
|
|
@@ -5298,6 +5503,10 @@ function vectorTextSelectionQuads(node, start, end) {
|
|
|
5298
5503
|
const layout = layoutVectorText(node);
|
|
5299
5504
|
const picked = layout.glyphs.filter((g) => g.index >= start && g.index < end);
|
|
5300
5505
|
if (node.frame.kind === "path") return picked.map(glyphBox);
|
|
5506
|
+
if (layout.text.orientation === "vertical") {
|
|
5507
|
+
const o = layout.origin;
|
|
5508
|
+
return textSelectionQuads(layout.text, start, end).map((q) => q.map((p) => ({ x: o.x + p.x, y: o.y + p.y })));
|
|
5509
|
+
}
|
|
5301
5510
|
const byLine = /* @__PURE__ */ new Map();
|
|
5302
5511
|
for (const g of picked) {
|
|
5303
5512
|
const line = layout.fragments[g.fragment].line;
|
|
@@ -5336,6 +5545,7 @@ function patchVectorCharacterStyle(base, patch, path = "style") {
|
|
|
5336
5545
|
case "italic":
|
|
5337
5546
|
case "underline":
|
|
5338
5547
|
case "strikethrough":
|
|
5548
|
+
case "upright":
|
|
5339
5549
|
if (typeof v2 !== "boolean" && v2 !== null) fail(`${path}.${k} must be true or false.`);
|
|
5340
5550
|
if (v2) out[k] = true;
|
|
5341
5551
|
else delete out[k];
|
|
@@ -5387,7 +5597,7 @@ function sanitizeVectorTextFrame(value, path = "frame") {
|
|
|
5387
5597
|
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) };
|
|
5388
5598
|
if (f.kind === "path") {
|
|
5389
5599
|
const sp = f.path;
|
|
5390
|
-
if (!sp || !Array.isArray(sp.anchors) || sp.anchors.length < 2 || !sp.anchors.every((a) => isNum(_optionalChain([a, 'optionalAccess',
|
|
5600
|
+
if (!sp || !Array.isArray(sp.anchors) || sp.anchors.length < 2 || !sp.anchors.every((a) => isNum(_optionalChain([a, 'optionalAccess', _138 => _138.x])) && isNum(_optionalChain([a, 'optionalAccess', _139 => _139.y])))) fail(`${path}.path must be a subpath with at least two anchors.`);
|
|
5391
5601
|
const out = { kind: "path", path: { closed: !!sp.closed, anchors: sp.anchors.map((a) => ({ ...a })) } };
|
|
5392
5602
|
if (f.start !== void 0 && f.start !== 0) out.start = num2(f.start, `${path}.start`, 0, 1e7);
|
|
5393
5603
|
if (f.end !== void 0 && f.end !== 0) out.end = num2(f.end, `${path}.end`, 0, 1e7);
|
|
@@ -5405,7 +5615,7 @@ function sanitizeVectorTextFrame(value, path = "frame") {
|
|
|
5405
5615
|
return fail(`${path}.kind must be point, area or path, got ${JSON.stringify(f.kind)}.`);
|
|
5406
5616
|
}
|
|
5407
5617
|
function normalizeVectorTextRuns(text, runs) {
|
|
5408
|
-
if (!_optionalChain([runs, 'optionalAccess',
|
|
5618
|
+
if (!_optionalChain([runs, 'optionalAccess', _140 => _140.length])) return null;
|
|
5409
5619
|
const cleaned = fitVectorTextRuns(
|
|
5410
5620
|
runs.map((r) => ({ length: r.length, style: stripUndefined(r.style) })),
|
|
5411
5621
|
text.length
|
|
@@ -5413,6 +5623,11 @@ function normalizeVectorTextRuns(text, runs) {
|
|
|
5413
5623
|
if (cleaned.every((r) => !Object.keys(r.style).length)) return null;
|
|
5414
5624
|
return cleaned;
|
|
5415
5625
|
}
|
|
5626
|
+
function vectorTextOrientation(value, path = "orientation") {
|
|
5627
|
+
if (value === void 0 || value === null || value === "horizontal") return void 0;
|
|
5628
|
+
if (value !== "vertical") fail(`${path} must be horizontal or vertical, got ${JSON.stringify(value)}.`);
|
|
5629
|
+
return "vertical";
|
|
5630
|
+
}
|
|
5416
5631
|
function sanitizeVectorTextFields(value) {
|
|
5417
5632
|
const text = typeof value.text === "string" ? value.text.replace(/\r\n?/g, "\n") : "";
|
|
5418
5633
|
const font = patchVectorCharacterStyle({ ...DEFAULT_VECTOR_FONT }, _nullishCoalesce(value.font, () => ( {})), "font");
|
|
@@ -5425,7 +5640,8 @@ function sanitizeVectorTextFields(value) {
|
|
|
5425
5640
|
) : null;
|
|
5426
5641
|
const paragraph = value.paragraph ? patchVectorParagraphStyle({}, value.paragraph) : null;
|
|
5427
5642
|
const frame = sanitizeVectorTextFrame(_nullishCoalesce(value.frame, () => ( { kind: "point", x: 0, y: 0 })));
|
|
5428
|
-
|
|
5643
|
+
const orientation = vectorTextOrientation(value.orientation);
|
|
5644
|
+
return { text, font, ...runs ? { runs } : {}, ...paragraph && Object.keys(paragraph).length ? { paragraph } : {}, frame, ...orientation ? { orientation } : {} };
|
|
5429
5645
|
}
|
|
5430
5646
|
function vectorTextRange(text, start, end) {
|
|
5431
5647
|
const s = start === void 0 ? 0 : start;
|
|
@@ -5439,7 +5655,7 @@ function replaceVectorText(node, start, end, insert) {
|
|
|
5439
5655
|
const clean2 = insert.replace(/\r\n?/g, "\n");
|
|
5440
5656
|
const text = node.text.slice(0, start) + clean2 + node.text.slice(end);
|
|
5441
5657
|
let runs = null;
|
|
5442
|
-
if (_optionalChain([node, 'access',
|
|
5658
|
+
if (_optionalChain([node, 'access', _141 => _141.runs, 'optionalAccess', _142 => _142.length])) {
|
|
5443
5659
|
const fitted = fitVectorTextRuns(node.runs, node.text.length);
|
|
5444
5660
|
const style = styleAt(fitted, start > 0 ? start - 1 : start, {});
|
|
5445
5661
|
runs = normalizeVectorTextRuns(text, spliceRuns(fitted, start, end, clean2.length, style));
|
|
@@ -5455,7 +5671,7 @@ function styleVectorText(node, start, end, patch) {
|
|
|
5455
5671
|
if (whole) {
|
|
5456
5672
|
let next2 = { ...node, font: patchVectorCharacterStyle(node.font, fields, "style") };
|
|
5457
5673
|
const keys = Object.keys(fields).filter((k) => fields[k] !== void 0);
|
|
5458
|
-
if (_optionalChain([next2, 'access',
|
|
5674
|
+
if (_optionalChain([next2, 'access', _143 => _143.runs, 'optionalAccess', _144 => _144.length]) && (keys.length || fill !== void 0)) {
|
|
5459
5675
|
const runs2 = normalizeVectorTextRuns(
|
|
5460
5676
|
next2.text,
|
|
5461
5677
|
next2.runs.map((r) => {
|
|
@@ -5500,7 +5716,7 @@ function bakeVectorTextGeometry(node, m) {
|
|
|
5500
5716
|
...s.baselineShift !== void 0 ? { baselineShift: s.baselineShift * k } : {}
|
|
5501
5717
|
});
|
|
5502
5718
|
const font = scaleStyle(node.font);
|
|
5503
|
-
const runs = _optionalChain([node, 'access',
|
|
5719
|
+
const runs = _optionalChain([node, 'access', _145 => _145.runs, 'optionalAccess', _146 => _146.map, 'call', _147 => _147((r) => ({ length: r.length, style: scaleStyle(r.style) }))]);
|
|
5504
5720
|
const p = node.paragraph;
|
|
5505
5721
|
const paragraph = p ? {
|
|
5506
5722
|
...p,
|
|
@@ -5567,6 +5783,13 @@ function vectorTextBoxOutline(node) {
|
|
|
5567
5783
|
layout.text.lines.forEach((l, i) => {
|
|
5568
5784
|
const line = layout.lines[i];
|
|
5569
5785
|
if (!line) return;
|
|
5786
|
+
if (l.matrix) {
|
|
5787
|
+
const r = textLineRect(l);
|
|
5788
|
+
const o = layout.origin;
|
|
5789
|
+
const h = Math.max(r.height, 1);
|
|
5790
|
+
out.push(...polygon2([{ x: o.x + r.x, y: o.y + r.y }, { x: o.x + r.x + r.width, y: o.y + r.y }, { x: o.x + r.x + r.width, y: o.y + r.y + h }, { x: o.x + r.x, y: o.y + r.y + h }]));
|
|
5791
|
+
return;
|
|
5792
|
+
}
|
|
5570
5793
|
const top = line.baseline - l.ascent;
|
|
5571
5794
|
const bottom = line.baseline + l.descent;
|
|
5572
5795
|
const w = Math.max(l.width, 1);
|
|
@@ -5782,7 +6005,7 @@ function vectorInstanceGroup(node, bake) {
|
|
|
5782
6005
|
const m = _nullishCoalesce(node.transform, () => ( [1, 0, 0, 1, 0, 0]));
|
|
5783
6006
|
const { rigid, residual } = decomposeRigid(m);
|
|
5784
6007
|
const k = Math.sqrt(Math.abs(residual[0] * residual[3] - residual[1] * residual[2]));
|
|
5785
|
-
const hidden = new Set(_nullishCoalesce(_optionalChain([node, 'access',
|
|
6008
|
+
const hidden = new Set(_nullishCoalesce(_optionalChain([node, 'access', _148 => _148.overrides, 'optionalAccess', _149 => _149.hidden]), () => ( [])));
|
|
5786
6009
|
const keep = (list) => list.filter((n) => !hidden.has(n.id)).map((n) => n.type === "group" ? { ...n, children: keep(n.children) } : n);
|
|
5787
6010
|
let children = prefixVectorIds(keep(_nullishCoalesce(node.art, () => ( []))), node.id);
|
|
5788
6011
|
if (!isIdentityMatrix(residual)) children = children.map((c) => bake(c, residual));
|
|
@@ -5795,8 +6018,8 @@ function vectorInstanceGroup(node, bake) {
|
|
|
5795
6018
|
if (node.locked) group.locked = true;
|
|
5796
6019
|
if (node.opacity !== void 0) group.opacity = node.opacity;
|
|
5797
6020
|
if (node.blendMode) group.blendMode = node.blendMode;
|
|
5798
|
-
if (_optionalChain([node, 'access',
|
|
5799
|
-
if (_optionalChain([node, 'access',
|
|
6021
|
+
if (_optionalChain([node, 'access', _150 => _150.filters, 'optionalAccess', _151 => _151.length])) group.filters = node.filters;
|
|
6022
|
+
if (_optionalChain([node, 'access', _152 => _152.effects, 'optionalAccess', _153 => _153.length])) group.effects = node.effects;
|
|
5800
6023
|
if (node.booleanOperation) group.booleanOperation = node.booleanOperation;
|
|
5801
6024
|
if (node.blendStep) group.blendStep = true;
|
|
5802
6025
|
return group;
|
|
@@ -6049,8 +6272,8 @@ function vectorLensDrawn(node) {
|
|
|
6049
6272
|
if (wire) {
|
|
6050
6273
|
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)) }));
|
|
6051
6274
|
} else if (recolour) {
|
|
6052
|
-
const fills = _optionalChain([shape, 'access',
|
|
6053
|
-
const strokes = _optionalChain([shape, 'access',
|
|
6275
|
+
const fills = _optionalChain([shape, 'access', _154 => _154.source, 'access', _155 => _155.fills, 'optionalAccess', _156 => _156.map, 'call', _157 => _157((l) => ({ ...l, paint: _nullishCoalesce(mapVectorPaintColors(l.paint, recolour), () => ( null)) }))]);
|
|
6276
|
+
const strokes = _optionalChain([shape, 'access', _158 => _158.source, 'access', _159 => _159.strokes, 'optionalAccess', _160 => _160.map, 'call', _161 => _161((l) => ({ ...l, paint: _nullishCoalesce(mapVectorPaintColors(l.paint, recolour), () => ( null)) }))]);
|
|
6054
6277
|
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 } : {} }));
|
|
6055
6278
|
} else contents.push(shapePath(shape, id, changed));
|
|
6056
6279
|
}
|
|
@@ -6063,7 +6286,7 @@ function vectorLensDrawn(node) {
|
|
|
6063
6286
|
const { lens: _l, lensView: _v, transform: _t, opacity: _o, effects: _e, blendMode: _bm, filters: _f, ...style } = node;
|
|
6064
6287
|
const fillOpacity = lens.type === "transparency" ? 1 - Math.min(100, Math.max(0, lens.amount)) / 100 : 0;
|
|
6065
6288
|
children.push({ ...style, id: `${node.id}~lens-fill`, stroke: null, strokes: void 0, opacity: fillOpacity });
|
|
6066
|
-
const stroked = (_nullishCoalesce(_optionalChain([node, 'access',
|
|
6289
|
+
const stroked = (_nullishCoalesce(_optionalChain([node, 'access', _162 => _162.strokes, 'optionalAccess', _163 => _163.length]), () => ( 0))) > 0 || node.stroke != null && node.stroke !== "none";
|
|
6067
6290
|
if (stroked) children.push({ ...style, id: `${node.id}~lens-stroke`, fill: null, fills: void 0 });
|
|
6068
6291
|
const out = {
|
|
6069
6292
|
id: node.id,
|
|
@@ -6072,7 +6295,7 @@ function vectorLensDrawn(node) {
|
|
|
6072
6295
|
...node.transform ? { transform: node.transform } : {},
|
|
6073
6296
|
...node.opacity !== void 0 ? { opacity: node.opacity } : {},
|
|
6074
6297
|
...node.blendMode ? { blendMode: node.blendMode } : {},
|
|
6075
|
-
..._optionalChain([node, 'access',
|
|
6298
|
+
..._optionalChain([node, 'access', _164 => _164.filters, 'optionalAccess', _165 => _165.length]) ? { filters: node.filters } : {},
|
|
6076
6299
|
children
|
|
6077
6300
|
};
|
|
6078
6301
|
drawnCache2.set(node, out);
|
|
@@ -7073,7 +7296,7 @@ function normalizeVectorEffectParams(type, params, base) {
|
|
|
7073
7296
|
if (!defaults) return null;
|
|
7074
7297
|
const out = { ...defaults, ..._nullishCoalesce(base, () => ( {})) };
|
|
7075
7298
|
for (const spec of VECTOR_EFFECT_PARAM_SPECS[type]) {
|
|
7076
|
-
const v2 = _optionalChain([params, 'optionalAccess',
|
|
7299
|
+
const v2 = _optionalChain([params, 'optionalAccess', _166 => _166[spec.key]]);
|
|
7077
7300
|
if (v2 === void 0) continue;
|
|
7078
7301
|
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));
|
|
7079
7302
|
else if (spec.kind === "boolean" && typeof v2 === "boolean") out[spec.key] = v2;
|
|
@@ -7085,7 +7308,7 @@ function normalizeVectorEffectParams(type, params, base) {
|
|
|
7085
7308
|
const o = out;
|
|
7086
7309
|
o.rows = Math.round(o.rows);
|
|
7087
7310
|
o.columns = Math.round(o.columns);
|
|
7088
|
-
const given = _optionalChain([params, 'optionalAccess',
|
|
7311
|
+
const given = _optionalChain([params, 'optionalAccess', _167 => _167.mesh]);
|
|
7089
7312
|
let mesh = given !== void 0 ? isValidWarpMesh(given) ? cloneMesh(given) : null : o.mesh;
|
|
7090
7313
|
if (o.style !== "mesh") mesh = null;
|
|
7091
7314
|
if (mesh && given !== void 0) {
|
|
@@ -7102,10 +7325,10 @@ function createVectorEffect(type, id, params) {
|
|
|
7102
7325
|
}
|
|
7103
7326
|
var isEnabled = (e) => e.enabled !== false && !!VECTOR_EFFECT_DEFAULTS[e.type];
|
|
7104
7327
|
function activeVectorEffects(node) {
|
|
7105
|
-
return _nullishCoalesce(_optionalChain([node, 'access',
|
|
7328
|
+
return _nullishCoalesce(_optionalChain([node, 'access', _168 => _168.effects, 'optionalAccess', _169 => _169.filter, 'call', _170 => _170(isEnabled)]), () => ( []));
|
|
7106
7329
|
}
|
|
7107
7330
|
function hasOwnVectorAppearance(node) {
|
|
7108
|
-
return node.type === "text" || node.type === "instance" || node.type === "group" && !!node.liveBoolean || isVectorFrame(node) || isVectorSymmetryGroup(node) || isVectorLens(node) || !!_optionalChain([node, 'access',
|
|
7331
|
+
return node.type === "text" || node.type === "instance" || node.type === "group" && !!node.liveBoolean || isVectorFrame(node) || isVectorSymmetryGroup(node) || isVectorLens(node) || !!_optionalChain([node, 'access', _171 => _171.effects, 'optionalAccess', _172 => _172.some, 'call', _173 => _173(isEnabled)]);
|
|
7109
7332
|
}
|
|
7110
7333
|
var liveCache = /* @__PURE__ */ new WeakMap();
|
|
7111
7334
|
function hasVectorAppearance(node) {
|
|
@@ -7117,7 +7340,7 @@ function hasVectorAppearance(node) {
|
|
|
7117
7340
|
return v2;
|
|
7118
7341
|
}
|
|
7119
7342
|
function isVectorLiveBoolean(node) {
|
|
7120
|
-
return _optionalChain([node, 'optionalAccess',
|
|
7343
|
+
return _optionalChain([node, 'optionalAccess', _174 => _174.type]) === "group" && !!node.liveBoolean;
|
|
7121
7344
|
}
|
|
7122
7345
|
function vectorOperandOperation(group, child) {
|
|
7123
7346
|
return _nullishCoalesce(_nullishCoalesce(child.booleanOperation, () => ( group.liveBoolean)), () => ( "union"));
|
|
@@ -7234,7 +7457,7 @@ var compareOrder = (a, b) => {
|
|
|
7234
7457
|
for (let i = 0; i < n; i++) if (a[i] !== b[i]) return a[i] - b[i];
|
|
7235
7458
|
return a.length - b.length;
|
|
7236
7459
|
};
|
|
7237
|
-
var add3 = (a, b) => ({ x: a.x + (_nullishCoalesce(_optionalChain([b, 'optionalAccess',
|
|
7460
|
+
var add3 = (a, b) => ({ x: a.x + (_nullishCoalesce(_optionalChain([b, 'optionalAccess', _175 => _175.x]), () => ( 0))), y: a.y + (_nullishCoalesce(_optionalChain([b, 'optionalAccess', _176 => _176.y]), () => ( 0))) });
|
|
7238
7461
|
var mapPaths = (shapes, fn) => {
|
|
7239
7462
|
const out = fn(shapes.map((s) => s.path));
|
|
7240
7463
|
return shapes.map((s, i) => ({ ...s, path: _nullishCoalesce(out[i], () => ( [])) }));
|
|
@@ -7262,7 +7485,7 @@ function contourShapes(shapes, c) {
|
|
|
7262
7485
|
const power = 2 ** (Math.min(100, Math.max(-100, c.acceleration)) / 50);
|
|
7263
7486
|
for (let k = 1; k <= n; k++) {
|
|
7264
7487
|
const [path] = offsetPaths([s.path], (outside ? 1 : -1) * step * k, c.join, c.miterLimit, 1, 0);
|
|
7265
|
-
if (!_optionalChain([path, 'optionalAccess',
|
|
7488
|
+
if (!_optionalChain([path, 'optionalAccess', _177 => _177.length])) break;
|
|
7266
7489
|
const t = (k / n) ** power;
|
|
7267
7490
|
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 };
|
|
7268
7491
|
out.push({ source, path, opacity: s.opacity, order: [outside ? n - k : k, ...s.order] });
|
|
@@ -7337,8 +7560,8 @@ function bevelShapes(shapes, b) {
|
|
|
7337
7560
|
out.push({ source, path: f.path, opacity: s.opacity, order: [...s.order, 1, k] });
|
|
7338
7561
|
});
|
|
7339
7562
|
const [middle] = offsetPaths([s.path], -b.width, "miter", 4, 1, 0);
|
|
7340
|
-
if (_optionalChain([middle, 'optionalAccess',
|
|
7341
|
-
const hasStroke = _optionalChain([s, 'access',
|
|
7563
|
+
if (_optionalChain([middle, 'optionalAccess', _178 => _178.length])) out.push({ ...s, source: fillOnly, path: middle, order: [...s.order, 2] });
|
|
7564
|
+
const hasStroke = _optionalChain([s, 'access', _179 => _179.source, 'access', _180 => _180.strokes, 'optionalAccess', _181 => _181.length]) || s.source.stroke != null && s.source.stroke !== "none";
|
|
7342
7565
|
if (hasStroke) out.push({ ...s, source: { ...s.source, fill: null, fills: void 0 }, order: [...s.order, 3] });
|
|
7343
7566
|
}
|
|
7344
7567
|
return out;
|
|
@@ -7471,10 +7694,10 @@ function vectorEffectInputBounds(node, effectId) {
|
|
|
7471
7694
|
return paths ? pathsBounds(paths) : null;
|
|
7472
7695
|
}
|
|
7473
7696
|
function vectorNodeEnvelope(node) {
|
|
7474
|
-
return _nullishCoalesce(_optionalChain([node, 'optionalAccess',
|
|
7697
|
+
return _nullishCoalesce(_optionalChain([node, 'optionalAccess', _182 => _182.effects, 'optionalAccess', _183 => _183.find, 'call', _184 => _184((e) => e.type === "envelope" && e.enabled !== false)]), () => ( null));
|
|
7475
7698
|
}
|
|
7476
7699
|
function vectorEnvelopeFrame(node, effectId) {
|
|
7477
|
-
const e = effectId ? _optionalChain([node, 'access',
|
|
7700
|
+
const e = effectId ? _optionalChain([node, 'access', _185 => _185.effects, 'optionalAccess', _186 => _186.find, 'call', _187 => _187((x) => x.id === effectId)]) : vectorNodeEnvelope(node);
|
|
7478
7701
|
if (!e || e.type !== "envelope") return null;
|
|
7479
7702
|
const bounds = vectorEffectInputBounds(node, e.id);
|
|
7480
7703
|
if (!bounds || !(bounds.width > 0 && bounds.height > 0)) return null;
|
|
@@ -7535,7 +7758,7 @@ function placement(node) {
|
|
|
7535
7758
|
...node.blendStep ? { blendStep: true } : {},
|
|
7536
7759
|
...node.booleanOperation ? { booleanOperation: node.booleanOperation } : {},
|
|
7537
7760
|
...node.blendMode ? { blendMode: node.blendMode } : {},
|
|
7538
|
-
..._optionalChain([node, 'access',
|
|
7761
|
+
..._optionalChain([node, 'access', _188 => _188.filters, 'optionalAccess', _189 => _189.length]) ? { filters: node.filters } : {}
|
|
7539
7762
|
};
|
|
7540
7763
|
}
|
|
7541
7764
|
function vectorAppearanceNodes(node) {
|
|
@@ -7667,7 +7890,7 @@ function vectorMasterPages(doc) {
|
|
|
7667
7890
|
function fillTokens(node, page, pages) {
|
|
7668
7891
|
const map = (s) => s.replace(/\{page\}/g, String(page)).replace(/\{pages\}/g, String(pages));
|
|
7669
7892
|
if (!/\{pages?\}/.test(node.text)) return node;
|
|
7670
|
-
if (!_optionalChain([node, 'access',
|
|
7893
|
+
if (!_optionalChain([node, 'access', _190 => _190.runs, 'optionalAccess', _191 => _191.length])) return { ...node, text: map(node.text) };
|
|
7671
7894
|
let at2 = 0;
|
|
7672
7895
|
let text = "";
|
|
7673
7896
|
const runs = [];
|
|
@@ -7690,7 +7913,7 @@ function vectorMasterArt(master, page, number, count) {
|
|
|
7690
7913
|
const f = page.frame;
|
|
7691
7914
|
const key = `${page.id}|${f.x}|${f.y}|${f.width}|${f.height}|${number}|${count}`;
|
|
7692
7915
|
let byKey = artCache.get(master);
|
|
7693
|
-
const hit = _optionalChain([byKey, 'optionalAccess',
|
|
7916
|
+
const hit = _optionalChain([byKey, 'optionalAccess', _192 => _192.get, 'call', _193 => _193(key)]);
|
|
7694
7917
|
if (hit) return hit;
|
|
7695
7918
|
const art = master.children.filter((c) => c.visible !== false).map((c) => {
|
|
7696
7919
|
const box = vectorNodeBounds(c);
|
|
@@ -7735,7 +7958,7 @@ function stripVectorMasterArt(doc) {
|
|
|
7735
7958
|
// src/vector/connectors.ts
|
|
7736
7959
|
var SIDES = ["top", "right", "bottom", "left", "center"];
|
|
7737
7960
|
function isVectorConnector(node) {
|
|
7738
|
-
return _optionalChain([node, 'optionalAccess',
|
|
7961
|
+
return _optionalChain([node, 'optionalAccess', _194 => _194.type]) === "path" && !!node.connector;
|
|
7739
7962
|
}
|
|
7740
7963
|
function vectorConnectionSites(nodes, id) {
|
|
7741
7964
|
const node = findVectorNode(nodes, id);
|
|
@@ -7792,7 +8015,7 @@ function facingSite(sites, toward) {
|
|
|
7792
8015
|
}
|
|
7793
8016
|
function storedEnds(node, world) {
|
|
7794
8017
|
const sp = node.subpaths[0];
|
|
7795
|
-
if (!_optionalChain([sp, 'optionalAccess',
|
|
8018
|
+
if (!_optionalChain([sp, 'optionalAccess', _195 => _195.anchors, 'access', _196 => _196.length])) return null;
|
|
7796
8019
|
const a = sp.anchors[0];
|
|
7797
8020
|
const b = sp.anchors[sp.anchors.length - 1];
|
|
7798
8021
|
return [applyMatrix(world, a), applyMatrix(world, b)];
|
|
@@ -7899,8 +8122,8 @@ function routeVectorConnector(nodes, id) {
|
|
|
7899
8122
|
}));
|
|
7900
8123
|
return {
|
|
7901
8124
|
subpaths: [{ closed: false, anchors: local }],
|
|
7902
|
-
startSide: _nullishCoalesce(_optionalChain([s, 'optionalAccess',
|
|
7903
|
-
endSide: _nullishCoalesce(_optionalChain([e, 'optionalAccess',
|
|
8125
|
+
startSide: _nullishCoalesce(_optionalChain([s, 'optionalAccess', _197 => _197.side]), () => ( null)),
|
|
8126
|
+
endSide: _nullishCoalesce(_optionalChain([e, 'optionalAccess', _198 => _198.side]), () => ( null)),
|
|
7904
8127
|
dropped: { start: !!startGlue && !s, end: !!endGlue && !e }
|
|
7905
8128
|
};
|
|
7906
8129
|
}
|
|
@@ -7912,7 +8135,7 @@ function sameSubpaths(a, b) {
|
|
|
7912
8135
|
const o = b[i];
|
|
7913
8136
|
return sp.closed === o.closed && sp.anchors.length === o.anchors.length && sp.anchors.every((p, k) => {
|
|
7914
8137
|
const q = o.anchors[k];
|
|
7915
|
-
return samePoint(p, q) && samePoint(p.in, q.in) && samePoint(p.out, q.out) && (_nullishCoalesce(_optionalChain([p, 'access',
|
|
8138
|
+
return samePoint(p, q) && samePoint(p.in, q.in) && samePoint(p.out, q.out) && (_nullishCoalesce(_optionalChain([p, 'access', _199 => _199.corner, 'optionalAccess', _200 => _200.radius]), () => ( 0))) === (_nullishCoalesce(_optionalChain([q, 'access', _201 => _201.corner, 'optionalAccess', _202 => _202.radius]), () => ( 0)));
|
|
7916
8139
|
});
|
|
7917
8140
|
});
|
|
7918
8141
|
}
|
|
@@ -8191,7 +8414,7 @@ function applyVectorCornersAttribute(subpaths, value) {
|
|
|
8191
8414
|
for (const item of value.trim().split(/\s+/)) {
|
|
8192
8415
|
const m = /^(\d+)\.(\d+):([\d.eE+-]+)(?::([a-z]+))?$/.exec(item);
|
|
8193
8416
|
if (!m) continue;
|
|
8194
|
-
const a = _optionalChain([subpaths, 'access',
|
|
8417
|
+
const a = _optionalChain([subpaths, 'access', _203 => _203[+m[1]], 'optionalAccess', _204 => _204.anchors, 'access', _205 => _205[+m[2]]]);
|
|
8195
8418
|
const radius = parseFloat(m[3]);
|
|
8196
8419
|
if (!a || !(radius > 0)) continue;
|
|
8197
8420
|
const kind = VECTOR_CORNER_KINDS.includes(m[4]) ? m[4] : void 0;
|
|
@@ -8216,7 +8439,7 @@ function vectorPaintToSvg(paint, gradientId, options = {}) {
|
|
|
8216
8439
|
const area2 = bounds2 ? { x: bounds2.x - reach2, y: bounds2.y - reach2, width: bounds2.width + 2 * reach2, height: bounds2.height + 2 * reach2 } : null;
|
|
8217
8440
|
const key2 = `${gradientId}|${_nullishCoalesce(options.role, () => ( "fill"))}|${_nullishCoalesce(options.precision, () => ( 3))}|${area2 ? [area2.x, area2.y, area2.width, area2.height].join(",") : ""}`;
|
|
8218
8441
|
let byKey2 = paintCache.get(paint);
|
|
8219
|
-
const hit = _optionalChain([byKey2, 'optionalAccess',
|
|
8442
|
+
const hit = _optionalChain([byKey2, 'optionalAccess', _206 => _206.get, 'call', _207 => _207(key2)]);
|
|
8220
8443
|
if (hit) return { value: `url(#${gradientId})`, defs: hit };
|
|
8221
8444
|
const defs2 = vectorShadedSvgDefs(paint, gradientId, { bounds: bounds2, area: area2, precision: _nullishCoalesce(options.precision, () => ( 3)) });
|
|
8222
8445
|
if (!byKey2) paintCache.set(paint, byKey2 = /* @__PURE__ */ new Map());
|
|
@@ -8228,7 +8451,7 @@ function vectorPaintToSvg(paint, gradientId, options = {}) {
|
|
|
8228
8451
|
const precision = _nullishCoalesce(options.precision, () => ( 3));
|
|
8229
8452
|
const key = `${gradientId}|${role}|${precision}`;
|
|
8230
8453
|
const owner = _nullishCoalesce(options.node, () => ( paint));
|
|
8231
|
-
const cached = _optionalChain([paintCache, 'access',
|
|
8454
|
+
const cached = _optionalChain([paintCache, 'access', _208 => _208.get, 'call', _209 => _209(owner), 'optionalAccess', _210 => _210.get, 'call', _211 => _211(key)]);
|
|
8232
8455
|
if (cached && (!options.node || (role === "fill" ? options.node.fill : options.node.stroke) === paint)) return { value: `url(#${gradientId})`, defs: cached };
|
|
8233
8456
|
const node = options.node;
|
|
8234
8457
|
const bounds = node ? vectorPathLocalBounds(node) : null;
|
|
@@ -8282,7 +8505,7 @@ function vectorNodeLocalPaintBounds(node) {
|
|
|
8282
8505
|
}
|
|
8283
8506
|
var filterCache = /* @__PURE__ */ new WeakMap();
|
|
8284
8507
|
function vectorNodeFilterSvg(node, id) {
|
|
8285
|
-
if (!_optionalChain([node, 'access',
|
|
8508
|
+
if (!_optionalChain([node, 'access', _212 => _212.filters, 'optionalAccess', _213 => _213.length])) return null;
|
|
8286
8509
|
const hit = filterCache.get(node);
|
|
8287
8510
|
if (hit && hit.id === id) return hit.filter;
|
|
8288
8511
|
const active = activeVectorFilters(node);
|
|
@@ -8368,7 +8591,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8368
8591
|
if (node.type === "path" && node.lens) out2 += ` data-vector-lens="${escapeAttr2(JSON.stringify(node.lens))}"`;
|
|
8369
8592
|
const blend = vectorBlendModeCss(node.blendMode);
|
|
8370
8593
|
if (blend) out2 += ` style="mix-blend-mode:${blend}"`;
|
|
8371
|
-
if (_optionalChain([node, 'access',
|
|
8594
|
+
if (_optionalChain([node, 'access', _214 => _214.filters, 'optionalAccess', _215 => _215.length])) {
|
|
8372
8595
|
const filter = vectorNodeFilterSvg(node, `${prefix}filter-${node.id}`);
|
|
8373
8596
|
const data = ` data-vector-filters="${escapeAttr2(JSON.stringify(node.filters))}"`;
|
|
8374
8597
|
if (filter) {
|
|
@@ -8415,7 +8638,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8415
8638
|
let out2 = ` stroke="${escapeAttr2(strokeValue)}" stroke-width="${num3(width)}"`;
|
|
8416
8639
|
if (node.strokeLinecap && node.strokeLinecap !== "butt") out2 += ` stroke-linecap="${node.strokeLinecap}"`;
|
|
8417
8640
|
if (node.strokeLinejoin && node.strokeLinejoin !== "miter") out2 += ` stroke-linejoin="${node.strokeLinejoin}"`;
|
|
8418
|
-
if (_optionalChain([node, 'access',
|
|
8641
|
+
if (_optionalChain([node, 'access', _216 => _216.strokeDasharray, 'optionalAccess', _217 => _217.length])) out2 += ` stroke-dasharray="${node.strokeDasharray.map(num3).join(" ")}"`;
|
|
8419
8642
|
return out2;
|
|
8420
8643
|
};
|
|
8421
8644
|
const liveCorners = (node) => {
|
|
@@ -8464,7 +8687,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8464
8687
|
};
|
|
8465
8688
|
const emit2 = (node, depth) => {
|
|
8466
8689
|
if (node.visible === false && !options.includeHidden) return;
|
|
8467
|
-
const wrappers = _nullishCoalesce(_optionalChain([options, 'access',
|
|
8690
|
+
const wrappers = _nullishCoalesce(_optionalChain([options, 'access', _218 => _218.wrap, 'optionalAccess', _219 => _219[node.id]]), () => ( []));
|
|
8468
8691
|
wrappers.forEach((w2, i) => {
|
|
8469
8692
|
let attrs = w2.id !== void 0 ? ` id="${escapeAttr2(w2.id)}"` : "";
|
|
8470
8693
|
if (w2.transform) attrs += ` transform="${escapeAttr2(w2.transform)}"`;
|
|
@@ -8485,7 +8708,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8485
8708
|
};
|
|
8486
8709
|
const emitMaskGroup = (node, depth) => {
|
|
8487
8710
|
const [source, ...contents] = node.children;
|
|
8488
|
-
const body = _optionalChain([node, 'access',
|
|
8711
|
+
const body = _optionalChain([node, 'access', _220 => _220.effects, 'optionalAccess', _221 => _221.length]) && contents.length ? [{ id: `${node.id}~content`, type: "group", effects: node.effects, children: contents }] : contents;
|
|
8489
8712
|
const settings = { type: node.mask.type, ...node.mask.invert ? { invert: true } : {} };
|
|
8490
8713
|
lines.push(`${indent(depth)}<g${common(node)} data-vector-mask="${escapeAttr2(JSON.stringify(settings))}">`);
|
|
8491
8714
|
const mask = vectorMaskRenderData(node, `${prefix}mask-${node.id}`, `${prefix}mask-filter-${node.id}`, precision);
|
|
@@ -8502,7 +8725,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8502
8725
|
lines.push(`${indent(depth + 1)}<g data-vector-part="mask-source" display="none">`);
|
|
8503
8726
|
emitNode(source, depth + 2);
|
|
8504
8727
|
lines.push(`${indent(depth + 1)}</g>`);
|
|
8505
|
-
if (_optionalChain([mask, 'optionalAccess',
|
|
8728
|
+
if (_optionalChain([mask, 'optionalAccess', _222 => _222.clip])) {
|
|
8506
8729
|
defs.push(`<clipPath id="${escapeAttr2(mask.id)}">${mask.clip.map((c) => `<path d="${c.d}" clip-rule="${c.clipRule}"/>`).join("")}</clipPath>`);
|
|
8507
8730
|
ref = ` clip-path="url(#${escapeAttr2(mask.id)})"`;
|
|
8508
8731
|
}
|
|
@@ -8514,7 +8737,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8514
8737
|
};
|
|
8515
8738
|
const emitTextElement = (node, depth, attrs) => {
|
|
8516
8739
|
const geometry = vectorTextGeometryNode(node);
|
|
8517
|
-
const fields = { text: node.text, font: node.font, ..._optionalChain([node, 'access',
|
|
8740
|
+
const fields = { text: node.text, font: node.font, ..._optionalChain([node, 'access', _223 => _223.runs, 'optionalAccess', _224 => _224.length]) ? { runs: node.runs } : {}, ...node.paragraph ? { paragraph: node.paragraph } : {}, frame: node.frame, ...node.orientation ? { orientation: node.orientation } : {}, ..._optionalChain([node, 'access', _225 => _225.effects, 'optionalAccess', _226 => _226.length]) ? { effects: node.effects } : {} };
|
|
8518
8741
|
let data = ` data-vector-text="${escapeAttr2(JSON.stringify(fields))}"`;
|
|
8519
8742
|
if (hasVectorPaintStacks(node)) data += ` data-vector-fills="${escapeAttr2(JSON.stringify(vectorFills(node)))}" data-vector-strokes="${escapeAttr2(JSON.stringify(vectorStrokes(node)))}"`;
|
|
8520
8743
|
else {
|
|
@@ -8556,12 +8779,12 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8556
8779
|
};
|
|
8557
8780
|
const emitText = (node, depth) => {
|
|
8558
8781
|
const outlines = vectorTextPaths(node).outlines;
|
|
8559
|
-
const effects = !!_optionalChain([node, 'access',
|
|
8782
|
+
const effects = !!_optionalChain([node, 'access', _227 => _227.effects, 'optionalAccess', _228 => _228.some, 'call', _229 => _229((e) => e.enabled !== false)]);
|
|
8560
8783
|
if (!outlines || !effects && options.text !== "outlines") {
|
|
8561
8784
|
emitTextElement(node, depth, common(node));
|
|
8562
8785
|
return;
|
|
8563
8786
|
}
|
|
8564
|
-
lines.push(`${indent(depth)}<g${common(node)} data-vector-live="${escapeAttr2(JSON.stringify({ kind: "text", ..._optionalChain([node, 'access',
|
|
8787
|
+
lines.push(`${indent(depth)}<g${common(node)} data-vector-live="${escapeAttr2(JSON.stringify({ kind: "text", ..._optionalChain([node, 'access', _230 => _230.effects, 'optionalAccess', _231 => _231.length]) ? { effects: node.effects } : {} }))}">`);
|
|
8565
8788
|
lines.push(`${indent(depth + 1)}<g data-vector-part="appearance">`);
|
|
8566
8789
|
for (const shape of vectorAppearanceNodes(node)) emit2(shape, depth + 2);
|
|
8567
8790
|
lines.push(`${indent(depth + 1)}</g>`);
|
|
@@ -8575,7 +8798,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8575
8798
|
const symbolRef = (symbolId) => {
|
|
8576
8799
|
const hit = symbolIds.get(symbolId);
|
|
8577
8800
|
if (hit) return hit;
|
|
8578
|
-
const sym2 = _optionalChain([doc, 'access',
|
|
8801
|
+
const sym2 = _optionalChain([doc, 'access', _232 => _232.symbols, 'optionalAccess', _233 => _233.find, 'call', _234 => _234((x) => x.id === symbolId)]);
|
|
8579
8802
|
if (!sym2) return null;
|
|
8580
8803
|
const id = `${prefix}symbol-${symbolId}`;
|
|
8581
8804
|
symbolIds.set(symbolId, id);
|
|
@@ -8585,20 +8808,20 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8585
8808
|
};
|
|
8586
8809
|
const emitInstance = (node, depth) => {
|
|
8587
8810
|
const data = { symbolId: node.symbolId, ...node.scaleStrokes === false ? { scaleStrokes: false } : {}, ...node.overrides ? { overrides: node.overrides } : {} };
|
|
8588
|
-
const exact2 = !node.overrides && node.scaleStrokes !== false && !_optionalChain([node, 'access',
|
|
8811
|
+
const exact2 = !node.overrides && node.scaleStrokes !== false && !_optionalChain([node, 'access', _235 => _235.effects, 'optionalAccess', _236 => _236.length]) && !_optionalChain([node, 'access', _237 => _237.filters, 'optionalAccess', _238 => _238.length]);
|
|
8589
8812
|
const ref = symbolRef(node.symbolId);
|
|
8590
8813
|
if (exact2 && ref) {
|
|
8591
8814
|
lines.push(`${indent(depth)}<use${common(node)} href="#${escapeAttr2(ref)}" data-vector-instance="${escapeAttr2(JSON.stringify(data))}"/>`);
|
|
8592
8815
|
return;
|
|
8593
8816
|
}
|
|
8594
|
-
const full = { ...data, ...node.transform ? { transform: node.transform } : {}, ..._optionalChain([node, 'access',
|
|
8817
|
+
const full = { ...data, ...node.transform ? { transform: node.transform } : {}, ..._optionalChain([node, 'access', _239 => _239.effects, 'optionalAccess', _240 => _240.length]) ? { effects: node.effects } : {} };
|
|
8595
8818
|
lines.push(`${indent(depth)}<g data-vector-instance="${escapeAttr2(JSON.stringify(full))}">`);
|
|
8596
8819
|
emitNode(vectorInstanceDrawn(node), depth + 1);
|
|
8597
8820
|
lines.push(`${indent(depth)}</g>`);
|
|
8598
8821
|
};
|
|
8599
8822
|
const emitFrame = (node, depth) => {
|
|
8600
8823
|
const f = node.frame;
|
|
8601
|
-
const data = { ...f, ..._optionalChain([node, 'access',
|
|
8824
|
+
const data = { ...f, ..._optionalChain([node, 'access', _241 => _241.effects, 'optionalAccess', _242 => _242.length]) ? { effects: node.effects } : {} };
|
|
8602
8825
|
lines.push(`${indent(depth)}<g${common(node)} data-vector-frame="${escapeAttr2(JSON.stringify(data))}">`);
|
|
8603
8826
|
const rect = vectorFrameRectPath(f);
|
|
8604
8827
|
if (f.fill !== void 0 && f.fill !== null && f.fill !== "none") {
|
|
@@ -8613,7 +8836,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8613
8836
|
ref = ` clip-path="url(#${escapeAttr2(id)})"`;
|
|
8614
8837
|
}
|
|
8615
8838
|
lines.push(`${indent(depth + 1)}<g data-vector-part="frame-contents"${ref}>`);
|
|
8616
|
-
if (_optionalChain([node, 'access',
|
|
8839
|
+
if (_optionalChain([node, 'access', _243 => _243.masterArt, 'optionalAccess', _244 => _244.length])) {
|
|
8617
8840
|
lines.push(`${indent(depth + 2)}<g data-vector-part="frame-master">`);
|
|
8618
8841
|
for (const child of node.masterArt) emit2(child, depth + 3);
|
|
8619
8842
|
lines.push(`${indent(depth + 2)}</g>`);
|
|
@@ -8642,7 +8865,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8642
8865
|
if (hasOwnVectorAppearance(node)) {
|
|
8643
8866
|
const live2 = {
|
|
8644
8867
|
kind: node.type,
|
|
8645
|
-
..._optionalChain([node, 'access',
|
|
8868
|
+
..._optionalChain([node, 'access', _245 => _245.effects, 'optionalAccess', _246 => _246.length]) ? { effects: node.effects } : {},
|
|
8646
8869
|
...node.type === "group" && node.liveBoolean ? { liveBoolean: node.liveBoolean } : {},
|
|
8647
8870
|
...node.type === "group" && node.symmetry ? { symmetry: node.symmetry } : {}
|
|
8648
8871
|
};
|
|
@@ -8693,7 +8916,7 @@ function vectorDocumentToSvg(doc, options = {}) {
|
|
|
8693
8916
|
data += ` data-vector-width-profile="${widthProfileToAttribute(profile)}"`;
|
|
8694
8917
|
if (node.strokeLinecap && node.strokeLinecap !== "butt") data += ` data-vector-stroke-linecap="${node.strokeLinecap}"`;
|
|
8695
8918
|
if (node.strokeLinejoin && node.strokeLinejoin !== "miter") data += ` data-vector-stroke-linejoin="${node.strokeLinejoin}"`;
|
|
8696
|
-
if (_optionalChain([node, 'access',
|
|
8919
|
+
if (_optionalChain([node, 'access', _247 => _247.strokeDasharray, 'optionalAccess', _248 => _248.length])) data += ` data-vector-stroke-dasharray="${node.strokeDasharray.map(num3).join(" ")}"`;
|
|
8697
8920
|
}
|
|
8698
8921
|
lines.push(`${indent(depth)}<g${common(node)}${data}>`);
|
|
8699
8922
|
lines.push(`${indent(depth + 1)}<path data-vector-part="fill" d="${d}"${fillAttrs}${live}/>`);
|
|
@@ -8874,7 +9097,7 @@ function readStyle(el, parent, cssRules) {
|
|
|
8874
9097
|
const { mixBlendMode: _m, filter: _f, ...inherited } = parent;
|
|
8875
9098
|
const out = { ...inherited };
|
|
8876
9099
|
for (const [attr, key] of Object.entries(STYLE_KEYS)) if (el.attrs[attr] !== void 0) out[key] = el.attrs[attr].trim();
|
|
8877
|
-
if (_optionalChain([cssRules, 'optionalAccess',
|
|
9100
|
+
if (_optionalChain([cssRules, 'optionalAccess', _249 => _249.length])) {
|
|
8878
9101
|
for (const rule of cssRules) {
|
|
8879
9102
|
if (matchesSelector(el, rule.selector)) {
|
|
8880
9103
|
for (const [prop, val] of Object.entries(rule.properties)) {
|
|
@@ -8930,7 +9153,7 @@ function attrOrStyle(el, name) {
|
|
|
8930
9153
|
return el.attrs[name];
|
|
8931
9154
|
}
|
|
8932
9155
|
function urlId(value) {
|
|
8933
|
-
return _nullishCoalesce(_optionalChain([/^url\(\s*['"]?#([^'")\s]+)['"]?\s*\)/, 'access',
|
|
9156
|
+
return _nullishCoalesce(_optionalChain([/^url\(\s*['"]?#([^'")\s]+)['"]?\s*\)/, 'access', _250 => _250.exec, 'call', _251 => _251((_nullishCoalesce(value, () => ( ""))).trim()), 'optionalAccess', _252 => _252[1]]), () => ( null));
|
|
8934
9157
|
}
|
|
8935
9158
|
function clipRulesAsFillRules(el) {
|
|
8936
9159
|
const attrs = { ...el.attrs };
|
|
@@ -8995,9 +9218,9 @@ function resolveGradient(id, raw) {
|
|
|
8995
9218
|
for (let el = first; el && !chain.includes(el) && chain.length < 32; ) {
|
|
8996
9219
|
chain.push(el);
|
|
8997
9220
|
const href = _nullishCoalesce(el.attrs.href, () => ( el.attrs["xlink:href"]));
|
|
8998
|
-
el = _optionalChain([href, 'optionalAccess',
|
|
9221
|
+
el = _optionalChain([href, 'optionalAccess', _253 => _253.startsWith, 'call', _254 => _254("#")]) ? raw.get(href.slice(1)) : void 0;
|
|
8999
9222
|
}
|
|
9000
|
-
const attr = (name) => _optionalChain([chain, 'access',
|
|
9223
|
+
const attr = (name) => _optionalChain([chain, 'access', _255 => _255.find, 'call', _256 => _256((el) => el.attrs[name] !== void 0), 'optionalAccess', _257 => _257.attrs, 'access', _258 => _258[name]]);
|
|
9001
9224
|
const stops = _nullishCoalesce(chain.map(readStops).find((s) => s.length), () => ( []));
|
|
9002
9225
|
if (!stops.length) return null;
|
|
9003
9226
|
const user = attr("gradientUnits") === "userSpaceOnUse";
|
|
@@ -9169,7 +9392,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9169
9392
|
const stackedPath = (g, _style, m, meta) => {
|
|
9170
9393
|
const fillEl = g.children.find((c) => c.name === "path" && c.attrs["data-vector-part"] === "fill");
|
|
9171
9394
|
const subpaths = fillEl ? shapeOf(fillEl) : null;
|
|
9172
|
-
if (!_optionalChain([subpaths, 'optionalAccess',
|
|
9395
|
+
if (!_optionalChain([subpaths, 'optionalAccess', _259 => _259.length])) return null;
|
|
9173
9396
|
const parse = (v2) => {
|
|
9174
9397
|
try {
|
|
9175
9398
|
return v2 ? JSON.parse(v2) : [];
|
|
@@ -9188,7 +9411,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9188
9411
|
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))]);
|
|
9189
9412
|
for (const n of nodes2) {
|
|
9190
9413
|
const prev = out[out.length - 1];
|
|
9191
|
-
if (_optionalChain([prev, 'optionalAccess',
|
|
9414
|
+
if (_optionalChain([prev, 'optionalAccess', _260 => _260.type]) === "path" && n.type === "path" && key(prev) === key(n)) {
|
|
9192
9415
|
const fills = vectorFills(n);
|
|
9193
9416
|
const strokesBefore = vectorStrokes(prev);
|
|
9194
9417
|
if (!(fills.length && strokesBefore.length)) {
|
|
@@ -9206,7 +9429,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9206
9429
|
const part = (name) => g.children.find((c) => c.name === "path" && c.attrs["data-vector-part"] === name);
|
|
9207
9430
|
const fillEl = part("fill");
|
|
9208
9431
|
const subpaths = fillEl ? shapeOf(fillEl) : null;
|
|
9209
|
-
if (!fillEl || !_optionalChain([subpaths, 'optionalAccess',
|
|
9432
|
+
if (!fillEl || !_optionalChain([subpaths, 'optionalAccess', _261 => _261.length])) return null;
|
|
9210
9433
|
const a = g.attrs;
|
|
9211
9434
|
const fs = readStyle(fillEl, style, styleRules);
|
|
9212
9435
|
const strokeEl = part("stroke");
|
|
@@ -9243,7 +9466,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9243
9466
|
...profile.length ? { strokeWidthProfile: profile } : {},
|
|
9244
9467
|
...keptCap ? { strokeLinecap: keptCap } : {},
|
|
9245
9468
|
...keptJoin ? { strokeLinejoin: keptJoin } : {},
|
|
9246
|
-
..._optionalChain([keptDash, 'optionalAccess',
|
|
9469
|
+
..._optionalChain([keptDash, 'optionalAccess', _262 => _262.length]) ? { strokeDasharray: keptDash } : {}
|
|
9247
9470
|
};
|
|
9248
9471
|
return placed(node, m);
|
|
9249
9472
|
};
|
|
@@ -9308,8 +9531,8 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9308
9531
|
} else {
|
|
9309
9532
|
const fill = json2(g.attrs["data-vector-fill"]);
|
|
9310
9533
|
const stroke = json2(g.attrs["data-vector-stroke"]);
|
|
9311
|
-
node.fill = fill == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call',
|
|
9312
|
-
node.stroke = stroke == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call',
|
|
9534
|
+
node.fill = fill == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call', _263 => _263([{ paint: fill }]), 'access', _264 => _264[0], 'optionalAccess', _265 => _265.paint]), () => ( null));
|
|
9535
|
+
node.stroke = stroke == null ? null : _nullishCoalesce(_optionalChain([sanitizeVectorFills, 'call', _266 => _266([{ paint: stroke }]), 'access', _267 => _267[0], 'optionalAccess', _268 => _268.paint]), () => ( null));
|
|
9313
9536
|
const settings = json2(g.attrs["data-vector-stroke-settings"]);
|
|
9314
9537
|
if (settings && typeof settings === "object") {
|
|
9315
9538
|
const strokes = sanitizeVectorStrokes([{ paint: _nullishCoalesce(node.stroke, () => ( "#000")), ...settings }]);
|
|
@@ -9345,8 +9568,8 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9345
9568
|
const anchor = attrOrStyle(el, "text-anchor");
|
|
9346
9569
|
const first0 = (v2) => _nullishCoalesce(numberList(v2)[0], () => ( 0));
|
|
9347
9570
|
const tspan = el.children.find((c) => c.name === "tspan");
|
|
9348
|
-
const x = el.attrs.x !== void 0 ? first0(el.attrs.x) : first0(_optionalChain([tspan, 'optionalAccess',
|
|
9349
|
-
const y = el.attrs.y !== void 0 ? first0(el.attrs.y) : first0(_optionalChain([tspan, 'optionalAccess',
|
|
9571
|
+
const x = el.attrs.x !== void 0 ? first0(el.attrs.x) : first0(_optionalChain([tspan, 'optionalAccess', _269 => _269.attrs, 'access', _270 => _270.x]));
|
|
9572
|
+
const y = el.attrs.y !== void 0 ? first0(el.attrs.y) : first0(_optionalChain([tspan, 'optionalAccess', _271 => _271.attrs, 'access', _272 => _272.y]));
|
|
9350
9573
|
const fillValue = _nullishCoalesce(attrOrStyle(el, "fill"), () => ( style.fill));
|
|
9351
9574
|
let node = {
|
|
9352
9575
|
id: idFor(el),
|
|
@@ -9377,12 +9600,12 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9377
9600
|
if (symbolOfElement.has(el)) return symbolOfElement.get(el);
|
|
9378
9601
|
symbolOfElement.set(el, null);
|
|
9379
9602
|
const own = json2(el.attrs["data-vector-symbol"]);
|
|
9380
|
-
let id = typeof _optionalChain([own, 'optionalAccess',
|
|
9603
|
+
let id = typeof _optionalChain([own, 'optionalAccess', _273 => _273.id]) === "string" && own.id ? own.id : _nullishCoalesce(el.attrs.id, () => ( createId()));
|
|
9381
9604
|
while (usedSymbolIds.has(id)) id = `${id}-${usedSymbolIds.size}`;
|
|
9382
9605
|
usedSymbolIds.add(id);
|
|
9383
9606
|
const style = readStyle(el, rootStyle, styleRules);
|
|
9384
9607
|
const nodes2 = el.name === "symbol" ? visit2(el, style, IDENTITY_MATRIX) : visitOne({ ...el, attrs: { ...el.attrs, transform: "" } }, rootStyle, parseSvgTransform(el.attrs.transform));
|
|
9385
|
-
symbols.push({ id, name: typeof _optionalChain([own, 'optionalAccess',
|
|
9608
|
+
symbols.push({ id, name: typeof _optionalChain([own, 'optionalAccess', _274 => _274.name]) === "string" && own.name ? own.name : _nullishCoalesce(el.attrs.id, () => ( "Symbol")), nodes: nodes2 });
|
|
9386
9609
|
symbolOfElement.set(el, id);
|
|
9387
9610
|
return id;
|
|
9388
9611
|
};
|
|
@@ -9394,13 +9617,13 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9394
9617
|
if (!symbolId) return null;
|
|
9395
9618
|
const own = json2(el.attrs["data-vector-instance"]);
|
|
9396
9619
|
const place2 = multiplyMatrices(translateMatrix(length(el.attrs.x), length(el.attrs.y)), m);
|
|
9397
|
-
const node = { id: idFor(el), type: "instance", ...meta, symbolId, ..._optionalChain([own, 'optionalAccess',
|
|
9620
|
+
const node = { id: idFor(el), type: "instance", ...meta, symbolId, ..._optionalChain([own, 'optionalAccess', _275 => _275.scaleStrokes]) === false ? { scaleStrokes: false } : {}, ..._optionalChain([own, 'optionalAccess', _276 => _276.overrides]) ? { overrides: own.overrides } : {} };
|
|
9398
9621
|
return isIdentityMatrix(place2) ? node : { ...node, transform: place2 };
|
|
9399
9622
|
};
|
|
9400
9623
|
const ownInstance = (g, m, meta) => {
|
|
9401
9624
|
const raw = json2(g.attrs["data-vector-instance"]);
|
|
9402
9625
|
if (!raw || typeof raw.symbolId !== "string") return null;
|
|
9403
|
-
const sym2 = [...byId.values()].find((e) => e.name === "symbol" && _optionalChain([json2, 'call',
|
|
9626
|
+
const sym2 = [...byId.values()].find((e) => e.name === "symbol" && _optionalChain([json2, 'call', _277 => _277(e.attrs["data-vector-symbol"]), 'optionalAccess', _278 => _278.id]) === raw.symbolId);
|
|
9404
9627
|
const symbolId = sym2 ? symbolFor(sym2) : raw.symbolId;
|
|
9405
9628
|
if (!symbolId) return null;
|
|
9406
9629
|
const t = Array.isArray(raw.transform) && raw.transform.length === 6 && raw.transform.every(Number.isFinite) ? raw.transform : IDENTITY_MATRIX;
|
|
@@ -9408,7 +9631,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9408
9631
|
const drawn = g.children.find((c) => c.name === "g");
|
|
9409
9632
|
const effects = sanitizeVectorEffects(raw.effects);
|
|
9410
9633
|
const node = {
|
|
9411
|
-
id: _nullishCoalesce(_optionalChain([drawn, 'optionalAccess',
|
|
9634
|
+
id: _nullishCoalesce(_optionalChain([drawn, 'optionalAccess', _279 => _279.attrs, 'access', _280 => _280.id]), () => ( idFor(g))),
|
|
9412
9635
|
type: "instance",
|
|
9413
9636
|
...meta,
|
|
9414
9637
|
symbolId,
|
|
@@ -9465,12 +9688,12 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9465
9688
|
const masked = (el, nodes2, m) => {
|
|
9466
9689
|
let out = nodes2;
|
|
9467
9690
|
const clipEl = rawMasks.get(_nullishCoalesce(urlId(attrOrStyle(el, "clip-path")), () => ( "")));
|
|
9468
|
-
if (_optionalChain([clipEl, 'optionalAccess',
|
|
9691
|
+
if (_optionalChain([clipEl, 'optionalAccess', _281 => _281.name]) === "clipPath") {
|
|
9469
9692
|
const source = maskNode(clipEl, m, out, clipEl.attrs.clipPathUnits);
|
|
9470
9693
|
if (source) out = [{ id: idFor({ name: "g", attrs: {}, children: [] }), type: "group", name: "Clip Group", mask: { type: "clip" }, children: [source, ...out] }];
|
|
9471
9694
|
}
|
|
9472
9695
|
const maskEl = rawMasks.get(_nullishCoalesce(urlId(attrOrStyle(el, "mask")), () => ( "")));
|
|
9473
|
-
if (_optionalChain([maskEl, 'optionalAccess',
|
|
9696
|
+
if (_optionalChain([maskEl, 'optionalAccess', _282 => _282.name]) === "mask") {
|
|
9474
9697
|
const source = maskNode(maskEl, m, out, maskEl.attrs.maskContentUnits);
|
|
9475
9698
|
const type = attrOrStyle(maskEl, "mask-type") === "alpha" ? "alpha" : "luminance";
|
|
9476
9699
|
if (source) out = [{ id: idFor({ name: "g", attrs: {}, children: [] }), type: "group", name: "Opacity Mask", mask: { type }, children: [source, ...out] }];
|
|
@@ -9492,19 +9715,19 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9492
9715
|
let sourceEl = part("mask-source");
|
|
9493
9716
|
if (!sourceEl) {
|
|
9494
9717
|
const el = rawMasks.get(_nullishCoalesce(urlId(maskedEl.attrs.mask), () => ( "")));
|
|
9495
|
-
const invert2 = _optionalChain([el, 'optionalAccess',
|
|
9718
|
+
const invert2 = _optionalChain([el, 'optionalAccess', _283 => _283.children, 'access', _284 => _284.find, 'call', _285 => _285((c) => c.name === "g" && c.attrs["data-vector-part"] === "mask-invert")]);
|
|
9496
9719
|
sourceEl = _nullishCoalesce(invert2, () => ( el));
|
|
9497
9720
|
}
|
|
9498
9721
|
const source = sourceEl ? visit2(sourceEl, style, m)[0] : void 0;
|
|
9499
9722
|
let contents = visit2(maskedEl, style, m);
|
|
9500
9723
|
let effects;
|
|
9501
9724
|
const wrapper = contents.length === 1 && contents[0].type === "group" && contents[0].id === `${id}~content` ? contents[0] : null;
|
|
9502
|
-
if (_optionalChain([wrapper, 'optionalAccess',
|
|
9725
|
+
if (_optionalChain([wrapper, 'optionalAccess', _286 => _286.type]) === "group") {
|
|
9503
9726
|
effects = _nullishCoalesce(wrapper.effects, () => ( void 0));
|
|
9504
9727
|
contents = wrapper.children;
|
|
9505
9728
|
}
|
|
9506
9729
|
if (!source) return contents.length ? { id, type: "group", ...meta, children: contents } : null;
|
|
9507
|
-
return { id, type: "group", ...meta, mask, ..._optionalChain([effects, 'optionalAccess',
|
|
9730
|
+
return { id, type: "group", ...meta, mask, ..._optionalChain([effects, 'optionalAccess', _287 => _287.length]) ? { effects } : {}, children: [source, ...contents] };
|
|
9508
9731
|
};
|
|
9509
9732
|
const frameGroup = (g, style, m, meta) => {
|
|
9510
9733
|
const raw = parseJson(g.attrs["data-vector-frame"]);
|
|
@@ -9516,7 +9739,7 @@ function parseVectorSvg(svg, options = {}) {
|
|
|
9516
9739
|
const { rigid, residual } = decomposeRigid(m);
|
|
9517
9740
|
const r = _chunkGF2RBSDMcjs.bezierPathBounds.call(void 0, _chunkGF2RBSDMcjs.transformBezierPath.call(void 0, subpathsToBezier(vectorFrameRectPath(frame)), residual));
|
|
9518
9741
|
const back = invertMatrix(rigid);
|
|
9519
|
-
const effects = sanitizeVectorEffects(_optionalChain([raw, 'optionalAccess',
|
|
9742
|
+
const effects = sanitizeVectorEffects(_optionalChain([raw, 'optionalAccess', _288 => _288.effects]));
|
|
9520
9743
|
return {
|
|
9521
9744
|
id,
|
|
9522
9745
|
type: "group",
|
|
@@ -9988,13 +10211,13 @@ function hitTestVectorNode(node, p, tolerance = 0, parent = IDENTITY_MATRIX, opt
|
|
|
9988
10211
|
}
|
|
9989
10212
|
if (isVectorMaskGroup(node)) {
|
|
9990
10213
|
const m = multiplyMatrices(nodeMatrix(node), parent);
|
|
9991
|
-
const entered = !!_optionalChain([options, 'access',
|
|
10214
|
+
const entered = !!_optionalChain([options, 'access', _289 => _289.entered, 'optionalAccess', _290 => _290.has, 'call', _291 => _291(node.id)]);
|
|
9992
10215
|
if (!entered && isVectorMaskActive(node) && !vectorMaskContains(node, applyMatrix(invertMatrix(m), p), tolerance)) return false;
|
|
9993
10216
|
const shown = !entered && hasOwnVectorAppearance(node) ? expandVectorAppearance(node).children : node.children;
|
|
9994
10217
|
for (let i = shown.length - 1; i >= 1; i--) if (hitTestVectorNode(shown[i], p, tolerance, m, options)) return true;
|
|
9995
10218
|
return entered && hitTestVectorMaskSource(node, p, tolerance, m, options);
|
|
9996
10219
|
}
|
|
9997
|
-
if (!(node.type === "group" && (!hasOwnVectorAppearance(node) || _optionalChain([options, 'access',
|
|
10220
|
+
if (!(node.type === "group" && (!hasOwnVectorAppearance(node) || _optionalChain([options, 'access', _292 => _292.entered, 'optionalAccess', _293 => _293.has, 'call', _294 => _294(node.id)])))) node = expandVectorAppearance(node);
|
|
9998
10221
|
if (node.type === "group") {
|
|
9999
10222
|
const m = multiplyMatrices(nodeMatrix(node), parent);
|
|
10000
10223
|
return node.children.some((c) => hitTestVectorNode(c, p, tolerance, m, options));
|
|
@@ -10006,7 +10229,7 @@ function hitTestVectorNode(node, p, tolerance = 0, parent = IDENTITY_MATRIX, opt
|
|
|
10006
10229
|
function hitTestVectorMaskSource(group, p, tolerance, m, options) {
|
|
10007
10230
|
const source = group.children[0];
|
|
10008
10231
|
if (source.visible === false) return false;
|
|
10009
|
-
if (_optionalChain([group, 'access',
|
|
10232
|
+
if (_optionalChain([group, 'access', _295 => _295.mask, 'optionalAccess', _296 => _296.type]) !== "clip") return hitTestVectorNode(source, p, tolerance, m, options);
|
|
10010
10233
|
const paths = collectPathNodes(source).filter((n) => n.visible !== false);
|
|
10011
10234
|
const pt2 = [p.x, p.y];
|
|
10012
10235
|
return paths.some((n) => {
|
|
@@ -10055,24 +10278,24 @@ function mapAnchor(a, m) {
|
|
|
10055
10278
|
}
|
|
10056
10279
|
function bakeIntoGeometry(node, m) {
|
|
10057
10280
|
if (isIdentityMatrix(m)) return node;
|
|
10058
|
-
if (_optionalChain([node, 'access',
|
|
10281
|
+
if (_optionalChain([node, 'access', _297 => _297.effects, 'optionalAccess', _298 => _298.length])) node = { ...node, effects: transformVectorEffects(node.effects, m, node) };
|
|
10059
10282
|
if (isVectorFrame(node)) return bakeFrame(node, m);
|
|
10060
10283
|
if (node.type === "group") {
|
|
10061
10284
|
const group = node;
|
|
10062
10285
|
const children = group.children.map((c) => transformVectorNode(c, m));
|
|
10063
10286
|
const sym2 = group.symmetry ? { symmetry: transformVectorSymmetry(group.symmetry, m) } : {};
|
|
10064
|
-
const spine = _optionalChain([group, 'access',
|
|
10287
|
+
const spine = _optionalChain([group, 'access', _299 => _299.blend, 'optionalAccess', _300 => _300.spine]);
|
|
10065
10288
|
if (!spine) return { ...group, ...sym2, children };
|
|
10066
10289
|
const moved = { closed: spine.closed, anchors: spine.anchors.map((a) => mapAnchor(a, m)) };
|
|
10067
10290
|
return { ...group, children, blend: { ...group.blend, spine: moved } };
|
|
10068
10291
|
}
|
|
10069
10292
|
const path = node.type === "text" ? bakeVectorTextGeometry(node, m) : node;
|
|
10070
10293
|
const flips = m[0] * m[3] - m[1] * m[2] < 0;
|
|
10071
|
-
const mirrored = flips && _optionalChain([path, 'access',
|
|
10294
|
+
const mirrored = flips && _optionalChain([path, 'access', _301 => _301.strokeWidthProfile, 'optionalAccess', _302 => _302.length]);
|
|
10072
10295
|
const layer = (l) => ({
|
|
10073
10296
|
...l,
|
|
10074
10297
|
...isVectorGradient(l.paint) || isVectorShadedPaint(l.paint) ? { paint: transformVectorPaint(l.paint, m) } : {},
|
|
10075
|
-
...flips && _optionalChain([l, 'access',
|
|
10298
|
+
...flips && _optionalChain([l, 'access', _303 => _303.strokeWidthProfile, 'optionalAccess', _304 => _304.length]) ? { strokeWidthProfile: mirrorWidthProfile(l.strokeWidthProfile) } : {}
|
|
10076
10299
|
});
|
|
10077
10300
|
return {
|
|
10078
10301
|
...path,
|
|
@@ -10307,7 +10530,7 @@ function roundSubpaths(subpaths, precision = 3) {
|
|
|
10307
10530
|
|
|
10308
10531
|
// src/vector/symmetry.ts
|
|
10309
10532
|
function isVectorSymmetryGroup(node) {
|
|
10310
|
-
return _optionalChain([node, 'optionalAccess',
|
|
10533
|
+
return _optionalChain([node, 'optionalAccess', _305 => _305.type]) === "group" && !!node.symmetry && !node.blend && !node.liveBoolean && !node.mask && !node.frame;
|
|
10311
10534
|
}
|
|
10312
10535
|
var rad = (deg) => deg * Math.PI / 180;
|
|
10313
10536
|
var exact = (v2) => Math.abs(v2) < 1e-12 ? 0 : v2;
|
|
@@ -10887,4 +11110,10 @@ function transformVectorSymmetry(s, m) {
|
|
|
10887
11110
|
|
|
10888
11111
|
|
|
10889
11112
|
|
|
10890
|
-
exports.isVectorMeshGradient = isVectorMeshGradient; exports.isVectorFreeformGradient = isVectorFreeformGradient; exports.isVectorShadedPaint = isVectorShadedPaint; exports.vectorRgbaToCss = vectorRgbaToCss; exports.VECTOR_MESH_MAX = VECTOR_MESH_MAX; exports.createVectorMeshGradient = createVectorMeshGradient; exports.vectorMeshPointAt = vectorMeshPointAt; exports.vectorMeshColorAt = vectorMeshColorAt; exports.vectorMeshLines = vectorMeshLines; exports.vectorFreeformSpreadScale = vectorFreeformSpreadScale; exports.vectorFreeformLineSegments = vectorFreeformLineSegments; exports.vectorFreeformField = vectorFreeformField; exports.sampleVectorFreeform = sampleVectorFreeform; exports.autoVectorFreeformGradient = autoVectorFreeformGradient; exports.vectorShadedSvgDefs = vectorShadedSvgDefs; exports.mapVectorShadedPaint = mapVectorShadedPaint; exports.transformVectorShadedPaint = transformVectorShadedPaint; exports.sanitizeVectorShadedPaint = sanitizeVectorShadedPaint; exports.removeVectorFreeformPoint = removeVectorFreeformPoint; exports.nearestVectorShadingPoint = nearestVectorShadingPoint; exports.VECTOR_CORNER_KINDS = VECTOR_CORNER_KINDS; exports.VECTOR_GRADIENT_TYPES = VECTOR_GRADIENT_TYPES; exports.VECTOR_GRADIENT_SPREADS = VECTOR_GRADIENT_SPREADS; exports.VECTOR_GRADIENT_INTERPOLATIONS = VECTOR_GRADIENT_INTERPOLATIONS; exports.VECTOR_STROKE_GRADIENT_MODES = VECTOR_STROKE_GRADIENT_MODES; exports.VECTOR_ARROWHEADS = VECTOR_ARROWHEADS; exports.VECTOR_BLEND_MODES = VECTOR_BLEND_MODES; exports.VECTOR_HORIZONTAL_RESIZING = VECTOR_HORIZONTAL_RESIZING; exports.VECTOR_VERTICAL_RESIZING = VECTOR_VERTICAL_RESIZING; exports.VECTOR_LENS_TYPES = VECTOR_LENS_TYPES; exports.VECTOR_CONNECTOR_SIDES = VECTOR_CONNECTOR_SIDES; exports.VECTOR_CONNECTOR_ROUTES = VECTOR_CONNECTOR_ROUTES; exports.VECTOR_BLEND_SPACINGS = VECTOR_BLEND_SPACINGS; exports.VECTOR_MASK_TYPES = VECTOR_MASK_TYPES; exports.VECTOR_SYMMETRY_MODES = VECTOR_SYMMETRY_MODES; exports.VECTOR_TEXT_ALIGNS = VECTOR_TEXT_ALIGNS; exports.VECTOR_PATH_TEXT_BASELINES = VECTOR_PATH_TEXT_BASELINES; exports.VECTOR_PERSPECTIVE_PLANES = VECTOR_PERSPECTIVE_PLANES; exports.VECTOR_CONSTRAINT_KINDS = VECTOR_CONSTRAINT_KINDS; exports.VECTOR_TOOLS = VECTOR_TOOLS; exports.VECTOR_TRANSFORM_HANDLES = VECTOR_TRANSFORM_HANDLES; exports.VECTOR_PATHFINDER_OPERATIONS = VECTOR_PATHFINDER_OPERATIONS; exports.VECTOR_EFFECT_TYPES = VECTOR_EFFECT_TYPES; exports.VECTOR_MERGE_MODES = VECTOR_MERGE_MODES; exports.VECTOR_FILTER_TYPES = VECTOR_FILTER_TYPES; exports.isVectorGradient = isVectorGradient; exports.parseVectorColor = parseVectorColor; exports.VECTOR_GRADIENT_MIN_STOPS = VECTOR_GRADIENT_MIN_STOPS; exports.gradientMidpointRemap = gradientMidpointRemap; exports.sortedVectorGradientStops = sortedVectorGradientStops; exports.vectorGradientNeedsExpansion = vectorGradientNeedsExpansion; exports.vectorGradientRamp = vectorGradientRamp; exports.sampleVectorGradient = sampleVectorGradient; exports.expandVectorGradientStops = expandVectorGradientStops; exports.samplePlainStops = samplePlainStops; exports.reverseVectorGradient = reverseVectorGradient; exports.insertVectorGradientStop = insertVectorGradientStop; exports.moveVectorGradientStop = moveVectorGradientStop; exports.removeVectorGradientStop = removeVectorGradientStop; exports.vectorGradientMidpointPosition = vectorGradientMidpointPosition; exports.vectorGradientMidpointFromPosition = vectorGradientMidpointFromPosition; exports.spanVectorGradientStops = spanVectorGradientStops; exports.hasExplicitGradientGeometry = hasExplicitGradientGeometry; exports.vectorGradientPoints = vectorGradientPoints; exports.vectorBoxMatrix = vectorBoxMatrix; exports.vectorGradientUnitsMatrix = vectorGradientUnitsMatrix; exports.vectorGradientMatrix = vectorGradientMatrix; exports.vectorGradientFocalParam = vectorGradientFocalParam; exports.vectorGradientParam = vectorGradientParam; exports.applyVectorGradientSpread = applyVectorGradientSpread; exports.vectorGradientTAt = vectorGradientTAt; exports.sampleVectorGradientAt = sampleVectorGradientAt; exports.vectorGradientAspect = vectorGradientAspect; exports.explicitVectorGradient = explicitVectorGradient; exports.pinVectorGradient = pinVectorGradient; exports.transformVectorGradient = transformVectorGradient; exports.mapVectorGradient = mapVectorGradient; exports.mapVectorPaint = mapVectorPaint; exports.transformVectorPaint = transformVectorPaint; exports.isCentredVectorGradient = isCentredVectorGradient; exports.vectorGradientHandles = vectorGradientHandles; exports.moveVectorGradientHandle = moveVectorGradientHandle; exports.setVectorGradientVector = setVectorGradientVector; exports.VECTOR_GRADIENT_MAX_PERIODS = VECTOR_GRADIENT_MAX_PERIODS; exports.periodicVectorGradientStops = periodicVectorGradientStops; exports.expandVectorGradientSpread = expandVectorGradientSpread; exports.vectorGradientArea = vectorGradientArea; exports.patternAttrs = patternAttrs; exports.vectorGradientSvgDefs = vectorGradientSvgDefs; exports.sampleVectorPaintDefAt = sampleVectorPaintDefAt; exports.sanitizeVectorGradient = sanitizeVectorGradient; exports.convertVectorGradient = convertVectorGradient; exports.defaultVectorGradient = defaultVectorGradient; exports.applyVectorGradientPatch = applyVectorGradientPatch; exports.IDENTITY_MATRIX = IDENTITY_MATRIX; exports.multiplyMatrices = multiplyMatrices; exports.translateMatrix = translateMatrix; exports.scaleMatrix = scaleMatrix; exports.rotateMatrix = rotateMatrix; exports.matrixAbout = matrixAbout; exports.skewMatrix = skewMatrix; exports.applyMatrix = applyMatrix; exports.isIdentityMatrix = isIdentityMatrix; exports.invertMatrix = invertMatrix; exports.applyMatrixLinear = applyMatrixLinear; exports.matrixRotation = matrixRotation; exports.decomposeRigid = decomposeRigid; exports.isVectorSymmetryGroup = isVectorSymmetryGroup; exports.vectorSymmetryMatrices = vectorSymmetryMatrices; exports.vectorSymmetryDrawn = vectorSymmetryDrawn; exports.vectorSymmetryAxes = vectorSymmetryAxes; exports.sanitizeVectorSymmetry = sanitizeVectorSymmetry; exports.VECTOR_SYMMETRY_MODE_LABELS = VECTOR_SYMMETRY_MODE_LABELS; exports.transformVectorSymmetry = transformVectorSymmetry; exports.vectorCornerAt = vectorCornerAt; exports.vectorCorners = vectorCorners; exports.cornerSetback = cornerSetback; exports.fitCornerRadius = fitCornerRadius; exports.cornerBisectorPoint = cornerBisectorPoint; exports.cornerRadiusChange = cornerRadiusChange; exports.hasVectorCorners = hasVectorCorners; exports.expandVectorCornersOf = expandVectorCornersOf; exports.expandVectorCorners = expandVectorCorners; exports.setAnchorCorner = setAnchorCorner; exports.nextVectorCornerKind = nextVectorCornerKind; exports.setSubpathCorners = setSubpathCorners; exports.VECTOR_WIDTH_PROFILE_MAX_POINTS = VECTOR_WIDTH_PROFILE_MAX_POINTS; exports.VECTOR_WIDTH_PROFILE_MAX_SCALE = VECTOR_WIDTH_PROFILE_MAX_SCALE; exports.VECTOR_WIDTH_SAME_T = VECTOR_WIDTH_SAME_T; exports.VECTOR_WIDTH_PRESETS = VECTOR_WIDTH_PRESETS; exports.VECTOR_WIDTH_PRESET_IDS = VECTOR_WIDTH_PRESET_IDS; exports.sanitizeWidthProfile = sanitizeWidthProfile; exports.isUniformWidthProfile = isUniformWidthProfile; exports.widthProfileAt = widthProfileAt; exports.widthProfileMaxScale = widthProfileMaxScale; exports.widthProfilePreset = widthProfilePreset; exports.widthProfilePresetId = widthProfilePresetId; exports.reverseWidthProfile = reverseWidthProfile; exports.mirrorWidthProfile = mirrorWidthProfile; exports.insertWidthPoint = insertWidthPoint; exports.setWidthPoint = setWidthPoint; exports.removeWidthPoints = removeWidthPoints; exports.taperWaveFactor = taperWaveFactor; exports.generateWidthProfile = generateWidthProfile; exports.VECTOR_PRESSURE_NOMINAL = VECTOR_PRESSURE_NOMINAL; exports.pressureWidthProfile = pressureWidthProfile; exports.dashIntervals = dashIntervals; exports.variableStrokeRings = variableStrokeRings; exports.variableStrokeOutline = variableStrokeOutline; exports.nearestStrokePosition = nearestStrokePosition; exports.strokePositionPoint = strokePositionPoint; exports.isClosedBezierShape = isClosedBezierShape; exports.effectiveStrokeAlign = effectiveStrokeAlign; exports.strokeWidthProfileOf = strokeWidthProfileOf; exports.hasStrokeExtras = hasStrokeExtras; exports.vectorStrokeLineArea = vectorStrokeLineArea; exports.arrowheadWeight = arrowheadWeight; exports.arrowheadInset = arrowheadInset; exports.arrowheadPath = arrowheadPath; exports.vectorStrokeParts = vectorStrokeParts; exports.vectorStrokeOutlinePath = vectorStrokeOutlinePath; exports.hitTestVectorStroke = hitTestVectorStroke; exports.vectorStrokeReach = vectorStrokeReach; exports.vectorPaintSolid = vectorPaintSolid; exports.shadeVectorColor = shadeVectorColor; exports.vectorPathRings = vectorPathRings; exports.vectorExtrudeFaces = vectorExtrudeFaces; exports.VECTOR_BRUSHSTROKE_SCALE = VECTOR_BRUSHSTROKE_SCALE; exports.vectorBrushstrokeBrushes = vectorBrushstrokeBrushes; exports.vectorBrushstrokeBrush = vectorBrushstrokeBrush; exports.sanitizeVectorBrushstroke = sanitizeVectorBrushstroke; exports.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.isTextSpace = isTextSpace; exports.layoutText = layoutText; exports.textIndexAt = textIndexAt; exports.caretAt = caretAt; exports.textDecorations = textDecorations; exports.textRectPath = textRectPath; exports.textFragmentOutline = textFragmentOutline; exports.cssFontFamily = cssFontFamily; exports.cssFont = cssFont; exports.createCanvasTextShaper = createCanvasTextShaper; exports.createOutlineTextShaper = createOutlineTextShaper; exports.createMetricTextShaper = createMetricTextShaper; exports.setVectorTextShaper = setVectorTextShaper; exports.getVectorTextShaper = getVectorTextShaper; exports.vectorTextShaperGeneration = vectorTextShaperGeneration; exports.vectorTextHasOutlines = vectorTextHasOutlines; exports.vectorTextFamilies = vectorTextFamilies; exports.DEFAULT_VECTOR_FONT = DEFAULT_VECTOR_FONT; exports.VECTOR_CHARACTER_STYLE_KEYS = VECTOR_CHARACTER_STYLE_KEYS; exports.VECTOR_PARAGRAPH_STYLE_KEYS = VECTOR_PARAGRAPH_STYLE_KEYS; exports.VectorTextError = VectorTextError; exports.fitVectorTextRuns = fitVectorTextRuns; exports.vectorTextRuns = vectorTextRuns; exports.vectorTextStyleAt = vectorTextStyleAt; exports.measureVectorPath = measureVectorPath; exports.vectorPathAt = vectorPathAt; exports.vectorPathTextPositions = vectorPathTextPositions; exports.layoutVectorText = layoutVectorText; exports.glyphBox = glyphBox; exports.vectorTextPaths = vectorTextPaths; exports.vectorTextPaintSource = vectorTextPaintSource; exports.vectorTextCaret = vectorTextCaret; exports.vectorTextIndexAt = vectorTextIndexAt; exports.vectorTextSelectionQuads = vectorTextSelectionQuads; exports.patchVectorCharacterStyle = patchVectorCharacterStyle; exports.patchVectorParagraphStyle = patchVectorParagraphStyle; exports.sanitizeVectorTextFrame = sanitizeVectorTextFrame; exports.normalizeVectorTextRuns = normalizeVectorTextRuns; exports.sanitizeVectorTextFields = sanitizeVectorTextFields; exports.vectorTextRange = vectorTextRange; exports.replaceVectorText = replaceVectorText; exports.styleVectorText = styleVectorText; exports.bakeVectorTextGeometry = bakeVectorTextGeometry; exports.vectorTextName = vectorTextName; exports.pathTextFrameFromBezier = pathTextFrameFromBezier; exports.vectorTextBoxOutline = vectorTextBoxOutline; exports.vectorTextSpans = vectorTextSpans; exports.vectorTextGeometryNode = vectorTextGeometryNode; exports.vectorTextSpanSvg = vectorTextSpanSvg; exports.VECTOR_SYMBOL_MAX_DEPTH = VECTOR_SYMBOL_MAX_DEPTH; exports.vectorSymbolsUsedIn = vectorSymbolsUsedIn; exports.vectorSymbolUses = vectorSymbolUses; exports.resolveVectorSymbols = resolveVectorSymbols; exports.stripVectorSymbolArt = stripVectorSymbolArt; exports.scaleVectorStrokeWidths = scaleVectorStrokeWidths; exports.tintVectorNode = tintVectorNode; exports.prefixVectorIds = prefixVectorIds; exports.vectorInstanceGroup = vectorInstanceGroup; exports.composeVectorMatrices = composeVectorMatrices; exports.vectorBevelFaces = vectorBevelFaces; exports.isVectorLens = isVectorLens; exports.VECTOR_LENS_LABELS = VECTOR_LENS_LABELS; exports.VECTOR_LENS_SPECS = VECTOR_LENS_SPECS; exports.sanitizeVectorLens = sanitizeVectorLens; exports.vectorLensColorMap = vectorLensColorMap; exports.mapVectorPaintColors = mapVectorPaintColors; exports.vectorLensDrawn = vectorLensDrawn; exports.resolveVectorLenses = resolveVectorLenses; exports.stripVectorLensViews = stripVectorLensViews; exports.WARP_STYLES = WARP_STYLES; exports.WARP_STYLE_LABELS = WARP_STYLE_LABELS; exports.warpPresetGrid = warpPresetGrid; exports.warpPresetMesh = warpPresetMesh; exports.warpMeshColumns = warpMeshColumns; exports.warpMeshRows = warpMeshRows; exports.isValidWarpMesh = isValidWarpMesh; exports.fitWarpMesh = fitWarpMesh; exports.identityWarpMesh = identityWarpMesh; exports.evalWarpMesh = evalWarpMesh; exports.splitWarpMeshU = splitWarpMeshU; exports.splitWarpMeshV = splitWarpMeshV; exports.removeWarpMeshSplitU = removeWarpMeshSplitU; exports.removeWarpMeshSplitV = removeWarpMeshSplitV; exports.mapWarpMeshPoints = mapWarpMeshPoints; exports.resizeWarpMesh = resizeWarpMesh; exports.warpMeshControlBounds = warpMeshControlBounds; exports.warpMeshParamAt = warpMeshParamAt; exports.dragWarpMeshPoint = dragWarpMeshPoint; exports.pullWarpMesh = pullWarpMesh; exports.warpMeshEditPoints = warpMeshEditPoints; exports.warpMeshGridCurves = warpMeshGridCurves; exports.vectorMeshFromOutline = vectorMeshFromOutline; exports.vectorMeshOutline = vectorMeshOutline; exports.VECTOR_EFFECT_DEFAULTS = VECTOR_EFFECT_DEFAULTS; exports.VECTOR_EFFECT_LABELS = VECTOR_EFFECT_LABELS; exports.VECTOR_EFFECT_PARAM_SPECS = VECTOR_EFFECT_PARAM_SPECS; exports.vectorEnvelopeMesh = vectorEnvelopeMesh; exports.vectorEnvelopeMap = vectorEnvelopeMap; exports.normalizeVectorEffectParams = normalizeVectorEffectParams; exports.createVectorEffect = createVectorEffect; exports.activeVectorEffects = activeVectorEffects; exports.hasOwnVectorAppearance = hasOwnVectorAppearance; exports.hasVectorAppearance = hasVectorAppearance; exports.isVectorLiveBoolean = isVectorLiveBoolean; exports.vectorOperandOperation = vectorOperandOperation; exports.vectorLiveBooleanSteps = vectorLiveBooleanSteps; exports.clearVectorLiveBooleanCache = clearVectorLiveBooleanCache; exports.foldVectorBooleanOperands = foldVectorBooleanOperands; exports.applyVectorEffects = applyVectorEffects; exports.vectorInstanceDrawn = vectorInstanceDrawn; exports.vectorChildAppearanceShapes = vectorChildAppearanceShapes; exports.vectorEffectInputPaths = vectorEffectInputPaths; exports.vectorEffectInputBounds = vectorEffectInputBounds; exports.vectorNodeEnvelope = vectorNodeEnvelope; exports.vectorEnvelopeFrame = vectorEnvelopeFrame; exports.vectorAppearanceShapes = vectorAppearanceShapes; exports.vectorAppearanceOutline = vectorAppearanceOutline; exports.vectorAppearanceNodes = vectorAppearanceNodes; exports.expandVectorAppearance = expandVectorAppearance; exports.expandVectorAppearances = expandVectorAppearances; exports.sanitizeVectorEffects = sanitizeVectorEffects; exports.transformVectorEffects = transformVectorEffects; exports.vectorEnteredGroups = vectorEnteredGroups; exports.isVectorMasterPage = isVectorMasterPage; exports.vectorPages = vectorPages; exports.vectorMasterPages = vectorMasterPages; exports.vectorMasterArt = vectorMasterArt; exports.resolveVectorMasterPages = resolveVectorMasterPages; exports.stripVectorMasterArt = stripVectorMasterArt; exports.isVectorConnector = isVectorConnector; exports.vectorConnectionSites = vectorConnectionSites; exports.nearestVectorConnectionSite = nearestVectorConnectionSite; exports.vectorConnectorWorldAnchors = vectorConnectorWorldAnchors; exports.routeVectorConnector = routeVectorConnector; exports.rerouteVectorConnectors = rerouteVectorConnectors; exports.sanitizeVectorConnector = sanitizeVectorConnector; exports.VECTOR_CONNECTOR_ROUTE_LABELS = VECTOR_CONNECTOR_ROUTE_LABELS; exports.VECTOR_CONNECTOR_SIDE_LABELS = VECTOR_CONNECTOR_SIDE_LABELS; exports.getVectorConnectorPanel = getVectorConnectorPanel; exports.vectorConnectorTargetAt = vectorConnectorTargetAt; exports.vectorStrokeGradientDefs = vectorStrokeGradientDefs; exports.vectorCornersAttribute = vectorCornersAttribute; exports.applyVectorCornersAttribute = applyVectorCornersAttribute; exports.vectorPathLocalBounds = vectorPathLocalBounds; exports.vectorPaintToSvg = vectorPaintToSvg; exports.vectorStrokeSvgParts = vectorStrokeSvgParts; exports.vectorNodeLocalPaintBounds = vectorNodeLocalPaintBounds; exports.vectorNodeFilterSvg = vectorNodeFilterSvg; exports.widthProfileToAttribute = widthProfileToAttribute; exports.widthProfileFromAttribute = widthProfileFromAttribute; exports.vectorDocumentToSvg = vectorDocumentToSvg; exports.parseSvgTransform = parseSvgTransform; exports.parseVectorSvg = parseVectorSvg; exports.VECTOR_SPATIAL_MIN = VECTOR_SPATIAL_MIN; exports.VectorRTree = VectorRTree; exports.vectorNodePaintBox = vectorNodePaintBox; exports.vectorSpatialIndex = vectorSpatialIndex; exports.vectorNodesNear = vectorNodesNear; exports.cloneAnchor = cloneAnchor; exports.cloneSubpath = cloneSubpath; exports.cloneVectorNode = cloneVectorNode; exports.cloneVectorDocument = cloneVectorDocument; exports.hasPaint = hasPaint; exports.subpathSegmentCount = subpathSegmentCount; exports.subpathSegment = subpathSegment; exports.subpathsToBezier = subpathsToBezier; exports.vectorNodeToBezier = vectorNodeToBezier; exports.vectorPathData = vectorPathData; exports.inferAnchorType = inferAnchorType; exports.bezierToSubpaths = bezierToSubpaths; exports.walkVectorNodes = walkVectorNodes; exports.findVectorNode = findVectorNode; exports.locateVectorNode = locateVectorNode; exports.collectPaintedNodes = collectPaintedNodes; exports.collectPathNodes = collectPathNodes; exports.nodeMatrix = nodeMatrix; exports.vectorPathWorldBezier = vectorPathWorldBezier; exports.vectorNodeBounds = vectorNodeBounds; exports.unionBounds = unionBounds; exports.boundsIntersect = boundsIntersect; exports.boundsFromPoints = boundsFromPoints; exports.hitTestVectorNode = hitTestVectorNode; exports.vectorStrokeOutline = vectorStrokeOutline; exports.hitTestVectorNodes = hitTestVectorNodes; exports.nearestSegment = nearestSegment; exports.transformVectorNode = transformVectorNode; exports.vectorNodeRotation = vectorNodeRotation; exports.vectorWorldMatrix = vectorWorldMatrix; exports.vectorParentMatrix = vectorParentMatrix; exports.translateAnchor = translateAnchor; exports.moveAnchorHandle = moveAnchorHandle; exports.convertAnchor = convertAnchor; exports.insertAnchor = insertAnchor; exports.removeAnchors = removeAnchors; exports.reverseSubpath = reverseSubpath; exports.KAPPA = KAPPA2; exports.rectSubpath = rectSubpath; exports.ellipseSubpath = ellipseSubpath; exports.polygonSubpath = polygonSubpath; exports.starSubpath = starSubpath; exports.lineSubpath = lineSubpath; exports.roundSubpaths = roundSubpaths;
|
|
11113
|
+
|
|
11114
|
+
|
|
11115
|
+
|
|
11116
|
+
|
|
11117
|
+
|
|
11118
|
+
|
|
11119
|
+
exports.isVectorMeshGradient = isVectorMeshGradient; exports.isVectorFreeformGradient = isVectorFreeformGradient; exports.isVectorShadedPaint = isVectorShadedPaint; exports.vectorRgbaToCss = vectorRgbaToCss; exports.VECTOR_MESH_MAX = VECTOR_MESH_MAX; exports.createVectorMeshGradient = createVectorMeshGradient; exports.vectorMeshPointAt = vectorMeshPointAt; exports.vectorMeshColorAt = vectorMeshColorAt; exports.vectorMeshLines = vectorMeshLines; exports.vectorFreeformSpreadScale = vectorFreeformSpreadScale; exports.vectorFreeformLineSegments = vectorFreeformLineSegments; exports.vectorFreeformField = vectorFreeformField; exports.sampleVectorFreeform = sampleVectorFreeform; exports.autoVectorFreeformGradient = autoVectorFreeformGradient; exports.vectorShadedSvgDefs = vectorShadedSvgDefs; exports.mapVectorShadedPaint = mapVectorShadedPaint; exports.transformVectorShadedPaint = transformVectorShadedPaint; exports.sanitizeVectorShadedPaint = sanitizeVectorShadedPaint; exports.removeVectorFreeformPoint = removeVectorFreeformPoint; exports.nearestVectorShadingPoint = nearestVectorShadingPoint; exports.VECTOR_CORNER_KINDS = VECTOR_CORNER_KINDS; exports.VECTOR_GRADIENT_TYPES = VECTOR_GRADIENT_TYPES; exports.VECTOR_GRADIENT_SPREADS = VECTOR_GRADIENT_SPREADS; exports.VECTOR_GRADIENT_INTERPOLATIONS = VECTOR_GRADIENT_INTERPOLATIONS; exports.VECTOR_STROKE_GRADIENT_MODES = VECTOR_STROKE_GRADIENT_MODES; exports.VECTOR_ARROWHEADS = VECTOR_ARROWHEADS; exports.VECTOR_BLEND_MODES = VECTOR_BLEND_MODES; exports.VECTOR_HORIZONTAL_RESIZING = VECTOR_HORIZONTAL_RESIZING; exports.VECTOR_VERTICAL_RESIZING = VECTOR_VERTICAL_RESIZING; exports.VECTOR_LENS_TYPES = VECTOR_LENS_TYPES; exports.VECTOR_CONNECTOR_SIDES = VECTOR_CONNECTOR_SIDES; exports.VECTOR_CONNECTOR_ROUTES = VECTOR_CONNECTOR_ROUTES; exports.VECTOR_BLEND_SPACINGS = VECTOR_BLEND_SPACINGS; exports.VECTOR_MASK_TYPES = VECTOR_MASK_TYPES; exports.VECTOR_SYMMETRY_MODES = VECTOR_SYMMETRY_MODES; exports.VECTOR_TEXT_ALIGNS = VECTOR_TEXT_ALIGNS; exports.VECTOR_PATH_TEXT_BASELINES = VECTOR_PATH_TEXT_BASELINES; exports.VECTOR_PERSPECTIVE_PLANES = VECTOR_PERSPECTIVE_PLANES; exports.VECTOR_CONSTRAINT_KINDS = VECTOR_CONSTRAINT_KINDS; exports.VECTOR_TOOLS = VECTOR_TOOLS; exports.VECTOR_TRANSFORM_HANDLES = VECTOR_TRANSFORM_HANDLES; exports.VECTOR_PATHFINDER_OPERATIONS = VECTOR_PATHFINDER_OPERATIONS; exports.VECTOR_EFFECT_TYPES = VECTOR_EFFECT_TYPES; exports.VECTOR_MERGE_MODES = VECTOR_MERGE_MODES; exports.VECTOR_FILTER_TYPES = VECTOR_FILTER_TYPES; exports.isVectorGradient = isVectorGradient; exports.parseVectorColor = parseVectorColor; exports.VECTOR_GRADIENT_MIN_STOPS = VECTOR_GRADIENT_MIN_STOPS; exports.gradientMidpointRemap = gradientMidpointRemap; exports.sortedVectorGradientStops = sortedVectorGradientStops; exports.vectorGradientNeedsExpansion = vectorGradientNeedsExpansion; exports.vectorGradientRamp = vectorGradientRamp; exports.sampleVectorGradient = sampleVectorGradient; exports.expandVectorGradientStops = expandVectorGradientStops; exports.samplePlainStops = samplePlainStops; exports.reverseVectorGradient = reverseVectorGradient; exports.insertVectorGradientStop = insertVectorGradientStop; exports.moveVectorGradientStop = moveVectorGradientStop; exports.removeVectorGradientStop = removeVectorGradientStop; exports.vectorGradientMidpointPosition = vectorGradientMidpointPosition; exports.vectorGradientMidpointFromPosition = vectorGradientMidpointFromPosition; exports.spanVectorGradientStops = spanVectorGradientStops; exports.hasExplicitGradientGeometry = hasExplicitGradientGeometry; exports.vectorGradientPoints = vectorGradientPoints; exports.vectorBoxMatrix = vectorBoxMatrix; exports.vectorGradientUnitsMatrix = vectorGradientUnitsMatrix; exports.vectorGradientMatrix = vectorGradientMatrix; exports.vectorGradientFocalParam = vectorGradientFocalParam; exports.vectorGradientParam = vectorGradientParam; exports.applyVectorGradientSpread = applyVectorGradientSpread; exports.vectorGradientTAt = vectorGradientTAt; exports.sampleVectorGradientAt = sampleVectorGradientAt; exports.vectorGradientAspect = vectorGradientAspect; exports.explicitVectorGradient = explicitVectorGradient; exports.pinVectorGradient = pinVectorGradient; exports.transformVectorGradient = transformVectorGradient; exports.mapVectorGradient = mapVectorGradient; exports.mapVectorPaint = mapVectorPaint; exports.transformVectorPaint = transformVectorPaint; exports.isCentredVectorGradient = isCentredVectorGradient; exports.vectorGradientHandles = vectorGradientHandles; exports.moveVectorGradientHandle = moveVectorGradientHandle; exports.setVectorGradientVector = setVectorGradientVector; exports.VECTOR_GRADIENT_MAX_PERIODS = VECTOR_GRADIENT_MAX_PERIODS; exports.periodicVectorGradientStops = periodicVectorGradientStops; exports.expandVectorGradientSpread = expandVectorGradientSpread; exports.vectorGradientArea = vectorGradientArea; exports.patternAttrs = patternAttrs; exports.vectorGradientSvgDefs = vectorGradientSvgDefs; exports.sampleVectorPaintDefAt = sampleVectorPaintDefAt; exports.sanitizeVectorGradient = sanitizeVectorGradient; exports.convertVectorGradient = convertVectorGradient; exports.defaultVectorGradient = defaultVectorGradient; exports.applyVectorGradientPatch = applyVectorGradientPatch; exports.IDENTITY_MATRIX = IDENTITY_MATRIX; exports.multiplyMatrices = multiplyMatrices; exports.translateMatrix = translateMatrix; exports.scaleMatrix = scaleMatrix; exports.rotateMatrix = rotateMatrix; exports.matrixAbout = matrixAbout; exports.skewMatrix = skewMatrix; exports.applyMatrix = applyMatrix; exports.isIdentityMatrix = isIdentityMatrix; exports.invertMatrix = invertMatrix; exports.applyMatrixLinear = applyMatrixLinear; exports.matrixRotation = matrixRotation; exports.decomposeRigid = decomposeRigid; exports.isVectorSymmetryGroup = isVectorSymmetryGroup; exports.vectorSymmetryMatrices = vectorSymmetryMatrices; exports.vectorSymmetryDrawn = vectorSymmetryDrawn; exports.vectorSymmetryAxes = vectorSymmetryAxes; exports.sanitizeVectorSymmetry = sanitizeVectorSymmetry; exports.VECTOR_SYMMETRY_MODE_LABELS = VECTOR_SYMMETRY_MODE_LABELS; exports.transformVectorSymmetry = transformVectorSymmetry; exports.vectorCornerAt = vectorCornerAt; exports.vectorCorners = vectorCorners; exports.cornerSetback = cornerSetback; exports.fitCornerRadius = fitCornerRadius; exports.cornerBisectorPoint = cornerBisectorPoint; exports.cornerRadiusChange = cornerRadiusChange; exports.hasVectorCorners = hasVectorCorners; exports.expandVectorCornersOf = expandVectorCornersOf; exports.expandVectorCorners = expandVectorCorners; exports.setAnchorCorner = setAnchorCorner; exports.nextVectorCornerKind = nextVectorCornerKind; exports.setSubpathCorners = setSubpathCorners; exports.VECTOR_WIDTH_PROFILE_MAX_POINTS = VECTOR_WIDTH_PROFILE_MAX_POINTS; exports.VECTOR_WIDTH_PROFILE_MAX_SCALE = VECTOR_WIDTH_PROFILE_MAX_SCALE; exports.VECTOR_WIDTH_SAME_T = VECTOR_WIDTH_SAME_T; exports.VECTOR_WIDTH_PRESETS = VECTOR_WIDTH_PRESETS; exports.VECTOR_WIDTH_PRESET_IDS = VECTOR_WIDTH_PRESET_IDS; exports.sanitizeWidthProfile = sanitizeWidthProfile; exports.isUniformWidthProfile = isUniformWidthProfile; exports.widthProfileAt = widthProfileAt; exports.widthProfileMaxScale = widthProfileMaxScale; exports.widthProfilePreset = widthProfilePreset; exports.widthProfilePresetId = widthProfilePresetId; exports.reverseWidthProfile = reverseWidthProfile; exports.mirrorWidthProfile = mirrorWidthProfile; exports.insertWidthPoint = insertWidthPoint; exports.setWidthPoint = setWidthPoint; exports.removeWidthPoints = removeWidthPoints; exports.taperWaveFactor = taperWaveFactor; exports.generateWidthProfile = generateWidthProfile; exports.VECTOR_PRESSURE_NOMINAL = VECTOR_PRESSURE_NOMINAL; exports.pressureWidthProfile = pressureWidthProfile; exports.dashIntervals = dashIntervals; exports.variableStrokeRings = variableStrokeRings; exports.variableStrokeOutline = variableStrokeOutline; exports.nearestStrokePosition = nearestStrokePosition; exports.strokePositionPoint = strokePositionPoint; exports.isClosedBezierShape = isClosedBezierShape; exports.effectiveStrokeAlign = effectiveStrokeAlign; exports.strokeWidthProfileOf = strokeWidthProfileOf; exports.hasStrokeExtras = hasStrokeExtras; exports.vectorStrokeLineArea = vectorStrokeLineArea; exports.arrowheadWeight = arrowheadWeight; exports.arrowheadInset = arrowheadInset; exports.arrowheadPath = arrowheadPath; exports.vectorStrokeParts = vectorStrokeParts; exports.vectorStrokeOutlinePath = vectorStrokeOutlinePath; exports.hitTestVectorStroke = hitTestVectorStroke; exports.vectorStrokeReach = vectorStrokeReach; exports.vectorPaintSolid = vectorPaintSolid; exports.shadeVectorColor = shadeVectorColor; exports.vectorPathRings = vectorPathRings; exports.vectorExtrudeFaces = vectorExtrudeFaces; exports.VECTOR_BRUSHSTROKE_SCALE = VECTOR_BRUSHSTROKE_SCALE; exports.vectorBrushstrokeBrushes = vectorBrushstrokeBrushes; exports.vectorBrushstrokeBrush = vectorBrushstrokeBrush; exports.sanitizeVectorBrushstroke = sanitizeVectorBrushstroke; exports.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;
|