@reacteditor/core 0.0.4 → 0.0.6

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 (51) hide show
  1. package/dist/Editor-4LPVLYSU.css +415 -0
  2. package/dist/{Editor-2TYODRQT.mjs → Editor-YNFB7B6Z.mjs} +8 -8
  3. package/dist/{Render-VDC7AEQK.mjs → Render-STFB5CNO.mjs} +1 -1
  4. package/dist/Render-ZTUTUUAH.css +103 -0
  5. package/dist/{actions-BCDhqbeL.d.mts → actions-CQmL3wwa.d.mts} +11 -6
  6. package/dist/{actions-BCDhqbeL.d.ts → actions-CQmL3wwa.d.ts} +11 -6
  7. package/dist/{chunk-VD3EVRUF.mjs → chunk-275EJPEB.mjs} +2 -2
  8. package/dist/{chunk-ZHNRSSMW.mjs → chunk-6LG4Q4HO.mjs} +1 -1
  9. package/dist/chunk-6QJ2HF4O.mjs +11 -0
  10. package/dist/{chunk-6Q6A3BQH.mjs → chunk-BRDUM7MJ.mjs} +15 -15
  11. package/dist/{chunk-2LVYDXZS.mjs → chunk-CRF2GWQA.mjs} +3 -3
  12. package/dist/{chunk-TCVU3WEN.mjs → chunk-DB4R5IWG.mjs} +4 -4
  13. package/dist/{chunk-D2RG73WI.mjs → chunk-HCFEY5Y7.mjs} +475 -288
  14. package/dist/{chunk-VUEM62JF.mjs → chunk-UB2DES2O.mjs} +17 -6
  15. package/dist/{chunk-M2RKJTNY.mjs → chunk-WGPCLAZR.mjs} +1 -1
  16. package/dist/{chunk-HMTHZBH6.mjs → chunk-Z6IIVDFY.mjs} +1 -1
  17. package/dist/{full-7KJICNR5.mjs → full-24FOTNTB.mjs} +6 -6
  18. package/dist/full-7ABPY2WA.css +311 -0
  19. package/dist/{index-DVwiIwYU.d.mts → index-BOP2qNVA.d.mts} +1 -1
  20. package/dist/{index-ComBHfdn.d.ts → index-_G46lHpL.d.ts} +1 -1
  21. package/dist/index.css +1307 -1203
  22. package/dist/index.d.mts +11 -20
  23. package/dist/index.d.ts +11 -20
  24. package/dist/index.js +572 -372
  25. package/dist/index.mjs +10 -10
  26. package/dist/internal.d.mts +2 -2
  27. package/dist/internal.d.ts +2 -2
  28. package/dist/internal.js +17 -6
  29. package/dist/internal.mjs +1 -1
  30. package/dist/{loaded-DGSPK47E.mjs → loaded-6IBSSOXD.mjs} +3 -3
  31. package/dist/{loaded-IJNA4SY5.mjs → loaded-6NPDD7SF.mjs} +3 -3
  32. package/dist/{loaded-CBJRWD4Z.mjs → loaded-BQVZGQG2.mjs} +3 -3
  33. package/dist/loaded-N4KWL7FV.css +90 -0
  34. package/dist/no-external.css +1307 -1203
  35. package/dist/no-external.d.mts +4 -4
  36. package/dist/no-external.d.ts +4 -4
  37. package/dist/no-external.js +572 -372
  38. package/dist/no-external.mjs +10 -10
  39. package/dist/rsc.css +41 -41
  40. package/dist/rsc.d.mts +2 -2
  41. package/dist/rsc.d.ts +2 -2
  42. package/dist/rsc.js +5 -5
  43. package/dist/rsc.mjs +2 -2
  44. package/dist/{walk-tree-BPIigVTF.d.mts → walk-tree-Dwv3c_9M.d.mts} +1 -1
  45. package/dist/{walk-tree-BZq1CPCH.d.ts → walk-tree-DxSkPLnl.d.ts} +1 -1
  46. package/package.json +2 -1
  47. package/dist/Editor-GBV2O5RD.css +0 -415
  48. package/dist/Render-EFT7YD2C.css +0 -103
  49. package/dist/chunk-MFI3RDA4.mjs +0 -11
  50. package/dist/full-ELX6RALJ.css +0 -311
  51. package/dist/loaded-TBSVRJPY.css +0 -90
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  EditorInner,
3
3
  LoadedRichTextMenu
