@pixerate/editor 0.164.0 → 0.166.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.cjs +54 -39
- package/dist/agent/index.js +24 -9
- package/dist/animation/index.cjs +6 -5
- package/dist/animation/index.js +5 -4
- package/dist/animation-editor/index.cjs +65 -64
- package/dist/animation-editor/index.js +8 -7
- package/dist/bridge/cli.cjs +3 -3
- package/dist/bridge/cli.js +2 -2
- package/dist/bridge/index.cjs +3 -3
- package/dist/bridge/index.js +2 -2
- package/dist/canvas/index.cjs +89 -87
- package/dist/canvas/index.js +11 -9
- package/dist/chart/controller.d.cts +60 -2
- package/dist/chart/controller.d.ts +60 -2
- package/dist/chart/index.cjs +657 -163
- package/dist/chart/index.d.cts +3 -0
- package/dist/chart/index.d.ts +3 -0
- package/dist/chart/index.js +512 -18
- package/dist/chart/layout-families.d.cts +14 -0
- package/dist/chart/layout-families.d.ts +14 -0
- package/dist/chart/layout-shared.d.cts +5 -0
- package/dist/chart/layout-shared.d.ts +5 -0
- package/dist/chart/links.d.cts +34 -0
- package/dist/chart/links.d.ts +34 -0
- package/dist/chart/mermaid.d.cts +9 -6
- package/dist/chart/mermaid.d.ts +9 -6
- package/dist/chart/race.d.cts +26 -0
- package/dist/chart/race.d.ts +26 -0
- package/dist/chart/schemas.d.cts +5 -0
- package/dist/chart/schemas.d.ts +5 -0
- package/dist/chart/spec.d.cts +3 -2
- package/dist/chart/spec.d.ts +3 -2
- package/dist/chart/style.d.cts +33 -0
- package/dist/chart/style.d.ts +33 -0
- package/dist/chart/types.d.cts +28 -2
- package/dist/chart/types.d.ts +28 -2
- package/dist/{chunk-ZVNAMTFO.cjs → chunk-3FSUJIXN.cjs} +18 -174
- package/dist/{chunk-RQCMSEM5.cjs → chunk-4QUUHTGJ.cjs} +2 -2
- package/dist/{chunk-CIPIESX4.cjs → chunk-4ZC5QJE2.cjs} +3 -3
- package/dist/{chunk-S6X2QRVU.cjs → chunk-5UEFBM2M.cjs} +1 -138
- package/dist/{chunk-5FNGLV2D.js → chunk-5UNQDC3Q.js} +18 -3
- package/dist/{chunk-YSAGBIRW.cjs → chunk-6FYIFGBW.cjs} +16 -16
- package/dist/{chunk-QYZGBVNC.js → chunk-7272D3K2.js} +10 -8
- package/dist/{chunk-462WGGXX.cjs → chunk-AMX23CSN.cjs} +27 -16
- package/dist/{chunk-3VLOOO3G.js → chunk-BDIM6NVW.js} +1 -1
- package/dist/{chunk-R3P2M7HU.cjs → chunk-BPX4Z3N3.cjs} +355 -207
- package/dist/{chunk-D54JHQK2.cjs → chunk-CHLV7UFP.cjs} +51 -51
- package/dist/{chunk-OXERWBKE.js → chunk-DFCAR7AW.js} +3 -3
- package/dist/{chunk-GZ2FM3ZB.js → chunk-DKNEQX7T.js} +6 -162
- package/dist/{chunk-JCXMJUQO.cjs → chunk-EGZM52EO.cjs} +3 -3
- package/dist/{chunk-ES3UEVUT.cjs → chunk-EUIDTZNQ.cjs} +112 -110
- package/dist/{chunk-H3OEM3Q2.js → chunk-F6R67I3A.js} +1 -1
- package/dist/{chunk-3NEZJCBY.js → chunk-FR432ROA.js} +349 -201
- package/dist/chunk-HIDFL5LQ.js +484 -0
- package/dist/{chunk-22KLZZGH.cjs → chunk-HXOBOHH2.cjs} +8 -8
- package/dist/{chunk-MKTDELCD.js → chunk-I5MRJW7B.js} +1 -1
- package/dist/{chunk-SDHZG5TF.js → chunk-ILP77UD6.js} +160 -2
- package/dist/{chunk-Z4P2RBMJ.js → chunk-ITANXMZD.js} +177 -3
- package/dist/chunk-KGRZMHZB.js +204 -0
- package/dist/{chunk-SET6KJOP.js → chunk-LPIKXPBM.js} +1 -1
- package/dist/{chunk-BQWGN5WH.js → chunk-M2TPMYJE.js} +1 -1
- package/dist/{chunk-GTELFJRE.cjs → chunk-M5GLQQWG.cjs} +2 -2
- package/dist/{chunk-4VU4CP7R.js → chunk-MHLU6GRJ.js} +1 -138
- package/dist/{chunk-NZD2MZJC.cjs → chunk-MZFZSVUJ.cjs} +38 -23
- package/dist/{chunk-DAPQGA55.js → chunk-NQQDGGXY.js} +2 -2
- package/dist/chunk-O6OGNDND.js +164 -0
- package/dist/{chunk-PA3IMPPS.cjs → chunk-OVYQAYGH.cjs} +81 -81
- package/dist/{chunk-YXOW456B.js → chunk-PPEDZ5WR.js} +1 -1
- package/dist/{chunk-24M7VD6M.cjs → chunk-S4EIAIEW.cjs} +7 -7
- package/dist/{chunk-M4MIZPQI.cjs → chunk-SJ2CPTQC.cjs} +189 -15
- package/dist/{chunk-YGG7WDWT.cjs → chunk-SZWVMB3B.cjs} +24 -18
- package/dist/chunk-TFF2GTGN.cjs +153 -0
- package/dist/chunk-TTCJPX4U.cjs +204 -0
- package/dist/{chunk-SBQVEBSU.cjs → chunk-UUUTEVX6.cjs} +242 -68
- package/dist/{chunk-WI7QJA7A.cjs → chunk-UXETV2NC.cjs} +161 -3
- package/dist/{chunk-GKNEJ6EN.cjs → chunk-V5L2G22R.cjs} +321 -107
- package/dist/{chunk-TALQONZ5.js → chunk-VB2CY6EG.js} +3 -3
- package/dist/{chunk-QY4KUDMY.js → chunk-VRXXAXUT.js} +2 -2
- package/dist/chunk-VU6WQSMB.cjs +164 -0
- package/dist/{chunk-NHLYK3AX.js → chunk-XBQX76CT.js} +182 -8
- package/dist/{chunk-5AARIS3R.cjs → chunk-XCDGM7TD.cjs} +37 -37
- package/dist/{chunk-POR54B55.js → chunk-XNU45TYA.js} +7 -1
- package/dist/{chunk-EVXQNQND.js → chunk-XZB3TJ6K.js} +16 -5
- package/dist/chunk-YBAPT7NL.js +153 -0
- package/dist/{chunk-SZA42R4N.js → chunk-YUFTVNLX.js} +230 -16
- package/dist/chunk-Z2UQYMPS.cjs +484 -0
- package/dist/color/index.cjs +5 -3
- package/dist/color/index.js +12 -10
- package/dist/diagram/index.cjs +55 -243
- package/dist/diagram/index.js +12 -200
- package/dist/export/index.cjs +7 -6
- package/dist/export/index.js +6 -5
- package/dist/extensions/index.cjs +12 -9
- package/dist/extensions/index.js +11 -8
- package/dist/gradient/index.cjs +29 -27
- package/dist/gradient/index.js +6 -4
- package/dist/image-editor/index.cjs +644 -643
- package/dist/image-editor/index.js +7 -6
- package/dist/index.cjs +21 -18
- package/dist/index.js +14 -11
- package/dist/paint-editor/index.cjs +19 -18
- package/dist/paint-editor/index.js +7 -6
- package/dist/parameters/index.cjs +2 -2
- package/dist/parameters/index.js +1 -1
- package/dist/persistence/assetWrites.d.cts +22 -0
- package/dist/persistence/assetWrites.d.ts +22 -0
- package/dist/persistence/assets.d.cts +71 -0
- package/dist/persistence/assets.d.ts +71 -0
- package/dist/persistence/documentStore.d.cts +17 -1
- package/dist/persistence/documentStore.d.ts +17 -1
- package/dist/persistence/documentTools.d.cts +5 -1
- package/dist/persistence/documentTools.d.ts +5 -1
- package/dist/persistence/editorAutosave.d.cts +7 -0
- package/dist/persistence/editorAutosave.d.ts +7 -0
- package/dist/persistence/index.cjs +141 -21
- package/dist/persistence/index.js +130 -10
- package/dist/persistence/storage.d.cts +13 -1
- package/dist/persistence/storage.d.ts +13 -1
- package/dist/spreadsheet/index.cjs +3 -3
- package/dist/spreadsheet/index.js +2 -2
- package/dist/tokens/index.cjs +11 -3
- package/dist/tokens/index.d.cts +1 -0
- package/dist/tokens/index.d.ts +1 -0
- package/dist/tokens/index.js +10 -2
- package/dist/tokens/style.d.cts +36 -0
- package/dist/tokens/style.d.ts +36 -0
- package/dist/tools/index.cjs +15 -3
- package/dist/tools/index.d.cts +2 -0
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.js +14 -2
- package/dist/tools/style-tools.d.cts +19 -0
- package/dist/tools/style-tools.d.ts +19 -0
- package/dist/tools/style.d.cts +212 -0
- package/dist/tools/style.d.ts +212 -0
- package/dist/tools/view.d.cts +6 -0
- package/dist/tools/view.d.ts +6 -0
- package/dist/typography/index.cjs +8 -6
- package/dist/typography/index.js +5 -3
- package/dist/vector/index.cjs +953 -952
- package/dist/vector/index.js +7 -6
- package/dist/video-editor/index.cjs +8 -7
- package/dist/video-editor/index.js +6 -5
- package/package.json +1 -1
- package/skills/pixerate-chart/SKILL.md +20 -2
- package/dist/chunk-ERAGQL2N.cjs +0 -68
- package/dist/chunk-KMU6QJB7.js +0 -68
|
@@ -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 _chunkXCDGM7TDcjs = require('../chunk-XCDGM7TD.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -31,7 +31,7 @@ var _chunkEBDZWIOPcjs = require('../chunk-EBDZWIOP.cjs');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunkEGZM52EOcjs = require('../chunk-EGZM52EO.cjs');
|
|
35
35
|
require('../chunk-YQ5C5BVK.cjs');
|
|
36
36
|
require('../chunk-CVFAAZXE.cjs');
|
|
37
37
|
|
|
@@ -61,7 +61,7 @@ var _chunkALNIFK5Gcjs = require('../chunk-ALNIFK5G.cjs');
|
|
|
61
61
|
require('../chunk-UWEQ55MY.cjs');
|
|
62
62
|
|
|
63
63
|
|
|
64
|
-
var
|
|
64
|
+
var _chunkSJ2CPTQCcjs = require('../chunk-SJ2CPTQC.cjs');
|
|
65
65
|
require('../chunk-2BSBFBOA.cjs');
|
|
66
66
|
|
|
67
67
|
|
|
@@ -72,7 +72,7 @@ var _chunkFJ2MSI43cjs = require('../chunk-FJ2MSI43.cjs');
|
|
|
72
72
|
var _chunk7B5GTJXBcjs = require('../chunk-7B5GTJXB.cjs');
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
var
|
|
75
|
+
var _chunkM5GLQQWGcjs = require('../chunk-M5GLQQWG.cjs');
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
|
|
@@ -84,14 +84,15 @@ var _chunkGTELFJREcjs = require('../chunk-GTELFJRE.cjs');
|
|
|
84
84
|
var _chunkDWJJI6RTcjs = require('../chunk-DWJJI6RT.cjs');
|
|
85
85
|
|
|
86
86
|
|
|
87
|
-
var
|
|
87
|
+
var _chunk4ZC5QJE2cjs = require('../chunk-4ZC5QJE2.cjs');
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
|
|
92
92
|
var _chunkA6QWKBJPcjs = require('../chunk-A6QWKBJP.cjs');
|
|
93
|
-
require('../chunk-
|
|
94
|
-
require('../chunk-
|
|
93
|
+
require('../chunk-EUIDTZNQ.cjs');
|
|
94
|
+
require('../chunk-TFF2GTGN.cjs');
|
|
95
|
+
require('../chunk-5UEFBM2M.cjs');
|
|
95
96
|
require('../chunk-IPJ3TEYR.cjs');
|
|
96
97
|
|
|
97
98
|
// src/animation-editor/types.ts
|
|
@@ -596,7 +597,7 @@ function smoothMotionTimes(points, start, duration, pacing = "even") {
|
|
|
596
597
|
function motionTextLayout(nodes, id) {
|
|
597
598
|
const group = _optionalChain([nodes, 'access', _5 => _5.get, 'call', _6 => _6(id), 'optionalAccess', _7 => _7.node]);
|
|
598
599
|
if (!group || group.type !== "group") return null;
|
|
599
|
-
const letters =
|
|
600
|
+
const letters = _chunkEGZM52EOcjs.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);
|
|
600
601
|
if (!letters.length) return null;
|
|
601
602
|
const lines = [];
|
|
602
603
|
for (const l of [...letters].sort((a, c) => a.b.y + a.b.height / 2 - (c.b.y + c.b.height / 2))) {
|
|
@@ -681,21 +682,21 @@ function indexMotionNodes(nodes) {
|
|
|
681
682
|
const out = /* @__PURE__ */ new Map();
|
|
682
683
|
const walk = (list, parentWorld, ancestors) => {
|
|
683
684
|
for (const node of list) {
|
|
684
|
-
const local =
|
|
685
|
-
const bounds =
|
|
685
|
+
const local = _chunkEGZM52EOcjs.vectorNodeBounds.call(void 0, node);
|
|
686
|
+
const bounds = _chunkEGZM52EOcjs.vectorNodeBounds.call(void 0, node, parentWorld);
|
|
686
687
|
const center = local ? { x: local.x + local.width / 2, y: local.y + local.height / 2 } : { x: 0, y: 0 };
|
|
687
688
|
if (!out.has(node.id)) out.set(node.id, { node, ancestors, parentWorld, center, bounds, box: local });
|
|
688
|
-
if (node.type === "group") walk(node.children,
|
|
689
|
+
if (node.type === "group") walk(node.children, _chunkEGZM52EOcjs.multiplyMatrices.call(void 0, _chunkEGZM52EOcjs.nodeMatrix.call(void 0, node), parentWorld), [...ancestors, node.id]);
|
|
689
690
|
}
|
|
690
691
|
};
|
|
691
|
-
walk(nodes,
|
|
692
|
+
walk(nodes, _chunkEGZM52EOcjs.IDENTITY_MATRIX, []);
|
|
692
693
|
indexCache.set(nodes, out);
|
|
693
694
|
return out;
|
|
694
695
|
}
|
|
695
696
|
var solid = (paint) => typeof paint === "string" && paint !== "none" ? paint : void 0;
|
|
696
697
|
function firstPaint(node, key) {
|
|
697
698
|
if (node.type === "path") return solid(node[key]);
|
|
698
|
-
for (const p of
|
|
699
|
+
for (const p of _chunkEGZM52EOcjs.collectPathNodes.call(void 0, node)) {
|
|
699
700
|
const s = solid(p[key]);
|
|
700
701
|
if (s) return s;
|
|
701
702
|
}
|
|
@@ -703,7 +704,7 @@ function firstPaint(node, key) {
|
|
|
703
704
|
}
|
|
704
705
|
function strokeReach(node) {
|
|
705
706
|
let reach = 0;
|
|
706
|
-
for (const p of node.type === "path" ? [node] :
|
|
707
|
+
for (const p of node.type === "path" ? [node] : _chunkEGZM52EOcjs.collectPathNodes.call(void 0, node)) {
|
|
707
708
|
if (p.stroke == null || p.stroke === "none") continue;
|
|
708
709
|
const width = _nullishCoalesce(p.strokeWidth, () => ( 1));
|
|
709
710
|
reach = Math.max(reach, p.strokeAlign === "outside" ? width : p.strokeAlign === "inside" ? 0 : width / 2);
|
|
@@ -773,7 +774,7 @@ function motionRestValue(entry, property, artwork) {
|
|
|
773
774
|
case "stroke":
|
|
774
775
|
return _nullishCoalesce((node && firstPaint(node, property)), () => ( "transparent"));
|
|
775
776
|
case "strokeWidth": {
|
|
776
|
-
const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ?
|
|
777
|
+
const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ? _chunkEGZM52EOcjs.collectPathNodes.call(void 0, node)[0] : void 0;
|
|
777
778
|
return _nullishCoalesce(_optionalChain([path, 'optionalAccess', _14 => _14.strokeWidth]), () => ( 1));
|
|
778
779
|
}
|
|
779
780
|
case "shape":
|
|
@@ -797,7 +798,7 @@ function interpolateMotionValue(from, to, u) {
|
|
|
797
798
|
if (u <= 0) return from;
|
|
798
799
|
if (u >= 1) return to;
|
|
799
800
|
if (typeof from === "string" && typeof to === "string") {
|
|
800
|
-
const mixed =
|
|
801
|
+
const mixed = _chunk4ZC5QJE2cjs.mixColorsOklab.call(void 0, from, to, u);
|
|
801
802
|
if (mixed !== null) return mixed;
|
|
802
803
|
}
|
|
803
804
|
return u < 1 ? from : to;
|
|
@@ -884,12 +885,12 @@ function resolveMotionCamera(camera, scene) {
|
|
|
884
885
|
const r = camera;
|
|
885
886
|
return { x: r.x, y: r.y, width: r.width, height: r.height };
|
|
886
887
|
}
|
|
887
|
-
function motionPathLength(node, parentWorld =
|
|
888
|
+
function motionPathLength(node, parentWorld = _chunkEGZM52EOcjs.IDENTITY_MATRIX) {
|
|
888
889
|
let longest = 0;
|
|
889
|
-
const paths = node.type === "path" ? [node] :
|
|
890
|
+
const paths = node.type === "path" ? [node] : _chunkEGZM52EOcjs.collectPathNodes.call(void 0, node);
|
|
890
891
|
for (const p of paths) {
|
|
891
892
|
try {
|
|
892
|
-
longest = Math.max(longest, _chunkGF2RBSDMcjs.bezierPathLength.call(void 0,
|
|
893
|
+
longest = Math.max(longest, _chunkGF2RBSDMcjs.bezierPathLength.call(void 0, _chunkEGZM52EOcjs.vectorPathWorldBezier.call(void 0, p, parentWorld, { effects: false })));
|
|
893
894
|
} catch (e2) {
|
|
894
895
|
}
|
|
895
896
|
}
|
|
@@ -1142,12 +1143,12 @@ function compileMotionScene(scene) {
|
|
|
1142
1143
|
const order2 = _nullishCoalesce(o.order, () => ( "together"));
|
|
1143
1144
|
const pace = _nullishCoalesce(o.pace, () => ( "time"));
|
|
1144
1145
|
if (order2 === "together" && pace === "time") return null;
|
|
1145
|
-
const paths = entry.node.type === "path" ? [entry.node] :
|
|
1146
|
+
const paths = entry.node.type === "path" ? [entry.node] : _chunkEGZM52EOcjs.collectPathNodes.call(void 0, entry.node);
|
|
1146
1147
|
let list = paths.map((p) => {
|
|
1147
1148
|
const at = nodes.get(p.id);
|
|
1148
1149
|
let first = { x: 0, y: 0 };
|
|
1149
1150
|
try {
|
|
1150
|
-
const m =
|
|
1151
|
+
const m = _chunkEGZM52EOcjs.vectorPathWorldBezier.call(void 0, p, _nullishCoalesce(_optionalChain([at, 'optionalAccess', _41 => _41.parentWorld]), () => ( _chunkEGZM52EOcjs.IDENTITY_MATRIX)), { effects: false })[0];
|
|
1151
1152
|
if (m && m.type === "M") first = { x: m.x, y: m.y };
|
|
1152
1153
|
} catch (e3) {
|
|
1153
1154
|
}
|
|
@@ -1259,17 +1260,17 @@ function compileMotionScene(scene) {
|
|
|
1259
1260
|
let dx = _nullishCoalesce(_optionalChain([command3, 'access', _44 => _44.by, 'optionalAccess', _45 => _45.x]), () => ( 0));
|
|
1260
1261
|
let dy = _nullishCoalesce(_optionalChain([command3, 'access', _46 => _46.by, 'optionalAccess', _47 => _47.y]), () => ( 0));
|
|
1261
1262
|
if (command3.to) {
|
|
1262
|
-
const inv =
|
|
1263
|
-
const target =
|
|
1263
|
+
const inv = _chunkEGZM52EOcjs.invertMatrix.call(void 0, entry.parentWorld);
|
|
1264
|
+
const target = _chunkEGZM52EOcjs.applyMatrix.call(void 0, inv, command3.to);
|
|
1264
1265
|
dx = target.x - (entry.center.x + num2("x"));
|
|
1265
1266
|
dy = target.y - (entry.center.y + num2("y"));
|
|
1266
1267
|
}
|
|
1267
1268
|
if (_optionalChain([command3, 'access', _48 => _48.via, 'optionalAccess', _49 => _49.length])) {
|
|
1268
|
-
const inv =
|
|
1269
|
+
const inv = _chunkEGZM52EOcjs.invertMatrix.call(void 0, entry.parentWorld);
|
|
1269
1270
|
const x0 = num2("x");
|
|
1270
1271
|
const y0 = num2("y");
|
|
1271
1272
|
const add = command3.blend === "add";
|
|
1272
|
-
const offsets = [{ x: 0, y: 0 }, ...command3.via.map((p) =>
|
|
1273
|
+
const offsets = [{ x: 0, y: 0 }, ...command3.via.map((p) => _chunkEGZM52EOcjs.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 }];
|
|
1273
1274
|
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")));
|
|
1274
1275
|
for (const axis of ["x", "y"]) {
|
|
1275
1276
|
const base = add ? 0 : axis === "x" ? x0 : y0;
|
|
@@ -1412,13 +1413,13 @@ function morphBetween(a, b) {
|
|
|
1412
1413
|
let inner = morphCache.get(a);
|
|
1413
1414
|
if (!inner) morphCache.set(a, inner = /* @__PURE__ */ new WeakMap());
|
|
1414
1415
|
let morph = inner.get(b);
|
|
1415
|
-
if (!morph) inner.set(b, morph =
|
|
1416
|
+
if (!morph) inner.set(b, morph = _chunkXCDGM7TDcjs.createVectorMorph.call(void 0, a, b, { id: a.id }));
|
|
1416
1417
|
return morph;
|
|
1417
1418
|
}
|
|
1418
1419
|
function shapeIn(entry, shape) {
|
|
1419
1420
|
if (shape === entry) return entry.node;
|
|
1420
|
-
const m =
|
|
1421
|
-
return { ...shape.node, ...
|
|
1421
|
+
const m = _chunkEGZM52EOcjs.multiplyMatrices.call(void 0, _chunkEGZM52EOcjs.multiplyMatrices.call(void 0, _chunkEGZM52EOcjs.nodeMatrix.call(void 0, shape.node), shape.parentWorld), _chunkEGZM52EOcjs.invertMatrix.call(void 0, entry.parentWorld));
|
|
1422
|
+
return { ...shape.node, ..._chunkEGZM52EOcjs.isIdentityMatrix.call(void 0, m) ? { transform: void 0 } : { transform: m } };
|
|
1422
1423
|
}
|
|
1423
1424
|
function shapeAt(entry, timeline, nodes, time) {
|
|
1424
1425
|
const track = timeline.tracks.get(motionTrackKey(entry.node.id, "shape"));
|
|
@@ -1438,7 +1439,7 @@ function shapeAt(entry, timeline, nodes, time) {
|
|
|
1438
1439
|
function motionFollowRoute(entry, path) {
|
|
1439
1440
|
if (!path || path.node.type !== "path") return null;
|
|
1440
1441
|
try {
|
|
1441
|
-
return _chunkGF2RBSDMcjs.transformBezierPath.call(void 0,
|
|
1442
|
+
return _chunkGF2RBSDMcjs.transformBezierPath.call(void 0, _chunkEGZM52EOcjs.vectorPathWorldBezier.call(void 0, path.node, path.parentWorld, { effects: false }), _chunkEGZM52EOcjs.invertMatrix.call(void 0, entry.parentWorld));
|
|
1442
1443
|
} catch (e4) {
|
|
1443
1444
|
return null;
|
|
1444
1445
|
}
|
|
@@ -1472,9 +1473,9 @@ function motionNodeOffset(entry, timeline, time, nodes = indexMotionNodes([entry
|
|
|
1472
1473
|
const scaleX = read("scaleX", 1);
|
|
1473
1474
|
const scaleY = read("scaleY", 1);
|
|
1474
1475
|
const c = entry.center;
|
|
1475
|
-
let matrix =
|
|
1476
|
+
let matrix = _chunkEGZM52EOcjs.multiplyMatrices.call(void 0, _chunkEGZM52EOcjs.multiplyMatrices.call(void 0, _chunkEGZM52EOcjs.scaleMatrix.call(void 0, scaleX, scaleY, c), _chunkEGZM52EOcjs.rotateMatrix.call(void 0, rotation, c)), _chunkEGZM52EOcjs.translateMatrix.call(void 0, dx, dy));
|
|
1476
1477
|
const along = follow ? followAt(entry, timeline, nodes, time) : null;
|
|
1477
|
-
if (along) matrix =
|
|
1478
|
+
if (along) matrix = _chunkEGZM52EOcjs.multiplyMatrices.call(void 0, matrix, _chunkEGZM52EOcjs.multiplyMatrices.call(void 0, _chunkEGZM52EOcjs.multiplyMatrices.call(void 0, _chunkEGZM52EOcjs.translateMatrix.call(void 0, -c.x, -c.y), _chunkEGZM52EOcjs.rotateMatrix.call(void 0, along.angle)), _chunkEGZM52EOcjs.translateMatrix.call(void 0, along.x, along.y)));
|
|
1478
1479
|
return { matrix, dx, dy, rotation, scaleX, scaleY, follow: along };
|
|
1479
1480
|
}
|
|
1480
1481
|
function motionNodeClips(id, timeline, time) {
|
|
@@ -1541,7 +1542,7 @@ function motionFrameAt(scene, time, options = {}) {
|
|
|
1541
1542
|
const start = Math.min(1, Math.max(0, typeof drawStart === "number" ? drawStart : 0));
|
|
1542
1543
|
const end = Math.min(1, Math.max(0, typeof drawEnd === "number" ? drawEnd : 1));
|
|
1543
1544
|
if (start > 0 || end < 1) {
|
|
1544
|
-
const trim =
|
|
1545
|
+
const trim = _chunkEGZM52EOcjs.createVectorEffect.call(void 0, "trim", MOTION_DRAW_EFFECT_ID, { start: tidy(start * 100), end: tidy(end * 100) });
|
|
1545
1546
|
p = { ...p, effects: [trim, ...(_nullishCoalesce(p.effects, () => ( []))).filter((e) => e.id !== MOTION_DRAW_EFFECT_ID)] };
|
|
1546
1547
|
}
|
|
1547
1548
|
}
|
|
@@ -1555,8 +1556,8 @@ function motionFrameAt(scene, time, options = {}) {
|
|
|
1555
1556
|
if (o >= 1) delete out.opacity;
|
|
1556
1557
|
}
|
|
1557
1558
|
const offset = options.offsets === false ? null : motionNodeOffset(entry, timeline, time, nodes);
|
|
1558
|
-
if (offset && !
|
|
1559
|
-
const m =
|
|
1559
|
+
if (offset && !_chunkEGZM52EOcjs.isIdentityMatrix.call(void 0, offset.matrix)) {
|
|
1560
|
+
const m = _chunkEGZM52EOcjs.multiplyMatrices.call(void 0, _chunkEGZM52EOcjs.nodeMatrix.call(void 0, out), offset.matrix).map(tidy);
|
|
1560
1561
|
out = { ...out, transform: m };
|
|
1561
1562
|
}
|
|
1562
1563
|
return out;
|
|
@@ -1576,7 +1577,7 @@ function motionFrameToSvg(scene, time, options = {}) {
|
|
|
1576
1577
|
const wrap = { ...options.wrap };
|
|
1577
1578
|
for (const [id, clips] of Object.entries(frame.clips))
|
|
1578
1579
|
wrap[id] = [..._nullishCoalesce(wrap[id], () => ( [])), ...clips.map((clip, i) => ({ clip: { id: `${prefix}reveal-${id}-${i}`, shape: clip.shape, attrs: motionClipAttrs(clip) } }))];
|
|
1579
|
-
return withViewBox(
|
|
1580
|
+
return withViewBox(_chunkEGZM52EOcjs.vectorDocumentToSvg.call(void 0, frame.document, { ...options, wrap }), frame.camera);
|
|
1580
1581
|
}
|
|
1581
1582
|
function withViewBox(svg, box) {
|
|
1582
1583
|
const f = (n) => String(Math.round(n * 1e3) / 1e3);
|
|
@@ -1759,8 +1760,8 @@ function visibleAt(timeline, id, time, node) {
|
|
|
1759
1760
|
if (Array.isArray(rect) && (rect[2] <= 1e-4 || rect[3] <= 1e-4)) return false;
|
|
1760
1761
|
const circle = clip("clipCircle");
|
|
1761
1762
|
if (Array.isArray(circle) && circle[2] <= 1e-4) return false;
|
|
1762
|
-
const hasFill = node.type === "path" ? !!node.fill && node.fill !== "none" :
|
|
1763
|
-
const drawn = num2("drawEnd", 1) > 0.01 && (node.type === "path" ||
|
|
1763
|
+
const hasFill = node.type === "path" ? !!node.fill && node.fill !== "none" : _chunkEGZM52EOcjs.collectPathNodes.call(void 0, node).some((p) => p.fill && p.fill !== "none");
|
|
1764
|
+
const drawn = num2("drawEnd", 1) > 0.01 && (node.type === "path" || _chunkEGZM52EOcjs.collectPathNodes.call(void 0, node).length === 0 || _chunkEGZM52EOcjs.collectPathNodes.call(void 0, node).some((p) => {
|
|
1764
1765
|
const v = trackValue(timeline.tracks.get(motionTrackKey(p.id, "drawEnd")), time);
|
|
1765
1766
|
return typeof v !== "number" || v > 0.01;
|
|
1766
1767
|
}));
|
|
@@ -1846,7 +1847,7 @@ function checkMotionScene(scene) {
|
|
|
1846
1847
|
}
|
|
1847
1848
|
for (const id of targets) {
|
|
1848
1849
|
const node = nodes.get(id).node;
|
|
1849
|
-
const paths = node.type === "path" ? [node] :
|
|
1850
|
+
const paths = node.type === "path" ? [node] : _chunkEGZM52EOcjs.collectPathNodes.call(void 0, node);
|
|
1850
1851
|
if (paths.some((p) => p[key] !== void 0 && p[key] !== null && typeof p[key] !== "string"))
|
|
1851
1852
|
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] }));
|
|
1852
1853
|
}
|
|
@@ -1859,7 +1860,7 @@ function checkMotionScene(scene) {
|
|
|
1859
1860
|
else
|
|
1860
1861
|
for (const id of targets) {
|
|
1861
1862
|
const node = nodes.get(id).node;
|
|
1862
|
-
const paths = node.type === "path" ? [node] :
|
|
1863
|
+
const paths = node.type === "path" ? [node] : _chunkEGZM52EOcjs.collectPathNodes.call(void 0, node);
|
|
1863
1864
|
if (paths.some((p) => typeof p[key] !== "string"))
|
|
1864
1865
|
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] }));
|
|
1865
1866
|
}
|
|
@@ -2304,7 +2305,7 @@ function motionNodePose(scene, id, time) {
|
|
|
2304
2305
|
if (!entry) throw new Error(`There is no element ${_chunkEBDZWIOPcjs.namedWithSuggestion.call(void 0, id, [...indexMotionNodes(scene.artwork.nodes).keys()])} in the artwork.`);
|
|
2305
2306
|
const timeline = compileMotionScene(scene);
|
|
2306
2307
|
const drawn = indexMotionNodes(motionFrameAt(scene, time).document.nodes).get(id);
|
|
2307
|
-
const centre =
|
|
2308
|
+
const centre = _chunkEGZM52EOcjs.applyMatrix.call(void 0, entry.parentWorld, { x: entry.center.x + motionPropertyValue(timeline, id, "x", time), y: entry.center.y + motionPropertyValue(timeline, id, "y", time) });
|
|
2308
2309
|
const paint = (property) => _nullishCoalesce(trackValue(timeline.tracks.get(motionTrackKey(id, property)), time), () => ( motionRestValue(entry, property, scene.artwork)));
|
|
2309
2310
|
const fill = paint("fill");
|
|
2310
2311
|
const stroke = paint("stroke");
|
|
@@ -2651,7 +2652,7 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2651
2652
|
raw: (t) => transformAt(t, true)
|
|
2652
2653
|
});
|
|
2653
2654
|
}
|
|
2654
|
-
const paths = node.type === "path" ? [node] :
|
|
2655
|
+
const paths = node.type === "path" ? [node] : _chunkEGZM52EOcjs.collectPathNodes.call(void 0, node);
|
|
2655
2656
|
for (const path of paths) {
|
|
2656
2657
|
if (pathsSeen.has(path.id)) continue;
|
|
2657
2658
|
pathsSeen.add(path.id);
|
|
@@ -2673,7 +2674,7 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2673
2674
|
if (shapeSegments.length) {
|
|
2674
2675
|
if (node.type !== "path") notes.push(`"${id}" is a group: its morph or effect animation is not exported (Flair tweens one path's "d").`);
|
|
2675
2676
|
else {
|
|
2676
|
-
const inverse =
|
|
2677
|
+
const inverse = _chunkEGZM52EOcjs.invertMatrix.call(void 0, _chunkEGZM52EOcjs.nodeMatrix.call(void 0, node));
|
|
2677
2678
|
channels.push({
|
|
2678
2679
|
id,
|
|
2679
2680
|
kind: "attr",
|
|
@@ -2682,9 +2683,9 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2682
2683
|
exact: () => false,
|
|
2683
2684
|
value: (t) => {
|
|
2684
2685
|
const frame = motionFrameAt(scene, t, { draw: false, offsets: false });
|
|
2685
|
-
const now =
|
|
2686
|
+
const now = _chunkEGZM52EOcjs.expandVectorAppearance.call(void 0, _optionalChain([indexMotionNodes, 'call', _114 => _114(frame.document.nodes), 'access', _115 => _115.get, 'call', _116 => _116(id), 'optionalAccess', _117 => _117.node]));
|
|
2686
2687
|
if (!now || now.type !== "path") return "";
|
|
2687
|
-
const bezier = _chunkGF2RBSDMcjs.transformBezierPath.call(void 0,
|
|
2688
|
+
const bezier = _chunkGF2RBSDMcjs.transformBezierPath.call(void 0, _chunkEGZM52EOcjs.vectorPathWorldBezier.call(void 0, now, _chunkEGZM52EOcjs.IDENTITY_MATRIX, { effects: false }), inverse);
|
|
2688
2689
|
return _chunkGF2RBSDMcjs.bezierPathToSvg.call(void 0, bezier, { precision: Math.min(precision, 2) });
|
|
2689
2690
|
}
|
|
2690
2691
|
});
|
|
@@ -2791,7 +2792,7 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2791
2792
|
}
|
|
2792
2793
|
if (scene.motionBlur) notes.push("Motion blur is drawn on the stage only; Flair plays the scene sharp.");
|
|
2793
2794
|
if (trigger && (_nullishCoalesce(scene.loop, () => ( "none"))) !== "none") notes.push(`The scene plays on ${trigger}, so its loop does not apply in Flair.`);
|
|
2794
|
-
let svg =
|
|
2795
|
+
let svg = _chunkEGZM52EOcjs.vectorDocumentToSvg.call(void 0, { ...scene.artwork, nodes: _chunkEGZM52EOcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) }, { pretty: false, precision, wrap });
|
|
2795
2796
|
if (routes.length) svg = svg.replace(/^(<svg[^>]*>)/, `$1<defs>${routes.join("")}</defs>`);
|
|
2796
2797
|
let motion = { svg, animate };
|
|
2797
2798
|
if (_optionalChain([scene, 'access', _120 => _120.controls, 'optionalAccess', _121 => _121.length])) {
|
|
@@ -2875,14 +2876,14 @@ function easingOf(ease, fallback) {
|
|
|
2875
2876
|
return fallback;
|
|
2876
2877
|
}
|
|
2877
2878
|
function poseOf(value, entry) {
|
|
2878
|
-
const t =
|
|
2879
|
-
const o =
|
|
2879
|
+
const t = _chunkEGZM52EOcjs.parseSvgTransform.call(void 0, String(value));
|
|
2880
|
+
const o = _chunkEGZM52EOcjs.multiplyMatrices.call(void 0, _nullishCoalesce(_chunkEGZM52EOcjs.invertMatrix.call(void 0, _chunkEGZM52EOcjs.nodeMatrix.call(void 0, entry.node)), () => ( [1, 0, 0, 1, 0, 0])), t);
|
|
2880
2881
|
const sx = Math.hypot(o[0], o[1]);
|
|
2881
2882
|
if (!(sx > 1e-9)) return null;
|
|
2882
2883
|
const sy = (o[0] * o[3] - o[1] * o[2]) / sx;
|
|
2883
2884
|
if (Math.abs(o[2] + o[1] / sx * sy) > 1e-6 || Math.abs(o[3] - o[0] / sx * sy) > 1e-6) return null;
|
|
2884
2885
|
const c = entry.center;
|
|
2885
|
-
const moved =
|
|
2886
|
+
const moved = _chunkEGZM52EOcjs.applyMatrix.call(void 0, o, c);
|
|
2886
2887
|
return { dx: moved.x - c.x, dy: moved.y - c.y, rotation: Math.atan2(o[1], o[0]) * 180 / Math.PI, sx, sy };
|
|
2887
2888
|
}
|
|
2888
2889
|
var near = (a, b, eps = 1e-6) => Math.abs(a - b) < eps;
|
|
@@ -2967,7 +2968,7 @@ function fromFlairSvgMotion(input, options = {}) {
|
|
|
2967
2968
|
const notes = [];
|
|
2968
2969
|
if (!input || typeof input.svg !== "string") throw new Error('Give a Flair SvgMotion: { svg: "<svg \u2026>", animate: [ \u2026 ] }.');
|
|
2969
2970
|
const { motion, controls } = resolvePlaceholders(input, notes);
|
|
2970
|
-
const artwork =
|
|
2971
|
+
const artwork = _chunkEGZM52EOcjs.parseVectorSvg.call(void 0, motion.svg);
|
|
2971
2972
|
const nodes = indexMotionNodes(artwork.nodes);
|
|
2972
2973
|
const byStep = /* @__PURE__ */ new Map();
|
|
2973
2974
|
for (const anim of _nullishCoalesce(motion.animate, () => ( []))) {
|
|
@@ -3214,9 +3215,9 @@ function toLottie(scene, options = {}) {
|
|
|
3214
3215
|
const items = [];
|
|
3215
3216
|
const shapeSegments = [...timeline.tracks.entries()].filter(([k]) => k.startsWith(`${path.id}\0`) && (k.endsWith("\0shape") || k.includes("\0effect:"))).flatMap(([, v]) => v);
|
|
3216
3217
|
const geometryAt = (t) => {
|
|
3217
|
-
if (!shapeSegments.length) return
|
|
3218
|
+
if (!shapeSegments.length) return _chunkEGZM52EOcjs.vectorPathWorldBezier.call(void 0, path);
|
|
3218
3219
|
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]);
|
|
3219
|
-
return now && now.type === "path" ?
|
|
3220
|
+
return now && now.type === "path" ? _chunkEGZM52EOcjs.vectorPathWorldBezier.call(void 0, _chunkEGZM52EOcjs.expandVectorAppearances.call(void 0, [now])[0]) : _chunkEGZM52EOcjs.vectorPathWorldBezier.call(void 0, path);
|
|
3220
3221
|
};
|
|
3221
3222
|
const rest = lottieContours(_chunkGF2RBSDMcjs.toBezierPath.call(void 0, geometryAt(0)), round3);
|
|
3222
3223
|
rest.forEach((contour, n) => {
|
|
@@ -3289,13 +3290,13 @@ function toLottie(scene, options = {}) {
|
|
|
3289
3290
|
const innerTr = STATIC_TR();
|
|
3290
3291
|
if (node.type === "path") inner = [...pathShapes(node)];
|
|
3291
3292
|
else if (node.type === "text" || node.type === "instance") {
|
|
3292
|
-
const drawn =
|
|
3293
|
+
const drawn = _chunkEGZM52EOcjs.expandVectorAppearance.call(void 0, node);
|
|
3293
3294
|
inner = drawn.type === "path" ? [...pathShapes(drawn)] : drawn.children.filter((c) => c.type === "path").reverse().flatMap((c) => [...pathShapes(c)]);
|
|
3294
|
-
notes.push(`"${node.id}": text is exported as its outlines${
|
|
3295
|
+
notes.push(`"${node.id}": text is exported as its outlines${_chunkEGZM52EOcjs.vectorTextHasOutlines.call(void 0, ) ? "" : " (glyph boxes: set an outline text shaper for real glyphs)"}.`);
|
|
3295
3296
|
} else {
|
|
3296
3297
|
inner = shown(node.children).reverse().map(nodeGroup);
|
|
3297
|
-
const m =
|
|
3298
|
-
if (m !==
|
|
3298
|
+
const m = _chunkEGZM52EOcjs.nodeMatrix.call(void 0, node);
|
|
3299
|
+
if (m !== _chunkEGZM52EOcjs.IDENTITY_MATRIX) {
|
|
3299
3300
|
const parts = staticParts(m);
|
|
3300
3301
|
if (!parts) notes.push(`"${node.id}": its transform skews, which is not exported; it is drawn without the skew.`);
|
|
3301
3302
|
else {
|
|
@@ -3308,7 +3309,7 @@ function toLottie(scene, options = {}) {
|
|
|
3308
3309
|
const body = { ty: "gr", nm: `${node.id} (own)`, it: [...inner, innerTr] };
|
|
3309
3310
|
return { ty: "gr", nm: _nullishCoalesce(node.name, () => ( node.id)), it: [body, poseTransform(entry)] };
|
|
3310
3311
|
};
|
|
3311
|
-
const artwork = { ...scene.artwork, nodes:
|
|
3312
|
+
const artwork = { ...scene.artwork, nodes: _chunkEGZM52EOcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) };
|
|
3312
3313
|
const content = shown(artwork.nodes).reverse().map(nodeGroup);
|
|
3313
3314
|
if (artwork.background && rgba(artwork.background))
|
|
3314
3315
|
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()] });
|
|
@@ -3407,11 +3408,11 @@ function preset(prst, w, h) {
|
|
|
3407
3408
|
const poly = (pts) => [{ closed: true, anchors: pts.map(([x, y]) => ({ x, y })) }];
|
|
3408
3409
|
switch (prst) {
|
|
3409
3410
|
case "rect":
|
|
3410
|
-
return [
|
|
3411
|
+
return [_chunkEGZM52EOcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
|
|
3411
3412
|
case "roundRect":
|
|
3412
|
-
return [
|
|
3413
|
+
return [_chunkEGZM52EOcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h }, Math.min(w, h) * 0.16667)];
|
|
3413
3414
|
case "ellipse":
|
|
3414
|
-
return [
|
|
3415
|
+
return [_chunkEGZM52EOcjs.ellipseSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
|
|
3415
3416
|
case "triangle":
|
|
3416
3417
|
return poly([[w / 2, 0], [w, h], [0, h]]);
|
|
3417
3418
|
case "rtTriangle":
|
|
@@ -3519,7 +3520,7 @@ function shapes(ctx, tree, map) {
|
|
|
3519
3520
|
let subpaths = cust ? custom(cust, w, h) : prst ? preset(prst, w, h) : null;
|
|
3520
3521
|
if (!subpaths) {
|
|
3521
3522
|
if (prst) ctx.notes.push(`"${name}" is a ${prst}, drawn as its bounding rectangle.`);
|
|
3522
|
-
subpaths = [
|
|
3523
|
+
subpaths = [_chunkEGZM52EOcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
|
|
3523
3524
|
}
|
|
3524
3525
|
const style = kid(el, "style");
|
|
3525
3526
|
const fill = kid(spPr, "noFill") ? null : _nullishCoalesce(colour(ctx, kid(spPr, "solidFill")), () => ( (el.localName === "cxnSp" ? null : colour(ctx, kid(style, "fillRef")))));
|
|
@@ -3757,7 +3758,7 @@ function nextMotionEffectInstance(scene) {
|
|
|
3757
3758
|
walk(scene.artwork.nodes);
|
|
3758
3759
|
for (let i = 1; ; i++) if (!used.has(`fx${i}`)) return `fx${i}`;
|
|
3759
3760
|
}
|
|
3760
|
-
var motionArtworkSvg = (artwork) =>
|
|
3761
|
+
var motionArtworkSvg = (artwork) => _chunkEGZM52EOcjs.vectorDocumentToSvg.call(void 0, artwork);
|
|
3761
3762
|
var tag = (commands, source) => commands.map((c) => c.type === "wait" ? c : { ...c, source });
|
|
3762
3763
|
function motionCommandsFromEffect(artwork, motion, source) {
|
|
3763
3764
|
const imported = fromFlairSvgMotion({ svg: motionArtworkSvg(artwork), animate: [..._nullishCoalesce(motion.animate, () => ( []))] });
|
|
@@ -3846,7 +3847,7 @@ var AnimationEditorController = (_class = class {
|
|
|
3846
3847
|
this.readOnly = _nullishCoalesce(options.readOnly, () => ( false));
|
|
3847
3848
|
this.onChange = options.onChange;
|
|
3848
3849
|
if (options.effects) this.effects.set(options.effects);
|
|
3849
|
-
this.player = new (0,
|
|
3850
|
+
this.player = new (0, _chunkM5GLQQWGcjs.AnimationPlayer)({ clock: options.clock, duration: () => compileMotionScene(this.scene).duration, loop: _nullishCoalesce(this.scene.loop, () => ( "none")) });
|
|
3850
3851
|
this.state = this.computeState();
|
|
3851
3852
|
this.connect();
|
|
3852
3853
|
}
|
|
@@ -5084,7 +5085,7 @@ function createAnimationEditorToolProvider(controller, options = {}) {
|
|
|
5084
5085
|
handler: ({ svg }) => {
|
|
5085
5086
|
let artwork;
|
|
5086
5087
|
try {
|
|
5087
|
-
artwork =
|
|
5088
|
+
artwork = _chunkEGZM52EOcjs.parseVectorSvg.call(void 0, svg);
|
|
5088
5089
|
} catch (error) {
|
|
5089
5090
|
throw new Error(`The SVG could not be read: ${error.message}. Nothing was changed.`);
|
|
5090
5091
|
}
|
|
@@ -5938,7 +5939,7 @@ function createAnimationEffectsToolProvider(controller, options = {}) {
|
|
|
5938
5939
|
|
|
5939
5940
|
// src/animation-editor/editorDocument.ts
|
|
5940
5941
|
function createAnimationEditorDocument(controller) {
|
|
5941
|
-
return
|
|
5942
|
+
return _chunkSJ2CPTQCcjs.defineEditorDocument.call(void 0, {
|
|
5942
5943
|
kind: "animation",
|
|
5943
5944
|
get: () => controller.getScene(),
|
|
5944
5945
|
load: (document, { history }) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createVectorMorph
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-VRXXAXUT.js";
|
|
4
4
|
import {
|
|
5
5
|
MOTION_ISSUE_CODES,
|
|
6
6
|
motionIssue,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
vectorNodeBounds,
|
|
32
32
|
vectorPathWorldBezier,
|
|
33
33
|
vectorTextHasOutlines
|
|
34
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-LPIKXPBM.js";
|
|
35
35
|
import "../chunk-YXKLVD56.js";
|
|
36
36
|
import "../chunk-M6DNZNVY.js";
|
|
37
37
|
import {
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
import "../chunk-VDGBHYC7.js";
|
|
62
62
|
import {
|
|
63
63
|
defineEditorDocument
|
|
64
|
-
} from "../chunk-
|
|
64
|
+
} from "../chunk-XBQX76CT.js";
|
|
65
65
|
import "../chunk-HF5QZS7Z.js";
|
|
66
66
|
import {
|
|
67
67
|
HistoryManager
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
} from "../chunk-DS4WGCLJ.js";
|
|
73
73
|
import {
|
|
74
74
|
AnimationPlayer
|
|
75
|
-
} from "../chunk-
|
|
75
|
+
} from "../chunk-F6R67I3A.js";
|
|
76
76
|
import {
|
|
77
77
|
ANIMATION_EASING_LABELS,
|
|
78
78
|
ANIMATION_EASING_PRESETS,
|
|
@@ -84,14 +84,15 @@ import {
|
|
|
84
84
|
} from "../chunk-5UJHB3BW.js";
|
|
85
85
|
import {
|
|
86
86
|
mixColorsOklab
|
|
87
|
-
} from "../chunk-
|
|
87
|
+
} from "../chunk-M2TPMYJE.js";
|
|
88
88
|
import {
|
|
89
89
|
hexToRgba,
|
|
90
90
|
normalizeTokenColor,
|
|
91
91
|
rgbaToHex
|
|
92
92
|
} from "../chunk-2WPNAGHI.js";
|
|
93
|
-
import "../chunk-
|
|
94
|
-
import "../chunk-
|
|
93
|
+
import "../chunk-7272D3K2.js";
|
|
94
|
+
import "../chunk-YBAPT7NL.js";
|
|
95
|
+
import "../chunk-MHLU6GRJ.js";
|
|
95
96
|
import "../chunk-6ONMQ6WF.js";
|
|
96
97
|
|
|
97
98
|
// src/animation-editor/types.ts
|
package/dist/bridge/cli.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict"; function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
4
|
+
var _chunkS4EIAIEWcjs = require('../chunk-S4EIAIEW.cjs');
|
|
5
|
+
require('../chunk-AMX23CSN.cjs');
|
|
6
6
|
require('../chunk-WOFXZ3XU.cjs');
|
|
7
7
|
require('../chunk-2BSBFBOA.cjs');
|
|
8
8
|
|
|
@@ -23,7 +23,7 @@ args.forEach((arg, i) => {
|
|
|
23
23
|
if (arg === "--origin" && args[i + 1]) origins.push(args[i + 1]);
|
|
24
24
|
});
|
|
25
25
|
var port = value("--port");
|
|
26
|
-
void
|
|
26
|
+
void _chunkS4EIAIEWcjs.createToolBridge.call(void 0, {
|
|
27
27
|
name: _nullishCoalesce(value("--name"), () => ( "pixerate")),
|
|
28
28
|
port: port !== void 0 ? Number(port) : void 0,
|
|
29
29
|
token: _nullishCoalesce(value("--token"), () => ( process.env.PIXERATE_BRIDGE_TOKEN)),
|
package/dist/bridge/cli.js
CHANGED
package/dist/bridge/index.cjs
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkS4EIAIEWcjs = require('../chunk-S4EIAIEW.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkAMX23CSNcjs = require('../chunk-AMX23CSN.cjs');
|
|
11
11
|
require('../chunk-WOFXZ3XU.cjs');
|
|
12
12
|
require('../chunk-2BSBFBOA.cjs');
|
|
13
13
|
|
|
@@ -17,4 +17,4 @@ require('../chunk-2BSBFBOA.cjs');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
exports.TOOL_BRIDGE_DEFAULT_PORT =
|
|
20
|
+
exports.TOOL_BRIDGE_DEFAULT_PORT = _chunkAMX23CSNcjs.TOOL_BRIDGE_DEFAULT_PORT; exports.TOOL_BRIDGE_PROTOCOL = _chunkAMX23CSNcjs.TOOL_BRIDGE_PROTOCOL; exports.createToolBridge = _chunkS4EIAIEWcjs.createToolBridge; exports.defaultSkillsDir = _chunkS4EIAIEWcjs.defaultSkillsDir; exports.isLocalOrigin = _chunkS4EIAIEWcjs.isLocalOrigin; exports.loadSkillFiles = _chunkS4EIAIEWcjs.loadSkillFiles;
|
package/dist/bridge/index.js
CHANGED
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
defaultSkillsDir,
|
|
4
4
|
isLocalOrigin,
|
|
5
5
|
loadSkillFiles
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-I5MRJW7B.js";
|
|
7
7
|
import {
|
|
8
8
|
TOOL_BRIDGE_DEFAULT_PORT,
|
|
9
9
|
TOOL_BRIDGE_PROTOCOL
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-XZB3TJ6K.js";
|
|
11
11
|
import "../chunk-V2ZCJRDM.js";
|
|
12
12
|
import "../chunk-HF5QZS7Z.js";
|
|
13
13
|
export {
|