@measured/puck 0.21.0-canary.7dca3a5a → 0.21.0-canary.8358d3e1

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.
Files changed (41) hide show
  1. package/dist/Editor-F2LSS6SE.css +403 -0
  2. package/dist/Editor-N46HUQEC.mjs +201 -0
  3. package/dist/Render-QEMDIDQC.css +101 -0
  4. package/dist/Render-Y567PGZ7.mjs +53 -0
  5. package/dist/chunk-3QHWXJEI.mjs +33 -0
  6. package/dist/chunk-7KY6RHEY.mjs +2230 -0
  7. package/dist/chunk-C2TVYIYC.mjs +415 -0
  8. package/dist/chunk-DCSQEDMK.mjs +194 -0
  9. package/dist/chunk-DJSH5REF.mjs +537 -0
  10. package/dist/chunk-DNF2EMM4.mjs +63 -0
  11. package/dist/chunk-FNWOH4R6.mjs +109 -0
  12. package/dist/chunk-GQKMOYLG.mjs +53 -0
  13. package/dist/chunk-K3V4LVUL.mjs +704 -0
  14. package/dist/{chunk-FKDVYRQW.mjs → chunk-N5XMZOMC.mjs} +5078 -7463
  15. package/dist/chunk-R6CVX2IY.mjs +103 -0
  16. package/dist/chunk-WUWXFMEM.mjs +11 -0
  17. package/dist/full-2GJTAAZE.css +301 -0
  18. package/dist/full-NLUNPJWS.mjs +90 -0
  19. package/dist/index.css +636 -758
  20. package/dist/index.d.mts +101 -20
  21. package/dist/index.d.ts +101 -20
  22. package/dist/index.js +7363 -4751
  23. package/dist/index.mjs +25 -15
  24. package/dist/loaded-EV34KGYJ.mjs +57 -0
  25. package/dist/loaded-HMSPJUZM.mjs +54 -0
  26. package/dist/loaded-RVWBFK7L.css +87 -0
  27. package/dist/loaded-ZXOU6S6R.mjs +54 -0
  28. package/dist/no-external.css +636 -758
  29. package/dist/no-external.d.mts +17 -2
  30. package/dist/no-external.d.ts +17 -2
  31. package/dist/no-external.js +7360 -4748
  32. package/dist/no-external.mjs +25 -15
  33. package/dist/rsc.css +101 -0
  34. package/dist/rsc.d.mts +17 -2
  35. package/dist/rsc.d.ts +17 -2
  36. package/dist/rsc.js +419 -34
  37. package/dist/rsc.mjs +16 -9
  38. package/dist/{walk-tree-DS1xB387.d.mts → walk-tree-Ja9bNCM9.d.mts} +216 -26
  39. package/dist/{walk-tree-DS1xB387.d.ts → walk-tree-Ja9bNCM9.d.ts} +216 -26
  40. package/package.json +23 -1
  41. package/dist/chunk-6SIKCDJJ.mjs +0 -967
