@measured/puck 0.21.0-canary.ece26d91 → 0.21.0-canary.ed351ce5

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.
Files changed (37) hide show
  1. package/dist/{Editor-O447AVCX.mjs → Editor-CYTATURR.mjs} +7 -7
  2. package/dist/{actions-ONhOkrvf.d.mts → actions-tsxxcX1z.d.mts} +24 -9
  3. package/dist/{actions-ONhOkrvf.d.ts → actions-tsxxcX1z.d.ts} +24 -9
  4. package/dist/{chunk-T3WX7XJ6.mjs → chunk-72SA22GI.mjs} +4 -2
  5. package/dist/{chunk-2Q4PACDA.mjs → chunk-M4QBB3JM.mjs} +3 -3
  6. package/dist/{chunk-62AAYNXG.mjs → chunk-MLTVJA2A.mjs} +1 -1
  7. package/dist/{chunk-Y656T6AQ.mjs → chunk-MVJKIFF6.mjs} +1 -1
  8. package/dist/{chunk-QAWJTCV5.mjs → chunk-NOJQSXRU.mjs} +1 -1
  9. package/dist/{chunk-QBJ2LDJB.mjs → chunk-RVZLI2KP.mjs} +5109 -4487
  10. package/dist/{chunk-PLXSMBAA.mjs → chunk-UNQOU2OI.mjs} +1 -1
  11. package/dist/{chunk-DAQLMM2T.mjs → chunk-UUOBSXZR.mjs} +87 -2
  12. package/dist/{chunk-BSDEIOEK.mjs → chunk-V7333LON.mjs} +10 -8
  13. package/dist/{full-BEMDJKDS.mjs → full-GZ4L3XCF.mjs} +6 -6
  14. package/dist/{index-BEoNHRI1.d.ts → index-Ca6V6NQD.d.ts} +3 -1
  15. package/dist/{index-DfxZ7tZF.d.mts → index-mQvUCH3C.d.mts} +3 -1
  16. package/dist/index.css +696 -306
  17. package/dist/index.d.mts +28 -9
  18. package/dist/index.d.ts +28 -9
  19. package/dist/index.js +2910 -2143
  20. package/dist/index.mjs +18 -15
  21. package/dist/internal.d.mts +2 -2
  22. package/dist/internal.d.ts +2 -2
  23. package/dist/{loaded-N3FYGF2Y.mjs → loaded-2MNXXPJP.mjs} +3 -3
  24. package/dist/{loaded-JU3A7Y4L.mjs → loaded-6QT4HD2O.mjs} +3 -3
  25. package/dist/{loaded-OBY7OMS6.mjs → loaded-ZVPBQVNE.mjs} +3 -3
  26. package/dist/no-external.css +841 -447
  27. package/dist/no-external.d.mts +4 -4
  28. package/dist/no-external.d.ts +4 -4
  29. package/dist/no-external.js +2912 -2142
  30. package/dist/no-external.mjs +17 -9
  31. package/dist/rsc.d.mts +2 -2
  32. package/dist/rsc.d.ts +2 -2
  33. package/dist/rsc.js +4 -2
  34. package/dist/rsc.mjs +2 -2
  35. package/dist/{walk-tree-DHbAZ4wF.d.ts → walk-tree-Bh85NMeo.d.ts} +1 -1
  36. package/dist/{walk-tree-CdriEzFJ.d.mts → walk-tree-CDA3K5S3.d.mts} +1 -1
  37. package/package.json +3 -3
