@measured/puck 0.21.0-canary.79a26849 → 0.21.0-canary.7ed9655b

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/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, h as Field, i as FieldProps, D as DropZoneProps, j as Data, k as OnAction, l as InitialHistory, n as ItemSelector } from './walk-tree-CgWnYC1X.mjs';
2
- export { ad as Adaptor, ab as ArrayField, B as ArrayState, ar as AsFieldProps, X as BaseData, a5 as BaseField, af as CacheOpts, J as ComponentConfigExtensions, T as ComponentConfigParams, a0 as ComponentDataMap, _ as ComponentDataOptionalId, a3 as ComponentMetadata, Q as ConfigParams, a1 as Content, ai as CustomField, ah as CustomFieldRender, ao as DefaultComponentProps, L as DefaultComponents, al as DefaultRootFieldProps, an as DefaultRootProps, am as DefaultRootRenderProps, o as Direction, p as DragAxis, ag as ExternalField, ae as ExternalFieldWithAdaptor, N as ExtractConfigParams, at as ExtractField, a4 as FieldMetadata, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, z as ItemWithId, $ as MappedItem, a7 as NumberField, ac as ObjectField, x as OverrideKey, G as PuckComponent, ak as PuckContext, a2 as PuckMetadata, aa as RadioField, K as RootConfig, Z as RootData, Y as RootDataWithoutProps, a9 as SelectField, S as Slot, E as SlotComponent, aj as SlotField, a6 as TextField, a8 as TextareaField, q as Viewport, as as WithChildren, ap as WithId, aq as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-CgWnYC1X.mjs';
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, h as Field, i as FieldProps, D as DropZoneProps, j as Data, k as OnAction, l as InitialHistory, n as ItemSelector, o as PluginInternal } from './walk-tree-CI7CLsRf.mjs';
2
+ export { ae as Adaptor, ac as ArrayField, E as ArrayState, as as AsFieldProps, Y as BaseData, a6 as BaseField, ag as CacheOpts, K as ComponentConfigExtensions, X as ComponentConfigParams, a1 as ComponentDataMap, $ as ComponentDataOptionalId, a4 as ComponentMetadata, T as ConfigParams, a2 as Content, aj as CustomField, ai as CustomFieldRender, ap as DefaultComponentProps, N as DefaultComponents, am as DefaultRootFieldProps, ao as DefaultRootProps, an as DefaultRootRenderProps, p as Direction, q as DragAxis, ah as ExternalField, af as ExternalFieldWithAdaptor, Q as ExtractConfigParams, au as ExtractField, a5 as FieldMetadata, z as FieldRenderFunctions, v as FieldTransformFn, u as FieldTransformFnParams, B as ItemWithId, a0 as MappedItem, a8 as NumberField, ad as ObjectField, y as OverrideKey, J as PuckComponent, al as PuckContext, a3 as PuckMetadata, ab as RadioField, L as RootConfig, _ as RootData, Z as RootDataWithoutProps, aa as SelectField, S as Slot, G as SlotComponent, ak as SlotField, a7 as TextField, a9 as TextareaField, s as Viewport, at as WithChildren, aq as WithId, ar as WithPuckProps, W as WithSlotProps, m as migrate, x as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-CI7CLsRf.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, { ReactNode, SyntheticEvent, ReactElement, CSSProperties } from 'react';
6
6
 
7
7
  type HistorySlice<D = any> = {
8
8
  index: number;
@@ -76,6 +76,7 @@ type ComponentState = Record<string, {
76
76
  loadingCount: number;
77
77
  }>;
78
78
  type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
79
+ instanceId: string;
79
80
  state: G["UserAppState"];
80
81
  dispatch: (action: PuckAction) => void;
81
82
  config: UserConfig;
@@ -185,7 +186,7 @@ declare const Drawer: {
185
186
 
186
187
  declare const DropZone: react.ForwardRefExoticComponent<DropZoneProps & react.RefAttributes<HTMLDivElement>>;
187
188
 
188
- declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
189
+ declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, suppressHydrationWarning, }: {
189
190
  children: ReactNode;
190
191
  href?: string;
191
192
  onClick?: (e: SyntheticEvent) => void | Promise<void>;
@@ -196,6 +197,7 @@ declare const IconButton: ({ children, href, onClick, variant, type, disabled, t
196
197
  newTab?: boolean;
197
198
  fullWidth?: boolean;
198
199
  title: string;
200
+ suppressHydrationWarning?: boolean;
199
201
  }) => react_jsx_runtime.JSX.Element;
200
202
 
201
203
  type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
@@ -228,6 +230,8 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
228
230
  };
229
231
  initialHistory?: InitialHistory;
230
232
  metadata?: Metadata;
233
+ height?: CSSProperties["height"];
234
+ _experimentalFullScreenCanvas?: boolean;
231
235
  };
232
236
  declare function Puck<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: PuckProps<UserConfig>): react_jsx_runtime.JSX.Element;
