@reacteditor/core 0.0.5 → 0.0.7
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/dist/Editor-4LPVLYSU.css +415 -0
- package/dist/{Editor-POJT3RA2.mjs → Editor-OSAG52QF.mjs} +10 -10
- package/dist/{Render-JNABKPAF.mjs → Render-STFB5CNO.mjs} +1 -1
- package/dist/Render-ZTUTUUAH.css +103 -0
- package/dist/{actions-CQmL3wwa.d.mts → actions-BDMhAtxP.d.mts} +2 -1
- package/dist/{actions-CQmL3wwa.d.ts → actions-BDMhAtxP.d.ts} +2 -1
- package/dist/{chunk-KC727YFW.mjs → chunk-6QJ2HF4O.mjs} +1 -1
- package/dist/{chunk-IUOWXGYR.mjs → chunk-AAK2555H.mjs} +4 -4
- package/dist/{chunk-DCL4UC2H.mjs → chunk-EEQGJ6FH.mjs} +1 -1
- package/dist/{chunk-VOLQMQPK.mjs → chunk-IIRJMJFU.mjs} +1 -1
- package/dist/{chunk-43G2QHSV.mjs → chunk-JUC25FB7.mjs} +10 -10
- package/dist/{chunk-UB2DES2O.mjs → chunk-M4JDRFYB.mjs} +8 -6
- package/dist/{chunk-X7IRHSQN.mjs → chunk-RNRHREWH.mjs} +4 -4
- package/dist/{chunk-YFRH22NT.mjs → chunk-TI3KC54Y.mjs} +20 -20
- package/dist/{chunk-QB3US7UE.mjs → chunk-W5I2Z7QS.mjs} +580 -195
- package/dist/{chunk-5N6RK26Z.mjs → chunk-XI7YTBCP.mjs} +1 -1
- package/dist/{chunk-JEDWXGVP.mjs → chunk-ZLSPSBV3.mjs} +1 -1
- package/dist/full-7ABPY2WA.css +311 -0
- package/dist/{full-HZMEMWCN.mjs → full-IHV5BO2L.mjs} +8 -8
- package/dist/{index-BOP2qNVA.d.mts → index-BwLKseT7.d.mts} +1 -1
- package/dist/{index-_G46lHpL.d.ts → index-DkYXZRPz.d.ts} +1 -1
- package/dist/index.css +1268 -1165
- package/dist/index.d.mts +35 -8
- package/dist/index.d.ts +35 -8
- package/dist/index.js +640 -246
- package/dist/index.mjs +15 -15
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +7 -5
- package/dist/internal.mjs +2 -2
- package/dist/{loaded-35JQLXSA.mjs → loaded-3NPQWYKN.mjs} +5 -5
- package/dist/{loaded-QJMKRN35.mjs → loaded-FTSXIONQ.mjs} +5 -5
- package/dist/loaded-N4KWL7FV.css +90 -0
- package/dist/{loaded-U6ZILQXM.mjs → loaded-YTQOQIUU.mjs} +5 -5
- package/dist/no-external.css +1268 -1165
- package/dist/no-external.d.mts +4 -4
- package/dist/no-external.d.ts +4 -4
- package/dist/no-external.js +640 -246
- package/dist/no-external.mjs +15 -15
- package/dist/rsc.css +40 -40
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +1 -1
- package/dist/rsc.mjs +4 -4
- package/dist/{walk-tree-DxSkPLnl.d.ts → walk-tree-BweEZ37Y.d.ts} +1 -1
- package/dist/{walk-tree-Dwv3c_9M.d.mts → walk-tree-LcQXXDqe.d.mts} +1 -1
- package/package.json +2 -1
- package/dist/Editor-WYZZDKT3.css +0 -415
- package/dist/Render-WBTAN6PO.css +0 -103
- package/dist/full-5442HPZH.css +0 -311
- package/dist/loaded-KZZU4RNL.css +0 -90
- package/dist/{chunk-GAUBBDIR.mjs → chunk-JIXMPJZA.mjs} +37 -37
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { D as Data, o as Field, p as FieldProps,
|
|
2
|
-
export {
|
|
3
|
-
export { m as migrate, r as resolveAllData, 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, k as UiState, O as OnAction, f as Permissions, i as Plugin, j as Overrides, m as FieldTransforms, E as EditorAction, V as Viewports, I as IframeConfig, q as InitialHistory, M as Metadata, b as ComponentData, d as DefaultComponentProps, e as DefaultRootFieldProps, h as ResolveDataTrigger, r as ItemSelector, s as PluginInternal } from './actions-BDMhAtxP.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, l as ComponentConfig, z as ComponentConfigExtensions, G as ComponentConfigParams, J as ComponentDataMap, K as ComponentDataOptionalId, L as ComponentMetadata, N as ConfigParams, a as Content, Q as CustomField, S as CustomFieldRender, c as DefaultComponents, T as DefaultRootProps, X as DefaultRootRenderProps, Y as Direction, Z as DragAxis, _ as EditorComponent, $ as EditorContext, a0 as EditorMetadata, a1 as ExternalField, a2 as ExternalFieldWithAdaptor, a3 as ExtractConfigParams, a4 as ExtractField, a5 as FieldMetadata, a6 as FieldRenderFunctions, a7 as FieldTransformFn, a8 as FieldTransformFnParams, F as Fields, H as History, a9 as ItemWithId, aa as MappedItem, ab as NumberField, ac as ObjectField, ad as OverrideKey, ae as RadioField, af as RichText, n as RichtextField, ag as RootConfig, R as RootData, g as RootDataWithProps, ah as RootDataWithoutProps, ai as SelectField, aj as Slot, ak as SlotComponent, al as SlotField, am as TextField, an as TextareaField, ao as Viewport, ap as WithChildren, aq as WithEditorProps, W as WithId, ar as WithSlotProps, as as overrideKeys } from './actions-BDMhAtxP.mjs';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-LcQXXDqe.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-BwLKseT7.mjs';
|
|
8
8
|
import '@tiptap/react';
|
|
9
9
|
import '@tiptap/extension-blockquote';
|
|
10
10
|
import '@tiptap/extension-bold';
|
|
@@ -141,8 +141,6 @@ declare const Drawer: {
|
|
|
141
141
|
}) => react_jsx_runtime.JSX.Element;
|
|
142
142
|
};
|
|
143
143
|
|
|
144
|
-
declare const DropZone: react.ForwardRefExoticComponent<Omit<DropZoneProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
145
|
-
|
|
146
144
|
declare const IconButton: ({ active, children, href, onClick, type, disabled, tabIndex, newTab, fullWidth, title, suppressHydrationWarning, }: {
|
|
147
145
|
active?: boolean;
|
|
148
146
|
children: ReactNode;
|
|
@@ -196,6 +194,7 @@ type EditorProps<UserConfig extends Config = Config, G extends UserGenerics<User
|
|
|
196
194
|
disableZoomControls?: boolean;
|
|
197
195
|
_experimentalVirtualization?: boolean;
|
|
198
196
|
};
|
|
197
|
+
declare const usePropsContext: () => EditorProps<Config, UserGenerics<Config>>;
|
|
199
198
|
declare function Editor<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: EditorProps<UserConfig>): react_jsx_runtime.JSX.Element;
|
|
200
199
|
declare namespace Editor {
|
|
201
200
|
var Components: () => react_jsx_runtime.JSX.Element;
|
|
@@ -331,7 +330,35 @@ declare const registerOverlayPortal: (el: HTMLElement | null | undefined, opts?:
|
|
|
331
330
|
*/
|
|
332
331
|
declare function setDeep<T extends Record<string, any>>(node: T, path: string, newVal: any): T;
|
|
333
332
|
|
|
334
|
-
type
|
|
333
|
+
type Parent = {
|
|
334
|
+
id: string;
|
|
335
|
+
slot: string;
|
|
336
|
+
};
|
|
337
|
+
type InsertComponentArgs = {
|
|
338
|
+
type: string;
|
|
339
|
+
parent?: Parent;
|
|
340
|
+
index?: number;
|
|
341
|
+
data?: ComponentData;
|
|
342
|
+
select?: boolean;
|
|
343
|
+
};
|
|
344
|
+
type MoveDestination = {
|
|
345
|
+
parent?: Parent;
|
|
346
|
+
index: number;
|
|
347
|
+
};
|
|
348
|
+
type EditorCommands = {
|
|
349
|
+
insertComponent: (args: InsertComponentArgs) => {
|
|
350
|
+
id: string;
|
|
351
|
+
};
|
|
352
|
+
removeComponent: (id: string) => void;
|
|
353
|
+
duplicateComponent: (id: string) => void;
|
|
354
|
+
moveComponent: (id: string, to: MoveDestination) => void;
|
|
355
|
+
replaceComponent: (id: string, data: ComponentData) => void;
|
|
356
|
+
updateProps: (id: string, updater: Partial<DefaultComponentProps> | ((prev: DefaultComponentProps) => Partial<DefaultComponentProps>)) => void;
|
|
357
|
+
updateRoot: (updater: Partial<DefaultRootFieldProps> | ((prev: DefaultRootFieldProps) => Partial<DefaultRootFieldProps>)) => void;
|
|
358
|
+
selectComponent: (id: string | null) => void;
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
type UseEditorData<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = EditorCommands & {
|
|
335
362
|
appState: G["UserPublicAppState"];
|
|
336
363
|
config: UserConfig;
|
|
337
364
|
dispatch: AppStore["dispatch"];
|
|
@@ -385,4 +412,4 @@ declare const outlinePlugin: () => Plugin;
|
|
|
385
412
|
|
|
386
413
|
declare const legacySideBarPlugin: () => Plugin;
|
|
387
414
|
|
|
388
|
-
export { Action, ActionBar, AutoField, Button, ComponentData, ComponentList, Config, Data,
|
|
415
|
+
export { Action, ActionBar, 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, Separator, UiState, type UseEditorData, UserGenerics, Viewports, blocksPlugin, createUseEditor, fieldsPlugin, legacySideBarPlugin, outlinePlugin, pageMetadata, registerOverlayPortal, renderContext, setDeep, useEditor, useGetEditor, usePropsContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { D as Data, o as Field, p as FieldProps,
|
|
2
|
-
export {
|
|
3
|
-
export { m as migrate, r as resolveAllData, 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, k as UiState, O as OnAction, f as Permissions, i as Plugin, j as Overrides, m as FieldTransforms, E as EditorAction, V as Viewports, I as IframeConfig, q as InitialHistory, M as Metadata, b as ComponentData, d as DefaultComponentProps, e as DefaultRootFieldProps, h as ResolveDataTrigger, r as ItemSelector, s as PluginInternal } from './actions-BDMhAtxP.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, l as ComponentConfig, z as ComponentConfigExtensions, G as ComponentConfigParams, J as ComponentDataMap, K as ComponentDataOptionalId, L as ComponentMetadata, N as ConfigParams, a as Content, Q as CustomField, S as CustomFieldRender, c as DefaultComponents, T as DefaultRootProps, X as DefaultRootRenderProps, Y as Direction, Z as DragAxis, _ as EditorComponent, $ as EditorContext, a0 as EditorMetadata, a1 as ExternalField, a2 as ExternalFieldWithAdaptor, a3 as ExtractConfigParams, a4 as ExtractField, a5 as FieldMetadata, a6 as FieldRenderFunctions, a7 as FieldTransformFn, a8 as FieldTransformFnParams, F as Fields, H as History, a9 as ItemWithId, aa as MappedItem, ab as NumberField, ac as ObjectField, ad as OverrideKey, ae as RadioField, af as RichText, n as RichtextField, ag as RootConfig, R as RootData, g as RootDataWithProps, ah as RootDataWithoutProps, ai as SelectField, aj as Slot, ak as SlotComponent, al as SlotField, am as TextField, an as TextareaField, ao as Viewport, ap as WithChildren, aq as WithEditorProps, W as WithId, ar as WithSlotProps, as as overrideKeys } from './actions-BDMhAtxP.js';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BweEZ37Y.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-DkYXZRPz.js';
|
|
8
8
|
import '@tiptap/react';
|
|
9
9
|
import '@tiptap/extension-blockquote';
|
|
10
10
|
import '@tiptap/extension-bold';
|
|
@@ -141,8 +141,6 @@ declare const Drawer: {
|
|
|
141
141
|
}) => react_jsx_runtime.JSX.Element;
|
|
142
142
|
};
|
|
143
143
|
|
|
144
|
-
declare const DropZone: react.ForwardRefExoticComponent<Omit<DropZoneProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
145
|
-
|
|
146
144
|
declare const IconButton: ({ active, children, href, onClick, type, disabled, tabIndex, newTab, fullWidth, title, suppressHydrationWarning, }: {
|
|
147
145
|
active?: boolean;
|
|
148
146
|
children: ReactNode;
|
|
@@ -196,6 +194,7 @@ type EditorProps<UserConfig extends Config = Config, G extends UserGenerics<User
|
|
|
196
194
|
disableZoomControls?: boolean;
|
|
197
195
|
_experimentalVirtualization?: boolean;
|
|
198
196
|
};
|
|
197
|
+
declare const usePropsContext: () => EditorProps<Config, UserGenerics<Config>>;
|
|
199
198
|
declare function Editor<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: EditorProps<UserConfig>): react_jsx_runtime.JSX.Element;
|
|
200
199
|
declare namespace Editor {
|
|
201
200
|
var Components: () => react_jsx_runtime.JSX.Element;
|
|
@@ -331,7 +330,35 @@ declare const registerOverlayPortal: (el: HTMLElement | null | undefined, opts?:
|
|
|
331
330
|
*/
|
|
332
331
|
declare function setDeep<T extends Record<string, any>>(node: T, path: string, newVal: any): T;
|
|
333
332
|
|
|
334
|
-
type
|
|
333
|
+
type Parent = {
|
|
334
|
+
id: string;
|
|
335
|
+
slot: string;
|
|
336
|
+
};
|
|
337
|
+
type InsertComponentArgs = {
|
|
338
|
+
type: string;
|
|
339
|
+
parent?: Parent;
|
|
340
|
+
index?: number;
|
|
341
|
+
data?: ComponentData;
|
|
342
|
+
select?: boolean;
|
|
343
|
+
};
|
|
344
|
+
type MoveDestination = {
|
|
345
|
+
parent?: Parent;
|
|
346
|
+
index: number;
|
|
347
|
+
};
|
|
348
|
+
type EditorCommands = {
|
|
349
|
+
insertComponent: (args: InsertComponentArgs) => {
|
|
350
|
+
id: string;
|
|
351
|
+
};
|
|
352
|
+
removeComponent: (id: string) => void;
|
|
353
|
+
duplicateComponent: (id: string) => void;
|
|
354
|
+
moveComponent: (id: string, to: MoveDestination) => void;
|
|
355
|
+
replaceComponent: (id: string, data: ComponentData) => void;
|
|
356
|
+
updateProps: (id: string, updater: Partial<DefaultComponentProps> | ((prev: DefaultComponentProps) => Partial<DefaultComponentProps>)) => void;
|
|
357
|
+
updateRoot: (updater: Partial<DefaultRootFieldProps> | ((prev: DefaultRootFieldProps) => Partial<DefaultRootFieldProps>)) => void;
|
|
358
|
+
selectComponent: (id: string | null) => void;
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
type UseEditorData<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = EditorCommands & {
|
|
335
362
|
appState: G["UserPublicAppState"];
|
|
336
363
|
config: UserConfig;
|
|
337
364
|
dispatch: AppStore["dispatch"];
|
|
@@ -385,4 +412,4 @@ declare const outlinePlugin: () => Plugin;
|
|
|
385
412
|
|
|
386
413
|
declare const legacySideBarPlugin: () => Plugin;
|
|
387
414
|
|
|
388
|
-
export { Action, ActionBar, AutoField, Button, ComponentData, ComponentList, Config, Data,
|
|
415
|
+
export { Action, ActionBar, 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, Separator, UiState, type UseEditorData, UserGenerics, Viewports, blocksPlugin, createUseEditor, fieldsPlugin, legacySideBarPlugin, outlinePlugin, pageMetadata, registerOverlayPortal, renderContext, setDeep, useEditor, useGetEditor, usePropsContext };
|