@pixerate/editor 0.137.0 → 0.138.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.cjs +2 -2
- package/dist/agent/index.d.cts +3 -3
- package/dist/agent/index.d.ts +3 -3
- package/dist/agent/index.js +1 -1
- package/dist/animation-editor/index.cjs +57 -57
- package/dist/animation-editor/index.d.cts +3 -3
- package/dist/animation-editor/index.d.ts +3 -3
- package/dist/animation-editor/index.js +4 -4
- package/dist/{arrange-CKXK_hf7.d.cts → arrange-j_mLiFMO.d.cts} +1 -1
- package/dist/{arrange-BUREmgD9.d.ts → arrange-q5HQvnnB.d.ts} +1 -1
- package/dist/{bezier-CZ2AhjID.d.cts → bezier-CUaH8hcK.d.cts} +1 -1
- package/dist/{bezier-Dywv3Bw8.d.ts → bezier-DPmdGwgR.d.ts} +1 -1
- package/dist/{brushTypes-C7N3EBK7.d.cts → brushTypes-MX5UVs_m.d.cts} +27 -2
- package/dist/{brushTypes-C7N3EBK7.d.ts → brushTypes-MX5UVs_m.d.ts} +27 -2
- package/dist/{brushes-DJmUbIgz.d.ts → brushes-B1ABdDAs.d.ts} +2 -108
- package/dist/{brushes-CnvZSYYU.d.cts → brushes-DnIdJYxN.d.cts} +2 -108
- package/dist/{brushstrokeRender-IMFY3FF6.cjs → brushstrokeRender-PP6NTF6M.cjs} +52 -24
- package/dist/brushstrokeRender-PP6NTF6M.cjs.map +1 -0
- package/dist/{brushstrokeRender-2FAXA3XC.js → brushstrokeRender-QGEYJ4OZ.js} +40 -12
- package/dist/brushstrokeRender-QGEYJ4OZ.js.map +1 -0
- package/dist/{builtins-Cc-bH-3U.d.cts → builtins-BakDiKWf.d.cts} +3 -2
- package/dist/{builtins-ZU1GJnUA.d.ts → builtins-CE33vyv2.d.ts} +3 -2
- package/dist/canvas/index.cjs +16 -9
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +56 -11
- package/dist/canvas/index.d.ts +56 -11
- package/dist/canvas/index.js +10 -3
- package/dist/canvas/index.js.map +1 -1
- package/dist/{chunk-QBWEH3IM.cjs → chunk-3T5O225T.cjs} +391 -76
- package/dist/chunk-3T5O225T.cjs.map +1 -0
- package/dist/{chunk-PRSRYHQD.cjs → chunk-7MN75BXI.cjs} +36 -36
- package/dist/{chunk-PRSRYHQD.cjs.map → chunk-7MN75BXI.cjs.map} +1 -1
- package/dist/{chunk-EQQMGO42.js → chunk-C2J7GOMJ.js} +18 -5
- package/dist/chunk-C2J7GOMJ.js.map +1 -0
- package/dist/{chunk-2XS6LTUP.cjs → chunk-C46AZEBE.cjs} +104 -339
- package/dist/chunk-C46AZEBE.cjs.map +1 -0
- package/dist/{chunk-XN2NBLV5.cjs → chunk-CM3LJPR3.cjs} +82 -82
- package/dist/{chunk-XN2NBLV5.cjs.map → chunk-CM3LJPR3.cjs.map} +1 -1
- package/dist/{chunk-HUO3TI4C.js → chunk-CPSMARTX.js} +6 -241
- package/dist/chunk-CPSMARTX.js.map +1 -0
- package/dist/{chunk-KEENUAFN.cjs → chunk-DLLUOVQX.cjs} +18 -5
- package/dist/chunk-DLLUOVQX.cjs.map +1 -0
- package/dist/{chunk-LSXXAJG3.js → chunk-J7DSKTKB.js} +5 -4
- package/dist/chunk-J7DSKTKB.js.map +1 -0
- package/dist/{chunk-6S6362D2.js → chunk-OV7253FC.js} +2 -2
- package/dist/{chunk-5FSRTP6E.js → chunk-PQFVLOMR.js} +319 -4
- package/dist/chunk-PQFVLOMR.js.map +1 -0
- package/dist/{chunk-OIBIRXRG.js → chunk-PSPLRQL6.js} +2 -2
- package/dist/{chunk-SYT2TLQF.js → chunk-QBARQGSG.js} +2 -2
- package/dist/{chunk-5OOIUXNJ.cjs → chunk-SXOTFV3V.cjs} +6 -6
- package/dist/{chunk-5OOIUXNJ.cjs.map → chunk-SXOTFV3V.cjs.map} +1 -1
- package/dist/{chunk-DFSZO2B5.cjs → chunk-UFL5N4DK.cjs} +5 -4
- package/dist/chunk-UFL5N4DK.cjs.map +1 -0
- package/dist/{chunk-3D77LOBM.js → chunk-V45ZTW4R.js} +3 -3
- package/dist/{chunk-TLCTTQFF.cjs → chunk-VEHVXRJU.cjs} +17 -17
- package/dist/{chunk-TLCTTQFF.cjs.map → chunk-VEHVXRJU.cjs.map} +1 -1
- package/dist/commands/index.cjs +2 -2
- package/dist/commands/index.d.cts +3 -3
- package/dist/commands/index.d.ts +3 -3
- package/dist/commands/index.js +1 -1
- package/dist/{export-DwnZ_hvQ.d.ts → export-BwFRiItd.d.ts} +4 -4
- package/dist/{export-CyJdfP_Z.d.cts → export-DuN3dpCg.d.cts} +4 -4
- package/dist/{blending-NgF3qo3d.d.ts → grain-COgYMMHv.d.ts} +58 -1
- package/dist/{blending-D7jCmjO6.d.cts → grain-GCt_O2kv.d.cts} +58 -1
- package/dist/image-editor/index.cjs +695 -677
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +11 -11
- package/dist/image-editor/index.d.ts +11 -11
- package/dist/image-editor/index.js +23 -5
- package/dist/image-editor/index.js.map +1 -1
- package/dist/{opentype-a1KAW-qs.d.ts → opentype-T7bkbR2D.d.ts} +1 -1
- package/dist/{opentype-KR_jj6b_.d.cts → opentype-n99lqxEZ.d.cts} +1 -1
- package/dist/paint/index.cjs +21 -3
- package/dist/paint/index.cjs.map +1 -1
- package/dist/paint/index.d.cts +72 -7
- package/dist/paint/index.d.ts +72 -7
- package/dist/paint/index.js +20 -2
- package/dist/paint-editor/index.cjs +171 -171
- package/dist/paint-editor/index.cjs.map +1 -1
- package/dist/paint-editor/index.d.cts +75 -29
- package/dist/paint-editor/index.d.ts +75 -29
- package/dist/paint-editor/index.js +12 -12
- package/dist/{pathfinder-BHS4vQNm.d.cts → pathfinder-CQlldanv.d.cts} +2 -2
- package/dist/{pathfinder-BVvTIBMo.d.ts → pathfinder-D-V6JLSw.d.ts} +2 -2
- package/dist/{rand-Cw9VLrVC.d.cts → rand-D7nfeD1p.d.cts} +18 -2
- package/dist/{rand-8xbUb6ur.d.ts → rand-DJGxSq9d.d.ts} +18 -2
- package/dist/{svg-CSz3mzkw.d.ts → svg-CnDCpIy9.d.ts} +1 -1
- package/dist/{svg-DTb40ICU.d.cts → svg-DPJMUSNt.d.cts} +1 -1
- package/dist/vector/index.cjs +944 -944
- package/dist/vector/index.d.cts +10 -10
- package/dist/vector/index.d.ts +10 -10
- package/dist/vector/index.js +4 -4
- package/dist/{warp-DTOp0lON.d.cts → warp-C7rMWUgW.d.cts} +1 -1
- package/dist/{warp-pd7hrH4T.d.ts → warp-Doasjpyr.d.ts} +1 -1
- package/package.json +1 -1
- package/skills/pixerate-canvas/SKILL.md +12 -5
- package/dist/brushstrokeRender-2FAXA3XC.js.map +0 -1
- package/dist/brushstrokeRender-IMFY3FF6.cjs.map +0 -1
- package/dist/chunk-2XS6LTUP.cjs.map +0 -1
- package/dist/chunk-5FSRTP6E.js.map +0 -1
- package/dist/chunk-DFSZO2B5.cjs.map +0 -1
- package/dist/chunk-EQQMGO42.js.map +0 -1
- package/dist/chunk-HUO3TI4C.js.map +0 -1
- package/dist/chunk-KEENUAFN.cjs.map +0 -1
- package/dist/chunk-LSXXAJG3.js.map +0 -1
- package/dist/chunk-QBWEH3IM.cjs.map +0 -1
- /package/dist/{chunk-6S6362D2.js.map → chunk-OV7253FC.js.map} +0 -0
- /package/dist/{chunk-OIBIRXRG.js.map → chunk-PSPLRQL6.js.map} +0 -0
- /package/dist/{chunk-SYT2TLQF.js.map → chunk-QBARQGSG.js.map} +0 -0
- /package/dist/{chunk-3D77LOBM.js.map → chunk-V45ZTW4R.js.map} +0 -0
package/dist/agent/index.cjs
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
var _chunkDK6QBGCScjs = require('../chunk-DK6QBGCS.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkUFL5N4DKcjs = require('../chunk-UFL5N4DK.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -1593,7 +1593,7 @@ function createCanvasComponentToolProvider(controller, options = { id: "canvas-c
|
|
|
1593
1593
|
({ id }) => check(controller.restoreMainComponent(id))
|
|
1594
1594
|
)
|
|
1595
1595
|
];
|
|
1596
|
-
if (
|
|
1596
|
+
if (_chunkUFL5N4DKcjs.hasVariantCommands.call(void 0, controller)) {
|
|
1597
1597
|
const SET = { type: "string", description: "Component set, or one of its variants (default: the selection\u2019s set)." };
|
|
1598
1598
|
const VARIANT = { type: "string", description: "Variant id (default: the first selected variant)." };
|
|
1599
1599
|
const VALUES = { type: "object", additionalProperties: { type: "string" }, description: 'Variant property \u2192 value, e.g. { "Size": "Medium" }.' };
|
package/dist/agent/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as CanvasNode, f as CanvasEdge, X as XYPosition, S as Side } from '../brushTypes-
|
|
1
|
+
import { c as CanvasNode, f as CanvasEdge, X as XYPosition, S as Side } from '../brushTypes-MX5UVs_m.cjs';
|
|
2
2
|
export { J as JsonSchema, a as JsonSchemaType, S as SchemaValidationError, v as validateJsonSchema } from '../schema-Di0CS6Pe.cjs';
|
|
3
3
|
import { a as AgentToolProvider, A as AgentTool } from '../registry-BqA1AZt0.cjs';
|
|
4
4
|
export { c as AgentToolHandler, d as McpListToolsResult, e as McpToolContent, M as McpToolDefinition, b as McpToolResult, f as TOOL_NAMESPACE_SEPARATOR, g as ToolCallContext, h as ToolCallError, i as ToolErrorCode, T as ToolRegistry, j as ToolRegistryError, k as ToolRegistryOptions, l as createToolRegistry, t as toToolResult } from '../registry-BqA1AZt0.cjs';
|
|
@@ -9,11 +9,11 @@ export { C as CAPTURE_EXCLUDE_SELECTOR, a as CAPTURE_OVERLAY_SELECTORS, E as Ele
|
|
|
9
9
|
import { Editor } from '@tiptap/core';
|
|
10
10
|
import { S as SpreadsheetController } from '../controller-w6eRTjF8.cjs';
|
|
11
11
|
import { A as AgentTypingOptions } from '../agent-caret-BmYhQF7L.cjs';
|
|
12
|
-
import { b as ComponentCommandTarget } from '../builtins-
|
|
12
|
+
import { b as ComponentCommandTarget } from '../builtins-BakDiKWf.cjs';
|
|
13
13
|
import '@tiptap/pm/state';
|
|
14
14
|
import '@tiptap/pm/view';
|
|
15
15
|
import '../types-DsiXGmjo.cjs';
|
|
16
|
-
import '../arrange-
|
|
16
|
+
import '../arrange-j_mLiFMO.cjs';
|
|
17
17
|
import '../registry-CaR7LC6W.cjs';
|
|
18
18
|
|
|
19
19
|
/**
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as CanvasNode, f as CanvasEdge, X as XYPosition, S as Side } from '../brushTypes-
|
|
1
|
+
import { c as CanvasNode, f as CanvasEdge, X as XYPosition, S as Side } from '../brushTypes-MX5UVs_m.js';
|
|
2
2
|
export { J as JsonSchema, a as JsonSchemaType, S as SchemaValidationError, v as validateJsonSchema } from '../schema-Di0CS6Pe.js';
|
|
3
3
|
import { a as AgentToolProvider, A as AgentTool } from '../registry-D-4fit9C.js';
|
|
4
4
|
export { c as AgentToolHandler, d as McpListToolsResult, e as McpToolContent, M as McpToolDefinition, b as McpToolResult, f as TOOL_NAMESPACE_SEPARATOR, g as ToolCallContext, h as ToolCallError, i as ToolErrorCode, T as ToolRegistry, j as ToolRegistryError, k as ToolRegistryOptions, l as createToolRegistry, t as toToolResult } from '../registry-D-4fit9C.js';
|
|
@@ -9,11 +9,11 @@ export { C as CAPTURE_EXCLUDE_SELECTOR, a as CAPTURE_OVERLAY_SELECTORS, E as Ele
|
|
|
9
9
|
import { Editor } from '@tiptap/core';
|
|
10
10
|
import { S as SpreadsheetController } from '../controller-w6eRTjF8.js';
|
|
11
11
|
import { A as AgentTypingOptions } from '../agent-caret-BmYhQF7L.js';
|
|
12
|
-
import { b as ComponentCommandTarget } from '../builtins-
|
|
12
|
+
import { b as ComponentCommandTarget } from '../builtins-CE33vyv2.js';
|
|
13
13
|
import '@tiptap/pm/state';
|
|
14
14
|
import '@tiptap/pm/view';
|
|
15
15
|
import '../types-DsiXGmjo.js';
|
|
16
|
-
import '../arrange-
|
|
16
|
+
import '../arrange-q5HQvnnB.js';
|
|
17
17
|
import '../registry-rVtFJjRM.js';
|
|
18
18
|
|
|
19
19
|
/**
|
package/dist/agent/index.js
CHANGED
|
@@ -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 _chunk7MN75BXIcjs = require('../chunk-7MN75BXI.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -31,8 +31,8 @@ var _chunkWAJQKWQUcjs = require('../chunk-WAJQKWQU.cjs');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
35
|
-
require('../chunk-
|
|
34
|
+
var _chunkSXOTFV3Vcjs = require('../chunk-SXOTFV3V.cjs');
|
|
35
|
+
require('../chunk-C46AZEBE.cjs');
|
|
36
36
|
require('../chunk-Q6OUXEK3.cjs');
|
|
37
37
|
|
|
38
38
|
|
|
@@ -50,7 +50,7 @@ require('../chunk-IZ4WRXZA.cjs');
|
|
|
50
50
|
|
|
51
51
|
var _chunkJODTP4DPcjs = require('../chunk-JODTP4DP.cjs');
|
|
52
52
|
require('../chunk-RIWPYSKU.cjs');
|
|
53
|
-
require('../chunk-
|
|
53
|
+
require('../chunk-3T5O225T.cjs');
|
|
54
54
|
require('../chunk-SYPFUL5B.cjs');
|
|
55
55
|
require('../chunk-O7LUD7MH.cjs');
|
|
56
56
|
require('../chunk-643B2HKC.cjs');
|
|
@@ -581,7 +581,7 @@ function smoothMotionTimes(points, start, duration, pacing = "even") {
|
|
|
581
581
|
function motionTextLayout(nodes, id) {
|
|
582
582
|
const group = _optionalChain([nodes, 'access', _5 => _5.get, 'call', _6 => _6(id), 'optionalAccess', _7 => _7.node]);
|
|
583
583
|
if (!group || group.type !== "group") return null;
|
|
584
|
-
const letters =
|
|
584
|
+
const letters = _chunkSXOTFV3Vcjs.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);
|
|
585
585
|
if (!letters.length) return null;
|
|
586
586
|
const lines = [];
|
|
587
587
|
for (const l of [...letters].sort((a, c) => a.b.y + a.b.height / 2 - (c.b.y + c.b.height / 2))) {
|
|
@@ -666,21 +666,21 @@ function indexMotionNodes(nodes) {
|
|
|
666
666
|
const out = /* @__PURE__ */ new Map();
|
|
667
667
|
const walk = (list, parentWorld, ancestors) => {
|
|
668
668
|
for (const node of list) {
|
|
669
|
-
const local =
|
|
670
|
-
const bounds =
|
|
669
|
+
const local = _chunkSXOTFV3Vcjs.vectorNodeBounds.call(void 0, node);
|
|
670
|
+
const bounds = _chunkSXOTFV3Vcjs.vectorNodeBounds.call(void 0, node, parentWorld);
|
|
671
671
|
const center = local ? { x: local.x + local.width / 2, y: local.y + local.height / 2 } : { x: 0, y: 0 };
|
|
672
672
|
if (!out.has(node.id)) out.set(node.id, { node, ancestors, parentWorld, center, bounds, box: local });
|
|
673
|
-
if (node.type === "group") walk(node.children,
|
|
673
|
+
if (node.type === "group") walk(node.children, _chunkSXOTFV3Vcjs.multiplyMatrices.call(void 0, _chunkSXOTFV3Vcjs.nodeMatrix.call(void 0, node), parentWorld), [...ancestors, node.id]);
|
|
674
674
|
}
|
|
675
675
|
};
|
|
676
|
-
walk(nodes,
|
|
676
|
+
walk(nodes, _chunkSXOTFV3Vcjs.IDENTITY_MATRIX, []);
|
|
677
677
|
indexCache.set(nodes, out);
|
|
678
678
|
return out;
|
|
679
679
|
}
|
|
680
680
|
var solid = (paint) => typeof paint === "string" && paint !== "none" ? paint : void 0;
|
|
681
681
|
function firstPaint(node, key) {
|
|
682
682
|
if (node.type === "path") return solid(node[key]);
|
|
683
|
-
for (const p of
|
|
683
|
+
for (const p of _chunkSXOTFV3Vcjs.collectPathNodes.call(void 0, node)) {
|
|
684
684
|
const s = solid(p[key]);
|
|
685
685
|
if (s) return s;
|
|
686
686
|
}
|
|
@@ -688,7 +688,7 @@ function firstPaint(node, key) {
|
|
|
688
688
|
}
|
|
689
689
|
function strokeReach(node) {
|
|
690
690
|
let reach = 0;
|
|
691
|
-
for (const p of node.type === "path" ? [node] :
|
|
691
|
+
for (const p of node.type === "path" ? [node] : _chunkSXOTFV3Vcjs.collectPathNodes.call(void 0, node)) {
|
|
692
692
|
if (p.stroke == null || p.stroke === "none") continue;
|
|
693
693
|
const width = _nullishCoalesce(p.strokeWidth, () => ( 1));
|
|
694
694
|
reach = Math.max(reach, p.strokeAlign === "outside" ? width : p.strokeAlign === "inside" ? 0 : width / 2);
|
|
@@ -758,7 +758,7 @@ function motionRestValue(entry, property, artwork) {
|
|
|
758
758
|
case "stroke":
|
|
759
759
|
return _nullishCoalesce((node && firstPaint(node, property)), () => ( "transparent"));
|
|
760
760
|
case "strokeWidth": {
|
|
761
|
-
const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ?
|
|
761
|
+
const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ? _chunkSXOTFV3Vcjs.collectPathNodes.call(void 0, node)[0] : void 0;
|
|
762
762
|
return _nullishCoalesce(_optionalChain([path, 'optionalAccess', _14 => _14.strokeWidth]), () => ( 1));
|
|
763
763
|
}
|
|
764
764
|
case "shape":
|
|
@@ -869,12 +869,12 @@ function resolveMotionCamera(camera, scene) {
|
|
|
869
869
|
const r = camera;
|
|
870
870
|
return { x: r.x, y: r.y, width: r.width, height: r.height };
|
|
871
871
|
}
|
|
872
|
-
function motionPathLength(node, parentWorld =
|
|
872
|
+
function motionPathLength(node, parentWorld = _chunkSXOTFV3Vcjs.IDENTITY_MATRIX) {
|
|
873
873
|
let longest = 0;
|
|
874
|
-
const paths = node.type === "path" ? [node] :
|
|
874
|
+
const paths = node.type === "path" ? [node] : _chunkSXOTFV3Vcjs.collectPathNodes.call(void 0, node);
|
|
875
875
|
for (const p of paths) {
|
|
876
876
|
try {
|
|
877
|
-
longest = Math.max(longest, _chunkBJTCSLF6cjs.bezierPathLength.call(void 0,
|
|
877
|
+
longest = Math.max(longest, _chunkBJTCSLF6cjs.bezierPathLength.call(void 0, _chunkSXOTFV3Vcjs.vectorPathWorldBezier.call(void 0, p, parentWorld, { effects: false })));
|
|
878
878
|
} catch (e2) {
|
|
879
879
|
}
|
|
880
880
|
}
|
|
@@ -1127,12 +1127,12 @@ function compileMotionScene(scene) {
|
|
|
1127
1127
|
const order2 = _nullishCoalesce(o.order, () => ( "together"));
|
|
1128
1128
|
const pace = _nullishCoalesce(o.pace, () => ( "time"));
|
|
1129
1129
|
if (order2 === "together" && pace === "time") return null;
|
|
1130
|
-
const paths = entry.node.type === "path" ? [entry.node] :
|
|
1130
|
+
const paths = entry.node.type === "path" ? [entry.node] : _chunkSXOTFV3Vcjs.collectPathNodes.call(void 0, entry.node);
|
|
1131
1131
|
let list = paths.map((p) => {
|
|
1132
1132
|
const at = nodes.get(p.id);
|
|
1133
1133
|
let first = { x: 0, y: 0 };
|
|
1134
1134
|
try {
|
|
1135
|
-
const m =
|
|
1135
|
+
const m = _chunkSXOTFV3Vcjs.vectorPathWorldBezier.call(void 0, p, _nullishCoalesce(_optionalChain([at, 'optionalAccess', _41 => _41.parentWorld]), () => ( _chunkSXOTFV3Vcjs.IDENTITY_MATRIX)), { effects: false })[0];
|
|
1136
1136
|
if (m && m.type === "M") first = { x: m.x, y: m.y };
|
|
1137
1137
|
} catch (e3) {
|
|
1138
1138
|
}
|
|
@@ -1244,17 +1244,17 @@ function compileMotionScene(scene) {
|
|
|
1244
1244
|
let dx = _nullishCoalesce(_optionalChain([command3, 'access', _44 => _44.by, 'optionalAccess', _45 => _45.x]), () => ( 0));
|
|
1245
1245
|
let dy = _nullishCoalesce(_optionalChain([command3, 'access', _46 => _46.by, 'optionalAccess', _47 => _47.y]), () => ( 0));
|
|
1246
1246
|
if (command3.to) {
|
|
1247
|
-
const inv =
|
|
1248
|
-
const target =
|
|
1247
|
+
const inv = _chunkSXOTFV3Vcjs.invertMatrix.call(void 0, entry.parentWorld);
|
|
1248
|
+
const target = _chunkSXOTFV3Vcjs.applyMatrix.call(void 0, inv, command3.to);
|
|
1249
1249
|
dx = target.x - (entry.center.x + num2("x"));
|
|
1250
1250
|
dy = target.y - (entry.center.y + num2("y"));
|
|
1251
1251
|
}
|
|
1252
1252
|
if (_optionalChain([command3, 'access', _48 => _48.via, 'optionalAccess', _49 => _49.length])) {
|
|
1253
|
-
const inv =
|
|
1253
|
+
const inv = _chunkSXOTFV3Vcjs.invertMatrix.call(void 0, entry.parentWorld);
|
|
1254
1254
|
const x0 = num2("x");
|
|
1255
1255
|
const y0 = num2("y");
|
|
1256
1256
|
const add = command3.blend === "add";
|
|
1257
|
-
const offsets = [{ x: 0, y: 0 }, ...command3.via.map((p) =>
|
|
1257
|
+
const offsets = [{ x: 0, y: 0 }, ...command3.via.map((p) => _chunkSXOTFV3Vcjs.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 }];
|
|
1258
1258
|
const times = smoothMotionTimes(offsets, start, end - start, _nullishCoalesce(command3.pacing, () => ( "even")));
|
|
1259
1259
|
for (const axis of ["x", "y"]) {
|
|
1260
1260
|
const base = add ? 0 : axis === "x" ? x0 : y0;
|
|
@@ -1397,13 +1397,13 @@ function morphBetween(a, b) {
|
|
|
1397
1397
|
let inner = morphCache.get(a);
|
|
1398
1398
|
if (!inner) morphCache.set(a, inner = /* @__PURE__ */ new WeakMap());
|
|
1399
1399
|
let morph = inner.get(b);
|
|
1400
|
-
if (!morph) inner.set(b, morph =
|
|
1400
|
+
if (!morph) inner.set(b, morph = _chunk7MN75BXIcjs.createVectorMorph.call(void 0, a, b, { id: a.id }));
|
|
1401
1401
|
return morph;
|
|
1402
1402
|
}
|
|
1403
1403
|
function shapeIn(entry, shape) {
|
|
1404
1404
|
if (shape === entry) return entry.node;
|
|
1405
|
-
const m =
|
|
1406
|
-
return { ...shape.node, ...
|
|
1405
|
+
const m = _chunkSXOTFV3Vcjs.multiplyMatrices.call(void 0, _chunkSXOTFV3Vcjs.multiplyMatrices.call(void 0, _chunkSXOTFV3Vcjs.nodeMatrix.call(void 0, shape.node), shape.parentWorld), _chunkSXOTFV3Vcjs.invertMatrix.call(void 0, entry.parentWorld));
|
|
1406
|
+
return { ...shape.node, ..._chunkSXOTFV3Vcjs.isIdentityMatrix.call(void 0, m) ? { transform: void 0 } : { transform: m } };
|
|
1407
1407
|
}
|
|
1408
1408
|
function shapeAt(entry, timeline, nodes, time) {
|
|
1409
1409
|
const track = timeline.tracks.get(motionTrackKey(entry.node.id, "shape"));
|
|
@@ -1423,7 +1423,7 @@ function shapeAt(entry, timeline, nodes, time) {
|
|
|
1423
1423
|
function motionFollowRoute(entry, path) {
|
|
1424
1424
|
if (!path || path.node.type !== "path") return null;
|
|
1425
1425
|
try {
|
|
1426
|
-
return _chunkBJTCSLF6cjs.transformBezierPath.call(void 0,
|
|
1426
|
+
return _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, _chunkSXOTFV3Vcjs.vectorPathWorldBezier.call(void 0, path.node, path.parentWorld, { effects: false }), _chunkSXOTFV3Vcjs.invertMatrix.call(void 0, entry.parentWorld));
|
|
1427
1427
|
} catch (e4) {
|
|
1428
1428
|
return null;
|
|
1429
1429
|
}
|
|
@@ -1457,9 +1457,9 @@ function motionNodeOffset(entry, timeline, time, nodes = indexMotionNodes([entry
|
|
|
1457
1457
|
const scaleX = read("scaleX", 1);
|
|
1458
1458
|
const scaleY = read("scaleY", 1);
|
|
1459
1459
|
const c = entry.center;
|
|
1460
|
-
let matrix =
|
|
1460
|
+
let matrix = _chunkSXOTFV3Vcjs.multiplyMatrices.call(void 0, _chunkSXOTFV3Vcjs.multiplyMatrices.call(void 0, _chunkSXOTFV3Vcjs.scaleMatrix.call(void 0, scaleX, scaleY, c), _chunkSXOTFV3Vcjs.rotateMatrix.call(void 0, rotation, c)), _chunkSXOTFV3Vcjs.translateMatrix.call(void 0, dx, dy));
|
|
1461
1461
|
const along = follow ? followAt(entry, timeline, nodes, time) : null;
|
|
1462
|
-
if (along) matrix =
|
|
1462
|
+
if (along) matrix = _chunkSXOTFV3Vcjs.multiplyMatrices.call(void 0, matrix, _chunkSXOTFV3Vcjs.multiplyMatrices.call(void 0, _chunkSXOTFV3Vcjs.multiplyMatrices.call(void 0, _chunkSXOTFV3Vcjs.translateMatrix.call(void 0, -c.x, -c.y), _chunkSXOTFV3Vcjs.rotateMatrix.call(void 0, along.angle)), _chunkSXOTFV3Vcjs.translateMatrix.call(void 0, along.x, along.y)));
|
|
1463
1463
|
return { matrix, dx, dy, rotation, scaleX, scaleY, follow: along };
|
|
1464
1464
|
}
|
|
1465
1465
|
function motionNodeClips(id, timeline, time) {
|
|
@@ -1526,7 +1526,7 @@ function motionFrameAt(scene, time, options = {}) {
|
|
|
1526
1526
|
const start = Math.min(1, Math.max(0, typeof drawStart === "number" ? drawStart : 0));
|
|
1527
1527
|
const end = Math.min(1, Math.max(0, typeof drawEnd === "number" ? drawEnd : 1));
|
|
1528
1528
|
if (start > 0 || end < 1) {
|
|
1529
|
-
const trim =
|
|
1529
|
+
const trim = _chunkSXOTFV3Vcjs.createVectorEffect.call(void 0, "trim", MOTION_DRAW_EFFECT_ID, { start: tidy(start * 100), end: tidy(end * 100) });
|
|
1530
1530
|
p = { ...p, effects: [trim, ...(_nullishCoalesce(p.effects, () => ( []))).filter((e) => e.id !== MOTION_DRAW_EFFECT_ID)] };
|
|
1531
1531
|
}
|
|
1532
1532
|
}
|
|
@@ -1540,8 +1540,8 @@ function motionFrameAt(scene, time, options = {}) {
|
|
|
1540
1540
|
if (o >= 1) delete out.opacity;
|
|
1541
1541
|
}
|
|
1542
1542
|
const offset = options.offsets === false ? null : motionNodeOffset(entry, timeline, time, nodes);
|
|
1543
|
-
if (offset && !
|
|
1544
|
-
const m =
|
|
1543
|
+
if (offset && !_chunkSXOTFV3Vcjs.isIdentityMatrix.call(void 0, offset.matrix)) {
|
|
1544
|
+
const m = _chunkSXOTFV3Vcjs.multiplyMatrices.call(void 0, _chunkSXOTFV3Vcjs.nodeMatrix.call(void 0, out), offset.matrix).map(tidy);
|
|
1545
1545
|
out = { ...out, transform: m };
|
|
1546
1546
|
}
|
|
1547
1547
|
return out;
|
|
@@ -1561,7 +1561,7 @@ function motionFrameToSvg(scene, time, options = {}) {
|
|
|
1561
1561
|
const wrap = { ...options.wrap };
|
|
1562
1562
|
for (const [id, clips] of Object.entries(frame.clips))
|
|
1563
1563
|
wrap[id] = [..._nullishCoalesce(wrap[id], () => ( [])), ...clips.map((clip, i) => ({ clip: { id: `${prefix}reveal-${id}-${i}`, shape: clip.shape, attrs: motionClipAttrs(clip) } }))];
|
|
1564
|
-
return withViewBox(
|
|
1564
|
+
return withViewBox(_chunkSXOTFV3Vcjs.vectorDocumentToSvg.call(void 0, frame.document, { ...options, wrap }), frame.camera);
|
|
1565
1565
|
}
|
|
1566
1566
|
function withViewBox(svg, box) {
|
|
1567
1567
|
const f = (n) => String(Math.round(n * 1e3) / 1e3);
|
|
@@ -1744,8 +1744,8 @@ function visibleAt(timeline, id, time, node) {
|
|
|
1744
1744
|
if (Array.isArray(rect) && (rect[2] <= 1e-4 || rect[3] <= 1e-4)) return false;
|
|
1745
1745
|
const circle = clip("clipCircle");
|
|
1746
1746
|
if (Array.isArray(circle) && circle[2] <= 1e-4) return false;
|
|
1747
|
-
const hasFill = node.type === "path" ? !!node.fill && node.fill !== "none" :
|
|
1748
|
-
const drawn = num2("drawEnd", 1) > 0.01 && (node.type === "path" ||
|
|
1747
|
+
const hasFill = node.type === "path" ? !!node.fill && node.fill !== "none" : _chunkSXOTFV3Vcjs.collectPathNodes.call(void 0, node).some((p) => p.fill && p.fill !== "none");
|
|
1748
|
+
const drawn = num2("drawEnd", 1) > 0.01 && (node.type === "path" || _chunkSXOTFV3Vcjs.collectPathNodes.call(void 0, node).length === 0 || _chunkSXOTFV3Vcjs.collectPathNodes.call(void 0, node).some((p) => {
|
|
1749
1749
|
const v = trackValue(timeline.tracks.get(motionTrackKey(p.id, "drawEnd")), time);
|
|
1750
1750
|
return typeof v !== "number" || v > 0.01;
|
|
1751
1751
|
}));
|
|
@@ -1831,7 +1831,7 @@ function checkMotionScene(scene) {
|
|
|
1831
1831
|
}
|
|
1832
1832
|
for (const id of targets) {
|
|
1833
1833
|
const node = nodes.get(id).node;
|
|
1834
|
-
const paths = node.type === "path" ? [node] :
|
|
1834
|
+
const paths = node.type === "path" ? [node] : _chunkSXOTFV3Vcjs.collectPathNodes.call(void 0, node);
|
|
1835
1835
|
if (paths.some((p) => p[key] !== void 0 && p[key] !== null && typeof p[key] !== "string"))
|
|
1836
1836
|
issues.push(_chunkWAJQKWQUcjs.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] }));
|
|
1837
1837
|
}
|
|
@@ -1844,7 +1844,7 @@ function checkMotionScene(scene) {
|
|
|
1844
1844
|
else
|
|
1845
1845
|
for (const id of targets) {
|
|
1846
1846
|
const node = nodes.get(id).node;
|
|
1847
|
-
const paths = node.type === "path" ? [node] :
|
|
1847
|
+
const paths = node.type === "path" ? [node] : _chunkSXOTFV3Vcjs.collectPathNodes.call(void 0, node);
|
|
1848
1848
|
if (paths.some((p) => typeof p[key] !== "string"))
|
|
1849
1849
|
issues.push(_chunkWAJQKWQUcjs.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] }));
|
|
1850
1850
|
}
|
|
@@ -2428,7 +2428,7 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2428
2428
|
raw: (t) => transformAt(t, true)
|
|
2429
2429
|
});
|
|
2430
2430
|
}
|
|
2431
|
-
const paths = node.type === "path" ? [node] :
|
|
2431
|
+
const paths = node.type === "path" ? [node] : _chunkSXOTFV3Vcjs.collectPathNodes.call(void 0, node);
|
|
2432
2432
|
for (const path of paths) {
|
|
2433
2433
|
if (pathsSeen.has(path.id)) continue;
|
|
2434
2434
|
pathsSeen.add(path.id);
|
|
@@ -2450,7 +2450,7 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2450
2450
|
if (shapeSegments.length) {
|
|
2451
2451
|
if (node.type !== "path") notes.push(`"${id}" is a group: its morph or effect animation is not exported (Flair tweens one path's "d").`);
|
|
2452
2452
|
else {
|
|
2453
|
-
const inverse =
|
|
2453
|
+
const inverse = _chunkSXOTFV3Vcjs.invertMatrix.call(void 0, _chunkSXOTFV3Vcjs.nodeMatrix.call(void 0, node));
|
|
2454
2454
|
channels.push({
|
|
2455
2455
|
id,
|
|
2456
2456
|
kind: "attr",
|
|
@@ -2459,9 +2459,9 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2459
2459
|
exact: () => false,
|
|
2460
2460
|
value: (t) => {
|
|
2461
2461
|
const frame = motionFrameAt(scene, t, { draw: false, offsets: false });
|
|
2462
|
-
const now =
|
|
2462
|
+
const now = _chunkSXOTFV3Vcjs.expandVectorAppearance.call(void 0, _optionalChain([indexMotionNodes, 'call', _108 => _108(frame.document.nodes), 'access', _109 => _109.get, 'call', _110 => _110(id), 'optionalAccess', _111 => _111.node]));
|
|
2463
2463
|
if (!now || now.type !== "path") return "";
|
|
2464
|
-
const bezier = _chunkBJTCSLF6cjs.transformBezierPath.call(void 0,
|
|
2464
|
+
const bezier = _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, _chunkSXOTFV3Vcjs.vectorPathWorldBezier.call(void 0, now, _chunkSXOTFV3Vcjs.IDENTITY_MATRIX, { effects: false }), inverse);
|
|
2465
2465
|
return _chunkBJTCSLF6cjs.bezierPathToSvg.call(void 0, bezier, { precision: Math.min(precision, 2) });
|
|
2466
2466
|
}
|
|
2467
2467
|
});
|
|
@@ -2568,7 +2568,7 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2568
2568
|
}
|
|
2569
2569
|
if (scene.motionBlur) notes.push("Motion blur is drawn on the stage only; Flair plays the scene sharp.");
|
|
2570
2570
|
if (trigger && (_nullishCoalesce(scene.loop, () => ( "none"))) !== "none") notes.push(`The scene plays on ${trigger}, so its loop does not apply in Flair.`);
|
|
2571
|
-
let svg =
|
|
2571
|
+
let svg = _chunkSXOTFV3Vcjs.vectorDocumentToSvg.call(void 0, { ...scene.artwork, nodes: _chunkSXOTFV3Vcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) }, { pretty: false, precision, wrap });
|
|
2572
2572
|
if (routes.length) svg = svg.replace(/^(<svg[^>]*>)/, `$1<defs>${routes.join("")}</defs>`);
|
|
2573
2573
|
let motion = { svg, animate };
|
|
2574
2574
|
if (_optionalChain([scene, 'access', _114 => _114.controls, 'optionalAccess', _115 => _115.length])) {
|
|
@@ -2652,14 +2652,14 @@ function easingOf(ease, fallback) {
|
|
|
2652
2652
|
return fallback;
|
|
2653
2653
|
}
|
|
2654
2654
|
function poseOf(value, entry) {
|
|
2655
|
-
const t =
|
|
2656
|
-
const o =
|
|
2655
|
+
const t = _chunkSXOTFV3Vcjs.parseSvgTransform.call(void 0, String(value));
|
|
2656
|
+
const o = _chunkSXOTFV3Vcjs.multiplyMatrices.call(void 0, _nullishCoalesce(_chunkSXOTFV3Vcjs.invertMatrix.call(void 0, _chunkSXOTFV3Vcjs.nodeMatrix.call(void 0, entry.node)), () => ( [1, 0, 0, 1, 0, 0])), t);
|
|
2657
2657
|
const sx = Math.hypot(o[0], o[1]);
|
|
2658
2658
|
if (!(sx > 1e-9)) return null;
|
|
2659
2659
|
const sy = (o[0] * o[3] - o[1] * o[2]) / sx;
|
|
2660
2660
|
if (Math.abs(o[2] + o[1] / sx * sy) > 1e-6 || Math.abs(o[3] - o[0] / sx * sy) > 1e-6) return null;
|
|
2661
2661
|
const c = entry.center;
|
|
2662
|
-
const moved =
|
|
2662
|
+
const moved = _chunkSXOTFV3Vcjs.applyMatrix.call(void 0, o, c);
|
|
2663
2663
|
return { dx: moved.x - c.x, dy: moved.y - c.y, rotation: Math.atan2(o[1], o[0]) * 180 / Math.PI, sx, sy };
|
|
2664
2664
|
}
|
|
2665
2665
|
var near = (a, b, eps = 1e-6) => Math.abs(a - b) < eps;
|
|
@@ -2744,7 +2744,7 @@ function fromFlairSvgMotion(input, options = {}) {
|
|
|
2744
2744
|
const notes = [];
|
|
2745
2745
|
if (!input || typeof input.svg !== "string") throw new Error('Give a Flair SvgMotion: { svg: "<svg \u2026>", animate: [ \u2026 ] }.');
|
|
2746
2746
|
const { motion, controls } = resolvePlaceholders(input, notes);
|
|
2747
|
-
const artwork =
|
|
2747
|
+
const artwork = _chunkSXOTFV3Vcjs.parseVectorSvg.call(void 0, motion.svg);
|
|
2748
2748
|
const nodes = indexMotionNodes(artwork.nodes);
|
|
2749
2749
|
const byStep = /* @__PURE__ */ new Map();
|
|
2750
2750
|
for (const anim of _nullishCoalesce(motion.animate, () => ( []))) {
|
|
@@ -2991,9 +2991,9 @@ function toLottie(scene, options = {}) {
|
|
|
2991
2991
|
const items = [];
|
|
2992
2992
|
const shapeSegments = [...timeline.tracks.entries()].filter(([k]) => k.startsWith(`${path.id}\0`) && (k.endsWith("\0shape") || k.includes("\0effect:"))).flatMap(([, v]) => v);
|
|
2993
2993
|
const geometryAt = (t) => {
|
|
2994
|
-
if (!shapeSegments.length) return
|
|
2994
|
+
if (!shapeSegments.length) return _chunkSXOTFV3Vcjs.vectorPathWorldBezier.call(void 0, path);
|
|
2995
2995
|
const now = _optionalChain([indexMotionNodes, 'call', _124 => _124(motionFrameAt(scene, t, { draw: false, offsets: false }).document.nodes), 'access', _125 => _125.get, 'call', _126 => _126(path.id), 'optionalAccess', _127 => _127.node]);
|
|
2996
|
-
return now && now.type === "path" ?
|
|
2996
|
+
return now && now.type === "path" ? _chunkSXOTFV3Vcjs.vectorPathWorldBezier.call(void 0, _chunkSXOTFV3Vcjs.expandVectorAppearances.call(void 0, [now])[0]) : _chunkSXOTFV3Vcjs.vectorPathWorldBezier.call(void 0, path);
|
|
2997
2997
|
};
|
|
2998
2998
|
const rest = lottieContours(_chunkBJTCSLF6cjs.toBezierPath.call(void 0, geometryAt(0)), round2);
|
|
2999
2999
|
rest.forEach((contour, n) => {
|
|
@@ -3066,13 +3066,13 @@ function toLottie(scene, options = {}) {
|
|
|
3066
3066
|
const innerTr = STATIC_TR();
|
|
3067
3067
|
if (node.type === "path") inner = [...pathShapes(node)];
|
|
3068
3068
|
else if (node.type === "text" || node.type === "instance") {
|
|
3069
|
-
const drawn =
|
|
3069
|
+
const drawn = _chunkSXOTFV3Vcjs.expandVectorAppearance.call(void 0, node);
|
|
3070
3070
|
inner = drawn.type === "path" ? [...pathShapes(drawn)] : drawn.children.filter((c) => c.type === "path").reverse().flatMap((c) => [...pathShapes(c)]);
|
|
3071
|
-
notes.push(`"${node.id}": text is exported as its outlines${
|
|
3071
|
+
notes.push(`"${node.id}": text is exported as its outlines${_chunkSXOTFV3Vcjs.vectorTextHasOutlines.call(void 0, ) ? "" : " (glyph boxes: set an outline text shaper for real glyphs)"}.`);
|
|
3072
3072
|
} else {
|
|
3073
3073
|
inner = shown(node.children).reverse().map(nodeGroup);
|
|
3074
|
-
const m =
|
|
3075
|
-
if (m !==
|
|
3074
|
+
const m = _chunkSXOTFV3Vcjs.nodeMatrix.call(void 0, node);
|
|
3075
|
+
if (m !== _chunkSXOTFV3Vcjs.IDENTITY_MATRIX) {
|
|
3076
3076
|
const parts = staticParts(m);
|
|
3077
3077
|
if (!parts) notes.push(`"${node.id}": its transform skews, which is not exported; it is drawn without the skew.`);
|
|
3078
3078
|
else {
|
|
@@ -3085,7 +3085,7 @@ function toLottie(scene, options = {}) {
|
|
|
3085
3085
|
const body = { ty: "gr", nm: `${node.id} (own)`, it: [...inner, innerTr] };
|
|
3086
3086
|
return { ty: "gr", nm: _nullishCoalesce(node.name, () => ( node.id)), it: [body, poseTransform(entry)] };
|
|
3087
3087
|
};
|
|
3088
|
-
const artwork = { ...scene.artwork, nodes:
|
|
3088
|
+
const artwork = { ...scene.artwork, nodes: _chunkSXOTFV3Vcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) };
|
|
3089
3089
|
const content = shown(artwork.nodes).reverse().map(nodeGroup);
|
|
3090
3090
|
if (artwork.background && rgba(artwork.background))
|
|
3091
3091
|
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(round2) }, o: { a: 0, k: 100 }, r: 1 }, STATIC_TR()] });
|
|
@@ -3184,11 +3184,11 @@ function preset(prst, w, h) {
|
|
|
3184
3184
|
const poly = (pts) => [{ closed: true, anchors: pts.map(([x, y]) => ({ x, y })) }];
|
|
3185
3185
|
switch (prst) {
|
|
3186
3186
|
case "rect":
|
|
3187
|
-
return [
|
|
3187
|
+
return [_chunkSXOTFV3Vcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
|
|
3188
3188
|
case "roundRect":
|
|
3189
|
-
return [
|
|
3189
|
+
return [_chunkSXOTFV3Vcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h }, Math.min(w, h) * 0.16667)];
|
|
3190
3190
|
case "ellipse":
|
|
3191
|
-
return [
|
|
3191
|
+
return [_chunkSXOTFV3Vcjs.ellipseSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
|
|
3192
3192
|
case "triangle":
|
|
3193
3193
|
return poly([[w / 2, 0], [w, h], [0, h]]);
|
|
3194
3194
|
case "rtTriangle":
|
|
@@ -3296,7 +3296,7 @@ function shapes(ctx, tree, map) {
|
|
|
3296
3296
|
let subpaths = cust ? custom(cust, w, h) : prst ? preset(prst, w, h) : null;
|
|
3297
3297
|
if (!subpaths) {
|
|
3298
3298
|
if (prst) ctx.notes.push(`"${name}" is a ${prst}, drawn as its bounding rectangle.`);
|
|
3299
|
-
subpaths = [
|
|
3299
|
+
subpaths = [_chunkSXOTFV3Vcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
|
|
3300
3300
|
}
|
|
3301
3301
|
const style = kid(el, "style");
|
|
3302
3302
|
const fill = kid(spPr, "noFill") ? null : _nullishCoalesce(colour(ctx, kid(spPr, "solidFill")), () => ( (el.localName === "cxnSp" ? null : colour(ctx, kid(style, "fillRef")))));
|
|
@@ -3534,7 +3534,7 @@ function nextMotionEffectInstance(scene) {
|
|
|
3534
3534
|
walk(scene.artwork.nodes);
|
|
3535
3535
|
for (let i = 1; ; i++) if (!used.has(`fx${i}`)) return `fx${i}`;
|
|
3536
3536
|
}
|
|
3537
|
-
var motionArtworkSvg = (artwork) =>
|
|
3537
|
+
var motionArtworkSvg = (artwork) => _chunkSXOTFV3Vcjs.vectorDocumentToSvg.call(void 0, artwork);
|
|
3538
3538
|
var tag = (commands, source) => commands.map((c) => c.type === "wait" ? c : { ...c, source });
|
|
3539
3539
|
function motionCommandsFromEffect(artwork, motion, source) {
|
|
3540
3540
|
const imported = fromFlairSvgMotion({ svg: motionArtworkSvg(artwork), animate: [..._nullishCoalesce(motion.animate, () => ( []))] });
|
|
@@ -4519,7 +4519,7 @@ function createAnimationEditorToolProvider(controller, options = {}) {
|
|
|
4519
4519
|
handler: ({ svg }) => {
|
|
4520
4520
|
let artwork;
|
|
4521
4521
|
try {
|
|
4522
|
-
artwork =
|
|
4522
|
+
artwork = _chunkSXOTFV3Vcjs.parseVectorSvg.call(void 0, svg);
|
|
4523
4523
|
} catch (error) {
|
|
4524
4524
|
throw new Error(`The SVG could not be read: ${error.message}. Nothing was changed.`);
|
|
4525
4525
|
}
|
|
@@ -2,8 +2,8 @@ import { a6 as MotionCommand, a7 as MotionShot, a8 as MotionScene, L as VectorNo
|
|
|
2
2
|
export { az as FLAIR_EASES, aA as FLAIR_EXPORT_VERSION, aB as FlairEase, aC as FlairEaseName, aD as FlairSpringEase, aE as FlairSvgAnimation, aF as MOTION_BLENDS, aG as MOTION_CAMERA_MS, aH as MOTION_CASCADES, aI as MOTION_CLIP_TARGET, aJ as MOTION_COMMAND_TYPES, aK as MOTION_DEFAULT_DURATIONS, aL as MOTION_DEFAULT_HOLD, aM as MOTION_DIRECTIONS, aN as MOTION_DRAW_MS_PER_UNIT, aO as MOTION_DRAW_RANGE, aP as MOTION_DRIVEN_PROPERTIES, aQ as MOTION_ENTER_STYLES, aR as MOTION_EXIT_STYLES, aS as MOTION_IRIS_SHAPES, aT as MOTION_REPEAT_MODES, aU as MOTION_SPLIT_ORIENTATIONS, aV as MOTION_TEXT_UNITS, aW as MOTION_TRIGGERS, aX as MotionColorPulseCommand, aY as MotionCommandBase, aZ as MotionDrawCommand, a_ as MotionDrawOrder, a$ as MotionEffectCommand, b0 as MotionEnterCommand, b1 as MotionExitCommand, b2 as MotionFadeCommand, b3 as MotionFollowCommand, b4 as MotionMatchCommand, b5 as MotionMorphCommand, b6 as MotionMoveCommand, b7 as MotionPlayCommand, b8 as MotionPulseCommand, b9 as MotionRotateCommand, ba as MotionScaleCommand, bb as MotionShakeCommand, bc as MotionStyleCommand, bd as MotionTeeterCommand, be as MotionTrigger, bf as MotionWaitCommand, bg as MotionWaveCommand, bh as MotionWiggleCommand, bi as flairAtLeast, bj as flairCurveFor, bk as flairEaseFor, bl as motionFlairPrimitive, bm as toFlairEffectDocument, bn as toFlairSvgMotion, bo as toFlairVectorEffect } from '../helpers-v6GMazzg.cjs';
|
|
3
3
|
import { f as MotionBehavior, b as AnimationLoopMode } from '../evaluate-BsxYieLN.cjs';
|
|
4
4
|
import { b as AnimationEasing } from '../easing-lM0Xo9Ni.cjs';
|
|
5
|
-
import { A as AffineMatrix, B as BezierPath } from '../bezier-
|
|
6
|
-
import { V as VectorSvgExportOptions } from '../svg-
|
|
5
|
+
import { A as AffineMatrix, B as BezierPath } from '../bezier-CUaH8hcK.cjs';
|
|
6
|
+
import { V as VectorSvgExportOptions } from '../svg-DPJMUSNt.cjs';
|
|
7
7
|
import { Z as ZipReadOptions } from '../zip-4nG0YAH7.cjs';
|
|
8
8
|
import { A as AnimationPlayer, C as Clock } from '../player-CmbY3218.cjs';
|
|
9
9
|
import { H as HistoryManager } from '../HistoryManager-DeQQMBCj.cjs';
|
|
@@ -13,7 +13,7 @@ import '../provenance-DmlcgdzT.cjs';
|
|
|
13
13
|
import '../sourcemap-C8AH3MBQ.cjs';
|
|
14
14
|
import '../tokens-D7yXvUU6.cjs';
|
|
15
15
|
import '../types-CwMPoRMU.cjs';
|
|
16
|
-
import '../brushTypes-
|
|
16
|
+
import '../brushTypes-MX5UVs_m.cjs';
|
|
17
17
|
import '../types-DsiXGmjo.cjs';
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -2,8 +2,8 @@ import { a6 as MotionCommand, a7 as MotionShot, a8 as MotionScene, L as VectorNo
|
|
|
2
2
|
export { az as FLAIR_EASES, aA as FLAIR_EXPORT_VERSION, aB as FlairEase, aC as FlairEaseName, aD as FlairSpringEase, aE as FlairSvgAnimation, aF as MOTION_BLENDS, aG as MOTION_CAMERA_MS, aH as MOTION_CASCADES, aI as MOTION_CLIP_TARGET, aJ as MOTION_COMMAND_TYPES, aK as MOTION_DEFAULT_DURATIONS, aL as MOTION_DEFAULT_HOLD, aM as MOTION_DIRECTIONS, aN as MOTION_DRAW_MS_PER_UNIT, aO as MOTION_DRAW_RANGE, aP as MOTION_DRIVEN_PROPERTIES, aQ as MOTION_ENTER_STYLES, aR as MOTION_EXIT_STYLES, aS as MOTION_IRIS_SHAPES, aT as MOTION_REPEAT_MODES, aU as MOTION_SPLIT_ORIENTATIONS, aV as MOTION_TEXT_UNITS, aW as MOTION_TRIGGERS, aX as MotionColorPulseCommand, aY as MotionCommandBase, aZ as MotionDrawCommand, a_ as MotionDrawOrder, a$ as MotionEffectCommand, b0 as MotionEnterCommand, b1 as MotionExitCommand, b2 as MotionFadeCommand, b3 as MotionFollowCommand, b4 as MotionMatchCommand, b5 as MotionMorphCommand, b6 as MotionMoveCommand, b7 as MotionPlayCommand, b8 as MotionPulseCommand, b9 as MotionRotateCommand, ba as MotionScaleCommand, bb as MotionShakeCommand, bc as MotionStyleCommand, bd as MotionTeeterCommand, be as MotionTrigger, bf as MotionWaitCommand, bg as MotionWaveCommand, bh as MotionWiggleCommand, bi as flairAtLeast, bj as flairCurveFor, bk as flairEaseFor, bl as motionFlairPrimitive, bm as toFlairEffectDocument, bn as toFlairSvgMotion, bo as toFlairVectorEffect } from '../helpers-C-RgeyvH.js';
|
|
3
3
|
import { f as MotionBehavior, b as AnimationLoopMode } from '../evaluate-BbCeF6pt.js';
|
|
4
4
|
import { b as AnimationEasing } from '../easing-lM0Xo9Ni.js';
|
|
5
|
-
import { A as AffineMatrix, B as BezierPath } from '../bezier-
|
|
6
|
-
import { V as VectorSvgExportOptions } from '../svg-
|
|
5
|
+
import { A as AffineMatrix, B as BezierPath } from '../bezier-DPmdGwgR.js';
|
|
6
|
+
import { V as VectorSvgExportOptions } from '../svg-CnDCpIy9.js';
|
|
7
7
|
import { Z as ZipReadOptions } from '../zip-4nG0YAH7.js';
|
|
8
8
|
import { A as AnimationPlayer, C as Clock } from '../player-BK2kKbfd.js';
|
|
9
9
|
import { H as HistoryManager } from '../HistoryManager-DWSLd6Tf.js';
|
|
@@ -13,7 +13,7 @@ import '../provenance-uh5r2TQ8.js';
|
|
|
13
13
|
import '../sourcemap-DA1Evhrv.js';
|
|
14
14
|
import '../tokens-D7yXvUU6.js';
|
|
15
15
|
import '../types-CwMPoRMU.js';
|
|
16
|
-
import '../brushTypes-
|
|
16
|
+
import '../brushTypes-MX5UVs_m.js';
|
|
17
17
|
import '../types-DsiXGmjo.js';
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createVectorMorph
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-OV7253FC.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-V45ZTW4R.js";
|
|
35
|
+
import "../chunk-CPSMARTX.js";
|
|
36
36
|
import "../chunk-A3BVTI3G.js";
|
|
37
37
|
import {
|
|
38
38
|
bezierPathLength,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
resolveEffectValues
|
|
51
51
|
} from "../chunk-QFSTQHZY.js";
|
|
52
52
|
import "../chunk-4FX5ACVG.js";
|
|
53
|
-
import "../chunk-
|
|
53
|
+
import "../chunk-PQFVLOMR.js";
|
|
54
54
|
import "../chunk-63AZAUSN.js";
|
|
55
55
|
import "../chunk-3G6J7UFV.js";
|
|
56
56
|
import "../chunk-6FCKOS2B.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as Rect, X as XYPosition, c as CanvasNode, d as CanvasNodeStyle } from './brushTypes-
|
|
1
|
+
import { R as Rect, X as XYPosition, c as CanvasNode, d as CanvasNodeStyle } from './brushTypes-MX5UVs_m.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Canvas arrangement actions that have keyboard shortcuts.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as Rect, X as XYPosition, c as CanvasNode, d as CanvasNodeStyle } from './brushTypes-
|
|
1
|
+
import { R as Rect, X as XYPosition, c as CanvasNode, d as CanvasNodeStyle } from './brushTypes-MX5UVs_m.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Canvas arrangement actions that have keyboard shortcuts.
|
|
@@ -311,14 +311,39 @@ interface CanvasBrushstroke {
|
|
|
311
311
|
/** Pointer Events pen tilt in degrees (−90..90) along the length. */
|
|
312
312
|
tiltX?: number[];
|
|
313
313
|
tiltY?: number[];
|
|
314
|
+
/**
|
|
315
|
+
* Character seed. A stroke with one renders the brush's character: its seeded size, angle,
|
|
316
|
+
* opacity and scatter jitter and the paper grain it catches (charcoal, pastel and pencil get
|
|
317
|
+
* their look from these). New strokes get one; older strokes without it render plain dabs at
|
|
318
|
+
* the stroke width, exactly as before.
|
|
319
|
+
*/
|
|
320
|
+
seed?: number;
|
|
321
|
+
/**
|
|
322
|
+
* Brush diameter in path units. Missing: the preset's own size (tip settings: their `size`, else
|
|
323
|
+
* the stroke width) for strokes with a `seed`, the stroke width for older ones.
|
|
324
|
+
*/
|
|
325
|
+
size?: number;
|
|
326
|
+
/** The paper the grain comes from (default the built-in sanded grain); `null` for no grain. */
|
|
327
|
+
paper?: CanvasBrushPaper | null;
|
|
328
|
+
}
|
|
329
|
+
/** Paper for a brushed stroke's grain (the paint engine's `BrushstrokePaper`). */
|
|
330
|
+
interface CanvasBrushPaper {
|
|
331
|
+
/** Grain pattern (default `sanded`: a fine, even tooth). */
|
|
332
|
+
pattern?: 'smooth' | 'cold-pressed' | 'hot-pressed' | 'rough' | 'vellum' | 'laid' | 'ingres' | 'sanded' | 'canvas' | 'linen' | 'gesso';
|
|
333
|
+
/** Grain seed (default 1). */
|
|
334
|
+
seed?: number;
|
|
335
|
+
/** Grain scale in canvas units, 1 the pattern's natural size (0.25..8, default 1). */
|
|
336
|
+
scale?: number;
|
|
337
|
+
/** Grain depth 0..1, times the brush's grain response (default 0.5). */
|
|
338
|
+
depth?: number;
|
|
314
339
|
}
|
|
315
340
|
/** A dry paint preset that can brush a canvas stroke. */
|
|
316
341
|
interface CanvasBrushPreset {
|
|
317
342
|
id: string;
|
|
318
343
|
name: string;
|
|
319
344
|
category: string;
|
|
320
|
-
/** The preset's own tip diameter in
|
|
345
|
+
/** The preset's own tip diameter in canvas units: a new brushed stroke's default size. */
|
|
321
346
|
size: number;
|
|
322
347
|
}
|
|
323
348
|
|
|
324
|
-
export type { CanvasBrush as C, DirectionalDisplacementOptions as D, ExplodeNodeOptions as E, FanOutTrajectoryOptions as F, GraphDifferences as G, IncrementalLayoutOptions as I, NodeTransition as N, Point as P, Rect as R, Side as S, TrajectoryFunction as T, XYPosition as X, CanvasBrushPaint as a, CanvasBrushPreset as b, CanvasNode as c, CanvasNodeStyle as d, CanvasBrushstroke as e, CanvasEdge as f, CanvasLayoutOptions as g, PlaceBesideOptions as h, ReflowDisplacementOptions as i, CanvasClipboardPayload as j, Position as k, CanvasBrushPaintMapping as l, CanvasBrushPaintStop as m,
|
|
349
|
+
export type { CanvasBrush as C, DirectionalDisplacementOptions as D, ExplodeNodeOptions as E, FanOutTrajectoryOptions as F, GraphDifferences as G, IncrementalLayoutOptions as I, NodeTransition as N, Point as P, Rect as R, Side as S, TrajectoryFunction as T, XYPosition as X, CanvasBrushPaint as a, CanvasBrushPreset as b, CanvasNode as c, CanvasNodeStyle as d, CanvasBrushstroke as e, CanvasEdge as f, CanvasLayoutOptions as g, PlaceBesideOptions as h, ReflowDisplacementOptions as i, CanvasClipboardPayload as j, Position as k, CanvasBrushPaintMapping as l, CanvasBrushPaintStop as m, CanvasBrushPaper as n, CanvasBrushSettings as o, CanvasDockingCallbacks as p, CollapseNodeOptions as q, DisplacementDirection as r, DockStrategy as s, ExplosionSnapshot as t, TrajectoryPoint as u };
|