@reacteditor/core 0.0.6 → 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.
Files changed (38) hide show
  1. package/dist/{Editor-YNFB7B6Z.mjs → Editor-OSAG52QF.mjs} +9 -9
  2. package/dist/{actions-CQmL3wwa.d.mts → actions-BDMhAtxP.d.mts} +2 -1
  3. package/dist/{actions-CQmL3wwa.d.ts → actions-BDMhAtxP.d.ts} +2 -1
  4. package/dist/{chunk-CRF2GWQA.mjs → chunk-AAK2555H.mjs} +3 -3
  5. package/dist/{chunk-6LG4Q4HO.mjs → chunk-EEQGJ6FH.mjs} +1 -1
  6. package/dist/{chunk-VOLQMQPK.mjs → chunk-IIRJMJFU.mjs} +1 -1
  7. package/dist/{chunk-BRDUM7MJ.mjs → chunk-JUC25FB7.mjs} +7 -7
  8. package/dist/{chunk-UB2DES2O.mjs → chunk-M4JDRFYB.mjs} +8 -6
  9. package/dist/{chunk-DB4R5IWG.mjs → chunk-RNRHREWH.mjs} +3 -3
  10. package/dist/{chunk-275EJPEB.mjs → chunk-TI3KC54Y.mjs} +18 -18
  11. package/dist/{chunk-HCFEY5Y7.mjs → chunk-W5I2Z7QS.mjs} +249 -24
  12. package/dist/{chunk-Z6IIVDFY.mjs → chunk-XI7YTBCP.mjs} +1 -1
  13. package/dist/{chunk-WGPCLAZR.mjs → chunk-ZLSPSBV3.mjs} +1 -1
  14. package/dist/{full-24FOTNTB.mjs → full-IHV5BO2L.mjs} +8 -8
  15. package/dist/{index-BOP2qNVA.d.mts → index-BwLKseT7.d.mts} +1 -1
  16. package/dist/{index-_G46lHpL.d.ts → index-DkYXZRPz.d.ts} +1 -1
  17. package/dist/index.d.mts +35 -8
  18. package/dist/index.d.ts +35 -8
  19. package/dist/index.js +284 -52
  20. package/dist/index.mjs +14 -14
  21. package/dist/internal.d.mts +2 -2
  22. package/dist/internal.d.ts +2 -2
  23. package/dist/internal.js +7 -5
  24. package/dist/internal.mjs +2 -2
  25. package/dist/{loaded-6NPDD7SF.mjs → loaded-3NPQWYKN.mjs} +5 -5
  26. package/dist/{loaded-BQVZGQG2.mjs → loaded-FTSXIONQ.mjs} +5 -5
  27. package/dist/{loaded-6IBSSOXD.mjs → loaded-YTQOQIUU.mjs} +5 -5
  28. package/dist/no-external.d.mts +4 -4
  29. package/dist/no-external.d.ts +4 -4
  30. package/dist/no-external.js +284 -52
  31. package/dist/no-external.mjs +14 -14
  32. package/dist/rsc.d.mts +2 -2
  33. package/dist/rsc.d.ts +2 -2
  34. package/dist/rsc.mjs +3 -3
  35. package/dist/{walk-tree-DxSkPLnl.d.ts → walk-tree-BweEZ37Y.d.ts} +1 -1
  36. package/dist/{walk-tree-Dwv3c_9M.d.mts → walk-tree-LcQXXDqe.d.mts} +1 -1
  37. package/package.json +1 -1
  38. package/dist/{chunk-GAUBBDIR.mjs → chunk-JIXMPJZA.mjs} +37 -37
@@ -1,6 +1,6 @@
1
1
  import { Reducer } from 'react';
2
- import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, E as EditorAction } from './actions-CQmL3wwa.mjs';
3
- import { A as AppStore } from './index-BOP2qNVA.mjs';
2
+ import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, E as EditorAction } from './actions-BDMhAtxP.mjs';
3
+ import { A as AppStore } from './index-BwLKseT7.mjs';
4
4
  import '@tiptap/react';
5
5
  import '@tiptap/extension-blockquote';
6
6
  import '@tiptap/extension-bold';
@@ -1,6 +1,6 @@
1
1
  import { Reducer } from 'react';
2
- import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, E as EditorAction } from './actions-CQmL3wwa.js';
3
- import { A as AppStore } from './index-_G46lHpL.js';
2
+ import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, E as EditorAction } from './actions-BDMhAtxP.js';
3
+ import { A as AppStore } from './index-DkYXZRPz.js';
4
4
  import '@tiptap/react';
