@reacteditor/core 0.0.7 → 0.0.8

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-ZLSPSBV3.mjs → chunk-FT6UFK7G.mjs} +1 -1
  7. package/dist/{chunk-AAK2555H.mjs → chunk-LRFRIIKG.mjs} +3 -1
  8. package/dist/{chunk-XI7YTBCP.mjs → chunk-OIFPBVSF.mjs} +1 -1
  9. package/dist/{chunk-W5I2Z7QS.mjs → chunk-R5DQGUQS.mjs} +717 -603
  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 +1208 -1089
  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 +1208 -1089
  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();
@@ -3617,7 +3718,16 @@ var DragDropContextClient = ({
3617
3718
  }
3618
3719
  }));
3619
3720
  });
3620
- const getChanged = useCallback8(
3721
+ useEffect9(() => {
3722
+ appStore.setState({
3723
+ scrollToComponent: (id) => zoneStore.getState().scrollToComponent(id)
3724
+ });
3725
+ return () => {
3726
+ appStore.setState({ scrollToComponent: () => {
3727
+ } });
3728
+ };
3729
+ }, [appStore, zoneStore]);
3730
+ const getChanged = useCallback9(
3621
3731
  (params) => {
3622
3732
  const { zoneDepthIndex = {}, areaDepthIndex = {} } = zoneStore.getState() || {};
3623
3733
  const stateHasZone = Object.keys(zoneDepthIndex).length > 0;
@@ -3638,7 +3748,7 @@ var DragDropContextClient = ({
3638
3748
  },
3639
3749
  [zoneStore]
3640
3750
  );
3641
- const setDeepestAndCollide = useCallback8(
3751
+ const setDeepestAndCollide = useCallback9(
3642
3752
  (params, manager) => {
3643
3753
  const { zoneChanged, areaChanged } = getChanged(params);
3644
3754
  if (!zoneChanged && !areaChanged) return;
@@ -3727,8 +3837,8 @@ var DragDropContextClient = ({
3727
3837
  ]);
3728
3838
  const sensors = useSensors();
3729
3839
  const [dragListeners, setDragListeners] = useState10({});
3730
- const dragMode = useRef3(null);
3731
- const initialSelector = useRef3(void 0);
3840
+ const dragMode = useRef4(null);
3841
+ const initialSelector = useRef4(void 0);
3732
3842
  const nextContextValue = useMemo8(
3733
3843
  () => ({
3734
3844
  mode: "edit",
@@ -3737,14 +3847,14 @@ var DragDropContextClient = ({
3737
3847
  }),
3738
3848
  []
3739
3849
  );
3740
- return /* @__PURE__ */ jsx24(
3850
+ return /* @__PURE__ */ jsx25(
3741
3851
  dragListenerContext.Provider,
3742
3852
  {
3743
3853
  value: {
3744
3854
  dragListeners,
3745
3855
  setDragListeners
3746
3856
  },
3747
- children: /* @__PURE__ */ jsx24(
3857
+ children: /* @__PURE__ */ jsx25(
3748
3858
  DragDropProvider2,
3749
3859
  {
3750
3860
  plugins,
@@ -3960,7 +4070,7 @@ var DragDropContextClient = ({
3960
4070
  const entryEl = (_d = getFrame()) == null ? void 0 : _d.querySelector("[data-editor-entry]");
3961
4071
  entryEl == null ? void 0 : entryEl.setAttribute("data-editor-dragging", "true");
3962
4072
  },
3963
- children: /* @__PURE__ */ jsx24(ZoneStoreProvider, { store: zoneStore, children: /* @__PURE__ */ jsx24(DropZoneProvider, { value: nextContextValue, children }) })
4073
+ children: /* @__PURE__ */ jsx25(ZoneStoreProvider, { store: zoneStore, children: /* @__PURE__ */ jsx25(DropZoneProvider, { value: nextContextValue, children }) })
3964
4074
  }
3965
4075
  )
3966
4076
  }
@@ -3974,14 +4084,14 @@ var DragDropContext = ({
3974
4084
  if (status === "LOADING") {
3975
4085
  return children;
3976
4086
  }
3977
- return /* @__PURE__ */ jsx24(DragDropContextClient, { disableAutoScroll, children });
4087
+ return /* @__PURE__ */ jsx25(DragDropContextClient, { disableAutoScroll, children });
3978
4088
  };
3979
4089
 
3980
4090
  // components/Drawer/index.tsx
3981
4091
  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);
4092
+ import { jsx as jsx26, jsxs as jsxs10 } from "react/jsx-runtime";
4093
+ var getClassName16 = get_class_name_factory_default("Drawer", styles_module_default12);
4094
+ var getClassNameItem2 = get_class_name_factory_default("DrawerItem", styles_module_default12);
3985
4095
  var DrawerItemInner = ({
3986
4096
  children,
3987
4097
  name,
@@ -3991,10 +4101,10 @@ var DrawerItemInner = ({
3991
4101
  isDragDisabled
3992
4102
  }) => {
3993
4103
  const CustomInner = useMemo9(
3994
- () => children || (({ children: children2 }) => /* @__PURE__ */ jsx25("div", { className: getClassNameItem2("default"), children: children2 })),
4104
+ () => children || (({ children: children2 }) => /* @__PURE__ */ jsx26("div", { className: getClassNameItem2("default"), children: children2 })),
3995
4105
  [children]
3996
4106
  );
3997
- return /* @__PURE__ */ jsx25(
4107
+ return /* @__PURE__ */ jsx26(
3998
4108
  "div",
3999
4109
  {
4000
4110
  className: getClassNameItem2({ disabled: isDragDisabled }),
@@ -4002,9 +4112,9 @@ var DrawerItemInner = ({
4002
4112
  onMouseDown: (e) => e.preventDefault(),
4003
4113
  "data-testid": dragRef ? `drawer-item:${name}` : "",
4004
4114
  "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 })
4115
+ children: /* @__PURE__ */ jsx26(CustomInner, { name, children: /* @__PURE__ */ jsx26("div", { className: getClassNameItem2("draggableWrapper"), children: /* @__PURE__ */ jsxs10("div", { className: getClassNameItem2("draggable"), children: [
4116
+ icon && /* @__PURE__ */ jsx26("div", { className: getClassNameItem2("icon"), children: icon }),
4117
+ /* @__PURE__ */ jsx26("div", { className: getClassNameItem2("name"), children: label != null ? label : name })
4008
4118
  ] }) }) })
4009
4119
  }
4010
4120
  );
@@ -4023,9 +4133,9 @@ var DrawerItemDraggable = ({
4023
4133
  disabled: isDragDisabled,
4024
4134
  type: "drawer"
4025
4135
  });
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(
4136
+ return /* @__PURE__ */ jsxs10("div", { className: getClassName16("draggable"), children: [
4137
+ /* @__PURE__ */ jsx26("div", { className: getClassName16("draggableBg"), children: /* @__PURE__ */ jsx26(DrawerItemInner, { name, label, icon, children }) }),
4138
+ /* @__PURE__ */ jsx26("div", { className: getClassName16("draggableFg"), children: /* @__PURE__ */ jsx26(
4029
4139
  DrawerItemInner,
4030
4140
  {
4031
4141
  name,
@@ -4061,7 +4171,7 @@ var DrawerItem = ({
4061
4171
  },
4062
4172
  [resolvedId]
4063
4173
  );
4064
- return /* @__PURE__ */ jsx25("div", { children: /* @__PURE__ */ jsx25(
4174
+ return /* @__PURE__ */ jsx26("div", { children: /* @__PURE__ */ jsx26(
4065
4175
  DrawerItemDraggable,
4066
4176
  {
4067
4177
  name,
@@ -4096,10 +4206,10 @@ var Drawer = ({
4096
4206
  collisionPriority: 0
4097
4207
  // Never collide with this, but we use it so NestedDroppablePlugin respects the Drawer
4098
4208
  });
4099
- return /* @__PURE__ */ jsx25(
4209
+ return /* @__PURE__ */ jsx26(
4100
4210
  "div",
4101
4211
  {
4102
- className: getClassName15({ [variant]: variant }),
4212
+ className: getClassName16({ [variant]: variant }),
4103
4213
  ref,
4104
4214
  "data-editor-dnd": id,
4105
4215
  "data-editor-drawer": true,
@@ -4115,7 +4225,7 @@ import { pointerIntersection } from "@dnd-kit/collision";
4115
4225
 
4116
4226
  // components/DropZone/lib/use-min-empty-height.ts
4117
4227
  init_react_import();
4118
- import { useEffect as useEffect10, useRef as useRef4, useState as useState12 } from "react";
4228
+ import { useEffect as useEffect10, useRef as useRef5, useState as useState12 } from "react";
4119
4229
  var getNumItems = (appStore, zoneCompound) => appStore.getState().state.indexes.zones[zoneCompound].contentIds.length;
4120
4230
  var useMinEmptyHeight = ({
4121
4231
  zoneCompound,
@@ -4132,7 +4242,7 @@ var useMinEmptyHeight = ({
4132
4242
  isZone: ((_b = s.draggedItem) == null ? void 0 : _b.data.zone) === zoneCompound
4133
4243
  };
4134
4244
  });
4135
- const numItems = useRef4(0);
4245
+ const numItems = useRef5(0);
4136
4246
  const onDragFinished = useOnDragFinished(
4137
4247
  (finished) => {
4138
4248
  if (finished) {
@@ -4184,10 +4294,10 @@ import { useContext as useContext7, useEffect as useEffect11, useState as useSta
4184
4294
  // lib/dnd/use-rendered-callback.ts
4185
4295
  init_react_import();
4186
4296
  import { useDragDropManager } from "@dnd-kit/react";
4187
- import { useCallback as useCallback9 } from "react";
4297
+ import { useCallback as useCallback10 } from "react";
4188
4298
  function useRenderedCallback(callback, deps) {
4189
4299
  const manager = useDragDropManager();
4190
- return useCallback9(
4300
+ return useCallback10(
4191
4301
  (...args) => __async(null, null, function* () {
4192
4302
  yield manager == null ? void 0 : manager.renderer.rendering;
4193
4303
  return callback(...args);
@@ -4258,7 +4368,7 @@ var useContentIdsWithPreview = (contentIds, zoneCompound) => {
4258
4368
 
4259
4369
  // components/DropZone/lib/use-drag-axis.ts
4260
4370
  init_react_import();
4261
- import { useCallback as useCallback10, useEffect as useEffect12, useState as useState14 } from "react";
4371
+ import { useCallback as useCallback11, useEffect as useEffect12, useState as useState14 } from "react";
4262
4372
  var GRID_DRAG_AXIS = "dynamic";
4263
4373
  var FLEX_ROW_DRAG_AXIS = "x";
4264
4374
  var DEFAULT_DRAG_AXIS = "y";
@@ -4267,7 +4377,7 @@ var useDragAxis = (ref, collisionAxis) => {
4267
4377
  const [dragAxis, setDragAxis] = useState14(
4268
4378
  collisionAxis || DEFAULT_DRAG_AXIS
4269
4379
  );
4270
- const calculateDragAxis = useCallback10(() => {
4380
+ const calculateDragAxis = useCallback11(() => {
4271
4381
  if (ref.current) {
4272
4382
  const computedStyle = window.getComputedStyle(ref.current);
4273
4383
  if (computedStyle.display === "grid") {
@@ -4298,7 +4408,7 @@ import { useShallow as useShallow6 } from "zustand/react/shallow";
4298
4408
  // components/SlotRender/index.tsx
4299
4409
  init_react_import();
4300
4410
  import { useShallow as useShallow5 } from "zustand/react/shallow";
4301
- import { jsx as jsx26 } from "react/jsx-runtime";
4411
+ import { jsx as jsx27 } from "react/jsx-runtime";
4302
4412
  var ContextSlotRender = ({
4303
4413
  componentId,
4304
4414
  zone
@@ -4313,7 +4423,7 @@ var ContextSlotRender = ({
4313
4423
  return contentIds.map((contentId) => indexes.nodes[contentId].flatData);
4314
4424
  })
4315
4425
  );
4316
- return /* @__PURE__ */ jsx26(
4426
+ return /* @__PURE__ */ jsx27(
4317
4427
  SlotRenderPure,
4318
4428
  {
4319
4429
  content: slotContent,
@@ -4326,10 +4436,10 @@ var ContextSlotRender = ({
4326
4436
 
4327
4437
  // lib/field-transforms/use-field-transforms-tracked.tsx
4328
4438
  init_react_import();
4329
- import { useMemo as useMemo10, useRef as useRef5 } from "react";
4439
+ import { useMemo as useMemo10, useRef as useRef6 } from "react";
4330
4440
  function useFieldTransformsTracked(config, item, transforms, readOnly, forceReadOnly) {
4331
- const prevProps = useRef5(null);
4332
- const prevResult = useRef5(item.props);
4441
+ const prevProps = useRef6(null);
4442
+ const prevResult = useRef6(item.props);
4333
4443
  const mappers = useMemo10(
4334
4444
  () => buildMappers(transforms, readOnly, forceReadOnly),
4335
4445
  [transforms, readOnly, forceReadOnly]
@@ -4372,7 +4482,7 @@ init_react_import();
4372
4482
 
4373
4483
  // components/InlineTextField/index.tsx
4374
4484
  init_react_import();
4375
- import { memo as memo4, useEffect as useEffect13, useRef as useRef6, useState as useState15 } from "react";
4485
+ import { memo as memo4, useEffect as useEffect13, useRef as useRef7, useState as useState15 } from "react";
4376
4486
 
4377
4487
  // lib/overlay-portal/index.tsx
4378
4488
  init_react_import();
@@ -4424,11 +4534,11 @@ var registerOverlayPortal = (el, opts = {}) => {
4424
4534
 
4425
4535
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/InlineTextField/styles.module.css#css-module
4426
4536
  init_react_import();
4427
- var styles_module_default12 = { "InlineTextField": "_InlineTextField_104qp_1" };
4537
+ var styles_module_default13 = { "InlineTextField": "_InlineTextField_104qp_1" };
4428
4538
 
4429
4539
  // 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);
4540
+ import { jsx as jsx28 } from "react/jsx-runtime";
4541
+ var getClassName17 = get_class_name_factory_default("InlineTextField", styles_module_default13);
4432
4542
  var InlineTextFieldInternal = ({
4433
4543
  propPath,
4434
4544
  componentId,
@@ -4437,7 +4547,7 @@ var InlineTextFieldInternal = ({
4437
4547
  opts = {}
4438
4548
  }) => {
4439
4549
  var _a;
4440
- const ref = useRef6(null);
4550
+ const ref = useRef7(null);
4441
4551
  const appStoreApi = useAppStoreApi();
4442
4552
  const disableLineBreaks = (_a = opts.disableLineBreaks) != null ? _a : false;
4443
4553
  useEffect13(() => {
@@ -4488,10 +4598,10 @@ var InlineTextFieldInternal = ({
4488
4598
  }, [appStoreApi, ref.current, value, disableLineBreaks]);
4489
4599
  const [isHovering, setIsHovering] = useState15(false);
4490
4600
  const [isFocused, setIsFocused] = useState15(false);
4491
- return /* @__PURE__ */ jsx27(
4601
+ return /* @__PURE__ */ jsx28(
4492
4602
  "span",
4493
4603
  {
4494
- className: getClassName16(),
4604
+ className: getClassName17(),
4495
4605
  ref,
4496
4606
  contentEditable: isHovering || isFocused ? "plaintext-only" : "false",
4497
4607
  onClick: (e) => {
@@ -4527,11 +4637,11 @@ var InlineTextFieldInternal = ({
4527
4637
  var InlineTextField = memo4(InlineTextFieldInternal);
4528
4638
 
4529
4639
  // lib/field-transforms/default-transforms/inline-text-transform.tsx
4530
- import { jsx as jsx28 } from "react/jsx-runtime";
4640
+ import { jsx as jsx29 } from "react/jsx-runtime";
4531
4641
  var getInlineTextTransform = () => ({
4532
4642
  text: ({ value, componentId, field, propPath, isReadOnly }) => {
4533
4643
  if (field.contentEditable) {
4534
- return /* @__PURE__ */ jsx28(
4644
+ return /* @__PURE__ */ jsx29(
4535
4645
  InlineTextField,
4536
4646
  {
4537
4647
  propPath,
@@ -4546,7 +4656,7 @@ var getInlineTextTransform = () => ({
4546
4656
  },
4547
4657
  textarea: ({ value, componentId, field, propPath, isReadOnly }) => {
4548
4658
  if (field.contentEditable) {
4549
- return /* @__PURE__ */ jsx28(
4659
+ return /* @__PURE__ */ jsx29(
4550
4660
  InlineTextField,
4551
4661
  {
4552
4662
  propPath,
@@ -4560,7 +4670,7 @@ var getInlineTextTransform = () => ({
4560
4670
  },
4561
4671
  custom: ({ value, componentId, field, propPath, isReadOnly }) => {
4562
4672
  if (field.contentEditable && typeof value === "string") {
4563
- return /* @__PURE__ */ jsx28(
4673
+ return /* @__PURE__ */ jsx29(
4564
4674
  InlineTextField,
4565
4675
  {
4566
4676
  propPath,
@@ -4578,15 +4688,15 @@ var getInlineTextTransform = () => ({
4578
4688
  init_react_import();
4579
4689
  import {
4580
4690
  useEffect as useEffect14,
4581
- useRef as useRef7,
4582
- useCallback as useCallback11,
4691
+ useRef as useRef8,
4692
+ useCallback as useCallback12,
4583
4693
  memo as memo5,
4584
4694
  lazy as lazy2,
4585
4695
  Suspense as Suspense2
4586
4696
  } from "react";
4587
- import { jsx as jsx29 } from "react/jsx-runtime";
4697
+ import { jsx as jsx30 } from "react/jsx-runtime";
4588
4698
  var Editor2 = lazy2(
4589
- () => import("./Editor-OSAG52QF.mjs").then((m) => ({
4699
+ () => import("./Editor-KXEVJBNG.mjs").then((m) => ({
4590
4700
  default: m.Editor
4591
4701
  }))
4592
4702
  );
@@ -4603,7 +4713,7 @@ var InlineEditorWrapper = memo5(
4603
4713
  field,
4604
4714
  id
4605
4715
  }) => {
4606
- const portalRef = useRef7(null);
4716
+ const portalRef = useRef8(null);
4607
4717
  const appStoreApi = useAppStoreApi();
4608
4718
  const onClickHandler = (e) => {
4609
4719
  e.preventDefault();
@@ -4625,7 +4735,7 @@ var InlineEditorWrapper = memo5(
4625
4735
  });
4626
4736
  return () => cleanup == null ? void 0 : cleanup();
4627
4737
  }, [portalRef.current]);
4628
- const handleChange = useCallback11(
4738
+ const handleChange = useCallback12(
4629
4739
  (content, ui) => __async(null, null, function* () {
4630
4740
  var _a;
4631
4741
  const appStore = appStoreApi.getState();
@@ -4649,7 +4759,7 @@ var InlineEditorWrapper = memo5(
4649
4759
  }),
4650
4760
  [appStoreApi, componentId, propPath]
4651
4761
  );
4652
- const handleFocus = useCallback11(
4762
+ const handleFocus = useCallback12(
4653
4763
  (editor) => {
4654
4764
  appStoreApi.setState({
4655
4765
  currentRichText: {
@@ -4664,7 +4774,7 @@ var InlineEditorWrapper = memo5(
4664
4774
  [field, componentId]
4665
4775
  );
4666
4776
  if (!field.contentEditable)
4667
- return /* @__PURE__ */ jsx29(Suspense2, { fallback: /* @__PURE__ */ jsx29(RichTextRenderFallback, { content: value }), children: /* @__PURE__ */ jsx29(RichTextRender, { content: value, field }) });
4777
+ return /* @__PURE__ */ jsx30(Suspense2, { fallback: /* @__PURE__ */ jsx30(RichTextRenderFallback, { content: value }), children: /* @__PURE__ */ jsx30(RichTextRender, { content: value, field }) });
4668
4778
  const editorProps = {
4669
4779
  content: value,
4670
4780
  onChange: handleChange,
@@ -4674,13 +4784,13 @@ var InlineEditorWrapper = memo5(
4674
4784
  id,
4675
4785
  name: propPath
4676
4786
  };
4677
- return /* @__PURE__ */ jsx29(
4787
+ return /* @__PURE__ */ jsx30(
4678
4788
  "div",
4679
4789
  {
4680
4790
  ref: portalRef,
4681
4791
  onClick: onClickHandler,
4682
4792
  onClickCapture: onClickCaptureHandler,
4683
- children: /* @__PURE__ */ jsx29(Suspense2, { fallback: /* @__PURE__ */ jsx29(EditorFallback, __spreadValues({}, editorProps)), children: /* @__PURE__ */ jsx29(Editor2, __spreadValues({}, editorProps)) })
4793
+ children: /* @__PURE__ */ jsx30(Suspense2, { fallback: /* @__PURE__ */ jsx30(EditorFallback, __spreadValues({}, editorProps)), children: /* @__PURE__ */ jsx30(Editor2, __spreadValues({}, editorProps)) })
4684
4794
  }
4685
4795
  );
4686
4796
  }
@@ -4690,10 +4800,10 @@ var getRichTextTransform = () => ({
4690
4800
  richtext: ({ value, componentId, field, propPath, isReadOnly }) => {
4691
4801
  const { contentEditable = true, tiptap } = field;
4692
4802
  if (contentEditable === false || isReadOnly) {
4693
- return /* @__PURE__ */ jsx29(RichTextRender, { content: value, field });
4803
+ return /* @__PURE__ */ jsx30(RichTextRender, { content: value, field });
4694
4804
  }
4695
4805
  const id = `${componentId}_${field.type}_${propPath}`;
4696
- return /* @__PURE__ */ jsx29(
4806
+ return /* @__PURE__ */ jsx30(
4697
4807
  InlineEditorWrapper,
4698
4808
  {
4699
4809
  value,
@@ -4737,12 +4847,12 @@ function shallowEqual(obj1, obj2, keysToIgnore = []) {
4737
4847
  }
4738
4848
 
4739
4849
  // components/MemoizeComponent/index.tsx
4740
- import { jsx as jsx30 } from "react/jsx-runtime";
4850
+ import { jsx as jsx31 } from "react/jsx-runtime";
4741
4851
  var RenderComponent = ({
4742
4852
  Component: Component2,
4743
4853
  componentProps: renderProps
4744
4854
  }) => {
4745
- return /* @__PURE__ */ jsx30(Component2, __spreadValues({}, renderProps));
4855
+ return /* @__PURE__ */ jsx31(Component2, __spreadValues({}, renderProps));
4746
4856
  };
4747
4857
  var MemoizeComponent = memo6(RenderComponent, (prev, next) => {
4748
4858
  let editorEquals = true;
@@ -4755,11 +4865,11 @@ var MemoizeComponent = memo6(RenderComponent, (prev, next) => {
4755
4865
  // components/DropZone/VirtualizedDropZone.tsx
4756
4866
  init_react_import();
4757
4867
  import {
4758
- useCallback as useCallback12,
4868
+ useCallback as useCallback13,
4759
4869
  useContext as useContext8,
4760
4870
  useEffect as useEffect15,
4761
4871
  useMemo as useMemo11,
4762
- useRef as useRef8
4872
+ useRef as useRef9
4763
4873
  } from "react";
4764
4874
  import {
4765
4875
  defaultRangeExtractor,
@@ -4771,7 +4881,7 @@ import {
4771
4881
  useVirtualizer,
4772
4882
  windowScroll
4773
4883
  } from "@tanstack/react-virtual";
4774
- import { Fragment as Fragment6, jsx as jsx31 } from "react/jsx-runtime";
4884
+ import { Fragment as Fragment6, jsx as jsx32 } from "react/jsx-runtime";
4775
4885
  var ROOT_ZONE_VIRTUALIZATION_OVERSCAN = 5;
4776
4886
  var DEFAULT_VIRTUALIZED_ITEM_HEIGHT = 320;
4777
4887
  var measuredItemHeights = /* @__PURE__ */ new Map();
@@ -4810,9 +4920,9 @@ var VirtualizedDropZone = ({
4810
4920
  return null;
4811
4921
  });
4812
4922
  const iframeWindow = frame == null ? void 0 : frame.defaultView;
4813
- const measureRefsRef = useRef8(/* @__PURE__ */ new Map());
4923
+ const measureRefsRef = useRef9(/* @__PURE__ */ new Map());
4814
4924
  const appStoreApi = useAppStoreApi();
4815
- const resolveIndex = useCallback12(
4925
+ const resolveIndex = useCallback13(
4816
4926
  (targetId) => {
4817
4927
  var _a, _b, _c, _d;
4818
4928
  if (!targetId || targetId === "root") {
@@ -4847,7 +4957,7 @@ var VirtualizedDropZone = ({
4847
4957
  });
4848
4958
  return Array.from(nextPinnedIndexes).sort((a, b) => a - b);
4849
4959
  }, [dragTargetParentId, draggedItemId, resolveIndex, selectedId]);
4850
- const rangeExtractor = useCallback12(
4960
+ const rangeExtractor = useCallback13(
4851
4961
  (range) => {
4852
4962
  const indexes = defaultRangeExtractor(range);
4853
4963
  pinnedIndexes.forEach((index) => {
@@ -4881,7 +4991,7 @@ var VirtualizedDropZone = ({
4881
4991
  zoneStore.getState().unregisterRootVirtualizer(zoneCompound);
4882
4992
  };
4883
4993
  }, [resolveIndex, virtualizer, zoneCompound, zoneStore]);
4884
- const getMeasureRef = useCallback12((componentId) => {
4994
+ const getMeasureRef = useCallback13((componentId) => {
4885
4995
  const cachedRef = measureRefsRef.current.get(componentId);
4886
4996
  if (cachedRef) {
4887
4997
  return cachedRef;
@@ -4918,7 +5028,7 @@ var VirtualizedDropZone = ({
4918
5028
  const gapSize = Math.max(virtualItem.start - previousEnd, 0);
4919
5029
  if (gapSize > 0) {
4920
5030
  items.push(
4921
- /* @__PURE__ */ jsx31(
5031
+ /* @__PURE__ */ jsx32(
4922
5032
  "div",
4923
5033
  {
4924
5034
  style: { height: `${gapSize}px` }
@@ -4940,7 +5050,7 @@ var VirtualizedDropZone = ({
4940
5050
  const trailingGap = Math.max(totalSize - previousEnd, 0);
4941
5051
  if (trailingGap > 0) {
4942
5052
  items.push(
4943
- /* @__PURE__ */ jsx31(
5053
+ /* @__PURE__ */ jsx32(
4944
5054
  "div",
4945
5055
  {
4946
5056
  style: { height: `${trailingGap}px` }
@@ -4951,12 +5061,12 @@ var VirtualizedDropZone = ({
4951
5061
  }
4952
5062
  return items;
4953
5063
  }, [totalSize, virtualItems, getMeasureRef]);
4954
- return /* @__PURE__ */ jsx31(Fragment6, { children: renderedItems });
5064
+ return /* @__PURE__ */ jsx32(Fragment6, { children: renderedItems });
4955
5065
  };
4956
5066
 
4957
5067
  // 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);
5068
+ import { Fragment as Fragment7, jsx as jsx33, jsxs as jsxs11 } from "react/jsx-runtime";
5069
+ var getClassName18 = get_class_name_factory_default("DropZone", styles_module_default11);
4960
5070
  var getRandomColor = () => `#${Math.floor(Math.random() * 16777215).toString(16)}`;
4961
5071
  var RENDER_DEBUG = false;
4962
5072
  var InsertPreview = ({
@@ -4967,12 +5077,12 @@ var InsertPreview = ({
4967
5077
  if (element) {
4968
5078
  return (
4969
5079
  // Safe to use this since the HTML is set by the user
4970
- /* @__PURE__ */ jsx32("div", { dangerouslySetInnerHTML: { __html: element.outerHTML } })
5080
+ /* @__PURE__ */ jsx33("div", { dangerouslySetInnerHTML: { __html: element.outerHTML } })
4971
5081
  );
4972
5082
  }
4973
- return /* @__PURE__ */ jsx32(DrawerItemInner, { name: label, children: override });
5083
+ return /* @__PURE__ */ jsx33(DrawerItemInner, { name: label, children: override });
4974
5084
  };
4975
- var DropZoneEditPure = (props) => /* @__PURE__ */ jsx32(DropZoneEdit, __spreadValues({}, props));
5085
+ var DropZoneEditPure = (props) => /* @__PURE__ */ jsx33(DropZoneEdit, __spreadValues({}, props));
4976
5086
  var DropZoneChild = ({
4977
5087
  zoneCompound,
4978
5088
  componentId,
@@ -5070,7 +5180,7 @@ var DropZoneChild = ({
5070
5180
  const plugins = useAppStore((s) => s.plugins);
5071
5181
  const userFieldTransforms = useAppStore((s) => s.fieldTransforms);
5072
5182
  const combinedFieldTransforms = useMemo12(
5073
- () => __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, getSlotTransform(DropZoneEditPure, (slotProps) => /* @__PURE__ */ jsx32(ContextSlotRender, { componentId, zone: slotProps.zone }))), getInlineTextTransform()), getRichTextTransform()), plugins.reduce(
5183
+ () => __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, getSlotTransform(DropZoneEditPure, (slotProps) => /* @__PURE__ */ jsx33(ContextSlotRender, { componentId, zone: slotProps.zone }))), getInlineTextTransform()), getRichTextTransform()), plugins.reduce(
5074
5184
  (acc, plugin) => __spreadValues(__spreadValues({}, acc), plugin.fieldTransforms),
5075
5185
  {}
5076
5186
  )), userFieldTransforms),
@@ -5084,13 +5194,13 @@ var DropZoneChild = ({
5084
5194
  isLoading
5085
5195
  );
5086
5196
  if (!item) return;
5087
- const Render2 = componentConfig ? componentConfig.render : () => /* @__PURE__ */ jsxs10("div", { style: { padding: 48, textAlign: "center" }, children: [
5197
+ const Render2 = componentConfig ? componentConfig.render : () => /* @__PURE__ */ jsxs11("div", { style: { padding: 48, textAlign: "center" }, children: [
5088
5198
  "No configuration for ",
5089
5199
  item.type
5090
5200
  ] });
5091
5201
  let componentType = item.type;
5092
5202
  const isInserting = "previewType" in item ? item.previewType === "insert" : false;
5093
- return /* @__PURE__ */ jsx32(
5203
+ return /* @__PURE__ */ jsx33(
5094
5204
  DraggableComponent,
5095
5205
  {
5096
5206
  id: componentId,
@@ -5108,7 +5218,7 @@ var DropZoneChild = ({
5108
5218
  children: (dragRef) => {
5109
5219
  var _a2;
5110
5220
  if ((componentConfig == null ? void 0 : componentConfig.inline) && !isInserting) {
5111
- return /* @__PURE__ */ jsx32(
5221
+ return /* @__PURE__ */ jsx33(
5112
5222
  MemoizeComponent,
5113
5223
  {
5114
5224
  Component: Render2,
@@ -5118,14 +5228,14 @@ var DropZoneChild = ({
5118
5228
  }
5119
5229
  );
5120
5230
  }
5121
- return /* @__PURE__ */ jsx32("div", { ref: dragRef, children: isInserting ? /* @__PURE__ */ jsx32(
5231
+ return /* @__PURE__ */ jsx33("div", { ref: dragRef, children: isInserting ? /* @__PURE__ */ jsx33(
5122
5232
  InsertPreview,
5123
5233
  {
5124
5234
  label,
5125
5235
  override: (_a2 = overrides.componentItem) != null ? _a2 : overrides.drawerItem,
5126
5236
  element: "element" in item && item.element ? item.element : void 0
5127
5237
  }
5128
- ) : /* @__PURE__ */ jsx32(
5238
+ ) : /* @__PURE__ */ jsx33(
5129
5239
  MemoizeComponent,
5130
5240
  {
5131
5241
  Component: Render2,
@@ -5205,8 +5315,8 @@ var DropZoneEdit = forwardRef(
5205
5315
  const contentIds = useMemo12(() => {
5206
5316
  return zoneContentIds || [];
5207
5317
  }, [zoneContentIds]);
5208
- const ref = useRef9(null);
5209
- const acceptsTarget = useCallback13(
5318
+ const ref = useRef10(null);
5319
+ const acceptsTarget = useCallback14(
5210
5320
  (componentType) => {
5211
5321
  if (!componentType) {
5212
5322
  return true;
@@ -5289,7 +5399,7 @@ var DropZoneEdit = forwardRef(
5289
5399
  userMinEmptyHeight,
5290
5400
  ref
5291
5401
  });
5292
- const setRefs = useCallback13(
5402
+ const setRefs = useCallback14(
5293
5403
  (node) => {
5294
5404
  assignRefs([ref, dropRef, userRef], node);
5295
5405
  },
@@ -5301,10 +5411,10 @@ var DropZoneEdit = forwardRef(
5301
5411
  const El = as != null ? as : "div";
5302
5412
  const isRootAreaZone = (areaId != null ? areaId : rootAreaId) === rootAreaId && depth === 0;
5303
5413
  const shouldVirtualizeItems = _experimentalVirtualization && isRootAreaZone;
5304
- return /* @__PURE__ */ jsx32(
5414
+ return /* @__PURE__ */ jsx33(
5305
5415
  El,
5306
5416
  {
5307
- className: `${getClassName17({
5417
+ className: `${getClassName18({
5308
5418
  isRootZone,
5309
5419
  hoveringOverArea,
5310
5420
  isEnabled,
@@ -5319,12 +5429,12 @@ var DropZoneEdit = forwardRef(
5319
5429
  "--min-empty-height": minEmptyHeight,
5320
5430
  backgroundColor: RENDER_DEBUG ? getRandomColor() : style == null ? void 0 : style.backgroundColor
5321
5431
  }),
5322
- children: shouldVirtualizeItems ? /* @__PURE__ */ jsx32(
5432
+ children: shouldVirtualizeItems ? /* @__PURE__ */ jsx33(
5323
5433
  VirtualizedDropZone,
5324
5434
  {
5325
5435
  contentIds: contentIdsWithPreview,
5326
5436
  zoneCompound,
5327
- renderItem: (props) => /* @__PURE__ */ jsx32(
5437
+ renderItem: (props) => /* @__PURE__ */ jsx33(
5328
5438
  DropZoneChildMemo,
5329
5439
  {
5330
5440
  zoneCompound,
@@ -5338,7 +5448,7 @@ var DropZoneEdit = forwardRef(
5338
5448
  props.componentId
5339
5449
  )
5340
5450
  }
5341
- ) : contentIdsWithPreview.map((componentId, i) => /* @__PURE__ */ jsx32(
5451
+ ) : contentIdsWithPreview.map((componentId, i) => /* @__PURE__ */ jsx33(
5342
5452
  DropZoneChildMemo,
5343
5453
  {
5344
5454
  zoneCompound,
@@ -5360,7 +5470,7 @@ var DropZoneRenderItem = ({
5360
5470
  metadata
5361
5471
  }) => {
5362
5472
  const Component2 = config.components[item.type];
5363
- const props = useSlots(config, item, (slotProps) => /* @__PURE__ */ jsx32(SlotRenderPure, __spreadProps(__spreadValues({}, slotProps), { config, metadata })));
5473
+ const props = useSlots(config, item, (slotProps) => /* @__PURE__ */ jsx33(SlotRenderPure, __spreadProps(__spreadValues({}, slotProps), { config, metadata })));
5364
5474
  const nextContextValue = useMemo12(
5365
5475
  () => ({
5366
5476
  areaId: props.id,
@@ -5369,7 +5479,7 @@ var DropZoneRenderItem = ({
5369
5479
  [props]
5370
5480
  );
5371
5481
  const richtextProps = useRichtextProps(Component2.fields, props);
5372
- return /* @__PURE__ */ jsx32(DropZoneProvider, { value: nextContextValue, children: /* @__PURE__ */ jsx32(
5482
+ return /* @__PURE__ */ jsx33(DropZoneProvider, { value: nextContextValue, children: /* @__PURE__ */ jsx33(
5373
5483
  Component2.render,
5374
5484
  __spreadProps(__spreadValues(__spreadValues({}, props), richtextProps), {
5375
5485
  editor: __spreadProps(__spreadValues({}, props.editor), {
@@ -5379,7 +5489,7 @@ var DropZoneRenderItem = ({
5379
5489
  })
5380
5490
  ) }, props.id);
5381
5491
  };
5382
- var DropZoneRenderPure = (props) => /* @__PURE__ */ jsx32(DropZoneRender, __spreadValues({}, props));
5492
+ var DropZoneRenderPure = (props) => /* @__PURE__ */ jsx33(DropZoneRender, __spreadValues({}, props));
5383
5493
  var DropZoneRender = forwardRef(
5384
5494
  function DropZoneRenderInternal({ className, style, zone, as }, ref) {
5385
5495
  const ctx = useContext9(dropZoneContext);
@@ -5401,10 +5511,10 @@ var DropZoneRender = forwardRef(
5401
5511
  if (zoneCompound !== rootDroppableId) {
5402
5512
  content = setupZone(data, zoneCompound).zones[zoneCompound];
5403
5513
  }
5404
- return /* @__PURE__ */ jsx32(El, { className, style, ref, children: content.map((item) => {
5514
+ return /* @__PURE__ */ jsx33(El, { className, style, ref, children: content.map((item) => {
5405
5515
  const Component2 = config.components[item.type];
5406
5516
  if (Component2) {
5407
- return /* @__PURE__ */ jsx32(
5517
+ return /* @__PURE__ */ jsx33(
5408
5518
  DropZoneRenderItem,
5409
5519
  {
5410
5520
  config,
@@ -5418,14 +5528,14 @@ var DropZoneRender = forwardRef(
5418
5528
  }) });
5419
5529
  }
5420
5530
  );
5421
- var DropZonePure = (props) => /* @__PURE__ */ jsx32(DropZone, __spreadValues({}, props));
5531
+ var DropZonePure = (props) => /* @__PURE__ */ jsx33(DropZone, __spreadValues({}, props));
5422
5532
  var DropZone = forwardRef(
5423
5533
  function DropZone2(props, ref) {
5424
5534
  const ctx = useContext9(dropZoneContext);
5425
5535
  if ((ctx == null ? void 0 : ctx.mode) === "edit") {
5426
- return /* @__PURE__ */ jsx32(Fragment7, { children: /* @__PURE__ */ jsx32(DropZoneEdit, __spreadProps(__spreadValues({}, props), { ref })) });
5536
+ return /* @__PURE__ */ jsx33(Fragment7, { children: /* @__PURE__ */ jsx33(DropZoneEdit, __spreadProps(__spreadValues({}, props), { ref })) });
5427
5537
  }
5428
- return /* @__PURE__ */ jsx32(Fragment7, { children: /* @__PURE__ */ jsx32(DropZoneRender, __spreadProps(__spreadValues({}, props), { ref })) });
5538
+ return /* @__PURE__ */ jsx33(Fragment7, { children: /* @__PURE__ */ jsx33(DropZoneRender, __spreadProps(__spreadValues({}, props), { ref })) });
5429
5539
  }
5430
5540
  );
5431
5541
 
@@ -5482,7 +5592,7 @@ function resolveGlobals(data, config) {
5482
5592
  }
5483
5593
 
5484
5594
  // components/Render/index.tsx
5485
- import { jsx as jsx33 } from "react/jsx-runtime";
5595
+ import { jsx as jsx34 } from "react/jsx-runtime";
5486
5596
  var renderContext = React3.createContext({
5487
5597
  config: { components: {} },
5488
5598
  data: { root: {}, content: [] },
@@ -5517,7 +5627,7 @@ function Render({
5517
5627
  const propsWithSlots = useSlots(
5518
5628
  config,
5519
5629
  { type: "root", props: pageProps },
5520
- (props) => /* @__PURE__ */ jsx33(SlotRender, __spreadProps(__spreadValues({}, props), { config, metadata }))
5630
+ (props) => /* @__PURE__ */ jsx34(SlotRender, __spreadProps(__spreadValues({}, props), { config, metadata }))
5521
5631
  );
5522
5632
  const richtextProps = useRichtextProps((_a = config.root) == null ? void 0 : _a.fields, pageProps);
5523
5633
  const nextContextValue = useMemo13(
@@ -5528,9 +5638,9 @@ function Render({
5528
5638
  []
5529
5639
  );
5530
5640
  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 }) })) }) });
5641
+ 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
5642
  }
5533
- return /* @__PURE__ */ jsx33(renderContext.Provider, { value: { config, data: defaultedData, metadata }, children: /* @__PURE__ */ jsx33(DropZoneProvider, { value: nextContextValue, 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(DropZoneRenderPure, { zone: rootZone }) }) });
5534
5644
  }
5535
5645
 
5536
5646
  // components/ComponentList/index.tsx
@@ -5538,12 +5648,12 @@ init_react_import();
5538
5648
 
5539
5649
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/ComponentList/styles.module.css#css-module
5540
5650
  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" };
5651
+ 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
5652
 
5543
5653
  // components/ComponentList/index.tsx
5544
5654
  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);
5655
+ import { jsx as jsx35, jsxs as jsxs12 } from "react/jsx-runtime";
5656
+ var getClassName19 = get_class_name_factory_default("ComponentList", styles_module_default14);
5547
5657
  var ComponentListItem = ({
5548
5658
  name,
5549
5659
  label,
@@ -5563,7 +5673,7 @@ var ComponentListItem = ({
5563
5673
  );
5564
5674
  }
5565
5675
  }, [overrides]);
5566
- return /* @__PURE__ */ jsx34(Drawer.Item, { label, name, icon, isDragDisabled: !canInsert, children: (_a = overrides.componentItem) != null ? _a : overrides.drawerItem });
5676
+ return /* @__PURE__ */ jsx35(Drawer.Item, { label, name, icon, isDragDisabled: !canInsert, children: (_a = overrides.componentItem) != null ? _a : overrides.drawerItem });
5567
5677
  };
5568
5678
  var ComponentList = ({
5569
5679
  children,
@@ -5574,12 +5684,12 @@ var ComponentList = ({
5574
5684
  const setUi = useAppStore((s) => s.setUi);
5575
5685
  const componentList = useAppStore((s) => s.state.ui.componentList);
5576
5686
  const { expanded = true } = componentList[id] || {};
5577
- return /* @__PURE__ */ jsxs11("div", { className: getClassName18({ isExpanded: expanded }), children: [
5578
- title && /* @__PURE__ */ jsxs11(
5687
+ return /* @__PURE__ */ jsxs12("div", { className: getClassName19({ isExpanded: expanded }), children: [
5688
+ title && /* @__PURE__ */ jsxs12(
5579
5689
  "button",
5580
5690
  {
5581
5691
  type: "button",
5582
- className: getClassName18("title"),
5692
+ className: getClassName19("title"),
5583
5693
  onClick: () => setUi({
5584
5694
  componentList: __spreadProps(__spreadValues({}, componentList), {
5585
5695
  [id]: __spreadProps(__spreadValues({}, componentList[id]), {
@@ -5589,15 +5699,15 @@ var ComponentList = ({
5589
5699
  }),
5590
5700
  title: expanded ? `Collapse${title ? ` ${title}` : ""}` : `Expand${title ? ` ${title}` : ""}`,
5591
5701
  children: [
5592
- /* @__PURE__ */ jsx34("div", { className: getClassName18("titleIcon"), children: /* @__PURE__ */ jsx34(ChevronRight, { size: 12 }) }),
5593
- /* @__PURE__ */ jsx34("div", { children: title })
5702
+ /* @__PURE__ */ jsx35("div", { className: getClassName19("titleIcon"), children: /* @__PURE__ */ jsx35(ChevronRight, { size: 12 }) }),
5703
+ /* @__PURE__ */ jsx35("div", { children: title })
5594
5704
  ]
5595
5705
  }
5596
5706
  ),
5597
- /* @__PURE__ */ jsx34("div", { className: getClassName18("content"), children: /* @__PURE__ */ jsx34(Drawer, { variant: "tile", children: children || Object.keys(config.components).map((componentKey) => {
5707
+ /* @__PURE__ */ jsx35("div", { className: getClassName19("content"), children: /* @__PURE__ */ jsx35(Drawer, { variant: "tile", children: children || Object.keys(config.components).map((componentKey) => {
5598
5708
  var _a;
5599
5709
  const componentConf = config.components[componentKey] || {};
5600
- return /* @__PURE__ */ jsx34(
5710
+ return /* @__PURE__ */ jsx35(
5601
5711
  ComponentListItem,
5602
5712
  {
5603
5713
  label: (_a = componentConf["label"]) != null ? _a : componentKey,
@@ -5777,6 +5887,9 @@ var createEditorCommands = (appStore) => {
5777
5887
  root: __spreadProps(__spreadValues({}, root), { props: __spreadValues(__spreadValues({}, prevProps), patch) })
5778
5888
  });
5779
5889
  };
5890
+ const scrollToComponent = (id) => {
5891
+ getState().scrollToComponent(id);
5892
+ };
5780
5893
  const selectComponent = (id) => {
5781
5894
  const dispatch = getState().dispatch;
5782
5895
  if (id === null) {
@@ -5798,7 +5911,8 @@ var createEditorCommands = (appStore) => {
5798
5911
  replaceComponent,
5799
5912
  updateProps,
5800
5913
  updateRoot,
5801
- selectComponent
5914
+ selectComponent,
5915
+ scrollToComponent
5802
5916
  };
5803
5917
  };
5804
5918
 
@@ -5915,11 +6029,11 @@ import { useMemo as useMemo14, useState as useState17 } from "react";
5915
6029
 
5916
6030
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Components/styles.module.css#css-module
5917
6031
  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" };
6032
+ 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
6033
 
5920
6034
  // 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);
6035
+ import { jsx as jsx36, jsxs as jsxs13 } from "react/jsx-runtime";
6036
+ var getClassName20 = get_class_name_factory_default("Components", styles_module_default15);
5923
6037
  var Components = () => {
5924
6038
  var _a;
5925
6039
  const overrides = useAppStore((s) => s.overrides);
@@ -5954,23 +6068,23 @@ var Components = () => {
5954
6068
  }
5955
6069
  return Array.from(buckets.entries());
5956
6070
  }, [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(
6071
+ return /* @__PURE__ */ jsxs13(Wrapper, { children: [
6072
+ /* @__PURE__ */ jsxs13("div", { className: getClassName20("search"), children: [
6073
+ /* @__PURE__ */ jsx36("div", { className: getClassName20("searchIcon"), children: /* @__PURE__ */ jsx36(Search, { size: 14 }) }),
6074
+ /* @__PURE__ */ jsx36(
5961
6075
  "input",
5962
6076
  {
5963
6077
  type: "search",
5964
- className: getClassName19("searchInput"),
6078
+ className: getClassName20("searchInput"),
5965
6079
  placeholder: "search",
5966
6080
  value: search,
5967
6081
  onChange: (e) => setSearch(e.target.value)
5968
6082
  }
5969
6083
  )
5970
6084
  ] }),
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]) => {
6085
+ 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
6086
  var _a2;
5973
- return /* @__PURE__ */ jsx35(
6087
+ return /* @__PURE__ */ jsx36(
5974
6088
  ComponentList.Item,
5975
6089
  {
5976
6090
  name,
@@ -5983,14 +6097,14 @@ var Components = () => {
5983
6097
  var _a2, _b;
5984
6098
  const categoryKey = category != null ? category : "other";
5985
6099
  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(
6100
+ return /* @__PURE__ */ jsx36(
5987
6101
  ComponentList,
5988
6102
  {
5989
6103
  id: categoryKey,
5990
6104
  title,
5991
6105
  children: entries.map(([name, conf]) => {
5992
6106
  var _a3;
5993
- return /* @__PURE__ */ jsx35(
6107
+ return /* @__PURE__ */ jsx36(
5994
6108
  ComponentList.Item,
5995
6109
  {
5996
6110
  name,
@@ -6009,16 +6123,16 @@ var Components = () => {
6009
6123
 
6010
6124
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/plugins/blocks/styles.module.css#css-module
6011
6125
  init_react_import();
6012
- var styles_module_default15 = { "BlocksPlugin": "_BlocksPlugin_15ud0_1" };
6126
+ var styles_module_default16 = { "BlocksPlugin": "_BlocksPlugin_15ud0_1" };
6013
6127
 
6014
6128
  // 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);
6129
+ import { jsx as jsx37 } from "react/jsx-runtime";
6130
+ var getClassName21 = get_class_name_factory_default("BlocksPlugin", styles_module_default16);
6017
6131
  var blocksPlugin = () => ({
6018
6132
  name: "blocks",
6019
6133
  label: "Blocks",
6020
- render: () => /* @__PURE__ */ jsx36("div", { className: getClassName20(), children: /* @__PURE__ */ jsx36(Components, {}) }),
6021
- icon: /* @__PURE__ */ jsx36(Plus, {})
6134
+ render: () => /* @__PURE__ */ jsx37("div", { className: getClassName21(), children: /* @__PURE__ */ jsx37(Components, {}) }),
6135
+ icon: /* @__PURE__ */ jsx37(Plus, {})
6022
6136
  });
6023
6137
 
6024
6138
  // plugins/outline/index.tsx
@@ -6032,19 +6146,19 @@ init_react_import();
6032
6146
 
6033
6147
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/LayerTree/styles.module.css#css-module
6034
6148
  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" };
6149
+ 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
6150
 
6037
6151
  // components/LayerTree/index.tsx
6038
6152
  import {
6039
6153
  forwardRef as forwardRef2,
6040
- useCallback as useCallback14,
6154
+ useCallback as useCallback15,
6041
6155
  useContext as useContext11,
6042
- useRef as useRef10
6156
+ useRef as useRef11
6043
6157
  } from "react";
6044
6158
  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);
6159
+ import { Fragment as Fragment8, jsx as jsx38, jsxs as jsxs14 } from "react/jsx-runtime";
6160
+ var getClassName22 = get_class_name_factory_default("LayerTree", styles_module_default17);
6161
+ var getClassNameLayer = get_class_name_factory_default("Layer", styles_module_default17);
6048
6162
  var DEFAULT_LAYER_ROW_HEIGHT = 32;
6049
6163
  var LAYER_TREE_VIRTUALIZATION_OVERSCAN = 8;
6050
6164
  var MIN_VIRTUALIZED_LAYER_COUNT = 25;
@@ -6176,14 +6290,14 @@ var Layer = forwardRef2(function Layer2({
6176
6290
  }
6177
6291
  );
6178
6292
  const containsZone = node.childZones.length > 0;
6179
- const setItemSelector = useCallback14(
6293
+ const setItemSelector = useCallback15(
6180
6294
  (itemSelector) => {
6181
6295
  dispatch({ type: "setUi", ui: { itemSelector } });
6182
6296
  },
6183
6297
  [dispatch]
6184
6298
  );
6185
6299
  const shouldRenderChildren = isSelected || childIsSelected;
6186
- return /* @__PURE__ */ jsxs13(
6300
+ return /* @__PURE__ */ jsxs14(
6187
6301
  "li",
6188
6302
  {
6189
6303
  ref,
@@ -6198,7 +6312,7 @@ var Layer = forwardRef2(function Layer2({
6198
6312
  "data-index": dataIndex,
6199
6313
  "data-editor-layer-tree-id": node.itemId,
6200
6314
  children: [
6201
- /* @__PURE__ */ jsx37("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */ jsxs13(
6315
+ /* @__PURE__ */ jsx38("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */ jsxs14(
6202
6316
  "button",
6203
6317
  {
6204
6318
  type: "button",
@@ -6223,34 +6337,34 @@ var Layer = forwardRef2(function Layer2({
6223
6337
  zoneStore.setState({ hoveringComponent: null });
6224
6338
  },
6225
6339
  children: [
6226
- /* @__PURE__ */ jsx37(
6340
+ /* @__PURE__ */ jsx38(
6227
6341
  "div",
6228
6342
  {
6229
6343
  className: getClassNameLayer("chevron"),
6230
6344
  title: containsZone ? isSelected ? "Collapse" : "Expand" : void 0,
6231
- children: containsZone && /* @__PURE__ */ jsx37(ChevronRight, { size: "12" })
6345
+ children: containsZone && /* @__PURE__ */ jsx38(ChevronRight, { size: "12" })
6232
6346
  }
6233
6347
  ),
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(
6348
+ /* @__PURE__ */ jsxs14("div", { className: getClassNameLayer("title"), children: [
6349
+ /* @__PURE__ */ jsx38("div", { className: getClassNameLayer("icon"), children: /* @__PURE__ */ jsx38(Component, { size: "16" }) }),
6350
+ /* @__PURE__ */ jsx38("div", { className: getClassNameLayer("name"), children: node.label }),
6351
+ isGlobal && isUnlinked && /* @__PURE__ */ jsx38(
6238
6352
  "div",
6239
6353
  {
6240
6354
  className: getClassNameLayer("unlinkedGlyph"),
6241
6355
  title: "Unlinked from shared",
6242
- children: /* @__PURE__ */ jsx37(Unlink2, { size: "12" })
6356
+ children: /* @__PURE__ */ jsx38(Unlink2, { size: "12" })
6243
6357
  }
6244
6358
  )
6245
6359
  ] })
6246
6360
  ]
6247
6361
  }
6248
6362
  ) }),
6249
- containsZone && shouldRenderChildren && node.childZones.map((childZone) => /* @__PURE__ */ jsx37(
6363
+ containsZone && shouldRenderChildren && node.childZones.map((childZone) => /* @__PURE__ */ jsx38(
6250
6364
  "div",
6251
6365
  {
6252
6366
  className: getClassNameLayer("zones"),
6253
- children: /* @__PURE__ */ jsx37(
6367
+ children: /* @__PURE__ */ jsx38(
6254
6368
  LayerTreeZone,
6255
6369
  {
6256
6370
  depth: depth + 1,
@@ -6273,9 +6387,9 @@ var LayerTreeZone = ({
6273
6387
  tree
6274
6388
  }) => {
6275
6389
  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(
6390
+ return /* @__PURE__ */ jsxs14(Fragment8, { children: [
6391
+ tree.label && /* @__PURE__ */ jsx38("div", { className: getClassName22("zoneTitle"), children: tree.label }),
6392
+ shouldVirtualize ? /* @__PURE__ */ jsx38(
6279
6393
  VirtualizedLayerTreeItems,
6280
6394
  {
6281
6395
  depth,
@@ -6283,7 +6397,7 @@ var LayerTreeZone = ({
6283
6397
  selectedPathIds,
6284
6398
  tree
6285
6399
  }
6286
- ) : /* @__PURE__ */ jsx37(
6400
+ ) : /* @__PURE__ */ jsx38(
6287
6401
  StaticLayerTreeItems,
6288
6402
  {
6289
6403
  depth,
@@ -6300,9 +6414,9 @@ var StaticLayerTreeItems = ({
6300
6414
  selectedPathIds,
6301
6415
  tree
6302
6416
  }) => {
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(
6417
+ return /* @__PURE__ */ jsxs14("ul", { className: getClassName22(), children: [
6418
+ tree.items.length === 0 && /* @__PURE__ */ jsx38("div", { className: getClassName22("helper"), children: "empty" }),
6419
+ tree.items.map((node) => /* @__PURE__ */ jsx38(
6306
6420
  Layer,
6307
6421
  {
6308
6422
  childIsSelected: selectedPathIds.has(node.itemId),
@@ -6322,7 +6436,7 @@ var VirtualizedLayerTreeItems = ({
6322
6436
  selectedPathIds,
6323
6437
  tree
6324
6438
  }) => {
6325
- const listRef = useRef10(null);
6439
+ const listRef = useRef11(null);
6326
6440
  const virtualizer = useVirtualizer2({
6327
6441
  count: tree.items.length,
6328
6442
  estimateSize: (index) => getEstimatedRowHeight(tree.items[index].itemId),
@@ -6348,7 +6462,7 @@ var VirtualizedLayerTreeItems = ({
6348
6462
  const gapSize = Math.max(virtualItem.start - previousEnd, 0);
6349
6463
  if (gapSize > 0) {
6350
6464
  renderedItems.push(
6351
- /* @__PURE__ */ jsx37(
6465
+ /* @__PURE__ */ jsx38(
6352
6466
  "li",
6353
6467
  {
6354
6468
  "aria-hidden": "true",
@@ -6359,7 +6473,7 @@ var VirtualizedLayerTreeItems = ({
6359
6473
  );
6360
6474
  }
6361
6475
  renderedItems.push(
6362
- /* @__PURE__ */ jsx37(
6476
+ /* @__PURE__ */ jsx38(
6363
6477
  Layer,
6364
6478
  {
6365
6479
  childIsSelected: selectedPathIds.has(node.itemId),
@@ -6380,7 +6494,7 @@ var VirtualizedLayerTreeItems = ({
6380
6494
  const trailingGap = Math.max(totalSize - previousEnd, 0);
6381
6495
  if (trailingGap > 0) {
6382
6496
  renderedItems.push(
6383
- /* @__PURE__ */ jsx37(
6497
+ /* @__PURE__ */ jsx38(
6384
6498
  "li",
6385
6499
  {
6386
6500
  "aria-hidden": "true",
@@ -6390,8 +6504,8 @@ var VirtualizedLayerTreeItems = ({
6390
6504
  )
6391
6505
  );
6392
6506
  }
6393
- return /* @__PURE__ */ jsxs13("ul", { className: getClassName21(), ref: listRef, children: [
6394
- tree.items.length === 0 && /* @__PURE__ */ jsx37("div", { className: getClassName21("helper"), children: "empty" }),
6507
+ return /* @__PURE__ */ jsxs14("ul", { className: getClassName22(), ref: listRef, children: [
6508
+ tree.items.length === 0 && /* @__PURE__ */ jsx38("div", { className: getClassName22("helper"), children: "empty" }),
6395
6509
  renderedItems
6396
6510
  ] });
6397
6511
  };
@@ -6400,7 +6514,7 @@ var LayerTree = ({
6400
6514
  selectedPathIds,
6401
6515
  trees
6402
6516
  }) => {
6403
- return /* @__PURE__ */ jsx37(Fragment8, { children: trees.map((tree) => /* @__PURE__ */ jsx37(
6517
+ return /* @__PURE__ */ jsx38(Fragment8, { children: trees.map((tree) => /* @__PURE__ */ jsx38(
6404
6518
  LayerTreeZone,
6405
6519
  {
6406
6520
  depth: 0,
@@ -6425,7 +6539,7 @@ var findZonesForArea = (state, area) => {
6425
6539
 
6426
6540
  // components/Editor/components/Outline/index.tsx
6427
6541
  import { useShallow as useShallow7 } from "zustand/react/shallow";
6428
- import { jsx as jsx38 } from "react/jsx-runtime";
6542
+ import { jsx as jsx39 } from "react/jsx-runtime";
6429
6543
  var Outline = () => {
6430
6544
  const outlineOverride = useAppStore((s) => s.overrides.outline);
6431
6545
  const config = useAppStore((s) => s.config);
@@ -6458,7 +6572,7 @@ var Outline = () => {
6458
6572
  [config, nodes, rootZones, zones]
6459
6573
  );
6460
6574
  const Wrapper = useMemo15(() => outlineOverride || "div", [outlineOverride]);
6461
- return /* @__PURE__ */ jsx38(Wrapper, { children: /* @__PURE__ */ jsx38(
6575
+ return /* @__PURE__ */ jsx39(Wrapper, { children: /* @__PURE__ */ jsx39(
6462
6576
  LayerTree,
6463
6577
  {
6464
6578
  selectedId,
@@ -6470,16 +6584,16 @@ var Outline = () => {
6470
6584
 
6471
6585
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/plugins/outline/styles.module.css#css-module
6472
6586
  init_react_import();
6473
- var styles_module_default17 = { "OutlinePlugin": "_OutlinePlugin_q92j6_1" };
6587
+ var styles_module_default18 = { "OutlinePlugin": "_OutlinePlugin_q92j6_1" };
6474
6588
 
6475
6589
  // 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);
6590
+ import { jsx as jsx40 } from "react/jsx-runtime";
6591
+ var getClassName23 = get_class_name_factory_default("OutlinePlugin", styles_module_default18);
6478
6592
  var outlinePlugin = () => ({
6479
6593
  name: "outline",
6480
6594
  label: "Outline",
6481
- render: () => /* @__PURE__ */ jsx39("div", { className: getClassName22(), children: /* @__PURE__ */ jsx39(Outline, {}) }),
6482
- icon: /* @__PURE__ */ jsx39(Layers, {})
6595
+ render: () => /* @__PURE__ */ jsx40("div", { className: getClassName23(), children: /* @__PURE__ */ jsx40(Outline, {}) }),
6596
+ icon: /* @__PURE__ */ jsx40(Layers, {})
6483
6597
  });
6484
6598
 
6485
6599
  // plugins/fields/index.tsx
@@ -6490,7 +6604,7 @@ init_react_import();
6490
6604
 
6491
6605
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Breadcrumbs/styles.module.css#css-module
6492
6606
  init_react_import();
6493
- var styles_module_default18 = { "Breadcrumbs": "_Breadcrumbs_1cjxk_1", "Breadcrumbs-breadcrumb": "_Breadcrumbs-breadcrumb_1cjxk_10", "Breadcrumbs-breadcrumbLabel": "_Breadcrumbs-breadcrumbLabel_1cjxk_17" };
6607
+ var styles_module_default19 = { "Breadcrumbs": "_Breadcrumbs_1cjxk_1", "Breadcrumbs-breadcrumb": "_Breadcrumbs-breadcrumb_1cjxk_10", "Breadcrumbs-breadcrumbLabel": "_Breadcrumbs-breadcrumbLabel_1cjxk_17" };
6494
6608
 
6495
6609
  // lib/use-breadcrumbs.ts
6496
6610
  init_react_import();
@@ -6537,26 +6651,26 @@ var useBreadcrumbs = (renderCount) => {
6537
6651
  };
6538
6652
 
6539
6653
  // 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);
6654
+ import { jsx as jsx41, jsxs as jsxs15 } from "react/jsx-runtime";
6655
+ var getClassName24 = get_class_name_factory_default("Breadcrumbs", styles_module_default19);
6542
6656
  var Breadcrumbs = ({
6543
6657
  children,
6544
6658
  numParents = 1
6545
6659
  }) => {
6546
6660
  const setUi = useAppStore((s) => s.setUi);
6547
6661
  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(
6662
+ return /* @__PURE__ */ jsxs15("div", { className: getClassName24(), children: [
6663
+ breadcrumbs.map((breadcrumb, i) => /* @__PURE__ */ jsxs15("div", { className: getClassName24("breadcrumb"), children: [
6664
+ /* @__PURE__ */ jsx41(
6551
6665
  "button",
6552
6666
  {
6553
6667
  type: "button",
6554
- className: getClassName23("breadcrumbLabel"),
6668
+ className: getClassName24("breadcrumbLabel"),
6555
6669
  onClick: () => setUi({ itemSelector: breadcrumb.selector }),
6556
6670
  children: breadcrumb.label
6557
6671
  }
6558
6672
  ),
6559
- /* @__PURE__ */ jsx40(ChevronRight, { size: 14 })
6673
+ /* @__PURE__ */ jsx41(ChevronRight, { size: 14 })
6560
6674
  ] }, i)),
6561
6675
  children
6562
6676
  ] });
@@ -6567,23 +6681,23 @@ init_react_import();
6567
6681
 
6568
6682
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Fields/styles.module.css#css-module
6569
6683
  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" };
6684
+ 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
6685
 
6572
6686
  // components/Editor/components/Fields/index.tsx
6573
6687
  import {
6574
6688
  memo as memo8,
6575
- useCallback as useCallback15,
6689
+ useCallback as useCallback16,
6576
6690
  useContext as useContext12,
6577
6691
  useEffect as useEffect19,
6578
6692
  useMemo as useMemo17
6579
6693
  } from "react";
6580
6694
  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);
6695
+ import { Fragment as Fragment9, jsx as jsx42, jsxs as jsxs16 } from "react/jsx-runtime";
6696
+ var getClassName25 = get_class_name_factory_default("EditorFields", styles_module_default20);
6583
6697
  var DefaultFields = ({
6584
6698
  children
6585
6699
  }) => {
6586
- return /* @__PURE__ */ jsx41(Fragment9, { children });
6700
+ return /* @__PURE__ */ jsx42(Fragment9, { children });
6587
6701
  };
6588
6702
  var createOnChange = (fieldName, appStore) => (value, updatedUi) => __async(null, null, function* () {
6589
6703
  const { dispatch, state, selectedItem, resolveComponentData } = appStore.getState();
@@ -6644,7 +6758,7 @@ var FieldsChildInner = ({ fieldName }) => {
6644
6758
  })
6645
6759
  );
6646
6760
  const appStore = useAppStoreApi();
6647
- const onChange = useCallback15(createOnChange(fieldName, appStore), [
6761
+ const onChange = useCallback16(createOnChange(fieldName, appStore), [
6648
6762
  fieldName
6649
6763
  ]);
6650
6764
  const { visible = true } = field != null ? field : {};
@@ -6663,7 +6777,7 @@ var FieldsChildInner = ({ fieldName }) => {
6663
6777
  }, [appStore, fieldStore]);
6664
6778
  if (!field || !id || !visible) return null;
6665
6779
  if (field.type === "slot") return null;
6666
- return /* @__PURE__ */ jsx41("div", { className: getClassName24("field"), children: /* @__PURE__ */ jsx41(
6780
+ return /* @__PURE__ */ jsx42("div", { className: getClassName25("field"), children: /* @__PURE__ */ jsx42(
6667
6781
  AutoFieldPrivate,
6668
6782
  {
6669
6783
  field,
@@ -6681,7 +6795,7 @@ var FieldsChild = ({ fieldName }) => {
6681
6795
  const value = (_a = appStore.getState().getCurrentData().props) == null ? void 0 : _a[fieldName];
6682
6796
  return { [fieldName]: value };
6683
6797
  }, []);
6684
- return /* @__PURE__ */ jsx41(fieldContextStore.Provider, { value: initialValue, children: /* @__PURE__ */ jsx41(FieldsChildInner, { fieldName }) });
6798
+ return /* @__PURE__ */ jsx42(fieldContextStore.Provider, { value: initialValue, children: /* @__PURE__ */ jsx42(FieldsChildInner, { fieldName }) });
6685
6799
  };
6686
6800
  var FieldsChildMemo = memo8(FieldsChild);
6687
6801
  var GlobalSyncButton = () => {
@@ -6711,12 +6825,12 @@ var GlobalSyncButton = () => {
6711
6825
  });
6712
6826
  });
6713
6827
  const syncButtonClass = [
6714
- getClassName24("syncButton"),
6715
- isUnlinked ? styles_module_default19["EditorFields-syncButton--unlinked"] : null
6828
+ getClassName25("syncButton"),
6829
+ isUnlinked ? styles_module_default20["EditorFields-syncButton--unlinked"] : null
6716
6830
  ].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" })
6831
+ return /* @__PURE__ */ jsxs16("button", { type: "button", className: syncButtonClass, onClick, children: [
6832
+ /* @__PURE__ */ jsx42(Link, { size: 14 }),
6833
+ /* @__PURE__ */ jsx42("span", { children: isUnlinked ? "Link to shared" : "Linked to shared" })
6720
6834
  ] });
6721
6835
  };
6722
6836
  var FieldsInternal = ({ wrapFields = true }) => {
@@ -6744,19 +6858,19 @@ var FieldsInternal = ({ wrapFields = true }) => {
6744
6858
  );
6745
6859
  const isLoading = fieldsLoading || componentResolving;
6746
6860
  const Wrapper = useMemo17(() => overrides.fields || DefaultFields, [overrides]);
6747
- return /* @__PURE__ */ jsxs15(
6861
+ return /* @__PURE__ */ jsxs16(
6748
6862
  "form",
6749
6863
  {
6750
- className: getClassName24({ wrapFields }),
6864
+ className: getClassName25({ wrapFields }),
6751
6865
  onSubmit: (e) => {
6752
6866
  e.preventDefault();
6753
6867
  },
6754
6868
  children: [
6755
- /* @__PURE__ */ jsxs15(Wrapper, { isLoading, itemSelector, children: [
6756
- /* @__PURE__ */ jsx41(GlobalSyncButton, {}),
6757
- fieldNames.map((fieldName) => /* @__PURE__ */ jsx41(FieldsChildMemo, { fieldName }, fieldName))
6869
+ /* @__PURE__ */ jsxs16(Wrapper, { isLoading, itemSelector, children: [
6870
+ /* @__PURE__ */ jsx42(GlobalSyncButton, {}),
6871
+ fieldNames.map((fieldName) => /* @__PURE__ */ jsx42(FieldsChildMemo, { fieldName }, fieldName))
6758
6872
  ] }),
6759
- isLoading && /* @__PURE__ */ jsx41("div", { className: getClassName24("loadingOverlay"), children: /* @__PURE__ */ jsx41("div", { className: getClassName24("loadingOverlayInner"), children: /* @__PURE__ */ jsx41(Loader, { size: 16 }) }) })
6873
+ isLoading && /* @__PURE__ */ jsx42("div", { className: getClassName25("loadingOverlay"), children: /* @__PURE__ */ jsx42("div", { className: getClassName25("loadingOverlayInner"), children: /* @__PURE__ */ jsx42(Loader, { size: 16 }) }) })
6760
6874
  ]
6761
6875
  }
6762
6876
  );
@@ -6765,11 +6879,11 @@ var Fields = memo8(FieldsInternal);
6765
6879
 
6766
6880
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/plugins/fields/styles.module.css#css-module
6767
6881
  init_react_import();
6768
- var styles_module_default20 = { "FieldsPlugin": "_FieldsPlugin_262zt_1", "FieldsPlugin-header": "_FieldsPlugin-header_262zt_7" };
6882
+ var styles_module_default21 = { "FieldsPlugin": "_FieldsPlugin_262zt_1", "FieldsPlugin-header": "_FieldsPlugin-header_262zt_7" };
6769
6883
 
6770
6884
  // 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);
6885
+ import { jsx as jsx43, jsxs as jsxs17 } from "react/jsx-runtime";
6886
+ var getClassName26 = get_class_name_factory_default("FieldsPlugin", styles_module_default21);
6773
6887
  var CurrentTitle = () => {
6774
6888
  const label = useAppStore((s) => {
6775
6889
  var _a, _b;
@@ -6781,11 +6895,11 @@ var CurrentTitle = () => {
6781
6895
  var fieldsPlugin = ({ desktopSideBar = "right" } = {}) => ({
6782
6896
  name: "fields",
6783
6897
  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, {})
6898
+ render: () => /* @__PURE__ */ jsxs17("div", { className: getClassName26(), children: [
6899
+ /* @__PURE__ */ jsx43("div", { className: getClassName26("header"), children: /* @__PURE__ */ jsx43(Breadcrumbs, { numParents: 2, children: /* @__PURE__ */ jsx43(CurrentTitle, {}) }) }),
6900
+ /* @__PURE__ */ jsx43(Fields, {})
6787
6901
  ] }),
6788
- icon: /* @__PURE__ */ jsx42(RectangleEllipsis, {}),
6902
+ icon: /* @__PURE__ */ jsx43(RectangleEllipsis, {}),
6789
6903
  mobileOnly: desktopSideBar === "right"
6790
6904
  });
6791
6905
 
@@ -6793,17 +6907,17 @@ var fieldsPlugin = ({ desktopSideBar = "right" } = {}) => ({
6793
6907
  init_react_import();
6794
6908
  import {
6795
6909
  createContext as createContext8,
6796
- useCallback as useCallback24,
6910
+ useCallback as useCallback25,
6797
6911
  useContext as useContext15,
6798
6912
  useEffect as useEffect26,
6799
6913
  useMemo as useMemo24,
6800
- useRef as useRef18,
6914
+ useRef as useRef19,
6801
6915
  useState as useState24
6802
6916
  } from "react";
6803
6917
 
6804
6918
  // components/Editor/components/Preview/index.tsx
6805
6919
  init_react_import();
6806
- import { useCallback as useCallback16, useEffect as useEffect21, useRef as useRef11, useMemo as useMemo18 } from "react";
6920
+ import { useCallback as useCallback17, useEffect as useEffect21, useRef as useRef12, useMemo as useMemo18 } from "react";
6807
6921
 
6808
6922
  // components/AutoFrame/index.tsx
6809
6923
  init_react_import();
@@ -6815,7 +6929,7 @@ import {
6815
6929
  } from "react";
6816
6930
  import hash from "object-hash";
6817
6931
  import { createPortal as createPortal3 } from "react-dom";
6818
- import { Fragment as Fragment10, jsx as jsx43 } from "react/jsx-runtime";
6932
+ import { Fragment as Fragment10, jsx as jsx44 } from "react/jsx-runtime";
6819
6933
  var styleSelector = 'style, link[rel="stylesheet"]';
6820
6934
  var collectStyles = (doc) => {
6821
6935
  const collected = [];
@@ -7032,7 +7146,7 @@ var CopyHostStyles = ({
7032
7146
  observer.disconnect();
7033
7147
  };
7034
7148
  }, []);
7035
- return /* @__PURE__ */ jsx43(Fragment10, { children });
7149
+ return /* @__PURE__ */ jsx44(Fragment10, { children });
7036
7150
  };
7037
7151
  var autoFrameContext = createContext6({});
7038
7152
  var useFrame = () => useContext13(autoFrameContext);
@@ -7079,7 +7193,7 @@ function AutoFrame(_a) {
7079
7193
  }
7080
7194
  }
7081
7195
  }, [frameRef, loaded, stylesLoaded]);
7082
- return /* @__PURE__ */ jsx43(
7196
+ return /* @__PURE__ */ jsx44(
7083
7197
  "iframe",
7084
7198
  __spreadProps(__spreadValues({}, props), {
7085
7199
  className,
@@ -7089,7 +7203,7 @@ function AutoFrame(_a) {
7089
7203
  onLoad: () => {
7090
7204
  setLoaded(true);
7091
7205
  },
7092
- children: /* @__PURE__ */ jsx43(autoFrameContext.Provider, { value: ctx, children: loaded && mountTarget && /* @__PURE__ */ jsx43(
7206
+ children: /* @__PURE__ */ jsx44(autoFrameContext.Provider, { value: ctx, children: loaded && mountTarget && /* @__PURE__ */ jsx44(
7093
7207
  CopyHostStyles,
7094
7208
  {
7095
7209
  debug,
@@ -7105,11 +7219,11 @@ var AutoFrame_default = AutoFrame;
7105
7219
 
7106
7220
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Preview/styles.module.css#css-module
7107
7221
  init_react_import();
7108
- var styles_module_default21 = { "EditorPreview": "_EditorPreview_xou64_1", "EditorPreview-frame": "_EditorPreview-frame_xou64_6" };
7222
+ var styles_module_default22 = { "EditorPreview": "_EditorPreview_xou64_1", "EditorPreview-frame": "_EditorPreview-frame_xou64_6" };
7109
7223
 
7110
7224
  // 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);
7225
+ import { Fragment as Fragment11, jsx as jsx45 } from "react/jsx-runtime";
7226
+ var getClassName27 = get_class_name_factory_default("EditorPreview", styles_module_default22);
7113
7227
  var Preview2 = ({ id = "editor-preview" }) => {
7114
7228
  const dispatch = useAppStore((s) => s.dispatch);
7115
7229
  const root = useAppStore((s) => s.state.data.root);
@@ -7121,7 +7235,7 @@ var Preview2 = ({ id = "editor-preview" }) => {
7121
7235
  const renderData = useAppStore(
7122
7236
  (s) => s.state.ui.previewMode === "edit" ? null : s.state.data
7123
7237
  );
7124
- const Page = useCallback16(
7238
+ const Page = useCallback17(
7125
7239
  (pageProps) => {
7126
7240
  var _a, _b, _c, _d;
7127
7241
  const propsWithSlots = useSlots(
@@ -7135,14 +7249,14 @@ var Preview2 = ({ id = "editor-preview" }) => {
7135
7249
  );
7136
7250
  return ((_c = config.root) == null ? void 0 : _c.render) ? (_d = config.root) == null ? void 0 : _d.render(__spreadValues(__spreadValues({
7137
7251
  id: "editor-root"
7138
- }, propsWithSlots), richtextProps)) : /* @__PURE__ */ jsx44(Fragment11, { children: propsWithSlots.children });
7252
+ }, propsWithSlots), richtextProps)) : /* @__PURE__ */ jsx45(Fragment11, { children: propsWithSlots.children });
7139
7253
  },
7140
7254
  [config]
7141
7255
  );
7142
7256
  const Frame = useMemo18(() => overrides.iframe, [overrides]);
7143
7257
  const rootProps = root.props || root;
7144
- const ref = useRef11(null);
7145
- const inner = !renderData ? /* @__PURE__ */ jsx44(
7258
+ const ref = useRef12(null);
7259
+ const inner = !renderData ? /* @__PURE__ */ jsx45(
7146
7260
  Page,
7147
7261
  __spreadProps(__spreadValues({}, rootProps), {
7148
7262
  editor: {
@@ -7152,18 +7266,18 @@ var Preview2 = ({ id = "editor-preview" }) => {
7152
7266
  metadata
7153
7267
  },
7154
7268
  editMode: true,
7155
- children: /* @__PURE__ */ jsx44(DropZonePure, { zone: rootDroppableId })
7269
+ children: /* @__PURE__ */ jsx45(DropZonePure, { zone: rootDroppableId })
7156
7270
  })
7157
- ) : /* @__PURE__ */ jsx44(Render, { data: renderData, config, metadata });
7271
+ ) : /* @__PURE__ */ jsx45(Render, { data: renderData, config, metadata });
7158
7272
  useEffect21(() => {
7159
7273
  if (!iframe.enabled) {
7160
7274
  setStatus("READY");
7161
7275
  }
7162
7276
  }, [iframe.enabled]);
7163
- return /* @__PURE__ */ jsx44(
7277
+ return /* @__PURE__ */ jsx45(
7164
7278
  "div",
7165
7279
  {
7166
- className: getClassName26(),
7280
+ className: getClassName27(),
7167
7281
  id,
7168
7282
  "data-editor-preview": true,
7169
7283
  onClick: (e) => {
@@ -7172,11 +7286,11 @@ var Preview2 = ({ id = "editor-preview" }) => {
7172
7286
  dispatch({ type: "setUi", ui: { itemSelector: null } });
7173
7287
  }
7174
7288
  },
7175
- children: iframe.enabled ? /* @__PURE__ */ jsx44(
7289
+ children: iframe.enabled ? /* @__PURE__ */ jsx45(
7176
7290
  AutoFrame_default,
7177
7291
  {
7178
7292
  id: "preview-frame",
7179
- className: getClassName26("frame"),
7293
+ className: getClassName27("frame"),
7180
7294
  "data-rfd-iframe": true,
7181
7295
  onReady: () => {
7182
7296
  setStatus("READY");
@@ -7185,18 +7299,18 @@ var Preview2 = ({ id = "editor-preview" }) => {
7185
7299
  setStatus("MOUNTED");
7186
7300
  },
7187
7301
  frameRef: ref,
7188
- children: /* @__PURE__ */ jsx44(autoFrameContext.Consumer, { children: ({ document: document2 }) => {
7302
+ children: /* @__PURE__ */ jsx45(autoFrameContext.Consumer, { children: ({ document: document2 }) => {
7189
7303
  if (Frame) {
7190
- return /* @__PURE__ */ jsx44(Frame, { document: document2, children: inner });
7304
+ return /* @__PURE__ */ jsx45(Frame, { document: document2, children: inner });
7191
7305
  }
7192
7306
  return inner;
7193
7307
  } })
7194
7308
  }
7195
- ) : /* @__PURE__ */ jsx44(
7309
+ ) : /* @__PURE__ */ jsx45(
7196
7310
  "div",
7197
7311
  {
7198
7312
  id: "preview-frame",
7199
- className: getClassName26("frame"),
7313
+ className: getClassName27("frame"),
7200
7314
  ref,
7201
7315
  "data-editor-entry": true,
7202
7316
  children: inner
@@ -7304,16 +7418,16 @@ function splitGlobals(data, config) {
7304
7418
  // components/Editor/components/Layout/index.tsx
7305
7419
  init_react_import();
7306
7420
  import {
7307
- useCallback as useCallback23,
7421
+ useCallback as useCallback24,
7308
7422
  useEffect as useEffect25,
7309
7423
  useMemo as useMemo23,
7310
- useRef as useRef17,
7424
+ useRef as useRef18,
7311
7425
  useState as useState23
7312
7426
  } from "react";
7313
7427
 
7314
7428
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Layout/styles.module.css#css-module
7315
7429
  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" };
7430
+ 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
7431
 
7318
7432
  // lib/use-inject-css.ts
7319
7433
  init_react_import();
@@ -7344,15 +7458,15 @@ var useInjectGlobalCss = (iframeEnabled) => {
7344
7458
 
7345
7459
  // components/DefaultOverride/index.tsx
7346
7460
  init_react_import();
7347
- import { Fragment as Fragment12, jsx as jsx45 } from "react/jsx-runtime";
7348
- var DefaultOverride = ({ children }) => /* @__PURE__ */ jsx45(Fragment12, { children });
7461
+ import { Fragment as Fragment12, jsx as jsx46 } from "react/jsx-runtime";
7462
+ var DefaultOverride = ({ children }) => /* @__PURE__ */ jsx46(Fragment12, { children });
7349
7463
 
7350
7464
  // lib/use-preview-mode-hotkeys.ts
7351
7465
  init_react_import();
7352
- import { useCallback as useCallback17 } from "react";
7466
+ import { useCallback as useCallback18 } from "react";
7353
7467
  var usePreviewModeHotkeys = () => {
7354
7468
  const appStore = useAppStoreApi();
7355
- const toggleInteractive = useCallback17(() => {
7469
+ const toggleInteractive = useCallback18(() => {
7356
7470
  const dispatch = appStore.getState().dispatch;
7357
7471
  dispatch({
7358
7472
  type: "setUi",
@@ -7370,11 +7484,11 @@ init_react_import();
7370
7484
 
7371
7485
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/SidebarSection/styles.module.css#css-module
7372
7486
  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" };
7487
+ 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
7488
 
7375
7489
  // 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);
7490
+ import { jsx as jsx47, jsxs as jsxs18 } from "react/jsx-runtime";
7491
+ var getClassName28 = get_class_name_factory_default("SidebarSection", styles_module_default24);
7378
7492
  var SidebarSection = ({
7379
7493
  children,
7380
7494
  title,
@@ -7383,29 +7497,29 @@ var SidebarSection = ({
7383
7497
  noBorderTop,
7384
7498
  isLoading
7385
7499
  }) => {
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 }) })
7500
+ return /* @__PURE__ */ jsxs18("div", { className: getClassName28({ noBorderTop }), style: { background }, children: [
7501
+ /* @__PURE__ */ jsx47("div", { className: getClassName28("title"), children: /* @__PURE__ */ jsxs18("div", { className: getClassName28("breadcrumbs"), children: [
7502
+ showBreadcrumbs && /* @__PURE__ */ jsx47(Breadcrumbs, {}),
7503
+ /* @__PURE__ */ jsx47("div", { className: getClassName28("heading"), children: /* @__PURE__ */ jsx47(Heading, { rank: "2", size: "xs", children: title }) })
7390
7504
  ] }) }),
7391
- /* @__PURE__ */ jsx46("div", { className: getClassName27("content"), children }),
7392
- isLoading && /* @__PURE__ */ jsx46("div", { className: getClassName27("loadingOverlay"), children: /* @__PURE__ */ jsx46(Loader, { size: 32 }) })
7505
+ /* @__PURE__ */ jsx47("div", { className: getClassName28("content"), children }),
7506
+ isLoading && /* @__PURE__ */ jsx47("div", { className: getClassName28("loadingOverlay"), children: /* @__PURE__ */ jsx47(Loader, { size: 32 }) })
7393
7507
  ] });
7394
7508
  };
7395
7509
 
7396
7510
  // components/Editor/components/Canvas/index.tsx
7397
7511
  init_react_import();
7398
7512
  import {
7399
- useCallback as useCallback18,
7513
+ useCallback as useCallback19,
7400
7514
  useEffect as useEffect23,
7401
7515
  useMemo as useMemo22,
7402
- useRef as useRef14,
7516
+ useRef as useRef15,
7403
7517
  useState as useState21
7404
7518
  } from "react";
7405
7519
 
7406
7520
  // components/BrowserBar/index.tsx
7407
7521
  init_react_import();
7408
- import { useMemo as useMemo20, useRef as useRef12, useState as useState20 } from "react";
7522
+ import { useMemo as useMemo20, useRef as useRef13, useState as useState20 } from "react";
7409
7523
 
7410
7524
  // components/ui/Combobox/index.tsx
7411
7525
  init_react_import();
@@ -7413,11 +7527,11 @@ import { Combobox as ComboboxPrimitive } from "@base-ui/react";
7413
7527
 
7414
7528
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/ui/Combobox/styles.module.css#css-module
7415
7529
  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" };
7530
+ 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
7531
 
7418
7532
  // 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);
7533
+ import { jsx as jsx48, jsxs as jsxs19 } from "react/jsx-runtime";
7534
+ var getClassName29 = get_class_name_factory_default("EditorCombobox", styles_module_default25);
7421
7535
  var join = (...values) => values.filter(Boolean).join(" ");
7422
7536
  var mergeClassName = (base, override) => {
7423
7537
  if (!override) return base;
@@ -7433,11 +7547,11 @@ function ComboboxInput(_a) {
7433
7547
  } = _b, props = __objRest(_b, [
7434
7548
  "className"
7435
7549
  ]);
7436
- return /* @__PURE__ */ jsx47(
7550
+ return /* @__PURE__ */ jsx48(
7437
7551
  ComboboxPrimitive.Input,
7438
7552
  __spreadValues({
7439
7553
  "data-slot": "combobox-input",
7440
- className: mergeClassName(getClassName28("input"), className)
7554
+ className: mergeClassName(getClassName29("input"), className)
7441
7555
  }, props)
7442
7556
  );
7443
7557
  }
@@ -7457,19 +7571,19 @@ function ComboboxContent(_a) {
7457
7571
  "alignOffset",
7458
7572
  "children"
7459
7573
  ]);
7460
- return /* @__PURE__ */ jsx47(ComboboxPrimitive.Portal, { children: /* @__PURE__ */ jsx47(
7574
+ return /* @__PURE__ */ jsx48(ComboboxPrimitive.Portal, { children: /* @__PURE__ */ jsx48(
7461
7575
  ComboboxPrimitive.Positioner,
7462
7576
  {
7463
7577
  side,
7464
7578
  sideOffset,
7465
7579
  align,
7466
7580
  alignOffset,
7467
- className: getClassName28("positioner"),
7468
- children: /* @__PURE__ */ jsx47(
7581
+ className: getClassName29("positioner"),
7582
+ children: /* @__PURE__ */ jsx48(
7469
7583
  ComboboxPrimitive.Popup,
7470
7584
  __spreadProps(__spreadValues({
7471
7585
  "data-slot": "combobox-content",
7472
- className: mergeClassName(getClassName28("content"), className)
7586
+ className: mergeClassName(getClassName29("content"), className)
7473
7587
  }, props), {
7474
7588
  children
7475
7589
  })
@@ -7483,11 +7597,11 @@ function ComboboxList(_a) {
7483
7597
  } = _b, props = __objRest(_b, [
7484
7598
  "className"
7485
7599
  ]);
7486
- return /* @__PURE__ */ jsx47(
7600
+ return /* @__PURE__ */ jsx48(
7487
7601
  ComboboxPrimitive.List,
7488
7602
  __spreadValues({
7489
7603
  "data-slot": "combobox-list",
7490
- className: mergeClassName(getClassName28("list"), className)
7604
+ className: mergeClassName(getClassName29("list"), className)
7491
7605
  }, props)
7492
7606
  );
7493
7607
  }
@@ -7499,14 +7613,14 @@ function ComboboxItem(_a) {
7499
7613
  "className",
7500
7614
  "children"
7501
7615
  ]);
7502
- return /* @__PURE__ */ jsxs18(
7616
+ return /* @__PURE__ */ jsxs19(
7503
7617
  ComboboxPrimitive.Item,
7504
7618
  __spreadProps(__spreadValues({
7505
7619
  "data-slot": "combobox-item",
7506
- className: mergeClassName(getClassName28("item"), className)
7620
+ className: mergeClassName(getClassName29("item"), className)
7507
7621
  }, props), {
7508
7622
  children: [
7509
- /* @__PURE__ */ jsx47("span", { className: getClassName28("itemIndicator"), children: /* @__PURE__ */ jsx47(ComboboxPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx47(Check, { size: 14 }) }) }),
7623
+ /* @__PURE__ */ jsx48("span", { className: getClassName29("itemIndicator"), children: /* @__PURE__ */ jsx48(ComboboxPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx48(Check, { size: 14 }) }) }),
7510
7624
  children
7511
7625
  ]
7512
7626
  })
@@ -7518,27 +7632,27 @@ function ComboboxEmpty(_a) {
7518
7632
  } = _b, props = __objRest(_b, [
7519
7633
  "className"
7520
7634
  ]);
7521
- return /* @__PURE__ */ jsx47(
7635
+ return /* @__PURE__ */ jsx48(
7522
7636
  ComboboxPrimitive.Empty,
7523
7637
  __spreadValues({
7524
7638
  "data-slot": "combobox-empty",
7525
- className: mergeClassName(getClassName28("empty"), className)
7639
+ className: mergeClassName(getClassName29("empty"), className)
7526
7640
  }, props)
7527
7641
  );
7528
7642
  }
7529
7643
 
7530
7644
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/BrowserBar/styles.module.css#css-module
7531
7645
  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" };
7646
+ 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
7647
 
7534
7648
  // components/BrowserBar/index.tsx
7535
- import { jsx as jsx48, jsxs as jsxs19 } from "react/jsx-runtime";
7649
+ import { jsx as jsx49, jsxs as jsxs20 } from "react/jsx-runtime";
7536
7650
  var normalizeRoute = (raw) => {
7537
7651
  const trimmed = raw.trim();
7538
7652
  if (!trimmed) return trimmed;
7539
7653
  return trimmed.startsWith("/") ? trimmed : `/${trimmed}`;
7540
7654
  };
7541
- var getClassName29 = get_class_name_factory_default("BrowserBar", styles_module_default25);
7655
+ var getClassName30 = get_class_name_factory_default("BrowserBar", styles_module_default26);
7542
7656
  var DEVICE_VIEWPORTS = {
7543
7657
  desktop: { width: "100%", height: "auto", icon: "Monitor", label: "Desktop" },
7544
7658
  mobile: { width: 360, height: "auto", icon: "Smartphone", label: "Mobile" }
@@ -7574,7 +7688,7 @@ var BrowserBar = ({
7574
7688
  };
7575
7689
  const showRoutePicker = !!routes && currentPath !== void 0 && !!onRouteChange;
7576
7690
  const [inputValue, setInputValue] = useState20(currentPath != null ? currentPath : "");
7577
- const lastSyncedPath = useRef12(currentPath);
7691
+ const lastSyncedPath = useRef13(currentPath);
7578
7692
  if (lastSyncedPath.current !== currentPath) {
7579
7693
  lastSyncedPath.current = currentPath;
7580
7694
  setInputValue(currentPath != null ? currentPath : "");
@@ -7584,8 +7698,8 @@ var BrowserBar = ({
7584
7698
  if (!next || next === currentPath) return;
7585
7699
  void (onRouteChange == null ? void 0 : onRouteChange(next));
7586
7700
  };
7587
- return /* @__PURE__ */ jsxs19("div", { className: getClassName29(), children: [
7588
- showRoutePicker ? /* @__PURE__ */ jsxs19(
7701
+ return /* @__PURE__ */ jsxs20("div", { className: getClassName30(), children: [
7702
+ showRoutePicker ? /* @__PURE__ */ jsxs20(
7589
7703
  Combobox,
7590
7704
  {
7591
7705
  items: routes.map((r) => r.path),
@@ -7597,20 +7711,20 @@ var BrowserBar = ({
7597
7711
  onInputValueChange: (next) => setInputValue(next),
7598
7712
  autoHighlight: false,
7599
7713
  children: [
7600
- /* @__PURE__ */ jsxs19(
7714
+ /* @__PURE__ */ jsxs20(
7601
7715
  "form",
7602
7716
  {
7603
- className: getClassName29("urlTrigger"),
7717
+ className: getClassName30("urlTrigger"),
7604
7718
  onSubmit: (event) => {
7605
7719
  event.preventDefault();
7606
7720
  submit(inputValue);
7607
7721
  },
7608
7722
  children: [
7609
- /* @__PURE__ */ jsx48(Globe, { className: getClassName29("urlIcon"), size: 14 }),
7610
- /* @__PURE__ */ jsx48(
7723
+ /* @__PURE__ */ jsx49(Globe, { className: getClassName30("urlIcon"), size: 14 }),
7724
+ /* @__PURE__ */ jsx49(
7611
7725
  ComboboxInput,
7612
7726
  {
7613
- className: getClassName29("urlInput"),
7727
+ className: getClassName30("urlInput"),
7614
7728
  placeholder: "/",
7615
7729
  spellCheck: false,
7616
7730
  autoCorrect: "off",
@@ -7620,39 +7734,39 @@ var BrowserBar = ({
7620
7734
  ]
7621
7735
  }
7622
7736
  ),
7623
- /* @__PURE__ */ jsxs19(ComboboxContent, { children: [
7624
- /* @__PURE__ */ jsx48(ComboboxEmpty, { children: "Press Enter to go to this path" }),
7625
- /* @__PURE__ */ jsx48(ComboboxList, { children: (path) => {
7737
+ /* @__PURE__ */ jsxs20(ComboboxContent, { children: [
7738
+ /* @__PURE__ */ jsx49(ComboboxEmpty, { children: "Press Enter to go to this path" }),
7739
+ /* @__PURE__ */ jsx49(ComboboxList, { children: (path) => {
7626
7740
  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
7741
+ return /* @__PURE__ */ jsxs20(ComboboxItem, { value: path, children: [
7742
+ /* @__PURE__ */ jsx49("span", { className: getClassName30("itemPath"), children: path }),
7743
+ (route == null ? void 0 : route.title) ? /* @__PURE__ */ jsx49("span", { className: getClassName30("itemTitle"), children: route.title }) : null
7630
7744
  ] }, path);
7631
7745
  } })
7632
7746
  ] })
7633
7747
  ]
7634
7748
  }
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: "/" })
7749
+ ) : /* @__PURE__ */ jsxs20("div", { className: getClassName30("urlTrigger"), children: [
7750
+ /* @__PURE__ */ jsx49(Globe, { className: getClassName30("urlIcon"), size: 14 }),
7751
+ /* @__PURE__ */ jsx49("span", { className: getClassName30("urlText"), children: "/" })
7638
7752
  ] }),
7639
- /* @__PURE__ */ jsxs19("div", { className: getClassName29("actions"), children: [
7640
- /* @__PURE__ */ jsx48(
7753
+ /* @__PURE__ */ jsxs20("div", { className: getClassName30("actions"), children: [
7754
+ /* @__PURE__ */ jsx49(
7641
7755
  IconButton,
7642
7756
  {
7643
7757
  type: "button",
7644
7758
  title: activeDevice === "desktop" ? "Switch to mobile viewport" : "Switch to desktop viewport",
7645
7759
  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 }) })
7760
+ children: /* @__PURE__ */ jsx49("span", { className: getClassName30("deviceIcon"), children: activeDevice === "desktop" ? /* @__PURE__ */ jsx49(Monitor, { size: 16 }) : /* @__PURE__ */ jsx49(Smartphone, { size: 16 }) })
7647
7761
  }
7648
7762
  ),
7649
- /* @__PURE__ */ jsx48(
7763
+ /* @__PURE__ */ jsx49(
7650
7764
  IconButton,
7651
7765
  {
7652
7766
  type: "button",
7653
7767
  title: isFullScreen ? "Exit full screen" : "Enter full screen",
7654
7768
  onClick: toggleFullScreen,
7655
- children: /* @__PURE__ */ jsx48("span", { className: getClassName29("deviceIcon"), children: isFullScreen ? /* @__PURE__ */ jsx48(Minimize, { size: 16 }) : /* @__PURE__ */ jsx48(Maximize, { size: 16 }) })
7769
+ children: /* @__PURE__ */ jsx49("span", { className: getClassName30("deviceIcon"), children: isFullScreen ? /* @__PURE__ */ jsx49(Minimize, { size: 16 }) : /* @__PURE__ */ jsx49(Maximize, { size: 16 }) })
7656
7770
  }
7657
7771
  )
7658
7772
  ] })
@@ -7661,7 +7775,7 @@ var BrowserBar = ({
7661
7775
 
7662
7776
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Canvas/styles.module.css#css-module
7663
7777
  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" };
7778
+ 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
7779
 
7666
7780
  // components/Editor/components/Canvas/index.tsx
7667
7781
  import { useShallow as useShallow9 } from "zustand/react/shallow";
@@ -7671,22 +7785,22 @@ init_react_import();
7671
7785
  import {
7672
7786
  createContext as createContext7,
7673
7787
  useContext as useContext14,
7674
- useRef as useRef13,
7788
+ useRef as useRef14,
7675
7789
  useMemo as useMemo21
7676
7790
  } from "react";
7677
- import { jsx as jsx49 } from "react/jsx-runtime";
7791
+ import { jsx as jsx50 } from "react/jsx-runtime";
7678
7792
  var FrameContext = createContext7(null);
7679
7793
  var FrameProvider = ({
7680
7794
  children
7681
7795
  }) => {
7682
- const frameRef = useRef13(null);
7796
+ const frameRef = useRef14(null);
7683
7797
  const value = useMemo21(
7684
7798
  () => ({
7685
7799
  frameRef
7686
7800
  }),
7687
7801
  []
7688
7802
  );
7689
- return /* @__PURE__ */ jsx49(FrameContext.Provider, { value, children });
7803
+ return /* @__PURE__ */ jsx50(FrameContext.Provider, { value, children });
7690
7804
  };
7691
7805
  var useCanvasFrame = () => {
7692
7806
  const context = useContext14(FrameContext);
@@ -7697,8 +7811,8 @@ var useCanvasFrame = () => {
7697
7811
  };
7698
7812
 
7699
7813
  // 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);
7814
+ import { Fragment as Fragment13, jsx as jsx51, jsxs as jsxs21 } from "react/jsx-runtime";
7815
+ var getClassName31 = get_class_name_factory_default("EditorCanvas", styles_module_default27);
7702
7816
  var ZOOM_STEP = 0.15;
7703
7817
  var MIN_ZOOM = 0.25;
7704
7818
  var MAX_ZOOM = 3;
@@ -7738,16 +7852,16 @@ var Canvas = () => {
7738
7852
  const zoomOut = () => setCanvasZoom((z) => Math.max(z - ZOOM_STEP, MIN_ZOOM));
7739
7853
  const resetZoom = () => setCanvasZoom(1);
7740
7854
  const [showTransition, setShowTransition] = useState21(false);
7741
- const isResizingRef = useRef14(false);
7855
+ const isResizingRef = useRef15(false);
7742
7856
  const defaultRender = useMemo22(() => {
7743
- const EditorDefault = ({ children }) => /* @__PURE__ */ jsx50(Fragment13, { children });
7857
+ const EditorDefault = ({ children }) => /* @__PURE__ */ jsx51(Fragment13, { children });
7744
7858
  return EditorDefault;
7745
7859
  }, []);
7746
7860
  const CustomPreview = useMemo22(
7747
7861
  () => overrides.preview || defaultRender,
7748
7862
  [overrides]
7749
7863
  );
7750
- const getFrameDimensions = useCallback18(() => {
7864
+ const getFrameDimensions = useCallback19(() => {
7751
7865
  if (frameRef.current) {
7752
7866
  const frame = frameRef.current;
7753
7867
  const box = getBox(frame);
@@ -7768,8 +7882,8 @@ var Canvas = () => {
7768
7882
  }, 500);
7769
7883
  }, []);
7770
7884
  const appStoreApi = useAppStoreApi();
7771
- const autoSelectingRef = useRef14(true);
7772
- const pickClosestViewport = useCallback18(() => {
7885
+ const autoSelectingRef = useRef15(true);
7886
+ const pickClosestViewport = useCallback19(() => {
7773
7887
  var _a2, _b2;
7774
7888
  if (typeof window === "undefined") return null;
7775
7889
  const viewportWidth = window.innerWidth;
@@ -7862,10 +7976,10 @@ var Canvas = () => {
7862
7976
  appStoreApi,
7863
7977
  setUi
7864
7978
  ]);
7865
- return /* @__PURE__ */ jsx50(
7979
+ return /* @__PURE__ */ jsx51(
7866
7980
  "div",
7867
7981
  {
7868
- className: getClassName30({
7982
+ className: getClassName31({
7869
7983
  ready: status === "READY" || !iframe.enabled || !iframe.waitForStyles,
7870
7984
  showLoader,
7871
7985
  fullScreen: fullScreenCanvas
@@ -7880,16 +7994,16 @@ var Canvas = () => {
7880
7994
  });
7881
7995
  }
7882
7996
  },
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 }) })
7997
+ children: /* @__PURE__ */ jsxs21("div", { className: getClassName31("inner"), ref: frameRef, children: [
7998
+ !disableZoomControls && /* @__PURE__ */ jsxs21("div", { className: getClassName31("zoomControls"), children: [
7999
+ /* @__PURE__ */ jsx51(IconButton, { type: "button", title: "Zoom out", onClick: zoomOut, children: /* @__PURE__ */ jsx51(Minus, { size: 14 }) }),
8000
+ /* @__PURE__ */ jsx51(IconButton, { type: "button", title: "Reset zoom", onClick: resetZoom, children: /* @__PURE__ */ jsx51(RotateCcw, { size: 14 }) }),
8001
+ /* @__PURE__ */ jsx51(IconButton, { type: "button", title: "Zoom in", onClick: zoomIn, children: /* @__PURE__ */ jsx51(Plus, { size: 14 }) })
7888
8002
  ] }),
7889
- /* @__PURE__ */ jsxs20(
8003
+ /* @__PURE__ */ jsxs21(
7890
8004
  "div",
7891
8005
  {
7892
- className: getClassName30("rootColumn"),
8006
+ className: getClassName31("rootColumn"),
7893
8007
  style: {
7894
8008
  width: iframe.enabled ? viewports.current.width : "100%",
7895
8009
  transform: disableZoomControls ? void 0 : `scale(${canvasZoom})`,
@@ -7897,7 +8011,7 @@ var Canvas = () => {
7897
8011
  transition: showTransition ? `width ${TRANSITION_DURATION}ms ease-out, transform ${TRANSITION_DURATION}ms ease-out` : disableZoomControls ? void 0 : "transform 150ms ease-out"
7898
8012
  },
7899
8013
  children: [
7900
- iframe.enabled && /* @__PURE__ */ jsx50("div", { className: getClassName30("browserBar"), children: /* @__PURE__ */ jsx50(
8014
+ iframe.enabled && /* @__PURE__ */ jsx51("div", { className: getClassName31("browserBar"), children: /* @__PURE__ */ jsx51(
7901
8015
  BrowserBar,
7902
8016
  {
7903
8017
  onViewportChange: (viewport) => {
@@ -7914,23 +8028,23 @@ var Canvas = () => {
7914
8028
  }
7915
8029
  }
7916
8030
  ) }),
7917
- /* @__PURE__ */ jsx50(
8031
+ /* @__PURE__ */ jsx51(
7918
8032
  "div",
7919
8033
  {
7920
- className: getClassName30("root"),
8034
+ className: getClassName31("root"),
7921
8035
  suppressHydrationWarning: true,
7922
8036
  id: "editor-canvas-root",
7923
8037
  onTransitionEnd: () => {
7924
8038
  setShowTransition(false);
7925
8039
  isResizingRef.current = false;
7926
8040
  },
7927
- children: /* @__PURE__ */ jsx50(CustomPreview, { children: /* @__PURE__ */ jsx50(Preview2, {}) })
8041
+ children: /* @__PURE__ */ jsx51(CustomPreview, { children: /* @__PURE__ */ jsx51(Preview2, {}) })
7928
8042
  }
7929
8043
  )
7930
8044
  ]
7931
8045
  }
7932
8046
  ),
7933
- /* @__PURE__ */ jsx50("div", { className: getClassName30("loader"), children: /* @__PURE__ */ jsx50(Loader, { size: 24 }) })
8047
+ /* @__PURE__ */ jsx51("div", { className: getClassName31("loader"), children: /* @__PURE__ */ jsx51(Loader, { size: 24 }) })
7934
8048
  ] })
7935
8049
  }
7936
8050
  );
@@ -7938,10 +8052,10 @@ var Canvas = () => {
7938
8052
 
7939
8053
  // lib/use-sidebar-resize.ts
7940
8054
  init_react_import();
7941
- import { useCallback as useCallback19, useEffect as useEffect24, useRef as useRef15, useState as useState22 } from "react";
8055
+ import { useCallback as useCallback20, useEffect as useEffect24, useRef as useRef16, useState as useState22 } from "react";
7942
8056
  function useSidebarResize(position, dispatch) {
7943
8057
  const [width, setWidth] = useState22(null);
7944
- const sidebarRef = useRef15(null);
8058
+ const sidebarRef = useRef16(null);
7945
8059
  const storeWidth = useAppStore(
7946
8060
  (s) => position === "left" ? s.state.ui.leftSideBarWidth : s.state.ui.rightSideBarWidth
7947
8061
  );
@@ -7975,7 +8089,7 @@ function useSidebarResize(position, dispatch) {
7975
8089
  setWidth(storeWidth);
7976
8090
  }
7977
8091
  }, [storeWidth]);
7978
- const handleResizeEnd = useCallback19(
8092
+ const handleResizeEnd = useCallback20(
7979
8093
  (width2) => {
7980
8094
  dispatch({
7981
8095
  type: "setUi",
@@ -8022,26 +8136,26 @@ init_react_import();
8022
8136
 
8023
8137
  // components/Editor/components/ResizeHandle/index.tsx
8024
8138
  init_react_import();
8025
- import { useCallback as useCallback20, useRef as useRef16 } from "react";
8139
+ import { useCallback as useCallback21, useRef as useRef17 } from "react";
8026
8140
 
8027
8141
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/ResizeHandle/styles.module.css#css-module
8028
8142
  init_react_import();
8029
- var styles_module_default27 = { "ResizeHandle": "_ResizeHandle_1u3rv_2", "ResizeHandle--left": "_ResizeHandle--left_1u3rv_16", "ResizeHandle--right": "_ResizeHandle--right_1u3rv_20" };
8143
+ var styles_module_default28 = { "ResizeHandle": "_ResizeHandle_1u3rv_2", "ResizeHandle--left": "_ResizeHandle--left_1u3rv_16", "ResizeHandle--right": "_ResizeHandle--right_1u3rv_20" };
8030
8144
 
8031
8145
  // 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);
8146
+ import { jsx as jsx52 } from "react/jsx-runtime";
8147
+ var getClassName32 = get_class_name_factory_default("ResizeHandle", styles_module_default28);
8034
8148
  var ResizeHandle = ({
8035
8149
  position,
8036
8150
  sidebarRef,
8037
8151
  onResize,
8038
8152
  onResizeEnd
8039
8153
  }) => {
8040
- const handleRef = useRef16(null);
8041
- const isDragging = useRef16(false);
8042
- const startX = useRef16(0);
8043
- const startWidth = useRef16(0);
8044
- const handleMouseMove = useCallback20(
8154
+ const handleRef = useRef17(null);
8155
+ const isDragging = useRef17(false);
8156
+ const startX = useRef17(0);
8157
+ const startWidth = useRef17(0);
8158
+ const handleMouseMove = useCallback21(
8045
8159
  (e) => {
8046
8160
  if (!isDragging.current) return;
8047
8161
  const delta = e.clientX - startX.current;
@@ -8052,7 +8166,7 @@ var ResizeHandle = ({
8052
8166
  },
8053
8167
  [onResize, position]
8054
8168
  );
8055
- const handleMouseUp = useCallback20(() => {
8169
+ const handleMouseUp = useCallback21(() => {
8056
8170
  var _a;
8057
8171
  if (!isDragging.current) return;
8058
8172
  isDragging.current = false;
@@ -8067,7 +8181,7 @@ var ResizeHandle = ({
8067
8181
  const finalWidth = ((_a = sidebarRef.current) == null ? void 0 : _a.getBoundingClientRect().width) || 0;
8068
8182
  onResizeEnd(finalWidth);
8069
8183
  }, [onResizeEnd]);
8070
- const handleMouseDown = useCallback20(
8184
+ const handleMouseDown = useCallback21(
8071
8185
  (e) => {
8072
8186
  var _a;
8073
8187
  isDragging.current = true;
@@ -8085,11 +8199,11 @@ var ResizeHandle = ({
8085
8199
  },
8086
8200
  [position, handleMouseMove, handleMouseUp]
8087
8201
  );
8088
- return /* @__PURE__ */ jsx51(
8202
+ return /* @__PURE__ */ jsx52(
8089
8203
  "div",
8090
8204
  {
8091
8205
  ref: handleRef,
8092
- className: getClassName31({ [position]: true }),
8206
+ className: getClassName32({ [position]: true }),
8093
8207
  onMouseDown: handleMouseDown
8094
8208
  }
8095
8209
  );
@@ -8097,11 +8211,11 @@ var ResizeHandle = ({
8097
8211
 
8098
8212
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Sidebar/styles.module.css#css-module
8099
8213
  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" };
8214
+ 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
8215
 
8102
8216
  // 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);
8217
+ import { Fragment as Fragment14, jsx as jsx53, jsxs as jsxs22 } from "react/jsx-runtime";
8218
+ var getClassName33 = get_class_name_factory_default("Sidebar", styles_module_default29);
8105
8219
  var Sidebar = ({
8106
8220
  position,
8107
8221
  sidebarRef,
@@ -8110,16 +8224,16 @@ var Sidebar = ({
8110
8224
  onResizeEnd,
8111
8225
  children
8112
8226
  }) => {
8113
- return /* @__PURE__ */ jsxs21(Fragment14, { children: [
8114
- /* @__PURE__ */ jsx52(
8227
+ return /* @__PURE__ */ jsxs22(Fragment14, { children: [
8228
+ /* @__PURE__ */ jsx53(
8115
8229
  "div",
8116
8230
  {
8117
8231
  ref: sidebarRef,
8118
- className: getClassName32({ [position]: true, isVisible }),
8232
+ className: getClassName33({ [position]: true, isVisible }),
8119
8233
  children
8120
8234
  }
8121
8235
  ),
8122
- /* @__PURE__ */ jsx52("div", { className: `${getClassName32("resizeHandle")}`, children: /* @__PURE__ */ jsx52(
8236
+ /* @__PURE__ */ jsx53("div", { className: `${getClassName33("resizeHandle")}`, children: /* @__PURE__ */ jsx53(
8123
8237
  ResizeHandle,
8124
8238
  {
8125
8239
  position,
@@ -8133,7 +8247,7 @@ var Sidebar = ({
8133
8247
 
8134
8248
  // lib/use-delete-hotkeys.ts
8135
8249
  init_react_import();
8136
- import { useCallback as useCallback21 } from "react";
8250
+ import { useCallback as useCallback22 } from "react";
8137
8251
 
8138
8252
  // lib/should-block-editing-hotkey.ts
8139
8253
  init_react_import();
@@ -8173,7 +8287,7 @@ var shouldBlockEditingHotkey = (e) => {
8173
8287
  // lib/use-delete-hotkeys.ts
8174
8288
  var useDeleteHotkeys = () => {
8175
8289
  const appStore = useAppStoreApi();
8176
- const deleteSelectedComponent = useCallback21(
8290
+ const deleteSelectedComponent = useCallback22(
8177
8291
  (e) => {
8178
8292
  var _a;
8179
8293
  if (shouldBlockEditingHotkey(e)) {
@@ -8199,7 +8313,7 @@ var useDeleteHotkeys = () => {
8199
8313
 
8200
8314
  // lib/use-clipboard-hotkeys.ts
8201
8315
  init_react_import();
8202
- import { useCallback as useCallback22 } from "react";
8316
+ import { useCallback as useCallback23 } from "react";
8203
8317
  var CLIPBOARD_MARKER = "reacteditor/component";
8204
8318
  var isComponentData = (value) => {
8205
8319
  var _a;
@@ -8219,7 +8333,7 @@ var parsePayload = (text) => {
8219
8333
  };
8220
8334
  var useClipboardHotkeys = () => {
8221
8335
  const appStore = useAppStoreApi();
8222
- const writeSelectionToClipboard = useCallback22(() => {
8336
+ const writeSelectionToClipboard = useCallback23(() => {
8223
8337
  var _a;
8224
8338
  const { selectedItem } = appStore.getState();
8225
8339
  if (!selectedItem) return false;
@@ -8231,14 +8345,14 @@ var useClipboardHotkeys = () => {
8231
8345
  });
8232
8346
  return true;
8233
8347
  }, [appStore]);
8234
- const copySelectedComponent = useCallback22(
8348
+ const copySelectedComponent = useCallback23(
8235
8349
  (e) => {
8236
8350
  if (shouldBlockEditingHotkey(e)) return false;
8237
8351
  return writeSelectionToClipboard();
8238
8352
  },
8239
8353
  [writeSelectionToClipboard]
8240
8354
  );
8241
- const cutSelectedComponent = useCallback22(
8355
+ const cutSelectedComponent = useCallback23(
8242
8356
  (e) => {
8243
8357
  var _a;
8244
8358
  if (shouldBlockEditingHotkey(e)) return false;
@@ -8257,7 +8371,7 @@ var useClipboardHotkeys = () => {
8257
8371
  },
8258
8372
  [appStore, writeSelectionToClipboard]
8259
8373
  );
8260
- const pasteComponent = useCallback22(
8374
+ const pasteComponent = useCallback23(
8261
8375
  (e) => {
8262
8376
  var _a, _b;
8263
8377
  if (shouldBlockEditingHotkey(e)) return false;
@@ -8294,12 +8408,12 @@ init_react_import();
8294
8408
 
8295
8409
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Nav/styles.module.css#css-module
8296
8410
  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" };
8411
+ 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
8412
 
8299
8413
  // 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);
8414
+ import { jsx as jsx54, jsxs as jsxs23 } from "react/jsx-runtime";
8415
+ var getClassName34 = get_class_name_factory_default("Nav", styles_module_default30);
8416
+ var getClassNameItem3 = get_class_name_factory_default("NavItem", styles_module_default30);
8303
8417
  var MenuItem = ({
8304
8418
  label,
8305
8419
  icon,
@@ -8308,7 +8422,7 @@ var MenuItem = ({
8308
8422
  mobileOnly,
8309
8423
  desktopOnly
8310
8424
  }) => {
8311
- return /* @__PURE__ */ jsx53(
8425
+ return /* @__PURE__ */ jsx54(
8312
8426
  "li",
8313
8427
  {
8314
8428
  className: getClassNameItem3({
@@ -8316,9 +8430,9 @@ var MenuItem = ({
8316
8430
  mobileOnly,
8317
8431
  desktopOnly
8318
8432
  }),
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 })
8433
+ children: onClick && /* @__PURE__ */ jsxs23("div", { className: getClassNameItem3("link"), onClick, children: [
8434
+ icon && /* @__PURE__ */ jsx54("span", { className: getClassNameItem3("linkIcon"), children: icon }),
8435
+ /* @__PURE__ */ jsx54("span", { className: getClassNameItem3("linkLabel"), children: label })
8322
8436
  ] })
8323
8437
  }
8324
8438
  );
@@ -8327,17 +8441,17 @@ var Nav = ({
8327
8441
  items,
8328
8442
  footer
8329
8443
  }) => {
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 })
8444
+ return /* @__PURE__ */ jsxs23("nav", { className: getClassName34(), children: [
8445
+ /* @__PURE__ */ jsx54("ul", { className: getClassName34("list"), children: Object.entries(items).map(([key, item]) => /* @__PURE__ */ jsx54(MenuItem, __spreadValues({}, item), key)) }),
8446
+ footer && /* @__PURE__ */ jsx54("div", { className: getClassName34("footer"), children: footer })
8333
8447
  ] });
8334
8448
  };
8335
8449
 
8336
8450
  // 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);
8451
+ import { Fragment as Fragment15, jsx as jsx55, jsxs as jsxs24 } from "react/jsx-runtime";
8452
+ var getClassName35 = get_class_name_factory_default("Editor", styles_module_default23);
8453
+ var getLayoutClassName = get_class_name_factory_default("EditorLayout", styles_module_default23);
8454
+ var getPluginTabClassName = get_class_name_factory_default("EditorPluginTab", styles_module_default23);
8341
8455
  var FieldSideBarToolbar = () => {
8342
8456
  const appStore = useAppStoreApi();
8343
8457
  const { onPublish } = usePropsContext();
@@ -8348,30 +8462,30 @@ var FieldSideBarToolbar = () => {
8348
8462
  const CustomHeaderActions = useAppStore(
8349
8463
  (s) => s.overrides.headerActions || DefaultOverride
8350
8464
  );
8351
- return /* @__PURE__ */ jsxs23("div", { className: getClassName34("fieldSideBarToolbar"), children: [
8352
- /* @__PURE__ */ jsxs23("div", { className: getClassName34("fieldSideBarHistory"), children: [
8353
- /* @__PURE__ */ jsx54(
8465
+ return /* @__PURE__ */ jsxs24("div", { className: getClassName35("fieldSideBarToolbar"), children: [
8466
+ /* @__PURE__ */ jsxs24("div", { className: getClassName35("fieldSideBarHistory"), children: [
8467
+ /* @__PURE__ */ jsx55(
8354
8468
  IconButton,
8355
8469
  {
8356
8470
  type: "button",
8357
8471
  title: "undo",
8358
8472
  disabled: !hasPast,
8359
8473
  onClick: back,
8360
- children: /* @__PURE__ */ jsx54(Undo2, { size: 18 })
8474
+ children: /* @__PURE__ */ jsx55(Undo2, { size: 18 })
8361
8475
  }
8362
8476
  ),
8363
- /* @__PURE__ */ jsx54(
8477
+ /* @__PURE__ */ jsx55(
8364
8478
  IconButton,
8365
8479
  {
8366
8480
  type: "button",
8367
8481
  title: "redo",
8368
8482
  disabled: !hasFuture,
8369
8483
  onClick: forward,
8370
- children: /* @__PURE__ */ jsx54(Redo2, { size: 18 })
8484
+ children: /* @__PURE__ */ jsx55(Redo2, { size: 18 })
8371
8485
  }
8372
8486
  )
8373
8487
  ] }),
8374
- /* @__PURE__ */ jsx54("div", { className: getClassName34("fieldSideBarActions"), children: /* @__PURE__ */ jsx54(CustomHeaderActions, { children: /* @__PURE__ */ jsx54(
8488
+ /* @__PURE__ */ jsx55("div", { className: getClassName35("fieldSideBarActions"), children: /* @__PURE__ */ jsx55(CustomHeaderActions, { children: /* @__PURE__ */ jsx55(
8375
8489
  Button,
8376
8490
  {
8377
8491
  onClick: () => {
@@ -8390,9 +8504,9 @@ var FieldSideBar = () => {
8390
8504
  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
8505
  }
8392
8506
  );
8393
- return /* @__PURE__ */ jsxs23(Fragment15, { children: [
8394
- /* @__PURE__ */ jsx54(FieldSideBarToolbar, {}),
8395
- /* @__PURE__ */ jsx54(SidebarSection, { noBorderTop: true, showBreadcrumbs: true, title, children: /* @__PURE__ */ jsx54(Fields, {}) })
8507
+ return /* @__PURE__ */ jsxs24(Fragment15, { children: [
8508
+ /* @__PURE__ */ jsx55(FieldSideBarToolbar, {}),
8509
+ /* @__PURE__ */ jsx55(SidebarSection, { noBorderTop: true, showBreadcrumbs: true, title, children: /* @__PURE__ */ jsx55(Fields, {}) })
8396
8510
  ] });
8397
8511
  };
8398
8512
  var PluginTab = ({
@@ -8400,7 +8514,7 @@ var PluginTab = ({
8400
8514
  visible,
8401
8515
  mobileOnly
8402
8516
  }) => {
8403
- return /* @__PURE__ */ jsx54("div", { className: getPluginTabClassName({ visible, mobileOnly }), children: /* @__PURE__ */ jsx54("div", { className: getPluginTabClassName("body"), children }) });
8517
+ return /* @__PURE__ */ jsx55("div", { className: getPluginTabClassName({ visible, mobileOnly }), children: /* @__PURE__ */ jsx55("div", { className: getPluginTabClassName("body"), children }) });
8404
8518
  };
8405
8519
  var Layout = ({ children }) => {
8406
8520
  const {
@@ -8498,11 +8612,11 @@ var Layout = ({ children }) => {
8498
8612
  const [mobilePanelHeight, setMobilePanelHeight] = useState23(
8499
8613
  null
8500
8614
  );
8501
- const mobilePanelRef = useRef17(null);
8502
- const isDraggingMobile = useRef17(false);
8503
- const dragStartY = useRef17(0);
8504
- const dragStartHeight = useRef17(0);
8505
- const handleMobileDragStart = useCallback23(
8615
+ const mobilePanelRef = useRef18(null);
8616
+ const isDraggingMobile = useRef18(false);
8617
+ const dragStartY = useRef18(0);
8618
+ const dragStartHeight = useRef18(0);
8619
+ const handleMobileDragStart = useCallback24(
8506
8620
  (clientY) => {
8507
8621
  isDraggingMobile.current = true;
8508
8622
  dragStartY.current = clientY;
@@ -8513,7 +8627,7 @@ var Layout = ({ children }) => {
8513
8627
  },
8514
8628
  []
8515
8629
  );
8516
- const handleMobileDragMove = useCallback23((clientY) => {
8630
+ const handleMobileDragMove = useCallback24((clientY) => {
8517
8631
  if (!isDraggingMobile.current) return;
8518
8632
  const delta = dragStartY.current - clientY;
8519
8633
  const viewportHeight = window.innerHeight;
@@ -8522,7 +8636,7 @@ var Layout = ({ children }) => {
8522
8636
  const newH = Math.min(maxH, Math.max(minH, dragStartHeight.current + delta));
8523
8637
  setMobilePanelHeight(newH);
8524
8638
  }, []);
8525
- const handleMobileDragEnd = useCallback23(() => {
8639
+ const handleMobileDragEnd = useCallback24(() => {
8526
8640
  if (!isDraggingMobile.current) return;
8527
8641
  isDraggingMobile.current = false;
8528
8642
  document.body.style.userSelect = "";
@@ -8567,7 +8681,7 @@ var Layout = ({ children }) => {
8567
8681
  const toggleTheme = () => {
8568
8682
  setTheme((t) => t === "dark" ? "light" : "dark");
8569
8683
  };
8570
- const themeIcon = theme === "dark" ? /* @__PURE__ */ jsx54(Sun, { size: 18 }) : /* @__PURE__ */ jsx54(Moon, { size: 18 });
8684
+ const themeIcon = theme === "dark" ? /* @__PURE__ */ jsx55(Sun, { size: 18 }) : /* @__PURE__ */ jsx55(Moon, { size: 18 });
8571
8685
  const themeLabel = theme === "dark" ? "Switch to light mode" : "Switch to dark mode";
8572
8686
  const hasLegacySideBarPlugin = useMemo23(
8573
8687
  () => !!(plugins == null ? void 0 : plugins.find((p) => p.name === "legacy-side-bar")),
@@ -8592,7 +8706,7 @@ var Layout = ({ children }) => {
8592
8706
  }
8593
8707
  details[plugin.name] = {
8594
8708
  label: (_a = plugin.label) != null ? _a : plugin.name,
8595
- icon: (_b = plugin.icon) != null ? _b : /* @__PURE__ */ jsx54(ToyBrick, {}),
8709
+ icon: (_b = plugin.icon) != null ? _b : /* @__PURE__ */ jsx55(ToyBrick, {}),
8596
8710
  onClick: () => {
8597
8711
  var _a2;
8598
8712
  setMobilePanelHeightMode((_a2 = plugin.mobilePanelHeight) != null ? _a2 : "toggle");
@@ -8631,17 +8745,17 @@ var Layout = ({ children }) => {
8631
8745
  if (mobilePanelHeight && leftSideBarVisible) {
8632
8746
  mobilePanelStyle["--editor-mobile-panel-height"] = `${mobilePanelHeight}px`;
8633
8747
  }
8634
- return /* @__PURE__ */ jsxs23(
8748
+ return /* @__PURE__ */ jsxs24(
8635
8749
  "div",
8636
8750
  {
8637
- className: `Editor ${getClassName34({
8751
+ className: `Editor ${getClassName35({
8638
8752
  hidePlugins: hasLegacySideBarPlugin
8639
8753
  })}`,
8640
8754
  id: instanceId,
8641
8755
  "data-theme": theme,
8642
8756
  style: { height },
8643
8757
  children: [
8644
- /* @__PURE__ */ jsx54(DragDropContext, { disableAutoScroll: dnd == null ? void 0 : dnd.disableAutoScroll, children: /* @__PURE__ */ jsx54(CustomEditor, { children: children || /* @__PURE__ */ jsx54(FrameProvider, { children: /* @__PURE__ */ jsx54(
8758
+ /* @__PURE__ */ jsx55(DragDropContext, { disableAutoScroll: dnd == null ? void 0 : dnd.disableAutoScroll, children: /* @__PURE__ */ jsx55(CustomEditor, { children: children || /* @__PURE__ */ jsx55(FrameProvider, { children: /* @__PURE__ */ jsx55(
8645
8759
  "div",
8646
8760
  {
8647
8761
  className: getLayoutClassName({
@@ -8653,17 +8767,17 @@ var Layout = ({ children }) => {
8653
8767
  mobilePanelCustomHeight: mobilePanelHeight !== null && leftSideBarVisible
8654
8768
  }),
8655
8769
  style: { height },
8656
- children: /* @__PURE__ */ jsxs23(
8770
+ children: /* @__PURE__ */ jsxs24(
8657
8771
  "div",
8658
8772
  {
8659
8773
  className: getLayoutClassName("inner"),
8660
8774
  style: __spreadValues(__spreadValues({}, layoutOptions), mobilePanelStyle),
8661
8775
  children: [
8662
- /* @__PURE__ */ jsx54("div", { className: getLayoutClassName("nav"), children: /* @__PURE__ */ jsx54(
8776
+ /* @__PURE__ */ jsx55("div", { className: getLayoutClassName("nav"), children: /* @__PURE__ */ jsx55(
8663
8777
  Nav,
8664
8778
  {
8665
8779
  items: pluginItems,
8666
- footer: /* @__PURE__ */ jsx54(
8780
+ footer: /* @__PURE__ */ jsx55(
8667
8781
  IconButton,
8668
8782
  {
8669
8783
  type: "button",
@@ -8674,19 +8788,19 @@ var Layout = ({ children }) => {
8674
8788
  )
8675
8789
  }
8676
8790
  ) }),
8677
- /* @__PURE__ */ jsxs23(
8791
+ /* @__PURE__ */ jsxs24(
8678
8792
  "div",
8679
8793
  {
8680
8794
  ref: mobilePanelRef,
8681
8795
  className: getLayoutClassName("mobilePanel"),
8682
8796
  children: [
8683
- /* @__PURE__ */ jsx54(
8797
+ /* @__PURE__ */ jsx55(
8684
8798
  "div",
8685
8799
  {
8686
8800
  className: getLayoutClassName("mobileDragHandle"),
8687
8801
  onTouchStart: (e) => handleMobileDragStart(e.touches[0].clientY),
8688
8802
  onMouseDown: (e) => handleMobileDragStart(e.clientY),
8689
- children: /* @__PURE__ */ jsx54(
8803
+ children: /* @__PURE__ */ jsx55(
8690
8804
  "div",
8691
8805
  {
8692
8806
  className: getLayoutClassName("mobileDragHandlePill")
@@ -8694,17 +8808,17 @@ var Layout = ({ children }) => {
8694
8808
  )
8695
8809
  }
8696
8810
  ),
8697
- /* @__PURE__ */ jsx54(
8811
+ /* @__PURE__ */ jsx55(
8698
8812
  "div",
8699
8813
  {
8700
8814
  className: getLayoutClassName("mobilePanelContent"),
8701
8815
  children: Object.entries(pluginItems).map(
8702
- ([id, { mobileOnly, render: Render2 }]) => /* @__PURE__ */ jsx54(
8816
+ ([id, { mobileOnly, render: Render2 }]) => /* @__PURE__ */ jsx55(
8703
8817
  PluginTab,
8704
8818
  {
8705
8819
  visible: currentPlugin === id,
8706
8820
  mobileOnly,
8707
- children: /* @__PURE__ */ jsx54(Render2, {})
8821
+ children: /* @__PURE__ */ jsx55(Render2, {})
8708
8822
  },
8709
8823
  id
8710
8824
  )
@@ -8714,7 +8828,7 @@ var Layout = ({ children }) => {
8714
8828
  ]
8715
8829
  }
8716
8830
  ),
8717
- /* @__PURE__ */ jsx54(
8831
+ /* @__PURE__ */ jsx55(
8718
8832
  Sidebar,
8719
8833
  {
8720
8834
  position: "left",
@@ -8723,20 +8837,20 @@ var Layout = ({ children }) => {
8723
8837
  onResize: setLeftWidth,
8724
8838
  onResizeEnd: handleLeftSidebarResizeEnd,
8725
8839
  children: Object.entries(pluginItems).map(
8726
- ([id, { mobileOnly, render: Render2, label }]) => /* @__PURE__ */ jsx54(
8840
+ ([id, { mobileOnly, render: Render2, label }]) => /* @__PURE__ */ jsx55(
8727
8841
  PluginTab,
8728
8842
  {
8729
8843
  visible: currentPlugin === id,
8730
8844
  mobileOnly,
8731
- children: /* @__PURE__ */ jsx54(Render2, {})
8845
+ children: /* @__PURE__ */ jsx55(Render2, {})
8732
8846
  },
8733
8847
  id
8734
8848
  )
8735
8849
  )
8736
8850
  }
8737
8851
  ),
8738
- /* @__PURE__ */ jsx54(Canvas, {}),
8739
- !hasDesktopFieldsPlugin && /* @__PURE__ */ jsx54(
8852
+ /* @__PURE__ */ jsx55(Canvas, {}),
8853
+ !hasDesktopFieldsPlugin && /* @__PURE__ */ jsx55(
8740
8854
  Sidebar,
8741
8855
  {
8742
8856
  position: "right",
@@ -8744,7 +8858,7 @@ var Layout = ({ children }) => {
8744
8858
  isVisible: rightSideBarVisible,
8745
8859
  onResize: setRightWidth,
8746
8860
  onResizeEnd: handleRightSidebarResizeEnd,
8747
- children: /* @__PURE__ */ jsx54(FieldSideBar, {})
8861
+ children: /* @__PURE__ */ jsx55(FieldSideBar, {})
8748
8862
  }
8749
8863
  )
8750
8864
  ]
@@ -8752,17 +8866,17 @@ var Layout = ({ children }) => {
8752
8866
  )
8753
8867
  }
8754
8868
  ) }) }) }),
8755
- /* @__PURE__ */ jsx54("div", { id: "editor-portal-root", className: getClassName34("portal") })
8869
+ /* @__PURE__ */ jsx55("div", { id: "editor-portal-root", className: getClassName35("portal") })
8756
8870
  ]
8757
8871
  }
8758
8872
  );
8759
8873
  };
8760
8874
 
8761
8875
  // components/Editor/index.tsx
8762
- import { jsx as jsx55 } from "react/jsx-runtime";
8876
+ import { jsx as jsx56 } from "react/jsx-runtime";
8763
8877
  var propsContext = createContext8({});
8764
8878
  function PropsProvider(props) {
8765
- return /* @__PURE__ */ jsx55(propsContext.Provider, { value: props, children: props.children });
8879
+ return /* @__PURE__ */ jsx56(propsContext.Provider, { value: props, children: props.children });
8766
8880
  }
8767
8881
  var usePropsContext = () => useContext15(propsContext);
8768
8882
  function EditorProvider({ children }) {
@@ -8876,7 +8990,7 @@ function EditorProvider({ children }) {
8876
8990
  return __spreadValues(__spreadValues({}, pluginFieldTransforms), fieldTransforms);
8877
8991
  }, [fieldTransforms, plugins]);
8878
8992
  const instanceId = useSafeId();
8879
- const generateAppStore = useCallback24(
8993
+ const generateAppStore = useCallback25(
8880
8994
  (state) => {
8881
8995
  return {
8882
8996
  instanceId,
@@ -8925,7 +9039,7 @@ function EditorProvider({ children }) {
8925
9039
  index: initialHistoryIndex,
8926
9040
  initialAppState
8927
9041
  });
8928
- const previousData = useRef18(null);
9042
+ const previousData = useRef19(null);
8929
9043
  useEffect26(() => {
8930
9044
  return appStore.subscribe(
8931
9045
  (s) => s.state.data,
@@ -8946,10 +9060,10 @@ function EditorProvider({ children }) {
8946
9060
  resolveAndCommitData();
8947
9061
  }, 0);
8948
9062
  }, []);
8949
- return /* @__PURE__ */ jsx55(appStoreContext.Provider, { value: appStore, children: /* @__PURE__ */ jsx55(UseEditorStoreContext.Provider, { value: uEditorStore, children }) });
9063
+ return /* @__PURE__ */ jsx56(appStoreContext.Provider, { value: appStore, children: /* @__PURE__ */ jsx56(UseEditorStoreContext.Provider, { value: uEditorStore, children }) });
8950
9064
  }
8951
9065
  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 }) })) }));
9066
+ return /* @__PURE__ */ jsx56(PropsProvider, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx56(EditorProvider, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx56(Layout, { children: props.children }) })) }));
8953
9067
  }
8954
9068
  Editor3.Components = Components;
8955
9069
  Editor3.Fields = Fields;
@@ -8982,12 +9096,12 @@ function pageMetadata(data) {
8982
9096
 
8983
9097
  // plugins/legacy-side-bar/index.tsx
8984
9098
  init_react_import();
8985
- import { jsx as jsx56, jsxs as jsxs24 } from "react/jsx-runtime";
9099
+ import { jsx as jsx57, jsxs as jsxs25 } from "react/jsx-runtime";
8986
9100
  var legacySideBarPlugin = () => ({
8987
9101
  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, {}) })
9102
+ render: () => /* @__PURE__ */ jsxs25("div", { style: { overflowY: "auto" }, children: [
9103
+ /* @__PURE__ */ jsx57(SidebarSection, { title: "Components", noBorderTop: true, children: /* @__PURE__ */ jsx57(Components, {}) }),
9104
+ /* @__PURE__ */ jsx57(SidebarSection, { title: "Outline", children: /* @__PURE__ */ jsx57(Outline, {}) })
8991
9105
  ] })
8992
9106
  });
8993
9107