@pixerate/editor 0.155.0 → 0.156.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 +58 -58
- package/dist/animation-editor/index.js +4 -4
- package/dist/{brushstrokeRender-YAZVQUXY.cjs → brushstrokeRender-5WANQIG4.cjs} +10 -10
- package/dist/{brushstrokeRender-EUDQTDYS.js → brushstrokeRender-Q4LI22QV.js} +3 -3
- package/dist/canvas/index.cjs +8 -8
- package/dist/canvas/index.js +1 -1
- package/dist/{chunk-AGZ47XY2.js → chunk-2N2QPO3H.js} +6 -2
- package/dist/{chunk-NMXPOKF3.js → chunk-45XXVHVG.js} +1 -1
- package/dist/{chunk-FLOGD3QB.js → chunk-6UPGM3JB.js} +2 -2
- package/dist/{chunk-6FUAHCVI.cjs → chunk-7NW46N7I.cjs} +16 -16
- package/dist/{chunk-ORDXMBD4.js → chunk-A5UCR2TO.js} +10 -3
- package/dist/{chunk-PI45JMP7.cjs → chunk-CD7PLU77.cjs} +81 -81
- package/dist/{chunk-LRRCMRSL.cjs → chunk-EBDCRTZI.cjs} +20 -16
- package/dist/{chunk-OLCYQLFE.js → chunk-EL5PAHNP.js} +1 -1
- package/dist/{chunk-PUC43JPT.cjs → chunk-EYVVIZJ3.cjs} +1 -1
- package/dist/{chunk-BXMIBMVG.cjs → chunk-JGKCC5OF.cjs} +65 -58
- package/dist/{chunk-LIXLD433.cjs → chunk-MHEXLG3M.cjs} +35 -35
- package/dist/{chunk-RHXW4TA5.cjs → chunk-QMI5HZWA.cjs} +7 -7
- package/dist/{chunk-UILRJQFD.js → chunk-WNAAWLZ5.js} +1 -1
- package/dist/{chunk-Y64YPIFT.js → chunk-ZQWLWDZI.js} +1 -1
- package/dist/image-editor/index.cjs +686 -686
- package/dist/image-editor/index.js +5 -5
- package/dist/paint/grain.d.cts +7 -0
- package/dist/paint/grain.d.ts +7 -0
- package/dist/paint/index.cjs +3 -3
- package/dist/paint/index.js +2 -2
- package/dist/paint-editor/controller.d.cts +30 -0
- package/dist/paint-editor/controller.d.ts +30 -0
- package/dist/paint-editor/document.d.cts +8 -0
- package/dist/paint-editor/document.d.ts +8 -0
- package/dist/paint-editor/index.cjs +403 -256
- package/dist/paint-editor/index.js +158 -11
- package/dist/paint-editor/paper.d.cts +8 -0
- package/dist/paint-editor/paper.d.ts +8 -0
- package/dist/paint-editor/stencils.d.cts +2 -0
- package/dist/paint-editor/stencils.d.ts +2 -0
- package/dist/paint-editor/wet.d.cts +1 -0
- package/dist/paint-editor/wet.d.ts +1 -0
- package/dist/vector/index.cjs +950 -950
- package/dist/vector/index.js +4 -4
- package/package.json +1 -1
- package/skills/pixerate-paint-editor/SKILL.md +9 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkMHEXLG3Mcjs = require('../chunk-MHEXLG3M.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -31,8 +31,8 @@ var _chunkEBDZWIOPcjs = require('../chunk-EBDZWIOP.cjs');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
35
|
-
require('../chunk-
|
|
34
|
+
var _chunkQMI5HZWAcjs = require('../chunk-QMI5HZWA.cjs');
|
|
35
|
+
require('../chunk-JGKCC5OF.cjs');
|
|
36
36
|
require('../chunk-CVFAAZXE.cjs');
|
|
37
37
|
|
|
38
38
|
|
|
@@ -50,7 +50,7 @@ require('../chunk-NM3G4VQT.cjs');
|
|
|
50
50
|
|
|
51
51
|
var _chunkRUZQMYXHcjs = require('../chunk-RUZQMYXH.cjs');
|
|
52
52
|
require('../chunk-WOFXZ3XU.cjs');
|
|
53
|
-
require('../chunk-
|
|
53
|
+
require('../chunk-EBDCRTZI.cjs');
|
|
54
54
|
require('../chunk-YQGCPL5X.cjs');
|
|
55
55
|
require('../chunk-CWM3CUUX.cjs');
|
|
56
56
|
require('../chunk-XFM3OCHU.cjs');
|
|
@@ -595,7 +595,7 @@ function smoothMotionTimes(points, start, duration, pacing = "even") {
|
|
|
595
595
|
function motionTextLayout(nodes, id) {
|
|
596
596
|
const group = _optionalChain([nodes, 'access', _5 => _5.get, 'call', _6 => _6(id), 'optionalAccess', _7 => _7.node]);
|
|
597
597
|
if (!group || group.type !== "group") return null;
|
|
598
|
-
const letters =
|
|
598
|
+
const letters = _chunkQMI5HZWAcjs.collectPathNodes.call(void 0, group).map((p) => ({ id: p.id, b: _optionalChain([nodes, 'access', _8 => _8.get, 'call', _9 => _9(p.id), 'optionalAccess', _10 => _10.bounds]) })).filter((l) => !!l.b && l.b.width + l.b.height > 0);
|
|
599
599
|
if (!letters.length) return null;
|
|
600
600
|
const lines = [];
|
|
601
601
|
for (const l of [...letters].sort((a, c) => a.b.y + a.b.height / 2 - (c.b.y + c.b.height / 2))) {
|
|
@@ -680,21 +680,21 @@ function indexMotionNodes(nodes) {
|
|
|
680
680
|
const out = /* @__PURE__ */ new Map();
|
|
681
681
|
const walk = (list, parentWorld, ancestors) => {
|
|
682
682
|
for (const node of list) {
|
|
683
|
-
const local =
|
|
684
|
-
const bounds =
|
|
683
|
+
const local = _chunkQMI5HZWAcjs.vectorNodeBounds.call(void 0, node);
|
|
684
|
+
const bounds = _chunkQMI5HZWAcjs.vectorNodeBounds.call(void 0, node, parentWorld);
|
|
685
685
|
const center = local ? { x: local.x + local.width / 2, y: local.y + local.height / 2 } : { x: 0, y: 0 };
|
|
686
686
|
if (!out.has(node.id)) out.set(node.id, { node, ancestors, parentWorld, center, bounds, box: local });
|
|
687
|
-
if (node.type === "group") walk(node.children,
|
|
687
|
+
if (node.type === "group") walk(node.children, _chunkQMI5HZWAcjs.multiplyMatrices.call(void 0, _chunkQMI5HZWAcjs.nodeMatrix.call(void 0, node), parentWorld), [...ancestors, node.id]);
|
|
688
688
|
}
|
|
689
689
|
};
|
|
690
|
-
walk(nodes,
|
|
690
|
+
walk(nodes, _chunkQMI5HZWAcjs.IDENTITY_MATRIX, []);
|
|
691
691
|
indexCache.set(nodes, out);
|
|
692
692
|
return out;
|
|
693
693
|
}
|
|
694
694
|
var solid = (paint) => typeof paint === "string" && paint !== "none" ? paint : void 0;
|
|
695
695
|
function firstPaint(node, key) {
|
|
696
696
|
if (node.type === "path") return solid(node[key]);
|
|
697
|
-
for (const p of
|
|
697
|
+
for (const p of _chunkQMI5HZWAcjs.collectPathNodes.call(void 0, node)) {
|
|
698
698
|
const s = solid(p[key]);
|
|
699
699
|
if (s) return s;
|
|
700
700
|
}
|
|
@@ -702,7 +702,7 @@ function firstPaint(node, key) {
|
|
|
702
702
|
}
|
|
703
703
|
function strokeReach(node) {
|
|
704
704
|
let reach = 0;
|
|
705
|
-
for (const p of node.type === "path" ? [node] :
|
|
705
|
+
for (const p of node.type === "path" ? [node] : _chunkQMI5HZWAcjs.collectPathNodes.call(void 0, node)) {
|
|
706
706
|
if (p.stroke == null || p.stroke === "none") continue;
|
|
707
707
|
const width = _nullishCoalesce(p.strokeWidth, () => ( 1));
|
|
708
708
|
reach = Math.max(reach, p.strokeAlign === "outside" ? width : p.strokeAlign === "inside" ? 0 : width / 2);
|
|
@@ -772,7 +772,7 @@ function motionRestValue(entry, property, artwork) {
|
|
|
772
772
|
case "stroke":
|
|
773
773
|
return _nullishCoalesce((node && firstPaint(node, property)), () => ( "transparent"));
|
|
774
774
|
case "strokeWidth": {
|
|
775
|
-
const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ?
|
|
775
|
+
const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ? _chunkQMI5HZWAcjs.collectPathNodes.call(void 0, node)[0] : void 0;
|
|
776
776
|
return _nullishCoalesce(_optionalChain([path, 'optionalAccess', _14 => _14.strokeWidth]), () => ( 1));
|
|
777
777
|
}
|
|
778
778
|
case "shape":
|
|
@@ -883,12 +883,12 @@ function resolveMotionCamera(camera, scene) {
|
|
|
883
883
|
const r = camera;
|
|
884
884
|
return { x: r.x, y: r.y, width: r.width, height: r.height };
|
|
885
885
|
}
|
|
886
|
-
function motionPathLength(node, parentWorld =
|
|
886
|
+
function motionPathLength(node, parentWorld = _chunkQMI5HZWAcjs.IDENTITY_MATRIX) {
|
|
887
887
|
let longest = 0;
|
|
888
|
-
const paths = node.type === "path" ? [node] :
|
|
888
|
+
const paths = node.type === "path" ? [node] : _chunkQMI5HZWAcjs.collectPathNodes.call(void 0, node);
|
|
889
889
|
for (const p of paths) {
|
|
890
890
|
try {
|
|
891
|
-
longest = Math.max(longest, _chunkGF2RBSDMcjs.bezierPathLength.call(void 0,
|
|
891
|
+
longest = Math.max(longest, _chunkGF2RBSDMcjs.bezierPathLength.call(void 0, _chunkQMI5HZWAcjs.vectorPathWorldBezier.call(void 0, p, parentWorld, { effects: false })));
|
|
892
892
|
} catch (e2) {
|
|
893
893
|
}
|
|
894
894
|
}
|
|
@@ -1141,12 +1141,12 @@ function compileMotionScene(scene) {
|
|
|
1141
1141
|
const order2 = _nullishCoalesce(o.order, () => ( "together"));
|
|
1142
1142
|
const pace = _nullishCoalesce(o.pace, () => ( "time"));
|
|
1143
1143
|
if (order2 === "together" && pace === "time") return null;
|
|
1144
|
-
const paths = entry.node.type === "path" ? [entry.node] :
|
|
1144
|
+
const paths = entry.node.type === "path" ? [entry.node] : _chunkQMI5HZWAcjs.collectPathNodes.call(void 0, entry.node);
|
|
1145
1145
|
let list = paths.map((p) => {
|
|
1146
1146
|
const at = nodes.get(p.id);
|
|
1147
1147
|
let first = { x: 0, y: 0 };
|
|
1148
1148
|
try {
|
|
1149
|
-
const m =
|
|
1149
|
+
const m = _chunkQMI5HZWAcjs.vectorPathWorldBezier.call(void 0, p, _nullishCoalesce(_optionalChain([at, 'optionalAccess', _41 => _41.parentWorld]), () => ( _chunkQMI5HZWAcjs.IDENTITY_MATRIX)), { effects: false })[0];
|
|
1150
1150
|
if (m && m.type === "M") first = { x: m.x, y: m.y };
|
|
1151
1151
|
} catch (e3) {
|
|
1152
1152
|
}
|
|
@@ -1258,17 +1258,17 @@ function compileMotionScene(scene) {
|
|
|
1258
1258
|
let dx = _nullishCoalesce(_optionalChain([command3, 'access', _44 => _44.by, 'optionalAccess', _45 => _45.x]), () => ( 0));
|
|
1259
1259
|
let dy = _nullishCoalesce(_optionalChain([command3, 'access', _46 => _46.by, 'optionalAccess', _47 => _47.y]), () => ( 0));
|
|
1260
1260
|
if (command3.to) {
|
|
1261
|
-
const inv =
|
|
1262
|
-
const target =
|
|
1261
|
+
const inv = _chunkQMI5HZWAcjs.invertMatrix.call(void 0, entry.parentWorld);
|
|
1262
|
+
const target = _chunkQMI5HZWAcjs.applyMatrix.call(void 0, inv, command3.to);
|
|
1263
1263
|
dx = target.x - (entry.center.x + num2("x"));
|
|
1264
1264
|
dy = target.y - (entry.center.y + num2("y"));
|
|
1265
1265
|
}
|
|
1266
1266
|
if (_optionalChain([command3, 'access', _48 => _48.via, 'optionalAccess', _49 => _49.length])) {
|
|
1267
|
-
const inv =
|
|
1267
|
+
const inv = _chunkQMI5HZWAcjs.invertMatrix.call(void 0, entry.parentWorld);
|
|
1268
1268
|
const x0 = num2("x");
|
|
1269
1269
|
const y0 = num2("y");
|
|
1270
1270
|
const add = command3.blend === "add";
|
|
1271
|
-
const offsets = [{ x: 0, y: 0 }, ...command3.via.map((p) =>
|
|
1271
|
+
const offsets = [{ x: 0, y: 0 }, ...command3.via.map((p) => _chunkQMI5HZWAcjs.applyMatrix.call(void 0, inv, p)).map((p) => ({ x: p.x - entry.center.x - x0, y: p.y - entry.center.y - y0 })), { x: dx, y: dy }];
|
|
1272
1272
|
const times = _optionalChain([command3, 'access', _50 => _50.times, 'optionalAccess', _51 => _51.length]) === command3.via.length ? [start, ...command3.times.map((f) => start + f * (end - start)), end] : smoothMotionTimes(offsets, start, end - start, _nullishCoalesce(command3.pacing, () => ( "even")));
|
|
1273
1273
|
for (const axis of ["x", "y"]) {
|
|
1274
1274
|
const base = add ? 0 : axis === "x" ? x0 : y0;
|
|
@@ -1411,13 +1411,13 @@ function morphBetween(a, b) {
|
|
|
1411
1411
|
let inner = morphCache.get(a);
|
|
1412
1412
|
if (!inner) morphCache.set(a, inner = /* @__PURE__ */ new WeakMap());
|
|
1413
1413
|
let morph = inner.get(b);
|
|
1414
|
-
if (!morph) inner.set(b, morph =
|
|
1414
|
+
if (!morph) inner.set(b, morph = _chunkMHEXLG3Mcjs.createVectorMorph.call(void 0, a, b, { id: a.id }));
|
|
1415
1415
|
return morph;
|
|
1416
1416
|
}
|
|
1417
1417
|
function shapeIn(entry, shape) {
|
|
1418
1418
|
if (shape === entry) return entry.node;
|
|
1419
|
-
const m =
|
|
1420
|
-
return { ...shape.node, ...
|
|
1419
|
+
const m = _chunkQMI5HZWAcjs.multiplyMatrices.call(void 0, _chunkQMI5HZWAcjs.multiplyMatrices.call(void 0, _chunkQMI5HZWAcjs.nodeMatrix.call(void 0, shape.node), shape.parentWorld), _chunkQMI5HZWAcjs.invertMatrix.call(void 0, entry.parentWorld));
|
|
1420
|
+
return { ...shape.node, ..._chunkQMI5HZWAcjs.isIdentityMatrix.call(void 0, m) ? { transform: void 0 } : { transform: m } };
|
|
1421
1421
|
}
|
|
1422
1422
|
function shapeAt(entry, timeline, nodes, time) {
|
|
1423
1423
|
const track = timeline.tracks.get(motionTrackKey(entry.node.id, "shape"));
|
|
@@ -1437,7 +1437,7 @@ function shapeAt(entry, timeline, nodes, time) {
|
|
|
1437
1437
|
function motionFollowRoute(entry, path) {
|
|
1438
1438
|
if (!path || path.node.type !== "path") return null;
|
|
1439
1439
|
try {
|
|
1440
|
-
return _chunkGF2RBSDMcjs.transformBezierPath.call(void 0,
|
|
1440
|
+
return _chunkGF2RBSDMcjs.transformBezierPath.call(void 0, _chunkQMI5HZWAcjs.vectorPathWorldBezier.call(void 0, path.node, path.parentWorld, { effects: false }), _chunkQMI5HZWAcjs.invertMatrix.call(void 0, entry.parentWorld));
|
|
1441
1441
|
} catch (e4) {
|
|
1442
1442
|
return null;
|
|
1443
1443
|
}
|
|
@@ -1471,9 +1471,9 @@ function motionNodeOffset(entry, timeline, time, nodes = indexMotionNodes([entry
|
|
|
1471
1471
|
const scaleX = read("scaleX", 1);
|
|
1472
1472
|
const scaleY = read("scaleY", 1);
|
|
1473
1473
|
const c = entry.center;
|
|
1474
|
-
let matrix =
|
|
1474
|
+
let matrix = _chunkQMI5HZWAcjs.multiplyMatrices.call(void 0, _chunkQMI5HZWAcjs.multiplyMatrices.call(void 0, _chunkQMI5HZWAcjs.scaleMatrix.call(void 0, scaleX, scaleY, c), _chunkQMI5HZWAcjs.rotateMatrix.call(void 0, rotation, c)), _chunkQMI5HZWAcjs.translateMatrix.call(void 0, dx, dy));
|
|
1475
1475
|
const along = follow ? followAt(entry, timeline, nodes, time) : null;
|
|
1476
|
-
if (along) matrix =
|
|
1476
|
+
if (along) matrix = _chunkQMI5HZWAcjs.multiplyMatrices.call(void 0, matrix, _chunkQMI5HZWAcjs.multiplyMatrices.call(void 0, _chunkQMI5HZWAcjs.multiplyMatrices.call(void 0, _chunkQMI5HZWAcjs.translateMatrix.call(void 0, -c.x, -c.y), _chunkQMI5HZWAcjs.rotateMatrix.call(void 0, along.angle)), _chunkQMI5HZWAcjs.translateMatrix.call(void 0, along.x, along.y)));
|
|
1477
1477
|
return { matrix, dx, dy, rotation, scaleX, scaleY, follow: along };
|
|
1478
1478
|
}
|
|
1479
1479
|
function motionNodeClips(id, timeline, time) {
|
|
@@ -1540,7 +1540,7 @@ function motionFrameAt(scene, time, options = {}) {
|
|
|
1540
1540
|
const start = Math.min(1, Math.max(0, typeof drawStart === "number" ? drawStart : 0));
|
|
1541
1541
|
const end = Math.min(1, Math.max(0, typeof drawEnd === "number" ? drawEnd : 1));
|
|
1542
1542
|
if (start > 0 || end < 1) {
|
|
1543
|
-
const trim =
|
|
1543
|
+
const trim = _chunkQMI5HZWAcjs.createVectorEffect.call(void 0, "trim", MOTION_DRAW_EFFECT_ID, { start: tidy(start * 100), end: tidy(end * 100) });
|
|
1544
1544
|
p = { ...p, effects: [trim, ...(_nullishCoalesce(p.effects, () => ( []))).filter((e) => e.id !== MOTION_DRAW_EFFECT_ID)] };
|
|
1545
1545
|
}
|
|
1546
1546
|
}
|
|
@@ -1554,8 +1554,8 @@ function motionFrameAt(scene, time, options = {}) {
|
|
|
1554
1554
|
if (o >= 1) delete out.opacity;
|
|
1555
1555
|
}
|
|
1556
1556
|
const offset = options.offsets === false ? null : motionNodeOffset(entry, timeline, time, nodes);
|
|
1557
|
-
if (offset && !
|
|
1558
|
-
const m =
|
|
1557
|
+
if (offset && !_chunkQMI5HZWAcjs.isIdentityMatrix.call(void 0, offset.matrix)) {
|
|
1558
|
+
const m = _chunkQMI5HZWAcjs.multiplyMatrices.call(void 0, _chunkQMI5HZWAcjs.nodeMatrix.call(void 0, out), offset.matrix).map(tidy);
|
|
1559
1559
|
out = { ...out, transform: m };
|
|
1560
1560
|
}
|
|
1561
1561
|
return out;
|
|
@@ -1575,7 +1575,7 @@ function motionFrameToSvg(scene, time, options = {}) {
|
|
|
1575
1575
|
const wrap = { ...options.wrap };
|
|
1576
1576
|
for (const [id, clips] of Object.entries(frame.clips))
|
|
1577
1577
|
wrap[id] = [..._nullishCoalesce(wrap[id], () => ( [])), ...clips.map((clip, i) => ({ clip: { id: `${prefix}reveal-${id}-${i}`, shape: clip.shape, attrs: motionClipAttrs(clip) } }))];
|
|
1578
|
-
return withViewBox(
|
|
1578
|
+
return withViewBox(_chunkQMI5HZWAcjs.vectorDocumentToSvg.call(void 0, frame.document, { ...options, wrap }), frame.camera);
|
|
1579
1579
|
}
|
|
1580
1580
|
function withViewBox(svg, box) {
|
|
1581
1581
|
const f = (n) => String(Math.round(n * 1e3) / 1e3);
|
|
@@ -1758,8 +1758,8 @@ function visibleAt(timeline, id, time, node) {
|
|
|
1758
1758
|
if (Array.isArray(rect) && (rect[2] <= 1e-4 || rect[3] <= 1e-4)) return false;
|
|
1759
1759
|
const circle = clip("clipCircle");
|
|
1760
1760
|
if (Array.isArray(circle) && circle[2] <= 1e-4) return false;
|
|
1761
|
-
const hasFill = node.type === "path" ? !!node.fill && node.fill !== "none" :
|
|
1762
|
-
const drawn = num2("drawEnd", 1) > 0.01 && (node.type === "path" ||
|
|
1761
|
+
const hasFill = node.type === "path" ? !!node.fill && node.fill !== "none" : _chunkQMI5HZWAcjs.collectPathNodes.call(void 0, node).some((p) => p.fill && p.fill !== "none");
|
|
1762
|
+
const drawn = num2("drawEnd", 1) > 0.01 && (node.type === "path" || _chunkQMI5HZWAcjs.collectPathNodes.call(void 0, node).length === 0 || _chunkQMI5HZWAcjs.collectPathNodes.call(void 0, node).some((p) => {
|
|
1763
1763
|
const v = trackValue(timeline.tracks.get(motionTrackKey(p.id, "drawEnd")), time);
|
|
1764
1764
|
return typeof v !== "number" || v > 0.01;
|
|
1765
1765
|
}));
|
|
@@ -1845,7 +1845,7 @@ function checkMotionScene(scene) {
|
|
|
1845
1845
|
}
|
|
1846
1846
|
for (const id of targets) {
|
|
1847
1847
|
const node = nodes.get(id).node;
|
|
1848
|
-
const paths = node.type === "path" ? [node] :
|
|
1848
|
+
const paths = node.type === "path" ? [node] : _chunkQMI5HZWAcjs.collectPathNodes.call(void 0, node);
|
|
1849
1849
|
if (paths.some((p) => p[key] !== void 0 && p[key] !== null && typeof p[key] !== "string"))
|
|
1850
1850
|
issues.push(_chunkEBDZWIOPcjs.motionIssue.call(void 0, "paint-not-color", `"${id}" has a gradient ${key}; it switches to ${color} at the end instead of blending.`, { ...where, ids: [id] }));
|
|
1851
1851
|
}
|
|
@@ -1858,7 +1858,7 @@ function checkMotionScene(scene) {
|
|
|
1858
1858
|
else
|
|
1859
1859
|
for (const id of targets) {
|
|
1860
1860
|
const node = nodes.get(id).node;
|
|
1861
|
-
const paths = node.type === "path" ? [node] :
|
|
1861
|
+
const paths = node.type === "path" ? [node] : _chunkQMI5HZWAcjs.collectPathNodes.call(void 0, node);
|
|
1862
1862
|
if (paths.some((p) => typeof p[key] !== "string"))
|
|
1863
1863
|
issues.push(_chunkEBDZWIOPcjs.motionIssue.call(void 0, "paint-not-color", `"${id}" has a gradient or no ${key}, so a colour pulse cannot tint it; give it a solid ${key} or pulse the ${key === "fill" ? "stroke" : "fill"}.`, { ...where, ids: [id] }));
|
|
1864
1864
|
}
|
|
@@ -2303,7 +2303,7 @@ function motionNodePose(scene, id, time) {
|
|
|
2303
2303
|
if (!entry) throw new Error(`There is no element ${_chunkEBDZWIOPcjs.namedWithSuggestion.call(void 0, id, [...indexMotionNodes(scene.artwork.nodes).keys()])} in the artwork.`);
|
|
2304
2304
|
const timeline = compileMotionScene(scene);
|
|
2305
2305
|
const drawn = indexMotionNodes(motionFrameAt(scene, time).document.nodes).get(id);
|
|
2306
|
-
const centre =
|
|
2306
|
+
const centre = _chunkQMI5HZWAcjs.applyMatrix.call(void 0, entry.parentWorld, { x: entry.center.x + motionPropertyValue(timeline, id, "x", time), y: entry.center.y + motionPropertyValue(timeline, id, "y", time) });
|
|
2307
2307
|
const paint = (property) => _nullishCoalesce(trackValue(timeline.tracks.get(motionTrackKey(id, property)), time), () => ( motionRestValue(entry, property, scene.artwork)));
|
|
2308
2308
|
const fill = paint("fill");
|
|
2309
2309
|
const stroke = paint("stroke");
|
|
@@ -2650,7 +2650,7 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2650
2650
|
raw: (t) => transformAt(t, true)
|
|
2651
2651
|
});
|
|
2652
2652
|
}
|
|
2653
|
-
const paths = node.type === "path" ? [node] :
|
|
2653
|
+
const paths = node.type === "path" ? [node] : _chunkQMI5HZWAcjs.collectPathNodes.call(void 0, node);
|
|
2654
2654
|
for (const path of paths) {
|
|
2655
2655
|
if (pathsSeen.has(path.id)) continue;
|
|
2656
2656
|
pathsSeen.add(path.id);
|
|
@@ -2672,7 +2672,7 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2672
2672
|
if (shapeSegments.length) {
|
|
2673
2673
|
if (node.type !== "path") notes.push(`"${id}" is a group: its morph or effect animation is not exported (Flair tweens one path's "d").`);
|
|
2674
2674
|
else {
|
|
2675
|
-
const inverse =
|
|
2675
|
+
const inverse = _chunkQMI5HZWAcjs.invertMatrix.call(void 0, _chunkQMI5HZWAcjs.nodeMatrix.call(void 0, node));
|
|
2676
2676
|
channels.push({
|
|
2677
2677
|
id,
|
|
2678
2678
|
kind: "attr",
|
|
@@ -2681,9 +2681,9 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2681
2681
|
exact: () => false,
|
|
2682
2682
|
value: (t) => {
|
|
2683
2683
|
const frame = motionFrameAt(scene, t, { draw: false, offsets: false });
|
|
2684
|
-
const now =
|
|
2684
|
+
const now = _chunkQMI5HZWAcjs.expandVectorAppearance.call(void 0, _optionalChain([indexMotionNodes, 'call', _114 => _114(frame.document.nodes), 'access', _115 => _115.get, 'call', _116 => _116(id), 'optionalAccess', _117 => _117.node]));
|
|
2685
2685
|
if (!now || now.type !== "path") return "";
|
|
2686
|
-
const bezier = _chunkGF2RBSDMcjs.transformBezierPath.call(void 0,
|
|
2686
|
+
const bezier = _chunkGF2RBSDMcjs.transformBezierPath.call(void 0, _chunkQMI5HZWAcjs.vectorPathWorldBezier.call(void 0, now, _chunkQMI5HZWAcjs.IDENTITY_MATRIX, { effects: false }), inverse);
|
|
2687
2687
|
return _chunkGF2RBSDMcjs.bezierPathToSvg.call(void 0, bezier, { precision: Math.min(precision, 2) });
|
|
2688
2688
|
}
|
|
2689
2689
|
});
|
|
@@ -2790,7 +2790,7 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2790
2790
|
}
|
|
2791
2791
|
if (scene.motionBlur) notes.push("Motion blur is drawn on the stage only; Flair plays the scene sharp.");
|
|
2792
2792
|
if (trigger && (_nullishCoalesce(scene.loop, () => ( "none"))) !== "none") notes.push(`The scene plays on ${trigger}, so its loop does not apply in Flair.`);
|
|
2793
|
-
let svg =
|
|
2793
|
+
let svg = _chunkQMI5HZWAcjs.vectorDocumentToSvg.call(void 0, { ...scene.artwork, nodes: _chunkQMI5HZWAcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) }, { pretty: false, precision, wrap });
|
|
2794
2794
|
if (routes.length) svg = svg.replace(/^(<svg[^>]*>)/, `$1<defs>${routes.join("")}</defs>`);
|
|
2795
2795
|
let motion = { svg, animate };
|
|
2796
2796
|
if (_optionalChain([scene, 'access', _120 => _120.controls, 'optionalAccess', _121 => _121.length])) {
|
|
@@ -2874,14 +2874,14 @@ function easingOf(ease, fallback) {
|
|
|
2874
2874
|
return fallback;
|
|
2875
2875
|
}
|
|
2876
2876
|
function poseOf(value, entry) {
|
|
2877
|
-
const t =
|
|
2878
|
-
const o =
|
|
2877
|
+
const t = _chunkQMI5HZWAcjs.parseSvgTransform.call(void 0, String(value));
|
|
2878
|
+
const o = _chunkQMI5HZWAcjs.multiplyMatrices.call(void 0, _nullishCoalesce(_chunkQMI5HZWAcjs.invertMatrix.call(void 0, _chunkQMI5HZWAcjs.nodeMatrix.call(void 0, entry.node)), () => ( [1, 0, 0, 1, 0, 0])), t);
|
|
2879
2879
|
const sx = Math.hypot(o[0], o[1]);
|
|
2880
2880
|
if (!(sx > 1e-9)) return null;
|
|
2881
2881
|
const sy = (o[0] * o[3] - o[1] * o[2]) / sx;
|
|
2882
2882
|
if (Math.abs(o[2] + o[1] / sx * sy) > 1e-6 || Math.abs(o[3] - o[0] / sx * sy) > 1e-6) return null;
|
|
2883
2883
|
const c = entry.center;
|
|
2884
|
-
const moved =
|
|
2884
|
+
const moved = _chunkQMI5HZWAcjs.applyMatrix.call(void 0, o, c);
|
|
2885
2885
|
return { dx: moved.x - c.x, dy: moved.y - c.y, rotation: Math.atan2(o[1], o[0]) * 180 / Math.PI, sx, sy };
|
|
2886
2886
|
}
|
|
2887
2887
|
var near = (a, b, eps = 1e-6) => Math.abs(a - b) < eps;
|
|
@@ -2966,7 +2966,7 @@ function fromFlairSvgMotion(input, options = {}) {
|
|
|
2966
2966
|
const notes = [];
|
|
2967
2967
|
if (!input || typeof input.svg !== "string") throw new Error('Give a Flair SvgMotion: { svg: "<svg \u2026>", animate: [ \u2026 ] }.');
|
|
2968
2968
|
const { motion, controls } = resolvePlaceholders(input, notes);
|
|
2969
|
-
const artwork =
|
|
2969
|
+
const artwork = _chunkQMI5HZWAcjs.parseVectorSvg.call(void 0, motion.svg);
|
|
2970
2970
|
const nodes = indexMotionNodes(artwork.nodes);
|
|
2971
2971
|
const byStep = /* @__PURE__ */ new Map();
|
|
2972
2972
|
for (const anim of _nullishCoalesce(motion.animate, () => ( []))) {
|
|
@@ -3213,9 +3213,9 @@ function toLottie(scene, options = {}) {
|
|
|
3213
3213
|
const items = [];
|
|
3214
3214
|
const shapeSegments = [...timeline.tracks.entries()].filter(([k]) => k.startsWith(`${path.id}\0`) && (k.endsWith("\0shape") || k.includes("\0effect:"))).flatMap(([, v]) => v);
|
|
3215
3215
|
const geometryAt = (t) => {
|
|
3216
|
-
if (!shapeSegments.length) return
|
|
3216
|
+
if (!shapeSegments.length) return _chunkQMI5HZWAcjs.vectorPathWorldBezier.call(void 0, path);
|
|
3217
3217
|
const now = _optionalChain([indexMotionNodes, 'call', _130 => _130(motionFrameAt(scene, t, { draw: false, offsets: false }).document.nodes), 'access', _131 => _131.get, 'call', _132 => _132(path.id), 'optionalAccess', _133 => _133.node]);
|
|
3218
|
-
return now && now.type === "path" ?
|
|
3218
|
+
return now && now.type === "path" ? _chunkQMI5HZWAcjs.vectorPathWorldBezier.call(void 0, _chunkQMI5HZWAcjs.expandVectorAppearances.call(void 0, [now])[0]) : _chunkQMI5HZWAcjs.vectorPathWorldBezier.call(void 0, path);
|
|
3219
3219
|
};
|
|
3220
3220
|
const rest = lottieContours(_chunkGF2RBSDMcjs.toBezierPath.call(void 0, geometryAt(0)), round3);
|
|
3221
3221
|
rest.forEach((contour, n) => {
|
|
@@ -3288,13 +3288,13 @@ function toLottie(scene, options = {}) {
|
|
|
3288
3288
|
const innerTr = STATIC_TR();
|
|
3289
3289
|
if (node.type === "path") inner = [...pathShapes(node)];
|
|
3290
3290
|
else if (node.type === "text" || node.type === "instance") {
|
|
3291
|
-
const drawn =
|
|
3291
|
+
const drawn = _chunkQMI5HZWAcjs.expandVectorAppearance.call(void 0, node);
|
|
3292
3292
|
inner = drawn.type === "path" ? [...pathShapes(drawn)] : drawn.children.filter((c) => c.type === "path").reverse().flatMap((c) => [...pathShapes(c)]);
|
|
3293
|
-
notes.push(`"${node.id}": text is exported as its outlines${
|
|
3293
|
+
notes.push(`"${node.id}": text is exported as its outlines${_chunkQMI5HZWAcjs.vectorTextHasOutlines.call(void 0, ) ? "" : " (glyph boxes: set an outline text shaper for real glyphs)"}.`);
|
|
3294
3294
|
} else {
|
|
3295
3295
|
inner = shown(node.children).reverse().map(nodeGroup);
|
|
3296
|
-
const m =
|
|
3297
|
-
if (m !==
|
|
3296
|
+
const m = _chunkQMI5HZWAcjs.nodeMatrix.call(void 0, node);
|
|
3297
|
+
if (m !== _chunkQMI5HZWAcjs.IDENTITY_MATRIX) {
|
|
3298
3298
|
const parts = staticParts(m);
|
|
3299
3299
|
if (!parts) notes.push(`"${node.id}": its transform skews, which is not exported; it is drawn without the skew.`);
|
|
3300
3300
|
else {
|
|
@@ -3307,7 +3307,7 @@ function toLottie(scene, options = {}) {
|
|
|
3307
3307
|
const body = { ty: "gr", nm: `${node.id} (own)`, it: [...inner, innerTr] };
|
|
3308
3308
|
return { ty: "gr", nm: _nullishCoalesce(node.name, () => ( node.id)), it: [body, poseTransform(entry)] };
|
|
3309
3309
|
};
|
|
3310
|
-
const artwork = { ...scene.artwork, nodes:
|
|
3310
|
+
const artwork = { ...scene.artwork, nodes: _chunkQMI5HZWAcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) };
|
|
3311
3311
|
const content = shown(artwork.nodes).reverse().map(nodeGroup);
|
|
3312
3312
|
if (artwork.background && rgba(artwork.background))
|
|
3313
3313
|
content.push({ ty: "gr", nm: "Background", it: [{ ty: "rc", nm: "Background", p: { a: 0, k: [artwork.width / 2, artwork.height / 2] }, s: { a: 0, k: [artwork.width, artwork.height] }, r: { a: 0, k: 0 } }, { ty: "fl", c: { a: 0, k: rgba(artwork.background).map(round3) }, o: { a: 0, k: 100 }, r: 1 }, STATIC_TR()] });
|
|
@@ -3406,11 +3406,11 @@ function preset(prst, w, h) {
|
|
|
3406
3406
|
const poly = (pts) => [{ closed: true, anchors: pts.map(([x, y]) => ({ x, y })) }];
|
|
3407
3407
|
switch (prst) {
|
|
3408
3408
|
case "rect":
|
|
3409
|
-
return [
|
|
3409
|
+
return [_chunkQMI5HZWAcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
|
|
3410
3410
|
case "roundRect":
|
|
3411
|
-
return [
|
|
3411
|
+
return [_chunkQMI5HZWAcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h }, Math.min(w, h) * 0.16667)];
|
|
3412
3412
|
case "ellipse":
|
|
3413
|
-
return [
|
|
3413
|
+
return [_chunkQMI5HZWAcjs.ellipseSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
|
|
3414
3414
|
case "triangle":
|
|
3415
3415
|
return poly([[w / 2, 0], [w, h], [0, h]]);
|
|
3416
3416
|
case "rtTriangle":
|
|
@@ -3518,7 +3518,7 @@ function shapes(ctx, tree, map) {
|
|
|
3518
3518
|
let subpaths = cust ? custom(cust, w, h) : prst ? preset(prst, w, h) : null;
|
|
3519
3519
|
if (!subpaths) {
|
|
3520
3520
|
if (prst) ctx.notes.push(`"${name}" is a ${prst}, drawn as its bounding rectangle.`);
|
|
3521
|
-
subpaths = [
|
|
3521
|
+
subpaths = [_chunkQMI5HZWAcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
|
|
3522
3522
|
}
|
|
3523
3523
|
const style = kid(el, "style");
|
|
3524
3524
|
const fill = kid(spPr, "noFill") ? null : _nullishCoalesce(colour(ctx, kid(spPr, "solidFill")), () => ( (el.localName === "cxnSp" ? null : colour(ctx, kid(style, "fillRef")))));
|
|
@@ -3756,7 +3756,7 @@ function nextMotionEffectInstance(scene) {
|
|
|
3756
3756
|
walk(scene.artwork.nodes);
|
|
3757
3757
|
for (let i = 1; ; i++) if (!used.has(`fx${i}`)) return `fx${i}`;
|
|
3758
3758
|
}
|
|
3759
|
-
var motionArtworkSvg = (artwork) =>
|
|
3759
|
+
var motionArtworkSvg = (artwork) => _chunkQMI5HZWAcjs.vectorDocumentToSvg.call(void 0, artwork);
|
|
3760
3760
|
var tag = (commands, source) => commands.map((c) => c.type === "wait" ? c : { ...c, source });
|
|
3761
3761
|
function motionCommandsFromEffect(artwork, motion, source) {
|
|
3762
3762
|
const imported = fromFlairSvgMotion({ svg: motionArtworkSvg(artwork), animate: [..._nullishCoalesce(motion.animate, () => ( []))] });
|
|
@@ -5083,7 +5083,7 @@ function createAnimationEditorToolProvider(controller, options = {}) {
|
|
|
5083
5083
|
handler: ({ svg }) => {
|
|
5084
5084
|
let artwork;
|
|
5085
5085
|
try {
|
|
5086
|
-
artwork =
|
|
5086
|
+
artwork = _chunkQMI5HZWAcjs.parseVectorSvg.call(void 0, svg);
|
|
5087
5087
|
} catch (error) {
|
|
5088
5088
|
throw new Error(`The SVG could not be read: ${error.message}. Nothing was changed.`);
|
|
5089
5089
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createVectorMorph
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-WNAAWLZ5.js";
|
|
4
4
|
import {
|
|
5
5
|
MOTION_ISSUE_CODES,
|
|
6
6
|
motionIssue,
|
|
@@ -31,8 +31,8 @@ import {
|
|
|
31
31
|
vectorNodeBounds,
|
|
32
32
|
vectorPathWorldBezier,
|
|
33
33
|
vectorTextHasOutlines
|
|
34
|
-
} from "../chunk-
|
|
35
|
-
import "../chunk-
|
|
34
|
+
} from "../chunk-6UPGM3JB.js";
|
|
35
|
+
import "../chunk-A5UCR2TO.js";
|
|
36
36
|
import "../chunk-M6DNZNVY.js";
|
|
37
37
|
import {
|
|
38
38
|
bezierPathLength,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
resolveEffectValues
|
|
51
51
|
} from "../chunk-7KWJEYIK.js";
|
|
52
52
|
import "../chunk-V2ZCJRDM.js";
|
|
53
|
-
import "../chunk-
|
|
53
|
+
import "../chunk-2N2QPO3H.js";
|
|
54
54
|
import "../chunk-ODBT55Q7.js";
|
|
55
55
|
import "../chunk-H367YTXI.js";
|
|
56
56
|
import "../chunk-QGHEDC7B.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkEYVVIZJ3cjs = require('./chunk-EYVVIZJ3.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkA2IS7EHEcjs = require('./chunk-A2IS7EHE.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkJGKCC5OFcjs = require('./chunk-JGKCC5OF.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -17,23 +17,23 @@ var _chunkNM3G4VQTcjs = require('./chunk-NM3G4VQT.cjs');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkEBDCRTZIcjs = require('./chunk-EBDCRTZI.cjs');
|
|
21
21
|
require('./chunk-YQGCPL5X.cjs');
|
|
22
22
|
require('./chunk-CWM3CUUX.cjs');
|
|
23
23
|
require('./chunk-XFM3OCHU.cjs');
|
|
24
24
|
|
|
25
25
|
// src/canvas/brushstrokeRender.ts
|
|
26
|
-
var DRY =
|
|
26
|
+
var DRY = _chunkJGKCC5OFcjs.BUILTIN_BRUSHES.filter((b) => _chunkEBDCRTZIcjs.isBrushstrokeBrush.call(void 0, b));
|
|
27
27
|
function listCanvasBrushes() {
|
|
28
28
|
return DRY.map((b) => ({ id: b.id, name: b.name, category: b.category, size: b.tip.size }));
|
|
29
29
|
}
|
|
30
30
|
function resolveCanvasBrush(brush, width) {
|
|
31
31
|
const given = width !== void 0 && Number.isFinite(width) ? Math.max(1, width) : void 0;
|
|
32
32
|
if (typeof brush === "string") {
|
|
33
|
-
const preset =
|
|
33
|
+
const preset = _chunkJGKCC5OFcjs.BUILTIN_BRUSHES.find((b) => b.id === brush);
|
|
34
34
|
const ids = DRY.map((b) => b.id).join(", ");
|
|
35
35
|
if (!preset) throw new Error(`Unknown brush '${brush}'. Use one of the dry paint presets (${ids}) or tip settings ({ hardness, spacing, flow, \u2026 }).`);
|
|
36
|
-
if (!
|
|
36
|
+
if (!_chunkEBDCRTZIcjs.isBrushstrokeBrush.call(void 0, preset)) {
|
|
37
37
|
throw new Error(`Brush '${brush}' (${preset.name}) is not a dry brush: brushed canvas strokes use dry media only (wet paint needs an area to flow in; mixer, blender, smudge and eraser brushes need paint under them). Use one of: ${ids}.`);
|
|
38
38
|
}
|
|
39
39
|
return given === void 0 ? preset : { ...preset, tip: { ...preset.tip, size: given } };
|
|
@@ -44,7 +44,7 @@ function resolveCanvasBrush(brush, width) {
|
|
|
44
44
|
return { size: _nullishCoalesce(given, () => ( 3)), ...brush };
|
|
45
45
|
}
|
|
46
46
|
function resolveCanvasPaint(paint) {
|
|
47
|
-
const source =
|
|
47
|
+
const source = _chunkEBDCRTZIcjs.parsePaintSource.call(void 0, paint, "paint");
|
|
48
48
|
if (source.type === "gradient" && (source.map.by === "velocity" || source.map.by === "time")) {
|
|
49
49
|
throw new Error(`paint.map.by "${source.map.by}" needs timed samples, which canvas strokes do not record; use distance, pressure, tilt, direction, across-tip or random.`);
|
|
50
50
|
}
|
|
@@ -65,14 +65,14 @@ function strokeColor(shape) {
|
|
|
65
65
|
const n = parseInt(parsed.hex.slice(1), 16);
|
|
66
66
|
return [n >> 16 & 255, n >> 8 & 255, n & 255, Math.round(parsed.alpha * 255)];
|
|
67
67
|
}
|
|
68
|
-
var cache = new (0,
|
|
68
|
+
var cache = new (0, _chunkEBDCRTZIcjs.BrushstrokeCache)(128);
|
|
69
69
|
var urls = /* @__PURE__ */ new WeakMap();
|
|
70
70
|
function renderShapeBrushstrokeNow(shape, scale, place = {}) {
|
|
71
71
|
const seed = shape.brush.seed;
|
|
72
72
|
const textured = typeof seed === "number" && Number.isFinite(seed);
|
|
73
73
|
const size = _nullishCoalesce(shape.brush.size, () => ( (textured ? void 0 : _nullishCoalesce(shape.strokeWidth, () => ( 3)))));
|
|
74
74
|
const brush = resolveCanvasBrush(shape.brush.brush, size);
|
|
75
|
-
const points =
|
|
75
|
+
const points = _chunkEYVVIZJ3cjs.pathDataToPolyline.call(void 0, shape.d);
|
|
76
76
|
if (!points.length) return null;
|
|
77
77
|
const { pressure, tiltX, tiltY } = shape.brush;
|
|
78
78
|
const input = {
|
|
@@ -95,7 +95,7 @@ function renderShapeBrushstrokeNow(shape, scale, place = {}) {
|
|
|
95
95
|
if (!stroke.bounds) return null;
|
|
96
96
|
let href = urls.get(stroke);
|
|
97
97
|
if (href === void 0) {
|
|
98
|
-
href =
|
|
98
|
+
href = _chunkEBDCRTZIcjs.brushstrokeDataUrl.call(void 0, stroke);
|
|
99
99
|
urls.set(stroke, href);
|
|
100
100
|
}
|
|
101
101
|
return { href, ...stroke.bounds, scale: stroke.scale };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pathDataToPolyline
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-45XXVHVG.js";
|
|
4
4
|
import {
|
|
5
5
|
parseCssColor
|
|
6
6
|
} from "./chunk-3CI7FRMK.js";
|
|
7
7
|
import {
|
|
8
8
|
BUILTIN_BRUSHES
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-A5UCR2TO.js";
|
|
10
10
|
import {
|
|
11
11
|
formatNumber,
|
|
12
12
|
getShapeSvg,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
brushstrokeDataUrl,
|
|
18
18
|
isBrushstrokeBrush,
|
|
19
19
|
parsePaintSource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2N2QPO3H.js";
|
|
21
21
|
import "./chunk-ODBT55Q7.js";
|
|
22
22
|
import "./chunk-H367YTXI.js";
|
|
23
23
|
import "./chunk-QGHEDC7B.js";
|