@kolkrabbi/design-editor 0.32.0 → 0.33.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.
@@ -1,10 +1,10 @@
1
1
  import { $ as e, An as t, B as n, Bn as r, C as i, D as a, F as o, Fn as s, I as c, J as l, L as u, Mn as d, Mt as f, Nn as p, Q as m, Rn as h, Rt as g, S as _, St as v, Vn as y, X as b, Y as x, Z as S, a as C, at as w, c as T, d as E, dn as D, et as ee, f as O, gt as te, it as k, l as ne, m as re, mt as ie, n as ae, nt as oe, o as se, ot as ce, p as le, pn as ue, q as de, rt as fe, s as pe, t as me, tt as he, u as ge, un as _e, x as ve } from "./rolls-CEQmdcp3.js";
2
- import { c as ye, n as be, t as xe } from "./useLayerEdit-BF9wI5pX.js";
3
- import { C as Se, D as Ce, E as we, O as Te, S as Ee, T as De, _ as Oe, at as ke, b as Ae, ct as je, d as Me, dt as Ne, f as Pe, ft as Fe, h as Ie, ht as Le, it as Re, l as ze, lt as Be, m as Ve, mt as He, n as Ue, nt as We, ot as Ge, pt as Ke, r as qe, rt as Je, st as Ye, t as Xe, tt as Ze, v as Qe, w as $e, x as et, y as tt } from "./effectCategories-BGIW_dEc.js";
2
+ import { c as ye, n as be, t as xe } from "./useLayerEdit-Cmtx3V3O.js";
3
+ import { C as Se, D as Ce, E as we, O as Te, S as Ee, T as De, _ as Oe, at as ke, b as Ae, ct as je, d as Me, dt as Ne, f as Pe, ft as Fe, h as Ie, ht as Le, it as Re, l as ze, lt as Be, m as Ve, mt as He, n as Ue, nt as We, ot as Ge, pt as Ke, r as qe, rt as Je, st as Ye, t as Xe, tt as Ze, v as Qe, w as $e, x as et, y as tt } from "./effectCategories-DV7i_AgK.js";
4
4
  import { n as nt, t as rt } from "./TreePicker-1_NZG8GB.js";
5
- import { I as it, N as at, a as ot, c as st, i as ct, m as lt, n as ut, o as dt, r as ft } from "./store-D6Si8cRD.js";
5
+ import { I as it, N as at, a as ot, c as st, i as ct, m as lt, n as ut, o as dt, r as ft } from "./store-CF9s1Pb2.js";
6
6
  import { h as pt, r as mt, s as ht, t as gt, u as _t } from "./morphStore-B5081ohW.js";
7
- import { BezierPathEditor as vt, Button as A, CurveEditor as yt, Dialog as bt, Divider as xt, Dropdown as j, FullscreenOverlay as St, Input as Ct, KeyframeEditor as wt, LabeledControl as Tt, LabeledControlSection as Et, SegmentedToggle as Dt, SettingsCell as Ot, SettingsDisclosure as kt, SettingsFieldMap as At, SettingsGrid as jt, SettingsGroup as Mt, SettingsLights as Nt, SettingsPoint as Pt, SettingsRamp as Ft, SettingsRampHead as It, SettingsRange as Lt, SettingsRow as Rt, SettingsSegmented as zt, SettingsSelect as Bt, SettingsSlider as Vt, SettingsText as Ht, SettingsToggle as Ut, ShellSearchOverlay as Wt, Slider as Gt, StepList as Kt, TabsRow as qt, ToggleSwitch as Jt, Tooltip as Yt, ViewToggle as Xt, XYPad as Zt } from "@kolkrabbi/kol-component";
7
+ import { BezierPathEditor as vt, Button as A, ButtonGroup as yt, CurveEditor as bt, Dialog as xt, Divider as St, Dropdown as j, FullscreenOverlay as Ct, Input as wt, KeyframeEditor as Tt, LabeledControl as Et, LabeledControlSection as Dt, SettingsCell as Ot, SettingsDisclosure as kt, SettingsFieldMap as At, SettingsGrid as jt, SettingsGroup as Mt, SettingsLights as Nt, SettingsPoint as Pt, SettingsRamp as Ft, SettingsRampHead as It, SettingsRange as Lt, SettingsRow as Rt, SettingsSegmented as zt, SettingsSelect as Bt, SettingsSlider as Vt, SettingsText as Ht, SettingsToggle as Ut, ShellSearchOverlay as Wt, Slider as Gt, StepList as Kt, TabsRow as qt, ToggleSwitch as Jt, Tooltip as Yt, ViewToggle as Xt, XYPad as Zt } from "@kolkrabbi/kol-component";
8
8
  import { useCallback as Qt, useEffect as $t, useId as en, useMemo as tn, useRef as nn, useState as M } from "react";
