@reacteditor/core 0.0.12 → 0.0.14

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