@measured/puck 0.21.0-canary.e310a175 → 0.21.0-canary.e491598a
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/{chunk-EXX4ZSCK.mjs → chunk-2NYOEOP7.mjs} +2941 -2623
- package/dist/{chunk-VBJEDLUM.mjs → chunk-FY5AZKYD.mjs} +12 -10
- package/dist/index.css +649 -270
- package/dist/index.d.mts +24 -5
- package/dist/index.d.ts +24 -5
- package/dist/index.js +2432 -2116
- package/dist/index.mjs +10 -2
- package/dist/no-external.css +649 -270
- package/dist/no-external.d.mts +2 -2
- package/dist/no-external.d.ts +2 -2
- package/dist/no-external.js +2429 -2113
- package/dist/no-external.mjs +10 -2
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +12 -10
- package/dist/rsc.mjs +1 -1
- package/dist/{walk-tree-DkTSFbz_.d.mts → walk-tree-CL-j099F.d.mts} +72 -50
- package/dist/{walk-tree-DkTSFbz_.d.ts → walk-tree-CL-j099F.d.ts} +72 -50
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { H as History, P as Permissions, a as ComponentData, C as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as FieldTransforms,
|
|
2
|
-
export {
|
|
1
|
+
import { H as History, P as Permissions, a as ComponentData, C as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as FieldTransforms, D as Data, h as OnAction, i as PrivateAppState, j as Field, k as FieldProps, l as DropZoneProps, n as InitialHistory, o as ItemSelector, p as PluginInternal } from './walk-tree-CL-j099F.mjs';
|
|
2
|
+
export { af as Adaptor, ad as ArrayField, G as ArrayState, at as AsFieldProps, Z as BaseData, a7 as BaseField, ah as CacheOpts, L as ComponentConfigExtensions, Y as ComponentConfigParams, a2 as ComponentDataMap, a0 as ComponentDataOptionalId, a5 as ComponentMetadata, X as ConfigParams, a3 as Content, ak as CustomField, aj as CustomFieldRender, aq as DefaultComponentProps, Q as DefaultComponents, an as DefaultRootFieldProps, ap as DefaultRootProps, ao as DefaultRootRenderProps, q as Direction, s as DragAxis, ai as ExternalField, ag as ExternalFieldWithAdaptor, T as ExtractConfigParams, av as ExtractField, a6 as FieldMetadata, B as FieldRenderFunctions, x as FieldTransformFn, v as FieldTransformFnParams, E as ItemWithId, a1 as MappedItem, a9 as NumberField, ae as ObjectField, z as OverrideKey, K as PuckComponent, am as PuckContext, a4 as PuckMetadata, ac as RadioField, N as RootConfig, $ as RootData, _ as RootDataWithoutProps, ab as SelectField, S as Slot, J as SlotComponent, al as SlotField, a8 as TextField, aa as TextareaField, u as Viewport, au as WithChildren, ar as WithId, as as WithPuckProps, W as WithSlotProps, m as migrate, y as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-CL-j099F.mjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
|
-
import react__default, { ReactNode, SyntheticEvent, ReactElement } from 'react';
|
|
5
|
+
import react__default, { Reducer, ReactNode, SyntheticEvent, ReactElement, CSSProperties } from 'react';
|
|
6
6
|
|
|
7
7
|
type HistorySlice<D = any> = {
|
|
8
8
|
index: number;
|
|
@@ -75,6 +75,7 @@ type ComponentState = Record<string, {
|
|
|
75
75
|
loadingCount: number;
|
|
76
76
|
}>;
|
|
77
77
|
type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
|
|
78
|
+
instanceId: string;
|
|
78
79
|
state: G["UserAppState"];
|
|
79
80
|
dispatch: (action: PuckAction) => void;
|
|
80
81
|
config: UserConfig;
|
|
@@ -108,6 +109,13 @@ type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserCon
|
|
|
108
109
|
fieldTransforms: FieldTransforms;
|
|
109
110
|
};
|
|
110
111
|
|
|
112
|
+
type StateReducer<UserData extends Data = Data> = Reducer<PrivateAppState<UserData>, PuckAction>;
|
|
113
|
+
declare function createReducer<UserData extends Data>({ record, onAction, appStore, }: {
|
|
114
|
+
record?: (appState: AppState<UserData>) => void;
|
|
115
|
+
onAction?: OnAction<UserData>;
|
|
116
|
+
appStore: AppStore;
|
|
117
|
+
}): StateReducer<UserData>;
|
|
118
|
+
|
|
111
119
|
declare const ActionBar: {
|
|
112
120
|
({ label, children, }: {
|
|
113
121
|
label?: string;
|
|
@@ -184,7 +192,7 @@ declare const Drawer: {
|
|
|
184
192
|
|
|
185
193
|
declare const DropZone: react.ForwardRefExoticComponent<DropZoneProps & react.RefAttributes<HTMLDivElement>>;
|
|
186
194
|
|
|
187
|
-
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
|
|
195
|
+
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, suppressHydrationWarning, }: {
|
|
188
196
|
children: ReactNode;
|
|
189
197
|
href?: string;
|
|
190
198
|
onClick?: (e: SyntheticEvent) => void | Promise<void>;
|
|
@@ -195,6 +203,7 @@ declare const IconButton: ({ children, href, onClick, variant, type, disabled, t
|
|
|
195
203
|
newTab?: boolean;
|
|
196
204
|
fullWidth?: boolean;
|
|
197
205
|
title: string;
|
|
206
|
+
suppressHydrationWarning?: boolean;
|
|
198
207
|
}) => react_jsx_runtime.JSX.Element;
|
|
199
208
|
|
|
200
209
|
type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
|
|
@@ -227,6 +236,8 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
|
|
|
227
236
|
};
|
|
228
237
|
initialHistory?: InitialHistory;
|
|
229
238
|
metadata?: Metadata;
|
|
239
|
+
height?: CSSProperties["height"];
|
|
240
|
+
_experimentalFullScreenCanvas?: boolean;
|
|
230
241
|
};
|
|
231
242
|
declare function Puck<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: PuckProps<UserConfig>): react_jsx_runtime.JSX.Element;
|
|
232
243
|
declare namespace Puck {
|
|
@@ -302,4 +313,12 @@ declare function usePuck<UserConfig extends Config = Config>(): UsePuckStore<Use
|
|
|
302
313
|
*/
|
|
303
314
|
declare function useGetPuck(): () => UsePuckStore<Config>;
|
|
304
315
|
|
|
305
|
-
|
|
316
|
+
declare const blocksPlugin: () => Plugin;
|
|
317
|
+
|
|
318
|
+
declare const fieldsPlugin: (params?: {
|
|
319
|
+
mobileOnly?: boolean;
|
|
320
|
+
}) => PluginInternal;
|
|
321
|
+
|
|
322
|
+
declare const outlinePlugin: () => Plugin;
|
|
323
|
+
|
|
324
|
+
export { Action, ActionBar, AppState, AutoField, Button, ComponentConfig, ComponentData, Config, Data, Drawer, DropZone, Field, FieldLabel, FieldProps, FieldTransforms, Fields, Group, History, IconButton, IframeConfig, InitialHistory, Label, Metadata, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, type PuckApi, Render, ResolveDataTrigger, RootDataWithProps, UiState, type UsePuckData, UserGenerics, Viewports, blocksPlugin, createReducer, createUsePuck, fieldsPlugin, outlinePlugin, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { H as History, P as Permissions, a as ComponentData, C as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as FieldTransforms,
|
|
2
|
-
export {
|
|
1
|
+
import { H as History, P as Permissions, a as ComponentData, C as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as FieldTransforms, D as Data, h as OnAction, i as PrivateAppState, j as Field, k as FieldProps, l as DropZoneProps, n as InitialHistory, o as ItemSelector, p as PluginInternal } from './walk-tree-CL-j099F.js';
|
|
2
|
+
export { af as Adaptor, ad as ArrayField, G as ArrayState, at as AsFieldProps, Z as BaseData, a7 as BaseField, ah as CacheOpts, L as ComponentConfigExtensions, Y as ComponentConfigParams, a2 as ComponentDataMap, a0 as ComponentDataOptionalId, a5 as ComponentMetadata, X as ConfigParams, a3 as Content, ak as CustomField, aj as CustomFieldRender, aq as DefaultComponentProps, Q as DefaultComponents, an as DefaultRootFieldProps, ap as DefaultRootProps, ao as DefaultRootRenderProps, q as Direction, s as DragAxis, ai as ExternalField, ag as ExternalFieldWithAdaptor, T as ExtractConfigParams, av as ExtractField, a6 as FieldMetadata, B as FieldRenderFunctions, x as FieldTransformFn, v as FieldTransformFnParams, E as ItemWithId, a1 as MappedItem, a9 as NumberField, ae as ObjectField, z as OverrideKey, K as PuckComponent, am as PuckContext, a4 as PuckMetadata, ac as RadioField, N as RootConfig, $ as RootData, _ as RootDataWithoutProps, ab as SelectField, S as Slot, J as SlotComponent, al as SlotField, a8 as TextField, aa as TextareaField, u as Viewport, au as WithChildren, ar as WithId, as as WithPuckProps, W as WithSlotProps, m as migrate, y as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-CL-j099F.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
|
-
import react__default, { ReactNode, SyntheticEvent, ReactElement } from 'react';
|
|
5
|
+
import react__default, { Reducer, ReactNode, SyntheticEvent, ReactElement, CSSProperties } from 'react';
|
|
6
6
|
|
|
7
7
|
type HistorySlice<D = any> = {
|
|
8
8
|
index: number;
|
|
@@ -75,6 +75,7 @@ type ComponentState = Record<string, {
|
|
|
75
75
|
loadingCount: number;
|
|
76
76
|
}>;
|
|
77
77
|
type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
|
|
78
|
+
instanceId: string;
|
|
78
79
|
state: G["UserAppState"];
|
|
79
80
|
dispatch: (action: PuckAction) => void;
|
|
80
81
|
config: UserConfig;
|
|
@@ -108,6 +109,13 @@ type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserCon
|
|
|
108
109
|
fieldTransforms: FieldTransforms;
|
|
109
110
|
};
|
|
110
111
|
|
|
112
|
+
type StateReducer<UserData extends Data = Data> = Reducer<PrivateAppState<UserData>, PuckAction>;
|
|
113
|
+
declare function createReducer<UserData extends Data>({ record, onAction, appStore, }: {
|
|
114
|
+
record?: (appState: AppState<UserData>) => void;
|
|
115
|
+
onAction?: OnAction<UserData>;
|
|
116
|
+
appStore: AppStore;
|
|
117
|
+
}): StateReducer<UserData>;
|
|
118
|
+
|
|
111
119
|
declare const ActionBar: {
|
|
112
120
|
({ label, children, }: {
|
|
113
121
|
label?: string;
|
|
@@ -184,7 +192,7 @@ declare const Drawer: {
|
|
|
184
192
|
|
|
185
193
|
declare const DropZone: react.ForwardRefExoticComponent<DropZoneProps & react.RefAttributes<HTMLDivElement>>;
|
|
186
194
|
|
|
187
|
-
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
|
|
195
|
+
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, suppressHydrationWarning, }: {
|
|
188
196
|
children: ReactNode;
|
|
189
197
|
href?: string;
|
|
190
198
|
onClick?: (e: SyntheticEvent) => void | Promise<void>;
|
|
@@ -195,6 +203,7 @@ declare const IconButton: ({ children, href, onClick, variant, type, disabled, t
|
|
|
195
203
|
newTab?: boolean;
|
|
196
204
|
fullWidth?: boolean;
|
|
197
205
|
title: string;
|
|
206
|
+
suppressHydrationWarning?: boolean;
|
|
198
207
|
}) => react_jsx_runtime.JSX.Element;
|
|
199
208
|
|
|
200
209
|
type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
|
|
@@ -227,6 +236,8 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
|
|
|
227
236
|
};
|
|
228
237
|
initialHistory?: InitialHistory;
|
|
229
238
|
metadata?: Metadata;
|
|
239
|
+
height?: CSSProperties["height"];
|
|
240
|
+
_experimentalFullScreenCanvas?: boolean;
|
|
230
241
|
};
|
|
231
242
|
declare function Puck<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: PuckProps<UserConfig>): react_jsx_runtime.JSX.Element;
|
|
232
243
|
declare namespace Puck {
|
|
@@ -302,4 +313,12 @@ declare function usePuck<UserConfig extends Config = Config>(): UsePuckStore<Use
|
|
|
302
313
|
*/
|
|
303
314
|
declare function useGetPuck(): () => UsePuckStore<Config>;
|
|
304
315
|
|
|
305
|
-
|
|
316
|
+
declare const blocksPlugin: () => Plugin;
|
|
317
|
+
|
|
318
|
+
declare const fieldsPlugin: (params?: {
|
|
319
|
+
mobileOnly?: boolean;
|
|
320
|
+
}) => PluginInternal;
|
|
321
|
+
|
|
322
|
+
declare const outlinePlugin: () => Plugin;
|
|
323
|
+
|
|
324
|
+
export { Action, ActionBar, AppState, AutoField, Button, ComponentConfig, ComponentData, Config, Data, Drawer, DropZone, Field, FieldLabel, FieldProps, FieldTransforms, Fields, Group, History, IconButton, IframeConfig, InitialHistory, Label, Metadata, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, type PuckApi, Render, ResolveDataTrigger, RootDataWithProps, UiState, type UsePuckData, UserGenerics, Viewports, blocksPlugin, createReducer, createUsePuck, fieldsPlugin, outlinePlugin, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck };
|