@kolkrabbi/design-editor 0.31.0 → 0.32.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/{core-DBXPNsjJ.js → core-Cs-PEiuU.js} +5 -2
- package/dist/core.js +1 -1
- package/dist/design-editor.css +1 -1
- package/dist/design-editor.js +348 -441
- package/package.json +7 -7
package/dist/design-editor.js
CHANGED
|
@@ -9,26 +9,26 @@ import { n as rt, r as it, t as at } from "./BindDot-Don6fG00.js";
|
|
|
9
9
|
import { n as ot, r as st } from "./effects-RqPdJrRb.js";
|
|
10
10
|
import { a as ct, i as lt, n as ut, o as dt, r as ft } from "./motion-DKZGyk14.js";
|
|
11
11
|
import { n as pt, r as mt, t as ht } from "./Timeline-BKYyRqYg.js";
|
|
12
|
-
import { $ as gt, A as _t, B as vt, C as yt, D as bt, E as xt, F as St, G as Ct, H as wt, I as Tt, J as Et, K as Dt, L as Ot, M as kt, N as At, O as jt, P as Mt, Q as Nt, R as Pt, S as Ft, T as It, U as Lt, V as Rt, W as zt, X as Bt, Y as Vt, Z as Ht, _ as Ut, _t as Wt, a as Gt, at as Kt, b as qt, c as Jt, ct as Yt, d as Xt, dt as Zt, et as Qt, f as $t, ft as en, g as tn, gt as nn, h as rn, ht as an, i as on, it as sn, j as cn, k as ln, l as un, lt as dn, m as fn, mt as pn, n as mn, nt as hn, o as gn, ot as _n, p as vn, pt as yn, q as bn, r as xn, rt as Sn, s as Cn, st as wn, t as Tn, tt as En, u as Dn, ut as On, v as kn, vt as An, w as jn, x as Mn, y as Nn, z as Pn } from "./core-
|
|
13
|
-
import { Button as K, Divider as Fn, Dropdown as In, LabeledControlSection as q, MultiSelect as Ln,
|
|
14
|
-
import { createContext as
|
|
15
|
-
import { Fragment as
|
|
16
|
-
import { Icon as
|
|
17
|
-
import { AppFloatNav as
|
|
18
|
-
import { useDragResize as
|
|
19
|
-
import { createPortal as
|
|
12
|
+
import { $ as gt, A as _t, B as vt, C as yt, D as bt, E as xt, F as St, G as Ct, H as wt, I as Tt, J as Et, K as Dt, L as Ot, M as kt, N as At, O as jt, P as Mt, Q as Nt, R as Pt, S as Ft, T as It, U as Lt, V as Rt, W as zt, X as Bt, Y as Vt, Z as Ht, _ as Ut, _t as Wt, a as Gt, at as Kt, b as qt, c as Jt, ct as Yt, d as Xt, dt as Zt, et as Qt, f as $t, ft as en, g as tn, gt as nn, h as rn, ht as an, i as on, it as sn, j as cn, k as ln, l as un, lt as dn, m as fn, mt as pn, n as mn, nt as hn, o as gn, ot as _n, p as vn, pt as yn, q as bn, r as xn, rt as Sn, s as Cn, st as wn, t as Tn, tt as En, u as Dn, ut as On, v as kn, vt as An, w as jn, x as Mn, y as Nn, z as Pn } from "./core-Cs-PEiuU.js";
|
|
13
|
+
import { Button as K, Divider as Fn, Dropdown as In, LabeledControlSection as q, MultiSelect as Ln, SegmentedToggle as J, SettingsRow as Rn, StepList as zn, Tag as Bn, ToggleSwitch as Vn, Tooltip as Hn, useGrabEdge as Un, useMediaQuery as Wn, useModal as Gn } from "@kolkrabbi/kol-component";
|
|
14
|
+
import { createContext as Kn, useContext as qn, useEffect as Y, useRef as X, useState as Z, useSyncExternalStore as Jn } from "react";
|
|
15
|
+
import { Fragment as Yn, jsx as Q, jsxs as $ } from "react/jsx-runtime";
|
|
16
|
+
import { Icon as Xn } from "@kolkrabbi/kol-icons";
|
|
17
|
+
import { AppFloatNav as Zn, DocumentCapsule as Qn, FloatLayout as $n, GlobalActions as er, PropertyRail as tr } from "@kolkrabbi/kol-shell";
|
|
18
|
+
import { useDragResize as nr, useTheme as rr } from "@kolkrabbi/kol-framework";
|
|
19
|
+
import { createPortal as ir } from "react-dom";
|
|
20
20
|
//#region src/phoneFloats.js
|
|
21
|
-
var
|
|
21
|
+
var ar = (e) => {
|
|
22
22
|
let t = e, n = /* @__PURE__ */ new Set(), r = (e) => (n.add(e), () => n.delete(e));
|
|
23
23
|
return {
|
|
24
24
|
set: (e) => {
|
|
25
25
|
e !== t && (t = e, n.forEach((e) => e()));
|
|
26
26
|
},
|
|
27
|
-
use: () =>
|
|
27
|
+
use: () => Jn(r, () => t, () => t)
|
|
28
28
|
};
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
var
|
|
29
|
+
}, or = ar(null), sr = ar(null), cr = or.set;
|
|
30
|
+
or.use, sr.set;
|
|
31
|
+
var lr = sr.use, ur = [
|
|
32
32
|
{
|
|
33
33
|
id: "shape",
|
|
34
34
|
label: "Shape",
|
|
@@ -44,7 +44,7 @@ var fr = ur.use, pr = [
|
|
|
44
44
|
label: "Crossfade",
|
|
45
45
|
icon: "dashed-circle"
|
|
46
46
|
}
|
|
47
|
-
],
|
|
47
|
+
], dr = {
|
|
48
48
|
shape: [
|
|
49
49
|
["Loops", ["morph-circle", "star-morph"]],
|
|
50
50
|
["Loops", [
|
|
@@ -118,21 +118,21 @@ var fr = ur.use, pr = [
|
|
|
118
118
|
2
|
|
119
119
|
]
|
|
120
120
|
]
|
|
121
|
-
},
|
|
122
|
-
function
|
|
123
|
-
if (!
|
|
124
|
-
|
|
121
|
+
}, fr = null;
|
|
122
|
+
function pr(e) {
|
|
123
|
+
if (!fr) {
|
|
124
|
+
fr = /* @__PURE__ */ new Map();
|
|
125
125
|
let e = /* @__PURE__ */ new Set();
|
|
126
|
-
for (let t of z) for (let n of N(t.id)) e.has(n.id) || le(n) || (e.add(n.id),
|
|
126
|
+
for (let t of z) for (let n of N(t.id)) e.has(n.id) || le(n) || (e.add(n.id), fr.has(n.loop) || fr.set(n.loop, []), fr.get(n.loop).push(n));
|
|
127
127
|
}
|
|
128
|
-
return
|
|
128
|
+
return fr.get(e) ?? [];
|
|
129
129
|
}
|
|
130
|
-
var
|
|
131
|
-
function
|
|
132
|
-
if (
|
|
130
|
+
var mr = (e, t) => e.length < t ? null : Array.from({ length: t }, (n, r) => e[Math.round(r * (e.length - 1) / (t - 1))]), hr = null;
|
|
131
|
+
function gr() {
|
|
132
|
+
if (hr) return hr;
|
|
133
133
|
let e = [];
|
|
134
|
-
for (let t of
|
|
135
|
-
let [r] = n, i = t.id === "blend" ?
|
|
134
|
+
for (let t of ur) for (let n of dr[t.id]) {
|
|
135
|
+
let [r] = n, i = t.id === "blend" ? mr(pr(n[1]), n[2]) : n[1].map((e) => pr(e)[0]);
|
|
136
136
|
if (!i || i.some((e) => !e) || new Set(i.map((e) => e.id)).size < i.length) continue;
|
|
137
137
|
let a = i.map((e) => e.label).join(" → "), o = `ship:morph:${t.id}:${i.map((e) => e.id).join("--")}`;
|
|
138
138
|
e.push({
|
|
@@ -155,13 +155,13 @@ function yr() {
|
|
|
155
155
|
}
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
|
-
return
|
|
158
|
+
return hr = e;
|
|
159
159
|
}
|
|
160
|
-
var
|
|
160
|
+
var _r = () => ur.map((e) => ({
|
|
161
161
|
label: e.label,
|
|
162
|
-
subs: [...new Set(
|
|
163
|
-
})),
|
|
164
|
-
function
|
|
162
|
+
subs: [...new Set(gr().filter((t) => t.type === e.id).map((e) => e.sub))]
|
|
163
|
+
})), vr = (e, t) => gr().find((n) => n.type === e && (!t || n.category === t)), yr = (e) => gr().find((t) => t.id === e);
|
|
164
|
+
function br(e) {
|
|
165
165
|
e && (Qe({
|
|
166
166
|
active: !0,
|
|
167
167
|
...e.morph,
|
|
@@ -172,7 +172,7 @@ function Cr(e) {
|
|
|
172
172
|
}
|
|
173
173
|
//#endregion
|
|
174
174
|
//#region src/editor/labs/catalog.js
|
|
175
|
-
var
|
|
175
|
+
var xr = {
|
|
176
176
|
"fx:halftone": "ptrn-dot",
|
|
177
177
|
"fx:scanline": "grid-horizontal",
|
|
178
178
|
"fx:crt": "desktop",
|
|
@@ -196,19 +196,19 @@ var wr = {
|
|
|
196
196
|
"misc:Para Type": "aa",
|
|
197
197
|
"vec:Distressor": "scribble",
|
|
198
198
|
"vec:Modulator": "dashed-circle"
|
|
199
|
-
},
|
|
199
|
+
}, Sr = {
|
|
200
200
|
effects: "filter",
|
|
201
201
|
generative: "layers",
|
|
202
202
|
vector: "pen-nib",
|
|
203
203
|
composition: "type",
|
|
204
204
|
morph: "swap",
|
|
205
205
|
mode: "mode-toggle-01"
|
|
206
|
-
},
|
|
206
|
+
}, Cr = [
|
|
207
207
|
"Moiré",
|
|
208
208
|
"Mesh Gradient",
|
|
209
209
|
"Reaction",
|
|
210
210
|
"Halftone"
|
|
211
|
-
],
|
|
211
|
+
], wr = [
|
|
212
212
|
{
|
|
213
213
|
label: "Spaced",
|
|
214
214
|
patch: {
|
|
@@ -240,11 +240,11 @@ var wr = {
|
|
|
240
240
|
label: "Spiral",
|
|
241
241
|
patch: { geometry: "spiral" }
|
|
242
242
|
}
|
|
243
|
-
],
|
|
243
|
+
], Tr = (e = {}) => {
|
|
244
244
|
let t = e.geometry ?? "rows";
|
|
245
245
|
return t === "radial" ? "Vortex" : t === "rings" ? "Rings" : t === "spiral" ? "Spiral" : e.mark === "glyph" ? "Glyph" : e.mark === "lattice" ? "Lattice" : "Spaced";
|
|
246
246
|
};
|
|
247
|
-
function
|
|
247
|
+
function Er({ layer: e, setOnly: t, addFilter: n, patchFilter: r, carriedSource: i }) {
|
|
248
248
|
let a = () => e?.type === "photo" ? (e.filters ?? []).filter((e) => e?.id === "fx-media") : [], o = (e, o) => {
|
|
249
249
|
let s = a(), c = t("photo", {
|
|
250
250
|
...i(),
|
|
@@ -301,19 +301,19 @@ function kr({ layer: e, setOnly: t, addFilter: n, patchFilter: r, carriedSource:
|
|
|
301
301
|
...oe(L).map((t) => ({
|
|
302
302
|
id: `fx:${t.id}`,
|
|
303
303
|
label: t.label,
|
|
304
|
-
icon:
|
|
304
|
+
icon: xr[`fx:${t.id}`] ?? "square",
|
|
305
305
|
pages: t.rack ? se.map((t) => ({
|
|
306
306
|
label: t.label,
|
|
307
307
|
onSelect: () => s(t.id),
|
|
308
308
|
active: e?.fxGroup === t.id
|
|
309
|
-
})) : t.id === "pattern" ?
|
|
309
|
+
})) : t.id === "pattern" ? Cr.map((t) => ({
|
|
310
310
|
label: t,
|
|
311
311
|
onSelect: () => c(ne("optic", t)[0], "optic"),
|
|
312
312
|
active: e?.loopGroup === "optic" && f?.sub === t
|
|
313
|
-
})) : t.id === "scanline" ?
|
|
313
|
+
})) : t.id === "scanline" ? wr.map((t) => ({
|
|
314
314
|
label: t.label,
|
|
315
315
|
onSelect: () => o("scanline", t.patch),
|
|
316
|
-
active: !e?.fxGroup && d === "scanline" &&
|
|
316
|
+
active: !e?.fxGroup && d === "scanline" && Tr((e?.filters ?? []).find((e) => e?.id === "scanline")?.params) === t.label
|
|
317
317
|
})) : t.filters.map((t) => ({
|
|
318
318
|
label: t.label ?? t.id,
|
|
319
319
|
onSelect: () => o(t.id),
|
|
@@ -327,22 +327,22 @@ function kr({ layer: e, setOnly: t, addFilter: n, patchFilter: r, carriedSource:
|
|
|
327
327
|
...we.map((e) => ({
|
|
328
328
|
id: `gen:${e.label}`,
|
|
329
329
|
label: e.label,
|
|
330
|
-
icon:
|
|
330
|
+
icon: xr[`gen:${e.label}`] ?? "square",
|
|
331
331
|
pages: m(e)
|
|
332
332
|
})),
|
|
333
333
|
{
|
|
334
334
|
id: "sec:morph",
|
|
335
335
|
label: "Morph"
|
|
336
336
|
},
|
|
337
|
-
...
|
|
337
|
+
...ur.map((e) => ({
|
|
338
338
|
id: `morph:${e.id}`,
|
|
339
339
|
label: e.label,
|
|
340
340
|
icon: e.icon,
|
|
341
|
-
pages: [...new Set(
|
|
341
|
+
pages: [...new Set(gr().filter((t) => t.type === e.id).map((e) => e.category))].map((t) => ({
|
|
342
342
|
label: t,
|
|
343
|
-
onSelect: () =>
|
|
343
|
+
onSelect: () => br(vr(e.id, t)),
|
|
344
344
|
active: (() => {
|
|
345
|
-
let n =
|
|
345
|
+
let n = gr().find((e) => e.id === Ze().presetId);
|
|
346
346
|
return n?.type === e.id && n.category === t;
|
|
347
347
|
})()
|
|
348
348
|
}))
|
|
@@ -354,13 +354,13 @@ function kr({ layer: e, setOnly: t, addFilter: n, patchFilter: r, carriedSource:
|
|
|
354
354
|
{
|
|
355
355
|
id: "vec:Distressor",
|
|
356
356
|
label: "Distressor",
|
|
357
|
-
icon:
|
|
357
|
+
icon: xr["vec:Distressor"] ?? "square",
|
|
358
358
|
pages: p("distress")
|
|
359
359
|
},
|
|
360
360
|
{
|
|
361
361
|
id: "vec:Modulator",
|
|
362
362
|
label: "Modulator",
|
|
363
|
-
icon:
|
|
363
|
+
icon: xr["vec:Modulator"] ?? "square",
|
|
364
364
|
pages: p("modulator")
|
|
365
365
|
},
|
|
366
366
|
{
|
|
@@ -370,7 +370,7 @@ function kr({ layer: e, setOnly: t, addFilter: n, patchFilter: r, carriedSource:
|
|
|
370
370
|
...ct.map((t) => ({
|
|
371
371
|
id: `kin:${t.label}`,
|
|
372
372
|
label: t.label,
|
|
373
|
-
icon:
|
|
373
|
+
icon: xr[`kin:${t.label}`] ?? "square",
|
|
374
374
|
pages: t.subs.map((t) => ({
|
|
375
375
|
label: t,
|
|
376
376
|
onSelect: () => l(lt.find((e) => e.sub === t)),
|
|
@@ -380,14 +380,14 @@ function kr({ layer: e, setOnly: t, addFilter: n, patchFilter: r, carriedSource:
|
|
|
380
380
|
...fe.map((e) => ({
|
|
381
381
|
id: `misc:${e.label}`,
|
|
382
382
|
label: e.label,
|
|
383
|
-
icon:
|
|
383
|
+
icon: xr[`misc:${e.label}`] ?? "square",
|
|
384
384
|
pages: e.groups.flatMap((e) => p(e, "misc"))
|
|
385
385
|
}))
|
|
386
386
|
];
|
|
387
387
|
}
|
|
388
388
|
//#endregion
|
|
389
389
|
//#region src/editor/labs/LabsNav.jsx
|
|
390
|
-
function
|
|
390
|
+
function Dr() {
|
|
391
391
|
let { addFilter: e, patchFilter: t } = o(), { layer: n, setOnly: r } = W(), i = X(null);
|
|
392
392
|
Y(() => {
|
|
393
393
|
n?.type === "photo" && n.src && (i.current = {
|
|
@@ -401,7 +401,7 @@ function Ar() {
|
|
|
401
401
|
n?.srcType,
|
|
402
402
|
n?.fit
|
|
403
403
|
]);
|
|
404
|
-
let a =
|
|
404
|
+
let a = Er({
|
|
405
405
|
layer: n,
|
|
406
406
|
setOnly: r,
|
|
407
407
|
addFilter: e,
|
|
@@ -418,7 +418,7 @@ function Ar() {
|
|
|
418
418
|
if (n.id.startsWith("sec:")) {
|
|
419
419
|
let e = n.id.slice(4);
|
|
420
420
|
t.push({
|
|
421
|
-
icon:
|
|
421
|
+
icon: Sr[e] ?? "square",
|
|
422
422
|
path: `${Jt}${n.id}`,
|
|
423
423
|
label: n.label,
|
|
424
424
|
sub: []
|
|
@@ -444,7 +444,7 @@ function Ar() {
|
|
|
444
444
|
}
|
|
445
445
|
//#endregion
|
|
446
446
|
//#region src/editor/morph/MorphTab.jsx
|
|
447
|
-
var
|
|
447
|
+
var Or = (e, t) => JSON.stringify(e) === JSON.stringify(t), kr = [
|
|
448
448
|
{
|
|
449
449
|
key: "curve",
|
|
450
450
|
label: "Curve",
|
|
@@ -477,8 +477,8 @@ var jr = (e, t) => JSON.stringify(e) === JSON.stringify(t), Mr = [
|
|
|
477
477
|
when: (e) => e.mode === "shape"
|
|
478
478
|
}
|
|
479
479
|
];
|
|
480
|
-
function
|
|
481
|
-
let r = s(), i = nt(), { steps: c, curve: l, cycle: u, mode: d, resolution: p, editing: m, fileId: h, editRequest: g } = i, { updateLayer: _, removeLayer: v, setCurrentPresetId: y, setCurrentPresetName: b, palette: x } = o(), { setOnly: S } = W(), { buildSavedSpec: C } = Et(), { addItem: w, updateItem: T } = He(), E =
|
|
480
|
+
function Ar({ layer: e, readOnly: t = !1, editTabs: n = null }) {
|
|
481
|
+
let r = s(), i = nt(), { steps: c, curve: l, cycle: u, mode: d, resolution: p, editing: m, fileId: h, editRequest: g } = i, { updateLayer: _, removeLayer: v, setCurrentPresetId: y, setCurrentPresetName: b, palette: x } = o(), { setOnly: S } = W(), { buildSavedSpec: C } = Et(), { addItem: w, updateItem: T } = He(), E = Gn(), D = f(), ee = te(e?.id ?? null, { history: "coalesce" }), [k, j] = Z("generate"), M = c[0], ne = c.every((e) => e.loopId === M?.loopId), N = c.filter((e) => !Bt(U(e.loopId)) || !Vt(U(e.loopId))), P = N.length === 0, F = {
|
|
482
482
|
blend: ne ? null : "Blend tweens one generator — these steps are different generators",
|
|
483
483
|
shape: P ? null : `No outline to morph: ${N.map((e) => Ke(e, c.indexOf(e))).join(", ")} (GL)`,
|
|
484
484
|
crossfade: P ? null : `Cannot fade: ${N.map((e) => Ke(e, c.indexOf(e))).join(", ")} (GL)`
|
|
@@ -599,7 +599,7 @@ function Nr({ layer: e, readOnly: t = !1, editTabs: n = null }) {
|
|
|
599
599
|
]), Y(() => {
|
|
600
600
|
if (t || m == null || !e) return;
|
|
601
601
|
let n = et(e, U(e.loopId)?.params ?? []);
|
|
602
|
-
|
|
602
|
+
Or(n, c[m]?.params) || Xe(m, n);
|
|
603
603
|
}, [e]), Y(() => {
|
|
604
604
|
t || !D || m == null || (G({ editing: null }), ae.current = null);
|
|
605
605
|
}, [
|
|
@@ -637,17 +637,17 @@ function Nr({ layer: e, readOnly: t = !1, editTabs: n = null }) {
|
|
|
637
637
|
!t && /* @__PURE__ */ Q(q, {
|
|
638
638
|
divided: !0,
|
|
639
639
|
children: /* @__PURE__ */ Q(ue, {
|
|
640
|
-
tree:
|
|
641
|
-
presets:
|
|
642
|
-
current:
|
|
640
|
+
tree: _r(),
|
|
641
|
+
presets: gr(),
|
|
642
|
+
current: yr(i.presetId) ?? { typeLabel: ur.find((e) => e.id === d)?.label },
|
|
643
643
|
subLabel: (e) => e.split(" · ").pop(),
|
|
644
|
-
onPick:
|
|
644
|
+
onPick: br
|
|
645
645
|
})
|
|
646
646
|
}),
|
|
647
647
|
/* @__PURE__ */ $(q, {
|
|
648
648
|
divided: !0,
|
|
649
649
|
children: [
|
|
650
|
-
/* @__PURE__ */ Q(
|
|
650
|
+
/* @__PURE__ */ Q(zn, {
|
|
651
651
|
items: c.map((e, t) => ({
|
|
652
652
|
id: t,
|
|
653
653
|
label: Ke(e, t)
|
|
@@ -709,7 +709,7 @@ function Nr({ layer: e, readOnly: t = !1, editTabs: n = null }) {
|
|
|
709
709
|
]
|
|
710
710
|
}),
|
|
711
711
|
/* @__PURE__ */ Q(A, {
|
|
712
|
-
schema:
|
|
712
|
+
schema: kr,
|
|
713
713
|
layer: i,
|
|
714
714
|
setProp: (e, n) => {
|
|
715
715
|
!t && (typeof n != "object" || !n) && G({ [e]: n });
|
|
@@ -759,7 +759,7 @@ function Nr({ layer: e, readOnly: t = !1, editTabs: n = null }) {
|
|
|
759
759
|
}
|
|
760
760
|
//#endregion
|
|
761
761
|
//#region src/editor/params/QuickMotion.jsx
|
|
762
|
-
var
|
|
762
|
+
var jr = [
|
|
763
763
|
{
|
|
764
764
|
value: "breathe",
|
|
765
765
|
label: "Breathe",
|
|
@@ -778,14 +778,14 @@ var Pr = [
|
|
|
778
778
|
source: "lfo-square",
|
|
779
779
|
rate: 8
|
|
780
780
|
}
|
|
781
|
-
],
|
|
782
|
-
function
|
|
781
|
+
], Mr = .2;
|
|
782
|
+
function Nr(e) {
|
|
783
783
|
if (!r(e)) return "off";
|
|
784
784
|
if (e.bind !== "mod") return "custom";
|
|
785
|
-
let t =
|
|
785
|
+
let t = jr.find((t) => t.source === e.source && (e.transform?.rate ?? 1) === t.rate);
|
|
786
786
|
return t ? t.value : "custom";
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function Pr({ schema: e, layer: t, setProp: n, label: r = "Modulate" }) {
|
|
789
789
|
let a = s(), o = _(e ?? [], t).filter((e) => e.type === "range" && e.animatable !== !1 && v(e) !== "anim" && e.min != null && e.max != null && !/seed/i.test(e.key));
|
|
790
790
|
if (!o.length) return null;
|
|
791
791
|
let c = (e, r) => {
|
|
@@ -795,9 +795,9 @@ function Lr({ schema: e, layer: t, setProp: n, label: r = "Modulate" }) {
|
|
|
795
795
|
n(e.key, Array.isArray(r) ? (r[0] + r[1]) / 2 : b(i, O.getCtx(), t) ?? e.default ?? e.min);
|
|
796
796
|
return;
|
|
797
797
|
}
|
|
798
|
-
let a =
|
|
798
|
+
let a = jr.find((e) => e.value === r);
|
|
799
799
|
if (!a) return;
|
|
800
|
-
let o = Number(b(i, O.getCtx(), t) ?? e.default ?? e.min), s = (e.max - e.min) *
|
|
800
|
+
let o = Number(b(i, O.getCtx(), t) ?? e.default ?? e.min), s = (e.max - e.min) * Mr, c = Math.max(e.min, o - s), l = Math.min(e.max, o + s);
|
|
801
801
|
n(e.key, {
|
|
802
802
|
bind: "mod",
|
|
803
803
|
source: a.source,
|
|
@@ -811,12 +811,12 @@ function Lr({ schema: e, layer: t, setProp: n, label: r = "Modulate" }) {
|
|
|
811
811
|
label: r,
|
|
812
812
|
divided: !0,
|
|
813
813
|
children: o.map((e) => {
|
|
814
|
-
let n =
|
|
814
|
+
let n = Nr(t[e.key]), r = [
|
|
815
815
|
{
|
|
816
816
|
value: "off",
|
|
817
817
|
label: "Off"
|
|
818
818
|
},
|
|
819
|
-
...
|
|
819
|
+
...jr.map(({ value: e, label: t }) => ({
|
|
820
820
|
value: e,
|
|
821
821
|
label: t
|
|
822
822
|
})),
|
|
@@ -825,7 +825,7 @@ function Lr({ schema: e, layer: t, setProp: n, label: r = "Modulate" }) {
|
|
|
825
825
|
label: "Custom"
|
|
826
826
|
}] : []
|
|
827
827
|
];
|
|
828
|
-
return /* @__PURE__ */ Q(
|
|
828
|
+
return /* @__PURE__ */ Q(Rn, {
|
|
829
829
|
label: e.label,
|
|
830
830
|
align: "fill",
|
|
831
831
|
labelWidth: i,
|
|
@@ -843,7 +843,7 @@ function Lr({ schema: e, layer: t, setProp: n, label: r = "Modulate" }) {
|
|
|
843
843
|
}
|
|
844
844
|
//#endregion
|
|
845
845
|
//#region src/editor/params/InputRows.jsx
|
|
846
|
-
var
|
|
846
|
+
var Fr = [
|
|
847
847
|
{
|
|
848
848
|
value: "off",
|
|
849
849
|
label: "Off"
|
|
@@ -868,13 +868,13 @@ var Rr = [
|
|
|
868
868
|
value: "lfo-sine",
|
|
869
869
|
label: "LFO"
|
|
870
870
|
}
|
|
871
|
-
],
|
|
872
|
-
function
|
|
871
|
+
], Ir = new Set(Fr.map((e) => e.value));
|
|
872
|
+
function Lr({ schema: e, layer: t, setProp: n, inputs: i = null }) {
|
|
873
873
|
let a = s(), o = _(e ?? [], t).filter((e) => e.type === "range" && e.animatable !== !1 && e.min != null && e.max != null && !/seed/i.test(e.key));
|
|
874
874
|
if (!o.length) return null;
|
|
875
875
|
let c = new Map(o.map((e) => [e.key, e])), l = (i ?? []).filter((e) => c.has(e)), u = [...l, ...o.map((e) => e.key).filter((e) => !l.includes(e))], d = l.length ? l : u.slice(0, 3), f = (e) => {
|
|
876
876
|
let n = t[e];
|
|
877
|
-
return r(n) && n.bind === "mod" &&
|
|
877
|
+
return r(n) && n.bind === "mod" && Ir.has(n.source);
|
|
878
878
|
}, p = u.filter(f), m = (e) => {
|
|
879
879
|
let n = c.get(e);
|
|
880
880
|
return Number(b(t[e], O.getCtx(), t) ?? n.default ?? n.min);
|
|
@@ -899,7 +899,7 @@ function Br({ schema: e, layer: t, setProp: n, inputs: i = null }) {
|
|
|
899
899
|
groups: [{
|
|
900
900
|
id: "source",
|
|
901
901
|
label: "Source",
|
|
902
|
-
options:
|
|
902
|
+
options: Fr
|
|
903
903
|
}, {
|
|
904
904
|
id: "drives",
|
|
905
905
|
label: "Drives",
|
|
@@ -912,7 +912,7 @@ function Br({ schema: e, layer: t, setProp: n, inputs: i = null }) {
|
|
|
912
912
|
source: t[e].source,
|
|
913
913
|
drives: e
|
|
914
914
|
},
|
|
915
|
-
label: `${
|
|
915
|
+
label: `${Fr.find((n) => n.value === t[e].source)?.label} → ${c.get(e).label}`,
|
|
916
916
|
onChange: (n, r) => {
|
|
917
917
|
if (n === "source") {
|
|
918
918
|
r === "off" ? g(e) : h(e, r);
|
|
@@ -933,8 +933,8 @@ function Br({ schema: e, layer: t, setProp: n, inputs: i = null }) {
|
|
|
933
933
|
}
|
|
934
934
|
//#endregion
|
|
935
935
|
//#region src/editor/labs/ModelSource.jsx
|
|
936
|
-
var
|
|
937
|
-
function
|
|
936
|
+
var Rr = /\.(obj|glb|gltf|stl)$/i, zr = (e) => Rr.test(e.key ?? e.name ?? ""), Br = (e) => (e.match(Rr)?.[1] ?? "obj").toLowerCase(), Vr = (e) => e?.startsWith("data:") ? "Local file" : decodeURIComponent(String(e ?? "").split("/").pop() || "—");
|
|
937
|
+
function Hr({ layer: e, setProp: t }) {
|
|
938
938
|
let n = s(), [r, i] = Z(!1), a = X(null), o = (e, n) => {
|
|
939
939
|
t("meshSrc", e), t("meshType", n);
|
|
940
940
|
};
|
|
@@ -944,7 +944,7 @@ function Gr({ layer: e, setProp: t }) {
|
|
|
944
944
|
children: [
|
|
945
945
|
/* @__PURE__ */ Q("span", {
|
|
946
946
|
className: "kol-mono-12 text-meta truncate",
|
|
947
|
-
children:
|
|
947
|
+
children: Vr(e.meshSrc)
|
|
948
948
|
}),
|
|
949
949
|
/* @__PURE__ */ $("div", {
|
|
950
950
|
className: "grid grid-cols-2 gap-2",
|
|
@@ -969,15 +969,15 @@ function Gr({ layer: e, setProp: t }) {
|
|
|
969
969
|
let t = e.target.files?.[0];
|
|
970
970
|
if (e.target.value = "", !t) return;
|
|
971
971
|
let n = new FileReader();
|
|
972
|
-
n.onload = () => o(n.result,
|
|
972
|
+
n.onload = () => o(n.result, Br(t.name)), n.readAsDataURL(t);
|
|
973
973
|
}
|
|
974
974
|
}),
|
|
975
975
|
/* @__PURE__ */ Q(Ft, {
|
|
976
976
|
open: r,
|
|
977
|
-
accept:
|
|
977
|
+
accept: zr,
|
|
978
978
|
onClose: () => i(!1),
|
|
979
979
|
onSelect: (e) => {
|
|
980
|
-
i(!1), o(jn(e),
|
|
980
|
+
i(!1), o(jn(e), Br(e));
|
|
981
981
|
}
|
|
982
982
|
})
|
|
983
983
|
]
|
|
@@ -985,7 +985,7 @@ function Gr({ layer: e, setProp: t }) {
|
|
|
985
985
|
}
|
|
986
986
|
//#endregion
|
|
987
987
|
//#region src/editor/labs/useLabsKeys.js
|
|
988
|
-
function
|
|
988
|
+
function Ur(e, t) {
|
|
989
989
|
Y(() => {
|
|
990
990
|
let n = (n) => {
|
|
991
991
|
n.key !== "r" && n.key !== "R" || n.metaKey || n.ctrlKey || n.altKey || zt(n) || (n.preventDefault(), n.shiftKey ? t?.() : e?.());
|
|
@@ -995,13 +995,13 @@ function Kr(e, t) {
|
|
|
995
995
|
}
|
|
996
996
|
//#endregion
|
|
997
997
|
//#region src/editor/labs/LabsParams.jsx
|
|
998
|
-
var
|
|
998
|
+
var Wr = [{
|
|
999
999
|
value: "effect",
|
|
1000
1000
|
label: "Effect"
|
|
1001
1001
|
}, {
|
|
1002
1002
|
value: "anim",
|
|
1003
1003
|
label: "Motion"
|
|
1004
|
-
}],
|
|
1004
|
+
}], Gr = [
|
|
1005
1005
|
{
|
|
1006
1006
|
value: "generate",
|
|
1007
1007
|
label: "Generate"
|
|
@@ -1014,7 +1014,7 @@ var qr = [{
|
|
|
1014
1014
|
value: "anim",
|
|
1015
1015
|
label: "Animation"
|
|
1016
1016
|
}
|
|
1017
|
-
],
|
|
1017
|
+
], Kr = [
|
|
1018
1018
|
{
|
|
1019
1019
|
value: "generate",
|
|
1020
1020
|
label: "Gen"
|
|
@@ -1028,11 +1028,11 @@ var qr = [{
|
|
|
1028
1028
|
label: "Anim"
|
|
1029
1029
|
}
|
|
1030
1030
|
];
|
|
1031
|
-
function
|
|
1031
|
+
function qr({ options: e, active: t, onPick: n, spread: r = !1, pills: i = !1 }) {
|
|
1032
1032
|
let o = s();
|
|
1033
1033
|
return e?.length ? i ? /* @__PURE__ */ Q("div", {
|
|
1034
1034
|
className: "flex items-center gap-1 flex-wrap",
|
|
1035
|
-
children: e.map((e) => /* @__PURE__ */ Q(
|
|
1035
|
+
children: e.map((e) => /* @__PURE__ */ Q(Bn, {
|
|
1036
1036
|
size: "xs",
|
|
1037
1037
|
hash: !1,
|
|
1038
1038
|
active: e.value === t,
|
|
@@ -1049,13 +1049,13 @@ function Xr({ options: e, active: t, onPick: n, spread: r = !1, pills: i = !1 })
|
|
|
1049
1049
|
className: a(o)
|
|
1050
1050
|
}) : null;
|
|
1051
1051
|
}
|
|
1052
|
-
function
|
|
1052
|
+
function Jr() {
|
|
1053
1053
|
let { undo: e, redo: t, canUndo: n, canRedo: r } = o(), i = s(), a = (e, t) => e ? t : /* @__PURE__ */ Q("span", {
|
|
1054
1054
|
"aria-hidden": "true",
|
|
1055
1055
|
className: "invisible pointer-events-none",
|
|
1056
1056
|
children: t
|
|
1057
1057
|
});
|
|
1058
|
-
return /* @__PURE__ */ $(
|
|
1058
|
+
return /* @__PURE__ */ $(Yn, { children: [a(n, /* @__PURE__ */ Q(Hn, {
|
|
1059
1059
|
label: "Undo",
|
|
1060
1060
|
shortcut: "⌘Z",
|
|
1061
1061
|
children: /* @__PURE__ */ Q(K, {
|
|
@@ -1065,7 +1065,7 @@ function Zr() {
|
|
|
1065
1065
|
tabIndex: n ? void 0 : -1,
|
|
1066
1066
|
onClick: e
|
|
1067
1067
|
})
|
|
1068
|
-
})), a(r, /* @__PURE__ */ Q(
|
|
1068
|
+
})), a(r, /* @__PURE__ */ Q(Hn, {
|
|
1069
1069
|
label: "Redo",
|
|
1070
1070
|
shortcut: "⇧⌘Z",
|
|
1071
1071
|
children: /* @__PURE__ */ Q(K, {
|
|
@@ -1077,7 +1077,7 @@ function Zr() {
|
|
|
1077
1077
|
})
|
|
1078
1078
|
}))] });
|
|
1079
1079
|
}
|
|
1080
|
-
function
|
|
1080
|
+
function Yr({ chips: e, active: t, onPick: n, spread: r, pills: a, title: o, tabStrip: c, preStrip: l, fx: u = !1, scope: d, ghostLabels: f, children: p }) {
|
|
1081
1081
|
let m = s() === "sm";
|
|
1082
1082
|
return /* @__PURE__ */ $("div", {
|
|
1083
1083
|
className: `flex flex-col gap-5${u ? " kol-labs-fx" : ""}`,
|
|
@@ -1088,9 +1088,9 @@ function Qr({ chips: e, active: t, onPick: n, spread: r, pills: a, title: o, tab
|
|
|
1088
1088
|
children: [/* @__PURE__ */ Q("p", {
|
|
1089
1089
|
className: "kol-eyebrow text-fg-96 flex-1 min-w-0",
|
|
1090
1090
|
children: o
|
|
1091
|
-
}), /* @__PURE__ */ Q(
|
|
1091
|
+
}), /* @__PURE__ */ Q(Jr, {})]
|
|
1092
1092
|
}),
|
|
1093
|
-
e && /* @__PURE__ */ Q(
|
|
1093
|
+
e && /* @__PURE__ */ Q(qr, {
|
|
1094
1094
|
options: e,
|
|
1095
1095
|
active: t,
|
|
1096
1096
|
onPick: n,
|
|
@@ -1112,7 +1112,7 @@ function Qr({ chips: e, active: t, onPick: n, spread: r, pills: a, title: o, tab
|
|
|
1112
1112
|
]
|
|
1113
1113
|
});
|
|
1114
1114
|
}
|
|
1115
|
-
function
|
|
1115
|
+
function Xr({ layer: t, showMod: n }) {
|
|
1116
1116
|
let r = l(), c = s(), [u, d] = Z("effect");
|
|
1117
1117
|
Y(() => {
|
|
1118
1118
|
let e = () => d("effect");
|
|
@@ -1154,7 +1154,7 @@ function $r({ layer: t, showMod: n }) {
|
|
|
1154
1154
|
} : t);
|
|
1155
1155
|
b(t.id, { filters: n });
|
|
1156
1156
|
};
|
|
1157
|
-
|
|
1157
|
+
Ur(() => {
|
|
1158
1158
|
O && b(t.id, { filters: P.map((e, t) => t === 0 ? {
|
|
1159
1159
|
...e,
|
|
1160
1160
|
params: {}
|
|
@@ -1180,25 +1180,25 @@ function $r({ layer: t, showMod: n }) {
|
|
|
1180
1180
|
value: e.id,
|
|
1181
1181
|
label: `${e.label ?? e.id}${e.kind === "pixi" ? " · GPU" : ""}`
|
|
1182
1182
|
}))];
|
|
1183
|
-
return /* @__PURE__ */ $(
|
|
1183
|
+
return /* @__PURE__ */ $(Yr, {
|
|
1184
1184
|
title: "Effects",
|
|
1185
1185
|
fx: !0,
|
|
1186
1186
|
tabStrip: /* @__PURE__ */ Q(J, {
|
|
1187
1187
|
tone: "sunken",
|
|
1188
1188
|
value: u,
|
|
1189
1189
|
onChange: d,
|
|
1190
|
-
options:
|
|
1190
|
+
options: Wr,
|
|
1191
1191
|
size: c,
|
|
1192
1192
|
className: a(c)
|
|
1193
1193
|
}),
|
|
1194
|
-
children: [u === "effect" && /* @__PURE__ */ $(
|
|
1194
|
+
children: [u === "effect" && /* @__PURE__ */ $(Yn, { children: [
|
|
1195
1195
|
/* @__PURE__ */ $(q, {
|
|
1196
1196
|
label: "Effect stack",
|
|
1197
1197
|
divided: !0,
|
|
1198
1198
|
children: [C.length === 0 && /* @__PURE__ */ Q(j, {
|
|
1199
1199
|
className: "kol-mono-10 text-meta",
|
|
1200
1200
|
children: "No effects yet — add one below."
|
|
1201
|
-
}), /* @__PURE__ */ Q(
|
|
1201
|
+
}), /* @__PURE__ */ Q(ei, {
|
|
1202
1202
|
...e,
|
|
1203
1203
|
from: 0
|
|
1204
1204
|
})]
|
|
@@ -1225,7 +1225,7 @@ function $r({ layer: t, showMod: n }) {
|
|
|
1225
1225
|
})]
|
|
1226
1226
|
});
|
|
1227
1227
|
}
|
|
1228
|
-
if (!O) return /* @__PURE__ */ Q(
|
|
1228
|
+
if (!O) return /* @__PURE__ */ Q(Yr, {
|
|
1229
1229
|
chips: M,
|
|
1230
1230
|
active: null,
|
|
1231
1231
|
onPick: N,
|
|
@@ -1235,7 +1235,7 @@ function $r({ layer: t, showMod: n }) {
|
|
|
1235
1235
|
tone: "sunken",
|
|
1236
1236
|
value: u,
|
|
1237
1237
|
onChange: d,
|
|
1238
|
-
options:
|
|
1238
|
+
options: Wr,
|
|
1239
1239
|
size: c,
|
|
1240
1240
|
className: a(c)
|
|
1241
1241
|
}),
|
|
@@ -1269,7 +1269,7 @@ function $r({ layer: t, showMod: n }) {
|
|
|
1269
1269
|
renderAnimate: ie,
|
|
1270
1270
|
inline: !0
|
|
1271
1271
|
};
|
|
1272
|
-
return /* @__PURE__ */ $(
|
|
1272
|
+
return /* @__PURE__ */ $(Yr, {
|
|
1273
1273
|
chips: M,
|
|
1274
1274
|
active: O.id,
|
|
1275
1275
|
onPick: N,
|
|
@@ -1282,11 +1282,11 @@ function $r({ layer: t, showMod: n }) {
|
|
|
1282
1282
|
tone: "sunken",
|
|
1283
1283
|
value: u,
|
|
1284
1284
|
onChange: d,
|
|
1285
|
-
options:
|
|
1285
|
+
options: Wr,
|
|
1286
1286
|
size: c,
|
|
1287
1287
|
className: a(c)
|
|
1288
1288
|
}),
|
|
1289
|
-
children: [u === "effect" && /* @__PURE__ */ $(
|
|
1289
|
+
children: [u === "effect" && /* @__PURE__ */ $(Yn, { children: [
|
|
1290
1290
|
W.length > 0 && /* @__PURE__ */ Q(A, {
|
|
1291
1291
|
schema: W,
|
|
1292
1292
|
...pe
|
|
@@ -1302,7 +1302,7 @@ function $r({ layer: t, showMod: n }) {
|
|
|
1302
1302
|
view: F,
|
|
1303
1303
|
tab: "effect",
|
|
1304
1304
|
onPatch: z,
|
|
1305
|
-
levels: /* @__PURE__ */ $(
|
|
1305
|
+
levels: /* @__PURE__ */ $(Yn, { children: [
|
|
1306
1306
|
[
|
|
1307
1307
|
["type", "Type"],
|
|
1308
1308
|
["category", "Category"],
|
|
@@ -1342,11 +1342,11 @@ function $r({ layer: t, showMod: n }) {
|
|
|
1342
1342
|
})]
|
|
1343
1343
|
}),
|
|
1344
1344
|
/* @__PURE__ */ Q(Fn, {}),
|
|
1345
|
-
ue < H.length && /* @__PURE__ */ $(
|
|
1345
|
+
ue < H.length && /* @__PURE__ */ $(Yn, { children: [/* @__PURE__ */ Q(A, {
|
|
1346
1346
|
schema: H.slice(ue),
|
|
1347
1347
|
...pe
|
|
1348
1348
|
}), /* @__PURE__ */ Q(Fn, {})] }),
|
|
1349
|
-
/* @__PURE__ */ Q(
|
|
1349
|
+
/* @__PURE__ */ Q(ti, {
|
|
1350
1350
|
chain: C,
|
|
1351
1351
|
from: E + 1,
|
|
1352
1352
|
layer: t,
|
|
@@ -1358,8 +1358,8 @@ function $r({ layer: t, showMod: n }) {
|
|
|
1358
1358
|
palette: x,
|
|
1359
1359
|
showMod: n
|
|
1360
1360
|
})
|
|
1361
|
-
] }), u === "anim" && /* @__PURE__ */ $(
|
|
1362
|
-
/* @__PURE__ */ Q(
|
|
1361
|
+
] }), u === "anim" && /* @__PURE__ */ $(Yn, { children: [
|
|
1362
|
+
/* @__PURE__ */ Q(Lr, {
|
|
1363
1363
|
schema: O.def.params,
|
|
1364
1364
|
layer: F,
|
|
1365
1365
|
setProp: R,
|
|
@@ -1373,7 +1373,7 @@ function $r({ layer: t, showMod: n }) {
|
|
|
1373
1373
|
O.def.orbit && /* @__PURE__ */ Q(q, {
|
|
1374
1374
|
label: "Interaction",
|
|
1375
1375
|
divided: !0,
|
|
1376
|
-
children: /* @__PURE__ */ Q(
|
|
1376
|
+
children: /* @__PURE__ */ Q(Rn, {
|
|
1377
1377
|
label: "ORBIT (C)",
|
|
1378
1378
|
align: "fill",
|
|
1379
1379
|
labelWidth: i,
|
|
@@ -1410,12 +1410,12 @@ function $r({ layer: t, showMod: n }) {
|
|
|
1410
1410
|
onChange: (e) => R("sweeps", e),
|
|
1411
1411
|
inline: !0
|
|
1412
1412
|
}),
|
|
1413
|
-
/* @__PURE__ */ Q(
|
|
1413
|
+
/* @__PURE__ */ Q(Pr, {
|
|
1414
1414
|
schema: O.def.params,
|
|
1415
1415
|
layer: F,
|
|
1416
1416
|
setProp: R
|
|
1417
1417
|
}),
|
|
1418
|
-
/* @__PURE__ */ Q(
|
|
1418
|
+
/* @__PURE__ */ Q($r, {
|
|
1419
1419
|
chain: C,
|
|
1420
1420
|
layer: t,
|
|
1421
1421
|
hostView: F,
|
|
@@ -1428,13 +1428,13 @@ function $r({ layer: t, showMod: n }) {
|
|
|
1428
1428
|
] })]
|
|
1429
1429
|
});
|
|
1430
1430
|
}
|
|
1431
|
-
var
|
|
1432
|
-
function
|
|
1431
|
+
var Zr = L.filter((e) => !e.kind && !e.first);
|
|
1432
|
+
function Qr({ layer: e, edit: t, palette: n, showMod: r }) {
|
|
1433
1433
|
let { addFilter: i, removeFilter: a, toggleFilter: s } = o(), c = g(e), l = c.map(({ def: e, ...t }) => t);
|
|
1434
|
-
return /* @__PURE__ */ Q(
|
|
1434
|
+
return /* @__PURE__ */ Q(ti, {
|
|
1435
1435
|
chain: c,
|
|
1436
1436
|
from: 0,
|
|
1437
|
-
filters:
|
|
1437
|
+
filters: Zr,
|
|
1438
1438
|
layer: e,
|
|
1439
1439
|
hostView: e,
|
|
1440
1440
|
addFilter: i,
|
|
@@ -1451,7 +1451,7 @@ function ti({ layer: e, edit: t, palette: n, showMod: r }) {
|
|
|
1451
1451
|
showMod: r
|
|
1452
1452
|
});
|
|
1453
1453
|
}
|
|
1454
|
-
function
|
|
1454
|
+
function $r({ chain: e, layer: t, hostView: n, addFilter: r, removeFilter: i, setStagePropAt: a, palette: o, showMod: c }) {
|
|
1455
1455
|
let l = s(), u = e.findIndex((e) => e.id === "fx-media"), d = u < 0 ? null : e[u], f = d ? {
|
|
1456
1456
|
...n,
|
|
1457
1457
|
...d.params,
|
|
@@ -1460,7 +1460,7 @@ function ni({ chain: e, layer: t, hostView: n, addFilter: r, removeFilter: i, se
|
|
|
1460
1460
|
return /* @__PURE__ */ Q(q, {
|
|
1461
1461
|
label: "Media",
|
|
1462
1462
|
divided: !0,
|
|
1463
|
-
children: d?.def ? /* @__PURE__ */ $(
|
|
1463
|
+
children: d?.def ? /* @__PURE__ */ $(Yn, { children: [/* @__PURE__ */ Q(A, {
|
|
1464
1464
|
schema: d.def.params,
|
|
1465
1465
|
layer: f,
|
|
1466
1466
|
setProp: p,
|
|
@@ -1490,7 +1490,7 @@ function ni({ chain: e, layer: t, hostView: n, addFilter: r, removeFilter: i, se
|
|
|
1490
1490
|
})
|
|
1491
1491
|
});
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1493
|
+
function ei({ chain: e, from: t = 0, layer: n, hostView: r, toggleFilter: i, removeFilter: a, setStagePropAt: o, palette: c, showMod: l }) {
|
|
1494
1494
|
let u = s();
|
|
1495
1495
|
return e.slice(t).map((e, s) => {
|
|
1496
1496
|
let d = s + t, f = e.enabled !== !1, p = {
|
|
@@ -1502,12 +1502,12 @@ function ri({ chain: e, from: t = 0, layer: n, hostView: r, toggleFilter: i, rem
|
|
|
1502
1502
|
className: "flex flex-col gap-2 p-2 rounded bg-oq-04",
|
|
1503
1503
|
children: [/* @__PURE__ */ $("div", {
|
|
1504
1504
|
className: "flex items-center gap-2",
|
|
1505
|
-
children: [/* @__PURE__ */ Q(
|
|
1505
|
+
children: [/* @__PURE__ */ Q(Vn, {
|
|
1506
1506
|
size: u,
|
|
1507
1507
|
checked: f,
|
|
1508
1508
|
onChange: () => i(n.id, d),
|
|
1509
1509
|
label: e.def?.label ?? e.id
|
|
1510
|
-
}), /* @__PURE__ */ Q(
|
|
1510
|
+
}), /* @__PURE__ */ Q(Hn, {
|
|
1511
1511
|
asChild: !0,
|
|
1512
1512
|
label: "Delete effect",
|
|
1513
1513
|
children: /* @__PURE__ */ Q(K, {
|
|
@@ -1535,7 +1535,7 @@ function ri({ chain: e, from: t = 0, layer: n, hostView: r, toggleFilter: i, rem
|
|
|
1535
1535
|
}, e.key ?? d);
|
|
1536
1536
|
});
|
|
1537
1537
|
}
|
|
1538
|
-
function
|
|
1538
|
+
function ti({ chain: e, from: t = 1, filters: n = null, layer: r, hostView: i, addFilter: a, removeFilter: o, toggleFilter: c, setStagePropAt: l, palette: u, showMod: d }) {
|
|
1539
1539
|
let f = s(), p = [{
|
|
1540
1540
|
value: "",
|
|
1541
1541
|
label: "Add FX…"
|
|
@@ -1546,7 +1546,7 @@ function ii({ chain: e, from: t = 1, filters: n = null, layer: r, hostView: i, a
|
|
|
1546
1546
|
return /* @__PURE__ */ $(q, {
|
|
1547
1547
|
label: "Post-Processing",
|
|
1548
1548
|
divided: !0,
|
|
1549
|
-
children: [/* @__PURE__ */ Q(
|
|
1549
|
+
children: [/* @__PURE__ */ Q(ei, {
|
|
1550
1550
|
chain: e,
|
|
1551
1551
|
from: t,
|
|
1552
1552
|
layer: r,
|
|
@@ -1568,7 +1568,7 @@ function ii({ chain: e, from: t = 1, filters: n = null, layer: r, hostView: i, a
|
|
|
1568
1568
|
})]
|
|
1569
1569
|
});
|
|
1570
1570
|
}
|
|
1571
|
-
function
|
|
1571
|
+
function ni({ layer: e, showMod: t, tree: n }) {
|
|
1572
1572
|
let r = s(), [i, c] = Z("generate"), { updateLayer: l, palette: u } = o(), { setOnly: d } = W(), f = te(e.id, { history: "coalesce" }), m = N(e.loopGroup).find((t) => t.id === e.presetId), h = P(e.loopGroup), g = (n ?? we).find((t) => t.groups.includes(e.loopGroup)), _ = g?.labels?.[e.loopGroup] ?? h?.label ?? "", v = g && g.label !== _ ? `${g.label} / ${_}` : _, y = e.loopGroup === "paratype" && m?.sub === "Glyphs" ? ne("paratype", "Glyphs") : null, b = y ? y.map((e) => ({
|
|
1573
1573
|
value: e.id,
|
|
1574
1574
|
label: e.label
|
|
@@ -1578,10 +1578,10 @@ function ai({ layer: e, showMod: t, tree: n }) {
|
|
|
1578
1578
|
}, S = () => {
|
|
1579
1579
|
m && d(e.type, H(m, e.loopGroup));
|
|
1580
1580
|
};
|
|
1581
|
-
return
|
|
1581
|
+
return Ur(S, () => {
|
|
1582
1582
|
let t = U(e.loopId)?.params ?? [];
|
|
1583
1583
|
l(e.id, p(e, w(t, e), D(), { withFilters: !0 }));
|
|
1584
|
-
}), /* @__PURE__ */ $(
|
|
1584
|
+
}), /* @__PURE__ */ $(Yr, {
|
|
1585
1585
|
title: v,
|
|
1586
1586
|
chips: b,
|
|
1587
1587
|
active: e.presetId,
|
|
@@ -1593,12 +1593,12 @@ function ai({ layer: e, showMod: t, tree: n }) {
|
|
|
1593
1593
|
tone: "sunken",
|
|
1594
1594
|
value: i,
|
|
1595
1595
|
onChange: c,
|
|
1596
|
-
options: r === "sm" ?
|
|
1596
|
+
options: r === "sm" ? Gr : Kr,
|
|
1597
1597
|
size: r,
|
|
1598
1598
|
className: a(r)
|
|
1599
1599
|
}),
|
|
1600
1600
|
children: [
|
|
1601
|
-
i === "anim" && /* @__PURE__ */ Q(
|
|
1601
|
+
i === "anim" && /* @__PURE__ */ Q(Lr, {
|
|
1602
1602
|
schema: U(e.loopId)?.params ?? [],
|
|
1603
1603
|
layer: e,
|
|
1604
1604
|
setProp: f.setProp,
|
|
@@ -1621,17 +1621,17 @@ function ai({ layer: e, showMod: t, tree: n }) {
|
|
|
1621
1621
|
inline: !0,
|
|
1622
1622
|
onReset: S
|
|
1623
1623
|
}),
|
|
1624
|
-
i === "generate" && e.loopId === "scene3d" && e.primitive === "mesh" && /* @__PURE__ */ Q(
|
|
1624
|
+
i === "generate" && e.loopId === "scene3d" && e.primitive === "mesh" && /* @__PURE__ */ Q(Hr, {
|
|
1625
1625
|
layer: e,
|
|
1626
1626
|
setProp: f.setProp
|
|
1627
1627
|
}),
|
|
1628
|
-
i === "style" && /* @__PURE__ */ Q(
|
|
1628
|
+
i === "style" && /* @__PURE__ */ Q(Qr, {
|
|
1629
1629
|
layer: e,
|
|
1630
1630
|
edit: f,
|
|
1631
1631
|
palette: u,
|
|
1632
1632
|
showMod: t
|
|
1633
1633
|
}),
|
|
1634
|
-
i === "anim" && /* @__PURE__ */ Q(
|
|
1634
|
+
i === "anim" && /* @__PURE__ */ Q(Pr, {
|
|
1635
1635
|
schema: U(e.loopId)?.params ?? [],
|
|
1636
1636
|
layer: e,
|
|
1637
1637
|
setProp: f.setProp
|
|
@@ -1639,9 +1639,9 @@ function ai({ layer: e, showMod: t, tree: n }) {
|
|
|
1639
1639
|
]
|
|
1640
1640
|
});
|
|
1641
1641
|
}
|
|
1642
|
-
function
|
|
1642
|
+
function ri({ layer: e, showMod: t }) {
|
|
1643
1643
|
let n = s(), [r, i] = Z("generate"), { updateLayer: c, palette: l } = o(), { setOnly: u } = W(), d = te(e.id, { history: "coalesce" }), f = lt.find((t) => t.id === e.presetId), p = ct.find((e) => e.subs.includes(f?.sub))?.label ?? "Kinetic";
|
|
1644
|
-
return
|
|
1644
|
+
return Ur(() => {
|
|
1645
1645
|
f && u("kinetic", {
|
|
1646
1646
|
presetId: f.id,
|
|
1647
1647
|
presetLabel: f.label,
|
|
@@ -1655,13 +1655,13 @@ function oi({ layer: e, showMod: t }) {
|
|
|
1655
1655
|
comp: r,
|
|
1656
1656
|
_rollSeed: t
|
|
1657
1657
|
});
|
|
1658
|
-
}), /* @__PURE__ */ Q(
|
|
1658
|
+
}), /* @__PURE__ */ Q(Yr, {
|
|
1659
1659
|
title: p,
|
|
1660
1660
|
tabStrip: /* @__PURE__ */ Q(J, {
|
|
1661
1661
|
tone: "sunken",
|
|
1662
1662
|
value: r,
|
|
1663
1663
|
onChange: i,
|
|
1664
|
-
options: n === "sm" ?
|
|
1664
|
+
options: n === "sm" ? Gr : Kr,
|
|
1665
1665
|
size: n,
|
|
1666
1666
|
className: a(n)
|
|
1667
1667
|
}),
|
|
@@ -1680,37 +1680,37 @@ function oi({ layer: e, showMod: t }) {
|
|
|
1680
1680
|
})
|
|
1681
1681
|
});
|
|
1682
1682
|
}
|
|
1683
|
-
function
|
|
1683
|
+
function ii() {
|
|
1684
1684
|
let { layer: e } = W(), t = nt(), n = s(), r = it();
|
|
1685
1685
|
return Y(() => {
|
|
1686
1686
|
let e = (e) => {
|
|
1687
1687
|
e.key !== "m" && e.key !== "M" || e.metaKey || e.ctrlKey || e.altKey || zt(e) || rt();
|
|
1688
1688
|
};
|
|
1689
1689
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
1690
|
-
}, []), t.active ? /* @__PURE__ */ Q(
|
|
1690
|
+
}, []), t.active ? /* @__PURE__ */ Q(Yr, {
|
|
1691
1691
|
title: "Morph",
|
|
1692
|
-
children: /* @__PURE__ */ Q(
|
|
1692
|
+
children: /* @__PURE__ */ Q(Ar, {
|
|
1693
1693
|
layer: e,
|
|
1694
|
-
editTabs: n === "sm" ?
|
|
1694
|
+
editTabs: n === "sm" ? Gr : Kr
|
|
1695
1695
|
})
|
|
1696
|
-
}) : e ? e.type === "photo" ? /* @__PURE__ */ Q(
|
|
1696
|
+
}) : e ? e.type === "photo" ? /* @__PURE__ */ Q(Xr, {
|
|
1697
1697
|
layer: e,
|
|
1698
1698
|
showMod: r
|
|
1699
|
-
}, e.id) : e.type === "loop" ? /* @__PURE__ */ Q(
|
|
1699
|
+
}, e.id) : e.type === "loop" ? /* @__PURE__ */ Q(ni, {
|
|
1700
1700
|
layer: e,
|
|
1701
1701
|
showMod: r
|
|
1702
|
-
}, e.id) : e.type === "misc" ? /* @__PURE__ */ Q(
|
|
1702
|
+
}, e.id) : e.type === "misc" ? /* @__PURE__ */ Q(ni, {
|
|
1703
1703
|
layer: e,
|
|
1704
1704
|
showMod: r,
|
|
1705
1705
|
tree: fe
|
|
1706
|
-
}, e.id) : e.type === "kinetic" ? /* @__PURE__ */ Q(
|
|
1706
|
+
}, e.id) : e.type === "kinetic" ? /* @__PURE__ */ Q(ri, {
|
|
1707
1707
|
layer: e,
|
|
1708
1708
|
showMod: r
|
|
1709
1709
|
}, e.id) : /* @__PURE__ */ Q(j, { children: "This layer has no labs surface." }) : /* @__PURE__ */ Q(j, { children: "Pick an effect or generator from the nav." });
|
|
1710
1710
|
}
|
|
1711
1711
|
//#endregion
|
|
1712
1712
|
//#region src/editor/mobile/CategoryScreen.jsx
|
|
1713
|
-
function
|
|
1713
|
+
function ai(e) {
|
|
1714
1714
|
Y(() => {
|
|
1715
1715
|
let t = (t) => {
|
|
1716
1716
|
t.key === "Escape" && e?.();
|
|
@@ -1723,8 +1723,8 @@ function ci(e) {
|
|
|
1723
1723
|
};
|
|
1724
1724
|
}, []);
|
|
1725
1725
|
}
|
|
1726
|
-
function
|
|
1727
|
-
return
|
|
1726
|
+
function oi({ onPick: e, onInsert: t, onBack: n, onDismiss: r }) {
|
|
1727
|
+
return ai(r ?? n), /* @__PURE__ */ Q("div", {
|
|
1728
1728
|
className: "fixed inset-y-0 right-0 left-[var(--fxr-rail,0px)] kol-overlay-scrim flex flex-col items-center overflow-y-auto p-6",
|
|
1729
1729
|
style: { zIndex: "var(--kol-z-modal)" },
|
|
1730
1730
|
children: /* @__PURE__ */ $("div", {
|
|
@@ -1738,7 +1738,7 @@ function li({ onPick: e, onInsert: t, onBack: n, onDismiss: r }) {
|
|
|
1738
1738
|
/* @__PURE__ */ Q("div", {
|
|
1739
1739
|
className: "flex flex-col gap-2",
|
|
1740
1740
|
children: we.map((t) => {
|
|
1741
|
-
let n =
|
|
1741
|
+
let n = xr[`gen:${t.label}`] ?? "square";
|
|
1742
1742
|
return /* @__PURE__ */ Q(K, {
|
|
1743
1743
|
tone: "primary",
|
|
1744
1744
|
size: "lg",
|
|
@@ -1776,11 +1776,11 @@ function li({ onPick: e, onInsert: t, onBack: n, onDismiss: r }) {
|
|
|
1776
1776
|
}
|
|
1777
1777
|
//#endregion
|
|
1778
1778
|
//#region src/editor/labs/LabsSourcePicker.jsx
|
|
1779
|
-
var
|
|
1780
|
-
function
|
|
1779
|
+
var si = (e) => /\.svg$/i.test(e.key) || /svg/i.test(e.contentType || "");
|
|
1780
|
+
function ci(e) {
|
|
1781
1781
|
let { patch: t } = te(e.id), n = X(null), [r, i] = Z(!1), a = e.type === "loop" && e.loopGroup === "distress";
|
|
1782
1782
|
return {
|
|
1783
|
-
nodes: /* @__PURE__ */ $(
|
|
1783
|
+
nodes: /* @__PURE__ */ $(Yn, { children: [/* @__PURE__ */ Q("input", {
|
|
1784
1784
|
ref: n,
|
|
1785
1785
|
type: "file",
|
|
1786
1786
|
accept: a ? ".svg,image/svg+xml" : "image/*,video/*",
|
|
@@ -1808,7 +1808,7 @@ function di(e) {
|
|
|
1808
1808
|
}
|
|
1809
1809
|
}), /* @__PURE__ */ Q(Ft, {
|
|
1810
1810
|
open: r,
|
|
1811
|
-
accept: a ?
|
|
1811
|
+
accept: a ? si : ["image", "video"],
|
|
1812
1812
|
onClose: () => i(!1),
|
|
1813
1813
|
onSelect: (e, { contentType: n } = {}) => {
|
|
1814
1814
|
if (a) {
|
|
@@ -1846,8 +1846,8 @@ function di(e) {
|
|
|
1846
1846
|
label: "Camera"
|
|
1847
1847
|
}
|
|
1848
1848
|
].slice(0, 2);
|
|
1849
|
-
function
|
|
1850
|
-
let t =
|
|
1849
|
+
function li({ layer: e }) {
|
|
1850
|
+
let t = ci(e);
|
|
1851
1851
|
return /* @__PURE__ */ $("div", {
|
|
1852
1852
|
className: "flex flex-col gap-2",
|
|
1853
1853
|
children: [
|
|
@@ -1882,8 +1882,8 @@ function fi({ layer: e }) {
|
|
|
1882
1882
|
]
|
|
1883
1883
|
});
|
|
1884
1884
|
}
|
|
1885
|
-
function
|
|
1886
|
-
return
|
|
1885
|
+
function ui({ layer: e, title: t, onBack: n }) {
|
|
1886
|
+
return ai(n), /* @__PURE__ */ Q("div", {
|
|
1887
1887
|
className: "fixed inset-y-0 right-0 left-[var(--fxr-rail,0px)] kol-overlay-scrim flex flex-col items-center overflow-y-auto p-6",
|
|
1888
1888
|
style: { zIndex: "calc(var(--kol-z-sticky) - 2)" },
|
|
1889
1889
|
children: /* @__PURE__ */ $("div", {
|
|
@@ -1900,7 +1900,7 @@ function pi({ layer: e, title: t, onBack: n }) {
|
|
|
1900
1900
|
children: "Pick the media it works on."
|
|
1901
1901
|
})]
|
|
1902
1902
|
}),
|
|
1903
|
-
/* @__PURE__ */ Q(
|
|
1903
|
+
/* @__PURE__ */ Q(li, { layer: e }),
|
|
1904
1904
|
/* @__PURE__ */ Q(K, {
|
|
1905
1905
|
tone: "grey",
|
|
1906
1906
|
size: "lg",
|
|
@@ -1916,13 +1916,13 @@ function pi({ layer: e, title: t, onBack: n }) {
|
|
|
1916
1916
|
}
|
|
1917
1917
|
//#endregion
|
|
1918
1918
|
//#region src/editor/components/PanelHeader.jsx
|
|
1919
|
-
function
|
|
1919
|
+
function di({ title: e, onCollapse: t, action: n, className: r = "px-3" }) {
|
|
1920
1920
|
return /* @__PURE__ */ $("div", {
|
|
1921
1921
|
className: `flex w-full shrink-0 items-center ${r}`,
|
|
1922
1922
|
children: [/* @__PURE__ */ $("button", {
|
|
1923
1923
|
className: "kol-helper-12 text-meta flex flex-1 items-center gap-2 py-2.5",
|
|
1924
1924
|
onClick: t,
|
|
1925
|
-
children: [/* @__PURE__ */ Q("span", { children: e }), /* @__PURE__ */ Q(
|
|
1925
|
+
children: [/* @__PURE__ */ Q("span", { children: e }), /* @__PURE__ */ Q(Xn, {
|
|
1926
1926
|
name: "chevron-down",
|
|
1927
1927
|
size: 16,
|
|
1928
1928
|
className: "text-oq-48"
|
|
@@ -1930,7 +1930,7 @@ function mi({ title: e, onCollapse: t, action: n, className: r = "px-3" }) {
|
|
|
1930
1930
|
}), n]
|
|
1931
1931
|
});
|
|
1932
1932
|
}
|
|
1933
|
-
function
|
|
1933
|
+
function fi({ label: e, onOpen: t, size: n = "lg", tone: r = "primary", children: i }) {
|
|
1934
1934
|
return /* @__PURE__ */ $("div", {
|
|
1935
1935
|
className: "pointer-events-none fixed bottom-[max(0.75rem,env(safe-area-inset-bottom))] left-[var(--fxr-rail,0px)] right-0 z-10 flex flex-nowrap items-center gap-2 px-3 [&>*]:pointer-events-auto",
|
|
1936
1936
|
children: [/* @__PURE__ */ Q(K, {
|
|
@@ -1943,7 +1943,7 @@ function hi({ label: e, onOpen: t, size: n = "lg", tone: r = "primary", children
|
|
|
1943
1943
|
children: [/* @__PURE__ */ Q("span", {
|
|
1944
1944
|
className: "truncate",
|
|
1945
1945
|
children: e
|
|
1946
|
-
}), /* @__PURE__ */ Q(
|
|
1946
|
+
}), /* @__PURE__ */ Q(Xn, {
|
|
1947
1947
|
name: "chevron-down",
|
|
1948
1948
|
size: 16,
|
|
1949
1949
|
className: "rotate-180 shrink-0"
|
|
@@ -1952,13 +1952,13 @@ function hi({ label: e, onOpen: t, size: n = "lg", tone: r = "primary", children
|
|
|
1952
1952
|
}), i]
|
|
1953
1953
|
});
|
|
1954
1954
|
}
|
|
1955
|
-
var
|
|
1955
|
+
var pi = {
|
|
1956
1956
|
half: "50dvh",
|
|
1957
1957
|
tall: "85dvh"
|
|
1958
|
-
},
|
|
1959
|
-
function
|
|
1958
|
+
}, mi = 4;
|
|
1959
|
+
function hi({ tall: e, onToggle: t, onDrag: n, onResize: r, onResizeEnd: i }) {
|
|
1960
1960
|
let a = X(null);
|
|
1961
|
-
|
|
1961
|
+
Un(a, { axis: "x" });
|
|
1962
1962
|
let o = X({
|
|
1963
1963
|
y: null,
|
|
1964
1964
|
h0: 0,
|
|
@@ -1978,7 +1978,7 @@ function vi({ tall: e, onToggle: t, onDrag: n, onResize: r, onResizeEnd: i }) {
|
|
|
1978
1978
|
onPointerMove: (e) => {
|
|
1979
1979
|
if (o.y === null) return;
|
|
1980
1980
|
let t = e.clientY - o.y;
|
|
1981
|
-
Math.abs(t) >
|
|
1981
|
+
Math.abs(t) > mi && (o.moved = !0), o.moved && r && (o.last = o.h0 - t, r(o.last));
|
|
1982
1982
|
},
|
|
1983
1983
|
onPointerUp: (e) => {
|
|
1984
1984
|
if (o.y === null) return;
|
|
@@ -2000,10 +2000,10 @@ function vi({ tall: e, onToggle: t, onDrag: n, onResize: r, onResizeEnd: i }) {
|
|
|
2000
2000
|
}
|
|
2001
2001
|
//#endregion
|
|
2002
2002
|
//#region src/editor/labs/LabsCatalogCard.jsx
|
|
2003
|
-
var
|
|
2004
|
-
function
|
|
2003
|
+
var gi = new Set(["#rail/sec:effects"]);
|
|
2004
|
+
function _i({ onPicked: e, onClose: t, initialOpen: n = null, hasMedia: r = !0, onNeedMedia: i }) {
|
|
2005
2005
|
let { items: a, dispatch: o } = Dn(), [s, c] = Z(n);
|
|
2006
|
-
|
|
2006
|
+
ai(t);
|
|
2007
2007
|
let l = a.find((e) => e.path === s) ?? null, u = l ? l.sub : a;
|
|
2008
2008
|
return /* @__PURE__ */ Q("div", {
|
|
2009
2009
|
className: "fixed bottom-0 top-12 md:top-0 right-0 left-[var(--fxr-rail,0px)] kol-overlay-scrim flex flex-col items-center overflow-y-auto p-6",
|
|
@@ -2026,7 +2026,7 @@ function bi({ onPicked: e, onClose: t, initialOpen: n = null, hasMedia: r = !0,
|
|
|
2026
2026
|
iconLeft: t.icon,
|
|
2027
2027
|
iconRight: t.icon,
|
|
2028
2028
|
onClick: () => {
|
|
2029
|
-
if (!l &&
|
|
2029
|
+
if (!l && gi.has(t.path) && !r && i) {
|
|
2030
2030
|
i(t.path);
|
|
2031
2031
|
return;
|
|
2032
2032
|
}
|
|
@@ -2052,7 +2052,7 @@ function bi({ onPicked: e, onClose: t, initialOpen: n = null, hasMedia: r = !0,
|
|
|
2052
2052
|
}
|
|
2053
2053
|
//#endregion
|
|
2054
2054
|
//#region src/editor/labs/sheetLabels.js
|
|
2055
|
-
function
|
|
2055
|
+
function vi(e) {
|
|
2056
2056
|
if (Ze().active) return {
|
|
2057
2057
|
title: "Morph",
|
|
2058
2058
|
pill: "Morph"
|
|
@@ -2080,14 +2080,14 @@ function xi(e) {
|
|
|
2080
2080
|
}
|
|
2081
2081
|
//#endregion
|
|
2082
2082
|
//#region src/editor/labs/LabsView.jsx
|
|
2083
|
-
var
|
|
2083
|
+
var yi = .85, bi = .3, xi = 2.5, Si = {
|
|
2084
2084
|
0: 1,
|
|
2085
2085
|
1: .5,
|
|
2086
2086
|
2: 1,
|
|
2087
2087
|
3: 1.5,
|
|
2088
2088
|
4: 2
|
|
2089
|
-
},
|
|
2090
|
-
function
|
|
2089
|
+
}, Ci = "px-2 py-1 rounded border border-oq-08 bg-surface-secondary kol-mono-12 text-emphasis tabular-nums";
|
|
2090
|
+
function wi() {
|
|
2091
2091
|
let { layer: e } = W(), { removeLayer: t, layers: n, updateLayer: r, beginTransaction: i, commitTransaction: a, select: s } = o(), [c, l] = Z(null);
|
|
2092
2092
|
Y(() => {
|
|
2093
2093
|
let e = (e) => {
|
|
@@ -2107,7 +2107,7 @@ function Di() {
|
|
|
2107
2107
|
c,
|
|
2108
2108
|
s
|
|
2109
2109
|
]);
|
|
2110
|
-
let u = c && n.find((e) => e.id === c.id && e.type === "kinetic"), d = e?.type === "photo" && !e.src && e.srcType !== "webcam", [f, p] = Z(1), [m, h] = Z(!1), g = vt(m), _ = X(null), v = (e) => Math.min(
|
|
2110
|
+
let u = c && n.find((e) => e.id === c.id && e.type === "kinetic"), d = e?.type === "photo" && !e.src && e.srcType !== "webcam", [f, p] = Z(1), [m, h] = Z(!1), g = vt(m), _ = X(null), v = (e) => Math.min(xi, Math.max(bi, e)), y = (e) => p((t) => v(t * (e > 0 ? 1.25 : .8))), { tool: b } = Nt(), x = b === "orbit", C = X(x);
|
|
2111
2111
|
C.current = x, Y(() => {
|
|
2112
2112
|
let e = _.current;
|
|
2113
2113
|
if (!e) return;
|
|
@@ -2122,7 +2122,7 @@ function Di() {
|
|
|
2122
2122
|
h((e) => !e);
|
|
2123
2123
|
return;
|
|
2124
2124
|
}
|
|
2125
|
-
if (!(S().zoomLock && (e.key === "-" || e.key === "_" || e.key === "+" || e.key === "=" ||
|
|
2125
|
+
if (!(S().zoomLock && (e.key === "-" || e.key === "_" || e.key === "+" || e.key === "=" || Si[e.key] !== void 0))) {
|
|
2126
2126
|
if (e.key === "-" || e.key === "_") {
|
|
2127
2127
|
y(-1);
|
|
2128
2128
|
return;
|
|
@@ -2131,7 +2131,7 @@ function Di() {
|
|
|
2131
2131
|
y(1);
|
|
2132
2132
|
return;
|
|
2133
2133
|
}
|
|
2134
|
-
|
|
2134
|
+
Si[e.key] !== void 0 && p(Si[e.key]);
|
|
2135
2135
|
}
|
|
2136
2136
|
}
|
|
2137
2137
|
};
|
|
@@ -2211,8 +2211,8 @@ function Di() {
|
|
|
2211
2211
|
/* @__PURE__ */ Q("div", {
|
|
2212
2212
|
style: {
|
|
2213
2213
|
flex: "none",
|
|
2214
|
-
width: `${f *
|
|
2215
|
-
height: `${f *
|
|
2214
|
+
width: `${f * yi * 100}%`,
|
|
2215
|
+
height: `${f * yi * 100}%`,
|
|
2216
2216
|
transform: `translate(${w.x}px, ${w.y}px)`
|
|
2217
2217
|
},
|
|
2218
2218
|
children: /* @__PURE__ */ Q(Xt, { overlay: u ? (e) => /* @__PURE__ */ Q(jt, {
|
|
@@ -2225,17 +2225,17 @@ function Di() {
|
|
|
2225
2225
|
onExit: () => l(null)
|
|
2226
2226
|
}) : void 0 })
|
|
2227
2227
|
}),
|
|
2228
|
-
d && /* @__PURE__ */ Q(
|
|
2228
|
+
d && /* @__PURE__ */ Q(ui, {
|
|
2229
2229
|
layer: e,
|
|
2230
|
-
title:
|
|
2230
|
+
title: vi(e).title,
|
|
2231
2231
|
onBack: () => t(e.id)
|
|
2232
2232
|
}),
|
|
2233
2233
|
m && /* @__PURE__ */ Q("div", {
|
|
2234
2234
|
className: "absolute bottom-3 right-3 z-[var(--kol-z-base)] flex items-center gap-2 [@media(pointer:coarse)]:bottom-1",
|
|
2235
|
-
children: /* @__PURE__ */ Q(
|
|
2235
|
+
children: /* @__PURE__ */ Q(Hn, {
|
|
2236
2236
|
label: "Framerate — press F to hide",
|
|
2237
2237
|
children: /* @__PURE__ */ $("span", {
|
|
2238
|
-
className:
|
|
2238
|
+
className: Ci,
|
|
2239
2239
|
children: [g, " fps"]
|
|
2240
2240
|
})
|
|
2241
2241
|
})
|
|
@@ -2243,8 +2243,8 @@ function Di() {
|
|
|
2243
2243
|
]
|
|
2244
2244
|
});
|
|
2245
2245
|
}
|
|
2246
|
-
function
|
|
2247
|
-
let e = X(null), { grabProps: t } =
|
|
2246
|
+
function Ti() {
|
|
2247
|
+
let e = X(null), { grabProps: t } = nr(e, {
|
|
2248
2248
|
token: "kol-rail",
|
|
2249
2249
|
side: "right"
|
|
2250
2250
|
});
|
|
@@ -2290,14 +2290,14 @@ function Oi() {
|
|
|
2290
2290
|
className: "kol-compose-rail kol-compose-rail--inspector",
|
|
2291
2291
|
children: [/* @__PURE__ */ Q("div", { ...t }), /* @__PURE__ */ Q("div", {
|
|
2292
2292
|
className: "kol-compose-inspector-body",
|
|
2293
|
-
children: /* @__PURE__ */ Q(
|
|
2293
|
+
children: /* @__PURE__ */ Q(ii, {})
|
|
2294
2294
|
})]
|
|
2295
2295
|
});
|
|
2296
2296
|
}
|
|
2297
|
-
var
|
|
2298
|
-
function
|
|
2299
|
-
let { tall: e, setTall: t, collapseParams: n, setSheetPx: r } =
|
|
2300
|
-
return /* @__PURE__ */ Q(
|
|
2297
|
+
var Ei = Kn(null);
|
|
2298
|
+
function Di() {
|
|
2299
|
+
let { tall: e, setTall: t, collapseParams: n, setSheetPx: r } = qn(Ei);
|
|
2300
|
+
return /* @__PURE__ */ Q(hi, {
|
|
2301
2301
|
tall: e,
|
|
2302
2302
|
onToggle: () => {
|
|
2303
2303
|
r(null), t((e) => !e);
|
|
@@ -2308,14 +2308,14 @@ function Ai() {
|
|
|
2308
2308
|
}
|
|
2309
2309
|
});
|
|
2310
2310
|
}
|
|
2311
|
-
var
|
|
2311
|
+
var Oi = [
|
|
2312
2312
|
2,
|
|
2313
2313
|
4,
|
|
2314
2314
|
8,
|
|
2315
2315
|
12,
|
|
2316
2316
|
16
|
|
2317
2317
|
];
|
|
2318
|
-
function
|
|
2318
|
+
function ki({ paramsOpen: e, setParamsOpen: t, catalog: n, toggleCatalog: r, railHeight: i }) {
|
|
2319
2319
|
let { playing: a, loopSeconds: o, play: s, pause: c, stop: l, rewind: u, setLoopSeconds: d } = C(), [f, p] = Z(!0), m = [
|
|
2320
2320
|
{
|
|
2321
2321
|
icon: "home-01",
|
|
@@ -2390,14 +2390,14 @@ function Mi({ paramsOpen: e, setParamsOpen: t, catalog: n, toggleCatalog: r, rai
|
|
|
2390
2390
|
onPress: u
|
|
2391
2391
|
}
|
|
2392
2392
|
],
|
|
2393
|
-
sheetFor: { loop:
|
|
2393
|
+
sheetFor: { loop: Oi.map((e) => ({
|
|
2394
2394
|
label: `${e} s`,
|
|
2395
2395
|
checked: o === e,
|
|
2396
2396
|
onPress: () => d(e)
|
|
2397
2397
|
})) }
|
|
2398
2398
|
} : void 0;
|
|
2399
2399
|
return Y(() => {
|
|
2400
|
-
|
|
2400
|
+
cr({
|
|
2401
2401
|
items: m,
|
|
2402
2402
|
actions: h,
|
|
2403
2403
|
transport: g,
|
|
@@ -2411,20 +2411,20 @@ function Mi({ paramsOpen: e, setParamsOpen: t, catalog: n, toggleCatalog: r, rai
|
|
|
2411
2411
|
a,
|
|
2412
2412
|
o,
|
|
2413
2413
|
i
|
|
2414
|
-
]), Y(() => () =>
|
|
2414
|
+
]), Y(() => () => cr(null), []), null;
|
|
2415
2415
|
}
|
|
2416
|
-
function
|
|
2416
|
+
function Ai() {
|
|
2417
2417
|
return /* @__PURE__ */ Q("div", {
|
|
2418
2418
|
className: "kol-compose-rail kol-compose-rail--inspector",
|
|
2419
2419
|
children: /* @__PURE__ */ Q("div", {
|
|
2420
2420
|
className: "kol-compose-inspector-body",
|
|
2421
|
-
children: /* @__PURE__ */ Q(
|
|
2421
|
+
children: /* @__PURE__ */ Q(ii, {})
|
|
2422
2422
|
})
|
|
2423
2423
|
});
|
|
2424
2424
|
}
|
|
2425
|
-
var
|
|
2425
|
+
var ji = {
|
|
2426
2426
|
topbar: () => null,
|
|
2427
|
-
canvas:
|
|
2427
|
+
canvas: wi,
|
|
2428
2428
|
panels: [
|
|
2429
2429
|
{
|
|
2430
2430
|
slot: "canvas.footer",
|
|
@@ -2434,7 +2434,7 @@ var Pi = {
|
|
|
2434
2434
|
{
|
|
2435
2435
|
slot: "right.body",
|
|
2436
2436
|
order: 0,
|
|
2437
|
-
Component:
|
|
2437
|
+
Component: Ti
|
|
2438
2438
|
},
|
|
2439
2439
|
{
|
|
2440
2440
|
slot: "right.footer",
|
|
@@ -2442,23 +2442,23 @@ var Pi = {
|
|
|
2442
2442
|
Component: qt
|
|
2443
2443
|
}
|
|
2444
2444
|
]
|
|
2445
|
-
},
|
|
2446
|
-
...
|
|
2445
|
+
}, Mi = {
|
|
2446
|
+
...ji,
|
|
2447
2447
|
panels: [{
|
|
2448
2448
|
slot: "right.header",
|
|
2449
2449
|
order: 0,
|
|
2450
|
-
Component:
|
|
2451
|
-
}, ...
|
|
2450
|
+
Component: Di
|
|
2451
|
+
}, ...ji.panels.map((e) => e.Component === Ti ? {
|
|
2452
2452
|
...e,
|
|
2453
|
-
Component:
|
|
2453
|
+
Component: Ai
|
|
2454
2454
|
} : e)]
|
|
2455
2455
|
};
|
|
2456
|
-
function
|
|
2456
|
+
function Ni() {
|
|
2457
2457
|
let { setAspect: t, selectedId: n, select: r } = o(), { layer: i, setOnly: a } = W(), s = X(!1), c = Kt(gt), d = hn() && !wn() || c;
|
|
2458
2458
|
Y(() => {
|
|
2459
2459
|
d && document.documentElement.removeAttribute("data-rail");
|
|
2460
2460
|
}, [d]);
|
|
2461
|
-
let [f, p] = Z(!0), [m, h] = Z(!1), [g, _] = Z(null), v = g ? `${g}px` : m ?
|
|
2461
|
+
let [f, p] = Z(!0), [m, h] = Z(!1), [g, _] = Z(null), v = g ? `${g}px` : m ? pi.tall : pi.half, y = { "--kol-sheet-h": v }, b = lr(), x = nt(), [C, w] = Z(() => !i);
|
|
2462
2462
|
Y(() => {
|
|
2463
2463
|
w(!i);
|
|
2464
2464
|
}, [i?.id]);
|
|
@@ -2576,8 +2576,8 @@ function Ii() {
|
|
|
2576
2576
|
"data-empty": i || x.active ? void 0 : "",
|
|
2577
2577
|
style: y,
|
|
2578
2578
|
children: [
|
|
2579
|
-
/* @__PURE__ */ Q(
|
|
2580
|
-
d ? /* @__PURE__ */ $(
|
|
2579
|
+
/* @__PURE__ */ Q(Dr, {}),
|
|
2580
|
+
d ? /* @__PURE__ */ $(Ei.Provider, {
|
|
2581
2581
|
value: {
|
|
2582
2582
|
collapseParams: () => p(!1),
|
|
2583
2583
|
tall: m,
|
|
@@ -2589,8 +2589,8 @@ function Ii() {
|
|
|
2589
2589
|
children: [/* @__PURE__ */ Q(u.Provider, {
|
|
2590
2590
|
value: "md",
|
|
2591
2591
|
children: /* @__PURE__ */ Q(_t, {
|
|
2592
|
-
registry:
|
|
2593
|
-
rightIn: (e) => b ?
|
|
2592
|
+
registry: Mi,
|
|
2593
|
+
rightIn: (e) => b ? ir(/* @__PURE__ */ Q("div", {
|
|
2594
2594
|
className: "kol-editor-labs flex flex-col h-full",
|
|
2595
2595
|
"data-touch": "",
|
|
2596
2596
|
"data-params": "open",
|
|
@@ -2598,15 +2598,15 @@ function Ii() {
|
|
|
2598
2598
|
children: e
|
|
2599
2599
|
}), b) : null
|
|
2600
2600
|
})
|
|
2601
|
-
}), /* @__PURE__ */ Q(
|
|
2601
|
+
}), /* @__PURE__ */ Q(ki, {
|
|
2602
2602
|
paramsOpen: f,
|
|
2603
2603
|
setParamsOpen: p,
|
|
2604
2604
|
catalog: C,
|
|
2605
2605
|
toggleCatalog: () => w((e) => !e),
|
|
2606
2606
|
railHeight: v
|
|
2607
2607
|
})]
|
|
2608
|
-
}) : /* @__PURE__ */ Q(_t, { registry:
|
|
2609
|
-
C && !x.picker && !(x.active && !i) && /* @__PURE__ */ Q(
|
|
2608
|
+
}) : /* @__PURE__ */ Q(_t, { registry: ji }),
|
|
2609
|
+
C && !x.picker && !(x.active && !i) && /* @__PURE__ */ Q(_i, {
|
|
2610
2610
|
initialOpen: T,
|
|
2611
2611
|
hasMedia: D,
|
|
2612
2612
|
onNeedMedia: (e) => {
|
|
@@ -2625,8 +2625,8 @@ function Ii() {
|
|
|
2625
2625
|
]
|
|
2626
2626
|
});
|
|
2627
2627
|
}
|
|
2628
|
-
var
|
|
2629
|
-
function
|
|
2628
|
+
var Pi = "kol.editor.labs-draft";
|
|
2629
|
+
function Fi() {
|
|
2630
2630
|
let e = /\/morph\/?$/.test(typeof window > "u" ? "" : window.location.pathname);
|
|
2631
2631
|
return Y(() => (G(e ? { active: !0 } : {
|
|
2632
2632
|
active: !1,
|
|
@@ -2635,9 +2635,9 @@ function Ri() {
|
|
|
2635
2635
|
active: !1,
|
|
2636
2636
|
editing: null
|
|
2637
2637
|
})), [e]), /* @__PURE__ */ $(fn, {
|
|
2638
|
-
draftKey:
|
|
2638
|
+
draftKey: Pi,
|
|
2639
2639
|
children: [
|
|
2640
|
-
/* @__PURE__ */ Q(
|
|
2640
|
+
/* @__PURE__ */ Q(Ni, {}),
|
|
2641
2641
|
/* @__PURE__ */ Q(St, {}),
|
|
2642
2642
|
/* @__PURE__ */ Q(ve, {})
|
|
2643
2643
|
]
|
|
@@ -2645,9 +2645,9 @@ function Ri() {
|
|
|
2645
2645
|
}
|
|
2646
2646
|
//#endregion
|
|
2647
2647
|
//#region src/editor/mobile/EffectScreen.jsx
|
|
2648
|
-
function
|
|
2648
|
+
function Ii({ layer: e, chain: t, onPick: n, onBack: r }) {
|
|
2649
2649
|
let [i, a] = Z(null);
|
|
2650
|
-
|
|
2650
|
+
ai(r);
|
|
2651
2651
|
let { engineHost: o } = ie(e), s = o && !t.some((e) => e.def?.kind === "engine"), c = F(L.filter((e) => e.kind !== "engine" || s)), l = c.find((e) => e.id === i) ?? null;
|
|
2652
2652
|
return /* @__PURE__ */ Q("div", {
|
|
2653
2653
|
className: "fixed inset-y-0 right-0 left-[var(--fxr-rail,0px)] kol-overlay-scrim flex flex-col items-center overflow-y-auto p-6",
|
|
@@ -2687,7 +2687,7 @@ function zi({ layer: e, chain: t, onPick: n, onBack: r }) {
|
|
|
2687
2687
|
}
|
|
2688
2688
|
//#endregion
|
|
2689
2689
|
//#region src/editor/mobile/MobileOverlay.jsx
|
|
2690
|
-
var
|
|
2690
|
+
var Li = { background: "var(--kol-surface-primary)" }, Ri = [
|
|
2691
2691
|
{
|
|
2692
2692
|
value: "generate",
|
|
2693
2693
|
label: "Generate"
|
|
@@ -2704,29 +2704,29 @@ var Bi = { background: "var(--kol-surface-primary)" }, Vi = [
|
|
|
2704
2704
|
value: "output",
|
|
2705
2705
|
label: "Output"
|
|
2706
2706
|
}
|
|
2707
|
-
],
|
|
2707
|
+
], zi = Ri.filter((e) => e.value !== "generate"), Bi = "[&_.kol-seg-cell]:min-w-0 [&_.kol-seg-cell]:px-1 [&_.kol-seg-cell]:overflow-hidden [@media(hover:none)]:[&_.kol-seg-cell:hover]:text-[var(--kol-oq-48)]", Vi = {
|
|
2708
2708
|
lg: 9.6,
|
|
2709
2709
|
sm: 7.2
|
|
2710
|
-
},
|
|
2711
|
-
function
|
|
2712
|
-
let n = t === "sm" ?
|
|
2710
|
+
}, Hi = 10, Ui = 232;
|
|
2711
|
+
function Wi(e, t) {
|
|
2712
|
+
let n = t === "sm" ? Ui : Math.min(window.innerWidth, 480) - 24, r = [], i = [], a = 0;
|
|
2713
2713
|
for (let o of e) {
|
|
2714
|
-
let e = o.label.length *
|
|
2714
|
+
let e = o.label.length * Vi[t] + Hi, s = Math.max(a, e);
|
|
2715
2715
|
i.length && (i.length + 1) * s > n ? (r.push(i), i = [o], a = e) : (i.push(o), a = s);
|
|
2716
2716
|
}
|
|
2717
2717
|
return i.length && r.push(i), r;
|
|
2718
2718
|
}
|
|
2719
|
-
function
|
|
2720
|
-
return
|
|
2719
|
+
function Gi({ cells: e, size: t }) {
|
|
2720
|
+
return Wi(e, t).map((e, n) => /* @__PURE__ */ Q(J, {
|
|
2721
2721
|
value: null,
|
|
2722
2722
|
onChange: (t) => e.find((e) => e.value === t)?.run(),
|
|
2723
2723
|
options: e,
|
|
2724
2724
|
size: t,
|
|
2725
2725
|
ariaLabel: "Randomize scope",
|
|
2726
|
-
className:
|
|
2726
|
+
className: Bi
|
|
2727
2727
|
}, n));
|
|
2728
2728
|
}
|
|
2729
|
-
var
|
|
2729
|
+
var Ki = [
|
|
2730
2730
|
2,
|
|
2731
2731
|
4,
|
|
2732
2732
|
8,
|
|
@@ -2735,17 +2735,17 @@ var Yi = [
|
|
|
2735
2735
|
value: String(e),
|
|
2736
2736
|
label: `${e}s`
|
|
2737
2737
|
}));
|
|
2738
|
-
function
|
|
2738
|
+
function qi({ size: e }) {
|
|
2739
2739
|
let { loopSeconds: t, setLoopSeconds: n } = C();
|
|
2740
2740
|
return /* @__PURE__ */ Q(J, {
|
|
2741
2741
|
value: String(t),
|
|
2742
2742
|
onChange: (e) => n(Number(e)),
|
|
2743
|
-
options:
|
|
2743
|
+
options: Ki,
|
|
2744
2744
|
size: e,
|
|
2745
2745
|
ariaLabel: "Loop length"
|
|
2746
2746
|
});
|
|
2747
2747
|
}
|
|
2748
|
-
var
|
|
2748
|
+
var Ji = [
|
|
2749
2749
|
{
|
|
2750
2750
|
value: "9:16",
|
|
2751
2751
|
label: "9:16"
|
|
@@ -2762,7 +2762,7 @@ var Zi = [
|
|
|
2762
2762
|
value: "1:1",
|
|
2763
2763
|
label: "1:1"
|
|
2764
2764
|
}
|
|
2765
|
-
],
|
|
2765
|
+
], Yi = [
|
|
2766
2766
|
{
|
|
2767
2767
|
value: "5:4",
|
|
2768
2768
|
label: "5:4"
|
|
@@ -2780,20 +2780,20 @@ var Zi = [
|
|
|
2780
2780
|
label: "Fill"
|
|
2781
2781
|
}
|
|
2782
2782
|
];
|
|
2783
|
-
function
|
|
2783
|
+
function Xi({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectValue: a, onAspect: s, openEffects: c = !1, rail: l = !1, onRail: u, onSheet: d }) {
|
|
2784
2784
|
let f = nt(), { updateLayer: h, addFilter: _, removeFilter: v } = o(), { onExportPng: b } = Et(), [x, S] = Z(!1), [C, T] = Z(!0), [D, k] = Z(!1), [A, j] = Z(!1), [te, M] = Z("generate"), [ne, F] = Z(!1), [I, re] = Z(!1), { aspect: L } = o(), [R, ae] = Z(null), z = m(e);
|
|
2785
2785
|
Y(() => {
|
|
2786
2786
|
c && (T(!0), j(!0));
|
|
2787
2787
|
}, [c]);
|
|
2788
2788
|
let B = l ? "sm" : "lg", oe = l && !!e && C && !x;
|
|
2789
2789
|
Y(() => (u?.(oe), () => u?.(!1)), [oe]);
|
|
2790
|
-
let se = !l && e && C && !x ? R ? `${R}px` : ne ?
|
|
2790
|
+
let se = !l && e && C && !x ? R ? `${R}px` : ne ? pi.tall : pi.half : null;
|
|
2791
2791
|
Y(() => (d?.(se), () => d?.(null)), [se]);
|
|
2792
2792
|
let ce = () => {
|
|
2793
2793
|
let t = e?.type === "loop" && N(e.loopGroup).find((t) => t.id === e.presetId);
|
|
2794
2794
|
t && h(e.id, H(t, e.loopGroup));
|
|
2795
2795
|
};
|
|
2796
|
-
if (
|
|
2796
|
+
if (Ur(ce, () => {
|
|
2797
2797
|
e?.type === "loop" && h(e.id, p(e, w(U(e.loopId)?.params ?? [], e), z.take(), { withFilters: !0 }));
|
|
2798
2798
|
}), !e) return null;
|
|
2799
2799
|
if (x) return /* @__PURE__ */ Q("button", {
|
|
@@ -2808,12 +2808,12 @@ function $i({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
|
|
|
2808
2808
|
let t = ee(e, z.take());
|
|
2809
2809
|
t && h(e.id, { filters: t });
|
|
2810
2810
|
};
|
|
2811
|
-
if (!C) return /* @__PURE__ */ $(
|
|
2811
|
+
if (!C) return /* @__PURE__ */ $(fi, {
|
|
2812
2812
|
label: V ? e.presetLabel : "Media",
|
|
2813
2813
|
onOpen: () => T(!0),
|
|
2814
2814
|
size: B,
|
|
2815
2815
|
children: [
|
|
2816
|
-
(V || he.length > 0) && /* @__PURE__ */ Q(
|
|
2816
|
+
(V || he.length > 0) && /* @__PURE__ */ Q(Hn, {
|
|
2817
2817
|
label: "Randomize all",
|
|
2818
2818
|
children: /* @__PURE__ */ Q(K, {
|
|
2819
2819
|
tone: "primary",
|
|
@@ -2824,7 +2824,7 @@ function $i({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
|
|
|
2824
2824
|
className: "shrink-0"
|
|
2825
2825
|
})
|
|
2826
2826
|
}),
|
|
2827
|
-
/* @__PURE__ */ Q(
|
|
2827
|
+
/* @__PURE__ */ Q(Hn, {
|
|
2828
2828
|
label: "Download",
|
|
2829
2829
|
children: /* @__PURE__ */ Q(K, {
|
|
2830
2830
|
tone: "primary",
|
|
@@ -2835,7 +2835,7 @@ function $i({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
|
|
|
2835
2835
|
className: "shrink-0"
|
|
2836
2836
|
})
|
|
2837
2837
|
}),
|
|
2838
|
-
/* @__PURE__ */ Q(
|
|
2838
|
+
/* @__PURE__ */ Q(Hn, {
|
|
2839
2839
|
label: "Hide UI",
|
|
2840
2840
|
children: /* @__PURE__ */ Q(K, {
|
|
2841
2841
|
tone: "primary",
|
|
@@ -2846,7 +2846,7 @@ function $i({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
|
|
|
2846
2846
|
className: "shrink-0"
|
|
2847
2847
|
})
|
|
2848
2848
|
}),
|
|
2849
|
-
/* @__PURE__ */ Q(
|
|
2849
|
+
/* @__PURE__ */ Q(Hn, {
|
|
2850
2850
|
label: a === "fill" ? "Back to the frame" : "Fill the screen",
|
|
2851
2851
|
children: /* @__PURE__ */ Q(K, {
|
|
2852
2852
|
tone: "primary",
|
|
@@ -2860,11 +2860,11 @@ function $i({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
|
|
|
2860
2860
|
})
|
|
2861
2861
|
]
|
|
2862
2862
|
});
|
|
2863
|
-
let ve = [...V ?
|
|
2863
|
+
let ve = [...V ? Ri : zi, ...V && f.steps.length >= 2 ? [{
|
|
2864
2864
|
value: "morph",
|
|
2865
2865
|
label: "Morph"
|
|
2866
2866
|
}] : []].filter((e) => (e.value !== "effects" || ge) && (e.value !== "transport" || n("motion"))), ye = ve.some((e) => e.value === te) ? te : ve[0].value;
|
|
2867
|
-
return /* @__PURE__ */ $(
|
|
2867
|
+
return /* @__PURE__ */ $(Yn, { children: [
|
|
2868
2868
|
/* @__PURE__ */ Q(pe, {
|
|
2869
2869
|
open: I,
|
|
2870
2870
|
onClose: () => re(!1),
|
|
@@ -2872,7 +2872,7 @@ function $i({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
|
|
|
2872
2872
|
layer: e,
|
|
2873
2873
|
size: B
|
|
2874
2874
|
}),
|
|
2875
|
-
D && /* @__PURE__ */ Q(
|
|
2875
|
+
D && /* @__PURE__ */ Q(oi, {
|
|
2876
2876
|
onPick: (e) => {
|
|
2877
2877
|
t(e), k(!1);
|
|
2878
2878
|
},
|
|
@@ -2884,7 +2884,7 @@ function $i({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
|
|
|
2884
2884
|
},
|
|
2885
2885
|
onDismiss: () => k(!1)
|
|
2886
2886
|
}),
|
|
2887
|
-
A && /* @__PURE__ */ Q(
|
|
2887
|
+
A && /* @__PURE__ */ Q(Ii, {
|
|
2888
2888
|
layer: e,
|
|
2889
2889
|
chain: he,
|
|
2890
2890
|
onPick: (t) => {
|
|
@@ -2894,12 +2894,12 @@ function $i({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
|
|
|
2894
2894
|
}),
|
|
2895
2895
|
/* @__PURE__ */ $("div", {
|
|
2896
2896
|
className: l ? "fixed top-0 right-0 bottom-0 z-10 flex w-[var(--kol-sidenav-w,320px)] flex-col overflow-y-auto border-l border-oq-08" : "fixed right-0 left-[var(--fxr-rail,0px)] bottom-0 z-10 flex flex-col pb-[env(safe-area-inset-bottom)]",
|
|
2897
|
-
style: l ?
|
|
2898
|
-
...
|
|
2899
|
-
top: `calc(100dvh - ${se ??
|
|
2897
|
+
style: l ? Li : {
|
|
2898
|
+
...Li,
|
|
2899
|
+
top: `calc(100dvh - ${se ?? pi.half})`
|
|
2900
2900
|
},
|
|
2901
2901
|
children: [
|
|
2902
|
-
!l && /* @__PURE__ */ Q(
|
|
2902
|
+
!l && /* @__PURE__ */ Q(hi, {
|
|
2903
2903
|
tall: ne,
|
|
2904
2904
|
onToggle: () => {
|
|
2905
2905
|
ae(null), F((e) => !e);
|
|
@@ -2909,7 +2909,7 @@ function $i({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
|
|
|
2909
2909
|
e < 96 && (ae(null), T(!1));
|
|
2910
2910
|
}
|
|
2911
2911
|
}),
|
|
2912
|
-
/* @__PURE__ */ Q(
|
|
2912
|
+
/* @__PURE__ */ Q(di, {
|
|
2913
2913
|
title: le,
|
|
2914
2914
|
onCollapse: () => T(!1),
|
|
2915
2915
|
className: l ? "px-4 pt-2.5 pb-1.5" : "px-3",
|
|
@@ -2929,9 +2929,9 @@ function $i({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
|
|
|
2929
2929
|
onChange: M,
|
|
2930
2930
|
options: ve,
|
|
2931
2931
|
size: B,
|
|
2932
|
-
className: l ?
|
|
2932
|
+
className: l ? Bi : "[&_.kol-seg-cell]:min-w-0 [&_.kol-seg-cell]:px-2 [&_.kol-seg-cell]:overflow-hidden"
|
|
2933
2933
|
}),
|
|
2934
|
-
ye === "morph" && V && /* @__PURE__ */ Q(
|
|
2934
|
+
ye === "morph" && V && /* @__PURE__ */ Q(Ar, {
|
|
2935
2935
|
layer: e,
|
|
2936
2936
|
readOnly: !0
|
|
2937
2937
|
}),
|
|
@@ -2963,7 +2963,7 @@ function $i({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
|
|
|
2963
2963
|
onClick: W,
|
|
2964
2964
|
children: "Randomize all"
|
|
2965
2965
|
}),
|
|
2966
|
-
/* @__PURE__ */ Q(
|
|
2966
|
+
/* @__PURE__ */ Q(Hn, {
|
|
2967
2967
|
label: "What Randomize all rolls",
|
|
2968
2968
|
children: /* @__PURE__ */ Q(K, {
|
|
2969
2969
|
tone: "primary",
|
|
@@ -2974,7 +2974,7 @@ function $i({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
|
|
|
2974
2974
|
className: "shrink-0"
|
|
2975
2975
|
})
|
|
2976
2976
|
}),
|
|
2977
|
-
/* @__PURE__ */ Q(
|
|
2977
|
+
/* @__PURE__ */ Q(Hn, {
|
|
2978
2978
|
label: "Reset to defaults",
|
|
2979
2979
|
shortcut: "R",
|
|
2980
2980
|
children: /* @__PURE__ */ Q(K, {
|
|
@@ -2988,7 +2988,7 @@ function $i({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
|
|
|
2988
2988
|
})
|
|
2989
2989
|
]
|
|
2990
2990
|
}),
|
|
2991
|
-
de.length > 0 && /* @__PURE__ */ Q(
|
|
2991
|
+
de.length > 0 && /* @__PURE__ */ Q(Gi, {
|
|
2992
2992
|
size: B,
|
|
2993
2993
|
cells: [...de.map((e) => ({
|
|
2994
2994
|
value: e.id,
|
|
@@ -3046,7 +3046,7 @@ function $i({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
|
|
|
3046
3046
|
iconRight: "trash",
|
|
3047
3047
|
onClick: () => v(e.id, n),
|
|
3048
3048
|
children: `${n + 1}. ${t.def?.label ?? t.id}`
|
|
3049
|
-
}), i.length > 0 && /* @__PURE__ */ Q(
|
|
3049
|
+
}), i.length > 0 && /* @__PURE__ */ Q(Gi, {
|
|
3050
3050
|
size: B,
|
|
3051
3051
|
cells: i.map((e) => ({
|
|
3052
3052
|
value: e.id,
|
|
@@ -3062,7 +3062,7 @@ function $i({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
|
|
|
3062
3062
|
children: [(() => {
|
|
3063
3063
|
let e = n("motion").TransportBar;
|
|
3064
3064
|
return /* @__PURE__ */ Q(e, { size: B });
|
|
3065
|
-
})(), /* @__PURE__ */ Q(
|
|
3065
|
+
})(), /* @__PURE__ */ Q(qi, { size: B })]
|
|
3066
3066
|
}),
|
|
3067
3067
|
ye === "output" && /* @__PURE__ */ $("div", {
|
|
3068
3068
|
className: "flex flex-col gap-2 pt-3",
|
|
@@ -3070,14 +3070,14 @@ function $i({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
|
|
|
3070
3070
|
/* @__PURE__ */ Q(J, {
|
|
3071
3071
|
value: a,
|
|
3072
3072
|
onChange: s,
|
|
3073
|
-
options:
|
|
3073
|
+
options: Ji,
|
|
3074
3074
|
size: B,
|
|
3075
3075
|
ariaLabel: "Aspect"
|
|
3076
3076
|
}),
|
|
3077
3077
|
/* @__PURE__ */ Q(J, {
|
|
3078
3078
|
value: a,
|
|
3079
3079
|
onChange: s,
|
|
3080
|
-
options:
|
|
3080
|
+
options: Yi,
|
|
3081
3081
|
size: B,
|
|
3082
3082
|
ariaLabel: "Aspect (landscape) and fill"
|
|
3083
3083
|
}),
|
|
@@ -3120,7 +3120,7 @@ function $i({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
|
|
|
3120
3120
|
}
|
|
3121
3121
|
//#endregion
|
|
3122
3122
|
//#region src/editor/mobile/MobileView.jsx
|
|
3123
|
-
function
|
|
3123
|
+
function Zi({ onGenerate: e, onEffects: t, chromes: n }) {
|
|
3124
3124
|
return /* @__PURE__ */ Q("div", {
|
|
3125
3125
|
className: "fixed inset-y-0 right-0 left-[var(--fxr-rail,0px)] kol-overlay-scrim flex flex-col items-center justify-center p-6",
|
|
3126
3126
|
style: { zIndex: "var(--kol-z-modal)" },
|
|
@@ -3192,7 +3192,7 @@ function ea({ onGenerate: e, onEffects: t, chromes: n }) {
|
|
|
3192
3192
|
})
|
|
3193
3193
|
});
|
|
3194
3194
|
}
|
|
3195
|
-
function
|
|
3195
|
+
function Qi() {
|
|
3196
3196
|
let { layers: e, addLayer: n, removeLayer: r, updateLayer: i, canvasW: a, canvasH: s, aspect: c, setAspect: l } = o(), { setTool: u } = Nt(), d = hn() && !wn(), f = _n(), p = () => {
|
|
3197
3197
|
let e = new URLSearchParams(window.location.search);
|
|
3198
3198
|
return e.get("open") ? "live" : e.get("start") === "category" ? "category" : "entry";
|
|
@@ -3253,7 +3253,7 @@ function ta() {
|
|
|
3253
3253
|
let t = j.current;
|
|
3254
3254
|
t && t.id === e.pointerId && e.type === "pointerup" && m === "live" && performance.now() - t.t < 350 && Math.hypot(e.clientX - t.x, e.clientY - t.y) < 12 && (F?.type === "loop" ? U(F.loopId) : null)?.group !== "penrose" && O.toggle(), t?.id === e.pointerId && (j.current = null), A.current.pts.delete(e.pointerId), A.current.pts.size < 2 && A.current.start && (A.current.start = null, ee(A.current.live));
|
|
3255
3255
|
};
|
|
3256
|
-
|
|
3256
|
+
rr(), Y(() => (nn("randomiser"), () => nn(null)), []), Y(() => {
|
|
3257
3257
|
l("4:5"), u("orbit");
|
|
3258
3258
|
}, []);
|
|
3259
3259
|
let F = e.find((e) => e.id === v) ?? (e.length === 1 ? e[0] : null), I = m === "live" && F?.type === "photo" && !F.src && F.srcType !== "webcam";
|
|
@@ -3329,19 +3329,19 @@ function ta() {
|
|
|
3329
3329
|
onPointerLeave: P,
|
|
3330
3330
|
children: /* @__PURE__ */ Q($t, { fit: b })
|
|
3331
3331
|
}),
|
|
3332
|
-
m === "entry" && /* @__PURE__ */ Q(
|
|
3332
|
+
m === "entry" && /* @__PURE__ */ Q(Zi, {
|
|
3333
3333
|
chromes: d,
|
|
3334
3334
|
onGenerate: () => h("category"),
|
|
3335
3335
|
onEffects: () => {
|
|
3336
3336
|
_(!0), ie();
|
|
3337
3337
|
}
|
|
3338
3338
|
}),
|
|
3339
|
-
m === "category" && /* @__PURE__ */ Q(
|
|
3339
|
+
m === "category" && /* @__PURE__ */ Q(oi, {
|
|
3340
3340
|
onPick: re,
|
|
3341
3341
|
onInsert: ie,
|
|
3342
3342
|
onBack: () => h("entry")
|
|
3343
3343
|
}),
|
|
3344
|
-
m === "live" && !I && /* @__PURE__ */ Q(
|
|
3344
|
+
m === "live" && !I && /* @__PURE__ */ Q(Xi, {
|
|
3345
3345
|
layer: F,
|
|
3346
3346
|
onSwitchCategory: L,
|
|
3347
3347
|
onInsert: () => {
|
|
@@ -3360,7 +3360,7 @@ function ta() {
|
|
|
3360
3360
|
style: { zIndex: "var(--kol-z-modal)" },
|
|
3361
3361
|
children: [/* @__PURE__ */ Q("div", {
|
|
3362
3362
|
className: "flex-1 min-h-0",
|
|
3363
|
-
children: /* @__PURE__ */ Q(
|
|
3363
|
+
children: /* @__PURE__ */ Q(li, { layer: F })
|
|
3364
3364
|
}), /* @__PURE__ */ Q("div", {
|
|
3365
3365
|
className: "flex justify-center pb-[max(0.75rem,env(safe-area-inset-bottom))]",
|
|
3366
3366
|
children: /* @__PURE__ */ Q(K, {
|
|
@@ -3374,15 +3374,15 @@ function ta() {
|
|
|
3374
3374
|
]
|
|
3375
3375
|
});
|
|
3376
3376
|
}
|
|
3377
|
-
function
|
|
3377
|
+
function $i() {
|
|
3378
3378
|
return /* @__PURE__ */ $(fn, {
|
|
3379
3379
|
persistDraft: !1,
|
|
3380
|
-
children: [/* @__PURE__ */ Q(
|
|
3380
|
+
children: [/* @__PURE__ */ Q(Qi, {}), /* @__PURE__ */ Q(St, {})]
|
|
3381
3381
|
});
|
|
3382
3382
|
}
|
|
3383
3383
|
//#endregion
|
|
3384
3384
|
//#region src/editor/labs/FloatLabs.jsx
|
|
3385
|
-
function
|
|
3385
|
+
function ea() {
|
|
3386
3386
|
let { undo: e, redo: t, canUndo: n, canRedo: r } = o(), i = (e) => () => e(), a = (e) => () => window.dispatchEvent(new CustomEvent(e));
|
|
3387
3387
|
return {
|
|
3388
3388
|
app: {
|
|
@@ -3472,7 +3472,7 @@ function ra() {
|
|
|
3472
3472
|
}]
|
|
3473
3473
|
};
|
|
3474
3474
|
}
|
|
3475
|
-
function
|
|
3475
|
+
function ta() {
|
|
3476
3476
|
let { addFilter: e, patchFilter: t } = o(), { layer: n, setOnly: r } = W(), i = X(null);
|
|
3477
3477
|
Y(() => {
|
|
3478
3478
|
n?.type === "photo" && n.src && (i.current = {
|
|
@@ -3486,7 +3486,7 @@ function ia() {
|
|
|
3486
3486
|
n?.srcType,
|
|
3487
3487
|
n?.fit
|
|
3488
3488
|
]);
|
|
3489
|
-
let a =
|
|
3489
|
+
let a = Er({
|
|
3490
3490
|
layer: n,
|
|
3491
3491
|
setOnly: r,
|
|
3492
3492
|
addFilter: e,
|
|
@@ -3500,7 +3500,7 @@ function ia() {
|
|
|
3500
3500
|
return a.forEach((e) => {
|
|
3501
3501
|
if (e.id.startsWith("sec:")) {
|
|
3502
3502
|
s.push({
|
|
3503
|
-
icon:
|
|
3503
|
+
icon: Sr[e.id.slice(4)] ?? "square",
|
|
3504
3504
|
label: e.label,
|
|
3505
3505
|
path: e.id,
|
|
3506
3506
|
sub: []
|
|
@@ -3521,10 +3521,10 @@ function ia() {
|
|
|
3521
3521
|
pick: (e) => c.get(e)?.()
|
|
3522
3522
|
};
|
|
3523
3523
|
}
|
|
3524
|
-
function
|
|
3524
|
+
function na() {
|
|
3525
3525
|
let { layer: e } = W(), { removeLayer: t } = o(), n = e?.type === "photo" && !e.src && e.srcType !== "webcam";
|
|
3526
3526
|
return /* @__PURE__ */ $("div", {
|
|
3527
|
-
className: "kol-float-labs-stage
|
|
3527
|
+
className: "kol-float-labs-stage relative h-full min-h-[360px] flex items-center justify-center overflow-hidden rounded-[var(--kol-float-window-r)]",
|
|
3528
3528
|
style: { background: "var(--kol-surface-secondary)" },
|
|
3529
3529
|
children: [/* @__PURE__ */ Q("div", {
|
|
3530
3530
|
style: {
|
|
@@ -3533,197 +3533,104 @@ function aa() {
|
|
|
3533
3533
|
height: "85%"
|
|
3534
3534
|
},
|
|
3535
3535
|
children: /* @__PURE__ */ Q(Xt, {})
|
|
3536
|
-
}), n && /* @__PURE__ */ Q(
|
|
3536
|
+
}), n && /* @__PURE__ */ Q(ui, {
|
|
3537
3537
|
layer: e,
|
|
3538
|
-
title:
|
|
3538
|
+
title: vi(e).title,
|
|
3539
3539
|
onBack: () => t(e.id)
|
|
3540
3540
|
})]
|
|
3541
3541
|
});
|
|
3542
3542
|
}
|
|
3543
|
-
function
|
|
3544
|
-
let [i, a] = Z(null), o = X(0), s = () => clearTimeout(o.current), c = () => {
|
|
3545
|
-
s(), o.current = setTimeout(() => a(null), 160);
|
|
3546
|
-
};
|
|
3547
|
-
return /* @__PURE__ */ $(Xn, { children: [/* @__PURE__ */ Q(Rn, {
|
|
3548
|
-
variant: "float",
|
|
3549
|
-
collapsed: !0,
|
|
3550
|
-
items: e,
|
|
3551
|
-
currentPath: t ?? "",
|
|
3552
|
-
title: "Labs",
|
|
3553
|
-
icon: "globe",
|
|
3554
|
-
onNavigate: (e) => n(e),
|
|
3555
|
-
onItemHover: (e, t) => {
|
|
3556
|
-
if (!e) return c();
|
|
3557
|
-
s(), a(e.sub?.length ? {
|
|
3558
|
-
item: e,
|
|
3559
|
-
el: t
|
|
3560
|
-
} : null);
|
|
3561
|
-
},
|
|
3562
|
-
className: r
|
|
3563
|
-
}), i && /* @__PURE__ */ Q("span", {
|
|
3564
|
-
className: "contents",
|
|
3565
|
-
onMouseEnter: s,
|
|
3566
|
-
onMouseLeave: c,
|
|
3567
|
-
children: /* @__PURE__ */ Q(ir, {
|
|
3568
|
-
icon: i.item.icon,
|
|
3569
|
-
title: i.item.label,
|
|
3570
|
-
items: i.item.sub,
|
|
3571
|
-
active: t,
|
|
3572
|
-
anchor: i.el,
|
|
3573
|
-
open: !0,
|
|
3574
|
-
onOpenChange: (e) => {
|
|
3575
|
-
e || a(null);
|
|
3576
|
-
},
|
|
3577
|
-
onPick: (e) => {
|
|
3578
|
-
a(null), n(e.path);
|
|
3579
|
-
}
|
|
3580
|
-
})
|
|
3581
|
-
})] });
|
|
3582
|
-
}
|
|
3583
|
-
function sa({ variant: e }) {
|
|
3543
|
+
function ra() {
|
|
3584
3544
|
wt();
|
|
3585
|
-
let
|
|
3545
|
+
let e = Wn("(max-width: 767px)"), { layer: t } = W(), { undo: n, redo: r, canUndo: i, canRedo: a, selectedId: s, select: c } = o();
|
|
3586
3546
|
Y(() => {
|
|
3587
|
-
|
|
3547
|
+
t && s !== t.id && c(t.id);
|
|
3588
3548
|
}, [
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3549
|
+
t,
|
|
3550
|
+
s,
|
|
3551
|
+
c
|
|
3592
3552
|
]);
|
|
3593
|
-
let {
|
|
3594
|
-
name:
|
|
3553
|
+
let { menus: l, end: u } = ea(), d = ta(), f = t ? vi(t).title : "Labs", p = d.items.filter((e) => e.sub?.length).map((e) => e.path), m = /* @__PURE__ */ Q(Qn, {
|
|
3554
|
+
name: f || "Untitled",
|
|
3595
3555
|
status: "Labs",
|
|
3596
3556
|
onBack: () => pn("/"),
|
|
3597
|
-
menuItems:
|
|
3557
|
+
menuItems: Nn([...l, ...u].map((e) => ({
|
|
3598
3558
|
label: e.label,
|
|
3599
3559
|
items: e.items
|
|
3600
|
-
})))
|
|
3601
|
-
}),
|
|
3602
|
-
onUndo: () =>
|
|
3603
|
-
onRedo: () =>
|
|
3560
|
+
})))
|
|
3561
|
+
}), h = /* @__PURE__ */ Q(er, {
|
|
3562
|
+
onUndo: () => i && n(),
|
|
3563
|
+
onRedo: () => a && r(),
|
|
3604
3564
|
onAction: () => cn("Output"),
|
|
3605
3565
|
onAccount: () => pn("/settings")
|
|
3606
|
-
}),
|
|
3566
|
+
}), g = /* @__PURE__ */ Q(Zn, {
|
|
3607
3567
|
variant: "mobile",
|
|
3608
3568
|
shape: "pill",
|
|
3609
|
-
labels: !
|
|
3569
|
+
labels: !e,
|
|
3610
3570
|
items: rn,
|
|
3611
3571
|
sheetItems: tn,
|
|
3612
3572
|
currentPath: "/labs",
|
|
3613
3573
|
onNavigate: kn
|
|
3614
|
-
}), b = /* @__PURE__ */ Q(rr, {
|
|
3615
|
-
title: m || "Parameters",
|
|
3616
|
-
width: t ? "100%" : 352,
|
|
3617
|
-
density: "compact",
|
|
3618
|
-
surface: "solid",
|
|
3619
|
-
sections: [{
|
|
3620
|
-
id: "labs-params",
|
|
3621
|
-
label: "Parameters",
|
|
3622
|
-
rows: [{
|
|
3623
|
-
id: "body",
|
|
3624
|
-
render: () => /* @__PURE__ */ Q("div", {
|
|
3625
|
-
className: "kol-editor-labs kol-float-labs-params",
|
|
3626
|
-
children: /* @__PURE__ */ Q("div", {
|
|
3627
|
-
className: "kol-compose-inspector-body",
|
|
3628
|
-
children: /* @__PURE__ */ Q(si, {})
|
|
3629
|
-
})
|
|
3630
|
-
})
|
|
3631
|
-
}]
|
|
3632
|
-
}],
|
|
3633
|
-
footer: /* @__PURE__ */ Q("div", {
|
|
3634
|
-
className: "kol-editor-labs",
|
|
3635
|
-
children: /* @__PURE__ */ Q(qt, {})
|
|
3636
|
-
}),
|
|
3637
|
-
className: "kol-float-labs-rail max-h-full overflow-y-auto scrollbar-none"
|
|
3638
3574
|
});
|
|
3639
|
-
return /* @__PURE__ */
|
|
3640
|
-
className: "kol-float-labs kol-editor-shell
|
|
3641
|
-
"data-variant": e,
|
|
3575
|
+
return /* @__PURE__ */ Q("div", {
|
|
3576
|
+
className: "kol-float-labs kol-editor-shell",
|
|
3642
3577
|
"data-editor-keep-selection": !0,
|
|
3643
|
-
children:
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
]
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
children: [_, !h && /* @__PURE__ */ Q($n, { items: [
|
|
3685
|
-
"FXR",
|
|
3686
|
-
"Labs",
|
|
3687
|
-
m || "Untitled"
|
|
3688
|
-
] })]
|
|
3689
|
-
}),
|
|
3690
|
-
/* @__PURE__ */ Q(Ut, { className: "absolute! left-1/2 -translate-x-1/2 top-6" }),
|
|
3691
|
-
/* @__PURE__ */ Q("div", {
|
|
3692
|
-
className: "absolute right-6 top-9",
|
|
3693
|
-
children: v
|
|
3694
|
-
}),
|
|
3695
|
-
h ? /* @__PURE__ */ Q(oa, {
|
|
3696
|
-
items: p.items,
|
|
3697
|
-
active: p.active,
|
|
3698
|
-
onPick: p.pick,
|
|
3699
|
-
className: "absolute! left-6 top-6 bottom-[120px] !h-auto"
|
|
3700
|
-
}) : /* @__PURE__ */ Q(Rn, {
|
|
3701
|
-
variant: "float",
|
|
3702
|
-
items: p.items,
|
|
3703
|
-
currentPath: p.active ?? "",
|
|
3704
|
-
onNavigate: p.pick,
|
|
3705
|
-
title: "Labs",
|
|
3706
|
-
icon: "globe",
|
|
3707
|
-
defaultExpanded: g,
|
|
3708
|
-
className: "absolute! left-6 top-[188px] bottom-[124px] !h-auto"
|
|
3709
|
-
}),
|
|
3710
|
-
/* @__PURE__ */ Q("div", {
|
|
3711
|
-
className: "absolute right-6 top-[108px] bottom-6 flex flex-col",
|
|
3712
|
-
children: b
|
|
3713
|
-
}),
|
|
3714
|
-
/* @__PURE__ */ Q("div", {
|
|
3715
|
-
className: "absolute left-6 bottom-[35px] w-[418px] h-[66px] [transform:translateZ(0)] [&_.kol-mobile-tabbar]:!flex",
|
|
3716
|
-
children: y
|
|
3578
|
+
children: /* @__PURE__ */ Q($n, {
|
|
3579
|
+
nav: d.items,
|
|
3580
|
+
currentPath: d.active ?? "",
|
|
3581
|
+
onNavigate: d.pick,
|
|
3582
|
+
title: "Labs",
|
|
3583
|
+
icon: "globe",
|
|
3584
|
+
defaultExpanded: p,
|
|
3585
|
+
breadcrumb: [
|
|
3586
|
+
"FXR",
|
|
3587
|
+
"Labs",
|
|
3588
|
+
f || "Untitled"
|
|
3589
|
+
],
|
|
3590
|
+
bar: {
|
|
3591
|
+
start: m,
|
|
3592
|
+
center: e ? void 0 : /* @__PURE__ */ Q(Ut, {}),
|
|
3593
|
+
end: h
|
|
3594
|
+
},
|
|
3595
|
+
inspectorLabel: "Parameters",
|
|
3596
|
+
inspector: ({ hide: t }) => /* @__PURE__ */ Q(tr, {
|
|
3597
|
+
title: f || "Parameters",
|
|
3598
|
+
onCollapse: t,
|
|
3599
|
+
width: e ? "100%" : 352,
|
|
3600
|
+
density: "compact",
|
|
3601
|
+
surface: "solid",
|
|
3602
|
+
sections: [{
|
|
3603
|
+
id: "labs-params",
|
|
3604
|
+
label: "Parameters",
|
|
3605
|
+
rows: [{
|
|
3606
|
+
id: "body",
|
|
3607
|
+
render: () => /* @__PURE__ */ Q("div", {
|
|
3608
|
+
className: "kol-editor-labs",
|
|
3609
|
+
children: /* @__PURE__ */ Q("div", {
|
|
3610
|
+
className: "kol-compose-inspector-body",
|
|
3611
|
+
children: /* @__PURE__ */ Q(ii, {})
|
|
3612
|
+
})
|
|
3613
|
+
})
|
|
3614
|
+
}]
|
|
3615
|
+
}],
|
|
3616
|
+
footer: /* @__PURE__ */ Q("div", {
|
|
3617
|
+
className: "kol-editor-labs",
|
|
3618
|
+
children: /* @__PURE__ */ Q(qt, {})
|
|
3717
3619
|
})
|
|
3718
|
-
|
|
3719
|
-
|
|
3620
|
+
}),
|
|
3621
|
+
bottom: e ? g : /* @__PURE__ */ Q("div", {
|
|
3622
|
+
className: "w-[418px] h-[66px] [transform:translateZ(0)] [&_.kol-mobile-tabbar]:!flex",
|
|
3623
|
+
children: g
|
|
3624
|
+
}),
|
|
3625
|
+
children: /* @__PURE__ */ Q(na, {})
|
|
3626
|
+
})
|
|
3720
3627
|
});
|
|
3721
3628
|
}
|
|
3722
|
-
function
|
|
3629
|
+
function ia() {
|
|
3723
3630
|
return /* @__PURE__ */ $(fn, {
|
|
3724
|
-
draftKey:
|
|
3725
|
-
children: [/* @__PURE__ */ Q(
|
|
3631
|
+
draftKey: Pi,
|
|
3632
|
+
children: [/* @__PURE__ */ Q(ra, {}), /* @__PURE__ */ Q(St, {})]
|
|
3726
3633
|
});
|
|
3727
3634
|
}
|
|
3728
3635
|
//#endregion
|
|
3729
|
-
export { kt as AppSettingsSections, Rt as BRAND, Tn as DesignEditor, Tn as default, At as DisplaySettingsDrawer, fn as EditorProviders, Pn as FilesDialog, mn as FloatDesignEditor,
|
|
3636
|
+
export { kt as AppSettingsSections, Rt as BRAND, Tn as DesignEditor, Tn as default, At as DisplaySettingsDrawer, fn as EditorProviders, Pn as FilesDialog, mn as FloatDesignEditor, ia as FloatLabsView, ze as GeneratorLibraryProvider, Pi as LABS_DRAFT_KEY, Ve as LIBRARY_SLOT_KEYS, Fi as LabsView, Yt as MODES, $i as MobileView, Xt as OutputCanvas, $t as OutputStage, vn as OutputView, Jt as RAIL_EXTRA_PREFIX, pt as TimelineRail, We as UnauthorizedError, On as VIEW_PATHS, Tt as closeFiles, Lt as comboLabel, xn as copyStored, Zt as currentView, on as duplicateStored, Pe as getLibraryApi, je as inviteFromRequest, hn as isMobileDevice, Ee as listInviteRequests, Be as loadLibrary, Ue as mintInvite, Ot as openFiles, Ie as readLibraryRaw, d as registerPack, Gt as removeStored, gn as renameStored, Me as requestInvite, Oe as setLibraryApi, It as setMediaClient, xt as setMediaProxyBase, an as setMode, Wt as setNavigator, un as setRailExtras, x as setSettingsStore, Cn as setThumbStored, sn as setWantsDesktop, Ct as shortcutsBySection, De as signInLibrary, Ae as signOutLibrary, Re as signUpLibrary, Ne as subscribeLibrary, mt as timelineView, Te as updateAccount, Le as useAccount, Pt as useFilesDialog, He as useGeneratorLibrary, ke as useLibrarySession, Dn as useRailExtras, Mt as useSettingsSections, wn as wantsDesktop, An as withView };
|