@measured/puck 0.18.0-canary.874ba1b → 0.18.0-canary.99e9ecb

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.
package/dist/index.mjs CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  resolveRootData,
17
17
  rootDroppableId,
18
18
  setupZone
19
- } from "./chunk-EXKSBUY5.mjs";
19
+ } from "./chunk-CHWFBYEM.mjs";
20
20
 
21
21
  // ../../node_modules/classnames/index.js
22
22
  var require_classnames = __commonJS({
@@ -210,8 +210,9 @@ var styles_module_default2 = { "InputWrapper": "_InputWrapper_1l5m8_1", "Input":
210
210
  // components/AutoField/index.tsx
211
211
  import {
212
212
  useCallback as useCallback5,
213
+ useContext as useContext3,
213
214
  useEffect as useEffect9,
214
- useMemo as useMemo4,
215
+ useMemo as useMemo5,
215
216
  useState as useState11
216
217
  } from "react";
217
218
 
@@ -1165,8 +1166,53 @@ var Sortable = ({
1165
1166
  return children({ status, ref: sortableRef });
1166
1167
  };
1167
1168
 
1169
+ // components/AutoField/context.tsx
1170
+ init_react_import();
1171
+ import { createContext as createContext2, useContext as useContext2, useMemo } from "react";
1172
+ import { jsx as jsx7 } from "react/jsx-runtime";
1173
+ var NestedFieldContext = createContext2({});
1174
+ var useNestedFieldContext = () => {
1175
+ const context = useContext2(NestedFieldContext);
1176
+ return __spreadProps(__spreadValues({}, context), {
1177
+ readOnlyFields: context.readOnlyFields || {}
1178
+ });
1179
+ };
1180
+ var NestedFieldProvider = ({
1181
+ children,
1182
+ name,
1183
+ subName,
1184
+ wildcardName = name,
1185
+ readOnlyFields
1186
+ }) => {
1187
+ const subPath = `${name}.${subName}`;
1188
+ const wildcardSubPath = `${wildcardName}.${subName}`;
1189
+ const subReadOnlyFields = useMemo(
1190
+ () => Object.keys(readOnlyFields).reduce((acc, readOnlyKey) => {
1191
+ const isLocal = readOnlyKey.indexOf(subPath) > -1 || readOnlyKey.indexOf(wildcardSubPath) > -1;
1192
+ if (isLocal) {
1193
+ const subPathPattern = new RegExp(
1194
+ `^(${name}|${wildcardName}).`.replace(/\[/g, "\\[").replace(/\]/g, "\\]").replace(/\./g, "\\.").replace(/\*/g, "\\*")
1195
+ );
1196
+ const localName = readOnlyKey.replace(subPathPattern, "");
1197
+ return __spreadProps(__spreadValues({}, acc), {
1198
+ [localName]: readOnlyFields[readOnlyKey]
1199
+ });
1200
+ }
1201
+ return acc;
1202
+ }, {}),
1203
+ [name, subName, wildcardName, readOnlyFields]
1204
+ );
1205
+ return /* @__PURE__ */ jsx7(
1206
+ NestedFieldContext.Provider,
1207
+ {
1208
+ value: { readOnlyFields: subReadOnlyFields, localName: subName },
1209
+ children
1210
+ }
1211
+ );
1212
+ };
1213
+
1168
1214
  // components/AutoField/fields/ArrayField/index.tsx
1169
- import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
1215
+ import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
1170
1216
  var getClassName5 = get_class_name_factory_default("ArrayField", styles_module_default3);
1171
1217
  var getClassNameItem = get_class_name_factory_default("ArrayFieldItem", styles_module_default3);
1172
1218
  var ArrayField = ({
@@ -1177,10 +1223,10 @@ var ArrayField = ({
1177
1223
  label,
1178
1224
  readOnly,
1179
1225
  id,
1180
- Label: Label2 = (props) => /* @__PURE__ */ jsx7("div", __spreadValues({}, props))
1226
+ Label: Label2 = (props) => /* @__PURE__ */ jsx8("div", __spreadValues({}, props))
1181
1227
  }) => {
1182
1228
  const { state, setUi, selectedItem, getPermissions } = useAppContext();
1183
- const readOnlyFields = (selectedItem == null ? void 0 : selectedItem.readOnly) || {};
1229
+ const { readOnlyFields, localName = name } = useNestedFieldContext();
1184
1230
  const value = _value;
1185
1231
  const arrayState = state.ui.arrayState[id] || {
1186
1232
  items: Array.from(value || []).map((item, idx) => {
@@ -1240,14 +1286,14 @@ var ArrayField = ({
1240
1286
  return null;
1241
1287
  }
1242
1288
  const addDisabled = field.max !== void 0 && localState.arrayState.items.length >= field.max || readOnly;
1243
- return /* @__PURE__ */ jsx7(
1289
+ return /* @__PURE__ */ jsx8(
1244
1290
  Label2,
1245
1291
  {
1246
1292
  label: label || name,
1247
- icon: /* @__PURE__ */ jsx7(List, { size: 16 }),
1293
+ icon: /* @__PURE__ */ jsx8(List, { size: 16 }),
1248
1294
  el: "div",
1249
1295
  readOnly,
1250
- children: /* @__PURE__ */ jsx7(
1296
+ children: /* @__PURE__ */ jsx8(
1251
1297
  SortableProvider,
1252
1298
  {
1253
1299
  onMove: (move) => {
@@ -1283,7 +1329,7 @@ var ArrayField = ({
1283
1329
  localState.arrayState.items.map((item, i) => {
1284
1330
  const { _arrayId = `${id}-${i}`, _originalIndex = i } = item;
1285
1331
  const data = Array.from(localState.value || [])[i] || {};
1286
- return /* @__PURE__ */ jsx7(
1332
+ return /* @__PURE__ */ jsx8(
1287
1333
  Sortable,
1288
1334
  {
1289
1335
  id: _arrayId,
@@ -1324,7 +1370,7 @@ var ArrayField = ({
1324
1370
  field.getItemSummary ? field.getItemSummary(data, i) : `Item #${_originalIndex}`,
1325
1371
  /* @__PURE__ */ jsxs3("div", { className: getClassNameItem("rhs"), children: [
1326
1372
  !readOnly && /* @__PURE__ */ jsxs3("div", { className: getClassNameItem("actions"), children: [
1327
- /* @__PURE__ */ jsx7("div", { className: getClassNameItem("action"), children: /* @__PURE__ */ jsx7(
1373
+ /* @__PURE__ */ jsx8("div", { className: getClassNameItem("action"), children: /* @__PURE__ */ jsx8(
1328
1374
  IconButton,
1329
1375
  {
1330
1376
  type: "button",
@@ -1341,10 +1387,10 @@ var ArrayField = ({
1341
1387
  );
1342
1388
  },
1343
1389
  title: "Duplicate",
1344
- children: /* @__PURE__ */ jsx7(Copy, { size: 16 })
1390
+ children: /* @__PURE__ */ jsx8(Copy, { size: 16 })
1345
1391
  }
1346
1392
  ) }),
1347
- /* @__PURE__ */ jsx7("div", { className: getClassNameItem("action"), children: /* @__PURE__ */ jsx7(
1393
+ /* @__PURE__ */ jsx8("div", { className: getClassNameItem("action"), children: /* @__PURE__ */ jsx8(
1348
1394
  IconButton,
1349
1395
  {
1350
1396
  type: "button",
@@ -1365,43 +1411,56 @@ var ArrayField = ({
1365
1411
  );
1366
1412
  },
1367
1413
  title: "Delete",
1368
- children: /* @__PURE__ */ jsx7(Trash, { size: 16 })
1414
+ children: /* @__PURE__ */ jsx8(Trash, { size: 16 })
1369
1415
  }
1370
1416
  ) })
1371
1417
  ] }),
1372
- /* @__PURE__ */ jsx7("div", { children: /* @__PURE__ */ jsx7(DragIcon, {}) })
1418
+ /* @__PURE__ */ jsx8("div", { children: /* @__PURE__ */ jsx8(DragIcon, {}) })
1373
1419
  ] })
1374
1420
  ]
1375
1421
  }
1376
1422
  ),
1377
- /* @__PURE__ */ jsx7("div", { className: getClassNameItem("body"), children: /* @__PURE__ */ jsx7("fieldset", { className: getClassNameItem("fieldset"), children: Object.keys(field.arrayFields).map((fieldName) => {
1378
- const subField = field.arrayFields[fieldName];
1379
- const subFieldName = `${name}[${i}].${fieldName}`;
1380
- const wildcardFieldName = `${name}[*].${fieldName}`;
1381
- const subReadOnly = forceReadOnly ? forceReadOnly : typeof readOnlyFields[subFieldName] !== "undefined" ? readOnlyFields[subFieldName] : readOnlyFields[wildcardFieldName];
1382
- const label2 = subField.label || fieldName;
1383
- return /* @__PURE__ */ jsx7(
1384
- AutoFieldPrivate,
1423
+ /* @__PURE__ */ jsx8("div", { className: getClassNameItem("body"), children: /* @__PURE__ */ jsx8("fieldset", { className: getClassNameItem("fieldset"), children: Object.keys(field.arrayFields).map((subName) => {
1424
+ const subField = field.arrayFields[subName];
1425
+ const indexName = `${name}[${i}]`;
1426
+ const subPath = `${indexName}.${subName}`;
1427
+ const localIndexName = `${localName}[${i}]`;
1428
+ const localWildcardName = `${localName}[*]`;
1429
+ const localSubPath = `${localIndexName}.${subName}`;
1430
+ const localWildcardSubPath = `${localWildcardName}.${subName}`;
1431
+ const subReadOnly = forceReadOnly ? forceReadOnly : typeof readOnlyFields[subPath] !== "undefined" ? readOnlyFields[localSubPath] : readOnlyFields[localWildcardSubPath];
1432
+ const label2 = subField.label || subName;
1433
+ return /* @__PURE__ */ jsx8(
1434
+ NestedFieldProvider,
1385
1435
  {
1386
- name: subFieldName,
1387
- label: label2,
1388
- id: `${_arrayId}_${fieldName}`,
1389
- readOnly: subReadOnly,
1390
- field: __spreadProps(__spreadValues({}, subField), {
1391
- label: label2
1392
- // May be used by custom fields
1393
- }),
1394
- value: data[fieldName],
1395
- onChange: (val, ui) => {
1396
- onChange(
1397
- replace(value, i, __spreadProps(__spreadValues({}, data), {
1398
- [fieldName]: val
1399
- })),
1400
- ui
1401
- );
1402
- }
1436
+ name: localIndexName,
1437
+ wildcardName: localWildcardName,
1438
+ subName,
1439
+ readOnlyFields,
1440
+ children: /* @__PURE__ */ jsx8(
1441
+ AutoFieldPrivate,
1442
+ {
1443
+ name: subPath,
1444
+ label: label2,
1445
+ id: `${_arrayId}_${subName}`,
1446
+ readOnly: subReadOnly,
1447
+ field: __spreadProps(__spreadValues({}, subField), {
1448
+ label: label2
1449
+ // May be used by custom fields
1450
+ }),
1451
+ value: data[subName],
1452
+ onChange: (val, ui) => {
1453
+ onChange(
1454
+ replace(value, i, __spreadProps(__spreadValues({}, data), {
1455
+ [subName]: val
1456
+ })),
1457
+ ui
1458
+ );
1459
+ }
1460
+ }
1461
+ )
1403
1462
  },
1404
- subFieldName
1463
+ subPath
1405
1464
  );
1406
1465
  }) }) })
1407
1466
  ]
@@ -1411,7 +1470,7 @@ var ArrayField = ({
1411
1470
  _arrayId
1412
1471
  );
1413
1472
  }),
1414
- !addDisabled && /* @__PURE__ */ jsx7(
1473
+ !addDisabled && /* @__PURE__ */ jsx8(
1415
1474
  "button",
1416
1475
  {
1417
1476
  type: "button",
@@ -1425,7 +1484,7 @@ var ArrayField = ({
1425
1484
  const newArrayState = regenerateArrayState(newValue);
1426
1485
  onChange(newValue, mapArrayStateToUi(newArrayState));
1427
1486
  },
1428
- children: /* @__PURE__ */ jsx7(Plus, { size: 21 })
1487
+ children: /* @__PURE__ */ jsx8(Plus, { size: 21 })
1429
1488
  }
1430
1489
  )
1431
1490
  ]
@@ -1439,7 +1498,7 @@ var ArrayField = ({
1439
1498
 
1440
1499
  // components/AutoField/fields/DefaultField/index.tsx
1441
1500
  init_react_import();
1442
- import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
1501
+ import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
1443
1502
  var getClassName6 = get_class_name_factory_default("Input", styles_module_default2);
1444
1503
  var DefaultField = ({
1445
1504
  field,
@@ -1451,16 +1510,16 @@ var DefaultField = ({
1451
1510
  Label: Label2,
1452
1511
  id
1453
1512
  }) => {
1454
- return /* @__PURE__ */ jsx8(
1513
+ return /* @__PURE__ */ jsx9(
1455
1514
  Label2,
1456
1515
  {
1457
1516
  label: label || name,
1458
1517
  icon: /* @__PURE__ */ jsxs4(Fragment2, { children: [
1459
- field.type === "text" && /* @__PURE__ */ jsx8(Type, { size: 16 }),
1460
- field.type === "number" && /* @__PURE__ */ jsx8(Hash, { size: 16 })
1518
+ field.type === "text" && /* @__PURE__ */ jsx9(Type, { size: 16 }),
1519
+ field.type === "number" && /* @__PURE__ */ jsx9(Hash, { size: 16 })
1461
1520
  ] }),
1462
1521
  readOnly,
1463
- children: /* @__PURE__ */ jsx8(
1522
+ children: /* @__PURE__ */ jsx9(
1464
1523
  "input",
1465
1524
  {
1466
1525
  className: getClassName6("input"),
@@ -1471,7 +1530,14 @@ var DefaultField = ({
1471
1530
  value: typeof value === "undefined" ? "" : value.toString(),
1472
1531
  onChange: (e) => {
1473
1532
  if (field.type === "number") {
1474
- onChange(Number(e.currentTarget.value));
1533
+ const numberValue = Number(e.currentTarget.value);
1534
+ if (typeof field.min !== "undefined" && numberValue < field.min) {
1535
+ return;
1536
+ }
1537
+ if (typeof field.max !== "undefined" && numberValue > field.max) {
1538
+ return;
1539
+ }
1540
+ onChange(numberValue);
1475
1541
  } else {
1476
1542
  onChange(e.currentTarget.value);
1477
1543
  }
@@ -1494,7 +1560,7 @@ import { useEffect as useEffect8 } from "react";
1494
1560
  // components/ExternalInput/index.tsx
1495
1561
  init_react_import();
1496
1562
  import {
1497
- useMemo,
1563
+ useMemo as useMemo2,
1498
1564
  useEffect as useEffect7,
1499
1565
  useState as useState9,
1500
1566
  useCallback as useCallback4,
@@ -1515,7 +1581,7 @@ var styles_module_default7 = { "Modal": "_Modal_ikbaj_1", "Modal--isOpen": "_Mod
1515
1581
 
1516
1582
  // components/Modal/index.tsx
1517
1583
  import { createPortal } from "react-dom";
1518
- import { jsx as jsx9 } from "react/jsx-runtime";
1584
+ import { jsx as jsx10 } from "react/jsx-runtime";
1519
1585
  var getClassName7 = get_class_name_factory_default("Modal", styles_module_default7);
1520
1586
  var Modal = ({
1521
1587
  children,
@@ -1527,10 +1593,10 @@ var Modal = ({
1527
1593
  setRootEl(document.getElementById("puck-portal-root"));
1528
1594
  }, []);
1529
1595
  if (!rootEl) {
1530
- return /* @__PURE__ */ jsx9("div", {});
1596
+ return /* @__PURE__ */ jsx10("div", {});
1531
1597
  }
1532
1598
  return createPortal(
1533
- /* @__PURE__ */ jsx9("div", { className: getClassName7({ isOpen }), onClick: onClose, children: /* @__PURE__ */ jsx9(
1599
+ /* @__PURE__ */ jsx10("div", { className: getClassName7({ isOpen }), onClick: onClose, children: /* @__PURE__ */ jsx10(
1534
1600
  "div",
1535
1601
  {
1536
1602
  className: getClassName7("inner"),
@@ -1550,11 +1616,11 @@ init_react_import();
1550
1616
  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" };
1551
1617
 
1552
1618
  // components/Heading/index.tsx
1553
- import { jsx as jsx10 } from "react/jsx-runtime";
1619
+ import { jsx as jsx11 } from "react/jsx-runtime";
1554
1620
  var getClassName8 = get_class_name_factory_default("Heading", styles_module_default8);
1555
1621
  var Heading = ({ children, rank, size = "m" }) => {
1556
1622
  const Tag = rank ? `h${rank}` : "span";
1557
- return /* @__PURE__ */ jsx10(
1623
+ return /* @__PURE__ */ jsx11(
1558
1624
  Tag,
1559
1625
  {
1560
1626
  className: getClassName8({
@@ -1590,7 +1656,7 @@ var filterDataAttrs = (props) => {
1590
1656
  };
1591
1657
 
1592
1658
  // components/Button/Button.tsx
1593
- import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
1659
+ import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
1594
1660
  var getClassName9 = get_class_name_factory_default("Button", Button_module_default);
1595
1661
  var Button = (_a) => {
1596
1662
  var _b = _a, {
@@ -1649,9 +1715,9 @@ var Button = (_a) => {
1649
1715
  href
1650
1716
  }, dataAttrs), {
1651
1717
  children: [
1652
- icon && /* @__PURE__ */ jsx11("div", { className: getClassName9("icon"), children: icon }),
1718
+ icon && /* @__PURE__ */ jsx12("div", { className: getClassName9("icon"), children: icon }),
1653
1719
  children,
1654
- loading && /* @__PURE__ */ jsx11("div", { className: getClassName9("spinner"), children: /* @__PURE__ */ jsx11(Loader, { size: 14 }) })
1720
+ loading && /* @__PURE__ */ jsx12("div", { className: getClassName9("spinner"), children: /* @__PURE__ */ jsx12(Loader, { size: 14 }) })
1655
1721
  ]
1656
1722
  })
1657
1723
  );
@@ -1659,7 +1725,7 @@ var Button = (_a) => {
1659
1725
  };
1660
1726
 
1661
1727
  // components/ExternalInput/index.tsx
1662
- import { Fragment as Fragment3, jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
1728
+ import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
1663
1729
  var getClassName10 = get_class_name_factory_default("ExternalInput", styles_module_default6);
1664
1730
  var getClassNameModal = get_class_name_factory_default("ExternalInputModal", styles_module_default6);
1665
1731
  var dataCache = {};
@@ -1682,10 +1748,10 @@ var ExternalInput = ({
1682
1748
  const hasFilterFields = !!filterFields;
1683
1749
  const [filters, setFilters] = useState9(field.initialFilters || {});
1684
1750
  const [filtersToggled, setFiltersToggled] = useState9(hasFilterFields);
1685
- const mappedData = useMemo(() => {
1751
+ const mappedData = useMemo2(() => {
1686
1752
  return data.map(mapRow);
1687
1753
  }, [data]);
1688
- const keys = useMemo(() => {
1754
+ const keys = useMemo2(() => {
1689
1755
  const validKeys = /* @__PURE__ */ new Set();
1690
1756
  for (const item of mappedData) {
1691
1757
  for (const key of Object.keys(item)) {
@@ -1732,7 +1798,7 @@ var ExternalInput = ({
1732
1798
  id,
1733
1799
  children: [
1734
1800
  /* @__PURE__ */ jsxs6("div", { className: getClassName10("actions"), children: [
1735
- /* @__PURE__ */ jsx12(
1801
+ /* @__PURE__ */ jsx13(
1736
1802
  "button",
1737
1803
  {
1738
1804
  type: "button",
@@ -1740,12 +1806,12 @@ var ExternalInput = ({
1740
1806
  className: getClassName10("button"),
1741
1807
  disabled: readOnly,
1742
1808
  children: value ? field.getItemSummary ? field.getItemSummary(value) : "External item" : /* @__PURE__ */ jsxs6(Fragment3, { children: [
1743
- /* @__PURE__ */ jsx12(Link, { size: "16" }),
1744
- /* @__PURE__ */ jsx12("span", { children: field.placeholder })
1809
+ /* @__PURE__ */ jsx13(Link, { size: "16" }),
1810
+ /* @__PURE__ */ jsx13("span", { children: field.placeholder })
1745
1811
  ] })
1746
1812
  }
1747
1813
  ),
1748
- value && /* @__PURE__ */ jsx12(
1814
+ value && /* @__PURE__ */ jsx13(
1749
1815
  "button",
1750
1816
  {
1751
1817
  type: "button",
@@ -1754,11 +1820,11 @@ var ExternalInput = ({
1754
1820
  onChange(null);
1755
1821
  },
1756
1822
  disabled: readOnly,
1757
- children: /* @__PURE__ */ jsx12(LockOpen, { size: 16 })
1823
+ children: /* @__PURE__ */ jsx13(LockOpen, { size: 16 })
1758
1824
  }
1759
1825
  )
1760
1826
  ] }),
1761
- /* @__PURE__ */ jsx12(Modal, { onClose: () => setOpen(false), isOpen, children: /* @__PURE__ */ jsxs6(
1827
+ /* @__PURE__ */ jsx13(Modal, { onClose: () => setOpen(false), isOpen, children: /* @__PURE__ */ jsxs6(
1762
1828
  "form",
1763
1829
  {
1764
1830
  className: getClassNameModal({
@@ -1772,11 +1838,11 @@ var ExternalInput = ({
1772
1838
  search(searchQuery, filters);
1773
1839
  },
1774
1840
  children: [
1775
- /* @__PURE__ */ jsx12("div", { className: getClassNameModal("masthead"), children: field.showSearch ? /* @__PURE__ */ jsxs6("div", { className: getClassNameModal("searchForm"), children: [
1841
+ /* @__PURE__ */ jsx13("div", { className: getClassNameModal("masthead"), children: field.showSearch ? /* @__PURE__ */ jsxs6("div", { className: getClassNameModal("searchForm"), children: [
1776
1842
  /* @__PURE__ */ jsxs6("label", { className: getClassNameModal("search"), children: [
1777
- /* @__PURE__ */ jsx12("span", { className: getClassNameModal("searchIconText"), children: "Search" }),
1778
- /* @__PURE__ */ jsx12("div", { className: getClassNameModal("searchIcon"), children: /* @__PURE__ */ jsx12(Search, { size: "18" }) }),
1779
- /* @__PURE__ */ jsx12(
1843
+ /* @__PURE__ */ jsx13("span", { className: getClassNameModal("searchIconText"), children: "Search" }),
1844
+ /* @__PURE__ */ jsx13("div", { className: getClassNameModal("searchIcon"), children: /* @__PURE__ */ jsx13(Search, { size: "18" }) }),
1845
+ /* @__PURE__ */ jsx13(
1780
1846
  "input",
1781
1847
  {
1782
1848
  className: getClassNameModal("searchInput"),
@@ -1792,8 +1858,8 @@ var ExternalInput = ({
1792
1858
  )
1793
1859
  ] }),
1794
1860
  /* @__PURE__ */ jsxs6("div", { className: getClassNameModal("searchActions"), children: [
1795
- /* @__PURE__ */ jsx12(Button, { type: "submit", loading: isLoading, fullWidth: true, children: "Search" }),
1796
- hasFilterFields && /* @__PURE__ */ jsx12("div", { className: getClassNameModal("searchActionIcon"), children: /* @__PURE__ */ jsx12(
1861
+ /* @__PURE__ */ jsx13(Button, { type: "submit", loading: isLoading, fullWidth: true, children: "Search" }),
1862
+ hasFilterFields && /* @__PURE__ */ jsx13("div", { className: getClassNameModal("searchActionIcon"), children: /* @__PURE__ */ jsx13(
1797
1863
  IconButton,
1798
1864
  {
1799
1865
  title: "Toggle filters",
@@ -1802,15 +1868,15 @@ var ExternalInput = ({
1802
1868
  e.stopPropagation();
1803
1869
  setFiltersToggled(!filtersToggled);
1804
1870
  },
1805
- children: /* @__PURE__ */ jsx12(SlidersHorizontal, { size: 20 })
1871
+ children: /* @__PURE__ */ jsx13(SlidersHorizontal, { size: 20 })
1806
1872
  }
1807
1873
  ) })
1808
1874
  ] })
1809
- ] }) : /* @__PURE__ */ jsx12(Heading, { rank: "2", size: "xs", children: field.placeholder || "Select data" }) }),
1875
+ ] }) : /* @__PURE__ */ jsx13(Heading, { rank: "2", size: "xs", children: field.placeholder || "Select data" }) }),
1810
1876
  /* @__PURE__ */ jsxs6("div", { className: getClassNameModal("grid"), children: [
1811
- hasFilterFields && /* @__PURE__ */ jsx12("div", { className: getClassNameModal("filters"), children: hasFilterFields && Object.keys(filterFields).map((fieldName) => {
1877
+ hasFilterFields && /* @__PURE__ */ jsx13("div", { className: getClassNameModal("filters"), children: hasFilterFields && Object.keys(filterFields).map((fieldName) => {
1812
1878
  const filterField = filterFields[fieldName];
1813
- return /* @__PURE__ */ jsx12(
1879
+ return /* @__PURE__ */ jsx13(
1814
1880
  AutoFieldPrivate,
1815
1881
  {
1816
1882
  field: filterField,
@@ -1829,7 +1895,7 @@ var ExternalInput = ({
1829
1895
  }) }),
1830
1896
  /* @__PURE__ */ jsxs6("div", { className: getClassNameModal("tableWrapper"), children: [
1831
1897
  /* @__PURE__ */ jsxs6("table", { className: getClassNameModal("table"), children: [
1832
- /* @__PURE__ */ jsx12("thead", { className: getClassNameModal("thead"), children: /* @__PURE__ */ jsx12("tr", { className: getClassNameModal("tr"), children: keys.map((key) => /* @__PURE__ */ jsx12(
1898
+ /* @__PURE__ */ jsx13("thead", { className: getClassNameModal("thead"), children: /* @__PURE__ */ jsx13("tr", { className: getClassNameModal("tr"), children: keys.map((key) => /* @__PURE__ */ jsx13(
1833
1899
  "th",
1834
1900
  {
1835
1901
  className: getClassNameModal("th"),
@@ -1838,8 +1904,8 @@ var ExternalInput = ({
1838
1904
  },
1839
1905
  key
1840
1906
  )) }) }),
1841
- /* @__PURE__ */ jsx12("tbody", { className: getClassNameModal("tbody"), children: mappedData.map((item, i) => {
1842
- return /* @__PURE__ */ jsx12(
1907
+ /* @__PURE__ */ jsx13("tbody", { className: getClassNameModal("tbody"), children: mappedData.map((item, i) => {
1908
+ return /* @__PURE__ */ jsx13(
1843
1909
  "tr",
1844
1910
  {
1845
1911
  style: { whiteSpace: "nowrap" },
@@ -1848,16 +1914,16 @@ var ExternalInput = ({
1848
1914
  onChange(mapProp(data[i]));
1849
1915
  setOpen(false);
1850
1916
  },
1851
- children: keys.map((key) => /* @__PURE__ */ jsx12("td", { className: getClassNameModal("td"), children: item[key] }, key))
1917
+ children: keys.map((key) => /* @__PURE__ */ jsx13("td", { className: getClassNameModal("td"), children: item[key] }, key))
1852
1918
  },
1853
1919
  i
1854
1920
  );
1855
1921
  }) })
1856
1922
  ] }),
1857
- /* @__PURE__ */ jsx12("div", { className: getClassNameModal("loadingBanner"), children: /* @__PURE__ */ jsx12(Loader, { size: 24 }) })
1923
+ /* @__PURE__ */ jsx13("div", { className: getClassNameModal("loadingBanner"), children: /* @__PURE__ */ jsx13(Loader, { size: 24 }) })
1858
1924
  ] })
1859
1925
  ] }),
1860
- /* @__PURE__ */ jsx12("div", { className: getClassNameModal("footerContainer"), children: /* @__PURE__ */ jsx12(Footer, { items: mappedData }) })
1926
+ /* @__PURE__ */ jsx13("div", { className: getClassNameModal("footerContainer"), children: /* @__PURE__ */ jsx13(Footer, { items: mappedData }) })
1861
1927
  ]
1862
1928
  }
1863
1929
  ) })
@@ -1867,7 +1933,7 @@ var ExternalInput = ({
1867
1933
  };
1868
1934
 
1869
1935
  // components/AutoField/fields/ExternalField/index.tsx
1870
- import { jsx as jsx13 } from "react/jsx-runtime";
1936
+ import { jsx as jsx14 } from "react/jsx-runtime";
1871
1937
  var ExternalField = ({
1872
1938
  field,
1873
1939
  onChange,
@@ -1891,7 +1957,7 @@ var ExternalField = ({
1891
1957
  if (field.type !== "external") {
1892
1958
  return null;
1893
1959
  }
1894
- return /* @__PURE__ */ jsx13(Label2, { label: label || name, icon: /* @__PURE__ */ jsx13(Link, { size: 16 }), el: "div", children: /* @__PURE__ */ jsx13(
1960
+ return /* @__PURE__ */ jsx14(Label2, { label: label || name, icon: /* @__PURE__ */ jsx14(Link, { size: 16 }), el: "div", children: /* @__PURE__ */ jsx14(
1895
1961
  ExternalInput,
1896
1962
  {
1897
1963
  name,
@@ -1916,7 +1982,7 @@ var ExternalField = ({
1916
1982
 
1917
1983
  // components/AutoField/fields/RadioField/index.tsx
1918
1984
  init_react_import();
1919
- import { useMemo as useMemo2 } from "react";
1985
+ import { useMemo as useMemo3 } from "react";
1920
1986
 
1921
1987
  // lib/safe-json-parse.ts
1922
1988
  init_react_import();
@@ -1930,7 +1996,7 @@ var safeJsonParse = (str) => {
1930
1996
  };
1931
1997
 
1932
1998
  // components/AutoField/fields/RadioField/index.tsx
1933
- import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
1999
+ import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
1934
2000
  var getClassName11 = get_class_name_factory_default("Input", styles_module_default2);
1935
2001
  var RadioField = ({
1936
2002
  field,
@@ -1942,26 +2008,26 @@ var RadioField = ({
1942
2008
  label,
1943
2009
  Label: Label2
1944
2010
  }) => {
1945
- const flatOptions = useMemo2(
2011
+ const flatOptions = useMemo3(
1946
2012
  () => field.type === "radio" ? field.options.map(({ value: value2 }) => value2) : [],
1947
2013
  [field]
1948
2014
  );
1949
2015
  if (field.type !== "radio" || !field.options) {
1950
2016
  return null;
1951
2017
  }
1952
- return /* @__PURE__ */ jsx14(
2018
+ return /* @__PURE__ */ jsx15(
1953
2019
  Label2,
1954
2020
  {
1955
- icon: /* @__PURE__ */ jsx14(CircleCheckBig, { size: 16 }),
2021
+ icon: /* @__PURE__ */ jsx15(CircleCheckBig, { size: 16 }),
1956
2022
  label: label || name,
1957
2023
  readOnly,
1958
2024
  el: "div",
1959
- children: /* @__PURE__ */ jsx14("div", { className: getClassName11("radioGroupItems"), id, children: field.options.map((option) => /* @__PURE__ */ jsxs7(
2025
+ children: /* @__PURE__ */ jsx15("div", { className: getClassName11("radioGroupItems"), id, children: field.options.map((option) => /* @__PURE__ */ jsxs7(
1960
2026
  "label",
1961
2027
  {
1962
2028
  className: getClassName11("radio"),
1963
2029
  children: [
1964
- /* @__PURE__ */ jsx14(
2030
+ /* @__PURE__ */ jsx15(
1965
2031
  "input",
1966
2032
  {
1967
2033
  type: "radio",
@@ -1981,7 +2047,7 @@ var RadioField = ({
1981
2047
  checked: value === option.value
1982
2048
  }
1983
2049
  ),
1984
- /* @__PURE__ */ jsx14("div", { className: getClassName11("radioInner"), children: option.label || option.value })
2050
+ /* @__PURE__ */ jsx15("div", { className: getClassName11("radioInner"), children: option.label || option.value })
1985
2051
  ]
1986
2052
  },
1987
2053
  option.label + option.value
@@ -1992,8 +2058,8 @@ var RadioField = ({
1992
2058
 
1993
2059
  // components/AutoField/fields/SelectField/index.tsx
1994
2060
  init_react_import();
1995
- import { useMemo as useMemo3 } from "react";
1996
- import { jsx as jsx15 } from "react/jsx-runtime";
2061
+ import { useMemo as useMemo4 } from "react";
2062
+ import { jsx as jsx16 } from "react/jsx-runtime";
1997
2063
  var getClassName12 = get_class_name_factory_default("Input", styles_module_default2);
1998
2064
  var SelectField = ({
1999
2065
  field,
@@ -2005,20 +2071,20 @@ var SelectField = ({
2005
2071
  readOnly,
2006
2072
  id
2007
2073
  }) => {
2008
- const flatOptions = useMemo3(
2074
+ const flatOptions = useMemo4(
2009
2075
  () => field.type === "select" ? field.options.map(({ value: value2 }) => value2) : [],
2010
2076
  [field]
2011
2077
  );
2012
2078
  if (field.type !== "select" || !field.options) {
2013
2079
  return null;
2014
2080
  }
2015
- return /* @__PURE__ */ jsx15(
2081
+ return /* @__PURE__ */ jsx16(
2016
2082
  Label2,
2017
2083
  {
2018
2084
  label: label || name,
2019
- icon: /* @__PURE__ */ jsx15(ChevronDown, { size: 16 }),
2085
+ icon: /* @__PURE__ */ jsx16(ChevronDown, { size: 16 }),
2020
2086
  readOnly,
2021
- children: /* @__PURE__ */ jsx15(
2087
+ children: /* @__PURE__ */ jsx16(
2022
2088
  "select",
2023
2089
  {
2024
2090
  id,
@@ -2035,7 +2101,7 @@ var SelectField = ({
2035
2101
  }
2036
2102
  },
2037
2103
  value,
2038
- children: field.options.map((option) => /* @__PURE__ */ jsx15(
2104
+ children: field.options.map((option) => /* @__PURE__ */ jsx16(
2039
2105
  "option",
2040
2106
  {
2041
2107
  label: option.label,
@@ -2051,7 +2117,7 @@ var SelectField = ({
2051
2117
 
2052
2118
  // components/AutoField/fields/TextareaField/index.tsx
2053
2119
  init_react_import();
2054
- import { jsx as jsx16 } from "react/jsx-runtime";
2120
+ import { jsx as jsx17 } from "react/jsx-runtime";
2055
2121
  var getClassName13 = get_class_name_factory_default("Input", styles_module_default2);
2056
2122
  var TextareaField = ({
2057
2123
  onChange,
@@ -2062,7 +2128,7 @@ var TextareaField = ({
2062
2128
  Label: Label2,
2063
2129
  id
2064
2130
  }) => {
2065
- return /* @__PURE__ */ jsx16(Label2, { label: label || name, icon: /* @__PURE__ */ jsx16(Type, { size: 16 }), readOnly, children: /* @__PURE__ */ jsx16(
2131
+ return /* @__PURE__ */ jsx17(Label2, { label: label || name, icon: /* @__PURE__ */ jsx17(Type, { size: 16 }), readOnly, children: /* @__PURE__ */ jsx17(
2066
2132
  "textarea",
2067
2133
  {
2068
2134
  id,
@@ -2089,7 +2155,7 @@ init_react_import();
2089
2155
  var styles_module_default9 = { "ObjectField": "_ObjectField_1ua3y_5", "ObjectField-fieldset": "_ObjectField-fieldset_1ua3y_13" };
2090
2156
 
2091
2157
  // components/AutoField/fields/ObjectField/index.tsx
2092
- import { jsx as jsx17 } from "react/jsx-runtime";
2158
+ import { jsx as jsx18 } from "react/jsx-runtime";
2093
2159
  var getClassName14 = get_class_name_factory_default("ObjectField", styles_module_default9);
2094
2160
  var ObjectField = ({
2095
2161
  field,
@@ -2101,47 +2167,54 @@ var ObjectField = ({
2101
2167
  readOnly,
2102
2168
  id
2103
2169
  }) => {
2104
- const { selectedItem } = useAppContext();
2170
+ const { readOnlyFields, localName = name } = useNestedFieldContext();
2105
2171
  if (field.type !== "object" || !field.objectFields) {
2106
2172
  return null;
2107
2173
  }
2108
- const readOnlyFields = (selectedItem == null ? void 0 : selectedItem.readOnly) || {};
2109
2174
  const data = value || {};
2110
- return /* @__PURE__ */ jsx17(
2175
+ return /* @__PURE__ */ jsx18(
2111
2176
  Label2,
2112
2177
  {
2113
2178
  label: label || name,
2114
- icon: /* @__PURE__ */ jsx17(EllipsisVertical, { size: 16 }),
2179
+ icon: /* @__PURE__ */ jsx18(EllipsisVertical, { size: 16 }),
2115
2180
  el: "div",
2116
2181
  readOnly,
2117
- children: /* @__PURE__ */ jsx17("div", { className: getClassName14(), children: /* @__PURE__ */ jsx17("fieldset", { className: getClassName14("fieldset"), children: Object.keys(field.objectFields).map((fieldName) => {
2118
- const subField = field.objectFields[fieldName];
2119
- const subFieldName = `${name}.${fieldName}`;
2120
- const wildcardFieldName = `${name}.${fieldName}`;
2121
- const subReadOnly = readOnly ? readOnly : typeof readOnlyFields[subFieldName] !== "undefined" ? readOnlyFields[subFieldName] : readOnlyFields[wildcardFieldName];
2122
- const label2 = subField.label || fieldName;
2123
- return /* @__PURE__ */ jsx17(
2124
- AutoFieldPrivate,
2182
+ children: /* @__PURE__ */ jsx18("div", { className: getClassName14(), children: /* @__PURE__ */ jsx18("fieldset", { className: getClassName14("fieldset"), children: Object.keys(field.objectFields).map((subName) => {
2183
+ const subField = field.objectFields[subName];
2184
+ const subPath = `${name}.${subName}`;
2185
+ const localSubPath = `${localName || name}.${subName}`;
2186
+ const subReadOnly = readOnly ? readOnly : readOnlyFields[localSubPath];
2187
+ const label2 = subField.label || subName;
2188
+ return /* @__PURE__ */ jsx18(
2189
+ NestedFieldProvider,
2125
2190
  {
2126
- name: subFieldName,
2127
- label: label2,
2128
- id: `${id}_${fieldName}`,
2129
- readOnly: subReadOnly,
2130
- field: __spreadProps(__spreadValues({}, subField), {
2131
- label: label2
2132
- // May be used by custom fields
2133
- }),
2134
- value: data[fieldName],
2135
- onChange: (val, ui) => {
2136
- onChange(
2137
- __spreadProps(__spreadValues({}, data), {
2138
- [fieldName]: val
2191
+ name: localName || id,
2192
+ subName,
2193
+ readOnlyFields,
2194
+ children: /* @__PURE__ */ jsx18(
2195
+ AutoFieldPrivate,
2196
+ {
2197
+ name: subPath,
2198
+ label: subPath,
2199
+ id: `${id}_${subName}`,
2200
+ readOnly: subReadOnly,
2201
+ field: __spreadProps(__spreadValues({}, subField), {
2202
+ label: label2
2203
+ // May be used by custom fields
2139
2204
  }),
2140
- ui
2141
- );
2142
- }
2205
+ value: data[subName],
2206
+ onChange: (val, ui) => {
2207
+ onChange(
2208
+ __spreadProps(__spreadValues({}, data), {
2209
+ [subName]: val
2210
+ }),
2211
+ ui
2212
+ );
2213
+ }
2214
+ }
2215
+ )
2143
2216
  },
2144
- subFieldName
2217
+ subPath
2145
2218
  );
2146
2219
  }) }) })
2147
2220
  }
@@ -2167,7 +2240,7 @@ var useSafeId = () => {
2167
2240
  };
2168
2241
 
2169
2242
  // components/AutoField/index.tsx
2170
- import { Fragment as Fragment4, jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
2243
+ import { Fragment as Fragment4, jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
2171
2244
  var getClassName15 = get_class_name_factory_default("Input", styles_module_default2);
2172
2245
  var getClassNameWrapper = get_class_name_factory_default("InputWrapper", styles_module_default2);
2173
2246
  var FieldLabel = ({
@@ -2181,14 +2254,14 @@ var FieldLabel = ({
2181
2254
  const El = el;
2182
2255
  return /* @__PURE__ */ jsxs8(El, { className, children: [
2183
2256
  /* @__PURE__ */ jsxs8("div", { className: getClassName15("label"), children: [
2184
- icon ? /* @__PURE__ */ jsx18("div", { className: getClassName15("labelIcon"), children: icon }) : /* @__PURE__ */ jsx18(Fragment4, {}),
2257
+ icon ? /* @__PURE__ */ jsx19("div", { className: getClassName15("labelIcon"), children: icon }) : /* @__PURE__ */ jsx19(Fragment4, {}),
2185
2258
  label,
2186
- readOnly && /* @__PURE__ */ jsx18("div", { className: getClassName15("disabledIcon"), title: "Read-only", children: /* @__PURE__ */ jsx18(Lock, { size: "12" }) })
2259
+ readOnly && /* @__PURE__ */ jsx19("div", { className: getClassName15("disabledIcon"), title: "Read-only", children: /* @__PURE__ */ jsx19(Lock, { size: "12" }) })
2187
2260
  ] }),
2188
2261
  children
2189
2262
  ] });
2190
2263
  };
2191
- var FieldLabelInternal2 = ({
2264
+ var FieldLabelInternal = ({
2192
2265
  children,
2193
2266
  icon,
2194
2267
  label,
@@ -2196,14 +2269,14 @@ var FieldLabelInternal2 = ({
2196
2269
  readOnly
2197
2270
  }) => {
2198
2271
  const { overrides } = useAppContext();
2199
- const Wrapper = useMemo4(
2272
+ const Wrapper = useMemo5(
2200
2273
  () => overrides.fieldLabel || FieldLabel,
2201
2274
  [overrides]
2202
2275
  );
2203
2276
  if (!label) {
2204
- return /* @__PURE__ */ jsx18(Fragment4, { children });
2277
+ return /* @__PURE__ */ jsx19(Fragment4, { children });
2205
2278
  }
2206
- return /* @__PURE__ */ jsx18(
2279
+ return /* @__PURE__ */ jsx19(
2207
2280
  Wrapper,
2208
2281
  {
2209
2282
  label,
@@ -2217,8 +2290,9 @@ var FieldLabelInternal2 = ({
2217
2290
  };
2218
2291
  function AutoFieldInternal(props) {
2219
2292
  var _a, _b, _c, _d, _e, _f, _g, _h;
2220
- const { dispatch, overrides } = useAppContext();
2221
- const { id, Label: Label2 = FieldLabelInternal2 } = props;
2293
+ const { dispatch, overrides, selectedItem } = useAppContext();
2294
+ const nestedFieldContext = useContext3(NestedFieldContext);
2295
+ const { id, Label: Label2 = FieldLabelInternal } = props;
2222
2296
  const field = props.field;
2223
2297
  const label = field.label;
2224
2298
  const defaultId = useSafeId();
@@ -2278,20 +2352,29 @@ function AutoFieldInternal(props) {
2278
2352
  return null;
2279
2353
  }
2280
2354
  const CustomField = field.render;
2281
- return /* @__PURE__ */ jsx18("div", { className: getClassNameWrapper(), onFocus, onBlur, children: /* @__PURE__ */ jsx18("div", { className: getClassName15(), children: /* @__PURE__ */ jsx18(CustomField, __spreadValues({}, mergedProps)) }) });
2355
+ return /* @__PURE__ */ jsx19("div", { className: getClassNameWrapper(), onFocus, onBlur, children: /* @__PURE__ */ jsx19("div", { className: getClassName15(), children: /* @__PURE__ */ jsx19(CustomField, __spreadValues({}, mergedProps)) }) });
2282
2356
  }
2283
2357
  const children = defaultFields[field.type](mergedProps);
2284
2358
  const Render2 = render[field.type];
2285
- return /* @__PURE__ */ jsx18(
2286
- "div",
2359
+ return /* @__PURE__ */ jsx19(
2360
+ NestedFieldContext.Provider,
2287
2361
  {
2288
- className: getClassNameWrapper(),
2289
- onFocus,
2290
- onBlur,
2291
- onClick: (e) => {
2292
- e.stopPropagation();
2362
+ value: {
2363
+ readOnlyFields: nestedFieldContext.readOnlyFields || (selectedItem == null ? void 0 : selectedItem.readOnly) || {},
2364
+ localName: nestedFieldContext.localName
2293
2365
  },
2294
- children: /* @__PURE__ */ jsx18(Render2, __spreadProps(__spreadValues({}, mergedProps), { children }))
2366
+ children: /* @__PURE__ */ jsx19(
2367
+ "div",
2368
+ {
2369
+ className: getClassNameWrapper(),
2370
+ onFocus,
2371
+ onBlur,
2372
+ onClick: (e) => {
2373
+ e.stopPropagation();
2374
+ },
2375
+ children: /* @__PURE__ */ jsx19(Render2, __spreadProps(__spreadValues({}, mergedProps), { children }))
2376
+ }
2377
+ )
2295
2378
  }
2296
2379
  );
2297
2380
  }
@@ -2319,11 +2402,11 @@ function AutoFieldPrivate(props) {
2319
2402
  value: localValue,
2320
2403
  onChange: onChangeLocal
2321
2404
  };
2322
- return /* @__PURE__ */ jsx18(AutoFieldInternal, __spreadValues(__spreadValues({}, props), localProps));
2405
+ return /* @__PURE__ */ jsx19(AutoFieldInternal, __spreadValues(__spreadValues({}, props), localProps));
2323
2406
  }
2324
2407
  function AutoField(props) {
2325
- const DefaultLabel = useMemo4(() => {
2326
- const DefaultLabel2 = (labelProps) => /* @__PURE__ */ jsx18(
2408
+ const DefaultLabel = useMemo5(() => {
2409
+ const DefaultLabel2 = (labelProps) => /* @__PURE__ */ jsx19(
2327
2410
  "div",
2328
2411
  __spreadProps(__spreadValues({}, labelProps), {
2329
2412
  className: getClassName15({ readOnly: props.readOnly })
@@ -2331,7 +2414,7 @@ function AutoField(props) {
2331
2414
  );
2332
2415
  return DefaultLabel2;
2333
2416
  }, [props.readOnly]);
2334
- return /* @__PURE__ */ jsx18(AutoFieldInternal, __spreadProps(__spreadValues({}, props), { Label: DefaultLabel }));
2417
+ return /* @__PURE__ */ jsx19(AutoFieldInternal, __spreadProps(__spreadValues({}, props), { Label: DefaultLabel }));
2335
2418
  }
2336
2419
 
2337
2420
  // components/Drawer/index.tsx
@@ -2342,18 +2425,18 @@ init_react_import();
2342
2425
  var styles_module_default10 = { "Drawer": "_Drawer_fkqfo_1", "Drawer-draggable": "_Drawer-draggable_fkqfo_8", "Drawer-draggableBg": "_Drawer-draggableBg_fkqfo_12", "Drawer-draggableFg": "_Drawer-draggableFg_fkqfo_21", "DrawerItem-draggable": "_DrawerItem-draggable_fkqfo_25", "DrawerItem--disabled": "_DrawerItem--disabled_fkqfo_38", "DrawerItem": "_DrawerItem_fkqfo_25", "Drawer--isDraggingFrom": "_Drawer--isDraggingFrom_fkqfo_48", "DrawerItem-name": "_DrawerItem-name_fkqfo_66" };
2343
2426
 
2344
2427
  // components/Drawer/index.tsx
2345
- import { useMemo as useMemo8, useState as useState18 } from "react";
2428
+ import { useId as useId2, useMemo as useMemo9, useState as useState18 } from "react";
2346
2429
 
2347
2430
  // components/DragDropContext/index.tsx
2348
2431
  init_react_import();
2349
2432
  import { DragDropProvider as DragDropProvider2 } from "@dnd-kit/react";
2350
2433
  import {
2351
- createContext as createContext3,
2434
+ createContext as createContext4,
2352
2435
  useCallback as useCallback11,
2353
- useContext as useContext5,
2436
+ useContext as useContext7,
2354
2437
  useEffect as useEffect15,
2355
2438
  useId,
2356
- useRef as useRef5,
2439
+ useRef as useRef4,
2357
2440
  useState as useState17
2358
2441
  } from "react";
2359
2442
  import { AutoScroller, defaultPreset } from "@dnd-kit/dom";
@@ -2363,20 +2446,20 @@ init_react_import();
2363
2446
  import {
2364
2447
  forwardRef as forwardRef3,
2365
2448
  useCallback as useCallback10,
2366
- useContext as useContext4,
2449
+ useContext as useContext6,
2367
2450
  useEffect as useEffect14,
2368
- useMemo as useMemo7,
2369
- useRef as useRef4
2451
+ useMemo as useMemo8,
2452
+ useRef as useRef3
2370
2453
  } from "react";
2371
2454
 
2372
2455
  // components/DraggableComponent/index.tsx
2373
2456
  init_react_import();
2374
2457
  import {
2375
2458
  useCallback as useCallback7,
2376
- useContext as useContext3,
2459
+ useContext as useContext5,
2377
2460
  useEffect as useEffect10,
2378
- useMemo as useMemo6,
2379
- useRef as useRef3,
2461
+ useMemo as useMemo7,
2462
+ useRef as useRef2,
2380
2463
  useState as useState13
2381
2464
  } from "react";
2382
2465
 
@@ -2747,15 +2830,15 @@ function getDeepScrollPosition(element) {
2747
2830
  // components/DropZone/context.tsx
2748
2831
  init_react_import();
2749
2832
  import {
2750
- createContext as createContext2,
2833
+ createContext as createContext3,
2751
2834
  useCallback as useCallback6,
2752
- useMemo as useMemo5,
2835
+ useMemo as useMemo6,
2753
2836
  useState as useState12
2754
2837
  } from "react";
2755
2838
  import { createStore as createStore2 } from "zustand";
2756
- import { Fragment as Fragment5, jsx as jsx19 } from "react/jsx-runtime";
2757
- var dropZoneContext = createContext2(null);
2758
- var ZoneStoreContext = createContext2(
2839
+ import { Fragment as Fragment5, jsx as jsx20 } from "react/jsx-runtime";
2840
+ var dropZoneContext = createContext3(null);
2841
+ var ZoneStoreContext = createContext3(
2759
2842
  createStore2(() => ({
2760
2843
  zoneDepthIndex: {},
2761
2844
  nextZoneDepthIndex: {},
@@ -2769,7 +2852,7 @@ var ZoneStoreProvider = ({
2769
2852
  children,
2770
2853
  store
2771
2854
  }) => {
2772
- return /* @__PURE__ */ jsx19(ZoneStoreContext.Provider, { value: store, children });
2855
+ return /* @__PURE__ */ jsx20(ZoneStoreContext.Provider, { value: store, children });
2773
2856
  };
2774
2857
  var DropZoneProvider = ({
2775
2858
  children,
@@ -2815,7 +2898,7 @@ var DropZoneProvider = ({
2815
2898
  },
2816
2899
  [setActiveZones, dispatch]
2817
2900
  );
2818
- const memoValue = useMemo5(
2901
+ const memoValue = useMemo6(
2819
2902
  () => __spreadValues({
2820
2903
  hoveringComponent,
2821
2904
  setHoveringComponent,
@@ -2827,16 +2910,16 @@ var DropZoneProvider = ({
2827
2910
  }, value),
2828
2911
  [value, hoveringComponent, areasWithZones, activeZones]
2829
2912
  );
2830
- return /* @__PURE__ */ jsx19(Fragment5, { children: memoValue && /* @__PURE__ */ jsx19(dropZoneContext.Provider, { value: memoValue, children }) });
2913
+ return /* @__PURE__ */ jsx20(Fragment5, { children: memoValue && /* @__PURE__ */ jsx20(dropZoneContext.Provider, { value: memoValue, children }) });
2831
2914
  };
2832
2915
 
2833
2916
  // lib/use-context-store.ts
2834
2917
  init_react_import();
2835
- import { useContext as useContext2 } from "react";
2918
+ import { useContext as useContext4 } from "react";
2836
2919
  import { useStore } from "zustand";
2837
2920
  import { useShallow } from "zustand/react/shallow";
2838
2921
  function useContextStore(context, selector) {
2839
- const store = useContext2(context);
2922
+ const store = useContext4(context);
2840
2923
  if (!store) {
2841
2924
  throw new Error("useContextStore must be used inside context");
2842
2925
  }
@@ -2844,7 +2927,7 @@ function useContextStore(context, selector) {
2844
2927
  }
2845
2928
 
2846
2929
  // components/DraggableComponent/index.tsx
2847
- import { jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
2930
+ import { jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
2848
2931
  var getClassName16 = get_class_name_factory_default("DraggableComponent", styles_module_default11);
2849
2932
  var DEBUG2 = false;
2850
2933
  var space = 8;
@@ -2858,9 +2941,9 @@ var DefaultActionBar = ({
2858
2941
  }) => /* @__PURE__ */ jsxs9(ActionBar, { children: [
2859
2942
  /* @__PURE__ */ jsxs9(ActionBar.Group, { children: [
2860
2943
  parentAction,
2861
- label && /* @__PURE__ */ jsx20(ActionBar.Label, { label })
2944
+ label && /* @__PURE__ */ jsx21(ActionBar.Label, { label })
2862
2945
  ] }),
2863
- /* @__PURE__ */ jsx20(ActionBar.Group, { children })
2946
+ /* @__PURE__ */ jsx21(ActionBar.Group, { children })
2864
2947
  ] });
2865
2948
  var convertIdToSelector = (id, zoneCompound, data) => {
2866
2949
  const content = zoneCompound && data.zones && zoneCompound !== "default-zone" ? data.zones[zoneCompound] : data.content;
@@ -2895,7 +2978,7 @@ var DraggableComponent = ({
2895
2978
  iframe,
2896
2979
  state
2897
2980
  } = useAppContext();
2898
- const ctx = useContext3(dropZoneContext);
2981
+ const ctx = useContext5(dropZoneContext);
2899
2982
  const [localZones, setLocalZones] = useState13({});
2900
2983
  const registerLocalZone = useCallback7(
2901
2984
  (zoneCompound2, active) => {
@@ -2964,7 +3047,7 @@ var DraggableComponent = ({
2964
3047
  }
2965
3048
  });
2966
3049
  const thisIsDragging = status === "dragging";
2967
- const ref = useRef3(null);
3050
+ const ref = useRef2(null);
2968
3051
  const refSetter = useCallback7(
2969
3052
  (el) => {
2970
3053
  sortableRef(el);
@@ -3022,7 +3105,7 @@ var DraggableComponent = ({
3022
3105
  });
3023
3106
  }
3024
3107
  }, [isSelected]);
3025
- const CustomActionBar = useMemo6(
3108
+ const CustomActionBar = useMemo7(
3026
3109
  () => overrides.actionBar || DefaultActionBar,
3027
3110
  [overrides.actionBar]
3028
3111
  );
@@ -3174,7 +3257,7 @@ var DraggableComponent = ({
3174
3257
  }
3175
3258
  setDragAxis(autoDragAxis);
3176
3259
  }, [ref, userDragAxis, autoDragAxis]);
3177
- const parentAction = (ctx == null ? void 0 : ctx.areaId) && (ctx == null ? void 0 : ctx.areaId) !== "root" && /* @__PURE__ */ jsx20(ActionBar.Action, { onClick: onSelectParent, label: "Select parent", children: /* @__PURE__ */ jsx20(CornerLeftUp, { size: 16 }) });
3260
+ const parentAction = (ctx == null ? void 0 : ctx.areaId) && (ctx == null ? void 0 : ctx.areaId) !== "root" && /* @__PURE__ */ jsx21(ActionBar.Action, { onClick: onSelectParent, label: "Select parent", children: /* @__PURE__ */ jsx21(CornerLeftUp, { size: 16 }) });
3178
3261
  return /* @__PURE__ */ jsxs9(
3179
3262
  DropZoneProvider,
3180
3263
  {
@@ -3201,15 +3284,15 @@ var DraggableComponent = ({
3201
3284
  "data-puck-overlay": true,
3202
3285
  children: [
3203
3286
  debug,
3204
- isLoading && /* @__PURE__ */ jsx20("div", { className: getClassName16("loadingOverlay"), children: /* @__PURE__ */ jsx20(Loader, {}) }),
3205
- /* @__PURE__ */ jsx20(
3287
+ isLoading && /* @__PURE__ */ jsx21("div", { className: getClassName16("loadingOverlay"), children: /* @__PURE__ */ jsx21(Loader, {}) }),
3288
+ /* @__PURE__ */ jsx21(
3206
3289
  "div",
3207
3290
  {
3208
3291
  className: getClassName16("actionsOverlay"),
3209
3292
  style: {
3210
3293
  top: actionsOverlayTop / zoomConfig.zoom
3211
3294
  },
3212
- children: /* @__PURE__ */ jsx20(
3295
+ children: /* @__PURE__ */ jsx21(
3213
3296
  "div",
3214
3297
  {
3215
3298
  className: getClassName16("actions"),
@@ -3227,8 +3310,8 @@ var DraggableComponent = ({
3227
3310
  parentAction,
3228
3311
  label: DEBUG2 ? id : label,
3229
3312
  children: [
3230
- permissions.duplicate && /* @__PURE__ */ jsx20(ActionBar.Action, { onClick: onDuplicate, label: "Duplicate", children: /* @__PURE__ */ jsx20(Copy, { size: 16 }) }),
3231
- permissions.delete && /* @__PURE__ */ jsx20(ActionBar.Action, { onClick: onDelete, label: "Delete", children: /* @__PURE__ */ jsx20(Trash, { size: 16 }) })
3313
+ permissions.duplicate && /* @__PURE__ */ jsx21(ActionBar.Action, { onClick: onDuplicate, label: "Duplicate", children: /* @__PURE__ */ jsx21(Copy, { size: 16 }) }),
3314
+ permissions.delete && /* @__PURE__ */ jsx21(ActionBar.Action, { onClick: onDelete, label: "Delete", children: /* @__PURE__ */ jsx21(Trash, { size: 16 }) })
3232
3315
  ]
3233
3316
  }
3234
3317
  )
@@ -3236,7 +3319,7 @@ var DraggableComponent = ({
3236
3319
  )
3237
3320
  }
3238
3321
  ),
3239
- /* @__PURE__ */ jsx20("div", { className: getClassName16("overlay") })
3322
+ /* @__PURE__ */ jsx21("div", { className: getClassName16("overlay") })
3240
3323
  ]
3241
3324
  }
3242
3325
  ),
@@ -3419,12 +3502,12 @@ var useDragAxis = (ref, collisionAxis) => {
3419
3502
  };
3420
3503
 
3421
3504
  // components/DropZone/index.tsx
3422
- import { Fragment as Fragment6, jsx as jsx21, jsxs as jsxs10 } from "react/jsx-runtime";
3505
+ import { Fragment as Fragment6, jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
3423
3506
  var getClassName17 = get_class_name_factory_default("DropZone", styles_module_default12);
3424
3507
  var getRandomColor = () => `#${Math.floor(Math.random() * 16777215).toString(16)}`;
3425
3508
  var RENDER_DEBUG = false;
3426
3509
  var DropZoneEdit = forwardRef3(
3427
- function DropZoneEdit2({
3510
+ function DropZoneEditInternal({
3428
3511
  zone,
3429
3512
  allow,
3430
3513
  disallow,
@@ -3434,7 +3517,7 @@ var DropZoneEdit = forwardRef3(
3434
3517
  collisionAxis
3435
3518
  }, userRef) {
3436
3519
  const appContext2 = useAppContext();
3437
- const ctx = useContext4(dropZoneContext);
3520
+ const ctx = useContext6(dropZoneContext);
3438
3521
  const {
3439
3522
  // These all need setting via context
3440
3523
  data,
@@ -3487,13 +3570,13 @@ var DropZoneEdit = forwardRef3(
3487
3570
  }
3488
3571
  };
3489
3572
  }, []);
3490
- const content = useMemo7(() => {
3573
+ const content = useMemo8(() => {
3491
3574
  if (areaId && zone !== rootDroppableId) {
3492
3575
  return setupZone(data, zoneCompound).zones[zoneCompound];
3493
3576
  }
3494
3577
  return data.content || [];
3495
3578
  }, [data, zoneCompound]);
3496
- const ref = useRef4(null);
3579
+ const ref = useRef3(null);
3497
3580
  const acceptsTarget = useCallback10(
3498
3581
  (componentType) => {
3499
3582
  if (!componentType) {
@@ -3558,7 +3641,7 @@ var DropZoneEdit = forwardRef3(
3558
3641
  userMinEmptyHeight,
3559
3642
  ref
3560
3643
  });
3561
- return /* @__PURE__ */ jsx21(
3644
+ return /* @__PURE__ */ jsx22(
3562
3645
  "div",
3563
3646
  {
3564
3647
  className: `${getClassName17({
@@ -3585,7 +3668,7 @@ var DropZoneEdit = forwardRef3(
3585
3668
  var _a, _b, _c, _d, _e;
3586
3669
  const componentId = item.props.id;
3587
3670
  const puckProps = {
3588
- renderDropZone: DropZone,
3671
+ renderDropZone: (props) => /* @__PURE__ */ jsx22(DropZoneEdit, __spreadValues({}, props)),
3589
3672
  isEditing: true,
3590
3673
  dragRef: null
3591
3674
  };
@@ -3604,18 +3687,18 @@ var DropZoneEdit = forwardRef3(
3604
3687
  let label = (_b = componentConfig == null ? void 0 : componentConfig["label"]) != null ? _b : item.type.toString();
3605
3688
  if (item.type === "preview" && preview) {
3606
3689
  let Preview4 = function() {
3607
- return /* @__PURE__ */ jsx21(DrawerItemInner, { name: label, children: appContext2.overrides.componentItem });
3690
+ return /* @__PURE__ */ jsx22(DrawerItemInner, { name: label, children: appContext2.overrides.componentItem });
3608
3691
  };
3609
3692
  var Preview3 = Preview4;
3610
3693
  componentType = preview.componentType;
3611
3694
  label = (_d = (_c = config.components[componentType]) == null ? void 0 : _c.label) != null ? _d : preview.componentType;
3612
3695
  Render2 = Preview4;
3613
3696
  }
3614
- return /* @__PURE__ */ jsx21(
3697
+ return /* @__PURE__ */ jsx22(
3615
3698
  DropZoneProvider,
3616
3699
  {
3617
3700
  value: __spreadProps(__spreadValues({}, ctx), { path: [...path, zoneCompound] }),
3618
- children: /* @__PURE__ */ jsx21(
3701
+ children: /* @__PURE__ */ jsx22(
3619
3702
  DraggableComponent,
3620
3703
  {
3621
3704
  id: componentId,
@@ -3630,14 +3713,14 @@ var DropZoneEdit = forwardRef3(
3630
3713
  autoDragAxis: dragAxis,
3631
3714
  userDragAxis: collisionAxis,
3632
3715
  inDroppableZone: acceptsTarget(draggedComponentType),
3633
- children: (dragRef) => (componentConfig == null ? void 0 : componentConfig.inline) ? /* @__PURE__ */ jsx21(
3716
+ children: (dragRef) => (componentConfig == null ? void 0 : componentConfig.inline) ? /* @__PURE__ */ jsx22(
3634
3717
  Render2,
3635
3718
  __spreadProps(__spreadValues({}, defaultedProps), {
3636
3719
  puck: __spreadProps(__spreadValues({}, defaultedProps.puck), {
3637
3720
  dragRef
3638
3721
  })
3639
3722
  })
3640
- ) : /* @__PURE__ */ jsx21("div", { ref: dragRef, children: /* @__PURE__ */ jsx21(Render2, __spreadValues({}, defaultedProps)) })
3723
+ ) : /* @__PURE__ */ jsx22("div", { ref: dragRef, children: /* @__PURE__ */ jsx22(Render2, __spreadValues({}, defaultedProps)) })
3641
3724
  }
3642
3725
  )
3643
3726
  },
@@ -3649,8 +3732,8 @@ var DropZoneEdit = forwardRef3(
3649
3732
  }
3650
3733
  );
3651
3734
  var DropZoneRender = forwardRef3(
3652
- function DropZoneRender2({ className, style, zone }, ref) {
3653
- const ctx = useContext4(dropZoneContext);
3735
+ function DropZoneRenderInternal({ className, style, zone }, ref) {
3736
+ const ctx = useContext6(dropZoneContext);
3654
3737
  const { data, areaId = "root", config } = ctx || {};
3655
3738
  let zoneCompound = rootDroppableId;
3656
3739
  let content = (data == null ? void 0 : data.content) || [];
@@ -3671,10 +3754,10 @@ var DropZoneRender = forwardRef3(
3671
3754
  zoneCompound = `${areaId}:${zone}`;
3672
3755
  content = setupZone(data, zoneCompound).zones[zoneCompound];
3673
3756
  }
3674
- return /* @__PURE__ */ jsx21("div", { className, style, ref, children: content.map((item) => {
3757
+ return /* @__PURE__ */ jsx22("div", { className, style, ref, children: content.map((item) => {
3675
3758
  const Component = config.components[item.type];
3676
3759
  if (Component) {
3677
- return /* @__PURE__ */ jsx21(
3760
+ return /* @__PURE__ */ jsx22(
3678
3761
  DropZoneProvider,
3679
3762
  {
3680
3763
  value: {
@@ -3684,10 +3767,12 @@ var DropZoneRender = forwardRef3(
3684
3767
  depth: 1,
3685
3768
  path: []
3686
3769
  },
3687
- children: /* @__PURE__ */ jsx21(
3770
+ children: /* @__PURE__ */ jsx22(
3688
3771
  Component.render,
3689
3772
  __spreadProps(__spreadValues({}, item.props), {
3690
- puck: { renderDropZone: DropZoneRender2 }
3773
+ puck: {
3774
+ renderDropZone: (props) => /* @__PURE__ */ jsx22(DropZoneRender, __spreadValues({}, props))
3775
+ }
3691
3776
  })
3692
3777
  )
3693
3778
  },
@@ -3700,11 +3785,11 @@ var DropZoneRender = forwardRef3(
3700
3785
  );
3701
3786
  var DropZone = forwardRef3(
3702
3787
  function DropZone2(props, ref) {
3703
- const ctx = useContext4(dropZoneContext);
3788
+ const ctx = useContext6(dropZoneContext);
3704
3789
  if ((ctx == null ? void 0 : ctx.mode) === "edit") {
3705
- return /* @__PURE__ */ jsx21(Fragment6, { children: /* @__PURE__ */ jsx21(DropZoneEdit, __spreadProps(__spreadValues({}, props), { ref })) });
3790
+ return /* @__PURE__ */ jsx22(Fragment6, { children: /* @__PURE__ */ jsx22(DropZoneEdit, __spreadProps(__spreadValues({}, props), { ref })) });
3706
3791
  }
3707
- return /* @__PURE__ */ jsx21(Fragment6, { children: /* @__PURE__ */ jsx21(DropZoneRender, __spreadProps(__spreadValues({}, props), { ref })) });
3792
+ return /* @__PURE__ */ jsx22(Fragment6, { children: /* @__PURE__ */ jsx22(DropZoneRender, __spreadProps(__spreadValues({}, props), { ref })) });
3708
3793
  }
3709
3794
  );
3710
3795
 
@@ -3762,6 +3847,48 @@ var getFrame = () => {
3762
3847
  return (frameEl == null ? void 0 : frameEl.ownerDocument) || document;
3763
3848
  };
3764
3849
 
3850
+ // lib/global-position.ts
3851
+ init_react_import();
3852
+ var GlobalPosition = class {
3853
+ constructor(target, original) {
3854
+ this.scaleFactor = 1;
3855
+ this.frameEl = null;
3856
+ this.frameRect = null;
3857
+ var _a;
3858
+ this.target = target;
3859
+ this.original = original;
3860
+ this.frameEl = document.querySelector("iframe");
3861
+ if (this.frameEl) {
3862
+ this.frameRect = this.frameEl.getBoundingClientRect();
3863
+ this.scaleFactor = this.frameRect.width / (((_a = this.frameEl.contentWindow) == null ? void 0 : _a.innerWidth) || 1);
3864
+ }
3865
+ }
3866
+ get x() {
3867
+ return this.original.x;
3868
+ }
3869
+ get y() {
3870
+ return this.original.y;
3871
+ }
3872
+ get global() {
3873
+ if (document !== this.target.ownerDocument && this.frameRect) {
3874
+ return {
3875
+ x: this.x * this.scaleFactor + this.frameRect.left,
3876
+ y: this.y * this.scaleFactor + this.frameRect.top
3877
+ };
3878
+ }
3879
+ return this.original;
3880
+ }
3881
+ get frame() {
3882
+ if (document === this.target.ownerDocument && this.frameRect) {
3883
+ return {
3884
+ x: (this.x - this.frameRect.left) / this.scaleFactor,
3885
+ y: (this.y - this.frameRect.top) / this.scaleFactor
3886
+ };
3887
+ }
3888
+ return this.original;
3889
+ }
3890
+ };
3891
+
3765
3892
  // lib/dnd/NestedDroppablePlugin.ts
3766
3893
  var depthSort = (candidates) => {
3767
3894
  return candidates.sort((a, b) => {
@@ -3791,10 +3918,12 @@ var getZoneId2 = (candidate) => {
3791
3918
  }
3792
3919
  return id;
3793
3920
  };
3794
- var getPointerCollisions = (position, manager, ownerDocument) => {
3795
- var _a;
3921
+ var getPointerCollisions = (position, manager) => {
3796
3922
  const candidates = [];
3797
- let elements = ownerDocument.elementsFromPoint(position.x, position.y);
3923
+ let elements = position.target.ownerDocument.elementsFromPoint(
3924
+ position.x,
3925
+ position.y
3926
+ );
3798
3927
  const previewFrame = elements.find(
3799
3928
  (el) => el.getAttribute("data-puck-preview")
3800
3929
  );
@@ -3803,17 +3932,9 @@ var getPointerCollisions = (position, manager, ownerDocument) => {
3803
3932
  elements = [drawer];
3804
3933
  }
3805
3934
  if (previewFrame) {
3806
- const iframe = previewFrame.querySelector("iframe");
3807
- if (iframe) {
3808
- const rect = iframe.getBoundingClientRect();
3809
- const frame = getFrame();
3810
- if (frame) {
3811
- const scaleFactor = rect.width / (((_a = iframe.contentWindow) == null ? void 0 : _a.innerWidth) || 1);
3812
- elements = frame.elementsFromPoint(
3813
- (position.x - rect.left) / scaleFactor,
3814
- (position.y - rect.top) / scaleFactor
3815
- );
3816
- }
3935
+ const frame = getFrame();
3936
+ if (frame) {
3937
+ elements = frame.elementsFromPoint(position.frame.x, position.frame.y);
3817
3938
  }
3818
3939
  }
3819
3940
  if (elements) {
@@ -3830,9 +3951,9 @@ var getPointerCollisions = (position, manager, ownerDocument) => {
3830
3951
  }
3831
3952
  return candidates;
3832
3953
  };
3833
- var findDeepestCandidate = (position, manager, ownerDocument) => {
3954
+ var findDeepestCandidate = (position, manager) => {
3834
3955
  var _a;
3835
- const candidates = getPointerCollisions(position, manager, ownerDocument);
3956
+ const candidates = getPointerCollisions(position, manager);
3836
3957
  if (candidates.length > 0) {
3837
3958
  const sortedCandidates = depthSort(candidates);
3838
3959
  const draggable = manager.dragOperation.source;
@@ -3885,22 +4006,18 @@ var createNestedDroppablePlugin = ({ onChange }, id) => class NestedDroppablePlu
3885
4006
  }
3886
4007
  const cleanupEffect = effects(() => {
3887
4008
  const handleMove = (event) => {
3888
- const position = {
4009
+ const target = event.originalTarget || event.target;
4010
+ const position = new GlobalPosition(target, {
3889
4011
  x: event.clientX,
3890
4012
  y: event.clientY
3891
- };
3892
- const target = event.originalTarget || event.target;
3893
- const ownerDocument = target == null ? void 0 : target.ownerDocument;
4013
+ });
3894
4014
  const elements = document.elementsFromPoint(
3895
- event.clientX,
3896
- event.clientY
4015
+ position.global.x,
4016
+ position.global.y
3897
4017
  );
3898
4018
  const overEl = elements.some((el) => el.id === id);
3899
4019
  if (overEl) {
3900
- onChange(
3901
- findDeepestCandidate(position, manager, ownerDocument),
3902
- manager
3903
- );
4020
+ onChange(findDeepestCandidate(position, manager), manager);
3904
4021
  }
3905
4022
  };
3906
4023
  const handleMoveThrottled = throttle(handleMove, 50);
@@ -4590,13 +4707,13 @@ function patchWindow(window2) {
4590
4707
 
4591
4708
  // components/DragDropContext/index.tsx
4592
4709
  import { createStore as createStore3 } from "zustand";
4593
- import { jsx as jsx22 } from "react/jsx-runtime";
4710
+ import { jsx as jsx23 } from "react/jsx-runtime";
4594
4711
  var DEBUG3 = false;
4595
- var dragListenerContext = createContext3({
4712
+ var dragListenerContext = createContext4({
4596
4713
  dragListeners: {}
4597
4714
  });
4598
4715
  function useDragListener(type, fn, deps = []) {
4599
- const { setDragListeners } = useContext5(dragListenerContext);
4716
+ const { setDragListeners } = useContext7(dragListenerContext);
4600
4717
  useEffect15(() => {
4601
4718
  if (setDragListeners) {
4602
4719
  setDragListeners((old) => __spreadProps(__spreadValues({}, old), {
@@ -4607,7 +4724,7 @@ function useDragListener(type, fn, deps = []) {
4607
4724
  }
4608
4725
  var AREA_CHANGE_DEBOUNCE_MS = 100;
4609
4726
  var useTempDisableFallback = (timeout3) => {
4610
- const lastFallbackDisable = useRef5(null);
4727
+ const lastFallbackDisable = useRef4(null);
4611
4728
  return useCallback11((manager) => {
4612
4729
  collisionStore.setState({ fallbackEnabled: false });
4613
4730
  const fallbackId = generateId();
@@ -4627,7 +4744,7 @@ var DragDropContextClient = ({
4627
4744
  const { state, config, dispatch, resolveData } = useAppContext();
4628
4745
  const id = useId();
4629
4746
  const { data } = state;
4630
- const debouncedParamsRef = useRef5(null);
4747
+ const debouncedParamsRef = useRef4(null);
4631
4748
  const tempDisableFallback = useTempDisableFallback(100);
4632
4749
  const [zoneStore] = useState17(
4633
4750
  () => createStore3(() => ({
@@ -4766,7 +4883,7 @@ var DragDropContextClient = ({
4766
4883
  ]);
4767
4884
  const [dragListeners, setDragListeners] = useState17({});
4768
4885
  const [pathData, setPathData] = useState17();
4769
- const dragMode = useRef5(null);
4886
+ const dragMode = useRef4(null);
4770
4887
  const registerPath = useCallback11(
4771
4888
  (selector) => {
4772
4889
  const item = getItem(selector, data);
@@ -4789,15 +4906,15 @@ var DragDropContextClient = ({
4789
4906
  },
4790
4907
  [data, setPathData]
4791
4908
  );
4792
- const initialSelector = useRef5(void 0);
4793
- return /* @__PURE__ */ jsx22("div", { id, children: /* @__PURE__ */ jsx22(
4909
+ const initialSelector = useRef4(void 0);
4910
+ return /* @__PURE__ */ jsx23("div", { id, children: /* @__PURE__ */ jsx23(
4794
4911
  dragListenerContext.Provider,
4795
4912
  {
4796
4913
  value: {
4797
4914
  dragListeners,
4798
4915
  setDragListeners
4799
4916
  },
4800
- children: /* @__PURE__ */ jsx22(
4917
+ children: /* @__PURE__ */ jsx23(
4801
4918
  DragDropProvider2,
4802
4919
  {
4803
4920
  plugins,
@@ -4975,7 +5092,7 @@ var DragDropContextClient = ({
4975
5092
  initialSelector.current = void 0;
4976
5093
  zoneStore.setState({ draggedItem: event.operation.source });
4977
5094
  },
4978
- children: /* @__PURE__ */ jsx22(ZoneStoreProvider, { store: zoneStore, children: /* @__PURE__ */ jsx22(
5095
+ children: /* @__PURE__ */ jsx23(ZoneStoreProvider, { store: zoneStore, children: /* @__PURE__ */ jsx23(
4979
5096
  DropZoneProvider,
4980
5097
  {
4981
5098
  value: {
@@ -5004,11 +5121,11 @@ var DragDropContext = ({
5004
5121
  if (status === "LOADING") {
5005
5122
  return children;
5006
5123
  }
5007
- return /* @__PURE__ */ jsx22(DragDropContextClient, { disableAutoScroll, children });
5124
+ return /* @__PURE__ */ jsx23(DragDropContextClient, { disableAutoScroll, children });
5008
5125
  };
5009
5126
 
5010
5127
  // components/Drawer/index.tsx
5011
- import { jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
5128
+ import { jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
5012
5129
  var getClassName18 = get_class_name_factory_default("Drawer", styles_module_default10);
5013
5130
  var getClassNameItem2 = get_class_name_factory_default("DrawerItem", styles_module_default10);
5014
5131
  var DrawerItemInner = ({
@@ -5018,11 +5135,11 @@ var DrawerItemInner = ({
5018
5135
  dragRef,
5019
5136
  isDragDisabled
5020
5137
  }) => {
5021
- const CustomInner = useMemo8(
5022
- () => children || (({ children: children2 }) => /* @__PURE__ */ jsx23("div", { className: getClassNameItem2("default"), children: children2 })),
5138
+ const CustomInner = useMemo9(
5139
+ () => children || (({ children: children2 }) => /* @__PURE__ */ jsx24("div", { className: getClassNameItem2("default"), children: children2 })),
5023
5140
  [children]
5024
5141
  );
5025
- return /* @__PURE__ */ jsx23(
5142
+ return /* @__PURE__ */ jsx24(
5026
5143
  "div",
5027
5144
  {
5028
5145
  className: getClassNameItem2({ disabled: isDragDisabled }),
@@ -5030,9 +5147,9 @@ var DrawerItemInner = ({
5030
5147
  onMouseDown: (e) => e.preventDefault(),
5031
5148
  "data-testid": dragRef ? `drawer-item:${name}` : "",
5032
5149
  "data-puck-drawer-item": true,
5033
- children: /* @__PURE__ */ jsx23(CustomInner, { name, children: /* @__PURE__ */ jsx23("div", { className: getClassNameItem2("draggableWrapper"), children: /* @__PURE__ */ jsxs11("div", { className: getClassNameItem2("draggable"), children: [
5034
- /* @__PURE__ */ jsx23("div", { className: getClassNameItem2("name"), children: label != null ? label : name }),
5035
- /* @__PURE__ */ jsx23("div", { className: getClassNameItem2("icon"), children: /* @__PURE__ */ jsx23(DragIcon, {}) })
5150
+ children: /* @__PURE__ */ jsx24(CustomInner, { name, children: /* @__PURE__ */ jsx24("div", { className: getClassNameItem2("draggableWrapper"), children: /* @__PURE__ */ jsxs11("div", { className: getClassNameItem2("draggable"), children: [
5151
+ /* @__PURE__ */ jsx24("div", { className: getClassNameItem2("name"), children: label != null ? label : name }),
5152
+ /* @__PURE__ */ jsx24("div", { className: getClassNameItem2("icon"), children: /* @__PURE__ */ jsx24(DragIcon, {}) })
5036
5153
  ] }) }) })
5037
5154
  }
5038
5155
  );
@@ -5050,8 +5167,8 @@ var DrawerItemDraggable = ({
5050
5167
  disabled: isDragDisabled
5051
5168
  });
5052
5169
  return /* @__PURE__ */ jsxs11("div", { className: getClassName18("draggable"), children: [
5053
- /* @__PURE__ */ jsx23("div", { className: getClassName18("draggableBg"), children: /* @__PURE__ */ jsx23(DrawerItemInner, { name, label, children }) }),
5054
- /* @__PURE__ */ jsx23("div", { className: getClassName18("draggableFg"), children: /* @__PURE__ */ jsx23(
5170
+ /* @__PURE__ */ jsx24("div", { className: getClassName18("draggableBg"), children: /* @__PURE__ */ jsx24(DrawerItemInner, { name, label, children }) }),
5171
+ /* @__PURE__ */ jsx24("div", { className: getClassName18("draggableFg"), children: /* @__PURE__ */ jsx24(
5055
5172
  DrawerItemInner,
5056
5173
  {
5057
5174
  name,
@@ -5085,7 +5202,7 @@ var DrawerItem = ({
5085
5202
  },
5086
5203
  [resolvedId]
5087
5204
  );
5088
- return /* @__PURE__ */ jsx23("div", { children: /* @__PURE__ */ jsx23(
5205
+ return /* @__PURE__ */ jsx24("div", { children: /* @__PURE__ */ jsx24(
5089
5206
  DrawerItemDraggable,
5090
5207
  {
5091
5208
  name,
@@ -5111,14 +5228,14 @@ var Drawer = ({
5111
5228
  "Warning: The `direction` prop on Drawer is deprecated and no longer required to achieve multi-directional dragging."
5112
5229
  );
5113
5230
  }
5114
- const [id] = useState18(generateId());
5231
+ const id = useId2();
5115
5232
  const { ref } = useDroppableSafe({
5116
5233
  id,
5117
5234
  type: "void",
5118
5235
  collisionPriority: 0
5119
5236
  // Never collide with this, but we use it so NestedDroppablePlugin respects the Drawer
5120
5237
  });
5121
- return /* @__PURE__ */ jsx23(
5238
+ return /* @__PURE__ */ jsx24(
5122
5239
  "div",
5123
5240
  {
5124
5241
  className: getClassName18(),
@@ -5136,7 +5253,7 @@ init_react_import();
5136
5253
  import {
5137
5254
  useCallback as useCallback17,
5138
5255
  useEffect as useEffect23,
5139
- useMemo as useMemo17,
5256
+ useMemo as useMemo18,
5140
5257
  useReducer,
5141
5258
  useState as useState26
5142
5259
  } from "react";
@@ -5150,7 +5267,7 @@ var styles_module_default13 = { "SidebarSection": "_SidebarSection_125qe_1", "Si
5150
5267
 
5151
5268
  // lib/use-breadcrumbs.ts
5152
5269
  init_react_import();
5153
- import { useContext as useContext6, useMemo as useMemo9 } from "react";
5270
+ import { useContext as useContext8, useMemo as useMemo10 } from "react";
5154
5271
  var convertPathDataToBreadcrumbs = (selectedItem, pathData, data) => {
5155
5272
  const id = selectedItem ? selectedItem == null ? void 0 : selectedItem.props.id : "";
5156
5273
  const currentPathData = pathData && id && pathData[id] ? __spreadValues({}, pathData[id]) : { label: "Page", path: [] };
@@ -5200,8 +5317,8 @@ var useBreadcrumbs = (renderCount) => {
5200
5317
  state: { data },
5201
5318
  selectedItem
5202
5319
  } = useAppContext();
5203
- const dzContext = useContext6(dropZoneContext);
5204
- return useMemo9(() => {
5320
+ const dzContext = useContext8(dropZoneContext);
5321
+ return useMemo10(() => {
5205
5322
  const breadcrumbs = convertPathDataToBreadcrumbs(
5206
5323
  selectedItem,
5207
5324
  dzContext == null ? void 0 : dzContext.pathData,
@@ -5215,7 +5332,7 @@ var useBreadcrumbs = (renderCount) => {
5215
5332
  };
5216
5333
 
5217
5334
  // components/SidebarSection/index.tsx
5218
- import { jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
5335
+ import { jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
5219
5336
  var getClassName19 = get_class_name_factory_default("SidebarSection", styles_module_default13);
5220
5337
  var SidebarSection = ({
5221
5338
  children,
@@ -5234,9 +5351,9 @@ var SidebarSection = ({
5234
5351
  className: getClassName19({ noBorderTop, noPadding }),
5235
5352
  style: { background },
5236
5353
  children: [
5237
- /* @__PURE__ */ jsx24("div", { className: getClassName19("title"), children: /* @__PURE__ */ jsxs12("div", { className: getClassName19("breadcrumbs"), children: [
5354
+ /* @__PURE__ */ jsx25("div", { className: getClassName19("title"), children: /* @__PURE__ */ jsxs12("div", { className: getClassName19("breadcrumbs"), children: [
5238
5355
  showBreadcrumbs ? breadcrumbs.map((breadcrumb, i) => /* @__PURE__ */ jsxs12("div", { className: getClassName19("breadcrumb"), children: [
5239
- /* @__PURE__ */ jsx24(
5356
+ /* @__PURE__ */ jsx25(
5240
5357
  "button",
5241
5358
  {
5242
5359
  type: "button",
@@ -5245,12 +5362,12 @@ var SidebarSection = ({
5245
5362
  children: breadcrumb.label
5246
5363
  }
5247
5364
  ),
5248
- /* @__PURE__ */ jsx24(ChevronRight, { size: 16 })
5365
+ /* @__PURE__ */ jsx25(ChevronRight, { size: 16 })
5249
5366
  ] }, i)) : null,
5250
- /* @__PURE__ */ jsx24("div", { className: getClassName19("heading"), children: /* @__PURE__ */ jsx24(Heading, { rank: "2", size: "xs", children: title }) })
5367
+ /* @__PURE__ */ jsx25("div", { className: getClassName19("heading"), children: /* @__PURE__ */ jsx25(Heading, { rank: "2", size: "xs", children: title }) })
5251
5368
  ] }) }),
5252
- /* @__PURE__ */ jsx24("div", { className: getClassName19("content"), children }),
5253
- isLoading && /* @__PURE__ */ jsx24("div", { className: getClassName19("loadingOverlay"), children: /* @__PURE__ */ jsx24(Loader, { size: 32 }) })
5369
+ /* @__PURE__ */ jsx25("div", { className: getClassName19("content"), children }),
5370
+ isLoading && /* @__PURE__ */ jsx25("div", { className: getClassName19("loadingOverlay"), children: /* @__PURE__ */ jsx25(Loader, { size: 32 }) })
5254
5371
  ]
5255
5372
  }
5256
5373
  );
@@ -5281,7 +5398,7 @@ init_react_import();
5281
5398
  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" };
5282
5399
 
5283
5400
  // components/MenuBar/index.tsx
5284
- import { Fragment as Fragment7, jsx as jsx25, jsxs as jsxs13 } from "react/jsx-runtime";
5401
+ import { Fragment as Fragment7, jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
5285
5402
  var getClassName20 = get_class_name_factory_default("MenuBar", styles_module_default14);
5286
5403
  function MenuBar({
5287
5404
  appState,
@@ -5295,7 +5412,7 @@ function MenuBar({
5295
5412
  history: { back, forward, historyStore }
5296
5413
  } = useAppContext();
5297
5414
  const { hasFuture = false, hasPast = false } = historyStore || {};
5298
- return /* @__PURE__ */ jsx25(
5415
+ return /* @__PURE__ */ jsx26(
5299
5416
  "div",
5300
5417
  {
5301
5418
  className: getClassName20({ menuOpen }),
@@ -5311,10 +5428,10 @@ function MenuBar({
5311
5428
  },
5312
5429
  children: /* @__PURE__ */ jsxs13("div", { className: getClassName20("inner"), children: [
5313
5430
  /* @__PURE__ */ jsxs13("div", { className: getClassName20("history"), children: [
5314
- /* @__PURE__ */ jsx25(IconButton, { title: "undo", disabled: !hasPast, onClick: back, children: /* @__PURE__ */ jsx25(Undo2, { size: 21 }) }),
5315
- /* @__PURE__ */ jsx25(IconButton, { title: "redo", disabled: !hasFuture, onClick: forward, children: /* @__PURE__ */ jsx25(Redo2, { size: 21 }) })
5431
+ /* @__PURE__ */ jsx26(IconButton, { title: "undo", disabled: !hasPast, onClick: back, children: /* @__PURE__ */ jsx26(Undo2, { size: 21 }) }),
5432
+ /* @__PURE__ */ jsx26(IconButton, { title: "redo", disabled: !hasFuture, onClick: forward, children: /* @__PURE__ */ jsx26(Redo2, { size: 21 }) })
5316
5433
  ] }),
5317
- /* @__PURE__ */ jsx25(Fragment7, { children: renderHeaderActions && renderHeaderActions({
5434
+ /* @__PURE__ */ jsx26(Fragment7, { children: renderHeaderActions && renderHeaderActions({
5318
5435
  state: appState,
5319
5436
  dispatch
5320
5437
  }) })
@@ -5335,15 +5452,15 @@ init_react_import();
5335
5452
  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" };
5336
5453
 
5337
5454
  // components/Puck/components/Fields/index.tsx
5338
- import { useCallback as useCallback12, useEffect as useEffect16, useMemo as useMemo10, useState as useState19 } from "react";
5455
+ import { useCallback as useCallback12, useEffect as useEffect16, useMemo as useMemo11, useState as useState19 } from "react";
5339
5456
 
5340
5457
  // lib/use-parent.ts
5341
5458
  init_react_import();
5342
- import { useContext as useContext7 } from "react";
5459
+ import { useContext as useContext9 } from "react";
5343
5460
  var useParent = (itemSelector) => {
5344
5461
  var _a;
5345
5462
  const { selectedItem, state } = useAppContext();
5346
- const { pathData } = useContext7(dropZoneContext) || {};
5463
+ const { pathData } = useContext9(dropZoneContext) || {};
5347
5464
  const item = itemSelector ? getItem(itemSelector, state.data) : selectedItem;
5348
5465
  const breadcrumbs = convertPathDataToBreadcrumbs(item, pathData, state.data);
5349
5466
  const lastItem = breadcrumbs[breadcrumbs.length - 1];
@@ -5352,7 +5469,7 @@ var useParent = (itemSelector) => {
5352
5469
  };
5353
5470
 
5354
5471
  // components/Puck/components/Fields/index.tsx
5355
- import { Fragment as Fragment8, jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
5472
+ import { Fragment as Fragment8, jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
5356
5473
  var getClassName21 = get_class_name_factory_default("PuckFields", styles_module_default16);
5357
5474
  var defaultPageFields = {
5358
5475
  title: { type: "text" }
@@ -5360,7 +5477,7 @@ var defaultPageFields = {
5360
5477
  var DefaultFields = ({
5361
5478
  children
5362
5479
  }) => {
5363
- return /* @__PURE__ */ jsx26(Fragment8, { children });
5480
+ return /* @__PURE__ */ jsx27(Fragment8, { children });
5364
5481
  };
5365
5482
  var useResolvedFields = () => {
5366
5483
  var _a, _b;
@@ -5369,7 +5486,7 @@ var useResolvedFields = () => {
5369
5486
  const { data } = state;
5370
5487
  const rootFields = ((_a = config.root) == null ? void 0 : _a.fields) || defaultPageFields;
5371
5488
  const componentConfig = selectedItem ? config.components[selectedItem.type] : null;
5372
- const defaultFields = useMemo10(
5489
+ const defaultFields = useMemo11(
5373
5490
  () => (selectedItem ? componentConfig == null ? void 0 : componentConfig.fields : rootFields) || {},
5374
5491
  [selectedItem, rootFields, componentConfig == null ? void 0 : componentConfig.fields]
5375
5492
  );
@@ -5418,19 +5535,33 @@ var useResolvedFields = () => {
5418
5535
  lastData
5419
5536
  });
5420
5537
  }),
5421
- [data, config, componentData, selectedItem, resolvedFields, state]
5538
+ [data, config, componentData, selectedItem, resolvedFields, state, parent]
5422
5539
  );
5540
+ const [hasParent, setHasParent] = useState19(false);
5423
5541
  useEffect16(() => {
5424
- if (hasResolver) {
5425
- setFieldsLoading(true);
5426
- resolveFields(defaultFields).then((fields) => {
5427
- setResolvedFields(fields || {});
5428
- setFieldsLoading(false);
5429
- });
5430
- } else {
5431
- setResolvedFields(defaultFields);
5542
+ setHasParent(!!parent);
5543
+ }, [parent]);
5544
+ useEffect16(() => {
5545
+ var _a2;
5546
+ if (!((_a2 = state.ui.itemSelector) == null ? void 0 : _a2.zone) || hasParent) {
5547
+ if (hasResolver) {
5548
+ setFieldsLoading(true);
5549
+ resolveFields(defaultFields).then((fields) => {
5550
+ setResolvedFields(fields || {});
5551
+ setFieldsLoading(false);
5552
+ });
5553
+ } else {
5554
+ setResolvedFields(defaultFields);
5555
+ }
5432
5556
  }
5433
- }, [data, defaultFields, selectedItem, hasResolver]);
5557
+ }, [
5558
+ data,
5559
+ defaultFields,
5560
+ state.ui.itemSelector,
5561
+ selectedItem,
5562
+ hasResolver,
5563
+ hasParent
5564
+ ]);
5434
5565
  return [resolvedFields, fieldsLoading];
5435
5566
  };
5436
5567
  var Fields = () => {
@@ -5451,7 +5582,7 @@ var Fields = () => {
5451
5582
  const componentResolving = selectedItem ? ((_a = componentState[selectedItem == null ? void 0 : selectedItem.props.id]) == null ? void 0 : _a.loadingCount) > 0 : ((_b = componentState["puck-root"]) == null ? void 0 : _b.loadingCount) > 0;
5452
5583
  const isLoading = fieldsResolving || componentResolving;
5453
5584
  const rootProps = data.root.props || data.root;
5454
- const Wrapper = useMemo10(() => overrides.fields || DefaultFields, [overrides]);
5585
+ const Wrapper = useMemo11(() => overrides.fields || DefaultFields, [overrides]);
5455
5586
  return /* @__PURE__ */ jsxs14(
5456
5587
  "form",
5457
5588
  {
@@ -5460,7 +5591,7 @@ var Fields = () => {
5460
5591
  e.preventDefault();
5461
5592
  },
5462
5593
  children: [
5463
- /* @__PURE__ */ jsx26(Wrapper, { isLoading, itemSelector, children: Object.keys(fields).map((fieldName) => {
5594
+ /* @__PURE__ */ jsx27(Wrapper, { isLoading, itemSelector, children: Object.keys(fields).map((fieldName) => {
5464
5595
  const field = fields[fieldName];
5465
5596
  if (!(field == null ? void 0 : field.type)) return null;
5466
5597
  const onChange = (value, updatedUi) => {
@@ -5531,7 +5662,7 @@ var Fields = () => {
5531
5662
  item: selectedItem
5532
5663
  });
5533
5664
  const id = `${selectedItem.props.id}_${field.type}_${fieldName}`;
5534
- return /* @__PURE__ */ jsx26(
5665
+ return /* @__PURE__ */ jsx27(
5535
5666
  AutoFieldPrivate,
5536
5667
  {
5537
5668
  field,
@@ -5549,7 +5680,7 @@ var Fields = () => {
5549
5680
  root: true
5550
5681
  });
5551
5682
  const id = `root_${field.type}_${fieldName}`;
5552
- return /* @__PURE__ */ jsx26(
5683
+ return /* @__PURE__ */ jsx27(
5553
5684
  AutoFieldPrivate,
5554
5685
  {
5555
5686
  field,
@@ -5563,7 +5694,7 @@ var Fields = () => {
5563
5694
  );
5564
5695
  }
5565
5696
  }) }),
5566
- isLoading && /* @__PURE__ */ jsx26("div", { className: getClassName21("loadingOverlay"), children: /* @__PURE__ */ jsx26("div", { className: getClassName21("loadingOverlayInner"), children: /* @__PURE__ */ jsx26(Loader, { size: 16 }) }) })
5697
+ isLoading && /* @__PURE__ */ jsx27("div", { className: getClassName21("loadingOverlay"), children: /* @__PURE__ */ jsx27("div", { className: getClassName21("loadingOverlayInner"), children: /* @__PURE__ */ jsx27(Loader, { size: 16 }) }) })
5567
5698
  ]
5568
5699
  }
5569
5700
  );
@@ -5584,7 +5715,7 @@ init_react_import();
5584
5715
  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" };
5585
5716
 
5586
5717
  // components/ComponentList/index.tsx
5587
- import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
5718
+ import { jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
5588
5719
  var getClassName22 = get_class_name_factory_default("ComponentList", styles_module_default17);
5589
5720
  var ComponentListItem = ({
5590
5721
  name,
@@ -5594,7 +5725,7 @@ var ComponentListItem = ({
5594
5725
  const canInsert = getPermissions({
5595
5726
  type: name
5596
5727
  }).insert;
5597
- return /* @__PURE__ */ jsx27(Drawer.Item, { label, name, isDragDisabled: !canInsert, children: overrides.componentItem });
5728
+ return /* @__PURE__ */ jsx28(Drawer.Item, { label, name, isDragDisabled: !canInsert, children: overrides.componentItem });
5598
5729
  };
5599
5730
  var ComponentList = ({
5600
5731
  children,
@@ -5618,14 +5749,14 @@ var ComponentList = ({
5618
5749
  }),
5619
5750
  title: expanded ? `Collapse${title ? ` ${title}` : ""}` : `Expand${title ? ` ${title}` : ""}`,
5620
5751
  children: [
5621
- /* @__PURE__ */ jsx27("div", { children: title }),
5622
- /* @__PURE__ */ jsx27("div", { className: getClassName22("titleIcon"), children: expanded ? /* @__PURE__ */ jsx27(ChevronUp, { size: 12 }) : /* @__PURE__ */ jsx27(ChevronDown, { size: 12 }) })
5752
+ /* @__PURE__ */ jsx28("div", { children: title }),
5753
+ /* @__PURE__ */ jsx28("div", { className: getClassName22("titleIcon"), children: expanded ? /* @__PURE__ */ jsx28(ChevronUp, { size: 12 }) : /* @__PURE__ */ jsx28(ChevronDown, { size: 12 }) })
5623
5754
  ]
5624
5755
  }
5625
5756
  ),
5626
- /* @__PURE__ */ jsx27("div", { className: getClassName22("content"), children: /* @__PURE__ */ jsx27(Drawer, { children: children || Object.keys(config.components).map((componentKey) => {
5757
+ /* @__PURE__ */ jsx28("div", { className: getClassName22("content"), children: /* @__PURE__ */ jsx28(Drawer, { children: children || Object.keys(config.components).map((componentKey) => {
5627
5758
  var _a;
5628
- return /* @__PURE__ */ jsx27(
5759
+ return /* @__PURE__ */ jsx28(
5629
5760
  ComponentListItem,
5630
5761
  {
5631
5762
  label: (_a = config.components[componentKey]["label"]) != null ? _a : componentKey,
@@ -5639,7 +5770,7 @@ var ComponentList = ({
5639
5770
  ComponentList.Item = ComponentListItem;
5640
5771
 
5641
5772
  // lib/use-component-list.tsx
5642
- import { jsx as jsx28 } from "react/jsx-runtime";
5773
+ import { jsx as jsx29 } from "react/jsx-runtime";
5643
5774
  var useComponentList = (config, ui) => {
5644
5775
  const [componentList, setComponentList] = useState20();
5645
5776
  useEffect17(() => {
@@ -5652,7 +5783,7 @@ var useComponentList = (config, ui) => {
5652
5783
  if (category.visible === false || !category.components) {
5653
5784
  return null;
5654
5785
  }
5655
- return /* @__PURE__ */ jsx28(
5786
+ return /* @__PURE__ */ jsx29(
5656
5787
  ComponentList,
5657
5788
  {
5658
5789
  id: categoryKey,
@@ -5661,7 +5792,7 @@ var useComponentList = (config, ui) => {
5661
5792
  var _a2;
5662
5793
  matchedComponents.push(componentName);
5663
5794
  const componentConf = config.components[componentName] || {};
5664
- return /* @__PURE__ */ jsx28(
5795
+ return /* @__PURE__ */ jsx29(
5665
5796
  ComponentList.Item,
5666
5797
  {
5667
5798
  label: (_a2 = componentConf["label"]) != null ? _a2 : componentName,
@@ -5681,7 +5812,7 @@ var useComponentList = (config, ui) => {
5681
5812
  );
5682
5813
  if (remainingComponents.length > 0 && !((_a = ui.componentList.other) == null ? void 0 : _a.components) && ((_b = ui.componentList.other) == null ? void 0 : _b.visible) !== false) {
5683
5814
  _componentList.push(
5684
- /* @__PURE__ */ jsx28(
5815
+ /* @__PURE__ */ jsx29(
5685
5816
  ComponentList,
5686
5817
  {
5687
5818
  id: "other",
@@ -5689,7 +5820,7 @@ var useComponentList = (config, ui) => {
5689
5820
  children: remainingComponents.map((componentName, i) => {
5690
5821
  var _a2;
5691
5822
  const componentConf = config.components[componentName] || {};
5692
- return /* @__PURE__ */ jsx28(
5823
+ return /* @__PURE__ */ jsx29(
5693
5824
  ComponentList.Item,
5694
5825
  {
5695
5826
  name: componentName,
@@ -5711,30 +5842,30 @@ var useComponentList = (config, ui) => {
5711
5842
  };
5712
5843
 
5713
5844
  // components/Puck/components/Components/index.tsx
5714
- import { useMemo as useMemo11 } from "react";
5715
- import { jsx as jsx29 } from "react/jsx-runtime";
5845
+ import { useMemo as useMemo12 } from "react";
5846
+ import { jsx as jsx30 } from "react/jsx-runtime";
5716
5847
  var Components = () => {
5717
5848
  const { config, state, overrides } = useAppContext();
5718
5849
  const componentList = useComponentList(config, state.ui);
5719
- const Wrapper = useMemo11(() => overrides.components || "div", [overrides]);
5720
- return /* @__PURE__ */ jsx29(Wrapper, { children: componentList ? componentList : /* @__PURE__ */ jsx29(ComponentList, { id: "all" }) });
5850
+ const Wrapper = useMemo12(() => overrides.components || "div", [overrides]);
5851
+ return /* @__PURE__ */ jsx30(Wrapper, { children: componentList ? componentList : /* @__PURE__ */ jsx30(ComponentList, { id: "all" }) });
5721
5852
  };
5722
5853
 
5723
5854
  // components/Puck/components/Preview/index.tsx
5724
5855
  init_react_import();
5725
- import { useCallback as useCallback13, useEffect as useEffect19, useRef as useRef7, useMemo as useMemo12 } from "react";
5856
+ import { useCallback as useCallback13, useEffect as useEffect19, useRef as useRef6, useMemo as useMemo13 } from "react";
5726
5857
 
5727
5858
  // components/AutoFrame/index.tsx
5728
5859
  init_react_import();
5729
5860
  import {
5730
- createContext as createContext4,
5731
- useContext as useContext8,
5861
+ createContext as createContext5,
5862
+ useContext as useContext10,
5732
5863
  useEffect as useEffect18,
5733
5864
  useState as useState21
5734
5865
  } from "react";
5735
5866
  import hash from "object-hash";
5736
5867
  import { createPortal as createPortal3 } from "react-dom";
5737
- import { Fragment as Fragment9, jsx as jsx30 } from "react/jsx-runtime";
5868
+ import { Fragment as Fragment9, jsx as jsx31 } from "react/jsx-runtime";
5738
5869
  var styleSelector = 'style, link[rel="stylesheet"]';
5739
5870
  var collectStyles = (doc) => {
5740
5871
  const collected = [];
@@ -5934,10 +6065,10 @@ var CopyHostStyles = ({
5934
6065
  observer.disconnect();
5935
6066
  };
5936
6067
  }, []);
5937
- return /* @__PURE__ */ jsx30(Fragment9, { children });
6068
+ return /* @__PURE__ */ jsx31(Fragment9, { children });
5938
6069
  };
5939
- var autoFrameContext = createContext4({});
5940
- var useFrame = () => useContext8(autoFrameContext);
6070
+ var autoFrameContext = createContext5({});
6071
+ var useFrame = () => useContext10(autoFrameContext);
5941
6072
  function AutoFrame(_a) {
5942
6073
  var _b = _a, {
5943
6074
  children,
@@ -5969,7 +6100,7 @@ function AutoFrame(_a) {
5969
6100
  );
5970
6101
  }
5971
6102
  }, [frameRef, loaded]);
5972
- return /* @__PURE__ */ jsx30(
6103
+ return /* @__PURE__ */ jsx31(
5973
6104
  "iframe",
5974
6105
  __spreadProps(__spreadValues({}, props), {
5975
6106
  className,
@@ -5979,7 +6110,7 @@ function AutoFrame(_a) {
5979
6110
  onLoad: () => {
5980
6111
  setLoaded(true);
5981
6112
  },
5982
- children: /* @__PURE__ */ jsx30(autoFrameContext.Provider, { value: ctx, children: loaded && mountTarget && /* @__PURE__ */ jsx30(CopyHostStyles, { debug, onStylesLoaded, children: createPortal3(children, mountTarget) }) })
6113
+ children: /* @__PURE__ */ jsx31(autoFrameContext.Provider, { value: ctx, children: loaded && mountTarget && /* @__PURE__ */ jsx31(CopyHostStyles, { debug, onStylesLoaded, children: createPortal3(children, mountTarget) }) })
5983
6114
  })
5984
6115
  );
5985
6116
  }
@@ -5992,7 +6123,7 @@ var styles_module_default18 = { "PuckPreview": "_PuckPreview_z2rgu_1", "PuckPrev
5992
6123
 
5993
6124
  // components/Render/index.tsx
5994
6125
  init_react_import();
5995
- import { jsx as jsx31 } from "react/jsx-runtime";
6126
+ import { jsx as jsx32 } from "react/jsx-runtime";
5996
6127
  function Render({
5997
6128
  config,
5998
6129
  data
@@ -6005,7 +6136,7 @@ function Render({
6005
6136
  const rootProps = defaultedData.root.props || defaultedData.root;
6006
6137
  const title = (rootProps == null ? void 0 : rootProps.title) || "";
6007
6138
  if ((_a = config.root) == null ? void 0 : _a.render) {
6008
- return /* @__PURE__ */ jsx31(
6139
+ return /* @__PURE__ */ jsx32(
6009
6140
  DropZoneProvider,
6010
6141
  {
6011
6142
  value: {
@@ -6015,7 +6146,7 @@ function Render({
6015
6146
  depth: 0,
6016
6147
  path: []
6017
6148
  },
6018
- children: /* @__PURE__ */ jsx31(
6149
+ children: /* @__PURE__ */ jsx32(
6019
6150
  config.root.render,
6020
6151
  __spreadProps(__spreadValues({}, rootProps), {
6021
6152
  puck: {
@@ -6025,13 +6156,13 @@ function Render({
6025
6156
  title,
6026
6157
  editMode: false,
6027
6158
  id: "puck-root",
6028
- children: /* @__PURE__ */ jsx31(DropZone, { zone: rootDroppableId })
6159
+ children: /* @__PURE__ */ jsx32(DropZone, { zone: rootDroppableId })
6029
6160
  })
6030
6161
  )
6031
6162
  }
6032
6163
  );
6033
6164
  }
6034
- return /* @__PURE__ */ jsx31(
6165
+ return /* @__PURE__ */ jsx32(
6035
6166
  DropZoneProvider,
6036
6167
  {
6037
6168
  value: {
@@ -6041,13 +6172,13 @@ function Render({
6041
6172
  depth: 0,
6042
6173
  path: []
6043
6174
  },
6044
- children: /* @__PURE__ */ jsx31(DropZone, { zone: rootDroppableId })
6175
+ children: /* @__PURE__ */ jsx32(DropZone, { zone: rootDroppableId })
6045
6176
  }
6046
6177
  );
6047
6178
  }
6048
6179
 
6049
6180
  // components/Puck/components/Preview/index.tsx
6050
- import { Fragment as Fragment10, jsx as jsx32 } from "react/jsx-runtime";
6181
+ import { Fragment as Fragment10, jsx as jsx33 } from "react/jsx-runtime";
6051
6182
  var getClassName23 = get_class_name_factory_default("PuckPreview", styles_module_default18);
6052
6183
  var useBubbleIframeEvents = (ref) => {
6053
6184
  const { status } = useAppContext();
@@ -6095,15 +6226,15 @@ var Preview2 = ({ id = "puck-preview" }) => {
6095
6226
  var _a, _b;
6096
6227
  return ((_a = config.root) == null ? void 0 : _a.render) ? (_b = config.root) == null ? void 0 : _b.render(__spreadValues({
6097
6228
  id: "puck-root"
6098
- }, pageProps)) : /* @__PURE__ */ jsx32(Fragment10, { children: pageProps.children });
6229
+ }, pageProps)) : /* @__PURE__ */ jsx33(Fragment10, { children: pageProps.children });
6099
6230
  },
6100
6231
  [config.root]
6101
6232
  );
6102
- const Frame = useMemo12(() => overrides.iframe, [overrides]);
6233
+ const Frame = useMemo13(() => overrides.iframe, [overrides]);
6103
6234
  const rootProps = state.data.root.props || state.data.root;
6104
- const ref = useRef7(null);
6235
+ const ref = useRef6(null);
6105
6236
  useBubbleIframeEvents(ref);
6106
- const inner = state.ui.previewMode === "edit" ? /* @__PURE__ */ jsx32(
6237
+ const inner = state.ui.previewMode === "edit" ? /* @__PURE__ */ jsx33(
6107
6238
  Page,
6108
6239
  __spreadProps(__spreadValues({}, rootProps), {
6109
6240
  puck: {
@@ -6112,10 +6243,10 @@ var Preview2 = ({ id = "puck-preview" }) => {
6112
6243
  dragRef: null
6113
6244
  },
6114
6245
  editMode: true,
6115
- children: /* @__PURE__ */ jsx32(DropZone, { zone: rootDroppableId })
6246
+ children: /* @__PURE__ */ jsx33(DropZone, { zone: rootDroppableId })
6116
6247
  })
6117
- ) : /* @__PURE__ */ jsx32(Render, { data: state.data, config });
6118
- return /* @__PURE__ */ jsx32(
6248
+ ) : /* @__PURE__ */ jsx33(Render, { data: state.data, config });
6249
+ return /* @__PURE__ */ jsx33(
6119
6250
  "div",
6120
6251
  {
6121
6252
  className: getClassName23(),
@@ -6124,7 +6255,7 @@ var Preview2 = ({ id = "puck-preview" }) => {
6124
6255
  onClick: () => {
6125
6256
  dispatch({ type: "setUi", ui: __spreadProps(__spreadValues({}, state.ui), { itemSelector: null }) });
6126
6257
  },
6127
- children: iframe.enabled ? /* @__PURE__ */ jsx32(
6258
+ children: iframe.enabled ? /* @__PURE__ */ jsx33(
6128
6259
  AutoFrame_default,
6129
6260
  {
6130
6261
  id: "preview-frame",
@@ -6134,14 +6265,14 @@ var Preview2 = ({ id = "puck-preview" }) => {
6134
6265
  setStatus("READY");
6135
6266
  },
6136
6267
  frameRef: ref,
6137
- children: /* @__PURE__ */ jsx32(autoFrameContext.Consumer, { children: ({ document: document2 }) => {
6268
+ children: /* @__PURE__ */ jsx33(autoFrameContext.Consumer, { children: ({ document: document2 }) => {
6138
6269
  if (Frame) {
6139
- return /* @__PURE__ */ jsx32(Frame, { document: document2, children: inner });
6270
+ return /* @__PURE__ */ jsx33(Frame, { document: document2, children: inner });
6140
6271
  }
6141
6272
  return inner;
6142
6273
  } })
6143
6274
  }
6144
- ) : /* @__PURE__ */ jsx32(
6275
+ ) : /* @__PURE__ */ jsx33(
6145
6276
  "div",
6146
6277
  {
6147
6278
  id: "preview-frame",
@@ -6198,7 +6329,7 @@ var scrollIntoView = (el) => {
6198
6329
  };
6199
6330
 
6200
6331
  // components/LayerTree/index.tsx
6201
- import { useContext as useContext9 } from "react";
6332
+ import { useContext as useContext11 } from "react";
6202
6333
 
6203
6334
  // lib/is-child-of-zone.ts
6204
6335
  init_react_import();
@@ -6231,7 +6362,7 @@ var onScrollEnd = (frame, cb) => {
6231
6362
  };
6232
6363
 
6233
6364
  // components/LayerTree/index.tsx
6234
- import { Fragment as Fragment11, jsx as jsx33, jsxs as jsxs16 } from "react/jsx-runtime";
6365
+ import { Fragment as Fragment11, jsx as jsx34, jsxs as jsxs16 } from "react/jsx-runtime";
6235
6366
  var getClassName24 = get_class_name_factory_default("LayerTree", styles_module_default19);
6236
6367
  var getClassNameLayer = get_class_name_factory_default("Layer", styles_module_default19);
6237
6368
  var LayerTree = ({
@@ -6244,15 +6375,15 @@ var LayerTree = ({
6244
6375
  label
6245
6376
  }) => {
6246
6377
  const zones = data.zones || {};
6247
- const ctx = useContext9(dropZoneContext);
6378
+ const ctx = useContext11(dropZoneContext);
6248
6379
  return /* @__PURE__ */ jsxs16(Fragment11, { children: [
6249
6380
  label && /* @__PURE__ */ jsxs16("div", { className: getClassName24("zoneTitle"), children: [
6250
- /* @__PURE__ */ jsx33("div", { className: getClassName24("zoneIcon"), children: /* @__PURE__ */ jsx33(Layers, { size: "16" }) }),
6381
+ /* @__PURE__ */ jsx34("div", { className: getClassName24("zoneIcon"), children: /* @__PURE__ */ jsx34(Layers, { size: "16" }) }),
6251
6382
  " ",
6252
6383
  label
6253
6384
  ] }),
6254
6385
  /* @__PURE__ */ jsxs16("ul", { className: getClassName24(), children: [
6255
- zoneContent.length === 0 && /* @__PURE__ */ jsx33("div", { className: getClassName24("helper"), children: "No items" }),
6386
+ zoneContent.length === 0 && /* @__PURE__ */ jsx34("div", { className: getClassName24("helper"), children: "No items" }),
6256
6387
  zoneContent.map((item, i) => {
6257
6388
  var _a;
6258
6389
  const isSelected = (itemSelector == null ? void 0 : itemSelector.index) === i && (itemSelector.zone === zone || itemSelector.zone === rootDroppableId && !zone);
@@ -6275,7 +6406,7 @@ var LayerTree = ({
6275
6406
  childIsSelected
6276
6407
  }),
6277
6408
  children: [
6278
- /* @__PURE__ */ jsx33("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */ jsxs16(
6409
+ /* @__PURE__ */ jsx34("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */ jsxs16(
6279
6410
  "button",
6280
6411
  {
6281
6412
  type: "button",
@@ -6314,22 +6445,22 @@ var LayerTree = ({
6314
6445
  setHoveringComponent(null);
6315
6446
  },
6316
6447
  children: [
6317
- containsZone && /* @__PURE__ */ jsx33(
6448
+ containsZone && /* @__PURE__ */ jsx34(
6318
6449
  "div",
6319
6450
  {
6320
6451
  className: getClassNameLayer("chevron"),
6321
6452
  title: isSelected ? "Collapse" : "Expand",
6322
- children: /* @__PURE__ */ jsx33(ChevronDown, { size: "12" })
6453
+ children: /* @__PURE__ */ jsx34(ChevronDown, { size: "12" })
6323
6454
  }
6324
6455
  ),
6325
6456
  /* @__PURE__ */ jsxs16("div", { className: getClassNameLayer("title"), children: [
6326
- /* @__PURE__ */ jsx33("div", { className: getClassNameLayer("icon"), children: item.type === "Text" || item.type === "Heading" ? /* @__PURE__ */ jsx33(Type, { size: "16" }) : /* @__PURE__ */ jsx33(LayoutGrid, { size: "16" }) }),
6327
- /* @__PURE__ */ jsx33("div", { className: getClassNameLayer("name"), children: label2 })
6457
+ /* @__PURE__ */ jsx34("div", { className: getClassNameLayer("icon"), children: item.type === "Text" || item.type === "Heading" ? /* @__PURE__ */ jsx34(Type, { size: "16" }) : /* @__PURE__ */ jsx34(LayoutGrid, { size: "16" }) }),
6458
+ /* @__PURE__ */ jsx34("div", { className: getClassNameLayer("name"), children: label2 })
6328
6459
  ] })
6329
6460
  ]
6330
6461
  }
6331
6462
  ) }),
6332
- containsZone && Object.keys(zonesForItem).map((zoneKey, idx) => /* @__PURE__ */ jsx33("div", { className: getClassNameLayer("zones"), children: /* @__PURE__ */ jsx33(
6463
+ containsZone && Object.keys(zonesForItem).map((zoneKey, idx) => /* @__PURE__ */ jsx34("div", { className: getClassNameLayer("zones"), children: /* @__PURE__ */ jsx34(
6333
6464
  LayerTree,
6334
6465
  {
6335
6466
  config,
@@ -6351,8 +6482,8 @@ var LayerTree = ({
6351
6482
  };
6352
6483
 
6353
6484
  // components/Puck/components/Outline/index.tsx
6354
- import { useCallback as useCallback14, useMemo as useMemo13 } from "react";
6355
- import { Fragment as Fragment12, jsx as jsx34, jsxs as jsxs17 } from "react/jsx-runtime";
6485
+ import { useCallback as useCallback14, useMemo as useMemo14 } from "react";
6486
+ import { Fragment as Fragment12, jsx as jsx35, jsxs as jsxs17 } from "react/jsx-runtime";
6356
6487
  var Outline = () => {
6357
6488
  const { dispatch, state, overrides, config } = useAppContext();
6358
6489
  const { data, ui } = state;
@@ -6366,9 +6497,9 @@ var Outline = () => {
6366
6497
  },
6367
6498
  []
6368
6499
  );
6369
- const Wrapper = useMemo13(() => overrides.outline || "div", [overrides]);
6370
- return /* @__PURE__ */ jsx34(Wrapper, { children: /* @__PURE__ */ jsx34(dropZoneContext.Consumer, { children: (ctx) => /* @__PURE__ */ jsxs17(Fragment12, { children: [
6371
- (ctx == null ? void 0 : ctx.activeZones) && (ctx == null ? void 0 : ctx.activeZones[rootDroppableId]) && /* @__PURE__ */ jsx34(
6500
+ const Wrapper = useMemo14(() => overrides.outline || "div", [overrides]);
6501
+ return /* @__PURE__ */ jsx35(Wrapper, { children: /* @__PURE__ */ jsx35(dropZoneContext.Consumer, { children: (ctx) => /* @__PURE__ */ jsxs17(Fragment12, { children: [
6502
+ (ctx == null ? void 0 : ctx.activeZones) && (ctx == null ? void 0 : ctx.activeZones[rootDroppableId]) && /* @__PURE__ */ jsx35(
6372
6503
  LayerTree,
6373
6504
  {
6374
6505
  config,
@@ -6381,7 +6512,7 @@ var Outline = () => {
6381
6512
  ),
6382
6513
  Object.entries(findZonesForArea(data, "root")).map(
6383
6514
  ([zoneKey, zone]) => {
6384
- return /* @__PURE__ */ jsx34(
6515
+ return /* @__PURE__ */ jsx35(
6385
6516
  LayerTree,
6386
6517
  {
6387
6518
  config,
@@ -6655,25 +6786,25 @@ var getBox = function getBox2(el) {
6655
6786
  import {
6656
6787
  useCallback as useCallback15,
6657
6788
  useEffect as useEffect21,
6658
- useMemo as useMemo15,
6659
- useRef as useRef8,
6789
+ useMemo as useMemo16,
6790
+ useRef as useRef7,
6660
6791
  useState as useState24
6661
6792
  } from "react";
6662
6793
 
6663
6794
  // components/ViewportControls/index.tsx
6664
6795
  init_react_import();
6665
- import { useEffect as useEffect20, useMemo as useMemo14, useState as useState23 } from "react";
6796
+ import { useEffect as useEffect20, useMemo as useMemo15, useState as useState23 } from "react";
6666
6797
 
6667
6798
  // css-module:/home/runner/work/puck/puck/packages/core/components/ViewportControls/styles.module.css#css-module
6668
6799
  init_react_import();
6669
6800
  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" };
6670
6801
 
6671
6802
  // components/ViewportControls/index.tsx
6672
- import { jsx as jsx35, jsxs as jsxs18 } from "react/jsx-runtime";
6803
+ import { jsx as jsx36, jsxs as jsxs18 } from "react/jsx-runtime";
6673
6804
  var icons = {
6674
- Smartphone: /* @__PURE__ */ jsx35(Smartphone, { size: 16 }),
6675
- Tablet: /* @__PURE__ */ jsx35(Tablet, { size: 16 }),
6676
- Monitor: /* @__PURE__ */ jsx35(Monitor, { size: 16 })
6805
+ Smartphone: /* @__PURE__ */ jsx36(Smartphone, { size: 16 }),
6806
+ Tablet: /* @__PURE__ */ jsx36(Tablet, { size: 16 }),
6807
+ Monitor: /* @__PURE__ */ jsx36(Monitor, { size: 16 })
6677
6808
  };
6678
6809
  var getClassName25 = get_class_name_factory_default("ViewportControls", styles_module_default20);
6679
6810
  var getClassNameButton = get_class_name_factory_default("ViewportButton", styles_module_default20);
@@ -6689,7 +6820,7 @@ var ViewportButton = ({
6689
6820
  useEffect20(() => {
6690
6821
  setIsActive(width === state.ui.viewports.current.width);
6691
6822
  }, [width, state.ui.viewports.current.width]);
6692
- return /* @__PURE__ */ jsx35("span", { className: getClassNameButton({ isActive }), children: /* @__PURE__ */ jsx35(
6823
+ return /* @__PURE__ */ jsx36("span", { className: getClassNameButton({ isActive }), children: /* @__PURE__ */ jsx36(
6693
6824
  IconButton,
6694
6825
  {
6695
6826
  title,
@@ -6698,7 +6829,7 @@ var ViewportButton = ({
6698
6829
  e.stopPropagation();
6699
6830
  onClick({ width, height });
6700
6831
  },
6701
- children: /* @__PURE__ */ jsx35("span", { className: getClassNameButton("inner"), children })
6832
+ children: /* @__PURE__ */ jsx36("span", { className: getClassNameButton("inner"), children })
6702
6833
  }
6703
6834
  ) });
6704
6835
  };
@@ -6722,7 +6853,7 @@ var ViewportControls = ({
6722
6853
  const defaultsContainAutoZoom = defaultZoomOptions.find(
6723
6854
  (option) => option.value === autoZoom
6724
6855
  );
6725
- const zoomOptions = useMemo14(
6856
+ const zoomOptions = useMemo15(
6726
6857
  () => [
6727
6858
  ...defaultZoomOptions,
6728
6859
  ...defaultsContainAutoZoom ? [] : [
@@ -6735,7 +6866,7 @@ var ViewportControls = ({
6735
6866
  [autoZoom]
6736
6867
  );
6737
6868
  return /* @__PURE__ */ jsxs18("div", { className: getClassName25(), children: [
6738
- viewports.map((viewport, i) => /* @__PURE__ */ jsx35(
6869
+ viewports.map((viewport, i) => /* @__PURE__ */ jsx36(
6739
6870
  ViewportButton,
6740
6871
  {
6741
6872
  height: viewport.height,
@@ -6746,8 +6877,8 @@ var ViewportControls = ({
6746
6877
  },
6747
6878
  i
6748
6879
  )),
6749
- /* @__PURE__ */ jsx35("div", { className: getClassName25("divider") }),
6750
- /* @__PURE__ */ jsx35(
6880
+ /* @__PURE__ */ jsx36("div", { className: getClassName25("divider") }),
6881
+ /* @__PURE__ */ jsx36(
6751
6882
  IconButton,
6752
6883
  {
6753
6884
  title: "Zoom viewport out",
@@ -6761,10 +6892,10 @@ var ViewportControls = ({
6761
6892
  )].value
6762
6893
  );
6763
6894
  },
6764
- children: /* @__PURE__ */ jsx35(ZoomOut, { size: 16 })
6895
+ children: /* @__PURE__ */ jsx36(ZoomOut, { size: 16 })
6765
6896
  }
6766
6897
  ),
6767
- /* @__PURE__ */ jsx35(
6898
+ /* @__PURE__ */ jsx36(
6768
6899
  IconButton,
6769
6900
  {
6770
6901
  title: "Zoom viewport in",
@@ -6778,11 +6909,11 @@ var ViewportControls = ({
6778
6909
  )].value
6779
6910
  );
6780
6911
  },
6781
- children: /* @__PURE__ */ jsx35(ZoomIn, { size: 16 })
6912
+ children: /* @__PURE__ */ jsx36(ZoomIn, { size: 16 })
6782
6913
  }
6783
6914
  ),
6784
- /* @__PURE__ */ jsx35("div", { className: getClassName25("divider") }),
6785
- /* @__PURE__ */ jsx35(
6915
+ /* @__PURE__ */ jsx36("div", { className: getClassName25("divider") }),
6916
+ /* @__PURE__ */ jsx36(
6786
6917
  "select",
6787
6918
  {
6788
6919
  className: getClassName25("zoomSelect"),
@@ -6790,7 +6921,7 @@ var ViewportControls = ({
6790
6921
  onChange: (e) => {
6791
6922
  onZoom(parseFloat(e.currentTarget.value));
6792
6923
  },
6793
- children: zoomOptions.map((option) => /* @__PURE__ */ jsx35(
6924
+ children: zoomOptions.map((option) => /* @__PURE__ */ jsx36(
6794
6925
  "option",
6795
6926
  {
6796
6927
  value: option.value,
@@ -6838,20 +6969,20 @@ var getZoomConfig = (uiViewport, frame, zoom) => {
6838
6969
  };
6839
6970
 
6840
6971
  // components/Puck/components/Canvas/index.tsx
6841
- import { Fragment as Fragment13, jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
6972
+ import { Fragment as Fragment13, jsx as jsx37, jsxs as jsxs19 } from "react/jsx-runtime";
6842
6973
  var getClassName26 = get_class_name_factory_default("PuckCanvas", styles_module_default21);
6843
6974
  var ZOOM_ON_CHANGE = true;
6844
6975
  var Canvas = () => {
6845
6976
  const { status, iframe } = useAppContext();
6846
6977
  const { dispatch, state, overrides, setUi, zoomConfig, setZoomConfig } = useAppContext();
6847
6978
  const { ui } = state;
6848
- const frameRef = useRef8(null);
6979
+ const frameRef = useRef7(null);
6849
6980
  const [showTransition, setShowTransition] = useState24(false);
6850
- const defaultRender = useMemo15(() => {
6851
- const PuckDefault = ({ children }) => /* @__PURE__ */ jsx36(Fragment13, { children });
6981
+ const defaultRender = useMemo16(() => {
6982
+ const PuckDefault = ({ children }) => /* @__PURE__ */ jsx37(Fragment13, { children });
6852
6983
  return PuckDefault;
6853
6984
  }, []);
6854
- const CustomPreview = useMemo15(
6985
+ const CustomPreview = useMemo16(
6855
6986
  () => overrides.preview || defaultRender,
6856
6987
  [overrides]
6857
6988
  );
@@ -6920,7 +7051,7 @@ var Canvas = () => {
6920
7051
  recordHistory: true
6921
7052
  }),
6922
7053
  children: [
6923
- ui.viewports.controlsVisible && iframe.enabled && /* @__PURE__ */ jsx36("div", { className: getClassName26("controls"), children: /* @__PURE__ */ jsx36(
7054
+ ui.viewports.controlsVisible && iframe.enabled && /* @__PURE__ */ jsx37("div", { className: getClassName26("controls"), children: /* @__PURE__ */ jsx37(
6924
7055
  ViewportControls,
6925
7056
  {
6926
7057
  autoZoom: zoomConfig.autoZoom,
@@ -6947,7 +7078,7 @@ var Canvas = () => {
6947
7078
  }
6948
7079
  ) }),
6949
7080
  /* @__PURE__ */ jsxs19("div", { className: getClassName26("inner"), ref: frameRef, children: [
6950
- /* @__PURE__ */ jsx36(
7081
+ /* @__PURE__ */ jsx37(
6951
7082
  "div",
6952
7083
  {
6953
7084
  className: getClassName26("root"),
@@ -6968,10 +7099,10 @@ var Canvas = () => {
6968
7099
  })
6969
7100
  );
6970
7101
  },
6971
- children: /* @__PURE__ */ jsx36(CustomPreview, { children: /* @__PURE__ */ jsx36(Preview2, {}) })
7102
+ children: /* @__PURE__ */ jsx37(CustomPreview, { children: /* @__PURE__ */ jsx37(Preview2, {}) })
6972
7103
  }
6973
7104
  ),
6974
- /* @__PURE__ */ jsx36("div", { className: getClassName26("loader"), children: /* @__PURE__ */ jsx36(Loader, { size: 24 }) })
7105
+ /* @__PURE__ */ jsx37("div", { className: getClassName26("loader"), children: /* @__PURE__ */ jsx37(Loader, { size: 24 }) })
6975
7106
  ] })
6976
7107
  ]
6977
7108
  }
@@ -6980,7 +7111,7 @@ var Canvas = () => {
6980
7111
 
6981
7112
  // lib/use-loaded-overrides.ts
6982
7113
  init_react_import();
6983
- import { useMemo as useMemo16 } from "react";
7114
+ import { useMemo as useMemo17 } from "react";
6984
7115
 
6985
7116
  // lib/load-overrides.ts
6986
7117
  init_react_import();
@@ -7019,15 +7150,15 @@ var useLoadedOverrides = ({
7019
7150
  overrides,
7020
7151
  plugins
7021
7152
  }) => {
7022
- return useMemo16(() => {
7153
+ return useMemo17(() => {
7023
7154
  return loadOverrides({ overrides, plugins });
7024
7155
  }, [plugins, overrides]);
7025
7156
  };
7026
7157
 
7027
7158
  // components/DefaultOverride/index.tsx
7028
7159
  init_react_import();
7029
- import { Fragment as Fragment14, jsx as jsx37 } from "react/jsx-runtime";
7030
- var DefaultOverride = ({ children }) => /* @__PURE__ */ jsx37(Fragment14, { children });
7160
+ import { Fragment as Fragment14, jsx as jsx38 } from "react/jsx-runtime";
7161
+ var DefaultOverride = ({ children }) => /* @__PURE__ */ jsx38(Fragment14, { children });
7031
7162
 
7032
7163
  // lib/use-inject-css.ts
7033
7164
  init_react_import();
@@ -7084,7 +7215,7 @@ var usePreviewModeHotkeys = (dispatch, iframeEnabled) => {
7084
7215
  };
7085
7216
 
7086
7217
  // components/Puck/index.tsx
7087
- import { Fragment as Fragment15, jsx as jsx38, jsxs as jsxs20 } from "react/jsx-runtime";
7218
+ import { Fragment as Fragment15, jsx as jsx39, jsxs as jsxs20 } from "react/jsx-runtime";
7088
7219
  var getClassName27 = get_class_name_factory_default("Puck", styles_module_default15);
7089
7220
  var getLayoutClassName = get_class_name_factory_default("PuckLayout", styles_module_default15);
7090
7221
  function Puck({
@@ -7247,7 +7378,7 @@ function Puck({
7247
7378
  window.removeEventListener("resize", handleResize);
7248
7379
  };
7249
7380
  }, []);
7250
- const defaultHeaderRender = useMemo17(() => {
7381
+ const defaultHeaderRender = useMemo18(() => {
7251
7382
  if (renderHeader) {
7252
7383
  console.warn(
7253
7384
  "`renderHeader` is deprecated. Please use `overrides.header` and the `usePuck` hook instead"
@@ -7255,20 +7386,20 @@ function Puck({
7255
7386
  const RenderHeader = (_a2) => {
7256
7387
  var _b2 = _a2, { actions } = _b2, props = __objRest(_b2, ["actions"]);
7257
7388
  const Comp = renderHeader;
7258
- return /* @__PURE__ */ jsx38(Comp, __spreadProps(__spreadValues({}, props), { dispatch, state: appState, children: actions }));
7389
+ return /* @__PURE__ */ jsx39(Comp, __spreadProps(__spreadValues({}, props), { dispatch, state: appState, children: actions }));
7259
7390
  };
7260
7391
  return RenderHeader;
7261
7392
  }
7262
7393
  return DefaultOverride;
7263
7394
  }, [renderHeader]);
7264
- const defaultHeaderActionsRender = useMemo17(() => {
7395
+ const defaultHeaderActionsRender = useMemo18(() => {
7265
7396
  if (renderHeaderActions) {
7266
7397
  console.warn(
7267
7398
  "`renderHeaderActions` is deprecated. Please use `overrides.headerActions` and the `usePuck` hook instead."
7268
7399
  );
7269
7400
  const RenderHeader = (props) => {
7270
7401
  const Comp = renderHeaderActions;
7271
- return /* @__PURE__ */ jsx38(Comp, __spreadProps(__spreadValues({}, props), { dispatch, state: appState }));
7402
+ return /* @__PURE__ */ jsx39(Comp, __spreadProps(__spreadValues({}, props), { dispatch, state: appState }));
7272
7403
  };
7273
7404
  return RenderHeader;
7274
7405
  }
@@ -7278,15 +7409,15 @@ function Puck({
7278
7409
  overrides,
7279
7410
  plugins
7280
7411
  });
7281
- const CustomPuck = useMemo17(
7412
+ const CustomPuck = useMemo18(
7282
7413
  () => loadedOverrides.puck || DefaultOverride,
7283
7414
  [loadedOverrides]
7284
7415
  );
7285
- const CustomHeader = useMemo17(
7416
+ const CustomHeader = useMemo18(
7286
7417
  () => loadedOverrides.header || defaultHeaderRender,
7287
7418
  [loadedOverrides]
7288
7419
  );
7289
- const CustomHeaderActions = useMemo17(
7420
+ const CustomHeaderActions = useMemo18(
7290
7421
  () => loadedOverrides.headerActions || defaultHeaderActionsRender,
7291
7422
  [loadedOverrides]
7292
7423
  );
@@ -7298,7 +7429,7 @@ function Puck({
7298
7429
  const selectedComponentLabel = selectedItem ? (_b = selectedComponentConfig == null ? void 0 : selectedComponentConfig["label"]) != null ? _b : selectedItem.type.toString() : "";
7299
7430
  usePreviewModeHotkeys(dispatch, iframe.enabled);
7300
7431
  return /* @__PURE__ */ jsxs20("div", { className: `Puck ${getClassName27()}`, children: [
7301
- /* @__PURE__ */ jsx38(
7432
+ /* @__PURE__ */ jsx39(
7302
7433
  AppProvider,
7303
7434
  {
7304
7435
  value: {
@@ -7320,7 +7451,7 @@ function Puck({
7320
7451
  getPermissions: () => ({}),
7321
7452
  refreshPermissions: () => null
7322
7453
  },
7323
- children: /* @__PURE__ */ jsx38(DragDropContext, { disableAutoScroll: dnd == null ? void 0 : dnd.disableAutoScroll, children: /* @__PURE__ */ jsx38(CustomPuck, { children: children || /* @__PURE__ */ jsx38(
7454
+ children: /* @__PURE__ */ jsx39(DragDropContext, { disableAutoScroll: dnd == null ? void 0 : dnd.disableAutoScroll, children: /* @__PURE__ */ jsx39(CustomPuck, { children: children || /* @__PURE__ */ jsx39(
7324
7455
  "div",
7325
7456
  {
7326
7457
  className: getLayoutClassName({
@@ -7330,59 +7461,59 @@ function Puck({
7330
7461
  rightSideBarVisible
7331
7462
  }),
7332
7463
  children: /* @__PURE__ */ jsxs20("div", { className: getLayoutClassName("inner"), children: [
7333
- /* @__PURE__ */ jsx38(
7464
+ /* @__PURE__ */ jsx39(
7334
7465
  CustomHeader,
7335
7466
  {
7336
- actions: /* @__PURE__ */ jsx38(Fragment15, { children: /* @__PURE__ */ jsx38(CustomHeaderActions, { children: /* @__PURE__ */ jsx38(
7467
+ actions: /* @__PURE__ */ jsx39(Fragment15, { children: /* @__PURE__ */ jsx39(CustomHeaderActions, { children: /* @__PURE__ */ jsx39(
7337
7468
  Button,
7338
7469
  {
7339
7470
  onClick: () => {
7340
7471
  onPublish && onPublish(data);
7341
7472
  },
7342
- icon: /* @__PURE__ */ jsx38(Globe, { size: "14px" }),
7473
+ icon: /* @__PURE__ */ jsx39(Globe, { size: "14px" }),
7343
7474
  children: "Publish"
7344
7475
  }
7345
7476
  ) }) }),
7346
- children: /* @__PURE__ */ jsx38("header", { className: getLayoutClassName("header"), children: /* @__PURE__ */ jsxs20("div", { className: getLayoutClassName("headerInner"), children: [
7477
+ children: /* @__PURE__ */ jsx39("header", { className: getLayoutClassName("header"), children: /* @__PURE__ */ jsxs20("div", { className: getLayoutClassName("headerInner"), children: [
7347
7478
  /* @__PURE__ */ jsxs20("div", { className: getLayoutClassName("headerToggle"), children: [
7348
- /* @__PURE__ */ jsx38(
7479
+ /* @__PURE__ */ jsx39(
7349
7480
  "div",
7350
7481
  {
7351
7482
  className: getLayoutClassName("leftSideBarToggle"),
7352
- children: /* @__PURE__ */ jsx38(
7483
+ children: /* @__PURE__ */ jsx39(
7353
7484
  IconButton,
7354
7485
  {
7355
7486
  onClick: () => {
7356
7487
  toggleSidebars("left");
7357
7488
  },
7358
7489
  title: "Toggle left sidebar",
7359
- children: /* @__PURE__ */ jsx38(PanelLeft, { focusable: "false" })
7490
+ children: /* @__PURE__ */ jsx39(PanelLeft, { focusable: "false" })
7360
7491
  }
7361
7492
  )
7362
7493
  }
7363
7494
  ),
7364
- /* @__PURE__ */ jsx38(
7495
+ /* @__PURE__ */ jsx39(
7365
7496
  "div",
7366
7497
  {
7367
7498
  className: getLayoutClassName("rightSideBarToggle"),
7368
- children: /* @__PURE__ */ jsx38(
7499
+ children: /* @__PURE__ */ jsx39(
7369
7500
  IconButton,
7370
7501
  {
7371
7502
  onClick: () => {
7372
7503
  toggleSidebars("right");
7373
7504
  },
7374
7505
  title: "Toggle right sidebar",
7375
- children: /* @__PURE__ */ jsx38(PanelRight, { focusable: "false" })
7506
+ children: /* @__PURE__ */ jsx39(PanelRight, { focusable: "false" })
7376
7507
  }
7377
7508
  )
7378
7509
  }
7379
7510
  )
7380
7511
  ] }),
7381
- /* @__PURE__ */ jsx38("div", { className: getLayoutClassName("headerTitle"), children: /* @__PURE__ */ jsxs20(Heading, { rank: "2", size: "xs", children: [
7512
+ /* @__PURE__ */ jsx39("div", { className: getLayoutClassName("headerTitle"), children: /* @__PURE__ */ jsxs20(Heading, { rank: "2", size: "xs", children: [
7382
7513
  headerTitle || rootProps.title || "Page",
7383
7514
  headerPath && /* @__PURE__ */ jsxs20(Fragment15, { children: [
7384
7515
  " ",
7385
- /* @__PURE__ */ jsx38(
7516
+ /* @__PURE__ */ jsx39(
7386
7517
  "code",
7387
7518
  {
7388
7519
  className: getLayoutClassName("headerPath"),
@@ -7392,30 +7523,30 @@ function Puck({
7392
7523
  ] })
7393
7524
  ] }) }),
7394
7525
  /* @__PURE__ */ jsxs20("div", { className: getLayoutClassName("headerTools"), children: [
7395
- /* @__PURE__ */ jsx38("div", { className: getLayoutClassName("menuButton"), children: /* @__PURE__ */ jsx38(
7526
+ /* @__PURE__ */ jsx39("div", { className: getLayoutClassName("menuButton"), children: /* @__PURE__ */ jsx39(
7396
7527
  IconButton,
7397
7528
  {
7398
7529
  onClick: () => {
7399
7530
  return setMenuOpen(!menuOpen);
7400
7531
  },
7401
7532
  title: "Toggle menu bar",
7402
- children: menuOpen ? /* @__PURE__ */ jsx38(ChevronUp, { focusable: "false" }) : /* @__PURE__ */ jsx38(ChevronDown, { focusable: "false" })
7533
+ children: menuOpen ? /* @__PURE__ */ jsx39(ChevronUp, { focusable: "false" }) : /* @__PURE__ */ jsx39(ChevronDown, { focusable: "false" })
7403
7534
  }
7404
7535
  ) }),
7405
- /* @__PURE__ */ jsx38(
7536
+ /* @__PURE__ */ jsx39(
7406
7537
  MenuBar,
7407
7538
  {
7408
7539
  appState,
7409
7540
  dispatch,
7410
7541
  onPublish,
7411
7542
  menuOpen,
7412
- renderHeaderActions: () => /* @__PURE__ */ jsx38(CustomHeaderActions, { children: /* @__PURE__ */ jsx38(
7543
+ renderHeaderActions: () => /* @__PURE__ */ jsx39(CustomHeaderActions, { children: /* @__PURE__ */ jsx39(
7413
7544
  Button,
7414
7545
  {
7415
7546
  onClick: () => {
7416
7547
  onPublish && onPublish(data);
7417
7548
  },
7418
- icon: /* @__PURE__ */ jsx38(Globe, { size: "14px" }),
7549
+ icon: /* @__PURE__ */ jsx39(Globe, { size: "14px" }),
7419
7550
  children: "Publish"
7420
7551
  }
7421
7552
  ) }),
@@ -7427,18 +7558,18 @@ function Puck({
7427
7558
  }
7428
7559
  ),
7429
7560
  /* @__PURE__ */ jsxs20("div", { className: getLayoutClassName("leftSideBar"), children: [
7430
- /* @__PURE__ */ jsx38(SidebarSection, { title: "Components", noBorderTop: true, children: /* @__PURE__ */ jsx38(Components, {}) }),
7431
- /* @__PURE__ */ jsx38(SidebarSection, { title: "Outline", children: /* @__PURE__ */ jsx38(Outline, {}) })
7561
+ /* @__PURE__ */ jsx39(SidebarSection, { title: "Components", noBorderTop: true, children: /* @__PURE__ */ jsx39(Components, {}) }),
7562
+ /* @__PURE__ */ jsx39(SidebarSection, { title: "Outline", children: /* @__PURE__ */ jsx39(Outline, {}) })
7432
7563
  ] }),
7433
- /* @__PURE__ */ jsx38(Canvas, {}),
7434
- /* @__PURE__ */ jsx38("div", { className: getLayoutClassName("rightSideBar"), children: /* @__PURE__ */ jsx38(
7564
+ /* @__PURE__ */ jsx39(Canvas, {}),
7565
+ /* @__PURE__ */ jsx39("div", { className: getLayoutClassName("rightSideBar"), children: /* @__PURE__ */ jsx39(
7435
7566
  SidebarSection,
7436
7567
  {
7437
7568
  noPadding: true,
7438
7569
  noBorderTop: true,
7439
7570
  showBreadcrumbs: true,
7440
7571
  title: selectedItem ? selectedComponentLabel : "Page",
7441
- children: /* @__PURE__ */ jsx38(Fields, {})
7572
+ children: /* @__PURE__ */ jsx39(Fields, {})
7442
7573
  }
7443
7574
  ) })
7444
7575
  ] })
@@ -7446,7 +7577,7 @@ function Puck({
7446
7577
  ) }) })
7447
7578
  }
7448
7579
  ),
7449
- /* @__PURE__ */ jsx38("div", { id: "puck-portal-root", className: getClassName27("portal") })
7580
+ /* @__PURE__ */ jsx39("div", { id: "puck-portal-root", className: getClassName27("portal") })
7450
7581
  ] });
7451
7582
  }
7452
7583
  Puck.Components = Components;