@puckeditor/core 0.21.2-canary.edc81920 → 0.21.2

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 (33) hide show
  1. package/dist/{Editor-JHS34JLP.mjs → Editor-EPSED64A.mjs} +6 -6
  2. package/dist/{actions-BRYM0ifH.d.mts → actions-C3e2nJ9v.d.mts} +1 -1
  3. package/dist/{actions-BRYM0ifH.d.ts → actions-C3e2nJ9v.d.ts} +1 -1
  4. package/dist/{chunk-AFOEZCNE.mjs → chunk-22UJFAFA.mjs} +35 -37
  5. package/dist/{chunk-JGZBBNEW.mjs → chunk-BCL7VBTL.mjs} +1 -1
  6. package/dist/{chunk-46RDHJGL.mjs → chunk-G74MZKKD.mjs} +7 -7
  7. package/dist/{chunk-BSAENBPL.mjs → chunk-K23YHISE.mjs} +1 -1
  8. package/dist/{chunk-LBGOSTI5.mjs → chunk-PK2F2YZX.mjs} +1128 -633
  9. package/dist/{chunk-TVE6QYBR.mjs → chunk-U6THAD4G.mjs} +1 -1
  10. package/dist/{chunk-GYDP2UKB.mjs → chunk-WCC2G7U7.mjs} +3 -3
  11. package/dist/{full-ATSD2DNB.mjs → full-N67EAB2Q.mjs} +5 -5
  12. package/dist/{index-D_Idfrfb.d.ts → index-Cx46WIFC.d.ts} +9 -10
  13. package/dist/{index-BVLGipsj.d.mts → index-zHrchQGY.d.mts} +9 -10
  14. package/dist/index.d.mts +5 -4
  15. package/dist/index.d.ts +5 -4
  16. package/dist/index.js +1192 -717
  17. package/dist/index.mjs +7 -7
  18. package/dist/internal.d.mts +2 -2
  19. package/dist/internal.d.ts +2 -2
  20. package/dist/{loaded-BKAMJ2FS.mjs → loaded-F37CNCVG.mjs} +2 -2
  21. package/dist/{loaded-2765LE3N.mjs → loaded-H325ZSK5.mjs} +2 -2
  22. package/dist/{loaded-ANEJLSYJ.mjs → loaded-MIY725CK.mjs} +2 -2
  23. package/dist/no-external.d.mts +3 -3
  24. package/dist/no-external.d.ts +3 -3
  25. package/dist/no-external.js +1192 -717
  26. package/dist/no-external.mjs +7 -7
  27. package/dist/rsc.d.mts +2 -2
  28. package/dist/rsc.d.ts +2 -2
  29. package/dist/rsc.js +42 -24
  30. package/dist/rsc.mjs +42 -24
  31. package/dist/{walk-tree-C1Zdgx7d.d.mts → walk-tree-BJoNgZ0l.d.mts} +1 -1
  32. package/dist/{walk-tree-DQyC1GA7.d.ts → walk-tree-f8Yzs5o3.d.ts} +1 -1
  33. package/package.json +2 -1
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  List,
3
3
  ListOrdered
4
- } from "./chunk-AFOEZCNE.mjs";
4
+ } from "./chunk-22UJFAFA.mjs";
5
5
  import {
6
6
  init_react_import
7
7
  } from "./chunk-M6W7YEVX.mjs";
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-AOEDIUVK.mjs";
4
4
  import {
5
5
  LoadedRichTextMenuInner
6
- } from "./chunk-46RDHJGL.mjs";
6
+ } from "./chunk-G74MZKKD.mjs";
7
7
  import {
8
8
  useAppStore,
9
9
  useAppStoreApi
10
- } from "./chunk-AFOEZCNE.mjs";
10
+ } from "./chunk-22UJFAFA.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-ATSD2DNB.mjs").then((m) => ({
103
+ () => import("./full-N67EAB2Q.mjs").then((m) => ({
104
104
  default: m.LoadedRichTextMenuFull
105
105
  }))
106
106
  );
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  LoadedRichTextMenuInner
3
- } from "./chunk-46RDHJGL.mjs";
4
- import "./chunk-JGZBBNEW.mjs";
5
- import "./chunk-BSAENBPL.mjs";
6
- import "./chunk-TVE6QYBR.mjs";
7
- import "./chunk-AFOEZCNE.mjs";
3
+ } from "./chunk-G74MZKKD.mjs";
4
+ import "./chunk-BCL7VBTL.mjs";
5
+ import "./chunk-K23YHISE.mjs";
6
+ import "./chunk-U6THAD4G.mjs";
7
+ import "./chunk-22UJFAFA.mjs";
8
8
  import "./chunk-YLLE6KXH.mjs";
9
9
  import "./chunk-BOKX3EBR.mjs";
