@reacteditor/core 0.0.5 → 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.
- package/dist/Editor-4LPVLYSU.css +415 -0
- package/dist/{Editor-POJT3RA2.mjs → Editor-YNFB7B6Z.mjs} +7 -7
- package/dist/{Render-JNABKPAF.mjs → Render-STFB5CNO.mjs} +1 -1
- package/dist/Render-ZTUTUUAH.css +103 -0
- package/dist/{chunk-YFRH22NT.mjs → chunk-275EJPEB.mjs} +2 -2
- package/dist/{chunk-DCL4UC2H.mjs → chunk-6LG4Q4HO.mjs} +1 -1
- package/dist/{chunk-KC727YFW.mjs → chunk-6QJ2HF4O.mjs} +1 -1
- package/dist/{chunk-43G2QHSV.mjs → chunk-BRDUM7MJ.mjs} +10 -10
- package/dist/{chunk-IUOWXGYR.mjs → chunk-CRF2GWQA.mjs} +1 -1
- package/dist/{chunk-X7IRHSQN.mjs → chunk-DB4R5IWG.mjs} +4 -4
- package/dist/{chunk-QB3US7UE.mjs → chunk-HCFEY5Y7.mjs} +337 -177
- package/dist/{chunk-JEDWXGVP.mjs → chunk-WGPCLAZR.mjs} +1 -1
- package/dist/{chunk-5N6RK26Z.mjs → chunk-Z6IIVDFY.mjs} +1 -1
- package/dist/{full-HZMEMWCN.mjs → full-24FOTNTB.mjs} +5 -5
- package/dist/full-7ABPY2WA.css +311 -0
- package/dist/index.css +1268 -1165
- package/dist/index.js +393 -231
- package/dist/index.mjs +9 -9
- package/dist/{loaded-U6ZILQXM.mjs → loaded-6IBSSOXD.mjs} +2 -2
- package/dist/{loaded-35JQLXSA.mjs → loaded-6NPDD7SF.mjs} +2 -2
- package/dist/{loaded-QJMKRN35.mjs → loaded-BQVZGQG2.mjs} +2 -2
- package/dist/loaded-N4KWL7FV.css +90 -0
- package/dist/no-external.css +1268 -1165
- package/dist/no-external.js +393 -231
- package/dist/no-external.mjs +9 -9
- package/dist/rsc.css +40 -40
- package/dist/rsc.js +1 -1
- package/dist/rsc.mjs +2 -2
- package/package.json +2 -1
- package/dist/Editor-WYZZDKT3.css +0 -415
- package/dist/Render-WBTAN6PO.css +0 -103
- package/dist/full-5442HPZH.css +0 -311
- package/dist/loaded-KZZU4RNL.css +0 -90
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EditorInner,
|
|
3
3
|
LoadedRichTextMenu
|
|
4
|
-
} from "./chunk-
|
|
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-
|
|
13
|
+
} from "./chunk-275EJPEB.mjs";
|
|
14
14
|
import {
|
|
15
15
|
ActionBar,
|
|
16
16
|
IconButton,
|
|
17
17
|
LoadedRichTextMenuInner,
|
|
18
18
|
Loader
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-BRDUM7MJ.mjs";
|
|
20
20
|
import {
|
|
21
21
|
Check,
|
|
22
22
|
ChevronDown,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
useRegisterFieldsSlice,
|
|
61
61
|
useRegisterHistorySlice,
|
|
62
62
|
useRegisterPermissionsSlice
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-CRF2GWQA.mjs";
|
|
64
64
|
import {
|
|
65
65
|
getItem,
|
|
66
66
|
insert,
|
|
@@ -151,7 +151,7 @@ import { useEffect, useState } from "react";
|
|
|
151
151
|
|
|
152
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": "
|
|
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();
|
|
@@ -240,7 +240,7 @@ init_react_import();
|
|
|
240
240
|
|
|
241
241
|
// css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/AutoField/styles.module.css#css-module
|
|
242
242
|
init_react_import();
|
|
243
|
-
var styles_module_default = { "InputWrapper": "
|
|
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";
|
|
@@ -308,7 +308,7 @@ init_react_import();
|
|
|
308
308
|
|
|
309
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": "
|
|
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();
|
|
@@ -376,7 +376,7 @@ init_react_import();
|
|
|
376
376
|
|
|
377
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": "
|
|
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";
|
|
@@ -1388,7 +1388,7 @@ import {
|
|
|
1388
1388
|
|
|
1389
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-
|
|
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();
|
|
@@ -1396,7 +1396,7 @@ import { useEffect as useEffect4, useState as useState6 } from "react";
|
|
|
1396
1396
|
|
|
1397
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": "
|
|
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";
|
|
@@ -1432,7 +1432,7 @@ init_react_import();
|
|
|
1432
1432
|
|
|
1433
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": "
|
|
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";
|
|
@@ -1799,11 +1799,11 @@ import * as SelectPrimitive from "@radix-ui/react-select";
|
|
|
1799
1799
|
|
|
1800
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 = { "
|
|
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("
|
|
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-
|
|
2050
|
+
() => import("./Editor-YNFB7B6Z.mjs").then((m) => ({
|
|
2051
2051
|
default: m.Editor
|
|
2052
2052
|
}))
|
|
2053
2053
|
);
|
|
@@ -2087,7 +2087,7 @@ init_react_import();
|
|
|
2087
2087
|
|
|
2088
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": "
|
|
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";
|
|
@@ -2371,7 +2371,7 @@ import {
|
|
|
2371
2371
|
|
|
2372
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": "
|
|
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";
|
|
@@ -3108,7 +3108,7 @@ var DraggableComponent = ({
|
|
|
3108
3108
|
|
|
3109
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": "
|
|
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";
|
|
@@ -3118,7 +3118,7 @@ init_react_import();
|
|
|
3118
3118
|
|
|
3119
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": "
|
|
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";
|
|
@@ -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-
|
|
4589
|
+
() => import("./Editor-YNFB7B6Z.mjs").then((m) => ({
|
|
4590
4590
|
default: m.Editor
|
|
4591
4591
|
}))
|
|
4592
4592
|
);
|
|
4593
4593
|
var RichTextRender = lazy2(
|
|
4594
|
-
() => import("./Render-
|
|
4594
|
+
() => import("./Render-STFB5CNO.mjs").then((m) => ({
|
|
4595
4595
|
default: m.RichTextRender
|
|
4596
4596
|
}))
|
|
4597
4597
|
);
|
|
@@ -5538,7 +5538,7 @@ init_react_import();
|
|
|
5538
5538
|
|
|
5539
5539
|
// css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/ComponentList/styles.module.css#css-module
|
|
5540
5540
|
init_react_import();
|
|
5541
|
-
var styles_module_default13 = { "ComponentList": "
|
|
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" };
|
|
5542
5542
|
|
|
5543
5543
|
// components/ComponentList/index.tsx
|
|
5544
5544
|
import { useEffect as useEffect17 } from "react";
|
|
@@ -5788,7 +5788,7 @@ import { useMemo as useMemo14, useState as useState17 } from "react";
|
|
|
5788
5788
|
|
|
5789
5789
|
// css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Components/styles.module.css#css-module
|
|
5790
5790
|
init_react_import();
|
|
5791
|
-
var styles_module_default14 = { "Components-search": "_Components-
|
|
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" };
|
|
5792
5792
|
|
|
5793
5793
|
// components/Editor/components/Components/index.tsx
|
|
5794
5794
|
import { jsx as jsx35, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
@@ -5905,7 +5905,7 @@ init_react_import();
|
|
|
5905
5905
|
|
|
5906
5906
|
// css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/LayerTree/styles.module.css#css-module
|
|
5907
5907
|
init_react_import();
|
|
5908
|
-
var styles_module_default16 = { "LayerTree": "
|
|
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" };
|
|
5909
5909
|
|
|
5910
5910
|
// components/LayerTree/index.tsx
|
|
5911
5911
|
import {
|
|
@@ -6363,7 +6363,7 @@ init_react_import();
|
|
|
6363
6363
|
|
|
6364
6364
|
// css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Breadcrumbs/styles.module.css#css-module
|
|
6365
6365
|
init_react_import();
|
|
6366
|
-
var styles_module_default18 = { "Breadcrumbs": "
|
|
6366
|
+
var styles_module_default18 = { "Breadcrumbs": "_Breadcrumbs_1cjxk_1", "Breadcrumbs-breadcrumb": "_Breadcrumbs-breadcrumb_1cjxk_10", "Breadcrumbs-breadcrumbLabel": "_Breadcrumbs-breadcrumbLabel_1cjxk_17" };
|
|
6367
6367
|
|
|
6368
6368
|
// lib/use-breadcrumbs.ts
|
|
6369
6369
|
init_react_import();
|
|
@@ -6440,7 +6440,7 @@ init_react_import();
|
|
|
6440
6440
|
|
|
6441
6441
|
// css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Fields/styles.module.css#css-module
|
|
6442
6442
|
init_react_import();
|
|
6443
|
-
var styles_module_default19 = { "EditorFields": "
|
|
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" };
|
|
6444
6444
|
|
|
6445
6445
|
// components/Editor/components/Fields/index.tsx
|
|
6446
6446
|
import {
|
|
@@ -6638,7 +6638,7 @@ var Fields = memo8(FieldsInternal);
|
|
|
6638
6638
|
|
|
6639
6639
|
// css-module:/Users/rami/Documents/apps/react-editor/packages/core/plugins/fields/styles.module.css#css-module
|
|
6640
6640
|
init_react_import();
|
|
6641
|
-
var styles_module_default20 = { "FieldsPlugin": "
|
|
6641
|
+
var styles_module_default20 = { "FieldsPlugin": "_FieldsPlugin_262zt_1", "FieldsPlugin-header": "_FieldsPlugin-header_262zt_7" };
|
|
6642
6642
|
|
|
6643
6643
|
// plugins/fields/index.tsx
|
|
6644
6644
|
import { jsx as jsx42, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
@@ -6670,8 +6670,8 @@ import {
|
|
|
6670
6670
|
useContext as useContext15,
|
|
6671
6671
|
useEffect as useEffect26,
|
|
6672
6672
|
useMemo as useMemo24,
|
|
6673
|
-
useRef as
|
|
6674
|
-
useState as
|
|
6673
|
+
useRef as useRef18,
|
|
6674
|
+
useState as useState24
|
|
6675
6675
|
} from "react";
|
|
6676
6676
|
|
|
6677
6677
|
// components/Editor/components/Preview/index.tsx
|
|
@@ -7180,13 +7180,13 @@ import {
|
|
|
7180
7180
|
useCallback as useCallback22,
|
|
7181
7181
|
useEffect as useEffect25,
|
|
7182
7182
|
useMemo as useMemo23,
|
|
7183
|
-
useRef as
|
|
7184
|
-
useState as
|
|
7183
|
+
useRef as useRef17,
|
|
7184
|
+
useState as useState23
|
|
7185
7185
|
} from "react";
|
|
7186
7186
|
|
|
7187
7187
|
// css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Layout/styles.module.css#css-module
|
|
7188
7188
|
init_react_import();
|
|
7189
|
-
var styles_module_default22 = { "Editor": "
|
|
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" };
|
|
7190
7190
|
|
|
7191
7191
|
// lib/use-inject-css.ts
|
|
7192
7192
|
init_react_import();
|
|
@@ -7243,7 +7243,7 @@ init_react_import();
|
|
|
7243
7243
|
|
|
7244
7244
|
// css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/SidebarSection/styles.module.css#css-module
|
|
7245
7245
|
init_react_import();
|
|
7246
|
-
var styles_module_default23 = { "SidebarSection": "
|
|
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" };
|
|
7247
7247
|
|
|
7248
7248
|
// components/SidebarSection/index.tsx
|
|
7249
7249
|
import { jsx as jsx46, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
@@ -7272,21 +7272,146 @@ import {
|
|
|
7272
7272
|
useCallback as useCallback18,
|
|
7273
7273
|
useEffect as useEffect23,
|
|
7274
7274
|
useMemo as useMemo22,
|
|
7275
|
-
useRef as
|
|
7276
|
-
useState as
|
|
7275
|
+
useRef as useRef14,
|
|
7276
|
+
useState as useState21
|
|
7277
7277
|
} from "react";
|
|
7278
7278
|
|
|
7279
7279
|
// components/BrowserBar/index.tsx
|
|
7280
7280
|
init_react_import();
|
|
7281
|
-
import { useMemo as useMemo20 } from "react";
|
|
7281
|
+
import { useMemo as useMemo20, useRef as useRef12, useState as useState20 } from "react";
|
|
7282
|
+
|
|
7283
|
+
// components/ui/Combobox/index.tsx
|
|
7284
|
+
init_react_import();
|
|
7285
|
+
import { Combobox as ComboboxPrimitive } from "@base-ui/react";
|
|
7286
|
+
|
|
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
|
|
7292
|
+
import { jsx as jsx47, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
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
|
+
}
|
|
7282
7402
|
|
|
7283
7403
|
// css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/BrowserBar/styles.module.css#css-module
|
|
7284
7404
|
init_react_import();
|
|
7285
|
-
var
|
|
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" };
|
|
7286
7406
|
|
|
7287
7407
|
// components/BrowserBar/index.tsx
|
|
7288
|
-
import { jsx as
|
|
7289
|
-
var
|
|
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);
|
|
7290
7415
|
var DEVICE_VIEWPORTS = {
|
|
7291
7416
|
desktop: { width: "100%", height: "auto", icon: "Monitor", label: "Desktop" },
|
|
7292
7417
|
mobile: { width: 360, height: "auto", icon: "Smartphone", label: "Mobile" }
|
|
@@ -7294,7 +7419,6 @@ var DEVICE_VIEWPORTS = {
|
|
|
7294
7419
|
var BrowserBar = ({
|
|
7295
7420
|
onViewportChange
|
|
7296
7421
|
}) => {
|
|
7297
|
-
var _a;
|
|
7298
7422
|
const { routes, currentPath, onRouteChange } = usePropsContext();
|
|
7299
7423
|
const viewports = useAppStore((s) => s.state.ui.viewports);
|
|
7300
7424
|
const dispatch = useAppStore((s) => s.dispatch);
|
|
@@ -7322,50 +7446,86 @@ var BrowserBar = ({
|
|
|
7322
7446
|
onViewportChange == null ? void 0 : onViewportChange(DEVICE_VIEWPORTS[device]);
|
|
7323
7447
|
};
|
|
7324
7448
|
const showRoutePicker = !!routes && currentPath !== void 0 && !!onRouteChange;
|
|
7325
|
-
const
|
|
7326
|
-
|
|
7327
|
-
|
|
7328
|
-
|
|
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,
|
|
7329
7463
|
{
|
|
7464
|
+
items: routes.map((r) => r.path),
|
|
7330
7465
|
value: currentPath,
|
|
7331
7466
|
onValueChange: (next) => {
|
|
7332
|
-
|
|
7467
|
+
if (typeof next === "string") submit(next);
|
|
7333
7468
|
},
|
|
7469
|
+
inputValue,
|
|
7470
|
+
onInputValueChange: (next) => setInputValue(next),
|
|
7471
|
+
autoHighlight: false,
|
|
7334
7472
|
children: [
|
|
7335
|
-
/* @__PURE__ */
|
|
7336
|
-
|
|
7337
|
-
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
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
|
+
} })
|
|
7345
7505
|
] })
|
|
7346
7506
|
]
|
|
7347
7507
|
}
|
|
7348
|
-
) : /* @__PURE__ */
|
|
7349
|
-
/* @__PURE__ */
|
|
7350
|
-
/* @__PURE__ */
|
|
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: "/" })
|
|
7351
7511
|
] }),
|
|
7352
|
-
/* @__PURE__ */
|
|
7353
|
-
/* @__PURE__ */
|
|
7512
|
+
/* @__PURE__ */ jsxs19("div", { className: getClassName29("actions"), children: [
|
|
7513
|
+
/* @__PURE__ */ jsx48(
|
|
7354
7514
|
IconButton,
|
|
7355
7515
|
{
|
|
7356
7516
|
type: "button",
|
|
7357
7517
|
title: activeDevice === "desktop" ? "Switch to mobile viewport" : "Switch to desktop viewport",
|
|
7358
7518
|
onClick: () => setDevice(activeDevice === "desktop" ? "mobile" : "desktop"),
|
|
7359
|
-
children: /* @__PURE__ */
|
|
7519
|
+
children: /* @__PURE__ */ jsx48("span", { className: getClassName29("deviceIcon"), children: activeDevice === "desktop" ? /* @__PURE__ */ jsx48(Monitor, { size: 16 }) : /* @__PURE__ */ jsx48(Smartphone, { size: 16 }) })
|
|
7360
7520
|
}
|
|
7361
7521
|
),
|
|
7362
|
-
/* @__PURE__ */
|
|
7522
|
+
/* @__PURE__ */ jsx48(
|
|
7363
7523
|
IconButton,
|
|
7364
7524
|
{
|
|
7365
7525
|
type: "button",
|
|
7366
7526
|
title: isFullScreen ? "Exit full screen" : "Enter full screen",
|
|
7367
7527
|
onClick: toggleFullScreen,
|
|
7368
|
-
children: /* @__PURE__ */
|
|
7528
|
+
children: /* @__PURE__ */ jsx48("span", { className: getClassName29("deviceIcon"), children: isFullScreen ? /* @__PURE__ */ jsx48(Minimize, { size: 16 }) : /* @__PURE__ */ jsx48(Maximize, { size: 16 }) })
|
|
7369
7529
|
}
|
|
7370
7530
|
)
|
|
7371
7531
|
] })
|
|
@@ -7374,7 +7534,7 @@ var BrowserBar = ({
|
|
|
7374
7534
|
|
|
7375
7535
|
// css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Canvas/styles.module.css#css-module
|
|
7376
7536
|
init_react_import();
|
|
7377
|
-
var
|
|
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" };
|
|
7378
7538
|
|
|
7379
7539
|
// components/Editor/components/Canvas/index.tsx
|
|
7380
7540
|
import { useShallow as useShallow9 } from "zustand/react/shallow";
|
|
@@ -7384,22 +7544,22 @@ init_react_import();
|
|
|
7384
7544
|
import {
|
|
7385
7545
|
createContext as createContext7,
|
|
7386
7546
|
useContext as useContext14,
|
|
7387
|
-
useRef as
|
|
7547
|
+
useRef as useRef13,
|
|
7388
7548
|
useMemo as useMemo21
|
|
7389
7549
|
} from "react";
|
|
7390
|
-
import { jsx as
|
|
7550
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
7391
7551
|
var FrameContext = createContext7(null);
|
|
7392
7552
|
var FrameProvider = ({
|
|
7393
7553
|
children
|
|
7394
7554
|
}) => {
|
|
7395
|
-
const frameRef =
|
|
7555
|
+
const frameRef = useRef13(null);
|
|
7396
7556
|
const value = useMemo21(
|
|
7397
7557
|
() => ({
|
|
7398
7558
|
frameRef
|
|
7399
7559
|
}),
|
|
7400
7560
|
[]
|
|
7401
7561
|
);
|
|
7402
|
-
return /* @__PURE__ */
|
|
7562
|
+
return /* @__PURE__ */ jsx49(FrameContext.Provider, { value, children });
|
|
7403
7563
|
};
|
|
7404
7564
|
var useCanvasFrame = () => {
|
|
7405
7565
|
const context = useContext14(FrameContext);
|
|
@@ -7410,8 +7570,8 @@ var useCanvasFrame = () => {
|
|
|
7410
7570
|
};
|
|
7411
7571
|
|
|
7412
7572
|
// components/Editor/components/Canvas/index.tsx
|
|
7413
|
-
import { Fragment as Fragment13, jsx as
|
|
7414
|
-
var
|
|
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);
|
|
7415
7575
|
var ZOOM_STEP = 0.15;
|
|
7416
7576
|
var MIN_ZOOM = 0.25;
|
|
7417
7577
|
var MAX_ZOOM = 3;
|
|
@@ -7446,14 +7606,14 @@ var Canvas = () => {
|
|
|
7446
7606
|
}))
|
|
7447
7607
|
);
|
|
7448
7608
|
const viewports = useAppStore((s) => s.state.ui.viewports);
|
|
7449
|
-
const [canvasZoom, setCanvasZoom] =
|
|
7609
|
+
const [canvasZoom, setCanvasZoom] = useState21(1);
|
|
7450
7610
|
const zoomIn = () => setCanvasZoom((z) => Math.min(z + ZOOM_STEP, MAX_ZOOM));
|
|
7451
7611
|
const zoomOut = () => setCanvasZoom((z) => Math.max(z - ZOOM_STEP, MIN_ZOOM));
|
|
7452
7612
|
const resetZoom = () => setCanvasZoom(1);
|
|
7453
|
-
const [showTransition, setShowTransition] =
|
|
7454
|
-
const isResizingRef =
|
|
7613
|
+
const [showTransition, setShowTransition] = useState21(false);
|
|
7614
|
+
const isResizingRef = useRef14(false);
|
|
7455
7615
|
const defaultRender = useMemo22(() => {
|
|
7456
|
-
const EditorDefault = ({ children }) => /* @__PURE__ */
|
|
7616
|
+
const EditorDefault = ({ children }) => /* @__PURE__ */ jsx50(Fragment13, { children });
|
|
7457
7617
|
return EditorDefault;
|
|
7458
7618
|
}, []);
|
|
7459
7619
|
const CustomPreview = useMemo22(
|
|
@@ -7474,14 +7634,14 @@ var Canvas = () => {
|
|
|
7474
7634
|
setZoomConfig(__spreadProps(__spreadValues({}, zoomConfig), { zoom: 1, rootHeight: frameHeight }));
|
|
7475
7635
|
}
|
|
7476
7636
|
}, [getFrameDimensions, setZoomConfig, viewports.current.height]);
|
|
7477
|
-
const [showLoader, setShowLoader] =
|
|
7637
|
+
const [showLoader, setShowLoader] = useState21(false);
|
|
7478
7638
|
useEffect23(() => {
|
|
7479
7639
|
setTimeout(() => {
|
|
7480
7640
|
setShowLoader(true);
|
|
7481
7641
|
}, 500);
|
|
7482
7642
|
}, []);
|
|
7483
7643
|
const appStoreApi = useAppStoreApi();
|
|
7484
|
-
const autoSelectingRef =
|
|
7644
|
+
const autoSelectingRef = useRef14(true);
|
|
7485
7645
|
const pickClosestViewport = useCallback18(() => {
|
|
7486
7646
|
var _a2, _b2;
|
|
7487
7647
|
if (typeof window === "undefined") return null;
|
|
@@ -7575,10 +7735,10 @@ var Canvas = () => {
|
|
|
7575
7735
|
appStoreApi,
|
|
7576
7736
|
setUi
|
|
7577
7737
|
]);
|
|
7578
|
-
return /* @__PURE__ */
|
|
7738
|
+
return /* @__PURE__ */ jsx50(
|
|
7579
7739
|
"div",
|
|
7580
7740
|
{
|
|
7581
|
-
className:
|
|
7741
|
+
className: getClassName30({
|
|
7582
7742
|
ready: status === "READY" || !iframe.enabled || !iframe.waitForStyles,
|
|
7583
7743
|
showLoader,
|
|
7584
7744
|
fullScreen: fullScreenCanvas
|
|
@@ -7593,16 +7753,16 @@ var Canvas = () => {
|
|
|
7593
7753
|
});
|
|
7594
7754
|
}
|
|
7595
7755
|
},
|
|
7596
|
-
children: /* @__PURE__ */
|
|
7597
|
-
!disableZoomControls && /* @__PURE__ */
|
|
7598
|
-
/* @__PURE__ */
|
|
7599
|
-
/* @__PURE__ */
|
|
7600
|
-
/* @__PURE__ */
|
|
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 }) })
|
|
7601
7761
|
] }),
|
|
7602
|
-
/* @__PURE__ */
|
|
7762
|
+
/* @__PURE__ */ jsxs20(
|
|
7603
7763
|
"div",
|
|
7604
7764
|
{
|
|
7605
|
-
className:
|
|
7765
|
+
className: getClassName30("rootColumn"),
|
|
7606
7766
|
style: {
|
|
7607
7767
|
width: iframe.enabled ? viewports.current.width : "100%",
|
|
7608
7768
|
transform: disableZoomControls ? void 0 : `scale(${canvasZoom})`,
|
|
@@ -7610,7 +7770,7 @@ var Canvas = () => {
|
|
|
7610
7770
|
transition: showTransition ? `width ${TRANSITION_DURATION}ms ease-out, transform ${TRANSITION_DURATION}ms ease-out` : disableZoomControls ? void 0 : "transform 150ms ease-out"
|
|
7611
7771
|
},
|
|
7612
7772
|
children: [
|
|
7613
|
-
iframe.enabled && /* @__PURE__ */
|
|
7773
|
+
iframe.enabled && /* @__PURE__ */ jsx50("div", { className: getClassName30("browserBar"), children: /* @__PURE__ */ jsx50(
|
|
7614
7774
|
BrowserBar,
|
|
7615
7775
|
{
|
|
7616
7776
|
onViewportChange: (viewport) => {
|
|
@@ -7627,23 +7787,23 @@ var Canvas = () => {
|
|
|
7627
7787
|
}
|
|
7628
7788
|
}
|
|
7629
7789
|
) }),
|
|
7630
|
-
/* @__PURE__ */
|
|
7790
|
+
/* @__PURE__ */ jsx50(
|
|
7631
7791
|
"div",
|
|
7632
7792
|
{
|
|
7633
|
-
className:
|
|
7793
|
+
className: getClassName30("root"),
|
|
7634
7794
|
suppressHydrationWarning: true,
|
|
7635
7795
|
id: "editor-canvas-root",
|
|
7636
7796
|
onTransitionEnd: () => {
|
|
7637
7797
|
setShowTransition(false);
|
|
7638
7798
|
isResizingRef.current = false;
|
|
7639
7799
|
},
|
|
7640
|
-
children: /* @__PURE__ */
|
|
7800
|
+
children: /* @__PURE__ */ jsx50(CustomPreview, { children: /* @__PURE__ */ jsx50(Preview2, {}) })
|
|
7641
7801
|
}
|
|
7642
7802
|
)
|
|
7643
7803
|
]
|
|
7644
7804
|
}
|
|
7645
7805
|
),
|
|
7646
|
-
/* @__PURE__ */
|
|
7806
|
+
/* @__PURE__ */ jsx50("div", { className: getClassName30("loader"), children: /* @__PURE__ */ jsx50(Loader, { size: 24 }) })
|
|
7647
7807
|
] })
|
|
7648
7808
|
}
|
|
7649
7809
|
);
|
|
@@ -7651,10 +7811,10 @@ var Canvas = () => {
|
|
|
7651
7811
|
|
|
7652
7812
|
// lib/use-sidebar-resize.ts
|
|
7653
7813
|
init_react_import();
|
|
7654
|
-
import { useCallback as useCallback19, useEffect as useEffect24, useRef as
|
|
7814
|
+
import { useCallback as useCallback19, useEffect as useEffect24, useRef as useRef15, useState as useState22 } from "react";
|
|
7655
7815
|
function useSidebarResize(position, dispatch) {
|
|
7656
|
-
const [width, setWidth] =
|
|
7657
|
-
const sidebarRef =
|
|
7816
|
+
const [width, setWidth] = useState22(null);
|
|
7817
|
+
const sidebarRef = useRef15(null);
|
|
7658
7818
|
const storeWidth = useAppStore(
|
|
7659
7819
|
(s) => position === "left" ? s.state.ui.leftSideBarWidth : s.state.ui.rightSideBarWidth
|
|
7660
7820
|
);
|
|
@@ -7735,25 +7895,25 @@ init_react_import();
|
|
|
7735
7895
|
|
|
7736
7896
|
// components/Editor/components/ResizeHandle/index.tsx
|
|
7737
7897
|
init_react_import();
|
|
7738
|
-
import { useCallback as useCallback20, useRef as
|
|
7898
|
+
import { useCallback as useCallback20, useRef as useRef16 } from "react";
|
|
7739
7899
|
|
|
7740
7900
|
// css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/ResizeHandle/styles.module.css#css-module
|
|
7741
7901
|
init_react_import();
|
|
7742
|
-
var
|
|
7902
|
+
var styles_module_default27 = { "ResizeHandle": "_ResizeHandle_1u3rv_2", "ResizeHandle--left": "_ResizeHandle--left_1u3rv_16", "ResizeHandle--right": "_ResizeHandle--right_1u3rv_20" };
|
|
7743
7903
|
|
|
7744
7904
|
// components/Editor/components/ResizeHandle/index.tsx
|
|
7745
|
-
import { jsx as
|
|
7746
|
-
var
|
|
7905
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
7906
|
+
var getClassName31 = get_class_name_factory_default("ResizeHandle", styles_module_default27);
|
|
7747
7907
|
var ResizeHandle = ({
|
|
7748
7908
|
position,
|
|
7749
7909
|
sidebarRef,
|
|
7750
7910
|
onResize,
|
|
7751
7911
|
onResizeEnd
|
|
7752
7912
|
}) => {
|
|
7753
|
-
const handleRef =
|
|
7754
|
-
const isDragging =
|
|
7755
|
-
const startX =
|
|
7756
|
-
const startWidth =
|
|
7913
|
+
const handleRef = useRef16(null);
|
|
7914
|
+
const isDragging = useRef16(false);
|
|
7915
|
+
const startX = useRef16(0);
|
|
7916
|
+
const startWidth = useRef16(0);
|
|
7757
7917
|
const handleMouseMove = useCallback20(
|
|
7758
7918
|
(e) => {
|
|
7759
7919
|
if (!isDragging.current) return;
|
|
@@ -7798,11 +7958,11 @@ var ResizeHandle = ({
|
|
|
7798
7958
|
},
|
|
7799
7959
|
[position, handleMouseMove, handleMouseUp]
|
|
7800
7960
|
);
|
|
7801
|
-
return /* @__PURE__ */
|
|
7961
|
+
return /* @__PURE__ */ jsx51(
|
|
7802
7962
|
"div",
|
|
7803
7963
|
{
|
|
7804
7964
|
ref: handleRef,
|
|
7805
|
-
className:
|
|
7965
|
+
className: getClassName31({ [position]: true }),
|
|
7806
7966
|
onMouseDown: handleMouseDown
|
|
7807
7967
|
}
|
|
7808
7968
|
);
|
|
@@ -7810,11 +7970,11 @@ var ResizeHandle = ({
|
|
|
7810
7970
|
|
|
7811
7971
|
// css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Sidebar/styles.module.css#css-module
|
|
7812
7972
|
init_react_import();
|
|
7813
|
-
var
|
|
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" };
|
|
7814
7974
|
|
|
7815
7975
|
// components/Editor/components/Sidebar/index.tsx
|
|
7816
|
-
import { Fragment as Fragment14, jsx as
|
|
7817
|
-
var
|
|
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);
|
|
7818
7978
|
var Sidebar = ({
|
|
7819
7979
|
position,
|
|
7820
7980
|
sidebarRef,
|
|
@@ -7823,16 +7983,16 @@ var Sidebar = ({
|
|
|
7823
7983
|
onResizeEnd,
|
|
7824
7984
|
children
|
|
7825
7985
|
}) => {
|
|
7826
|
-
return /* @__PURE__ */
|
|
7827
|
-
/* @__PURE__ */
|
|
7986
|
+
return /* @__PURE__ */ jsxs21(Fragment14, { children: [
|
|
7987
|
+
/* @__PURE__ */ jsx52(
|
|
7828
7988
|
"div",
|
|
7829
7989
|
{
|
|
7830
7990
|
ref: sidebarRef,
|
|
7831
|
-
className:
|
|
7991
|
+
className: getClassName32({ [position]: true, isVisible }),
|
|
7832
7992
|
children
|
|
7833
7993
|
}
|
|
7834
7994
|
),
|
|
7835
|
-
/* @__PURE__ */
|
|
7995
|
+
/* @__PURE__ */ jsx52("div", { className: `${getClassName32("resizeHandle")}`, children: /* @__PURE__ */ jsx52(
|
|
7836
7996
|
ResizeHandle,
|
|
7837
7997
|
{
|
|
7838
7998
|
position,
|
|
@@ -7910,12 +8070,12 @@ init_react_import();
|
|
|
7910
8070
|
|
|
7911
8071
|
// css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Nav/styles.module.css#css-module
|
|
7912
8072
|
init_react_import();
|
|
7913
|
-
var
|
|
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" };
|
|
7914
8074
|
|
|
7915
8075
|
// components/Editor/components/Nav/index.tsx
|
|
7916
|
-
import { jsx as
|
|
7917
|
-
var
|
|
7918
|
-
var getClassNameItem3 = get_class_name_factory_default("NavItem",
|
|
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);
|
|
7919
8079
|
var MenuItem = ({
|
|
7920
8080
|
label,
|
|
7921
8081
|
icon,
|
|
@@ -7924,7 +8084,7 @@ var MenuItem = ({
|
|
|
7924
8084
|
mobileOnly,
|
|
7925
8085
|
desktopOnly
|
|
7926
8086
|
}) => {
|
|
7927
|
-
return /* @__PURE__ */
|
|
8087
|
+
return /* @__PURE__ */ jsx53(
|
|
7928
8088
|
"li",
|
|
7929
8089
|
{
|
|
7930
8090
|
className: getClassNameItem3({
|
|
@@ -7932,9 +8092,9 @@ var MenuItem = ({
|
|
|
7932
8092
|
mobileOnly,
|
|
7933
8093
|
desktopOnly
|
|
7934
8094
|
}),
|
|
7935
|
-
children: onClick && /* @__PURE__ */
|
|
7936
|
-
icon && /* @__PURE__ */
|
|
7937
|
-
/* @__PURE__ */
|
|
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 })
|
|
7938
8098
|
] })
|
|
7939
8099
|
}
|
|
7940
8100
|
);
|
|
@@ -7943,15 +8103,15 @@ var Nav = ({
|
|
|
7943
8103
|
items,
|
|
7944
8104
|
footer
|
|
7945
8105
|
}) => {
|
|
7946
|
-
return /* @__PURE__ */
|
|
7947
|
-
/* @__PURE__ */
|
|
7948
|
-
footer && /* @__PURE__ */
|
|
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 })
|
|
7949
8109
|
] });
|
|
7950
8110
|
};
|
|
7951
8111
|
|
|
7952
8112
|
// components/Editor/components/Layout/index.tsx
|
|
7953
|
-
import { Fragment as Fragment15, jsx as
|
|
7954
|
-
var
|
|
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);
|
|
7955
8115
|
var getLayoutClassName = get_class_name_factory_default("EditorLayout", styles_module_default22);
|
|
7956
8116
|
var getPluginTabClassName = get_class_name_factory_default("EditorPluginTab", styles_module_default22);
|
|
7957
8117
|
var FieldSideBarToolbar = () => {
|
|
@@ -7964,30 +8124,30 @@ var FieldSideBarToolbar = () => {
|
|
|
7964
8124
|
const CustomHeaderActions = useAppStore(
|
|
7965
8125
|
(s) => s.overrides.headerActions || DefaultOverride
|
|
7966
8126
|
);
|
|
7967
|
-
return /* @__PURE__ */
|
|
7968
|
-
/* @__PURE__ */
|
|
7969
|
-
/* @__PURE__ */
|
|
8127
|
+
return /* @__PURE__ */ jsxs23("div", { className: getClassName34("fieldSideBarToolbar"), children: [
|
|
8128
|
+
/* @__PURE__ */ jsxs23("div", { className: getClassName34("fieldSideBarHistory"), children: [
|
|
8129
|
+
/* @__PURE__ */ jsx54(
|
|
7970
8130
|
IconButton,
|
|
7971
8131
|
{
|
|
7972
8132
|
type: "button",
|
|
7973
8133
|
title: "undo",
|
|
7974
8134
|
disabled: !hasPast,
|
|
7975
8135
|
onClick: back,
|
|
7976
|
-
children: /* @__PURE__ */
|
|
8136
|
+
children: /* @__PURE__ */ jsx54(Undo2, { size: 18 })
|
|
7977
8137
|
}
|
|
7978
8138
|
),
|
|
7979
|
-
/* @__PURE__ */
|
|
8139
|
+
/* @__PURE__ */ jsx54(
|
|
7980
8140
|
IconButton,
|
|
7981
8141
|
{
|
|
7982
8142
|
type: "button",
|
|
7983
8143
|
title: "redo",
|
|
7984
8144
|
disabled: !hasFuture,
|
|
7985
8145
|
onClick: forward,
|
|
7986
|
-
children: /* @__PURE__ */
|
|
8146
|
+
children: /* @__PURE__ */ jsx54(Redo2, { size: 18 })
|
|
7987
8147
|
}
|
|
7988
8148
|
)
|
|
7989
8149
|
] }),
|
|
7990
|
-
/* @__PURE__ */
|
|
8150
|
+
/* @__PURE__ */ jsx54("div", { className: getClassName34("fieldSideBarActions"), children: /* @__PURE__ */ jsx54(CustomHeaderActions, { children: /* @__PURE__ */ jsx54(
|
|
7991
8151
|
Button,
|
|
7992
8152
|
{
|
|
7993
8153
|
onClick: () => {
|
|
@@ -8006,9 +8166,9 @@ var FieldSideBar = () => {
|
|
|
8006
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";
|
|
8007
8167
|
}
|
|
8008
8168
|
);
|
|
8009
|
-
return /* @__PURE__ */
|
|
8010
|
-
/* @__PURE__ */
|
|
8011
|
-
/* @__PURE__ */
|
|
8169
|
+
return /* @__PURE__ */ jsxs23(Fragment15, { children: [
|
|
8170
|
+
/* @__PURE__ */ jsx54(FieldSideBarToolbar, {}),
|
|
8171
|
+
/* @__PURE__ */ jsx54(SidebarSection, { noBorderTop: true, showBreadcrumbs: true, title, children: /* @__PURE__ */ jsx54(Fields, {}) })
|
|
8012
8172
|
] });
|
|
8013
8173
|
};
|
|
8014
8174
|
var PluginTab = ({
|
|
@@ -8016,7 +8176,7 @@ var PluginTab = ({
|
|
|
8016
8176
|
visible,
|
|
8017
8177
|
mobileOnly
|
|
8018
8178
|
}) => {
|
|
8019
|
-
return /* @__PURE__ */
|
|
8179
|
+
return /* @__PURE__ */ jsx54("div", { className: getPluginTabClassName({ visible, mobileOnly }), children: /* @__PURE__ */ jsx54("div", { className: getPluginTabClassName("body"), children }) });
|
|
8020
8180
|
};
|
|
8021
8181
|
var Layout = ({ children }) => {
|
|
8022
8182
|
const {
|
|
@@ -8080,7 +8240,7 @@ var Layout = ({ children }) => {
|
|
|
8080
8240
|
() => overrides.editor || DefaultOverride,
|
|
8081
8241
|
[overrides]
|
|
8082
8242
|
);
|
|
8083
|
-
const [mounted, setMounted] =
|
|
8243
|
+
const [mounted, setMounted] = useState23(false);
|
|
8084
8244
|
useEffect25(() => {
|
|
8085
8245
|
setMounted(true);
|
|
8086
8246
|
}, []);
|
|
@@ -8098,10 +8258,10 @@ var Layout = ({ children }) => {
|
|
|
8098
8258
|
useDeleteHotkeys();
|
|
8099
8259
|
const layoutOptions = {};
|
|
8100
8260
|
if (leftWidth) {
|
|
8101
|
-
layoutOptions["--
|
|
8261
|
+
layoutOptions["--editor-user-left-side-bar-width"] = `${leftWidth}px`;
|
|
8102
8262
|
}
|
|
8103
8263
|
if (rightWidth) {
|
|
8104
|
-
layoutOptions["--
|
|
8264
|
+
layoutOptions["--editor-user-right-side-bar-width"] = `${rightWidth}px`;
|
|
8105
8265
|
}
|
|
8106
8266
|
const setUi = useAppStore((s) => s.setUi);
|
|
8107
8267
|
const currentPlugin = useAppStore((s) => {
|
|
@@ -8109,14 +8269,14 @@ var Layout = ({ children }) => {
|
|
|
8109
8269
|
return (_a = s.state.ui.plugin) == null ? void 0 : _a.current;
|
|
8110
8270
|
});
|
|
8111
8271
|
const appStoreApi = useAppStoreApi();
|
|
8112
|
-
const [mobilePanelHeightMode, setMobilePanelHeightMode] =
|
|
8113
|
-
const [mobilePanelHeight, setMobilePanelHeight] =
|
|
8272
|
+
const [mobilePanelHeightMode, setMobilePanelHeightMode] = useState23("toggle");
|
|
8273
|
+
const [mobilePanelHeight, setMobilePanelHeight] = useState23(
|
|
8114
8274
|
null
|
|
8115
8275
|
);
|
|
8116
|
-
const mobilePanelRef =
|
|
8117
|
-
const isDraggingMobile =
|
|
8118
|
-
const dragStartY =
|
|
8119
|
-
const dragStartHeight =
|
|
8276
|
+
const mobilePanelRef = useRef17(null);
|
|
8277
|
+
const isDraggingMobile = useRef17(false);
|
|
8278
|
+
const dragStartY = useRef17(0);
|
|
8279
|
+
const dragStartHeight = useRef17(0);
|
|
8120
8280
|
const handleMobileDragStart = useCallback22(
|
|
8121
8281
|
(clientY) => {
|
|
8122
8282
|
isDraggingMobile.current = true;
|
|
@@ -8169,7 +8329,7 @@ var Layout = ({ children }) => {
|
|
|
8169
8329
|
document.removeEventListener("mouseup", onMouseUp);
|
|
8170
8330
|
};
|
|
8171
8331
|
}, [handleMobileDragMove, handleMobileDragEnd]);
|
|
8172
|
-
const [theme, setTheme] =
|
|
8332
|
+
const [theme, setTheme] = useState23(() => {
|
|
8173
8333
|
if (typeof window === "undefined") return "light";
|
|
8174
8334
|
const stored = window.localStorage.getItem("editor-theme");
|
|
8175
8335
|
if (stored === "light" || stored === "dark") return stored;
|
|
@@ -8182,7 +8342,7 @@ var Layout = ({ children }) => {
|
|
|
8182
8342
|
const toggleTheme = () => {
|
|
8183
8343
|
setTheme((t) => t === "dark" ? "light" : "dark");
|
|
8184
8344
|
};
|
|
8185
|
-
const themeIcon = theme === "dark" ? /* @__PURE__ */
|
|
8345
|
+
const themeIcon = theme === "dark" ? /* @__PURE__ */ jsx54(Sun, { size: 18 }) : /* @__PURE__ */ jsx54(Moon, { size: 18 });
|
|
8186
8346
|
const themeLabel = theme === "dark" ? "Switch to light mode" : "Switch to dark mode";
|
|
8187
8347
|
const hasLegacySideBarPlugin = useMemo23(
|
|
8188
8348
|
() => !!(plugins == null ? void 0 : plugins.find((p) => p.name === "legacy-side-bar")),
|
|
@@ -8207,7 +8367,7 @@ var Layout = ({ children }) => {
|
|
|
8207
8367
|
}
|
|
8208
8368
|
details[plugin.name] = {
|
|
8209
8369
|
label: (_a = plugin.label) != null ? _a : plugin.name,
|
|
8210
|
-
icon: (_b = plugin.icon) != null ? _b : /* @__PURE__ */
|
|
8370
|
+
icon: (_b = plugin.icon) != null ? _b : /* @__PURE__ */ jsx54(ToyBrick, {}),
|
|
8211
8371
|
onClick: () => {
|
|
8212
8372
|
var _a2;
|
|
8213
8373
|
setMobilePanelHeightMode((_a2 = plugin.mobilePanelHeight) != null ? _a2 : "toggle");
|
|
@@ -8244,19 +8404,19 @@ var Layout = ({ children }) => {
|
|
|
8244
8404
|
const hasDesktopFieldsPlugin = pluginItems["fields"] && pluginItems["fields"].mobileOnly === false;
|
|
8245
8405
|
const mobilePanelStyle = {};
|
|
8246
8406
|
if (mobilePanelHeight && leftSideBarVisible) {
|
|
8247
|
-
mobilePanelStyle["--
|
|
8407
|
+
mobilePanelStyle["--editor-mobile-panel-height"] = `${mobilePanelHeight}px`;
|
|
8248
8408
|
}
|
|
8249
|
-
return /* @__PURE__ */
|
|
8409
|
+
return /* @__PURE__ */ jsxs23(
|
|
8250
8410
|
"div",
|
|
8251
8411
|
{
|
|
8252
|
-
className: `Editor ${
|
|
8412
|
+
className: `Editor ${getClassName34({
|
|
8253
8413
|
hidePlugins: hasLegacySideBarPlugin
|
|
8254
8414
|
})}`,
|
|
8255
8415
|
id: instanceId,
|
|
8256
8416
|
"data-theme": theme,
|
|
8257
8417
|
style: { height },
|
|
8258
8418
|
children: [
|
|
8259
|
-
/* @__PURE__ */
|
|
8419
|
+
/* @__PURE__ */ jsx54(DragDropContext, { disableAutoScroll: dnd == null ? void 0 : dnd.disableAutoScroll, children: /* @__PURE__ */ jsx54(CustomEditor, { children: children || /* @__PURE__ */ jsx54(FrameProvider, { children: /* @__PURE__ */ jsx54(
|
|
8260
8420
|
"div",
|
|
8261
8421
|
{
|
|
8262
8422
|
className: getLayoutClassName({
|
|
@@ -8268,17 +8428,17 @@ var Layout = ({ children }) => {
|
|
|
8268
8428
|
mobilePanelCustomHeight: mobilePanelHeight !== null && leftSideBarVisible
|
|
8269
8429
|
}),
|
|
8270
8430
|
style: { height },
|
|
8271
|
-
children: /* @__PURE__ */
|
|
8431
|
+
children: /* @__PURE__ */ jsxs23(
|
|
8272
8432
|
"div",
|
|
8273
8433
|
{
|
|
8274
8434
|
className: getLayoutClassName("inner"),
|
|
8275
8435
|
style: __spreadValues(__spreadValues({}, layoutOptions), mobilePanelStyle),
|
|
8276
8436
|
children: [
|
|
8277
|
-
/* @__PURE__ */
|
|
8437
|
+
/* @__PURE__ */ jsx54("div", { className: getLayoutClassName("nav"), children: /* @__PURE__ */ jsx54(
|
|
8278
8438
|
Nav,
|
|
8279
8439
|
{
|
|
8280
8440
|
items: pluginItems,
|
|
8281
|
-
footer: /* @__PURE__ */
|
|
8441
|
+
footer: /* @__PURE__ */ jsx54(
|
|
8282
8442
|
IconButton,
|
|
8283
8443
|
{
|
|
8284
8444
|
type: "button",
|
|
@@ -8289,19 +8449,19 @@ var Layout = ({ children }) => {
|
|
|
8289
8449
|
)
|
|
8290
8450
|
}
|
|
8291
8451
|
) }),
|
|
8292
|
-
/* @__PURE__ */
|
|
8452
|
+
/* @__PURE__ */ jsxs23(
|
|
8293
8453
|
"div",
|
|
8294
8454
|
{
|
|
8295
8455
|
ref: mobilePanelRef,
|
|
8296
8456
|
className: getLayoutClassName("mobilePanel"),
|
|
8297
8457
|
children: [
|
|
8298
|
-
/* @__PURE__ */
|
|
8458
|
+
/* @__PURE__ */ jsx54(
|
|
8299
8459
|
"div",
|
|
8300
8460
|
{
|
|
8301
8461
|
className: getLayoutClassName("mobileDragHandle"),
|
|
8302
8462
|
onTouchStart: (e) => handleMobileDragStart(e.touches[0].clientY),
|
|
8303
8463
|
onMouseDown: (e) => handleMobileDragStart(e.clientY),
|
|
8304
|
-
children: /* @__PURE__ */
|
|
8464
|
+
children: /* @__PURE__ */ jsx54(
|
|
8305
8465
|
"div",
|
|
8306
8466
|
{
|
|
8307
8467
|
className: getLayoutClassName("mobileDragHandlePill")
|
|
@@ -8309,17 +8469,17 @@ var Layout = ({ children }) => {
|
|
|
8309
8469
|
)
|
|
8310
8470
|
}
|
|
8311
8471
|
),
|
|
8312
|
-
/* @__PURE__ */
|
|
8472
|
+
/* @__PURE__ */ jsx54(
|
|
8313
8473
|
"div",
|
|
8314
8474
|
{
|
|
8315
8475
|
className: getLayoutClassName("mobilePanelContent"),
|
|
8316
8476
|
children: Object.entries(pluginItems).map(
|
|
8317
|
-
([id, { mobileOnly, render: Render2 }]) => /* @__PURE__ */
|
|
8477
|
+
([id, { mobileOnly, render: Render2 }]) => /* @__PURE__ */ jsx54(
|
|
8318
8478
|
PluginTab,
|
|
8319
8479
|
{
|
|
8320
8480
|
visible: currentPlugin === id,
|
|
8321
8481
|
mobileOnly,
|
|
8322
|
-
children: /* @__PURE__ */
|
|
8482
|
+
children: /* @__PURE__ */ jsx54(Render2, {})
|
|
8323
8483
|
},
|
|
8324
8484
|
id
|
|
8325
8485
|
)
|
|
@@ -8329,7 +8489,7 @@ var Layout = ({ children }) => {
|
|
|
8329
8489
|
]
|
|
8330
8490
|
}
|
|
8331
8491
|
),
|
|
8332
|
-
/* @__PURE__ */
|
|
8492
|
+
/* @__PURE__ */ jsx54(
|
|
8333
8493
|
Sidebar,
|
|
8334
8494
|
{
|
|
8335
8495
|
position: "left",
|
|
@@ -8338,20 +8498,20 @@ var Layout = ({ children }) => {
|
|
|
8338
8498
|
onResize: setLeftWidth,
|
|
8339
8499
|
onResizeEnd: handleLeftSidebarResizeEnd,
|
|
8340
8500
|
children: Object.entries(pluginItems).map(
|
|
8341
|
-
([id, { mobileOnly, render: Render2, label }]) => /* @__PURE__ */
|
|
8501
|
+
([id, { mobileOnly, render: Render2, label }]) => /* @__PURE__ */ jsx54(
|
|
8342
8502
|
PluginTab,
|
|
8343
8503
|
{
|
|
8344
8504
|
visible: currentPlugin === id,
|
|
8345
8505
|
mobileOnly,
|
|
8346
|
-
children: /* @__PURE__ */
|
|
8506
|
+
children: /* @__PURE__ */ jsx54(Render2, {})
|
|
8347
8507
|
},
|
|
8348
8508
|
id
|
|
8349
8509
|
)
|
|
8350
8510
|
)
|
|
8351
8511
|
}
|
|
8352
8512
|
),
|
|
8353
|
-
/* @__PURE__ */
|
|
8354
|
-
!hasDesktopFieldsPlugin && /* @__PURE__ */
|
|
8513
|
+
/* @__PURE__ */ jsx54(Canvas, {}),
|
|
8514
|
+
!hasDesktopFieldsPlugin && /* @__PURE__ */ jsx54(
|
|
8355
8515
|
Sidebar,
|
|
8356
8516
|
{
|
|
8357
8517
|
position: "right",
|
|
@@ -8359,7 +8519,7 @@ var Layout = ({ children }) => {
|
|
|
8359
8519
|
isVisible: rightSideBarVisible,
|
|
8360
8520
|
onResize: setRightWidth,
|
|
8361
8521
|
onResizeEnd: handleRightSidebarResizeEnd,
|
|
8362
|
-
children: /* @__PURE__ */
|
|
8522
|
+
children: /* @__PURE__ */ jsx54(FieldSideBar, {})
|
|
8363
8523
|
}
|
|
8364
8524
|
)
|
|
8365
8525
|
]
|
|
@@ -8367,17 +8527,17 @@ var Layout = ({ children }) => {
|
|
|
8367
8527
|
)
|
|
8368
8528
|
}
|
|
8369
8529
|
) }) }) }),
|
|
8370
|
-
/* @__PURE__ */
|
|
8530
|
+
/* @__PURE__ */ jsx54("div", { id: "editor-portal-root", className: getClassName34("portal") })
|
|
8371
8531
|
]
|
|
8372
8532
|
}
|
|
8373
8533
|
);
|
|
8374
8534
|
};
|
|
8375
8535
|
|
|
8376
8536
|
// components/Editor/index.tsx
|
|
8377
|
-
import { jsx as
|
|
8537
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
8378
8538
|
var propsContext = createContext8({});
|
|
8379
8539
|
function PropsProvider(props) {
|
|
8380
|
-
return /* @__PURE__ */
|
|
8540
|
+
return /* @__PURE__ */ jsx55(propsContext.Provider, { value: props, children: props.children });
|
|
8381
8541
|
}
|
|
8382
8542
|
var usePropsContext = () => useContext15(propsContext);
|
|
8383
8543
|
function EditorProvider({ children }) {
|
|
@@ -8405,7 +8565,7 @@ function EditorProvider({ children }) {
|
|
|
8405
8565
|
}, _iframe),
|
|
8406
8566
|
[_iframe]
|
|
8407
8567
|
);
|
|
8408
|
-
const [generatedAppState] =
|
|
8568
|
+
const [generatedAppState] = useState24(() => {
|
|
8409
8569
|
var _a, _b, _c, _d, _e, _f;
|
|
8410
8570
|
const initial = __spreadValues(__spreadValues({}, defaultAppState.ui), initialUi);
|
|
8411
8571
|
let clientUiState = {};
|
|
@@ -8457,7 +8617,7 @@ function EditorProvider({ children }) {
|
|
|
8457
8617
|
return walkAppState(newAppState, config);
|
|
8458
8618
|
});
|
|
8459
8619
|
const { appendData = true } = _initialHistory || {};
|
|
8460
|
-
const [blendedHistories] =
|
|
8620
|
+
const [blendedHistories] = useState24(
|
|
8461
8621
|
[
|
|
8462
8622
|
...(_initialHistory == null ? void 0 : _initialHistory.histories) || [],
|
|
8463
8623
|
...appendData ? [{ state: generatedAppState }] : []
|
|
@@ -8523,7 +8683,7 @@ function EditorProvider({ children }) {
|
|
|
8523
8683
|
loadedFieldTransforms
|
|
8524
8684
|
]
|
|
8525
8685
|
);
|
|
8526
|
-
const [appStore] =
|
|
8686
|
+
const [appStore] = useState24(
|
|
8527
8687
|
() => createAppStore(generateAppStore(initialAppState))
|
|
8528
8688
|
);
|
|
8529
8689
|
useEffect26(() => {
|
|
@@ -8540,7 +8700,7 @@ function EditorProvider({ children }) {
|
|
|
8540
8700
|
index: initialHistoryIndex,
|
|
8541
8701
|
initialAppState
|
|
8542
8702
|
});
|
|
8543
|
-
const previousData =
|
|
8703
|
+
const previousData = useRef18(null);
|
|
8544
8704
|
useEffect26(() => {
|
|
8545
8705
|
return appStore.subscribe(
|
|
8546
8706
|
(s) => s.state.data,
|
|
@@ -8561,10 +8721,10 @@ function EditorProvider({ children }) {
|
|
|
8561
8721
|
resolveAndCommitData();
|
|
8562
8722
|
}, 0);
|
|
8563
8723
|
}, []);
|
|
8564
|
-
return /* @__PURE__ */
|
|
8724
|
+
return /* @__PURE__ */ jsx55(appStoreContext.Provider, { value: appStore, children: /* @__PURE__ */ jsx55(UseEditorStoreContext.Provider, { value: uEditorStore, children }) });
|
|
8565
8725
|
}
|
|
8566
8726
|
function Editor3(props) {
|
|
8567
|
-
return /* @__PURE__ */
|
|
8727
|
+
return /* @__PURE__ */ jsx55(PropsProvider, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx55(EditorProvider, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx55(Layout, { children: props.children }) })) }));
|
|
8568
8728
|
}
|
|
8569
8729
|
Editor3.Components = Components;
|
|
8570
8730
|
Editor3.Fields = Fields;
|
|
@@ -8597,12 +8757,12 @@ function pageMetadata(data) {
|
|
|
8597
8757
|
|
|
8598
8758
|
// plugins/legacy-side-bar/index.tsx
|
|
8599
8759
|
init_react_import();
|
|
8600
|
-
import { jsx as
|
|
8760
|
+
import { jsx as jsx56, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
8601
8761
|
var legacySideBarPlugin = () => ({
|
|
8602
8762
|
name: "legacy-side-bar",
|
|
8603
|
-
render: () => /* @__PURE__ */
|
|
8604
|
-
/* @__PURE__ */
|
|
8605
|
-
/* @__PURE__ */
|
|
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, {}) })
|
|
8606
8766
|
] })
|
|
8607
8767
|
});
|
|
8608
8768
|
|