@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.
Files changed (35) hide show
  1. package/dist/{Editor-GK6JTUPD.mjs → Editor-3COFH5WN.mjs} +7 -7
  2. package/dist/{actions-C0LX6bI4.d.mts → actions-DDpLL_TR.d.mts} +17 -2
  3. package/dist/{actions-C0LX6bI4.d.ts → actions-DDpLL_TR.d.ts} +17 -2
  4. package/dist/{chunk-MJJPWASL.mjs → chunk-AD7BMXAA.mjs} +1 -1
  5. package/dist/{chunk-TGVAC3JP.mjs → chunk-BUR5T7IX.mjs} +7 -7
  6. package/dist/{chunk-YBG2RYVF.mjs → chunk-BZ4BQZJR.mjs} +3 -3
  7. package/dist/{chunk-X4EUZIHA.mjs → chunk-FT6UFK7G.mjs} +1 -1
  8. package/dist/{chunk-ERNSJXVF.mjs → chunk-IIRJMJFU.mjs} +0 -1
  9. package/dist/{chunk-OKTANBAI.mjs → chunk-KX5XDJF6.mjs} +59 -18
  10. package/dist/{chunk-56I7ST5F.mjs → chunk-LRFRIIKG.mjs} +1 -1
  11. package/dist/{chunk-XLVEWZWT.mjs → chunk-OIFPBVSF.mjs} +1 -1
  12. package/dist/{chunk-II42EKFK.mjs → chunk-PUDWMFBH.mjs} +1 -1
  13. package/dist/{full-IUPXFMQP.mjs → full-QT5KXRDP.mjs} +6 -6
  14. package/dist/{index-DMbFEg8G.d.mts → index-BTatdZaE.d.mts} +1 -1
  15. package/dist/{index-DmThy7vE.d.ts → index-zhUFD8aP.d.ts} +1 -1
  16. package/dist/index.d.mts +13 -7
  17. package/dist/index.d.ts +13 -7
  18. package/dist/index.js +52 -12
  19. package/dist/index.mjs +9 -9
  20. package/dist/internal.d.mts +2 -2
  21. package/dist/internal.d.ts +2 -2
  22. package/dist/{loaded-BT7NIVEO.mjs → loaded-GLBLMTBL.mjs} +3 -3
  23. package/dist/{loaded-HVOKDVC3.mjs → loaded-O4QHGE26.mjs} +3 -3
  24. package/dist/{loaded-YFYCF5F4.mjs → loaded-R34BR6I5.mjs} +3 -3
  25. package/dist/no-external.d.mts +3 -3
  26. package/dist/no-external.d.ts +3 -3
  27. package/dist/no-external.js +52 -12
  28. package/dist/no-external.mjs +9 -9
  29. package/dist/rsc.d.mts +2 -2
  30. package/dist/rsc.d.ts +2 -2
  31. package/dist/rsc.js +0 -1
  32. package/dist/rsc.mjs +2 -2
  33. package/dist/{walk-tree-B1q6t5Jp.d.ts → walk-tree-Cnyva5MB.d.ts} +1 -1
  34. package/dist/{walk-tree-5oDs6qOL.d.mts → walk-tree-Cxbt1UVr.d.mts} +1 -1
  35. package/package.json +1 -1
@@ -4,18 +4,18 @@ import {
4
4
  import {
5
5
  EditorInner,
6
6
  LoadedRichTextMenu
7
- } from "./chunk-YBG2RYVF.mjs";
8
- import "./chunk-TGVAC3JP.mjs";
9
- import "./chunk-X4EUZIHA.mjs";
7
+ } from "./chunk-BZ4BQZJR.mjs";
8
+ import "./chunk-BUR5T7IX.mjs";
9
+ import "./chunk-FT6UFK7G.mjs";
10
10
  import "./chunk-6QJ2HF4O.mjs";
11
- import "./chunk-XLVEWZWT.mjs";
12
- import "./chunk-MJJPWASL.mjs";
11
+ import "./chunk-OIFPBVSF.mjs";
12
+ import "./chunk-AD7BMXAA.mjs";
13
13
  import {
14
14
  useAppStore,
15
15
  useAppStoreApi
16
- } from "./chunk-56I7ST5F.mjs";
16
+ } from "./chunk-LRFRIIKG.mjs";
17
17
  import "./chunk-M4JDRFYB.mjs";
