@measured/puck 0.17.0-canary.fe9321f → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +345 -279
- package/dist/index.mjs +169 -103
- package/package.json +4 -4
package/dist/index.js
CHANGED
@@ -289,7 +289,7 @@ init_react_import();
|
|
289
289
|
var styles_module_default2 = { "InputWrapper": "_InputWrapper_1l5m8_1", "Input": "_Input_1l5m8_1", "Input-label": "_Input-label_1l5m8_26", "Input-labelIcon": "_Input-labelIcon_1l5m8_35", "Input-disabledIcon": "_Input-disabledIcon_1l5m8_42", "Input-input": "_Input-input_1l5m8_47", "Input--readOnly": "_Input--readOnly_1l5m8_91", "Input-radioGroupItems": "_Input-radioGroupItems_1l5m8_102", "Input-radio": "_Input-radio_1l5m8_102", "Input-radioInner": "_Input-radioInner_1l5m8_119", "Input-radioInput": "_Input-radioInput_1l5m8_164" };
|
290
290
|
|
291
291
|
// components/AutoField/index.tsx
|
292
|
-
var
|
292
|
+
var import_react16 = require("react");
|
293
293
|
|
294
294
|
// components/AutoField/fields/index.tsx
|
295
295
|
init_react_import();
|
@@ -306,6 +306,17 @@ init_react_import();
|
|
306
306
|
|
307
307
|
// ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
|
308
308
|
init_react_import();
|
309
|
+
var import_react3 = require("react");
|
310
|
+
|
311
|
+
// ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
|
312
|
+
init_react_import();
|
313
|
+
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
314
|
+
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
315
|
+
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
|
316
|
+
}).join(" ").trim();
|
317
|
+
|
318
|
+
// ../../node_modules/lucide-react/dist/esm/Icon.js
|
319
|
+
init_react_import();
|
309
320
|
var import_react2 = require("react");
|
310
321
|
|
311
322
|
// ../../node_modules/lucide-react/dist/esm/defaultAttributes.js
|
@@ -322,41 +333,61 @@ var defaultAttributes = {
|
|
322
333
|
strokeLinejoin: "round"
|
323
334
|
};
|
324
335
|
|
336
|
+
// ../../node_modules/lucide-react/dist/esm/Icon.js
|
337
|
+
var Icon = (0, import_react2.forwardRef)(
|
338
|
+
(_a, ref) => {
|
339
|
+
var _b = _a, {
|
340
|
+
color = "currentColor",
|
341
|
+
size = 24,
|
342
|
+
strokeWidth = 2,
|
343
|
+
absoluteStrokeWidth,
|
344
|
+
className = "",
|
345
|
+
children,
|
346
|
+
iconNode
|
347
|
+
} = _b, rest = __objRest(_b, [
|
348
|
+
"color",
|
349
|
+
"size",
|
350
|
+
"strokeWidth",
|
351
|
+
"absoluteStrokeWidth",
|
352
|
+
"className",
|
353
|
+
"children",
|
354
|
+
"iconNode"
|
355
|
+
]);
|
356
|
+
return (0, import_react2.createElement)(
|
357
|
+
"svg",
|
358
|
+
__spreadValues(__spreadProps(__spreadValues({
|
359
|
+
ref
|
360
|
+
}, defaultAttributes), {
|
361
|
+
width: size,
|
362
|
+
height: size,
|
363
|
+
stroke: color,
|
364
|
+
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
|
365
|
+
className: mergeClasses("lucide", className)
|
366
|
+
}), rest),
|
367
|
+
[
|
368
|
+
...iconNode.map(([tag, attrs]) => (0, import_react2.createElement)(tag, attrs)),
|
369
|
+
...Array.isArray(children) ? children : [children]
|
370
|
+
]
|
371
|
+
);
|
372
|
+
}
|
373
|
+
);
|
374
|
+
|
325
375
|
// ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
|
326
|
-
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().trim();
|
327
376
|
var createLucideIcon = (iconName, iconNode) => {
|
328
|
-
const Component = (0,
|
377
|
+
const Component = (0, import_react3.forwardRef)(
|
329
378
|
(_a, ref) => {
|
330
|
-
var _b = _a, {
|
331
|
-
return (0,
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
width: size,
|
337
|
-
height: size,
|
338
|
-
stroke: color,
|
339
|
-
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
|
340
|
-
className: ["lucide", `lucide-${toKebabCase(iconName)}`, className].join(" ")
|
341
|
-
}), rest),
|
342
|
-
[
|
343
|
-
...iconNode.map(([tag, attrs]) => (0, import_react2.createElement)(tag, attrs)),
|
344
|
-
...Array.isArray(children) ? children : [children]
|
345
|
-
]
|
346
|
-
);
|
379
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
380
|
+
return (0, import_react3.createElement)(Icon, __spreadValues({
|
381
|
+
ref,
|
382
|
+
iconNode,
|
383
|
+
className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className)
|
384
|
+
}, props));
|
347
385
|
}
|
348
386
|
);
|
349
387
|
Component.displayName = `${iconName}`;
|
350
388
|
return Component;
|
351
389
|
};
|
352
390
|
|
353
|
-
// ../../node_modules/lucide-react/dist/esm/icons/check-circle.js
|
354
|
-
init_react_import();
|
355
|
-
var CheckCircle = createLucideIcon("CheckCircle", [
|
356
|
-
["path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14", key: "g774vq" }],
|
357
|
-
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
358
|
-
]);
|
359
|
-
|
360
391
|
// ../../node_modules/lucide-react/dist/esm/icons/chevron-down.js
|
361
392
|
init_react_import();
|
362
393
|
var ChevronDown = createLucideIcon("ChevronDown", [
|
@@ -373,6 +404,13 @@ var ChevronRight = createLucideIcon("ChevronRight", [
|
|
373
404
|
init_react_import();
|
374
405
|
var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
375
406
|
|
407
|
+
// ../../node_modules/lucide-react/dist/esm/icons/circle-check-big.js
|
408
|
+
init_react_import();
|
409
|
+
var CircleCheckBig = createLucideIcon("CircleCheckBig", [
|
410
|
+
["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
|
411
|
+
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
412
|
+
]);
|
413
|
+
|
376
414
|
// ../../node_modules/lucide-react/dist/esm/icons/copy.js
|
377
415
|
init_react_import();
|
378
416
|
var Copy = createLucideIcon("Copy", [
|
@@ -380,6 +418,14 @@ var Copy = createLucideIcon("Copy", [
|
|
380
418
|
["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" }]
|
381
419
|
]);
|
382
420
|
|
421
|
+
// ../../node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.js
|
422
|
+
init_react_import();
|
423
|
+
var EllipsisVertical = createLucideIcon("EllipsisVertical", [
|
424
|
+
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
425
|
+
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
|
426
|
+
["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
|
427
|
+
]);
|
428
|
+
|
383
429
|
// ../../node_modules/lucide-react/dist/esm/icons/globe.js
|
384
430
|
init_react_import();
|
385
431
|
var Globe = createLucideIcon("Globe", [
|
@@ -403,12 +449,24 @@ var Layers = createLucideIcon("Layers", [
|
|
403
449
|
[
|
404
450
|
"path",
|
405
451
|
{
|
406
|
-
d: "
|
407
|
-
key: "
|
452
|
+
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",
|
453
|
+
key: "zw3jo"
|
408
454
|
}
|
409
455
|
],
|
410
|
-
[
|
411
|
-
|
456
|
+
[
|
457
|
+
"path",
|
458
|
+
{
|
459
|
+
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",
|
460
|
+
key: "1wduqc"
|
461
|
+
}
|
462
|
+
],
|
463
|
+
[
|
464
|
+
"path",
|
465
|
+
{
|
466
|
+
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",
|
467
|
+
key: "kqbvx6"
|
468
|
+
}
|
469
|
+
]
|
412
470
|
]);
|
413
471
|
|
414
472
|
// ../../node_modules/lucide-react/dist/esm/icons/layout-grid.js
|
@@ -430,12 +488,19 @@ var Link = createLucideIcon("Link", [
|
|
430
488
|
// ../../node_modules/lucide-react/dist/esm/icons/list.js
|
431
489
|
init_react_import();
|
432
490
|
var List = createLucideIcon("List", [
|
433
|
-
["
|
434
|
-
["
|
435
|
-
["
|
436
|
-
["
|
437
|
-
["
|
438
|
-
["
|
491
|
+
["path", { d: "M3 12h.01", key: "nlz23k" }],
|
492
|
+
["path", { d: "M3 18h.01", key: "1tta3j" }],
|
493
|
+
["path", { d: "M3 6h.01", key: "1rqtza" }],
|
494
|
+
["path", { d: "M8 12h13", key: "1za7za" }],
|
495
|
+
["path", { d: "M8 18h13", key: "1lx6n3" }],
|
496
|
+
["path", { d: "M8 6h13", key: "ik3vkj" }]
|
497
|
+
]);
|
498
|
+
|
499
|
+
// ../../node_modules/lucide-react/dist/esm/icons/lock-open.js
|
500
|
+
init_react_import();
|
501
|
+
var LockOpen = createLucideIcon("LockOpen", [
|
502
|
+
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
503
|
+
["path", { d: "M7 11V7a5 5 0 0 1 9.9-1", key: "1mm8w8" }]
|
439
504
|
]);
|
440
505
|
|
441
506
|
// ../../node_modules/lucide-react/dist/esm/icons/lock.js
|
@@ -453,26 +518,18 @@ var Monitor = createLucideIcon("Monitor", [
|
|
453
518
|
["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
|
454
519
|
]);
|
455
520
|
|
456
|
-
// ../../node_modules/lucide-react/dist/esm/icons/more-vertical.js
|
457
|
-
init_react_import();
|
458
|
-
var MoreVertical = createLucideIcon("MoreVertical", [
|
459
|
-
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
460
|
-
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
|
461
|
-
["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
|
462
|
-
]);
|
463
|
-
|
464
521
|
// ../../node_modules/lucide-react/dist/esm/icons/panel-left.js
|
465
522
|
init_react_import();
|
466
523
|
var PanelLeft = createLucideIcon("PanelLeft", [
|
467
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2",
|
468
|
-
["
|
524
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
525
|
+
["path", { d: "M9 3v18", key: "fh3hqa" }]
|
469
526
|
]);
|
470
527
|
|
471
528
|
// ../../node_modules/lucide-react/dist/esm/icons/panel-right.js
|
472
529
|
init_react_import();
|
473
530
|
var PanelRight = createLucideIcon("PanelRight", [
|
474
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2",
|
475
|
-
["
|
531
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
532
|
+
["path", { d: "M15 3v18", key: "14nvp0" }]
|
476
533
|
]);
|
477
534
|
|
478
535
|
// ../../node_modules/lucide-react/dist/esm/icons/plus.js
|
@@ -486,7 +543,7 @@ var Plus = createLucideIcon("Plus", [
|
|
486
543
|
init_react_import();
|
487
544
|
var Redo2 = createLucideIcon("Redo2", [
|
488
545
|
["path", { d: "m15 14 5-5-5-5", key: "12vg1m" }],
|
489
|
-
["path", { d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.
|
546
|
+
["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" }]
|
490
547
|
]);
|
491
548
|
|
492
549
|
// ../../node_modules/lucide-react/dist/esm/icons/search.js
|
@@ -544,14 +601,7 @@ var Type = createLucideIcon("Type", [
|
|
544
601
|
init_react_import();
|
545
602
|
var Undo2 = createLucideIcon("Undo2", [
|
546
603
|
["path", { d: "M9 14 4 9l5-5", key: "102s5s" }],
|
547
|
-
["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.
|
548
|
-
]);
|
549
|
-
|
550
|
-
// ../../node_modules/lucide-react/dist/esm/icons/unlock.js
|
551
|
-
init_react_import();
|
552
|
-
var Unlock = createLucideIcon("Unlock", [
|
553
|
-
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
554
|
-
["path", { d: "M7 11V7a5 5 0 0 1 9.9-1", key: "1mm8w8" }]
|
604
|
+
["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" }]
|
555
605
|
]);
|
556
606
|
|
557
607
|
// ../../node_modules/lucide-react/dist/esm/icons/zoom-in.js
|
@@ -576,7 +626,7 @@ init_react_import();
|
|
576
626
|
|
577
627
|
// components/IconButton/IconButton.tsx
|
578
628
|
init_react_import();
|
579
|
-
var
|
629
|
+
var import_react4 = require("react");
|
580
630
|
|
581
631
|
// css-module:/home/runner/work/puck/puck/packages/core/components/IconButton/IconButton.module.css#css-module
|
582
632
|
init_react_import();
|
@@ -653,7 +703,7 @@ var IconButton = ({
|
|
653
703
|
fullWidth,
|
654
704
|
title
|
655
705
|
}) => {
|
656
|
-
const [loading, setLoading] = (0,
|
706
|
+
const [loading, setLoading] = (0, import_react4.useState)(false);
|
657
707
|
const ElementType = href ? "a" : "button";
|
658
708
|
const el = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
659
709
|
ElementType,
|
@@ -697,7 +747,7 @@ var import_dnd = require("@measured/dnd");
|
|
697
747
|
|
698
748
|
// components/Puck/context.tsx
|
699
749
|
init_react_import();
|
700
|
-
var
|
750
|
+
var import_react7 = require("react");
|
701
751
|
|
702
752
|
// lib/get-item.ts
|
703
753
|
init_react_import();
|
@@ -742,7 +792,7 @@ var import_ua_parser_js = require("ua-parser-js");
|
|
742
792
|
|
743
793
|
// lib/use-resolved-permissions.ts
|
744
794
|
init_react_import();
|
745
|
-
var
|
795
|
+
var import_react5 = require("react");
|
746
796
|
|
747
797
|
// lib/flatten-data.ts
|
748
798
|
init_react_import();
|
@@ -767,9 +817,9 @@ var getChanged = (newItem, oldItem) => {
|
|
767
817
|
|
768
818
|
// lib/use-resolved-permissions.ts
|
769
819
|
var useResolvedPermissions = (config, appState, globalPermissions, setComponentLoading, unsetComponentLoading) => {
|
770
|
-
const [cache3, setCache] = (0,
|
771
|
-
const [resolvedPermissions, setResolvedPermissions] = (0,
|
772
|
-
const resolveDataForItem = (0,
|
820
|
+
const [cache3, setCache] = (0, import_react5.useState)({});
|
821
|
+
const [resolvedPermissions, setResolvedPermissions] = (0, import_react5.useState)({});
|
822
|
+
const resolveDataForItem = (0, import_react5.useCallback)(
|
773
823
|
(item, force = false) => __async(void 0, null, function* () {
|
774
824
|
var _a, _b, _c;
|
775
825
|
const componentConfig = item.type === "root" ? config.root : config.components[item.type];
|
@@ -816,7 +866,7 @@ var useResolvedPermissions = (config, appState, globalPermissions, setComponentL
|
|
816
866
|
force
|
817
867
|
);
|
818
868
|
};
|
819
|
-
const resolvePermissions = (0,
|
869
|
+
const resolvePermissions = (0, import_react5.useCallback)(
|
820
870
|
(..._0) => __async(void 0, [..._0], function* ({ item, type, root } = {}, force = false) {
|
821
871
|
if (item) {
|
822
872
|
yield resolveDataForItem(item, force);
|
@@ -835,16 +885,16 @@ var useResolvedPermissions = (config, appState, globalPermissions, setComponentL
|
|
835
885
|
}),
|
836
886
|
[config, appState]
|
837
887
|
);
|
838
|
-
const refreshPermissions = (0,
|
888
|
+
const refreshPermissions = (0, import_react5.useCallback)(
|
839
889
|
(params) => __async(void 0, null, function* () {
|
840
890
|
resolvePermissions(params, true);
|
841
891
|
}),
|
842
892
|
[config, appState]
|
843
893
|
);
|
844
|
-
(0,
|
894
|
+
(0, import_react5.useEffect)(() => {
|
845
895
|
resolvePermissions();
|
846
896
|
}, [config, appState.data]);
|
847
|
-
const getPermissions = (0,
|
897
|
+
const getPermissions = (0, import_react5.useCallback)(
|
848
898
|
({ item, type, root } = {}) => {
|
849
899
|
if (item) {
|
850
900
|
const componentConfig = config.components[item.type];
|
@@ -872,7 +922,7 @@ var useResolvedPermissions = (config, appState, globalPermissions, setComponentL
|
|
872
922
|
|
873
923
|
// lib/use-resolved-data.ts
|
874
924
|
init_react_import();
|
875
|
-
var
|
925
|
+
var import_react6 = require("react");
|
876
926
|
|
877
927
|
// lib/resolve-component-data.ts
|
878
928
|
init_react_import();
|
@@ -969,12 +1019,12 @@ function resolveRootData(data, config) {
|
|
969
1019
|
|
970
1020
|
// lib/use-resolved-data.ts
|
971
1021
|
var useResolvedData = (appState, config, dispatch, setComponentLoading, unsetComponentLoading, refreshPermissions) => {
|
972
|
-
const [{ resolverKey, newAppState }, setResolverState] = (0,
|
1022
|
+
const [{ resolverKey, newAppState }, setResolverState] = (0, import_react6.useState)({
|
973
1023
|
resolverKey: 0,
|
974
1024
|
newAppState: appState
|
975
1025
|
});
|
976
1026
|
const deferredSetStates = {};
|
977
|
-
const _setComponentLoading = (0,
|
1027
|
+
const _setComponentLoading = (0, import_react6.useCallback)(
|
978
1028
|
(id, loading, defer2 = 0) => {
|
979
1029
|
if (deferredSetStates[id]) {
|
980
1030
|
clearTimeout(deferredSetStates[id]);
|
@@ -1049,10 +1099,10 @@ var useResolvedData = (appState, config, dispatch, setComponentLoading, unsetCom
|
|
1049
1099
|
});
|
1050
1100
|
yield Promise.all(promises);
|
1051
1101
|
});
|
1052
|
-
(0,
|
1102
|
+
(0, import_react6.useEffect)(() => {
|
1053
1103
|
runResolvers();
|
1054
1104
|
}, [resolverKey]);
|
1055
|
-
const resolveData = (0,
|
1105
|
+
const resolveData = (0, import_react6.useCallback)((newAppState2 = appState) => {
|
1056
1106
|
setResolverState((curr) => ({
|
1057
1107
|
resolverKey: curr.resolverKey + 1,
|
1058
1108
|
newAppState: newAppState2
|
@@ -1112,18 +1162,18 @@ var defaultContext = {
|
|
1112
1162
|
getPermissions: () => ({}),
|
1113
1163
|
refreshPermissions: () => null
|
1114
1164
|
};
|
1115
|
-
var appContext = (0,
|
1165
|
+
var appContext = (0, import_react7.createContext)(defaultContext);
|
1116
1166
|
var AppProvider = ({
|
1117
1167
|
children,
|
1118
1168
|
value
|
1119
1169
|
}) => {
|
1120
|
-
const [zoomConfig, setZoomConfig] = (0,
|
1121
|
-
const [status, setStatus] = (0,
|
1122
|
-
(0,
|
1170
|
+
const [zoomConfig, setZoomConfig] = (0, import_react7.useState)(defaultContext.zoomConfig);
|
1171
|
+
const [status, setStatus] = (0, import_react7.useState)("LOADING");
|
1172
|
+
(0, import_react7.useEffect)(() => {
|
1123
1173
|
setStatus("MOUNTED");
|
1124
1174
|
}, []);
|
1125
|
-
const [safariFallbackMode, setSafariFallbackMode] = (0,
|
1126
|
-
(0,
|
1175
|
+
const [safariFallbackMode, setSafariFallbackMode] = (0, import_react7.useState)(false);
|
1176
|
+
(0, import_react7.useEffect)(() => {
|
1127
1177
|
var _a, _b, _c;
|
1128
1178
|
const ua = new import_ua_parser_js.UAParser(navigator.userAgent);
|
1129
1179
|
const { browser } = ua.getResult();
|
@@ -1141,7 +1191,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
1141
1191
|
}
|
1142
1192
|
}, []);
|
1143
1193
|
const selectedItem = value.state.ui.itemSelector ? getItem(value.state.ui.itemSelector, value.state.data) : void 0;
|
1144
|
-
const [componentState, setComponentState] = (0,
|
1194
|
+
const [componentState, setComponentState] = (0, import_react7.useState)({});
|
1145
1195
|
const setComponentLoading = (id) => {
|
1146
1196
|
setComponentState((prev) => {
|
1147
1197
|
var _a;
|
@@ -1198,7 +1248,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
1198
1248
|
);
|
1199
1249
|
};
|
1200
1250
|
function useAppContext() {
|
1201
|
-
const mainContext = (0,
|
1251
|
+
const mainContext = (0, import_react7.useContext)(appContext);
|
1202
1252
|
return __spreadProps(__spreadValues({}, mainContext), {
|
1203
1253
|
// Helpers
|
1204
1254
|
setUi: (ui, recordHistory) => {
|
@@ -1302,7 +1352,7 @@ var Draggable = ({
|
|
1302
1352
|
};
|
1303
1353
|
|
1304
1354
|
// components/AutoField/fields/ArrayField/index.tsx
|
1305
|
-
var
|
1355
|
+
var import_react8 = require("react");
|
1306
1356
|
|
1307
1357
|
// components/DragIcon/index.tsx
|
1308
1358
|
init_react_import();
|
@@ -1353,11 +1403,11 @@ var ArrayField = ({
|
|
1353
1403
|
}),
|
1354
1404
|
openId: ""
|
1355
1405
|
};
|
1356
|
-
const [localState, setLocalState] = (0,
|
1357
|
-
(0,
|
1406
|
+
const [localState, setLocalState] = (0, import_react8.useState)({ arrayState, value });
|
1407
|
+
(0, import_react8.useEffect)(() => {
|
1358
1408
|
setLocalState({ arrayState, value });
|
1359
1409
|
}, [value, state.ui.arrayState[id]]);
|
1360
|
-
const mapArrayStateToUi = (0,
|
1410
|
+
const mapArrayStateToUi = (0, import_react8.useCallback)(
|
1361
1411
|
(partialArrayState) => {
|
1362
1412
|
return {
|
1363
1413
|
arrayState: __spreadProps(__spreadValues({}, state.ui.arrayState), {
|
@@ -1367,13 +1417,13 @@ var ArrayField = ({
|
|
1367
1417
|
},
|
1368
1418
|
[arrayState]
|
1369
1419
|
);
|
1370
|
-
const getHighestIndex = (0,
|
1420
|
+
const getHighestIndex = (0, import_react8.useCallback)(() => {
|
1371
1421
|
return arrayState.items.reduce(
|
1372
1422
|
(acc, item) => item._originalIndex > acc ? item._originalIndex : acc,
|
1373
1423
|
-1
|
1374
1424
|
);
|
1375
1425
|
}, [arrayState]);
|
1376
|
-
const regenerateArrayState = (0,
|
1426
|
+
const regenerateArrayState = (0, import_react8.useCallback)(
|
1377
1427
|
(value2) => {
|
1378
1428
|
let highestIndex = getHighestIndex();
|
1379
1429
|
const newItems = Array.from(value2 || []).map((item, idx) => {
|
@@ -1392,12 +1442,12 @@ var ArrayField = ({
|
|
1392
1442
|
},
|
1393
1443
|
[arrayState]
|
1394
1444
|
);
|
1395
|
-
(0,
|
1445
|
+
(0, import_react8.useEffect)(() => {
|
1396
1446
|
if (arrayState.items.length > 0) {
|
1397
1447
|
setUi(mapArrayStateToUi(arrayState));
|
1398
1448
|
}
|
1399
1449
|
}, []);
|
1400
|
-
const [hovering, setHovering] = (0,
|
1450
|
+
const [hovering, setHovering] = (0, import_react8.useState)(false);
|
1401
1451
|
const forceReadOnly = getPermissions({ item: selectedItem }).edit === false;
|
1402
1452
|
if (field.type !== "array" || !field.arrayFields) {
|
1403
1453
|
return null;
|
@@ -1670,11 +1720,11 @@ var DefaultField = ({
|
|
1670
1720
|
|
1671
1721
|
// components/AutoField/fields/ExternalField/index.tsx
|
1672
1722
|
init_react_import();
|
1673
|
-
var
|
1723
|
+
var import_react12 = require("react");
|
1674
1724
|
|
1675
1725
|
// components/ExternalInput/index.tsx
|
1676
1726
|
init_react_import();
|
1677
|
-
var
|
1727
|
+
var import_react11 = require("react");
|
1678
1728
|
|
1679
1729
|
// css-module:/home/runner/work/puck/puck/packages/core/components/ExternalInput/styles.module.css#css-module
|
1680
1730
|
init_react_import();
|
@@ -1682,7 +1732,7 @@ var styles_module_default6 = { "ExternalInput-actions": "_ExternalInput-actions_
|
|
1682
1732
|
|
1683
1733
|
// components/Modal/index.tsx
|
1684
1734
|
init_react_import();
|
1685
|
-
var
|
1735
|
+
var import_react9 = require("react");
|
1686
1736
|
|
1687
1737
|
// css-module:/home/runner/work/puck/puck/packages/core/components/Modal/styles.module.css#css-module
|
1688
1738
|
init_react_import();
|
@@ -1697,8 +1747,8 @@ var Modal = ({
|
|
1697
1747
|
onClose,
|
1698
1748
|
isOpen
|
1699
1749
|
}) => {
|
1700
|
-
const [rootEl, setRootEl] = (0,
|
1701
|
-
(0,
|
1750
|
+
const [rootEl, setRootEl] = (0, import_react9.useState)(null);
|
1751
|
+
(0, import_react9.useEffect)(() => {
|
1702
1752
|
setRootEl(document.getElementById("puck-portal-root"));
|
1703
1753
|
}, []);
|
1704
1754
|
if (!rootEl) {
|
@@ -1745,7 +1795,7 @@ init_react_import();
|
|
1745
1795
|
|
1746
1796
|
// components/Button/Button.tsx
|
1747
1797
|
init_react_import();
|
1748
|
-
var
|
1798
|
+
var import_react10 = require("react");
|
1749
1799
|
|
1750
1800
|
// css-module:/home/runner/work/puck/puck/packages/core/components/Button/Button.module.css#css-module
|
1751
1801
|
init_react_import();
|
@@ -1768,8 +1818,8 @@ var Button = ({
|
|
1768
1818
|
size = "medium",
|
1769
1819
|
loading: loadingProp = false
|
1770
1820
|
}) => {
|
1771
|
-
const [loading, setLoading] = (0,
|
1772
|
-
(0,
|
1821
|
+
const [loading, setLoading] = (0, import_react10.useState)(loadingProp);
|
1822
|
+
(0, import_react10.useEffect)(() => setLoading(loadingProp), [loadingProp]);
|
1773
1823
|
const ElementType = href ? "a" : type ? "button" : "span";
|
1774
1824
|
const el = /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
1775
1825
|
ElementType,
|
@@ -1822,28 +1872,28 @@ var ExternalInput = ({
|
|
1822
1872
|
mapRow = (val) => val,
|
1823
1873
|
filterFields
|
1824
1874
|
} = field || {};
|
1825
|
-
const [data, setData] = (0,
|
1826
|
-
const [isOpen, setOpen] = (0,
|
1827
|
-
const [isLoading, setIsLoading] = (0,
|
1875
|
+
const [data, setData] = (0, import_react11.useState)([]);
|
1876
|
+
const [isOpen, setOpen] = (0, import_react11.useState)(false);
|
1877
|
+
const [isLoading, setIsLoading] = (0, import_react11.useState)(true);
|
1828
1878
|
const hasFilterFields = !!filterFields;
|
1829
|
-
const [filters, setFilters] = (0,
|
1830
|
-
const [filtersToggled, setFiltersToggled] = (0,
|
1831
|
-
const mappedData = (0,
|
1879
|
+
const [filters, setFilters] = (0, import_react11.useState)(field.initialFilters || {});
|
1880
|
+
const [filtersToggled, setFiltersToggled] = (0, import_react11.useState)(hasFilterFields);
|
1881
|
+
const mappedData = (0, import_react11.useMemo)(() => {
|
1832
1882
|
return data.map(mapRow);
|
1833
1883
|
}, [data]);
|
1834
|
-
const keys = (0,
|
1884
|
+
const keys = (0, import_react11.useMemo)(() => {
|
1835
1885
|
const validKeys = /* @__PURE__ */ new Set();
|
1836
1886
|
for (const item of mappedData) {
|
1837
1887
|
for (const key of Object.keys(item)) {
|
1838
|
-
if (typeof item[key] === "string" || typeof item[key] === "number" || (0,
|
1888
|
+
if (typeof item[key] === "string" || typeof item[key] === "number" || (0, import_react11.isValidElement)(item[key])) {
|
1839
1889
|
validKeys.add(key);
|
1840
1890
|
}
|
1841
1891
|
}
|
1842
1892
|
}
|
1843
1893
|
return Array.from(validKeys);
|
1844
1894
|
}, [mappedData]);
|
1845
|
-
const [searchQuery, setSearchQuery] = (0,
|
1846
|
-
const search = (0,
|
1895
|
+
const [searchQuery, setSearchQuery] = (0, import_react11.useState)(field.initialQuery || "");
|
1896
|
+
const search = (0, import_react11.useCallback)(
|
1847
1897
|
(query, filters2) => __async(void 0, null, function* () {
|
1848
1898
|
setIsLoading(true);
|
1849
1899
|
const cacheKey = `${id}-${query}-${JSON.stringify(filters2)}`;
|
@@ -1856,7 +1906,7 @@ var ExternalInput = ({
|
|
1856
1906
|
}),
|
1857
1907
|
[id, field]
|
1858
1908
|
);
|
1859
|
-
const Footer = (0,
|
1909
|
+
const Footer = (0, import_react11.useCallback)(
|
1860
1910
|
(props) => field.renderFooter ? field.renderFooter(props) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: getClassNameModal("footer"), children: [
|
1861
1911
|
props.items.length,
|
1862
1912
|
" result",
|
@@ -1864,7 +1914,7 @@ var ExternalInput = ({
|
|
1864
1914
|
] }),
|
1865
1915
|
[field.renderFooter]
|
1866
1916
|
);
|
1867
|
-
(0,
|
1917
|
+
(0, import_react11.useEffect)(() => {
|
1868
1918
|
search(searchQuery, filters);
|
1869
1919
|
}, []);
|
1870
1920
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
@@ -1900,7 +1950,7 @@ var ExternalInput = ({
|
|
1900
1950
|
onChange(null);
|
1901
1951
|
},
|
1902
1952
|
disabled: readOnly,
|
1903
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
1953
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(LockOpen, { size: 16 })
|
1904
1954
|
}
|
1905
1955
|
)
|
1906
1956
|
] }),
|
@@ -2027,7 +2077,7 @@ var ExternalField = ({
|
|
2027
2077
|
var _a, _b, _c;
|
2028
2078
|
const validField = field;
|
2029
2079
|
const deprecatedField = field;
|
2030
|
-
(0,
|
2080
|
+
(0, import_react12.useEffect)(() => {
|
2031
2081
|
if (deprecatedField.adaptor) {
|
2032
2082
|
console.error(
|
2033
2083
|
"Warning: The `adaptor` API is deprecated. Please use updated APIs on the `external` field instead. This will be a breaking change in a future release."
|
@@ -2062,7 +2112,7 @@ var ExternalField = ({
|
|
2062
2112
|
|
2063
2113
|
// components/AutoField/fields/RadioField/index.tsx
|
2064
2114
|
init_react_import();
|
2065
|
-
var
|
2115
|
+
var import_react13 = require("react");
|
2066
2116
|
|
2067
2117
|
// lib/safe-json-parse.ts
|
2068
2118
|
init_react_import();
|
@@ -2088,7 +2138,7 @@ var RadioField = ({
|
|
2088
2138
|
label,
|
2089
2139
|
Label
|
2090
2140
|
}) => {
|
2091
|
-
const flatOptions = (0,
|
2141
|
+
const flatOptions = (0, import_react13.useMemo)(
|
2092
2142
|
() => field.type === "radio" ? field.options.map(({ value: value2 }) => value2) : [],
|
2093
2143
|
[field]
|
2094
2144
|
);
|
@@ -2098,7 +2148,7 @@ var RadioField = ({
|
|
2098
2148
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
2099
2149
|
Label,
|
2100
2150
|
{
|
2101
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
2151
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CircleCheckBig, { size: 16 }),
|
2102
2152
|
label: label || name,
|
2103
2153
|
readOnly,
|
2104
2154
|
el: "div",
|
@@ -2137,7 +2187,7 @@ var RadioField = ({
|
|
2137
2187
|
|
2138
2188
|
// components/AutoField/fields/SelectField/index.tsx
|
2139
2189
|
init_react_import();
|
2140
|
-
var
|
2190
|
+
var import_react14 = require("react");
|
2141
2191
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
2142
2192
|
var getClassName12 = get_class_name_factory_default("Input", styles_module_default2);
|
2143
2193
|
var SelectField = ({
|
@@ -2150,7 +2200,7 @@ var SelectField = ({
|
|
2150
2200
|
readOnly,
|
2151
2201
|
id
|
2152
2202
|
}) => {
|
2153
|
-
const flatOptions = (0,
|
2203
|
+
const flatOptions = (0, import_react14.useMemo)(
|
2154
2204
|
() => field.type === "select" ? field.options.map(({ value: value2 }) => value2) : [],
|
2155
2205
|
[field]
|
2156
2206
|
);
|
@@ -2255,7 +2305,7 @@ var ObjectField = ({
|
|
2255
2305
|
Label,
|
2256
2306
|
{
|
2257
2307
|
label: label || name,
|
2258
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
2308
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(EllipsisVertical, { size: 16 }),
|
2259
2309
|
el: "div",
|
2260
2310
|
readOnly,
|
2261
2311
|
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: getClassName14(), children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("fieldset", { className: getClassName14("fieldset"), children: Object.keys(field.objectFields).map((fieldName) => {
|
@@ -2290,7 +2340,7 @@ var ObjectField = ({
|
|
2290
2340
|
|
2291
2341
|
// lib/use-safe-id.ts
|
2292
2342
|
init_react_import();
|
2293
|
-
var
|
2343
|
+
var import_react15 = __toESM(require("react"));
|
2294
2344
|
|
2295
2345
|
// lib/generate-id.ts
|
2296
2346
|
init_react_import();
|
@@ -2299,10 +2349,10 @@ var generateId = (type) => type ? `${type}-${(0, import_uuid.v4)()}` : (0, impor
|
|
2299
2349
|
|
2300
2350
|
// lib/use-safe-id.ts
|
2301
2351
|
var useSafeId = () => {
|
2302
|
-
if (typeof
|
2303
|
-
return
|
2352
|
+
if (typeof import_react15.default.useId !== "undefined") {
|
2353
|
+
return import_react15.default.useId();
|
2304
2354
|
}
|
2305
|
-
const [id] = (0,
|
2355
|
+
const [id] = (0, import_react15.useState)(generateId());
|
2306
2356
|
return id;
|
2307
2357
|
};
|
2308
2358
|
|
@@ -2336,7 +2386,7 @@ var FieldLabelInternal2 = ({
|
|
2336
2386
|
readOnly
|
2337
2387
|
}) => {
|
2338
2388
|
const { overrides } = useAppContext();
|
2339
|
-
const Wrapper = (0,
|
2389
|
+
const Wrapper = (0, import_react16.useMemo)(
|
2340
2390
|
() => overrides.fieldLabel || FieldLabel,
|
2341
2391
|
[overrides]
|
2342
2392
|
);
|
@@ -2389,7 +2439,7 @@ function AutoFieldInternal(props) {
|
|
2389
2439
|
Label,
|
2390
2440
|
id: resolvedId
|
2391
2441
|
});
|
2392
|
-
const onFocus = (0,
|
2442
|
+
const onFocus = (0, import_react16.useCallback)(
|
2393
2443
|
(e) => {
|
2394
2444
|
if (mergedProps.name && e.target.nodeName === "INPUT") {
|
2395
2445
|
e.stopPropagation();
|
@@ -2403,7 +2453,7 @@ function AutoFieldInternal(props) {
|
|
2403
2453
|
},
|
2404
2454
|
[mergedProps.name]
|
2405
2455
|
);
|
2406
|
-
const onBlur = (0,
|
2456
|
+
const onBlur = (0, import_react16.useCallback)((e) => {
|
2407
2457
|
if ("name" in e.target) {
|
2408
2458
|
dispatch({
|
2409
2459
|
type: "setUi",
|
@@ -2438,7 +2488,7 @@ function AutoFieldInternal(props) {
|
|
2438
2488
|
function AutoFieldPrivate(props) {
|
2439
2489
|
const { state } = useAppContext();
|
2440
2490
|
const { value, onChange } = props;
|
2441
|
-
const [localValue, setLocalValue] = (0,
|
2491
|
+
const [localValue, setLocalValue] = (0, import_react16.useState)(value);
|
2442
2492
|
const onChangeDb = (0, import_use_debounce.useDebouncedCallback)(
|
2443
2493
|
(val, ui) => {
|
2444
2494
|
onChange(val, ui);
|
@@ -2446,11 +2496,11 @@ function AutoFieldPrivate(props) {
|
|
2446
2496
|
50,
|
2447
2497
|
{ leading: true }
|
2448
2498
|
);
|
2449
|
-
const onChangeLocal = (0,
|
2499
|
+
const onChangeLocal = (0, import_react16.useCallback)((val, ui) => {
|
2450
2500
|
setLocalValue(val);
|
2451
2501
|
onChangeDb(val, ui);
|
2452
2502
|
}, []);
|
2453
|
-
(0,
|
2503
|
+
(0, import_react16.useEffect)(() => {
|
2454
2504
|
if (state.ui.field.focus !== props.name) {
|
2455
2505
|
setLocalValue(value);
|
2456
2506
|
}
|
@@ -2462,7 +2512,7 @@ function AutoFieldPrivate(props) {
|
|
2462
2512
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(AutoFieldInternal, __spreadValues(__spreadValues({}, props), localProps));
|
2463
2513
|
}
|
2464
2514
|
function AutoField(props) {
|
2465
|
-
const DefaultLabel = (0,
|
2515
|
+
const DefaultLabel = (0, import_react16.useMemo)(() => {
|
2466
2516
|
const DefaultLabel2 = (labelProps) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
2467
2517
|
"div",
|
2468
2518
|
__spreadProps(__spreadValues({}, labelProps), {
|
@@ -2482,11 +2532,11 @@ init_react_import();
|
|
2482
2532
|
var styles_module_default10 = { "Drawer": "_Drawer_1oa7v_1", "DrawerItem--disabled": "_DrawerItem--disabled_1oa7v_5", "DrawerItem-draggable": "_DrawerItem-draggable_1oa7v_5", "DrawerItem-default": "_DrawerItem-default_1oa7v_11", "DrawerItem-draggableWrapper": "_DrawerItem-draggableWrapper_1oa7v_11", "DrawerItem": "_DrawerItem_1oa7v_5", "Drawer--isDraggingFrom": "_Drawer--isDraggingFrom_1oa7v_36", "DrawerItem-name": "_DrawerItem-name_1oa7v_54" };
|
2483
2533
|
|
2484
2534
|
// components/Drawer/index.tsx
|
2485
|
-
var
|
2535
|
+
var import_react17 = require("react");
|
2486
2536
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
2487
2537
|
var getClassName16 = get_class_name_factory_default("Drawer", styles_module_default10);
|
2488
2538
|
var getClassNameItem2 = get_class_name_factory_default("DrawerItem", styles_module_default10);
|
2489
|
-
var drawerContext = (0,
|
2539
|
+
var drawerContext = (0, import_react17.createContext)({
|
2490
2540
|
droppableId: ""
|
2491
2541
|
});
|
2492
2542
|
var DrawerDraggable = ({
|
@@ -2517,9 +2567,9 @@ var DrawerItem = ({
|
|
2517
2567
|
index,
|
2518
2568
|
isDragDisabled
|
2519
2569
|
}) => {
|
2520
|
-
const ctx = (0,
|
2570
|
+
const ctx = (0, import_react17.useContext)(drawerContext);
|
2521
2571
|
const resolvedId = `${ctx.droppableId}::${id || name}`;
|
2522
|
-
const CustomInner = (0,
|
2572
|
+
const CustomInner = (0, import_react17.useMemo)(
|
2523
2573
|
() => children || (({ children: children2, name: name2 }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: getClassNameItem2("default"), children: children2 })),
|
2524
2574
|
[children]
|
2525
2575
|
);
|
@@ -2560,11 +2610,11 @@ Drawer.Item = DrawerItem;
|
|
2560
2610
|
|
2561
2611
|
// components/DropZone/index.tsx
|
2562
2612
|
init_react_import();
|
2563
|
-
var
|
2613
|
+
var import_react21 = require("react");
|
2564
2614
|
|
2565
2615
|
// components/DraggableComponent/index.tsx
|
2566
2616
|
init_react_import();
|
2567
|
-
var
|
2617
|
+
var import_react19 = require("react");
|
2568
2618
|
var import_dnd4 = require("@measured/dnd");
|
2569
2619
|
|
2570
2620
|
// css-module:/home/runner/work/puck/puck/packages/core/components/DraggableComponent/styles.module.css#css-module
|
@@ -2573,10 +2623,10 @@ var styles_module_default11 = { "DraggableComponent": "_DraggableComponent_1bhad
|
|
2573
2623
|
|
2574
2624
|
// lib/use-modifier-held.ts
|
2575
2625
|
init_react_import();
|
2576
|
-
var
|
2626
|
+
var import_react18 = require("react");
|
2577
2627
|
var useModifierHeld = (modifier) => {
|
2578
|
-
const [modifierHeld, setModifierHeld] = (0,
|
2579
|
-
(0,
|
2628
|
+
const [modifierHeld, setModifierHeld] = (0, import_react18.useState)(false);
|
2629
|
+
(0, import_react18.useEffect)(() => {
|
2580
2630
|
function downHandler({ key }) {
|
2581
2631
|
if (key === modifier) {
|
2582
2632
|
setModifierHeld(true);
|
@@ -2645,14 +2695,14 @@ var DraggableComponent = ({
|
|
2645
2695
|
const { zoomConfig, status, overrides, selectedItem, getPermissions } = useAppContext();
|
2646
2696
|
const isModifierHeld = useModifierHeld("Alt");
|
2647
2697
|
const El = status !== "LOADING" ? import_dnd4.Draggable : DefaultDraggable;
|
2648
|
-
(0,
|
2649
|
-
const [disableSecondaryAnimation, setDisableSecondaryAnimation] = (0,
|
2650
|
-
(0,
|
2698
|
+
(0, import_react19.useEffect)(onMount, []);
|
2699
|
+
const [disableSecondaryAnimation, setDisableSecondaryAnimation] = (0, import_react19.useState)(false);
|
2700
|
+
(0, import_react19.useEffect)(() => {
|
2651
2701
|
if (isIos()) {
|
2652
2702
|
setDisableSecondaryAnimation(true);
|
2653
2703
|
}
|
2654
2704
|
}, []);
|
2655
|
-
const CustomActionBar = (0,
|
2705
|
+
const CustomActionBar = (0, import_react19.useMemo)(
|
2656
2706
|
() => overrides.actionBar || DefaultActionBar,
|
2657
2707
|
[overrides.actionBar]
|
2658
2708
|
);
|
@@ -2730,7 +2780,7 @@ var styles_module_default12 = { "DropZone": "_DropZone_djoti_1", "DropZone-conte
|
|
2730
2780
|
|
2731
2781
|
// components/DropZone/context.tsx
|
2732
2782
|
init_react_import();
|
2733
|
-
var
|
2783
|
+
var import_react20 = require("react");
|
2734
2784
|
var import_use_debounce2 = require("use-debounce");
|
2735
2785
|
|
2736
2786
|
// lib/get-zone-id.ts
|
@@ -2747,29 +2797,29 @@ var getZoneId = (zoneCompound) => {
|
|
2747
2797
|
|
2748
2798
|
// components/DropZone/context.tsx
|
2749
2799
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
2750
|
-
var dropZoneContext = (0,
|
2800
|
+
var dropZoneContext = (0, import_react20.createContext)(null);
|
2751
2801
|
var DropZoneProvider = ({
|
2752
2802
|
children,
|
2753
2803
|
value
|
2754
2804
|
}) => {
|
2755
|
-
const [hoveringArea, setHoveringArea] = (0,
|
2756
|
-
const [hoveringZone, setHoveringZone] = (0,
|
2805
|
+
const [hoveringArea, setHoveringArea] = (0, import_react20.useState)(null);
|
2806
|
+
const [hoveringZone, setHoveringZone] = (0, import_react20.useState)(
|
2757
2807
|
rootDroppableId
|
2758
2808
|
);
|
2759
|
-
const [hoveringComponent, setHoveringComponent] = (0,
|
2809
|
+
const [hoveringComponent, setHoveringComponent] = (0, import_react20.useState)();
|
2760
2810
|
const [hoveringAreaDb] = (0, import_use_debounce2.useDebounce)(hoveringArea, 75, { leading: false });
|
2761
|
-
const [areasWithZones, setAreasWithZones] = (0,
|
2811
|
+
const [areasWithZones, setAreasWithZones] = (0, import_react20.useState)(
|
2762
2812
|
{}
|
2763
2813
|
);
|
2764
|
-
const [activeZones, setActiveZones] = (0,
|
2814
|
+
const [activeZones, setActiveZones] = (0, import_react20.useState)({});
|
2765
2815
|
const { dispatch = null } = value ? value : {};
|
2766
|
-
const registerZoneArea = (0,
|
2816
|
+
const registerZoneArea = (0, import_react20.useCallback)(
|
2767
2817
|
(area) => {
|
2768
2818
|
setAreasWithZones((latest) => __spreadProps(__spreadValues({}, latest), { [area]: true }));
|
2769
2819
|
},
|
2770
2820
|
[setAreasWithZones]
|
2771
2821
|
);
|
2772
|
-
const registerZone = (0,
|
2822
|
+
const registerZone = (0, import_react20.useCallback)(
|
2773
2823
|
(zoneCompound) => {
|
2774
2824
|
if (!dispatch) {
|
2775
2825
|
return;
|
@@ -2782,7 +2832,7 @@ var DropZoneProvider = ({
|
|
2782
2832
|
},
|
2783
2833
|
[setActiveZones, dispatch]
|
2784
2834
|
);
|
2785
|
-
const unregisterZone = (0,
|
2835
|
+
const unregisterZone = (0, import_react20.useCallback)(
|
2786
2836
|
(zoneCompound) => {
|
2787
2837
|
if (!dispatch) {
|
2788
2838
|
return;
|
@@ -2797,8 +2847,8 @@ var DropZoneProvider = ({
|
|
2797
2847
|
},
|
2798
2848
|
[setActiveZones, dispatch]
|
2799
2849
|
);
|
2800
|
-
const [pathData, setPathData] = (0,
|
2801
|
-
const registerPath = (0,
|
2850
|
+
const [pathData, setPathData] = (0, import_react20.useState)();
|
2851
|
+
const registerPath = (0, import_react20.useCallback)(
|
2802
2852
|
(selector) => {
|
2803
2853
|
if (!(value == null ? void 0 : value.data)) {
|
2804
2854
|
return;
|
@@ -2823,7 +2873,7 @@ var DropZoneProvider = ({
|
|
2823
2873
|
},
|
2824
2874
|
[value, setPathData]
|
2825
2875
|
);
|
2826
|
-
const [zoneWillDrag, setZoneWillDrag] = (0,
|
2876
|
+
const [zoneWillDrag, setZoneWillDrag] = (0, import_react20.useState)("");
|
2827
2877
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_jsx_runtime23.Fragment, { children: value && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
2828
2878
|
dropZoneContext.Provider,
|
2829
2879
|
{
|
@@ -2855,7 +2905,7 @@ var getClassName18 = get_class_name_factory_default("DropZone", styles_module_de
|
|
2855
2905
|
function DropZoneEdit({ zone, allow, disallow, style }) {
|
2856
2906
|
var _a;
|
2857
2907
|
const appContext2 = useAppContext();
|
2858
|
-
const ctx = (0,
|
2908
|
+
const ctx = (0, import_react21.useContext)(dropZoneContext);
|
2859
2909
|
const {
|
2860
2910
|
// These all need setting via context
|
2861
2911
|
data,
|
@@ -2874,12 +2924,12 @@ function DropZoneEdit({ zone, allow, disallow, style }) {
|
|
2874
2924
|
} = ctx || {};
|
2875
2925
|
let content = data.content || [];
|
2876
2926
|
let zoneCompound = rootDroppableId;
|
2877
|
-
(0,
|
2927
|
+
(0, import_react21.useEffect)(() => {
|
2878
2928
|
if (areaId && registerZoneArea) {
|
2879
2929
|
registerZoneArea(areaId);
|
2880
2930
|
}
|
2881
2931
|
}, [areaId]);
|
2882
|
-
(0,
|
2932
|
+
(0, import_react21.useEffect)(() => {
|
2883
2933
|
if (ctx == null ? void 0 : ctx.registerZone) {
|
2884
2934
|
ctx == null ? void 0 : ctx.registerZone(zoneCompound);
|
2885
2935
|
}
|
@@ -3135,7 +3185,7 @@ function DropZoneEdit({ zone, allow, disallow, style }) {
|
|
3135
3185
|
);
|
3136
3186
|
}
|
3137
3187
|
function DropZoneRender({ zone }) {
|
3138
|
-
const ctx = (0,
|
3188
|
+
const ctx = (0, import_react21.useContext)(dropZoneContext);
|
3139
3189
|
const { data, areaId = "root", config } = ctx || {};
|
3140
3190
|
let zoneCompound = rootDroppableId;
|
3141
3191
|
let content = (data == null ? void 0 : data.content) || [];
|
@@ -3167,7 +3217,7 @@ function DropZoneRender({ zone }) {
|
|
3167
3217
|
}) });
|
3168
3218
|
}
|
3169
3219
|
function DropZone(props) {
|
3170
|
-
const ctx = (0,
|
3220
|
+
const ctx = (0, import_react21.useContext)(dropZoneContext);
|
3171
3221
|
if ((ctx == null ? void 0 : ctx.mode) === "edit") {
|
3172
3222
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropZoneEdit, __spreadValues({}, props));
|
3173
3223
|
}
|
@@ -3176,11 +3226,11 @@ function DropZone(props) {
|
|
3176
3226
|
|
3177
3227
|
// components/Puck/index.tsx
|
3178
3228
|
init_react_import();
|
3179
|
-
var
|
3229
|
+
var import_react36 = require("react");
|
3180
3230
|
|
3181
3231
|
// lib/use-placeholder-style.ts
|
3182
3232
|
init_react_import();
|
3183
|
-
var
|
3233
|
+
var import_react22 = require("react");
|
3184
3234
|
|
3185
3235
|
// lib/get-frame.ts
|
3186
3236
|
init_react_import();
|
@@ -3195,7 +3245,7 @@ var getFrame = () => {
|
|
3195
3245
|
// lib/use-placeholder-style.ts
|
3196
3246
|
var usePlaceholderStyle = () => {
|
3197
3247
|
const queryAttr = "data-rfd-drag-handle-draggable-id";
|
3198
|
-
const [placeholderStyle, setPlaceholderStyle] = (0,
|
3248
|
+
const [placeholderStyle, setPlaceholderStyle] = (0, import_react22.useState)();
|
3199
3249
|
const onDragStartOrUpdate = (draggedItem) => {
|
3200
3250
|
var _a;
|
3201
3251
|
const draggableId = draggedItem.draggableId;
|
@@ -3248,7 +3298,7 @@ var styles_module_default13 = { "SidebarSection": "_SidebarSection_125qe_1", "Si
|
|
3248
3298
|
|
3249
3299
|
// lib/use-breadcrumbs.ts
|
3250
3300
|
init_react_import();
|
3251
|
-
var
|
3301
|
+
var import_react23 = require("react");
|
3252
3302
|
var convertPathDataToBreadcrumbs = (selectedItem, pathData, data) => {
|
3253
3303
|
const id = selectedItem ? selectedItem == null ? void 0 : selectedItem.props.id : "";
|
3254
3304
|
const currentPathData = pathData && id && pathData[id] ? __spreadValues({}, pathData[id]) : { label: "Page", path: [] };
|
@@ -3298,8 +3348,8 @@ var useBreadcrumbs = (renderCount) => {
|
|
3298
3348
|
state: { data },
|
3299
3349
|
selectedItem
|
3300
3350
|
} = useAppContext();
|
3301
|
-
const dzContext = (0,
|
3302
|
-
return (0,
|
3351
|
+
const dzContext = (0, import_react23.useContext)(dropZoneContext);
|
3352
|
+
return (0, import_react23.useMemo)(() => {
|
3303
3353
|
const breadcrumbs = convertPathDataToBreadcrumbs(
|
3304
3354
|
selectedItem,
|
3305
3355
|
dzContext == null ? void 0 : dzContext.pathData,
|
@@ -3783,15 +3833,15 @@ init_react_import();
|
|
3783
3833
|
var styles_module_default16 = { "PuckFields": "_PuckFields_jp3lw_1", "PuckFields--isLoading": "_PuckFields--isLoading_jp3lw_6", "PuckFields-loadingOverlay": "_PuckFields-loadingOverlay_jp3lw_10", "PuckFields-loadingOverlayInner": "_PuckFields-loadingOverlayInner_jp3lw_25" };
|
3784
3834
|
|
3785
3835
|
// components/Puck/components/Fields/index.tsx
|
3786
|
-
var
|
3836
|
+
var import_react25 = require("react");
|
3787
3837
|
|
3788
3838
|
// lib/use-parent.ts
|
3789
3839
|
init_react_import();
|
3790
|
-
var
|
3840
|
+
var import_react24 = require("react");
|
3791
3841
|
var useParent = (itemSelector) => {
|
3792
3842
|
var _a;
|
3793
3843
|
const { selectedItem, state } = useAppContext();
|
3794
|
-
const { pathData } = (0,
|
3844
|
+
const { pathData } = (0, import_react24.useContext)(dropZoneContext) || {};
|
3795
3845
|
const item = itemSelector ? getItem(itemSelector, state.data) : selectedItem;
|
3796
3846
|
const breadcrumbs = convertPathDataToBreadcrumbs(item, pathData, state.data);
|
3797
3847
|
const lastItem = breadcrumbs[breadcrumbs.length - 1];
|
@@ -3817,20 +3867,20 @@ var useResolvedFields = () => {
|
|
3817
3867
|
const { data } = state;
|
3818
3868
|
const rootFields = ((_a = config.root) == null ? void 0 : _a.fields) || defaultPageFields;
|
3819
3869
|
const componentConfig = selectedItem ? config.components[selectedItem.type] : null;
|
3820
|
-
const defaultFields = (0,
|
3870
|
+
const defaultFields = (0, import_react25.useMemo)(
|
3821
3871
|
() => (selectedItem ? componentConfig == null ? void 0 : componentConfig.fields : rootFields) || {},
|
3822
3872
|
[selectedItem, rootFields, componentConfig == null ? void 0 : componentConfig.fields]
|
3823
3873
|
);
|
3824
3874
|
const rootProps = data.root.props || data.root;
|
3825
|
-
const [lastSelectedData, setLastSelectedData] = (0,
|
3826
|
-
const [resolvedFields, setResolvedFields] = (0,
|
3827
|
-
const [fieldsLoading, setFieldsLoading] = (0,
|
3875
|
+
const [lastSelectedData, setLastSelectedData] = (0, import_react25.useState)({});
|
3876
|
+
const [resolvedFields, setResolvedFields] = (0, import_react25.useState)(defaultFields);
|
3877
|
+
const [fieldsLoading, setFieldsLoading] = (0, import_react25.useState)(false);
|
3828
3878
|
const defaultResolveFields = (_componentData, _params) => defaultFields;
|
3829
3879
|
const componentData = selectedItem ? selectedItem : { props: rootProps, readOnly: data.root.readOnly };
|
3830
3880
|
const hasComponentResolver = selectedItem && (componentConfig == null ? void 0 : componentConfig.resolveFields);
|
3831
3881
|
const hasRootResolver = !selectedItem && ((_b = config.root) == null ? void 0 : _b.resolveFields);
|
3832
3882
|
const hasResolver = hasComponentResolver || hasRootResolver;
|
3833
|
-
const resolveFields = (0,
|
3883
|
+
const resolveFields = (0, import_react25.useCallback)(
|
3834
3884
|
(..._0) => __async(void 0, [..._0], function* (fields = {}) {
|
3835
3885
|
var _a2;
|
3836
3886
|
const lastData = ((_a2 = lastSelectedData.props) == null ? void 0 : _a2.id) === componentData.props.id ? lastSelectedData : null;
|
@@ -3868,7 +3918,7 @@ var useResolvedFields = () => {
|
|
3868
3918
|
}),
|
3869
3919
|
[data, config, componentData, selectedItem, resolvedFields, state]
|
3870
3920
|
);
|
3871
|
-
(0,
|
3921
|
+
(0, import_react25.useEffect)(() => {
|
3872
3922
|
if (hasResolver) {
|
3873
3923
|
setFieldsLoading(true);
|
3874
3924
|
resolveFields(defaultFields).then((fields) => {
|
@@ -3899,7 +3949,7 @@ var Fields = () => {
|
|
3899
3949
|
const componentResolving = selectedItem ? ((_a = componentState[selectedItem == null ? void 0 : selectedItem.props.id]) == null ? void 0 : _a.loadingCount) > 0 : ((_b = componentState["puck-root"]) == null ? void 0 : _b.loadingCount) > 0;
|
3900
3950
|
const isLoading = fieldsResolving || componentResolving;
|
3901
3951
|
const rootProps = data.root.props || data.root;
|
3902
|
-
const Wrapper = (0,
|
3952
|
+
const Wrapper = (0, import_react25.useMemo)(() => overrides.fields || DefaultFields, [overrides]);
|
3903
3953
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
3904
3954
|
"form",
|
3905
3955
|
{
|
@@ -4022,7 +4072,7 @@ init_react_import();
|
|
4022
4072
|
|
4023
4073
|
// lib/use-component-list.tsx
|
4024
4074
|
init_react_import();
|
4025
|
-
var
|
4075
|
+
var import_react26 = require("react");
|
4026
4076
|
|
4027
4077
|
// components/ComponentList/index.tsx
|
4028
4078
|
init_react_import();
|
@@ -4100,8 +4150,8 @@ ComponentList.Item = ComponentListItem;
|
|
4100
4150
|
// lib/use-component-list.tsx
|
4101
4151
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
4102
4152
|
var useComponentList = (config, ui) => {
|
4103
|
-
const [componentList, setComponentList] = (0,
|
4104
|
-
(0,
|
4153
|
+
const [componentList, setComponentList] = (0, import_react26.useState)();
|
4154
|
+
(0, import_react26.useEffect)(() => {
|
4105
4155
|
var _a, _b, _c;
|
4106
4156
|
if (Object.keys(ui.componentList).length > 0) {
|
4107
4157
|
const matchedComponents = [];
|
@@ -4170,22 +4220,22 @@ var useComponentList = (config, ui) => {
|
|
4170
4220
|
};
|
4171
4221
|
|
4172
4222
|
// components/Puck/components/Components/index.tsx
|
4173
|
-
var
|
4223
|
+
var import_react27 = require("react");
|
4174
4224
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
4175
4225
|
var Components = () => {
|
4176
4226
|
const { config, state, overrides } = useAppContext();
|
4177
4227
|
const componentList = useComponentList(config, state.ui);
|
4178
|
-
const Wrapper = (0,
|
4228
|
+
const Wrapper = (0, import_react27.useMemo)(() => overrides.components || "div", [overrides]);
|
4179
4229
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Wrapper, { children: componentList ? componentList : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ComponentList, { id: "all" }) });
|
4180
4230
|
};
|
4181
4231
|
|
4182
4232
|
// components/Puck/components/Preview/index.tsx
|
4183
4233
|
init_react_import();
|
4184
|
-
var
|
4234
|
+
var import_react29 = require("react");
|
4185
4235
|
|
4186
4236
|
// components/AutoFrame/index.tsx
|
4187
4237
|
init_react_import();
|
4188
|
-
var
|
4238
|
+
var import_react28 = require("react");
|
4189
4239
|
var import_object_hash = __toESM(require("object-hash"));
|
4190
4240
|
var import_react_dom2 = require("react-dom");
|
4191
4241
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
@@ -4231,7 +4281,7 @@ var CopyHostStyles = ({
|
|
4231
4281
|
onStylesLoaded = () => null
|
4232
4282
|
}) => {
|
4233
4283
|
const { document: doc, window: win } = useFrame();
|
4234
|
-
(0,
|
4284
|
+
(0, import_react28.useEffect)(() => {
|
4235
4285
|
if (!win || !doc) {
|
4236
4286
|
return () => {
|
4237
4287
|
};
|
@@ -4390,8 +4440,8 @@ var CopyHostStyles = ({
|
|
4390
4440
|
}, []);
|
4391
4441
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_jsx_runtime31.Fragment, { children });
|
4392
4442
|
};
|
4393
|
-
var autoFrameContext = (0,
|
4394
|
-
var useFrame = () => (0,
|
4443
|
+
var autoFrameContext = (0, import_react28.createContext)({});
|
4444
|
+
var useFrame = () => (0, import_react28.useContext)(autoFrameContext);
|
4395
4445
|
function AutoFrame(_a) {
|
4396
4446
|
var _b = _a, {
|
4397
4447
|
children,
|
@@ -4406,11 +4456,11 @@ function AutoFrame(_a) {
|
|
4406
4456
|
"id",
|
4407
4457
|
"onStylesLoaded"
|
4408
4458
|
]);
|
4409
|
-
const [loaded, setLoaded] = (0,
|
4410
|
-
const [ctx, setCtx] = (0,
|
4411
|
-
const ref = (0,
|
4412
|
-
const [mountTarget, setMountTarget] = (0,
|
4413
|
-
(0,
|
4459
|
+
const [loaded, setLoaded] = (0, import_react28.useState)(false);
|
4460
|
+
const [ctx, setCtx] = (0, import_react28.useState)({});
|
4461
|
+
const ref = (0, import_react28.useRef)(null);
|
4462
|
+
const [mountTarget, setMountTarget] = (0, import_react28.useState)();
|
4463
|
+
(0, import_react28.useEffect)(() => {
|
4414
4464
|
var _a2;
|
4415
4465
|
if (ref.current) {
|
4416
4466
|
setCtx({
|
@@ -4446,7 +4496,7 @@ var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
4446
4496
|
var getClassName23 = get_class_name_factory_default("PuckPreview", styles_module_default18);
|
4447
4497
|
var Preview = ({ id = "puck-preview" }) => {
|
4448
4498
|
const { config, dispatch, state, setStatus, iframe, overrides } = useAppContext();
|
4449
|
-
const Page = (0,
|
4499
|
+
const Page = (0, import_react29.useCallback)(
|
4450
4500
|
(pageProps) => {
|
4451
4501
|
var _a, _b;
|
4452
4502
|
return ((_a = config.root) == null ? void 0 : _a.render) ? (_b = config.root) == null ? void 0 : _b.render(__spreadValues({
|
@@ -4455,7 +4505,7 @@ var Preview = ({ id = "puck-preview" }) => {
|
|
4455
4505
|
},
|
4456
4506
|
[config.root]
|
4457
4507
|
);
|
4458
|
-
const Frame = (0,
|
4508
|
+
const Frame = (0, import_react29.useMemo)(() => overrides.iframe, [overrides]);
|
4459
4509
|
const rootProps = state.data.root.props || state.data.root;
|
4460
4510
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
4461
4511
|
"div",
|
@@ -4544,7 +4594,7 @@ var scrollIntoView = (el) => {
|
|
4544
4594
|
};
|
4545
4595
|
|
4546
4596
|
// components/LayerTree/index.tsx
|
4547
|
-
var
|
4597
|
+
var import_react30 = require("react");
|
4548
4598
|
|
4549
4599
|
// lib/is-child-of-zone.ts
|
4550
4600
|
init_react_import();
|
@@ -4571,7 +4621,7 @@ var LayerTree = ({
|
|
4571
4621
|
label
|
4572
4622
|
}) => {
|
4573
4623
|
const zones = data.zones || {};
|
4574
|
-
const ctx = (0,
|
4624
|
+
const ctx = (0, import_react30.useContext)(dropZoneContext);
|
4575
4625
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
4576
4626
|
label && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: getClassName24("zoneTitle"), children: [
|
4577
4627
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: getClassName24("zoneIcon"), children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Layers, { size: "16" }) }),
|
@@ -4677,13 +4727,13 @@ var LayerTree = ({
|
|
4677
4727
|
};
|
4678
4728
|
|
4679
4729
|
// components/Puck/components/Outline/index.tsx
|
4680
|
-
var
|
4730
|
+
var import_react31 = require("react");
|
4681
4731
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
4682
4732
|
var Outline = () => {
|
4683
4733
|
const { dispatch, state, overrides, config } = useAppContext();
|
4684
4734
|
const { data, ui } = state;
|
4685
4735
|
const { itemSelector } = ui;
|
4686
|
-
const setItemSelector = (0,
|
4736
|
+
const setItemSelector = (0, import_react31.useCallback)(
|
4687
4737
|
(newItemSelector) => {
|
4688
4738
|
dispatch({
|
4689
4739
|
type: "setUi",
|
@@ -4692,7 +4742,7 @@ var Outline = () => {
|
|
4692
4742
|
},
|
4693
4743
|
[]
|
4694
4744
|
);
|
4695
|
-
const Wrapper = (0,
|
4745
|
+
const Wrapper = (0, import_react31.useMemo)(() => overrides.outline || "div", [overrides]);
|
4696
4746
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Wrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(dropZoneContext.Consumer, { children: (ctx) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
4697
4747
|
(ctx == null ? void 0 : ctx.activeZones) && (ctx == null ? void 0 : ctx.activeZones[rootDroppableId]) && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
4698
4748
|
LayerTree,
|
@@ -4781,19 +4831,19 @@ function usePuckHistory({
|
|
4781
4831
|
|
4782
4832
|
// lib/use-history-store.ts
|
4783
4833
|
init_react_import();
|
4784
|
-
var
|
4834
|
+
var import_react32 = require("react");
|
4785
4835
|
var import_use_debounce3 = require("use-debounce");
|
4786
4836
|
var EMPTY_HISTORY_INDEX = 0;
|
4787
4837
|
function useHistoryStore(initialHistory) {
|
4788
4838
|
var _a, _b;
|
4789
|
-
const [histories, setHistories] = (0,
|
4839
|
+
const [histories, setHistories] = (0, import_react32.useState)(
|
4790
4840
|
(_a = initialHistory == null ? void 0 : initialHistory.histories) != null ? _a : []
|
4791
4841
|
);
|
4792
4842
|
const updateHistories = (histories2) => {
|
4793
4843
|
setHistories(histories2);
|
4794
4844
|
setIndex(histories2.length - 1);
|
4795
4845
|
};
|
4796
|
-
const [index, setIndex] = (0,
|
4846
|
+
const [index, setIndex] = (0, import_react32.useState)(
|
4797
4847
|
(_b = initialHistory == null ? void 0 : initialHistory.index) != null ? _b : EMPTY_HISTORY_INDEX
|
4798
4848
|
);
|
4799
4849
|
const hasPast = index > EMPTY_HISTORY_INDEX;
|
@@ -4953,11 +5003,11 @@ var getBox = function getBox2(el) {
|
|
4953
5003
|
};
|
4954
5004
|
|
4955
5005
|
// components/Puck/components/Canvas/index.tsx
|
4956
|
-
var
|
5006
|
+
var import_react34 = require("react");
|
4957
5007
|
|
4958
5008
|
// components/ViewportControls/index.tsx
|
4959
5009
|
init_react_import();
|
4960
|
-
var
|
5010
|
+
var import_react33 = require("react");
|
4961
5011
|
|
4962
5012
|
// css-module:/home/runner/work/puck/puck/packages/core/components/ViewportControls/styles.module.css#css-module
|
4963
5013
|
init_react_import();
|
@@ -4980,8 +5030,8 @@ var ViewportButton = ({
|
|
4980
5030
|
onClick
|
4981
5031
|
}) => {
|
4982
5032
|
const { state } = useAppContext();
|
4983
|
-
const [isActive, setIsActive] = (0,
|
4984
|
-
(0,
|
5033
|
+
const [isActive, setIsActive] = (0, import_react33.useState)(false);
|
5034
|
+
(0, import_react33.useEffect)(() => {
|
4985
5035
|
setIsActive(width === state.ui.viewports.current.width);
|
4986
5036
|
}, [width, state.ui.viewports.current.width]);
|
4987
5037
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: getClassNameButton({ isActive }), children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
@@ -5017,7 +5067,7 @@ var ViewportControls = ({
|
|
5017
5067
|
const defaultsContainAutoZoom = defaultZoomOptions.find(
|
5018
5068
|
(option) => option.value === autoZoom
|
5019
5069
|
);
|
5020
|
-
const zoomOptions = (0,
|
5070
|
+
const zoomOptions = (0, import_react33.useMemo)(
|
5021
5071
|
() => [
|
5022
5072
|
...defaultZoomOptions,
|
5023
5073
|
...defaultsContainAutoZoom ? [] : [
|
@@ -5140,17 +5190,17 @@ var Canvas = () => {
|
|
5140
5190
|
const { status, iframe } = useAppContext();
|
5141
5191
|
const { dispatch, state, overrides, setUi, zoomConfig, setZoomConfig } = useAppContext();
|
5142
5192
|
const { ui } = state;
|
5143
|
-
const frameRef = (0,
|
5144
|
-
const [showTransition, setShowTransition] = (0,
|
5145
|
-
const defaultRender = (0,
|
5193
|
+
const frameRef = (0, import_react34.useRef)(null);
|
5194
|
+
const [showTransition, setShowTransition] = (0, import_react34.useState)(false);
|
5195
|
+
const defaultRender = (0, import_react34.useMemo)(() => {
|
5146
5196
|
const PuckDefault = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_jsx_runtime36.Fragment, { children });
|
5147
5197
|
return PuckDefault;
|
5148
5198
|
}, []);
|
5149
|
-
const CustomPreview = (0,
|
5199
|
+
const CustomPreview = (0, import_react34.useMemo)(
|
5150
5200
|
() => overrides.preview || defaultRender,
|
5151
5201
|
[overrides]
|
5152
5202
|
);
|
5153
|
-
const getFrameDimensions = (0,
|
5203
|
+
const getFrameDimensions = (0, import_react34.useCallback)(() => {
|
5154
5204
|
if (frameRef.current) {
|
5155
5205
|
const frame = frameRef.current;
|
5156
5206
|
const box = getBox(frame);
|
@@ -5158,7 +5208,7 @@ var Canvas = () => {
|
|
5158
5208
|
}
|
5159
5209
|
return { width: 0, height: 0 };
|
5160
5210
|
}, [frameRef]);
|
5161
|
-
const resetAutoZoom = (0,
|
5211
|
+
const resetAutoZoom = (0, import_react34.useCallback)(
|
5162
5212
|
(ui2 = state.ui) => {
|
5163
5213
|
if (frameRef.current) {
|
5164
5214
|
setZoomConfig(
|
@@ -5168,11 +5218,11 @@ var Canvas = () => {
|
|
5168
5218
|
},
|
5169
5219
|
[frameRef, zoomConfig, state.ui]
|
5170
5220
|
);
|
5171
|
-
(0,
|
5221
|
+
(0, import_react34.useEffect)(() => {
|
5172
5222
|
setShowTransition(false);
|
5173
5223
|
resetAutoZoom();
|
5174
5224
|
}, [frameRef, ui.leftSideBarVisible, ui.rightSideBarVisible]);
|
5175
|
-
(0,
|
5225
|
+
(0, import_react34.useEffect)(() => {
|
5176
5226
|
const { height: frameHeight } = getFrameDimensions();
|
5177
5227
|
if (ui.viewports.current.height === "auto") {
|
5178
5228
|
setZoomConfig(__spreadProps(__spreadValues({}, zoomConfig), {
|
@@ -5180,13 +5230,13 @@ var Canvas = () => {
|
|
5180
5230
|
}));
|
5181
5231
|
}
|
5182
5232
|
}, [zoomConfig.zoom]);
|
5183
|
-
(0,
|
5233
|
+
(0, import_react34.useEffect)(() => {
|
5184
5234
|
if (ZOOM_ON_CHANGE) {
|
5185
5235
|
setShowTransition(true);
|
5186
5236
|
resetAutoZoom(ui);
|
5187
5237
|
}
|
5188
5238
|
}, [ui.viewports.current.width]);
|
5189
|
-
(0,
|
5239
|
+
(0, import_react34.useEffect)(() => {
|
5190
5240
|
const observer = new ResizeObserver(() => {
|
5191
5241
|
setShowTransition(false);
|
5192
5242
|
resetAutoZoom();
|
@@ -5198,8 +5248,8 @@ var Canvas = () => {
|
|
5198
5248
|
observer.disconnect();
|
5199
5249
|
};
|
5200
5250
|
}, []);
|
5201
|
-
const [showLoader, setShowLoader] = (0,
|
5202
|
-
(0,
|
5251
|
+
const [showLoader, setShowLoader] = (0, import_react34.useState)(false);
|
5252
|
+
(0, import_react34.useEffect)(() => {
|
5203
5253
|
setTimeout(() => {
|
5204
5254
|
setShowLoader(true);
|
5205
5255
|
}, 500);
|
@@ -5302,7 +5352,7 @@ var insertComponent = (componentType, zone, index, {
|
|
5302
5352
|
|
5303
5353
|
// lib/use-loaded-overrides.ts
|
5304
5354
|
init_react_import();
|
5305
|
-
var
|
5355
|
+
var import_react35 = require("react");
|
5306
5356
|
|
5307
5357
|
// lib/load-overrides.ts
|
5308
5358
|
init_react_import();
|
@@ -5341,7 +5391,7 @@ var useLoadedOverrides = ({
|
|
5341
5391
|
overrides,
|
5342
5392
|
plugins
|
5343
5393
|
}) => {
|
5344
|
-
return (0,
|
5394
|
+
return (0, import_react35.useMemo)(() => {
|
5345
5395
|
return loadOverrides({ overrides, plugins });
|
5346
5396
|
}, [plugins, overrides]);
|
5347
5397
|
};
|
@@ -5380,7 +5430,7 @@ function Puck({
|
|
5380
5430
|
enabled: true,
|
5381
5431
|
waitForStyles: true
|
5382
5432
|
}, _iframe);
|
5383
|
-
const [generatedAppState] = (0,
|
5433
|
+
const [generatedAppState] = (0, import_react36.useState)(() => {
|
5384
5434
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
|
5385
5435
|
const initial = __spreadValues(__spreadValues({}, defaultAppState.ui), initialUi);
|
5386
5436
|
let clientUiState = {};
|
@@ -5452,22 +5502,22 @@ function Puck({
|
|
5452
5502
|
histories,
|
5453
5503
|
index: initialHistoryIndex
|
5454
5504
|
});
|
5455
|
-
const [reducer] = (0,
|
5505
|
+
const [reducer] = (0, import_react36.useState)(
|
5456
5506
|
() => createReducer({
|
5457
5507
|
config,
|
5458
5508
|
record: historyStore.record,
|
5459
5509
|
onAction
|
5460
5510
|
})
|
5461
5511
|
);
|
5462
|
-
const [appState, dispatch] = (0,
|
5512
|
+
const [appState, dispatch] = (0, import_react36.useReducer)(
|
5463
5513
|
reducer,
|
5464
5514
|
flushZones(initialAppState)
|
5465
5515
|
);
|
5466
5516
|
const { data, ui } = appState;
|
5467
5517
|
const history = usePuckHistory({ dispatch, initialAppState, historyStore });
|
5468
|
-
const [menuOpen, setMenuOpen] = (0,
|
5518
|
+
const [menuOpen, setMenuOpen] = (0, import_react36.useState)(false);
|
5469
5519
|
const { itemSelector, leftSideBarVisible, rightSideBarVisible } = ui;
|
5470
|
-
const setItemSelector = (0,
|
5520
|
+
const setItemSelector = (0, import_react36.useCallback)(
|
5471
5521
|
(newItemSelector) => {
|
5472
5522
|
if (newItemSelector === itemSelector) return;
|
5473
5523
|
dispatch({
|
@@ -5479,13 +5529,13 @@ function Puck({
|
|
5479
5529
|
[itemSelector]
|
5480
5530
|
);
|
5481
5531
|
const selectedItem = itemSelector ? getItem(itemSelector, data) : null;
|
5482
|
-
(0,
|
5532
|
+
(0, import_react36.useEffect)(() => {
|
5483
5533
|
if (onChange) onChange(data);
|
5484
5534
|
}, [data]);
|
5485
5535
|
const { onDragStartOrUpdate, placeholderStyle } = usePlaceholderStyle();
|
5486
|
-
const [draggedItem, setDraggedItem] = (0,
|
5536
|
+
const [draggedItem, setDraggedItem] = (0, import_react36.useState)();
|
5487
5537
|
const rootProps = data.root.props || data.root;
|
5488
|
-
const toggleSidebars = (0,
|
5538
|
+
const toggleSidebars = (0, import_react36.useCallback)(
|
5489
5539
|
(sidebar) => {
|
5490
5540
|
const widerViewport = window.matchMedia("(min-width: 638px)").matches;
|
5491
5541
|
const sideBarVisible = sidebar === "left" ? leftSideBarVisible : rightSideBarVisible;
|
@@ -5499,7 +5549,7 @@ function Puck({
|
|
5499
5549
|
},
|
5500
5550
|
[dispatch, leftSideBarVisible, rightSideBarVisible]
|
5501
5551
|
);
|
5502
|
-
(0,
|
5552
|
+
(0, import_react36.useEffect)(() => {
|
5503
5553
|
if (!window.matchMedia("(min-width: 638px)").matches) {
|
5504
5554
|
dispatch({
|
5505
5555
|
type: "setUi",
|
@@ -5522,7 +5572,7 @@ function Puck({
|
|
5522
5572
|
window.removeEventListener("resize", handleResize);
|
5523
5573
|
};
|
5524
5574
|
}, []);
|
5525
|
-
const defaultHeaderRender = (0,
|
5575
|
+
const defaultHeaderRender = (0, import_react36.useMemo)(() => {
|
5526
5576
|
if (renderHeader) {
|
5527
5577
|
console.warn(
|
5528
5578
|
"`renderHeader` is deprecated. Please use `overrides.header` and the `usePuck` hook instead"
|
@@ -5536,7 +5586,7 @@ function Puck({
|
|
5536
5586
|
}
|
5537
5587
|
return DefaultOverride;
|
5538
5588
|
}, [renderHeader]);
|
5539
|
-
const defaultHeaderActionsRender = (0,
|
5589
|
+
const defaultHeaderActionsRender = (0, import_react36.useMemo)(() => {
|
5540
5590
|
if (renderHeaderActions) {
|
5541
5591
|
console.warn(
|
5542
5592
|
"`renderHeaderActions` is deprecated. Please use `overrides.headerActions` and the `usePuck` hook instead."
|
@@ -5553,20 +5603,20 @@ function Puck({
|
|
5553
5603
|
overrides,
|
5554
5604
|
plugins
|
5555
5605
|
});
|
5556
|
-
const CustomPuck = (0,
|
5606
|
+
const CustomPuck = (0, import_react36.useMemo)(
|
5557
5607
|
() => loadedOverrides.puck || DefaultOverride,
|
5558
5608
|
[loadedOverrides]
|
5559
5609
|
);
|
5560
|
-
const CustomHeader = (0,
|
5610
|
+
const CustomHeader = (0, import_react36.useMemo)(
|
5561
5611
|
() => loadedOverrides.header || defaultHeaderRender,
|
5562
5612
|
[loadedOverrides]
|
5563
5613
|
);
|
5564
|
-
const CustomHeaderActions = (0,
|
5614
|
+
const CustomHeaderActions = (0, import_react36.useMemo)(
|
5565
5615
|
() => loadedOverrides.headerActions || defaultHeaderActionsRender,
|
5566
5616
|
[loadedOverrides]
|
5567
5617
|
);
|
5568
|
-
const [mounted, setMounted] = (0,
|
5569
|
-
(0,
|
5618
|
+
const [mounted, setMounted] = (0, import_react36.useState)(false);
|
5619
|
+
(0, import_react36.useEffect)(() => {
|
5570
5620
|
setMounted(true);
|
5571
5621
|
}, []);
|
5572
5622
|
const selectedComponentConfig = selectedItem && config.components[selectedItem.type];
|
@@ -6024,25 +6074,33 @@ classnames/index.js:
|
|
6024
6074
|
http://jedwatson.github.io/classnames
|
6025
6075
|
*)
|
6026
6076
|
|
6077
|
+
lucide-react/dist/esm/shared/src/utils.js:
|
6078
|
+
(**
|
6079
|
+
* @license lucide-react v0.468.0 - ISC
|
6080
|
+
*
|
6081
|
+
* This source code is licensed under the ISC license.
|
6082
|
+
* See the LICENSE file in the root directory of this source tree.
|
6083
|
+
*)
|
6084
|
+
|
6027
6085
|
lucide-react/dist/esm/defaultAttributes.js:
|
6028
6086
|
(**
|
6029
|
-
* @license lucide-react v0.
|
6087
|
+
* @license lucide-react v0.468.0 - ISC
|
6030
6088
|
*
|
6031
6089
|
* This source code is licensed under the ISC license.
|
6032
6090
|
* See the LICENSE file in the root directory of this source tree.
|
6033
6091
|
*)
|
6034
6092
|
|
6035
|
-
lucide-react/dist/esm/
|
6093
|
+
lucide-react/dist/esm/Icon.js:
|
6036
6094
|
(**
|
6037
|
-
* @license lucide-react v0.
|
6095
|
+
* @license lucide-react v0.468.0 - ISC
|
6038
6096
|
*
|
6039
6097
|
* This source code is licensed under the ISC license.
|
6040
6098
|
* See the LICENSE file in the root directory of this source tree.
|
6041
6099
|
*)
|
6042
6100
|
|
6043
|
-
lucide-react/dist/esm/
|
6101
|
+
lucide-react/dist/esm/createLucideIcon.js:
|
6044
6102
|
(**
|
6045
|
-
* @license lucide-react v0.
|
6103
|
+
* @license lucide-react v0.468.0 - ISC
|
6046
6104
|
*
|
6047
6105
|
* This source code is licensed under the ISC license.
|
6048
6106
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6050,7 +6108,7 @@ lucide-react/dist/esm/icons/check-circle.js:
|
|
6050
6108
|
|
6051
6109
|
lucide-react/dist/esm/icons/chevron-down.js:
|
6052
6110
|
(**
|
6053
|
-
* @license lucide-react v0.
|
6111
|
+
* @license lucide-react v0.468.0 - ISC
|
6054
6112
|
*
|
6055
6113
|
* This source code is licensed under the ISC license.
|
6056
6114
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6058,7 +6116,7 @@ lucide-react/dist/esm/icons/chevron-down.js:
|
|
6058
6116
|
|
6059
6117
|
lucide-react/dist/esm/icons/chevron-right.js:
|
6060
6118
|
(**
|
6061
|
-
* @license lucide-react v0.
|
6119
|
+
* @license lucide-react v0.468.0 - ISC
|
6062
6120
|
*
|
6063
6121
|
* This source code is licensed under the ISC license.
|
6064
6122
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6066,7 +6124,15 @@ lucide-react/dist/esm/icons/chevron-right.js:
|
|
6066
6124
|
|
6067
6125
|
lucide-react/dist/esm/icons/chevron-up.js:
|
6068
6126
|
(**
|
6069
|
-
* @license lucide-react v0.
|
6127
|
+
* @license lucide-react v0.468.0 - ISC
|
6128
|
+
*
|
6129
|
+
* This source code is licensed under the ISC license.
|
6130
|
+
* See the LICENSE file in the root directory of this source tree.
|
6131
|
+
*)
|
6132
|
+
|
6133
|
+
lucide-react/dist/esm/icons/circle-check-big.js:
|
6134
|
+
(**
|
6135
|
+
* @license lucide-react v0.468.0 - ISC
|
6070
6136
|
*
|
6071
6137
|
* This source code is licensed under the ISC license.
|
6072
6138
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6074,7 +6140,15 @@ lucide-react/dist/esm/icons/chevron-up.js:
|
|
6074
6140
|
|
6075
6141
|
lucide-react/dist/esm/icons/copy.js:
|
6076
6142
|
(**
|
6077
|
-
* @license lucide-react v0.
|
6143
|
+
* @license lucide-react v0.468.0 - ISC
|
6144
|
+
*
|
6145
|
+
* This source code is licensed under the ISC license.
|
6146
|
+
* See the LICENSE file in the root directory of this source tree.
|
6147
|
+
*)
|
6148
|
+
|
6149
|
+
lucide-react/dist/esm/icons/ellipsis-vertical.js:
|
6150
|
+
(**
|
6151
|
+
* @license lucide-react v0.468.0 - ISC
|
6078
6152
|
*
|
6079
6153
|
* This source code is licensed under the ISC license.
|
6080
6154
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6082,7 +6156,7 @@ lucide-react/dist/esm/icons/copy.js:
|
|
6082
6156
|
|
6083
6157
|
lucide-react/dist/esm/icons/globe.js:
|
6084
6158
|
(**
|
6085
|
-
* @license lucide-react v0.
|
6159
|
+
* @license lucide-react v0.468.0 - ISC
|
6086
6160
|
*
|
6087
6161
|
* This source code is licensed under the ISC license.
|
6088
6162
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6090,7 +6164,7 @@ lucide-react/dist/esm/icons/globe.js:
|
|
6090
6164
|
|
6091
6165
|
lucide-react/dist/esm/icons/hash.js:
|
6092
6166
|
(**
|
6093
|
-
* @license lucide-react v0.
|
6167
|
+
* @license lucide-react v0.468.0 - ISC
|
6094
6168
|
*
|
6095
6169
|
* This source code is licensed under the ISC license.
|
6096
6170
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6098,7 +6172,7 @@ lucide-react/dist/esm/icons/hash.js:
|
|
6098
6172
|
|
6099
6173
|
lucide-react/dist/esm/icons/layers.js:
|
6100
6174
|
(**
|
6101
|
-
* @license lucide-react v0.
|
6175
|
+
* @license lucide-react v0.468.0 - ISC
|
6102
6176
|
*
|
6103
6177
|
* This source code is licensed under the ISC license.
|
6104
6178
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6106,7 +6180,7 @@ lucide-react/dist/esm/icons/layers.js:
|
|
6106
6180
|
|
6107
6181
|
lucide-react/dist/esm/icons/layout-grid.js:
|
6108
6182
|
(**
|
6109
|
-
* @license lucide-react v0.
|
6183
|
+
* @license lucide-react v0.468.0 - ISC
|
6110
6184
|
*
|
6111
6185
|
* This source code is licensed under the ISC license.
|
6112
6186
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6114,7 +6188,7 @@ lucide-react/dist/esm/icons/layout-grid.js:
|
|
6114
6188
|
|
6115
6189
|
lucide-react/dist/esm/icons/link.js:
|
6116
6190
|
(**
|
6117
|
-
* @license lucide-react v0.
|
6191
|
+
* @license lucide-react v0.468.0 - ISC
|
6118
6192
|
*
|
6119
6193
|
* This source code is licensed under the ISC license.
|
6120
6194
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6122,31 +6196,31 @@ lucide-react/dist/esm/icons/link.js:
|
|
6122
6196
|
|
6123
6197
|
lucide-react/dist/esm/icons/list.js:
|
6124
6198
|
(**
|
6125
|
-
* @license lucide-react v0.
|
6199
|
+
* @license lucide-react v0.468.0 - ISC
|
6126
6200
|
*
|
6127
6201
|
* This source code is licensed under the ISC license.
|
6128
6202
|
* See the LICENSE file in the root directory of this source tree.
|
6129
6203
|
*)
|
6130
6204
|
|
6131
|
-
lucide-react/dist/esm/icons/lock.js:
|
6205
|
+
lucide-react/dist/esm/icons/lock-open.js:
|
6132
6206
|
(**
|
6133
|
-
* @license lucide-react v0.
|
6207
|
+
* @license lucide-react v0.468.0 - ISC
|
6134
6208
|
*
|
6135
6209
|
* This source code is licensed under the ISC license.
|
6136
6210
|
* See the LICENSE file in the root directory of this source tree.
|
6137
6211
|
*)
|
6138
6212
|
|
6139
|
-
lucide-react/dist/esm/icons/
|
6213
|
+
lucide-react/dist/esm/icons/lock.js:
|
6140
6214
|
(**
|
6141
|
-
* @license lucide-react v0.
|
6215
|
+
* @license lucide-react v0.468.0 - ISC
|
6142
6216
|
*
|
6143
6217
|
* This source code is licensed under the ISC license.
|
6144
6218
|
* See the LICENSE file in the root directory of this source tree.
|
6145
6219
|
*)
|
6146
6220
|
|
6147
|
-
lucide-react/dist/esm/icons/
|
6221
|
+
lucide-react/dist/esm/icons/monitor.js:
|
6148
6222
|
(**
|
6149
|
-
* @license lucide-react v0.
|
6223
|
+
* @license lucide-react v0.468.0 - ISC
|
6150
6224
|
*
|
6151
6225
|
* This source code is licensed under the ISC license.
|
6152
6226
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6154,7 +6228,7 @@ lucide-react/dist/esm/icons/more-vertical.js:
|
|
6154
6228
|
|
6155
6229
|
lucide-react/dist/esm/icons/panel-left.js:
|
6156
6230
|
(**
|
6157
|
-
* @license lucide-react v0.
|
6231
|
+
* @license lucide-react v0.468.0 - ISC
|
6158
6232
|
*
|
6159
6233
|
* This source code is licensed under the ISC license.
|
6160
6234
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6162,7 +6236,7 @@ lucide-react/dist/esm/icons/panel-left.js:
|
|
6162
6236
|
|
6163
6237
|
lucide-react/dist/esm/icons/panel-right.js:
|
6164
6238
|
(**
|
6165
|
-
* @license lucide-react v0.
|
6239
|
+
* @license lucide-react v0.468.0 - ISC
|
6166
6240
|
*
|
6167
6241
|
* This source code is licensed under the ISC license.
|
6168
6242
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6170,7 +6244,7 @@ lucide-react/dist/esm/icons/panel-right.js:
|
|
6170
6244
|
|
6171
6245
|
lucide-react/dist/esm/icons/plus.js:
|
6172
6246
|
(**
|
6173
|
-
* @license lucide-react v0.
|
6247
|
+
* @license lucide-react v0.468.0 - ISC
|
6174
6248
|
*
|
6175
6249
|
* This source code is licensed under the ISC license.
|
6176
6250
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6178,7 +6252,7 @@ lucide-react/dist/esm/icons/plus.js:
|
|
6178
6252
|
|
6179
6253
|
lucide-react/dist/esm/icons/redo-2.js:
|
6180
6254
|
(**
|
6181
|
-
* @license lucide-react v0.
|
6255
|
+
* @license lucide-react v0.468.0 - ISC
|
6182
6256
|
*
|
6183
6257
|
* This source code is licensed under the ISC license.
|
6184
6258
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6186,7 +6260,7 @@ lucide-react/dist/esm/icons/redo-2.js:
|
|
6186
6260
|
|
6187
6261
|
lucide-react/dist/esm/icons/search.js:
|
6188
6262
|
(**
|
6189
|
-
* @license lucide-react v0.
|
6263
|
+
* @license lucide-react v0.468.0 - ISC
|
6190
6264
|
*
|
6191
6265
|
* This source code is licensed under the ISC license.
|
6192
6266
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6194,7 +6268,7 @@ lucide-react/dist/esm/icons/search.js:
|
|
6194
6268
|
|
6195
6269
|
lucide-react/dist/esm/icons/sliders-horizontal.js:
|
6196
6270
|
(**
|
6197
|
-
* @license lucide-react v0.
|
6271
|
+
* @license lucide-react v0.468.0 - ISC
|
6198
6272
|
*
|
6199
6273
|
* This source code is licensed under the ISC license.
|
6200
6274
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6202,7 +6276,7 @@ lucide-react/dist/esm/icons/sliders-horizontal.js:
|
|
6202
6276
|
|
6203
6277
|
lucide-react/dist/esm/icons/smartphone.js:
|
6204
6278
|
(**
|
6205
|
-
* @license lucide-react v0.
|
6279
|
+
* @license lucide-react v0.468.0 - ISC
|
6206
6280
|
*
|
6207
6281
|
* This source code is licensed under the ISC license.
|
6208
6282
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6210,7 +6284,7 @@ lucide-react/dist/esm/icons/smartphone.js:
|
|
6210
6284
|
|
6211
6285
|
lucide-react/dist/esm/icons/tablet.js:
|
6212
6286
|
(**
|
6213
|
-
* @license lucide-react v0.
|
6287
|
+
* @license lucide-react v0.468.0 - ISC
|
6214
6288
|
*
|
6215
6289
|
* This source code is licensed under the ISC license.
|
6216
6290
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6218,7 +6292,7 @@ lucide-react/dist/esm/icons/tablet.js:
|
|
6218
6292
|
|
6219
6293
|
lucide-react/dist/esm/icons/trash.js:
|
6220
6294
|
(**
|
6221
|
-
* @license lucide-react v0.
|
6295
|
+
* @license lucide-react v0.468.0 - ISC
|
6222
6296
|
*
|
6223
6297
|
* This source code is licensed under the ISC license.
|
6224
6298
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6226,7 +6300,7 @@ lucide-react/dist/esm/icons/trash.js:
|
|
6226
6300
|
|
6227
6301
|
lucide-react/dist/esm/icons/type.js:
|
6228
6302
|
(**
|
6229
|
-
* @license lucide-react v0.
|
6303
|
+
* @license lucide-react v0.468.0 - ISC
|
6230
6304
|
*
|
6231
6305
|
* This source code is licensed under the ISC license.
|
6232
6306
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6234,15 +6308,7 @@ lucide-react/dist/esm/icons/type.js:
|
|
6234
6308
|
|
6235
6309
|
lucide-react/dist/esm/icons/undo-2.js:
|
6236
6310
|
(**
|
6237
|
-
* @license lucide-react v0.
|
6238
|
-
*
|
6239
|
-
* This source code is licensed under the ISC license.
|
6240
|
-
* See the LICENSE file in the root directory of this source tree.
|
6241
|
-
*)
|
6242
|
-
|
6243
|
-
lucide-react/dist/esm/icons/unlock.js:
|
6244
|
-
(**
|
6245
|
-
* @license lucide-react v0.298.0 - ISC
|
6311
|
+
* @license lucide-react v0.468.0 - ISC
|
6246
6312
|
*
|
6247
6313
|
* This source code is licensed under the ISC license.
|
6248
6314
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6250,7 +6316,7 @@ lucide-react/dist/esm/icons/unlock.js:
|
|
6250
6316
|
|
6251
6317
|
lucide-react/dist/esm/icons/zoom-in.js:
|
6252
6318
|
(**
|
6253
|
-
* @license lucide-react v0.
|
6319
|
+
* @license lucide-react v0.468.0 - ISC
|
6254
6320
|
*
|
6255
6321
|
* This source code is licensed under the ISC license.
|
6256
6322
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6258,7 +6324,7 @@ lucide-react/dist/esm/icons/zoom-in.js:
|
|
6258
6324
|
|
6259
6325
|
lucide-react/dist/esm/icons/zoom-out.js:
|
6260
6326
|
(**
|
6261
|
-
* @license lucide-react v0.
|
6327
|
+
* @license lucide-react v0.468.0 - ISC
|
6262
6328
|
*
|
6263
6329
|
* This source code is licensed under the ISC license.
|
6264
6330
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -6266,7 +6332,7 @@ lucide-react/dist/esm/icons/zoom-out.js:
|
|
6266
6332
|
|
6267
6333
|
lucide-react/dist/esm/lucide-react.js:
|
6268
6334
|
(**
|
6269
|
-
* @license lucide-react v0.
|
6335
|
+
* @license lucide-react v0.468.0 - ISC
|
6270
6336
|
*
|
6271
6337
|
* This source code is licensed under the ISC license.
|
6272
6338
|
* See the LICENSE file in the root directory of this source tree.
|