@reacteditor/core 0.0.12 → 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-OKTANBAI.mjs → chunk-KX5XDJF6.mjs} +59 -18
- 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.d.mts +13 -7
- package/dist/index.d.ts +13 -7
- package/dist/index.js +52 -12
- 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.d.mts +3 -3
- package/dist/no-external.d.ts +3 -3
- package/dist/no-external.js +52 -12
- 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
|
);
|
|
@@ -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,
|
|
@@ -8749,7 +8755,7 @@ var Layout = ({ children }) => {
|
|
|
8749
8755
|
Nav,
|
|
8750
8756
|
{
|
|
8751
8757
|
items: pluginItems,
|
|
8752
|
-
footer: /* @__PURE__ */ jsx54(
|
|
8758
|
+
footer: chrome.showThemeToggle ? /* @__PURE__ */ jsx54(
|
|
8753
8759
|
IconButton,
|
|
8754
8760
|
{
|
|
8755
8761
|
type: "button",
|
|
@@ -8757,7 +8763,7 @@ var Layout = ({ children }) => {
|
|
|
8757
8763
|
onClick: toggleTheme,
|
|
8758
8764
|
children: themeIcon
|
|
8759
8765
|
}
|
|
8760
|
-
)
|
|
8766
|
+
) : void 0
|
|
8761
8767
|
}
|
|
8762
8768
|
) }),
|
|
8763
8769
|
/* @__PURE__ */ jsxs24(
|
|
@@ -8846,11 +8852,45 @@ var Layout = ({ children }) => {
|
|
|
8846
8852
|
|
|
8847
8853
|
// components/Editor/index.tsx
|
|
8848
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
|
+
};
|
|
8849
8884
|
var propsContext = createContext8({});
|
|
8850
8885
|
function PropsProvider(props) {
|
|
8851
8886
|
return /* @__PURE__ */ jsx55(propsContext.Provider, { value: props, children: props.children });
|
|
8852
8887
|
}
|
|
8853
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
|
+
};
|
|
8854
8894
|
function EditorProvider({ children }) {
|
|
8855
8895
|
const {
|
|
8856
8896
|
config,
|
|
@@ -8878,7 +8918,8 @@ function EditorProvider({ children }) {
|
|
|
8878
8918
|
);
|
|
8879
8919
|
const [generatedAppState] = useState24(() => {
|
|
8880
8920
|
var _a, _b, _c, _d, _e, _f;
|
|
8881
|
-
const
|
|
8921
|
+
const { runtime: initialUiRuntime } = splitUiConfig(initialUi);
|
|
8922
|
+
const initial = __spreadValues(__spreadValues({}, defaultAppState.ui), initialUiRuntime);
|
|
8882
8923
|
let clientUiState = {};
|
|
8883
8924
|
if (Object.keys((initialData == null ? void 0 : initialData.root) || {}).length > 0 && !((_a = initialData == null ? void 0 : initialData.root) == null ? void 0 : _a.props)) {
|
|
8884
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> = {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { D as Data, o as Field, p as FieldProps, C as Config, U as UserGenerics, O as OnAction, f as UiState, d as Plugin, e as Overrides, h as FieldTransforms, M as Metadata, I as IframeConfig, V as Viewports, a as Permissions, E as EditorAction,
|
|
2
|
-
export {
|
|
3
|
-
export { G as GetRoutePropsOptions, g as getRouteProps, m as migrate, r as resolveAllData, a as resolveRouteFromString, t as transformProps, w as walkTree } from './walk-tree-
|
|
1
|
+
import { D as Data, o as Field, p as FieldProps, C as Config, U as UserGenerics, O as OnAction, f as UiState, q as EditorChromeConfig, d as Plugin, e as Overrides, h as FieldTransforms, M as Metadata, I as IframeConfig, V as Viewports, a as Permissions, E as EditorAction, r as InitialHistory, b as ComponentData, l as DefaultComponentProps, m as DefaultRootFieldProps, c as ResolveDataTrigger, s as ItemSelector, t as PluginInternal } from './actions-DDpLL_TR.mjs';
|
|
2
|
+
export { u as Adaptor, A as AppState, v as ArrayField, w as ArrayState, x as AsFieldProps, B as BaseData, y as BaseField, z as CacheOpts, G as ColorField, g as ComponentConfig, J as ComponentConfigExtensions, K as ComponentConfigParams, L as ComponentDataMap, N as ComponentDataOptionalId, Q as ComponentMetadata, S as ConfigParams, j as Content, T as CustomField, X as CustomFieldRender, k as DefaultComponents, Y as DefaultRootProps, Z as DefaultRootRenderProps, _ as Direction, $ as DragAxis, a0 as EditorComponent, a1 as EditorContext, a2 as EditorMetadata, a3 as ExternalField, a4 as ExternalFieldWithAdaptor, a5 as ExtractConfigParams, a6 as ExtractField, a7 as FieldMetadata, a8 as FieldRenderFunctions, a9 as FieldTransformFn, aa as FieldTransformFnParams, F as Fields, H as History, ab as ItemWithId, ac as MappedItem, ad as NumberField, ae as ObjectField, af as OverrideKey, ag as RadioField, ah as RichText, i as RichtextField, ai as RootConfig, n as RootData, R as RootDataWithProps, aj as RootDataWithoutProps, ak as SelectField, al as Slot, am as SlotComponent, an as SlotField, ao as TextField, ap as TextareaField, aq as Viewport, ar as WithChildren, as as WithEditorProps, W as WithId, at as WithSlotProps, au as overrideKeys } from './actions-DDpLL_TR.mjs';
|
|
3
|
+
export { G as GetRoutePropsOptions, g as getRouteProps, m as migrate, r as resolveAllData, a as resolveRouteFromString, t as transformProps, w as walkTree } from './walk-tree-Cxbt1UVr.mjs';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import react__default, { ReactNode, SyntheticEvent, ReactElement, CSSProperties } from 'react';
|
|
7
|
-
import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-
|
|
7
|
+
import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-BTatdZaE.mjs';
|
|
8
8
|
import '@tiptap/react';
|
|
9
9
|
import '@tiptap/extension-blockquote';
|
|
10
10
|
import '@tiptap/extension-bold';
|
|
@@ -153,7 +153,7 @@ type EditorPassthroughProps<UserConfig extends Config = Config, G extends UserGe
|
|
|
153
153
|
onPublish?: (data: G["UserData"], route?: string) => void;
|
|
154
154
|
onChange?: (data: G["UserData"]) => void;
|
|
155
155
|
onAction?: OnAction<G["UserData"]>;
|
|
156
|
-
ui?: Partial<UiState>;
|
|
156
|
+
ui?: Partial<UiState> & Partial<EditorChromeConfig>;
|
|
157
157
|
plugins?: Plugin<UserConfig>[];
|
|
158
158
|
overrides?: Partial<Overrides<UserConfig>>;
|
|
159
159
|
fieldTransforms?: FieldTransforms<UserConfig>;
|
|
@@ -288,7 +288,13 @@ type EditorProps<UserConfig extends Config = Config, G extends UserGenerics<User
|
|
|
288
288
|
children?: ReactNode;
|
|
289
289
|
config: UserConfig;
|
|
290
290
|
data: Partial<G["UserData"] | Data>;
|
|
291
|
-
|
|
291
|
+
/**
|
|
292
|
+
* Initial runtime UI state plus static chrome flags (`navBar`,
|
|
293
|
+
* `themeToggle`, `historyControls`, `urlBar`, `deviceToggle`,
|
|
294
|
+
* `fullScreenToggle`). Chrome flags are read once on mount and cannot be
|
|
295
|
+
* toggled via `dispatch` — they live on props, not in AppState.
|
|
296
|
+
*/
|
|
297
|
+
ui?: Partial<UiState> & Partial<EditorChromeConfig>;
|
|
292
298
|
onChange?: (data: G["UserData"]) => void;
|
|
293
299
|
onPublish?: (data: G["UserData"], route?: string) => void;
|
|
294
300
|
onAction?: OnAction<G["UserData"]>;
|
|
@@ -551,4 +557,4 @@ declare const outlinePlugin: () => Plugin;
|
|
|
551
557
|
|
|
552
558
|
declare const legacySideBarPlugin: () => Plugin;
|
|
553
559
|
|
|
554
|
-
export { Action, ActionBar, App, type AppContextValue, type AppEditorProps, type AppMatched, type AppProps, AppProvider, type AppProviderProps, type AppRenderProps, type AppRouterVariant, AutoField, Button, ComponentData, ComponentList, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, Editor, EditorAction, type EditorApi, type EditorCommands, Field, FieldLabel, FieldProps, FieldTransforms, type GlobalsMap, Group, IconButton, IframeConfig, InitialHistory, type InsertComponentArgs, Label, Metadata, type MoveDestination, OnAction, Overrides, type PageMetadata, type Parent, Permissions, Plugin, Render, ResolveDataTrigger, RichTextMenu, type Route, type RouteKey, Separator, UiState, type UseEditorData, UserGenerics, Viewports, appConfigContext, blocksPlugin, createUseEditor, fieldsPlugin, legacySideBarPlugin, outlinePlugin, pageMetadata, registerOverlayPortal, renderContext, setDeep, useApp, useEditor, useGetEditor, usePropsContext, useRouteParams, useStableValue };
|
|
560
|
+
export { Action, ActionBar, App, type AppContextValue, type AppEditorProps, type AppMatched, type AppProps, AppProvider, type AppProviderProps, type AppRenderProps, type AppRouterVariant, AutoField, Button, ComponentData, ComponentList, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, Editor, EditorAction, type EditorApi, EditorChromeConfig, type EditorCommands, Field, FieldLabel, FieldProps, FieldTransforms, type GlobalsMap, Group, IconButton, IframeConfig, InitialHistory, type InsertComponentArgs, Label, Metadata, type MoveDestination, OnAction, Overrides, type PageMetadata, type Parent, Permissions, Plugin, Render, ResolveDataTrigger, RichTextMenu, type Route, type RouteKey, Separator, UiState, type UseEditorData, UserGenerics, Viewports, appConfigContext, blocksPlugin, createUseEditor, fieldsPlugin, legacySideBarPlugin, outlinePlugin, pageMetadata, registerOverlayPortal, renderContext, setDeep, useApp, useEditor, useGetEditor, usePropsContext, useRouteParams, useStableValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { D as Data, o as Field, p as FieldProps, C as Config, U as UserGenerics, O as OnAction, f as UiState, d as Plugin, e as Overrides, h as FieldTransforms, M as Metadata, I as IframeConfig, V as Viewports, a as Permissions, E as EditorAction,
|
|
2
|
-
export {
|
|
3
|
-
export { G as GetRoutePropsOptions, g as getRouteProps, m as migrate, r as resolveAllData, a as resolveRouteFromString, t as transformProps, w as walkTree } from './walk-tree-
|
|
1
|
+
import { D as Data, o as Field, p as FieldProps, C as Config, U as UserGenerics, O as OnAction, f as UiState, q as EditorChromeConfig, d as Plugin, e as Overrides, h as FieldTransforms, M as Metadata, I as IframeConfig, V as Viewports, a as Permissions, E as EditorAction, r as InitialHistory, b as ComponentData, l as DefaultComponentProps, m as DefaultRootFieldProps, c as ResolveDataTrigger, s as ItemSelector, t as PluginInternal } from './actions-DDpLL_TR.js';
|
|
2
|
+
export { u as Adaptor, A as AppState, v as ArrayField, w as ArrayState, x as AsFieldProps, B as BaseData, y as BaseField, z as CacheOpts, G as ColorField, g as ComponentConfig, J as ComponentConfigExtensions, K as ComponentConfigParams, L as ComponentDataMap, N as ComponentDataOptionalId, Q as ComponentMetadata, S as ConfigParams, j as Content, T as CustomField, X as CustomFieldRender, k as DefaultComponents, Y as DefaultRootProps, Z as DefaultRootRenderProps, _ as Direction, $ as DragAxis, a0 as EditorComponent, a1 as EditorContext, a2 as EditorMetadata, a3 as ExternalField, a4 as ExternalFieldWithAdaptor, a5 as ExtractConfigParams, a6 as ExtractField, a7 as FieldMetadata, a8 as FieldRenderFunctions, a9 as FieldTransformFn, aa as FieldTransformFnParams, F as Fields, H as History, ab as ItemWithId, ac as MappedItem, ad as NumberField, ae as ObjectField, af as OverrideKey, ag as RadioField, ah as RichText, i as RichtextField, ai as RootConfig, n as RootData, R as RootDataWithProps, aj as RootDataWithoutProps, ak as SelectField, al as Slot, am as SlotComponent, an as SlotField, ao as TextField, ap as TextareaField, aq as Viewport, ar as WithChildren, as as WithEditorProps, W as WithId, at as WithSlotProps, au as overrideKeys } from './actions-DDpLL_TR.js';
|
|
3
|
+
export { G as GetRoutePropsOptions, g as getRouteProps, m as migrate, r as resolveAllData, a as resolveRouteFromString, t as transformProps, w as walkTree } from './walk-tree-Cnyva5MB.js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import react__default, { ReactNode, SyntheticEvent, ReactElement, CSSProperties } from 'react';
|
|
7
|
-
import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-
|
|
7
|
+
import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-zhUFD8aP.js';
|
|
8
8
|
import '@tiptap/react';
|
|
9
9
|
import '@tiptap/extension-blockquote';
|
|
10
10
|
import '@tiptap/extension-bold';
|
|
@@ -153,7 +153,7 @@ type EditorPassthroughProps<UserConfig extends Config = Config, G extends UserGe
|
|
|
153
153
|
onPublish?: (data: G["UserData"], route?: string) => void;
|
|
154
154
|
onChange?: (data: G["UserData"]) => void;
|
|
155
155
|
onAction?: OnAction<G["UserData"]>;
|
|
156
|
-
ui?: Partial<UiState>;
|
|
156
|
+
ui?: Partial<UiState> & Partial<EditorChromeConfig>;
|
|
157
157
|
plugins?: Plugin<UserConfig>[];
|
|
158
158
|
overrides?: Partial<Overrides<UserConfig>>;
|
|
159
159
|
fieldTransforms?: FieldTransforms<UserConfig>;
|
|
@@ -288,7 +288,13 @@ type EditorProps<UserConfig extends Config = Config, G extends UserGenerics<User
|
|
|
288
288
|
children?: ReactNode;
|
|
289
289
|
config: UserConfig;
|
|
290
290
|
data: Partial<G["UserData"] | Data>;
|
|
291
|
-
|
|
291
|
+
/**
|
|
292
|
+
* Initial runtime UI state plus static chrome flags (`navBar`,
|
|
293
|
+
* `themeToggle`, `historyControls`, `urlBar`, `deviceToggle`,
|
|
294
|
+
* `fullScreenToggle`). Chrome flags are read once on mount and cannot be
|
|
295
|
+
* toggled via `dispatch` — they live on props, not in AppState.
|
|
296
|
+
*/
|
|
297
|
+
ui?: Partial<UiState> & Partial<EditorChromeConfig>;
|
|
292
298
|
onChange?: (data: G["UserData"]) => void;
|
|
293
299
|
onPublish?: (data: G["UserData"], route?: string) => void;
|
|
294
300
|
onAction?: OnAction<G["UserData"]>;
|
|
@@ -551,4 +557,4 @@ declare const outlinePlugin: () => Plugin;
|
|
|
551
557
|
|
|
552
558
|
declare const legacySideBarPlugin: () => Plugin;
|
|
553
559
|
|
|
554
|
-
export { Action, ActionBar, App, type AppContextValue, type AppEditorProps, type AppMatched, type AppProps, AppProvider, type AppProviderProps, type AppRenderProps, type AppRouterVariant, AutoField, Button, ComponentData, ComponentList, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, Editor, EditorAction, type EditorApi, type EditorCommands, Field, FieldLabel, FieldProps, FieldTransforms, type GlobalsMap, Group, IconButton, IframeConfig, InitialHistory, type InsertComponentArgs, Label, Metadata, type MoveDestination, OnAction, Overrides, type PageMetadata, type Parent, Permissions, Plugin, Render, ResolveDataTrigger, RichTextMenu, type Route, type RouteKey, Separator, UiState, type UseEditorData, UserGenerics, Viewports, appConfigContext, blocksPlugin, createUseEditor, fieldsPlugin, legacySideBarPlugin, outlinePlugin, pageMetadata, registerOverlayPortal, renderContext, setDeep, useApp, useEditor, useGetEditor, usePropsContext, useRouteParams, useStableValue };
|
|
560
|
+
export { Action, ActionBar, App, type AppContextValue, type AppEditorProps, type AppMatched, type AppProps, AppProvider, type AppProviderProps, type AppRenderProps, type AppRouterVariant, AutoField, Button, ComponentData, ComponentList, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, Editor, EditorAction, type EditorApi, EditorChromeConfig, type EditorCommands, Field, FieldLabel, FieldProps, FieldTransforms, type GlobalsMap, Group, IconButton, IframeConfig, InitialHistory, type InsertComponentArgs, Label, Metadata, type MoveDestination, OnAction, Overrides, type PageMetadata, type Parent, Permissions, Plugin, Render, ResolveDataTrigger, RichTextMenu, type Route, type RouteKey, Separator, UiState, type UseEditorData, UserGenerics, Viewports, appConfigContext, blocksPlugin, createUseEditor, fieldsPlugin, legacySideBarPlugin, outlinePlugin, pageMetadata, registerOverlayPortal, renderContext, setDeep, useApp, useEditor, useGetEditor, usePropsContext, useRouteParams, useStableValue };
|
package/dist/index.js
CHANGED
|
@@ -3165,7 +3165,6 @@ var init_default_app_state = __esm({
|
|
|
3165
3165
|
ui: {
|
|
3166
3166
|
leftSideBarVisible: true,
|
|
3167
3167
|
rightSideBarVisible: true,
|
|
3168
|
-
navBarVisible: true,
|
|
3169
3168
|
arrayState: {},
|
|
3170
3169
|
itemSelector: null,
|
|
3171
3170
|
componentList: {},
|
|
@@ -13304,6 +13303,7 @@ var BrowserBar = ({
|
|
|
13304
13303
|
onViewportChange
|
|
13305
13304
|
}) => {
|
|
13306
13305
|
const { routes, currentRoute, onRouteChange } = usePropsContext();
|
|
13306
|
+
const chrome = useChromeConfig();
|
|
13307
13307
|
const viewports = useAppStore((s) => s.state.ui.viewports);
|
|
13308
13308
|
const dispatch = useAppStore((s) => s.dispatch);
|
|
13309
13309
|
const leftSideBarVisible = useAppStore((s) => s.state.ui.leftSideBarVisible);
|
|
@@ -13341,8 +13341,11 @@ var BrowserBar = ({
|
|
|
13341
13341
|
if (!next || next === currentRoute) return;
|
|
13342
13342
|
void (onRouteChange == null ? void 0 : onRouteChange(next));
|
|
13343
13343
|
};
|
|
13344
|
+
if (!chrome.showUrlBar && !chrome.showDeviceToggle && !chrome.showFullScreenToggle) {
|
|
13345
|
+
return null;
|
|
13346
|
+
}
|
|
13344
13347
|
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: getClassName36(), children: [
|
|
13345
|
-
showRoutePicker ? /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
13348
|
+
chrome.showUrlBar && (showRoutePicker ? /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
13346
13349
|
Combobox,
|
|
13347
13350
|
{
|
|
13348
13351
|
items: routes,
|
|
@@ -13386,9 +13389,9 @@ var BrowserBar = ({
|
|
|
13386
13389
|
) : /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: getClassName36("urlTrigger"), children: [
|
|
13387
13390
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Globe, { className: getClassName36("urlIcon"), size: 14 }),
|
|
13388
13391
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: getClassName36("urlText"), children: "/" })
|
|
13389
|
-
] }),
|
|
13390
|
-
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: getClassName36("actions"), children: [
|
|
13391
|
-
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
13392
|
+
] })),
|
|
13393
|
+
(chrome.showDeviceToggle || chrome.showFullScreenToggle) && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: getClassName36("actions"), children: [
|
|
13394
|
+
chrome.showDeviceToggle && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
13392
13395
|
IconButton,
|
|
13393
13396
|
{
|
|
13394
13397
|
type: "button",
|
|
@@ -13397,7 +13400,7 @@ var BrowserBar = ({
|
|
|
13397
13400
|
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: getClassName36("deviceIcon"), children: activeDevice === "desktop" ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Monitor, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Smartphone, { size: 16 }) })
|
|
13398
13401
|
}
|
|
13399
13402
|
),
|
|
13400
|
-
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
13403
|
+
chrome.showFullScreenToggle && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
13401
13404
|
IconButton,
|
|
13402
13405
|
{
|
|
13403
13406
|
type: "button",
|
|
@@ -14156,6 +14159,7 @@ var getPluginTabClassName = get_class_name_factory_default("EditorPluginTab", st
|
|
|
14156
14159
|
var FieldSideBarToolbar = () => {
|
|
14157
14160
|
const appStore = useAppStoreApi();
|
|
14158
14161
|
const { onPublish, currentRoute } = usePropsContext();
|
|
14162
|
+
const chrome = useChromeConfig();
|
|
14159
14163
|
const back = useAppStore((s) => s.history.back);
|
|
14160
14164
|
const forward = useAppStore((s) => s.history.forward);
|
|
14161
14165
|
const hasFuture = useAppStore((s) => s.history.hasFuture());
|
|
@@ -14164,7 +14168,7 @@ var FieldSideBarToolbar = () => {
|
|
|
14164
14168
|
(s) => s.overrides.headerActions || DefaultOverride
|
|
14165
14169
|
);
|
|
14166
14170
|
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: getClassName43("fieldSideBarToolbar"), children: [
|
|
14167
|
-
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: getClassName43("fieldSideBarHistory"), children: [
|
|
14171
|
+
chrome.showHistoryControls ? /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: getClassName43("fieldSideBarHistory"), children: [
|
|
14168
14172
|
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
14169
14173
|
IconButton,
|
|
14170
14174
|
{
|
|
@@ -14185,7 +14189,7 @@ var FieldSideBarToolbar = () => {
|
|
|
14185
14189
|
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Redo2, { size: 18 })
|
|
14186
14190
|
}
|
|
14187
14191
|
)
|
|
14188
|
-
] }),
|
|
14192
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", {}),
|
|
14189
14193
|
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: getClassName43("fieldSideBarActions"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(CustomHeaderActions, { children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
14190
14194
|
Button,
|
|
14191
14195
|
{
|
|
@@ -14238,7 +14242,8 @@ var Layout = ({ children }) => {
|
|
|
14238
14242
|
const rightSideBarVisible = useAppStore(
|
|
14239
14243
|
(s) => s.state.ui.rightSideBarVisible
|
|
14240
14244
|
);
|
|
14241
|
-
const
|
|
14245
|
+
const chrome = useChromeConfig();
|
|
14246
|
+
const navBarVisible = chrome.showNavBar;
|
|
14242
14247
|
const instanceId = useAppStore((s) => s.instanceId);
|
|
14243
14248
|
const {
|
|
14244
14249
|
width: leftWidth,
|
|
@@ -14480,7 +14485,7 @@ var Layout = ({ children }) => {
|
|
|
14480
14485
|
Nav,
|
|
14481
14486
|
{
|
|
14482
14487
|
items: pluginItems,
|
|
14483
|
-
footer: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
14488
|
+
footer: chrome.showThemeToggle ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
14484
14489
|
IconButton,
|
|
14485
14490
|
{
|
|
14486
14491
|
type: "button",
|
|
@@ -14488,7 +14493,7 @@ var Layout = ({ children }) => {
|
|
|
14488
14493
|
onClick: toggleTheme,
|
|
14489
14494
|
children: themeIcon
|
|
14490
14495
|
}
|
|
14491
|
-
)
|
|
14496
|
+
) : void 0
|
|
14492
14497
|
}
|
|
14493
14498
|
) }),
|
|
14494
14499
|
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
@@ -14577,11 +14582,45 @@ var Layout = ({ children }) => {
|
|
|
14577
14582
|
|
|
14578
14583
|
// components/Editor/index.tsx
|
|
14579
14584
|
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
14585
|
+
var CHROME_KEYS = [
|
|
14586
|
+
"showNavBar",
|
|
14587
|
+
"showThemeToggle",
|
|
14588
|
+
"showHistoryControls",
|
|
14589
|
+
"showUrlBar",
|
|
14590
|
+
"showDeviceToggle",
|
|
14591
|
+
"showFullScreenToggle"
|
|
14592
|
+
];
|
|
14593
|
+
var DEFAULT_CHROME = {
|
|
14594
|
+
showNavBar: true,
|
|
14595
|
+
showThemeToggle: true,
|
|
14596
|
+
showHistoryControls: true,
|
|
14597
|
+
showUrlBar: true,
|
|
14598
|
+
showDeviceToggle: true,
|
|
14599
|
+
showFullScreenToggle: true
|
|
14600
|
+
};
|
|
14601
|
+
var splitUiConfig = (ui) => {
|
|
14602
|
+
const runtime = {};
|
|
14603
|
+
const chrome = {};
|
|
14604
|
+
if (!ui) return { runtime, chrome };
|
|
14605
|
+
for (const [key, value] of Object.entries(ui)) {
|
|
14606
|
+
if (CHROME_KEYS.includes(key)) {
|
|
14607
|
+
chrome[key] = value;
|
|
14608
|
+
} else {
|
|
14609
|
+
runtime[key] = value;
|
|
14610
|
+
}
|
|
14611
|
+
}
|
|
14612
|
+
return { runtime, chrome };
|
|
14613
|
+
};
|
|
14580
14614
|
var propsContext = (0, import_react95.createContext)({});
|
|
14581
14615
|
function PropsProvider(props) {
|
|
14582
14616
|
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(propsContext.Provider, { value: props, children: props.children });
|
|
14583
14617
|
}
|
|
14584
14618
|
var usePropsContext = () => (0, import_react95.useContext)(propsContext);
|
|
14619
|
+
var useChromeConfig = () => {
|
|
14620
|
+
const { ui } = usePropsContext();
|
|
14621
|
+
const { chrome } = splitUiConfig(ui);
|
|
14622
|
+
return __spreadValues(__spreadValues({}, DEFAULT_CHROME), chrome);
|
|
14623
|
+
};
|
|
14585
14624
|
function EditorProvider({ children }) {
|
|
14586
14625
|
const {
|
|
14587
14626
|
config,
|
|
@@ -14609,7 +14648,8 @@ function EditorProvider({ children }) {
|
|
|
14609
14648
|
);
|
|
14610
14649
|
const [generatedAppState] = (0, import_react95.useState)(() => {
|
|
14611
14650
|
var _a, _b, _c, _d, _e, _f;
|
|
14612
|
-
const
|
|
14651
|
+
const { runtime: initialUiRuntime } = splitUiConfig(initialUi);
|
|
14652
|
+
const initial = __spreadValues(__spreadValues({}, defaultAppState.ui), initialUiRuntime);
|
|
14613
14653
|
let clientUiState = {};
|
|
14614
14654
|
if (Object.keys((initialData == null ? void 0 : initialData.root) || {}).length > 0 && !((_a = initialData == null ? void 0 : initialData.root) == null ? void 0 : _a.props)) {
|
|
14615
14655
|
console.warn(
|
package/dist/index.mjs
CHANGED
|
@@ -25,8 +25,8 @@ import {
|
|
|
25
25
|
usePropsContext,
|
|
26
26
|
useRouteParams,
|
|
27
27
|
useStableValue
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-KX5XDJF6.mjs";
|
|
29
|
+
import "./chunk-BZ4BQZJR.mjs";
|
|
30
30
|
import {
|
|
31
31
|
Action,
|
|
32
32
|
ActionBar,
|
|
@@ -35,21 +35,21 @@ import {
|
|
|
35
35
|
Label,
|
|
36
36
|
RichTextMenu,
|
|
37
37
|
Separator
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import "./chunk-
|
|
38
|
+
} from "./chunk-BUR5T7IX.mjs";
|
|
39
|
+
import "./chunk-FT6UFK7G.mjs";
|
|
40
40
|
import {
|
|
41
41
|
getRouteProps,
|
|
42
42
|
migrate,
|
|
43
43
|
resolveAllData,
|
|
44
44
|
resolveRouteFromString,
|
|
45
45
|
transformProps
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-PUDWMFBH.mjs";
|
|
47
47
|
import "./chunk-6QJ2HF4O.mjs";
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
48
|
+
import "./chunk-OIFPBVSF.mjs";
|
|
49
|
+
import "./chunk-AD7BMXAA.mjs";
|
|
50
|
+
import "./chunk-LRFRIIKG.mjs";
|
|
51
51
|
import "./chunk-M4JDRFYB.mjs";
|
|
52
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-IIRJMJFU.mjs";
|
|
53
53
|
import "./chunk-Y2EFNT5P.mjs";
|
|
54
54
|
import {
|
|
55
55
|
walkTree
|
package/dist/internal.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Reducer } from 'react';
|
|
2
|
-
import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, E as EditorAction } from './actions-
|
|
3
|
-
import { A as AppStore } from './index-
|
|
2
|
+
import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, E as EditorAction } from './actions-DDpLL_TR.mjs';
|
|
3
|
+
import { A as AppStore } from './index-BTatdZaE.mjs';
|
|
4
4
|
import '@tiptap/react';
|
|
5
5
|
import '@tiptap/extension-blockquote';
|
|
6
6
|
import '@tiptap/extension-bold';
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Reducer } from 'react';
|
|
2
|
-
import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, E as EditorAction } from './actions-
|
|
3
|
-
import { A as AppStore } from './index-
|
|
2
|
+
import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, E as EditorAction } from './actions-DDpLL_TR.js';
|
|
3
|
+
import { A as AppStore } from './index-zhUFD8aP.js';
|
|
4
4
|
import '@tiptap/react';
|
|
5
5
|
import '@tiptap/extension-blockquote';
|
|
6
6
|
import '@tiptap/extension-bold';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useAlignOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OIFPBVSF.mjs";
|
|
4
4
|
import {
|
|
5
5
|
AlignLeft,
|
|
6
6
|
SelectControl,
|
|
7
7
|
useControlContext
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LRFRIIKG.mjs";
|
|
9
9
|
import "./chunk-M4JDRFYB.mjs";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-IIRJMJFU.mjs";
|
|
11
11
|
import "./chunk-Y2EFNT5P.mjs";
|
|
12
12
|
import "./chunk-JIXMPJZA.mjs";
|
|
13
13
|
import {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useListOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FT6UFK7G.mjs";
|
|
4
4
|
import {
|
|
5
5
|
List,
|
|
6
6
|
SelectControl,
|
|
7
7
|
useControlContext
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LRFRIIKG.mjs";
|
|
9
9
|
import "./chunk-M4JDRFYB.mjs";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-IIRJMJFU.mjs";
|
|
11
11
|
import "./chunk-Y2EFNT5P.mjs";
|
|
12
12
|
import "./chunk-JIXMPJZA.mjs";
|
|
13
13
|
import {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useHeadingOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AD7BMXAA.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Heading,
|
|
6
6
|
SelectControl,
|
|
7
7
|
useControlContext
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LRFRIIKG.mjs";
|
|
9
9
|
import "./chunk-M4JDRFYB.mjs";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-IIRJMJFU.mjs";
|
|
11
11
|
import "./chunk-Y2EFNT5P.mjs";
|
|
12
12
|
import "./chunk-JIXMPJZA.mjs";
|
|
13
13
|
import {
|
package/dist/no-external.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { u as Adaptor, A as AppState, v as ArrayField, w as ArrayState, x as AsFieldProps, B as BaseData, y as BaseField, z as CacheOpts, G as ColorField, g as ComponentConfig, J as ComponentConfigExtensions, K as ComponentConfigParams, b as ComponentData, L as ComponentDataMap, N as ComponentDataOptionalId, Q as ComponentMetadata, C as Config, S as ConfigParams, j as Content, T as CustomField, X as CustomFieldRender, D as Data, l as DefaultComponentProps, k as DefaultComponents, m as DefaultRootFieldProps, Y as DefaultRootProps, Z as DefaultRootRenderProps, _ as Direction, $ as DragAxis, E as EditorAction, q as EditorChromeConfig, a0 as EditorComponent, a1 as EditorContext, a2 as EditorMetadata, a3 as ExternalField, a4 as ExternalFieldWithAdaptor, a5 as ExtractConfigParams, a6 as ExtractField, o as Field, a7 as FieldMetadata, p as FieldProps, a8 as FieldRenderFunctions, a9 as FieldTransformFn, aa as FieldTransformFnParams, h as FieldTransforms, F as Fields, H as History, I as IframeConfig, r as InitialHistory, ab as ItemWithId, ac as MappedItem, M as Metadata, ad as NumberField, ae as ObjectField, O as OnAction, af as OverrideKey, e as Overrides, a as Permissions, d as Plugin, ag as RadioField, c as ResolveDataTrigger, ah as RichText, i as RichtextField, ai as RootConfig, n as RootData, R as RootDataWithProps, aj as RootDataWithoutProps, ak as SelectField, al as Slot, am as SlotComponent, an as SlotField, ao as TextField, ap as TextareaField, f as UiState, U as UserGenerics, aq as Viewport, V as Viewports, ar as WithChildren, as as WithEditorProps, W as WithId, at as WithSlotProps, au as overrideKeys } from './actions-DDpLL_TR.mjs';
|
|
2
2
|
export { Action, ActionBar, App, AppContextValue, AppEditorProps, AppMatched, AppProps, AppProvider, AppProviderProps, AppRenderProps, AppRouterVariant, AutoField, Button, ComponentList, Drawer, Editor, EditorApi, EditorCommands, FieldLabel, GlobalsMap, Group, IconButton, InsertComponentArgs, Label, MoveDestination, PageMetadata, Parent, Render, RichTextMenu, Route, RouteKey, Separator, UseEditorData, appConfigContext, blocksPlugin, createUseEditor, fieldsPlugin, legacySideBarPlugin, outlinePlugin, pageMetadata, registerOverlayPortal, renderContext, setDeep, useApp, useEditor, useGetEditor, usePropsContext, useRouteParams, useStableValue } from './index.mjs';
|
|
3
|
-
export { G as GetRoutePropsOptions, g as getRouteProps, m as migrate, r as resolveAllData, a as resolveRouteFromString, t as transformProps, w as walkTree } from './walk-tree-
|
|
3
|
+
export { G as GetRoutePropsOptions, g as getRouteProps, m as migrate, r as resolveAllData, a as resolveRouteFromString, t as transformProps, w as walkTree } from './walk-tree-Cxbt1UVr.mjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@tiptap/react';
|
|
6
6
|
import '@tiptap/extension-blockquote';
|
|
@@ -18,4 +18,4 @@ import '@tiptap/extension-strike';
|
|
|
18
18
|
import '@tiptap/extension-text-align';
|
|
19
19
|
import '@tiptap/extension-underline';
|
|
20
20
|
import 'react/jsx-runtime';
|
|
21
|
-
import './index-
|
|
21
|
+
import './index-BTatdZaE.mjs';
|
package/dist/no-external.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { u as Adaptor, A as AppState, v as ArrayField, w as ArrayState, x as AsFieldProps, B as BaseData, y as BaseField, z as CacheOpts, G as ColorField, g as ComponentConfig, J as ComponentConfigExtensions, K as ComponentConfigParams, b as ComponentData, L as ComponentDataMap, N as ComponentDataOptionalId, Q as ComponentMetadata, C as Config, S as ConfigParams, j as Content, T as CustomField, X as CustomFieldRender, D as Data, l as DefaultComponentProps, k as DefaultComponents, m as DefaultRootFieldProps, Y as DefaultRootProps, Z as DefaultRootRenderProps, _ as Direction, $ as DragAxis, E as EditorAction, q as EditorChromeConfig, a0 as EditorComponent, a1 as EditorContext, a2 as EditorMetadata, a3 as ExternalField, a4 as ExternalFieldWithAdaptor, a5 as ExtractConfigParams, a6 as ExtractField, o as Field, a7 as FieldMetadata, p as FieldProps, a8 as FieldRenderFunctions, a9 as FieldTransformFn, aa as FieldTransformFnParams, h as FieldTransforms, F as Fields, H as History, I as IframeConfig, r as InitialHistory, ab as ItemWithId, ac as MappedItem, M as Metadata, ad as NumberField, ae as ObjectField, O as OnAction, af as OverrideKey, e as Overrides, a as Permissions, d as Plugin, ag as RadioField, c as ResolveDataTrigger, ah as RichText, i as RichtextField, ai as RootConfig, n as RootData, R as RootDataWithProps, aj as RootDataWithoutProps, ak as SelectField, al as Slot, am as SlotComponent, an as SlotField, ao as TextField, ap as TextareaField, f as UiState, U as UserGenerics, aq as Viewport, V as Viewports, ar as WithChildren, as as WithEditorProps, W as WithId, at as WithSlotProps, au as overrideKeys } from './actions-DDpLL_TR.js';
|
|
2
2
|
export { Action, ActionBar, App, AppContextValue, AppEditorProps, AppMatched, AppProps, AppProvider, AppProviderProps, AppRenderProps, AppRouterVariant, AutoField, Button, ComponentList, Drawer, Editor, EditorApi, EditorCommands, FieldLabel, GlobalsMap, Group, IconButton, InsertComponentArgs, Label, MoveDestination, PageMetadata, Parent, Render, RichTextMenu, Route, RouteKey, Separator, UseEditorData, appConfigContext, blocksPlugin, createUseEditor, fieldsPlugin, legacySideBarPlugin, outlinePlugin, pageMetadata, registerOverlayPortal, renderContext, setDeep, useApp, useEditor, useGetEditor, usePropsContext, useRouteParams, useStableValue } from './index.js';
|
|
3
|
-
export { G as GetRoutePropsOptions, g as getRouteProps, m as migrate, r as resolveAllData, a as resolveRouteFromString, t as transformProps, w as walkTree } from './walk-tree-
|
|
3
|
+
export { G as GetRoutePropsOptions, g as getRouteProps, m as migrate, r as resolveAllData, a as resolveRouteFromString, t as transformProps, w as walkTree } from './walk-tree-Cnyva5MB.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@tiptap/react';
|
|
6
6
|
import '@tiptap/extension-blockquote';
|
|
@@ -18,4 +18,4 @@ import '@tiptap/extension-strike';
|
|
|
18
18
|
import '@tiptap/extension-text-align';
|
|
19
19
|
import '@tiptap/extension-underline';
|
|
20
20
|
import 'react/jsx-runtime';
|
|
21
|
-
import './index-
|
|
21
|
+
import './index-zhUFD8aP.js';
|
package/dist/no-external.js
CHANGED
|
@@ -3165,7 +3165,6 @@ var init_default_app_state = __esm({
|
|
|
3165
3165
|
ui: {
|
|
3166
3166
|
leftSideBarVisible: true,
|
|
3167
3167
|
rightSideBarVisible: true,
|
|
3168
|
-
navBarVisible: true,
|
|
3169
3168
|
arrayState: {},
|
|
3170
3169
|
itemSelector: null,
|
|
3171
3170
|
componentList: {},
|
|
@@ -13304,6 +13303,7 @@ var BrowserBar = ({
|
|
|
13304
13303
|
onViewportChange
|
|
13305
13304
|
}) => {
|
|
13306
13305
|
const { routes, currentRoute, onRouteChange } = usePropsContext();
|
|
13306
|
+
const chrome = useChromeConfig();
|
|
13307
13307
|
const viewports = useAppStore((s) => s.state.ui.viewports);
|
|
13308
13308
|
const dispatch = useAppStore((s) => s.dispatch);
|
|
13309
13309
|
const leftSideBarVisible = useAppStore((s) => s.state.ui.leftSideBarVisible);
|
|
@@ -13341,8 +13341,11 @@ var BrowserBar = ({
|
|
|
13341
13341
|
if (!next || next === currentRoute) return;
|
|
13342
13342
|
void (onRouteChange == null ? void 0 : onRouteChange(next));
|
|
13343
13343
|
};
|
|
13344
|
+
if (!chrome.showUrlBar && !chrome.showDeviceToggle && !chrome.showFullScreenToggle) {
|
|
13345
|
+
return null;
|
|
13346
|
+
}
|
|
13344
13347
|
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: getClassName36(), children: [
|
|
13345
|
-
showRoutePicker ? /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
13348
|
+
chrome.showUrlBar && (showRoutePicker ? /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
13346
13349
|
Combobox,
|
|
13347
13350
|
{
|
|
13348
13351
|
items: routes,
|
|
@@ -13386,9 +13389,9 @@ var BrowserBar = ({
|
|
|
13386
13389
|
) : /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: getClassName36("urlTrigger"), children: [
|
|
13387
13390
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Globe, { className: getClassName36("urlIcon"), size: 14 }),
|
|
13388
13391
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: getClassName36("urlText"), children: "/" })
|
|
13389
|
-
] }),
|
|
13390
|
-
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: getClassName36("actions"), children: [
|
|
13391
|
-
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
13392
|
+
] })),
|
|
13393
|
+
(chrome.showDeviceToggle || chrome.showFullScreenToggle) && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: getClassName36("actions"), children: [
|
|
13394
|
+
chrome.showDeviceToggle && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
13392
13395
|
IconButton,
|
|
13393
13396
|
{
|
|
13394
13397
|
type: "button",
|
|
@@ -13397,7 +13400,7 @@ var BrowserBar = ({
|
|
|
13397
13400
|
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: getClassName36("deviceIcon"), children: activeDevice === "desktop" ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Monitor, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Smartphone, { size: 16 }) })
|
|
13398
13401
|
}
|
|
13399
13402
|
),
|
|
13400
|
-
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
13403
|
+
chrome.showFullScreenToggle && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
13401
13404
|
IconButton,
|
|
13402
13405
|
{
|
|
13403
13406
|
type: "button",
|
|
@@ -14156,6 +14159,7 @@ var getPluginTabClassName = get_class_name_factory_default("EditorPluginTab", st
|
|
|
14156
14159
|
var FieldSideBarToolbar = () => {
|
|
14157
14160
|
const appStore = useAppStoreApi();
|
|
14158
14161
|
const { onPublish, currentRoute } = usePropsContext();
|
|
14162
|
+
const chrome = useChromeConfig();
|
|
14159
14163
|
const back = useAppStore((s) => s.history.back);
|
|
14160
14164
|
const forward = useAppStore((s) => s.history.forward);
|
|
14161
14165
|
const hasFuture = useAppStore((s) => s.history.hasFuture());
|
|
@@ -14164,7 +14168,7 @@ var FieldSideBarToolbar = () => {
|
|
|
14164
14168
|
(s) => s.overrides.headerActions || DefaultOverride
|
|
14165
14169
|
);
|
|
14166
14170
|
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: getClassName43("fieldSideBarToolbar"), children: [
|
|
14167
|
-
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: getClassName43("fieldSideBarHistory"), children: [
|
|
14171
|
+
chrome.showHistoryControls ? /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: getClassName43("fieldSideBarHistory"), children: [
|
|
14168
14172
|
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
14169
14173
|
IconButton,
|
|
14170
14174
|
{
|
|
@@ -14185,7 +14189,7 @@ var FieldSideBarToolbar = () => {
|
|
|
14185
14189
|
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Redo2, { size: 18 })
|
|
14186
14190
|
}
|
|
14187
14191
|
)
|
|
14188
|
-
] }),
|
|
14192
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", {}),
|
|
14189
14193
|
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: getClassName43("fieldSideBarActions"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(CustomHeaderActions, { children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
14190
14194
|
Button,
|
|
14191
14195
|
{
|
|
@@ -14238,7 +14242,8 @@ var Layout = ({ children }) => {
|
|
|
14238
14242
|
const rightSideBarVisible = useAppStore(
|
|
14239
14243
|
(s) => s.state.ui.rightSideBarVisible
|
|
14240
14244
|
);
|
|
14241
|
-
const
|
|
14245
|
+
const chrome = useChromeConfig();
|
|
14246
|
+
const navBarVisible = chrome.showNavBar;
|
|
14242
14247
|
const instanceId = useAppStore((s) => s.instanceId);
|
|
14243
14248
|
const {
|
|
14244
14249
|
width: leftWidth,
|
|
@@ -14480,7 +14485,7 @@ var Layout = ({ children }) => {
|
|
|
14480
14485
|
Nav,
|
|
14481
14486
|
{
|
|
14482
14487
|
items: pluginItems,
|
|
14483
|
-
footer: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
14488
|
+
footer: chrome.showThemeToggle ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
14484
14489
|
IconButton,
|
|
14485
14490
|
{
|
|
14486
14491
|
type: "button",
|
|
@@ -14488,7 +14493,7 @@ var Layout = ({ children }) => {
|
|
|
14488
14493
|
onClick: toggleTheme,
|
|
14489
14494
|
children: themeIcon
|
|
14490
14495
|
}
|
|
14491
|
-
)
|
|
14496
|
+
) : void 0
|
|
14492
14497
|
}
|
|
14493
14498
|
) }),
|
|
14494
14499
|
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
@@ -14577,11 +14582,45 @@ var Layout = ({ children }) => {
|
|
|
14577
14582
|
|
|
14578
14583
|
// components/Editor/index.tsx
|
|
14579
14584
|
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
14585
|
+
var CHROME_KEYS = [
|
|
14586
|
+
"showNavBar",
|
|
14587
|
+
"showThemeToggle",
|
|
14588
|
+
"showHistoryControls",
|
|
14589
|
+
"showUrlBar",
|
|
14590
|
+
"showDeviceToggle",
|
|
14591
|
+
"showFullScreenToggle"
|
|
14592
|
+
];
|
|
14593
|
+
var DEFAULT_CHROME = {
|
|
14594
|
+
showNavBar: true,
|
|
14595
|
+
showThemeToggle: true,
|
|
14596
|
+
showHistoryControls: true,
|
|
14597
|
+
showUrlBar: true,
|
|
14598
|
+
showDeviceToggle: true,
|
|
14599
|
+
showFullScreenToggle: true
|
|
14600
|
+
};
|
|
14601
|
+
var splitUiConfig = (ui) => {
|
|
14602
|
+
const runtime = {};
|
|
14603
|
+
const chrome = {};
|
|
14604
|
+
if (!ui) return { runtime, chrome };
|
|
14605
|
+
for (const [key, value] of Object.entries(ui)) {
|
|
14606
|
+
if (CHROME_KEYS.includes(key)) {
|
|
14607
|
+
chrome[key] = value;
|
|
14608
|
+
} else {
|
|
14609
|
+
runtime[key] = value;
|
|
14610
|
+
}
|
|
14611
|
+
}
|
|
14612
|
+
return { runtime, chrome };
|
|
14613
|
+
};
|
|
14580
14614
|
var propsContext = (0, import_react95.createContext)({});
|
|
14581
14615
|
function PropsProvider(props) {
|
|
14582
14616
|
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(propsContext.Provider, { value: props, children: props.children });
|
|
14583
14617
|
}
|
|
14584
14618
|
var usePropsContext = () => (0, import_react95.useContext)(propsContext);
|
|
14619
|
+
var useChromeConfig = () => {
|
|
14620
|
+
const { ui } = usePropsContext();
|
|
14621
|
+
const { chrome } = splitUiConfig(ui);
|
|
14622
|
+
return __spreadValues(__spreadValues({}, DEFAULT_CHROME), chrome);
|
|
14623
|
+
};
|
|
14585
14624
|
function EditorProvider({ children }) {
|
|
14586
14625
|
const {
|
|
14587
14626
|
config,
|
|
@@ -14609,7 +14648,8 @@ function EditorProvider({ children }) {
|
|
|
14609
14648
|
);
|
|
14610
14649
|
const [generatedAppState] = (0, import_react95.useState)(() => {
|
|
14611
14650
|
var _a, _b, _c, _d, _e, _f;
|
|
14612
|
-
const
|
|
14651
|
+
const { runtime: initialUiRuntime } = splitUiConfig(initialUi);
|
|
14652
|
+
const initial = __spreadValues(__spreadValues({}, defaultAppState.ui), initialUiRuntime);
|
|
14613
14653
|
let clientUiState = {};
|
|
14614
14654
|
if (Object.keys((initialData == null ? void 0 : initialData.root) || {}).length > 0 && !((_a = initialData == null ? void 0 : initialData.root) == null ? void 0 : _a.props)) {
|
|
14615
14655
|
console.warn(
|
package/dist/no-external.mjs
CHANGED
|
@@ -25,8 +25,8 @@ import {
|
|
|
25
25
|
usePropsContext,
|
|
26
26
|
useRouteParams,
|
|
27
27
|
useStableValue
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-KX5XDJF6.mjs";
|
|
29
|
+
import "./chunk-BZ4BQZJR.mjs";
|
|
30
30
|
import {
|
|
31
31
|
Action,
|
|
32
32
|
ActionBar,
|
|
@@ -35,21 +35,21 @@ import {
|
|
|
35
35
|
Label,
|
|
36
36
|
RichTextMenu,
|
|
37
37
|
Separator
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import "./chunk-
|
|
38
|
+
} from "./chunk-BUR5T7IX.mjs";
|
|
39
|
+
import "./chunk-FT6UFK7G.mjs";
|
|
40
40
|
import {
|
|
41
41
|
getRouteProps,
|
|
42
42
|
migrate,
|
|
43
43
|
resolveAllData,
|
|
44
44
|
resolveRouteFromString,
|
|
45
45
|
transformProps
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-PUDWMFBH.mjs";
|
|
47
47
|
import "./chunk-6QJ2HF4O.mjs";
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
48
|
+
import "./chunk-OIFPBVSF.mjs";
|
|
49
|
+
import "./chunk-AD7BMXAA.mjs";
|
|
50
|
+
import "./chunk-LRFRIIKG.mjs";
|
|
51
51
|
import "./chunk-M4JDRFYB.mjs";
|
|
52
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-IIRJMJFU.mjs";
|
|
53
53
|
import "./chunk-Y2EFNT5P.mjs";
|
|
54
54
|
import {
|
|
55
55
|
walkTree
|
package/dist/rsc.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as Config, U as UserGenerics, M as Metadata } from './actions-
|
|
3
|
-
export { G as GetRoutePropsOptions, g as getRouteProps, m as migrate, r as resolveAllData, a as resolveRouteFromString, t as transformProps, w as walkTree } from './walk-tree-
|
|
2
|
+
import { C as Config, U as UserGenerics, M as Metadata } from './actions-DDpLL_TR.mjs';
|
|
3
|
+
export { G as GetRoutePropsOptions, g as getRouteProps, m as migrate, r as resolveAllData, a as resolveRouteFromString, t as transformProps, w as walkTree } from './walk-tree-Cxbt1UVr.mjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@tiptap/react';
|
|
6
6
|
import '@tiptap/extension-blockquote';
|
package/dist/rsc.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as Config, U as UserGenerics, M as Metadata } from './actions-
|
|
3
|
-
export { G as GetRoutePropsOptions, g as getRouteProps, m as migrate, r as resolveAllData, a as resolveRouteFromString, t as transformProps, w as walkTree } from './walk-tree-
|
|
2
|
+
import { C as Config, U as UserGenerics, M as Metadata } from './actions-DDpLL_TR.js';
|
|
3
|
+
export { G as GetRoutePropsOptions, g as getRouteProps, m as migrate, r as resolveAllData, a as resolveRouteFromString, t as transformProps, w as walkTree } from './walk-tree-Cnyva5MB.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@tiptap/react';
|
|
6
6
|
import '@tiptap/extension-blockquote';
|
package/dist/rsc.js
CHANGED
package/dist/rsc.mjs
CHANGED
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
transformProps,
|
|
8
8
|
useRichtextProps,
|
|
9
9
|
useSlots
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PUDWMFBH.mjs";
|
|
11
11
|
import "./chunk-6QJ2HF4O.mjs";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-IIRJMJFU.mjs";
|
|
13
13
|
import "./chunk-Y2EFNT5P.mjs";
|
|
14
14
|
import {
|
|
15
15
|
rootAreaId,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as Config, D as Data, W as WithId, U as UserGenerics, j as Content, b as ComponentData, k as DefaultComponents, l as DefaultComponentProps, m as DefaultRootFieldProps, M as Metadata, n as RootData } from './actions-
|
|
1
|
+
import { C as Config, D as Data, W as WithId, U as UserGenerics, j as Content, b as ComponentData, k as DefaultComponents, l as DefaultComponentProps, m as DefaultRootFieldProps, M as Metadata, n as RootData } from './actions-DDpLL_TR.js';
|
|
2
2
|
|
|
3
3
|
type GetRoutePropsOptions = {
|
|
4
4
|
/** Defaults to "/editor". Pass null to skip editor-prefix handling. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as Config, D as Data, W as WithId, U as UserGenerics, j as Content, b as ComponentData, k as DefaultComponents, l as DefaultComponentProps, m as DefaultRootFieldProps, M as Metadata, n as RootData } from './actions-
|
|
1
|
+
import { C as Config, D as Data, W as WithId, U as UserGenerics, j as Content, b as ComponentData, k as DefaultComponents, l as DefaultComponentProps, m as DefaultRootFieldProps, M as Metadata, n as RootData } from './actions-DDpLL_TR.mjs';
|
|
2
2
|
|
|
3
3
|
type GetRoutePropsOptions = {
|
|
4
4
|
/** Defaults to "/editor". Pass null to skip editor-prefix handling. */
|