@pixerate/editor 0.114.0 → 0.116.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/THIRD_PARTY_NOTICES.md +6 -0
- package/dist/animation-editor/index.cjs +54 -54
- package/dist/animation-editor/index.d.cts +2 -2
- package/dist/animation-editor/index.d.ts +2 -2
- package/dist/animation-editor/index.js +2 -2
- package/dist/{chunk-DFQEX3AM.cjs → chunk-2UT4GXYA.cjs} +133 -8
- package/dist/chunk-2UT4GXYA.cjs.map +1 -0
- package/dist/{chunk-VXR7XWMF.js → chunk-7LNZAWSJ.js} +437 -41
- package/dist/chunk-7LNZAWSJ.js.map +1 -0
- package/dist/{chunk-LKCYANMW.js → chunk-ARQ7PQ6Q.js} +129 -4
- package/dist/chunk-ARQ7PQ6Q.js.map +1 -0
- package/dist/chunk-COAMRKVI.cjs +159 -0
- package/dist/chunk-COAMRKVI.cjs.map +1 -0
- package/dist/{chunk-C6C5PDKU.js → chunk-D53KSJUV.js} +3 -322
- package/dist/chunk-D53KSJUV.js.map +1 -0
- package/dist/chunk-D53VQGEJ.js +3262 -0
- package/dist/chunk-D53VQGEJ.js.map +1 -0
- package/dist/chunk-EJVDBITD.cjs +501 -0
- package/dist/chunk-EJVDBITD.cjs.map +1 -0
- package/dist/{chunk-LPLCWZTM.cjs → chunk-FODKPD44.cjs} +555 -159
- package/dist/chunk-FODKPD44.cjs.map +1 -0
- package/dist/chunk-HOCPSFGA.cjs +3262 -0
- package/dist/chunk-HOCPSFGA.cjs.map +1 -0
- package/dist/chunk-IPFRWILU.js +1908 -0
- package/dist/chunk-IPFRWILU.js.map +1 -0
- package/dist/{chunk-FV5AXTSF.cjs → chunk-JSSBHMMU.cjs} +36 -188
- package/dist/chunk-JSSBHMMU.cjs.map +1 -0
- package/dist/chunk-LF4WOZXZ.js +159 -0
- package/dist/chunk-LF4WOZXZ.js.map +1 -0
- package/dist/{chunk-26PGXHY7.cjs → chunk-M7O4BJRH.cjs} +36 -36
- package/dist/{chunk-26PGXHY7.cjs.map → chunk-M7O4BJRH.cjs.map} +1 -1
- package/dist/chunk-N3467VD6.js +501 -0
- package/dist/chunk-N3467VD6.js.map +1 -0
- package/dist/{chunk-ST7E3NEE.cjs → chunk-PAOWHJ5O.cjs} +18 -337
- package/dist/chunk-PAOWHJ5O.cjs.map +1 -0
- package/dist/{chunk-EUVSQ25B.js → chunk-SEBYNBHW.js} +85 -46
- package/dist/chunk-SEBYNBHW.js.map +1 -0
- package/dist/chunk-SMJGE7HM.cjs +1908 -0
- package/dist/chunk-SMJGE7HM.cjs.map +1 -0
- package/dist/{chunk-MMVHBKMM.js → chunk-T2P5TIZ6.js} +2 -2
- package/dist/{chunk-FGW5OWJ4.js → chunk-VJUML33I.js} +4 -156
- package/dist/chunk-VJUML33I.js.map +1 -0
- package/dist/{chunk-5OVJHMZQ.cjs → chunk-ZYZGEILO.cjs} +332 -293
- package/dist/chunk-ZYZGEILO.cjs.map +1 -0
- package/dist/export/index.cjs +4 -2
- package/dist/export/index.cjs.map +1 -1
- package/dist/export/index.js +5 -3
- package/dist/{export-b6NjCZ5-.d.cts → export-BXxSGBCq.d.cts} +67 -5
- package/dist/{export-_1dUKwpF.d.ts → export-Dm44YUvS.d.ts} +67 -5
- package/dist/export-Dv0-ZVrV.d.cts +501 -0
- package/dist/export-Dv0-ZVrV.d.ts +501 -0
- package/dist/{retouch-Do6tBs2H.d.ts → flow-BMtHAmg4.d.ts} +561 -2
- package/dist/{retouch-Bxkuc0KH.d.cts → flow-COCB42TP.d.cts} +561 -2
- package/dist/image-editor/index.cjs +1227 -934
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +18 -10
- package/dist/image-editor/index.d.ts +18 -10
- package/dist/image-editor/index.js +324 -31
- package/dist/image-editor/index.js.map +1 -1
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/kernel-wasm-WYCGNZR4.js +10 -0
- package/dist/kernel-wasm-WYCGNZR4.js.map +1 -0
- package/dist/kernel-wasm-YPVAEMVN.cjs +10 -0
- package/dist/kernel-wasm-YPVAEMVN.cjs.map +1 -0
- package/dist/paint/index.cjs +165 -3
- package/dist/paint/index.cjs.map +1 -1
- package/dist/paint/index.d.cts +225 -3
- package/dist/paint/index.d.ts +225 -3
- package/dist/paint/index.js +166 -4
- package/dist/paint-editor/index.cjs +4691 -845
- package/dist/paint-editor/index.cjs.map +1 -1
- package/dist/paint-editor/index.d.cts +1525 -277
- package/dist/paint-editor/index.d.ts +1525 -277
- package/dist/paint-editor/index.js +4561 -715
- package/dist/paint-editor/index.js.map +1 -1
- package/dist/raster/index.cjs +4 -3
- package/dist/raster/index.cjs.map +1 -1
- package/dist/raster/index.js +10 -9
- package/dist/{svg-BnRj0q8i.d.cts → svg-CVdFc80-.d.cts} +2 -2
- package/dist/{svg-CmmBFfGT.d.ts → svg-DlEuhwoX.d.ts} +2 -2
- package/dist/{types-1SUQKDAw.d.ts → types-CDLGhAZp.d.ts} +40 -2
- package/dist/{types-yINF17Ta.d.cts → types-Tfly4Aya.d.cts} +40 -2
- package/dist/vector/index.cjs +1897 -975
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.d.cts +292 -32
- package/dist/vector/index.d.ts +292 -32
- package/dist/vector/index.js +928 -6
- package/dist/vector/index.js.map +1 -1
- package/dist/video-editor/index.cjs +502 -2165
- package/dist/video-editor/index.cjs.map +1 -1
- package/dist/video-editor/index.d.cts +3 -501
- package/dist/video-editor/index.d.ts +3 -501
- package/dist/video-editor/index.js +151 -1814
- package/dist/video-editor/index.js.map +1 -1
- package/package.json +4 -2
- package/skills/pixerate-image-editor/SKILL.md +1 -0
- package/skills/pixerate-image-editor/references/color-management.md +8 -3
- package/skills/pixerate-image-editor/references/photoshop-files.md +15 -9
- package/skills/pixerate-paint-editor/SKILL.md +136 -4
- package/skills/pixerate-vector/SKILL.md +22 -1
- package/dist/chunk-5OVJHMZQ.cjs.map +0 -1
- package/dist/chunk-C6C5PDKU.js.map +0 -1
- package/dist/chunk-DFQEX3AM.cjs.map +0 -1
- package/dist/chunk-EUVSQ25B.js.map +0 -1
- package/dist/chunk-FGW5OWJ4.js.map +0 -1
- package/dist/chunk-FV5AXTSF.cjs.map +0 -1
- package/dist/chunk-GX332W2C.js +0 -181
- package/dist/chunk-GX332W2C.js.map +0 -1
- package/dist/chunk-LKCYANMW.js.map +0 -1
- package/dist/chunk-LPLCWZTM.cjs.map +0 -1
- package/dist/chunk-MUUXNRU4.cjs +0 -181
- package/dist/chunk-MUUXNRU4.cjs.map +0 -1
- package/dist/chunk-ST7E3NEE.cjs.map +0 -1
- package/dist/chunk-TCKIXI46.cjs +0 -1136
- package/dist/chunk-TCKIXI46.cjs.map +0 -1
- package/dist/chunk-UBIXVXPR.js +0 -1136
- package/dist/chunk-UBIXVXPR.js.map +0 -1
- package/dist/chunk-VXR7XWMF.js.map +0 -1
- /package/dist/{chunk-MMVHBKMM.js.map → chunk-T2P5TIZ6.js.map} +0 -0
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -12,6 +12,7 @@ reproduced at the end of this file. Paths are relative to each source repository
|
|
|
12
12
|
|
|
13
13
|
© 2026 ArtCraft Team and the CadCraft contributors.
|
|
14
14
|
|
|
15
|
+
- `crates/io/src/pdf.rs` (a minimal PDF writer of our own: numbered objects, the cross-reference table, Flate-compressed content streams of `m` / `l` / `c` / `h` paths filled and stroked in RGB with line settings) → `packages/core/src/vector/pdf.ts` (`vectorDocumentToPdf`), drawing the vector scene render data, with a page per artboard; test cases our own → `packages/core/tests/vector-pdf.test.ts`
|
|
15
16
|
- `crates/engine/src/snap/tracking.rs` (`polar_angles`, `MAX_ACQUIRED`, `DWELL`, `Tracker::toggle` / `hover` / `paths` / `find`: acquired points sending alignment paths and an endpoint's extension, then a crossing of two paths, a path crossing the drawing, or the nearest path) and its direct distance entry → `vectorPolarAngles`, `vectorTrackingPaths` and tracking in `snapFrom` in `packages/core/src/vector/snap.ts`, and `acquireTrackingPoint`, `placePenPoint` and `addPathByDimensions` in `packages/core/src/vector/controller.ts`; parallel and apparent-intersection tracking are not ported; test cases re-expressed → `packages/core/tests/vector-tracking.test.ts`
|
|
16
17
|
- `crates/engine/src/spatial.rs` (an R-tree over object bounds used by picking, window selection and snaps, built only above 256 objects, reused while the content is the same and rebuilt from unchanged parts after an edit, returning candidates in draw order for the same exact tests a scan runs) → the approach of `VectorRTree`, `vectorSpatialIndex` and `vectorNodesNear` in `packages/core/src/vector/spatial.ts`, used by `hitTestVectorNodes`, marquee selection and snapping to segments; the tree is our own sort-tile-recursive packing (cadcraft uses the `rstar` crate), and unchanged parts are reused by caching each node's bounds by node object; parity tests are our own → `packages/core/tests/vector-spatial.test.ts`
|
|
17
18
|
- `crates/constraints/src/lm.rs` (damped, weighted minimum-norm Gauss–Newton with a numerical Jacobian, `Δx = −W⁻¹Jᵀ(JW⁻¹Jᵀ + μI)⁻¹r`; Gaussian elimination with partial pivoting; Householder QR with column pivoting on row- and column-balanced matrices for rank and null space), `lib.rs` (constraints grouped into connected components, edited geometry weighted to move least, conflicts located by leaving each constraint out, new constraints refused when they do not raise the Jacobian's rank or when a Fix locks parameters already determined), `residual.rs` (the residual forms: point–point, point on line or circle, collinear, parallel, perpendicular, horizontal / vertical, tangent line–circle and circle–circle, symmetric, equal, distance along an axis, angle with its orientation from the starting geometry, radius, diameter), `dof.rs` (remaining degrees of freedom per component, per object by the null space restricted to its parameters, statuses), `auto.rs` (`infer`: coincident points, concentric and tangent circles, horizontal / vertical lines, collinear, connected perpendicular and parallel pairs, equal lengths and radii, in that order) and `expr.rs` (named expressions with `+ - * /`, parentheses and `pi`, evaluated lazily with cycle detection) → `packages/core/src/vector/constraints/lm.ts`, `solve.ts`, `auto.ts` and `expr.ts`; entities and handles became our anchors with stable ids, segments, handles, G1 / G2 joints at anchors and round closed paths, angle-type residuals are scaled to lengths so one tolerance fits all rows, and a solve after every edit weights what changed since the last solve; test cases re-expressed → `packages/core/tests/vector-constraints.test.ts`
|
|
@@ -52,6 +53,9 @@ reproduced at the end of this file. Paths are relative to each source repository
|
|
|
52
53
|
|
|
53
54
|
© 2026 ArtCraft Team and the EffectCraft contributors.
|
|
54
55
|
|
|
56
|
+
- `crates/lottie/src/shapes.rs` (`export_items` / `import_items`: shape items `gr`, `rc`, `el`, `sr`, `sh`, `fl`, `st`, `gf`, `gs`, `tm`, `rp`, `rd`, `op`, `pb`, `tw`, `zz`, `mm`, `tr`, stroke fields and dashes, flat gradient stops) and `anim.rs` (keyframed values and bezier easing) → `packages/core/src/vector/lottie.ts`, mapping onto our path effects so they stay live both ways and reading one frame of an animation (layers, parenting, precomps, additive masks); test cases re-expressed → `packages/core/tests/vector-lottie.test.ts`
|
|
57
|
+
- `crates/path/src/trace.rs` (`trace`, `contours`: marching squares at pixel centres with interpolated crossings, saddles by the cell mean and a padded field so contours close; Douglas–Peucker; minimum area; nesting depth) → `packages/core/src/vector/trace.ts`, fitted with our `fitCubics` instead of its per-span cubics, plus median-cut colour tracing stacked by coverage; test cases our own → `packages/core/tests/vector-trace.test.ts`
|
|
58
|
+
- `crates/pdf/src/shading.rs` (`patches`: Coons and tensor-product patch meshes, PDF shading types 6 and 7, tessellated into small cells whose colours blend between the patch's corners) → gradient meshes in `packages/core/src/vector/shading.ts` (`vectorMeshPointAt`, `vectorMeshColorAt`, `vectorShadedSvgDefs`), the patch sides being Catmull-Rom curves through the lattice and the cells drawn as SVG pattern tiles; test cases our own → `packages/core/tests/vector-shading.test.ts`
|
|
55
59
|
- `crates/path/src/varstroke.rs` (`outline`: a variable-width stroke as the union of positively wound trapezoids per flattened segment, round wedges at bends and the caps, filled non-zero; `flatten` with a width-sampling step; `dash_intervals`; `width_factor` with the `Taper` lengths, widths and quarter-circle `ease` and the `Wave` amount, cycles and phase) → `variableStrokeRings` / `variableStrokeOutline` / `dashIntervals` in `packages/core/src/vector/varstroke.ts` and `taperWaveFactor` / `generateWidthProfile` in `packages/core/src/vector/width.ts`; the pieces are emitted as the boundary they add up to (offset sides, outer joins, inner sides trimmed at the offsets' crossing or routed through the centre) instead of being unioned one by one, and the result is refitted with cubics; test cases re-expressed → `packages/core/tests/vector-width.test.ts`
|
|
56
60
|
- `crates/path/src/interp.rs` (`with_vertex_count`: largest-remainder allocation of new vertices by segment length and de Casteljau splits at equal arc length; `correspond`: same winding, then the cyclic offset with the lowest cost of normalised positions plus χ² distances of log-polar shape-context histograms, coarse then refined for long contours; `interpolate`: Procrustes rotation and scale interpolated with the residual blended in and a straight-line mix; `paths_cross`) → `refineMorphContour`, `correspondMorphContours`, `interpolateMorphContours` and `morphPathsCross` in `packages/core/src/vector/blend.ts`; the offset cost is what remains after the best-fit rotation (plus a small turn penalty) and the histograms measure angles from the contour's direction, so a turned shape corresponds by turning; test cases re-expressed → `packages/core/tests/vector-blend.test.ts`
|
|
57
61
|
- `crates/path/src/ops.rs` (`trim` / `trim_individually` with `trim_intervals` and `Measured::append`: start / end percentages swapped when reversed, an offset in degrees wrapping round, a piece that starts where the last ended continuing it; `pucker_bloat`; `round_corners`; `offset` with copies at `amount · (i + 1 + copy_offset)`; `twist` with subdivided segments and handles mapped through the warp's derivative; `resample` and `emit` (corner bisectors, smooth handles as a fraction of the pieces); `zigzag`; `WiggleParams`, `splitmix`, `hash`, the Catmull-Rom `noise` and `wiggle`; `MergeMode` and `merge`) → `trimPaths`, `trimPathsIndividually`, `puckerBloatPaths`, `offsetPaths`, `twistPaths`, `zigzagPaths`, `wigglePaths` and `mergePaths` in `packages/core/src/vector/pathEffects.ts`; arc lengths come from our `segmentLength` / `trimSegments`, offsets from `offsetPath`, booleans from `pathBoolean`, and Round Corners (`roundCornerPaths`) uses our live-corner maths (a true radius) instead of the port's setback arc; the wiggle's time is a plain parameter; test cases from `crates/path/src/ops/tests.rs` re-expressed → `packages/core/tests/vector-effects.test.ts`
|
|
@@ -165,6 +169,7 @@ GridCraft. Apache POI is © The Apache Software Foundation, licensed under the A
|
|
|
165
169
|
|
|
166
170
|
© 2026 ArtCraft Team and the PDFCraft contributors.
|
|
167
171
|
|
|
172
|
+
- `crates/content/src/lib.rs` (content stream operators: `q` / `Q`, `cm`, `W n` / `W* n` clipping, `gs` graphics states, `sh` shadings) → `packages/core/src/vector/pdf.ts`: opacity and blend modes as ExtGStates, clip masks and aligned strokes as clipping paths, linear and radial gradients as axial and radial shadings with stitched functions
|
|
168
173
|
- `crates/compare/src/lib.rs` (`diff` with common prefix/suffix stripping, `myers` keeping only the −d..d frontier, patience `anchors` with longest increasing subsequence, recursion depth limit, grouping into inserted/deleted/replaced) → `packages/core/src/compare/diff.ts`
|
|
169
174
|
- Test cases from the file above (`long_documents_with_scattered_edits`, `very_different_documents_finish`, `insertions_deletions_and_replacements`), re-expressed → `packages/core/tests/compare-diff.test.ts`
|
|
170
175
|
- `crates/export/src/lib.rs` (`body_size`: body text size by character count; `level`: heading levels relative to it, bold body-size headings; `tables`: grid columns from aligned cell edges, rows from overlapping spans, spanning header and totals rows next to a run, the 63-column cap) → `packages/core/src/import/pdf-layout.ts`
|
|
@@ -230,6 +235,7 @@ GridCraft. Apache POI is © The Apache Software Foundation, licensed under the A
|
|
|
230
235
|
|
|
231
236
|
© 2026 ArtCraft Team and the VectorCraft contributors.
|
|
232
237
|
|
|
238
|
+
- `crates/color/src/freeform.rs` (`Freeform`, `FreeformPoint` with `spread`, `spread_scale`, `Freeform::auto`, `segments` (Catmull-Rom lines), `remove_point`, `Field` / `Field::sample`: discs of pure colour, inverse-square blending beyond them, line pieces weighted by their share of the line) → freeform gradients in `packages/core/src/vector/shading.ts`, drawn as SVG strips each with a linear gradient through the field; test cases re-expressed → `packages/core/tests/vector-shading.test.ts`
|
|
233
239
|
- `crates/doc/src/symbols.rs` (`Symbol { name, art }` and `SymbolInstance { symbol, xf }`: a document's symbols drawn and measured by instances through their own affine transform, art boxes measured per symbol, nesting bounded, and a symbol that would hold itself measured as nothing) → the concepts of `VectorSymbol`, `VectorInstanceNode`, `resolveVectorSymbols` and `vectorInstanceGroup` in `packages/core/src/vector/symbols.ts`; our instances carry their symbol's art resolved, and draw it as a group whose rotation stays rigid while scale and skew are baked into the art (strokes scaled by √|det| unless `scaleStrokes` is false); the editing (Make Symbol, isolation mode, Detach, Replace, overrides) is our own
|
|
234
240
|
- `crates/tools/src/guides.rs` (`snap_scale`) → `packages/core/src/canvas/resizeSnap.ts`
|
|
235
241
|
- `crates/tools/src/guides.rs` (`Targets` gathered once per gesture and kept x / y sorted with `within` bisection lookups; `for_move`, `for_drawing`, `for_handle`, `for_anchor_drag` leaving the moving anchors and their segments out, `push_segments`; the `snap_from` priority — Shift-constrained ray, point, intersection, on-segment, construction angle, x / y alignment — with `slide`, `lined_up`, `on_segment`, `crossing`; `align_rects`, `snap_rects`, `even_spacing`, `gap_marks`; `snap_scale` for rotated boxes; `Leave`, `construction`; the "anchor" / "centre" / "path" / "intersect" / "align" labels) → `packages/core/src/vector/snap.ts`; the curve–curve `meeting` search was not ported (`segmentIntersections` in `packages/core/src/canvas/pathops/boolean.ts` finds every crossing instead)
|
|
@@ -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 _chunkM7O4BJRHcjs = require('../chunk-M7O4BJRH.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -31,7 +31,7 @@ var _chunkWAJQKWQUcjs = require('../chunk-WAJQKWQU.cjs');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunkFODKPD44cjs = require('../chunk-FODKPD44.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
@@ -559,7 +559,7 @@ function smoothMotionTimes(points, start, duration, pacing = "even") {
|
|
|
559
559
|
function motionTextLayout(nodes, id) {
|
|
560
560
|
const group = _optionalChain([nodes, 'access', _5 => _5.get, 'call', _6 => _6(id), 'optionalAccess', _7 => _7.node]);
|
|
561
561
|
if (!group || group.type !== "group") return null;
|
|
562
|
-
const letters =
|
|
562
|
+
const letters = _chunkFODKPD44cjs.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);
|
|
563
563
|
if (!letters.length) return null;
|
|
564
564
|
const lines = [];
|
|
565
565
|
for (const l of [...letters].sort((a, c) => a.b.y + a.b.height / 2 - (c.b.y + c.b.height / 2))) {
|
|
@@ -644,21 +644,21 @@ function indexMotionNodes(nodes) {
|
|
|
644
644
|
const out = /* @__PURE__ */ new Map();
|
|
645
645
|
const walk = (list, parentWorld, ancestors) => {
|
|
646
646
|
for (const node of list) {
|
|
647
|
-
const local =
|
|
648
|
-
const bounds =
|
|
647
|
+
const local = _chunkFODKPD44cjs.vectorNodeBounds.call(void 0, node);
|
|
648
|
+
const bounds = _chunkFODKPD44cjs.vectorNodeBounds.call(void 0, node, parentWorld);
|
|
649
649
|
const center = local ? { x: local.x + local.width / 2, y: local.y + local.height / 2 } : { x: 0, y: 0 };
|
|
650
650
|
if (!out.has(node.id)) out.set(node.id, { node, ancestors, parentWorld, center, bounds, box: local });
|
|
651
|
-
if (node.type === "group") walk(node.children,
|
|
651
|
+
if (node.type === "group") walk(node.children, _chunkFODKPD44cjs.multiplyMatrices.call(void 0, _chunkFODKPD44cjs.nodeMatrix.call(void 0, node), parentWorld), [...ancestors, node.id]);
|
|
652
652
|
}
|
|
653
653
|
};
|
|
654
|
-
walk(nodes,
|
|
654
|
+
walk(nodes, _chunkFODKPD44cjs.IDENTITY_MATRIX, []);
|
|
655
655
|
indexCache.set(nodes, out);
|
|
656
656
|
return out;
|
|
657
657
|
}
|
|
658
658
|
var solid = (paint) => typeof paint === "string" && paint !== "none" ? paint : void 0;
|
|
659
659
|
function firstPaint(node, key) {
|
|
660
660
|
if (node.type === "path") return solid(node[key]);
|
|
661
|
-
for (const p of
|
|
661
|
+
for (const p of _chunkFODKPD44cjs.collectPathNodes.call(void 0, node)) {
|
|
662
662
|
const s = solid(p[key]);
|
|
663
663
|
if (s) return s;
|
|
664
664
|
}
|
|
@@ -666,7 +666,7 @@ function firstPaint(node, key) {
|
|
|
666
666
|
}
|
|
667
667
|
function strokeReach(node) {
|
|
668
668
|
let reach = 0;
|
|
669
|
-
for (const p of node.type === "path" ? [node] :
|
|
669
|
+
for (const p of node.type === "path" ? [node] : _chunkFODKPD44cjs.collectPathNodes.call(void 0, node)) {
|
|
670
670
|
if (p.stroke == null || p.stroke === "none") continue;
|
|
671
671
|
const width = _nullishCoalesce(p.strokeWidth, () => ( 1));
|
|
672
672
|
reach = Math.max(reach, p.strokeAlign === "outside" ? width : p.strokeAlign === "inside" ? 0 : width / 2);
|
|
@@ -736,7 +736,7 @@ function motionRestValue(entry, property, artwork) {
|
|
|
736
736
|
case "stroke":
|
|
737
737
|
return _nullishCoalesce((node && firstPaint(node, property)), () => ( "transparent"));
|
|
738
738
|
case "strokeWidth": {
|
|
739
|
-
const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ?
|
|
739
|
+
const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ? _chunkFODKPD44cjs.collectPathNodes.call(void 0, node)[0] : void 0;
|
|
740
740
|
return _nullishCoalesce(_optionalChain([path, 'optionalAccess', _14 => _14.strokeWidth]), () => ( 1));
|
|
741
741
|
}
|
|
742
742
|
case "shape":
|
|
@@ -847,12 +847,12 @@ function resolveMotionCamera(camera, scene) {
|
|
|
847
847
|
const r = camera;
|
|
848
848
|
return { x: r.x, y: r.y, width: r.width, height: r.height };
|
|
849
849
|
}
|
|
850
|
-
function motionPathLength(node, parentWorld =
|
|
850
|
+
function motionPathLength(node, parentWorld = _chunkFODKPD44cjs.IDENTITY_MATRIX) {
|
|
851
851
|
let longest = 0;
|
|
852
|
-
const paths = node.type === "path" ? [node] :
|
|
852
|
+
const paths = node.type === "path" ? [node] : _chunkFODKPD44cjs.collectPathNodes.call(void 0, node);
|
|
853
853
|
for (const p of paths) {
|
|
854
854
|
try {
|
|
855
|
-
longest = Math.max(longest, _chunkXGD3FSNCcjs.bezierPathLength.call(void 0,
|
|
855
|
+
longest = Math.max(longest, _chunkXGD3FSNCcjs.bezierPathLength.call(void 0, _chunkFODKPD44cjs.vectorPathWorldBezier.call(void 0, p, parentWorld, { effects: false })));
|
|
856
856
|
} catch (e2) {
|
|
857
857
|
}
|
|
858
858
|
}
|
|
@@ -1105,12 +1105,12 @@ function compileMotionScene(scene) {
|
|
|
1105
1105
|
const order2 = _nullishCoalesce(o.order, () => ( "together"));
|
|
1106
1106
|
const pace = _nullishCoalesce(o.pace, () => ( "time"));
|
|
1107
1107
|
if (order2 === "together" && pace === "time") return null;
|
|
1108
|
-
const paths = entry.node.type === "path" ? [entry.node] :
|
|
1108
|
+
const paths = entry.node.type === "path" ? [entry.node] : _chunkFODKPD44cjs.collectPathNodes.call(void 0, entry.node);
|
|
1109
1109
|
let list = paths.map((p) => {
|
|
1110
1110
|
const at = nodes.get(p.id);
|
|
1111
1111
|
let first = { x: 0, y: 0 };
|
|
1112
1112
|
try {
|
|
1113
|
-
const m =
|
|
1113
|
+
const m = _chunkFODKPD44cjs.vectorPathWorldBezier.call(void 0, p, _nullishCoalesce(_optionalChain([at, 'optionalAccess', _41 => _41.parentWorld]), () => ( _chunkFODKPD44cjs.IDENTITY_MATRIX)), { effects: false })[0];
|
|
1114
1114
|
if (m && m.type === "M") first = { x: m.x, y: m.y };
|
|
1115
1115
|
} catch (e3) {
|
|
1116
1116
|
}
|
|
@@ -1222,17 +1222,17 @@ function compileMotionScene(scene) {
|
|
|
1222
1222
|
let dx = _nullishCoalesce(_optionalChain([command3, 'access', _44 => _44.by, 'optionalAccess', _45 => _45.x]), () => ( 0));
|
|
1223
1223
|
let dy = _nullishCoalesce(_optionalChain([command3, 'access', _46 => _46.by, 'optionalAccess', _47 => _47.y]), () => ( 0));
|
|
1224
1224
|
if (command3.to) {
|
|
1225
|
-
const inv =
|
|
1226
|
-
const target =
|
|
1225
|
+
const inv = _chunkFODKPD44cjs.invertMatrix.call(void 0, entry.parentWorld);
|
|
1226
|
+
const target = _chunkFODKPD44cjs.applyMatrix.call(void 0, inv, command3.to);
|
|
1227
1227
|
dx = target.x - (entry.center.x + num2("x"));
|
|
1228
1228
|
dy = target.y - (entry.center.y + num2("y"));
|
|
1229
1229
|
}
|
|
1230
1230
|
if (_optionalChain([command3, 'access', _48 => _48.via, 'optionalAccess', _49 => _49.length])) {
|
|
1231
|
-
const inv =
|
|
1231
|
+
const inv = _chunkFODKPD44cjs.invertMatrix.call(void 0, entry.parentWorld);
|
|
1232
1232
|
const x0 = num2("x");
|
|
1233
1233
|
const y0 = num2("y");
|
|
1234
1234
|
const add = command3.blend === "add";
|
|
1235
|
-
const offsets = [{ x: 0, y: 0 }, ...command3.via.map((p) =>
|
|
1235
|
+
const offsets = [{ x: 0, y: 0 }, ...command3.via.map((p) => _chunkFODKPD44cjs.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 }];
|
|
1236
1236
|
const times = smoothMotionTimes(offsets, start, end - start, _nullishCoalesce(command3.pacing, () => ( "even")));
|
|
1237
1237
|
for (const axis of ["x", "y"]) {
|
|
1238
1238
|
const base = add ? 0 : axis === "x" ? x0 : y0;
|
|
@@ -1375,13 +1375,13 @@ function morphBetween(a, b) {
|
|
|
1375
1375
|
let inner = morphCache.get(a);
|
|
1376
1376
|
if (!inner) morphCache.set(a, inner = /* @__PURE__ */ new WeakMap());
|
|
1377
1377
|
let morph = inner.get(b);
|
|
1378
|
-
if (!morph) inner.set(b, morph =
|
|
1378
|
+
if (!morph) inner.set(b, morph = _chunkM7O4BJRHcjs.createVectorMorph.call(void 0, a, b, { id: a.id }));
|
|
1379
1379
|
return morph;
|
|
1380
1380
|
}
|
|
1381
1381
|
function shapeIn(entry, shape) {
|
|
1382
1382
|
if (shape === entry) return entry.node;
|
|
1383
|
-
const m =
|
|
1384
|
-
return { ...shape.node, ...
|
|
1383
|
+
const m = _chunkFODKPD44cjs.multiplyMatrices.call(void 0, _chunkFODKPD44cjs.multiplyMatrices.call(void 0, _chunkFODKPD44cjs.nodeMatrix.call(void 0, shape.node), shape.parentWorld), _chunkFODKPD44cjs.invertMatrix.call(void 0, entry.parentWorld));
|
|
1384
|
+
return { ...shape.node, ..._chunkFODKPD44cjs.isIdentityMatrix.call(void 0, m) ? { transform: void 0 } : { transform: m } };
|
|
1385
1385
|
}
|
|
1386
1386
|
function shapeAt(entry, timeline, nodes, time) {
|
|
1387
1387
|
const track = timeline.tracks.get(motionTrackKey(entry.node.id, "shape"));
|
|
@@ -1401,7 +1401,7 @@ function shapeAt(entry, timeline, nodes, time) {
|
|
|
1401
1401
|
function motionFollowRoute(entry, path) {
|
|
1402
1402
|
if (!path || path.node.type !== "path") return null;
|
|
1403
1403
|
try {
|
|
1404
|
-
return _chunkXGD3FSNCcjs.transformBezierPath.call(void 0,
|
|
1404
|
+
return _chunkXGD3FSNCcjs.transformBezierPath.call(void 0, _chunkFODKPD44cjs.vectorPathWorldBezier.call(void 0, path.node, path.parentWorld, { effects: false }), _chunkFODKPD44cjs.invertMatrix.call(void 0, entry.parentWorld));
|
|
1405
1405
|
} catch (e4) {
|
|
1406
1406
|
return null;
|
|
1407
1407
|
}
|
|
@@ -1435,9 +1435,9 @@ function motionNodeOffset(entry, timeline, time, nodes = indexMotionNodes([entry
|
|
|
1435
1435
|
const scaleX = read("scaleX", 1);
|
|
1436
1436
|
const scaleY = read("scaleY", 1);
|
|
1437
1437
|
const c = entry.center;
|
|
1438
|
-
let matrix =
|
|
1438
|
+
let matrix = _chunkFODKPD44cjs.multiplyMatrices.call(void 0, _chunkFODKPD44cjs.multiplyMatrices.call(void 0, _chunkFODKPD44cjs.scaleMatrix.call(void 0, scaleX, scaleY, c), _chunkFODKPD44cjs.rotateMatrix.call(void 0, rotation, c)), _chunkFODKPD44cjs.translateMatrix.call(void 0, dx, dy));
|
|
1439
1439
|
const along = follow ? followAt(entry, timeline, nodes, time) : null;
|
|
1440
|
-
if (along) matrix =
|
|
1440
|
+
if (along) matrix = _chunkFODKPD44cjs.multiplyMatrices.call(void 0, matrix, _chunkFODKPD44cjs.multiplyMatrices.call(void 0, _chunkFODKPD44cjs.multiplyMatrices.call(void 0, _chunkFODKPD44cjs.translateMatrix.call(void 0, -c.x, -c.y), _chunkFODKPD44cjs.rotateMatrix.call(void 0, along.angle)), _chunkFODKPD44cjs.translateMatrix.call(void 0, along.x, along.y)));
|
|
1441
1441
|
return { matrix, dx, dy, rotation, scaleX, scaleY, follow: along };
|
|
1442
1442
|
}
|
|
1443
1443
|
function motionNodeClips(id, timeline, time) {
|
|
@@ -1504,7 +1504,7 @@ function motionFrameAt(scene, time, options = {}) {
|
|
|
1504
1504
|
const start = Math.min(1, Math.max(0, typeof drawStart === "number" ? drawStart : 0));
|
|
1505
1505
|
const end = Math.min(1, Math.max(0, typeof drawEnd === "number" ? drawEnd : 1));
|
|
1506
1506
|
if (start > 0 || end < 1) {
|
|
1507
|
-
const trim =
|
|
1507
|
+
const trim = _chunkFODKPD44cjs.createVectorEffect.call(void 0, "trim", MOTION_DRAW_EFFECT_ID, { start: tidy(start * 100), end: tidy(end * 100) });
|
|
1508
1508
|
p = { ...p, effects: [trim, ...(_nullishCoalesce(p.effects, () => ( []))).filter((e) => e.id !== MOTION_DRAW_EFFECT_ID)] };
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
@@ -1518,8 +1518,8 @@ function motionFrameAt(scene, time, options = {}) {
|
|
|
1518
1518
|
if (o >= 1) delete out.opacity;
|
|
1519
1519
|
}
|
|
1520
1520
|
const offset = options.offsets === false ? null : motionNodeOffset(entry, timeline, time, nodes);
|
|
1521
|
-
if (offset && !
|
|
1522
|
-
const m =
|
|
1521
|
+
if (offset && !_chunkFODKPD44cjs.isIdentityMatrix.call(void 0, offset.matrix)) {
|
|
1522
|
+
const m = _chunkFODKPD44cjs.multiplyMatrices.call(void 0, _chunkFODKPD44cjs.nodeMatrix.call(void 0, out), offset.matrix).map(tidy);
|
|
1523
1523
|
out = { ...out, transform: m };
|
|
1524
1524
|
}
|
|
1525
1525
|
return out;
|
|
@@ -1539,7 +1539,7 @@ function motionFrameToSvg(scene, time, options = {}) {
|
|
|
1539
1539
|
const wrap = { ...options.wrap };
|
|
1540
1540
|
for (const [id, clips] of Object.entries(frame.clips))
|
|
1541
1541
|
wrap[id] = [..._nullishCoalesce(wrap[id], () => ( [])), ...clips.map((clip, i) => ({ clip: { id: `${prefix}reveal-${id}-${i}`, shape: clip.shape, attrs: motionClipAttrs(clip) } }))];
|
|
1542
|
-
return withViewBox(
|
|
1542
|
+
return withViewBox(_chunkFODKPD44cjs.vectorDocumentToSvg.call(void 0, frame.document, { ...options, wrap }), frame.camera);
|
|
1543
1543
|
}
|
|
1544
1544
|
function withViewBox(svg, box) {
|
|
1545
1545
|
const f = (n) => String(Math.round(n * 1e3) / 1e3);
|
|
@@ -1722,8 +1722,8 @@ function visibleAt(timeline, id, time, node) {
|
|
|
1722
1722
|
if (Array.isArray(rect) && (rect[2] <= 1e-4 || rect[3] <= 1e-4)) return false;
|
|
1723
1723
|
const circle = clip("clipCircle");
|
|
1724
1724
|
if (Array.isArray(circle) && circle[2] <= 1e-4) return false;
|
|
1725
|
-
const hasFill = node.type === "path" ? !!node.fill && node.fill !== "none" :
|
|
1726
|
-
const drawn = num2("drawEnd", 1) > 0.01 && (node.type === "path" ||
|
|
1725
|
+
const hasFill = node.type === "path" ? !!node.fill && node.fill !== "none" : _chunkFODKPD44cjs.collectPathNodes.call(void 0, node).some((p) => p.fill && p.fill !== "none");
|
|
1726
|
+
const drawn = num2("drawEnd", 1) > 0.01 && (node.type === "path" || _chunkFODKPD44cjs.collectPathNodes.call(void 0, node).length === 0 || _chunkFODKPD44cjs.collectPathNodes.call(void 0, node).some((p) => {
|
|
1727
1727
|
const v = trackValue(timeline.tracks.get(motionTrackKey(p.id, "drawEnd")), time);
|
|
1728
1728
|
return typeof v !== "number" || v > 0.01;
|
|
1729
1729
|
}));
|
|
@@ -1809,7 +1809,7 @@ function checkMotionScene(scene) {
|
|
|
1809
1809
|
}
|
|
1810
1810
|
for (const id of targets) {
|
|
1811
1811
|
const node = nodes.get(id).node;
|
|
1812
|
-
const paths = node.type === "path" ? [node] :
|
|
1812
|
+
const paths = node.type === "path" ? [node] : _chunkFODKPD44cjs.collectPathNodes.call(void 0, node);
|
|
1813
1813
|
if (paths.some((p) => p[key] !== void 0 && p[key] !== null && typeof p[key] !== "string"))
|
|
1814
1814
|
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] }));
|
|
1815
1815
|
}
|
|
@@ -1822,7 +1822,7 @@ function checkMotionScene(scene) {
|
|
|
1822
1822
|
else
|
|
1823
1823
|
for (const id of targets) {
|
|
1824
1824
|
const node = nodes.get(id).node;
|
|
1825
|
-
const paths = node.type === "path" ? [node] :
|
|
1825
|
+
const paths = node.type === "path" ? [node] : _chunkFODKPD44cjs.collectPathNodes.call(void 0, node);
|
|
1826
1826
|
if (paths.some((p) => typeof p[key] !== "string"))
|
|
1827
1827
|
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] }));
|
|
1828
1828
|
}
|
|
@@ -2406,7 +2406,7 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2406
2406
|
raw: (t) => transformAt(t, true)
|
|
2407
2407
|
});
|
|
2408
2408
|
}
|
|
2409
|
-
const paths = node.type === "path" ? [node] :
|
|
2409
|
+
const paths = node.type === "path" ? [node] : _chunkFODKPD44cjs.collectPathNodes.call(void 0, node);
|
|
2410
2410
|
for (const path of paths) {
|
|
2411
2411
|
if (pathsSeen.has(path.id)) continue;
|
|
2412
2412
|
pathsSeen.add(path.id);
|
|
@@ -2428,7 +2428,7 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2428
2428
|
if (shapeSegments.length) {
|
|
2429
2429
|
if (node.type !== "path") notes.push(`"${id}" is a group: its morph or effect animation is not exported (Flair tweens one path's "d").`);
|
|
2430
2430
|
else {
|
|
2431
|
-
const inverse =
|
|
2431
|
+
const inverse = _chunkFODKPD44cjs.invertMatrix.call(void 0, _chunkFODKPD44cjs.nodeMatrix.call(void 0, node));
|
|
2432
2432
|
channels.push({
|
|
2433
2433
|
id,
|
|
2434
2434
|
kind: "attr",
|
|
@@ -2437,9 +2437,9 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2437
2437
|
exact: () => false,
|
|
2438
2438
|
value: (t) => {
|
|
2439
2439
|
const frame = motionFrameAt(scene, t, { draw: false, offsets: false });
|
|
2440
|
-
const now =
|
|
2440
|
+
const now = _chunkFODKPD44cjs.expandVectorAppearance.call(void 0, _optionalChain([indexMotionNodes, 'call', _108 => _108(frame.document.nodes), 'access', _109 => _109.get, 'call', _110 => _110(id), 'optionalAccess', _111 => _111.node]));
|
|
2441
2441
|
if (!now || now.type !== "path") return "";
|
|
2442
|
-
const bezier = _chunkXGD3FSNCcjs.transformBezierPath.call(void 0,
|
|
2442
|
+
const bezier = _chunkXGD3FSNCcjs.transformBezierPath.call(void 0, _chunkFODKPD44cjs.vectorPathWorldBezier.call(void 0, now, _chunkFODKPD44cjs.IDENTITY_MATRIX, { effects: false }), inverse);
|
|
2443
2443
|
return _chunkXGD3FSNCcjs.bezierPathToSvg.call(void 0, bezier, { precision: Math.min(precision, 2) });
|
|
2444
2444
|
}
|
|
2445
2445
|
});
|
|
@@ -2546,7 +2546,7 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2546
2546
|
}
|
|
2547
2547
|
if (scene.motionBlur) notes.push("Motion blur is drawn on the stage only; Flair plays the scene sharp.");
|
|
2548
2548
|
if (trigger && (_nullishCoalesce(scene.loop, () => ( "none"))) !== "none") notes.push(`The scene plays on ${trigger}, so its loop does not apply in Flair.`);
|
|
2549
|
-
let svg =
|
|
2549
|
+
let svg = _chunkFODKPD44cjs.vectorDocumentToSvg.call(void 0, { ...scene.artwork, nodes: _chunkFODKPD44cjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) }, { pretty: false, precision, wrap });
|
|
2550
2550
|
if (routes.length) svg = svg.replace(/^(<svg[^>]*>)/, `$1<defs>${routes.join("")}</defs>`);
|
|
2551
2551
|
let motion = { svg, animate };
|
|
2552
2552
|
if (_optionalChain([scene, 'access', _114 => _114.controls, 'optionalAccess', _115 => _115.length])) {
|
|
@@ -2630,14 +2630,14 @@ function easingOf(ease, fallback) {
|
|
|
2630
2630
|
return fallback;
|
|
2631
2631
|
}
|
|
2632
2632
|
function poseOf(value, entry) {
|
|
2633
|
-
const t =
|
|
2634
|
-
const o =
|
|
2633
|
+
const t = _chunkFODKPD44cjs.parseSvgTransform.call(void 0, String(value));
|
|
2634
|
+
const o = _chunkFODKPD44cjs.multiplyMatrices.call(void 0, _nullishCoalesce(_chunkFODKPD44cjs.invertMatrix.call(void 0, _chunkFODKPD44cjs.nodeMatrix.call(void 0, entry.node)), () => ( [1, 0, 0, 1, 0, 0])), t);
|
|
2635
2635
|
const sx = Math.hypot(o[0], o[1]);
|
|
2636
2636
|
if (!(sx > 1e-9)) return null;
|
|
2637
2637
|
const sy = (o[0] * o[3] - o[1] * o[2]) / sx;
|
|
2638
2638
|
if (Math.abs(o[2] + o[1] / sx * sy) > 1e-6 || Math.abs(o[3] - o[0] / sx * sy) > 1e-6) return null;
|
|
2639
2639
|
const c = entry.center;
|
|
2640
|
-
const moved =
|
|
2640
|
+
const moved = _chunkFODKPD44cjs.applyMatrix.call(void 0, o, c);
|
|
2641
2641
|
return { dx: moved.x - c.x, dy: moved.y - c.y, rotation: Math.atan2(o[1], o[0]) * 180 / Math.PI, sx, sy };
|
|
2642
2642
|
}
|
|
2643
2643
|
var near = (a, b, eps = 1e-6) => Math.abs(a - b) < eps;
|
|
@@ -2722,7 +2722,7 @@ function fromFlairSvgMotion(input, options = {}) {
|
|
|
2722
2722
|
const notes = [];
|
|
2723
2723
|
if (!input || typeof input.svg !== "string") throw new Error('Give a Flair SvgMotion: { svg: "<svg \u2026>", animate: [ \u2026 ] }.');
|
|
2724
2724
|
const { motion, controls } = resolvePlaceholders(input, notes);
|
|
2725
|
-
const artwork =
|
|
2725
|
+
const artwork = _chunkFODKPD44cjs.parseVectorSvg.call(void 0, motion.svg);
|
|
2726
2726
|
const nodes = indexMotionNodes(artwork.nodes);
|
|
2727
2727
|
const byStep = /* @__PURE__ */ new Map();
|
|
2728
2728
|
for (const anim of _nullishCoalesce(motion.animate, () => ( []))) {
|
|
@@ -2969,9 +2969,9 @@ function toLottie(scene, options = {}) {
|
|
|
2969
2969
|
const items = [];
|
|
2970
2970
|
const shapeSegments = [...timeline.tracks.entries()].filter(([k]) => k.startsWith(`${path.id}\0`) && (k.endsWith("\0shape") || k.includes("\0effect:"))).flatMap(([, v]) => v);
|
|
2971
2971
|
const geometryAt = (t) => {
|
|
2972
|
-
if (!shapeSegments.length) return
|
|
2972
|
+
if (!shapeSegments.length) return _chunkFODKPD44cjs.vectorPathWorldBezier.call(void 0, path);
|
|
2973
2973
|
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]);
|
|
2974
|
-
return now && now.type === "path" ?
|
|
2974
|
+
return now && now.type === "path" ? _chunkFODKPD44cjs.vectorPathWorldBezier.call(void 0, _chunkFODKPD44cjs.expandVectorAppearances.call(void 0, [now])[0]) : _chunkFODKPD44cjs.vectorPathWorldBezier.call(void 0, path);
|
|
2975
2975
|
};
|
|
2976
2976
|
const rest = lottieContours(_chunkXGD3FSNCcjs.toBezierPath.call(void 0, geometryAt(0)), round2);
|
|
2977
2977
|
rest.forEach((contour, n) => {
|
|
@@ -3044,13 +3044,13 @@ function toLottie(scene, options = {}) {
|
|
|
3044
3044
|
const innerTr = STATIC_TR();
|
|
3045
3045
|
if (node.type === "path") inner = [...pathShapes(node)];
|
|
3046
3046
|
else if (node.type === "text" || node.type === "instance") {
|
|
3047
|
-
const drawn =
|
|
3047
|
+
const drawn = _chunkFODKPD44cjs.expandVectorAppearance.call(void 0, node);
|
|
3048
3048
|
inner = drawn.type === "path" ? [...pathShapes(drawn)] : drawn.children.filter((c) => c.type === "path").reverse().flatMap((c) => [...pathShapes(c)]);
|
|
3049
|
-
notes.push(`"${node.id}": text is exported as its outlines${
|
|
3049
|
+
notes.push(`"${node.id}": text is exported as its outlines${_chunkFODKPD44cjs.vectorTextHasOutlines.call(void 0, ) ? "" : " (glyph boxes: set an outline text shaper for real glyphs)"}.`);
|
|
3050
3050
|
} else {
|
|
3051
3051
|
inner = shown(node.children).reverse().map(nodeGroup);
|
|
3052
|
-
const m =
|
|
3053
|
-
if (m !==
|
|
3052
|
+
const m = _chunkFODKPD44cjs.nodeMatrix.call(void 0, node);
|
|
3053
|
+
if (m !== _chunkFODKPD44cjs.IDENTITY_MATRIX) {
|
|
3054
3054
|
const parts = staticParts(m);
|
|
3055
3055
|
if (!parts) notes.push(`"${node.id}": its transform skews, which is not exported; it is drawn without the skew.`);
|
|
3056
3056
|
else {
|
|
@@ -3063,7 +3063,7 @@ function toLottie(scene, options = {}) {
|
|
|
3063
3063
|
const body = { ty: "gr", nm: `${node.id} (own)`, it: [...inner, innerTr] };
|
|
3064
3064
|
return { ty: "gr", nm: _nullishCoalesce(node.name, () => ( node.id)), it: [body, poseTransform(entry)] };
|
|
3065
3065
|
};
|
|
3066
|
-
const artwork = { ...scene.artwork, nodes:
|
|
3066
|
+
const artwork = { ...scene.artwork, nodes: _chunkFODKPD44cjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) };
|
|
3067
3067
|
const content = shown(artwork.nodes).reverse().map(nodeGroup);
|
|
3068
3068
|
if (artwork.background && rgba(artwork.background))
|
|
3069
3069
|
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()] });
|
|
@@ -3162,11 +3162,11 @@ function preset(prst, w, h) {
|
|
|
3162
3162
|
const poly = (pts) => [{ closed: true, anchors: pts.map(([x, y]) => ({ x, y })) }];
|
|
3163
3163
|
switch (prst) {
|
|
3164
3164
|
case "rect":
|
|
3165
|
-
return [
|
|
3165
|
+
return [_chunkFODKPD44cjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
|
|
3166
3166
|
case "roundRect":
|
|
3167
|
-
return [
|
|
3167
|
+
return [_chunkFODKPD44cjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h }, Math.min(w, h) * 0.16667)];
|
|
3168
3168
|
case "ellipse":
|
|
3169
|
-
return [
|
|
3169
|
+
return [_chunkFODKPD44cjs.ellipseSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
|
|
3170
3170
|
case "triangle":
|
|
3171
3171
|
return poly([[w / 2, 0], [w, h], [0, h]]);
|
|
3172
3172
|
case "rtTriangle":
|
|
@@ -3274,7 +3274,7 @@ function shapes(ctx, tree, map) {
|
|
|
3274
3274
|
let subpaths = cust ? custom(cust, w, h) : prst ? preset(prst, w, h) : null;
|
|
3275
3275
|
if (!subpaths) {
|
|
3276
3276
|
if (prst) ctx.notes.push(`"${name}" is a ${prst}, drawn as its bounding rectangle.`);
|
|
3277
|
-
subpaths = [
|
|
3277
|
+
subpaths = [_chunkFODKPD44cjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
|
|
3278
3278
|
}
|
|
3279
3279
|
const style = kid(el, "style");
|
|
3280
3280
|
const fill = kid(spPr, "noFill") ? null : _nullishCoalesce(colour(ctx, kid(spPr, "solidFill")), () => ( (el.localName === "cxnSp" ? null : colour(ctx, kid(style, "fillRef")))));
|
|
@@ -4259,7 +4259,7 @@ function createAnimationEditorToolProvider(controller, options = {}) {
|
|
|
4259
4259
|
handler: ({ svg }) => {
|
|
4260
4260
|
let artwork;
|
|
4261
4261
|
try {
|
|
4262
|
-
artwork =
|
|
4262
|
+
artwork = _chunkFODKPD44cjs.parseVectorSvg.call(void 0, svg);
|
|
4263
4263
|
} catch (error) {
|
|
4264
4264
|
throw new Error(`The SVG could not be read: ${error.message}. Nothing was changed.`);
|
|
4265
4265
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { b as AnimationEasing } from '../easing-lM0Xo9Ni.cjs';
|
|
2
2
|
import { b as AnimationLoopMode, c as AnimationPlayer, C as Clock } from '../player-DrcP2xqj.cjs';
|
|
3
|
-
import { x as VectorDocument, e as VectorNode, h as VectorBounds } from '../types-
|
|
3
|
+
import { x as VectorDocument, e as VectorNode, h as VectorBounds } from '../types-Tfly4Aya.cjs';
|
|
4
4
|
import { a as MotionBehavior } from '../behavior-Ymbld6jL.cjs';
|
|
5
5
|
import { A as AffineMatrix, B as BezierPath } from '../bezier-BfwIbVTl.cjs';
|
|
6
|
-
import { V as VectorSvgExportOptions } from '../svg-
|
|
6
|
+
import { V as VectorSvgExportOptions } from '../svg-CVdFc80-.cjs';
|
|
7
7
|
import { Z as ZipReadOptions } from '../zip-4nG0YAH7.cjs';
|
|
8
8
|
import { H as HistoryManager } from '../HistoryManager-DeQQMBCj.cjs';
|
|
9
9
|
import { a as AgentToolProvider } from '../registry-BqA1AZt0.cjs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { b as AnimationEasing } from '../easing-lM0Xo9Ni.js';
|
|
2
2
|
import { b as AnimationLoopMode, c as AnimationPlayer, C as Clock } from '../player-DV4Jujdq.js';
|
|
3
|
-
import { x as VectorDocument, e as VectorNode, h as VectorBounds } from '../types-
|
|
3
|
+
import { x as VectorDocument, e as VectorNode, h as VectorBounds } from '../types-CDLGhAZp.js';
|
|
4
4
|
import { a as MotionBehavior } from '../behavior-Ymbld6jL.js';
|
|
5
5
|
import { A as AffineMatrix, B as BezierPath } from '../bezier-DYBvLgUH.js';
|
|
6
|
-
import { V as VectorSvgExportOptions } from '../svg-
|
|
6
|
+
import { V as VectorSvgExportOptions } from '../svg-DlEuhwoX.js';
|
|
7
7
|
import { Z as ZipReadOptions } from '../zip-4nG0YAH7.js';
|
|
8
8
|
import { H as HistoryManager } from '../HistoryManager-DWSLd6Tf.js';
|
|
9
9
|
import { a as AgentToolProvider } from '../registry-D-4fit9C.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createVectorMorph
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-T2P5TIZ6.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-7LNZAWSJ.js";
|
|
35
35
|
import {
|
|
36
36
|
bezierPathLength,
|
|
37
37
|
bezierPathPointAtLength,
|