5
5
  import '@tiptap/extension-blockquote';
6
6
  import '@tiptap/extension-bold';
package/dist/internal.js CHANGED
@@ -496,12 +496,14 @@ function insertAction(state, action, appStore) {
496
496
  const componentConfig = appStore.config.components[action.componentType];
497
497
  const isGlobalType = (componentConfig == null ? void 0 : componentConfig.global) === true;
498
498
  const defaultProps = (componentConfig == null ? void 0 : componentConfig.defaultProps) || {};
499
+ const sourceData = action.data ? __spreadProps(__spreadValues({}, action.data), { props: __spreadProps(__spreadValues({}, action.data.props), { id }) }) : __spreadValues({
500
+ type: action.componentType,
501
+ props: __spreadProps(__spreadValues({}, defaultProps), { id })
502
+ }, isGlobalType ? { synced: true } : {});
499
503
  const emptyComponentData = populateIds(
500
- __spreadValues({
501
- type: action.componentType,
502
- props: __spreadProps(__spreadValues({}, defaultProps), { id })
503
- }, isGlobalType ? { synced: true } : {}),
504
- appStore.config
504
+ sourceData,
505
+ appStore.config,
506
+ !!action.data
505
507
  );
506
508
  const [parentId] = action.destinationZone.split(":");
507
509
  const idsInPath = getIdsForParent(action.destinationZone, state);
package/dist/internal.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createReducer
3
- } from "./chunk-UB2DES2O.mjs";
4
- import "./chunk-GAUBBDIR.mjs";
3
+ } from "./chunk-M4JDRFYB.mjs";
4
+ import "./chunk-JIXMPJZA.mjs";
5
5
  import {
6
6
  init_react_import
7
7
  } from "./chunk-M6W7YEVX.mjs";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  useHeadingOptions
3
- } from "./chunk-6LG4Q4HO.mjs";
3
+ } from "./chunk-EEQGJ6FH.mjs";
4
4
  import {
5
5
  Heading,
6
6
  SelectControl,
7
7
  useControlContext
8
- } from "./chunk-CRF2GWQA.mjs";
9
- import "./chunk-UB2DES2O.mjs";
10
- import "./chunk-VOLQMQPK.mjs";
8
+ } from "./chunk-AAK2555H.mjs";
9
+ import "./chunk-M4JDRFYB.mjs";
10
+ import "./chunk-IIRJMJFU.mjs";
11
11
  import "./chunk-Y2EFNT5P.mjs";
12
- import "./chunk-GAUBBDIR.mjs";
12
+ import "./chunk-JIXMPJZA.mjs";
13
13
  import {
14
14
  init_react_import
15
15
  } from "./chunk-M6W7YEVX.mjs";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  useAlignOptions
3
- } from "./chunk-Z6IIVDFY.mjs";
3
+ } from "./chunk-XI7YTBCP.mjs";
4
4
  import {
5
5
  AlignLeft,
6
6
  SelectControl,
7
7
  useControlContext
8
- } from "./chunk-CRF2GWQA.mjs";
9
- import "./chunk-UB2DES2O.mjs";
10
- import "./chunk-VOLQMQPK.mjs";
8
+ } from "./chunk-AAK2555H.mjs";
9
+ import "./chunk-M4JDRFYB.mjs";
10
+ import "./chunk-IIRJMJFU.mjs";
11
11
  import "./chunk-Y2EFNT5P.mjs";
12
- import "./chunk-GAUBBDIR.mjs";
12
+ import "./chunk-JIXMPJZA.mjs";
13
13
  import {
14
14
  init_react_import
15
15
  } from "./chunk-M6W7YEVX.mjs";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  useListOptions
3
- } from "./chunk-WGPCLAZR.mjs";
3
+ } from "./chunk-ZLSPSBV3.mjs";
4
4
  import {
5
5
  List,
6
6
  SelectControl,
7
7
  useControlContext
8
- } from "./chunk-CRF2GWQA.mjs";
9
- import "./chunk-UB2DES2O.mjs";
10
- import "./chunk-VOLQMQPK.mjs";
8
+ } from "./chunk-AAK2555H.mjs";
9
+ import "./chunk-M4JDRFYB.mjs";
10
+ import "./chunk-IIRJMJFU.mjs";
11
11
  import "./chunk-Y2EFNT5P.mjs";
12
- import "./chunk-GAUBBDIR.mjs";
12
+ import "./chunk-JIXMPJZA.mjs";
13
13
  import {
14
14
  init_react_import
15
15
  } from "./chunk-M6W7YEVX.mjs";
