@reacteditor/core 0.0.11 → 0.0.13
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-3COFH5WN.mjs} +7 -7
- package/dist/{actions-C0LX6bI4.d.mts → actions-DDpLL_TR.d.mts} +17 -2
- package/dist/{actions-C0LX6bI4.d.ts → actions-DDpLL_TR.d.ts} +17 -2
- package/dist/{chunk-MJJPWASL.mjs → chunk-AD7BMXAA.mjs} +1 -1
- package/dist/{chunk-TGVAC3JP.mjs → chunk-BUR5T7IX.mjs} +7 -7
- package/dist/{chunk-YBG2RYVF.mjs → chunk-BZ4BQZJR.mjs} +3 -3
- package/dist/{chunk-X4EUZIHA.mjs → chunk-FT6UFK7G.mjs} +1 -1
- package/dist/{chunk-ERNSJXVF.mjs → chunk-IIRJMJFU.mjs} +0 -1
- package/dist/{chunk-74TOLW7F.mjs → chunk-KX5XDJF6.mjs} +61 -19
- package/dist/{chunk-56I7ST5F.mjs → chunk-LRFRIIKG.mjs} +1 -1
- package/dist/{chunk-XLVEWZWT.mjs → chunk-OIFPBVSF.mjs} +1 -1
- package/dist/{chunk-II42EKFK.mjs → chunk-PUDWMFBH.mjs} +1 -1
- package/dist/{full-IUPXFMQP.mjs → full-QT5KXRDP.mjs} +6 -6
- package/dist/{index-DMbFEg8G.d.mts → index-BTatdZaE.d.mts} +1 -1
- package/dist/{index-DmThy7vE.d.ts → index-zhUFD8aP.d.ts} +1 -1
- package/dist/index.css +44 -40
- package/dist/index.d.mts +13 -7
- package/dist/index.d.ts +13 -7
- package/dist/index.js +54 -13
- package/dist/index.mjs +9 -9
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/{loaded-BT7NIVEO.mjs → loaded-GLBLMTBL.mjs} +3 -3
- package/dist/{loaded-HVOKDVC3.mjs → loaded-O4QHGE26.mjs} +3 -3
- package/dist/{loaded-YFYCF5F4.mjs → loaded-R34BR6I5.mjs} +3 -3
- package/dist/no-external.css +44 -40
- package/dist/no-external.d.mts +3 -3
- package/dist/no-external.d.ts +3 -3
- package/dist/no-external.js +54 -13
- 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 +0 -1
- package/dist/rsc.mjs +2 -2
- package/dist/{walk-tree-B1q6t5Jp.d.ts → walk-tree-Cnyva5MB.d.ts} +1 -1
- package/dist/{walk-tree-5oDs6qOL.d.mts → walk-tree-Cxbt1UVr.d.mts} +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-BZ4BQZJR.mjs";
|
|
8
|
+
import "./chunk-BUR5T7IX.mjs";
|
|
9
|
+
import "./chunk-FT6UFK7G.mjs";
|
|
10
10
|
import "./chunk-6QJ2HF4O.mjs";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-OIFPBVSF.mjs";
|
|
12
|
+
import "./chunk-AD7BMXAA.mjs";
|
|
13
13
|
import {
|
|
14
14
|
useAppStore,
|
|
15
15
|
useAppStoreApi
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-LRFRIIKG.mjs";
|
|
17
17
|
import "./chunk-M4JDRFYB.mjs";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-IIRJMJFU.mjs";
|
|
19
19
|
import "./chunk-Y2EFNT5P.mjs";
|
|
20
20
|
import "./chunk-JIXMPJZA.mjs";
|
|
21
21
|
import {
|
|
@@ -559,10 +559,25 @@ 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;
|
|
568
583
|
mobilePanelExpanded?: boolean;
|
|
@@ -857,4 +872,4 @@ type EditorAction = {
|
|
|
857
872
|
recordHistory?: boolean;
|
|
858
873
|
} & (ReorderAction | InsertAction | MoveAction | ReplaceAction | ReplaceRootAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
|
|
859
874
|
|
|
860
|
-
export { type
|
|
875
|
+
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,10 +559,25 @@ 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;
|
|
568
583
|
mobilePanelExpanded?: boolean;
|
|
@@ -857,4 +872,4 @@ type EditorAction = {
|
|
|
857
872
|
recordHistory?: boolean;
|
|
858
873
|
} & (ReorderAction | InsertAction | MoveAction | ReplaceAction | ReplaceRootAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
|
|
859
874
|
|
|
860
|
-
export { type
|
|
875
|
+
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,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useListOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FT6UFK7G.mjs";
|
|
4
4
|
import {
|
|
5
5
|
useAlignOptions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OIFPBVSF.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useHeadingOptions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AD7BMXAA.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-LRFRIIKG.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-GLBLMTBL.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-R34BR6I5.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-O4QHGE26.mjs").then((m) => ({
|
|
616
616
|
default: m.ListSelectLoaded
|
|
617
617
|
}))
|
|
618
618
|
);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LoadedRichTextMenuInner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BUR5T7IX.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-LRFRIIKG.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-QT5KXRDP.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-BZ4BQZJR.mjs";
|
|
5
5
|
import {
|
|
6
6
|
ActionBar,
|
|
7
7
|
IconButton,
|
|
8
8
|
LoadedRichTextMenuInner,
|
|
9
9
|
Loader
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BUR5T7IX.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-PUDWMFBH.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-LRFRIIKG.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-IIRJMJFU.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-3COFH5WN.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-3COFH5WN.mjs").then((m) => ({
|
|
4702
4702
|
default: m.Editor
|
|
4703
4703
|
}))
|
|
4704
4704
|
);
|
|
@@ -7403,7 +7403,7 @@ import {
|
|
|
7403
7403
|
|
|
7404
7404
|
// css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Layout/styles.module.css#css-module
|
|
7405
7405
|
init_react_import();
|
|
7406
|
-
var styles_module_default22 = { "Editor": "
|
|
7406
|
+
var styles_module_default22 = { "Editor": "_Editor_frglt_19", "Editor-portal": "_Editor-portal_frglt_32", "EditorLayout": "_EditorLayout_frglt_37", "EditorLayout-inner": "_EditorLayout-inner_frglt_41", "Editor--hidePlugins": "_Editor--hidePlugins_frglt_73", "EditorLayout--navBarVisible": "_EditorLayout--navBarVisible_frglt_74", "EditorLayout--mounted": "_EditorLayout--mounted_frglt_83", "EditorLayout--mobilePanelHeightToggle": "_EditorLayout--mobilePanelHeightToggle_frglt_87", "EditorLayout--leftSideBarVisible": "_EditorLayout--leftSideBarVisible_frglt_87", "EditorLayout--mobilePanelCustomHeight": "_EditorLayout--mobilePanelCustomHeight_frglt_92", "EditorLayout--mobilePanelHeightMinContent": "_EditorLayout--mobilePanelHeightMinContent_frglt_110", "EditorLayout--rightSideBarVisible": "_EditorLayout--rightSideBarVisible_frglt_132", "EditorLayout-mounted": "_EditorLayout-mounted_frglt_151", "EditorLayout-nav": "_EditorLayout-nav_frglt_192", "Editor-fieldSideBarToolbar": "_Editor-fieldSideBarToolbar_frglt_208", "Editor-fieldSideBarHistory": "_Editor-fieldSideBarHistory_frglt_218", "Editor-fieldSideBarActions": "_Editor-fieldSideBarActions_frglt_224", "EditorLayout-mobilePanel": "_EditorLayout-mobilePanel_frglt_230", "EditorLayout-mobilePanelContent": "_EditorLayout-mobilePanelContent_frglt_250", "EditorLayout-mobileDragHandle": "_EditorLayout-mobileDragHandle_frglt_257", "EditorLayout-mobileDragHandlePill": "_EditorLayout-mobileDragHandlePill_frglt_271", "EditorPluginTab": "_EditorPluginTab_frglt_278", "EditorPluginTab--visible": "_EditorPluginTab--visible_frglt_284", "EditorPluginTab-body": "_EditorPluginTab-body_frglt_289" };
|
|
7407
7407
|
|
|
7408
7408
|
// lib/use-inject-css.ts
|
|
7409
7409
|
init_react_import();
|
|
@@ -7637,6 +7637,7 @@ 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
7643
|
const leftSideBarVisible = useAppStore((s) => s.state.ui.leftSideBarVisible);
|
|
@@ -7674,8 +7675,11 @@ var BrowserBar = ({
|
|
|
7674
7675
|
if (!next || next === currentRoute) return;
|
|
7675
7676
|
void (onRouteChange == null ? void 0 : onRouteChange(next));
|
|
7676
7677
|
};
|
|
7678
|
+
if (!chrome.showUrlBar && !chrome.showDeviceToggle && !chrome.showFullScreenToggle) {
|
|
7679
|
+
return null;
|
|
7680
|
+
}
|
|
7677
7681
|
return /* @__PURE__ */ jsxs20("div", { className: getClassName29(), children: [
|
|
7678
|
-
showRoutePicker ? /* @__PURE__ */ jsxs20(
|
|
7682
|
+
chrome.showUrlBar && (showRoutePicker ? /* @__PURE__ */ jsxs20(
|
|
7679
7683
|
Combobox,
|
|
7680
7684
|
{
|
|
7681
7685
|
items: routes,
|
|
@@ -7719,9 +7723,9 @@ var BrowserBar = ({
|
|
|
7719
7723
|
) : /* @__PURE__ */ jsxs20("div", { className: getClassName29("urlTrigger"), children: [
|
|
7720
7724
|
/* @__PURE__ */ jsx48(Globe, { className: getClassName29("urlIcon"), size: 14 }),
|
|
7721
7725
|
/* @__PURE__ */ jsx48("span", { className: getClassName29("urlText"), children: "/" })
|
|
7722
|
-
] }),
|
|
7723
|
-
/* @__PURE__ */ jsxs20("div", { className: getClassName29("actions"), children: [
|
|
7724
|
-
/* @__PURE__ */ jsx48(
|
|
7726
|
+
] })),
|
|
7727
|
+
(chrome.showDeviceToggle || chrome.showFullScreenToggle) && /* @__PURE__ */ jsxs20("div", { className: getClassName29("actions"), children: [
|
|
7728
|
+
chrome.showDeviceToggle && /* @__PURE__ */ jsx48(
|
|
7725
7729
|
IconButton,
|
|
7726
7730
|
{
|
|
7727
7731
|
type: "button",
|
|
@@ -7730,7 +7734,7 @@ var BrowserBar = ({
|
|
|
7730
7734
|
children: /* @__PURE__ */ jsx48("span", { className: getClassName29("deviceIcon"), children: activeDevice === "desktop" ? /* @__PURE__ */ jsx48(Monitor, { size: 16 }) : /* @__PURE__ */ jsx48(Smartphone, { size: 16 }) })
|
|
7731
7735
|
}
|
|
7732
7736
|
),
|
|
7733
|
-
/* @__PURE__ */ jsx48(
|
|
7737
|
+
chrome.showFullScreenToggle && /* @__PURE__ */ jsx48(
|
|
7734
7738
|
IconButton,
|
|
7735
7739
|
{
|
|
7736
7740
|
type: "button",
|
|
@@ -8425,6 +8429,7 @@ var getPluginTabClassName = get_class_name_factory_default("EditorPluginTab", st
|
|
|
8425
8429
|
var FieldSideBarToolbar = () => {
|
|
8426
8430
|
const appStore = useAppStoreApi();
|
|
8427
8431
|
const { onPublish, currentRoute } = usePropsContext();
|
|
8432
|
+
const chrome = useChromeConfig();
|
|
8428
8433
|
const back = useAppStore((s) => s.history.back);
|
|
8429
8434
|
const forward = useAppStore((s) => s.history.forward);
|
|
8430
8435
|
const hasFuture = useAppStore((s) => s.history.hasFuture());
|
|
@@ -8433,7 +8438,7 @@ var FieldSideBarToolbar = () => {
|
|
|
8433
8438
|
(s) => s.overrides.headerActions || DefaultOverride
|
|
8434
8439
|
);
|
|
8435
8440
|
return /* @__PURE__ */ jsxs24("div", { className: getClassName34("fieldSideBarToolbar"), children: [
|
|
8436
|
-
/* @__PURE__ */ jsxs24("div", { className: getClassName34("fieldSideBarHistory"), children: [
|
|
8441
|
+
chrome.showHistoryControls ? /* @__PURE__ */ jsxs24("div", { className: getClassName34("fieldSideBarHistory"), children: [
|
|
8437
8442
|
/* @__PURE__ */ jsx54(
|
|
8438
8443
|
IconButton,
|
|
8439
8444
|
{
|
|
@@ -8454,7 +8459,7 @@ var FieldSideBarToolbar = () => {
|
|
|
8454
8459
|
children: /* @__PURE__ */ jsx54(Redo2, { size: 18 })
|
|
8455
8460
|
}
|
|
8456
8461
|
)
|
|
8457
|
-
] }),
|
|
8462
|
+
] }) : /* @__PURE__ */ jsx54("div", {}),
|
|
8458
8463
|
/* @__PURE__ */ jsx54("div", { className: getClassName34("fieldSideBarActions"), children: /* @__PURE__ */ jsx54(CustomHeaderActions, { children: /* @__PURE__ */ jsx54(
|
|
8459
8464
|
Button,
|
|
8460
8465
|
{
|
|
@@ -8507,7 +8512,8 @@ var Layout = ({ children }) => {
|
|
|
8507
8512
|
const rightSideBarVisible = useAppStore(
|
|
8508
8513
|
(s) => s.state.ui.rightSideBarVisible
|
|
8509
8514
|
);
|
|
8510
|
-
const
|
|
8515
|
+
const chrome = useChromeConfig();
|
|
8516
|
+
const navBarVisible = chrome.showNavBar;
|
|
8511
8517
|
const instanceId = useAppStore((s) => s.instanceId);
|
|
8512
8518
|
const {
|
|
8513
8519
|
width: leftWidth,
|
|
@@ -8733,6 +8739,7 @@ var Layout = ({ children }) => {
|
|
|
8733
8739
|
leftSideBarVisible,
|
|
8734
8740
|
mounted,
|
|
8735
8741
|
rightSideBarVisible: !hasDesktopFieldsPlugin && rightSideBarVisible,
|
|
8742
|
+
navBarVisible,
|
|
8736
8743
|
mobilePanelHeightToggle: mobilePanelHeightMode === "toggle",
|
|
8737
8744
|
mobilePanelHeightMinContent: mobilePanelHeightMode === "min-content",
|
|
8738
8745
|
mobilePanelCustomHeight: mobilePanelHeight !== null && leftSideBarVisible
|
|
@@ -8748,7 +8755,7 @@ var Layout = ({ children }) => {
|
|
|
8748
8755
|
Nav,
|
|
8749
8756
|
{
|
|
8750
8757
|
items: pluginItems,
|
|
8751
|
-
footer: /* @__PURE__ */ jsx54(
|
|
8758
|
+
footer: chrome.showThemeToggle ? /* @__PURE__ */ jsx54(
|
|
8752
8759
|
IconButton,
|
|
8753
8760
|
{
|
|
8754
8761
|
type: "button",
|
|
@@ -8756,7 +8763,7 @@ var Layout = ({ children }) => {
|
|
|
8756
8763
|
onClick: toggleTheme,
|
|
8757
8764
|
children: themeIcon
|
|
8758
8765
|
}
|
|
8759
|
-
)
|
|
8766
|
+
) : void 0
|
|
8760
8767
|
}
|
|
8761
8768
|
) }),
|
|
8762
8769
|
/* @__PURE__ */ jsxs24(
|
|
@@ -8845,11 +8852,45 @@ var Layout = ({ children }) => {
|
|
|
8845
8852
|
|
|
8846
8853
|
// components/Editor/index.tsx
|
|
8847
8854
|
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
8855
|
+
var CHROME_KEYS = [
|
|
8856
|
+
"showNavBar",
|
|
8857
|
+
"showThemeToggle",
|
|
8858
|
+
"showHistoryControls",
|
|
8859
|
+
"showUrlBar",
|
|
8860
|
+
"showDeviceToggle",
|
|
8861
|
+
"showFullScreenToggle"
|
|
8862
|
+
];
|
|
8863
|
+
var DEFAULT_CHROME = {
|
|
8864
|
+
showNavBar: true,
|
|
8865
|
+
showThemeToggle: true,
|
|
8866
|
+
showHistoryControls: true,
|
|
8867
|
+
showUrlBar: true,
|
|
8868
|
+
showDeviceToggle: true,
|
|
8869
|
+
showFullScreenToggle: true
|
|
8870
|
+
};
|
|
8871
|
+
var splitUiConfig = (ui) => {
|
|
8872
|
+
const runtime = {};
|
|
8873
|
+
const chrome = {};
|
|
8874
|
+
if (!ui) return { runtime, chrome };
|
|
8875
|
+
for (const [key, value] of Object.entries(ui)) {
|
|
8876
|
+
if (CHROME_KEYS.includes(key)) {
|
|
8877
|
+
chrome[key] = value;
|
|
8878
|
+
} else {
|
|
8879
|
+
runtime[key] = value;
|
|
8880
|
+
}
|
|
8881
|
+
}
|
|
8882
|
+
return { runtime, chrome };
|
|
8883
|
+
};
|
|
8848
8884
|
var propsContext = createContext8({});
|
|
8849
8885
|
function PropsProvider(props) {
|
|
8850
8886
|
return /* @__PURE__ */ jsx55(propsContext.Provider, { value: props, children: props.children });
|
|
8851
8887
|
}
|
|
8852
8888
|
var usePropsContext = () => useContext15(propsContext);
|
|
8889
|
+
var useChromeConfig = () => {
|
|
8890
|
+
const { ui } = usePropsContext();
|
|
8891
|
+
const { chrome } = splitUiConfig(ui);
|
|
8892
|
+
return __spreadValues(__spreadValues({}, DEFAULT_CHROME), chrome);
|
|
8893
|
+
};
|
|
8853
8894
|
function EditorProvider({ children }) {
|
|
8854
8895
|
const {
|
|
8855
8896
|
config,
|
|
@@ -8877,7 +8918,8 @@ function EditorProvider({ children }) {
|
|
|
8877
8918
|
);
|
|
8878
8919
|
const [generatedAppState] = useState24(() => {
|
|
8879
8920
|
var _a, _b, _c, _d, _e, _f;
|
|
8880
|
-
const
|
|
8921
|
+
const { runtime: initialUiRuntime } = splitUiConfig(initialUi);
|
|
8922
|
+
const initial = __spreadValues(__spreadValues({}, defaultAppState.ui), initialUiRuntime);
|
|
8881
8923
|
let clientUiState = {};
|
|
8882
8924
|
if (Object.keys((initialData == null ? void 0 : initialData.root) || {}).length > 0 && !((_a = initialData == null ? void 0 : initialData.root) == null ? void 0 : _a.props)) {
|
|
8883
8925
|
console.warn(
|
|
@@ -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-BUR5T7IX.mjs";
|
|
4
|
+
import "./chunk-FT6UFK7G.mjs";
|
|
5
|
+
import "./chunk-OIFPBVSF.mjs";
|
|
6
|
+
import "./chunk-AD7BMXAA.mjs";
|
|
7
|
+
import "./chunk-LRFRIIKG.mjs";
|
|
8
8
|
import "./chunk-M4JDRFYB.mjs";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-IIRJMJFU.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-DDpLL_TR.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-DDpLL_TR.js';
|
|
2
2
|
import { Editor } from '@tiptap/react';
|
|
3
3
|
|
|
4
4
|
type HistorySlice<D = any> = {
|