@measured/puck-plugin-heading-analyzer 0.16.0-canary.3298831 → 0.16.0-canary.39d63e0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -51483,7 +51483,7 @@ var require_dist = __commonJS({
51483
51483
  var HostPortal = 4;
51484
51484
  var HostComponent = 5;
51485
51485
  var HostText = 6;
51486
- var Fragment19 = 7;
51486
+ var Fragment20 = 7;
51487
51487
  var Mode = 8;
51488
51488
  var ContextConsumer = 9;
51489
51489
  var ContextProvider = 10;
@@ -52639,7 +52639,7 @@ var require_dist = __commonJS({
52639
52639
  return "DehydratedFragment";
52640
52640
  case ForwardRef:
52641
52641
  return getWrappedName$1(type, type.render, "ForwardRef");
52642
- case Fragment19:
52642
+ case Fragment20:
52643
52643
  return "Fragment";
52644
52644
  case HostComponent:
52645
52645
  return type;
@@ -62290,7 +62290,7 @@ var require_dist = __commonJS({
62290
62290
  }
62291
62291
  }
62292
62292
  function updateFragment2(returnFiber, current2, fragment, lanes, key) {
62293
- if (current2 === null || current2.tag !== Fragment19) {
62293
+ if (current2 === null || current2.tag !== Fragment20) {
62294
62294
  var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
62295
62295
  created.return = returnFiber;
62296
62296
  return created;
@@ -62693,7 +62693,7 @@ var require_dist = __commonJS({
62693
62693
  if (child.key === key) {
62694
62694
  var elementType = element.type;
62695
62695
  if (elementType === REACT_FRAGMENT_TYPE) {
62696
- if (child.tag === Fragment19) {
62696
+ if (child.tag === Fragment20) {
62697
62697
  deleteRemainingChildren(returnFiber, child.sibling);
62698
62698
  var existing = useFiber(child, element.props.children);
62699
62699
  existing.return = returnFiber;
@@ -66868,7 +66868,7 @@ var require_dist = __commonJS({
66868
66868
  var _resolvedProps2 = workInProgress2.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
66869
66869
  return updateForwardRef(current2, workInProgress2, type, _resolvedProps2, renderLanes2);
66870
66870
  }
66871
- case Fragment19:
66871
+ case Fragment20:
66872
66872
  return updateFragment(current2, workInProgress2, renderLanes2);
66873
66873
  case Mode:
66874
66874
  return updateMode(current2, workInProgress2, renderLanes2);
@@ -67140,7 +67140,7 @@ var require_dist = __commonJS({
67140
67140
  case SimpleMemoComponent:
67141
67141
  case FunctionComponent:
67142
67142
  case ForwardRef:
67143
- case Fragment19:
67143
+ case Fragment20:
67144
67144
  case Mode:
67145
67145
  case Profiler:
67146
67146
  case ContextConsumer:
@@ -71391,7 +71391,7 @@ var require_dist = __commonJS({
71391
71391
  return fiber;
71392
71392
  }
71393
71393
  function createFiberFromFragment(elements, mode, lanes, key) {
71394
- var fiber = createFiber(Fragment19, elements, key, mode);
71394
+ var fiber = createFiber(Fragment20, elements, key, mode);
71395
71395
  fiber.lanes = lanes;
71396
71396
  return fiber;
71397
71397
  }
@@ -72510,6 +72510,8 @@ var require_dist = __commonJS({
72510
72510
  });
72511
72511
  var core_exports = {};
72512
72512
  __export2(core_exports, {
72513
+ Action: () => Action,
72514
+ ActionBar: () => ActionBar,
72513
72515
  AutoField: () => AutoField,
72514
72516
  AutoFieldPrivate: () => AutoFieldPrivate,
72515
72517
  Button: () => Button,
@@ -72564,12 +72566,30 @@ var require_dist = __commonJS({
72564
72566
  };
72565
72567
  var get_class_name_factory_default2 = getClassNameFactory2;
72566
72568
  init_react_import2();
72567
- var styles_module_default5 = { "Input": "_Input_3pq3z_1", "Input-label": "_Input-label_3pq3z_26", "Input-labelIcon": "_Input-labelIcon_3pq3z_35", "Input-disabledIcon": "_Input-disabledIcon_3pq3z_42", "Input-input": "_Input-input_3pq3z_47", "Input--readOnly": "_Input--readOnly_3pq3z_91", "Input-radioGroupItems": "_Input-radioGroupItems_3pq3z_102", "Input-radio": "_Input-radio_3pq3z_102", "Input-radioInner": "_Input-radioInner_3pq3z_119", "Input-radioInput": "_Input-radioInput_3pq3z_164" };
72569
+ var styles_module_default5 = { "ActionBarComponent": "_ActionBarComponent_16pc9_1", "ActionBarComponent-actionsLabel": "_ActionBarComponent-actionsLabel_16pc9_14", "ActionBarComponent-action": "_ActionBarComponent-action_16pc9_14" };
72570
+ var import_jsx_runtime9 = require("react/jsx-runtime");
72571
+ var getClassName6 = get_class_name_factory_default2("ActionBarComponent", styles_module_default5);
72572
+ var ActionBar = ({
72573
+ label,
72574
+ children
72575
+ }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: getClassName6(), children: [
72576
+ label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: getClassName6("actionsLabel"), children: label }),
72577
+ children
72578
+ ] });
72579
+ var Action = ({
72580
+ children,
72581
+ label,
72582
+ onClick
72583
+ }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { className: getClassName6("action"), onClick, title: label, children });
72584
+ ActionBar.Action = Action;
72585
+ init_react_import2();
72586
+ init_react_import2();
72587
+ var styles_module_default22 = { "Input": "_Input_3pq3z_1", "Input-label": "_Input-label_3pq3z_26", "Input-labelIcon": "_Input-labelIcon_3pq3z_35", "Input-disabledIcon": "_Input-disabledIcon_3pq3z_42", "Input-input": "_Input-input_3pq3z_47", "Input--readOnly": "_Input--readOnly_3pq3z_91", "Input-radioGroupItems": "_Input-radioGroupItems_3pq3z_102", "Input-radio": "_Input-radio_3pq3z_102", "Input-radioInner": "_Input-radioInner_3pq3z_119", "Input-radioInput": "_Input-radioInput_3pq3z_164" };
72568
72588
  var import_react112 = require("react");
72569
72589
  init_react_import2();
72570
72590
  init_react_import2();
72571
72591
  init_react_import2();
72572
- var styles_module_default22 = { "ArrayField": "_ArrayField_1go19_5", "ArrayField--isDraggingFrom": "_ArrayField--isDraggingFrom_1go19_13", "ArrayField-addButton": "_ArrayField-addButton_1go19_18", "ArrayField--hasItems": "_ArrayField--hasItems_1go19_33", "ArrayFieldItem": "_ArrayFieldItem_1go19_63", "ArrayFieldItem--isDragging": "_ArrayFieldItem--isDragging_1go19_71", "ArrayFieldItem--isExpanded": "_ArrayFieldItem--isExpanded_1go19_81", "ArrayFieldItem-summary": "_ArrayFieldItem-summary_1go19_97", "ArrayField--addDisabled": "_ArrayField--addDisabled_1go19_128", "ArrayFieldItem-body": "_ArrayFieldItem-body_1go19_164", "ArrayFieldItem-fieldset": "_ArrayFieldItem-fieldset_1go19_173", "ArrayFieldItem-rhs": "_ArrayFieldItem-rhs_1go19_181", "ArrayFieldItem-actions": "_ArrayFieldItem-actions_1go19_187" };
72592
+ var styles_module_default32 = { "ArrayField": "_ArrayField_1go19_5", "ArrayField--isDraggingFrom": "_ArrayField--isDraggingFrom_1go19_13", "ArrayField-addButton": "_ArrayField-addButton_1go19_18", "ArrayField--hasItems": "_ArrayField--hasItems_1go19_33", "ArrayFieldItem": "_ArrayFieldItem_1go19_63", "ArrayFieldItem--isDragging": "_ArrayFieldItem--isDragging_1go19_71", "ArrayFieldItem--isExpanded": "_ArrayFieldItem--isExpanded_1go19_81", "ArrayFieldItem-summary": "_ArrayFieldItem-summary_1go19_97", "ArrayField--addDisabled": "_ArrayField--addDisabled_1go19_128", "ArrayFieldItem-body": "_ArrayFieldItem-body_1go19_164", "ArrayFieldItem-fieldset": "_ArrayFieldItem-fieldset_1go19_173", "ArrayFieldItem-rhs": "_ArrayFieldItem-rhs_1go19_181", "ArrayFieldItem-actions": "_ArrayFieldItem-actions_1go19_187" };
72573
72593
  init_react_import2();
72574
72594
  init_react_import2();
72575
72595
  var import_react22 = require("react");
@@ -72799,9 +72819,9 @@ var require_dist = __commonJS({
72799
72819
  return result;
72800
72820
  };
72801
72821
  init_react_import2();
72802
- var styles_module_default32 = { "Loader": "_Loader_nacdm_13", "loader-animation": "_loader-animation_nacdm_1" };
72803
- var import_jsx_runtime9 = require("react/jsx-runtime");
72804
- var getClassName6 = get_class_name_factory_default2("Loader", styles_module_default32);
72822
+ var styles_module_default42 = { "Loader": "_Loader_nacdm_13", "loader-animation": "_loader-animation_nacdm_1" };
72823
+ var import_jsx_runtime22 = require("react/jsx-runtime");
72824
+ var getClassName22 = get_class_name_factory_default2("Loader", styles_module_default42);
72805
72825
  var Loader2 = (_a3) => {
72806
72826
  var _b2 = _a3, {
72807
72827
  color,
@@ -72810,10 +72830,10 @@ var require_dist = __commonJS({
72810
72830
  "color",
72811
72831
  "size"
72812
72832
  ]);
72813
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
72833
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
72814
72834
  "span",
72815
72835
  __spreadValues2({
72816
- className: getClassName6(),
72836
+ className: getClassName22(),
72817
72837
  style: {
72818
72838
  width: size,
72819
72839
  height: size,
@@ -72823,8 +72843,8 @@ var require_dist = __commonJS({
72823
72843
  }, props)
72824
72844
  );
72825
72845
  };
72826
- var import_jsx_runtime22 = require("react/jsx-runtime");
72827
- var getClassName22 = get_class_name_factory_default2("IconButton", IconButton_module_default);
72846
+ var import_jsx_runtime32 = require("react/jsx-runtime");
72847
+ var getClassName32 = get_class_name_factory_default2("IconButton", IconButton_module_default);
72828
72848
  var IconButton = ({
72829
72849
  children,
72830
72850
  href,
@@ -72839,10 +72859,10 @@ var require_dist = __commonJS({
72839
72859
  }) => {
72840
72860
  const [loading, setLoading] = (0, import_react32.useState)(false);
72841
72861
  const ElementType = href ? "a" : "button";
72842
- const el = /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
72862
+ const el = /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
72843
72863
  ElementType,
72844
72864
  {
72845
- className: getClassName22({
72865
+ className: getClassName32({
72846
72866
  primary: variant === "primary",
72847
72867
  secondary: variant === "secondary",
72848
72868
  disabled,
@@ -72863,11 +72883,11 @@ var require_dist = __commonJS({
72863
72883
  href,
72864
72884
  title,
72865
72885
  children: [
72866
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: getClassName22("title"), children: title }),
72886
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: getClassName32("title"), children: title }),
72867
72887
  children,
72868
- loading && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
72888
+ loading && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
72869
72889
  "\xA0\xA0",
72870
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Loader2, { size: 14 })
72890
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Loader2, { size: 14 })
72871
72891
  ] })
72872
72892
  ]
72873
72893
  }
@@ -72906,7 +72926,7 @@ var require_dist = __commonJS({
72906
72926
  { width: 1280, height: "auto", icon: "Monitor", label: "Large" }
72907
72927
  ];
72908
72928
  var import_ua_parser_js2 = require_ua_parser();
72909
- var import_jsx_runtime32 = require("react/jsx-runtime");
72929
+ var import_jsx_runtime42 = require("react/jsx-runtime");
72910
72930
  var defaultAppState2 = {
72911
72931
  data: { content: [], root: { props: {} } },
72912
72932
  ui: {
@@ -72946,7 +72966,8 @@ var require_dist = __commonJS({
72946
72966
  status: "LOADING",
72947
72967
  setStatus: () => null,
72948
72968
  iframe: {},
72949
- safariFallbackMode: false
72969
+ safariFallbackMode: false,
72970
+ globalPermissions: {}
72950
72971
  };
72951
72972
  var appContext2 = (0, import_react42.createContext)(defaultContext2);
72952
72973
  var AppProvider = ({
@@ -72976,7 +72997,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
72976
72997
  setSafariFallbackMode(true);
72977
72998
  }
72978
72999
  }, []);
72979
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
73000
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
72980
73001
  appContext2.Provider,
72981
73002
  {
72982
73003
  value: __spreadProps2(__spreadValues2({}, value), {
@@ -73005,7 +73026,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73005
73026
  }
73006
73027
  });
73007
73028
  }
73008
- var import_jsx_runtime42 = require("react/jsx-runtime");
73029
+ var import_jsx_runtime52 = require("react/jsx-runtime");
73009
73030
  var defaultProvided = {
73010
73031
  droppableProps: {
73011
73032
  "data-rfd-droppable-context-id": "",
@@ -73020,15 +73041,15 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73020
73041
  draggingFromThisWith: null,
73021
73042
  isUsingPlaceholder: false
73022
73043
  };
73023
- var DefaultDroppable = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children: children(defaultProvided, defaultSnapshot) });
73044
+ var DefaultDroppable = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx_runtime52.Fragment, { children: children(defaultProvided, defaultSnapshot) });
73024
73045
  var Droppable2 = (props) => {
73025
73046
  const { status } = useAppContext2();
73026
73047
  const El = status !== "LOADING" ? import_dnd.Droppable : DefaultDroppable;
73027
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(El, __spreadValues2({}, props));
73048
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(El, __spreadValues2({}, props));
73028
73049
  };
73029
73050
  init_react_import2();
73030
73051
  var import_dnd2 = (init_dnd_esm(), __toCommonJS(dnd_esm_exports));
73031
- var import_jsx_runtime52 = require("react/jsx-runtime");
73052
+ var import_jsx_runtime62 = require("react/jsx-runtime");
73032
73053
  var defaultProvided2 = {
73033
73054
  draggableProps: {
73034
73055
  "data-rfd-draggable-context-id": "",
@@ -73052,7 +73073,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73052
73073
  type: "",
73053
73074
  source: { droppableId: "", index: 0 }
73054
73075
  };
73055
- var DefaultDraggable = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx_runtime52.Fragment, { children: children(defaultProvided2, defaultSnapshot2, defaultRubric) });
73076
+ var DefaultDraggable = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_jsx_runtime62.Fragment, { children: children(defaultProvided2, defaultSnapshot2, defaultRubric) });
73056
73077
  var Draggable2 = ({
73057
73078
  className,
73058
73079
  children,
@@ -73064,10 +73085,10 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73064
73085
  }) => {
73065
73086
  const { status } = useAppContext2();
73066
73087
  const El = status !== "LOADING" ? import_dnd2.Draggable : DefaultDraggable;
73067
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(El, { draggableId: id, index, isDragDisabled, children: (provided, snapshot) => {
73088
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(El, { draggableId: id, index, isDragDisabled, children: (provided, snapshot) => {
73068
73089
  var _a3;
73069
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
73070
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
73090
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
73091
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
73071
73092
  "div",
73072
73093
  __spreadProps2(__spreadValues2(__spreadValues2({
73073
73094
  className: className && className(provided, snapshot),
@@ -73079,7 +73100,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73079
73100
  children: children(provided, snapshot)
73080
73101
  })
73081
73102
  ),
73082
- showShadow && snapshot.isDragging && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
73103
+ showShadow && snapshot.isDragging && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
73083
73104
  "div",
73084
73105
  {
73085
73106
  className: className && className(provided, snapshot),
@@ -73093,22 +73114,22 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73093
73114
  var import_react52 = require("react");
73094
73115
  init_react_import2();
73095
73116
  init_react_import2();
73096
- var styles_module_default42 = { "DragIcon": "_DragIcon_1p5wn_1" };
73097
- var import_jsx_runtime62 = require("react/jsx-runtime");
73098
- var getClassName32 = get_class_name_factory_default2("DragIcon", styles_module_default42);
73099
- var DragIcon = () => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: getClassName32(), children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("svg", { viewBox: "0 0 20 20", width: "12", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("path", { d: "M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z" }) }) });
73117
+ var styles_module_default52 = { "DragIcon": "_DragIcon_1p5wn_1" };
73118
+ var import_jsx_runtime72 = require("react/jsx-runtime");
73119
+ var getClassName42 = get_class_name_factory_default2("DragIcon", styles_module_default52);
73120
+ var DragIcon = () => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: getClassName42(), children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("svg", { viewBox: "0 0 20 20", width: "12", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("path", { d: "M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z" }) }) });
73100
73121
  init_react_import2();
73101
73122
  var import_dnd3 = (init_dnd_esm(), __toCommonJS(dnd_esm_exports));
73102
- var import_jsx_runtime72 = require("react/jsx-runtime");
73103
- var DefaultDragDropContext = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_jsx_runtime72.Fragment, { children });
73123
+ var import_jsx_runtime82 = require("react/jsx-runtime");
73124
+ var DefaultDragDropContext = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_jsx_runtime82.Fragment, { children });
73104
73125
  var DragDropContext2 = (props) => {
73105
73126
  const { status } = useAppContext2();
73106
73127
  const El = status !== "LOADING" ? import_dnd3.DragDropContext : DefaultDragDropContext;
73107
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(El, __spreadValues2({}, props));
73128
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(El, __spreadValues2({}, props));
73108
73129
  };
73109
- var import_jsx_runtime82 = require("react/jsx-runtime");
73110
- var getClassName42 = get_class_name_factory_default2("ArrayField", styles_module_default22);
73111
- var getClassNameItem3 = get_class_name_factory_default2("ArrayFieldItem", styles_module_default22);
73130
+ var import_jsx_runtime92 = require("react/jsx-runtime");
73131
+ var getClassName52 = get_class_name_factory_default2("ArrayField", styles_module_default32);
73132
+ var getClassNameItem3 = get_class_name_factory_default2("ArrayFieldItem", styles_module_default32);
73112
73133
  var ArrayField = ({
73113
73134
  field,
73114
73135
  onChange,
@@ -73117,7 +73138,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73117
73138
  label,
73118
73139
  readOnly,
73119
73140
  id,
73120
- Label = (props) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", __spreadValues2({}, props))
73141
+ Label = (props) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", __spreadValues2({}, props))
73121
73142
  }) => {
73122
73143
  const { state, setUi, selectedItem } = useAppContext2();
73123
73144
  const readOnlyFields = (selectedItem == null ? void 0 : selectedItem.readOnly) || {};
@@ -73180,14 +73201,14 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73180
73201
  return null;
73181
73202
  }
73182
73203
  const addDisabled = field.max !== void 0 && localState.arrayState.items.length >= field.max || readOnly;
73183
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
73204
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
73184
73205
  Label,
73185
73206
  {
73186
73207
  label: label || name,
73187
- icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(List, { size: 16 }),
73208
+ icon: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(List, { size: 16 }),
73188
73209
  el: "div",
73189
73210
  readOnly,
73190
- children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
73211
+ children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
73191
73212
  DragDropContext2,
73192
73213
  {
73193
73214
  onDragEnd: (event) => {
@@ -73214,12 +73235,12 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73214
73235
  });
73215
73236
  }
73216
73237
  },
73217
- children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Droppable2, { droppableId: "array", isDropDisabled: readOnly, children: (provided, snapshot) => {
73218
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
73238
+ children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Droppable2, { droppableId: "array", isDropDisabled: readOnly, children: (provided, snapshot) => {
73239
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
73219
73240
  "div",
73220
73241
  __spreadProps2(__spreadValues2({}, provided.droppableProps), {
73221
73242
  ref: provided.innerRef,
73222
- className: getClassName42({
73243
+ className: getClassName52({
73223
73244
  isDraggingFrom: !!snapshot.draggingFromThisWith,
73224
73245
  hasItems: Array.isArray(value) && value.length > 0,
73225
73246
  addDisabled
@@ -73236,7 +73257,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73236
73257
  localState.arrayState.items.map((item, i2) => {
73237
73258
  const { _arrayId = `${id}-${i2}`, _originalIndex = i2 } = item;
73238
73259
  const data = Array.from(localState.value || [])[i2] || {};
73239
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
73260
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
73240
73261
  Draggable2,
73241
73262
  {
73242
73263
  id: _arrayId,
@@ -73247,8 +73268,8 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73247
73268
  readOnly
73248
73269
  }),
73249
73270
  isDragDisabled: readOnly || !hovering,
73250
- children: () => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
73251
- /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
73271
+ children: () => /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
73272
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
73252
73273
  "div",
73253
73274
  {
73254
73275
  onClick: () => {
@@ -73269,8 +73290,8 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73269
73290
  className: getClassNameItem3("summary"),
73270
73291
  children: [
73271
73292
  field.getItemSummary ? field.getItemSummary(data, i2) : `Item #${_originalIndex}`,
73272
- /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: getClassNameItem3("rhs"), children: [
73273
- !readOnly && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: getClassNameItem3("actions"), children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: getClassNameItem3("action"), children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
73293
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: getClassNameItem3("rhs"), children: [
73294
+ !readOnly && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: getClassNameItem3("actions"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: getClassNameItem3("action"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
73274
73295
  IconButton,
73275
73296
  {
73276
73297
  type: "button",
@@ -73293,20 +73314,20 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73293
73314
  );
73294
73315
  },
73295
73316
  title: "Delete",
73296
- children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Trash, { size: 16 })
73317
+ children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Trash, { size: 16 })
73297
73318
  }
73298
73319
  ) }) }),
73299
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(DragIcon, {}) })
73320
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(DragIcon, {}) })
73300
73321
  ] })
73301
73322
  ]
73302
73323
  }
73303
73324
  ),
73304
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: getClassNameItem3("body"), children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("fieldset", { className: getClassNameItem3("fieldset"), children: Object.keys(field.arrayFields).map(
73325
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: getClassNameItem3("body"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("fieldset", { className: getClassNameItem3("fieldset"), children: Object.keys(field.arrayFields).map(
73305
73326
  (fieldName) => {
73306
73327
  const subField = field.arrayFields[fieldName];
73307
73328
  const subFieldName = `${name}[${i2}].${fieldName}`;
73308
73329
  const wildcardFieldName = `${name}[*].${fieldName}`;
73309
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
73330
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
73310
73331
  AutoFieldPrivate,
73311
73332
  {
73312
73333
  name: subFieldName,
@@ -73334,11 +73355,11 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73334
73355
  );
73335
73356
  }),
73336
73357
  provided.placeholder,
73337
- !addDisabled && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
73358
+ !addDisabled && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
73338
73359
  "button",
73339
73360
  {
73340
73361
  type: "button",
73341
- className: getClassName42("addButton"),
73362
+ className: getClassName52("addButton"),
73342
73363
  onClick: () => {
73343
73364
  const existingValue = value || [];
73344
73365
  const newValue = [
@@ -73348,7 +73369,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73348
73369
  const newArrayState = regenerateArrayState(newValue);
73349
73370
  onChange(newValue, mapArrayStateToUi(newArrayState));
73350
73371
  },
73351
- children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Plus, { size: 21 })
73372
+ children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Plus, { size: 21 })
73352
73373
  }
73353
73374
  )
73354
73375
  ]
@@ -73361,8 +73382,8 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73361
73382
  );
73362
73383
  };
73363
73384
  init_react_import2();
73364
- var import_jsx_runtime92 = require("react/jsx-runtime");
73365
- var getClassName52 = get_class_name_factory_default2("Input", styles_module_default5);
73385
+ var import_jsx_runtime10 = require("react/jsx-runtime");
73386
+ var getClassName62 = get_class_name_factory_default2("Input", styles_module_default22);
73366
73387
  var DefaultField = ({
73367
73388
  field,
73368
73389
  onChange,
@@ -73373,19 +73394,19 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73373
73394
  Label,
73374
73395
  id
73375
73396
  }) => {
73376
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
73397
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
73377
73398
  Label,
73378
73399
  {
73379
73400
  label: label || name,
73380
- icon: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
73381
- field.type === "text" && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Type, { size: 16 }),
73382
- field.type === "number" && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Hash, { size: 16 })
73401
+ icon: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
73402
+ field.type === "text" && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Type, { size: 16 }),
73403
+ field.type === "number" && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Hash, { size: 16 })
73383
73404
  ] }),
73384
73405
  readOnly,
73385
- children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
73406
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
73386
73407
  "input",
73387
73408
  {
73388
- className: getClassName52("input"),
73409
+ className: getClassName62("input"),
73389
73410
  autoComplete: "off",
73390
73411
  type: field.type,
73391
73412
  name,
@@ -73412,14 +73433,14 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73412
73433
  init_react_import2();
73413
73434
  var import_react82 = require("react");
73414
73435
  init_react_import2();
73415
- var styles_module_default52 = { "ExternalInput-actions": "_ExternalInput-actions_19obq_1", "ExternalInput-button": "_ExternalInput-button_19obq_5", "ExternalInput--dataSelected": "_ExternalInput--dataSelected_19obq_25", "ExternalInput-detachButton": "_ExternalInput-detachButton_19obq_32", "ExternalInputModal": "_ExternalInputModal_19obq_74", "ExternalInputModal-grid": "_ExternalInputModal-grid_19obq_84", "ExternalInputModal--filtersToggled": "_ExternalInputModal--filtersToggled_19obq_95", "ExternalInputModal-filters": "_ExternalInputModal-filters_19obq_100", "ExternalInputModal-masthead": "_ExternalInputModal-masthead_19obq_119", "ExternalInputModal-tableWrapper": "_ExternalInputModal-tableWrapper_19obq_128", "ExternalInputModal-table": "_ExternalInputModal-table_19obq_128", "ExternalInputModal-thead": "_ExternalInputModal-thead_19obq_144", "ExternalInputModal-th": "_ExternalInputModal-th_19obq_144", "ExternalInputModal-td": "_ExternalInputModal-td_19obq_159", "ExternalInputModal-tr": "_ExternalInputModal-tr_19obq_164", "ExternalInputModal-tbody": "_ExternalInputModal-tbody_19obq_171", "ExternalInputModal--hasData": "_ExternalInputModal--hasData_19obq_197", "ExternalInputModal-loadingBanner": "_ExternalInputModal-loadingBanner_19obq_201", "ExternalInputModal--isLoading": "_ExternalInputModal--isLoading_19obq_218", "ExternalInputModal-searchForm": "_ExternalInputModal-searchForm_19obq_222", "ExternalInputModal-search": "_ExternalInputModal-search_19obq_222", "ExternalInputModal-searchIcon": "_ExternalInputModal-searchIcon_19obq_259", "ExternalInputModal-searchIconText": "_ExternalInputModal-searchIconText_19obq_284", "ExternalInputModal-searchInput": "_ExternalInputModal-searchInput_19obq_294", "ExternalInputModal-searchActions": "_ExternalInputModal-searchActions_19obq_308", "ExternalInputModal-searchActionIcon": "_ExternalInputModal-searchActionIcon_19obq_321", "ExternalInputModal-footer": "_ExternalInputModal-footer_19obq_325" };
73436
+ var styles_module_default6 = { "ExternalInput-actions": "_ExternalInput-actions_19obq_1", "ExternalInput-button": "_ExternalInput-button_19obq_5", "ExternalInput--dataSelected": "_ExternalInput--dataSelected_19obq_25", "ExternalInput-detachButton": "_ExternalInput-detachButton_19obq_32", "ExternalInputModal": "_ExternalInputModal_19obq_74", "ExternalInputModal-grid": "_ExternalInputModal-grid_19obq_84", "ExternalInputModal--filtersToggled": "_ExternalInputModal--filtersToggled_19obq_95", "ExternalInputModal-filters": "_ExternalInputModal-filters_19obq_100", "ExternalInputModal-masthead": "_ExternalInputModal-masthead_19obq_119", "ExternalInputModal-tableWrapper": "_ExternalInputModal-tableWrapper_19obq_128", "ExternalInputModal-table": "_ExternalInputModal-table_19obq_128", "ExternalInputModal-thead": "_ExternalInputModal-thead_19obq_144", "ExternalInputModal-th": "_ExternalInputModal-th_19obq_144", "ExternalInputModal-td": "_ExternalInputModal-td_19obq_159", "ExternalInputModal-tr": "_ExternalInputModal-tr_19obq_164", "ExternalInputModal-tbody": "_ExternalInputModal-tbody_19obq_171", "ExternalInputModal--hasData": "_ExternalInputModal--hasData_19obq_197", "ExternalInputModal-loadingBanner": "_ExternalInputModal-loadingBanner_19obq_201", "ExternalInputModal--isLoading": "_ExternalInputModal--isLoading_19obq_218", "ExternalInputModal-searchForm": "_ExternalInputModal-searchForm_19obq_222", "ExternalInputModal-search": "_ExternalInputModal-search_19obq_222", "ExternalInputModal-searchIcon": "_ExternalInputModal-searchIcon_19obq_259", "ExternalInputModal-searchIconText": "_ExternalInputModal-searchIconText_19obq_284", "ExternalInputModal-searchInput": "_ExternalInputModal-searchInput_19obq_294", "ExternalInputModal-searchActions": "_ExternalInputModal-searchActions_19obq_308", "ExternalInputModal-searchActionIcon": "_ExternalInputModal-searchActionIcon_19obq_321", "ExternalInputModal-footer": "_ExternalInputModal-footer_19obq_325" };
73416
73437
  init_react_import2();
73417
73438
  var import_react62 = require("react");
73418
73439
  init_react_import2();
73419
- var styles_module_default6 = { "Modal": "_Modal_ikbaj_1", "Modal--isOpen": "_Modal--isOpen_ikbaj_15", "Modal-inner": "_Modal-inner_ikbaj_19" };
73440
+ var styles_module_default7 = { "Modal": "_Modal_ikbaj_1", "Modal--isOpen": "_Modal--isOpen_ikbaj_15", "Modal-inner": "_Modal-inner_ikbaj_19" };
73420
73441
  var import_react_dom3 = __toESM2(require_react_dom2());
73421
- var import_jsx_runtime10 = require("react/jsx-runtime");
73422
- var getClassName62 = get_class_name_factory_default2("Modal", styles_module_default6);
73442
+ var import_jsx_runtime11 = require("react/jsx-runtime");
73443
+ var getClassName7 = get_class_name_factory_default2("Modal", styles_module_default7);
73423
73444
  var Modal = ({
73424
73445
  children,
73425
73446
  onClose,
@@ -73430,13 +73451,13 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73430
73451
  setRootEl(document.getElementById("puck-portal-root"));
73431
73452
  }, []);
73432
73453
  if (!rootEl) {
73433
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", {});
73454
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", {});
73434
73455
  }
73435
73456
  return (0, import_react_dom3.createPortal)(
73436
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: getClassName62({ isOpen }), onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
73457
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: getClassName7({ isOpen }), onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
73437
73458
  "div",
73438
73459
  {
73439
- className: getClassName62("inner"),
73460
+ className: getClassName7("inner"),
73440
73461
  onClick: (e2) => e2.stopPropagation(),
73441
73462
  children
73442
73463
  }
@@ -73446,15 +73467,15 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73446
73467
  };
73447
73468
  init_react_import2();
73448
73469
  init_react_import2();
73449
- var styles_module_default7 = { "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" };
73450
- var import_jsx_runtime11 = require("react/jsx-runtime");
73451
- var getClassName7 = get_class_name_factory_default2("Heading", styles_module_default7);
73470
+ 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" };
73471
+ var import_jsx_runtime12 = require("react/jsx-runtime");
73472
+ var getClassName8 = get_class_name_factory_default2("Heading", styles_module_default8);
73452
73473
  var Heading2 = ({ children, rank, size = "m" }) => {
73453
73474
  const Tag = rank ? `h${rank}` : "span";
73454
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
73475
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
73455
73476
  Tag,
73456
73477
  {
73457
- className: getClassName7({
73478
+ className: getClassName8({
73458
73479
  [size]: true
73459
73480
  }),
73460
73481
  children
@@ -73466,8 +73487,8 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73466
73487
  var import_react72 = require("react");
73467
73488
  init_react_import2();
73468
73489
  var Button_module_default = { "Button": "_Button_1t64k_1", "Button--medium": "_Button--medium_1t64k_29", "Button--large": "_Button--large_1t64k_37", "Button-icon": "_Button-icon_1t64k_44", "Button--primary": "_Button--primary_1t64k_48", "Button--secondary": "_Button--secondary_1t64k_67", "Button--flush": "_Button--flush_1t64k_84", "Button--disabled": "_Button--disabled_1t64k_88", "Button--fullWidth": "_Button--fullWidth_1t64k_95", "Button-spinner": "_Button-spinner_1t64k_100" };
73469
- var import_jsx_runtime12 = require("react/jsx-runtime");
73470
- var getClassName8 = get_class_name_factory_default2("Button", Button_module_default);
73490
+ var import_jsx_runtime13 = require("react/jsx-runtime");
73491
+ var getClassName9 = get_class_name_factory_default2("Button", Button_module_default);
73471
73492
  var Button = ({
73472
73493
  children,
73473
73494
  href,
@@ -73485,10 +73506,10 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73485
73506
  const [loading, setLoading] = (0, import_react72.useState)(loadingProp);
73486
73507
  (0, import_react72.useEffect)(() => setLoading(loadingProp), [loadingProp]);
73487
73508
  const ElementType = href ? "a" : type ? "button" : "span";
73488
- const el = /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
73509
+ const el = /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
73489
73510
  ElementType,
73490
73511
  {
73491
- className: getClassName8({
73512
+ className: getClassName9({
73492
73513
  primary: variant === "primary",
73493
73514
  secondary: variant === "secondary",
73494
73515
  disabled,
@@ -73509,17 +73530,17 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73509
73530
  rel: newTab ? "noreferrer" : void 0,
73510
73531
  href,
73511
73532
  children: [
73512
- icon && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: getClassName8("icon"), children: icon }),
73533
+ icon && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: getClassName9("icon"), children: icon }),
73513
73534
  children,
73514
- loading && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: getClassName8("spinner"), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Loader2, { size: 14 }) })
73535
+ loading && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: getClassName9("spinner"), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Loader2, { size: 14 }) })
73515
73536
  ]
73516
73537
  }
73517
73538
  );
73518
73539
  return el;
73519
73540
  };
73520
- var import_jsx_runtime13 = require("react/jsx-runtime");
73521
- var getClassName9 = get_class_name_factory_default2("ExternalInput", styles_module_default52);
73522
- var getClassNameModal = get_class_name_factory_default2("ExternalInputModal", styles_module_default52);
73541
+ var import_jsx_runtime14 = require("react/jsx-runtime");
73542
+ var getClassName10 = get_class_name_factory_default2("ExternalInput", styles_module_default6);
73543
+ var getClassNameModal = get_class_name_factory_default2("ExternalInputModal", styles_module_default6);
73523
73544
  var dataCache = {};
73524
73545
  var ExternalInput = ({
73525
73546
  field,
@@ -73570,40 +73591,40 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73570
73591
  (0, import_react82.useEffect)(() => {
73571
73592
  search(searchQuery, filters);
73572
73593
  }, []);
73573
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
73594
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
73574
73595
  "div",
73575
73596
  {
73576
- className: getClassName9({
73597
+ className: getClassName10({
73577
73598
  dataSelected: !!value,
73578
73599
  modalVisible: isOpen
73579
73600
  }),
73580
73601
  id,
73581
73602
  children: [
73582
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: getClassName9("actions"), children: [
73583
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
73603
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: getClassName10("actions"), children: [
73604
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
73584
73605
  "button",
73585
73606
  {
73586
73607
  type: "button",
73587
73608
  onClick: () => setOpen(true),
73588
- className: getClassName9("button"),
73589
- children: value ? field.getItemSummary ? field.getItemSummary(value) : "External item" : /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
73590
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Link, { size: "16" }),
73591
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: field.placeholder })
73609
+ className: getClassName10("button"),
73610
+ children: value ? field.getItemSummary ? field.getItemSummary(value) : "External item" : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
73611
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Link, { size: "16" }),
73612
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: field.placeholder })
73592
73613
  ] })
73593
73614
  }
73594
73615
  ),
73595
- value && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
73616
+ value && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
73596
73617
  "button",
73597
73618
  {
73598
- className: getClassName9("detachButton"),
73619
+ className: getClassName10("detachButton"),
73599
73620
  onClick: () => {
73600
73621
  onChange(null);
73601
73622
  },
73602
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Unlock, { size: 16 })
73623
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Unlock, { size: 16 })
73603
73624
  }
73604
73625
  )
73605
73626
  ] }),
73606
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Modal, { onClose: () => setOpen(false), isOpen, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
73627
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Modal, { onClose: () => setOpen(false), isOpen, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
73607
73628
  "form",
73608
73629
  {
73609
73630
  className: getClassNameModal({
@@ -73617,11 +73638,11 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73617
73638
  search(searchQuery, filters);
73618
73639
  },
73619
73640
  children: [
73620
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: getClassNameModal("masthead"), children: field.showSearch ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: getClassNameModal("searchForm"), children: [
73621
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: getClassNameModal("search"), children: [
73622
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: getClassNameModal("searchIconText"), children: "Search" }),
73623
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: getClassNameModal("searchIcon"), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Search, { size: "18" }) }),
73624
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
73641
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: getClassNameModal("masthead"), children: field.showSearch ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: getClassNameModal("searchForm"), children: [
73642
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: getClassNameModal("search"), children: [
73643
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: getClassNameModal("searchIconText"), children: "Search" }),
73644
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: getClassNameModal("searchIcon"), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Search, { size: "18" }) }),
73645
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
73625
73646
  "input",
73626
73647
  {
73627
73648
  className: getClassNameModal("searchInput"),
@@ -73636,9 +73657,9 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73636
73657
  }
73637
73658
  )
73638
73659
  ] }),
73639
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: getClassNameModal("searchActions"), children: [
73640
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Button, { type: "submit", loading: isLoading, fullWidth: true, children: "Search" }),
73641
- hasFilterFields && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: getClassNameModal("searchActionIcon"), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
73660
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: getClassNameModal("searchActions"), children: [
73661
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Button, { type: "submit", loading: isLoading, fullWidth: true, children: "Search" }),
73662
+ hasFilterFields && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: getClassNameModal("searchActionIcon"), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
73642
73663
  IconButton,
73643
73664
  {
73644
73665
  title: "Toggle filters",
@@ -73647,15 +73668,15 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73647
73668
  e2.stopPropagation();
73648
73669
  setFiltersToggled(!filtersToggled);
73649
73670
  },
73650
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SlidersHorizontal, { size: 20 })
73671
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SlidersHorizontal, { size: 20 })
73651
73672
  }
