@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.
- 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-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-3IP22OOD.mjs → chunk-OKTANBAI.mjs} +1140 -1118
- 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 +69 -65
- package/dist/index.d.mts +52 -7
- package/dist/index.d.ts +52 -7
- package/dist/index.js +157 -134
- 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 +69 -65
- package/dist/no-external.d.mts +4 -4
- package/dist/no-external.d.ts +4 -4
- package/dist/no-external.js +157 -134
- 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
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 };
|