18
- import "./chunk-ERNSJXVF.mjs";
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 EditorComponent 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 ComponentConfigExtensions as G, type History as H, type IframeConfig as I, type ComponentConfigParams as J, type ComponentDataMap as K, type ComponentDataOptionalId as L, type Metadata as M, type ComponentMetadata as N, type OnAction as O, type PrivateAppState as P, type ConfigParams as Q, type RootDataWithProps as R, type CustomField as S, type CustomFieldRender as T, type UserGenerics as U, type Viewports as V, type WithId as W, type DefaultRootProps as X, type DefaultRootRenderProps as Y, type Direction as Z, type DragAxis as _, type Permissions as a, type EditorContext as a0, type EditorMetadata as a1, type ExternalField as a2, type ExternalFieldWithAdaptor as a3, type ExtractConfigParams as a4, type ExtractField as a5, type FieldMetadata as a6, type FieldRenderFunctions as a7, type FieldTransformFn as a8, type FieldTransformFnParams as a9, type ItemWithId as aa, type MappedItem as ab, type NumberField as ac, type ObjectField as ad, type OverrideKey as ae, type RadioField as af, type RichText as ag, type RootConfig as ah, type RootDataWithoutProps as ai, type SelectField as aj, type Slot as ak, type SlotComponent as al, type SlotField as am, type TextField as an, type TextareaField as ao, type Viewport as ap, type WithChildren as aq, type WithEditorProps as ar, type WithSlotProps as as, overrideKeys as at, 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 InitialHistory as q, type ItemSelector as r, type PluginInternal as s, type Adaptor as t, type ArrayField as u, type ArrayState as v, type AsFieldProps as w, type BaseField as x, type CacheOpts as y, type ColorField as z };
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 EditorComponent 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 ComponentConfigExtensions as G, type History as H, type IframeConfig as I, type ComponentConfigParams as J, type ComponentDataMap as K, type ComponentDataOptionalId as L, type Metadata as M, type ComponentMetadata as N, type OnAction as O, type PrivateAppState as P, type ConfigParams as Q, type RootDataWithProps as R, type CustomField as S, type CustomFieldRender as T, type UserGenerics as U, type Viewports as V, type WithId as W, type DefaultRootProps as X, type DefaultRootRenderProps as Y, type Direction as Z, type DragAxis as _, type Permissions as a, type EditorContext as a0, type EditorMetadata as a1, type ExternalField as a2, type ExternalFieldWithAdaptor as a3, type ExtractConfigParams as a4, type ExtractField as a5, type FieldMetadata as a6, type FieldRenderFunctions as a7, type FieldTransformFn as a8, type FieldTransformFnParams as a9, type ItemWithId as aa, type MappedItem as ab, type NumberField as ac, type ObjectField as ad, type OverrideKey as ae, type RadioField as af, type RichText as ag, type RootConfig as ah, type RootDataWithoutProps as ai, type SelectField as aj, type Slot as ak, type SlotComponent as al, type SlotField as am, type TextField as an, type TextareaField as ao, type Viewport as ap, type WithChildren as aq, type WithEditorProps as ar, type WithSlotProps as as, overrideKeys as at, 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 InitialHistory as q, type ItemSelector as r, type PluginInternal as s, type Adaptor as t, type ArrayField as u, type ArrayState as v, type AsFieldProps as w, type BaseField as x, type CacheOpts as y, type ColorField as z };
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 };
@@ -5,7 +5,7 @@ import {
5
5
  Heading4,
6
6
  Heading5,
7
7
  Heading6
8
- } from "./chunk-56I7ST5F.mjs";
8
+ } from "./chunk-LRFRIIKG.mjs";
9
9
  import {
10
10
  init_react_import
11
11
  } from "./chunk-M6W7YEVX.mjs";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  useListOptions