73652
73673
  ) })
73653
73674
  ] })
73654
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Heading2, { rank: 2, size: "xs", children: field.placeholder || "Select data" }) }),
73655
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: getClassNameModal("grid"), children: [
73656
- hasFilterFields && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: getClassNameModal("filters"), children: hasFilterFields && Object.keys(filterFields).map((fieldName) => {
73675
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Heading2, { rank: 2, size: "xs", children: field.placeholder || "Select data" }) }),
73676
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: getClassNameModal("grid"), children: [
73677
+ hasFilterFields && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: getClassNameModal("filters"), children: hasFilterFields && Object.keys(filterFields).map((fieldName) => {
73657
73678
  const filterField = filterFields[fieldName];
73658
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
73679
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
73659
73680
  AutoFieldPrivate,
73660
73681
  {
73661
73682
  field: filterField,
@@ -73672,9 +73693,9 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73672
73693
  fieldName
73673
73694
  );
73674
73695
  }) }),
73675
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: getClassNameModal("tableWrapper"), children: [
73676
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("table", { className: getClassNameModal("table"), children: [
73677
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("thead", { className: getClassNameModal("thead"), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("tr", { className: getClassNameModal("tr"), children: keys.map((key) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
73696
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: getClassNameModal("tableWrapper"), children: [
73697
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("table", { className: getClassNameModal("table"), children: [
73698
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("thead", { className: getClassNameModal("thead"), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("tr", { className: getClassNameModal("tr"), children: keys.map((key) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
73678
73699
  "th",
73679
73700
  {
73680
73701
  className: getClassNameModal("th"),
@@ -73683,8 +73704,8 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73683
73704
  },
73684
73705
  key
73685
73706
  )) }) }),
73686
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("tbody", { className: getClassNameModal("tbody"), children: mappedData.map((item, i2) => {
73687
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
73707
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("tbody", { className: getClassNameModal("tbody"), children: mappedData.map((item, i2) => {
73708
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
73688
73709
  "tr",
73689
73710
  {
73690
73711
  style: { whiteSpace: "nowrap" },
@@ -73693,16 +73714,16 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73693
73714
  onChange(mapProp(data[i2]));
73694
73715
  setOpen(false);
73695
73716
  },
73696
- children: keys.map((key) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("td", { className: getClassNameModal("td"), children: item[key] }, key))
73717
+ children: keys.map((key) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: getClassNameModal("td"), children: item[key] }, key))
73697
73718
  },
73698
73719
  i2
73699
73720
  );
73700
73721
  }) })
73701
73722
  ] }),
73702
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: getClassNameModal("loadingBanner"), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Loader2, { size: 24 }) })
73723
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: getClassNameModal("loadingBanner"), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Loader2, { size: 24 }) })
73703
73724
  ] })
