@pixerate/editor 0.229.0 → 0.230.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 (53) hide show
  1. package/dist/animation-editor/camera-tools.d.cts +10 -0
  2. package/dist/animation-editor/camera-tools.d.ts +10 -0
  3. package/dist/animation-editor/camera.d.cts +67 -0
  4. package/dist/animation-editor/camera.d.ts +67 -0
  5. package/dist/animation-editor/compile.d.cts +4 -0
  6. package/dist/animation-editor/compile.d.ts +4 -0
  7. package/dist/animation-editor/controller.d.cts +34 -2
  8. package/dist/animation-editor/controller.d.ts +34 -2
  9. package/dist/animation-editor/effect-tools.d.cts +2 -1
  10. package/dist/animation-editor/effect-tools.d.ts +2 -1
  11. package/dist/animation-editor/evaluate.d.cts +9 -0
  12. package/dist/animation-editor/evaluate.d.ts +9 -0
  13. package/dist/animation-editor/flair.d.cts +8 -0
  14. package/dist/animation-editor/flair.d.ts +8 -0
  15. package/dist/animation-editor/index.cjs +603 -217
  16. package/dist/animation-editor/index.d.cts +2 -0
  17. package/dist/animation-editor/index.d.ts +2 -0
  18. package/dist/animation-editor/index.js +454 -68
  19. package/dist/animation-editor/issues.d.cts +16 -0
  20. package/dist/animation-editor/issues.d.ts +16 -0
  21. package/dist/animation-editor/tools.d.cts +1 -1
  22. package/dist/animation-editor/tools.d.ts +1 -1
  23. package/dist/animation-editor/types.d.cts +21 -3
  24. package/dist/animation-editor/types.d.ts +21 -3
  25. package/dist/canvas/index.cjs +7 -7
  26. package/dist/canvas/index.js +1 -1
  27. package/dist/{chunk-IGPEBXUD.cjs → chunk-A57ZQDNN.cjs} +7 -7
  28. package/dist/{chunk-K5GXW5TR.cjs → chunk-C73U5UI3.cjs} +14 -14
  29. package/dist/{chunk-EBDZWIOP.cjs → chunk-ERJA5CGT.cjs} +5 -1
  30. package/dist/{chunk-LPTFDCJO.js → chunk-ONNNNGNS.js} +1 -1
  31. package/dist/{chunk-5MQOBTNP.cjs → chunk-OPSK22DL.cjs} +80 -9
  32. package/dist/{chunk-PB6JV62G.js → chunk-SBPGIZQN.js} +1 -1
  33. package/dist/{chunk-UGYUGZE2.js → chunk-TCZ2J7PR.js} +71 -0
  34. package/dist/{chunk-W4KFNAWC.js → chunk-TYCJGFCF.js} +5 -1
  35. package/dist/effects/helpers.d.cts +35 -1
  36. package/dist/effects/helpers.d.ts +35 -1
  37. package/dist/effects/index.cjs +60 -44
  38. package/dist/effects/index.js +18 -2
  39. package/dist/effects/types.d.cts +15 -0
  40. package/dist/effects/types.d.ts +15 -0
  41. package/dist/image-editor/index.cjs +13 -13
  42. package/dist/image-editor/index.js +1 -1
  43. package/dist/paint-editor/index.cjs +7 -7
  44. package/dist/paint-editor/index.js +2 -2
  45. package/dist/vector/index.cjs +6 -6
  46. package/dist/vector/index.js +1 -1
  47. package/dist/video-editor/index.cjs +318 -318
  48. package/dist/video-editor/index.js +4 -4
  49. package/package.json +1 -1
  50. package/skills/pixerate-animation-editor/SKILL.md +28 -1
  51. package/skills/pixerate-animation-motion-graphics/SKILL.md +3 -0
  52. package/skills/pixerate-video-editor/SKILL.md +16 -1
  53. package/skills/pixerate-video-montage/SKILL.md +2 -1
@@ -209,6 +209,69 @@ async function sampleEffectCameraMove(provider, id, request) {
209
209
  const { from, to, ms, stage, values } = request;
210
210
  return sampleCameraViews((u) => provider.cameraView(id, { from, to, u, ms, stage }, values), { ms, fps: request.fps, cut: d.camera.cut });
211
211
  }
212
+ var cameraMoveField = (role) => role === "transition" ? "in" : "during";
213
+ function cameraMovesFor(catalog, role) {
214
+ return catalog.filter((e) => e.kind === "camera" && e.camera?.role === role);
215
+ }
216
+ function cameraMoveIdList(catalog, role) {
217
+ const ids = cameraMovesFor(catalog, role).map((e) => JSON.stringify(e.id));
218
+ return ids.length ? ids.join(", ") : "none (the provider has no camera moves of that role)";
219
+ }
220
+ function cameraMoveParts(spec) {
221
+ if (typeof spec === "string") return spec ? { move: spec } : void 0;
222
+ if (spec && typeof spec === "object" && !Array.isArray(spec) && typeof spec.move === "string") return spec;
223
+ return void 0;
224
+ }
225
+ var CAMERA_MOVE_MAX_MS = 6e4;
226
+ async function resolveCameraMoveSpec(provider, spec, role) {
227
+ const field = cameraMoveField(role);
228
+ if (!provider.capabilities.supportsCamera || !provider.cameraView) throw new EffectUnsupportedError(`${provider.name} has no camera moves (capabilities.supportsCamera is not set), so camera "${field}" cannot be set.`);
229
+ const parts = cameraMoveParts(spec);
230
+ const catalog = await provider.list({ kind: "camera" });
231
+ if (!parts) throw new EffectUnsupportedError(`Camera "${field}" is a camera move's id, or { move, ms?, preset?, values? }; it takes one of ${cameraMoveIdList(catalog, role)}.`);
232
+ let description;
233
+ try {
234
+ description = await provider.describe(parts.move);
235
+ } catch (error) {
236
+ if (error instanceof UnknownEffectError || error.code === "unknown_effect")
237
+ throw new EffectError("unknown_effect", `There is no camera move "${parts.move}"; camera "${field}" takes one of ${cameraMoveIdList(catalog, role)}.`, parts.move);
238
+ throw error;
239
+ }
240
+ if (description.kind !== "camera" || !description.camera) throw new EffectUnsupportedError(`"${parts.move}" is a ${description.kind} effect, not a camera move; camera "${field}" takes one of ${cameraMoveIdList(catalog, role)}.`, parts.move);
241
+ if (description.camera.role !== role) {
242
+ const other = cameraMoveField(description.camera.role);
243
+ throw new EffectUnsupportedError(
244
+ `"${parts.move}" moves the camera ${description.camera.role === "hold" ? "while a shot holds" : "into a shot"}, so it goes in camera "${other}", not "${field}"; camera "${field}" takes one of ${cameraMoveIdList(catalog, role)}.`,
245
+ parts.move
246
+ );
247
+ }
248
+ if (parts.ms !== void 0) {
249
+ if (role === "hold") throw new EffectUnsupportedError(`A move while the shot holds plays across the shot's hold; set the hold's length instead of "ms".`, parts.move);
250
+ if (!(typeof parts.ms === "number" && Number.isFinite(parts.ms) && parts.ms >= 0 && parts.ms <= CAMERA_MOVE_MAX_MS))
251
+ throw new EffectUnsupportedError(`Camera "in" ms is how long the move takes, 0 to ${CAMERA_MOVE_MAX_MS} (default ${description.camera.durationMs} for "${parts.move}").`, parts.move);
252
+ }
253
+ let presetValues = {};
254
+ if (parts.preset !== void 0) {
255
+ const preset = description.presets.find((p) => p.name === parts.preset);
256
+ if (!preset) throw new EffectUnsupportedError(`"${parts.move}" has no preset ${JSON.stringify(parts.preset)}; its presets are ${description.presets.length ? description.presets.map((p) => JSON.stringify(p.name)).join(", ") : "none"}.`, parts.move);
257
+ presetValues = preset.values;
258
+ }
259
+ const values = { ...presetValues, ...parts.values ?? {} };
260
+ resolveEffectValues(description, values);
261
+ return {
262
+ spec: { move: description.id, ...parts.ms !== void 0 ? { ms: parts.ms } : {}, ...parts.preset !== void 0 ? { preset: parts.preset } : {}, ...Object.keys(values).length ? { values } : {} },
263
+ description
264
+ };
265
+ }
266
+ function cameraViewOfBox(box, stage) {
267
+ const zoom = Math.min(stage.width / box.width, stage.height / box.height);
268
+ return { zoom, scrollX: stage.width / (2 * zoom) - (box.x + box.width / 2), scrollY: stage.height / (2 * zoom) - (box.y + box.height / 2) };
269
+ }
270
+ function cameraBoxOfView(view, stage) {
271
+ const width = stage.width / view.zoom;
272
+ const height = stage.height / view.zoom;
273
+ return { x: -view.scrollX, y: -view.scrollY, width, height };
274
+ }
212
275
 
