@reacteditor/core 0.0.10 → 0.0.12

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 (38) hide show
  1. package/README.md +7 -7
  2. package/dist/{Editor-3COFH5WN.mjs → Editor-GK6JTUPD.mjs} +7 -7
  3. package/dist/{actions-B8_EA7vy.d.mts → actions-C0LX6bI4.d.mts} +1 -0
  4. package/dist/{actions-B8_EA7vy.d.ts → actions-C0LX6bI4.d.ts} +1 -0
  5. package/dist/{chunk-LRFRIIKG.mjs → chunk-56I7ST5F.mjs} +1 -1
  6. package/dist/{chunk-IIRJMJFU.mjs → chunk-ERNSJXVF.mjs} +1 -0
  7. package/dist/{chunk-PUDWMFBH.mjs → chunk-II42EKFK.mjs} +1 -1
  8. package/dist/{chunk-AD7BMXAA.mjs → chunk-MJJPWASL.mjs} +1 -1
  9. package/dist/{chunk-3IP22OOD.mjs → chunk-OKTANBAI.mjs} +1140 -1118
  10. package/dist/{chunk-BUR5T7IX.mjs → chunk-TGVAC3JP.mjs} +7 -7
  11. package/dist/{chunk-FT6UFK7G.mjs → chunk-X4EUZIHA.mjs} +1 -1
  12. package/dist/{chunk-OIFPBVSF.mjs → chunk-XLVEWZWT.mjs} +1 -1
  13. package/dist/{chunk-BZ4BQZJR.mjs → chunk-YBG2RYVF.mjs} +3 -3
  14. package/dist/{full-QT5KXRDP.mjs → full-IUPXFMQP.mjs} +6 -6
  15. package/dist/{index-JoD48fK_.d.mts → index-DMbFEg8G.d.mts} +1 -1
  16. package/dist/{index-BrHy0cc_.d.ts → index-DmThy7vE.d.ts} +1 -1
  17. package/dist/index.css +69 -65
  18. package/dist/index.d.mts +52 -7
  19. package/dist/index.d.ts +52 -7
  20. package/dist/index.js +157 -134
  21. package/dist/index.mjs +9 -9
  22. package/dist/internal.d.mts +2 -2
  23. package/dist/internal.d.ts +2 -2
  24. package/dist/{loaded-GLBLMTBL.mjs → loaded-BT7NIVEO.mjs} +3 -3
  25. package/dist/{loaded-O4QHGE26.mjs → loaded-HVOKDVC3.mjs} +3 -3
  26. package/dist/{loaded-R34BR6I5.mjs → loaded-YFYCF5F4.mjs} +3 -3
  27. package/dist/no-external.css +69 -65
  28. package/dist/no-external.d.mts +4 -4
  29. package/dist/no-external.d.ts +4 -4
  30. package/dist/no-external.js +157 -134
  31. package/dist/no-external.mjs +9 -9
  32. package/dist/rsc.d.mts +2 -2
  33. package/dist/rsc.d.ts +2 -2
  34. package/dist/rsc.js +1 -0
  35. package/dist/rsc.mjs +2 -2
  36. package/dist/{walk-tree-BR2XIZ0W.d.mts → walk-tree-5oDs6qOL.d.mts} +1 -1
  37. package/dist/{walk-tree-DpUJ9kDx.d.ts → walk-tree-B1q6t5Jp.d.ts} +1 -1
  38. package/package.json +4 -4
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  useListOptions
3
- } from "./chunk-FT6UFK7G.mjs";
3
+ } from "./chunk-X4EUZIHA.mjs";
4
4
  import {
5
5
  useAlignOptions
6
- } from "./chunk-OIFPBVSF.mjs";
6
+ } from "./chunk-XLVEWZWT.mjs";
7
7
  import {
8
8
  useHeadingOptions
9
- } from "./chunk-AD7BMXAA.mjs";
9
+ } from "./chunk-MJJPWASL.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-LRFRIIKG.mjs";
29
+ } from "./chunk-56I7ST5F.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-GLBLMTBL.mjs").then((m) => ({
352
+ () => import("./loaded-BT7NIVEO.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-R34BR6I5.mjs").then((m) => ({
583
+ () => import("./loaded-YFYCF5F4.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-O4QHGE26.mjs").then((m) => ({
615
+ () => import("./loaded-HVOKDVC3.mjs").then((m) => ({
616
616
  default: m.ListSelectLoaded
617
617
  }))
618
618
  );
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  List,
3
3
  ListOrdered
4
- } from "./chunk-LRFRIIKG.mjs";
4
+ } from "./chunk-56I7ST5F.mjs";
5
5
  import {
6
6
  init_react_import
7
7
  } from "./chunk-M6W7YEVX.mjs";
@@ -3,7 +3,7 @@ import {
3
3
  AlignJustify,
4
4
  AlignLeft,
5
5
  AlignRight
6
- } from "./chunk-LRFRIIKG.mjs";
6
+ } from "./chunk-56I7ST5F.mjs";
7
7
  import {
8
8
  init_react_import
9
9
  } from "./chunk-M6W7YEVX.mjs";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  LoadedRichTextMenuInner
3
- } from "./chunk-BUR5T7IX.mjs";
3
+ } from "./chunk-TGVAC3JP.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-LRFRIIKG.mjs";
10
+ } from "./chunk-56I7ST5F.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-QT5KXRDP.mjs").then((m) => ({
103
+ () => import("./full-IUPXFMQP.mjs").then((m) => ({
104
104
  default: m.LoadedRichTextMenuFull
105
105
  }))
106
106
  );
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  LoadedRichTextMenuInner
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";
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";
8
8
  import "./chunk-M4JDRFYB.mjs";
9
- import "./chunk-IIRJMJFU.mjs";
9
+ import "./chunk-ERNSJXVF.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-B8_EA7vy.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-C0LX6bI4.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-B8_EA7vy.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-C0LX6bI4.js';
2
2
  import { Editor } from '@tiptap/react';
3
3
 
4
4
  type HistorySlice<D = any> = {
package/dist/index.css CHANGED
@@ -1825,21 +1825,21 @@ textarea._Input-input_zwh6e_27 {
1825
1825
  }
1826
1826
 
1827
1827
  /* css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Drawer/styles.module.css/#css-module-data */
1828
- ._Drawer_146py_1 {
1828
+ ._Drawer_1h4db_1 {
1829
1829
  display: flex;
1830
1830
  flex-direction: column;
1831
1831
  font-family: var(--editor-font-family);
1832
1832
  gap: 6px;
1833
1833
  }
1834
- ._Drawer--tile_146py_8 {
1834
+ ._Drawer--tile_1h4db_8 {
1835
1835
  display: grid;
1836
1836
  grid-template-columns: repeat(auto-fill, minmax(min(88px, calc(50% - 3px)), 1fr));
1837
1837
  gap: 6px;
1838
1838
  }
1839
- ._Drawer-draggable_146py_19 {
1839
+ ._Drawer-draggable_1h4db_19 {
1840
1840
  position: relative;
1841
1841
  }
1842
- ._Drawer-draggableBg_146py_23 {
1842
+ ._Drawer-draggableBg_1h4db_23 {
1843
1843
  position: absolute;
1844
1844
  top: 0;
1845
1845
  right: 0;
@@ -1848,8 +1848,8 @@ textarea._Input-input_zwh6e_27 {
1848
1848
  pointer-events: none;
1849
1849
  z-index: -1;
1850
1850
  }
1851
- ._DrawerItem-draggable_146py_33 {
1852
- background: var(--editor-surface-panel);
1851
+ ._DrawerItem-draggable_1h4db_33 {
1852
+ background: var(--editor-surface-raised);
1853
1853
  cursor: grab;
1854
1854
  padding: 8px 10px;
1855
1855
  display: flex;
@@ -1865,43 +1865,43 @@ textarea._Input-input_zwh6e_27 {
1865
1865
  border-color var(--editor-motion-fast) var(--editor-ease),
1866
1866
  box-shadow var(--editor-motion-fast) var(--editor-ease);
1867
1867
  }
1868
- ._DrawerItem-icon_146py_50 {
1868
+ ._DrawerItem-icon_1h4db_50 {
1869
1869
  color: var(--editor-text-tertiary);
1870
1870
  display: flex;
1871
1871
  transition: color var(--editor-motion-fast) var(--editor-ease);
1872
1872
  }
1873
- ._DrawerItem--disabled_146py_56 ._DrawerItem-draggable_146py_33 {
1873
+ ._DrawerItem--disabled_1h4db_56 ._DrawerItem-draggable_1h4db_33 {
1874
1874
  background: var(--editor-surface-sunken);
1875
1875
  color: var(--editor-text-tertiary);
1876
1876
  cursor: not-allowed;
1877
1877
  }
1878
- ._DrawerItem_146py_33:focus-visible {
1878
+ ._DrawerItem_1h4db_33:focus-visible {
1879
1879
  outline: 0;
1880
1880
  }
1881
- ._Drawer_146py_1:not(._Drawer--isDraggingFrom_146py_66) ._DrawerItem_146py_33:focus-visible ._DrawerItem-draggable_146py_33 {
1881
+ ._Drawer_1h4db_1:not(._Drawer--isDraggingFrom_1h4db_66) ._DrawerItem_1h4db_33:focus-visible ._DrawerItem-draggable_1h4db_33 {
1882
1882
  border-radius: var(--editor-radius-md);
1883
1883
  outline: none;
1884
1884
  box-shadow: var(--editor-ring);
1885
1885
  }
1886
1886
  @media (hover: hover) and (pointer: fine) {
1887
- ._Drawer_146py_1:not(._Drawer--isDraggingFrom_146py_66) ._DrawerItem_146py_33:not(._DrawerItem--disabled_146py_56) ._DrawerItem-draggable_146py_33:hover {
1887
+ ._Drawer_1h4db_1:not(._Drawer--isDraggingFrom_1h4db_66) ._DrawerItem_1h4db_33:not(._DrawerItem--disabled_1h4db_56) ._DrawerItem-draggable_1h4db_33:hover {
1888
1888
  background-color: var(--editor-surface-hover);
1889
1889
  border-color: var(--editor-border-default);
1890
1890
  color: var(--editor-text-accent);
1891
1891
  box-shadow: var(--editor-shadow-sm);
1892
1892
  transition: none;
1893
1893
  }
1894
- ._Drawer_146py_1:not(._Drawer--isDraggingFrom_146py_66) ._DrawerItem_146py_33:not(._DrawerItem--disabled_146py_56) ._DrawerItem-draggable_146py_33:hover ._DrawerItem-icon_146py_50 {
1894
+ ._Drawer_1h4db_1:not(._Drawer--isDraggingFrom_1h4db_66) ._DrawerItem_1h4db_33:not(._DrawerItem--disabled_1h4db_56) ._DrawerItem-draggable_1h4db_33:hover ._DrawerItem-icon_1h4db_50 {
1895
1895
  color: var(--editor-text-accent);
1896
1896
  }
1897
1897
  }
1898
- ._DrawerItem-name_146py_91 {
1898
+ ._DrawerItem-name_1h4db_91 {
1899
1899
  overflow-x: hidden;
1900
1900
  text-overflow: ellipsis;
1901
1901
  white-space: nowrap;
1902
1902
  font-weight: 500;
1903
1903
  }
1904
- ._Drawer--tile_146py_8 ._DrawerItem-draggable_146py_33 {
1904
+ ._Drawer--tile_1h4db_8 ._DrawerItem-draggable_1h4db_33 {
1905
1905
  flex-direction: column;
1906
1906
  align-items: center;
1907
1907
  justify-content: center;
@@ -1910,16 +1910,16 @@ textarea._Input-input_zwh6e_27 {
1910
1910
  padding: 8px;
1911
1911
  gap: 6px;
1912
1912
  }
1913
- ._Drawer--tile_146py_8 ._DrawerItem-icon_146py_50 {
1913
+ ._Drawer--tile_1h4db_8 ._DrawerItem-icon_1h4db_50 {
1914
1914
  display: flex;
1915
1915
  align-items: center;
1916
1916
  justify-content: center;
1917
1917
  }
1918
- ._Drawer--tile_146py_8 ._DrawerItem-icon_146py_50 svg {
1918
+ ._Drawer--tile_1h4db_8 ._DrawerItem-icon_1h4db_50 svg {
1919
1919
  width: 22px;
1920
1920
  height: 22px;
1921
1921
  }
1922
- ._Drawer--tile_146py_8 ._DrawerItem-name_146py_91 {
1922
+ ._Drawer--tile_1h4db_8 ._DrawerItem-name_1h4db_91 {
1923
1923
  width: 100%;
1924
1924
  font-size: var(--editor-font-size-xxxs);
1925
1925
  line-height: 1.2;
@@ -2344,25 +2344,25 @@ body:has(._DropZone--isAnimating_1h108_70:empty) [data-editor-overlay] {
2344
2344
  }
2345
2345
 
2346
2346
  /* css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Layout/styles.module.css/#css-module-data */
2347
- ._Editor_1ty8s_19 {
2347
+ ._Editor_frglt_19 {
2348
2348
  --editor-space-px: 16px;
2349
2349
  color: var(--editor-text-primary);
2350
2350
  font-family: var(--editor-font-family);
2351
2351
  overflow-x: hidden;
2352
2352
  }
2353
2353
  @media (min-width: 766px) {
2354
- ._Editor_1ty8s_19 {
2354
+ ._Editor_frglt_19 {
2355
2355
  overflow-x: auto;
2356
2356
  }
2357
2357
  }
2358
- ._Editor-portal_1ty8s_32 {
2358
+ ._Editor-portal_frglt_32 {
2359
2359
  position: relative;
2360
2360
  z-index: 2;
2361
2361
  }
2362
- ._EditorLayout_1ty8s_37 {
2362
+ ._EditorLayout_frglt_37 {
2363
2363
  height: 100dvh;
2364
2364
  }
2365
- ._EditorLayout-inner_1ty8s_41 {
2365
+ ._EditorLayout-inner_frglt_41 {
2366
2366
  --editor-frame-width: auto;
2367
2367
  --editor-side-nav-width: min-content;
2368
2368
  --editor-side-bar-width: 0px;
@@ -2380,88 +2380,92 @@ body:has(._DropZone--isAnimating_1h108_70:empty) [data-editor-overlay] {
2380
2380
  overflow: hidden;
2381
2381
  }
2382
2382
  @media (min-width: 638px) {
2383
- ._EditorLayout-inner_1ty8s_41 {
2383
+ ._EditorLayout-inner_frglt_41 {
2384
2384
  --editor-side-nav-width: 44px;
2385
2385
  grid-template-areas: "sidenav left editor right";
2386
2386
  grid-template-columns: var(--editor-side-nav-width) 0 var(--editor-frame-width) 0;
2387
2387
  grid-template-rows: auto;
2388
2388
  }
2389
- ._Editor--hidePlugins_1ty8s_73 ._EditorLayout-inner_1ty8s_41 {
2389
+ ._Editor--hidePlugins_frglt_73 ._EditorLayout-inner_frglt_41,
2390
+ ._EditorLayout_frglt_37:not(._EditorLayout--navBarVisible_frglt_74) ._EditorLayout-inner_frglt_41 {
2390
2391
  --editor-side-nav-width: 0;
2391
2392
  }
2392
2393
  }
2393
- ._EditorLayout--mounted_1ty8s_78 ._EditorLayout-inner_1ty8s_41 {
2394
+ ._EditorLayout_frglt_37:not(._EditorLayout--navBarVisible_frglt_74) ._EditorLayout-inner_frglt_41 {
2395
+ --editor-side-nav-width: 0;
2396
+ }
2397
+ ._EditorLayout--mounted_frglt_83 ._EditorLayout-inner_frglt_41 {
2394
2398
  --editor-side-bar-width: 186px;
2395
2399
  }
2396
- ._EditorLayout--mobilePanelHeightToggle_1ty8s_82._EditorLayout--leftSideBarVisible_1ty8s_82 ._EditorLayout-inner_1ty8s_41 {
2400
+ ._EditorLayout--mobilePanelHeightToggle_frglt_87._EditorLayout--leftSideBarVisible_frglt_87 ._EditorLayout-inner_frglt_41 {
2397
2401
  grid-template-rows: auto 60% 0 0 var(--editor-side-nav-width);
2398
2402
  }
2399
- ._EditorLayout--mobilePanelCustomHeight_1ty8s_87._EditorLayout--leftSideBarVisible_1ty8s_82 ._EditorLayout-inner_1ty8s_41 {
2403
+ ._EditorLayout--mobilePanelCustomHeight_frglt_92._EditorLayout--leftSideBarVisible_frglt_87 ._EditorLayout-inner_frglt_41 {
2400
2404
  grid-template-rows: auto var(--editor-mobile-panel-height, 60%) 0 0 var(--editor-side-nav-width);
2401
2405
  }
2402
2406
  @media (min-width: 638px) {
2403
- ._EditorLayout--mobilePanelHeightToggle_1ty8s_82._EditorLayout--leftSideBarVisible_1ty8s_82 ._EditorLayout-inner_1ty8s_41 {
2407
+ ._EditorLayout--mobilePanelHeightToggle_frglt_87._EditorLayout--leftSideBarVisible_frglt_87 ._EditorLayout-inner_frglt_41 {
2404
2408
  grid-template-columns: var(--editor-side-nav-width) var(--editor-left-side-bar-width) var( --editor-frame-width ) 0;
2405
2409
  grid-template-rows: auto;
2406
2410
  }
2407
2411
  }
2408
- ._EditorLayout--mobilePanelHeightMinContent_1ty8s_105._EditorLayout--leftSideBarVisible_1ty8s_82 ._EditorLayout-inner_1ty8s_41 {
2412
+ ._EditorLayout--mobilePanelHeightMinContent_frglt_110._EditorLayout--leftSideBarVisible_frglt_87 ._EditorLayout-inner_frglt_41 {
2409
2413
  grid-template-rows: auto min-content 0 0 var(--editor-side-nav-width);
2410
2414
  }
2411
2415
  @media (min-width: 638px) {
2412
- ._EditorLayout--mobilePanelHeightToggle_1ty8s_82._EditorLayout--leftSideBarVisible_1ty8s_82 ._EditorLayout-inner_1ty8s_41,
2413
- ._EditorLayout--mobilePanelCustomHeight_1ty8s_87._EditorLayout--leftSideBarVisible_1ty8s_82 ._EditorLayout-inner_1ty8s_41,
2414
- ._EditorLayout--mobilePanelHeightMinContent_1ty8s_105._EditorLayout--leftSideBarVisible_1ty8s_82 ._EditorLayout-inner_1ty8s_41 {
2416
+ ._EditorLayout--mobilePanelHeightToggle_frglt_87._EditorLayout--leftSideBarVisible_frglt_87 ._EditorLayout-inner_frglt_41,
2417
+ ._EditorLayout--mobilePanelCustomHeight_frglt_92._EditorLayout--leftSideBarVisible_frglt_87 ._EditorLayout-inner_frglt_41,
2418
+ ._EditorLayout--mobilePanelHeightMinContent_frglt_110._EditorLayout--leftSideBarVisible_frglt_87 ._EditorLayout-inner_frglt_41 {
2415
2419
  grid-template-columns: var(--editor-side-nav-width) var(--editor-left-side-bar-width) var( --editor-frame-width ) 0;
2416
2420
  grid-template-rows: auto;
2417
2421
  }
2418
2422
  }
2419
2423
  @media (min-width: 638px) {
2420
- ._EditorLayout--rightSideBarVisible_1ty8s_127 ._EditorLayout-inner_1ty8s_41 {
2424
+ ._EditorLayout--rightSideBarVisible_frglt_132 ._EditorLayout-inner_frglt_41 {
2421
2425
  grid-template-columns: var(--editor-side-nav-width) 0 var(--editor-frame-width) var(--editor-right-side-bar-width);
2422
2426
  }
2423
2427
  }
2424
2428
  @media (min-width: 638px) {
2425
- ._EditorLayout--leftSideBarVisible_1ty8s_82._EditorLayout--rightSideBarVisible_1ty8s_127 ._EditorLayout-inner_1ty8s_41 {
2429
+ ._EditorLayout--leftSideBarVisible_frglt_87._EditorLayout--rightSideBarVisible_frglt_132 ._EditorLayout-inner_frglt_41 {
2426
2430
  grid-template-columns: var(--editor-side-nav-width) var(--editor-left-side-bar-width) var( --editor-frame-width ) var(--editor-right-side-bar-width);
2427
2431
  }
2428
2432
  }
2429
2433
  @media (min-width: 458px) {
2430
- ._EditorLayout-mounted_1ty8s_146 ._EditorLayout-inner_1ty8s_41 {
2434
+ ._EditorLayout-mounted_frglt_151 ._EditorLayout-inner_frglt_41 {
2431
2435
  --editor-frame-width: minmax(266px, auto);
2432
2436
  }
2433
2437
  }
2434
2438
  @media (min-width: 638px) {
2435
- ._EditorLayout_1ty8s_37 ._EditorLayout-inner_1ty8s_41 {
2439
+ ._EditorLayout_frglt_37 ._EditorLayout-inner_frglt_41 {
2436
2440
  --editor-side-bar-width: minmax(186px, 250px);
2437
2441
  }
2438
2442
  }
2439
2443
  @media (min-width: 766px) {
2440
- ._EditorLayout_1ty8s_37 ._EditorLayout-inner_1ty8s_41 {
2444
+ ._EditorLayout_frglt_37 ._EditorLayout-inner_frglt_41 {
2441
2445
  --editor-frame-width: auto;
2442
2446
  }
2443
2447
  }
2444
2448
  @media (min-width: 990px) {
2445
- ._EditorLayout_1ty8s_37 ._EditorLayout-inner_1ty8s_41 {
2449
+ ._EditorLayout_frglt_37 ._EditorLayout-inner_frglt_41 {
2446
2450
  --editor-side-bar-width: 256px;
2447
2451
  }
2448
2452
  }
2449
2453
  @media (min-width: 1198px) {
2450
- ._EditorLayout_1ty8s_37 ._EditorLayout-inner_1ty8s_41 {
2454
+ ._EditorLayout_frglt_37 ._EditorLayout-inner_frglt_41 {
2451
2455
  --editor-side-bar-width: 274px;
2452
2456
  }
2453
2457
  }
2454
2458
  @media (min-width: 1398px) {
2455
- ._EditorLayout_1ty8s_37 ._EditorLayout-inner_1ty8s_41 {
2459
+ ._EditorLayout_frglt_37 ._EditorLayout-inner_frglt_41 {
2456
2460
  --editor-side-bar-width: 290px;
2457
2461
  }
2458
2462
  }
2459
2463
  @media (min-width: 1598px) {
2460
- ._EditorLayout_1ty8s_37 ._EditorLayout-inner_1ty8s_41 {
2464
+ ._EditorLayout_frglt_37 ._EditorLayout-inner_frglt_41 {
2461
2465
  --editor-side-bar-width: 320px;
2462
2466
  }
2463
2467
  }
2464
- ._EditorLayout-nav_1ty8s_187 {
2468
+ ._EditorLayout-nav_frglt_192 {
2465
2469
  border-top: 1px solid var(--editor-border-subtle);
2466
2470
  background-color: var(--editor-surface-panel);
2467
2471
  grid-area: sidenav;
@@ -2469,13 +2473,13 @@ body:has(._DropZone--isAnimating_1h108_70:empty) [data-editor-overlay] {
2469
2473
  width: 100%;
2470
2474
  }
2471
2475
  @media (min-width: 638px) {
2472
- ._EditorLayout-nav_1ty8s_187 {
2476
+ ._EditorLayout-nav_frglt_192 {
2473
2477
  border-top: 0;
2474
2478
  border-right: 1px solid var(--editor-border-subtle);
2475
2479
  box-sizing: border-box;
2476
2480
  }
2477
2481
  }
2478
- ._Editor-fieldSideBarToolbar_1ty8s_203 {
2482
+ ._Editor-fieldSideBarToolbar_frglt_208 {
2479
2483
  align-items: center;
2480
2484
  background: var(--editor-surface-panel);
2481
2485
  border-bottom: 1px solid var(--editor-border-subtle);
@@ -2484,17 +2488,17 @@ body:has(._DropZone--isAnimating_1h108_70:empty) [data-editor-overlay] {
2484
2488
  justify-content: space-between;
2485
2489
  padding: 8px 12px;
2486
2490
  }
2487
- ._Editor-fieldSideBarHistory_1ty8s_213 {
2491
+ ._Editor-fieldSideBarHistory_frglt_218 {
2488
2492
  color: var(--editor-text-tertiary);
2489
2493
  display: flex;
2490
2494
  gap: 2px;
2491
2495
  }
2492
- ._Editor-fieldSideBarActions_1ty8s_219 {
2496
+ ._Editor-fieldSideBarActions_frglt_224 {
2493
2497
  align-items: center;
2494
2498
  display: flex;
2495
2499
  gap: 8px;
2496
2500
  }
2497
- ._EditorLayout-mobilePanel_1ty8s_225 {
2501
+ ._EditorLayout-mobilePanel_frglt_230 {
2498
2502
  grid-area: mobilepanel;
2499
2503
  background: var(--editor-surface-panel);
2500
2504
  border-block-start: 1px solid var(--editor-border-subtle);
@@ -2502,22 +2506,22 @@ body:has(._DropZone--isAnimating_1h108_70:empty) [data-editor-overlay] {
2502
2506
  flex-direction: column;
2503
2507
  overflow: hidden;
2504
2508
  }
2505
- ._EditorLayout--leftSideBarVisible_1ty8s_82 ._EditorLayout-mobilePanel_1ty8s_225 {
2509
+ ._EditorLayout--leftSideBarVisible_frglt_87 ._EditorLayout-mobilePanel_frglt_230 {
2506
2510
  display: flex;
2507
2511
  }
2508
2512
  @media (min-width: 638px) {
2509
- ._EditorLayout-mobilePanel_1ty8s_225,
2510
- ._EditorLayout--leftSideBarVisible_1ty8s_82 ._EditorLayout-mobilePanel_1ty8s_225 {
2513
+ ._EditorLayout-mobilePanel_frglt_230,
2514
+ ._EditorLayout--leftSideBarVisible_frglt_87 ._EditorLayout-mobilePanel_frglt_230 {
2511
2515
  display: none;
2512
2516
  }
2513
2517
  }
2514
- ._EditorLayout-mobilePanelContent_1ty8s_245 {
2518
+ ._EditorLayout-mobilePanelContent_frglt_250 {
2515
2519
  flex: 1;
2516
2520
  overflow-y: auto;
2517
2521
  display: flex;
2518
2522
  flex-direction: column;
2519
2523
  }
2520
- ._EditorLayout-mobileDragHandle_1ty8s_252 {
2524
+ ._EditorLayout-mobileDragHandle_frglt_257 {
2521
2525
  display: flex;
2522
2526
  align-items: center;
2523
2527
  justify-content: center;
@@ -2526,25 +2530,25 @@ body:has(._DropZone--isAnimating_1h108_70:empty) [data-editor-overlay] {
2526
2530
  touch-action: none;
2527
2531
  flex-shrink: 0;
2528
2532
  }
2529
- ._EditorLayout-mobileDragHandle_1ty8s_252:active {
2533
+ ._EditorLayout-mobileDragHandle_frglt_257:active {
2530
2534
  cursor: grabbing;
2531
2535
  }
2532
- ._EditorLayout-mobileDragHandlePill_1ty8s_266 {
2536
+ ._EditorLayout-mobileDragHandlePill_frglt_271 {
2533
2537
  width: 36px;
2534
2538
  height: 4px;
2535
2539
  border-radius: 2px;
2536
2540
  background-color: var(--editor-border-subtle);
2537
2541
  }
2538
- ._EditorPluginTab_1ty8s_273 {
2542
+ ._EditorPluginTab_frglt_278 {
2539
2543
  display: none;
2540
2544
  flex-grow: 1;
2541
2545
  max-height: 100%;
2542
2546
  }
2543
- ._EditorPluginTab--visible_1ty8s_279 {
2547
+ ._EditorPluginTab--visible_frglt_284 {
2544
2548
  display: flex;
2545
2549
  flex-direction: column;
2546
2550
  }
2547
- ._EditorPluginTab-body_1ty8s_284 {
2551
+ ._EditorPluginTab-body_frglt_289 {
2548
2552
  flex-grow: 1;
2549
2553
  max-height: 100%;
2550
2554
  }
@@ -3192,14 +3196,6 @@ body:has(._DropZone--isAnimating_1h108_70:empty) [data-editor-overlay] {
3192
3196
  display: none;
3193
3197
  }
3194
3198
 
3195
- /* css-module:/Users/rami/Documents/apps/react-editor/packages/core/plugins/outline/styles.module.css/#css-module-data */
3196
- ._OutlinePlugin_q92j6_1 {
3197
- padding: 16px;
3198
- height: 100%;
3199
- overflow-y: auto;
3200
- box-sizing: border-box;
3201
- }
3202
-
3203
3199
  /* css-module:/Users/rami/Documents/apps/react-editor/packages/core/plugins/fields/styles.module.css/#css-module-data */
3204
3200
  ._FieldsPlugin_262zt_1 {
3205
3201
  background: white;
@@ -3219,3 +3215,11 @@ body:has(._DropZone--isAnimating_1h108_70:empty) [data-editor-overlay] {
3219
3215
  padding: 16px;
3220
3216
  }
3221
3217
  }
3218
+
3219
+ /* css-module:/Users/rami/Documents/apps/react-editor/packages/core/plugins/outline/styles.module.css/#css-module-data */
3220
+ ._OutlinePlugin_q92j6_1 {
3221
+ padding: 16px;
3222
+ height: 100%;
3223
+ overflow-y: auto;
3224
+ box-sizing: border-box;
3225
+ }
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, d as Plugin, e as Overrides, h as FieldTransforms, M as Metadata, I as IframeConfig, V as Viewports, a as Permissions, f as UiState, O as OnAction, 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-B8_EA7vy.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-B8_EA7vy.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-BR2XIZ0W.mjs';
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';
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-JoD48fK_.mjs';
7
+ import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-DMbFEg8G.mjs';
8
8
  import '@tiptap/react';
9
9
  import '@tiptap/extension-blockquote';
10
10
  import '@tiptap/extension-bold';
@@ -147,11 +147,13 @@ type AppProviderProps<UserConfig extends Config = Config, G extends UserGenerics
147
147
  };
148
148
  declare function AppProvider<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, pages, editorPath, router, currentPath, children, }: AppProviderProps<UserConfig, G>): react_jsx_runtime.JSX.Element;
149
149
 
150
- type AppProps<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = AppProviderProps<UserConfig, G> & {
150
+ /** Editor pass-through props shared by <App> (default layout) and <App.Editor>. */
151
+ type EditorPassthroughProps<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
151
152
  /** Called when the editor publishes. `route` is the schema route key. */
152
153
  onPublish?: (data: G["UserData"], route?: string) => void;
153
154
  onChange?: (data: G["UserData"]) => void;
154
- /** Pass-through Editor configuration. */
155
+ onAction?: OnAction<G["UserData"]>;
156
+ ui?: Partial<UiState>;
155
157
  plugins?: Plugin<UserConfig>[];
156
158
  overrides?: Partial<Overrides<UserConfig>>;
157
159
  fieldTransforms?: FieldTransforms<UserConfig>;
@@ -159,10 +161,53 @@ type AppProps<UserConfig extends Config = Config, G extends UserGenerics<UserCon
159
161
  iframe?: IframeConfig;
160
162
  viewports?: Viewports;
161
163
  permissions?: Partial<Permissions>;
164
+ renderHeader?: (props: {
165
+ children: ReactNode;
166
+ dispatch: (action: EditorAction) => void;
167
+ state: G["UserAppState"];
168
+ }) => ReactElement;
169
+ renderHeaderActions?: (props: {
170
+ state: G["UserAppState"];
171
+ dispatch: (action: EditorAction) => void;
172
+ }) => ReactElement;
173
+ title?: ReactNode;
174
+ dnd?: {
175
+ disableAutoScroll?: boolean;
176
+ };
177
+ initialHistory?: InitialHistory;
178
+ height?: CSSProperties["height"];
179
+ fullScreenCanvas?: boolean;
180
+ disableZoomControls?: boolean;
181
+ _experimentalVirtualization?: boolean;
182
+ };
183
+ type AppProps<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = AppProviderProps<UserConfig, G> & EditorPassthroughProps<UserConfig, G> & {
162
184
  /** Optional custom not-found component — falls back to a built-in. */
163
185
  renderNotFound?: () => ReactNode;
164
186
  };
187
+ type AppRenderProps = {
188
+ metadata?: Metadata;
189
+ renderNotFound?: () => ReactNode;
190
+ };
191
+ /**
192
+ * Mounts <Render> for the current page when the URL is *not* under editorPath.
193
+ * Returns null while editing — safe to place anywhere inside <App>.
194
+ */
195
+ declare function AppRender<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ metadata, renderNotFound }: AppRenderProps): react_jsx_runtime.JSX.Element | null;
196
+ type AppEditorProps<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = EditorPassthroughProps<UserConfig, G> & {
197
+ children?: ReactNode;
198
+ renderNotFound?: () => ReactNode;
199
+ };
200
+ /**
201
+ * Mounts <Editor> for the current page when the URL is under editorPath.
202
+ * Returns null otherwise. Children are forwarded to <Editor> for compositional
203
+ * UI (e.g. <Editor.Preview />, <Editor.Fields />).
204
+ */
205
+ declare function AppEditor<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: AppEditorProps<UserConfig, G>): react_jsx_runtime.JSX.Element | null;
165
206
  declare function App<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: AppProps<UserConfig, G>): react_jsx_runtime.JSX.Element;
207
+ declare namespace App {
208
+ var Render: typeof AppRender;
209
+ var Editor: typeof AppEditor;
210
+ }
166
211
 
167
212
  /**
168
213
  * Returns the schema-named params extracted from the current route.
@@ -506,4 +551,4 @@ declare const outlinePlugin: () => Plugin;
506
551
 
507
552
  declare const legacySideBarPlugin: () => Plugin;
508
553
 
509
- export { Action, ActionBar, App, type AppContextValue, type AppMatched, type AppProps, AppProvider, type AppProviderProps, 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 };
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 };