73704
73725
  ] }),
73705
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: getClassNameModal("footer"), children: [
73726
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: getClassNameModal("footer"), children: [
73706
73727
  mappedData.length,
73707
73728
  " result",
73708
73729
  mappedData.length === 1 ? "" : "s"
@@ -73714,7 +73735,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73714
73735
  }
73715
73736
  );
73716
73737
  };
73717
- var import_jsx_runtime14 = require("react/jsx-runtime");
73738
+ var import_jsx_runtime15 = require("react/jsx-runtime");
73718
73739
  var ExternalField = ({
73719
73740
  field,
73720
73741
  onChange,
@@ -73737,7 +73758,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73737
73758
  if (field.type !== "external") {
73738
73759
  return null;
73739
73760
  }
73740
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Label, { label: label || name, icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Link, { size: 16 }), el: "div", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
73761
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Label, { label: label || name, icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Link, { size: 16 }), el: "div", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
73741
73762
  ExternalInput,
73742
73763
  {
73743
73764
  name,
@@ -73759,8 +73780,8 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73759
73780
  ) });
73760
73781
  };
73761
73782
  init_react_import2();
73762
- var import_jsx_runtime15 = require("react/jsx-runtime");
73763
- var getClassName10 = get_class_name_factory_default2("Input", styles_module_default5);
73783
+ var import_jsx_runtime16 = require("react/jsx-runtime");
73784
+ var getClassName11 = get_class_name_factory_default2("Input", styles_module_default22);
73764
73785
  var RadioField = ({
73765
73786
  field,
73766
73787
  onChange,
@@ -73774,23 +73795,23 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73774
73795
  if (field.type !== "radio" || !field.options) {
73775
73796
  return null;
73776
73797
  }
73777
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
73798
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
73778
73799
  Label,
73779
73800
  {
73780
- icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CheckCircle, { size: 16 }),
73801
+ icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CheckCircle, { size: 16 }),
73781
73802
  label: label || name,
73782
73803
  readOnly,
73783
73804
  el: "div",
73784
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: getClassName10("radioGroupItems"), id, children: field.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
73805
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: getClassName11("radioGroupItems"), id, children: field.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
73785
73806
  "label",
73786
73807
  {
73787
- className: getClassName10("radio"),
73808
+ className: getClassName11("radio"),
73788
73809
  children: [
73789
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
73810
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
73790
73811
  "input",
73791
73812
  {
73792
73813
  type: "radio",
73793
- className: getClassName10("radioInput"),
73814
+ className: getClassName11("radioInput"),
73794
73815
  value: option.value,
73795
73816
  name,
73796
73817
  onChange: (e2) => {
@@ -73804,7 +73825,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73804
73825
  checked: value === option.value
73805
73826
  }
73806
73827
  ),
73807
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: getClassName10("radioInner"), children: option.label || option.value })
73828
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: getClassName11("radioInner"), children: option.label || option.value })
73808
73829
  ]
73809
73830
  },
73810
73831
  option.label + option.value
@@ -73813,8 +73834,8 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73813
73834
  );
73814
73835
  };
73815
73836
  init_react_import2();
73816
- var import_jsx_runtime16 = require("react/jsx-runtime");
73817
- var getClassName11 = get_class_name_factory_default2("Input", styles_module_default5);
73837
+ var import_jsx_runtime17 = require("react/jsx-runtime");
73838
+ var getClassName12 = get_class_name_factory_default2("Input", styles_module_default22);
73818
73839
  var SelectField = ({
73819
73840
  field,
73820
73841
  onChange,
@@ -73828,17 +73849,17 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73828
73849
  if (field.type !== "select" || !field.options) {
73829
73850
  return null;
73830
73851
  }
73831
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
73852
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
73832
73853
  Label,
73833
73854
  {
73834
73855
  label: label || name,
73835
- icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ChevronDown, { size: 16 }),
73856
+ icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ChevronDown, { size: 16 }),
73836
73857
  readOnly,
73837
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
73858
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
73838
73859
  "select",
73839
73860
  {
73840
73861
  id,
73841
- className: getClassName11("input"),
73862
+ className: getClassName12("input"),
73842
73863
  disabled: readOnly,
73843
73864
  onChange: (e2) => {
73844
73865
  if (e2.currentTarget.value === "true" || e2.currentTarget.value === "false") {
@@ -73848,7 +73869,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73848
73869
  onChange(e2.currentTarget.value);
73849
73870
  },
73850
73871
  value,
73851
- children: field.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
73872
+ children: field.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
73852
73873
  "option",
73853
73874
  {
73854
73875
  label: option.label,
@@ -73862,8 +73883,8 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73862
73883
  );
73863
73884
  };
73864
73885
  init_react_import2();
73865
- var import_jsx_runtime17 = require("react/jsx-runtime");
73866
- var getClassName12 = get_class_name_factory_default2("Input", styles_module_default5);
73886
+ var import_jsx_runtime18 = require("react/jsx-runtime");
73887
+ var getClassName13 = get_class_name_factory_default2("Input", styles_module_default22);
73867
73888
  var TextareaField = ({
73868
73889
  onChange,
73869
73890
  readOnly,
@@ -73873,11 +73894,11 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73873
73894
  Label,
73874
73895
  id
73875
73896
  }) => {
73876
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Label, { label: label || name, icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Type, { size: 16 }), readOnly, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
73897
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Label, { label: label || name, icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Type, { size: 16 }), readOnly, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
73877
73898
  "textarea",
73878
73899
  {
73879
73900
  id,
73880
- className: getClassName12("input"),
73901
+ className: getClassName13("input"),
73881
73902
  autoComplete: "off",
73882
73903
  name,
73883
73904
  value: typeof value === "undefined" ? "" : value,
@@ -73891,9 +73912,9 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73891
73912
  var import_use_debounce = (init_index_module(), __toCommonJS(index_module_exports));
73892
73913
  init_react_import2();
73893
73914
  init_react_import2();
73894
- var styles_module_default8 = { "ObjectField": "_ObjectField_1ua3y_5", "ObjectField-fieldset": "_ObjectField-fieldset_1ua3y_13" };
73895
- var import_jsx_runtime18 = require("react/jsx-runtime");
73896
- var getClassName13 = get_class_name_factory_default2("ObjectField", styles_module_default8);
73915
+ var styles_module_default9 = { "ObjectField": "_ObjectField_1ua3y_5", "ObjectField-fieldset": "_ObjectField-fieldset_1ua3y_13" };
73916
+ var import_jsx_runtime19 = require("react/jsx-runtime");
73917
+ var getClassName14 = get_class_name_factory_default2("ObjectField", styles_module_default9);
73897
73918
  var ObjectField = ({
73898
73919
  field,
73899
73920
  onChange,
@@ -73910,18 +73931,18 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73910
73931
  }
73911
73932
  const readOnlyFields = (selectedItem == null ? void 0 : selectedItem.readOnly) || {};
73912
73933
  const data = value || {};
73913
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
73934
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
73914
73935
  Label,
73915
73936
  {
73916
73937
  label: label || name,
73917
- icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(MoreVertical, { size: 16 }),
73938
+ icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MoreVertical, { size: 16 }),
73918
73939
  el: "div",
73919
73940
  readOnly,
73920
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: getClassName13(), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("fieldset", { className: getClassName13("fieldset"), children: Object.keys(field.objectFields).map((fieldName) => {
73941
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: getClassName14(), children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("fieldset", { className: getClassName14("fieldset"), children: Object.keys(field.objectFields).map((fieldName) => {
73921
73942
  const subField = field.objectFields[fieldName];
73922
73943
  const subFieldName = `${name}.${fieldName}`;
73923
73944
  const wildcardFieldName = `${name}.${fieldName}`;
73924
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
73945
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
73925
73946
  AutoFieldPrivate,
73926
73947
  {
73927
73948
  name: subFieldName,
@@ -73957,8 +73978,8 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73957
73978
  const [id] = (0, import_react102.useState)(generateId());
73958
73979
  return id;
73959
73980
  };
73960
- var import_jsx_runtime19 = require("react/jsx-runtime");
73961
- var getClassName14 = get_class_name_factory_default2("Input", styles_module_default5);
73981
+ var import_jsx_runtime20 = require("react/jsx-runtime");
73982
+ var getClassName15 = get_class_name_factory_default2("Input", styles_module_default22);
73962
73983
  var FieldLabel = ({
73963
73984
  children,
73964
73985
  icon,
@@ -73968,11 +73989,11 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73968
73989
  className
73969
73990
  }) => {
73970
73991
  const El = el;
73971
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(El, { className, children: [
73972
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: getClassName14("label"), children: [
73973
- icon ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: getClassName14("labelIcon"), children: icon }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, {}),
73992
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(El, { className, children: [
73993
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: getClassName15("label"), children: [
73994
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: getClassName15("labelIcon"), children: icon }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_jsx_runtime20.Fragment, {}),
73974
73995
  label,
73975
- readOnly && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: getClassName14("disabledIcon"), title: "Read-only", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Lock, { size: "12" }) })
73996
+ readOnly && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: getClassName15("disabledIcon"), title: "Read-only", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Lock, { size: "12" }) })
73976
73997
  ] }),
73977
73998
  children
73978
73999
  ] });
@@ -73990,14 +74011,14 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
73990
74011
  [overrides]
73991
74012
  );
73992
74013
  if (!label) {
73993
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, { children });
74014
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_jsx_runtime20.Fragment, { children });
73994
74015
  }
73995
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
74016
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
73996
74017
  Wrapper,
73997
74018
  {
73998
74019
  label,
73999
74020
  icon,
74000
- className: getClassName14({ readOnly }),
74021
+ className: getClassName15({ readOnly }),
74001
74022
  readOnly,
74002
74023
  el,
74003
74024
  children
@@ -74041,11 +74062,11 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74041
74062
  return null;
74042
74063
  }
74043
74064
  const CustomField = field.render;
74044
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: getClassName14(), children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CustomField, __spreadValues2({}, mergedProps)) });
74065
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: getClassName15(), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CustomField, __spreadValues2({}, mergedProps)) });
74045
74066
  }
74046
74067
  const children = defaultFields[field.type](mergedProps);
74047
74068
  const Render2 = render[field.type];
74048
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Render2, __spreadProps2(__spreadValues2({}, mergedProps), { children }));
74069
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Render2, __spreadProps2(__spreadValues2({}, mergedProps), { children }));
74049
74070
  }
74050
74071
  function AutoFieldPrivate(props) {
74051
74072
  const { value, onChange } = props;
@@ -74068,19 +74089,19 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74068
74089
  value: localValue,
74069
74090
  onChange: onChangeLocal
74070
74091
  };
74071
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AutoFieldInternal, __spreadValues2(__spreadValues2({}, props), localProps));
74092
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(AutoFieldInternal, __spreadValues2(__spreadValues2({}, props), localProps));
74072
74093
  }
74073
- var DefaultLabel = (props) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", __spreadValues2({}, props));
74094
+ var DefaultLabel = (props) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", __spreadValues2({}, props));
74074
74095
  function AutoField(props) {
74075
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AutoFieldInternal, __spreadProps2(__spreadValues2({}, props), { Label: DefaultLabel }));
74096
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(AutoFieldInternal, __spreadProps2(__spreadValues2({}, props), { Label: DefaultLabel }));
74076
74097
  }
74077
74098
  init_react_import2();
74078
74099
  init_react_import2();
74079
- var styles_module_default9 = { "Drawer": "_Drawer_6zh0b_1", "DrawerItem-default": "_DrawerItem-default_6zh0b_5", "DrawerItem-draggableWrapper": "_DrawerItem-draggableWrapper_6zh0b_5", "DrawerItem": "_DrawerItem_6zh0b_5", "DrawerItem-draggable": "_DrawerItem-draggable_6zh0b_5", "Drawer--isDraggingFrom": "_Drawer--isDraggingFrom_6zh0b_31", "DrawerItem-name": "_DrawerItem-name_6zh0b_47" };
74100
+ var styles_module_default10 = { "Drawer": "_Drawer_6zh0b_1", "DrawerItem-default": "_DrawerItem-default_6zh0b_5", "DrawerItem-draggableWrapper": "_DrawerItem-draggableWrapper_6zh0b_5", "DrawerItem": "_DrawerItem_6zh0b_5", "DrawerItem-draggable": "_DrawerItem-draggable_6zh0b_5", "Drawer--isDraggingFrom": "_Drawer--isDraggingFrom_6zh0b_31", "DrawerItem-name": "_DrawerItem-name_6zh0b_47" };
74080
74101
  var import_react122 = require("react");
74081
- var import_jsx_runtime20 = require("react/jsx-runtime");
74082
- var getClassName15 = get_class_name_factory_default2("Drawer", styles_module_default9);
74083
- var getClassNameItem22 = get_class_name_factory_default2("DrawerItem", styles_module_default9);
74102
+ var import_jsx_runtime21 = require("react/jsx-runtime");
74103
+ var getClassName16 = get_class_name_factory_default2("Drawer", styles_module_default10);
74104
+ var getClassNameItem22 = get_class_name_factory_default2("DrawerItem", styles_module_default10);
74084
74105
  var drawerContext = (0, import_react122.createContext)({
74085
74106
  droppableId: ""
74086
74107
  });
@@ -74088,7 +74109,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74088
74109
  children,
74089
74110
  id,
74090
74111
  index
74091
- }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
74112
+ }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
74092
74113
  Draggable2,
74093
74114
  {
74094
74115
  id,
@@ -74110,12 +74131,12 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74110
74131
  const ctx = (0, import_react122.useContext)(drawerContext);
74111
74132
  const resolvedId = `${ctx.droppableId}::${id || name}`;
74112
74133
  const CustomInner = (0, import_react122.useMemo)(
74113
- () => children || (({ children: children2, name: name2 }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: getClassNameItem22("default"), children: children2 })),
74134
+ () => children || (({ children: children2, name: name2 }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: getClassNameItem22("default"), children: children2 })),
74114
74135
  [children]
74115
74136
  );
74116
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DrawerDraggable, { id: resolvedId, index, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CustomInner, { name, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: getClassNameItem22("draggableWrapper"), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: getClassNameItem22("draggable"), children: [
74117
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: getClassNameItem22("name"), children: label != null ? label : name }),
74118
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: getClassNameItem22("icon"), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DragIcon, {}) })
74137
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DrawerDraggable, { id: resolvedId, index, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CustomInner, { name, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: getClassNameItem22("draggableWrapper"), children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: getClassNameItem22("draggable"), children: [
74138
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: getClassNameItem22("name"), children: label != null ? label : name }),
74139
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: getClassNameItem22("icon"), children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DragIcon, {}) })
74119
74140
  ] }) }) }) });
74120
74141
  };
