@kolkrabbi/design-editor 0.15.0 → 0.17.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,22 +1,22 @@
1
1
  import { A as e, It as t, S as n, Zt as r, c as i, ct as a, dt as o, f as s, ft as c, j as l, l as u, lt as d, m as f, t as p, ut as m, y as h } from "./rolls-CkmuE-Ya.js";
2
2
  import { _ as g, a as _, d as v, f as y, g as b, h as x, i as S, l as C, m as w, p as ee, r as te, s as ne, u as T, y as E } from "./TreePicker-D5XZT0Zi.js";
3
3
  import { t as D } from "./labels-B10g9Um5.js";
4
- import { Button as O, Dropdown as re, Input as ie, LabeledControl as k, MenuDropdownItem as ae, PopoverPanel as oe, SegmentedToggle as se, Slider as A, Textarea as ce, TimelineDock as le, ToggleCheckbox as ue, Tooltip as j, ViewToggle as de, usePopover as fe } from "@kolkrabbi/kol-component";
5
- import { Fragment as pe, useEffect as me, useMemo as he, useRef as ge, useState as M } from "react";
6
- import { Fragment as _e, jsx as N, jsxs as P } from "react/jsx-runtime";
4
+ import { Button as O, Dropdown as re, Input as ie, LabeledControl as ae, MenuDropdownItem as oe, PopoverPanel as se, SegmentedToggle as k, Slider as A, Textarea as ce, TimelineDock as le, ToggleCheckbox as ue, Tooltip as j, ViewToggle as de, glyphSize as fe, usePopover as pe } from "@kolkrabbi/kol-component";
5
+ import { Fragment as me, useEffect as he, useMemo as ge, useRef as _e, useState as M } from "react";
6
+ import { Fragment as ve, jsx as N, jsxs as P } from "react/jsx-runtime";
7
7
  import { Icon as F } from "@kolkrabbi/kol-icons";
8
8
  //#region src/kinetic/paths.js
