@reacteditor/core 0.0.12 → 0.0.14
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-GK6JTUPD.mjs → Editor-J7XDD77B.mjs} +7 -7
- package/dist/{actions-C0LX6bI4.d.mts → actions-BxLinRKD.d.mts} +22 -2
- package/dist/{actions-C0LX6bI4.d.ts → actions-BxLinRKD.d.ts} +22 -2
- package/dist/{chunk-II42EKFK.mjs → chunk-4L7H4JV4.mjs} +1 -1
- package/dist/{chunk-YBG2RYVF.mjs → chunk-5QKQ3LQJ.mjs} +3 -3
- package/dist/{chunk-ERNSJXVF.mjs → chunk-FTVOCMGV.mjs} +1 -1
- package/dist/{chunk-OKTANBAI.mjs → chunk-IFFNAAXW.mjs} +75 -30
- package/dist/{chunk-56I7ST5F.mjs → chunk-JHURG5NN.mjs} +1 -1
- package/dist/{chunk-TGVAC3JP.mjs → chunk-Q667J2EG.mjs} +7 -7
- package/dist/{chunk-XLVEWZWT.mjs → chunk-RGC274VM.mjs} +1 -1
- package/dist/{chunk-X4EUZIHA.mjs → chunk-RQZQMS6E.mjs} +1 -1
- package/dist/{chunk-MJJPWASL.mjs → chunk-TG2KTWSB.mjs} +1 -1
- package/dist/{full-IUPXFMQP.mjs → full-T5SGODJ2.mjs} +6 -6
- package/dist/{index-DMbFEg8G.d.mts → index-BZRpxcwy.d.mts} +1 -1
- package/dist/{index-DmThy7vE.d.ts → index-B_21fGrq.d.ts} +1 -1
- package/dist/index.css +35 -28
- package/dist/index.d.mts +13 -7
- package/dist/index.d.ts +13 -7
- package/dist/index.js +69 -24
- package/dist/index.mjs +9 -9
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/{loaded-YFYCF5F4.mjs → loaded-6YKSFCCD.mjs} +3 -3
- package/dist/{loaded-HVOKDVC3.mjs → loaded-DUBT6SP5.mjs} +3 -3
- package/dist/{loaded-BT7NIVEO.mjs → loaded-ZQCRSG65.mjs} +3 -3
- package/dist/no-external.css +35 -28
- package/dist/no-external.d.mts +3 -3
- package/dist/no-external.d.ts +3 -3
- package/dist/no-external.js +69 -24
- package/dist/no-external.mjs +9 -9
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +1 -1
- package/dist/rsc.mjs +2 -2
- package/dist/{walk-tree-5oDs6qOL.d.mts → walk-tree-BvYigWFL.d.mts} +1 -1
- package/dist/{walk-tree-B1q6t5Jp.d.ts → walk-tree-Clklc1Ql.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -4,18 +4,18 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
EditorInner,
|
|
6
6
|
LoadedRichTextMenu
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-5QKQ3LQJ.mjs";
|
|
8
|
+
import "./chunk-Q667J2EG.mjs";
|
|
9
|
+
import "./chunk-RQZQMS6E.mjs";
|
|
10
10
|
import "./chunk-6QJ2HF4O.mjs";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-RGC274VM.mjs";
|
|
12
|
+
import "./chunk-TG2KTWSB.mjs";
|
|
13
13
|
import {
|
|
14
14
|
useAppStore,
|
|
15
15
|
useAppStoreApi
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-JHURG5NN.mjs";
|
|
17
17
|
import "./chunk-M4JDRFYB.mjs";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-FTVOCMGV.mjs";
|
|
19
19
|
import "./chunk-Y2EFNT5P.mjs";
|
|
20
20
|
import "./chunk-JIXMPJZA.mjs";
|
|
21
21
|
import {
|
|
@@ -559,12 +559,32 @@ type ArrayState = {
|
|
|
559
559
|
items: ItemWithId[];
|
|
560
560
|
openId: string;
|
|
561
561
|
};
|
|
562
|
+
/**
|
|
563
|
+
* Static UI chrome flags. Mount-once: read when <Editor>/<App> mounts and
|
|
564
|
+
* never re-evaluated. They decide whether a chrome element exists at all.
|
|
565
|
+
* Distinct from runtime `*Visible` keys in `UiState`, which the user toggles
|
|
566
|
+
* via the UI (sidebars, fullscreen). All default to `true`. If all three
|
|
567
|
+
* BrowserBar flags (`showUrlBar`, `showDeviceToggle`, `showFullScreenToggle`)
|
|
568
|
+
* are `false`, the browser bar collapses entirely.
|
|
569
|
+
*/
|
|
570
|
+
type EditorChromeConfig = {
|
|
571
|
+
showNavBar: boolean;
|
|
572
|
+
showThemeToggle: boolean;
|
|
573
|
+
showHistoryControls: boolean;
|
|
574
|
+
showUrlBar: boolean;
|
|
575
|
+
showDeviceToggle: boolean;
|
|
576
|
+
showFullScreenToggle: boolean;
|
|
577
|
+
};
|
|
562
578
|
type UiState = {
|
|
563
579
|
leftSideBarVisible: boolean;
|
|
564
580
|
rightSideBarVisible: boolean;
|
|
565
|
-
navBarVisible: boolean;
|
|
566
581
|
leftSideBarWidth?: number | null;
|
|
567
582
|
rightSideBarWidth?: number | null;
|
|
583
|
+
/** Runtime: when true, the canvas overlays the entire editor area
|
|
584
|
+
* (sidebars stay mounted underneath). Toggled by the BrowserBar fullscreen
|
|
585
|
+
* button. Distinct from the static `fullScreenCanvas` Editor prop, which
|
|
586
|
+
* removes canvas padding for a chromeless render. */
|
|
587
|
+
canvasFullScreen?: boolean;
|
|
568
588
|
mobilePanelExpanded?: boolean;
|
|
569
589
|
itemSelector: ItemSelector | null;
|
|
570
590
|
arrayState: Record<string, ArrayState | undefined>;
|
|
@@ -857,4 +877,4 @@ type EditorAction = {
|
|
|
857
877
|
recordHistory?: boolean;
|
|
858
878
|
} & (ReorderAction | InsertAction | MoveAction | ReplaceAction | ReplaceRootAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
|
|
859
879
|
|
|
860
|
-
export { type
|
|
880
|
+
export { type DragAxis as $, type AppState as A, type BaseData as B, type Config as C, type Data as D, type EditorAction as E, type Fields as F, type ColorField as G, type History as H, type IframeConfig as I, type ComponentConfigExtensions as J, type ComponentConfigParams as K, type ComponentDataMap as L, type Metadata as M, type ComponentDataOptionalId as N, type OnAction as O, type PrivateAppState as P, type ComponentMetadata as Q, type RootDataWithProps as R, type ConfigParams as S, type CustomField as T, type UserGenerics as U, type Viewports as V, type WithId as W, type CustomFieldRender as X, type DefaultRootProps as Y, type DefaultRootRenderProps as Z, type Direction as _, type Permissions as a, type EditorComponent as a0, type EditorContext as a1, type EditorMetadata as a2, type ExternalField as a3, type ExternalFieldWithAdaptor as a4, type ExtractConfigParams as a5, type ExtractField as a6, type FieldMetadata as a7, type FieldRenderFunctions as a8, type FieldTransformFn as a9, type FieldTransformFnParams as aa, type ItemWithId as ab, type MappedItem as ac, type NumberField as ad, type ObjectField as ae, type OverrideKey as af, type RadioField as ag, type RichText as ah, type RootConfig as ai, type RootDataWithoutProps as aj, type SelectField as ak, type Slot as al, type SlotComponent as am, type SlotField as an, type TextField as ao, type TextareaField as ap, type Viewport as aq, type WithChildren as ar, type WithEditorProps as as, type WithSlotProps as at, overrideKeys as au, type ComponentData as b, type ResolveDataTrigger as c, type Plugin as d, type Overrides as e, type UiState as f, type ComponentConfig as g, type FieldTransforms as h, type RichtextField as i, type Content as j, type DefaultComponents as k, type DefaultComponentProps as l, type DefaultRootFieldProps as m, type RootData as n, type Field as o, type FieldProps as p, type EditorChromeConfig as q, type InitialHistory as r, type ItemSelector as s, type PluginInternal as t, type Adaptor as u, type ArrayField as v, type ArrayState as w, type AsFieldProps as x, type BaseField as y, type CacheOpts as z };
|
|
@@ -559,12 +559,32 @@ type ArrayState = {
|
|
|
559
559
|
items: ItemWithId[];
|
|
560
560
|
openId: string;
|
|
561
561
|
};
|
|
562
|
+
/**
|
|
563
|
+
* Static UI chrome flags. Mount-once: read when <Editor>/<App> mounts and
|
|
564
|
+
* never re-evaluated. They decide whether a chrome element exists at all.
|
|
565
|
+
* Distinct from runtime `*Visible` keys in `UiState`, which the user toggles
|
|
566
|
+
* via the UI (sidebars, fullscreen). All default to `true`. If all three
|
|
567
|
+
* BrowserBar flags (`showUrlBar`, `showDeviceToggle`, `showFullScreenToggle`)
|
|
568
|
+
* are `false`, the browser bar collapses entirely.
|
|
569
|
+
*/
|
|
570
|
+
type EditorChromeConfig = {
|
|
571
|
+
showNavBar: boolean;
|
|
572
|
+
showThemeToggle: boolean;
|
|
573
|
+
showHistoryControls: boolean;
|
|
574
|
+
showUrlBar: boolean;
|
|
575
|
+
showDeviceToggle: boolean;
|
|
576
|
+
showFullScreenToggle: boolean;
|
|
577
|
+
};
|
|
562
578
|
type UiState = {
|
|
563
579
|
leftSideBarVisible: boolean;
|
|
564
580
|
rightSideBarVisible: boolean;
|
|
565
|
-
navBarVisible: boolean;
|
|
566
581
|
leftSideBarWidth?: number | null;
|
|
567
582
|
rightSideBarWidth?: number | null;
|
|
583
|
+
/** Runtime: when true, the canvas overlays the entire editor area
|
|
584
|
+
* (sidebars stay mounted underneath). Toggled by the BrowserBar fullscreen
|
|
585
|
+
* button. Distinct from the static `fullScreenCanvas` Editor prop, which
|
|
586
|
+
* removes canvas padding for a chromeless render. */
|
|
587
|
+
canvasFullScreen?: boolean;
|
|
568
588
|
mobilePanelExpanded?: boolean;
|
|
569
589
|
itemSelector: ItemSelector | null;
|
|
570
590
|
arrayState: Record<string, ArrayState | undefined>;
|
|
@@ -857,4 +877,4 @@ type EditorAction = {
|
|
|
857
877
|
recordHistory?: boolean;
|
|
858
878
|
} & (ReorderAction | InsertAction | MoveAction | ReplaceAction | ReplaceRootAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
|
|
859
879
|
|
|
860
|
-
export { type
|
|
880
|
+
export { type DragAxis as $, type AppState as A, type BaseData as B, type Config as C, type Data as D, type EditorAction as E, type Fields as F, type ColorField as G, type History as H, type IframeConfig as I, type ComponentConfigExtensions as J, type ComponentConfigParams as K, type ComponentDataMap as L, type Metadata as M, type ComponentDataOptionalId as N, type OnAction as O, type PrivateAppState as P, type ComponentMetadata as Q, type RootDataWithProps as R, type ConfigParams as S, type CustomField as T, type UserGenerics as U, type Viewports as V, type WithId as W, type CustomFieldRender as X, type DefaultRootProps as Y, type DefaultRootRenderProps as Z, type Direction as _, type Permissions as a, type EditorComponent as a0, type EditorContext as a1, type EditorMetadata as a2, type ExternalField as a3, type ExternalFieldWithAdaptor as a4, type ExtractConfigParams as a5, type ExtractField as a6, type FieldMetadata as a7, type FieldRenderFunctions as a8, type FieldTransformFn as a9, type FieldTransformFnParams as aa, type ItemWithId as ab, type MappedItem as ac, type NumberField as ad, type ObjectField as ae, type OverrideKey as af, type RadioField as ag, type RichText as ah, type RootConfig as ai, type RootDataWithoutProps as aj, type SelectField as ak, type Slot as al, type SlotComponent as am, type SlotField as an, type TextField as ao, type TextareaField as ap, type Viewport as aq, type WithChildren as ar, type WithEditorProps as as, type WithSlotProps as at, overrideKeys as au, type ComponentData as b, type ResolveDataTrigger as c, type Plugin as d, type Overrides as e, type UiState as f, type ComponentConfig as g, type FieldTransforms as h, type RichtextField as i, type Content as j, type DefaultComponents as k, type DefaultComponentProps as l, type DefaultRootFieldProps as m, type RootData as n, type Field as o, type FieldProps as p, type EditorChromeConfig as q, type InitialHistory as r, type ItemSelector as s, type PluginInternal as t, type Adaptor as u, type ArrayField as v, type ArrayState as w, type AsFieldProps as x, type BaseField as y, type CacheOpts as z };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LoadedRichTextMenuInner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Q667J2EG.mjs";
|
|
4
4
|
import {
|
|
5
5
|
styles_module_default
|
|
6
6
|
} from "./chunk-6QJ2HF4O.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useAppStore,
|
|
9
9
|
useAppStoreApi
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JHURG5NN.mjs";
|
|
11
11
|
import {
|
|
12
12
|
get_class_name_factory_default
|
|
13
13
|
} from "./chunk-Y2EFNT5P.mjs";
|
|
@@ -100,7 +100,7 @@ init_react_import();
|
|
|
100
100
|
import { lazy, Suspense } from "react";
|
|
101
101
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
102
102
|
var LoadedRichTextMenuFull = lazy(
|
|
103
|
-
() => import("./full-
|
|
103
|
+
() => import("./full-T5SGODJ2.mjs").then((m) => ({
|
|
104
104
|
default: m.LoadedRichTextMenuFull
|
|
105
105
|
}))
|
|
106
106
|
);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EditorInner,
|
|
3
3
|
LoadedRichTextMenu
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5QKQ3LQJ.mjs";
|
|
5
5
|
import {
|
|
6
6
|
ActionBar,
|
|
7
7
|
IconButton,
|
|
8
8
|
LoadedRichTextMenuInner,
|
|
9
9
|
Loader
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Q667J2EG.mjs";
|
|
11
11
|
import {
|
|
12
12
|
RichTextRenderFallback,
|
|
13
13
|
SlotRender,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
getSlotTransform,
|
|
17
17
|
useRichtextProps,
|
|
18
18
|
useSlots
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-4L7H4JV4.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-JHURG5NN.mjs";
|
|
64
64
|
import {
|
|
65
65
|
getItem,
|
|
66
66
|
insert,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
import {
|
|
72
72
|
defaultAppState,
|
|
73
73
|
defaultViewports
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-FTVOCMGV.mjs";
|
|
75
75
|
import {
|
|
76
76
|
get_class_name_factory_default
|
|
77
77
|
} from "./chunk-Y2EFNT5P.mjs";
|
|
@@ -2146,7 +2146,7 @@ EditorFallback.displayName = "EditorFallback";
|
|
|
2146
2146
|
// components/AutoField/fields/RichtextField/index.tsx
|
|
2147
2147
|
import { Fragment as Fragment3, jsx as jsx20 } from "react/jsx-runtime";
|
|
2148
2148
|
var Editor = lazy(
|
|
2149
|
-
() => import("./Editor-
|
|
2149
|
+
() => import("./Editor-J7XDD77B.mjs").then((m) => ({
|
|
2150
2150
|
default: m.Editor
|
|
2151
2151
|
}))
|
|
2152
2152
|
);
|
|
@@ -4698,7 +4698,7 @@ import {
|
|
|
4698
4698
|
} from "react";
|
|
4699
4699
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
4700
4700
|
var Editor2 = lazy2(
|
|
4701
|
-
() => import("./Editor-
|
|
4701
|
+
() => import("./Editor-J7XDD77B.mjs").then((m) => ({
|
|
4702
4702
|
default: m.Editor
|
|
4703
4703
|
}))
|
|
4704
4704
|
);
|
|
@@ -7619,7 +7619,7 @@ function ComboboxEmpty(_a) {
|
|
|
7619
7619
|
|
|
7620
7620
|
// css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/BrowserBar/styles.module.css#css-module
|
|
7621
7621
|
init_react_import();
|
|
7622
|
-
var styles_module_default25 = { "BrowserBar": "
|
|
7622
|
+
var styles_module_default25 = { "BrowserBar": "_BrowserBar_coofe_1", "BrowserBar-urlTrigger": "_BrowserBar-urlTrigger_coofe_16", "BrowserBar-urlIcon": "_BrowserBar-urlIcon_coofe_46", "BrowserBar-urlText": "_BrowserBar-urlText_coofe_51", "BrowserBar-urlInput": "_BrowserBar-urlInput_coofe_63", "BrowserBar-itemPath": "_BrowserBar-itemPath_coofe_69", "BrowserBar-itemTitle": "_BrowserBar-itemTitle_coofe_74", "BrowserBar-actions": "_BrowserBar-actions_coofe_82", "BrowserBar-deviceIcon": "_BrowserBar-deviceIcon_coofe_92" };
|
|
7623
7623
|
|
|
7624
7624
|
// components/BrowserBar/index.tsx
|
|
7625
7625
|
import { jsx as jsx48, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
@@ -7637,21 +7637,19 @@ var BrowserBar = ({
|
|
|
7637
7637
|
onViewportChange
|
|
7638
7638
|
}) => {
|
|
7639
7639
|
const { routes, currentRoute, onRouteChange } = usePropsContext();
|
|
7640
|
+
const chrome = useChromeConfig();
|
|
7640
7641
|
const viewports = useAppStore((s) => s.state.ui.viewports);
|
|
7641
7642
|
const dispatch = useAppStore((s) => s.dispatch);
|
|
7642
|
-
const
|
|
7643
|
-
|
|
7644
|
-
|
|
7643
|
+
const isFullScreen = useAppStore(
|
|
7644
|
+
(s) => {
|
|
7645
|
+
var _a;
|
|
7646
|
+
return (_a = s.state.ui.canvasFullScreen) != null ? _a : false;
|
|
7647
|
+
}
|
|
7645
7648
|
);
|
|
7646
|
-
const isFullScreen = !leftSideBarVisible && !rightSideBarVisible;
|
|
7647
7649
|
const toggleFullScreen = () => {
|
|
7648
|
-
const next = !isFullScreen;
|
|
7649
7650
|
dispatch({
|
|
7650
7651
|
type: "setUi",
|
|
7651
|
-
ui: {
|
|
7652
|
-
leftSideBarVisible: !next,
|
|
7653
|
-
rightSideBarVisible: !next
|
|
7654
|
-
}
|
|
7652
|
+
ui: { canvasFullScreen: !isFullScreen }
|
|
7655
7653
|
});
|
|
7656
7654
|
};
|
|
7657
7655
|
const activeDevice = useMemo20(() => {
|
|
@@ -7674,8 +7672,11 @@ var BrowserBar = ({
|
|
|
7674
7672
|
if (!next || next === currentRoute) return;
|
|
7675
7673
|
void (onRouteChange == null ? void 0 : onRouteChange(next));
|
|
7676
7674
|
};
|
|
7675
|
+
if (!chrome.showUrlBar && !chrome.showDeviceToggle && !chrome.showFullScreenToggle) {
|
|
7676
|
+
return null;
|
|
7677
|
+
}
|
|
7677
7678
|
return /* @__PURE__ */ jsxs20("div", { className: getClassName29(), children: [
|
|
7678
|
-
showRoutePicker ? /* @__PURE__ */ jsxs20(
|
|
7679
|
+
chrome.showUrlBar && (showRoutePicker ? /* @__PURE__ */ jsxs20(
|
|
7679
7680
|
Combobox,
|
|
7680
7681
|
{
|
|
7681
7682
|
items: routes,
|
|
@@ -7719,9 +7720,9 @@ var BrowserBar = ({
|
|
|
7719
7720
|
) : /* @__PURE__ */ jsxs20("div", { className: getClassName29("urlTrigger"), children: [
|
|
7720
7721
|
/* @__PURE__ */ jsx48(Globe, { className: getClassName29("urlIcon"), size: 14 }),
|
|
7721
7722
|
/* @__PURE__ */ jsx48("span", { className: getClassName29("urlText"), children: "/" })
|
|
7722
|
-
] }),
|
|
7723
|
-
/* @__PURE__ */ jsxs20("div", { className: getClassName29("actions"), children: [
|
|
7724
|
-
/* @__PURE__ */ jsx48(
|
|
7723
|
+
] })),
|
|
7724
|
+
(chrome.showDeviceToggle || chrome.showFullScreenToggle) && /* @__PURE__ */ jsxs20("div", { className: getClassName29("actions"), children: [
|
|
7725
|
+
chrome.showDeviceToggle && /* @__PURE__ */ jsx48(
|
|
7725
7726
|
IconButton,
|
|
7726
7727
|
{
|
|
7727
7728
|
type: "button",
|
|
@@ -7730,7 +7731,7 @@ var BrowserBar = ({
|
|
|
7730
7731
|
children: /* @__PURE__ */ jsx48("span", { className: getClassName29("deviceIcon"), children: activeDevice === "desktop" ? /* @__PURE__ */ jsx48(Monitor, { size: 16 }) : /* @__PURE__ */ jsx48(Smartphone, { size: 16 }) })
|
|
7731
7732
|
}
|
|
7732
7733
|
),
|
|
7733
|
-
/* @__PURE__ */ jsx48(
|
|
7734
|
+
chrome.showFullScreenToggle && /* @__PURE__ */ jsx48(
|
|
7734
7735
|
IconButton,
|
|
7735
7736
|
{
|
|
7736
7737
|
type: "button",
|
|
@@ -7745,7 +7746,7 @@ var BrowserBar = ({
|
|
|
7745
7746
|
|
|
7746
7747
|
// css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Canvas/styles.module.css#css-module
|
|
7747
7748
|
init_react_import();
|
|
7748
|
-
var styles_module_default26 = { "EditorCanvas": "
|
|
7749
|
+
var styles_module_default26 = { "EditorCanvas": "_EditorCanvas_1aq14_1", "EditorCanvas-controls": "_EditorCanvas-controls_1aq14_17", "EditorCanvas--fullScreen": "_EditorCanvas--fullScreen_1aq14_22", "EditorCanvas--canvasFullScreen": "_EditorCanvas--canvasFullScreen_1aq14_42", "EditorCanvas-inner": "_EditorCanvas-inner_1aq14_49", "EditorCanvas-rootColumn": "_EditorCanvas-rootColumn_1aq14_62", "EditorCanvas-root": "_EditorCanvas-root_1aq14_62", "EditorCanvas--ready": "_EditorCanvas--ready_1aq14_99", "EditorCanvas-loader": "_EditorCanvas-loader_1aq14_104", "EditorCanvas--showLoader": "_EditorCanvas--showLoader_1aq14_116", "EditorCanvas-browserBar": "_EditorCanvas-browserBar_1aq14_125", "EditorCanvas-zoomControls": "_EditorCanvas-zoomControls_1aq14_130" };
|
|
7749
7750
|
|
|
7750
7751
|
// components/Editor/components/Canvas/index.tsx
|
|
7751
7752
|
import { useShallow as useShallow9 } from "zustand/react/shallow";
|
|
@@ -7817,6 +7818,12 @@ var Canvas = () => {
|
|
|
7817
7818
|
}))
|
|
7818
7819
|
);
|
|
7819
7820
|
const viewports = useAppStore((s) => s.state.ui.viewports);
|
|
7821
|
+
const canvasFullScreen = useAppStore(
|
|
7822
|
+
(s) => {
|
|
7823
|
+
var _a2;
|
|
7824
|
+
return (_a2 = s.state.ui.canvasFullScreen) != null ? _a2 : false;
|
|
7825
|
+
}
|
|
7826
|
+
);
|
|
7820
7827
|
const [canvasZoom, setCanvasZoom] = useState21(1);
|
|
7821
7828
|
const zoomIn = () => setCanvasZoom((z) => Math.min(z + ZOOM_STEP, MAX_ZOOM));
|
|
7822
7829
|
const zoomOut = () => setCanvasZoom((z) => Math.max(z - ZOOM_STEP, MIN_ZOOM));
|
|
@@ -7952,7 +7959,8 @@ var Canvas = () => {
|
|
|
7952
7959
|
className: getClassName30({
|
|
7953
7960
|
ready: status === "READY" || !iframe.enabled || !iframe.waitForStyles,
|
|
7954
7961
|
showLoader,
|
|
7955
|
-
fullScreen: fullScreenCanvas
|
|
7962
|
+
fullScreen: fullScreenCanvas,
|
|
7963
|
+
canvasFullScreen
|
|
7956
7964
|
}),
|
|
7957
7965
|
onClick: (e) => {
|
|
7958
7966
|
const el = e.target;
|
|
@@ -8425,6 +8433,7 @@ var getPluginTabClassName = get_class_name_factory_default("EditorPluginTab", st
|
|
|
8425
8433
|
var FieldSideBarToolbar = () => {
|
|
8426
8434
|
const appStore = useAppStoreApi();
|
|
8427
8435
|
const { onPublish, currentRoute } = usePropsContext();
|
|
8436
|
+
const chrome = useChromeConfig();
|
|
8428
8437
|
const back = useAppStore((s) => s.history.back);
|
|
8429
8438
|
const forward = useAppStore((s) => s.history.forward);
|
|
8430
8439
|
const hasFuture = useAppStore((s) => s.history.hasFuture());
|
|
@@ -8433,7 +8442,7 @@ var FieldSideBarToolbar = () => {
|
|
|
8433
8442
|
(s) => s.overrides.headerActions || DefaultOverride
|
|
8434
8443
|
);
|
|
8435
8444
|
return /* @__PURE__ */ jsxs24("div", { className: getClassName34("fieldSideBarToolbar"), children: [
|
|
8436
|
-
/* @__PURE__ */ jsxs24("div", { className: getClassName34("fieldSideBarHistory"), children: [
|
|
8445
|
+
chrome.showHistoryControls ? /* @__PURE__ */ jsxs24("div", { className: getClassName34("fieldSideBarHistory"), children: [
|
|
8437
8446
|
/* @__PURE__ */ jsx54(
|
|
8438
8447
|
IconButton,
|
|
8439
8448
|
{
|
|
@@ -8454,7 +8463,7 @@ var FieldSideBarToolbar = () => {
|
|
|
8454
8463
|
children: /* @__PURE__ */ jsx54(Redo2, { size: 18 })
|
|
8455
8464
|
}
|
|
8456
8465
|
)
|
|
8457
|
-
] }),
|
|
8466
|
+
] }) : /* @__PURE__ */ jsx54("div", {}),
|
|
8458
8467
|
/* @__PURE__ */ jsx54("div", { className: getClassName34("fieldSideBarActions"), children: /* @__PURE__ */ jsx54(CustomHeaderActions, { children: /* @__PURE__ */ jsx54(
|
|
8459
8468
|
Button,
|
|
8460
8469
|
{
|
|
@@ -8507,7 +8516,8 @@ var Layout = ({ children }) => {
|
|
|
8507
8516
|
const rightSideBarVisible = useAppStore(
|
|
8508
8517
|
(s) => s.state.ui.rightSideBarVisible
|
|
8509
8518
|
);
|
|
8510
|
-
const
|
|
8519
|
+
const chrome = useChromeConfig();
|
|
8520
|
+
const navBarVisible = chrome.showNavBar;
|
|
8511
8521
|
const instanceId = useAppStore((s) => s.instanceId);
|
|
8512
8522
|
const {
|
|
8513
8523
|
width: leftWidth,
|
|
@@ -8749,7 +8759,7 @@ var Layout = ({ children }) => {
|
|
|
8749
8759
|
Nav,
|
|
8750
8760
|
{
|
|
8751
8761
|
items: pluginItems,
|
|
8752
|
-
footer: /* @__PURE__ */ jsx54(
|
|
8762
|
+
footer: chrome.showThemeToggle ? /* @__PURE__ */ jsx54(
|
|
8753
8763
|
IconButton,
|
|
8754
8764
|
{
|
|
8755
8765
|
type: "button",
|
|
@@ -8757,7 +8767,7 @@ var Layout = ({ children }) => {
|
|
|
8757
8767
|
onClick: toggleTheme,
|
|
8758
8768
|
children: themeIcon
|
|
8759
8769
|
}
|
|
8760
|
-
)
|
|
8770
|
+
) : void 0
|
|
8761
8771
|
}
|
|
8762
8772
|
) }),
|
|
8763
8773
|
/* @__PURE__ */ jsxs24(
|
|
@@ -8846,11 +8856,45 @@ var Layout = ({ children }) => {
|
|
|
8846
8856
|
|
|
8847
8857
|
// components/Editor/index.tsx
|
|
8848
8858
|
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
8859
|
+
var CHROME_KEYS = [
|
|
8860
|
+
"showNavBar",
|
|
8861
|
+
"showThemeToggle",
|
|
8862
|
+
"showHistoryControls",
|
|
8863
|
+
"showUrlBar",
|
|
8864
|
+
"showDeviceToggle",
|
|
8865
|
+
"showFullScreenToggle"
|
|
8866
|
+
];
|
|
8867
|
+
var DEFAULT_CHROME = {
|
|
8868
|
+
showNavBar: true,
|
|
8869
|
+
showThemeToggle: true,
|
|
8870
|
+
showHistoryControls: true,
|
|
8871
|
+
showUrlBar: true,
|
|
8872
|
+
showDeviceToggle: true,
|
|
8873
|
+
showFullScreenToggle: true
|
|
8874
|
+
};
|
|
8875
|
+
var splitUiConfig = (ui) => {
|
|
8876
|
+
const runtime = {};
|
|
8877
|
+
const chrome = {};
|
|
8878
|
+
if (!ui) return { runtime, chrome };
|
|
8879
|
+
for (const [key, value] of Object.entries(ui)) {
|
|
8880
|
+
if (CHROME_KEYS.includes(key)) {
|
|
8881
|
+
chrome[key] = value;
|
|
8882
|
+
} else {
|
|
8883
|
+
runtime[key] = value;
|
|
8884
|
+
}
|
|
8885
|
+
}
|
|
8886
|
+
return { runtime, chrome };
|
|
8887
|
+
};
|
|
8849
8888
|
var propsContext = createContext8({});
|
|
8850
8889
|
function PropsProvider(props) {
|
|
8851
8890
|
return /* @__PURE__ */ jsx55(propsContext.Provider, { value: props, children: props.children });
|
|
8852
8891
|
}
|
|
8853
8892
|
var usePropsContext = () => useContext15(propsContext);
|
|
8893
|
+
var useChromeConfig = () => {
|
|
8894
|
+
const { ui } = usePropsContext();
|
|
8895
|
+
const { chrome } = splitUiConfig(ui);
|
|
8896
|
+
return __spreadValues(__spreadValues({}, DEFAULT_CHROME), chrome);
|
|
8897
|
+
};
|
|
8854
8898
|
function EditorProvider({ children }) {
|
|
8855
8899
|
const {
|
|
8856
8900
|
config,
|
|
@@ -8878,7 +8922,8 @@ function EditorProvider({ children }) {
|
|
|
8878
8922
|
);
|
|
8879
8923
|
const [generatedAppState] = useState24(() => {
|
|
8880
8924
|
var _a, _b, _c, _d, _e, _f;
|
|
8881
|
-
const
|
|
8925
|
+
const { runtime: initialUiRuntime } = splitUiConfig(initialUi);
|
|
8926
|
+
const initial = __spreadValues(__spreadValues({}, defaultAppState.ui), initialUiRuntime);
|
|
8882
8927
|
let clientUiState = {};
|
|
8883
8928
|
if (Object.keys((initialData == null ? void 0 : initialData.root) || {}).length > 0 && !((_a = initialData == null ? void 0 : initialData.root) == null ? void 0 : _a.props)) {
|
|
8884
8929
|
console.warn(
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useListOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RQZQMS6E.mjs";
|
|
4
4
|
import {
|
|
5
5
|
useAlignOptions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RGC274VM.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useHeadingOptions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TG2KTWSB.mjs";
|
|
10
10
|
import {
|
|
11
11
|
AlignCenter,
|
|
12
12
|
AlignJustify,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
Strikethrough,
|
|
27
27
|
Underline,
|
|
28
28
|
useControlContext
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-JHURG5NN.mjs";
|
|
30
30
|
import {
|
|
31
31
|
get_class_name_factory_default
|
|
32
32
|
} from "./chunk-Y2EFNT5P.mjs";
|
|
@@ -349,7 +349,7 @@ function AlignSelectFallback() {
|
|
|
349
349
|
// components/RichTextMenu/controls/AlignSelect/index.tsx
|
|
350
350
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
351
351
|
var AlignSelectLoaded = lazy(
|
|
352
|
-
() => import("./loaded-
|
|
352
|
+
() => import("./loaded-ZQCRSG65.mjs").then((m) => ({
|
|
353
353
|
default: m.AlignSelectLoaded
|
|
354
354
|
}))
|
|
355
355
|
);
|
|
@@ -580,7 +580,7 @@ function HeadingSelectFallback() {
|
|
|
580
580
|
// components/RichTextMenu/controls/HeadingSelect/index.tsx
|
|
581
581
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
582
582
|
var HeadingSelectLoaded = lazy2(
|
|
583
|
-
() => import("./loaded-
|
|
583
|
+
() => import("./loaded-6YKSFCCD.mjs").then((m) => ({
|
|
584
584
|
default: m.HeadingSelectLoaded
|
|
585
585
|
}))
|
|
586
586
|
);
|
|
@@ -612,7 +612,7 @@ function ListSelectFallback() {
|
|
|
612
612
|
// components/RichTextMenu/controls/ListSelect/index.tsx
|
|
613
613
|
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
614
614
|
var ListSelectLoaded = lazy3(
|
|
615
|
-
() => import("./loaded-
|
|
615
|
+
() => import("./loaded-DUBT6SP5.mjs").then((m) => ({
|
|
616
616
|
default: m.ListSelectLoaded
|
|
617
617
|
}))
|
|
618
618
|
);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LoadedRichTextMenuInner
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-Q667J2EG.mjs";
|
|
4
|
+
import "./chunk-RQZQMS6E.mjs";
|
|
5
|
+
import "./chunk-RGC274VM.mjs";
|
|
6
|
+
import "./chunk-TG2KTWSB.mjs";
|
|
7
|
+
import "./chunk-JHURG5NN.mjs";
|
|
8
8
|
import "./chunk-M4JDRFYB.mjs";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-FTVOCMGV.mjs";
|
|
10
10
|
import "./chunk-Y2EFNT5P.mjs";
|
|
11
11
|
import "./chunk-JIXMPJZA.mjs";
|
|
12
12
|
import {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as History, a as Permissions, b as ComponentData, C as Config, U as UserGenerics, F as Fields, E as EditorAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, e as Overrides, V as Viewports, I as IframeConfig, f as UiState, g as ComponentConfig, A as AppState, M as Metadata, h as FieldTransforms, i as RichtextField } from './actions-
|
|
1
|
+
import { H as History, a as Permissions, b as ComponentData, C as Config, U as UserGenerics, F as Fields, E as EditorAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, e as Overrides, V as Viewports, I as IframeConfig, f as UiState, g as ComponentConfig, A as AppState, M as Metadata, h as FieldTransforms, i as RichtextField } from './actions-BxLinRKD.mjs';
|
|
2
2
|
import { Editor } from '@tiptap/react';
|
|
3
3
|
|
|
4
4
|
type HistorySlice<D = any> = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as History, a as Permissions, b as ComponentData, C as Config, U as UserGenerics, F as Fields, E as EditorAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, e as Overrides, V as Viewports, I as IframeConfig, f as UiState, g as ComponentConfig, A as AppState, M as Metadata, h as FieldTransforms, i as RichtextField } from './actions-
|
|
1
|
+
import { H as History, a as Permissions, b as ComponentData, C as Config, U as UserGenerics, F as Fields, E as EditorAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, e as Overrides, V as Viewports, I as IframeConfig, f as UiState, g as ComponentConfig, A as AppState, M as Metadata, h as FieldTransforms, i as RichtextField } from './actions-BxLinRKD.js';
|
|
2
2
|
import { Editor } from '@tiptap/react';
|
|
3
3
|
|
|
4
4
|
type HistorySlice<D = any> = {
|