74121
74142
  var Drawer = ({
@@ -74124,28 +74145,28 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74124
74145
  direction = "vertical"
74125
74146
  }) => {
74126
74147
  const droppableId = `component-list:${_droppableId}`;
74127
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(drawerContext.Provider, { value: { droppableId }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Droppable2, { droppableId, isDropDisabled: true, direction, children: (provided, snapshot) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
74148
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(drawerContext.Provider, { value: { droppableId }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Droppable2, { droppableId, isDropDisabled: true, direction, children: (provided, snapshot) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
74128
74149
  "div",
74129
74150
  __spreadProps2(__spreadValues2({}, provided.droppableProps), {
74130
74151
  ref: provided.innerRef,
74131
- className: getClassName15({
74152
+ className: getClassName16({
74132
74153
  isDraggingFrom: !!snapshot.draggingFromThisWith
74133
74154
  }),
74134
74155
  children: [
74135
74156
  children,
74136
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { style: { display: "none" }, children: provided.placeholder })
74157
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { style: { display: "none" }, children: provided.placeholder })
74137
74158
  ]
74138
74159
  })
74139
74160
  ) }) });
74140
74161
  };
74141
74162
  Drawer.Item = DrawerItem;
74142
74163
  init_react_import2();
74143
- var import_react16 = require("react");
74164
+ var import_react17 = require("react");
74144
74165
  init_react_import2();
74145
- var import_react14 = require("react");
74166
+ var import_react15 = require("react");
74146
74167
  var import_dnd4 = (init_dnd_esm(), __toCommonJS(dnd_esm_exports));
74147
74168
  init_react_import2();
74148
- var styles_module_default10 = { "DraggableComponent": "_DraggableComponent_59z7f_1", "DraggableComponent--isDragging": "_DraggableComponent--isDragging_59z7f_11", "DraggableComponent-contents": "_DraggableComponent-contents_59z7f_16", "DraggableComponent-overlay": "_DraggableComponent-overlay_59z7f_29", "DraggableComponent-loadingOverlay": "_DraggableComponent-loadingOverlay_59z7f_49", "DraggableComponent--isLocked": "_DraggableComponent--isLocked_59z7f_65", "DraggableComponent--forceHover": "_DraggableComponent--forceHover_59z7f_71", "DraggableComponent--isSelected": "_DraggableComponent--isSelected_59z7f_76", "DraggableComponent--indicativeHover": "_DraggableComponent--indicativeHover_59z7f_81", "DraggableComponent-actionsOverlay": "_DraggableComponent-actionsOverlay_59z7f_97", "DraggableComponent-actions": "_DraggableComponent-actions_59z7f_97", "DraggableComponent-actionsLabel": "_DraggableComponent-actionsLabel_59z7f_127", "DraggableComponent-action": "_DraggableComponent-action_59z7f_97" };
74169
+ var styles_module_default11 = { "DraggableComponent": "_DraggableComponent_1bhad_1", "DraggableComponent--isDragging": "_DraggableComponent--isDragging_1bhad_11", "DraggableComponent-contents": "_DraggableComponent-contents_1bhad_16", "DraggableComponent-overlay": "_DraggableComponent-overlay_1bhad_29", "DraggableComponent-loadingOverlay": "_DraggableComponent-loadingOverlay_1bhad_49", "DraggableComponent--isLocked": "_DraggableComponent--isLocked_1bhad_65", "DraggableComponent--forceHover": "_DraggableComponent--forceHover_1bhad_71", "DraggableComponent--isSelected": "_DraggableComponent--isSelected_1bhad_76", "DraggableComponent--indicativeHover": "_DraggableComponent--indicativeHover_1bhad_81", "DraggableComponent-actionsOverlay": "_DraggableComponent-actionsOverlay_1bhad_97", "DraggableComponent-actions": "_DraggableComponent-actions_1bhad_97" };
74149
74170
  init_react_import2();
74150
74171
  var import_react132 = require("react");
74151
74172
  var useModifierHeld = (modifier) => {
@@ -74180,12 +74201,58 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74180
74201
  "iPod"
74181
74202
  ].includes(navigator.platform) || // iPad on iOS 13 detection
74182
74203
  navigator.userAgent.includes("Mac") && "ontouchend" in document;
74183
- var import_jsx_runtime21 = require("react/jsx-runtime");
74184
- var getClassName16 = get_class_name_factory_default2("DraggableComponent", styles_module_default10);
74204
+ init_react_import2();
74205
+ var import_jsx_runtime222 = require("react/jsx-runtime");
74206
+ var DefaultOverride = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(import_jsx_runtime222.Fragment, { children });
74207
+ init_react_import2();
74208
+ var import_react14 = require("react");
74209
+ init_react_import2();
74210
+ var loadOverrides = ({
74211
+ overrides,
74212
+ plugins
74213
+ }) => {
74214
+ const collected = __spreadValues2({}, overrides);
74215
+ plugins.forEach((plugin) => {
74216
+ Object.keys(plugin.overrides).forEach((overridesType) => {
74217
+ if (overridesType === "fieldTypes") {
74218
+ const fieldTypes = plugin.overrides.fieldTypes;
74219
+ Object.keys(fieldTypes).forEach((fieldType) => {
74220
+ collected.fieldTypes = collected.fieldTypes || {};
74221
+ const childNode2 = collected.fieldTypes[fieldType];
74222
+ const Comp2 = (props) => fieldTypes[fieldType](__spreadProps2(__spreadValues2({}, props), {
74223
+ children: childNode2 ? childNode2(props) : props.children
74224
+ }));
74225
+ collected.fieldTypes[fieldType] = Comp2;
74226
+ });
74227
+ return;
74228
+ }
74229
+ const childNode = collected[overridesType];
74230
+ const Comp = (props) => plugin.overrides[overridesType](__spreadProps2(__spreadValues2({}, props), {
74231
+ children: childNode ? childNode(props) : props.children
74232
+ }));
74233
+ collected[overridesType] = Comp;
74234
+ });
74235
+ });
74236
+ return collected;
74237
+ };
74238
+ var useLoadedOverrides = ({
74239
+ overrides,
74240
+ plugins
74241
+ }) => {
74242
+ return (0, import_react14.useMemo)(() => {
74243
+ return loadOverrides({ overrides, plugins });
74244
+ }, [plugins, overrides]);
74245
+ };
74246
+ var import_jsx_runtime23 = require("react/jsx-runtime");
74247
+ var getClassName17 = get_class_name_factory_default2("DraggableComponent", styles_module_default11);
74185
74248
  var space2 = 8;
74186
74249
  var actionsOverlayTop = space2 * 6.5;
74187
74250
  var actionsTop = -(actionsOverlayTop - 8);
74188
74251
  var actionsRight = space2;
74252
+ var DefaultActionBar = ({
74253
+ label,
74254
+ children
74255
+ }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ActionBar, { label, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DefaultOverride, { children }) });
74189
74256
  var DraggableComponent = ({
74190
74257
  children,
74191
74258
  id,
@@ -74208,30 +74275,37 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74208
74275
  indicativeHover = false,
74209
74276
  style: style2
74210
74277
  }) => {
74211
- const { zoomConfig } = useAppContext2();
74278
+ const { zoomConfig, status, overrides, plugins } = useAppContext2();
74212
74279
  const isModifierHeld = useModifierHeld("Alt");
74213
- const { status } = useAppContext2();
74214
74280
  const El = status !== "LOADING" ? import_dnd4.Draggable : DefaultDraggable;
74215
- (0, import_react14.useEffect)(onMount, []);
74216
- const [disableSecondaryAnimation, setDisableSecondaryAnimation] = (0, import_react14.useState)(false);
74217
- (0, import_react14.useEffect)(() => {
74281
+ (0, import_react15.useEffect)(onMount, []);
74282
+ const [disableSecondaryAnimation, setDisableSecondaryAnimation] = (0, import_react15.useState)(false);
74283
+ (0, import_react15.useEffect)(() => {
74218
74284
  if (isIos()) {
74219
74285
  setDisableSecondaryAnimation(true);
74220
74286
  }
74221
74287
  }, []);
74222
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
74288
+ const loadedOverrides = useLoadedOverrides({
74289
+ overrides,
74290
+ plugins
74291
+ });
74292
+ const CustomActionBar = (0, import_react15.useMemo)(
74293
+ () => loadedOverrides.actionBar || DefaultActionBar,
74294
+ [loadedOverrides]
74295
+ );
74296
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
74223
74297
  El,
74224
74298
  {
74225
74299
  draggableId: id,
74226
74300
  index,
74227
74301
  isDragDisabled,
74228
74302
  disableSecondaryAnimation,
74229
- children: (provided, snapshot) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
74303
+ children: (provided, snapshot) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
74230
74304
  "div",
74231
74305
  __spreadProps2(__spreadValues2(__spreadValues2({
74232
74306
  ref: provided.innerRef
74233
74307
  }, provided.draggableProps), provided.dragHandleProps), {
74234
- className: getClassName16({
74308
+ className: getClassName17({
74235
74309
  isSelected,
74236
74310
  isModifierHeld,
74237
74311
  isDragging: snapshot.isDragging,
@@ -74249,34 +74323,33 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74249
74323
  onClick,
74250
74324
  children: [
74251
74325
  debug,
74252
- isLoading && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: getClassName16("loadingOverlay"), children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Loader2, {}) }),
74253
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
74326
+ isLoading && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: getClassName17("loadingOverlay"), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Loader2, {}) }),
74327
+ isSelected && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
74254
74328
  "div",
74255
74329
  {
74256
- className: getClassName16("actionsOverlay"),
74330
+ className: getClassName17("actionsOverlay"),
74257
74331
  style: {
74258
74332
  top: actionsOverlayTop / zoomConfig.zoom
74259
74333
  },
74260
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
74334
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
74261
74335
  "div",
74262
74336
  {
74263
- className: getClassName16("actions"),
74337
+ className: getClassName17("actions"),
74264
74338
  style: {
74265
74339
  transform: `scale(${1 / zoomConfig.zoom}`,
74266
74340
  top: actionsTop / zoomConfig.zoom,
74267
74341
  right: actionsRight / zoomConfig.zoom
74268
74342
  },
74269
- children: [
74270
- label && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: getClassName16("actionsLabel"), children: label }),
74271
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { className: getClassName16("action"), onClick: onDuplicate, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Copy, { size: 16 }) }),
74272
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { className: getClassName16("action"), onClick: onDelete, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Trash, { size: 16 }) })
74273
- ]
74343
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(CustomActionBar, { label, children: [
74344
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ActionBar.Action, { onClick: onDuplicate, label: "Duplicate", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Copy, { size: 16 }) }),
74345
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ActionBar.Action, { onClick: onDelete, label: "Delete", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Trash, { size: 16 }) })
74346
+ ] })
74274
74347
  }
74275
74348
  )
74276
74349
  }
74277
74350
  ),
74278
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: getClassName16("overlay") }),
74279
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: getClassName16("contents"), children })
74351
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: getClassName17("overlay") }),
74352
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: getClassName17("contents"), children })
74280
74353
  ]
74281
74354
  })
74282
74355
  )
@@ -74285,9 +74358,9 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74285
74358
  );
74286
74359
  };
74287
74360
  init_react_import2();
74288
- var styles_module_default11 = { "DropZone": "_DropZone_djoti_1", "DropZone-content": "_DropZone-content_djoti_10", "DropZone--userIsDragging": "_DropZone--userIsDragging_djoti_15", "DropZone--draggingOverArea": "_DropZone--draggingOverArea_djoti_19", "DropZone--draggingNewComponent": "_DropZone--draggingNewComponent_djoti_20", "DropZone--isAreaSelected": "_DropZone--isAreaSelected_djoti_26", "DropZone--hoveringOverArea": "_DropZone--hoveringOverArea_djoti_27", "DropZone--isDisabled": "_DropZone--isDisabled_djoti_28", "DropZone--isRootZone": "_DropZone--isRootZone_djoti_29", "DropZone--hasChildren": "_DropZone--hasChildren_djoti_30", "DropZone--isDestination": "_DropZone--isDestination_djoti_40", "DropZone-item": "_DropZone-item_djoti_52", "DropZone-hitbox": "_DropZone-hitbox_djoti_56" };
74361
+ var styles_module_default12 = { "DropZone": "_DropZone_djoti_1", "DropZone-content": "_DropZone-content_djoti_10", "DropZone--userIsDragging": "_DropZone--userIsDragging_djoti_15", "DropZone--draggingOverArea": "_DropZone--draggingOverArea_djoti_19", "DropZone--draggingNewComponent": "_DropZone--draggingNewComponent_djoti_20", "DropZone--isAreaSelected": "_DropZone--isAreaSelected_djoti_26", "DropZone--hoveringOverArea": "_DropZone--hoveringOverArea_djoti_27", "DropZone--isDisabled": "_DropZone--isDisabled_djoti_28", "DropZone--isRootZone": "_DropZone--isRootZone_djoti_29", "DropZone--hasChildren": "_DropZone--hasChildren_djoti_30", "DropZone--isDestination": "_DropZone--isDestination_djoti_40", "DropZone-item": "_DropZone-item_djoti_52", "DropZone-hitbox": "_DropZone-hitbox_djoti_56" };
74289
74362
  init_react_import2();
74290
- var import_react15 = require("react");
74363
+ var import_react16 = require("react");
74291
74364
  var import_use_debounce2 = (init_index_module(), __toCommonJS(index_module_exports));
74292
74365
  init_react_import2();
74293
74366
  var getZoneId2 = (zoneCompound) => {
@@ -74299,30 +74372,30 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74299
74372
  }
74300
74373
  return [rootDroppableId2, zoneCompound];
74301
74374
  };
74302
- var import_jsx_runtime222 = require("react/jsx-runtime");
74303
- var dropZoneContext2 = (0, import_react15.createContext)(null);
74375
+ var import_jsx_runtime24 = require("react/jsx-runtime");
74376
+ var dropZoneContext2 = (0, import_react16.createContext)(null);
74304
74377
  var DropZoneProvider = ({
74305
74378
  children,
74306
74379
  value
74307
74380
  }) => {
74308
- const [hoveringArea, setHoveringArea] = (0, import_react15.useState)(null);
74309
- const [hoveringZone, setHoveringZone] = (0, import_react15.useState)(
74381
+ const [hoveringArea, setHoveringArea] = (0, import_react16.useState)(null);
74382
+ const [hoveringZone, setHoveringZone] = (0, import_react16.useState)(
74310
74383
  rootDroppableId2
74311
74384
  );
74312
- const [hoveringComponent, setHoveringComponent] = (0, import_react15.useState)();
74385
+ const [hoveringComponent, setHoveringComponent] = (0, import_react16.useState)();
74313
74386
  const [hoveringAreaDb] = (0, import_use_debounce2.useDebounce)(hoveringArea, 75, { leading: false });
74314
- const [areasWithZones, setAreasWithZones] = (0, import_react15.useState)(
74387
+ const [areasWithZones, setAreasWithZones] = (0, import_react16.useState)(
74315
74388
  {}
74316
74389
  );
74317
- const [activeZones, setActiveZones] = (0, import_react15.useState)({});
74390
+ const [activeZones, setActiveZones] = (0, import_react16.useState)({});
74318
74391
  const { dispatch = null } = value ? value : {};
74319
- const registerZoneArea = (0, import_react15.useCallback)(
74392
+ const registerZoneArea = (0, import_react16.useCallback)(
74320
74393
  (area) => {
74321
74394
  setAreasWithZones((latest) => __spreadProps2(__spreadValues2({}, latest), { [area]: true }));
74322
74395
  },
74323
74396
  [setAreasWithZones]
74324
74397
  );
74325
- const registerZone = (0, import_react15.useCallback)(
74398
+ const registerZone = (0, import_react16.useCallback)(
74326
74399
  (zoneCompound) => {
74327
74400
  if (!dispatch) {
74328
74401
  return;
@@ -74335,7 +74408,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74335
74408
  },
74336
74409
  [setActiveZones, dispatch]
74337
74410
  );
74338
- const unregisterZone = (0, import_react15.useCallback)(
74411
+ const unregisterZone = (0, import_react16.useCallback)(
74339
74412
  (zoneCompound) => {
74340
74413
  if (!dispatch) {
74341
74414
  return;
@@ -74350,8 +74423,8 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74350
74423
  },
74351
74424
  [setActiveZones, dispatch]
74352
74425
  );
74353
- const [pathData, setPathData] = (0, import_react15.useState)();
74354
- const registerPath = (0, import_react15.useCallback)(
74426
+ const [pathData, setPathData] = (0, import_react16.useState)();
74427
+ const registerPath = (0, import_react16.useCallback)(
74355
74428
  (selector) => {
74356
74429
  if (!(value == null ? void 0 : value.data)) {
74357
74430
  return;
@@ -74376,8 +74449,8 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74376
74449
  },
74377
74450
  [value, setPathData]
74378
74451
  );
74379
- const [zoneWillDrag, setZoneWillDrag] = (0, import_react15.useState)("");
74380
- return /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(import_jsx_runtime222.Fragment, { children: value && /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
74452
+ const [zoneWillDrag, setZoneWillDrag] = (0, import_react16.useState)("");
74453
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_jsx_runtime24.Fragment, { children: value && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
74381
74454
  dropZoneContext2.Provider,
74382
74455
  {
74383
74456
  value: __spreadValues2({
@@ -74401,12 +74474,12 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74401
74474
  }
74402
74475
  ) });
74403
74476
  };
74404
- var import_jsx_runtime23 = require("react/jsx-runtime");
74405
- var getClassName17 = get_class_name_factory_default2("DropZone", styles_module_default11);
74477
+ var import_jsx_runtime25 = require("react/jsx-runtime");
74478
+ var getClassName18 = get_class_name_factory_default2("DropZone", styles_module_default12);
74406
74479
  function DropZoneEdit({ zone, allow, disallow, style: style2 }) {
74407
74480
  var _a3;
74408
74481
  const appContext22 = useAppContext2();
74409
- const ctx = (0, import_react16.useContext)(dropZoneContext2);
74482
+ const ctx = (0, import_react17.useContext)(dropZoneContext2);
74410
74483
  const {
74411
74484
  // These all need setting via context
74412
74485
  data,
@@ -74425,12 +74498,12 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74425
74498
  } = ctx || {};
74426
74499
  let content = data.content || [];
74427
74500
  let zoneCompound = rootDroppableId2;
74428
- (0, import_react16.useEffect)(() => {
74501
+ (0, import_react17.useEffect)(() => {
74429
74502
  if (areaId && registerZoneArea) {
74430
74503
  registerZoneArea(areaId);
74431
74504
  }
74432
74505
  }, [areaId]);
74433
- (0, import_react16.useEffect)(() => {
74506
+ (0, import_react17.useEffect)(() => {
74434
74507
  if (ctx == null ? void 0 : ctx.registerZone) {
74435
74508
  ctx == null ? void 0 : ctx.registerZone(zoneCompound);
74436
74509
  }
@@ -74456,7 +74529,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74456
74529
  const draggingOverArea = userIsDragging && zoneArea === draggedSourceArea;
74457
74530
  const draggingNewComponent = draggedSourceId == null ? void 0 : draggedSourceId.startsWith("component-list");
74458
74531
  if (!(ctx == null ? void 0 : ctx.config) || !ctx.setHoveringArea || !ctx.setHoveringZone || !ctx.setHoveringComponent || !ctx.setItemSelector || !ctx.registerPath || !ctx.dispatch) {
74459
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { children: "DropZone requires context to work." });
74532
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { children: "DropZone requires context to work." });
74460
74533
  }
74461
74534
  const {
74462
74535
  hoveringArea = "root",
@@ -74497,10 +74570,10 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74497
74570
  }
74498
74571
  const selectedItem = itemSelector ? getItem2(itemSelector, data) : null;
74499
74572
  const isAreaSelected = selectedItem && zoneArea === selectedItem.props.id;
74500
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
74573
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
74501
74574
  "div",
74502
74575
  {
74503
- className: getClassName17({
74576
+ className: getClassName18({
74504
74577
  isRootZone,
74505
74578
  userIsDragging,
74506
74579
  draggingOverArea,
@@ -74514,17 +74587,17 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74514
74587
  onMouseUp: () => {
74515
74588
  setZoneWillDrag("");
74516
74589
  },
74517
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
74590
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
74518
74591
  Droppable2,
74519
74592
  {
74520
74593
  droppableId: zoneCompound,
74521
74594
  direction: "vertical",
74522
74595
  isDropDisabled: !isEnabled,
74523
74596
  children: (provided, snapshot) => {
74524
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
74597
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
74525
74598
  "div",
74526
74599
  __spreadProps2(__spreadValues2({}, (provided || { droppableProps: {} }).droppableProps), {
74527
- className: getClassName17("content"),
74600
+ className: getClassName18("content"),
74528
74601
  ref: provided == null ? void 0 : provided.innerRef,
74529
74602
  style: style2,
74530
74603
  id: zoneCompound,
@@ -74551,25 +74624,25 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74551
74624
  "draggable-"
74552
74625
  )[1] === componentId;
74553
74626
  const containsZone = areasWithZones ? areasWithZones[componentId] : false;
74554
- const Render2 = config.components[item.type] ? config.components[item.type].render : () => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { padding: 48, textAlign: "center" }, children: [
74627
+ const Render2 = config.components[item.type] ? config.components[item.type].render : () => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { style: { padding: 48, textAlign: "center" }, children: [
74555
74628
  "No configuration for ",
74556
74629
  item.type
74557
74630
  ] });
74558
74631
  const componentConfig = config.components[item.type];
74559
74632
  const label = (_b2 = componentConfig == null ? void 0 : componentConfig["label"]) != null ? _b2 : item.type.toString();
74560
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
74633
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
74561
74634
  "div",
74562
74635
  {
74563
- className: getClassName17("item"),
74636
+ className: getClassName18("item"),
74564
74637
  style: { zIndex: isDragging2 ? 1 : void 0 },
74565
74638
  children: [
74566
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
74639
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
74567
74640
  DropZoneProvider,
74568
74641
  {
74569
74642
  value: __spreadProps2(__spreadValues2({}, ctx), {
74570
74643
  areaId: componentId
74571
74644
  }),
74572
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
74645
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
74573
74646
  DraggableComponent,
74574
74647
  {
74575
74648
  label,
@@ -74636,15 +74709,15 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74636
74709
  style: {
74637
74710
  pointerEvents: userIsDragging && draggingNewComponent ? "all" : void 0
74638
74711
  },
74639
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: getClassName17("renderWrapper"), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Render2, __spreadValues2({}, defaultedProps)) })
74712
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: getClassName18("renderWrapper"), children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Render2, __spreadValues2({}, defaultedProps)) })
74640
74713
  }
74641
74714
  )
74642
74715
  }
74643
74716
  ),
74644
- userIsDragging && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
74717
+ userIsDragging && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
74645
74718
  "div",
74646
74719
  {
74647
- className: getClassName17("hitbox"),
74720
+ className: getClassName18("hitbox"),
74648
74721
  onMouseOver: (e2) => {
74649
74722
  e2.stopPropagation();
74650
74723
  setHoveringArea(zoneArea);
@@ -74658,7 +74731,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74658
74731
  );
74659
74732
  }),
74660
74733
  provided == null ? void 0 : provided.placeholder,
74661
- (snapshot == null ? void 0 : snapshot.isDraggingOver) && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
74734
+ (snapshot == null ? void 0 : snapshot.isDraggingOver) && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
74662
74735
  "div",
74663
74736
  {
74664
74737
  "data-puck-placeholder": true,
@@ -74679,7 +74752,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74679
74752
  );
74680
74753
  }
74681
74754
  function DropZoneRender({ zone }) {
74682
- const ctx = (0, import_react16.useContext)(dropZoneContext2);
74755
+ const ctx = (0, import_react17.useContext)(dropZoneContext2);
74683
74756
  const { data, areaId = "root", config } = ctx || {};
74684
74757
  let zoneCompound = rootDroppableId2;
74685
74758
  let content = (data == null ? void 0 : data.content) || [];
@@ -74690,14 +74763,14 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74690
74763
  zoneCompound = `${areaId}:${zone}`;
74691
74764
  content = setupZone2(data, zoneCompound).zones[zoneCompound];
74692
74765
  }
74693
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_jsx_runtime23.Fragment, { children: content.map((item) => {
74766
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx_runtime25.Fragment, { children: content.map((item) => {
74694
74767
  const Component = config.components[item.type];
74695
74768
  if (Component) {
74696
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
74769
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
74697
74770
  DropZoneProvider,
74698
74771
  {
74699
74772
  value: { data, config, areaId: item.props.id },
74700
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
74773
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
74701
74774
  Component.render,
74702
74775
  __spreadProps2(__spreadValues2({}, item.props), {
74703
74776
  puck: { renderDropZone: DropZone }
@@ -74711,16 +74784,16 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74711
74784
  }) });
74712
74785
  }
74713
74786
  function DropZone(props) {
74714
- const ctx = (0, import_react16.useContext)(dropZoneContext2);
74787
+ const ctx = (0, import_react17.useContext)(dropZoneContext2);
74715
74788
  if ((ctx == null ? void 0 : ctx.mode) === "edit") {
74716
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DropZoneEdit, __spreadValues2({}, props));
74789
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DropZoneEdit, __spreadValues2({}, props));
74717
74790
  }
74718
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DropZoneRender, __spreadValues2({}, props));
74791
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DropZoneRender, __spreadValues2({}, props));
74719
74792
  }
74720
74793
  init_react_import2();
74721
- var import_react30 = require("react");
74794
+ var import_react31 = require("react");
74722
74795
  init_react_import2();
74723
- var import_react17 = require("react");
74796
+ var import_react18 = require("react");
74724
74797
  init_react_import2();
74725
74798
  var getFrame3 = () => {
74726
74799
  let frame = document.querySelector("#preview-frame");
@@ -74731,7 +74804,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74731
74804
  };
74732
74805
  var usePlaceholderStyle = () => {
74733
74806
  const queryAttr = "data-rfd-drag-handle-draggable-id";
74734
- const [placeholderStyle, setPlaceholderStyle] = (0, import_react17.useState)();
74807
+ const [placeholderStyle, setPlaceholderStyle] = (0, import_react18.useState)();
74735
74808
  const onDragStartOrUpdate = (draggedItem) => {
74736
74809
  var _a3;
74737
74810
  const draggableId = draggedItem.draggableId;
@@ -74776,9 +74849,9 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74776
74849
  };
74777
74850
  init_react_import2();
74778
74851
  init_react_import2();
74779
- var styles_module_default12 = { "SidebarSection": "_SidebarSection_125qe_1", "SidebarSection-title": "_SidebarSection-title_125qe_12", "SidebarSection--noBorderTop": "_SidebarSection--noBorderTop_125qe_20", "SidebarSection-content": "_SidebarSection-content_125qe_24", "SidebarSection--noPadding": "_SidebarSection--noPadding_125qe_28", "SidebarSection-breadcrumbLabel": "_SidebarSection-breadcrumbLabel_125qe_41", "SidebarSection-breadcrumbs": "_SidebarSection-breadcrumbs_125qe_70", "SidebarSection-breadcrumb": "_SidebarSection-breadcrumb_125qe_41", "SidebarSection-heading": "_SidebarSection-heading_125qe_82", "SidebarSection-loadingOverlay": "_SidebarSection-loadingOverlay_125qe_86" };
74852
+ var styles_module_default13 = { "SidebarSection": "_SidebarSection_125qe_1", "SidebarSection-title": "_SidebarSection-title_125qe_12", "SidebarSection--noBorderTop": "_SidebarSection--noBorderTop_125qe_20", "SidebarSection-content": "_SidebarSection-content_125qe_24", "SidebarSection--noPadding": "_SidebarSection--noPadding_125qe_28", "SidebarSection-breadcrumbLabel": "_SidebarSection-breadcrumbLabel_125qe_41", "SidebarSection-breadcrumbs": "_SidebarSection-breadcrumbs_125qe_70", "SidebarSection-breadcrumb": "_SidebarSection-breadcrumb_125qe_41", "SidebarSection-heading": "_SidebarSection-heading_125qe_82", "SidebarSection-loadingOverlay": "_SidebarSection-loadingOverlay_125qe_86" };
74780
74853
  init_react_import2();
74781
- var import_react18 = require("react");
74854
+ var import_react19 = require("react");
74782
74855
  var convertPathDataToBreadcrumbs2 = (selectedItem, pathData, data) => {
74783
74856
  const id = selectedItem ? selectedItem == null ? void 0 : selectedItem.props.id : "";
74784
74857
  const currentPathData = pathData && id && pathData[id] ? __spreadValues2({}, pathData[id]) : { label: "Page", path: [] };
@@ -74828,8 +74901,8 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74828
74901
  state: { data },
74829
74902
  selectedItem
74830
74903
  } = useAppContext2();
74831
- const dzContext = (0, import_react18.useContext)(dropZoneContext2);
74832
- return (0, import_react18.useMemo)(() => {
74904
+ const dzContext = (0, import_react19.useContext)(dropZoneContext2);
74905
+ return (0, import_react19.useMemo)(() => {
74833
74906
  const breadcrumbs = convertPathDataToBreadcrumbs2(
74834
74907
  selectedItem,
74835
74908
  dzContext == null ? void 0 : dzContext.pathData,
@@ -74841,8 +74914,8 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74841
74914
  return breadcrumbs;
74842
74915
  }, [selectedItem, dzContext == null ? void 0 : dzContext.pathData, renderCount]);
74843
74916
  };
74844
- var import_jsx_runtime24 = require("react/jsx-runtime");
74845
- var getClassName18 = get_class_name_factory_default2("SidebarSection", styles_module_default12);
74917
+ var import_jsx_runtime26 = require("react/jsx-runtime");
74918
+ var getClassName19 = get_class_name_factory_default2("SidebarSection", styles_module_default13);
74846
74919
  var SidebarSection2 = ({
74847
74920
  children,
74848
74921
  title,
@@ -74854,28 +74927,28 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
74854
74927
  }) => {
74855
74928
  const { setUi } = useAppContext2();
74856
74929
  const breadcrumbs = useBreadcrumbs2(1);
74857
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
74930
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
74858
74931
  "div",
74859
74932
  {
74860
- className: getClassName18({ noBorderTop, noPadding }),
74933
+ className: getClassName19({ noBorderTop, noPadding }),
74861
74934
  style: { background },
74862
74935
  children: [
74863
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: getClassName18("title"), children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: getClassName18("breadcrumbs"), children: [
74864
- showBreadcrumbs ? breadcrumbs.map((breadcrumb, i2) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: getClassName18("breadcrumb"), children: [
74865
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
74936
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: getClassName19("title"), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: getClassName19("breadcrumbs"), children: [
74937
+ showBreadcrumbs ? breadcrumbs.map((breadcrumb, i2) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: getClassName19("breadcrumb"), children: [
74938
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
74866
74939
  "button",
74867
74940
  {
74868
- className: getClassName18("breadcrumbLabel"),
74941
+ className: getClassName19("breadcrumbLabel"),
74869
74942
  onClick: () => setUi({ itemSelector: breadcrumb.selector }),
74870
74943
  children: breadcrumb.label
74871
74944
  }
74872
74945
  ),
74873
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ChevronRight2, { size: 16 })
74946
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ChevronRight2, { size: 16 })
74874
74947
  ] }, i2)) : null,
74875
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: getClassName18("heading"), children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Heading2, { rank: 2, size: "xs", children: title }) })
74948
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: getClassName19("heading"), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Heading2, { rank: 2, size: "xs", children: title }) })
74876
74949
  ] }) }),
74877
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: getClassName18("content"), children }),
74878
- isLoading && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: getClassName18("loadingOverlay"), children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Loader2, { size: 32 }) })
74950
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: getClassName19("content"), children }),
74951
+ isLoading && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: getClassName19("loadingOverlay"), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Loader2, { size: 32 }) })
74879
74952
  ]