@@ -1,6 +1,6 @@
1
- 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, b as ComponentData, K as ComponentDataMap, L as ComponentDataOptionalId, N as ComponentMetadata, C as Config, Q as ConfigParams, a as Content, S as CustomField, T as CustomFieldRender, D as Data, d as DefaultComponentProps, c as DefaultComponents, e as DefaultRootFieldProps, X as DefaultRootProps, Y as DefaultRootRenderProps, Z as Direction, _ as DragAxis, E as EditorAction, $ as EditorComponent, a0 as EditorContext, a1 as EditorMetadata, a2 as ExternalField, a3 as ExternalFieldWithAdaptor, a4 as ExtractConfigParams, a5 as ExtractField, o as Field, a6 as FieldMetadata, p as FieldProps, a7 as FieldRenderFunctions, a8 as FieldTransformFn, a9 as FieldTransformFnParams, m as FieldTransforms, F as Fields, H as History, I as IframeConfig, r as InitialHistory, aa as ItemWithId, ab as MappedItem, M as Metadata, ac as NumberField, ad as ObjectField, O as OnAction, ae as OverrideKey, j as Overrides, f as Permissions, i as Plugin, af as RadioField, h as ResolveDataTrigger, 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, k as UiState, U as UserGenerics, ap as Viewport, V as Viewports, aq as WithChildren, ar as WithEditorProps, W as WithId, as as WithSlotProps, at as overrideKeys } from './actions-CQmL3wwa.mjs';
2
- export { Action, ActionBar, AutoField, Button, ComponentList, Drawer, DropZone, Editor, EditorApi, FieldLabel, GlobalsMap, Group, IconButton, Label, PageMetadata, Render, RichTextMenu, Route, Separator, UseEditorData, blocksPlugin, createUseEditor, fieldsPlugin, legacySideBarPlugin, outlinePlugin, pageMetadata, registerOverlayPortal, renderContext, setDeep, useEditor, useGetEditor } from './index.mjs';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Dwv3c_9M.mjs';
1
+ 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, b as ComponentData, J as ComponentDataMap, K as ComponentDataOptionalId, L as ComponentMetadata, C as Config, N as ConfigParams, a as Content, Q as CustomField, S as CustomFieldRender, D as Data, d as DefaultComponentProps, c as DefaultComponents, e as DefaultRootFieldProps, T as DefaultRootProps, X as DefaultRootRenderProps, Y as Direction, Z as DragAxis, E as EditorAction, _ as EditorComponent, $ as EditorContext, a0 as EditorMetadata, a1 as ExternalField, a2 as ExternalFieldWithAdaptor, a3 as ExtractConfigParams, a4 as ExtractField, o as Field, a5 as FieldMetadata, p as FieldProps, a6 as FieldRenderFunctions, a7 as FieldTransformFn, a8 as FieldTransformFnParams, m as FieldTransforms, F as Fields, H as History, I as IframeConfig, q as InitialHistory, a9 as ItemWithId, aa as MappedItem, M as Metadata, ab as NumberField, ac as ObjectField, O as OnAction, ad as OverrideKey, j as Overrides, f as Permissions, i as Plugin, ae as RadioField, h as ResolveDataTrigger, 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, k as UiState, U as UserGenerics, ao as Viewport, V as Viewports, ap as WithChildren, aq as WithEditorProps, W as WithId, ar as WithSlotProps, as as overrideKeys } from './actions-BDMhAtxP.mjs';
2
+ export { Action, ActionBar, AutoField, Button, ComponentList, Drawer, Editor, EditorApi, EditorCommands, FieldLabel, GlobalsMap, Group, IconButton, InsertComponentArgs, Label, MoveDestination, PageMetadata, Parent, Render, RichTextMenu, Route, Separator, UseEditorData, blocksPlugin, createUseEditor, fieldsPlugin, legacySideBarPlugin, outlinePlugin, pageMetadata, registerOverlayPortal, renderContext, setDeep, useEditor, useGetEditor, usePropsContext } from './index.mjs';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-LcQXXDqe.mjs';
4
4
  import 'react';
5
5
  import '@tiptap/react';
6
6
  import '@tiptap/extension-blockquote';
@@ -18,4 +18,4 @@ import '@tiptap/extension-strike';
18
18
  import '@tiptap/extension-text-align';
19
19
  import '@tiptap/extension-underline';
20
20
  import 'react/jsx-runtime';
