@measured/puck 0.21.0-canary.8358d3e1 → 0.21.0-canary.89038d0c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/{Editor-N46HUQEC.mjs → Editor-O447AVCX.mjs} +13 -10
  2. package/dist/{Render-Y567PGZ7.mjs → Render-OFE6QLI2.mjs} +6 -4
  3. package/dist/{walk-tree-Ja9bNCM9.d.mts → actions-ONhOkrvf.d.mts} +1 -27
  4. package/dist/{walk-tree-Ja9bNCM9.d.ts → actions-ONhOkrvf.d.ts} +1 -27
  5. package/dist/{chunk-FNWOH4R6.mjs → chunk-2Q4PACDA.mjs} +8 -6
  6. package/dist/{chunk-DNF2EMM4.mjs → chunk-62AAYNXG.mjs} +2 -2
  7. package/dist/{chunk-K3V4LVUL.mjs → chunk-BSDEIOEK.mjs} +11 -9
  8. package/dist/{chunk-WUWXFMEM.mjs → chunk-CSSRLPHM.mjs} +1 -1
  9. package/dist/{chunk-7KY6RHEY.mjs → chunk-DAQLMM2T.mjs} +15 -523
  10. package/dist/{chunk-DCSQEDMK.mjs → chunk-M6W7YEVX.mjs} +1 -100
  11. package/dist/{chunk-DJSH5REF.mjs → chunk-NLUHDYVR.mjs} +2 -123
  12. package/dist/{chunk-GQKMOYLG.mjs → chunk-PLXSMBAA.mjs} +2 -2
  13. package/dist/{chunk-3QHWXJEI.mjs → chunk-QAWJTCV5.mjs} +2 -2
  14. package/dist/chunk-QBGM4ELA.mjs +528 -0
  15. package/dist/chunk-T3WX7XJ6.mjs +132 -0
  16. package/dist/{chunk-R6CVX2IY.mjs → chunk-V5I7CVLT.mjs} +1 -1
  17. package/dist/chunk-Y2EFNT5P.mjs +108 -0
  18. package/dist/{chunk-C2TVYIYC.mjs → chunk-Y656T6AQ.mjs} +10 -6
  19. package/dist/{chunk-N5XMZOMC.mjs → chunk-Z476VA6G.mjs} +279 -203
  20. package/dist/{full-NLUNPJWS.mjs → full-BEMDJKDS.mjs} +10 -7
  21. package/dist/index-BEoNHRI1.d.ts +116 -0
  22. package/dist/index-DfxZ7tZF.d.mts +116 -0
  23. package/dist/index.d.mts +6 -116
  24. package/dist/index.d.ts +6 -116
  25. package/dist/index.js +446 -376
  26. package/dist/index.mjs +14 -11
  27. package/dist/internal.d.mts +27 -0
  28. package/dist/internal.d.ts +27 -0
  29. package/dist/internal.js +908 -0
  30. package/dist/internal.mjs +13 -0
  31. package/dist/{loaded-ZXOU6S6R.mjs → loaded-JU3A7Y4L.mjs} +7 -4
  32. package/dist/{loaded-HMSPJUZM.mjs → loaded-N3FYGF2Y.mjs} +7 -4
  33. package/dist/{loaded-EV34KGYJ.mjs → loaded-OBY7OMS6.mjs} +7 -4
  34. package/dist/no-external.d.mts +3 -1
  35. package/dist/no-external.d.ts +3 -1
  36. package/dist/no-external.js +446 -376
  37. package/dist/no-external.mjs +14 -11
  38. package/dist/rsc.d.mts +2 -2
  39. package/dist/rsc.d.ts +2 -2
  40. package/dist/rsc.mjs +6 -4
  41. package/dist/walk-tree-CdriEzFJ.d.mts +29 -0
  42. package/dist/walk-tree-DHbAZ4wF.d.ts +29 -0
  43. package/package.json +9 -4