74880
74953
  }
74881
74954
  );
@@ -75222,7 +75295,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75222
75295
  return appState;
75223
75296
  };
75224
75297
  init_react_import2();
75225
- var import_react19 = require("react");
75298
+ var import_react20 = require("react");
75226
75299
  init_react_import2();
75227
75300
  init_react_import2();
75228
75301
  var getChanged = (newItem, oldItem) => {
@@ -75319,13 +75392,13 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75319
75392
  return data.root;
75320
75393
  });
75321
75394
  var useResolvedData = (appState, config, dispatch) => {
75322
- const [{ resolverKey, newAppState }, setResolverState] = (0, import_react19.useState)({
75395
+ const [{ resolverKey, newAppState }, setResolverState] = (0, import_react20.useState)({
75323
75396
  resolverKey: 0,
75324
75397
  newAppState: appState
75325
75398
  });
75326
- const [componentState, setComponentState] = (0, import_react19.useState)({});
75399
+ const [componentState, setComponentState] = (0, import_react20.useState)({});
75327
75400
  const deferredSetStates = {};
75328
- const setComponentLoading = (0, import_react19.useCallback)(
75401
+ const setComponentLoading = (0, import_react20.useCallback)(
75329
75402
  (id, loading, defer2 = 0) => {
75330
75403
  if (deferredSetStates[id]) {
75331
75404
  clearTimeout(deferredSetStates[id]);
@@ -75395,10 +75468,10 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75395
75468
  });
75396
75469
  yield Promise.all(promises);
75397
75470
  });
75398
- (0, import_react19.useEffect)(() => {
75471
+ (0, import_react20.useEffect)(() => {
75399
75472
  runResolvers();
75400
75473
  }, [resolverKey]);
75401
- const resolveData = (0, import_react19.useCallback)((newAppState2 = appState) => {
75474
+ const resolveData = (0, import_react20.useCallback)((newAppState2 = appState) => {
75402
75475
  setResolverState((curr) => ({
75403
75476
  resolverKey: curr.resolverKey + 1,
75404
75477
  newAppState: newAppState2
@@ -75411,9 +75484,9 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75411
75484
  };
75412
75485
  init_react_import2();
75413
75486
  init_react_import2();
75414
- var styles_module_default13 = { "MenuBar": "_MenuBar_8pf8c_1", "MenuBar--menuOpen": "_MenuBar--menuOpen_8pf8c_14", "MenuBar-inner": "_MenuBar-inner_8pf8c_29", "MenuBar-history": "_MenuBar-history_8pf8c_45" };
75415
- var import_jsx_runtime25 = require("react/jsx-runtime");
75416
- var getClassName19 = get_class_name_factory_default2("MenuBar", styles_module_default13);
75487
+ var styles_module_default14 = { "MenuBar": "_MenuBar_8pf8c_1", "MenuBar--menuOpen": "_MenuBar--menuOpen_8pf8c_14", "MenuBar-inner": "_MenuBar-inner_8pf8c_29", "MenuBar-history": "_MenuBar-history_8pf8c_45" };
75488
+ var import_jsx_runtime27 = require("react/jsx-runtime");
75489
+ var getClassName20 = get_class_name_factory_default2("MenuBar", styles_module_default14);
75417
75490
  var MenuBar = ({
75418
75491
  appState,
75419
75492
  data = { content: [], root: {} },
@@ -75427,10 +75500,10 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75427
75500
  history: { back, forward, historyStore }
75428
75501
  } = useAppContext2();
75429
75502
  const { hasFuture = false, hasPast = false } = historyStore || {};
75430
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
75503
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
75431
75504
  "div",
75432
75505
  {
75433
- className: getClassName19({ menuOpen }),
75506
+ className: getClassName20({ menuOpen }),
75434
75507
  onClick: (event) => {
75435
75508
  var _a3;
75436
75509
  const element = event.target;
@@ -75441,12 +75514,12 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75441
75514
  setMenuOpen(false);
75442
75515
  }
75443
75516
  },
75444
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: getClassName19("inner"), children: [
75445
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: getClassName19("history"), children: [
75446
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(IconButton, { title: "undo", disabled: !hasPast, onClick: back, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Undo2, { size: 21 }) }),
75447
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(IconButton, { title: "redo", disabled: !hasFuture, onClick: forward, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Redo2, { size: 21 }) })
75517
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: getClassName20("inner"), children: [
75518
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: getClassName20("history"), children: [
75519
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconButton, { title: "undo", disabled: !hasPast, onClick: back, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Undo2, { size: 21 }) }),
75520
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconButton, { title: "redo", disabled: !hasFuture, onClick: forward, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Redo2, { size: 21 }) })
75448
75521
  ] }),
75449
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx_runtime25.Fragment, { children: renderHeaderActions && renderHeaderActions({
75522
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_jsx_runtime27.Fragment, { children: renderHeaderActions && renderHeaderActions({
75450
75523
  state: appState,
75451
75524
  dispatch
75452
75525
  }) })
@@ -75455,20 +75528,20 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75455
75528
  );
75456
75529
  };
75457
75530
  init_react_import2();
75458
- var styles_module_default14 = { "Puck": "_Puck_1g88c_19", "Puck-portal": "_Puck-portal_1g88c_24", "PuckLayout": "_PuckLayout_1g88c_31", "PuckLayout-inner": "_PuckLayout-inner_1g88c_39", "PuckLayout--mounted": "_PuckLayout--mounted_1g88c_51", "PuckLayout--leftSideBarVisible": "_PuckLayout--leftSideBarVisible_1g88c_55", "PuckLayout--rightSideBarVisible": "_PuckLayout--rightSideBarVisible_1g88c_61", "PuckLayout-mounted": "_PuckLayout-mounted_1g88c_75", "PuckLayout-header": "_PuckLayout-header_1g88c_116", "PuckLayout-headerInner": "_PuckLayout-headerInner_1g88c_125", "PuckLayout-headerToggle": "_PuckLayout-headerToggle_1g88c_135", "PuckLayout-rightSideBarToggle": "_PuckLayout-rightSideBarToggle_1g88c_142", "PuckLayout-leftSideBarToggle": "_PuckLayout-leftSideBarToggle_1g88c_143", "PuckLayout-headerTitle": "_PuckLayout-headerTitle_1g88c_147", "PuckLayout-headerPath": "_PuckLayout-headerPath_1g88c_151", "PuckLayout-headerTools": "_PuckLayout-headerTools_1g88c_158", "PuckLayout-menuButton": "_PuckLayout-menuButton_1g88c_164", "PuckLayout--menuOpen": "_PuckLayout--menuOpen_1g88c_169", "PuckLayout-leftSideBar": "_PuckLayout-leftSideBar_1g88c_143", "PuckLayout-rightSideBar": "_PuckLayout-rightSideBar_1g88c_142" };
75531
+ var styles_module_default15 = { "Puck": "_Puck_1g88c_19", "Puck-portal": "_Puck-portal_1g88c_24", "PuckLayout": "_PuckLayout_1g88c_31", "PuckLayout-inner": "_PuckLayout-inner_1g88c_39", "PuckLayout--mounted": "_PuckLayout--mounted_1g88c_51", "PuckLayout--leftSideBarVisible": "_PuckLayout--leftSideBarVisible_1g88c_55", "PuckLayout--rightSideBarVisible": "_PuckLayout--rightSideBarVisible_1g88c_61", "PuckLayout-mounted": "_PuckLayout-mounted_1g88c_75", "PuckLayout-header": "_PuckLayout-header_1g88c_116", "PuckLayout-headerInner": "_PuckLayout-headerInner_1g88c_125", "PuckLayout-headerToggle": "_PuckLayout-headerToggle_1g88c_135", "PuckLayout-rightSideBarToggle": "_PuckLayout-rightSideBarToggle_1g88c_142", "PuckLayout-leftSideBarToggle": "_PuckLayout-leftSideBarToggle_1g88c_143", "PuckLayout-headerTitle": "_PuckLayout-headerTitle_1g88c_147", "PuckLayout-headerPath": "_PuckLayout-headerPath_1g88c_151", "PuckLayout-headerTools": "_PuckLayout-headerTools_1g88c_158", "PuckLayout-menuButton": "_PuckLayout-menuButton_1g88c_164", "PuckLayout--menuOpen": "_PuckLayout--menuOpen_1g88c_169", "PuckLayout-leftSideBar": "_PuckLayout-leftSideBar_1g88c_143", "PuckLayout-rightSideBar": "_PuckLayout-rightSideBar_1g88c_142" };
75459
75532
  init_react_import2();
75460
75533
  init_react_import2();
75461
- var styles_module_default15 = { "PuckFields": "_PuckFields_jp3lw_1", "PuckFields--isLoading": "_PuckFields--isLoading_jp3lw_6", "PuckFields-loadingOverlay": "_PuckFields-loadingOverlay_jp3lw_10", "PuckFields-loadingOverlayInner": "_PuckFields-loadingOverlayInner_jp3lw_25" };
75462
- var import_react20 = require("react");
75463
- var import_jsx_runtime26 = require("react/jsx-runtime");
75464
- var getClassName20 = get_class_name_factory_default2("PuckFields", styles_module_default15);
75534
+ var styles_module_default16 = { "PuckFields": "_PuckFields_jp3lw_1", "PuckFields--isLoading": "_PuckFields--isLoading_jp3lw_6", "PuckFields-loadingOverlay": "_PuckFields-loadingOverlay_jp3lw_10", "PuckFields-loadingOverlayInner": "_PuckFields-loadingOverlayInner_jp3lw_25" };
75535
+ var import_react21 = require("react");
75536
+ var import_jsx_runtime28 = require("react/jsx-runtime");
75537
+ var getClassName21 = get_class_name_factory_default2("PuckFields", styles_module_default16);
75465
75538
  var defaultPageFields = {
75466
75539
  title: { type: "text" }
75467
75540
  };
75468
75541
  var DefaultFields = ({
75469
75542
  children
75470
75543
  }) => {
75471
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children });
75544
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_jsx_runtime28.Fragment, { children });
75472
75545
  };
75473
75546
  var useResolvedFields = () => {
75474
75547
  var _a3;
@@ -75478,14 +75551,14 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75478
75551
  const componentConfig = selectedItem ? config.components[selectedItem.type] : null;
75479
75552
  const defaultFields = selectedItem ? componentConfig == null ? void 0 : componentConfig.fields : rootFields;
75480
75553
  const rootProps = data.root.props || data.root;
75481
- const [lastSelectedData, setLastSelectedData] = (0, import_react20.useState)(
75554
+ const [lastSelectedData, setLastSelectedData] = (0, import_react21.useState)(
75482
75555
  {}
75483
75556
  );
75484
- const [resolvedFields, setResolvedFields] = (0, import_react20.useState)(defaultFields || {});
75485
- const [fieldsLoading, setFieldsLoading] = (0, import_react20.useState)(false);
75557
+ const [resolvedFields, setResolvedFields] = (0, import_react21.useState)(defaultFields || {});
75558
+ const [fieldsLoading, setFieldsLoading] = (0, import_react21.useState)(false);
75486
75559
  const defaultResolveFields = (_componentData, _params) => defaultFields;
75487
75560
  const componentData = selectedItem ? selectedItem : { props: rootProps, readOnly: data.root.readOnly };
75488
- const resolveFields = (0, import_react20.useCallback)(
75561
+ const resolveFields = (0, import_react21.useCallback)(
75489
75562
  (..._0) => __async2(void 0, [..._0], function* (fields = {}) {
75490
75563
  var _a22, _b2, _c;
75491
75564
  const lastData = ((_a22 = lastSelectedData.props) == null ? void 0 : _a22.id) === componentData.props.id ? lastSelectedData : {};
@@ -75521,7 +75594,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75521
75594
  }),
75522
75595
  [data, config, componentData, selectedItem, resolvedFields, state]
75523
75596
  );
75524
- (0, import_react20.useEffect)(() => {
75597
+ (0, import_react21.useEffect)(() => {
75525
75598
  setFieldsLoading(true);
75526
75599
  resolveFields(defaultFields).then((fields) => {
75527
75600
  setResolvedFields(fields || {});
@@ -75547,16 +75620,16 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75547
75620
  const componentResolving = selectedItem ? (_a3 = componentState[selectedItem == null ? void 0 : selectedItem.props.id]) == null ? void 0 : _a3.loading : (_b2 = componentState["puck-root"]) == null ? void 0 : _b2.loading;
75548
75621
  const isLoading = fieldsResolving || componentResolving;
75549
75622
  const rootProps = data.root.props || data.root;
75550
- const Wrapper = (0, import_react20.useMemo)(() => overrides.fields || DefaultFields, [overrides]);
75551
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
75623
+ const Wrapper = (0, import_react21.useMemo)(() => overrides.fields || DefaultFields, [overrides]);
75624
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
75552
75625
  "form",
75553
75626
  {
75554
- className: getClassName20(),
75627
+ className: getClassName21(),
75555
75628
  onSubmit: (e2) => {
75556
75629
  e2.preventDefault();
75557
75630
  },
75558
75631
  children: [
75559
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Wrapper, { isLoading, itemSelector, children: Object.keys(fields).map((fieldName) => {
75632
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Wrapper, { isLoading, itemSelector, children: Object.keys(fields).map((fieldName) => {
75560
75633
  const field = fields[fieldName];
75561
75634
  if (!(field == null ? void 0 : field.type)) return null;
75562
75635
  const onChange = (value, updatedUi) => {
@@ -75623,7 +75696,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75623
75696
  };
75624
75697
  if (selectedItem && itemSelector) {
75625
75698
  const { readOnly = {} } = selectedItem;
75626
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
75699
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
75627
75700
  AutoFieldPrivate,
75628
75701
  {
75629
75702
  field,
@@ -75637,7 +75710,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75637
75710
  );
75638
75711
  } else {
75639
75712
  const { readOnly = {} } = data.root;
75640
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
75713
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
75641
75714
  AutoFieldPrivate,
75642
75715
  {
75643
75716
  field,
@@ -75651,26 +75724,26 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75651
75724
  );
75652
75725
  }
75653
75726
  }) }),
75654
- isLoading && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: getClassName20("loadingOverlay"), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: getClassName20("loadingOverlayInner"), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Loader2, { size: 16 }) }) })
75727
+ isLoading && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: getClassName21("loadingOverlay"), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: getClassName21("loadingOverlayInner"), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Loader2, { size: 16 }) }) })
75655
75728
  ]
75656
75729
  }
75657
75730
  );
75658
75731
  };
75659
75732
  init_react_import2();
75660
75733
  init_react_import2();
75661
- var import_react21 = require("react");
75734
+ var import_react222 = require("react");
75662
75735
  init_react_import2();
75663
75736
  init_react_import2();
75664
- var styles_module_default16 = { "ComponentList": "_ComponentList_odh9d_1", "ComponentList--isExpanded": "_ComponentList--isExpanded_odh9d_5", "ComponentList-content": "_ComponentList-content_odh9d_9", "ComponentList-title": "_ComponentList-title_odh9d_17", "ComponentList-titleIcon": "_ComponentList-titleIcon_odh9d_53" };
75665
- var import_jsx_runtime27 = require("react/jsx-runtime");
75666
- var getClassName21 = get_class_name_factory_default2("ComponentList", styles_module_default16);
75737
+ var styles_module_default17 = { "ComponentList": "_ComponentList_odh9d_1", "ComponentList--isExpanded": "_ComponentList--isExpanded_odh9d_5", "ComponentList-content": "_ComponentList-content_odh9d_9", "ComponentList-title": "_ComponentList-title_odh9d_17", "ComponentList-titleIcon": "_ComponentList-titleIcon_odh9d_53" };
75738
+ var import_jsx_runtime29 = require("react/jsx-runtime");
75739
+ var getClassName222 = get_class_name_factory_default2("ComponentList", styles_module_default17);
75667
75740
  var ComponentListItem = ({
75668
75741
  name,
75669
75742
  label,
75670
75743
  index
75671
75744
  }) => {
75672
75745
  const { overrides } = useAppContext2();
75673
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Drawer.Item, { label, name, index, children: overrides.componentItem });
75746
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Drawer.Item, { label, name, index, children: overrides.componentItem });
75674
75747
  };
75675
75748
  var ComponentList = ({
75676
75749
  children,
@@ -75679,11 +75752,11 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75679
75752
  }) => {
75680
75753
  const { config, state, setUi } = useAppContext2();
75681
75754
  const { expanded = true } = state.ui.componentList[id] || {};
75682
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: getClassName21({ isExpanded: expanded }), children: [
75683
- title && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
75755
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: getClassName222({ isExpanded: expanded }), children: [
75756
+ title && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
75684
75757
  "button",
75685
75758
  {
75686
- className: getClassName21("title"),
75759
+ className: getClassName222("title"),
75687
75760
  onClick: () => setUi({
75688
75761
  componentList: __spreadProps2(__spreadValues2({}, state.ui.componentList), {
75689
75762
  [id]: __spreadProps2(__spreadValues2({}, state.ui.componentList[id]), {
@@ -75693,14 +75766,14 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75693
75766
  }),
75694
75767
  title: expanded ? `Collapse${title ? ` ${title}` : ""}` : `Expand${title ? ` ${title}` : ""}`,
75695
75768
  children: [
75696
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { children: title }),
75697
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: getClassName21("titleIcon"), children: expanded ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChevronUp, { size: 12 }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChevronDown, { size: 12 }) })
75769
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { children: title }),
75770
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: getClassName222("titleIcon"), children: expanded ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ChevronUp, { size: 12 }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ChevronDown, { size: 12 }) })
75698
75771
  ]
75699
75772
  }
