@measured/puck 0.21.0-canary.7dca3a5a → 0.21.0-canary.8416d520

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.
@@ -25,7 +25,7 @@ import {
25
25
  walkAppState,
26
26
  walkField,
27
27
  walkTree
28
- } from "./chunk-6SIKCDJJ.mjs";
28
+ } from "./chunk-FY5AZKYD.mjs";
29
29
 
30
30
  // ../../node_modules/classnames/index.js
31
31
  var require_classnames = __commonJS({
@@ -1071,10 +1071,10 @@ var flattenData = (state, config) => {
1071
1071
 
1072
1072
  // store/slices/permissions.ts
1073
1073
  var createPermissionsSlice = (set, get) => {
1074
- const resolvePermissions = (..._0) => __async(void 0, [..._0], function* (params = {}, force) {
1074
+ const resolvePermissions = (..._0) => __async(null, [..._0], function* (params = {}, force) {
1075
1075
  const { state, permissions, config } = get();
1076
1076
  const { cache, globalPermissions } = permissions;
1077
- const resolveDataForItem = (item2, force2 = false) => __async(void 0, null, function* () {
1077
+ const resolveDataForItem = (item2, force2 = false) => __async(null, null, function* () {
1078
1078
  var _a, _b, _c;
1079
1079
  const { config: config2, state: appState, setComponentLoading } = get();
1080
1080
  const componentConfig = item2.type === "root" ? config2.root : config2.components[item2.type];
@@ -1129,13 +1129,13 @@ var createPermissionsSlice = (set, get) => {
1129
1129
  if (item) {
1130
1130
  yield resolveDataForItem(item, force);
1131
1131
  } else if (type) {
1132
- flattenData(state, config).filter((item2) => item2.type === type).map((item2) => __async(void 0, null, function* () {
1132
+ flattenData(state, config).filter((item2) => item2.type === type).map((item2) => __async(null, null, function* () {
1133
1133
  yield resolveDataForItem(item2, force);
1134
1134
  }));
1135
1135
  } else if (root) {
1136
1136
  resolveDataForRoot(force);
1137
1137
  } else {
1138
- flattenData(state, config).map((item2) => __async(void 0, null, function* () {
1138
+ flattenData(state, config).map((item2) => __async(null, null, function* () {
1139
1139
  yield resolveDataForItem(item2, force);
1140
1140
  }));
1141
1141
  }
@@ -1216,7 +1216,7 @@ var createFieldsSlice = (_set, _get) => {
1216
1216
  };
1217
1217
  var useRegisterFieldsSlice = (appStore, id) => {
1218
1218
  const resolveFields = useCallback(
1219
- (reset) => __async(void 0, null, function* () {
1219
+ (reset) => __async(null, null, function* () {
1220
1220
  var _a, _b;
1221
1221
  const { fields, lastResolvedData } = appStore.getState().fields;
1222
1222
  const metadata = appStore.getState().metadata;
@@ -1417,7 +1417,7 @@ var createAppStore = (initialAppStore) => create2()(
1417
1417
  const selectedItem = state.ui.itemSelector ? getItem(state.ui.itemSelector, state) : null;
1418
1418
  return __spreadProps(__spreadValues({}, s), { state, selectedItem });
1419
1419
  }),
1420
- resolveComponentData: (componentData, trigger) => __async(void 0, null, function* () {
1420
+ resolveComponentData: (componentData, trigger) => __async(null, null, function* () {
1421
1421
  const { config, metadata, setComponentLoading, permissions } = get();
1422
1422
  const timeouts = {};
1423
1423
  return yield resolveComponentData(
@@ -1428,7 +1428,7 @@ var createAppStore = (initialAppStore) => create2()(
1428
1428
  const id = "id" in item.props ? item.props.id : "root";
1429
1429
  timeouts[id] = setComponentLoading(id, true, 50);
1430
1430
  },
1431
- (item) => __async(void 0, null, function* () {
1431
+ (item) => __async(null, null, function* () {
1432
1432
  const id = "id" in item.props ? item.props.id : "root";
1433
1433
  if ("type" in item) {
1434
1434
  yield permissions.refreshPermissions({ item });
@@ -1440,7 +1440,7 @@ var createAppStore = (initialAppStore) => create2()(
1440
1440
  trigger
1441
1441
  );
1442
1442
  }),
1443
- resolveAndCommitData: () => __async(void 0, null, function* () {
1443
+ resolveAndCommitData: () => __async(null, null, function* () {
1444
1444
  const { config, state, dispatch, resolveComponentData: resolveComponentData2 } = get();
1445
1445
  walkAppState(
1446
1446
  state,
@@ -1837,7 +1837,7 @@ var styles_module_default3 = { "InputWrapper": "_InputWrapper_bsxfo_1", "Input-l
1837
1837
 
1838
1838
  // components/AutoField/index.tsx
1839
1839
  import {
1840
- useCallback as useCallback4,
1840
+ useCallback as useCallback5,
1841
1841
  useContext as useContext3,
1842
1842
  useEffect as useEffect10,
1843
1843
  useMemo as useMemo3,
@@ -2250,7 +2250,13 @@ var ZoomOut = createLucideIcon("ZoomOut", [
2250
2250
  init_react_import();
2251
2251
 
2252
2252
  // components/AutoField/fields/ArrayField/index.tsx
2253
- import { useCallback as useCallback2, useEffect as useEffect6, useRef, useState as useState4 } from "react";
2253
+ import {
2254
+ memo as memo2,
2255
+ useCallback as useCallback2,
2256
+ useEffect as useEffect6,
2257
+ useRef,
2258
+ useState as useState4
2259
+ } from "react";
2254
2260
 
2255
2261
  // components/DragIcon/index.tsx
2256
2262
  init_react_import();
@@ -2528,7 +2534,7 @@ var collisionStore = createStore(() => ({
2528
2534
 
2529
2535
  // lib/dnd/collision/dynamic/index.ts
2530
2536
  var flushNext = "";
2531
- var createDynamicCollisionDetector = (dragAxis, midpointOffset = 0.05) => (input) => {
2537
+ var createDynamicCollisionDetector = (dragAxis, midpointOffset = 0.05) => ((input) => {
2532
2538
  var _a, _b, _c, _d, _e;
2533
2539
  const { dragOperation, droppable } = input;
2534
2540
  const { position } = dragOperation;
@@ -2621,7 +2627,7 @@ var createDynamicCollisionDetector = (dragAxis, midpointOffset = 0.05) => (input
2621
2627
  }
2622
2628
  collisionDebug(dragCenter, dropCenter, droppable.id.toString(), "hotpink");
2623
2629
  return null;
2624
- };
2630
+ });
2625
2631
 
2626
2632
  // components/Sortable/index.tsx
2627
2633
  import { useSortable } from "@dnd-kit/react/sortable";
@@ -2743,89 +2749,250 @@ var NestedFieldProvider = ({
2743
2749
  );
2744
2750
  };
2745
2751
 
2752
+ // lib/data/get-deep.ts
2753
+ init_react_import();
2754
+ var getDeep = (node, path) => {
2755
+ const pathParts = path.split(".");
2756
+ return pathParts.reduce((acc, item) => {
2757
+ if (!acc) return;
2758
+ const [prop, indexStr] = item.replace("]", "").split("[");
2759
+ const val = acc[prop];
2760
+ if (indexStr && val) {
2761
+ return val[parseInt(indexStr)];
2762
+ }
2763
+ return val;
2764
+ }, node);
2765
+ };
2766
+
2767
+ // components/AutoField/subfield.tsx
2768
+ init_react_import();
2769
+ import { memo } from "react";
2770
+ import { jsx as jsx8 } from "react/jsx-runtime";
2771
+ var SubFieldInternal = ({
2772
+ field,
2773
+ id,
2774
+ index,
2775
+ name,
2776
+ subName,
2777
+ localName,
2778
+ onChange,
2779
+ forceReadOnly,
2780
+ value
2781
+ }) => {
2782
+ const indexName = typeof index !== "undefined" ? `${name}[${index}]` : name;
2783
+ const subPath = name ? `${indexName}.${subName}` : subName;
2784
+ const localIndexName = typeof index !== "undefined" ? `${localName}[${index}]` : localName != null ? localName : subName;
2785
+ const localWildcardName = typeof index !== "undefined" ? `${localName}[*]` : localName;
2786
+ const localSubPath = `${localIndexName}.${subName}`;
2787
+ const localWildcardSubPath = `${localWildcardName}.${subName}`;
2788
+ const { readOnlyFields } = useNestedFieldContext();
2789
+ const subReadOnly = forceReadOnly ? forceReadOnly : typeof readOnlyFields[subPath] !== "undefined" ? readOnlyFields[localSubPath] : readOnlyFields[localWildcardSubPath];
2790
+ const label = field.label || subName;
2791
+ return /* @__PURE__ */ jsx8(
2792
+ NestedFieldProvider,
2793
+ {
2794
+ name: localIndexName,
2795
+ wildcardName: localWildcardName,
2796
+ subName,
2797
+ readOnlyFields,
2798
+ children: /* @__PURE__ */ jsx8(
2799
+ AutoFieldPrivate,
2800
+ {
2801
+ name: subPath,
2802
+ label,
2803
+ id,
2804
+ readOnly: subReadOnly,
2805
+ field: __spreadProps(__spreadValues({}, field), {
2806
+ label
2807
+ // May be used by custom fields
2808
+ }),
2809
+ onChange: (val, ui) => {
2810
+ onChange(val, ui, subName);
2811
+ },
2812
+ value: typeof value !== "undefined" ? getDeep(value, subPath) : void 0
2813
+ }
2814
+ )
2815
+ },
2816
+ subPath
2817
+ );
2818
+ };
2819
+ var SubField = memo(SubFieldInternal);
2820
+
2746
2821
  // components/AutoField/fields/ArrayField/index.tsx
2747
- import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
2822
+ var import_fast_deep_equal = __toESM(require_fast_deep_equal());
2823
+ import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
2748
2824
  var getClassName6 = get_class_name_factory_default("ArrayField", styles_module_default4);
2749
2825
  var getClassNameItem = get_class_name_factory_default("ArrayFieldItem", styles_module_default4);
2826
+ var ArrayFieldItemInternal = ({
2827
+ id,
2828
+ arrayId,
2829
+ index,
2830
+ dragIndex,
2831
+ originalIndex,
2832
+ field,
2833
+ onChange,
2834
+ onToggleExpand,
2835
+ readOnly,
2836
+ actions,
2837
+ name,
2838
+ localName,
2839
+ getValue,
2840
+ value
2841
+ }) => {
2842
+ const isExpanded = useAppStore((s) => {
2843
+ var _a;
2844
+ return ((_a = s.state.ui.arrayState[arrayId]) == null ? void 0 : _a.openId) === id;
2845
+ });
2846
+ const itemSummary = useAppStore(() => {
2847
+ const data = value != null ? value : getValue();
2848
+ if (data && field.getItemSummary) {
2849
+ return field.getItemSummary(data, index);
2850
+ }
2851
+ return `Item #${originalIndex}`;
2852
+ });
2853
+ const canEdit = useAppStore(
2854
+ (s) => s.permissions.getPermissions({ item: s.selectedItem }).edit
2855
+ );
2856
+ return /* @__PURE__ */ jsx9(Sortable, { id, index: dragIndex, disabled: readOnly, children: ({ isDragging, ref, handleRef }) => /* @__PURE__ */ jsxs4(
2857
+ "div",
2858
+ {
2859
+ ref,
2860
+ className: getClassNameItem({
2861
+ isExpanded,
2862
+ isDragging,
2863
+ readOnly
2864
+ }),
2865
+ children: [
2866
+ /* @__PURE__ */ jsxs4(
2867
+ "div",
2868
+ {
2869
+ ref: handleRef,
2870
+ onClick: (e) => {
2871
+ if (isDragging) return;
2872
+ e.preventDefault();
2873
+ e.stopPropagation();
2874
+ onToggleExpand(id, isExpanded);
2875
+ },
2876
+ className: getClassNameItem("summary"),
2877
+ children: [
2878
+ itemSummary,
2879
+ /* @__PURE__ */ jsxs4("div", { className: getClassNameItem("rhs"), children: [
2880
+ !readOnly && /* @__PURE__ */ jsx9("div", { className: getClassNameItem("actions"), children: actions }),
2881
+ /* @__PURE__ */ jsx9("div", { children: /* @__PURE__ */ jsx9(DragIcon, {}) })
2882
+ ] })
2883
+ ]
2884
+ }
2885
+ ),
2886
+ /* @__PURE__ */ jsx9("div", { className: getClassNameItem("body"), children: isExpanded && /* @__PURE__ */ jsx9("fieldset", { className: getClassNameItem("fieldset"), children: Object.keys(field.arrayFields).map((subName) => {
2887
+ const subField = field.arrayFields[subName];
2888
+ return /* @__PURE__ */ jsx9(
2889
+ SubField,
2890
+ {
2891
+ id: `${id}_${subName}`,
2892
+ name,
2893
+ subName,
2894
+ localName,
2895
+ index,
2896
+ field: subField,
2897
+ onChange,
2898
+ forceReadOnly: !canEdit,
2899
+ value: value == null ? void 0 : value[index]
2900
+ },
2901
+ subName
2902
+ );
2903
+ }) }) })
2904
+ ]
2905
+ }
2906
+ ) }, id);
2907
+ };
2908
+ var ArrayFieldItem = memo2(ArrayFieldItemInternal);
2750
2909
  var ArrayField = ({
2751
2910
  field,
2752
2911
  onChange,
2753
- value: _value,
2754
2912
  name,
2755
2913
  label,
2756
2914
  labelIcon,
2757
2915
  readOnly,
2758
2916
  id,
2759
- Label: Label2 = (props) => /* @__PURE__ */ jsx8("div", __spreadValues({}, props))
2917
+ Label: Label2 = (props) => /* @__PURE__ */ jsx9("div", __spreadValues({}, props)),
2918
+ value
2760
2919
  }) => {
2761
- const thisArrayState = useAppStore((s) => s.state.ui.arrayState[id]);
2762
2920
  const setUi = useAppStore((s) => s.setUi);
2763
- const { readOnlyFields, localName = name } = useNestedFieldContext();
2764
- const value = _value;
2765
- const arrayState = thisArrayState || {
2766
- items: Array.from(value || []).map((item, idx) => {
2767
- return {
2768
- _originalIndex: idx,
2769
- _arrayId: `${id}-${idx}`
2770
- };
2771
- }),
2772
- openId: ""
2773
- };
2774
- const [localState, setLocalState] = useState4({ arrayState, value });
2775
- useEffect6(() => {
2921
+ const appStoreApi = useAppStoreApi();
2922
+ const { localName = name } = useNestedFieldContext();
2923
+ const getValue = useCallback2(() => {
2924
+ var _a, _b;
2925
+ if (typeof value !== "undefined") return value;
2926
+ const { selectedItem } = appStoreApi.getState();
2927
+ const props = (_a = name ? selectedItem == null ? void 0 : selectedItem.props : {}) != null ? _a : {};
2928
+ return name ? (_b = getDeep(props, name)) != null ? _b : [] : [];
2929
+ }, [appStoreApi, name, value]);
2930
+ const getArrayState = useCallback2(() => {
2776
2931
  var _a;
2777
- const _arrayState = (_a = appStore.getState().state.ui.arrayState[id]) != null ? _a : arrayState;
2778
- setLocalState({ arrayState: _arrayState, value });
2779
- }, [value]);
2932
+ const { state } = appStoreApi.getState();
2933
+ const thisState = state.ui.arrayState[id];
2934
+ if ((_a = thisState == null ? void 0 : thisState.items) == null ? void 0 : _a.length) return thisState;
2935
+ const value2 = getValue();
2936
+ return {
2937
+ items: Array.from(value2 || []).map((item, idx) => {
2938
+ return {
2939
+ _originalIndex: idx,
2940
+ _currentIndex: idx,
2941
+ _arrayId: `${id}-${idx}`
2942
+ };
2943
+ }),
2944
+ openId: ""
2945
+ };
2946
+ }, [appStoreApi, id, getValue]);
2947
+ const numItems = useAppStore((s) => {
2948
+ var _a, _b;
2949
+ const { selectedItem } = s;
2950
+ const props = (_a = name ? selectedItem == null ? void 0 : selectedItem.props : {}) != null ? _a : {};
2951
+ return (name ? (_b = getDeep(props, name)) != null ? _b : [] : []).length;
2952
+ });
2953
+ const [mirror, setLocalState] = useState4(getArrayState());
2780
2954
  const appStore = useAppStoreApi();
2781
2955
  const mapArrayStateToUi = useCallback2(
2782
2956
  (partialArrayState) => {
2783
2957
  const state = appStore.getState().state;
2784
2958
  return {
2785
2959
  arrayState: __spreadProps(__spreadValues({}, state.ui.arrayState), {
2786
- [id]: __spreadValues(__spreadValues({}, arrayState), partialArrayState)
2960
+ [id]: __spreadValues(__spreadValues({}, getArrayState()), partialArrayState)
2787
2961
  })
2788
2962
  };
2789
2963
  },
2790
- [arrayState, appStore]
2964
+ [appStore]
2791
2965
  );
2792
2966
  const getHighestIndex = useCallback2(() => {
2793
- return arrayState.items.reduce(
2967
+ return getArrayState().items.reduce(
2794
2968
  (acc, item) => item._originalIndex > acc ? item._originalIndex : acc,
2795
2969
  -1
2796
2970
  );
2797
- }, [arrayState]);
2798
- const regenerateArrayState = useCallback2(
2799
- (value2) => {
2800
- let highestIndex = getHighestIndex();
2801
- const newItems = Array.from(value2 || []).map((item, idx) => {
2802
- var _a;
2803
- const arrayStateItem = arrayState.items[idx];
2804
- const newItem = {
2805
- _originalIndex: typeof (arrayStateItem == null ? void 0 : arrayStateItem._originalIndex) !== "undefined" ? arrayStateItem._originalIndex : highestIndex + 1,
2806
- _arrayId: ((_a = arrayState.items[idx]) == null ? void 0 : _a._arrayId) || `${id}-${highestIndex + 1}`
2807
- };
2808
- if (newItem._originalIndex > highestIndex) {
2809
- highestIndex = newItem._originalIndex;
2810
- }
2811
- return newItem;
2812
- });
2813
- return __spreadProps(__spreadValues({}, arrayState), { items: newItems });
2814
- },
2815
- [arrayState]
2816
- );
2817
- useEffect6(() => {
2818
- if (arrayState.items.length > 0) {
2819
- setUi(mapArrayStateToUi(arrayState));
2820
- }
2971
+ }, []);
2972
+ const regenerateArrayState = useCallback2((value2) => {
2973
+ let highestIndex = getHighestIndex();
2974
+ const arrayState = getArrayState();
2975
+ const newItems = Array.from(value2 || []).map((item, idx) => {
2976
+ var _a, _b, _c;
2977
+ const arrayStateItem = arrayState.items[idx];
2978
+ const newItem = {
2979
+ _originalIndex: (_a = arrayStateItem == null ? void 0 : arrayStateItem._originalIndex) != null ? _a : highestIndex + 1,
2980
+ _currentIndex: (_b = arrayStateItem == null ? void 0 : arrayStateItem._currentIndex) != null ? _b : idx,
2981
+ _arrayId: ((_c = arrayState.items[idx]) == null ? void 0 : _c._arrayId) || `${id}-${highestIndex + 1}`
2982
+ };
2983
+ if (newItem._originalIndex > highestIndex) {
2984
+ highestIndex = newItem._originalIndex;
2985
+ }
2986
+ return newItem;
2987
+ });
2988
+ return __spreadProps(__spreadValues({}, arrayState), { items: newItems });
2821
2989
  }, []);
2822
2990
  const [draggedItem, setDraggedItem] = useState4("");
2823
2991
  const isDraggingAny = !!draggedItem;
2824
- const canEdit = useAppStore(
2825
- (s) => s.permissions.getPermissions({ item: s.selectedItem }).edit
2826
- );
2827
- const forceReadOnly = !canEdit;
2828
- const valueRef = useRef(value);
2992
+ const valueRef = useRef([]);
2993
+ useEffect6(() => {
2994
+ valueRef.current = getValue();
2995
+ }, []);
2829
2996
  const uniqifyItem = useCallback2(
2830
2997
  (val) => {
2831
2998
  if (field.type !== "array" || !field.arrayFields) return;
@@ -2844,30 +3011,96 @@ var ArrayField = ({
2844
3011
  },
2845
3012
  [appStore, field]
2846
3013
  );
3014
+ const syncCurrentIndexes = useCallback2(() => {
3015
+ const arrayState = getArrayState();
3016
+ const newArrayStateItems = arrayState.items.map((item, index) => __spreadProps(__spreadValues({}, item), {
3017
+ _currentIndex: index
3018
+ }));
3019
+ setLocalState(__spreadProps(__spreadValues({}, arrayState), {
3020
+ items: newArrayStateItems
3021
+ }));
3022
+ const state = appStore.getState().state;
3023
+ const newUi = {
3024
+ arrayState: __spreadProps(__spreadValues({}, state.ui.arrayState), {
3025
+ [id]: __spreadProps(__spreadValues({}, arrayState), { items: newArrayStateItems })
3026
+ })
3027
+ };
3028
+ setUi(newUi, false);
3029
+ }, []);
3030
+ const updateValue = useCallback2(
3031
+ (newValue) => {
3032
+ const newArrayState = regenerateArrayState(newValue);
3033
+ setUi(mapArrayStateToUi(newArrayState), false);
3034
+ onChange(newValue);
3035
+ setLocalState(newArrayState);
3036
+ },
3037
+ [regenerateArrayState, setUi, mapArrayStateToUi, onChange, setLocalState]
3038
+ );
3039
+ const reset = useCallback2(
3040
+ (value2) => {
3041
+ valueRef.current = value2;
3042
+ const newArrayState = regenerateArrayState(valueRef.current);
3043
+ if (!(0, import_fast_deep_equal.default)(newArrayState, getArrayState())) {
3044
+ setUi(mapArrayStateToUi(newArrayState), false);
3045
+ setLocalState(newArrayState);
3046
+ }
3047
+ },
3048
+ [
3049
+ regenerateArrayState,
3050
+ mapArrayStateToUi,
3051
+ setUi,
3052
+ setLocalState,
3053
+ getArrayState
3054
+ ]
3055
+ );
3056
+ useEffect6(() => {
3057
+ if (value) return;
3058
+ return appStoreApi.subscribe(
3059
+ ({ selectedItem }) => {
3060
+ var _a;
3061
+ const props = (_a = name ? selectedItem == null ? void 0 : selectedItem.props : {}) != null ? _a : {};
3062
+ return name ? getDeep(props, name) : [];
3063
+ },
3064
+ (val) => {
3065
+ if (!(0, import_fast_deep_equal.default)(val, valueRef.current)) {
3066
+ reset(val);
3067
+ }
3068
+ }
3069
+ );
3070
+ }, [appStoreApi, name, value]);
3071
+ useEffect6(() => {
3072
+ reset(getValue());
3073
+ }, [reset, getValue, name]);
2847
3074
  if (field.type !== "array" || !field.arrayFields) {
2848
3075
  return null;
2849
3076
  }
2850
- const addDisabled = field.max !== void 0 && localState.arrayState.items.length >= field.max || readOnly;
2851
- return /* @__PURE__ */ jsx8(
3077
+ const addDisabled = field.max !== void 0 && mirror.items.length >= field.max || readOnly;
3078
+ return /* @__PURE__ */ jsx9(
2852
3079
  Label2,
2853
3080
  {
2854
3081
  label: label || name,
2855
- icon: labelIcon || /* @__PURE__ */ jsx8(List, { size: 16 }),
3082
+ icon: labelIcon || /* @__PURE__ */ jsx9(List, { size: 16 }),
2856
3083
  el: "div",
2857
3084
  readOnly,
2858
- children: /* @__PURE__ */ jsx8(
3085
+ children: /* @__PURE__ */ jsx9(
2859
3086
  SortableProvider,
2860
3087
  {
2861
- onDragStart: (id2) => setDraggedItem(id2),
3088
+ onDragStart: (id2) => {
3089
+ valueRef.current = getValue();
3090
+ setDraggedItem(id2);
3091
+ syncCurrentIndexes();
3092
+ },
2862
3093
  onDragEnd: () => {
2863
3094
  setDraggedItem("");
2864
3095
  onChange(valueRef.current);
3096
+ syncCurrentIndexes();
2865
3097
  },
2866
3098
  onMove: (move) => {
3099
+ const arrayState = getArrayState();
2867
3100
  if (arrayState.items[move.source]._arrayId !== draggedItem) {
2868
3101
  return;
2869
3102
  }
2870
- const newValue = reorder(localState.value, move.source, move.target);
3103
+ const newValue = reorder(valueRef.current, move.source, move.target);
2871
3104
  const newArrayStateItems = reorder(
2872
3105
  arrayState.items,
2873
3106
  move.source,
@@ -2880,172 +3113,107 @@ var ArrayField = ({
2880
3113
  })
2881
3114
  };
2882
3115
  setUi(newUi, false);
2883
- setLocalState({
2884
- value: newValue,
2885
- arrayState: __spreadProps(__spreadValues({}, arrayState), { items: newArrayStateItems })
2886
- });
3116
+ setLocalState(__spreadProps(__spreadValues({}, arrayState), {
3117
+ items: newArrayStateItems
3118
+ }));
2887
3119
  valueRef.current = newValue;
2888
3120
  },
2889
3121
  children: /* @__PURE__ */ jsxs4(
2890
3122
  "div",
2891
3123
  {
2892
3124
  className: getClassName6({
2893
- hasItems: Array.isArray(value) && value.length > 0,
3125
+ hasItems: numItems > 0,
2894
3126
  addDisabled
2895
3127
  }),
2896
3128
  children: [
2897
- localState.arrayState.items.length > 0 && /* @__PURE__ */ jsx8("div", { className: getClassName6("inner"), "data-dnd-container": true, children: localState.arrayState.items.map((item, i) => {
2898
- const { _arrayId = `${id}-${i}`, _originalIndex = i } = item;
2899
- const data = Array.from(localState.value || [])[i] || {};
2900
- return /* @__PURE__ */ jsx8(
2901
- Sortable,
3129
+ mirror.items.length > 0 && /* @__PURE__ */ jsx9("div", { className: getClassName6("inner"), "data-dnd-container": true, children: mirror.items.map((item, index) => {
3130
+ const {
3131
+ _arrayId = `${id}-${index}`,
3132
+ _originalIndex = index,
3133
+ _currentIndex = index
3134
+ } = item;
3135
+ return /* @__PURE__ */ jsx9(
3136
+ ArrayFieldItem,
2902
3137
  {
3138
+ index: _currentIndex,
3139
+ dragIndex: index,
3140
+ originalIndex: _originalIndex,
3141
+ arrayId: id,
2903
3142
  id: _arrayId,
2904
- index: i,
2905
- disabled: readOnly,
2906
- children: ({ isDragging, ref, handleRef }) => /* @__PURE__ */ jsxs4(
2907
- "div",
2908
- {
2909
- ref,
2910
- className: getClassNameItem({
2911
- isExpanded: arrayState.openId === _arrayId,
2912
- isDragging,
2913
- readOnly
2914
- }),
2915
- children: [
2916
- /* @__PURE__ */ jsxs4(
2917
- "div",
2918
- {
2919
- ref: handleRef,
2920
- onClick: (e) => {
2921
- if (isDragging) return;
2922
- e.preventDefault();
2923
- e.stopPropagation();
2924
- if (arrayState.openId === _arrayId) {
2925
- setUi(
2926
- mapArrayStateToUi({
2927
- openId: ""
2928
- })
2929
- );
2930
- } else {
2931
- setUi(
2932
- mapArrayStateToUi({
2933
- openId: _arrayId
2934
- })
2935
- );
2936
- }
2937
- },
2938
- className: getClassNameItem("summary"),
2939
- children: [
2940
- field.getItemSummary ? field.getItemSummary(data, i) : `Item #${_originalIndex}`,
2941
- /* @__PURE__ */ jsxs4("div", { className: getClassNameItem("rhs"), children: [
2942
- !readOnly && /* @__PURE__ */ jsxs4("div", { className: getClassNameItem("actions"), children: [
2943
- /* @__PURE__ */ jsx8("div", { className: getClassNameItem("action"), children: /* @__PURE__ */ jsx8(
2944
- IconButton,
2945
- {
2946
- type: "button",
2947
- disabled: !!addDisabled,
2948
- onClick: (e) => {
2949
- e.stopPropagation();
2950
- const existingValue = [...value || []];
2951
- const newItem = uniqifyItem(
2952
- existingValue[i]
2953
- );
2954
- existingValue.splice(i, 0, newItem);
2955
- const newUi = mapArrayStateToUi(
2956
- regenerateArrayState(existingValue)
2957
- );
2958
- setUi(newUi, false);
2959
- onChange(existingValue);
2960
- },
2961
- title: "Duplicate",
2962
- children: /* @__PURE__ */ jsx8(Copy, { size: 16 })
2963
- }
2964
- ) }),
2965
- /* @__PURE__ */ jsx8("div", { className: getClassNameItem("action"), children: /* @__PURE__ */ jsx8(
2966
- IconButton,
2967
- {
2968
- type: "button",
2969
- disabled: field.min !== void 0 && field.min >= localState.arrayState.items.length,
2970
- onClick: (e) => {
2971
- e.stopPropagation();
2972
- const existingValue = [...value || []];
2973
- const existingItems = [
2974
- ...arrayState.items || []
2975
- ];
2976
- existingValue.splice(i, 1);
2977
- existingItems.splice(i, 1);
2978
- setUi(
2979
- mapArrayStateToUi({
2980
- items: existingItems
2981
- }),
2982
- false
2983
- );
2984
- onChange(existingValue);
2985
- },
2986
- title: "Delete",
2987
- children: /* @__PURE__ */ jsx8(Trash, { size: 16 })
2988
- }
2989
- ) })
2990
- ] }),
2991
- /* @__PURE__ */ jsx8("div", { children: /* @__PURE__ */ jsx8(DragIcon, {}) })
2992
- ] })
2993
- ]
2994
- }
2995
- ),
2996
- /* @__PURE__ */ jsx8("div", { className: getClassNameItem("body"), children: arrayState.openId === _arrayId && /* @__PURE__ */ jsx8("fieldset", { className: getClassNameItem("fieldset"), children: Object.keys(field.arrayFields).map(
2997
- (subName) => {
2998
- const subField = field.arrayFields[subName];
2999
- const indexName = `${name}[${i}]`;
3000
- const subPath = `${indexName}.${subName}`;
3001
- const localIndexName = `${localName}[${i}]`;
3002
- const localWildcardName = `${localName}[*]`;
3003
- const localSubPath = `${localIndexName}.${subName}`;
3004
- const localWildcardSubPath = `${localWildcardName}.${subName}`;
3005
- const subReadOnly = forceReadOnly ? forceReadOnly : typeof readOnlyFields[subPath] !== "undefined" ? readOnlyFields[localSubPath] : readOnlyFields[localWildcardSubPath];
3006
- const label2 = subField.label || subName;
3007
- return /* @__PURE__ */ jsx8(
3008
- NestedFieldProvider,
3009
- {
3010
- name: localIndexName,
3011
- wildcardName: localWildcardName,
3012
- subName,
3013
- readOnlyFields,
3014
- children: /* @__PURE__ */ jsx8(
3015
- AutoFieldPrivate,
3016
- {
3017
- name: subPath,
3018
- label: label2,
3019
- id: `${_arrayId}_${subName}`,
3020
- readOnly: subReadOnly,
3021
- field: __spreadProps(__spreadValues({}, subField), {
3022
- label: label2
3023
- // May be used by custom fields
3024
- }),
3025
- value: data[subName],
3026
- onChange: (val, ui) => {
3027
- onChange(
3028
- replace(value, i, __spreadProps(__spreadValues({}, data), {
3029
- [subName]: val
3030
- })),
3031
- ui
3032
- );
3033
- }
3034
- }
3035
- )
3036
- },
3037
- subPath
3038
- );
3039
- }
3040
- ) }) })
3041
- ]
3143
+ readOnly,
3144
+ field,
3145
+ name,
3146
+ localName,
3147
+ value,
3148
+ getValue: () => {
3149
+ const value2 = getValue();
3150
+ return value2[_currentIndex];
3151
+ },
3152
+ onChange: (val, ui, subName) => {
3153
+ const value2 = getValue();
3154
+ const data = Array.from(value2 || [])[index] || {};
3155
+ onChange(
3156
+ replace(value2, index, __spreadProps(__spreadValues({}, data), {
3157
+ [subName]: val
3158
+ })),
3159
+ ui
3160
+ );
3161
+ },
3162
+ onToggleExpand: (id2, isExpanded) => {
3163
+ if (isExpanded) {
3164
+ setUi(
3165
+ mapArrayStateToUi({
3166
+ openId: ""
3167
+ })
3168
+ );
3169
+ } else {
3170
+ setUi(
3171
+ mapArrayStateToUi({
3172
+ openId: id2
3173
+ })
3174
+ );
3042
3175
  }
3043
- )
3176
+ },
3177
+ actions: /* @__PURE__ */ jsxs4(Fragment2, { children: [
3178
+ /* @__PURE__ */ jsx9("div", { className: getClassNameItem("action"), children: /* @__PURE__ */ jsx9(
3179
+ IconButton,
3180
+ {
3181
+ type: "button",
3182
+ disabled: !!addDisabled,
3183
+ onClick: (e) => {
3184
+ e.stopPropagation();
3185
+ const value2 = getValue();
3186
+ const existingValue = [...value2 || []];
3187
+ const newItem = uniqifyItem(existingValue[index]);
3188
+ existingValue.splice(index, 0, newItem);
3189
+ updateValue(existingValue);
3190
+ },
3191
+ title: "Duplicate",
3192
+ children: /* @__PURE__ */ jsx9(Copy, { size: 16 })
3193
+ }
3194
+ ) }),
3195
+ /* @__PURE__ */ jsx9("div", { className: getClassNameItem("action"), children: /* @__PURE__ */ jsx9(
3196
+ IconButton,
3197
+ {
3198
+ type: "button",
3199
+ disabled: field.min !== void 0 && field.min >= mirror.items.length,
3200
+ onClick: (e) => {
3201
+ e.stopPropagation();
3202
+ const value2 = getValue();
3203
+ const existingValue = [...value2 || []];
3204
+ existingValue.splice(index, 1);
3205
+ updateValue(existingValue);
3206
+ },
3207
+ title: "Delete",
3208
+ children: /* @__PURE__ */ jsx9(Trash, { size: 16 })
3209
+ }
3210
+ ) })
3211
+ ] })
3044
3212
  },
3045
3213
  _arrayId
3046
3214
  );
3047
3215
  }) }),
3048
- !addDisabled && /* @__PURE__ */ jsx8(
3216
+ !addDisabled && /* @__PURE__ */ jsx9(
3049
3217
  "button",
3050
3218
  {
3051
3219
  type: "button",
@@ -3053,18 +3221,17 @@ var ArrayField = ({
3053
3221
  onClick: () => {
3054
3222
  var _a;
3055
3223
  if (isDraggingAny) return;
3056
- const existingValue = value || [];
3224
+ const value2 = getValue();
3225
+ const existingValue = value2 || [];
3057
3226
  const defaultProps = typeof field.defaultItemProps === "function" ? field.defaultItemProps(existingValue.length) : (_a = field.defaultItemProps) != null ? _a : {};
3058
3227
  const newItem = defaultSlots(
3059
3228
  uniqifyItem(defaultProps),
3060
3229
  field.arrayFields
3061
3230
  );
3062
3231
  const newValue = [...existingValue, newItem];
3063
- const newArrayState = regenerateArrayState(newValue);
3064
- setUi(mapArrayStateToUi(newArrayState), false);
3065
- onChange(newValue);
3232
+ updateValue(newValue);
3066
3233
  },
3067
- children: /* @__PURE__ */ jsx8(Plus, { size: 21 })
3234
+ children: /* @__PURE__ */ jsx9(Plus, { size: 21 })
3068
3235
  }
3069
3236
  )
3070
3237
  ]
@@ -3078,7 +3245,7 @@ var ArrayField = ({
3078
3245
 
3079
3246
  // components/AutoField/fields/DefaultField/index.tsx
3080
3247
  init_react_import();
3081
- import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
3248
+ import { Fragment as Fragment3, jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
3082
3249
  var getClassName7 = get_class_name_factory_default("Input", styles_module_default3);
3083
3250
  var DefaultField = ({
3084
3251
  field,
@@ -3092,16 +3259,16 @@ var DefaultField = ({
3092
3259
  id
3093
3260
  }) => {
3094
3261
  const value = _value;
3095
- return /* @__PURE__ */ jsx9(
3262
+ return /* @__PURE__ */ jsx10(
3096
3263
  Label2,
3097
3264
  {
3098
3265
  label: label || name,
3099
- icon: labelIcon || /* @__PURE__ */ jsxs5(Fragment2, { children: [
3100
- field.type === "text" && /* @__PURE__ */ jsx9(Type, { size: 16 }),
3101
- field.type === "number" && /* @__PURE__ */ jsx9(Hash, { size: 16 })
3266
+ icon: labelIcon || /* @__PURE__ */ jsxs5(Fragment3, { children: [
3267
+ field.type === "text" && /* @__PURE__ */ jsx10(Type, { size: 16 }),
3268
+ field.type === "number" && /* @__PURE__ */ jsx10(Hash, { size: 16 })
3102
3269
  ] }),
3103
3270
  readOnly,
3104
- children: /* @__PURE__ */ jsx9(
3271
+ children: /* @__PURE__ */ jsx10(
3105
3272
  "input",
3106
3273
  {
3107
3274
  className: getClassName7("input"),
@@ -3165,7 +3332,7 @@ var styles_module_default7 = { "Modal": "_Modal_ikbaj_1", "Modal--isOpen": "_Mod
3165
3332
 
3166
3333
  // components/Modal/index.tsx
3167
3334
  import { createPortal } from "react-dom";
3168
- import { jsx as jsx10 } from "react/jsx-runtime";
3335
+ import { jsx as jsx11 } from "react/jsx-runtime";
3169
3336
  var getClassName8 = get_class_name_factory_default("Modal", styles_module_default7);
3170
3337
  var Modal = ({
3171
3338
  children,
@@ -3177,10 +3344,10 @@ var Modal = ({
3177
3344
  setRootEl(document.getElementById("puck-portal-root"));
3178
3345
  }, []);
3179
3346
  if (!rootEl) {
3180
- return /* @__PURE__ */ jsx10("div", {});
3347
+ return /* @__PURE__ */ jsx11("div", {});
3181
3348
  }
3182
3349
  return createPortal(
3183
- /* @__PURE__ */ jsx10("div", { className: getClassName8({ isOpen }), onClick: onClose, children: /* @__PURE__ */ jsx10(
3350
+ /* @__PURE__ */ jsx11("div", { className: getClassName8({ isOpen }), onClick: onClose, children: /* @__PURE__ */ jsx11(
3184
3351
  "div",
3185
3352
  {
3186
3353
  className: getClassName8("inner"),
@@ -3200,11 +3367,11 @@ init_react_import();
3200
3367
  var styles_module_default8 = { "Heading": "_Heading_qxrry_1", "Heading--xxxxl": "_Heading--xxxxl_qxrry_12", "Heading--xxxl": "_Heading--xxxl_qxrry_18", "Heading--xxl": "_Heading--xxl_qxrry_22", "Heading--xl": "_Heading--xl_qxrry_26", "Heading--l": "_Heading--l_qxrry_30", "Heading--m": "_Heading--m_qxrry_34", "Heading--s": "_Heading--s_qxrry_38", "Heading--xs": "_Heading--xs_qxrry_42" };
3201
3368
 
3202
3369
  // components/Heading/index.tsx
3203
- import { jsx as jsx11 } from "react/jsx-runtime";
3370
+ import { jsx as jsx12 } from "react/jsx-runtime";
3204
3371
  var getClassName9 = get_class_name_factory_default("Heading", styles_module_default8);
3205
3372
  var Heading = ({ children, rank, size = "m" }) => {
3206
3373
  const Tag = rank ? `h${rank}` : "span";
3207
- return /* @__PURE__ */ jsx11(
3374
+ return /* @__PURE__ */ jsx12(
3208
3375
  Tag,
3209
3376
  {
3210
3377
  className: getClassName9({
@@ -3219,7 +3386,7 @@ var Heading = ({ children, rank, size = "m" }) => {
3219
3386
  init_react_import();
3220
3387
 
3221
3388
  // components/ExternalInput/index.tsx
3222
- import { Fragment as Fragment3, jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
3389
+ import { Fragment as Fragment4, jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
3223
3390
  var getClassName10 = get_class_name_factory_default("ExternalInput", styles_module_default6);
3224
3391
  var getClassNameModal = get_class_name_factory_default("ExternalInputModal", styles_module_default6);
3225
3392
  var dataCache = {};
@@ -3260,7 +3427,7 @@ var ExternalInput = ({
3260
3427
  }, [mappedData]);
3261
3428
  const [searchQuery, setSearchQuery] = useState6(field.initialQuery || "");
3262
3429
  const search = useCallback3(
3263
- (query, filters2) => __async(void 0, null, function* () {
3430
+ (query, filters2) => __async(null, null, function* () {
3264
3431
  setIsLoading(true);
3265
3432
  const cacheKey = `${id}-${query}-${JSON.stringify(filters2)}`;
3266
3433
  let listData;
@@ -3301,20 +3468,20 @@ var ExternalInput = ({
3301
3468
  id,
3302
3469
  children: [
3303
3470
  /* @__PURE__ */ jsxs6("div", { className: getClassName10("actions"), children: [
3304
- /* @__PURE__ */ jsx12(
3471
+ /* @__PURE__ */ jsx13(
3305
3472
  "button",
3306
3473
  {
3307
3474
  type: "button",
3308
3475
  onClick: () => setOpen(true),
3309
3476
  className: getClassName10("button"),
3310
3477
  disabled: readOnly,
3311
- children: value ? field.getItemSummary ? field.getItemSummary(value) : "External item" : /* @__PURE__ */ jsxs6(Fragment3, { children: [
3312
- /* @__PURE__ */ jsx12(Link, { size: "16" }),
3313
- /* @__PURE__ */ jsx12("span", { children: field.placeholder })
3478
+ children: value ? field.getItemSummary ? field.getItemSummary(value) : "External item" : /* @__PURE__ */ jsxs6(Fragment4, { children: [
3479
+ /* @__PURE__ */ jsx13(Link, { size: "16" }),
3480
+ /* @__PURE__ */ jsx13("span", { children: field.placeholder })
3314
3481
  ] })
3315
3482
  }
3316
3483
  ),
3317
- value && /* @__PURE__ */ jsx12(
3484
+ value && /* @__PURE__ */ jsx13(
3318
3485
  "button",
3319
3486
  {
3320
3487
  type: "button",
@@ -3323,11 +3490,11 @@ var ExternalInput = ({
3323
3490
  onChange(null);
3324
3491
  },
3325
3492
  disabled: readOnly,
3326
- children: /* @__PURE__ */ jsx12(LockOpen, { size: 16 })
3493
+ children: /* @__PURE__ */ jsx13(LockOpen, { size: 16 })
3327
3494
  }
3328
3495
  )
3329
3496
  ] }),
3330
- /* @__PURE__ */ jsx12(Modal, { onClose: () => setOpen(false), isOpen, children: /* @__PURE__ */ jsxs6(
3497
+ /* @__PURE__ */ jsx13(Modal, { onClose: () => setOpen(false), isOpen, children: /* @__PURE__ */ jsxs6(
3331
3498
  "form",
3332
3499
  {
3333
3500
  className: getClassNameModal({
@@ -3342,11 +3509,11 @@ var ExternalInput = ({
3342
3509
  search(searchQuery, filters);
3343
3510
  },
3344
3511
  children: [
3345
- /* @__PURE__ */ jsx12("div", { className: getClassNameModal("masthead"), children: field.showSearch ? /* @__PURE__ */ jsxs6("div", { className: getClassNameModal("searchForm"), children: [
3512
+ /* @__PURE__ */ jsx13("div", { className: getClassNameModal("masthead"), children: field.showSearch ? /* @__PURE__ */ jsxs6("div", { className: getClassNameModal("searchForm"), children: [
3346
3513
  /* @__PURE__ */ jsxs6("label", { className: getClassNameModal("search"), children: [
3347
- /* @__PURE__ */ jsx12("span", { className: getClassNameModal("searchIconText"), children: "Search" }),
3348
- /* @__PURE__ */ jsx12("div", { className: getClassNameModal("searchIcon"), children: /* @__PURE__ */ jsx12(Search, { size: "18" }) }),
3349
- /* @__PURE__ */ jsx12(
3514
+ /* @__PURE__ */ jsx13("span", { className: getClassNameModal("searchIconText"), children: "Search" }),
3515
+ /* @__PURE__ */ jsx13("div", { className: getClassNameModal("searchIcon"), children: /* @__PURE__ */ jsx13(Search, { size: "18" }) }),
3516
+ /* @__PURE__ */ jsx13(
3350
3517
  "input",
3351
3518
  {
3352
3519
  className: getClassNameModal("searchInput"),
@@ -3362,8 +3529,8 @@ var ExternalInput = ({
3362
3529
  )
3363
3530
  ] }),
3364
3531
  /* @__PURE__ */ jsxs6("div", { className: getClassNameModal("searchActions"), children: [
3365
- /* @__PURE__ */ jsx12(Button, { type: "submit", loading: isLoading, fullWidth: true, children: "Search" }),
3366
- hasFilterFields && /* @__PURE__ */ jsx12("div", { className: getClassNameModal("searchActionIcon"), children: /* @__PURE__ */ jsx12(
3532
+ /* @__PURE__ */ jsx13(Button, { type: "submit", loading: isLoading, fullWidth: true, children: "Search" }),
3533
+ hasFilterFields && /* @__PURE__ */ jsx13("div", { className: getClassNameModal("searchActionIcon"), children: /* @__PURE__ */ jsx13(
3367
3534
  IconButton,
3368
3535
  {
3369
3536
  type: "button",
@@ -3373,19 +3540,19 @@ var ExternalInput = ({
3373
3540
  e.stopPropagation();
3374
3541
  setFiltersToggled(!filtersToggled);
3375
3542
  },
3376
- children: /* @__PURE__ */ jsx12(SlidersHorizontal, { size: 20 })
3543
+ children: /* @__PURE__ */ jsx13(SlidersHorizontal, { size: 20 })
3377
3544
  }
3378
3545
  ) })
3379
3546
  ] })
3380
- ] }) : /* @__PURE__ */ jsx12(Heading, { rank: "2", size: "xs", children: field.placeholder || "Select data" }) }),
3547
+ ] }) : /* @__PURE__ */ jsx13(Heading, { rank: "2", size: "xs", children: field.placeholder || "Select data" }) }),
3381
3548
  /* @__PURE__ */ jsxs6("div", { className: getClassNameModal("grid"), children: [
3382
- hasFilterFields && /* @__PURE__ */ jsx12("div", { className: getClassNameModal("filters"), children: hasFilterFields && Object.keys(filterFields).map((fieldName) => {
3549
+ hasFilterFields && /* @__PURE__ */ jsx13("div", { className: getClassNameModal("filters"), children: hasFilterFields && Object.keys(filterFields).map((fieldName) => {
3383
3550
  const filterField = filterFields[fieldName];
3384
- return /* @__PURE__ */ jsx12(
3551
+ return /* @__PURE__ */ jsx13(
3385
3552
  "div",
3386
3553
  {
3387
3554
  className: getClassNameModal("field"),
3388
- children: /* @__PURE__ */ jsx12(
3555
+ children: /* @__PURE__ */ jsx13(
3389
3556
  AutoFieldPrivate,
3390
3557
  {
3391
3558
  field: filterField,
@@ -3394,11 +3561,13 @@ var ExternalInput = ({
3394
3561
  label: filterField.label || fieldName,
3395
3562
  value: filters[fieldName],
3396
3563
  onChange: (value2) => {
3397
- const newFilters = __spreadProps(__spreadValues({}, filters), {
3398
- [fieldName]: value2
3564
+ setFilters((filters2) => {
3565
+ const newFilters = __spreadProps(__spreadValues({}, filters2), {
3566
+ [fieldName]: value2
3567
+ });
3568
+ search(searchQuery, newFilters);
3569
+ return newFilters;
3399
3570
  });
3400
- setFilters(newFilters);
3401
- search(searchQuery, newFilters);
3402
3571
  }
3403
3572
  }
3404
3573
  )
@@ -3408,7 +3577,7 @@ var ExternalInput = ({
3408
3577
  }) }),
3409
3578
  /* @__PURE__ */ jsxs6("div", { className: getClassNameModal("tableWrapper"), children: [
3410
3579
  /* @__PURE__ */ jsxs6("table", { className: getClassNameModal("table"), children: [
3411
- /* @__PURE__ */ jsx12("thead", { className: getClassNameModal("thead"), children: /* @__PURE__ */ jsx12("tr", { className: getClassNameModal("tr"), children: keys.map((key) => /* @__PURE__ */ jsx12(
3580
+ /* @__PURE__ */ jsx13("thead", { className: getClassNameModal("thead"), children: /* @__PURE__ */ jsx13("tr", { className: getClassNameModal("tr"), children: keys.map((key) => /* @__PURE__ */ jsx13(
3412
3581
  "th",
3413
3582
  {
3414
3583
  className: getClassNameModal("th"),
@@ -3417,8 +3586,8 @@ var ExternalInput = ({
3417
3586
  },
3418
3587
  key
3419
3588
  )) }) }),
3420
- /* @__PURE__ */ jsx12("tbody", { className: getClassNameModal("tbody"), children: mappedData.map((item, i) => {
3421
- return /* @__PURE__ */ jsx12(
3589
+ /* @__PURE__ */ jsx13("tbody", { className: getClassNameModal("tbody"), children: mappedData.map((item, i) => {
3590
+ return /* @__PURE__ */ jsx13(
3422
3591
  "tr",
3423
3592
  {
3424
3593
  style: { whiteSpace: "nowrap" },
@@ -3427,16 +3596,16 @@ var ExternalInput = ({
3427
3596
  onChange(mapProp(data[i]));
3428
3597
  setOpen(false);
3429
3598
  },
3430
- children: keys.map((key) => /* @__PURE__ */ jsx12("td", { className: getClassNameModal("td"), children: item[key] }, key))
3599
+ children: keys.map((key) => /* @__PURE__ */ jsx13("td", { className: getClassNameModal("td"), children: item[key] }, key))
3431
3600
  },
3432
3601
  i
3433
3602
  );
3434
3603
  }) })
3435
3604
  ] }),
3436
- /* @__PURE__ */ jsx12("div", { className: getClassNameModal("loadingBanner"), children: /* @__PURE__ */ jsx12(Loader, { size: 24 }) })
3605
+ /* @__PURE__ */ jsx13("div", { className: getClassNameModal("loadingBanner"), children: /* @__PURE__ */ jsx13(Loader, { size: 24 }) })
3437
3606
  ] })
3438
3607
  ] }),
3439
- /* @__PURE__ */ jsx12("div", { className: getClassNameModal("footerContainer"), children: /* @__PURE__ */ jsx12(Footer, { items: mappedData }) })
3608
+ /* @__PURE__ */ jsx13("div", { className: getClassNameModal("footerContainer"), children: /* @__PURE__ */ jsx13(Footer, { items: mappedData }) })
3440
3609
  ]
3441
3610
  }
3442
3611
  ) })
@@ -3446,7 +3615,7 @@ var ExternalInput = ({
3446
3615
  };
3447
3616
 
3448
3617
  // components/AutoField/fields/ExternalField/index.tsx
3449
- import { jsx as jsx13 } from "react/jsx-runtime";
3618
+ import { jsx as jsx14 } from "react/jsx-runtime";
3450
3619
  var ExternalField = ({
3451
3620
  field,
3452
3621
  onChange,
@@ -3471,13 +3640,13 @@ var ExternalField = ({
3471
3640
  if (field.type !== "external") {
3472
3641
  return null;
3473
3642
  }
3474
- return /* @__PURE__ */ jsx13(
3643
+ return /* @__PURE__ */ jsx14(
3475
3644
  Label2,
3476
3645
  {
3477
3646
  label: label || name,
3478
- icon: labelIcon || /* @__PURE__ */ jsx13(Link, { size: 16 }),
3647
+ icon: labelIcon || /* @__PURE__ */ jsx14(Link, { size: 16 }),
3479
3648
  el: "div",
3480
- children: /* @__PURE__ */ jsx13(
3649
+ children: /* @__PURE__ */ jsx14(
3481
3650
  ExternalInput,
3482
3651
  {
3483
3652
  name,
@@ -3486,7 +3655,7 @@ var ExternalField = ({
3486
3655
  placeholder: ((_a = deprecatedField.adaptor) == null ? void 0 : _a.name) ? `Select from ${deprecatedField.adaptor.name}` : validField.placeholder || "Select data",
3487
3656
  mapProp: ((_b = deprecatedField.adaptor) == null ? void 0 : _b.mapProp) || validField.mapProp,
3488
3657
  mapRow: validField.mapRow,
3489
- fetchList: ((_c = deprecatedField.adaptor) == null ? void 0 : _c.fetchList) ? () => __async(void 0, null, function* () {
3658
+ fetchList: ((_c = deprecatedField.adaptor) == null ? void 0 : _c.fetchList) ? () => __async(null, null, function* () {
3490
3659
  return yield deprecatedField.adaptor.fetchList(
3491
3660
  deprecatedField.adaptorParams
3492
3661
  );
@@ -3504,7 +3673,7 @@ var ExternalField = ({
3504
3673
 
3505
3674
  // components/AutoField/fields/RadioField/index.tsx
3506
3675
  init_react_import();
3507
- import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
3676
+ import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
3508
3677
  var getClassName11 = get_class_name_factory_default("Input", styles_module_default3);
3509
3678
  var RadioField = ({
3510
3679
  field,
@@ -3520,21 +3689,21 @@ var RadioField = ({
3520
3689
  if (field.type !== "radio" || !field.options) {
3521
3690
  return null;
3522
3691
  }
3523
- return /* @__PURE__ */ jsx14(
3692
+ return /* @__PURE__ */ jsx15(
3524
3693
  Label2,
3525
3694
  {
3526
- icon: labelIcon || /* @__PURE__ */ jsx14(CircleCheckBig, { size: 16 }),
3695
+ icon: labelIcon || /* @__PURE__ */ jsx15(CircleCheckBig, { size: 16 }),
3527
3696
  label: label || name,
3528
3697
  readOnly,
3529
3698
  el: "div",
3530
- children: /* @__PURE__ */ jsx14("div", { className: getClassName11("radioGroupItems"), id, children: field.options.map((option) => {
3699
+ children: /* @__PURE__ */ jsx15("div", { className: getClassName11("radioGroupItems"), id, children: field.options.map((option) => {
3531
3700
  var _a;
3532
3701
  return /* @__PURE__ */ jsxs7(
3533
3702
  "label",
3534
3703
  {
3535
3704
  className: getClassName11("radio"),
3536
3705
  children: [
3537
- /* @__PURE__ */ jsx14(
3706
+ /* @__PURE__ */ jsx15(
3538
3707
  "input",
3539
3708
  {
3540
3709
  type: "radio",
@@ -3548,7 +3717,7 @@ var RadioField = ({
3548
3717
  checked: value === option.value
3549
3718
  }
3550
3719
  ),
3551
- /* @__PURE__ */ jsx14("div", { className: getClassName11("radioInner"), children: option.label || ((_a = option.value) == null ? void 0 : _a.toString()) })
3720
+ /* @__PURE__ */ jsx15("div", { className: getClassName11("radioInner"), children: option.label || ((_a = option.value) == null ? void 0 : _a.toString()) })
3552
3721
  ]
3553
3722
  },
3554
3723
  option.label + option.value
@@ -3560,7 +3729,7 @@ var RadioField = ({
3560
3729
 
3561
3730
  // components/AutoField/fields/SelectField/index.tsx
3562
3731
  init_react_import();
3563
- import { jsx as jsx15 } from "react/jsx-runtime";
3732
+ import { jsx as jsx16 } from "react/jsx-runtime";
3564
3733
  var getClassName12 = get_class_name_factory_default("Input", styles_module_default3);
3565
3734
  var SelectField = ({
3566
3735
  field,
@@ -3576,13 +3745,13 @@ var SelectField = ({
3576
3745
  if (field.type !== "select" || !field.options) {
3577
3746
  return null;
3578
3747
  }
3579
- return /* @__PURE__ */ jsx15(
3748
+ return /* @__PURE__ */ jsx16(
3580
3749
  Label2,
3581
3750
  {
3582
3751
  label: label || name,
3583
- icon: labelIcon || /* @__PURE__ */ jsx15(ChevronDown, { size: 16 }),
3752
+ icon: labelIcon || /* @__PURE__ */ jsx16(ChevronDown, { size: 16 }),
3584
3753
  readOnly,
3585
- children: /* @__PURE__ */ jsx15(
3754
+ children: /* @__PURE__ */ jsx16(
3586
3755
  "select",
3587
3756
  {
3588
3757
  id,
@@ -3593,7 +3762,7 @@ var SelectField = ({
3593
3762
  onChange(JSON.parse(e.target.value).value);
3594
3763
  },
3595
3764
  value: JSON.stringify({ value }),
3596
- children: field.options.map((option) => /* @__PURE__ */ jsx15(
3765
+ children: field.options.map((option) => /* @__PURE__ */ jsx16(
3597
3766
  "option",
3598
3767
  {
3599
3768
  label: option.label,
@@ -3609,7 +3778,7 @@ var SelectField = ({
3609
3778
 
3610
3779
  // components/AutoField/fields/TextareaField/index.tsx
3611
3780
  init_react_import();
3612
- import { jsx as jsx16 } from "react/jsx-runtime";
3781
+ import { jsx as jsx17 } from "react/jsx-runtime";
3613
3782
  var getClassName13 = get_class_name_factory_default("Input", styles_module_default3);
3614
3783
  var TextareaField = ({
3615
3784
  field,
@@ -3622,13 +3791,13 @@ var TextareaField = ({
3622
3791
  Label: Label2,
3623
3792
  id
3624
3793
  }) => {
3625
- return /* @__PURE__ */ jsx16(
3794
+ return /* @__PURE__ */ jsx17(
3626
3795
  Label2,
3627
3796
  {
3628
3797
  label: label || name,
3629
- icon: labelIcon || /* @__PURE__ */ jsx16(Type, { size: 16 }),
3798
+ icon: labelIcon || /* @__PURE__ */ jsx17(Type, { size: 16 }),
3630
3799
  readOnly,
3631
- children: /* @__PURE__ */ jsx16(
3800
+ children: /* @__PURE__ */ jsx17(
3632
3801
  "textarea",
3633
3802
  {
3634
3803
  id,
@@ -3655,64 +3824,59 @@ init_react_import();
3655
3824
  var styles_module_default9 = { "ObjectField": "_ObjectField_1ua3y_5", "ObjectField-fieldset": "_ObjectField-fieldset_1ua3y_13" };
3656
3825
 
3657
3826
  // components/AutoField/fields/ObjectField/index.tsx
3658
- import { jsx as jsx17 } from "react/jsx-runtime";
3827
+ import { useCallback as useCallback4 } from "react";
3828
+ import { jsx as jsx18 } from "react/jsx-runtime";
3659
3829
  var getClassName14 = get_class_name_factory_default("ObjectField", styles_module_default9);
3660
3830
  var ObjectField = ({
3661
3831
  field,
3662
3832
  onChange,
3663
- value,
3664
3833
  name,
3665
3834
  label,
3666
3835
  labelIcon,
3667
3836
  Label: Label2,
3668
3837
  readOnly,
3669
- id
3838
+ id,
3839
+ value
3670
3840
  }) => {
3671
- const { readOnlyFields, localName = name } = useNestedFieldContext();
3841
+ const { localName = name } = useNestedFieldContext();
3842
+ const appStoreApi = useAppStoreApi();
3843
+ const canEdit = useAppStore(
3844
+ (s) => s.permissions.getPermissions({ item: s.selectedItem }).edit
3845
+ );
3846
+ const getValue = useCallback4(() => {
3847
+ var _a;
3848
+ if (typeof value !== "undefined") return value;
3849
+ const { selectedItem } = appStoreApi.getState();
3850
+ const props = (_a = name ? selectedItem == null ? void 0 : selectedItem.props : {}) != null ? _a : {};
3851
+ return name ? getDeep(props, name) : {};
3852
+ }, [appStoreApi, name, value]);
3672
3853
  if (field.type !== "object" || !field.objectFields) {
3673
3854
  return null;
3674
3855
  }
3675
- const data = value || {};
3676
- return /* @__PURE__ */ jsx17(
3856
+ return /* @__PURE__ */ jsx18(
3677
3857
  Label2,
3678
3858
  {
3679
3859
  label: label || name,
3680
- icon: labelIcon || /* @__PURE__ */ jsx17(EllipsisVertical, { size: 16 }),
3860
+ icon: labelIcon || /* @__PURE__ */ jsx18(EllipsisVertical, { size: 16 }),
3681
3861
  el: "div",
3682
3862
  readOnly,
3683
- children: /* @__PURE__ */ jsx17("div", { className: getClassName14(), children: /* @__PURE__ */ jsx17("fieldset", { className: getClassName14("fieldset"), children: Object.keys(field.objectFields).map((subName) => {
3863
+ children: /* @__PURE__ */ jsx18("div", { className: getClassName14(), children: /* @__PURE__ */ jsx18("fieldset", { className: getClassName14("fieldset"), children: Object.keys(field.objectFields).map((subName) => {
3684
3864
  const subField = field.objectFields[subName];
3685
3865
  const subPath = `${localName}.${subName}`;
3686
- const subReadOnly = readOnly ? readOnly : readOnlyFields[subPath];
3687
- const label2 = subField.label || subName;
3688
- return /* @__PURE__ */ jsx17(
3689
- NestedFieldProvider,
3866
+ return /* @__PURE__ */ jsx18(
3867
+ SubField,
3690
3868
  {
3691
- name: localName || id,
3869
+ id: `${id}_${subName}`,
3870
+ name,
3692
3871
  subName,
3693
- readOnlyFields,
3694
- children: /* @__PURE__ */ jsx17(
3695
- AutoFieldPrivate,
3696
- {
3697
- name: subPath,
3698
- label: subPath,
3699
- id: `${id}_${subName}`,
3700
- readOnly: subReadOnly,
3701
- field: __spreadProps(__spreadValues({}, subField), {
3702
- label: label2
3703
- // May be used by custom fields
3704
- }),
3705
- value: data[subName],
3706
- onChange: (val, ui) => {
3707
- onChange(
3708
- __spreadProps(__spreadValues({}, data), {
3709
- [subName]: val
3710
- }),
3711
- ui
3712
- );
3713
- }
3714
- }
3715
- )
3872
+ localName,
3873
+ field: subField,
3874
+ forceReadOnly: !canEdit,
3875
+ value,
3876
+ onChange: (subValue, ui, subName2) => {
3877
+ const value2 = getValue();
3878
+ onChange(__spreadProps(__spreadValues({}, value2), { [subName2]: subValue }), ui);
3879
+ }
3716
3880
  },
3717
3881
  subPath
3718
3882
  );
@@ -3733,7 +3897,8 @@ var useSafeId = () => {
3733
3897
  };
3734
3898
 
3735
3899
  // components/AutoField/index.tsx
3736
- import { Fragment as Fragment4, jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
3900
+ import { useShallow } from "zustand/react/shallow";
3901
+ import { Fragment as Fragment5, jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
3737
3902
  var getClassName15 = get_class_name_factory_default("Input", styles_module_default3);
3738
3903
  var getClassNameWrapper = get_class_name_factory_default("InputWrapper", styles_module_default3);
3739
3904
  var FieldLabel = ({
@@ -3747,9 +3912,9 @@ var FieldLabel = ({
3747
3912
  const El = el;
3748
3913
  return /* @__PURE__ */ jsxs8(El, { className, children: [
3749
3914
  /* @__PURE__ */ jsxs8("div", { className: getClassName15("label"), children: [
3750
- icon ? /* @__PURE__ */ jsx18("div", { className: getClassName15("labelIcon"), children: icon }) : /* @__PURE__ */ jsx18(Fragment4, {}),
3915
+ icon ? /* @__PURE__ */ jsx19("div", { className: getClassName15("labelIcon"), children: icon }) : /* @__PURE__ */ jsx19(Fragment5, {}),
3751
3916
  label,
3752
- readOnly && /* @__PURE__ */ jsx18("div", { className: getClassName15("disabledIcon"), title: "Read-only", children: /* @__PURE__ */ jsx18(Lock, { size: "12" }) })
3917
+ readOnly && /* @__PURE__ */ jsx19("div", { className: getClassName15("disabledIcon"), title: "Read-only", children: /* @__PURE__ */ jsx19(Lock, { size: "12" }) })
3753
3918
  ] }),
3754
3919
  children
3755
3920
  ] });
@@ -3767,9 +3932,9 @@ var FieldLabelInternal = ({
3767
3932
  [overrides]
3768
3933
  );
3769
3934
  if (!label) {
3770
- return /* @__PURE__ */ jsx18(Fragment4, { children });
3935
+ return /* @__PURE__ */ jsx19(Fragment5, { children });
3771
3936
  }
3772
- return /* @__PURE__ */ jsx18(
3937
+ return /* @__PURE__ */ jsx19(
3773
3938
  Wrapper,
3774
3939
  {
3775
3940
  label,
@@ -3795,10 +3960,10 @@ function AutoFieldInternal(props) {
3795
3960
  var _a;
3796
3961
  const dispatch = useAppStore((s) => s.dispatch);
3797
3962
  const overrides = useAppStore((s) => s.overrides);
3798
- const readOnly = useAppStore((s) => {
3963
+ const readOnly = useAppStore(useShallow((s) => {
3799
3964
  var _a2;
3800
3965
  return (_a2 = s.selectedItem) == null ? void 0 : _a2.readOnly;
3801
- });
3966
+ }));
3802
3967
  const nestedFieldContext = useContext3(NestedFieldContext);
3803
3968
  const { id, Label: Label2 = FieldLabelInternal } = props;
3804
3969
  const field = props.field;
@@ -3832,7 +3997,7 @@ function AutoFieldInternal(props) {
3832
3997
  }),
3833
3998
  [props, field, label, labelIcon, Label2, resolvedId]
3834
3999
  );
3835
- const onFocus = useCallback4(
4000
+ const onFocus = useCallback5(
3836
4001
  (e) => {
3837
4002
  if (mergedProps.name && (e.target.nodeName === "INPUT" || e.target.nodeName === "TEXTAREA")) {
3838
4003
  e.stopPropagation();
@@ -3846,7 +4011,7 @@ function AutoFieldInternal(props) {
3846
4011
  },
3847
4012
  [mergedProps.name]
3848
4013
  );
3849
- const onBlur = useCallback4((e) => {
4014
+ const onBlur = useCallback5((e) => {
3850
4015
  if ("name" in e.target) {
3851
4016
  dispatch({
3852
4017
  type: "setUi",
@@ -3862,6 +4027,7 @@ function AutoFieldInternal(props) {
3862
4027
  }
3863
4028
  return (_props) => null;
3864
4029
  }, [field.type]);
4030
+ const fieldKey = field.type === "custom" ? field.key : void 0;
3865
4031
  let FieldComponent = useMemo3(() => {
3866
4032
  if (field.type === "custom") {
3867
4033
  if (!field.render) {
@@ -3871,7 +4037,7 @@ function AutoFieldInternal(props) {
3871
4037
  } else if (field.type !== "slot") {
3872
4038
  return render[field.type];
3873
4039
  }
3874
- }, [field.type, render]);
4040
+ }, [field.type, fieldKey, render]);
3875
4041
  const { visible = true } = props.field;
3876
4042
  if (!visible) {
3877
4043
  return null;
@@ -3882,14 +4048,14 @@ function AutoFieldInternal(props) {
3882
4048
  if (!FieldComponent) {
3883
4049
  throw new Error(`Field type for ${field.type} did not exist.`);
3884
4050
  }
3885
- return /* @__PURE__ */ jsx18(
4051
+ return /* @__PURE__ */ jsx19(
3886
4052
  NestedFieldContext.Provider,
3887
4053
  {
3888
4054
  value: {
3889
4055
  readOnlyFields: nestedFieldContext.readOnlyFields || readOnly || {},
3890
4056
  localName: (_a = nestedFieldContext.localName) != null ? _a : mergedProps.name
3891
4057
  },
3892
- children: /* @__PURE__ */ jsx18(
4058
+ children: /* @__PURE__ */ jsx19(
3893
4059
  "div",
3894
4060
  {
3895
4061
  className: getClassNameWrapper(),
@@ -3898,7 +4064,7 @@ function AutoFieldInternal(props) {
3898
4064
  onClick: (e) => {
3899
4065
  e.stopPropagation();
3900
4066
  },
3901
- children: /* @__PURE__ */ jsx18(FieldComponent, __spreadProps(__spreadValues({}, mergedProps), { children: /* @__PURE__ */ jsx18(Children, __spreadValues({}, mergedProps)) }))
4067
+ children: /* @__PURE__ */ jsx19(FieldComponent, __spreadProps(__spreadValues({}, mergedProps), { children: /* @__PURE__ */ jsx19(Children, __spreadValues({}, mergedProps)) }))
3902
4068
  }
3903
4069
  )
3904
4070
  }
@@ -3906,14 +4072,30 @@ function AutoFieldInternal(props) {
3906
4072
  }
3907
4073
  function AutoFieldPrivate(props) {
3908
4074
  const isFocused = useAppStore((s) => s.state.ui.field.focus === props.name);
3909
- const { value, onChange } = props;
4075
+ const { onChange } = props;
4076
+ const value = useAppStore((s) => {
4077
+ if (typeof props.value !== "undefined") return props.value;
4078
+ const { name, field } = props;
4079
+ if (!name) return;
4080
+ const excludedFields = ["array", "object"];
4081
+ if (!excludedFields.includes(field.type)) {
4082
+ const rootProps = s.state.data.root.props || s.state.data.root;
4083
+ const props2 = s.selectedItem ? s.selectedItem.props : rootProps;
4084
+ if (props2) {
4085
+ return getDeep(props2, name);
4086
+ }
4087
+ }
4088
+ });
3910
4089
  const [localValue, setLocalValue] = useState8(value);
3911
- const onChangeLocal = useCallback4(
4090
+ const onChangeLocal = useCallback5(
3912
4091
  (val, ui) => {
3913
- setLocalValue(val);
4092
+ const excludedFields = ["array", "object"];
4093
+ if (!excludedFields.includes(props.field.type)) {
4094
+ setLocalValue(val);
4095
+ }
3914
4096
  onChange(val, ui);
3915
4097
  },
3916
- [onChange]
4098
+ [props.field.type]
3917
4099
  );
3918
4100
  useEffect10(() => {
3919
4101
  if (!isFocused) {
@@ -3927,15 +4109,19 @@ function AutoFieldPrivate(props) {
3927
4109
  }
3928
4110
  }
3929
4111
  }, [isFocused, value, localValue]);
3930
- const localProps = {
3931
- value: localValue,
3932
- onChange: onChangeLocal
3933
- };
3934
- return /* @__PURE__ */ jsx18(AutoFieldInternal, __spreadValues(__spreadValues({}, props), localProps));
4112
+ const localProps = useMemo3(
4113
+ () => ({
4114
+ // localValue is sometimes undefined when using outside of Fields context
4115
+ value: localValue != null ? localValue : value,
4116
+ onChange: onChangeLocal
4117
+ }),
4118
+ [value, localValue, onChangeLocal]
4119
+ );
4120
+ return /* @__PURE__ */ jsx19(AutoFieldInternal, __spreadValues(__spreadValues({}, props), localProps));
3935
4121
  }
3936
4122
  function AutoField(props) {
3937
4123
  const DefaultLabel = useMemo3(() => {
3938
- const DefaultLabel2 = (labelProps) => /* @__PURE__ */ jsx18(
4124
+ const DefaultLabel2 = (labelProps) => /* @__PURE__ */ jsx19(
3939
4125
  "div",
3940
4126
  __spreadProps(__spreadValues({}, labelProps), {
3941
4127
  className: getClassName15({ readOnly: props.readOnly })
@@ -3946,7 +4132,7 @@ function AutoField(props) {
3946
4132
  if (props.field.type === "slot") {
3947
4133
  return null;
3948
4134
  }
3949
- return /* @__PURE__ */ jsx18(AutoFieldInternal, __spreadProps(__spreadValues({}, props), { Label: DefaultLabel }));
4135
+ return /* @__PURE__ */ jsx19(AutoFieldInternal, __spreadProps(__spreadValues({}, props), { Label: DefaultLabel }));
3950
4136
  }
3951
4137
 
3952
4138
  // components/Render/index.tsx
@@ -3956,8 +4142,8 @@ init_react_import();
3956
4142
  init_react_import();
3957
4143
  import {
3958
4144
  forwardRef as forwardRef3,
3959
- memo as memo2,
3960
- useCallback as useCallback11,
4145
+ memo as memo4,
4146
+ useCallback as useCallback12,
3961
4147
  useContext as useContext8,
3962
4148
  useEffect as useEffect18,
3963
4149
  useMemo as useMemo8,
@@ -3967,7 +4153,7 @@ import {
3967
4153
  // components/DraggableComponent/index.tsx
3968
4154
  init_react_import();
3969
4155
  import {
3970
- useCallback as useCallback7,
4156
+ useCallback as useCallback8,
3971
4157
  useContext as useContext5,
3972
4158
  useEffect as useEffect12,
3973
4159
  useMemo as useMemo5,
@@ -4006,11 +4192,11 @@ function getDeepScrollPosition(element) {
4006
4192
  init_react_import();
4007
4193
  import {
4008
4194
  createContext as createContext3,
4009
- useCallback as useCallback5,
4195
+ useCallback as useCallback6,
4010
4196
  useMemo as useMemo4
4011
4197
  } from "react";
4012
4198
  import { createStore as createStore2 } from "zustand";
4013
- import { Fragment as Fragment5, jsx as jsx19 } from "react/jsx-runtime";
4199
+ import { Fragment as Fragment6, jsx as jsx20 } from "react/jsx-runtime";
4014
4200
  var dropZoneContext = createContext3(null);
4015
4201
  var ZoneStoreContext = createContext3(
4016
4202
  createStore2(() => ({
@@ -4028,14 +4214,14 @@ var ZoneStoreProvider = ({
4028
4214
  children,
4029
4215
  store
4030
4216
  }) => {
4031
- return /* @__PURE__ */ jsx19(ZoneStoreContext.Provider, { value: store, children });
4217
+ return /* @__PURE__ */ jsx20(ZoneStoreContext.Provider, { value: store, children });
4032
4218
  };
4033
4219
  var DropZoneProvider = ({
4034
4220
  children,
4035
4221
  value
4036
4222
  }) => {
4037
4223
  const dispatch = useAppStore((s) => s.dispatch);
4038
- const registerZone = useCallback5(
4224
+ const registerZone = useCallback6(
4039
4225
  (zoneCompound) => {
4040
4226
  dispatch({
4041
4227
  type: "registerZone",
@@ -4050,11 +4236,11 @@ var DropZoneProvider = ({
4050
4236
  }, value),
4051
4237
  [value]
4052
4238
  );
4053
- return /* @__PURE__ */ jsx19(Fragment5, { children: memoValue && /* @__PURE__ */ jsx19(dropZoneContext.Provider, { value: memoValue, children }) });
4239
+ return /* @__PURE__ */ jsx20(Fragment6, { children: memoValue && /* @__PURE__ */ jsx20(dropZoneContext.Provider, { value: memoValue, children }) });
4054
4240
  };
4055
4241
 
4056
4242
  // components/DraggableComponent/index.tsx
4057
- import { useShallow as useShallow2 } from "zustand/react/shallow";
4243
+ import { useShallow as useShallow3 } from "zustand/react/shallow";
4058
4244
  import { useSortable as useSortable2 } from "@dnd-kit/react/sortable";
4059
4245
 
4060
4246
  // lib/accumulate-transform.ts
@@ -4076,21 +4262,21 @@ function accumulateTransform(el) {
4076
4262
  init_react_import();
4077
4263
  import { useContext as useContext4 } from "react";
4078
4264
  import { useStore as useStore2 } from "zustand";
4079
- import { useShallow } from "zustand/react/shallow";
4265
+ import { useShallow as useShallow2 } from "zustand/react/shallow";
4080
4266
  function useContextStore(context, selector) {
4081
4267
  const store = useContext4(context);
4082
4268
  if (!store) {
4083
4269
  throw new Error("useContextStore must be used inside context");
4084
4270
  }
4085
- return useStore2(store, useShallow(selector));
4271
+ return useStore2(store, useShallow2(selector));
4086
4272
  }
4087
4273
 
4088
4274
  // lib/dnd/use-on-drag-finished.ts
4089
4275
  init_react_import();
4090
- import { useCallback as useCallback6 } from "react";
4276
+ import { useCallback as useCallback7 } from "react";
4091
4277
  var useOnDragFinished = (cb, deps = []) => {
4092
4278
  const appStore = useAppStoreApi();
4093
- return useCallback6(() => {
4279
+ return useCallback7(() => {
4094
4280
  let dispose = () => {
4095
4281
  };
4096
4282
  const processDragging = (isDragging2) => {
@@ -4118,7 +4304,7 @@ var useOnDragFinished = (cb, deps = []) => {
4118
4304
  };
4119
4305
 
4120
4306
  // components/DraggableComponent/index.tsx
4121
- import { Fragment as Fragment6, jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
4307
+ import { Fragment as Fragment7, jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
4122
4308
  var getClassName16 = get_class_name_factory_default("DraggableComponent", styles_module_default10);
4123
4309
  var DEBUG2 = false;
4124
4310
  var space = 8;
@@ -4132,13 +4318,13 @@ var DefaultActionBar = ({
4132
4318
  }) => /* @__PURE__ */ jsxs9(ActionBar, { children: [
4133
4319
  /* @__PURE__ */ jsxs9(ActionBar.Group, { children: [
4134
4320
  parentAction,
4135
- label && /* @__PURE__ */ jsx20(ActionBar.Label, { label })
4321
+ label && /* @__PURE__ */ jsx21(ActionBar.Label, { label })
4136
4322
  ] }),
4137
- /* @__PURE__ */ jsx20(ActionBar.Group, { children })
4323
+ /* @__PURE__ */ jsx21(ActionBar.Group, { children })
4138
4324
  ] });
4139
4325
  var DefaultOverlay = ({
4140
4326
  children
4141
- }) => /* @__PURE__ */ jsx20(Fragment6, { children });
4327
+ }) => /* @__PURE__ */ jsx21(Fragment7, { children });
4142
4328
  var DraggableComponent = ({
4143
4329
  children,
4144
4330
  depth,
@@ -4165,7 +4351,7 @@ var DraggableComponent = ({
4165
4351
  const iframe = useAppStore((s) => s.iframe);
4166
4352
  const ctx = useContext5(dropZoneContext);
4167
4353
  const [localZones, setLocalZones] = useState10({});
4168
- const registerLocalZone = useCallback7(
4354
+ const registerLocalZone = useCallback8(
4169
4355
  (zoneCompound2, active) => {
4170
4356
  var _a;
4171
4357
  (_a = ctx == null ? void 0 : ctx.registerLocalZone) == null ? void 0 : _a.call(ctx, zoneCompound2, active);
@@ -4175,7 +4361,7 @@ var DraggableComponent = ({
4175
4361
  },
4176
4362
  [setLocalZones]
4177
4363
  );
4178
- const unregisterLocalZone = useCallback7(
4364
+ const unregisterLocalZone = useCallback8(
4179
4365
  (zoneCompound2) => {
4180
4366
  var _a;
4181
4367
  (_a = ctx == null ? void 0 : ctx.unregisterLocalZone) == null ? void 0 : _a.call(ctx, zoneCompound2);
@@ -4188,12 +4374,12 @@ var DraggableComponent = ({
4188
4374
  [setLocalZones]
4189
4375
  );
4190
4376
  const containsActiveZone = Object.values(localZones).filter(Boolean).length > 0;
4191
- const path = useAppStore(useShallow2((s) => {
4377
+ const path = useAppStore(useShallow3((s) => {
4192
4378
  var _a;
4193
4379
  return (_a = s.state.indexes.nodes[id]) == null ? void 0 : _a.path;
4194
4380
  }));
4195
4381
  const permissions = useAppStore(
4196
- useShallow2((s) => {
4382
+ useShallow3((s) => {
4197
4383
  const item = getItem({ index, zone: zoneCompound }, s.state);
4198
4384
  return s.permissions.getPermissions({ item });
4199
4385
  })
@@ -4251,7 +4437,7 @@ var DraggableComponent = ({
4251
4437
  }, [permissions.drag, zoneCompound]);
4252
4438
  const [, setRerender] = useState10(0);
4253
4439
  const ref = useRef2(null);
4254
- const refSetter = useCallback7(
4440
+ const refSetter = useCallback8(
4255
4441
  (el) => {
4256
4442
  sortableRef(el);
4257
4443
  if (ref.current !== el) {
@@ -4268,7 +4454,7 @@ var DraggableComponent = ({
4268
4454
  iframe.enabled ? (_a = ref.current) == null ? void 0 : _a.ownerDocument.body : (_c = (_b = ref.current) == null ? void 0 : _b.closest("[data-puck-preview]")) != null ? _c : document.body
4269
4455
  );
4270
4456
  }, [iframe.enabled, ref.current]);
4271
- const getStyle = useCallback7(() => {
4457
+ const getStyle = useCallback8(() => {
4272
4458
  var _a, _b, _c;
4273
4459
  if (!ref.current) return;
4274
4460
  const rect = ref.current.getBoundingClientRect();
@@ -4294,7 +4480,7 @@ var DraggableComponent = ({
4294
4480
  return style2;
4295
4481
  }, [ref.current]);
4296
4482
  const [style, setStyle] = useState10();
4297
- const sync = useCallback7(() => {
4483
+ const sync = useCallback8(() => {
4298
4484
  setStyle(getStyle());
4299
4485
  }, [ref.current, iframe]);
4300
4486
  useEffect12(() => {
@@ -4307,10 +4493,10 @@ var DraggableComponent = ({
4307
4493
  }
4308
4494
  }, [ref.current]);
4309
4495
  const registerNode = useAppStore((s) => s.nodes.registerNode);
4310
- const hideOverlay = useCallback7(() => {
4496
+ const hideOverlay = useCallback8(() => {
4311
4497
  setIsVisible(false);
4312
4498
  }, []);
4313
- const showOverlay = useCallback7(() => {
4499
+ const showOverlay = useCallback8(() => {
4314
4500
  setIsVisible(true);
4315
4501
  }, []);
4316
4502
  useEffect12(() => {
@@ -4338,7 +4524,7 @@ var DraggableComponent = ({
4338
4524
  () => overrides.componentOverlay || DefaultOverlay,
4339
4525
  [overrides.componentOverlay]
4340
4526
  );
4341
- const onClick = useCallback7(
4527
+ const onClick = useCallback8(
4342
4528
  (e) => {
4343
4529
  const el = e.target;
4344
4530
  if (!el.closest("[data-puck-overlay-portal]")) {
@@ -4363,7 +4549,7 @@ var DraggableComponent = ({
4363
4549
  [index, zoneCompound, id, isSelected]
4364
4550
  );
4365
4551
  const appStore = useAppStoreApi();
4366
- const onSelectParent = useCallback7(() => {
4552
+ const onSelectParent = useCallback8(() => {
4367
4553
  const { nodes, zones } = appStore.getState().state.indexes;
4368
4554
  const node = nodes[id];
4369
4555
  const parentNode = (node == null ? void 0 : node.parentId) ? nodes[node == null ? void 0 : node.parentId] : null;
@@ -4384,14 +4570,14 @@ var DraggableComponent = ({
4384
4570
  }
4385
4571
  });
4386
4572
  }, [ctx, path]);
4387
- const onDuplicate = useCallback7(() => {
4573
+ const onDuplicate = useCallback8(() => {
4388
4574
  dispatch({
4389
4575
  type: "duplicate",
4390
4576
  sourceIndex: index,
4391
4577
  sourceZone: zoneCompound
4392
4578
  });
4393
4579
  }, [index, zoneCompound]);
4394
- const onDelete = useCallback7(() => {
4580
+ const onDelete = useCallback8(() => {
4395
4581
  dispatch({
4396
4582
  type: "remove",
4397
4583
  index,
@@ -4481,7 +4667,7 @@ var DraggableComponent = ({
4481
4667
  useEffect12(() => {
4482
4668
  if (thisWasDragging) return onDragFinished();
4483
4669
  }, [thisWasDragging, onDragFinished]);
4484
- const syncActionsPosition = useCallback7(
4670
+ const syncActionsPosition = useCallback8(
4485
4671
  (el) => {
4486
4672
  if (el) {
4487
4673
  const view = el.ownerDocument.defaultView;
@@ -4521,7 +4707,7 @@ var DraggableComponent = ({
4521
4707
  setDragAxis(autoDragAxis);
4522
4708
  }, [ref, userDragAxis, autoDragAxis]);
4523
4709
  const parentAction = useMemo5(
4524
- () => (ctx == null ? void 0 : ctx.areaId) && (ctx == null ? void 0 : ctx.areaId) !== "root" && /* @__PURE__ */ jsx20(ActionBar.Action, { onClick: onSelectParent, label: "Select parent", children: /* @__PURE__ */ jsx20(CornerLeftUp, { size: 16 }) }),
4710
+ () => (ctx == null ? void 0 : ctx.areaId) && (ctx == null ? void 0 : ctx.areaId) !== "root" && /* @__PURE__ */ jsx21(ActionBar.Action, { onClick: onSelectParent, label: "Select parent", children: /* @__PURE__ */ jsx21(CornerLeftUp, { size: 16 }) }),
4525
4711
  [ctx == null ? void 0 : ctx.areaId]
4526
4712
  );
4527
4713
  const nextContextValue = useMemo5(
@@ -4557,15 +4743,15 @@ var DraggableComponent = ({
4557
4743
  "data-puck-overlay": true,
4558
4744
  children: [
4559
4745
  debug,
4560
- isLoading && /* @__PURE__ */ jsx20("div", { className: getClassName16("loadingOverlay"), children: /* @__PURE__ */ jsx20(Loader, {}) }),
4561
- /* @__PURE__ */ jsx20(
4746
+ isLoading && /* @__PURE__ */ jsx21("div", { className: getClassName16("loadingOverlay"), children: /* @__PURE__ */ jsx21(Loader, {}) }),
4747
+ /* @__PURE__ */ jsx21(
4562
4748
  "div",
4563
4749
  {
4564
4750
  className: getClassName16("actionsOverlay"),
4565
4751
  style: {
4566
4752
  top: actionsOverlayTop / zoom
4567
4753
  },
4568
- children: /* @__PURE__ */ jsx20(
4754
+ children: /* @__PURE__ */ jsx21(
4569
4755
  "div",
4570
4756
  {
4571
4757
  className: getClassName16("actions"),
@@ -4583,8 +4769,8 @@ var DraggableComponent = ({
4583
4769
  parentAction,
4584
4770
  label: DEBUG2 ? id : label,
4585
4771
  children: [
4586
- permissions.duplicate && /* @__PURE__ */ jsx20(ActionBar.Action, { onClick: onDuplicate, label: "Duplicate", children: /* @__PURE__ */ jsx20(Copy, { size: 16 }) }),
4587
- permissions.delete && /* @__PURE__ */ jsx20(ActionBar.Action, { onClick: onDelete, label: "Delete", children: /* @__PURE__ */ jsx20(Trash, { size: 16 }) })
4772
+ permissions.duplicate && /* @__PURE__ */ jsx21(ActionBar.Action, { onClick: onDuplicate, label: "Duplicate", children: /* @__PURE__ */ jsx21(Copy, { size: 16 }) }),
4773
+ permissions.delete && /* @__PURE__ */ jsx21(ActionBar.Action, { onClick: onDelete, label: "Delete", children: /* @__PURE__ */ jsx21(Trash, { size: 16 }) })
4588
4774
  ]
4589
4775
  }
4590
4776
  )
@@ -4592,14 +4778,14 @@ var DraggableComponent = ({
4592
4778
  )
4593
4779
  }
4594
4780
  ),
4595
- /* @__PURE__ */ jsx20("div", { className: getClassName16("overlayWrapper"), children: /* @__PURE__ */ jsx20(
4781
+ /* @__PURE__ */ jsx21("div", { className: getClassName16("overlayWrapper"), children: /* @__PURE__ */ jsx21(
4596
4782
  CustomOverlay,
4597
4783
  {
4598
4784
  componentId: id,
4599
4785
  componentType,
4600
4786
  hover,
4601
4787
  isSelected,
4602
- children: /* @__PURE__ */ jsx20("div", { className: getClassName16("overlay") })
4788
+ children: /* @__PURE__ */ jsx21("div", { className: getClassName16("overlay") })
4603
4789
  }
4604
4790
  ) })
4605
4791
  ]
@@ -4633,7 +4819,7 @@ init_react_import();
4633
4819
  import { DragDropProvider as DragDropProvider2 } from "@dnd-kit/react";
4634
4820
  import {
4635
4821
  createContext as createContext4,
4636
- useCallback as useCallback8,
4822
+ useCallback as useCallback9,
4637
4823
  useContext as useContext6,
4638
4824
  useEffect as useEffect13,
4639
4825
  useMemo as useMemo6,
@@ -4920,7 +5106,7 @@ var createNestedDroppablePlugin = ({ onChange }, id) => class NestedDroppablePlu
4920
5106
 
4921
5107
  // lib/insert-component.ts
4922
5108
  init_react_import();
4923
- var insertComponent = (componentType, zone, index, appStore) => __async(void 0, null, function* () {
5109
+ var insertComponent = (componentType, zone, index, appStore) => __async(null, null, function* () {
4924
5110
  const id = generateId(componentType);
4925
5111
  const insertActionData = {
4926
5112
  type: "insert",
@@ -4974,7 +5160,7 @@ function getDeepDir(el) {
4974
5160
 
4975
5161
  // components/DragDropContext/index.tsx
4976
5162
  import { effect } from "@dnd-kit/state";
4977
- import { jsx as jsx21 } from "react/jsx-runtime";
5163
+ import { jsx as jsx22 } from "react/jsx-runtime";
4978
5164
  var DEBUG3 = false;
4979
5165
  var dragListenerContext = createContext4({
4980
5166
  dragListeners: {}
@@ -4992,7 +5178,7 @@ function useDragListener(type, fn, deps = []) {
4992
5178
  var AREA_CHANGE_DEBOUNCE_MS = 100;
4993
5179
  var useTempDisableFallback = (timeout3) => {
4994
5180
  const lastFallbackDisable = useRef3(null);
4995
- return useCallback8((manager) => {
5181
+ return useCallback9((manager) => {
4996
5182
  collisionStore.setState({ fallbackEnabled: false });
4997
5183
  const fallbackId = generateId();
4998
5184
  lastFallbackDisable.current = fallbackId;
@@ -5025,7 +5211,7 @@ var DragDropContextClient = ({
5025
5211
  hoveringComponent: null
5026
5212
  }))
5027
5213
  );
5028
- const getChanged2 = useCallback8(
5214
+ const getChanged2 = useCallback9(
5029
5215
  (params) => {
5030
5216
  const { zoneDepthIndex = {}, areaDepthIndex = {} } = zoneStore.getState() || {};
5031
5217
  const stateHasZone = Object.keys(zoneDepthIndex).length > 0;
@@ -5046,7 +5232,7 @@ var DragDropContextClient = ({
5046
5232
  },
5047
5233
  [zoneStore]
5048
5234
  );
5049
- const setDeepestAndCollide = useCallback8(
5235
+ const setDeepestAndCollide = useCallback9(
5050
5236
  (params, manager) => {
5051
5237
  const { zoneChanged, areaChanged } = getChanged2(params);
5052
5238
  if (!zoneChanged && !areaChanged) return;
@@ -5143,14 +5329,14 @@ var DragDropContextClient = ({
5143
5329
  }),
5144
5330
  []
5145
5331
  );
5146
- return /* @__PURE__ */ jsx21(
5332
+ return /* @__PURE__ */ jsx22(
5147
5333
  dragListenerContext.Provider,
5148
5334
  {
5149
5335
  value: {
5150
5336
  dragListeners,
5151
5337
  setDragListeners
5152
5338
  },
5153
- children: /* @__PURE__ */ jsx21(
5339
+ children: /* @__PURE__ */ jsx22(
5154
5340
  DragDropProvider2,
5155
5341
  {
5156
5342
  plugins,
@@ -5366,7 +5552,7 @@ var DragDropContextClient = ({
5366
5552
  const entryEl = (_d = getFrame()) == null ? void 0 : _d.querySelector("[data-puck-entry]");
5367
5553
  entryEl == null ? void 0 : entryEl.setAttribute("data-puck-dragging", "true");
5368
5554
  },
5369
- children: /* @__PURE__ */ jsx21(ZoneStoreProvider, { store: zoneStore, children: /* @__PURE__ */ jsx21(DropZoneProvider, { value: nextContextValue, children }) })
5555
+ children: /* @__PURE__ */ jsx22(ZoneStoreProvider, { store: zoneStore, children: /* @__PURE__ */ jsx22(DropZoneProvider, { value: nextContextValue, children }) })
5370
5556
  }
5371
5557
  )
5372
5558
  }
@@ -5380,12 +5566,12 @@ var DragDropContext = ({
5380
5566
  if (status === "LOADING") {
5381
5567
  return children;
5382
5568
  }
5383
- return /* @__PURE__ */ jsx21(DragDropContextClient, { disableAutoScroll, children });
5569
+ return /* @__PURE__ */ jsx22(DragDropContextClient, { disableAutoScroll, children });
5384
5570
  };
5385
5571
 
5386
5572
  // components/Drawer/index.tsx
5387
5573
  import { useDraggable, useDroppable } from "@dnd-kit/react";
5388
- import { jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
5574
+ import { jsx as jsx23, jsxs as jsxs10 } from "react/jsx-runtime";
5389
5575
  var getClassName17 = get_class_name_factory_default("Drawer", styles_module_default12);
5390
5576
  var getClassNameItem2 = get_class_name_factory_default("DrawerItem", styles_module_default12);
5391
5577
  var DrawerItemInner = ({
@@ -5396,10 +5582,10 @@ var DrawerItemInner = ({
5396
5582
  isDragDisabled
5397
5583
  }) => {
5398
5584
  const CustomInner = useMemo7(
5399
- () => children || (({ children: children2 }) => /* @__PURE__ */ jsx22("div", { className: getClassNameItem2("default"), children: children2 })),
5585
+ () => children || (({ children: children2 }) => /* @__PURE__ */ jsx23("div", { className: getClassNameItem2("default"), children: children2 })),
5400
5586
  [children]
5401
5587
  );
5402
- return /* @__PURE__ */ jsx22(
5588
+ return /* @__PURE__ */ jsx23(
5403
5589
  "div",
5404
5590
  {
5405
5591
  className: getClassNameItem2({ disabled: isDragDisabled }),
@@ -5407,9 +5593,9 @@ var DrawerItemInner = ({
5407
5593
  onMouseDown: (e) => e.preventDefault(),
5408
5594
  "data-testid": dragRef ? `drawer-item:${name}` : "",
5409
5595
  "data-puck-drawer-item": true,
5410
- children: /* @__PURE__ */ jsx22(CustomInner, { name, children: /* @__PURE__ */ jsx22("div", { className: getClassNameItem2("draggableWrapper"), children: /* @__PURE__ */ jsxs10("div", { className: getClassNameItem2("draggable"), children: [
5411
- /* @__PURE__ */ jsx22("div", { className: getClassNameItem2("name"), children: label != null ? label : name }),
5412
- /* @__PURE__ */ jsx22("div", { className: getClassNameItem2("icon"), children: /* @__PURE__ */ jsx22(DragIcon, {}) })
5596
+ children: /* @__PURE__ */ jsx23(CustomInner, { name, children: /* @__PURE__ */ jsx23("div", { className: getClassNameItem2("draggableWrapper"), children: /* @__PURE__ */ jsxs10("div", { className: getClassNameItem2("draggable"), children: [
5597
+ /* @__PURE__ */ jsx23("div", { className: getClassNameItem2("name"), children: label != null ? label : name }),
5598
+ /* @__PURE__ */ jsx23("div", { className: getClassNameItem2("icon"), children: /* @__PURE__ */ jsx23(DragIcon, {}) })
5413
5599
  ] }) }) })
5414
5600
  }
5415
5601
  );
@@ -5428,8 +5614,8 @@ var DrawerItemDraggable = ({
5428
5614
  type: "drawer"
5429
5615
  });
5430
5616
  return /* @__PURE__ */ jsxs10("div", { className: getClassName17("draggable"), children: [
5431
- /* @__PURE__ */ jsx22("div", { className: getClassName17("draggableBg"), children: /* @__PURE__ */ jsx22(DrawerItemInner, { name, label, children }) }),
5432
- /* @__PURE__ */ jsx22("div", { className: getClassName17("draggableFg"), children: /* @__PURE__ */ jsx22(
5617
+ /* @__PURE__ */ jsx23("div", { className: getClassName17("draggableBg"), children: /* @__PURE__ */ jsx23(DrawerItemInner, { name, label, children }) }),
5618
+ /* @__PURE__ */ jsx23("div", { className: getClassName17("draggableFg"), children: /* @__PURE__ */ jsx23(
5433
5619
  DrawerItemInner,
5434
5620
  {
5435
5621
  name,
@@ -5463,7 +5649,7 @@ var DrawerItem = ({
5463
5649
  },
5464
5650
  [resolvedId]
5465
5651
  );
5466
- return /* @__PURE__ */ jsx22("div", { children: /* @__PURE__ */ jsx22(
5652
+ return /* @__PURE__ */ jsx23("div", { children: /* @__PURE__ */ jsx23(
5467
5653
  DrawerItemDraggable,
5468
5654
  {
5469
5655
  name,
@@ -5496,7 +5682,7 @@ var Drawer = ({
5496
5682
  collisionPriority: 0
5497
5683
  // Never collide with this, but we use it so NestedDroppablePlugin respects the Drawer
5498
5684
  });
5499
- return /* @__PURE__ */ jsx22(
5685
+ return /* @__PURE__ */ jsx23(
5500
5686
  "div",
5501
5687
  {
5502
5688
  className: getClassName17(),
@@ -5600,11 +5786,11 @@ import { useContext as useContext7, useEffect as useEffect15, useState as useSta
5600
5786
  // lib/dnd/use-rendered-callback.ts
5601
5787
  init_react_import();
5602
5788
  import { useDragDropManager } from "@dnd-kit/react";
5603
- import { useCallback as useCallback9 } from "react";
5789
+ import { useCallback as useCallback10 } from "react";
5604
5790
  function useRenderedCallback(callback, deps) {
5605
5791
  const manager = useDragDropManager();
5606
- return useCallback9(
5607
- (...args) => __async(this, null, function* () {
5792
+ return useCallback10(
5793
+ (...args) => __async(null, null, function* () {
5608
5794
  yield manager == null ? void 0 : manager.renderer.rendering;
5609
5795
  return callback(...args);
5610
5796
  }),
@@ -5674,7 +5860,7 @@ var useContentIdsWithPreview = (contentIds, zoneCompound) => {
5674
5860
 
5675
5861
  // components/DropZone/lib/use-drag-axis.ts
5676
5862
  init_react_import();
5677
- import { useCallback as useCallback10, useEffect as useEffect16, useState as useState15 } from "react";
5863
+ import { useCallback as useCallback11, useEffect as useEffect16, useState as useState15 } from "react";
5678
5864
  var GRID_DRAG_AXIS = "dynamic";
5679
5865
  var FLEX_ROW_DRAG_AXIS = "x";
5680
5866
  var DEFAULT_DRAG_AXIS = "y";
@@ -5683,7 +5869,7 @@ var useDragAxis = (ref, collisionAxis) => {
5683
5869
  const [dragAxis, setDragAxis] = useState15(
5684
5870
  collisionAxis || DEFAULT_DRAG_AXIS
5685
5871
  );
5686
- const calculateDragAxis = useCallback10(() => {
5872
+ const calculateDragAxis = useCallback11(() => {
5687
5873
  if (ref.current) {
5688
5874
  const computedStyle = window.getComputedStyle(ref.current);
5689
5875
  if (computedStyle.display === "grid") {
@@ -5709,12 +5895,12 @@ var useDragAxis = (ref, collisionAxis) => {
5709
5895
  };
5710
5896
 
5711
5897
  // components/DropZone/index.tsx
5712
- import { useShallow as useShallow4 } from "zustand/react/shallow";
5898
+ import { useShallow as useShallow5 } from "zustand/react/shallow";
5713
5899
 
5714
5900
  // components/SlotRender/index.tsx
5715
5901
  init_react_import();
5716
- import { useShallow as useShallow3 } from "zustand/react/shallow";
5717
- import { jsx as jsx23 } from "react/jsx-runtime";
5902
+ import { useShallow as useShallow4 } from "zustand/react/shallow";
5903
+ import { jsx as jsx24 } from "react/jsx-runtime";
5718
5904
  var ContextSlotRender = ({
5719
5905
  componentId,
5720
5906
  zone
@@ -5722,14 +5908,14 @@ var ContextSlotRender = ({
5722
5908
  const config = useAppStore((s) => s.config);
5723
5909
  const metadata = useAppStore((s) => s.metadata);
5724
5910
  const slotContent = useAppStore(
5725
- useShallow3((s) => {
5911
+ useShallow4((s) => {
5726
5912
  var _a, _b;
5727
5913
  const indexes = s.state.indexes;
5728
5914
  const contentIds = (_b = (_a = indexes.zones[`${componentId}:${zone}`]) == null ? void 0 : _a.contentIds) != null ? _b : [];
5729
5915
  return contentIds.map((contentId) => indexes.nodes[contentId].flatData);
5730
5916
  })
5731
5917
  );
5732
- return /* @__PURE__ */ jsx23(
5918
+ return /* @__PURE__ */ jsx24(
5733
5919
  SlotRenderPure,
5734
5920
  {
5735
5921
  content: slotContent,
@@ -5745,7 +5931,7 @@ init_react_import();
5745
5931
 
5746
5932
  // components/InlineTextField/index.tsx
5747
5933
  init_react_import();
5748
- import { memo, useEffect as useEffect17, useRef as useRef5, useState as useState16 } from "react";
5934
+ import { memo as memo3, useEffect as useEffect17, useRef as useRef5, useState as useState16 } from "react";
5749
5935
 
5750
5936
  // lib/overlay-portal/index.tsx
5751
5937
  init_react_import();
@@ -5844,7 +6030,7 @@ var getSelectorForId = (state, id) => {
5844
6030
  };
5845
6031
 
5846
6032
  // components/InlineTextField/index.tsx
5847
- import { jsx as jsx24 } from "react/jsx-runtime";
6033
+ import { jsx as jsx25 } from "react/jsx-runtime";
5848
6034
  var getClassName18 = get_class_name_factory_default("InlineTextField", styles_module_default13);
5849
6035
  var InlineTextFieldInternal = ({
5850
6036
  propPath,
@@ -5871,7 +6057,7 @@ var InlineTextFieldInternal = ({
5871
6057
  ref.current.replaceChildren(value);
5872
6058
  }
5873
6059
  const cleanupPortal = registerOverlayPortal(ref.current);
5874
- const handleInput = (e) => __async(void 0, null, function* () {
6060
+ const handleInput = (e) => __async(null, null, function* () {
5875
6061
  var _a2;
5876
6062
  const appStore2 = appStoreApi.getState();
5877
6063
  const node = appStore2.state.indexes.nodes[componentId];
@@ -5905,7 +6091,7 @@ var InlineTextFieldInternal = ({
5905
6091
  }, [appStoreApi, ref.current, value, disableLineBreaks]);
5906
6092
  const [isHovering, setIsHovering] = useState16(false);
5907
6093
  const [isFocused, setIsFocused] = useState16(false);
5908
- return /* @__PURE__ */ jsx24(
6094
+ return /* @__PURE__ */ jsx25(
5909
6095
  "span",
5910
6096
  {
5911
6097
  className: getClassName18(),
@@ -5941,14 +6127,14 @@ var InlineTextFieldInternal = ({
5941
6127
  }
5942
6128
  );
5943
6129
  };
5944
- var InlineTextField = memo(InlineTextFieldInternal);
6130
+ var InlineTextField = memo3(InlineTextFieldInternal);
5945
6131
 
5946
6132
  // lib/field-transforms/default-transforms/inline-text-transform.tsx
5947
- import { jsx as jsx25 } from "react/jsx-runtime";
6133
+ import { jsx as jsx26 } from "react/jsx-runtime";
5948
6134
  var getInlineTextTransform = () => ({
5949
6135
  text: ({ value, componentId, field, propPath, isReadOnly }) => {
5950
6136
  if (field.contentEditable) {
5951
- return /* @__PURE__ */ jsx25(
6137
+ return /* @__PURE__ */ jsx26(
5952
6138
  InlineTextField,
5953
6139
  {
5954
6140
  propPath,
@@ -5963,7 +6149,7 @@ var getInlineTextTransform = () => ({
5963
6149
  },
5964
6150
  textarea: ({ value, componentId, field, propPath, isReadOnly }) => {
5965
6151
  if (field.contentEditable) {
5966
- return /* @__PURE__ */ jsx25(
6152
+ return /* @__PURE__ */ jsx26(
5967
6153
  InlineTextField,
5968
6154
  {
5969
6155
  propPath,
@@ -5977,7 +6163,7 @@ var getInlineTextTransform = () => ({
5977
6163
  },
5978
6164
  custom: ({ value, componentId, field, propPath, isReadOnly }) => {
5979
6165
  if (field.contentEditable && typeof value === "string") {
5980
- return /* @__PURE__ */ jsx25(
6166
+ return /* @__PURE__ */ jsx26(
5981
6167
  InlineTextField,
5982
6168
  {
5983
6169
  propPath,
@@ -5992,11 +6178,11 @@ var getInlineTextTransform = () => ({
5992
6178
  });
5993
6179
 
5994
6180
  // components/DropZone/index.tsx
5995
- import { Fragment as Fragment7, jsx as jsx26, jsxs as jsxs11 } from "react/jsx-runtime";
6181
+ import { Fragment as Fragment8, jsx as jsx27, jsxs as jsxs11 } from "react/jsx-runtime";
5996
6182
  var getClassName19 = get_class_name_factory_default("DropZone", styles_module_default11);
5997
6183
  var getRandomColor = () => `#${Math.floor(Math.random() * 16777215).toString(16)}`;
5998
6184
  var RENDER_DEBUG = false;
5999
- var DropZoneEditPure = (props) => /* @__PURE__ */ jsx26(DropZoneEdit, __spreadValues({}, props));
6185
+ var DropZoneEditPure = (props) => /* @__PURE__ */ jsx27(DropZoneEdit, __spreadValues({}, props));
6000
6186
  var DropZoneChild = ({
6001
6187
  zoneCompound,
6002
6188
  componentId,
@@ -6011,7 +6197,7 @@ var DropZoneChild = ({
6011
6197
  const { depth = 1 } = ctx != null ? ctx : {};
6012
6198
  const zoneStore = useContext8(ZoneStoreContext);
6013
6199
  const nodeProps = useAppStore(
6014
- useShallow4((s) => {
6200
+ useShallow5((s) => {
6015
6201
  var _a2;
6016
6202
  return (_a2 = s.state.indexes.nodes[componentId]) == null ? void 0 : _a2.flatData.props;
6017
6203
  })
@@ -6023,7 +6209,7 @@ var DropZoneChild = ({
6023
6209
  }
6024
6210
  );
6025
6211
  const nodeReadOnly = useAppStore(
6026
- useShallow4((s) => {
6212
+ useShallow5((s) => {
6027
6213
  var _a2;
6028
6214
  return (_a2 = s.state.indexes.nodes[componentId]) == null ? void 0 : _a2.data.readOnly;
6029
6215
  })
@@ -6080,10 +6266,10 @@ var DropZoneChild = ({
6080
6266
  if (item && "element" in item && item.element) {
6081
6267
  return (
6082
6268
  // Safe to use this since the HTML is set by the user
6083
- /* @__PURE__ */ jsx26("div", { dangerouslySetInnerHTML: { __html: item.element.outerHTML } })
6269
+ /* @__PURE__ */ jsx27("div", { dangerouslySetInnerHTML: { __html: item.element.outerHTML } })
6084
6270
  );
6085
6271
  }
6086
- return /* @__PURE__ */ jsx26(DrawerItemInner, { name: label, children: (_a2 = overrides.componentItem) != null ? _a2 : overrides.drawerItem });
6272
+ return /* @__PURE__ */ jsx27(DrawerItemInner, { name: label, children: (_a2 = overrides.componentItem) != null ? _a2 : overrides.drawerItem });
6087
6273
  },
6088
6274
  [componentId, label, overrides]
6089
6275
  );
@@ -6106,7 +6292,7 @@ var DropZoneChild = ({
6106
6292
  const plugins = useAppStore((s) => s.plugins);
6107
6293
  const userFieldTransforms = useAppStore((s) => s.fieldTransforms);
6108
6294
  const combinedFieldTransforms = useMemo8(
6109
- () => __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, getSlotTransform(DropZoneEditPure, (slotProps) => /* @__PURE__ */ jsx26(ContextSlotRender, { componentId, zone: slotProps.zone }))), getInlineTextTransform()), plugins.reduce(
6295
+ () => __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, getSlotTransform(DropZoneEditPure, (slotProps) => /* @__PURE__ */ jsx27(ContextSlotRender, { componentId, zone: slotProps.zone }))), getInlineTextTransform()), plugins.reduce(
6110
6296
  (acc, plugin) => __spreadValues(__spreadValues({}, acc), plugin.fieldTransforms),
6111
6297
  {}
6112
6298
  )), userFieldTransforms),
@@ -6129,7 +6315,7 @@ var DropZoneChild = ({
6129
6315
  if (isInserting) {
6130
6316
  Render2 = renderPreview;
6131
6317
  }
6132
- return /* @__PURE__ */ jsx26(
6318
+ return /* @__PURE__ */ jsx27(
6133
6319
  DraggableComponent,
6134
6320
  {
6135
6321
  id: componentId,
@@ -6143,18 +6329,18 @@ var DropZoneChild = ({
6143
6329
  autoDragAxis: dragAxis,
6144
6330
  userDragAxis: collisionAxis,
6145
6331
  inDroppableZone,
6146
- children: (dragRef) => (componentConfig == null ? void 0 : componentConfig.inline) && !isInserting ? /* @__PURE__ */ jsx26(Fragment7, { children: /* @__PURE__ */ jsx26(
6332
+ children: (dragRef) => (componentConfig == null ? void 0 : componentConfig.inline) && !isInserting ? /* @__PURE__ */ jsx27(Fragment8, { children: /* @__PURE__ */ jsx27(
6147
6333
  Render2,
6148
6334
  __spreadProps(__spreadValues({}, transformedProps), {
6149
6335
  puck: __spreadProps(__spreadValues({}, transformedProps.puck), {
6150
6336
  dragRef
6151
6337
  })
6152
6338
  })
6153
- ) }) : /* @__PURE__ */ jsx26("div", { ref: dragRef, children: /* @__PURE__ */ jsx26(Render2, __spreadValues({}, transformedProps)) })
6339
+ ) }) : /* @__PURE__ */ jsx27("div", { ref: dragRef, children: /* @__PURE__ */ jsx27(Render2, __spreadValues({}, transformedProps)) })
6154
6340
  }
6155
6341
  );
6156
6342
  };
6157
- var DropZoneChildMemo = memo2(DropZoneChild);
6343
+ var DropZoneChildMemo = memo4(DropZoneChild);
6158
6344
  var DropZoneEdit = forwardRef3(
6159
6345
  function DropZoneEditInternal({
6160
6346
  zone,
@@ -6175,7 +6361,7 @@ var DropZoneEdit = forwardRef3(
6175
6361
  unregisterLocalZone
6176
6362
  } = ctx != null ? ctx : {};
6177
6363
  const path = useAppStore(
6178
- useShallow4((s) => {
6364
+ useShallow5((s) => {
6179
6365
  var _a;
6180
6366
  return areaId ? (_a = s.state.indexes.nodes[areaId]) == null ? void 0 : _a.path : null;
6181
6367
  })
@@ -6192,13 +6378,13 @@ var DropZoneEdit = forwardRef3(
6192
6378
  (s) => s.nextAreaDepthIndex[areaId || ""]
6193
6379
  );
6194
6380
  const zoneContentIds = useAppStore(
6195
- useShallow4((s) => {
6381
+ useShallow5((s) => {
6196
6382
  var _a;
6197
6383
  return (_a = s.state.indexes.zones[zoneCompound]) == null ? void 0 : _a.contentIds;
6198
6384
  })
6199
6385
  );
6200
6386
  const zoneType = useAppStore(
6201
- useShallow4((s) => {
6387
+ useShallow5((s) => {
6202
6388
  var _a;
6203
6389
  return (_a = s.state.indexes.zones[zoneCompound]) == null ? void 0 : _a.type;
6204
6390
  })
@@ -6223,7 +6409,7 @@ var DropZoneEdit = forwardRef3(
6223
6409
  return zoneContentIds || [];
6224
6410
  }, [zoneContentIds]);
6225
6411
  const ref = useRef6(null);
6226
- const acceptsTarget = useCallback11(
6412
+ const acceptsTarget = useCallback12(
6227
6413
  (componentType) => {
6228
6414
  if (!componentType) {
6229
6415
  return true;
@@ -6306,7 +6492,7 @@ var DropZoneEdit = forwardRef3(
6306
6492
  userMinEmptyHeight,
6307
6493
  ref
6308
6494
  });
6309
- return /* @__PURE__ */ jsx26(
6495
+ return /* @__PURE__ */ jsx27(
6310
6496
  "div",
6311
6497
  {
6312
6498
  className: `${getClassName19({
@@ -6327,7 +6513,7 @@ var DropZoneEdit = forwardRef3(
6327
6513
  backgroundColor: RENDER_DEBUG ? getRandomColor() : style == null ? void 0 : style.backgroundColor
6328
6514
  }),
6329
6515
  children: contentIdsWithPreview.map((componentId, i) => {
6330
- return /* @__PURE__ */ jsx26(
6516
+ return /* @__PURE__ */ jsx27(
6331
6517
  DropZoneChildMemo,
6332
6518
  {
6333
6519
  zoneCompound,
@@ -6350,7 +6536,7 @@ var DropZoneRenderItem = ({
6350
6536
  metadata
6351
6537
  }) => {
6352
6538
  const Component = config.components[item.type];
6353
- const props = useSlots(config, item, (slotProps) => /* @__PURE__ */ jsx26(SlotRenderPure, __spreadProps(__spreadValues({}, slotProps), { config, metadata })));
6539
+ const props = useSlots(config, item, (slotProps) => /* @__PURE__ */ jsx27(SlotRenderPure, __spreadProps(__spreadValues({}, slotProps), { config, metadata })));
6354
6540
  const nextContextValue = useMemo8(
6355
6541
  () => ({
6356
6542
  areaId: props.id,
@@ -6358,7 +6544,7 @@ var DropZoneRenderItem = ({
6358
6544
  }),
6359
6545
  [props]
6360
6546
  );
6361
- return /* @__PURE__ */ jsx26(DropZoneProvider, { value: nextContextValue, children: /* @__PURE__ */ jsx26(
6547
+ return /* @__PURE__ */ jsx27(DropZoneProvider, { value: nextContextValue, children: /* @__PURE__ */ jsx27(
6362
6548
  Component.render,
6363
6549
  __spreadProps(__spreadValues({}, props), {
6364
6550
  puck: __spreadProps(__spreadValues({}, props.puck), {
@@ -6368,7 +6554,7 @@ var DropZoneRenderItem = ({
6368
6554
  })
6369
6555
  ) }, props.id);
6370
6556
  };
6371
- var DropZoneRenderPure = (props) => /* @__PURE__ */ jsx26(DropZoneRender, __spreadValues({}, props));
6557
+ var DropZoneRenderPure = (props) => /* @__PURE__ */ jsx27(DropZoneRender, __spreadValues({}, props));
6372
6558
  var DropZoneRender = forwardRef3(
6373
6559
  function DropZoneRenderInternal({ className, style, zone }, ref) {
6374
6560
  const ctx = useContext8(dropZoneContext);
@@ -6389,10 +6575,10 @@ var DropZoneRender = forwardRef3(
6389
6575
  if (zoneCompound !== rootDroppableId) {
6390
6576
  content = setupZone(data, zoneCompound).zones[zoneCompound];
6391
6577
  }
6392
- return /* @__PURE__ */ jsx26("div", { className, style, ref, children: content.map((item) => {
6578
+ return /* @__PURE__ */ jsx27("div", { className, style, ref, children: content.map((item) => {
6393
6579
  const Component = config.components[item.type];
6394
6580
  if (Component) {
6395
- return /* @__PURE__ */ jsx26(
6581
+ return /* @__PURE__ */ jsx27(
6396
6582
  DropZoneRenderItem,
6397
6583
  {
6398
6584
  config,
@@ -6406,20 +6592,20 @@ var DropZoneRender = forwardRef3(
6406
6592
  }) });
6407
6593
  }
6408
6594
  );
6409
- var DropZonePure = (props) => /* @__PURE__ */ jsx26(DropZone, __spreadValues({}, props));
6595
+ var DropZonePure = (props) => /* @__PURE__ */ jsx27(DropZone, __spreadValues({}, props));
6410
6596
  var DropZone = forwardRef3(
6411
6597
  function DropZone2(props, ref) {
6412
6598
  const ctx = useContext8(dropZoneContext);
6413
6599
  if ((ctx == null ? void 0 : ctx.mode) === "edit") {
6414
- return /* @__PURE__ */ jsx26(Fragment7, { children: /* @__PURE__ */ jsx26(DropZoneEdit, __spreadProps(__spreadValues({}, props), { ref })) });
6600
+ return /* @__PURE__ */ jsx27(Fragment8, { children: /* @__PURE__ */ jsx27(DropZoneEdit, __spreadProps(__spreadValues({}, props), { ref })) });
6415
6601
  }
6416
- return /* @__PURE__ */ jsx26(Fragment7, { children: /* @__PURE__ */ jsx26(DropZoneRender, __spreadProps(__spreadValues({}, props), { ref })) });
6602
+ return /* @__PURE__ */ jsx27(Fragment8, { children: /* @__PURE__ */ jsx27(DropZoneRender, __spreadProps(__spreadValues({}, props), { ref })) });
6417
6603
  }
6418
6604
  );
6419
6605
 
6420
6606
  // components/Render/index.tsx
6421
6607
  import React3, { useMemo as useMemo9 } from "react";
6422
- import { jsx as jsx27 } from "react/jsx-runtime";
6608
+ import { jsx as jsx28 } from "react/jsx-runtime";
6423
6609
  var renderContext = React3.createContext({
6424
6610
  config: { components: {} },
6425
6611
  data: { root: {}, content: [] },
@@ -6451,7 +6637,7 @@ function Render({
6451
6637
  const propsWithSlots = useSlots(
6452
6638
  config,
6453
6639
  { type: "root", props: pageProps },
6454
- (props) => /* @__PURE__ */ jsx27(SlotRender, __spreadProps(__spreadValues({}, props), { config, metadata }))
6640
+ (props) => /* @__PURE__ */ jsx28(SlotRender, __spreadProps(__spreadValues({}, props), { config, metadata }))
6455
6641
  );
6456
6642
  const nextContextValue = useMemo9(
6457
6643
  () => ({
@@ -6461,9 +6647,9 @@ function Render({
6461
6647
  []
6462
6648
  );
6463
6649
  if ((_a = config.root) == null ? void 0 : _a.render) {
6464
- return /* @__PURE__ */ jsx27(renderContext.Provider, { value: { config, data: defaultedData, metadata }, children: /* @__PURE__ */ jsx27(DropZoneProvider, { value: nextContextValue, children: /* @__PURE__ */ jsx27(config.root.render, __spreadProps(__spreadValues({}, propsWithSlots), { children: /* @__PURE__ */ jsx27(DropZoneRenderPure, { zone: rootZone }) })) }) });
6650
+ return /* @__PURE__ */ jsx28(renderContext.Provider, { value: { config, data: defaultedData, metadata }, children: /* @__PURE__ */ jsx28(DropZoneProvider, { value: nextContextValue, children: /* @__PURE__ */ jsx28(config.root.render, __spreadProps(__spreadValues({}, propsWithSlots), { children: /* @__PURE__ */ jsx28(DropZoneRenderPure, { zone: rootZone }) })) }) });
6465
6651
  }
6466
- return /* @__PURE__ */ jsx27(renderContext.Provider, { value: { config, data: defaultedData, metadata }, children: /* @__PURE__ */ jsx27(DropZoneProvider, { value: nextContextValue, children: /* @__PURE__ */ jsx27(DropZoneRenderPure, { zone: rootZone }) }) });
6652
+ return /* @__PURE__ */ jsx28(renderContext.Provider, { value: { config, data: defaultedData, metadata }, children: /* @__PURE__ */ jsx28(DropZoneProvider, { value: nextContextValue, children: /* @__PURE__ */ jsx28(DropZoneRenderPure, { zone: rootZone }) }) });
6467
6653
  }
6468
6654
 
6469
6655
  // lib/use-puck.ts
@@ -6532,7 +6718,7 @@ function createUsePuck() {
6532
6718
  }
6533
6719
  const result = useStore3(
6534
6720
  usePuckApi,
6535
- selector != null ? selector : (s) => s
6721
+ selector != null ? selector : ((s) => s)
6536
6722
  );
6537
6723
  return result;
6538
6724
  };
@@ -6572,7 +6758,7 @@ var styles_module_default14 = { "ComponentList": "_ComponentList_1rrlt_1", "Comp
6572
6758
 
6573
6759
  // components/ComponentList/index.tsx
6574
6760
  import { useEffect as useEffect20 } from "react";
6575
- import { jsx as jsx28, jsxs as jsxs12 } from "react/jsx-runtime";
6761
+ import { jsx as jsx29, jsxs as jsxs12 } from "react/jsx-runtime";
6576
6762
  var getClassName20 = get_class_name_factory_default("ComponentList", styles_module_default14);
6577
6763
  var ComponentListItem = ({
6578
6764
  name,
@@ -6592,7 +6778,7 @@ var ComponentListItem = ({
6592
6778
  );
6593
6779
  }
6594
6780
  }, [overrides]);
6595
- return /* @__PURE__ */ jsx28(Drawer.Item, { label, name, isDragDisabled: !canInsert, children: (_a = overrides.componentItem) != null ? _a : overrides.drawerItem });
6781
+ return /* @__PURE__ */ jsx29(Drawer.Item, { label, name, isDragDisabled: !canInsert, children: (_a = overrides.componentItem) != null ? _a : overrides.drawerItem });
6596
6782
  };
6597
6783
  var ComponentList = ({
6598
6784
  children,
@@ -6618,14 +6804,14 @@ var ComponentList = ({
6618
6804
  }),
6619
6805
  title: expanded ? `Collapse${title ? ` ${title}` : ""}` : `Expand${title ? ` ${title}` : ""}`,
6620
6806
  children: [
6621
- /* @__PURE__ */ jsx28("div", { children: title }),
6622
- /* @__PURE__ */ jsx28("div", { className: getClassName20("titleIcon"), children: expanded ? /* @__PURE__ */ jsx28(ChevronUp, { size: 12 }) : /* @__PURE__ */ jsx28(ChevronDown, { size: 12 }) })
6807
+ /* @__PURE__ */ jsx29("div", { children: title }),
6808
+ /* @__PURE__ */ jsx29("div", { className: getClassName20("titleIcon"), children: expanded ? /* @__PURE__ */ jsx29(ChevronUp, { size: 12 }) : /* @__PURE__ */ jsx29(ChevronDown, { size: 12 }) })
6623
6809
  ]
6624
6810
  }
6625
6811
  ),
6626
- /* @__PURE__ */ jsx28("div", { className: getClassName20("content"), children: /* @__PURE__ */ jsx28(Drawer, { children: children || Object.keys(config.components).map((componentKey) => {
6812
+ /* @__PURE__ */ jsx29("div", { className: getClassName20("content"), children: /* @__PURE__ */ jsx29(Drawer, { children: children || Object.keys(config.components).map((componentKey) => {
6627
6813
  var _a;
6628
- return /* @__PURE__ */ jsx28(
6814
+ return /* @__PURE__ */ jsx29(
6629
6815
  ComponentListItem,
6630
6816
  {
6631
6817
  label: (_a = config.components[componentKey]["label"]) != null ? _a : componentKey,
@@ -6639,7 +6825,7 @@ var ComponentList = ({
6639
6825
  ComponentList.Item = ComponentListItem;
6640
6826
 
6641
6827
  // lib/use-component-list.tsx
6642
- import { jsx as jsx29 } from "react/jsx-runtime";
6828
+ import { jsx as jsx30 } from "react/jsx-runtime";
6643
6829
  var useComponentList = () => {
6644
6830
  const [componentList, setComponentList] = useState18();
6645
6831
  const config = useAppStore((s) => s.config);
@@ -6660,7 +6846,7 @@ var useComponentList = () => {
6660
6846
  if (category.visible === false) {
6661
6847
  return null;
6662
6848
  }
6663
- return /* @__PURE__ */ jsx29(
6849
+ return /* @__PURE__ */ jsx30(
6664
6850
  ComponentList,
6665
6851
  {
6666
6852
  id: categoryKey,
@@ -6668,7 +6854,7 @@ var useComponentList = () => {
6668
6854
  children: category.components.map((componentName, i) => {
6669
6855
  var _a2;
6670
6856
  const componentConf = config.components[componentName] || {};
6671
- return /* @__PURE__ */ jsx29(
6857
+ return /* @__PURE__ */ jsx30(
6672
6858
  ComponentList.Item,
6673
6859
  {
6674
6860
  label: (_a2 = componentConf["label"]) != null ? _a2 : componentName,
@@ -6688,7 +6874,7 @@ var useComponentList = () => {
6688
6874
  );
6689
6875
  if (remainingComponents.length > 0 && !((_a = uiComponentList.other) == null ? void 0 : _a.components) && ((_b = uiComponentList.other) == null ? void 0 : _b.visible) !== false) {
6690
6876
  _componentList.push(
6691
- /* @__PURE__ */ jsx29(
6877
+ /* @__PURE__ */ jsx30(
6692
6878
  ComponentList,
6693
6879
  {
6694
6880
  id: "other",
@@ -6696,7 +6882,7 @@ var useComponentList = () => {
6696
6882
  children: remainingComponents.map((componentName, i) => {
6697
6883
  var _a2;
6698
6884
  const componentConf = config.components[componentName] || {};
6699
- return /* @__PURE__ */ jsx29(
6885
+ return /* @__PURE__ */ jsx30(
6700
6886
  ComponentList.Item,
6701
6887
  {
6702
6888
  name: componentName,
@@ -6725,7 +6911,7 @@ init_react_import();
6725
6911
  var styles_module_default15 = { "Components": "_Components_3pbdy_1" };
6726
6912
 
6727
6913
  // components/Puck/components/Components/index.tsx
6728
- import { jsx as jsx30 } from "react/jsx-runtime";
6914
+ import { jsx as jsx31 } from "react/jsx-runtime";
6729
6915
  var getClassName21 = get_class_name_factory_default("Components", styles_module_default15);
6730
6916
  var Components = () => {
6731
6917
  const overrides = useAppStore((s) => s.overrides);
@@ -6738,16 +6924,16 @@ var Components = () => {
6738
6924
  }
6739
6925
  return overrides.components || overrides.drawer || "div";
6740
6926
  }, [overrides]);
6741
- return /* @__PURE__ */ jsx30("div", { className: getClassName21(), children: /* @__PURE__ */ jsx30(Wrapper, { children: componentList ? componentList : /* @__PURE__ */ jsx30(ComponentList, { id: "all" }) }) });
6927
+ return /* @__PURE__ */ jsx31("div", { className: getClassName21(), children: /* @__PURE__ */ jsx31(Wrapper, { children: componentList ? componentList : /* @__PURE__ */ jsx31(ComponentList, { id: "all" }) }) });
6742
6928
  };
6743
6929
 
6744
6930
  // plugins/blocks/index.tsx
6745
- import { jsx as jsx31 } from "react/jsx-runtime";
6931
+ import { jsx as jsx32 } from "react/jsx-runtime";
6746
6932
  var blocksPlugin = () => ({
6747
6933
  name: "blocks",
6748
6934
  label: "Blocks",
6749
6935
  render: Components,
6750
- icon: /* @__PURE__ */ jsx31(Hammer, {})
6936
+ icon: /* @__PURE__ */ jsx32(Hammer, {})
6751
6937
  });
6752
6938
 
6753
6939
  // plugins/outline/index.tsx
@@ -6775,7 +6961,7 @@ var scrollIntoView = (el) => {
6775
6961
  };
6776
6962
 
6777
6963
  // components/LayerTree/index.tsx
6778
- import { useCallback as useCallback12, useContext as useContext10 } from "react";
6964
+ import { useCallback as useCallback13, useContext as useContext10 } from "react";
6779
6965
 
6780
6966
  // lib/on-scroll-end.ts
6781
6967
  init_react_import();
@@ -6797,8 +6983,8 @@ var onScrollEnd = (frame, cb) => {
6797
6983
  };
6798
6984
 
6799
6985
  // components/LayerTree/index.tsx
6800
- import { useShallow as useShallow5 } from "zustand/react/shallow";
6801
- import { Fragment as Fragment8, jsx as jsx32, jsxs as jsxs13 } from "react/jsx-runtime";
6986
+ import { useShallow as useShallow6 } from "zustand/react/shallow";
6987
+ import { Fragment as Fragment9, jsx as jsx33, jsxs as jsxs13 } from "react/jsx-runtime";
6802
6988
  var getClassName22 = get_class_name_factory_default("LayerTree", styles_module_default16);
6803
6989
  var getClassNameLayer = get_class_name_factory_default("Layer", styles_module_default16);
6804
6990
  var Layer = ({
@@ -6810,7 +6996,7 @@ var Layer = ({
6810
6996
  const config = useAppStore((s) => s.config);
6811
6997
  const itemSelector = useAppStore((s) => s.state.ui.itemSelector);
6812
6998
  const dispatch = useAppStore((s) => s.dispatch);
6813
- const setItemSelector = useCallback12(
6999
+ const setItemSelector = useCallback13(
6814
7000
  (itemSelector2) => {
6815
7001
  dispatch({ type: "setUi", ui: { itemSelector: itemSelector2 } });
6816
7002
  },
@@ -6823,7 +7009,7 @@ var Layer = ({
6823
7009
  const isSelected = selecedItemId === itemId || itemSelector && itemSelector.zone === rootDroppableId && !zoneCompound;
6824
7010
  const nodeData = useAppStore((s) => s.state.indexes.nodes[itemId]);
6825
7011
  const zonesForItem = useAppStore(
6826
- useShallow5(
7012
+ useShallow6(
6827
7013
  (s) => Object.keys(s.state.indexes.zones).filter(
6828
7014
  (z) => z.split(":")[0] === itemId
6829
7015
  )
@@ -6855,7 +7041,7 @@ var Layer = ({
6855
7041
  childIsSelected
6856
7042
  }),
6857
7043
  children: [
6858
- /* @__PURE__ */ jsx32("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */ jsxs13(
7044
+ /* @__PURE__ */ jsx33("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */ jsxs13(
6859
7045
  "button",
6860
7046
  {
6861
7047
  type: "button",
@@ -6893,22 +7079,22 @@ var Layer = ({
6893
7079
  zoneStore.setState({ hoveringComponent: null });
6894
7080
  },
6895
7081
  children: [
6896
- containsZone && /* @__PURE__ */ jsx32(
7082
+ containsZone && /* @__PURE__ */ jsx33(
6897
7083
  "div",
6898
7084
  {
6899
7085
  className: getClassNameLayer("chevron"),
6900
7086
  title: isSelected ? "Collapse" : "Expand",
6901
- children: /* @__PURE__ */ jsx32(ChevronDown, { size: "12" })
7087
+ children: /* @__PURE__ */ jsx33(ChevronDown, { size: "12" })
6902
7088
  }
6903
7089
  ),
6904
7090
  /* @__PURE__ */ jsxs13("div", { className: getClassNameLayer("title"), children: [
6905
- /* @__PURE__ */ jsx32("div", { className: getClassNameLayer("icon"), children: nodeData.data.type === "Text" || nodeData.data.type === "Heading" ? /* @__PURE__ */ jsx32(Type, { size: "16" }) : /* @__PURE__ */ jsx32(LayoutGrid, { size: "16" }) }),
6906
- /* @__PURE__ */ jsx32("div", { className: getClassNameLayer("name"), children: label })
7091
+ /* @__PURE__ */ jsx33("div", { className: getClassNameLayer("icon"), children: nodeData.data.type === "Text" || nodeData.data.type === "Heading" ? /* @__PURE__ */ jsx33(Type, { size: "16" }) : /* @__PURE__ */ jsx33(LayoutGrid, { size: "16" }) }),
7092
+ /* @__PURE__ */ jsx33("div", { className: getClassNameLayer("name"), children: label })
6907
7093
  ] })
6908
7094
  ]
6909
7095
  }
6910
7096
  ) }),
6911
- containsZone && zonesForItem.map((subzone) => /* @__PURE__ */ jsx32("div", { className: getClassNameLayer("zones"), children: /* @__PURE__ */ jsx32(LayerTree, { zoneCompound: subzone }) }, subzone))
7097
+ containsZone && zonesForItem.map((subzone) => /* @__PURE__ */ jsx33("div", { className: getClassNameLayer("zones"), children: /* @__PURE__ */ jsx33(LayerTree, { zoneCompound: subzone }) }, subzone))
6912
7098
  ]
6913
7099
  }
6914
7100
  );
@@ -6927,22 +7113,22 @@ var LayerTree = ({
6927
7113
  return (_d = (_c = (_b = configForComponent == null ? void 0 : configForComponent.fields) == null ? void 0 : _b[slotId]) == null ? void 0 : _c.label) != null ? _d : slotId;
6928
7114
  });
6929
7115
  const contentIds = useAppStore(
6930
- useShallow5(
7116
+ useShallow6(
6931
7117
  (s) => {
6932
7118
  var _a, _b;
6933
7119
  return zoneCompound ? (_b = (_a = s.state.indexes.zones[zoneCompound]) == null ? void 0 : _a.contentIds) != null ? _b : [] : [];
6934
7120
  }
6935
7121
  )
6936
7122
  );
6937
- return /* @__PURE__ */ jsxs13(Fragment8, { children: [
7123
+ return /* @__PURE__ */ jsxs13(Fragment9, { children: [
6938
7124
  label && /* @__PURE__ */ jsxs13("div", { className: getClassName22("zoneTitle"), children: [
6939
- /* @__PURE__ */ jsx32("div", { className: getClassName22("zoneIcon"), children: /* @__PURE__ */ jsx32(Layers, { size: "16" }) }),
7125
+ /* @__PURE__ */ jsx33("div", { className: getClassName22("zoneIcon"), children: /* @__PURE__ */ jsx33(Layers, { size: "16" }) }),
6940
7126
  label
6941
7127
  ] }),
6942
7128
  /* @__PURE__ */ jsxs13("ul", { className: getClassName22(), children: [
6943
- contentIds.length === 0 && /* @__PURE__ */ jsx32("div", { className: getClassName22("helper"), children: "No items" }),
7129
+ contentIds.length === 0 && /* @__PURE__ */ jsx33("div", { className: getClassName22("helper"), children: "No items" }),
6944
7130
  contentIds.map((itemId, i) => {
6945
- return /* @__PURE__ */ jsx32(
7131
+ return /* @__PURE__ */ jsx33(
6946
7132
  Layer,
6947
7133
  {
6948
7134
  index: i,
@@ -6968,22 +7154,22 @@ var findZonesForArea = (state, area) => {
6968
7154
  };
6969
7155
 
6970
7156
  // components/Puck/components/Outline/index.tsx
6971
- import { useShallow as useShallow6 } from "zustand/react/shallow";
7157
+ import { useShallow as useShallow7 } from "zustand/react/shallow";
6972
7158
 
6973
7159
  // css-module:/home/runner/work/puck/puck/packages/core/components/Puck/components/Outline/styles.module.css#css-module
6974
7160
  init_react_import();
6975
7161
  var styles_module_default17 = { "Outline": "_Outline_cvjlj_1" };
6976
7162
 
6977
7163
  // components/Puck/components/Outline/index.tsx
6978
- import { jsx as jsx33 } from "react/jsx-runtime";
7164
+ import { jsx as jsx34 } from "react/jsx-runtime";
6979
7165
  var getClassName23 = get_class_name_factory_default("Outline", styles_module_default17);
6980
7166
  var Outline = () => {
6981
7167
  const outlineOverride = useAppStore((s) => s.overrides.outline);
6982
7168
  const rootZones = useAppStore(
6983
- useShallow6((s) => findZonesForArea(s.state, "root"))
7169
+ useShallow7((s) => findZonesForArea(s.state, "root"))
6984
7170
  );
6985
7171
  const Wrapper = useMemo11(() => outlineOverride || "div", [outlineOverride]);
6986
- return /* @__PURE__ */ jsx33("div", { className: getClassName23(), children: /* @__PURE__ */ jsx33(Wrapper, { children: rootZones.map((zoneCompound) => /* @__PURE__ */ jsx33(
7172
+ return /* @__PURE__ */ jsx34("div", { className: getClassName23(), children: /* @__PURE__ */ jsx34(Wrapper, { children: rootZones.map((zoneCompound) => /* @__PURE__ */ jsx34(
6987
7173
  LayerTree,
6988
7174
  {
6989
7175
  label: rootZones.length === 1 ? "" : zoneCompound.split(":")[1],
@@ -6994,12 +7180,12 @@ var Outline = () => {
6994
7180
  };
6995
7181
 
6996
7182
  // plugins/outline/index.tsx
6997
- import { jsx as jsx34 } from "react/jsx-runtime";
7183
+ import { jsx as jsx35 } from "react/jsx-runtime";
6998
7184
  var outlinePlugin = () => ({
6999
7185
  name: "outline",
7000
7186
  label: "Outline",
7001
7187
  render: Outline,
7002
- icon: /* @__PURE__ */ jsx34(Layers, {})
7188
+ icon: /* @__PURE__ */ jsx35(Layers, {})
7003
7189
  });
7004
7190
 
7005
7191
  // plugins/fields/index.tsx
@@ -7057,7 +7243,7 @@ var useBreadcrumbs = (renderCount) => {
7057
7243
  };
7058
7244
 
7059
7245
  // components/Breadcrumbs/index.tsx
7060
- import { jsx as jsx35, jsxs as jsxs14 } from "react/jsx-runtime";
7246
+ import { jsx as jsx36, jsxs as jsxs14 } from "react/jsx-runtime";
7061
7247
  var getClassName24 = get_class_name_factory_default("Breadcrumbs", styles_module_default18);
7062
7248
  var Breadcrumbs = ({
7063
7249
  children,
@@ -7067,7 +7253,7 @@ var Breadcrumbs = ({
7067
7253
  const breadcrumbs = useBreadcrumbs(numParents);
7068
7254
  return /* @__PURE__ */ jsxs14("div", { className: getClassName24(), children: [
7069
7255
  breadcrumbs.map((breadcrumb, i) => /* @__PURE__ */ jsxs14("div", { className: getClassName24("breadcrumb"), children: [
7070
- /* @__PURE__ */ jsx35(
7256
+ /* @__PURE__ */ jsx36(
7071
7257
  "button",
7072
7258
  {
7073
7259
  type: "button",
@@ -7076,7 +7262,7 @@ var Breadcrumbs = ({
7076
7262
  children: breadcrumb.label
7077
7263
  }
7078
7264
  ),
7079
- /* @__PURE__ */ jsx35(ChevronRight, { size: 16 })
7265
+ /* @__PURE__ */ jsx36(ChevronRight, { size: 16 })
7080
7266
  ] }, i)),
7081
7267
  children
7082
7268
  ] });
@@ -7090,16 +7276,16 @@ init_react_import();
7090
7276
  var styles_module_default19 = { "PuckFields": "_PuckFields_10bh7_1", "PuckFields--isLoading": "_PuckFields--isLoading_10bh7_6", "PuckFields-loadingOverlay": "_PuckFields-loadingOverlay_10bh7_10", "PuckFields-loadingOverlayInner": "_PuckFields-loadingOverlayInner_10bh7_25", "PuckFields-field": "_PuckFields-field_10bh7_32", "PuckFields--wrapFields": "_PuckFields--wrapFields_10bh7_36" };
7091
7277
 
7092
7278
  // components/Puck/components/Fields/index.tsx
7093
- import { memo as memo3, useCallback as useCallback13, useMemo as useMemo13 } from "react";
7094
- import { useShallow as useShallow7 } from "zustand/react/shallow";
7095
- import { Fragment as Fragment9, jsx as jsx36, jsxs as jsxs15 } from "react/jsx-runtime";
7279
+ import { memo as memo5, useCallback as useCallback14, useMemo as useMemo13 } from "react";
7280
+ import { useShallow as useShallow8 } from "zustand/react/shallow";
7281
+ import { Fragment as Fragment10, jsx as jsx37, jsxs as jsxs15 } from "react/jsx-runtime";
7096
7282
  var getClassName25 = get_class_name_factory_default("PuckFields", styles_module_default19);
7097
7283
  var DefaultFields = ({
7098
7284
  children
7099
7285
  }) => {
7100
- return /* @__PURE__ */ jsx36(Fragment9, { children });
7286
+ return /* @__PURE__ */ jsx37(Fragment10, { children });
7101
7287
  };
7102
- var createOnChange = (fieldName, appStore) => (value, updatedUi) => __async(void 0, null, function* () {
7288
+ var createOnChange = (fieldName, appStore) => (value, updatedUi) => __async(null, null, function* () {
7103
7289
  let currentProps;
7104
7290
  const { dispatch, state, selectedItem, resolveComponentData: resolveComponentData2 } = appStore.getState();
7105
7291
  const { data, ui } = state;
@@ -7148,40 +7334,35 @@ var FieldsChild = ({ fieldName }) => {
7148
7334
  const isReadOnly = useAppStore(
7149
7335
  (s) => ((s.selectedItem ? s.selectedItem.readOnly : s.state.data.root.readOnly) || {})[fieldName]
7150
7336
  );
7151
- const value = useAppStore((s) => {
7152
- const rootProps = s.state.data.root.props || s.state.data.root;
7153
- return s.selectedItem ? s.selectedItem.props[fieldName] : rootProps[fieldName];
7154
- });
7155
7337
  const id = useAppStore((s) => {
7156
7338
  if (!field) return null;
7157
7339
  return s.selectedItem ? `${s.selectedItem.props.id}_${field.type}_${fieldName}` : `root_${field.type}_${fieldName}`;
7158
7340
  });
7159
7341
  const permissions = useAppStore(
7160
- useShallow7((s) => {
7342
+ useShallow8((s) => {
7161
7343
  const { selectedItem, permissions: permissions2 } = s;
7162
7344
  return selectedItem ? permissions2.getPermissions({ item: selectedItem }) : permissions2.getPermissions({ root: true });
7163
7345
  })
7164
7346
  );
7165
7347
  const appStore = useAppStoreApi();
7166
- const onChange = useCallback13(createOnChange(fieldName, appStore), [
7348
+ const onChange = useCallback14(createOnChange(fieldName, appStore), [
7167
7349
  fieldName
7168
7350
  ]);
7169
7351
  const { visible = true } = field != null ? field : {};
7170
7352
  if (!field || !id || !visible) return null;
7171
7353
  if (field.type === "slot") return null;
7172
- return /* @__PURE__ */ jsx36("div", { className: getClassName25("field"), children: /* @__PURE__ */ jsx36(
7354
+ return /* @__PURE__ */ jsx37("div", { className: getClassName25("field"), children: /* @__PURE__ */ jsx37(
7173
7355
  AutoFieldPrivate,
7174
7356
  {
7175
7357
  field,
7176
7358
  name: fieldName,
7177
7359
  id,
7178
7360
  readOnly: !permissions.edit || isReadOnly,
7179
- value,
7180
7361
  onChange
7181
7362
  }
7182
7363
  ) }, id);
7183
7364
  };
7184
- var FieldsChildMemo = memo3(FieldsChild);
7365
+ var FieldsChildMemo = memo5(FieldsChild);
7185
7366
  var FieldsInternal = ({ wrapFields = true }) => {
7186
7367
  const overrides = useAppStore((s) => s.overrides);
7187
7368
  const componentResolving = useAppStore((s) => {
@@ -7189,7 +7370,7 @@ var FieldsInternal = ({ wrapFields = true }) => {
7189
7370
  const loadingCount = s.selectedItem ? (_a = s.componentState[s.selectedItem.props.id]) == null ? void 0 : _a.loadingCount : (_b = s.componentState["root"]) == null ? void 0 : _b.loadingCount;
7190
7371
  return (loadingCount != null ? loadingCount : 0) > 0;
7191
7372
  });
7192
- const itemSelector = useAppStore(useShallow7((s) => s.state.ui.itemSelector));
7373
+ const itemSelector = useAppStore(useShallow8((s) => s.state.ui.itemSelector));
7193
7374
  const id = useAppStore((s) => {
7194
7375
  var _a;
7195
7376
  return (_a = s.selectedItem) == null ? void 0 : _a.props.id;
@@ -7198,7 +7379,7 @@ var FieldsInternal = ({ wrapFields = true }) => {
7198
7379
  useRegisterFieldsSlice(appStore, id);
7199
7380
  const fieldsLoading = useAppStore((s) => s.fields.loading);
7200
7381
  const fieldNames = useAppStore(
7201
- useShallow7((s) => {
7382
+ useShallow8((s) => {
7202
7383
  if (s.fields.id === id) {
7203
7384
  return Object.keys(s.fields.fields);
7204
7385
  }
@@ -7215,20 +7396,20 @@ var FieldsInternal = ({ wrapFields = true }) => {
7215
7396
  e.preventDefault();
7216
7397
  },
7217
7398
  children: [
7218
- /* @__PURE__ */ jsx36(Wrapper, { isLoading, itemSelector, children: fieldNames.map((fieldName) => /* @__PURE__ */ jsx36(FieldsChildMemo, { fieldName }, fieldName)) }),
7219
- isLoading && /* @__PURE__ */ jsx36("div", { className: getClassName25("loadingOverlay"), children: /* @__PURE__ */ jsx36("div", { className: getClassName25("loadingOverlayInner"), children: /* @__PURE__ */ jsx36(Loader, { size: 16 }) }) })
7399
+ /* @__PURE__ */ jsx37(Wrapper, { isLoading, itemSelector, children: fieldNames.map((fieldName) => /* @__PURE__ */ jsx37(FieldsChildMemo, { fieldName }, fieldName)) }),
7400
+ isLoading && /* @__PURE__ */ jsx37("div", { className: getClassName25("loadingOverlay"), children: /* @__PURE__ */ jsx37("div", { className: getClassName25("loadingOverlayInner"), children: /* @__PURE__ */ jsx37(Loader, { size: 16 }) }) })
7220
7401
  ]
7221
7402
  }
7222
7403
  );
7223
7404
  };
7224
- var Fields = memo3(FieldsInternal);
7405
+ var Fields = memo5(FieldsInternal);
7225
7406
 
7226
7407
  // css-module:/home/runner/work/puck/puck/packages/core/plugins/fields/styles.module.css#css-module
7227
7408
  init_react_import();
7228
7409
  var styles_module_default20 = { "FieldsPlugin": "_FieldsPlugin_nd930_1", "FieldsPlugin-header": "_FieldsPlugin-header_nd930_7" };
7229
7410
 
7230
7411
  // plugins/fields/index.tsx
7231
- import { jsx as jsx37, jsxs as jsxs16 } from "react/jsx-runtime";
7412
+ import { jsx as jsx38, jsxs as jsxs16 } from "react/jsx-runtime";
7232
7413
  var getClassName26 = get_class_name_factory_default("FieldsPlugin", styles_module_default20);
7233
7414
  var CurrentTitle = () => {
7234
7415
  const label = useAppStore((s) => {
@@ -7242,10 +7423,10 @@ var fieldsPlugin = ({ mobileOnly = true } = {}) => ({
7242
7423
  name: "fields",
7243
7424
  label: "Fields",
7244
7425
  render: () => /* @__PURE__ */ jsxs16("div", { className: getClassName26(), children: [
7245
- /* @__PURE__ */ jsx37("div", { className: getClassName26("header"), children: /* @__PURE__ */ jsx37(Breadcrumbs, { numParents: 2, children: /* @__PURE__ */ jsx37(CurrentTitle, {}) }) }),
7246
- /* @__PURE__ */ jsx37(Fields, {})
7426
+ /* @__PURE__ */ jsx38("div", { className: getClassName26("header"), children: /* @__PURE__ */ jsx38(Breadcrumbs, { numParents: 2, children: /* @__PURE__ */ jsx38(CurrentTitle, {}) }) }),
7427
+ /* @__PURE__ */ jsx38(Fields, {})
7247
7428
  ] }),
7248
- icon: /* @__PURE__ */ jsx37(RectangleEllipsis, {}),
7429
+ icon: /* @__PURE__ */ jsx38(RectangleEllipsis, {}),
7249
7430
  mobileOnly
7250
7431
  });
7251
7432
 
@@ -7253,7 +7434,7 @@ var fieldsPlugin = ({ mobileOnly = true } = {}) => ({
7253
7434
  init_react_import();
7254
7435
  import {
7255
7436
  createContext as createContext8,
7256
- useCallback as useCallback21,
7437
+ useCallback as useCallback22,
7257
7438
  useContext as useContext13,
7258
7439
  useEffect as useEffect30,
7259
7440
  useMemo as useMemo21,
@@ -7263,7 +7444,7 @@ import {
7263
7444
 
7264
7445
  // components/Puck/components/Preview/index.tsx
7265
7446
  init_react_import();
7266
- import { useCallback as useCallback14, useEffect as useEffect23, useRef as useRef7, useMemo as useMemo14 } from "react";
7447
+ import { useCallback as useCallback15, useEffect as useEffect23, useRef as useRef7, useMemo as useMemo14 } from "react";
7267
7448
 
7268
7449
  // components/AutoFrame/index.tsx
7269
7450
  init_react_import();
@@ -7275,7 +7456,7 @@ import {
7275
7456
  } from "react";
7276
7457
  import hash from "object-hash";
7277
7458
  import { createPortal as createPortal3 } from "react-dom";
7278
- import { Fragment as Fragment10, jsx as jsx38 } from "react/jsx-runtime";
7459
+ import { Fragment as Fragment11, jsx as jsx39 } from "react/jsx-runtime";
7279
7460
  var styleSelector = 'style, link[rel="stylesheet"]';
7280
7461
  var collectStyles = (doc) => {
7281
7462
  const collected = [];
@@ -7333,7 +7514,7 @@ var CopyHostStyles = ({
7333
7514
  let elements = [];
7334
7515
  const hashes = {};
7335
7516
  const lookupEl = (el) => elements.findIndex((elementMap) => elementMap.original === el);
7336
- const mirrorEl = (el, inlineStyles = false) => __async(void 0, null, function* () {
7517
+ const mirrorEl = (el, inlineStyles = false) => __async(null, null, function* () {
7337
7518
  let mirror;
7338
7519
  if (el.nodeName === "LINK" && inlineStyles) {
7339
7520
  mirror = document.createElement("style");
@@ -7365,7 +7546,7 @@ var CopyHostStyles = ({
7365
7546
  }
7366
7547
  return mirror;
7367
7548
  });
7368
- const addEl = (el) => __async(void 0, null, function* () {
7549
+ const addEl = (el) => __async(null, null, function* () {
7369
7550
  const index = lookupEl(el);
7370
7551
  if (index > -1) {
7371
7552
  if (debug)
@@ -7438,7 +7619,7 @@ var CopyHostStyles = ({
7438
7619
  const parentBody = parentDocument.getElementsByTagName("body")[0];
7439
7620
  syncAttributes(parentBody, doc.body);
7440
7621
  Promise.all(
7441
- collectedStyles.map((styleNode, i) => __async(void 0, null, function* () {
7622
+ collectedStyles.map((styleNode, i) => __async(null, null, function* () {
7442
7623
  if (styleNode.nodeName === "LINK") {
7443
7624
  const linkHref = styleNode.href;
7444
7625
  if (hrefs.indexOf(linkHref) > -1) {
@@ -7482,7 +7663,7 @@ var CopyHostStyles = ({
7482
7663
  observer.disconnect();
7483
7664
  };
7484
7665
  }, []);
7485
- return /* @__PURE__ */ jsx38(Fragment10, { children });
7666
+ return /* @__PURE__ */ jsx39(Fragment11, { children });
7486
7667
  };
7487
7668
  var autoFrameContext = createContext6({});
7488
7669
  var useFrame = () => useContext11(autoFrameContext);
@@ -7529,7 +7710,7 @@ function AutoFrame(_a) {
7529
7710
  }
7530
7711
  }
7531
7712
  }, [frameRef, loaded, stylesLoaded]);
7532
- return /* @__PURE__ */ jsx38(
7713
+ return /* @__PURE__ */ jsx39(
7533
7714
  "iframe",
7534
7715
  __spreadProps(__spreadValues({}, props), {
7535
7716
  className,
@@ -7539,7 +7720,7 @@ function AutoFrame(_a) {
7539
7720
  onLoad: () => {
7540
7721
  setLoaded(true);
7541
7722
  },
7542
- children: /* @__PURE__ */ jsx38(autoFrameContext.Provider, { value: ctx, children: loaded && mountTarget && /* @__PURE__ */ jsx38(
7723
+ children: /* @__PURE__ */ jsx39(autoFrameContext.Provider, { value: ctx, children: loaded && mountTarget && /* @__PURE__ */ jsx39(
7543
7724
  CopyHostStyles,
7544
7725
  {
7545
7726
  debug,
@@ -7558,7 +7739,7 @@ init_react_import();
7558
7739
  var styles_module_default21 = { "PuckPreview": "_PuckPreview_z2rgu_1", "PuckPreview-frame": "_PuckPreview-frame_z2rgu_6" };
7559
7740
 
7560
7741
  // components/Puck/components/Preview/index.tsx
7561
- import { Fragment as Fragment11, jsx as jsx39 } from "react/jsx-runtime";
7742
+ import { Fragment as Fragment12, jsx as jsx40 } from "react/jsx-runtime";
7562
7743
  var getClassName27 = get_class_name_factory_default("PuckPreview", styles_module_default21);
7563
7744
  var useBubbleIframeEvents = (ref) => {
7564
7745
  const status = useAppStore((s) => s.status);
@@ -7611,7 +7792,7 @@ var Preview2 = ({ id = "puck-preview" }) => {
7611
7792
  const renderData = useAppStore(
7612
7793
  (s) => s.state.ui.previewMode === "edit" ? null : s.state.data
7613
7794
  );
7614
- const Page = useCallback14(
7795
+ const Page = useCallback15(
7615
7796
  (pageProps) => {
7616
7797
  var _a, _b;
7617
7798
  const propsWithSlots = useSlots(
@@ -7621,7 +7802,7 @@ var Preview2 = ({ id = "puck-preview" }) => {
7621
7802
  );
7622
7803
  return ((_a = config.root) == null ? void 0 : _a.render) ? (_b = config.root) == null ? void 0 : _b.render(__spreadValues({
7623
7804
  id: "puck-root"
7624
- }, propsWithSlots)) : /* @__PURE__ */ jsx39(Fragment11, { children: propsWithSlots.children });
7805
+ }, propsWithSlots)) : /* @__PURE__ */ jsx40(Fragment12, { children: propsWithSlots.children });
7625
7806
  },
7626
7807
  [config]
7627
7808
  );
@@ -7629,7 +7810,7 @@ var Preview2 = ({ id = "puck-preview" }) => {
7629
7810
  const rootProps = root.props || root;
7630
7811
  const ref = useRef7(null);
7631
7812
  useBubbleIframeEvents(ref);
7632
- const inner = !renderData ? /* @__PURE__ */ jsx39(
7813
+ const inner = !renderData ? /* @__PURE__ */ jsx40(
7633
7814
  Page,
7634
7815
  __spreadProps(__spreadValues({}, rootProps), {
7635
7816
  puck: {
@@ -7639,15 +7820,15 @@ var Preview2 = ({ id = "puck-preview" }) => {
7639
7820
  metadata
7640
7821
  },
7641
7822
  editMode: true,
7642
- children: /* @__PURE__ */ jsx39(DropZonePure, { zone: rootDroppableId })
7823
+ children: /* @__PURE__ */ jsx40(DropZonePure, { zone: rootDroppableId })
7643
7824
  })
7644
- ) : /* @__PURE__ */ jsx39(Render, { data: renderData, config, metadata });
7825
+ ) : /* @__PURE__ */ jsx40(Render, { data: renderData, config, metadata });
7645
7826
  useEffect23(() => {
7646
7827
  if (!iframe.enabled) {
7647
7828
  setStatus("READY");
7648
7829
  }
7649
7830
  }, [iframe.enabled]);
7650
- return /* @__PURE__ */ jsx39(
7831
+ return /* @__PURE__ */ jsx40(
7651
7832
  "div",
7652
7833
  {
7653
7834
  className: getClassName27(),
@@ -7659,7 +7840,7 @@ var Preview2 = ({ id = "puck-preview" }) => {
7659
7840
  dispatch({ type: "setUi", ui: { itemSelector: null } });
7660
7841
  }
7661
7842
  },
7662
- children: iframe.enabled ? /* @__PURE__ */ jsx39(
7843
+ children: iframe.enabled ? /* @__PURE__ */ jsx40(
7663
7844
  AutoFrame_default,
7664
7845
  {
7665
7846
  id: "preview-frame",
@@ -7672,14 +7853,14 @@ var Preview2 = ({ id = "puck-preview" }) => {
7672
7853
  setStatus("MOUNTED");
7673
7854
  },
7674
7855
  frameRef: ref,
7675
- children: /* @__PURE__ */ jsx39(autoFrameContext.Consumer, { children: ({ document: document2 }) => {
7856
+ children: /* @__PURE__ */ jsx40(autoFrameContext.Consumer, { children: ({ document: document2 }) => {
7676
7857
  if (Frame) {
7677
- return /* @__PURE__ */ jsx39(Frame, { document: document2, children: inner });
7858
+ return /* @__PURE__ */ jsx40(Frame, { document: document2, children: inner });
7678
7859
  }
7679
7860
  return inner;
7680
7861
  } })
7681
7862
  }
7682
- ) : /* @__PURE__ */ jsx39(
7863
+ ) : /* @__PURE__ */ jsx40(
7683
7864
  "div",
7684
7865
  {
7685
7866
  id: "preview-frame",
@@ -7743,7 +7924,7 @@ var useLoadedOverrides = ({
7743
7924
  };
7744
7925
 
7745
7926
  // components/Puck/index.tsx
7746
- var import_fast_deep_equal = __toESM(require_fast_deep_equal());
7927
+ var import_fast_deep_equal2 = __toESM(require_fast_deep_equal());
7747
7928
 
7748
7929
  // components/Puck/components/Layout/index.tsx
7749
7930
  init_react_import();
@@ -7751,7 +7932,7 @@ import { useEffect as useEffect29, useMemo as useMemo20, useState as useState25
7751
7932
 
7752
7933
  // css-module:/home/runner/work/puck/puck/packages/core/components/Puck/components/Layout/styles.module.css#css-module
7753
7934
  init_react_import();
7754
- var styles_module_default22 = { "Puck": "_Puck_hv23j_19", "Puck-portal": "_Puck-portal_hv23j_31", "PuckLayout": "_PuckLayout_hv23j_36", "PuckLayout-inner": "_PuckLayout-inner_hv23j_40", "PuckLayout--mounted": "_PuckLayout--mounted_hv23j_73", "PuckLayout--mobilePanelHeightToggle": "_PuckLayout--mobilePanelHeightToggle_hv23j_77", "PuckLayout--leftSideBarVisible": "_PuckLayout--leftSideBarVisible_hv23j_77", "PuckLayout--isExpanded": "_PuckLayout--isExpanded_hv23j_83", "PuckLayout--mobilePanelHeightMinContent": "_PuckLayout--mobilePanelHeightMinContent_hv23j_101", "PuckLayout--rightSideBarVisible": "_PuckLayout--rightSideBarVisible_hv23j_128", "PuckLayout-mounted": "_PuckLayout-mounted_hv23j_147", "PuckLayout-nav": "_PuckLayout-nav_hv23j_188", "PuckLayout-header": "_PuckLayout-header_hv23j_204", "PuckPluginTab": "_PuckPluginTab_hv23j_218", "PuckPluginTab--visible": "_PuckPluginTab--visible_hv23j_224", "PuckPluginTab-body": "_PuckPluginTab-body_hv23j_229" };
7935
+ var styles_module_default22 = { "Puck": "_Puck_lqzmv_19", "Puck-portal": "_Puck-portal_lqzmv_32", "PuckLayout": "_PuckLayout_lqzmv_37", "PuckLayout-inner": "_PuckLayout-inner_lqzmv_41", "PuckLayout--mounted": "_PuckLayout--mounted_lqzmv_74", "PuckLayout--mobilePanelHeightToggle": "_PuckLayout--mobilePanelHeightToggle_lqzmv_78", "PuckLayout--leftSideBarVisible": "_PuckLayout--leftSideBarVisible_lqzmv_78", "PuckLayout--isExpanded": "_PuckLayout--isExpanded_lqzmv_84", "PuckLayout--mobilePanelHeightMinContent": "_PuckLayout--mobilePanelHeightMinContent_lqzmv_102", "PuckLayout--rightSideBarVisible": "_PuckLayout--rightSideBarVisible_lqzmv_129", "PuckLayout-mounted": "_PuckLayout-mounted_lqzmv_148", "PuckLayout-nav": "_PuckLayout-nav_lqzmv_189", "PuckLayout-header": "_PuckLayout-header_lqzmv_205", "PuckPluginTab": "_PuckPluginTab_lqzmv_219", "PuckPluginTab--visible": "_PuckPluginTab--visible_lqzmv_225", "PuckPluginTab-body": "_PuckPluginTab-body_lqzmv_230" };
7755
7936
 
7756
7937
  // lib/use-inject-css.ts
7757
7938
  init_react_import();
@@ -7782,15 +7963,15 @@ var useInjectGlobalCss = (iframeEnabled) => {
7782
7963
 
7783
7964
  // components/DefaultOverride/index.tsx
7784
7965
  init_react_import();
7785
- import { Fragment as Fragment12, jsx as jsx40 } from "react/jsx-runtime";
7786
- var DefaultOverride = ({ children }) => /* @__PURE__ */ jsx40(Fragment12, { children });
7966
+ import { Fragment as Fragment13, jsx as jsx41 } from "react/jsx-runtime";
7967
+ var DefaultOverride = ({ children }) => /* @__PURE__ */ jsx41(Fragment13, { children });
7787
7968
 
7788
7969
  // lib/use-preview-mode-hotkeys.ts
7789
7970
  init_react_import();
7790
- import { useCallback as useCallback15 } from "react";
7971
+ import { useCallback as useCallback16 } from "react";
7791
7972
  var usePreviewModeHotkeys = () => {
7792
7973
  const appStore = useAppStoreApi();
7793
- const toggleInteractive = useCallback15(() => {
7974
+ const toggleInteractive = useCallback16(() => {
7794
7975
  const dispatch = appStore.getState().dispatch;
7795
7976
  dispatch({
7796
7977
  type: "setUi",
@@ -7805,7 +7986,7 @@ var usePreviewModeHotkeys = () => {
7805
7986
 
7806
7987
  // components/Puck/components/Header/index.tsx
7807
7988
  init_react_import();
7808
- import { memo as memo4, useCallback as useCallback16, useMemo as useMemo16, useState as useState21 } from "react";
7989
+ import { memo as memo6, useCallback as useCallback17, useMemo as useMemo16, useState as useState21 } from "react";
7809
7990
 
7810
7991
  // components/MenuBar/index.tsx
7811
7992
  init_react_import();
@@ -7815,7 +7996,7 @@ init_react_import();
7815
7996
  var styles_module_default23 = { "MenuBar": "_MenuBar_8pf8c_1", "MenuBar--menuOpen": "_MenuBar--menuOpen_8pf8c_14", "MenuBar-inner": "_MenuBar-inner_8pf8c_29", "MenuBar-history": "_MenuBar-history_8pf8c_45" };
7816
7997
 
7817
7998
  // components/MenuBar/index.tsx
7818
- import { Fragment as Fragment13, jsx as jsx41, jsxs as jsxs17 } from "react/jsx-runtime";
7999
+ import { Fragment as Fragment14, jsx as jsx42, jsxs as jsxs17 } from "react/jsx-runtime";
7819
8000
  var getClassName28 = get_class_name_factory_default("MenuBar", styles_module_default23);
7820
8001
  function MenuBar({
7821
8002
  menuOpen = false,
@@ -7826,7 +8007,7 @@ function MenuBar({
7826
8007
  const forward = useAppStore((s) => s.history.forward);
7827
8008
  const hasFuture = useAppStore((s) => s.history.hasFuture());
7828
8009
  const hasPast = useAppStore((s) => s.history.hasPast());
7829
- return /* @__PURE__ */ jsx41(
8010
+ return /* @__PURE__ */ jsx42(
7830
8011
  "div",
7831
8012
  {
7832
8013
  className: getClassName28({ menuOpen }),
@@ -7842,28 +8023,28 @@ function MenuBar({
7842
8023
  },
7843
8024
  children: /* @__PURE__ */ jsxs17("div", { className: getClassName28("inner"), children: [
7844
8025
  /* @__PURE__ */ jsxs17("div", { className: getClassName28("history"), children: [
7845
- /* @__PURE__ */ jsx41(
8026
+ /* @__PURE__ */ jsx42(
7846
8027
  IconButton,
7847
8028
  {
7848
8029
  type: "button",
7849
8030
  title: "undo",
7850
8031
  disabled: !hasPast,
7851
8032
  onClick: back,
7852
- children: /* @__PURE__ */ jsx41(Undo2, { size: 21 })
8033
+ children: /* @__PURE__ */ jsx42(Undo2, { size: 21 })
7853
8034
  }
7854
8035
  ),
7855
- /* @__PURE__ */ jsx41(
8036
+ /* @__PURE__ */ jsx42(
7856
8037
  IconButton,
7857
8038
  {
7858
8039
  type: "button",
7859
8040
  title: "redo",
7860
8041
  disabled: !hasFuture,
7861
8042
  onClick: forward,
7862
- children: /* @__PURE__ */ jsx41(Redo2, { size: 21 })
8043
+ children: /* @__PURE__ */ jsx42(Redo2, { size: 21 })
7863
8044
  }
7864
8045
  )
7865
8046
  ] }),
7866
- /* @__PURE__ */ jsx41(Fragment13, { children: renderHeaderActions && renderHeaderActions() })
8047
+ /* @__PURE__ */ jsx42(Fragment14, { children: renderHeaderActions && renderHeaderActions() })
7867
8048
  ] })
7868
8049
  }
7869
8050
  );
@@ -7874,7 +8055,7 @@ init_react_import();
7874
8055
  var styles_module_default24 = { "PuckHeader": "_PuckHeader_1bhmt_1", "PuckHeader-inner": "_PuckHeader-inner_1bhmt_16", "PuckHeader-toggle": "_PuckHeader-toggle_1bhmt_32", "PuckHeader--rightSideBarVisible": "_PuckHeader--rightSideBarVisible_1bhmt_39", "PuckHeader-rightSideBarToggle": "_PuckHeader-rightSideBarToggle_1bhmt_39", "PuckHeader--leftSideBarVisible": "_PuckHeader--leftSideBarVisible_1bhmt_40", "PuckHeader-leftSideBarToggle": "_PuckHeader-leftSideBarToggle_1bhmt_40", "PuckHeader-title": "_PuckHeader-title_1bhmt_56", "PuckHeader-path": "_PuckHeader-path_1bhmt_60", "PuckHeader-tools": "_PuckHeader-tools_1bhmt_67", "PuckHeader-menuButton": "_PuckHeader-menuButton_1bhmt_73", "PuckHeader--menuOpen": "_PuckHeader--menuOpen_1bhmt_78" };
7875
8056
 
7876
8057
  // components/Puck/components/Header/index.tsx
7877
- import { Fragment as Fragment14, jsx as jsx42, jsxs as jsxs18 } from "react/jsx-runtime";
8058
+ import { Fragment as Fragment15, jsx as jsx43, jsxs as jsxs18 } from "react/jsx-runtime";
7878
8059
  var getClassName29 = get_class_name_factory_default("PuckHeader", styles_module_default24);
7879
8060
  var HeaderInner = () => {
7880
8061
  const {
@@ -7896,7 +8077,7 @@ var HeaderInner = () => {
7896
8077
  var _b = _a, { actions } = _b, props = __objRest(_b, ["actions"]);
7897
8078
  const Comp = renderHeader;
7898
8079
  const appState = useAppStore((s) => s.state);
7899
- return /* @__PURE__ */ jsx42(Comp, __spreadProps(__spreadValues({}, props), { dispatch, state: appState, children: actions }));
8080
+ return /* @__PURE__ */ jsx43(Comp, __spreadProps(__spreadValues({}, props), { dispatch, state: appState, children: actions }));
7900
8081
  };
7901
8082
  return RenderHeader;
7902
8083
  }
@@ -7910,7 +8091,7 @@ var HeaderInner = () => {
7910
8091
  const RenderHeader = (props) => {
7911
8092
  const Comp = renderHeaderActions;
7912
8093
  const appState = useAppStore((s) => s.state);
7913
- return /* @__PURE__ */ jsx42(Comp, __spreadProps(__spreadValues({}, props), { dispatch, state: appState }));
8094
+ return /* @__PURE__ */ jsx43(Comp, __spreadProps(__spreadValues({}, props), { dispatch, state: appState }));
7914
8095
  };
7915
8096
  return RenderHeader;
7916
8097
  }
@@ -7932,7 +8113,7 @@ var HeaderInner = () => {
7932
8113
  const rightSideBarVisible = useAppStore(
7933
8114
  (s) => s.state.ui.rightSideBarVisible
7934
8115
  );
7935
- const toggleSidebars = useCallback16(
8116
+ const toggleSidebars = useCallback17(
7936
8117
  (sidebar) => {
7937
8118
  const widerViewport = window.matchMedia("(min-width: 638px)").matches;
7938
8119
  const sideBarVisible = sidebar === "left" ? leftSideBarVisible : rightSideBarVisible;
@@ -7946,27 +8127,27 @@ var HeaderInner = () => {
7946
8127
  },
7947
8128
  [dispatch, leftSideBarVisible, rightSideBarVisible]
7948
8129
  );
7949
- return /* @__PURE__ */ jsx42(
8130
+ return /* @__PURE__ */ jsx43(
7950
8131
  CustomHeader,
7951
8132
  {
7952
- actions: /* @__PURE__ */ jsx42(Fragment14, { children: /* @__PURE__ */ jsx42(CustomHeaderActions, { children: /* @__PURE__ */ jsx42(
8133
+ actions: /* @__PURE__ */ jsx43(Fragment15, { children: /* @__PURE__ */ jsx43(CustomHeaderActions, { children: /* @__PURE__ */ jsx43(
7953
8134
  Button,
7954
8135
  {
7955
8136
  onClick: () => {
7956
8137
  const data = appStore.getState().state.data;
7957
8138
  onPublish && onPublish(data);
7958
8139
  },
7959
- icon: /* @__PURE__ */ jsx42(Globe, { size: "14px" }),
8140
+ icon: /* @__PURE__ */ jsx43(Globe, { size: "14px" }),
7960
8141
  children: "Publish"
7961
8142
  }
7962
8143
  ) }) }),
7963
- children: /* @__PURE__ */ jsx42(
8144
+ children: /* @__PURE__ */ jsx43(
7964
8145
  "header",
7965
8146
  {
7966
8147
  className: getClassName29({ leftSideBarVisible, rightSideBarVisible }),
7967
8148
  children: /* @__PURE__ */ jsxs18("div", { className: getClassName29("inner"), children: [
7968
8149
  /* @__PURE__ */ jsxs18("div", { className: getClassName29("toggle"), children: [
7969
- /* @__PURE__ */ jsx42("div", { className: getClassName29("leftSideBarToggle"), children: /* @__PURE__ */ jsx42(
8150
+ /* @__PURE__ */ jsx43("div", { className: getClassName29("leftSideBarToggle"), children: /* @__PURE__ */ jsx43(
7970
8151
  IconButton,
7971
8152
  {
7972
8153
  type: "button",
@@ -7974,10 +8155,10 @@ var HeaderInner = () => {
7974
8155
  toggleSidebars("left");
7975
8156
  },
7976
8157
  title: "Toggle left sidebar",
7977
- children: /* @__PURE__ */ jsx42(PanelLeft, { focusable: "false" })
8158
+ children: /* @__PURE__ */ jsx43(PanelLeft, { focusable: "false" })
7978
8159
  }
7979
8160
  ) }),
7980
- /* @__PURE__ */ jsx42("div", { className: getClassName29("rightSideBarToggle"), children: /* @__PURE__ */ jsx42(
8161
+ /* @__PURE__ */ jsx43("div", { className: getClassName29("rightSideBarToggle"), children: /* @__PURE__ */ jsx43(
7981
8162
  IconButton,
7982
8163
  {
7983
8164
  type: "button",
@@ -7985,19 +8166,19 @@ var HeaderInner = () => {
7985
8166
  toggleSidebars("right");
7986
8167
  },
7987
8168
  title: "Toggle right sidebar",
7988
- children: /* @__PURE__ */ jsx42(PanelRight, { focusable: "false" })
8169
+ children: /* @__PURE__ */ jsx43(PanelRight, { focusable: "false" })
7989
8170
  }
7990
8171
  ) })
7991
8172
  ] }),
7992
- /* @__PURE__ */ jsx42("div", { className: getClassName29("title"), children: /* @__PURE__ */ jsxs18(Heading, { rank: "2", size: "xs", children: [
8173
+ /* @__PURE__ */ jsx43("div", { className: getClassName29("title"), children: /* @__PURE__ */ jsxs18(Heading, { rank: "2", size: "xs", children: [
7993
8174
  headerTitle || rootTitle || "Page",
7994
- headerPath && /* @__PURE__ */ jsxs18(Fragment14, { children: [
8175
+ headerPath && /* @__PURE__ */ jsxs18(Fragment15, { children: [
7995
8176
  " ",
7996
- /* @__PURE__ */ jsx42("code", { className: getClassName29("path"), children: headerPath })
8177
+ /* @__PURE__ */ jsx43("code", { className: getClassName29("path"), children: headerPath })
7997
8178
  ] })
7998
8179
  ] }) }),
7999
8180
  /* @__PURE__ */ jsxs18("div", { className: getClassName29("tools"), children: [
8000
- /* @__PURE__ */ jsx42("div", { className: getClassName29("menuButton"), children: /* @__PURE__ */ jsx42(
8181
+ /* @__PURE__ */ jsx43("div", { className: getClassName29("menuButton"), children: /* @__PURE__ */ jsx43(
8001
8182
  IconButton,
8002
8183
  {
8003
8184
  type: "button",
@@ -8005,23 +8186,23 @@ var HeaderInner = () => {
8005
8186
  return setMenuOpen(!menuOpen);
8006
8187
  },
8007
8188
  title: "Toggle menu bar",
8008
- children: menuOpen ? /* @__PURE__ */ jsx42(ChevronUp, { focusable: "false" }) : /* @__PURE__ */ jsx42(ChevronDown, { focusable: "false" })
8189
+ children: menuOpen ? /* @__PURE__ */ jsx43(ChevronUp, { focusable: "false" }) : /* @__PURE__ */ jsx43(ChevronDown, { focusable: "false" })
8009
8190
  }
8010
8191
  ) }),
8011
- /* @__PURE__ */ jsx42(
8192
+ /* @__PURE__ */ jsx43(
8012
8193
  MenuBar,
8013
8194
  {
8014
8195
  dispatch,
8015
8196
  onPublish,
8016
8197
  menuOpen,
8017
- renderHeaderActions: () => /* @__PURE__ */ jsx42(CustomHeaderActions, { children: /* @__PURE__ */ jsx42(
8198
+ renderHeaderActions: () => /* @__PURE__ */ jsx43(CustomHeaderActions, { children: /* @__PURE__ */ jsx43(
8018
8199
  Button,
8019
8200
  {
8020
8201
  onClick: () => {
8021
8202
  const data = appStore.getState().state.data;
8022
8203
  onPublish && onPublish(data);
8023
8204
  },
8024
- icon: /* @__PURE__ */ jsx42(Globe, { size: "14px" }),
8205
+ icon: /* @__PURE__ */ jsx43(Globe, { size: "14px" }),
8025
8206
  children: "Publish"
8026
8207
  }
8027
8208
  ) }),
@@ -8035,7 +8216,7 @@ var HeaderInner = () => {
8035
8216
  }
8036
8217
  );
8037
8218
  };
8038
- var Header = memo4(HeaderInner);
8219
+ var Header = memo6(HeaderInner);
8039
8220
 
8040
8221
  // components/SidebarSection/index.tsx
8041
8222
  init_react_import();
@@ -8045,7 +8226,7 @@ init_react_import();
8045
8226
  var styles_module_default25 = { "SidebarSection": "_SidebarSection_8boj8_1", "SidebarSection-title": "_SidebarSection-title_8boj8_12", "SidebarSection--noBorderTop": "_SidebarSection--noBorderTop_8boj8_20", "SidebarSection-content": "_SidebarSection-content_8boj8_24", "SidebarSection--noPadding": "_SidebarSection--noPadding_8boj8_28", "SidebarSection-breadcrumbLabel": "_SidebarSection-breadcrumbLabel_8boj8_41", "SidebarSection-breadcrumbs": "_SidebarSection-breadcrumbs_8boj8_70", "SidebarSection-breadcrumb": "_SidebarSection-breadcrumb_8boj8_41", "SidebarSection-heading": "_SidebarSection-heading_8boj8_82", "SidebarSection-loadingOverlay": "_SidebarSection-loadingOverlay_8boj8_86" };
8046
8227
 
8047
8228
  // components/SidebarSection/index.tsx
8048
- import { jsx as jsx43, jsxs as jsxs19 } from "react/jsx-runtime";
8229
+ import { jsx as jsx44, jsxs as jsxs19 } from "react/jsx-runtime";
8049
8230
  var getClassName30 = get_class_name_factory_default("SidebarSection", styles_module_default25);
8050
8231
  var SidebarSection = ({
8051
8232
  children,
@@ -8062,12 +8243,12 @@ var SidebarSection = ({
8062
8243
  className: getClassName30({ noBorderTop, noPadding }),
8063
8244
  style: { background },
8064
8245
  children: [
8065
- /* @__PURE__ */ jsx43("div", { className: getClassName30("title"), children: /* @__PURE__ */ jsxs19("div", { className: getClassName30("breadcrumbs"), children: [
8066
- showBreadcrumbs && /* @__PURE__ */ jsx43(Breadcrumbs, {}),
8067
- /* @__PURE__ */ jsx43("div", { className: getClassName30("heading"), children: /* @__PURE__ */ jsx43(Heading, { rank: "2", size: "xs", children: title }) })
8246
+ /* @__PURE__ */ jsx44("div", { className: getClassName30("title"), children: /* @__PURE__ */ jsxs19("div", { className: getClassName30("breadcrumbs"), children: [
8247
+ showBreadcrumbs && /* @__PURE__ */ jsx44(Breadcrumbs, {}),
8248
+ /* @__PURE__ */ jsx44("div", { className: getClassName30("heading"), children: /* @__PURE__ */ jsx44(Heading, { rank: "2", size: "xs", children: title }) })
8068
8249
  ] }) }),
8069
- /* @__PURE__ */ jsx43("div", { className: getClassName30("content"), children }),
8070
- isLoading && /* @__PURE__ */ jsx43("div", { className: getClassName30("loadingOverlay"), children: /* @__PURE__ */ jsx43(Loader, { size: 32 }) })
8250
+ /* @__PURE__ */ jsx44("div", { className: getClassName30("content"), children }),
8251
+ isLoading && /* @__PURE__ */ jsx44("div", { className: getClassName30("loadingOverlay"), children: /* @__PURE__ */ jsx44(Loader, { size: 32 }) })
8071
8252
  ]
8072
8253
  }
8073
8254
  );
@@ -8076,7 +8257,7 @@ var SidebarSection = ({
8076
8257
  // components/Puck/components/Canvas/index.tsx
8077
8258
  init_react_import();
8078
8259
  import {
8079
- useCallback as useCallback17,
8260
+ useCallback as useCallback18,
8080
8261
  useEffect as useEffect26,
8081
8262
  useMemo as useMemo19,
8082
8263
  useRef as useRef9,
@@ -8092,12 +8273,12 @@ init_react_import();
8092
8273
  var styles_module_default26 = { "ViewportControls": "_ViewportControls_e3unb_1", "ViewportControls--fullScreen": "_ViewportControls--fullScreen_e3unb_5", "ViewportControls-toggleButton": "_ViewportControls-toggleButton_e3unb_14", "ViewportControls--isExpanded": "_ViewportControls--isExpanded_e3unb_38", "ViewportControls-actions": "_ViewportControls-actions_e3unb_42", "ViewportControls-actionsInner": "_ViewportControls-actionsInner_e3unb_46", "ViewportControls-divider": "_ViewportControls-divider_e3unb_75", "ViewportControls-zoomSelect": "_ViewportControls-zoomSelect_e3unb_81", "ViewportControls-zoom": "_ViewportControls-zoom_e3unb_81", "ViewportButton-inner": "_ViewportButton-inner_e3unb_111", "ViewportButton--isActive": "_ViewportButton--isActive_e3unb_119" };
8093
8274
 
8094
8275
  // components/ViewportControls/index.tsx
8095
- import { jsx as jsx44, jsxs as jsxs20 } from "react/jsx-runtime";
8276
+ import { jsx as jsx45, jsxs as jsxs20 } from "react/jsx-runtime";
8096
8277
  var icons = {
8097
- Smartphone: /* @__PURE__ */ jsx44(Smartphone, { size: 16 }),
8098
- Tablet: /* @__PURE__ */ jsx44(Tablet, { size: 16 }),
8099
- Monitor: /* @__PURE__ */ jsx44(Monitor, { size: 16 }),
8100
- FullWidth: /* @__PURE__ */ jsx44(Expand, { size: 16 })
8278
+ Smartphone: /* @__PURE__ */ jsx45(Smartphone, { size: 16 }),
8279
+ Tablet: /* @__PURE__ */ jsx45(Tablet, { size: 16 }),
8280
+ Monitor: /* @__PURE__ */ jsx45(Monitor, { size: 16 }),
8281
+ FullWidth: /* @__PURE__ */ jsx45(Expand, { size: 16 })
8101
8282
  };
8102
8283
  var getClassName31 = get_class_name_factory_default("ViewportControls", styles_module_default26);
8103
8284
  var getClassNameButton = get_class_name_factory_default("ViewportButton", styles_module_default26);
@@ -8108,7 +8289,7 @@ var ActionButton = ({
8108
8289
  isActive,
8109
8290
  disabled
8110
8291
  }) => {
8111
- return /* @__PURE__ */ jsx44("span", { className: getClassNameButton({ isActive }), suppressHydrationWarning: true, children: /* @__PURE__ */ jsx44(
8292
+ return /* @__PURE__ */ jsx45("span", { className: getClassNameButton({ isActive }), suppressHydrationWarning: true, children: /* @__PURE__ */ jsx45(
8112
8293
  IconButton,
8113
8294
  {
8114
8295
  type: "button",
@@ -8116,7 +8297,7 @@ var ActionButton = ({
8116
8297
  disabled: disabled || isActive,
8117
8298
  onClick,
8118
8299
  suppressHydrationWarning: true,
8119
- children: /* @__PURE__ */ jsx44("span", { className: getClassNameButton("inner"), children })
8300
+ children: /* @__PURE__ */ jsx45("span", { className: getClassNameButton("inner"), children })
8120
8301
  }
8121
8302
  ) });
8122
8303
  };
@@ -8167,8 +8348,8 @@ var ViewportControls = ({
8167
8348
  className: getClassName31({ isExpanded, fullScreen }),
8168
8349
  suppressHydrationWarning: true,
8169
8350
  children: [
8170
- /* @__PURE__ */ jsx44("div", { className: getClassName31("actions"), children: /* @__PURE__ */ jsxs20("div", { className: getClassName31("actionsInner"), children: [
8171
- viewports.map((viewport, i) => /* @__PURE__ */ jsx44(
8351
+ /* @__PURE__ */ jsx45("div", { className: getClassName31("actions"), children: /* @__PURE__ */ jsxs20("div", { className: getClassName31("actionsInner"), children: [
8352
+ viewports.map((viewport, i) => /* @__PURE__ */ jsx45(
8172
8353
  ActionButton,
8173
8354
  {
8174
8355
  title: viewport.label ? `Switch to ${viewport.label} viewport` : "Switch viewport",
@@ -8181,8 +8362,8 @@ var ViewportControls = ({
8181
8362
  },
8182
8363
  i
8183
8364
  )),
8184
- /* @__PURE__ */ jsx44("div", { className: getClassName31("divider") }),
8185
- /* @__PURE__ */ jsx44(
8365
+ /* @__PURE__ */ jsx45("div", { className: getClassName31("divider") }),
8366
+ /* @__PURE__ */ jsx45(
8186
8367
  ActionButton,
8187
8368
  {
8188
8369
  title: "Zoom viewport out",
@@ -8196,10 +8377,10 @@ var ViewportControls = ({
8196
8377
  )].value
8197
8378
  );
8198
8379
  },
8199
- children: /* @__PURE__ */ jsx44(ZoomOut, { size: 16 })
8380
+ children: /* @__PURE__ */ jsx45(ZoomOut, { size: 16 })
8200
8381
  }
8201
8382
  ),
8202
- /* @__PURE__ */ jsx44(
8383
+ /* @__PURE__ */ jsx45(
8203
8384
  ActionButton,
8204
8385
  {
8205
8386
  title: "Zoom viewport in",
@@ -8213,12 +8394,12 @@ var ViewportControls = ({
8213
8394
  )].value
8214
8395
  );
8215
8396
  },
8216
- children: /* @__PURE__ */ jsx44(ZoomIn, { size: 16 })
8397
+ children: /* @__PURE__ */ jsx45(ZoomIn, { size: 16 })
8217
8398
  }
8218
8399
  ),
8219
8400
  /* @__PURE__ */ jsxs20("div", { className: getClassName31("zoom"), children: [
8220
- /* @__PURE__ */ jsx44("div", { className: getClassName31("divider") }),
8221
- /* @__PURE__ */ jsx44(
8401
+ /* @__PURE__ */ jsx45("div", { className: getClassName31("divider") }),
8402
+ /* @__PURE__ */ jsx45(
8222
8403
  "select",
8223
8404
  {
8224
8405
  className: getClassName31("zoomSelect"),
@@ -8229,7 +8410,7 @@ var ViewportControls = ({
8229
8410
  onChange: (e) => {
8230
8411
  onZoom(parseFloat(e.currentTarget.value));
8231
8412
  },
8232
- children: zoomOptions.map((option) => /* @__PURE__ */ jsx44(
8413
+ children: zoomOptions.map((option) => /* @__PURE__ */ jsx45(
8233
8414
  "option",
8234
8415
  {
8235
8416
  value: option.value,
@@ -8241,13 +8422,13 @@ var ViewportControls = ({
8241
8422
  )
8242
8423
  ] })
8243
8424
  ] }) }),
8244
- /* @__PURE__ */ jsx44(
8425
+ /* @__PURE__ */ jsx45(
8245
8426
  "button",
8246
8427
  {
8247
8428
  className: getClassName31("toggleButton"),
8248
8429
  title: "Toggle viewport menu",
8249
8430
  onClick: () => setIsExpanded((s) => !s),
8250
- children: isExpanded ? /* @__PURE__ */ jsx44(X, { size: 16 }) : /* @__PURE__ */ jsx44(Monitor, { size: 16 })
8431
+ children: isExpanded ? /* @__PURE__ */ jsx45(X, { size: 16 }) : /* @__PURE__ */ jsx45(Monitor, { size: 16 })
8251
8432
  }
8252
8433
  )
8253
8434
  ]
@@ -8260,7 +8441,7 @@ init_react_import();
8260
8441
  var styles_module_default27 = { "PuckCanvas": "_PuckCanvas_t6s9b_1", "PuckCanvas-controls": "_PuckCanvas-controls_t6s9b_17", "PuckCanvas--fullScreen": "_PuckCanvas--fullScreen_t6s9b_22", "PuckCanvas-inner": "_PuckCanvas-inner_t6s9b_33", "PuckCanvas-root": "_PuckCanvas-root_t6s9b_42", "PuckCanvas--ready": "_PuckCanvas--ready_t6s9b_67", "PuckCanvas-loader": "_PuckCanvas-loader_t6s9b_72", "PuckCanvas--showLoader": "_PuckCanvas--showLoader_t6s9b_82" };
8261
8442
 
8262
8443
  // components/Puck/components/Canvas/index.tsx
8263
- import { useShallow as useShallow8 } from "zustand/react/shallow";
8444
+ import { useShallow as useShallow9 } from "zustand/react/shallow";
8264
8445
 
8265
8446
  // lib/frame-context.tsx
8266
8447
  init_react_import();
@@ -8270,7 +8451,7 @@ import {
8270
8451
  useRef as useRef8,
8271
8452
  useMemo as useMemo18
8272
8453
  } from "react";
8273
- import { jsx as jsx45 } from "react/jsx-runtime";
8454
+ import { jsx as jsx46 } from "react/jsx-runtime";
8274
8455
  var FrameContext = createContext7(null);
8275
8456
  var FrameProvider = ({
8276
8457
  children
@@ -8282,7 +8463,7 @@ var FrameProvider = ({
8282
8463
  }),
8283
8464
  []
8284
8465
  );
8285
- return /* @__PURE__ */ jsx45(FrameContext.Provider, { value, children });
8466
+ return /* @__PURE__ */ jsx46(FrameContext.Provider, { value, children });
8286
8467
  };
8287
8468
  var useCanvasFrame = () => {
8288
8469
  const context = useContext12(FrameContext);
@@ -8293,7 +8474,7 @@ var useCanvasFrame = () => {
8293
8474
  };
8294
8475
 
8295
8476
  // components/Puck/components/Canvas/index.tsx
8296
- import { Fragment as Fragment15, jsx as jsx46, jsxs as jsxs21 } from "react/jsx-runtime";
8477
+ import { Fragment as Fragment16, jsx as jsx47, jsxs as jsxs21 } from "react/jsx-runtime";
8297
8478
  var getClassName32 = get_class_name_factory_default("PuckCanvas", styles_module_default27);
8298
8479
  var ZOOM_ON_CHANGE = true;
8299
8480
  var TRANSITION_DURATION = 150;
@@ -8310,7 +8491,7 @@ var Canvas = () => {
8310
8491
  status,
8311
8492
  iframe
8312
8493
  } = useAppStore(
8313
- useShallow8((s) => ({
8494
+ useShallow9((s) => ({
8314
8495
  dispatch: s.dispatch,
8315
8496
  overrides: s.overrides,
8316
8497
  setUi: s.setUi,
@@ -8327,7 +8508,7 @@ var Canvas = () => {
8327
8508
  rightSideBarWidth,
8328
8509
  viewports
8329
8510
  } = useAppStore(
8330
- useShallow8((s) => ({
8511
+ useShallow9((s) => ({
8331
8512
  leftSideBarVisible: s.state.ui.leftSideBarVisible,
8332
8513
  rightSideBarVisible: s.state.ui.rightSideBarVisible,
8333
8514
  leftSideBarWidth: s.state.ui.leftSideBarWidth,
@@ -8338,14 +8519,14 @@ var Canvas = () => {
8338
8519
  const [showTransition, setShowTransition] = useState23(false);
8339
8520
  const isResizingRef = useRef9(false);
8340
8521
  const defaultRender = useMemo19(() => {
8341
- const PuckDefault = ({ children }) => /* @__PURE__ */ jsx46(Fragment15, { children });
8522
+ const PuckDefault = ({ children }) => /* @__PURE__ */ jsx47(Fragment16, { children });
8342
8523
  return PuckDefault;
8343
8524
  }, []);
8344
8525
  const CustomPreview = useMemo19(
8345
8526
  () => overrides.preview || defaultRender,
8346
8527
  [overrides]
8347
8528
  );
8348
- const getFrameDimensions = useCallback17(() => {
8529
+ const getFrameDimensions = useCallback18(() => {
8349
8530
  if (frameRef.current) {
8350
8531
  const frame = frameRef.current;
8351
8532
  const box = getBox(frame);
@@ -8413,7 +8594,7 @@ var Canvas = () => {
8413
8594
  }
8414
8595
  },
8415
8596
  children: [
8416
- viewports.controlsVisible && iframe.enabled && /* @__PURE__ */ jsx46("div", { className: getClassName32("controls"), children: /* @__PURE__ */ jsx46(
8597
+ viewports.controlsVisible && iframe.enabled && /* @__PURE__ */ jsx47("div", { className: getClassName32("controls"), children: /* @__PURE__ */ jsx47(
8417
8598
  ViewportControls,
8418
8599
  {
8419
8600
  fullScreen: _experimentalFullScreenCanvas,
@@ -8444,7 +8625,7 @@ var Canvas = () => {
8444
8625
  }
8445
8626
  ) }),
8446
8627
  /* @__PURE__ */ jsxs21("div", { className: getClassName32("inner"), ref: frameRef, children: [
8447
- /* @__PURE__ */ jsx46(
8628
+ /* @__PURE__ */ jsx47(
8448
8629
  "div",
8449
8630
  {
8450
8631
  className: getClassName32("root"),
@@ -8461,10 +8642,10 @@ var Canvas = () => {
8461
8642
  setShowTransition(false);
8462
8643
  isResizingRef.current = false;
8463
8644
  },
8464
- children: /* @__PURE__ */ jsx46(CustomPreview, { children: /* @__PURE__ */ jsx46(Preview2, {}) })
8645
+ children: /* @__PURE__ */ jsx47(CustomPreview, { children: /* @__PURE__ */ jsx47(Preview2, {}) })
8465
8646
  }
8466
8647
  ),
8467
- /* @__PURE__ */ jsx46("div", { className: getClassName32("loader"), children: /* @__PURE__ */ jsx46(Loader, { size: 24 }) })
8648
+ /* @__PURE__ */ jsx47("div", { className: getClassName32("loader"), children: /* @__PURE__ */ jsx47(Loader, { size: 24 }) })
8468
8649
  ] })
8469
8650
  ]
8470
8651
  }
@@ -8473,7 +8654,7 @@ var Canvas = () => {
8473
8654
 
8474
8655
  // lib/use-sidebar-resize.ts
8475
8656
  init_react_import();
8476
- import { useCallback as useCallback18, useEffect as useEffect27, useRef as useRef10, useState as useState24 } from "react";
8657
+ import { useCallback as useCallback19, useEffect as useEffect27, useRef as useRef10, useState as useState24 } from "react";
8477
8658
  function useSidebarResize(position, dispatch) {
8478
8659
  const [width, setWidth] = useState24(null);
8479
8660
  const sidebarRef = useRef10(null);
@@ -8510,7 +8691,7 @@ function useSidebarResize(position, dispatch) {
8510
8691
  setWidth(storeWidth);
8511
8692
  }
8512
8693
  }, [storeWidth]);
8513
- const handleResizeEnd = useCallback18(
8694
+ const handleResizeEnd = useCallback19(
8514
8695
  (width2) => {
8515
8696
  dispatch({
8516
8697
  type: "setUi",
@@ -8557,14 +8738,14 @@ init_react_import();
8557
8738
 
8558
8739
  // components/Puck/components/ResizeHandle/index.tsx
8559
8740
  init_react_import();
8560
- import { useCallback as useCallback19, useRef as useRef11 } from "react";
8741
+ import { useCallback as useCallback20, useRef as useRef11 } from "react";
8561
8742
 
8562
8743
  // css-module:/home/runner/work/puck/puck/packages/core/components/Puck/components/ResizeHandle/styles.module.css#css-module
8563
8744
  init_react_import();
8564
8745
  var styles_module_default28 = { "ResizeHandle": "_ResizeHandle_144bf_2", "ResizeHandle--left": "_ResizeHandle--left_144bf_16", "ResizeHandle--right": "_ResizeHandle--right_144bf_20" };
8565
8746
 
8566
8747
  // components/Puck/components/ResizeHandle/index.tsx
8567
- import { jsx as jsx47 } from "react/jsx-runtime";
8748
+ import { jsx as jsx48 } from "react/jsx-runtime";
8568
8749
  var getClassName33 = get_class_name_factory_default("ResizeHandle", styles_module_default28);
8569
8750
  var ResizeHandle = ({
8570
8751
  position,
@@ -8578,7 +8759,7 @@ var ResizeHandle = ({
8578
8759
  const isDragging = useRef11(false);
8579
8760
  const startX = useRef11(0);
8580
8761
  const startWidth = useRef11(0);
8581
- const handleMouseMove = useCallback19(
8762
+ const handleMouseMove = useCallback20(
8582
8763
  (e) => {
8583
8764
  if (!isDragging.current) return;
8584
8765
  const delta = e.clientX - startX.current;
@@ -8589,7 +8770,7 @@ var ResizeHandle = ({
8589
8770
  },
8590
8771
  [onResize, position]
8591
8772
  );
8592
- const handleMouseUp = useCallback19(() => {
8773
+ const handleMouseUp = useCallback20(() => {
8593
8774
  var _a;
8594
8775
  if (!isDragging.current) return;
8595
8776
  isDragging.current = false;
@@ -8605,7 +8786,7 @@ var ResizeHandle = ({
8605
8786
  onResizeEnd(finalWidth);
8606
8787
  resetAutoZoom();
8607
8788
  }, [onResizeEnd]);
8608
- const handleMouseDown = useCallback19(
8789
+ const handleMouseDown = useCallback20(
8609
8790
  (e) => {
8610
8791
  var _a;
8611
8792
  isDragging.current = true;
@@ -8623,7 +8804,7 @@ var ResizeHandle = ({
8623
8804
  },
8624
8805
  [position, handleMouseMove, handleMouseUp]
8625
8806
  );
8626
- return /* @__PURE__ */ jsx47(
8807
+ return /* @__PURE__ */ jsx48(
8627
8808
  "div",
8628
8809
  {
8629
8810
  ref: handleRef,
@@ -8638,7 +8819,7 @@ init_react_import();
8638
8819
  var styles_module_default29 = { "Sidebar": "_Sidebar_o396p_1", "Sidebar--isVisible": "_Sidebar--isVisible_o396p_9", "Sidebar--left": "_Sidebar--left_o396p_13", "Sidebar--right": "_Sidebar--right_o396p_25", "Sidebar-resizeHandle": "_Sidebar-resizeHandle_o396p_37" };
8639
8820
 
8640
8821
  // components/Puck/components/Sidebar/index.tsx
8641
- import { Fragment as Fragment16, jsx as jsx48, jsxs as jsxs22 } from "react/jsx-runtime";
8822
+ import { Fragment as Fragment17, jsx as jsx49, jsxs as jsxs22 } from "react/jsx-runtime";
8642
8823
  var getClassName34 = get_class_name_factory_default("Sidebar", styles_module_default29);
8643
8824
  var Sidebar = ({
8644
8825
  position,
@@ -8648,8 +8829,8 @@ var Sidebar = ({
8648
8829
  onResizeEnd,
8649
8830
  children
8650
8831
  }) => {
8651
- return /* @__PURE__ */ jsxs22(Fragment16, { children: [
8652
- /* @__PURE__ */ jsx48(
8832
+ return /* @__PURE__ */ jsxs22(Fragment17, { children: [
8833
+ /* @__PURE__ */ jsx49(
8653
8834
  "div",
8654
8835
  {
8655
8836
  ref: sidebarRef,
@@ -8657,7 +8838,7 @@ var Sidebar = ({
8657
8838
  children
8658
8839
  }
8659
8840
  ),
8660
- /* @__PURE__ */ jsx48("div", { className: `${getClassName34("resizeHandle")}`, children: /* @__PURE__ */ jsx48(
8841
+ /* @__PURE__ */ jsx49("div", { className: `${getClassName34("resizeHandle")}`, children: /* @__PURE__ */ jsx49(
8661
8842
  ResizeHandle,
8662
8843
  {
8663
8844
  position,
@@ -8671,7 +8852,7 @@ var Sidebar = ({
8671
8852
 
8672
8853
  // lib/use-delete-hotkeys.ts
8673
8854
  init_react_import();
8674
- import { useCallback as useCallback20 } from "react";
8855
+ import { useCallback as useCallback21 } from "react";
8675
8856
  var isElementVisible = (element) => {
8676
8857
  let current = element;
8677
8858
  while (current && current !== document.body) {
@@ -8706,7 +8887,7 @@ var shouldBlockDeleteHotkey = (e) => {
8706
8887
  };
8707
8888
  var useDeleteHotkeys = () => {
8708
8889
  const appStore = useAppStoreApi();
8709
- const deleteSelectedComponent = useCallback20(
8890
+ const deleteSelectedComponent = useCallback21(
8710
8891
  (e) => {
8711
8892
  var _a;
8712
8893
  if (shouldBlockDeleteHotkey(e)) {
@@ -8738,7 +8919,7 @@ init_react_import();
8738
8919
  var styles_module_default30 = { "Nav": "_Nav_3nnxc_1", "Nav-list": "_Nav-list_3nnxc_5", "Nav-mobileActions": "_Nav-mobileActions_3nnxc_23", "NavItem-link": "_NavItem-link_3nnxc_38", "NavItem": "_NavItem_3nnxc_38", "NavItem-linkIcon": "_NavItem-linkIcon_3nnxc_88", "NavItem--active": "_NavItem--active_3nnxc_93", "NavItem--mobileOnly": "_NavItem--mobileOnly_3nnxc_120" };
8739
8920
 
8740
8921
  // components/Puck/components/Nav/index.tsx
8741
- import { jsx as jsx49, jsxs as jsxs23 } from "react/jsx-runtime";
8922
+ import { jsx as jsx50, jsxs as jsxs23 } from "react/jsx-runtime";
8742
8923
  var getClassName35 = get_class_name_factory_default("Nav", styles_module_default30);
8743
8924
  var getClassNameItem3 = get_class_name_factory_default("NavItem", styles_module_default30);
8744
8925
  var MenuItem = ({
@@ -8748,9 +8929,9 @@ var MenuItem = ({
8748
8929
  isActive,
8749
8930
  mobileOnly
8750
8931
  }) => {
8751
- return /* @__PURE__ */ jsx49("li", { className: getClassNameItem3({ active: isActive, mobileOnly }), children: onClick && /* @__PURE__ */ jsxs23("div", { className: getClassNameItem3("link"), onClick, children: [
8752
- icon && /* @__PURE__ */ jsx49("span", { className: getClassNameItem3("linkIcon"), children: icon }),
8753
- /* @__PURE__ */ jsx49("span", { className: getClassNameItem3("linkLabel"), children: label })
8932
+ return /* @__PURE__ */ jsx50("li", { className: getClassNameItem3({ active: isActive, mobileOnly }), children: onClick && /* @__PURE__ */ jsxs23("div", { className: getClassNameItem3("link"), onClick, children: [
8933
+ icon && /* @__PURE__ */ jsx50("span", { className: getClassNameItem3("linkIcon"), children: icon }),
8934
+ /* @__PURE__ */ jsx50("span", { className: getClassNameItem3("linkLabel"), children: label })
8754
8935
  ] }) });
8755
8936
  };
8756
8937
  var Nav = ({
@@ -8758,13 +8939,13 @@ var Nav = ({
8758
8939
  mobileActions
8759
8940
  }) => {
8760
8941
  return /* @__PURE__ */ jsxs23("nav", { className: getClassName35(), children: [
8761
- /* @__PURE__ */ jsx49("ul", { className: getClassName35("list"), children: Object.entries(items).map(([key, item]) => /* @__PURE__ */ jsx49(MenuItem, __spreadValues({}, item), key)) }),
8762
- mobileActions && /* @__PURE__ */ jsx49("div", { className: getClassName35("mobileActions"), children: mobileActions })
8942
+ /* @__PURE__ */ jsx50("ul", { className: getClassName35("list"), children: Object.entries(items).map(([key, item]) => /* @__PURE__ */ jsx50(MenuItem, __spreadValues({}, item), key)) }),
8943
+ mobileActions && /* @__PURE__ */ jsx50("div", { className: getClassName35("mobileActions"), children: mobileActions })
8763
8944
  ] });
8764
8945
  };
8765
8946
 
8766
8947
  // components/Puck/components/Layout/index.tsx
8767
- import { jsx as jsx50, jsxs as jsxs24 } from "react/jsx-runtime";
8948
+ import { jsx as jsx51, jsxs as jsxs24 } from "react/jsx-runtime";
8768
8949
  var getClassName36 = get_class_name_factory_default("Puck", styles_module_default22);
8769
8950
  var getLayoutClassName = get_class_name_factory_default("PuckLayout", styles_module_default22);
8770
8951
  var getPluginTabClassName = get_class_name_factory_default("PuckPluginTab", styles_module_default22);
@@ -8775,14 +8956,14 @@ var FieldSideBar = () => {
8775
8956
  return s.selectedItem ? (_b = (_a = s.config.components[s.selectedItem.type]) == null ? void 0 : _a["label"]) != null ? _b : s.selectedItem.type.toString() : "Page";
8776
8957
  }
8777
8958
  );
8778
- return /* @__PURE__ */ jsx50(SidebarSection, { noPadding: true, noBorderTop: true, showBreadcrumbs: true, title, children: /* @__PURE__ */ jsx50(Fields, {}) });
8959
+ return /* @__PURE__ */ jsx51(SidebarSection, { noPadding: true, noBorderTop: true, showBreadcrumbs: true, title, children: /* @__PURE__ */ jsx51(Fields, {}) });
8779
8960
  };
8780
8961
  var PluginTab = ({
8781
8962
  children,
8782
8963
  visible,
8783
8964
  mobileOnly
8784
8965
  }) => {
8785
- return /* @__PURE__ */ jsx50("div", { className: getPluginTabClassName({ visible, mobileOnly }), children: /* @__PURE__ */ jsx50("div", { className: getPluginTabClassName("body"), children }) });
8966
+ return /* @__PURE__ */ jsx51("div", { className: getPluginTabClassName({ visible, mobileOnly }), children: /* @__PURE__ */ jsx51("div", { className: getPluginTabClassName("body"), children }) });
8786
8967
  };
8787
8968
  var Layout = ({ children }) => {
8788
8969
  const {
@@ -8790,7 +8971,7 @@ var Layout = ({ children }) => {
8790
8971
  dnd,
8791
8972
  initialHistory: _initialHistory,
8792
8973
  plugins,
8793
- height = "100dvh"
8974
+ height
8794
8975
  } = usePropsContext();
8795
8976
  const iframe = useMemo20(
8796
8977
  () => __spreadValues({
@@ -8894,7 +9075,7 @@ var Layout = ({ children }) => {
8894
9075
  }
8895
9076
  details[plugin.name] = {
8896
9077
  label: (_a = plugin.label) != null ? _a : plugin.name,
8897
- icon: (_b = plugin.icon) != null ? _b : /* @__PURE__ */ jsx50(ToyBrick, {}),
9078
+ icon: (_b = plugin.icon) != null ? _b : /* @__PURE__ */ jsx51(ToyBrick, {}),
8898
9079
  onClick: () => {
8899
9080
  var _a2;
8900
9081
  setMobilePanelHeightMode((_a2 = plugin.mobilePanelHeight) != null ? _a2 : "toggle");
@@ -8934,99 +9115,92 @@ var Layout = ({ children }) => {
8934
9115
  return (_a = s.state.ui.mobilePanelExpanded) != null ? _a : false;
8935
9116
  }
8936
9117
  );
8937
- return /* @__PURE__ */ jsxs24(
8938
- "div",
8939
- {
8940
- className: `Puck ${getClassName36()}`,
8941
- style: { height },
8942
- id: instanceId,
8943
- children: [
8944
- /* @__PURE__ */ jsx50(DragDropContext, { disableAutoScroll: dnd == null ? void 0 : dnd.disableAutoScroll, children: /* @__PURE__ */ jsx50(CustomPuck, { children: children || /* @__PURE__ */ jsx50(FrameProvider, { children: /* @__PURE__ */ jsx50(
9118
+ return /* @__PURE__ */ jsxs24("div", { className: `Puck ${getClassName36()}`, id: instanceId, children: [
9119
+ /* @__PURE__ */ jsx51(DragDropContext, { disableAutoScroll: dnd == null ? void 0 : dnd.disableAutoScroll, children: /* @__PURE__ */ jsx51(CustomPuck, { children: children || /* @__PURE__ */ jsx51(FrameProvider, { children: /* @__PURE__ */ jsx51(
9120
+ "div",
9121
+ {
9122
+ className: getLayoutClassName({
9123
+ leftSideBarVisible,
9124
+ mounted,
9125
+ rightSideBarVisible: !hasDesktopFieldsPlugin && rightSideBarVisible,
9126
+ isExpanded: mobilePanelExpanded,
9127
+ mobilePanelHeightToggle: mobilePanelHeightMode === "toggle",
9128
+ mobilePanelHeightMinContent: mobilePanelHeightMode === "min-content"
9129
+ }),
9130
+ style: { height },
9131
+ children: /* @__PURE__ */ jsxs24(
8945
9132
  "div",
8946
9133
  {
8947
- className: getLayoutClassName({
8948
- leftSideBarVisible,
8949
- mounted,
8950
- rightSideBarVisible: !hasDesktopFieldsPlugin && rightSideBarVisible,
8951
- isExpanded: mobilePanelExpanded,
8952
- mobilePanelHeightToggle: mobilePanelHeightMode === "toggle",
8953
- mobilePanelHeightMinContent: mobilePanelHeightMode === "min-content"
8954
- }),
8955
- children: /* @__PURE__ */ jsxs24(
8956
- "div",
8957
- {
8958
- className: getLayoutClassName("inner"),
8959
- style: layoutOptions,
8960
- children: [
8961
- /* @__PURE__ */ jsx50("div", { className: getLayoutClassName("header"), children: /* @__PURE__ */ jsx50(Header, {}) }),
8962
- /* @__PURE__ */ jsx50("div", { className: getLayoutClassName("nav"), children: /* @__PURE__ */ jsx50(
8963
- Nav,
8964
- {
8965
- items: pluginItems,
8966
- mobileActions: leftSideBarVisible && mobilePanelHeightMode === "toggle" && /* @__PURE__ */ jsx50(
8967
- IconButton,
8968
- {
8969
- type: "button",
8970
- title: "maximize",
8971
- onClick: () => {
8972
- setUi({
8973
- mobilePanelExpanded: !mobilePanelExpanded
8974
- });
8975
- },
8976
- children: mobilePanelExpanded ? /* @__PURE__ */ jsx50(Minimize2, { size: 21 }) : /* @__PURE__ */ jsx50(Maximize2, { size: 21 })
8977
- }
8978
- )
8979
- }
8980
- ) }),
8981
- /* @__PURE__ */ jsx50(
8982
- Sidebar,
8983
- {
8984
- position: "left",
8985
- sidebarRef: leftSidebarRef,
8986
- isVisible: leftSideBarVisible,
8987
- onResize: setLeftWidth,
8988
- onResizeEnd: handleLeftSidebarResizeEnd,
8989
- children: Object.entries(pluginItems).map(
8990
- ([id, { mobileOnly, render: Render2, label }]) => /* @__PURE__ */ jsx50(
8991
- PluginTab,
8992
- {
8993
- visible: currentPlugin === id,
8994
- mobileOnly,
8995
- children: /* @__PURE__ */ jsx50(Render2, {})
8996
- },
8997
- id
8998
- )
8999
- )
9000
- }
9001
- ),
9002
- /* @__PURE__ */ jsx50(Canvas, {}),
9003
- !hasDesktopFieldsPlugin && /* @__PURE__ */ jsx50(
9004
- Sidebar,
9134
+ className: getLayoutClassName("inner"),
9135
+ style: layoutOptions,
9136
+ children: [
9137
+ /* @__PURE__ */ jsx51("div", { className: getLayoutClassName("header"), children: /* @__PURE__ */ jsx51(Header, {}) }),
9138
+ /* @__PURE__ */ jsx51("div", { className: getLayoutClassName("nav"), children: /* @__PURE__ */ jsx51(
9139
+ Nav,
9140
+ {
9141
+ items: pluginItems,
9142
+ mobileActions: leftSideBarVisible && mobilePanelHeightMode === "toggle" && /* @__PURE__ */ jsx51(
9143
+ IconButton,
9005
9144
  {
9006
- position: "right",
9007
- sidebarRef: rightSidebarRef,
9008
- isVisible: rightSideBarVisible,
9009
- onResize: setRightWidth,
9010
- onResizeEnd: handleRightSidebarResizeEnd,
9011
- children: /* @__PURE__ */ jsx50(FieldSideBar, {})
9145
+ type: "button",
9146
+ title: "maximize",
9147
+ onClick: () => {
9148
+ setUi({
9149
+ mobilePanelExpanded: !mobilePanelExpanded
9150
+ });
9151
+ },
9152
+ children: mobilePanelExpanded ? /* @__PURE__ */ jsx51(Minimize2, { size: 21 }) : /* @__PURE__ */ jsx51(Maximize2, { size: 21 })
9012
9153
  }
9013
9154
  )
9014
- ]
9015
- }
9016
- )
9155
+ }
9156
+ ) }),
9157
+ /* @__PURE__ */ jsx51(
9158
+ Sidebar,
9159
+ {
9160
+ position: "left",
9161
+ sidebarRef: leftSidebarRef,
9162
+ isVisible: leftSideBarVisible,
9163
+ onResize: setLeftWidth,
9164
+ onResizeEnd: handleLeftSidebarResizeEnd,
9165
+ children: Object.entries(pluginItems).map(
9166
+ ([id, { mobileOnly, render: Render2, label }]) => /* @__PURE__ */ jsx51(
9167
+ PluginTab,
9168
+ {
9169
+ visible: currentPlugin === id,
9170
+ mobileOnly,
9171
+ children: /* @__PURE__ */ jsx51(Render2, {})
9172
+ },
9173
+ id
9174
+ )
9175
+ )
9176
+ }
9177
+ ),
9178
+ /* @__PURE__ */ jsx51(Canvas, {}),
9179
+ !hasDesktopFieldsPlugin && /* @__PURE__ */ jsx51(
9180
+ Sidebar,
9181
+ {
9182
+ position: "right",
9183
+ sidebarRef: rightSidebarRef,
9184
+ isVisible: rightSideBarVisible,
9185
+ onResize: setRightWidth,
9186
+ onResizeEnd: handleRightSidebarResizeEnd,
9187
+ children: /* @__PURE__ */ jsx51(FieldSideBar, {})
9188
+ }
9189
+ )
9190
+ ]
9017
9191
  }
9018
- ) }) }) }),
9019
- /* @__PURE__ */ jsx50("div", { id: "puck-portal-root", className: getClassName36("portal") })
9020
- ]
9021
- }
9022
- );
9192
+ )
9193
+ }
9194
+ ) }) }) }),
9195
+ /* @__PURE__ */ jsx51("div", { id: "puck-portal-root", className: getClassName36("portal") })
9196
+ ] });
9023
9197
  };
9024
9198
 
9025
9199
  // components/Puck/index.tsx
9026
- import { jsx as jsx51 } from "react/jsx-runtime";
9200
+ import { jsx as jsx52 } from "react/jsx-runtime";
9027
9201
  var propsContext = createContext8({});
9028
9202
  function PropsProvider(props) {
9029
- return /* @__PURE__ */ jsx51(propsContext.Provider, { value: props, children: props.children });
9203
+ return /* @__PURE__ */ jsx52(propsContext.Provider, { value: props, children: props.children });
9030
9204
  }
9031
9205
  var usePropsContext = () => useContext13(propsContext);
9032
9206
  function PuckProvider({ children }) {
@@ -9155,7 +9329,7 @@ function PuckProvider({ children }) {
9155
9329
  return __spreadValues(__spreadValues({}, pluginFieldTransforms), fieldTransforms);
9156
9330
  }, [fieldTransforms, plugins]);
9157
9331
  const instanceId = useSafeId();
9158
- const generateAppStore = useCallback21(
9332
+ const generateAppStore = useCallback22(
9159
9333
  (state) => {
9160
9334
  return {
9161
9335
  instanceId,
@@ -9206,7 +9380,7 @@ function PuckProvider({ children }) {
9206
9380
  (s) => s.state.data,
9207
9381
  (data) => {
9208
9382
  if (onChange) {
9209
- if ((0, import_fast_deep_equal.default)(data, previousData.current)) return;
9383
+ if ((0, import_fast_deep_equal2.default)(data, previousData.current)) return;
9210
9384
  onChange(data);
9211
9385
  previousData.current = data;
9212
9386
  }
@@ -9219,10 +9393,10 @@ function PuckProvider({ children }) {
9219
9393
  const { resolveAndCommitData } = appStore.getState();
9220
9394
  resolveAndCommitData();
9221
9395
  }, []);
9222
- return /* @__PURE__ */ jsx51(appStoreContext.Provider, { value: appStore, children: /* @__PURE__ */ jsx51(UsePuckStoreContext.Provider, { value: uPuckStore, children }) });
9396
+ return /* @__PURE__ */ jsx52(appStoreContext.Provider, { value: appStore, children: /* @__PURE__ */ jsx52(UsePuckStoreContext.Provider, { value: uPuckStore, children }) });
9223
9397
  }
9224
9398
  function Puck(props) {
9225
- return /* @__PURE__ */ jsx51(PropsProvider, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx51(PuckProvider, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx51(Layout, { children: props.children }) })) }));
9399
+ return /* @__PURE__ */ jsx52(PropsProvider, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx52(PuckProvider, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx52(Layout, { children: props.children }) })) }));
9226
9400
  }
9227
9401
  Puck.Components = Components;
9228
9402
  Puck.Fields = Fields;
@@ -9299,325 +9473,45 @@ classnames/index.js:
9299
9473
  *)
9300
9474
 
9301
9475
  lucide-react/dist/esm/shared/src/utils.js:
9302
- (**
9303
- * @license lucide-react v0.468.0 - ISC
9304
- *
9305
- * This source code is licensed under the ISC license.
9306
- * See the LICENSE file in the root directory of this source tree.
9307
- *)
9308
-
9309
9476
  lucide-react/dist/esm/defaultAttributes.js:
9310
- (**
9311
- * @license lucide-react v0.468.0 - ISC
9312
- *
9313
- * This source code is licensed under the ISC license.
9314
- * See the LICENSE file in the root directory of this source tree.
9315
- *)
9316
-
9317
9477
  lucide-react/dist/esm/Icon.js:
9318
- (**
9319
- * @license lucide-react v0.468.0 - ISC
9320
- *
9321
- * This source code is licensed under the ISC license.
9322
- * See the LICENSE file in the root directory of this source tree.
9323
- *)
9324
-
9325
9478
  lucide-react/dist/esm/createLucideIcon.js:
9326
- (**
9327
- * @license lucide-react v0.468.0 - ISC
9328
- *
9329
- * This source code is licensed under the ISC license.
9330
- * See the LICENSE file in the root directory of this source tree.
9331
- *)
9332
-
9333
9479
  lucide-react/dist/esm/icons/chevron-down.js:
9334
- (**
9335
- * @license lucide-react v0.468.0 - ISC
9336
- *
9337
- * This source code is licensed under the ISC license.
9338
- * See the LICENSE file in the root directory of this source tree.
9339
- *)
9340
-
9341
9480
  lucide-react/dist/esm/icons/chevron-right.js:
9342
- (**
9343
- * @license lucide-react v0.468.0 - ISC
9344
- *
9345
- * This source code is licensed under the ISC license.
9346
- * See the LICENSE file in the root directory of this source tree.
9347
- *)
9348
-
9349
9481
  lucide-react/dist/esm/icons/chevron-up.js:
9350
- (**
9351
- * @license lucide-react v0.468.0 - ISC
9352
- *
9353
- * This source code is licensed under the ISC license.
9354
- * See the LICENSE file in the root directory of this source tree.
9355
- *)
9356
-
9357
9482
  lucide-react/dist/esm/icons/circle-check-big.js:
9358
- (**
9359
- * @license lucide-react v0.468.0 - ISC
9360
- *
9361
- * This source code is licensed under the ISC license.
9362
- * See the LICENSE file in the root directory of this source tree.
9363
- *)
9364
-
9365
9483
  lucide-react/dist/esm/icons/copy.js:
9366
- (**
9367
- * @license lucide-react v0.468.0 - ISC
9368
- *
9369
- * This source code is licensed under the ISC license.
9370
- * See the LICENSE file in the root directory of this source tree.
9371
- *)
9372
-
9373
9484
  lucide-react/dist/esm/icons/corner-left-up.js:
9374
- (**
9375
- * @license lucide-react v0.468.0 - ISC
9376
- *
9377
- * This source code is licensed under the ISC license.
9378
- * See the LICENSE file in the root directory of this source tree.
9379
- *)
9380
-
9381
9485
  lucide-react/dist/esm/icons/ellipsis-vertical.js:
9382
- (**
9383
- * @license lucide-react v0.468.0 - ISC
9384
- *
9385
- * This source code is licensed under the ISC license.
9386
- * See the LICENSE file in the root directory of this source tree.
9387
- *)
9388
-
9389
9486
  lucide-react/dist/esm/icons/expand.js:
9390
- (**
9391
- * @license lucide-react v0.468.0 - ISC
9392
- *
9393
- * This source code is licensed under the ISC license.
9394
- * See the LICENSE file in the root directory of this source tree.
9395
- *)
9396
-
9397
9487
  lucide-react/dist/esm/icons/globe.js:
9398
- (**
9399
- * @license lucide-react v0.468.0 - ISC
9400
- *
9401
- * This source code is licensed under the ISC license.
9402
- * See the LICENSE file in the root directory of this source tree.
9403
- *)
9404
-
9405
9488
  lucide-react/dist/esm/icons/hammer.js:
9406
- (**
9407
- * @license lucide-react v0.468.0 - ISC
9408
- *
9409
- * This source code is licensed under the ISC license.
9410
- * See the LICENSE file in the root directory of this source tree.
9411
- *)
9412
-
9413
9489
  lucide-react/dist/esm/icons/hash.js:
9414
- (**
9415
- * @license lucide-react v0.468.0 - ISC
9416
- *
9417
- * This source code is licensed under the ISC license.
9418
- * See the LICENSE file in the root directory of this source tree.
9419
- *)
9420
-
9421
9490
  lucide-react/dist/esm/icons/layers.js:
9422
- (**
9423
- * @license lucide-react v0.468.0 - ISC
9424
- *
9425
- * This source code is licensed under the ISC license.
9426
- * See the LICENSE file in the root directory of this source tree.
9427
- *)
9428
-
9429
9491
  lucide-react/dist/esm/icons/layout-grid.js:
9430
- (**
9431
- * @license lucide-react v0.468.0 - ISC
9432
- *
9433
- * This source code is licensed under the ISC license.
9434
- * See the LICENSE file in the root directory of this source tree.
9435
- *)
9436
-
9437
9492
  lucide-react/dist/esm/icons/link.js:
9438
- (**
9439
- * @license lucide-react v0.468.0 - ISC
9440
- *
9441
- * This source code is licensed under the ISC license.
9442
- * See the LICENSE file in the root directory of this source tree.
9443
- *)
9444
-
9445
9493
  lucide-react/dist/esm/icons/list.js:
9446
- (**
9447
- * @license lucide-react v0.468.0 - ISC
9448
- *
9449
- * This source code is licensed under the ISC license.
9450
- * See the LICENSE file in the root directory of this source tree.
9451
- *)
9452
-
9453
9494
  lucide-react/dist/esm/icons/lock-open.js:
9454
- (**
9455
- * @license lucide-react v0.468.0 - ISC
9456
- *
9457
- * This source code is licensed under the ISC license.
9458
- * See the LICENSE file in the root directory of this source tree.
9459
- *)
9460
-
9461
9495
  lucide-react/dist/esm/icons/lock.js:
9462
- (**
9463
- * @license lucide-react v0.468.0 - ISC
9464
- *
9465
- * This source code is licensed under the ISC license.
9466
- * See the LICENSE file in the root directory of this source tree.
9467
- *)
9468
-
9469
9496
  lucide-react/dist/esm/icons/maximize-2.js:
9470
- (**
9471
- * @license lucide-react v0.468.0 - ISC
9472
- *
9473
- * This source code is licensed under the ISC license.
9474
- * See the LICENSE file in the root directory of this source tree.
9475
- *)
9476
-
9477
9497
  lucide-react/dist/esm/icons/minimize-2.js:
9478
- (**
9479
- * @license lucide-react v0.468.0 - ISC
9480
- *
9481
- * This source code is licensed under the ISC license.
9482
- * See the LICENSE file in the root directory of this source tree.
9483
- *)
9484
-
9485
9498
  lucide-react/dist/esm/icons/monitor.js:
9486
- (**
9487
- * @license lucide-react v0.468.0 - ISC
9488
- *
9489
- * This source code is licensed under the ISC license.
9490
- * See the LICENSE file in the root directory of this source tree.
9491
- *)
9492
-
9493
9499
  lucide-react/dist/esm/icons/panel-left.js:
9494
- (**
9495
- * @license lucide-react v0.468.0 - ISC
9496
- *
9497
- * This source code is licensed under the ISC license.
9498
- * See the LICENSE file in the root directory of this source tree.
9499
- *)
9500
-
9501
9500
  lucide-react/dist/esm/icons/panel-right.js:
9502
- (**
9503
- * @license lucide-react v0.468.0 - ISC
9504
- *
9505
- * This source code is licensed under the ISC license.
9506
- * See the LICENSE file in the root directory of this source tree.
9507
- *)
9508
-
9509
9501
  lucide-react/dist/esm/icons/plus.js:
9510
- (**
9511
- * @license lucide-react v0.468.0 - ISC
9512
- *
9513
- * This source code is licensed under the ISC license.
9514
- * See the LICENSE file in the root directory of this source tree.
9515
- *)
9516
-
9517
9502
  lucide-react/dist/esm/icons/rectangle-ellipsis.js:
9518
- (**
9519
- * @license lucide-react v0.468.0 - ISC
9520
- *
9521
- * This source code is licensed under the ISC license.
9522
- * See the LICENSE file in the root directory of this source tree.
9523
- *)
9524
-
9525
9503
  lucide-react/dist/esm/icons/redo-2.js:
9526
- (**
9527
- * @license lucide-react v0.468.0 - ISC
9528
- *
9529
- * This source code is licensed under the ISC license.
9530
- * See the LICENSE file in the root directory of this source tree.
9531
- *)
9532
-
9533
9504
  lucide-react/dist/esm/icons/search.js:
9534
- (**
9535
- * @license lucide-react v0.468.0 - ISC
9536
- *
9537
- * This source code is licensed under the ISC license.
9538
- * See the LICENSE file in the root directory of this source tree.
9539
- *)
9540
-
9541
9505
  lucide-react/dist/esm/icons/sliders-horizontal.js:
9542
- (**
9543
- * @license lucide-react v0.468.0 - ISC
9544
- *
9545
- * This source code is licensed under the ISC license.
9546
- * See the LICENSE file in the root directory of this source tree.
9547
- *)
9548
-
9549
9506
  lucide-react/dist/esm/icons/smartphone.js:
9550
- (**
9551
- * @license lucide-react v0.468.0 - ISC
9552
- *
9553
- * This source code is licensed under the ISC license.
9554
- * See the LICENSE file in the root directory of this source tree.
9555
- *)
9556
-
9557
9507
  lucide-react/dist/esm/icons/tablet.js:
9558
- (**
9559
- * @license lucide-react v0.468.0 - ISC
9560
- *
9561
- * This source code is licensed under the ISC license.
9562
- * See the LICENSE file in the root directory of this source tree.
9563
- *)
9564
-
9565
9508
  lucide-react/dist/esm/icons/toy-brick.js:
9566
- (**
9567
- * @license lucide-react v0.468.0 - ISC
9568
- *
9569
- * This source code is licensed under the ISC license.
9570
- * See the LICENSE file in the root directory of this source tree.
9571
- *)
9572
-
9573
9509
  lucide-react/dist/esm/icons/trash.js:
9574
- (**
9575
- * @license lucide-react v0.468.0 - ISC
9576
- *
9577
- * This source code is licensed under the ISC license.
9578
- * See the LICENSE file in the root directory of this source tree.
9579
- *)
9580
-
9581
9510
  lucide-react/dist/esm/icons/type.js:
9582
- (**
9583
- * @license lucide-react v0.468.0 - ISC
9584
- *
9585
- * This source code is licensed under the ISC license.
9586
- * See the LICENSE file in the root directory of this source tree.
9587
- *)
9588
-
9589
9511
  lucide-react/dist/esm/icons/undo-2.js:
9590
- (**
9591
- * @license lucide-react v0.468.0 - ISC
9592
- *
9593
- * This source code is licensed under the ISC license.
9594
- * See the LICENSE file in the root directory of this source tree.
9595
- *)
9596
-
9597
9512
  lucide-react/dist/esm/icons/x.js:
9598
- (**
9599
- * @license lucide-react v0.468.0 - ISC
9600
- *
9601
- * This source code is licensed under the ISC license.
9602
- * See the LICENSE file in the root directory of this source tree.
9603
- *)
9604
-
9605
9513
  lucide-react/dist/esm/icons/zoom-in.js:
9606
- (**
9607
- * @license lucide-react v0.468.0 - ISC
9608
- *
9609
- * This source code is licensed under the ISC license.
9610
- * See the LICENSE file in the root directory of this source tree.
9611
- *)
9612
-
9613
9514
  lucide-react/dist/esm/icons/zoom-out.js:
9614
- (**
9615
- * @license lucide-react v0.468.0 - ISC
9616
- *
9617
- * This source code is licensed under the ISC license.
9618
- * See the LICENSE file in the root directory of this source tree.
9619
- *)
9620
-
9621
9515
  lucide-react/dist/esm/lucide-react.js:
9622
9516
  (**
9623
9517
  * @license lucide-react v0.468.0 - ISC