@janbox/storefront-builder 1.0.3 → 1.0.5
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/README.md +477 -0
- package/dist/editor/lib/index.d.ts +3 -3
- package/dist/editor/lib/sidebar/index.d.ts +1 -1
- package/dist/editor/lib/sidebar/insert-action.d.ts +2 -2
- package/dist/editor/ui/dialog/dialog/helpers.d.ts +1 -1
- package/dist/editor/ui/dialog/dialog-close/dialog-close.d.ts +1 -1
- package/dist/editor.js +326 -313
- package/dist/lib/accordion/README.md +39 -0
- package/dist/lib/accordion-content/README.md +36 -0
- package/dist/lib/accordion-group/README.md +106 -0
- package/dist/lib/accordion-summary/README.md +37 -0
- package/dist/lib/box/README.md +107 -0
- package/dist/lib/button/README.md +94 -0
- package/dist/lib/cell/README.md +119 -0
- package/dist/lib/countdown-timer/README.md +157 -0
- package/dist/lib/flex-item/README.md +111 -0
- package/dist/lib/flexbox/README.md +120 -0
- package/dist/lib/grid/README.md +133 -0
- package/dist/lib/heading/README.md +53 -0
- package/dist/lib/icon/README.md +98 -0
- package/dist/lib/image/README.md +107 -0
- package/dist/lib/link/README.md +111 -0
- package/dist/lib/list-item/README.md +31 -0
- package/dist/lib/marquee/README.md +111 -0
- package/dist/lib/marquee-item/README.md +31 -0
- package/dist/lib/paragraph/README.md +82 -0
- package/dist/lib/root/README.md +33 -0
- package/dist/lib/swiper/README.md +108 -0
- package/dist/lib/swiper-slide/README.md +32 -0
- package/dist/lib/tab/README.md +35 -0
- package/dist/lib/tab-content/README.md +35 -0
- package/dist/lib/tab-list/README.md +35 -0
- package/dist/lib/tab-panel/README.md +35 -0
- package/dist/lib/tabs/README.md +90 -0
- package/dist/lib/text/README.md +90 -0
- package/dist/lib/unknown/README.md +48 -0
- package/dist/lib/unordered-list/README.md +82 -0
- package/dist/lib/video/README.md +91 -0
- package/lib/accordion/README.md +39 -0
- package/lib/accordion-content/README.md +36 -0
- package/lib/accordion-group/README.md +106 -0
- package/lib/accordion-summary/README.md +37 -0
- package/lib/box/README.md +107 -0
- package/lib/button/README.md +94 -0
- package/lib/cell/README.md +119 -0
- package/lib/countdown-timer/README.md +157 -0
- package/lib/flex-item/README.md +111 -0
- package/lib/flexbox/README.md +120 -0
- package/lib/grid/README.md +133 -0
- package/lib/heading/README.md +53 -0
- package/lib/icon/README.md +98 -0
- package/lib/image/README.md +107 -0
- package/lib/link/README.md +111 -0
- package/lib/list-item/README.md +31 -0
- package/lib/marquee/README.md +111 -0
- package/lib/marquee-item/README.md +31 -0
- package/lib/paragraph/README.md +82 -0
- package/lib/root/README.md +33 -0
- package/lib/swiper/README.md +108 -0
- package/lib/swiper-slide/README.md +32 -0
- package/lib/tab/README.md +35 -0
- package/lib/tab-content/README.md +35 -0
- package/lib/tab-list/README.md +35 -0
- package/lib/tab-panel/README.md +35 -0
- package/lib/tabs/README.md +90 -0
- package/lib/text/README.md +90 -0
- package/lib/unknown/README.md +48 -0
- package/lib/unordered-list/README.md +82 -0
- package/lib/video/README.md +91 -0
- package/package.json +5 -9
package/dist/editor.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as n, Fragment as Ne, jsxs as
|
|
2
|
-
import { u as _e, a as ae, b as
|
|
3
|
-
import { t as
|
|
1
|
+
import { jsx as n, Fragment as Ne, jsxs as g } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { u as _e, a as ae, b as te, D as ze, c as qe, W as j, d as E, e as Ge, f as Ue, g as Le, h as Ee, i as Ze, j as Qe, k as we, l as Ye, m as ue, n as oe, A as Se, o as Ke, C as Me, p as Re, q as Xe, r as Je, T as et, s as fe, R as tt } from "./index-DrJkOkbq.js";
|
|
3
|
+
import { t as qr } from "./index-DrJkOkbq.js";
|
|
4
4
|
import rt from "mitt";
|
|
5
|
-
import { c as I, N as pe, B as ge, g as nt, a as st, u as W, W as ot, b as
|
|
6
|
-
import { useRef as je, useState as
|
|
5
|
+
import { c as I, N as pe, B as ge, g as nt, a as st, u as W, W as ot, b as $e, i as it, P as ct } from "./countdown-timer.node-CAsCNVin.js";
|
|
6
|
+
import { useRef as je, useState as _, useEffect as z, createElement as Ae, Fragment as J, Suspense as at } from "react";
|
|
7
7
|
import { useToggle as De } from "usehooks-ts";
|
|
8
8
|
import { CacheProvider as lt, Global as dt, createElement as ht } from "@emotion/react";
|
|
9
9
|
import { useFloating as wt, autoUpdate as ut, flip as ft, size as pt, useHover as gt, safePolygon as mt, useFocus as kt, useDismiss as vt, useRole as bt, useInteractions as Ct, FloatingPortal as Ie } from "@floating-ui/react";
|
|
10
10
|
import { ThemeProvider as xt, FLOATING_Z_INDEX as yt, breakpoint as Nt } from "@janbox/storefront-ui/theme";
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
class
|
|
11
|
+
import { useNode as Lt, ROOT_NODE as B, serializeNode as Et } from "@craftjs/core";
|
|
12
|
+
import { throttle as St, isFunction as me, isNumber as ke } from "lodash-es";
|
|
13
|
+
import Mt, { useFrame as Rt } from "react-frame-component";
|
|
14
|
+
import { Layers as $t, useLayer as jt } from "@craftjs/layers";
|
|
15
|
+
class At {
|
|
16
16
|
constructor() {
|
|
17
17
|
this.componentControls = /* @__PURE__ */ new Set();
|
|
18
18
|
}
|
|
@@ -45,11 +45,11 @@ class jt {
|
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
const
|
|
49
|
-
function
|
|
50
|
-
return _e(
|
|
48
|
+
const Dt = () => new At();
|
|
49
|
+
function It() {
|
|
50
|
+
return _e(Dt);
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function Tt(e) {
|
|
53
53
|
if (e.sheet)
|
|
54
54
|
return e.sheet;
|
|
55
55
|
for (var t = 0; t < document.styleSheets.length; t++)
|
|
@@ -60,7 +60,7 @@ function Pt(e) {
|
|
|
60
60
|
var t = document.createElement("style");
|
|
61
61
|
return t.setAttribute("data-emotion", e.key), e.nonce !== void 0 && t.setAttribute("nonce", e.nonce), t.appendChild(document.createTextNode("")), t.setAttribute("data-s", ""), t;
|
|
62
62
|
}
|
|
63
|
-
var
|
|
63
|
+
var Wt = /* @__PURE__ */ (function() {
|
|
64
64
|
function e(s) {
|
|
65
65
|
var r = this;
|
|
66
66
|
this._insertTag = function(i) {
|
|
@@ -75,7 +75,7 @@ var Tt = /* @__PURE__ */ (function() {
|
|
|
75
75
|
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Pt(this));
|
|
76
76
|
var i = this.tags[this.tags.length - 1];
|
|
77
77
|
if (this.isSpeedy) {
|
|
78
|
-
var o =
|
|
78
|
+
var o = Tt(i);
|
|
79
79
|
try {
|
|
80
80
|
o.insertRule(r, o.cssRules.length);
|
|
81
81
|
} catch {
|
|
@@ -89,14 +89,14 @@ var Tt = /* @__PURE__ */ (function() {
|
|
|
89
89
|
return (i = r.parentNode) == null ? void 0 : i.removeChild(r);
|
|
90
90
|
}), this.tags = [], this.ctr = 0;
|
|
91
91
|
}, e;
|
|
92
|
-
})(), S = "-ms-",
|
|
93
|
-
function
|
|
92
|
+
})(), S = "-ms-", ee = "-moz-", u = "-webkit-", Te = "comm", le = "rule", de = "decl", Bt = "@import", Pe = "@keyframes", Ot = "@layer", Ft = Math.abs, re = String.fromCharCode, Ht = Object.assign;
|
|
93
|
+
function Vt(e, t) {
|
|
94
94
|
return L(e, 0) ^ 45 ? (((t << 2 ^ L(e, 0)) << 2 ^ L(e, 1)) << 2 ^ L(e, 2)) << 2 ^ L(e, 3) : 0;
|
|
95
95
|
}
|
|
96
96
|
function We(e) {
|
|
97
97
|
return e.trim();
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function _t(e, t) {
|
|
100
100
|
return (e = t.exec(e)) ? e[0] : e;
|
|
101
101
|
}
|
|
102
102
|
function f(e, t, s) {
|
|
@@ -108,7 +108,7 @@ function ie(e, t) {
|
|
|
108
108
|
function L(e, t) {
|
|
109
109
|
return e.charCodeAt(t) | 0;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function q(e, t, s) {
|
|
112
112
|
return e.slice(t, s);
|
|
113
113
|
}
|
|
114
114
|
function D(e) {
|
|
@@ -117,38 +117,38 @@ function D(e) {
|
|
|
117
117
|
function he(e) {
|
|
118
118
|
return e.length;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Q(e, t) {
|
|
121
121
|
return t.push(e), e;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function zt(e, t) {
|
|
124
124
|
return e.map(t).join("");
|
|
125
125
|
}
|
|
126
|
-
var
|
|
127
|
-
function
|
|
128
|
-
return { value: e, root: t, parent: s, type: r, props: i, children: o, line:
|
|
126
|
+
var ne = 1, F = 1, Be = 0, R = 0, y = 0, H = "";
|
|
127
|
+
function se(e, t, s, r, i, o, h) {
|
|
128
|
+
return { value: e, root: t, parent: s, type: r, props: i, children: o, line: ne, column: F, length: h, return: "" };
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
return
|
|
130
|
+
function V(e, t) {
|
|
131
|
+
return Ht(se("", null, null, "", null, null, 0), e, { length: -e.length }, t);
|
|
132
132
|
}
|
|
133
|
-
function
|
|
134
|
-
return
|
|
133
|
+
function qt() {
|
|
134
|
+
return y;
|
|
135
135
|
}
|
|
136
136
|
function Gt() {
|
|
137
|
-
return
|
|
137
|
+
return y = R > 0 ? L(H, --R) : 0, F--, y === 10 && (F = 1, ne--), y;
|
|
138
138
|
}
|
|
139
139
|
function $() {
|
|
140
|
-
return
|
|
140
|
+
return y = R < Be ? L(H, R++) : 0, F++, y === 10 && (F = 1, ne++), y;
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
return L(
|
|
142
|
+
function T() {
|
|
143
|
+
return L(H, R);
|
|
144
144
|
}
|
|
145
|
-
function
|
|
146
|
-
return
|
|
145
|
+
function Y() {
|
|
146
|
+
return R;
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
return
|
|
148
|
+
function U(e, t) {
|
|
149
|
+
return q(H, e, t);
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function G(e) {
|
|
152
152
|
switch (e) {
|
|
153
153
|
// \0 \t \n \r \s whitespace token
|
|
154
154
|
case 0:
|
|
@@ -187,34 +187,34 @@ function z(e) {
|
|
|
187
187
|
return 0;
|
|
188
188
|
}
|
|
189
189
|
function Oe(e) {
|
|
190
|
-
return
|
|
190
|
+
return ne = F = 1, Be = D(H = e), R = 0, [];
|
|
191
191
|
}
|
|
192
192
|
function Fe(e) {
|
|
193
|
-
return
|
|
193
|
+
return H = "", e;
|
|
194
194
|
}
|
|
195
|
-
function
|
|
196
|
-
return We(
|
|
195
|
+
function K(e) {
|
|
196
|
+
return We(U(R - 1, ce(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
197
197
|
}
|
|
198
|
-
function
|
|
199
|
-
for (; (
|
|
198
|
+
function Ut(e) {
|
|
199
|
+
for (; (y = T()) && y < 33; )
|
|
200
200
|
$();
|
|
201
|
-
return
|
|
201
|
+
return G(e) > 2 || G(y) > 3 ? "" : " ";
|
|
202
202
|
}
|
|
203
|
-
function
|
|
204
|
-
for (; --t && $() && !(
|
|
203
|
+
function Zt(e, t) {
|
|
204
|
+
for (; --t && $() && !(y < 48 || y > 102 || y > 57 && y < 65 || y > 70 && y < 97); )
|
|
205
205
|
;
|
|
206
|
-
return
|
|
206
|
+
return U(e, Y() + (t < 6 && T() == 32 && $() == 32));
|
|
207
207
|
}
|
|
208
208
|
function ce(e) {
|
|
209
209
|
for (; $(); )
|
|
210
|
-
switch (
|
|
210
|
+
switch (y) {
|
|
211
211
|
// ] ) " '
|
|
212
212
|
case e:
|
|
213
|
-
return
|
|
213
|
+
return R;
|
|
214
214
|
// " '
|
|
215
215
|
case 34:
|
|
216
216
|
case 39:
|
|
217
|
-
e !== 34 && e !== 39 && ce(
|
|
217
|
+
e !== 34 && e !== 39 && ce(y);
|
|
218
218
|
break;
|
|
219
219
|
// (
|
|
220
220
|
case 40:
|
|
@@ -225,54 +225,54 @@ function ce(e) {
|
|
|
225
225
|
$();
|
|
226
226
|
break;
|
|
227
227
|
}
|
|
228
|
-
return
|
|
228
|
+
return R;
|
|
229
229
|
}
|
|
230
|
-
function
|
|
231
|
-
for (; $() && e +
|
|
232
|
-
if (e +
|
|
230
|
+
function Qt(e, t) {
|
|
231
|
+
for (; $() && e + y !== 57; )
|
|
232
|
+
if (e + y === 84 && T() === 47)
|
|
233
233
|
break;
|
|
234
|
-
return "/*" +
|
|
234
|
+
return "/*" + U(t, R - 1) + "*" + re(e === 47 ? e : $());
|
|
235
235
|
}
|
|
236
|
-
function
|
|
237
|
-
for (; !
|
|
236
|
+
function Yt(e) {
|
|
237
|
+
for (; !G(T()); )
|
|
238
238
|
$();
|
|
239
|
-
return
|
|
239
|
+
return U(e, R);
|
|
240
240
|
}
|
|
241
|
-
function
|
|
242
|
-
return Fe(
|
|
241
|
+
function Kt(e) {
|
|
242
|
+
return Fe(X("", null, null, null, [""], e = Oe(e), 0, [0], e));
|
|
243
243
|
}
|
|
244
|
-
function
|
|
245
|
-
for (var
|
|
246
|
-
switch (v =
|
|
244
|
+
function X(e, t, s, r, i, o, h, c, d) {
|
|
245
|
+
for (var k = 0, l = 0, a = h, m = 0, b = 0, v = 0, w = 1, N = 1, p = 1, x = 0, M = "", Z = i, P = o, A = r, C = M; N; )
|
|
246
|
+
switch (v = x, x = $()) {
|
|
247
247
|
// (
|
|
248
248
|
case 40:
|
|
249
|
-
if (v != 108 && L(C,
|
|
250
|
-
ie(C += f(
|
|
249
|
+
if (v != 108 && L(C, a - 1) == 58) {
|
|
250
|
+
ie(C += f(K(x), "&", "&\f"), "&\f") != -1 && (p = -1);
|
|
251
251
|
break;
|
|
252
252
|
}
|
|
253
253
|
// " ' [
|
|
254
254
|
case 34:
|
|
255
255
|
case 39:
|
|
256
256
|
case 91:
|
|
257
|
-
C +=
|
|
257
|
+
C += K(x);
|
|
258
258
|
break;
|
|
259
259
|
// \t \n \r \s
|
|
260
260
|
case 9:
|
|
261
261
|
case 10:
|
|
262
262
|
case 13:
|
|
263
263
|
case 32:
|
|
264
|
-
C +=
|
|
264
|
+
C += Ut(v);
|
|
265
265
|
break;
|
|
266
266
|
// \
|
|
267
267
|
case 92:
|
|
268
|
-
C +=
|
|
268
|
+
C += Zt(Y() - 1, 7);
|
|
269
269
|
continue;
|
|
270
270
|
// /
|
|
271
271
|
case 47:
|
|
272
|
-
switch (
|
|
272
|
+
switch (T()) {
|
|
273
273
|
case 42:
|
|
274
274
|
case 47:
|
|
275
|
-
|
|
275
|
+
Q(Xt(Qt($(), Y()), t, s), d);
|
|
276
276
|
break;
|
|
277
277
|
default:
|
|
278
278
|
C += "/";
|
|
@@ -280,28 +280,28 @@ function Y(e, t, s, r, i, o, d, c, a) {
|
|
|
280
280
|
break;
|
|
281
281
|
// {
|
|
282
282
|
case 123 * w:
|
|
283
|
-
c[
|
|
283
|
+
c[k++] = D(C) * p;
|
|
284
284
|
// } ; \0
|
|
285
285
|
case 125 * w:
|
|
286
286
|
case 59:
|
|
287
287
|
case 0:
|
|
288
|
-
switch (
|
|
288
|
+
switch (x) {
|
|
289
289
|
// \0 }
|
|
290
290
|
case 0:
|
|
291
291
|
case 125:
|
|
292
292
|
N = 0;
|
|
293
293
|
// ;
|
|
294
|
-
case 59 +
|
|
295
|
-
|
|
294
|
+
case 59 + l:
|
|
295
|
+
p == -1 && (C = f(C, /\f/g, "")), b > 0 && D(C) - a && Q(b > 32 ? be(C + ";", r, s, a - 1) : be(f(C, " ", "") + ";", r, s, a - 2), d);
|
|
296
296
|
break;
|
|
297
297
|
// @ ;
|
|
298
298
|
case 59:
|
|
299
299
|
C += ";";
|
|
300
300
|
// { rule/at-rule
|
|
301
301
|
default:
|
|
302
|
-
if (
|
|
303
|
-
if (
|
|
304
|
-
|
|
302
|
+
if (Q(A = ve(C, t, s, k, l, i, c, M, Z = [], P = [], a), o), x === 123)
|
|
303
|
+
if (l === 0)
|
|
304
|
+
X(C, t, A, A, Z, o, a, c, P);
|
|
305
305
|
else
|
|
306
306
|
switch (m === 99 && L(C, 3) === 110 ? 100 : m) {
|
|
307
307
|
// d l m s
|
|
@@ -309,36 +309,36 @@ function Y(e, t, s, r, i, o, d, c, a) {
|
|
|
309
309
|
case 108:
|
|
310
310
|
case 109:
|
|
311
311
|
case 115:
|
|
312
|
-
|
|
312
|
+
X(e, A, A, r && Q(ve(e, A, A, 0, 0, i, c, M, i, Z = [], a), P), i, P, a, c, r ? Z : P);
|
|
313
313
|
break;
|
|
314
314
|
default:
|
|
315
|
-
|
|
315
|
+
X(C, A, A, A, [""], P, 0, c, P);
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
|
-
|
|
318
|
+
k = l = b = 0, w = p = 1, M = C = "", a = h;
|
|
319
319
|
break;
|
|
320
320
|
// :
|
|
321
321
|
case 58:
|
|
322
|
-
|
|
322
|
+
a = 1 + D(C), b = v;
|
|
323
323
|
default:
|
|
324
324
|
if (w < 1) {
|
|
325
|
-
if (
|
|
325
|
+
if (x == 123)
|
|
326
326
|
--w;
|
|
327
|
-
else if (
|
|
327
|
+
else if (x == 125 && w++ == 0 && Gt() == 125)
|
|
328
328
|
continue;
|
|
329
329
|
}
|
|
330
|
-
switch (C +=
|
|
330
|
+
switch (C += re(x), x * w) {
|
|
331
331
|
// &
|
|
332
332
|
case 38:
|
|
333
|
-
|
|
333
|
+
p = l > 0 ? 1 : (C += "\f", -1);
|
|
334
334
|
break;
|
|
335
335
|
// ,
|
|
336
336
|
case 44:
|
|
337
|
-
c[
|
|
337
|
+
c[k++] = (D(C) - 1) * p, p = 1;
|
|
338
338
|
break;
|
|
339
339
|
// @
|
|
340
340
|
case 64:
|
|
341
|
-
|
|
341
|
+
T() === 45 && (C += K($())), m = T(), l = a = D(M = C += Yt(Y())), x++;
|
|
342
342
|
break;
|
|
343
343
|
// -
|
|
344
344
|
case 45:
|
|
@@ -347,80 +347,80 @@ function Y(e, t, s, r, i, o, d, c, a) {
|
|
|
347
347
|
}
|
|
348
348
|
return o;
|
|
349
349
|
}
|
|
350
|
-
function ve(e, t, s, r, i, o,
|
|
351
|
-
for (var
|
|
352
|
-
for (var
|
|
353
|
-
(
|
|
354
|
-
return
|
|
350
|
+
function ve(e, t, s, r, i, o, h, c, d, k, l) {
|
|
351
|
+
for (var a = i - 1, m = i === 0 ? o : [""], b = he(m), v = 0, w = 0, N = 0; v < r; ++v)
|
|
352
|
+
for (var p = 0, x = q(e, a + 1, a = Ft(w = h[v])), M = e; p < b; ++p)
|
|
353
|
+
(M = We(w > 0 ? m[p] + " " + x : f(x, /&\f/g, m[p]))) && (d[N++] = M);
|
|
354
|
+
return se(e, t, s, i === 0 ? le : c, d, k, l);
|
|
355
355
|
}
|
|
356
|
-
function
|
|
357
|
-
return
|
|
356
|
+
function Xt(e, t, s) {
|
|
357
|
+
return se(e, t, s, Te, re(qt()), q(e, 2, -2), 0);
|
|
358
358
|
}
|
|
359
359
|
function be(e, t, s, r) {
|
|
360
|
-
return
|
|
360
|
+
return se(e, t, s, de, q(e, 0, r), q(e, r + 1, -1), r);
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function O(e, t) {
|
|
363
363
|
for (var s = "", r = he(e), i = 0; i < r; i++)
|
|
364
364
|
s += t(e[i], i, e, t) || "";
|
|
365
365
|
return s;
|
|
366
366
|
}
|
|
367
|
-
function
|
|
367
|
+
function Jt(e, t, s, r) {
|
|
368
368
|
switch (e.type) {
|
|
369
|
-
case
|
|
369
|
+
case Ot:
|
|
370
370
|
if (e.children.length) break;
|
|
371
|
-
case
|
|
371
|
+
case Bt:
|
|
372
372
|
case de:
|
|
373
373
|
return e.return = e.return || e.value;
|
|
374
|
-
case Pe:
|
|
375
|
-
return "";
|
|
376
374
|
case Te:
|
|
377
|
-
return
|
|
375
|
+
return "";
|
|
376
|
+
case Pe:
|
|
377
|
+
return e.return = e.value + "{" + O(e.children, r) + "}";
|
|
378
378
|
case le:
|
|
379
379
|
e.value = e.props.join(",");
|
|
380
380
|
}
|
|
381
|
-
return D(s =
|
|
381
|
+
return D(s = O(e.children, r)) ? e.return = e.value + "{" + s + "}" : "";
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function er(e) {
|
|
384
384
|
var t = he(e);
|
|
385
385
|
return function(s, r, i, o) {
|
|
386
|
-
for (var
|
|
387
|
-
|
|
388
|
-
return
|
|
386
|
+
for (var h = "", c = 0; c < t; c++)
|
|
387
|
+
h += e[c](s, r, i, o) || "";
|
|
388
|
+
return h;
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function tr(e) {
|
|
392
392
|
return function(t) {
|
|
393
393
|
t.root || (t = t.return) && e(t);
|
|
394
394
|
};
|
|
395
395
|
}
|
|
396
|
-
var
|
|
397
|
-
for (var i = 0, o = 0; i = o, o =
|
|
396
|
+
var rr = function(t, s, r) {
|
|
397
|
+
for (var i = 0, o = 0; i = o, o = T(), i === 38 && o === 12 && (s[r] = 1), !G(o); )
|
|
398
398
|
$();
|
|
399
|
-
return
|
|
400
|
-
},
|
|
399
|
+
return U(t, R);
|
|
400
|
+
}, nr = function(t, s) {
|
|
401
401
|
var r = -1, i = 44;
|
|
402
402
|
do
|
|
403
|
-
switch (
|
|
403
|
+
switch (G(i)) {
|
|
404
404
|
case 0:
|
|
405
|
-
i === 38 &&
|
|
405
|
+
i === 38 && T() === 12 && (s[r] = 1), t[r] += rr(R - 1, s, r);
|
|
406
406
|
break;
|
|
407
407
|
case 2:
|
|
408
|
-
t[r] +=
|
|
408
|
+
t[r] += K(i);
|
|
409
409
|
break;
|
|
410
410
|
case 4:
|
|
411
411
|
if (i === 44) {
|
|
412
|
-
t[++r] =
|
|
412
|
+
t[++r] = T() === 58 ? "&\f" : "", s[r] = t[r].length;
|
|
413
413
|
break;
|
|
414
414
|
}
|
|
415
415
|
// fallthrough
|
|
416
416
|
default:
|
|
417
|
-
t[r] +=
|
|
417
|
+
t[r] += re(i);
|
|
418
418
|
}
|
|
419
419
|
while (i = $());
|
|
420
420
|
return t;
|
|
421
|
-
},
|
|
422
|
-
return Fe(
|
|
423
|
-
}, Ce = /* @__PURE__ */ new WeakMap(),
|
|
421
|
+
}, sr = function(t, s) {
|
|
422
|
+
return Fe(nr(Oe(t), s));
|
|
423
|
+
}, Ce = /* @__PURE__ */ new WeakMap(), or = function(t) {
|
|
424
424
|
if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
|
|
425
425
|
// negative .length indicates that this rule has been already prefixed
|
|
426
426
|
t.length < 1)) {
|
|
@@ -428,12 +428,12 @@ var tr = function(t, s, r) {
|
|
|
428
428
|
if (r = r.parent, !r) return;
|
|
429
429
|
if (!(t.props.length === 1 && s.charCodeAt(0) !== 58 && !Ce.get(r)) && !i) {
|
|
430
430
|
Ce.set(t, !0);
|
|
431
|
-
for (var o = [],
|
|
432
|
-
for (var
|
|
433
|
-
t.props[
|
|
431
|
+
for (var o = [], h = sr(s, o), c = r.props, d = 0, k = 0; d < h.length; d++)
|
|
432
|
+
for (var l = 0; l < c.length; l++, k++)
|
|
433
|
+
t.props[k] = o[d] ? h[d].replace(/&\f/g, c[l]) : c[l] + " " + h[d];
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
},
|
|
436
|
+
}, ir = function(t) {
|
|
437
437
|
if (t.type === "decl") {
|
|
438
438
|
var s = t.value;
|
|
439
439
|
// charcode for l
|
|
@@ -442,7 +442,7 @@ var tr = function(t, s, r) {
|
|
|
442
442
|
}
|
|
443
443
|
};
|
|
444
444
|
function He(e, t) {
|
|
445
|
-
switch (
|
|
445
|
+
switch (Vt(e, t)) {
|
|
446
446
|
// color-adjust
|
|
447
447
|
case 5103:
|
|
448
448
|
return u + "print-" + e + e;
|
|
@@ -482,7 +482,7 @@ function He(e, t) {
|
|
|
482
482
|
case 4810:
|
|
483
483
|
case 6968:
|
|
484
484
|
case 2756:
|
|
485
|
-
return u + e +
|
|
485
|
+
return u + e + ee + e + S + e + e;
|
|
486
486
|
// flex, flex-direction
|
|
487
487
|
case 6828:
|
|
488
488
|
case 4268:
|
|
@@ -546,7 +546,7 @@ function He(e, t) {
|
|
|
546
546
|
if (L(e, t + 4) !== 45) break;
|
|
547
547
|
// (f)ill-available, (f)it-content
|
|
548
548
|
case 102:
|
|
549
|
-
return f(e, /(.+:)(.+)-([^]+)/, "$1" + u + "$2-$3$1" +
|
|
549
|
+
return f(e, /(.+:)(.+)-([^]+)/, "$1" + u + "$2-$3$1" + ee + (L(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
|
|
550
550
|
// (s)tretch
|
|
551
551
|
case 115:
|
|
552
552
|
return ~ie(e, "stretch") ? He(f(e, "stretch", "fill-available"), t) + e : e;
|
|
@@ -583,38 +583,38 @@ function He(e, t) {
|
|
|
583
583
|
}
|
|
584
584
|
return e;
|
|
585
585
|
}
|
|
586
|
-
var
|
|
586
|
+
var cr = function(t, s, r, i) {
|
|
587
587
|
if (t.length > -1 && !t.return) switch (t.type) {
|
|
588
588
|
case de:
|
|
589
589
|
t.return = He(t.value, t.length);
|
|
590
590
|
break;
|
|
591
|
-
case
|
|
592
|
-
return
|
|
591
|
+
case Pe:
|
|
592
|
+
return O([V(t, {
|
|
593
593
|
value: f(t.value, "@", "@" + u)
|
|
594
594
|
})], i);
|
|
595
595
|
case le:
|
|
596
|
-
if (t.length) return
|
|
597
|
-
switch (
|
|
596
|
+
if (t.length) return zt(t.props, function(o) {
|
|
597
|
+
switch (_t(o, /(::plac\w+|:read-\w+)/)) {
|
|
598
598
|
// :read-(only|write)
|
|
599
599
|
case ":read-only":
|
|
600
600
|
case ":read-write":
|
|
601
|
-
return
|
|
602
|
-
props: [f(o, /:(read-\w+)/, ":" +
|
|
601
|
+
return O([V(t, {
|
|
602
|
+
props: [f(o, /:(read-\w+)/, ":" + ee + "$1")]
|
|
603
603
|
})], i);
|
|
604
604
|
// :placeholder
|
|
605
605
|
case "::placeholder":
|
|
606
|
-
return
|
|
606
|
+
return O([V(t, {
|
|
607
607
|
props: [f(o, /:(plac\w+)/, ":" + u + "input-$1")]
|
|
608
|
-
}),
|
|
609
|
-
props: [f(o, /:(plac\w+)/, ":" +
|
|
610
|
-
}),
|
|
608
|
+
}), V(t, {
|
|
609
|
+
props: [f(o, /:(plac\w+)/, ":" + ee + "$1")]
|
|
610
|
+
}), V(t, {
|
|
611
611
|
props: [f(o, /:(plac\w+)/, S + "input-$1")]
|
|
612
612
|
})], i);
|
|
613
613
|
}
|
|
614
614
|
return "";
|
|
615
615
|
});
|
|
616
616
|
}
|
|
617
|
-
},
|
|
617
|
+
}, ar = [cr], lr = function(t) {
|
|
618
618
|
var s = t.key;
|
|
619
619
|
if (s === "css") {
|
|
620
620
|
var r = document.querySelectorAll("style[data-emotion]:not([data-s])");
|
|
@@ -623,33 +623,33 @@ var ir = function(t, s, r, i) {
|
|
|
623
623
|
N.indexOf(" ") !== -1 && (document.head.appendChild(w), w.setAttribute("data-s", ""));
|
|
624
624
|
});
|
|
625
625
|
}
|
|
626
|
-
var i = t.stylisPlugins ||
|
|
627
|
-
|
|
626
|
+
var i = t.stylisPlugins || ar, o = {}, h, c = [];
|
|
627
|
+
h = t.container || document.head, Array.prototype.forEach.call(
|
|
628
628
|
// this means we will ignore elements which don't have a space in them which
|
|
629
629
|
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
630
630
|
document.querySelectorAll('style[data-emotion^="' + s + ' "]'),
|
|
631
631
|
function(w) {
|
|
632
|
-
for (var N = w.getAttribute("data-emotion").split(" "),
|
|
633
|
-
o[N[
|
|
632
|
+
for (var N = w.getAttribute("data-emotion").split(" "), p = 1; p < N.length; p++)
|
|
633
|
+
o[N[p]] = !0;
|
|
634
634
|
c.push(w);
|
|
635
635
|
}
|
|
636
636
|
);
|
|
637
|
-
var
|
|
637
|
+
var d, k = [or, ir];
|
|
638
638
|
{
|
|
639
|
-
var
|
|
640
|
-
|
|
641
|
-
})], m =
|
|
642
|
-
return
|
|
639
|
+
var l, a = [Jt, tr(function(w) {
|
|
640
|
+
l.insert(w);
|
|
641
|
+
})], m = er(k.concat(i, a)), b = function(N) {
|
|
642
|
+
return O(Kt(N), m);
|
|
643
643
|
};
|
|
644
|
-
|
|
645
|
-
|
|
644
|
+
d = function(N, p, x, M) {
|
|
645
|
+
l = x, b(N ? N + "{" + p.styles + "}" : p.styles), M && (v.inserted[p.name] = !0);
|
|
646
646
|
};
|
|
647
647
|
}
|
|
648
648
|
var v = {
|
|
649
649
|
key: s,
|
|
650
|
-
sheet: new
|
|
650
|
+
sheet: new Wt({
|
|
651
651
|
key: s,
|
|
652
|
-
container:
|
|
652
|
+
container: h,
|
|
653
653
|
nonce: t.nonce,
|
|
654
654
|
speedy: t.speedy,
|
|
655
655
|
prepend: t.prepend,
|
|
@@ -658,66 +658,66 @@ var ir = function(t, s, r, i) {
|
|
|
658
658
|
nonce: t.nonce,
|
|
659
659
|
inserted: o,
|
|
660
660
|
registered: {},
|
|
661
|
-
insert:
|
|
661
|
+
insert: d
|
|
662
662
|
};
|
|
663
663
|
return v.sheet.hydrate(c), v;
|
|
664
664
|
};
|
|
665
665
|
const Ve = ({ children: e, viewport: t, containerProps: s }) => {
|
|
666
|
-
const r = je(null), [{ theme: i }] = ae(), [o,
|
|
666
|
+
const r = je(null), [{ theme: i }] = ae(), [o, h] = _({
|
|
667
667
|
width: 0,
|
|
668
668
|
height: 0
|
|
669
669
|
});
|
|
670
|
-
|
|
671
|
-
const v =
|
|
672
|
-
const
|
|
673
|
-
if (!
|
|
674
|
-
const { width:
|
|
675
|
-
|
|
676
|
-
width:
|
|
677
|
-
height:
|
|
670
|
+
z(() => {
|
|
671
|
+
const v = St((N) => {
|
|
672
|
+
const p = N.at(0)?.target;
|
|
673
|
+
if (!p) return;
|
|
674
|
+
const { width: x, height: M } = p.getBoundingClientRect();
|
|
675
|
+
h(() => ({
|
|
676
|
+
width: x,
|
|
677
|
+
height: M
|
|
678
678
|
}));
|
|
679
679
|
}, 200), w = new ResizeObserver(v);
|
|
680
680
|
return r.current && w.observe(r.current), () => w.disconnect();
|
|
681
681
|
}, []);
|
|
682
|
-
const c = me(t?.width) ? t.width(o.width) : t?.width,
|
|
682
|
+
const c = me(t?.width) ? t.width(o.width) : t?.width, d = me(t?.height) ? t.height(o.height) : t?.height, k = ke(c) ? o.width / c : 1, l = ke(d) ? o.height / d : 1, a = Math.min(k, l, 1), m = (d ?? o.height / a) || 0, b = (c ?? o.width / a) || 0;
|
|
683
683
|
return /* @__PURE__ */ n("div", { ...s, className: I("tw:w-full tw:h-full tw:p-2 tw:bg-ic-ink-1s", s?.className), children: /* @__PURE__ */ n("div", { className: I("tw:w-full tw:h-full tw:overflow-hidden tw:relative"), ref: r, children: /* @__PURE__ */ n(
|
|
684
684
|
"div",
|
|
685
685
|
{
|
|
686
686
|
style: {
|
|
687
|
-
transform: `scale(${
|
|
688
|
-
width:
|
|
687
|
+
transform: `scale(${a})`,
|
|
688
|
+
width: b,
|
|
689
689
|
height: m,
|
|
690
|
-
marginLeft: (o.width -
|
|
690
|
+
marginLeft: (o.width - b) / 2,
|
|
691
691
|
marginTop: (o.height - m) / 2
|
|
692
692
|
},
|
|
693
693
|
className: "tw:absolute",
|
|
694
694
|
children: /* @__PURE__ */ n(
|
|
695
|
-
|
|
695
|
+
Mt,
|
|
696
696
|
{
|
|
697
697
|
sandbox: "allow-same-origin allow-scripts allow-popups allow-presentation",
|
|
698
698
|
allow: "autoplay; encrypted-media",
|
|
699
699
|
width: c ?? "100%",
|
|
700
|
-
height:
|
|
701
|
-
children: /* @__PURE__ */ n(
|
|
700
|
+
height: d ?? "100%",
|
|
701
|
+
children: /* @__PURE__ */ n(dr, { theme: i, children: e })
|
|
702
702
|
}
|
|
703
703
|
)
|
|
704
704
|
}
|
|
705
705
|
) }) });
|
|
706
|
-
},
|
|
707
|
-
const { document: s, window: r } =
|
|
708
|
-
|
|
709
|
-
const
|
|
710
|
-
return r && (window.customElements.define = function(
|
|
711
|
-
window.customElements.get(
|
|
706
|
+
}, dr = ({ children: e, theme: t }) => {
|
|
707
|
+
const { document: s, window: r } = Rt(), [i, o] = _(!1), h = je(window.customElements.define.bind(window.customElements));
|
|
708
|
+
z(() => {
|
|
709
|
+
const d = h.current;
|
|
710
|
+
return r && (window.customElements.define = function(k, l, a) {
|
|
711
|
+
window.customElements.get(k) || r.customElements.define(k, l, a), d(k, l, a);
|
|
712
712
|
}), s?.head.replaceWith(document.head.cloneNode(!0)), o(!0), () => {
|
|
713
|
-
window.customElements.define =
|
|
713
|
+
window.customElements.define = d;
|
|
714
714
|
};
|
|
715
715
|
}, [s, r]);
|
|
716
|
-
const c =
|
|
716
|
+
const c = lr({
|
|
717
717
|
key: "css",
|
|
718
718
|
container: s?.head
|
|
719
719
|
});
|
|
720
|
-
return i ? /* @__PURE__ */ n(Ne, { children: /* @__PURE__ */
|
|
720
|
+
return i ? /* @__PURE__ */ n(Ne, { children: /* @__PURE__ */ g(lt, { value: c, children: [
|
|
721
721
|
/* @__PURE__ */ n(
|
|
722
722
|
dt,
|
|
723
723
|
{
|
|
@@ -742,19 +742,19 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
742
742
|
),
|
|
743
743
|
/* @__PURE__ */ n(xt, { theme: t, children: e })
|
|
744
744
|
] }) }) : null;
|
|
745
|
-
},
|
|
746
|
-
const { id: t, renderer: s } =
|
|
745
|
+
}, hr = ({ render: e }) => {
|
|
746
|
+
const { id: t, renderer: s } = Lt((o) => ({
|
|
747
747
|
resolvedId: st(o),
|
|
748
748
|
renderer: nt(o).renderer
|
|
749
749
|
})), {
|
|
750
750
|
queryParams: { mode: r }
|
|
751
|
-
} =
|
|
752
|
-
isActive:
|
|
751
|
+
} = te(), { isActive: i } = W((o, h) => ({
|
|
752
|
+
isActive: h.getEvent("selected").contains(t) && t !== B
|
|
753
753
|
}));
|
|
754
|
-
return s ? Ae(s, { render: e }) : /* @__PURE__ */
|
|
755
|
-
i && r === "full" && /* @__PURE__ */
|
|
754
|
+
return s ? Ae(s, { render: e }) : /* @__PURE__ */ g(J, { children: [
|
|
755
|
+
i && r === "full" && /* @__PURE__ */ g(J, { children: [
|
|
756
756
|
/* @__PURE__ */ n(ze, {}),
|
|
757
|
-
/* @__PURE__ */ n(
|
|
757
|
+
/* @__PURE__ */ n(qe, {})
|
|
758
758
|
] }),
|
|
759
759
|
e
|
|
760
760
|
] });
|
|
@@ -762,7 +762,7 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
762
762
|
<path d="M8 5L5 8L8 11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
763
763
|
<path d="M5 8H14C17.314 8 20 10.462 20 13.5V13.5C20 16.538 17.314 19 14 19H6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
764
764
|
</svg>
|
|
765
|
-
`,
|
|
765
|
+
`, wr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
766
766
|
<path d="M12 19.0004C11.158 19.0004 10.315 18.8224 9.496 18.5054" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
767
767
|
<path d="M20.882 12.4678C18.99 15.9668 15.495 18.9998 12 18.9998" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
768
768
|
<path d="M19.079 8.9209C19.77 9.7299 20.384 10.6119 20.882 11.5329C21.039 11.8239 21.039 12.1769 20.882 12.4679" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -770,72 +770,72 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
770
770
|
<path d="M9.77299 14.2271C8.54299 12.9971 8.54299 11.0021 9.77299 9.77211C11.003 8.54211 12.998 8.54211 14.228 9.77211" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
771
771
|
<path d="M17.044 6.956C15.497 5.759 13.748 5 12 5C8.50499 5 5.00999 8.033 3.11799 11.533C2.96099 11.824 2.96099 12.177 3.11799 12.468C4.06399 14.217 5.40999 15.849 6.95599 17.045" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
772
772
|
</svg>
|
|
773
|
-
`,
|
|
773
|
+
`, ur = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
774
774
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.11799 12.467C2.96099 12.176 2.96099 11.823 3.11799 11.532C5.00999 8.033 8.50499 5 12 5C15.495 5 18.99 8.033 20.882 11.533C21.039 11.824 21.039 12.177 20.882 12.468C18.99 15.967 15.495 19 12 19C8.50499 19 5.00999 15.967 3.11799 12.467Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
775
775
|
<path d="M14.1213 9.87868C15.2929 11.0502 15.2929 12.9497 14.1213 14.1213C12.9497 15.2929 11.0502 15.2929 9.87866 14.1213C8.70709 12.9497 8.70709 11.0502 9.87866 9.87868C11.0502 8.70711 12.9497 8.70711 14.1213 9.87868" stroke="currentColor" stroke-width="1.4286" stroke-linecap="round" stroke-linejoin="round"/>
|
|
776
776
|
</svg>
|
|
777
|
-
`,
|
|
777
|
+
`, fr = '<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class=""><path d="M9.75 3C8.50736 3 7.5 4.00736 7.5 5.25C7.5 5.66421 7.83579 6 8.25 6C8.66421 6 9 5.66421 9 5.25C9 4.83579 9.33579 4.5 9.75 4.5H13.75C14.1642 4.5 14.5 4.83579 14.5 5.25V14.75C14.5 15.1642 14.1642 15.5 13.75 15.5H9.75C9.33579 15.5 9 15.1642 9 14.75C9 14.3358 8.66421 14 8.25 14C7.83579 14 7.5 14.3358 7.5 14.75C7.5 15.9926 8.50736 17 9.75 17H13.75C14.9926 17 16 15.9926 16 14.75V5.25C16 4.00736 14.9926 3 13.75 3H9.75Z" fill="currentColor"></path><path d="M12.25 10.75C12.6642 10.75 13 10.4142 13 10C13 9.58579 12.6642 9.25 12.25 9.25L6.56066 9.25L7.53033 8.28033C7.82322 7.98744 7.82322 7.51256 7.53033 7.21967C7.23744 6.92678 6.76256 6.92678 6.46967 7.21967L4.21967 9.46967C4.07902 9.61032 4 9.80109 4 10C4 10.1989 4.07902 10.3897 4.21967 10.5303L6.46967 12.7803C6.76256 13.0732 7.23744 13.0732 7.53033 12.7803C7.82322 12.4874 7.82322 12.0126 7.53033 11.7197L6.56066 10.75H12.25Z" fill="currentColor"></path></svg>', ye = rt(), pr = () => {
|
|
778
778
|
const {
|
|
779
779
|
queryParams: { mode: e, screen: t },
|
|
780
780
|
setQueryParams: s
|
|
781
|
-
} =
|
|
782
|
-
enabled:
|
|
783
|
-
canUndo:
|
|
784
|
-
canRedo:
|
|
785
|
-
})),
|
|
781
|
+
} = te(), { actions: r, canRedo: i, canUndo: o } = W((l, a) => ({
|
|
782
|
+
enabled: l.options.enabled,
|
|
783
|
+
canUndo: a.history.canUndo(),
|
|
784
|
+
canRedo: a.history.canRedo()
|
|
785
|
+
})), h = (l) => {
|
|
786
786
|
s({
|
|
787
|
-
screen:
|
|
787
|
+
screen: l
|
|
788
788
|
});
|
|
789
789
|
}, c = () => {
|
|
790
790
|
s({ mode: e === "full" ? "compact" : "full" });
|
|
791
|
-
},
|
|
791
|
+
}, d = () => {
|
|
792
792
|
ye.emit("close");
|
|
793
|
-
},
|
|
793
|
+
}, k = () => {
|
|
794
794
|
r.selectNode(), ye.emit("submit");
|
|
795
795
|
};
|
|
796
|
-
return /* @__PURE__ */
|
|
796
|
+
return /* @__PURE__ */ g(
|
|
797
797
|
"div",
|
|
798
798
|
{
|
|
799
799
|
className: I(
|
|
800
800
|
"tw:flex tw:items-center tw:gap-4 tw:p-2 tw:justify-between tw:bg-ic-ink-6s tw:text-ic-white-6s tw:text-sm"
|
|
801
801
|
),
|
|
802
802
|
children: [
|
|
803
|
-
/* @__PURE__ */
|
|
804
|
-
/* @__PURE__ */ n(j, { size: "32", onClick:
|
|
805
|
-
/* @__PURE__ */ n(
|
|
806
|
-
/* @__PURE__ */
|
|
803
|
+
/* @__PURE__ */ g("div", { className: "tw:flex tw:items-center tw:gap-3", children: [
|
|
804
|
+
/* @__PURE__ */ n(j, { size: "32", onClick: d, children: /* @__PURE__ */ n(E, { source: fr }) }),
|
|
805
|
+
/* @__PURE__ */ n(Ge, { onSelectionChange: h, value: t, children: Ue.map(({ icon: l, size: a }) => /* @__PURE__ */ n(j, { value: a, children: /* @__PURE__ */ n(E, { source: l }) }, a)) }),
|
|
806
|
+
/* @__PURE__ */ g("div", { className: "tw:p-1 tw:flex tw:items-center tw:gap-2 tw:bg-ic-white-1s tw:rounded-lg", children: [
|
|
807
807
|
/* @__PURE__ */ n(j, { onClick: r.history.undo, disabled: !o, children: /* @__PURE__ */ n(E, { source: xe }) }),
|
|
808
808
|
/* @__PURE__ */ n(j, { onClick: r.history.redo, disabled: !i, children: /* @__PURE__ */ n(E, { source: xe, className: "tw:rotate-180" }) })
|
|
809
809
|
] }),
|
|
810
|
-
/* @__PURE__ */ n("div", { className: "tw:p-1 tw:flex tw:items-center tw:gap-2 tw:bg-ic-white-1s tw:rounded-lg", children: /* @__PURE__ */ n(j, { onClick: c, children: /* @__PURE__ */ n(E, { source: e === "full" ?
|
|
810
|
+
/* @__PURE__ */ n("div", { className: "tw:p-1 tw:flex tw:items-center tw:gap-2 tw:bg-ic-white-1s tw:rounded-lg", children: /* @__PURE__ */ n(j, { onClick: c, children: /* @__PURE__ */ n(E, { source: e === "full" ? ur : wr }) }) })
|
|
811
811
|
] }),
|
|
812
|
-
/* @__PURE__ */ n("div", { className: "tw:flex tw:items-center tw:gap-3", children: /* @__PURE__ */ n(Le, { onClick:
|
|
812
|
+
/* @__PURE__ */ n("div", { className: "tw:flex tw:items-center tw:gap-3", children: /* @__PURE__ */ n(Le, { onClick: k, children: "Save" }) })
|
|
813
813
|
]
|
|
814
814
|
}
|
|
815
815
|
);
|
|
816
|
-
},
|
|
816
|
+
}, gr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
817
817
|
<path d="M20 19.9997L16.3763 16.376" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
818
818
|
<path d="M4 11.25C4 15.2541 7.24594 18.5 11.25 18.5C15.2541 18.5 18.5 15.2541 18.5 11.25C18.5 7.24594 15.2541 4 11.25 4V4C7.24606 4.00029 4.00029 7.24606 4 11.25" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
819
819
|
</svg>
|
|
820
|
-
`,
|
|
820
|
+
`, mr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
821
821
|
<path d="M15 6L9 12L15 18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
822
822
|
</svg>
|
|
823
|
-
`,
|
|
824
|
-
/* @__PURE__ */ n("div", { className: "tw:flex tw:items-center tw:p-2 tw:gap-3", children: /* @__PURE__ */ n(Ee, { fullWidth: !0, placeholder: "Search...", prefix: /* @__PURE__ */ n(E, { source:
|
|
825
|
-
/* @__PURE__ */
|
|
826
|
-
/* @__PURE__ */
|
|
823
|
+
`, kr = ({ elements: e, sections: t }) => /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:h-full", children: [
|
|
824
|
+
/* @__PURE__ */ n("div", { className: "tw:flex tw:items-center tw:p-2 tw:gap-3", children: /* @__PURE__ */ n(Ee, { fullWidth: !0, placeholder: "Search...", prefix: /* @__PURE__ */ n(E, { source: gr }) }) }),
|
|
825
|
+
/* @__PURE__ */ g(Ze, { defaultIndex: 1, className: "tw:flex-1 tw:overflow-hidden tw:border-t tw:border-ic-white-1s", children: [
|
|
826
|
+
/* @__PURE__ */ g(Qe, { children: [
|
|
827
827
|
/* @__PURE__ */ n(we, { className: "tw:flex-1", children: "Sections" }),
|
|
828
828
|
/* @__PURE__ */ n(we, { className: "tw:flex-1", children: "Elements" })
|
|
829
829
|
] }),
|
|
830
|
-
/* @__PURE__ */
|
|
831
|
-
/* @__PURE__ */ n(ue, { children: /* @__PURE__ */ n(
|
|
832
|
-
/* @__PURE__ */ n(ue, { className: "tw:h-full tw:overflow-hidden", children: /* @__PURE__ */ n(
|
|
830
|
+
/* @__PURE__ */ g(Ye, { className: "tw:flex-1 tw:overflow-hidden", children: [
|
|
831
|
+
/* @__PURE__ */ n(ue, { children: /* @__PURE__ */ n(oe, { className: "tw:h-full tw:py-2", children: t?.map((s, r) => /* @__PURE__ */ n(br, { group: s }, r)) }) }),
|
|
832
|
+
/* @__PURE__ */ n(ue, { className: "tw:h-full tw:overflow-hidden", children: /* @__PURE__ */ n(oe, { className: "tw:h-full tw:py-2", children: e?.map((s, r) => /* @__PURE__ */ n(vr, { group: s }, r)) }) })
|
|
833
833
|
] })
|
|
834
834
|
] })
|
|
835
|
-
] }),
|
|
835
|
+
] }), vr = ({ group: e }) => {
|
|
836
836
|
const [t, s] = De(!0), { actions: r, connectors: i } = W();
|
|
837
|
-
return /* @__PURE__ */
|
|
838
|
-
/* @__PURE__ */ n(Le, { onClick: s, className: "tw:bg-transparent", children: /* @__PURE__ */
|
|
837
|
+
return /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:text-sm", children: [
|
|
838
|
+
/* @__PURE__ */ n(Le, { onClick: s, className: "tw:bg-transparent", children: /* @__PURE__ */ g("div", { className: "tw:flex tw:items-center tw:justify-between tw:flex-1 tw:text-sm", children: [
|
|
839
839
|
e.name,
|
|
840
840
|
/* @__PURE__ */ n(
|
|
841
841
|
E,
|
|
@@ -847,7 +847,7 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
847
847
|
}
|
|
848
848
|
)
|
|
849
849
|
] }) }),
|
|
850
|
-
/* @__PURE__ */ n(Ke, { open: t, children: /* @__PURE__ */ n("div", { className: "tw:px-4 tw:py-2 tw:grid tw:grid-cols-2 tw:gap-4", children: e.elements.map((o,
|
|
850
|
+
/* @__PURE__ */ n(Ke, { open: t, children: /* @__PURE__ */ n("div", { className: "tw:px-4 tw:py-2 tw:grid tw:grid-cols-2 tw:gap-4", children: e.elements.map((o, h) => /* @__PURE__ */ g("div", { className: "tw:space-y-1", children: [
|
|
851
851
|
/* @__PURE__ */ n(
|
|
852
852
|
"div",
|
|
853
853
|
{
|
|
@@ -858,8 +858,8 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
858
858
|
),
|
|
859
859
|
ref: (c) => {
|
|
860
860
|
c && i.create(c, o.template, {
|
|
861
|
-
onCreate(
|
|
862
|
-
(typeof o.autoFocus == "function" ? o.autoFocus(
|
|
861
|
+
onCreate(d) {
|
|
862
|
+
(typeof o.autoFocus == "function" ? o.autoFocus(d) : o.autoFocus) && r.selectNode(d.rootNodeId), o.onCreate?.(d);
|
|
863
863
|
}
|
|
864
864
|
});
|
|
865
865
|
},
|
|
@@ -867,10 +867,10 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
867
867
|
}
|
|
868
868
|
),
|
|
869
869
|
/* @__PURE__ */ n("p", { className: "tw:text-xs tw:mx-auto tw:text-center", children: o.name })
|
|
870
|
-
] },
|
|
870
|
+
] }, h)) }) })
|
|
871
871
|
] });
|
|
872
|
-
},
|
|
873
|
-
const [t, s] =
|
|
872
|
+
}, br = ({ group: e }) => {
|
|
873
|
+
const [t, s] = _(!1), { refs: r, floatingStyles: i, context: o } = wt({
|
|
874
874
|
open: t,
|
|
875
875
|
onOpenChange: s,
|
|
876
876
|
placement: "right-start",
|
|
@@ -878,54 +878,67 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
878
878
|
ft(),
|
|
879
879
|
pt({
|
|
880
880
|
apply({ elements: m }) {
|
|
881
|
-
const
|
|
881
|
+
const b = {
|
|
882
882
|
zIndex: `${yt}`,
|
|
883
883
|
height: `${m.reference.getBoundingClientRect().height}px`
|
|
884
884
|
};
|
|
885
|
-
Object.assign(m.floating.style,
|
|
885
|
+
Object.assign(m.floating.style, b);
|
|
886
886
|
}
|
|
887
887
|
})
|
|
888
888
|
],
|
|
889
889
|
whileElementsMounted: ut
|
|
890
890
|
});
|
|
891
|
-
|
|
891
|
+
z(() => {
|
|
892
892
|
r.setPositionReference(document.querySelector("aside"));
|
|
893
893
|
}, [r]);
|
|
894
|
-
const
|
|
895
|
-
return /* @__PURE__ */
|
|
896
|
-
/* @__PURE__ */
|
|
894
|
+
const h = gt(o, { move: !1, handleClose: mt() }), c = kt(o), d = vt(o), k = bt(o), { getReferenceProps: l, getFloatingProps: a } = Ct([h, c, d, k]);
|
|
895
|
+
return /* @__PURE__ */ g(J, { children: [
|
|
896
|
+
/* @__PURE__ */ g(
|
|
897
897
|
"button",
|
|
898
898
|
{
|
|
899
899
|
className: I(
|
|
900
900
|
"tw:w-full tw:text-left tw:flex tw:items-center tw:text-ic-white-5s tw:gap-2 tw:p-2 tw:rounded-lg",
|
|
901
901
|
"tw:hover:text-ic-white-6s tw:hover:bg-ic-white-1s tw:hover:font-medium"
|
|
902
902
|
),
|
|
903
|
-
...
|
|
903
|
+
...l(),
|
|
904
904
|
ref: r.setReference,
|
|
905
905
|
children: [
|
|
906
906
|
/* @__PURE__ */ n("div", { className: "tw:bg-ic-white-1s tw:p-1.5 tw:rounded-lg", children: /* @__PURE__ */ n(E, { ...e.icon }) }),
|
|
907
907
|
/* @__PURE__ */ n("span", { className: "tw:flex-1 tw:truncate", children: e.name }),
|
|
908
|
-
/* @__PURE__ */ n(E, { className: "tw:rotate-180", source:
|
|
908
|
+
/* @__PURE__ */ n(E, { className: "tw:rotate-180", source: mr })
|
|
909
909
|
]
|
|
910
910
|
}
|
|
911
911
|
),
|
|
912
|
-
t && /* @__PURE__ */ n(Ie, { children: /* @__PURE__ */ n("div", { style: i, ...
|
|
912
|
+
t && /* @__PURE__ */ n(Ie, { children: /* @__PURE__ */ n("div", { style: i, ...a(), ref: r.setFloating, children: /* @__PURE__ */ g("div", { className: "tw:h-full tw:flex tw:flex-col tw:border-l tw:border-t tw:border-ic-white-2s tw:bg-ic-ink-6s tw:text-ic-white-6s tw:text-sm", children: [
|
|
913
913
|
/* @__PURE__ */ n("div", { className: "tw:h-12 tw:px-2 tw:flex tw:items-center", children: /* @__PURE__ */ n("h6", { className: "tw:font-medium", children: e.name }) }),
|
|
914
|
-
/* @__PURE__ */ n(
|
|
914
|
+
/* @__PURE__ */ n(oe, { className: "tw:flex-1 tw:px-3", children: /* @__PURE__ */ n("div", { className: "tw:flex tw:flex-col tw:gap-4", children: e.sections.map((m, b) => /* @__PURE__ */ ht(Cr, { ...m, key: b })) }) })
|
|
915
915
|
] }) }) })
|
|
916
916
|
] });
|
|
917
|
-
},
|
|
918
|
-
const [, r] =
|
|
919
|
-
resolver:
|
|
920
|
-
}))
|
|
917
|
+
}, Cr = ({ template: e, autoFocus: t = !0, onCreate: s }) => {
|
|
918
|
+
const [, r] = _(!1), [i] = ae(), { actions: o, connectors: h, resolver: c, query: d } = W((l) => ({
|
|
919
|
+
resolver: l.options.resolver
|
|
920
|
+
})), k = _(() => {
|
|
921
|
+
const l = typeof e == "function" ? e() : e;
|
|
922
|
+
let a;
|
|
923
|
+
"rootNodeId" in l ? a = l : a = d.parseReactElement(l).toNodeTree();
|
|
924
|
+
const { rootNodeId: m, nodes: b } = a, v = {};
|
|
925
|
+
return Object.entries(b).forEach(([w, N]) => {
|
|
926
|
+
const p = Et(N.data, c), x = w === m ? B : w;
|
|
927
|
+
v[x] = {
|
|
928
|
+
...p,
|
|
929
|
+
parent: p.parent === m ? B : p.parent,
|
|
930
|
+
nodes: p.nodes?.map((M) => M === m ? B : M)
|
|
931
|
+
};
|
|
932
|
+
}), v;
|
|
933
|
+
})[0];
|
|
921
934
|
return /* @__PURE__ */ n(
|
|
922
935
|
"div",
|
|
923
936
|
{
|
|
924
937
|
className: "tw:cursor-grab tw:border tw:border-ic-white-1s tw:rounded-lg tw:overflow-hidden",
|
|
925
|
-
ref: (
|
|
926
|
-
|
|
927
|
-
onCreate(
|
|
928
|
-
t && o.selectNode(
|
|
938
|
+
ref: (l) => {
|
|
939
|
+
l && h.create(l, e, {
|
|
940
|
+
onCreate(a) {
|
|
941
|
+
t && o.selectNode(a.rootNodeId), s?.(a);
|
|
929
942
|
}
|
|
930
943
|
});
|
|
931
944
|
},
|
|
@@ -940,12 +953,12 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
940
953
|
}
|
|
941
954
|
},
|
|
942
955
|
viewport: { width: Nt.md.minWidth },
|
|
943
|
-
children: /* @__PURE__ */ n(Me, { resolver: c, children: /* @__PURE__ */ n(
|
|
956
|
+
children: /* @__PURE__ */ n(Me, { resolver: c, children: /* @__PURE__ */ n(Re, { data: k }) })
|
|
944
957
|
}
|
|
945
958
|
) }) })
|
|
946
959
|
}
|
|
947
960
|
);
|
|
948
|
-
},
|
|
961
|
+
}, xr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
949
962
|
<path d="M12.5 2H9.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
950
963
|
<path d="M2 9.5V12.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
951
964
|
<path d="M10.257 16.6214L7.075 13.4394C6.489 12.8534 6.489 11.9034 7.075 11.3184V11.3184C7.661 10.7324 8.611 10.7324 9.196 11.3184" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -956,25 +969,25 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
956
969
|
<path d="M2 17V18C2 19.105 2.895 20 4 20H5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
957
970
|
<path d="M20 5V4C20 2.895 19.105 2 18 2H17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
958
971
|
</svg>
|
|
959
|
-
`,
|
|
972
|
+
`, yr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
960
973
|
<circle cx="6.49771" cy="5.49762" r="2.50104" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
961
974
|
<circle cx="6.49771" cy="18.503" r="2.50104" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
962
975
|
<path d="M6.49771 7.99854V16.0019" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
963
976
|
<circle cx="17.5023" cy="13.0006" r="2.50104" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
964
977
|
<path d="M6.49771 7.99854V7.99854C6.49771 10.7611 8.73722 13.0006 11.4998 13.0006H15.0013" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
965
978
|
</svg>
|
|
966
|
-
`,
|
|
979
|
+
`, Nr = (e) => {
|
|
967
980
|
const { query: t, actions: s } = W(), {
|
|
968
981
|
id: r,
|
|
969
982
|
expanded: i,
|
|
970
983
|
actions: o,
|
|
971
|
-
displayName:
|
|
984
|
+
displayName: h,
|
|
972
985
|
children: c,
|
|
973
|
-
depth:
|
|
974
|
-
} =
|
|
975
|
-
expanded:
|
|
976
|
-
displayName:
|
|
977
|
-
})), { selected:
|
|
986
|
+
depth: d
|
|
987
|
+
} = jt((b) => ({
|
|
988
|
+
expanded: b.expanded,
|
|
989
|
+
displayName: $e(t.node(b.id).get())
|
|
990
|
+
})), { selected: k, selectable: l } = W((b, v) => {
|
|
978
991
|
const w = v.node(r).get();
|
|
979
992
|
return {
|
|
980
993
|
selected: v.getEvent("selected").contains(r),
|
|
@@ -982,38 +995,38 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
982
995
|
selectable: it(w)
|
|
983
996
|
};
|
|
984
997
|
});
|
|
985
|
-
|
|
986
|
-
r ===
|
|
987
|
-
}, [o, r]),
|
|
998
|
+
z(() => {
|
|
999
|
+
r === B && o.setExpandedState(!0);
|
|
1000
|
+
}, [o, r]), z(() => {
|
|
988
1001
|
if (c.length === 0) return;
|
|
989
1002
|
c.some((v) => {
|
|
990
1003
|
const w = t.getEvent("selected").all();
|
|
991
|
-
return w.includes(v) ? !0 : t.node(v).descendants(!0).some((
|
|
1004
|
+
return w.includes(v) ? !0 : t.node(v).descendants(!0).some((p) => w.includes(p));
|
|
992
1005
|
}) && o.setExpandedState(!0);
|
|
993
1006
|
}, [c, o, t]);
|
|
994
|
-
const
|
|
1007
|
+
const a = () => {
|
|
995
1008
|
s.selectNode(r);
|
|
996
|
-
}, m = (
|
|
997
|
-
|
|
1009
|
+
}, m = (b) => {
|
|
1010
|
+
b.stopPropagation(), o.toggleLayer();
|
|
998
1011
|
};
|
|
999
|
-
return /* @__PURE__ */
|
|
1012
|
+
return /* @__PURE__ */ g(
|
|
1000
1013
|
"div",
|
|
1001
1014
|
{
|
|
1002
1015
|
className: "tw:py-1",
|
|
1003
1016
|
children: [
|
|
1004
|
-
/* @__PURE__ */
|
|
1017
|
+
/* @__PURE__ */ g(
|
|
1005
1018
|
"div",
|
|
1006
1019
|
{
|
|
1007
|
-
onClick:
|
|
1020
|
+
onClick: a,
|
|
1008
1021
|
style: {
|
|
1009
|
-
paddingLeft: Math.max(0,
|
|
1022
|
+
paddingLeft: Math.max(0, d - 1) * 16
|
|
1010
1023
|
},
|
|
1011
1024
|
className: I(
|
|
1012
1025
|
"tw:flex tw:items-center tw:gap-0.5 tw:cursor-pointer tw:rounded-1 tw:pr-2 tw:py-1 tw:border tw:border-ic-white-1s tw:hover:bg-ic-white-1s",
|
|
1013
1026
|
{
|
|
1014
|
-
hidden: r ===
|
|
1015
|
-
"tw:bg-ic-black-7s":
|
|
1016
|
-
"tw:pointer-events-none": !
|
|
1027
|
+
hidden: r === B,
|
|
1028
|
+
"tw:bg-ic-black-7s": k,
|
|
1029
|
+
"tw:pointer-events-none": !l
|
|
1017
1030
|
}
|
|
1018
1031
|
),
|
|
1019
1032
|
children: [
|
|
@@ -1026,14 +1039,14 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
1026
1039
|
size: 16,
|
|
1027
1040
|
source: Se
|
|
1028
1041
|
}
|
|
1029
|
-
) }) : /* @__PURE__ */ n("div", { className: "tw:p-1", children: /* @__PURE__ */ n(E, { size: 16, source:
|
|
1042
|
+
) }) : /* @__PURE__ */ n("div", { className: "tw:p-1", children: /* @__PURE__ */ n(E, { size: 16, source: yr }) }),
|
|
1030
1043
|
/* @__PURE__ */ n(
|
|
1031
1044
|
"span",
|
|
1032
1045
|
{
|
|
1033
1046
|
className: I("tw:flex-1 tw:truncate", {
|
|
1034
|
-
"tw:text-ic-white-3s": !
|
|
1047
|
+
"tw:text-ic-white-3s": !l
|
|
1035
1048
|
}),
|
|
1036
|
-
children:
|
|
1049
|
+
children: h
|
|
1037
1050
|
}
|
|
1038
1051
|
)
|
|
1039
1052
|
]
|
|
@@ -1043,11 +1056,11 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
1043
1056
|
]
|
|
1044
1057
|
}
|
|
1045
1058
|
);
|
|
1046
|
-
},
|
|
1047
|
-
const t =
|
|
1059
|
+
}, Lr = ({ onClose: e }) => {
|
|
1060
|
+
const t = It(), s = (r) => {
|
|
1048
1061
|
t.start(r);
|
|
1049
1062
|
};
|
|
1050
|
-
return /* @__PURE__ */ n(Ie, { children: /* @__PURE__ */
|
|
1063
|
+
return /* @__PURE__ */ n(Ie, { children: /* @__PURE__ */ g(
|
|
1051
1064
|
Xe.div,
|
|
1052
1065
|
{
|
|
1053
1066
|
drag: !0,
|
|
@@ -1056,62 +1069,62 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
1056
1069
|
style: { zIndex: 1e5, width: 320, height: 400, top: 80, right: 40 },
|
|
1057
1070
|
className: "tw:fixed tw:rounded-2 tw:bg-ic-ink-6s tw:text-white tw:flex tw:flex-col tw:border tw:border-ic-white-2s",
|
|
1058
1071
|
children: [
|
|
1059
|
-
/* @__PURE__ */
|
|
1072
|
+
/* @__PURE__ */ g(
|
|
1060
1073
|
"div",
|
|
1061
1074
|
{
|
|
1062
1075
|
onPointerDown: s,
|
|
1063
1076
|
className: "tw:py-2 tw:cursor-grab tw:flex tw:items-center tw:justify-between tw:px-4",
|
|
1064
1077
|
children: [
|
|
1065
|
-
/* @__PURE__ */
|
|
1066
|
-
/* @__PURE__ */ n(E, { source:
|
|
1078
|
+
/* @__PURE__ */ g("div", { className: "tw:flex tw:items-center tw:gap-2", children: [
|
|
1079
|
+
/* @__PURE__ */ n(E, { source: xr }),
|
|
1067
1080
|
/* @__PURE__ */ n("p", { className: "tw:text-sm tw:font-medium", children: "Layers" })
|
|
1068
1081
|
] }),
|
|
1069
1082
|
/* @__PURE__ */ n(j, { onClick: e, children: /* @__PURE__ */ n(E, { source: Je }) })
|
|
1070
1083
|
]
|
|
1071
1084
|
}
|
|
1072
1085
|
),
|
|
1073
|
-
/* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-auto tw:border-t tw:border-ic-white-1s tw:p-2", children: /* @__PURE__ */ n(
|
|
1086
|
+
/* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-auto tw:border-t tw:border-ic-white-1s tw:p-2", children: /* @__PURE__ */ n($t, { renderLayer: Nr }) })
|
|
1074
1087
|
]
|
|
1075
1088
|
}
|
|
1076
1089
|
) });
|
|
1077
|
-
},
|
|
1090
|
+
}, Er = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1078
1091
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M3 7.024L11.987 11.049L21 7.024L12.013 3L3 7.024Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1079
1092
|
<path d="M15.436 14.484L21 16.976L11.987 21L3 16.976L8.564 14.491" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1080
1093
|
<path d="M15.436 9.50903L21 12L11.987 16.024L3 12L8.564 9.51603" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1081
1094
|
</svg>
|
|
1082
|
-
`,
|
|
1095
|
+
`, Sr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1083
1096
|
<path d="M5 12H19" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1084
1097
|
<path d="M10 7L5 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1085
1098
|
<path d="M10 17L5 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1086
1099
|
</svg>
|
|
1087
|
-
`,
|
|
1100
|
+
`, Mr = ({ insert: e }) => {
|
|
1088
1101
|
const [t, s] = De(!1), {
|
|
1089
1102
|
queryParams: {
|
|
1090
1103
|
action: r = "insert"
|
|
1091
1104
|
/* Insert */
|
|
1092
1105
|
},
|
|
1093
1106
|
setQueryParams: i
|
|
1094
|
-
} =
|
|
1095
|
-
const
|
|
1107
|
+
} = te(), { actions: o, isDeletable: h, focusedNode: c } = W((a, m) => {
|
|
1108
|
+
const b = m.getEvent("selected").first(), v = b ? m.node(b) : null;
|
|
1096
1109
|
return {
|
|
1097
|
-
enabled:
|
|
1110
|
+
enabled: a.options.enabled,
|
|
1098
1111
|
isDeletable: !!(v?.isDeletable() && (v.get().data.custom?.deletable ?? !0)),
|
|
1099
1112
|
focusedNode: v?.get()
|
|
1100
1113
|
};
|
|
1101
|
-
}),
|
|
1114
|
+
}), d = () => {
|
|
1102
1115
|
o.selectNode();
|
|
1103
|
-
},
|
|
1104
|
-
o.delete(
|
|
1105
|
-
},
|
|
1106
|
-
const m =
|
|
1107
|
-
m === "layers" ? s() : (
|
|
1116
|
+
}, k = (a) => {
|
|
1117
|
+
o.delete(a.currentTarget.value);
|
|
1118
|
+
}, l = (a) => {
|
|
1119
|
+
const m = a.currentTarget.value;
|
|
1120
|
+
m === "layers" ? s() : (d(), i({
|
|
1108
1121
|
action: m
|
|
1109
1122
|
}));
|
|
1110
1123
|
};
|
|
1111
|
-
return /* @__PURE__ */
|
|
1112
|
-
/* @__PURE__ */
|
|
1113
|
-
/* @__PURE__ */
|
|
1114
|
-
!!e && /* @__PURE__ */
|
|
1124
|
+
return /* @__PURE__ */ g(J, { children: [
|
|
1125
|
+
/* @__PURE__ */ g("aside", { className: "tw:flex tw:items-stretch tw:bg-ic-ink-6s tw:relative tw:border-t tw:border-ic-white-2s tw:text-ic-white-6s tw:text-sm", children: [
|
|
1126
|
+
/* @__PURE__ */ g("div", { className: "tw:px-1 tw:flex tw:flex-col tw:gap-1", children: [
|
|
1127
|
+
!!e && /* @__PURE__ */ g(Ne, { children: [
|
|
1115
1128
|
/* @__PURE__ */ n(
|
|
1116
1129
|
j,
|
|
1117
1130
|
{
|
|
@@ -1119,7 +1132,7 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
1119
1132
|
content: "Insert",
|
|
1120
1133
|
placement: "right"
|
|
1121
1134
|
},
|
|
1122
|
-
onClick:
|
|
1135
|
+
onClick: l,
|
|
1123
1136
|
value: "insert",
|
|
1124
1137
|
className: "tw:relative",
|
|
1125
1138
|
size: "32",
|
|
@@ -1135,25 +1148,25 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
1135
1148
|
content: "Layers",
|
|
1136
1149
|
placement: "right"
|
|
1137
1150
|
},
|
|
1138
|
-
onClick:
|
|
1151
|
+
onClick: l,
|
|
1139
1152
|
value: "layers",
|
|
1140
1153
|
className: "tw:relative",
|
|
1141
1154
|
size: "32",
|
|
1142
|
-
children: /* @__PURE__ */ n(E, { source:
|
|
1155
|
+
children: /* @__PURE__ */ n(E, { source: Er })
|
|
1143
1156
|
}
|
|
1144
1157
|
)
|
|
1145
1158
|
] }),
|
|
1146
|
-
/* @__PURE__ */
|
|
1159
|
+
/* @__PURE__ */ g(
|
|
1147
1160
|
"div",
|
|
1148
1161
|
{
|
|
1149
1162
|
className: I("tw:relative tw:flex tw:flex-col tw:border-l tw:border-ic-white-1s tw:w-72 tw:overflow-auto"),
|
|
1150
1163
|
children: [
|
|
1151
|
-
!c?.related.inspector && /* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-auto scrollbar", children: r === "insert" && !!e && /* @__PURE__ */ n(
|
|
1152
|
-
!!c?.related?.inspector && /* @__PURE__ */
|
|
1153
|
-
/* @__PURE__ */
|
|
1154
|
-
/* @__PURE__ */ n(j, { onClick:
|
|
1155
|
-
/* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-hidden", children: /* @__PURE__ */ n(Ee, { fullWidth: !0, value:
|
|
1156
|
-
|
|
1164
|
+
!c?.related.inspector && /* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-auto scrollbar", children: r === "insert" && !!e && /* @__PURE__ */ n(kr, { elements: e.elements, sections: e.sections }) }),
|
|
1165
|
+
!!c?.related?.inspector && /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:flex-1 tw:overflow-hidden", children: [
|
|
1166
|
+
/* @__PURE__ */ g("div", { className: "tw:flex tw:items-center tw:gap-2 tw:px-2 tw:py-2", children: [
|
|
1167
|
+
/* @__PURE__ */ n(j, { onClick: d, children: /* @__PURE__ */ n(E, { source: Sr }) }),
|
|
1168
|
+
/* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-hidden", children: /* @__PURE__ */ n(Ee, { fullWidth: !0, value: $e(c), size: "32" }) }),
|
|
1169
|
+
h && /* @__PURE__ */ n(j, { value: c.id, onClick: k, children: /* @__PURE__ */ n(E, { className: "tw:text-ic-red-4s", source: et }) })
|
|
1157
1170
|
] }),
|
|
1158
1171
|
/* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-auto tw:border-t tw:border-ic-white-1s scrollbar-hidden", children: /* @__PURE__ */ n(at, { fallback: null, children: Ae(c.related.inspector) }) })
|
|
1159
1172
|
] })
|
|
@@ -1161,33 +1174,33 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
1161
1174
|
}
|
|
1162
1175
|
)
|
|
1163
1176
|
] }),
|
|
1164
|
-
t && /* @__PURE__ */ n(
|
|
1177
|
+
t && /* @__PURE__ */ n(Lr, { onClose: s })
|
|
1165
1178
|
] });
|
|
1166
|
-
},
|
|
1179
|
+
}, Vr = ({ theme: e, insert: t, resolver: s }) => {
|
|
1167
1180
|
const {
|
|
1168
|
-
queryParams: { screen:
|
|
1169
|
-
} =
|
|
1181
|
+
queryParams: { screen: r }
|
|
1182
|
+
} = te();
|
|
1170
1183
|
return ae({
|
|
1171
1184
|
theme: e
|
|
1172
|
-
}), /* @__PURE__ */ n(Me, { enabled: !0, onRender:
|
|
1173
|
-
/* @__PURE__ */ n(
|
|
1174
|
-
/* @__PURE__ */
|
|
1175
|
-
/* @__PURE__ */ n(
|
|
1185
|
+
}), /* @__PURE__ */ n(Me, { enabled: !0, onRender: hr, resolver: s, children: /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:w-screen tw:h-screen tw:bg-ic-ink-6s tw:text-ic-white-6s", children: [
|
|
1186
|
+
/* @__PURE__ */ n(pr, {}),
|
|
1187
|
+
/* @__PURE__ */ g("div", { className: "tw:flex-1 tw:overflow-hidden tw:flex", children: [
|
|
1188
|
+
/* @__PURE__ */ n(Mr, { insert: t }),
|
|
1176
1189
|
/* @__PURE__ */ n(
|
|
1177
1190
|
Ve,
|
|
1178
1191
|
{
|
|
1179
1192
|
viewport: {
|
|
1180
|
-
width: (
|
|
1193
|
+
width: (i) => r === "lg" ? Math.max(i, fe[r]) : fe[r]
|
|
1181
1194
|
},
|
|
1182
|
-
children: /* @__PURE__ */ n(
|
|
1195
|
+
children: /* @__PURE__ */ n(Re, { children: /* @__PURE__ */ n(tt, {}) })
|
|
1183
1196
|
}
|
|
1184
1197
|
)
|
|
1185
1198
|
] })
|
|
1186
1199
|
] }) });
|
|
1187
1200
|
};
|
|
1188
1201
|
export {
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1202
|
+
Vr as Editor,
|
|
1203
|
+
te as useEditorQueryParams,
|
|
1204
|
+
qr as useEditorResponsive,
|
|
1192
1205
|
ae as useEditorState
|
|
1193
1206
|
};
|