233
237
  declare namespace Puck {
@@ -304,4 +308,12 @@ declare function usePuck<UserConfig extends Config = Config>(): UsePuckStore<Use
304
308
  */
305
309
  declare function useGetPuck(): () => UsePuckStore<Config>;
306
310
 
307
- 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, createUsePuck, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck };
311
+ declare const blocksPlugin: () => Plugin;
312
+
313
+ declare const fieldsPlugin: (params?: {
314
+ mobileOnly?: boolean;
315
+ }) => PluginInternal;
316
+
317
+ declare const outlinePlugin: () => Plugin;
318
+
319
+ 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, 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, h as Field, i as FieldProps, D as DropZoneProps, j as Data, k as OnAction, l as InitialHistory, n as ItemSelector } from './walk-tree-CgWnYC1X.js';
2
- export { ad as Adaptor, ab as ArrayField, B as ArrayState, ar as AsFieldProps, X as BaseData, a5 as BaseField, af as CacheOpts, J as ComponentConfigExtensions, T as ComponentConfigParams, a0 as ComponentDataMap, _ as ComponentDataOptionalId, a3 as ComponentMetadata, Q as ConfigParams, a1 as Content, ai as CustomField, ah as CustomFieldRender, ao as DefaultComponentProps, L as DefaultComponents, al as DefaultRootFieldProps, an as DefaultRootProps, am as DefaultRootRenderProps, o as Direction, p as DragAxis, ag as ExternalField, ae as ExternalFieldWithAdaptor, N as ExtractConfigParams, at as ExtractField, a4 as FieldMetadata, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, z as ItemWithId, $ as MappedItem, a7 as NumberField, ac as ObjectField, x as OverrideKey, G as PuckComponent, ak as PuckContext, a2 as PuckMetadata, aa as RadioField, K as RootConfig, Z as RootData, Y as RootDataWithoutProps, a9 as SelectField, S as Slot, E as SlotComponent, aj as SlotField, a6 as TextField, a8 as TextareaField, q as Viewport, as as WithChildren, ap as WithId, aq as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-CgWnYC1X.js';
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, h as Field, i as FieldProps, D as DropZoneProps, j as Data, k as OnAction, l as InitialHistory, n as ItemSelector, o as PluginInternal } from './walk-tree-CI7CLsRf.js';
2
+ export { ae as Adaptor, ac as ArrayField, E as ArrayState, as as AsFieldProps, Y as BaseData, a6 as BaseField, ag as CacheOpts, K as ComponentConfigExtensions, X as ComponentConfigParams, a1 as ComponentDataMap, $ as ComponentDataOptionalId, a4 as ComponentMetadata, T as ConfigParams, a2 as Content, aj as CustomField, ai as CustomFieldRender, ap as DefaultComponentProps, N as DefaultComponents, am as DefaultRootFieldProps, ao as DefaultRootProps, an as DefaultRootRenderProps, p as Direction, q as DragAxis, ah as ExternalField, af as ExternalFieldWithAdaptor, Q as ExtractConfigParams, au as ExtractField, a5 as FieldMetadata, z as FieldRenderFunctions, v as FieldTransformFn, u as FieldTransformFnParams, B as ItemWithId, a0 as MappedItem, a8 as NumberField, ad as ObjectField, y as OverrideKey, J as PuckComponent, al as PuckContext, a3 as PuckMetadata, ab as RadioField, L as RootConfig, _ as RootData, Z as RootDataWithoutProps, aa as SelectField, S as Slot, G as SlotComponent, ak as SlotField, a7 as TextField, a9 as TextareaField, s as Viewport, at as WithChildren, aq as WithId, ar as WithPuckProps, W as WithSlotProps, m as migrate, x as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-CI7CLsRf.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, { ReactNode, SyntheticEvent, ReactElement, CSSProperties } from 'react';
6
6
 
7
7
  type HistorySlice<D = any> = {
8
8
  index: number;
@@ -76,6 +76,7 @@ type ComponentState = Record<string, {
76
76
  loadingCount: number;
77
77
  }>;
78
78
  type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
79
+ instanceId: string;
79
80
  state: G["UserAppState"];
80
81
  dispatch: (action: PuckAction) => void;
81
82
  config: UserConfig;
@@ -185,7 +186,7 @@ declare const Drawer: {
185
186
 
186
187
  declare const DropZone: react.ForwardRefExoticComponent<DropZoneProps & react.RefAttributes<HTMLDivElement>>;
187
188
 
188
- declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
189
+ declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, suppressHydrationWarning, }: {
189
190
  children: ReactNode;
190
191
  href?: string;
191
192
  onClick?: (e: SyntheticEvent) => void | Promise<void>;
@@ -196,6 +197,7 @@ declare const IconButton: ({ children, href, onClick, variant, type, disabled, t
196
197
  newTab?: boolean;
197
198
  fullWidth?: boolean;
198
199
  title: string;
200
+ suppressHydrationWarning?: boolean;
199
201
  }) => react_jsx_runtime.JSX.Element;
200
202
 
201
203
  type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
@@ -228,6 +230,8 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
228
230
  };
229
231
  initialHistory?: InitialHistory;
230
232
  metadata?: Metadata;
233
+ height?: CSSProperties["height"];
234
+ _experimentalFullScreenCanvas?: boolean;
231
235
  };
232
236
  declare function Puck<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: PuckProps<UserConfig>): react_jsx_runtime.JSX.Element;
233
237
  declare namespace Puck {
@@ -304,4 +308,12 @@ declare function usePuck<UserConfig extends Config = Config>(): UsePuckStore<Use
304
308
  */
305
309
  declare function useGetPuck(): () => UsePuckStore<Config>;
306
310
 
307
- 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, createUsePuck, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck };
311
+ declare const blocksPlugin: () => Plugin;
312
+
313
+ declare const fieldsPlugin: (params?: {
314
+ mobileOnly?: boolean;
315
+ }) => PluginInternal;
316
+
317
+ declare const outlinePlugin: () => Plugin;
318
+
319
+ 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, createUsePuck, fieldsPlugin, outlinePlugin, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck };