@reacteditor/core 0.0.10 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/dist/{Editor-3COFH5WN.mjs → Editor-GK6JTUPD.mjs} +7 -7
- package/dist/{actions-B8_EA7vy.d.mts → actions-C0LX6bI4.d.mts} +1 -0
- package/dist/{actions-B8_EA7vy.d.ts → actions-C0LX6bI4.d.ts} +1 -0
- package/dist/{chunk-LRFRIIKG.mjs → chunk-56I7ST5F.mjs} +1 -1
- package/dist/{chunk-3IP22OOD.mjs → chunk-74TOLW7F.mjs} +1139 -1118
- package/dist/{chunk-IIRJMJFU.mjs → chunk-ERNSJXVF.mjs} +1 -0
- package/dist/{chunk-PUDWMFBH.mjs → chunk-II42EKFK.mjs} +1 -1
- package/dist/{chunk-AD7BMXAA.mjs → chunk-MJJPWASL.mjs} +1 -1
- package/dist/{chunk-BUR5T7IX.mjs → chunk-TGVAC3JP.mjs} +7 -7
- package/dist/{chunk-FT6UFK7G.mjs → chunk-X4EUZIHA.mjs} +1 -1
- package/dist/{chunk-OIFPBVSF.mjs → chunk-XLVEWZWT.mjs} +1 -1
- package/dist/{chunk-BZ4BQZJR.mjs → chunk-YBG2RYVF.mjs} +3 -3
- package/dist/{full-QT5KXRDP.mjs → full-IUPXFMQP.mjs} +6 -6
- package/dist/{index-JoD48fK_.d.mts → index-DMbFEg8G.d.mts} +1 -1
- package/dist/{index-BrHy0cc_.d.ts → index-DmThy7vE.d.ts} +1 -1
- package/dist/index.css +25 -25
- package/dist/index.d.mts +52 -7
- package/dist/index.d.ts +52 -7
- package/dist/index.js +155 -133
- package/dist/index.mjs +9 -9
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/{loaded-GLBLMTBL.mjs → loaded-BT7NIVEO.mjs} +3 -3
- package/dist/{loaded-O4QHGE26.mjs → loaded-HVOKDVC3.mjs} +3 -3
- package/dist/{loaded-R34BR6I5.mjs → loaded-YFYCF5F4.mjs} +3 -3
- package/dist/no-external.css +25 -25
- package/dist/no-external.d.mts +4 -4
- package/dist/no-external.d.ts +4 -4
- package/dist/no-external.js +155 -133
- package/dist/no-external.mjs +9 -9
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +1 -0
- package/dist/rsc.mjs +2 -2
- package/dist/{walk-tree-BR2XIZ0W.d.mts → walk-tree-5oDs6qOL.d.mts} +1 -1
- package/dist/{walk-tree-DpUJ9kDx.d.ts → walk-tree-B1q6t5Jp.d.ts} +1 -1
- package/package.json +4 -4
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useListOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-X4EUZIHA.mjs";
|
|
4
4
|
import {
|
|
5
5
|
useAlignOptions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XLVEWZWT.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useHeadingOptions
|
|
9
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
615
|
+
() => import("./loaded-HVOKDVC3.mjs").then((m) => ({
|
|
616
616
|
default: m.ListSelectLoaded
|
|
617
617
|
}))
|
|
618
618
|
);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LoadedRichTextMenuInner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-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-
|
|
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-
|
|
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-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
.
|
|
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--
|
|
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-
|
|
1839
|
+
._Drawer-draggable_1h4db_19 {
|
|
1840
1840
|
position: relative;
|
|
1841
1841
|
}
|
|
1842
|
-
._Drawer-
|
|
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-
|
|
1852
|
-
background: var(--editor-surface-
|
|
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-
|
|
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--
|
|
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
|
-
.
|
|
1878
|
+
._DrawerItem_1h4db_33:focus-visible {
|
|
1879
1879
|
outline: 0;
|
|
1880
1880
|
}
|
|
1881
|
-
.
|
|
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
|
-
.
|
|
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
|
-
.
|
|
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-
|
|
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--
|
|
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--
|
|
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--
|
|
1918
|
+
._Drawer--tile_1h4db_8 ._DrawerItem-icon_1h4db_50 svg {
|
|
1919
1919
|
width: 22px;
|
|
1920
1920
|
height: 22px;
|
|
1921
1921
|
}
|
|
1922
|
-
._Drawer--
|
|
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;
|
|
@@ -3192,14 +3192,6 @@ body:has(._DropZone--isAnimating_1h108_70:empty) [data-editor-overlay] {
|
|
|
3192
3192
|
display: none;
|
|
3193
3193
|
}
|
|
3194
3194
|
|
|
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
3195
|
/* css-module:/Users/rami/Documents/apps/react-editor/packages/core/plugins/fields/styles.module.css/#css-module-data */
|
|
3204
3196
|
._FieldsPlugin_262zt_1 {
|
|
3205
3197
|
background: white;
|
|
@@ -3219,3 +3211,11 @@ body:has(._DropZone--isAnimating_1h108_70:empty) [data-editor-overlay] {
|
|
|
3219
3211
|
padding: 16px;
|
|
3220
3212
|
}
|
|
3221
3213
|
}
|
|
3214
|
+
|
|
3215
|
+
/* css-module:/Users/rami/Documents/apps/react-editor/packages/core/plugins/outline/styles.module.css/#css-module-data */
|
|
3216
|
+
._OutlinePlugin_q92j6_1 {
|
|
3217
|
+
padding: 16px;
|
|
3218
|
+
height: 100%;
|
|
3219
|
+
overflow-y: auto;
|
|
3220
|
+
box-sizing: border-box;
|
|
3221
|
+
}
|
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,
|
|
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-
|
|
3
|
-
export { G as GetRoutePropsOptions, g as getRouteProps, m as migrate, r as resolveAllData, a as resolveRouteFromString, t as transformProps, w as walkTree } from './walk-tree-
|
|
1
|
+
import { D as Data, o as Field, p as FieldProps, C as Config, U as UserGenerics, O as OnAction, f as UiState, 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-
|
|
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
|
-
|
|
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
|
-
|
|
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 };
|
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, d as Plugin, e as Overrides, h as FieldTransforms, M as Metadata, I as IframeConfig, V as Viewports, a as Permissions,
|
|
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-
|
|
3
|
-
export { G as GetRoutePropsOptions, g as getRouteProps, m as migrate, r as resolveAllData, a as resolveRouteFromString, t as transformProps, w as walkTree } from './walk-tree-
|
|
1
|
+
import { D as Data, o as Field, p as FieldProps, C as Config, U as UserGenerics, O as OnAction, f as UiState, 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';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import react__default, { ReactNode, SyntheticEvent, ReactElement, CSSProperties } from 'react';
|
|
7
|
-
import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-
|
|
7
|
+
import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-DmThy7vE.js';
|
|
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
|
-
|
|
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
|
-
|
|
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 };
|