75700
75773
  ),
75701
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: getClassName21("content"), children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Drawer, { droppableId: title, children: children || Object.keys(config.components).map((componentKey, i2) => {
75774
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: getClassName222("content"), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Drawer, { droppableId: title, children: children || Object.keys(config.components).map((componentKey, i2) => {
75702
75775
  var _a3;
75703
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
75776
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
75704
75777
  ComponentListItem,
75705
75778
  {
75706
75779
  label: (_a3 = config.components[componentKey]["label"]) != null ? _a3 : componentKey,
@@ -75713,10 +75786,10 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75713
75786
  ] });
75714
75787
  };
75715
75788
  ComponentList.Item = ComponentListItem;
75716
- var import_jsx_runtime28 = require("react/jsx-runtime");
75789
+ var import_jsx_runtime30 = require("react/jsx-runtime");
75717
75790
  var useComponentList = (config, ui) => {
75718
- const [componentList, setComponentList] = (0, import_react21.useState)();
75719
- (0, import_react21.useEffect)(() => {
75791
+ const [componentList, setComponentList] = (0, import_react222.useState)();
75792
+ (0, import_react222.useEffect)(() => {
75720
75793
  var _a3, _b2, _c;
75721
75794
  if (Object.keys(ui.componentList).length > 0) {
75722
75795
  const matchedComponents = [];
@@ -75726,7 +75799,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75726
75799
  if (category.visible === false || !category.components) {
75727
75800
  return null;
75728
75801
  }
75729
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
75802
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
75730
75803
  ComponentList,
75731
75804
  {
75732
75805
  id: categoryKey,
@@ -75735,7 +75808,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75735
75808
  var _a22;
75736
75809
  matchedComponents.push(componentName);
75737
75810
  const componentConf = config.components[componentName] || {};
75738
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
75811
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
75739
75812
  ComponentList.Item,
75740
75813
  {
75741
75814
  label: (_a22 = componentConf["label"]) != null ? _a22 : componentName,
@@ -75755,7 +75828,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75755
75828
  );
75756
75829
  if (remainingComponents.length > 0 && !((_a3 = ui.componentList.other) == null ? void 0 : _a3.components) && ((_b2 = ui.componentList.other) == null ? void 0 : _b2.visible) !== false) {
75757
75830
  _componentList.push(
75758
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
75831
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
75759
75832
  ComponentList,
75760
75833
  {
75761
75834
  id: "other",
@@ -75763,7 +75836,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75763
75836
  children: remainingComponents.map((componentName, i2) => {
75764
75837
  var _a22;
75765
75838
  const componentConf = config.components[componentName] || {};
75766
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
75839
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
75767
75840
  ComponentList.Item,
75768
75841
  {
75769
75842
  name: componentName,
@@ -75783,21 +75856,21 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75783
75856
  }, [config.categories, config.components, ui.componentList]);
75784
75857
  return componentList;
75785
75858
  };
75786
- var import_react222 = require("react");
75787
- var import_jsx_runtime29 = require("react/jsx-runtime");
75859
+ var import_react23 = require("react");
75860
+ var import_jsx_runtime31 = require("react/jsx-runtime");
75788
75861
  var Components = () => {
75789
75862
  const { config, state, overrides } = useAppContext2();
75790
75863
  const componentList = useComponentList(config, state.ui);
75791
- const Wrapper = (0, import_react222.useMemo)(() => overrides.components || "div", [overrides]);
75792
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Wrapper, { children: componentList ? componentList : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ComponentList, { id: "all" }) });
75864
+ const Wrapper = (0, import_react23.useMemo)(() => overrides.components || "div", [overrides]);
75865
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Wrapper, { children: componentList ? componentList : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ComponentList, { id: "all" }) });
75793
75866
  };
75794
75867
  init_react_import2();
75795
- var import_react24 = require("react");
75868
+ var import_react25 = require("react");
75796
75869
  init_react_import2();
75797
- var import_react23 = __toESM2(require("react"));
75870
+ var import_react24 = __toESM2(require("react"));
75798
75871
  var import_react_frame_component = __toESM2(require_lib());
75799
75872
  var import_object_hash = __toESM2(require_object_hash());
75800
- var import_jsx_runtime30 = require("react/jsx-runtime");
75873
+ var import_jsx_runtime322 = require("react/jsx-runtime");
75801
75874
  var styleSelector = 'style, link[rel="stylesheet"]';
75802
75875
  var collectStyles = (doc) => {
75803
75876
  const collected = [];
@@ -75840,7 +75913,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75840
75913
  onStylesLoaded = () => null
75841
75914
  }) => {
75842
75915
  const { document: doc, window: win } = (0, import_react_frame_component.useFrame)();
75843
- (0, import_react23.useEffect)(() => {
75916
+ (0, import_react24.useEffect)(() => {
75844
75917
  if (!win || !doc) {
75845
75918
  return () => {
75846
75919
  };
@@ -75997,23 +76070,23 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
75997
76070
  observer.disconnect();
75998
76071
  };
75999
76072
  }, []);
76000
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_jsx_runtime30.Fragment, { children });
76073
+ return /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(import_jsx_runtime322.Fragment, { children });
76001
76074
  };
76002
- var AutoFrameComponent = import_react23.default.forwardRef(
76075
+ var AutoFrameComponent = import_react24.default.forwardRef(
76003
76076
  function(_a3, ref2) {
76004
76077
  var _b2 = _a3, { children, debug, onStylesLoaded } = _b2, props = __objRest2(_b2, ["children", "debug", "onStylesLoaded"]);
76005
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_frame_component.default, __spreadProps2(__spreadValues2({}, props), { ref: ref2, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CopyHostStyles, { debug, onStylesLoaded, children }) }));
76078
+ return /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(import_react_frame_component.default, __spreadProps2(__spreadValues2({}, props), { ref: ref2, children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(CopyHostStyles, { debug, onStylesLoaded, children }) }));
76006
76079
  }
76007
76080
  );
76008
76081
  AutoFrameComponent.displayName = "AutoFrameComponent";
76009
76082
  var AutoFrame_default = AutoFrameComponent;
76010
76083
  init_react_import2();
76011
- var styles_module_default17 = { "PuckPreview": "_PuckPreview_rxwlr_1", "PuckPreview-frame": "_PuckPreview-frame_rxwlr_5" };
76012
- var import_jsx_runtime31 = require("react/jsx-runtime");
76013
- var getClassName222 = get_class_name_factory_default2("PuckPreview", styles_module_default17);
76084
+ var styles_module_default18 = { "PuckPreview": "_PuckPreview_rxwlr_1", "PuckPreview-frame": "_PuckPreview-frame_rxwlr_5" };
76085
+ var import_jsx_runtime33 = require("react/jsx-runtime");
76086
+ var getClassName23 = get_class_name_factory_default2("PuckPreview", styles_module_default18);
76014
76087
  var Preview = ({ id = "puck-preview" }) => {
76015
76088
  const { config, dispatch, state, setStatus, iframe } = useAppContext2();
76016
- const Page = (0, import_react24.useCallback)(
76089
+ const Page = (0, import_react25.useCallback)(
76017
76090
  (pageProps) => {
76018
76091
  var _a3, _b2;
76019
76092
  return ((_a3 = config.root) == null ? void 0 : _a3.render) ? (_b2 = config.root) == null ? void 0 : _b2.render(__spreadProps2(__spreadValues2({
@@ -76022,33 +76095,33 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76022
76095
  editMode: true,
76023
76096
  // DEPRECATED
76024
76097
  puck: { renderDropZone: DropZone, isEditing: true }
76025
- })) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_jsx_runtime31.Fragment, { children: pageProps.children });
76098
+ })) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_jsx_runtime33.Fragment, { children: pageProps.children });
76026
76099
  },
76027
76100
  [config.root]
76028
76101
  );
76029
76102
  const rootProps = state.data.root.props || state.data.root;
76030
- const ref2 = (0, import_react24.useRef)(null);
76031
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
76103
+ const ref2 = (0, import_react25.useRef)(null);
76104
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
76032
76105
  "div",
76033
76106
  {
76034
- className: getClassName222(),
76107
+ className: getClassName23(),
76035
76108
  id,
76036
76109
  onClick: () => {
76037
76110
  dispatch({ type: "setUi", ui: __spreadProps2(__spreadValues2({}, state.ui), { itemSelector: null }) });
76038
76111
  },
76039
- children: iframe.enabled ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
76112
+ children: iframe.enabled ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
76040
76113
  AutoFrame_default,
76041
76114
  {
76042
76115
  id: "preview-frame",
76043
- className: getClassName222("frame"),
76116
+ className: getClassName23("frame"),
76044
76117
  "data-rfd-iframe": true,
76045
76118
  ref: ref2,
76046
76119
  onStylesLoaded: () => {
76047
76120
  setStatus("READY");
76048
76121
  },
76049
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Page, __spreadProps2(__spreadValues2({ dispatch, state }, rootProps), { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DropZone, { zone: rootDroppableId2 }) }))
76122
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Page, __spreadProps2(__spreadValues2({ dispatch, state }, rootProps), { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DropZone, { zone: rootDroppableId2 }) }))
76050
76123
  }
76051
- ) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { id: "preview-frame", className: getClassName222("frame"), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Page, __spreadProps2(__spreadValues2({ dispatch, state }, rootProps), { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DropZone, { zone: rootDroppableId2 }) })) })
76124
+ ) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { id: "preview-frame", className: getClassName23("frame"), children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Page, __spreadProps2(__spreadValues2({ dispatch, state }, rootProps), { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DropZone, { zone: rootDroppableId2 }) })) })
76052
76125
  }
76053
76126
  );
76054
76127
  };
@@ -76070,7 +76143,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76070
76143
  };
76071
76144
  init_react_import2();
76072
76145
  init_react_import2();
76073
- var styles_module_default18 = { "LayerTree": "_LayerTree_1pgw8_1", "LayerTree-zoneTitle": "_LayerTree-zoneTitle_1pgw8_11", "LayerTree-helper": "_LayerTree-helper_1pgw8_17", "Layer": "_Layer_1pgw8_1", "Layer-inner": "_Layer-inner_1pgw8_29", "Layer--containsZone": "_Layer--containsZone_1pgw8_35", "Layer-clickable": "_Layer-clickable_1pgw8_39", "Layer--isSelected": "_Layer--isSelected_1pgw8_61", "Layer-chevron": "_Layer-chevron_1pgw8_77", "Layer--childIsSelected": "_Layer--childIsSelected_1pgw8_78", "Layer-zones": "_Layer-zones_1pgw8_82", "Layer-title": "_Layer-title_1pgw8_96", "Layer-name": "_Layer-name_1pgw8_105", "Layer-icon": "_Layer-icon_1pgw8_111", "Layer-zoneIcon": "_Layer-zoneIcon_1pgw8_116" };
76146
+ var styles_module_default19 = { "LayerTree": "_LayerTree_1pgw8_1", "LayerTree-zoneTitle": "_LayerTree-zoneTitle_1pgw8_11", "LayerTree-helper": "_LayerTree-helper_1pgw8_17", "Layer": "_Layer_1pgw8_1", "Layer-inner": "_Layer-inner_1pgw8_29", "Layer--containsZone": "_Layer--containsZone_1pgw8_35", "Layer-clickable": "_Layer-clickable_1pgw8_39", "Layer--isSelected": "_Layer--isSelected_1pgw8_61", "Layer-chevron": "_Layer-chevron_1pgw8_77", "Layer--childIsSelected": "_Layer--childIsSelected_1pgw8_78", "Layer-zones": "_Layer-zones_1pgw8_82", "Layer-title": "_Layer-title_1pgw8_96", "Layer-name": "_Layer-name_1pgw8_105", "Layer-icon": "_Layer-icon_1pgw8_111", "Layer-zoneIcon": "_Layer-zoneIcon_1pgw8_116" };
76074
76147
  init_react_import2();
76075
76148
  var scrollIntoView2 = (el) => {
76076
76149
  const oldStyle = __spreadValues2({}, el.style);
@@ -76080,7 +76153,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76080
76153
  el.style.scrollMargin = oldStyle.scrollMargin || "";
76081
76154
  }
76082
76155
  };
76083
- var import_react25 = require("react");
76156
+ var import_react26 = require("react");
76084
76157
  init_react_import2();
76085
76158
  var isChildOfZone = (item, maybeChild, ctx) => {
76086
76159
  var _a3;
@@ -76090,9 +76163,9 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76090
76163
  return area === item.props.id;
76091
76164
  })) : false;
76092
76165
  };
76093
- var import_jsx_runtime322 = require("react/jsx-runtime");
76094
- var getClassName23 = get_class_name_factory_default2("LayerTree", styles_module_default18);
76095
- var getClassNameLayer = get_class_name_factory_default2("Layer", styles_module_default18);
76166
+ var import_jsx_runtime34 = require("react/jsx-runtime");
76167
+ var getClassName24 = get_class_name_factory_default2("LayerTree", styles_module_default19);
76168
+ var getClassNameLayer = get_class_name_factory_default2("Layer", styles_module_default19);
76096
76169
  var LayerTree = ({
76097
76170
  data,
76098
76171
  config,
@@ -76103,15 +76176,15 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76103
76176
  label
76104
76177
  }) => {
76105
76178
  const zones = data.zones || {};
76106
- const ctx = (0, import_react25.useContext)(dropZoneContext2);
76107
- return /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)(import_jsx_runtime322.Fragment, { children: [
76108
- label && /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("div", { className: getClassName23("zoneTitle"), children: [
76109
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { className: getClassName23("zoneIcon"), children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(Layers, { size: "16" }) }),
76179
+ const ctx = (0, import_react26.useContext)(dropZoneContext2);
76180
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
76181
+ label && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: getClassName24("zoneTitle"), children: [
76182
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: getClassName24("zoneIcon"), children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Layers, { size: "16" }) }),
76110
76183
  " ",
76111
76184
  label
76112
76185
  ] }),
