@measured/puck 0.21.0-canary.b818cb1f → 0.21.0-canary.c0db75c1
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/{walk-tree-DkTSFbz_.d.mts → actions-CaYAKtsG.d.mts} +79 -81
- package/dist/{walk-tree-DkTSFbz_.d.ts → actions-CaYAKtsG.d.ts} +79 -81
- package/dist/{chunk-CBXRJMRZ.mjs → chunk-E4BOPJJV.mjs} +2771 -2922
- package/dist/chunk-J32NOAUF.mjs +524 -0
- package/dist/chunk-PJYARUPI.mjs +477 -0
- package/dist/chunk-S3RM5GHZ.mjs +503 -0
- package/dist/index-C6QwyW4B.d.ts +109 -0
- package/dist/index-IMRjDHZk.d.mts +109 -0
- package/dist/index.css +649 -270
- package/dist/index.d.mts +19 -109
- package/dist/index.d.ts +19 -109
- package/dist/index.js +2284 -1944
- package/dist/index.mjs +13 -4
- package/dist/internal.d.mts +12 -0
- package/dist/internal.d.ts +12 -0
- package/dist/internal.js +906 -0
- package/dist/internal.mjs +12 -0
- package/dist/no-external.css +649 -270
- package/dist/no-external.d.mts +4 -2
- package/dist/no-external.d.ts +4 -2
- package/dist/no-external.js +2281 -1941
- package/dist/no-external.mjs +13 -4
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +15 -12
- package/dist/rsc.mjs +7 -5
- package/dist/walk-tree-B-Q2gpMX.d.mts +29 -0
- package/dist/walk-tree-ksvZ7C4q.d.ts +29 -0
- package/package.json +7 -2
- package/dist/chunk-VBJEDLUM.mjs +0 -965
package/dist/index.d.mts
CHANGED
|
@@ -1,112 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { o as Field, p as FieldProps, q 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, r as InitialHistory, M as Metadata, s as ItemSelector, c as ComponentData, t as PluginInternal } from './actions-CaYAKtsG.mjs';
|
|
2
|
+
export { ae as Adaptor, A as AppState, ac as ArrayField, K as ArrayState, ap as AsFieldProps, _ as BaseData, a6 as BaseField, ag as CacheOpts, m as ComponentConfig, Q as ComponentConfigExtensions, Z as ComponentConfigParams, a2 as ComponentDataMap, a0 as ComponentDataOptionalId, a4 as ComponentMetadata, Y as ConfigParams, b as Content, aj as CustomField, ai as CustomFieldRender, e as DefaultComponentProps, d as DefaultComponents, f as DefaultRootFieldProps, an as DefaultRootProps, am as DefaultRootRenderProps, v as Direction, w as DragAxis, ah as ExternalField, af as ExternalFieldWithAdaptor, X as ExtractConfigParams, ar as ExtractField, a5 as FieldMetadata, G as FieldRenderFunctions, z as FieldTransformFn, y as FieldTransformFnParams, F as Fields, H as History, J as ItemWithId, a1 as MappedItem, a8 as NumberField, ad as ObjectField, E as OverrideKey, N as PuckComponent, al as PuckContext, a3 as PuckMetadata, ab as RadioField, i as ResolveDataTrigger, T as RootConfig, R as RootData, h as RootDataWithProps, $ as RootDataWithoutProps, aa as SelectField, S as Slot, L as SlotComponent, ak as SlotField, a7 as TextField, a9 as TextareaField, x as Viewport, aq as WithChildren, W as WithId, ao as WithPuckProps, u as WithSlotProps, B as overrideKeys } from './actions-CaYAKtsG.mjs';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-B-Q2gpMX.mjs';
|
|
3
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
5
|
import * as react from 'react';
|
|
5
|
-
import react__default, { ReactNode, SyntheticEvent, ReactElement } from 'react';
|
|
6
|
-
|
|
7
|
-
type HistorySlice<D = any> = {
|
|
8
|
-
index: number;
|
|
9
|
-
hasPast: () => boolean;
|
|
10
|
-
hasFuture: () => boolean;
|
|
11
|
-
histories: History<D>[];
|
|
12
|
-
record: (data: D) => void;
|
|
13
|
-
back: VoidFunction;
|
|
14
|
-
forward: VoidFunction;
|
|
15
|
-
currentHistory: () => History;
|
|
16
|
-
nextHistory: () => History<D> | null;
|
|
17
|
-
prevHistory: () => History<D> | null;
|
|
18
|
-
setHistories: (histories: History[]) => void;
|
|
19
|
-
setHistoryIndex: (index: number) => void;
|
|
20
|
-
initialAppState: D;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
type NodeMethods = {
|
|
24
|
-
sync: () => void;
|
|
25
|
-
hideOverlay: () => void;
|
|
26
|
-
showOverlay: () => void;
|
|
27
|
-
};
|
|
28
|
-
type PuckNodeInstance = {
|
|
29
|
-
id: string;
|
|
30
|
-
methods: NodeMethods;
|
|
31
|
-
element: HTMLElement | null;
|
|
32
|
-
};
|
|
33
|
-
type NodesSlice = {
|
|
34
|
-
nodes: Record<string, PuckNodeInstance | undefined>;
|
|
35
|
-
registerNode: (id: string, node: Partial<PuckNodeInstance>) => void;
|
|
36
|
-
unregisterNode: (id: string, node?: Partial<PuckNodeInstance>) => void;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
type PermissionsArgs<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
|
|
40
|
-
item?: G["UserComponentData"] | null;
|
|
41
|
-
type?: keyof G["UserProps"];
|
|
42
|
-
root?: boolean;
|
|
43
|
-
};
|
|
44
|
-
type GetPermissions<UserConfig extends Config = Config> = (params?: PermissionsArgs<UserConfig>) => Permissions;
|
|
45
|
-
type ResolvePermissions<UserConfig extends Config = Config> = (params?: PermissionsArgs<UserConfig>, force?: boolean) => void;
|
|
46
|
-
type RefreshPermissions<UserConfig extends Config = Config> = (params?: PermissionsArgs<UserConfig>, force?: boolean) => void;
|
|
47
|
-
type Cache = Record<string, {
|
|
48
|
-
lastPermissions: Partial<Permissions>;
|
|
49
|
-
lastData: ComponentData | null;
|
|
50
|
-
}>;
|
|
51
|
-
type PermissionsSlice = {
|
|
52
|
-
cache: Cache;
|
|
53
|
-
globalPermissions: Permissions;
|
|
54
|
-
resolvedPermissions: Record<string, Partial<Permissions> | undefined>;
|
|
55
|
-
getPermissions: GetPermissions<Config>;
|
|
56
|
-
resolvePermissions: ResolvePermissions<Config>;
|
|
57
|
-
refreshPermissions: RefreshPermissions<Config>;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
type ComponentOrRootData = Omit<ComponentData<any>, "type">;
|
|
61
|
-
type FieldsSlice = {
|
|
62
|
-
fields: Fields | Partial<Fields>;
|
|
63
|
-
loading: boolean;
|
|
64
|
-
lastResolvedData: Partial<ComponentOrRootData>;
|
|
65
|
-
id: string | undefined;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
type Status = "LOADING" | "MOUNTED" | "READY";
|
|
69
|
-
type ZoomConfig = {
|
|
70
|
-
autoZoom: number;
|
|
71
|
-
rootHeight: number;
|
|
72
|
-
zoom: number;
|
|
73
|
-
};
|
|
74
|
-
type ComponentState = Record<string, {
|
|
75
|
-
loadingCount: number;
|
|
76
|
-
}>;
|
|
77
|
-
type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
|
|
78
|
-
state: G["UserAppState"];
|
|
79
|
-
dispatch: (action: PuckAction) => void;
|
|
80
|
-
config: UserConfig;
|
|
81
|
-
componentState: ComponentState;
|
|
82
|
-
setComponentState: (componentState: ComponentState) => void;
|
|
83
|
-
setComponentLoading: (id: string, loading?: boolean, defer?: number) => () => void;
|
|
84
|
-
unsetComponentLoading: (id: string) => void;
|
|
85
|
-
pendingLoadTimeouts: Record<string, NodeJS.Timeout>;
|
|
86
|
-
resolveComponentData: <T extends ComponentData | RootDataWithProps>(componentData: T, trigger: ResolveDataTrigger) => Promise<{
|
|
87
|
-
node: T;
|
|
88
|
-
didChange: boolean;
|
|
89
|
-
}>;
|
|
90
|
-
resolveAndCommitData: () => void;
|
|
91
|
-
plugins: Plugin[];
|
|
92
|
-
overrides: Partial<Overrides>;
|
|
93
|
-
viewports: Viewports;
|
|
94
|
-
zoomConfig: ZoomConfig;
|
|
95
|
-
setZoomConfig: (zoomConfig: ZoomConfig) => void;
|
|
96
|
-
status: Status;
|
|
97
|
-
setStatus: (status: Status) => void;
|
|
98
|
-
iframe: IframeConfig;
|
|
99
|
-
selectedItem?: G["UserData"]["content"][0] | null;
|
|
100
|
-
setUi: (ui: Partial<UiState>, recordHistory?: boolean) => void;
|
|
101
|
-
getComponentConfig: (type?: string) => ComponentConfig | null | undefined;
|
|
102
|
-
onAction?: (action: PuckAction, newState: AppState, state: AppState) => void;
|
|
103
|
-
metadata: Metadata;
|
|
104
|
-
fields: FieldsSlice;
|
|
105
|
-
history: HistorySlice;
|
|
106
|
-
nodes: NodesSlice;
|
|
107
|
-
permissions: PermissionsSlice;
|
|
108
|
-
fieldTransforms: FieldTransforms;
|
|
109
|
-
};
|
|
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-IMRjDHZk.mjs';
|
|
110
8
|
|
|
111
9
|
declare const ActionBar: {
|
|
112
10
|
({ label, children, }: {
|
|
@@ -184,7 +82,7 @@ declare const Drawer: {
|
|
|
184
82
|
|
|
185
83
|
declare const DropZone: react.ForwardRefExoticComponent<DropZoneProps & react.RefAttributes<HTMLDivElement>>;
|
|
186
84
|
|
|
187
|
-
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
|
|
85
|
+
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, suppressHydrationWarning, }: {
|
|
188
86
|
children: ReactNode;
|
|
189
87
|
href?: string;
|
|
190
88
|
onClick?: (e: SyntheticEvent) => void | Promise<void>;
|
|
@@ -195,6 +93,7 @@ declare const IconButton: ({ children, href, onClick, variant, type, disabled, t
|
|
|
195
93
|
newTab?: boolean;
|
|
196
94
|
fullWidth?: boolean;
|
|
197
95
|
title: string;
|
|
96
|
+
suppressHydrationWarning?: boolean;
|
|
198
97
|
}) => react_jsx_runtime.JSX.Element;
|
|
199
98
|
|
|
200
99
|
type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
|
|
@@ -227,6 +126,8 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
|
|
|
227
126
|
};
|
|
228
127
|
initialHistory?: InitialHistory;
|
|
229
128
|
metadata?: Metadata;
|
|
129
|
+
height?: CSSProperties["height"];
|
|
130
|
+
_experimentalFullScreenCanvas?: boolean;
|
|
230
131
|
};
|
|
231
132
|
declare function Puck<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: PuckProps<UserConfig>): react_jsx_runtime.JSX.Element;
|
|
232
133
|
declare namespace Puck {
|
|
@@ -271,6 +172,7 @@ type UsePuckData<UserConfig extends Config = Config, G extends UserGenerics<User
|
|
|
271
172
|
getItemBySelector: (selector: ItemSelector) => G["UserComponentData"] | undefined;
|
|
272
173
|
getItemById: (id: string) => G["UserComponentData"] | undefined;
|
|
273
174
|
getSelectorForId: (id: string) => Required<ItemSelector> | undefined;
|
|
175
|
+
getParentById: (id: string) => ComponentData | undefined;
|
|
274
176
|
history: {
|
|
275
177
|
back: HistorySlice["back"];
|
|
276
178
|
forward: HistorySlice["forward"];
|
|
@@ -302,4 +204,12 @@ declare function usePuck<UserConfig extends Config = Config>(): UsePuckStore<Use
|
|
|
302
204
|
*/
|
|
303
205
|
declare function useGetPuck(): () => UsePuckStore<Config>;
|
|
304
206
|
|
|
305
|
-
|
|
207
|
+
declare const blocksPlugin: () => Plugin;
|
|
208
|
+
|
|
209
|
+
declare const fieldsPlugin: (params?: {
|
|
210
|
+
mobileOnly?: boolean;
|
|
211
|
+
}) => PluginInternal;
|
|
212
|
+
|
|
213
|
+
declare const outlinePlugin: () => Plugin;
|
|
214
|
+
|
|
215
|
+
export { Action, ActionBar, AutoField, Button, ComponentData, Config, Data, Drawer, DropZone, Field, FieldLabel, FieldProps, FieldTransforms, Group, IconButton, IframeConfig, InitialHistory, Label, Metadata, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, type PuckApi, Render, UiState, type UsePuckData, UserGenerics, Viewports, blocksPlugin, createUsePuck, fieldsPlugin, outlinePlugin, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,112 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { o as Field, p as FieldProps, q 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, r as InitialHistory, M as Metadata, s as ItemSelector, c as ComponentData, t as PluginInternal } from './actions-CaYAKtsG.js';
|
|
2
|
+
export { ae as Adaptor, A as AppState, ac as ArrayField, K as ArrayState, ap as AsFieldProps, _ as BaseData, a6 as BaseField, ag as CacheOpts, m as ComponentConfig, Q as ComponentConfigExtensions, Z as ComponentConfigParams, a2 as ComponentDataMap, a0 as ComponentDataOptionalId, a4 as ComponentMetadata, Y as ConfigParams, b as Content, aj as CustomField, ai as CustomFieldRender, e as DefaultComponentProps, d as DefaultComponents, f as DefaultRootFieldProps, an as DefaultRootProps, am as DefaultRootRenderProps, v as Direction, w as DragAxis, ah as ExternalField, af as ExternalFieldWithAdaptor, X as ExtractConfigParams, ar as ExtractField, a5 as FieldMetadata, G as FieldRenderFunctions, z as FieldTransformFn, y as FieldTransformFnParams, F as Fields, H as History, J as ItemWithId, a1 as MappedItem, a8 as NumberField, ad as ObjectField, E as OverrideKey, N as PuckComponent, al as PuckContext, a3 as PuckMetadata, ab as RadioField, i as ResolveDataTrigger, T as RootConfig, R as RootData, h as RootDataWithProps, $ as RootDataWithoutProps, aa as SelectField, S as Slot, L as SlotComponent, ak as SlotField, a7 as TextField, a9 as TextareaField, x as Viewport, aq as WithChildren, W as WithId, ao as WithPuckProps, u as WithSlotProps, B as overrideKeys } from './actions-CaYAKtsG.js';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-ksvZ7C4q.js';
|
|
3
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
5
|
import * as react from 'react';
|
|
5
|
-
import react__default, { ReactNode, SyntheticEvent, ReactElement } from 'react';
|
|
6
|
-
|
|
7
|
-
type HistorySlice<D = any> = {
|
|
8
|
-
index: number;
|
|
9
|
-
hasPast: () => boolean;
|
|
10
|
-
hasFuture: () => boolean;
|
|
11
|
-
histories: History<D>[];
|
|
12
|
-
record: (data: D) => void;
|
|
13
|
-
back: VoidFunction;
|
|
14
|
-
forward: VoidFunction;
|
|
15
|
-
currentHistory: () => History;
|
|
16
|
-
nextHistory: () => History<D> | null;
|
|
17
|
-
prevHistory: () => History<D> | null;
|
|
18
|
-
setHistories: (histories: History[]) => void;
|
|
19
|
-
setHistoryIndex: (index: number) => void;
|
|
20
|
-
initialAppState: D;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
type NodeMethods = {
|
|
24
|
-
sync: () => void;
|
|
25
|
-
hideOverlay: () => void;
|
|
26
|
-
showOverlay: () => void;
|
|
27
|
-
};
|
|
28
|
-
type PuckNodeInstance = {
|
|
29
|
-
id: string;
|
|
30
|
-
methods: NodeMethods;
|
|
31
|
-
element: HTMLElement | null;
|
|
32
|
-
};
|
|
33
|
-
type NodesSlice = {
|
|
34
|
-
nodes: Record<string, PuckNodeInstance | undefined>;
|
|
35
|
-
registerNode: (id: string, node: Partial<PuckNodeInstance>) => void;
|
|
36
|
-
unregisterNode: (id: string, node?: Partial<PuckNodeInstance>) => void;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
type PermissionsArgs<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
|
|
40
|
-
item?: G["UserComponentData"] | null;
|
|
41
|
-
type?: keyof G["UserProps"];
|
|
42
|
-
root?: boolean;
|
|
43
|
-
};
|
|
44
|
-
type GetPermissions<UserConfig extends Config = Config> = (params?: PermissionsArgs<UserConfig>) => Permissions;
|
|
45
|
-
type ResolvePermissions<UserConfig extends Config = Config> = (params?: PermissionsArgs<UserConfig>, force?: boolean) => void;
|
|
46
|
-
type RefreshPermissions<UserConfig extends Config = Config> = (params?: PermissionsArgs<UserConfig>, force?: boolean) => void;
|
|
47
|
-
type Cache = Record<string, {
|
|
48
|
-
lastPermissions: Partial<Permissions>;
|
|
49
|
-
lastData: ComponentData | null;
|
|
50
|
-
}>;
|
|
51
|
-
type PermissionsSlice = {
|
|
52
|
-
cache: Cache;
|
|
53
|
-
globalPermissions: Permissions;
|
|
54
|
-
resolvedPermissions: Record<string, Partial<Permissions> | undefined>;
|
|
55
|
-
getPermissions: GetPermissions<Config>;
|
|
56
|
-
resolvePermissions: ResolvePermissions<Config>;
|
|
57
|
-
refreshPermissions: RefreshPermissions<Config>;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
type ComponentOrRootData = Omit<ComponentData<any>, "type">;
|
|
61
|
-
type FieldsSlice = {
|
|
62
|
-
fields: Fields | Partial<Fields>;
|
|
63
|
-
loading: boolean;
|
|
64
|
-
lastResolvedData: Partial<ComponentOrRootData>;
|
|
65
|
-
id: string | undefined;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
type Status = "LOADING" | "MOUNTED" | "READY";
|
|
69
|
-
type ZoomConfig = {
|
|
70
|
-
autoZoom: number;
|
|
71
|
-
rootHeight: number;
|
|
72
|
-
zoom: number;
|
|
73
|
-
};
|
|
74
|
-
type ComponentState = Record<string, {
|
|
75
|
-
loadingCount: number;
|
|
76
|
-
}>;
|
|
77
|
-
type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
|
|
78
|
-
state: G["UserAppState"];
|
|
79
|
-
dispatch: (action: PuckAction) => void;
|
|
80
|
-
config: UserConfig;
|
|
81
|
-
componentState: ComponentState;
|
|
82
|
-
setComponentState: (componentState: ComponentState) => void;
|
|
83
|
-
setComponentLoading: (id: string, loading?: boolean, defer?: number) => () => void;
|
|
84
|
-
unsetComponentLoading: (id: string) => void;
|
|
85
|
-
pendingLoadTimeouts: Record<string, NodeJS.Timeout>;
|
|
86
|
-
resolveComponentData: <T extends ComponentData | RootDataWithProps>(componentData: T, trigger: ResolveDataTrigger) => Promise<{
|
|
87
|
-
node: T;
|
|
88
|
-
didChange: boolean;
|
|
89
|
-
}>;
|
|
90
|
-
resolveAndCommitData: () => void;
|
|
91
|
-
plugins: Plugin[];
|
|
92
|
-
overrides: Partial<Overrides>;
|
|
93
|
-
viewports: Viewports;
|
|
94
|
-
zoomConfig: ZoomConfig;
|
|
95
|
-
setZoomConfig: (zoomConfig: ZoomConfig) => void;
|
|
96
|
-
status: Status;
|
|
97
|
-
setStatus: (status: Status) => void;
|
|
98
|
-
iframe: IframeConfig;
|
|
99
|
-
selectedItem?: G["UserData"]["content"][0] | null;
|
|
100
|
-
setUi: (ui: Partial<UiState>, recordHistory?: boolean) => void;
|
|
101
|
-
getComponentConfig: (type?: string) => ComponentConfig | null | undefined;
|
|
102
|
-
onAction?: (action: PuckAction, newState: AppState, state: AppState) => void;
|
|
103
|
-
metadata: Metadata;
|
|
104
|
-
fields: FieldsSlice;
|
|
105
|
-
history: HistorySlice;
|
|
106
|
-
nodes: NodesSlice;
|
|
107
|
-
permissions: PermissionsSlice;
|
|
108
|
-
fieldTransforms: FieldTransforms;
|
|
109
|
-
};
|
|
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-C6QwyW4B.js';
|
|
110
8
|
|
|
111
9
|
declare const ActionBar: {
|
|
112
10
|
({ label, children, }: {
|
|
@@ -184,7 +82,7 @@ declare const Drawer: {
|
|
|
184
82
|
|
|
185
83
|
declare const DropZone: react.ForwardRefExoticComponent<DropZoneProps & react.RefAttributes<HTMLDivElement>>;
|
|
186
84
|
|
|
187
|
-
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
|
|
85
|
+
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, suppressHydrationWarning, }: {
|
|
188
86
|
children: ReactNode;
|
|
189
87
|
href?: string;
|
|
190
88
|
onClick?: (e: SyntheticEvent) => void | Promise<void>;
|
|
@@ -195,6 +93,7 @@ declare const IconButton: ({ children, href, onClick, variant, type, disabled, t
|
|
|
195
93
|
newTab?: boolean;
|
|
196
94
|
fullWidth?: boolean;
|
|
197
95
|
title: string;
|
|
96
|
+
suppressHydrationWarning?: boolean;
|
|
198
97
|
}) => react_jsx_runtime.JSX.Element;
|
|
199
98
|
|
|
200
99
|
type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
|
|
@@ -227,6 +126,8 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
|
|
|
227
126
|
};
|
|
228
127
|
initialHistory?: InitialHistory;
|
|
229
128
|
metadata?: Metadata;
|
|
129
|
+
height?: CSSProperties["height"];
|
|
130
|
+
_experimentalFullScreenCanvas?: boolean;
|
|
230
131
|
};
|
|
231
132
|
declare function Puck<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: PuckProps<UserConfig>): react_jsx_runtime.JSX.Element;
|
|
232
133
|
declare namespace Puck {
|
|
@@ -271,6 +172,7 @@ type UsePuckData<UserConfig extends Config = Config, G extends UserGenerics<User
|
|
|
271
172
|
getItemBySelector: (selector: ItemSelector) => G["UserComponentData"] | undefined;
|
|
272
173
|
getItemById: (id: string) => G["UserComponentData"] | undefined;
|
|
273
174
|
getSelectorForId: (id: string) => Required<ItemSelector> | undefined;
|
|
175
|
+
getParentById: (id: string) => ComponentData | undefined;
|
|
274
176
|
history: {
|
|
275
177
|
back: HistorySlice["back"];
|
|
276
178
|
forward: HistorySlice["forward"];
|
|
@@ -302,4 +204,12 @@ declare function usePuck<UserConfig extends Config = Config>(): UsePuckStore<Use
|
|
|
302
204
|
*/
|
|
303
205
|
declare function useGetPuck(): () => UsePuckStore<Config>;
|
|
304
206
|
|
|
305
|
-
|
|
207
|
+
declare const blocksPlugin: () => Plugin;
|
|
208
|
+
|
|
209
|
+
declare const fieldsPlugin: (params?: {
|
|
210
|
+
mobileOnly?: boolean;
|
|
211
|
+
}) => PluginInternal;
|
|
212
|
+
|
|
213
|
+
declare const outlinePlugin: () => Plugin;
|
|
214
|
+
|
|
215
|
+
export { Action, ActionBar, AutoField, Button, ComponentData, Config, Data, Drawer, DropZone, Field, FieldLabel, FieldProps, FieldTransforms, Group, IconButton, IframeConfig, InitialHistory, Label, Metadata, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, type PuckApi, Render, UiState, type UsePuckData, UserGenerics, Viewports, blocksPlugin, createUsePuck, fieldsPlugin, outlinePlugin, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck };
|