4
- } from "./chunk-TCVU3WEN.mjs";
4
+ } from "./chunk-DB4R5IWG.mjs";
5
5
  import {
6
6
  RichTextRenderFallback,
7
7
  SlotRender,
@@ -10,13 +10,13 @@ import {
10
10
  getSlotTransform,
11
11
  useRichtextProps,
12
12
  useSlots
13
- } from "./chunk-VD3EVRUF.mjs";
13
+ } from "./chunk-275EJPEB.mjs";
14
14
  import {
15
15
  ActionBar,
16
16
  IconButton,
17
17
  LoadedRichTextMenuInner,
18
18
  Loader
19
- } from "./chunk-6Q6A3BQH.mjs";
19
+ } from "./chunk-BRDUM7MJ.mjs";
20
20
  import {
21
21
  Check,
22
22
  ChevronDown,
@@ -60,14 +60,14 @@ import {
60
60
  useRegisterFieldsSlice,
61
61
  useRegisterHistorySlice,
62
62
  useRegisterPermissionsSlice
63
- } from "./chunk-2LVYDXZS.mjs";
63
+ } from "./chunk-CRF2GWQA.mjs";
64
64
  import {
65
65
  getItem,
66
66
  insert,
67
67
  insertAction,
68
68
  makeStatePublic,
69
69
  populateIds
70
- } from "./chunk-VUEM62JF.mjs";
70
+ } from "./chunk-UB2DES2O.mjs";
71
71
  import {
72
72
  defaultAppState,
73
73
  defaultViewports
@@ -149,9 +149,9 @@ function setDeep(node, path, newVal) {
149
149
  init_react_import();
150
150
  import { useEffect, useState } from "react";
151
151
 
152
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/Button/Button.module.css#css-module
152
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Button/Button.module.css#css-module
153
153
  init_react_import();
154
- var Button_module_default = { "Button": "_Button_1g3xu_1", "Button--medium": "_Button--medium_1g3xu_31", "Button--large": "_Button--large_1g3xu_39", "Button-icon": "_Button-icon_1g3xu_46", "Button--primary": "_Button--primary_1g3xu_50", "Button--secondary": "_Button--secondary_1g3xu_71", "Button--flush": "_Button--flush_1g3xu_88", "Button--disabled": "_Button--disabled_1g3xu_92", "Button--fullWidth": "_Button--fullWidth_1g3xu_100", "Button-spinner": "_Button-spinner_1g3xu_105" };
154
+ var Button_module_default = { "Button": "_Button_rj9nn_1", "Button--medium": "_Button--medium_rj9nn_31", "Button--large": "_Button--large_rj9nn_39", "Button-icon": "_Button-icon_rj9nn_46", "Button--primary": "_Button--primary_rj9nn_50", "Button--secondary": "_Button--secondary_rj9nn_71", "Button--flush": "_Button--flush_rj9nn_88", "Button--disabled": "_Button--disabled_rj9nn_92", "Button--fullWidth": "_Button--fullWidth_rj9nn_100", "Button-spinner": "_Button-spinner_rj9nn_105" };
155
155
 
156
156
  // lib/filter-data-attrs.ts
157
157
  init_react_import();
@@ -238,9 +238,9 @@ var Button = (_a) => {
238
238
  // components/AutoField/FieldLabel.tsx
239
239
  init_react_import();
240
240
 
241
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/AutoField/styles.module.css#css-module
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_yqqgz_1", "Input-label": "_Input-label_yqqgz_5", "Input-labelIcon": "_Input-labelIcon_yqqgz_15", "Input-disabledIcon": "_Input-disabledIcon_yqqgz_22", "Input-input": "_Input-input_yqqgz_27", "Input": "_Input_yqqgz_1", "Input--readOnly": "_Input--readOnly_yqqgz_87", "Input-radioGroupItems": "_Input-radioGroupItems_yqqgz_98", "Input-radio": "_Input-radio_yqqgz_98", "Input-radioInner": "_Input-radioInner_yqqgz_115", "Input-radioInput": "_Input-radioInput_yqqgz_147" };
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" };
244
244
 
245
245
  // components/AutoField/FieldLabel.tsx
246
246
  import { useMemo } from "react";
@@ -306,9 +306,9 @@ init_react_import();
306
306
  // components/AutoField/fields/ArrayField/index.tsx
307
307
  init_react_import();
308
308
 
309
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/AutoField/fields/ArrayField/styles.module.css#css-module
309
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/AutoField/fields/ArrayField/styles.module.css#css-module
310
310
  init_react_import();
311
- var styles_module_default2 = { "ArrayField": "_ArrayField_13xcf_5", "ArrayField--isDraggingFrom": "_ArrayField--isDraggingFrom_13xcf_14", "ArrayField-addButton": "_ArrayField-addButton_13xcf_19", "ArrayField--hasItems": "_ArrayField--hasItems_13xcf_35", "ArrayField-inner": "_ArrayField-inner_13xcf_61", "ArrayFieldItem": "_ArrayFieldItem_13xcf_69", "ArrayFieldItem--isDragging": "_ArrayFieldItem--isDragging_13xcf_78", "ArrayFieldItem--isExpanded": "_ArrayFieldItem--isExpanded_13xcf_82", "ArrayFieldItem-summary": "_ArrayFieldItem-summary_13xcf_97", "ArrayFieldItem--noFields": "_ArrayFieldItem--noFields_13xcf_118", "ArrayFieldItem-body": "_ArrayFieldItem-body_13xcf_147", "ArrayFieldItem-fieldset": "_ArrayFieldItem-fieldset_13xcf_156", "ArrayFieldItem-rhs": "_ArrayFieldItem-rhs_13xcf_164", "ArrayFieldItem-actions": "_ArrayFieldItem-actions_13xcf_170" };
311
+ var styles_module_default2 = { "ArrayField": "_ArrayField_1tth0_5", "ArrayField--isDraggingFrom": "_ArrayField--isDraggingFrom_1tth0_14", "ArrayField-addButton": "_ArrayField-addButton_1tth0_19", "ArrayField--hasItems": "_ArrayField--hasItems_1tth0_35", "ArrayField-inner": "_ArrayField-inner_1tth0_61", "ArrayFieldItem": "_ArrayFieldItem_1tth0_69", "ArrayFieldItem--isDragging": "_ArrayFieldItem--isDragging_1tth0_78", "ArrayFieldItem--isExpanded": "_ArrayFieldItem--isExpanded_1tth0_82", "ArrayFieldItem-summary": "_ArrayFieldItem-summary_1tth0_97", "ArrayFieldItem--noFields": "_ArrayFieldItem--noFields_1tth0_118", "ArrayFieldItem-body": "_ArrayFieldItem-body_1tth0_147", "ArrayFieldItem-fieldset": "_ArrayFieldItem-fieldset_1tth0_156", "ArrayFieldItem-rhs": "_ArrayFieldItem-rhs_1tth0_164", "ArrayFieldItem-actions": "_ArrayFieldItem-actions_1tth0_170" };
312
312
 
313
313
  // components/AutoField/store.ts
314
314
  init_react_import();
@@ -374,9 +374,9 @@ import {
374
374
  // components/DragIcon/index.tsx
375
375
  init_react_import();
376
376
 
377
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/DragIcon/styles.module.css#css-module
377
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/DragIcon/styles.module.css#css-module
378
378
  init_react_import();
379
- var styles_module_default3 = { "DragIcon": "_DragIcon_53afe_1", "DragIcon--disabled": "_DragIcon--disabled_53afe_8" };
379
+ var styles_module_default3 = { "DragIcon": "_DragIcon_eapcz_1", "DragIcon--disabled": "_DragIcon--disabled_eapcz_8" };
380
380
 
381
381
  // components/DragIcon/index.tsx
382
382
  import { jsx as jsx4 } from "react/jsx-runtime";
@@ -1386,17 +1386,17 @@ import {
1386
1386
  isValidElement
1387
1387
  } from "react";
1388
1388
 
1389
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/ExternalInput/styles.module.css#css-module
1389
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/ExternalInput/styles.module.css#css-module
1390
1390
  init_react_import();
1391
- var styles_module_default4 = { "ExternalInput-actions": "_ExternalInput-actions_3fhqq_1", "ExternalInput-button": "_ExternalInput-button_3fhqq_5", "ExternalInput--dataSelected": "_ExternalInput--dataSelected_3fhqq_25", "ExternalInput--readOnly": "_ExternalInput--readOnly_3fhqq_32", "ExternalInput-detachButton": "_ExternalInput-detachButton_3fhqq_36", "ExternalInput": "_ExternalInput_3fhqq_1", "ExternalInputModal": "_ExternalInputModal_3fhqq_82", "ExternalInputModal-grid": "_ExternalInputModal-grid_3fhqq_92", "ExternalInputModal--filtersToggled": "_ExternalInputModal--filtersToggled_3fhqq_103", "ExternalInputModal-filters": "_ExternalInputModal-filters_3fhqq_108", "ExternalInputModal-masthead": "_ExternalInputModal-masthead_3fhqq_127", "ExternalInputModal-tableWrapper": "_ExternalInputModal-tableWrapper_3fhqq_136", "ExternalInputModal-table": "_ExternalInputModal-table_3fhqq_136", "ExternalInputModal-thead": "_ExternalInputModal-thead_3fhqq_152", "ExternalInputModal-th": "_ExternalInputModal-th_3fhqq_152", "ExternalInputModal-td": "_ExternalInputModal-td_3fhqq_167", "ExternalInputModal-tr": "_ExternalInputModal-tr_3fhqq_172", "ExternalInputModal-tbody": "_ExternalInputModal-tbody_3fhqq_179", "ExternalInputModal--hasData": "_ExternalInputModal--hasData_3fhqq_205", "ExternalInputModal-loadingBanner": "_ExternalInputModal-loadingBanner_3fhqq_209", "ExternalInputModal--isLoading": "_ExternalInputModal--isLoading_3fhqq_226", "ExternalInputModal-searchForm": "_ExternalInputModal-searchForm_3fhqq_230", "ExternalInputModal-search": "_ExternalInputModal-search_3fhqq_230", "ExternalInputModal-searchIcon": "_ExternalInputModal-searchIcon_3fhqq_267", "ExternalInputModal-searchIconText": "_ExternalInputModal-searchIconText_3fhqq_292", "ExternalInputModal-searchInput": "_ExternalInputModal-searchInput_3fhqq_302", "ExternalInputModal-searchActions": "_ExternalInputModal-searchActions_3fhqq_316", "ExternalInputModal-searchActionIcon": "_ExternalInputModal-searchActionIcon_3fhqq_329", "ExternalInputModal-footerContainer": "_ExternalInputModal-footerContainer_3fhqq_333", "ExternalInputModal-footer": "_ExternalInputModal-footer_3fhqq_333", "ExternalInputModal-field": "_ExternalInputModal-field_3fhqq_346" };
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" };
1392
1392
 
1393
1393
  // components/Modal/index.tsx
1394
1394
  init_react_import();
1395
1395
  import { useEffect as useEffect4, useState as useState6 } from "react";
1396
1396
 
1397
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/Modal/styles.module.css#css-module
1397
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Modal/styles.module.css#css-module
1398
1398
  init_react_import();
1399
- var styles_module_default5 = { "Modal": "_Modal_1qmqa_1", "Modal--isOpen": "_Modal--isOpen_1qmqa_15", "Modal-inner": "_Modal-inner_1qmqa_19" };
1399
+ var styles_module_default5 = { "Modal": "_Modal_vim19_1", "Modal--isOpen": "_Modal--isOpen_vim19_15", "Modal-inner": "_Modal-inner_vim19_19" };
1400
1400
 
1401
1401
  // components/Modal/index.tsx
1402
1402
  import { createPortal } from "react-dom";
@@ -1430,9 +1430,9 @@ var Modal = ({
1430
1430
  // components/Heading/index.tsx
1431
1431
  init_react_import();
1432
1432
 
1433
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/Heading/styles.module.css#css-module
1433
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Heading/styles.module.css#css-module
1434
1434
  init_react_import();
1435
- var styles_module_default6 = { "Heading": "_Heading_crcfw_1", "Heading--xxxxl": "_Heading--xxxxl_crcfw_13", "Heading--xxxl": "_Heading--xxxl_crcfw_19", "Heading--xxl": "_Heading--xxl_crcfw_23", "Heading--xl": "_Heading--xl_crcfw_27", "Heading--l": "_Heading--l_crcfw_31", "Heading--m": "_Heading--m_crcfw_35", "Heading--s": "_Heading--s_crcfw_39", "Heading--xs": "_Heading--xs_crcfw_43" };
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" };
1436
1436
 
1437
1437
  // components/Heading/index.tsx
1438
1438
  import { jsx as jsx11 } from "react/jsx-runtime";
@@ -1797,13 +1797,13 @@ init_react_import();
1797
1797
  init_react_import();
1798
1798
  import * as SelectPrimitive from "@radix-ui/react-select";
1799
1799
 
1800
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/ui/Select/styles.module.css#css-module
1800
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/ui/Select/styles.module.css#css-module
1801
1801
  init_react_import();
1802
- var styles_module_default7 = { "FeSelect-trigger": "_FeSelect-trigger_13era_3", "FeSelect-triggerIcon": "_FeSelect-triggerIcon_13era_54", "FeSelect-content": "_FeSelect-content_13era_61", "FeSelect-viewport": "_FeSelect-viewport_13era_84", "FeSelect-item": "_FeSelect-item_13era_93", "FeSelect-itemIndicator": "_FeSelect-itemIndicator_13era_119", "FeSelect-group": "_FeSelect-group_13era_131", "FeSelect-label": "_FeSelect-label_13era_135", "FeSelect-separator": "_FeSelect-separator_13era_144", "FeSelect-scrollButton": "_FeSelect-scrollButton_13era_152" };
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" };
1803
1803
 
1804
1804
  // components/ui/Select/index.tsx
1805
1805
  import { jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
1806
- var getClassName10 = get_class_name_factory_default("FeSelect", styles_module_default7);
1806
+ var getClassName10 = get_class_name_factory_default("EditorSelect", styles_module_default7);
1807
1807
  var joinClassNames = (...values) => values.filter(Boolean).join(" ");
1808
1808
  function Select(_a) {
1809
1809
  var props = __objRest(_a, []);
@@ -2047,7 +2047,7 @@ EditorFallback.displayName = "EditorFallback";
2047
2047
  // components/AutoField/fields/RichtextField/index.tsx
2048
2048
  import { Fragment as Fragment3, jsx as jsx19 } from "react/jsx-runtime";
2049
2049
  var Editor = lazy(
2050
- () => import("./Editor-2TYODRQT.mjs").then((m) => ({
2050
+ () => import("./Editor-YNFB7B6Z.mjs").then((m) => ({
2051
2051
  default: m.Editor
2052
2052
  }))
2053
2053
  );
@@ -2085,9 +2085,9 @@ var RichtextField = ({
2085
2085
  // components/AutoField/fields/ObjectField/index.tsx
2086
2086
  init_react_import();
2087
2087
 
2088
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/AutoField/fields/ObjectField/styles.module.css#css-module
2088
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/AutoField/fields/ObjectField/styles.module.css#css-module
2089
2089
  init_react_import();
2090
- var styles_module_default8 = { "ObjectField": "_ObjectField_1o8gv_5", "ObjectField-fieldset": "_ObjectField-fieldset_1o8gv_13" };
2090
+ var styles_module_default8 = { "ObjectField": "_ObjectField_1byjv_5", "ObjectField-fieldset": "_ObjectField-fieldset_1byjv_13" };
2091
2091
 
2092
2092
  // components/AutoField/fields/ObjectField/index.tsx
2093
2093
  import { jsx as jsx20 } from "react/jsx-runtime";
@@ -2369,9 +2369,9 @@ import {
2369
2369
  useTransition
2370
2370
  } from "react";
2371
2371
 
2372
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/DraggableComponent/styles.module.css#css-module
2372
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/DraggableComponent/styles.module.css#css-module
2373
2373
  init_react_import();
2374
- var styles_module_default9 = { "DraggableComponent": "_DraggableComponent_d90mv_1", "DraggableComponent-overlayWrapper": "_DraggableComponent-overlayWrapper_d90mv_12", "DraggableComponent-overlay": "_DraggableComponent-overlay_d90mv_12", "DraggableComponent-loadingOverlay": "_DraggableComponent-loadingOverlay_d90mv_36", "DraggableComponent--hover": "_DraggableComponent--hover_d90mv_53", "DraggableComponent--isSelected": "_DraggableComponent--isSelected_d90mv_60", "DraggableComponent--isGlobal": "_DraggableComponent--isGlobal_d90mv_69", "DraggableComponent-actionsOverlay": "_DraggableComponent-actionsOverlay_d90mv_105", "DraggableComponent-actions": "_DraggableComponent-actions_d90mv_105" };
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" };
2375
2375
 
2376
2376
  // components/DraggableComponent/index.tsx
2377
2377
  import { createPortal as createPortal2 } from "react-dom";
@@ -3106,9 +3106,9 @@ var DraggableComponent = ({
3106
3106
  ] });
3107
3107
  };
3108
3108
 
3109
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/DropZone/styles.module.css#css-module
3109
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/DropZone/styles.module.css#css-module
3110
3110
  init_react_import();
3111
- var styles_module_default10 = { "DropZone": "_DropZone_q9qsx_1", "DropZone--hasChildren": "_DropZone--hasChildren_q9qsx_11", "DropZone--isAreaSelected": "_DropZone--isAreaSelected_q9qsx_24", "DropZone--hoveringOverArea": "_DropZone--hoveringOverArea_q9qsx_25", "DropZone--isRootZone": "_DropZone--isRootZone_q9qsx_25", "DropZone--isDestination": "_DropZone--isDestination_q9qsx_39", "DropZone-item": "_DropZone-item_q9qsx_48", "DropZone-hitbox": "_DropZone-hitbox_q9qsx_52", "DropZone--isEnabled": "_DropZone--isEnabled_q9qsx_60", "DropZone--isAnimating": "_DropZone--isAnimating_q9qsx_70" };
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" };
3112
3112
 
3113
3113
  // components/DropZone/index.tsx
3114
3114
  import { useDroppable as useDroppable2 } from "@dnd-kit/react";
@@ -3116,9 +3116,9 @@ import { useDroppable as useDroppable2 } from "@dnd-kit/react";
3116
3116
  // components/Drawer/index.tsx
3117
3117
  init_react_import();
3118
3118
 
3119
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/Drawer/styles.module.css#css-module
3119
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Drawer/styles.module.css#css-module
3120
3120
  init_react_import();
3121
- var styles_module_default11 = { "Drawer": "_Drawer_rcm43_1", "Drawer--tile": "_Drawer--tile_rcm43_8", "Drawer-draggable": "_Drawer-draggable_rcm43_19", "Drawer-draggableBg": "_Drawer-draggableBg_rcm43_23", "DrawerItem-draggable": "_DrawerItem-draggable_rcm43_33", "DrawerItem-icon": "_DrawerItem-icon_rcm43_50", "DrawerItem--disabled": "_DrawerItem--disabled_rcm43_56", "DrawerItem": "_DrawerItem_rcm43_33", "Drawer--isDraggingFrom": "_Drawer--isDraggingFrom_rcm43_66", "DrawerItem-name": "_DrawerItem-name_rcm43_91" };
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" };
3122
3122
 
3123
3123
  // components/Drawer/index.tsx
3124
3124
  import { useMemo as useMemo9, useState as useState11 } from "react";
@@ -4422,7 +4422,7 @@ var registerOverlayPortal = (el, opts = {}) => {
4422
4422
  };
4423
4423
  };
4424
4424
 
4425
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/InlineTextField/styles.module.css#css-module
4425
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/InlineTextField/styles.module.css#css-module
4426
4426
  init_react_import();
4427
4427
  var styles_module_default12 = { "InlineTextField": "_InlineTextField_104qp_1" };
4428
4428
 
@@ -4586,12 +4586,12 @@ import {
4586
4586
  } from "react";
4587
4587
  import { jsx as jsx29 } from "react/jsx-runtime";
4588
4588
  var Editor2 = lazy2(
4589
- () => import("./Editor-2TYODRQT.mjs").then((m) => ({
4589
+ () => import("./Editor-YNFB7B6Z.mjs").then((m) => ({
4590
4590
  default: m.Editor
4591
4591
  }))
4592
4592
  );
4593
4593
  var RichTextRender = lazy2(
4594
- () => import("./Render-VDC7AEQK.mjs").then((m) => ({
4594
+ () => import("./Render-STFB5CNO.mjs").then((m) => ({
4595
4595
  default: m.RichTextRender
4596
4596
  }))
4597
4597
  );
@@ -5434,49 +5434,49 @@ import React3, { useMemo as useMemo13 } from "react";
5434
5434
 
5435
5435
  // lib/resolve-globals.ts
5436
5436
  init_react_import();
5437
- function resolveItem(item, globalData, config, visitedTypes) {
5438
- var _a, _b, _c, _d, _e;
5437
+ function resolveItem(item, globals, config, visitedTypes) {
5438
+ var _a, _b, _c, _d;
5439
5439
  const type = item.type;
5440
5440
  const componentConfig = config.components[type];
5441
- const globalEntry = globalData[type];
5442
- const isUnlinked = ((_a = item.props) == null ? void 0 : _a.__synced) === false;
5441
+ const globalEntry = globals[type];
5443
5442
  const shouldApplyGlobal = Boolean(
5444
- (componentConfig == null ? void 0 : componentConfig.global) && globalEntry && !visitedTypes.has(type) && !isUnlinked
5443
+ (componentConfig == null ? void 0 : componentConfig.global) && item.synced && globalEntry && !visitedTypes.has(type)
5445
5444
  );
5446
5445
  let mergedProps;
5447
5446
  if (shouldApplyGlobal) {
5448
5447
  mergedProps = __spreadProps(__spreadValues({}, globalEntry.props), {
5449
- children: (_b = item.props) == null ? void 0 : _b.children,
5450
- id: (_c = item.props) == null ? void 0 : _c.id
5448
+ children: (_a = item.props) == null ? void 0 : _a.children,
5449
+ id: (_b = item.props) == null ? void 0 : _b.id
5451
5450
  });
5452
5451
  } else {
5453
- if ((componentConfig == null ? void 0 : componentConfig.global) && globalEntry && visitedTypes.has(type) && typeof process !== "undefined" && process.env.NODE_ENV !== "production") {
5452
+ if ((componentConfig == null ? void 0 : componentConfig.global) && item.synced && globalEntry && visitedTypes.has(type) && typeof process !== "undefined" && process.env.NODE_ENV !== "production") {
5454
5453
  console.warn(
5455
5454
  `[resolveGlobals] cycle detected while resolving global "${type}" \u2014 leaving reference unresolved`
5456
5455
  );
5457
5456
  }
5458
- mergedProps = __spreadValues({}, (_d = item.props) != null ? _d : {});
5457
+ mergedProps = __spreadValues({}, (_c = item.props) != null ? _c : {});
5459
5458
  }
5460
- const fields = (_e = componentConfig == null ? void 0 : componentConfig.fields) != null ? _e : {};
5459
+ const fields = (_d = componentConfig == null ? void 0 : componentConfig.fields) != null ? _d : {};
5461
5460
  const nextVisited = shouldApplyGlobal ? /* @__PURE__ */ new Set([...visitedTypes, type]) : visitedTypes;
5462
5461
  for (const [fieldName, fieldDef] of Object.entries(fields)) {
5463
5462
  if ((fieldDef == null ? void 0 : fieldDef.type) === "slot") {
5464
5463
  const slotValue = mergedProps[fieldName];
5465
5464
  if (Array.isArray(slotValue)) {
5466
5465
  mergedProps[fieldName] = slotValue.map(
5467
- (child) => child && typeof child === "object" && "type" in child && "props" in child ? resolveItem(child, globalData, config, nextVisited) : child
5466
+ (child) => child && typeof child === "object" && "type" in child && "props" in child ? resolveItem(child, globals, config, nextVisited) : child
5468
5467
  );
5469
5468
  }
5470
5469
  }
5471
5470
  }
5472
5471
  return __spreadProps(__spreadValues({}, item), { props: mergedProps });
5473
5472
  }
5474
- function resolveGlobals(data, globalData, config) {
5473
+ function resolveGlobals(data, config) {
5475
5474
  var _a;
5476
- if (!globalData || Object.keys(globalData).length === 0) return data;
5475
+ const globals = data.globals;
5476
+ if (!globals || Object.keys(globals).length === 0) return data;
5477
5477
  const visited = /* @__PURE__ */ new Set();
5478
5478
  const content = ((_a = data.content) != null ? _a : []).map(
5479
- (item) => resolveItem(item, globalData, config, visited)
5479
+ (item) => resolveItem(item, globals, config, visited)
5480
5480
  );
5481
5481
  return __spreadProps(__spreadValues({}, data), { content });
5482
5482
  }
@@ -5491,7 +5491,6 @@ var renderContext = React3.createContext({
5491
5491
  function Render({
5492
5492
  config,
5493
5493
  data,
5494
- globalData,
5495
5494
  metadata = {}
5496
5495
  }) {
5497
5496
  var _a, _b;
@@ -5500,8 +5499,8 @@ function Render({
5500
5499
  root: data.root || {},
5501
5500
  content: data.content || []
5502
5501
  });
5503
- return resolveGlobals(base, globalData, config);
5504
- }, [data, globalData, config]);
5502
+ return resolveGlobals(base, config);
5503
+ }, [data, config]);
5505
5504
  const rootProps = "props" in defaultedData.root ? defaultedData.root.props : defaultedData.root;
5506
5505
  const title = (rootProps == null ? void 0 : rootProps.title) || "";
5507
5506
  const pageProps = __spreadProps(__spreadValues({}, rootProps), {
@@ -5537,9 +5536,9 @@ function Render({
5537
5536
  // components/ComponentList/index.tsx
5538
5537
  init_react_import();
5539
5538
 
5540
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/ComponentList/styles.module.css#css-module
5539
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/ComponentList/styles.module.css#css-module
5541
5540
  init_react_import();
5542
- var styles_module_default13 = { "ComponentList": "_ComponentList_apsvr_1", "ComponentList--isExpanded": "_ComponentList--isExpanded_apsvr_5", "ComponentList-content": "_ComponentList-content_apsvr_9", "ComponentList-title": "_ComponentList-title_apsvr_17", "ComponentList-titleIcon": "_ComponentList-titleIcon_apsvr_54" };
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" };
5543
5542
 
5544
5543
  // components/ComponentList/index.tsx
5545
5544
  import { useEffect as useEffect17 } from "react";
@@ -5787,9 +5786,9 @@ init_react_import();
5787
5786
  init_react_import();
5788
5787
  import { useMemo as useMemo14, useState as useState17 } from "react";
5789
5788
 
5790
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/Editor/components/Components/styles.module.css#css-module
5789
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Components/styles.module.css#css-module
5791
5790
  init_react_import();
5792
- var styles_module_default14 = { "Components-search": "_Components-search_4hb2y_1", "Components-searchIcon": "_Components-searchIcon_4hb2y_8", "Components-searchInput": "_Components-searchInput_4hb2y_16", "Components-empty": "_Components-empty_4hb2y_39" };
5791
+ 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" };
5793
5792
 
5794
5793
  // components/Editor/components/Components/index.tsx
5795
5794
  import { jsx as jsx35, jsxs as jsxs12 } from "react/jsx-runtime";
@@ -5881,7 +5880,7 @@ var Components = () => {
5881
5880
  ] });
5882
5881
  };
5883
5882
 
5884
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/plugins/blocks/styles.module.css#css-module
5883
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/plugins/blocks/styles.module.css#css-module
5885
5884
  init_react_import();
5886
5885
  var styles_module_default15 = { "BlocksPlugin": "_BlocksPlugin_15ud0_1" };
5887
5886
 
@@ -5904,9 +5903,9 @@ init_react_import();
5904
5903
  // components/LayerTree/index.tsx
5905
5904
  init_react_import();
5906
5905
 
5907
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/LayerTree/styles.module.css#css-module
5906
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/LayerTree/styles.module.css#css-module
5908
5907
  init_react_import();
5909
- var styles_module_default16 = { "LayerTree": "_LayerTree_vc8bi_1", "LayerTree-zoneTitle": "_LayerTree-zoneTitle_vc8bi_11", "LayerTree-helper": "_LayerTree-helper_vc8bi_17", "Layer": "_Layer_vc8bi_1", "Layer-inner": "_Layer-inner_vc8bi_34", "Layer--containsZone": "_Layer--containsZone_vc8bi_42", "Layer-clickable": "_Layer-clickable_vc8bi_46", "Layer--isSelected": "_Layer--isSelected_vc8bi_68", "Layer-icon": "_Layer-icon_vc8bi_80", "Layer-zoneIcon": "_Layer-zoneIcon_vc8bi_81", "Layer-chevron": "_Layer-chevron_vc8bi_85", "Layer--childIsSelected": "_Layer--childIsSelected_vc8bi_97", "Layer-zones": "_Layer-zones_vc8bi_101", "Layer-title": "_Layer-title_vc8bi_117", "Layer-name": "_Layer-name_vc8bi_130", "Layer--isGlobal": "_Layer--isGlobal_vc8bi_150", "Layer--isUnlinked": "_Layer--isUnlinked_vc8bi_171", "Layer-unlinkedGlyph": "_Layer-unlinkedGlyph_vc8bi_175" };
5908
+ 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" };
5910
5909
 
5911
5910
  // components/LayerTree/index.tsx
5912
5911
  import {
@@ -6045,8 +6044,8 @@ var Layer = forwardRef2(function Layer2({
6045
6044
  );
6046
6045
  const isUnlinked = useAppStore(
6047
6046
  (s) => {
6048
- var _a, _b, _c;
6049
- return ((_c = (_b = (_a = s.state.indexes.nodes[node.itemId]) == null ? void 0 : _a.data) == null ? void 0 : _b.props) == null ? void 0 : _c.__synced) === false;
6047
+ var _a, _b;
6048
+ return ((_b = (_a = s.state.indexes.nodes[node.itemId]) == null ? void 0 : _a.data) == null ? void 0 : _b.synced) === false;
6050
6049
  }
6051
6050
  );
6052
6051
  const containsZone = node.childZones.length > 0;
@@ -6342,7 +6341,7 @@ var Outline = () => {
6342
6341
  ) });
6343
6342
  };
6344
6343
 
6345
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/plugins/outline/styles.module.css#css-module
6344
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/plugins/outline/styles.module.css#css-module
6346
6345
  init_react_import();
6347
6346
  var styles_module_default17 = { "OutlinePlugin": "_OutlinePlugin_q92j6_1" };
6348
6347
 
@@ -6362,9 +6361,9 @@ init_react_import();
6362
6361
  // components/Breadcrumbs/index.tsx
6363
6362
  init_react_import();
6364
6363
 
6365
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/Breadcrumbs/styles.module.css#css-module
6364
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Breadcrumbs/styles.module.css#css-module
6366
6365
  init_react_import();
6367
- var styles_module_default18 = { "Breadcrumbs": "_Breadcrumbs_cvmoz_1", "Breadcrumbs-breadcrumb": "_Breadcrumbs-breadcrumb_cvmoz_10", "Breadcrumbs-breadcrumbLabel": "_Breadcrumbs-breadcrumbLabel_cvmoz_17" };
6366
+ var styles_module_default18 = { "Breadcrumbs": "_Breadcrumbs_1cjxk_1", "Breadcrumbs-breadcrumb": "_Breadcrumbs-breadcrumb_1cjxk_10", "Breadcrumbs-breadcrumbLabel": "_Breadcrumbs-breadcrumbLabel_1cjxk_17" };
6368
6367
 
6369
6368
  // lib/use-breadcrumbs.ts
6370
6369
  init_react_import();
@@ -6439,9 +6438,9 @@ var Breadcrumbs = ({
6439
6438
  // components/Editor/components/Fields/index.tsx
6440
6439
  init_react_import();
6441
6440
 
6442
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/Editor/components/Fields/styles.module.css#css-module
6441
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Fields/styles.module.css#css-module
6443
6442
  init_react_import();
6444
- var styles_module_default19 = { "EditorFields": "_EditorFields_1di93_1", "EditorFields--isLoading": "_EditorFields--isLoading_1di93_6", "EditorFields-loadingOverlay": "_EditorFields-loadingOverlay_1di93_10", "EditorFields-loadingOverlayInner": "_EditorFields-loadingOverlayInner_1di93_25", "EditorFields-field": "_EditorFields-field_1di93_32", "EditorFields--wrapFields": "_EditorFields--wrapFields_1di93_36", "EditorFields-syncButton": "_EditorFields-syncButton_1di93_46", "EditorFields-syncButton--unlinked": "_EditorFields-syncButton--unlinked_1di93_78" };
6443
+ 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" };
6445
6444
 
6446
6445
  // components/Editor/components/Fields/index.tsx
6447
6446
  import {
@@ -6559,29 +6558,22 @@ var FieldsChild = ({ fieldName }) => {
6559
6558
  };
6560
6559
  var FieldsChildMemo = memo8(FieldsChild);
6561
6560
  var GlobalSyncButton = () => {
6562
- var _a;
6563
6561
  const appStore = useAppStoreApi();
6564
6562
  const selectedItem = useAppStore((s) => s.selectedItem);
6565
6563
  const isGlobalType = useAppStore(
6566
6564
  (s) => {
6567
- var _a2;
6568
- return selectedItem ? ((_a2 = s.config.components[selectedItem.type]) == null ? void 0 : _a2.global) === true : false;
6565
+ var _a;
6566
+ return selectedItem ? ((_a = s.config.components[selectedItem.type]) == null ? void 0 : _a.global) === true : false;
6569
6567
  }
6570
6568
  );
6571
6569
  if (!selectedItem || !isGlobalType) return null;
6572
- const isUnlinked = ((_a = selectedItem.props) == null ? void 0 : _a.__synced) === false;
6570
+ const isUnlinked = selectedItem.synced === false;
6573
6571
  const onClick = () => __async(null, null, function* () {
6574
6572
  const { dispatch, state, resolveComponentData } = appStore.getState();
6575
- const newProps = __spreadValues({}, selectedItem.props);
6576
- if (isUnlinked) {
6577
- delete newProps.__synced;
6578
- } else {
6579
- newProps.__synced = false;
6580
- }
6581
6573
  const latestSelector = getSelectorForId(state, selectedItem.props.id);
6582
6574
  if (!latestSelector) return;
6583
6575
  const resolved = yield resolveComponentData(
6584
- __spreadProps(__spreadValues({}, selectedItem), { props: newProps }),
6576
+ __spreadProps(__spreadValues({}, selectedItem), { synced: isUnlinked ? true : false }),
6585
6577
  "replace"
6586
6578
  );
6587
6579
  dispatch({
@@ -6644,9 +6636,9 @@ var FieldsInternal = ({ wrapFields = true }) => {
6644
6636
  };
6645
6637
  var Fields = memo8(FieldsInternal);
6646
6638
 
6647
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/plugins/fields/styles.module.css#css-module
6639
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/plugins/fields/styles.module.css#css-module
6648
6640
  init_react_import();
6649
- var styles_module_default20 = { "FieldsPlugin": "_FieldsPlugin_l8h4q_1", "FieldsPlugin-header": "_FieldsPlugin-header_l8h4q_7" };
6641
+ var styles_module_default20 = { "FieldsPlugin": "_FieldsPlugin_262zt_1", "FieldsPlugin-header": "_FieldsPlugin-header_262zt_7" };
6650
6642
 
6651
6643
  // plugins/fields/index.tsx
6652
6644
  import { jsx as jsx42, jsxs as jsxs16 } from "react/jsx-runtime";
@@ -6678,8 +6670,8 @@ import {
6678
6670
  useContext as useContext15,
6679
6671
  useEffect as useEffect26,
6680
6672
  useMemo as useMemo24,
6681
- useRef as useRef17,
6682
- useState as useState23
6673
+ useRef as useRef18,
6674
+ useState as useState24
6683
6675
  } from "react";
6684
6676
 
6685
6677
  // components/Editor/components/Preview/index.tsx
@@ -6984,7 +6976,7 @@ function AutoFrame(_a) {
6984
6976
  AutoFrame.displayName = "AutoFrame";
6985
6977
  var AutoFrame_default = AutoFrame;
6986
6978
 
6987
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/Editor/components/Preview/styles.module.css#css-module
6979
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Preview/styles.module.css#css-module
6988
6980
  init_react_import();
6989
6981
  var styles_module_default21 = { "EditorPreview": "_EditorPreview_xou64_1", "EditorPreview-frame": "_EditorPreview-frame_xou64_6" };
6990
6982
 
@@ -7141,16 +7133,16 @@ import { deepEqual as deepEqual2 } from "fast-equals";
7141
7133
 
7142
7134
  // lib/split-global-data.ts
7143
7135
  init_react_import();
7144
- function splitGlobalData(data, config) {
7145
- var _a;
7146
- const extracted = {};
7136
+ function splitGlobals(data, config) {
7137
+ var _a, _b;
7138
+ const extracted = __spreadValues({}, (_a = data.globals) != null ? _a : {});
7147
7139
  function visit(node) {
7148
- var _a2, _b;
7140
+ var _a2, _b2;
7149
7141
  const type = node.type;
7150
7142
  const componentConfig = config.components[type];
7151
7143
  const fields = (_a2 = componentConfig == null ? void 0 : componentConfig.fields) != null ? _a2 : {};
7152
- const isGlobal = (componentConfig == null ? void 0 : componentConfig.global) === true;
7153
- const processedProps = __spreadValues({}, (_b = node.props) != null ? _b : {});
7144
+ const isGlobalType = (componentConfig == null ? void 0 : componentConfig.global) === true;
7145
+ const processedProps = __spreadValues({}, (_b2 = node.props) != null ? _b2 : {});
7154
7146
  for (const [fieldName, fieldDef] of Object.entries(fields)) {
7155
7147
  if ((fieldDef == null ? void 0 : fieldDef.type) === "slot") {
7156
7148
  const slotValue = processedProps[fieldName];
@@ -7161,27 +7153,25 @@ function splitGlobalData(data, config) {
7161
7153
  }
7162
7154
  }
7163
7155
  }
7164
- if (!isGlobal) {
7165
- return __spreadProps(__spreadValues({}, node), { props: processedProps });
7166
- }
7167
- if (processedProps.__synced === false) {
7156
+ if (!isGlobalType || !node.synced) {
7168
7157
  return __spreadProps(__spreadValues({}, node), { props: processedProps });
7169
7158
  }
7170
7159
  const _c = processedProps, { children, id } = _c, sharedProps = __objRest(_c, ["children", "id"]);
7171
- if (!extracted[type]) {
7172
- extracted[type] = { props: sharedProps };
7173
- }
7160
+ extracted[type] = { props: sharedProps };
7174
7161
  const instanceProps = { id };
7175
7162
  if (children !== void 0) instanceProps.children = children;
7176
- return __spreadProps(__spreadValues({}, node), { props: instanceProps });
7163
+ return __spreadProps(__spreadValues({}, node), {
7164
+ props: instanceProps,
7165
+ synced: true
7166
+ });
7177
7167
  }
7178
- const strippedContent = ((_a = data.content) != null ? _a : []).map(
7168
+ const strippedContent = ((_b = data.content) != null ? _b : []).map(
7179
7169
  (item) => visit(item)
7180
7170
  );
7181
- return {
7182
- data: __spreadProps(__spreadValues({}, data), { content: strippedContent }),
7183
- globalData: extracted
7184
- };
7171
+ return __spreadProps(__spreadValues({}, data), {
7172
+ content: strippedContent,
7173
+ globals: extracted
7174
+ });
7185
7175
  }
7186
7176
 
7187
7177
  // components/Editor/components/Layout/index.tsx
@@ -7190,13 +7180,13 @@ import {
7190
7180
  useCallback as useCallback22,
7191
7181
  useEffect as useEffect25,
7192
7182
  useMemo as useMemo23,
7193
- useRef as useRef16,
7194
- useState as useState22
7183
+ useRef as useRef17,
7184
+ useState as useState23
7195
7185
  } from "react";
7196
7186
 
7197
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/Editor/components/Layout/styles.module.css#css-module
7187
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Layout/styles.module.css#css-module
7198
7188
  init_react_import();
7199
- var styles_module_default22 = { "Editor": "_Editor_17yd6_19", "Editor-portal": "_Editor-portal_17yd6_32", "EditorLayout": "_EditorLayout_17yd6_37", "EditorLayout-inner": "_EditorLayout-inner_17yd6_41", "Editor--hidePlugins": "_Editor--hidePlugins_17yd6_73", "EditorLayout--mounted": "_EditorLayout--mounted_17yd6_78", "EditorLayout--mobilePanelHeightToggle": "_EditorLayout--mobilePanelHeightToggle_17yd6_82", "EditorLayout--leftSideBarVisible": "_EditorLayout--leftSideBarVisible_17yd6_82", "EditorLayout--mobilePanelCustomHeight": "_EditorLayout--mobilePanelCustomHeight_17yd6_87", "EditorLayout--mobilePanelHeightMinContent": "_EditorLayout--mobilePanelHeightMinContent_17yd6_105", "EditorLayout--rightSideBarVisible": "_EditorLayout--rightSideBarVisible_17yd6_127", "EditorLayout-mounted": "_EditorLayout-mounted_17yd6_146", "EditorLayout-nav": "_EditorLayout-nav_17yd6_187", "Editor-fieldSideBarToolbar": "_Editor-fieldSideBarToolbar_17yd6_203", "Editor-fieldSideBarHistory": "_Editor-fieldSideBarHistory_17yd6_213", "Editor-fieldSideBarActions": "_Editor-fieldSideBarActions_17yd6_219", "EditorLayout-mobilePanel": "_EditorLayout-mobilePanel_17yd6_225", "EditorLayout-mobilePanelContent": "_EditorLayout-mobilePanelContent_17yd6_245", "EditorLayout-mobileDragHandle": "_EditorLayout-mobileDragHandle_17yd6_252", "EditorLayout-mobileDragHandlePill": "_EditorLayout-mobileDragHandlePill_17yd6_266", "EditorPluginTab": "_EditorPluginTab_17yd6_273", "EditorPluginTab--visible": "_EditorPluginTab--visible_17yd6_279", "EditorPluginTab-body": "_EditorPluginTab-body_17yd6_284" };
7189
+ 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" };
7200
7190
 
7201
7191
  // lib/use-inject-css.ts
7202
7192
  init_react_import();
@@ -7251,9 +7241,9 @@ var usePreviewModeHotkeys = () => {
7251
7241
  // components/SidebarSection/index.tsx
7252
7242
  init_react_import();
7253
7243
 
7254
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/SidebarSection/styles.module.css#css-module
7244
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/SidebarSection/styles.module.css#css-module
7255
7245
  init_react_import();
7256
- var styles_module_default23 = { "SidebarSection": "_SidebarSection_1jefg_1", "SidebarSection-title": "_SidebarSection-title_1jefg_12", "SidebarSection--noBorderTop": "_SidebarSection--noBorderTop_1jefg_20", "SidebarSection-content": "_SidebarSection-content_1jefg_24", "SidebarSection-breadcrumbLabel": "_SidebarSection-breadcrumbLabel_1jefg_33", "SidebarSection-breadcrumbs": "_SidebarSection-breadcrumbs_1jefg_62", "SidebarSection-breadcrumb": "_SidebarSection-breadcrumb_1jefg_33", "SidebarSection-heading": "_SidebarSection-heading_1jefg_74", "SidebarSection-loadingOverlay": "_SidebarSection-loadingOverlay_1jefg_88" };
7246
+ 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" };
7257
7247
 
7258
7248
  // components/SidebarSection/index.tsx
7259
7249
  import { jsx as jsx46, jsxs as jsxs17 } from "react/jsx-runtime";
@@ -7282,21 +7272,146 @@ import {
7282
7272
  useCallback as useCallback18,
7283
7273
  useEffect as useEffect23,
7284
7274
  useMemo as useMemo22,
7285
- useRef as useRef13,
7286
- useState as useState20
7275
+ useRef as useRef14,
7276
+ useState as useState21
7287
7277
  } from "react";
7288
7278
 
7289
7279
  // components/BrowserBar/index.tsx
7290
7280
  init_react_import();
7291
- import { useMemo as useMemo20 } from "react";
7281
+ import { useMemo as useMemo20, useRef as useRef12, useState as useState20 } from "react";
7292
7282
 
7293
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/BrowserBar/styles.module.css#css-module
7283
+ // components/ui/Combobox/index.tsx
7294
7284
  init_react_import();
7295
- var styles_module_default24 = { "BrowserBar": "_BrowserBar_oz0sq_1", "BrowserBar-urlTrigger": "_BrowserBar-urlTrigger_oz0sq_16", "BrowserBar-urlIcon": "_BrowserBar-urlIcon_oz0sq_47", "BrowserBar-urlText": "_BrowserBar-urlText_oz0sq_52", "BrowserBar-urlPath": "_BrowserBar-urlPath_oz0sq_64", "BrowserBar-urlTitle": "_BrowserBar-urlTitle_oz0sq_69", "BrowserBar-actions": "_BrowserBar-actions_oz0sq_82", "BrowserBar-deviceIcon": "_BrowserBar-deviceIcon_oz0sq_89" };
7285
+ import { Combobox as ComboboxPrimitive } from "@base-ui/react";
7296
7286
 
7297
- // components/BrowserBar/index.tsx
7287
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/ui/Combobox/styles.module.css#css-module
7288
+ init_react_import();
7289
+ 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" };
7290
+
7291
+ // components/ui/Combobox/index.tsx
7298
7292
  import { jsx as jsx47, jsxs as jsxs18 } from "react/jsx-runtime";
7299
- var getClassName28 = get_class_name_factory_default("BrowserBar", styles_module_default24);
7293
+ var getClassName28 = get_class_name_factory_default("EditorCombobox", styles_module_default24);
7294
+ var join = (...values) => values.filter(Boolean).join(" ");
7295
+ var mergeClassName = (base, override) => {
7296
+ if (!override) return base;
7297
+ if (typeof override === "function") {
7298
+ return (state) => join(base, override(state));
7299
+ }
7300
+ return join(base, override);
7301
+ };
7302
+ var Combobox = ComboboxPrimitive.Root;
7303
+ function ComboboxInput(_a) {
7304
+ var _b = _a, {
7305
+ className
7306
+ } = _b, props = __objRest(_b, [
7307
+ "className"
7308
+ ]);
7309
+ return /* @__PURE__ */ jsx47(
7310
+ ComboboxPrimitive.Input,
7311
+ __spreadValues({
7312
+ "data-slot": "combobox-input",
7313
+ className: mergeClassName(getClassName28("input"), className)
7314
+ }, props)
7315
+ );
7316
+ }
7317
+ function ComboboxContent(_a) {
7318
+ var _b = _a, {
7319
+ className,
7320
+ side = "bottom",
7321
+ sideOffset = 4,
7322
+ align = "start",
7323
+ alignOffset = 0,
7324
+ children
7325
+ } = _b, props = __objRest(_b, [
7326
+ "className",
7327
+ "side",
7328
+ "sideOffset",
7329
+ "align",
7330
+ "alignOffset",
7331
+ "children"
7332
+ ]);
7333
+ return /* @__PURE__ */ jsx47(ComboboxPrimitive.Portal, { children: /* @__PURE__ */ jsx47(
7334
+ ComboboxPrimitive.Positioner,
7335
+ {
7336
+ side,
7337
+ sideOffset,
7338
+ align,
7339
+ alignOffset,
7340
+ className: getClassName28("positioner"),
7341
+ children: /* @__PURE__ */ jsx47(
7342
+ ComboboxPrimitive.Popup,
7343
+ __spreadProps(__spreadValues({
7344
+ "data-slot": "combobox-content",
7345
+ className: mergeClassName(getClassName28("content"), className)
7346
+ }, props), {
7347
+ children
7348
+ })
7349
+ )
7350
+ }
7351
+ ) });
7352
+ }
7353
+ function ComboboxList(_a) {
7354
+ var _b = _a, {
7355
+ className
7356
+ } = _b, props = __objRest(_b, [
7357
+ "className"
7358
+ ]);
7359
+ return /* @__PURE__ */ jsx47(
7360
+ ComboboxPrimitive.List,
7361
+ __spreadValues({
7362
+ "data-slot": "combobox-list",
7363
+ className: mergeClassName(getClassName28("list"), className)
7364
+ }, props)
7365
+ );
7366
+ }
7367
+ function ComboboxItem(_a) {
7368
+ var _b = _a, {
7369
+ className,
7370
+ children
7371
+ } = _b, props = __objRest(_b, [
7372
+ "className",
7373
+ "children"
7374
+ ]);
7375
+ return /* @__PURE__ */ jsxs18(
7376
+ ComboboxPrimitive.Item,
7377
+ __spreadProps(__spreadValues({
7378
+ "data-slot": "combobox-item",
7379
+ className: mergeClassName(getClassName28("item"), className)
7380
+ }, props), {
7381
+ children: [
7382
+ /* @__PURE__ */ jsx47("span", { className: getClassName28("itemIndicator"), children: /* @__PURE__ */ jsx47(ComboboxPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx47(Check, { size: 14 }) }) }),
7383
+ children
7384
+ ]
7385
+ })
7386
+ );
7387
+ }
7388
+ function ComboboxEmpty(_a) {
7389
+ var _b = _a, {
7390
+ className
7391
+ } = _b, props = __objRest(_b, [
7392
+ "className"
7393
+ ]);
7394
+ return /* @__PURE__ */ jsx47(
7395
+ ComboboxPrimitive.Empty,
7396
+ __spreadValues({
7397
+ "data-slot": "combobox-empty",
7398
+ className: mergeClassName(getClassName28("empty"), className)
7399
+ }, props)
7400
+ );
7401
+ }
7402
+
7403
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/BrowserBar/styles.module.css#css-module
7404
+ init_react_import();
7405
+ 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" };
7406
+
7407
+ // components/BrowserBar/index.tsx
7408
+ import { jsx as jsx48, jsxs as jsxs19 } from "react/jsx-runtime";
7409
+ var normalizeRoute = (raw) => {
7410
+ const trimmed = raw.trim();
7411
+ if (!trimmed) return trimmed;
7412
+ return trimmed.startsWith("/") ? trimmed : `/${trimmed}`;
7413
+ };
7414
+ var getClassName29 = get_class_name_factory_default("BrowserBar", styles_module_default25);
7300
7415
  var DEVICE_VIEWPORTS = {
7301
7416
  desktop: { width: "100%", height: "auto", icon: "Monitor", label: "Desktop" },
7302
7417
  mobile: { width: 360, height: "auto", icon: "Smartphone", label: "Mobile" }
@@ -7304,7 +7419,6 @@ var DEVICE_VIEWPORTS = {
7304
7419
  var BrowserBar = ({
7305
7420
  onViewportChange
7306
7421
  }) => {
7307
- var _a;
7308
7422
  const { routes, currentPath, onRouteChange } = usePropsContext();
7309
7423
  const viewports = useAppStore((s) => s.state.ui.viewports);
7310
7424
  const dispatch = useAppStore((s) => s.dispatch);
@@ -7332,59 +7446,95 @@ var BrowserBar = ({
7332
7446
  onViewportChange == null ? void 0 : onViewportChange(DEVICE_VIEWPORTS[device]);
7333
7447
  };
7334
7448
  const showRoutePicker = !!routes && currentPath !== void 0 && !!onRouteChange;
7335
- const selectedTitle = (_a = routes == null ? void 0 : routes.find((r) => r.path === currentPath)) == null ? void 0 : _a.title;
7336
- return /* @__PURE__ */ jsxs18("div", { className: getClassName28(), children: [
7337
- showRoutePicker ? /* @__PURE__ */ jsxs18(
7338
- Select,
7449
+ const [inputValue, setInputValue] = useState20(currentPath != null ? currentPath : "");
7450
+ const lastSyncedPath = useRef12(currentPath);
7451
+ if (lastSyncedPath.current !== currentPath) {
7452
+ lastSyncedPath.current = currentPath;
7453
+ setInputValue(currentPath != null ? currentPath : "");
7454
+ }
7455
+ const submit = (raw) => {
7456
+ const next = normalizeRoute(raw);
7457
+ if (!next || next === currentPath) return;
7458
+ void (onRouteChange == null ? void 0 : onRouteChange(next));
7459
+ };
7460
+ return /* @__PURE__ */ jsxs19("div", { className: getClassName29(), children: [
7461
+ showRoutePicker ? /* @__PURE__ */ jsxs19(
7462
+ Combobox,
7339
7463
  {
7464
+ items: routes.map((r) => r.path),
7340
7465
  value: currentPath,
7341
7466
  onValueChange: (next) => {
7342
- void (onRouteChange == null ? void 0 : onRouteChange(next));
7467
+ if (typeof next === "string") submit(next);
7343
7468
  },
7469
+ inputValue,
7470
+ onInputValueChange: (next) => setInputValue(next),
7471
+ autoHighlight: false,
7344
7472
  children: [
7345
- /* @__PURE__ */ jsxs18(SelectTrigger, { className: getClassName28("urlTrigger"), children: [
7346
- /* @__PURE__ */ jsx47(Globe, { className: getClassName28("urlIcon"), size: 14 }),
7347
- /* @__PURE__ */ jsxs18("span", { className: getClassName28("urlText"), children: [
7348
- /* @__PURE__ */ jsx47("span", { className: getClassName28("urlPath"), children: currentPath }),
7349
- selectedTitle ? /* @__PURE__ */ jsx47("span", { className: getClassName28("urlTitle"), children: selectedTitle }) : null
7350
- ] })
7351
- ] }),
7352
- /* @__PURE__ */ jsxs18(SelectContent, { children: [
7353
- routes.some((r) => r.path === currentPath) ? null : /* @__PURE__ */ jsx47(SelectItem, { value: currentPath, children: currentPath }),
7354
- routes.map((route) => /* @__PURE__ */ jsx47(SelectItem, { value: route.path, children: route.title }, route.path))
7473
+ /* @__PURE__ */ jsxs19(
7474
+ "form",
7475
+ {
7476
+ className: getClassName29("urlTrigger"),
7477
+ onSubmit: (event) => {
7478
+ event.preventDefault();
7479
+ submit(inputValue);
7480
+ },
7481
+ children: [
7482
+ /* @__PURE__ */ jsx48(Globe, { className: getClassName29("urlIcon"), size: 14 }),
7483
+ /* @__PURE__ */ jsx48(
7484
+ ComboboxInput,
7485
+ {
7486
+ className: getClassName29("urlInput"),
7487
+ placeholder: "/",
7488
+ spellCheck: false,
7489
+ autoCorrect: "off",
7490
+ autoCapitalize: "off"
7491
+ }
7492
+ )
7493
+ ]
7494
+ }
7495
+ ),
7496
+ /* @__PURE__ */ jsxs19(ComboboxContent, { children: [
7497
+ /* @__PURE__ */ jsx48(ComboboxEmpty, { children: "Press Enter to go to this path" }),
7498
+ /* @__PURE__ */ jsx48(ComboboxList, { children: (path) => {
7499
+ const route = routes.find((r) => r.path === path);
7500
+ return /* @__PURE__ */ jsxs19(ComboboxItem, { value: path, children: [
7501
+ /* @__PURE__ */ jsx48("span", { className: getClassName29("itemPath"), children: path }),
7502
+ (route == null ? void 0 : route.title) ? /* @__PURE__ */ jsx48("span", { className: getClassName29("itemTitle"), children: route.title }) : null
7503
+ ] }, path);
7504
+ } })
7355
7505
  ] })
7356
7506
  ]
7357
7507
  }
7358
- ) : /* @__PURE__ */ jsxs18("div", { className: getClassName28("urlTrigger"), children: [
7359
- /* @__PURE__ */ jsx47(Globe, { className: getClassName28("urlIcon"), size: 14 }),
7360
- /* @__PURE__ */ jsx47("span", { className: getClassName28("urlText"), children: "/" })
7508
+ ) : /* @__PURE__ */ jsxs19("div", { className: getClassName29("urlTrigger"), children: [
7509
+ /* @__PURE__ */ jsx48(Globe, { className: getClassName29("urlIcon"), size: 14 }),
7510
+ /* @__PURE__ */ jsx48("span", { className: getClassName29("urlText"), children: "/" })
7361
7511
  ] }),
7362
- /* @__PURE__ */ jsxs18("div", { className: getClassName28("actions"), children: [
7363
- /* @__PURE__ */ jsx47(
7512
+ /* @__PURE__ */ jsxs19("div", { className: getClassName29("actions"), children: [
7513
+ /* @__PURE__ */ jsx48(
7364
7514
  IconButton,
7365
7515
  {
7366
7516
  type: "button",
7367
7517
  title: activeDevice === "desktop" ? "Switch to mobile viewport" : "Switch to desktop viewport",
7368
7518
  onClick: () => setDevice(activeDevice === "desktop" ? "mobile" : "desktop"),
7369
- children: /* @__PURE__ */ jsx47("span", { className: getClassName28("deviceIcon"), children: activeDevice === "desktop" ? /* @__PURE__ */ jsx47(Monitor, { size: 16 }) : /* @__PURE__ */ jsx47(Smartphone, { size: 16 }) })
7519
+ children: /* @__PURE__ */ jsx48("span", { className: getClassName29("deviceIcon"), children: activeDevice === "desktop" ? /* @__PURE__ */ jsx48(Monitor, { size: 16 }) : /* @__PURE__ */ jsx48(Smartphone, { size: 16 }) })
7370
7520
  }
7371
7521
  ),
7372
- /* @__PURE__ */ jsx47(
7522
+ /* @__PURE__ */ jsx48(
7373
7523
  IconButton,
7374
7524
  {
7375
7525
  type: "button",
7376
7526
  title: isFullScreen ? "Exit full screen" : "Enter full screen",
7377
7527
  onClick: toggleFullScreen,
7378
- children: /* @__PURE__ */ jsx47("span", { className: getClassName28("deviceIcon"), children: isFullScreen ? /* @__PURE__ */ jsx47(Minimize, { size: 16 }) : /* @__PURE__ */ jsx47(Maximize, { size: 16 }) })
7528
+ children: /* @__PURE__ */ jsx48("span", { className: getClassName29("deviceIcon"), children: isFullScreen ? /* @__PURE__ */ jsx48(Minimize, { size: 16 }) : /* @__PURE__ */ jsx48(Maximize, { size: 16 }) })
7379
7529
  }
7380
7530
  )
7381
7531
  ] })
7382
7532
  ] });
7383
7533
  };
7384
7534
 
7385
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/Editor/components/Canvas/styles.module.css#css-module
7535
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Canvas/styles.module.css#css-module
7386
7536
  init_react_import();
7387
- var styles_module_default25 = { "EditorCanvas": "_EditorCanvas_19sb3_1", "EditorCanvas-controls": "_EditorCanvas-controls_19sb3_17", "EditorCanvas--fullScreen": "_EditorCanvas--fullScreen_19sb3_22", "EditorCanvas-inner": "_EditorCanvas-inner_19sb3_33", "EditorCanvas-rootColumn": "_EditorCanvas-rootColumn_19sb3_46", "EditorCanvas-root": "_EditorCanvas-root_19sb3_46", "EditorCanvas--ready": "_EditorCanvas--ready_19sb3_83", "EditorCanvas-loader": "_EditorCanvas-loader_19sb3_88", "EditorCanvas--showLoader": "_EditorCanvas--showLoader_19sb3_98", "EditorCanvas-browserBar": "_EditorCanvas-browserBar_19sb3_108", "EditorCanvas-zoomControls": "_EditorCanvas-zoomControls_19sb3_113" };
7537
+ 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" };
7388
7538
 
7389
7539
  // components/Editor/components/Canvas/index.tsx
7390
7540
  import { useShallow as useShallow9 } from "zustand/react/shallow";
@@ -7394,22 +7544,22 @@ init_react_import();
7394
7544
  import {
7395
7545
  createContext as createContext7,
7396
7546
  useContext as useContext14,
7397
- useRef as useRef12,
7547
+ useRef as useRef13,
7398
7548
  useMemo as useMemo21
7399
7549
  } from "react";
7400
- import { jsx as jsx48 } from "react/jsx-runtime";
7550
+ import { jsx as jsx49 } from "react/jsx-runtime";
7401
7551
  var FrameContext = createContext7(null);
7402
7552
  var FrameProvider = ({
7403
7553
  children
7404
7554
  }) => {
7405
- const frameRef = useRef12(null);
7555
+ const frameRef = useRef13(null);
7406
7556
  const value = useMemo21(
7407
7557
  () => ({
7408
7558
  frameRef
7409
7559
  }),
7410
7560
  []
7411
7561
  );
7412
- return /* @__PURE__ */ jsx48(FrameContext.Provider, { value, children });
7562
+ return /* @__PURE__ */ jsx49(FrameContext.Provider, { value, children });
7413
7563
  };
7414
7564
  var useCanvasFrame = () => {
7415
7565
  const context = useContext14(FrameContext);
@@ -7420,14 +7570,14 @@ var useCanvasFrame = () => {
7420
7570
  };
7421
7571
 
7422
7572
  // components/Editor/components/Canvas/index.tsx
7423
- import { Fragment as Fragment13, jsx as jsx49, jsxs as jsxs19 } from "react/jsx-runtime";
7424
- var getClassName29 = get_class_name_factory_default("EditorCanvas", styles_module_default25);
7573
+ import { Fragment as Fragment13, jsx as jsx50, jsxs as jsxs20 } from "react/jsx-runtime";
7574
+ var getClassName30 = get_class_name_factory_default("EditorCanvas", styles_module_default26);
7425
7575
  var ZOOM_STEP = 0.15;
7426
7576
  var MIN_ZOOM = 0.25;
7427
7577
  var MAX_ZOOM = 3;
7428
7578
  var TRANSITION_DURATION = 150;
7429
7579
  var Canvas = () => {
7430
- var _a;
7580
+ var _a, _b;
7431
7581
  const { frameRef } = useCanvasFrame();
7432
7582
  const {
7433
7583
  viewports: viewportOptions = defaultViewports,
@@ -7456,14 +7606,14 @@ var Canvas = () => {
7456
7606
  }))
7457
7607
  );
7458
7608
  const viewports = useAppStore((s) => s.state.ui.viewports);
7459
- const [canvasZoom, setCanvasZoom] = useState20(1);
7609
+ const [canvasZoom, setCanvasZoom] = useState21(1);
7460
7610
  const zoomIn = () => setCanvasZoom((z) => Math.min(z + ZOOM_STEP, MAX_ZOOM));
7461
7611
  const zoomOut = () => setCanvasZoom((z) => Math.max(z - ZOOM_STEP, MIN_ZOOM));
7462
7612
  const resetZoom = () => setCanvasZoom(1);
7463
- const [showTransition, setShowTransition] = useState20(false);
7464
- const isResizingRef = useRef13(false);
7613
+ const [showTransition, setShowTransition] = useState21(false);
7614
+ const isResizingRef = useRef14(false);
7465
7615
  const defaultRender = useMemo22(() => {
7466
- const EditorDefault = ({ children }) => /* @__PURE__ */ jsx49(Fragment13, { children });
7616
+ const EditorDefault = ({ children }) => /* @__PURE__ */ jsx50(Fragment13, { children });
7467
7617
  return EditorDefault;
7468
7618
  }, []);
7469
7619
  const CustomPreview = useMemo22(
@@ -7484,26 +7634,25 @@ var Canvas = () => {
7484
7634
  setZoomConfig(__spreadProps(__spreadValues({}, zoomConfig), { zoom: 1, rootHeight: frameHeight }));
7485
7635
  }
7486
7636
  }, [getFrameDimensions, setZoomConfig, viewports.current.height]);
7487
- const [showLoader, setShowLoader] = useState20(false);
7637
+ const [showLoader, setShowLoader] = useState21(false);
7488
7638
  useEffect23(() => {
7489
7639
  setTimeout(() => {
7490
7640
  setShowLoader(true);
7491
7641
  }, 500);
7492
7642
  }, []);
7493
7643
  const appStoreApi = useAppStoreApi();
7494
- useEffect23(() => {
7495
- var _a2, _b;
7496
- if (typeof window === "undefined") return;
7497
- if ((_a2 = uiProp == null ? void 0 : uiProp.viewports) == null ? void 0 : _a2.current) return;
7644
+ const autoSelectingRef = useRef14(true);
7645
+ const pickClosestViewport = useCallback18(() => {
7646
+ var _a2, _b2;
7647
+ if (typeof window === "undefined") return null;
7498
7648
  const viewportWidth = window.innerWidth;
7499
- const frameWidth = (_b = frameRef.current) == null ? void 0 : _b.getBoundingClientRect().width;
7500
- if (!viewportWidth) return;
7501
- if (!frameWidth) return;
7502
- if (viewportOptions.length === 0) return;
7649
+ const frameWidth = (_a2 = frameRef.current) == null ? void 0 : _a2.getBoundingClientRect().width;
7650
+ if (!viewportWidth) return null;
7651
+ if (!frameWidth) return null;
7652
+ if (viewportOptions.length === 0) return null;
7503
7653
  const fullWidthViewport = Object.values(viewportOptions).find(
7504
7654
  (v) => v.width === "100%"
7505
7655
  );
7506
- const containsFullWidthViewport = !!fullWidthViewport;
7507
7656
  const viewportDifferences = Object.entries(viewportOptions).filter(([_, value]) => value.width !== "100%").map(([key, value]) => ({
7508
7657
  key,
7509
7658
  diff: Math.abs(
@@ -7511,10 +7660,19 @@ var Canvas = () => {
7511
7660
  ),
7512
7661
  value
7513
7662
  })).sort((a, b) => a.diff > b.diff ? 1 : -1);
7514
- let closestViewport = viewportDifferences[0].value;
7515
- if (closestViewport.width < frameWidth && containsFullWidthViewport) {
7663
+ let closestViewport = (_b2 = viewportDifferences[0]) == null ? void 0 : _b2.value;
7664
+ if (!closestViewport) return null;
7665
+ if (closestViewport.width < frameWidth && fullWidthViewport) {
7516
7666
  closestViewport = fullWidthViewport;
7517
7667
  }
7668
+ return closestViewport;
7669
+ }, [viewportOptions, frameRef]);
7670
+ useEffect23(() => {
7671
+ var _a2;
7672
+ if (typeof window === "undefined") return;
7673
+ if ((_a2 = uiProp == null ? void 0 : uiProp.viewports) == null ? void 0 : _a2.current) return;
7674
+ const closestViewport = pickClosestViewport();
7675
+ if (!closestViewport) return;
7518
7676
  if (iframe.enabled) {
7519
7677
  const s = appStoreApi.getState();
7520
7678
  const appState = {
@@ -7536,16 +7694,51 @@ var Canvas = () => {
7536
7694
  appStoreApi.setState(__spreadProps(__spreadValues({}, appState), { history }));
7537
7695
  }
7538
7696
  }, [
7539
- viewportOptions,
7697
+ pickClosestViewport,
7540
7698
  frameRef.current,
7541
7699
  iframe,
7542
7700
  appStoreApi,
7543
7701
  (_a = uiProp == null ? void 0 : uiProp.viewports) == null ? void 0 : _a.current
7544
7702
  ]);
7545
- return /* @__PURE__ */ jsx49(
7703
+ useEffect23(() => {
7704
+ var _a2;
7705
+ if (typeof window === "undefined") return;
7706
+ if (!iframe.enabled) return;
7707
+ if ((_a2 = uiProp == null ? void 0 : uiProp.viewports) == null ? void 0 : _a2.current) return;
7708
+ const target = frameRef.current;
7709
+ if (!target) return;
7710
+ const observer = new ResizeObserver(() => {
7711
+ if (!autoSelectingRef.current) return;
7712
+ const closestViewport = pickClosestViewport();
7713
+ if (!closestViewport) return;
7714
+ const s = appStoreApi.getState();
7715
+ const current = s.state.ui.viewports.current;
7716
+ if (current.width === closestViewport.width && current.height === (closestViewport.height || "auto")) {
7717
+ return;
7718
+ }
7719
+ setUi({
7720
+ viewports: __spreadProps(__spreadValues({}, s.state.ui.viewports), {
7721
+ current: __spreadProps(__spreadValues({}, current), {
7722
+ width: closestViewport.width,
7723
+ height: closestViewport.height || "auto"
7724
+ })
7725
+ })
7726
+ });
7727
+ });
7728
+ observer.observe(target);
7729
+ return () => observer.disconnect();
7730
+ }, [
7731
+ pickClosestViewport,
7732
+ frameRef,
7733
+ iframe.enabled,
7734
+ (_b = uiProp == null ? void 0 : uiProp.viewports) == null ? void 0 : _b.current,
7735
+ appStoreApi,
7736
+ setUi
7737
+ ]);
7738
+ return /* @__PURE__ */ jsx50(
7546
7739
  "div",
7547
7740
  {
7548
- className: getClassName29({
7741
+ className: getClassName30({
7549
7742
  ready: status === "READY" || !iframe.enabled || !iframe.waitForStyles,
7550
7743
  showLoader,
7551
7744
  fullScreen: fullScreenCanvas
@@ -7560,16 +7753,16 @@ var Canvas = () => {
7560
7753
  });
7561
7754
  }
7562
7755
  },
7563
- children: /* @__PURE__ */ jsxs19("div", { className: getClassName29("inner"), ref: frameRef, children: [
7564
- !disableZoomControls && /* @__PURE__ */ jsxs19("div", { className: getClassName29("zoomControls"), children: [
7565
- /* @__PURE__ */ jsx49(IconButton, { type: "button", title: "Zoom out", onClick: zoomOut, children: /* @__PURE__ */ jsx49(Minus, { size: 14 }) }),
7566
- /* @__PURE__ */ jsx49(IconButton, { type: "button", title: "Reset zoom", onClick: resetZoom, children: /* @__PURE__ */ jsx49(RotateCcw, { size: 14 }) }),
7567
- /* @__PURE__ */ jsx49(IconButton, { type: "button", title: "Zoom in", onClick: zoomIn, children: /* @__PURE__ */ jsx49(Plus, { size: 14 }) })
7756
+ children: /* @__PURE__ */ jsxs20("div", { className: getClassName30("inner"), ref: frameRef, children: [
7757
+ !disableZoomControls && /* @__PURE__ */ jsxs20("div", { className: getClassName30("zoomControls"), children: [
7758
+ /* @__PURE__ */ jsx50(IconButton, { type: "button", title: "Zoom out", onClick: zoomOut, children: /* @__PURE__ */ jsx50(Minus, { size: 14 }) }),
7759
+ /* @__PURE__ */ jsx50(IconButton, { type: "button", title: "Reset zoom", onClick: resetZoom, children: /* @__PURE__ */ jsx50(RotateCcw, { size: 14 }) }),
7760
+ /* @__PURE__ */ jsx50(IconButton, { type: "button", title: "Zoom in", onClick: zoomIn, children: /* @__PURE__ */ jsx50(Plus, { size: 14 }) })
7568
7761
  ] }),
7569
- /* @__PURE__ */ jsxs19(
7762
+ /* @__PURE__ */ jsxs20(
7570
7763
  "div",
7571
7764
  {
7572
- className: getClassName29("rootColumn"),
7765
+ className: getClassName30("rootColumn"),
7573
7766
  style: {
7574
7767
  width: iframe.enabled ? viewports.current.width : "100%",
7575
7768
  transform: disableZoomControls ? void 0 : `scale(${canvasZoom})`,
@@ -7577,10 +7770,11 @@ var Canvas = () => {
7577
7770
  transition: showTransition ? `width ${TRANSITION_DURATION}ms ease-out, transform ${TRANSITION_DURATION}ms ease-out` : disableZoomControls ? void 0 : "transform 150ms ease-out"
7578
7771
  },
7579
7772
  children: [
7580
- iframe.enabled && /* @__PURE__ */ jsx49("div", { className: getClassName29("browserBar"), children: /* @__PURE__ */ jsx49(
7773
+ iframe.enabled && /* @__PURE__ */ jsx50("div", { className: getClassName30("browserBar"), children: /* @__PURE__ */ jsx50(
7581
7774
  BrowserBar,
7582
7775
  {
7583
7776
  onViewportChange: (viewport) => {
7777
+ autoSelectingRef.current = false;
7584
7778
  setShowTransition(true);
7585
7779
  isResizingRef.current = true;
7586
7780
  const uiViewport = __spreadProps(__spreadValues({}, viewport), {
@@ -7593,23 +7787,23 @@ var Canvas = () => {
7593
7787
  }
7594
7788
  }
7595
7789
  ) }),
7596
- /* @__PURE__ */ jsx49(
7790
+ /* @__PURE__ */ jsx50(
7597
7791
  "div",
7598
7792
  {
7599
- className: getClassName29("root"),
7793
+ className: getClassName30("root"),
7600
7794
  suppressHydrationWarning: true,
7601
7795
  id: "editor-canvas-root",
7602
7796
  onTransitionEnd: () => {
7603
7797
  setShowTransition(false);
7604
7798
  isResizingRef.current = false;
7605
7799
  },
7606
- children: /* @__PURE__ */ jsx49(CustomPreview, { children: /* @__PURE__ */ jsx49(Preview2, {}) })
7800
+ children: /* @__PURE__ */ jsx50(CustomPreview, { children: /* @__PURE__ */ jsx50(Preview2, {}) })
7607
7801
  }
7608
7802
  )
7609
7803
  ]
7610
7804
  }
7611
7805
  ),
7612
- /* @__PURE__ */ jsx49("div", { className: getClassName29("loader"), children: /* @__PURE__ */ jsx49(Loader, { size: 24 }) })
7806
+ /* @__PURE__ */ jsx50("div", { className: getClassName30("loader"), children: /* @__PURE__ */ jsx50(Loader, { size: 24 }) })
7613
7807
  ] })
7614
7808
  }
7615
7809
  );
@@ -7617,10 +7811,10 @@ var Canvas = () => {
7617
7811
 
7618
7812
  // lib/use-sidebar-resize.ts
7619
7813
  init_react_import();
7620
- import { useCallback as useCallback19, useEffect as useEffect24, useRef as useRef14, useState as useState21 } from "react";
7814
+ import { useCallback as useCallback19, useEffect as useEffect24, useRef as useRef15, useState as useState22 } from "react";
7621
7815
  function useSidebarResize(position, dispatch) {
7622
- const [width, setWidth] = useState21(null);
7623
- const sidebarRef = useRef14(null);
7816
+ const [width, setWidth] = useState22(null);
7817
+ const sidebarRef = useRef15(null);
7624
7818
  const storeWidth = useAppStore(
7625
7819
  (s) => position === "left" ? s.state.ui.leftSideBarWidth : s.state.ui.rightSideBarWidth
7626
7820
  );
@@ -7701,25 +7895,25 @@ init_react_import();
7701
7895
 
7702
7896
  // components/Editor/components/ResizeHandle/index.tsx
7703
7897
  init_react_import();
7704
- import { useCallback as useCallback20, useRef as useRef15 } from "react";
7898
+ import { useCallback as useCallback20, useRef as useRef16 } from "react";
7705
7899
 
7706
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/Editor/components/ResizeHandle/styles.module.css#css-module
7900
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/ResizeHandle/styles.module.css#css-module
7707
7901
  init_react_import();
7708
- var styles_module_default26 = { "ResizeHandle": "_ResizeHandle_s0ymy_2", "ResizeHandle--left": "_ResizeHandle--left_s0ymy_16", "ResizeHandle--right": "_ResizeHandle--right_s0ymy_20" };
7902
+ var styles_module_default27 = { "ResizeHandle": "_ResizeHandle_1u3rv_2", "ResizeHandle--left": "_ResizeHandle--left_1u3rv_16", "ResizeHandle--right": "_ResizeHandle--right_1u3rv_20" };
7709
7903
 
7710
7904
  // components/Editor/components/ResizeHandle/index.tsx
7711
- import { jsx as jsx50 } from "react/jsx-runtime";
7712
- var getClassName30 = get_class_name_factory_default("ResizeHandle", styles_module_default26);
7905
+ import { jsx as jsx51 } from "react/jsx-runtime";
7906
+ var getClassName31 = get_class_name_factory_default("ResizeHandle", styles_module_default27);
7713
7907
  var ResizeHandle = ({
7714
7908
  position,
7715
7909
  sidebarRef,
7716
7910
  onResize,
7717
7911
  onResizeEnd
7718
7912
  }) => {
7719
- const handleRef = useRef15(null);
7720
- const isDragging = useRef15(false);
7721
- const startX = useRef15(0);
7722
- const startWidth = useRef15(0);
7913
+ const handleRef = useRef16(null);
7914
+ const isDragging = useRef16(false);
7915
+ const startX = useRef16(0);
7916
+ const startWidth = useRef16(0);
7723
7917
  const handleMouseMove = useCallback20(
7724
7918
  (e) => {
7725
7919
  if (!isDragging.current) return;
@@ -7764,23 +7958,23 @@ var ResizeHandle = ({
7764
7958
  },
7765
7959
  [position, handleMouseMove, handleMouseUp]
7766
7960
  );
7767
- return /* @__PURE__ */ jsx50(
7961
+ return /* @__PURE__ */ jsx51(
7768
7962
  "div",
7769
7963
  {
7770
7964
  ref: handleRef,
7771
- className: getClassName30({ [position]: true }),
7965
+ className: getClassName31({ [position]: true }),
7772
7966
  onMouseDown: handleMouseDown
7773
7967
  }
7774
7968
  );
7775
7969
  };
7776
7970
 
7777
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/Editor/components/Sidebar/styles.module.css#css-module
7971
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Sidebar/styles.module.css#css-module
7778
7972
  init_react_import();
7779
- var styles_module_default27 = { "Sidebar": "_Sidebar_6tp4l_1", "Sidebar--isVisible": "_Sidebar--isVisible_6tp4l_9", "Sidebar--left": "_Sidebar--left_6tp4l_13", "Sidebar--right": "_Sidebar--right_6tp4l_25", "Sidebar-resizeHandle": "_Sidebar-resizeHandle_6tp4l_37" };
7973
+ 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" };
7780
7974
 
7781
7975
  // components/Editor/components/Sidebar/index.tsx
7782
- import { Fragment as Fragment14, jsx as jsx51, jsxs as jsxs20 } from "react/jsx-runtime";
7783
- var getClassName31 = get_class_name_factory_default("Sidebar", styles_module_default27);
7976
+ import { Fragment as Fragment14, jsx as jsx52, jsxs as jsxs21 } from "react/jsx-runtime";
7977
+ var getClassName32 = get_class_name_factory_default("Sidebar", styles_module_default28);
7784
7978
  var Sidebar = ({
7785
7979
  position,
7786
7980
  sidebarRef,
@@ -7789,16 +7983,16 @@ var Sidebar = ({
7789
7983
  onResizeEnd,
7790
7984
  children
7791
7985
  }) => {
7792
- return /* @__PURE__ */ jsxs20(Fragment14, { children: [
7793
- /* @__PURE__ */ jsx51(
7986
+ return /* @__PURE__ */ jsxs21(Fragment14, { children: [
7987
+ /* @__PURE__ */ jsx52(
7794
7988
  "div",
7795
7989
  {
7796
7990
  ref: sidebarRef,
7797
- className: getClassName31({ [position]: true, isVisible }),
7991
+ className: getClassName32({ [position]: true, isVisible }),
7798
7992
  children
7799
7993
  }
7800
7994
  ),
7801
- /* @__PURE__ */ jsx51("div", { className: `${getClassName31("resizeHandle")}`, children: /* @__PURE__ */ jsx51(
7995
+ /* @__PURE__ */ jsx52("div", { className: `${getClassName32("resizeHandle")}`, children: /* @__PURE__ */ jsx52(
7802
7996
  ResizeHandle,
7803
7997
  {
7804
7998
  position,
@@ -7874,14 +8068,14 @@ var useDeleteHotkeys = () => {
7874
8068
  // components/Editor/components/Nav/index.tsx
7875
8069
  init_react_import();
7876
8070
 
7877
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/Editor/components/Nav/styles.module.css#css-module
8071
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Nav/styles.module.css#css-module
7878
8072
  init_react_import();
7879
- var styles_module_default28 = { "Nav": "_Nav_kjoi9_1", "Nav-list": "_Nav-list_kjoi9_18", "Nav-footer": "_Nav-footer_kjoi9_42", "NavItem-link": "_NavItem-link_kjoi9_55", "NavItem-linkLabel": "_NavItem-linkLabel_kjoi9_83", "NavItem": "_NavItem_kjoi9_55", "NavItem-linkIcon": "_NavItem-linkIcon_kjoi9_108", "NavItem--active": "_NavItem--active_kjoi9_121", "NavItem--mobileOnly": "_NavItem--mobileOnly_kjoi9_132", "NavItem--desktopOnly": "_NavItem--desktopOnly_kjoi9_137" };
8073
+ 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" };
7880
8074
 
7881
8075
  // components/Editor/components/Nav/index.tsx
7882
- import { jsx as jsx52, jsxs as jsxs21 } from "react/jsx-runtime";
7883
- var getClassName32 = get_class_name_factory_default("Nav", styles_module_default28);
7884
- var getClassNameItem3 = get_class_name_factory_default("NavItem", styles_module_default28);
8076
+ import { jsx as jsx53, jsxs as jsxs22 } from "react/jsx-runtime";
8077
+ var getClassName33 = get_class_name_factory_default("Nav", styles_module_default29);
8078
+ var getClassNameItem3 = get_class_name_factory_default("NavItem", styles_module_default29);
7885
8079
  var MenuItem = ({
7886
8080
  label,
7887
8081
  icon,
@@ -7890,7 +8084,7 @@ var MenuItem = ({
7890
8084
  mobileOnly,
7891
8085
  desktopOnly
7892
8086
  }) => {
7893
- return /* @__PURE__ */ jsx52(
8087
+ return /* @__PURE__ */ jsx53(
7894
8088
  "li",
7895
8089
  {
7896
8090
  className: getClassNameItem3({
@@ -7898,9 +8092,9 @@ var MenuItem = ({
7898
8092
  mobileOnly,
7899
8093
  desktopOnly
7900
8094
  }),
7901
- children: onClick && /* @__PURE__ */ jsxs21("div", { className: getClassNameItem3("link"), onClick, children: [
7902
- icon && /* @__PURE__ */ jsx52("span", { className: getClassNameItem3("linkIcon"), children: icon }),
7903
- /* @__PURE__ */ jsx52("span", { className: getClassNameItem3("linkLabel"), children: label })
8095
+ children: onClick && /* @__PURE__ */ jsxs22("div", { className: getClassNameItem3("link"), onClick, children: [
8096
+ icon && /* @__PURE__ */ jsx53("span", { className: getClassNameItem3("linkIcon"), children: icon }),
8097
+ /* @__PURE__ */ jsx53("span", { className: getClassNameItem3("linkLabel"), children: label })
7904
8098
  ] })
7905
8099
  }
7906
8100
  );
@@ -7909,15 +8103,15 @@ var Nav = ({
7909
8103
  items,
7910
8104
  footer
7911
8105
  }) => {
7912
- return /* @__PURE__ */ jsxs21("nav", { className: getClassName32(), children: [
7913
- /* @__PURE__ */ jsx52("ul", { className: getClassName32("list"), children: Object.entries(items).map(([key, item]) => /* @__PURE__ */ jsx52(MenuItem, __spreadValues({}, item), key)) }),
7914
- footer && /* @__PURE__ */ jsx52("div", { className: getClassName32("footer"), children: footer })
8106
+ return /* @__PURE__ */ jsxs22("nav", { className: getClassName33(), children: [
8107
+ /* @__PURE__ */ jsx53("ul", { className: getClassName33("list"), children: Object.entries(items).map(([key, item]) => /* @__PURE__ */ jsx53(MenuItem, __spreadValues({}, item), key)) }),
8108
+ footer && /* @__PURE__ */ jsx53("div", { className: getClassName33("footer"), children: footer })
7915
8109
  ] });
7916
8110
  };
7917
8111
 
7918
8112
  // components/Editor/components/Layout/index.tsx
7919
- import { Fragment as Fragment15, jsx as jsx53, jsxs as jsxs22 } from "react/jsx-runtime";
7920
- var getClassName33 = get_class_name_factory_default("Editor", styles_module_default22);
8113
+ import { Fragment as Fragment15, jsx as jsx54, jsxs as jsxs23 } from "react/jsx-runtime";
8114
+ var getClassName34 = get_class_name_factory_default("Editor", styles_module_default22);
7921
8115
  var getLayoutClassName = get_class_name_factory_default("EditorLayout", styles_module_default22);
7922
8116
  var getPluginTabClassName = get_class_name_factory_default("EditorPluginTab", styles_module_default22);
7923
8117
  var FieldSideBarToolbar = () => {
@@ -7930,30 +8124,30 @@ var FieldSideBarToolbar = () => {
7930
8124
  const CustomHeaderActions = useAppStore(
7931
8125
  (s) => s.overrides.headerActions || DefaultOverride
7932
8126
  );
7933
- return /* @__PURE__ */ jsxs22("div", { className: getClassName33("fieldSideBarToolbar"), children: [
7934
- /* @__PURE__ */ jsxs22("div", { className: getClassName33("fieldSideBarHistory"), children: [
7935
- /* @__PURE__ */ jsx53(
8127
+ return /* @__PURE__ */ jsxs23("div", { className: getClassName34("fieldSideBarToolbar"), children: [
8128
+ /* @__PURE__ */ jsxs23("div", { className: getClassName34("fieldSideBarHistory"), children: [
8129
+ /* @__PURE__ */ jsx54(
7936
8130
  IconButton,
7937
8131
  {
7938
8132
  type: "button",
7939
8133
  title: "undo",
7940
8134
  disabled: !hasPast,
7941
8135
  onClick: back,
7942
- children: /* @__PURE__ */ jsx53(Undo2, { size: 18 })
8136
+ children: /* @__PURE__ */ jsx54(Undo2, { size: 18 })
7943
8137
  }
7944
8138
  ),
7945
- /* @__PURE__ */ jsx53(
8139
+ /* @__PURE__ */ jsx54(
7946
8140
  IconButton,
7947
8141
  {
7948
8142
  type: "button",
7949
8143
  title: "redo",
7950
8144
  disabled: !hasFuture,
7951
8145
  onClick: forward,
7952
- children: /* @__PURE__ */ jsx53(Redo2, { size: 18 })
8146
+ children: /* @__PURE__ */ jsx54(Redo2, { size: 18 })
7953
8147
  }
7954
8148
  )
7955
8149
  ] }),
7956
- /* @__PURE__ */ jsx53("div", { className: getClassName33("fieldSideBarActions"), children: /* @__PURE__ */ jsx53(CustomHeaderActions, { children: /* @__PURE__ */ jsx53(
8150
+ /* @__PURE__ */ jsx54("div", { className: getClassName34("fieldSideBarActions"), children: /* @__PURE__ */ jsx54(CustomHeaderActions, { children: /* @__PURE__ */ jsx54(
7957
8151
  Button,
7958
8152
  {
7959
8153
  onClick: () => {
@@ -7972,9 +8166,9 @@ var FieldSideBar = () => {
7972
8166
  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";
7973
8167
  }
7974
8168
  );
7975
- return /* @__PURE__ */ jsxs22(Fragment15, { children: [
7976
- /* @__PURE__ */ jsx53(FieldSideBarToolbar, {}),
7977
- /* @__PURE__ */ jsx53(SidebarSection, { noBorderTop: true, showBreadcrumbs: true, title, children: /* @__PURE__ */ jsx53(Fields, {}) })
8169
+ return /* @__PURE__ */ jsxs23(Fragment15, { children: [
8170
+ /* @__PURE__ */ jsx54(FieldSideBarToolbar, {}),
8171
+ /* @__PURE__ */ jsx54(SidebarSection, { noBorderTop: true, showBreadcrumbs: true, title, children: /* @__PURE__ */ jsx54(Fields, {}) })
7978
8172
  ] });
7979
8173
  };
7980
8174
  var PluginTab = ({
@@ -7982,7 +8176,7 @@ var PluginTab = ({
7982
8176
  visible,
7983
8177
  mobileOnly
7984
8178
  }) => {
7985
- return /* @__PURE__ */ jsx53("div", { className: getPluginTabClassName({ visible, mobileOnly }), children: /* @__PURE__ */ jsx53("div", { className: getPluginTabClassName("body"), children }) });
8179
+ return /* @__PURE__ */ jsx54("div", { className: getPluginTabClassName({ visible, mobileOnly }), children: /* @__PURE__ */ jsx54("div", { className: getPluginTabClassName("body"), children }) });
7986
8180
  };
7987
8181
  var Layout = ({ children }) => {
7988
8182
  const {
@@ -8046,7 +8240,7 @@ var Layout = ({ children }) => {
8046
8240
  () => overrides.editor || DefaultOverride,
8047
8241
  [overrides]
8048
8242
  );
8049
- const [mounted, setMounted] = useState22(false);
8243
+ const [mounted, setMounted] = useState23(false);
8050
8244
  useEffect25(() => {
8051
8245
  setMounted(true);
8052
8246
  }, []);
@@ -8064,10 +8258,10 @@ var Layout = ({ children }) => {
8064
8258
  useDeleteHotkeys();
8065
8259
  const layoutOptions = {};
8066
8260
  if (leftWidth) {
8067
- layoutOptions["--re-user-left-side-bar-width"] = `${leftWidth}px`;
8261
+ layoutOptions["--editor-user-left-side-bar-width"] = `${leftWidth}px`;
8068
8262
  }
8069
8263
  if (rightWidth) {
8070
- layoutOptions["--re-user-right-side-bar-width"] = `${rightWidth}px`;
8264
+ layoutOptions["--editor-user-right-side-bar-width"] = `${rightWidth}px`;
8071
8265
  }
8072
8266
  const setUi = useAppStore((s) => s.setUi);
8073
8267
  const currentPlugin = useAppStore((s) => {
@@ -8075,14 +8269,14 @@ var Layout = ({ children }) => {
8075
8269
  return (_a = s.state.ui.plugin) == null ? void 0 : _a.current;
8076
8270
  });
8077
8271
  const appStoreApi = useAppStoreApi();
8078
- const [mobilePanelHeightMode, setMobilePanelHeightMode] = useState22("toggle");
8079
- const [mobilePanelHeight, setMobilePanelHeight] = useState22(
8272
+ const [mobilePanelHeightMode, setMobilePanelHeightMode] = useState23("toggle");
8273
+ const [mobilePanelHeight, setMobilePanelHeight] = useState23(
8080
8274
  null
8081
8275
  );
8082
- const mobilePanelRef = useRef16(null);
8083
- const isDraggingMobile = useRef16(false);
8084
- const dragStartY = useRef16(0);
8085
- const dragStartHeight = useRef16(0);
8276
+ const mobilePanelRef = useRef17(null);
8277
+ const isDraggingMobile = useRef17(false);
8278
+ const dragStartY = useRef17(0);
8279
+ const dragStartHeight = useRef17(0);
8086
8280
  const handleMobileDragStart = useCallback22(
8087
8281
  (clientY) => {
8088
8282
  isDraggingMobile.current = true;
@@ -8135,7 +8329,7 @@ var Layout = ({ children }) => {
8135
8329
  document.removeEventListener("mouseup", onMouseUp);
8136
8330
  };
8137
8331
  }, [handleMobileDragMove, handleMobileDragEnd]);
8138
- const [theme, setTheme] = useState22(() => {
8332
+ const [theme, setTheme] = useState23(() => {
8139
8333
  if (typeof window === "undefined") return "light";
8140
8334
  const stored = window.localStorage.getItem("editor-theme");
8141
8335
  if (stored === "light" || stored === "dark") return stored;
@@ -8148,7 +8342,7 @@ var Layout = ({ children }) => {
8148
8342
  const toggleTheme = () => {
8149
8343
  setTheme((t) => t === "dark" ? "light" : "dark");
8150
8344
  };
8151
- const themeIcon = theme === "dark" ? /* @__PURE__ */ jsx53(Sun, { size: 18 }) : /* @__PURE__ */ jsx53(Moon, { size: 18 });
8345
+ const themeIcon = theme === "dark" ? /* @__PURE__ */ jsx54(Sun, { size: 18 }) : /* @__PURE__ */ jsx54(Moon, { size: 18 });
8152
8346
  const themeLabel = theme === "dark" ? "Switch to light mode" : "Switch to dark mode";
8153
8347
  const hasLegacySideBarPlugin = useMemo23(
8154
8348
  () => !!(plugins == null ? void 0 : plugins.find((p) => p.name === "legacy-side-bar")),
@@ -8173,7 +8367,7 @@ var Layout = ({ children }) => {
8173
8367
  }
8174
8368
  details[plugin.name] = {
8175
8369
  label: (_a = plugin.label) != null ? _a : plugin.name,
8176
- icon: (_b = plugin.icon) != null ? _b : /* @__PURE__ */ jsx53(ToyBrick, {}),
8370
+ icon: (_b = plugin.icon) != null ? _b : /* @__PURE__ */ jsx54(ToyBrick, {}),
8177
8371
  onClick: () => {
8178
8372
  var _a2;
8179
8373
  setMobilePanelHeightMode((_a2 = plugin.mobilePanelHeight) != null ? _a2 : "toggle");
@@ -8210,19 +8404,19 @@ var Layout = ({ children }) => {
8210
8404
  const hasDesktopFieldsPlugin = pluginItems["fields"] && pluginItems["fields"].mobileOnly === false;
8211
8405
  const mobilePanelStyle = {};
8212
8406
  if (mobilePanelHeight && leftSideBarVisible) {
8213
- mobilePanelStyle["--re-mobile-panel-height"] = `${mobilePanelHeight}px`;
8407
+ mobilePanelStyle["--editor-mobile-panel-height"] = `${mobilePanelHeight}px`;
8214
8408
  }
8215
- return /* @__PURE__ */ jsxs22(
8409
+ return /* @__PURE__ */ jsxs23(
8216
8410
  "div",
8217
8411
  {
8218
- className: `Editor ${getClassName33({
8412
+ className: `Editor ${getClassName34({
8219
8413
  hidePlugins: hasLegacySideBarPlugin
8220
8414
  })}`,
8221
8415
  id: instanceId,
8222
8416
  "data-theme": theme,
8223
8417
  style: { height },
8224
8418
  children: [
8225
- /* @__PURE__ */ jsx53(DragDropContext, { disableAutoScroll: dnd == null ? void 0 : dnd.disableAutoScroll, children: /* @__PURE__ */ jsx53(CustomEditor, { children: children || /* @__PURE__ */ jsx53(FrameProvider, { children: /* @__PURE__ */ jsx53(
8419
+ /* @__PURE__ */ jsx54(DragDropContext, { disableAutoScroll: dnd == null ? void 0 : dnd.disableAutoScroll, children: /* @__PURE__ */ jsx54(CustomEditor, { children: children || /* @__PURE__ */ jsx54(FrameProvider, { children: /* @__PURE__ */ jsx54(
8226
8420
  "div",
8227
8421
  {
8228
8422
  className: getLayoutClassName({
@@ -8234,17 +8428,17 @@ var Layout = ({ children }) => {
8234
8428
  mobilePanelCustomHeight: mobilePanelHeight !== null && leftSideBarVisible
8235
8429
  }),
8236
8430
  style: { height },
8237
- children: /* @__PURE__ */ jsxs22(
8431
+ children: /* @__PURE__ */ jsxs23(
8238
8432
  "div",
8239
8433
  {
8240
8434
  className: getLayoutClassName("inner"),
8241
8435
  style: __spreadValues(__spreadValues({}, layoutOptions), mobilePanelStyle),
8242
8436
  children: [
8243
- /* @__PURE__ */ jsx53("div", { className: getLayoutClassName("nav"), children: /* @__PURE__ */ jsx53(
8437
+ /* @__PURE__ */ jsx54("div", { className: getLayoutClassName("nav"), children: /* @__PURE__ */ jsx54(
8244
8438
  Nav,
8245
8439
  {
8246
8440
  items: pluginItems,
8247
- footer: /* @__PURE__ */ jsx53(
8441
+ footer: /* @__PURE__ */ jsx54(
8248
8442
  IconButton,
8249
8443
  {
8250
8444
  type: "button",
@@ -8255,19 +8449,19 @@ var Layout = ({ children }) => {
8255
8449
  )
8256
8450
  }
8257
8451
  ) }),
8258
- /* @__PURE__ */ jsxs22(
8452
+ /* @__PURE__ */ jsxs23(
8259
8453
  "div",
8260
8454
  {
8261
8455
  ref: mobilePanelRef,
8262
8456
  className: getLayoutClassName("mobilePanel"),
8263
8457
  children: [
8264
- /* @__PURE__ */ jsx53(
8458
+ /* @__PURE__ */ jsx54(
8265
8459
  "div",
8266
8460
  {
8267
8461
  className: getLayoutClassName("mobileDragHandle"),
8268
8462
  onTouchStart: (e) => handleMobileDragStart(e.touches[0].clientY),
8269
8463
  onMouseDown: (e) => handleMobileDragStart(e.clientY),
8270
- children: /* @__PURE__ */ jsx53(
8464
+ children: /* @__PURE__ */ jsx54(
8271
8465
  "div",
8272
8466
  {
8273
8467
  className: getLayoutClassName("mobileDragHandlePill")
@@ -8275,17 +8469,17 @@ var Layout = ({ children }) => {
8275
8469
  )
8276
8470
  }
8277
8471
  ),
8278
- /* @__PURE__ */ jsx53(
8472
+ /* @__PURE__ */ jsx54(
8279
8473
  "div",
8280
8474
  {
8281
8475
  className: getLayoutClassName("mobilePanelContent"),
8282
8476
  children: Object.entries(pluginItems).map(
8283
- ([id, { mobileOnly, render: Render2 }]) => /* @__PURE__ */ jsx53(
8477
+ ([id, { mobileOnly, render: Render2 }]) => /* @__PURE__ */ jsx54(
8284
8478
  PluginTab,
8285
8479
  {
8286
8480
  visible: currentPlugin === id,
8287
8481
  mobileOnly,
8288
- children: /* @__PURE__ */ jsx53(Render2, {})
8482
+ children: /* @__PURE__ */ jsx54(Render2, {})
8289
8483
  },
8290
8484
  id
8291
8485
  )
@@ -8295,7 +8489,7 @@ var Layout = ({ children }) => {
8295
8489
  ]
8296
8490
  }
8297
8491
  ),
8298
- /* @__PURE__ */ jsx53(
8492
+ /* @__PURE__ */ jsx54(
8299
8493
  Sidebar,
8300
8494
  {
8301
8495
  position: "left",
@@ -8304,20 +8498,20 @@ var Layout = ({ children }) => {
8304
8498
  onResize: setLeftWidth,
8305
8499
  onResizeEnd: handleLeftSidebarResizeEnd,
8306
8500
  children: Object.entries(pluginItems).map(
8307
- ([id, { mobileOnly, render: Render2, label }]) => /* @__PURE__ */ jsx53(
8501
+ ([id, { mobileOnly, render: Render2, label }]) => /* @__PURE__ */ jsx54(
8308
8502
  PluginTab,
8309
8503
  {
8310
8504
  visible: currentPlugin === id,
8311
8505
  mobileOnly,
8312
- children: /* @__PURE__ */ jsx53(Render2, {})
8506
+ children: /* @__PURE__ */ jsx54(Render2, {})
8313
8507
  },
8314
8508
  id
8315
8509
  )
8316
8510
  )
8317
8511
  }
8318
8512
  ),
8319
- /* @__PURE__ */ jsx53(Canvas, {}),
8320
- !hasDesktopFieldsPlugin && /* @__PURE__ */ jsx53(
8513
+ /* @__PURE__ */ jsx54(Canvas, {}),
8514
+ !hasDesktopFieldsPlugin && /* @__PURE__ */ jsx54(
8321
8515
  Sidebar,
8322
8516
  {
8323
8517
  position: "right",
@@ -8325,7 +8519,7 @@ var Layout = ({ children }) => {
8325
8519
  isVisible: rightSideBarVisible,
8326
8520
  onResize: setRightWidth,
8327
8521
  onResizeEnd: handleRightSidebarResizeEnd,
8328
- children: /* @__PURE__ */ jsx53(FieldSideBar, {})
8522
+ children: /* @__PURE__ */ jsx54(FieldSideBar, {})
8329
8523
  }
8330
8524
  )
8331
8525
  ]
@@ -8333,27 +8527,25 @@ var Layout = ({ children }) => {
8333
8527
  )
8334
8528
  }
8335
8529
  ) }) }) }),
8336
- /* @__PURE__ */ jsx53("div", { id: "editor-portal-root", className: getClassName33("portal") })
8530
+ /* @__PURE__ */ jsx54("div", { id: "editor-portal-root", className: getClassName34("portal") })
8337
8531
  ]
8338
8532
  }
8339
8533
  );
8340
8534
  };
8341
8535
 
8342
8536
  // components/Editor/index.tsx
8343
- import { jsx as jsx54 } from "react/jsx-runtime";
8537
+ import { jsx as jsx55 } from "react/jsx-runtime";
8344
8538
  var propsContext = createContext8({});
8345
8539
  function PropsProvider(props) {
8346
- return /* @__PURE__ */ jsx54(propsContext.Provider, { value: props, children: props.children });
8540
+ return /* @__PURE__ */ jsx55(propsContext.Provider, { value: props, children: props.children });
8347
8541
  }
8348
8542
  var usePropsContext = () => useContext15(propsContext);
8349
8543
  function EditorProvider({ children }) {
8350
8544
  const {
8351
8545
  config,
8352
8546
  data: initialData,
8353
- globalData: initialGlobalData,
8354
8547
  ui: initialUi,
8355
8548
  onChange,
8356
- onGlobalsChange,
8357
8549
  permissions = {},
8358
8550
  plugins,
8359
8551
  overrides,
@@ -8373,8 +8565,8 @@ function EditorProvider({ children }) {
8373
8565
  }, _iframe),
8374
8566
  [_iframe]
8375
8567
  );
8376
- const [generatedAppState] = useState23(() => {
8377
- var _a, _b, _c, _d, _e;
8568
+ const [generatedAppState] = useState24(() => {
8569
+ var _a, _b, _c, _d, _e, _f;
8378
8570
  const initial = __spreadValues(__spreadValues({}, defaultAppState.ui), initialUi);
8379
8571
  let clientUiState = {};
8380
8572
  if (Object.keys((initialData == null ? void 0 : initialData.root) || {}).length > 0 && !((_a = initialData == null ? void 0 : initialData.root) == null ? void 0 : _a.props)) {
@@ -8388,20 +8580,20 @@ function EditorProvider({ children }) {
8388
8580
  toComponent(__spreadProps(__spreadValues({}, initialData == null ? void 0 : initialData.root), { props: defaultedRootProps })),
8389
8581
  config
8390
8582
  );
8391
- const seededGlobalData = __spreadValues({}, initialGlobalData != null ? initialGlobalData : {});
8392
- for (const [type, comp] of Object.entries((_d = config.components) != null ? _d : {})) {
8393
- if ((comp == null ? void 0 : comp.global) && !seededGlobalData[type]) {
8394
- seededGlobalData[type] = {
8395
- props: __spreadValues({}, (_e = comp == null ? void 0 : comp.defaultProps) != null ? _e : {})
8583
+ const seededGlobals = __spreadValues({}, (_d = initialData == null ? void 0 : initialData.globals) != null ? _d : {});
8584
+ for (const [type, comp] of Object.entries((_e = config.components) != null ? _e : {})) {
8585
+ if ((comp == null ? void 0 : comp.global) && !seededGlobals[type]) {
8586
+ seededGlobals[type] = {
8587
+ props: __spreadValues({}, (_f = comp == null ? void 0 : comp.defaultProps) != null ? _f : {})
8396
8588
  };
8397
8589
  }
8398
8590
  }
8399
8591
  const composedData = resolveGlobals(
8400
8592
  __spreadProps(__spreadValues({}, initialData), {
8401
8593
  root: __spreadProps(__spreadValues({}, initialData == null ? void 0 : initialData.root), { props: root.props }),
8402
- content: initialData.content || []
8594
+ content: initialData.content || [],
8595
+ globals: seededGlobals
8403
8596
  }),
8404
- seededGlobalData,
8405
8597
  config
8406
8598
  );
8407
8599
  const newAppState = __spreadProps(__spreadValues({}, defaultAppState), {
@@ -8425,7 +8617,7 @@ function EditorProvider({ children }) {
8425
8617
  return walkAppState(newAppState, config);
8426
8618
  });
8427
8619
  const { appendData = true } = _initialHistory || {};
8428
- const [blendedHistories] = useState23(
8620
+ const [blendedHistories] = useState24(
8429
8621
  [
8430
8622
  ...(_initialHistory == null ? void 0 : _initialHistory.histories) || [],
8431
8623
  ...appendData ? [{ state: generatedAppState }] : []
@@ -8491,7 +8683,7 @@ function EditorProvider({ children }) {
8491
8683
  loadedFieldTransforms
8492
8684
  ]
8493
8685
  );
8494
- const [appStore] = useState23(
8686
+ const [appStore] = useState24(
8495
8687
  () => createAppStore(generateAppStore(initialAppState))
8496
8688
  );
8497
8689
  useEffect26(() => {
@@ -8508,24 +8700,19 @@ function EditorProvider({ children }) {
8508
8700
  index: initialHistoryIndex,
8509
8701
  initialAppState
8510
8702
  });
8511
- const previousData = useRef17(null);
8512
- const previousGlobalData = useRef17(null);
8703
+ const previousData = useRef18(null);
8513
8704
  useEffect26(() => {
8514
8705
  return appStore.subscribe(
8515
8706
  (s) => s.state.data,
8516
8707
  (data) => {
8517
- const split = splitGlobalData(data, config);
8518
- if (onChange && !deepEqual2(split.data, previousData.current)) {
8519
- onChange(split.data);
8520
- previousData.current = split.data;
8521
- }
8522
- if (onGlobalsChange && !deepEqual2(split.globalData, previousGlobalData.current)) {
8523
- onGlobalsChange(split.globalData);
8524
- previousGlobalData.current = split.globalData;
8708
+ const split = splitGlobals(data, config);
8709
+ if (onChange && !deepEqual2(split, previousData.current)) {
8710
+ onChange(split);
8711
+ previousData.current = split;
8525
8712
  }
8526
8713
  }
8527
8714
  );
8528
- }, [onChange, onGlobalsChange, config]);
8715
+ }, [onChange, config]);
8529
8716
  useRegisterPermissionsSlice(appStore, permissions);
8530
8717
  const uEditorStore = useRegisterUseEditorStore(appStore);
8531
8718
  useEffect26(() => {
@@ -8534,10 +8721,10 @@ function EditorProvider({ children }) {
8534
8721
  resolveAndCommitData();
8535
8722
  }, 0);
8536
8723
  }, []);
8537
- return /* @__PURE__ */ jsx54(appStoreContext.Provider, { value: appStore, children: /* @__PURE__ */ jsx54(UseEditorStoreContext.Provider, { value: uEditorStore, children }) });
8724
+ return /* @__PURE__ */ jsx55(appStoreContext.Provider, { value: appStore, children: /* @__PURE__ */ jsx55(UseEditorStoreContext.Provider, { value: uEditorStore, children }) });
8538
8725
  }
8539
8726
  function Editor3(props) {
8540
- return /* @__PURE__ */ jsx54(PropsProvider, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx54(EditorProvider, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx54(Layout, { children: props.children }) })) }));
8727
+ return /* @__PURE__ */ jsx55(PropsProvider, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx55(EditorProvider, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx55(Layout, { children: props.children }) })) }));
8541
8728
  }
8542
8729
  Editor3.Components = Components;
8543
8730
  Editor3.Fields = Fields;
@@ -8570,12 +8757,12 @@ function pageMetadata(data) {
8570
8757
 
8571
8758
  // plugins/legacy-side-bar/index.tsx
8572
8759
  init_react_import();
8573
- import { jsx as jsx55, jsxs as jsxs23 } from "react/jsx-runtime";
8760
+ import { jsx as jsx56, jsxs as jsxs24 } from "react/jsx-runtime";
8574
8761
  var legacySideBarPlugin = () => ({
8575
8762
  name: "legacy-side-bar",
8576
- render: () => /* @__PURE__ */ jsxs23("div", { style: { overflowY: "auto" }, children: [
8577
- /* @__PURE__ */ jsx55(SidebarSection, { title: "Components", noBorderTop: true, children: /* @__PURE__ */ jsx55(Components, {}) }),
8578
- /* @__PURE__ */ jsx55(SidebarSection, { title: "Outline", children: /* @__PURE__ */ jsx55(Outline, {}) })
8763
+ render: () => /* @__PURE__ */ jsxs24("div", { style: { overflowY: "auto" }, children: [
8764
+ /* @__PURE__ */ jsx56(SidebarSection, { title: "Components", noBorderTop: true, children: /* @__PURE__ */ jsx56(Components, {}) }),
8765
+ /* @__PURE__ */ jsx56(SidebarSection, { title: "Outline", children: /* @__PURE__ */ jsx56(Outline, {}) })
8579
8766
  ] })
8580
8767
  });
8581
8768