76113
- /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("ul", { className: getClassName23(), children: [
76114
- zoneContent.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { className: getClassName23("helper"), children: "No items" }),
76186
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("ul", { className: getClassName24(), children: [
76187
+ zoneContent.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: getClassName24("helper"), children: "No items" }),
76115
76188
  zoneContent.map((item, i2) => {
76116
76189
  var _a3;
76117
76190
  const isSelected = (itemSelector == null ? void 0 : itemSelector.index) === i2 && (itemSelector.zone === zone || itemSelector.zone === rootDroppableId2 && !zone);
@@ -76129,7 +76202,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76129
76202
  const childIsSelected = isChildOfZone(item, selectedItem, ctx);
76130
76203
  const componentConfig = config.components[item.type];
76131
76204
  const label2 = (_a3 = componentConfig == null ? void 0 : componentConfig["label"]) != null ? _a3 : item.type.toString();
76132
- return /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)(
76205
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
76133
76206
  "li",
76134
76207
  {
76135
76208
  className: getClassNameLayer({
@@ -76139,7 +76212,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76139
76212
  childIsSelected
76140
76213
  }),
76141
76214
  children: [
76142
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)(
76215
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
76143
76216
  "button",
76144
76217
  {
76145
76218
  className: getClassNameLayer("clickable"),
@@ -76171,22 +76244,22 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76171
76244
  setHoveringComponent(null);
76172
76245
  },
76173
76246
  children: [
76174
- containsZone && /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
76247
+ containsZone && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
76175
76248
  "div",
76176
76249
  {
76177
76250
  className: getClassNameLayer("chevron"),
76178
76251
  title: isSelected ? "Collapse" : "Expand",
76179
- children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(ChevronDown, { size: "12" })
76252
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ChevronDown, { size: "12" })
76180
76253
  }
76181
76254
  ),
76182
- /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("div", { className: getClassNameLayer("title"), children: [
76183
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { className: getClassNameLayer("icon"), children: item.type === "Text" || item.type === "Heading" ? /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(Type, { size: "16" }) : /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(LayoutGrid, { size: "16" }) }),
76184
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { className: getClassNameLayer("name"), children: label2 })
76255
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: getClassNameLayer("title"), children: [
76256
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: getClassNameLayer("icon"), children: item.type === "Text" || item.type === "Heading" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Type, { size: "16" }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(LayoutGrid, { size: "16" }) }),
76257
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: getClassNameLayer("name"), children: label2 })
76185
76258
  ] })
76186
76259
  ]
76187
76260
  }
76188
76261
  ) }),
76189
- containsZone && Object.keys(zonesForItem).map((zoneKey, idx) => /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { className: getClassNameLayer("zones"), children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
76262
+ containsZone && Object.keys(zonesForItem).map((zoneKey, idx) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: getClassNameLayer("zones"), children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
76190
76263
  LayerTree,
76191
76264
  {
76192
76265
  config,
@@ -76206,13 +76279,13 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76206
76279
  ] })
76207
76280
  ] });
76208
76281
  };
76209
- var import_react26 = require("react");
76210
- var import_jsx_runtime33 = require("react/jsx-runtime");
76282
+ var import_react27 = require("react");
76283
+ var import_jsx_runtime35 = require("react/jsx-runtime");
76211
76284
  var Outline = () => {
76212
76285
  const { dispatch, state, overrides, config } = useAppContext2();
76213
76286
  const { data, ui } = state;
76214
76287
  const { itemSelector } = ui;
76215
- const setItemSelector = (0, import_react26.useCallback)(
76288
+ const setItemSelector = (0, import_react27.useCallback)(
76216
76289
  (newItemSelector) => {
76217
76290
  dispatch({
76218
76291
  type: "setUi",
@@ -76221,9 +76294,9 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76221
76294
  },
76222
76295
  []
76223
76296
  );
76224
- const Wrapper = (0, import_react26.useMemo)(() => overrides.outline || "div", [overrides]);
76225
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Wrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(dropZoneContext2.Consumer, { children: (ctx) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
76226
- (ctx == null ? void 0 : ctx.activeZones) && (ctx == null ? void 0 : ctx.activeZones[rootDroppableId2]) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
76297
+ const Wrapper = (0, import_react27.useMemo)(() => overrides.outline || "div", [overrides]);
76298
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Wrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(dropZoneContext2.Consumer, { children: (ctx) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
76299
+ (ctx == null ? void 0 : ctx.activeZones) && (ctx == null ? void 0 : ctx.activeZones[rootDroppableId2]) && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
76227
76300
  LayerTree,
76228
76301
  {
76229
76302
  config,
@@ -76236,7 +76309,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76236
76309
  ),
76237
76310
  Object.entries(findZonesForArea(data, "root")).map(
76238
76311
  ([zoneKey, zone]) => {
76239
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
76312
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
76240
76313
  LayerTree,
76241
76314
  {
76242
76315
  config,
@@ -76254,35 +76327,6 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76254
76327
  ] }) }) });
76255
76328
  };
76256
76329
  init_react_import2();
76257
- var loadOverrides = ({
76258
- overrides,
76259
- plugins
76260
- }) => {
76261
- const collected = __spreadValues2({}, overrides);
76262
- plugins.forEach((plugin) => {
76263
- Object.keys(plugin.overrides).forEach((overridesType) => {
76264
- if (overridesType === "fieldTypes") {
76265
- const fieldTypes = plugin.overrides.fieldTypes;
76266
- Object.keys(fieldTypes).forEach((fieldType) => {
76267
- collected.fieldTypes = collected.fieldTypes || {};
76268
- const childNode2 = collected.fieldTypes[fieldType];
76269
- const Comp2 = (props) => fieldTypes[fieldType](__spreadProps2(__spreadValues2({}, props), {
76270
- children: childNode2 ? childNode2(props) : props.children
76271
- }));
76272
- collected.fieldTypes[fieldType] = Comp2;
76273
- });
76274
- return;
76275
- }
76276
- const childNode = collected[overridesType];
76277
- const Comp = (props) => plugin.overrides[overridesType](__spreadProps2(__spreadValues2({}, props), {
76278
- children: childNode ? childNode(props) : props.children
76279
- }));
76280
- collected[overridesType] = Comp;
76281
- });
76282
- });
76283
- return collected;
76284
- };
76285
- init_react_import2();
76286
76330
  var import_react_hotkeys_hook = (init_react_hotkeys_hook_esm(), __toCommonJS(react_hotkeys_hook_esm_exports));
76287
76331
  function usePuckHistory({
76288
76332
  dispatch,
@@ -76335,19 +76379,19 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76335
76379
  };
76336
76380
  }
76337
76381
  init_react_import2();
76338
- var import_react27 = require("react");
76382
+ var import_react28 = require("react");
76339
76383
  var import_use_debounce3 = (init_index_module(), __toCommonJS(index_module_exports));
76340
76384
  var EMPTY_HISTORY_INDEX = -1;
76341
76385
  function useHistoryStore(initialHistory) {
76342
76386
  var _a3, _b2;
76343
- const [histories, setHistories] = (0, import_react27.useState)(
76387
+ const [histories, setHistories] = (0, import_react28.useState)(
76344
76388
  (_a3 = initialHistory == null ? void 0 : initialHistory.histories) != null ? _a3 : []
76345
76389
  );
76346
76390
  const updateHistories = (histories2) => {
76347
76391
  setHistories(histories2);
76348
76392
  setIndex(histories2.length - 1);
76349
76393
  };
76350
- const [index, setIndex] = (0, import_react27.useState)(
76394
+ const [index, setIndex] = (0, import_react28.useState)(
76351
76395
  (_b2 = initialHistory == null ? void 0 : initialHistory.index) != null ? _b2 : EMPTY_HISTORY_INDEX
76352
76396
  );
76353
76397
  const hasPast = index > EMPTY_HISTORY_INDEX;
@@ -76497,19 +76541,19 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76497
76541
  var styles = window.getComputedStyle(el);
76498
76542
  return calculateBox3(borderBox, styles);
76499
76543
  };
76500
- var import_react29 = require("react");
76544
+ var import_react30 = require("react");
76501
76545
  init_react_import2();
76502
- var import_react28 = require("react");
76546
+ var import_react29 = require("react");
76503
76547
  init_react_import2();
76504
- var styles_module_default19 = { "ViewportControls": "_ViewportControls_g1wgg_1", "ViewportControls-divider": "_ViewportControls-divider_g1wgg_15", "ViewportControls-zoomSelect": "_ViewportControls-zoomSelect_g1wgg_21", "ViewportButton--isActive": "_ViewportButton--isActive_g1wgg_34", "ViewportButton-inner": "_ViewportButton-inner_g1wgg_34" };
76505
- var import_jsx_runtime34 = require("react/jsx-runtime");
76548
+ var styles_module_default20 = { "ViewportControls": "_ViewportControls_g1wgg_1", "ViewportControls-divider": "_ViewportControls-divider_g1wgg_15", "ViewportControls-zoomSelect": "_ViewportControls-zoomSelect_g1wgg_21", "ViewportButton--isActive": "_ViewportButton--isActive_g1wgg_34", "ViewportButton-inner": "_ViewportButton-inner_g1wgg_34" };
76549
+ var import_jsx_runtime36 = require("react/jsx-runtime");
76506
76550
  var icons = {
76507
- Smartphone: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Smartphone, { size: 16 }),
76508
- Tablet: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Tablet, { size: 16 }),
76509
- Monitor: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Monitor, { size: 16 })
76551
+ Smartphone: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Smartphone, { size: 16 }),
76552
+ Tablet: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Tablet, { size: 16 }),
76553
+ Monitor: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Monitor, { size: 16 })
76510
76554
  };
76511
- var getClassName24 = get_class_name_factory_default2("ViewportControls", styles_module_default19);
76512
- var getClassNameButton = get_class_name_factory_default2("ViewportButton", styles_module_default19);
76555
+ var getClassName25 = get_class_name_factory_default2("ViewportControls", styles_module_default20);
76556
+ var getClassNameButton = get_class_name_factory_default2("ViewportButton", styles_module_default20);
76513
76557
  var ViewportButton = ({
76514
76558
  children,
76515
76559
  height = "auto",
@@ -76518,11 +76562,11 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76518
76562
  onClick
76519
76563
  }) => {
76520
76564
  const { state } = useAppContext2();
76521
- const [isActive2, setIsActive] = (0, import_react28.useState)(false);
76522
- (0, import_react28.useEffect)(() => {
76565
+ const [isActive2, setIsActive] = (0, import_react29.useState)(false);
76566
+ (0, import_react29.useEffect)(() => {
76523
76567
  setIsActive(width === state.ui.viewports.current.width);
76524
76568
  }, [width, state.ui.viewports.current.width]);
76525
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: getClassNameButton({ isActive: isActive2 }), children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
76569
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: getClassNameButton({ isActive: isActive2 }), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
76526
76570
  IconButton,
76527
76571
  {
76528
76572
  title,
@@ -76531,7 +76575,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76531
76575
  e2.stopPropagation();
76532
76576
  onClick({ width, height });
76533
76577
  },
76534
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: getClassNameButton("inner"), children })
76578
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: getClassNameButton("inner"), children })
76535
76579
  }
76536
76580
  ) });
76537
76581
  };
@@ -76555,7 +76599,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76555
76599
  const defaultsContainAutoZoom = defaultZoomOptions.find(
76556
76600
  (option) => option.value === autoZoom
76557
76601
  );
76558
- const zoomOptions = (0, import_react28.useMemo)(
76602
+ const zoomOptions = (0, import_react29.useMemo)(
76559
76603
  () => [
76560
76604
  ...defaultZoomOptions,
76561
76605
  ...defaultsContainAutoZoom ? [] : [
@@ -76567,8 +76611,8 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76567
76611
  ].filter((a2) => a2.value <= autoZoom).sort((a2, b) => a2.value > b.value ? 1 : -1),
76568
76612
  [autoZoom]
76569
76613
  );
76570
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: getClassName24(), children: [
76571
- viewports.map((viewport, i2) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
76614
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: getClassName25(), children: [
76615
+ viewports.map((viewport, i2) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
76572
76616
  ViewportButton,
76573
76617
  {
76574
76618
  height: viewport.height,
@@ -76579,8 +76623,8 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76579
76623
  },
76580
76624
  i2
76581
76625
  )),
76582
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: getClassName24("divider") }),
76583
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
76626
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: getClassName25("divider") }),
76627
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
76584
76628
  IconButton,
76585
76629
  {
76586
76630
  title: "Zoom viewport out",
@@ -76594,10 +76638,10 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76594
76638
  )].value
76595
76639
  );
76596
76640
  },
76597
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ZoomOut, { size: 16 })
76641
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ZoomOut, { size: 16 })
76598
76642
  }
76599
76643
  ),
76600
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
76644
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
76601
76645
  IconButton,
76602
76646
  {
76603
76647
  title: "Zoom viewport in",
@@ -76611,19 +76655,19 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76611
76655
  )].value
76612
76656
  );
76613
76657
  },
76614
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ZoomIn, { size: 16 })
76658
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ZoomIn, { size: 16 })
76615
76659
  }
76616
76660
  ),
76617
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: getClassName24("divider") }),
76618
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
76661
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: getClassName25("divider") }),
76662
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
76619
76663
  "select",
76620
76664
  {
76621
- className: getClassName24("zoomSelect"),
76665
+ className: getClassName25("zoomSelect"),
76622
76666
  value: zoom.toString(),
76623
76667
  onChange: (e2) => {
76624
76668
  onZoom(parseFloat(e2.currentTarget.value));
76625
76669
  },
76626
- children: zoomOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
76670
+ children: zoomOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
76627
76671
  "option",
76628
76672
  {
76629
76673
  value: option.value,
@@ -76636,7 +76680,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76636
76680
  ] });
76637
76681
  };
76638
76682
  init_react_import2();
76639
- var styles_module_default20 = { "PuckCanvas": "_PuckCanvas_6zd4y_1", "PuckCanvas-controls": "_PuckCanvas-controls_6zd4y_16", "PuckCanvas-inner": "_PuckCanvas-inner_6zd4y_21", "PuckCanvas-root": "_PuckCanvas-root_6zd4y_32", "PuckCanvas--ready": "_PuckCanvas--ready_6zd4y_56" };
76683
+ var styles_module_default21 = { "PuckCanvas": "_PuckCanvas_6zd4y_1", "PuckCanvas-controls": "_PuckCanvas-controls_6zd4y_16", "PuckCanvas-inner": "_PuckCanvas-inner_6zd4y_21", "PuckCanvas-root": "_PuckCanvas-root_6zd4y_32", "PuckCanvas--ready": "_PuckCanvas--ready_6zd4y_56" };
76640
76684
  init_react_import2();
76641
76685
  var RESET_ZOOM_SMALLER_THAN_FRAME = true;
76642
76686
  var getZoomConfig = (uiViewport, frame, zoom) => {
@@ -76665,24 +76709,24 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76665
76709
  }
76666
76710
  return { autoZoom, rootHeight, zoom };
76667
76711
  };
76668
- var import_jsx_runtime35 = require("react/jsx-runtime");
76669
- var getClassName25 = get_class_name_factory_default2("PuckCanvas", styles_module_default20);
76712
+ var import_jsx_runtime37 = require("react/jsx-runtime");
76713
+ var getClassName26 = get_class_name_factory_default2("PuckCanvas", styles_module_default21);
76670
76714
  var ZOOM_ON_CHANGE = true;
76671
76715
  var Canvas = () => {
76672
76716
  const { status, iframe } = useAppContext2();
76673
76717
  const { dispatch, state, overrides, setUi, zoomConfig, setZoomConfig } = useAppContext2();
76674
76718
  const { ui } = state;
76675
- const frameRef = (0, import_react29.useRef)(null);
76676
- const [showTransition, setShowTransition] = (0, import_react29.useState)(false);
76677
- const defaultRender = (0, import_react29.useMemo)(() => {
76678
- const PuckDefault = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_jsx_runtime35.Fragment, { children });
76719
+ const frameRef = (0, import_react30.useRef)(null);
76720
+ const [showTransition, setShowTransition] = (0, import_react30.useState)(false);
76721
+ const defaultRender = (0, import_react30.useMemo)(() => {
76722
+ const PuckDefault = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_jsx_runtime37.Fragment, { children });
76679
76723
  return PuckDefault;
76680
76724
  }, []);
76681
- const CustomPreview = (0, import_react29.useMemo)(
76725
+ const CustomPreview = (0, import_react30.useMemo)(
76682
76726
  () => overrides.preview || defaultRender,
76683
76727
  [overrides]
76684
76728
  );
76685
- const getFrameDimensions = (0, import_react29.useCallback)(() => {
76729
+ const getFrameDimensions = (0, import_react30.useCallback)(() => {
76686
76730
  if (frameRef.current) {
76687
76731
  const frame = frameRef.current;
76688
76732
  const box = getBox3(frame);
@@ -76690,7 +76734,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76690
76734
  }
76691
76735
  return { width: 0, height: 0 };
76692
76736
  }, [frameRef]);
76693
- const resetAutoZoom = (0, import_react29.useCallback)(
76737
+ const resetAutoZoom = (0, import_react30.useCallback)(
76694
76738
  (ui2 = state.ui) => {
76695
76739
  if (frameRef.current) {
76696
76740
  setZoomConfig(
@@ -76700,11 +76744,11 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76700
76744
  },
76701
76745
  [frameRef, zoomConfig, state.ui]
76702
76746
  );
76703
- (0, import_react29.useEffect)(() => {
76747
+ (0, import_react30.useEffect)(() => {
76704
76748
  setShowTransition(false);
76705
76749
  resetAutoZoom();
76706
76750
  }, [frameRef, ui.leftSideBarVisible, ui.rightSideBarVisible]);
76707
- (0, import_react29.useEffect)(() => {
76751
+ (0, import_react30.useEffect)(() => {
76708
76752
  const { height: frameHeight } = getFrameDimensions();
76709
76753
  if (ui.viewports.current.height === "auto") {
76710
76754
  setZoomConfig(__spreadProps2(__spreadValues2({}, zoomConfig), {
@@ -76712,7 +76756,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76712
76756
  }));
76713
76757
  }
76714
76758
  }, [zoomConfig.zoom]);
76715
- (0, import_react29.useEffect)(() => {
76759
+ (0, import_react30.useEffect)(() => {
76716
76760
  const observer = new ResizeObserver(() => {
76717
76761
  setShowTransition(false);
76718
76762
  resetAutoZoom();
@@ -76724,10 +76768,10 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76724
76768
  observer.disconnect();
76725
76769
  };
76726
76770
  }, []);
76727
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
76771
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
76728
76772
  "div",
76729
76773
  {
76730
- className: getClassName25({
76774
+ className: getClassName26({
76731
76775
  ready: status === "READY" || !iframe.enabled
76732
76776
  }),
76733
76777
  onClick: () => dispatch({
@@ -76736,7 +76780,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76736
76780
  recordHistory: true
76737
76781
  }),
76738
76782
  children: [
76739
- ui.viewports.controlsVisible && iframe.enabled && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: getClassName25("controls"), children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
76783
+ ui.viewports.controlsVisible && iframe.enabled && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: getClassName26("controls"), children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
76740
76784
  ViewportControls,
76741
76785
  {
76742
76786
  autoZoom: zoomConfig.autoZoom,
@@ -76761,10 +76805,10 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76761
76805
  }
76762
76806
  }
76763
76807
  ) }),
76764
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: getClassName25("inner"), ref: frameRef, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
76808
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: getClassName26("inner"), ref: frameRef, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
76765
76809
  "div",
76766
76810
  {
76767
- className: getClassName25("root"),
76811
+ className: getClassName26("root"),
76768
76812
  style: {
76769
76813
  width: iframe.enabled ? ui.viewports.current.width : "100%",
76770
76814
  height: zoomConfig.rootHeight,
@@ -76773,7 +76817,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76773
76817
  overflow: iframe.enabled ? void 0 : "auto"
76774
76818
  },
76775
76819
  suppressHydrationWarning: true,
76776
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CustomPreview, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Preview, {}) })
76820
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CustomPreview, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Preview, {}) })
76777
76821
  }
76778
76822
  ) })
76779
76823
  ]
@@ -76810,9 +76854,9 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76810
76854
  ui: __spreadProps2(__spreadValues2({}, state.ui), { itemSelector })
76811
76855
  });
76812
76856
  };
76813
- var import_jsx_runtime36 = require("react/jsx-runtime");
76814
- var getClassName26 = get_class_name_factory_default2("Puck", styles_module_default14);
76815
- var getLayoutClassName = get_class_name_factory_default2("PuckLayout", styles_module_default14);
76857
+ var import_jsx_runtime38 = require("react/jsx-runtime");
76858
+ var getClassName27 = get_class_name_factory_default2("Puck", styles_module_default15);
76859
+ var getLayoutClassName = get_class_name_factory_default2("PuckLayout", styles_module_default15);
76816
76860
  function Puck({
76817
76861
  children,
76818
76862
  config,
@@ -76821,6 +76865,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76821
76865
  onChange,
76822
76866
  onPublish,
76823
76867
  onAction,
76868
+ permissions = {},
76824
76869
  plugins = [],
76825
76870
  overrides = {},
76826
76871
  renderHeader,
@@ -76836,10 +76881,10 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76836
76881
  }) {
76837
76882
  var _a3;
76838
76883
  const historyStore = useHistoryStore(initialHistory);
76839
- const [reducer2] = (0, import_react30.useState)(
76884
+ const [reducer2] = (0, import_react31.useState)(
76840
76885
  () => createReducer({ config, record: historyStore.record, onAction })
76841
76886
  );
76842
- const [initialAppState] = (0, import_react30.useState)(() => {
76887
+ const [initialAppState] = (0, import_react31.useState)(() => {
76843
76888
  var _a22, _b2, _c, _d, _e, _f, _g;
76844
76889
  const initial = __spreadValues2(__spreadValues2({}, defaultAppState2.ui), initialUi);
76845
76890
  let clientUiState = {};
@@ -76897,7 +76942,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76897
76942
  })
76898
76943
  });
76899
76944
  });
76900
- const [appState, dispatch] = (0, import_react30.useReducer)(
76945
+ const [appState, dispatch] = (0, import_react31.useReducer)(
76901
76946
  reducer2,
76902
76947
  flushZones(initialAppState)
76903
76948
  );
@@ -76908,9 +76953,9 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76908
76953
  config,
76909
76954
  dispatch
76910
76955
  );
76911
- const [menuOpen, setMenuOpen] = (0, import_react30.useState)(false);
76956
+ const [menuOpen, setMenuOpen] = (0, import_react31.useState)(false);
76912
76957
  const { itemSelector, leftSideBarVisible, rightSideBarVisible } = ui;
76913
- const setItemSelector = (0, import_react30.useCallback)(
76958
+ const setItemSelector = (0, import_react31.useCallback)(
76914
76959
  (newItemSelector) => {
76915
76960
  if (newItemSelector === itemSelector) return;
76916
76961
  dispatch({
@@ -76922,13 +76967,13 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76922
76967
  [itemSelector]
76923
76968
  );
76924
76969
  const selectedItem = itemSelector ? getItem2(itemSelector, data) : null;
76925
- (0, import_react30.useEffect)(() => {
76970
+ (0, import_react31.useEffect)(() => {
76926
76971
  if (onChange) onChange(data);
76927
76972
  }, [data]);
76928
76973
  const { onDragStartOrUpdate, placeholderStyle } = usePlaceholderStyle();
76929
- const [draggedItem, setDraggedItem] = (0, import_react30.useState)();
76974
+ const [draggedItem, setDraggedItem] = (0, import_react31.useState)();
76930
76975
  const rootProps = data.root.props || data.root;
76931
- const toggleSidebars = (0, import_react30.useCallback)(
76976
+ const toggleSidebars = (0, import_react31.useCallback)(
76932
76977
  (sidebar) => {
76933
76978
  const widerViewport = window.matchMedia("(min-width: 638px)").matches;
76934
76979
  const sideBarVisible = sidebar === "left" ? leftSideBarVisible : rightSideBarVisible;
@@ -76942,7 +76987,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76942
76987
  },
76943
76988
  [dispatch, leftSideBarVisible, rightSideBarVisible]
76944
76989
  );
76945
- (0, import_react30.useEffect)(() => {
76990
+ (0, import_react31.useEffect)(() => {
76946
76991
  if (!window.matchMedia("(min-width: 638px)").matches) {
76947
76992
  dispatch({
76948
76993
  type: "setUi",
@@ -76965,11 +77010,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76965
77010
  window.removeEventListener("resize", handleResize);
76966
77011
  };
76967
77012
  }, []);
76968
- const defaultRender = (0, import_react30.useMemo)(() => {
76969
- const PuckDefault = ({ children: children2 }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_jsx_runtime36.Fragment, { children: children2 });
76970
- return PuckDefault;
76971
- }, []);
76972
- const defaultHeaderRender = (0, import_react30.useMemo)(() => {
77013
+ const defaultHeaderRender = (0, import_react31.useMemo)(() => {
76973
77014
  if (renderHeader) {
76974
77015
  console.warn(
76975
77016
  "`renderHeader` is deprecated. Please use `overrides.header` and the `usePuck` hook instead"
@@ -76977,48 +77018,49 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
76977
77018
  const RenderHeader = (_a22) => {
76978
77019
  var _b2 = _a22, { actions } = _b2, props = __objRest2(_b2, ["actions"]);
76979
77020
  const Comp = renderHeader;
76980
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Comp, __spreadProps2(__spreadValues2({}, props), { dispatch, state: appState, children: actions }));
77021
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Comp, __spreadProps2(__spreadValues2({}, props), { dispatch, state: appState, children: actions }));
76981
77022
  };
76982
77023
  return RenderHeader;
76983
77024
  }
76984
- return defaultRender;
77025
+ return DefaultOverride;
76985
77026
  }, [renderHeader]);
76986
- const defaultHeaderActionsRender = (0, import_react30.useMemo)(() => {
77027
+ const defaultHeaderActionsRender = (0, import_react31.useMemo)(() => {
76987
77028
  if (renderHeaderActions) {
76988
77029
  console.warn(
76989
77030
  "`renderHeaderActions` is deprecated. Please use `overrides.headerActions` and the `usePuck` hook instead."
76990
77031
  );
76991
77032
  const RenderHeader = (props) => {
76992
77033
  const Comp = renderHeaderActions;
76993
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Comp, __spreadProps2(__spreadValues2({}, props), { dispatch, state: appState }));
77034
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Comp, __spreadProps2(__spreadValues2({}, props), { dispatch, state: appState }));
76994
77035
  };
76995
77036
  return RenderHeader;
76996
77037
  }
76997
- return defaultRender;
77038
+ return DefaultOverride;
76998
77039
  }, [renderHeader]);
76999
- const loadedOverrides = (0, import_react30.useMemo)(() => {
77000
- return loadOverrides({ overrides, plugins });
77001
- }, [plugins]);
77002
- const CustomPuck = (0, import_react30.useMemo)(
77003
- () => loadedOverrides.puck || defaultRender,
77040
+ const loadedOverrides = useLoadedOverrides({
77041
+ overrides,
77042
+ plugins
77043
+ });
77044
+ const CustomPuck = (0, import_react31.useMemo)(
77045
+ () => loadedOverrides.puck || DefaultOverride,
77004
77046
  [loadedOverrides]
77005
77047
  );
77006
- const CustomHeader = (0, import_react30.useMemo)(
77048
+ const CustomHeader = (0, import_react31.useMemo)(
77007
77049
  () => loadedOverrides.header || defaultHeaderRender,
77008
77050
  [loadedOverrides]
77009
77051
  );
77010
- const CustomHeaderActions = (0, import_react30.useMemo)(
77052
+ const CustomHeaderActions = (0, import_react31.useMemo)(
77011
77053
  () => loadedOverrides.headerActions || defaultHeaderActionsRender,
77012
77054
  [loadedOverrides]
77013
77055
  );
77014
- const [mounted, setMounted] = (0, import_react30.useState)(false);
77015
- (0, import_react30.useEffect)(() => {
77056
+ const [mounted, setMounted] = (0, import_react31.useState)(false);
77057
+ (0, import_react31.useEffect)(() => {
77016
77058
  setMounted(true);
77017
77059
  }, []);
77018
77060
  const selectedComponentConfig = selectedItem && config.components[selectedItem.type];
77019
77061
  const selectedComponentLabel = selectedItem ? (_a3 = selectedComponentConfig == null ? void 0 : selectedComponentConfig["label"]) != null ? _a3 : selectedItem.type.toString() : "";
77020
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: `Puck ${getClassName26()}`, children: [
77021
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
77062
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: `Puck ${getClassName27()}`, children: [
77063
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
77022
77064
  AppProvider,
77023
77065
  {
77024
77066
  value: {
@@ -77031,9 +77073,14 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
77031
77073
  overrides: loadedOverrides,
77032
77074
  history,
77033
77075
  viewports,
77034
- iframe
77076
+ iframe,
77077
+ globalPermissions: __spreadValues2({
77078
+ delete: true,
77079
+ drag: true,
77080
+ duplicate: true
77081
+ }, permissions)
77035
77082
  },
77036
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
77083
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
77037
77084
  DragDropContext2,
77038
77085
  {
77039
77086
  autoScrollerOptions: { disabled: dnd == null ? void 0 : dnd.disableAutoScroll },
@@ -77085,7 +77132,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
77085
77132
  });
77086
77133
  }
77087
77134
  },
77088
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
77135
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
77089
77136
  DropZoneProvider,
77090
77137
  {
77091
77138
  value: {
@@ -77099,7 +77146,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
77099
77146
  mode: "edit",
77100
77147
  areaId: "root"
77101
77148
  },
77102
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CustomPuck, { children: children || /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
77149
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CustomPuck, { children: children || /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
77103
77150
  "div",
77104
77151
  {
77105
77152
  className: getLayoutClassName({
@@ -77108,64 +77155,64 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
77108
77155
  mounted,
77109
77156
  rightSideBarVisible
77110
77157
  }),
77111
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: getLayoutClassName("inner"), children: [
77112
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
77158
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: getLayoutClassName("inner"), children: [
77159
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
77113
77160
  CustomHeader,
77114
77161
  {
77115
- actions: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_jsx_runtime36.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CustomHeaderActions, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
77162
+ actions: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_jsx_runtime38.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CustomHeaderActions, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
77116
77163
  Button,
77117
77164
  {
77118
77165
  onClick: () => {
77119
77166
  onPublish && onPublish(data);
77120
77167
  },
77121
- icon: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Globe, { size: "14px" }),
77168
+ icon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Globe, { size: "14px" }),
77122
77169
  children: "Publish"
77123
77170
  }
77124
77171
  ) }) }),
77125
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("header", { className: getLayoutClassName("header"), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: getLayoutClassName("headerInner"), children: [
77126
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: getLayoutClassName("headerToggle"), children: [
77127
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
77172
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("header", { className: getLayoutClassName("header"), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: getLayoutClassName("headerInner"), children: [
77173
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: getLayoutClassName("headerToggle"), children: [
77174
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
77128
77175
  "div",
77129
77176
  {
77130
77177
  className: getLayoutClassName(
77131
77178
  "leftSideBarToggle"
77132
77179
  ),
77133
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
77180
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
77134
77181
  IconButton,
77135
77182
  {
77136
77183
  onClick: () => {
77137
77184
  toggleSidebars("left");
77138
77185
  },
77139
77186
  title: "Toggle left sidebar",
77140
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(PanelLeft, { focusable: "false" })
77187
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(PanelLeft, { focusable: "false" })
77141
77188
  }
77142
77189
  )
77143
77190
  }
77144
77191
  ),
77145
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
77192
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
77146
77193
  "div",
77147
77194
  {
77148
77195
  className: getLayoutClassName(
77149
77196
  "rightSideBarToggle"
77150
77197
  ),
77151
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
77198
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
77152
77199
  IconButton,
77153
77200
  {
77154
77201
  onClick: () => {
77155
77202
  toggleSidebars("right");
77156
77203
  },
77157
77204
  title: "Toggle right sidebar",
77158
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(PanelRight, { focusable: "false" })
77205
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(PanelRight, { focusable: "false" })
77159
77206
  }
77160
77207
  )
77161
77208
  }
77162
77209
  )
77163
77210
  ] }),
77164
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: getLayoutClassName("headerTitle"), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Heading2, { rank: 2, size: "xs", children: [
77211
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: getLayoutClassName("headerTitle"), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Heading2, { rank: 2, size: "xs", children: [
77165
77212
  headerTitle || rootProps.title || "Page",
77166
- headerPath && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
77213
+ headerPath && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
77167
77214
  " ",
77168
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
77215
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
77169
77216
  "code",
77170
77217
  {
77171
77218
  className: getLayoutClassName("headerPath"),
@@ -77174,18 +77221,18 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
77174
77221
  )
77175
77222
  ] })
77176
77223
  ] }) }),
77177
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: getLayoutClassName("headerTools"), children: [
77178
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: getLayoutClassName("menuButton"), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
77224
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: getLayoutClassName("headerTools"), children: [
77225
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: getLayoutClassName("menuButton"), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
77179
77226
  IconButton,
77180
77227
  {
77181
77228
  onClick: () => {
77182
77229
  return setMenuOpen(!menuOpen);
77183
77230
  },
77184
77231
  title: "Toggle menu bar",
77185
- children: menuOpen ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ChevronUp, { focusable: "false" }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ChevronDown, { focusable: "false" })
77232
+ children: menuOpen ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ChevronUp, { focusable: "false" }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ChevronDown, { focusable: "false" })
77186
77233
  }
77187
77234
  ) }),
77188
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
77235
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
77189
77236
  MenuBar,
77190
77237
  {
77191
77238
  appState,
@@ -77193,13 +77240,13 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
77193
77240
  dispatch,
77194
77241
  onPublish,
77195
77242
  menuOpen,
77196
- renderHeaderActions: () => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CustomHeaderActions, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
77243
+ renderHeaderActions: () => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CustomHeaderActions, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
77197
77244
  Button,
77198
77245
  {
77199
77246
  onClick: () => {
77200
77247
  onPublish && onPublish(data);
77201
77248
  },
77202
- icon: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Globe, { size: "14px" }),
77249
+ icon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Globe, { size: "14px" }),
77203
77250
  children: "Publish"
77204
77251
  }
77205
77252
  ) }),
@@ -77210,19 +77257,19 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
77210
77257
  ] }) })
77211
77258
  }
77212
77259
  ),
77213
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: getLayoutClassName("leftSideBar"), children: [
77214
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SidebarSection2, { title: "Components", noBorderTop: true, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Components, {}) }),
77215
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SidebarSection2, { title: "Outline", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Outline, {}) })
77260
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: getLayoutClassName("leftSideBar"), children: [
77261
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SidebarSection2, { title: "Components", noBorderTop: true, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Components, {}) }),
77262
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SidebarSection2, { title: "Outline", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Outline, {}) })
77216
77263
  ] }),
77217
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Canvas, {}),
77218
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: getLayoutClassName("rightSideBar"), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
77264
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Canvas, {}),
77265
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: getLayoutClassName("rightSideBar"), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
77219
77266
  SidebarSection2,
77220
77267
  {
77221
77268
  noPadding: true,
77222
77269
  noBorderTop: true,
77223
77270
  showBreadcrumbs: true,
77224
77271
  title: selectedItem ? selectedComponentLabel : "Page",
77225
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Fields, {})
77272
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Fields, {})
77226
77273
  }
77227
77274
  ) })
77228
77275
  ] })
@@ -77234,7 +77281,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
77234
77281
  )
77235
77282
  }
77236
77283
  ),
77237
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { id: "puck-portal-root", className: getClassName26("portal") })
77284
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { id: "puck-portal-root", className: getClassName27("portal") })
77238
77285
  ] });
77239
77286
  }
77240
77287
  Puck.Components = Components;
@@ -77242,7 +77289,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
77242
77289
  Puck.Outline = Outline;
77243
77290
  Puck.Preview = Preview;
77244
77291
  init_react_import2();
77245
- var import_jsx_runtime37 = require("react/jsx-runtime");
77292
+ var import_jsx_runtime39 = require("react/jsx-runtime");
77246
77293
  function Render({
77247
77294
  config,
77248
77295
  data
@@ -77255,7 +77302,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
77255
77302
  const rootProps = defaultedData.root.props || defaultedData.root;
77256
77303
  const title = (rootProps == null ? void 0 : rootProps.title) || "";
77257
77304
  if ((_a3 = config.root) == null ? void 0 : _a3.render) {
77258
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DropZoneProvider, { value: { data: defaultedData, config, mode: "render" }, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
77305
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DropZoneProvider, { value: { data: defaultedData, config, mode: "render" }, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
77259
77306
  config.root.render,
77260
77307
  __spreadProps2(__spreadValues2({}, rootProps), {
77261
77308
  puck: {
@@ -77265,11 +77312,11 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
77265
77312
  title,
77266
77313
  editMode: false,
77267
77314
  id: "puck-root",
77268
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DropZone, { zone: rootDroppableId2 })
77315
+ children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DropZone, { zone: rootDroppableId2 })
77269
77316
  })
77270
77317
  ) });
77271
77318
  }
77272
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DropZoneProvider, { value: { data: defaultedData, config, mode: "render" }, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DropZone, { zone: rootDroppableId2 }) });
77319
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DropZoneProvider, { value: { data: defaultedData, config, mode: "render" }, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DropZone, { zone: rootDroppableId2 }) });
77273
77320
  }
77274
77321
  init_react_import2();
77275
77322
  var migrations = [
@@ -77359,18 +77406,47 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
77359
77406
  });
77360
77407
  }
77361
77408
  init_react_import2();
77409
+ init_react_import2();
77410
+ var getPermissions = ({
77411
+ selectedItem,
77412
+ globalPermissions,
77413
+ config
77414
+ }) => {
77415
+ const componentType = selectedItem && selectedItem.type || "";
77416
+ let componentPermissions = getInitialPermissions({
77417
+ componentType,
77418
+ config,
77419
+ globalPermissions
77420
+ });
77421
+ return componentPermissions;
77422
+ };
77423
+ var getInitialPermissions = ({
77424
+ componentType,
77425
+ globalPermissions,
77426
+ config
77427
+ }) => {
77428
+ return __spreadValues2(__spreadValues2({}, globalPermissions), config.components[componentType].permissions);
77429
+ };
77362
77430
  var usePuck2 = () => {
77363
77431
  const {
77364
77432
  state: appState,
77365
77433
  config,
77366
77434
  history,
77367
77435
  dispatch,
77368
- selectedItem
77436
+ selectedItem: currentItem,
77437
+ globalPermissions
77369
77438
  } = useAppContext2();
77370
77439
  return {
77371
77440
  appState,
77372
77441
  config,
77373
77442
  dispatch,
77443
+ getPermissions: (selectedItem) => {
77444
+ return getPermissions({
77445
+ selectedItem: selectedItem || currentItem,
77446
+ globalPermissions: globalPermissions || {},
77447
+ config
77448
+ });
77449
+ },
77374
77450
  history: {
77375
77451
  back: history.back,
77376
77452
  forward: history.forward,
@@ -77382,7 +77458,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
77382
77458
  index: history.historyStore.index,
77383
77459
  historyStore: history.historyStore
77384
77460
  },
77385
- selectedItem: selectedItem || null
77461
+ selectedItem: currentItem || null
77386
77462
  };
77387
77463
  };
77388
77464
  }
@@ -77683,7 +77759,8 @@ var defaultContext = {
77683
77759
  status: "LOADING",
77684
77760
  setStatus: () => null,
77685
77761
  iframe: {},
77686
- safariFallbackMode: false
77762
+ safariFallbackMode: false,
77763
+ globalPermissions: {}
77687
77764
  };
77688
77765
  var appContext = (0, import_react10.createContext)(defaultContext);
77689
77766
  function useAppContext() {