@kolkrabbi/design-editor 0.22.0 → 0.23.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.
@@ -6,15 +6,15 @@ import { a as F, f as I, i as L, l as ie, n as R, o as ae, r as z, s as oe, t as
6
6
  import { n as ce, r as V } from "./effects-pCd8YTdQ.js";
7
7
  import { c as le, i as H, r as ue } from "./labels-B5qkocWy.js";
8
8
  import { i as U, n as de, r as fe } from "./motion-DFnAar_2.js";
9
- import { $ as pe, A as me, B as he, C as ge, D as _e, E as ve, F as ye, G as be, H as xe, I as Se, J as Ce, K as we, L as W, M as Te, N as Ee, O as De, P as Oe, Q as ke, R as Ae, S as je, T as Me, U as Ne, V as Pe, W as Fe, X as Ie, Y as Le, Z as Re, _ as ze, a as Be, b as Ve, c as He, d as Ue, et as We, f as Ge, g as Ke, h as qe, i as Je, it as Ye, j as Xe, k as Ze, l as Qe, m as $e, n as et, nt as tt, o as nt, p as rt, q as it, r as at, rt as ot, s as st, t as ct, tt as lt, u as ut, v as dt, w as ft, x as pt, y as mt, z as G } from "./core-G5e-pSOt.js";
10
- import { Button as K, Divider as ht, Dropdown as gt, LabeledControlSection as _t, SegmentedToggle as q, ToggleSwitch as vt, Tooltip as yt } from "@kolkrabbi/kol-component";
11
- import { createContext as bt, useCallback as xt, useContext as St, useEffect as J, useRef as Y, useState as X } from "react";
12
- import { Fragment as Ct, jsx as Z, jsxs as Q } from "react/jsx-runtime";
13
- import { Icon as wt } from "@kolkrabbi/kol-icons";
14
- import { useDragResize as Tt, useTheme as Et } from "@kolkrabbi/kol-framework";
9
+ import { $ as pe, A as me, B as he, C as ge, D as _e, E as ve, F as ye, G as be, H as xe, I as Se, J as Ce, K as we, L as W, M as Te, N as Ee, O as De, P as Oe, Q as ke, R as Ae, S as je, T as Me, U as Ne, V as Pe, W as Fe, X as Ie, Y as Le, Z as Re, _ as ze, a as Be, b as Ve, c as He, d as Ue, et as We, f as Ge, g as Ke, h as qe, i as Je, it as Ye, j as Xe, k as Ze, l as Qe, m as $e, n as et, nt as tt, o as nt, p as rt, q as it, r as at, rt as ot, s as st, t as ct, tt as lt, u as ut, v as dt, w as ft, x as pt, y as mt, z as G } from "./core-CTI1YRJD.js";
10
+ import { Button as K, Divider as ht, Dropdown as gt, LabeledControlSection as _t, MediaLibrary as vt, SegmentedToggle as q, ToggleSwitch as yt, Tooltip as bt } from "@kolkrabbi/kol-component";
11
+ import { createContext as xt, useCallback as St, useContext as Ct, useEffect as J, useRef as Y, useState as X } from "react";
12
+ import { Fragment as wt, jsx as Z, jsxs as Q } from "react/jsx-runtime";
13
+ import { Icon as Tt } from "@kolkrabbi/kol-icons";
14
+ import { useDragResize as Et, useTheme as Dt } from "@kolkrabbi/kol-framework";
15
15
  //#region src/editor/labs/useLabsLayer.js
16
16
  function $() {
17
- let { layers: e, addLayer: t, removeLayer: n, updateLayer: r, select: i, beginTransaction: a, commitTransaction: o } = u(), s = xt((s, c) => {
17
+ let { layers: e, addLayer: t, removeLayer: n, updateLayer: r, select: i, beginTransaction: a, commitTransaction: o } = u(), s = St((s, c) => {
18
18
  let [l, ...u] = e;
19
19
  a();
20
20
  for (let e of u) n(e.id);
@@ -36,7 +36,7 @@ function $() {
36
36
  }
37
37
  //#endregion
38
38
  //#region src/editor/labs/LabsNav.jsx
39
- function Dt() {
39
+ function Ot() {
40
40
  let { addFilter: e, patchFilter: t } = u(), { layer: r, setOnly: i } = $(), a = Y(null);
41
41
  J(() => {
42
42
  r?.type === "photo" && r.src && (a.current = {
@@ -95,7 +95,7 @@ function Dt() {
95
95
  }
96
96
  //#endregion
97
97
  //#region src/editor/labs/LabsParams.jsx
98
- function Ot(e, t) {
98
+ function kt(e, t) {
99
99
  J(() => {
100
100
  let n = (n) => {
101
101
  if (n.key !== "r" && n.key !== "R" || n.metaKey || n.ctrlKey || n.altKey) return;
@@ -105,13 +105,13 @@ function Ot(e, t) {
105
105
  return window.addEventListener("keydown", n), () => window.removeEventListener("keydown", n);
106
106
  });
107
107
  }
108
- var kt = [{
108
+ var At = [{
109
109
  value: "effect",
110
110
  label: "Effect"
111
111
  }, {
112
112
  value: "anim",
113
113
  label: "Motion"
114
- }], At = [
114
+ }], jt = [
115
115
  {
116
116
  value: "generate",
117
117
  label: "Generate"
@@ -124,7 +124,7 @@ var kt = [{
124
124
  value: "anim",
125
125
  label: "Animation"
126
126
  }
127
- ], jt = [
127
+ ], Mt = [
128
128
  {
129
129
  value: "generate",
130
130
  label: "Gen"
@@ -138,7 +138,7 @@ var kt = [{
138
138
  label: "Anim"
139
139
  }
140
140
  ];
141
- function Mt({ options: e, active: t, onPick: n, spread: i = !1, pills: a = !1 }) {
141
+ function Nt({ options: e, active: t, onPick: n, spread: i = !1, pills: a = !1 }) {
142
142
  let o = r();
143
143
  return e?.length ? a ? /* @__PURE__ */ Z("div", {
144
144
  className: "flex items-center gap-1 flex-wrap",
@@ -157,7 +157,7 @@ function Mt({ options: e, active: t, onPick: n, spread: i = !1, pills: a = !1 })
157
157
  className: S(o)
158
158
  }) : null;
159
159
  }
160
- function Nt({ chips: e, active: t, onPick: n, spread: i, pills: a, title: o, tabStrip: s, preStrip: c, fx: l = !1, children: u }) {
160
+ function Pt({ chips: e, active: t, onPick: n, spread: i, pills: a, title: o, tabStrip: s, preStrip: c, fx: l = !1, children: u }) {
161
161
  let d = r() === "sm";
162
162
  return /* @__PURE__ */ Q("div", {
163
163
  className: `flex flex-col gap-5${l ? " kol-labs-fx" : ""}`,
@@ -166,7 +166,7 @@ function Nt({ chips: e, active: t, onPick: n, spread: i, pills: a, title: o, tab
166
166
  className: "kol-eyebrow text-fg-96",
167
167
  children: o
168
168
  }),
169
- e && /* @__PURE__ */ Z(Mt, {
169
+ e && /* @__PURE__ */ Z(Nt, {
170
170
  options: e,
171
171
  active: t,
172
172
  onPick: n,
@@ -179,7 +179,7 @@ function Nt({ chips: e, active: t, onPick: n, spread: i, pills: a, title: o, tab
179
179
  ]
180
180
  });
181
181
  }
182
- function Pt({ layer: n, showMod: a }) {
182
+ function Ft({ layer: n, showMod: a }) {
183
183
  let o = r(), [s, c] = X("effect");
184
184
  J(() => {
185
185
  let e = () => c("effect");
@@ -221,7 +221,7 @@ function Pt({ layer: n, showMod: a }) {
221
221
  } : t);
222
222
  h(n.id, { filters: t });
223
223
  };
224
- Ot(() => {
224
+ kt(() => {
225
225
  y && h(n.id, { filters: w.map((e, t) => t === 0 ? {
226
226
  ...e,
227
227
  params: {}
@@ -247,24 +247,24 @@ function Pt({ layer: n, showMod: a }) {
247
247
  value: e.id,
248
248
  label: `${e.label ?? e.id}${e.kind === "pixi" ? " · GPU" : ""}`
249
249
  }))];
250
- return /* @__PURE__ */ Q(Nt, {
250
+ return /* @__PURE__ */ Q(Pt, {
251
251
  title: "Effects",
252
252
  fx: !0,
253
253
  tabStrip: /* @__PURE__ */ Z(q, {
254
254
  value: s,
255
255
  onChange: c,
256
- options: kt,
256
+ options: At,
257
257
  size: o,
258
258
  className: S(o)
259
259
  }),
260
- children: [s === "effect" && /* @__PURE__ */ Q(Ct, { children: [
260
+ children: [s === "effect" && /* @__PURE__ */ Q(wt, { children: [
261
261
  /* @__PURE__ */ Q(_t, {
262
262
  label: "Effect Stack",
263
263
  divided: !0,
264
264
  children: [v.length === 0 && /* @__PURE__ */ Z(j, {
265
265
  className: "kol-mono-10 text-meta",
266
266
  children: "No effects yet — add one below."
267
- }), /* @__PURE__ */ Z(Ft, {
267
+ }), /* @__PURE__ */ Z(It, {
268
268
  ...e,
269
269
  from: 0
270
270
  })]
@@ -292,7 +292,7 @@ function Pt({ layer: n, showMod: a }) {
292
292
  })]
293
293
  });
294
294
  }
295
- if (!y) return /* @__PURE__ */ Z(Nt, {
295
+ if (!y) return /* @__PURE__ */ Z(Pt, {
296
296
  chips: C,
297
297
  active: null,
298
298
  onPick: ne,
@@ -301,7 +301,7 @@ function Pt({ layer: n, showMod: a }) {
301
301
  tabStrip: /* @__PURE__ */ Z(q, {
302
302
  value: s,
303
303
  onChange: c,
304
- options: kt,
304
+ options: At,
305
305
  size: o,
306
306
  className: S(o)
307
307
  }),
@@ -335,7 +335,7 @@ function Pt({ layer: n, showMod: a }) {
335
335
  renderAnimate: re,
336
336
  inline: !0
337
337
  };
338
- return /* @__PURE__ */ Q(Nt, {
338
+ return /* @__PURE__ */ Q(Pt, {
339
339
  chips: C,
340
340
  active: y.id,
341
341
  onPick: ne,
@@ -345,11 +345,11 @@ function Pt({ layer: n, showMod: a }) {
345
345
  tabStrip: /* @__PURE__ */ Z(q, {
346
346
  value: s,
347
347
  onChange: c,
348
- options: kt,
348
+ options: At,
349
349
  size: o,
350
350
  className: S(o)
351
351
  }),
352
- children: [s === "effect" && /* @__PURE__ */ Q(Ct, { children: [
352
+ children: [s === "effect" && /* @__PURE__ */ Q(wt, { children: [
353
353
  ae.length > 0 && /* @__PURE__ */ Z(k, {
354
354
  schema: ae,
355
355
  ...H
@@ -368,11 +368,11 @@ function Pt({ layer: n, showMod: a }) {
368
368
  })]
369
369
  }),
370
370
  /* @__PURE__ */ Z(ht, {}),
371
- L < N.length && /* @__PURE__ */ Q(Ct, { children: [/* @__PURE__ */ Z(k, {
371
+ L < N.length && /* @__PURE__ */ Q(wt, { children: [/* @__PURE__ */ Z(k, {
372
372
  schema: N.slice(L),
373
373
  ...H
374
374
  }), /* @__PURE__ */ Z(ht, {})] }),
375
- /* @__PURE__ */ Z(It, {
375
+ /* @__PURE__ */ Z(Lt, {
376
376
  chain: v,
377
377
  layer: n,
378
378
  hostView: T,
@@ -383,7 +383,7 @@ function Pt({ layer: n, showMod: a }) {
383
383
  palette: g,
384
384
  showMod: a
385
385
  })
386
- ] }), s === "anim" && /* @__PURE__ */ Q(Ct, { children: [
386
+ ] }), s === "anim" && /* @__PURE__ */ Q(wt, { children: [
387
387
  /* @__PURE__ */ Z(k, {
388
388
  schema: y.def.params,
389
389
  ...H,
@@ -404,7 +404,7 @@ function Pt({ layer: n, showMod: a }) {
404
404
  ] })]
405
405
  });
406
406
  }
407
- function Ft({ chain: t, from: n = 0, layer: i, hostView: a, toggleFilter: o, removeFilter: s, setStagePropAt: c, palette: l, showMod: u }) {
407
+ function It({ chain: t, from: n = 0, layer: i, hostView: a, toggleFilter: o, removeFilter: s, setStagePropAt: c, palette: l, showMod: u }) {
408
408
  let d = r();
409
409
  return t.slice(n).map((t, r) => {
410
410
  let f = r + n, p = t.enabled !== !1, m = {
@@ -416,12 +416,12 @@ function Ft({ chain: t, from: n = 0, layer: i, hostView: a, toggleFilter: o, rem
416
416
  className: "flex flex-col gap-2 p-2 rounded bg-oq-04",
417
417
  children: [/* @__PURE__ */ Q("div", {
418
418
  className: "flex items-center gap-2",
419
- children: [/* @__PURE__ */ Z(vt, {
419
+ children: [/* @__PURE__ */ Z(yt, {
420
420
  size: d,
421
421
  checked: p,
422
422
  onChange: () => o(i.id, f),
423
423
  label: t.def?.label ?? t.id
424
- }), /* @__PURE__ */ Z(yt, {
424
+ }), /* @__PURE__ */ Z(bt, {
425
425
  asChild: !0,
426
426
  label: "Remove effect",
427
427
  children: /* @__PURE__ */ Z("button", {
@@ -433,7 +433,7 @@ function Ft({ chain: t, from: n = 0, layer: i, hostView: a, toggleFilter: o, rem
433
433
  border: "none",
434
434
  background: "transparent"
435
435
  },
436
- children: /* @__PURE__ */ Z(wt, {
436
+ children: /* @__PURE__ */ Z(Tt, {
437
437
  name: "x",
438
438
  size: 12
439
439
  })
@@ -454,7 +454,7 @@ function Ft({ chain: t, from: n = 0, layer: i, hostView: a, toggleFilter: o, rem
454
454
  }, t.key ?? f);
455
455
  });
456
456
  }
457
- function It({ chain: e, layer: t, hostView: n, addFilter: i, removeFilter: a, toggleFilter: o, setStagePropAt: s, palette: c, showMod: l }) {
457
+ function Lt({ chain: e, layer: t, hostView: n, addFilter: i, removeFilter: a, toggleFilter: o, setStagePropAt: s, palette: c, showMod: l }) {
458
458
  let u = r(), d = [{
459
459
  value: "",
460
460
  label: "Add FX..."
@@ -465,7 +465,7 @@ function It({ chain: e, layer: t, hostView: n, addFilter: i, removeFilter: a, to
465
465
  return /* @__PURE__ */ Q(_t, {
466
466
  label: "Post-Processing",
467
467
  divided: !0,
468
- children: [/* @__PURE__ */ Z(Ft, {
468
+ children: [/* @__PURE__ */ Z(It, {
469
469
  chain: e,
470
470
  from: 1,
471
471
  layer: t,
@@ -488,17 +488,17 @@ function It({ chain: e, layer: t, hostView: n, addFilter: i, removeFilter: a, to
488
488
  })]
489
489
  });
490
490
  }
491
- function Lt({ layer: e, showMod: t, tree: n }) {
491
+ function Rt({ layer: e, showMod: t, tree: n }) {
492
492
  let a = r(), [o, s] = X("generate"), { updateLayer: c, palette: l } = u(), { setOnly: d } = $(), f = M(e.id, { history: "coalesce" }), m = O(e.loopGroup).find((t) => t.id === e.presetId), h = te(e.loopGroup)?.label ?? "", g = e.loopGroup === "paratype" && m?.sub === "Glyphs" ? E("paratype", "Glyphs") : null, _ = g ? g.map((e) => ({
493
493
  value: e.id,
494
494
  label: e.label
495
495
  })) : null;
496
- return Ot(() => {
496
+ return kt(() => {
497
497
  m && d(e.type, w(m, e.loopGroup));
498
498
  }, () => {
499
499
  let t = re(e.loopId)?.params ?? [];
500
500
  c(e.id, i(e, p(t, e), b(), { withFilters: !0 }));
501
- }), /* @__PURE__ */ Z(Nt, {
501
+ }), /* @__PURE__ */ Z(Pt, {
502
502
  title: h,
503
503
  chips: _,
504
504
  active: e.presetId,
@@ -510,7 +510,7 @@ function Lt({ layer: e, showMod: t, tree: n }) {
510
510
  tabStrip: /* @__PURE__ */ Z(q, {
511
511
  value: o,
512
512
  onChange: s,
513
- options: a === "sm" ? At : jt,
513
+ options: a === "sm" ? jt : Mt,
514
514
  size: a,
515
515
  className: S(a)
516
516
  }),
@@ -532,9 +532,9 @@ function Lt({ layer: e, showMod: t, tree: n }) {
532
532
  })
533
533
  });
534
534
  }
535
- function Rt({ layer: e, showMod: t }) {
535
+ function zt({ layer: e, showMod: t }) {
536
536
  let n = r(), [i, a] = X("generate"), { updateLayer: o, palette: s } = u(), { setOnly: c } = $(), l = M(e.id, { history: "coalesce" }), f = ue.find((t) => t.id === e.presetId), p = H.find((e) => e.subs.includes(f?.sub))?.label ?? "Kinetic";
537
- return Ot(() => {
537
+ return kt(() => {
538
538
  f && c("kinetic", {
539
539
  presetId: f.id,
540
540
  presetLabel: f.label,
@@ -548,12 +548,12 @@ function Rt({ layer: e, showMod: t }) {
548
548
  comp: r,
549
549
  _rollSeed: t
550
550
  });
551
- }), /* @__PURE__ */ Z(Nt, {
551
+ }), /* @__PURE__ */ Z(Pt, {
552
552
  title: p,
553
553
  tabStrip: /* @__PURE__ */ Z(q, {
554
554
  value: i,
555
555
  onChange: a,
556
- options: n === "sm" ? At : jt,
556
+ options: n === "sm" ? jt : Mt,
557
557
  size: n,
558
558
  className: S(n)
559
559
  }),
@@ -572,7 +572,7 @@ function Rt({ layer: e, showMod: t }) {
572
572
  })
573
573
  });
574
574
  }
575
- function zt() {
575
+ function Bt() {
576
576
  let { layer: e } = $(), t = !!h().labsModDots;
577
577
  return J(() => {
578
578
  let e = (e) => {
@@ -581,27 +581,28 @@ function zt() {
581
581
  t?.tagName === "INPUT" || t?.tagName === "TEXTAREA" || t?.isContentEditable || l("labsModDots", !v().labsModDots);
582
582
  };
583
583
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
584
- }, []), e ? e.type === "photo" ? /* @__PURE__ */ Z(Pt, {
584
+ }, []), e ? e.type === "photo" ? /* @__PURE__ */ Z(Ft, {
585
585
  layer: e,
586
586
  showMod: t
587
- }, e.id) : e.type === "loop" ? /* @__PURE__ */ Z(Lt, {
587
+ }, e.id) : e.type === "loop" ? /* @__PURE__ */ Z(Rt, {
588
588
  layer: e,
589
589
  showMod: t
590
- }, e.id) : e.type === "misc" ? /* @__PURE__ */ Z(Lt, {
590
+ }, e.id) : e.type === "misc" ? /* @__PURE__ */ Z(Rt, {
591
591
  layer: e,
592
592
  showMod: t,
593
593
  tree: N
594
- }, e.id) : e.type === "kinetic" ? /* @__PURE__ */ Z(Rt, {
594
+ }, e.id) : e.type === "kinetic" ? /* @__PURE__ */ Z(zt, {
595
595
  layer: e,
596
596
  showMod: t
597
597
  }, e.id) : /* @__PURE__ */ Z(j, { children: "This layer has no labs surface." }) : /* @__PURE__ */ Z(j, { children: "Pick an effect or generator from the nav." });
598
598
  }
599
599
  //#endregion
600
600
  //#region src/editor/labs/LabsSourcePicker.jsx
601
- function Bt(e) {
601
+ var Vt = (e) => /\.svg$/i.test(e.key) || /svg/i.test(e.contentType || "");
602
+ function Ht(e) {
602
603
  let { patch: t } = M(e.id), n = Y(null), [r, i] = X(!1), a = e.type === "loop" && e.loopGroup === "distress";
603
604
  return {
604
- nodes: /* @__PURE__ */ Q(Ct, { children: [/* @__PURE__ */ Z("input", {
605
+ nodes: /* @__PURE__ */ Q(wt, { children: [/* @__PURE__ */ Z("input", {
605
606
  ref: n,
606
607
  type: "file",
607
608
  accept: a ? ".svg,image/svg+xml" : "image/*,video/*",
@@ -627,10 +628,13 @@ function Bt(e) {
627
628
  srcType: "image"
628
629
  }), i.readAsDataURL(r);
629
630
  }
630
- }), /* @__PURE__ */ Z(Ue, {
631
+ }), /* @__PURE__ */ Z(vt, {
632
+ variant: "modal",
631
633
  open: r,
634
+ client: Ue(),
635
+ accept: a ? Vt : ["image", "video"],
632
636
  onClose: () => i(!1),
633
- onPick: (e, { contentType: n } = {}) => {
637
+ onSelect: (e, { contentType: n } = {}) => {
634
638
  if (a) {
635
639
  t({ svgSrc: rt(e) });
636
640
  return;
@@ -639,8 +643,7 @@ function Bt(e) {
639
643
  src: rt(e),
640
644
  srcType: Ge(n) ? "video" : "image"
641
645
  });
642
- },
643
- accept: a ? "svg" : "all"
646
+ }
644
647
  })] }),
645
648
  svgMode: a,
646
649
  openLibrary: () => i(!0),
@@ -667,8 +670,8 @@ function Bt(e) {
667
670
  label: "Camera"
668
671
  }
669
672
  ].slice(0, 2);
670
- function Vt({ layer: e }) {
671
- let t = Bt(e);
673
+ function Ut({ layer: e }) {
674
+ let t = Ht(e);
672
675
  return /* @__PURE__ */ Q("div", {
673
676
  className: "flex flex-col gap-2",
674
677
  children: [
@@ -703,7 +706,7 @@ function Vt({ layer: e }) {
703
706
  ]
704
707
  });
705
708
  }
706
- function Ht({ layer: e, title: t, onBack: n }) {
709
+ function Wt({ layer: e, title: t, onBack: n }) {
707
710
  return Ae(n), /* @__PURE__ */ Z("div", {
708
711
  className: "fixed inset-y-0 right-0 left-[var(--fxr-rail,0px)] kol-overlay-scrim flex flex-col items-center overflow-y-auto p-6",
709
712
  style: { zIndex: "var(--kol-z-modal)" },
@@ -721,7 +724,7 @@ function Ht({ layer: e, title: t, onBack: n }) {
721
724
  children: "Pick the media it works on."
722
725
  })]
723
726
  }),
724
- /* @__PURE__ */ Z(Vt, { layer: e }),
727
+ /* @__PURE__ */ Z(Ut, { layer: e }),
725
728
  /* @__PURE__ */ Z(K, {
726
729
  tone: "grey",
727
730
  size: "lg",
@@ -737,13 +740,13 @@ function Ht({ layer: e, title: t, onBack: n }) {
737
740
  }
738
741
  //#endregion
739
742
  //#region src/editor/components/PanelHeader.jsx
740
- function Ut({ title: e, onCollapse: t, action: n, className: r = "px-3" }) {
743
+ function Gt({ title: e, onCollapse: t, action: n, className: r = "px-3" }) {
741
744
  return /* @__PURE__ */ Q("div", {
742
745
  className: `flex w-full shrink-0 items-center ${r}`,
743
746
  children: [/* @__PURE__ */ Q("button", {
744
747
  className: "kol-helper-12 text-meta flex flex-1 items-center gap-2 py-2.5",
745
748
  onClick: t,
746
- children: [/* @__PURE__ */ Z("span", { children: e }), /* @__PURE__ */ Z(wt, {
749
+ children: [/* @__PURE__ */ Z("span", { children: e }), /* @__PURE__ */ Z(Tt, {
747
750
  name: "chevron-down",
748
751
  size: 16,
749
752
  className: "text-oq-48"
@@ -751,7 +754,7 @@ function Ut({ title: e, onCollapse: t, action: n, className: r = "px-3" }) {
751
754
  }), n]
752
755
  });
753
756
  }
754
- function Wt({ label: e, onOpen: t, size: n = "lg", tone: r = "primary", children: i }) {
757
+ function Kt({ label: e, onOpen: t, size: n = "lg", tone: r = "primary", children: i }) {
755
758
  return /* @__PURE__ */ Q("div", {
756
759
  className: "pointer-events-none fixed bottom-[max(0.75rem,env(safe-area-inset-bottom))] left-[var(--fxr-rail,0px)] right-0 z-10 flex flex-wrap-reverse gap-2 px-3 [&>*]:pointer-events-auto",
757
760
  children: [/* @__PURE__ */ Z(K, {
@@ -760,7 +763,7 @@ function Wt({ label: e, onOpen: t, size: n = "lg", tone: r = "primary", children
760
763
  onClick: t,
761
764
  children: /* @__PURE__ */ Q("span", {
762
765
  className: "flex items-center gap-2",
763
- children: [e, /* @__PURE__ */ Z(wt, {
766
+ children: [e, /* @__PURE__ */ Z(Tt, {
764
767
  name: "chevron-down",
765
768
  size: 16,
766
769
  className: "rotate-180"
@@ -769,11 +772,11 @@ function Wt({ label: e, onOpen: t, size: n = "lg", tone: r = "primary", children
769
772
  }), i]
770
773
  });
771
774
  }
772
- var Gt = {
775
+ var qt = {
773
776
  half: "50dvh",
774
777
  tall: "85dvh"
775
778
  };
776
- function Kt({ tall: e, onToggle: t, onDrag: n }) {
779
+ function Jt({ tall: e, onToggle: t, onDrag: n }) {
777
780
  let r = Y({
778
781
  y: null,
779
782
  moved: !1,
@@ -810,7 +813,7 @@ function Kt({ tall: e, onToggle: t, onDrag: n }) {
810
813
  }
811
814
  //#endregion
812
815
  //#region src/editor/labs/LabsCatalogCard.jsx
813
- function qt({ onPicked: e, onClose: t }) {
816
+ function Yt({ onPicked: e, onClose: t }) {
814
817
  let { items: n, dispatch: r } = Je(), [i, a] = X(null);
815
818
  Ae(t);
816
819
  let o = n.filter((e) => e.path !== "#rail/sec:modulation"), s = o.find((e) => e.path === i) ?? null, c = s ? s.sub : o;
@@ -854,7 +857,7 @@ function qt({ onPicked: e, onClose: t }) {
854
857
  }
855
858
  //#endregion
856
859
  //#region src/editor/labs/sheetLabels.js
857
- function Jt(e) {
860
+ function Xt(e) {
858
861
  if (!e) return {
859
862
  title: "Labs",
860
863
  pill: "Labs"
@@ -878,15 +881,15 @@ function Jt(e) {
878
881
  }
879
882
  //#endregion
880
883
  //#region src/editor/labs/LabsView.jsx
881
- var Yt = .85, Xt = .3, Zt = 2.5, Qt = {
884
+ var Zt = .85, Qt = .3, $t = 2.5, en = {
882
885
  0: 1,
883
886
  1: .5,
884
887
  2: 1,
885
888
  3: 1.5,
886
889
  4: 2
887
- }, $t = "px-2 py-1 rounded border border-oq-08 bg-surface-secondary kol-mono-12 text-emphasis tabular-nums";
888
- function en() {
889
- let { layer: e } = $(), { removeLayer: t } = u(), n = e?.type === "photo" && !e.src && e.srcType !== "webcam", [r, i] = X(1), [a, o] = X(!1), s = ve(a), c = Y(null), l = (e) => Math.min(Zt, Math.max(Xt, e)), d = (e) => i((t) => l(t * (e > 0 ? 1.25 : .8))), { tool: f } = ye(), p = f === "orbit", m = Y(p);
890
+ }, tn = "px-2 py-1 rounded border border-oq-08 bg-surface-secondary kol-mono-12 text-emphasis tabular-nums";
891
+ function nn() {
892
+ let { layer: e } = $(), { removeLayer: t } = u(), n = e?.type === "photo" && !e.src && e.srcType !== "webcam", [r, i] = X(1), [a, o] = X(!1), s = ve(a), c = Y(null), l = (e) => Math.min($t, Math.max(Qt, e)), d = (e) => i((t) => l(t * (e > 0 ? 1.25 : .8))), { tool: f } = ye(), p = f === "orbit", m = Y(p);
890
893
  return m.current = p, J(() => {
891
894
  let e = c.current;
892
895
  if (!e) return;
@@ -911,7 +914,7 @@ function en() {
911
914
  d(1);
912
915
  return;
913
916
  }
914
- Qt[e.key] !== void 0 && i(Qt[e.key]);
917
+ en[e.key] !== void 0 && i(en[e.key]);
915
918
  }
916
919
  };
917
920
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
@@ -923,22 +926,22 @@ function en() {
923
926
  children: [
924
927
  /* @__PURE__ */ Z("div", {
925
928
  style: {
926
- width: `${r * Yt * 100}%`,
927
- height: `${r * Yt * 100}%`
929
+ width: `${r * Zt * 100}%`,
930
+ height: `${r * Zt * 100}%`
928
931
  },
929
932
  children: /* @__PURE__ */ Z(Be, {})
930
933
  }),
931
- n && /* @__PURE__ */ Z(Ht, {
934
+ n && /* @__PURE__ */ Z(Wt, {
932
935
  layer: e,
933
- title: Jt(e).title,
936
+ title: Xt(e).title,
934
937
  onBack: () => t(e.id)
935
938
  }),
936
939
  a && /* @__PURE__ */ Z("div", {
937
940
  className: "absolute bottom-3 right-3 z-[3] flex items-center gap-2 [@media(pointer:coarse)]:bottom-1",
938
- children: /* @__PURE__ */ Z(yt, {
941
+ children: /* @__PURE__ */ Z(bt, {
939
942
  label: "Framerate — press F to hide",
940
943
  children: /* @__PURE__ */ Q("span", {
941
- className: $t,
944
+ className: tn,
942
945
  children: [s, " fps"]
943
946
  })
944
947
  })
@@ -946,8 +949,8 @@ function en() {
946
949
  ]
947
950
  });
948
951
  }
949
- function tn() {
950
- let e = Y(null), { grabProps: t } = Tt(e, {
952
+ function rn() {
953
+ let e = Y(null), { grabProps: t } = Et(e, {
951
954
  token: "kol-rail",
952
955
  side: "right"
953
956
  });
@@ -993,28 +996,28 @@ function tn() {
993
996
  className: "kol-compose-rail kol-compose-rail--inspector",
994
997
  children: [/* @__PURE__ */ Z("div", { ...t }), /* @__PURE__ */ Z("div", {
995
998
  className: "kol-compose-inspector-body",
996
- children: /* @__PURE__ */ Z(zt, {})
999
+ children: /* @__PURE__ */ Z(Bt, {})
997
1000
  })]
998
1001
  });
999
1002
  }
1000
- var nn = bt(null);
1001
- function rn() {
1002
- let { collapseParams: e, catalog: t, toggleCatalog: n } = St(nn), { layer: r } = $(), i = /* @__PURE__ */ Z("button", {
1003
+ var an = xt(null);
1004
+ function on() {
1005
+ let { collapseParams: e, catalog: t, toggleCatalog: n } = Ct(an), { layer: r } = $(), i = /* @__PURE__ */ Z("button", {
1003
1006
  className: "kol-helper-12 text-meta py-2.5",
1004
1007
  "aria-pressed": t,
1005
1008
  onClick: n,
1006
1009
  children: "Catalog"
1007
1010
  });
1008
- return /* @__PURE__ */ Z(Ut, {
1009
- title: Jt(r).title,
1011
+ return /* @__PURE__ */ Z(Gt, {
1012
+ title: Xt(r).title,
1010
1013
  onCollapse: e,
1011
1014
  className: "px-4",
1012
1015
  action: i
1013
1016
  });
1014
1017
  }
1015
- function an() {
1016
- let { tall: e, setTall: t, collapseParams: n } = St(nn);
1017
- return /* @__PURE__ */ Z(Kt, {
1018
+ function sn() {
1019
+ let { tall: e, setTall: t, collapseParams: n } = Ct(an);
1020
+ return /* @__PURE__ */ Z(Jt, {
1018
1021
  tall: e,
1019
1022
  onToggle: () => t((e) => !e),
1020
1023
  onDrag: (r) => {
@@ -1022,18 +1025,18 @@ function an() {
1022
1025
  }
1023
1026
  });
1024
1027
  }
1025
- function on() {
1028
+ function cn() {
1026
1029
  return /* @__PURE__ */ Z("div", {
1027
1030
  className: "kol-compose-rail kol-compose-rail--inspector",
1028
1031
  children: /* @__PURE__ */ Z("div", {
1029
1032
  className: "kol-compose-inspector-body",
1030
- children: /* @__PURE__ */ Z(zt, {})
1033
+ children: /* @__PURE__ */ Z(Bt, {})
1031
1034
  })
1032
1035
  });
1033
1036
  }
1034
- var sn = {
1037
+ var ln = {
1035
1038
  topbar: () => null,
1036
- canvas: en,
1039
+ canvas: nn,
1037
1040
  panels: [
1038
1041
  {
1039
1042
  slot: "canvas.footer",
@@ -1043,7 +1046,7 @@ var sn = {
1043
1046
  {
1044
1047
  slot: "right.body",
1045
1048
  order: 0,
1046
- Component: tn
1049
+ Component: rn
1047
1050
  },
1048
1051
  {
1049
1052
  slot: "right.footer",
@@ -1051,26 +1054,26 @@ var sn = {
1051
1054
  Component: Qe
1052
1055
  }
1053
1056
  ]
1054
- }, cn = {
1055
- ...sn,
1057
+ }, un = {
1058
+ ...ln,
1056
1059
  panels: [
1057
1060
  {
1058
1061
  slot: "right.header",
1059
1062
  order: 0,
1060
- Component: an
1063
+ Component: sn
1061
1064
  },
1062
1065
  {
1063
1066
  slot: "right.header",
1064
1067
  order: 1,
1065
- Component: rn
1068
+ Component: on
1066
1069
  },
1067
- ...sn.panels.map((e) => e.Component === tn ? {
1070
+ ...ln.panels.map((e) => e.Component === rn ? {
1068
1071
  ...e,
1069
- Component: on
1072
+ Component: cn
1070
1073
  } : e)
1071
1074
  ]
1072
1075
  };
1073
- function ln() {
1076
+ function dn() {
1074
1077
  let { setAspect: e, selectedId: t, select: r } = u(), { layer: i, setOnly: a } = $(), s = Y(!1), c = it(xe), l = Fe() && !Le() || c;
1075
1078
  J(() => {
1076
1079
  l && document.documentElement.removeAttribute("data-rail");
@@ -1131,10 +1134,10 @@ function ln() {
1131
1134
  "data-touch": l || void 0,
1132
1135
  "data-params": d ? "open" : void 0,
1133
1136
  "data-empty": i ? void 0 : "",
1134
- style: p ? { "--kol-sheet-h": Gt.tall } : void 0,
1137
+ style: p ? { "--kol-sheet-h": qt.tall } : void 0,
1135
1138
  children: [
1136
- /* @__PURE__ */ Z(Dt, {}),
1137
- l ? /* @__PURE__ */ Q(nn.Provider, {
1139
+ /* @__PURE__ */ Z(Ot, {}),
1140
+ l ? /* @__PURE__ */ Q(an.Provider, {
1138
1141
  value: {
1139
1142
  collapseParams: () => f(!1),
1140
1143
  tall: p,
@@ -1144,30 +1147,30 @@ function ln() {
1144
1147
  },
1145
1148
  children: [/* @__PURE__ */ Z(o.Provider, {
1146
1149
  value: "md",
1147
- children: /* @__PURE__ */ Z(ze, { registry: cn })
1148
- }), !d && /* @__PURE__ */ Z(Wt, {
1150
+ children: /* @__PURE__ */ Z(ze, { registry: un })
1151
+ }), !d && /* @__PURE__ */ Z(Kt, {
1149
1152
  tone: "grey",
1150
- label: Jt(i).pill,
1153
+ label: Xt(i).pill,
1151
1154
  onOpen: () => f(!0)
1152
1155
  })]
1153
- }) : /* @__PURE__ */ Z(ze, { registry: sn }),
1154
- h && /* @__PURE__ */ Z(qt, {
1156
+ }) : /* @__PURE__ */ Z(ze, { registry: ln }),
1157
+ h && /* @__PURE__ */ Z(Yt, {
1155
1158
  onPicked: () => g(!1),
1156
1159
  onClose: () => g(!1)
1157
1160
  })
1158
1161
  ]
1159
1162
  });
1160
1163
  }
1161
- var un = "kol.editor.labs-draft";
1162
- function dn() {
1164
+ var fn = "kol.editor.labs-draft";
1165
+ function pn() {
1163
1166
  return /* @__PURE__ */ Z(He, {
1164
- draftKey: un,
1165
- children: /* @__PURE__ */ Z(ln, {})
1167
+ draftKey: fn,
1168
+ children: /* @__PURE__ */ Z(dn, {})
1166
1169
  });
1167
1170
  }
1168
1171
  //#endregion
1169
1172
  //#region src/editor/mobile/EffectScreen.jsx
1170
- function fn({ layer: e, chain: t, onPick: n, onBack: r }) {
1173
+ function mn({ layer: e, chain: t, onPick: n, onBack: r }) {
1171
1174
  let [i, a] = X(null);
1172
1175
  Ae(r);
1173
1176
  let { engineHost: o } = L(e), s = o && !t.some((e) => e.def?.kind === "engine"), c = F(I.filter((e) => e.kind !== "engine" || s)), l = c.find((e) => e.id === i) ?? null;
@@ -1209,7 +1212,7 @@ function fn({ layer: e, chain: t, onPick: n, onBack: r }) {
1209
1212
  }
1210
1213
  //#endregion
1211
1214
  //#region src/editor/mobile/MobileOverlay.jsx
1212
- var pn = { background: "var(--kol-surface-primary)" }, mn = [
1215
+ var hn = { background: "var(--kol-surface-primary)" }, gn = [
1213
1216
  {
1214
1217
  value: "generate",
1215
1218
  label: "Generate"
@@ -1226,29 +1229,29 @@ var pn = { background: "var(--kol-surface-primary)" }, mn = [
1226
1229
  value: "output",
1227
1230
  label: "Output"
1228
1231
  }
1229
- ], hn = mn.filter((e) => e.value !== "generate"), gn = "[&_.kol-seg-cell]:min-w-0 [&_.kol-seg-cell]:px-1 [&_.kol-seg-cell]:overflow-hidden [@media(hover:none)]:[&_.kol-seg-cell:hover]:text-[var(--kol-oq-48)]", _n = {
1232
+ ], _n = gn.filter((e) => e.value !== "generate"), vn = "[&_.kol-seg-cell]:min-w-0 [&_.kol-seg-cell]:px-1 [&_.kol-seg-cell]:overflow-hidden [@media(hover:none)]:[&_.kol-seg-cell:hover]:text-[var(--kol-oq-48)]", yn = {
1230
1233
  lg: 9.6,
1231
1234
  sm: 7.2
1232
- }, vn = 10, yn = 232;
1233
- function bn(e, t) {
1234
- let n = t === "sm" ? yn : Math.min(window.innerWidth, 480) - 24, r = [], i = [], a = 0;
1235
+ }, bn = 10, xn = 232;
1236
+ function Sn(e, t) {
1237
+ let n = t === "sm" ? xn : Math.min(window.innerWidth, 480) - 24, r = [], i = [], a = 0;
1235
1238
  for (let o of e) {
1236
- let e = o.label.length * _n[t] + vn, s = Math.max(a, e);
1239
+ let e = o.label.length * yn[t] + bn, s = Math.max(a, e);
1237
1240
  i.length && (i.length + 1) * s > n ? (r.push(i), i = [o], a = e) : (i.push(o), a = s);
1238
1241
  }
1239
1242
  return i.length && r.push(i), r;
1240
1243
  }
1241
- function xn({ cells: e, size: t }) {
1242
- return bn(e, t).map((e, n) => /* @__PURE__ */ Z(q, {
1244
+ function Cn({ cells: e, size: t }) {
1245
+ return Sn(e, t).map((e, n) => /* @__PURE__ */ Z(q, {
1243
1246
  value: null,
1244
1247
  onChange: (t) => e.find((e) => e.value === t)?.run(),
1245
1248
  options: e,
1246
1249
  size: t,
1247
1250
  ariaLabel: "Randomize scope",
1248
- className: gn
1251
+ className: vn
1249
1252
  }, n));
1250
1253
  }
1251
- var Sn = [
1254
+ var wn = [
1252
1255
  2,
1253
1256
  4,
1254
1257
  8,
@@ -1257,17 +1260,17 @@ var Sn = [
1257
1260
  value: String(e),
1258
1261
  label: `${e}s`
1259
1262
  }));
1260
- function Cn({ size: e }) {
1263
+ function Tn({ size: e }) {
1261
1264
  let { loopSeconds: t, setLoopSeconds: n } = C();
1262
1265
  return /* @__PURE__ */ Z(q, {
1263
1266
  value: String(t),
1264
1267
  onChange: (e) => n(Number(e)),
1265
- options: Sn,
1268
+ options: wn,
1266
1269
  size: e,
1267
1270
  ariaLabel: "Loop length"
1268
1271
  });
1269
1272
  }
1270
- var wn = [
1273
+ var En = [
1271
1274
  {
1272
1275
  value: "9:16",
1273
1276
  label: "9:16"
@@ -1284,7 +1287,7 @@ var wn = [
1284
1287
  value: "1:1",
1285
1288
  label: "1:1"
1286
1289
  }
1287
- ], Tn = [
1290
+ ], Dn = [
1288
1291
  {
1289
1292
  value: "5:4",
1290
1293
  label: "5:4"
@@ -1302,14 +1305,14 @@ var wn = [
1302
1305
  label: "Fill"
1303
1306
  }
1304
1307
  ];
1305
- function En({ layer: e, onSwitchCategory: r, onInsert: a, onRestart: o, aspectValue: l, onAspect: d, openEffects: f = !1, rail: h = !1, onRail: v, onSheet: y }) {
1308
+ function On({ layer: e, onSwitchCategory: r, onInsert: a, onRestart: o, aspectValue: l, onAspect: d, openEffects: f = !1, rail: h = !1, onRail: v, onSheet: y }) {
1306
1309
  let { updateLayer: b, addFilter: x, removeFilter: ee } = u(), { onExportPng: S } = pt(), [C, ne] = X(!1), [w, T] = X(!0), [E, D] = X(!1), [O, k] = X(!1), [A, j] = X("generate"), [M, N] = X(!1), P = s(e);
1307
1310
  J(() => {
1308
1311
  f && (T(!0), k(!0));
1309
1312
  }, [f]);
1310
1313
  let F = h ? "sm" : "lg", I = h && !!e && w && !C;
1311
1314
  J(() => (v?.(I), () => v?.(!1)), [I]);
1312
- let ie = !h && e && w && !C ? M ? Gt.tall : Gt.half : null;
1315
+ let ie = !h && e && w && !C ? M ? qt.tall : qt.half : null;
1313
1316
  if (J(() => (y?.(ie), () => y?.(null)), [ie]), !e) return null;
1314
1317
  if (C) return /* @__PURE__ */ Z("button", {
1315
1318
  "aria-label": "Show controls",
@@ -1323,7 +1326,7 @@ function En({ layer: e, onSwitchCategory: r, onInsert: a, onRestart: o, aspectVa
1323
1326
  let t = _(e, P.take());
1324
1327
  t && b(e.id, { filters: t });
1325
1328
  };
1326
- if (!w) return /* @__PURE__ */ Q(Wt, {
1329
+ if (!w) return /* @__PURE__ */ Q(Kt, {
1327
1330
  label: R ? e.presetLabel : "Media",
1328
1331
  onOpen: () => T(!0),
1329
1332
  size: F,
@@ -1339,8 +1342,8 @@ function En({ layer: e, onSwitchCategory: r, onInsert: a, onRestart: o, aspectVa
1339
1342
  children: "Download"
1340
1343
  })]
1341
1344
  });
1342
- let ue = (R ? mn : hn).filter((e) => (e.value !== "effects" || le) && (e.value !== "transport" || g("motion"))), U = ue.some((e) => e.value === A) ? A : ue[0].value;
1343
- return /* @__PURE__ */ Q(Ct, { children: [
1345
+ let ue = (R ? gn : _n).filter((e) => (e.value !== "effects" || le) && (e.value !== "transport" || g("motion"))), U = ue.some((e) => e.value === A) ? A : ue[0].value;
1346
+ return /* @__PURE__ */ Q(wt, { children: [
1344
1347
  E && /* @__PURE__ */ Z(Se, {
1345
1348
  onPick: (e) => {
1346
1349
  r(e), D(!1);
@@ -1353,7 +1356,7 @@ function En({ layer: e, onSwitchCategory: r, onInsert: a, onRestart: o, aspectVa
1353
1356
  },
1354
1357
  onDismiss: () => D(!1)
1355
1358
  }),
1356
- O && /* @__PURE__ */ Z(fn, {
1359
+ O && /* @__PURE__ */ Z(mn, {
1357
1360
  layer: e,
1358
1361
  chain: V,
1359
1362
  onPick: (t) => {
@@ -1363,19 +1366,19 @@ function En({ layer: e, onSwitchCategory: r, onInsert: a, onRestart: o, aspectVa
1363
1366
  }),
1364
1367
  /* @__PURE__ */ Q("div", {
1365
1368
  className: h ? "fixed top-0 right-0 bottom-0 z-10 flex w-[var(--kol-sidenav-w,320px)] flex-col overflow-y-auto border-l border-oq-08" : "fixed right-0 left-[var(--fxr-rail,0px)] bottom-0 z-10 flex flex-col pb-[env(safe-area-inset-bottom)]",
1366
- style: h ? pn : {
1367
- ...pn,
1368
- top: `calc(100dvh - ${ie ?? Gt.half})`
1369
+ style: h ? hn : {
1370
+ ...hn,
1371
+ top: `calc(100dvh - ${ie ?? qt.half})`
1369
1372
  },
1370
1373
  children: [
1371
- !h && /* @__PURE__ */ Z(Kt, {
1374
+ !h && /* @__PURE__ */ Z(Jt, {
1372
1375
  tall: M,
1373
1376
  onToggle: () => N((e) => !e),
1374
1377
  onDrag: (e) => {
1375
1378
  e < 0 ? N(!0) : M ? N(!1) : T(!1);
1376
1379
  }
1377
1380
  }),
1378
- /* @__PURE__ */ Z(Ut, {
1381
+ /* @__PURE__ */ Z(Gt, {
1379
1382
  title: ae,
1380
1383
  onCollapse: () => T(!1),
1381
1384
  className: h ? "px-4 pt-2.5 pb-1.5" : "px-3",
@@ -1393,7 +1396,7 @@ function En({ layer: e, onSwitchCategory: r, onInsert: a, onRestart: o, aspectVa
1393
1396
  onChange: j,
1394
1397
  options: ue,
1395
1398
  size: F,
1396
- className: h ? gn : "[&_.kol-seg-cell]:min-w-0 [&_.kol-seg-cell]:px-2 [&_.kol-seg-cell]:overflow-hidden"
1399
+ className: h ? vn : "[&_.kol-seg-cell]:min-w-0 [&_.kol-seg-cell]:px-2 [&_.kol-seg-cell]:overflow-hidden"
1397
1400
  }),
1398
1401
  U === "generate" && R && /* @__PURE__ */ Q("div", {
1399
1402
  className: "flex flex-col gap-2 pt-3",
@@ -1420,7 +1423,7 @@ function En({ layer: e, onSwitchCategory: r, onInsert: a, onRestart: o, aspectVa
1420
1423
  onClick: se,
1421
1424
  children: "Randomize all"
1422
1425
  }),
1423
- oe.length > 0 && /* @__PURE__ */ Z(xn, {
1426
+ oe.length > 0 && /* @__PURE__ */ Z(Cn, {
1424
1427
  size: F,
1425
1428
  cells: [...oe.map((e) => ({
1426
1429
  value: e.id,
@@ -1475,7 +1478,7 @@ function En({ layer: e, onSwitchCategory: r, onInsert: a, onRestart: o, aspectVa
1475
1478
  iconRight: "trash",
1476
1479
  onClick: () => ee(e.id, n),
1477
1480
  children: `${n + 1}. ${t.def?.label ?? t.id}`
1478
- }), a.length > 0 && /* @__PURE__ */ Z(xn, {
1481
+ }), a.length > 0 && /* @__PURE__ */ Z(Cn, {
1479
1482
  size: F,
1480
1483
  cells: a.map((e) => ({
1481
1484
  value: e.id,
@@ -1491,7 +1494,7 @@ function En({ layer: e, onSwitchCategory: r, onInsert: a, onRestart: o, aspectVa
1491
1494
  children: [(() => {
1492
1495
  let e = g("motion").TransportBar;
1493
1496
  return /* @__PURE__ */ Z(e, { size: F });
1494
- })(), /* @__PURE__ */ Z(Cn, { size: F })]
1497
+ })(), /* @__PURE__ */ Z(Tn, { size: F })]
1495
1498
  }),
1496
1499
  U === "output" && /* @__PURE__ */ Q("div", {
1497
1500
  className: "flex flex-col gap-2 pt-3",
@@ -1499,14 +1502,14 @@ function En({ layer: e, onSwitchCategory: r, onInsert: a, onRestart: o, aspectVa
1499
1502
  /* @__PURE__ */ Z(q, {
1500
1503
  value: l,
1501
1504
  onChange: d,
1502
- options: wn,
1505
+ options: En,
1503
1506
  size: F,
1504
1507
  ariaLabel: "Aspect"
1505
1508
  }),
1506
1509
  /* @__PURE__ */ Z(q, {
1507
1510
  value: l,
1508
1511
  onChange: d,
1509
- options: Tn,
1512
+ options: Dn,
1510
1513
  size: F,
1511
1514
  ariaLabel: "Aspect (landscape) and fill"
1512
1515
  }),
@@ -1543,7 +1546,7 @@ function En({ layer: e, onSwitchCategory: r, onInsert: a, onRestart: o, aspectVa
1543
1546
  }
1544
1547
  //#endregion
1545
1548
  //#region src/editor/mobile/MobileView.jsx
1546
- function Dn({ onGenerate: e, onEffects: t, chromes: n }) {
1549
+ function kn({ onGenerate: e, onEffects: t, chromes: n }) {
1547
1550
  return /* @__PURE__ */ Z("div", {
1548
1551
  className: "fixed inset-y-0 right-0 left-[var(--fxr-rail,0px)] kol-overlay-scrim flex flex-col items-center justify-center p-6",
1549
1552
  style: { zIndex: "var(--kol-z-modal)" },
@@ -1606,7 +1609,7 @@ function Dn({ onGenerate: e, onEffects: t, chromes: n }) {
1606
1609
  })
1607
1610
  });
1608
1611
  }
1609
- function On() {
1612
+ function An() {
1610
1613
  let { layers: e, addLayer: t, removeLayer: r, updateLayer: i, canvasW: a, canvasH: o, aspect: s, setAspect: c } = u(), { setTool: l } = ye(), d = Fe() && !Le(), f = Ce(), p = () => "entry", [m, h] = X(p), [g, _] = X(!1), [v, y] = X(null), [b, S] = X("contain"), [C, te] = X(!1), [ne, w] = X(null), [E, O] = X(1), k = Y({
1611
1614
  pts: /* @__PURE__ */ new Map(),
1612
1615
  startDist: 0,
@@ -1638,7 +1641,7 @@ function On() {
1638
1641
  }
1639
1642
  t?.id === e.pointerId && (A.current = null), k.current.pts.delete(e.pointerId), k.current.pts.size < 2 && (k.current.startDist = 0);
1640
1643
  };
1641
- Et(), J(() => (tt("randomiser"), () => tt(null)), []), J(() => {
1644
+ Dt(), J(() => (tt("randomiser"), () => tt(null)), []), J(() => {
1642
1645
  c("4:5"), l("orbit");
1643
1646
  }, []);
1644
1647
  let F = e.find((e) => e.id === v) ?? (e.length === 1 ? e[0] : null), I = m === "live" && F?.type === "photo" && !F.src && F.srcType !== "webcam";
@@ -1703,7 +1706,7 @@ function On() {
1703
1706
  onPointerLeave: P,
1704
1707
  children: /* @__PURE__ */ Z(nt, { fit: b })
1705
1708
  }),
1706
- m === "entry" && /* @__PURE__ */ Z(Dn, {
1709
+ m === "entry" && /* @__PURE__ */ Z(kn, {
1707
1710
  chromes: d,
1708
1711
  onGenerate: () => h("category"),
1709
1712
  onEffects: () => {
@@ -1715,7 +1718,7 @@ function On() {
1715
1718
  onInsert: R,
1716
1719
  onBack: () => h("entry")
1717
1720
  }),
1718
- m === "live" && !I && /* @__PURE__ */ Z(En, {
1721
+ m === "live" && !I && /* @__PURE__ */ Z(On, {
1719
1722
  layer: F,
1720
1723
  onSwitchCategory: ie,
1721
1724
  onInsert: () => {
@@ -1734,7 +1737,7 @@ function On() {
1734
1737
  style: { zIndex: "var(--kol-z-modal)" },
1735
1738
  children: [/* @__PURE__ */ Z("div", {
1736
1739
  className: "flex-1 min-h-0",
1737
- children: /* @__PURE__ */ Z(Vt, { layer: F })
1740
+ children: /* @__PURE__ */ Z(Ut, { layer: F })
1738
1741
  }), /* @__PURE__ */ Z("div", {
1739
1742
  className: "flex justify-center pb-[max(0.75rem,env(safe-area-inset-bottom))]",
1740
1743
  children: /* @__PURE__ */ Z(K, {
@@ -1748,11 +1751,11 @@ function On() {
1748
1751
  ]
1749
1752
  });
1750
1753
  }
1751
- function kn() {
1754
+ function jn() {
1752
1755
  return /* @__PURE__ */ Z(He, {
1753
1756
  persistDraft: !1,
1754
- children: /* @__PURE__ */ Z(On, {})
1757
+ children: /* @__PURE__ */ Z(An, {})
1755
1758
  });
1756
1759
  }
1757
1760
  //#endregion
1758
- export { dt as AppSettingsSections, _e as BRAND, ct as DesignEditor, ct as default, mt as DisplaySettingsDrawer, He as EditorProviders, Me as FilesDialog, Xe as GeneratorLibraryProvider, un as LABS_DRAFT_KEY, Te as LIBRARY_SLOT_KEYS, dn as LabsView, Ie as MODES, kn as MobileView, Be as OutputCanvas, nt as OutputStage, st as OutputView, et as RAIL_EXTRA_PREFIX, Re as VIEW_PATHS, je as closeFiles, Ze as comboLabel, ke as currentView, Fe as isMobileDevice, Ee as loadLibrary, ge as openFiles, f as registerPack, $e as setMediaClient, qe as setMediaProxyBase, lt as setMode, ot as setNavigator, at as setRailExtras, a as setSettingsStore, we as setWantsDesktop, me as shortcutsBySection, ft as useFilesDialog, Oe as useGeneratorLibrary, Je as useRailExtras, Ve as useSettingsSections, Le as wantsDesktop, Ye as withView };
1761
+ export { dt as AppSettingsSections, _e as BRAND, ct as DesignEditor, ct as default, mt as DisplaySettingsDrawer, He as EditorProviders, Me as FilesDialog, Xe as GeneratorLibraryProvider, fn as LABS_DRAFT_KEY, Te as LIBRARY_SLOT_KEYS, pn as LabsView, Ie as MODES, jn as MobileView, Be as OutputCanvas, nt as OutputStage, st as OutputView, et as RAIL_EXTRA_PREFIX, Re as VIEW_PATHS, je as closeFiles, Ze as comboLabel, ke as currentView, Fe as isMobileDevice, Ee as loadLibrary, ge as openFiles, f as registerPack, $e as setMediaClient, qe as setMediaProxyBase, lt as setMode, ot as setNavigator, at as setRailExtras, a as setSettingsStore, we as setWantsDesktop, me as shortcutsBySection, ft as useFilesDialog, Oe as useGeneratorLibrary, Je as useRailExtras, Ve as useSettingsSections, Le as wantsDesktop, Ye as withView };