package/dist/index.d.mts CHANGED
@@ -1,10 +1,10 @@
1
- import { p as Field, q as FieldProps, r 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, s as InitialHistory, M as Metadata, t as ItemSelector, c as ComponentData } from './actions-ONhOkrvf.mjs';
2
- export { af as Adaptor, A as AppState, ad as ArrayField, L as ArrayState, aq as AsFieldProps, $ as BaseData, a7 as BaseField, ah as CacheOpts, m as ComponentConfig, T as ComponentConfigExtensions, _ as ComponentConfigParams, a3 as ComponentDataMap, a1 as ComponentDataOptionalId, a5 as ComponentMetadata, Z as ConfigParams, b as Content, ak as CustomField, aj as CustomFieldRender, e as DefaultComponentProps, d as DefaultComponents, f as DefaultRootFieldProps, ao as DefaultRootProps, an as DefaultRootRenderProps, w as Direction, x as DragAxis, ai as ExternalField, ag as ExternalFieldWithAdaptor, Y as ExtractConfigParams, as as ExtractField, a6 as FieldMetadata, J as FieldRenderFunctions, B as FieldTransformFn, z as FieldTransformFnParams, F as Fields, H as History, K as ItemWithId, a2 as MappedItem, a9 as NumberField, ae as ObjectField, G as OverrideKey, Q as PuckComponent, am as PuckContext, a4 as PuckMetadata, ac as RadioField, i as ResolveDataTrigger, v as RichText, o as RichtextField, X as RootConfig, R as RootData, h as RootDataWithProps, a0 as RootDataWithoutProps, ab as SelectField, S as Slot, N as SlotComponent, al as SlotField, a8 as TextField, aa as TextareaField, y as Viewport, ar as WithChildren, W as WithId, ap as WithPuckProps, u as WithSlotProps, E as overrideKeys } from './actions-ONhOkrvf.mjs';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-CdriEzFJ.mjs';
1
+ import { p as Field, q as FieldProps, r 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, s as InitialHistory, M as Metadata, t as ItemSelector, c as ComponentData, u as PluginInternal } from './actions-tsxxcX1z.mjs';
2
+ export { ag as Adaptor, A as AppState, ae as ArrayField, N as ArrayState, ar as AsFieldProps, a0 as BaseData, a8 as BaseField, ai as CacheOpts, m as ComponentConfig, X as ComponentConfigExtensions, $ as ComponentConfigParams, a4 as ComponentDataMap, a2 as ComponentDataOptionalId, a6 as ComponentMetadata, _ as ConfigParams, b as Content, al as CustomField, ak as CustomFieldRender, e as DefaultComponentProps, d as DefaultComponents, f as DefaultRootFieldProps, ap as DefaultRootProps, ao as DefaultRootRenderProps, x as Direction, y as DragAxis, aj as ExternalField, ah as ExternalFieldWithAdaptor, Z as ExtractConfigParams, at as ExtractField, a7 as FieldMetadata, K as FieldRenderFunctions, E as FieldTransformFn, B as FieldTransformFnParams, F as Fields, H as History, L as ItemWithId, a3 as MappedItem, aa as NumberField, af as ObjectField, J as OverrideKey, T as PuckComponent, an as PuckContext, a5 as PuckMetadata, ad as RadioField, i as ResolveDataTrigger, w as RichText, o as RichtextField, Y as RootConfig, R as RootData, h as RootDataWithProps, a1 as RootDataWithoutProps, ac as SelectField, S as Slot, Q as SlotComponent, am as SlotField, a9 as TextField, ab as TextareaField, z as Viewport, as as WithChildren, W as WithId, aq as WithPuckProps, v as WithSlotProps, G as overrideKeys } from './actions-tsxxcX1z.mjs';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-CDA3K5S3.mjs';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import * as react from 'react';
6
- import react__default, { ReactNode, SyntheticEvent, ReactElement } from 'react';
7
- import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-DfxZ7tZF.mjs';
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-mQvUCH3C.mjs';
8
8
  import '@tiptap/react';
9
9
  import '@tiptap/extension-blockquote';
10
10
  import '@tiptap/extension-bold';
@@ -64,8 +64,11 @@ declare const FieldLabel: ({ children, icon, label, el, readOnly, className, }:
64
64
  readOnly?: boolean;
65
65
  className?: string;
66
66
  }) => react_jsx_runtime.JSX.Element;
67
+
67
68
  type FieldNoLabel<Props extends any = any> = Omit<Field<Props>, "label">;
