@kolkrabbi/design-editor 0.34.0 → 0.36.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.
- package/dist/{BindDot-Don6fG00.js → BindDot-dBz2NUVr.js} +5 -5
- package/dist/{Timeline-Cz-W72D0.js → Timeline-BDMxiVYe.js} +31 -31
- package/dist/{TreePicker-1_NZG8GB.js → TreePicker-BawzFyzV.js} +4 -4
- package/dist/{core-BeMuE9nC.js → core-d8m3o_mg.js} +4386 -4381
- package/dist/core.js +5 -5
- package/dist/design-editor.css +1 -1
- package/dist/design-editor.js +1202 -1236
- package/dist/{effectCategories-DV7i_AgK.js → effectCategories-D1t5Vdqf.js} +696 -696
- package/dist/{effects-Dn4_OzYx.js → effects-BFAtGRPu.js} +126 -126
- package/dist/effects.js +1 -1
- package/dist/{generators-XBzHN_kX.js → generators-JkPVwcTT.js} +1173 -1172
- package/dist/generators.js +1 -1
- package/dist/{host-BUVR9I4S.js → host-C3_Oy1ck.js} +1 -1
- package/dist/{host-B4QQewPr.js → host-CsF4CKfw.js} +22 -22
- package/dist/{morphStore-B5081ohW.js → morphStore-CidzL7wV.js} +1 -1
- package/dist/{motion-Cuwxm2ic.js → motion-KvPCj1EZ.js} +534 -533
- package/dist/motion.js +1 -1
- package/dist/{previewScale-CA0ComGv.js → previewScale-BAmIBoWY.js} +1 -1
- package/dist/{rolls-CEQmdcp3.js → rolls-5hhrWX96.js} +1501 -1312
- package/dist/{src-CzKMsyZO.js → src-8EvSuuNG.js} +1 -1
- package/dist/{store-CF9s1Pb2.js → store-QnsWv-26.js} +450 -449
- package/dist/{useLayerEdit-Cmtx3V3O.js → useLayerEdit-BikuFIoi.js} +118 -119
- package/package.json +9 -9
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { D as e, F as t, I as n, J as r, L as i,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
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";
|
|
2
|
+
import { useCallback as T, useEffect as E, useMemo as D, useRef as O, useState as k } from "react";
|
|
3
|
+
import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
5
4
|
//#region src/editor/lib/viewport.js
|
|
6
|
-
var
|
|
5
|
+
var N = Math.PI * 2, P = {
|
|
7
6
|
vpZoom: 1,
|
|
8
7
|
vpSpin: 0,
|
|
9
8
|
vpPulse: 0,
|
|
10
9
|
vpWobble: 0,
|
|
11
10
|
vpRate: 1
|
|
12
|
-
},
|
|
11
|
+
}, F = {
|
|
13
12
|
vpTime: "linear",
|
|
14
13
|
vpSpeed: 1,
|
|
15
14
|
vpPhase: 0
|
|
16
|
-
},
|
|
15
|
+
}, I = [
|
|
17
16
|
{
|
|
18
17
|
key: "vpTime",
|
|
19
18
|
label: "Time",
|
|
@@ -72,12 +71,12 @@ var M = Math.PI * 2, N = {
|
|
|
72
71
|
tab: "anim",
|
|
73
72
|
section: "Form"
|
|
74
73
|
}
|
|
75
|
-
],
|
|
76
|
-
function
|
|
74
|
+
], L = (e) => e - Math.floor(e);
|
|
75
|
+
function R(e, t) {
|
|
77
76
|
if (!t) return e;
|
|
78
77
|
let n = t.vpTime || "linear", r = Math.max(1, Math.round(t.vpSpeed || 1)), i = t.vpPhase || 0;
|
|
79
78
|
if (n === "linear" && r === 1 && !i) return e;
|
|
80
|
-
let a =
|
|
79
|
+
let a = L(e * r);
|
|
81
80
|
switch (n) {
|
|
82
81
|
case "ease":
|
|
83
82
|
a = .5 - .5 * Math.cos(a * Math.PI);
|
|
@@ -90,17 +89,17 @@ function L(e, t) {
|
|
|
90
89
|
break;
|
|
91
90
|
case "bounce": {
|
|
92
91
|
let e = Math.abs(Math.sin(a * Math.PI * 2));
|
|
93
|
-
a = a < .5 ? e : 1 - e * .5, a =
|
|
92
|
+
a = a < .5 ? e : 1 - e * .5, a = L(a);
|
|
94
93
|
break;
|
|
95
94
|
}
|
|
96
95
|
case "drift":
|
|
97
|
-
a =
|
|
96
|
+
a = L(a + .08 * Math.sin(a * N) + .04 * Math.sin(a * N * 3));
|
|
98
97
|
break;
|
|
99
98
|
default: break;
|
|
100
99
|
}
|
|
101
|
-
return
|
|
100
|
+
return L(a + i);
|
|
102
101
|
}
|
|
103
|
-
var
|
|
102
|
+
var z = [
|
|
104
103
|
{
|
|
105
104
|
key: "vpSpin",
|
|
106
105
|
label: "Spin",
|
|
@@ -161,44 +160,44 @@ var R = [
|
|
|
161
160
|
section: "Form"
|
|
162
161
|
}
|
|
163
162
|
];
|
|
164
|
-
function
|
|
163
|
+
function B(e, t, n, r, i) {
|
|
165
164
|
let a = Math.round(i.vpSpin || 0), o = i.vpZoom ?? 1, s = i.vpPulse || 0, c = i.vpWobble || 0;
|
|
166
165
|
if (!a && s === 0 && c === 0 && o === 1) return !1;
|
|
167
|
-
let l = t *
|
|
166
|
+
let l = t * N * Math.round(i.vpRate || 1), u = t * N * a + c * Math.PI / 180 * Math.sin(l), d = a ? Math.PI / 4 : Math.abs(c * Math.PI / 180), f = Math.cos(d) + Math.sin(d), p = Math.max(o * (1 + s * .5 * Math.sin(l)), f * 1.02);
|
|
168
167
|
return e.translate(n / 2, r / 2), e.rotate(u), e.scale(p, p), e.translate(-n / 2, -r / 2), !0;
|
|
169
168
|
}
|
|
170
|
-
function
|
|
169
|
+
function V(e, t, n, r, i, a) {
|
|
171
170
|
if (!t) return;
|
|
172
|
-
let o =
|
|
173
|
-
e.save(),
|
|
171
|
+
let o = R(n, a);
|
|
172
|
+
e.save(), B(e, o, r, i, a), t.draw(e, o, r, i, a), e.restore();
|
|
174
173
|
}
|
|
175
174
|
//#endregion
|
|
176
175
|
//#region src/editor/components/Hint.jsx
|
|
177
|
-
function
|
|
178
|
-
return /* @__PURE__ */
|
|
176
|
+
function H({ children: e, className: t = "kol-mono-12 text-meta", always: n = !1 }) {
|
|
177
|
+
return /* @__PURE__ */ j("p", {
|
|
179
178
|
className: `${n ? "" : "kol-placeholder "}${t}`,
|
|
180
179
|
children: e
|
|
181
180
|
});
|
|
182
181
|
}
|
|
183
182
|
//#endregion
|
|
184
183
|
//#region src/editor/params/AutoControls.jsx
|
|
185
|
-
function
|
|
186
|
-
let
|
|
187
|
-
if (o && (
|
|
188
|
-
let
|
|
189
|
-
for (let e of
|
|
190
|
-
let t =
|
|
191
|
-
n && n.section === t ? n.params.push(e) :
|
|
184
|
+
function U({ schema: t, layer: n, setProp: r, palette: i, renderAnimate: a, tab: o, emptyHint: s, inline: l = !0 }) {
|
|
185
|
+
let u = f(t, n);
|
|
186
|
+
if (o && (u = u.filter((e) => m(e) === o)), u.length === 0) return s ? /* @__PURE__ */ j(H, { children: s }) : null;
|
|
187
|
+
let d = [];
|
|
188
|
+
for (let e of u) {
|
|
189
|
+
let t = v(e), n = d[d.length - 1];
|
|
190
|
+
n && n.section === t ? n.params.push(e) : d.push({
|
|
192
191
|
section: t,
|
|
193
192
|
params: [e]
|
|
194
193
|
});
|
|
195
194
|
}
|
|
196
|
-
for (let e = 0; e <
|
|
197
|
-
let t =
|
|
195
|
+
for (let e = 0; e < d.length; e++) {
|
|
196
|
+
let t = d[e];
|
|
198
197
|
if (t.section) continue;
|
|
199
198
|
let n = 0;
|
|
200
199
|
for (; n < t.params.length && t.params[n].type === "select";) n++;
|
|
201
|
-
n === 0 || n === t.params.length || (
|
|
200
|
+
n === 0 || n === t.params.length || (d.splice(e, 1, {
|
|
202
201
|
section: void 0,
|
|
203
202
|
params: t.params.slice(0, n)
|
|
204
203
|
}, {
|
|
@@ -206,53 +205,53 @@ function H({ schema: t, layer: n, setProp: r, palette: i, renderAnimate: a, tab:
|
|
|
206
205
|
params: t.params.slice(n)
|
|
207
206
|
}), e++);
|
|
208
207
|
}
|
|
209
|
-
return /* @__PURE__ */ A
|
|
210
|
-
let o = Math.max(0, ...t.params.filter((e) => e.type === "range").map(
|
|
208
|
+
return /* @__PURE__ */ j(A, { children: d.map((t) => {
|
|
209
|
+
let o = Math.max(0, ...t.params.filter((e) => e.type === "range").map(W)), s = t.section && t.params.some((e) => e.collapsed), u = /* @__PURE__ */ j(_, {
|
|
211
210
|
label: !s && t.section && t.section !== t.params[0].label ? t.section : void 0,
|
|
212
211
|
divided: !s,
|
|
213
212
|
children: t.params.map((t) => {
|
|
214
213
|
let s = e(n[t.key]);
|
|
215
|
-
return /* @__PURE__ */
|
|
214
|
+
return /* @__PURE__ */ j(J, {
|
|
216
215
|
param: t,
|
|
217
216
|
layer: n,
|
|
218
217
|
setProp: r,
|
|
219
218
|
palette: i,
|
|
220
219
|
bound: s,
|
|
221
|
-
animate: a &&
|
|
222
|
-
inline:
|
|
220
|
+
animate: a && b(t) ? a(t, s) : null,
|
|
221
|
+
inline: l,
|
|
223
222
|
chars: o || void 0
|
|
224
223
|
}, t.key);
|
|
225
224
|
})
|
|
226
225
|
}, t.params[0].key);
|
|
227
|
-
return s ? /* @__PURE__ */
|
|
226
|
+
return s ? /* @__PURE__ */ j(c, {
|
|
228
227
|
title: t.section,
|
|
229
|
-
children:
|
|
230
|
-
}, t.params[0].key) :
|
|
228
|
+
children: u
|
|
229
|
+
}, t.params[0].key) : u;
|
|
231
230
|
}) });
|
|
232
231
|
}
|
|
233
|
-
function
|
|
232
|
+
function W(e) {
|
|
234
233
|
let t = e.step && e.step < 1 ? String(e.step).split(".")[1]?.length ?? 2 : 0;
|
|
235
234
|
return Math.max(2, String(Math.round(e.max ?? 0)).length, String(Math.round(e.min ?? 0)).length) + (t ? t + 1 : 0);
|
|
236
235
|
}
|
|
237
|
-
function
|
|
238
|
-
let s = i(),
|
|
239
|
-
return
|
|
240
|
-
C || S(
|
|
241
|
-
}, [
|
|
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);
|
|
238
|
+
return E(() => {
|
|
239
|
+
C || S(y);
|
|
240
|
+
}, [y, C]), /* @__PURE__ */ M("div", {
|
|
242
241
|
className: "flex items-center gap-3",
|
|
243
|
-
children: [!
|
|
242
|
+
children: [!l && /* @__PURE__ */ j(d, {
|
|
244
243
|
min: t.min,
|
|
245
244
|
max: t.max,
|
|
246
245
|
step: t.step ?? 1,
|
|
247
|
-
value:
|
|
246
|
+
value: _,
|
|
248
247
|
onChange: (e) => r(t.key, Number(e)),
|
|
249
248
|
readout: "none",
|
|
250
249
|
className: "flex-1"
|
|
251
|
-
}), /* @__PURE__ */
|
|
250
|
+
}), /* @__PURE__ */ j(u, {
|
|
252
251
|
type: "text",
|
|
253
252
|
variant: "filled",
|
|
254
253
|
size: s,
|
|
255
|
-
width: `calc(${
|
|
254
|
+
width: `calc(${b}ch + 24px)`,
|
|
256
255
|
value: x,
|
|
257
256
|
title: "Number sets a constant · an expression like sin(t) binds it",
|
|
258
257
|
onFocus: (e) => {
|
|
@@ -263,7 +262,7 @@ function W({ param: t, layer: n, setProp: r, chars: a }) {
|
|
|
263
262
|
w(!1);
|
|
264
263
|
let e = x.trim();
|
|
265
264
|
if (e === "") {
|
|
266
|
-
S(
|
|
265
|
+
S(y);
|
|
267
266
|
return;
|
|
268
267
|
}
|
|
269
268
|
let n = Number(e);
|
|
@@ -271,85 +270,85 @@ function W({ param: t, layer: n, setProp: r, chars: a }) {
|
|
|
271
270
|
r(t.key, n);
|
|
272
271
|
return;
|
|
273
272
|
}
|
|
274
|
-
if (!
|
|
275
|
-
S(
|
|
273
|
+
if (!a(e).ok) {
|
|
274
|
+
S(y);
|
|
276
275
|
return;
|
|
277
276
|
}
|
|
278
|
-
let i =
|
|
277
|
+
let i = l && c.transform?.range || (t.min != null && t.max != null ? [t.min, t.max] : [0, 1]);
|
|
279
278
|
r(t.key, {
|
|
280
279
|
bind: "mod",
|
|
281
280
|
source: "expr",
|
|
282
281
|
transform: {
|
|
283
|
-
...
|
|
282
|
+
...l ? c.transform : {},
|
|
284
283
|
expr: e,
|
|
285
284
|
range: i
|
|
286
285
|
}
|
|
287
286
|
});
|
|
288
287
|
},
|
|
289
288
|
onKeyDown: (e) => {
|
|
290
|
-
e.key === "Enter" && e.currentTarget.blur(), e.key === "Escape" && (S(
|
|
289
|
+
e.key === "Enter" && e.currentTarget.blur(), e.key === "Escape" && (S(y), w(!1), e.currentTarget.blur());
|
|
291
290
|
},
|
|
292
291
|
inputClassName: "text-center"
|
|
293
292
|
})]
|
|
294
293
|
});
|
|
295
294
|
}
|
|
296
|
-
var
|
|
295
|
+
var K = t, q = {
|
|
297
296
|
xs: "h-[var(--kol-ctl-xs)]",
|
|
298
297
|
sm: "h-[var(--kol-ctl-sm)]",
|
|
299
298
|
md: "h-[var(--kol-ctl-md)]",
|
|
300
299
|
lg: "h-[var(--kol-ctl-lg)]"
|
|
301
300
|
};
|
|
302
|
-
function
|
|
303
|
-
let
|
|
304
|
-
if (e.type === "color") return /* @__PURE__ */
|
|
301
|
+
function J({ param: e, layer: t, setProp: r, palette: a, bound: c, animate: u, inline: d, chars: f }) {
|
|
302
|
+
let m = i(), h = C() === "float", g = t[e.key], _ = g === void 0 ? e.default : g;
|
|
303
|
+
if (e.type === "color") return /* @__PURE__ */ M("div", {
|
|
305
304
|
className: "flex items-end gap-2",
|
|
306
|
-
children: [/* @__PURE__ */
|
|
305
|
+
children: [/* @__PURE__ */ j("div", {
|
|
307
306
|
className: "flex-1 min-w-0",
|
|
308
|
-
children: /* @__PURE__ */
|
|
307
|
+
children: /* @__PURE__ */ j(o, {
|
|
309
308
|
label: e.label,
|
|
310
|
-
value:
|
|
309
|
+
value: _,
|
|
311
310
|
onChange: (t) => r(e.key, t),
|
|
312
|
-
palette:
|
|
313
|
-
inline:
|
|
311
|
+
palette: a,
|
|
312
|
+
inline: d
|
|
314
313
|
})
|
|
315
|
-
}),
|
|
314
|
+
}), u]
|
|
316
315
|
});
|
|
317
|
-
let
|
|
318
|
-
if (e.type === "range")
|
|
316
|
+
let v = d, b = null;
|
|
317
|
+
if (e.type === "range") m !== "sm" && (v = !1), b = /* @__PURE__ */ j(G, {
|
|
319
318
|
param: e,
|
|
320
319
|
layer: t,
|
|
321
320
|
setProp: r,
|
|
322
|
-
chars:
|
|
321
|
+
chars: f
|
|
323
322
|
});
|
|
324
|
-
else if (e.type === "select")
|
|
323
|
+
else if (e.type === "select") b = /* @__PURE__ */ j(l, {
|
|
325
324
|
variant: "subtle",
|
|
326
|
-
size:
|
|
325
|
+
size: m,
|
|
327
326
|
className: "w-full",
|
|
328
327
|
options: e.options ?? [],
|
|
329
|
-
value:
|
|
328
|
+
value: _,
|
|
330
329
|
onChange: (t) => r(e.key, e.numeric ? Number(t) : t)
|
|
331
330
|
});
|
|
332
|
-
else if (e.type === "segmented")
|
|
331
|
+
else if (e.type === "segmented") b = d ? /* @__PURE__ */ j(x, {
|
|
333
332
|
layout: "joined",
|
|
334
333
|
tone: "sunken",
|
|
335
|
-
size:
|
|
336
|
-
className: `w-full ${n(
|
|
334
|
+
size: m,
|
|
335
|
+
className: `w-full ${n(m) ?? ""}`,
|
|
337
336
|
options: e.options ?? [],
|
|
338
|
-
value:
|
|
337
|
+
value: _,
|
|
339
338
|
onChange: (t) => r(e.key, t)
|
|
340
|
-
}) : /* @__PURE__ */
|
|
341
|
-
size:
|
|
339
|
+
}) : /* @__PURE__ */ j(w, {
|
|
340
|
+
size: m,
|
|
342
341
|
options: e.options ?? [],
|
|
343
|
-
viewMode:
|
|
342
|
+
viewMode: _,
|
|
344
343
|
onViewChange: (t) => r(e.key, t)
|
|
345
344
|
});
|
|
346
345
|
else if (e.type === "toggle") {
|
|
347
346
|
let [t, i] = e.labels ?? ["Off", "On"];
|
|
348
|
-
e.labels ?
|
|
347
|
+
e.labels ? d ? b = /* @__PURE__ */ j(x, {
|
|
349
348
|
layout: "joined",
|
|
350
349
|
tone: "sunken",
|
|
351
|
-
size:
|
|
352
|
-
className: `w-full ${n(
|
|
350
|
+
size: m,
|
|
351
|
+
className: `w-full ${n(m) ?? ""}`,
|
|
353
352
|
options: [{
|
|
354
353
|
value: "off",
|
|
355
354
|
label: t
|
|
@@ -357,10 +356,10 @@ function q({ param: e, layer: t, setProp: r, palette: o, bound: s, animate: c, i
|
|
|
357
356
|
value: "on",
|
|
358
357
|
label: i
|
|
359
358
|
}],
|
|
360
|
-
value:
|
|
359
|
+
value: _ ? "on" : "off",
|
|
361
360
|
onChange: (t) => r(e.key, t === "on")
|
|
362
|
-
}) : (
|
|
363
|
-
size:
|
|
361
|
+
}) : (v = !1, b = /* @__PURE__ */ j(w, {
|
|
362
|
+
size: m,
|
|
364
363
|
options: [{
|
|
365
364
|
value: "off",
|
|
366
365
|
label: t
|
|
@@ -368,58 +367,58 @@ function q({ param: e, layer: t, setProp: r, palette: o, bound: s, animate: c, i
|
|
|
368
367
|
value: "on",
|
|
369
368
|
label: i
|
|
370
369
|
}],
|
|
371
|
-
viewMode:
|
|
370
|
+
viewMode: _ ? "on" : "off",
|
|
372
371
|
onViewChange: (t) => r(e.key, t === "on")
|
|
373
|
-
})) : (
|
|
374
|
-
size:
|
|
375
|
-
checked: !!
|
|
372
|
+
})) : (d || (v = !1), b = /* @__PURE__ */ j(S, {
|
|
373
|
+
size: m,
|
|
374
|
+
checked: !!_,
|
|
376
375
|
onChange: (t) => r(e.key, t)
|
|
377
376
|
}));
|
|
378
|
-
} else if (e.type === "text")
|
|
377
|
+
} else if (e.type === "text") v = !1, b = /* @__PURE__ */ j(s, {
|
|
379
378
|
variant: "filled",
|
|
380
|
-
size:
|
|
379
|
+
size: m,
|
|
381
380
|
rows: e.rows ?? 2,
|
|
382
381
|
axis: "y",
|
|
383
|
-
value:
|
|
382
|
+
value: _ ?? "",
|
|
384
383
|
onChange: (t) => r(e.key, t.target.value),
|
|
385
384
|
placeholder: e.placeholder
|
|
386
385
|
});
|
|
387
386
|
else return null;
|
|
388
|
-
let
|
|
387
|
+
let T = e.type === "range" && e.format && typeof _ == "number" && !c ? e.format(_) : void 0, E = u ? /* @__PURE__ */ M("div", {
|
|
389
388
|
className: "flex items-center gap-2",
|
|
390
|
-
children: [/* @__PURE__ */
|
|
389
|
+
children: [/* @__PURE__ */ j("div", {
|
|
391
390
|
className: "flex-1 min-w-0",
|
|
392
|
-
children:
|
|
393
|
-
}),
|
|
394
|
-
}) :
|
|
395
|
-
return
|
|
391
|
+
children: b
|
|
392
|
+
}), u]
|
|
393
|
+
}) : b, D = e.type === "toggle" && !e.labels ? "end" : "fill", O = e.type === "toggle" && !e.labels && !d, k = (e) => h ? e : String(e).toUpperCase();
|
|
394
|
+
return v && D === "end" && !T ? /* @__PURE__ */ j(y, {
|
|
396
395
|
inline: !0,
|
|
397
|
-
label:
|
|
398
|
-
labelWidth:
|
|
399
|
-
children: /* @__PURE__ */
|
|
400
|
-
className: `flex w-full items-center justify-end ${
|
|
401
|
-
children:
|
|
396
|
+
label: k(e.label),
|
|
397
|
+
labelWidth: K,
|
|
398
|
+
children: /* @__PURE__ */ j("div", {
|
|
399
|
+
className: `flex w-full items-center justify-end ${q[m] ?? ""}`,
|
|
400
|
+
children: E
|
|
402
401
|
})
|
|
403
|
-
}) :
|
|
402
|
+
}) : v ? /* @__PURE__ */ j(p, {
|
|
404
403
|
label: e.label,
|
|
405
|
-
hint:
|
|
406
|
-
align:
|
|
407
|
-
labelWidth:
|
|
408
|
-
children:
|
|
409
|
-
}) : /* @__PURE__ */
|
|
410
|
-
inline:
|
|
411
|
-
label:
|
|
412
|
-
hint:
|
|
413
|
-
labelWidth:
|
|
414
|
-
children:
|
|
404
|
+
hint: T,
|
|
405
|
+
align: D,
|
|
406
|
+
labelWidth: K,
|
|
407
|
+
children: E
|
|
408
|
+
}) : /* @__PURE__ */ j(y, {
|
|
409
|
+
inline: O,
|
|
410
|
+
label: d ? k(e.label) : e.label,
|
|
411
|
+
hint: T,
|
|
412
|
+
labelWidth: O ? "auto" : K,
|
|
413
|
+
children: E
|
|
415
414
|
});
|
|
416
415
|
}
|
|
417
416
|
//#endregion
|
|
418
417
|
//#region src/editor/compose/useLayerEdit.js
|
|
419
|
-
function
|
|
420
|
-
let { updateLayer: i, beginTransaction: a, commitTransaction: o } = r(), s =
|
|
418
|
+
function Y(e, { history: t = "discrete", coalesceMs: n = 250 } = {}) {
|
|
419
|
+
let { updateLayer: i, beginTransaction: a, commitTransaction: o } = r(), s = O(null), c = T(() => {
|
|
421
420
|
s.current !== null && (clearTimeout(s.current), s.current = null, o());
|
|
422
|
-
}, [o]), l =
|
|
421
|
+
}, [o]), l = T((r) => {
|
|
423
422
|
if (e) {
|
|
424
423
|
if (t === "discrete") {
|
|
425
424
|
i(e, r);
|
|
@@ -440,8 +439,8 @@ function J(e, { history: t = "discrete", coalesceMs: n = 250 } = {}) {
|
|
|
440
439
|
i,
|
|
441
440
|
a,
|
|
442
441
|
o
|
|
443
|
-
]), u =
|
|
444
|
-
return
|
|
442
|
+
]), u = T((e, t) => l({ [e]: t }), [l]);
|
|
443
|
+
return E(() => () => c(), [c, e]), D(() => ({
|
|
445
444
|
patch: l,
|
|
446
445
|
setProp: u,
|
|
447
446
|
flush: c
|
|
@@ -452,4 +451,4 @@ function J(e, { history: t = "discrete", coalesceMs: n = 250 } = {}) {
|
|
|
452
451
|
]);
|
|
453
452
|
}
|
|
454
453
|
//#endregion
|
|
455
|
-
export {
|
|
454
|
+
export { I as a, V as c, F as i, R as l, U as n, P as o, H as r, z as s, Y as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/design-editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The design editor as one component",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"@kolkrabbi/kol-component": ">=0.356.0 <1",
|
|
34
34
|
"@kolkrabbi/kol-framework": ">=0.44.0 <1",
|
|
35
35
|
"@kolkrabbi/kol-hardware": ">=0.10.0 <1",
|
|
36
|
-
"@kolkrabbi/kol-icons": ">=0.
|
|
36
|
+
"@kolkrabbi/kol-icons": ">=0.69.0 <1",
|
|
37
37
|
"@kolkrabbi/kol-media-client": ">=0.4.0 <1",
|
|
38
|
-
"@kolkrabbi/kol-shell": ">=0.
|
|
38
|
+
"@kolkrabbi/kol-shell": ">=0.119.0 <1",
|
|
39
39
|
"react": "^19.0.0",
|
|
40
40
|
"react-dom": "^19.0.0",
|
|
41
41
|
"@kolkrabbi/kol-theme": ">=0.213.0 <1",
|
|
@@ -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.
|
|
65
|
-
"@kolkrabbi/kol-
|
|
66
|
-
"@kolkrabbi/kol-
|
|
67
|
-
"@kolkrabbi/kol-
|
|
68
|
-
"@kolkrabbi/kol-shell": "0.118.0",
|
|
64
|
+
"@kolkrabbi/kol-component": "0.361.1",
|
|
65
|
+
"@kolkrabbi/kol-icons": "0.69.0",
|
|
66
|
+
"@kolkrabbi/kol-shell": "0.119.0",
|
|
67
|
+
"@kolkrabbi/kol-framework": "0.74.1",
|
|
69
68
|
"@kolkrabbi/kol-theme": "0.217.0",
|
|
69
|
+
"@kolkrabbi/kol-dashboards": "0.15.0",
|
|
70
70
|
"@kolkrabbi/kol-media-client": "0.7.0",
|
|
71
|
-
"@kolkrabbi/kol-
|
|
71
|
+
"@kolkrabbi/kol-hardware": "0.11.1"
|
|
72
72
|
},
|
|
73
73
|
"keywords": [
|
|
74
74
|
"kol",
|