@puckeditor/core 0.22.4 → 0.23.0-canary.026f0300
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-ZZW3KF2T.css → Editor-T7TKW6NT.css} +7 -7
- package/dist/{Editor-MLHOIEVM.mjs → Editor-Z6P5UAVB.mjs} +8 -8
- package/dist/{actions-Csn3gOP8.d.mts → actions-3w-1VzY_.d.mts} +7 -1
- package/dist/{actions-Csn3gOP8.d.ts → actions-3w-1VzY_.d.ts} +7 -1
- package/dist/{chunk-25O24MZR.mjs → chunk-3OLRWMRO.mjs} +37 -22
- package/dist/{chunk-JNJJ2M57.mjs → chunk-3TERNOIP.mjs} +1 -1
- package/dist/{chunk-KJQTOPIV.mjs → chunk-DIYX54ZO.mjs} +136 -7
- package/dist/{chunk-4I2WN43X.mjs → chunk-L73ATZ55.mjs} +15 -8
- package/dist/{chunk-WUO7D6OQ.mjs → chunk-NPAYGEG5.mjs} +1 -0
- package/dist/{chunk-C2H4WQP2.mjs → chunk-OCFR2FFG.mjs} +27 -12
- package/dist/{chunk-NKDMBWQC.mjs → chunk-OSPG5CWL.mjs} +21 -10
- package/dist/{chunk-PRZEIT36.mjs → chunk-PJYHZPJK.mjs} +3 -3
- package/dist/{chunk-WH6PO5ND.mjs → chunk-S3CSGIQ3.mjs} +2047 -797
- package/dist/{chunk-25QAPMLH.mjs → chunk-UAWUZ45G.mjs} +41 -18
- package/dist/{full-YXSOFDYM.mjs → full-67VCA5MX.mjs} +7 -7
- package/dist/{full-S3QQ2IBQ.css → full-AAZK6KLI.css} +7 -7
- package/dist/index-KWLAZybR.d.ts +206 -0
- package/dist/index-l1l-a8tj.d.mts +206 -0
- package/dist/index.css +308 -111
- package/dist/index.d.mts +24 -11
- package/dist/index.d.ts +24 -11
- package/dist/index.js +2352 -809
- package/dist/index.mjs +10 -10
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +40 -18
- package/dist/internal.mjs +1 -1
- package/dist/{loaded-LMF4JLYG.mjs → loaded-4XVG2RKQ.mjs} +4 -4
- package/dist/{loaded-FVWRAJR3.css → loaded-CA3Q7UHH.css} +7 -7
- package/dist/{loaded-IFFZACEG.mjs → loaded-LM723CWI.mjs} +4 -4
- package/dist/{loaded-SJJPEREQ.mjs → loaded-VBJBTUSI.mjs} +4 -4
- package/dist/no-external.css +308 -111
- package/dist/no-external.d.mts +4 -4
- package/dist/no-external.d.ts +4 -4
- package/dist/no-external.js +2352 -809
- package/dist/no-external.mjs +10 -10
- 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-CWrsBHHe.d.ts → walk-tree-ConR82Y6.d.ts} +1 -1
- package/dist/{walk-tree-BrW9VQ_t.d.mts → walk-tree-DJMo6GTF.d.mts} +1 -1
- package/package.json +1 -1
- package/dist/index-B1b1cFug.d.ts +0 -117
- package/dist/index-ClzBCbx_.d.mts +0 -117
package/dist/no-external.mjs
CHANGED
|
@@ -17,20 +17,20 @@ import {
|
|
|
17
17
|
setDeep,
|
|
18
18
|
useGetPuck,
|
|
19
19
|
usePuck
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-S3CSGIQ3.mjs";
|
|
21
|
+
import "./chunk-PJYHZPJK.mjs";
|
|
22
22
|
import {
|
|
23
23
|
migrate,
|
|
24
24
|
resolveAllData,
|
|
25
25
|
transformProps
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-3TERNOIP.mjs";
|
|
27
27
|
import "./chunk-H635BA2V.mjs";
|
|
28
28
|
import {
|
|
29
29
|
RichTextMenu
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
30
|
+
} from "./chunk-3OLRWMRO.mjs";
|
|
31
|
+
import "./chunk-OSPG5CWL.mjs";
|
|
32
|
+
import "./chunk-OCFR2FFG.mjs";
|
|
33
|
+
import "./chunk-L73ATZ55.mjs";
|
|
34
34
|
import {
|
|
35
35
|
Action,
|
|
36
36
|
ActionBar,
|
|
@@ -38,9 +38,9 @@ import {
|
|
|
38
38
|
IconButton,
|
|
39
39
|
Label,
|
|
40
40
|
Separator
|
|
41
|
-
} from "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
41
|
+
} from "./chunk-DIYX54ZO.mjs";
|
|
42
|
+
import "./chunk-UAWUZ45G.mjs";
|
|
43
|
+
import "./chunk-NPAYGEG5.mjs";
|
|
44
44
|
import "./chunk-Y2EFNT5P.mjs";
|
|
45
45
|
import {
|
|
46
46
|
walkTree
|
package/dist/rsc.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { m as Config,
|
|
3
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
2
|
+
import { m as Config, an as UserGenerics, W as Metadata } from './actions-3w-1VzY_.mjs';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-DJMo6GTF.mjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@tiptap/react';
|
|
6
6
|
import '@tiptap/extension-blockquote';
|
package/dist/rsc.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { m as Config,
|
|
3
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
2
|
+
import { m as Config, an as UserGenerics, W as Metadata } from './actions-3w-1VzY_.js';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-ConR82Y6.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@tiptap/react';
|
|
6
6
|
import '@tiptap/extension-blockquote';
|
package/dist/rsc.js
CHANGED
package/dist/rsc.mjs
CHANGED
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
transformProps,
|
|
6
6
|
useRichtextProps,
|
|
7
7
|
useSlots
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3TERNOIP.mjs";
|
|
9
9
|
import "./chunk-H635BA2V.mjs";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-NPAYGEG5.mjs";
|
|
11
11
|
import "./chunk-Y2EFNT5P.mjs";
|
|
12
12
|
import {
|
|
13
13
|
rootAreaId,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as Config, D as Data,
|
|
1
|
+
import { m as Config, D as Data, ar as WithId, an as UserGenerics, o as Content, i as ComponentData, s as DefaultComponents, r as DefaultComponentProps, t as DefaultRootFieldProps, W as Metadata, ad as RootData } from './actions-3w-1VzY_.js';
|
|
2
2
|
|
|
3
3
|
type MigrationOptions<UserConfig extends Config> = {
|
|
4
4
|
migrateDynamicZonesForComponent?: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as Config, D as Data,
|
|
1
|
+
import { m as Config, D as Data, ar as WithId, an as UserGenerics, o as Content, i as ComponentData, s as DefaultComponents, r as DefaultComponentProps, t as DefaultRootFieldProps, W as Metadata, ad as RootData } from './actions-3w-1VzY_.mjs';
|
|
2
2
|
|
|
3
3
|
type MigrationOptions<UserConfig extends Config> = {
|
|
4
4
|
migrateDynamicZonesForComponent?: {
|
package/package.json
CHANGED
package/dist/index-B1b1cFug.d.ts
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { P as History, $ as Permissions, i as ComponentData, m as Config, am as UserGenerics, O as Fields, a3 as PuckAction, ad as RootDataWithProps, a8 as ResolveDataTrigger, a0 as Plugin, _ as Overrides, ao as Viewports, Q as IframeConfig, al as UiState, f as ComponentConfig, a as AppState, V as Metadata, N as FieldTransforms, aa as RichtextField } from './actions-Csn3gOP8.js';
|
|
2
|
-
import { Editor } from '@tiptap/react';
|
|
3
|
-
|
|
4
|
-
type HistorySlice<D = any> = {
|
|
5
|
-
index: number;
|
|
6
|
-
hasPast: () => boolean;
|
|
7
|
-
hasFuture: () => boolean;
|
|
8
|
-
histories: History<D>[];
|
|
9
|
-
record: (data: D) => void;
|
|
10
|
-
back: VoidFunction;
|
|
11
|
-
forward: VoidFunction;
|
|
12
|
-
currentHistory: () => History;
|
|
13
|
-
nextHistory: () => History<D> | null;
|
|
14
|
-
prevHistory: () => History<D> | null;
|
|
15
|
-
setHistories: (histories: History[]) => void;
|
|
16
|
-
setHistoryIndex: (index: number) => void;
|
|
17
|
-
initialAppState: D;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
type NodeHandle = {
|
|
21
|
-
sync: () => void;
|
|
22
|
-
hideOverlay: () => void;
|
|
23
|
-
showOverlay: () => void;
|
|
24
|
-
};
|
|
25
|
-
type NodesSlice = {
|
|
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;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
type PermissionsArgs<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
|
|
34
|
-
item?: G["UserComponentData"] | null;
|
|
35
|
-
type?: keyof G["UserProps"];
|
|
36
|
-
root?: boolean;
|
|
37
|
-
};
|
|
38
|
-
type GetPermissions<UserConfig extends Config = Config> = (params?: PermissionsArgs<UserConfig>) => Permissions;
|
|
39
|
-
type ResolvePermissions<UserConfig extends Config = Config> = (params?: PermissionsArgs<UserConfig>, force?: boolean) => void;
|
|
40
|
-
type RefreshPermissions<UserConfig extends Config = Config> = (params?: PermissionsArgs<UserConfig>, force?: boolean) => void;
|
|
41
|
-
type Cache = Record<string, {
|
|
42
|
-
lastPermissions: Partial<Permissions>;
|
|
43
|
-
lastData: ComponentData | null;
|
|
44
|
-
lastParentId: string | null;
|
|
45
|
-
}>;
|
|
46
|
-
type PermissionsSlice = {
|
|
47
|
-
cache: Cache;
|
|
48
|
-
globalPermissions: Permissions;
|
|
49
|
-
resolvedPermissions: Record<string, Partial<Permissions> | undefined>;
|
|
50
|
-
getPermissions: GetPermissions<Config>;
|
|
51
|
-
resolvePermissions: ResolvePermissions<Config>;
|
|
52
|
-
refreshPermissions: RefreshPermissions<Config>;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
type ComponentOrRootData = Omit<ComponentData<any>, "type">;
|
|
56
|
-
type FieldsSlice = {
|
|
57
|
-
fields: Fields | Partial<Fields>;
|
|
58
|
-
loading: boolean;
|
|
59
|
-
lastResolvedData: Partial<ComponentOrRootData>;
|
|
60
|
-
id: string | undefined;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
type Status = "LOADING" | "MOUNTED" | "READY";
|
|
64
|
-
type ZoomConfig = {
|
|
65
|
-
autoZoom: number;
|
|
66
|
-
rootHeight: number;
|
|
67
|
-
zoom: number;
|
|
68
|
-
};
|
|
69
|
-
type ComponentState = Record<string, {
|
|
70
|
-
loadingCount: number;
|
|
71
|
-
}>;
|
|
72
|
-
type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
|
|
73
|
-
instanceId: string;
|
|
74
|
-
state: G["UserAppState"];
|
|
75
|
-
dispatch: (action: PuckAction) => void;
|
|
76
|
-
config: UserConfig;
|
|
77
|
-
componentState: ComponentState;
|
|
78
|
-
setComponentState: (componentState: ComponentState) => void;
|
|
79
|
-
setComponentLoading: (id: string, loading?: boolean, defer?: number) => () => void;
|
|
80
|
-
unsetComponentLoading: (id: string) => void;
|
|
81
|
-
pendingLoadTimeouts: Record<string, NodeJS.Timeout>;
|
|
82
|
-
resolveComponentData: <T extends ComponentData | RootDataWithProps>(componentData: T, trigger: ResolveDataTrigger) => Promise<{
|
|
83
|
-
node: T;
|
|
84
|
-
didChange: boolean;
|
|
85
|
-
}>;
|
|
86
|
-
resolveAndCommitData: () => void;
|
|
87
|
-
plugins: Plugin[];
|
|
88
|
-
overrides: Partial<Overrides>;
|
|
89
|
-
viewports: Viewports;
|
|
90
|
-
zoomConfig: ZoomConfig;
|
|
91
|
-
setZoomConfig: (zoomConfig: ZoomConfig) => void;
|
|
92
|
-
status: Status;
|
|
93
|
-
setStatus: (status: Status) => void;
|
|
94
|
-
iframe: IframeConfig;
|
|
95
|
-
_experimentalFullScreenCanvas: boolean;
|
|
96
|
-
_experimentalVirtualization: boolean;
|
|
97
|
-
selectedItem?: G["UserData"]["content"][0] | null;
|
|
98
|
-
getCurrentData: () => G["UserData"]["content"][0] | G["UserData"]["root"];
|
|
99
|
-
setUi: (ui: Partial<UiState>, recordHistory?: boolean) => void;
|
|
100
|
-
getComponentConfig: (type?: string) => ComponentConfig | null | undefined;
|
|
101
|
-
onAction?: (action: PuckAction, newState: AppState, state: AppState) => void;
|
|
102
|
-
metadata: Metadata;
|
|
103
|
-
fields: FieldsSlice;
|
|
104
|
-
history: HistorySlice;
|
|
105
|
-
nodes: NodesSlice;
|
|
106
|
-
permissions: PermissionsSlice;
|
|
107
|
-
fieldTransforms: FieldTransforms;
|
|
108
|
-
currentRichText?: {
|
|
109
|
-
inlineComponentId?: string;
|
|
110
|
-
inline: boolean;
|
|
111
|
-
field: RichtextField;
|
|
112
|
-
editor: Editor;
|
|
113
|
-
id: string;
|
|
114
|
-
} | null;
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
export type { AppStore as A, GetPermissions as G, HistorySlice as H, RefreshPermissions as R };
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { P as History, $ as Permissions, i as ComponentData, m as Config, am as UserGenerics, O as Fields, a3 as PuckAction, ad as RootDataWithProps, a8 as ResolveDataTrigger, a0 as Plugin, _ as Overrides, ao as Viewports, Q as IframeConfig, al as UiState, f as ComponentConfig, a as AppState, V as Metadata, N as FieldTransforms, aa as RichtextField } from './actions-Csn3gOP8.mjs';
|
|
2
|
-
import { Editor } from '@tiptap/react';
|
|
3
|
-
|
|
4
|
-
type HistorySlice<D = any> = {
|
|
5
|
-
index: number;
|
|
6
|
-
hasPast: () => boolean;
|
|
7
|
-
hasFuture: () => boolean;
|
|
8
|
-
histories: History<D>[];
|
|
9
|
-
record: (data: D) => void;
|
|
10
|
-
back: VoidFunction;
|
|
11
|
-
forward: VoidFunction;
|
|
12
|
-
currentHistory: () => History;
|
|
13
|
-
nextHistory: () => History<D> | null;
|
|
14
|
-
prevHistory: () => History<D> | null;
|
|
15
|
-
setHistories: (histories: History[]) => void;
|
|
16
|
-
setHistoryIndex: (index: number) => void;
|
|
17
|
-
initialAppState: D;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
type NodeHandle = {
|
|
21
|
-
sync: () => void;
|
|
22
|
-
hideOverlay: () => void;
|
|
23
|
-
showOverlay: () => void;
|
|
24
|
-
};
|
|
25
|
-
type NodesSlice = {
|
|
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;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
type PermissionsArgs<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
|
|
34
|
-
item?: G["UserComponentData"] | null;
|
|
35
|
-
type?: keyof G["UserProps"];
|
|
36
|
-
root?: boolean;
|
|
37
|
-
};
|
|
38
|
-
type GetPermissions<UserConfig extends Config = Config> = (params?: PermissionsArgs<UserConfig>) => Permissions;
|
|
39
|
-
type ResolvePermissions<UserConfig extends Config = Config> = (params?: PermissionsArgs<UserConfig>, force?: boolean) => void;
|
|
40
|
-
type RefreshPermissions<UserConfig extends Config = Config> = (params?: PermissionsArgs<UserConfig>, force?: boolean) => void;
|
|
41
|
-
type Cache = Record<string, {
|
|
42
|
-
lastPermissions: Partial<Permissions>;
|
|
43
|
-
lastData: ComponentData | null;
|
|
44
|
-
lastParentId: string | null;
|
|
45
|
-
}>;
|
|
46
|
-
type PermissionsSlice = {
|
|
47
|
-
cache: Cache;
|
|
48
|
-
globalPermissions: Permissions;
|
|
49
|
-
resolvedPermissions: Record<string, Partial<Permissions> | undefined>;
|
|
50
|
-
getPermissions: GetPermissions<Config>;
|
|
51
|
-
resolvePermissions: ResolvePermissions<Config>;
|
|
52
|
-
refreshPermissions: RefreshPermissions<Config>;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
type ComponentOrRootData = Omit<ComponentData<any>, "type">;
|
|
56
|
-
type FieldsSlice = {
|
|
57
|
-
fields: Fields | Partial<Fields>;
|
|
58
|
-
loading: boolean;
|
|
59
|
-
lastResolvedData: Partial<ComponentOrRootData>;
|
|
60
|
-
id: string | undefined;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
type Status = "LOADING" | "MOUNTED" | "READY";
|
|
64
|
-
type ZoomConfig = {
|
|
65
|
-
autoZoom: number;
|
|
66
|
-
rootHeight: number;
|
|
67
|
-
zoom: number;
|
|
68
|
-
};
|
|
69
|
-
type ComponentState = Record<string, {
|
|
70
|
-
loadingCount: number;
|
|
71
|
-
}>;
|
|
72
|
-
type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
|
|
73
|
-
instanceId: string;
|
|
74
|
-
state: G["UserAppState"];
|
|
75
|
-
dispatch: (action: PuckAction) => void;
|
|
76
|
-
config: UserConfig;
|
|
77
|
-
componentState: ComponentState;
|
|
78
|
-
setComponentState: (componentState: ComponentState) => void;
|
|
79
|
-
setComponentLoading: (id: string, loading?: boolean, defer?: number) => () => void;
|
|
80
|
-
unsetComponentLoading: (id: string) => void;
|
|
81
|
-
pendingLoadTimeouts: Record<string, NodeJS.Timeout>;
|
|
82
|
-
resolveComponentData: <T extends ComponentData | RootDataWithProps>(componentData: T, trigger: ResolveDataTrigger) => Promise<{
|
|
83
|
-
node: T;
|
|
84
|
-
didChange: boolean;
|
|
85
|
-
}>;
|
|
86
|
-
resolveAndCommitData: () => void;
|
|
87
|
-
plugins: Plugin[];
|
|
88
|
-
overrides: Partial<Overrides>;
|
|
89
|
-
viewports: Viewports;
|
|
90
|
-
zoomConfig: ZoomConfig;
|
|
91
|
-
setZoomConfig: (zoomConfig: ZoomConfig) => void;
|
|
92
|
-
status: Status;
|
|
93
|
-
setStatus: (status: Status) => void;
|
|
94
|
-
iframe: IframeConfig;
|
|
95
|
-
_experimentalFullScreenCanvas: boolean;
|
|
96
|
-
_experimentalVirtualization: boolean;
|
|
97
|
-
selectedItem?: G["UserData"]["content"][0] | null;
|
|
98
|
-
getCurrentData: () => G["UserData"]["content"][0] | G["UserData"]["root"];
|
|
99
|
-
setUi: (ui: Partial<UiState>, recordHistory?: boolean) => void;
|
|
100
|
-
getComponentConfig: (type?: string) => ComponentConfig | null | undefined;
|
|
101
|
-
onAction?: (action: PuckAction, newState: AppState, state: AppState) => void;
|
|
102
|
-
metadata: Metadata;
|
|
103
|
-
fields: FieldsSlice;
|
|
104
|
-
history: HistorySlice;
|
|
105
|
-
nodes: NodesSlice;
|
|
106
|
-
permissions: PermissionsSlice;
|
|
107
|
-
fieldTransforms: FieldTransforms;
|
|
108
|
-
currentRichText?: {
|
|
109
|
-
inlineComponentId?: string;
|
|
110
|
-
inline: boolean;
|
|
111
|
-
field: RichtextField;
|
|
112
|
-
editor: Editor;
|
|
113
|
-
id: string;
|
|
114
|
-
} | null;
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
export type { AppStore as A, GetPermissions as G, HistorySlice as H, RefreshPermissions as R };
|