@kolkrabbi/design-editor 0.45.1 → 0.47.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-DqLgF_zQ.js → BindDot-B85UV79g.js} +9 -8
- package/dist/{BufferResource-BfLgK37S.js → BufferResource-Di5teicy.js} +2 -2
- package/dist/{CanvasPool-YNSF8hsR.js → CanvasPool-JdLj49b-.js} +1 -1
- package/dist/CanvasRenderer-fXDObOOi.js +2 -0
- package/dist/{FederatedEventTarget-BJgROaRQ.js → FederatedEventTarget-CH0bzxx1.js} +1 -1
- package/dist/{FilterSystem-BUrPNXx-.js → FilterSystem-C-ZoyuTO.js} +3 -3
- package/dist/{Geometry-C5s5KpWq.js → Geometry-D4tiuMOr.js} +1 -1
- package/dist/KolboxView-n6kEPJtV.js +21615 -0
- package/dist/{RenderTargetSystem-oFwWv5IW.js → RenderTargetSystem-Bom_vhlS.js} +1 -1
- package/dist/{Timeline-Boo1VuFe.js → Timeline-EbecYeGh.js} +49 -47
- package/dist/TreePicker-2RUSyGl4.js +209 -0
- package/dist/WebGLRenderer-4hvrGmfW.js +2 -0
- package/dist/WebGPURenderer-BjzMV7Pg.js +2 -0
- package/dist/__vite-browser-external-y2xWjzgx.js +780 -0
- package/dist/browserAll-BFE0MRLW.js +6 -0
- package/dist/{canvasUtils-BoNfkAod.js → canvasUtils-DUNsu3ct.js} +1 -1
- package/dist/{core-gz2DUq8s.js → core-9UlJPBwX.js} +6331 -6299
- package/dist/core.js +6 -5
- package/dist/design-editor.css +2 -1
- package/dist/design-editor.js +7 -3622
- package/dist/{effectCategories-CsCbOfy3.js → effectCategories-CCpYmxS0.js} +8965 -4984
- package/dist/effects-DspYFJAM.js +447 -0
- package/dist/effects.js +1 -1
- package/dist/{generators-BrdP7Omn.js → generators-DY4_ymWh.js} +2394 -2423
- package/dist/generators.js +1 -1
- package/dist/{getTextureBatchBindGroup-CNWhZRbV.js → getTextureBatchBindGroup-ZMqkwiZS.js} +1 -1
- package/dist/{host-BLhWuQ9Y.js → host-0qv2SCjk.js} +1 -1
- package/dist/{host-DwC1SsjV.js → host-Bo6itV50.js} +50 -50
- package/dist/init-DkGhdexn.js +4 -0
- package/dist/{morphStore-Ba--Lk9u.js → morphStore-Bm30Ekce.js} +1 -1
- package/dist/{motion-DL5Y98d6.js → motion-BOWE4m3Q.js} +762 -759
- package/dist/motion.js +1 -1
- package/dist/{pipeline-CMpuPUaX.js → pipeline-hZsOKbHd.js} +12 -12
- package/dist/{previewScale-xKmJh3wg.js → previewScale-C6EBx--U.js} +8 -8
- package/dist/{rolls-CSOfYXm5.js → rolls-DugKaHUw.js} +10550 -4518
- package/dist/src-BlvCHYVY.js +3672 -0
- package/dist/{src-BSoHkncc.js → src-D-TQbBo2.js} +1 -2
- package/dist/{store-BtEnp5i6.js → store-BMGP1qou.js} +295 -275
- package/dist/{useLayerEdit-BCGfD3Cv.js → useLayerEdit-B5nF5I9b.js} +103 -102
- package/dist/webworkerAll-0WBQ2FBr.js +2 -0
- package/package.json +14 -11
- package/dist/CanvasRenderer-Bl0rlqNq.js +0 -2
- package/dist/TreePicker-YcrYNUx5.js +0 -166
- package/dist/WebGLRenderer-CXxpVIx3.js +0 -2
- package/dist/WebGPURenderer-BwLEUYBa.js +0 -2
- package/dist/browserAll-CAzdTUbR.js +0 -6
- package/dist/chunk-3b4jIN3o.js +0 -13
- package/dist/effects-BZ8lWlZa.js +0 -447
- package/dist/init-jApIMi04.js +0 -4
- package/dist/webworkerAll-DEZhpG90.js +0 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as e, m as t } from "./__vite-browser-external-y2xWjzgx.js";
|
|
2
|
+
import { $n as n, $t as r, D as i, F as a, I as o, J as s, Jn as c, Kn as l, L as u, Qn as d, Qt as f, T as p, Wn as m, Xn as h, Yn as g, Zn as _, Zt as v, en as y, er as b, ir as x, j as S, qn as C, tr as w } from "./rolls-DugKaHUw.js";
|
|
2
3
|
import { useCallback as T, useEffect as E, useMemo as D, useRef as O, useState as k } from "react";
|
|
3
4
|
import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
4
5
|
//#region src/editor/lib/viewport.js
|
|
@@ -181,12 +182,12 @@ function H({ children: e, className: t = "kol-mono-12 text-meta", always: n = !1
|
|
|
181
182
|
}
|
|
182
183
|
//#endregion
|
|
183
184
|
//#region src/editor/params/AutoControls.jsx
|
|
184
|
-
function U({ schema:
|
|
185
|
-
let u =
|
|
186
|
-
if (
|
|
185
|
+
function U({ schema: e, layer: t, setProp: n, palette: a, renderAnimate: o, tab: s, emptyHint: c, inline: l = !0 }) {
|
|
186
|
+
let u = y(e, t);
|
|
187
|
+
if (s && (u = u.filter((e) => r(e) === s)), u.length === 0) return c ? /* @__PURE__ */ j(H, { children: c }) : null;
|
|
187
188
|
let d = [];
|
|
188
189
|
for (let e of u) {
|
|
189
|
-
let t =
|
|
190
|
+
let t = f(e), n = d[d.length - 1];
|
|
190
191
|
n && n.section === t ? n.params.push(e) : d.push({
|
|
191
192
|
section: t,
|
|
192
193
|
params: [e]
|
|
@@ -205,209 +206,209 @@ function U({ schema: t, layer: n, setProp: r, palette: i, renderAnimate: a, tab:
|
|
|
205
206
|
params: t.params.slice(n)
|
|
206
207
|
}), e++);
|
|
207
208
|
}
|
|
208
|
-
return /* @__PURE__ */ j(A, { children: d.map((
|
|
209
|
-
let
|
|
210
|
-
label: !s &&
|
|
209
|
+
return /* @__PURE__ */ j(A, { children: d.map((e) => {
|
|
210
|
+
let r = Math.max(0, ...e.params.filter((e) => e.type === "range").map(W)), s = e.section && e.params.some((e) => e.collapsed), c = /* @__PURE__ */ j(h, {
|
|
211
|
+
label: !s && e.section && e.section !== e.params[0].label ? e.section : void 0,
|
|
211
212
|
divided: !s,
|
|
212
|
-
children:
|
|
213
|
-
let s =
|
|
213
|
+
children: e.params.map((e) => {
|
|
214
|
+
let s = i(t[e.key]);
|
|
214
215
|
return /* @__PURE__ */ j(J, {
|
|
215
|
-
param:
|
|
216
|
-
layer:
|
|
217
|
-
setProp:
|
|
218
|
-
palette:
|
|
216
|
+
param: e,
|
|
217
|
+
layer: t,
|
|
218
|
+
setProp: n,
|
|
219
|
+
palette: a,
|
|
219
220
|
bound: s,
|
|
220
|
-
animate:
|
|
221
|
+
animate: o && v(e) ? o(e, s) : null,
|
|
221
222
|
inline: l,
|
|
222
|
-
chars:
|
|
223
|
-
},
|
|
223
|
+
chars: r || void 0
|
|
224
|
+
}, e.key);
|
|
224
225
|
})
|
|
225
|
-
},
|
|
226
|
-
return s ? /* @__PURE__ */ j(
|
|
227
|
-
title:
|
|
228
|
-
children:
|
|
229
|
-
},
|
|
226
|
+
}, e.params[0].key);
|
|
227
|
+
return s ? /* @__PURE__ */ j(m, {
|
|
228
|
+
title: e.section,
|
|
229
|
+
children: c
|
|
230
|
+
}, e.params[0].key) : c;
|
|
230
231
|
}) });
|
|
231
232
|
}
|
|
232
233
|
function W(e) {
|
|
233
234
|
let t = e.step && e.step < 1 ? String(e.step).split(".")[1]?.length ?? 2 : 0;
|
|
234
235
|
return Math.max(2, String(Math.round(e.max ?? 0)).length, String(Math.round(e.min ?? 0)).length) + (t ? t + 1 : 0);
|
|
235
236
|
}
|
|
236
|
-
function G({ param:
|
|
237
|
-
let s =
|
|
237
|
+
function G({ param: n, layer: r, setProp: a, chars: o }) {
|
|
238
|
+
let s = u(), l = r[n.key], f = i(l), p = f && l.bind === "mod" && l.source === "expr", m = e(f), h = f ? S(l, m, r) : l, g = typeof h == "number" ? h : n.default ?? 0, _ = n.step && n.step < 1 ? String(n.step).split(".")[1]?.length ?? 2 : 0, v = p ? l.transform?.expr ?? "wave(t)" : n.format ? String(n.format(g)) : _ ? g.toFixed(_) : String(Math.round(g)), y = o ?? W(n), [b, C] = k(v), [w, T] = k(!1);
|
|
238
239
|
return E(() => {
|
|
239
|
-
w ||
|
|
240
|
-
}, [
|
|
241
|
-
className: `flex items-center gap-3${
|
|
242
|
-
children: [!
|
|
243
|
-
min:
|
|
244
|
-
max:
|
|
245
|
-
step:
|
|
246
|
-
value:
|
|
247
|
-
onChange: (e) =>
|
|
240
|
+
w || C(v);
|
|
241
|
+
}, [v, w]), /* @__PURE__ */ M("div", {
|
|
242
|
+
className: `flex items-center gap-3${x() === "float" ? " w-full" : ""}`,
|
|
243
|
+
children: [!f && /* @__PURE__ */ j(d, {
|
|
244
|
+
min: n.min,
|
|
245
|
+
max: n.max,
|
|
246
|
+
step: n.step ?? 1,
|
|
247
|
+
value: g,
|
|
248
|
+
onChange: (e) => a(n.key, Number(e)),
|
|
248
249
|
readout: "none",
|
|
249
250
|
className: "flex-1"
|
|
250
|
-
}), /* @__PURE__ */ j(
|
|
251
|
+
}), /* @__PURE__ */ j(c, {
|
|
251
252
|
type: "text",
|
|
252
253
|
variant: "filled",
|
|
253
254
|
size: s,
|
|
254
|
-
width: `calc(${
|
|
255
|
-
value:
|
|
255
|
+
width: `calc(${y}ch + 24px)`,
|
|
256
|
+
value: b,
|
|
256
257
|
title: "Number sets a constant · an expression like sin(t) binds it",
|
|
257
258
|
onFocus: (e) => {
|
|
258
259
|
T(!0), e.target.select();
|
|
259
260
|
},
|
|
260
|
-
onChange: (e) =>
|
|
261
|
+
onChange: (e) => C(e.target.value),
|
|
261
262
|
onBlur: () => {
|
|
262
263
|
T(!1);
|
|
263
|
-
let e =
|
|
264
|
+
let e = b.trim();
|
|
264
265
|
if (e === "") {
|
|
265
|
-
|
|
266
|
+
C(v);
|
|
266
267
|
return;
|
|
267
268
|
}
|
|
268
|
-
let
|
|
269
|
-
if (Number.isFinite(
|
|
270
|
-
|
|
269
|
+
let r = Number(e);
|
|
270
|
+
if (Number.isFinite(r)) {
|
|
271
|
+
a(n.key, r);
|
|
271
272
|
return;
|
|
272
273
|
}
|
|
273
|
-
if (!
|
|
274
|
-
|
|
274
|
+
if (!t(e).ok) {
|
|
275
|
+
C(v);
|
|
275
276
|
return;
|
|
276
277
|
}
|
|
277
|
-
let i =
|
|
278
|
-
|
|
278
|
+
let i = f && l.transform?.range || (n.min != null && n.max != null ? [n.min, n.max] : [0, 1]);
|
|
279
|
+
a(n.key, {
|
|
279
280
|
bind: "mod",
|
|
280
281
|
source: "expr",
|
|
281
282
|
transform: {
|
|
282
|
-
...
|
|
283
|
+
...f ? l.transform : {},
|
|
283
284
|
expr: e,
|
|
284
285
|
range: i
|
|
285
286
|
}
|
|
286
287
|
});
|
|
287
288
|
},
|
|
288
289
|
onKeyDown: (e) => {
|
|
289
|
-
e.key === "Enter" && e.currentTarget.blur(), e.key === "Escape" && (
|
|
290
|
+
e.key === "Enter" && e.currentTarget.blur(), e.key === "Escape" && (C(v), T(!1), e.currentTarget.blur());
|
|
290
291
|
},
|
|
291
292
|
inputClassName: "text-center"
|
|
292
293
|
})]
|
|
293
294
|
});
|
|
294
295
|
}
|
|
295
|
-
var K =
|
|
296
|
+
var K = a, q = {
|
|
296
297
|
xs: "h-[var(--kol-ctl-xs)]",
|
|
297
298
|
sm: "h-[var(--kol-ctl-sm)]",
|
|
298
299
|
md: "h-[var(--kol-ctl-md)]",
|
|
299
300
|
lg: "h-[var(--kol-ctl-lg)]"
|
|
300
301
|
};
|
|
301
|
-
function J({ param: e, layer: t, setProp: r, palette:
|
|
302
|
-
let
|
|
302
|
+
function J({ param: e, layer: t, setProp: r, palette: i, bound: a, animate: s, inline: c, chars: d }) {
|
|
303
|
+
let f = u(), m = x() === "float", h = t[e.key], v = h === void 0 ? e.default : h;
|
|
303
304
|
if (e.type === "color") return /* @__PURE__ */ M("div", {
|
|
304
305
|
className: "flex items-end gap-2",
|
|
305
306
|
children: [/* @__PURE__ */ j("div", {
|
|
306
307
|
className: "flex-1 min-w-0",
|
|
307
|
-
children: /* @__PURE__ */ j(
|
|
308
|
+
children: /* @__PURE__ */ j(p, {
|
|
308
309
|
label: e.label,
|
|
309
|
-
value:
|
|
310
|
+
value: v,
|
|
310
311
|
onChange: (t) => r(e.key, t),
|
|
311
|
-
palette:
|
|
312
|
-
inline:
|
|
312
|
+
palette: i,
|
|
313
|
+
inline: c
|
|
313
314
|
})
|
|
314
|
-
}),
|
|
315
|
+
}), s]
|
|
315
316
|
});
|
|
316
|
-
let
|
|
317
|
-
if (e.type === "range")
|
|
317
|
+
let y = c, S = null;
|
|
318
|
+
if (e.type === "range") f !== "sm" && (y = !1), S = /* @__PURE__ */ j(G, {
|
|
318
319
|
param: e,
|
|
319
320
|
layer: t,
|
|
320
321
|
setProp: r,
|
|
321
|
-
chars:
|
|
322
|
+
chars: d
|
|
322
323
|
});
|
|
323
|
-
else if (e.type === "select")
|
|
324
|
+
else if (e.type === "select") S = /* @__PURE__ */ j(C, {
|
|
324
325
|
variant: "subtle",
|
|
325
|
-
size:
|
|
326
|
+
size: f,
|
|
326
327
|
className: "w-full",
|
|
327
328
|
options: e.options ?? [],
|
|
328
|
-
value:
|
|
329
|
+
value: v,
|
|
329
330
|
onChange: (t) => r(e.key, e.numeric ? Number(t) : t)
|
|
330
331
|
});
|
|
331
|
-
else if (e.type === "segmented")
|
|
332
|
+
else if (e.type === "segmented") S = c ? /* @__PURE__ */ j(l, {
|
|
332
333
|
layout: "joined",
|
|
333
334
|
tone: "sunken",
|
|
334
|
-
size:
|
|
335
|
-
className: `w-full ${
|
|
335
|
+
size: f,
|
|
336
|
+
className: `w-full ${o(f) ?? ""}`,
|
|
336
337
|
options: e.options ?? [],
|
|
337
|
-
value:
|
|
338
|
+
value: v,
|
|
338
339
|
onChange: (t) => r(e.key, t)
|
|
339
340
|
}) : /* @__PURE__ */ j(w, {
|
|
340
|
-
size:
|
|
341
|
+
size: f,
|
|
341
342
|
options: e.options ?? [],
|
|
342
|
-
viewMode:
|
|
343
|
+
viewMode: v,
|
|
343
344
|
onViewChange: (t) => r(e.key, t)
|
|
344
345
|
});
|
|
345
346
|
else if (e.type === "toggle") {
|
|
346
|
-
let [t,
|
|
347
|
-
e.labels ?
|
|
347
|
+
let [t, n] = e.labels ?? ["Off", "On"];
|
|
348
|
+
e.labels ? c ? S = /* @__PURE__ */ j(l, {
|
|
348
349
|
layout: "joined",
|
|
349
350
|
tone: "sunken",
|
|
350
|
-
size:
|
|
351
|
-
className: `w-full ${
|
|
351
|
+
size: f,
|
|
352
|
+
className: `w-full ${o(f) ?? ""}`,
|
|
352
353
|
options: [{
|
|
353
354
|
value: "off",
|
|
354
355
|
label: t
|
|
355
356
|
}, {
|
|
356
357
|
value: "on",
|
|
357
|
-
label:
|
|
358
|
+
label: n
|
|
358
359
|
}],
|
|
359
|
-
value:
|
|
360
|
+
value: v ? "on" : "off",
|
|
360
361
|
onChange: (t) => r(e.key, t === "on")
|
|
361
|
-
}) : (
|
|
362
|
-
size:
|
|
362
|
+
}) : (y = !1, S = /* @__PURE__ */ j(w, {
|
|
363
|
+
size: f,
|
|
363
364
|
options: [{
|
|
364
365
|
value: "off",
|
|
365
366
|
label: t
|
|
366
367
|
}, {
|
|
367
368
|
value: "on",
|
|
368
|
-
label:
|
|
369
|
+
label: n
|
|
369
370
|
}],
|
|
370
|
-
viewMode:
|
|
371
|
+
viewMode: v ? "on" : "off",
|
|
371
372
|
onViewChange: (t) => r(e.key, t === "on")
|
|
372
|
-
})) : (
|
|
373
|
-
size:
|
|
374
|
-
checked: !!
|
|
373
|
+
})) : (c || (y = !1), S = /* @__PURE__ */ j(b, {
|
|
374
|
+
size: f,
|
|
375
|
+
checked: !!v,
|
|
375
376
|
onChange: (t) => r(e.key, t)
|
|
376
377
|
}));
|
|
377
|
-
} else if (e.type === "text")
|
|
378
|
+
} else if (e.type === "text") y = !1, S = /* @__PURE__ */ j(n, {
|
|
378
379
|
variant: "filled",
|
|
379
|
-
size:
|
|
380
|
+
size: f,
|
|
380
381
|
rows: e.rows ?? 2,
|
|
381
382
|
axis: "y",
|
|
382
|
-
value:
|
|
383
|
+
value: v ?? "",
|
|
383
384
|
onChange: (t) => r(e.key, t.target.value),
|
|
384
385
|
placeholder: e.placeholder
|
|
385
386
|
});
|
|
386
387
|
else return null;
|
|
387
|
-
let T = e.type === "range" && e.format && typeof
|
|
388
|
+
let T = e.type === "range" && e.format && typeof v == "number" && !a ? e.format(v) : void 0, E = s ? /* @__PURE__ */ M("div", {
|
|
388
389
|
className: "flex items-center gap-2",
|
|
389
390
|
children: [/* @__PURE__ */ j("div", {
|
|
390
391
|
className: "flex-1 min-w-0",
|
|
391
|
-
children:
|
|
392
|
-
}),
|
|
393
|
-
}) :
|
|
394
|
-
return
|
|
392
|
+
children: S
|
|
393
|
+
}), s]
|
|
394
|
+
}) : S, D = e.type === "toggle" && !e.labels ? "end" : "fill", O = e.type === "toggle" && !e.labels && !c, k = (e) => m ? e : String(e).toUpperCase();
|
|
395
|
+
return y && D === "end" && !T ? /* @__PURE__ */ j(g, {
|
|
395
396
|
horizontal: !0,
|
|
396
397
|
label: k(e.label),
|
|
397
398
|
labelWidth: K,
|
|
398
399
|
children: /* @__PURE__ */ j("div", {
|
|
399
|
-
className: `flex w-full items-center justify-end ${q[
|
|
400
|
+
className: `flex w-full items-center justify-end ${q[f] ?? ""}`,
|
|
400
401
|
children: E
|
|
401
402
|
})
|
|
402
|
-
}) :
|
|
403
|
+
}) : y ? /* @__PURE__ */ j(_, {
|
|
403
404
|
label: e.label,
|
|
404
405
|
hint: T,
|
|
405
406
|
align: D,
|
|
406
407
|
labelWidth: K,
|
|
407
408
|
children: E
|
|
408
|
-
}) : /* @__PURE__ */ j(
|
|
409
|
+
}) : /* @__PURE__ */ j(g, {
|
|
409
410
|
horizontal: O,
|
|
410
|
-
label:
|
|
411
|
+
label: c ? k(e.label) : e.label,
|
|
411
412
|
hint: T,
|
|
412
413
|
labelWidth: O ? "auto" : K,
|
|
413
414
|
children: E
|
|
@@ -416,29 +417,29 @@ function J({ param: e, layer: t, setProp: r, palette: a, bound: c, animate: u, i
|
|
|
416
417
|
//#endregion
|
|
417
418
|
//#region src/editor/compose/useLayerEdit.js
|
|
418
419
|
function Y(e, { history: t = "discrete", coalesceMs: n = 250 } = {}) {
|
|
419
|
-
let { updateLayer:
|
|
420
|
-
|
|
421
|
-
}, [
|
|
420
|
+
let { updateLayer: r, beginTransaction: i, commitTransaction: a } = s(), o = O(null), c = T(() => {
|
|
421
|
+
o.current !== null && (clearTimeout(o.current), o.current = null, a());
|
|
422
|
+
}, [a]), l = T((s) => {
|
|
422
423
|
if (e) {
|
|
423
424
|
if (t === "discrete") {
|
|
424
|
-
|
|
425
|
+
r(e, s);
|
|
425
426
|
return;
|
|
426
427
|
}
|
|
427
428
|
if (t === "coalesce") {
|
|
428
|
-
|
|
429
|
-
|
|
429
|
+
o.current === null && i(), r(e, s), o.current !== null && clearTimeout(o.current), o.current = setTimeout(() => {
|
|
430
|
+
o.current = null, a();
|
|
430
431
|
}, n);
|
|
431
432
|
return;
|
|
432
433
|
}
|
|
433
|
-
|
|
434
|
+
r(e, s);
|
|
434
435
|
}
|
|
435
436
|
}, [
|
|
436
437
|
e,
|
|
437
438
|
t,
|
|
438
439
|
n,
|
|
440
|
+
r,
|
|
439
441
|
i,
|
|
440
|
-
a
|
|
441
|
-
o
|
|
442
|
+
a
|
|
442
443
|
]), u = T((e, t) => l({ [e]: t }), [l]);
|
|
443
444
|
return E(() => () => c(), [c, e]), D(() => ({
|
|
444
445
|
patch: l,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/design-editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The design editor as one component",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,16 +30,17 @@
|
|
|
30
30
|
"README.md"
|
|
31
31
|
],
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@kolkrabbi/kol-component": ">=0.
|
|
33
|
+
"@kolkrabbi/kol-component": ">=0.378.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.
|
|
38
|
+
"@kolkrabbi/kol-shell": ">=0.131.0 <1",
|
|
39
39
|
"react": "^19.0.0",
|
|
40
40
|
"react-dom": "^19.0.0",
|
|
41
41
|
"@kolkrabbi/kol-theme": ">=0.225.0 <1",
|
|
42
|
-
"@kolkrabbi/kol-dashboards": ">=0.13.0 <1"
|
|
42
|
+
"@kolkrabbi/kol-dashboards": ">=0.13.0 <1",
|
|
43
|
+
"@kolkrabbi/kol-tuner": ">=0.1.0 <1"
|
|
43
44
|
},
|
|
44
45
|
"dependencies": {
|
|
45
46
|
"colord": "^2.9.3",
|
|
@@ -54,9 +55,6 @@
|
|
|
54
55
|
"three": "^0.185.1"
|
|
55
56
|
},
|
|
56
57
|
"devDependencies": {
|
|
57
|
-
"@kolkrabbi/kol-component": ">=0.377.0 <1",
|
|
58
|
-
"@kolkrabbi/kol-shell": ">=0.130.0 <1",
|
|
59
|
-
"@kolkrabbi/kol-theme": ">=0.225.0 <1",
|
|
60
58
|
"@tailwindcss/vite": "^4.2.4",
|
|
61
59
|
"@vitejs/plugin-react": "^6.0.1",
|
|
62
60
|
"react": "^19.0.0",
|
|
@@ -65,10 +63,14 @@
|
|
|
65
63
|
"vite": "^8.0.10",
|
|
66
64
|
"vite-plugin-svgr": "^5.2.0",
|
|
67
65
|
"@kolkrabbi/kol-framework": "0.74.1",
|
|
68
|
-
"@kolkrabbi/kol-icons": "0.
|
|
69
|
-
"@kolkrabbi/kol-
|
|
66
|
+
"@kolkrabbi/kol-icons": "0.72.0",
|
|
67
|
+
"@kolkrabbi/kol-theme": "0.226.0",
|
|
68
|
+
"@kolkrabbi/kol-shell": "0.131.0",
|
|
69
|
+
"@kolkrabbi/kol-hardware": "0.11.1",
|
|
70
70
|
"@kolkrabbi/kol-media-client": "0.7.0",
|
|
71
|
-
"@kolkrabbi/kol-
|
|
71
|
+
"@kolkrabbi/kol-dashboards": "0.17.0",
|
|
72
|
+
"@kolkrabbi/kol-component": "0.379.0",
|
|
73
|
+
"@kolkrabbi/kol-tuner": "0.1.0"
|
|
72
74
|
},
|
|
73
75
|
"keywords": [
|
|
74
76
|
"kol",
|
|
@@ -88,6 +90,7 @@
|
|
|
88
90
|
"scripts": {
|
|
89
91
|
"build": "vite build --config vite.lib.config.js",
|
|
90
92
|
"check:core": "node scripts/check-core.mjs",
|
|
91
|
-
"check:float": "node scripts/check-float-commands.mjs"
|
|
93
|
+
"check:float": "node scripts/check-float-commands.mjs",
|
|
94
|
+
"check:frames": "node scripts/check-frames.mjs"
|
|
92
95
|
}
|
|
93
96
|
}
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import { F as e, L as t, dn as n, hn as r, pn as i } from "./rolls-CSOfYXm5.js";
|
|
2
|
-
import { embedFontFace as a } from "@kolkrabbi/kol-component";
|
|
3
|
-
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
4
|
-
//#region src/kinetic/fonts.js
|
|
5
|
-
var l = [
|
|
6
|
-
{
|
|
7
|
-
key: "rot",
|
|
8
|
-
label: "Rot",
|
|
9
|
-
family: "TG Rot",
|
|
10
|
-
url: "/fonts/tg/TGRotVF.ttf",
|
|
11
|
-
axes: [{
|
|
12
|
-
tag: "wdth",
|
|
13
|
-
min: 64,
|
|
14
|
-
max: 172,
|
|
15
|
-
def: 100
|
|
16
|
-
}, {
|
|
17
|
-
tag: "wght",
|
|
18
|
-
min: 100,
|
|
19
|
-
max: 900,
|
|
20
|
-
def: 400
|
|
21
|
-
}]
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
key: "malromur",
|
|
25
|
-
label: "Malromur",
|
|
26
|
-
family: "TG Malromur",
|
|
27
|
-
url: "/fonts/tg/TGMalromurRomanVF.ttf",
|
|
28
|
-
axes: [{
|
|
29
|
-
tag: "wght",
|
|
30
|
-
min: 300,
|
|
31
|
-
max: 900,
|
|
32
|
-
def: 300
|
|
33
|
-
}]
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
key: "gullhamrar",
|
|
37
|
-
label: "Gullhamrar",
|
|
38
|
-
family: "TG Gullhamrar",
|
|
39
|
-
url: "/fonts/tg/TGGullhamrarVF.ttf",
|
|
40
|
-
axes: [{
|
|
41
|
-
tag: "wght",
|
|
42
|
-
min: 300,
|
|
43
|
-
max: 900,
|
|
44
|
-
def: 300
|
|
45
|
-
}]
|
|
46
|
-
}
|
|
47
|
-
], u = l.map((e) => ({
|
|
48
|
-
value: e.key,
|
|
49
|
-
label: e.label
|
|
50
|
-
})), d = {
|
|
51
|
-
wght: "Weight",
|
|
52
|
-
wdth: "Width",
|
|
53
|
-
ital: "Italic",
|
|
54
|
-
slnt: "Slant",
|
|
55
|
-
opsz: "Optical size"
|
|
56
|
-
}, f = (e) => l.find((t) => t.key === e) || l[0];
|
|
57
|
-
function p(e) {
|
|
58
|
-
let t = {};
|
|
59
|
-
for (let n of e.axes) t[n.tag] = n.def;
|
|
60
|
-
return t;
|
|
61
|
-
}
|
|
62
|
-
function m(e) {
|
|
63
|
-
let t = Object.entries(e || {}).map(([e, t]) => `'${e}' ${Math.round(t * 100) / 100}`);
|
|
64
|
-
return t.length ? t.join(", ") : "normal";
|
|
65
|
-
}
|
|
66
|
-
var h = !1;
|
|
67
|
-
async function g() {
|
|
68
|
-
if (!(h || typeof FontFace > "u")) {
|
|
69
|
-
h = !0;
|
|
70
|
-
for (let e of l) {
|
|
71
|
-
let t = {}, n = e.axes.find((e) => e.tag === "wght"), r = e.axes.find((e) => e.tag === "wdth");
|
|
72
|
-
n && (t.weight = `${n.min} ${n.max}`), r && (t.stretch = `${r.min}% ${r.max}%`);
|
|
73
|
-
try {
|
|
74
|
-
let n = new FontFace(e.family, `url(${e.url})`, t);
|
|
75
|
-
document.fonts.add(n), n.load().catch(() => {});
|
|
76
|
-
} catch {}
|
|
77
|
-
}
|
|
78
|
-
try {
|
|
79
|
-
await document.fonts.ready;
|
|
80
|
-
} catch {}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
var _ = /* @__PURE__ */ new Map(), v = null;
|
|
84
|
-
function y() {
|
|
85
|
-
return v || (v = Promise.all(l.map(async (e) => {
|
|
86
|
-
if (!_.has(e.url)) try {
|
|
87
|
-
_.set(e.url, await a({
|
|
88
|
-
family: e.family,
|
|
89
|
-
url: e.url
|
|
90
|
-
}));
|
|
91
|
-
} catch (t) {
|
|
92
|
-
console.warn(`[design-editor] font not embedded, export will fall back for ${e.family}:`, t);
|
|
93
|
-
}
|
|
94
|
-
})), v);
|
|
95
|
-
}
|
|
96
|
-
function b(e) {
|
|
97
|
-
let t = /* @__PURE__ */ new Set();
|
|
98
|
-
for (let n of e?.instances ?? []) t.add(f(n.font).url);
|
|
99
|
-
return [...t].map((e) => _.get(e)).filter(Boolean).join("\n");
|
|
100
|
-
}
|
|
101
|
-
//#endregion
|
|
102
|
-
//#region src/editor/compose/inspectors/TreePicker.jsx
|
|
103
|
-
function x(e) {
|
|
104
|
-
return /* @__PURE__ */ s(n, {
|
|
105
|
-
variant: "subtle",
|
|
106
|
-
size: t(),
|
|
107
|
-
className: "w-full",
|
|
108
|
-
...e
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
function S({ label: t, options: n, value: a, onChange: o, children: c, inline: l = !0 }) {
|
|
112
|
-
let u = c ?? /* @__PURE__ */ s(x, {
|
|
113
|
-
options: n,
|
|
114
|
-
value: a,
|
|
115
|
-
onChange: o
|
|
116
|
-
});
|
|
117
|
-
return l ? /* @__PURE__ */ s(r, {
|
|
118
|
-
label: t,
|
|
119
|
-
align: "fill",
|
|
120
|
-
labelWidth: e,
|
|
121
|
-
children: u
|
|
122
|
-
}) : /* @__PURE__ */ s(i, {
|
|
123
|
-
label: t,
|
|
124
|
-
children: u
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
function C({ tree: e, presets: t, current: n, onPick: r, inline: i = !0, subLabel: a = (e) => e }) {
|
|
128
|
-
let l = e.find((e) => e.label === n.typeLabel) ?? e.find((e) => e.subs.includes(n.sub)) ?? e[0], u = t.filter((e) => e.sub === n.sub), d = (e) => t.find((t) => t.sub === e);
|
|
129
|
-
return /* @__PURE__ */ c(o, { children: [
|
|
130
|
-
/* @__PURE__ */ s(S, {
|
|
131
|
-
inline: i,
|
|
132
|
-
label: "Type",
|
|
133
|
-
options: e.map((e) => ({
|
|
134
|
-
value: e.label,
|
|
135
|
-
label: e.label
|
|
136
|
-
})),
|
|
137
|
-
value: l.label,
|
|
138
|
-
onChange: (t) => {
|
|
139
|
-
let n = e.find((e) => e.label === t);
|
|
140
|
-
n && r(d(n.subs[0]));
|
|
141
|
-
}
|
|
142
|
-
}),
|
|
143
|
-
/* @__PURE__ */ s(S, {
|
|
144
|
-
inline: i,
|
|
145
|
-
label: "Category",
|
|
146
|
-
options: l.subs.map((e) => ({
|
|
147
|
-
value: e,
|
|
148
|
-
label: a(e)
|
|
149
|
-
})),
|
|
150
|
-
value: n.sub,
|
|
151
|
-
onChange: (e) => r(d(e))
|
|
152
|
-
}),
|
|
153
|
-
/* @__PURE__ */ s(S, {
|
|
154
|
-
inline: i,
|
|
155
|
-
label: "Preset",
|
|
156
|
-
options: u.map((e) => ({
|
|
157
|
-
value: e.id,
|
|
158
|
-
label: e.label
|
|
159
|
-
})),
|
|
160
|
-
value: n.id,
|
|
161
|
-
onChange: (e) => r(t.find((t) => t.id === e))
|
|
162
|
-
})
|
|
163
|
-
] });
|
|
164
|
-
}
|
|
165
|
-
//#endregion
|
|
166
|
-
export { l as a, f as c, m as d, y as f, d as i, b as l, S as n, u as o, C as r, p as s, x as t, g as u };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { C as e, ot as t } from "./Geometry-C5s5KpWq.js";
|
|
2
|
-
import { a as n, i as r, n as i, r as a, t as o } from "./FederatedEventTarget-BJgROaRQ.js";
|
|
3
|
-
import "./FilterSystem-BUrPNXx-.js";
|
|
4
|
-
import "./init-jApIMi04.js";
|
|
5
|
-
t.add(n), t.mixin(e, r), t.add(a), t.add(i), t.mixin(e, o);
|
|
6
|
-
//#endregion
|
package/dist/chunk-3b4jIN3o.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
//#region \0rolldown/runtime.js
|
|
2
|
-
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, i, o, s) => {
|
|
3
|
-
if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
|
|
4
|
-
get: ((e) => i[e]).bind(null, d),
|
|
5
|
-
enumerable: !(s = n(i, d)) || s.enumerable
|
|
6
|
-
});
|
|
7
|
-
return e;
|
|
8
|
-
}, c = (n, r, a) => (a = n == null ? {} : e(i(n)), s(r || !n || !n.__esModule ? t(a, "default", {
|
|
9
|
-
value: n,
|
|
10
|
-
enumerable: !0
|
|
11
|
-
}) : a, n));
|
|
12
|
-
//#endregion
|
|
13
|
-
export { c as n, o as t };
|