@janbox/storefront-builder 1.0.6 → 1.0.7
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/countdown-timer.node-CGKz1DZI.js +8252 -0
- package/dist/editor.js +370 -332
- package/dist/index-Bvy64nrI.js +4 -0
- package/dist/index-Du5uN6Rq.js +6015 -0
- package/dist/index.js +110 -5741
- package/dist/style.css +1 -1
- package/dist/templates.js +95 -71
- package/dist/{tooltip-CqfT80iK.js → tooltip-Coblboaw.js} +6 -6
- package/package.json +1 -4
- package/dist/countdown-timer.node-CAsCNVin.js +0 -2718
- package/dist/index-BU9pvpw_.js +0 -5617
- package/dist/index-BxuniYfy.js +0 -4
- package/dist/minus-C82LyzQP.js +0 -6
package/dist/editor.js
CHANGED
|
@@ -1,17 +1,36 @@
|
|
|
1
1
|
import { jsx as n, Fragment as ye, jsxs as k } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { useRef as
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
|
|
2
|
+
import { Q as _e, W as re, c as P, X as we, Y as fe, x as ze, y as Ge, N as F, J as L, i as qe, P as Ue, V as Ze, S as Qe, G as Ye, f as Xe, h as Ke, F as Je, l as et, e as tt, j as rt, I as nt, L as st, s as ot, r as it, B as ct, a as at, g as lt, Z as A, _ as E, $ as Le, a0 as Ie, a1 as dt, a2 as ht, a3 as ut, a4 as wt, v as Ee, z as ft, a5 as pt, m as mt } from "./countdown-timer.node-CGKz1DZI.js";
|
|
3
|
+
import { useNode as gt, ROOT_NODE as W, serializeNode as kt } from "@craftjs/core";
|
|
4
|
+
import { useRef as Se, useState as O, useEffect as G, createElement as Me, Fragment as ee, Suspense as vt } from "react";
|
|
5
|
+
import "flat";
|
|
6
|
+
import { throttle as bt, isFunction as pe, isNumber as me } from "lodash-es";
|
|
7
|
+
import "@janbox/storefront-ui";
|
|
8
|
+
import { Q as ne, R as Ct, W as xt, f as Nt, H as yt, h as Lt, P as It, k as Et, i as St, G as Mt, b as Rt, e as $t, F as At, M as jt, a as Tt, g as Pt, I as Dt, L as Bt, U as Ft, T as Wt, B as Ht, A as Ot, d as Vt, X as _t, Y as zt, Z as Gt, _ as qt, $ as ge, a0 as Ut, a1 as ke, a2 as ce, a3 as Re, c as $e, C as Ae, a4 as Zt, a5 as ve } from "./index-Du5uN6Rq.js";
|
|
9
|
+
import { a6 as Un } from "./index-Du5uN6Rq.js";
|
|
10
|
+
import "@janbox/storefront-ui/hooks";
|
|
11
|
+
import { ThemeProvider as Qt, FLOATING_Z_INDEX as Yt, breakpoint as Xt } from "@janbox/storefront-ui/theme";
|
|
12
|
+
import "@janbox/storefront-ui/utils";
|
|
13
|
+
import { useFloating as Kt, autoUpdate as Jt, flip as er, size as tr, useHover as rr, safePolygon as nr, useFocus as sr, useDismiss as or, useRole as ir, useInteractions as cr, FloatingPortal as je } from "@floating-ui/react";
|
|
14
|
+
import "react-use";
|
|
15
|
+
import "react-colorful";
|
|
16
|
+
import "overlayscrollbars-react";
|
|
17
|
+
import "@tanstack/react-virtual";
|
|
18
|
+
import "react-dropzone";
|
|
19
|
+
import "react-datepicker/dist/react-datepicker.css";
|
|
20
|
+
import "react-datepicker";
|
|
21
|
+
import "@tiptap/extension-text-style";
|
|
22
|
+
import "@tiptap/react";
|
|
23
|
+
import "@tiptap/react/menus";
|
|
24
|
+
import "@tiptap/starter-kit";
|
|
25
|
+
import ar, { useFrame as lr } from "react-frame-component";
|
|
26
|
+
import { CacheProvider as dr, Global as hr, createElement as ur } from "@emotion/react";
|
|
27
|
+
import "@hello-pangea/dnd";
|
|
28
|
+
import "clsx";
|
|
29
|
+
import "tailwind-merge";
|
|
30
|
+
import "react-router";
|
|
31
|
+
import { useToggle as Te } from "usehooks-ts";
|
|
32
|
+
import { Layers as wr, useLayer as fr } from "@craftjs/layers";
|
|
33
|
+
class pr {
|
|
15
34
|
constructor() {
|
|
16
35
|
this.componentControls = /* @__PURE__ */ new Set();
|
|
17
36
|
}
|
|
@@ -44,22 +63,22 @@ class $t {
|
|
|
44
63
|
});
|
|
45
64
|
}
|
|
46
65
|
}
|
|
47
|
-
const
|
|
48
|
-
function
|
|
49
|
-
return
|
|
66
|
+
const mr = () => new pr();
|
|
67
|
+
function gr() {
|
|
68
|
+
return _e(mr);
|
|
50
69
|
}
|
|
51
|
-
function
|
|
70
|
+
function kr(e) {
|
|
52
71
|
if (e.sheet)
|
|
53
72
|
return e.sheet;
|
|
54
73
|
for (var t = 0; t < document.styleSheets.length; t++)
|
|
55
74
|
if (document.styleSheets[t].ownerNode === e)
|
|
56
75
|
return document.styleSheets[t];
|
|
57
76
|
}
|
|
58
|
-
function
|
|
77
|
+
function vr(e) {
|
|
59
78
|
var t = document.createElement("style");
|
|
60
79
|
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;
|
|
61
80
|
}
|
|
62
|
-
var
|
|
81
|
+
var br = /* @__PURE__ */ (function() {
|
|
63
82
|
function e(s) {
|
|
64
83
|
var r = this;
|
|
65
84
|
this._insertTag = function(i) {
|
|
@@ -71,10 +90,10 @@ var Tt = /* @__PURE__ */ (function() {
|
|
|
71
90
|
return t.hydrate = function(r) {
|
|
72
91
|
r.forEach(this._insertTag);
|
|
73
92
|
}, t.insert = function(r) {
|
|
74
|
-
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(
|
|
93
|
+
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(vr(this));
|
|
75
94
|
var i = this.tags[this.tags.length - 1];
|
|
76
95
|
if (this.isSpeedy) {
|
|
77
|
-
var o =
|
|
96
|
+
var o = kr(i);
|
|
78
97
|
try {
|
|
79
98
|
o.insertRule(r, o.cssRules.length);
|
|
80
99
|
} catch {
|
|
@@ -88,66 +107,66 @@ var Tt = /* @__PURE__ */ (function() {
|
|
|
88
107
|
return (i = r.parentNode) == null ? void 0 : i.removeChild(r);
|
|
89
108
|
}), this.tags = [], this.ctr = 0;
|
|
90
109
|
}, e;
|
|
91
|
-
})(), S = "-ms-",
|
|
92
|
-
function
|
|
93
|
-
return
|
|
110
|
+
})(), S = "-ms-", te = "-moz-", p = "-webkit-", Pe = "comm", de = "rule", he = "decl", Cr = "@import", De = "@keyframes", xr = "@layer", Nr = Math.abs, se = String.fromCharCode, yr = Object.assign;
|
|
111
|
+
function Lr(e, t) {
|
|
112
|
+
return I(e, 0) ^ 45 ? (((t << 2 ^ I(e, 0)) << 2 ^ I(e, 1)) << 2 ^ I(e, 2)) << 2 ^ I(e, 3) : 0;
|
|
94
113
|
}
|
|
95
|
-
function
|
|
114
|
+
function Be(e) {
|
|
96
115
|
return e.trim();
|
|
97
116
|
}
|
|
98
|
-
function
|
|
117
|
+
function Ir(e, t) {
|
|
99
118
|
return (e = t.exec(e)) ? e[0] : e;
|
|
100
119
|
}
|
|
101
|
-
function
|
|
120
|
+
function m(e, t, s) {
|
|
102
121
|
return e.replace(t, s);
|
|
103
122
|
}
|
|
104
|
-
function
|
|
123
|
+
function ae(e, t) {
|
|
105
124
|
return e.indexOf(t);
|
|
106
125
|
}
|
|
107
|
-
function
|
|
126
|
+
function I(e, t) {
|
|
108
127
|
return e.charCodeAt(t) | 0;
|
|
109
128
|
}
|
|
110
129
|
function q(e, t, s) {
|
|
111
130
|
return e.slice(t, s);
|
|
112
131
|
}
|
|
113
|
-
function
|
|
132
|
+
function T(e) {
|
|
114
133
|
return e.length;
|
|
115
134
|
}
|
|
116
|
-
function
|
|
135
|
+
function ue(e) {
|
|
117
136
|
return e.length;
|
|
118
137
|
}
|
|
119
|
-
function
|
|
138
|
+
function Y(e, t) {
|
|
120
139
|
return t.push(e), e;
|
|
121
140
|
}
|
|
122
|
-
function
|
|
141
|
+
function Er(e, t) {
|
|
123
142
|
return e.map(t).join("");
|
|
124
143
|
}
|
|
125
|
-
var
|
|
126
|
-
function
|
|
127
|
-
return { value: e, root: t, parent: s, type: r, props: i, children: o, line:
|
|
144
|
+
var oe = 1, V = 1, Fe = 0, R = 0, N = 0, _ = "";
|
|
145
|
+
function ie(e, t, s, r, i, o, h) {
|
|
146
|
+
return { value: e, root: t, parent: s, type: r, props: i, children: o, line: oe, column: V, length: h, return: "" };
|
|
128
147
|
}
|
|
129
|
-
function
|
|
130
|
-
return
|
|
148
|
+
function z(e, t) {
|
|
149
|
+
return yr(ie("", null, null, "", null, null, 0), e, { length: -e.length }, t);
|
|
131
150
|
}
|
|
132
|
-
function
|
|
133
|
-
return
|
|
151
|
+
function Sr() {
|
|
152
|
+
return N;
|
|
134
153
|
}
|
|
135
|
-
function
|
|
136
|
-
return
|
|
154
|
+
function Mr() {
|
|
155
|
+
return N = R > 0 ? I(_, --R) : 0, V--, N === 10 && (V = 1, oe--), N;
|
|
137
156
|
}
|
|
138
157
|
function $() {
|
|
139
|
-
return
|
|
158
|
+
return N = R < Fe ? I(_, R++) : 0, V++, N === 10 && (V = 1, oe++), N;
|
|
140
159
|
}
|
|
141
|
-
function
|
|
142
|
-
return
|
|
160
|
+
function D() {
|
|
161
|
+
return I(_, R);
|
|
143
162
|
}
|
|
144
|
-
function
|
|
163
|
+
function X() {
|
|
145
164
|
return R;
|
|
146
165
|
}
|
|
147
|
-
function
|
|
148
|
-
return q(
|
|
166
|
+
function Z(e, t) {
|
|
167
|
+
return q(_, e, t);
|
|
149
168
|
}
|
|
150
|
-
function
|
|
169
|
+
function U(e) {
|
|
151
170
|
switch (e) {
|
|
152
171
|
// \0 \t \n \r \s whitespace token
|
|
153
172
|
case 0:
|
|
@@ -185,39 +204,39 @@ function G(e) {
|
|
|
185
204
|
}
|
|
186
205
|
return 0;
|
|
187
206
|
}
|
|
188
|
-
function
|
|
189
|
-
return
|
|
207
|
+
function We(e) {
|
|
208
|
+
return oe = V = 1, Fe = T(_ = e), R = 0, [];
|
|
190
209
|
}
|
|
191
|
-
function
|
|
192
|
-
return
|
|
210
|
+
function He(e) {
|
|
211
|
+
return _ = "", e;
|
|
193
212
|
}
|
|
194
213
|
function K(e) {
|
|
195
|
-
return
|
|
214
|
+
return Be(Z(R - 1, le(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
196
215
|
}
|
|
197
|
-
function
|
|
198
|
-
for (; (
|
|
216
|
+
function Rr(e) {
|
|
217
|
+
for (; (N = D()) && N < 33; )
|
|
199
218
|
$();
|
|
200
|
-
return
|
|
219
|
+
return U(e) > 2 || U(N) > 3 ? "" : " ";
|
|
201
220
|
}
|
|
202
|
-
function
|
|
203
|
-
for (; --t && $() && !(
|
|
221
|
+
function $r(e, t) {
|
|
222
|
+
for (; --t && $() && !(N < 48 || N > 102 || N > 57 && N < 65 || N > 70 && N < 97); )
|
|
204
223
|
;
|
|
205
|
-
return
|
|
224
|
+
return Z(e, X() + (t < 6 && D() == 32 && $() == 32));
|
|
206
225
|
}
|
|
207
|
-
function
|
|
226
|
+
function le(e) {
|
|
208
227
|
for (; $(); )
|
|
209
|
-
switch (
|
|
228
|
+
switch (N) {
|
|
210
229
|
// ] ) " '
|
|
211
230
|
case e:
|
|
212
231
|
return R;
|
|
213
232
|
// " '
|
|
214
233
|
case 34:
|
|
215
234
|
case 39:
|
|
216
|
-
e !== 34 && e !== 39 &&
|
|
235
|
+
e !== 34 && e !== 39 && le(N);
|
|
217
236
|
break;
|
|
218
237
|
// (
|
|
219
238
|
case 40:
|
|
220
|
-
e === 41 &&
|
|
239
|
+
e === 41 && le(e);
|
|
221
240
|
break;
|
|
222
241
|
// \
|
|
223
242
|
case 92:
|
|
@@ -226,27 +245,27 @@ function ae(e) {
|
|
|
226
245
|
}
|
|
227
246
|
return R;
|
|
228
247
|
}
|
|
229
|
-
function
|
|
230
|
-
for (; $() && e +
|
|
231
|
-
if (e +
|
|
248
|
+
function Ar(e, t) {
|
|
249
|
+
for (; $() && e + N !== 57; )
|
|
250
|
+
if (e + N === 84 && D() === 47)
|
|
232
251
|
break;
|
|
233
|
-
return "/*" +
|
|
252
|
+
return "/*" + Z(t, R - 1) + "*" + se(e === 47 ? e : $());
|
|
234
253
|
}
|
|
235
|
-
function
|
|
236
|
-
for (; !
|
|
254
|
+
function jr(e) {
|
|
255
|
+
for (; !U(D()); )
|
|
237
256
|
$();
|
|
238
|
-
return
|
|
257
|
+
return Z(e, R);
|
|
239
258
|
}
|
|
240
|
-
function
|
|
241
|
-
return
|
|
259
|
+
function Tr(e) {
|
|
260
|
+
return He(J("", null, null, null, [""], e = We(e), 0, [0], e));
|
|
242
261
|
}
|
|
243
|
-
function
|
|
244
|
-
for (var b = 0, l = 0, a = h, f = 0, v = 0, w = 0, d = 1,
|
|
262
|
+
function J(e, t, s, r, i, o, h, c, u) {
|
|
263
|
+
for (var b = 0, l = 0, a = h, f = 0, v = 0, w = 0, d = 1, y = 1, g = 1, x = 0, M = "", Q = i, B = o, j = r, C = M; y; )
|
|
245
264
|
switch (w = x, x = $()) {
|
|
246
265
|
// (
|
|
247
266
|
case 40:
|
|
248
|
-
if (w != 108 &&
|
|
249
|
-
|
|
267
|
+
if (w != 108 && I(C, a - 1) == 58) {
|
|
268
|
+
ae(C += m(K(x), "&", "&\f"), "&\f") != -1 && (g = -1);
|
|
250
269
|
break;
|
|
251
270
|
}
|
|
252
271
|
// " ' [
|
|
@@ -260,18 +279,18 @@ function X(e, t, s, r, i, o, h, c, u) {
|
|
|
260
279
|
case 10:
|
|
261
280
|
case 13:
|
|
262
281
|
case 32:
|
|
263
|
-
C +=
|
|
282
|
+
C += Rr(w);
|
|
264
283
|
break;
|
|
265
284
|
// \
|
|
266
285
|
case 92:
|
|
267
|
-
C +=
|
|
286
|
+
C += $r(X() - 1, 7);
|
|
268
287
|
continue;
|
|
269
288
|
// /
|
|
270
289
|
case 47:
|
|
271
|
-
switch (
|
|
290
|
+
switch (D()) {
|
|
272
291
|
case 42:
|
|
273
292
|
case 47:
|
|
274
|
-
|
|
293
|
+
Y(Pr(Ar($(), X()), t, s), u);
|
|
275
294
|
break;
|
|
276
295
|
default:
|
|
277
296
|
C += "/";
|
|
@@ -279,7 +298,7 @@ function X(e, t, s, r, i, o, h, c, u) {
|
|
|
279
298
|
break;
|
|
280
299
|
// {
|
|
281
300
|
case 123 * d:
|
|
282
|
-
c[b++] =
|
|
301
|
+
c[b++] = T(C) * g;
|
|
283
302
|
// } ; \0
|
|
284
303
|
case 125 * d:
|
|
285
304
|
case 59:
|
|
@@ -288,151 +307,151 @@ function X(e, t, s, r, i, o, h, c, u) {
|
|
|
288
307
|
// \0 }
|
|
289
308
|
case 0:
|
|
290
309
|
case 125:
|
|
291
|
-
|
|
310
|
+
y = 0;
|
|
292
311
|
// ;
|
|
293
312
|
case 59 + l:
|
|
294
|
-
|
|
313
|
+
g == -1 && (C = m(C, /\f/g, "")), v > 0 && T(C) - a && Y(v > 32 ? Ce(C + ";", r, s, a - 1) : Ce(m(C, " ", "") + ";", r, s, a - 2), u);
|
|
295
314
|
break;
|
|
296
315
|
// @ ;
|
|
297
316
|
case 59:
|
|
298
317
|
C += ";";
|
|
299
318
|
// { rule/at-rule
|
|
300
319
|
default:
|
|
301
|
-
if (
|
|
320
|
+
if (Y(j = be(C, t, s, b, l, i, c, M, Q = [], B = [], a), o), x === 123)
|
|
302
321
|
if (l === 0)
|
|
303
|
-
|
|
322
|
+
J(C, t, j, j, Q, o, a, c, B);
|
|
304
323
|
else
|
|
305
|
-
switch (f === 99 &&
|
|
324
|
+
switch (f === 99 && I(C, 3) === 110 ? 100 : f) {
|
|
306
325
|
// d l m s
|
|
307
326
|
case 100:
|
|
308
327
|
case 108:
|
|
309
328
|
case 109:
|
|
310
329
|
case 115:
|
|
311
|
-
|
|
330
|
+
J(e, j, j, r && Y(be(e, j, j, 0, 0, i, c, M, i, Q = [], a), B), i, B, a, c, r ? Q : B);
|
|
312
331
|
break;
|
|
313
332
|
default:
|
|
314
|
-
|
|
333
|
+
J(C, j, j, j, [""], B, 0, c, B);
|
|
315
334
|
}
|
|
316
335
|
}
|
|
317
|
-
b = l = v = 0, d =
|
|
336
|
+
b = l = v = 0, d = g = 1, M = C = "", a = h;
|
|
318
337
|
break;
|
|
319
338
|
// :
|
|
320
339
|
case 58:
|
|
321
|
-
a = 1 +
|
|
340
|
+
a = 1 + T(C), v = w;
|
|
322
341
|
default:
|
|
323
342
|
if (d < 1) {
|
|
324
343
|
if (x == 123)
|
|
325
344
|
--d;
|
|
326
|
-
else if (x == 125 && d++ == 0 &&
|
|
345
|
+
else if (x == 125 && d++ == 0 && Mr() == 125)
|
|
327
346
|
continue;
|
|
328
347
|
}
|
|
329
|
-
switch (C +=
|
|
348
|
+
switch (C += se(x), x * d) {
|
|
330
349
|
// &
|
|
331
350
|
case 38:
|
|
332
|
-
|
|
351
|
+
g = l > 0 ? 1 : (C += "\f", -1);
|
|
333
352
|
break;
|
|
334
353
|
// ,
|
|
335
354
|
case 44:
|
|
336
|
-
c[b++] = (
|
|
355
|
+
c[b++] = (T(C) - 1) * g, g = 1;
|
|
337
356
|
break;
|
|
338
357
|
// @
|
|
339
358
|
case 64:
|
|
340
|
-
|
|
359
|
+
D() === 45 && (C += K($())), f = D(), l = a = T(M = C += jr(X())), x++;
|
|
341
360
|
break;
|
|
342
361
|
// -
|
|
343
362
|
case 45:
|
|
344
|
-
w === 45 &&
|
|
363
|
+
w === 45 && T(C) == 2 && (d = 0);
|
|
345
364
|
}
|
|
346
365
|
}
|
|
347
366
|
return o;
|
|
348
367
|
}
|
|
349
|
-
function
|
|
350
|
-
for (var a = i - 1, f = i === 0 ? o : [""], v =
|
|
351
|
-
for (var
|
|
352
|
-
(M =
|
|
353
|
-
return
|
|
368
|
+
function be(e, t, s, r, i, o, h, c, u, b, l) {
|
|
369
|
+
for (var a = i - 1, f = i === 0 ? o : [""], v = ue(f), w = 0, d = 0, y = 0; w < r; ++w)
|
|
370
|
+
for (var g = 0, x = q(e, a + 1, a = Nr(d = h[w])), M = e; g < v; ++g)
|
|
371
|
+
(M = Be(d > 0 ? f[g] + " " + x : m(x, /&\f/g, f[g]))) && (u[y++] = M);
|
|
372
|
+
return ie(e, t, s, i === 0 ? de : c, u, b, l);
|
|
354
373
|
}
|
|
355
|
-
function
|
|
356
|
-
return
|
|
374
|
+
function Pr(e, t, s) {
|
|
375
|
+
return ie(e, t, s, Pe, se(Sr()), q(e, 2, -2), 0);
|
|
357
376
|
}
|
|
358
|
-
function
|
|
359
|
-
return
|
|
377
|
+
function Ce(e, t, s, r) {
|
|
378
|
+
return ie(e, t, s, he, q(e, 0, r), q(e, r + 1, -1), r);
|
|
360
379
|
}
|
|
361
|
-
function
|
|
362
|
-
for (var s = "", r =
|
|
380
|
+
function H(e, t) {
|
|
381
|
+
for (var s = "", r = ue(e), i = 0; i < r; i++)
|
|
363
382
|
s += t(e[i], i, e, t) || "";
|
|
364
383
|
return s;
|
|
365
384
|
}
|
|
366
|
-
function
|
|
385
|
+
function Dr(e, t, s, r) {
|
|
367
386
|
switch (e.type) {
|
|
368
|
-
case
|
|
387
|
+
case xr:
|
|
369
388
|
if (e.children.length) break;
|
|
370
|
-
case
|
|
371
|
-
case
|
|
389
|
+
case Cr:
|
|
390
|
+
case he:
|
|
372
391
|
return e.return = e.return || e.value;
|
|
373
|
-
case
|
|
392
|
+
case Pe:
|
|
374
393
|
return "";
|
|
375
|
-
case
|
|
376
|
-
return e.return = e.value + "{" +
|
|
377
|
-
case
|
|
394
|
+
case De:
|
|
395
|
+
return e.return = e.value + "{" + H(e.children, r) + "}";
|
|
396
|
+
case de:
|
|
378
397
|
e.value = e.props.join(",");
|
|
379
398
|
}
|
|
380
|
-
return
|
|
399
|
+
return T(s = H(e.children, r)) ? e.return = e.value + "{" + s + "}" : "";
|
|
381
400
|
}
|
|
382
|
-
function
|
|
383
|
-
var t =
|
|
401
|
+
function Br(e) {
|
|
402
|
+
var t = ue(e);
|
|
384
403
|
return function(s, r, i, o) {
|
|
385
404
|
for (var h = "", c = 0; c < t; c++)
|
|
386
405
|
h += e[c](s, r, i, o) || "";
|
|
387
406
|
return h;
|
|
388
407
|
};
|
|
389
408
|
}
|
|
390
|
-
function
|
|
409
|
+
function Fr(e) {
|
|
391
410
|
return function(t) {
|
|
392
411
|
t.root || (t = t.return) && e(t);
|
|
393
412
|
};
|
|
394
413
|
}
|
|
395
|
-
var
|
|
396
|
-
for (var i = 0, o = 0; i = o, o =
|
|
414
|
+
var Wr = function(t, s, r) {
|
|
415
|
+
for (var i = 0, o = 0; i = o, o = D(), i === 38 && o === 12 && (s[r] = 1), !U(o); )
|
|
397
416
|
$();
|
|
398
|
-
return
|
|
399
|
-
},
|
|
417
|
+
return Z(t, R);
|
|
418
|
+
}, Hr = function(t, s) {
|
|
400
419
|
var r = -1, i = 44;
|
|
401
420
|
do
|
|
402
|
-
switch (
|
|
421
|
+
switch (U(i)) {
|
|
403
422
|
case 0:
|
|
404
|
-
i === 38 &&
|
|
423
|
+
i === 38 && D() === 12 && (s[r] = 1), t[r] += Wr(R - 1, s, r);
|
|
405
424
|
break;
|
|
406
425
|
case 2:
|
|
407
426
|
t[r] += K(i);
|
|
408
427
|
break;
|
|
409
428
|
case 4:
|
|
410
429
|
if (i === 44) {
|
|
411
|
-
t[++r] =
|
|
430
|
+
t[++r] = D() === 58 ? "&\f" : "", s[r] = t[r].length;
|
|
412
431
|
break;
|
|
413
432
|
}
|
|
414
433
|
// fallthrough
|
|
415
434
|
default:
|
|
416
|
-
t[r] +=
|
|
435
|
+
t[r] += se(i);
|
|
417
436
|
}
|
|
418
437
|
while (i = $());
|
|
419
438
|
return t;
|
|
420
|
-
},
|
|
421
|
-
return
|
|
422
|
-
},
|
|
439
|
+
}, Or = function(t, s) {
|
|
440
|
+
return He(Hr(We(t), s));
|
|
441
|
+
}, xe = /* @__PURE__ */ new WeakMap(), Vr = function(t) {
|
|
423
442
|
if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
|
|
424
443
|
// negative .length indicates that this rule has been already prefixed
|
|
425
444
|
t.length < 1)) {
|
|
426
445
|
for (var s = t.value, r = t.parent, i = t.column === r.column && t.line === r.line; r.type !== "rule"; )
|
|
427
446
|
if (r = r.parent, !r) return;
|
|
428
|
-
if (!(t.props.length === 1 && s.charCodeAt(0) !== 58 && !
|
|
429
|
-
|
|
430
|
-
for (var o = [], h =
|
|
447
|
+
if (!(t.props.length === 1 && s.charCodeAt(0) !== 58 && !xe.get(r)) && !i) {
|
|
448
|
+
xe.set(t, !0);
|
|
449
|
+
for (var o = [], h = Or(s, o), c = r.props, u = 0, b = 0; u < h.length; u++)
|
|
431
450
|
for (var l = 0; l < c.length; l++, b++)
|
|
432
451
|
t.props[b] = o[u] ? h[u].replace(/&\f/g, c[l]) : c[l] + " " + h[u];
|
|
433
452
|
}
|
|
434
453
|
}
|
|
435
|
-
},
|
|
454
|
+
}, _r = function(t) {
|
|
436
455
|
if (t.type === "decl") {
|
|
437
456
|
var s = t.value;
|
|
438
457
|
// charcode for l
|
|
@@ -440,8 +459,8 @@ var er = function(t, s, r) {
|
|
|
440
459
|
s.charCodeAt(2) === 98 && (t.return = "", t.value = "");
|
|
441
460
|
}
|
|
442
461
|
};
|
|
443
|
-
function
|
|
444
|
-
switch (
|
|
462
|
+
function Oe(e, t) {
|
|
463
|
+
switch (Lr(e, t)) {
|
|
445
464
|
// color-adjust
|
|
446
465
|
case 5103:
|
|
447
466
|
return p + "print-" + e + e;
|
|
@@ -481,7 +500,7 @@ function Fe(e, t) {
|
|
|
481
500
|
case 4810:
|
|
482
501
|
case 6968:
|
|
483
502
|
case 2756:
|
|
484
|
-
return p + e +
|
|
503
|
+
return p + e + te + e + S + e + e;
|
|
485
504
|
// flex, flex-direction
|
|
486
505
|
case 6828:
|
|
487
506
|
case 4268:
|
|
@@ -491,41 +510,41 @@ function Fe(e, t) {
|
|
|
491
510
|
return p + e + S + "flex-" + e + e;
|
|
492
511
|
// align-items
|
|
493
512
|
case 5187:
|
|
494
|
-
return p + e +
|
|
513
|
+
return p + e + m(e, /(\w+).+(:[^]+)/, p + "box-$1$2" + S + "flex-$1$2") + e;
|
|
495
514
|
// align-self
|
|
496
515
|
case 5443:
|
|
497
|
-
return p + e + S + "flex-item-" +
|
|
516
|
+
return p + e + S + "flex-item-" + m(e, /flex-|-self/, "") + e;
|
|
498
517
|
// align-content
|
|
499
518
|
case 4675:
|
|
500
|
-
return p + e + S + "flex-line-pack" +
|
|
519
|
+
return p + e + S + "flex-line-pack" + m(e, /align-content|flex-|-self/, "") + e;
|
|
501
520
|
// flex-shrink
|
|
502
521
|
case 5548:
|
|
503
|
-
return p + e + S +
|
|
522
|
+
return p + e + S + m(e, "shrink", "negative") + e;
|
|
504
523
|
// flex-basis
|
|
505
524
|
case 5292:
|
|
506
|
-
return p + e + S +
|
|
525
|
+
return p + e + S + m(e, "basis", "preferred-size") + e;
|
|
507
526
|
// flex-grow
|
|
508
527
|
case 6060:
|
|
509
|
-
return p + "box-" +
|
|
528
|
+
return p + "box-" + m(e, "-grow", "") + p + e + S + m(e, "grow", "positive") + e;
|
|
510
529
|
// transition
|
|
511
530
|
case 4554:
|
|
512
|
-
return p +
|
|
531
|
+
return p + m(e, /([^-])(transform)/g, "$1" + p + "$2") + e;
|
|
513
532
|
// cursor
|
|
514
533
|
case 6187:
|
|
515
|
-
return
|
|
534
|
+
return m(m(m(e, /(zoom-|grab)/, p + "$1"), /(image-set)/, p + "$1"), e, "") + e;
|
|
516
535
|
// background, background-image
|
|
517
536
|
case 5495:
|
|
518
537
|
case 3959:
|
|
519
|
-
return
|
|
538
|
+
return m(e, /(image-set\([^]*)/, p + "$1$`$1");
|
|
520
539
|
// justify-content
|
|
521
540
|
case 4968:
|
|
522
|
-
return
|
|
541
|
+
return m(m(e, /(.+:)(flex-)?(.*)/, p + "box-pack:$3" + S + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + p + e + e;
|
|
523
542
|
// (margin|padding)-inline-(start|end)
|
|
524
543
|
case 4095:
|
|
525
544
|
case 3583:
|
|
526
545
|
case 4068:
|
|
527
546
|
case 2532:
|
|
528
|
-
return
|
|
547
|
+
return m(e, /(.+)-inline(.+)/, p + "$1$2") + e;
|
|
529
548
|
// (min|max)?(width|height|inline-size|block-size)
|
|
530
549
|
case 8116:
|
|
531
550
|
case 7059:
|
|
@@ -539,114 +558,114 @@ function Fe(e, t) {
|
|
|
539
558
|
case 5789:
|
|
540
559
|
case 5021:
|
|
541
560
|
case 4765:
|
|
542
|
-
if (
|
|
561
|
+
if (T(e) - 1 - t > 6) switch (I(e, t + 1)) {
|
|
543
562
|
// (m)ax-content, (m)in-content
|
|
544
563
|
case 109:
|
|
545
|
-
if (
|
|
564
|
+
if (I(e, t + 4) !== 45) break;
|
|
546
565
|
// (f)ill-available, (f)it-content
|
|
547
566
|
case 102:
|
|
548
|
-
return
|
|
567
|
+
return m(e, /(.+:)(.+)-([^]+)/, "$1" + p + "$2-$3$1" + te + (I(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
|
|
549
568
|
// (s)tretch
|
|
550
569
|
case 115:
|
|
551
|
-
return ~
|
|
570
|
+
return ~ae(e, "stretch") ? Oe(m(e, "stretch", "fill-available"), t) + e : e;
|
|
552
571
|
}
|
|
553
572
|
break;
|
|
554
573
|
// position: sticky
|
|
555
574
|
case 4949:
|
|
556
|
-
if (
|
|
575
|
+
if (I(e, t + 1) !== 115) break;
|
|
557
576
|
// display: (flex|inline-flex)
|
|
558
577
|
case 6444:
|
|
559
|
-
switch (
|
|
578
|
+
switch (I(e, T(e) - 3 - (~ae(e, "!important") && 10))) {
|
|
560
579
|
// stic(k)y
|
|
561
580
|
case 107:
|
|
562
|
-
return
|
|
581
|
+
return m(e, ":", ":" + p) + e;
|
|
563
582
|
// (inline-)?fl(e)x
|
|
564
583
|
case 101:
|
|
565
|
-
return
|
|
584
|
+
return m(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + p + (I(e, 14) === 45 ? "inline-" : "") + "box$3$1" + p + "$2$3$1" + S + "$2box$3") + e;
|
|
566
585
|
}
|
|
567
586
|
break;
|
|
568
587
|
// writing-mode
|
|
569
588
|
case 5936:
|
|
570
|
-
switch (
|
|
589
|
+
switch (I(e, t + 11)) {
|
|
571
590
|
// vertical-l(r)
|
|
572
591
|
case 114:
|
|
573
|
-
return p + e + S +
|
|
592
|
+
return p + e + S + m(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
|
|
574
593
|
// vertical-r(l)
|
|
575
594
|
case 108:
|
|
576
|
-
return p + e + S +
|
|
595
|
+
return p + e + S + m(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
|
|
577
596
|
// horizontal(-)tb
|
|
578
597
|
case 45:
|
|
579
|
-
return p + e + S +
|
|
598
|
+
return p + e + S + m(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
|
|
580
599
|
}
|
|
581
600
|
return p + e + S + e + e;
|
|
582
601
|
}
|
|
583
602
|
return e;
|
|
584
603
|
}
|
|
585
|
-
var
|
|
604
|
+
var zr = function(t, s, r, i) {
|
|
586
605
|
if (t.length > -1 && !t.return) switch (t.type) {
|
|
587
|
-
case
|
|
588
|
-
t.return =
|
|
606
|
+
case he:
|
|
607
|
+
t.return = Oe(t.value, t.length);
|
|
589
608
|
break;
|
|
590
|
-
case
|
|
591
|
-
return
|
|
592
|
-
value:
|
|
609
|
+
case De:
|
|
610
|
+
return H([z(t, {
|
|
611
|
+
value: m(t.value, "@", "@" + p)
|
|
593
612
|
})], i);
|
|
594
|
-
case
|
|
595
|
-
if (t.length) return
|
|
596
|
-
switch (
|
|
613
|
+
case de:
|
|
614
|
+
if (t.length) return Er(t.props, function(o) {
|
|
615
|
+
switch (Ir(o, /(::plac\w+|:read-\w+)/)) {
|
|
597
616
|
// :read-(only|write)
|
|
598
617
|
case ":read-only":
|
|
599
618
|
case ":read-write":
|
|
600
|
-
return
|
|
601
|
-
props: [
|
|
619
|
+
return H([z(t, {
|
|
620
|
+
props: [m(o, /:(read-\w+)/, ":" + te + "$1")]
|
|
602
621
|
})], i);
|
|
603
622
|
// :placeholder
|
|
604
623
|
case "::placeholder":
|
|
605
|
-
return
|
|
606
|
-
props: [
|
|
607
|
-
}),
|
|
608
|
-
props: [
|
|
609
|
-
}),
|
|
610
|
-
props: [
|
|
624
|
+
return H([z(t, {
|
|
625
|
+
props: [m(o, /:(plac\w+)/, ":" + p + "input-$1")]
|
|
626
|
+
}), z(t, {
|
|
627
|
+
props: [m(o, /:(plac\w+)/, ":" + te + "$1")]
|
|
628
|
+
}), z(t, {
|
|
629
|
+
props: [m(o, /:(plac\w+)/, S + "input-$1")]
|
|
611
630
|
})], i);
|
|
612
631
|
}
|
|
613
632
|
return "";
|
|
614
633
|
});
|
|
615
634
|
}
|
|
616
|
-
},
|
|
635
|
+
}, Gr = [zr], qr = function(t) {
|
|
617
636
|
var s = t.key;
|
|
618
637
|
if (s === "css") {
|
|
619
638
|
var r = document.querySelectorAll("style[data-emotion]:not([data-s])");
|
|
620
639
|
Array.prototype.forEach.call(r, function(d) {
|
|
621
|
-
var
|
|
622
|
-
|
|
640
|
+
var y = d.getAttribute("data-emotion");
|
|
641
|
+
y.indexOf(" ") !== -1 && (document.head.appendChild(d), d.setAttribute("data-s", ""));
|
|
623
642
|
});
|
|
624
643
|
}
|
|
625
|
-
var i = t.stylisPlugins ||
|
|
644
|
+
var i = t.stylisPlugins || Gr, o = {}, h, c = [];
|
|
626
645
|
h = t.container || document.head, Array.prototype.forEach.call(
|
|
627
646
|
// this means we will ignore elements which don't have a space in them which
|
|
628
647
|
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
629
648
|
document.querySelectorAll('style[data-emotion^="' + s + ' "]'),
|
|
630
649
|
function(d) {
|
|
631
|
-
for (var
|
|
632
|
-
o[
|
|
650
|
+
for (var y = d.getAttribute("data-emotion").split(" "), g = 1; g < y.length; g++)
|
|
651
|
+
o[y[g]] = !0;
|
|
633
652
|
c.push(d);
|
|
634
653
|
}
|
|
635
654
|
);
|
|
636
|
-
var u, b = [
|
|
655
|
+
var u, b = [Vr, _r];
|
|
637
656
|
{
|
|
638
|
-
var l, a = [
|
|
657
|
+
var l, a = [Dr, Fr(function(d) {
|
|
639
658
|
l.insert(d);
|
|
640
|
-
})], f =
|
|
641
|
-
return
|
|
659
|
+
})], f = Br(b.concat(i, a)), v = function(y) {
|
|
660
|
+
return H(Tr(y), f);
|
|
642
661
|
};
|
|
643
|
-
u = function(
|
|
644
|
-
l = x, v(
|
|
662
|
+
u = function(y, g, x, M) {
|
|
663
|
+
l = x, v(y ? y + "{" + g.styles + "}" : g.styles), M && (w.inserted[g.name] = !0);
|
|
645
664
|
};
|
|
646
665
|
}
|
|
647
666
|
var w = {
|
|
648
667
|
key: s,
|
|
649
|
-
sheet: new
|
|
668
|
+
sheet: new br({
|
|
650
669
|
key: s,
|
|
651
670
|
container: h,
|
|
652
671
|
nonce: t.nonce,
|
|
@@ -661,16 +680,16 @@ var or = function(t, s, r, i) {
|
|
|
661
680
|
};
|
|
662
681
|
return w.sheet.hydrate(c), w;
|
|
663
682
|
};
|
|
664
|
-
const
|
|
665
|
-
const r =
|
|
683
|
+
const Ve = ({ children: e, viewport: t, containerProps: s }) => {
|
|
684
|
+
const r = Se(null), { theme: i } = re(), [o, h] = O({
|
|
666
685
|
width: 0,
|
|
667
686
|
height: 0
|
|
668
687
|
});
|
|
669
|
-
|
|
670
|
-
const w =
|
|
671
|
-
const
|
|
672
|
-
if (!
|
|
673
|
-
const { width: x, height: M } =
|
|
688
|
+
G(() => {
|
|
689
|
+
const w = bt((y) => {
|
|
690
|
+
const g = y.at(0)?.target;
|
|
691
|
+
if (!g) return;
|
|
692
|
+
const { width: x, height: M } = g.getBoundingClientRect();
|
|
674
693
|
h(() => ({
|
|
675
694
|
width: x,
|
|
676
695
|
height: M
|
|
@@ -678,8 +697,8 @@ const He = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
678
697
|
}, 200), d = new ResizeObserver(w);
|
|
679
698
|
return r.current && d.observe(r.current), () => d.disconnect();
|
|
680
699
|
}, []);
|
|
681
|
-
const c =
|
|
682
|
-
return /* @__PURE__ */ n("div", { ...s, className:
|
|
700
|
+
const c = pe(t?.width) ? t.width(o.width) : t?.width, u = pe(t?.height) ? t.height(o.height) : t?.height, b = me(c) ? o.width / c : 1, l = me(u) ? o.height / u : 1, a = Math.min(b, l, 1), f = (u ?? o.height / a) || 0, v = (c ?? o.width / a) || 0;
|
|
701
|
+
return /* @__PURE__ */ n("div", { ...s, className: P("tw:w-full tw:h-full tw:p-2 tw:bg-ic-ink-1s", s?.className), children: /* @__PURE__ */ n("div", { className: P("tw:w-full tw:h-full tw:overflow-hidden tw:relative"), ref: r, children: /* @__PURE__ */ n(
|
|
683
702
|
"div",
|
|
684
703
|
{
|
|
685
704
|
style: {
|
|
@@ -691,20 +710,20 @@ const He = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
691
710
|
},
|
|
692
711
|
className: "tw:absolute",
|
|
693
712
|
children: /* @__PURE__ */ n(
|
|
694
|
-
|
|
713
|
+
ar,
|
|
695
714
|
{
|
|
696
715
|
sandbox: "allow-same-origin allow-scripts allow-popups allow-presentation",
|
|
697
716
|
allow: "autoplay; encrypted-media",
|
|
698
717
|
width: c ?? "100%",
|
|
699
718
|
height: u ?? "100%",
|
|
700
|
-
children: /* @__PURE__ */ n(
|
|
719
|
+
children: /* @__PURE__ */ n(Ur, { theme: i, children: e })
|
|
701
720
|
}
|
|
702
721
|
)
|
|
703
722
|
}
|
|
704
723
|
) }) });
|
|
705
|
-
},
|
|
706
|
-
const { document: s, window: r } =
|
|
707
|
-
|
|
724
|
+
}, Ur = ({ children: e, theme: t }) => {
|
|
725
|
+
const { document: s, window: r } = lr(), [i, o] = O(!1), h = Se(window.customElements.define.bind(window.customElements));
|
|
726
|
+
G(() => {
|
|
708
727
|
const u = h.current;
|
|
709
728
|
return r && (window.customElements.define = function(b, l, a) {
|
|
710
729
|
window.customElements.get(b) || r.customElements.define(b, l, a), u(b, l, a);
|
|
@@ -712,13 +731,13 @@ const He = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
712
731
|
window.customElements.define = u;
|
|
713
732
|
};
|
|
714
733
|
}, [s, r]);
|
|
715
|
-
const c =
|
|
734
|
+
const c = qr({
|
|
716
735
|
key: "css",
|
|
717
736
|
container: s?.head
|
|
718
737
|
});
|
|
719
|
-
return i ? /* @__PURE__ */ n(ye, { children: /* @__PURE__ */ k(
|
|
738
|
+
return i ? /* @__PURE__ */ n(ye, { children: /* @__PURE__ */ k(dr, { value: c, children: [
|
|
720
739
|
/* @__PURE__ */ n(
|
|
721
|
-
|
|
740
|
+
hr,
|
|
722
741
|
{
|
|
723
742
|
styles: {
|
|
724
743
|
".frame-content": {
|
|
@@ -727,41 +746,60 @@ const He = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
727
746
|
minHeight: "100vh",
|
|
728
747
|
justifyContent: "center"
|
|
729
748
|
},
|
|
730
|
-
[`& *[${
|
|
749
|
+
[`& *[${we.DATA_NODE_DROP_TARGET}=${fe.True}]`]: {
|
|
731
750
|
outlineWidth: 1,
|
|
732
751
|
outlineStyle: "solid",
|
|
733
752
|
outlineOffset: -1,
|
|
734
753
|
outlineColor: "green"
|
|
735
754
|
},
|
|
736
|
-
[`& *[${
|
|
755
|
+
[`& *[${we.DATA_NODE_DROP_TARGET_ERROR}=${fe.True}]`]: {
|
|
737
756
|
outlineColor: "red"
|
|
738
757
|
}
|
|
739
758
|
}
|
|
740
759
|
}
|
|
741
760
|
),
|
|
742
|
-
/* @__PURE__ */ n(
|
|
761
|
+
/* @__PURE__ */ n(Qt, { theme: t, children: e })
|
|
743
762
|
] }) }) : null;
|
|
744
|
-
},
|
|
745
|
-
const { id: t, renderer: s } =
|
|
746
|
-
resolvedId:
|
|
747
|
-
renderer:
|
|
763
|
+
}, Zr = ({ render: e }) => {
|
|
764
|
+
const { id: t, renderer: s } = gt((o) => ({
|
|
765
|
+
resolvedId: Ge(o),
|
|
766
|
+
renderer: ze(o).renderer
|
|
748
767
|
})), {
|
|
749
768
|
queryParams: { mode: r }
|
|
750
|
-
} =
|
|
751
|
-
isActive: h.getEvent("selected").contains(t) && t !==
|
|
769
|
+
} = ne(), { isActive: i } = F((o, h) => ({
|
|
770
|
+
isActive: h.getEvent("selected").contains(t) && t !== W
|
|
752
771
|
}));
|
|
753
|
-
return s ?
|
|
754
|
-
i && r === "full" && /* @__PURE__ */ k(
|
|
755
|
-
/* @__PURE__ */ n(
|
|
756
|
-
/* @__PURE__ */ n(
|
|
772
|
+
return s ? Me(s, { render: e }) : /* @__PURE__ */ k(ee, { children: [
|
|
773
|
+
i && r === "full" && /* @__PURE__ */ k(ee, { children: [
|
|
774
|
+
/* @__PURE__ */ n(Ct, {}),
|
|
775
|
+
/* @__PURE__ */ n(xt, {})
|
|
757
776
|
] }),
|
|
758
777
|
e
|
|
759
778
|
] });
|
|
760
|
-
}
|
|
779
|
+
};
|
|
780
|
+
L(qe, { inspector: yt, renderer: Nt });
|
|
781
|
+
L(Ue, { inspector: It, renderer: Lt });
|
|
782
|
+
L(Ze, { inspector: Et });
|
|
783
|
+
L(Qe, { inspector: St });
|
|
784
|
+
L(Ye, { inspector: Mt });
|
|
785
|
+
L(Xe, { inspector: Rt });
|
|
786
|
+
L(Ke, { inspector: $t });
|
|
787
|
+
L(Je, { inspector: At });
|
|
788
|
+
L(et, { inspector: jt });
|
|
789
|
+
L(tt, { inspector: Tt });
|
|
790
|
+
L(rt, { inspector: Pt });
|
|
791
|
+
L(nt, { inspector: Dt });
|
|
792
|
+
L(st, { inspector: Bt });
|
|
793
|
+
L(ot, { inspector: Ft });
|
|
794
|
+
L(it, { inspector: Wt });
|
|
795
|
+
L(ct, { inspector: Ht });
|
|
796
|
+
L(at, { inspector: Ot });
|
|
797
|
+
L(lt, { inspector: Vt });
|
|
798
|
+
const Ne = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
761
799
|
<path d="M8 5L5 8L8 11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
762
800
|
<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"/>
|
|
763
801
|
</svg>
|
|
764
|
-
`,
|
|
802
|
+
`, Qr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
765
803
|
<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"/>
|
|
766
804
|
<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"/>
|
|
767
805
|
<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"/>
|
|
@@ -769,15 +807,15 @@ const He = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
769
807
|
<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"/>
|
|
770
808
|
<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"/>
|
|
771
809
|
</svg>
|
|
772
|
-
`,
|
|
810
|
+
`, Yr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
773
811
|
<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"/>
|
|
774
812
|
<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"/>
|
|
775
813
|
</svg>
|
|
776
|
-
`,
|
|
814
|
+
`, Xr = '<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>', Kr = () => {
|
|
777
815
|
const {
|
|
778
816
|
queryParams: { mode: e, screen: t },
|
|
779
817
|
setQueryParams: s
|
|
780
|
-
} =
|
|
818
|
+
} = ne(), [r, i] = O(!1), { handlers: o } = re(), { actions: h, canRedo: c, canUndo: u, query: b } = F((w, d) => ({
|
|
781
819
|
enabled: w.options.enabled,
|
|
782
820
|
canUndo: d.history.canUndo(),
|
|
783
821
|
canRedo: d.history.canRedo()
|
|
@@ -800,62 +838,62 @@ const He = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
800
838
|
return /* @__PURE__ */ k(
|
|
801
839
|
"div",
|
|
802
840
|
{
|
|
803
|
-
className:
|
|
841
|
+
className: P(
|
|
804
842
|
"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"
|
|
805
843
|
),
|
|
806
844
|
children: [
|
|
807
845
|
/* @__PURE__ */ k("div", { className: "tw:flex tw:items-center tw:gap-3", children: [
|
|
808
|
-
/* @__PURE__ */ n(
|
|
809
|
-
/* @__PURE__ */ n(
|
|
846
|
+
/* @__PURE__ */ n(A, { size: "32", onClick: f, children: /* @__PURE__ */ n(E, { source: Xr }) }),
|
|
847
|
+
/* @__PURE__ */ n(_t, { onSelectionChange: l, value: t, children: zt.map(({ icon: w, size: d }) => /* @__PURE__ */ n(A, { value: d, children: /* @__PURE__ */ n(E, { source: w }) }, d)) }),
|
|
810
848
|
/* @__PURE__ */ k("div", { className: "tw:p-1 tw:flex tw:items-center tw:gap-2 tw:bg-ic-white-1s tw:rounded-lg", children: [
|
|
811
|
-
/* @__PURE__ */ n(
|
|
812
|
-
/* @__PURE__ */ n(
|
|
849
|
+
/* @__PURE__ */ n(A, { onClick: h.history.undo, disabled: !u, children: /* @__PURE__ */ n(E, { source: Ne }) }),
|
|
850
|
+
/* @__PURE__ */ n(A, { onClick: h.history.redo, disabled: !c, children: /* @__PURE__ */ n(E, { source: Ne, className: "tw:rotate-180" }) })
|
|
813
851
|
] }),
|
|
814
|
-
/* @__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(
|
|
852
|
+
/* @__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(A, { onClick: a, children: /* @__PURE__ */ n(E, { source: e === "full" ? Yr : Qr }) }) })
|
|
815
853
|
] }),
|
|
816
|
-
/* @__PURE__ */ n("div", { className: "tw:flex tw:items-center tw:gap-3", children: /* @__PURE__ */ n(
|
|
854
|
+
/* @__PURE__ */ n("div", { className: "tw:flex tw:items-center tw:gap-3", children: /* @__PURE__ */ n(Le, { isLoading: r, onClick: v, children: "Save" }) })
|
|
817
855
|
]
|
|
818
856
|
}
|
|
819
857
|
);
|
|
820
|
-
},
|
|
858
|
+
}, Jr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
821
859
|
<path d="M20 19.9997L16.3763 16.376" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
822
860
|
<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"/>
|
|
823
861
|
</svg>
|
|
824
|
-
`,
|
|
862
|
+
`, en = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
825
863
|
<path d="M15 6L9 12L15 18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
826
864
|
</svg>
|
|
827
|
-
`,
|
|
828
|
-
/* @__PURE__ */ n("div", { className: "tw:flex tw:items-center tw:p-2 tw:gap-3", children: /* @__PURE__ */ n(
|
|
829
|
-
/* @__PURE__ */ k(
|
|
830
|
-
/* @__PURE__ */ k(
|
|
831
|
-
/* @__PURE__ */ n(
|
|
832
|
-
/* @__PURE__ */ n(
|
|
865
|
+
`, tn = ({ elements: e, sections: t }) => /* @__PURE__ */ k("div", { className: "tw:flex tw:flex-col tw:h-full", children: [
|
|
866
|
+
/* @__PURE__ */ n("div", { className: "tw:flex tw:items-center tw:p-2 tw:gap-3", children: /* @__PURE__ */ n(Ie, { fullWidth: !0, placeholder: "Search...", prefix: /* @__PURE__ */ n(E, { source: Jr }) }) }),
|
|
867
|
+
/* @__PURE__ */ k(Gt, { defaultIndex: 1, className: "tw:flex-1 tw:overflow-hidden tw:border-t tw:border-ic-white-1s", children: [
|
|
868
|
+
/* @__PURE__ */ k(qt, { children: [
|
|
869
|
+
/* @__PURE__ */ n(ge, { className: "tw:flex-1", children: "Sections" }),
|
|
870
|
+
/* @__PURE__ */ n(ge, { className: "tw:flex-1", children: "Elements" })
|
|
833
871
|
] }),
|
|
834
|
-
/* @__PURE__ */ k(
|
|
835
|
-
/* @__PURE__ */ n(
|
|
836
|
-
/* @__PURE__ */ n(
|
|
872
|
+
/* @__PURE__ */ k(Ut, { className: "tw:flex-1 tw:overflow-hidden", children: [
|
|
873
|
+
/* @__PURE__ */ n(ke, { children: /* @__PURE__ */ n(ce, { className: "tw:h-full tw:py-2", children: t?.map((s, r) => /* @__PURE__ */ n(nn, { group: s }, r)) }) }),
|
|
874
|
+
/* @__PURE__ */ n(ke, { className: "tw:h-full tw:overflow-hidden", children: /* @__PURE__ */ n(ce, { className: "tw:h-full tw:py-2", children: e?.map((s, r) => /* @__PURE__ */ n(rn, { group: s }, r)) }) })
|
|
837
875
|
] })
|
|
838
876
|
] })
|
|
839
|
-
] }),
|
|
840
|
-
const [t, s] =
|
|
877
|
+
] }), rn = ({ group: e }) => {
|
|
878
|
+
const [t, s] = Te(!0), { actions: r, connectors: i } = F();
|
|
841
879
|
return /* @__PURE__ */ k("div", { className: "tw:flex tw:flex-col tw:text-sm", children: [
|
|
842
|
-
/* @__PURE__ */ n(
|
|
880
|
+
/* @__PURE__ */ n(Le, { onClick: s, className: "tw:bg-transparent", children: /* @__PURE__ */ k("div", { className: "tw:flex tw:items-center tw:justify-between tw:flex-1 tw:text-sm", children: [
|
|
843
881
|
e.name,
|
|
844
882
|
/* @__PURE__ */ n(
|
|
845
883
|
E,
|
|
846
884
|
{
|
|
847
|
-
source:
|
|
848
|
-
className:
|
|
885
|
+
source: Re,
|
|
886
|
+
className: P("tw:transition-transform", {
|
|
849
887
|
"tw:rotate-180": !t
|
|
850
888
|
})
|
|
851
889
|
}
|
|
852
890
|
)
|
|
853
891
|
] }) }),
|
|
854
|
-
/* @__PURE__ */ n(
|
|
892
|
+
/* @__PURE__ */ n(dt, { 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__ */ k("div", { className: "tw:space-y-1", children: [
|
|
855
893
|
/* @__PURE__ */ n(
|
|
856
894
|
"div",
|
|
857
895
|
{
|
|
858
|
-
className:
|
|
896
|
+
className: P(
|
|
859
897
|
"tw:bg-ic-ink-6s tw:relative tw:transition-transform tw:rounded-lg tw:hover:scale-105 tw:pointer-events-auto tw:aspect-video tw:overflow-hidden",
|
|
860
898
|
"tw:cursor-grabbing tw:flex tw:flex-col tw:gap-1 tw:items-center tw:justify-center tw:p-1 tw:opacity-100 tw:text-ic-white-5s",
|
|
861
899
|
"tw:after:absolute tw:after:inset-0 tw:after:content-empty tw:after:bg-ic-white-1s"
|
|
@@ -867,40 +905,40 @@ const He = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
867
905
|
}
|
|
868
906
|
});
|
|
869
907
|
},
|
|
870
|
-
children: /* @__PURE__ */ n(
|
|
908
|
+
children: /* @__PURE__ */ n(ht, { width: void 0, height: void 0, ...o.icon })
|
|
871
909
|
}
|
|
872
910
|
),
|
|
873
911
|
/* @__PURE__ */ n("p", { className: "tw:text-xs tw:mx-auto tw:text-center", children: o.name })
|
|
874
912
|
] }, h)) }) })
|
|
875
913
|
] });
|
|
876
|
-
},
|
|
877
|
-
const [t, s] =
|
|
914
|
+
}, nn = ({ group: e }) => {
|
|
915
|
+
const [t, s] = O(!1), { refs: r, floatingStyles: i, context: o } = Kt({
|
|
878
916
|
open: t,
|
|
879
917
|
onOpenChange: s,
|
|
880
918
|
placement: "right-start",
|
|
881
919
|
middleware: [
|
|
882
|
-
|
|
883
|
-
|
|
920
|
+
er(),
|
|
921
|
+
tr({
|
|
884
922
|
apply({ elements: f }) {
|
|
885
923
|
const v = {
|
|
886
|
-
zIndex: `${
|
|
924
|
+
zIndex: `${Yt}`,
|
|
887
925
|
height: `${f.reference.getBoundingClientRect().height}px`
|
|
888
926
|
};
|
|
889
927
|
Object.assign(f.floating.style, v);
|
|
890
928
|
}
|
|
891
929
|
})
|
|
892
930
|
],
|
|
893
|
-
whileElementsMounted:
|
|
931
|
+
whileElementsMounted: Jt
|
|
894
932
|
});
|
|
895
|
-
|
|
933
|
+
G(() => {
|
|
896
934
|
r.setPositionReference(document.querySelector("aside"));
|
|
897
935
|
}, [r]);
|
|
898
|
-
const h =
|
|
899
|
-
return /* @__PURE__ */ k(
|
|
936
|
+
const h = rr(o, { move: !1, handleClose: nr() }), c = sr(o), u = or(o), b = ir(o), { getReferenceProps: l, getFloatingProps: a } = cr([h, c, u, b]);
|
|
937
|
+
return /* @__PURE__ */ k(ee, { children: [
|
|
900
938
|
/* @__PURE__ */ k(
|
|
901
939
|
"button",
|
|
902
940
|
{
|
|
903
|
-
className:
|
|
941
|
+
className: P(
|
|
904
942
|
"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",
|
|
905
943
|
"tw:hover:text-ic-white-6s tw:hover:bg-ic-white-1s tw:hover:font-medium"
|
|
906
944
|
),
|
|
@@ -909,29 +947,29 @@ const He = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
909
947
|
children: [
|
|
910
948
|
/* @__PURE__ */ n("div", { className: "tw:bg-ic-white-1s tw:p-1.5 tw:rounded-lg", children: /* @__PURE__ */ n(E, { ...e.icon }) }),
|
|
911
949
|
/* @__PURE__ */ n("span", { className: "tw:flex-1 tw:truncate", children: e.name }),
|
|
912
|
-
/* @__PURE__ */ n(E, { className: "tw:rotate-180", source:
|
|
950
|
+
/* @__PURE__ */ n(E, { className: "tw:rotate-180", source: en })
|
|
913
951
|
]
|
|
914
952
|
}
|
|
915
953
|
),
|
|
916
|
-
t && /* @__PURE__ */ n(
|
|
954
|
+
t && /* @__PURE__ */ n(je, { children: /* @__PURE__ */ n("div", { style: i, ...a(), ref: r.setFloating, children: /* @__PURE__ */ k("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: [
|
|
917
955
|
/* @__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 }) }),
|
|
918
|
-
/* @__PURE__ */ n(
|
|
956
|
+
/* @__PURE__ */ n(ce, { className: "tw:flex-1 tw:px-3", children: /* @__PURE__ */ n("div", { className: "tw:flex tw:flex-col tw:gap-4", children: e.sections.map((f, v) => /* @__PURE__ */ ur(sn, { ...f, key: v })) }) })
|
|
919
957
|
] }) }) })
|
|
920
958
|
] });
|
|
921
|
-
},
|
|
922
|
-
const [, r] =
|
|
959
|
+
}, sn = ({ template: e, autoFocus: t = !0, onCreate: s }) => {
|
|
960
|
+
const [, r] = O(!1), i = re(), { actions: o, connectors: h, resolver: c, query: u } = F((l) => ({
|
|
923
961
|
resolver: l.options.resolver
|
|
924
|
-
})), b =
|
|
962
|
+
})), b = O(() => {
|
|
925
963
|
const l = typeof e == "function" ? e() : e;
|
|
926
964
|
let a;
|
|
927
965
|
"rootNodeId" in l ? a = l : a = u.parseReactElement(l).toNodeTree();
|
|
928
966
|
const { rootNodeId: f, nodes: v } = a, w = {};
|
|
929
|
-
return Object.entries(v).forEach(([d,
|
|
930
|
-
const
|
|
967
|
+
return Object.entries(v).forEach(([d, y]) => {
|
|
968
|
+
const g = kt(y.data, c), x = d === f ? W : d;
|
|
931
969
|
w[x] = {
|
|
932
|
-
...
|
|
933
|
-
parent:
|
|
934
|
-
nodes:
|
|
970
|
+
...g,
|
|
971
|
+
parent: g.parent === f ? W : g.parent,
|
|
972
|
+
nodes: g.nodes?.map((M) => M === f ? W : M)
|
|
935
973
|
};
|
|
936
974
|
}), w;
|
|
937
975
|
})[0];
|
|
@@ -949,20 +987,20 @@ const He = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
949
987
|
onDragStart: () => r(!0),
|
|
950
988
|
onDragEnd: () => r(!1),
|
|
951
989
|
children: /* @__PURE__ */ n("div", { className: "tw:relative tw:aspect-video tw:rounded-lg tw:overflow-hidden tw:w-60 tw:pointer-events-none", children: /* @__PURE__ */ n("div", { className: "tw:absolute tw:inset-0", children: /* @__PURE__ */ n(
|
|
952
|
-
|
|
990
|
+
Ve,
|
|
953
991
|
{
|
|
954
992
|
containerProps: {
|
|
955
993
|
style: {
|
|
956
994
|
backgroundColor: i.theme.palette.background.default
|
|
957
995
|
}
|
|
958
996
|
},
|
|
959
|
-
viewport: { width:
|
|
960
|
-
children: /* @__PURE__ */ n(
|
|
997
|
+
viewport: { width: Xt.md.minWidth },
|
|
998
|
+
children: /* @__PURE__ */ n($e, { resolver: c, children: /* @__PURE__ */ n(Ae, { data: b }) })
|
|
961
999
|
}
|
|
962
1000
|
) }) })
|
|
963
1001
|
}
|
|
964
1002
|
);
|
|
965
|
-
},
|
|
1003
|
+
}, on = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
966
1004
|
<path d="M12.5 2H9.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
967
1005
|
<path d="M2 9.5V12.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
968
1006
|
<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"/>
|
|
@@ -973,39 +1011,39 @@ const He = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
973
1011
|
<path d="M2 17V18C2 19.105 2.895 20 4 20H5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
974
1012
|
<path d="M20 5V4C20 2.895 19.105 2 18 2H17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
975
1013
|
</svg>
|
|
976
|
-
`,
|
|
1014
|
+
`, cn = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
977
1015
|
<circle cx="6.49771" cy="5.49762" r="2.50104" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
978
1016
|
<circle cx="6.49771" cy="18.503" r="2.50104" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
979
1017
|
<path d="M6.49771 7.99854V16.0019" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
980
1018
|
<circle cx="17.5023" cy="13.0006" r="2.50104" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
981
1019
|
<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"/>
|
|
982
1020
|
</svg>
|
|
983
|
-
`,
|
|
984
|
-
const { query: t, actions: s } =
|
|
1021
|
+
`, an = (e) => {
|
|
1022
|
+
const { query: t, actions: s } = F(), {
|
|
985
1023
|
id: r,
|
|
986
1024
|
expanded: i,
|
|
987
1025
|
actions: o,
|
|
988
1026
|
displayName: h,
|
|
989
1027
|
children: c,
|
|
990
1028
|
depth: u
|
|
991
|
-
} =
|
|
1029
|
+
} = fr((v) => ({
|
|
992
1030
|
expanded: v.expanded,
|
|
993
|
-
displayName:
|
|
994
|
-
})), { selected: b, selectable: l } =
|
|
1031
|
+
displayName: Ee(t.node(v.id).get())
|
|
1032
|
+
})), { selected: b, selectable: l } = F((v, w) => {
|
|
995
1033
|
const d = w.node(r).get();
|
|
996
1034
|
return {
|
|
997
1035
|
selected: w.getEvent("selected").contains(r),
|
|
998
1036
|
nodeDOM: d.dom,
|
|
999
|
-
selectable:
|
|
1037
|
+
selectable: ft(d)
|
|
1000
1038
|
};
|
|
1001
1039
|
});
|
|
1002
|
-
|
|
1003
|
-
r ===
|
|
1004
|
-
}, [o, r]),
|
|
1040
|
+
G(() => {
|
|
1041
|
+
r === W && o.setExpandedState(!0);
|
|
1042
|
+
}, [o, r]), G(() => {
|
|
1005
1043
|
if (c.length === 0) return;
|
|
1006
1044
|
c.some((w) => {
|
|
1007
1045
|
const d = t.getEvent("selected").all();
|
|
1008
|
-
return d.includes(w) ? !0 : t.node(w).descendants(!0).some((
|
|
1046
|
+
return d.includes(w) ? !0 : t.node(w).descendants(!0).some((g) => d.includes(g));
|
|
1009
1047
|
}) && o.setExpandedState(!0);
|
|
1010
1048
|
}, [c, o, t]);
|
|
1011
1049
|
const a = () => {
|
|
@@ -1025,29 +1063,29 @@ const He = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
1025
1063
|
style: {
|
|
1026
1064
|
paddingLeft: Math.max(0, u - 1) * 16
|
|
1027
1065
|
},
|
|
1028
|
-
className:
|
|
1066
|
+
className: P(
|
|
1029
1067
|
"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",
|
|
1030
1068
|
{
|
|
1031
|
-
hidden: r ===
|
|
1069
|
+
hidden: r === W,
|
|
1032
1070
|
"tw:bg-ic-black-7s": b,
|
|
1033
1071
|
"tw:pointer-events-none": !l
|
|
1034
1072
|
}
|
|
1035
1073
|
),
|
|
1036
1074
|
children: [
|
|
1037
|
-
c.length ? /* @__PURE__ */ n(
|
|
1075
|
+
c.length ? /* @__PURE__ */ n(A, { className: "tw:pointer-events-auto", onClick: f, children: /* @__PURE__ */ n(
|
|
1038
1076
|
E,
|
|
1039
1077
|
{
|
|
1040
|
-
className:
|
|
1078
|
+
className: P("tw:transition-transform tw:-rotate-90", {
|
|
1041
1079
|
"tw:rotate-0": i
|
|
1042
1080
|
}),
|
|
1043
1081
|
size: 16,
|
|
1044
|
-
source:
|
|
1082
|
+
source: Re
|
|
1045
1083
|
}
|
|
1046
|
-
) }) : /* @__PURE__ */ n("div", { className: "tw:p-1", children: /* @__PURE__ */ n(E, { size: 16, source:
|
|
1084
|
+
) }) : /* @__PURE__ */ n("div", { className: "tw:p-1", children: /* @__PURE__ */ n(E, { size: 16, source: cn }) }),
|
|
1047
1085
|
/* @__PURE__ */ n(
|
|
1048
1086
|
"span",
|
|
1049
1087
|
{
|
|
1050
|
-
className:
|
|
1088
|
+
className: P("tw:flex-1 tw:truncate", {
|
|
1051
1089
|
"tw:text-ic-white-3s": !l
|
|
1052
1090
|
}),
|
|
1053
1091
|
children: h
|
|
@@ -1060,12 +1098,12 @@ const He = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
1060
1098
|
]
|
|
1061
1099
|
}
|
|
1062
1100
|
);
|
|
1063
|
-
},
|
|
1064
|
-
const t =
|
|
1101
|
+
}, ln = ({ onClose: e }) => {
|
|
1102
|
+
const t = gr(), s = (r) => {
|
|
1065
1103
|
t.start(r);
|
|
1066
1104
|
};
|
|
1067
|
-
return /* @__PURE__ */ n(
|
|
1068
|
-
|
|
1105
|
+
return /* @__PURE__ */ n(je, { children: /* @__PURE__ */ k(
|
|
1106
|
+
ut.div,
|
|
1069
1107
|
{
|
|
1070
1108
|
drag: !0,
|
|
1071
1109
|
dragControls: t,
|
|
@@ -1080,35 +1118,35 @@ const He = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
1080
1118
|
className: "tw:py-2 tw:cursor-grab tw:flex tw:items-center tw:justify-between tw:px-4",
|
|
1081
1119
|
children: [
|
|
1082
1120
|
/* @__PURE__ */ k("div", { className: "tw:flex tw:items-center tw:gap-2", children: [
|
|
1083
|
-
/* @__PURE__ */ n(E, { source:
|
|
1121
|
+
/* @__PURE__ */ n(E, { source: on }),
|
|
1084
1122
|
/* @__PURE__ */ n("p", { className: "tw:text-sm tw:font-medium", children: "Layers" })
|
|
1085
1123
|
] }),
|
|
1086
|
-
/* @__PURE__ */ n(
|
|
1124
|
+
/* @__PURE__ */ n(A, { onClick: e, children: /* @__PURE__ */ n(E, { source: wt }) })
|
|
1087
1125
|
]
|
|
1088
1126
|
}
|
|
1089
1127
|
),
|
|
1090
|
-
/* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-auto tw:border-t tw:border-ic-white-1s tw:p-2", children: /* @__PURE__ */ n(
|
|
1128
|
+
/* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-auto tw:border-t tw:border-ic-white-1s tw:p-2", children: /* @__PURE__ */ n(wr, { renderLayer: an }) })
|
|
1091
1129
|
]
|
|
1092
1130
|
}
|
|
1093
1131
|
) });
|
|
1094
|
-
},
|
|
1132
|
+
}, dn = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1095
1133
|
<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"/>
|
|
1096
1134
|
<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"/>
|
|
1097
1135
|
<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"/>
|
|
1098
1136
|
</svg>
|
|
1099
|
-
`,
|
|
1137
|
+
`, hn = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1100
1138
|
<path d="M5 12H19" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1101
1139
|
<path d="M10 7L5 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1102
1140
|
<path d="M10 17L5 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1103
1141
|
</svg>
|
|
1104
|
-
`,
|
|
1105
|
-
const [t, s] =
|
|
1142
|
+
`, un = ({ insert: e }) => {
|
|
1143
|
+
const [t, s] = Te(!1), {
|
|
1106
1144
|
queryParams: {
|
|
1107
1145
|
action: r = "insert"
|
|
1108
1146
|
/* Insert */
|
|
1109
1147
|
},
|
|
1110
1148
|
setQueryParams: i
|
|
1111
|
-
} =
|
|
1149
|
+
} = ne(), { actions: o, isDeletable: h, focusedNode: c } = F((a, f) => {
|
|
1112
1150
|
const v = f.getEvent("selected").first(), w = v ? f.node(v) : null;
|
|
1113
1151
|
return {
|
|
1114
1152
|
enabled: a.options.enabled,
|
|
@@ -1125,12 +1163,12 @@ const He = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
1125
1163
|
action: f
|
|
1126
1164
|
}));
|
|
1127
1165
|
};
|
|
1128
|
-
return /* @__PURE__ */ k(
|
|
1166
|
+
return /* @__PURE__ */ k(ee, { children: [
|
|
1129
1167
|
/* @__PURE__ */ k("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: [
|
|
1130
1168
|
/* @__PURE__ */ k("div", { className: "tw:px-1 tw:flex tw:flex-col tw:gap-1", children: [
|
|
1131
1169
|
!!e && /* @__PURE__ */ k(ye, { children: [
|
|
1132
1170
|
/* @__PURE__ */ n(
|
|
1133
|
-
|
|
1171
|
+
A,
|
|
1134
1172
|
{
|
|
1135
1173
|
tooltip: {
|
|
1136
1174
|
content: "Insert",
|
|
@@ -1140,13 +1178,13 @@ const He = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
1140
1178
|
value: "insert",
|
|
1141
1179
|
className: "tw:relative",
|
|
1142
1180
|
size: "32",
|
|
1143
|
-
children: /* @__PURE__ */ n(E, { source:
|
|
1181
|
+
children: /* @__PURE__ */ n(E, { source: pt })
|
|
1144
1182
|
}
|
|
1145
1183
|
),
|
|
1146
1184
|
/* @__PURE__ */ n("hr", { className: "tw:border-ic-white-2s" })
|
|
1147
1185
|
] }),
|
|
1148
1186
|
/* @__PURE__ */ n(
|
|
1149
|
-
|
|
1187
|
+
A,
|
|
1150
1188
|
{
|
|
1151
1189
|
tooltip: {
|
|
1152
1190
|
content: "Layers",
|
|
@@ -1156,56 +1194,56 @@ const He = ({ children: e, viewport: t, containerProps: s }) => {
|
|
|
1156
1194
|
value: "layers",
|
|
1157
1195
|
className: "tw:relative",
|
|
1158
1196
|
size: "32",
|
|
1159
|
-
children: /* @__PURE__ */ n(E, { source:
|
|
1197
|
+
children: /* @__PURE__ */ n(E, { source: dn })
|
|
1160
1198
|
}
|
|
1161
1199
|
)
|
|
1162
1200
|
] }),
|
|
1163
1201
|
/* @__PURE__ */ k(
|
|
1164
1202
|
"div",
|
|
1165
1203
|
{
|
|
1166
|
-
className:
|
|
1204
|
+
className: P("tw:relative tw:flex tw:flex-col tw:border-l tw:border-ic-white-1s tw:w-72 tw:overflow-auto"),
|
|
1167
1205
|
children: [
|
|
1168
|
-
!c?.related.inspector && /* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-auto scrollbar", children: r === "insert" && !!e && /* @__PURE__ */ n(
|
|
1206
|
+
!c?.related.inspector && /* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-auto scrollbar", children: r === "insert" && !!e && /* @__PURE__ */ n(tn, { elements: e.elements, sections: e.sections }) }),
|
|
1169
1207
|
!!c?.related?.inspector && /* @__PURE__ */ k("div", { className: "tw:flex tw:flex-col tw:flex-1 tw:overflow-hidden", children: [
|
|
1170
1208
|
/* @__PURE__ */ k("div", { className: "tw:flex tw:items-center tw:gap-2 tw:px-2 tw:py-2", children: [
|
|
1171
|
-
/* @__PURE__ */ n(
|
|
1172
|
-
/* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-hidden", children: /* @__PURE__ */ n(
|
|
1173
|
-
h && /* @__PURE__ */ n(
|
|
1209
|
+
/* @__PURE__ */ n(A, { onClick: u, children: /* @__PURE__ */ n(E, { source: hn }) }),
|
|
1210
|
+
/* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-hidden", children: /* @__PURE__ */ n(Ie, { fullWidth: !0, value: Ee(c), size: "32" }) }),
|
|
1211
|
+
h && /* @__PURE__ */ n(A, { value: c.id, onClick: b, children: /* @__PURE__ */ n(E, { className: "tw:text-ic-red-4s", source: Zt }) })
|
|
1174
1212
|
] }),
|
|
1175
|
-
/* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-auto tw:border-t tw:border-ic-white-1s scrollbar-hidden", children: /* @__PURE__ */ n(
|
|
1213
|
+
/* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-auto tw:border-t tw:border-ic-white-1s scrollbar-hidden", children: /* @__PURE__ */ n(vt, { fallback: null, children: Me(c.related.inspector) }) })
|
|
1176
1214
|
] })
|
|
1177
1215
|
]
|
|
1178
1216
|
}
|
|
1179
1217
|
)
|
|
1180
1218
|
] }),
|
|
1181
|
-
t && /* @__PURE__ */ n(
|
|
1219
|
+
t && /* @__PURE__ */ n(ln, { onClose: s })
|
|
1182
1220
|
] });
|
|
1183
|
-
},
|
|
1221
|
+
}, zn = ({ theme: e, insert: t, resolver: s, handlers: r }) => {
|
|
1184
1222
|
const {
|
|
1185
1223
|
queryParams: { screen: i }
|
|
1186
|
-
} =
|
|
1187
|
-
return
|
|
1224
|
+
} = ne();
|
|
1225
|
+
return re({
|
|
1188
1226
|
theme: e,
|
|
1189
1227
|
handlers: r
|
|
1190
|
-
}), /* @__PURE__ */ n(
|
|
1191
|
-
/* @__PURE__ */ n(
|
|
1228
|
+
}), /* @__PURE__ */ n($e, { enabled: !0, onRender: Zr, resolver: s, children: /* @__PURE__ */ k("div", { className: "tw:flex tw:flex-col tw:w-screen tw:h-screen tw:bg-ic-ink-6s tw:text-ic-white-6s", children: [
|
|
1229
|
+
/* @__PURE__ */ n(Kr, {}),
|
|
1192
1230
|
/* @__PURE__ */ k("div", { className: "tw:flex-1 tw:overflow-hidden tw:flex", children: [
|
|
1193
|
-
/* @__PURE__ */ n(
|
|
1231
|
+
/* @__PURE__ */ n(un, { insert: t }),
|
|
1194
1232
|
/* @__PURE__ */ n(
|
|
1195
|
-
|
|
1233
|
+
Ve,
|
|
1196
1234
|
{
|
|
1197
1235
|
viewport: {
|
|
1198
|
-
width: (o) => i === "lg" ? Math.max(o,
|
|
1236
|
+
width: (o) => i === "lg" ? Math.max(o, ve[i]) : ve[i]
|
|
1199
1237
|
},
|
|
1200
|
-
children: /* @__PURE__ */ n(
|
|
1238
|
+
children: /* @__PURE__ */ n(Ae, { children: /* @__PURE__ */ n(mt, {}) })
|
|
1201
1239
|
}
|
|
1202
1240
|
)
|
|
1203
1241
|
] })
|
|
1204
1242
|
] }) });
|
|
1205
1243
|
};
|
|
1206
1244
|
export {
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1245
|
+
zn as Editor,
|
|
1246
|
+
re as useEditor,
|
|
1247
|
+
ne as useEditorQueryParams,
|
|
1248
|
+
Un as useEditorResponsive
|
|
1211
1249
|
};
|