@pixerate/editor 0.253.0 → 0.254.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.
@@ -11,9 +11,10 @@ import type { FlairSvgAnimation } from '../animation-editor/flair.js';
11
11
  import type { EffectAuthoringSession, EffectAuthoringSource } from './authoring.js';
12
12
  /**
13
13
  * How an effect is drawn: a pixel shader, an animated vector picture, motion applied to someone
14
- * else's vector art, or a camera move, which moves a scene's camera and draws no pixels.
14
+ * else's vector art, a camera move, which moves a scene's camera and draws no pixels, or a
15
+ * timing effect, which retimes video footage and draws no pixels of its own.
15
16
  */
16
- export type EffectKind = 'shader' | 'vector' | 'motion' | 'camera';
17
+ export type EffectKind = 'shader' | 'vector' | 'motion' | 'camera' | 'timing';
17
18
  /**
18
19
  * What an effect is for. An effect may have several uses.
19
20
  *
@@ -26,8 +27,10 @@ export type EffectKind = 'shader' | 'vector' | 'motion' | 'camera';
26
27
  * - `interactive`: reacts to pointer, scroll or audio input at run time.
27
28
  * - `camera`: moves a scene's camera (`cameraView`). Only `camera` effects have it, and they have
28
29
  * no other use, so editors that draw pixels never offer them.
30
+ * - `timing`: retimes video footage (`timingSample`): slow motion, a reverse, a freeze, a long
31
+ * exposure. Only `timing` effects have it, and they have no other use.
29
32
  */
30
- export type EffectUse = 'filter' | 'transition' | 'generator' | 'overlay' | 'title' | 'motion' | 'interactive' | 'camera';
33
+ export type EffectUse = 'filter' | 'transition' | 'generator' | 'overlay' | 'title' | 'motion' | 'interactive' | 'camera' | 'timing';
31
34
  export declare const EFFECT_KINDS: readonly EffectKind[];
32
35
  export declare const EFFECT_USES: readonly EffectUse[];
33
36
  /**
@@ -66,7 +69,10 @@ export interface EffectSummary {
66
69
  transparent: boolean;
67
70
  /** True when the effect loops; its `duration` is then one cycle. */
68
71
  loop: boolean;
69
- /** Length of one play (ms). Absent for effects that do not change over time. */
72
+ /**
73
+ * Length of one play (ms). Absent for effects that do not change over time, and for `timing`
74
+ * effects, whose length depends on their footage (`timingLength`).
75
+ */
70
76
  duration?: number;
71
77
  /**
72
78
  * The control (a number from 0 to 1) setting how opaque the effect's own background is: at 0
@@ -300,6 +306,59 @@ export interface CameraMoveSample {
300
306
  /** Ms of the cut, when the move has one. */
301
307
  cut?: number;
302
308
  }