9
9
  import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
10
10
  import { PropertyRail as rn } from "@kolkrabbi/kol-shell";
@@ -337,7 +337,7 @@ function Tn({ layer: e, tree: t = sn, inline: n = !0, about: r = null }) {
337
337
  function En({ open: e, onClose: n, schema: r, layer: i, size: a = "md" }) {
338
338
  if (d(), !e) return null;
339
339
  let o = se(r ?? [], i);
340
- return /* @__PURE__ */ P(St, {
340
+ return /* @__PURE__ */ P(Ct, {
341
341
  open: !0,
342
342
  scrim: !0,
343
343
  onClose: n,
@@ -349,7 +349,7 @@ function En({ open: e, onClose: n, schema: r, layer: i, size: a = "md" }) {
349
349
  className: "kol-eyebrow text-fg-96",
350
350
  children: "Randomize all rolls"
351
351
  }),
352
- /* @__PURE__ */ F(Et, {
352
+ /* @__PURE__ */ F(Dt, {
353
353
  divided: !0,
354
354
  children: [o.map((e) => /* @__PURE__ */ P(Rt, {
355
355
  label: e.label,
@@ -1487,7 +1487,7 @@ function $n(e, t) {
1487
1487
  //#region src/editor/compose/inspectors/KeyframeEditor.jsx
1488
1488
  function er({ layer: e, patch: t, defaultDuration: n = 8 }) {
1489
1489
  let r = () => Qn(e.duration ?? n, ue.getLoopSeconds());
1490
- return /* @__PURE__ */ P(wt, {
1490
+ return /* @__PURE__ */ P(Tt, {
1491
1491
  keyframes: e.keyframes,
1492
1492
  onChange: (e) => t({ keyframes: e }),
1493
1493
  t: () => ue.getT() * r() % 1,
@@ -1533,7 +1533,7 @@ function tr({ layer: e, patch: t, camParams: n, isEngine: r, showHeader: i = !1
1533
1533
  onClick: () => {
1534
1534
  let i = {};
1535
1535
  for (let e of n) i[e.key] = e.default;
1536
- t(i), r && import("./host-DJ8bDKO7.js").then((t) => t.hostAction?.(e.id, "resetCamera")).catch(() => {});
1536
+ t(i), r && import("./host-B4QQewPr.js").then((t) => t.hostAction?.(e.id, "resetCamera")).catch(() => {});
1537
1537
  },
1538
1538
  children: "Reset"
1539
1539
  })]
@@ -1552,7 +1552,7 @@ function nr({ layer: e, patch: t, seed: n }) {
1552
1552
  id: t.id
1553
1553
  } : t), { _rollSeed: t });
1554
1554
  };
1555
- return /* @__PURE__ */ P(Tt, {
1555
+ return /* @__PURE__ */ P(Et, {
1556
1556
  label: `Rules · ${i.length}`,
1557
1557
  children: /* @__PURE__ */ F("div", {
1558
1558
  className: "flex flex-col gap-2",
@@ -1623,7 +1623,7 @@ function ar({ value: e, onChange: t }) {
1623
1623
  });
1624
1624
  }
1625
1625
  function or({ layer: e, patch: t }) {
1626
- return e.render !== "field" || e.field !== "organic" || e.waveProfile !== "custom" ? null : /* @__PURE__ */ P(Tt, {
1626
+ return e.render !== "field" || e.field !== "organic" || e.waveProfile !== "custom" ? null : /* @__PURE__ */ P(Et, {
1627
1627
  label: "Profile curve",
1628
1628
  children: /* @__PURE__ */ P(ar, {
1629
1629
  value: Array.isArray(e.waveCurve) && e.waveCurve.length > 1 ? e.waveCurve : Ke,
@@ -1641,7 +1641,7 @@ function sr({ layer: e, patch: t }) {
1641
1641
  layerCopies: e.copies,
1642
1642
  layerSpiral: e.spiral
1643
1643
  };
1644
- return /* @__PURE__ */ P(yt, {
1644
+ return /* @__PURE__ */ P(bt, {
1645
1645
  value: n ? e.custom ?? ke("polar") : r.def,
1646
1646
  stock: i,
1647
1647
  onChange: (e, { extras: n }) => t({
@@ -1696,7 +1696,7 @@ function ur({ layer: e, patch: t, renderAnimate: n }) {
1696
1696
  }),
1697
1697
  /* @__PURE__ */ F("div", {
1698
1698
  className: "grid grid-cols-2 gap-2",
1699
- children: [/* @__PURE__ */ P(Tt, {
1699
+ children: [/* @__PURE__ */ P(Et, {
1700
1700
  label: "X axis",
1701
1701
  children: /* @__PURE__ */ F("div", {
1702
1702
  className: "flex items-center gap-2",
@@ -1709,7 +1709,7 @@ function ur({ layer: e, patch: t, renderAnimate: n }) {
1709
1709
  onChange: (e) => t({ _xyX: e })
1710
1710
  }), n?.(l)]
1711
1711
  })
1712
- }), /* @__PURE__ */ P(Tt, {
1712
+ }), /* @__PURE__ */ P(Et, {
1713
1713
  label: "Y axis",
1714
1714
  children: /* @__PURE__ */ F("div", {
1715
1715
  className: "flex items-center gap-2",
@@ -2057,7 +2057,7 @@ function Sr({ layer: e }) {
2057
2057
  className: "kol-eyebrow text-fg-80",
2058
2058
  children: "Selected form"
2059
2059
  }),
2060
- /* @__PURE__ */ P(Tt, {
2060
+ /* @__PURE__ */ P(Et, {
2061
2061
  label: "Type",
2062
2062
  children: /* @__PURE__ */ P(j, {
2063
2063
  variant: "subtle",
@@ -2073,7 +2073,7 @@ function Sr({ layer: e }) {
2073
2073
  }),
2074
2074
  c.map((e) => {
2075
2075
  let t = h[e.k] ?? (e.fallback ? h[e.fallback] : void 0), n = typeof t == "number" ? t : e.def;
2076
- return /* @__PURE__ */ P(Tt, {
2076
+ return /* @__PURE__ */ P(Et, {
2077
2077
  label: e.label,
2078
2078
  children: /* @__PURE__ */ P(Gt, {
2079
2079
  min: e.min,
@@ -2248,7 +2248,7 @@ function Tr({ layer: e, setProp: t, patch: n }) {
2248
2248
  let i = Ne(e.loopId), a = Cr.filter((e) => i?.has(e.role));
2249
2249
  if (!a.length) return null;
2250
2250
  let o = e._layerPrev ?? {};
2251
- return /* @__PURE__ */ P(Et, {
2251
+ return /* @__PURE__ */ P(Dt, {
2252
2252
  label: "Layers",
2253
2253
  divided: !0,
2254
2254
  children: /* @__PURE__ */ P(Kt, {
@@ -2502,7 +2502,7 @@ function R({ inline: e, label: t, align: n = "fill", children: r }) {
2502
2502
  align: n,
2503
2503
  labelWidth: o,
2504
2504
  children: r
2505
- }) : /* @__PURE__ */ P(Tt, {
2505
+ }) : /* @__PURE__ */ P(Et, {
2506
2506
  label: t,
2507
2507
  children: r
2508
2508
  });
@@ -2515,7 +2515,8 @@ var Fr = [{
2515
2515
  label: "On"
2516
2516
  }];
2517
2517
  function Ir({ inline: e, cs: t, on: n, onChange: r }) {
2518
- return e ? /* @__PURE__ */ P(Dt, {
2518
+ return e ? /* @__PURE__ */ P(yt, {
2519
+ layout: "joined",
2519
2520
  tone: "sunken",
2520
2521
  size: t,
2521
2522
  className: `w-full ${c(t) ?? ""}`,
@@ -2587,7 +2588,7 @@ function Lr({ layer: e, setProp: n, patch: r, updateLayer: i, palette: a, render
2587
2588
  }) : null;
2588
2589
  return /* @__PURE__ */ F(N, { children: [
2589
2590
  c,
2590
- f && (p ? s === "generate" && /* @__PURE__ */ P(Et, {
2591
+ f && (p ? s === "generate" && /* @__PURE__ */ P(Dt, {
2591
2592
  divided: !0,
2592
2593
  children: /* @__PURE__ */ P(Tn, {
2593
2594
  layer: e,
@@ -2614,7 +2615,7 @@ function Lr({ layer: e, setProp: n, patch: r, updateLayer: i, palette: a, render
2614
2615
  onChange: Ne
2615
2616
  })
2616
2617
  }),
2617
- p && /* @__PURE__ */ F(Et, {
2618
+ p && /* @__PURE__ */ F(Dt, {
2618
2619
  divided: !0,
2619
2620
  children: [
2620
2621
  ue && /* @__PURE__ */ P(R, {
@@ -2762,7 +2763,7 @@ function Lr({ layer: e, setProp: n, patch: r, updateLayer: i, palette: a, render
2762
2763
  tab: "generate",
2763
2764
  inline: p
2764
2765
  }),
2765
- p && /* @__PURE__ */ P(xt, {}),
2766
+ p && /* @__PURE__ */ P(St, {}),
2766
2767
  /* @__PURE__ */ F("div", {
2767
2768
  className: "flex gap-2",
2768
2769
  children: [
@@ -2898,7 +2899,7 @@ function Lr({ layer: e, setProp: n, patch: r, updateLayer: i, palette: a, render
2898
2899
  })
2899
2900
  ] }),
2900
2901
  s === "anim" && /* @__PURE__ */ F(N, { children: [
2901
- ye && /* @__PURE__ */ F(Et, {
2902
+ ye && /* @__PURE__ */ F(Dt, {
2902
2903
  label: "Motion",
2903
2904
  divided: !0,
2904
2905
  children: [/* @__PURE__ */ P(R, {
@@ -2930,7 +2931,7 @@ function Lr({ layer: e, setProp: n, patch: r, updateLayer: i, palette: a, render
2930
2931
  schema: S,
2931
2932
  setProp: ke
2932
2933
  }),
2933
- b && !v?.is3D && /* @__PURE__ */ P(Et, {
2934
+ b && !v?.is3D && /* @__PURE__ */ P(Dt, {
2934
2935
  label: "Interaction",
2935
2936
  divided: !0,
2936
2937
  children: /* @__PURE__ */ P(R, {
@@ -2944,7 +2945,7 @@ function Lr({ layer: e, setProp: n, patch: r, updateLayer: i, palette: a, render
2944
2945
  })
2945
2946
  })
2946
2947
  }),
2947
- v?.is3D && /* @__PURE__ */ F(Et, {
2948
+ v?.is3D && /* @__PURE__ */ F(Dt, {
2948
2949
  label: "3D",
2949
2950
  divided: !0,
2950
2951
  children: [/* @__PURE__ */ P(R, {
@@ -10249,7 +10250,7 @@ var Po = ({ t: e, className: t }) => e.id === "generate" ? /* @__PURE__ */ P(jo,
10249
10250
  }, Lo = "[--kol-slider-float-run:var(--kol-accent-primary)]", Ro = "h-7 !rounded-md";
10250
10251
  function zo({ x: e, value: t, set: n, disabled: r }) {
10251
10252
  let [i, a] = M(null);
10252
- return /* @__PURE__ */ P(Ct, {
10253
+ return /* @__PURE__ */ P(wt, {
10253
10254
  variant: "float",
10254
10255
  size: "sm",
10255
10256
  value: i ?? (e.format ? e.format(t) : String(t)),
@@ -10317,7 +10318,7 @@ function Vo({ x: e, t }) {
10317
10318
  (e.format ?? String)(n[1])
10318
10319
  ]
10319
10320
  })] });
10320
- case "point": return ["X", "Y"].map((t, a) => /* @__PURE__ */ P(Ct, {
10321
+ case "point": return ["X", "Y"].map((t, a) => /* @__PURE__ */ P(wt, {
10321
10322
  variant: "float",
10322
10323
  size: "sm",
10323
10324
  prefix: t,
@@ -10351,7 +10352,7 @@ function Vo({ x: e, t }) {
10351
10352
  })
10352
10353
  });
10353
10354
  case "text":
10354
- case "color": return /* @__PURE__ */ P(Ct, {
10355
+ case "color": return /* @__PURE__ */ P(wt, {
10355
10356
  variant: "float",
10356
10357
  size: "sm",
10357
10358
  value: n ?? "",
@@ -10374,7 +10375,7 @@ function Vo({ x: e, t }) {
10374
10375
  children: e.name
10375
10376
  });
10376
10377
  case "ramp": return /* @__PURE__ */ F(N, { children: [
10377
- /* @__PURE__ */ P(Ct, {
10378
+ /* @__PURE__ */ P(wt, {
10378
10379
  variant: "float",
10379
10380
  size: "sm",
10380
10381
  "aria-label": `${e.name} A`,
@@ -10396,7 +10397,7 @@ function Vo({ x: e, t }) {
10396
10397
  curve: e
10397
10398
  }), `${e.name} curve`, i)
10398
10399
  }),
10399
- /* @__PURE__ */ P(Ct, {
10400
+ /* @__PURE__ */ P(wt, {
10400
10401
  variant: "float",
10401
10402
  size: "sm",
10402
10403
  "aria-label": `${e.name} B`,
@@ -10419,7 +10420,7 @@ function Ho({ x: e, t }) {
10419
10420
  let n = t.valueOf(e), r = t.set(e), i = (e, t, i) => r(n.map((n, r) => r === e ? {
10420
10421
  ...n,
10421
10422
  [t]: i
10422
- } : n)), a = (e, t, r) => /* @__PURE__ */ P(Ct, {
10423
+ } : n)), a = (e, t, r) => /* @__PURE__ */ P(wt, {
10423
10424
  variant: "float",
10424
10425
  size: "sm",
10425
10426
  prefix: r,
@@ -10583,7 +10584,7 @@ function Ko(e, t) {
10583
10584
  type: "labeled",
10584
10585
  id: i.id,
10585
10586
  label: o[1],
10586
- render: () => [i, a].map((e, n) => /* @__PURE__ */ P(Ct, {
10587
+ render: () => [i, a].map((e, n) => /* @__PURE__ */ P(wt, {
10587
10588
  variant: "float",
10588
10589
  size: "sm",
10589
10590
  prefix: n ? "Y" : "X",
@@ -10967,7 +10968,7 @@ function Zo({ t: e, caption: t }) {
10967
10968
  }
10968
10969
  function Qo({ id: e, open: t, onClose: n }) {
10969
10970
  let r = Ao(e), { win: i, params: a, sections: o } = r, [s, c] = M(o[0].key), [l, u] = M({}), d = o.find((e) => e.key === s) ?? o[0], f = i.header.find((e) => e.id === "style"), p = i.header.find((e) => e.id === "description"), m = i.header.find((e) => e.id === "expand"), h = i.fieldMap?.(a);
10970
- return /* @__PURE__ */ P(bt, {
10971
+ return /* @__PURE__ */ P(xt, {
10971
10972
  variant: "settings",
10972
10973
  open: t,
10973
10974
  onClose: n,
@@ -11141,7 +11142,7 @@ var es = {
11141
11142
  GenerateLayer: Aa,
11142
11143
  GeneratorRail: qo,
11143
11144
  GeneratorWindows: $o,
11144
- loadGlHost: () => import("./host-DJ8bDKO7.js")
11145
+ loadGlHost: () => import("./host-B4QQewPr.js")
11145
11146
  };
11146
11147
  y("generators", es);
11147
11148
  //#endregion
@@ -1,2 +1,2 @@
1
- import { t as e } from "./generators-BnuRmK-x.js";
1
+ import { t as e } from "./generators-XBzHN_kX.js";
2
2
  export { e as generators };
@@ -1,6 +1,6 @@
1
1
  import { dn as e, pn as t } from "./rolls-CEQmdcp3.js";
2
- import { A as n, B as r, F as i, G as a, H as o, I as s, L as c, M as l, N as u, P as d, R as f, U as p, V as m, W as h, j as g, k as _, ut as v, z as y } from "./effectCategories-BGIW_dEc.js";
3
- import { c as ee, d as te, l as b, u as ne } from "./generators-BnuRmK-x.js";
2
+ import { A as n, B as r, F as i, G as a, H as o, I as s, L as c, M as l, N as u, P as d, R as f, U as p, V as m, W as h, j as g, k as _, ut as v, z as y } from "./effectCategories-DV7i_AgK.js";
3
+ import { c as ee, d as te, l as b, u as ne } from "./generators-XBzHN_kX.js";
4
4
  import { n as x, r as re } from "./previewScale-CA0ComGv.js";
5
5
  import { A as ie, At as ae, Bt as S, C as oe, D as se, Dt as C, E as ce, Et as w, F as le, Gt as T, Ht as E, Kt as ue, L as D, Lt as de, N as fe, Nt as pe, O, P as me, Pt as he, Rt as ge, S as k, T as A, Ut as _e, Vt as j, _t as M, a as N, at as ve, b as ye, bt as be, c as xe, d as P, et as F, f as I, g as Se, gt as L, h as Ce, ht as we, i as Te, it as Ee, jt as De, k as Oe, m as R, mt as ke, n as Ae, nt as je, o as Me, ot as Ne, p as z, pt as Pe, r as Fe, rt as Ie, st as Le, t as B, tt as Re, u as ze, v as V, vt as Be, x as Ve, yt as He, zt as Ue } from "./OrbitControls-DVpLgmKv.js";
6
6
  import { n as We, t as Ge } from "./BufferGeometryUtils-Cc8LNd5v.js";
@@ -1,10 +1,10 @@
1
1
  import { Bt as e, D as t, F as n, Ht as r, In as i, L as a, Pn as o, Rn as s, T as c, Ut as l, Vn as u, Vt as d, Wt as f, d as p, dn as m, f as h, mn as g, q as _, t as v, un as y } from "./rolls-CEQmdcp3.js";
2
2
  import { c as b, d as x, f as S, i as C, l as w, o as T, r as ee, s as te, u as ne } from "./TreePicker-1_NZG8GB.js";
3
- import { i as E, t as D } from "./Timeline-BKYyRqYg.js";
4
- import { BezierPathEditor as O, Button as k, Dropdown as re, Input as ie, LabeledControl as ae, MenuDropdownItem as oe, PopoverPanel as se, SegmentedToggle as ce, SettingsRow as le, Slider as A, Textarea as ue, ToggleCheckbox as j, Tooltip as M, glyphSize as de, usePopover as fe } from "@kolkrabbi/kol-component";
3
+ import { i as E, t as D } from "./Timeline-Cz-W72D0.js";
4
+ import { BezierPathEditor as O, Button as k, ButtonGroup as re, Dropdown as ie, Input as ae, LabeledControl as oe, MenuDropdownItem as se, PopoverPanel as ce, SettingsRow as le, Slider as A, Textarea as ue, ToggleCheckbox as j, Tooltip as M, glyphSize as de, usePopover as fe } from "@kolkrabbi/kol-component";
5
5
  import { Fragment as pe, useEffect as me, useState as N } from "react";
6
6
  import { Fragment as he, jsx as P, jsxs as F } from "react/jsx-runtime";
7
- import { Icon as ge } from "@kolkrabbi/kol-icons";
7
+ import { IconLoader as ge } from "@kolkrabbi/kol-icons";
8
8
  //#region src/kinetic/paths.js
9
9
  var _e = Math.PI * 2, I = (e) => Math.round(e * 100) / 100;
10
10
  function ve(e) {
@@ -3449,13 +3449,13 @@ function _t({ layer: e, setProp: t, updateLayer: r, palette: i, renderAnimate: o
3449
3449
  let [w, T] = N([]), ee = (e) => T((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]), te = (e) => {
3450
3450
  let t = g[e]?.group;
3451
3451
  return t ? g.reduce((e, n, r) => n.group === t ? [...e, r] : e, []) : [e];
3452
- }, [ne, E] = N(0), D = g[S]?.motions ?? [], O = Math.min(ne, D.length), ie = (e) => ({
3452
+ }, [ne, E] = N(0), D = g[S]?.motions ?? [], O = Math.min(ne, D.length), ae = (e) => ({
3453
3453
  ...e,
3454
3454
  instances: (e.instances ?? []).map((e, t) => t === S ? {
3455
3455
  ...e,
3456
3456
  motion: { ...e.motions?.[O - 1] ?? {} }
3457
3457
  } : e)
3458
- }), oe = (e) => pt.has(e.key) && O > 0 ? ie(f) : f, se = (t) => {
3458
+ }), se = (e) => pt.has(e.key) && O > 0 ? ae(f) : f, ce = (t) => {
3459
3459
  t && (r(e.id, {
3460
3460
  presetId: t.id,
3461
3461
  presetLabel: t.label,
@@ -3485,7 +3485,7 @@ function _t({ layer: e, setProp: t, updateLayer: r, palette: i, renderAnimate: o
3485
3485
  } : e)), T([]));
3486
3486
  }, _e = (e, t) => {
3487
3487
  if (pt.has(e.key) && O > 0) {
3488
- let n = e.set(ie(f), t, S).instances?.[S]?.motion ?? {};
3488
+ let n = e.set(ae(f), t, S).instances?.[S]?.motion ?? {};
3489
3489
  de(S, { motions: D.map((e, t) => t === O - 1 ? n : e) });
3490
3490
  return;
3491
3491
  }
@@ -3522,11 +3522,11 @@ function _t({ layer: e, setProp: t, updateLayer: r, palette: i, renderAnimate: o
3522
3522
  });
3523
3523
  }, be = () => {
3524
3524
  let t = V.find((t) => t.id === e.presetId), n = V.filter((e) => e.id !== t?.id && (!t || e.sub === t.sub));
3525
- n.length && se(n[Math.floor(h(I.take() >>> 0)() * n.length)]);
3525
+ n.length && ce(n[Math.floor(h(I.take() >>> 0)() * n.length)]);
3526
3526
  }, xe = () => {
3527
3527
  let e = h(I.take() >>> 0);
3528
3528
  Ce(y[Math.floor(e() * y.length)].value, e() < .5);
3529
- }, Se = () => se(V.find((t) => t.id === e.presetId) ?? V[0]), Ce = (t, n) => {
3529
+ }, Se = () => ce(V.find((t) => t.id === e.presetId) ?? V[0]), Ce = (t, n) => {
3530
3530
  let i = m(t, n);
3531
3531
  r(e.id, {
3532
3532
  themeId: t,
@@ -3546,12 +3546,12 @@ function _t({ layer: e, setProp: t, updateLayer: r, palette: i, renderAnimate: o
3546
3546
  ...t,
3547
3547
  fill: e
3548
3548
  }))
3549
- }), we = s === "labs-effect" ? "style" : s, Te = ot.filter((e) => e.tab === we && (!e.when || e.when(oe(e), S))), Ee = g.some((e) => e?.morph?.on), R = g[S];
3549
+ }), we = s === "labs-effect" ? "style" : s, Te = ot.filter((e) => e.tab === we && (!e.when || e.when(se(e), S))), Ee = g.some((e) => e?.morph?.on), R = g[S];
3550
3550
  return /* @__PURE__ */ F(he, { children: [
3551
3551
  l,
3552
3552
  u && /* @__PURE__ */ P(vt, {
3553
3553
  layer: e,
3554
- onPreset: se
3554
+ onPreset: ce
3555
3555
  }),
3556
3556
  s === "generate" || s === "labs-effect" ? /* @__PURE__ */ F("div", {
3557
3557
  className: "flex flex-col gap-1",
@@ -3595,7 +3595,7 @@ function _t({ layer: e, setProp: t, updateLayer: r, palette: i, renderAnimate: o
3595
3595
  ]
3596
3596
  }),
3597
3597
  (s === "generate" || s === "labs-effect") && /* @__PURE__ */ F(he, { children: [
3598
- /* @__PURE__ */ P(ae, {
3598
+ /* @__PURE__ */ P(oe, {
3599
3599
  label: "TEXT",
3600
3600
  children: /* @__PURE__ */ P(ue, {
3601
3601
  variant: "filled",
@@ -3612,7 +3612,7 @@ function _t({ layer: e, setProp: t, updateLayer: r, palette: i, renderAnimate: o
3612
3612
  label: "Theme",
3613
3613
  align: "fill",
3614
3614
  labelWidth: n,
3615
- children: /* @__PURE__ */ P(re, {
3615
+ children: /* @__PURE__ */ P(ie, {
3616
3616
  variant: "subtle",
3617
3617
  size: d,
3618
3618
  className: "w-full",
@@ -3624,7 +3624,8 @@ function _t({ layer: e, setProp: t, updateLayer: r, palette: i, renderAnimate: o
3624
3624
  label: "Invert",
3625
3625
  align: "fill",
3626
3626
  labelWidth: n,
3627
- children: /* @__PURE__ */ P(ce, {
3627
+ children: /* @__PURE__ */ P(re, {
3628
+ layout: "joined",
3628
3629
  size: d,
3629
3630
  className: "w-full",
3630
3631
  options: [{
@@ -3738,7 +3739,7 @@ function _t({ layer: e, setProp: t, updateLayer: r, palette: i, renderAnimate: o
3738
3739
  }),
3739
3740
  /* @__PURE__ */ P(bt, {
3740
3741
  knob: n,
3741
- comp: oe(n),
3742
+ comp: se(n),
3742
3743
  idx: S,
3743
3744
  palette: i,
3744
3745
  onWrite: _e,
@@ -3940,7 +3941,7 @@ function bt({ knob: e, comp: r, idx: i, palette: o, onWrite: s, bridge: l }) {
3940
3941
  label: e.label,
3941
3942
  align: "fill",
3942
3943
  labelWidth: n,
3943
- children: /* @__PURE__ */ P(re, {
3944
+ children: /* @__PURE__ */ P(ie, {
3944
3945
  variant: "subtle",
3945
3946
  size: u,
3946
3947
  className: "w-full",
@@ -4000,7 +4001,8 @@ function xt({ motions: e, mIdx: t, onSelect: n, onAdd: r, onRemove: i }) {
4000
4001
  children: [
4001
4002
  /* @__PURE__ */ P("div", {
4002
4003
  className: "flex-1 min-w-0",
4003
- children: /* @__PURE__ */ P(ce, {
4004
+ children: /* @__PURE__ */ P(re, {
4005
+ layout: "joined",
4004
4006
  size: o,
4005
4007
  value: String(t),
4006
4008
  onChange: (e) => n(Number(e)),
@@ -4061,7 +4063,7 @@ function St({ value: e = {}, onToggle: t }) {
4061
4063
  "aria-haspopup": "listbox",
4062
4064
  "aria-expanded": r,
4063
4065
  children: s ? `${s} feature${s > 1 ? "s" : ""}` : "None"
4064
- }), /* @__PURE__ */ P(se, {
4066
+ }), /* @__PURE__ */ P(ce, {
4065
4067
  popover: o,
4066
4068
  panel: !1,
4067
4069
  focus: !1,
@@ -4074,7 +4076,7 @@ function St({ value: e = {}, onToggle: t }) {
4074
4076
  children: /* @__PURE__ */ P("div", {
4075
4077
  className: "flex max-h-[300px] flex-col items-stretch overflow-y-auto",
4076
4078
  role: "listbox",
4077
- children: Ve.map((n) => /* @__PURE__ */ P(oe, {
4079
+ children: Ve.map((n) => /* @__PURE__ */ P(se, {
4078
4080
  onClick: () => t(n.tag, !e[n.tag]),
4079
4081
  shortcut: e[n.tag] ? /* @__PURE__ */ P(ge, {
4080
4082
  name: "check",
@@ -4149,7 +4151,7 @@ function Tt({ seconds: e, onCommit: t, size: n }) {
4149
4151
  }, [r, o]), /* @__PURE__ */ P(M, {
4150
4152
  label: "Loop length",
4151
4153
  triggerClassName: "flex w-full",
4152
- children: /* @__PURE__ */ P(ie, {
4154
+ children: /* @__PURE__ */ P(ae, {
4153
4155
  type: "text",
4154
4156
  inputMode: "decimal",
4155
4157
  variant: "property",
@@ -4193,7 +4195,8 @@ function Ot({ size: e = "sm" }) {
4193
4195
  return /* @__PURE__ */ F("div", {
4194
4196
  className: "flex items-center gap-2",
4195
4197
  children: [
4196
- /* @__PURE__ */ P(ce, {
4198
+ /* @__PURE__ */ P(re, {
4199
+ layout: "joined",
4197
4200
  size: e,
4198
4201
  ariaLabel: "Playback",
4199
4202
  value: t ? "play" : "pause",
@@ -4219,7 +4222,8 @@ function Ot({ size: e = "sm" }) {
4219
4222
  size: e
4220
4223
  })
4221
4224
  }),
4222
- /* @__PURE__ */ P(ce, {
4225
+ /* @__PURE__ */ P(re, {
4226
+ layout: "joined",
4223
4227
  size: e,
4224
4228
  ariaLabel: "Reset",
4225
4229
  value: null,
package/dist/motion.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as e } from "./motion-DKZGyk14.js";
1
+ import { t as e } from "./motion-Cuwxm2ic.js";
2
2
  export { e as motion };