9
- var ve = Math.PI * 2, I = (e) => Math.round(e * 100) / 100;
10
- function ye(e) {
9
+ var ye = Math.PI * 2, I = (e) => Math.round(e * 100) / 100;
10
+ function be(e) {
11
11
  return e.map((e, t) => `${t === 0 ? "M" : "L"} ${I(e[0])} ${I(e[1])}`).join(" ");
12
12
  }
13
- var be = [
13
+ var xe = [
14
14
  [.12, .55],
15
15
  [.37, .32],
16
16
  [.63, .68],
17
17
  [.88, .45]
18
18
  ];
19
- function xe(e, t, n) {
19
+ function Se(e, t, n) {
20
20
  let r = e.map(([e, r]) => [e * t, r * n]);
21
21
  if (r.length < 2) return `M ${I(t / 2)} ${I(n / 2)} L ${I(t / 2 + 1)} ${I(n / 2)}`;
22
22
  let i = `M ${I(r[0][0])} ${I(r[0][1])}`;
@@ -26,7 +26,7 @@ function xe(e, t, n) {
26
26
  }
27
27
  return i;
28
28
  }
29
- var Se = (e) => e === "array", L = (e) => e === "radial", Ce = (e) => e === "rings", we = {
29
+ var L = (e) => e === "array", Ce = (e) => e === "radial", we = (e) => e === "rings", Te = {
30
30
  amp: .4,
31
31
  freq: 2,
32
32
  turns: 3,
@@ -39,8 +39,8 @@ var Se = (e) => e === "array", L = (e) => e === "radial", Ce = (e) => e === "rin
39
39
  twist: .5,
40
40
  grow: .6
41
41
  };
42
- function Te(e, t, n, r = {}) {
43
- let i = t / 2, a = n / 2, o = Math.min(t, n) * .12, s = r.amp ?? we.amp, c = Math.max(1, Math.round(r.freq ?? we.freq)), l = Math.max(1, Math.round(r.turns ?? we.turns)), u = r.radius ?? we.radius;
42
+ function Ee(e, t, n, r = {}) {
43
+ let i = t / 2, a = n / 2, o = Math.min(t, n) * .12, s = r.amp ?? Te.amp, c = Math.max(1, Math.round(r.freq ?? Te.freq)), l = Math.max(1, Math.round(r.turns ?? Te.turns)), u = r.radius ?? Te.radius;
44
44
  switch (e) {
45
45
  case "arc": {
46
46
  let e = n * .62, r = e - s * n * .7;
@@ -67,21 +67,21 @@ function Te(e, t, n, r = {}) {
67
67
  let e = [];
68
68
  for (let r = 0; r <= 120; r++) {
69
69
  let i = r / 120;
70
- e.push([o + i * (t - 2 * o), a + s * n * .32 * Math.sin(i * c * ve)]);
70
+ e.push([o + i * (t - 2 * o), a + s * n * .32 * Math.sin(i * c * ye)]);
71
71
  }
72
72
  return {
73
- d: ye(e),
73
+ d: be(e),
74
74
  closed: !1
75
75
  };
76
76
  }
77
77
  case "spiral": {
78
78
  let e = Math.min(t, n) * .45 * u, r = [];
79
79
  for (let t = 0; t <= 420; t++) {
80
- let n = t / 420, o = n * l * ve, s = n * e;
80
+ let n = t / 420, o = n * l * ye, s = n * e;
81
81
  r.push([i + Math.cos(o) * s, a + Math.sin(o) * s]);
82
82
  }
83
83
  return {
84
- d: ye(r),
84
+ d: be(r),
85
85
  closed: !1
86
86
  };
87
87
  }
@@ -92,12 +92,12 @@ function Te(e, t, n, r = {}) {
92
92
  r.push([o + c * (t - 2 * o), a + (i % 2 == 0 ? -1 : 1) * s * n * .28]);
93
93
  }
94
94
  return {
95
- d: ye(r),
95
+ d: be(r),
96
96
  closed: !1
97
97
  };
98
98
  }
99
99
  case "custom": return {
100
- d: xe(Array.isArray(r.points) && r.points.length >= 2 ? r.points : be, t, n),
100
+ d: Se(Array.isArray(r.points) && r.points.length >= 2 ? r.points : xe, t, n),
101
101
  closed: !1
102
102
  };
103
103
  default: {
@@ -111,7 +111,7 @@ function Te(e, t, n, r = {}) {
111
111
  }
112
112
  //#endregion
113
113
  //#region src/kinetic/presets.js
114
- var Ee = "#0b0d12", De = "#e8e4dc", R = {
114
+ var De = "#0b0d12", Oe = "#e8e4dc", R = {
115
115
  text: "Kinetic",
116
116
  font: "gullhamrar",
117
117
  fontSize: 120,
@@ -134,7 +134,7 @@ var Ee = "#0b0d12", De = "#e8e4dc", R = {
134
134
  showPath: !1,
135
135
  path: {
136
136
  type: "line",
137
- ...we
137
+ ...Te
138
138
  },
139
139
  motion: {
140
140
  mode: "none",
@@ -162,12 +162,12 @@ var Ee = "#0b0d12", De = "#e8e4dc", R = {
162
162
  }
163
163
  }
164
164
  };
165
- function Oe(e, t = {}) {
165
+ function ke(e, t = {}) {
166
166
  let n = v(e), r = T(n);
167
167
  for (let e of n.axes) t[e.tag] != null && (r[e.tag] = t[e.tag]);
168
168
  return r;
169
169
  }
170
- function ke(e = {}, t = 0) {
170
+ function Ae(e = {}, t = 0) {
171
171
  let n = {
172
172
  id: e.id || `i${t}`,
173
173
  ...R,
@@ -195,21 +195,21 @@ function ke(e = {}, t = 0) {
195
195
  vf2: { ...e.morph?.vf2 || {} }
196
196
  }
197
197
  };
198
- return n.vf = Oe(n.font, e.vf), n;
198
+ return n.vf = ke(n.font, e.vf), n;
199
199
  }
200
200
  var z = (e) => ({
201
- bg: Ee,
202
- instances: [ke({
201
+ bg: De,
202
+ instances: [Ae({
203
203
  font: "rot",
204
- fill: De,
204
+ fill: Oe,
205
205
  ...e
206
206
  }, 0)]
207
- }), Ae = "#16202E", B = (...e) => ({
208
- bg: Ae,
209
- instances: e.map((e, t) => ke(e, t))
210
- }), je = (e, ...t) => ({
207
+ }), je = "#16202E", B = (...e) => ({
208
+ bg: je,
209
+ instances: e.map((e, t) => Ae(e, t))
210
+ }), Me = (e, ...t) => ({
211
211
  bg: e,
212
- instances: t.map((e, t) => ke(e, t))
212
+ instances: t.map((e, t) => Ae(e, t))
213
213
  }), V = [
214
214
  {
215
215
  id: "sunburst",
@@ -673,7 +673,7 @@ var z = (e) => ({
673
673
  id: "baseline-light",
674
674
  label: "On paper",
675
675
  sub: "Lines",
676
- comp: je("#f4f1ea", {
676
+ comp: Me("#f4f1ea", {
677
677
  text: "Reykjavik",
678
678
  font: "malromur",
679
679
  fontSize: 130,
@@ -1011,7 +1011,7 @@ var z = (e) => ({
1011
1011
  id: "malromur-heavy",
1012
1012
  label: "Heavy swing",
1013
1013
  sub: "Weight",
1014
- comp: je("#f4f1ea", {
1014
+ comp: Me("#f4f1ea", {
1015
1015
  text: "Malromur",
1016
1016
  font: "malromur",
1017
1017
  fontSize: 130,
@@ -1927,7 +1927,7 @@ var z = (e) => ({
1927
1927
  id: "grid-and-ring",
1928
1928
  label: "Grid + ring",
1929
1929
  sub: "Composite",
1930
- comp: je("#0a0b14", {
1930
+ comp: Me("#0a0b14", {
1931
1931
  id: "a",
1932
1932
  text: "echo",
1933
1933
  font: "rot",
@@ -1962,24 +1962,24 @@ var z = (e) => ({
1962
1962
  }
1963
1963
  })
1964
1964
  }
1965
- ], Me = (e) => V.find((t) => t.id === e) || V[0], Ne = [
1965
+ ], Ne = (e) => V.find((t) => t.id === e) || V[0], Pe = [
1966
1966
  "Radial",
1967
1967
  "Rings",
1968
1968
  "Path"
1969
- ], Pe = [{
1969
+ ], Fe = [{
1970
1970
  label: "Type",
1971
- subs: Ne
1971
+ subs: Pe
1972
1972
  }, {
1973
1973
  label: "Kinetic",
1974
- subs: [...new Set(V.map((e) => e.sub))].filter((e) => !Ne.includes(e))
1975
- }], Fe = (e) => structuredClone(e.comp), H = {
1974
+ subs: [...new Set(V.map((e) => e.sub))].filter((e) => !Pe.includes(e))
1975
+ }], Ie = (e) => structuredClone(e.comp), H = {
1976
1976
  dLen: 0,
1977
1977
  dNormal: 0,
1978
1978
  scale: 1,
1979
1979
  dRot: 0,
1980
1980
  opacity: 1,
1981
1981
  vf: null
1982
- }, Ie = {
1982
+ }, Le = {
1983
1983
  none: () => H,
1984
1984
  march: (e) => ({
1985
1985
  ...H,
@@ -2012,7 +2012,7 @@ var z = (e) => ({
2012
2012
  };
2013
2013
  },
2014
2014
  sweep: (e) => {
2015
- let t = Be(e);
2015
+ let t = Ve(e);
2016
2016
  return {
2017
2017
  ...H,
2018
2018
  scale: E(.25, 1, t),
@@ -2020,29 +2020,29 @@ var z = (e) => ({
2020
2020
  };
2021
2021
  },
2022
2022
  sweepWeight: (e) => {
2023
- let t = Be(e);
2023
+ let t = Ve(e);
2024
2024
  return {
2025
2025
  ...H,
2026
2026
  vf: { [e.axisTag]: E(e.axisMin, e.axisMax, t) }
2027
2027
  };
2028
2028
  },
2029
2029
  sweepShift: (e) => {
2030
- let t = Be(e);
2030
+ let t = Ve(e);
2031
2031
  return {
2032
2032
  ...H,
2033
2033
  dNormal: t * .6 * e.sizePx
2034
2034
  };
2035
2035
  }
2036
- }, Le = (e) => e - Math.floor(e);
2037
- function Re(e, t) {
2036
+ }, Re = (e) => e - Math.floor(e);
2037
+ function ze(e, t) {
2038
2038
  if (t <= 0) return 0;
2039
2039
  let n = Math.min(1, e / t);
2040
2040
  return 1 - n * n * (3 - 2 * n);
2041
2041
  }
2042
- function ze(e, t, n, r, i, a) {
2043
- let o = Le(r * i), s = Math.max(.02, a * .5), c = (e) => {
2044
- let t = Math.abs(Le(e) - o);
2045
- return Re(Math.min(t, 1 - t), s);
2042
+ function Be(e, t, n, r, i, a) {
2043
+ let o = Re(r * i), s = Math.max(.02, a * .5), c = (e) => {
2044
+ let t = Math.abs(Re(e) - o);
2045
+ return ze(Math.min(t, 1 - t), s);
2046
2046
  };
2047
2047
  switch (e) {
2048
2048
  case "y": return c(n);
@@ -2056,13 +2056,13 @@ function ze(e, t, n, r, i, a) {
2056
2056
  default: return c(t);
2057
2057
  }
2058
2058
  }
2059
- var Be = (e) => ze(e.m.field || "x", e.nx ?? .5, e.ny ?? .5, e.u, Math.max(1, Math.round(e.m.cycles || 1)), e.m.amp ?? .35);
2060
- function Ve(e, t) {
2061
- return (Ie[e] || Ie.none)(t);
2059
+ var Ve = (e) => Be(e.m.field || "x", e.nx ?? .5, e.ny ?? .5, e.u, Math.max(1, Math.round(e.m.cycles || 1)), e.m.amp ?? .35);
2060
+ function He(e, t) {
2061
+ return (Le[e] || Le.none)(t);
2062
2062
  }
2063
2063
  //#endregion
2064
2064
  //#region src/kinetic/features.js
2065
- var He = [
2065
+ var Ue = [
2066
2066
  {
2067
2067
  tag: "liga",
2068
2068
  label: "Ligatures"
@@ -2104,7 +2104,7 @@ var He = [
2104
2104
  label: "Stylistic set 2"
2105
2105
  }
2106
2106
  ];
2107
- function Ue(e) {
2107
+ function We(e) {
2108
2108
  if (!e) return "normal";
2109
2109
  let t = [];
2110
2110
  for (let [n, r] of Object.entries(e)) t.push(`"${n}" ${+!!r}`);
@@ -2112,11 +2112,11 @@ function Ue(e) {
2112
2112
  }
2113
2113
  //#endregion
2114
2114
  //#region src/kinetic/KineticType.js
2115
- var We = "http://www.w3.org/2000/svg", U = (e) => e - Math.floor(e), W = (e) => document.createElementNS(We, e);
2116
- function Ge(e, t) {
2115
+ var Ge = "http://www.w3.org/2000/svg", U = (e) => e - Math.floor(e), W = (e) => document.createElementNS(Ge, e);
2116
+ function Ke(e, t) {
2117
2117
  return !e || !t || t === "none" ? e || "" : t === "upper" ? e.toUpperCase() : t === "lower" ? e.toLowerCase() : t === "title" ? e.replace(/\b\w/g, (e) => e.toUpperCase()) : e;
2118
2118
  }
2119
- function Ke(e) {
2119
+ function qe(e) {
2120
2120
  if (!e) return {
2121
2121
  bg: "#16202E",
2122
2122
  instances: []
@@ -2131,11 +2131,11 @@ function Ke(e) {
2131
2131
  }]
2132
2132
  };
2133
2133
  }
2134
- var qe = class {
2134
+ var Je = class {
2135
2135
  constructor(e) {
2136
- this.host = e, this.params = Ke(null), this.w = 0, this.h = 0, this._rt = /* @__PURE__ */ new Map(), this._instSig = "", this._needsRemeasure = !1;
2136
+ this.host = e, this.params = qe(null), this.w = 0, this.h = 0, this._rt = /* @__PURE__ */ new Map(), this._instSig = "", this._needsRemeasure = !1;
2137
2137
  let t = W("svg");
2138
- t.setAttribute("xmlns", We), t.style.display = "block", t.style.maxWidth = "100%", t.style.maxHeight = "100%", t.style.pointerEvents = "none", t.style.overflow = "hidden", this._clipApplied = !0, this.bg = W("rect"), this.layer = W("g"), this.measEl = W("text"), this.measEl.setAttribute("x", "0"), this.measEl.setAttribute("y", "0"), this.measEl.style.visibility = "hidden", t.append(this.bg, this.layer, this.measEl), e.appendChild(t), this.svg = t, e.__kolKineticEngine = this, typeof document < "u" && document.fonts && document.fonts.ready.then(() => {
2138
+ t.setAttribute("xmlns", Ge), t.style.display = "block", t.style.maxWidth = "100%", t.style.maxHeight = "100%", t.style.pointerEvents = "none", t.style.overflow = "hidden", this._clipApplied = !0, this.bg = W("rect"), this.layer = W("g"), this.measEl = W("text"), this.measEl.setAttribute("x", "0"), this.measEl.setAttribute("y", "0"), this.measEl.style.visibility = "hidden", t.append(this.bg, this.layer, this.measEl), e.appendChild(t), this.svg = t, e.__kolKineticEngine = this, typeof document < "u" && document.fonts && document.fonts.ready.then(() => {
2139
2139
  this._needsRemeasure = !0;
2140
2140
  }).catch(() => {});
2141
2141
  }
@@ -2144,7 +2144,7 @@ var qe = class {
2144
2144
  for (let e of this._rt.values()) e.cache = null;
2145
2145
  }
2146
2146
  setComposition(e) {
2147
- this.params = Ke(e);
2147
+ this.params = qe(e);
2148
2148
  }
2149
2149
  renderAt(e) {
2150
2150
  !this.w || !this.h || this._render(g(e));
@@ -2228,7 +2228,7 @@ var qe = class {
2228
2228
  }
2229
2229
  }
2230
2230
  _measure(e, t, n, r) {
2231
- let i = t.letterSpacing || 0, a = Ue(t.opentype), o = `${r}|${n.family}|${t.fontSize}|${i}|${w(t.vf)}|${a}`;
2231
+ let i = t.letterSpacing || 0, a = We(t.opentype), o = `${r}|${n.family}|${t.fontSize}|${i}|${w(t.vf)}|${a}`;
2232
2232
  if (e.cache && e.cache.key === o) return e.cache;
2233
2233
  let s = this.measEl;
2234
2234
  s.style.fontFamily = `'${n.family}'`, s.style.fontSize = `${t.fontSize}px`, s.style.letterSpacing = `${i}px`, s.style.fontVariationSettings = w(t.vf), s.style.fontFeatureSettings = a, s.textContent = r;
@@ -2249,8 +2249,8 @@ var qe = class {
2249
2249
  }, e.cache;
2250
2250
  }
2251
2251
  _renderInstance(e, t, n) {
2252
- let r = v(e.font), i = e.phase ? U(n + e.phase) : n, a = Ge(e.text || "", e.case), s = Math.max(1, Math.round(e.multiply || 1)), l = s > 1 && a ? Array(s).fill(a).join(" ") : a, u = e.path?.type || "line", d = (e.offset?.x || 0) * this.w, f = (e.offset?.y || 0) * this.h;
2253
- if (t.group.setAttribute("transform", `translate(${d.toFixed(2)} ${f.toFixed(2)})`), e.morph?.on && !L(u) && !Ce(u)) {
2252
+ let r = v(e.font), i = e.phase ? U(n + e.phase) : n, a = Ke(e.text || "", e.case), s = Math.max(1, Math.round(e.multiply || 1)), l = s > 1 && a ? Array(s).fill(a).join(" ") : a, u = e.path?.type || "line", d = (e.offset?.x || 0) * this.w, f = (e.offset?.y || 0) * this.h;
2253
+ if (t.group.setAttribute("transform", `translate(${d.toFixed(2)} ${f.toFixed(2)})`), e.morph?.on && !Ce(u) && !we(u)) {
2254
2254
  let n = r.url, a = e.morph.face2 ? v(e.morph.face2) : null, s = a ? a.url : n, d = c(n), f = c(s);
2255
2255
  if (d && f) {
2256
2256
  this._setKind(t, "morph"), this._renderMorph(e, t, i, d, f, r, l, u);
@@ -2258,34 +2258,34 @@ var qe = class {
2258
2258
  }
2259
2259
  d || o(n).catch(() => {}), !f && s !== n && o(s).catch(() => {});
2260
2260
  }
2261
- if (this._setKind(t, "text"), Se(u)) {
2261
+ if (this._setKind(t, "text"), L(u)) {
2262
2262
  t.pathEl.setAttribute("d", ""), t.pathEl.style.opacity = 0;
2263
2263
  let n = Math.max(1, Math.round(e.path?.rows ?? 2)), a = Math.max(1, Math.round(e.path?.cols ?? 3));
2264
2264
  if (this._ensureGlyphs(t, l, r, n * a), !l.length) return;
2265
2265
  this._measure(t, e, r, l), this._placeArray(e, t, r, i, t.glyphEls, n, a);
2266
2266
  return;
2267
2267
  }
2268
- if (L(u) || Ce(u)) {
2268
+ if (Ce(u) || we(u)) {
2269
2269
  t.pathEl.setAttribute("d", ""), t.pathEl.style.opacity = 0;
2270
2270
  let n = Math.max(1, Math.round(e.path?.count ?? 12));
2271
2271
  if (this._ensureGlyphs(t, l, r, n), !l.length) return;
2272
- this._measure(t, e, r, l), L(u) ? this._placeRadial(e, t, r, i, t.glyphEls, n) : this._placeRings(e, t, r, i, t.glyphEls, n);
2272
+ this._measure(t, e, r, l), Ce(u) ? this._placeRadial(e, t, r, i, t.glyphEls, n) : this._placeRings(e, t, r, i, t.glyphEls, n);
2273
2273
  return;
2274
2274
  }
2275
- let p = Te(u, this.w, this.h, e.path || {});
2275
+ let p = Ee(u, this.w, this.h, e.path || {});
2276
2276
  t.closed = p.closed, t.pathEl.setAttribute("d", p.d), t.pathEl.setAttribute("stroke", e.showPath ? e.fill || "#888" : "none"), t.pathEl.setAttribute("stroke-width", +!!e.showPath), t.pathEl.style.opacity = e.showPath ? .25 : 0, this._ensureGlyphs(t, l, r, 1), l.length && (this._measure(t, e, r, l), this._placeOnPath(e, t, r, i, t.glyphEls));
2277
2277
  }
2278
2278
  _styleGlyph(e, t, n, r) {
2279
2279
  e.style.fontFamily = `'${n.family}'`, e.style.fontSize = `${t.fontSize}px`, e.style.fontStyle = t.italic ? "italic" : "normal", e.style.fontVariationSettings = w(r.vf ? {
2280
2280
  ...t.vf,
2281
2281
  ...r.vf
2282
- } : t.vf), e.style.fontFeatureSettings = Ue(t.opentype), e.setAttribute("fill", t.fill || "#e8e4dc"), e.setAttribute("opacity", r.opacity);
2282
+ } : t.vf), e.style.fontFeatureSettings = We(t.opentype), e.setAttribute("fill", t.fill || "#e8e4dc"), e.setAttribute("opacity", r.opacity);
2283
2283
  }
2284
2284
  _anim(e, t, n) {
2285
2285
  let r = e.motions && e.motions.length ? [e.motion, ...e.motions] : [e.motion], i = 0, a = 0, o = 0, s = 1, c = 1, l = null;
2286
2286
  for (let e of r) {
2287
2287
  if (!e || (e.mode || "none") === "none") continue;
2288
- let r = n.axes.find((t) => t.tag === (e.axis || n.axes[0] && n.axes[0].tag)), u = Ve(e.mode, {
2288
+ let r = n.axes.find((t) => t.tag === (e.axis || n.axes[0] && n.axes[0].tag)), u = He(e.mode, {
2289
2289
  ...t,
2290
2290
  m: e,
2291
2291
  axisTag: r ? r.tag : "wght",
@@ -2460,12 +2460,12 @@ var qe = class {
2460
2460
  t.pathEl.setAttribute("d", ""), t.pathEl.style.opacity = 0;
2461
2461
  return;
2462
2462
  }
2463
- let w = Se(s), ee = w ? Math.max(1, Math.round(e.path?.rows ?? 2)) : 1, te = w ? Math.max(1, Math.round(e.path?.cols ?? 3)) : 1, ne = w ? ee * te : 1, T = this._ensureMorphPool(t, C, ne, h);
2463
+ let w = L(s), ee = w ? Math.max(1, Math.round(e.path?.rows ?? 2)) : 1, te = w ? Math.max(1, Math.round(e.path?.cols ?? 3)) : 1, ne = w ? ee * te : 1, T = this._ensureMorphPool(t, C, ne, h);
2464
2464
  if ((S || T) && this._refreshMorphPaths(t, ne, h, b), w) {
2465
2465
  t.pathEl.setAttribute("d", ""), t.pathEl.style.opacity = 0, this._placeMorphArray(e, t, a, n, ee, te);
2466
2466
  return;
2467
2467
  }
2468
- let E = Te(s, this.w, this.h, e.path || {});
2468
+ let E = Ee(s, this.w, this.h, e.path || {});
2469
2469
  t.closed = E.closed, t.pathEl.setAttribute("d", E.d), t.pathEl.setAttribute("stroke", e.showPath ? e.fill || "#888" : "none"), t.pathEl.setAttribute("stroke-width", +!!e.showPath), t.pathEl.style.opacity = e.showPath ? .25 : 0, this._placeMorphOnPath(e, t, a, n);
2470
2470
  }
2471
2471
  _ensureMorphPool(e, t, n, r) {
@@ -2554,7 +2554,7 @@ var qe = class {
2554
2554
  ...e,
2555
2555
  ...t
2556
2556
  } : e)
2557
- }), Je = (e, t) => ({
2557
+ }), Ye = (e, t) => ({
2558
2558
  ...e,
2559
2559
  instances: (e.instances ?? []).map((e, n, r) => ({
2560
2560
  ...e,
@@ -2566,11 +2566,11 @@ var qe = class {
2566
2566
  } }, n), J = (e, t, n = 0) => K(e, { motion: {
2567
2567
  ...G(e, n)?.motion ?? {},
2568
2568
  ...t
2569
- } }, n), Y = (e, t = 0) => G(e, t)?.path?.type ?? "line", Ye = (e, t = 0) => G(e, t)?.motion?.mode ?? "none", Xe = (e, t = 0) => ![
2569
+ } }, n), Y = (e, t = 0) => G(e, t)?.path?.type ?? "line", Xe = (e, t = 0) => G(e, t)?.motion?.mode ?? "none", Ze = (e, t = 0) => ![
2570
2570
  "radial",
2571
2571
  "rings",
2572
2572
  "array"
2573
- ].includes(Y(e, t)), Ze = [
2573
+ ].includes(Y(e, t)), Qe = [
2574
2574
  {
2575
2575
  value: "line",
2576
2576
  label: "Line"
@@ -2618,19 +2618,19 @@ var qe = class {
2618
2618
  ], X = (e, t = 0) => G(e, t)?.morph ?? {}, Z = (e, t, n = 0) => K(e, { morph: {
2619
2619
  ...G(e, n)?.morph ?? {},
2620
2620
  ...t
2621
- } }, n), Qe = (e, t, n, r = 0) => Z(e, { vf2: {
2621
+ } }, n), $e = (e, t, n, r = 0) => Z(e, { vf2: {
2622
2622
  ...X(e, r).vf2 ?? {},
2623
2623
  [t]: n
2624
- } }, r), $e = (e, t = 0) => !["radial", "rings"].includes(Y(e, t)), Q = (e, t = 0) => $e(e, t) && !!X(e, t).on, et = (e, t = 0) => X(e, t).mode ?? "morph", tt = (e, t = 0) => Q(e, t) && ["morph", "fade"].includes(et(e, t)), $ = (e, t, n = 0) => v(G(e, n)?.font).axes.find((e) => e.tag === t), nt = (e, t, n, r = 0) => {
2624
+ } }, r), et = (e, t = 0) => !["radial", "rings"].includes(Y(e, t)), Q = (e, t = 0) => et(e, t) && !!X(e, t).on, tt = (e, t = 0) => X(e, t).mode ?? "morph", nt = (e, t = 0) => Q(e, t) && ["morph", "fade"].includes(tt(e, t)), $ = (e, t, n = 0) => v(G(e, n)?.font).axes.find((e) => e.tag === t), rt = (e, t, n, r = 0) => {
2625
2625
  let i = $(e, t, r), a = i ? Math.min(i.max, Math.max(i.min, n)) : n;
2626
- return Qe(e, t, Math.round(a), r);
2627
- }, rt = (e, t, n, r = 0) => {
2626
+ return $e(e, t, Math.round(a), r);
2627
+ }, it = (e, t, n, r = 0) => {
2628
2628
  let i = $(e, t, r), a = i ? Math.min(i.max, Math.max(i.min, n)) : n;
2629
2629
  return K(e, { vf: {
2630
2630
  ...G(e, r)?.vf ?? {},
2631
2631
  [t]: Math.round(a)
2632
2632
  } }, r);
2633
- }, it = (e) => ({
2633
+ }, at = (e) => ({
2634
2634
  key: `vf${e[0].toUpperCase()}${e.slice(1)}`,
2635
2635
  label: ne[e] || e,
2636
2636
  tab: "style",
@@ -2641,8 +2641,8 @@ var qe = class {
2641
2641
  max: (t, n = 0) => $(t, e, n)?.max ?? 1e3,
2642
2642
  when: (t, n = 0) => !!$(t, e, n),
2643
2643
  get: (t, n = 0) => G(t, n)?.vf?.[e] ?? $(t, e, n)?.def ?? 0,
2644
- set: (t, n, r = 0) => rt(t, e, n, r)
2645
- }), at = (e, t = 0) => Q(e, t) && et(e, t) === "morph" && (X(e, t).curve ?? "flat") === "custom", ot = (e, t) => ({
2644
+ set: (t, n, r = 0) => it(t, e, n, r)
2645
+ }), ot = (e, t = 0) => Q(e, t) && tt(e, t) === "morph" && (X(e, t).curve ?? "flat") === "custom", st = (e, t) => ({
2646
2646
  key: `morphC${e}${t}`,
2647
2647
  label: `P${e} ${t.toUpperCase()}`,
2648
2648
  tab: "style",
@@ -2652,7 +2652,7 @@ var qe = class {
2652
2652
  max: 1,
2653
2653
  step: .01,
2654
2654
  noRandom: !0,
2655
- when: at,
2655
+ when: ot,
2656
2656
  get: (n, r = 0) => X(n, r)[`cp${e}`]?.[t] ?? (e === 1 ? .33 : .66),
2657
2657
  set: (n, r, i = 0) => Z(n, { [`cp${e}`]: {
2658
2658
  ...X(n, i)[`cp${e}`] ?? {
@@ -2661,7 +2661,7 @@ var qe = class {
2661
2661
  },
2662
2662
  [t]: r
2663
2663
  } }, i)
2664
- }), st = [
2664
+ }), ct = [
2665
2665
  {
2666
2666
  key: "bg",
2667
2667
  label: "Background",
@@ -2693,7 +2693,7 @@ var qe = class {
2693
2693
  get: (e, t = 0) => G(e, t)?.font,
2694
2694
  set: (e, t, n = 0) => K(e, {
2695
2695
  font: t,
2696
- vf: Oe(t, G(e, n)?.vf)
2696
+ vf: ke(t, G(e, n)?.vf)
2697
2697
  }, n)
2698
2698
  },
2699
2699
  {
@@ -2771,7 +2771,7 @@ var qe = class {
2771
2771
  tab: "style",
2772
2772
  type: "select",
2773
2773
  noRandom: !0,
2774
- when: Xe,
2774
+ when: Ze,
2775
2775
  options: [
2776
2776
  {
2777
2777
  value: "start",
@@ -2798,12 +2798,12 @@ var qe = class {
2798
2798
  max: 24,
2799
2799
  step: 1,
2800
2800
  noRandom: !0,
2801
- when: Xe,
2801
+ when: Ze,
2802
2802
  get: (e, t = 0) => G(e, t)?.multiply ?? 1,
2803
2803
  set: (e, t, n = 0) => K(e, { multiply: Math.round(t) }, n)
2804
2804
  },
2805
- it("wdth"),
2806
- it("wght"),
2805
+ at("wdth"),
2806
+ at("wght"),
2807
2807
  {
2808
2808
  key: "arrangement",
2809
2809
  label: "Arrangement",
@@ -2811,7 +2811,7 @@ var qe = class {
2811
2811
  section: "Arrangement",
2812
2812
  type: "select",
2813
2813
  noRandom: !0,
2814
- options: Ze,
2814
+ options: Qe,
2815
2815
  get: Y,
2816
2816
  set: (e, t, n = 0) => q(e, { type: t }, n)
2817
2817
  },
@@ -3010,7 +3010,7 @@ var qe = class {
3010
3010
  section: "Arrangement",
3011
3011
  type: "select",
3012
3012
  noRandom: !0,
3013
- when: Xe,
3013
+ when: Ze,
3014
3014
  options: [{
3015
3015
  value: "flow",
3016
3016
  label: "Flow"
@@ -3028,7 +3028,7 @@ var qe = class {
3028
3028
  section: "Arrangement",
3029
3029
  type: "select",
3030
3030
  noRandom: !0,
3031
- when: Xe,
3031
+ when: Ze,
3032
3032
  options: [{
3033
3033
  value: "off",
3034
3034
  label: "Off"
@@ -3078,7 +3078,7 @@ var qe = class {
3078
3078
  section: "Morph",
3079
3079
  type: "select",
3080
3080
  noRandom: !0,
3081
- when: $e,
3081
+ when: et,
3082
3082
  options: [{
3083
3083
  value: "off",
3084
3084
  label: "Off"
@@ -3097,7 +3097,7 @@ var qe = class {
3097
3097
  type: "select",
3098
3098
  when: Q,
3099
3099
  options: d,
3100
- get: et,
3100
+ get: tt,
3101
3101
  set: (e, t, n = 0) => Z(e, { mode: t }, n)
3102
3102
  },
3103
3103
  {
@@ -3107,7 +3107,7 @@ var qe = class {
3107
3107
  section: "Morph",
3108
3108
  type: "select",
3109
3109
  noRandom: !0,
3110
- when: tt,
3110
+ when: nt,
3111
3111
  options: (e, t = 0) => [{
3112
3112
  value: "",
3113
3113
  label: "Off"
@@ -3124,9 +3124,9 @@ var qe = class {
3124
3124
  min: 64,
3125
3125
  max: 172,
3126
3126
  step: 1,
3127
- when: (e, t = 0) => tt(e, t) && !X(e, t).face2 && !!$(e, "wdth", t),
3127
+ when: (e, t = 0) => nt(e, t) && !X(e, t).face2 && !!$(e, "wdth", t),
3128
3128
  get: (e, t = 0) => X(e, t).vf2?.wdth ?? $(e, "wdth", t)?.max ?? 172,
3129
- set: (e, t, n = 0) => nt(e, "wdth", t, n)
3129
+ set: (e, t, n = 0) => rt(e, "wdth", t, n)
3130
3130
  },
3131
3131
  {
3132
3132
  key: "morphVf2Wght",
@@ -3137,9 +3137,9 @@ var qe = class {
3137
3137
  min: 100,
3138
3138
  max: 900,
3139
3139
  step: 1,
3140
- when: (e, t = 0) => tt(e, t) && !X(e, t).face2 && !!$(e, "wght", t),
3140
+ when: (e, t = 0) => nt(e, t) && !X(e, t).face2 && !!$(e, "wght", t),
3141
3141
  get: (e, t = 0) => X(e, t).vf2?.wght ?? $(e, "wght", t)?.max ?? 900,
3142
- set: (e, t, n = 0) => nt(e, "wght", t, n)
3142
+ set: (e, t, n = 0) => rt(e, "wght", t, n)
3143
3143
  },
3144
3144
  {
3145
3145
  key: "morphCurve",
@@ -3147,15 +3147,15 @@ var qe = class {
3147
3147
  tab: "style",
3148
3148
  section: "Morph",
3149
3149
  type: "select",
3150
- when: (e, t = 0) => Q(e, t) && et(e, t) === "morph",
3150
+ when: (e, t = 0) => Q(e, t) && tt(e, t) === "morph",
3151
3151
  options: a,
3152
3152
  get: (e, t = 0) => X(e, t).curve ?? "flat",
3153
3153
  set: (e, t, n = 0) => Z(e, { curve: t }, n)
3154
3154
  },
3155
- ot(1, "x"),
3156
- ot(1, "y"),
3157
- ot(2, "x"),
3158
- ot(2, "y"),
3155
+ st(1, "x"),
3156
+ st(1, "y"),
3157
+ st(2, "x"),
3158
+ st(2, "y"),
3159
3159
  {
3160
3160
  key: "morphBlend",
3161
3161
  label: "Blend",
@@ -3165,7 +3165,7 @@ var qe = class {
3165
3165
  min: 0,
3166
3166
  max: 1,
3167
3167
  step: .01,
3168
- when: (e, t = 0) => Q(e, t) && et(e, t) !== "random",
3168
+ when: (e, t = 0) => Q(e, t) && tt(e, t) !== "random",
3169
3169
  get: (e, t = 0) => X(e, t).blend ?? .5,
3170
3170
  set: (e, t, n = 0) => Z(e, { blend: t }, n)
3171
3171
  },
@@ -3178,7 +3178,7 @@ var qe = class {
3178
3178
  min: 0,
3179
3179
  max: 1,
3180
3180
  step: .01,
3181
- when: (e, t = 0) => Q(e, t) && et(e, t) === "random",
3181
+ when: (e, t = 0) => Q(e, t) && tt(e, t) === "random",
3182
3182
  get: (e, t = 0) => X(e, t).blend ?? .5,
3183
3183
  set: (e, t, n = 0) => Z(e, { blend: t }, n)
3184
3184
  },
@@ -3226,7 +3226,7 @@ var qe = class {
3226
3226
  label: "Sweep shift"
3227
3227
  }
3228
3228
  ],
3229
- get: Ye,
3229
+ get: Xe,
3230
3230
  set: (e, t, n = 0) => J(e, { mode: t }, n)
3231
3231
  },
3232
3232
  {
@@ -3239,7 +3239,7 @@ var qe = class {
3239
3239
  step: 1,
3240
3240
  rMin: 1,
3241
3241
  rMax: 3,
3242
- when: (e, t = 0) => Ye(e, t) !== "none",
3242
+ when: (e, t = 0) => Xe(e, t) !== "none",
3243
3243
  get: (e, t = 0) => G(e, t)?.motion?.cycles ?? 1,
3244
3244
  set: (e, t, n = 0) => J(e, { cycles: Math.round(t) }, n)
3245
3245
  },
@@ -3258,7 +3258,7 @@ var qe = class {
3258
3258
  "sweep",
3259
3259
  "sweepWeight",
3260
3260
  "sweepShift"
3261
- ].includes(Ye(e, t)),
3261
+ ].includes(Xe(e, t)),
3262
3262
  get: (e, t = 0) => G(e, t)?.motion?.amp ?? .3,
3263
3263
  set: (e, t, n = 0) => J(e, { amp: t }, n)
3264
3264
  },
@@ -3276,7 +3276,7 @@ var qe = class {
3276
3276
  "vfwave",
3277
3277
  "glyphwave",
3278
3278
  "cascade"
3279
- ].includes(Ye(e, t)),
3279
+ ].includes(Xe(e, t)),
3280
3280
  get: (e, t = 0) => G(e, t)?.motion?.phase ?? .5,
3281
3281
  set: (e, t, n = 0) => J(e, { phase: t }, n)
3282
3282
  },
@@ -3285,7 +3285,7 @@ var qe = class {
3285
3285
  label: "Axis",
3286
3286
  tab: "anim",
3287
3287
  type: "select",
3288
- when: (e, t = 0) => ["vfwave", "sweepWeight"].includes(Ye(e, t)) && v(G(e, t)?.font).axes.length > 1,
3288
+ when: (e, t = 0) => ["vfwave", "sweepWeight"].includes(Xe(e, t)) && v(G(e, t)?.font).axes.length > 1,
3289
3289
  options: (e, t = 0) => v(G(e, t)?.font).axes.map((e) => ({
3290
3290
  value: e.tag,
3291
3291
  label: ne[e.tag] || e.tag
@@ -3302,7 +3302,7 @@ var qe = class {
3302
3302
  "sweep",
3303
3303
  "sweepWeight",
3304
3304
  "sweepShift"
3305
- ].includes(Ye(e, t)),
3305
+ ].includes(Xe(e, t)),
3306
3306
  options: [
3307
3307
  {
3308
3308
  value: "x",
@@ -3341,7 +3341,7 @@ var qe = class {
3341
3341
  max: 1,
3342
3342
  step: .01,
3343
3343
  get: (e) => G(e)?.stagger ?? 0,
3344
- set: (e, t) => Je(e, (e, n, r) => ({
3344
+ set: (e, t) => Ye(e, (e, n, r) => ({
3345
3345
  stagger: t,
3346
3346
  phase: r > 1 ? n / r * t : 0
3347
3347
  }))
@@ -3360,18 +3360,18 @@ var qe = class {
3360
3360
  get: (e, t = 0) => G(e, t)?.path?.spin ?? 1,
3361
3361
  set: (e, t, n = 0) => q(e, { spin: Math.round(t) }, n)
3362
3362
  }
3363
- ], ct = (e, t, n = 0) => typeof e.options == "function" ? e.options(t, n) : e.options ?? [], lt = (e, t, n = 0) => ({
3363
+ ], lt = (e, t, n = 0) => typeof e.options == "function" ? e.options(t, n) : e.options ?? [], ut = (e, t, n = 0) => ({
3364
3364
  min: typeof e.min == "function" ? e.min(t, n) : e.min,
3365
3365
  max: typeof e.max == "function" ? e.max(t, n) : e.max
3366
3366
  });
3367
- function ut(e, t = 0, n = Math.random) {
3367
+ function dt(e, t = 0, n = Math.random) {
3368
3368
  let r = e;
3369
- for (let e of st) if (!(e.noRandom || e.type === "color") && !(e.when && !e.when(r, t))) {
3369
+ for (let e of ct) if (!(e.noRandom || e.type === "color") && !(e.when && !e.when(r, t))) {
3370
3370
  if (e.type === "range") {
3371
- let i = lt(e, r, t), a = e.rMin ?? i.min, o = e.rMax ?? i.max, s = e.step ?? 1, c = a + n() * (o - a);
3371
+ let i = ut(e, r, t), a = e.rMin ?? i.min, o = e.rMax ?? i.max, s = e.step ?? 1, c = a + n() * (o - a);
3372
3372
  r = e.set(r, Math.min(o, Math.max(a, Number((Math.round(c / s) * s).toFixed(4)))), t);
3373
3373
  } else if (e.type === "select") {
3374
- let i = ct(e, r, t);
3374
+ let i = lt(e, r, t);
3375
3375
  i.length && (r = e.set(r, i[Math.floor(n() * i.length)].value, t));
3376
3376
  }
3377
3377
  }
@@ -3379,7 +3379,7 @@ function ut(e, t = 0, n = Math.random) {
3379
3379
  }
3380
3380
  //#endregion
3381
3381
  //#region src/editor/compose/inspectors/KineticPanel.jsx
3382
- var dt = {
3382
+ var ft = {
3383
3383
  key: "morphBlend",
3384
3384
  label: "Morph blend",
3385
3385
  type: "range",
@@ -3387,21 +3387,21 @@ var dt = {
3387
3387
  max: 1,
3388
3388
  step: .01,
3389
3389
  default: .5
3390
- }, ft = new Set([
3390
+ }, pt = new Set([
3391
3391
  "mode",
3392
3392
  "cycles",
3393
3393
  "motionAmp",
3394
3394
  "motionPhase",
3395
3395
  "axis",
3396
3396
  "field"
3397
- ]), pt = {
3397
+ ]), mt = {
3398
3398
  mode: "glyphwave",
3399
3399
  cycles: 1,
3400
3400
  phase: .5,
3401
3401
  amp: .3,
3402
3402
  axis: "wght",
3403
3403
  field: "x"
3404
- }, mt = new Set([
3404
+ }, ht = new Set([
3405
3405
  "align",
3406
3406
  "italic",
3407
3407
  "fill",
@@ -3409,13 +3409,13 @@ var dt = {
3409
3409
  "vfWght",
3410
3410
  "offsetX",
3411
3411
  "offsetY"
3412
- ]), ht = {
3412
+ ]), gt = {
3413
3413
  lineHeight: 0,
3414
3414
  display: "inline-flex",
3415
3415
  alignItems: "center",
3416
3416
  justifyContent: "center"
3417
- }, gt = (e, t) => e ? String.fromCharCode(97 + t.indexOf(e) % 26) : null;
3418
- function _t({ layer: t, setProp: r, updateLayer: a, palette: o, renderAnimate: c, tab: l, tabStrip: d, picker: f = !0 }) {
3417
+ }, _t = (e, t) => e ? String.fromCharCode(97 + t.indexOf(e) % 26) : null;
3418
+ function vt({ layer: t, setProp: r, updateLayer: a, palette: o, renderAnimate: c, tab: l, tabStrip: d, picker: f = !0 }) {
3419
3419
  let m = n(), h = t.comp ?? {
3420
3420
  bg: "#0b0d12",
3421
3421
  instances: []
@@ -3426,7 +3426,7 @@ function _t({ layer: t, setProp: r, updateLayer: a, palette: o, renderAnimate: c
3426
3426
  from: "panel"
3427
3427
  } }));
3428
3428
  };
3429
- me(() => {
3429
+ he(() => {
3430
3430
  let e = (e) => {
3431
3431
  e.detail?.id === t.id && e.detail.from === "canvas" && y(e.detail.index);
3432
3432
  };
@@ -3441,16 +3441,16 @@ function _t({ layer: t, setProp: r, updateLayer: a, palette: o, renderAnimate: c
3441
3441
  ...e,
3442
3442
  motion: { ...e.motions?.[D - 1] ?? {} }
3443
3443
  } : e)
3444
- }), ae = (e) => ft.has(e.key) && D > 0 ? ie(h) : h, oe = (e) => {
3444
+ }), oe = (e) => pt.has(e.key) && D > 0 ? ie(h) : h, se = (e) => {
3445
3445
  e && (a(t.id, {
3446
3446
  presetId: e.id,
3447
3447
  presetLabel: e.label,
3448
- comp: Fe(e)
3448
+ comp: Ie(e)
3449
3449
  }), y(0), T(0));
3450
- }, se = (e) => r("comp", e), A = (e) => a(t.id, { comp: {
3450
+ }, k = (e) => r("comp", e), A = (e) => a(t.id, { comp: {
3451
3451
  ...h,
3452
3452
  instances: e
3453
- } }), le = (e, t) => se({
3453
+ } }), le = (e, t) => k({
3454
3454
  ...h,
3455
3455
  instances: g.map((n, r) => r === e ? {
3456
3456
  ...n,
@@ -3469,14 +3469,14 @@ function _t({ layer: t, setProp: r, updateLayer: a, palette: o, renderAnimate: c
3469
3469
  ...e,
3470
3470
  group: null
3471
3471
  } : e)), w([]));
3472
- }, he = (e, t) => {
3473
- if (ft.has(e.key) && D > 0) {
3472
+ }, pe = (e, t) => {
3473
+ if (pt.has(e.key) && D > 0) {
3474
3474
  let n = e.set(ie(h), t, b).instances?.[b]?.motion ?? {};
3475
3475
  le(b, { motions: E.map((e, t) => t === D - 1 ? n : e) });
3476
3476
  return;
3477
3477
  }
3478
3478
  let n = te(b);
3479
- if (n.length > 1 && mt.has(e.key)) {
3479
+ if (n.length > 1 && ht.has(e.key)) {
3480
3480
  let r = h;
3481
3481
  if (e.key === "fontSize") {
3482
3482
  let i = Number(e.get(h, b)) || 1, a = t / i;
@@ -3488,25 +3488,25 @@ function _t({ layer: t, setProp: r, updateLayer: a, palette: o, renderAnimate: c
3488
3488
  let i = t - (Number(e.get(h, b)) || 0);
3489
3489
  for (let t of n) r = e.set(r, (Number(e.get(h, t)) || 0) + i, t);
3490
3490
  } else for (let i of n) r = e.set(r, t, i);
3491
- se(r);
3491
+ k(r);
3492
3492
  return;
3493
3493
  }
3494
- se(e.set(h, t, b));
3495
- }, ge = i(t), F = () => {
3494
+ k(e.set(h, t, b));
3495
+ }, ge = i(t), _e = () => {
3496
3496
  let e = ge.take();
3497
3497
  a(t.id, {
3498
- comp: ut(h, b, u(e >>> 0)),
3498
+ comp: dt(h, b, u(e >>> 0)),
3499
3499
  _rollSeed: e
3500
3500
  });
3501
- }, ve = () => {
3501
+ }, F = () => {
3502
3502
  let e = ge.take(), n = u(e >>> 0), r = h;
3503
3503
  g.forEach((e, t) => {
3504
- r = ut(r, t, n);
3504
+ r = dt(r, t, n);
3505
3505
  }), a(t.id, {
3506
3506
  comp: r,
3507
3507
  _rollSeed: e
3508
3508
  });
3509
- }, I = (e, n) => {
3509
+ }, ye = (e, n) => {
3510
3510
  let r = _(e, n);
3511
3511
  a(t.id, {
3512
3512
  themeId: e,
@@ -3520,17 +3520,17 @@ function _t({ layer: t, setProp: r, updateLayer: a, palette: o, renderAnimate: c
3520
3520
  }))
3521
3521
  }
3522
3522
  });
3523
- }, ye = (e) => se({
3523
+ }, I = (e) => k({
3524
3524
  ...h,
3525
3525
  instances: g.map((t) => ({
3526
3526
  ...t,
3527
3527
  fill: e
3528
3528
  }))
3529
- }), be = l === "labs-effect" ? "style" : l, xe = st.filter((e) => e.tab === be && (!e.when || e.when(ae(e), b))), Se = g.some((e) => e?.morph?.on), L = g[b];
3530
- return /* @__PURE__ */ P(_e, { children: [
3531
- f && /* @__PURE__ */ N(vt, {
3529
+ }), be = l === "labs-effect" ? "style" : l, xe = ct.filter((e) => e.tab === be && (!e.when || e.when(oe(e), b))), Se = g.some((e) => e?.morph?.on), L = g[b];
3530
+ return /* @__PURE__ */ P(ve, { children: [
3531
+ f && /* @__PURE__ */ N(yt, {
3532
3532
  layer: t,
3533
- onPreset: oe
3533
+ onPreset: se
3534
3534
  }),
3535
3535
  /* @__PURE__ */ P("div", {
3536
3536
  className: "flex flex-col gap-1",
@@ -3539,7 +3539,7 @@ function _t({ layer: t, setProp: r, updateLayer: a, palette: o, renderAnimate: c
3539
3539
  className: "kol-helper-10 text-meta",
3540
3540
  children: "Elements"
3541
3541
  }),
3542
- /* @__PURE__ */ N(yt, {
3542
+ /* @__PURE__ */ N(bt, {
3543
3543
  insts: g,
3544
3544
  idx: b,
3545
3545
  onSelect: x,
@@ -3566,8 +3566,8 @@ function _t({ layer: t, setProp: r, updateLayer: a, palette: o, renderAnimate: c
3566
3566
  ]
3567
3567
  }),
3568
3568
  d,
3569
- (l === "generate" || l === "labs-effect") && /* @__PURE__ */ P(_e, { children: [
3570
- /* @__PURE__ */ N(k, {
3569
+ (l === "generate" || l === "labs-effect") && /* @__PURE__ */ P(ve, { children: [
3570
+ /* @__PURE__ */ N(ae, {
3571
3571
  label: "Text",
3572
3572
  children: /* @__PURE__ */ N(ce, {
3573
3573
  variant: "filled",
@@ -3580,7 +3580,7 @@ function _t({ layer: t, setProp: r, updateLayer: a, palette: o, renderAnimate: c
3580
3580
  }),
3581
3581
  /* @__PURE__ */ P("div", {
3582
3582
  className: "grid grid-cols-2 gap-2",
3583
- children: [/* @__PURE__ */ N(k, {
3583
+ children: [/* @__PURE__ */ N(ae, {
3584
3584
  label: "Theme",
3585
3585
  children: /* @__PURE__ */ N(re, {
3586
3586
  variant: "subtle",
@@ -3588,9 +3588,9 @@ function _t({ layer: t, setProp: r, updateLayer: a, palette: o, renderAnimate: c
3588
3588
  className: "w-full",
3589
3589
  options: S,
3590
3590
  value: t.themeId ?? "kol",
3591
- onChange: (e) => I(e, !!t.themeInvert)
3591
+ onChange: (e) => ye(e, !!t.themeInvert)
3592
3592
  })
3593
- }), /* @__PURE__ */ N(k, {
3593
+ }), /* @__PURE__ */ N(ae, {
3594
3594
  label: "Invert",
3595
3595
  children: /* @__PURE__ */ N(de, {
3596
3596
  options: [{
@@ -3601,14 +3601,14 @@ function _t({ layer: t, setProp: r, updateLayer: a, palette: o, renderAnimate: c
3601
3601
  label: "On"
3602
3602
  }],
3603
3603
  viewMode: t.themeInvert ? "on" : "off",
3604
- onViewChange: (e) => I(t.themeId ?? "kol", e === "on")
3604
+ onViewChange: (e) => ye(t.themeId ?? "kol", e === "on")
3605
3605
  })
3606
3606
  })]
3607
3607
  }),
3608
3608
  /* @__PURE__ */ N(s, {
3609
3609
  label: "Text colour",
3610
3610
  value: g[0]?.fill,
3611
- onChange: (t) => ye(e(t, o) ?? t),
3611
+ onChange: (t) => I(e(t, o) ?? t),
3612
3612
  palette: o
3613
3613
  }),
3614
3614
  /* @__PURE__ */ P("div", {
@@ -3616,25 +3616,25 @@ function _t({ layer: t, setProp: r, updateLayer: a, palette: o, renderAnimate: c
3616
3616
  children: [/* @__PURE__ */ N(O, {
3617
3617
  variant: "primary",
3618
3618
  size: m,
3619
- onClick: F,
3619
+ onClick: _e,
3620
3620
  children: "Randomise"
3621
3621
  }), /* @__PURE__ */ N(O, {
3622
3622
  variant: "primary",
3623
3623
  size: m,
3624
- onClick: ve,
3624
+ onClick: F,
3625
3625
  children: "All elements"
3626
3626
  })]
3627
3627
  }),
3628
3628
  /* @__PURE__ */ N(p, { seed: ge })
3629
3629
  ] }),
3630
- l === "anim" && /* @__PURE__ */ N(xt, {
3630
+ l === "anim" && /* @__PURE__ */ N(St, {
3631
3631
  motions: E,
3632
3632
  mIdx: D,
3633
3633
  onSelect: T,
3634
3634
  onAdd: () => {
3635
3635
  A(g.map((e, t) => t === b ? {
3636
3636
  ...e,
3637
- motions: [...E, { ...pt }]
3637
+ motions: [...E, { ...mt }]
3638
3638
  } : e)), T(E.length + 1);
3639
3639
  },
3640
3640
  onRemove: () => {
@@ -3644,11 +3644,11 @@ function _t({ layer: t, setProp: r, updateLayer: a, palette: o, renderAnimate: c
3644
3644
  } : e)), T(D - 1));
3645
3645
  }
3646
3646
  }),
3647
- l !== "generate" && xe.map((e, n) => /* @__PURE__ */ P(pe, { children: [
3648
- e.key === "arrangement" && /* @__PURE__ */ P(_e, { children: [/* @__PURE__ */ N("span", {
3647
+ l !== "generate" && xe.map((e, n) => /* @__PURE__ */ P(me, { children: [
3648
+ e.key === "arrangement" && /* @__PURE__ */ P(ve, { children: [/* @__PURE__ */ N("span", {
3649
3649
  className: "kol-helper-10 text-meta",
3650
3650
  children: "OpenType"
3651
- }), /* @__PURE__ */ N(St, {
3651
+ }), /* @__PURE__ */ N(Ct, {
3652
3652
  value: L?.opentype ?? {},
3653
3653
  onToggle: (e, t) => le(b, { opentype: {
3654
3654
  ...L?.opentype ?? {},
@@ -3659,14 +3659,14 @@ function _t({ layer: t, setProp: r, updateLayer: a, palette: o, renderAnimate: c
3659
3659
  className: "kol-helper-10 text-meta",
3660
3660
  children: e.section
3661
3661
  }),
3662
- /* @__PURE__ */ N(bt, {
3662
+ /* @__PURE__ */ N(xt, {
3663
3663
  knob: e,
3664
- comp: ae(e),
3664
+ comp: oe(e),
3665
3665
  idx: b,
3666
3666
  palette: o,
3667
- onWrite: he
3667
+ onWrite: pe
3668
3668
  }),
3669
- e.key === "showPath" && L?.path?.type === "custom" && /* @__PURE__ */ N(Ct, {
3669
+ e.key === "showPath" && L?.path?.type === "custom" && /* @__PURE__ */ N(wt, {
3670
3670
  inst: L,
3671
3671
  layer: t,
3672
3672
  onPoints: (e) => le(b, { path: {
@@ -3675,7 +3675,7 @@ function _t({ layer: t, setProp: r, updateLayer: a, palette: o, renderAnimate: c
3675
3675
  } })
3676
3676
  })
3677
3677
  ] }, e.key)),
3678
- l === "anim" && Se && /* @__PURE__ */ N(wt, {
3678
+ l === "anim" && Se && /* @__PURE__ */ N(Tt, {
3679
3679
  layer: t,
3680
3680
  setProp: r,
3681
3681
  insts: g,
@@ -3683,15 +3683,15 @@ function _t({ layer: t, setProp: r, updateLayer: a, palette: o, renderAnimate: c
3683
3683
  })
3684
3684
  ] });
3685
3685
  }
3686
- function vt({ layer: e, onPreset: t }) {
3686
+ function yt({ layer: e, onPreset: t }) {
3687
3687
  return /* @__PURE__ */ N(te, {
3688
- tree: Pe,
3688
+ tree: Fe,
3689
3689
  presets: V,
3690
3690
  current: V.find((t) => t.id === e.presetId) ?? V[0],
3691
3691
  onPick: t
3692
3692
  });
3693
3693
  }
3694
- function yt({ insts: e, idx: t, onSelect: r, onWrite: i, marked: a, onMark: o, onGroup: s, onUngroup: c }) {
3694
+ function bt({ insts: e, idx: t, onSelect: r, onWrite: i, marked: a, onMark: o, onGroup: s, onUngroup: c }) {
3695
3695
  let l = n(), u = () => {
3696
3696
  let t = e.length;
3697
3697
  for (; e.some((e) => e.id === `i${t}`);) t++;
@@ -3701,7 +3701,7 @@ function yt({ insts: e, idx: t, onSelect: r, onWrite: i, marked: a, onMark: o, o
3701
3701
  id: u(),
3702
3702
  text: "Text"
3703
3703
  };
3704
- e[t]?.fill && (n.fill = e[t].fill), i([...e, ke(n, e.length)]), r(e.length);
3704
+ e[t]?.fill && (n.fill = e[t].fill), i([...e, Ae(n, e.length)]), r(e.length);
3705
3705
  }, f = (t) => {
3706
3706
  let n = {
3707
3707
  ...structuredClone(e[t]),
@@ -3716,14 +3716,14 @@ function yt({ insts: e, idx: t, onSelect: r, onWrite: i, marked: a, onMark: o, o
3716
3716
  let o = [...e], [s] = o.splice(t, 1);
3717
3717
  o.splice(a, 0, s), i(o), r(a);
3718
3718
  }, h = [...new Set(e.map((e) => e.group).filter(Boolean))];
3719
- return /* @__PURE__ */ P(_e, { children: [
3719
+ return /* @__PURE__ */ P(ve, { children: [
3720
3720
  /* @__PURE__ */ N("div", {
3721
3721
  className: "flex flex-col gap-1",
3722
3722
  children: e.map((n, i) => {
3723
- let s = gt(n.group, h);
3723
+ let s = _t(n.group, h);
3724
3724
  return /* @__PURE__ */ P("div", {
3725
3725
  onClick: () => r(i),
3726
- className: `flex items-center gap-2 pl-2 pr-1 py-1 rounded cursor-pointer kol-helper-12 ${i === t ? "bg-[color-mix(in_srgb,var(--kol-accent-primary)_26%,transparent)] text-emphasis" : "text-body hover:bg-fg-04 hover:text-emphasis"}`,
3726
+ className: `flex items-center gap-2 pl-2 pr-1 py-1 rounded cursor-pointer kol-helper-12 ${i === t ? "bg-[color-mix(in_srgb,var(--kol-accent-primary)_26%,transparent)] text-emphasis" : "text-body hover:bg-oq-04 hover:text-emphasis"}`,
3727
3727
  children: [
3728
3728
  /* @__PURE__ */ N("span", {
3729
3729
  onClick: (e) => e.stopPropagation(),
@@ -3813,7 +3813,7 @@ function yt({ insts: e, idx: t, onSelect: r, onWrite: i, marked: a, onMark: o, o
3813
3813
  variant: "ghost",
3814
3814
  size: l,
3815
3815
  quiet: !0,
3816
- style: ht,
3816
+ style: gt,
3817
3817
  "aria-label": "Move element up",
3818
3818
  disabled: t <= 0,
3819
3819
  onClick: () => m(-1),
@@ -3830,7 +3830,7 @@ function yt({ insts: e, idx: t, onSelect: r, onWrite: i, marked: a, onMark: o, o
3830
3830
  variant: "ghost",
3831
3831
  size: l,
3832
3832
  quiet: !0,
3833
- style: ht,
3833
+ style: gt,
3834
3834
  "aria-label": "Move element down",
3835
3835
  disabled: t >= e.length - 1,
3836
3836
  onClick: () => m(1),
@@ -3844,7 +3844,7 @@ function yt({ insts: e, idx: t, onSelect: r, onWrite: i, marked: a, onMark: o, o
3844
3844
  })
3845
3845
  ] });
3846
3846
  }
3847
- function bt({ knob: t, comp: r, idx: i, palette: a, onWrite: o }) {
3847
+ function xt({ knob: t, comp: r, idx: i, palette: a, onWrite: o }) {
3848
3848
  let c = n(), l = t.get(r, i), u = (e) => o(t, e);
3849
3849
  if (t.type === "color") return /* @__PURE__ */ N(s, {
3850
3850
  label: t.label,
@@ -3852,19 +3852,19 @@ function bt({ knob: t, comp: r, idx: i, palette: a, onWrite: o }) {
3852
3852
  onChange: (t) => u(e(t, a) ?? t),
3853
3853
  palette: a
3854
3854
  });
3855
- if (t.type === "select") return /* @__PURE__ */ N(k, {
3855
+ if (t.type === "select") return /* @__PURE__ */ N(ae, {
3856
3856
  label: t.label,
3857
3857
  children: /* @__PURE__ */ N(re, {
3858
3858
  variant: "subtle",
3859
3859
  size: c,
3860
3860
  className: "w-full",
3861
- options: ct(t, r, i),
3861
+ options: lt(t, r, i),
3862
3862
  value: l,
3863
3863
  onChange: u
3864
3864
  })
3865
3865
  });
3866
- let { min: d, max: f } = lt(t, r, i);
3867
- return /* @__PURE__ */ N(k, {
3866
+ let { min: d, max: f } = ut(t, r, i);
3867
+ return /* @__PURE__ */ N(ae, {
3868
3868
  label: t.label,
3869
3869
  children: /* @__PURE__ */ N(A, {
3870
3870
  min: d,
@@ -3875,7 +3875,7 @@ function bt({ knob: t, comp: r, idx: i, palette: a, onWrite: o }) {
3875
3875
  })
3876
3876
  });
3877
3877
  }
3878
- function xt({ motions: e, mIdx: t, onSelect: r, onAdd: i, onRemove: a }) {
3878
+ function St({ motions: e, mIdx: t, onSelect: r, onAdd: i, onRemove: a }) {
3879
3879
  let o = n(), s = [{
3880
3880
  value: "0",
3881
3881
  label: "1"
@@ -3893,7 +3893,7 @@ function xt({ motions: e, mIdx: t, onSelect: r, onAdd: i, onRemove: a }) {
3893
3893
  children: [
3894
3894
  /* @__PURE__ */ N("div", {
3895
3895
  className: "flex-1 min-w-0",
3896
- children: /* @__PURE__ */ N(se, {
3896
+ children: /* @__PURE__ */ N(k, {
3897
3897
  variant: "filled",
3898
3898
  value: String(t),
3899
3899
  onChange: (e) => r(Number(e)),
@@ -3929,8 +3929,8 @@ function xt({ motions: e, mIdx: t, onSelect: r, onAdd: i, onRemove: a }) {
3929
3929
  })]
3930
3930
  });
3931
3931
  }
3932
- function St({ value: e = {}, onToggle: t }) {
3933
- let [n, r] = M(!1), i = fe({
3932
+ function Ct({ value: e = {}, onToggle: t }) {
3933
+ let [n, r] = M(!1), i = pe({
3934
3934
  open: n,
3935
3935
  onOpenChange: r,
3936
3936
  placement: "bottom-start",
@@ -3938,7 +3938,7 @@ function St({ value: e = {}, onToggle: t }) {
3938
3938
  flip: !1,
3939
3939
  matchReferenceWidth: !0,
3940
3940
  role: "listbox"
3941
- }), a = He.filter((t) => e[t.tag]).length;
3941
+ }), a = Ue.filter((t) => e[t.tag]).length;
3942
3942
  return /* @__PURE__ */ P("div", {
3943
3943
  className: "relative w-full",
3944
3944
  children: [/* @__PURE__ */ P("button", {
@@ -3965,7 +3965,7 @@ function St({ value: e = {}, onToggle: t }) {
3965
3965
  transition: "transform 300ms"
3966
3966
  }
3967
3967
  })]
3968
- }), /* @__PURE__ */ N(oe, {
3968
+ }), /* @__PURE__ */ N(se, {
3969
3969
  popover: i,
3970
3970
  panel: !1,
3971
3971
  focus: !1,
@@ -3978,7 +3978,7 @@ function St({ value: e = {}, onToggle: t }) {
3978
3978
  children: /* @__PURE__ */ N("div", {
3979
3979
  className: "flex max-h-[300px] flex-col items-stretch overflow-y-auto",
3980
3980
  role: "listbox",
3981
- children: He.map((n) => /* @__PURE__ */ N(ae, {
3981
+ children: Ue.map((n) => /* @__PURE__ */ N(oe, {
3982
3982
  onClick: () => t(n.tag, !e[n.tag]),
3983
3983
  shortcut: e[n.tag] ? /* @__PURE__ */ N(F, {
3984
3984
  name: "check",
@@ -3990,8 +3990,8 @@ function St({ value: e = {}, onToggle: t }) {
3990
3990
  })]
3991
3991
  });
3992
3992
  }
3993
- function Ct({ inst: e, layer: t, onPoints: r }) {
3994
- let i = n(), a = ge(null), o = ge(null), s = e?.path?.points, c = Array.isArray(s) && s.length >= 2 ? s : be, l = t.w > 0 && t.h > 0 ? t.w / t.h : 1, u = Te("custom", 100, 100, { points: c }).d, d = (e) => (t) => {
3993
+ function wt({ inst: e, layer: t, onPoints: r }) {
3994
+ let i = n(), a = _e(null), o = _e(null), s = e?.path?.points, c = Array.isArray(s) && s.length >= 2 ? s : xe, l = t.w > 0 && t.h > 0 ? t.w / t.h : 1, u = Ee("custom", 100, 100, { points: c }).d, d = (e) => (t) => {
3995
3995
  t.preventDefault(), t.stopPropagation(), t.currentTarget.setPointerCapture(t.pointerId), o.current = { i: e };
3996
3996
  }, f = (e) => {
3997
3997
  let t = o.current, n = a.current;
@@ -4057,8 +4057,8 @@ function Ct({ inst: e, layer: t, onPoints: r }) {
4057
4057
  })]
4058
4058
  });
4059
4059
  }
4060
- function wt({ layer: e, setProp: t, insts: n, renderAnimate: r }) {
4061
- let i = dt, a = e[i.key], o = f(a), s = n.find((e) => e?.morph?.on)?.morph?.blend ?? i.default, c = typeof a == "number" ? a : s, l = o ? /* @__PURE__ */ N("div", {
4060
+ function Tt({ layer: e, setProp: t, insts: n, renderAnimate: r }) {
4061
+ let i = ft, a = e[i.key], o = f(a), s = n.find((e) => e?.morph?.on)?.morph?.blend ?? i.default, c = typeof a == "number" ? a : s, l = o ? /* @__PURE__ */ N("div", {
4062
4062
  className: "kol-helper-12 text-meta italic px-1",
4063
4063
  children: "animated"
4064
4064
  }) : /* @__PURE__ */ N(A, {
@@ -4068,7 +4068,7 @@ function wt({ layer: e, setProp: t, insts: n, renderAnimate: r }) {
4068
4068
  value: c,
4069
4069
  onChange: (e) => t(i.key, e)
4070
4070
  });
4071
- return /* @__PURE__ */ N(k, {
4071
+ return /* @__PURE__ */ N(ae, {
4072
4072
  label: i.label,
4073
4073
  children: /* @__PURE__ */ P("div", {
4074
4074
  className: "flex items-center gap-2",
@@ -4081,7 +4081,7 @@ function wt({ layer: e, setProp: t, insts: n, renderAnimate: r }) {
4081
4081
  }
4082
4082
  //#endregion
4083
4083
  //#region src/editor/params/TimelineDock.jsx
4084
- function Tt(e, t = []) {
4084
+ function Et(e, t = []) {
4085
4085
  for (let n of e) {
4086
4086
  for (let e in n) {
4087
4087
  let r = n[e];
@@ -4093,12 +4093,12 @@ function Tt(e, t = []) {
4093
4093
  keys: r.keys
4094
4094
  });
4095
4095
  }
4096
- Array.isArray(n.children) && Tt(n.children, t);
4096
+ Array.isArray(n.children) && Et(n.children, t);
4097
4097
  }
4098
4098
  return t;
4099
4099
  }
4100
- function Et() {
4101
- let { layers: e, updateLayer: n } = l(), { t: r, seek: i } = t(), a = he(() => Tt(e), [e]);
4100
+ function Dt() {
4101
+ let { layers: e, updateLayer: n } = l(), { t: r, seek: i } = t(), a = ge(() => Et(e), [e]);
4102
4102
  return /* @__PURE__ */ N(le, {
4103
4103
  tracks: a,
4104
4104
  t: r,
@@ -4115,12 +4115,13 @@ function Et() {
4115
4115
  }
4116
4116
  //#endregion
4117
4117
  //#region src/editor/params/TransportBar.jsx
4118
- function Dt({ seconds: e, onCommit: t, size: n }) {
4118
+ function Ot({ seconds: e, onCommit: t, size: n }) {
4119
4119
  let r = String(e), [i, a] = M(r), [o, s] = M(!1);
4120
- return me(() => {
4120
+ return he(() => {
4121
4121
  o || a(r);
4122
4122
  }, [r, o]), /* @__PURE__ */ N(j, {
4123
4123
  label: "Loop length",
4124
+ triggerClassName: "flex w-full",
4124
4125
  children: /* @__PURE__ */ N(ie, {
4125
4126
  type: "text",
4126
4127
  inputMode: "decimal",
@@ -4151,70 +4152,72 @@ function Dt({ seconds: e, onCommit: t, size: n }) {
4151
4152
  })
4152
4153
  });
4153
4154
  }
4154
- function Ot({ icon: e, label: t, shortcut: n, onClick: r, size: i, pressed: a }) {
4155
- return /* @__PURE__ */ N(j, {
4156
- label: t,
4157
- shortcut: n,
4158
- children: /* @__PURE__ */ N(O, {
4159
- variant: "ghost",
4160
- size: i,
4161
- iconOnly: e,
4162
- iconComponent: F,
4163
- "aria-label": t,
4164
- pressed: a,
4165
- onClick: r
4166
- })
4167
- });
4168
- }
4169
- function kt({ size: e = "sm" }) {
4155
+ var kt = (e, t) => /* @__PURE__ */ N(F, {
4156
+ name: e,
4157
+ size: fe(t, !0)
4158
+ });
4159
+ function At({ size: e = "sm" }) {
4170
4160
  let { playing: n, loopSeconds: r, play: i, pause: a, stop: o, rewind: s, setLoopSeconds: c } = t();
4171
4161
  return /* @__PURE__ */ P("div", {
4172
- className: "flex items-center gap-1",
4162
+ className: "flex items-center gap-2",
4173
4163
  children: [
4174
- /* @__PURE__ */ N(Ot, {
4175
- icon: "rewind",
4176
- label: "Rewind",
4177
- onClick: s,
4178
- size: e
4179
- }),
4180
- /* @__PURE__ */ N(Ot, {
4181
- icon: n ? "pause" : "play",
4182
- label: n ? "Pause" : "Play",
4183
- shortcut: "Space",
4184
- onClick: n ? a : i,
4185
- size: e
4186
- }),
4187
- /* @__PURE__ */ N(Ot, {
4188
- icon: "stop",
4189
- label: "Stop",
4190
- onClick: o,
4191
- size: e
4164
+ /* @__PURE__ */ N(k, {
4165
+ size: e,
4166
+ ariaLabel: "Playback",
4167
+ value: n ? "play" : "pause",
4168
+ onChange: (e) => e === "play" ? i() : a(),
4169
+ options: [{
4170
+ value: "play",
4171
+ ariaLabel: "Play",
4172
+ tooltip: "Play (Space)",
4173
+ label: kt("play", e)
4174
+ }, {
4175
+ value: "pause",
4176
+ ariaLabel: "Pause",
4177
+ tooltip: "Pause (Space)",
4178
+ label: kt("pause", e)
4179
+ }]
4192
4180
  }),
4193
4181
  /* @__PURE__ */ N("div", {
4194
- className: "ml-auto",
4195
- children: /* @__PURE__ */ N(Dt, {
4182
+ className: "flex-1 min-w-0",
4183
+ children: /* @__PURE__ */ N(Ot, {
4196
4184
  seconds: r,
4197
4185
  onCommit: c,
4198
4186
  size: e
4199
4187
  })
4188
+ }),
4189
+ /* @__PURE__ */ N(k, {
4190
+ size: e,
4191
+ ariaLabel: "Reset",
4192
+ value: null,
4193
+ onChange: (e) => e === "stop" ? o() : s(),
4194
+ options: [{
4195
+ value: "stop",
4196
+ ariaLabel: "Stop",
4197
+ label: kt("stop", e)
4198
+ }, {
4199
+ value: "rewind",
4200
+ ariaLabel: "Rewind",
4201
+ label: kt("rewind", e)
4202
+ }]
4200
4203
  })
4201
4204
  ]
4202
4205
  });
4203
4206
  }
4204
4207
  //#endregion
4205
4208
  //#region src/packs/motion.js
4206
- var At = {
4209
+ var jt = {
4207
4210
  layerTypes: ["kinetic"],
4208
- kineticPresetById: Me,
4209
- presetComp: Fe,
4210
- KineticType: qe,
4211
+ kineticPresetById: Ne,
4212
+ presetComp: Ie,
4213
+ KineticType: Je,
4211
4214
  loadFonts: ee,
4212
4215
  warmFontCss: x,
4213
4216
  kineticFontCss: y,
4214
- KineticPanel: _t,
4215
- TimelineDock: Et,
4216
- TransportBar: kt
4217
+ KineticPanel: vt,
4218
+ TimelineDock: Dt,
4219
+ TransportBar: At
4217
4220
  };
4218
- r("motion", At);
4221
+ r("motion", jt);
4219
4222
  //#endregion
4220
- export { V as a, ut as i, Et as n, Pe as o, _t as r, Fe as s, At as t };
4223
+ export { V as a, dt as i, Dt as n, Fe as o, vt as r, Ie as s, jt as t };