309
+ /** The frame rate footage is taken to have when a timing request does not say. */
310
+ export declare const TIMING_DEFAULT_FPS = 30;
311
+ /** Most footage frames one retimed frame blends (`TimingSample.frames`). */
312
+ export declare const TIMING_MAX_FRAMES = 128;
313
+ /** Highest footage frame rate a timing request may give. */
314
+ export declare const TIMING_MAX_FPS = 240;
315
+ /**
316
+ * How a retimed frame's footage frames combine (straight-alpha RGBA in, straight alpha out;
317
+ * `blendTimingFrames` is the reference):
318
+ *
319
+ * - `average`: the weighted mean in premultiplied alpha, so transparent edges do not darken.
320
+ * Colour is Σ(c·a·w) / Σ(a·w) and alpha Σ(a·w) / Σw, with `a` the frame's alpha (0–1).
321
+ * - `lighten`: each channel's brightest. Every frame is first scaled by `weight / maxWeight`
322
+ * (`k`): colour by `a·k`, alpha by `k`. The result keeps the largest scaled colour and the
323
+ * largest scaled alpha, and its colour is not divided back up by its alpha, so a faded trail
324
+ * stays dimmer.
325
+ *
326
+ * A single frame is shown as it is either way.
327
+ */
328
+ export type TimingBlend = 'average' | 'lighten';
329
+ export declare const TIMING_BLENDS: readonly TimingBlend[];
330
+ /** Where a retimed frame is: what `timingSample` takes. */
331
+ export interface TimingSampleRequest {
332
+ /** Ms into the retimed clip (any finite number; frames are held within the footage). */
333
+ time: number;
334
+ /** Length of the footage (ms); > 0. */
335
+ footage: number;
336
+ /** Footage frames per second, > 0 and at most `TIMING_MAX_FPS`. Default `TIMING_DEFAULT_FPS`. */
337
+ fps?: number;
338
+ }
339
+ /** One footage frame of a retimed frame. */
340
+ export interface TimingFrame {
341
+ /** Footage time (ms): the start of a frame, `index * 1000 / fps`. */
342
+ time: number;
343
+ /** Share of the blend, > 0; a sample's weights add up to 1. */
344
+ weight: number;
345
+ }
346
+ /**
347
+ * The footage frames one retimed frame is made of, and how to blend them. The host decodes the
348
+ * frames from its own footage and blends them (`blendTimingFrames` does it for `EffectPixels`).
349
+ *
350
+ * - Each `time` is a footage frame's start, `index * 1000 / fps` with a whole `index` from 0 to
351
+ * the footage's last frame (`ceil(footage * fps / 1000) - 1`): a time before the footage is held
352
+ * on its first frame and one after it on its last.
353
+ * - Times are distinct (frames that land on the same footage frame are merged, their weights
354
+ * added), sorted earliest first, and at most `TIMING_MAX_FRAMES` (spaced evenly when an effect
355
+ * wants more).
356
+ * - Weights are > 0 and add up to 1.
357
+ */
358
+ export interface TimingSample {
359
+ frames: readonly TimingFrame[];
360
+ blend: TimingBlend;
361
+ }
303
362
  /** A box in a sequence's stage units (pixels of `EffectSequence.stage`). */
304
363
  export interface EffectRect {
305
364
  x: number;
@@ -516,6 +575,8 @@ export interface EffectProviderCapabilities {
516
575
  supportsAuthoring?: boolean;
517
576
  /** Lists `camera` effects and implements `cameraView` (and maybe `sampleCameraMove`). */
518
577
  supportsCamera?: boolean;
578
+ /** Lists `timing` effects and implements `timingLength` and `timingSample`. */
579
+ supportsTiming?: boolean;
519
580
  /** Implements `listTemplates`, `describeTemplate` and `instantiateTemplate`. */
520
581
  supportsTemplates?: boolean;
521
582
  }
@@ -539,7 +600,8 @@ export interface EffectProvider {
539
600
  describe(id: string): MaybePromise<EffectDescription>;
540
601
  /**
541
602
  * A pixel renderer. A `vector` effect may refuse with `EffectUnsupportedError` where it cannot
542
- * lay out SVG (a Worker); a `camera` effect draws no pixels and may refuse with one saying so.
603
+ * lay out SVG (a Worker); `camera` and `timing` effects draw no pixels of their own and may
604
+ * refuse with one saying so.
543
605
  */
544
606
  createRenderer(id: string, options: EffectRendererOptions): MaybePromise<EffectRenderer>;
545
607
  /**
@@ -573,6 +635,23 @@ export interface EffectProvider {
573
635
  * `sampleEffectCameraMove` falls back to `cameraView` per frame. Errors as for `cameraView`.
574
636
  */
575
637
  sampleCameraMove?(id: string, request: CameraMoveSampleRequest): MaybePromise<CameraMoveSample>;
638
+ /**
639
+ * Ms a timing effect's retimed clip lasts for footage `footageMs` long (a speed change stretches
640
+ * or squeezes it, a freeze adds its hold, a boomerang goes there and back); > 0. Present when
641
+ * `capabilities.supportsTiming`. Synchronous and pure. Unknown ids throw `UnknownEffectError`,
642
+ * invalid values `EffectControlError`, and an effect that is not a timing effect (or a footage
643
+ * length that is not a number of ms > 0) `EffectUnsupportedError`, each with a sentence naming
644
+ * what is valid.
645
+ */
646
+ timingLength?(id: string, footageMs: number, values?: EffectValues): number;
647
+ /**
648
+ * The footage frames retimed frame `request.time` shows and how to blend them (see
649
+ * `TimingSample` for exactly what it holds). Present when `capabilities.supportsTiming`.
650
+ * Synchronous and pure: a frame can be drawn on its own, in any order, and the same id,
651
+ * request and values always give the same sample. Errors as for `timingLength`; a time that is
652
+ * not finite or an `fps` outside 0–`TIMING_MAX_FPS` also throw `EffectUnsupportedError`.
653
+ */
654
+ timingSample?(id: string, request: TimingSampleRequest, values?: EffectValues): TimingSample;
576
655
  /** Sequence templates, best match first. Present when `capabilities.supportsTemplates`. */
577
656
  listTemplates?(options?: EffectTemplateSearchOptions): MaybePromise<readonly EffectTemplateSummary[]>;
578
657
  /** A template with its slots. Unknown ids throw `UnknownTemplateError`. */
@@ -765,7 +765,7 @@ var _chunkPY4GWSE2cjs = require('../chunk-PY4GWSE2.cjs');
765
765
 
766
766
 
767
767
 
768
- var _chunkISIO63Q5cjs = require('../chunk-ISIO63Q5.cjs');
768
+ var _chunkL2JTLW6Bcjs = require('../chunk-L2JTLW6B.cjs');
769
769
  require('../chunk-WOFXZ3XU.cjs');
770
770
 
771
771
 
@@ -4857,10 +4857,10 @@ var IMAGE_EFFECT_PLACES = {
4857
4857
  };
4858
4858
  function checkImageEffectPlace(d, place) {
4859
4859
  const allowed = IMAGE_EFFECT_PLACES[place];
4860
- const takesLayer = place === "filter" && _chunkISIO63Q5cjs.layerImageInput.call(void 0, d) !== null;
4860
+ const takesLayer = place === "filter" && _chunkL2JTLW6Bcjs.layerImageInput.call(void 0, d) !== null;
4861
4861
  if (d.kind === "motion" || !takesLayer && !d.uses.some((u) => allowed.includes(u))) {
4862
4862
  const instead = place === "filter" && d.uses.some((u) => IMAGE_EFFECT_PLACES.layer.includes(u)) ? "; add it as an effect layer with add_effect_layer instead" : place === "layer" && d.uses.includes("filter") ? "; apply it to a layer as a smart filter with apply_effect instead" : "";
4863
- throw new (0, _chunkISIO63Q5cjs.EffectUnsupportedError)(
4863
+ throw new (0, _chunkL2JTLW6Bcjs.EffectUnsupportedError)(
4864
4864
  `"${d.id}" (${d.name}) is a ${d.uses.join(" / ")} effect, and ${place === "filter" ? "a smart filter takes filter effects" : "an effect layer takes generator, overlay or title effects"}${instead}.`,
4865
4865
  d.id
4866
4866
  );
@@ -4884,9 +4884,9 @@ function effectPixelsToSurface(p, depth) {
4884
4884
  const d = new Uint16Array(f.length);
4885
4885
  const code = (v) => v > 0 ? v < 1 ? Math.round(v * 65535) : 65535 : 0;
4886
4886
  for (let i = 0; i < f.length; i += 4) {
4887
- d[i] = code(_chunkISIO63Q5cjs.linearToSrgb.call(void 0, f[i]));
4888
- d[i + 1] = code(_chunkISIO63Q5cjs.linearToSrgb.call(void 0, f[i + 1]));
4889
- d[i + 2] = code(_chunkISIO63Q5cjs.linearToSrgb.call(void 0, f[i + 2]));
4887
+ d[i] = code(_chunkL2JTLW6Bcjs.linearToSrgb.call(void 0, f[i]));
4888
+ d[i + 1] = code(_chunkL2JTLW6Bcjs.linearToSrgb.call(void 0, f[i + 1]));
4889
+ d[i + 2] = code(_chunkL2JTLW6Bcjs.linearToSrgb.call(void 0, f[i + 2]));
4890
4890
  d[i + 3] = code(f[i + 3]);
4891
4891
  }
4892
4892
  return _chunk2VX55NFMcjs.surfaceFromDeepPixels.call(void 0, { width: p.width, height: p.height, data: d }, 4);
@@ -4903,7 +4903,7 @@ var ImageEffectsEngine = (_class9 = class {
4903
4903
  __init49() {this.generation = 0}
4904
4904
 
4905
4905
  constructor(options = {}) {;_class9.prototype.__init44.call(this);_class9.prototype.__init45.call(this);_class9.prototype.__init46.call(this);_class9.prototype.__init47.call(this);_class9.prototype.__init48.call(this);_class9.prototype.__init49.call(this);
4906
- this.slot = _nullishCoalesce(options.slot, () => ( new (0, _chunkISIO63Q5cjs.EffectsSlot)()));
4906
+ this.slot = _nullishCoalesce(options.slot, () => ( new (0, _chunkL2JTLW6Bcjs.EffectsSlot)()));
4907
4907
  this.maxEntries = _nullishCoalesce(options.maxEntries, () => ( 24));
4908
4908
  this.pool = new (0, _chunkPY4GWSE2cjs.EffectRendererPool)({ maxRenderers: options.maxRenderers });
4909
4909
  this.detach = this.slot.subscribe(() => {
@@ -4951,7 +4951,7 @@ var ImageEffectsEngine = (_class9 = class {
4951
4951
  /** A filter effect over `source`: its result, or (for an overlay) the effect drawn over it. */
4952
4952
  async filter(provider, effect, values, source) {
4953
4953
  const d = await this.describe(provider, effect);
4954
- const input = _chunkISIO63Q5cjs.layerImageInput.call(void 0, d);
4954
+ const input = _chunkL2JTLW6Bcjs.layerImageInput.call(void 0, d);
4955
4955
  const out = await this.render(provider, effect, source.width, source.height, 8, { time: 0, values, ...input ? { inputs: { [input]: source } } : {} });
4956
4956
  return input ? out.data : over(source.data, out.data);
4957
4957
  }
@@ -4963,7 +4963,7 @@ var ImageEffectsEngine = (_class9 = class {
4963
4963
  const provider = this.slot.require();
4964
4964
  const depth = _nullishCoalesce(size.depth, () => ( 8));
4965
4965
  const out = await this.render(provider, effect, size.width, size.height, depth, { time: _nullishCoalesce(size.time, () => ( 0)), values });
4966
- return out.width === size.width && out.height === size.height ? out : _chunkISIO63Q5cjs.createEffectPixels.call(void 0, size.width, size.height);
4966
+ return out.width === size.width && out.height === size.height ? out : _chunkL2JTLW6Bcjs.createEffectPixels.call(void 0, size.width, size.height);
4967
4967
  }
4968
4968
  /** Why the result for `key` failed, if it did. */
4969
4969
  failure(key2) {
@@ -6225,7 +6225,7 @@ var ImageEditorController = (_class12 = class {
6225
6225
  __init84() {this.selectionWorker = null}
6226
6226
  __init85() {this.documentOpener = null}
6227
6227
  /** The effects provider slot (see `setEffectsProvider`). */
6228
- __init86() {this.effects = new (0, _chunkISIO63Q5cjs.EffectsSlot)()}
6228
+ __init86() {this.effects = new (0, _chunkL2JTLW6Bcjs.EffectsSlot)()}
6229
6229
  /** Renders provider effects: effect smart filter results and effect layers. */
6230
6230
  __init87() {this.effectsEngine = new ImageEffectsEngine({ slot: this.effects })}
6231
6231
  __init88() {this.effectRefresh = "none"}
@@ -6561,7 +6561,7 @@ var ImageEditorController = (_class12 = class {
6561
6561
  */
6562
6562
  async applyEffectFilter(layerId, effect, options = {}) {
6563
6563
  const d = await this.describeEffect(effect, "filter");
6564
- const values = _chunkISIO63Q5cjs.resolveEffectValues.call(void 0, d, options.values);
6564
+ const values = _chunkL2JTLW6Bcjs.resolveEffectValues.call(void 0, d, options.values);
6565
6565
  const found = _chunkDPYAO5U6cjs.findLayer.call(void 0, this.state.layers, layerId);
6566
6566
  if (!found) throw new (0, _chunkJFHBXNR2cjs.LayerOperationError)(`There is no layer "${layerId}"; call list_layers for the layer ids.`);
6567
6567
  let layers = this.state.layers;
@@ -6603,7 +6603,7 @@ var ImageEditorController = (_class12 = class {
6603
6603
  else if (k in d.controls.properties) base[k] = d.defaults[k];
6604
6604
  else throw new (0, _chunkJFHBXNR2cjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
6605
6605
  }
6606
- update.values = { ...base, ..._chunkISIO63Q5cjs.resolveEffectValues.call(void 0, { ...d, defaults: base }, given) };
6606
+ update.values = { ...base, ..._chunkL2JTLW6Bcjs.resolveEffectValues.call(void 0, { ...d, defaults: base }, given) };
6607
6607
  }
6608
6608
  for (const k of ["enabled", "blend", "opacity", "preserveTransparency"]) if (changes[k] !== void 0) update[k] = changes[k];
6609
6609
  let res = _chunkJFHBXNR2cjs.updateSmartFilter.call(void 0, this.state.layers, layerId, filterId, update, this.canvasSize);
@@ -6630,7 +6630,7 @@ var ImageEditorController = (_class12 = class {
6630
6630
  const id = options.id && !ids.has(options.id) ? options.id : _chunkJFHBXNR2cjs.newLayerId.call(void 0, );
6631
6631
  const placed = _chunkJFHBXNR2cjs.placeLayer.call(void 0, this.state.layers, { type: "pixel", id, name: "", visible: true, opacity: 1, blend: "normal", surface: _chunk474IQG74cjs.emptySurface.call(void 0, 4), offset: { x: 0, y: 0 } }, this.newLayerPlacement(options));
6632
6632
  if (options.clipped) requireClipBase(placed, id);
6633
- const values = _chunkISIO63Q5cjs.resolveEffectValues.call(void 0, d, withBackgroundOpacity(d, options.values, hasLayersBelow(placed, id)));
6633
+ const values = _chunkL2JTLW6Bcjs.resolveEffectValues.call(void 0, d, withBackgroundOpacity(d, options.values, hasLayersBelow(placed, id)));
6634
6634
  const { width, height } = this.naturalSize;
6635
6635
  const pixels = await this.effectsEngine.renderLayer(d.id, values, { width, height, depth: this.bitDepth, time });
6636
6636
  const layer = {
@@ -6675,7 +6675,7 @@ var ImageEditorController = (_class12 = class {
6675
6675
  else if (k in d.controls.properties) base[k] = d.defaults[k];
6676
6676
  else throw new (0, _chunkJFHBXNR2cjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
6677
6677
  }
6678
- const values = { ...base, ..._chunkISIO63Q5cjs.resolveEffectValues.call(void 0, { ...d, defaults: base }, given) };
6678
+ const values = { ...base, ..._chunkL2JTLW6Bcjs.resolveEffectValues.call(void 0, { ...d, defaults: base }, given) };
6679
6679
  const time = changes.time === void 0 ? _nullishCoalesce(g.time, () => ( 0)) : checkEffectTime(changes.time);
6680
6680
  const animate = changes.animate === void 0 ? g.animate : changes.animate === null ? void 0 : checkEffectAnimation(changes.animate);
6681
6681
  const { width, height } = this.naturalSize;
@@ -21492,7 +21492,7 @@ function createImageEffectsToolProvider(controller, options = {}) {
21492
21492
  return { target, effect: _nullishCoalesce(effects.find((e) => e.id === instance), () => ( effects[effects.length - 1])), effects, ...extra };
21493
21493
  };
21494
21494
  const plainValues = (v) => v;
21495
- return withImagePlayback(_chunkISIO63Q5cjs.createEffectToolProvider.call(void 0, {
21495
+ return withImagePlayback(_chunkL2JTLW6Bcjs.createEffectToolProvider.call(void 0, {
21496
21496
  id: _nullishCoalesce(options.id, () => ( "image-effects")),
21497
21497
  namespace: options.namespace,
21498
21498
  title: "Image effects",
@@ -765,7 +765,7 @@ import {
765
765
  layerImageInput,
766
766
  linearToSrgb,
767
767
  resolveEffectValues
768
- } from "../chunk-JA57JIT5.js";
768
+ } from "../chunk-MV7CYFMJ.js";
769
769
  import "../chunk-V2ZCJRDM.js";
770
770
  import {
771
771
  BrushstrokeCache,
@@ -24,7 +24,7 @@ var _chunkSABJMH6Mcjs = require('../chunk-SABJMH6M.cjs');
24
24
  var _chunk34KLWUH4cjs = require('../chunk-34KLWUH4.cjs');
25
25
 
26
26
 
27
- var _chunkZBCT5MEAcjs = require('../chunk-ZBCT5MEA.cjs');
27
+ var _chunkCBVNCWJMcjs = require('../chunk-CBVNCWJM.cjs');
28
28
 
29
29
 
30
30
 
@@ -157,7 +157,7 @@ var _chunkPY4GWSE2cjs = require('../chunk-PY4GWSE2.cjs');
157
157
 
158
158
 
159
159
 
160
- var _chunkISIO63Q5cjs = require('../chunk-ISIO63Q5.cjs');
160
+ var _chunkL2JTLW6Bcjs = require('../chunk-L2JTLW6B.cjs');
161
161
  require('../chunk-WOFXZ3XU.cjs');
162
162
 
163
163
 
@@ -5488,7 +5488,7 @@ function timeLapseVideo(frameCount, width, height, fps, holdMs, name = "Time-lap
5488
5488
  }
5489
5489
  const video = { version: 1, name, width: w, height: h, fps, background: "#000000", assets, tracks: [{ id: "v1", kind: "video", clips }] };
5490
5490
  const durationMs = frameCount ? clips[clips.length - 1].start + clips[clips.length - 1].duration : 0;
5491
- return { video, ffmpeg: _chunkZBCT5MEAcjs.toVideoFfmpeg.call(void 0, video, { output: "timelapse.mp4" }), durationMs };
5491
+ return { video, ffmpeg: _chunkCBVNCWJMcjs.toVideoFfmpeg.call(void 0, video, { output: "timelapse.mp4" }), durationMs };
5492
5492
  }
5493
5493
  async function buildTimeLapse(source, target, options = {}) {
5494
5494
  const maxSide = Math.max(32, Math.min(4096, Math.round(_nullishCoalesce(options.maxSide, () => ( 720)))));
@@ -5571,7 +5571,7 @@ function checkPaintEffectPlace(d, place) {
5571
5571
  else if (d.uses.includes("filter") && place !== "light") instead = "; run it on a layer's dried paint with apply_effect instead";
5572
5572
  else if (place === "light" && d.uses.some((u) => PAINT_EFFECT_PLACES.layer.includes(u))) instead = "; add it as an effect layer (add_effect_layer) or fill a layer with it (fill_layer_with_effect) instead";
5573
5573
  else if (place === "paper" && d.uses.some((u) => u === "overlay" || u === "title")) instead = "; add it as an effect layer with add_effect_layer instead";
5574
- throw new (0, _chunkISIO63Q5cjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) is a ${d.uses.join(" / ") || d.kind} effect, and ${PLACE_WORDS[place]}${instead}.`, d.id);
5574
+ throw new (0, _chunkL2JTLW6Bcjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) is a ${d.uses.join(" / ") || d.kind} effect, and ${PLACE_WORDS[place]}${instead}.`, d.id);
5575
5575
  }
5576
5576
  var PAPER_EFFECT_BLENDS = ["multiply", "normal", "overlay", "soft-light", "screen", "color"];
5577
5577
  var paperVersion = 1;
@@ -5800,7 +5800,7 @@ var PaintEditorController = (_class19 = class _PaintEditorController {
5800
5800
  /** Set while an operation that changes wet paint runs: the simulation before it (for undo). */
5801
5801
  __init166() {this.wetOp = null}
5802
5802
  /** The effects provider slot (see `setEffectsProvider`). */
5803
- __init167() {this.effects = new (0, _chunkISIO63Q5cjs.EffectsSlot)()}
5803
+ __init167() {this.effects = new (0, _chunkL2JTLW6Bcjs.EffectsSlot)()}
5804
5804
  /** The sticker library slot (see `setStickersProvider`). */
5805
5805
  __init168() {this.stickers = new (0, _chunkJSDND7DFcjs.StickersSlot)(_chunkSABJMH6Mcjs.editorStickers.call(void 0, ))}
5806
5806
  __init169() {this.stickerArt = new StickerArtCache()}
@@ -6602,7 +6602,7 @@ var PaintEditorController = (_class19 = class _PaintEditorController {
6602
6602
  if (v === null) merged[k] = d.defaults[k];
6603
6603
  else given[k] = v;
6604
6604
  }
6605
- return { ...merged, ..._chunkISIO63Q5cjs.resolveEffectValues.call(void 0, { ...d, defaults: merged }, given) };
6605
+ return { ...merged, ..._chunkL2JTLW6Bcjs.resolveEffectValues.call(void 0, { ...d, defaults: merged }, given) };
6606
6606
  }
6607
6607
  /** Renders a generator, overlay or title effect at the canvas size. */
6608
6608
  renderEffectCanvas(d, values, time = 0) {
@@ -12181,7 +12181,7 @@ function createPaintEffectsToolProvider(controller, options = {}) {
12181
12181
  if (changes.enabled !== void 0) throw new Error("enabled does not apply here: hide an effect layer with update_layer visible false, or remove the effect paper.");
12182
12182
  };
12183
12183
  const values = (v) => v;
12184
- return withPaintPlayback(_chunkISIO63Q5cjs.createEffectToolProvider.call(void 0, {
12184
+ return withPaintPlayback(_chunkL2JTLW6Bcjs.createEffectToolProvider.call(void 0, {
12185
12185
  id: _nullishCoalesce(options.id, () => ( "paint-effects")),
12186
12186
  namespace: options.namespace,
12187
12187
  title: "Paint effects",
@@ -24,7 +24,7 @@ import {
24
24
  } from "../chunk-QPHNVZHO.js";
25
25
  import {
26
26
  toVideoFfmpeg
27
- } from "../chunk-5E2Q7ZHI.js";
27
+ } from "../chunk-MWUZCEFT.js";
28
28
  import {
29
29
  createLayerEffectTools,
30
30
  deserializeLayers,
@@ -157,7 +157,7 @@ import {
157
157
  EffectsSlot,
158
158
  createEffectToolProvider,
159
159
  resolveEffectValues
160
- } from "../chunk-JA57JIT5.js";
160
+ } from "../chunk-MV7CYFMJ.js";
161
161
  import "../chunk-V2ZCJRDM.js";
162
162
  import {
163
163
  GRAIN_PATTERNS,
@@ -562,7 +562,7 @@ var _chunkU67EN7GGcjs = require('../chunk-U67EN7GG.cjs');
562
562
 
563
563
 
564
564
 
565
- var _chunkISIO63Q5cjs = require('../chunk-ISIO63Q5.cjs');
565
+ var _chunkL2JTLW6Bcjs = require('../chunk-L2JTLW6B.cjs');
566
566
  require('../chunk-WOFXZ3XU.cjs');
567
567
 
568
568
 
@@ -7335,7 +7335,7 @@ var VectorEditorController = (_class7 = class _VectorEditorController {
7335
7335
  }
7336
7336
  // --- Provider effects ---
7337
7337
  /** The effects provider slot (see `setEffectsProvider`). */
7338
- __init59() {this.effects = new (0, _chunkISIO63Q5cjs.EffectsSlot)()}
7338
+ __init59() {this.effects = new (0, _chunkL2JTLW6Bcjs.EffectsSlot)()}
7339
7339
  /** The registered effects provider, or `null`. */
7340
7340
  get effectsProvider() {
7341
7341
  return this.effects.provider;
@@ -7359,10 +7359,10 @@ var VectorEditorController = (_class7 = class _VectorEditorController {
7359
7359
  /** The effect's picture as group children, scaled into `box` (an affine fit). */
7360
7360
  async vectorEffectPicture(effect, values) {
7361
7361
  const provider = this.effects.require();
7362
- if (!provider.applyVectorEffect) throw new (0, _chunkISIO63Q5cjs.EffectUnsupportedError)(`${provider.name} has no vector effects.`);
7362
+ if (!provider.applyVectorEffect) throw new (0, _chunkL2JTLW6Bcjs.EffectUnsupportedError)(`${provider.name} has no vector effects.`);
7363
7363
  const d = await provider.describe(effect);
7364
- if (d.kind !== "vector") throw new (0, _chunkISIO63Q5cjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) is a ${d.kind} effect; the vector editor adds vector effects, which bring their own picture${d.kind === "motion" ? " (apply motion in the animation editor)" : ""}.`, d.id);
7365
- const resolved = _chunkISIO63Q5cjs.resolveEffectValues.call(void 0, d, values);
7364
+ if (d.kind !== "vector") throw new (0, _chunkL2JTLW6Bcjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) is a ${d.kind} effect; the vector editor adds vector effects, which bring their own picture${d.kind === "motion" ? " (apply motion in the animation editor)" : ""}.`, d.id);
7365
+ const resolved = _chunkL2JTLW6Bcjs.resolveEffectValues.call(void 0, d, values);
7366
7366
  const motion = await provider.applyVectorEffect(d.id, this.toSvg(), resolved);
7367
7367
  const parsed = _chunkJPEHXIB5cjs.parseVectorSvg.call(void 0, motion.svg);
7368
7368
  if (!parsed.nodes.length) throw new Error(`"${d.name}" drew no shapes the editor can read.`);
@@ -18179,7 +18179,7 @@ function createVectorEffectsToolProvider(controller, options = {}) {
18179
18179
  const effects = _optionalChain([g, 'optionalAccess', _765 => _765.providerEffect]) ? [info(g)] : [];
18180
18180
  return { target: id, effect: _nullishCoalesce(removed, () => ( effects[0])), effects };
18181
18181
  };
18182
- return _chunkISIO63Q5cjs.createEffectToolProvider.call(void 0, {
18182
+ return _chunkL2JTLW6Bcjs.createEffectToolProvider.call(void 0, {
18183
18183
  id: _nullishCoalesce(options.id, () => ( "vector-effects")),
18184
18184
  namespace: options.namespace,
18185
18185
  title: "Vector effects",
@@ -562,7 +562,7 @@ import {
562
562
  EffectsSlot,
563
563
  createEffectToolProvider,
564
564
  resolveEffectValues
565
- } from "../chunk-JA57JIT5.js";
565
+ } from "../chunk-MV7CYFMJ.js";
566
566
  import "../chunk-V2ZCJRDM.js";
567
567
  import {
568
568
  GRAIN_PATTERNS