3
- } from "./chunk-X4EUZIHA.mjs";
3
+ } from "./chunk-FT6UFK7G.mjs";
4
4
  import {
5
5
  useAlignOptions
6
- } from "./chunk-XLVEWZWT.mjs";
6
+ } from "./chunk-OIFPBVSF.mjs";
7
7
  import {
8
8
  useHeadingOptions
9
- } from "./chunk-MJJPWASL.mjs";
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-56I7ST5F.mjs";
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-BT7NIVEO.mjs").then((m) => ({
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-YFYCF5F4.mjs").then((m) => ({
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-HVOKDVC3.mjs").then((m) => ({
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-TGVAC3JP.mjs";
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-56I7ST5F.mjs";
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-IUPXFMQP.mjs").then((m) => ({
103
+ () => import("./full-QT5KXRDP.mjs").then((m) => ({
104
104
  default: m.LoadedRichTextMenuFull
105
105
  }))
106
106
  );
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  List,
3
3
  ListOrdered
4
- } from "./chunk-56I7ST5F.mjs";
4
+ } from "./chunk-LRFRIIKG.mjs";
5
5
  import {
6
6
  init_react_import
7
7
  } from "./chunk-M6W7YEVX.mjs";
@@ -116,7 +116,6 @@ var defaultAppState = {
116
116
  ui: {
117
117
  leftSideBarVisible: true,
118
118
  rightSideBarVisible: true,
119
- navBarVisible: true,
120
119
  arrayState: {},
121
120
  itemSelector: null,
122
121
  componentList: {},
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  EditorInner,
3
3
  LoadedRichTextMenu
4
- } from "./chunk-YBG2RYVF.mjs";
4
+ } from "./chunk-BZ4BQZJR.mjs";
5
5
  import {
6
6
  ActionBar,
7
7
  IconButton,
8
8
  LoadedRichTextMenuInner,
9
9
  Loader
10
- } from "./chunk-TGVAC3JP.mjs";
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-II42EKFK.mjs";
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-56I7ST5F.mjs";
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-ERNSJXVF.mjs";
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-GK6JTUPD.mjs").then((m) => ({
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-GK6JTUPD.mjs").then((m) => ({
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 navBarVisible = useAppStore((s) => s.state.ui.navBarVisible);
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 initial = __spreadValues(__spreadValues({}, defaultAppState.ui), initialUi);
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(
@@ -8,7 +8,7 @@ import {
8
8
  defaultViewports,
9
9
  getChanged,
10
10
  resolveComponentData
11
- } from "./chunk-ERNSJXVF.mjs";
11
+ } from "./chunk-IIRJMJFU.mjs";
12
12
  import {
13
13
  get_class_name_factory_default
14
14
  } from "./chunk-Y2EFNT5P.mjs";
@@ -3,7 +3,7 @@ import {
3
3
  AlignJustify,
4
4
  AlignLeft,
5
5
  AlignRight
6
- } from "./chunk-56I7ST5F.mjs";
6
+ } from "./chunk-LRFRIIKG.mjs";
7
7
  import {
8
8
  init_react_import
9
9
  } from "./chunk-M6W7YEVX.mjs";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  defaultAppState,
6
6
  resolveComponentData
7
- } from "./chunk-ERNSJXVF.mjs";
7
+ } from "./chunk-IIRJMJFU.mjs";
8
8
  import {
9
9
  get_class_name_factory_default
10
10
  } from "./chunk-Y2EFNT5P.mjs";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  LoadedRichTextMenuInner
3
- } from "./chunk-TGVAC3JP.mjs";
4
- import "./chunk-X4EUZIHA.mjs";
5
- import "./chunk-XLVEWZWT.mjs";
6
- import "./chunk-MJJPWASL.mjs";
7
- import "./chunk-56I7ST5F.mjs";
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-ERNSJXVF.mjs";
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-C0LX6bI4.mjs';
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-C0LX6bI4.js';
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, q as InitialHistory, b as ComponentData, l as DefaultComponentProps, m as DefaultRootFieldProps, c as ResolveDataTrigger, r as ItemSelector, s as PluginInternal } from './actions-C0LX6bI4.mjs';
2
- export { t as Adaptor, A as AppState, u as ArrayField, v as ArrayState, w as AsFieldProps, B as BaseData, x as BaseField, y as CacheOpts, z as ColorField, g as ComponentConfig, G as ComponentConfigExtensions, J as ComponentConfigParams, K as ComponentDataMap, L as ComponentDataOptionalId, N as ComponentMetadata, Q as ConfigParams, j as Content, S as CustomField, T as CustomFieldRender, k as DefaultComponents, X as DefaultRootProps, Y as DefaultRootRenderProps, Z as Direction, _ as DragAxis, $ as EditorComponent, a0 as EditorContext, a1 as EditorMetadata, a2 as ExternalField, a3 as ExternalFieldWithAdaptor, a4 as ExtractConfigParams, a5 as ExtractField, a6 as FieldMetadata, a7 as FieldRenderFunctions, a8 as FieldTransformFn, a9 as FieldTransformFnParams, F as Fields, H as History, aa as ItemWithId, ab as MappedItem, ac as NumberField, ad as ObjectField, ae as OverrideKey, af as RadioField, ag as RichText, i as RichtextField, ah as RootConfig, n as RootData, R as RootDataWithProps, ai as RootDataWithoutProps, aj as SelectField, ak as Slot, al as SlotComponent, am as SlotField, an as TextField, ao as TextareaField, ap as Viewport, aq as WithChildren, ar as WithEditorProps, W as WithId, as as WithSlotProps, at as overrideKeys } from './actions-C0LX6bI4.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-5oDs6qOL.mjs';
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-DMbFEg8G.mjs';
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
- ui?: Partial<UiState>;
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, q as InitialHistory, b as ComponentData, l as DefaultComponentProps, m as DefaultRootFieldProps, c as ResolveDataTrigger, r as ItemSelector, s as PluginInternal } from './actions-C0LX6bI4.js';
2
- export { t as Adaptor, A as AppState, u as ArrayField, v as ArrayState, w as AsFieldProps, B as BaseData, x as BaseField, y as CacheOpts, z as ColorField, g as ComponentConfig, G as ComponentConfigExtensions, J as ComponentConfigParams, K as ComponentDataMap, L as ComponentDataOptionalId, N as ComponentMetadata, Q as ConfigParams, j as Content, S as CustomField, T as CustomFieldRender, k as DefaultComponents, X as DefaultRootProps, Y as DefaultRootRenderProps, Z as Direction, _ as DragAxis, $ as EditorComponent, a0 as EditorContext, a1 as EditorMetadata, a2 as ExternalField, a3 as ExternalFieldWithAdaptor, a4 as ExtractConfigParams, a5 as ExtractField, a6 as FieldMetadata, a7 as FieldRenderFunctions, a8 as FieldTransformFn, a9 as FieldTransformFnParams, F as Fields, H as History, aa as ItemWithId, ab as MappedItem, ac as NumberField, ad as ObjectField, ae as OverrideKey, af as RadioField, ag as RichText, i as RichtextField, ah as RootConfig, n as RootData, R as RootDataWithProps, ai as RootDataWithoutProps, aj as SelectField, ak as Slot, al as SlotComponent, am as SlotField, an as TextField, ao as TextareaField, ap as Viewport, aq as WithChildren, ar as WithEditorProps, W as WithId, as as WithSlotProps, at as overrideKeys } from './actions-C0LX6bI4.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-B1q6t5Jp.js';
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-DmThy7vE.js';
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
- ui?: Partial<UiState>;
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 navBarVisible = useAppStore((s) => s.state.ui.navBarVisible);
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 initial = __spreadValues(__spreadValues({}, defaultAppState.ui), initialUi);
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-OKTANBAI.mjs";
29
- import "./chunk-YBG2RYVF.mjs";
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-TGVAC3JP.mjs";
39
- import "./chunk-X4EUZIHA.mjs";
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-II42EKFK.mjs";
46
+ } from "./chunk-PUDWMFBH.mjs";
47
47
  import "./chunk-6QJ2HF4O.mjs";
48
- import "./chunk-XLVEWZWT.mjs";
49
- import "./chunk-MJJPWASL.mjs";
50
- import "./chunk-56I7ST5F.mjs";
48
+ import "./chunk-OIFPBVSF.mjs";
49
+ import "./chunk-AD7BMXAA.mjs";
50
+ import "./chunk-LRFRIIKG.mjs";
51
51
  import "./chunk-M4JDRFYB.mjs";
52
- import "./chunk-ERNSJXVF.mjs";
52
+ import "./chunk-IIRJMJFU.mjs";
53
53
  import "./chunk-Y2EFNT5P.mjs";
54
54
  import {
55
55
  walkTree
@@ -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-C0LX6bI4.mjs';
3
- import { A as AppStore } from './index-DMbFEg8G.mjs';
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';
@@ -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-C0LX6bI4.js';
3
- import { A as AppStore } from './index-DmThy7vE.js';
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-XLVEWZWT.mjs";
3
+ } from "./chunk-OIFPBVSF.mjs";
4
4
  import {
5
5
  AlignLeft,
6
6
  SelectControl,
7
7
  useControlContext
8
- } from "./chunk-56I7ST5F.mjs";
8
+ } from "./chunk-LRFRIIKG.mjs";
9
9
  import "./chunk-M4JDRFYB.mjs";
10
- import "./chunk-ERNSJXVF.mjs";
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-X4EUZIHA.mjs";
3
+ } from "./chunk-FT6UFK7G.mjs";
4
4
  import {
5
5
  List,
6
6
  SelectControl,
7
7
  useControlContext
8
- } from "./chunk-56I7ST5F.mjs";
8
+ } from "./chunk-LRFRIIKG.mjs";
9
9
  import "./chunk-M4JDRFYB.mjs";
10
- import "./chunk-ERNSJXVF.mjs";
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-MJJPWASL.mjs";
3
+ } from "./chunk-AD7BMXAA.mjs";
4
4
  import {
5
5
  Heading,
6
6
  SelectControl,
7
7
  useControlContext
8
- } from "./chunk-56I7ST5F.mjs";
8
+ } from "./chunk-LRFRIIKG.mjs";
9
9
  import "./chunk-M4JDRFYB.mjs";
10
- import "./chunk-ERNSJXVF.mjs";
10
+ import "./chunk-IIRJMJFU.mjs";
11
11
  import "./chunk-Y2EFNT5P.mjs";
12
12
  import "./chunk-JIXMPJZA.mjs";
