@reacteditor/core 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/{Editor-OSAG52QF.mjs → Editor-KXEVJBNG.mjs} +6 -6
  2. package/dist/{actions-BDMhAtxP.d.mts → actions-2L-1hQ7r.d.mts} +6 -2
  3. package/dist/{actions-BDMhAtxP.d.ts → actions-2L-1hQ7r.d.ts} +6 -2
  4. package/dist/{chunk-EEQGJ6FH.mjs → chunk-AD7BMXAA.mjs} +1 -1
  5. package/dist/{chunk-RNRHREWH.mjs → chunk-AJWRDM22.mjs} +3 -3
  6. package/dist/{chunk-W5I2Z7QS.mjs → chunk-DU757QEH.mjs} +733 -617
  7. package/dist/{chunk-ZLSPSBV3.mjs → chunk-FT6UFK7G.mjs} +1 -1
  8. package/dist/{chunk-AAK2555H.mjs → chunk-LRFRIIKG.mjs} +3 -1
  9. package/dist/{chunk-XI7YTBCP.mjs → chunk-OIFPBVSF.mjs} +1 -1
  10. package/dist/{chunk-JUC25FB7.mjs → chunk-U7VW3V3W.mjs} +7 -7
  11. package/dist/{full-IHV5BO2L.mjs → full-ZFZZ626B.mjs} +5 -5
  12. package/dist/{index-DkYXZRPz.d.ts → index-BNsSzMCj.d.ts} +2 -1
  13. package/dist/{index-BwLKseT7.d.mts → index-BXuSeNez.d.mts} +2 -1
  14. package/dist/index.css +99 -26
  15. package/dist/index.d.mts +5 -4
  16. package/dist/index.d.ts +5 -4
  17. package/dist/index.js +1224 -1103
  18. package/dist/index.mjs +7 -7
  19. package/dist/internal.d.mts +2 -2
  20. package/dist/internal.d.ts +2 -2
  21. package/dist/{loaded-FTSXIONQ.mjs → loaded-GLBLMTBL.mjs} +2 -2
  22. package/dist/{loaded-YTQOQIUU.mjs → loaded-O4QHGE26.mjs} +2 -2
  23. package/dist/{loaded-3NPQWYKN.mjs → loaded-R34BR6I5.mjs} +2 -2
  24. package/dist/no-external.css +99 -26
  25. package/dist/no-external.d.mts +3 -3
  26. package/dist/no-external.d.ts +3 -3
  27. package/dist/no-external.js +1224 -1103
  28. package/dist/no-external.mjs +7 -7
  29. package/dist/rsc.d.mts +2 -2
  30. package/dist/rsc.d.ts +2 -2
  31. package/dist/{walk-tree-LcQXXDqe.d.mts → walk-tree-4C3ODO3X.d.mts} +1 -1
  32. package/dist/{walk-tree-BweEZ37Y.d.ts → walk-tree-C9GrSWsR.d.ts} +1 -1
  33. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  EditorInner,
3
3
  LoadedRichTextMenu