213
276
  // src/effects/types.ts
214
277
  var EFFECT_KINDS = ["shader", "vector", "motion", "camera"];
@@ -478,6 +541,14 @@ export {
478
541
  isCameraView,
479
542
  sampleCameraViews,
480
543
  sampleEffectCameraMove,
544
+ cameraMoveField,
545
+ cameraMovesFor,
546
+ cameraMoveIdList,
547
+ cameraMoveParts,
548
+ CAMERA_MOVE_MAX_MS,
549
+ resolveCameraMoveSpec,
550
+ cameraViewOfBox,
551
+ cameraBoxOfView,
481
552
  EFFECT_KINDS,
482
553
  EFFECT_USES,
483
554
  CAMERA_MOVE_ROLES,
@@ -33,7 +33,11 @@ var MOTION_ISSUE_CODES = {
33
33
  "scene-too-short": { severity: "warning", wording: "The scene ends before its target length." },
34
34
  "unknown-control-color": { severity: "warning", wording: "A control stands for a colour the scene never uses." },
35
35
  "empty-shot": { severity: "note", wording: "A shot neither moves the camera nor runs a command." },
36
- "camera-aspect": { severity: "note", wording: "A camera rectangle has a different shape from the artwork, so it is letterboxed." }
36
+ "camera-aspect": { severity: "note", wording: "A camera rectangle has a different shape from the artwork, so it is letterboxed." },
37
+ "camera-move-first-shot": { severity: "note", wording: "The first shot cuts to its framing, so the move its camera gets in with does not play." },
38
+ "camera-move-not-played": { severity: "note", wording: "A shot names a camera move, but there is no effects provider with camera moves to play it, so the camera eases instead." },
39
+ "camera-move-unknown": { severity: "error", wording: "A shot names a camera move the effects provider does not have, or one of the wrong role." },
40
+ "camera-move-values": { severity: "error", wording: "A camera move's preset or values do not fit its controls." }
37
41
  };
38
42
  function motionIssue(code, message, extra = {}) {
39
43
  return { code, severity: MOTION_ISSUE_CODES[code].severity, message, ...extra };
@@ -3,7 +3,7 @@
3
3
  * and a provider slot editors hold.
4
4
  */
5
5
  import { type SchemaValidationError } from '../tools/schema.cjs';
6
- import type { CameraMoveSample, CameraMoveSampleRequest, CameraView, EffectDescription, EffectImageSource, EffectPixels, EffectProvider, EffectSearchOptions, EffectSummary, EffectUse, EffectValues } from './types.cjs';
6
+ import type { CameraMoveRole, CameraMoveSpec, CameraMoveSample, CameraMoveSampleRequest, CameraStage, CameraView, EffectDescription, EffectImageSource, EffectPixels, EffectProvider, EffectSearchOptions, EffectSummary, EffectUse, EffectValues } from './types.cjs';
7
7
  /** Problems with `values` against an effect's control schema (unknown controls, types, ranges). Partial values are fine. */
8
8
  export declare function effectValueErrors(description: Pick<EffectDescription, 'controls'>, values: unknown): SchemaValidationError[];
9
9
  /**
@@ -82,3 +82,37 @@ export declare function sampleCameraViews(view: (u: number) => CameraView, optio
82
82
  * `EffectUnsupportedError` when the provider has no camera support.
83
83
  */
84
84
  export declare function sampleEffectCameraMove(provider: EffectProvider, id: string, request: CameraMoveSampleRequest): Promise<CameraMoveSample>;
85
+ /** The field a shot names a move of `role` in: `in` for a transition, `during` for a hold. */
86
+ export declare const cameraMoveField: (role: CameraMoveRole) => "in" | "during";
87
+ /** The camera moves of `role` in a catalog, in its order. */
88
+ export declare function cameraMovesFor<T extends Pick<EffectSummary, 'kind' | 'camera'>>(catalog: readonly T[], role: CameraMoveRole): T[];
89
+ /** The ids of a catalog's camera moves of `role` as a sentence's list: `"a", "b"` (or `none`). */
90
+ export declare function cameraMoveIdList(catalog: readonly Pick<EffectSummary, 'id' | 'kind' | 'camera'>[], role: CameraMoveRole): string;
91
+ /** A camera move spec as its parts (`"id"` → `{ move: "id" }`); undefined when it is neither form. */
92
+ export declare function cameraMoveParts(spec: unknown): Exclude<CameraMoveSpec, string> | undefined;
93
+ /** Longest `ms` a transition move takes (ms). */
94
+ export declare const CAMERA_MOVE_MAX_MS = 60000;
95
+ /**
96
+ * A camera move spec checked against a provider for a role, with its preset's values written out
97
+ * into `values`, so a document plays it without asking the provider for the preset again.
98
+ * Throws an error that says what to do: an unknown id or a move of the other role names the
99
+ * moves the role takes, an unknown preset names the presets, and bad values name the controls.
100
+ */
101
+ export declare function resolveCameraMoveSpec(provider: EffectProvider, spec: CameraMoveSpec, role: CameraMoveRole): Promise<{
102
+ spec: Exclude<CameraMoveSpec, string>;
103
+ description: EffectDescription;
104
+ }>;
105
+ /** A box of the scene, in its units. */
106
+ export interface CameraBox {
107
+ x: number;
108
+ y: number;
109
+ width: number;
110
+ height: number;
111
+ }
112
+ /**
113
+ * The view that shows `box` on `stage`: the box's centre in the middle, at the zoom that fits it
114
+ * whole (as SVG's `xMidYMid meet`).
115
+ */
116
+ export declare function cameraViewOfBox(box: CameraBox, stage: CameraStage): CameraView;
117
+ /** The box of the scene a view shows on `stage` (its tilt, turn, roll and blur aside). */
118
+ export declare function cameraBoxOfView(view: CameraView, stage: CameraStage): CameraBox;
@@ -3,7 +3,7 @@
3
3
  * and a provider slot editors hold.
4
4
  */
5
5
  import { type SchemaValidationError } from '../tools/schema.js';
6
- import type { CameraMoveSample, CameraMoveSampleRequest, CameraView, EffectDescription, EffectImageSource, EffectPixels, EffectProvider, EffectSearchOptions, EffectSummary, EffectUse, EffectValues } from './types.js';
6
+ import type { CameraMoveRole, CameraMoveSpec, CameraMoveSample, CameraMoveSampleRequest, CameraStage, CameraView, EffectDescription, EffectImageSource, EffectPixels, EffectProvider, EffectSearchOptions, EffectSummary, EffectUse, EffectValues } from './types.js';
7
7
  /** Problems with `values` against an effect's control schema (unknown controls, types, ranges). Partial values are fine. */
8
8
  export declare function effectValueErrors(description: Pick<EffectDescription, 'controls'>, values: unknown): SchemaValidationError[];
9
9
  /**
@@ -82,3 +82,37 @@ export declare function sampleCameraViews(view: (u: number) => CameraView, optio
82
82
  * `EffectUnsupportedError` when the provider has no camera support.
83
83
  */
84
84
  export declare function sampleEffectCameraMove(provider: EffectProvider, id: string, request: CameraMoveSampleRequest): Promise<CameraMoveSample>;
85
+ /** The field a shot names a move of `role` in: `in` for a transition, `during` for a hold. */
86
+ export declare const cameraMoveField: (role: CameraMoveRole) => "in" | "during";
87
+ /** The camera moves of `role` in a catalog, in its order. */
88
+ export declare function cameraMovesFor<T extends Pick<EffectSummary, 'kind' | 'camera'>>(catalog: readonly T[], role: CameraMoveRole): T[];
89
+ /** The ids of a catalog's camera moves of `role` as a sentence's list: `"a", "b"` (or `none`). */
90
+ export declare function cameraMoveIdList(catalog: readonly Pick<EffectSummary, 'id' | 'kind' | 'camera'>[], role: CameraMoveRole): string;
91
+ /** A camera move spec as its parts (`"id"` → `{ move: "id" }`); undefined when it is neither form. */
92
+ export declare function cameraMoveParts(spec: unknown): Exclude<CameraMoveSpec, string> | undefined;
93
+ /** Longest `ms` a transition move takes (ms). */
94
+ export declare const CAMERA_MOVE_MAX_MS = 60000;
95
+ /**
96
+ * A camera move spec checked against a provider for a role, with its preset's values written out
97
+ * into `values`, so a document plays it without asking the provider for the preset again.
98
+ * Throws an error that says what to do: an unknown id or a move of the other role names the
99
+ * moves the role takes, an unknown preset names the presets, and bad values name the controls.
100
+ */
101
+ export declare function resolveCameraMoveSpec(provider: EffectProvider, spec: CameraMoveSpec, role: CameraMoveRole): Promise<{
102
+ spec: Exclude<CameraMoveSpec, string>;
103
+ description: EffectDescription;
104
+ }>;
105
+ /** A box of the scene, in its units. */
106
+ export interface CameraBox {
107
+ x: number;
108
+ y: number;
109
+ width: number;
110
+ height: number;
111
+ }
112
+ /**
113
+ * The view that shows `box` on `stage`: the box's centre in the middle, at the zoom that fits it
114
+ * whole (as SVG's `xMidYMid meet`).
115
+ */
116
+ export declare function cameraViewOfBox(box: CameraBox, stage: CameraStage): CameraView;
117
+ /** The box of the scene a view shows on `stage` (its tilt, turn, roll and blur aside). */
118
+ export declare function cameraBoxOfView(view: CameraView, stage: CameraStage): CameraBox;
@@ -3,7 +3,7 @@
3
3
  var _chunk4XSBOGMKcjs = require('../chunk-4XSBOGMK.cjs');
4
4
 
5
5
 
6
- var _chunkK5GXW5TRcjs = require('../chunk-K5GXW5TR.cjs');
6
+ var _chunkC73U5UI3cjs = require('../chunk-C73U5UI3.cjs');
7
7
 
8
8
 
9
9
  var _chunkPY4GWSE2cjs = require('../chunk-PY4GWSE2.cjs');
@@ -37,7 +37,15 @@ var _chunkPY4GWSE2cjs = require('../chunk-PY4GWSE2.cjs');
37
37
 
38
38
 
39
39
 
40
- var _chunk5MQOBTNPcjs = require('../chunk-5MQOBTNP.cjs');
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+ var _chunkOPSK22DLcjs = require('../chunk-OPSK22DL.cjs');
41
49
  require('../chunk-WOFXZ3XU.cjs');
42
50
  require('../chunk-FJ2MSI43.cjs');
43
51
 
@@ -45,7 +53,7 @@ require('../chunk-FJ2MSI43.cjs');
45
53
  var _chunkDWJJI6RTcjs = require('../chunk-DWJJI6RT.cjs');
46
54
 
47
55
  // src/effects/conformance.ts
48
- var codeOf = (e) => _chunk5MQOBTNPcjs.isEffectError.call(void 0, e) ? e.code : e instanceof Error ? `untyped ${e.name}: ${e.message}` : String(e);
56
+ var codeOf = (e) => _chunkOPSK22DLcjs.isEffectError.call(void 0, e) ? e.code : e instanceof Error ? `untyped ${e.name}: ${e.message}` : String(e);
49
57
  async function rejectsWith(code, run) {
50
58
  try {
51
59
  await run();
@@ -59,10 +67,10 @@ function checkSummary(e, issues) {
59
67
  const at = (message) => issues.push({ effectId: e.id, message });
60
68
  if (!e.id || typeof e.id !== "string") at("summary has no id");
61
69
  if (!e.name) at("summary has no name");
62
- if (!_chunk5MQOBTNPcjs.EFFECT_KINDS.includes(e.kind)) at(`kind "${e.kind}" is not one of ${_chunk5MQOBTNPcjs.EFFECT_KINDS.join(", ")}`);
70
+ if (!_chunkOPSK22DLcjs.EFFECT_KINDS.includes(e.kind)) at(`kind "${e.kind}" is not one of ${_chunkOPSK22DLcjs.EFFECT_KINDS.join(", ")}`);
63
71
  if (!e.category) at("summary has no category");
64
72
  if (!Array.isArray(e.uses) || !e.uses.length) at("summary has no uses");
65
- for (const u of _nullishCoalesce(e.uses, () => ( []))) if (!_chunk5MQOBTNPcjs.EFFECT_USES.includes(u)) at(`use "${u}" is not one of ${_chunk5MQOBTNPcjs.EFFECT_USES.join(", ")}`);
73
+ for (const u of _nullishCoalesce(e.uses, () => ( []))) if (!_chunkOPSK22DLcjs.EFFECT_USES.includes(u)) at(`use "${u}" is not one of ${_chunkOPSK22DLcjs.EFFECT_USES.join(", ")}`);
66
74
  if (typeof e.transparent !== "boolean") at("transparent is not a boolean");
67
75
  if (typeof e.loop !== "boolean") at("loop is not a boolean");
68
76
  if (e.duration !== void 0 && !(e.duration > 0)) at("duration must be a positive number of ms when present");
@@ -72,7 +80,7 @@ function checkSummary(e, issues) {
72
80
  const m = e.camera;
73
81
  if (!m) at("a camera effect needs camera: { role, durationMs }");
74
82
  else {
75
- if (!_chunk5MQOBTNPcjs.CAMERA_MOVE_ROLES.includes(m.role)) at(`camera.role "${m.role}" is not one of ${_chunk5MQOBTNPcjs.CAMERA_MOVE_ROLES.join(", ")}`);
83
+ if (!_chunkOPSK22DLcjs.CAMERA_MOVE_ROLES.includes(m.role)) at(`camera.role "${m.role}" is not one of ${_chunkOPSK22DLcjs.CAMERA_MOVE_ROLES.join(", ")}`);
76
84
  if (!(Number.isFinite(m.durationMs) && m.durationMs >= 0)) at("camera.durationMs must be a number of ms \u2265 0");
77
85
  if (m.cut !== void 0 && !(m.cut >= 0 && m.cut <= 1)) at("camera.cut must be 0\u20131 when present");
78
86
  if (e.duration !== void 0 && e.duration !== m.durationMs) at(`duration ${e.duration} differs from camera.durationMs ${m.durationMs}`);
@@ -98,8 +106,8 @@ function checkDescription(id, d, issues) {
98
106
  if (!control) at(`backgroundOpacity "${d.backgroundOpacity}" is not a control`);
99
107
  else if (control.type !== "number" || control.minimum !== 0 || control.maximum !== 1) at(`backgroundOpacity "${d.backgroundOpacity}" must be a number control from 0 to 1`);
100
108
  }
101
- for (const e of _chunk5MQOBTNPcjs.effectValueErrors.call(void 0, d, d.defaults)) at(`default ${e.path}: ${e.message}`);
102
- for (const p of _nullishCoalesce(d.presets, () => ( []))) for (const e of _chunk5MQOBTNPcjs.effectValueErrors.call(void 0, d, p.values)) at(`preset "${p.name}" ${e.path}: ${e.message}`);
109
+ for (const e of _chunkOPSK22DLcjs.effectValueErrors.call(void 0, d, d.defaults)) at(`default ${e.path}: ${e.message}`);
110
+ for (const p of _nullishCoalesce(d.presets, () => ( []))) for (const e of _chunkOPSK22DLcjs.effectValueErrors.call(void 0, d, p.values)) at(`preset "${p.name}" ${e.path}: ${e.message}`);
103
111
  for (const input2 of _nullishCoalesce(d.inputs, () => ( []))) {
104
112
  if (!input2.name || !input2.description) at("every input needs a name and a description");
105
113
  if (input2.kind !== "image" && input2.kind !== "audio") at(`input "${input2.name}" has kind "${input2.kind}"`);
@@ -110,7 +118,7 @@ function checkDescription(id, d, issues) {
110
118
  }
111
119
  }
112
120
  function grey(size) {
113
- const p = _chunk5MQOBTNPcjs.createEffectPixels.call(void 0, size, size);
121
+ const p = _chunkOPSK22DLcjs.createEffectPixels.call(void 0, size, size);
114
122
  p.data.fill(128);
115
123
  return p;
116
124
  }
@@ -127,7 +135,7 @@ async function checkRender(provider, d, size, issues) {
127
135
  }
128
136
  try {
129
137
  const out = await renderer.render({ time: 0, inputs });
130
- if (!_chunk5MQOBTNPcjs.isEffectPixels.call(void 0, out)) at("render did not return EffectPixels");
138
+ if (!_chunkOPSK22DLcjs.isEffectPixels.call(void 0, out)) at("render did not return EffectPixels");
131
139
  else if (out.width !== size || out.height !== size || out.data.length !== size * size * 4) at(`render returned ${out.width}\xD7${out.height}, not ${size}\xD7${size}`);
132
140
  } catch (e) {
133
141
  at(`render failed: ${codeOf(e)}`);
@@ -157,10 +165,10 @@ async function checkCamera(provider, d, issues) {
157
165
  at("cameraView must be synchronous; it returned a Promise");
158
166
  return;
159
167
  }
160
- if (!_chunk5MQOBTNPcjs.isCameraView.call(void 0, view)) at(`cameraView at u ${u} is not a CameraView (zoom > 0, finite scrollX and scrollY): ${JSON.stringify(view)}`);
168
+ if (!_chunkOPSK22DLcjs.isCameraView.call(void 0, view)) at(`cameraView at u ${u} is not a CameraView (zoom > 0, finite scrollX and scrollY): ${JSON.stringify(view)}`);
161
169
  else views.push(view);
162
170
  const again = provider.cameraView(d.id, ctx(u));
163
- if (_chunk5MQOBTNPcjs.isCameraView.call(void 0, view) && !sameView(view, again)) at(`cameraView is not pure: two calls at u ${u} gave different views`);
171
+ if (_chunkOPSK22DLcjs.isCameraView.call(void 0, view) && !sameView(view, again)) at(`cameraView is not pure: two calls at u ${u} gave different views`);
164
172
  } catch (e) {
165
173
  at(`cameraView at u ${u} failed: ${codeOf(e)}`);
166
174
  }
@@ -173,7 +181,7 @@ async function checkCamera(provider, d, issues) {
173
181
  const keys = _optionalChain([sample, 'optionalAccess', _11 => _11.keys]);
174
182
  if (!Array.isArray(keys) || keys.length < 2) at("sampleCameraMove returned fewer than two keys");
175
183
  else {
176
- if (keys.some((k, i) => !_chunk5MQOBTNPcjs.isCameraView.call(void 0, k.view) || !Number.isFinite(k.t) || i > 0 && k.t < keys[i - 1].t)) at("sampleCameraMove keys must be CameraViews in time order");
184
+ if (keys.some((k, i) => !_chunkOPSK22DLcjs.isCameraView.call(void 0, k.view) || !Number.isFinite(k.t) || i > 0 && k.t < keys[i - 1].t)) at("sampleCameraMove keys must be CameraViews in time order");
177
185
  if (keys[0].t !== 0 || keys[keys.length - 1].t !== ms) at(`sampleCameraMove keys must run from 0 to ${ms} ms, got ${keys[0].t} to ${keys[keys.length - 1].t}`);
178
186
  else if (!near(keys[0].view, views[0]) || !near(keys[keys.length - 1].view, views[4])) at("sampleCameraMove disagrees with cameraView at the start or end of the move");
179
187
  if (camera.cut !== void 0 && sample.cut === void 0) at("sampleCameraMove gave no cut for a move that cuts");
@@ -543,15 +551,15 @@ var smooth = (t) => t * t * (3 - 2 * t);
543
551
  var clamp01 = (v) => v < 0 ? 0 : v > 1 ? 1 : v;
544
552
  function input(request, name, id, width, height) {
545
553
  const src = _optionalChain([request, 'access', _24 => _24.inputs, 'optionalAccess', _25 => _25[name]]);
546
- if (!src) throw new (0, _chunk5MQOBTNPcjs.EffectUnsupportedError)(`Effect "${id}" needs an input named "${name}".`, id);
547
- if (!_chunk5MQOBTNPcjs.isEffectPixels.call(void 0, src)) throw new (0, _chunk5MQOBTNPcjs.EffectUnsupportedError)(`The fake provider only takes EffectPixels inputs ("${name}").`, id);
554
+ if (!src) throw new (0, _chunkOPSK22DLcjs.EffectUnsupportedError)(`Effect "${id}" needs an input named "${name}".`, id);
555
+ if (!_chunkOPSK22DLcjs.isEffectPixels.call(void 0, src)) throw new (0, _chunkOPSK22DLcjs.EffectUnsupportedError)(`The fake provider only takes EffectPixels inputs ("${name}").`, id);
548
556
  if (src.width !== width || src.height !== height) {
549
- throw new (0, _chunk5MQOBTNPcjs.EffectUnsupportedError)(`Input "${name}" is ${src.width}\xD7${src.height}; the renderer is ${width}\xD7${height}.`, id);
557
+ throw new (0, _chunkOPSK22DLcjs.EffectUnsupportedError)(`Input "${name}" is ${src.width}\xD7${src.height}; the renderer is ${width}\xD7${height}.`, id);
550
558
  }
551
559
  return src;
552
560
  }
553
561
  function renderPixels(d, v, request, width, height) {
554
- const out = _chunk5MQOBTNPcjs.createEffectPixels.call(void 0, width, height);
562
+ const out = _chunkOPSK22DLcjs.createEffectPixels.call(void 0, width, height);
555
563
  const o = out.data;
556
564
  switch (d.id) {
557
565
  case "fake.invert": {
@@ -617,7 +625,7 @@ function renderPixels(d, v, request, width, height) {
617
625
  break;
618
626
  }
619
627
  default:
620
- throw new (0, _chunk5MQOBTNPcjs.EffectUnsupportedError)(`"${d.id}" is a ${d.kind} effect; use applyVectorEffect.`, d.id);
628
+ throw new (0, _chunkOPSK22DLcjs.EffectUnsupportedError)(`"${d.id}" is a ${d.kind} effect; use applyVectorEffect.`, d.id);
621
629
  }
622
630
  return out;
623
631
  }
@@ -647,22 +655,22 @@ function cameraViewOf(d, ctx, v) {
647
655
  case "fake.drift":
648
656
  return viewAt(x0, y0, from.zoom * lerp(1, v.scale, smooth(u)), ctx);
649
657
  default:
650
- throw new (0, _chunk5MQOBTNPcjs.EffectUnsupportedError)(`"${d.id}" is a ${d.kind} effect, not a camera move.`, d.id);
658
+ throw new (0, _chunkOPSK22DLcjs.EffectUnsupportedError)(`"${d.id}" is a ${d.kind} effect, not a camera move.`, d.id);
651
659
  }
652
660
  }
653
661
  function toFloat(p) {
654
662
  const f = new Float32Array(p.data.length);
655
663
  for (let i = 0; i < f.length; i += 4) {
656
- f[i] = _chunk5MQOBTNPcjs.srgbToLinear.call(void 0, p.data[i] / 255);
657
- f[i + 1] = _chunk5MQOBTNPcjs.srgbToLinear.call(void 0, p.data[i + 1] / 255);
658
- f[i + 2] = _chunk5MQOBTNPcjs.srgbToLinear.call(void 0, p.data[i + 2] / 255);
664
+ f[i] = _chunkOPSK22DLcjs.srgbToLinear.call(void 0, p.data[i] / 255);
665
+ f[i + 1] = _chunkOPSK22DLcjs.srgbToLinear.call(void 0, p.data[i + 1] / 255);
666
+ f[i + 2] = _chunkOPSK22DLcjs.srgbToLinear.call(void 0, p.data[i + 2] / 255);
659
667
  f[i + 3] = p.data[i + 3] / 255;
660
668
  }
661
- return _chunk5MQOBTNPcjs.encodeEffectFloat.call(void 0, { ...p, float: f });
669
+ return _chunkOPSK22DLcjs.encodeEffectFloat.call(void 0, { ...p, float: f });
662
670
  }
663
671
  function maskResult(out, mask, source, id) {
664
- if (!_chunk5MQOBTNPcjs.isEffectPixels.call(void 0, mask) || mask.width !== out.width || mask.height !== out.height) {
665
- throw new (0, _chunk5MQOBTNPcjs.EffectUnsupportedError)("The mask must be EffectPixels the size of the renderer.", id);
672
+ if (!_chunkOPSK22DLcjs.isEffectPixels.call(void 0, mask) || mask.width !== out.width || mask.height !== out.height) {
673
+ throw new (0, _chunkOPSK22DLcjs.EffectUnsupportedError)("The mask must be EffectPixels the size of the renderer.", id);
666
674
  }
667
675
  const o = out.data;
668
676
  for (let i = 0; i < o.length; i += 4) {
@@ -688,32 +696,32 @@ function createFakeEffectProvider(options = {}) {
688
696
  const byId = new Map(all.map((d) => [d.id, d]));
689
697
  const get = (id) => {
690
698
  const d = byId.get(id);
691
- if (!d) throw new (0, _chunk5MQOBTNPcjs.UnknownEffectError)(id, "the fake provider");
699
+ if (!d) throw new (0, _chunkOPSK22DLcjs.UnknownEffectError)(id, "the fake provider");
692
700
  return d;
693
701
  };
694
702
  const summaries = all.map(summaryOf);
695
703
  const camera = (id, ctx, values) => {
696
704
  const d = get(id);
697
- if (d.kind !== "camera") throw new (0, _chunk5MQOBTNPcjs.EffectUnsupportedError)(`"${id}" is a ${d.kind} effect, not a camera move.`, id);
698
- if (!(ctx.u >= 0 && ctx.u <= 1)) throw new (0, _chunk5MQOBTNPcjs.EffectUnsupportedError)(`u must be 0\u20131 through the move, got ${ctx.u}.`, id);
699
- return cameraViewOf(d, ctx, _chunk5MQOBTNPcjs.resolveEffectValues.call(void 0, d, values));
705
+ if (d.kind !== "camera") throw new (0, _chunkOPSK22DLcjs.EffectUnsupportedError)(`"${id}" is a ${d.kind} effect, not a camera move.`, id);
706
+ if (!(ctx.u >= 0 && ctx.u <= 1)) throw new (0, _chunkOPSK22DLcjs.EffectUnsupportedError)(`u must be 0\u20131 through the move, got ${ctx.u}.`, id);
707
+ return cameraViewOf(d, ctx, _chunkOPSK22DLcjs.resolveEffectValues.call(void 0, d, values));
700
708
  };
701
709
  const provider = {
702
710
  id: "fake",
703
711
  name: "Fake effects",
704
712
  version: "1",
705
713
  capabilities,
706
- list: (o) => _chunk5MQOBTNPcjs.searchEffectSummaries.call(void 0, summaries, "", o),
707
- search: (q, o) => _chunk5MQOBTNPcjs.searchEffectSummaries.call(void 0, summaries, q, o),
714
+ list: (o) => _chunkOPSK22DLcjs.searchEffectSummaries.call(void 0, summaries, "", o),
715
+ search: (q, o) => _chunkOPSK22DLcjs.searchEffectSummaries.call(void 0, summaries, q, o),
708
716
  describe: (id) => structuredClone(get(id)),
709
717
  createRenderer(id, ro) {
710
718
  const d = get(id);
711
- if (d.kind === "camera") throw new (0, _chunk5MQOBTNPcjs.EffectUnsupportedError)(`"${id}" is a camera move: it moves a scene's camera and draws no pixels. Use cameraView.`, id);
712
- if (d.kind !== "shader") throw new (0, _chunk5MQOBTNPcjs.EffectUnsupportedError)(`"${id}" is a ${d.kind} effect; use applyVectorEffect.`, id);
719
+ if (d.kind === "camera") throw new (0, _chunkOPSK22DLcjs.EffectUnsupportedError)(`"${id}" is a camera move: it moves a scene's camera and draws no pixels. Use cameraView.`, id);
720
+ if (d.kind !== "shader") throw new (0, _chunkOPSK22DLcjs.EffectUnsupportedError)(`"${id}" is a ${d.kind} effect; use applyVectorEffect.`, id);
713
721
  const { width, height } = ro;
714
722
  const depth = _nullishCoalesce(ro.depth, () => ( 8));
715
723
  if (!(width > 0 && height > 0) || width > capabilities.maxSize || height > capabilities.maxSize) {
716
- throw new (0, _chunk5MQOBTNPcjs.EffectUnsupportedError)(`Renderer size ${width}\xD7${height} is outside 1\u2013${capabilities.maxSize}.`, id);
724
+ throw new (0, _chunkOPSK22DLcjs.EffectUnsupportedError)(`Renderer size ${width}\xD7${height} is outside 1\u2013${capabilities.maxSize}.`, id);
717
725
  }
718
726
  let disposed = false;
719
727
  return {
@@ -722,15 +730,15 @@ function createFakeEffectProvider(options = {}) {
722
730
  height,
723
731
  depth,
724
732
  async render(request) {
725
- if (disposed) throw new (0, _chunk5MQOBTNPcjs.EffectDisposedError)(id);
733
+ if (disposed) throw new (0, _chunkOPSK22DLcjs.EffectDisposedError)(id);
726
734
  if (!Number.isFinite(request.time) || request.time < 0) {
727
- throw new (0, _chunk5MQOBTNPcjs.EffectUnsupportedError)(`time must be a finite number of ms \u2265 0, got ${request.time}.`, id);
735
+ throw new (0, _chunkOPSK22DLcjs.EffectUnsupportedError)(`time must be a finite number of ms \u2265 0, got ${request.time}.`, id);
728
736
  }
729
- const values = _chunk5MQOBTNPcjs.resolveEffectValues.call(void 0, d, request.values);
737
+ const values = _chunkOPSK22DLcjs.resolveEffectValues.call(void 0, d, request.values);
730
738
  _optionalChain([options, 'access', _26 => _26.onRender, 'optionalCall', _27 => _27(id, request)]);
731
739
  const out = renderPixels(d, values, request, width, height);
732
740
  if (request.mask) {
733
- if (!capabilities.supportsMask) throw new (0, _chunk5MQOBTNPcjs.EffectUnsupportedError)("This provider does not take masks.", id);
741
+ if (!capabilities.supportsMask) throw new (0, _chunkOPSK22DLcjs.EffectUnsupportedError)("This provider does not take masks.", id);
734
742
  const source = d.uses.includes("filter") ? _optionalChain([request, 'access', _28 => _28.inputs, 'optionalAccess', _29 => _29.source]) : void 0;
735
743
  maskResult(out, request.mask, source, id);
736
744
  }
@@ -743,8 +751,8 @@ function createFakeEffectProvider(options = {}) {
743
751
  },
744
752
  applyVectorEffect(id, target, values) {
745
753
  const d = get(id);
746
- if (d.kind !== "motion" && d.kind !== "vector") throw new (0, _chunk5MQOBTNPcjs.EffectUnsupportedError)(`"${id}" is a ${d.kind} effect, not a vector one.`, id);
747
- const v = _chunk5MQOBTNPcjs.resolveEffectValues.call(void 0, d, values);
754
+ if (d.kind !== "motion" && d.kind !== "vector") throw new (0, _chunkOPSK22DLcjs.EffectUnsupportedError)(`"${id}" is a ${d.kind} effect, not a vector one.`, id);
755
+ const v = _chunkOPSK22DLcjs.resolveEffectValues.call(void 0, d, values);
748
756
  if (d.kind === "vector") {
749
757
  return { svg: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100"><circle id="badge" cx="50" cy="50" r="40" fill="${v.color}"/></svg>`, animate: [{ id: "badge", ms: v.ms, attrs: { opacity: [0, 1] } }], duration: v.ms, loop: false };
750
758
  }
@@ -764,11 +772,11 @@ function createFakeEffectProvider(options = {}) {
764
772
  sampleCameraMove: (id, request) => {
765
773
  const d = get(id);
766
774
  const { from, to, ms, stage, fps, values } = request;
767
- return _chunk5MQOBTNPcjs.sampleCameraViews.call(void 0, (u) => camera(id, { from, to, u, ms, stage }, values), { ms, fps, cut: _optionalChain([d, 'access', _30 => _30.camera, 'optionalAccess', _31 => _31.cut]) });
775
+ return _chunkOPSK22DLcjs.sampleCameraViews.call(void 0, (u) => camera(id, { from, to, u, ms, stage }, values), { ms, fps, cut: _optionalChain([d, 'access', _30 => _30.camera, 'optionalAccess', _31 => _31.cut]) });
768
776
  }
769
777
  } : {},
770
778
  ...supportsAuthoring ? {
771
- openAuthoring: (from) => _chunkK5GXW5TRcjs.createEffectAuthoringSession.call(void 0, from, { provider })
779
+ openAuthoring: (from) => _chunkC73U5UI3cjs.createEffectAuthoringSession.call(void 0, from, { provider })
772
780
  } : {}
773
781
  };
774
782
  return provider;
@@ -849,7 +857,7 @@ var effectFieldValue = (field, value) => {
849
857
  return value === void 0 || value === null || typeof value === "object" && !Array.isArray(value) ? field.default : value;
850
858
  };
851
859
  function effectSamplePicture(width, height, variant = 0) {
852
- const p = _chunk5MQOBTNPcjs.createEffectPixels.call(void 0, width, height);
860
+ const p = _chunkOPSK22DLcjs.createEffectPixels.call(void 0, width, height);
853
861
  for (let y = 0, i = 0; y < height; y++) {
854
862
  for (let x = 0; x < width; x++, i += 4) {
855
863
  const u = x / Math.max(1, width - 1);
@@ -1336,4 +1344,12 @@ function createEffectAuthoringToolProvider(host, options) {
1336
1344
 
1337
1345
 
1338
1346
 
1339
- exports.CAMERA_MOVE_ROLES = _chunk5MQOBTNPcjs.CAMERA_MOVE_ROLES; exports.EFFECT_ERROR_CODES = _chunk5MQOBTNPcjs.EFFECT_ERROR_CODES; exports.EFFECT_KINDS = _chunk5MQOBTNPcjs.EFFECT_KINDS; exports.EFFECT_USES = _chunk5MQOBTNPcjs.EFFECT_USES; exports.EFFECT_USE_LABELS = EFFECT_USE_LABELS; exports.EffectControlError = _chunk5MQOBTNPcjs.EffectControlError; exports.EffectDisposedError = _chunk5MQOBTNPcjs.EffectDisposedError; exports.EffectError = _chunk5MQOBTNPcjs.EffectError; exports.EffectRendererPool = _chunkPY4GWSE2cjs.EffectRendererPool; exports.EffectUnsupportedError = _chunk5MQOBTNPcjs.EffectUnsupportedError; exports.EffectsSlot = _chunk5MQOBTNPcjs.EffectsSlot; exports.NoEffectsProviderError = _chunk5MQOBTNPcjs.NoEffectsProviderError; exports.UnknownEffectError = _chunk5MQOBTNPcjs.UnknownEffectError; exports.applyEffectMask = _chunk5MQOBTNPcjs.applyEffectMask; exports.checkEffectProvider = checkEffectProvider; exports.countEffectTags = _chunk5MQOBTNPcjs.countEffectTags; exports.createEffectAuthoringSession = _chunkK5GXW5TRcjs.createEffectAuthoringSession; exports.createEffectAuthoringToolProvider = createEffectAuthoringToolProvider; exports.createEffectPixels = _chunk5MQOBTNPcjs.createEffectPixels; exports.createEffectToolProvider = _chunk5MQOBTNPcjs.createEffectToolProvider; exports.createFakeEffectProvider = createFakeEffectProvider; exports.effectControlField = effectControlField; exports.effectFieldValue = effectFieldValue; exports.effectFontFamilies = effectFontFamilies; exports.effectOffered = _chunk5MQOBTNPcjs.effectOffered; exports.effectParameterFields = effectParameterFields; exports.effectSampleInputs = effectSampleInputs; exports.effectSamplePicture = effectSamplePicture; exports.effectValueErrors = _chunk5MQOBTNPcjs.effectValueErrors; exports.encodeEffectFloat = _chunk5MQOBTNPcjs.encodeEffectFloat; exports.groupEffectsByCategory = groupEffectsByCategory; exports.hasEffectTags = _chunk5MQOBTNPcjs.hasEffectTags; exports.isCameraView = _chunk5MQOBTNPcjs.isCameraView; exports.isEffectError = _chunk5MQOBTNPcjs.isEffectError; exports.isEffectFontControl = isEffectFontControl; exports.isEffectPixels = _chunk5MQOBTNPcjs.isEffectPixels; exports.linearToSrgb = _chunk5MQOBTNPcjs.linearToSrgb; exports.normaliseEffectTag = _chunk5MQOBTNPcjs.normaliseEffectTag; exports.renderEffectThumbnail = renderEffectThumbnail; exports.resolveEffectValues = _chunk5MQOBTNPcjs.resolveEffectValues; exports.sampleCameraViews = _chunk5MQOBTNPcjs.sampleCameraViews; exports.sampleEffectCameraMove = _chunk5MQOBTNPcjs.sampleEffectCameraMove; exports.searchEffectSummaries = _chunk5MQOBTNPcjs.searchEffectSummaries; exports.srgbToLinear = _chunk5MQOBTNPcjs.srgbToLinear;
1347
+
1348
+
1349
+
1350
+
1351
+
1352
+
1353
+
1354
+
1355
+ exports.CAMERA_MOVE_MAX_MS = _chunkOPSK22DLcjs.CAMERA_MOVE_MAX_MS; exports.CAMERA_MOVE_ROLES = _chunkOPSK22DLcjs.CAMERA_MOVE_ROLES; exports.EFFECT_ERROR_CODES = _chunkOPSK22DLcjs.EFFECT_ERROR_CODES; exports.EFFECT_KINDS = _chunkOPSK22DLcjs.EFFECT_KINDS; exports.EFFECT_USES = _chunkOPSK22DLcjs.EFFECT_USES; exports.EFFECT_USE_LABELS = EFFECT_USE_LABELS; exports.EffectControlError = _chunkOPSK22DLcjs.EffectControlError; exports.EffectDisposedError = _chunkOPSK22DLcjs.EffectDisposedError; exports.EffectError = _chunkOPSK22DLcjs.EffectError; exports.EffectRendererPool = _chunkPY4GWSE2cjs.EffectRendererPool; exports.EffectUnsupportedError = _chunkOPSK22DLcjs.EffectUnsupportedError; exports.EffectsSlot = _chunkOPSK22DLcjs.EffectsSlot; exports.NoEffectsProviderError = _chunkOPSK22DLcjs.NoEffectsProviderError; exports.UnknownEffectError = _chunkOPSK22DLcjs.UnknownEffectError; exports.applyEffectMask = _chunkOPSK22DLcjs.applyEffectMask; exports.cameraBoxOfView = _chunkOPSK22DLcjs.cameraBoxOfView; exports.cameraMoveField = _chunkOPSK22DLcjs.cameraMoveField; exports.cameraMoveIdList = _chunkOPSK22DLcjs.cameraMoveIdList; exports.cameraMoveParts = _chunkOPSK22DLcjs.cameraMoveParts; exports.cameraMovesFor = _chunkOPSK22DLcjs.cameraMovesFor; exports.cameraViewOfBox = _chunkOPSK22DLcjs.cameraViewOfBox; exports.checkEffectProvider = checkEffectProvider; exports.countEffectTags = _chunkOPSK22DLcjs.countEffectTags; exports.createEffectAuthoringSession = _chunkC73U5UI3cjs.createEffectAuthoringSession; exports.createEffectAuthoringToolProvider = createEffectAuthoringToolProvider; exports.createEffectPixels = _chunkOPSK22DLcjs.createEffectPixels; exports.createEffectToolProvider = _chunkOPSK22DLcjs.createEffectToolProvider; exports.createFakeEffectProvider = createFakeEffectProvider; exports.effectControlField = effectControlField; exports.effectFieldValue = effectFieldValue; exports.effectFontFamilies = effectFontFamilies; exports.effectOffered = _chunkOPSK22DLcjs.effectOffered; exports.effectParameterFields = effectParameterFields; exports.effectSampleInputs = effectSampleInputs; exports.effectSamplePicture = effectSamplePicture; exports.effectValueErrors = _chunkOPSK22DLcjs.effectValueErrors; exports.encodeEffectFloat = _chunkOPSK22DLcjs.encodeEffectFloat; exports.groupEffectsByCategory = groupEffectsByCategory; exports.hasEffectTags = _chunkOPSK22DLcjs.hasEffectTags; exports.isCameraView = _chunkOPSK22DLcjs.isCameraView; exports.isEffectError = _chunkOPSK22DLcjs.isEffectError; exports.isEffectFontControl = isEffectFontControl; exports.isEffectPixels = _chunkOPSK22DLcjs.isEffectPixels; exports.linearToSrgb = _chunkOPSK22DLcjs.linearToSrgb; exports.normaliseEffectTag = _chunkOPSK22DLcjs.normaliseEffectTag; exports.renderEffectThumbnail = renderEffectThumbnail; exports.resolveCameraMoveSpec = _chunkOPSK22DLcjs.resolveCameraMoveSpec; exports.resolveEffectValues = _chunkOPSK22DLcjs.resolveEffectValues; exports.sampleCameraViews = _chunkOPSK22DLcjs.sampleCameraViews; exports.sampleEffectCameraMove = _chunkOPSK22DLcjs.sampleEffectCameraMove; exports.searchEffectSummaries = _chunkOPSK22DLcjs.searchEffectSummaries; exports.srgbToLinear = _chunkOPSK22DLcjs.srgbToLinear;
@@ -3,11 +3,12 @@ import {
3
3
  } from "../chunk-N4ZXW3WB.js";
4
4
  import {
5
5
  createEffectAuthoringSession
6
- } from "../chunk-PB6JV62G.js";
6
+ } from "../chunk-SBPGIZQN.js";
7
7
  import {
8
8
  EffectRendererPool
9
9
  } from "../chunk-EHLOCVWB.js";
10
10
  import {
11
+ CAMERA_MOVE_MAX_MS,
11
12
  CAMERA_MOVE_ROLES,
12
13
  EFFECT_ERROR_CODES,
13
14
  EFFECT_KINDS,
@@ -20,6 +21,12 @@ import {
20
21
  NoEffectsProviderError,
21
22
  UnknownEffectError,
22
23
  applyEffectMask,
24
+ cameraBoxOfView,
25
+ cameraMoveField,
26
+ cameraMoveIdList,
27
+ cameraMoveParts,
28
+ cameraMovesFor,
29
+ cameraViewOfBox,
23
30
  countEffectTags,
24
31
  createEffectPixels,
25
32
  createEffectToolProvider,
@@ -32,12 +39,13 @@ import {
32
39
  isEffectPixels,
33
40
  linearToSrgb,
34
41
  normaliseEffectTag,
42
+ resolveCameraMoveSpec,
35
43
  resolveEffectValues,
36
44
  sampleCameraViews,
37
45
  sampleEffectCameraMove,
38
46
  searchEffectSummaries,
39
47
  srgbToLinear
40
- } from "../chunk-UGYUGZE2.js";
48
+ } from "../chunk-TCZ2J7PR.js";
41
49
  import "../chunk-V2ZCJRDM.js";
42
50
  import "../chunk-RNSANXPT.js";
43
51
  import {
@@ -1292,6 +1300,7 @@ function createEffectAuthoringToolProvider(host, options) {
1292
1300
  };
1293
1301
  }
1294
1302
  export {
1303
+ CAMERA_MOVE_MAX_MS,
1295
1304
  CAMERA_MOVE_ROLES,
1296
1305
  EFFECT_ERROR_CODES,
1297
1306
  EFFECT_KINDS,
@@ -1306,6 +1315,12 @@ export {
1306
1315
  NoEffectsProviderError,
1307
1316
  UnknownEffectError,
1308
1317
  applyEffectMask,
1318
+ cameraBoxOfView,
1319
+ cameraMoveField,
1320
+ cameraMoveIdList,
1321
+ cameraMoveParts,
1322
+ cameraMovesFor,
1323
+ cameraViewOfBox,
1309
1324
  checkEffectProvider,
1310
1325
  countEffectTags,
1311
1326
  createEffectAuthoringSession,
@@ -1331,6 +1346,7 @@ export {
1331
1346
  linearToSrgb,
1332
1347
  normaliseEffectTag,
1333
1348
  renderEffectThumbnail,
1349
+ resolveCameraMoveSpec,
1334
1350
  resolveEffectValues,
1335
1351
  sampleCameraViews,
1336
1352
  sampleEffectCameraMove,
@@ -214,6 +214,21 @@ export interface CameraView {
214
214
  /** Direction the blur streaks, degrees on screen (0 horizontal, 90 vertical); absent when it blurs every way (a zoom or a turn). */
215
215
  blurAngle?: number;
216
216
  }
217
+ /**
218
+ * A camera move as a document names it (the shape of Flair's `CameraMoveSpec`): the move's id, or
219
+ * the id with a preset, values and a length. Editors save it on a shot (`in` for a `transition`
220
+ * move, `during` for a `hold`).
221
+ */
222
+ export type CameraMoveSpec = string | {
223
+ /** The camera effect's id. */
224
+ move: string;
225
+ /** Length of a `transition` move (ms); default its `durationMs`. A `hold` plays across the shot's hold and takes none. */
226
+ ms?: number;
227
+ /** The preset its values came from, by name. */
228
+ preset?: string;
229
+ /** Control values over the move's defaults (a preset's values are written out here too). */
230
+ values?: Record<string, EffectValue>;
231
+ };
217
232
  /** The stage a camera looks at, in pixels. */
218
233
  export interface CameraStage {
219
234
  width: number;
@@ -214,6 +214,21 @@ export interface CameraView {
214
214
  /** Direction the blur streaks, degrees on screen (0 horizontal, 90 vertical); absent when it blurs every way (a zoom or a turn). */
215
215
  blurAngle?: number;
216
216
  }
217
+ /**
218
+ * A camera move as a document names it (the shape of Flair's `CameraMoveSpec`): the move's id, or
219
+ * the id with a preset, values and a length. Editors save it on a shot (`in` for a `transition`
220
+ * move, `during` for a `hold`).
221
+ */
222
+ export type CameraMoveSpec = string | {
223
+ /** The camera effect's id. */
224
+ move: string;
225
+ /** Length of a `transition` move (ms); default its `durationMs`. A `hold` plays across the shot's hold and takes none. */
226
+ ms?: number;
227
+ /** The preset its values came from, by name. */
228
+ preset?: string;
229
+ /** Control values over the move's defaults (a preset's values are written out here too). */
230
+ values?: Record<string, EffectValue>;
231
+ };
217
232
  /** The stage a camera looks at, in pixels. */
218
233
  export interface CameraStage {
219
234
  width: number;