@@ -0,0 +1,2230 @@
1
+ import {
2
+ defaultAppState,
3
+ defaultViewports,
4
+ getChanged,
5
+ resolveComponentData,
6
+ rootDroppableId,
7
+ setupZone,
8
+ walkAppState,
9
+ walkTree
10
+ } from "./chunk-DJSH5REF.mjs";
11
+ import {
12
+ __async,
13
+ __objRest,
14
+ __spreadProps,
15
+ __spreadValues,
16
+ get_class_name_factory_default,
17
+ init_react_import
18
+ } from "./chunk-DCSQEDMK.mjs";
19
+
20
+ // ../../node_modules/lucide-react/dist/esm/icons/align-left.js
21
+ init_react_import();
22
+
23
+ // ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
24
+ init_react_import();
25
+ import { forwardRef as forwardRef2, createElement as createElement2 } from "react";
26
+
27
+ // ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
28
+ init_react_import();
29
+ var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
30
+ var mergeClasses = (...classes) => classes.filter((className, index, array) => {
31
+ return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
32
+ }).join(" ").trim();
33
+
34
+ // ../../node_modules/lucide-react/dist/esm/Icon.js
35
+ init_react_import();
36
+ import { forwardRef, createElement } from "react";
37
+
38
+ // ../../node_modules/lucide-react/dist/esm/defaultAttributes.js
39
+ init_react_import();
40
+ var defaultAttributes = {
41
+ xmlns: "http://www.w3.org/2000/svg",
42
+ width: 24,
43
+ height: 24,
44
+ viewBox: "0 0 24 24",
45
+ fill: "none",
46
+ stroke: "currentColor",
47
+ strokeWidth: 2,
48
+ strokeLinecap: "round",
49
+ strokeLinejoin: "round"
50
+ };
51
+
52
+ // ../../node_modules/lucide-react/dist/esm/Icon.js
53
+ var Icon = forwardRef(
54
+ (_a, ref) => {
55
+ var _b = _a, {
56
+ color = "currentColor",
57
+ size = 24,
58
+ strokeWidth = 2,
59
+ absoluteStrokeWidth,
60
+ className = "",
61
+ children,
62
+ iconNode
63
+ } = _b, rest = __objRest(_b, [
64
+ "color",
65
+ "size",
66
+ "strokeWidth",
67
+ "absoluteStrokeWidth",
68
+ "className",
69
+ "children",
70
+ "iconNode"
71
+ ]);
72
+ return createElement(
73
+ "svg",
74
+ __spreadValues(__spreadProps(__spreadValues({
75
+ ref
76
+ }, defaultAttributes), {
77
+ width: size,
78
+ height: size,
79
+ stroke: color,
80
+ strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
81
+ className: mergeClasses("lucide", className)
82
+ }), rest),
83
+ [
84
+ ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
85
+ ...Array.isArray(children) ? children : [children]
86
+ ]
87
+ );
88
+ }
89
+ );
90
+
91
+ // ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
92
+ var createLucideIcon = (iconName, iconNode) => {
93
+ const Component = forwardRef2(
94
+ (_a, ref) => {
95
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
96
+ return createElement2(Icon, __spreadValues({
97
+ ref,
98
+ iconNode,
99
+ className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className)
100
+ }, props));
101
+ }
102
+ );
103
+ Component.displayName = `${iconName}`;
104
+ return Component;
105
+ };
106
+
107
+ // ../../node_modules/lucide-react/dist/esm/icons/align-left.js
108
+ var AlignLeft = createLucideIcon("AlignLeft", [
109
+ ["path", { d: "M15 12H3", key: "6jk70r" }],
110
+ ["path", { d: "M17 18H3", key: "1amg6g" }],
111
+ ["path", { d: "M21 6H3", key: "1jwq7v" }]
112
+ ]);
113
+
114
+ // ../../node_modules/lucide-react/dist/esm/icons/heading.js
115
+ init_react_import();
116
+ var Heading = createLucideIcon("Heading", [
117
+ ["path", { d: "M6 12h12", key: "8npq4p" }],
118
+ ["path", { d: "M6 20V4", key: "1w1bmo" }],
119
+ ["path", { d: "M18 20V4", key: "o2hl4u" }]
120
+ ]);
121
+
122
+ // ../../node_modules/lucide-react/dist/esm/icons/list.js
123
+ init_react_import();
124
+ var List = createLucideIcon("List", [
125
+ ["path", { d: "M3 12h.01", key: "nlz23k" }],
126
+ ["path", { d: "M3 18h.01", key: "1tta3j" }],
127
+ ["path", { d: "M3 6h.01", key: "1rqtza" }],
128
+ ["path", { d: "M8 12h13", key: "1za7za" }],
129
+ ["path", { d: "M8 18h13", key: "1lx6n3" }],
130
+ ["path", { d: "M8 6h13", key: "ik3vkj" }]
131
+ ]);
132
+
133
+ // ../../node_modules/lucide-react/dist/esm/lucide-react.js
134
+ init_react_import();
135
+
136
+ // ../../node_modules/lucide-react/dist/esm/icons/align-center.js
137
+ init_react_import();
138
+ var AlignCenter = createLucideIcon("AlignCenter", [
139
+ ["path", { d: "M17 12H7", key: "16if0g" }],
140
+ ["path", { d: "M19 18H5", key: "18s9l3" }],
141
+ ["path", { d: "M21 6H3", key: "1jwq7v" }]
142
+ ]);
143
+
144
+ // ../../node_modules/lucide-react/dist/esm/icons/align-justify.js
145
+ init_react_import();
146
+ var AlignJustify = createLucideIcon("AlignJustify", [
147
+ ["path", { d: "M3 12h18", key: "1i2n21" }],
148
+ ["path", { d: "M3 18h18", key: "1h113x" }],
149
+ ["path", { d: "M3 6h18", key: "d0wm0j" }]
150
+ ]);
151
+
152
+ // ../../node_modules/lucide-react/dist/esm/icons/align-right.js
153
+ init_react_import();
154
+ var AlignRight = createLucideIcon("AlignRight", [
155
+ ["path", { d: "M21 12H9", key: "dn1m92" }],
156
+ ["path", { d: "M21 18H7", key: "1ygte8" }],
157
+ ["path", { d: "M21 6H3", key: "1jwq7v" }]
158
+ ]);
159
+
160
+ // ../../node_modules/lucide-react/dist/esm/icons/bold.js
161
+ init_react_import();
162
+ var Bold = createLucideIcon("Bold", [
163
+ [
164
+ "path",
165
+ { d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8", key: "mg9rjx" }
166
+ ]
167
+ ]);
168
+
169
+ // ../../node_modules/lucide-react/dist/esm/icons/chevron-down.js
170
+ init_react_import();
171
+ var ChevronDown = createLucideIcon("ChevronDown", [
172
+ ["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
173
+ ]);
174
+
175
+ // ../../node_modules/lucide-react/dist/esm/icons/chevron-right.js
176
+ init_react_import();
177
+ var ChevronRight = createLucideIcon("ChevronRight", [
178
+ ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
179
+ ]);
180
+
181
+ // ../../node_modules/lucide-react/dist/esm/icons/chevron-up.js
182
+ init_react_import();
183
+ var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
184
+
185
+ // ../../node_modules/lucide-react/dist/esm/icons/circle-check-big.js
186
+ init_react_import();
187
+ var CircleCheckBig = createLucideIcon("CircleCheckBig", [
188
+ ["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
189
+ ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
190
+ ]);
191
+
192
+ // ../../node_modules/lucide-react/dist/esm/icons/code.js
193
+ init_react_import();
194
+ var Code = createLucideIcon("Code", [
195
+ ["polyline", { points: "16 18 22 12 16 6", key: "z7tu5w" }],
196
+ ["polyline", { points: "8 6 2 12 8 18", key: "1eg1df" }]
197
+ ]);
198
+
199
+ // ../../node_modules/lucide-react/dist/esm/icons/copy.js
200
+ init_react_import();
201
+ var Copy = createLucideIcon("Copy", [
202
+ ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
203
+ ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
204
+ ]);
205
+
206
+ // ../../node_modules/lucide-react/dist/esm/icons/corner-left-up.js
207
+ init_react_import();
208
+ var CornerLeftUp = createLucideIcon("CornerLeftUp", [
209
+ ["polyline", { points: "14 9 9 4 4 9", key: "m9oyvo" }],
210
+ ["path", { d: "M20 20h-7a4 4 0 0 1-4-4V4", key: "1blwi3" }]
211
+ ]);
212
+
213
+ // ../../node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.js
214
+ init_react_import();
215
+ var EllipsisVertical = createLucideIcon("EllipsisVertical", [
216
+ ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
217
+ ["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
218
+ ["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
219
+ ]);
220
+
221
+ // ../../node_modules/lucide-react/dist/esm/icons/globe.js
222
+ init_react_import();
223
+ var Globe = createLucideIcon("Globe", [
224
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
225
+ ["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
226
+ ["path", { d: "M2 12h20", key: "9i4pu4" }]
227
+ ]);
228
+
229
+ // ../../node_modules/lucide-react/dist/esm/icons/hash.js
230
+ init_react_import();
231
+ var Hash = createLucideIcon("Hash", [
232
+ ["line", { x1: "4", x2: "20", y1: "9", y2: "9", key: "4lhtct" }],
233
+ ["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }],
234
+ ["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }],
235
+ ["line", { x1: "16", x2: "14", y1: "3", y2: "21", key: "weycgp" }]
236
+ ]);
237
+
238
+ // ../../node_modules/lucide-react/dist/esm/icons/heading-1.js
239
+ init_react_import();
240
+ var Heading1 = createLucideIcon("Heading1", [
241
+ ["path", { d: "M4 12h8", key: "17cfdx" }],
242
+ ["path", { d: "M4 18V6", key: "1rz3zl" }],
243
+ ["path", { d: "M12 18V6", key: "zqpxq5" }],
244
+ ["path", { d: "m17 12 3-2v8", key: "1hhhft" }]
245
+ ]);
246
+
247
+ // ../../node_modules/lucide-react/dist/esm/icons/heading-2.js
248
+ init_react_import();
249
+ var Heading2 = createLucideIcon("Heading2", [
250
+ ["path", { d: "M4 12h8", key: "17cfdx" }],
251
+ ["path", { d: "M4 18V6", key: "1rz3zl" }],
252
+ ["path", { d: "M12 18V6", key: "zqpxq5" }],
253
+ ["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1", key: "9jr5yi" }]
254
+ ]);
255
+
256
+ // ../../node_modules/lucide-react/dist/esm/icons/heading-3.js
257
+ init_react_import();
258
+ var Heading3 = createLucideIcon("Heading3", [
259
+ ["path", { d: "M4 12h8", key: "17cfdx" }],
260
+ ["path", { d: "M4 18V6", key: "1rz3zl" }],
261
+ ["path", { d: "M12 18V6", key: "zqpxq5" }],
262
+ ["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2", key: "68ncm8" }],
263
+ ["path", { d: "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2", key: "1ejuhz" }]
264
+ ]);
265
+
266
+ // ../../node_modules/lucide-react/dist/esm/icons/heading-4.js
267
+ init_react_import();
268
+ var Heading4 = createLucideIcon("Heading4", [
269
+ ["path", { d: "M12 18V6", key: "zqpxq5" }],
270
+ ["path", { d: "M17 10v3a1 1 0 0 0 1 1h3", key: "tj5zdr" }],
271
+ ["path", { d: "M21 10v8", key: "1kdml4" }],
272
+ ["path", { d: "M4 12h8", key: "17cfdx" }],
273
+ ["path", { d: "M4 18V6", key: "1rz3zl" }]
274
+ ]);
275
+
276
+ // ../../node_modules/lucide-react/dist/esm/icons/heading-5.js
277
+ init_react_import();
278
+ var Heading5 = createLucideIcon("Heading5", [
279
+ ["path", { d: "M4 12h8", key: "17cfdx" }],
280
+ ["path", { d: "M4 18V6", key: "1rz3zl" }],
281
+ ["path", { d: "M12 18V6", key: "zqpxq5" }],
282
+ ["path", { d: "M17 13v-3h4", key: "1nvgqp" }],
283
+ [
284
+ "path",
285
+ { d: "M17 17.7c.4.2.8.3 1.3.3 1.5 0 2.7-1.1 2.7-2.5S19.8 13 18.3 13H17", key: "2nebdn" }
286
+ ]
287
+ ]);
288
+
289
+ // ../../node_modules/lucide-react/dist/esm/icons/heading-6.js
290
+ init_react_import();
291
+ var Heading6 = createLucideIcon("Heading6", [
292
+ ["path", { d: "M4 12h8", key: "17cfdx" }],
293
+ ["path", { d: "M4 18V6", key: "1rz3zl" }],
294
+ ["path", { d: "M12 18V6", key: "zqpxq5" }],
295
+ ["circle", { cx: "19", cy: "16", r: "2", key: "15mx69" }],
296
+ ["path", { d: "M20 10c-2 2-3 3.5-3 6", key: "f35dl0" }]
297
+ ]);
298
+
299
+ // ../../node_modules/lucide-react/dist/esm/icons/italic.js
300
+ init_react_import();
301
+ var Italic = createLucideIcon("Italic", [
302
+ ["line", { x1: "19", x2: "10", y1: "4", y2: "4", key: "15jd3p" }],
303
+ ["line", { x1: "14", x2: "5", y1: "20", y2: "20", key: "bu0au3" }],
304
+ ["line", { x1: "15", x2: "9", y1: "4", y2: "20", key: "uljnxc" }]
305
+ ]);
306
+
307
+ // ../../node_modules/lucide-react/dist/esm/icons/layers.js
308
+ init_react_import();
309
+ var Layers = createLucideIcon("Layers", [
310
+ [
311
+ "path",
312
+ {
313
+ d: "M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",
314
+ key: "zw3jo"
315
+ }
316
+ ],
317
+ [
318
+ "path",
319
+ {
320
+ d: "M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",
321
+ key: "1wduqc"
322
+ }
323
+ ],
324
+ [
325
+ "path",
326
+ {
327
+ d: "M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",
328
+ key: "kqbvx6"
329
+ }
330
+ ]
331
+ ]);
332
+
333
+ // ../../node_modules/lucide-react/dist/esm/icons/layout-grid.js
334
+ init_react_import();
335
+ var LayoutGrid = createLucideIcon("LayoutGrid", [
336
+ ["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
337
+ ["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
338
+ ["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }],
339
+ ["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }]
340
+ ]);
341
+
342
+ // ../../node_modules/lucide-react/dist/esm/icons/link.js
343
+ init_react_import();
344
+ var Link = createLucideIcon("Link", [
345
+ ["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
346
+ ["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
347
+ ]);
348
+
349
+ // ../../node_modules/lucide-react/dist/esm/icons/list-ordered.js
350
+ init_react_import();
351
+ var ListOrdered = createLucideIcon("ListOrdered", [
352
+ ["path", { d: "M10 12h11", key: "6m4ad9" }],
353
+ ["path", { d: "M10 18h11", key: "11hvi2" }],
354
+ ["path", { d: "M10 6h11", key: "c7qv1k" }],
355
+ ["path", { d: "M4 10h2", key: "16xx2s" }],
356
+ ["path", { d: "M4 6h1v4", key: "cnovpq" }],
357
+ ["path", { d: "M6 18H4c0-1 2-2 2-3s-1-1.5-2-1", key: "m9a95d" }]
358
+ ]);
359
+
360
+ // ../../node_modules/lucide-react/dist/esm/icons/lock-open.js
361
+ init_react_import();
362
+ var LockOpen = createLucideIcon("LockOpen", [
363
+ ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
364
+ ["path", { d: "M7 11V7a5 5 0 0 1 9.9-1", key: "1mm8w8" }]
365
+ ]);
366
+
367
+ // ../../node_modules/lucide-react/dist/esm/icons/lock.js
368
+ init_react_import();
369
+ var Lock = createLucideIcon("Lock", [
370
+ ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
371
+ ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
372
+ ]);
373
+
374
+ // ../../node_modules/lucide-react/dist/esm/icons/minus.js
375
+ init_react_import();
376
+ var Minus = createLucideIcon("Minus", [["path", { d: "M5 12h14", key: "1ays0h" }]]);
377
+
378
+ // ../../node_modules/lucide-react/dist/esm/icons/monitor.js
379
+ init_react_import();
380
+ var Monitor = createLucideIcon("Monitor", [
381
+ ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
382
+ ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
383
+ ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
384
+ ]);
385
+
386
+ // ../../node_modules/lucide-react/dist/esm/icons/panel-left.js
387
+ init_react_import();
388
+ var PanelLeft = createLucideIcon("PanelLeft", [
389
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
390
+ ["path", { d: "M9 3v18", key: "fh3hqa" }]
391
+ ]);
392
+
393
+ // ../../node_modules/lucide-react/dist/esm/icons/panel-right.js
394
+ init_react_import();
395
+ var PanelRight = createLucideIcon("PanelRight", [
396
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
397
+ ["path", { d: "M15 3v18", key: "14nvp0" }]
398
+ ]);
399
+
400
+ // ../../node_modules/lucide-react/dist/esm/icons/plus.js
401
+ init_react_import();
402
+ var Plus = createLucideIcon("Plus", [
403
+ ["path", { d: "M5 12h14", key: "1ays0h" }],
404
+ ["path", { d: "M12 5v14", key: "s699le" }]
405
+ ]);
406
+
407
+ // ../../node_modules/lucide-react/dist/esm/icons/quote.js
408
+ init_react_import();
409
+ var Quote = createLucideIcon("Quote", [
410
+ [
411
+ "path",
412
+ {
413
+ d: "M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",
414
+ key: "rib7q0"
415
+ }
416
+ ],
417
+ [
418
+ "path",
419
+ {
420
+ d: "M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",
421
+ key: "1ymkrd"
422
+ }
423
+ ]
424
+ ]);
425
+
426
+ // ../../node_modules/lucide-react/dist/esm/icons/redo-2.js
427
+ init_react_import();
428
+ var Redo2 = createLucideIcon("Redo2", [
429
+ ["path", { d: "m15 14 5-5-5-5", key: "12vg1m" }],
430
+ ["path", { d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13", key: "6uklza" }]
431
+ ]);
432
+
433
+ // ../../node_modules/lucide-react/dist/esm/icons/search.js
434
+ init_react_import();
435
+ var Search = createLucideIcon("Search", [
436
+ ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
437
+ ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
438
+ ]);
439
+
440
+ // ../../node_modules/lucide-react/dist/esm/icons/sliders-horizontal.js
441
+ init_react_import();
442
+ var SlidersHorizontal = createLucideIcon("SlidersHorizontal", [
443
+ ["line", { x1: "21", x2: "14", y1: "4", y2: "4", key: "obuewd" }],
444
+ ["line", { x1: "10", x2: "3", y1: "4", y2: "4", key: "1q6298" }],
445
+ ["line", { x1: "21", x2: "12", y1: "12", y2: "12", key: "1iu8h1" }],
446
+ ["line", { x1: "8", x2: "3", y1: "12", y2: "12", key: "ntss68" }],
447
+ ["line", { x1: "21", x2: "16", y1: "20", y2: "20", key: "14d8ph" }],
448
+ ["line", { x1: "12", x2: "3", y1: "20", y2: "20", key: "m0wm8r" }],
449
+ ["line", { x1: "14", x2: "14", y1: "2", y2: "6", key: "14e1ph" }],
450
+ ["line", { x1: "8", x2: "8", y1: "10", y2: "14", key: "1i6ji0" }],
451
+ ["line", { x1: "16", x2: "16", y1: "18", y2: "22", key: "1lctlv" }]
452
+ ]);
453
+
454
+ // ../../node_modules/lucide-react/dist/esm/icons/smartphone.js
455
+ init_react_import();
456
+ var Smartphone = createLucideIcon("Smartphone", [
457
+ ["rect", { width: "14", height: "20", x: "5", y: "2", rx: "2", ry: "2", key: "1yt0o3" }],
458
+ ["path", { d: "M12 18h.01", key: "mhygvu" }]
459
+ ]);
460
+
461
+ // ../../node_modules/lucide-react/dist/esm/icons/square-code.js
462
+ init_react_import();
463
+ var SquareCode = createLucideIcon("SquareCode", [
464
+ ["path", { d: "M10 9.5 8 12l2 2.5", key: "3mjy60" }],
465
+ ["path", { d: "m14 9.5 2 2.5-2 2.5", key: "1bir2l" }],
466
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
467
+ ]);
468
+
469
+ // ../../node_modules/lucide-react/dist/esm/icons/strikethrough.js
470
+ init_react_import();
471
+ var Strikethrough = createLucideIcon("Strikethrough", [
472
+ ["path", { d: "M16 4H9a3 3 0 0 0-2.83 4", key: "43sutm" }],
473
+ ["path", { d: "M14 12a4 4 0 0 1 0 8H6", key: "nlfj13" }],
474
+ ["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }]
475
+ ]);
476
+
477
+ // ../../node_modules/lucide-react/dist/esm/icons/tablet.js
478
+ init_react_import();
479
+ var Tablet = createLucideIcon("Tablet", [
480
+ ["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", ry: "2", key: "76otgf" }],
481
+ ["line", { x1: "12", x2: "12.01", y1: "18", y2: "18", key: "1dp563" }]
482
+ ]);
483
+
484
+ // ../../node_modules/lucide-react/dist/esm/icons/trash.js
485
+ init_react_import();
486
+ var Trash = createLucideIcon("Trash", [
487
+ ["path", { d: "M3 6h18", key: "d0wm0j" }],
488
+ ["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
489
+ ["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }]
490
+ ]);
491
+
492
+ // ../../node_modules/lucide-react/dist/esm/icons/type.js
493
+ init_react_import();
494
+ var Type = createLucideIcon("Type", [
495
+ ["polyline", { points: "4 7 4 4 20 4 20 7", key: "1nosan" }],
496
+ ["line", { x1: "9", x2: "15", y1: "20", y2: "20", key: "swin9y" }],
497
+ ["line", { x1: "12", x2: "12", y1: "4", y2: "20", key: "1tx1rr" }]
498
+ ]);
499
+
500
+ // ../../node_modules/lucide-react/dist/esm/icons/underline.js
501
+ init_react_import();
502
+ var Underline = createLucideIcon("Underline", [
503
+ ["path", { d: "M6 4v6a6 6 0 0 0 12 0V4", key: "9kb039" }],
504
+ ["line", { x1: "4", x2: "20", y1: "20", y2: "20", key: "nun2al" }]
505
+ ]);
506
+
507
+ // ../../node_modules/lucide-react/dist/esm/icons/undo-2.js
508
+ init_react_import();
509
+ var Undo2 = createLucideIcon("Undo2", [
510
+ ["path", { d: "M9 14 4 9l5-5", key: "102s5s" }],
511
+ ["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11", key: "f3b9sd" }]
512
+ ]);
513
+
514
+ // ../../node_modules/lucide-react/dist/esm/icons/zoom-in.js
515
+ init_react_import();
516
+ var ZoomIn = createLucideIcon("ZoomIn", [
517
+ ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
518
+ ["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65", key: "13gj7c" }],
519
+ ["line", { x1: "11", x2: "11", y1: "8", y2: "14", key: "1vmskp" }],
520
+ ["line", { x1: "8", x2: "14", y1: "11", y2: "11", key: "durymu" }]
521
+ ]);
522
+
523
+ // ../../node_modules/lucide-react/dist/esm/icons/zoom-out.js
524
+ init_react_import();
525
+ var ZoomOut = createLucideIcon("ZoomOut", [
526
+ ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
527
+ ["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65", key: "13gj7c" }],
528
+ ["line", { x1: "8", x2: "14", y1: "11", y2: "11", key: "durymu" }]
529
+ ]);
530
+
531
+ // store/index.ts
532
+ init_react_import();
533
+
534
+ // reducer/index.ts
535
+ init_react_import();
536
+
537
+ // reducer/actions/set.ts
538
+ init_react_import();
539
+ var setAction = (state, action, appStore) => {
540
+ if (typeof action.state === "object") {
541
+ const newState = __spreadValues(__spreadValues({}, state), action.state);
542
+ if (action.state.indexes) {
543
+ return newState;
544
+ }
545
+ console.warn(
546
+ "`set` is expensive and may cause unnecessary re-renders. Consider using a more atomic action instead."
547
+ );
548
+ return walkAppState(newState, appStore.config);
549
+ }
550
+ return __spreadValues(__spreadValues({}, state), action.state(state));
551
+ };
552
+
553
+ // reducer/actions/insert.ts
554
+ init_react_import();
555
+
556
+ // lib/data/insert.ts
557
+ init_react_import();
558
+ var insert = (list, index, item) => {
559
+ const result = Array.from(list || []);
560
+ result.splice(index, 0, item);
561
+ return result;
562
+ };
563
+
564
+ // lib/generate-id.ts
565
+ init_react_import();
566
+ import { v4 as uuidv4 } from "uuid";
567
+ var generateId = (type) => type ? `${type}-${uuidv4()}` : uuidv4();
568
+
569
+ // lib/data/get-ids-for-parent.ts
570
+ init_react_import();
571
+ var getIdsForParent = (zoneCompound, state) => {
572
+ const [parentId] = zoneCompound.split(":");
573
+ const node = state.indexes.nodes[parentId];
574
+ return ((node == null ? void 0 : node.path) || []).map((p) => p.split(":")[0]);
575
+ };
576
+
577
+ // lib/data/populate-ids.ts
578
+ init_react_import();
579
+ var populateIds = (data, config, override = false) => {
580
+ const id = generateId(data.type);
581
+ return walkTree(
582
+ __spreadProps(__spreadValues({}, data), {
583
+ props: override ? __spreadProps(__spreadValues({}, data.props), { id }) : __spreadValues({}, data.props)
584
+ }),
585
+ config,
586
+ (contents) => contents.map((item) => {
587
+ const id2 = generateId(item.type);
588
+ return __spreadProps(__spreadValues({}, item), {
589
+ props: override ? __spreadProps(__spreadValues({}, item.props), { id: id2 }) : __spreadValues({ id: id2 }, item.props)
590
+ });
591
+ })
592
+ );
593
+ };
594
+
595
+ // reducer/actions/insert.ts
596
+ function insertAction(state, action, appStore) {
597
+ const id = action.id || generateId(action.componentType);
598
+ const emptyComponentData = populateIds(
599
+ {
600
+ type: action.componentType,
601
+ props: __spreadProps(__spreadValues({}, appStore.config.components[action.componentType].defaultProps || {}), {
602
+ id
603
+ })
604
+ },
605
+ appStore.config
606
+ );
607
+ const [parentId] = action.destinationZone.split(":");
608
+ const idsInPath = getIdsForParent(action.destinationZone, state);
609
+ return walkAppState(
610
+ state,
611
+ appStore.config,
612
+ (content, zoneCompound) => {
613
+ if (zoneCompound === action.destinationZone) {
614
+ return insert(
615
+ content || [],
616
+ action.destinationIndex,
617
+ emptyComponentData
618
+ );
619
+ }
620
+ return content;
621
+ },
622
+ (childItem, path) => {
623
+ if (childItem.props.id === id || childItem.props.id === parentId) {
624
+ return childItem;
625
+ } else if (idsInPath.includes(childItem.props.id)) {
626
+ return childItem;
627
+ } else if (path.includes(action.destinationZone)) {
628
+ return childItem;
629
+ }
630
+ return null;
631
+ }
632
+ );
633
+ }
634
+
635
+ // reducer/actions/replace.ts
636
+ init_react_import();
637
+ var replaceAction = (state, action, appStore) => {
638
+ const [parentId] = action.destinationZone.split(":");
639
+ const idsInPath = getIdsForParent(action.destinationZone, state);
640
+ const originalId = state.indexes.zones[action.destinationZone].contentIds[action.destinationIndex];
641
+ const idChanged = originalId !== action.data.props.id;
642
+ if (idChanged) {
643
+ throw new Error(
644
+ `Can't change the id during a replace action. Please us "remove" and "insert" to define a new node.`
645
+ );
646
+ }
647
+ const newSlotIds = [];
648
+ const data = walkTree(action.data, appStore.config, (contents, opts) => {
649
+ newSlotIds.push(`${opts.parentId}:${opts.propName}`);
650
+ return contents.map((item) => {
651
+ const id = generateId(item.type);
652
+ return __spreadProps(__spreadValues({}, item), {
653
+ props: __spreadValues({ id }, item.props)
654
+ });
655
+ });
656
+ });
657
+ const stateWithDeepSlotsRemoved = __spreadProps(__spreadValues({}, state), {
658
+ ui: __spreadValues(__spreadValues({}, state.ui), action.ui)
659
+ });
660
+ Object.keys(state.indexes.zones).forEach((zoneCompound) => {
661
+ const id = zoneCompound.split(":")[0];
662
+ if (id === originalId) {
663
+ if (!newSlotIds.includes(zoneCompound)) {
664
+ delete stateWithDeepSlotsRemoved.indexes.zones[zoneCompound];
665
+ }
666
+ }
667
+ });
668
+ return walkAppState(
669
+ stateWithDeepSlotsRemoved,
670
+ appStore.config,
671
+ (content, zoneCompound) => {
672
+ const newContent = [...content];
673
+ if (zoneCompound === action.destinationZone) {
674
+ newContent[action.destinationIndex] = data;
675
+ }
676
+ return newContent;
677
+ },
678
+ (childItem, path) => {
679
+ const pathIds = path.map((p) => p.split(":")[0]);
680
+ if (childItem.props.id === data.props.id) {
681
+ return data;
682
+ } else if (childItem.props.id === parentId) {
683
+ return childItem;
684
+ } else if (idsInPath.indexOf(childItem.props.id) > -1) {
685
+ return childItem;
686
+ } else if (pathIds.indexOf(data.props.id) > -1) {
687
+ return childItem;
688
+ }
689
+ return null;
690
+ }
691
+ );
692
+ };
693
+
694
+ // reducer/actions/replace-root.ts
695
+ init_react_import();
696
+ var replaceRootAction = (state, action, appStore) => {
697
+ return walkAppState(
698
+ state,
699
+ appStore.config,
700
+ (content) => content,
701
+ (childItem) => {
702
+ if (childItem.props.id === "root") {
703
+ return __spreadProps(__spreadValues({}, childItem), {
704
+ props: __spreadValues(__spreadValues({}, childItem.props), action.root.props),
705
+ readOnly: action.root.readOnly
706
+ });
707
+ }
708
+ return childItem;
709
+ }
710
+ );
711
+ };
712
+
713
+ // reducer/actions/duplicate.ts
714
+ init_react_import();
715
+
716
+ // lib/data/get-item.ts
717
+ init_react_import();
718
+ function getItem(selector, state) {
719
+ var _a, _b;
720
+ const zone = (_a = state.indexes.zones) == null ? void 0 : _a[selector.zone || rootDroppableId];
721
+ return zone ? (_b = state.indexes.nodes[zone.contentIds[selector.index]]) == null ? void 0 : _b.data : void 0;
722
+ }
723
+
724
+ // reducer/actions/duplicate.ts
725
+ function duplicateAction(state, action, appStore) {
726
+ const item = getItem(
727
+ { index: action.sourceIndex, zone: action.sourceZone },
728
+ state
729
+ );
730
+ const idsInPath = getIdsForParent(action.sourceZone, state);
731
+ const newItem = __spreadProps(__spreadValues({}, item), {
732
+ props: __spreadProps(__spreadValues({}, item.props), {
733
+ id: generateId(item.type)
734
+ })
735
+ });
736
+ const modified = walkAppState(
737
+ state,
738
+ appStore.config,
739
+ (content, zoneCompound) => {
740
+ if (zoneCompound === action.sourceZone) {
741
+ return insert(content, action.sourceIndex + 1, item);
742
+ }
743
+ return content;
744
+ },
745
+ (childItem, path, index) => {
746
+ const zoneCompound = path[path.length - 1];
747
+ const parents = path.map((p) => p.split(":")[0]);
748
+ if (parents.indexOf(newItem.props.id) > -1) {
749
+ return __spreadProps(__spreadValues({}, childItem), {
750
+ props: __spreadProps(__spreadValues({}, childItem.props), {
751
+ id: generateId(childItem.type)
752
+ })
753
+ });
754
+ }
755
+ if (zoneCompound === action.sourceZone && index === action.sourceIndex + 1) {
756
+ return newItem;
757
+ }
758
+ const [sourceZoneParent] = action.sourceZone.split(":");
759
+ if (sourceZoneParent === childItem.props.id || idsInPath.indexOf(childItem.props.id) > -1) {
760
+ return childItem;
761
+ }
762
+ return null;
763
+ }
764
+ );
765
+ return __spreadProps(__spreadValues({}, modified), {
766
+ ui: __spreadProps(__spreadValues({}, modified.ui), {
767
+ itemSelector: {
768
+ index: action.sourceIndex + 1,
769
+ zone: action.sourceZone
770
+ }
771
+ })
772
+ });
773
+ }
774
+
775
+ // reducer/actions/reorder.ts
776
+ init_react_import();
777
+
778
+ // reducer/actions/move.ts
779
+ init_react_import();
780
+
781
+ // lib/data/remove.ts
782
+ init_react_import();
783
+ var remove = (list, index) => {
784
+ const result = Array.from(list);
785
+ result.splice(index, 1);
786
+ return result;
787
+ };
788
+
789
+ // reducer/actions/move.ts
790
+ var moveAction = (state, action, appStore) => {
791
+ if (action.sourceZone === action.destinationZone && action.sourceIndex === action.destinationIndex) {
792
+ return state;
793
+ }
794
+ const item = getItem(
795
+ { zone: action.sourceZone, index: action.sourceIndex },
796
+ state
797
+ );
798
+ if (!item) return state;
799
+ const idsInSourcePath = getIdsForParent(action.sourceZone, state);
800
+ const idsInDestinationPath = getIdsForParent(action.destinationZone, state);
801
+ return walkAppState(
802
+ state,
803
+ appStore.config,
804
+ (content, zoneCompound) => {
805
+ if (zoneCompound === action.sourceZone && zoneCompound === action.destinationZone) {
806
+ return insert(
807
+ remove(content, action.sourceIndex),
808
+ action.destinationIndex,
809
+ item
810
+ );
811
+ } else if (zoneCompound === action.sourceZone) {
812
+ return remove(content, action.sourceIndex);
813
+ } else if (zoneCompound === action.destinationZone) {
814
+ return insert(content, action.destinationIndex, item);
815
+ }
816
+ return content;
817
+ },
818
+ (childItem, path) => {
819
+ const [sourceZoneParent] = action.sourceZone.split(":");
820
+ const [destinationZoneParent] = action.destinationZone.split(":");
821
+ const childId = childItem.props.id;
822
+ if (sourceZoneParent === childId || destinationZoneParent === childId || item.props.id === childId || idsInSourcePath.indexOf(childId) > -1 || idsInDestinationPath.indexOf(childId) > -1 || path.includes(action.destinationZone)) {
823
+ return childItem;
824
+ }
825
+ return null;
826
+ }
827
+ );
828
+ };
829
+
830
+ // reducer/actions/reorder.ts
831
+ var reorderAction = (state, action, appStore) => {
832
+ return moveAction(
833
+ state,
834
+ {
835
+ type: "move",
836
+ sourceIndex: action.sourceIndex,
837
+ sourceZone: action.destinationZone,
838
+ destinationIndex: action.destinationIndex,
839
+ destinationZone: action.destinationZone
840
+ },
841
+ appStore
842
+ );
843
+ };
844
+
845
+ // reducer/actions/remove.ts
846
+ init_react_import();
847
+ var removeAction = (state, action, appStore) => {
848
+ const item = getItem({ index: action.index, zone: action.zone }, state);
849
+ const nodesToDelete = Object.entries(state.indexes.nodes).reduce(
850
+ (acc, [nodeId, nodeData]) => {
851
+ const pathIds = nodeData.path.map((p) => p.split(":")[0]);
852
+ if (pathIds.includes(item.props.id)) {
853
+ return [...acc, nodeId];
854
+ }
855
+ return acc;
856
+ },
857
+ [item.props.id]
858
+ );
859
+ const newState = walkAppState(
860
+ state,
861
+ appStore.config,
862
+ (content, zoneCompound) => {
863
+ if (zoneCompound === action.zone) {
864
+ return remove(content, action.index);
865
+ }
866
+ return content;
867
+ }
868
+ );
869
+ Object.keys(newState.data.zones || {}).forEach((zoneCompound) => {
870
+ const parentId = zoneCompound.split(":")[0];
871
+ if (nodesToDelete.includes(parentId) && newState.data.zones) {
872
+ delete newState.data.zones[zoneCompound];
873
+ }
874
+ });
875
+ Object.keys(newState.indexes.zones).forEach((zoneCompound) => {
876
+ const parentId = zoneCompound.split(":")[0];
877
+ if (nodesToDelete.includes(parentId)) {
878
+ delete newState.indexes.zones[zoneCompound];
879
+ }
880
+ });
881
+ nodesToDelete.forEach((id) => {
882
+ delete newState.indexes.nodes[id];
883
+ });
884
+ return newState;
885
+ };
886
+
887
+ // reducer/actions/register-zone.ts
888
+ init_react_import();
889
+ var zoneCache = {};
890
+ function registerZoneAction(state, action) {
891
+ if (zoneCache[action.zone]) {
892
+ return __spreadProps(__spreadValues({}, state), {
893
+ data: __spreadProps(__spreadValues({}, state.data), {
894
+ zones: __spreadProps(__spreadValues({}, state.data.zones), {
895
+ [action.zone]: zoneCache[action.zone]
896
+ })
897
+ }),
898
+ indexes: __spreadProps(__spreadValues({}, state.indexes), {
899
+ zones: __spreadProps(__spreadValues({}, state.indexes.zones), {
900
+ [action.zone]: __spreadProps(__spreadValues({}, state.indexes.zones[action.zone]), {
901
+ contentIds: zoneCache[action.zone].map((item) => item.props.id),
902
+ type: "dropzone"
903
+ })
904
+ })
905
+ })
906
+ });
907
+ }
908
+ return __spreadProps(__spreadValues({}, state), { data: setupZone(state.data, action.zone) });
909
+ }
910
+ function unregisterZoneAction(state, action) {
911
+ const _zones = __spreadValues({}, state.data.zones || {});
912
+ const zoneIndex = __spreadValues({}, state.indexes.zones || {});
913
+ if (_zones[action.zone]) {
914
+ zoneCache[action.zone] = _zones[action.zone];
915
+ delete _zones[action.zone];
916
+ }
917
+ delete zoneIndex[action.zone];
918
+ return __spreadProps(__spreadValues({}, state), {
919
+ data: __spreadProps(__spreadValues({}, state.data), {
920
+ zones: _zones
921
+ }),
922
+ indexes: __spreadProps(__spreadValues({}, state.indexes), {
923
+ zones: zoneIndex
924
+ })
925
+ });
926
+ }
927
+
928
+ // reducer/actions/set-data.ts
929
+ init_react_import();
930
+ var setDataAction = (state, action, appStore) => {
931
+ if (typeof action.data === "object") {
932
+ console.warn(
933
+ "`setData` is expensive and may cause unnecessary re-renders. Consider using a more atomic action instead."
934
+ );
935
+ return walkAppState(
936
+ __spreadProps(__spreadValues({}, state), {
937
+ data: __spreadValues(__spreadValues({}, state.data), action.data)
938
+ }),
939
+ appStore.config
940
+ );
941
+ }
942
+ return walkAppState(
943
+ __spreadProps(__spreadValues({}, state), {
944
+ data: __spreadValues(__spreadValues({}, state.data), action.data(state.data))
945
+ }),
946
+ appStore.config
947
+ );
948
+ };
949
+
950
+ // reducer/actions/set-ui.ts
951
+ init_react_import();
952
+ var setUiAction = (state, action) => {
953
+ if (typeof action.ui === "object") {
954
+ return __spreadProps(__spreadValues({}, state), {
955
+ ui: __spreadValues(__spreadValues({}, state.ui), action.ui)
956
+ });
957
+ }
958
+ return __spreadProps(__spreadValues({}, state), {
959
+ ui: __spreadValues(__spreadValues({}, state.ui), action.ui(state.ui))
960
+ });
961
+ };
962
+
963
+ // lib/data/make-state-public.ts
964
+ init_react_import();
965
+ var makeStatePublic = (state) => {
966
+ const { data, ui } = state;
967
+ return { data, ui };
968
+ };
969
+
970
+ // reducer/actions.tsx
971
+ init_react_import();
972
+
973
+ // reducer/index.ts
974
+ function storeInterceptor(reducer, record, onAction) {
975
+ return (state, action) => {
976
+ const newAppState = reducer(state, action);
977
+ const isValidType = ![
978
+ "registerZone",
979
+ "unregisterZone",
980
+ "setData",
981
+ "setUi",
982
+ "set"
983
+ ].includes(action.type);
984
+ if (typeof action.recordHistory !== "undefined" ? action.recordHistory : isValidType) {
985
+ if (record) record(newAppState);
986
+ }
987
+ onAction == null ? void 0 : onAction(action, makeStatePublic(newAppState), makeStatePublic(state));
988
+ return newAppState;
989
+ };
990
+ }
991
+ function createReducer({
992
+ record,
993
+ onAction,
994
+ appStore
995
+ }) {
996
+ return storeInterceptor(
997
+ (state, action) => {
998
+ if (action.type === "set") {
999
+ return setAction(state, action, appStore);
1000
+ }
1001
+ if (action.type === "insert") {
1002
+ return insertAction(state, action, appStore);
1003
+ }
1004
+ if (action.type === "replace") {
1005
+ return replaceAction(state, action, appStore);
1006
+ }
1007
+ if (action.type === "replaceRoot") {
1008
+ return replaceRootAction(state, action, appStore);
1009
+ }
1010
+ if (action.type === "duplicate") {
1011
+ return duplicateAction(state, action, appStore);
1012
+ }
1013
+ if (action.type === "reorder") {
1014
+ return reorderAction(state, action, appStore);
1015
+ }
1016
+ if (action.type === "move") {
1017
+ return moveAction(state, action, appStore);
1018
+ }
1019
+ if (action.type === "remove") {
1020
+ return removeAction(state, action, appStore);
1021
+ }
1022
+ if (action.type === "registerZone") {
1023
+ return registerZoneAction(state, action);
1024
+ }
1025
+ if (action.type === "unregisterZone") {
1026
+ return unregisterZoneAction(state, action);
1027
+ }
1028
+ if (action.type === "setData") {
1029
+ return setDataAction(state, action, appStore);
1030
+ }
1031
+ if (action.type === "setUi") {
1032
+ return setUiAction(state, action);
1033
+ }
1034
+ return state;
1035
+ },
1036
+ record,
1037
+ onAction
1038
+ );
1039
+ }
1040
+
1041
+ // store/index.ts
1042
+ import { create as create2, useStore } from "zustand";
1043
+ import { subscribeWithSelector as subscribeWithSelector2 } from "zustand/middleware";
1044
+ import { createContext, useContext } from "react";
1045
+
1046
+ // store/slices/history.ts
1047
+ init_react_import();
1048
+ import { useEffect as useEffect2 } from "react";
1049
+
1050
+ // lib/use-hotkey.ts
1051
+ init_react_import();
1052
+ import { useEffect } from "react";
1053
+ import { create } from "zustand";
1054
+ import { subscribeWithSelector } from "zustand/middleware";
1055
+ var keyCodeMap = {
1056
+ ControlLeft: "ctrl",
1057
+ ControlRight: "ctrl",
1058
+ MetaLeft: "meta",
1059
+ MetaRight: "meta",
1060
+ ShiftLeft: "shift",
1061
+ ShiftRight: "shift",
1062
+ KeyA: "a",
1063
+ KeyB: "b",
1064
+ KeyC: "c",
1065
+ KeyD: "d",
1066
+ KeyE: "e",
1067
+ KeyF: "f",
1068
+ KeyG: "g",
1069
+ KeyH: "h",
1070
+ KeyI: "i",
1071
+ KeyJ: "j",
1072
+ KeyK: "k",
1073
+ KeyL: "l",
1074
+ KeyM: "m",
1075
+ KeyN: "n",
1076
+ KeyO: "o",
1077
+ KeyP: "p",
1078
+ KeyQ: "q",
1079
+ KeyR: "r",
1080
+ KeyS: "s",
1081
+ KeyT: "t",
1082
+ KeyU: "u",
1083
+ KeyV: "v",
1084
+ KeyW: "w",
1085
+ KeyX: "x",
1086
+ KeyY: "y",
1087
+ KeyZ: "z",
1088
+ Delete: "delete",
1089
+ Backspace: "backspace"
1090
+ };
1091
+ var useHotkeyStore = create()(
1092
+ subscribeWithSelector((set) => ({
1093
+ held: {},
1094
+ hold: (key) => set((s) => s.held[key] ? s : { held: __spreadProps(__spreadValues({}, s.held), { [key]: true }) }),
1095
+ release: (key) => set((s) => s.held[key] ? { held: __spreadProps(__spreadValues({}, s.held), { [key]: false }) } : s),
1096
+ reset: (held = {}) => set(() => ({ held })),
1097
+ triggers: {}
1098
+ }))
1099
+ );
1100
+ var monitorHotkeys = (doc) => {
1101
+ const onKeyDown = (e) => {
1102
+ const key = keyCodeMap[e.code];
1103
+ if (key) {
1104
+ useHotkeyStore.getState().hold(key);
1105
+ const { held, triggers } = useHotkeyStore.getState();
1106
+ Object.values(triggers).forEach(({ combo, cb }) => {
1107
+ const conditionMet = Object.entries(combo).every(
1108
+ ([key2, value]) => value === !!held[key2]
1109
+ ) && Object.entries(held).every(
1110
+ ([key2, value]) => value === !!combo[key2]
1111
+ );
1112
+ if (conditionMet) {
1113
+ const handled = cb(e);
1114
+ if (handled !== false) {
1115
+ e.preventDefault();
1116
+ }
1117
+ }
1118
+ });
1119
+ if (key !== "meta" && key !== "ctrl" && key !== "shift") {
1120
+ useHotkeyStore.getState().release(key);
1121
+ }
1122
+ }
1123
+ };
1124
+ const onKeyUp = (e) => {
1125
+ const key = keyCodeMap[e.code];
1126
+ if (key) {
1127
+ if (key === "meta") {
1128
+ useHotkeyStore.getState().reset();
1129
+ } else {
1130
+ useHotkeyStore.getState().release(key);
1131
+ }
1132
+ }
1133
+ };
1134
+ const onVisibilityChanged = (e) => {
1135
+ if (document.visibilityState === "hidden") {
1136
+ useHotkeyStore.getState().reset();
1137
+ }
1138
+ };
1139
+ const onBlur = () => {
1140
+ useHotkeyStore.getState().reset();
1141
+ };
1142
+ window.addEventListener("blur", onBlur);
1143
+ doc.addEventListener("keydown", onKeyDown);
1144
+ doc.addEventListener("keyup", onKeyUp);
1145
+ doc.addEventListener("visibilitychange", onVisibilityChanged);
1146
+ return () => {
1147
+ doc.removeEventListener("keydown", onKeyDown);
1148
+ doc.removeEventListener("keyup", onKeyUp);
1149
+ doc.removeEventListener("visibilitychange", onVisibilityChanged);
1150
+ window.removeEventListener("blur", onBlur);
1151
+ };
1152
+ };
1153
+ var useMonitorHotkeys = () => {
1154
+ useEffect(() => monitorHotkeys(document), []);
1155
+ };
1156
+ var useHotkey = (combo, cb) => {
1157
+ useEffect(
1158
+ () => useHotkeyStore.setState((s) => ({
1159
+ triggers: __spreadProps(__spreadValues({}, s.triggers), {
1160
+ [`${Object.keys(combo).join("+")}`]: { combo, cb }
1161
+ })
1162
+ })),
1163
+ []
1164
+ );
1165
+ };
1166
+
1167
+ // store/slices/history.ts
1168
+ var EMPTY_HISTORY_INDEX = 0;
1169
+ function debounce(func, timeout = 300) {
1170
+ let timer;
1171
+ return (...args) => {
1172
+ clearTimeout(timer);
1173
+ timer = setTimeout(() => {
1174
+ func(...args);
1175
+ }, timeout);
1176
+ };
1177
+ }
1178
+ var tidyState = (state) => {
1179
+ return __spreadProps(__spreadValues({}, state), {
1180
+ ui: __spreadProps(__spreadValues({}, state.ui), {
1181
+ field: __spreadProps(__spreadValues({}, state.ui.field), {
1182
+ focus: null
1183
+ })
1184
+ })
1185
+ });
1186
+ };
1187
+ var createHistorySlice = (set, get) => {
1188
+ const record = debounce((state) => {
1189
+ const { histories, index } = get().history;
1190
+ const history = {
1191
+ state,
1192
+ id: generateId("history")
1193
+ };
1194
+ const newHistories = [...histories.slice(0, index + 1), history];
1195
+ set({
1196
+ history: __spreadProps(__spreadValues({}, get().history), {
1197
+ histories: newHistories,
1198
+ index: newHistories.length - 1
1199
+ })
1200
+ });
1201
+ }, 250);
1202
+ return {
1203
+ initialAppState: {},
1204
+ index: EMPTY_HISTORY_INDEX,
1205
+ histories: [],
1206
+ hasPast: () => get().history.index > EMPTY_HISTORY_INDEX,
1207
+ hasFuture: () => get().history.index < get().history.histories.length - 1,
1208
+ prevHistory: () => {
1209
+ const { history } = get();
1210
+ return history.hasPast() ? history.histories[history.index - 1] : null;
1211
+ },
1212
+ nextHistory: () => {
1213
+ const s = get().history;
1214
+ return s.hasFuture() ? s.histories[s.index + 1] : null;
1215
+ },
1216
+ currentHistory: () => get().history.histories[get().history.index],
1217
+ back: () => {
1218
+ var _a;
1219
+ const { history, dispatch } = get();
1220
+ if (history.hasPast()) {
1221
+ const state = tidyState(
1222
+ ((_a = history.prevHistory()) == null ? void 0 : _a.state) || history.initialAppState
1223
+ );
1224
+ dispatch({
1225
+ type: "set",
1226
+ state
1227
+ });
1228
+ set({ history: __spreadProps(__spreadValues({}, history), { index: history.index - 1 }) });
1229
+ }
1230
+ },
1231
+ forward: () => {
1232
+ var _a;
1233
+ const { history, dispatch } = get();
1234
+ if (history.hasFuture()) {
1235
+ const state = (_a = history.nextHistory()) == null ? void 0 : _a.state;
1236
+ dispatch({ type: "set", state: state ? tidyState(state) : {} });
1237
+ set({ history: __spreadProps(__spreadValues({}, history), { index: history.index + 1 }) });
1238
+ }
1239
+ },
1240
+ setHistories: (histories) => {
1241
+ var _a;
1242
+ const { dispatch, history } = get();
1243
+ dispatch({
1244
+ type: "set",
1245
+ state: ((_a = histories[histories.length - 1]) == null ? void 0 : _a.state) || history.initialAppState
1246
+ });
1247
+ set({ history: __spreadProps(__spreadValues({}, history), { histories, index: histories.length - 1 }) });
1248
+ },
1249
+ setHistoryIndex: (index) => {
1250
+ var _a;
1251
+ const { dispatch, history } = get();
1252
+ dispatch({
1253
+ type: "set",
1254
+ state: ((_a = history.histories[index]) == null ? void 0 : _a.state) || history.initialAppState
1255
+ });
1256
+ set({ history: __spreadProps(__spreadValues({}, history), { index }) });
1257
+ },
1258
+ record
1259
+ };
1260
+ };
1261
+ function useRegisterHistorySlice(appStore, {
1262
+ histories,
1263
+ index,
1264
+ initialAppState
1265
+ }) {
1266
+ useEffect2(
1267
+ () => appStore.setState({
1268
+ history: __spreadProps(__spreadValues({}, appStore.getState().history), {
1269
+ histories,
1270
+ index,
1271
+ initialAppState
1272
+ })
1273
+ }),
1274
+ [histories, index, initialAppState]
1275
+ );
1276
+ const back = () => {
1277
+ appStore.getState().history.back();
1278
+ };
1279
+ const forward = () => {
1280
+ appStore.getState().history.forward();
1281
+ };
1282
+ useHotkey({ meta: true, z: true }, back);
1283
+ useHotkey({ meta: true, shift: true, z: true }, forward);
1284
+ useHotkey({ meta: true, y: true }, forward);
1285
+ useHotkey({ ctrl: true, z: true }, back);
1286
+ useHotkey({ ctrl: true, shift: true, z: true }, forward);
1287
+ useHotkey({ ctrl: true, y: true }, forward);
1288
+ }
1289
+
1290
+ // store/slices/nodes.ts
1291
+ init_react_import();
1292
+ var createNodesSlice = (set, get) => ({
1293
+ nodes: {},
1294
+ registerNode: (id, node) => {
1295
+ const s = get().nodes;
1296
+ const emptyNode = {
1297
+ id,
1298
+ methods: {
1299
+ sync: () => null,
1300
+ hideOverlay: () => null,
1301
+ showOverlay: () => null
1302
+ },
1303
+ element: null
1304
+ };
1305
+ const existingNode = s.nodes[id];
1306
+ set({
1307
+ nodes: __spreadProps(__spreadValues({}, s), {
1308
+ nodes: __spreadProps(__spreadValues({}, s.nodes), {
1309
+ [id]: __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, emptyNode), existingNode), node), {
1310
+ id
1311
+ })
1312
+ })
1313
+ })
1314
+ });
1315
+ },
1316
+ unregisterNode: (id) => {
1317
+ const s = get().nodes;
1318
+ const existingNode = s.nodes[id];
1319
+ if (existingNode) {
1320
+ const newNodes = __spreadValues({}, s.nodes);
1321
+ delete newNodes[id];
1322
+ set({
1323
+ nodes: __spreadProps(__spreadValues({}, s), {
1324
+ nodes: newNodes
1325
+ })
1326
+ });
1327
+ }
1328
+ }
1329
+ });
1330
+
1331
+ // store/slices/permissions.ts
1332
+ init_react_import();
1333
+ import { useEffect as useEffect3 } from "react";
1334
+
1335
+ // lib/data/flatten-data.ts
1336
+ init_react_import();
1337
+ var flattenData = (state, config) => {
1338
+ const data = [];
1339
+ walkAppState(
1340
+ state,
1341
+ config,
1342
+ (content) => content,
1343
+ (item) => {
1344
+ data.push(item);
1345
+ return item;
1346
+ }
1347
+ );
1348
+ return data;
1349
+ };
1350
+
1351
+ // store/slices/permissions.ts
1352
+ var createPermissionsSlice = (set, get) => {
1353
+ const resolvePermissions = (..._0) => __async(null, [..._0], function* (params = {}, force) {
1354
+ const { state, permissions, config } = get();
1355
+ const { cache, globalPermissions } = permissions;
1356
+ const resolvePermissionsForItem = (item2, force2 = false) => __async(null, null, function* () {
1357
+ var _a, _b;
1358
+ const { config: config2, state: appState, setComponentLoading } = get();
1359
+ const itemCache = cache[item2.props.id];
1360
+ const nodes = appState.indexes.nodes;
1361
+ const parentId = (_a = nodes[item2.props.id]) == null ? void 0 : _a.parentId;
1362
+ const parentNode = parentId ? nodes[parentId] : null;
1363
+ const parentData = (_b = parentNode == null ? void 0 : parentNode.data) != null ? _b : null;
1364
+ const componentConfig = item2.type === "root" ? config2.root : config2.components[item2.type];
1365
+ if (!componentConfig) {
1366
+ return;
1367
+ }
1368
+ const initialPermissions = __spreadValues(__spreadValues({}, globalPermissions), componentConfig.permissions);
1369
+ if (componentConfig.resolvePermissions) {
1370
+ const changed = getChanged(item2, itemCache == null ? void 0 : itemCache.lastData);
1371
+ const propsChanged = Object.values(changed).some((el) => el === true);
1372
+ const parentChanged = (itemCache == null ? void 0 : itemCache.lastParentId) !== parentId;
1373
+ if (propsChanged || parentChanged || force2) {
1374
+ const clearTimeout2 = setComponentLoading(item2.props.id, true, 50);
1375
+ const resolvedPermissions = yield componentConfig.resolvePermissions(
1376
+ item2,
1377
+ {
1378
+ changed,
1379
+ lastPermissions: (itemCache == null ? void 0 : itemCache.lastPermissions) || null,
1380
+ permissions: initialPermissions,
1381
+ appState: makeStatePublic(appState),
1382
+ lastData: (itemCache == null ? void 0 : itemCache.lastData) || null,
1383
+ parent: parentData
1384
+ }
1385
+ );
1386
+ const latest = get().permissions;
1387
+ set({
1388
+ permissions: __spreadProps(__spreadValues({}, latest), {
1389
+ cache: __spreadProps(__spreadValues({}, latest.cache), {
1390
+ [item2.props.id]: {
1391
+ lastParentId: parentId,
1392
+ lastData: item2,
1393
+ lastPermissions: resolvedPermissions
1394
+ }
1395
+ }),
1396
+ resolvedPermissions: __spreadProps(__spreadValues({}, latest.resolvedPermissions), {
1397
+ [item2.props.id]: resolvedPermissions
1398
+ })
1399
+ })
1400
+ });
1401
+ clearTimeout2();
1402
+ }
1403
+ }
1404
+ });
1405
+ const resolvePermissionsForRoot = (force2 = false) => {
1406
+ const { state: appState } = get();
1407
+ resolvePermissionsForItem(
1408
+ // Shim the root data in by conforming to component data shape
1409
+ {
1410
+ type: "root",
1411
+ props: __spreadProps(__spreadValues({}, appState.data.root.props), { id: "root" })
1412
+ },
1413
+ force2
1414
+ );
1415
+ };
1416
+ const { item, type, root } = params;
1417
+ if (item) {
1418
+ yield resolvePermissionsForItem(item, force);
1419
+ } else if (type) {
1420
+ flattenData(state, config).filter((item2) => item2.type === type).map((item2) => __async(null, null, function* () {
1421
+ yield resolvePermissionsForItem(item2, force);
1422
+ }));
1423
+ } else if (root) {
1424
+ resolvePermissionsForRoot(force);
1425
+ } else {
1426
+ flattenData(state, config).map((item2) => __async(null, null, function* () {
1427
+ yield resolvePermissionsForItem(item2, force);
1428
+ }));
1429
+ }
1430
+ });
1431
+ const refreshPermissions = (params) => resolvePermissions(params, true);
1432
+ return {
1433
+ cache: {},
1434
+ globalPermissions: {
1435
+ drag: true,
1436
+ edit: true,
1437
+ delete: true,
1438
+ duplicate: true,
1439
+ insert: true
1440
+ },
1441
+ resolvedPermissions: {},
1442
+ getPermissions: ({ item, type, root } = {}) => {
1443
+ const { config, permissions } = get();
1444
+ const { globalPermissions, resolvedPermissions } = permissions;
1445
+ if (item) {
1446
+ const componentConfig = config.components[item.type];
1447
+ const initialPermissions = __spreadValues(__spreadValues({}, globalPermissions), componentConfig == null ? void 0 : componentConfig.permissions);
1448
+ const resolvedForItem = resolvedPermissions[item.props.id];
1449
+ return resolvedForItem ? __spreadValues(__spreadValues({}, globalPermissions), resolvedForItem) : initialPermissions;
1450
+ } else if (type) {
1451
+ const componentConfig = config.components[type];
1452
+ return __spreadValues(__spreadValues({}, globalPermissions), componentConfig == null ? void 0 : componentConfig.permissions);
1453
+ } else if (root) {
1454
+ const rootConfig = config.root;
1455
+ const initialPermissions = __spreadValues(__spreadValues({}, globalPermissions), rootConfig == null ? void 0 : rootConfig.permissions);
1456
+ const resolvedForItem = resolvedPermissions["root"];
1457
+ return resolvedForItem ? __spreadValues(__spreadValues({}, globalPermissions), resolvedForItem) : initialPermissions;
1458
+ }
1459
+ return globalPermissions;
1460
+ },
1461
+ resolvePermissions,
1462
+ refreshPermissions
1463
+ };
1464
+ };
1465
+ var useRegisterPermissionsSlice = (appStore, globalPermissions) => {
1466
+ useEffect3(() => {
1467
+ const { permissions } = appStore.getState();
1468
+ const { globalPermissions: existingGlobalPermissions } = permissions;
1469
+ appStore.setState({
1470
+ permissions: __spreadProps(__spreadValues({}, permissions), {
1471
+ globalPermissions: __spreadValues(__spreadValues({}, existingGlobalPermissions), globalPermissions)
1472
+ })
1473
+ });
1474
+ permissions.resolvePermissions();
1475
+ }, [globalPermissions]);
1476
+ useEffect3(() => {
1477
+ return appStore.subscribe(
1478
+ (s) => s.state.data,
1479
+ () => {
1480
+ appStore.getState().permissions.resolvePermissions();
1481
+ }
1482
+ );
1483
+ }, []);
1484
+ useEffect3(() => {
1485
+ return appStore.subscribe(
1486
+ (s) => s.config,
1487
+ () => {
1488
+ appStore.getState().permissions.resolvePermissions();
1489
+ }
1490
+ );
1491
+ }, []);
1492
+ };
1493
+
1494
+ // store/slices/fields.ts
1495
+ init_react_import();
1496
+ import { useCallback, useEffect as useEffect4 } from "react";
1497
+ var createFieldsSlice = (_set, _get) => {
1498
+ return {
1499
+ fields: {},
1500
+ loading: false,
1501
+ lastResolvedData: {},
1502
+ id: void 0
1503
+ };
1504
+ };
1505
+ var useRegisterFieldsSlice = (appStore, id) => {
1506
+ const resolveFields = useCallback(
1507
+ (reset) => __async(null, null, function* () {
1508
+ var _a, _b;
1509
+ const { fields, lastResolvedData } = appStore.getState().fields;
1510
+ const metadata = appStore.getState().metadata;
1511
+ const nodes = appStore.getState().state.indexes.nodes;
1512
+ const node = nodes[id || "root"];
1513
+ const componentData = node == null ? void 0 : node.data;
1514
+ const parentNode = (node == null ? void 0 : node.parentId) ? nodes[node.parentId] : null;
1515
+ const parent = (parentNode == null ? void 0 : parentNode.data) || null;
1516
+ const { getComponentConfig, state } = appStore.getState();
1517
+ const componentConfig = getComponentConfig(componentData == null ? void 0 : componentData.type);
1518
+ if (!componentData || !componentConfig) return;
1519
+ const defaultFields = componentConfig.fields || {};
1520
+ const resolver = componentConfig.resolveFields;
1521
+ let lastFields = fields;
1522
+ if (reset) {
1523
+ appStore.setState((s) => ({
1524
+ fields: __spreadProps(__spreadValues({}, s.fields), { fields: defaultFields, id })
1525
+ }));
1526
+ lastFields = defaultFields;
1527
+ }
1528
+ if (resolver) {
1529
+ const timeout = setTimeout(() => {
1530
+ appStore.setState((s) => ({
1531
+ fields: __spreadProps(__spreadValues({}, s.fields), { loading: true })
1532
+ }));
1533
+ }, 50);
1534
+ const lastData = ((_a = lastResolvedData.props) == null ? void 0 : _a.id) === id ? lastResolvedData : null;
1535
+ const changed = getChanged(componentData, lastData);
1536
+ const newFields = yield resolver(componentData, {
1537
+ changed,
1538
+ fields: defaultFields,
1539
+ lastFields,
1540
+ metadata: __spreadValues(__spreadValues({}, metadata), componentConfig.metadata),
1541
+ lastData,
1542
+ appState: makeStatePublic(state),
1543
+ parent
1544
+ });
1545
+ clearTimeout(timeout);
1546
+ if (((_b = appStore.getState().selectedItem) == null ? void 0 : _b.props.id) !== id) {
1547
+ return;
1548
+ }
1549
+ appStore.setState({
1550
+ fields: {
1551
+ fields: newFields,
1552
+ loading: false,
1553
+ lastResolvedData: componentData,
1554
+ id
1555
+ }
1556
+ });
1557
+ } else {
1558
+ appStore.setState((s) => ({
1559
+ fields: __spreadProps(__spreadValues({}, s.fields), { fields: defaultFields, id })
1560
+ }));
1561
+ }
1562
+ }),
1563
+ [id]
1564
+ );
1565
+ useEffect4(() => {
1566
+ resolveFields(true);
1567
+ return appStore.subscribe(
1568
+ (s) => s.state.indexes.nodes[id || "root"],
1569
+ () => resolveFields()
1570
+ );
1571
+ }, [id]);
1572
+ };
1573
+
1574
+ // lib/data/to-root.ts
1575
+ init_react_import();
1576
+ var toRoot = (item) => {
1577
+ if ("type" in item && item.type !== "root") {
1578
+ throw new Error("Converting non-root item to root.");
1579
+ }
1580
+ const { readOnly } = item;
1581
+ if (item.props) {
1582
+ if ("id" in item.props) {
1583
+ const _a = item.props, { id } = _a, props = __objRest(_a, ["id"]);
1584
+ return { props, readOnly };
1585
+ }
1586
+ return { props: item.props, readOnly };
1587
+ }
1588
+ return { props: {}, readOnly };
1589
+ };
1590
+
1591
+ // store/index.ts
1592
+ var defaultPageFields = {
1593
+ title: { type: "text" }
1594
+ };
1595
+ var createAppStore = (initialAppStore) => create2()(
1596
+ subscribeWithSelector2((set, get) => {
1597
+ var _a, _b;
1598
+ return __spreadProps(__spreadValues({
1599
+ state: defaultAppState,
1600
+ config: { components: {} },
1601
+ componentState: {},
1602
+ plugins: [],
1603
+ overrides: {},
1604
+ viewports: defaultViewports,
1605
+ zoomConfig: {
1606
+ autoZoom: 1,
1607
+ rootHeight: 0,
1608
+ zoom: 1
1609
+ },
1610
+ status: "LOADING",
1611
+ iframe: {},
1612
+ metadata: {},
1613
+ fieldTransforms: {}
1614
+ }, initialAppStore), {
1615
+ fields: createFieldsSlice(set, get),
1616
+ history: createHistorySlice(set, get),
1617
+ nodes: createNodesSlice(set, get),
1618
+ permissions: createPermissionsSlice(set, get),
1619
+ getComponentConfig: (type) => {
1620
+ var _a2;
1621
+ const { config, selectedItem } = get();
1622
+ const rootFields = ((_a2 = config.root) == null ? void 0 : _a2.fields) || defaultPageFields;
1623
+ return type && type !== "root" ? config.components[type] : selectedItem ? config.components[selectedItem.type] : __spreadProps(__spreadValues({}, config.root), { fields: rootFields });
1624
+ },
1625
+ selectedItem: ((_a = initialAppStore == null ? void 0 : initialAppStore.state) == null ? void 0 : _a.ui.itemSelector) ? getItem(
1626
+ (_b = initialAppStore == null ? void 0 : initialAppStore.state) == null ? void 0 : _b.ui.itemSelector,
1627
+ initialAppStore.state
1628
+ ) : null,
1629
+ dispatch: (action) => set((s) => {
1630
+ var _a2, _b2;
1631
+ const { record } = get().history;
1632
+ const dispatch = createReducer({
1633
+ record,
1634
+ appStore: s
1635
+ });
1636
+ const state = dispatch(s.state, action);
1637
+ const selectedItem = state.ui.itemSelector ? getItem(state.ui.itemSelector, state) : null;
1638
+ (_b2 = (_a2 = get()).onAction) == null ? void 0 : _b2.call(_a2, action, state, get().state);
1639
+ return __spreadProps(__spreadValues({}, s), { state, selectedItem });
1640
+ }),
1641
+ setZoomConfig: (zoomConfig) => set({ zoomConfig }),
1642
+ setStatus: (status) => set({ status }),
1643
+ setComponentState: (componentState) => set({ componentState }),
1644
+ pendingLoadTimeouts: {},
1645
+ setComponentLoading: (id, loading = true, defer = 0) => {
1646
+ const { setComponentState, pendingLoadTimeouts } = get();
1647
+ const loadId = generateId();
1648
+ const setLoading = () => {
1649
+ var _a2;
1650
+ const { componentState } = get();
1651
+ setComponentState(__spreadProps(__spreadValues({}, componentState), {
1652
+ [id]: __spreadProps(__spreadValues({}, componentState[id]), {
1653
+ loadingCount: (((_a2 = componentState[id]) == null ? void 0 : _a2.loadingCount) || 0) + 1
1654
+ })
1655
+ }));
1656
+ };
1657
+ const unsetLoading = () => {
1658
+ var _a2;
1659
+ const { componentState } = get();
1660
+ clearTimeout(timeout);
1661
+ delete pendingLoadTimeouts[loadId];
1662
+ set({ pendingLoadTimeouts });
1663
+ setComponentState(__spreadProps(__spreadValues({}, componentState), {
1664
+ [id]: __spreadProps(__spreadValues({}, componentState[id]), {
1665
+ loadingCount: Math.max(
1666
+ (((_a2 = componentState[id]) == null ? void 0 : _a2.loadingCount) || 0) - 1,
1667
+ 0
1668
+ )
1669
+ })
1670
+ }));
1671
+ };
1672
+ const timeout = setTimeout(() => {
1673
+ if (loading) {
1674
+ setLoading();
1675
+ } else {
1676
+ unsetLoading();
1677
+ }
1678
+ delete pendingLoadTimeouts[loadId];
1679
+ set({ pendingLoadTimeouts });
1680
+ }, defer);
1681
+ set({
1682
+ pendingLoadTimeouts: __spreadProps(__spreadValues({}, pendingLoadTimeouts), {
1683
+ [id]: timeout
1684
+ })
1685
+ });
1686
+ return unsetLoading;
1687
+ },
1688
+ unsetComponentLoading: (id) => {
1689
+ const { setComponentLoading } = get();
1690
+ setComponentLoading(id, false);
1691
+ },
1692
+ // Helper
1693
+ setUi: (ui, recordHistory) => set((s) => {
1694
+ const dispatch = createReducer({
1695
+ record: () => {
1696
+ },
1697
+ appStore: s
1698
+ });
1699
+ const state = dispatch(s.state, {
1700
+ type: "setUi",
1701
+ ui,
1702
+ recordHistory
1703
+ });
1704
+ const selectedItem = state.ui.itemSelector ? getItem(state.ui.itemSelector, state) : null;
1705
+ return __spreadProps(__spreadValues({}, s), { state, selectedItem });
1706
+ }),
1707
+ resolveComponentData: (componentData, trigger) => __async(null, null, function* () {
1708
+ const { config, metadata, setComponentLoading, permissions } = get();
1709
+ const timeouts = {};
1710
+ return yield resolveComponentData(
1711
+ componentData,
1712
+ config,
1713
+ metadata,
1714
+ (item) => {
1715
+ const id = "id" in item.props ? item.props.id : "root";
1716
+ timeouts[id] = setComponentLoading(id, true, 50);
1717
+ },
1718
+ (item) => __async(null, null, function* () {
1719
+ const id = "id" in item.props ? item.props.id : "root";
1720
+ if ("type" in item) {
1721
+ yield permissions.refreshPermissions({ item });
1722
+ } else {
1723
+ yield permissions.refreshPermissions({ root: true });
1724
+ }
1725
+ timeouts[id]();
1726
+ }),
1727
+ trigger
1728
+ );
1729
+ }),
1730
+ resolveAndCommitData: () => __async(null, null, function* () {
1731
+ const { config, state, dispatch, resolveComponentData: resolveComponentData2 } = get();
1732
+ walkAppState(
1733
+ state,
1734
+ config,
1735
+ (content) => content,
1736
+ (childItem) => {
1737
+ resolveComponentData2(childItem, "load").then((resolved) => {
1738
+ const { state: state2 } = get();
1739
+ const node = state2.indexes.nodes[resolved.node.props.id];
1740
+ if (node && resolved.didChange) {
1741
+ if (resolved.node.props.id === "root") {
1742
+ dispatch({
1743
+ type: "replaceRoot",
1744
+ root: toRoot(resolved.node)
1745
+ });
1746
+ } else {
1747
+ const zoneCompound = `${node.parentId}:${node.zone}`;
1748
+ const parentZone = state2.indexes.zones[zoneCompound];
1749
+ const index = parentZone.contentIds.indexOf(
1750
+ resolved.node.props.id
1751
+ );
1752
+ dispatch({
1753
+ type: "replace",
1754
+ data: resolved.node,
1755
+ destinationIndex: index,
1756
+ destinationZone: zoneCompound
1757
+ });
1758
+ }
1759
+ }
1760
+ });
1761
+ return childItem;
1762
+ }
1763
+ );
1764
+ })
1765
+ });
1766
+ })
1767
+ );
1768
+ var appStoreContext = createContext(createAppStore());
1769
+ function useAppStore(selector) {
1770
+ const context = useContext(appStoreContext);
1771
+ return useStore(context, selector);
1772
+ }
1773
+ function useAppStoreApi() {
1774
+ return useContext(appStoreContext);
1775
+ }
1776
+
1777
+ // components/RichTextMenu/lib/use-control-context.ts
1778
+ init_react_import();
1779
+ import { createContext as createContext2, useContext as useContext2 } from "react";
1780
+ var ControlContext = createContext2({});
1781
+ var useControlContext = () => {
1782
+ return useContext2(ControlContext);
1783
+ };
1784
+
1785
+ // components/RichTextMenu/components/SelectControl/index.tsx
1786
+ init_react_import();
1787
+ import { useMemo } from "react";
1788
+
1789
+ // components/Select/index.tsx
1790
+ init_react_import();
1791
+
1792
+ // css-module:/home/runner/work/puck/puck/packages/core/components/Select/styles.module.css#css-module
1793
+ init_react_import();
1794
+ var styles_module_default = { "Select": "_Select_xjbef_1", "Select-button": "_Select-button_xjbef_6", "Select--hasOptions": "_Select--hasOptions_xjbef_19", "Select--disabled": "_Select--disabled_xjbef_23", "Select-buttonIcon": "_Select-buttonIcon_xjbef_27", "Select--standalone": "_Select--standalone_xjbef_33", "Select--actionBar": "_Select--actionBar_xjbef_38", "Select--hasValue": "_Select--hasValue_xjbef_44", "Select-items": "_Select-items_xjbef_61", "SelectItem": "_SelectItem_xjbef_72", "SelectItem--isSelected": "_SelectItem--isSelected_xjbef_87", "SelectItem-icon": "_SelectItem-icon_xjbef_93" };
1795
+
1796
+ // components/Select/index.tsx
1797
+ import { useState } from "react";
1798
+ import {
1799
+ Popover,
1800
+ PopoverContent,
1801
+ PopoverPortal,
1802
+ PopoverTrigger
1803
+ } from "@radix-ui/react-popover";
1804
+
1805
+ // lib/index.ts
1806
+ init_react_import();
1807
+
1808
+ // lib/filter.ts
1809
+ init_react_import();
1810
+
1811
+ // lib/data/reorder.ts
1812
+ init_react_import();
1813
+ var reorder = (list, startIndex, endIndex) => {
1814
+ const result = Array.from(list);
1815
+ const [removed] = result.splice(startIndex, 1);
1816
+ result.splice(endIndex, 0, removed);
1817
+ return result;
1818
+ };
1819
+
1820
+ // lib/data/replace.ts
1821
+ init_react_import();
1822
+ var replace = (list, index, newItem) => {
1823
+ const result = Array.from(list);
1824
+ result.splice(index, 1);
1825
+ result.splice(index, 0, newItem);
1826
+ return result;
1827
+ };
1828
+
1829
+ // lib/use-reset-auto-zoom.ts
1830
+ init_react_import();
1831
+
1832
+ // lib/get-zoom-config.ts
1833
+ init_react_import();
1834
+
1835
+ // ../../node_modules/css-box-model/dist/css-box-model.esm.js
1836
+ init_react_import();
1837
+
1838
+ // ../../node_modules/tiny-invariant/dist/esm/tiny-invariant.js
1839
+ init_react_import();
1840
+ var isProduction = process.env.NODE_ENV === "production";
1841
+ var prefix = "Invariant failed";
1842
+ function invariant(condition, message) {
1843
+ if (condition) {
1844
+ return;
1845
+ }
1846
+ if (isProduction) {
1847
+ throw new Error(prefix);
1848
+ }
1849
+ var provided = typeof message === "function" ? message() : message;
1850
+ var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
1851
+ throw new Error(value);
1852
+ }
1853
+
1854
+ // ../../node_modules/css-box-model/dist/css-box-model.esm.js
1855
+ var getRect = function getRect2(_ref) {
1856
+ var top = _ref.top, right = _ref.right, bottom = _ref.bottom, left = _ref.left;
1857
+ var width = right - left;
1858
+ var height = bottom - top;
1859
+ var rect = {
1860
+ top,
1861
+ right,
1862
+ bottom,
1863
+ left,
1864
+ width,
1865
+ height,
1866
+ x: left,
1867
+ y: top,
1868
+ center: {
1869
+ x: (right + left) / 2,
1870
+ y: (bottom + top) / 2
1871
+ }
1872
+ };
1873
+ return rect;
1874
+ };
1875
+ var expand = function expand2(target, expandBy) {
1876
+ return {
1877
+ top: target.top - expandBy.top,
1878
+ left: target.left - expandBy.left,
1879
+ bottom: target.bottom + expandBy.bottom,
1880
+ right: target.right + expandBy.right
1881
+ };
1882
+ };
1883
+ var shrink = function shrink2(target, shrinkBy) {
1884
+ return {
1885
+ top: target.top + shrinkBy.top,
1886
+ left: target.left + shrinkBy.left,
1887
+ bottom: target.bottom - shrinkBy.bottom,
1888
+ right: target.right - shrinkBy.right
1889
+ };
1890
+ };
1891
+ var noSpacing = {
1892
+ top: 0,
1893
+ right: 0,
1894
+ bottom: 0,
1895
+ left: 0
1896
+ };
1897
+ var createBox = function createBox2(_ref2) {
1898
+ var borderBox = _ref2.borderBox, _ref2$margin = _ref2.margin, margin = _ref2$margin === void 0 ? noSpacing : _ref2$margin, _ref2$border = _ref2.border, border = _ref2$border === void 0 ? noSpacing : _ref2$border, _ref2$padding = _ref2.padding, padding = _ref2$padding === void 0 ? noSpacing : _ref2$padding;
1899
+ var marginBox = getRect(expand(borderBox, margin));
1900
+ var paddingBox = getRect(shrink(borderBox, border));
1901
+ var contentBox = getRect(shrink(paddingBox, padding));
1902
+ return {
1903
+ marginBox,
1904
+ borderBox: getRect(borderBox),
1905
+ paddingBox,
1906
+ contentBox,
1907
+ margin,
1908
+ border,
1909
+ padding
1910
+ };
1911
+ };
1912
+ var parse = function parse2(raw) {
1913
+ var value = raw.slice(0, -2);
1914
+ var suffix = raw.slice(-2);
1915
+ if (suffix !== "px") {
1916
+ return 0;
1917
+ }
1918
+ var result = Number(value);
1919
+ !!isNaN(result) ? process.env.NODE_ENV !== "production" ? invariant(false, "Could not parse value [raw: " + raw + ", without suffix: " + value + "]") : invariant(false) : void 0;
1920
+ return result;
1921
+ };
1922
+ var calculateBox = function calculateBox2(borderBox, styles) {
1923
+ var margin = {
1924
+ top: parse(styles.marginTop),
1925
+ right: parse(styles.marginRight),
1926
+ bottom: parse(styles.marginBottom),
1927
+ left: parse(styles.marginLeft)
1928
+ };
1929
+ var padding = {
1930
+ top: parse(styles.paddingTop),
1931
+ right: parse(styles.paddingRight),
1932
+ bottom: parse(styles.paddingBottom),
1933
+ left: parse(styles.paddingLeft)
1934
+ };
1935
+ var border = {
1936
+ top: parse(styles.borderTopWidth),
1937
+ right: parse(styles.borderRightWidth),
1938
+ bottom: parse(styles.borderBottomWidth),
1939
+ left: parse(styles.borderLeftWidth)
1940
+ };
1941
+ return createBox({
1942
+ borderBox,
1943
+ margin,
1944
+ padding,
1945
+ border
1946
+ });
1947
+ };
1948
+ var getBox = function getBox2(el) {
1949
+ var borderBox = el.getBoundingClientRect();
1950
+ var styles = window.getComputedStyle(el);
1951
+ return calculateBox(borderBox, styles);
1952
+ };
1953
+
1954
+ // lib/get-zoom-config.ts
1955
+ var RESET_ZOOM_SMALLER_THAN_FRAME = true;
1956
+ var getZoomConfig = (uiViewport, frame, zoom) => {
1957
+ const box = getBox(frame);
1958
+ const { width: frameWidth, height: frameHeight } = box.contentBox;
1959
+ const viewportHeight = uiViewport.height === "auto" ? frameHeight : uiViewport.height;
1960
+ let rootHeight = 0;
1961
+ let autoZoom = 1;
1962
+ if (uiViewport.width > frameWidth || viewportHeight > frameHeight) {
1963
+ const widthZoom = Math.min(frameWidth / uiViewport.width, 1);
1964
+ const heightZoom = Math.min(frameHeight / viewportHeight, 1);
1965
+ zoom = widthZoom;
1966
+ if (widthZoom < heightZoom) {
1967
+ rootHeight = viewportHeight / zoom;
1968
+ } else {
1969
+ rootHeight = viewportHeight;
1970
+ zoom = heightZoom;
1971
+ }
1972
+ autoZoom = zoom;
1973
+ } else {
1974
+ if (RESET_ZOOM_SMALLER_THAN_FRAME) {
1975
+ autoZoom = 1;
1976
+ zoom = 1;
1977
+ rootHeight = viewportHeight;
1978
+ }
1979
+ }
1980
+ return { autoZoom, rootHeight, zoom };
1981
+ };
1982
+
1983
+ // lib/use-reset-auto-zoom.ts
1984
+ var useResetAutoZoom = (frameRef) => {
1985
+ const appStoreApi = useAppStoreApi();
1986
+ const resetAutoZoom = (options) => {
1987
+ const { state, zoomConfig, setZoomConfig } = appStoreApi.getState();
1988
+ const { viewports } = state.ui;
1989
+ const newViewports = (options == null ? void 0 : options.viewports) || viewports;
1990
+ if (frameRef.current) {
1991
+ setZoomConfig(
1992
+ getZoomConfig(newViewports == null ? void 0 : newViewports.current, frameRef.current, zoomConfig.zoom)
1993
+ );
1994
+ }
1995
+ };
1996
+ return resetAutoZoom;
1997
+ };
1998
+
1999
+ // components/Select/index.tsx
2000
+ import { jsx, jsxs } from "react/jsx-runtime";
2001
+ var getClassName = get_class_name_factory_default("Select", styles_module_default);
2002
+ var getItemClassName = get_class_name_factory_default("SelectItem", styles_module_default);
2003
+ var Item = ({
2004
+ children,
2005
+ isSelected,
2006
+ onClick
2007
+ }) => {
2008
+ return /* @__PURE__ */ jsx("button", { className: getItemClassName({ isSelected }), onClick, children });
2009
+ };
2010
+ var Select = ({
2011
+ children,
2012
+ options,
2013
+ onChange,
2014
+ value,
2015
+ defaultValue,
2016
+ mode,
2017
+ disabled = false
2018
+ }) => {
2019
+ const [open, setOpen] = useState(false);
2020
+ const hasOptions = options.length > 0;
2021
+ return /* @__PURE__ */ jsx(
2022
+ "div",
2023
+ {
2024
+ className: getClassName({
2025
+ hasValue: value !== defaultValue,
2026
+ hasOptions,
2027
+ actionBar: mode === "actionBar",
2028
+ standalone: mode === "standalone",
2029
+ disabled
2030
+ }),
2031
+ children: /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
2032
+ hasOptions ? /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs("button", { className: getClassName("button"), children: [
2033
+ /* @__PURE__ */ jsx("span", { className: getClassName("buttonIcon"), children }),
2034
+ /* @__PURE__ */ jsx(ChevronDown, { size: 12 })
2035
+ ] }) }) : /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("div", { className: getClassName("button"), children: [
2036
+ /* @__PURE__ */ jsx("span", { className: getClassName("buttonIcon"), children }),
2037
+ /* @__PURE__ */ jsx(ChevronDown, { size: 12 })
2038
+ ] }) }),
2039
+ options.length > 0 && /* @__PURE__ */ jsx(PopoverPortal, { children: /* @__PURE__ */ jsx(PopoverContent, { align: "start", children: /* @__PURE__ */ jsx("ul", { className: getClassName("items"), "data-puck-rte-menu": true, children: options.map((option) => {
2040
+ const Icon2 = option.icon;
2041
+ return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
2042
+ Item,
2043
+ {
2044
+ isSelected: value === option.value,
2045
+ onClick: () => {
2046
+ onChange(option.value);
2047
+ setOpen(false);
2048
+ },
2049
+ children: [
2050
+ Icon2 && /* @__PURE__ */ jsx("div", { className: getItemClassName("icon"), children: /* @__PURE__ */ jsx(Icon2, { size: 16 }) }),
2051
+ option.label
2052
+ ]
2053
+ }
2054
+ ) }, option.value);
2055
+ }) }) }) })
2056
+ ] })
2057
+ }
2058
+ );
2059
+ };
2060
+
2061
+ // components/RichTextMenu/components/SelectControl/index.tsx
2062
+ import { jsx as jsx2 } from "react/jsx-runtime";
2063
+ function SelectControl({
2064
+ renderDefaultIcon,
2065
+ onChange,
2066
+ options,
2067
+ value,
2068
+ defaultValue
2069
+ }) {
2070
+ var _a, _b;
2071
+ const { inline, readOnly } = useControlContext();
2072
+ const optionsByValue = useMemo(
2073
+ () => options.reduce(
2074
+ (acc, option) => __spreadProps(__spreadValues({}, acc), { [option.value]: option }),
2075
+ {}
2076
+ ),
2077
+ [options]
2078
+ );
2079
+ const Node = (_b = value && ((_a = optionsByValue[value]) == null ? void 0 : _a.icon)) != null ? _b : renderDefaultIcon;
2080
+ return /* @__PURE__ */ jsx2(
2081
+ Select,
2082
+ {
2083
+ options,
2084
+ onChange,
2085
+ value,
2086
+ defaultValue,
2087
+ mode: inline ? "actionBar" : "standalone",
2088
+ disabled: readOnly,
2089
+ children: /* @__PURE__ */ jsx2(Node, {})
2090
+ }
2091
+ );
2092
+ }
2093
+
2094
+ export {
2095
+ AlignCenter,
2096
+ AlignJustify,
2097
+ AlignLeft,
2098
+ AlignRight,
2099
+ Bold,
2100
+ ChevronDown,
2101
+ ChevronRight,
2102
+ ChevronUp,
2103
+ CircleCheckBig,
2104
+ Code,
2105
+ Copy,
2106
+ CornerLeftUp,
2107
+ EllipsisVertical,
2108
+ Globe,
2109
+ Hash,
2110
+ Heading1,
2111
+ Heading2,
2112
+ Heading3,
2113
+ Heading4,
2114
+ Heading5,
2115
+ Heading6,
2116
+ Heading,
2117
+ Italic,
2118
+ Layers,
2119
+ LayoutGrid,
2120
+ Link,
2121
+ ListOrdered,
2122
+ List,
2123
+ LockOpen,
2124
+ Lock,
2125
+ Minus,
2126
+ Monitor,
2127
+ PanelLeft,
2128
+ PanelRight,
2129
+ Plus,
2130
+ Quote,
2131
+ Redo2,
2132
+ Search,
2133
+ SlidersHorizontal,
2134
+ Smartphone,
2135
+ SquareCode,
2136
+ Strikethrough,
2137
+ Tablet,
2138
+ Trash,
2139
+ Type,
2140
+ Underline,
2141
+ Undo2,
2142
+ ZoomIn,
2143
+ ZoomOut,
2144
+ reorder,
2145
+ replace,
2146
+ insert,
2147
+ generateId,
2148
+ populateIds,
2149
+ insertAction,
2150
+ getItem,
2151
+ makeStatePublic,
2152
+ monitorHotkeys,
2153
+ useMonitorHotkeys,
2154
+ useHotkey,
2155
+ useRegisterHistorySlice,
2156
+ useRegisterPermissionsSlice,
2157
+ useRegisterFieldsSlice,
2158
+ createAppStore,
2159
+ appStoreContext,
2160
+ useAppStore,
2161
+ useAppStoreApi,
2162
+ getBox,
2163
+ useResetAutoZoom,
2164
+ ControlContext,
2165
+ useControlContext,
2166
+ SelectControl
2167
+ };
2168
+ /*! Bundled license information:
2169
+
2170
+ lucide-react/dist/esm/shared/src/utils.js:
2171
+ lucide-react/dist/esm/defaultAttributes.js:
2172
+ lucide-react/dist/esm/Icon.js:
2173
+ lucide-react/dist/esm/createLucideIcon.js:
2174
+ lucide-react/dist/esm/icons/align-left.js:
2175
+ lucide-react/dist/esm/icons/heading.js:
2176
+ lucide-react/dist/esm/icons/list.js:
2177
+ lucide-react/dist/esm/icons/align-center.js:
2178
+ lucide-react/dist/esm/icons/align-justify.js:
2179
+ lucide-react/dist/esm/icons/align-right.js:
2180
+ lucide-react/dist/esm/icons/bold.js:
2181
+ lucide-react/dist/esm/icons/chevron-down.js:
2182
+ lucide-react/dist/esm/icons/chevron-right.js:
2183
+ lucide-react/dist/esm/icons/chevron-up.js:
2184
+ lucide-react/dist/esm/icons/circle-check-big.js:
2185
+ lucide-react/dist/esm/icons/code.js:
2186
+ lucide-react/dist/esm/icons/copy.js:
2187
+ lucide-react/dist/esm/icons/corner-left-up.js:
2188
+ lucide-react/dist/esm/icons/ellipsis-vertical.js:
2189
+ lucide-react/dist/esm/icons/globe.js:
2190
+ lucide-react/dist/esm/icons/hash.js:
2191
+ lucide-react/dist/esm/icons/heading-1.js:
2192
+ lucide-react/dist/esm/icons/heading-2.js:
2193
+ lucide-react/dist/esm/icons/heading-3.js:
2194
+ lucide-react/dist/esm/icons/heading-4.js:
2195
+ lucide-react/dist/esm/icons/heading-5.js:
2196
+ lucide-react/dist/esm/icons/heading-6.js:
2197
+ lucide-react/dist/esm/icons/italic.js:
2198
+ lucide-react/dist/esm/icons/layers.js:
2199
+ lucide-react/dist/esm/icons/layout-grid.js:
2200
+ lucide-react/dist/esm/icons/link.js:
2201
+ lucide-react/dist/esm/icons/list-ordered.js:
2202
+ lucide-react/dist/esm/icons/lock-open.js:
2203
+ lucide-react/dist/esm/icons/lock.js:
2204
+ lucide-react/dist/esm/icons/minus.js:
2205
+ lucide-react/dist/esm/icons/monitor.js:
2206
+ lucide-react/dist/esm/icons/panel-left.js:
2207
+ lucide-react/dist/esm/icons/panel-right.js:
2208
+ lucide-react/dist/esm/icons/plus.js:
2209
+ lucide-react/dist/esm/icons/quote.js:
2210
+ lucide-react/dist/esm/icons/redo-2.js:
2211
+ lucide-react/dist/esm/icons/search.js:
2212
+ lucide-react/dist/esm/icons/sliders-horizontal.js:
2213
+ lucide-react/dist/esm/icons/smartphone.js:
2214
+ lucide-react/dist/esm/icons/square-code.js:
2215
+ lucide-react/dist/esm/icons/strikethrough.js:
2216
+ lucide-react/dist/esm/icons/tablet.js:
2217
+ lucide-react/dist/esm/icons/trash.js:
2218
+ lucide-react/dist/esm/icons/type.js:
2219
+ lucide-react/dist/esm/icons/underline.js:
2220
+ lucide-react/dist/esm/icons/undo-2.js:
2221
+ lucide-react/dist/esm/icons/zoom-in.js:
2222
+ lucide-react/dist/esm/icons/zoom-out.js:
2223
+ lucide-react/dist/esm/lucide-react.js:
2224
+ (**
2225
+ * @license lucide-react v0.468.0 - ISC
2226
+ *
2227
+ * This source code is licensed under the ISC license.
2228
+ * See the LICENSE file in the root directory of this source tree.
2229
+ *)
2230
+ */