@kolkrabbi/design-editor 0.32.0 → 0.33.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/{Timeline-BKYyRqYg.js → Timeline-Cz-W72D0.js} +1 -1
- package/dist/{core-Cs-PEiuU.js → core-DCTuJ1dz.js} +162 -141
- package/dist/core.js +3 -3
- package/dist/design-editor.css +1 -1
- package/dist/design-editor.js +52 -38
- package/dist/{effectCategories-BGIW_dEc.js → effectCategories-DV7i_AgK.js} +1 -1
- package/dist/{effects-RqPdJrRb.js → effects-Dn4_OzYx.js} +19 -17
- package/dist/effects.js +1 -1
- package/dist/{generators-BnuRmK-x.js → generators-XBzHN_kX.js} +34 -33
- package/dist/generators.js +1 -1
- package/dist/{host-DJ8bDKO7.js → host-B4QQewPr.js} +2 -2
- package/dist/{motion-DKZGyk14.js → motion-Cuwxm2ic.js} +25 -21
- package/dist/motion.js +1 -1
- package/dist/{store-D6Si8cRD.js → store-CF9s1Pb2.js} +417 -416
- package/dist/{useLayerEdit-BF9wI5pX.js → useLayerEdit-Cmtx3V3O.js} +20 -18
- package/package.json +10 -10
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { $t as e, A as t, An as n, At as r, B as i, Bn as a, Ct as o, D as s, Dn as c, Dt as l, E as u, En as d, Et as f, F as p, Fn as m, Ft as h, G as g, Gt as _, H as v, I as y, It as b, J as x, Jt as S, K as C, Kt as w, L as T, Lt as E, Mn as ee, Mt as D, Nn as te, Nt as ne, O as re, Ot as ie, Pt as ae, Q as oe, Qt as se, R as ce, Rn as le, Rt as ue, St as de, T as fe, Tn as pe, Tt as me, U as he, V as ge, W as _e, Xt as ve, Yt as ye, Zt as be, _n as xe, _t as Se, a as Ce, an as we, ct as O, d as k, dt as A, en as j, gn as M, hn as Te, in as Ee, jn as De, jt as Oe, k as N, kn as ke, kt as Ae, lt as je, mn as Me, n as Ne, nn as Pe, on as Fe, pn as P, q as F, qt as Ie, rn as Le, sn as Re, st as ze, t as I, tn as Be, ut as Ve, vt as He, w as Ue, wt as We, xt as Ge, yt as Ke, z as qe, zt as Je } from "./rolls-CEQmdcp3.js";
|
|
2
|
-
import { l as Ye, n as Xe, r as Ze, t as Qe } from "./useLayerEdit-
|
|
3
|
-
import { F as $e, I as et, N as tt, P as nt, b as rt, c as it, d as at, f as ot, g as st, i as ct, l as lt, m as ut, o as dt, p as ft, s as pt, t as mt, v as ht, x as gt } from "./store-
|
|
2
|
+
import { l as Ye, n as Xe, r as Ze, t as Qe } from "./useLayerEdit-Cmtx3V3O.js";
|
|
3
|
+
import { F as $e, I as et, N as tt, P as nt, b as rt, c as it, d as at, f as ot, g as st, i as ct, l as lt, m as ut, o as dt, p as ft, s as pt, t as mt, v as ht, x as gt } from "./store-CF9s1Pb2.js";
|
|
4
4
|
import { m as _t, o as vt } from "./morphStore-B5081ohW.js";
|
|
5
5
|
import { n as yt, r as bt, t as xt } from "./BindDot-Don6fG00.js";
|
|
6
|
-
import { a as St, c as Ct, l as wt, o as Tt, s as Et } from "./Timeline-
|
|
6
|
+
import { a as St, c as Ct, l as wt, o as Tt, s as Et } from "./Timeline-Cz-W72D0.js";
|
|
7
7
|
import { i as Dt, t as Ot } from "./previewScale-CA0ComGv.js";
|
|
8
|
-
import { AssetGrid as kt, Button as L,
|
|
8
|
+
import { AssetGrid as kt, Button as L, ButtonGroup as At, CanvasZoomContext as jt, CloseButton as Mt, ColorSwatch as Nt, CommandOverlay as Pt, ContentRow as Ft, ContextMenu as It, CropOverlay as Lt, Divider as Rt, Dropdown as zt, EyedropPick as Bt, FullscreenOverlay as Vt, HueStrip as Ht, Input as Ut, InspectorRail as Wt, InspectorSection as Gt, LabeledControl as Kt, LabeledControlSection as qt, MediaLibrary as Jt, MediaTile as Yt, Menu as Xt, MenuDropdownDivider as R, MenuDropdownItem as z, MenuDropdownNest as Zt, MenuItem as Qt, MenuTrigger as $t, ModalProvider as en, OriginPicker as tn, PathNodeOverlay as nn, PopoverPanel as rn, SBSquare as an, SearchInput as on, SelectionOverlay as sn, SettingsChoice as cn, SettingsFooter as ln, SettingsPanel as un, SettingsRow as dn, SettingsSwitch as fn, Slider as pn, Stepper as mn, SwatchStack as hn, TabChips as gn, ToggleCheckbox as _n, ToggleSwitch as vn, ToolPalette as yn, Tooltip as B, ViewToggle as bn, WheelTriangle as xn, findLayerDeep as Sn, glyphSize as Cn, rowLabelForLayer as wn, svgToPngBlob as Tn, useContextMenu as En, useDragResize as Dn, useGrabEdge as On, useMediaQuery as kn, useModal as An, usePlaceholders as jn, usePopover as Mn } from "@kolkrabbi/kol-component";
|
|
9
9
|
import { Component as Nn, createContext as Pn, useCallback as Fn, useContext as In, useEffect as V, useLayoutEffect as Ln, useMemo as Rn, useRef as H, useState as U, useSyncExternalStore as zn } from "react";
|
|
10
10
|
import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
|
|
11
|
-
import {
|
|
11
|
+
import { IconLoader as q } from "@kolkrabbi/kol-icons";
|
|
12
12
|
import { AppFloatNav as Bn, Breadcrumb as Vn, DocumentCapsule as Hn, GlobalActions as Un, MenuBar as Wn, ShortcutsOverlay as Gn, ToolRail as Kn, useNavHidden as qn } from "@kolkrabbi/kol-shell";
|
|
13
13
|
import Jn from "@kolkrabbi/kol-component/organisms/MediaLibrary";
|
|
14
14
|
import { SETTINGS_BASE as Yn } from "@kolkrabbi/kol-component/organisms/MediaLibraryPages";
|
|
@@ -4102,7 +4102,7 @@ function mc({ children: e, backdrop: t, showRulers: n = !0, guides: r, setGuides
|
|
|
4102
4102
|
y: e.clientY - p.y
|
|
4103
4103
|
}, f(!0));
|
|
4104
4104
|
}, C = d ? "grabbing" : c ? "grab" : void 0, w = p.zoom === 1 && p.x === 0 && p.y === 0;
|
|
4105
|
-
return /* @__PURE__ */ G(
|
|
4105
|
+
return /* @__PURE__ */ G(jt.Provider, {
|
|
4106
4106
|
value: p.zoom,
|
|
4107
4107
|
children: /* @__PURE__ */ K("div", {
|
|
4108
4108
|
ref: s,
|
|
@@ -4768,7 +4768,7 @@ function Lc({ open: e, onClose: t, kinds: n = jc, initialKind: r = "preset", onO
|
|
|
4768
4768
|
}, ce = () => {
|
|
4769
4769
|
w.trim() && (l(w.trim()), T(""), t?.());
|
|
4770
4770
|
};
|
|
4771
|
-
return e ? /* @__PURE__ */ G(
|
|
4771
|
+
return e ? /* @__PURE__ */ G(Vt, {
|
|
4772
4772
|
open: !0,
|
|
4773
4773
|
scrim: !0,
|
|
4774
4774
|
onClose: t,
|
|
@@ -4825,7 +4825,7 @@ function Lc({ open: e, onClose: t, kinds: n = jc, initialKind: r = "preset", onO
|
|
|
4825
4825
|
l && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("span", {
|
|
4826
4826
|
ref: _,
|
|
4827
4827
|
className: "inline-flex",
|
|
4828
|
-
children: /* @__PURE__ */ G(
|
|
4828
|
+
children: /* @__PURE__ */ G(Ut, {
|
|
4829
4829
|
size: "sm",
|
|
4830
4830
|
chars: 18,
|
|
4831
4831
|
placeholder: "Name",
|
|
@@ -5157,7 +5157,7 @@ function Rl({ tabs: e, value: t, onChange: n, onClose: r, trailing: i }) {
|
|
|
5157
5157
|
className: "self-stretch flex items-center px-0.5 cursor-grab touch-none",
|
|
5158
5158
|
children: /* @__PURE__ */ G("span", { className: "block w-1 h-4 rounded-full bg-oq-24" })
|
|
5159
5159
|
}),
|
|
5160
|
-
r && /* @__PURE__ */ G(
|
|
5160
|
+
r && /* @__PURE__ */ G(Mt, {
|
|
5161
5161
|
onClick: r,
|
|
5162
5162
|
size: "xs"
|
|
5163
5163
|
}),
|
|
@@ -5383,7 +5383,7 @@ function ql() {
|
|
|
5383
5383
|
}
|
|
5384
5384
|
function Jl({ sections: e, divided: t = !0 }) {
|
|
5385
5385
|
let n = ql();
|
|
5386
|
-
return (e ?? n).map((e) => /* @__PURE__ */ G(
|
|
5386
|
+
return (e ?? n).map((e) => /* @__PURE__ */ G(qt, {
|
|
5387
5387
|
label: e.label,
|
|
5388
5388
|
divided: t,
|
|
5389
5389
|
rowGap: e.rowGap,
|
|
@@ -6048,14 +6048,16 @@ function Ku() {
|
|
|
6048
6048
|
let { alignSelected: e } = x(), t = T();
|
|
6049
6049
|
return /* @__PURE__ */ K("div", {
|
|
6050
6050
|
className: "grid grid-cols-2 gap-2",
|
|
6051
|
-
children: [/* @__PURE__ */ G(
|
|
6051
|
+
children: [/* @__PURE__ */ G(At, {
|
|
6052
|
+
layout: "joined",
|
|
6052
6053
|
size: t,
|
|
6053
6054
|
ariaLabel: "Horizontal alignment",
|
|
6054
6055
|
value: null,
|
|
6055
6056
|
options: Wu,
|
|
6056
6057
|
onChange: (t) => e("h", t),
|
|
6057
6058
|
className: "w-full"
|
|
6058
|
-
}), /* @__PURE__ */ G(
|
|
6059
|
+
}), /* @__PURE__ */ G(At, {
|
|
6060
|
+
layout: "joined",
|
|
6059
6061
|
size: t,
|
|
6060
6062
|
ariaLabel: "Vertical alignment",
|
|
6061
6063
|
value: null,
|
|
@@ -6113,7 +6115,7 @@ function ed() {
|
|
|
6113
6115
|
children: "None"
|
|
6114
6116
|
}),
|
|
6115
6117
|
/* @__PURE__ */ G(R, {}),
|
|
6116
|
-
Yu().liveFilterGroups(e.options).map((t, n) => t.divider ? /* @__PURE__ */ G(R, {}, `d${n}`) : /* @__PURE__ */ G(
|
|
6118
|
+
Yu().liveFilterGroups(e.options).map((t, n) => t.divider ? /* @__PURE__ */ G(R, {}, `d${n}`) : /* @__PURE__ */ G(Zt, {
|
|
6117
6119
|
flyout: !0,
|
|
6118
6120
|
label: t.label,
|
|
6119
6121
|
disabled: !e.target,
|
|
@@ -6303,7 +6305,7 @@ function Td() {
|
|
|
6303
6305
|
className: "kol-editor-topbar flex items-center gap-1 px-4 h-8 bg-[var(--kol-surface-absolute-split)] border-b border-oq-08",
|
|
6304
6306
|
onPointerOver: be,
|
|
6305
6307
|
children: [
|
|
6306
|
-
/* @__PURE__ */ G(
|
|
6308
|
+
/* @__PURE__ */ G(Qt, {
|
|
6307
6309
|
label: "FXR",
|
|
6308
6310
|
...Sd,
|
|
6309
6311
|
buttonClassName: "font-bold text-emphasis",
|
|
@@ -6314,7 +6316,7 @@ function Td() {
|
|
|
6314
6316
|
onClick: () => pr("/"),
|
|
6315
6317
|
children: "Home"
|
|
6316
6318
|
}),
|
|
6317
|
-
/* @__PURE__ */ G(
|
|
6319
|
+
/* @__PURE__ */ G(Zt, {
|
|
6318
6320
|
flyout: !0,
|
|
6319
6321
|
label: "Chromes",
|
|
6320
6322
|
children: _d.map((e) => /* @__PURE__ */ G(z, {
|
|
@@ -6332,7 +6334,7 @@ function Td() {
|
|
|
6332
6334
|
]
|
|
6333
6335
|
})
|
|
6334
6336
|
}),
|
|
6335
|
-
/* @__PURE__ */ G(
|
|
6337
|
+
/* @__PURE__ */ G(Qt, {
|
|
6336
6338
|
label: "File",
|
|
6337
6339
|
...Sd,
|
|
6338
6340
|
children: /* @__PURE__ */ K("div", {
|
|
@@ -6347,7 +6349,7 @@ function Td() {
|
|
|
6347
6349
|
shortcut: Z("open-files"),
|
|
6348
6350
|
children: "Files…"
|
|
6349
6351
|
}),
|
|
6350
|
-
/* @__PURE__ */ G(
|
|
6352
|
+
/* @__PURE__ */ G(Zt, {
|
|
6351
6353
|
flyout: !0,
|
|
6352
6354
|
label: "Starters",
|
|
6353
6355
|
scroll: !0,
|
|
@@ -6368,7 +6370,7 @@ function Td() {
|
|
|
6368
6370
|
children: "Save as…"
|
|
6369
6371
|
}),
|
|
6370
6372
|
/* @__PURE__ */ G(R, {}),
|
|
6371
|
-
/* @__PURE__ */ G(
|
|
6373
|
+
/* @__PURE__ */ G(Zt, {
|
|
6372
6374
|
flyout: !0,
|
|
6373
6375
|
label: "Aspect",
|
|
6374
6376
|
scroll: !0,
|
|
@@ -6384,12 +6386,12 @@ function Td() {
|
|
|
6384
6386
|
children: "Clear"
|
|
6385
6387
|
}),
|
|
6386
6388
|
/* @__PURE__ */ G(R, {}),
|
|
6387
|
-
/* @__PURE__ */ G(
|
|
6389
|
+
/* @__PURE__ */ G(Zt, {
|
|
6388
6390
|
flyout: !0,
|
|
6389
6391
|
label: "Library",
|
|
6390
6392
|
children: gd.map((e) => {
|
|
6391
6393
|
let t = se[e] ?? [];
|
|
6392
|
-
return /* @__PURE__ */ G(
|
|
6394
|
+
return /* @__PURE__ */ G(Zt, {
|
|
6393
6395
|
flyout: !0,
|
|
6394
6396
|
label: `${hd[e].label} · ${t.length}`,
|
|
6395
6397
|
disabled: t.length === 0,
|
|
@@ -6435,7 +6437,7 @@ function Td() {
|
|
|
6435
6437
|
]
|
|
6436
6438
|
})
|
|
6437
6439
|
}),
|
|
6438
|
-
/* @__PURE__ */ G(
|
|
6440
|
+
/* @__PURE__ */ G(Qt, {
|
|
6439
6441
|
label: "Edit",
|
|
6440
6442
|
...Sd,
|
|
6441
6443
|
children: /* @__PURE__ */ K("div", {
|
|
@@ -6496,7 +6498,7 @@ function Td() {
|
|
|
6496
6498
|
]
|
|
6497
6499
|
})
|
|
6498
6500
|
}),
|
|
6499
|
-
/* @__PURE__ */ G(
|
|
6501
|
+
/* @__PURE__ */ G(Qt, {
|
|
6500
6502
|
label: "Layer",
|
|
6501
6503
|
...Sd,
|
|
6502
6504
|
children: /* @__PURE__ */ K("div", {
|
|
@@ -6515,7 +6517,7 @@ function Td() {
|
|
|
6515
6517
|
children: "Ungroup"
|
|
6516
6518
|
}),
|
|
6517
6519
|
/* @__PURE__ */ G(R, {}),
|
|
6518
|
-
/* @__PURE__ */ K(
|
|
6520
|
+
/* @__PURE__ */ K(Zt, {
|
|
6519
6521
|
flyout: !0,
|
|
6520
6522
|
label: "Align",
|
|
6521
6523
|
disabled: !j,
|
|
@@ -6548,7 +6550,7 @@ function Td() {
|
|
|
6548
6550
|
children: "Flip vertical"
|
|
6549
6551
|
}),
|
|
6550
6552
|
/* @__PURE__ */ G(R, {}),
|
|
6551
|
-
cd() && /* @__PURE__ */ G(
|
|
6553
|
+
cd() && /* @__PURE__ */ G(Zt, {
|
|
6552
6554
|
flyout: !0,
|
|
6553
6555
|
label: "Live Filters",
|
|
6554
6556
|
children: /* @__PURE__ */ G(ed, {})
|
|
@@ -6583,13 +6585,13 @@ function Td() {
|
|
|
6583
6585
|
]
|
|
6584
6586
|
})
|
|
6585
6587
|
}),
|
|
6586
|
-
/* @__PURE__ */ G(
|
|
6588
|
+
/* @__PURE__ */ G(Qt, {
|
|
6587
6589
|
label: "Text",
|
|
6588
6590
|
...Sd,
|
|
6589
6591
|
children: /* @__PURE__ */ K("div", {
|
|
6590
6592
|
className: "py-1 w-[240px]",
|
|
6591
6593
|
children: [
|
|
6592
|
-
/* @__PURE__ */ G(
|
|
6594
|
+
/* @__PURE__ */ G(Zt, {
|
|
6593
6595
|
flyout: !0,
|
|
6594
6596
|
label: "Alignment",
|
|
6595
6597
|
disabled: !M,
|
|
@@ -6619,7 +6621,7 @@ function Td() {
|
|
|
6619
6621
|
children: n
|
|
6620
6622
|
}, e))
|
|
6621
6623
|
}),
|
|
6622
|
-
/* @__PURE__ */ G(
|
|
6624
|
+
/* @__PURE__ */ G(Zt, {
|
|
6623
6625
|
flyout: !0,
|
|
6624
6626
|
label: "Vertical alignment",
|
|
6625
6627
|
disabled: !M,
|
|
@@ -6650,7 +6652,7 @@ function Td() {
|
|
|
6650
6652
|
}, e))
|
|
6651
6653
|
}),
|
|
6652
6654
|
/* @__PURE__ */ G(R, {}),
|
|
6653
|
-
/* @__PURE__ */ G(
|
|
6655
|
+
/* @__PURE__ */ G(Zt, {
|
|
6654
6656
|
flyout: !0,
|
|
6655
6657
|
label: "Case",
|
|
6656
6658
|
disabled: !M,
|
|
@@ -6675,7 +6677,7 @@ function Td() {
|
|
|
6675
6677
|
]
|
|
6676
6678
|
})
|
|
6677
6679
|
}),
|
|
6678
|
-
/* @__PURE__ */ G(
|
|
6680
|
+
/* @__PURE__ */ G(Qt, {
|
|
6679
6681
|
label: "Vector",
|
|
6680
6682
|
...Sd,
|
|
6681
6683
|
children: /* @__PURE__ */ K("div", {
|
|
@@ -6706,24 +6708,24 @@ function Td() {
|
|
|
6706
6708
|
]
|
|
6707
6709
|
})
|
|
6708
6710
|
}),
|
|
6709
|
-
/* @__PURE__ */ G(
|
|
6711
|
+
/* @__PURE__ */ G(Qt, {
|
|
6710
6712
|
label: "Tools",
|
|
6711
6713
|
...Sd,
|
|
6712
6714
|
children: /* @__PURE__ */ K("div", {
|
|
6713
6715
|
className: "py-1 w-[220px]",
|
|
6714
6716
|
children: [
|
|
6715
|
-
sd() && /* @__PURE__ */ G(
|
|
6717
|
+
sd() && /* @__PURE__ */ G(Zt, {
|
|
6716
6718
|
flyout: !0,
|
|
6717
6719
|
label: "Generative",
|
|
6718
|
-
children: sd().GENERATIVE_TREE.map((e) => e.groups.length === 1 ? /* @__PURE__ */ G(
|
|
6720
|
+
children: sd().GENERATIVE_TREE.map((e) => e.groups.length === 1 ? /* @__PURE__ */ G(Zt, {
|
|
6719
6721
|
flyout: !0,
|
|
6720
6722
|
label: e.label,
|
|
6721
6723
|
scroll: !0,
|
|
6722
6724
|
children: De(e.groups[0])
|
|
6723
|
-
}, e.label) : /* @__PURE__ */ G(
|
|
6725
|
+
}, e.label) : /* @__PURE__ */ G(Zt, {
|
|
6724
6726
|
flyout: !0,
|
|
6725
6727
|
label: e.label,
|
|
6726
|
-
children: e.groups.map((t) => /* @__PURE__ */ G(
|
|
6728
|
+
children: e.groups.map((t) => /* @__PURE__ */ G(Zt, {
|
|
6727
6729
|
flyout: !0,
|
|
6728
6730
|
label: e.labels?.[t] ?? ud(t).label,
|
|
6729
6731
|
scroll: !0,
|
|
@@ -6731,10 +6733,10 @@ function Td() {
|
|
|
6731
6733
|
}, t))
|
|
6732
6734
|
}, e.label))
|
|
6733
6735
|
}),
|
|
6734
|
-
sd() && /* @__PURE__ */ G(
|
|
6736
|
+
sd() && /* @__PURE__ */ G(Zt, {
|
|
6735
6737
|
flyout: !0,
|
|
6736
6738
|
label: "Pattern",
|
|
6737
|
-
children: vd.map((e) => /* @__PURE__ */ G(
|
|
6739
|
+
children: vd.map((e) => /* @__PURE__ */ G(Zt, {
|
|
6738
6740
|
flyout: !0,
|
|
6739
6741
|
label: e.label,
|
|
6740
6742
|
scroll: !0,
|
|
@@ -6744,7 +6746,7 @@ function Td() {
|
|
|
6744
6746
|
}, t.id))
|
|
6745
6747
|
}, e.label))
|
|
6746
6748
|
}),
|
|
6747
|
-
/* @__PURE__ */ K(
|
|
6749
|
+
/* @__PURE__ */ K(Zt, {
|
|
6748
6750
|
flyout: !0,
|
|
6749
6751
|
label: "Type",
|
|
6750
6752
|
children: [
|
|
@@ -6753,10 +6755,10 @@ function Td() {
|
|
|
6753
6755
|
shortcut: Z("tool-text"),
|
|
6754
6756
|
children: "Text tool"
|
|
6755
6757
|
}),
|
|
6756
|
-
Be && /* @__PURE__ */ G(
|
|
6758
|
+
Be && /* @__PURE__ */ G(Zt, {
|
|
6757
6759
|
flyout: !0,
|
|
6758
6760
|
label: "Kinetic type",
|
|
6759
|
-
children: Be.KINETIC_TREE.map((e) => /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G(Cd, { children: e.label }), e.subs.map((e) => /* @__PURE__ */ G(
|
|
6761
|
+
children: Be.KINETIC_TREE.map((e) => /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G(Cd, { children: e.label }), e.subs.map((e) => /* @__PURE__ */ G(Zt, {
|
|
6760
6762
|
flyout: !0,
|
|
6761
6763
|
label: e,
|
|
6762
6764
|
scroll: !0,
|
|
@@ -6770,7 +6772,7 @@ function Td() {
|
|
|
6770
6772
|
}, e.id))
|
|
6771
6773
|
}, e))] }, e.label))
|
|
6772
6774
|
}),
|
|
6773
|
-
Ve.length > 0 && /* @__PURE__ */ G(
|
|
6775
|
+
Ve.length > 0 && /* @__PURE__ */ G(Zt, {
|
|
6774
6776
|
flyout: !0,
|
|
6775
6777
|
label: sd().MISC_TREE[0].label,
|
|
6776
6778
|
scroll: !0,
|
|
@@ -6790,13 +6792,13 @@ function Td() {
|
|
|
6790
6792
|
]
|
|
6791
6793
|
})
|
|
6792
6794
|
}),
|
|
6793
|
-
/* @__PURE__ */ G(
|
|
6795
|
+
/* @__PURE__ */ G(Qt, {
|
|
6794
6796
|
label: "View",
|
|
6795
6797
|
...Sd,
|
|
6796
6798
|
children: /* @__PURE__ */ K("div", {
|
|
6797
6799
|
className: "py-1 w-[260px]",
|
|
6798
6800
|
children: [
|
|
6799
|
-
/* @__PURE__ */ K(
|
|
6801
|
+
/* @__PURE__ */ K(Zt, {
|
|
6800
6802
|
flyout: !0,
|
|
6801
6803
|
label: "Zoom",
|
|
6802
6804
|
children: [
|
|
@@ -6868,7 +6870,7 @@ function Td() {
|
|
|
6868
6870
|
children: "Snap to objects, guides and canvas"
|
|
6869
6871
|
}),
|
|
6870
6872
|
/* @__PURE__ */ G(R, {}),
|
|
6871
|
-
/* @__PURE__ */ K(
|
|
6873
|
+
/* @__PURE__ */ K(Zt, {
|
|
6872
6874
|
flyout: !0,
|
|
6873
6875
|
label: "Layout",
|
|
6874
6876
|
children: [/* @__PURE__ */ G(z, {
|
|
@@ -6884,13 +6886,13 @@ function Td() {
|
|
|
6884
6886
|
]
|
|
6885
6887
|
})
|
|
6886
6888
|
}),
|
|
6887
|
-
/* @__PURE__ */ G(
|
|
6889
|
+
/* @__PURE__ */ G(Qt, {
|
|
6888
6890
|
label: "Window",
|
|
6889
6891
|
...Sd,
|
|
6890
6892
|
children: /* @__PURE__ */ K("div", {
|
|
6891
6893
|
className: "py-1 w-[240px]",
|
|
6892
6894
|
children: [
|
|
6893
|
-
/* @__PURE__ */ K(
|
|
6895
|
+
/* @__PURE__ */ K(Zt, {
|
|
6894
6896
|
flyout: !0,
|
|
6895
6897
|
label: "Left rail",
|
|
6896
6898
|
children: [
|
|
@@ -6929,7 +6931,7 @@ function Td() {
|
|
|
6929
6931
|
}, e))
|
|
6930
6932
|
]
|
|
6931
6933
|
}),
|
|
6932
|
-
/* @__PURE__ */ G(
|
|
6934
|
+
/* @__PURE__ */ G(Zt, {
|
|
6933
6935
|
flyout: !0,
|
|
6934
6936
|
label: "Right rail",
|
|
6935
6937
|
children: [
|
|
@@ -6947,7 +6949,7 @@ function Td() {
|
|
|
6947
6949
|
children: "Timeline"
|
|
6948
6950
|
}),
|
|
6949
6951
|
/* @__PURE__ */ G(R, {}),
|
|
6950
|
-
/* @__PURE__ */ K(
|
|
6952
|
+
/* @__PURE__ */ K(Zt, {
|
|
6951
6953
|
flyout: !0,
|
|
6952
6954
|
label: "Workspace",
|
|
6953
6955
|
children: [
|
|
@@ -6983,7 +6985,7 @@ function Td() {
|
|
|
6983
6985
|
]
|
|
6984
6986
|
})
|
|
6985
6987
|
}),
|
|
6986
|
-
/* @__PURE__ */ G(
|
|
6988
|
+
/* @__PURE__ */ G(Qt, {
|
|
6987
6989
|
label: "Help",
|
|
6988
6990
|
...Sd,
|
|
6989
6991
|
children: /* @__PURE__ */ G("div", {
|
|
@@ -7032,7 +7034,7 @@ function Dd() {
|
|
|
7032
7034
|
}, []), /* @__PURE__ */ G(Ql, {
|
|
7033
7035
|
open: e,
|
|
7034
7036
|
onClose: () => t(!1),
|
|
7035
|
-
children: /* @__PURE__ */ G(
|
|
7037
|
+
children: /* @__PURE__ */ G(qt, {
|
|
7036
7038
|
label: "Canvas",
|
|
7037
7039
|
divided: !0,
|
|
7038
7040
|
children: /* @__PURE__ */ G(dn, {
|
|
@@ -9283,7 +9285,7 @@ var $f = 10, ep = 6, tp = [
|
|
|
9283
9285
|
return n ? e.reduce((e, t, r) => t.group === n ? [...e, r] : e, []) : [t];
|
|
9284
9286
|
};
|
|
9285
9287
|
function rp({ layer: e, initialIndex: t = 0, toVirtual: n, updateLayer: r, beginTransaction: i, commitTransaction: a, onExit: o }) {
|
|
9286
|
-
let s = In(
|
|
9288
|
+
let s = In(jt), c = H(null), [l, u] = U(null), [d, f] = U(t), p = e.comp?.instances ?? [], m = d == null ? null : Math.max(0, Math.min(d, p.length - 1)), h = m == null || !p.length ? [] : np(p, m).map((e) => p[e]?.id).filter(Boolean), g = H(h);
|
|
9287
9289
|
g.current = h;
|
|
9288
9290
|
let _ = () => document.querySelector(`[data-layer-id="${e.id}"][data-kinetic-host]`)?.__kolKineticEngine ?? null;
|
|
9289
9291
|
V(() => {
|
|
@@ -9476,7 +9478,7 @@ function op(e, t, n) {
|
|
|
9476
9478
|
}
|
|
9477
9479
|
var sp = 10;
|
|
9478
9480
|
function cp({ layer: e, toVirtual: t, updateLayer: n, beginTransaction: r, commitTransaction: i, onExit: a }) {
|
|
9479
|
-
let o = In(
|
|
9481
|
+
let o = In(jt), s = H(null), [c, l] = U(-1), u = Array.isArray(e.forms) ? e.forms : [], d = Math.max(1, e.w ?? 1), f = Math.max(1, e.h ?? 1), p = d / f, h = e.rotation ?? 0;
|
|
9480
9482
|
V(() => {
|
|
9481
9483
|
let t = (t) => {
|
|
9482
9484
|
t.detail?.id === e.id && t.detail.from === "panel" && l(t.detail.index);
|
|
@@ -9850,7 +9852,7 @@ function wp(e, t) {
|
|
|
9850
9852
|
return !e || typeof e != "string" ? e : `color-mix(in srgb, ${e} ${Math.round(t * 100)}%, transparent)`;
|
|
9851
9853
|
}
|
|
9852
9854
|
function Tp() {
|
|
9853
|
-
let e = In(
|
|
9855
|
+
let e = In(jt), [t, n] = U(1);
|
|
9854
9856
|
return V(() => {
|
|
9855
9857
|
let e = document.querySelector(".kol-editor-canvas [data-canvas-frame]");
|
|
9856
9858
|
if (!e) return;
|
|
@@ -10625,7 +10627,7 @@ function Fp() {
|
|
|
10625
10627
|
let e = ue(a, xt);
|
|
10626
10628
|
e?.type === "path" && (St(null), bt(e));
|
|
10627
10629
|
}, [a, xt]);
|
|
10628
|
-
let
|
|
10630
|
+
let Ft = Fn((e) => {
|
|
10629
10631
|
if (!(!e || e.locked)) {
|
|
10630
10632
|
if (e.type === "path") {
|
|
10631
10633
|
j("select"), bt(e);
|
|
@@ -10639,7 +10641,7 @@ function Fp() {
|
|
|
10639
10641
|
bt
|
|
10640
10642
|
]);
|
|
10641
10643
|
V(() => {
|
|
10642
|
-
let e = () =>
|
|
10644
|
+
let e = () => Ft(N);
|
|
10643
10645
|
return window.addEventListener("kol:node-edit", e), () => window.removeEventListener("kol:node-edit", e);
|
|
10644
10646
|
});
|
|
10645
10647
|
let Rt = Fn((e) => {
|
|
@@ -10647,11 +10649,11 @@ function Fp() {
|
|
|
10647
10649
|
let t = e.target.closest("[data-layer-id]");
|
|
10648
10650
|
if (!t) return;
|
|
10649
10651
|
let n = t.getAttribute("data-layer-id"), r = a.find((e) => e.id === n);
|
|
10650
|
-
r?.type === "path" || r?.type === "shape" && Pp.has(r.kind) ? (e.preventDefault(),
|
|
10652
|
+
r?.type === "path" || r?.type === "shape" && Pp.has(r.kind) ? (e.preventDefault(), Ft(r)) : r?.type === "photo" && !r.locked ? (e.preventDefault(), ut(r)) : (r?.type === "repeat" || r?.type === "generate") && (e.preventDefault(), mt(r.type, r));
|
|
10651
10653
|
}, [
|
|
10652
10654
|
A,
|
|
10653
10655
|
a,
|
|
10654
|
-
|
|
10656
|
+
Ft,
|
|
10655
10657
|
ut
|
|
10656
10658
|
]), zt = Rn(() => {
|
|
10657
10659
|
if (!Ye || Ye.nodes.length === 0) return "";
|
|
@@ -10921,7 +10923,7 @@ function Fp() {
|
|
|
10921
10923
|
n.preventDefault(), nt(null), j("select");
|
|
10922
10924
|
return;
|
|
10923
10925
|
case "node-edit":
|
|
10924
|
-
n.preventDefault(),
|
|
10926
|
+
n.preventDefault(), Ft(N);
|
|
10925
10927
|
return;
|
|
10926
10928
|
case "tool-text":
|
|
10927
10929
|
n.preventDefault(), j("text");
|
|
@@ -10980,7 +10982,7 @@ function Fp() {
|
|
|
10980
10982
|
te,
|
|
10981
10983
|
re,
|
|
10982
10984
|
bt,
|
|
10983
|
-
|
|
10985
|
+
Ft,
|
|
10984
10986
|
oe,
|
|
10985
10987
|
le,
|
|
10986
10988
|
_,
|
|
@@ -11078,7 +11080,7 @@ function Fp() {
|
|
|
11078
11080
|
variant: e === "float" ? "float" : void 0,
|
|
11079
11081
|
name: e === "float" ? wt(t) : void 0
|
|
11080
11082
|
}, t.id)),
|
|
11081
|
-
Vt && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
11083
|
+
Vt && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(Lt, {
|
|
11082
11084
|
layer: Vt,
|
|
11083
11085
|
toVirtual: pt,
|
|
11084
11086
|
updateLayer: S,
|
|
@@ -11114,7 +11116,7 @@ function Fp() {
|
|
|
11114
11116
|
commitTransaction: k,
|
|
11115
11117
|
onExit: () => ct(null)
|
|
11116
11118
|
}),
|
|
11117
|
-
Bt && /* @__PURE__ */ G(
|
|
11119
|
+
Bt && /* @__PURE__ */ G(nn, {
|
|
11118
11120
|
layer: Bt,
|
|
11119
11121
|
viewW: 1080,
|
|
11120
11122
|
viewH: dt,
|
|
@@ -11229,7 +11231,7 @@ function Fp() {
|
|
|
11229
11231
|
} })
|
|
11230
11232
|
]
|
|
11231
11233
|
})]
|
|
11232
|
-
}), /* @__PURE__ */ G(
|
|
11234
|
+
}), /* @__PURE__ */ G(It, {
|
|
11233
11235
|
menu: lt,
|
|
11234
11236
|
children: (e) => /* @__PURE__ */ G(Ip, {
|
|
11235
11237
|
layer: e ? ue(a, e) : null,
|
|
@@ -11462,7 +11464,7 @@ function Hp({ layer: e, active: t, tinted: n, isContainer: r, IconC: i, labelFor
|
|
|
11462
11464
|
name: o(e.type),
|
|
11463
11465
|
size: 14
|
|
11464
11466
|
})
|
|
11465
|
-
}), /* @__PURE__ */ G(
|
|
11467
|
+
}), /* @__PURE__ */ G(Ut, {
|
|
11466
11468
|
variant: "ghost",
|
|
11467
11469
|
size: "sm",
|
|
11468
11470
|
width: "100%",
|
|
@@ -11733,7 +11735,7 @@ function Jp() {
|
|
|
11733
11735
|
label: "Add layer",
|
|
11734
11736
|
children: /* @__PURE__ */ G("span", {
|
|
11735
11737
|
"aria-label": "Add layer",
|
|
11736
|
-
children: /* @__PURE__ */ G(
|
|
11738
|
+
children: /* @__PURE__ */ G(Qt, {
|
|
11737
11739
|
label: /* @__PURE__ */ G(q, {
|
|
11738
11740
|
name: "plus",
|
|
11739
11741
|
size: 16
|
|
@@ -11744,7 +11746,7 @@ function Jp() {
|
|
|
11744
11746
|
panelClassName: Xp,
|
|
11745
11747
|
children: /* @__PURE__ */ G("div", {
|
|
11746
11748
|
className: "py-1 w-[180px]",
|
|
11747
|
-
children: g().map((e) => e.id === "shape" ? /* @__PURE__ */ G(
|
|
11749
|
+
children: g().map((e) => e.id === "shape" ? /* @__PURE__ */ G(Zt, {
|
|
11748
11750
|
flyout: !0,
|
|
11749
11751
|
iconLeft: n(Kp(e.id)),
|
|
11750
11752
|
label: e.label,
|
|
@@ -11814,7 +11816,7 @@ function Zp() {
|
|
|
11814
11816
|
children: /* @__PURE__ */ G("span", {
|
|
11815
11817
|
className: i ? "pointer-events-none opacity-40" : void 0,
|
|
11816
11818
|
"aria-label": t,
|
|
11817
|
-
children: /* @__PURE__ */ G(
|
|
11819
|
+
children: /* @__PURE__ */ G(Qt, {
|
|
11818
11820
|
label: /* @__PURE__ */ G(q, {
|
|
11819
11821
|
name: n,
|
|
11820
11822
|
size: 16
|
|
@@ -11835,7 +11837,7 @@ function Zp() {
|
|
|
11835
11837
|
children: [
|
|
11836
11838
|
/* @__PURE__ */ G(Jp, {}),
|
|
11837
11839
|
m("Group", "folder", () => a(u), { disabled: d.length < 2 }),
|
|
11838
|
-
/* @__PURE__ */ G(
|
|
11840
|
+
/* @__PURE__ */ G(Rt, {
|
|
11839
11841
|
variant: "vertical",
|
|
11840
11842
|
height: 16,
|
|
11841
11843
|
className: "mx-1"
|
|
@@ -11928,7 +11930,7 @@ function dm() {
|
|
|
11928
11930
|
}) : /* @__PURE__ */ G(kt, {
|
|
11929
11931
|
cols: 3,
|
|
11930
11932
|
gap: "gap-2",
|
|
11931
|
-
children: t.items.map((n) => /* @__PURE__ */ G(
|
|
11933
|
+
children: t.items.map((n) => /* @__PURE__ */ G(Yt, {
|
|
11932
11934
|
name: n.key.split("/").pop(),
|
|
11933
11935
|
preview: /* @__PURE__ */ G("img", {
|
|
11934
11936
|
src: sm(n.key, t.bucket),
|
|
@@ -11976,7 +11978,7 @@ function fm() {
|
|
|
11976
11978
|
t === "grid" ? /* @__PURE__ */ G(kt, {
|
|
11977
11979
|
cols: 2,
|
|
11978
11980
|
gap: "gap-2",
|
|
11979
|
-
children: Id.map((e) => /* @__PURE__ */ G(
|
|
11981
|
+
children: Id.map((e) => /* @__PURE__ */ G(Yt, {
|
|
11980
11982
|
name: e,
|
|
11981
11983
|
preview: /* @__PURE__ */ G("span", {
|
|
11982
11984
|
className: "block h-full w-full p-3 text-emphasis",
|
|
@@ -11989,7 +11991,7 @@ function fm() {
|
|
|
11989
11991
|
}, e))
|
|
11990
11992
|
}) : /* @__PURE__ */ G("div", {
|
|
11991
11993
|
className: "flex flex-col",
|
|
11992
|
-
children: Id.map((e) => /* @__PURE__ */ G(
|
|
11994
|
+
children: Id.map((e) => /* @__PURE__ */ G(Ft, {
|
|
11993
11995
|
variant: "file",
|
|
11994
11996
|
title: e,
|
|
11995
11997
|
titleClass: "kol-mono-12 text-emphasis truncate",
|
|
@@ -12315,7 +12317,8 @@ function Dm() {
|
|
|
12315
12317
|
label: "Style",
|
|
12316
12318
|
align: "fill",
|
|
12317
12319
|
labelWidth: p,
|
|
12318
|
-
children: /* @__PURE__ */ G(
|
|
12320
|
+
children: /* @__PURE__ */ G(At, {
|
|
12321
|
+
layout: "joined",
|
|
12319
12322
|
size: e,
|
|
12320
12323
|
className: "w-full",
|
|
12321
12324
|
value: f,
|
|
@@ -12332,7 +12335,8 @@ function Dm() {
|
|
|
12332
12335
|
label: "Cap",
|
|
12333
12336
|
align: "fill",
|
|
12334
12337
|
labelWidth: p,
|
|
12335
|
-
children: /* @__PURE__ */ G(
|
|
12338
|
+
children: /* @__PURE__ */ G(At, {
|
|
12339
|
+
layout: "joined",
|
|
12336
12340
|
size: e,
|
|
12337
12341
|
className: "w-full",
|
|
12338
12342
|
value: u,
|
|
@@ -12344,7 +12348,8 @@ function Dm() {
|
|
|
12344
12348
|
label: "Join",
|
|
12345
12349
|
align: "fill",
|
|
12346
12350
|
labelWidth: p,
|
|
12347
|
-
children: /* @__PURE__ */ G(
|
|
12351
|
+
children: /* @__PURE__ */ G(At, {
|
|
12352
|
+
layout: "joined",
|
|
12348
12353
|
size: e,
|
|
12349
12354
|
className: "w-full",
|
|
12350
12355
|
value: d,
|
|
@@ -12433,7 +12438,7 @@ function jm() {
|
|
|
12433
12438
|
className: "p-4 flex flex-col gap-3 flex-1 min-h-0",
|
|
12434
12439
|
children: [
|
|
12435
12440
|
/* @__PURE__ */ G(Nm, { target: e }),
|
|
12436
|
-
/* @__PURE__ */ G(
|
|
12441
|
+
/* @__PURE__ */ G(zt, {
|
|
12437
12442
|
size: r,
|
|
12438
12443
|
variant: "subtle",
|
|
12439
12444
|
className: "w-full",
|
|
@@ -12485,7 +12490,7 @@ function Nm({ target: e }) {
|
|
|
12485
12490
|
onSwap: a,
|
|
12486
12491
|
onClear: d
|
|
12487
12492
|
}),
|
|
12488
|
-
/* @__PURE__ */ G(
|
|
12493
|
+
/* @__PURE__ */ G(Bt, {
|
|
12489
12494
|
sampleColor: n === "stroke" ? h : m,
|
|
12490
12495
|
onPick: f
|
|
12491
12496
|
}),
|
|
@@ -12509,7 +12514,7 @@ function Pm({ target: e }) {
|
|
|
12509
12514
|
let t = Lu(e.hex).toHsv(), n = (t) => e.onChange(t.toUpperCase());
|
|
12510
12515
|
return /* @__PURE__ */ K("div", {
|
|
12511
12516
|
className: "flex flex-col gap-3 w-full flex-1 min-h-0",
|
|
12512
|
-
children: [/* @__PURE__ */ G(
|
|
12517
|
+
children: [/* @__PURE__ */ G(Ht, {
|
|
12513
12518
|
hue: t.h,
|
|
12514
12519
|
onChange: (e) => n(Lu({
|
|
12515
12520
|
h: e,
|
|
@@ -12518,7 +12523,7 @@ function Pm({ target: e }) {
|
|
|
12518
12523
|
}).toHex())
|
|
12519
12524
|
}), /* @__PURE__ */ G("div", {
|
|
12520
12525
|
className: "flex-1 min-h-16 rounded-[2px] overflow-hidden",
|
|
12521
|
-
children: /* @__PURE__ */ G(
|
|
12526
|
+
children: /* @__PURE__ */ G(an, {
|
|
12522
12527
|
hue: t.h,
|
|
12523
12528
|
sat: t.s,
|
|
12524
12529
|
val: t.v,
|
|
@@ -12807,7 +12812,7 @@ function th({ onPick: e, currentHex: t }) {
|
|
|
12807
12812
|
children: "Recent"
|
|
12808
12813
|
}), /* @__PURE__ */ G("div", {
|
|
12809
12814
|
className: "flex-1 min-w-0 h-5 flex items-center gap-1 rounded-[2px] bg-oq-04 px-0.5",
|
|
12810
|
-
children: Jm.map((e) => /* @__PURE__ */ G(
|
|
12815
|
+
children: Jm.map((e) => /* @__PURE__ */ G(Nt, {
|
|
12811
12816
|
hex: e,
|
|
12812
12817
|
size: 16,
|
|
12813
12818
|
radius: "tight",
|
|
@@ -12820,7 +12825,7 @@ function th({ onPick: e, currentHex: t }) {
|
|
|
12820
12825
|
/* @__PURE__ */ K("div", {
|
|
12821
12826
|
className: "flex items-center gap-2",
|
|
12822
12827
|
children: [
|
|
12823
|
-
/* @__PURE__ */ G(
|
|
12828
|
+
/* @__PURE__ */ G(zt, {
|
|
12824
12829
|
variant: "subtle",
|
|
12825
12830
|
size: c,
|
|
12826
12831
|
options: Wm,
|
|
@@ -12846,7 +12851,7 @@ function th({ onPick: e, currentHex: t }) {
|
|
|
12846
12851
|
})
|
|
12847
12852
|
})
|
|
12848
12853
|
}),
|
|
12849
|
-
qm.map((e) => /* @__PURE__ */ G(
|
|
12854
|
+
qm.map((e) => /* @__PURE__ */ G(Nt, {
|
|
12850
12855
|
hex: e.hex ?? void 0,
|
|
12851
12856
|
showTransparent: !e.hex,
|
|
12852
12857
|
size: 16,
|
|
@@ -12858,7 +12863,7 @@ function th({ onPick: e, currentHex: t }) {
|
|
|
12858
12863
|
}),
|
|
12859
12864
|
/* @__PURE__ */ G("div", {
|
|
12860
12865
|
className: "grid grid-cols-8 gap-1",
|
|
12861
|
-
children: d.map(({ hex: e, name: t }, n) => /* @__PURE__ */ G(
|
|
12866
|
+
children: d.map(({ hex: e, name: t }, n) => /* @__PURE__ */ G(Nt, {
|
|
12862
12867
|
hex: e,
|
|
12863
12868
|
size: "fill",
|
|
12864
12869
|
radius: "tight",
|
|
@@ -12871,7 +12876,7 @@ function th({ onPick: e, currentHex: t }) {
|
|
|
12871
12876
|
className: "kol-helper-10 text-meta",
|
|
12872
12877
|
children: "Add the current colour with +"
|
|
12873
12878
|
}),
|
|
12874
|
-
/* @__PURE__ */ G(
|
|
12879
|
+
/* @__PURE__ */ G(on, {
|
|
12875
12880
|
size: c,
|
|
12876
12881
|
value: i,
|
|
12877
12882
|
onChange: (e) => a(e.target.value),
|
|
@@ -12884,7 +12889,7 @@ function th({ onPick: e, currentHex: t }) {
|
|
|
12884
12889
|
//#endregion
|
|
12885
12890
|
//#region src/editor/components/Pane.jsx
|
|
12886
12891
|
function nh({ label: e, ...t }) {
|
|
12887
|
-
return /* @__PURE__ */ G(
|
|
12892
|
+
return /* @__PURE__ */ G(Gt, {
|
|
12888
12893
|
pane: !0,
|
|
12889
12894
|
label: e && /* @__PURE__ */ G("span", {
|
|
12890
12895
|
className: "kol-eyebrow text-fg-80",
|
|
@@ -13101,7 +13106,7 @@ function mh({ layer: e, bare: t = !1 }) {
|
|
|
13101
13106
|
label: t ? void 0 : "Typography",
|
|
13102
13107
|
actions: m,
|
|
13103
13108
|
children: [
|
|
13104
|
-
/* @__PURE__ */ G(
|
|
13109
|
+
/* @__PURE__ */ G(zt, {
|
|
13105
13110
|
variant: "subtle",
|
|
13106
13111
|
size: n,
|
|
13107
13112
|
className: "w-full",
|
|
@@ -13111,7 +13116,7 @@ function mh({ layer: e, bare: t = !1 }) {
|
|
|
13111
13116
|
}),
|
|
13112
13117
|
/* @__PURE__ */ K("div", {
|
|
13113
13118
|
className: "grid grid-cols-[1fr_96px] gap-2",
|
|
13114
|
-
children: [/* @__PURE__ */ G(
|
|
13119
|
+
children: [/* @__PURE__ */ G(zt, {
|
|
13115
13120
|
variant: "subtle",
|
|
13116
13121
|
size: n,
|
|
13117
13122
|
className: "w-full",
|
|
@@ -13167,7 +13172,8 @@ function mh({ layer: e, bare: t = !1 }) {
|
|
|
13167
13172
|
}),
|
|
13168
13173
|
/* @__PURE__ */ K("div", {
|
|
13169
13174
|
className: "flex items-center gap-2",
|
|
13170
|
-
children: [/* @__PURE__ */ G(
|
|
13175
|
+
children: [/* @__PURE__ */ G(At, {
|
|
13176
|
+
layout: "joined",
|
|
13171
13177
|
size: n,
|
|
13172
13178
|
ariaLabel: "Text alignment",
|
|
13173
13179
|
value: e.textAlign ?? "center",
|
|
@@ -13198,7 +13204,8 @@ function mh({ layer: e, bare: t = !1 }) {
|
|
|
13198
13204
|
}
|
|
13199
13205
|
],
|
|
13200
13206
|
onChange: (e) => o("textAlign", e)
|
|
13201
|
-
}), /* @__PURE__ */ G(
|
|
13207
|
+
}), /* @__PURE__ */ G(At, {
|
|
13208
|
+
layout: "joined",
|
|
13202
13209
|
size: n,
|
|
13203
13210
|
ariaLabel: "Vertical alignment",
|
|
13204
13211
|
value: e.verticalAlign ?? "middle",
|
|
@@ -13231,24 +13238,26 @@ function mh({ layer: e, bare: t = !1 }) {
|
|
|
13231
13238
|
onChange: (e) => o("verticalAlign", e)
|
|
13232
13239
|
})]
|
|
13233
13240
|
}),
|
|
13234
|
-
/* @__PURE__ */ K(
|
|
13241
|
+
/* @__PURE__ */ K(rn, {
|
|
13235
13242
|
popover: d,
|
|
13236
13243
|
panel: !1,
|
|
13237
13244
|
focus: !1,
|
|
13238
13245
|
className: "z-50 bg-surface-secondary border border-oq-08 rounded shadow-lg p-3 flex flex-col gap-3",
|
|
13239
13246
|
style: { minWidth: 240 },
|
|
13240
|
-
children: [/* @__PURE__ */ G(
|
|
13247
|
+
children: [/* @__PURE__ */ G(Kt, {
|
|
13241
13248
|
label: "Case",
|
|
13242
|
-
children: /* @__PURE__ */ G(
|
|
13249
|
+
children: /* @__PURE__ */ G(At, {
|
|
13250
|
+
layout: "joined",
|
|
13243
13251
|
size: n,
|
|
13244
13252
|
className: "w-full",
|
|
13245
13253
|
options: dh,
|
|
13246
13254
|
value: e.case ?? "original",
|
|
13247
13255
|
onChange: (e) => o("case", e)
|
|
13248
13256
|
})
|
|
13249
|
-
}), /* @__PURE__ */ G(
|
|
13257
|
+
}), /* @__PURE__ */ G(Kt, {
|
|
13250
13258
|
label: "Italic",
|
|
13251
|
-
children: /* @__PURE__ */ G(
|
|
13259
|
+
children: /* @__PURE__ */ G(At, {
|
|
13260
|
+
layout: "joined",
|
|
13252
13261
|
size: n,
|
|
13253
13262
|
className: "w-full",
|
|
13254
13263
|
variant: "single",
|
|
@@ -13339,7 +13348,7 @@ function _h({ layer: e, setProp: t }) {
|
|
|
13339
13348
|
})
|
|
13340
13349
|
})
|
|
13341
13350
|
}),
|
|
13342
|
-
/* @__PURE__ */ G(
|
|
13351
|
+
/* @__PURE__ */ G(rn, {
|
|
13343
13352
|
popover: i,
|
|
13344
13353
|
panel: !1,
|
|
13345
13354
|
focus: !1,
|
|
@@ -13408,7 +13417,8 @@ function vh({ layer: e, setProp: t }) {
|
|
|
13408
13417
|
children: [/* @__PURE__ */ G("span", {
|
|
13409
13418
|
className: "kol-eyebrow text-meta",
|
|
13410
13419
|
children: "Morph"
|
|
13411
|
-
}), /* @__PURE__ */ G(
|
|
13420
|
+
}), /* @__PURE__ */ G(At, {
|
|
13421
|
+
layout: "joined",
|
|
13412
13422
|
size: n,
|
|
13413
13423
|
options: [{
|
|
13414
13424
|
value: "off",
|
|
@@ -13425,7 +13435,8 @@ function vh({ layer: e, setProp: t }) {
|
|
|
13425
13435
|
label: "Mode",
|
|
13426
13436
|
align: "fill",
|
|
13427
13437
|
labelWidth: p,
|
|
13428
|
-
children: /* @__PURE__ */ G(
|
|
13438
|
+
children: /* @__PURE__ */ G(At, {
|
|
13439
|
+
layout: "joined",
|
|
13429
13440
|
size: n,
|
|
13430
13441
|
className: "w-full",
|
|
13431
13442
|
options: [
|
|
@@ -13450,7 +13461,7 @@ function vh({ layer: e, setProp: t }) {
|
|
|
13450
13461
|
label: "Style B",
|
|
13451
13462
|
align: "fill",
|
|
13452
13463
|
labelWidth: p,
|
|
13453
|
-
children: /* @__PURE__ */ G(
|
|
13464
|
+
children: /* @__PURE__ */ G(zt, {
|
|
13454
13465
|
variant: "subtle",
|
|
13455
13466
|
size: n,
|
|
13456
13467
|
className: "w-full",
|
|
@@ -13469,7 +13480,7 @@ function vh({ layer: e, setProp: t }) {
|
|
|
13469
13480
|
label: "Curve",
|
|
13470
13481
|
align: "fill",
|
|
13471
13482
|
labelWidth: p,
|
|
13472
|
-
children: /* @__PURE__ */ G(
|
|
13483
|
+
children: /* @__PURE__ */ G(zt, {
|
|
13473
13484
|
variant: "subtle",
|
|
13474
13485
|
size: n,
|
|
13475
13486
|
className: "w-full",
|
|
@@ -13498,7 +13509,7 @@ function vh({ layer: e, setProp: t }) {
|
|
|
13498
13509
|
label: "Lock width",
|
|
13499
13510
|
align: "fill",
|
|
13500
13511
|
labelWidth: p,
|
|
13501
|
-
children: /* @__PURE__ */ G(
|
|
13512
|
+
children: /* @__PURE__ */ G(zt, {
|
|
13502
13513
|
variant: "subtle",
|
|
13503
13514
|
size: n,
|
|
13504
13515
|
className: "w-full",
|
|
@@ -13513,7 +13524,7 @@ function vh({ layer: e, setProp: t }) {
|
|
|
13513
13524
|
label: "Lock weight",
|
|
13514
13525
|
align: "fill",
|
|
13515
13526
|
labelWidth: p,
|
|
13516
|
-
children: /* @__PURE__ */ G(
|
|
13527
|
+
children: /* @__PURE__ */ G(zt, {
|
|
13517
13528
|
variant: "subtle",
|
|
13518
13529
|
size: n,
|
|
13519
13530
|
className: "w-full",
|
|
@@ -13582,14 +13593,14 @@ function Sh({ open: e, accept: t = ["image", "video"], onClose: n, onSelect: r }
|
|
|
13582
13593
|
e.key !== "Enter" || e.metaKey || e.ctrlKey || e.altKey || e.target?.closest?.("input, textarea, [contenteditable=\"true\"]") || p.current && (e.preventDefault(), e.stopPropagation(), p.current());
|
|
13583
13594
|
};
|
|
13584
13595
|
return window.addEventListener("keydown", t, !0), () => window.removeEventListener("keydown", t, !0);
|
|
13585
|
-
}, [e]), e ? /* @__PURE__ */ G(
|
|
13596
|
+
}, [e]), e ? /* @__PURE__ */ G(Vt, {
|
|
13586
13597
|
open: !0,
|
|
13587
13598
|
scrim: !0,
|
|
13588
13599
|
onClose: n,
|
|
13589
13600
|
closeButton: !1,
|
|
13590
13601
|
children: /* @__PURE__ */ K("div", {
|
|
13591
13602
|
className: "kol-media-picker gap-4",
|
|
13592
|
-
children: [/* @__PURE__ */ G(
|
|
13603
|
+
children: [/* @__PURE__ */ G(Jt, {
|
|
13593
13604
|
variant: "browse",
|
|
13594
13605
|
client: i,
|
|
13595
13606
|
title: "Media",
|
|
@@ -13598,7 +13609,7 @@ function Sh({ open: e, accept: t = ["image", "video"], onClose: n, onSelect: r }
|
|
|
13598
13609
|
settings: a,
|
|
13599
13610
|
onSettingsChange: o,
|
|
13600
13611
|
onPickFile: u,
|
|
13601
|
-
headerTrailing: /* @__PURE__ */ G(
|
|
13612
|
+
headerTrailing: /* @__PURE__ */ G(Mt, { onClick: n })
|
|
13602
13613
|
}), /* @__PURE__ */ K("div", {
|
|
13603
13614
|
className: "mt-auto flex items-center justify-end gap-4",
|
|
13604
13615
|
children: [
|
|
@@ -13669,7 +13680,7 @@ function Ch({ layer: e, paint: t, label: n, hex: r, none: i, palette: a, bare: o
|
|
|
13669
13680
|
}) : C ? /* @__PURE__ */ G("span", {
|
|
13670
13681
|
className: "block size-6 border border-oq-08 rounded-[3px] bg-center bg-cover",
|
|
13671
13682
|
style: C
|
|
13672
|
-
}) : /* @__PURE__ */ G(
|
|
13683
|
+
}) : /* @__PURE__ */ G(Nt, {
|
|
13673
13684
|
hex: i ? void 0 : r ?? "#FFFFFF",
|
|
13674
13685
|
size: 24,
|
|
13675
13686
|
showTransparent: i,
|
|
@@ -13680,7 +13691,7 @@ function Ch({ layer: e, paint: t, label: n, hex: r, none: i, palette: a, bare: o
|
|
|
13680
13691
|
className: "kol-helper-10 tracking-widest text-meta",
|
|
13681
13692
|
children: n.toUpperCase()
|
|
13682
13693
|
}),
|
|
13683
|
-
/* @__PURE__ */ K(
|
|
13694
|
+
/* @__PURE__ */ K(rn, {
|
|
13684
13695
|
popover: d,
|
|
13685
13696
|
panel: !1,
|
|
13686
13697
|
focus: !1,
|
|
@@ -13848,7 +13859,8 @@ function wh({ layer: e }) {
|
|
|
13848
13859
|
}),
|
|
13849
13860
|
e.type === "path" && /* @__PURE__ */ G(nh, {
|
|
13850
13861
|
label: "Path",
|
|
13851
|
-
children: /* @__PURE__ */ G(
|
|
13862
|
+
children: /* @__PURE__ */ G(At, {
|
|
13863
|
+
layout: "joined",
|
|
13852
13864
|
size: n,
|
|
13853
13865
|
className: "w-full",
|
|
13854
13866
|
options: [{
|
|
@@ -13887,7 +13899,7 @@ function wh({ layer: e }) {
|
|
|
13887
13899
|
layer: e,
|
|
13888
13900
|
setProp: l
|
|
13889
13901
|
}),
|
|
13890
|
-
/* @__PURE__ */ G(
|
|
13902
|
+
/* @__PURE__ */ G(tn, {
|
|
13891
13903
|
value: d,
|
|
13892
13904
|
onChange: m,
|
|
13893
13905
|
size: n,
|
|
@@ -13938,7 +13950,8 @@ function wh({ layer: e }) {
|
|
|
13938
13950
|
setProp: l
|
|
13939
13951
|
})]
|
|
13940
13952
|
}),
|
|
13941
|
-
/* @__PURE__ */ G(
|
|
13953
|
+
/* @__PURE__ */ G(At, {
|
|
13954
|
+
layout: "joined",
|
|
13942
13955
|
size: n,
|
|
13943
13956
|
value: null,
|
|
13944
13957
|
ariaLabel: "Transform",
|
|
@@ -13986,7 +13999,8 @@ function wh({ layer: e }) {
|
|
|
13986
13999
|
}
|
|
13987
14000
|
})
|
|
13988
14001
|
]
|
|
13989
|
-
}), e.type === "text" && /* @__PURE__ */ G(
|
|
14002
|
+
}), e.type === "text" && /* @__PURE__ */ G(At, {
|
|
14003
|
+
layout: "joined",
|
|
13990
14004
|
size: n,
|
|
13991
14005
|
ariaLabel: "Resizing",
|
|
13992
14006
|
value: e.resizing ?? "fixed",
|
|
@@ -14034,7 +14048,8 @@ function wh({ layer: e }) {
|
|
|
14034
14048
|
label: "Background",
|
|
14035
14049
|
align: "fill",
|
|
14036
14050
|
labelWidth: p,
|
|
14037
|
-
children: /* @__PURE__ */ G(
|
|
14051
|
+
children: /* @__PURE__ */ G(At, {
|
|
14052
|
+
layout: "joined",
|
|
14038
14053
|
size: n,
|
|
14039
14054
|
className: "w-full",
|
|
14040
14055
|
options: [{
|
|
@@ -14059,7 +14074,8 @@ function wh({ layer: e }) {
|
|
|
14059
14074
|
}),
|
|
14060
14075
|
e.type === "path" && /* @__PURE__ */ G(nh, {
|
|
14061
14076
|
label: "Path",
|
|
14062
|
-
children: /* @__PURE__ */ G(
|
|
14077
|
+
children: /* @__PURE__ */ G(At, {
|
|
14078
|
+
layout: "joined",
|
|
14063
14079
|
size: n,
|
|
14064
14080
|
className: "w-full",
|
|
14065
14081
|
options: [{
|
|
@@ -14128,7 +14144,7 @@ function Eh({ layer: e, setProp: t, edit: n, first: r }) {
|
|
|
14128
14144
|
...l.getReferenceProps()
|
|
14129
14145
|
}
|
|
14130
14146
|
}),
|
|
14131
|
-
/* @__PURE__ */ G(
|
|
14147
|
+
/* @__PURE__ */ G(rn, {
|
|
14132
14148
|
popover: l,
|
|
14133
14149
|
panel: !1,
|
|
14134
14150
|
focus: !1,
|
|
@@ -14308,7 +14324,7 @@ function jh({ layer: e, patch: t }) {
|
|
|
14308
14324
|
t.detail === e.id && r.current?.click();
|
|
14309
14325
|
};
|
|
14310
14326
|
return window.addEventListener("kol:photo-replace", t), () => window.removeEventListener("kol:photo-replace", t);
|
|
14311
|
-
}, [e.id]), /* @__PURE__ */ K(
|
|
14327
|
+
}, [e.id]), /* @__PURE__ */ K(Kt, {
|
|
14312
14328
|
label: "SOURCE",
|
|
14313
14329
|
children: [
|
|
14314
14330
|
/* @__PURE__ */ G("input", {
|
|
@@ -14568,7 +14584,7 @@ function Hh({ layer: e }) {
|
|
|
14568
14584
|
return /* @__PURE__ */ K("div", {
|
|
14569
14585
|
className: "flex flex-col gap-2",
|
|
14570
14586
|
children: [
|
|
14571
|
-
/* @__PURE__ */ G(
|
|
14587
|
+
/* @__PURE__ */ G(zt, {
|
|
14572
14588
|
variant: "float",
|
|
14573
14589
|
size: "md",
|
|
14574
14590
|
ariaLabel: "Blend mode",
|
|
@@ -14616,7 +14632,7 @@ function Hh({ layer: e }) {
|
|
|
14616
14632
|
"aria-label": "No fill",
|
|
14617
14633
|
onClick: () => t.patch({ color: null }),
|
|
14618
14634
|
className: "inline-flex shrink-0 rounded-sm overflow-hidden",
|
|
14619
|
-
children: /* @__PURE__ */ G(
|
|
14635
|
+
children: /* @__PURE__ */ G(Nt, {
|
|
14620
14636
|
size: 24,
|
|
14621
14637
|
showTransparent: !0,
|
|
14622
14638
|
hoverable: !1
|
|
@@ -14686,7 +14702,7 @@ function Gh({ layer: e, edit: t, anchor: n, setAnchor: r }) {
|
|
|
14686
14702
|
value: Math.round(e.skewY ?? 0),
|
|
14687
14703
|
onCommit: (e) => t.setProp("skewY", Lh(e))
|
|
14688
14704
|
}),
|
|
14689
|
-
/* @__PURE__ */ G(
|
|
14705
|
+
/* @__PURE__ */ G(tn, {
|
|
14690
14706
|
value: n,
|
|
14691
14707
|
onChange: r,
|
|
14692
14708
|
size: i,
|
|
@@ -14704,7 +14720,8 @@ function Gh({ layer: e, edit: t, anchor: n, setAnchor: r }) {
|
|
|
14704
14720
|
t.setProp("radius", Number.isFinite(n) && n > 0 ? Math.round(n) : 0);
|
|
14705
14721
|
}
|
|
14706
14722
|
}) : /* @__PURE__ */ G("span", {}),
|
|
14707
|
-
/* @__PURE__ */ G(
|
|
14723
|
+
/* @__PURE__ */ G(At, {
|
|
14724
|
+
layout: "joined",
|
|
14708
14725
|
size: i,
|
|
14709
14726
|
value: null,
|
|
14710
14727
|
ariaLabel: "Transform",
|
|
@@ -14791,7 +14808,8 @@ function Gh({ layer: e, edit: t, anchor: n, setAnchor: r }) {
|
|
|
14791
14808
|
}
|
|
14792
14809
|
}, n))
|
|
14793
14810
|
}),
|
|
14794
|
-
e.type === "text" && /* @__PURE__ */ G(
|
|
14811
|
+
e.type === "text" && /* @__PURE__ */ G(At, {
|
|
14812
|
+
layout: "joined",
|
|
14795
14813
|
size: i,
|
|
14796
14814
|
ariaLabel: "Resizing",
|
|
14797
14815
|
value: e.resizing ?? "fixed",
|
|
@@ -14844,7 +14862,7 @@ function qh() {
|
|
|
14844
14862
|
children: [
|
|
14845
14863
|
/* @__PURE__ */ G("div", {
|
|
14846
14864
|
className: "flex flex-col gap-1",
|
|
14847
|
-
children: /* @__PURE__ */ G(
|
|
14865
|
+
children: /* @__PURE__ */ G(zt, {
|
|
14848
14866
|
variant: "subtle",
|
|
14849
14867
|
size: t,
|
|
14850
14868
|
className: "w-full",
|
|
@@ -14934,7 +14952,7 @@ function Jh({ label: e, value: t, onCommit: n, num: r }) {
|
|
|
14934
14952
|
//#region src/editor/compose/InspectorRail.jsx
|
|
14935
14953
|
function Yh() {
|
|
14936
14954
|
let { selectedIds: e, layers: t } = x();
|
|
14937
|
-
return /* @__PURE__ */ G(
|
|
14955
|
+
return /* @__PURE__ */ G(Wt, {
|
|
14938
14956
|
className: "kol-compose-rail kol-compose-rail--inspector",
|
|
14939
14957
|
selectedIds: e,
|
|
14940
14958
|
canvasId: "canvas",
|
|
@@ -14979,7 +14997,7 @@ function Xh({ ids: e }) {
|
|
|
14979
14997
|
e !== "" && Number.isFinite(t) && l({ opacity: Math.min(1, Math.max(0, t / 100)) });
|
|
14980
14998
|
}
|
|
14981
14999
|
})
|
|
14982
|
-
}), /* @__PURE__ */ G(
|
|
15000
|
+
}), /* @__PURE__ */ G(zt, {
|
|
14983
15001
|
variant: "subtle",
|
|
14984
15002
|
size: t,
|
|
14985
15003
|
className: "w-full",
|
|
@@ -15422,7 +15440,8 @@ function dg({ layer: e, only: t }) {
|
|
|
15422
15440
|
renderAnimate: m,
|
|
15423
15441
|
tab: d,
|
|
15424
15442
|
inline: !0
|
|
15425
|
-
}, g = p.length > 1 ? /* @__PURE__ */ G(
|
|
15443
|
+
}, g = p.length > 1 ? /* @__PURE__ */ G(At, {
|
|
15444
|
+
layout: "joined",
|
|
15426
15445
|
size: u,
|
|
15427
15446
|
className: "w-full",
|
|
15428
15447
|
value: d,
|
|
@@ -15583,7 +15602,7 @@ function fg({ layer: e, setProp: t, updateLayer: n, palette: r, renderAnimate: i
|
|
|
15583
15602
|
label: "Apply saved pattern",
|
|
15584
15603
|
align: "fill",
|
|
15585
15604
|
labelWidth: p,
|
|
15586
|
-
children: /* @__PURE__ */ G(
|
|
15605
|
+
children: /* @__PURE__ */ G(zt, {
|
|
15587
15606
|
variant: "subtle",
|
|
15588
15607
|
size: o,
|
|
15589
15608
|
className: "w-full",
|
|
@@ -15649,7 +15668,7 @@ function pg({ layer: e, setProp: t, updateLayer: n, palette: r, renderAnimate: i
|
|
|
15649
15668
|
label: "Apply saved spec",
|
|
15650
15669
|
align: "fill",
|
|
15651
15670
|
labelWidth: p,
|
|
15652
|
-
children: /* @__PURE__ */ G(
|
|
15671
|
+
children: /* @__PURE__ */ G(zt, {
|
|
15653
15672
|
variant: "subtle",
|
|
15654
15673
|
size: o,
|
|
15655
15674
|
className: "w-full",
|
|
@@ -15765,7 +15784,7 @@ function _g({ values: e, onChange: t, onCopyCss: n, onReset: r }) {
|
|
|
15765
15784
|
className: "flex flex-col gap-1",
|
|
15766
15785
|
children: p.map((e, t) => /* @__PURE__ */ G("div", {
|
|
15767
15786
|
className: "grid grid-cols-10 gap-1",
|
|
15768
|
-
children: e.map((e, n) => /* @__PURE__ */ G(
|
|
15787
|
+
children: e.map((e, n) => /* @__PURE__ */ G(Nt, {
|
|
15769
15788
|
hex: e,
|
|
15770
15789
|
title: `${e} · alt+click for transparent`,
|
|
15771
15790
|
selected: !c && s?.toUpperCase() === e?.toUpperCase(),
|
|
@@ -15883,7 +15902,7 @@ function xg({ layer: e }) {
|
|
|
15883
15902
|
palette: r,
|
|
15884
15903
|
renderAnimate: o
|
|
15885
15904
|
}),
|
|
15886
|
-
/* @__PURE__ */ G(
|
|
15905
|
+
/* @__PURE__ */ G(Kt, {
|
|
15887
15906
|
label: `Rules · ${s.length}`,
|
|
15888
15907
|
children: /* @__PURE__ */ K("div", {
|
|
15889
15908
|
className: "flex flex-col gap-2",
|
|
@@ -15909,7 +15928,7 @@ function xg({ layer: e }) {
|
|
|
15909
15928
|
})]
|
|
15910
15929
|
})
|
|
15911
15930
|
}),
|
|
15912
|
-
/* @__PURE__ */ G(
|
|
15931
|
+
/* @__PURE__ */ G(Kt, {
|
|
15913
15932
|
label: "Color",
|
|
15914
15933
|
children: /* @__PURE__ */ G(_g, {
|
|
15915
15934
|
values: {
|
|
@@ -16338,7 +16357,8 @@ function Rg() {
|
|
|
16338
16357
|
className: "kol-helper-10 text-meta shrink-0",
|
|
16339
16358
|
children: "Audio"
|
|
16340
16359
|
}),
|
|
16341
|
-
/* @__PURE__ */ G(
|
|
16360
|
+
/* @__PURE__ */ G(At, {
|
|
16361
|
+
layout: "joined",
|
|
16342
16362
|
value: t,
|
|
16343
16363
|
onChange: async (e) => {
|
|
16344
16364
|
if (i(null), e === "off") d(), n("off");
|
|
@@ -16415,7 +16435,7 @@ function Vg({ open: e, onClose: t, runBatchExport: n, baseAspect: r, defaultScal
|
|
|
16415
16435
|
aspectId: e.id,
|
|
16416
16436
|
scale: t
|
|
16417
16437
|
});
|
|
16418
|
-
return /* @__PURE__ */ G(
|
|
16438
|
+
return /* @__PURE__ */ G(Vt, {
|
|
16419
16439
|
open: !0,
|
|
16420
16440
|
onClose: () => {
|
|
16421
16441
|
d || t();
|
|
@@ -16716,7 +16736,7 @@ function Yg() {
|
|
|
16716
16736
|
].map((e) => ({
|
|
16717
16737
|
value: e,
|
|
16718
16738
|
label: `@${e}x · ${ae * e} × ${oe * e}`
|
|
16719
|
-
})), ve = se && se !== "canvas" ? ue(ce, se) : null, ye = ve?.type === "photo" ? ve : null, be = /* @__PURE__ */ K(W, { children: [g && /* @__PURE__ */ G(
|
|
16739
|
+
})), ve = se && se !== "canvas" ? ue(ce, se) : null, ye = ve?.type === "photo" ? ve : null, be = /* @__PURE__ */ K(W, { children: [g && /* @__PURE__ */ G(Vt, {
|
|
16720
16740
|
open: !0,
|
|
16721
16741
|
closeButton: !1,
|
|
16722
16742
|
children: /* @__PURE__ */ K("div", {
|
|
@@ -16783,7 +16803,8 @@ function Yg() {
|
|
|
16783
16803
|
children: [
|
|
16784
16804
|
!t && /* @__PURE__ */ G("div", {
|
|
16785
16805
|
className: "flex items-center gap-2",
|
|
16786
|
-
children: /* @__PURE__ */ G(
|
|
16806
|
+
children: /* @__PURE__ */ G(At, {
|
|
16807
|
+
layout: "joined",
|
|
16787
16808
|
value: c,
|
|
16788
16809
|
onChange: (e) => l(t ? (t) => t === e ? null : e : e),
|
|
16789
16810
|
options: s,
|
|
@@ -16797,9 +16818,9 @@ function Yg() {
|
|
|
16797
16818
|
}),
|
|
16798
16819
|
c === "output" && /* @__PURE__ */ K("div", {
|
|
16799
16820
|
className: "flex flex-col gap-3",
|
|
16800
|
-
children: [/* @__PURE__ */ G(
|
|
16821
|
+
children: [/* @__PURE__ */ G(qt, {
|
|
16801
16822
|
label: "Aspect",
|
|
16802
|
-
children: /* @__PURE__ */ G(
|
|
16823
|
+
children: /* @__PURE__ */ G(zt, {
|
|
16803
16824
|
size: e,
|
|
16804
16825
|
variant: "subtle",
|
|
16805
16826
|
className: "w-full",
|
|
@@ -16807,10 +16828,10 @@ function Yg() {
|
|
|
16807
16828
|
value: re,
|
|
16808
16829
|
onChange: ie
|
|
16809
16830
|
})
|
|
16810
|
-
}), /* @__PURE__ */ K(
|
|
16831
|
+
}), /* @__PURE__ */ K(qt, {
|
|
16811
16832
|
label: "Export",
|
|
16812
16833
|
children: [
|
|
16813
|
-
/* @__PURE__ */ G(
|
|
16834
|
+
/* @__PURE__ */ G(zt, {
|
|
16814
16835
|
size: e,
|
|
16815
16836
|
variant: "subtle",
|
|
16816
16837
|
className: "w-full",
|
|
@@ -16943,7 +16964,7 @@ function Zg({ layer: e, palette: t, onClose: n }) {
|
|
|
16943
16964
|
...Object.fromEntries(l.def.params.map((e) => [e.key, e.default])),
|
|
16944
16965
|
...l.e?.params ?? {}
|
|
16945
16966
|
}, _ = l.e ? i.filter((e) => e.id === l.e.id) : [], v = Math.round((e.effectsFillOpacity ?? 1) * 100);
|
|
16946
|
-
return /* @__PURE__ */ G(
|
|
16967
|
+
return /* @__PURE__ */ G(Vt, {
|
|
16947
16968
|
open: !0,
|
|
16948
16969
|
onClose: n,
|
|
16949
16970
|
closeButton: !1,
|
|
@@ -16958,7 +16979,7 @@ function Zg({ layer: e, palette: t, onClose: n }) {
|
|
|
16958
16979
|
children: [/* @__PURE__ */ G("span", {
|
|
16959
16980
|
className: "font-sans text-[13px] text-emphasis",
|
|
16960
16981
|
children: "Layer Effects"
|
|
16961
|
-
}), /* @__PURE__ */ G(
|
|
16982
|
+
}), /* @__PURE__ */ G(Mt, {
|
|
16962
16983
|
onClick: n,
|
|
16963
16984
|
size: "sm",
|
|
16964
16985
|
className: "!absolute right-3"
|
|
@@ -18045,7 +18066,7 @@ function __(e = []) {
|
|
|
18045
18066
|
//#region src/editor/float/FloatTextToolbar.jsx
|
|
18046
18067
|
var v_ = "inline-flex items-center gap-2 h-[26px] bg-transparent border-0 p-0 uppercase whitespace-nowrap cursor-pointer kol-float-label text-fg-48 hover:text-fg-80 aria-expanded:text-fg-96 focus-visible:outline-none focus-visible:shadow-[var(--kol-float-focus)]";
|
|
18047
18068
|
function y_({ label: e, items: t, ariaLabel: n, search: r }) {
|
|
18048
|
-
return /* @__PURE__ */ G(
|
|
18069
|
+
return /* @__PURE__ */ G(Xt, {
|
|
18049
18070
|
variant: "float",
|
|
18050
18071
|
items: t,
|
|
18051
18072
|
minWidth: r ? 240 : 160,
|
|
@@ -18215,7 +18236,7 @@ function T_({ open: e, onOpenChange: t, menus: n = [], tools: r = [], pages: i =
|
|
|
18215
18236
|
c,
|
|
18216
18237
|
l
|
|
18217
18238
|
]);
|
|
18218
|
-
return /* @__PURE__ */ G(
|
|
18239
|
+
return /* @__PURE__ */ G(Pt, {
|
|
18219
18240
|
open: e,
|
|
18220
18241
|
onClose: () => t(!1),
|
|
18221
18242
|
query: o,
|
|
@@ -18338,7 +18359,7 @@ function M_() {
|
|
|
18338
18359
|
}, []), /* @__PURE__ */ G(Ql, {
|
|
18339
18360
|
open: e,
|
|
18340
18361
|
onClose: () => t(!1),
|
|
18341
|
-
children: /* @__PURE__ */ G(
|
|
18362
|
+
children: /* @__PURE__ */ G(qt, {
|
|
18342
18363
|
label: "Canvas",
|
|
18343
18364
|
divided: !0,
|
|
18344
18365
|
children: /* @__PURE__ */ G(dn, {
|
|
@@ -18586,7 +18607,7 @@ function F_({ registry: e }) {
|
|
|
18586
18607
|
items: e.items
|
|
18587
18608
|
}))
|
|
18588
18609
|
}
|
|
18589
|
-
].filter(Boolean), Fe = /* @__PURE__ */ G(
|
|
18610
|
+
].filter(Boolean), Fe = /* @__PURE__ */ G(Xt, {
|
|
18590
18611
|
variant: "float",
|
|
18591
18612
|
align: "end",
|
|
18592
18613
|
minWidth: 220,
|
|
@@ -18595,7 +18616,7 @@ function F_({ registry: e }) {
|
|
|
18595
18616
|
{ divider: !0 },
|
|
18596
18617
|
..._e.flatMap((e) => e.items)
|
|
18597
18618
|
],
|
|
18598
|
-
trigger: ({ open: e, props: t }) => /* @__PURE__ */ G(
|
|
18619
|
+
trigger: ({ open: e, props: t }) => /* @__PURE__ */ G($t, {
|
|
18599
18620
|
variant: "float",
|
|
18600
18621
|
iconOnly: !0,
|
|
18601
18622
|
open: e,
|
|
@@ -19143,7 +19164,7 @@ function G_({ children: e }) {
|
|
|
19143
19164
|
] });
|
|
19144
19165
|
}
|
|
19145
19166
|
function K_({ children: e, persistDraft: t = !0, draftKey: n }) {
|
|
19146
|
-
return /* @__PURE__ */ G(Pr, { children: /* @__PURE__ */ G(
|
|
19167
|
+
return /* @__PURE__ */ G(Pr, { children: /* @__PURE__ */ G(en, { children: /* @__PURE__ */ G(lt, { children: /* @__PURE__ */ G(Lr, { children: /* @__PURE__ */ G(he, {
|
|
19147
19168
|
persistDraft: t,
|
|
19148
19169
|
draftKey: n,
|
|
19149
19170
|
children: /* @__PURE__ */ G(qs, { children: /* @__PURE__ */ G($s, { children: /* @__PURE__ */ K(Ac, { children: [
|