68
- declare function AutoField<ValueType = any, FieldType extends FieldNoLabel<ValueType> = FieldNoLabel<ValueType>>(props: FieldProps<FieldType, ValueType>): react_jsx_runtime.JSX.Element | null;
69
+ declare function AutoField<ValueType = any, FieldType extends FieldNoLabel<ValueType> = FieldNoLabel<ValueType>>(props: FieldProps<FieldType, ValueType> & {
70
+ value: any;
71
+ }): react_jsx_runtime.JSX.Element | null;
69
72
 
70
73
  declare const Button: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, icon, size, loading: loadingProp, ...props }: {
71
74
  children: ReactNode;
@@ -101,9 +104,9 @@ declare const Drawer: {
101
104
  }) => react_jsx_runtime.JSX.Element;
102
105
  };
103
106
 
104
- declare const DropZone: react.ForwardRefExoticComponent<DropZoneProps & react.RefAttributes<HTMLDivElement>>;
107
+ declare const DropZone: react.ForwardRefExoticComponent<Omit<DropZoneProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
105
108
 
106
- declare const IconButton: ({ active, children, href, onClick, type, disabled, tabIndex, newTab, fullWidth, title, }: {
109
+ declare const IconButton: ({ active, children, href, onClick, type, disabled, tabIndex, newTab, fullWidth, title, suppressHydrationWarning, }: {
107
110
  active?: boolean;
108
111
  children: ReactNode;
109
112
  href?: string;
@@ -114,6 +117,7 @@ declare const IconButton: ({ active, children, href, onClick, type, disabled, ta
114
117
  newTab?: boolean;
115
118
  fullWidth?: boolean;
116
119
  title: string;
120
+ suppressHydrationWarning?: boolean;
117
121
  }) => react_jsx_runtime.JSX.Element;
118
122
 
119
123
  type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
@@ -146,6 +150,8 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
146
150
  };
147
151
  initialHistory?: InitialHistory;
148
152
  metadata?: Metadata;
153
+ height?: CSSProperties["height"];
154
+ _experimentalFullScreenCanvas?: boolean;
149
155
  };
150
156
  declare function Puck<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: PuckProps<UserConfig>): react_jsx_runtime.JSX.Element;
151
157
  declare namespace Puck {
@@ -153,6 +159,9 @@ declare namespace Puck {
153
159
  var Fields: react.MemoExoticComponent<({ wrapFields }: {
154
160
  wrapFields?: boolean;
155
161
  }) => react_jsx_runtime.JSX.Element>;
162
+ var Layout: ({ children }: {
163
+ children?: ReactNode;
164
+ }) => react_jsx_runtime.JSX.Element;
156
165
  var Outline: () => react_jsx_runtime.JSX.Element;
157
166
  var Preview: ({ id }: {
158
167
  id?: string;
@@ -285,4 +294,14 @@ declare function usePuck<UserConfig extends Config = Config>(): UsePuckStore<Use
285
294
  */
286
295
  declare function useGetPuck(): () => UsePuckStore<Config>;
287
296
 
288
- 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, RichTextMenu, Separator, UiState, type UsePuckData, UserGenerics, Viewports, createUsePuck, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck };
297
+ declare const blocksPlugin: () => Plugin;
298
+
299
+ declare const fieldsPlugin: (params?: {
300
+ mobileOnly?: boolean;
301
+ }) => PluginInternal;
302
+
303
+ declare const outlinePlugin: () => Plugin;
304
+
305
+ declare const legacySideBarPlugin: () => Plugin;
306
+
307
+ 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, RichTextMenu, Separator, UiState, type UsePuckData, UserGenerics, Viewports, blocksPlugin, createUsePuck, fieldsPlugin, legacySideBarPlugin, outlinePlugin, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { p as Field, q as FieldProps, r 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, s as InitialHistory, M as Metadata, t as ItemSelector, c as ComponentData } from './actions-ONhOkrvf.js';
2
- export { af as Adaptor, A as AppState, ad as ArrayField, L as ArrayState, aq as AsFieldProps, $ as BaseData, a7 as BaseField, ah as CacheOpts, m as ComponentConfig, T as ComponentConfigExtensions, _ as ComponentConfigParams, a3 as ComponentDataMap, a1 as ComponentDataOptionalId, a5 as ComponentMetadata, Z as ConfigParams, b as Content, ak as CustomField, aj as CustomFieldRender, e as DefaultComponentProps, d as DefaultComponents, f as DefaultRootFieldProps, ao as DefaultRootProps, an as DefaultRootRenderProps, w as Direction, x as DragAxis, ai as ExternalField, ag as ExternalFieldWithAdaptor, Y as ExtractConfigParams, as as ExtractField, a6 as FieldMetadata, J as FieldRenderFunctions, B as FieldTransformFn, z as FieldTransformFnParams, F as Fields, H as History, K as ItemWithId, a2 as MappedItem, a9 as NumberField, ae as ObjectField, G as OverrideKey, Q as PuckComponent, am as PuckContext, a4 as PuckMetadata, ac as RadioField, i as ResolveDataTrigger, v as RichText, o as RichtextField, X as RootConfig, R as RootData, h as RootDataWithProps, a0 as RootDataWithoutProps, ab as SelectField, S as Slot, N as SlotComponent, al as SlotField, a8 as TextField, aa as TextareaField, y as Viewport, ar as WithChildren, W as WithId, ap as WithPuckProps, u as WithSlotProps, E as overrideKeys } from './actions-ONhOkrvf.js';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-DHbAZ4wF.js';
1
+ import { p as Field, q as FieldProps, r 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, s as InitialHistory, M as Metadata, t as ItemSelector, c as ComponentData, u as PluginInternal } from './actions-tsxxcX1z.js';
2
+ export { ag as Adaptor, A as AppState, ae as ArrayField, N as ArrayState, ar as AsFieldProps, a0 as BaseData, a8 as BaseField, ai as CacheOpts, m as ComponentConfig, X as ComponentConfigExtensions, $ as ComponentConfigParams, a4 as ComponentDataMap, a2 as ComponentDataOptionalId, a6 as ComponentMetadata, _ as ConfigParams, b as Content, al as CustomField, ak as CustomFieldRender, e as DefaultComponentProps, d as DefaultComponents, f as DefaultRootFieldProps, ap as DefaultRootProps, ao as DefaultRootRenderProps, x as Direction, y as DragAxis, aj as ExternalField, ah as ExternalFieldWithAdaptor, Z as ExtractConfigParams, at as ExtractField, a7 as FieldMetadata, K as FieldRenderFunctions, E as FieldTransformFn, B as FieldTransformFnParams, F as Fields, H as History, L as ItemWithId, a3 as MappedItem, aa as NumberField, af as ObjectField, J as OverrideKey, T as PuckComponent, an as PuckContext, a5 as PuckMetadata, ad as RadioField, i as ResolveDataTrigger, w as RichText, o as RichtextField, Y as RootConfig, R as RootData, h as RootDataWithProps, a1 as RootDataWithoutProps, ac as SelectField, S as Slot, Q as SlotComponent, am as SlotField, a9 as TextField, ab as TextareaField, z as Viewport, as as WithChildren, W as WithId, aq as WithPuckProps, v as WithSlotProps, G as overrideKeys } from './actions-tsxxcX1z.js';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Bh85NMeo.js';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import * as react from 'react';
6
- import react__default, { ReactNode, SyntheticEvent, ReactElement } from 'react';
7
- import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-BEoNHRI1.js';
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-Ca6V6NQD.js';
8
8
  import '@tiptap/react';
9
9
  import '@tiptap/extension-blockquote';
10
10
  import '@tiptap/extension-bold';
@@ -64,8 +64,11 @@ declare const FieldLabel: ({ children, icon, label, el, readOnly, className, }:
64
64
  readOnly?: boolean;
65
65
  className?: string;
66
66
  }) => react_jsx_runtime.JSX.Element;
67
+
67
68
  type FieldNoLabel<Props extends any = any> = Omit<Field<Props>, "label">;
68
- declare function AutoField<ValueType = any, FieldType extends FieldNoLabel<ValueType> = FieldNoLabel<ValueType>>(props: FieldProps<FieldType, ValueType>): react_jsx_runtime.JSX.Element | null;
69
+ declare function AutoField<ValueType = any, FieldType extends FieldNoLabel<ValueType> = FieldNoLabel<ValueType>>(props: FieldProps<FieldType, ValueType> & {
70
+ value: any;
71
+ }): react_jsx_runtime.JSX.Element | null;
69
72
 
70
73
  declare const Button: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, icon, size, loading: loadingProp, ...props }: {
71
74
  children: ReactNode;
@@ -101,9 +104,9 @@ declare const Drawer: {
101
104
  }) => react_jsx_runtime.JSX.Element;
102
105
  };
103
106
 
104
- declare const DropZone: react.ForwardRefExoticComponent<DropZoneProps & react.RefAttributes<HTMLDivElement>>;
107
+ declare const DropZone: react.ForwardRefExoticComponent<Omit<DropZoneProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
105
108
 
106
- declare const IconButton: ({ active, children, href, onClick, type, disabled, tabIndex, newTab, fullWidth, title, }: {
109
+ declare const IconButton: ({ active, children, href, onClick, type, disabled, tabIndex, newTab, fullWidth, title, suppressHydrationWarning, }: {
107
110
  active?: boolean;
108
111
  children: ReactNode;
109
112
  href?: string;
@@ -114,6 +117,7 @@ declare const IconButton: ({ active, children, href, onClick, type, disabled, ta
114
117
  newTab?: boolean;
115
118
  fullWidth?: boolean;
116
119
  title: string;
120
+ suppressHydrationWarning?: boolean;
117
121
  }) => react_jsx_runtime.JSX.Element;
118
122
 
119
123
  type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
@@ -146,6 +150,8 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
146
150
  };
147
151
  initialHistory?: InitialHistory;
148
152
  metadata?: Metadata;
153
+ height?: CSSProperties["height"];
154
+ _experimentalFullScreenCanvas?: boolean;
149
155
  };
150
156
  declare function Puck<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: PuckProps<UserConfig>): react_jsx_runtime.JSX.Element;
151
157
  declare namespace Puck {
@@ -153,6 +159,9 @@ declare namespace Puck {
153
159
  var Fields: react.MemoExoticComponent<({ wrapFields }: {
154
160
  wrapFields?: boolean;
155
161
  }) => react_jsx_runtime.JSX.Element>;
162
+ var Layout: ({ children }: {
163
+ children?: ReactNode;
164
+ }) => react_jsx_runtime.JSX.Element;
156
165
  var Outline: () => react_jsx_runtime.JSX.Element;
157
166
  var Preview: ({ id }: {
158
167
  id?: string;
@@ -285,4 +294,14 @@ declare function usePuck<UserConfig extends Config = Config>(): UsePuckStore<Use
285
294
  */
286
295
  declare function useGetPuck(): () => UsePuckStore<Config>;
287
296
 
288
- 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, RichTextMenu, Separator, UiState, type UsePuckData, UserGenerics, Viewports, createUsePuck, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck };
297
+ declare const blocksPlugin: () => Plugin;
298
+
299
+ declare const fieldsPlugin: (params?: {
300
+ mobileOnly?: boolean;
301
+ }) => PluginInternal;
302
+
303
+ declare const outlinePlugin: () => Plugin;
304
+
305
+ declare const legacySideBarPlugin: () => Plugin;
306
+
307
+ 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, RichTextMenu, Separator, UiState, type UsePuckData, UserGenerics, Viewports, blocksPlugin, createUsePuck, fieldsPlugin, legacySideBarPlugin, outlinePlugin, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck };