@pixerate/editor 0.73.0 → 0.75.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 +3 -0
- package/dist/animation-editor/index.cjs +928 -399
- package/dist/animation-editor/index.cjs.map +1 -1
- package/dist/animation-editor/index.d.cts +130 -3
- package/dist/animation-editor/index.d.ts +130 -3
- package/dist/animation-editor/index.js +819 -290
- package/dist/animation-editor/index.js.map +1 -1
- package/dist/canvas/index.cjs +26 -26
- package/dist/canvas/index.js +2 -2
- package/dist/chart/index.cjs +11 -9
- package/dist/chart/index.cjs.map +1 -1
- package/dist/chart/index.js +5 -3
- package/dist/chart/index.js.map +1 -1
- package/dist/{chunk-3S72F46R.js → chunk-2GFUA4X5.js} +2 -322
- package/dist/chunk-2GFUA4X5.js.map +1 -0
- package/dist/chunk-33AHNSEB.js +323 -0
- package/dist/chunk-33AHNSEB.js.map +1 -0
- package/dist/{chunk-3TLL5OID.js → chunk-4JLB2USO.js} +2 -2
- package/dist/{chunk-NN3JGUSX.cjs → chunk-5PTR7HTL.cjs} +3 -323
- package/dist/chunk-5PTR7HTL.cjs.map +1 -0
- package/dist/{chunk-YJLCBA7V.cjs → chunk-7MD7C6XQ.cjs} +87 -87
- package/dist/{chunk-YJLCBA7V.cjs.map → chunk-7MD7C6XQ.cjs.map} +1 -1
- package/dist/{chunk-4YFMSPBU.js → chunk-EIXXBKUB.js} +6 -4
- package/dist/{chunk-4YFMSPBU.js.map → chunk-EIXXBKUB.js.map} +1 -1
- package/dist/chunk-EMQWJA3G.cjs +323 -0
- package/dist/chunk-EMQWJA3G.cjs.map +1 -0
- package/dist/{chunk-BQQZ6MOI.js → chunk-FGW5OWJ4.js} +6 -4
- package/dist/{chunk-BQQZ6MOI.js.map → chunk-FGW5OWJ4.js.map} +1 -1
- package/dist/{chunk-YZZMX6V7.cjs → chunk-FV5AXTSF.cjs} +11 -9
- package/dist/chunk-FV5AXTSF.cjs.map +1 -0
- package/dist/{chunk-MLREO6J3.cjs → chunk-JEYDXRWQ.cjs} +46 -46
- package/dist/{chunk-MLREO6J3.cjs.map → chunk-JEYDXRWQ.cjs.map} +1 -1
- package/dist/{chunk-7ZSU4MQZ.cjs → chunk-PL3MPFPA.cjs} +10 -8
- package/dist/chunk-PL3MPFPA.cjs.map +1 -0
- package/dist/{chunk-O2UH7LZE.cjs → chunk-XGD3FSNC.cjs} +239 -239
- package/dist/chunk-XGD3FSNC.cjs.map +1 -0
- package/dist/{chunk-VWZB6BCY.js → chunk-Y3NW4VJE.js} +2 -2
- package/dist/{chunk-GTMJ4Y3S.js → chunk-YCSFS3GK.js} +244 -244
- package/dist/{chunk-GTMJ4Y3S.js.map → chunk-YCSFS3GK.js.map} +1 -1
- package/dist/export/index.cjs +4 -3
- package/dist/export/index.cjs.map +1 -1
- package/dist/export/index.js +3 -2
- package/dist/extensions/index.cjs +4 -3
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.js +3 -2
- package/dist/index.cjs +19 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -11
- package/dist/index.js.map +1 -1
- package/dist/vector/index.cjs +532 -532
- package/dist/vector/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-3S72F46R.js.map +0 -1
- package/dist/chunk-7ZSU4MQZ.cjs.map +0 -1
- package/dist/chunk-NN3JGUSX.cjs.map +0 -1
- package/dist/chunk-O2UH7LZE.cjs.map +0 -1
- package/dist/chunk-YZZMX6V7.cjs.map +0 -1
- /package/dist/{chunk-3TLL5OID.js.map → chunk-4JLB2USO.js.map} +0 -0
- /package/dist/{chunk-VWZB6BCY.js.map → chunk-Y3NW4VJE.js.map} +0 -0
|
@@ -3,6 +3,7 @@ import { b as AnimationLoopMode, c as AnimationPlayer, C as Clock } from '../pla
|
|
|
3
3
|
import { V as VectorDocument, a as VectorNode, b as VectorBounds, c as VectorSvgExportOptions } from '../svg-ymShkNtu.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 { Z as ZipReadOptions } from '../zip-4nG0YAH7.cjs';
|
|
6
7
|
import { H as HistoryManager } from '../HistoryManager-DeQQMBCj.cjs';
|
|
7
8
|
import { A as AgentToolProvider } from '../registry-DIpIaCkH.cjs';
|
|
8
9
|
import { J as JsonSchema } from '../schema-Di0CS6Pe.cjs';
|
|
@@ -143,10 +144,23 @@ interface MotionShot {
|
|
|
143
144
|
*/
|
|
144
145
|
speed?: number;
|
|
145
146
|
}
|
|
147
|
+
/** How `split` splits outlined text. */
|
|
148
|
+
type MotionTextUnit = 'letter' | 'word' | 'line';
|
|
149
|
+
declare const MOTION_TEXT_UNITS: readonly MotionTextUnit[];
|
|
150
|
+
/** The order `split` units animate in. */
|
|
151
|
+
type MotionCascade = 'forward' | 'backward' | 'center' | 'edges' | 'random';
|
|
152
|
+
declare const MOTION_CASCADES: readonly MotionCascade[];
|
|
146
153
|
/** Fields every command takes. */
|
|
147
154
|
interface MotionCommandBase {
|
|
148
|
-
/** Node ids from the artwork (groups animate as one). */
|
|
155
|
+
/** Node ids from the artwork (groups animate as one, unless `split` splits their text). */
|
|
149
156
|
targets: string[];
|
|
157
|
+
/**
|
|
158
|
+
* For outlined text (a group of letter paths): animate it a letter, word or line at a time,
|
|
159
|
+
* staggered in reading order (default stagger 40 ms a letter, 120 a word, 300 a line).
|
|
160
|
+
*/
|
|
161
|
+
split?: MotionTextUnit;
|
|
162
|
+
/** With `split`: the order units go in (default `forward`). `random` is the same every time. */
|
|
163
|
+
cascade?: MotionCascade;
|
|
150
164
|
/** Length in ms for each target, one cycle when repeating (each type has a default; `draw` follows the path length; a spring `ease` lasts until it settles). */
|
|
151
165
|
duration?: number;
|
|
152
166
|
/** Wait this many ms before starting (default 0). */
|
|
@@ -585,6 +599,10 @@ declare const MOTION_ISSUE_CODES: {
|
|
|
585
599
|
readonly severity: "error";
|
|
586
600
|
readonly wording: "Drivers follow each other in a loop, so none of them has a value.";
|
|
587
601
|
};
|
|
602
|
+
readonly 'split-not-text': {
|
|
603
|
+
readonly severity: "warning";
|
|
604
|
+
readonly wording: "A command splits a target into letters, but it is not a group of letter paths, so it animates as a whole.";
|
|
605
|
+
};
|
|
588
606
|
readonly 'unknown-clip': {
|
|
589
607
|
readonly severity: "error";
|
|
590
608
|
readonly wording: "A play command names a clip the scene does not have.";
|
|
@@ -1016,6 +1034,44 @@ declare function smoothMotionTimes(points: readonly {
|
|
|
1016
1034
|
y: number;
|
|
1017
1035
|
}[], start: number, duration: number, pacing?: 'even' | 'equal'): number[];
|
|
1018
1036
|
|
|
1037
|
+
/** Outlined text (a group of letter paths) read as lines of words of letters, in reading order. */
|
|
1038
|
+
interface MotionTextLayout {
|
|
1039
|
+
lines: {
|
|
1040
|
+
words: {
|
|
1041
|
+
letters: string[];
|
|
1042
|
+
}[];
|
|
1043
|
+
}[];
|
|
1044
|
+
}
|
|
1045
|
+
/**
|
|
1046
|
+
* Reads a group of letter paths (text converted to outlines) as text: letters sorted into lines
|
|
1047
|
+
* by their vertical overlap, left to right in each line, and into words where the gap between
|
|
1048
|
+
* two letters is wider than about a third of the line's letter height. Null when `id` is not a
|
|
1049
|
+
* group with paths.
|
|
1050
|
+
*/
|
|
1051
|
+
declare function motionTextLayout(nodes: ReadonlyMap<string, MotionNodeEntry>, id: string): MotionTextLayout | null;
|
|
1052
|
+
/** A layout's units (each a list of letter ids), by letter, word or line. */
|
|
1053
|
+
declare function motionTextUnits(layout: MotionTextLayout, by: MotionTextUnit): string[][];
|
|
1054
|
+
/** Units in cascade order: forward, backward, from the centre out, from the edges in, or a seeded shuffle. */
|
|
1055
|
+
declare function motionCascade<T>(units: readonly T[], cascade?: MotionCascade, seed?: number): T[];
|
|
1056
|
+
/** Default stagger (ms) between units. */
|
|
1057
|
+
declare const MOTION_TEXT_STAGGER: Readonly<Record<MotionTextUnit, number>>;
|
|
1058
|
+
/**
|
|
1059
|
+
* What a command animates, each with its stagger slot: its targets in order, or (with `split`) the
|
|
1060
|
+
* letters of each target's text, a slot per letter, word or line in cascade order.
|
|
1061
|
+
*/
|
|
1062
|
+
declare function motionCommandSlots(nodes: ReadonlyMap<string, MotionNodeEntry>, command: {
|
|
1063
|
+
targets: readonly string[];
|
|
1064
|
+
split?: MotionTextUnit;
|
|
1065
|
+
cascade?: MotionCascade;
|
|
1066
|
+
stagger?: number;
|
|
1067
|
+
}): {
|
|
1068
|
+
slots: {
|
|
1069
|
+
id: string;
|
|
1070
|
+
slot: number;
|
|
1071
|
+
}[];
|
|
1072
|
+
stagger: number;
|
|
1073
|
+
};
|
|
1074
|
+
|
|
1019
1075
|
/**
|
|
1020
1076
|
* A reveal clip (`wipe`, `iris`, `split`) in the units of the node's own box: 0–1 across it,
|
|
1021
1077
|
* as SVG's `clipPathUnits="objectBoundingBox"` and Flair's clip reveals are.
|
|
@@ -1627,6 +1683,39 @@ interface LottieExport {
|
|
|
1627
1683
|
/** A scene as a Lottie animation. */
|
|
1628
1684
|
declare function toLottie(scene: MotionScene, options?: LottieExportOptions): LottieExport;
|
|
1629
1685
|
|
|
1686
|
+
/**
|
|
1687
|
+
* Import a PowerPoint slide's animation: the slide's shapes become the artwork and its animation
|
|
1688
|
+
* pane (`p:timing`) becomes shots, a shot per click, so a slide built in PowerPoint can be opened,
|
|
1689
|
+
* edited and exported here.
|
|
1690
|
+
*
|
|
1691
|
+
* - Shapes: rectangles, rounded rectangles, ellipses, triangles, diamonds, lines and custom
|
|
1692
|
+
* geometry with their position, size, rotation, flips, solid fill and outline (theme colours
|
|
1693
|
+
* read from the theme). Groups keep their children. Text, pictures, charts and tables are left
|
|
1694
|
+
* out with a note (the artwork has no text).
|
|
1695
|
+
* - Animation: entrance, exit and emphasis effects map to the editor's commands (fly in → slide,
|
|
1696
|
+
* wipe → wipe, zoom → zoom, pulse → pulse, spin → rotate…), motion paths to a follow along a
|
|
1697
|
+
* hidden path. "On click" starts a shot, "with previous" and "after previous" keep their timing,
|
|
1698
|
+
* delays, repeats, auto-reverse and acceleration carry over. Effects with no match fade, noted.
|
|
1699
|
+
*/
|
|
1700
|
+
interface PptxAnimationImportOptions extends ZipReadOptions {
|
|
1701
|
+
/** Which slide (1 = first, default 1). */
|
|
1702
|
+
slide?: number;
|
|
1703
|
+
/** `DOMParser` constructor (default: the global one; pass jsdom's or xmldom's in Node). */
|
|
1704
|
+
DOMParser?: {
|
|
1705
|
+
new (): DOMParser;
|
|
1706
|
+
};
|
|
1707
|
+
}
|
|
1708
|
+
interface PptxAnimationImport {
|
|
1709
|
+
scene: MotionScene;
|
|
1710
|
+
/** What could not be carried over, in sentences. */
|
|
1711
|
+
notes: string[];
|
|
1712
|
+
issues: MotionIssue[];
|
|
1713
|
+
/** How many slides the file has. */
|
|
1714
|
+
slides: number;
|
|
1715
|
+
}
|
|
1716
|
+
/** A PowerPoint slide's shapes and animation as a scene (see the module notes). */
|
|
1717
|
+
declare function fromPptxAnimation(data: ArrayBuffer | ArrayBufferView, options?: PptxAnimationImportOptions): Promise<PptxAnimationImport>;
|
|
1718
|
+
|
|
1630
1719
|
interface AnimationEditorOptions {
|
|
1631
1720
|
/** The scene to open (default: an empty one over a blank 800 × 450 artwork). */
|
|
1632
1721
|
scene?: MotionScene;
|
|
@@ -1804,6 +1893,8 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1804
1893
|
shape?: MotionIrisShape;
|
|
1805
1894
|
orientation?: MotionSplitOrientation;
|
|
1806
1895
|
targets: string[];
|
|
1896
|
+
split?: MotionTextUnit;
|
|
1897
|
+
cascade?: MotionCascade;
|
|
1807
1898
|
duration?: number;
|
|
1808
1899
|
delay?: number;
|
|
1809
1900
|
stagger?: number;
|
|
@@ -1831,6 +1922,8 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1831
1922
|
direction?: MotionDirection;
|
|
1832
1923
|
distance?: number;
|
|
1833
1924
|
targets: string[];
|
|
1925
|
+
split?: MotionTextUnit;
|
|
1926
|
+
cascade?: MotionCascade;
|
|
1834
1927
|
duration?: number;
|
|
1835
1928
|
delay?: number;
|
|
1836
1929
|
stagger?: number;
|
|
@@ -1858,6 +1951,8 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1858
1951
|
to?: number;
|
|
1859
1952
|
from?: number;
|
|
1860
1953
|
targets: string[];
|
|
1954
|
+
split?: MotionTextUnit;
|
|
1955
|
+
cascade?: MotionCascade;
|
|
1861
1956
|
duration?: number;
|
|
1862
1957
|
delay?: number;
|
|
1863
1958
|
stagger?: number;
|
|
@@ -1896,6 +1991,8 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1896
1991
|
}[];
|
|
1897
1992
|
pacing?: "even" | "equal";
|
|
1898
1993
|
targets: string[];
|
|
1994
|
+
split?: MotionTextUnit;
|
|
1995
|
+
cascade?: MotionCascade;
|
|
1899
1996
|
duration?: number;
|
|
1900
1997
|
delay?: number;
|
|
1901
1998
|
stagger?: number;
|
|
@@ -1915,6 +2012,8 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1915
2012
|
by?: number;
|
|
1916
2013
|
to?: number;
|
|
1917
2014
|
targets: string[];
|
|
2015
|
+
split?: MotionTextUnit;
|
|
2016
|
+
cascade?: MotionCascade;
|
|
1918
2017
|
duration?: number;
|
|
1919
2018
|
delay?: number;
|
|
1920
2019
|
stagger?: number;
|
|
@@ -1937,6 +2036,8 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1937
2036
|
};
|
|
1938
2037
|
geometric?: boolean;
|
|
1939
2038
|
targets: string[];
|
|
2039
|
+
split?: MotionTextUnit;
|
|
2040
|
+
cascade?: MotionCascade;
|
|
1940
2041
|
duration?: number;
|
|
1941
2042
|
delay?: number;
|
|
1942
2043
|
stagger?: number;
|
|
@@ -1954,6 +2055,8 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1954
2055
|
type: "fade";
|
|
1955
2056
|
to: number;
|
|
1956
2057
|
targets: string[];
|
|
2058
|
+
split?: MotionTextUnit;
|
|
2059
|
+
cascade?: MotionCascade;
|
|
1957
2060
|
duration?: number;
|
|
1958
2061
|
delay?: number;
|
|
1959
2062
|
stagger?: number;
|
|
@@ -1973,6 +2076,8 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1973
2076
|
stroke?: string;
|
|
1974
2077
|
strokeWidth?: number;
|
|
1975
2078
|
targets: string[];
|
|
2079
|
+
split?: MotionTextUnit;
|
|
2080
|
+
cascade?: MotionCascade;
|
|
1976
2081
|
duration?: number;
|
|
1977
2082
|
delay?: number;
|
|
1978
2083
|
stagger?: number;
|
|
@@ -1990,6 +2095,8 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1990
2095
|
type: "morph";
|
|
1991
2096
|
into: string;
|
|
1992
2097
|
targets: string[];
|
|
2098
|
+
split?: MotionTextUnit;
|
|
2099
|
+
cascade?: MotionCascade;
|
|
1993
2100
|
duration?: number;
|
|
1994
2101
|
delay?: number;
|
|
1995
2102
|
stagger?: number;
|
|
@@ -2007,6 +2114,8 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
2007
2114
|
type: "match";
|
|
2008
2115
|
into: string;
|
|
2009
2116
|
targets: string[];
|
|
2117
|
+
split?: MotionTextUnit;
|
|
2118
|
+
cascade?: MotionCascade;
|
|
2010
2119
|
duration?: number;
|
|
2011
2120
|
delay?: number;
|
|
2012
2121
|
stagger?: number;
|
|
@@ -2025,6 +2134,8 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
2025
2134
|
clip: string;
|
|
2026
2135
|
speed?: number;
|
|
2027
2136
|
targets: string[];
|
|
2137
|
+
split?: MotionTextUnit;
|
|
2138
|
+
cascade?: MotionCascade;
|
|
2028
2139
|
duration?: number;
|
|
2029
2140
|
delay?: number;
|
|
2030
2141
|
stagger?: number;
|
|
@@ -2045,6 +2156,8 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
2045
2156
|
from?: number;
|
|
2046
2157
|
to?: number;
|
|
2047
2158
|
targets: string[];
|
|
2159
|
+
split?: MotionTextUnit;
|
|
2160
|
+
cascade?: MotionCascade;
|
|
2048
2161
|
duration?: number;
|
|
2049
2162
|
delay?: number;
|
|
2050
2163
|
stagger?: number;
|
|
@@ -2064,6 +2177,8 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
2064
2177
|
amount?: number;
|
|
2065
2178
|
count?: number;
|
|
2066
2179
|
targets: string[];
|
|
2180
|
+
split?: MotionTextUnit;
|
|
2181
|
+
cascade?: MotionCascade;
|
|
2067
2182
|
duration?: number;
|
|
2068
2183
|
delay?: number;
|
|
2069
2184
|
stagger?: number;
|
|
@@ -2084,6 +2199,8 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
2084
2199
|
count?: number;
|
|
2085
2200
|
axis?: "horizontal" | "vertical";
|
|
2086
2201
|
targets: string[];
|
|
2202
|
+
split?: MotionTextUnit;
|
|
2203
|
+
cascade?: MotionCascade;
|
|
2087
2204
|
duration?: number;
|
|
2088
2205
|
delay?: number;
|
|
2089
2206
|
stagger?: number;
|
|
@@ -2103,6 +2220,8 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
2103
2220
|
angle?: number;
|
|
2104
2221
|
count?: number;
|
|
2105
2222
|
targets: string[];
|
|
2223
|
+
split?: MotionTextUnit;
|
|
2224
|
+
cascade?: MotionCascade;
|
|
2106
2225
|
duration?: number;
|
|
2107
2226
|
delay?: number;
|
|
2108
2227
|
stagger?: number;
|
|
@@ -2122,6 +2241,8 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
2122
2241
|
amount?: number;
|
|
2123
2242
|
count?: number;
|
|
2124
2243
|
targets: string[];
|
|
2244
|
+
split?: MotionTextUnit;
|
|
2245
|
+
cascade?: MotionCascade;
|
|
2125
2246
|
duration?: number;
|
|
2126
2247
|
delay?: number;
|
|
2127
2248
|
stagger?: number;
|
|
@@ -2144,6 +2265,8 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
2144
2265
|
rotate?: number;
|
|
2145
2266
|
seed?: number;
|
|
2146
2267
|
targets: string[];
|
|
2268
|
+
split?: MotionTextUnit;
|
|
2269
|
+
cascade?: MotionCascade;
|
|
2147
2270
|
duration?: number;
|
|
2148
2271
|
delay?: number;
|
|
2149
2272
|
stagger?: number;
|
|
@@ -2163,6 +2286,8 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
2163
2286
|
paint?: "fill" | "stroke";
|
|
2164
2287
|
count?: number;
|
|
2165
2288
|
targets: string[];
|
|
2289
|
+
split?: MotionTextUnit;
|
|
2290
|
+
cascade?: MotionCascade;
|
|
2166
2291
|
duration?: number;
|
|
2167
2292
|
delay?: number;
|
|
2168
2293
|
stagger?: number;
|
|
@@ -2182,6 +2307,8 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
2182
2307
|
param: string;
|
|
2183
2308
|
to: number;
|
|
2184
2309
|
targets: string[];
|
|
2310
|
+
split?: MotionTextUnit;
|
|
2311
|
+
cascade?: MotionCascade;
|
|
2185
2312
|
duration?: number;
|
|
2186
2313
|
delay?: number;
|
|
2187
2314
|
stagger?: number;
|
|
@@ -2224,7 +2351,7 @@ declare function createAnimationEditorToolProvider(controller: AnimationEditorCo
|
|
|
2224
2351
|
* A short authoring guide for a model writing vector animations with the animation editor's
|
|
2225
2352
|
* tools. Static, so it caches well as part of a system prompt.
|
|
2226
2353
|
*/
|
|
2227
|
-
declare const ANIMATION_EDITOR_AGENT_INSTRUCTIONS = "You animate vector artwork. A scene is artwork (vector paths and groups, each with an id) plus shots.\n\nHow it plays\n- Shots play in order. A shot optionally moves the camera, plays its commands, then holds (default 600 ms).\n- Commands in a shot play one after another; give \"with\": \"previous\" to start one together with the command before, \"delay\" to wait, \"stagger\" to offset several targets.\n- Timing comes from the content: each command has a default length (enter 600 ms, move 700 ms, draw follows the path length). Only set \"duration\" to change the pace.\n- Anything that enters later is hidden until it enters. Things that never enter are visible from the start.\n- Every frame is a pure function of time: the same scene always plays the same frames.\n\nCommands\n- enter (fade, pop, grow, slide, draw) and exit (fade, shrink, slide, undraw) bring things in and out.\n- enter also reveals through a clip over the target's box: wipe (behind an edge travelling \"direction\", default right), iris (from the centre; \"shape\": circle or box) and split (from a line through the middle; \"orientation\": horizontal or vertical). exit wipe hides the same way. Reveals need a width and a height: use draw / undraw for a straight line.\n- draw draws strokes on to a fraction; move, rotate, scale and fade change the pose (about the centre); style blends solid colours and stroke width.\n- Drawing a group of strokes: \"order\": \"sequence\" draws them one after another (a signature, a diagram), \"sortBy\": \"distance\" from \"origin\" reveals outward, \"pace\": \"speed\" keeps one speed; draw with \"comet\": 0.2 sends a short stroke along a path and off the end.\n- Fast motion reads better with blur: set_animation_settings { \"motionBlur\": { \"shutter\": 180 } } (stage and rendered frames only).\n- Tie properties together with set_animation_drivers: parallax layers, a wheel that turns as it rolls, a shadow that fades as something rises. Drivers add to the target's own commands.\n- Reuse motion: set_animation_clip defines a clip (commands targeting \"$\"), and { \"type\": \"play\", \"clip\": name, \"targets\": [...] } plays it on any nodes (with stagger and speed). copy_animation gives other nodes one node's motion.\n- move takes \"via\" waypoints for a curved, smooth path that passes exactly through each point (steady speed by default); use it instead of chaining moves, which stop at each point.\n- enter also has zoom (settles from larger) and rise (rises a short way, overshooting a touch); pop and zoom take a starting \"scale\".\n- morph turns a shape into another node's shape (keep the target hidden); match does the same for a whole group, part by part (Smart Animate: draw the end state as a second, hidden group whose parts share names with the first); follow moves along a path node (with \"rotate\", moves made meanwhile turn with the path).\n- Emphasis draws the eye and returns to rest: pulse (swell), shake (side to side, or \"axis\": \"vertical\"), teeter (rock), wave (bob, no settling), wiggle (seeded wander; the same seed wanders the same way) and color-pulse (tint and back).\n- Emphasis stacks on other motion: a shake during a slide shakes as it slides. Give move, rotate or scale \"blend\": \"add\" to stack them too (what they add stays); \"blend\": \"replace\" makes a change take over instead.\n- Any command but enter and exit can \"repeat\" (loop, mirror back and forth, or offset to carry on: rotate by 90, repeat 4 is a full turn); \"duration\" is one cycle.\n- Springs (\"spring-gentle\", \"spring-quick\", \"spring-bouncy\", \"spring-slow\" or { \"type\": \"spring\", \u2026 }) feel physical; leave \"duration\" out and the spring sets it.\n- To time shots to music or a voiceover: set a \"beat\" grid or \"narration\" word timings with set_animation_settings, read them with get_timing_grid, and give a shot \"at\": { \"beat\": n } or { \"word\": i }. The shot before holds until the cue; check_animation warns when a cue is missed.\n- \"steps\": 12 (on a command, or for the whole scene with set_animation_settings) holds poses \"on twos\" for a hand-drawn look. \"geometric\": true on scale or a camera zooms at an even rate.\n- Commands share their names and defaults with Flair's motion primitives (get_animation shows each one's \"flairPrimitive\"), and emphasis, reveals and follows export to Flair exactly.\n- effect tweens a numeric parameter of a live path effect already on the node (twist angle, wiggle time, zig zag size).\n\nWorking method\n1. get_animation to learn the element ids (set_animation_artwork_svg first if there is no artwork: give every element you will animate an id; or import_flair_effect to start from a Flair effect
|
|
2354
|
+
declare const ANIMATION_EDITOR_AGENT_INSTRUCTIONS = "You animate vector artwork. A scene is artwork (vector paths and groups, each with an id) plus shots.\n\nHow it plays\n- Shots play in order. A shot optionally moves the camera, plays its commands, then holds (default 600 ms).\n- Commands in a shot play one after another; give \"with\": \"previous\" to start one together with the command before, \"delay\" to wait, \"stagger\" to offset several targets.\n- Timing comes from the content: each command has a default length (enter 600 ms, move 700 ms, draw follows the path length). Only set \"duration\" to change the pace.\n- Anything that enters later is hidden until it enters. Things that never enter are visible from the start.\n- Every frame is a pure function of time: the same scene always plays the same frames.\n\nCommands\n- enter (fade, pop, grow, slide, draw) and exit (fade, shrink, slide, undraw) bring things in and out.\n- enter also reveals through a clip over the target's box: wipe (behind an edge travelling \"direction\", default right), iris (from the centre; \"shape\": circle or box) and split (from a line through the middle; \"orientation\": horizontal or vertical). exit wipe hides the same way. Reveals need a width and a height: use draw / undraw for a straight line.\n- draw draws strokes on to a fraction; move, rotate, scale and fade change the pose (about the centre); style blends solid colours and stroke width.\n- Text: convert it to outlines (a group with a path per letter) and give a command \"split\": \"letter\", \"word\" or \"line\" (and \"cascade\") to animate it a unit at a time; get_text_layout shows the units.\n- Drawing a group of strokes: \"order\": \"sequence\" draws them one after another (a signature, a diagram), \"sortBy\": \"distance\" from \"origin\" reveals outward, \"pace\": \"speed\" keeps one speed; draw with \"comet\": 0.2 sends a short stroke along a path and off the end.\n- Fast motion reads better with blur: set_animation_settings { \"motionBlur\": { \"shutter\": 180 } } (stage and rendered frames only).\n- Tie properties together with set_animation_drivers: parallax layers, a wheel that turns as it rolls, a shadow that fades as something rises. Drivers add to the target's own commands.\n- Reuse motion: set_animation_clip defines a clip (commands targeting \"$\"), and { \"type\": \"play\", \"clip\": name, \"targets\": [...] } plays it on any nodes (with stagger and speed). copy_animation gives other nodes one node's motion.\n- move takes \"via\" waypoints for a curved, smooth path that passes exactly through each point (steady speed by default); use it instead of chaining moves, which stop at each point.\n- enter also has zoom (settles from larger) and rise (rises a short way, overshooting a touch); pop and zoom take a starting \"scale\".\n- morph turns a shape into another node's shape (keep the target hidden); match does the same for a whole group, part by part (Smart Animate: draw the end state as a second, hidden group whose parts share names with the first); follow moves along a path node (with \"rotate\", moves made meanwhile turn with the path).\n- Emphasis draws the eye and returns to rest: pulse (swell), shake (side to side, or \"axis\": \"vertical\"), teeter (rock), wave (bob, no settling), wiggle (seeded wander; the same seed wanders the same way) and color-pulse (tint and back).\n- Emphasis stacks on other motion: a shake during a slide shakes as it slides. Give move, rotate or scale \"blend\": \"add\" to stack them too (what they add stays); \"blend\": \"replace\" makes a change take over instead.\n- Any command but enter and exit can \"repeat\" (loop, mirror back and forth, or offset to carry on: rotate by 90, repeat 4 is a full turn); \"duration\" is one cycle.\n- Springs (\"spring-gentle\", \"spring-quick\", \"spring-bouncy\", \"spring-slow\" or { \"type\": \"spring\", \u2026 }) feel physical; leave \"duration\" out and the spring sets it.\n- To time shots to music or a voiceover: set a \"beat\" grid or \"narration\" word timings with set_animation_settings, read them with get_timing_grid, and give a shot \"at\": { \"beat\": n } or { \"word\": i }. The shot before holds until the cue; check_animation warns when a cue is missed.\n- \"steps\": 12 (on a command, or for the whole scene with set_animation_settings) holds poses \"on twos\" for a hand-drawn look. \"geometric\": true on scale or a camera zooms at an even rate.\n- Commands share their names and defaults with Flair's motion primitives (get_animation shows each one's \"flairPrimitive\"), and emphasis, reveals and follows export to Flair exactly.\n- effect tweens a numeric parameter of a live path effect already on the node (twist angle, wiggle time, zig zag size).\n\nWorking method\n1. get_animation to learn the element ids (set_animation_artwork_svg first if there is no artwork: give every element you will animate an id; or import_flair_effect / import_pptx_animation to start from a Flair effect or a PowerPoint slide).\n2. Plan a few shots, each one idea. Add them with insert_shots (add_commands, update_command, move_command and delete_commands refine a shot), or edit_animation to make several edits as one step (dry_run first when unsure).\n- In edit_animation, a later op can use what an earlier one made: \"$0.indexes[0]\" (the first command op 1 added), \"$last.shot\".\n3. To hit a length, fit_animation (keep the shots whose pace matters). check_animation and fix every error and warning; render_animation_frame (shot + \"end\") to look at the result, or with \"times\" for a contact sheet of several moments; add onion_skin or motion_paths to see the motion in one picture, or get_motion_path for the numbers.\n- For something the viewer plays (a button, a toggle, a step-by-step explainer), set \"trigger\" with set_animation_settings: click plays the next shot on each click and then starts over (make the last shot put things back for a toggle), hover or press plays and rewinds, scroll scrubs.\n4. To make a reusable Flair effect, set_animation_controls (colour controls stand for every use of their default colour) and export_flair_effect.\n\nKeep motion purposeful: one thing moving at a time reads best, ease-out for arrivals, ease-in for exits, and hold long enough to see each result.";
|
|
2228
2355
|
|
|
2229
2356
|
/**
|
|
2230
2357
|
* Helpers for hand-editing UIs (React's and Svelte's command inspector, ease picker, cue picker,
|
|
@@ -2379,4 +2506,4 @@ declare function parseMotionDrivers(text: string): {
|
|
|
2379
2506
|
error: string;
|
|
2380
2507
|
};
|
|
2381
2508
|
|
|
2382
|
-
export { ANIMATION_EDITOR_AGENT_INSTRUCTIONS, AnimationEditorController, type AnimationEditorOptions, type AnimationEditorSelection, type AnimationEditorState, type AnimationEditorToolProviderOptions, FLAIR_EASES, FLAIR_EXPORT_VERSION, type FlairEase, type FlairEaseName, type FlairEffectDocument, type FlairEffectOptions, type FlairExportOptions, type FlairImportOptions, type FlairImportResult, type FlairMotionExport, type FlairSpringEase, type FlairSvgAnimation, type FlairSvgMotion, type FlairVectorEffect, type LottieAnimation, type LottieExport, type LottieExportOptions, type LottieKeyframe, type LottieShape, type LottieValue, MOTION_ADDITIVE_PROPERTIES, MOTION_BLENDS, MOTION_CAMERA_MS, MOTION_CLIP_TARGET, MOTION_COMMAND_SCHEMA, MOTION_COMMAND_TYPES, MOTION_DEFAULT_DURATIONS, MOTION_DEFAULT_HOLD, MOTION_DIRECTIONS, MOTION_DRAW_EFFECT_ID, MOTION_DRAW_MS_PER_UNIT, MOTION_DRAW_RANGE, MOTION_DRIVEN_PROPERTIES, MOTION_EASE_CHOICES, MOTION_EASE_IN_OUT, MOTION_EASE_OUT, MOTION_EDIT_OPS, MOTION_ENTER_STYLES, MOTION_EXIT_STYLES, MOTION_IRIS_SHAPES, MOTION_ISSUE_CODES, MOTION_MIN_CHANGE_MS, MOTION_REPEAT_MODES, MOTION_SPEED_RANGE, MOTION_SPLIT_ORIENTATIONS, MOTION_TRIGGERS, type MotionBeatGrid, type MotionBlur, type MotionCamera, type MotionClip, type MotionClipItem, type MotionClipShape, type MotionColorPulseCommand, type MotionCommand, type MotionCommandBase, type MotionCommandTiming, type MotionCommandType, type MotionContactSheetOptions, type MotionControl, type MotionCue, type MotionDirection, type MotionDrawCommand, type MotionDrawOrder, type MotionDrivenProperty, type MotionDriver, type MotionEasingCurve, type MotionEdit, type MotionEditOp, type MotionEditOutcome, type MotionEditResult, type MotionEffectCommand, type MotionEnterCommand, type MotionEnterStyle, type MotionExitCommand, type MotionExitStyle, type MotionFadeCommand, type MotionFieldInput, type MotionFieldKind, type MotionFieldSpec, type MotionFit, type MotionFitOptions, type MotionFollowCommand, type MotionFrame, type MotionFrameOptions, type MotionGhost, type MotionIrisShape, type MotionIssue, type MotionIssueCode, type MotionIssueSeverity, type MotionMatch, type MotionMatchCommand, type MotionMorphCommand, type MotionMoveCommand, type MotionNarration, type MotionNodeEntry, type MotionOnionSkin, type MotionOverlayOptions, type MotionPath, type MotionPathOptions, type MotionPlayCommand, type MotionPreset, type MotionProperty, type MotionPulseCommand, type MotionRect, type MotionReveal, type MotionRotateCommand, type MotionScaleCommand, type MotionScene, MotionSceneFormatError, type MotionSegment, type MotionShakeCommand, type MotionShot, type MotionShotTiming, type MotionSmoothLeg, type MotionSplitOrientation, type MotionStyleCommand, type MotionSvgOptions, type MotionTeeterCommand, type MotionTimeline, type MotionTrigger, type MotionValue, type MotionWaitCommand, type MotionWaveCommand, type MotionWiggleCommand, activeSegment, applyMotionControlValues, applyMotionDrivers, applyMotionEdits, checkMotionScene, clipsShapeProblems, commandShapeProblems, compileMotionScene, createAnimationEditorToolProvider, createMotionScene, defaultMotionCommand, describeMotionElements, describeMotionShots, driversShapeProblems, duplicateMotionCommandEdit, fitMotionRect, fitMotionScene, fitMotionSceneEdits, flairAtLeast, flairCurveFor, flairEaseFor, formatMotionDrivers, formatMotionNarration, freshShotId, fromFlairSvgMotion, fromFlairVectorEffect, highlightMotionSvg, indexMotionNodes, interpolateMotionValue, isMotionCommand, isMotionShot, matchMotionNodes, motionAddTrackKey, motionBeatAt, motionBeatTime, motionBlurTimes, motionClipAttrs, motionClipLayout, motionCommandDuration, motionCommandFields, motionCommandRepeat, motionCommandRows, motionCommandSummary, motionContactSheetSvg, motionCueChoices, motionCueFromKey, motionCueKey, motionCueTime, motionCycleDuration, motionDrivenNodes, motionDriverSources, motionEaseKey, motionEasingCurve, motionEasingGuides, motionEasingPath, motionFieldEdit, motionFieldLabel, motionFlairPrimitive, motionFollowRoute, motionFrameAt, motionFrameToSvg, motionGhosts, motionIssue, motionIssueKey, motionIssueLine, motionMovingIds, motionNodeAtElement, motionNodeClips, motionNodeOffset, motionPath, motionPathLength, motionPathsSvg, motionPropertyValue, motionRestValue, motionRevealClip, motionRevealPadding, motionRulerTicks, motionSceneShapeProblems, motionSceneToJson, motionShotAt, motionShotCueTime, motionShotTimeScale, motionStageSvg, motionTrackKey, namedWithSuggestion, parseMotionDrivers, parseMotionFieldInput, parseMotionNarration, parseMotionScene, resolveMotionCamera, resolveMotionEditRefs, segmentProgress, segmentValue, shotShapeProblems, smoothMotionLegs, smoothMotionTimes, suggestName, toFlairEffectDocument, toFlairSvgMotion, toFlairVectorEffect, toLottie, trackValue, withMotionLayers, withViewBox };
|
|
2509
|
+
export { ANIMATION_EDITOR_AGENT_INSTRUCTIONS, AnimationEditorController, type AnimationEditorOptions, type AnimationEditorSelection, type AnimationEditorState, type AnimationEditorToolProviderOptions, FLAIR_EASES, FLAIR_EXPORT_VERSION, type FlairEase, type FlairEaseName, type FlairEffectDocument, type FlairEffectOptions, type FlairExportOptions, type FlairImportOptions, type FlairImportResult, type FlairMotionExport, type FlairSpringEase, type FlairSvgAnimation, type FlairSvgMotion, type FlairVectorEffect, type LottieAnimation, type LottieExport, type LottieExportOptions, type LottieKeyframe, type LottieShape, type LottieValue, MOTION_ADDITIVE_PROPERTIES, MOTION_BLENDS, MOTION_CAMERA_MS, MOTION_CASCADES, MOTION_CLIP_TARGET, MOTION_COMMAND_SCHEMA, MOTION_COMMAND_TYPES, MOTION_DEFAULT_DURATIONS, MOTION_DEFAULT_HOLD, MOTION_DIRECTIONS, MOTION_DRAW_EFFECT_ID, MOTION_DRAW_MS_PER_UNIT, MOTION_DRAW_RANGE, MOTION_DRIVEN_PROPERTIES, MOTION_EASE_CHOICES, MOTION_EASE_IN_OUT, MOTION_EASE_OUT, MOTION_EDIT_OPS, MOTION_ENTER_STYLES, MOTION_EXIT_STYLES, MOTION_IRIS_SHAPES, MOTION_ISSUE_CODES, MOTION_MIN_CHANGE_MS, MOTION_REPEAT_MODES, MOTION_SPEED_RANGE, MOTION_SPLIT_ORIENTATIONS, MOTION_TEXT_STAGGER, MOTION_TEXT_UNITS, MOTION_TRIGGERS, type MotionBeatGrid, type MotionBlur, type MotionCamera, type MotionCascade, type MotionClip, type MotionClipItem, type MotionClipShape, type MotionColorPulseCommand, type MotionCommand, type MotionCommandBase, type MotionCommandTiming, type MotionCommandType, type MotionContactSheetOptions, type MotionControl, type MotionCue, type MotionDirection, type MotionDrawCommand, type MotionDrawOrder, type MotionDrivenProperty, type MotionDriver, type MotionEasingCurve, type MotionEdit, type MotionEditOp, type MotionEditOutcome, type MotionEditResult, type MotionEffectCommand, type MotionEnterCommand, type MotionEnterStyle, type MotionExitCommand, type MotionExitStyle, type MotionFadeCommand, type MotionFieldInput, type MotionFieldKind, type MotionFieldSpec, type MotionFit, type MotionFitOptions, type MotionFollowCommand, type MotionFrame, type MotionFrameOptions, type MotionGhost, type MotionIrisShape, type MotionIssue, type MotionIssueCode, type MotionIssueSeverity, type MotionMatch, type MotionMatchCommand, type MotionMorphCommand, type MotionMoveCommand, type MotionNarration, type MotionNodeEntry, type MotionOnionSkin, type MotionOverlayOptions, type MotionPath, type MotionPathOptions, type MotionPlayCommand, type MotionPreset, type MotionProperty, type MotionPulseCommand, type MotionRect, type MotionReveal, type MotionRotateCommand, type MotionScaleCommand, type MotionScene, MotionSceneFormatError, type MotionSegment, type MotionShakeCommand, type MotionShot, type MotionShotTiming, type MotionSmoothLeg, type MotionSplitOrientation, type MotionStyleCommand, type MotionSvgOptions, type MotionTeeterCommand, type MotionTextLayout, type MotionTextUnit, type MotionTimeline, type MotionTrigger, type MotionValue, type MotionWaitCommand, type MotionWaveCommand, type MotionWiggleCommand, type PptxAnimationImport, type PptxAnimationImportOptions, activeSegment, applyMotionControlValues, applyMotionDrivers, applyMotionEdits, checkMotionScene, clipsShapeProblems, commandShapeProblems, compileMotionScene, createAnimationEditorToolProvider, createMotionScene, defaultMotionCommand, describeMotionElements, describeMotionShots, driversShapeProblems, duplicateMotionCommandEdit, fitMotionRect, fitMotionScene, fitMotionSceneEdits, flairAtLeast, flairCurveFor, flairEaseFor, formatMotionDrivers, formatMotionNarration, freshShotId, fromFlairSvgMotion, fromFlairVectorEffect, fromPptxAnimation, highlightMotionSvg, indexMotionNodes, interpolateMotionValue, isMotionCommand, isMotionShot, matchMotionNodes, motionAddTrackKey, motionBeatAt, motionBeatTime, motionBlurTimes, motionCascade, motionClipAttrs, motionClipLayout, motionCommandDuration, motionCommandFields, motionCommandRepeat, motionCommandRows, motionCommandSlots, motionCommandSummary, motionContactSheetSvg, motionCueChoices, motionCueFromKey, motionCueKey, motionCueTime, motionCycleDuration, motionDrivenNodes, motionDriverSources, motionEaseKey, motionEasingCurve, motionEasingGuides, motionEasingPath, motionFieldEdit, motionFieldLabel, motionFlairPrimitive, motionFollowRoute, motionFrameAt, motionFrameToSvg, motionGhosts, motionIssue, motionIssueKey, motionIssueLine, motionMovingIds, motionNodeAtElement, motionNodeClips, motionNodeOffset, motionPath, motionPathLength, motionPathsSvg, motionPropertyValue, motionRestValue, motionRevealClip, motionRevealPadding, motionRulerTicks, motionSceneShapeProblems, motionSceneToJson, motionShotAt, motionShotCueTime, motionShotTimeScale, motionStageSvg, motionTextLayout, motionTextUnits, motionTrackKey, namedWithSuggestion, parseMotionDrivers, parseMotionFieldInput, parseMotionNarration, parseMotionScene, resolveMotionCamera, resolveMotionEditRefs, segmentProgress, segmentValue, shotShapeProblems, smoothMotionLegs, smoothMotionTimes, suggestName, toFlairEffectDocument, toFlairSvgMotion, toFlairVectorEffect, toLottie, trackValue, withMotionLayers, withViewBox };
|