@kolkrabbi/design-editor 0.36.0 → 0.38.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,5 +1,5 @@
1
1
  import "./chunk-3b4jIN3o.js";
2
- import { bt as e } from "./rolls-5hhrWX96.js";
2
+ import { bt as e } from "./rolls-yFvM7gmE.js";
3
3
  //#region ../../node_modules/.pnpm/mediabunny@1.55.6/node_modules/mediabunny/dist/modules/src/misc.js
4
4
  function t(e) {
5
5
  if (!e) throw Error("Assertion failed.");
@@ -1,4 +1,4 @@
1
- import { D as e, Dn as t, In as n, J as r, L as i, Ln as a, Mn as o, Pn as s, Rn as c, Rt as l, _ as u, b as ee, er as d, f, g as p, h as te, m, p as h, v as g, x as ne, y as re } from "./rolls-5hhrWX96.js";
1
+ import { D as e, Dn as t, In as n, J as r, L as i, Ln as a, Mn as o, Pn as s, Rn as c, Rt as l, _ as u, b as ee, er as d, f, g as p, h as te, m, p as h, v as g, x as ne, y as re } from "./rolls-yFvM7gmE.js";
2
2
  import { Button as _, ButtonGroup as ie, CloseButton as v, ColorPickerPopover as ae, Dropdown as y, FullscreenOverlay as b, FunctionPlot as x, Input as S, LabeledControl as C, MenuDropdownItem as w, ModalShell as T, Section as E, Slider as D, Stepper as O, Tooltip as k } from "@kolkrabbi/kol-component";
3
3
  import { createContext as oe, useCallback as A, useContext as se, useEffect as j, useMemo as ce, useRef as le, useState as M, useSyncExternalStore as N } from "react";
4
4
  import { Fragment as ue, jsx as P, jsxs as F } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { D as e, F as t, I as n, J as r, L as i, Pn as a, T as o, _n as s, cn as c, dn as l, fn as u, gn as d, gt as f, hn as p, ht as m, j as h, kn as g, mn as _, mt as v, pn as y, pt as b, un as x, vn as S, xn as C, yn as w } from "./rolls-5hhrWX96.js";
1
+ import { D as e, F as t, I as n, J as r, L as i, Pn as a, T as o, _n as s, cn as c, dn as l, fn as u, gn as d, gt as f, hn as p, ht as m, j as h, kn as g, mn as _, mt as v, pn as y, pt as b, un as x, vn as S, xn as C, yn as w } from "./rolls-yFvM7gmE.js";
2
2
  import { useCallback as T, useEffect as E, useMemo as D, useRef as O, useState as k } from "react";
3
3
  import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
4
4
  //#region src/editor/lib/viewport.js
@@ -234,11 +234,11 @@ function W(e) {
234
234
  return Math.max(2, String(Math.round(e.max ?? 0)).length, String(Math.round(e.min ?? 0)).length) + (t ? t + 1 : 0);
235
235
  }
236
236
  function G({ param: t, layer: n, setProp: r, chars: o }) {
237
- let s = i(), c = n[t.key], l = e(c), f = l && c.bind === "mod" && c.source === "expr", p = g(l), m = l ? h(c, p, n) : c, _ = typeof m == "number" ? m : t.default ?? 0, v = t.step && t.step < 1 ? String(t.step).split(".")[1]?.length ?? 2 : 0, y = f ? c.transform?.expr ?? "wave(t)" : t.format ? String(t.format(_)) : v ? _.toFixed(v) : String(Math.round(_)), b = o ?? W(t), [x, S] = k(y), [C, w] = k(!1);
237
+ let s = i(), c = n[t.key], l = e(c), f = l && c.bind === "mod" && c.source === "expr", p = g(l), m = l ? h(c, p, n) : c, _ = typeof m == "number" ? m : t.default ?? 0, v = t.step && t.step < 1 ? String(t.step).split(".")[1]?.length ?? 2 : 0, y = f ? c.transform?.expr ?? "wave(t)" : t.format ? String(t.format(_)) : v ? _.toFixed(v) : String(Math.round(_)), b = o ?? W(t), [x, S] = k(y), [w, T] = k(!1);
238
238
  return E(() => {
239
- C || S(y);
240
- }, [y, C]), /* @__PURE__ */ M("div", {
241
- className: "flex items-center gap-3",
239
+ w || S(y);
240
+ }, [y, w]), /* @__PURE__ */ M("div", {
241
+ className: `flex items-center gap-3${C() === "float" ? " w-full" : ""}`,
242
242
  children: [!l && /* @__PURE__ */ j(d, {
243
243
  min: t.min,
244
244
  max: t.max,
@@ -255,11 +255,11 @@ function G({ param: t, layer: n, setProp: r, chars: o }) {
255
255
  value: x,
256
256
  title: "Number sets a constant · an expression like sin(t) binds it",
257
257
  onFocus: (e) => {
258
- w(!0), e.target.select();
258
+ T(!0), e.target.select();
259
259
  },
260
260
  onChange: (e) => S(e.target.value),
261
261
  onBlur: () => {
262
- w(!1);
262
+ T(!1);
263
263
  let e = x.trim();
264
264
  if (e === "") {
265
265
  S(y);
@@ -286,7 +286,7 @@ function G({ param: t, layer: n, setProp: r, chars: o }) {
286
286
  });
287
287
  },
288
288
  onKeyDown: (e) => {
289
- e.key === "Enter" && e.currentTarget.blur(), e.key === "Escape" && (S(y), w(!1), e.currentTarget.blur());
289
+ e.key === "Enter" && e.currentTarget.blur(), e.key === "Escape" && (S(y), T(!1), e.currentTarget.blur());
290
290
  },
291
291
  inputClassName: "text-center"
292
292
  })]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/design-editor",
3
- "version": "0.36.0",
3
+ "version": "0.38.0",
4
4
  "private": false,
5
5
  "description": "The design editor as one component",
6
6
  "license": "MIT",
@@ -30,15 +30,15 @@
30
30
  "README.md"
31
31
  ],
32
32
  "peerDependencies": {
33
- "@kolkrabbi/kol-component": ">=0.356.0 <1",
33
+ "@kolkrabbi/kol-component": ">=0.363.0 <1",
34
34
  "@kolkrabbi/kol-framework": ">=0.44.0 <1",
35
35
  "@kolkrabbi/kol-hardware": ">=0.10.0 <1",
36
36
  "@kolkrabbi/kol-icons": ">=0.69.0 <1",
37
37
  "@kolkrabbi/kol-media-client": ">=0.4.0 <1",
38
- "@kolkrabbi/kol-shell": ">=0.119.0 <1",
38
+ "@kolkrabbi/kol-shell": ">=0.121.0 <1",
39
39
  "react": "^19.0.0",
40
40
  "react-dom": "^19.0.0",
41
- "@kolkrabbi/kol-theme": ">=0.213.0 <1",
41
+ "@kolkrabbi/kol-theme": ">=0.219.0 <1",
42
42
  "@kolkrabbi/kol-dashboards": ">=0.13.0 <1"
43
43
  },
44
44
  "dependencies": {
@@ -61,14 +61,14 @@
61
61
  "tailwindcss": "^4.2.4",
62
62
  "vite": "^8.0.10",
63
63
  "vite-plugin-svgr": "^5.2.0",
64
- "@kolkrabbi/kol-component": "0.361.1",
65
- "@kolkrabbi/kol-icons": "0.69.0",
66
- "@kolkrabbi/kol-shell": "0.119.0",
67
64
  "@kolkrabbi/kol-framework": "0.74.1",
68
- "@kolkrabbi/kol-theme": "0.217.0",
69
- "@kolkrabbi/kol-dashboards": "0.15.0",
65
+ "@kolkrabbi/kol-icons": "0.70.1",
66
+ "@kolkrabbi/kol-theme": "0.219.0",
67
+ "@kolkrabbi/kol-component": "0.363.0",
68
+ "@kolkrabbi/kol-shell": "0.121.0",
70
69
  "@kolkrabbi/kol-media-client": "0.7.0",
71
- "@kolkrabbi/kol-hardware": "0.11.1"
70
+ "@kolkrabbi/kol-hardware": "0.11.1",
71
+ "@kolkrabbi/kol-dashboards": "0.15.0"
72
72
  },
73
73
  "keywords": [
74
74
  "kol",