21
- import './index-BOP2qNVA.mjs';
21
+ import './index-BwLKseT7.mjs';
@@ -1,6 +1,6 @@
1
- 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, b as ComponentData, K as ComponentDataMap, L as ComponentDataOptionalId, N as ComponentMetadata, C as Config, Q as ConfigParams, a as Content, S as CustomField, T as CustomFieldRender, D as Data, d as DefaultComponentProps, c as DefaultComponents, e as DefaultRootFieldProps, X as DefaultRootProps, Y as DefaultRootRenderProps, Z as Direction, _ as DragAxis, E as EditorAction, $ as EditorComponent, a0 as EditorContext, a1 as EditorMetadata, a2 as ExternalField, a3 as ExternalFieldWithAdaptor, a4 as ExtractConfigParams, a5 as ExtractField, o as Field, a6 as FieldMetadata, p as FieldProps, a7 as FieldRenderFunctions, a8 as FieldTransformFn, a9 as FieldTransformFnParams, m as FieldTransforms, F as Fields, H as History, I as IframeConfig, r as InitialHistory, aa as ItemWithId, ab as MappedItem, M as Metadata, ac as NumberField, ad as ObjectField, O as OnAction, ae as OverrideKey, j as Overrides, f as Permissions, i as Plugin, af as RadioField, h as ResolveDataTrigger, 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, k as UiState, U as UserGenerics, ap as Viewport, V as Viewports, aq as WithChildren, ar as WithEditorProps, W as WithId, as as WithSlotProps, at as overrideKeys } from './actions-CQmL3wwa.js';
2
- export { Action, ActionBar, AutoField, Button, ComponentList, Drawer, DropZone, Editor, EditorApi, FieldLabel, GlobalsMap, Group, IconButton, Label, PageMetadata, Render, RichTextMenu, Route, Separator, UseEditorData, blocksPlugin, createUseEditor, fieldsPlugin, legacySideBarPlugin, outlinePlugin, pageMetadata, registerOverlayPortal, renderContext, setDeep, useEditor, useGetEditor } from './index.js';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-DxSkPLnl.js';
1
+ 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, b as ComponentData, J as ComponentDataMap, K as ComponentDataOptionalId, L as ComponentMetadata, C as Config, N as ConfigParams, a as Content, Q as CustomField, S as CustomFieldRender, D as Data, d as DefaultComponentProps, c as DefaultComponents, e as DefaultRootFieldProps, T as DefaultRootProps, X as DefaultRootRenderProps, Y as Direction, Z as DragAxis, E as EditorAction, _ as EditorComponent, $ as EditorContext, a0 as EditorMetadata, a1 as ExternalField, a2 as ExternalFieldWithAdaptor, a3 as ExtractConfigParams, a4 as ExtractField, o as Field, a5 as FieldMetadata, p as FieldProps, a6 as FieldRenderFunctions, a7 as FieldTransformFn, a8 as FieldTransformFnParams, m as FieldTransforms, F as Fields, H as History, I as IframeConfig, q as InitialHistory, a9 as ItemWithId, aa as MappedItem, M as Metadata, ab as NumberField, ac as ObjectField, O as OnAction, ad as OverrideKey, j as Overrides, f as Permissions, i as Plugin, ae as RadioField, h as ResolveDataTrigger, 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, k as UiState, U as UserGenerics, ao as Viewport, V as Viewports, ap as WithChildren, aq as WithEditorProps, W as WithId, ar as WithSlotProps, as as overrideKeys } from './actions-BDMhAtxP.js';
2
+ export { Action, ActionBar, AutoField, Button, ComponentList, Drawer, Editor, EditorApi, EditorCommands, FieldLabel, GlobalsMap, Group, IconButton, InsertComponentArgs, Label, MoveDestination, PageMetadata, Parent, Render, RichTextMenu, Route, Separator, UseEditorData, blocksPlugin, createUseEditor, fieldsPlugin, legacySideBarPlugin, outlinePlugin, pageMetadata, registerOverlayPortal, renderContext, setDeep, useEditor, useGetEditor, usePropsContext } from './index.js';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BweEZ37Y.js';
4
4
  import 'react';
5
5
  import '@tiptap/react';
6
6
  import '@tiptap/extension-blockquote';
@@ -18,4 +18,4 @@ import '@tiptap/extension-strike';
18
18
  import '@tiptap/extension-text-align';
19
19
  import '@tiptap/extension-underline';
20
20
  import 'react/jsx-runtime';
21
- import './index-_G46lHpL.js';
21
+ import './index-DkYXZRPz.js';