4
- } from "./chunk-RNRHREWH.mjs";
4
+ } from "./chunk-AJWRDM22.mjs";
5
5
  import {
6
6
  RichTextRenderFallback,
7
7
  SlotRender,
@@ -16,7 +16,7 @@ import {
16
16
  IconButton,
17
17
  LoadedRichTextMenuInner,
18
18
  Loader
19
- } from "./chunk-JUC25FB7.mjs";
19
+ } from "./chunk-U7VW3V3W.mjs";
20
20
  import {
21
21
  Check,
22
22
  ChevronDown,
@@ -60,7 +60,7 @@ import {
60
60
  useRegisterFieldsSlice,
61
61
  useRegisterHistorySlice,
62
62
  useRegisterPermissionsSlice
63
- } from "./chunk-AAK2555H.mjs";
63
+ } from "./chunk-LRFRIIKG.mjs";
64
64
  import {
65
65
  getItem,
66
66
  insert,
@@ -240,7 +240,7 @@ init_react_import();
240
240
 
241
241
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/AutoField/styles.module.css#css-module
242
242
  init_react_import();
243
- var styles_module_default = { "InputWrapper": "_InputWrapper_1hd99_1", "Input-label": "_Input-label_1hd99_5", "Input-labelIcon": "_Input-labelIcon_1hd99_15", "Input-disabledIcon": "_Input-disabledIcon_1hd99_22", "Input-input": "_Input-input_1hd99_27", "Input": "_Input_1hd99_1", "Input--readOnly": "_Input--readOnly_1hd99_87", "Input-radioGroupItems": "_Input-radioGroupItems_1hd99_98", "Input-radio": "_Input-radio_1hd99_98", "Input-radioInner": "_Input-radioInner_1hd99_115", "Input-radioInput": "_Input-radioInput_1hd99_147" };
243
+ var styles_module_default = { "InputWrapper": "_InputWrapper_zwh6e_1", "Input-label": "_Input-label_zwh6e_5", "Input-labelIcon": "_Input-labelIcon_zwh6e_15", "Input-disabledIcon": "_Input-disabledIcon_zwh6e_22", "Input-input": "_Input-input_zwh6e_27", "Input": "_Input_zwh6e_1", "Input--readOnly": "_Input--readOnly_zwh6e_87", "Input-radioGroupItems": "_Input-radioGroupItems_zwh6e_98", "Input-radio": "_Input-radio_zwh6e_98", "Input-radioInner": "_Input-radioInner_zwh6e_115", "Input-radioInput": "_Input-radioInput_zwh6e_147" };
244
244
 
245
245
  // components/AutoField/FieldLabel.tsx
246
246
  import { useMemo } from "react";
@@ -294,7 +294,7 @@ var FieldLabelInternal = ({
294
294
  // components/AutoField/index.tsx
295
295
  init_react_import();
296
296
  import {
297
- useCallback as useCallback4,
297
+ useCallback as useCallback5,
298
298
  useContext as useContext4,
299
299
  useEffect as useEffect7,
300
300
  useMemo as useMemo5
@@ -1277,8 +1277,9 @@ var ArrayField = ({
1277
1277
  );
1278
1278
  };
1279
1279
 
1280
- // components/AutoField/fields/DefaultField/index.tsx
1280
+ // components/AutoField/fields/ColorField/index.tsx
1281
1281
  init_react_import();
1282
+ import { useCallback as useCallback3, useRef as useRef2 } from "react";
1282
1283
 
1283
1284
  // components/AutoField/lib/use-local-value.ts
1284
1285
  init_react_import();
@@ -1316,9 +1317,107 @@ var useLocalValue = (path, onChange) => {
1316
1317
  return [localValue != null ? localValue : "", onChangeLocal];
1317
1318
  };
1318
1319
 
1320
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/AutoField/fields/ColorField/styles.module.css#css-module
1321
+ init_react_import();
1322
+ var styles_module_default4 = { "ColorField": "_ColorField_1nsbe_1", "ColorField--readOnly": "_ColorField--readOnly_1nsbe_24", "ColorField-swatch": "_ColorField-swatch_1nsbe_34", "ColorField-picker": "_ColorField-picker_1nsbe_57", "ColorField-text": "_ColorField-text_1nsbe_64" };
1323
+
1324
+ // components/AutoField/fields/ColorField/index.tsx
1325
+ import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
1326
+ var getClassName5 = get_class_name_factory_default("ColorField", styles_module_default4);
1327
+ var toHexInput = (val) => {
1328
+ if (typeof val !== "string") return "#000000";
1329
+ const trimmed = val.trim();
1330
+ const m = trimmed.match(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);
1331
+ if (!m) return "#000000";
1332
+ const hex = m[1];
1333
+ if (hex.length === 3) {
1334
+ return `#${hex.split("").map((c) => c + c).join("")}`;
1335
+ }
1336
+ return `#${hex}`.toLowerCase();
1337
+ };
1338
+ var canonicalize = (val) => {
1339
+ const trimmed = val.trim();
1340
+ const m = trimmed.match(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);
1341
+ if (!m) return null;
1342
+ const hex = m[1];
1343
+ if (hex.length === 3) {
1344
+ return `#${hex.split("").map((c) => c + c).join("")}`.toLowerCase();
1345
+ }
1346
+ return `#${hex}`.toLowerCase();
1347
+ };
1348
+ var ColorField = ({
1349
+ field,
1350
+ onChange,
1351
+ readOnly,
1352
+ id,
1353
+ name = id,
1354
+ label,
1355
+ labelIcon,
1356
+ Label: Label2
1357
+ }) => {
1358
+ var _a;
1359
+ const [localValue, onChangeLocal] = useLocalValue(name, onChange);
1360
+ const pickerRef = useRef2(null);
1361
+ if (field.type !== "color") return null;
1362
+ const swatchHex = toHexInput(localValue);
1363
+ const openPicker = useCallback3(() => {
1364
+ var _a2;
1365
+ if (readOnly) return;
1366
+ (_a2 = pickerRef.current) == null ? void 0 : _a2.click();
1367
+ }, [readOnly]);
1368
+ return /* @__PURE__ */ jsx9(Label2, { label: label || name, icon: labelIcon, readOnly, children: /* @__PURE__ */ jsxs4("div", { className: getClassName5({ readOnly }), children: [
1369
+ /* @__PURE__ */ jsx9(
1370
+ "button",
1371
+ {
1372
+ type: "button",
1373
+ "aria-label": "Open color picker",
1374
+ className: getClassName5("swatch"),
1375
+ disabled: readOnly,
1376
+ onClick: openPicker,
1377
+ style: { color: swatchHex },
1378
+ children: /* @__PURE__ */ jsx9(
1379
+ "input",
1380
+ {
1381
+ ref: pickerRef,
1382
+ className: getClassName5("picker"),
1383
+ type: "color",
1384
+ tabIndex: -1,
1385
+ "aria-hidden": true,
1386
+ value: swatchHex,
1387
+ disabled: readOnly,
1388
+ onChange: (e) => onChangeLocal(e.currentTarget.value)
1389
+ }
1390
+ )
1391
+ }
1392
+ ),
1393
+ /* @__PURE__ */ jsx9(
1394
+ "input",
1395
+ {
1396
+ className: getClassName5("text"),
1397
+ autoComplete: "off",
1398
+ type: "text",
1399
+ name,
1400
+ id,
1401
+ value: localValue != null ? localValue : "",
1402
+ placeholder: (_a = field.placeholder) != null ? _a : "#000000",
1403
+ readOnly,
1404
+ tabIndex: readOnly ? -1 : void 0,
1405
+ onChange: (e) => onChangeLocal(e.currentTarget.value),
1406
+ onBlur: (e) => {
1407
+ const canonical = canonicalize(e.currentTarget.value);
1408
+ if (canonical && canonical !== e.currentTarget.value) {
1409
+ onChangeLocal(canonical);
1410
+ }
1411
+ }
1412
+ }
1413
+ )
1414
+ ] }) });
1415
+ };
1416
+
1319
1417
  // components/AutoField/fields/DefaultField/index.tsx
1320
- import { jsx as jsx9 } from "react/jsx-runtime";
1321
- var getClassName5 = get_class_name_factory_default("Input", styles_module_default);
1418
+ init_react_import();
1419
+ import { jsx as jsx10 } from "react/jsx-runtime";
1420
+ var getClassName6 = get_class_name_factory_default("Input", styles_module_default);
1322
1421
  var DefaultField = ({
1323
1422
  field,
1324
1423
  onChange,
@@ -1330,16 +1429,16 @@ var DefaultField = ({
1330
1429
  Label: Label2
1331
1430
  }) => {
1332
1431
  const [localValue, onChangeLocal] = useLocalValue(name, onChange);
1333
- return /* @__PURE__ */ jsx9(
1432
+ return /* @__PURE__ */ jsx10(
1334
1433
  Label2,
1335
1434
  {
1336
1435
  label: label || name,
1337
1436
  icon: labelIcon,
1338
1437
  readOnly,
1339
- children: /* @__PURE__ */ jsx9(
1438
+ children: /* @__PURE__ */ jsx10(
1340
1439
  "input",
1341
1440
  {
1342
- className: getClassName5("input"),
1441
+ className: getClassName6("input"),
1343
1442
  autoComplete: "off",
1344
1443
  type: field.type,
1345
1444
  title: label || name,
@@ -1382,13 +1481,13 @@ import {
1382
1481
  useMemo as useMemo4,
1383
1482
  useEffect as useEffect5,
1384
1483
  useState as useState7,
1385
- useCallback as useCallback3,
1484
+ useCallback as useCallback4,
1386
1485
  isValidElement
1387
1486
  } from "react";
1388
1487
 
1389
1488
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/ExternalInput/styles.module.css#css-module
1390
1489
  init_react_import();
1391
- var styles_module_default4 = { "ExternalInput-actions": "_ExternalInput-actions_142hz_1", "ExternalInput-button": "_ExternalInput-button_142hz_5", "ExternalInput--dataSelected": "_ExternalInput--dataSelected_142hz_25", "ExternalInput--readOnly": "_ExternalInput--readOnly_142hz_32", "ExternalInput-detachButton": "_ExternalInput-detachButton_142hz_36", "ExternalInput": "_ExternalInput_142hz_1", "ExternalInputModal": "_ExternalInputModal_142hz_82", "ExternalInputModal-grid": "_ExternalInputModal-grid_142hz_92", "ExternalInputModal--filtersToggled": "_ExternalInputModal--filtersToggled_142hz_103", "ExternalInputModal-filters": "_ExternalInputModal-filters_142hz_108", "ExternalInputModal-masthead": "_ExternalInputModal-masthead_142hz_127", "ExternalInputModal-tableWrapper": "_ExternalInputModal-tableWrapper_142hz_136", "ExternalInputModal-table": "_ExternalInputModal-table_142hz_136", "ExternalInputModal-thead": "_ExternalInputModal-thead_142hz_152", "ExternalInputModal-th": "_ExternalInputModal-th_142hz_152", "ExternalInputModal-td": "_ExternalInputModal-td_142hz_167", "ExternalInputModal-tr": "_ExternalInputModal-tr_142hz_172", "ExternalInputModal-tbody": "_ExternalInputModal-tbody_142hz_179", "ExternalInputModal--hasData": "_ExternalInputModal--hasData_142hz_205", "ExternalInputModal-loadingBanner": "_ExternalInputModal-loadingBanner_142hz_209", "ExternalInputModal--isLoading": "_ExternalInputModal--isLoading_142hz_226", "ExternalInputModal-searchForm": "_ExternalInputModal-searchForm_142hz_230", "ExternalInputModal-search": "_ExternalInputModal-search_142hz_230", "ExternalInputModal-searchIcon": "_ExternalInputModal-searchIcon_142hz_267", "ExternalInputModal-searchIconText": "_ExternalInputModal-searchIconText_142hz_292", "ExternalInputModal-searchInput": "_ExternalInputModal-searchInput_142hz_302", "ExternalInputModal-searchActions": "_ExternalInputModal-searchActions_142hz_316", "ExternalInputModal-searchActionIcon": "_ExternalInputModal-searchActionIcon_142hz_329", "ExternalInputModal-footerContainer": "_ExternalInputModal-footerContainer_142hz_333", "ExternalInputModal-footer": "_ExternalInputModal-footer_142hz_333", "ExternalInputModal-field": "_ExternalInputModal-field_142hz_346" };
1490
+ var styles_module_default5 = { "ExternalInput-actions": "_ExternalInput-actions_142hz_1", "ExternalInput-button": "_ExternalInput-button_142hz_5", "ExternalInput--dataSelected": "_ExternalInput--dataSelected_142hz_25", "ExternalInput--readOnly": "_ExternalInput--readOnly_142hz_32", "ExternalInput-detachButton": "_ExternalInput-detachButton_142hz_36", "ExternalInput": "_ExternalInput_142hz_1", "ExternalInputModal": "_ExternalInputModal_142hz_82", "ExternalInputModal-grid": "_ExternalInputModal-grid_142hz_92", "ExternalInputModal--filtersToggled": "_ExternalInputModal--filtersToggled_142hz_103", "ExternalInputModal-filters": "_ExternalInputModal-filters_142hz_108", "ExternalInputModal-masthead": "_ExternalInputModal-masthead_142hz_127", "ExternalInputModal-tableWrapper": "_ExternalInputModal-tableWrapper_142hz_136", "ExternalInputModal-table": "_ExternalInputModal-table_142hz_136", "ExternalInputModal-thead": "_ExternalInputModal-thead_142hz_152", "ExternalInputModal-th": "_ExternalInputModal-th_142hz_152", "ExternalInputModal-td": "_ExternalInputModal-td_142hz_167", "ExternalInputModal-tr": "_ExternalInputModal-tr_142hz_172", "ExternalInputModal-tbody": "_ExternalInputModal-tbody_142hz_179", "ExternalInputModal--hasData": "_ExternalInputModal--hasData_142hz_205", "ExternalInputModal-loadingBanner": "_ExternalInputModal-loadingBanner_142hz_209", "ExternalInputModal--isLoading": "_ExternalInputModal--isLoading_142hz_226", "ExternalInputModal-searchForm": "_ExternalInputModal-searchForm_142hz_230", "ExternalInputModal-search": "_ExternalInputModal-search_142hz_230", "ExternalInputModal-searchIcon": "_ExternalInputModal-searchIcon_142hz_267", "ExternalInputModal-searchIconText": "_ExternalInputModal-searchIconText_142hz_292", "ExternalInputModal-searchInput": "_ExternalInputModal-searchInput_142hz_302", "ExternalInputModal-searchActions": "_ExternalInputModal-searchActions_142hz_316", "ExternalInputModal-searchActionIcon": "_ExternalInputModal-searchActionIcon_142hz_329", "ExternalInputModal-footerContainer": "_ExternalInputModal-footerContainer_142hz_333", "ExternalInputModal-footer": "_ExternalInputModal-footer_142hz_333", "ExternalInputModal-field": "_ExternalInputModal-field_142hz_346" };
1392
1491
 
1393
1492
  // components/Modal/index.tsx
1394
1493
  init_react_import();
@@ -1396,12 +1495,12 @@ import { useEffect as useEffect4, useState as useState6 } from "react";
1396
1495
 
1397
1496
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Modal/styles.module.css#css-module
1398
1497
  init_react_import();
1399
- var styles_module_default5 = { "Modal": "_Modal_vim19_1", "Modal--isOpen": "_Modal--isOpen_vim19_15", "Modal-inner": "_Modal-inner_vim19_19" };
1498
+ var styles_module_default6 = { "Modal": "_Modal_vim19_1", "Modal--isOpen": "_Modal--isOpen_vim19_15", "Modal-inner": "_Modal-inner_vim19_19" };
1400
1499
 
1401
1500
  // components/Modal/index.tsx
1402
1501
  import { createPortal } from "react-dom";
1403
- import { jsx as jsx10 } from "react/jsx-runtime";
1404
- var getClassName6 = get_class_name_factory_default("Modal", styles_module_default5);
1502
+ import { jsx as jsx11 } from "react/jsx-runtime";
1503
+ var getClassName7 = get_class_name_factory_default("Modal", styles_module_default6);
1405
1504
  var Modal = ({
1406
1505
  children,
1407
1506
  onClose,
@@ -1412,13 +1511,13 @@ var Modal = ({
1412
1511
  setRootEl(document.getElementById("editor-portal-root"));
1413
1512
  }, []);
1414
1513
  if (!rootEl) {
1415
- return /* @__PURE__ */ jsx10("div", {});
1514
+ return /* @__PURE__ */ jsx11("div", {});
1416
1515
  }
1417
1516
  return createPortal(
1418
- /* @__PURE__ */ jsx10("div", { className: getClassName6({ isOpen }), onClick: onClose, children: /* @__PURE__ */ jsx10(
1517
+ /* @__PURE__ */ jsx11("div", { className: getClassName7({ isOpen }), onClick: onClose, children: /* @__PURE__ */ jsx11(
1419
1518
  "div",
1420
1519
  {
1421
- className: getClassName6("inner"),
1520
+ className: getClassName7("inner"),
1422
1521
  onClick: (e) => e.stopPropagation(),
1423
1522
  children
1424
1523
  }
@@ -1432,17 +1531,17 @@ init_react_import();
1432
1531
 
1433
1532
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Heading/styles.module.css#css-module
1434
1533
  init_react_import();
1435
- var styles_module_default6 = { "Heading": "_Heading_1537i_1", "Heading--xxxxl": "_Heading--xxxxl_1537i_13", "Heading--xxxl": "_Heading--xxxl_1537i_19", "Heading--xxl": "_Heading--xxl_1537i_23", "Heading--xl": "_Heading--xl_1537i_27", "Heading--l": "_Heading--l_1537i_31", "Heading--m": "_Heading--m_1537i_35", "Heading--s": "_Heading--s_1537i_39", "Heading--xs": "_Heading--xs_1537i_43" };
1534
+ var styles_module_default7 = { "Heading": "_Heading_1537i_1", "Heading--xxxxl": "_Heading--xxxxl_1537i_13", "Heading--xxxl": "_Heading--xxxl_1537i_19", "Heading--xxl": "_Heading--xxl_1537i_23", "Heading--xl": "_Heading--xl_1537i_27", "Heading--l": "_Heading--l_1537i_31", "Heading--m": "_Heading--m_1537i_35", "Heading--s": "_Heading--s_1537i_39", "Heading--xs": "_Heading--xs_1537i_43" };
1436
1535
 
1437
1536
  // components/Heading/index.tsx
1438
- import { jsx as jsx11 } from "react/jsx-runtime";
1439
- var getClassName7 = get_class_name_factory_default("Heading", styles_module_default6);
1537
+ import { jsx as jsx12 } from "react/jsx-runtime";
1538
+ var getClassName8 = get_class_name_factory_default("Heading", styles_module_default7);
1440
1539
  var Heading = ({ children, rank, size = "m" }) => {
1441
1540
  const Tag = rank ? `h${rank}` : "span";
1442
- return /* @__PURE__ */ jsx11(
1541
+ return /* @__PURE__ */ jsx12(
1443
1542
  Tag,
1444
1543
  {
1445
- className: getClassName7({
1544
+ className: getClassName8({
1446
1545
  [size]: true
1447
1546
  }),
1448
1547
  children
@@ -1454,9 +1553,9 @@ var Heading = ({ children, rank, size = "m" }) => {
1454
1553
  init_react_import();
1455
1554
 
1456
1555
  // components/ExternalInput/index.tsx
1457
- import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
1458
- var getClassName8 = get_class_name_factory_default("ExternalInput", styles_module_default4);
1459
- var getClassNameModal = get_class_name_factory_default("ExternalInputModal", styles_module_default4);
1556
+ import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
1557
+ var getClassName9 = get_class_name_factory_default("ExternalInput", styles_module_default5);
1558
+ var getClassNameModal = get_class_name_factory_default("ExternalInputModal", styles_module_default5);
1460
1559
  var dataCache = {};
1461
1560
  var ExternalInput = ({
1462
1561
  field,
@@ -1494,7 +1593,7 @@ var ExternalInput = ({
1494
1593
  return Array.from(validKeys);
1495
1594
  }, [mappedData]);
1496
1595
  const [searchQuery, setSearchQuery] = useState7(field.initialQuery || "");
1497
- const search = useCallback3(
1596
+ const search = useCallback4(
1498
1597
  (query, filters2) => __async(null, null, function* () {
1499
1598
  setIsLoading(true);
1500
1599
  const cacheKey = `${id}-${query}-${JSON.stringify(filters2)}`;
@@ -1514,8 +1613,8 @@ var ExternalInput = ({
1514
1613
  }),
1515
1614
  [id, field]
1516
1615
  );
1517
- const Footer = useCallback3(
1518
- (props) => field.renderFooter ? field.renderFooter(props) : /* @__PURE__ */ jsxs4("span", { className: getClassNameModal("footer"), children: [
1616
+ const Footer = useCallback4(
1617
+ (props) => field.renderFooter ? field.renderFooter(props) : /* @__PURE__ */ jsxs5("span", { className: getClassNameModal("footer"), children: [
1519
1618
  props.items.length,
1520
1619
  " result",
1521
1620
  props.items.length === 1 ? "" : "s"
@@ -1525,41 +1624,41 @@ var ExternalInput = ({
1525
1624
  useEffect5(() => {
1526
1625
  search(searchQuery, filters);
1527
1626
  }, []);
1528
- return /* @__PURE__ */ jsxs4(
1627
+ return /* @__PURE__ */ jsxs5(
1529
1628
  "div",
1530
1629
  {
1531
- className: getClassName8({
1630
+ className: getClassName9({
1532
1631
  dataSelected: !!value,
1533
1632
  modalVisible: isOpen,
1534
1633
  readOnly
1535
1634
  }),
1536
1635
  id,
1537
1636
  children: [
1538
- /* @__PURE__ */ jsxs4("div", { className: getClassName8("actions"), children: [
1539
- /* @__PURE__ */ jsx12(
1637
+ /* @__PURE__ */ jsxs5("div", { className: getClassName9("actions"), children: [
1638
+ /* @__PURE__ */ jsx13(
1540
1639
  "button",
1541
1640
  {
1542
1641
  type: "button",
1543
1642
  onClick: () => setOpen(true),
1544
- className: getClassName8("button"),
1643
+ className: getClassName9("button"),
1545
1644
  disabled: readOnly,
1546
- children: value ? field.getItemSummary ? field.getItemSummary(value) : "External item" : /* @__PURE__ */ jsx12("span", { children: field.placeholder })
1645
+ children: value ? field.getItemSummary ? field.getItemSummary(value) : "External item" : /* @__PURE__ */ jsx13("span", { children: field.placeholder })
1547
1646
  }
1548
1647
  ),
1549
- value && /* @__PURE__ */ jsx12(
1648
+ value && /* @__PURE__ */ jsx13(
1550
1649
  "button",
1551
1650
  {
1552
1651
  type: "button",
1553
- className: getClassName8("detachButton"),
1652
+ className: getClassName9("detachButton"),
1554
1653
  onClick: () => {
1555
1654
  onChange(null);
1556
1655
  },
1557
1656
  disabled: readOnly,
1558
- children: /* @__PURE__ */ jsx12(X, { size: 16 })
1657
+ children: /* @__PURE__ */ jsx13(X, { size: 16 })
1559
1658
  }
1560
1659
  )
1561
1660
  ] }),
1562
- /* @__PURE__ */ jsx12(Modal, { onClose: () => setOpen(false), isOpen, children: /* @__PURE__ */ jsxs4(
1661
+ /* @__PURE__ */ jsx13(Modal, { onClose: () => setOpen(false), isOpen, children: /* @__PURE__ */ jsxs5(
1563
1662
  "form",
1564
1663
  {
1565
1664
  className: getClassNameModal({
@@ -1574,11 +1673,11 @@ var ExternalInput = ({
1574
1673
  search(searchQuery, filters);
1575
1674
  },
1576
1675
  children: [
1577
- /* @__PURE__ */ jsx12("div", { className: getClassNameModal("masthead"), children: field.showSearch ? /* @__PURE__ */ jsxs4("div", { className: getClassNameModal("searchForm"), children: [
1578
- /* @__PURE__ */ jsxs4("label", { className: getClassNameModal("search"), children: [
1579
- /* @__PURE__ */ jsx12("span", { className: getClassNameModal("searchIconText"), children: "Search" }),
1580
- /* @__PURE__ */ jsx12("div", { className: getClassNameModal("searchIcon"), children: /* @__PURE__ */ jsx12(Search, { size: "18" }) }),
1581
- /* @__PURE__ */ jsx12(
1676
+ /* @__PURE__ */ jsx13("div", { className: getClassNameModal("masthead"), children: field.showSearch ? /* @__PURE__ */ jsxs5("div", { className: getClassNameModal("searchForm"), children: [
1677
+ /* @__PURE__ */ jsxs5("label", { className: getClassNameModal("search"), children: [
1678
+ /* @__PURE__ */ jsx13("span", { className: getClassNameModal("searchIconText"), children: "Search" }),
1679
+ /* @__PURE__ */ jsx13("div", { className: getClassNameModal("searchIcon"), children: /* @__PURE__ */ jsx13(Search, { size: "18" }) }),
1680
+ /* @__PURE__ */ jsx13(
1582
1681
  "input",
1583
1682
  {
1584
1683
  className: getClassNameModal("searchInput"),
@@ -1593,9 +1692,9 @@ var ExternalInput = ({
1593
1692
  }
1594
1693
  )
1595
1694
  ] }),
1596
- /* @__PURE__ */ jsxs4("div", { className: getClassNameModal("searchActions"), children: [
1597
- /* @__PURE__ */ jsx12(Button, { type: "submit", loading: isLoading, fullWidth: true, children: "Search" }),
1598
- hasFilterFields && /* @__PURE__ */ jsx12("div", { className: getClassNameModal("searchActionIcon"), children: /* @__PURE__ */ jsx12(
1695
+ /* @__PURE__ */ jsxs5("div", { className: getClassNameModal("searchActions"), children: [
1696
+ /* @__PURE__ */ jsx13(Button, { type: "submit", loading: isLoading, fullWidth: true, children: "Search" }),
1697
+ hasFilterFields && /* @__PURE__ */ jsx13("div", { className: getClassNameModal("searchActionIcon"), children: /* @__PURE__ */ jsx13(
1599
1698
  IconButton,
1600
1699
  {
1601
1700
  type: "button",
@@ -1605,19 +1704,19 @@ var ExternalInput = ({
1605
1704
  e.stopPropagation();
1606
1705
  setFiltersToggled(!filtersToggled);
1607
1706
  },
1608
- children: /* @__PURE__ */ jsx12(SlidersHorizontal, { size: 20 })
1707
+ children: /* @__PURE__ */ jsx13(SlidersHorizontal, { size: 20 })
1609
1708
  }
1610
1709
  ) })
1611
1710
  ] })
1612
- ] }) : /* @__PURE__ */ jsx12(Heading, { rank: "2", size: "xs", children: field.placeholder || "Select data" }) }),
1613
- /* @__PURE__ */ jsxs4("div", { className: getClassNameModal("grid"), children: [
1614
- hasFilterFields && /* @__PURE__ */ jsx12("div", { className: getClassNameModal("filters"), children: hasFilterFields && Object.keys(filterFields).map((fieldName) => {
1711
+ ] }) : /* @__PURE__ */ jsx13(Heading, { rank: "2", size: "xs", children: field.placeholder || "Select data" }) }),
1712
+ /* @__PURE__ */ jsxs5("div", { className: getClassNameModal("grid"), children: [
1713
+ hasFilterFields && /* @__PURE__ */ jsx13("div", { className: getClassNameModal("filters"), children: hasFilterFields && Object.keys(filterFields).map((fieldName) => {
1615
1714
  const filterField = filterFields[fieldName];
1616
- return /* @__PURE__ */ jsx12(
1715
+ return /* @__PURE__ */ jsx13(
1617
1716
  "div",
1618
1717
  {
1619
1718
  className: getClassNameModal("field"),
1620
- children: /* @__PURE__ */ jsx12(FieldLabel, { label: filterField.label || fieldName, children: /* @__PURE__ */ jsx12(
1719
+ children: /* @__PURE__ */ jsx13(FieldLabel, { label: filterField.label || fieldName, children: /* @__PURE__ */ jsx13(
1621
1720
  AutoField,
1622
1721
  {
1623
1722
  field: filterField,
@@ -1638,9 +1737,9 @@ var ExternalInput = ({
1638
1737
  fieldName
1639
1738
  );
1640
1739
  }) }),
1641
- /* @__PURE__ */ jsxs4("div", { className: getClassNameModal("tableWrapper"), children: [
1642
- /* @__PURE__ */ jsxs4("table", { className: getClassNameModal("table"), children: [
1643
- /* @__PURE__ */ jsx12("thead", { className: getClassNameModal("thead"), children: /* @__PURE__ */ jsx12("tr", { className: getClassNameModal("tr"), children: keys.map((key) => /* @__PURE__ */ jsx12(
1740
+ /* @__PURE__ */ jsxs5("div", { className: getClassNameModal("tableWrapper"), children: [
1741
+ /* @__PURE__ */ jsxs5("table", { className: getClassNameModal("table"), children: [
1742
+ /* @__PURE__ */ jsx13("thead", { className: getClassNameModal("thead"), children: /* @__PURE__ */ jsx13("tr", { className: getClassNameModal("tr"), children: keys.map((key) => /* @__PURE__ */ jsx13(
1644
1743
  "th",
1645
1744
  {
1646
1745
  className: getClassNameModal("th"),
@@ -1649,8 +1748,8 @@ var ExternalInput = ({
1649
1748
  },
1650
1749
  key
1651
1750
  )) }) }),
1652
- /* @__PURE__ */ jsx12("tbody", { className: getClassNameModal("tbody"), children: mappedData.map((item, i) => {
1653
- return /* @__PURE__ */ jsx12(
1751
+ /* @__PURE__ */ jsx13("tbody", { className: getClassNameModal("tbody"), children: mappedData.map((item, i) => {
1752
+ return /* @__PURE__ */ jsx13(
1654
1753
  "tr",
1655
1754
  {
1656
1755
  style: { whiteSpace: "nowrap" },
@@ -1659,16 +1758,16 @@ var ExternalInput = ({
1659
1758
  onChange(mapProp(data[i]));
1660
1759
  setOpen(false);
1661
1760
  },
1662
- children: keys.map((key) => /* @__PURE__ */ jsx12("td", { className: getClassNameModal("td"), children: item[key] }, key))
1761
+ children: keys.map((key) => /* @__PURE__ */ jsx13("td", { className: getClassNameModal("td"), children: item[key] }, key))
1663
1762
  },
1664
1763
  i
1665
1764
  );
1666
1765
  }) })
1667
1766
  ] }),
1668
- /* @__PURE__ */ jsx12("div", { className: getClassNameModal("loadingBanner"), children: /* @__PURE__ */ jsx12(Loader, { size: 24 }) })
1767
+ /* @__PURE__ */ jsx13("div", { className: getClassNameModal("loadingBanner"), children: /* @__PURE__ */ jsx13(Loader, { size: 24 }) })
1669
1768
  ] })
1670
1769
  ] }),
1671
- /* @__PURE__ */ jsx12("div", { className: getClassNameModal("footerContainer"), children: /* @__PURE__ */ jsx12(Footer, { items: mappedData }) })
1770
+ /* @__PURE__ */ jsx13("div", { className: getClassNameModal("footerContainer"), children: /* @__PURE__ */ jsx13(Footer, { items: mappedData }) })
1672
1771
  ]
1673
1772
  }
1674
1773
  ) })
@@ -1678,7 +1777,7 @@ var ExternalInput = ({
1678
1777
  };
1679
1778
 
1680
1779
  // components/AutoField/fields/ExternalField/index.tsx
1681
- import { jsx as jsx13 } from "react/jsx-runtime";
1780
+ import { jsx as jsx14 } from "react/jsx-runtime";
1682
1781
  var ExternalField = ({
1683
1782
  field,
1684
1783
  onChange,
@@ -1703,13 +1802,13 @@ var ExternalField = ({
1703
1802
  if (field.type !== "external") {
1704
1803
  return null;
1705
1804
  }
1706
- return /* @__PURE__ */ jsx13(
1805
+ return /* @__PURE__ */ jsx14(
1707
1806
  Label2,
1708
1807
  {
1709
1808
  label: label || name,
1710
1809
  icon: labelIcon,
1711
1810
  el: "div",
1712
- children: /* @__PURE__ */ jsx13(
1811
+ children: /* @__PURE__ */ jsx14(
1713
1812
  ExternalInput,
1714
1813
  {
1715
1814
  name,
@@ -1736,8 +1835,8 @@ var ExternalField = ({
1736
1835
 
1737
1836
  // components/AutoField/fields/RadioField/index.tsx
1738
1837
  init_react_import();
1739
- import { jsx as jsx14, jsxs as jsxs5 } from "react/jsx-runtime";
1740
- var getClassName9 = get_class_name_factory_default("Input", styles_module_default);
1838
+ import { jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
1839
+ var getClassName10 = get_class_name_factory_default("Input", styles_module_default);
1741
1840
  var RadioField = ({
1742
1841
  field,
1743
1842
  onChange,
@@ -1752,25 +1851,25 @@ var RadioField = ({
1752
1851
  if (field.type !== "radio" || !field.options) {
1753
1852
  return null;
1754
1853
  }
1755
- return /* @__PURE__ */ jsx14(
1854
+ return /* @__PURE__ */ jsx15(
1756
1855
  Label2,
1757
1856
  {
1758
1857
  icon: labelIcon,
1759
1858
  label: label || name,
1760
1859
  readOnly,
1761
1860
  el: "div",
1762
- children: /* @__PURE__ */ jsx14("div", { className: getClassName9("radioGroupItems"), id, children: field.options.map((option) => {
1861
+ children: /* @__PURE__ */ jsx15("div", { className: getClassName10("radioGroupItems"), id, children: field.options.map((option) => {
1763
1862
  var _a;
1764
- return /* @__PURE__ */ jsxs5(
1863
+ return /* @__PURE__ */ jsxs6(
1765
1864
  "label",
1766
1865
  {
1767
- className: getClassName9("radio"),
1866
+ className: getClassName10("radio"),
1768
1867
  children: [
1769
- /* @__PURE__ */ jsx14(
1868
+ /* @__PURE__ */ jsx15(
1770
1869
  "input",
1771
1870
  {
1772
1871
  type: "radio",
1773
- className: getClassName9("radioInput"),
1872
+ className: getClassName10("radioInput"),
1774
1873
  value: JSON.stringify({ value: option.value }),
1775
1874
  name,
1776
1875
  onChange: (e) => {
@@ -1780,7 +1879,7 @@ var RadioField = ({
1780
1879
  checked: value === option.value
1781
1880
  }
1782
1881
  ),
1783
- /* @__PURE__ */ jsx14("div", { className: getClassName9("radioInner"), children: option.label || ((_a = option.value) == null ? void 0 : _a.toString()) })
1882
+ /* @__PURE__ */ jsx15("div", { className: getClassName10("radioInner"), children: option.label || ((_a = option.value) == null ? void 0 : _a.toString()) })
1784
1883
  ]
1785
1884
  },
1786
1885
  option.label + option.value
@@ -1799,19 +1898,19 @@ import * as SelectPrimitive from "@radix-ui/react-select";
1799
1898
 
1800
1899
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/ui/Select/styles.module.css#css-module
1801
1900
  init_react_import();
1802
- var styles_module_default7 = { "EditorSelect-trigger": "_EditorSelect-trigger_13s1k_3", "EditorSelect-triggerIcon": "_EditorSelect-triggerIcon_13s1k_54", "EditorSelect-content": "_EditorSelect-content_13s1k_61", "EditorSelect-viewport": "_EditorSelect-viewport_13s1k_84", "EditorSelect-item": "_EditorSelect-item_13s1k_93", "EditorSelect-itemIndicator": "_EditorSelect-itemIndicator_13s1k_119", "EditorSelect-group": "_EditorSelect-group_13s1k_131", "EditorSelect-label": "_EditorSelect-label_13s1k_135", "EditorSelect-separator": "_EditorSelect-separator_13s1k_144", "EditorSelect-scrollButton": "_EditorSelect-scrollButton_13s1k_152" };
1901
+ var styles_module_default8 = { "EditorSelect-trigger": "_EditorSelect-trigger_13s1k_3", "EditorSelect-triggerIcon": "_EditorSelect-triggerIcon_13s1k_54", "EditorSelect-content": "_EditorSelect-content_13s1k_61", "EditorSelect-viewport": "_EditorSelect-viewport_13s1k_84", "EditorSelect-item": "_EditorSelect-item_13s1k_93", "EditorSelect-itemIndicator": "_EditorSelect-itemIndicator_13s1k_119", "EditorSelect-group": "_EditorSelect-group_13s1k_131", "EditorSelect-label": "_EditorSelect-label_13s1k_135", "EditorSelect-separator": "_EditorSelect-separator_13s1k_144", "EditorSelect-scrollButton": "_EditorSelect-scrollButton_13s1k_152" };
1803
1902
 
1804
1903
  // components/ui/Select/index.tsx
1805
- import { jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
1806
- var getClassName10 = get_class_name_factory_default("EditorSelect", styles_module_default7);
1904
+ import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
1905
+ var getClassName11 = get_class_name_factory_default("EditorSelect", styles_module_default8);
1807
1906
  var joinClassNames = (...values) => values.filter(Boolean).join(" ");
1808
1907
  function Select(_a) {
1809
1908
  var props = __objRest(_a, []);
1810
- return /* @__PURE__ */ jsx15(SelectPrimitive.Root, __spreadValues({ "data-slot": "select" }, props));
1909
+ return /* @__PURE__ */ jsx16(SelectPrimitive.Root, __spreadValues({ "data-slot": "select" }, props));
1811
1910
  }
1812
1911
  function SelectValue(_a) {
1813
1912
  var props = __objRest(_a, []);
1814
- return /* @__PURE__ */ jsx15(SelectPrimitive.Value, __spreadValues({ "data-slot": "select-value" }, props));
1913
+ return /* @__PURE__ */ jsx16(SelectPrimitive.Value, __spreadValues({ "data-slot": "select-value" }, props));
1815
1914
  }
1816
1915
  function SelectTrigger(_a) {
1817
1916
  var _b = _a, {
@@ -1823,16 +1922,16 @@ function SelectTrigger(_a) {
1823
1922
  "size",
1824
1923
  "children"
1825
1924
  ]);
1826
- return /* @__PURE__ */ jsxs6(
1925
+ return /* @__PURE__ */ jsxs7(
1827
1926
  SelectPrimitive.Trigger,
1828
1927
  __spreadProps(__spreadValues({
1829
1928
  "data-slot": "select-trigger",
1830
1929
  "data-size": size,
1831
- className: joinClassNames(getClassName10("trigger"), className)
1930
+ className: joinClassNames(getClassName11("trigger"), className)
1832
1931
  }, props), {
1833
1932
  children: [
1834
1933
  children,
1835
- /* @__PURE__ */ jsx15(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx15(ChevronDown, { size: 16, className: getClassName10("triggerIcon") }) })
1934
+ /* @__PURE__ */ jsx16(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx16(ChevronDown, { size: 16, className: getClassName11("triggerIcon") }) })
1836
1935
  ]
1837
1936
  })
1838
1937
  );
@@ -1849,27 +1948,27 @@ function SelectContent(_a) {
1849
1948
  "position",
1850
1949
  "align"
1851
1950
  ]);
1852
- return /* @__PURE__ */ jsx15(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs6(
1951
+ return /* @__PURE__ */ jsx16(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs7(
1853
1952
  SelectPrimitive.Content,
1854
1953
  __spreadProps(__spreadValues({
1855
1954
  "data-slot": "select-content",
1856
1955
  "data-align-trigger": position === "item-aligned",
1857
1956
  "data-position": position,
1858
- className: joinClassNames(getClassName10("content"), className),
1957
+ className: joinClassNames(getClassName11("content"), className),
1859
1958
  position,
1860
1959
  align
1861
1960
  }, props), {
1862
1961
  children: [
1863
- /* @__PURE__ */ jsx15(SelectScrollUpButton, {}),
1864
- /* @__PURE__ */ jsx15(
1962
+ /* @__PURE__ */ jsx16(SelectScrollUpButton, {}),
1963
+ /* @__PURE__ */ jsx16(
1865
1964
  SelectPrimitive.Viewport,
1866
1965
  {
1867
1966
  "data-position": position,
1868
- className: getClassName10("viewport"),
1967
+ className: getClassName11("viewport"),
1869
1968
  children
1870
1969
  }
1871
1970
  ),
1872
- /* @__PURE__ */ jsx15(SelectScrollDownButton, {})
1971
+ /* @__PURE__ */ jsx16(SelectScrollDownButton, {})
1873
1972
  ]
1874
1973
  })
1875
1974
  ) });
@@ -1882,15 +1981,15 @@ function SelectItem(_a) {
1882
1981
  "className",
1883
1982
  "children"
1884
1983
  ]);
1885
- return /* @__PURE__ */ jsxs6(
1984
+ return /* @__PURE__ */ jsxs7(
1886
1985
  SelectPrimitive.Item,
1887
1986
  __spreadProps(__spreadValues({
1888
1987
  "data-slot": "select-item",
1889
- className: joinClassNames(getClassName10("item"), className)
1988
+ className: joinClassNames(getClassName11("item"), className)
1890
1989
  }, props), {
1891
1990
  children: [
1892
- /* @__PURE__ */ jsx15("span", { className: getClassName10("itemIndicator"), children: /* @__PURE__ */ jsx15(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx15(Check, { size: 14 }) }) }),
1893
- /* @__PURE__ */ jsx15(SelectPrimitive.ItemText, { children })
1991
+ /* @__PURE__ */ jsx16("span", { className: getClassName11("itemIndicator"), children: /* @__PURE__ */ jsx16(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx16(Check, { size: 14 }) }) }),
1992
+ /* @__PURE__ */ jsx16(SelectPrimitive.ItemText, { children })
1894
1993
  ]
1895
1994
  })
1896
1995
  );
@@ -1901,13 +2000,13 @@ function SelectScrollUpButton(_a) {
1901
2000
  } = _b, props = __objRest(_b, [
1902
2001
  "className"
1903
2002
  ]);
1904
- return /* @__PURE__ */ jsx15(
2003
+ return /* @__PURE__ */ jsx16(
1905
2004
  SelectPrimitive.ScrollUpButton,
1906
2005
  __spreadProps(__spreadValues({
1907
2006
  "data-slot": "select-scroll-up-button",
1908
- className: joinClassNames(getClassName10("scrollButton"), className)
2007
+ className: joinClassNames(getClassName11("scrollButton"), className)
1909
2008
  }, props), {
1910
- children: /* @__PURE__ */ jsx15(ChevronUp, { size: 14 })
2009
+ children: /* @__PURE__ */ jsx16(ChevronUp, { size: 14 })
1911
2010
  })
1912
2011
  );
1913
2012
  }
@@ -1917,19 +2016,19 @@ function SelectScrollDownButton(_a) {
1917
2016
  } = _b, props = __objRest(_b, [
1918
2017
  "className"
1919
2018
  ]);
1920
- return /* @__PURE__ */ jsx15(
2019
+ return /* @__PURE__ */ jsx16(
1921
2020
  SelectPrimitive.ScrollDownButton,
1922
2021
  __spreadProps(__spreadValues({
1923
2022
  "data-slot": "select-scroll-down-button",
1924
- className: joinClassNames(getClassName10("scrollButton"), className)
2023
+ className: joinClassNames(getClassName11("scrollButton"), className)
1925
2024
  }, props), {
1926
- children: /* @__PURE__ */ jsx15(ChevronDown, { size: 14 })
2025
+ children: /* @__PURE__ */ jsx16(ChevronDown, { size: 14 })
1927
2026
  })
1928
2027
  );
1929
2028
  }
1930
2029
 
1931
2030
  // components/AutoField/fields/SelectField/index.tsx
1932
- import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
2031
+ import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
1933
2032
  var SelectField = ({
1934
2033
  field,
1935
2034
  onChange,
@@ -1945,7 +2044,7 @@ var SelectField = ({
1945
2044
  return null;
1946
2045
  }
1947
2046
  const serializedValue = JSON.stringify({ value });
1948
- return /* @__PURE__ */ jsx16(Label2, { label: label || name, icon: labelIcon, readOnly, children: /* @__PURE__ */ jsxs7(
2047
+ return /* @__PURE__ */ jsx17(Label2, { label: label || name, icon: labelIcon, readOnly, children: /* @__PURE__ */ jsxs8(
1949
2048
  Select,
1950
2049
  {
1951
2050
  value: serializedValue,
@@ -1954,8 +2053,8 @@ var SelectField = ({
1954
2053
  },
1955
2054
  disabled: readOnly,
1956
2055
  children: [
1957
- /* @__PURE__ */ jsx16(SelectTrigger, { id, style: { width: "100%" }, children: /* @__PURE__ */ jsx16(SelectValue, { placeholder: label || name }) }),
1958
- /* @__PURE__ */ jsx16(SelectContent, { children: field.options.map((option) => /* @__PURE__ */ jsx16(
2056
+ /* @__PURE__ */ jsx17(SelectTrigger, { id, style: { width: "100%" }, children: /* @__PURE__ */ jsx17(SelectValue, { placeholder: label || name }) }),
2057
+ /* @__PURE__ */ jsx17(SelectContent, { children: field.options.map((option) => /* @__PURE__ */ jsx17(
1959
2058
  SelectItem,
1960
2059
  {
1961
2060
  value: JSON.stringify({ value: option.value }),
@@ -1970,8 +2069,8 @@ var SelectField = ({
1970
2069
 
1971
2070
  // components/AutoField/fields/TextareaField/index.tsx
1972
2071
  init_react_import();
1973
- import { jsx as jsx17 } from "react/jsx-runtime";
1974
- var getClassName11 = get_class_name_factory_default("Input", styles_module_default);
2072
+ import { jsx as jsx18 } from "react/jsx-runtime";
2073
+ var getClassName12 = get_class_name_factory_default("Input", styles_module_default);
1975
2074
  var TextareaField = ({
1976
2075
  field,
1977
2076
  onChange,
@@ -1983,17 +2082,17 @@ var TextareaField = ({
1983
2082
  Label: Label2
1984
2083
  }) => {
1985
2084
  const [localValue, onChangeLocal] = useLocalValue(name, onChange);
1986
- return /* @__PURE__ */ jsx17(
2085
+ return /* @__PURE__ */ jsx18(
1987
2086
  Label2,
1988
2087
  {
1989
2088
  label: label || name,
1990
2089
  icon: labelIcon,
1991
2090
  readOnly,
1992
- children: /* @__PURE__ */ jsx17(
2091
+ children: /* @__PURE__ */ jsx18(
1993
2092
  "textarea",
1994
2093
  {
1995
2094
  id,
1996
- className: getClassName11("input"),
2095
+ className: getClassName12("input"),
1997
2096
  autoComplete: "off",
1998
2097
  name,
1999
2098
  value: typeof localValue === "undefined" ? "" : localValue,
@@ -2015,14 +2114,14 @@ import { lazy, Suspense } from "react";
2015
2114
  // components/RichTextEditor/components/EditorFallback.tsx
2016
2115
  init_react_import();
2017
2116
  import { memo as memo3 } from "react";
2018
- import { jsx as jsx18 } from "react/jsx-runtime";
2117
+ import { jsx as jsx19 } from "react/jsx-runtime";
2019
2118
  var EditorFallback = memo3((props) => {
2020
2119
  var _a;
2021
- return /* @__PURE__ */ jsx18(
2120
+ return /* @__PURE__ */ jsx19(
2022
2121
  EditorInner,
2023
2122
  __spreadProps(__spreadValues({}, props), {
2024
2123
  editor: null,
2025
- menu: /* @__PURE__ */ jsx18(
2124
+ menu: /* @__PURE__ */ jsx19(
2026
2125
  LoadedRichTextMenuInner,
2027
2126
  {
2028
2127
  field: props.field,
@@ -2031,7 +2130,7 @@ var EditorFallback = memo3((props) => {
2031
2130
  readOnly: (_a = props.readOnly) != null ? _a : false
2032
2131
  }
2033
2132
  ),
2034
- children: /* @__PURE__ */ jsx18(
2133
+ children: /* @__PURE__ */ jsx19(
2035
2134
  "div",
2036
2135
  {
2037
2136
  className: "rich-text",
@@ -2045,9 +2144,9 @@ var EditorFallback = memo3((props) => {
2045
2144
  EditorFallback.displayName = "EditorFallback";
2046
2145
 
2047
2146
  // components/AutoField/fields/RichtextField/index.tsx
2048
- import { Fragment as Fragment3, jsx as jsx19 } from "react/jsx-runtime";
2147
+ import { Fragment as Fragment3, jsx as jsx20 } from "react/jsx-runtime";
2049
2148
  var Editor = lazy(
2050
- () => import("./Editor-OSAG52QF.mjs").then((m) => ({
2149
+ () => import("./Editor-KXEVJBNG.mjs").then((m) => ({
2051
2150
  default: m.Editor
2052
2151
  }))
2053
2152
  );
@@ -2070,14 +2169,14 @@ var RichtextField = ({
2070
2169
  id,
2071
2170
  name
2072
2171
  };
2073
- return /* @__PURE__ */ jsx19(Fragment3, { children: /* @__PURE__ */ jsx19(
2172
+ return /* @__PURE__ */ jsx20(Fragment3, { children: /* @__PURE__ */ jsx20(
2074
2173
  Label2,
2075
2174
  {
2076
2175
  label: label || name,
2077
2176
  icon: labelIcon,
2078
2177
  readOnly,
2079
2178
  el: "div",
2080
- children: /* @__PURE__ */ jsx19(Suspense, { fallback: /* @__PURE__ */ jsx19(EditorFallback, __spreadValues({}, editorProps)), children: /* @__PURE__ */ jsx19(Editor, __spreadValues({}, editorProps)) })
2179
+ children: /* @__PURE__ */ jsx20(Suspense, { fallback: /* @__PURE__ */ jsx20(EditorFallback, __spreadValues({}, editorProps)), children: /* @__PURE__ */ jsx20(Editor, __spreadValues({}, editorProps)) })
2081
2180
  }
2082
2181
  ) });
2083
2182
  };
@@ -2087,11 +2186,11 @@ init_react_import();
2087
2186
 
2088
2187
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/AutoField/fields/ObjectField/styles.module.css#css-module
2089
2188
  init_react_import();
2090
- var styles_module_default8 = { "ObjectField": "_ObjectField_1byjv_5", "ObjectField-fieldset": "_ObjectField-fieldset_1byjv_13" };
2189
+ var styles_module_default9 = { "ObjectField": "_ObjectField_1byjv_5", "ObjectField-fieldset": "_ObjectField-fieldset_1byjv_13" };
2091
2190
 
2092
2191
  // components/AutoField/fields/ObjectField/index.tsx
2093
- import { jsx as jsx20 } from "react/jsx-runtime";
2094
- var getClassName12 = get_class_name_factory_default("ObjectField", styles_module_default8);
2192
+ import { jsx as jsx21 } from "react/jsx-runtime";
2193
+ var getClassName13 = get_class_name_factory_default("ObjectField", styles_module_default9);
2095
2194
  var ObjectField = ({
2096
2195
  field,
2097
2196
  onChange,
@@ -2114,17 +2213,17 @@ var ObjectField = ({
2114
2213
  if (field.type !== "object" || !field.objectFields) {
2115
2214
  return null;
2116
2215
  }
2117
- return /* @__PURE__ */ jsx20(
2216
+ return /* @__PURE__ */ jsx21(
2118
2217
  Label2,
2119
2218
  {
2120
2219
  label: label || name,
2121
2220
  icon: labelIcon,
2122
2221
  el: "div",
2123
2222
  readOnly,
2124
- children: /* @__PURE__ */ jsx20("div", { className: getClassName12(), children: /* @__PURE__ */ jsx20("fieldset", { className: getClassName12("fieldset"), children: Object.keys(field.objectFields).map((subName) => {
2223
+ children: /* @__PURE__ */ jsx21("div", { className: getClassName13(), children: /* @__PURE__ */ jsx21("fieldset", { className: getClassName13("fieldset"), children: Object.keys(field.objectFields).map((subName) => {
2125
2224
  const subField = field.objectFields[subName];
2126
2225
  const subPath = `${localName}.${subName}`;
2127
- return /* @__PURE__ */ jsx20(
2226
+ return /* @__PURE__ */ jsx21(
2128
2227
  SubField,
2129
2228
  {
2130
2229
  id: `${id}_${subName}`,
@@ -2161,8 +2260,8 @@ var useSafeId = () => {
2161
2260
 
2162
2261
  // components/AutoField/index.tsx
2163
2262
  import { useShallow as useShallow3 } from "zustand/react/shallow";
2164
- import { jsx as jsx21 } from "react/jsx-runtime";
2165
- var getClassName13 = get_class_name_factory_default("Input", styles_module_default);
2263
+ import { jsx as jsx22 } from "react/jsx-runtime";
2264
+ var getClassName14 = get_class_name_factory_default("Input", styles_module_default);
2166
2265
  var getClassNameWrapper = get_class_name_factory_default("InputWrapper", styles_module_default);
2167
2266
  var defaultFields = {
2168
2267
  array: ArrayField,
@@ -2173,6 +2272,7 @@ var defaultFields = {
2173
2272
  radio: RadioField,
2174
2273
  text: DefaultField,
2175
2274
  number: DefaultField,
2275
+ color: ColorField,
2176
2276
  richtext: RichtextField
2177
2277
  };
2178
2278
  function AutoFieldInternal(props) {
@@ -2192,7 +2292,7 @@ function AutoFieldInternal(props) {
2192
2292
  const resolvedId = id || defaultId;
2193
2293
  const render = useMemo5(
2194
2294
  () => {
2195
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j;
2295
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
2196
2296
  return __spreadProps(__spreadValues({}, overrides.fieldTypes), {
2197
2297
  custom: (_a2 = overrides.fieldTypes) == null ? void 0 : _a2.custom,
2198
2298
  array: ((_b = overrides.fieldTypes) == null ? void 0 : _b.array) || defaultFields.array,
@@ -2203,7 +2303,8 @@ function AutoFieldInternal(props) {
2203
2303
  radio: ((_g = overrides.fieldTypes) == null ? void 0 : _g.radio) || defaultFields.radio,
2204
2304
  text: ((_h = overrides.fieldTypes) == null ? void 0 : _h.text) || defaultFields.text,
2205
2305
  number: ((_i = overrides.fieldTypes) == null ? void 0 : _i.number) || defaultFields.number,
2206
- richtext: ((_j = overrides.fieldTypes) == null ? void 0 : _j.richtext) || defaultFields.richtext
2306
+ color: ((_j = overrides.fieldTypes) == null ? void 0 : _j.color) || defaultFields.color,
2307
+ richtext: ((_k = overrides.fieldTypes) == null ? void 0 : _k.richtext) || defaultFields.richtext
2207
2308
  });
2208
2309
  },
2209
2310
  [overrides]
@@ -2225,7 +2326,7 @@ function AutoFieldInternal(props) {
2225
2326
  }),
2226
2327
  [props, field, label, labelIcon, Label2, resolvedId, fieldValue]
2227
2328
  );
2228
- const onFocus = useCallback4(
2329
+ const onFocus = useCallback5(
2229
2330
  (e) => {
2230
2331
  if (mergedProps.name && (e.target.nodeName === "INPUT" || e.target.nodeName === "TEXTAREA")) {
2231
2332
  e.stopPropagation();
@@ -2239,7 +2340,7 @@ function AutoFieldInternal(props) {
2239
2340
  },
2240
2341
  [mergedProps.name]
2241
2342
  );
2242
- const onBlur = useCallback4((e) => {
2343
+ const onBlur = useCallback5((e) => {
2243
2344
  if ("name" in e.target) {
2244
2345
  dispatch({
2245
2346
  type: "setUi",
@@ -2276,14 +2377,14 @@ function AutoFieldInternal(props) {
2276
2377
  if (!FieldComponent) {
2277
2378
  throw new Error(`Field type for ${field.type} did not exist.`);
2278
2379
  }
2279
- return /* @__PURE__ */ jsx21(
2380
+ return /* @__PURE__ */ jsx22(
2280
2381
  NestedFieldContext.Provider,
2281
2382
  {
2282
2383
  value: {
2283
2384
  readOnlyFields: nestedFieldContext.readOnlyFields || readOnly || {},
2284
2385
  localName: (_a = nestedFieldContext.localName) != null ? _a : mergedProps.name
2285
2386
  },
2286
- children: /* @__PURE__ */ jsx21(
2387
+ children: /* @__PURE__ */ jsx22(
2287
2388
  "div",
2288
2389
  {
2289
2390
  className: getClassNameWrapper(),
@@ -2292,28 +2393,28 @@ function AutoFieldInternal(props) {
2292
2393
  onClick: (e) => {
2293
2394
  e.stopPropagation();
2294
2395
  },
2295
- children: /* @__PURE__ */ jsx21(FieldComponent, __spreadProps(__spreadValues({}, mergedProps), { children: /* @__PURE__ */ jsx21(Children, __spreadValues({}, mergedProps)) }))
2396
+ children: /* @__PURE__ */ jsx22(FieldComponent, __spreadProps(__spreadValues({}, mergedProps), { children: /* @__PURE__ */ jsx22(Children, __spreadValues({}, mergedProps)) }))
2296
2397
  }
2297
2398
  )
2298
2399
  }
2299
2400
  );
2300
2401
  }
2301
2402
  function AutoFieldPrivate(props) {
2302
- return /* @__PURE__ */ jsx21(AutoFieldInternal, __spreadValues({}, props));
2403
+ return /* @__PURE__ */ jsx22(AutoFieldInternal, __spreadValues({}, props));
2303
2404
  }
2304
2405
  function AutoFieldPublicInternal(_a) {
2305
2406
  var _b = _a, { value } = _b, props = __objRest(_b, ["value"]);
2306
2407
  const DefaultLabel = useMemo5(() => {
2307
- const DefaultLabel2 = (labelProps) => /* @__PURE__ */ jsx21(
2408
+ const DefaultLabel2 = (labelProps) => /* @__PURE__ */ jsx22(
2308
2409
  "div",
2309
2410
  __spreadProps(__spreadValues({}, labelProps), {
2310
- className: getClassName13({ readOnly: props.readOnly })
2411
+ className: getClassName14({ readOnly: props.readOnly })
2311
2412
  })
2312
2413
  );
2313
2414
  return DefaultLabel2;
2314
2415
  }, [props.readOnly]);
2315
2416
  const fieldStore = useFieldStoreApi();
2316
- const onChange = useCallback4(
2417
+ const onChange = useCallback5(
2317
2418
  (value2) => {
2318
2419
  if (!props.id) return;
2319
2420
  fieldStore.setState({ [props.id]: value2 });
@@ -2325,7 +2426,7 @@ function AutoFieldPublicInternal(_a) {
2325
2426
  if (!props.id) return;
2326
2427
  fieldStore.setState({ [props.id]: value });
2327
2428
  }, [props.id, value, fieldStore]);
2328
- return /* @__PURE__ */ jsx21(
2429
+ return /* @__PURE__ */ jsx22(
2329
2430
  AutoFieldInternal,
2330
2431
  __spreadProps(__spreadValues({}, props), {
2331
2432
  onChange,
@@ -2338,7 +2439,7 @@ function AutoField(props) {
2338
2439
  if (props.field.type === "slot") {
2339
2440
  return null;
2340
2441
  }
2341
- return /* @__PURE__ */ jsx21(fieldContextStore.Provider, { value: { [id]: props.value }, children: /* @__PURE__ */ jsx21(AutoFieldPublicInternal, __spreadProps(__spreadValues({}, props), { id })) });
2442
+ return /* @__PURE__ */ jsx22(fieldContextStore.Provider, { value: { [id]: props.value }, children: /* @__PURE__ */ jsx22(AutoFieldPublicInternal, __spreadProps(__spreadValues({}, props), { id })) });
2342
2443
  }
2343
2444
 
2344
2445
  // components/Render/index.tsx
@@ -2349,29 +2450,29 @@ init_react_import();
2349
2450
  import {
2350
2451
  forwardRef,
2351
2452
  memo as memo7,
2352
- useCallback as useCallback13,
2453
+ useCallback as useCallback14,
2353
2454
  useContext as useContext9,
2354
2455
  useEffect as useEffect16,
2355
2456
  useMemo as useMemo12,
2356
- useRef as useRef9
2457
+ useRef as useRef10
2357
2458
  } from "react";
2358
2459
 
2359
2460
  // components/DraggableComponent/index.tsx
2360
2461
  init_react_import();
2361
2462
  import {
2362
- useCallback as useCallback7,
2463
+ useCallback as useCallback8,
2363
2464
  useContext as useContext5,
2364
2465
  useEffect as useEffect8,
2365
2466
  useLayoutEffect,
2366
2467
  useMemo as useMemo7,
2367
- useRef as useRef2,
2468
+ useRef as useRef3,
2368
2469
  useState as useState9,
2369
2470
  useTransition
2370
2471
  } from "react";
2371
2472
 
2372
2473
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/DraggableComponent/styles.module.css#css-module
2373
2474
  init_react_import();
2374
- var styles_module_default9 = { "DraggableComponent": "_DraggableComponent_ie0on_1", "DraggableComponent-overlayWrapper": "_DraggableComponent-overlayWrapper_ie0on_12", "DraggableComponent-overlay": "_DraggableComponent-overlay_ie0on_12", "DraggableComponent-loadingOverlay": "_DraggableComponent-loadingOverlay_ie0on_36", "DraggableComponent--hover": "_DraggableComponent--hover_ie0on_53", "DraggableComponent--isSelected": "_DraggableComponent--isSelected_ie0on_60", "DraggableComponent--isGlobal": "_DraggableComponent--isGlobal_ie0on_69", "DraggableComponent-actionsOverlay": "_DraggableComponent-actionsOverlay_ie0on_105", "DraggableComponent-actions": "_DraggableComponent-actions_ie0on_105" };
2475
+ var styles_module_default10 = { "DraggableComponent": "_DraggableComponent_ie0on_1", "DraggableComponent-overlayWrapper": "_DraggableComponent-overlayWrapper_ie0on_12", "DraggableComponent-overlay": "_DraggableComponent-overlay_ie0on_12", "DraggableComponent-loadingOverlay": "_DraggableComponent-loadingOverlay_ie0on_36", "DraggableComponent--hover": "_DraggableComponent--hover_ie0on_53", "DraggableComponent--isSelected": "_DraggableComponent--isSelected_ie0on_60", "DraggableComponent--isGlobal": "_DraggableComponent--isGlobal_ie0on_69", "DraggableComponent-actionsOverlay": "_DraggableComponent-actionsOverlay_ie0on_105", "DraggableComponent-actions": "_DraggableComponent-actions_ie0on_105" };
2375
2476
 
2376
2477
  // components/DraggableComponent/index.tsx
2377
2478
  import { createPortal as createPortal2 } from "react-dom";
@@ -2399,11 +2500,11 @@ function getDeepScrollPosition(element) {
2399
2500
  init_react_import();
2400
2501
  import {
2401
2502
  createContext as createContext3,
2402
- useCallback as useCallback5,
2503
+ useCallback as useCallback6,
2403
2504
  useMemo as useMemo6
2404
2505
  } from "react";
2405
2506
  import { createStore as createStore3 } from "zustand";
2406
- import { Fragment as Fragment4, jsx as jsx22 } from "react/jsx-runtime";
2507
+ import { Fragment as Fragment4, jsx as jsx23 } from "react/jsx-runtime";
2407
2508
  var dropZoneContext = createContext3(null);
2408
2509
  var ZoneStoreContext = createContext3(
2409
2510
  createStore3(() => ({
@@ -2426,14 +2527,14 @@ var ZoneStoreProvider = ({
2426
2527
  children,
2427
2528
  store
2428
2529
  }) => {
2429
- return /* @__PURE__ */ jsx22(ZoneStoreContext.Provider, { value: store, children });
2530
+ return /* @__PURE__ */ jsx23(ZoneStoreContext.Provider, { value: store, children });
2430
2531
  };
2431
2532
  var DropZoneProvider = ({
2432
2533
  children,
2433
2534
  value
2434
2535
  }) => {
2435
2536
  const dispatch = useAppStore((s) => s.dispatch);
2436
- const registerZone = useCallback5(
2537
+ const registerZone = useCallback6(
2437
2538
  (zoneCompound) => {
2438
2539
  dispatch({
2439
2540
  type: "registerZone",
@@ -2448,7 +2549,7 @@ var DropZoneProvider = ({
2448
2549
  }, value),
2449
2550
  [value]
2450
2551
  );
2451
- return /* @__PURE__ */ jsx22(Fragment4, { children: memoValue && /* @__PURE__ */ jsx22(dropZoneContext.Provider, { value: memoValue, children }) });
2552
+ return /* @__PURE__ */ jsx23(Fragment4, { children: memoValue && /* @__PURE__ */ jsx23(dropZoneContext.Provider, { value: memoValue, children }) });
2452
2553
  };
2453
2554
 
2454
2555
  // components/DraggableComponent/index.tsx
@@ -2458,10 +2559,10 @@ import { Feedback } from "@dnd-kit/dom";
2458
2559
 
2459
2560
  // lib/dnd/use-on-drag-finished.ts
2460
2561
  init_react_import();
2461
- import { useCallback as useCallback6 } from "react";
2562
+ import { useCallback as useCallback7 } from "react";
2462
2563
  var useOnDragFinished = (cb, deps = []) => {
2463
2564
  const appStore = useAppStoreApi();
2464
- return useCallback6(() => {
2565
+ return useCallback7(() => {
2465
2566
  let dispose = () => {
2466
2567
  };
2467
2568
  const processDragging = (isDragging2) => {
@@ -2504,8 +2605,8 @@ function assignRefs(refs, node) {
2504
2605
  }
2505
2606
 
2506
2607
  // components/DraggableComponent/index.tsx
2507
- import { Fragment as Fragment5, jsx as jsx23, jsxs as jsxs8 } from "react/jsx-runtime";
2508
- var getClassName14 = get_class_name_factory_default("DraggableComponent", styles_module_default9);
2608
+ import { Fragment as Fragment5, jsx as jsx24, jsxs as jsxs9 } from "react/jsx-runtime";
2609
+ var getClassName15 = get_class_name_factory_default("DraggableComponent", styles_module_default10);
2509
2610
  var DEBUG2 = false;
2510
2611
  var MEASURE_EVERY_MS = 100;
2511
2612
  var space = 8;
@@ -2516,16 +2617,16 @@ var DefaultActionBar = ({
2516
2617
  label,
2517
2618
  children,
2518
2619
  parentAction
2519
- }) => /* @__PURE__ */ jsxs8(ActionBar, { children: [
2520
- /* @__PURE__ */ jsxs8(ActionBar.Group, { children: [
2620
+ }) => /* @__PURE__ */ jsxs9(ActionBar, { children: [
2621
+ /* @__PURE__ */ jsxs9(ActionBar.Group, { children: [
2521
2622
  parentAction,
2522
- label && /* @__PURE__ */ jsx23(ActionBar.Label, { label })
2623
+ label && /* @__PURE__ */ jsx24(ActionBar.Label, { label })
2523
2624
  ] }),
2524
- /* @__PURE__ */ jsx23(ActionBar.Group, { children })
2625
+ /* @__PURE__ */ jsx24(ActionBar.Group, { children })
2525
2626
  ] });
2526
2627
  var DefaultOverlay = ({
2527
2628
  children
2528
- }) => /* @__PURE__ */ jsx23(Fragment5, { children });
2629
+ }) => /* @__PURE__ */ jsx24(Fragment5, { children });
2529
2630
  var DraggableComponent = ({
2530
2631
  children,
2531
2632
  depth,
@@ -2558,10 +2659,10 @@ var DraggableComponent = ({
2558
2659
  return ((_a = s.config.components[componentType]) == null ? void 0 : _a.global) === true;
2559
2660
  }
2560
2661
  );
2561
- const lastMeasureRef = useRef2(0);
2662
+ const lastMeasureRef = useRef3(0);
2562
2663
  const ctx = useContext5(dropZoneContext);
2563
2664
  const [localZones, setLocalZones] = useState9({});
2564
- const registerLocalZone = useCallback7(
2665
+ const registerLocalZone = useCallback8(
2565
2666
  (zoneCompound2, active) => {
2566
2667
  var _a;
2567
2668
  (_a = ctx == null ? void 0 : ctx.registerLocalZone) == null ? void 0 : _a.call(ctx, zoneCompound2, active);
@@ -2571,7 +2672,7 @@ var DraggableComponent = ({
2571
2672
  },
2572
2673
  [setLocalZones]
2573
2674
  );
2574
- const unregisterLocalZone = useCallback7(
2675
+ const unregisterLocalZone = useCallback8(
2575
2676
  (zoneCompound2) => {
2576
2677
  var _a;
2577
2678
  (_a = ctx == null ? void 0 : ctx.unregisterLocalZone) == null ? void 0 : _a.call(ctx, zoneCompound2);
@@ -2652,8 +2753,8 @@ var DraggableComponent = ({
2652
2753
  return cleanup;
2653
2754
  }, [permissions.drag, zoneCompound]);
2654
2755
  const [, setRerender] = useState9(0);
2655
- const ref = useRef2(null);
2656
- const refSetter = useCallback7(
2756
+ const ref = useRef3(null);
2757
+ const refSetter = useCallback8(
2657
2758
  (el) => {
2658
2759
  sortableRef(el);
2659
2760
  if (ref.current !== el) {
@@ -2673,7 +2774,7 @@ var DraggableComponent = ({
2673
2774
  iframe.enabled ? (_a = ref.current) == null ? void 0 : _a.ownerDocument.body : (_c = (_b = ref.current) == null ? void 0 : _b.closest("[data-editor-preview]")) != null ? _c : document.body
2674
2775
  );
2675
2776
  }, [iframe.enabled]);
2676
- const getStyle = useCallback7(() => {
2777
+ const getStyle = useCallback8(() => {
2677
2778
  var _a, _b;
2678
2779
  if (!ref.current) return;
2679
2780
  const el = ref.current;
@@ -2706,15 +2807,15 @@ var DraggableComponent = ({
2706
2807
  return style2;
2707
2808
  }, [iframe.enabled]);
2708
2809
  const [style, setStyle] = useState9();
2709
- const lastRectRef = useRef2(null);
2710
- const syncRafRef = useRef2(null);
2711
- const sync = useCallback7(() => {
2810
+ const lastRectRef = useRef3(null);
2811
+ const syncRafRef = useRef3(null);
2812
+ const sync = useCallback8(() => {
2712
2813
  setStyle(getStyle());
2713
2814
  if (itemRef) {
2714
2815
  assignRefs([itemRef], ref.current);
2715
2816
  }
2716
2817
  }, [getStyle, itemRef]);
2717
- const scheduleSync = useCallback7(() => {
2818
+ const scheduleSync = useCallback8(() => {
2718
2819
  if (syncRafRef.current != null) return;
2719
2820
  syncRafRef.current = requestAnimationFrame(() => {
2720
2821
  syncRafRef.current = null;
@@ -2742,13 +2843,13 @@ var DraggableComponent = ({
2742
2843
  }, [scheduleSync, itemRef]);
2743
2844
  const registerNode = useAppStore((s) => s.nodes.registerNode);
2744
2845
  const unregisterNode = useAppStore((s) => s.nodes.unregisterNode);
2745
- const hideOverlay = useCallback7(() => {
2846
+ const hideOverlay = useCallback8(() => {
2746
2847
  setIsVisible(false);
2747
2848
  }, []);
2748
- const showOverlay = useCallback7(() => {
2849
+ const showOverlay = useCallback8(() => {
2749
2850
  setIsVisible(true);
2750
2851
  }, []);
2751
- const nodeHandleRef = useRef2({
2852
+ const nodeHandleRef = useRef3({
2752
2853
  sync: () => null,
2753
2854
  hideOverlay: () => null,
2754
2855
  showOverlay: () => null
@@ -2772,7 +2873,7 @@ var DraggableComponent = ({
2772
2873
  () => overrides.componentOverlay || DefaultOverlay,
2773
2874
  [overrides.componentOverlay]
2774
2875
  );
2775
- const onClick = useCallback7(
2876
+ const onClick = useCallback8(
2776
2877
  (e) => {
2777
2878
  const userIsDragging = !!zoneStore.getState().draggedItem;
2778
2879
  if (userIsDragging) {
@@ -2801,7 +2902,7 @@ var DraggableComponent = ({
2801
2902
  [index, zoneCompound, id, isSelected, fullScreenCanvas]
2802
2903
  );
2803
2904
  const appStore = useAppStoreApi();
2804
- const onSelectParent = useCallback7(() => {
2905
+ const onSelectParent = useCallback8(() => {
2805
2906
  const { nodes, zones } = appStore.getState().state.indexes;
2806
2907
  const node = nodes[id];
2807
2908
  const parentNode = (node == null ? void 0 : node.parentId) ? nodes[node == null ? void 0 : node.parentId] : null;
@@ -2822,14 +2923,14 @@ var DraggableComponent = ({
2822
2923
  }
2823
2924
  });
2824
2925
  }, [ctx, path]);
2825
- const onDuplicate = useCallback7(() => {
2926
+ const onDuplicate = useCallback8(() => {
2826
2927
  dispatch({
2827
2928
  type: "duplicate",
2828
2929
  sourceIndex: index,
2829
2930
  sourceZone: zoneCompound
2830
2931
  });
2831
2932
  }, [index, zoneCompound]);
2832
- const onDelete = useCallback7(() => {
2933
+ const onDelete = useCallback8(() => {
2833
2934
  dispatch({
2834
2935
  type: "remove",
2835
2936
  index,
@@ -2956,7 +3057,7 @@ var DraggableComponent = ({
2956
3057
  cancelAnimationFrame(frame);
2957
3058
  };
2958
3059
  }, [dragFinished, isSelected, thisIsDragging, scheduleSync]);
2959
- const syncActionsPosition = useCallback7(
3060
+ const syncActionsPosition = useCallback8(
2960
3061
  (el) => {
2961
3062
  if (el) {
2962
3063
  const view = el.ownerDocument.defaultView;
@@ -2996,7 +3097,7 @@ var DraggableComponent = ({
2996
3097
  setDragAxis(autoDragAxis);
2997
3098
  }, [ref, userDragAxis, autoDragAxis]);
2998
3099
  const parentAction = useMemo7(
2999
- () => (ctx == null ? void 0 : ctx.areaId) && (ctx == null ? void 0 : ctx.areaId) !== "root" && /* @__PURE__ */ jsx23(ActionBar.Action, { onClick: onSelectParent, label: "Select parent", children: /* @__PURE__ */ jsx23(CornerLeftUp, { size: 16 }) }),
3100
+ () => (ctx == null ? void 0 : ctx.areaId) && (ctx == null ? void 0 : ctx.areaId) !== "root" && /* @__PURE__ */ jsx24(ActionBar.Action, { onClick: onSelectParent, label: "Select parent", children: /* @__PURE__ */ jsx24(CornerLeftUp, { size: 16 }) }),
3000
3101
  [ctx == null ? void 0 : ctx.areaId]
3001
3102
  );
3002
3103
  const nextContextValue = useMemo7(
@@ -3025,12 +3126,12 @@ var DraggableComponent = ({
3025
3126
  }
3026
3127
  );
3027
3128
  const hasNormalActions = permissions.duplicate || permissions.delete;
3028
- return /* @__PURE__ */ jsxs8(DropZoneProvider, { value: nextContextValue, children: [
3129
+ return /* @__PURE__ */ jsxs9(DropZoneProvider, { value: nextContextValue, children: [
3029
3130
  dragFinished && isVisible && createPortal2(
3030
- /* @__PURE__ */ jsxs8(
3131
+ /* @__PURE__ */ jsxs9(
3031
3132
  "div",
3032
3133
  {
3033
- className: getClassName14({
3134
+ className: getClassName15({
3034
3135
  isSelected,
3035
3136
  isDragging: thisIsDragging,
3036
3137
  hover: hover || indicativeHover,
@@ -3040,18 +3141,18 @@ var DraggableComponent = ({
3040
3141
  "data-editor-overlay": true,
3041
3142
  children: [
3042
3143
  debug,
3043
- isLoading && /* @__PURE__ */ jsx23("div", { className: getClassName14("loadingOverlay"), children: /* @__PURE__ */ jsx23(Loader, {}) }),
3044
- /* @__PURE__ */ jsx23(
3144
+ isLoading && /* @__PURE__ */ jsx24("div", { className: getClassName15("loadingOverlay"), children: /* @__PURE__ */ jsx24(Loader, {}) }),
3145
+ /* @__PURE__ */ jsx24(
3045
3146
  "div",
3046
3147
  {
3047
- className: getClassName14("actionsOverlay"),
3148
+ className: getClassName15("actionsOverlay"),
3048
3149
  style: {
3049
3150
  top: actionsOverlayTop / zoom
3050
3151
  },
3051
- children: /* @__PURE__ */ jsx23(
3152
+ children: /* @__PURE__ */ jsx24(
3052
3153
  "div",
3053
3154
  {
3054
- className: getClassName14("actions"),
3155
+ className: getClassName15("actions"),
3055
3156
  style: {
3056
3157
  transform: `scale(${1 / zoom}`,
3057
3158
  top: actionsTop / zoom,
@@ -3060,14 +3161,14 @@ var DraggableComponent = ({
3060
3161
  paddingRight: actionsSide
3061
3162
  },
3062
3163
  ref: syncActionsPosition,
3063
- children: /* @__PURE__ */ jsxs8(
3164
+ children: /* @__PURE__ */ jsxs9(
3064
3165
  CustomActionBar,
3065
3166
  {
3066
3167
  parentAction,
3067
3168
  label: DEBUG2 ? id : label,
3068
3169
  children: [
3069
- richText && /* @__PURE__ */ jsxs8(Fragment5, { children: [
3070
- /* @__PURE__ */ jsx23(
3170
+ richText && /* @__PURE__ */ jsxs9(Fragment5, { children: [
3171
+ /* @__PURE__ */ jsx24(
3071
3172
  LoadedRichTextMenu,
3072
3173
  {
3073
3174
  editor: richText.editor,
@@ -3076,10 +3177,10 @@ var DraggableComponent = ({
3076
3177
  readOnly: false
3077
3178
  }
3078
3179
  ),
3079
- hasNormalActions && /* @__PURE__ */ jsx23(ActionBar.Separator, {})
3180
+ hasNormalActions && /* @__PURE__ */ jsx24(ActionBar.Separator, {})
3080
3181
  ] }),
3081
- permissions.duplicate && /* @__PURE__ */ jsx23(ActionBar.Action, { onClick: onDuplicate, label: "Duplicate", children: /* @__PURE__ */ jsx23(Copy, { size: 16 }) }),
3082
- permissions.delete && /* @__PURE__ */ jsx23(ActionBar.Action, { onClick: onDelete, label: "Delete", children: /* @__PURE__ */ jsx23(Trash, { size: 16 }) })
3182
+ permissions.duplicate && /* @__PURE__ */ jsx24(ActionBar.Action, { onClick: onDuplicate, label: "Duplicate", children: /* @__PURE__ */ jsx24(Copy, { size: 16 }) }),
3183
+ permissions.delete && /* @__PURE__ */ jsx24(ActionBar.Action, { onClick: onDelete, label: "Delete", children: /* @__PURE__ */ jsx24(Trash, { size: 16 }) })
3083
3184
  ]
3084
3185
  }
3085
3186
  )
@@ -3087,14 +3188,14 @@ var DraggableComponent = ({
3087
3188
  )
3088
3189
  }
3089
3190
  ),
3090
- /* @__PURE__ */ jsx23("div", { className: getClassName14("overlayWrapper"), children: /* @__PURE__ */ jsx23(
3191
+ /* @__PURE__ */ jsx24("div", { className: getClassName15("overlayWrapper"), children: /* @__PURE__ */ jsx24(
3091
3192
  CustomOverlay,
3092
3193
  {
3093
3194
  componentId: id,
3094
3195
  componentType,
3095
3196
  hover,
3096
3197
  isSelected,
3097
- children: /* @__PURE__ */ jsx23("div", { className: getClassName14("overlay") })
3198
+ children: /* @__PURE__ */ jsx24("div", { className: getClassName15("overlay") })
3098
3199
  }
3099
3200
  ) })
3100
3201
  ]
@@ -3108,7 +3209,7 @@ var DraggableComponent = ({
3108
3209
 
3109
3210
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/DropZone/styles.module.css#css-module
3110
3211
  init_react_import();
3111
- var styles_module_default10 = { "DropZone": "_DropZone_1h108_1", "DropZone--hasChildren": "_DropZone--hasChildren_1h108_11", "DropZone--isAreaSelected": "_DropZone--isAreaSelected_1h108_24", "DropZone--hoveringOverArea": "_DropZone--hoveringOverArea_1h108_25", "DropZone--isRootZone": "_DropZone--isRootZone_1h108_25", "DropZone--isDestination": "_DropZone--isDestination_1h108_39", "DropZone-item": "_DropZone-item_1h108_48", "DropZone-hitbox": "_DropZone-hitbox_1h108_52", "DropZone--isEnabled": "_DropZone--isEnabled_1h108_60", "DropZone--isAnimating": "_DropZone--isAnimating_1h108_70" };
3212
+ var styles_module_default11 = { "DropZone": "_DropZone_1h108_1", "DropZone--hasChildren": "_DropZone--hasChildren_1h108_11", "DropZone--isAreaSelected": "_DropZone--isAreaSelected_1h108_24", "DropZone--hoveringOverArea": "_DropZone--hoveringOverArea_1h108_25", "DropZone--isRootZone": "_DropZone--isRootZone_1h108_25", "DropZone--isDestination": "_DropZone--isDestination_1h108_39", "DropZone-item": "_DropZone-item_1h108_48", "DropZone-hitbox": "_DropZone-hitbox_1h108_52", "DropZone--isEnabled": "_DropZone--isEnabled_1h108_60", "DropZone--isAnimating": "_DropZone--isAnimating_1h108_70" };
3112
3213
 
3113
3214
  // components/DropZone/index.tsx
3114
3215
  import { useDroppable as useDroppable2 } from "@dnd-kit/react";
@@ -3118,7 +3219,7 @@ init_react_import();
3118
3219
 
3119
3220
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Drawer/styles.module.css#css-module
3120
3221
  init_react_import();
3121
- var styles_module_default11 = { "Drawer": "_Drawer_146py_1", "Drawer--tile": "_Drawer--tile_146py_8", "Drawer-draggable": "_Drawer-draggable_146py_19", "Drawer-draggableBg": "_Drawer-draggableBg_146py_23", "DrawerItem-draggable": "_DrawerItem-draggable_146py_33", "DrawerItem-icon": "_DrawerItem-icon_146py_50", "DrawerItem--disabled": "_DrawerItem--disabled_146py_56", "DrawerItem": "_DrawerItem_146py_33", "Drawer--isDraggingFrom": "_Drawer--isDraggingFrom_146py_66", "DrawerItem-name": "_DrawerItem-name_146py_91" };
3222
+ var styles_module_default12 = { "Drawer": "_Drawer_146py_1", "Drawer--tile": "_Drawer--tile_146py_8", "Drawer-draggable": "_Drawer-draggable_146py_19", "Drawer-draggableBg": "_Drawer-draggableBg_146py_23", "DrawerItem-draggable": "_DrawerItem-draggable_146py_33", "DrawerItem-icon": "_DrawerItem-icon_146py_50", "DrawerItem--disabled": "_DrawerItem--disabled_146py_56", "DrawerItem": "_DrawerItem_146py_33", "Drawer--isDraggingFrom": "_Drawer--isDraggingFrom_146py_66", "DrawerItem-name": "_DrawerItem-name_146py_91" };
3122
3223
 
3123
3224
  // components/Drawer/index.tsx
3124
3225
  import { useMemo as useMemo9, useState as useState11 } from "react";
@@ -3128,11 +3229,11 @@ init_react_import();
3128
3229
  import { DragDropProvider as DragDropProvider2 } from "@dnd-kit/react";
3129
3230
  import {
3130
3231
  createContext as createContext4,
3131
- useCallback as useCallback8,
3232
+ useCallback as useCallback9,
3132
3233
  useContext as useContext6,
3133
3234
  useEffect as useEffect9,
3134
3235
  useMemo as useMemo8,
3135
- useRef as useRef3,
3236
+ useRef as useRef4,
3136
3237
  useState as useState10
3137
3238
  } from "react";
3138
3239
  import {
@@ -3539,7 +3640,7 @@ function getDeepDir(el) {
3539
3640
 
3540
3641
  // components/DragDropContext/index.tsx
3541
3642
  import { effect } from "@dnd-kit/state";
3542
- import { jsx as jsx24 } from "react/jsx-runtime";
3643
+ import { jsx as jsx25 } from "react/jsx-runtime";
3543
3644
  var DEBUG3 = false;
3544
3645
  var dragListenerContext = createContext4({
3545
3646
  dragListeners: {}
@@ -3556,8 +3657,8 @@ function useDragListener(type, fn, deps = []) {
3556
3657
  }
3557
3658
  var AREA_CHANGE_DEBOUNCE_MS = 100;
3558
3659
  var useTempDisableFallback = (timeout3) => {
3559
- const lastFallbackDisable = useRef3(null);
3560
- return useCallback8((manager) => {
3660
+ const lastFallbackDisable = useRef4(null);
3661
+ return useCallback9((manager) => {
3561
3662
  collisionStore.setState({ fallbackEnabled: false });
3562
3663
  const fallbackId = generateId();
3563
3664
  lastFallbackDisable.current = fallbackId;
@@ -3576,7 +3677,7 @@ var DragDropContextClient = ({
3576
3677
  const dispatch = useAppStore((s) => s.dispatch);
3577
3678
  const instanceId = useAppStore((s) => s.instanceId);
3578
3679
  const appStore = useAppStoreApi();
3579
- const debouncedParamsRef = useRef3(null);
3680
+ const debouncedParamsRef = useRef4(null);
3580
3681
  const tempDisableFallback = useTempDisableFallback(100);
3581
3682
  const [zoneStore] = useState10(() => {
3582
3683
  const rootVirtualizers = /* @__PURE__ */ new Map();
@@ -3597,27 +3698,38 @@ var DragDropContextClient = ({
3597
3698
  },
3598
3699
  scrollToComponent: (id) => {
3599
3700
  const virtualizers = Array.from(rootVirtualizers.values());
3600
- if (virtualizers.length > 0) {
3601
- for (const handle of virtualizers) {
3602
- const index = handle.resolveIndex(id);
3603
- if (index < 0) {
3604
- continue;
3701
+ const scroll = () => {
3702
+ if (virtualizers.length > 0) {
3703
+ for (const handle of virtualizers) {
3704
+ const index = handle.resolveIndex(id);
3705
+ if (index < 0) continue;
3706
+ handle.virtualizer.scrollToIndex(index, {
3707
+ behavior: "smooth",
3708
+ align: "center"
3709
+ });
3605
3710
  }
3606
- handle.virtualizer.scrollToIndex(index, {
3607
- behavior: "auto",
3608
- // We avoid smooth scroll as this triggers virtualizer renders
3609
- align: "auto"
3610
- });
3711
+ return;
3611
3712
  }
3612
- } else {
3613
3713
  const frame = getFrame();
3614
- const el = frame == null ? void 0 : frame.querySelector(`[data-editor-component="${id}"]`);
3615
- el == null ? void 0 : el.scrollIntoView({ behavior: "smooth" });
3616
- }
3714
+ const el = frame == null ? void 0 : frame.querySelector(
3715
+ `[data-editor-component="${id}"]`
3716
+ );
3717
+ el == null ? void 0 : el.scrollIntoView({ behavior: "smooth", block: "center" });
3718
+ };
3719
+ requestAnimationFrame(() => requestAnimationFrame(scroll));
3617
3720
  }
3618
3721
  }));
3619
3722
  });
3620
- const getChanged = useCallback8(
3723
+ useEffect9(() => {
3724
+ appStore.setState({
3725
+ scrollToComponent: (id) => zoneStore.getState().scrollToComponent(id)
3726
+ });
3727
+ return () => {
3728
+ appStore.setState({ scrollToComponent: () => {
3729
+ } });
3730
+ };
3731
+ }, [appStore, zoneStore]);
3732
+ const getChanged = useCallback9(
3621
3733
  (params) => {
3622
3734
  const { zoneDepthIndex = {}, areaDepthIndex = {} } = zoneStore.getState() || {};
3623
3735
  const stateHasZone = Object.keys(zoneDepthIndex).length > 0;
@@ -3638,7 +3750,7 @@ var DragDropContextClient = ({
3638
3750
  },
3639
3751
  [zoneStore]
3640
3752
  );
3641
- const setDeepestAndCollide = useCallback8(
3753
+ const setDeepestAndCollide = useCallback9(
3642
3754
  (params, manager) => {
3643
3755
  const { zoneChanged, areaChanged } = getChanged(params);
3644
3756
  if (!zoneChanged && !areaChanged) return;
@@ -3727,8 +3839,8 @@ var DragDropContextClient = ({
3727
3839
  ]);
3728
3840
  const sensors = useSensors();
3729
3841
  const [dragListeners, setDragListeners] = useState10({});
3730
- const dragMode = useRef3(null);
3731
- const initialSelector = useRef3(void 0);
3842
+ const dragMode = useRef4(null);
3843
+ const initialSelector = useRef4(void 0);
3732
3844
  const nextContextValue = useMemo8(
3733
3845
  () => ({
3734
3846
  mode: "edit",
@@ -3737,14 +3849,14 @@ var DragDropContextClient = ({
3737
3849
  }),
3738
3850
  []
3739
3851
  );
3740
- return /* @__PURE__ */ jsx24(
3852
+ return /* @__PURE__ */ jsx25(
3741
3853
  dragListenerContext.Provider,
3742
3854
  {
3743
3855
  value: {
3744
3856
  dragListeners,
3745
3857
  setDragListeners
3746
3858
  },
3747
- children: /* @__PURE__ */ jsx24(
3859
+ children: /* @__PURE__ */ jsx25(
3748
3860
  DragDropProvider2,
3749
3861
  {
3750
3862
  plugins,
@@ -3960,7 +4072,7 @@ var DragDropContextClient = ({
3960
4072
  const entryEl = (_d = getFrame()) == null ? void 0 : _d.querySelector("[data-editor-entry]");
3961
4073
  entryEl == null ? void 0 : entryEl.setAttribute("data-editor-dragging", "true");
3962
4074
  },
3963
- children: /* @__PURE__ */ jsx24(ZoneStoreProvider, { store: zoneStore, children: /* @__PURE__ */ jsx24(DropZoneProvider, { value: nextContextValue, children }) })
4075
+ children: /* @__PURE__ */ jsx25(ZoneStoreProvider, { store: zoneStore, children: /* @__PURE__ */ jsx25(DropZoneProvider, { value: nextContextValue, children }) })
3964
4076
  }
3965
4077
  )
3966
4078
  }
@@ -3974,14 +4086,14 @@ var DragDropContext = ({
3974
4086
  if (status === "LOADING") {
3975
4087
  return children;
3976
4088
  }
3977
- return /* @__PURE__ */ jsx24(DragDropContextClient, { disableAutoScroll, children });
4089
+ return /* @__PURE__ */ jsx25(DragDropContextClient, { disableAutoScroll, children });
3978
4090
  };
3979
4091
 
3980
4092
  // components/Drawer/index.tsx
3981
4093
  import { useDraggable, useDroppable } from "@dnd-kit/react";
3982
- import { jsx as jsx25, jsxs as jsxs9 } from "react/jsx-runtime";
3983
- var getClassName15 = get_class_name_factory_default("Drawer", styles_module_default11);
3984
- var getClassNameItem2 = get_class_name_factory_default("DrawerItem", styles_module_default11);
4094
+ import { jsx as jsx26, jsxs as jsxs10 } from "react/jsx-runtime";
4095
+ var getClassName16 = get_class_name_factory_default("Drawer", styles_module_default12);
4096
+ var getClassNameItem2 = get_class_name_factory_default("DrawerItem", styles_module_default12);
3985
4097
  var DrawerItemInner = ({
3986
4098
  children,
3987
4099
  name,
@@ -3991,10 +4103,10 @@ var DrawerItemInner = ({
3991
4103
  isDragDisabled
3992
4104
  }) => {
3993
4105
  const CustomInner = useMemo9(
3994
- () => children || (({ children: children2 }) => /* @__PURE__ */ jsx25("div", { className: getClassNameItem2("default"), children: children2 })),
4106
+ () => children || (({ children: children2 }) => /* @__PURE__ */ jsx26("div", { className: getClassNameItem2("default"), children: children2 })),
3995
4107
  [children]
3996
4108
  );
3997
- return /* @__PURE__ */ jsx25(
4109
+ return /* @__PURE__ */ jsx26(
3998
4110
  "div",
3999
4111
  {
4000
4112
  className: getClassNameItem2({ disabled: isDragDisabled }),
@@ -4002,9 +4114,9 @@ var DrawerItemInner = ({
4002
4114
  onMouseDown: (e) => e.preventDefault(),
4003
4115
  "data-testid": dragRef ? `drawer-item:${name}` : "",
4004
4116
  "data-editor-drawer-item": true,
4005
- children: /* @__PURE__ */ jsx25(CustomInner, { name, children: /* @__PURE__ */ jsx25("div", { className: getClassNameItem2("draggableWrapper"), children: /* @__PURE__ */ jsxs9("div", { className: getClassNameItem2("draggable"), children: [
4006
- icon && /* @__PURE__ */ jsx25("div", { className: getClassNameItem2("icon"), children: icon }),
4007
- /* @__PURE__ */ jsx25("div", { className: getClassNameItem2("name"), children: label != null ? label : name })
4117
+ children: /* @__PURE__ */ jsx26(CustomInner, { name, children: /* @__PURE__ */ jsx26("div", { className: getClassNameItem2("draggableWrapper"), children: /* @__PURE__ */ jsxs10("div", { className: getClassNameItem2("draggable"), children: [
4118
+ icon && /* @__PURE__ */ jsx26("div", { className: getClassNameItem2("icon"), children: icon }),
4119
+ /* @__PURE__ */ jsx26("div", { className: getClassNameItem2("name"), children: label != null ? label : name })
4008
4120
  ] }) }) })
4009
4121
  }
4010
4122
  );
@@ -4023,9 +4135,9 @@ var DrawerItemDraggable = ({
4023
4135
  disabled: isDragDisabled,
4024
4136
  type: "drawer"
4025
4137
  });
4026
- return /* @__PURE__ */ jsxs9("div", { className: getClassName15("draggable"), children: [
4027
- /* @__PURE__ */ jsx25("div", { className: getClassName15("draggableBg"), children: /* @__PURE__ */ jsx25(DrawerItemInner, { name, label, icon, children }) }),
4028
- /* @__PURE__ */ jsx25("div", { className: getClassName15("draggableFg"), children: /* @__PURE__ */ jsx25(
4138
+ return /* @__PURE__ */ jsxs10("div", { className: getClassName16("draggable"), children: [
4139
+ /* @__PURE__ */ jsx26("div", { className: getClassName16("draggableBg"), children: /* @__PURE__ */ jsx26(DrawerItemInner, { name, label, icon, children }) }),
4140
+ /* @__PURE__ */ jsx26("div", { className: getClassName16("draggableFg"), children: /* @__PURE__ */ jsx26(
4029
4141
  DrawerItemInner,
4030
4142
  {
4031
4143
  name,
@@ -4061,7 +4173,7 @@ var DrawerItem = ({
4061
4173
  },
4062
4174
  [resolvedId]
4063
4175
  );
4064
- return /* @__PURE__ */ jsx25("div", { children: /* @__PURE__ */ jsx25(
4176
+ return /* @__PURE__ */ jsx26("div", { children: /* @__PURE__ */ jsx26(
4065
4177
  DrawerItemDraggable,
4066
4178
  {
4067
4179
  name,
@@ -4096,10 +4208,10 @@ var Drawer = ({
4096
4208
  collisionPriority: 0
4097
4209
  // Never collide with this, but we use it so NestedDroppablePlugin respects the Drawer
4098
4210
  });
4099
- return /* @__PURE__ */ jsx25(
4211
+ return /* @__PURE__ */ jsx26(
4100
4212
  "div",
4101
4213
  {
4102
- className: getClassName15({ [variant]: variant }),
4214
+ className: getClassName16({ [variant]: variant }),
4103
4215
  ref,
4104
4216
  "data-editor-dnd": id,
4105
4217
  "data-editor-drawer": true,
@@ -4115,7 +4227,7 @@ import { pointerIntersection } from "@dnd-kit/collision";
4115
4227
 
4116
4228
  // components/DropZone/lib/use-min-empty-height.ts
4117
4229
  init_react_import();
4118
- import { useEffect as useEffect10, useRef as useRef4, useState as useState12 } from "react";
4230
+ import { useEffect as useEffect10, useRef as useRef5, useState as useState12 } from "react";
4119
4231
  var getNumItems = (appStore, zoneCompound) => appStore.getState().state.indexes.zones[zoneCompound].contentIds.length;
4120
4232
  var useMinEmptyHeight = ({
4121
4233
  zoneCompound,
@@ -4132,7 +4244,7 @@ var useMinEmptyHeight = ({
4132
4244
  isZone: ((_b = s.draggedItem) == null ? void 0 : _b.data.zone) === zoneCompound
4133
4245
  };
4134
4246
  });
4135
- const numItems = useRef4(0);
4247
+ const numItems = useRef5(0);
4136
4248
  const onDragFinished = useOnDragFinished(
4137
4249
  (finished) => {
4138
4250
  if (finished) {
@@ -4184,10 +4296,10 @@ import { useContext as useContext7, useEffect as useEffect11, useState as useSta
4184
4296
  // lib/dnd/use-rendered-callback.ts
4185
4297
  init_react_import();
4186
4298
  import { useDragDropManager } from "@dnd-kit/react";
4187
- import { useCallback as useCallback9 } from "react";
4299
+ import { useCallback as useCallback10 } from "react";
4188
4300
  function useRenderedCallback(callback, deps) {
4189
4301
  const manager = useDragDropManager();
4190
- return useCallback9(
4302
+ return useCallback10(
4191
4303
  (...args) => __async(null, null, function* () {
4192
4304
  yield manager == null ? void 0 : manager.renderer.rendering;
4193
4305
  return callback(...args);
@@ -4258,7 +4370,7 @@ var useContentIdsWithPreview = (contentIds, zoneCompound) => {
4258
4370
 
4259
4371
  // components/DropZone/lib/use-drag-axis.ts
4260
4372
  init_react_import();
4261
- import { useCallback as useCallback10, useEffect as useEffect12, useState as useState14 } from "react";
4373
+ import { useCallback as useCallback11, useEffect as useEffect12, useState as useState14 } from "react";
4262
4374
  var GRID_DRAG_AXIS = "dynamic";
4263
4375
  var FLEX_ROW_DRAG_AXIS = "x";
4264
4376
  var DEFAULT_DRAG_AXIS = "y";
@@ -4267,7 +4379,7 @@ var useDragAxis = (ref, collisionAxis) => {
4267
4379
  const [dragAxis, setDragAxis] = useState14(
4268
4380
  collisionAxis || DEFAULT_DRAG_AXIS
4269
4381
  );
4270
- const calculateDragAxis = useCallback10(() => {
4382
+ const calculateDragAxis = useCallback11(() => {
4271
4383
  if (ref.current) {
4272
4384
  const computedStyle = window.getComputedStyle(ref.current);
4273
4385
  if (computedStyle.display === "grid") {
@@ -4298,7 +4410,7 @@ import { useShallow as useShallow6 } from "zustand/react/shallow";
4298
4410
  // components/SlotRender/index.tsx
4299
4411
  init_react_import();
4300
4412
  import { useShallow as useShallow5 } from "zustand/react/shallow";
4301
- import { jsx as jsx26 } from "react/jsx-runtime";
4413
+ import { jsx as jsx27 } from "react/jsx-runtime";
4302
4414
  var ContextSlotRender = ({
4303
4415
  componentId,
4304
4416
  zone
@@ -4313,7 +4425,7 @@ var ContextSlotRender = ({
4313
4425
  return contentIds.map((contentId) => indexes.nodes[contentId].flatData);
4314
4426
  })
4315
4427
  );
4316
- return /* @__PURE__ */ jsx26(
4428
+ return /* @__PURE__ */ jsx27(
4317
4429
  SlotRenderPure,
4318
4430
  {
4319
4431
  content: slotContent,
@@ -4326,10 +4438,10 @@ var ContextSlotRender = ({
4326
4438
 
4327
4439
  // lib/field-transforms/use-field-transforms-tracked.tsx
4328
4440
  init_react_import();
4329
- import { useMemo as useMemo10, useRef as useRef5 } from "react";
4441
+ import { useMemo as useMemo10, useRef as useRef6 } from "react";
4330
4442
  function useFieldTransformsTracked(config, item, transforms, readOnly, forceReadOnly) {
4331
- const prevProps = useRef5(null);
4332
- const prevResult = useRef5(item.props);
4443
+ const prevProps = useRef6(null);
4444
+ const prevResult = useRef6(item.props);
4333
4445
  const mappers = useMemo10(
4334
4446
  () => buildMappers(transforms, readOnly, forceReadOnly),
4335
4447
  [transforms, readOnly, forceReadOnly]
@@ -4372,7 +4484,7 @@ init_react_import();
4372
4484
 
4373
4485
  // components/InlineTextField/index.tsx
4374
4486
  init_react_import();
4375
- import { memo as memo4, useEffect as useEffect13, useRef as useRef6, useState as useState15 } from "react";
4487
+ import { memo as memo4, useEffect as useEffect13, useRef as useRef7, useState as useState15 } from "react";
4376
4488
 
4377
4489
  // lib/overlay-portal/index.tsx
4378
4490
  init_react_import();
@@ -4424,11 +4536,11 @@ var registerOverlayPortal = (el, opts = {}) => {
4424
4536
 
4425
4537
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/InlineTextField/styles.module.css#css-module
4426
4538
  init_react_import();
4427
- var styles_module_default12 = { "InlineTextField": "_InlineTextField_104qp_1" };
4539
+ var styles_module_default13 = { "InlineTextField": "_InlineTextField_104qp_1" };
4428
4540
 
4429
4541
  // components/InlineTextField/index.tsx
4430
- import { jsx as jsx27 } from "react/jsx-runtime";
4431
- var getClassName16 = get_class_name_factory_default("InlineTextField", styles_module_default12);
4542
+ import { jsx as jsx28 } from "react/jsx-runtime";
4543
+ var getClassName17 = get_class_name_factory_default("InlineTextField", styles_module_default13);
4432
4544
  var InlineTextFieldInternal = ({
4433
4545
  propPath,
4434
4546
  componentId,
@@ -4437,7 +4549,7 @@ var InlineTextFieldInternal = ({
4437
4549
  opts = {}
4438
4550
  }) => {
4439
4551
  var _a;
4440
- const ref = useRef6(null);
4552
+ const ref = useRef7(null);
4441
4553
  const appStoreApi = useAppStoreApi();
4442
4554
  const disableLineBreaks = (_a = opts.disableLineBreaks) != null ? _a : false;
4443
4555
  useEffect13(() => {
@@ -4488,10 +4600,10 @@ var InlineTextFieldInternal = ({
4488
4600
  }, [appStoreApi, ref.current, value, disableLineBreaks]);
4489
4601
  const [isHovering, setIsHovering] = useState15(false);
4490
4602
  const [isFocused, setIsFocused] = useState15(false);
4491
- return /* @__PURE__ */ jsx27(
4603
+ return /* @__PURE__ */ jsx28(
4492
4604
  "span",
4493
4605
  {
4494
- className: getClassName16(),
4606
+ className: getClassName17(),
4495
4607
  ref,
4496
4608
  contentEditable: isHovering || isFocused ? "plaintext-only" : "false",
4497
4609
  onClick: (e) => {
@@ -4527,11 +4639,11 @@ var InlineTextFieldInternal = ({
4527
4639
  var InlineTextField = memo4(InlineTextFieldInternal);
4528
4640
 
4529
4641
  // lib/field-transforms/default-transforms/inline-text-transform.tsx
4530
- import { jsx as jsx28 } from "react/jsx-runtime";
4642
+ import { jsx as jsx29 } from "react/jsx-runtime";
4531
4643
  var getInlineTextTransform = () => ({
4532
4644
  text: ({ value, componentId, field, propPath, isReadOnly }) => {
4533
4645
  if (field.contentEditable) {
4534
- return /* @__PURE__ */ jsx28(
4646
+ return /* @__PURE__ */ jsx29(
4535
4647
  InlineTextField,
4536
4648
  {
4537
4649
  propPath,
@@ -4546,7 +4658,7 @@ var getInlineTextTransform = () => ({
4546
4658
  },
4547
4659
  textarea: ({ value, componentId, field, propPath, isReadOnly }) => {
4548
4660
  if (field.contentEditable) {
4549
- return /* @__PURE__ */ jsx28(
4661
+ return /* @__PURE__ */ jsx29(
4550
4662
  InlineTextField,
4551
4663
  {
4552
4664
  propPath,
@@ -4560,7 +4672,7 @@ var getInlineTextTransform = () => ({
4560
4672
  },
4561
4673
  custom: ({ value, componentId, field, propPath, isReadOnly }) => {
4562
4674
  if (field.contentEditable && typeof value === "string") {
4563
- return /* @__PURE__ */ jsx28(
4675
+ return /* @__PURE__ */ jsx29(
4564
4676
  InlineTextField,
4565
4677
  {
4566
4678
  propPath,
@@ -4578,15 +4690,15 @@ var getInlineTextTransform = () => ({
4578
4690
  init_react_import();
4579
4691
  import {
4580
4692
  useEffect as useEffect14,
4581
- useRef as useRef7,
4582
- useCallback as useCallback11,
4693
+ useRef as useRef8,
4694
+ useCallback as useCallback12,
4583
4695
  memo as memo5,
4584
4696
  lazy as lazy2,
4585
4697
  Suspense as Suspense2
4586
4698
  } from "react";
4587
- import { jsx as jsx29 } from "react/jsx-runtime";
4699
+ import { jsx as jsx30 } from "react/jsx-runtime";
4588
4700
  var Editor2 = lazy2(
4589
- () => import("./Editor-OSAG52QF.mjs").then((m) => ({
4701
+ () => import("./Editor-KXEVJBNG.mjs").then((m) => ({
4590
4702
  default: m.Editor
4591
4703
  }))
4592
4704
  );
@@ -4603,7 +4715,7 @@ var InlineEditorWrapper = memo5(
4603
4715
  field,
4604
4716
  id
4605
4717
  }) => {
4606
- const portalRef = useRef7(null);
4718
+ const portalRef = useRef8(null);
4607
4719
  const appStoreApi = useAppStoreApi();
4608
4720
  const onClickHandler = (e) => {
4609
4721
  e.preventDefault();
@@ -4625,7 +4737,7 @@ var InlineEditorWrapper = memo5(
4625
4737
  });
4626
4738
  return () => cleanup == null ? void 0 : cleanup();
4627
4739
  }, [portalRef.current]);
4628
- const handleChange = useCallback11(
4740
+ const handleChange = useCallback12(
4629
4741
  (content, ui) => __async(null, null, function* () {
4630
4742
  var _a;
4631
4743
  const appStore = appStoreApi.getState();
@@ -4649,7 +4761,7 @@ var InlineEditorWrapper = memo5(
4649
4761
  }),
4650
4762
  [appStoreApi, componentId, propPath]
4651
4763
  );
4652
- const handleFocus = useCallback11(
4764
+ const handleFocus = useCallback12(
4653
4765
  (editor) => {
4654
4766
  appStoreApi.setState({
4655
4767
  currentRichText: {
@@ -4664,7 +4776,7 @@ var InlineEditorWrapper = memo5(
4664
4776
  [field, componentId]
4665
4777
  );
4666
4778
  if (!field.contentEditable)
4667
- return /* @__PURE__ */ jsx29(Suspense2, { fallback: /* @__PURE__ */ jsx29(RichTextRenderFallback, { content: value }), children: /* @__PURE__ */ jsx29(RichTextRender, { content: value, field }) });
4779
+ return /* @__PURE__ */ jsx30(Suspense2, { fallback: /* @__PURE__ */ jsx30(RichTextRenderFallback, { content: value }), children: /* @__PURE__ */ jsx30(RichTextRender, { content: value, field }) });
4668
4780
  const editorProps = {
4669
4781
  content: value,
4670
4782
  onChange: handleChange,
@@ -4674,13 +4786,13 @@ var InlineEditorWrapper = memo5(
4674
4786
  id,
4675
4787
  name: propPath
4676
4788
  };
4677
- return /* @__PURE__ */ jsx29(
4789
+ return /* @__PURE__ */ jsx30(
4678
4790
  "div",
4679
4791
  {
4680
4792
  ref: portalRef,
4681
4793
  onClick: onClickHandler,
4682
4794
  onClickCapture: onClickCaptureHandler,
4683
- children: /* @__PURE__ */ jsx29(Suspense2, { fallback: /* @__PURE__ */ jsx29(EditorFallback, __spreadValues({}, editorProps)), children: /* @__PURE__ */ jsx29(Editor2, __spreadValues({}, editorProps)) })
4795
+ children: /* @__PURE__ */ jsx30(Suspense2, { fallback: /* @__PURE__ */ jsx30(EditorFallback, __spreadValues({}, editorProps)), children: /* @__PURE__ */ jsx30(Editor2, __spreadValues({}, editorProps)) })
4684
4796
  }
4685
4797
  );
4686
4798
  }
@@ -4690,10 +4802,10 @@ var getRichTextTransform = () => ({
4690
4802
  richtext: ({ value, componentId, field, propPath, isReadOnly }) => {
4691
4803
  const { contentEditable = true, tiptap } = field;
4692
4804
  if (contentEditable === false || isReadOnly) {
4693
- return /* @__PURE__ */ jsx29(RichTextRender, { content: value, field });
4805
+ return /* @__PURE__ */ jsx30(RichTextRender, { content: value, field });
4694
4806
  }
4695
4807
  const id = `${componentId}_${field.type}_${propPath}`;
4696
- return /* @__PURE__ */ jsx29(
4808
+ return /* @__PURE__ */ jsx30(
4697
4809
  InlineEditorWrapper,
4698
4810
  {
4699
4811
  value,
@@ -4737,12 +4849,12 @@ function shallowEqual(obj1, obj2, keysToIgnore = []) {
4737
4849
  }
4738
4850
 
4739
4851
  // components/MemoizeComponent/index.tsx
4740
- import { jsx as jsx30 } from "react/jsx-runtime";
4852
+ import { jsx as jsx31 } from "react/jsx-runtime";
4741
4853
  var RenderComponent = ({
4742
4854
  Component: Component2,
4743
4855
  componentProps: renderProps
4744
4856
  }) => {
4745
- return /* @__PURE__ */ jsx30(Component2, __spreadValues({}, renderProps));
4857
+ return /* @__PURE__ */ jsx31(Component2, __spreadValues({}, renderProps));
4746
4858
  };
4747
4859
  var MemoizeComponent = memo6(RenderComponent, (prev, next) => {
4748
4860
  let editorEquals = true;
@@ -4755,11 +4867,11 @@ var MemoizeComponent = memo6(RenderComponent, (prev, next) => {
4755
4867
  // components/DropZone/VirtualizedDropZone.tsx
4756
4868
  init_react_import();
4757
4869
  import {
4758
- useCallback as useCallback12,
4870
+ useCallback as useCallback13,
4759
4871
  useContext as useContext8,
4760
4872
  useEffect as useEffect15,
4761
4873
  useMemo as useMemo11,
4762
- useRef as useRef8
4874
+ useRef as useRef9
4763
4875
  } from "react";
4764
4876
  import {
4765
4877
  defaultRangeExtractor,
@@ -4771,7 +4883,7 @@ import {
4771
4883
  useVirtualizer,
4772
4884
  windowScroll
4773
4885
  } from "@tanstack/react-virtual";
4774
- import { Fragment as Fragment6, jsx as jsx31 } from "react/jsx-runtime";
4886
+ import { Fragment as Fragment6, jsx as jsx32 } from "react/jsx-runtime";
4775
4887
  var ROOT_ZONE_VIRTUALIZATION_OVERSCAN = 5;
4776
4888
  var DEFAULT_VIRTUALIZED_ITEM_HEIGHT = 320;
4777
4889
  var measuredItemHeights = /* @__PURE__ */ new Map();
@@ -4810,9 +4922,9 @@ var VirtualizedDropZone = ({
4810
4922
  return null;
4811
4923
  });
4812
4924
  const iframeWindow = frame == null ? void 0 : frame.defaultView;
4813
- const measureRefsRef = useRef8(/* @__PURE__ */ new Map());
4925
+ const measureRefsRef = useRef9(/* @__PURE__ */ new Map());
4814
4926
  const appStoreApi = useAppStoreApi();
4815
- const resolveIndex = useCallback12(
4927
+ const resolveIndex = useCallback13(
4816
4928
  (targetId) => {
4817
4929
  var _a, _b, _c, _d;
4818
4930
  if (!targetId || targetId === "root") {
@@ -4847,7 +4959,7 @@ var VirtualizedDropZone = ({
4847
4959
  });
4848
4960
  return Array.from(nextPinnedIndexes).sort((a, b) => a - b);
4849
4961
  }, [dragTargetParentId, draggedItemId, resolveIndex, selectedId]);
4850
- const rangeExtractor = useCallback12(
4962
+ const rangeExtractor = useCallback13(
4851
4963
  (range) => {
4852
4964
  const indexes = defaultRangeExtractor(range);
4853
4965
  pinnedIndexes.forEach((index) => {
@@ -4881,7 +4993,7 @@ var VirtualizedDropZone = ({
4881
4993
  zoneStore.getState().unregisterRootVirtualizer(zoneCompound);
4882
4994
  };
4883
4995
  }, [resolveIndex, virtualizer, zoneCompound, zoneStore]);
4884
- const getMeasureRef = useCallback12((componentId) => {
4996
+ const getMeasureRef = useCallback13((componentId) => {
4885
4997
  const cachedRef = measureRefsRef.current.get(componentId);
4886
4998
  if (cachedRef) {
4887
4999
  return cachedRef;
@@ -4918,7 +5030,7 @@ var VirtualizedDropZone = ({
4918
5030
  const gapSize = Math.max(virtualItem.start - previousEnd, 0);
4919
5031
  if (gapSize > 0) {
4920
5032
  items.push(
4921
- /* @__PURE__ */ jsx31(
5033
+ /* @__PURE__ */ jsx32(
4922
5034
  "div",
4923
5035
  {
4924
5036
  style: { height: `${gapSize}px` }
@@ -4940,7 +5052,7 @@ var VirtualizedDropZone = ({
4940
5052
  const trailingGap = Math.max(totalSize - previousEnd, 0);
4941
5053
  if (trailingGap > 0) {
4942
5054
  items.push(
4943
- /* @__PURE__ */ jsx31(
5055
+ /* @__PURE__ */ jsx32(
4944
5056
  "div",
4945
5057
  {
4946
5058
  style: { height: `${trailingGap}px` }
@@ -4951,12 +5063,12 @@ var VirtualizedDropZone = ({
4951
5063
  }
4952
5064
  return items;
4953
5065
  }, [totalSize, virtualItems, getMeasureRef]);
4954
- return /* @__PURE__ */ jsx31(Fragment6, { children: renderedItems });
5066
+ return /* @__PURE__ */ jsx32(Fragment6, { children: renderedItems });
4955
5067
  };
4956
5068
 
4957
5069
  // components/DropZone/index.tsx
4958
- import { Fragment as Fragment7, jsx as jsx32, jsxs as jsxs10 } from "react/jsx-runtime";
4959
- var getClassName17 = get_class_name_factory_default("DropZone", styles_module_default10);
5070
+ import { Fragment as Fragment7, jsx as jsx33, jsxs as jsxs11 } from "react/jsx-runtime";
5071
+ var getClassName18 = get_class_name_factory_default("DropZone", styles_module_default11);
4960
5072
  var getRandomColor = () => `#${Math.floor(Math.random() * 16777215).toString(16)}`;
4961
5073
  var RENDER_DEBUG = false;
4962
5074
  var InsertPreview = ({
@@ -4967,12 +5079,12 @@ var InsertPreview = ({
4967
5079
  if (element) {
4968
5080
  return (
4969
5081
  // Safe to use this since the HTML is set by the user
4970
- /* @__PURE__ */ jsx32("div", { dangerouslySetInnerHTML: { __html: element.outerHTML } })
5082
+ /* @__PURE__ */ jsx33("div", { dangerouslySetInnerHTML: { __html: element.outerHTML } })
4971
5083
  );
4972
5084
  }
4973
- return /* @__PURE__ */ jsx32(DrawerItemInner, { name: label, children: override });
5085
+ return /* @__PURE__ */ jsx33(DrawerItemInner, { name: label, children: override });
4974
5086
  };
4975
- var DropZoneEditPure = (props) => /* @__PURE__ */ jsx32(DropZoneEdit, __spreadValues({}, props));
5087
+ var DropZoneEditPure = (props) => /* @__PURE__ */ jsx33(DropZoneEdit, __spreadValues({}, props));
4976
5088
  var DropZoneChild = ({
4977
5089
  zoneCompound,
4978
5090
  componentId,
@@ -5070,7 +5182,7 @@ var DropZoneChild = ({
5070
5182
  const plugins = useAppStore((s) => s.plugins);
5071
5183
  const userFieldTransforms = useAppStore((s) => s.fieldTransforms);
5072
5184
  const combinedFieldTransforms = useMemo12(
5073
- () => __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, getSlotTransform(DropZoneEditPure, (slotProps) => /* @__PURE__ */ jsx32(ContextSlotRender, { componentId, zone: slotProps.zone }))), getInlineTextTransform()), getRichTextTransform()), plugins.reduce(
5185
+ () => __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, getSlotTransform(DropZoneEditPure, (slotProps) => /* @__PURE__ */ jsx33(ContextSlotRender, { componentId, zone: slotProps.zone }))), getInlineTextTransform()), getRichTextTransform()), plugins.reduce(
5074
5186
  (acc, plugin) => __spreadValues(__spreadValues({}, acc), plugin.fieldTransforms),
5075
5187
  {}
5076
5188
  )), userFieldTransforms),
@@ -5084,13 +5196,13 @@ var DropZoneChild = ({
5084
5196
  isLoading
5085
5197
  );
5086
5198
  if (!item) return;
5087
- const Render2 = componentConfig ? componentConfig.render : () => /* @__PURE__ */ jsxs10("div", { style: { padding: 48, textAlign: "center" }, children: [
5199
+ const Render2 = componentConfig ? componentConfig.render : () => /* @__PURE__ */ jsxs11("div", { style: { padding: 48, textAlign: "center" }, children: [
5088
5200
  "No configuration for ",
5089
5201
  item.type
5090
5202
  ] });
5091
5203
  let componentType = item.type;
5092
5204
  const isInserting = "previewType" in item ? item.previewType === "insert" : false;
5093
- return /* @__PURE__ */ jsx32(
5205
+ return /* @__PURE__ */ jsx33(
5094
5206
  DraggableComponent,
5095
5207
  {
5096
5208
  id: componentId,
@@ -5108,7 +5220,7 @@ var DropZoneChild = ({
5108
5220
  children: (dragRef) => {
5109
5221
  var _a2;
5110
5222
  if ((componentConfig == null ? void 0 : componentConfig.inline) && !isInserting) {
5111
- return /* @__PURE__ */ jsx32(
5223
+ return /* @__PURE__ */ jsx33(
5112
5224
  MemoizeComponent,
5113
5225
  {
5114
5226
  Component: Render2,
@@ -5118,14 +5230,14 @@ var DropZoneChild = ({
5118
5230
  }
5119
5231
  );
5120
5232
  }
5121
- return /* @__PURE__ */ jsx32("div", { ref: dragRef, children: isInserting ? /* @__PURE__ */ jsx32(
5233
+ return /* @__PURE__ */ jsx33("div", { ref: dragRef, children: isInserting ? /* @__PURE__ */ jsx33(
5122
5234
  InsertPreview,
5123
5235
  {
5124
5236
  label,
5125
5237
  override: (_a2 = overrides.componentItem) != null ? _a2 : overrides.drawerItem,
5126
5238
  element: "element" in item && item.element ? item.element : void 0
5127
5239
  }
5128
- ) : /* @__PURE__ */ jsx32(
5240
+ ) : /* @__PURE__ */ jsx33(
5129
5241
  MemoizeComponent,
5130
5242
  {
5131
5243
  Component: Render2,
@@ -5205,8 +5317,8 @@ var DropZoneEdit = forwardRef(
5205
5317
  const contentIds = useMemo12(() => {
5206
5318
  return zoneContentIds || [];
5207
5319
  }, [zoneContentIds]);
5208
- const ref = useRef9(null);
5209
- const acceptsTarget = useCallback13(
5320
+ const ref = useRef10(null);
5321
+ const acceptsTarget = useCallback14(
5210
5322
  (componentType) => {
5211
5323
  if (!componentType) {
5212
5324
  return true;
@@ -5289,7 +5401,7 @@ var DropZoneEdit = forwardRef(
5289
5401
  userMinEmptyHeight,
5290
5402
  ref
5291
5403
  });
5292
- const setRefs = useCallback13(
5404
+ const setRefs = useCallback14(
5293
5405
  (node) => {
5294
5406
  assignRefs([ref, dropRef, userRef], node);
5295
5407
  },
@@ -5301,10 +5413,10 @@ var DropZoneEdit = forwardRef(
5301
5413
  const El = as != null ? as : "div";
5302
5414
  const isRootAreaZone = (areaId != null ? areaId : rootAreaId) === rootAreaId && depth === 0;
5303
5415
  const shouldVirtualizeItems = _experimentalVirtualization && isRootAreaZone;
5304
- return /* @__PURE__ */ jsx32(
5416
+ return /* @__PURE__ */ jsx33(
5305
5417
  El,
5306
5418
  {
5307
- className: `${getClassName17({
5419
+ className: `${getClassName18({
5308
5420
  isRootZone,
5309
5421
  hoveringOverArea,
5310
5422
  isEnabled,
@@ -5319,12 +5431,12 @@ var DropZoneEdit = forwardRef(
5319
5431
  "--min-empty-height": minEmptyHeight,
5320
5432
  backgroundColor: RENDER_DEBUG ? getRandomColor() : style == null ? void 0 : style.backgroundColor
5321
5433
  }),
5322
- children: shouldVirtualizeItems ? /* @__PURE__ */ jsx32(
5434
+ children: shouldVirtualizeItems ? /* @__PURE__ */ jsx33(
5323
5435
  VirtualizedDropZone,
5324
5436
  {
5325
5437
  contentIds: contentIdsWithPreview,
5326
5438
  zoneCompound,
5327
- renderItem: (props) => /* @__PURE__ */ jsx32(
5439
+ renderItem: (props) => /* @__PURE__ */ jsx33(
5328
5440
  DropZoneChildMemo,
5329
5441
  {
5330
5442
  zoneCompound,
@@ -5338,7 +5450,7 @@ var DropZoneEdit = forwardRef(
5338
5450
  props.componentId
5339
5451
  )
5340
5452
  }
5341
- ) : contentIdsWithPreview.map((componentId, i) => /* @__PURE__ */ jsx32(
5453
+ ) : contentIdsWithPreview.map((componentId, i) => /* @__PURE__ */ jsx33(
5342
5454
  DropZoneChildMemo,
5343
5455
  {
5344
5456
  zoneCompound,
@@ -5360,7 +5472,7 @@ var DropZoneRenderItem = ({
5360
5472
  metadata
5361
5473
  }) => {
5362
5474
  const Component2 = config.components[item.type];
5363
- const props = useSlots(config, item, (slotProps) => /* @__PURE__ */ jsx32(SlotRenderPure, __spreadProps(__spreadValues({}, slotProps), { config, metadata })));
5475
+ const props = useSlots(config, item, (slotProps) => /* @__PURE__ */ jsx33(SlotRenderPure, __spreadProps(__spreadValues({}, slotProps), { config, metadata })));
5364
5476
  const nextContextValue = useMemo12(
5365
5477
  () => ({
5366
5478
  areaId: props.id,
@@ -5369,7 +5481,7 @@ var DropZoneRenderItem = ({
5369
5481
  [props]
5370
5482
  );
5371
5483
  const richtextProps = useRichtextProps(Component2.fields, props);
5372
- return /* @__PURE__ */ jsx32(DropZoneProvider, { value: nextContextValue, children: /* @__PURE__ */ jsx32(
5484
+ return /* @__PURE__ */ jsx33(DropZoneProvider, { value: nextContextValue, children: /* @__PURE__ */ jsx33(
5373
5485
  Component2.render,
5374
5486
  __spreadProps(__spreadValues(__spreadValues({}, props), richtextProps), {
5375
5487
  editor: __spreadProps(__spreadValues({}, props.editor), {
@@ -5379,7 +5491,7 @@ var DropZoneRenderItem = ({
5379
5491
  })
5380
5492
  ) }, props.id);
5381
5493
  };
5382
- var DropZoneRenderPure = (props) => /* @__PURE__ */ jsx32(DropZoneRender, __spreadValues({}, props));
5494
+ var DropZoneRenderPure = (props) => /* @__PURE__ */ jsx33(DropZoneRender, __spreadValues({}, props));
5383
5495
  var DropZoneRender = forwardRef(
5384
5496
  function DropZoneRenderInternal({ className, style, zone, as }, ref) {
5385
5497
  const ctx = useContext9(dropZoneContext);
@@ -5401,10 +5513,10 @@ var DropZoneRender = forwardRef(
5401
5513
  if (zoneCompound !== rootDroppableId) {
5402
5514
  content = setupZone(data, zoneCompound).zones[zoneCompound];
5403
5515
  }
5404
- return /* @__PURE__ */ jsx32(El, { className, style, ref, children: content.map((item) => {
5516
+ return /* @__PURE__ */ jsx33(El, { className, style, ref, children: content.map((item) => {
5405
5517
  const Component2 = config.components[item.type];
5406
5518
  if (Component2) {
5407
- return /* @__PURE__ */ jsx32(
5519
+ return /* @__PURE__ */ jsx33(
5408
5520
  DropZoneRenderItem,
5409
5521
  {
5410
5522
  config,
@@ -5418,14 +5530,14 @@ var DropZoneRender = forwardRef(
5418
5530
  }) });
5419
5531
  }
5420
5532
  );
5421
- var DropZonePure = (props) => /* @__PURE__ */ jsx32(DropZone, __spreadValues({}, props));
5533
+ var DropZonePure = (props) => /* @__PURE__ */ jsx33(DropZone, __spreadValues({}, props));
5422
5534
  var DropZone = forwardRef(
5423
5535
  function DropZone2(props, ref) {
5424
5536
  const ctx = useContext9(dropZoneContext);
5425
5537
  if ((ctx == null ? void 0 : ctx.mode) === "edit") {
5426
- return /* @__PURE__ */ jsx32(Fragment7, { children: /* @__PURE__ */ jsx32(DropZoneEdit, __spreadProps(__spreadValues({}, props), { ref })) });
5538
+ return /* @__PURE__ */ jsx33(Fragment7, { children: /* @__PURE__ */ jsx33(DropZoneEdit, __spreadProps(__spreadValues({}, props), { ref })) });
5427
5539
  }
5428
- return /* @__PURE__ */ jsx32(Fragment7, { children: /* @__PURE__ */ jsx32(DropZoneRender, __spreadProps(__spreadValues({}, props), { ref })) });
5540
+ return /* @__PURE__ */ jsx33(Fragment7, { children: /* @__PURE__ */ jsx33(DropZoneRender, __spreadProps(__spreadValues({}, props), { ref })) });
5429
5541
  }
5430
5542
  );
5431
5543
 
@@ -5482,7 +5594,7 @@ function resolveGlobals(data, config) {
5482
5594
  }
5483
5595
 
5484
5596
  // components/Render/index.tsx
5485
- import { jsx as jsx33 } from "react/jsx-runtime";
5597
+ import { jsx as jsx34 } from "react/jsx-runtime";
5486
5598
  var renderContext = React3.createContext({
5487
5599
  config: { components: {} },
5488
5600
  data: { root: {}, content: [] },
@@ -5517,7 +5629,7 @@ function Render({
5517
5629
  const propsWithSlots = useSlots(
5518
5630
  config,
5519
5631
  { type: "root", props: pageProps },
5520
- (props) => /* @__PURE__ */ jsx33(SlotRender, __spreadProps(__spreadValues({}, props), { config, metadata }))
5632
+ (props) => /* @__PURE__ */ jsx34(SlotRender, __spreadProps(__spreadValues({}, props), { config, metadata }))
5521
5633
  );
5522
5634
  const richtextProps = useRichtextProps((_a = config.root) == null ? void 0 : _a.fields, pageProps);
5523
5635
  const nextContextValue = useMemo13(
@@ -5528,9 +5640,9 @@ function Render({
5528
5640
  []
5529
5641
  );
5530
5642
  if ((_b = config.root) == null ? void 0 : _b.render) {
5531
- return /* @__PURE__ */ jsx33(renderContext.Provider, { value: { config, data: defaultedData, metadata }, children: /* @__PURE__ */ jsx33(DropZoneProvider, { value: nextContextValue, children: /* @__PURE__ */ jsx33(config.root.render, __spreadProps(__spreadValues(__spreadValues({}, propsWithSlots), richtextProps), { children: /* @__PURE__ */ jsx33(DropZoneRenderPure, { zone: rootZone }) })) }) });
5643
+ return /* @__PURE__ */ jsx34(renderContext.Provider, { value: { config, data: defaultedData, metadata }, children: /* @__PURE__ */ jsx34(DropZoneProvider, { value: nextContextValue, children: /* @__PURE__ */ jsx34(config.root.render, __spreadProps(__spreadValues(__spreadValues({}, propsWithSlots), richtextProps), { children: /* @__PURE__ */ jsx34(DropZoneRenderPure, { zone: rootZone }) })) }) });
5532
5644
  }
5533
- return /* @__PURE__ */ jsx33(renderContext.Provider, { value: { config, data: defaultedData, metadata }, children: /* @__PURE__ */ jsx33(DropZoneProvider, { value: nextContextValue, children: /* @__PURE__ */ jsx33(DropZoneRenderPure, { zone: rootZone }) }) });
5645
+ return /* @__PURE__ */ jsx34(renderContext.Provider, { value: { config, data: defaultedData, metadata }, children: /* @__PURE__ */ jsx34(DropZoneProvider, { value: nextContextValue, children: /* @__PURE__ */ jsx34(DropZoneRenderPure, { zone: rootZone }) }) });
5534
5646
  }
5535
5647
 
5536
5648
  // components/ComponentList/index.tsx
@@ -5538,12 +5650,12 @@ init_react_import();
5538
5650
 
5539
5651
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/ComponentList/styles.module.css#css-module
5540
5652
  init_react_import();
5541
- var styles_module_default13 = { "ComponentList": "_ComponentList_1mlcu_1", "ComponentList--isExpanded": "_ComponentList--isExpanded_1mlcu_5", "ComponentList-content": "_ComponentList-content_1mlcu_9", "ComponentList-title": "_ComponentList-title_1mlcu_17", "ComponentList-titleIcon": "_ComponentList-titleIcon_1mlcu_54" };
5653
+ var styles_module_default14 = { "ComponentList": "_ComponentList_1mlcu_1", "ComponentList--isExpanded": "_ComponentList--isExpanded_1mlcu_5", "ComponentList-content": "_ComponentList-content_1mlcu_9", "ComponentList-title": "_ComponentList-title_1mlcu_17", "ComponentList-titleIcon": "_ComponentList-titleIcon_1mlcu_54" };
5542
5654
 
5543
5655
  // components/ComponentList/index.tsx
5544
5656
  import { useEffect as useEffect17 } from "react";
5545
- import { jsx as jsx34, jsxs as jsxs11 } from "react/jsx-runtime";
5546
- var getClassName18 = get_class_name_factory_default("ComponentList", styles_module_default13);
5657
+ import { jsx as jsx35, jsxs as jsxs12 } from "react/jsx-runtime";
5658
+ var getClassName19 = get_class_name_factory_default("ComponentList", styles_module_default14);
5547
5659
  var ComponentListItem = ({
5548
5660
  name,
5549
5661
  label,
@@ -5563,7 +5675,7 @@ var ComponentListItem = ({
5563
5675
  );
5564
5676
  }
5565
5677
  }, [overrides]);
5566
- return /* @__PURE__ */ jsx34(Drawer.Item, { label, name, icon, isDragDisabled: !canInsert, children: (_a = overrides.componentItem) != null ? _a : overrides.drawerItem });
5678
+ return /* @__PURE__ */ jsx35(Drawer.Item, { label, name, icon, isDragDisabled: !canInsert, children: (_a = overrides.componentItem) != null ? _a : overrides.drawerItem });
5567
5679
  };
5568
5680
  var ComponentList = ({
5569
5681
  children,
@@ -5574,12 +5686,12 @@ var ComponentList = ({
5574
5686
  const setUi = useAppStore((s) => s.setUi);
5575
5687
  const componentList = useAppStore((s) => s.state.ui.componentList);
5576
5688
  const { expanded = true } = componentList[id] || {};
5577
- return /* @__PURE__ */ jsxs11("div", { className: getClassName18({ isExpanded: expanded }), children: [
5578
- title && /* @__PURE__ */ jsxs11(
5689
+ return /* @__PURE__ */ jsxs12("div", { className: getClassName19({ isExpanded: expanded }), children: [
5690
+ title && /* @__PURE__ */ jsxs12(
5579
5691
  "button",
5580
5692
  {
5581
5693
  type: "button",
5582
- className: getClassName18("title"),
5694
+ className: getClassName19("title"),
5583
5695
  onClick: () => setUi({
5584
5696
  componentList: __spreadProps(__spreadValues({}, componentList), {
5585
5697
  [id]: __spreadProps(__spreadValues({}, componentList[id]), {
@@ -5589,15 +5701,15 @@ var ComponentList = ({
5589
5701
  }),
5590
5702
  title: expanded ? `Collapse${title ? ` ${title}` : ""}` : `Expand${title ? ` ${title}` : ""}`,
5591
5703
  children: [
5592
- /* @__PURE__ */ jsx34("div", { className: getClassName18("titleIcon"), children: /* @__PURE__ */ jsx34(ChevronRight, { size: 12 }) }),
5593
- /* @__PURE__ */ jsx34("div", { children: title })
5704
+ /* @__PURE__ */ jsx35("div", { className: getClassName19("titleIcon"), children: /* @__PURE__ */ jsx35(ChevronRight, { size: 12 }) }),
5705
+ /* @__PURE__ */ jsx35("div", { children: title })
5594
5706
  ]
5595
5707
  }
5596
5708
  ),
5597
- /* @__PURE__ */ jsx34("div", { className: getClassName18("content"), children: /* @__PURE__ */ jsx34(Drawer, { variant: "tile", children: children || Object.keys(config.components).map((componentKey) => {
5709
+ /* @__PURE__ */ jsx35("div", { className: getClassName19("content"), children: /* @__PURE__ */ jsx35(Drawer, { variant: "tile", children: children || Object.keys(config.components).map((componentKey) => {
5598
5710
  var _a;
5599
5711
  const componentConf = config.components[componentKey] || {};
5600
- return /* @__PURE__ */ jsx34(
5712
+ return /* @__PURE__ */ jsx35(
5601
5713
  ComponentListItem,
5602
5714
  {
5603
5715
  label: (_a = componentConf["label"]) != null ? _a : componentKey,
@@ -5777,6 +5889,9 @@ var createEditorCommands = (appStore) => {
5777
5889
  root: __spreadProps(__spreadValues({}, root), { props: __spreadValues(__spreadValues({}, prevProps), patch) })
5778
5890
  });
5779
5891
  };
5892
+ const scrollToComponent = (id) => {
5893
+ getState().scrollToComponent(id);
5894
+ };
5780
5895
  const selectComponent = (id) => {
5781
5896
  const dispatch = getState().dispatch;
5782
5897
  if (id === null) {
@@ -5798,7 +5913,8 @@ var createEditorCommands = (appStore) => {
5798
5913
  replaceComponent,
5799
5914
  updateProps,
5800
5915
  updateRoot,
5801
- selectComponent
5916
+ selectComponent,
5917
+ scrollToComponent
5802
5918
  };
5803
5919
  };
5804
5920
 
@@ -5915,11 +6031,11 @@ import { useMemo as useMemo14, useState as useState17 } from "react";
5915
6031
 
5916
6032
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Components/styles.module.css#css-module
5917
6033
  init_react_import();
5918
- var styles_module_default14 = { "Components-search": "_Components-search_recer_1", "Components-searchIcon": "_Components-searchIcon_recer_8", "Components-searchInput": "_Components-searchInput_recer_16", "Components-empty": "_Components-empty_recer_39" };
6034
+ var styles_module_default15 = { "Components-search": "_Components-search_recer_1", "Components-searchIcon": "_Components-searchIcon_recer_8", "Components-searchInput": "_Components-searchInput_recer_16", "Components-empty": "_Components-empty_recer_39" };
5919
6035
 
5920
6036
  // components/Editor/components/Components/index.tsx
5921
- import { jsx as jsx35, jsxs as jsxs12 } from "react/jsx-runtime";
5922
- var getClassName19 = get_class_name_factory_default("Components", styles_module_default14);
6037
+ import { jsx as jsx36, jsxs as jsxs13 } from "react/jsx-runtime";
6038
+ var getClassName20 = get_class_name_factory_default("Components", styles_module_default15);
5923
6039
  var Components = () => {
5924
6040
  var _a;
5925
6041
  const overrides = useAppStore((s) => s.overrides);
@@ -5954,23 +6070,23 @@ var Components = () => {
5954
6070
  }
5955
6071
  return Array.from(buckets.entries());
5956
6072
  }, [components, search]);
5957
- return /* @__PURE__ */ jsxs12(Wrapper, { children: [
5958
- /* @__PURE__ */ jsxs12("div", { className: getClassName19("search"), children: [
5959
- /* @__PURE__ */ jsx35("div", { className: getClassName19("searchIcon"), children: /* @__PURE__ */ jsx35(Search, { size: 14 }) }),
5960
- /* @__PURE__ */ jsx35(
6073
+ return /* @__PURE__ */ jsxs13(Wrapper, { children: [
6074
+ /* @__PURE__ */ jsxs13("div", { className: getClassName20("search"), children: [
6075
+ /* @__PURE__ */ jsx36("div", { className: getClassName20("searchIcon"), children: /* @__PURE__ */ jsx36(Search, { size: 14 }) }),
6076
+ /* @__PURE__ */ jsx36(
5961
6077
  "input",
5962
6078
  {
5963
6079
  type: "search",
5964
- className: getClassName19("searchInput"),
6080
+ className: getClassName20("searchInput"),
5965
6081
  placeholder: "search",
5966
6082
  value: search,
5967
6083
  onChange: (e) => setSearch(e.target.value)
5968
6084
  }
5969
6085
  )
5970
6086
  ] }),
5971
- groups.length === 0 ? /* @__PURE__ */ jsx35("div", { className: getClassName19("empty"), children: "No results match your search" }) : groups.length <= 1 && !((_a = groups[0]) == null ? void 0 : _a[0]) ? /* @__PURE__ */ jsx35(ComponentList, { id: "all", children: groups[0][1].map(([name, conf]) => {
6087
+ groups.length === 0 ? /* @__PURE__ */ jsx36("div", { className: getClassName20("empty"), children: "No results match your search" }) : groups.length <= 1 && !((_a = groups[0]) == null ? void 0 : _a[0]) ? /* @__PURE__ */ jsx36(ComponentList, { id: "all", children: groups[0][1].map(([name, conf]) => {
5972
6088
  var _a2;
5973
- return /* @__PURE__ */ jsx35(
6089
+ return /* @__PURE__ */ jsx36(
5974
6090
  ComponentList.Item,
5975
6091
  {
5976
6092
  name,
@@ -5983,14 +6099,14 @@ var Components = () => {
5983
6099
  var _a2, _b;
5984
6100
  const categoryKey = category != null ? category : "other";
5985
6101
  const title = (_b = (_a2 = categoriesConfig == null ? void 0 : categoriesConfig[categoryKey]) == null ? void 0 : _a2.title) != null ? _b : category != null ? category : "Other";
5986
- return /* @__PURE__ */ jsx35(
6102
+ return /* @__PURE__ */ jsx36(
5987
6103
  ComponentList,
5988
6104
  {
5989
6105
  id: categoryKey,
5990
6106
  title,
5991
6107
  children: entries.map(([name, conf]) => {
5992
6108
  var _a3;
5993
- return /* @__PURE__ */ jsx35(
6109
+ return /* @__PURE__ */ jsx36(
5994
6110
  ComponentList.Item,
5995
6111
  {
5996
6112
  name,
@@ -6009,16 +6125,16 @@ var Components = () => {
6009
6125
 
6010
6126
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/plugins/blocks/styles.module.css#css-module
6011
6127
  init_react_import();
6012
- var styles_module_default15 = { "BlocksPlugin": "_BlocksPlugin_15ud0_1" };
6128
+ var styles_module_default16 = { "BlocksPlugin": "_BlocksPlugin_15ud0_1" };
6013
6129
 
6014
6130
  // plugins/blocks/index.tsx
6015
- import { jsx as jsx36 } from "react/jsx-runtime";
6016
- var getClassName20 = get_class_name_factory_default("BlocksPlugin", styles_module_default15);
6131
+ import { jsx as jsx37 } from "react/jsx-runtime";
6132
+ var getClassName21 = get_class_name_factory_default("BlocksPlugin", styles_module_default16);
6017
6133
  var blocksPlugin = () => ({
6018
6134
  name: "blocks",
6019
6135
  label: "Blocks",
6020
- render: () => /* @__PURE__ */ jsx36("div", { className: getClassName20(), children: /* @__PURE__ */ jsx36(Components, {}) }),
6021
- icon: /* @__PURE__ */ jsx36(Plus, {})
6136
+ render: () => /* @__PURE__ */ jsx37("div", { className: getClassName21(), children: /* @__PURE__ */ jsx37(Components, {}) }),
6137
+ icon: /* @__PURE__ */ jsx37(Plus, {})
6022
6138
  });
6023
6139
 
6024
6140
  // plugins/outline/index.tsx
@@ -6032,19 +6148,19 @@ init_react_import();
6032
6148
 
6033
6149
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/LayerTree/styles.module.css#css-module
6034
6150
  init_react_import();
6035
- var styles_module_default16 = { "LayerTree": "_LayerTree_3eixb_1", "LayerTree-zoneTitle": "_LayerTree-zoneTitle_3eixb_11", "LayerTree-helper": "_LayerTree-helper_3eixb_17", "Layer": "_Layer_3eixb_1", "Layer-inner": "_Layer-inner_3eixb_34", "Layer--containsZone": "_Layer--containsZone_3eixb_42", "Layer-clickable": "_Layer-clickable_3eixb_46", "Layer--isSelected": "_Layer--isSelected_3eixb_68", "Layer-icon": "_Layer-icon_3eixb_80", "Layer-zoneIcon": "_Layer-zoneIcon_3eixb_81", "Layer-chevron": "_Layer-chevron_3eixb_85", "Layer--childIsSelected": "_Layer--childIsSelected_3eixb_97", "Layer-zones": "_Layer-zones_3eixb_101", "Layer-title": "_Layer-title_3eixb_117", "Layer-name": "_Layer-name_3eixb_130", "Layer--isGlobal": "_Layer--isGlobal_3eixb_150", "Layer--isUnlinked": "_Layer--isUnlinked_3eixb_171", "Layer-unlinkedGlyph": "_Layer-unlinkedGlyph_3eixb_175" };
6151
+ var styles_module_default17 = { "LayerTree": "_LayerTree_3eixb_1", "LayerTree-zoneTitle": "_LayerTree-zoneTitle_3eixb_11", "LayerTree-helper": "_LayerTree-helper_3eixb_17", "Layer": "_Layer_3eixb_1", "Layer-inner": "_Layer-inner_3eixb_34", "Layer--containsZone": "_Layer--containsZone_3eixb_42", "Layer-clickable": "_Layer-clickable_3eixb_46", "Layer--isSelected": "_Layer--isSelected_3eixb_68", "Layer-icon": "_Layer-icon_3eixb_80", "Layer-zoneIcon": "_Layer-zoneIcon_3eixb_81", "Layer-chevron": "_Layer-chevron_3eixb_85", "Layer--childIsSelected": "_Layer--childIsSelected_3eixb_97", "Layer-zones": "_Layer-zones_3eixb_101", "Layer-title": "_Layer-title_3eixb_117", "Layer-name": "_Layer-name_3eixb_130", "Layer--isGlobal": "_Layer--isGlobal_3eixb_150", "Layer--isUnlinked": "_Layer--isUnlinked_3eixb_171", "Layer-unlinkedGlyph": "_Layer-unlinkedGlyph_3eixb_175" };
6036
6152
 
6037
6153
  // components/LayerTree/index.tsx
6038
6154
  import {
6039
6155
  forwardRef as forwardRef2,
6040
- useCallback as useCallback14,
6156
+ useCallback as useCallback15,
6041
6157
  useContext as useContext11,
6042
- useRef as useRef10
6158
+ useRef as useRef11
6043
6159
  } from "react";
6044
6160
  import { useVirtualizer as useVirtualizer2 } from "@tanstack/react-virtual";
6045
- import { Fragment as Fragment8, jsx as jsx37, jsxs as jsxs13 } from "react/jsx-runtime";
6046
- var getClassName21 = get_class_name_factory_default("LayerTree", styles_module_default16);
6047
- var getClassNameLayer = get_class_name_factory_default("Layer", styles_module_default16);
6161
+ import { Fragment as Fragment8, jsx as jsx38, jsxs as jsxs14 } from "react/jsx-runtime";
6162
+ var getClassName22 = get_class_name_factory_default("LayerTree", styles_module_default17);
6163
+ var getClassNameLayer = get_class_name_factory_default("Layer", styles_module_default17);
6048
6164
  var DEFAULT_LAYER_ROW_HEIGHT = 32;
6049
6165
  var LAYER_TREE_VIRTUALIZATION_OVERSCAN = 8;
6050
6166
  var MIN_VIRTUALIZED_LAYER_COUNT = 25;
@@ -6176,14 +6292,14 @@ var Layer = forwardRef2(function Layer2({
6176
6292
  }
6177
6293
  );
6178
6294
  const containsZone = node.childZones.length > 0;
6179
- const setItemSelector = useCallback14(
6295
+ const setItemSelector = useCallback15(
6180
6296
  (itemSelector) => {
6181
6297
  dispatch({ type: "setUi", ui: { itemSelector } });
6182
6298
  },
6183
6299
  [dispatch]
6184
6300
  );
6185
6301
  const shouldRenderChildren = isSelected || childIsSelected;
6186
- return /* @__PURE__ */ jsxs13(
6302
+ return /* @__PURE__ */ jsxs14(
6187
6303
  "li",
6188
6304
  {
6189
6305
  ref,
@@ -6198,7 +6314,7 @@ var Layer = forwardRef2(function Layer2({
6198
6314
  "data-index": dataIndex,
6199
6315
  "data-editor-layer-tree-id": node.itemId,
6200
6316
  children: [
6201
- /* @__PURE__ */ jsx37("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */ jsxs13(
6317
+ /* @__PURE__ */ jsx38("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */ jsxs14(
6202
6318
  "button",
6203
6319
  {
6204
6320
  type: "button",
@@ -6223,34 +6339,34 @@ var Layer = forwardRef2(function Layer2({
6223
6339
  zoneStore.setState({ hoveringComponent: null });
6224
6340
  },
6225
6341
  children: [
6226
- /* @__PURE__ */ jsx37(
6342
+ /* @__PURE__ */ jsx38(
6227
6343
  "div",
6228
6344
  {
6229
6345
  className: getClassNameLayer("chevron"),
6230
6346
  title: containsZone ? isSelected ? "Collapse" : "Expand" : void 0,
6231
- children: containsZone && /* @__PURE__ */ jsx37(ChevronRight, { size: "12" })
6347
+ children: containsZone && /* @__PURE__ */ jsx38(ChevronRight, { size: "12" })
6232
6348
  }
6233
6349
  ),
6234
- /* @__PURE__ */ jsxs13("div", { className: getClassNameLayer("title"), children: [
6235
- /* @__PURE__ */ jsx37("div", { className: getClassNameLayer("icon"), children: /* @__PURE__ */ jsx37(Component, { size: "16" }) }),
6236
- /* @__PURE__ */ jsx37("div", { className: getClassNameLayer("name"), children: node.label }),
6237
- isGlobal && isUnlinked && /* @__PURE__ */ jsx37(
6350
+ /* @__PURE__ */ jsxs14("div", { className: getClassNameLayer("title"), children: [
6351
+ /* @__PURE__ */ jsx38("div", { className: getClassNameLayer("icon"), children: /* @__PURE__ */ jsx38(Component, { size: "16" }) }),
6352
+ /* @__PURE__ */ jsx38("div", { className: getClassNameLayer("name"), children: node.label }),
6353
+ isGlobal && isUnlinked && /* @__PURE__ */ jsx38(
6238
6354
  "div",
6239
6355
  {
6240
6356
  className: getClassNameLayer("unlinkedGlyph"),
6241
6357
  title: "Unlinked from shared",
6242
- children: /* @__PURE__ */ jsx37(Unlink2, { size: "12" })
6358
+ children: /* @__PURE__ */ jsx38(Unlink2, { size: "12" })
6243
6359
  }
6244
6360
  )
6245
6361
  ] })
6246
6362
  ]
6247
6363
  }
6248
6364
  ) }),
6249
- containsZone && shouldRenderChildren && node.childZones.map((childZone) => /* @__PURE__ */ jsx37(
6365
+ containsZone && shouldRenderChildren && node.childZones.map((childZone) => /* @__PURE__ */ jsx38(
6250
6366
  "div",
6251
6367
  {
6252
6368
  className: getClassNameLayer("zones"),
6253
- children: /* @__PURE__ */ jsx37(
6369
+ children: /* @__PURE__ */ jsx38(
6254
6370
  LayerTreeZone,
6255
6371
  {
6256
6372
  depth: depth + 1,
@@ -6273,9 +6389,9 @@ var LayerTreeZone = ({
6273
6389
  tree
6274
6390
  }) => {
6275
6391
  const shouldVirtualize = depth === 0 && tree.items.length >= MIN_VIRTUALIZED_LAYER_COUNT;
6276
- return /* @__PURE__ */ jsxs13(Fragment8, { children: [
6277
- tree.label && /* @__PURE__ */ jsx37("div", { className: getClassName21("zoneTitle"), children: tree.label }),
6278
- shouldVirtualize ? /* @__PURE__ */ jsx37(
6392
+ return /* @__PURE__ */ jsxs14(Fragment8, { children: [
6393
+ tree.label && /* @__PURE__ */ jsx38("div", { className: getClassName22("zoneTitle"), children: tree.label }),
6394
+ shouldVirtualize ? /* @__PURE__ */ jsx38(
6279
6395
  VirtualizedLayerTreeItems,
6280
6396
  {
6281
6397
  depth,
@@ -6283,7 +6399,7 @@ var LayerTreeZone = ({
6283
6399
  selectedPathIds,
6284
6400
  tree
6285
6401
  }
6286
- ) : /* @__PURE__ */ jsx37(
6402
+ ) : /* @__PURE__ */ jsx38(
6287
6403
  StaticLayerTreeItems,
6288
6404
  {
6289
6405
  depth,
@@ -6300,9 +6416,9 @@ var StaticLayerTreeItems = ({
6300
6416
  selectedPathIds,
6301
6417
  tree
6302
6418
  }) => {
6303
- return /* @__PURE__ */ jsxs13("ul", { className: getClassName21(), children: [
6304
- tree.items.length === 0 && /* @__PURE__ */ jsx37("div", { className: getClassName21("helper"), children: "empty" }),
6305
- tree.items.map((node) => /* @__PURE__ */ jsx37(
6419
+ return /* @__PURE__ */ jsxs14("ul", { className: getClassName22(), children: [
6420
+ tree.items.length === 0 && /* @__PURE__ */ jsx38("div", { className: getClassName22("helper"), children: "empty" }),
6421
+ tree.items.map((node) => /* @__PURE__ */ jsx38(
6306
6422
  Layer,
6307
6423
  {
6308
6424
  childIsSelected: selectedPathIds.has(node.itemId),
@@ -6322,7 +6438,7 @@ var VirtualizedLayerTreeItems = ({
6322
6438
  selectedPathIds,
6323
6439
  tree
6324
6440
  }) => {
6325
- const listRef = useRef10(null);
6441
+ const listRef = useRef11(null);
6326
6442
  const virtualizer = useVirtualizer2({
6327
6443
  count: tree.items.length,
6328
6444
  estimateSize: (index) => getEstimatedRowHeight(tree.items[index].itemId),
@@ -6348,7 +6464,7 @@ var VirtualizedLayerTreeItems = ({
6348
6464
  const gapSize = Math.max(virtualItem.start - previousEnd, 0);
6349
6465
  if (gapSize > 0) {
6350
6466
  renderedItems.push(
6351
- /* @__PURE__ */ jsx37(
6467
+ /* @__PURE__ */ jsx38(
6352
6468
  "li",
6353
6469
  {
6354
6470
  "aria-hidden": "true",
@@ -6359,7 +6475,7 @@ var VirtualizedLayerTreeItems = ({
6359
6475
  );
6360
6476
  }
6361
6477
  renderedItems.push(
6362
- /* @__PURE__ */ jsx37(
6478
+ /* @__PURE__ */ jsx38(
6363
6479
  Layer,
6364
6480
  {
6365
6481
  childIsSelected: selectedPathIds.has(node.itemId),
@@ -6380,7 +6496,7 @@ var VirtualizedLayerTreeItems = ({
6380
6496
  const trailingGap = Math.max(totalSize - previousEnd, 0);
6381
6497
  if (trailingGap > 0) {
6382
6498
  renderedItems.push(
6383
- /* @__PURE__ */ jsx37(
6499
+ /* @__PURE__ */ jsx38(
6384
6500
  "li",
6385
6501
  {
6386
6502
  "aria-hidden": "true",
@@ -6390,8 +6506,8 @@ var VirtualizedLayerTreeItems = ({
6390
6506
  )
6391
6507
  );
6392
6508
  }
6393
- return /* @__PURE__ */ jsxs13("ul", { className: getClassName21(), ref: listRef, children: [
6394
- tree.items.length === 0 && /* @__PURE__ */ jsx37("div", { className: getClassName21("helper"), children: "empty" }),
6509
+ return /* @__PURE__ */ jsxs14("ul", { className: getClassName22(), ref: listRef, children: [
6510
+ tree.items.length === 0 && /* @__PURE__ */ jsx38("div", { className: getClassName22("helper"), children: "empty" }),
6395
6511
  renderedItems
6396
6512
  ] });
6397
6513
  };
@@ -6400,7 +6516,7 @@ var LayerTree = ({
6400
6516
  selectedPathIds,
6401
6517
  trees
6402
6518
  }) => {
6403
- return /* @__PURE__ */ jsx37(Fragment8, { children: trees.map((tree) => /* @__PURE__ */ jsx37(
6519
+ return /* @__PURE__ */ jsx38(Fragment8, { children: trees.map((tree) => /* @__PURE__ */ jsx38(
6404
6520
  LayerTreeZone,
6405
6521
  {
6406
6522
  depth: 0,
@@ -6425,7 +6541,7 @@ var findZonesForArea = (state, area) => {
6425
6541
 
6426
6542
  // components/Editor/components/Outline/index.tsx
6427
6543
  import { useShallow as useShallow7 } from "zustand/react/shallow";
6428
- import { jsx as jsx38 } from "react/jsx-runtime";
6544
+ import { jsx as jsx39 } from "react/jsx-runtime";
6429
6545
  var Outline = () => {
6430
6546
  const outlineOverride = useAppStore((s) => s.overrides.outline);
6431
6547
  const config = useAppStore((s) => s.config);
@@ -6458,7 +6574,7 @@ var Outline = () => {
6458
6574
  [config, nodes, rootZones, zones]
6459
6575
  );
6460
6576
  const Wrapper = useMemo15(() => outlineOverride || "div", [outlineOverride]);
6461
- return /* @__PURE__ */ jsx38(Wrapper, { children: /* @__PURE__ */ jsx38(
6577
+ return /* @__PURE__ */ jsx39(Wrapper, { children: /* @__PURE__ */ jsx39(
6462
6578
  LayerTree,
6463
6579
  {
6464
6580
  selectedId,
@@ -6470,16 +6586,16 @@ var Outline = () => {
6470
6586
 
6471
6587
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/plugins/outline/styles.module.css#css-module
6472
6588
  init_react_import();
6473
- var styles_module_default17 = { "OutlinePlugin": "_OutlinePlugin_q92j6_1" };
6589
+ var styles_module_default18 = { "OutlinePlugin": "_OutlinePlugin_q92j6_1" };
6474
6590
 
6475
6591
  // plugins/outline/index.tsx
6476
- import { jsx as jsx39 } from "react/jsx-runtime";
6477
- var getClassName22 = get_class_name_factory_default("OutlinePlugin", styles_module_default17);
6592
+ import { jsx as jsx40 } from "react/jsx-runtime";
6593
+ var getClassName23 = get_class_name_factory_default("OutlinePlugin", styles_module_default18);
6478
6594
  var outlinePlugin = () => ({
6479
6595
  name: "outline",
6480
6596
  label: "Outline",
6481
- render: () => /* @__PURE__ */ jsx39("div", { className: getClassName22(), children: /* @__PURE__ */ jsx39(Outline, {}) }),
6482
- icon: /* @__PURE__ */ jsx39(Layers, {})
6597
+ render: () => /* @__PURE__ */ jsx40("div", { className: getClassName23(), children: /* @__PURE__ */ jsx40(Outline, {}) }),
6598
+ icon: /* @__PURE__ */ jsx40(Layers, {})
6483
6599
  });
6484
6600
 
6485
6601
  // plugins/fields/index.tsx
@@ -6490,7 +6606,7 @@ init_react_import();
6490
6606
 
6491
6607
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Breadcrumbs/styles.module.css#css-module
6492
6608
  init_react_import();
6493
- var styles_module_default18 = { "Breadcrumbs": "_Breadcrumbs_1cjxk_1", "Breadcrumbs-breadcrumb": "_Breadcrumbs-breadcrumb_1cjxk_10", "Breadcrumbs-breadcrumbLabel": "_Breadcrumbs-breadcrumbLabel_1cjxk_17" };
6609
+ var styles_module_default19 = { "Breadcrumbs": "_Breadcrumbs_1cjxk_1", "Breadcrumbs-breadcrumb": "_Breadcrumbs-breadcrumb_1cjxk_10", "Breadcrumbs-breadcrumbLabel": "_Breadcrumbs-breadcrumbLabel_1cjxk_17" };
6494
6610
 
6495
6611
  // lib/use-breadcrumbs.ts
6496
6612
  init_react_import();
@@ -6537,26 +6653,26 @@ var useBreadcrumbs = (renderCount) => {
6537
6653
  };
6538
6654
 
6539
6655
  // components/Breadcrumbs/index.tsx
6540
- import { jsx as jsx40, jsxs as jsxs14 } from "react/jsx-runtime";
6541
- var getClassName23 = get_class_name_factory_default("Breadcrumbs", styles_module_default18);
6656
+ import { jsx as jsx41, jsxs as jsxs15 } from "react/jsx-runtime";
6657
+ var getClassName24 = get_class_name_factory_default("Breadcrumbs", styles_module_default19);
6542
6658
  var Breadcrumbs = ({
6543
6659
  children,
6544
6660
  numParents = 1
6545
6661
  }) => {
6546
6662
  const setUi = useAppStore((s) => s.setUi);
6547
6663
  const breadcrumbs = useBreadcrumbs(numParents);
6548
- return /* @__PURE__ */ jsxs14("div", { className: getClassName23(), children: [
6549
- breadcrumbs.map((breadcrumb, i) => /* @__PURE__ */ jsxs14("div", { className: getClassName23("breadcrumb"), children: [
6550
- /* @__PURE__ */ jsx40(
6664
+ return /* @__PURE__ */ jsxs15("div", { className: getClassName24(), children: [
6665
+ breadcrumbs.map((breadcrumb, i) => /* @__PURE__ */ jsxs15("div", { className: getClassName24("breadcrumb"), children: [
6666
+ /* @__PURE__ */ jsx41(
6551
6667
  "button",
6552
6668
  {
6553
6669
  type: "button",
6554
- className: getClassName23("breadcrumbLabel"),
6670
+ className: getClassName24("breadcrumbLabel"),
6555
6671
  onClick: () => setUi({ itemSelector: breadcrumb.selector }),
6556
6672
  children: breadcrumb.label
6557
6673
  }
6558
6674
  ),
6559
- /* @__PURE__ */ jsx40(ChevronRight, { size: 14 })
6675
+ /* @__PURE__ */ jsx41(ChevronRight, { size: 14 })
6560
6676
  ] }, i)),
6561
6677
  children
6562
6678
  ] });
@@ -6567,23 +6683,23 @@ init_react_import();
6567
6683
 
6568
6684
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Fields/styles.module.css#css-module
6569
6685
  init_react_import();
6570
- var styles_module_default19 = { "EditorFields": "_EditorFields_3dnua_1", "EditorFields--isLoading": "_EditorFields--isLoading_3dnua_6", "EditorFields-loadingOverlay": "_EditorFields-loadingOverlay_3dnua_10", "EditorFields-loadingOverlayInner": "_EditorFields-loadingOverlayInner_3dnua_25", "EditorFields-field": "_EditorFields-field_3dnua_32", "EditorFields--wrapFields": "_EditorFields--wrapFields_3dnua_36", "EditorFields-syncButton": "_EditorFields-syncButton_3dnua_46", "EditorFields-syncButton--unlinked": "_EditorFields-syncButton--unlinked_3dnua_78" };
6686
+ var styles_module_default20 = { "EditorFields": "_EditorFields_3dnua_1", "EditorFields--isLoading": "_EditorFields--isLoading_3dnua_6", "EditorFields-loadingOverlay": "_EditorFields-loadingOverlay_3dnua_10", "EditorFields-loadingOverlayInner": "_EditorFields-loadingOverlayInner_3dnua_25", "EditorFields-field": "_EditorFields-field_3dnua_32", "EditorFields--wrapFields": "_EditorFields--wrapFields_3dnua_36", "EditorFields-syncButton": "_EditorFields-syncButton_3dnua_46", "EditorFields-syncButton--unlinked": "_EditorFields-syncButton--unlinked_3dnua_78" };
6571
6687
 
6572
6688
  // components/Editor/components/Fields/index.tsx
6573
6689
  import {
6574
6690
  memo as memo8,
6575
- useCallback as useCallback15,
6691
+ useCallback as useCallback16,
6576
6692
  useContext as useContext12,
6577
6693
  useEffect as useEffect19,
6578
6694
  useMemo as useMemo17
6579
6695
  } from "react";
6580
6696
  import { useShallow as useShallow8 } from "zustand/react/shallow";
6581
- import { Fragment as Fragment9, jsx as jsx41, jsxs as jsxs15 } from "react/jsx-runtime";
6582
- var getClassName24 = get_class_name_factory_default("EditorFields", styles_module_default19);
6697
+ import { Fragment as Fragment9, jsx as jsx42, jsxs as jsxs16 } from "react/jsx-runtime";
6698
+ var getClassName25 = get_class_name_factory_default("EditorFields", styles_module_default20);
6583
6699
  var DefaultFields = ({
6584
6700
  children
6585
6701
  }) => {
6586
- return /* @__PURE__ */ jsx41(Fragment9, { children });
6702
+ return /* @__PURE__ */ jsx42(Fragment9, { children });
6587
6703
  };
6588
6704
  var createOnChange = (fieldName, appStore) => (value, updatedUi) => __async(null, null, function* () {
6589
6705
  const { dispatch, state, selectedItem, resolveComponentData } = appStore.getState();
@@ -6644,7 +6760,7 @@ var FieldsChildInner = ({ fieldName }) => {
6644
6760
  })
6645
6761
  );
6646
6762
  const appStore = useAppStoreApi();
6647
- const onChange = useCallback15(createOnChange(fieldName, appStore), [
6763
+ const onChange = useCallback16(createOnChange(fieldName, appStore), [
6648
6764
  fieldName
6649
6765
  ]);
6650
6766
  const { visible = true } = field != null ? field : {};
@@ -6663,7 +6779,7 @@ var FieldsChildInner = ({ fieldName }) => {
6663
6779
  }, [appStore, fieldStore]);
6664
6780
  if (!field || !id || !visible) return null;
6665
6781
  if (field.type === "slot") return null;
6666
- return /* @__PURE__ */ jsx41("div", { className: getClassName24("field"), children: /* @__PURE__ */ jsx41(
6782
+ return /* @__PURE__ */ jsx42("div", { className: getClassName25("field"), children: /* @__PURE__ */ jsx42(
6667
6783
  AutoFieldPrivate,
6668
6784
  {
6669
6785
  field,
@@ -6681,7 +6797,7 @@ var FieldsChild = ({ fieldName }) => {
6681
6797
  const value = (_a = appStore.getState().getCurrentData().props) == null ? void 0 : _a[fieldName];
6682
6798
  return { [fieldName]: value };
6683
6799
  }, []);
6684
- return /* @__PURE__ */ jsx41(fieldContextStore.Provider, { value: initialValue, children: /* @__PURE__ */ jsx41(FieldsChildInner, { fieldName }) });
6800
+ return /* @__PURE__ */ jsx42(fieldContextStore.Provider, { value: initialValue, children: /* @__PURE__ */ jsx42(FieldsChildInner, { fieldName }) });
6685
6801
  };
6686
6802
  var FieldsChildMemo = memo8(FieldsChild);
6687
6803
  var GlobalSyncButton = () => {
@@ -6711,12 +6827,12 @@ var GlobalSyncButton = () => {
6711
6827
  });
6712
6828
  });
6713
6829
  const syncButtonClass = [
6714
- getClassName24("syncButton"),
6715
- isUnlinked ? styles_module_default19["EditorFields-syncButton--unlinked"] : null
6830
+ getClassName25("syncButton"),
6831
+ isUnlinked ? styles_module_default20["EditorFields-syncButton--unlinked"] : null
6716
6832
  ].filter(Boolean).join(" ");
6717
- return /* @__PURE__ */ jsxs15("button", { type: "button", className: syncButtonClass, onClick, children: [
6718
- /* @__PURE__ */ jsx41(Link, { size: 14 }),
6719
- /* @__PURE__ */ jsx41("span", { children: isUnlinked ? "Link to shared" : "Linked to shared" })
6833
+ return /* @__PURE__ */ jsxs16("button", { type: "button", className: syncButtonClass, onClick, children: [
6834
+ /* @__PURE__ */ jsx42(Link, { size: 14 }),
6835
+ /* @__PURE__ */ jsx42("span", { children: isUnlinked ? "Link to shared" : "Linked to shared" })
6720
6836
  ] });
6721
6837
  };
6722
6838
  var FieldsInternal = ({ wrapFields = true }) => {
@@ -6744,19 +6860,19 @@ var FieldsInternal = ({ wrapFields = true }) => {
6744
6860
  );
6745
6861
  const isLoading = fieldsLoading || componentResolving;
6746
6862
  const Wrapper = useMemo17(() => overrides.fields || DefaultFields, [overrides]);
6747
- return /* @__PURE__ */ jsxs15(
6863
+ return /* @__PURE__ */ jsxs16(
6748
6864
  "form",
6749
6865
  {
6750
- className: getClassName24({ wrapFields }),
6866
+ className: getClassName25({ wrapFields }),
6751
6867
  onSubmit: (e) => {
6752
6868
  e.preventDefault();
6753
6869
  },
6754
6870
  children: [
6755
- /* @__PURE__ */ jsxs15(Wrapper, { isLoading, itemSelector, children: [
6756
- /* @__PURE__ */ jsx41(GlobalSyncButton, {}),
6757
- fieldNames.map((fieldName) => /* @__PURE__ */ jsx41(FieldsChildMemo, { fieldName }, fieldName))
6871
+ /* @__PURE__ */ jsxs16(Wrapper, { isLoading, itemSelector, children: [
6872
+ /* @__PURE__ */ jsx42(GlobalSyncButton, {}),
6873
+ fieldNames.map((fieldName) => /* @__PURE__ */ jsx42(FieldsChildMemo, { fieldName }, fieldName))
6758
6874
  ] }),
6759
- isLoading && /* @__PURE__ */ jsx41("div", { className: getClassName24("loadingOverlay"), children: /* @__PURE__ */ jsx41("div", { className: getClassName24("loadingOverlayInner"), children: /* @__PURE__ */ jsx41(Loader, { size: 16 }) }) })
6875
+ isLoading && /* @__PURE__ */ jsx42("div", { className: getClassName25("loadingOverlay"), children: /* @__PURE__ */ jsx42("div", { className: getClassName25("loadingOverlayInner"), children: /* @__PURE__ */ jsx42(Loader, { size: 16 }) }) })
6760
6876
  ]
6761
6877
  }
6762
6878
  );
@@ -6765,11 +6881,11 @@ var Fields = memo8(FieldsInternal);
6765
6881
 
6766
6882
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/plugins/fields/styles.module.css#css-module
6767
6883
  init_react_import();
6768
- var styles_module_default20 = { "FieldsPlugin": "_FieldsPlugin_262zt_1", "FieldsPlugin-header": "_FieldsPlugin-header_262zt_7" };
6884
+ var styles_module_default21 = { "FieldsPlugin": "_FieldsPlugin_262zt_1", "FieldsPlugin-header": "_FieldsPlugin-header_262zt_7" };
6769
6885
 
6770
6886
  // plugins/fields/index.tsx
6771
- import { jsx as jsx42, jsxs as jsxs16 } from "react/jsx-runtime";
6772
- var getClassName25 = get_class_name_factory_default("FieldsPlugin", styles_module_default20);
6887
+ import { jsx as jsx43, jsxs as jsxs17 } from "react/jsx-runtime";
6888
+ var getClassName26 = get_class_name_factory_default("FieldsPlugin", styles_module_default21);
6773
6889
  var CurrentTitle = () => {
6774
6890
  const label = useAppStore((s) => {
6775
6891
  var _a, _b;
@@ -6781,11 +6897,11 @@ var CurrentTitle = () => {
6781
6897
  var fieldsPlugin = ({ desktopSideBar = "right" } = {}) => ({
6782
6898
  name: "fields",
6783
6899
  label: "Fields",
6784
- render: () => /* @__PURE__ */ jsxs16("div", { className: getClassName25(), children: [
6785
- /* @__PURE__ */ jsx42("div", { className: getClassName25("header"), children: /* @__PURE__ */ jsx42(Breadcrumbs, { numParents: 2, children: /* @__PURE__ */ jsx42(CurrentTitle, {}) }) }),
6786
- /* @__PURE__ */ jsx42(Fields, {})
6900
+ render: () => /* @__PURE__ */ jsxs17("div", { className: getClassName26(), children: [
6901
+ /* @__PURE__ */ jsx43("div", { className: getClassName26("header"), children: /* @__PURE__ */ jsx43(Breadcrumbs, { numParents: 2, children: /* @__PURE__ */ jsx43(CurrentTitle, {}) }) }),
6902
+ /* @__PURE__ */ jsx43(Fields, {})
6787
6903
  ] }),
6788
- icon: /* @__PURE__ */ jsx42(RectangleEllipsis, {}),
6904
+ icon: /* @__PURE__ */ jsx43(RectangleEllipsis, {}),
6789
6905
  mobileOnly: desktopSideBar === "right"
6790
6906
  });
6791
6907
 
@@ -6793,17 +6909,17 @@ var fieldsPlugin = ({ desktopSideBar = "right" } = {}) => ({
6793
6909
  init_react_import();
6794
6910
  import {
6795
6911
  createContext as createContext8,
6796
- useCallback as useCallback24,
6912
+ useCallback as useCallback25,
6797
6913
  useContext as useContext15,
6798
6914
  useEffect as useEffect26,
6799
6915
  useMemo as useMemo24,
6800
- useRef as useRef18,
6916
+ useRef as useRef19,
6801
6917
  useState as useState24
6802
6918
  } from "react";
6803
6919
 
6804
6920
  // components/Editor/components/Preview/index.tsx
6805
6921
  init_react_import();
6806
- import { useCallback as useCallback16, useEffect as useEffect21, useRef as useRef11, useMemo as useMemo18 } from "react";
6922
+ import { useCallback as useCallback17, useEffect as useEffect21, useRef as useRef12, useMemo as useMemo18 } from "react";
6807
6923
 
6808
6924
  // components/AutoFrame/index.tsx
6809
6925
  init_react_import();
@@ -6815,7 +6931,7 @@ import {
6815
6931
  } from "react";
6816
6932
  import hash from "object-hash";
6817
6933
  import { createPortal as createPortal3 } from "react-dom";
6818
- import { Fragment as Fragment10, jsx as jsx43 } from "react/jsx-runtime";
6934
+ import { Fragment as Fragment10, jsx as jsx44 } from "react/jsx-runtime";
6819
6935
  var styleSelector = 'style, link[rel="stylesheet"]';
6820
6936
  var collectStyles = (doc) => {
6821
6937
  const collected = [];
@@ -7032,7 +7148,7 @@ var CopyHostStyles = ({
7032
7148
  observer.disconnect();
7033
7149
  };
7034
7150
  }, []);
7035
- return /* @__PURE__ */ jsx43(Fragment10, { children });
7151
+ return /* @__PURE__ */ jsx44(Fragment10, { children });
7036
7152
  };
7037
7153
  var autoFrameContext = createContext6({});
7038
7154
  var useFrame = () => useContext13(autoFrameContext);
@@ -7079,7 +7195,7 @@ function AutoFrame(_a) {
7079
7195
  }
7080
7196
  }
7081
7197
  }, [frameRef, loaded, stylesLoaded]);
7082
- return /* @__PURE__ */ jsx43(
7198
+ return /* @__PURE__ */ jsx44(
7083
7199
  "iframe",
7084
7200
  __spreadProps(__spreadValues({}, props), {
7085
7201
  className,
@@ -7089,7 +7205,7 @@ function AutoFrame(_a) {
7089
7205
  onLoad: () => {
7090
7206
  setLoaded(true);
7091
7207
  },
7092
- children: /* @__PURE__ */ jsx43(autoFrameContext.Provider, { value: ctx, children: loaded && mountTarget && /* @__PURE__ */ jsx43(
7208
+ children: /* @__PURE__ */ jsx44(autoFrameContext.Provider, { value: ctx, children: loaded && mountTarget && /* @__PURE__ */ jsx44(
7093
7209
  CopyHostStyles,
7094
7210
  {
7095
7211
  debug,
@@ -7105,11 +7221,11 @@ var AutoFrame_default = AutoFrame;
7105
7221
 
7106
7222
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Preview/styles.module.css#css-module
7107
7223
  init_react_import();
7108
- var styles_module_default21 = { "EditorPreview": "_EditorPreview_xou64_1", "EditorPreview-frame": "_EditorPreview-frame_xou64_6" };
7224
+ var styles_module_default22 = { "EditorPreview": "_EditorPreview_xou64_1", "EditorPreview-frame": "_EditorPreview-frame_xou64_6" };
7109
7225
 
7110
7226
  // components/Editor/components/Preview/index.tsx
7111
- import { Fragment as Fragment11, jsx as jsx44 } from "react/jsx-runtime";
7112
- var getClassName26 = get_class_name_factory_default("EditorPreview", styles_module_default21);
7227
+ import { Fragment as Fragment11, jsx as jsx45 } from "react/jsx-runtime";
7228
+ var getClassName27 = get_class_name_factory_default("EditorPreview", styles_module_default22);
7113
7229
  var Preview2 = ({ id = "editor-preview" }) => {
7114
7230
  const dispatch = useAppStore((s) => s.dispatch);
7115
7231
  const root = useAppStore((s) => s.state.data.root);
@@ -7121,7 +7237,7 @@ var Preview2 = ({ id = "editor-preview" }) => {
7121
7237
  const renderData = useAppStore(
7122
7238
  (s) => s.state.ui.previewMode === "edit" ? null : s.state.data
7123
7239
  );
7124
- const Page = useCallback16(
7240
+ const Page = useCallback17(
7125
7241
  (pageProps) => {
7126
7242
  var _a, _b, _c, _d;
7127
7243
  const propsWithSlots = useSlots(
@@ -7135,14 +7251,14 @@ var Preview2 = ({ id = "editor-preview" }) => {
7135
7251
  );
7136
7252
  return ((_c = config.root) == null ? void 0 : _c.render) ? (_d = config.root) == null ? void 0 : _d.render(__spreadValues(__spreadValues({
7137
7253
  id: "editor-root"
7138
- }, propsWithSlots), richtextProps)) : /* @__PURE__ */ jsx44(Fragment11, { children: propsWithSlots.children });
7254
+ }, propsWithSlots), richtextProps)) : /* @__PURE__ */ jsx45(Fragment11, { children: propsWithSlots.children });
7139
7255
  },
7140
7256
  [config]
7141
7257
  );
7142
7258
  const Frame = useMemo18(() => overrides.iframe, [overrides]);
7143
7259
  const rootProps = root.props || root;
7144
- const ref = useRef11(null);
7145
- const inner = !renderData ? /* @__PURE__ */ jsx44(
7260
+ const ref = useRef12(null);
7261
+ const inner = !renderData ? /* @__PURE__ */ jsx45(
7146
7262
  Page,
7147
7263
  __spreadProps(__spreadValues({}, rootProps), {
7148
7264
  editor: {
@@ -7152,18 +7268,18 @@ var Preview2 = ({ id = "editor-preview" }) => {
7152
7268
  metadata
7153
7269
  },
7154
7270
  editMode: true,
7155
- children: /* @__PURE__ */ jsx44(DropZonePure, { zone: rootDroppableId })
7271
+ children: /* @__PURE__ */ jsx45(DropZonePure, { zone: rootDroppableId })
7156
7272
  })
7157
- ) : /* @__PURE__ */ jsx44(Render, { data: renderData, config, metadata });
7273
+ ) : /* @__PURE__ */ jsx45(Render, { data: renderData, config, metadata });
7158
7274
  useEffect21(() => {
7159
7275
  if (!iframe.enabled) {
7160
7276
  setStatus("READY");
7161
7277
  }
7162
7278
  }, [iframe.enabled]);
7163
- return /* @__PURE__ */ jsx44(
7279
+ return /* @__PURE__ */ jsx45(
7164
7280
  "div",
7165
7281
  {
7166
- className: getClassName26(),
7282
+ className: getClassName27(),
7167
7283
  id,
7168
7284
  "data-editor-preview": true,
7169
7285
  onClick: (e) => {
@@ -7172,11 +7288,11 @@ var Preview2 = ({ id = "editor-preview" }) => {
7172
7288
  dispatch({ type: "setUi", ui: { itemSelector: null } });
7173
7289
  }
7174
7290
  },
7175
- children: iframe.enabled ? /* @__PURE__ */ jsx44(
7291
+ children: iframe.enabled ? /* @__PURE__ */ jsx45(
7176
7292
  AutoFrame_default,
7177
7293
  {
7178
7294
  id: "preview-frame",
7179
- className: getClassName26("frame"),
7295
+ className: getClassName27("frame"),
7180
7296
  "data-rfd-iframe": true,
7181
7297
  onReady: () => {
7182
7298
  setStatus("READY");
@@ -7185,18 +7301,18 @@ var Preview2 = ({ id = "editor-preview" }) => {
7185
7301
  setStatus("MOUNTED");
7186
7302
  },
7187
7303
  frameRef: ref,
7188
- children: /* @__PURE__ */ jsx44(autoFrameContext.Consumer, { children: ({ document: document2 }) => {
7304
+ children: /* @__PURE__ */ jsx45(autoFrameContext.Consumer, { children: ({ document: document2 }) => {
7189
7305
  if (Frame) {
7190
- return /* @__PURE__ */ jsx44(Frame, { document: document2, children: inner });
7306
+ return /* @__PURE__ */ jsx45(Frame, { document: document2, children: inner });
7191
7307
  }
7192
7308
  return inner;
7193
7309
  } })
7194
7310
  }
7195
- ) : /* @__PURE__ */ jsx44(
7311
+ ) : /* @__PURE__ */ jsx45(
7196
7312
  "div",
7197
7313
  {
7198
7314
  id: "preview-frame",
7199
- className: getClassName26("frame"),
7315
+ className: getClassName27("frame"),
7200
7316
  ref,
7201
7317
  "data-editor-entry": true,
7202
7318
  children: inner
@@ -7304,16 +7420,16 @@ function splitGlobals(data, config) {
7304
7420
  // components/Editor/components/Layout/index.tsx
7305
7421
  init_react_import();
7306
7422
  import {
7307
- useCallback as useCallback23,
7423
+ useCallback as useCallback24,
7308
7424
  useEffect as useEffect25,
7309
7425
  useMemo as useMemo23,
7310
- useRef as useRef17,
7426
+ useRef as useRef18,
7311
7427
  useState as useState23
7312
7428
  } from "react";
7313
7429
 
7314
7430
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Layout/styles.module.css#css-module
7315
7431
  init_react_import();
7316
- var styles_module_default22 = { "Editor": "_Editor_1ty8s_19", "Editor-portal": "_Editor-portal_1ty8s_32", "EditorLayout": "_EditorLayout_1ty8s_37", "EditorLayout-inner": "_EditorLayout-inner_1ty8s_41", "Editor--hidePlugins": "_Editor--hidePlugins_1ty8s_73", "EditorLayout--mounted": "_EditorLayout--mounted_1ty8s_78", "EditorLayout--mobilePanelHeightToggle": "_EditorLayout--mobilePanelHeightToggle_1ty8s_82", "EditorLayout--leftSideBarVisible": "_EditorLayout--leftSideBarVisible_1ty8s_82", "EditorLayout--mobilePanelCustomHeight": "_EditorLayout--mobilePanelCustomHeight_1ty8s_87", "EditorLayout--mobilePanelHeightMinContent": "_EditorLayout--mobilePanelHeightMinContent_1ty8s_105", "EditorLayout--rightSideBarVisible": "_EditorLayout--rightSideBarVisible_1ty8s_127", "EditorLayout-mounted": "_EditorLayout-mounted_1ty8s_146", "EditorLayout-nav": "_EditorLayout-nav_1ty8s_187", "Editor-fieldSideBarToolbar": "_Editor-fieldSideBarToolbar_1ty8s_203", "Editor-fieldSideBarHistory": "_Editor-fieldSideBarHistory_1ty8s_213", "Editor-fieldSideBarActions": "_Editor-fieldSideBarActions_1ty8s_219", "EditorLayout-mobilePanel": "_EditorLayout-mobilePanel_1ty8s_225", "EditorLayout-mobilePanelContent": "_EditorLayout-mobilePanelContent_1ty8s_245", "EditorLayout-mobileDragHandle": "_EditorLayout-mobileDragHandle_1ty8s_252", "EditorLayout-mobileDragHandlePill": "_EditorLayout-mobileDragHandlePill_1ty8s_266", "EditorPluginTab": "_EditorPluginTab_1ty8s_273", "EditorPluginTab--visible": "_EditorPluginTab--visible_1ty8s_279", "EditorPluginTab-body": "_EditorPluginTab-body_1ty8s_284" };
7432
+ var styles_module_default23 = { "Editor": "_Editor_1ty8s_19", "Editor-portal": "_Editor-portal_1ty8s_32", "EditorLayout": "_EditorLayout_1ty8s_37", "EditorLayout-inner": "_EditorLayout-inner_1ty8s_41", "Editor--hidePlugins": "_Editor--hidePlugins_1ty8s_73", "EditorLayout--mounted": "_EditorLayout--mounted_1ty8s_78", "EditorLayout--mobilePanelHeightToggle": "_EditorLayout--mobilePanelHeightToggle_1ty8s_82", "EditorLayout--leftSideBarVisible": "_EditorLayout--leftSideBarVisible_1ty8s_82", "EditorLayout--mobilePanelCustomHeight": "_EditorLayout--mobilePanelCustomHeight_1ty8s_87", "EditorLayout--mobilePanelHeightMinContent": "_EditorLayout--mobilePanelHeightMinContent_1ty8s_105", "EditorLayout--rightSideBarVisible": "_EditorLayout--rightSideBarVisible_1ty8s_127", "EditorLayout-mounted": "_EditorLayout-mounted_1ty8s_146", "EditorLayout-nav": "_EditorLayout-nav_1ty8s_187", "Editor-fieldSideBarToolbar": "_Editor-fieldSideBarToolbar_1ty8s_203", "Editor-fieldSideBarHistory": "_Editor-fieldSideBarHistory_1ty8s_213", "Editor-fieldSideBarActions": "_Editor-fieldSideBarActions_1ty8s_219", "EditorLayout-mobilePanel": "_EditorLayout-mobilePanel_1ty8s_225", "EditorLayout-mobilePanelContent": "_EditorLayout-mobilePanelContent_1ty8s_245", "EditorLayout-mobileDragHandle": "_EditorLayout-mobileDragHandle_1ty8s_252", "EditorLayout-mobileDragHandlePill": "_EditorLayout-mobileDragHandlePill_1ty8s_266", "EditorPluginTab": "_EditorPluginTab_1ty8s_273", "EditorPluginTab--visible": "_EditorPluginTab--visible_1ty8s_279", "EditorPluginTab-body": "_EditorPluginTab-body_1ty8s_284" };
7317
7433
 
7318
7434
  // lib/use-inject-css.ts
7319
7435
  init_react_import();
@@ -7344,15 +7460,15 @@ var useInjectGlobalCss = (iframeEnabled) => {
7344
7460
 
7345
7461
  // components/DefaultOverride/index.tsx
7346
7462
  init_react_import();
7347
- import { Fragment as Fragment12, jsx as jsx45 } from "react/jsx-runtime";
7348
- var DefaultOverride = ({ children }) => /* @__PURE__ */ jsx45(Fragment12, { children });
7463
+ import { Fragment as Fragment12, jsx as jsx46 } from "react/jsx-runtime";
7464
+ var DefaultOverride = ({ children }) => /* @__PURE__ */ jsx46(Fragment12, { children });
7349
7465
 
7350
7466
  // lib/use-preview-mode-hotkeys.ts
7351
7467
  init_react_import();
7352
- import { useCallback as useCallback17 } from "react";
7468
+ import { useCallback as useCallback18 } from "react";
7353
7469
  var usePreviewModeHotkeys = () => {
7354
7470
  const appStore = useAppStoreApi();
7355
- const toggleInteractive = useCallback17(() => {
7471
+ const toggleInteractive = useCallback18(() => {
7356
7472
  const dispatch = appStore.getState().dispatch;
7357
7473
  dispatch({
7358
7474
  type: "setUi",
@@ -7370,11 +7486,11 @@ init_react_import();
7370
7486
 
7371
7487
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/SidebarSection/styles.module.css#css-module
7372
7488
  init_react_import();
7373
- var styles_module_default23 = { "SidebarSection": "_SidebarSection_tt2oy_1", "SidebarSection-title": "_SidebarSection-title_tt2oy_12", "SidebarSection--noBorderTop": "_SidebarSection--noBorderTop_tt2oy_20", "SidebarSection-content": "_SidebarSection-content_tt2oy_24", "SidebarSection-breadcrumbLabel": "_SidebarSection-breadcrumbLabel_tt2oy_33", "SidebarSection-breadcrumbs": "_SidebarSection-breadcrumbs_tt2oy_62", "SidebarSection-breadcrumb": "_SidebarSection-breadcrumb_tt2oy_33", "SidebarSection-heading": "_SidebarSection-heading_tt2oy_74", "SidebarSection-loadingOverlay": "_SidebarSection-loadingOverlay_tt2oy_88" };
7489
+ var styles_module_default24 = { "SidebarSection": "_SidebarSection_tt2oy_1", "SidebarSection-title": "_SidebarSection-title_tt2oy_12", "SidebarSection--noBorderTop": "_SidebarSection--noBorderTop_tt2oy_20", "SidebarSection-content": "_SidebarSection-content_tt2oy_24", "SidebarSection-breadcrumbLabel": "_SidebarSection-breadcrumbLabel_tt2oy_33", "SidebarSection-breadcrumbs": "_SidebarSection-breadcrumbs_tt2oy_62", "SidebarSection-breadcrumb": "_SidebarSection-breadcrumb_tt2oy_33", "SidebarSection-heading": "_SidebarSection-heading_tt2oy_74", "SidebarSection-loadingOverlay": "_SidebarSection-loadingOverlay_tt2oy_88" };
7374
7490
 
7375
7491
  // components/SidebarSection/index.tsx
7376
- import { jsx as jsx46, jsxs as jsxs17 } from "react/jsx-runtime";
7377
- var getClassName27 = get_class_name_factory_default("SidebarSection", styles_module_default23);
7492
+ import { jsx as jsx47, jsxs as jsxs18 } from "react/jsx-runtime";
7493
+ var getClassName28 = get_class_name_factory_default("SidebarSection", styles_module_default24);
7378
7494
  var SidebarSection = ({
7379
7495
  children,
7380
7496
  title,
@@ -7383,29 +7499,29 @@ var SidebarSection = ({
7383
7499
  noBorderTop,
7384
7500
  isLoading
7385
7501
  }) => {
7386
- return /* @__PURE__ */ jsxs17("div", { className: getClassName27({ noBorderTop }), style: { background }, children: [
7387
- /* @__PURE__ */ jsx46("div", { className: getClassName27("title"), children: /* @__PURE__ */ jsxs17("div", { className: getClassName27("breadcrumbs"), children: [
7388
- showBreadcrumbs && /* @__PURE__ */ jsx46(Breadcrumbs, {}),
7389
- /* @__PURE__ */ jsx46("div", { className: getClassName27("heading"), children: /* @__PURE__ */ jsx46(Heading, { rank: "2", size: "xs", children: title }) })
7502
+ return /* @__PURE__ */ jsxs18("div", { className: getClassName28({ noBorderTop }), style: { background }, children: [
7503
+ /* @__PURE__ */ jsx47("div", { className: getClassName28("title"), children: /* @__PURE__ */ jsxs18("div", { className: getClassName28("breadcrumbs"), children: [
7504
+ showBreadcrumbs && /* @__PURE__ */ jsx47(Breadcrumbs, {}),
7505
+ /* @__PURE__ */ jsx47("div", { className: getClassName28("heading"), children: /* @__PURE__ */ jsx47(Heading, { rank: "2", size: "xs", children: title }) })
7390
7506
  ] }) }),
7391
- /* @__PURE__ */ jsx46("div", { className: getClassName27("content"), children }),
7392
- isLoading && /* @__PURE__ */ jsx46("div", { className: getClassName27("loadingOverlay"), children: /* @__PURE__ */ jsx46(Loader, { size: 32 }) })
7507
+ /* @__PURE__ */ jsx47("div", { className: getClassName28("content"), children }),
7508
+ isLoading && /* @__PURE__ */ jsx47("div", { className: getClassName28("loadingOverlay"), children: /* @__PURE__ */ jsx47(Loader, { size: 32 }) })
7393
7509
  ] });
7394
7510
  };
7395
7511
 
7396
7512
  // components/Editor/components/Canvas/index.tsx
7397
7513
  init_react_import();
7398
7514
  import {
7399
- useCallback as useCallback18,
7515
+ useCallback as useCallback19,
7400
7516
  useEffect as useEffect23,
7401
7517
  useMemo as useMemo22,
7402
- useRef as useRef14,
7518
+ useRef as useRef15,
7403
7519
  useState as useState21
7404
7520
  } from "react";
7405
7521
 
7406
7522
  // components/BrowserBar/index.tsx
7407
7523
  init_react_import();
7408
- import { useMemo as useMemo20, useRef as useRef12, useState as useState20 } from "react";
7524
+ import { useMemo as useMemo20, useRef as useRef13, useState as useState20 } from "react";
7409
7525
 
7410
7526
  // components/ui/Combobox/index.tsx
7411
7527
  init_react_import();
@@ -7413,11 +7529,11 @@ import { Combobox as ComboboxPrimitive } from "@base-ui/react";
7413
7529
 
7414
7530
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/ui/Combobox/styles.module.css#css-module
7415
7531
  init_react_import();
7416
- var styles_module_default24 = { "EditorCombobox-input": "_EditorCombobox-input_12a2a_4", "EditorCombobox-trigger": "_EditorCombobox-trigger_12a2a_21", "EditorCombobox-triggerIcon": "_EditorCombobox-triggerIcon_12a2a_42", "EditorCombobox-positioner": "_EditorCombobox-positioner_12a2a_46", "EditorCombobox-content": "_EditorCombobox-content_12a2a_50", "EditorCombobox-list": "_EditorCombobox-list_12a2a_65", "EditorCombobox-item": "_EditorCombobox-item_12a2a_71", "EditorCombobox-itemIndicator": "_EditorCombobox-itemIndicator_12a2a_97", "EditorCombobox-empty": "_EditorCombobox-empty_12a2a_110" };
7532
+ var styles_module_default25 = { "EditorCombobox-input": "_EditorCombobox-input_12a2a_4", "EditorCombobox-trigger": "_EditorCombobox-trigger_12a2a_21", "EditorCombobox-triggerIcon": "_EditorCombobox-triggerIcon_12a2a_42", "EditorCombobox-positioner": "_EditorCombobox-positioner_12a2a_46", "EditorCombobox-content": "_EditorCombobox-content_12a2a_50", "EditorCombobox-list": "_EditorCombobox-list_12a2a_65", "EditorCombobox-item": "_EditorCombobox-item_12a2a_71", "EditorCombobox-itemIndicator": "_EditorCombobox-itemIndicator_12a2a_97", "EditorCombobox-empty": "_EditorCombobox-empty_12a2a_110" };
7417
7533
 
7418
7534
  // components/ui/Combobox/index.tsx
7419
- import { jsx as jsx47, jsxs as jsxs18 } from "react/jsx-runtime";
7420
- var getClassName28 = get_class_name_factory_default("EditorCombobox", styles_module_default24);
7535
+ import { jsx as jsx48, jsxs as jsxs19 } from "react/jsx-runtime";
7536
+ var getClassName29 = get_class_name_factory_default("EditorCombobox", styles_module_default25);
7421
7537
  var join = (...values) => values.filter(Boolean).join(" ");
7422
7538
  var mergeClassName = (base, override) => {
7423
7539
  if (!override) return base;
@@ -7433,11 +7549,11 @@ function ComboboxInput(_a) {
7433
7549
  } = _b, props = __objRest(_b, [
7434
7550
  "className"
7435
7551
  ]);
7436
- return /* @__PURE__ */ jsx47(
7552
+ return /* @__PURE__ */ jsx48(
7437
7553
  ComboboxPrimitive.Input,
7438
7554
  __spreadValues({
7439
7555
  "data-slot": "combobox-input",
7440
- className: mergeClassName(getClassName28("input"), className)
7556
+ className: mergeClassName(getClassName29("input"), className)
7441
7557
  }, props)
7442
7558
  );
7443
7559
  }
@@ -7457,19 +7573,19 @@ function ComboboxContent(_a) {
7457
7573
  "alignOffset",
7458
7574
  "children"
7459
7575
  ]);
7460
- return /* @__PURE__ */ jsx47(ComboboxPrimitive.Portal, { children: /* @__PURE__ */ jsx47(
7576
+ return /* @__PURE__ */ jsx48(ComboboxPrimitive.Portal, { children: /* @__PURE__ */ jsx48(
7461
7577
  ComboboxPrimitive.Positioner,
7462
7578
  {
7463
7579
  side,
7464
7580
  sideOffset,
7465
7581
  align,
7466
7582
  alignOffset,
7467
- className: getClassName28("positioner"),
7468
- children: /* @__PURE__ */ jsx47(
7583
+ className: getClassName29("positioner"),
7584
+ children: /* @__PURE__ */ jsx48(
7469
7585
  ComboboxPrimitive.Popup,
7470
7586
  __spreadProps(__spreadValues({
7471
7587
  "data-slot": "combobox-content",
7472
- className: mergeClassName(getClassName28("content"), className)
7588
+ className: mergeClassName(getClassName29("content"), className)
7473
7589
  }, props), {
7474
7590
  children
7475
7591
  })
@@ -7483,11 +7599,11 @@ function ComboboxList(_a) {
7483
7599
  } = _b, props = __objRest(_b, [
7484
7600
  "className"
7485
7601
  ]);
7486
- return /* @__PURE__ */ jsx47(
7602
+ return /* @__PURE__ */ jsx48(
7487
7603
  ComboboxPrimitive.List,
7488
7604
  __spreadValues({
7489
7605
  "data-slot": "combobox-list",
7490
- className: mergeClassName(getClassName28("list"), className)
7606
+ className: mergeClassName(getClassName29("list"), className)
7491
7607
  }, props)
7492
7608
  );
7493
7609
  }
@@ -7499,14 +7615,14 @@ function ComboboxItem(_a) {
7499
7615
  "className",
7500
7616
  "children"
7501
7617
  ]);
7502
- return /* @__PURE__ */ jsxs18(
7618
+ return /* @__PURE__ */ jsxs19(
7503
7619
  ComboboxPrimitive.Item,
7504
7620
  __spreadProps(__spreadValues({
7505
7621
  "data-slot": "combobox-item",
7506
- className: mergeClassName(getClassName28("item"), className)
7622
+ className: mergeClassName(getClassName29("item"), className)
7507
7623
  }, props), {
7508
7624
  children: [
7509
- /* @__PURE__ */ jsx47("span", { className: getClassName28("itemIndicator"), children: /* @__PURE__ */ jsx47(ComboboxPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx47(Check, { size: 14 }) }) }),
7625
+ /* @__PURE__ */ jsx48("span", { className: getClassName29("itemIndicator"), children: /* @__PURE__ */ jsx48(ComboboxPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx48(Check, { size: 14 }) }) }),
7510
7626
  children
7511
7627
  ]
7512
7628
  })
@@ -7518,27 +7634,27 @@ function ComboboxEmpty(_a) {
7518
7634
  } = _b, props = __objRest(_b, [
7519
7635
  "className"
7520
7636
  ]);
7521
- return /* @__PURE__ */ jsx47(
7637
+ return /* @__PURE__ */ jsx48(
7522
7638
  ComboboxPrimitive.Empty,
7523
7639
  __spreadValues({
7524
7640
  "data-slot": "combobox-empty",
7525
- className: mergeClassName(getClassName28("empty"), className)
7641
+ className: mergeClassName(getClassName29("empty"), className)
7526
7642
  }, props)
7527
7643
  );
7528
7644
  }
7529
7645
 
7530
7646
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/BrowserBar/styles.module.css#css-module
7531
7647
  init_react_import();
7532
- var styles_module_default25 = { "BrowserBar": "_BrowserBar_x10eb_1", "BrowserBar-urlTrigger": "_BrowserBar-urlTrigger_x10eb_16", "BrowserBar-urlIcon": "_BrowserBar-urlIcon_x10eb_46", "BrowserBar-urlText": "_BrowserBar-urlText_x10eb_51", "BrowserBar-urlInput": "_BrowserBar-urlInput_x10eb_63", "BrowserBar-itemPath": "_BrowserBar-itemPath_x10eb_69", "BrowserBar-itemTitle": "_BrowserBar-itemTitle_x10eb_74", "BrowserBar-actions": "_BrowserBar-actions_x10eb_82", "BrowserBar-deviceIcon": "_BrowserBar-deviceIcon_x10eb_89" };
7648
+ var styles_module_default26 = { "BrowserBar": "_BrowserBar_x10eb_1", "BrowserBar-urlTrigger": "_BrowserBar-urlTrigger_x10eb_16", "BrowserBar-urlIcon": "_BrowserBar-urlIcon_x10eb_46", "BrowserBar-urlText": "_BrowserBar-urlText_x10eb_51", "BrowserBar-urlInput": "_BrowserBar-urlInput_x10eb_63", "BrowserBar-itemPath": "_BrowserBar-itemPath_x10eb_69", "BrowserBar-itemTitle": "_BrowserBar-itemTitle_x10eb_74", "BrowserBar-actions": "_BrowserBar-actions_x10eb_82", "BrowserBar-deviceIcon": "_BrowserBar-deviceIcon_x10eb_89" };
7533
7649
 
7534
7650
  // components/BrowserBar/index.tsx
7535
- import { jsx as jsx48, jsxs as jsxs19 } from "react/jsx-runtime";
7651
+ import { jsx as jsx49, jsxs as jsxs20 } from "react/jsx-runtime";
7536
7652
  var normalizeRoute = (raw) => {
7537
7653
  const trimmed = raw.trim();
7538
7654
  if (!trimmed) return trimmed;
7539
7655
  return trimmed.startsWith("/") ? trimmed : `/${trimmed}`;
7540
7656
  };
7541
- var getClassName29 = get_class_name_factory_default("BrowserBar", styles_module_default25);
7657
+ var getClassName30 = get_class_name_factory_default("BrowserBar", styles_module_default26);
7542
7658
  var DEVICE_VIEWPORTS = {
7543
7659
  desktop: { width: "100%", height: "auto", icon: "Monitor", label: "Desktop" },
7544
7660
  mobile: { width: 360, height: "auto", icon: "Smartphone", label: "Mobile" }
@@ -7574,7 +7690,7 @@ var BrowserBar = ({
7574
7690
  };
7575
7691
  const showRoutePicker = !!routes && currentPath !== void 0 && !!onRouteChange;
7576
7692
  const [inputValue, setInputValue] = useState20(currentPath != null ? currentPath : "");
7577
- const lastSyncedPath = useRef12(currentPath);
7693
+ const lastSyncedPath = useRef13(currentPath);
7578
7694
  if (lastSyncedPath.current !== currentPath) {
7579
7695
  lastSyncedPath.current = currentPath;
7580
7696
  setInputValue(currentPath != null ? currentPath : "");
@@ -7584,8 +7700,8 @@ var BrowserBar = ({
7584
7700
  if (!next || next === currentPath) return;
7585
7701
  void (onRouteChange == null ? void 0 : onRouteChange(next));
7586
7702
  };
7587
- return /* @__PURE__ */ jsxs19("div", { className: getClassName29(), children: [
7588
- showRoutePicker ? /* @__PURE__ */ jsxs19(
7703
+ return /* @__PURE__ */ jsxs20("div", { className: getClassName30(), children: [
7704
+ showRoutePicker ? /* @__PURE__ */ jsxs20(
7589
7705
  Combobox,
7590
7706
  {
7591
7707
  items: routes.map((r) => r.path),
@@ -7597,20 +7713,20 @@ var BrowserBar = ({
7597
7713
  onInputValueChange: (next) => setInputValue(next),
7598
7714
  autoHighlight: false,
7599
7715
  children: [
7600
- /* @__PURE__ */ jsxs19(
7716
+ /* @__PURE__ */ jsxs20(
7601
7717
  "form",
7602
7718
  {
7603
- className: getClassName29("urlTrigger"),
7719
+ className: getClassName30("urlTrigger"),
7604
7720
  onSubmit: (event) => {
7605
7721
  event.preventDefault();
7606
7722
  submit(inputValue);
7607
7723
  },
7608
7724
  children: [
7609
- /* @__PURE__ */ jsx48(Globe, { className: getClassName29("urlIcon"), size: 14 }),
7610
- /* @__PURE__ */ jsx48(
7725
+ /* @__PURE__ */ jsx49(Globe, { className: getClassName30("urlIcon"), size: 14 }),
7726
+ /* @__PURE__ */ jsx49(
7611
7727
  ComboboxInput,
7612
7728
  {
7613
- className: getClassName29("urlInput"),
7729
+ className: getClassName30("urlInput"),
7614
7730
  placeholder: "/",
7615
7731
  spellCheck: false,
7616
7732
  autoCorrect: "off",
@@ -7620,39 +7736,39 @@ var BrowserBar = ({
7620
7736
  ]
7621
7737
  }
7622
7738
  ),
7623
- /* @__PURE__ */ jsxs19(ComboboxContent, { children: [
7624
- /* @__PURE__ */ jsx48(ComboboxEmpty, { children: "Press Enter to go to this path" }),
7625
- /* @__PURE__ */ jsx48(ComboboxList, { children: (path) => {
7739
+ /* @__PURE__ */ jsxs20(ComboboxContent, { children: [
7740
+ /* @__PURE__ */ jsx49(ComboboxEmpty, { children: "Press Enter to go to this path" }),
7741
+ /* @__PURE__ */ jsx49(ComboboxList, { children: (path) => {
7626
7742
  const route = routes.find((r) => r.path === path);
7627
- return /* @__PURE__ */ jsxs19(ComboboxItem, { value: path, children: [
7628
- /* @__PURE__ */ jsx48("span", { className: getClassName29("itemPath"), children: path }),
7629
- (route == null ? void 0 : route.title) ? /* @__PURE__ */ jsx48("span", { className: getClassName29("itemTitle"), children: route.title }) : null
7743
+ return /* @__PURE__ */ jsxs20(ComboboxItem, { value: path, children: [
7744
+ /* @__PURE__ */ jsx49("span", { className: getClassName30("itemPath"), children: path }),
7745
+ (route == null ? void 0 : route.title) ? /* @__PURE__ */ jsx49("span", { className: getClassName30("itemTitle"), children: route.title }) : null
7630
7746
  ] }, path);
7631
7747
  } })
7632
7748
  ] })
7633
7749
  ]
7634
7750
  }
7635
- ) : /* @__PURE__ */ jsxs19("div", { className: getClassName29("urlTrigger"), children: [
7636
- /* @__PURE__ */ jsx48(Globe, { className: getClassName29("urlIcon"), size: 14 }),
7637
- /* @__PURE__ */ jsx48("span", { className: getClassName29("urlText"), children: "/" })
7751
+ ) : /* @__PURE__ */ jsxs20("div", { className: getClassName30("urlTrigger"), children: [
7752
+ /* @__PURE__ */ jsx49(Globe, { className: getClassName30("urlIcon"), size: 14 }),
7753
+ /* @__PURE__ */ jsx49("span", { className: getClassName30("urlText"), children: "/" })
7638
7754
  ] }),
7639
- /* @__PURE__ */ jsxs19("div", { className: getClassName29("actions"), children: [
7640
- /* @__PURE__ */ jsx48(
7755
+ /* @__PURE__ */ jsxs20("div", { className: getClassName30("actions"), children: [
7756
+ /* @__PURE__ */ jsx49(
7641
7757
  IconButton,
7642
7758
  {
7643
7759
  type: "button",
7644
7760
  title: activeDevice === "desktop" ? "Switch to mobile viewport" : "Switch to desktop viewport",
7645
7761
  onClick: () => setDevice(activeDevice === "desktop" ? "mobile" : "desktop"),
7646
- children: /* @__PURE__ */ jsx48("span", { className: getClassName29("deviceIcon"), children: activeDevice === "desktop" ? /* @__PURE__ */ jsx48(Monitor, { size: 16 }) : /* @__PURE__ */ jsx48(Smartphone, { size: 16 }) })
7762
+ children: /* @__PURE__ */ jsx49("span", { className: getClassName30("deviceIcon"), children: activeDevice === "desktop" ? /* @__PURE__ */ jsx49(Monitor, { size: 16 }) : /* @__PURE__ */ jsx49(Smartphone, { size: 16 }) })
7647
7763
  }
7648
7764
  ),
7649
- /* @__PURE__ */ jsx48(
7765
+ /* @__PURE__ */ jsx49(
7650
7766
  IconButton,
7651
7767
  {
7652
7768
  type: "button",
7653
7769
  title: isFullScreen ? "Exit full screen" : "Enter full screen",
7654
7770
  onClick: toggleFullScreen,
7655
- children: /* @__PURE__ */ jsx48("span", { className: getClassName29("deviceIcon"), children: isFullScreen ? /* @__PURE__ */ jsx48(Minimize, { size: 16 }) : /* @__PURE__ */ jsx48(Maximize, { size: 16 }) })
7771
+ children: /* @__PURE__ */ jsx49("span", { className: getClassName30("deviceIcon"), children: isFullScreen ? /* @__PURE__ */ jsx49(Minimize, { size: 16 }) : /* @__PURE__ */ jsx49(Maximize, { size: 16 }) })
7656
7772
  }
7657
7773
  )
7658
7774
  ] })
@@ -7661,7 +7777,7 @@ var BrowserBar = ({
7661
7777
 
7662
7778
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Canvas/styles.module.css#css-module
7663
7779
  init_react_import();
7664
- var styles_module_default26 = { "EditorCanvas": "_EditorCanvas_es8bv_1", "EditorCanvas-controls": "_EditorCanvas-controls_es8bv_17", "EditorCanvas--fullScreen": "_EditorCanvas--fullScreen_es8bv_22", "EditorCanvas-inner": "_EditorCanvas-inner_es8bv_33", "EditorCanvas-rootColumn": "_EditorCanvas-rootColumn_es8bv_46", "EditorCanvas-root": "_EditorCanvas-root_es8bv_46", "EditorCanvas--ready": "_EditorCanvas--ready_es8bv_83", "EditorCanvas-loader": "_EditorCanvas-loader_es8bv_88", "EditorCanvas--showLoader": "_EditorCanvas--showLoader_es8bv_100", "EditorCanvas-browserBar": "_EditorCanvas-browserBar_es8bv_109", "EditorCanvas-zoomControls": "_EditorCanvas-zoomControls_es8bv_114" };
7780
+ var styles_module_default27 = { "EditorCanvas": "_EditorCanvas_es8bv_1", "EditorCanvas-controls": "_EditorCanvas-controls_es8bv_17", "EditorCanvas--fullScreen": "_EditorCanvas--fullScreen_es8bv_22", "EditorCanvas-inner": "_EditorCanvas-inner_es8bv_33", "EditorCanvas-rootColumn": "_EditorCanvas-rootColumn_es8bv_46", "EditorCanvas-root": "_EditorCanvas-root_es8bv_46", "EditorCanvas--ready": "_EditorCanvas--ready_es8bv_83", "EditorCanvas-loader": "_EditorCanvas-loader_es8bv_88", "EditorCanvas--showLoader": "_EditorCanvas--showLoader_es8bv_100", "EditorCanvas-browserBar": "_EditorCanvas-browserBar_es8bv_109", "EditorCanvas-zoomControls": "_EditorCanvas-zoomControls_es8bv_114" };
7665
7781
 
7666
7782
  // components/Editor/components/Canvas/index.tsx
7667
7783
  import { useShallow as useShallow9 } from "zustand/react/shallow";
@@ -7671,22 +7787,22 @@ init_react_import();
7671
7787
  import {
7672
7788
  createContext as createContext7,
7673
7789
  useContext as useContext14,
7674
- useRef as useRef13,
7790
+ useRef as useRef14,
7675
7791
  useMemo as useMemo21
7676
7792
  } from "react";
7677
- import { jsx as jsx49 } from "react/jsx-runtime";
7793
+ import { jsx as jsx50 } from "react/jsx-runtime";
7678
7794
  var FrameContext = createContext7(null);
7679
7795
  var FrameProvider = ({
7680
7796
  children
7681
7797
  }) => {
7682
- const frameRef = useRef13(null);
7798
+ const frameRef = useRef14(null);
7683
7799
  const value = useMemo21(
7684
7800
  () => ({
7685
7801
  frameRef
7686
7802
  }),
7687
7803
  []
7688
7804
  );
7689
- return /* @__PURE__ */ jsx49(FrameContext.Provider, { value, children });
7805
+ return /* @__PURE__ */ jsx50(FrameContext.Provider, { value, children });
7690
7806
  };
7691
7807
  var useCanvasFrame = () => {
7692
7808
  const context = useContext14(FrameContext);
@@ -7697,8 +7813,8 @@ var useCanvasFrame = () => {
7697
7813
  };
7698
7814
 
7699
7815
  // components/Editor/components/Canvas/index.tsx
7700
- import { Fragment as Fragment13, jsx as jsx50, jsxs as jsxs20 } from "react/jsx-runtime";
7701
- var getClassName30 = get_class_name_factory_default("EditorCanvas", styles_module_default26);
7816
+ import { Fragment as Fragment13, jsx as jsx51, jsxs as jsxs21 } from "react/jsx-runtime";
7817
+ var getClassName31 = get_class_name_factory_default("EditorCanvas", styles_module_default27);
7702
7818
  var ZOOM_STEP = 0.15;
7703
7819
  var MIN_ZOOM = 0.25;
7704
7820
  var MAX_ZOOM = 3;
@@ -7738,16 +7854,16 @@ var Canvas = () => {
7738
7854
  const zoomOut = () => setCanvasZoom((z) => Math.max(z - ZOOM_STEP, MIN_ZOOM));
7739
7855
  const resetZoom = () => setCanvasZoom(1);
7740
7856
  const [showTransition, setShowTransition] = useState21(false);
7741
- const isResizingRef = useRef14(false);
7857
+ const isResizingRef = useRef15(false);
7742
7858
  const defaultRender = useMemo22(() => {
7743
- const EditorDefault = ({ children }) => /* @__PURE__ */ jsx50(Fragment13, { children });
7859
+ const EditorDefault = ({ children }) => /* @__PURE__ */ jsx51(Fragment13, { children });
7744
7860
  return EditorDefault;
7745
7861
  }, []);
7746
7862
  const CustomPreview = useMemo22(
7747
7863
  () => overrides.preview || defaultRender,
7748
7864
  [overrides]
7749
7865
  );
7750
- const getFrameDimensions = useCallback18(() => {
7866
+ const getFrameDimensions = useCallback19(() => {
7751
7867
  if (frameRef.current) {
7752
7868
  const frame = frameRef.current;
7753
7869
  const box = getBox(frame);
@@ -7768,8 +7884,8 @@ var Canvas = () => {
7768
7884
  }, 500);
7769
7885
  }, []);
7770
7886
  const appStoreApi = useAppStoreApi();
7771
- const autoSelectingRef = useRef14(true);
7772
- const pickClosestViewport = useCallback18(() => {
7887
+ const autoSelectingRef = useRef15(true);
7888
+ const pickClosestViewport = useCallback19(() => {
7773
7889
  var _a2, _b2;
7774
7890
  if (typeof window === "undefined") return null;
7775
7891
  const viewportWidth = window.innerWidth;
@@ -7862,10 +7978,10 @@ var Canvas = () => {
7862
7978
  appStoreApi,
7863
7979
  setUi
7864
7980
  ]);
7865
- return /* @__PURE__ */ jsx50(
7981
+ return /* @__PURE__ */ jsx51(
7866
7982
  "div",
7867
7983
  {
7868
- className: getClassName30({
7984
+ className: getClassName31({
7869
7985
  ready: status === "READY" || !iframe.enabled || !iframe.waitForStyles,
7870
7986
  showLoader,
7871
7987
  fullScreen: fullScreenCanvas
@@ -7880,16 +7996,16 @@ var Canvas = () => {
7880
7996
  });
7881
7997
  }
7882
7998
  },
7883
- children: /* @__PURE__ */ jsxs20("div", { className: getClassName30("inner"), ref: frameRef, children: [
7884
- !disableZoomControls && /* @__PURE__ */ jsxs20("div", { className: getClassName30("zoomControls"), children: [
7885
- /* @__PURE__ */ jsx50(IconButton, { type: "button", title: "Zoom out", onClick: zoomOut, children: /* @__PURE__ */ jsx50(Minus, { size: 14 }) }),
7886
- /* @__PURE__ */ jsx50(IconButton, { type: "button", title: "Reset zoom", onClick: resetZoom, children: /* @__PURE__ */ jsx50(RotateCcw, { size: 14 }) }),
7887
- /* @__PURE__ */ jsx50(IconButton, { type: "button", title: "Zoom in", onClick: zoomIn, children: /* @__PURE__ */ jsx50(Plus, { size: 14 }) })
7999
+ children: /* @__PURE__ */ jsxs21("div", { className: getClassName31("inner"), ref: frameRef, children: [
8000
+ !disableZoomControls && /* @__PURE__ */ jsxs21("div", { className: getClassName31("zoomControls"), children: [
8001
+ /* @__PURE__ */ jsx51(IconButton, { type: "button", title: "Zoom out", onClick: zoomOut, children: /* @__PURE__ */ jsx51(Minus, { size: 14 }) }),
8002
+ /* @__PURE__ */ jsx51(IconButton, { type: "button", title: "Reset zoom", onClick: resetZoom, children: /* @__PURE__ */ jsx51(RotateCcw, { size: 14 }) }),
8003
+ /* @__PURE__ */ jsx51(IconButton, { type: "button", title: "Zoom in", onClick: zoomIn, children: /* @__PURE__ */ jsx51(Plus, { size: 14 }) })
7888
8004
  ] }),
7889
- /* @__PURE__ */ jsxs20(
8005
+ /* @__PURE__ */ jsxs21(
7890
8006
  "div",
7891
8007
  {
7892
- className: getClassName30("rootColumn"),
8008
+ className: getClassName31("rootColumn"),
7893
8009
  style: {
7894
8010
  width: iframe.enabled ? viewports.current.width : "100%",
7895
8011
  transform: disableZoomControls ? void 0 : `scale(${canvasZoom})`,
@@ -7897,7 +8013,7 @@ var Canvas = () => {
7897
8013
  transition: showTransition ? `width ${TRANSITION_DURATION}ms ease-out, transform ${TRANSITION_DURATION}ms ease-out` : disableZoomControls ? void 0 : "transform 150ms ease-out"
7898
8014
  },
7899
8015
  children: [
7900
- iframe.enabled && /* @__PURE__ */ jsx50("div", { className: getClassName30("browserBar"), children: /* @__PURE__ */ jsx50(
8016
+ iframe.enabled && /* @__PURE__ */ jsx51("div", { className: getClassName31("browserBar"), children: /* @__PURE__ */ jsx51(
7901
8017
  BrowserBar,
7902
8018
  {
7903
8019
  onViewportChange: (viewport) => {
@@ -7914,23 +8030,23 @@ var Canvas = () => {
7914
8030
  }
7915
8031
  }
7916
8032
  ) }),
7917
- /* @__PURE__ */ jsx50(
8033
+ /* @__PURE__ */ jsx51(
7918
8034
  "div",
7919
8035
  {
7920
- className: getClassName30("root"),
8036
+ className: getClassName31("root"),
7921
8037
  suppressHydrationWarning: true,
7922
8038
  id: "editor-canvas-root",
7923
8039
  onTransitionEnd: () => {
7924
8040
  setShowTransition(false);
7925
8041
  isResizingRef.current = false;
7926
8042
  },
7927
- children: /* @__PURE__ */ jsx50(CustomPreview, { children: /* @__PURE__ */ jsx50(Preview2, {}) })
8043
+ children: /* @__PURE__ */ jsx51(CustomPreview, { children: /* @__PURE__ */ jsx51(Preview2, {}) })
7928
8044
  }
7929
8045
  )
7930
8046
  ]
7931
8047
  }
7932
8048
  ),
7933
- /* @__PURE__ */ jsx50("div", { className: getClassName30("loader"), children: /* @__PURE__ */ jsx50(Loader, { size: 24 }) })
8049
+ /* @__PURE__ */ jsx51("div", { className: getClassName31("loader"), children: /* @__PURE__ */ jsx51(Loader, { size: 24 }) })
7934
8050
  ] })
7935
8051
  }
7936
8052
  );
@@ -7938,10 +8054,10 @@ var Canvas = () => {
7938
8054
 
7939
8055
  // lib/use-sidebar-resize.ts
7940
8056
  init_react_import();
7941
- import { useCallback as useCallback19, useEffect as useEffect24, useRef as useRef15, useState as useState22 } from "react";
8057
+ import { useCallback as useCallback20, useEffect as useEffect24, useRef as useRef16, useState as useState22 } from "react";
7942
8058
  function useSidebarResize(position, dispatch) {
7943
8059
  const [width, setWidth] = useState22(null);
7944
- const sidebarRef = useRef15(null);
8060
+ const sidebarRef = useRef16(null);
7945
8061
  const storeWidth = useAppStore(
7946
8062
  (s) => position === "left" ? s.state.ui.leftSideBarWidth : s.state.ui.rightSideBarWidth
7947
8063
  );
@@ -7975,7 +8091,7 @@ function useSidebarResize(position, dispatch) {
7975
8091
  setWidth(storeWidth);
7976
8092
  }
7977
8093
  }, [storeWidth]);
7978
- const handleResizeEnd = useCallback19(
8094
+ const handleResizeEnd = useCallback20(
7979
8095
  (width2) => {
7980
8096
  dispatch({
7981
8097
  type: "setUi",
@@ -8022,26 +8138,26 @@ init_react_import();
8022
8138
 
8023
8139
  // components/Editor/components/ResizeHandle/index.tsx
8024
8140
  init_react_import();
8025
- import { useCallback as useCallback20, useRef as useRef16 } from "react";
8141
+ import { useCallback as useCallback21, useRef as useRef17 } from "react";
8026
8142
 
8027
8143
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/ResizeHandle/styles.module.css#css-module
8028
8144
  init_react_import();
8029
- var styles_module_default27 = { "ResizeHandle": "_ResizeHandle_1u3rv_2", "ResizeHandle--left": "_ResizeHandle--left_1u3rv_16", "ResizeHandle--right": "_ResizeHandle--right_1u3rv_20" };
8145
+ var styles_module_default28 = { "ResizeHandle": "_ResizeHandle_1u3rv_2", "ResizeHandle--left": "_ResizeHandle--left_1u3rv_16", "ResizeHandle--right": "_ResizeHandle--right_1u3rv_20" };
8030
8146
 
8031
8147
  // components/Editor/components/ResizeHandle/index.tsx
8032
- import { jsx as jsx51 } from "react/jsx-runtime";
8033
- var getClassName31 = get_class_name_factory_default("ResizeHandle", styles_module_default27);
8148
+ import { jsx as jsx52 } from "react/jsx-runtime";
8149
+ var getClassName32 = get_class_name_factory_default("ResizeHandle", styles_module_default28);
8034
8150
  var ResizeHandle = ({
8035
8151
  position,
8036
8152
  sidebarRef,
8037
8153
  onResize,
8038
8154
  onResizeEnd
8039
8155
  }) => {
8040
- const handleRef = useRef16(null);
8041
- const isDragging = useRef16(false);
8042
- const startX = useRef16(0);
8043
- const startWidth = useRef16(0);
8044
- const handleMouseMove = useCallback20(
8156
+ const handleRef = useRef17(null);
8157
+ const isDragging = useRef17(false);
8158
+ const startX = useRef17(0);
8159
+ const startWidth = useRef17(0);
8160
+ const handleMouseMove = useCallback21(
8045
8161
  (e) => {
8046
8162
  if (!isDragging.current) return;
8047
8163
  const delta = e.clientX - startX.current;
@@ -8052,7 +8168,7 @@ var ResizeHandle = ({
8052
8168
  },
8053
8169
  [onResize, position]
8054
8170
  );
8055
- const handleMouseUp = useCallback20(() => {
8171
+ const handleMouseUp = useCallback21(() => {
8056
8172
  var _a;
8057
8173
  if (!isDragging.current) return;
8058
8174
  isDragging.current = false;
@@ -8067,7 +8183,7 @@ var ResizeHandle = ({
8067
8183
  const finalWidth = ((_a = sidebarRef.current) == null ? void 0 : _a.getBoundingClientRect().width) || 0;
8068
8184
  onResizeEnd(finalWidth);
8069
8185
  }, [onResizeEnd]);
8070
- const handleMouseDown = useCallback20(
8186
+ const handleMouseDown = useCallback21(
8071
8187
  (e) => {
8072
8188
  var _a;
8073
8189
  isDragging.current = true;
@@ -8085,11 +8201,11 @@ var ResizeHandle = ({
8085
8201
  },
8086
8202
  [position, handleMouseMove, handleMouseUp]
8087
8203
  );
8088
- return /* @__PURE__ */ jsx51(
8204
+ return /* @__PURE__ */ jsx52(
8089
8205
  "div",
8090
8206
  {
8091
8207
  ref: handleRef,
8092
- className: getClassName31({ [position]: true }),
8208
+ className: getClassName32({ [position]: true }),
8093
8209
  onMouseDown: handleMouseDown
8094
8210
  }
8095
8211
  );
@@ -8097,11 +8213,11 @@ var ResizeHandle = ({
8097
8213
 
8098
8214
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Sidebar/styles.module.css#css-module
8099
8215
  init_react_import();
8100
- var styles_module_default28 = { "Sidebar": "_Sidebar_14k7q_1", "Sidebar--isVisible": "_Sidebar--isVisible_14k7q_9", "Sidebar--left": "_Sidebar--left_14k7q_13", "Sidebar--right": "_Sidebar--right_14k7q_25", "Sidebar-resizeHandle": "_Sidebar-resizeHandle_14k7q_37" };
8216
+ var styles_module_default29 = { "Sidebar": "_Sidebar_14k7q_1", "Sidebar--isVisible": "_Sidebar--isVisible_14k7q_9", "Sidebar--left": "_Sidebar--left_14k7q_13", "Sidebar--right": "_Sidebar--right_14k7q_25", "Sidebar-resizeHandle": "_Sidebar-resizeHandle_14k7q_37" };
8101
8217
 
8102
8218
  // components/Editor/components/Sidebar/index.tsx
8103
- import { Fragment as Fragment14, jsx as jsx52, jsxs as jsxs21 } from "react/jsx-runtime";
8104
- var getClassName32 = get_class_name_factory_default("Sidebar", styles_module_default28);
8219
+ import { Fragment as Fragment14, jsx as jsx53, jsxs as jsxs22 } from "react/jsx-runtime";
8220
+ var getClassName33 = get_class_name_factory_default("Sidebar", styles_module_default29);
8105
8221
  var Sidebar = ({
8106
8222
  position,
8107
8223
  sidebarRef,
@@ -8110,16 +8226,16 @@ var Sidebar = ({
8110
8226
  onResizeEnd,
8111
8227
  children
8112
8228
  }) => {
8113
- return /* @__PURE__ */ jsxs21(Fragment14, { children: [
8114
- /* @__PURE__ */ jsx52(
8229
+ return /* @__PURE__ */ jsxs22(Fragment14, { children: [
8230
+ /* @__PURE__ */ jsx53(
8115
8231
  "div",
8116
8232
  {
8117
8233
  ref: sidebarRef,
8118
- className: getClassName32({ [position]: true, isVisible }),
8234
+ className: getClassName33({ [position]: true, isVisible }),
8119
8235
  children
8120
8236
  }
8121
8237
  ),
8122
- /* @__PURE__ */ jsx52("div", { className: `${getClassName32("resizeHandle")}`, children: /* @__PURE__ */ jsx52(
8238
+ /* @__PURE__ */ jsx53("div", { className: `${getClassName33("resizeHandle")}`, children: /* @__PURE__ */ jsx53(
8123
8239
  ResizeHandle,
8124
8240
  {
8125
8241
  position,
@@ -8133,7 +8249,7 @@ var Sidebar = ({
8133
8249
 
8134
8250
  // lib/use-delete-hotkeys.ts
8135
8251
  init_react_import();
8136
- import { useCallback as useCallback21 } from "react";
8252
+ import { useCallback as useCallback22 } from "react";
8137
8253
 
8138
8254
  // lib/should-block-editing-hotkey.ts
8139
8255
  init_react_import();
@@ -8173,7 +8289,7 @@ var shouldBlockEditingHotkey = (e) => {
8173
8289
  // lib/use-delete-hotkeys.ts
8174
8290
  var useDeleteHotkeys = () => {
8175
8291
  const appStore = useAppStoreApi();
8176
- const deleteSelectedComponent = useCallback21(
8292
+ const deleteSelectedComponent = useCallback22(
8177
8293
  (e) => {
8178
8294
  var _a;
8179
8295
  if (shouldBlockEditingHotkey(e)) {
@@ -8199,7 +8315,7 @@ var useDeleteHotkeys = () => {
8199
8315
 
8200
8316
  // lib/use-clipboard-hotkeys.ts
8201
8317
  init_react_import();
8202
- import { useCallback as useCallback22 } from "react";
8318
+ import { useCallback as useCallback23 } from "react";
8203
8319
  var CLIPBOARD_MARKER = "reacteditor/component";
8204
8320
  var isComponentData = (value) => {
8205
8321
  var _a;
@@ -8219,7 +8335,7 @@ var parsePayload = (text) => {
8219
8335
  };
8220
8336
  var useClipboardHotkeys = () => {
8221
8337
  const appStore = useAppStoreApi();
8222
- const writeSelectionToClipboard = useCallback22(() => {
8338
+ const writeSelectionToClipboard = useCallback23(() => {
8223
8339
  var _a;
8224
8340
  const { selectedItem } = appStore.getState();
8225
8341
  if (!selectedItem) return false;
@@ -8231,14 +8347,14 @@ var useClipboardHotkeys = () => {
8231
8347
  });
8232
8348
  return true;
8233
8349
  }, [appStore]);
8234
- const copySelectedComponent = useCallback22(
8350
+ const copySelectedComponent = useCallback23(
8235
8351
  (e) => {
8236
8352
  if (shouldBlockEditingHotkey(e)) return false;
8237
8353
  return writeSelectionToClipboard();
8238
8354
  },
8239
8355
  [writeSelectionToClipboard]
8240
8356
  );
8241
- const cutSelectedComponent = useCallback22(
8357
+ const cutSelectedComponent = useCallback23(
8242
8358
  (e) => {
8243
8359
  var _a;
8244
8360
  if (shouldBlockEditingHotkey(e)) return false;
@@ -8257,7 +8373,7 @@ var useClipboardHotkeys = () => {
8257
8373
  },
8258
8374
  [appStore, writeSelectionToClipboard]
8259
8375
  );
8260
- const pasteComponent = useCallback22(
8376
+ const pasteComponent = useCallback23(
8261
8377
  (e) => {
8262
8378
  var _a, _b;
8263
8379
  if (shouldBlockEditingHotkey(e)) return false;
@@ -8294,12 +8410,12 @@ init_react_import();
8294
8410
 
8295
8411
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Nav/styles.module.css#css-module
8296
8412
  init_react_import();
8297
- var styles_module_default29 = { "Nav": "_Nav_1g4tk_1", "Nav-list": "_Nav-list_1g4tk_18", "Nav-footer": "_Nav-footer_1g4tk_42", "NavItem-link": "_NavItem-link_1g4tk_55", "NavItem-linkLabel": "_NavItem-linkLabel_1g4tk_83", "NavItem": "_NavItem_1g4tk_55", "NavItem-linkIcon": "_NavItem-linkIcon_1g4tk_108", "NavItem--active": "_NavItem--active_1g4tk_121", "NavItem--mobileOnly": "_NavItem--mobileOnly_1g4tk_132", "NavItem--desktopOnly": "_NavItem--desktopOnly_1g4tk_137" };
8413
+ var styles_module_default30 = { "Nav": "_Nav_1g4tk_1", "Nav-list": "_Nav-list_1g4tk_18", "Nav-footer": "_Nav-footer_1g4tk_42", "NavItem-link": "_NavItem-link_1g4tk_55", "NavItem-linkLabel": "_NavItem-linkLabel_1g4tk_83", "NavItem": "_NavItem_1g4tk_55", "NavItem-linkIcon": "_NavItem-linkIcon_1g4tk_108", "NavItem--active": "_NavItem--active_1g4tk_121", "NavItem--mobileOnly": "_NavItem--mobileOnly_1g4tk_132", "NavItem--desktopOnly": "_NavItem--desktopOnly_1g4tk_137" };
8298
8414
 
8299
8415
  // components/Editor/components/Nav/index.tsx
8300
- import { jsx as jsx53, jsxs as jsxs22 } from "react/jsx-runtime";
8301
- var getClassName33 = get_class_name_factory_default("Nav", styles_module_default29);
8302
- var getClassNameItem3 = get_class_name_factory_default("NavItem", styles_module_default29);
8416
+ import { jsx as jsx54, jsxs as jsxs23 } from "react/jsx-runtime";
8417
+ var getClassName34 = get_class_name_factory_default("Nav", styles_module_default30);
8418
+ var getClassNameItem3 = get_class_name_factory_default("NavItem", styles_module_default30);
8303
8419
  var MenuItem = ({
8304
8420
  label,
8305
8421
  icon,
@@ -8308,7 +8424,7 @@ var MenuItem = ({
8308
8424
  mobileOnly,
8309
8425
  desktopOnly
8310
8426
  }) => {
8311
- return /* @__PURE__ */ jsx53(
8427
+ return /* @__PURE__ */ jsx54(
8312
8428
  "li",
8313
8429
  {
8314
8430
  className: getClassNameItem3({
@@ -8316,9 +8432,9 @@ var MenuItem = ({
8316
8432
  mobileOnly,
8317
8433
  desktopOnly
8318
8434
  }),
8319
- children: onClick && /* @__PURE__ */ jsxs22("div", { className: getClassNameItem3("link"), onClick, children: [
8320
- icon && /* @__PURE__ */ jsx53("span", { className: getClassNameItem3("linkIcon"), children: icon }),
8321
- /* @__PURE__ */ jsx53("span", { className: getClassNameItem3("linkLabel"), children: label })
8435
+ children: onClick && /* @__PURE__ */ jsxs23("div", { className: getClassNameItem3("link"), onClick, children: [
8436
+ icon && /* @__PURE__ */ jsx54("span", { className: getClassNameItem3("linkIcon"), children: icon }),
8437
+ /* @__PURE__ */ jsx54("span", { className: getClassNameItem3("linkLabel"), children: label })
8322
8438
  ] })
8323
8439
  }
8324
8440
  );
@@ -8327,17 +8443,17 @@ var Nav = ({
8327
8443
  items,
8328
8444
  footer
8329
8445
  }) => {
8330
- return /* @__PURE__ */ jsxs22("nav", { className: getClassName33(), children: [
8331
- /* @__PURE__ */ jsx53("ul", { className: getClassName33("list"), children: Object.entries(items).map(([key, item]) => /* @__PURE__ */ jsx53(MenuItem, __spreadValues({}, item), key)) }),
8332
- footer && /* @__PURE__ */ jsx53("div", { className: getClassName33("footer"), children: footer })
8446
+ return /* @__PURE__ */ jsxs23("nav", { className: getClassName34(), children: [
8447
+ /* @__PURE__ */ jsx54("ul", { className: getClassName34("list"), children: Object.entries(items).map(([key, item]) => /* @__PURE__ */ jsx54(MenuItem, __spreadValues({}, item), key)) }),
8448
+ footer && /* @__PURE__ */ jsx54("div", { className: getClassName34("footer"), children: footer })
8333
8449
  ] });
8334
8450
  };
8335
8451
 
8336
8452
  // components/Editor/components/Layout/index.tsx
8337
- import { Fragment as Fragment15, jsx as jsx54, jsxs as jsxs23 } from "react/jsx-runtime";
8338
- var getClassName34 = get_class_name_factory_default("Editor", styles_module_default22);
8339
- var getLayoutClassName = get_class_name_factory_default("EditorLayout", styles_module_default22);
8340
- var getPluginTabClassName = get_class_name_factory_default("EditorPluginTab", styles_module_default22);
8453
+ import { Fragment as Fragment15, jsx as jsx55, jsxs as jsxs24 } from "react/jsx-runtime";
8454
+ var getClassName35 = get_class_name_factory_default("Editor", styles_module_default23);
8455
+ var getLayoutClassName = get_class_name_factory_default("EditorLayout", styles_module_default23);
8456
+ var getPluginTabClassName = get_class_name_factory_default("EditorPluginTab", styles_module_default23);
8341
8457
  var FieldSideBarToolbar = () => {
8342
8458
  const appStore = useAppStoreApi();
8343
8459
  const { onPublish } = usePropsContext();
@@ -8348,30 +8464,30 @@ var FieldSideBarToolbar = () => {
8348
8464
  const CustomHeaderActions = useAppStore(
8349
8465
  (s) => s.overrides.headerActions || DefaultOverride
8350
8466
  );
8351
- return /* @__PURE__ */ jsxs23("div", { className: getClassName34("fieldSideBarToolbar"), children: [
8352
- /* @__PURE__ */ jsxs23("div", { className: getClassName34("fieldSideBarHistory"), children: [
8353
- /* @__PURE__ */ jsx54(
8467
+ return /* @__PURE__ */ jsxs24("div", { className: getClassName35("fieldSideBarToolbar"), children: [
8468
+ /* @__PURE__ */ jsxs24("div", { className: getClassName35("fieldSideBarHistory"), children: [
8469
+ /* @__PURE__ */ jsx55(
8354
8470
  IconButton,
8355
8471
  {
8356
8472
  type: "button",
8357
8473
  title: "undo",
8358
8474
  disabled: !hasPast,
8359
8475
  onClick: back,
8360
- children: /* @__PURE__ */ jsx54(Undo2, { size: 18 })
8476
+ children: /* @__PURE__ */ jsx55(Undo2, { size: 18 })
8361
8477
  }
8362
8478
  ),
8363
- /* @__PURE__ */ jsx54(
8479
+ /* @__PURE__ */ jsx55(
8364
8480
  IconButton,
8365
8481
  {
8366
8482
  type: "button",
8367
8483
  title: "redo",
8368
8484
  disabled: !hasFuture,
8369
8485
  onClick: forward,
8370
- children: /* @__PURE__ */ jsx54(Redo2, { size: 18 })
8486
+ children: /* @__PURE__ */ jsx55(Redo2, { size: 18 })
8371
8487
  }
8372
8488
  )
8373
8489
  ] }),
8374
- /* @__PURE__ */ jsx54("div", { className: getClassName34("fieldSideBarActions"), children: /* @__PURE__ */ jsx54(CustomHeaderActions, { children: /* @__PURE__ */ jsx54(
8490
+ /* @__PURE__ */ jsx55("div", { className: getClassName35("fieldSideBarActions"), children: /* @__PURE__ */ jsx55(CustomHeaderActions, { children: /* @__PURE__ */ jsx55(
8375
8491
  Button,
8376
8492
  {
8377
8493
  onClick: () => {
@@ -8390,9 +8506,9 @@ var FieldSideBar = () => {
8390
8506
  return s.selectedItem ? (_b = (_a = s.config.components[s.selectedItem.type]) == null ? void 0 : _a["label"]) != null ? _b : s.selectedItem.type.toString() : ((_c = s.config.root) == null ? void 0 : _c.label) || "Page";
8391
8507
  }
8392
8508
  );
8393
- return /* @__PURE__ */ jsxs23(Fragment15, { children: [
8394
- /* @__PURE__ */ jsx54(FieldSideBarToolbar, {}),
8395
- /* @__PURE__ */ jsx54(SidebarSection, { noBorderTop: true, showBreadcrumbs: true, title, children: /* @__PURE__ */ jsx54(Fields, {}) })
8509
+ return /* @__PURE__ */ jsxs24(Fragment15, { children: [
8510
+ /* @__PURE__ */ jsx55(FieldSideBarToolbar, {}),
8511
+ /* @__PURE__ */ jsx55(SidebarSection, { noBorderTop: true, showBreadcrumbs: true, title, children: /* @__PURE__ */ jsx55(Fields, {}) })
8396
8512
  ] });
8397
8513
  };
8398
8514
  var PluginTab = ({
@@ -8400,7 +8516,7 @@ var PluginTab = ({
8400
8516
  visible,
8401
8517
  mobileOnly
8402
8518
  }) => {
8403
- return /* @__PURE__ */ jsx54("div", { className: getPluginTabClassName({ visible, mobileOnly }), children: /* @__PURE__ */ jsx54("div", { className: getPluginTabClassName("body"), children }) });
8519
+ return /* @__PURE__ */ jsx55("div", { className: getPluginTabClassName({ visible, mobileOnly }), children: /* @__PURE__ */ jsx55("div", { className: getPluginTabClassName("body"), children }) });
8404
8520
  };
8405
8521
  var Layout = ({ children }) => {
8406
8522
  const {
@@ -8498,11 +8614,11 @@ var Layout = ({ children }) => {
8498
8614
  const [mobilePanelHeight, setMobilePanelHeight] = useState23(
8499
8615
  null
8500
8616
  );
8501
- const mobilePanelRef = useRef17(null);
8502
- const isDraggingMobile = useRef17(false);
8503
- const dragStartY = useRef17(0);
8504
- const dragStartHeight = useRef17(0);
8505
- const handleMobileDragStart = useCallback23(
8617
+ const mobilePanelRef = useRef18(null);
8618
+ const isDraggingMobile = useRef18(false);
8619
+ const dragStartY = useRef18(0);
8620
+ const dragStartHeight = useRef18(0);
8621
+ const handleMobileDragStart = useCallback24(
8506
8622
  (clientY) => {
8507
8623
  isDraggingMobile.current = true;
8508
8624
  dragStartY.current = clientY;
@@ -8513,7 +8629,7 @@ var Layout = ({ children }) => {
8513
8629
  },
8514
8630
  []
8515
8631
  );
8516
- const handleMobileDragMove = useCallback23((clientY) => {
8632
+ const handleMobileDragMove = useCallback24((clientY) => {
8517
8633
  if (!isDraggingMobile.current) return;
8518
8634
  const delta = dragStartY.current - clientY;
8519
8635
  const viewportHeight = window.innerHeight;
@@ -8522,7 +8638,7 @@ var Layout = ({ children }) => {
8522
8638
  const newH = Math.min(maxH, Math.max(minH, dragStartHeight.current + delta));
8523
8639
  setMobilePanelHeight(newH);
8524
8640
  }, []);
8525
- const handleMobileDragEnd = useCallback23(() => {
8641
+ const handleMobileDragEnd = useCallback24(() => {
8526
8642
  if (!isDraggingMobile.current) return;
8527
8643
  isDraggingMobile.current = false;
8528
8644
  document.body.style.userSelect = "";
@@ -8567,7 +8683,7 @@ var Layout = ({ children }) => {
8567
8683
  const toggleTheme = () => {
8568
8684
  setTheme((t) => t === "dark" ? "light" : "dark");
8569
8685
  };
8570
- const themeIcon = theme === "dark" ? /* @__PURE__ */ jsx54(Sun, { size: 18 }) : /* @__PURE__ */ jsx54(Moon, { size: 18 });
8686
+ const themeIcon = theme === "dark" ? /* @__PURE__ */ jsx55(Sun, { size: 18 }) : /* @__PURE__ */ jsx55(Moon, { size: 18 });
8571
8687
  const themeLabel = theme === "dark" ? "Switch to light mode" : "Switch to dark mode";
8572
8688
  const hasLegacySideBarPlugin = useMemo23(
8573
8689
  () => !!(plugins == null ? void 0 : plugins.find((p) => p.name === "legacy-side-bar")),
@@ -8592,7 +8708,7 @@ var Layout = ({ children }) => {
8592
8708
  }
8593
8709
  details[plugin.name] = {
8594
8710
  label: (_a = plugin.label) != null ? _a : plugin.name,
8595
- icon: (_b = plugin.icon) != null ? _b : /* @__PURE__ */ jsx54(ToyBrick, {}),
8711
+ icon: (_b = plugin.icon) != null ? _b : /* @__PURE__ */ jsx55(ToyBrick, {}),
8596
8712
  onClick: () => {
8597
8713
  var _a2;
8598
8714
  setMobilePanelHeightMode((_a2 = plugin.mobilePanelHeight) != null ? _a2 : "toggle");
@@ -8631,17 +8747,17 @@ var Layout = ({ children }) => {
8631
8747
  if (mobilePanelHeight && leftSideBarVisible) {
8632
8748
  mobilePanelStyle["--editor-mobile-panel-height"] = `${mobilePanelHeight}px`;
8633
8749
  }
8634
- return /* @__PURE__ */ jsxs23(
8750
+ return /* @__PURE__ */ jsxs24(
8635
8751
  "div",
8636
8752
  {
8637
- className: `Editor ${getClassName34({
8753
+ className: `Editor ${getClassName35({
8638
8754
  hidePlugins: hasLegacySideBarPlugin
8639
8755
  })}`,
8640
8756
  id: instanceId,
8641
8757
  "data-theme": theme,
8642
8758
  style: { height },
8643
8759
  children: [
8644
- /* @__PURE__ */ jsx54(DragDropContext, { disableAutoScroll: dnd == null ? void 0 : dnd.disableAutoScroll, children: /* @__PURE__ */ jsx54(CustomEditor, { children: children || /* @__PURE__ */ jsx54(FrameProvider, { children: /* @__PURE__ */ jsx54(
8760
+ /* @__PURE__ */ jsx55(DragDropContext, { disableAutoScroll: dnd == null ? void 0 : dnd.disableAutoScroll, children: /* @__PURE__ */ jsx55(CustomEditor, { children: children || /* @__PURE__ */ jsx55(FrameProvider, { children: /* @__PURE__ */ jsx55(
8645
8761
  "div",
8646
8762
  {
8647
8763
  className: getLayoutClassName({
@@ -8653,17 +8769,17 @@ var Layout = ({ children }) => {
8653
8769
  mobilePanelCustomHeight: mobilePanelHeight !== null && leftSideBarVisible
8654
8770
  }),
8655
8771
  style: { height },
8656
- children: /* @__PURE__ */ jsxs23(
8772
+ children: /* @__PURE__ */ jsxs24(
8657
8773
  "div",
8658
8774
  {
8659
8775
  className: getLayoutClassName("inner"),
8660
8776
  style: __spreadValues(__spreadValues({}, layoutOptions), mobilePanelStyle),
8661
8777
  children: [
8662
- /* @__PURE__ */ jsx54("div", { className: getLayoutClassName("nav"), children: /* @__PURE__ */ jsx54(
8778
+ /* @__PURE__ */ jsx55("div", { className: getLayoutClassName("nav"), children: /* @__PURE__ */ jsx55(
8663
8779
  Nav,
8664
8780
  {
8665
8781
  items: pluginItems,
8666
- footer: /* @__PURE__ */ jsx54(
8782
+ footer: /* @__PURE__ */ jsx55(
8667
8783
  IconButton,
8668
8784
  {
8669
8785
  type: "button",
@@ -8674,19 +8790,19 @@ var Layout = ({ children }) => {
8674
8790
  )
8675
8791
  }
8676
8792
  ) }),
8677
- /* @__PURE__ */ jsxs23(
8793
+ /* @__PURE__ */ jsxs24(
8678
8794
  "div",
8679
8795
  {
8680
8796
  ref: mobilePanelRef,
8681
8797
  className: getLayoutClassName("mobilePanel"),
8682
8798
  children: [
8683
- /* @__PURE__ */ jsx54(
8799
+ /* @__PURE__ */ jsx55(
8684
8800
  "div",
8685
8801
  {
8686
8802
  className: getLayoutClassName("mobileDragHandle"),
8687
8803
  onTouchStart: (e) => handleMobileDragStart(e.touches[0].clientY),
8688
8804
  onMouseDown: (e) => handleMobileDragStart(e.clientY),
8689
- children: /* @__PURE__ */ jsx54(
8805
+ children: /* @__PURE__ */ jsx55(
8690
8806
  "div",
8691
8807
  {
8692
8808
  className: getLayoutClassName("mobileDragHandlePill")
@@ -8694,17 +8810,17 @@ var Layout = ({ children }) => {
8694
8810
  )
8695
8811
  }
8696
8812
  ),
8697
- /* @__PURE__ */ jsx54(
8813
+ /* @__PURE__ */ jsx55(
8698
8814
  "div",
8699
8815
  {
8700
8816
  className: getLayoutClassName("mobilePanelContent"),
8701
8817
  children: Object.entries(pluginItems).map(
8702
- ([id, { mobileOnly, render: Render2 }]) => /* @__PURE__ */ jsx54(
8818
+ ([id, { mobileOnly, render: Render2 }]) => /* @__PURE__ */ jsx55(
8703
8819
  PluginTab,
8704
8820
  {
8705
8821
  visible: currentPlugin === id,
8706
8822
  mobileOnly,
8707
- children: /* @__PURE__ */ jsx54(Render2, {})
8823
+ children: /* @__PURE__ */ jsx55(Render2, {})
8708
8824
  },
8709
8825
  id
8710
8826
  )
@@ -8714,7 +8830,7 @@ var Layout = ({ children }) => {
8714
8830
  ]
8715
8831
  }
8716
8832
  ),
8717
- /* @__PURE__ */ jsx54(
8833
+ /* @__PURE__ */ jsx55(
8718
8834
  Sidebar,
8719
8835
  {
8720
8836
  position: "left",
@@ -8723,20 +8839,20 @@ var Layout = ({ children }) => {
8723
8839
  onResize: setLeftWidth,
8724
8840
  onResizeEnd: handleLeftSidebarResizeEnd,
8725
8841
  children: Object.entries(pluginItems).map(
8726
- ([id, { mobileOnly, render: Render2, label }]) => /* @__PURE__ */ jsx54(
8842
+ ([id, { mobileOnly, render: Render2, label }]) => /* @__PURE__ */ jsx55(
8727
8843
  PluginTab,
8728
8844
  {
8729
8845
  visible: currentPlugin === id,
8730
8846
  mobileOnly,
8731
- children: /* @__PURE__ */ jsx54(Render2, {})
8847
+ children: /* @__PURE__ */ jsx55(Render2, {})
8732
8848
  },
8733
8849
  id
8734
8850
  )
8735
8851
  )
8736
8852
  }
8737
8853
  ),
8738
- /* @__PURE__ */ jsx54(Canvas, {}),
8739
- !hasDesktopFieldsPlugin && /* @__PURE__ */ jsx54(
8854
+ /* @__PURE__ */ jsx55(Canvas, {}),
8855
+ !hasDesktopFieldsPlugin && /* @__PURE__ */ jsx55(
8740
8856
  Sidebar,
8741
8857
  {
8742
8858
  position: "right",
@@ -8744,7 +8860,7 @@ var Layout = ({ children }) => {
8744
8860
  isVisible: rightSideBarVisible,
8745
8861
  onResize: setRightWidth,
8746
8862
  onResizeEnd: handleRightSidebarResizeEnd,
8747
- children: /* @__PURE__ */ jsx54(FieldSideBar, {})
8863
+ children: /* @__PURE__ */ jsx55(FieldSideBar, {})
8748
8864
  }
8749
8865
  )
8750
8866
  ]
@@ -8752,17 +8868,17 @@ var Layout = ({ children }) => {
8752
8868
  )
8753
8869
  }
8754
8870
  ) }) }) }),
8755
- /* @__PURE__ */ jsx54("div", { id: "editor-portal-root", className: getClassName34("portal") })
8871
+ /* @__PURE__ */ jsx55("div", { id: "editor-portal-root", className: getClassName35("portal") })
8756
8872
  ]
8757
8873
  }
8758
8874
  );
8759
8875
  };
8760
8876
 
8761
8877
  // components/Editor/index.tsx
8762
- import { jsx as jsx55 } from "react/jsx-runtime";
8878
+ import { jsx as jsx56 } from "react/jsx-runtime";
8763
8879
  var propsContext = createContext8({});
8764
8880
  function PropsProvider(props) {
8765
- return /* @__PURE__ */ jsx55(propsContext.Provider, { value: props, children: props.children });
8881
+ return /* @__PURE__ */ jsx56(propsContext.Provider, { value: props, children: props.children });
8766
8882
  }
8767
8883
  var usePropsContext = () => useContext15(propsContext);
8768
8884
  function EditorProvider({ children }) {
@@ -8876,7 +8992,7 @@ function EditorProvider({ children }) {
8876
8992
  return __spreadValues(__spreadValues({}, pluginFieldTransforms), fieldTransforms);
8877
8993
  }, [fieldTransforms, plugins]);
8878
8994
  const instanceId = useSafeId();
8879
- const generateAppStore = useCallback24(
8995
+ const generateAppStore = useCallback25(
8880
8996
  (state) => {
8881
8997
  return {
8882
8998
  instanceId,
@@ -8925,7 +9041,7 @@ function EditorProvider({ children }) {
8925
9041
  index: initialHistoryIndex,
8926
9042
  initialAppState
8927
9043
  });
8928
- const previousData = useRef18(null);
9044
+ const previousData = useRef19(null);
8929
9045
  useEffect26(() => {
8930
9046
  return appStore.subscribe(
8931
9047
  (s) => s.state.data,
@@ -8946,10 +9062,10 @@ function EditorProvider({ children }) {
8946
9062
  resolveAndCommitData();
8947
9063
  }, 0);
8948
9064
  }, []);
8949
- return /* @__PURE__ */ jsx55(appStoreContext.Provider, { value: appStore, children: /* @__PURE__ */ jsx55(UseEditorStoreContext.Provider, { value: uEditorStore, children }) });
9065
+ return /* @__PURE__ */ jsx56(appStoreContext.Provider, { value: appStore, children: /* @__PURE__ */ jsx56(UseEditorStoreContext.Provider, { value: uEditorStore, children }) });
8950
9066
  }
8951
9067
  function Editor3(props) {
8952
- return /* @__PURE__ */ jsx55(PropsProvider, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx55(EditorProvider, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx55(Layout, { children: props.children }) })) }));
9068
+ return /* @__PURE__ */ jsx56(PropsProvider, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx56(EditorProvider, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx56(Layout, { children: props.children }) })) }));
8953
9069
  }
8954
9070
  Editor3.Components = Components;
8955
9071
  Editor3.Fields = Fields;
@@ -8982,12 +9098,12 @@ function pageMetadata(data) {
8982
9098
 
8983
9099
  // plugins/legacy-side-bar/index.tsx
8984
9100
  init_react_import();
8985
- import { jsx as jsx56, jsxs as jsxs24 } from "react/jsx-runtime";
9101
+ import { jsx as jsx57, jsxs as jsxs25 } from "react/jsx-runtime";
8986
9102
  var legacySideBarPlugin = () => ({
8987
9103
  name: "legacy-side-bar",
8988
- render: () => /* @__PURE__ */ jsxs24("div", { style: { overflowY: "auto" }, children: [
8989
- /* @__PURE__ */ jsx56(SidebarSection, { title: "Components", noBorderTop: true, children: /* @__PURE__ */ jsx56(Components, {}) }),
8990
- /* @__PURE__ */ jsx56(SidebarSection, { title: "Outline", children: /* @__PURE__ */ jsx56(Outline, {}) })
9104
+ render: () => /* @__PURE__ */ jsxs25("div", { style: { overflowY: "auto" }, children: [
9105
+ /* @__PURE__ */ jsx57(SidebarSection, { title: "Components", noBorderTop: true, children: /* @__PURE__ */ jsx57(Components, {}) }),
9106
+ /* @__PURE__ */ jsx57(SidebarSection, { title: "Outline", children: /* @__PURE__ */ jsx57(Outline, {}) })
8991
9107
  ] })
8992
9108
  });
8993
9109