10
10
  import "./chunk-Y2EFNT5P.mjs";
@@ -1,4 +1,4 @@
1
- import { H as History, g as Permissions, c as ComponentData, C as Config, U as UserGenerics, F as Fields, a as PuckAction, h as RootDataWithProps, i as ResolveDataTrigger, j as Plugin, k as Overrides, V as Viewports, I as IframeConfig, l as UiState, m as ComponentConfig, A as AppState, M as Metadata, n as FieldTransforms, o as RichtextField } from './actions-BRYM0ifH.js';
1
+ import { H as History, g as Permissions, c as ComponentData, C as Config, U as UserGenerics, F as Fields, a as PuckAction, h as RootDataWithProps, i as ResolveDataTrigger, j as Plugin, k as Overrides, V as Viewports, I as IframeConfig, l as UiState, m as ComponentConfig, A as AppState, M as Metadata, n as FieldTransforms, o as RichtextField } from './actions-C3e2nJ9v.js';
2
2
  import { Editor } from '@tiptap/react';
3
3
 
4
4
  type HistorySlice<D = any> = {
@@ -17,20 +17,17 @@ type HistorySlice<D = any> = {
17
17
  initialAppState: D;
18
18
  };
19
19
 
20
- type NodeMethods = {
20
+ type NodeHandle = {
21
21
  sync: () => void;
22
22
  hideOverlay: () => void;
23
23
  showOverlay: () => void;
24
24
  };
25
- type PuckNodeInstance = {
26
- id: string;
27
- methods: NodeMethods;
28
- element: HTMLElement | null;
29
- };
30
25
  type NodesSlice = {
31
- nodes: Record<string, PuckNodeInstance | undefined>;
32
- registerNode: (id: string, node: Partial<PuckNodeInstance>) => void;
33
- unregisterNode: (id: string, node?: Partial<PuckNodeInstance>) => void;
26
+ registerNode: (id: string, handle: NodeHandle) => void;
27
+ unregisterNode: (id: string) => void;
28
+ syncNode: (id?: string | null) => void;
29
+ syncNodes: (ids: Array<string | null | undefined>) => void;
30
+ setOverlayVisible: (id: string | null | undefined, visible: boolean) => void;
34
31
  };
35
32
 
36
33
  type PermissionsArgs<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
@@ -95,6 +92,8 @@ type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserCon
95
92
  status: Status;
96
93
  setStatus: (status: Status) => void;
97
94
  iframe: IframeConfig;
95
+ _experimentalFullScreenCanvas: boolean;
96
+ _experimentalVirtualization: boolean;
98
97
  selectedItem?: G["UserData"]["content"][0] | null;
99
98
  getCurrentData: () => G["UserData"]["content"][0] | G["UserData"]["root"];
100
99
  setUi: (ui: Partial<UiState>, recordHistory?: boolean) => void;
@@ -1,4 +1,4 @@
1
- import { H as History, g as Permissions, c as ComponentData, C as Config, U as UserGenerics, F as Fields, a as PuckAction, h as RootDataWithProps, i as ResolveDataTrigger, j as Plugin, k as Overrides, V as Viewports, I as IframeConfig, l as UiState, m as ComponentConfig, A as AppState, M as Metadata, n as FieldTransforms, o as RichtextField } from './actions-BRYM0ifH.mjs';
1
+ import { H as History, g as Permissions, c as ComponentData, C as Config, U as UserGenerics, F as Fields, a as PuckAction, h as RootDataWithProps, i as ResolveDataTrigger, j as Plugin, k as Overrides, V as Viewports, I as IframeConfig, l as UiState, m as ComponentConfig, A as AppState, M as Metadata, n as FieldTransforms, o as RichtextField } from './actions-C3e2nJ9v.mjs';
2
2
  import { Editor } from '@tiptap/react';
3
3
 
4
4
  type HistorySlice<D = any> = {
@@ -17,20 +17,17 @@ type HistorySlice<D = any> = {
17
17
  initialAppState: D;
18
18
  };
19
19
 
20
- type NodeMethods = {
20
+ type NodeHandle = {
21
21
  sync: () => void;
22
22
  hideOverlay: () => void;
23
23
  showOverlay: () => void;
24
24
  };
25
- type PuckNodeInstance = {
26
- id: string;
27
- methods: NodeMethods;
28
- element: HTMLElement | null;
29
- };
30
25
  type NodesSlice = {
31
- nodes: Record<string, PuckNodeInstance | undefined>;
32
- registerNode: (id: string, node: Partial<PuckNodeInstance>) => void;
33
- unregisterNode: (id: string, node?: Partial<PuckNodeInstance>) => void;
26
+ registerNode: (id: string, handle: NodeHandle) => void;
27
+ unregisterNode: (id: string) => void;
28
+ syncNode: (id?: string | null) => void;
29
+ syncNodes: (ids: Array<string | null | undefined>) => void;
30
+ setOverlayVisible: (id: string | null | undefined, visible: boolean) => void;
34
31
  };
35
32
 
36
33
  type PermissionsArgs<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
@@ -95,6 +92,8 @@ type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserCon
95
92
  status: Status;
96
93
  setStatus: (status: Status) => void;
97
94
  iframe: IframeConfig;
95
+ _experimentalFullScreenCanvas: boolean;
96
+ _experimentalVirtualization: boolean;
98
97
  selectedItem?: G["UserData"]["content"][0] | null;
99
98
  getCurrentData: () => G["UserData"]["content"][0] | G["UserData"]["root"];
100
99
  setUi: (ui: Partial<UiState>, recordHistory?: boolean) => void;
package/dist/index.d.mts CHANGED
@@ -1,10 +1,10 @@
1
- import { p as Field, q as FieldProps, r as DropZoneProps, C as Config, U as UserGenerics, D as Data, l as UiState, O as OnAction, g as Permissions, j as Plugin, k as Overrides, n as FieldTransforms, a as PuckAction, V as Viewports, I as IframeConfig, s as InitialHistory, M as Metadata, i as ResolveDataTrigger, t as ItemSelector, c as ComponentData, u as PluginInternal } from './actions-BRYM0ifH.mjs';
2
- export { v as Adaptor, A as AppState, w as ArrayField, x as ArrayState, y as AsFieldProps, B as BaseData, z as BaseField, E as CacheOpts, m as ComponentConfig, G as ComponentConfigExtensions, J as ComponentConfigParams, K as ComponentDataMap, L as ComponentDataOptionalId, N as ComponentMetadata, Q as ConfigParams, b as Content, S as CustomField, T as CustomFieldRender, e as DefaultComponentProps, d as DefaultComponents, f as DefaultRootFieldProps, X as DefaultRootProps, Y as DefaultRootRenderProps, Z as Direction, _ as DragAxis, $ as ExternalField, a0 as ExternalFieldWithAdaptor, a1 as ExtractConfigParams, a2 as ExtractField, a3 as FieldMetadata, a4 as FieldRenderFunctions, a5 as FieldTransformFn, a6 as FieldTransformFnParams, F as Fields, H as History, a7 as ItemWithId, a8 as MappedItem, a9 as NumberField, aa as ObjectField, ab as OverrideKey, ac as PuckComponent, ad as PuckContext, ae as PuckMetadata, af as RadioField, ag as RichText, o as RichtextField, ah as RootConfig, R as RootData, h 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, W as WithId, ar as WithPuckProps, as as WithSlotProps, at as overrideKeys } from './actions-BRYM0ifH.mjs';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-C1Zdgx7d.mjs';
1
+ import { p as Field, q as FieldProps, r as DropZoneProps, C as Config, U as UserGenerics, D as Data, l as UiState, O as OnAction, g as Permissions, j as Plugin, k as Overrides, n as FieldTransforms, a as PuckAction, V as Viewports, I as IframeConfig, s as InitialHistory, M as Metadata, i as ResolveDataTrigger, t as ItemSelector, c as ComponentData, u as PluginInternal } from './actions-C3e2nJ9v.mjs';
2
+ export { v as Adaptor, A as AppState, w as ArrayField, x as ArrayState, y as AsFieldProps, B as BaseData, z as BaseField, E as CacheOpts, m as ComponentConfig, G as ComponentConfigExtensions, J as ComponentConfigParams, K as ComponentDataMap, L as ComponentDataOptionalId, N as ComponentMetadata, Q as ConfigParams, b as Content, S as CustomField, T as CustomFieldRender, e as DefaultComponentProps, d as DefaultComponents, f as DefaultRootFieldProps, X as DefaultRootProps, Y as DefaultRootRenderProps, Z as Direction, _ as DragAxis, $ as ExternalField, a0 as ExternalFieldWithAdaptor, a1 as ExtractConfigParams, a2 as ExtractField, a3 as FieldMetadata, a4 as FieldRenderFunctions, a5 as FieldTransformFn, a6 as FieldTransformFnParams, F as Fields, H as History, a7 as ItemWithId, a8 as MappedItem, a9 as NumberField, aa as ObjectField, ab as OverrideKey, ac as PuckComponent, ad as PuckContext, ae as PuckMetadata, af as RadioField, ag as RichText, o as RichtextField, ah as RootConfig, R as RootData, h 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, W as WithId, ar as WithPuckProps, as as WithSlotProps, at as overrideKeys } from './actions-C3e2nJ9v.mjs';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BJoNgZ0l.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-BVLGipsj.mjs';
7
+ import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-zHrchQGY.mjs';
8
8
  import '@tiptap/react';
9
9
  import '@tiptap/extension-blockquote';
10
10
  import '@tiptap/extension-bold';
@@ -152,6 +152,7 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
152
152
  metadata?: Metadata;
153
153
  height?: CSSProperties["height"];
154
154
  _experimentalFullScreenCanvas?: boolean;
155
+ _experimentalVirtualization?: boolean;
155
156
  };
156
157
  declare function Puck<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: PuckProps<UserConfig>): react_jsx_runtime.JSX.Element;
157
158
  declare namespace Puck {
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { p as Field, q as FieldProps, r as DropZoneProps, C as Config, U as UserGenerics, D as Data, l as UiState, O as OnAction, g as Permissions, j as Plugin, k as Overrides, n as FieldTransforms, a as PuckAction, V as Viewports, I as IframeConfig, s as InitialHistory, M as Metadata, i as ResolveDataTrigger, t as ItemSelector, c as ComponentData, u as PluginInternal } from './actions-BRYM0ifH.js';
2
- export { v as Adaptor, A as AppState, w as ArrayField, x as ArrayState, y as AsFieldProps, B as BaseData, z as BaseField, E as CacheOpts, m as ComponentConfig, G as ComponentConfigExtensions, J as ComponentConfigParams, K as ComponentDataMap, L as ComponentDataOptionalId, N as ComponentMetadata, Q as ConfigParams, b as Content, S as CustomField, T as CustomFieldRender, e as DefaultComponentProps, d as DefaultComponents, f as DefaultRootFieldProps, X as DefaultRootProps, Y as DefaultRootRenderProps, Z as Direction, _ as DragAxis, $ as ExternalField, a0 as ExternalFieldWithAdaptor, a1 as ExtractConfigParams, a2 as ExtractField, a3 as FieldMetadata, a4 as FieldRenderFunctions, a5 as FieldTransformFn, a6 as FieldTransformFnParams, F as Fields, H as History, a7 as ItemWithId, a8 as MappedItem, a9 as NumberField, aa as ObjectField, ab as OverrideKey, ac as PuckComponent, ad as PuckContext, ae as PuckMetadata, af as RadioField, ag as RichText, o as RichtextField, ah as RootConfig, R as RootData, h 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, W as WithId, ar as WithPuckProps, as as WithSlotProps, at as overrideKeys } from './actions-BRYM0ifH.js';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-DQyC1GA7.js';
1
+ import { p as Field, q as FieldProps, r as DropZoneProps, C as Config, U as UserGenerics, D as Data, l as UiState, O as OnAction, g as Permissions, j as Plugin, k as Overrides, n as FieldTransforms, a as PuckAction, V as Viewports, I as IframeConfig, s as InitialHistory, M as Metadata, i as ResolveDataTrigger, t as ItemSelector, c as ComponentData, u as PluginInternal } from './actions-C3e2nJ9v.js';
2
+ export { v as Adaptor, A as AppState, w as ArrayField, x as ArrayState, y as AsFieldProps, B as BaseData, z as BaseField, E as CacheOpts, m as ComponentConfig, G as ComponentConfigExtensions, J as ComponentConfigParams, K as ComponentDataMap, L as ComponentDataOptionalId, N as ComponentMetadata, Q as ConfigParams, b as Content, S as CustomField, T as CustomFieldRender, e as DefaultComponentProps, d as DefaultComponents, f as DefaultRootFieldProps, X as DefaultRootProps, Y as DefaultRootRenderProps, Z as Direction, _ as DragAxis, $ as ExternalField, a0 as ExternalFieldWithAdaptor, a1 as ExtractConfigParams, a2 as ExtractField, a3 as FieldMetadata, a4 as FieldRenderFunctions, a5 as FieldTransformFn, a6 as FieldTransformFnParams, F as Fields, H as History, a7 as ItemWithId, a8 as MappedItem, a9 as NumberField, aa as ObjectField, ab as OverrideKey, ac as PuckComponent, ad as PuckContext, ae as PuckMetadata, af as RadioField, ag as RichText, o as RichtextField, ah as RootConfig, R as RootData, h 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, W as WithId, ar as WithPuckProps, as as WithSlotProps, at as overrideKeys } from './actions-C3e2nJ9v.js';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-f8Yzs5o3.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-D_Idfrfb.js';
7
+ import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-Cx46WIFC.js';
8
8
  import '@tiptap/react';
9
9
  import '@tiptap/extension-blockquote';
10
10
  import '@tiptap/extension-bold';
@@ -152,6 +152,7 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
152
152
  metadata?: Metadata;
153
153
  height?: CSSProperties["height"];
154
154
  _experimentalFullScreenCanvas?: boolean;
155
+ _experimentalVirtualization?: boolean;
155
156
  };
156
157
  declare function Puck<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: PuckProps<UserConfig>): react_jsx_runtime.JSX.Element;
157
158
  declare namespace Puck {