13
13
  import {
@@ -1,6 +1,6 @@
1
- export { t as Adaptor, A as AppState, u as ArrayField, v as ArrayState, w as AsFieldProps, B as BaseData, x as BaseField, y as CacheOpts, z as ColorField, g as ComponentConfig, G as ComponentConfigExtensions, J as ComponentConfigParams, b as ComponentData, K as ComponentDataMap, L as ComponentDataOptionalId, N as ComponentMetadata, C as Config, Q as ConfigParams, j as Content, S as CustomField, T as CustomFieldRender, D as Data, l as DefaultComponentProps, k as DefaultComponents, m as DefaultRootFieldProps, X as DefaultRootProps, Y as DefaultRootRenderProps, Z as Direction, _ as DragAxis, E as EditorAction, $ as EditorComponent, a0 as EditorContext, a1 as EditorMetadata, a2 as ExternalField, a3 as ExternalFieldWithAdaptor, a4 as ExtractConfigParams, a5 as ExtractField, o as Field, a6 as FieldMetadata, p as FieldProps, a7 as FieldRenderFunctions, a8 as FieldTransformFn, a9 as FieldTransformFnParams, h as FieldTransforms, F as Fields, H as History, I as IframeConfig, q as InitialHistory, aa as ItemWithId, ab as MappedItem, M as Metadata, ac as NumberField, ad as ObjectField, O as OnAction, ae as OverrideKey, e as Overrides, a as Permissions, d as Plugin, af as RadioField, c as ResolveDataTrigger, ag as RichText, i as RichtextField, ah as RootConfig, n as RootData, R as RootDataWithProps, ai as RootDataWithoutProps, aj as SelectField, ak as Slot, al as SlotComponent, am as SlotField, an as TextField, ao as TextareaField, f as UiState, U as UserGenerics, ap as Viewport, V as Viewports, aq as WithChildren, ar as WithEditorProps, W as WithId, as as WithSlotProps, at as overrideKeys } from './actions-C0LX6bI4.mjs';
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-5oDs6qOL.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';
@@ -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-DMbFEg8G.mjs';
21
+ import './index-BTatdZaE.mjs';
@@ -1,6 +1,6 @@
1
- export { t as Adaptor, A as AppState, u as ArrayField, v as ArrayState, w as AsFieldProps, B as BaseData, x as BaseField, y as CacheOpts, z as ColorField, g as ComponentConfig, G as ComponentConfigExtensions, J as ComponentConfigParams, b as ComponentData, K as ComponentDataMap, L as ComponentDataOptionalId, N as ComponentMetadata, C as Config, Q as ConfigParams, j as Content, S as CustomField, T as CustomFieldRender, D as Data, l as DefaultComponentProps, k as DefaultComponents, m as DefaultRootFieldProps, X as DefaultRootProps, Y as DefaultRootRenderProps, Z as Direction, _ as DragAxis, E as EditorAction, $ as EditorComponent, a0 as EditorContext, a1 as EditorMetadata, a2 as ExternalField, a3 as ExternalFieldWithAdaptor, a4 as ExtractConfigParams, a5 as ExtractField, o as Field, a6 as FieldMetadata, p as FieldProps, a7 as FieldRenderFunctions, a8 as FieldTransformFn, a9 as FieldTransformFnParams, h as FieldTransforms, F as Fields, H as History, I as IframeConfig, q as InitialHistory, aa as ItemWithId, ab as MappedItem, M as Metadata, ac as NumberField, ad as ObjectField, O as OnAction, ae as OverrideKey, e as Overrides, a as Permissions, d as Plugin, af as RadioField, c as ResolveDataTrigger, ag as RichText, i as RichtextField, ah as RootConfig, n as RootData, R as RootDataWithProps, ai as RootDataWithoutProps, aj as SelectField, ak as Slot, al as SlotComponent, am as SlotField, an as TextField, ao as TextareaField, f as UiState, U as UserGenerics, ap as Viewport, V as Viewports, aq as WithChildren, ar as WithEditorProps, W as WithId, as as WithSlotProps, at as overrideKeys } from './actions-C0LX6bI4.js';
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-B1q6t5Jp.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';
@@ -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-DmThy7vE.js';
21
+ import './index-zhUFD8aP.js';
@@ -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 navBarVisible = useAppStore((s) => s.state.ui.navBarVisible);
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 initial = __spreadValues(__spreadValues({}, defaultAppState.ui), initialUi);
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(
@@ -25,8 +25,8 @@ import {
25
25
  usePropsContext,
26
26
  useRouteParams,
27
27
  useStableValue
28
- } from "./chunk-OKTANBAI.mjs";
29
- import "./chunk-YBG2RYVF.mjs";
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-TGVAC3JP.mjs";
39
- import "./chunk-X4EUZIHA.mjs";
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-II42EKFK.mjs";
46
+ } from "./chunk-PUDWMFBH.mjs";
47
47
  import "./chunk-6QJ2HF4O.mjs";
48
- import "./chunk-XLVEWZWT.mjs";
49
- import "./chunk-MJJPWASL.mjs";
50
- import "./chunk-56I7ST5F.mjs";
48
+ import "./chunk-OIFPBVSF.mjs";
49
+ import "./chunk-AD7BMXAA.mjs";
50
+ import "./chunk-LRFRIIKG.mjs";
51
51
  import "./chunk-M4JDRFYB.mjs";
52
- import "./chunk-ERNSJXVF.mjs";
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-C0LX6bI4.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-5oDs6qOL.mjs';
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-C0LX6bI4.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-B1q6t5Jp.js';
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
@@ -1160,7 +1160,6 @@ var defaultAppState = {
1160
1160
  ui: {
1161
1161
  leftSideBarVisible: true,
1162
1162
  rightSideBarVisible: true,
1163
- navBarVisible: true,
1164
1163
  arrayState: {},
1165
1164
  itemSelector: null,
1166
1165
  componentList: {},
package/dist/rsc.mjs CHANGED
@@ -7,9 +7,9 @@ import {
7
7
  transformProps,
8
8
  useRichtextProps,
9
9
  useSlots
10
- } from "./chunk-II42EKFK.mjs";
10
+ } from "./chunk-PUDWMFBH.mjs";
11
11
  import "./chunk-6QJ2HF4O.mjs";
12
- import "./chunk-ERNSJXVF.mjs";
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-C0LX6bI4.js';
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-C0LX6bI4.mjs';
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. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reacteditor/core",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "The open-source visual editor for React",
5
5
  "author": "Rami Bitar <rami@frontend.co>",
6
6
  "repository": "reacteditor/editor",