@reacteditor/core 0.0.4 → 0.0.5
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-2TYODRQT.mjs → Editor-POJT3RA2.mjs} +8 -8
- package/dist/{Editor-GBV2O5RD.css → Editor-WYZZDKT3.css} +7 -7
- package/dist/{Render-VDC7AEQK.mjs → Render-JNABKPAF.mjs} +1 -1
- package/dist/{Render-EFT7YD2C.css → Render-WBTAN6PO.css} +1 -1
- package/dist/{actions-BCDhqbeL.d.mts → actions-CQmL3wwa.d.mts} +11 -6
- package/dist/{actions-BCDhqbeL.d.ts → actions-CQmL3wwa.d.ts} +11 -6
- package/dist/{chunk-6Q6A3BQH.mjs → chunk-43G2QHSV.mjs} +12 -12
- package/dist/{chunk-HMTHZBH6.mjs → chunk-5N6RK26Z.mjs} +1 -1
- package/dist/{chunk-ZHNRSSMW.mjs → chunk-DCL4UC2H.mjs} +1 -1
- package/dist/{chunk-2LVYDXZS.mjs → chunk-IUOWXGYR.mjs} +2 -2
- package/dist/{chunk-M2RKJTNY.mjs → chunk-JEDWXGVP.mjs} +1 -1
- package/dist/{chunk-MFI3RDA4.mjs → chunk-KC727YFW.mjs} +1 -1
- package/dist/{chunk-D2RG73WI.mjs → chunk-QB3US7UE.mjs} +148 -121
- package/dist/{chunk-VUEM62JF.mjs → chunk-UB2DES2O.mjs} +17 -6
- package/dist/{chunk-TCVU3WEN.mjs → chunk-X7IRHSQN.mjs} +4 -4
- package/dist/{chunk-VD3EVRUF.mjs → chunk-YFRH22NT.mjs} +2 -2
- package/dist/{full-ELX6RALJ.css → full-5442HPZH.css} +6 -6
- package/dist/{full-7KJICNR5.mjs → full-HZMEMWCN.mjs} +6 -6
- package/dist/{index-DVwiIwYU.d.mts → index-BOP2qNVA.d.mts} +1 -1
- package/dist/{index-ComBHfdn.d.ts → index-_G46lHpL.d.ts} +1 -1
- package/dist/index.css +93 -92
- package/dist/index.d.mts +11 -20
- package/dist/index.d.ts +11 -20
- package/dist/index.js +185 -147
- package/dist/index.mjs +10 -10
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +17 -6
- package/dist/internal.mjs +1 -1
- package/dist/{loaded-IJNA4SY5.mjs → loaded-35JQLXSA.mjs} +3 -3
- package/dist/{loaded-TBSVRJPY.css → loaded-KZZU4RNL.css} +1 -1
- package/dist/{loaded-CBJRWD4Z.mjs → loaded-QJMKRN35.mjs} +3 -3
- package/dist/{loaded-DGSPK47E.mjs → loaded-U6ZILQXM.mjs} +3 -3
- package/dist/no-external.css +93 -92
- package/dist/no-external.d.mts +4 -4
- package/dist/no-external.d.ts +4 -4
- package/dist/no-external.js +185 -147
- package/dist/no-external.mjs +10 -10
- package/dist/rsc.css +1 -1
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +4 -4
- package/dist/rsc.mjs +2 -2
- package/dist/{walk-tree-BPIigVTF.d.mts → walk-tree-Dwv3c_9M.d.mts} +1 -1
- package/dist/{walk-tree-BZq1CPCH.d.ts → walk-tree-DxSkPLnl.d.ts} +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { o as Field, p as FieldProps, q as DropZoneProps, C as Config, U as UserGenerics,
|
|
2
|
-
export { u as Adaptor, A as AppState, v as ArrayField, w as ArrayState, x as AsFieldProps, B as BaseData, y as BaseField, z as CacheOpts, l as ComponentConfig, G as ComponentConfigExtensions, J as ComponentConfigParams, K as ComponentDataMap, L as ComponentDataOptionalId, N as ComponentMetadata, Q as ConfigParams, a as Content, S as CustomField, T as CustomFieldRender, d as DefaultComponentProps, c as DefaultComponents, e as DefaultRootFieldProps, 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, n as RichtextField, ah as RootConfig, R as RootData, g 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 { 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, q as DropZoneProps, 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, r as InitialHistory, M as Metadata, h as ResolveDataTrigger, s as ItemSelector, b as ComponentData, t as PluginInternal } from './actions-CQmL3wwa.mjs';
|
|
2
|
+
export { u as Adaptor, A as AppState, v as ArrayField, w as ArrayState, x as AsFieldProps, B as BaseData, y as BaseField, z as CacheOpts, l as ComponentConfig, G as ComponentConfigExtensions, J as ComponentConfigParams, K as ComponentDataMap, L as ComponentDataOptionalId, N as ComponentMetadata, Q as ConfigParams, a as Content, S as CustomField, T as CustomFieldRender, d as DefaultComponentProps, c as DefaultComponents, e as DefaultRootFieldProps, 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, n as RichtextField, ah as RootConfig, R as RootData, g 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-CQmL3wwa.mjs';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Dwv3c_9M.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-BOP2qNVA.mjs';
|
|
8
8
|
import '@tiptap/react';
|
|
9
9
|
import '@tiptap/extension-blockquote';
|
|
10
10
|
import '@tiptap/extension-bold';
|
|
@@ -22,18 +22,12 @@ import '@tiptap/extension-text-align';
|
|
|
22
22
|
import '@tiptap/extension-underline';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* Shared state for components whose config has `global: true`.
|
|
26
|
-
* component type.
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* There is exactly one entry per component type. Multiple named variants of
|
|
31
|
-
* the same component type are not supported in this shape — deliberately, to
|
|
32
|
-
* avoid introducing references / IDs.
|
|
25
|
+
* Shared state for components whose config has `global: true`. Lives inside
|
|
26
|
+
* `data.globals` and is keyed by component type. Instances opt in per-node
|
|
27
|
+
* via `synced: true`; synced instances render from this map (children + id
|
|
28
|
+
* stay extrinsic).
|
|
33
29
|
*/
|
|
34
|
-
type
|
|
35
|
-
props: Record<string, any>;
|
|
36
|
-
}>;
|
|
30
|
+
type GlobalsMap = NonNullable<Data["globals"]>;
|
|
37
31
|
|
|
38
32
|
/**
|
|
39
33
|
* A concrete page destination surfaced in the editor's page switcher.
|
|
@@ -167,10 +161,8 @@ type EditorProps<UserConfig extends Config = Config, G extends UserGenerics<User
|
|
|
167
161
|
children?: ReactNode;
|
|
168
162
|
config: UserConfig;
|
|
169
163
|
data: Partial<G["UserData"] | Data>;
|
|
170
|
-
globalData?: GlobalData;
|
|
171
164
|
ui?: Partial<UiState>;
|
|
172
165
|
onChange?: (data: G["UserData"]) => void;
|
|
173
|
-
onGlobalsChange?: (globalData: GlobalData) => void;
|
|
174
166
|
onPublish?: (data: G["UserData"]) => void;
|
|
175
167
|
onAction?: OnAction<G["UserData"]>;
|
|
176
168
|
permissions?: Partial<Permissions>;
|
|
@@ -224,10 +216,9 @@ declare const renderContext: react__default.Context<{
|
|
|
224
216
|
data: Data;
|
|
225
217
|
metadata: Metadata;
|
|
226
218
|
}>;
|
|
227
|
-
declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data,
|
|
219
|
+
declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data, metadata, }: {
|
|
228
220
|
config: UserConfig;
|
|
229
221
|
data: Partial<G["UserData"] | Data>;
|
|
230
|
-
globalData?: GlobalData;
|
|
231
222
|
metadata?: Metadata;
|
|
232
223
|
}): react_jsx_runtime.JSX.Element;
|
|
233
224
|
|
|
@@ -394,4 +385,4 @@ declare const outlinePlugin: () => Plugin;
|
|
|
394
385
|
|
|
395
386
|
declare const legacySideBarPlugin: () => Plugin;
|
|
396
387
|
|
|
397
|
-
export { Action, ActionBar, AutoField, Button, ComponentData, ComponentList, Config, Data, Drawer, DropZone, Editor, EditorAction, type EditorApi, Field, FieldLabel, FieldProps, FieldTransforms, type
|
|
388
|
+
export { Action, ActionBar, AutoField, Button, ComponentData, ComponentList, Config, Data, Drawer, DropZone, Editor, EditorAction, type EditorApi, Field, FieldLabel, FieldProps, FieldTransforms, type GlobalsMap, Group, IconButton, IframeConfig, InitialHistory, Label, Metadata, OnAction, Overrides, type PageMetadata, Permissions, Plugin, Render, ResolveDataTrigger, RichTextMenu, type Route, Separator, UiState, type UseEditorData, UserGenerics, Viewports, blocksPlugin, createUseEditor, fieldsPlugin, legacySideBarPlugin, outlinePlugin, pageMetadata, registerOverlayPortal, renderContext, setDeep, useEditor, useGetEditor };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { o as Field, p as FieldProps, q as DropZoneProps, C as Config, U as UserGenerics,
|
|
2
|
-
export { u as Adaptor, A as AppState, v as ArrayField, w as ArrayState, x as AsFieldProps, B as BaseData, y as BaseField, z as CacheOpts, l as ComponentConfig, G as ComponentConfigExtensions, J as ComponentConfigParams, K as ComponentDataMap, L as ComponentDataOptionalId, N as ComponentMetadata, Q as ConfigParams, a as Content, S as CustomField, T as CustomFieldRender, d as DefaultComponentProps, c as DefaultComponents, e as DefaultRootFieldProps, 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, n as RichtextField, ah as RootConfig, R as RootData, g 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 { 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, q as DropZoneProps, 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, r as InitialHistory, M as Metadata, h as ResolveDataTrigger, s as ItemSelector, b as ComponentData, t as PluginInternal } from './actions-CQmL3wwa.js';
|
|
2
|
+
export { u as Adaptor, A as AppState, v as ArrayField, w as ArrayState, x as AsFieldProps, B as BaseData, y as BaseField, z as CacheOpts, l as ComponentConfig, G as ComponentConfigExtensions, J as ComponentConfigParams, K as ComponentDataMap, L as ComponentDataOptionalId, N as ComponentMetadata, Q as ConfigParams, a as Content, S as CustomField, T as CustomFieldRender, d as DefaultComponentProps, c as DefaultComponents, e as DefaultRootFieldProps, 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, n as RichtextField, ah as RootConfig, R as RootData, g 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-CQmL3wwa.js';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-DxSkPLnl.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-_G46lHpL.js';
|
|
8
8
|
import '@tiptap/react';
|
|
9
9
|
import '@tiptap/extension-blockquote';
|
|
10
10
|
import '@tiptap/extension-bold';
|
|
@@ -22,18 +22,12 @@ import '@tiptap/extension-text-align';
|
|
|
22
22
|
import '@tiptap/extension-underline';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* Shared state for components whose config has `global: true`.
|
|
26
|
-
* component type.
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* There is exactly one entry per component type. Multiple named variants of
|
|
31
|
-
* the same component type are not supported in this shape — deliberately, to
|
|
32
|
-
* avoid introducing references / IDs.
|
|
25
|
+
* Shared state for components whose config has `global: true`. Lives inside
|
|
26
|
+
* `data.globals` and is keyed by component type. Instances opt in per-node
|
|
27
|
+
* via `synced: true`; synced instances render from this map (children + id
|
|
28
|
+
* stay extrinsic).
|
|
33
29
|
*/
|
|
34
|
-
type
|
|
35
|
-
props: Record<string, any>;
|
|
36
|
-
}>;
|
|
30
|
+
type GlobalsMap = NonNullable<Data["globals"]>;
|
|
37
31
|
|
|
38
32
|
/**
|
|
39
33
|
* A concrete page destination surfaced in the editor's page switcher.
|
|
@@ -167,10 +161,8 @@ type EditorProps<UserConfig extends Config = Config, G extends UserGenerics<User
|
|
|
167
161
|
children?: ReactNode;
|
|
168
162
|
config: UserConfig;
|
|
169
163
|
data: Partial<G["UserData"] | Data>;
|
|
170
|
-
globalData?: GlobalData;
|
|
171
164
|
ui?: Partial<UiState>;
|
|
172
165
|
onChange?: (data: G["UserData"]) => void;
|
|
173
|
-
onGlobalsChange?: (globalData: GlobalData) => void;
|
|
174
166
|
onPublish?: (data: G["UserData"]) => void;
|
|
175
167
|
onAction?: OnAction<G["UserData"]>;
|
|
176
168
|
permissions?: Partial<Permissions>;
|
|
@@ -224,10 +216,9 @@ declare const renderContext: react__default.Context<{
|
|
|
224
216
|
data: Data;
|
|
225
217
|
metadata: Metadata;
|
|
226
218
|
}>;
|
|
227
|
-
declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data,
|
|
219
|
+
declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data, metadata, }: {
|
|
228
220
|
config: UserConfig;
|
|
229
221
|
data: Partial<G["UserData"] | Data>;
|
|
230
|
-
globalData?: GlobalData;
|
|
231
222
|
metadata?: Metadata;
|
|
232
223
|
}): react_jsx_runtime.JSX.Element;
|
|
233
224
|
|
|
@@ -394,4 +385,4 @@ declare const outlinePlugin: () => Plugin;
|
|
|
394
385
|
|
|
395
386
|
declare const legacySideBarPlugin: () => Plugin;
|
|
396
387
|
|
|
397
|
-
export { Action, ActionBar, AutoField, Button, ComponentData, ComponentList, Config, Data, Drawer, DropZone, Editor, EditorAction, type EditorApi, Field, FieldLabel, FieldProps, FieldTransforms, type
|
|
388
|
+
export { Action, ActionBar, AutoField, Button, ComponentData, ComponentList, Config, Data, Drawer, DropZone, Editor, EditorAction, type EditorApi, Field, FieldLabel, FieldProps, FieldTransforms, type GlobalsMap, Group, IconButton, IframeConfig, InitialHistory, Label, Metadata, OnAction, Overrides, type PageMetadata, Permissions, Plugin, Render, ResolveDataTrigger, RichTextMenu, type Route, Separator, UiState, type UseEditorData, UserGenerics, Viewports, blocksPlugin, createUseEditor, fieldsPlugin, legacySideBarPlugin, outlinePlugin, pageMetadata, registerOverlayPortal, renderContext, setDeep, useEditor, useGetEditor };
|