@measured/puck 0.21.0-canary.2e1b5267 → 0.21.0-canary.38e79ba8

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, o as PluginInternal } from './walk-tree-Cvtjzg9C.mjs';
2
- export { a8 as Adaptor, a6 as ArrayField, E as ArrayState, al as AsFieldProps, Q as BaseData, a0 as BaseField, _ as ComponentDataMap, Y as ComponentDataOptionalId, $ as Content, ac as CustomField, ab as CustomFieldRender, ai as DefaultComponentProps, L as DefaultComponents, af as DefaultRootFieldProps, ah as DefaultRootProps, ag as DefaultRootRenderProps, p as Direction, q as DragAxis, aa as ExternalField, a9 as ExternalFieldWithAdaptor, N as ExtractConfigParams, an as ExtractField, z as FieldRenderFunctions, v as FieldTransformFn, u as FieldTransformFnParams, B as ItemWithId, Z as MappedItem, a2 as NumberField, a7 as ObjectField, y as OverrideKey, J as PuckComponent, ae as PuckContext, a5 as RadioField, K as RootConfig, X as RootData, T as RootDataWithoutProps, a4 as SelectField, S as Slot, G as SlotComponent, ad as SlotField, a1 as TextField, a3 as TextareaField, s as Viewport, am as WithChildren, aj as WithId, ak as WithPuckProps, W as WithSlotProps, m as migrate, x as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Cvtjzg9C.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 } from './walk-tree-bsPSSmt9.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-bsPSSmt9.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, CSSProperties } from 'react';
5
+ import react__default, { ReactNode, SyntheticEvent, ReactElement } from 'react';
6
6
 
7
7
  type HistorySlice<D = any> = {
8
8
  index: number;
@@ -47,6 +47,7 @@ type RefreshPermissions<UserConfig extends Config = Config> = (params?: Permissi
47
47
  type Cache = Record<string, {
48
48
  lastPermissions: Partial<Permissions>;
49
49
  lastData: ComponentData | null;
50
+ lastParentId: string | null;
50
51
  }>;
51
52
  type PermissionsSlice = {
52
53
  cache: Cache;
@@ -75,7 +76,6 @@ type ComponentState = Record<string, {
75
76
  loadingCount: number;
76
77
  }>;
77
78
  type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
78
- instanceId: string;
79
79
  state: G["UserAppState"];
80
80
  dispatch: (action: PuckAction) => void;
81
81
  config: UserConfig;
@@ -228,8 +228,6 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
228
228
  };
229
229
  initialHistory?: InitialHistory;
230
230
  metadata?: Metadata;
231
- height?: CSSProperties["height"];
232
- _experimentalFullScreenCanvas?: boolean;
233
231
  };
234
232
  declare function Puck<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: PuckProps<UserConfig>): react_jsx_runtime.JSX.Element;
