@kolkrabbi/design-editor 0.15.0 → 0.16.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/{RuleRow-4eAy_jzf.js → RuleRow-DlouS36V.js} +13 -10
- package/dist/{core-Dr8KZNAY.js → core-B78-YLQh.js} +2136 -2124
- package/dist/core.js +1 -1
- package/dist/design-editor.css +1 -1
- package/dist/design-editor.js +300 -293
- package/dist/{effects-DzHdDgL4.js → effects-B743CHEU.js} +2 -2
- package/dist/effects.js +1 -1
- package/dist/{generators-DG5yqNy1.js → generators-B0uhjxUs.js} +4 -4
- package/dist/generators.js +1 -1
- package/dist/{host-DiI1hniH.js → host-bXQMgZeW.js} +1 -1
- package/dist/{motion-DtxlM5Bu.js → motion-9j3WO6a2.js} +244 -241
- package/dist/motion.js +1 -1
- package/package.json +7 -7
package/dist/design-editor.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { B as e, Ft as t, It as n, L as r, S as i, Xt as a, Zt as o, a as s, b as c, c as l, i as u, it as d, j as f, l as p, n as m, o as h, ot as g, r as _, rt as v, tt as y, u as b, w as x, wt as S, x as C } from "./rolls-CkmuE-Ya.js";
|
|
2
2
|
import { c as w, d as T, f as E, l as D, n as O, o as k, p as A, r as j, t as M } from "./registry-CSOtIU7o.js";
|
|
3
|
-
import { c as N, n as P, s as F } from "./generators-
|
|
3
|
+
import { c as N, n as P, s as F } from "./generators-B0uhjxUs.js";
|
|
4
4
|
import { n as I, r as L, t as ee } from "./useLayerEdit-BDXtPeAP.js";
|
|
5
|
-
import { a as te, c as R, d as ne, f as z, i as re, l as B, n as ie, o as ae, r as oe, s as se, u as ce } from "./effects-
|
|
5
|
+
import { a as te, c as R, d as ne, f as z, i as re, l as B, n as ie, o as ae, r as oe, s as se, u as ce } from "./effects-B743CHEU.js";
|
|
6
6
|
import { t as le } from "./BindDot-CuCS4LS-.js";
|
|
7
|
-
import { a as ue, i as de, n as fe, o as pe, r as me, s as he } from "./motion-
|
|
8
|
-
import { A as ge, B as _e, C as ve, D as ye, E as be, F as xe, G as Se, H as Ce, I as we, L as Te, M as Ee, N as De, O as Oe, P as ke, R as Ae, S as je, T as Me, U as Ne, V as Pe, W as Fe, _ as Ie, a as Le, b as Re, c as ze, d as Be, f as Ve, g as He, h as Ue, i as We, j as Ge, k as Ke, l as qe, m as Je, n as Ye, o as Xe, p as Ze, r as Qe, s as $e, t as et, u as tt, v as nt, w as rt, x as it, y as at, z as ot } from "./core-
|
|
9
|
-
import { Button as V, Divider as st, Dropdown as ct, FullscreenOverlay as lt, LabeledControlSection as H, SegmentedToggle as U, ToggleSwitch as ut, Tooltip as
|
|
10
|
-
import { createContext as
|
|
11
|
-
import { Fragment as
|
|
12
|
-
import { Icon as
|
|
13
|
-
import { useDragResize as
|
|
7
|
+
import { a as ue, i as de, n as fe, o as pe, r as me, s as he } from "./motion-9j3WO6a2.js";
|
|
8
|
+
import { A as ge, B as _e, C as ve, D as ye, E as be, F as xe, G as Se, H as Ce, I as we, L as Te, M as Ee, N as De, O as Oe, P as ke, R as Ae, S as je, T as Me, U as Ne, V as Pe, W as Fe, _ as Ie, a as Le, b as Re, c as ze, d as Be, f as Ve, g as He, h as Ue, i as We, j as Ge, k as Ke, l as qe, m as Je, n as Ye, o as Xe, p as Ze, r as Qe, s as $e, t as et, u as tt, v as nt, w as rt, x as it, y as at, z as ot } from "./core-B78-YLQh.js";
|
|
9
|
+
import { Button as V, Divider as st, Dropdown as ct, FullscreenOverlay as lt, LabeledControlSection as H, SegmentedToggle as U, ToggleSwitch as ut, Tooltip as W } from "@kolkrabbi/kol-component";
|
|
10
|
+
import { createContext as dt, useCallback as ft, useContext as pt, useEffect as G, useRef as K, useState as q } from "react";
|
|
11
|
+
import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
|
|
12
|
+
import { Icon as Z } from "@kolkrabbi/kol-icons";
|
|
13
|
+
import { useDragResize as mt, useTheme as ht } from "@kolkrabbi/kol-framework";
|
|
14
14
|
//#region src/editor/labs/useLabsLayer.js
|
|
15
|
-
function
|
|
16
|
-
let { layers: e, addLayer: t, removeLayer: n, updateLayer: r, select: i, beginTransaction: a, commitTransaction: o } = f(), s =
|
|
15
|
+
function Q() {
|
|
16
|
+
let { layers: e, addLayer: t, removeLayer: n, updateLayer: r, select: i, beginTransaction: a, commitTransaction: o } = f(), s = ft((s, c) => {
|
|
17
17
|
let [l, ...u] = e;
|
|
18
18
|
a();
|
|
19
19
|
for (let e of u) n(e.id);
|
|
@@ -35,7 +35,7 @@ function Z() {
|
|
|
35
35
|
}
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region src/editor/labs/catalog.js
|
|
38
|
-
var
|
|
38
|
+
var $ = {
|
|
39
39
|
"fx:halftone": "ptrn-dot",
|
|
40
40
|
"fx:scanline": "grid-horizontal",
|
|
41
41
|
"fx:crt": "desktop",
|
|
@@ -58,14 +58,14 @@ var Q = {
|
|
|
58
58
|
"misc:Para Type": "aa",
|
|
59
59
|
"vec:Distressor": "scribble",
|
|
60
60
|
"vec:Modulator": "dashed-circle"
|
|
61
|
-
},
|
|
61
|
+
}, gt = {
|
|
62
62
|
effects: "filter",
|
|
63
63
|
generative: "layers",
|
|
64
64
|
vector: "pen-nib",
|
|
65
65
|
composition: "type",
|
|
66
66
|
modulation: "frequency",
|
|
67
67
|
mode: "mode-toggle-01"
|
|
68
|
-
},
|
|
68
|
+
}, _t = {
|
|
69
69
|
editor: "desktop",
|
|
70
70
|
labs: "globe",
|
|
71
71
|
randomiser: "refresh"
|
|
@@ -160,7 +160,7 @@ function xt({ layer: e, setOnly: t, addFilter: n, patchFilter: r, carriedSource:
|
|
|
160
160
|
...ae(z).map((t) => ({
|
|
161
161
|
id: `fx:${t.id}`,
|
|
162
162
|
label: t.label,
|
|
163
|
-
icon:
|
|
163
|
+
icon: $[`fx:${t.id}`] ?? "square",
|
|
164
164
|
pages: t.rack ? re.map((t) => ({
|
|
165
165
|
label: t.label,
|
|
166
166
|
onSelect: () => o(t.id),
|
|
@@ -186,7 +186,7 @@ function xt({ layer: e, setOnly: t, addFilter: n, patchFilter: r, carriedSource:
|
|
|
186
186
|
...F.map((e) => ({
|
|
187
187
|
id: `gen:${e.label}`,
|
|
188
188
|
label: e.label,
|
|
189
|
-
icon:
|
|
189
|
+
icon: $[`gen:${e.label}`] ?? "square",
|
|
190
190
|
pages: p(e)
|
|
191
191
|
})),
|
|
192
192
|
{
|
|
@@ -196,13 +196,13 @@ function xt({ layer: e, setOnly: t, addFilter: n, patchFilter: r, carriedSource:
|
|
|
196
196
|
{
|
|
197
197
|
id: "vec:Distressor",
|
|
198
198
|
label: "Distressor",
|
|
199
|
-
icon:
|
|
199
|
+
icon: $["vec:Distressor"] ?? "square",
|
|
200
200
|
pages: f("distress")
|
|
201
201
|
},
|
|
202
202
|
{
|
|
203
203
|
id: "vec:Modulator",
|
|
204
204
|
label: "Modulator",
|
|
205
|
-
icon:
|
|
205
|
+
icon: $["vec:Modulator"] ?? "square",
|
|
206
206
|
pages: f("modulator")
|
|
207
207
|
},
|
|
208
208
|
{
|
|
@@ -212,7 +212,7 @@ function xt({ layer: e, setOnly: t, addFilter: n, patchFilter: r, carriedSource:
|
|
|
212
212
|
...pe.map((t) => ({
|
|
213
213
|
id: `kin:${t.label}`,
|
|
214
214
|
label: t.label,
|
|
215
|
-
icon:
|
|
215
|
+
icon: $[`kin:${t.label}`] ?? "square",
|
|
216
216
|
pages: t.subs.map((t) => ({
|
|
217
217
|
label: t,
|
|
218
218
|
onSelect: () => c(ue.find((e) => e.sub === t)),
|
|
@@ -222,7 +222,7 @@ function xt({ layer: e, setOnly: t, addFilter: n, patchFilter: r, carriedSource:
|
|
|
222
222
|
...N.map((e) => ({
|
|
223
223
|
id: `misc:${e.label}`,
|
|
224
224
|
label: e.label,
|
|
225
|
-
icon:
|
|
225
|
+
icon: $[`misc:${e.label}`] ?? "square",
|
|
226
226
|
pages: e.groups.flatMap((e) => f(e, "misc"))
|
|
227
227
|
})),
|
|
228
228
|
{
|
|
@@ -240,8 +240,8 @@ function xt({ layer: e, setOnly: t, addFilter: n, patchFilter: r, carriedSource:
|
|
|
240
240
|
//#endregion
|
|
241
241
|
//#region src/editor/labs/LabsNav.jsx
|
|
242
242
|
function St() {
|
|
243
|
-
let { addFilter: e, patchFilter: n } = f(), { layer: r, setOnly: i } =
|
|
244
|
-
|
|
243
|
+
let { addFilter: e, patchFilter: n } = f(), { layer: r, setOnly: i } = Q(), a = K(null);
|
|
244
|
+
G(() => {
|
|
245
245
|
r?.type === "photo" && r.src && (a.current = {
|
|
246
246
|
src: r.src,
|
|
247
247
|
srcType: r.srcType,
|
|
@@ -264,13 +264,13 @@ function St() {
|
|
|
264
264
|
fit: r.fit
|
|
265
265
|
} : a.current ?? {}
|
|
266
266
|
});
|
|
267
|
-
return
|
|
267
|
+
return G(() => {
|
|
268
268
|
let e = /* @__PURE__ */ new Map(), n = [];
|
|
269
269
|
o.forEach((t) => {
|
|
270
270
|
if (t.id.startsWith("sec:")) {
|
|
271
271
|
let e = t.id.slice(4);
|
|
272
272
|
n.push({
|
|
273
|
-
icon:
|
|
273
|
+
icon: gt[e] ?? "square",
|
|
274
274
|
path: `${$e}${t.id}`,
|
|
275
275
|
label: t.label,
|
|
276
276
|
sub: []
|
|
@@ -299,9 +299,9 @@ function St() {
|
|
|
299
299
|
//#endregion
|
|
300
300
|
//#region src/editor/labs/LabsSourcePicker.jsx
|
|
301
301
|
function Ct(e) {
|
|
302
|
-
let { patch: t } = ee(e.id), n =
|
|
302
|
+
let { patch: t } = ee(e.id), n = K(null), [r, i] = q(!1), a = e.type === "loop" && e.loopGroup === "distress";
|
|
303
303
|
return {
|
|
304
|
-
nodes: /* @__PURE__ */
|
|
304
|
+
nodes: /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("input", {
|
|
305
305
|
ref: n,
|
|
306
306
|
type: "file",
|
|
307
307
|
accept: a ? ".svg,image/svg+xml" : "image/*,video/*",
|
|
@@ -327,7 +327,7 @@ function Ct(e) {
|
|
|
327
327
|
srcType: "image"
|
|
328
328
|
}), i.readAsDataURL(r);
|
|
329
329
|
}
|
|
330
|
-
}), /* @__PURE__ */
|
|
330
|
+
}), /* @__PURE__ */ Y(He, {
|
|
331
331
|
open: r,
|
|
332
332
|
onClose: () => i(!1),
|
|
333
333
|
onPick: (e, { contentType: n } = {}) => {
|
|
@@ -355,7 +355,7 @@ function Ct(e) {
|
|
|
355
355
|
}
|
|
356
356
|
function wt({ layer: e }) {
|
|
357
357
|
let t = i(), n = Ct(e);
|
|
358
|
-
return /* @__PURE__ */
|
|
358
|
+
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(U, {
|
|
359
359
|
variant: "filled",
|
|
360
360
|
value: null,
|
|
361
361
|
onChange: (e) => ({
|
|
@@ -385,49 +385,49 @@ var Tt = [
|
|
|
385
385
|
], Et = Tt.slice(0, 2);
|
|
386
386
|
function Dt({ layer: e }) {
|
|
387
387
|
let t = Ct(e), n = "flex-1 flex flex-col items-center justify-center gap-3 cursor-pointer text-oq-48 hover:text-emphasis hover:bg-oq-02 transition-colors";
|
|
388
|
-
return /* @__PURE__ */
|
|
388
|
+
return /* @__PURE__ */ X("div", {
|
|
389
389
|
className: "w-full h-full flex items-stretch p-6 gap-px",
|
|
390
390
|
children: [
|
|
391
|
-
/* @__PURE__ */
|
|
391
|
+
/* @__PURE__ */ X("button", {
|
|
392
392
|
type: "button",
|
|
393
393
|
className: n,
|
|
394
394
|
onClick: t.openLibrary,
|
|
395
|
-
children: [/* @__PURE__ */
|
|
395
|
+
children: [/* @__PURE__ */ Y(Z, {
|
|
396
396
|
name: "image",
|
|
397
397
|
size: 28
|
|
398
|
-
}), /* @__PURE__ */
|
|
398
|
+
}), /* @__PURE__ */ Y("span", {
|
|
399
399
|
className: "kol-mono-12",
|
|
400
400
|
children: "From library"
|
|
401
401
|
})]
|
|
402
402
|
}),
|
|
403
|
-
/* @__PURE__ */
|
|
403
|
+
/* @__PURE__ */ Y("div", {
|
|
404
404
|
className: "w-px",
|
|
405
|
-
style: { background: "var(--kol-
|
|
405
|
+
style: { background: "var(--kol-oq-08)" }
|
|
406
406
|
}),
|
|
407
|
-
/* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ X("button", {
|
|
408
408
|
type: "button",
|
|
409
409
|
className: n,
|
|
410
410
|
onClick: t.openUpload,
|
|
411
|
-
children: [/* @__PURE__ */
|
|
411
|
+
children: [/* @__PURE__ */ Y(Z, {
|
|
412
412
|
name: "upload",
|
|
413
413
|
size: 28
|
|
414
|
-
}), /* @__PURE__ */
|
|
414
|
+
}), /* @__PURE__ */ Y("span", {
|
|
415
415
|
className: "kol-mono-12",
|
|
416
416
|
children: "Upload"
|
|
417
417
|
})]
|
|
418
418
|
}),
|
|
419
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ Y("div", {
|
|
420
420
|
className: "w-px",
|
|
421
|
-
style: { background: "var(--kol-
|
|
421
|
+
style: { background: "var(--kol-oq-08)" }
|
|
422
422
|
}),
|
|
423
|
-
/* @__PURE__ */
|
|
423
|
+
/* @__PURE__ */ X("button", {
|
|
424
424
|
type: "button",
|
|
425
425
|
className: n,
|
|
426
426
|
onClick: t.openCamera,
|
|
427
|
-
children: [/* @__PURE__ */
|
|
427
|
+
children: [/* @__PURE__ */ Y(Z, {
|
|
428
428
|
name: "camera",
|
|
429
429
|
size: 28
|
|
430
|
-
}), /* @__PURE__ */
|
|
430
|
+
}), /* @__PURE__ */ Y("span", {
|
|
431
431
|
className: "kol-mono-12",
|
|
432
432
|
children: "Camera"
|
|
433
433
|
})]
|
|
@@ -439,7 +439,7 @@ function Dt({ layer: e }) {
|
|
|
439
439
|
//#endregion
|
|
440
440
|
//#region src/editor/labs/LabsParams.jsx
|
|
441
441
|
function Ot(e, t) {
|
|
442
|
-
|
|
442
|
+
G(() => {
|
|
443
443
|
let n = (n) => {
|
|
444
444
|
if (n.key !== "r" && n.key !== "R" || n.metaKey || n.ctrlKey || n.altKey) return;
|
|
445
445
|
let r = n.target;
|
|
@@ -482,17 +482,17 @@ var kt = [{
|
|
|
482
482
|
}
|
|
483
483
|
];
|
|
484
484
|
function Mt({ options: e, active: t, onPick: n, spread: r = !1, pills: i = !1 }) {
|
|
485
|
-
return e?.length ? i ? /* @__PURE__ */
|
|
485
|
+
return e?.length ? i ? /* @__PURE__ */ Y("div", {
|
|
486
486
|
className: "flex items-center gap-1 flex-wrap",
|
|
487
|
-
children: e.map((e) => /* @__PURE__ */
|
|
487
|
+
children: e.map((e) => /* @__PURE__ */ Y("button", {
|
|
488
488
|
type: "button",
|
|
489
489
|
onClick: () => n(e.value),
|
|
490
490
|
className: `px-2 py-0.5 rounded kol-helper-10 tracking-widest border transition-colors cursor-pointer ${e.value === t ? "bg-fg-16 border-oq-24 text-emphasis" : "bg-transparent border-oq-08 text-meta hover:border-oq-16 hover:text-body"}`,
|
|
491
491
|
children: e.label
|
|
492
492
|
}, e.value))
|
|
493
|
-
}) : /* @__PURE__ */
|
|
493
|
+
}) : /* @__PURE__ */ Y("div", {
|
|
494
494
|
className: `flex flex-wrap items-center gap-x-5 gap-y-1.5${r ? " justify-between" : ""}`,
|
|
495
|
-
children: e.map((e) => /* @__PURE__ */
|
|
495
|
+
children: e.map((e) => /* @__PURE__ */ Y("button", {
|
|
496
496
|
type: "button",
|
|
497
497
|
onClick: () => n(e.value),
|
|
498
498
|
className: ["kol-helper-12 cursor-pointer", e.value === t ? "text-emphasis" : "text-meta hover:text-emphasis"].join(" "),
|
|
@@ -501,14 +501,14 @@ function Mt({ options: e, active: t, onPick: n, spread: r = !1, pills: i = !1 })
|
|
|
501
501
|
}) : null;
|
|
502
502
|
}
|
|
503
503
|
function Nt({ chips: e, active: t, onPick: n, spread: r, pills: i, title: a, tabStrip: o, preStrip: s, fx: c = !1, children: l }) {
|
|
504
|
-
return /* @__PURE__ */
|
|
504
|
+
return /* @__PURE__ */ X("div", {
|
|
505
505
|
className: `flex flex-col gap-5${c ? " kol-labs-fx" : ""}`,
|
|
506
506
|
children: [
|
|
507
|
-
a && /* @__PURE__ */
|
|
507
|
+
a && /* @__PURE__ */ Y("p", {
|
|
508
508
|
className: "kol-eyebrow text-fg-96",
|
|
509
509
|
children: a
|
|
510
510
|
}),
|
|
511
|
-
e && /* @__PURE__ */
|
|
511
|
+
e && /* @__PURE__ */ Y(Mt, {
|
|
512
512
|
options: e,
|
|
513
513
|
active: t,
|
|
514
514
|
onPick: n,
|
|
@@ -522,8 +522,8 @@ function Nt({ chips: e, active: t, onPick: n, spread: r, pills: i, title: a, tab
|
|
|
522
522
|
});
|
|
523
523
|
}
|
|
524
524
|
function Pt({ layer: t, showMod: n }) {
|
|
525
|
-
let a = i(), [o, c] =
|
|
526
|
-
|
|
525
|
+
let a = i(), [o, c] = q("effect");
|
|
526
|
+
G(() => {
|
|
527
527
|
let e = () => c("effect");
|
|
528
528
|
return window.addEventListener("kol:open-effects", e), () => window.removeEventListener("kol:open-effects", e);
|
|
529
529
|
}, []);
|
|
@@ -549,7 +549,7 @@ function Pt({ layer: t, showMod: n }) {
|
|
|
549
549
|
}
|
|
550
550
|
} : r);
|
|
551
551
|
_.patch({ filters: r });
|
|
552
|
-
}, A = k(0), j = n ? (e) => /* @__PURE__ */
|
|
552
|
+
}, A = k(0), j = n ? (e) => /* @__PURE__ */ Y(le, {
|
|
553
553
|
layer: O,
|
|
554
554
|
param: e,
|
|
555
555
|
setProp: A
|
|
@@ -589,10 +589,10 @@ function Pt({ layer: t, showMod: n }) {
|
|
|
589
589
|
value: e.id,
|
|
590
590
|
label: `${e.label ?? e.id}${e.kind === "pixi" ? " · GPU" : ""}`
|
|
591
591
|
}))];
|
|
592
|
-
return /* @__PURE__ */
|
|
592
|
+
return /* @__PURE__ */ X(Nt, {
|
|
593
593
|
title: "Effects",
|
|
594
594
|
fx: !0,
|
|
595
|
-
tabStrip: /* @__PURE__ */
|
|
595
|
+
tabStrip: /* @__PURE__ */ Y(U, {
|
|
596
596
|
variant: "filled",
|
|
597
597
|
value: o,
|
|
598
598
|
onChange: c,
|
|
@@ -600,23 +600,23 @@ function Pt({ layer: t, showMod: n }) {
|
|
|
600
600
|
size: a,
|
|
601
601
|
className: C(a)
|
|
602
602
|
}),
|
|
603
|
-
children: [o === "effect" && /* @__PURE__ */
|
|
604
|
-
/* @__PURE__ */
|
|
603
|
+
children: [o === "effect" && /* @__PURE__ */ X(J, { children: [
|
|
604
|
+
/* @__PURE__ */ X(H, {
|
|
605
605
|
label: "Effect Stack",
|
|
606
606
|
divided: !0,
|
|
607
|
-
children: [v.length === 0 && /* @__PURE__ */
|
|
607
|
+
children: [v.length === 0 && /* @__PURE__ */ Y(L, {
|
|
608
608
|
className: "kol-mono-10 text-meta",
|
|
609
609
|
children: "No effects yet — add one below."
|
|
610
|
-
}), /* @__PURE__ */
|
|
610
|
+
}), /* @__PURE__ */ Y(Ft, {
|
|
611
611
|
...e,
|
|
612
612
|
from: 0
|
|
613
613
|
})]
|
|
614
614
|
}),
|
|
615
|
-
/* @__PURE__ */
|
|
616
|
-
/* @__PURE__ */
|
|
615
|
+
/* @__PURE__ */ Y(st, {}),
|
|
616
|
+
/* @__PURE__ */ Y(H, {
|
|
617
617
|
label: N.label,
|
|
618
618
|
divided: !0,
|
|
619
|
-
children: /* @__PURE__ */
|
|
619
|
+
children: /* @__PURE__ */ Y(ct, {
|
|
620
620
|
variant: "subtle",
|
|
621
621
|
size: a,
|
|
622
622
|
className: "w-full",
|
|
@@ -628,20 +628,20 @@ function Pt({ layer: t, showMod: n }) {
|
|
|
628
628
|
}
|
|
629
629
|
})
|
|
630
630
|
})
|
|
631
|
-
] }), o === "anim" && y?.def?.sweeps && /* @__PURE__ */
|
|
631
|
+
] }), o === "anim" && y?.def?.sweeps && /* @__PURE__ */ Y(oe, {
|
|
632
632
|
sweeps: Array.isArray(y.params.sweeps) ? y.params.sweeps : [],
|
|
633
633
|
onChange: (e) => A("sweeps", e),
|
|
634
634
|
inline: !0
|
|
635
635
|
})]
|
|
636
636
|
});
|
|
637
637
|
}
|
|
638
|
-
if (!y) return /* @__PURE__ */
|
|
638
|
+
if (!y) return /* @__PURE__ */ Y(Nt, {
|
|
639
639
|
chips: w,
|
|
640
640
|
active: null,
|
|
641
641
|
onPick: E,
|
|
642
642
|
spread: S,
|
|
643
643
|
fx: !0,
|
|
644
|
-
tabStrip: /* @__PURE__ */
|
|
644
|
+
tabStrip: /* @__PURE__ */ Y(U, {
|
|
645
645
|
variant: "filled",
|
|
646
646
|
value: o,
|
|
647
647
|
onChange: c,
|
|
@@ -649,12 +649,12 @@ function Pt({ layer: t, showMod: n }) {
|
|
|
649
649
|
size: a,
|
|
650
650
|
className: C(a)
|
|
651
651
|
}),
|
|
652
|
-
children: /* @__PURE__ */
|
|
652
|
+
children: /* @__PURE__ */ Y(I, {
|
|
653
653
|
schema: Ue,
|
|
654
654
|
layer: t,
|
|
655
655
|
setProp: _.setProp,
|
|
656
656
|
palette: g,
|
|
657
|
-
renderAnimate: (e) => /* @__PURE__ */
|
|
657
|
+
renderAnimate: (e) => /* @__PURE__ */ Y(le, {
|
|
658
658
|
layer: t,
|
|
659
659
|
param: e,
|
|
660
660
|
setProp: _.setProp
|
|
@@ -679,15 +679,15 @@ function Pt({ layer: t, showMod: n }) {
|
|
|
679
679
|
renderAnimate: j,
|
|
680
680
|
inline: !0
|
|
681
681
|
};
|
|
682
|
-
return /* @__PURE__ */
|
|
682
|
+
return /* @__PURE__ */ X(Nt, {
|
|
683
683
|
chips: w,
|
|
684
684
|
active: y.id,
|
|
685
685
|
onPick: E,
|
|
686
686
|
spread: S,
|
|
687
687
|
title: T,
|
|
688
688
|
fx: !0,
|
|
689
|
-
preStrip: /* @__PURE__ */
|
|
690
|
-
tabStrip: /* @__PURE__ */
|
|
689
|
+
preStrip: /* @__PURE__ */ Y(wt, { layer: t }),
|
|
690
|
+
tabStrip: /* @__PURE__ */ Y(U, {
|
|
691
691
|
variant: "filled",
|
|
692
692
|
value: o,
|
|
693
693
|
onChange: c,
|
|
@@ -695,17 +695,17 @@ function Pt({ layer: t, showMod: n }) {
|
|
|
695
695
|
size: a,
|
|
696
696
|
className: C(a)
|
|
697
697
|
}),
|
|
698
|
-
children: [o === "effect" && /* @__PURE__ */
|
|
699
|
-
se.length > 0 && /* @__PURE__ */
|
|
698
|
+
children: [o === "effect" && /* @__PURE__ */ X(J, { children: [
|
|
699
|
+
se.length > 0 && /* @__PURE__ */ Y(I, {
|
|
700
700
|
schema: se,
|
|
701
701
|
...de
|
|
702
702
|
}),
|
|
703
|
-
/* @__PURE__ */
|
|
703
|
+
/* @__PURE__ */ X(H, {
|
|
704
704
|
divided: !0,
|
|
705
|
-
children: [/* @__PURE__ */
|
|
705
|
+
children: [/* @__PURE__ */ Y(I, {
|
|
706
706
|
schema: ue,
|
|
707
707
|
...de
|
|
708
|
-
}), /* @__PURE__ */
|
|
708
|
+
}), /* @__PURE__ */ Y(ie, {
|
|
709
709
|
inline: !0,
|
|
710
710
|
def: y.def,
|
|
711
711
|
view: O,
|
|
@@ -713,12 +713,12 @@ function Pt({ layer: t, showMod: n }) {
|
|
|
713
713
|
onPatch: M
|
|
714
714
|
})]
|
|
715
715
|
}),
|
|
716
|
-
/* @__PURE__ */
|
|
717
|
-
B < P.length && /* @__PURE__ */
|
|
716
|
+
/* @__PURE__ */ Y(st, {}),
|
|
717
|
+
B < P.length && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(I, {
|
|
718
718
|
schema: P.slice(B),
|
|
719
719
|
...de
|
|
720
|
-
}), /* @__PURE__ */
|
|
721
|
-
/* @__PURE__ */
|
|
720
|
+
}), /* @__PURE__ */ Y(st, {})] }),
|
|
721
|
+
/* @__PURE__ */ Y(It, {
|
|
722
722
|
chain: v,
|
|
723
723
|
layer: t,
|
|
724
724
|
hostView: O,
|
|
@@ -729,20 +729,20 @@ function Pt({ layer: t, showMod: n }) {
|
|
|
729
729
|
palette: g,
|
|
730
730
|
showMod: n
|
|
731
731
|
})
|
|
732
|
-
] }), o === "anim" && /* @__PURE__ */
|
|
733
|
-
/* @__PURE__ */
|
|
732
|
+
] }), o === "anim" && /* @__PURE__ */ X(J, { children: [
|
|
733
|
+
/* @__PURE__ */ Y(I, {
|
|
734
734
|
schema: y.def.params,
|
|
735
735
|
...de,
|
|
736
736
|
tab: "anim"
|
|
737
737
|
}),
|
|
738
|
-
/* @__PURE__ */
|
|
738
|
+
/* @__PURE__ */ Y(ie, {
|
|
739
739
|
inline: !0,
|
|
740
740
|
def: y.def,
|
|
741
741
|
view: O,
|
|
742
742
|
tab: "anim",
|
|
743
743
|
onPatch: M
|
|
744
744
|
}),
|
|
745
|
-
y.def.sweeps && /* @__PURE__ */
|
|
745
|
+
y.def.sweeps && /* @__PURE__ */ Y(oe, {
|
|
746
746
|
sweeps: Array.isArray(y.params.sweeps) ? y.params.sweeps : [],
|
|
747
747
|
onChange: (e) => A("sweeps", e),
|
|
748
748
|
inline: !0
|
|
@@ -758,36 +758,40 @@ function Ft({ chain: t, from: n = 0, layer: r, hostView: a, toggleFilter: o, rem
|
|
|
758
758
|
...t.params,
|
|
759
759
|
id: r.id
|
|
760
760
|
}, h = c(f);
|
|
761
|
-
return /* @__PURE__ */
|
|
762
|
-
className: "flex flex-col gap-2 p-2 rounded bg-
|
|
763
|
-
children: [/* @__PURE__ */
|
|
761
|
+
return /* @__PURE__ */ X("div", {
|
|
762
|
+
className: "flex flex-col gap-2 p-2 rounded bg-oq-04",
|
|
763
|
+
children: [/* @__PURE__ */ X("div", {
|
|
764
764
|
className: "flex items-center gap-2",
|
|
765
|
-
children: [/* @__PURE__ */
|
|
765
|
+
children: [/* @__PURE__ */ Y(ut, {
|
|
766
766
|
size: d,
|
|
767
767
|
checked: p,
|
|
768
768
|
onChange: () => o(r.id, f),
|
|
769
769
|
label: t.def?.label ?? t.id
|
|
770
|
-
}), /* @__PURE__ */
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
770
|
+
}), /* @__PURE__ */ Y(W, {
|
|
771
|
+
asChild: !0,
|
|
772
|
+
label: "Remove effect",
|
|
773
|
+
children: /* @__PURE__ */ Y("button", {
|
|
774
|
+
type: "button",
|
|
775
|
+
"aria-label": "Remove effect",
|
|
776
|
+
onClick: () => s(r.id, f),
|
|
777
|
+
className: "ml-auto inline-flex items-center justify-center w-5 h-5 shrink-0 text-oq-64 hover:text-emphasis cursor-pointer",
|
|
778
|
+
style: {
|
|
779
|
+
border: "none",
|
|
780
|
+
background: "transparent"
|
|
781
|
+
},
|
|
782
|
+
children: /* @__PURE__ */ Y(Z, {
|
|
783
|
+
name: "x",
|
|
784
|
+
size: 12
|
|
785
|
+
})
|
|
782
786
|
})
|
|
783
787
|
})]
|
|
784
|
-
}), p && t.def && /* @__PURE__ */
|
|
788
|
+
}), p && t.def && /* @__PURE__ */ Y(I, {
|
|
785
789
|
schema: t.def.params.filter((t) => e(t) !== "anim"),
|
|
786
790
|
layer: m,
|
|
787
791
|
setProp: h,
|
|
788
792
|
palette: l,
|
|
789
793
|
inline: !0,
|
|
790
|
-
renderAnimate: u ? (e) => /* @__PURE__ */
|
|
794
|
+
renderAnimate: u ? (e) => /* @__PURE__ */ Y(le, {
|
|
791
795
|
layer: m,
|
|
792
796
|
param: e,
|
|
793
797
|
setProp: h
|
|
@@ -804,10 +808,10 @@ function It({ chain: e, layer: t, hostView: n, addFilter: r, removeFilter: a, to
|
|
|
804
808
|
value: e.id,
|
|
805
809
|
label: e.label ?? e.id
|
|
806
810
|
}))];
|
|
807
|
-
return /* @__PURE__ */
|
|
811
|
+
return /* @__PURE__ */ X(H, {
|
|
808
812
|
label: "Post-Processing",
|
|
809
813
|
divided: !0,
|
|
810
|
-
children: [/* @__PURE__ */
|
|
814
|
+
children: [/* @__PURE__ */ Y(Ft, {
|
|
811
815
|
chain: e,
|
|
812
816
|
from: 1,
|
|
813
817
|
layer: t,
|
|
@@ -817,7 +821,7 @@ function It({ chain: e, layer: t, hostView: n, addFilter: r, removeFilter: a, to
|
|
|
817
821
|
setStagePropAt: s,
|
|
818
822
|
palette: c,
|
|
819
823
|
showMod: l
|
|
820
|
-
}), /* @__PURE__ */
|
|
824
|
+
}), /* @__PURE__ */ Y(ct, {
|
|
821
825
|
variant: "subtle",
|
|
822
826
|
size: u,
|
|
823
827
|
className: "w-full",
|
|
@@ -831,7 +835,7 @@ function It({ chain: e, layer: t, hostView: n, addFilter: r, removeFilter: a, to
|
|
|
831
835
|
});
|
|
832
836
|
}
|
|
833
837
|
function Lt({ layer: e, showMod: t, tree: n }) {
|
|
834
|
-
let r = i(), [a, o] =
|
|
838
|
+
let r = i(), [a, o] = q("generate"), { updateLayer: c, palette: l } = f(), { setOnly: u } = Q(), d = ee(e.id, { history: "coalesce" }), p = T(e.loopGroup).find((t) => t.id === e.presetId), h = O(e.loopGroup)?.label ?? "", g = e.loopGroup === "paratype" && p?.sub === "Glyphs" ? E("paratype", "Glyphs") : null, _ = g ? g.map((e) => ({
|
|
835
839
|
value: e.id,
|
|
836
840
|
label: e.label
|
|
837
841
|
})) : null;
|
|
@@ -840,7 +844,7 @@ function Lt({ layer: e, showMod: t, tree: n }) {
|
|
|
840
844
|
}, () => {
|
|
841
845
|
let t = k(e.loopId)?.params ?? [];
|
|
842
846
|
c(e.id, s(e, m(t, e), b(), { withFilters: !0 }));
|
|
843
|
-
}), /* @__PURE__ */
|
|
847
|
+
}), /* @__PURE__ */ Y(Nt, {
|
|
844
848
|
title: h,
|
|
845
849
|
chips: _,
|
|
846
850
|
active: e.presetId,
|
|
@@ -849,8 +853,8 @@ function Lt({ layer: e, showMod: t, tree: n }) {
|
|
|
849
853
|
n && t !== e.presetId && u(e.type, D(n, e.loopGroup));
|
|
850
854
|
},
|
|
851
855
|
pills: !0,
|
|
852
|
-
preStrip: e.loopGroup === "distress" ? /* @__PURE__ */
|
|
853
|
-
tabStrip: /* @__PURE__ */
|
|
856
|
+
preStrip: e.loopGroup === "distress" ? /* @__PURE__ */ Y(wt, { layer: e }) : void 0,
|
|
857
|
+
tabStrip: /* @__PURE__ */ Y(U, {
|
|
854
858
|
variant: "filled",
|
|
855
859
|
value: a,
|
|
856
860
|
onChange: o,
|
|
@@ -858,13 +862,13 @@ function Lt({ layer: e, showMod: t, tree: n }) {
|
|
|
858
862
|
size: r,
|
|
859
863
|
className: C(r)
|
|
860
864
|
}),
|
|
861
|
-
children: /* @__PURE__ */
|
|
865
|
+
children: /* @__PURE__ */ Y(P, {
|
|
862
866
|
layer: e,
|
|
863
867
|
setProp: d.setProp,
|
|
864
868
|
patch: d.patch,
|
|
865
869
|
updateLayer: c,
|
|
866
870
|
palette: l,
|
|
867
|
-
renderAnimate: t ? (t) => /* @__PURE__ */
|
|
871
|
+
renderAnimate: t ? (t) => /* @__PURE__ */ Y(le, {
|
|
868
872
|
layer: e,
|
|
869
873
|
param: t,
|
|
870
874
|
setProp: d.setProp
|
|
@@ -877,7 +881,7 @@ function Lt({ layer: e, showMod: t, tree: n }) {
|
|
|
877
881
|
});
|
|
878
882
|
}
|
|
879
883
|
function Rt({ layer: e, showMod: t }) {
|
|
880
|
-
let n = i(), [r, a] =
|
|
884
|
+
let n = i(), [r, a] = q("generate"), { updateLayer: o, palette: s } = f(), { setOnly: c } = Q(), l = ee(e.id, { history: "coalesce" }), u = ue.find((t) => t.id === e.presetId), d = pe.find((e) => e.subs.includes(u?.sub))?.label ?? "Kinetic";
|
|
881
885
|
return Ot(() => {
|
|
882
886
|
u && c("kinetic", {
|
|
883
887
|
presetId: u.id,
|
|
@@ -892,9 +896,9 @@ function Rt({ layer: e, showMod: t }) {
|
|
|
892
896
|
comp: r,
|
|
893
897
|
_rollSeed: t
|
|
894
898
|
});
|
|
895
|
-
}), /* @__PURE__ */
|
|
899
|
+
}), /* @__PURE__ */ Y(Nt, {
|
|
896
900
|
title: d,
|
|
897
|
-
tabStrip: /* @__PURE__ */
|
|
901
|
+
tabStrip: /* @__PURE__ */ Y(U, {
|
|
898
902
|
variant: "filled",
|
|
899
903
|
value: r,
|
|
900
904
|
onChange: a,
|
|
@@ -902,12 +906,12 @@ function Rt({ layer: e, showMod: t }) {
|
|
|
902
906
|
size: n,
|
|
903
907
|
className: C(n)
|
|
904
908
|
}),
|
|
905
|
-
children: /* @__PURE__ */
|
|
909
|
+
children: /* @__PURE__ */ Y(me, {
|
|
906
910
|
layer: e,
|
|
907
911
|
setProp: l.setProp,
|
|
908
912
|
updateLayer: o,
|
|
909
913
|
palette: s,
|
|
910
|
-
renderAnimate: t ? (t) => /* @__PURE__ */
|
|
914
|
+
renderAnimate: t ? (t) => /* @__PURE__ */ Y(le, {
|
|
911
915
|
layer: e,
|
|
912
916
|
param: t,
|
|
913
917
|
setProp: l.setProp
|
|
@@ -918,28 +922,28 @@ function Rt({ layer: e, showMod: t }) {
|
|
|
918
922
|
});
|
|
919
923
|
}
|
|
920
924
|
function zt() {
|
|
921
|
-
let { layer: e } =
|
|
922
|
-
return
|
|
925
|
+
let { layer: e } = Q(), t = !!g().labsModDots;
|
|
926
|
+
return G(() => {
|
|
923
927
|
let e = (e) => {
|
|
924
928
|
if (e.key !== "m" && e.key !== "M" || e.metaKey || e.ctrlKey || e.altKey) return;
|
|
925
929
|
let t = e.target;
|
|
926
930
|
t?.tagName === "INPUT" || t?.tagName === "TEXTAREA" || t?.isContentEditable || d("labsModDots", !v().labsModDots);
|
|
927
931
|
};
|
|
928
932
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
929
|
-
}, []), e ? e.type === "photo" ? /* @__PURE__ */
|
|
933
|
+
}, []), e ? e.type === "photo" ? /* @__PURE__ */ Y(Pt, {
|
|
930
934
|
layer: e,
|
|
931
935
|
showMod: t
|
|
932
|
-
}, e.id) : e.type === "loop" ? /* @__PURE__ */
|
|
936
|
+
}, e.id) : e.type === "loop" ? /* @__PURE__ */ Y(Lt, {
|
|
933
937
|
layer: e,
|
|
934
938
|
showMod: t
|
|
935
|
-
}, e.id) : e.type === "misc" ? /* @__PURE__ */
|
|
939
|
+
}, e.id) : e.type === "misc" ? /* @__PURE__ */ Y(Lt, {
|
|
936
940
|
layer: e,
|
|
937
941
|
showMod: t,
|
|
938
942
|
tree: N
|
|
939
|
-
}, e.id) : e.type === "kinetic" ? /* @__PURE__ */
|
|
943
|
+
}, e.id) : e.type === "kinetic" ? /* @__PURE__ */ Y(Rt, {
|
|
940
944
|
layer: e,
|
|
941
945
|
showMod: t
|
|
942
|
-
}, e.id) : /* @__PURE__ */
|
|
946
|
+
}, e.id) : /* @__PURE__ */ Y(L, { children: "This layer has no labs surface." }) : /* @__PURE__ */ Y(L, { children: "Pick an effect or generator from the nav." });
|
|
943
947
|
}
|
|
944
948
|
//#endregion
|
|
945
949
|
//#region src/editor/labs/LabsShortcuts.jsx
|
|
@@ -961,71 +965,71 @@ var Bt = [
|
|
|
961
965
|
["Constants", "PI TAU PHI E"]
|
|
962
966
|
], Ht = () => [...Pe("labs").flatMap(({ items: e }) => e.map((e) => [_e(e.combo), e.label])), ["Esc", "close"]];
|
|
963
967
|
function Ut() {
|
|
964
|
-
let [e, t] =
|
|
965
|
-
return
|
|
968
|
+
let [e, t] = q(!1);
|
|
969
|
+
return G(() => {
|
|
966
970
|
let e = (e) => {
|
|
967
971
|
let n = e.target;
|
|
968
972
|
n?.tagName === "INPUT" || n?.tagName === "TEXTAREA" || n?.isContentEditable || (e.key === "Escape" && t(!1), (e.key === "s" || e.key === "S") && !e.metaKey && !e.ctrlKey && !e.altKey && (e.preventDefault(), t((e) => !e)));
|
|
969
973
|
};
|
|
970
974
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
971
|
-
}, []), e ? /* @__PURE__ */
|
|
975
|
+
}, []), e ? /* @__PURE__ */ Y(lt, {
|
|
972
976
|
open: !0,
|
|
973
977
|
onClose: () => t(!1),
|
|
974
|
-
children: /* @__PURE__ */
|
|
978
|
+
children: /* @__PURE__ */ X("div", {
|
|
975
979
|
className: "flex flex-col",
|
|
976
980
|
style: {
|
|
977
981
|
width: 640,
|
|
978
982
|
maxWidth: "100%"
|
|
979
983
|
},
|
|
980
|
-
children: [/* @__PURE__ */
|
|
984
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
981
985
|
className: "flex items-start justify-between px-6 pt-5",
|
|
982
|
-
children: /* @__PURE__ */
|
|
986
|
+
children: /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
|
|
983
987
|
className: "kol-eyebrow text-meta mb-1",
|
|
984
988
|
children: "Shortcuts"
|
|
985
|
-
}), /* @__PURE__ */
|
|
989
|
+
}), /* @__PURE__ */ Y("p", {
|
|
986
990
|
className: "kol-mono-16 text-emphasis",
|
|
987
991
|
children: "Animate any value"
|
|
988
992
|
})] })
|
|
989
|
-
}), /* @__PURE__ */
|
|
993
|
+
}), /* @__PURE__ */ X("div", {
|
|
990
994
|
className: "overflow-y-auto px-6 pb-6 flex flex-col gap-5",
|
|
991
995
|
children: [
|
|
992
|
-
/* @__PURE__ */
|
|
996
|
+
/* @__PURE__ */ X("p", {
|
|
993
997
|
className: "kol-mono-12 text-body",
|
|
994
998
|
children: [
|
|
995
999
|
"Type math into any slider's number box instead of a number. It re-evaluates every frame, so the value animates — no keyframes.",
|
|
996
1000
|
" ",
|
|
997
|
-
/* @__PURE__ */
|
|
1001
|
+
/* @__PURE__ */ Y("span", {
|
|
998
1002
|
className: "text-emphasis",
|
|
999
1003
|
children: "t"
|
|
1000
1004
|
}),
|
|
1001
1005
|
" is the playhead in seconds, so it pauses / scrubs / tempo-scales with the transport. Drag the slider to clear an expression."
|
|
1002
1006
|
]
|
|
1003
1007
|
}),
|
|
1004
|
-
/* @__PURE__ */
|
|
1008
|
+
/* @__PURE__ */ Y(H, {
|
|
1005
1009
|
label: "Examples",
|
|
1006
|
-
children: /* @__PURE__ */
|
|
1010
|
+
children: /* @__PURE__ */ Y("div", {
|
|
1007
1011
|
className: "flex flex-col gap-1",
|
|
1008
|
-
children: Bt.map(([e, t]) => /* @__PURE__ */
|
|
1012
|
+
children: Bt.map(([e, t]) => /* @__PURE__ */ X("div", {
|
|
1009
1013
|
className: "flex items-center gap-4",
|
|
1010
|
-
children: [/* @__PURE__ */
|
|
1011
|
-
className: "kol-mono-12 text-emphasis bg-
|
|
1014
|
+
children: [/* @__PURE__ */ Y("code", {
|
|
1015
|
+
className: "kol-mono-12 text-emphasis bg-oq-04 rounded px-2 py-0.5",
|
|
1012
1016
|
style: { minWidth: 132 },
|
|
1013
1017
|
children: e
|
|
1014
|
-
}), /* @__PURE__ */
|
|
1018
|
+
}), /* @__PURE__ */ Y("span", {
|
|
1015
1019
|
className: "kol-mono-12 text-body flex-1 min-w-0",
|
|
1016
1020
|
children: t
|
|
1017
1021
|
})]
|
|
1018
1022
|
}, e))
|
|
1019
1023
|
})
|
|
1020
1024
|
}),
|
|
1021
|
-
/* @__PURE__ */
|
|
1025
|
+
/* @__PURE__ */ Y(H, {
|
|
1022
1026
|
label: "Loop",
|
|
1023
|
-
children: /* @__PURE__ */
|
|
1027
|
+
children: /* @__PURE__ */ X("p", {
|
|
1024
1028
|
className: "kol-mono-12 text-body",
|
|
1025
1029
|
children: [
|
|
1026
1030
|
"The transport clock is a loop, not a BPM —",
|
|
1027
1031
|
" ",
|
|
1028
|
-
/* @__PURE__ */
|
|
1032
|
+
/* @__PURE__ */ Y("span", {
|
|
1029
1033
|
className: "text-emphasis",
|
|
1030
1034
|
children: "Loop / N s"
|
|
1031
1035
|
}),
|
|
@@ -1033,30 +1037,30 @@ function Ut() {
|
|
|
1033
1037
|
]
|
|
1034
1038
|
})
|
|
1035
1039
|
}),
|
|
1036
|
-
/* @__PURE__ */
|
|
1040
|
+
/* @__PURE__ */ Y(H, {
|
|
1037
1041
|
label: "Functions",
|
|
1038
|
-
children: /* @__PURE__ */
|
|
1042
|
+
children: /* @__PURE__ */ Y("div", {
|
|
1039
1043
|
className: "flex flex-col gap-2",
|
|
1040
|
-
children: Vt.map(([e, t]) => /* @__PURE__ */
|
|
1044
|
+
children: Vt.map(([e, t]) => /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
|
|
1041
1045
|
className: "kol-helper-10 text-subtle",
|
|
1042
1046
|
children: e
|
|
1043
|
-
}), /* @__PURE__ */
|
|
1047
|
+
}), /* @__PURE__ */ Y("p", {
|
|
1044
1048
|
className: "kol-mono-12 text-emphasis",
|
|
1045
1049
|
children: t
|
|
1046
1050
|
})] }, e))
|
|
1047
1051
|
})
|
|
1048
1052
|
}),
|
|
1049
|
-
/* @__PURE__ */
|
|
1053
|
+
/* @__PURE__ */ Y("div", {
|
|
1050
1054
|
className: "pt-3 border-t border-oq-08 flex flex-wrap gap-x-5 gap-y-1",
|
|
1051
|
-
children: Ht().map(([e, t]) => /* @__PURE__ */
|
|
1055
|
+
children: Ht().map(([e, t]) => /* @__PURE__ */ X("span", {
|
|
1052
1056
|
className: "kol-mono-12",
|
|
1053
1057
|
children: [
|
|
1054
|
-
/* @__PURE__ */
|
|
1058
|
+
/* @__PURE__ */ Y("span", {
|
|
1055
1059
|
className: "text-emphasis",
|
|
1056
1060
|
children: e
|
|
1057
1061
|
}),
|
|
1058
1062
|
" ",
|
|
1059
|
-
/* @__PURE__ */
|
|
1063
|
+
/* @__PURE__ */ Y("span", {
|
|
1060
1064
|
className: "text-meta",
|
|
1061
1065
|
children: t
|
|
1062
1066
|
})
|
|
@@ -1078,15 +1082,15 @@ var Wt = .85, Gt = .3, Kt = 2.5, qt = {
|
|
|
1078
1082
|
4: 2
|
|
1079
1083
|
}, Jt = "px-2 py-1 rounded border border-oq-08 bg-surface-secondary kol-mono-12 text-emphasis tabular-nums";
|
|
1080
1084
|
function Yt() {
|
|
1081
|
-
let { layer: e } =
|
|
1082
|
-
return f.current = d,
|
|
1085
|
+
let { layer: e } = Q(), t = e?.type === "photo" && !e.src && e.srcType !== "webcam", [n, r] = q(1), [i, a] = q(!1), o = Te(i), s = K(null), c = (e) => Math.min(Kt, Math.max(Gt, e)), l = (e) => r((t) => c(t * (e > 0 ? 1.25 : .8))), { tool: u } = Se(), d = u === "orbit", f = K(d);
|
|
1086
|
+
return f.current = d, G(() => {
|
|
1083
1087
|
let e = s.current;
|
|
1084
1088
|
if (!e) return;
|
|
1085
1089
|
let t = (e) => {
|
|
1086
1090
|
f.current || (e.preventDefault(), r((t) => c(t * (e.deltaY > 0 ? .94 : 1.06))));
|
|
1087
1091
|
};
|
|
1088
1092
|
return e.addEventListener("wheel", t, { passive: !1 }), () => e.removeEventListener("wheel", t);
|
|
1089
|
-
}, []),
|
|
1093
|
+
}, []), G(() => {
|
|
1090
1094
|
let e = (e) => {
|
|
1091
1095
|
if (e.metaKey || e.ctrlKey || e.altKey) return;
|
|
1092
1096
|
let t = e.target;
|
|
@@ -1099,23 +1103,23 @@ function Yt() {
|
|
|
1099
1103
|
}
|
|
1100
1104
|
};
|
|
1101
1105
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
1102
|
-
}, []), /* @__PURE__ */
|
|
1106
|
+
}, []), /* @__PURE__ */ X("div", {
|
|
1103
1107
|
ref: s,
|
|
1104
1108
|
className: "relative w-full h-full flex items-center justify-center",
|
|
1105
1109
|
style: { background: "var(--kol-surface-secondary)" },
|
|
1106
1110
|
onDoubleClick: () => r(1),
|
|
1107
|
-
children: [t ? /* @__PURE__ */
|
|
1111
|
+
children: [t ? /* @__PURE__ */ Y(Dt, { layer: e }) : /* @__PURE__ */ Y("div", {
|
|
1108
1112
|
style: {
|
|
1109
1113
|
width: `${n * Wt * 100}%`,
|
|
1110
1114
|
height: `${n * Wt * 100}%`
|
|
1111
1115
|
},
|
|
1112
|
-
children: /* @__PURE__ */
|
|
1113
|
-
}), /* @__PURE__ */
|
|
1116
|
+
children: /* @__PURE__ */ Y(tt, {})
|
|
1117
|
+
}), /* @__PURE__ */ X("div", {
|
|
1114
1118
|
className: "absolute bottom-3 right-3 z-[3] flex items-center gap-2",
|
|
1115
1119
|
children: [
|
|
1116
|
-
/* @__PURE__ */
|
|
1120
|
+
/* @__PURE__ */ Y(W, {
|
|
1117
1121
|
label: "Zoom out",
|
|
1118
|
-
children: /* @__PURE__ */
|
|
1122
|
+
children: /* @__PURE__ */ Y("button", {
|
|
1119
1123
|
"aria-label": "Zoom out",
|
|
1120
1124
|
type: "button",
|
|
1121
1125
|
className: Jt,
|
|
@@ -1123,9 +1127,9 @@ function Yt() {
|
|
|
1123
1127
|
children: "−"
|
|
1124
1128
|
})
|
|
1125
1129
|
}),
|
|
1126
|
-
/* @__PURE__ */
|
|
1130
|
+
/* @__PURE__ */ Y(W, {
|
|
1127
1131
|
label: "Reset zoom (0)",
|
|
1128
|
-
children: /* @__PURE__ */
|
|
1132
|
+
children: /* @__PURE__ */ X("button", {
|
|
1129
1133
|
"aria-label": "Reset zoom (0)",
|
|
1130
1134
|
type: "button",
|
|
1131
1135
|
className: Jt,
|
|
@@ -1133,9 +1137,9 @@ function Yt() {
|
|
|
1133
1137
|
children: [Math.round(n * 100), "%"]
|
|
1134
1138
|
})
|
|
1135
1139
|
}),
|
|
1136
|
-
/* @__PURE__ */
|
|
1140
|
+
/* @__PURE__ */ Y(W, {
|
|
1137
1141
|
label: "Zoom in",
|
|
1138
|
-
children: /* @__PURE__ */
|
|
1142
|
+
children: /* @__PURE__ */ Y("button", {
|
|
1139
1143
|
"aria-label": "Zoom in",
|
|
1140
1144
|
type: "button",
|
|
1141
1145
|
className: Jt,
|
|
@@ -1143,9 +1147,9 @@ function Yt() {
|
|
|
1143
1147
|
children: "+"
|
|
1144
1148
|
})
|
|
1145
1149
|
}),
|
|
1146
|
-
i && /* @__PURE__ */
|
|
1150
|
+
i && /* @__PURE__ */ Y(W, {
|
|
1147
1151
|
label: "Framerate — press F to hide",
|
|
1148
|
-
children: /* @__PURE__ */
|
|
1152
|
+
children: /* @__PURE__ */ X("span", {
|
|
1149
1153
|
className: Jt,
|
|
1150
1154
|
children: [o, " fps"]
|
|
1151
1155
|
})
|
|
@@ -1155,11 +1159,11 @@ function Yt() {
|
|
|
1155
1159
|
});
|
|
1156
1160
|
}
|
|
1157
1161
|
function Xt() {
|
|
1158
|
-
let e =
|
|
1162
|
+
let e = K(null), { grabProps: t } = mt(e, {
|
|
1159
1163
|
token: "kol-rail",
|
|
1160
1164
|
side: "right"
|
|
1161
1165
|
});
|
|
1162
|
-
return
|
|
1166
|
+
return G(() => {
|
|
1163
1167
|
let e = document.documentElement, t = !1, n = () => {
|
|
1164
1168
|
let t = parseFloat(getComputedStyle(e).getPropertyValue("--kol-shell-rail-width"));
|
|
1165
1169
|
return Number.isFinite(t) ? t <= 49 : null;
|
|
@@ -1196,36 +1200,39 @@ function Xt() {
|
|
|
1196
1200
|
}), () => {
|
|
1197
1201
|
c.disconnect(), l.disconnect();
|
|
1198
1202
|
};
|
|
1199
|
-
}, []), /* @__PURE__ */
|
|
1203
|
+
}, []), /* @__PURE__ */ X("div", {
|
|
1200
1204
|
ref: e,
|
|
1201
1205
|
className: "kol-compose-rail kol-compose-rail--inspector",
|
|
1202
|
-
children: [/* @__PURE__ */
|
|
1206
|
+
children: [/* @__PURE__ */ Y("div", { ...t }), /* @__PURE__ */ Y("div", {
|
|
1203
1207
|
className: "kol-compose-inspector-body",
|
|
1204
|
-
children: /* @__PURE__ */
|
|
1208
|
+
children: /* @__PURE__ */ Y(zt, {})
|
|
1205
1209
|
})]
|
|
1206
1210
|
});
|
|
1207
1211
|
}
|
|
1208
|
-
var Zt =
|
|
1212
|
+
var Zt = dt(null);
|
|
1209
1213
|
function Qt() {
|
|
1210
|
-
let { paramsOpen: e, toggleParams: t } =
|
|
1211
|
-
return /* @__PURE__ */
|
|
1214
|
+
let { paramsOpen: e, toggleParams: t } = pt(Zt);
|
|
1215
|
+
return /* @__PURE__ */ Y("div", {
|
|
1212
1216
|
className: "flex h-12 shrink-0 items-center border-b border-oq-08 bg-surface-primary px-2",
|
|
1213
|
-
children: /* @__PURE__ */
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1217
|
+
children: /* @__PURE__ */ Y(W, {
|
|
1218
|
+
label: "Parameters",
|
|
1219
|
+
children: /* @__PURE__ */ Y(V, {
|
|
1220
|
+
variant: "nav",
|
|
1221
|
+
size: "lg",
|
|
1222
|
+
iconOnly: "panel-right",
|
|
1223
|
+
"aria-label": "Parameters",
|
|
1224
|
+
pressed: e,
|
|
1225
|
+
onClick: t
|
|
1226
|
+
})
|
|
1220
1227
|
})
|
|
1221
1228
|
});
|
|
1222
1229
|
}
|
|
1223
1230
|
function $t() {
|
|
1224
|
-
return /* @__PURE__ */
|
|
1231
|
+
return /* @__PURE__ */ Y("div", {
|
|
1225
1232
|
className: "kol-compose-rail kol-compose-rail--inspector",
|
|
1226
|
-
children: /* @__PURE__ */
|
|
1233
|
+
children: /* @__PURE__ */ Y("div", {
|
|
1227
1234
|
className: "kol-compose-inspector-body",
|
|
1228
|
-
children: /* @__PURE__ */
|
|
1235
|
+
children: /* @__PURE__ */ Y(zt, {})
|
|
1229
1236
|
})
|
|
1230
1237
|
});
|
|
1231
1238
|
}
|
|
@@ -1258,22 +1265,22 @@ var en = {
|
|
|
1258
1265
|
} : e)
|
|
1259
1266
|
};
|
|
1260
1267
|
function nn() {
|
|
1261
|
-
let { setAspect: e, selectedId: n, select: r } = f(), { layer: i, setOnly: a } =
|
|
1262
|
-
ot(),
|
|
1268
|
+
let { setAspect: e, selectedId: n, select: r } = f(), { layer: i, setOnly: a } = Q(), o = K(!1), s = Qe() && !Xe(), [l, u] = q(!1);
|
|
1269
|
+
ot(), G(() => {
|
|
1263
1270
|
if (o.current) return;
|
|
1264
1271
|
o.current = !0;
|
|
1265
1272
|
let n = v();
|
|
1266
1273
|
n.defaultAspect && n.defaultAspect !== "custom" && e(n.defaultAspect), n.defaultLoopSeconds && t.setLoopSeconds(n.defaultLoopSeconds);
|
|
1267
1274
|
}, []);
|
|
1268
|
-
let d =
|
|
1269
|
-
|
|
1275
|
+
let d = K(!1);
|
|
1276
|
+
G(() => {
|
|
1270
1277
|
if (d.current) return;
|
|
1271
1278
|
d.current = !0;
|
|
1272
1279
|
let e = new URLSearchParams(window.location.search).get("preset"), t = e ? j(e) : null;
|
|
1273
1280
|
t && a("loop", D(w(e), t));
|
|
1274
1281
|
}, [a]);
|
|
1275
|
-
let { tool: p, setTool: m } = Se(), h =
|
|
1276
|
-
return h.current = p,
|
|
1282
|
+
let { tool: p, setTool: m } = Se(), h = K(p);
|
|
1283
|
+
return h.current = p, G(() => {
|
|
1277
1284
|
let e = (e) => {
|
|
1278
1285
|
let n = e.target;
|
|
1279
1286
|
if (!(n?.tagName === "INPUT" || n?.tagName === "TEXTAREA" || n?.isContentEditable)) {
|
|
@@ -1285,53 +1292,53 @@ function nn() {
|
|
|
1285
1292
|
}
|
|
1286
1293
|
};
|
|
1287
1294
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
1288
|
-
}, [m]),
|
|
1295
|
+
}, [m]), G(() => {
|
|
1289
1296
|
if (!i?.presetId) return;
|
|
1290
1297
|
let e = new URLSearchParams(window.location.search);
|
|
1291
1298
|
e.get("preset") !== i.presetId && (e.set("view", "labs"), e.set("preset", i.presetId), i.loopGroup ? e.set("cat", i.loopGroup) : e.delete("cat"), window.history.replaceState(null, "", `${window.location.pathname}?${e}`));
|
|
1292
|
-
}, [i?.presetId, i?.loopGroup]),
|
|
1299
|
+
}, [i?.presetId, i?.loopGroup]), G(() => {
|
|
1293
1300
|
i && n !== i.id && r(i.id);
|
|
1294
1301
|
}, [
|
|
1295
1302
|
i,
|
|
1296
1303
|
n,
|
|
1297
1304
|
r
|
|
1298
|
-
]), /* @__PURE__ */
|
|
1305
|
+
]), /* @__PURE__ */ X("div", {
|
|
1299
1306
|
className: "kol-editor-labs contents",
|
|
1300
1307
|
"data-touch": s || void 0,
|
|
1301
1308
|
"data-params": l ? "open" : void 0,
|
|
1302
1309
|
children: [
|
|
1303
|
-
/* @__PURE__ */
|
|
1304
|
-
s ? /* @__PURE__ */
|
|
1310
|
+
/* @__PURE__ */ Y(St, {}),
|
|
1311
|
+
s ? /* @__PURE__ */ Y(Zt.Provider, {
|
|
1305
1312
|
value: {
|
|
1306
1313
|
paramsOpen: l,
|
|
1307
1314
|
toggleParams: () => u((e) => !e)
|
|
1308
1315
|
},
|
|
1309
|
-
children: /* @__PURE__ */
|
|
1316
|
+
children: /* @__PURE__ */ Y(c.Provider, {
|
|
1310
1317
|
value: "md",
|
|
1311
|
-
children: /* @__PURE__ */
|
|
1318
|
+
children: /* @__PURE__ */ Y(Re, { registry: tn })
|
|
1312
1319
|
})
|
|
1313
|
-
}) : /* @__PURE__ */
|
|
1314
|
-
/* @__PURE__ */
|
|
1320
|
+
}) : /* @__PURE__ */ Y(Re, { registry: en }),
|
|
1321
|
+
/* @__PURE__ */ Y(Ut, {})
|
|
1315
1322
|
]
|
|
1316
1323
|
});
|
|
1317
1324
|
}
|
|
1318
1325
|
var rn = "kol.editor.labs-draft";
|
|
1319
1326
|
function an() {
|
|
1320
|
-
return /* @__PURE__ */
|
|
1327
|
+
return /* @__PURE__ */ Y(Ze, {
|
|
1321
1328
|
draftKey: rn,
|
|
1322
|
-
children: /* @__PURE__ */
|
|
1329
|
+
children: /* @__PURE__ */ Y(nn, {})
|
|
1323
1330
|
});
|
|
1324
1331
|
}
|
|
1325
1332
|
//#endregion
|
|
1326
1333
|
//#region src/editor/mobile/CategoryScreen.jsx
|
|
1327
1334
|
var on = "w-full [&>span]:w-full [&>span]:justify-between";
|
|
1328
1335
|
function sn(e) {
|
|
1329
|
-
|
|
1336
|
+
G(() => {
|
|
1330
1337
|
let t = (t) => {
|
|
1331
1338
|
t.key === "Escape" && e?.();
|
|
1332
1339
|
};
|
|
1333
1340
|
return window.addEventListener("keydown", t), () => window.removeEventListener("keydown", t);
|
|
1334
|
-
}, [e]),
|
|
1341
|
+
}, [e]), G(() => {
|
|
1335
1342
|
let e = t.isPlaying();
|
|
1336
1343
|
return t.pause(), () => {
|
|
1337
1344
|
e && t.play();
|
|
@@ -1339,22 +1346,22 @@ function sn(e) {
|
|
|
1339
1346
|
}, []);
|
|
1340
1347
|
}
|
|
1341
1348
|
function cn({ onPick: e, onInsert: t, onBack: n, onDismiss: r }) {
|
|
1342
|
-
return sn(r ?? n), /* @__PURE__ */
|
|
1349
|
+
return sn(r ?? n), /* @__PURE__ */ Y("div", {
|
|
1343
1350
|
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",
|
|
1344
1351
|
style: { zIndex: "var(--kol-z-modal)" },
|
|
1345
|
-
children: /* @__PURE__ */
|
|
1352
|
+
children: /* @__PURE__ */ X("div", {
|
|
1346
1353
|
className: "my-auto w-full max-w-sm rounded p-8 flex flex-col gap-6",
|
|
1347
1354
|
style: { background: "var(--kol-surface-primary)" },
|
|
1348
1355
|
children: [
|
|
1349
|
-
/* @__PURE__ */
|
|
1356
|
+
/* @__PURE__ */ Y("div", {
|
|
1350
1357
|
className: "kol-eyebrow text-body",
|
|
1351
1358
|
children: "Pick a generator"
|
|
1352
1359
|
}),
|
|
1353
|
-
/* @__PURE__ */
|
|
1360
|
+
/* @__PURE__ */ Y("div", {
|
|
1354
1361
|
className: "flex flex-col gap-2",
|
|
1355
1362
|
children: F.map((t) => {
|
|
1356
|
-
let n =
|
|
1357
|
-
return /* @__PURE__ */
|
|
1363
|
+
let n = $[`gen:${t.label}`] ?? "square";
|
|
1364
|
+
return /* @__PURE__ */ Y(V, {
|
|
1358
1365
|
variant: "primary",
|
|
1359
1366
|
size: "lg",
|
|
1360
1367
|
className: on,
|
|
@@ -1365,9 +1372,9 @@ function cn({ onPick: e, onInsert: t, onBack: n, onDismiss: r }) {
|
|
|
1365
1372
|
}, t.label);
|
|
1366
1373
|
})
|
|
1367
1374
|
}),
|
|
1368
|
-
/* @__PURE__ */
|
|
1375
|
+
/* @__PURE__ */ X("div", {
|
|
1369
1376
|
className: "flex flex-col gap-2",
|
|
1370
|
-
children: [t && /* @__PURE__ */
|
|
1377
|
+
children: [t && /* @__PURE__ */ Y(V, {
|
|
1371
1378
|
variant: "grey",
|
|
1372
1379
|
size: "lg",
|
|
1373
1380
|
className: "w-full [&>span]:w-full [&>span]:justify-between",
|
|
@@ -1375,7 +1382,7 @@ function cn({ onPick: e, onInsert: t, onBack: n, onDismiss: r }) {
|
|
|
1375
1382
|
iconRight: "image",
|
|
1376
1383
|
onClick: t,
|
|
1377
1384
|
children: "Insert image or video"
|
|
1378
|
-
}), n && /* @__PURE__ */
|
|
1385
|
+
}), n && /* @__PURE__ */ Y(V, {
|
|
1379
1386
|
variant: "grey",
|
|
1380
1387
|
size: "lg",
|
|
1381
1388
|
className: "w-full [&>span]:w-full [&>span]:justify-between",
|
|
@@ -1392,23 +1399,23 @@ function cn({ onPick: e, onInsert: t, onBack: n, onDismiss: r }) {
|
|
|
1392
1399
|
//#endregion
|
|
1393
1400
|
//#region src/editor/mobile/EffectScreen.jsx
|
|
1394
1401
|
function ln({ layer: e, chain: t, onPick: n, onBack: r }) {
|
|
1395
|
-
let [i, a] =
|
|
1402
|
+
let [i, a] = q(null);
|
|
1396
1403
|
sn(r);
|
|
1397
1404
|
let { engineHost: o } = se(e), s = o && !t.some((e) => e.def?.kind === "engine"), c = R(z.filter((e) => e.kind !== "engine" || s)), l = c.find((e) => e.id === i) ?? null;
|
|
1398
|
-
return /* @__PURE__ */
|
|
1405
|
+
return /* @__PURE__ */ Y("div", {
|
|
1399
1406
|
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",
|
|
1400
1407
|
style: { zIndex: "var(--kol-z-modal)" },
|
|
1401
|
-
children: /* @__PURE__ */
|
|
1408
|
+
children: /* @__PURE__ */ X("div", {
|
|
1402
1409
|
className: "my-auto w-full max-w-sm rounded p-8 flex flex-col gap-6",
|
|
1403
1410
|
style: { background: "var(--kol-surface-primary)" },
|
|
1404
1411
|
children: [
|
|
1405
|
-
/* @__PURE__ */
|
|
1412
|
+
/* @__PURE__ */ Y("div", {
|
|
1406
1413
|
className: "kol-eyebrow text-body",
|
|
1407
1414
|
children: l ? l.label : "Pick an effect"
|
|
1408
1415
|
}),
|
|
1409
|
-
/* @__PURE__ */
|
|
1416
|
+
/* @__PURE__ */ Y("div", {
|
|
1410
1417
|
className: "flex flex-col gap-2",
|
|
1411
|
-
children: (l ? l.filters : c).map((e) => /* @__PURE__ */
|
|
1418
|
+
children: (l ? l.filters : c).map((e) => /* @__PURE__ */ Y(V, {
|
|
1412
1419
|
variant: "primary",
|
|
1413
1420
|
size: "lg",
|
|
1414
1421
|
className: on,
|
|
@@ -1418,7 +1425,7 @@ function ln({ layer: e, chain: t, onPick: n, onBack: r }) {
|
|
|
1418
1425
|
children: e.label
|
|
1419
1426
|
}, e.id))
|
|
1420
1427
|
}),
|
|
1421
|
-
/* @__PURE__ */
|
|
1428
|
+
/* @__PURE__ */ Y(V, {
|
|
1422
1429
|
variant: "grey",
|
|
1423
1430
|
size: "lg",
|
|
1424
1431
|
className: on,
|
|
@@ -1460,7 +1467,7 @@ function gn(e) {
|
|
|
1460
1467
|
return r.length && n.push(r), n;
|
|
1461
1468
|
}
|
|
1462
1469
|
function _n({ cells: e }) {
|
|
1463
|
-
return gn(e).map((e, t) => /* @__PURE__ */
|
|
1470
|
+
return gn(e).map((e, t) => /* @__PURE__ */ Y(U, {
|
|
1464
1471
|
variant: "filled",
|
|
1465
1472
|
value: null,
|
|
1466
1473
|
onChange: (t) => e.find((e) => e.value === t)?.run(),
|
|
@@ -1481,7 +1488,7 @@ var vn = [
|
|
|
1481
1488
|
}));
|
|
1482
1489
|
function yn() {
|
|
1483
1490
|
let { loopSeconds: e, setLoopSeconds: t } = n();
|
|
1484
|
-
return /* @__PURE__ */
|
|
1491
|
+
return /* @__PURE__ */ Y(U, {
|
|
1485
1492
|
variant: "filled",
|
|
1486
1493
|
value: String(e),
|
|
1487
1494
|
onChange: (e) => t(Number(e)),
|
|
@@ -1526,9 +1533,9 @@ var bn = [
|
|
|
1526
1533
|
}
|
|
1527
1534
|
];
|
|
1528
1535
|
function Sn({ layer: e, onSwitchCategory: n, onInsert: i, onRestart: o, aspectValue: c, onAspect: d }) {
|
|
1529
|
-
let { updateLayer: p, addFilter: g, removeFilter: v } = f(), { onExportPng: y } = Ee(), [b, x] =
|
|
1536
|
+
let { updateLayer: p, addFilter: g, removeFilter: v } = f(), { onExportPng: y } = Ee(), [b, x] = q(!1), [S, C] = q(!0), [w, T] = q(!1), [E, D] = q(!1), [A, j] = q("generate"), M = l(e);
|
|
1530
1537
|
if (!e) return null;
|
|
1531
|
-
if (b) return /* @__PURE__ */
|
|
1538
|
+
if (b) return /* @__PURE__ */ Y("button", {
|
|
1532
1539
|
"aria-label": "Show controls",
|
|
1533
1540
|
className: "fixed inset-y-0 right-0 left-[var(--fxr-rail,0px)] z-20",
|
|
1534
1541
|
onClick: () => x(!1)
|
|
@@ -1540,29 +1547,29 @@ function Sn({ layer: e, onSwitchCategory: n, onInsert: i, onRestart: o, aspectVa
|
|
|
1540
1547
|
let t = _(e, M.take());
|
|
1541
1548
|
t && p(e.id, { filters: t });
|
|
1542
1549
|
};
|
|
1543
|
-
if (!S) return /* @__PURE__ */
|
|
1550
|
+
if (!S) return /* @__PURE__ */ X("div", {
|
|
1544
1551
|
className: "fixed bottom-[max(0.75rem,env(safe-area-inset-bottom))] left-[var(--fxr-rail,0px)] z-10 flex gap-2 px-3",
|
|
1545
1552
|
children: [
|
|
1546
|
-
/* @__PURE__ */
|
|
1553
|
+
/* @__PURE__ */ Y(V, {
|
|
1547
1554
|
variant: "primary",
|
|
1548
1555
|
size: "lg",
|
|
1549
1556
|
onClick: () => C(!0),
|
|
1550
|
-
children: /* @__PURE__ */
|
|
1557
|
+
children: /* @__PURE__ */ X("span", {
|
|
1551
1558
|
className: "flex items-center gap-2",
|
|
1552
|
-
children: [N ? e.presetLabel : "Media", /* @__PURE__ */
|
|
1559
|
+
children: [N ? e.presetLabel : "Media", /* @__PURE__ */ Y(Z, {
|
|
1553
1560
|
name: "chevron-down",
|
|
1554
1561
|
size: 16,
|
|
1555
1562
|
className: "rotate-180"
|
|
1556
1563
|
})]
|
|
1557
1564
|
})
|
|
1558
1565
|
}),
|
|
1559
|
-
(N || R.length > 0) && /* @__PURE__ */
|
|
1566
|
+
(N || R.length > 0) && /* @__PURE__ */ Y(V, {
|
|
1560
1567
|
variant: "primary",
|
|
1561
1568
|
size: "lg",
|
|
1562
1569
|
onClick: L,
|
|
1563
1570
|
children: "Randomize all"
|
|
1564
1571
|
}),
|
|
1565
|
-
/* @__PURE__ */
|
|
1572
|
+
/* @__PURE__ */ Y(V, {
|
|
1566
1573
|
variant: "primary",
|
|
1567
1574
|
size: "lg",
|
|
1568
1575
|
onClick: () => y(2),
|
|
@@ -1571,8 +1578,8 @@ function Sn({ layer: e, onSwitchCategory: n, onInsert: i, onRestart: o, aspectVa
|
|
|
1571
1578
|
]
|
|
1572
1579
|
});
|
|
1573
1580
|
let re = (N ? dn : fn).filter((e) => (e.value !== "effects" || ne) && (e.value !== "transport" || a("motion"))), B = re.some((e) => e.value === A) ? A : re[0].value;
|
|
1574
|
-
return /* @__PURE__ */
|
|
1575
|
-
w && /* @__PURE__ */
|
|
1581
|
+
return /* @__PURE__ */ X(J, { children: [
|
|
1582
|
+
w && /* @__PURE__ */ Y(cn, {
|
|
1576
1583
|
onPick: (e) => {
|
|
1577
1584
|
n(e), T(!1);
|
|
1578
1585
|
},
|
|
@@ -1584,7 +1591,7 @@ function Sn({ layer: e, onSwitchCategory: n, onInsert: i, onRestart: o, aspectVa
|
|
|
1584
1591
|
},
|
|
1585
1592
|
onDismiss: () => T(!1)
|
|
1586
1593
|
}),
|
|
1587
|
-
E && /* @__PURE__ */
|
|
1594
|
+
E && /* @__PURE__ */ Y(ln, {
|
|
1588
1595
|
layer: e,
|
|
1589
1596
|
chain: R,
|
|
1590
1597
|
onPick: (t) => {
|
|
@@ -1592,28 +1599,28 @@ function Sn({ layer: e, onSwitchCategory: n, onInsert: i, onRestart: o, aspectVa
|
|
|
1592
1599
|
},
|
|
1593
1600
|
onBack: () => D(!1)
|
|
1594
1601
|
}),
|
|
1595
|
-
/* @__PURE__ */
|
|
1602
|
+
/* @__PURE__ */ X("div", {
|
|
1596
1603
|
className: "fixed right-0 left-[var(--fxr-rail,0px)] bottom-0 z-10 pb-[env(safe-area-inset-bottom)]",
|
|
1597
1604
|
style: un,
|
|
1598
|
-
children: [/* @__PURE__ */
|
|
1605
|
+
children: [/* @__PURE__ */ X("div", {
|
|
1599
1606
|
className: "flex w-full items-center px-3",
|
|
1600
|
-
children: [/* @__PURE__ */
|
|
1607
|
+
children: [/* @__PURE__ */ X("button", {
|
|
1601
1608
|
className: "kol-helper-12 text-meta flex flex-1 items-center gap-2 py-2.5",
|
|
1602
1609
|
onClick: () => C(!1),
|
|
1603
|
-
children: [/* @__PURE__ */
|
|
1610
|
+
children: [/* @__PURE__ */ Y("span", { children: P }), /* @__PURE__ */ Y(Z, {
|
|
1604
1611
|
name: "chevron-down",
|
|
1605
1612
|
size: 16,
|
|
1606
1613
|
className: "text-oq-48"
|
|
1607
1614
|
})]
|
|
1608
|
-
}), /* @__PURE__ */
|
|
1615
|
+
}), /* @__PURE__ */ Y("button", {
|
|
1609
1616
|
className: "kol-helper-12 text-meta py-2.5",
|
|
1610
1617
|
onClick: o,
|
|
1611
1618
|
children: "Start over"
|
|
1612
1619
|
})]
|
|
1613
|
-
}), /* @__PURE__ */
|
|
1620
|
+
}), /* @__PURE__ */ X("div", {
|
|
1614
1621
|
className: "px-3 pb-3",
|
|
1615
1622
|
children: [
|
|
1616
|
-
/* @__PURE__ */
|
|
1623
|
+
/* @__PURE__ */ Y(U, {
|
|
1617
1624
|
variant: "filled",
|
|
1618
1625
|
value: B,
|
|
1619
1626
|
onChange: j,
|
|
@@ -1621,32 +1628,32 @@ function Sn({ layer: e, onSwitchCategory: n, onInsert: i, onRestart: o, aspectVa
|
|
|
1621
1628
|
size: "lg",
|
|
1622
1629
|
className: "[&_.kol-seg-cell]:min-w-0 [&_.kol-seg-cell]:px-2 [&_.kol-seg-cell]:overflow-hidden"
|
|
1623
1630
|
}),
|
|
1624
|
-
B === "generate" && N && /* @__PURE__ */
|
|
1631
|
+
B === "generate" && N && /* @__PURE__ */ X("div", {
|
|
1625
1632
|
className: "flex flex-col gap-2 pt-3",
|
|
1626
1633
|
children: [
|
|
1627
|
-
/* @__PURE__ */
|
|
1634
|
+
/* @__PURE__ */ X("div", {
|
|
1628
1635
|
className: "grid grid-cols-2 gap-2",
|
|
1629
|
-
children: [/* @__PURE__ */
|
|
1636
|
+
children: [/* @__PURE__ */ Y(V, {
|
|
1630
1637
|
variant: "primary",
|
|
1631
1638
|
size: "lg",
|
|
1632
1639
|
iconRight: "refresh",
|
|
1633
1640
|
onClick: te,
|
|
1634
1641
|
children: "Preset"
|
|
1635
|
-
}), /* @__PURE__ */
|
|
1642
|
+
}), /* @__PURE__ */ Y(V, {
|
|
1636
1643
|
variant: "primary",
|
|
1637
1644
|
size: "lg",
|
|
1638
1645
|
onClick: () => T(!0),
|
|
1639
1646
|
children: "Generator"
|
|
1640
1647
|
})]
|
|
1641
1648
|
}),
|
|
1642
|
-
/* @__PURE__ */
|
|
1649
|
+
/* @__PURE__ */ Y(V, {
|
|
1643
1650
|
variant: "primary",
|
|
1644
1651
|
size: "lg",
|
|
1645
1652
|
className: "w-full",
|
|
1646
1653
|
onClick: L,
|
|
1647
1654
|
children: "Randomize all"
|
|
1648
1655
|
}),
|
|
1649
|
-
I.length > 0 && /* @__PURE__ */
|
|
1656
|
+
I.length > 0 && /* @__PURE__ */ Y(_n, { cells: [...I.map((e) => ({
|
|
1650
1657
|
value: e.id,
|
|
1651
1658
|
label: e.label,
|
|
1652
1659
|
run: () => ee(e)
|
|
@@ -1657,16 +1664,16 @@ function Sn({ layer: e, onSwitchCategory: n, onInsert: i, onRestart: o, aspectVa
|
|
|
1657
1664
|
}] })
|
|
1658
1665
|
]
|
|
1659
1666
|
}),
|
|
1660
|
-
B === "effects" && /* @__PURE__ */
|
|
1667
|
+
B === "effects" && /* @__PURE__ */ X("div", {
|
|
1661
1668
|
className: "flex flex-col gap-2 pt-3",
|
|
1662
|
-
children: [/* @__PURE__ */
|
|
1669
|
+
children: [/* @__PURE__ */ X("div", {
|
|
1663
1670
|
className: "grid grid-cols-2 gap-2",
|
|
1664
|
-
children: [/* @__PURE__ */
|
|
1671
|
+
children: [/* @__PURE__ */ Y(V, {
|
|
1665
1672
|
variant: "primary",
|
|
1666
1673
|
size: "lg",
|
|
1667
1674
|
onClick: () => D(!0),
|
|
1668
1675
|
children: "Add effect"
|
|
1669
|
-
}), /* @__PURE__ */
|
|
1676
|
+
}), /* @__PURE__ */ Y(V, {
|
|
1670
1677
|
variant: "primary",
|
|
1671
1678
|
size: "lg",
|
|
1672
1679
|
disabled: !R.length,
|
|
@@ -1688,9 +1695,9 @@ function Sn({ layer: e, onSwitchCategory: n, onInsert: i, onRestart: o, aspectVa
|
|
|
1688
1695
|
}
|
|
1689
1696
|
} : e) });
|
|
1690
1697
|
};
|
|
1691
|
-
return /* @__PURE__ */
|
|
1698
|
+
return /* @__PURE__ */ X("div", {
|
|
1692
1699
|
className: "flex flex-col gap-2",
|
|
1693
|
-
children: [/* @__PURE__ */
|
|
1700
|
+
children: [/* @__PURE__ */ Y(V, {
|
|
1694
1701
|
variant: "grey",
|
|
1695
1702
|
size: "lg",
|
|
1696
1703
|
className: "w-full [&>span]:w-full [&>span]:justify-between",
|
|
@@ -1698,7 +1705,7 @@ function Sn({ layer: e, onSwitchCategory: n, onInsert: i, onRestart: o, aspectVa
|
|
|
1698
1705
|
iconRight: "trash",
|
|
1699
1706
|
onClick: () => v(e.id, n),
|
|
1700
1707
|
children: `${n + 1}. ${t.def?.label ?? t.id}`
|
|
1701
|
-
}), i.length > 0 && /* @__PURE__ */
|
|
1708
|
+
}), i.length > 0 && /* @__PURE__ */ Y(_n, { cells: i.map((e) => ({
|
|
1702
1709
|
value: e.id,
|
|
1703
1710
|
label: e.label,
|
|
1704
1711
|
run: () => a(e)
|
|
@@ -1706,17 +1713,17 @@ function Sn({ layer: e, onSwitchCategory: n, onInsert: i, onRestart: o, aspectVa
|
|
|
1706
1713
|
}, t.key);
|
|
1707
1714
|
})]
|
|
1708
1715
|
}),
|
|
1709
|
-
B === "transport" && a("motion") && /* @__PURE__ */
|
|
1716
|
+
B === "transport" && a("motion") && /* @__PURE__ */ X("div", {
|
|
1710
1717
|
className: "flex flex-col gap-2 pt-3",
|
|
1711
1718
|
children: [(() => {
|
|
1712
1719
|
let e = a("motion").TransportBar;
|
|
1713
|
-
return /* @__PURE__ */
|
|
1714
|
-
})(), /* @__PURE__ */
|
|
1720
|
+
return /* @__PURE__ */ Y(e, { size: "lg" });
|
|
1721
|
+
})(), /* @__PURE__ */ Y(yn, {})]
|
|
1715
1722
|
}),
|
|
1716
|
-
B === "output" && /* @__PURE__ */
|
|
1723
|
+
B === "output" && /* @__PURE__ */ X("div", {
|
|
1717
1724
|
className: "flex flex-col gap-2 pt-3",
|
|
1718
1725
|
children: [
|
|
1719
|
-
/* @__PURE__ */
|
|
1726
|
+
/* @__PURE__ */ Y(U, {
|
|
1720
1727
|
variant: "filled",
|
|
1721
1728
|
value: c,
|
|
1722
1729
|
onChange: d,
|
|
@@ -1724,7 +1731,7 @@ function Sn({ layer: e, onSwitchCategory: n, onInsert: i, onRestart: o, aspectVa
|
|
|
1724
1731
|
size: "lg",
|
|
1725
1732
|
ariaLabel: "Aspect"
|
|
1726
1733
|
}),
|
|
1727
|
-
/* @__PURE__ */
|
|
1734
|
+
/* @__PURE__ */ Y(U, {
|
|
1728
1735
|
variant: "filled",
|
|
1729
1736
|
value: c,
|
|
1730
1737
|
onChange: d,
|
|
@@ -1732,22 +1739,22 @@ function Sn({ layer: e, onSwitchCategory: n, onInsert: i, onRestart: o, aspectVa
|
|
|
1732
1739
|
size: "lg",
|
|
1733
1740
|
ariaLabel: "Aspect (landscape) and fill"
|
|
1734
1741
|
}),
|
|
1735
|
-
/* @__PURE__ */
|
|
1742
|
+
/* @__PURE__ */ X("div", {
|
|
1736
1743
|
className: "grid grid-cols-3 gap-2",
|
|
1737
1744
|
children: [
|
|
1738
|
-
/* @__PURE__ */
|
|
1745
|
+
/* @__PURE__ */ Y(V, {
|
|
1739
1746
|
variant: "primary",
|
|
1740
1747
|
size: "lg",
|
|
1741
1748
|
onClick: () => y(2),
|
|
1742
1749
|
children: "Download"
|
|
1743
1750
|
}),
|
|
1744
|
-
/* @__PURE__ */
|
|
1751
|
+
/* @__PURE__ */ Y(V, {
|
|
1745
1752
|
variant: "primary",
|
|
1746
1753
|
size: "lg",
|
|
1747
1754
|
onClick: () => x(!0),
|
|
1748
1755
|
children: "Hide UI"
|
|
1749
1756
|
}),
|
|
1750
|
-
/* @__PURE__ */
|
|
1757
|
+
/* @__PURE__ */ Y(V, {
|
|
1751
1758
|
variant: "primary",
|
|
1752
1759
|
size: "lg",
|
|
1753
1760
|
onClick: o,
|
|
@@ -1765,48 +1772,48 @@ function Sn({ layer: e, onSwitchCategory: n, onInsert: i, onRestart: o, aspectVa
|
|
|
1765
1772
|
//#endregion
|
|
1766
1773
|
//#region src/editor/mobile/MobileView.jsx
|
|
1767
1774
|
function Cn({ onGenerate: e }) {
|
|
1768
|
-
return /* @__PURE__ */
|
|
1775
|
+
return /* @__PURE__ */ Y("div", {
|
|
1769
1776
|
className: "fixed inset-y-0 right-0 left-[var(--fxr-rail,0px)] kol-overlay-scrim flex flex-col items-center justify-center p-6",
|
|
1770
1777
|
style: { zIndex: "var(--kol-z-modal)" },
|
|
1771
|
-
children: /* @__PURE__ */
|
|
1778
|
+
children: /* @__PURE__ */ X("div", {
|
|
1772
1779
|
className: "w-full max-w-sm rounded p-8 flex flex-col gap-6",
|
|
1773
1780
|
style: { background: "var(--kol-surface-primary)" },
|
|
1774
|
-
children: [/* @__PURE__ */
|
|
1781
|
+
children: [/* @__PURE__ */ X("div", {
|
|
1775
1782
|
className: "flex flex-col gap-2",
|
|
1776
|
-
children: [/* @__PURE__ */
|
|
1783
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
1777
1784
|
className: "kol-eyebrow text-body",
|
|
1778
1785
|
children: "Select chrome"
|
|
1779
|
-
}), /* @__PURE__ */
|
|
1786
|
+
}), /* @__PURE__ */ Y("span", {
|
|
1780
1787
|
className: "kol-mono-16 text-emphasis",
|
|
1781
1788
|
children: "Effexor FXR"
|
|
1782
1789
|
})]
|
|
1783
|
-
}), /* @__PURE__ */
|
|
1790
|
+
}), /* @__PURE__ */ X("div", {
|
|
1784
1791
|
className: "flex flex-col gap-2",
|
|
1785
1792
|
children: [
|
|
1786
|
-
/* @__PURE__ */
|
|
1793
|
+
/* @__PURE__ */ Y(V, {
|
|
1787
1794
|
variant: "primary",
|
|
1788
1795
|
size: "lg",
|
|
1789
1796
|
className: on,
|
|
1790
|
-
iconLeft:
|
|
1791
|
-
iconRight:
|
|
1797
|
+
iconLeft: _t.randomiser,
|
|
1798
|
+
iconRight: _t.randomiser,
|
|
1792
1799
|
onClick: e,
|
|
1793
1800
|
children: "Generate"
|
|
1794
1801
|
}),
|
|
1795
|
-
We() && /* @__PURE__ */
|
|
1802
|
+
We() && /* @__PURE__ */ Y(V, {
|
|
1796
1803
|
variant: "primary",
|
|
1797
1804
|
size: "lg",
|
|
1798
1805
|
className: "w-full [&>span]:w-full [&>span]:justify-between",
|
|
1799
|
-
iconLeft:
|
|
1800
|
-
iconRight:
|
|
1806
|
+
iconLeft: _t.editor,
|
|
1807
|
+
iconRight: _t.editor,
|
|
1801
1808
|
onClick: Ye,
|
|
1802
1809
|
children: Me("editor").label
|
|
1803
1810
|
}),
|
|
1804
|
-
/* @__PURE__ */
|
|
1811
|
+
/* @__PURE__ */ Y(V, {
|
|
1805
1812
|
variant: "primary",
|
|
1806
1813
|
size: "lg",
|
|
1807
1814
|
className: on,
|
|
1808
|
-
iconLeft:
|
|
1809
|
-
iconRight:
|
|
1815
|
+
iconLeft: _t.labs,
|
|
1816
|
+
iconRight: _t.labs,
|
|
1810
1817
|
onClick: rt,
|
|
1811
1818
|
children: Me("labs").label
|
|
1812
1819
|
})
|
|
@@ -1816,11 +1823,11 @@ function Cn({ onGenerate: e }) {
|
|
|
1816
1823
|
});
|
|
1817
1824
|
}
|
|
1818
1825
|
function wn() {
|
|
1819
|
-
let { layers: e, addLayer: n, removeLayer: r, updateLayer: i, canvasW: a, canvasH: o, aspect: s, setAspect: c } = f(), { setTool: l } = Se(), u = () => Qe() && !Xe() ? "entry" : "category", [d, p] =
|
|
1826
|
+
let { layers: e, addLayer: n, removeLayer: r, updateLayer: i, canvasW: a, canvasH: o, aspect: s, setAspect: c } = f(), { setTool: l } = Se(), u = () => Qe() && !Xe() ? "entry" : "category", [d, p] = q(u), [m, h] = q(null), [g, _] = q("contain"), [v, y] = q(1), b = K({
|
|
1820
1827
|
pts: /* @__PURE__ */ new Map(),
|
|
1821
1828
|
startDist: 0,
|
|
1822
1829
|
startScale: 1
|
|
1823
|
-
}), C =
|
|
1830
|
+
}), C = K(null), w = () => {
|
|
1824
1831
|
let [e, t] = [...b.current.pts.values()];
|
|
1825
1832
|
return Math.hypot(e.x - t.x, e.y - t.y);
|
|
1826
1833
|
}, T = (e) => {
|
|
@@ -1847,17 +1854,17 @@ function wn() {
|
|
|
1847
1854
|
}
|
|
1848
1855
|
n?.id === e.pointerId && (C.current = null), b.current.pts.delete(e.pointerId), b.current.pts.size < 2 && (b.current.startDist = 0);
|
|
1849
1856
|
};
|
|
1850
|
-
|
|
1857
|
+
ht(), G(() => {
|
|
1851
1858
|
c("4:5"), l("orbit");
|
|
1852
1859
|
}, []);
|
|
1853
1860
|
let O = e.find((e) => e.id === m) ?? (e.length === 1 ? e[0] : null), j = d === "live" && O?.type === "photo" && !O.src && O.srcType !== "webcam";
|
|
1854
|
-
|
|
1861
|
+
G(() => {
|
|
1855
1862
|
if (!j) return;
|
|
1856
1863
|
let e = (e) => {
|
|
1857
1864
|
e.key === "Escape" && L();
|
|
1858
1865
|
};
|
|
1859
1866
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
1860
|
-
}),
|
|
1867
|
+
}), G(() => {
|
|
1861
1868
|
if (!j) return;
|
|
1862
1869
|
let e = t.isPlaying();
|
|
1863
1870
|
return t.pause(), () => {
|
|
@@ -1895,10 +1902,10 @@ function wn() {
|
|
|
1895
1902
|
for (let t of [...e]) r(t.id);
|
|
1896
1903
|
h(null), y(1), p(u());
|
|
1897
1904
|
};
|
|
1898
|
-
return /* @__PURE__ */
|
|
1905
|
+
return /* @__PURE__ */ X("div", {
|
|
1899
1906
|
className: "relative h-dvh bg-black",
|
|
1900
1907
|
children: [
|
|
1901
|
-
/* @__PURE__ */
|
|
1908
|
+
/* @__PURE__ */ Y("div", {
|
|
1902
1909
|
className: "absolute inset-0 touch-none",
|
|
1903
1910
|
style: { transform: `scale(${v})` },
|
|
1904
1911
|
onPointerDownCapture: T,
|
|
@@ -1906,15 +1913,15 @@ function wn() {
|
|
|
1906
1913
|
onPointerUpCapture: D,
|
|
1907
1914
|
onPointerCancelCapture: D,
|
|
1908
1915
|
onPointerLeave: D,
|
|
1909
|
-
children: /* @__PURE__ */
|
|
1916
|
+
children: /* @__PURE__ */ Y(Be, { fit: g })
|
|
1910
1917
|
}),
|
|
1911
|
-
d === "entry" && /* @__PURE__ */
|
|
1912
|
-
d === "category" && /* @__PURE__ */
|
|
1918
|
+
d === "entry" && /* @__PURE__ */ Y(Cn, { onGenerate: () => p("category") }),
|
|
1919
|
+
d === "category" && /* @__PURE__ */ Y(cn, {
|
|
1913
1920
|
onPick: N,
|
|
1914
1921
|
onInsert: F,
|
|
1915
1922
|
onBack: u() === "entry" ? () => p("entry") : void 0
|
|
1916
1923
|
}),
|
|
1917
|
-
d === "live" && /* @__PURE__ */
|
|
1924
|
+
d === "live" && /* @__PURE__ */ Y(Sn, {
|
|
1918
1925
|
layer: O,
|
|
1919
1926
|
onSwitchCategory: P,
|
|
1920
1927
|
onInsert: () => {
|
|
@@ -1924,15 +1931,15 @@ function wn() {
|
|
|
1924
1931
|
aspectValue: g === "cover" ? "fill" : s,
|
|
1925
1932
|
onAspect: I
|
|
1926
1933
|
}),
|
|
1927
|
-
j && /* @__PURE__ */
|
|
1934
|
+
j && /* @__PURE__ */ X("div", {
|
|
1928
1935
|
className: "fixed inset-y-0 right-0 left-[var(--fxr-rail,0px)] kol-overlay-scrim flex flex-col",
|
|
1929
1936
|
style: { zIndex: "var(--kol-z-modal)" },
|
|
1930
|
-
children: [/* @__PURE__ */
|
|
1937
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
1931
1938
|
className: "flex-1 min-h-0",
|
|
1932
|
-
children: /* @__PURE__ */
|
|
1933
|
-
}), /* @__PURE__ */
|
|
1939
|
+
children: /* @__PURE__ */ Y(Dt, { layer: O })
|
|
1940
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1934
1941
|
className: "flex justify-center pb-[max(0.75rem,env(safe-area-inset-bottom))]",
|
|
1935
|
-
children: /* @__PURE__ */
|
|
1942
|
+
children: /* @__PURE__ */ Y(V, {
|
|
1936
1943
|
variant: "outline",
|
|
1937
1944
|
size: "lg",
|
|
1938
1945
|
onClick: L,
|
|
@@ -1944,9 +1951,9 @@ function wn() {
|
|
|
1944
1951
|
});
|
|
1945
1952
|
}
|
|
1946
1953
|
function Tn() {
|
|
1947
|
-
return /* @__PURE__ */
|
|
1954
|
+
return /* @__PURE__ */ Y(Ze, {
|
|
1948
1955
|
persistDraft: !1,
|
|
1949
|
-
children: /* @__PURE__ */
|
|
1956
|
+
children: /* @__PURE__ */ Y(wn, {})
|
|
1950
1957
|
});
|
|
1951
1958
|
}
|
|
1952
1959
|
//#endregion
|