@pixerate/flair 0.24.0 → 0.26.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.
Files changed (69) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +1 -0
  3. package/dist/catalog/index.js +2 -2
  4. package/dist/{chunk-WAMA45G3.js → chunk-5USSDEQL.js} +77 -21
  5. package/dist/chunk-5USSDEQL.js.map +1 -0
  6. package/dist/{chunk-GTIAOYOK.js → chunk-74ZLCZOG.js} +13 -10
  7. package/dist/chunk-74ZLCZOG.js.map +1 -0
  8. package/dist/{chunk-NGKNI3QX.js → chunk-CK6EV37I.js} +19 -495
  9. package/dist/chunk-CK6EV37I.js.map +1 -0
  10. package/dist/chunk-DBTLCXKY.js +332 -0
  11. package/dist/chunk-DBTLCXKY.js.map +1 -0
  12. package/dist/chunk-G2B5L234.js +414 -0
  13. package/dist/chunk-G2B5L234.js.map +1 -0
  14. package/dist/{chunk-VP6IEWIK.js → chunk-H6L67KHI.js} +1 -1
  15. package/dist/chunk-H6VDFBIO.js +498 -0
  16. package/dist/chunk-H6VDFBIO.js.map +1 -0
  17. package/dist/{chunk-OQ4EWZ3B.js → chunk-HVXWNGTW.js} +83 -6
  18. package/dist/{chunk-OQ4EWZ3B.js.map → chunk-HVXWNGTW.js.map} +1 -1
  19. package/dist/chunk-JL6TI6II.js +724 -0
  20. package/dist/chunk-JL6TI6II.js.map +1 -0
  21. package/dist/{chunk-OHW7UG6D.js → chunk-ORAFCHX3.js} +26 -2
  22. package/dist/{chunk-OHW7UG6D.js.map → chunk-ORAFCHX3.js.map} +1 -1
  23. package/dist/{chunk-ARKC7LDW.js → chunk-RDU63CDO.js} +2 -331
  24. package/dist/chunk-RDU63CDO.js.map +1 -0
  25. package/dist/{chunk-LVPIIWPP.js → chunk-STKEKXCK.js} +18 -8
  26. package/dist/chunk-STKEKXCK.js.map +1 -0
  27. package/dist/chunk-UCZ43ARE.js +902 -0
  28. package/dist/chunk-UCZ43ARE.js.map +1 -0
  29. package/dist/chunk-YBGRXVAE.js +407 -0
  30. package/dist/chunk-YBGRXVAE.js.map +1 -0
  31. package/dist/cli.js +74 -11
  32. package/dist/cli.js.map +1 -1
  33. package/dist/editor/index.d.ts +1 -1
  34. package/dist/editor/index.js +14 -12
  35. package/dist/editor/index.js.map +1 -1
  36. package/dist/effect-GGH3OSOT.js +47 -0
  37. package/dist/embed/index.d.ts +215 -0
  38. package/dist/embed/index.js +21 -0
  39. package/dist/{export-DH2HMACO.js → export-QVW474KM.js} +3 -3
  40. package/dist/export-QVW474KM.js.map +1 -0
  41. package/dist/frames-VEcqa40g.d.ts +161 -0
  42. package/dist/index.d.ts +47 -164
  43. package/dist/index.js +102 -80
  44. package/dist/index.js.map +1 -1
  45. package/dist/node.d.ts +167 -7
  46. package/dist/node.js +25 -3
  47. package/dist/react/index.d.ts +33 -2
  48. package/dist/react/index.js +54 -9
  49. package/dist/react/index.js.map +1 -1
  50. package/dist/recorder-CDPPTJMG.js +31 -0
  51. package/dist/recorder-CDPPTJMG.js.map +1 -0
  52. package/dist/{renderer-C2P1qGzP.d.ts → renderer-teaa98RE.d.ts} +1 -1
  53. package/dist/svelte/index.d.ts +33 -4
  54. package/dist/svelte/index.js +51 -9
  55. package/dist/svelte/index.js.map +1 -1
  56. package/dist/vector/index.d.ts +52 -1
  57. package/dist/vector/index.js +8 -4
  58. package/package.json +1 -1
  59. package/dist/chunk-ARKC7LDW.js.map +0 -1
  60. package/dist/chunk-GTIAOYOK.js.map +0 -1
  61. package/dist/chunk-LVPIIWPP.js.map +0 -1
  62. package/dist/chunk-NGKNI3QX.js.map +0 -1
  63. package/dist/chunk-UP6QQVRS.js +0 -331
  64. package/dist/chunk-UP6QQVRS.js.map +0 -1
  65. package/dist/chunk-WAMA45G3.js.map +0 -1
  66. package/dist/recorder-HKFFHQES.js +0 -10
  67. /package/dist/{chunk-VP6IEWIK.js.map → chunk-H6L67KHI.js.map} +0 -0
  68. /package/dist/{export-DH2HMACO.js.map → effect-GGH3OSOT.js.map} +0 -0
  69. /package/dist/{recorder-HKFFHQES.js.map → embed/index.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { C as ControlValue, a as ControlDef } from './controls-Ec6P0Vpy.js';
2
- export { c as ControlCheck, b as ControlType, T as TextureSettings, d as checkControlValue, e as coerceControlValue, f as componentCount, g as controlValue, h as describeValue, i as hexToRgb, j as humanise, k as imageUrls, l as isImageUrl, p as parseColor, m as parseControls, r as rgbToHex } from './controls-Ec6P0Vpy.js';
3
- import { L as LiveSource } from './renderer-C2P1qGzP.js';
4
- export { B as BUILTIN_UNIFORMS, C as CompileError, b as CompileResult, a as CompileStatus, c as CompiledShader, F as FrameState, I as ImageLoadError, R as RendererStats, S as SVG_EDGE, d as ShaderCompileError, e as ShaderRenderer, f as ShaderRendererOptions, T as TextureCache, g as TextureSource, V as VERTEX_SOURCE, h as applyTextureSettings, i as compileShader, j as createContext, k as drawFrame, l as formatCompileError, m as isSvgUrl, n as loadImage, p as parseCompileLog, o as preloadImages, r as releaseImages, q as resetGlCaches, s as seekVideo, t as sizeSvg, w as wrapSource } from './renderer-C2P1qGzP.js';
1
+ import { C as ControlValue } from './controls-Ec6P0Vpy.js';
2
+ export { c as ControlCheck, a as ControlDef, b as ControlType, T as TextureSettings, d as checkControlValue, e as coerceControlValue, f as componentCount, g as controlValue, h as describeValue, i as hexToRgb, j as humanise, k as imageUrls, l as isImageUrl, p as parseColor, m as parseControls, r as rgbToHex } from './controls-Ec6P0Vpy.js';
3
+ export { B as BUILTIN_UNIFORMS, C as CompileError, b as CompileResult, a as CompileStatus, c as CompiledShader, F as FrameState, I as ImageLoadError, L as LiveSource, R as RendererStats, d as SVG_EDGE, e as ShaderCompileError, S as ShaderRenderer, f as ShaderRendererOptions, T as TextureCache, g as TextureSource, V as VERTEX_SOURCE, h as applyTextureSettings, i as compileShader, j as createContext, k as drawFrame, l as formatCompileError, m as isSvgUrl, n as loadImage, p as parseCompileLog, o as preloadImages, r as releaseImages, q as resetGlCaches, s as seekVideo, t as sizeSvg, w as wrapSource } from './renderer-teaa98RE.js';
4
+ export { H as HOVER_SECONDS, M as MAX_CLICKS, a as MAX_TRAIL, P as PointerTracker, R as RenderOptions, S as ShaderClick, b as ShaderFrames, c as ShaderFramesOptions, T as TRAIL_SECONDS, d as clicksUniform, t as trailUniform } from './frames-VEcqa40g.js';
5
5
  import { C as Clock } from './svg-BhRboN9q.js';
6
6
  export { A as AnimateCountOptions, D as DataKey, E as EASES, c as EaseName, M as ManualClock, d as SCRAMBLE_MS, e as STEP_MS, f as SVG_PICTURE, g as SvgAnimation, h as SvgBox, i as SvgElementFrame, S as SvgMotion, b as SvgPlayer, j as SvgPlayerOptions, a as SvgTrigger, k as SvgView, l as SvgViewOptions, m as animateCount, n as defaultDataKey, o as formatCount, p as jitter, q as lerpAttr, r as lerpData, s as pageHidden, t as parseSvg, u as realClock, v as stepData, w as stepProgress, x as stepStart, y as svgDuration, z as svgFrame, B as svgMotionIssues, F as svgOpeningTag, G as svgView, H as writtenText } from './svg-BhRboN9q.js';
7
- export { BoxAlignment, BoxFit, FittedBoxResult, FormatUnitOptions, MorphOptions, StackLayoutOptions, SvgFrameMarkupOptions, SvgInlineLayout, UnitFormat, computeBoxFit, formatUnit, layoutStack, morphPaths, morphSequence, parseViewBox, remap, stepVariant, svgFrameMarkup, svgInlineLayout, svgViewBox } from './vector/index.js';
7
+ export { AnimatedSvgOptions, BoxAlignment, BoxFit, FittedBoxResult, FormatUnitOptions, MorphOptions, StackLayoutOptions, SvgFrameMarkupOptions, SvgInlineLayout, UnitFormat, computeBoxFit, formatUnit, layoutStack, morphPaths, morphSequence, parseViewBox, remap, stepVariant, svgAnimatedMarkup, svgFrameMarkup, svgInlineLayout, svgViewBox } from './vector/index.js';
8
8
 
9
9
  /** Controls a registered thumbnail. */
10
10
  interface ThumbnailHandle {
@@ -84,163 +84,6 @@ declare function sharedThumbnailPool(): ThumbnailPool;
84
84
  /** Registers a thumbnail with the shared pool. See {@link ThumbnailPool.register}. */
85
85
  declare function registerThumbnail(canvas: HTMLCanvasElement, source: string, values?: Record<string, ControlValue>, onStatus?: (ok: boolean) => void): ThumbnailHandle;
86
86
 
87
- /**
88
- * The pointer as shaders see it, beyond Shadertoy's `iMouse`: where it is
89
- * while it is over the canvas, how hovered the canvas is (eased in and out),
90
- * how long it has been pressed, the last few clicks, and where it has just
91
- * been (its trail), so effects can answer hovers, presses, taps and moves.
92
- * Times are in `iTime` seconds, so a recording can script them (see
93
- * `ShaderFrames`' `pointer`, `clicks` and `trail`).
94
- */
95
- /** How many clicks `iClicks` holds; older ones drop off. */
96
- declare const MAX_CLICKS = 8;
97
- /** How many of the pointer's recent positions `iTrail` holds; older ones drop off. */
98
- declare const MAX_TRAIL = 32;
99
- /**
100
- * The least time between two positions in the trail, in seconds: moves in
101
- * between update the newest. With {@link MAX_TRAIL}, about a second of path.
102
- */
103
- declare const TRAIL_SECONDS: number;
104
- /** How long hovering eases in or out, in seconds. */
105
- declare const HOVER_SECONDS = 0.25;
106
- /** A click, or a point of the trail: where (pixels from the bottom left, like `iMouse`) and when (`iTime` seconds). */
107
- interface ShaderClick {
108
- x: number;
109
- y: number;
110
- time: number;
111
- }
112
- /**
113
- * `iClicks` from a list of clicks, newest first: `vec4(x, y, time, 1)` for
114
- * each click at or before `time`, zeros for the rest.
115
- */
116
- declare function clicksUniform(clicks: readonly ShaderClick[], time: number): Float32Array;
117
- /**
118
- * `iTrail` from the pointer's positions, oldest first in the list: the
119
- * newest {@link MAX_TRAIL} at or before `time`, newest first, as
120
- * `vec4(x, y, time, 1)`, zeros for the rest.
121
- */
122
- declare function trailUniform(trail: readonly ShaderClick[], time: number): Float32Array;
123
- /**
124
- * Follows one canvas's pointer for `iPointer` and `iClicks`: feed it pointer
125
- * events with the `iTime` they happen at, and read the uniforms for a frame.
126
- */
127
- declare class PointerTracker {
128
- private x;
129
- private y;
130
- private over;
131
- private hoverFrom;
132
- private changedAt;
133
- private pressedAt;
134
- private releasedAt;
135
- private clicks;
136
- private trail;
137
- /**
138
- * The pointer moved to (x, y), in pixels from the bottom left. With a
139
- * `time`, the move joins the trail: a new point at most every
140
- * {@link TRAIL_SECONDS}, the newest point following the pointer between.
141
- */
142
- move(x: number, y: number, time?: number): void;
143
- /** The pointer came over the canvas (`true`) or left it. */
144
- hover(over: boolean, time: number): void;
145
- /** A press at (x, y): counts as a click. */
146
- down(x: number, y: number, time: number): void;
147
- up(time: number): void;
148
- /** Forgets clicks, presses and the trail (when time jumps back, say). */
149
- clear(): void;
150
- /** How hovered the canvas is at `time`, 0–1, eased. */
151
- hovered(time: number): number;
152
- /**
153
- * `iPointer` at `time`: x, y, how hovered (0–1), and the press: seconds
154
- * held while pressed, minus the seconds since it was let go after, 0
155
- * before the first press.
156
- */
157
- pointer(time: number): [number, number, number, number];
158
- /** `iClicks` at `time` (see {@link clicksUniform}). */
159
- clicksAt(time: number): Float32Array;
160
- /** `iTrail` at `time` (see {@link trailUniform}). */
161
- trailAt(time: number): Float32Array;
162
- }
163
-
164
- interface ShaderFramesOptions {
165
- source: string;
166
- values?: Record<string, ControlValue>;
167
- width: number;
168
- height: number;
169
- /** Draw on this canvas instead of a new, detached one. It is resized to `width` × `height`. */
170
- canvas?: HTMLCanvasElement;
171
- /** Keep the shader's alpha (`fragColor.a`) in the frames, for transparent recordings (default false: opaque). */
172
- alpha?: boolean;
173
- }
174
- interface RenderOptions {
175
- /** `iFrame` (default: the number of frames rendered so far). */
176
- frame?: number;
177
- /** `iTimeDelta` in seconds (default: the time since the previous `render`, else 0). */
178
- delta?: number;
179
- /** `iMouse` (default: all zero, as on a page nobody has touched). */
180
- mouse?: [number, number, number, number];
181
- /** `iPointer`: x, y, how hovered (0–1), the press (seconds held, or minus seconds since release; default all zero). */
182
- pointer?: [number, number, number, number];
183
- /** Clicks so far, for `iClicks` (the latest `MAX_CLICKS` at or before the frame's time count). */
184
- clicks?: readonly ShaderClick[];
185
- /** Where the pointer has been, oldest first, for `iTrail` (the latest `MAX_TRAIL` at or before the frame's time count). */
186
- trail?: readonly ShaderClick[];
187
- }
188
- /**
189
- * Renders a shader at exact times you choose, off screen. There is no
190
- * animation loop and no clock: frame `n` of a recording at `fps` is
191
- * `render(start + n / fps)`, so the output is the same on any machine. It
192
- * suits recorders, video pipelines and anything else stepped by its own
193
- * clock. The constructor throws a {@link ShaderCompileError} when the source
194
- * does not compile.
195
- *
196
- * Image controls load in the background: `await frames.ready()` before the
197
- * first `render`, or the frames show black where the images go.
198
- *
199
- * A video in an image control (see `setLiveSource`) is drawn at whatever
200
- * frame it is on. To step it with the shader, seek it first: `await
201
- * seekVideo(video, t); frames.render(t)`.
202
- */
203
- declare class ShaderFrames {
204
- readonly canvas: HTMLCanvasElement;
205
- readonly width: number;
206
- readonly height: number;
207
- readonly controls: ControlDef[];
208
- private gl;
209
- private shader;
210
- private textures;
211
- private values;
212
- private rendered;
213
- private lastTime;
214
- private pixels;
215
- constructor(options: ShaderFramesOptions);
216
- /** Changes control values for the frames that follow. */
217
- setValues(values: Record<string, ControlValue> | undefined): void;
218
- /**
219
- * Draws a `<video>` (or a canvas) in the image control `name` instead of
220
- * its URL, at the frame it is on when `render` runs; `null` goes back to
221
- * the URL. See `ShaderRenderer.setLiveSource`.
222
- */
223
- setLiveSource(name: string, source: LiveSource | null): void;
224
- /**
225
- * Settles once every image the controls show has loaded, and every live
226
- * video has a frame. Rejects with an {@link ImageLoadError} when one
227
- * cannot be.
228
- */
229
- ready(): Promise<void>;
230
- /** Draws the frame at `time` seconds onto `canvas`. */
231
- render(time: number, options?: RenderOptions): void;
232
- /**
233
- * The last rendered frame as RGBA bytes, rows top down (as in `ImageData`;
234
- * WebGL itself reads bottom up). Pass `out` to reuse a buffer of
235
- * `width * height * 4` bytes.
236
- */
237
- readPixels(out?: Uint8Array | Uint8ClampedArray): Uint8Array | Uint8ClampedArray;
238
- /** Releases the GL context now rather than at garbage collection (browsers cap live contexts). */
239
- dispose(): void;
240
- private syncTextures;
241
- private context;
242
- }
243
-
244
87
  interface GifOptions {
245
88
  source: string;
246
89
  values?: Record<string, ControlValue>;
@@ -859,6 +702,32 @@ declare function motionBlur(from: View, to: View, stage: Stage, strength: number
859
702
  declare function motionBlurAngle(from: View, to: View, stage: Stage): number | undefined;
860
703
  /** The blur fields of a step of a camera move with this strength: `{ blur, blurAngle }`, or nothing when still. */
861
704
  declare function moveBlur(from: View, to: View, stage: Stage, strength: number): Pick<View, 'blur' | 'blurAngle'>;
705
+ /**
706
+ * How the camera gets into a shot (`ShotCamera.transition`):
707
+ * - `move` (the default) eases from the last framing to the new one.
708
+ * - `whip` whips off the last framing toward the new one in a streak of
709
+ * motion blur and whips in onto it, cutting at the blurriest moment.
710
+ * - `zoom` punches into the last framing, blurring every way, and settles
711
+ * out of a punched-in new one, cutting halfway.
712
+ * - `cut` jumps straight to the new framing, taking no time.
713
+ */
714
+ type CameraTransition = 'move' | 'whip' | 'zoom' | 'cut';
715
+ declare const CAMERA_TRANSITIONS: readonly CameraTransition[];
716
+ /** The motion blur a whip or zoom uses when the shot does not set `motionBlur`. */
717
+ declare const TRANSITION_BLUR = 2;
718
+ /** The blur strength a transition plays with: the shot's `motionBlur`, or {@link TRANSITION_BLUR} for a whip or zoom without one. */
719
+ declare function transitionStrength(kind: CameraTransition, motionBlur: number | undefined): number;
720
+ /** The steps a camera move is played in; its blur is measured over one. */
721
+ declare const CAMERA_STEPS = 15;
722
+ /**
723
+ * The camera `u` (0 to 1) of the way through a transition from one view to
724
+ * another (see {@link CameraTransition}), with its motion blur measured over
725
+ * the step before (1/{@link CAMERA_STEPS} of the move). `strength` is the
726
+ * blur (`ShotCamera.motionBlur`; see {@link transitionStrength}) and, for a
727
+ * zoom, how far it punches in: to (1 + strength) × at the cut. Settled on
728
+ * `to`, with no blur, from `u` = 1 (and at once for a cut).
729
+ */
730
+ declare function transitionView(kind: CameraTransition, from: View, to: View, u: number, stage: Stage, strength: number): View;
862
731
  /** The part of the scene the camera currently shows. */
863
732
  declare function visibleRect(view: View, stage: Stage): Rect;
864
733
  /** Smooth cubic ease in / ease out. */
@@ -1143,6 +1012,14 @@ interface CameraLens extends CameraAngle {
1143
1012
  * speed, so it peaks mid-move and is gone when the camera settles.
1144
1013
  */
1145
1014
  motionBlur?: number;
1015
+ /**
1016
+ * How the camera gets into this shot: `move` (the default) eases across,
1017
+ * `whip` whip-pans off the last framing and onto this one, `zoom` punches
1018
+ * in and cuts to this one settling out, and `cut` jumps straight here
1019
+ * (see `CameraTransition`). A whip or zoom blurs at `motionBlur` 2 unless
1020
+ * the shot sets one; a zoom punches in to (1 + motionBlur) ×.
1021
+ */
1022
+ transition?: CameraTransition;
1146
1023
  }
1147
1024
  /**
1148
1025
  * Where the camera goes for a shot: a framing box, a dynamic framing, or
@@ -1196,11 +1073,15 @@ interface CameraShot {
1196
1073
  holdMs: number;
1197
1074
  from: View;
1198
1075
  to: View;
1199
- /** The shot's `camera.motionBlur` (0 for none). */
1076
+ /** How the camera gets into the shot (`camera.transition`, `move` by default). */
1077
+ transition: CameraTransition;
1078
+ /** The blur strength the move plays with: `camera.motionBlur`, or 2 for a whip or zoom without one (0 for none). */
1200
1079
  motionBlur: number;
1201
1080
  /** The elements on stage once the shot's commands have run. */
1202
1081
  elements: SceneElement[];
1203
1082
  }
1083
+ /** How long the camera moves at the start of a shot, in ms: none for the first shot, a shot without a camera, or a cut. */
1084
+ declare function shotMoveMs(shot: Shot, index: number): number;
1204
1085
  /** The scene's stage with defaults filled in. */
1205
1086
  declare function sceneStage(scene: Scene): Stage;
1206
1087
  /**
@@ -1216,6 +1097,8 @@ declare const CAMERA_STEP_MS: number;
1216
1097
  * motion blur) or settled.
1217
1098
  */
1218
1099
  declare function cameraAt(entry: CameraShot, ms: number, stage: Stage): View;
1100
+ /** Whether the shot's move jumps from one framing to the other halfway (a whip or zoom). */
1101
+ declare const cutsHalfway: (entry: CameraShot) => boolean;
1219
1102
  /** The camera at one frame of a scene's timeline. */
1220
1103
  interface CameraSample {
1221
1104
  frame: number;
@@ -1726,4 +1609,4 @@ declare function exportFcp7Xml(scene: Scene, options?: Fcp7ExportOptions): strin
1726
1609
  */
1727
1610
  declare function exportCmx3600Edl(scene: Scene, options?: EdlExportOptions): string;
1728
1611
 
1729
- export { ALL_BLEND_MODES, ALL_TRANSITION_TYPES, type AgentToolDefinition, type AscCdl, type BatchCommand, type BatchExecutionResult, type BatchExecutionStepResult, type Behavior, type BehaviorBase, type BlendMode, type BlockDissolveOptions, type BlurEffect, type BurstEffect, CAMERA_MS, CAMERA_STEP_MS, COMMON_FRAME_RATES, type CameraAngle, type CameraLens, type CameraSample, type CameraShot, type ClearCommand, Clock, type ColorRGB, type ColorRGBA, type ColorRgba, type ColorSpace, ControlDef, ControlValue, type CounterEffect, type CrossZoomOptions, type CustomCommand, DEFAULT_PERSPECTIVE, DEFAULT_STAGE, type DeleteCommand, type DynamicFraming, EASY_EASE, EFFECT_FADE_MS, EFFECT_TYPES, type EasingCurve, type EdlExportOptions, type Effect, type EffectBase, type ElementCommand, FLAIR_AGENT_TOOLS, type Fcp7ExportOptions, type FlowEffect, type FramingOptions, type GifOptions, type GlassWipeOptions, type GlowEffect, type GradientEffect, type GridWipeOptions, HOVER_SECONDS, type HighlightEffect, type KeyframeEase, type LiftGammaGain, type LightLeakOptions, type LinearWipeOptions, LiveSource, type LottieAnimatable, type LottieAnimation, type LottieExportOptions, type LottieKeyframe, type LottieLayer, type LottieShapeItem, type LottieTransform, MAX_CLICKS, MAX_TILT, MAX_TRAIL, type MediaEffect, MemorySceneBoard, type MotnExportOptions, NO_CHECK, type OscillateBehavior, type OvershootBehavior, type PathWaypoint, type PlayOptions, type PlayResult, type Point, PointerTracker, type PopupWidget, type RadialIrisOptions, type RampBehavior, type RateBehavior, type RationalFrameRate, type Rect, type RenderOptions, type ReplicatorConfig, type ReplicatorPattern, type ReplicatorSequence, type Review, type ReviewOptions, type RigWidget, type RippleEffect, type RunningEffect, SMALL_TEXT_PX, type SMPTEFields, type Scene, type SceneBoard, type SceneCommand, type SceneElement, type SceneIssue, type SceneMedia, type SceneOutline, type SceneOutlineShot, type SceneRig, type SceneToolResult, type ShaderClick, ShaderFrames, type ShaderFramesOptions, type ShimmerEffect, type Shot, type ShotCamera, type ShotCheck, type ShotLog, type ShotTiming, type SliderSnapshot, type SliderWidget, type SpatialMotionPath, type SpatialPathSample, type SpotlightEffect, type Stage, type StandaloneOptions, type StandardFrameRateKey, TRAIL_SECONDS, type ThrowBehavior, type ThumbnailHandle, ThumbnailPool, type ThumbnailPoolOptions, type TimerEffect, type ToggleWidget, type TransitionOptions, type TransitionSample, type TransitionType, type TwisterOptions, type UpdateCommand, type Vec2, type Vec3, type View, type WriggleBehavior, applyAscCdl, applyLiftGammaGain, applyRig, applySceneBatch, applySceneTool, applyVibrance, areaOf, between, bez1d, bez1dDerivative, blendRgba, blendTransitionPixel, boardHeight, boundsOf, calculateFramingRect, calculateShotTimings, cameraAngle, cameraAt, cameraBlur, cameraFilter, cameraSamples, cameraTrack, cameraTransform, centreOf, checkShot, clicksUniform, convertColorSpace, createFrameRate, createLottieEase, createMotionPath, easeInOutCubic, easeProgress, effectGone, effectOpacity, evaluateBehavior, evaluateKeyframeSegment, expandReplicator, exportCmx3600Edl, exportFcp7Xml, exportLottie, exportMotn, formatTimecode, fractalWiggle, frame, framesToSMPTE, framesToTimecode, getColorGradingGLSL, getDropFrameCount, getGlslBlendFunction, getOklabGLSL, getTimecodeBase, getTransitionGLSL, getWhiteBalanceGains, hash64, holdTime, interpolateOklab, interpolateOklch, isAngled, isDeleteCommand, isElementCommand, isUpdateCommand, linearRgbToSrgb, linearSrgbToOklab, linearToSrgb, loopTime, mixSeeds, motionBlur, motionBlurAngle, moveBlur, noise1d, noise3d, oklabToLinearSrgb, oklabToOklch, oklabToSrgb, oklchToOklab, overlapArea, parseTimecode, pingPongTime, playScene, projectPoint, quinticFade, recordGif, registerThumbnail, reviewScene, sampleMotionPath, sampleMotionPathAtTime, sampleTransition, sceneStage, screenBox, setRigWidget, sharedThumbnailPool, shotView, simulateScene, smpteToFrames, solveBezierU, speedRampTime, srgbToLinear, srgbToLinearRgb, srgbToOklab, standaloneHtml, standaloneSceneHtml, strobeTime, substituteVariables, supportsDropFrame, timecodeToFrames, titleBox, touchedIds, trailUniform, unitFloat, validateScene, viewAt, visibleRect };
1612
+ export { ALL_BLEND_MODES, ALL_TRANSITION_TYPES, type AgentToolDefinition, type AscCdl, type BatchCommand, type BatchExecutionResult, type BatchExecutionStepResult, type Behavior, type BehaviorBase, type BlendMode, type BlockDissolveOptions, type BlurEffect, type BurstEffect, CAMERA_MS, CAMERA_STEPS, CAMERA_STEP_MS, CAMERA_TRANSITIONS, COMMON_FRAME_RATES, type CameraAngle, type CameraLens, type CameraSample, type CameraShot, type CameraTransition, type ClearCommand, Clock, type ColorRGB, type ColorRGBA, type ColorRgba, type ColorSpace, ControlValue, type CounterEffect, type CrossZoomOptions, type CustomCommand, DEFAULT_PERSPECTIVE, DEFAULT_STAGE, type DeleteCommand, type DynamicFraming, EASY_EASE, EFFECT_FADE_MS, EFFECT_TYPES, type EasingCurve, type EdlExportOptions, type Effect, type EffectBase, type ElementCommand, FLAIR_AGENT_TOOLS, type Fcp7ExportOptions, type FlowEffect, type FramingOptions, type GifOptions, type GlassWipeOptions, type GlowEffect, type GradientEffect, type GridWipeOptions, type HighlightEffect, type KeyframeEase, type LiftGammaGain, type LightLeakOptions, type LinearWipeOptions, type LottieAnimatable, type LottieAnimation, type LottieExportOptions, type LottieKeyframe, type LottieLayer, type LottieShapeItem, type LottieTransform, MAX_TILT, type MediaEffect, MemorySceneBoard, type MotnExportOptions, NO_CHECK, type OscillateBehavior, type OvershootBehavior, type PathWaypoint, type PlayOptions, type PlayResult, type Point, type PopupWidget, type RadialIrisOptions, type RampBehavior, type RateBehavior, type RationalFrameRate, type Rect, type ReplicatorConfig, type ReplicatorPattern, type ReplicatorSequence, type Review, type ReviewOptions, type RigWidget, type RippleEffect, type RunningEffect, SMALL_TEXT_PX, type SMPTEFields, type Scene, type SceneBoard, type SceneCommand, type SceneElement, type SceneIssue, type SceneMedia, type SceneOutline, type SceneOutlineShot, type SceneRig, type SceneToolResult, type ShimmerEffect, type Shot, type ShotCamera, type ShotCheck, type ShotLog, type ShotTiming, type SliderSnapshot, type SliderWidget, type SpatialMotionPath, type SpatialPathSample, type SpotlightEffect, type Stage, type StandaloneOptions, type StandardFrameRateKey, TRANSITION_BLUR, type ThrowBehavior, type ThumbnailHandle, ThumbnailPool, type ThumbnailPoolOptions, type TimerEffect, type ToggleWidget, type TransitionOptions, type TransitionSample, type TransitionType, type TwisterOptions, type UpdateCommand, type Vec2, type Vec3, type View, type WriggleBehavior, applyAscCdl, applyLiftGammaGain, applyRig, applySceneBatch, applySceneTool, applyVibrance, areaOf, between, bez1d, bez1dDerivative, blendRgba, blendTransitionPixel, boardHeight, boundsOf, calculateFramingRect, calculateShotTimings, cameraAngle, cameraAt, cameraBlur, cameraFilter, cameraSamples, cameraTrack, cameraTransform, centreOf, checkShot, convertColorSpace, createFrameRate, createLottieEase, createMotionPath, cutsHalfway, easeInOutCubic, easeProgress, effectGone, effectOpacity, evaluateBehavior, evaluateKeyframeSegment, expandReplicator, exportCmx3600Edl, exportFcp7Xml, exportLottie, exportMotn, formatTimecode, fractalWiggle, frame, framesToSMPTE, framesToTimecode, getColorGradingGLSL, getDropFrameCount, getGlslBlendFunction, getOklabGLSL, getTimecodeBase, getTransitionGLSL, getWhiteBalanceGains, hash64, holdTime, interpolateOklab, interpolateOklch, isAngled, isDeleteCommand, isElementCommand, isUpdateCommand, linearRgbToSrgb, linearSrgbToOklab, linearToSrgb, loopTime, mixSeeds, motionBlur, motionBlurAngle, moveBlur, noise1d, noise3d, oklabToLinearSrgb, oklabToOklch, oklabToSrgb, oklchToOklab, overlapArea, parseTimecode, pingPongTime, playScene, projectPoint, quinticFade, recordGif, registerThumbnail, reviewScene, sampleMotionPath, sampleMotionPathAtTime, sampleTransition, sceneStage, screenBox, setRigWidget, sharedThumbnailPool, shotMoveMs, shotView, simulateScene, smpteToFrames, solveBezierU, speedRampTime, srgbToLinear, srgbToLinearRgb, srgbToOklab, standaloneHtml, standaloneSceneHtml, strobeTime, substituteVariables, supportsDropFrame, timecodeToFrames, titleBox, touchedIds, transitionStrength, transitionView, unitFloat, validateScene, viewAt, visibleRect };
package/dist/index.js CHANGED
@@ -1,56 +1,5 @@
1
- import {
2
- calculateShotTimings,
3
- createLottieEase,
4
- exportCmx3600Edl,
5
- exportFcp7Xml,
6
- exportLottie,
7
- exportMotn,
8
- framesToTimecode,
9
- timecodeToFrames
10
- } from "./chunk-GTIAOYOK.js";
11
- import {
12
- computeBoxFit,
13
- formatUnit,
14
- layoutStack,
15
- remap,
16
- stepVariant
17
- } from "./chunk-VP6IEWIK.js";
18
- import {
19
- parseViewBox,
20
- svgFrameMarkup,
21
- svgInlineLayout,
22
- svgViewBox
23
- } from "./chunk-LVPIIWPP.js";
24
- import {
25
- EASES,
26
- SCRAMBLE_MS,
27
- STEP_MS,
28
- SVG_PICTURE,
29
- SvgPlayer,
30
- animateCount,
31
- defaultDataKey,
32
- formatCount,
33
- lerpAttr,
34
- lerpData,
35
- parseSvg,
36
- stepData,
37
- stepProgress,
38
- stepStart,
39
- svgDuration,
40
- svgFrame,
41
- svgMotionIssues,
42
- svgOpeningTag,
43
- svgView,
44
- writtenText
45
- } from "./chunk-PFGGPIMT.js";
46
- import {
47
- morphPaths,
48
- morphSequence
49
- } from "./chunk-OHW7UG6D.js";
50
1
  import {
51
2
  ALL_BLEND_MODES,
52
- ShaderFrames,
53
- ShaderRenderer,
54
3
  ThumbnailPool,
55
4
  blendRgba,
56
5
  getGlslBlendFunction,
@@ -60,10 +9,22 @@ import {
60
9
  standaloneHtml,
61
10
  standaloneSceneHtml,
62
11
  validateScene
63
- } from "./chunk-NGKNI3QX.js";
12
+ } from "./chunk-CK6EV37I.js";
13
+ import {
14
+ calculateShotTimings,
15
+ createLottieEase,
16
+ exportCmx3600Edl,
17
+ exportFcp7Xml,
18
+ exportLottie,
19
+ exportMotn,
20
+ framesToTimecode,
21
+ timecodeToFrames
22
+ } from "./chunk-74ZLCZOG.js";
64
23
  import {
65
24
  CAMERA_MS,
25
+ CAMERA_STEPS,
66
26
  CAMERA_STEP_MS,
27
+ CAMERA_TRANSITIONS,
67
28
  DEFAULT_PERSPECTIVE,
68
29
  DEFAULT_STAGE,
69
30
  EFFECT_FADE_MS,
@@ -72,6 +33,7 @@ import {
72
33
  MemorySceneBoard,
73
34
  NO_CHECK,
74
35
  SMALL_TEXT_PX,
36
+ TRANSITION_BLUR,
75
37
  areaOf,
76
38
  between,
77
39
  boardHeight,
@@ -86,6 +48,7 @@ import {
86
48
  cameraTransform,
87
49
  centreOf,
88
50
  checkShot,
51
+ cutsHalfway,
89
52
  easeInOutCubic,
90
53
  effectGone,
91
54
  effectOpacity,
@@ -110,14 +73,58 @@ import {
110
73
  reviewScene,
111
74
  sceneStage,
112
75
  screenBox,
76
+ shotMoveMs,
113
77
  shotView,
114
78
  simulateScene,
115
79
  titleBox,
116
80
  touchedIds,
81
+ transitionStrength,
82
+ transitionView,
117
83
  unitFloat,
118
84
  viewAt,
119
85
  visibleRect
120
- } from "./chunk-WAMA45G3.js";
86
+ } from "./chunk-5USSDEQL.js";
87
+ import {
88
+ applyAscCdl,
89
+ applyLiftGammaGain,
90
+ applyVibrance,
91
+ convertColorSpace,
92
+ getColorGradingGLSL,
93
+ getOklabGLSL,
94
+ getWhiteBalanceGains,
95
+ interpolateOklab,
96
+ interpolateOklch,
97
+ linearRgbToSrgb,
98
+ linearSrgbToOklab,
99
+ linearToSrgb,
100
+ oklabToLinearSrgb,
101
+ oklabToOklch,
102
+ oklabToSrgb,
103
+ oklchToOklab,
104
+ srgbToLinear,
105
+ srgbToLinearRgb,
106
+ srgbToOklab
107
+ } from "./chunk-DBTLCXKY.js";
108
+ import {
109
+ computeBoxFit,
110
+ formatUnit,
111
+ layoutStack,
112
+ remap,
113
+ stepVariant
114
+ } from "./chunk-H6L67KHI.js";
115
+ import {
116
+ svgAnimatedMarkup
117
+ } from "./chunk-YBGRXVAE.js";
118
+ import {
119
+ parseViewBox,
120
+ svgFrameMarkup,
121
+ svgInlineLayout,
122
+ svgViewBox
123
+ } from "./chunk-STKEKXCK.js";
124
+ import {
125
+ ShaderFrames,
126
+ ShaderRenderer
127
+ } from "./chunk-H6VDFBIO.js";
121
128
  import {
122
129
  BUILTIN_UNIFORMS,
123
130
  HOVER_SECONDS,
@@ -130,54 +137,29 @@ import {
130
137
  TRAIL_SECONDS,
131
138
  TextureCache,
132
139
  VERTEX_SOURCE,
133
- applyAscCdl,
134
- applyLiftGammaGain,
135
140
  applyTextureSettings,
136
- applyVibrance,
137
141
  clicksUniform,
138
142
  compileShader,
139
- convertColorSpace,
140
143
  createContext,
141
144
  drawFrame,
142
145
  formatCompileError,
143
- getColorGradingGLSL,
144
- getOklabGLSL,
145
- getWhiteBalanceGains,
146
- interpolateOklab,
147
- interpolateOklch,
148
146
  isSvgUrl,
149
- linearRgbToSrgb,
150
- linearSrgbToOklab,
151
- linearToSrgb,
152
147
  loadImage,
153
- oklabToLinearSrgb,
154
- oklabToOklch,
155
- oklabToSrgb,
156
- oklchToOklab,
157
148
  parseCompileLog,
158
149
  preloadImages,
159
150
  releaseImages,
160
151
  resetGlCaches,
161
152
  seekVideo,
162
153
  sizeSvg,
163
- srgbToLinear,
164
- srgbToLinearRgb,
165
- srgbToOklab,
166
154
  trailUniform,
167
155
  wrapSource
168
- } from "./chunk-ARKC7LDW.js";
156
+ } from "./chunk-RDU63CDO.js";
169
157
  import {
170
158
  ALL_TRANSITION_TYPES,
171
159
  blendTransitionPixel,
172
160
  getTransitionGLSL,
173
161
  sampleTransition
174
162
  } from "./chunk-EHDJ3CPJ.js";
175
- import {
176
- ManualClock,
177
- jitter,
178
- pageHidden,
179
- realClock
180
- } from "./chunk-WMZQCUFJ.js";
181
163
  import {
182
164
  checkControlValue,
183
165
  coerceControlValue,
@@ -192,6 +174,38 @@ import {
192
174
  parseControls,
193
175
  rgbToHex
194
176
  } from "./chunk-VYOMXE6I.js";
177
+ import {
178
+ EASES,
179
+ SCRAMBLE_MS,
180
+ STEP_MS,
181
+ SVG_PICTURE,
182
+ SvgPlayer,
183
+ animateCount,
184
+ defaultDataKey,
185
+ formatCount,
186
+ lerpAttr,
187
+ lerpData,
188
+ parseSvg,
189
+ stepData,
190
+ stepProgress,
191
+ stepStart,
192
+ svgDuration,
193
+ svgFrame,
194
+ svgMotionIssues,
195
+ svgOpeningTag,
196
+ svgView,
197
+ writtenText
198
+ } from "./chunk-PFGGPIMT.js";
199
+ import {
200
+ ManualClock,
201
+ jitter,
202
+ pageHidden,
203
+ realClock
204
+ } from "./chunk-WMZQCUFJ.js";
205
+ import {
206
+ morphPaths,
207
+ morphSequence
208
+ } from "./chunk-ORAFCHX3.js";
195
209
 
196
210
  // src/time/retiming.ts
197
211
  function loopTime(t, duration, start = 0) {
@@ -867,7 +881,7 @@ var FLAIR_AGENT_TOOLS = [
867
881
  properties: {
868
882
  scene: {
869
883
  type: "object",
870
- description: "Full Scene object with name, stage, media, and shots. A shot camera frames a box {x, y, width, height} or elements {frame: [ids]}, and may add tilt, turn, roll (degrees, tilt/turn up to 75), perspective (default 1.2) and motionBlur (0-3, 1 natural); angles persist until changed."
884
+ description: 'Full Scene object with name, stage, media, and shots. A shot camera frames a box {x, y, width, height} or elements {frame: [ids]}, and may add tilt, turn, roll (degrees, tilt/turn up to 75), perspective (default 1.2), motionBlur (0-3, 1 natural) and transition ("move" eases across, the default; "whip" whip-pans in; "zoom" punches through; "cut" jumps); angles persist until changed.'
871
885
  }
872
886
  },
873
887
  required: ["scene"],
@@ -1177,7 +1191,9 @@ export {
1177
1191
  ALL_TRANSITION_TYPES,
1178
1192
  BUILTIN_UNIFORMS,
1179
1193
  CAMERA_MS,
1194
+ CAMERA_STEPS,
1180
1195
  CAMERA_STEP_MS,
1196
+ CAMERA_TRANSITIONS,
1181
1197
  COMMON_FRAME_RATES,
1182
1198
  DEFAULT_PERSPECTIVE,
1183
1199
  DEFAULT_STAGE,
@@ -1205,6 +1221,7 @@ export {
1205
1221
  ShaderRenderer,
1206
1222
  SvgPlayer,
1207
1223
  TRAIL_SECONDS,
1224
+ TRANSITION_BLUR,
1208
1225
  TextureCache,
1209
1226
  ThumbnailPool,
1210
1227
  VERTEX_SOURCE,
@@ -1247,6 +1264,7 @@ export {
1247
1264
  createFrameRate,
1248
1265
  createLottieEase,
1249
1266
  createMotionPath,
1267
+ cutsHalfway,
1250
1268
  defaultDataKey,
1251
1269
  describeValue,
1252
1270
  drawFrame,
@@ -1339,6 +1357,7 @@ export {
1339
1357
  seekVideo,
1340
1358
  setRigWidget,
1341
1359
  sharedThumbnailPool,
1360
+ shotMoveMs,
1342
1361
  shotView,
1343
1362
  simulateScene,
1344
1363
  sizeSvg,
@@ -1357,6 +1376,7 @@ export {
1357
1376
  strobeTime,
1358
1377
  substituteVariables,
1359
1378
  supportsDropFrame,
1379
+ svgAnimatedMarkup,
1360
1380
  svgDuration,
1361
1381
  svgFrame,
1362
1382
  svgFrameMarkup,
@@ -1369,6 +1389,8 @@ export {
1369
1389
  titleBox,
1370
1390
  touchedIds,
1371
1391
  trailUniform,
1392
+ transitionStrength,
1393
+ transitionView,
1372
1394
  unitFloat,
1373
1395
  validateScene,
1374
1396
  viewAt,