235
233
  declare namespace Puck {
@@ -274,6 +272,7 @@ type UsePuckData<UserConfig extends Config = Config, G extends UserGenerics<User
274
272
  getItemBySelector: (selector: ItemSelector) => G["UserComponentData"] | undefined;
275
273
  getItemById: (id: string) => G["UserComponentData"] | undefined;
276
274
  getSelectorForId: (id: string) => Required<ItemSelector> | undefined;
275
+ getParentById: (id: string) => ComponentData | undefined;
277
276
  history: {
278
277
  back: HistorySlice["back"];
279
278
  forward: HistorySlice["forward"];
@@ -305,12 +304,4 @@ declare function usePuck<UserConfig extends Config = Config>(): UsePuckStore<Use
305
304
  */
306
305
  declare function useGetPuck(): () => UsePuckStore<Config>;
307
306
 
308
- declare const blocksPlugin: () => Plugin;
309
-
310
- declare const fieldsPlugin: (params?: {
311
- mobileOnly?: boolean;
312
- }) => PluginInternal;
313
-
314
- declare const outlinePlugin: () => Plugin;
315
-
316
- 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 };
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 };
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, o as PluginInternal } from './walk-tree-Cvtjzg9C.js';
2
- export { a8 as Adaptor, a6 as ArrayField, E as ArrayState, al as AsFieldProps, Q as BaseData, a0 as BaseField, _ as ComponentDataMap, Y as ComponentDataOptionalId, $ as Content, ac as CustomField, ab as CustomFieldRender, ai as DefaultComponentProps, L as DefaultComponents, af as DefaultRootFieldProps, ah as DefaultRootProps, ag as DefaultRootRenderProps, p as Direction, q as DragAxis, aa as ExternalField, a9 as ExternalFieldWithAdaptor, N as ExtractConfigParams, an as ExtractField, z as FieldRenderFunctions, v as FieldTransformFn, u as FieldTransformFnParams, B as ItemWithId, Z as MappedItem, a2 as NumberField, a7 as ObjectField, y as OverrideKey, J as PuckComponent, ae as PuckContext, a5 as RadioField, K as RootConfig, X as RootData, T as RootDataWithoutProps, a4 as SelectField, S as Slot, G as SlotComponent, ad as SlotField, a1 as TextField, a3 as TextareaField, s as Viewport, am as WithChildren, aj as WithId, ak as WithPuckProps, W as WithSlotProps, m as migrate, x as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Cvtjzg9C.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 } from './walk-tree-bsPSSmt9.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-bsPSSmt9.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, CSSProperties } from 'react';
5
+ import react__default, { ReactNode, SyntheticEvent, ReactElement } from 'react';
6
6
 
7
7
  type HistorySlice<D = any> = {
8
8
  index: number;
@@ -47,6 +47,7 @@ type RefreshPermissions<UserConfig extends Config = Config> = (params?: Permissi
47
47
  type Cache = Record<string, {
48
48
  lastPermissions: Partial<Permissions>;
49
49
  lastData: ComponentData | null;
50
+ lastParentId: string | null;
50
51
  }>;
51
52
  type PermissionsSlice = {
52
53
  cache: Cache;
@@ -75,7 +76,6 @@ type ComponentState = Record<string, {
75
76
  loadingCount: number;
76
77
  }>;
77
78
  type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
78
- instanceId: string;
79
79
  state: G["UserAppState"];
80
80
  dispatch: (action: PuckAction) => void;
81
81
  config: UserConfig;
@@ -228,8 +228,6 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
228
228
  };
229
229
  initialHistory?: InitialHistory;
230
230
  metadata?: Metadata;
231
- height?: CSSProperties["height"];
232
- _experimentalFullScreenCanvas?: boolean;
233
231
  };
234
232
  declare function Puck<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: PuckProps<UserConfig>): react_jsx_runtime.JSX.Element;
235
233
  declare namespace Puck {
@@ -274,6 +272,7 @@ type UsePuckData<UserConfig extends Config = Config, G extends UserGenerics<User
274
272
  getItemBySelector: (selector: ItemSelector) => G["UserComponentData"] | undefined;
275
273
  getItemById: (id: string) => G["UserComponentData"] | undefined;
276
274
  getSelectorForId: (id: string) => Required<ItemSelector> | undefined;
275
+ getParentById: (id: string) => ComponentData | undefined;
277
276
  history: {
278
277
  back: HistorySlice["back"];
279
278
  forward: HistorySlice["forward"];
@@ -305,12 +304,4 @@ declare function usePuck<UserConfig extends Config = Config>(): UsePuckStore<Use
305
304
  */
306
305
  declare function useGetPuck(): () => UsePuckStore<Config>;
307
306
 
308
- declare const blocksPlugin: () => Plugin;
309
-
310
- declare const fieldsPlugin: (params?: {
311
- mobileOnly?: boolean;
312
- }) => PluginInternal;
313
-
314
- declare const outlinePlugin: () => Plugin;
315
-
316
- 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 };
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 };