@@ -1,3 +1,7 @@
1
+ import {
2
+ EditorInner,
3
+ LoadedRichTextMenu
4
+ } from "./chunk-2Q4PACDA.mjs";
1
5
  import {
2
6
  RichTextRenderFallback,
3
7
  SlotRender,
@@ -7,17 +11,13 @@ import {
7
11
  useFieldTransforms,
8
12
  useRichtextProps,
9
13
  useSlots
10
- } from "./chunk-C2TVYIYC.mjs";
11
- import {
12
- EditorInner,
13
- LoadedRichTextMenu
14
- } from "./chunk-FNWOH4R6.mjs";
14
+ } from "./chunk-Y656T6AQ.mjs";
15
15
  import {
16
16
  ActionBar,
17
17
  IconButton,
18
18
  LoadedRichTextMenuInner,
19
19
  Loader
20
- } from "./chunk-K3V4LVUL.mjs";
20
+ } from "./chunk-BSDEIOEK.mjs";
21
21
  import {
22
22
  ChevronDown,
23
23
  ChevronRight,
@@ -50,14 +50,8 @@ import {
50
50
  ZoomOut,
51
51
  appStoreContext,
52
52
  createAppStore,
53
- generateId,
54
53
  getBox,
55
- getItem,
56
- insert,
57
- insertAction,
58
- makeStatePublic,
59
54
  monitorHotkeys,
60
- populateIds,
61
55
  reorder,
62
56
  replace,
63
57
  useAppStore,
@@ -68,11 +62,24 @@ import {
68
62
  useRegisterHistorySlice,
69
63
  useRegisterPermissionsSlice,
70
64
  useResetAutoZoom
71
- } from "./chunk-7KY6RHEY.mjs";
65
+ } from "./chunk-DAQLMM2T.mjs";
66
+ import {
67
+ generateId,
68
+ getItem,
69
+ insert,
70
+ insertAction,
71
+ makeStatePublic,
72
+ populateIds
73
+ } from "./chunk-QBGM4ELA.mjs";
72
74
  import {
73
75
  defaultAppState,
76
+ defaultViewports
77
+ } from "./chunk-T3WX7XJ6.mjs";
78
+ import {
79
+ get_class_name_factory_default
80
+ } from "./chunk-Y2EFNT5P.mjs";
81
+ import {
74
82
  defaultSlots,
75
- defaultViewports,
76
83
  expandNode,
77
84
  rootAreaId,
78
85
  rootDroppableId,
@@ -80,7 +87,7 @@ import {
80
87
  setupZone,
81
88
  walkAppState,
82
89
  walkField
83
- } from "./chunk-DJSH5REF.mjs";
90
+ } from "./chunk-NLUHDYVR.mjs";
84
91
  import {
85
92
  __async,
86
93
  __commonJS,
@@ -88,9 +95,8 @@ import {
88
95
  __spreadProps,
89
96
  __spreadValues,
90
97
  __toESM,
91
- get_class_name_factory_default,
92
98
  init_react_import
93
- } from "./chunk-DCSQEDMK.mjs";
99
+ } from "./chunk-M6W7YEVX.mjs";
94
100
 
95
101
  // ../../node_modules/fast-deep-equal/index.js
96
102
  var require_fast_deep_equal = __commonJS({
@@ -1696,7 +1702,7 @@ EditorFallback.displayName = "EditorFallback";
1696
1702
  // components/AutoField/fields/RichtextField/index.tsx
1697
1703
  import { Fragment as Fragment3, jsx as jsx15 } from "react/jsx-runtime";
1698
1704
  var Editor = lazy(
1699
- () => import("./Editor-N46HUQEC.mjs").then((m) => ({
1705
+ () => import("./Editor-O447AVCX.mjs").then((m) => ({
1700
1706
  default: m.Editor
1701
1707
  }))
1702
1708
  );
@@ -1896,17 +1902,18 @@ function AutoFieldInternal(props) {
1896
1902
  const resolvedId = id || defaultId;
1897
1903
  const render = useMemo3(
1898
1904
  () => {
1899
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
1905
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j;
1900
1906
  return __spreadProps(__spreadValues({}, overrides.fieldTypes), {
1901
- array: ((_a2 = overrides.fieldTypes) == null ? void 0 : _a2.array) || defaultFields.array,
1902
- external: ((_b = overrides.fieldTypes) == null ? void 0 : _b.external) || defaultFields.external,
1903
- object: ((_c = overrides.fieldTypes) == null ? void 0 : _c.object) || defaultFields.object,
1904
- select: ((_d = overrides.fieldTypes) == null ? void 0 : _d.select) || defaultFields.select,
1905
- textarea: ((_e = overrides.fieldTypes) == null ? void 0 : _e.textarea) || defaultFields.textarea,
1906
- radio: ((_f = overrides.fieldTypes) == null ? void 0 : _f.radio) || defaultFields.radio,
1907
- text: ((_g = overrides.fieldTypes) == null ? void 0 : _g.text) || defaultFields.text,
1908
- number: ((_h = overrides.fieldTypes) == null ? void 0 : _h.number) || defaultFields.number,
1909
- richtext: ((_i = overrides.fieldTypes) == null ? void 0 : _i.richtext) || defaultFields.richtext
1907
+ custom: (_a2 = overrides.fieldTypes) == null ? void 0 : _a2.custom,
1908
+ array: ((_b = overrides.fieldTypes) == null ? void 0 : _b.array) || defaultFields.array,
1909
+ external: ((_c = overrides.fieldTypes) == null ? void 0 : _c.external) || defaultFields.external,
1910
+ object: ((_d = overrides.fieldTypes) == null ? void 0 : _d.object) || defaultFields.object,
1911
+ select: ((_e = overrides.fieldTypes) == null ? void 0 : _e.select) || defaultFields.select,
1912
+ textarea: ((_f = overrides.fieldTypes) == null ? void 0 : _f.textarea) || defaultFields.textarea,
1913
+ radio: ((_g = overrides.fieldTypes) == null ? void 0 : _g.radio) || defaultFields.radio,
1914
+ text: ((_h = overrides.fieldTypes) == null ? void 0 : _h.text) || defaultFields.text,
1915
+ number: ((_i = overrides.fieldTypes) == null ? void 0 : _i.number) || defaultFields.number,
1916
+ richtext: ((_j = overrides.fieldTypes) == null ? void 0 : _j.richtext) || defaultFields.richtext
1910
1917
  });
1911
1918
  },
1912
1919
  [overrides]
@@ -1953,7 +1960,7 @@ function AutoFieldInternal(props) {
1953
1960
  }, [field.type]);
1954
1961
  const fieldKey = field.type === "custom" ? field.key : void 0;
1955
1962
  let FieldComponent = useMemo3(() => {
1956
- if (field.type === "custom") {
1963
+ if (field.type === "custom" && !render[field.type]) {
1957
1964
  if (!field.render) {
1958
1965
  return null;
1959
1966
  }
@@ -2046,7 +2053,7 @@ init_react_import();
2046
2053
  init_react_import();
2047
2054
  import {
2048
2055
  forwardRef,
2049
- memo as memo4,
2056
+ memo as memo5,
2050
2057
  useCallback as useCallback11,
2051
2058
  useContext as useContext7,
2052
2059
  useEffect as useEffect15,
@@ -4106,12 +4113,12 @@ import {
4106
4113
  } from "react";
4107
4114
  import { jsx as jsx25 } from "react/jsx-runtime";
4108
4115
  var Editor2 = lazy2(
4109
- () => import("./Editor-N46HUQEC.mjs").then((m) => ({
4116
+ () => import("./Editor-O447AVCX.mjs").then((m) => ({
4110
4117
  default: m.Editor
4111
4118
  }))
4112
4119
  );
4113
4120
  var RichTextRender = lazy2(
4114
- () => import("./Render-Y567PGZ7.mjs").then((m) => ({
4121
+ () => import("./Render-OFE6QLI2.mjs").then((m) => ({
4115
4122
  default: m.RichTextRender
4116
4123
  }))
4117
4124
  );
@@ -4215,12 +4222,70 @@ var getRichTextTransform = () => ({
4215
4222
  }
4216
4223
  });
4217
4224
 
4225
+ // components/MemoizeComponent/index.tsx
4226
+ init_react_import();
4227
+ import { deepEqual } from "fast-equals";
4228
+ import { memo as memo4 } from "react";
4229
+
4230
+ // lib/shallow-equal.ts
4231
+ init_react_import();
4232
+ function shallowEqual(obj1, obj2, keysToIgnore = []) {
4233
+ if (Object.is(obj1, obj2)) return true;
4234
+ if (typeof obj1 !== "object" || obj1 === null || typeof obj2 !== "object" || obj2 === null) {
4235
+ return false;
4236
+ }
4237
+ if (Object.getPrototypeOf(obj1) !== Object.getPrototypeOf(obj2)) {
4238
+ return false;
4239
+ }
4240
+ const ignore = new Set(keysToIgnore);
4241
+ const keys1 = Object.keys(obj1).filter((k) => !ignore.has(k));
4242
+ const keys2 = Object.keys(obj2).filter((k) => !ignore.has(k));
4243
+ if (keys1.length !== keys2.length) return false;
4244
+ for (let i = 0; i < keys1.length; i++) {
4245
+ const currKey = keys1[i];
4246
+ if (!Object.prototype.hasOwnProperty.call(obj2, currKey)) return false;
4247
+ const val1 = obj1[currKey];
4248
+ const val2 = obj2[currKey];
4249
+ if (!Object.is(val1, val2)) return false;
4250
+ }
4251
+ return true;
4252
+ }
4253
+
4254
+ // components/MemoizeComponent/index.tsx
4255
+ import { jsx as jsx26 } from "react/jsx-runtime";
4256
+ var RenderComponent = ({
4257
+ Component,
4258
+ componentProps: renderProps
4259
+ }) => {
4260
+ return /* @__PURE__ */ jsx26(Component, __spreadValues({}, renderProps));
4261
+ };
4262
+ var MemoizeComponent = memo4(RenderComponent, (prev, next) => {
4263
+ let puckEquals = true;
4264
+ if ("puck" in prev.componentProps && "puck" in next.componentProps) {
4265
+ puckEquals = deepEqual(prev.componentProps.puck, next.componentProps.puck);
4266
+ }
4267
+ return prev.Component === next.Component && shallowEqual(prev.componentProps, next.componentProps, ["puck"]) && puckEquals;
4268
+ });
4269
+
4218
4270
  // components/DropZone/index.tsx
4219
- import { Fragment as Fragment7, jsx as jsx26, jsxs as jsxs9 } from "react/jsx-runtime";
4271
+ import { Fragment as Fragment7, jsx as jsx27, jsxs as jsxs9 } from "react/jsx-runtime";
4220
4272
  var getClassName16 = get_class_name_factory_default("DropZone", styles_module_default9);
4221
4273
  var getRandomColor = () => `#${Math.floor(Math.random() * 16777215).toString(16)}`;
4222
4274
  var RENDER_DEBUG = false;
4223
- var DropZoneEditPure = (props) => /* @__PURE__ */ jsx26(DropZoneEdit, __spreadValues({}, props));
4275
+ var InsertPreview = ({
4276
+ element,
4277
+ label,
4278
+ override
4279
+ }) => {
4280
+ if (element) {
4281
+ return (
4282
+ // Safe to use this since the HTML is set by the user
4283
+ /* @__PURE__ */ jsx27("div", { dangerouslySetInnerHTML: { __html: element.outerHTML } })
4284
+ );
4285
+ }
4286
+ return /* @__PURE__ */ jsx27(DrawerItemInner, { name: label, children: override });
4287
+ };
4288
+ var DropZoneEditPure = (props) => /* @__PURE__ */ jsx27(DropZoneEdit, __spreadValues({}, props));
4224
4289
  var DropZoneChild = ({
4225
4290
  zoneCompound,
4226
4291
  componentId,
@@ -4298,19 +4363,6 @@ var DropZoneChild = ({
4298
4363
  }
4299
4364
  );
4300
4365
  let label = (_b = (_a = componentConfig == null ? void 0 : componentConfig.label) != null ? _a : item == null ? void 0 : item.type.toString()) != null ? _b : "Component";
4301
- const renderPreview = useMemo8(
4302
- () => function Preview3() {
4303
- var _a2;
4304
- if (item && "element" in item && item.element) {
4305
- return (
4306
- // Safe to use this since the HTML is set by the user
4307
- /* @__PURE__ */ jsx26("div", { dangerouslySetInnerHTML: { __html: item.element.outerHTML } })
4308
- );
4309
- }
4310
- return /* @__PURE__ */ jsx26(DrawerItemInner, { name: label, children: (_a2 = overrides.componentItem) != null ? _a2 : overrides.drawerItem });
4311
- },
4312
- [componentId, label, overrides]
4313
- );
4314
4366
  const defaultsProps = useMemo8(
4315
4367
  () => __spreadProps(__spreadValues(__spreadValues({}, componentConfig == null ? void 0 : componentConfig.defaultProps), item == null ? void 0 : item.props), {
4316
4368
  puck: puckProps,
@@ -4330,7 +4382,7 @@ var DropZoneChild = ({
4330
4382
  const plugins = useAppStore((s) => s.plugins);
4331
4383
  const userFieldTransforms = useAppStore((s) => s.fieldTransforms);
4332
4384
  const combinedFieldTransforms = useMemo8(
4333
- () => __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, getSlotTransform(DropZoneEditPure, (slotProps) => /* @__PURE__ */ jsx26(ContextSlotRender, { componentId, zone: slotProps.zone }))), getInlineTextTransform()), getRichTextTransform()), plugins.reduce(
4385
+ () => __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, getSlotTransform(DropZoneEditPure, (slotProps) => /* @__PURE__ */ jsx27(ContextSlotRender, { componentId, zone: slotProps.zone }))), getInlineTextTransform()), getRichTextTransform()), plugins.reduce(
4334
4386
  (acc, plugin) => __spreadValues(__spreadValues({}, acc), plugin.fieldTransforms),
4335
4387
  {}
4336
4388
  )), userFieldTransforms),
@@ -4344,16 +4396,13 @@ var DropZoneChild = ({
4344
4396
  isLoading
4345
4397
  );
4346
4398
  if (!item) return;
4347
- let Render2 = componentConfig ? componentConfig.render : () => /* @__PURE__ */ jsxs9("div", { style: { padding: 48, textAlign: "center" }, children: [
4399
+ const Render2 = componentConfig ? componentConfig.render : () => /* @__PURE__ */ jsxs9("div", { style: { padding: 48, textAlign: "center" }, children: [
4348
4400
  "No configuration for ",
4349
4401
  item.type
4350
4402
  ] });
4351
4403
  let componentType = item.type;
4352
4404
  const isInserting = "previewType" in item ? item.previewType === "insert" : false;
4353
- if (isInserting) {
4354
- Render2 = renderPreview;
4355
- }
4356
- return /* @__PURE__ */ jsx26(
4405
+ return /* @__PURE__ */ jsx27(
4357
4406
  DraggableComponent,
4358
4407
  {
4359
4408
  id: componentId,
@@ -4367,18 +4416,38 @@ var DropZoneChild = ({
4367
4416
  autoDragAxis: dragAxis,
4368
4417
  userDragAxis: collisionAxis,
4369
4418
  inDroppableZone,
4370
- children: (dragRef) => (componentConfig == null ? void 0 : componentConfig.inline) && !isInserting ? /* @__PURE__ */ jsx26(Fragment7, { children: /* @__PURE__ */ jsx26(
4371
- Render2,
4372
- __spreadProps(__spreadValues({}, transformedProps), {
4373
- puck: __spreadProps(__spreadValues({}, transformedProps.puck), {
4374
- dragRef
4375
- })
4376
- })
4377
- ) }) : /* @__PURE__ */ jsx26("div", { ref: dragRef, children: /* @__PURE__ */ jsx26(Render2, __spreadValues({}, transformedProps)) })
4419
+ children: (dragRef) => {
4420
+ var _a2;
4421
+ if ((componentConfig == null ? void 0 : componentConfig.inline) && !isInserting) {
4422
+ return /* @__PURE__ */ jsx27(
4423
+ MemoizeComponent,
4424
+ {
4425
+ Component: Render2,
4426
+ componentProps: __spreadProps(__spreadValues({}, transformedProps), {
4427
+ puck: __spreadProps(__spreadValues({}, transformedProps.puck), { dragRef })
4428
+ })
4429
+ }
4430
+ );
4431
+ }
4432
+ return /* @__PURE__ */ jsx27("div", { ref: dragRef, children: isInserting ? /* @__PURE__ */ jsx27(
4433
+ InsertPreview,
4434
+ {
4435
+ label,
4436
+ override: (_a2 = overrides.componentItem) != null ? _a2 : overrides.drawerItem,
4437
+ element: "element" in item && item.element ? item.element : void 0
4438
+ }
4439
+ ) : /* @__PURE__ */ jsx27(
4440
+ MemoizeComponent,
4441
+ {
4442
+ Component: Render2,
4443
+ componentProps: transformedProps
4444
+ }
4445
+ ) });
4446
+ }
4378
4447
  }
4379
4448
  );
4380
4449
  };
4381
- var DropZoneChildMemo = memo4(DropZoneChild);
4450
+ var DropZoneChildMemo = memo5(DropZoneChild);
4382
4451
  var DropZoneEdit = forwardRef(
4383
4452
  function DropZoneEditInternal({
4384
4453
  zone,
@@ -4531,8 +4600,14 @@ var DropZoneEdit = forwardRef(
4531
4600
  userMinEmptyHeight,
4532
4601
  ref
4533
4602
  });
4603
+ const setRefs = useCallback11(
4604
+ (node) => {
4605
+ assignRefs([ref, dropRef, userRef], node);
4606
+ },
4607
+ [dropRef]
4608
+ );
4534
4609
  const El = as != null ? as : "div";
4535
- return /* @__PURE__ */ jsx26(
4610
+ return /* @__PURE__ */ jsx27(
4536
4611
  El,
4537
4612
  {
4538
4613
  className: `${getClassName16({
@@ -4543,9 +4618,7 @@ var DropZoneEdit = forwardRef(
4543
4618
  hasChildren: contentIds.length > 0,
4544
4619
  isAnimating
4545
4620
  })}${className ? ` ${className}` : ""}`,
4546
- ref: (node) => {
4547
- assignRefs([ref, dropRef, userRef], node);
4548
- },
4621
+ ref: setRefs,
4549
4622
  "data-testid": `dropzone:${zoneCompound}`,
4550
4623
  "data-puck-dropzone": zoneCompound,
4551
4624
  style: __spreadProps(__spreadValues({}, style), {
@@ -4553,7 +4626,7 @@ var DropZoneEdit = forwardRef(
4553
4626
  backgroundColor: RENDER_DEBUG ? getRandomColor() : style == null ? void 0 : style.backgroundColor
4554
4627
  }),
4555
4628
  children: contentIdsWithPreview.map((componentId, i) => {
4556
- return /* @__PURE__ */ jsx26(
4629
+ return /* @__PURE__ */ jsx27(
4557
4630
  DropZoneChildMemo,
4558
4631
  {
4559
4632
  zoneCompound,
@@ -4576,7 +4649,7 @@ var DropZoneRenderItem = ({
4576
4649
  metadata
4577
4650
  }) => {
4578
4651
  const Component = config.components[item.type];
4579
- const props = useSlots(config, item, (slotProps) => /* @__PURE__ */ jsx26(SlotRenderPure, __spreadProps(__spreadValues({}, slotProps), { config, metadata })));
4652
+ const props = useSlots(config, item, (slotProps) => /* @__PURE__ */ jsx27(SlotRenderPure, __spreadProps(__spreadValues({}, slotProps), { config, metadata })));
4580
4653
  const nextContextValue = useMemo8(
4581
4654
  () => ({
4582
4655
  areaId: props.id,
@@ -4585,7 +4658,7 @@ var DropZoneRenderItem = ({
4585
4658
  [props]
4586
4659
  );
4587
4660
  const richtextProps = useRichtextProps(Component.fields, props);
4588
- return /* @__PURE__ */ jsx26(DropZoneProvider, { value: nextContextValue, children: /* @__PURE__ */ jsx26(
4661
+ return /* @__PURE__ */ jsx27(DropZoneProvider, { value: nextContextValue, children: /* @__PURE__ */ jsx27(
4589
4662
  Component.render,
4590
4663
  __spreadProps(__spreadValues(__spreadValues({}, props), richtextProps), {
4591
4664
  puck: __spreadProps(__spreadValues({}, props.puck), {
@@ -4595,7 +4668,7 @@ var DropZoneRenderItem = ({
4595
4668
  })
4596
4669
  ) }, props.id);
4597
4670
  };
4598
- var DropZoneRenderPure = (props) => /* @__PURE__ */ jsx26(DropZoneRender, __spreadValues({}, props));
4671
+ var DropZoneRenderPure = (props) => /* @__PURE__ */ jsx27(DropZoneRender, __spreadValues({}, props));
4599
4672
  var DropZoneRender = forwardRef(
4600
4673
  function DropZoneRenderInternal({ className, style, zone, as }, ref) {
4601
4674
  const ctx = useContext7(dropZoneContext);
@@ -4617,10 +4690,10 @@ var DropZoneRender = forwardRef(
4617
4690
  if (zoneCompound !== rootDroppableId) {
4618
4691
  content = setupZone(data, zoneCompound).zones[zoneCompound];
4619
4692
  }
4620
- return /* @__PURE__ */ jsx26(El, { className, style, ref, children: content.map((item) => {
4693
+ return /* @__PURE__ */ jsx27(El, { className, style, ref, children: content.map((item) => {
4621
4694
  const Component = config.components[item.type];
4622
4695
  if (Component) {
4623
- return /* @__PURE__ */ jsx26(
4696
+ return /* @__PURE__ */ jsx27(
4624
4697
  DropZoneRenderItem,
4625
4698
  {
4626
4699
  config,
@@ -4634,20 +4707,20 @@ var DropZoneRender = forwardRef(
4634
4707
  }) });
4635
4708
  }
4636
4709
  );
4637
- var DropZonePure = (props) => /* @__PURE__ */ jsx26(DropZone, __spreadValues({}, props));
4710
+ var DropZonePure = (props) => /* @__PURE__ */ jsx27(DropZone, __spreadValues({}, props));
4638
4711
  var DropZone = forwardRef(
4639
4712
  function DropZone2(props, ref) {
4640
4713
  const ctx = useContext7(dropZoneContext);
4641
4714
  if ((ctx == null ? void 0 : ctx.mode) === "edit") {
4642
- return /* @__PURE__ */ jsx26(Fragment7, { children: /* @__PURE__ */ jsx26(DropZoneEdit, __spreadProps(__spreadValues({}, props), { ref })) });
4715
+ return /* @__PURE__ */ jsx27(Fragment7, { children: /* @__PURE__ */ jsx27(DropZoneEdit, __spreadProps(__spreadValues({}, props), { ref })) });
4643
4716
  }
4644
- return /* @__PURE__ */ jsx26(Fragment7, { children: /* @__PURE__ */ jsx26(DropZoneRender, __spreadProps(__spreadValues({}, props), { ref })) });
4717
+ return /* @__PURE__ */ jsx27(Fragment7, { children: /* @__PURE__ */ jsx27(DropZoneRender, __spreadProps(__spreadValues({}, props), { ref })) });
4645
4718
  }
4646
4719
  );
4647
4720
 
4648
4721
  // components/Render/index.tsx
4649
4722
  import React3, { useMemo as useMemo9 } from "react";
4650
- import { jsx as jsx27 } from "react/jsx-runtime";
4723
+ import { jsx as jsx28 } from "react/jsx-runtime";
4651
4724
  var renderContext = React3.createContext({
4652
4725
  config: { components: {} },
4653
4726
  data: { root: {}, content: [] },
@@ -4679,7 +4752,7 @@ function Render({
4679
4752
  const propsWithSlots = useSlots(
4680
4753
  config,
4681
4754
  { type: "root", props: pageProps },
4682
- (props) => /* @__PURE__ */ jsx27(SlotRender, __spreadProps(__spreadValues({}, props), { config, metadata }))
4755
+ (props) => /* @__PURE__ */ jsx28(SlotRender, __spreadProps(__spreadValues({}, props), { config, metadata }))
4683
4756
  );
4684
4757
  const richtextProps = useRichtextProps((_a = config.root) == null ? void 0 : _a.fields, pageProps);
4685
4758
  const nextContextValue = useMemo9(
@@ -4690,9 +4763,9 @@ function Render({
4690
4763
  []
4691
4764
  );
4692
4765
  if ((_b = config.root) == null ? void 0 : _b.render) {
4693
- return /* @__PURE__ */ jsx27(renderContext.Provider, { value: { config, data: defaultedData, metadata }, children: /* @__PURE__ */ jsx27(DropZoneProvider, { value: nextContextValue, children: /* @__PURE__ */ jsx27(config.root.render, __spreadProps(__spreadValues(__spreadValues({}, propsWithSlots), richtextProps), { children: /* @__PURE__ */ jsx27(DropZoneRenderPure, { zone: rootZone }) })) }) });
4766
+ return /* @__PURE__ */ jsx28(renderContext.Provider, { value: { config, data: defaultedData, metadata }, children: /* @__PURE__ */ jsx28(DropZoneProvider, { value: nextContextValue, children: /* @__PURE__ */ jsx28(config.root.render, __spreadProps(__spreadValues(__spreadValues({}, propsWithSlots), richtextProps), { children: /* @__PURE__ */ jsx28(DropZoneRenderPure, { zone: rootZone }) })) }) });
4694
4767
  }
4695
- return /* @__PURE__ */ jsx27(renderContext.Provider, { value: { config, data: defaultedData, metadata }, children: /* @__PURE__ */ jsx27(DropZoneProvider, { value: nextContextValue, children: /* @__PURE__ */ jsx27(DropZoneRenderPure, { zone: rootZone }) }) });
4768
+ return /* @__PURE__ */ jsx28(renderContext.Provider, { value: { config, data: defaultedData, metadata }, children: /* @__PURE__ */ jsx28(DropZoneProvider, { value: nextContextValue, children: /* @__PURE__ */ jsx28(DropZoneRenderPure, { zone: rootZone }) }) });
4696
4769
  }
4697
4770
 
4698
4771
  // lib/use-puck.ts
@@ -4730,6 +4803,9 @@ var generateUsePuck = (store) => {
4730
4803
  return parentNode.data;
4731
4804
  }
4732
4805
  };
4806
+ storeData.__private = {
4807
+ appState: store.state
4808
+ };
4733
4809
  return storeData;
4734
4810
  };
4735
4811
  var UsePuckStoreContext = createContext4(
@@ -4854,7 +4930,7 @@ var useBreadcrumbs = (renderCount) => {
4854
4930
  };
4855
4931
 
4856
4932
  // components/SidebarSection/index.tsx
4857
- import { jsx as jsx28, jsxs as jsxs10 } from "react/jsx-runtime";
4933
+ import { jsx as jsx29, jsxs as jsxs10 } from "react/jsx-runtime";
4858
4934
  var getClassName17 = get_class_name_factory_default("SidebarSection", styles_module_default12);
4859
4935
  var SidebarSection = ({
4860
4936
  children,
@@ -4873,9 +4949,9 @@ var SidebarSection = ({
4873
4949
  className: getClassName17({ noBorderTop, noPadding }),
4874
4950
  style: { background },
4875
4951
  children: [
4876
- /* @__PURE__ */ jsx28("div", { className: getClassName17("title"), children: /* @__PURE__ */ jsxs10("div", { className: getClassName17("breadcrumbs"), children: [
4952
+ /* @__PURE__ */ jsx29("div", { className: getClassName17("title"), children: /* @__PURE__ */ jsxs10("div", { className: getClassName17("breadcrumbs"), children: [
4877
4953
  showBreadcrumbs ? breadcrumbs.map((breadcrumb, i) => /* @__PURE__ */ jsxs10("div", { className: getClassName17("breadcrumb"), children: [
4878
- /* @__PURE__ */ jsx28(
4954
+ /* @__PURE__ */ jsx29(
4879
4955
  "button",
4880
4956
  {
4881
4957
  type: "button",
@@ -4884,12 +4960,12 @@ var SidebarSection = ({
4884
4960
  children: breadcrumb.label
4885
4961
  }
4886
4962
  ),
4887
- /* @__PURE__ */ jsx28(ChevronRight, { size: 16 })
4963
+ /* @__PURE__ */ jsx29(ChevronRight, { size: 16 })
4888
4964
  ] }, i)) : null,
4889
- /* @__PURE__ */ jsx28("div", { className: getClassName17("heading"), children: /* @__PURE__ */ jsx28(Heading, { rank: "2", size: "xs", children: title }) })
4965
+ /* @__PURE__ */ jsx29("div", { className: getClassName17("heading"), children: /* @__PURE__ */ jsx29(Heading, { rank: "2", size: "xs", children: title }) })
4890
4966
  ] }) }),
4891
- /* @__PURE__ */ jsx28("div", { className: getClassName17("content"), children }),
4892
- isLoading && /* @__PURE__ */ jsx28("div", { className: getClassName17("loadingOverlay"), children: /* @__PURE__ */ jsx28(Loader, { size: 32 }) })
4967
+ /* @__PURE__ */ jsx29("div", { className: getClassName17("content"), children }),
4968
+ isLoading && /* @__PURE__ */ jsx29("div", { className: getClassName17("loadingOverlay"), children: /* @__PURE__ */ jsx29(Loader, { size: 32 }) })
4893
4969
  ]
4894
4970
  }
4895
4971
  );
@@ -4907,14 +4983,14 @@ init_react_import();
4907
4983
  var styles_module_default14 = { "PuckFields": "_PuckFields_10bh7_1", "PuckFields--isLoading": "_PuckFields--isLoading_10bh7_6", "PuckFields-loadingOverlay": "_PuckFields-loadingOverlay_10bh7_10", "PuckFields-loadingOverlayInner": "_PuckFields-loadingOverlayInner_10bh7_25", "PuckFields-field": "_PuckFields-field_10bh7_32", "PuckFields--wrapFields": "_PuckFields--wrapFields_10bh7_36" };
4908
4984
 
4909
4985
  // components/Puck/components/Fields/index.tsx
4910
- import { memo as memo5, useCallback as useCallback12, useMemo as useMemo11 } from "react";
4986
+ import { memo as memo6, useCallback as useCallback12, useMemo as useMemo11 } from "react";
4911
4987
  import { useShallow as useShallow5 } from "zustand/react/shallow";
4912
- import { Fragment as Fragment8, jsx as jsx29, jsxs as jsxs11 } from "react/jsx-runtime";
4988
+ import { Fragment as Fragment8, jsx as jsx30, jsxs as jsxs11 } from "react/jsx-runtime";
4913
4989
  var getClassName18 = get_class_name_factory_default("PuckFields", styles_module_default14);
4914
4990
  var DefaultFields = ({
4915
4991
  children
4916
4992
  }) => {
4917
- return /* @__PURE__ */ jsx29(Fragment8, { children });
4993
+ return /* @__PURE__ */ jsx30(Fragment8, { children });
4918
4994
  };
4919
4995
  var createOnChange = (fieldName, appStore) => (value, updatedUi) => __async(null, null, function* () {
4920
4996
  const { dispatch, state, selectedItem, resolveComponentData } = appStore.getState();
@@ -4985,7 +5061,7 @@ var FieldsChild = ({ fieldName }) => {
4985
5061
  const { visible = true } = field != null ? field : {};
4986
5062
  if (!field || !id || !visible) return null;
4987
5063
  if (field.type === "slot") return null;
4988
- return /* @__PURE__ */ jsx29("div", { className: getClassName18("field"), children: /* @__PURE__ */ jsx29(
5064
+ return /* @__PURE__ */ jsx30("div", { className: getClassName18("field"), children: /* @__PURE__ */ jsx30(
4989
5065
  AutoFieldPrivate,
4990
5066
  {
4991
5067
  field,
@@ -4997,7 +5073,7 @@ var FieldsChild = ({ fieldName }) => {
4997
5073
  }
4998
5074
  ) }, id);
4999
5075
  };
5000
- var FieldsChildMemo = memo5(FieldsChild);
5076
+ var FieldsChildMemo = memo6(FieldsChild);
5001
5077
  var FieldsInternal = ({ wrapFields = true }) => {
5002
5078
  const overrides = useAppStore((s) => s.overrides);
5003
5079
  const componentResolving = useAppStore((s) => {
@@ -5031,13 +5107,13 @@ var FieldsInternal = ({ wrapFields = true }) => {
5031
5107
  e.preventDefault();
5032
5108
  },
5033
5109
  children: [
5034
- /* @__PURE__ */ jsx29(Wrapper, { isLoading, itemSelector, children: fieldNames.map((fieldName) => /* @__PURE__ */ jsx29(FieldsChildMemo, { fieldName }, fieldName)) }),
5035
- isLoading && /* @__PURE__ */ jsx29("div", { className: getClassName18("loadingOverlay"), children: /* @__PURE__ */ jsx29("div", { className: getClassName18("loadingOverlayInner"), children: /* @__PURE__ */ jsx29(Loader, { size: 16 }) }) })
5110
+ /* @__PURE__ */ jsx30(Wrapper, { isLoading, itemSelector, children: fieldNames.map((fieldName) => /* @__PURE__ */ jsx30(FieldsChildMemo, { fieldName }, fieldName)) }),
5111
+ isLoading && /* @__PURE__ */ jsx30("div", { className: getClassName18("loadingOverlay"), children: /* @__PURE__ */ jsx30("div", { className: getClassName18("loadingOverlayInner"), children: /* @__PURE__ */ jsx30(Loader, { size: 16 }) }) })
5036
5112
  ]
5037
5113
  }
5038
5114
  );
5039
5115
  };
5040
- var Fields = memo5(FieldsInternal);
5116
+ var Fields = memo6(FieldsInternal);
5041
5117
 
5042
5118
  // components/Puck/components/Components/index.tsx
5043
5119
  init_react_import();
@@ -5055,7 +5131,7 @@ var styles_module_default15 = { "ComponentList": "_ComponentList_1rrlt_1", "Comp
5055
5131
 
5056
5132
  // components/ComponentList/index.tsx
5057
5133
  import { useEffect as useEffect17 } from "react";
5058
- import { jsx as jsx30, jsxs as jsxs12 } from "react/jsx-runtime";
5134
+ import { jsx as jsx31, jsxs as jsxs12 } from "react/jsx-runtime";
5059
5135
  var getClassName19 = get_class_name_factory_default("ComponentList", styles_module_default15);
5060
5136
  var ComponentListItem = ({
5061
5137
  name,
@@ -5075,7 +5151,7 @@ var ComponentListItem = ({
5075
5151
  );
5076
5152
  }
5077
5153
  }, [overrides]);
5078
- return /* @__PURE__ */ jsx30(Drawer.Item, { label, name, isDragDisabled: !canInsert, children: (_a = overrides.componentItem) != null ? _a : overrides.drawerItem });
5154
+ return /* @__PURE__ */ jsx31(Drawer.Item, { label, name, isDragDisabled: !canInsert, children: (_a = overrides.componentItem) != null ? _a : overrides.drawerItem });
5079
5155
  };
5080
5156
  var ComponentList = ({
5081
5157
  children,
@@ -5101,14 +5177,14 @@ var ComponentList = ({
5101
5177
  }),
5102
5178
  title: expanded ? `Collapse${title ? ` ${title}` : ""}` : `Expand${title ? ` ${title}` : ""}`,
5103
5179
  children: [
5104
- /* @__PURE__ */ jsx30("div", { children: title }),
5105
- /* @__PURE__ */ jsx30("div", { className: getClassName19("titleIcon"), children: expanded ? /* @__PURE__ */ jsx30(ChevronUp, { size: 12 }) : /* @__PURE__ */ jsx30(ChevronDown, { size: 12 }) })
5180
+ /* @__PURE__ */ jsx31("div", { children: title }),
5181
+ /* @__PURE__ */ jsx31("div", { className: getClassName19("titleIcon"), children: expanded ? /* @__PURE__ */ jsx31(ChevronUp, { size: 12 }) : /* @__PURE__ */ jsx31(ChevronDown, { size: 12 }) })
5106
5182
  ]
5107
5183
  }
5108
5184
  ),
5109
- /* @__PURE__ */ jsx30("div", { className: getClassName19("content"), children: /* @__PURE__ */ jsx30(Drawer, { children: children || Object.keys(config.components).map((componentKey) => {
5185
+ /* @__PURE__ */ jsx31("div", { className: getClassName19("content"), children: /* @__PURE__ */ jsx31(Drawer, { children: children || Object.keys(config.components).map((componentKey) => {
5110
5186
  var _a;
5111
- return /* @__PURE__ */ jsx30(
5187
+ return /* @__PURE__ */ jsx31(
5112
5188
  ComponentListItem,
5113
5189
  {
5114
5190
  label: (_a = config.components[componentKey]["label"]) != null ? _a : componentKey,
@@ -5122,7 +5198,7 @@ var ComponentList = ({
5122
5198
  ComponentList.Item = ComponentListItem;
5123
5199
 
5124
5200
  // lib/use-component-list.tsx
5125
- import { jsx as jsx31 } from "react/jsx-runtime";
5201
+ import { jsx as jsx32 } from "react/jsx-runtime";
5126
5202
  var useComponentList = () => {
5127
5203
  const [componentList, setComponentList] = useState17();
5128
5204
  const config = useAppStore((s) => s.config);
@@ -5143,7 +5219,7 @@ var useComponentList = () => {
5143
5219
  if (category.visible === false) {
5144
5220
  return null;
5145
5221
  }
5146
- return /* @__PURE__ */ jsx31(
5222
+ return /* @__PURE__ */ jsx32(
5147
5223
  ComponentList,
5148
5224
  {
5149
5225
  id: categoryKey,
@@ -5151,7 +5227,7 @@ var useComponentList = () => {
5151
5227
  children: category.components.map((componentName, i) => {
5152
5228
  var _a2;
5153
5229
  const componentConf = config.components[componentName] || {};
5154
- return /* @__PURE__ */ jsx31(
5230
+ return /* @__PURE__ */ jsx32(
5155
5231
  ComponentList.Item,
5156
5232
  {
5157
5233
  label: (_a2 = componentConf["label"]) != null ? _a2 : componentName,
@@ -5171,7 +5247,7 @@ var useComponentList = () => {
5171
5247
  );
5172
5248
  if (remainingComponents.length > 0 && !((_a = uiComponentList.other) == null ? void 0 : _a.components) && ((_b = uiComponentList.other) == null ? void 0 : _b.visible) !== false) {
5173
5249
  _componentList.push(
5174
- /* @__PURE__ */ jsx31(
5250
+ /* @__PURE__ */ jsx32(
5175
5251
  ComponentList,
5176
5252
  {
5177
5253
  id: "other",
@@ -5179,7 +5255,7 @@ var useComponentList = () => {
5179
5255
  children: remainingComponents.map((componentName, i) => {
5180
5256
  var _a2;
5181
5257
  const componentConf = config.components[componentName] || {};
5182
- return /* @__PURE__ */ jsx31(
5258
+ return /* @__PURE__ */ jsx32(
5183
5259
  ComponentList.Item,
5184
5260
  {
5185
5261
  name: componentName,
@@ -5202,7 +5278,7 @@ var useComponentList = () => {
5202
5278
 
5203
5279
  // components/Puck/components/Components/index.tsx
5204
5280
  import { useMemo as useMemo12 } from "react";
5205
- import { jsx as jsx32 } from "react/jsx-runtime";
5281
+ import { jsx as jsx33 } from "react/jsx-runtime";
5206
5282
  var Components = () => {
5207
5283
  const overrides = useAppStore((s) => s.overrides);
5208
5284
  const componentList = useComponentList();
@@ -5214,7 +5290,7 @@ var Components = () => {
5214
5290
  }
5215
5291
  return overrides.components || overrides.drawer || "div";
5216
5292
  }, [overrides]);
5217
- return /* @__PURE__ */ jsx32(Wrapper, { children: componentList ? componentList : /* @__PURE__ */ jsx32(ComponentList, { id: "all" }) });
5293
+ return /* @__PURE__ */ jsx33(Wrapper, { children: componentList ? componentList : /* @__PURE__ */ jsx33(ComponentList, { id: "all" }) });
5218
5294
  };
5219
5295
 
5220
5296
  // components/Puck/components/Preview/index.tsx
@@ -5231,7 +5307,7 @@ import {
5231
5307
  } from "react";
5232
5308
  import hash from "object-hash";
5233
5309
  import { createPortal as createPortal3 } from "react-dom";
5234
- import { Fragment as Fragment9, jsx as jsx33 } from "react/jsx-runtime";
5310
+ import { Fragment as Fragment9, jsx as jsx34 } from "react/jsx-runtime";
5235
5311
  var styleSelector = 'style, link[rel="stylesheet"]';
5236
5312
  var collectStyles = (doc) => {
5237
5313
  const collected = [];
@@ -5438,7 +5514,7 @@ var CopyHostStyles = ({
5438
5514
  observer.disconnect();
5439
5515
  };
5440
5516
  }, []);
5441
- return /* @__PURE__ */ jsx33(Fragment9, { children });
5517
+ return /* @__PURE__ */ jsx34(Fragment9, { children });
5442
5518
  };
5443
5519
  var autoFrameContext = createContext5({});
5444
5520
  var useFrame = () => useContext9(autoFrameContext);
@@ -5485,7 +5561,7 @@ function AutoFrame(_a) {
5485
5561
  }
5486
5562
  }
5487
5563
  }, [frameRef, loaded, stylesLoaded]);
5488
- return /* @__PURE__ */ jsx33(
5564
+ return /* @__PURE__ */ jsx34(
5489
5565
  "iframe",
5490
5566
  __spreadProps(__spreadValues({}, props), {
5491
5567
  className,
@@ -5495,7 +5571,7 @@ function AutoFrame(_a) {
5495
5571
  onLoad: () => {
5496
5572
  setLoaded(true);
5497
5573
  },
5498
- children: /* @__PURE__ */ jsx33(autoFrameContext.Provider, { value: ctx, children: loaded && mountTarget && /* @__PURE__ */ jsx33(
5574
+ children: /* @__PURE__ */ jsx34(autoFrameContext.Provider, { value: ctx, children: loaded && mountTarget && /* @__PURE__ */ jsx34(
5499
5575
  CopyHostStyles,
5500
5576
  {
5501
5577
  debug,
@@ -5514,7 +5590,7 @@ init_react_import();
5514
5590
  var styles_module_default16 = { "PuckPreview": "_PuckPreview_z2rgu_1", "PuckPreview-frame": "_PuckPreview-frame_z2rgu_6" };
5515
5591
 
5516
5592
  // components/Puck/components/Preview/index.tsx
5517
- import { Fragment as Fragment10, jsx as jsx34 } from "react/jsx-runtime";
5593
+ import { Fragment as Fragment10, jsx as jsx35 } from "react/jsx-runtime";
5518
5594
  var getClassName20 = get_class_name_factory_default("PuckPreview", styles_module_default16);
5519
5595
  var useBubbleIframeEvents = (ref) => {
5520
5596
  const status = useAppStore((s) => s.status);
@@ -5581,7 +5657,7 @@ var Preview2 = ({ id = "puck-preview" }) => {
5581
5657
  );
5582
5658
  return ((_c = config.root) == null ? void 0 : _c.render) ? (_d = config.root) == null ? void 0 : _d.render(__spreadValues(__spreadValues({
5583
5659
  id: "puck-root"
5584
- }, propsWithSlots), richtextProps)) : /* @__PURE__ */ jsx34(Fragment10, { children: propsWithSlots.children });
5660
+ }, propsWithSlots), richtextProps)) : /* @__PURE__ */ jsx35(Fragment10, { children: propsWithSlots.children });
5585
5661
  },
5586
5662
  [config]
5587
5663
  );
@@ -5589,7 +5665,7 @@ var Preview2 = ({ id = "puck-preview" }) => {
5589
5665
  const rootProps = root.props || root;
5590
5666
  const ref = useRef8(null);
5591
5667
  useBubbleIframeEvents(ref);
5592
- const inner = !renderData ? /* @__PURE__ */ jsx34(
5668
+ const inner = !renderData ? /* @__PURE__ */ jsx35(
5593
5669
  Page,
5594
5670
  __spreadProps(__spreadValues({}, rootProps), {
5595
5671
  puck: {
@@ -5599,15 +5675,15 @@ var Preview2 = ({ id = "puck-preview" }) => {
5599
5675
  metadata
5600
5676
  },
5601
5677
  editMode: true,
5602
- children: /* @__PURE__ */ jsx34(DropZonePure, { zone: rootDroppableId })
5678
+ children: /* @__PURE__ */ jsx35(DropZonePure, { zone: rootDroppableId })
5603
5679
  })
5604
- ) : /* @__PURE__ */ jsx34(Render, { data: renderData, config, metadata });
5680
+ ) : /* @__PURE__ */ jsx35(Render, { data: renderData, config, metadata });
5605
5681
  useEffect20(() => {
5606
5682
  if (!iframe.enabled) {
5607
5683
  setStatus("READY");
5608
5684
  }
5609
5685
  }, [iframe.enabled]);
5610
- return /* @__PURE__ */ jsx34(
5686
+ return /* @__PURE__ */ jsx35(
5611
5687
  "div",
5612
5688
  {
5613
5689
  className: getClassName20(),
@@ -5619,7 +5695,7 @@ var Preview2 = ({ id = "puck-preview" }) => {
5619
5695
  dispatch({ type: "setUi", ui: { itemSelector: null } });
5620
5696
  }
5621
5697
  },
5622
- children: iframe.enabled ? /* @__PURE__ */ jsx34(
5698
+ children: iframe.enabled ? /* @__PURE__ */ jsx35(
5623
5699
  AutoFrame_default,
5624
5700
  {
5625
5701
  id: "preview-frame",
@@ -5632,14 +5708,14 @@ var Preview2 = ({ id = "puck-preview" }) => {
5632
5708
  setStatus("MOUNTED");
5633
5709
  },
5634
5710
  frameRef: ref,
5635
- children: /* @__PURE__ */ jsx34(autoFrameContext.Consumer, { children: ({ document: document2 }) => {
5711
+ children: /* @__PURE__ */ jsx35(autoFrameContext.Consumer, { children: ({ document: document2 }) => {
5636
5712
  if (Frame) {
5637
- return /* @__PURE__ */ jsx34(Frame, { document: document2, children: inner });
5713
+ return /* @__PURE__ */ jsx35(Frame, { document: document2, children: inner });
5638
5714
  }
5639
5715
  return inner;
5640
5716
  } })
5641
5717
  }
5642
- ) : /* @__PURE__ */ jsx34(
5718
+ ) : /* @__PURE__ */ jsx35(
5643
5719
  "div",
5644
5720
  {
5645
5721
  id: "preview-frame",
@@ -5698,7 +5774,7 @@ var onScrollEnd = (frame, cb) => {
5698
5774
 
5699
5775
  // components/LayerTree/index.tsx
5700
5776
  import { useShallow as useShallow6 } from "zustand/react/shallow";
5701
- import { Fragment as Fragment11, jsx as jsx35, jsxs as jsxs13 } from "react/jsx-runtime";
5777
+ import { Fragment as Fragment11, jsx as jsx36, jsxs as jsxs13 } from "react/jsx-runtime";
5702
5778
  var getClassName21 = get_class_name_factory_default("LayerTree", styles_module_default17);
5703
5779
  var getClassNameLayer = get_class_name_factory_default("Layer", styles_module_default17);
5704
5780
  var Layer = ({
@@ -5755,7 +5831,7 @@ var Layer = ({
5755
5831
  childIsSelected
5756
5832
  }),
5757
5833
  children: [
5758
- /* @__PURE__ */ jsx35("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */ jsxs13(
5834
+ /* @__PURE__ */ jsx36("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */ jsxs13(
5759
5835
  "button",
5760
5836
  {
5761
5837
  type: "button",
@@ -5793,22 +5869,22 @@ var Layer = ({
5793
5869
  zoneStore.setState({ hoveringComponent: null });
5794
5870
  },
5795
5871
  children: [
5796
- containsZone && /* @__PURE__ */ jsx35(
5872
+ containsZone && /* @__PURE__ */ jsx36(
5797
5873
  "div",
5798
5874
  {
5799
5875
  className: getClassNameLayer("chevron"),
5800
5876
  title: isSelected ? "Collapse" : "Expand",
5801
- children: /* @__PURE__ */ jsx35(ChevronDown, { size: "12" })
5877
+ children: /* @__PURE__ */ jsx36(ChevronDown, { size: "12" })
5802
5878
  }
5803
5879
  ),
5804
5880
  /* @__PURE__ */ jsxs13("div", { className: getClassNameLayer("title"), children: [
5805
- /* @__PURE__ */ jsx35("div", { className: getClassNameLayer("icon"), children: nodeData.data.type === "Text" || nodeData.data.type === "Heading" ? /* @__PURE__ */ jsx35(Type, { size: "16" }) : /* @__PURE__ */ jsx35(LayoutGrid, { size: "16" }) }),
5806
- /* @__PURE__ */ jsx35("div", { className: getClassNameLayer("name"), children: label })
5881
+ /* @__PURE__ */ jsx36("div", { className: getClassNameLayer("icon"), children: nodeData.data.type === "Text" || nodeData.data.type === "Heading" ? /* @__PURE__ */ jsx36(Type, { size: "16" }) : /* @__PURE__ */ jsx36(LayoutGrid, { size: "16" }) }),
5882
+ /* @__PURE__ */ jsx36("div", { className: getClassNameLayer("name"), children: label })
5807
5883
  ] })
5808
5884
  ]
5809
5885
  }
5810
5886
  ) }),
5811
- containsZone && zonesForItem.map((subzone) => /* @__PURE__ */ jsx35("div", { className: getClassNameLayer("zones"), children: /* @__PURE__ */ jsx35(LayerTree, { zoneCompound: subzone }) }, subzone))
5887
+ containsZone && zonesForItem.map((subzone) => /* @__PURE__ */ jsx36("div", { className: getClassNameLayer("zones"), children: /* @__PURE__ */ jsx36(LayerTree, { zoneCompound: subzone }) }, subzone))
5812
5888
  ]
5813
5889
  }
5814
5890
  );
@@ -5836,13 +5912,13 @@ var LayerTree = ({
5836
5912
  );
5837
5913
  return /* @__PURE__ */ jsxs13(Fragment11, { children: [
5838
5914
  label && /* @__PURE__ */ jsxs13("div", { className: getClassName21("zoneTitle"), children: [
5839
- /* @__PURE__ */ jsx35("div", { className: getClassName21("zoneIcon"), children: /* @__PURE__ */ jsx35(Layers, { size: "16" }) }),
5915
+ /* @__PURE__ */ jsx36("div", { className: getClassName21("zoneIcon"), children: /* @__PURE__ */ jsx36(Layers, { size: "16" }) }),
5840
5916
  label
5841
5917
  ] }),
5842
5918
  /* @__PURE__ */ jsxs13("ul", { className: getClassName21(), children: [
5843
- contentIds.length === 0 && /* @__PURE__ */ jsx35("div", { className: getClassName21("helper"), children: "No items" }),
5919
+ contentIds.length === 0 && /* @__PURE__ */ jsx36("div", { className: getClassName21("helper"), children: "No items" }),
5844
5920
  contentIds.map((itemId, i) => {
5845
- return /* @__PURE__ */ jsx35(
5921
+ return /* @__PURE__ */ jsx36(
5846
5922
  Layer,
5847
5923
  {
5848
5924
  index: i,
@@ -5869,14 +5945,14 @@ var findZonesForArea = (state, area) => {
5869
5945
 
5870
5946
  // components/Puck/components/Outline/index.tsx
5871
5947
  import { useShallow as useShallow7 } from "zustand/react/shallow";
5872
- import { jsx as jsx36 } from "react/jsx-runtime";
5948
+ import { jsx as jsx37 } from "react/jsx-runtime";
5873
5949
  var Outline = () => {
5874
5950
  const outlineOverride = useAppStore((s) => s.overrides.outline);
5875
5951
  const rootZones = useAppStore(
5876
5952
  useShallow7((s) => findZonesForArea(s.state, "root"))
5877
5953
  );
5878
5954
  const Wrapper = useMemo14(() => outlineOverride || "div", [outlineOverride]);
5879
- return /* @__PURE__ */ jsx36(Wrapper, { children: rootZones.map((zoneCompound) => /* @__PURE__ */ jsx36(
5955
+ return /* @__PURE__ */ jsx37(Wrapper, { children: rootZones.map((zoneCompound) => /* @__PURE__ */ jsx37(
5880
5956
  LayerTree,
5881
5957
  {
5882
5958
  label: rootZones.length === 1 ? "" : zoneCompound.split(":")[1],
@@ -5905,11 +5981,11 @@ init_react_import();
5905
5981
  var styles_module_default18 = { "ViewportControls": "_ViewportControls_gejzr_1", "ViewportControls-divider": "_ViewportControls-divider_gejzr_15", "ViewportControls-zoomSelect": "_ViewportControls-zoomSelect_gejzr_21", "ViewportButton--isActive": "_ViewportButton--isActive_gejzr_38", "ViewportButton-inner": "_ViewportButton-inner_gejzr_38" };
5906
5982
 
5907
5983
  // components/ViewportControls/index.tsx
5908
- import { jsx as jsx37, jsxs as jsxs14 } from "react/jsx-runtime";
5984
+ import { jsx as jsx38, jsxs as jsxs14 } from "react/jsx-runtime";
5909
5985
  var icons = {
5910
- Smartphone: /* @__PURE__ */ jsx37(Smartphone, { size: 16 }),
5911
- Tablet: /* @__PURE__ */ jsx37(Tablet, { size: 16 }),
5912
- Monitor: /* @__PURE__ */ jsx37(Monitor, { size: 16 })
5986
+ Smartphone: /* @__PURE__ */ jsx38(Smartphone, { size: 16 }),
5987
+ Tablet: /* @__PURE__ */ jsx38(Tablet, { size: 16 }),
5988
+ Monitor: /* @__PURE__ */ jsx38(Monitor, { size: 16 })
5913
5989
  };
5914
5990
  var getClassName22 = get_class_name_factory_default("ViewportControls", styles_module_default18);
5915
5991
  var getClassNameButton = get_class_name_factory_default("ViewportButton", styles_module_default18);
@@ -5925,7 +6001,7 @@ var ViewportButton = ({
5925
6001
  useEffect21(() => {
5926
6002
  setIsActive(width === viewports.current.width);
5927
6003
  }, [width, viewports.current.width]);
5928
- return /* @__PURE__ */ jsx37("span", { className: getClassNameButton({ isActive }), children: /* @__PURE__ */ jsx37(
6004
+ return /* @__PURE__ */ jsx38("span", { className: getClassNameButton({ isActive }), children: /* @__PURE__ */ jsx38(
5929
6005
  IconButton,
5930
6006
  {
5931
6007
  type: "button",
@@ -5935,7 +6011,7 @@ var ViewportButton = ({
5935
6011
  e.stopPropagation();
5936
6012
  onClick({ width, height });
5937
6013
  },
5938
- children: /* @__PURE__ */ jsx37("span", { className: getClassNameButton("inner"), children })
6014
+ children: /* @__PURE__ */ jsx38("span", { className: getClassNameButton("inner"), children })
5939
6015
  }
5940
6016
  ) });
5941
6017
  };
@@ -5972,7 +6048,7 @@ var ViewportControls = ({
5972
6048
  [autoZoom]
5973
6049
  );
5974
6050
  return /* @__PURE__ */ jsxs14("div", { className: getClassName22(), children: [
5975
- viewports.map((viewport, i) => /* @__PURE__ */ jsx37(
6051
+ viewports.map((viewport, i) => /* @__PURE__ */ jsx38(
5976
6052
  ViewportButton,
5977
6053
  {
5978
6054
  height: viewport.height,
@@ -5983,8 +6059,8 @@ var ViewportControls = ({
5983
6059
  },
5984
6060
  i
5985
6061
  )),
5986
- /* @__PURE__ */ jsx37("div", { className: getClassName22("divider") }),
5987
- /* @__PURE__ */ jsx37(
6062
+ /* @__PURE__ */ jsx38("div", { className: getClassName22("divider") }),
6063
+ /* @__PURE__ */ jsx38(
5988
6064
  IconButton,
5989
6065
  {
5990
6066
  type: "button",
@@ -5999,10 +6075,10 @@ var ViewportControls = ({
5999
6075
  )].value
6000
6076
  );
6001
6077
  },
6002
- children: /* @__PURE__ */ jsx37(ZoomOut, { size: 16 })
6078
+ children: /* @__PURE__ */ jsx38(ZoomOut, { size: 16 })
6003
6079
  }
6004
6080
  ),
6005
- /* @__PURE__ */ jsx37(
6081
+ /* @__PURE__ */ jsx38(
6006
6082
  IconButton,
6007
6083
  {
6008
6084
  type: "button",
@@ -6017,11 +6093,11 @@ var ViewportControls = ({
6017
6093
  )].value
6018
6094
  );
6019
6095
  },
6020
- children: /* @__PURE__ */ jsx37(ZoomIn, { size: 16 })
6096
+ children: /* @__PURE__ */ jsx38(ZoomIn, { size: 16 })
6021
6097
  }
6022
6098
  ),
6023
- /* @__PURE__ */ jsx37("div", { className: getClassName22("divider") }),
6024
- /* @__PURE__ */ jsx37(
6099
+ /* @__PURE__ */ jsx38("div", { className: getClassName22("divider") }),
6100
+ /* @__PURE__ */ jsx38(
6025
6101
  "select",
6026
6102
  {
6027
6103
  className: getClassName22("zoomSelect"),
@@ -6032,7 +6108,7 @@ var ViewportControls = ({
6032
6108
  onChange: (e) => {
6033
6109
  onZoom(parseFloat(e.currentTarget.value));
6034
6110
  },
6035
- children: zoomOptions.map((option) => /* @__PURE__ */ jsx37(
6111
+ children: zoomOptions.map((option) => /* @__PURE__ */ jsx38(
6036
6112
  "option",
6037
6113
  {
6038
6114
  value: option.value,
@@ -6060,7 +6136,7 @@ import {
6060
6136
  useRef as useRef9,
6061
6137
  useMemo as useMemo16
6062
6138
  } from "react";
6063
- import { jsx as jsx38 } from "react/jsx-runtime";
6139
+ import { jsx as jsx39 } from "react/jsx-runtime";
6064
6140
  var FrameContext = createContext6(null);
6065
6141
  var FrameProvider = ({
6066
6142
  children
@@ -6072,7 +6148,7 @@ var FrameProvider = ({
6072
6148
  }),
6073
6149
  []
6074
6150
  );
6075
- return /* @__PURE__ */ jsx38(FrameContext.Provider, { value, children });
6151
+ return /* @__PURE__ */ jsx39(FrameContext.Provider, { value, children });
6076
6152
  };
6077
6153
  var useCanvasFrame = () => {
6078
6154
  const context = useContext11(FrameContext);
@@ -6083,7 +6159,7 @@ var useCanvasFrame = () => {
6083
6159
  };
6084
6160
 
6085
6161
  // components/Puck/components/Canvas/index.tsx
6086
- import { Fragment as Fragment12, jsx as jsx39, jsxs as jsxs15 } from "react/jsx-runtime";
6162
+ import { Fragment as Fragment12, jsx as jsx40, jsxs as jsxs15 } from "react/jsx-runtime";
6087
6163
  var getClassName23 = get_class_name_factory_default("PuckCanvas", styles_module_default19);
6088
6164
  var ZOOM_ON_CHANGE = true;
6089
6165
  var TRANSITION_DURATION = 150;
@@ -6127,7 +6203,7 @@ var Canvas = () => {
6127
6203
  const [showTransition, setShowTransition] = useState20(false);
6128
6204
  const isResizingRef = useRef10(false);
6129
6205
  const defaultRender = useMemo17(() => {
6130
- const PuckDefault = ({ children }) => /* @__PURE__ */ jsx39(Fragment12, { children });
6206
+ const PuckDefault = ({ children }) => /* @__PURE__ */ jsx40(Fragment12, { children });
6131
6207
  return PuckDefault;
6132
6208
  }, []);
6133
6209
  const CustomPreview = useMemo17(
@@ -6201,7 +6277,7 @@ var Canvas = () => {
6201
6277
  }
6202
6278
  },
6203
6279
  children: [
6204
- viewports.controlsVisible && iframe.enabled && /* @__PURE__ */ jsx39("div", { className: getClassName23("controls"), children: /* @__PURE__ */ jsx39(
6280
+ viewports.controlsVisible && iframe.enabled && /* @__PURE__ */ jsx40("div", { className: getClassName23("controls"), children: /* @__PURE__ */ jsx40(
6205
6281
  ViewportControls,
6206
6282
  {
6207
6283
  autoZoom: zoomConfig.autoZoom,
@@ -6231,7 +6307,7 @@ var Canvas = () => {
6231
6307
  }
6232
6308
  ) }),
6233
6309
  /* @__PURE__ */ jsxs15("div", { className: getClassName23("inner"), ref: frameRef, children: [
6234
- /* @__PURE__ */ jsx39(
6310
+ /* @__PURE__ */ jsx40(
6235
6311
  "div",
6236
6312
  {
6237
6313
  className: getClassName23("root"),
@@ -6248,10 +6324,10 @@ var Canvas = () => {
6248
6324
  setShowTransition(false);
6249
6325
  isResizingRef.current = false;
6250
6326
  },
6251
- children: /* @__PURE__ */ jsx39(CustomPreview, { children: /* @__PURE__ */ jsx39(Preview2, {}) })
6327
+ children: /* @__PURE__ */ jsx40(CustomPreview, { children: /* @__PURE__ */ jsx40(Preview2, {}) })
6252
6328
  }
6253
6329
  ),
6254
- /* @__PURE__ */ jsx39("div", { className: getClassName23("loader"), children: /* @__PURE__ */ jsx39(Loader, { size: 24 }) })
6330
+ /* @__PURE__ */ jsx40("div", { className: getClassName23("loader"), children: /* @__PURE__ */ jsx40(Loader, { size: 24 }) })
6255
6331
  ] })
6256
6332
  ]
6257
6333
  }
@@ -6309,8 +6385,8 @@ var useLoadedOverrides = ({
6309
6385
 
6310
6386
  // components/DefaultOverride/index.tsx
6311
6387
  init_react_import();
6312
- import { Fragment as Fragment13, jsx as jsx40 } from "react/jsx-runtime";
6313
- var DefaultOverride = ({ children }) => /* @__PURE__ */ jsx40(Fragment13, { children });
6388
+ import { Fragment as Fragment13, jsx as jsx41 } from "react/jsx-runtime";
6389
+ var DefaultOverride = ({ children }) => /* @__PURE__ */ jsx41(Fragment13, { children });
6314
6390
 
6315
6391
  // lib/use-inject-css.ts
6316
6392
  init_react_import();
@@ -6423,7 +6499,7 @@ var import_fast_deep_equal = __toESM(require_fast_deep_equal());
6423
6499
 
6424
6500
  // components/Puck/components/Header/index.tsx
6425
6501
  init_react_import();
6426
- import { memo as memo6, useCallback as useCallback18, useMemo as useMemo19, useState as useState22 } from "react";
6502
+ import { memo as memo7, useCallback as useCallback18, useMemo as useMemo19, useState as useState22 } from "react";
6427
6503
 
6428
6504
  // components/MenuBar/index.tsx
6429
6505
  init_react_import();
@@ -6433,7 +6509,7 @@ init_react_import();
6433
6509
  var styles_module_default20 = { "MenuBar": "_MenuBar_8pf8c_1", "MenuBar--menuOpen": "_MenuBar--menuOpen_8pf8c_14", "MenuBar-inner": "_MenuBar-inner_8pf8c_29", "MenuBar-history": "_MenuBar-history_8pf8c_45" };
6434
6510
 
6435
6511
  // components/MenuBar/index.tsx
6436
- import { Fragment as Fragment14, jsx as jsx41, jsxs as jsxs16 } from "react/jsx-runtime";
6512
+ import { Fragment as Fragment14, jsx as jsx42, jsxs as jsxs16 } from "react/jsx-runtime";
6437
6513
  var getClassName24 = get_class_name_factory_default("MenuBar", styles_module_default20);
6438
6514
  function MenuBar({
6439
6515
  menuOpen = false,
@@ -6444,7 +6520,7 @@ function MenuBar({
6444
6520
  const forward = useAppStore((s) => s.history.forward);
6445
6521
  const hasFuture = useAppStore((s) => s.history.hasFuture());
6446
6522
  const hasPast = useAppStore((s) => s.history.hasPast());
6447
- return /* @__PURE__ */ jsx41(
6523
+ return /* @__PURE__ */ jsx42(
6448
6524
  "div",
6449
6525
  {
6450
6526
  className: getClassName24({ menuOpen }),
@@ -6460,28 +6536,28 @@ function MenuBar({
6460
6536
  },
6461
6537
  children: /* @__PURE__ */ jsxs16("div", { className: getClassName24("inner"), children: [
6462
6538
  /* @__PURE__ */ jsxs16("div", { className: getClassName24("history"), children: [
6463
- /* @__PURE__ */ jsx41(
6539
+ /* @__PURE__ */ jsx42(
6464
6540
  IconButton,
6465
6541
  {
6466
6542
  type: "button",
6467
6543
  title: "undo",
6468
6544
  disabled: !hasPast,
6469
6545
  onClick: back,
6470
- children: /* @__PURE__ */ jsx41(Undo2, { size: 21 })
6546
+ children: /* @__PURE__ */ jsx42(Undo2, { size: 21 })
6471
6547
  }
6472
6548
  ),
6473
- /* @__PURE__ */ jsx41(
6549
+ /* @__PURE__ */ jsx42(
6474
6550
  IconButton,
6475
6551
  {
6476
6552
  type: "button",
6477
6553
  title: "redo",
6478
6554
  disabled: !hasFuture,
6479
6555
  onClick: forward,
6480
- children: /* @__PURE__ */ jsx41(Redo2, { size: 21 })
6556
+ children: /* @__PURE__ */ jsx42(Redo2, { size: 21 })
6481
6557
  }
6482
6558
  )
6483
6559
  ] }),
6484
- /* @__PURE__ */ jsx41(Fragment14, { children: renderHeaderActions && renderHeaderActions() })
6560
+ /* @__PURE__ */ jsx42(Fragment14, { children: renderHeaderActions && renderHeaderActions() })
6485
6561
  ] })
6486
6562
  }
6487
6563
  );
@@ -6492,7 +6568,7 @@ init_react_import();
6492
6568
  var styles_module_default21 = { "PuckHeader": "_PuckHeader_15xnq_1", "PuckHeader-inner": "_PuckHeader-inner_15xnq_10", "PuckHeader-toggle": "_PuckHeader-toggle_15xnq_20", "PuckHeader--rightSideBarVisible": "_PuckHeader--rightSideBarVisible_15xnq_27", "PuckHeader-rightSideBarToggle": "_PuckHeader-rightSideBarToggle_15xnq_27", "PuckHeader--leftSideBarVisible": "_PuckHeader--leftSideBarVisible_15xnq_28", "PuckHeader-leftSideBarToggle": "_PuckHeader-leftSideBarToggle_15xnq_28", "PuckHeader-title": "_PuckHeader-title_15xnq_32", "PuckHeader-path": "_PuckHeader-path_15xnq_36", "PuckHeader-tools": "_PuckHeader-tools_15xnq_43", "PuckHeader-menuButton": "_PuckHeader-menuButton_15xnq_49", "PuckHeader--menuOpen": "_PuckHeader--menuOpen_15xnq_54" };
6493
6569
 
6494
6570
  // components/Puck/components/Header/index.tsx
6495
- import { Fragment as Fragment15, jsx as jsx42, jsxs as jsxs17 } from "react/jsx-runtime";
6571
+ import { Fragment as Fragment15, jsx as jsx43, jsxs as jsxs17 } from "react/jsx-runtime";
6496
6572
  var getClassName25 = get_class_name_factory_default("PuckHeader", styles_module_default21);
6497
6573
  var HeaderInner = () => {
6498
6574
  const {
@@ -6514,7 +6590,7 @@ var HeaderInner = () => {
6514
6590
  var _b = _a, { actions } = _b, props = __objRest(_b, ["actions"]);
6515
6591
  const Comp = renderHeader;
6516
6592
  const appState = useAppStore((s) => s.state);
6517
- return /* @__PURE__ */ jsx42(Comp, __spreadProps(__spreadValues({}, props), { dispatch, state: appState, children: actions }));
6593
+ return /* @__PURE__ */ jsx43(Comp, __spreadProps(__spreadValues({}, props), { dispatch, state: appState, children: actions }));
6518
6594
  };
6519
6595
  return RenderHeader;
6520
6596
  }
@@ -6528,7 +6604,7 @@ var HeaderInner = () => {
6528
6604
  const RenderHeader = (props) => {
6529
6605
  const Comp = renderHeaderActions;
6530
6606
  const appState = useAppStore((s) => s.state);
6531
- return /* @__PURE__ */ jsx42(Comp, __spreadProps(__spreadValues({}, props), { dispatch, state: appState }));
6607
+ return /* @__PURE__ */ jsx43(Comp, __spreadProps(__spreadValues({}, props), { dispatch, state: appState }));
6532
6608
  };
6533
6609
  return RenderHeader;
6534
6610
  }
@@ -6564,27 +6640,27 @@ var HeaderInner = () => {
6564
6640
  },
6565
6641
  [dispatch, leftSideBarVisible, rightSideBarVisible]
6566
6642
  );
6567
- return /* @__PURE__ */ jsx42(
6643
+ return /* @__PURE__ */ jsx43(
6568
6644
  CustomHeader,
6569
6645
  {
6570
- actions: /* @__PURE__ */ jsx42(Fragment15, { children: /* @__PURE__ */ jsx42(CustomHeaderActions, { children: /* @__PURE__ */ jsx42(
6646
+ actions: /* @__PURE__ */ jsx43(Fragment15, { children: /* @__PURE__ */ jsx43(CustomHeaderActions, { children: /* @__PURE__ */ jsx43(
6571
6647
  Button,
6572
6648
  {
6573
6649
  onClick: () => {
6574
6650
  const data = appStore.getState().state.data;
6575
6651
  onPublish && onPublish(data);
6576
6652
  },
6577
- icon: /* @__PURE__ */ jsx42(Globe, { size: "14px" }),
6653
+ icon: /* @__PURE__ */ jsx43(Globe, { size: "14px" }),
6578
6654
  children: "Publish"
6579
6655
  }
6580
6656
  ) }) }),
6581
- children: /* @__PURE__ */ jsx42(
6657
+ children: /* @__PURE__ */ jsx43(
6582
6658
  "header",
6583
6659
  {
6584
6660
  className: getClassName25({ leftSideBarVisible, rightSideBarVisible }),
6585
6661
  children: /* @__PURE__ */ jsxs17("div", { className: getClassName25("inner"), children: [
6586
6662
  /* @__PURE__ */ jsxs17("div", { className: getClassName25("toggle"), children: [
6587
- /* @__PURE__ */ jsx42("div", { className: getClassName25("leftSideBarToggle"), children: /* @__PURE__ */ jsx42(
6663
+ /* @__PURE__ */ jsx43("div", { className: getClassName25("leftSideBarToggle"), children: /* @__PURE__ */ jsx43(
6588
6664
  IconButton,
6589
6665
  {
6590
6666
  type: "button",
@@ -6592,10 +6668,10 @@ var HeaderInner = () => {
6592
6668
  toggleSidebars("left");
6593
6669
  },
6594
6670
  title: "Toggle left sidebar",
6595
- children: /* @__PURE__ */ jsx42(PanelLeft, { focusable: "false" })
6671
+ children: /* @__PURE__ */ jsx43(PanelLeft, { focusable: "false" })
6596
6672
  }
6597
6673
  ) }),
6598
- /* @__PURE__ */ jsx42("div", { className: getClassName25("rightSideBarToggle"), children: /* @__PURE__ */ jsx42(
6674
+ /* @__PURE__ */ jsx43("div", { className: getClassName25("rightSideBarToggle"), children: /* @__PURE__ */ jsx43(
6599
6675
  IconButton,
6600
6676
  {
6601
6677
  type: "button",
@@ -6603,19 +6679,19 @@ var HeaderInner = () => {
6603
6679
  toggleSidebars("right");
6604
6680
  },
6605
6681
  title: "Toggle right sidebar",
6606
- children: /* @__PURE__ */ jsx42(PanelRight, { focusable: "false" })
6682
+ children: /* @__PURE__ */ jsx43(PanelRight, { focusable: "false" })
6607
6683
  }
6608
6684
  ) })
6609
6685
  ] }),
6610
- /* @__PURE__ */ jsx42("div", { className: getClassName25("title"), children: /* @__PURE__ */ jsxs17(Heading, { rank: "2", size: "xs", children: [
6686
+ /* @__PURE__ */ jsx43("div", { className: getClassName25("title"), children: /* @__PURE__ */ jsxs17(Heading, { rank: "2", size: "xs", children: [
6611
6687
  headerTitle || rootTitle || "Page",
6612
6688
  headerPath && /* @__PURE__ */ jsxs17(Fragment15, { children: [
6613
6689
  " ",
6614
- /* @__PURE__ */ jsx42("code", { className: getClassName25("path"), children: headerPath })
6690
+ /* @__PURE__ */ jsx43("code", { className: getClassName25("path"), children: headerPath })
6615
6691
  ] })
6616
6692
  ] }) }),
6617
6693
  /* @__PURE__ */ jsxs17("div", { className: getClassName25("tools"), children: [
6618
- /* @__PURE__ */ jsx42("div", { className: getClassName25("menuButton"), children: /* @__PURE__ */ jsx42(
6694
+ /* @__PURE__ */ jsx43("div", { className: getClassName25("menuButton"), children: /* @__PURE__ */ jsx43(
6619
6695
  IconButton,
6620
6696
  {
6621
6697
  type: "button",
@@ -6623,23 +6699,23 @@ var HeaderInner = () => {
6623
6699
  return setMenuOpen(!menuOpen);
6624
6700
  },
6625
6701
  title: "Toggle menu bar",
6626
- children: menuOpen ? /* @__PURE__ */ jsx42(ChevronUp, { focusable: "false" }) : /* @__PURE__ */ jsx42(ChevronDown, { focusable: "false" })
6702
+ children: menuOpen ? /* @__PURE__ */ jsx43(ChevronUp, { focusable: "false" }) : /* @__PURE__ */ jsx43(ChevronDown, { focusable: "false" })
6627
6703
  }
6628
6704
  ) }),
6629
- /* @__PURE__ */ jsx42(
6705
+ /* @__PURE__ */ jsx43(
6630
6706
  MenuBar,
6631
6707
  {
6632
6708
  dispatch,
6633
6709
  onPublish,
6634
6710
  menuOpen,
6635
- renderHeaderActions: () => /* @__PURE__ */ jsx42(CustomHeaderActions, { children: /* @__PURE__ */ jsx42(
6711
+ renderHeaderActions: () => /* @__PURE__ */ jsx43(CustomHeaderActions, { children: /* @__PURE__ */ jsx43(
6636
6712
  Button,
6637
6713
  {
6638
6714
  onClick: () => {
6639
6715
  const data = appStore.getState().state.data;
6640
6716
  onPublish && onPublish(data);
6641
6717
  },
6642
- icon: /* @__PURE__ */ jsx42(Globe, { size: "14px" }),
6718
+ icon: /* @__PURE__ */ jsx43(Globe, { size: "14px" }),
6643
6719
  children: "Publish"
6644
6720
  }
6645
6721
  ) }),
@@ -6653,7 +6729,7 @@ var HeaderInner = () => {
6653
6729
  }
6654
6730
  );
6655
6731
  };
6656
- var Header = memo6(HeaderInner);
6732
+ var Header = memo7(HeaderInner);
6657
6733
 
6658
6734
  // components/Puck/components/Sidebar/index.tsx
6659
6735
  init_react_import();
@@ -6667,7 +6743,7 @@ init_react_import();
6667
6743
  var styles_module_default22 = { "ResizeHandle": "_ResizeHandle_144bf_2", "ResizeHandle--left": "_ResizeHandle--left_144bf_16", "ResizeHandle--right": "_ResizeHandle--right_144bf_20" };
6668
6744
 
6669
6745
  // components/Puck/components/ResizeHandle/index.tsx
6670
- import { jsx as jsx43 } from "react/jsx-runtime";
6746
+ import { jsx as jsx44 } from "react/jsx-runtime";
6671
6747
  var getClassName26 = get_class_name_factory_default("ResizeHandle", styles_module_default22);
6672
6748
  var ResizeHandle = ({
6673
6749
  position,
@@ -6726,7 +6802,7 @@ var ResizeHandle = ({
6726
6802
  },
6727
6803
  [position, handleMouseMove, handleMouseUp]
6728
6804
  );
6729
- return /* @__PURE__ */ jsx43(
6805
+ return /* @__PURE__ */ jsx44(
6730
6806
  "div",
6731
6807
  {
6732
6808
  ref: handleRef,
@@ -6741,7 +6817,7 @@ init_react_import();
6741
6817
  var styles_module_default23 = { "Sidebar": "_Sidebar_1xksb_1", "Sidebar--left": "_Sidebar--left_1xksb_8", "Sidebar--right": "_Sidebar--right_1xksb_14", "Sidebar-resizeHandle": "_Sidebar-resizeHandle_1xksb_20" };
6742
6818
 
6743
6819
  // components/Puck/components/Sidebar/index.tsx
6744
- import { Fragment as Fragment16, jsx as jsx44, jsxs as jsxs18 } from "react/jsx-runtime";
6820
+ import { Fragment as Fragment16, jsx as jsx45, jsxs as jsxs18 } from "react/jsx-runtime";
6745
6821
  var getClassName27 = get_class_name_factory_default("Sidebar", styles_module_default23);
6746
6822
  var Sidebar = ({
6747
6823
  position,
@@ -6753,8 +6829,8 @@ var Sidebar = ({
6753
6829
  }) => {
6754
6830
  if (!isVisible) return null;
6755
6831
  return /* @__PURE__ */ jsxs18(Fragment16, { children: [
6756
- /* @__PURE__ */ jsx44("div", { ref: sidebarRef, className: getClassName27({ [position]: true }), children }),
6757
- /* @__PURE__ */ jsx44("div", { className: `${getClassName27("resizeHandle")}`, children: /* @__PURE__ */ jsx44(
6832
+ /* @__PURE__ */ jsx45("div", { ref: sidebarRef, className: getClassName27({ [position]: true }), children }),
6833
+ /* @__PURE__ */ jsx45("div", { className: `${getClassName27("resizeHandle")}`, children: /* @__PURE__ */ jsx45(
6758
6834
  ResizeHandle,
6759
6835
  {
6760
6836
  position,
@@ -6848,7 +6924,7 @@ function useSidebarResize(position, dispatch) {
6848
6924
  }
6849
6925
 
6850
6926
  // components/Puck/index.tsx
6851
- import { jsx as jsx45, jsxs as jsxs19 } from "react/jsx-runtime";
6927
+ import { jsx as jsx46, jsxs as jsxs19 } from "react/jsx-runtime";
6852
6928
  var getClassName28 = get_class_name_factory_default("Puck", styles_module_default13);
6853
6929
  var getLayoutClassName = get_class_name_factory_default("PuckLayout", styles_module_default13);
6854
6930
  var FieldSideBar = () => {
@@ -6858,11 +6934,11 @@ var FieldSideBar = () => {
6858
6934
  return s.selectedItem ? (_b = (_a = s.config.components[s.selectedItem.type]) == null ? void 0 : _a["label"]) != null ? _b : s.selectedItem.type.toString() : "Page";
6859
6935
  }
6860
6936
  );
6861
- return /* @__PURE__ */ jsx45(SidebarSection, { noPadding: true, noBorderTop: true, showBreadcrumbs: true, title, children: /* @__PURE__ */ jsx45(Fields, {}) });
6937
+ return /* @__PURE__ */ jsx46(SidebarSection, { noPadding: true, noBorderTop: true, showBreadcrumbs: true, title, children: /* @__PURE__ */ jsx46(Fields, {}) });
6862
6938
  };
6863
6939
  var propsContext = createContext7({});
6864
6940
  function PropsProvider(props) {
6865
- return /* @__PURE__ */ jsx45(propsContext.Provider, { value: props, children: props.children });
6941
+ return /* @__PURE__ */ jsx46(propsContext.Provider, { value: props, children: props.children });
6866
6942
  }
6867
6943
  var usePropsContext = () => useContext12(propsContext);
6868
6944
  function PuckProvider({ children }) {
@@ -7047,7 +7123,7 @@ function PuckProvider({ children }) {
7047
7123
  const { resolveAndCommitData } = appStore.getState();
7048
7124
  resolveAndCommitData();
7049
7125
  }, []);
7050
- return /* @__PURE__ */ jsx45(appStoreContext.Provider, { value: appStore, children: /* @__PURE__ */ jsx45(UsePuckStoreContext.Provider, { value: uPuckStore, children }) });
7126
+ return /* @__PURE__ */ jsx46(appStoreContext.Provider, { value: appStore, children: /* @__PURE__ */ jsx46(UsePuckStoreContext.Provider, { value: uPuckStore, children }) });
7051
7127
  }
7052
7128
  function PuckLayout({ children }) {
7053
7129
  const {
@@ -7132,7 +7208,7 @@ function PuckLayout({ children }) {
7132
7208
  layoutOptions["--puck-user-right-side-bar-width"] = `${rightWidth}px`;
7133
7209
  }
7134
7210
  return /* @__PURE__ */ jsxs19("div", { className: `Puck ${getClassName28()}`, children: [
7135
- /* @__PURE__ */ jsx45(DragDropContext, { disableAutoScroll: dnd == null ? void 0 : dnd.disableAutoScroll, children: /* @__PURE__ */ jsx45(CustomPuck, { children: children || /* @__PURE__ */ jsx45(FrameProvider, { children: /* @__PURE__ */ jsx45(
7211
+ /* @__PURE__ */ jsx46(DragDropContext, { disableAutoScroll: dnd == null ? void 0 : dnd.disableAutoScroll, children: /* @__PURE__ */ jsx46(CustomPuck, { children: children || /* @__PURE__ */ jsx46(FrameProvider, { children: /* @__PURE__ */ jsx46(
7136
7212
  "div",
7137
7213
  {
7138
7214
  className: getLayoutClassName({
@@ -7146,7 +7222,7 @@ function PuckLayout({ children }) {
7146
7222
  className: getLayoutClassName("inner"),
7147
7223
  style: layoutOptions,
7148
7224
  children: [
7149
- /* @__PURE__ */ jsx45(Header, {}),
7225
+ /* @__PURE__ */ jsx46(Header, {}),
7150
7226
  /* @__PURE__ */ jsxs19(
7151
7227
  Sidebar,
7152
7228
  {
@@ -7156,13 +7232,13 @@ function PuckLayout({ children }) {
7156
7232
  onResize: setLeftWidth,
7157
7233
  onResizeEnd: handleLeftSidebarResizeEnd,
7158
7234
  children: [
7159
- /* @__PURE__ */ jsx45(SidebarSection, { title: "Components", noBorderTop: true, children: /* @__PURE__ */ jsx45(Components, {}) }),
7160
- /* @__PURE__ */ jsx45(SidebarSection, { title: "Outline", children: /* @__PURE__ */ jsx45(Outline, {}) })
7235
+ /* @__PURE__ */ jsx46(SidebarSection, { title: "Components", noBorderTop: true, children: /* @__PURE__ */ jsx46(Components, {}) }),
7236
+ /* @__PURE__ */ jsx46(SidebarSection, { title: "Outline", children: /* @__PURE__ */ jsx46(Outline, {}) })
7161
7237
  ]
7162
7238
  }
7163
7239
  ),
7164
- /* @__PURE__ */ jsx45(Canvas, {}),
7165
- /* @__PURE__ */ jsx45(
7240
+ /* @__PURE__ */ jsx46(Canvas, {}),
7241
+ /* @__PURE__ */ jsx46(
7166
7242
  Sidebar,
7167
7243
  {
7168
7244
  position: "right",
@@ -7170,7 +7246,7 @@ function PuckLayout({ children }) {
7170
7246
  isVisible: rightSideBarVisible,
7171
7247
  onResize: setRightWidth,
7172
7248
  onResizeEnd: handleRightSidebarResizeEnd,
7173
- children: /* @__PURE__ */ jsx45(FieldSideBar, {})
7249
+ children: /* @__PURE__ */ jsx46(FieldSideBar, {})
7174
7250
  }
7175
7251
  )
7176
7252
  ]
@@ -7178,11 +7254,11 @@ function PuckLayout({ children }) {
7178
7254
  )
7179
7255
  }
7180
7256
  ) }) }) }),
7181
- /* @__PURE__ */ jsx45("div", { id: "puck-portal-root", className: getClassName28("portal") })
7257
+ /* @__PURE__ */ jsx46("div", { id: "puck-portal-root", className: getClassName28("portal") })
7182
7258
  ] });
7183
7259
  }
7184
7260
  function Puck(props) {
7185
- return /* @__PURE__ */ jsx45(PropsProvider, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx45(PuckProvider, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx45(PuckLayout, __spreadValues({}, props)) })) }));
7261
+ return /* @__PURE__ */ jsx46(PropsProvider, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx46(PuckProvider, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx46(PuckLayout, __spreadValues({}, props)) })) }));
7186
7262
  }
7187
7263
  Puck.Components = Components;
7188
7264
  Puck.Fields = Fields;