@measured/puck 0.16.2-canary.6adab65 → 0.16.2-canary.a1988b5

Sign up to get free protection for your applications and to get access to all the features.
@@ -224,7 +224,7 @@ var setupZone = (data, zoneKey) => {
224
224
  return data;
225
225
  }
226
226
  const newData = __spreadProps(__spreadValues({}, data), {
227
- zones: data.zones || {}
227
+ zones: data.zones ? __spreadValues({}, data.zones) : {}
228
228
  });
229
229
  newData.zones[zoneKey] = newData.zones[zoneKey] || [];
230
230
  return newData;
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as Field, a as FieldProps, C as Config, D as Data, I as ItemSelector, P as PuckAction, b as DropZoneProps, U as UserGenerics, c as UiState, O as OnAction, d as Permissions, e as Plugin, f as Overrides, V as Viewports, g as IframeConfig, h as InitialHistory, i as DefaultComponentProps, j as DefaultRootFieldProps, H as History, A as AppState, E as ExtractPropsFromConfig, k as ExtractRootPropsFromConfig, l as ComponentDataMap } from './resolve-all-data-CaDAfEAK.mjs';
2
- export { L as Adaptor, J as ArrayField, r as ArrayState, a2 as AsFieldProps, B as BaseData, y as BaseField, t as ComponentConfig, w as ComponentData, x as Content, X as CustomField, $ as DefaultRootProps, _ as DefaultRootRenderProps, W as ExternalField, Q as ExternalFieldWithAdaptor, p as FieldRenderFunctions, Y as Fields, q as ItemWithId, M as MappedItem, N as NumberField, K as ObjectField, n as OverrideKey, s as PuckComponent, Z as PuckContext, G as RadioField, v as RootData, R as RootDataWithProps, u as RootDataWithoutProps, S as SelectField, T as TextField, z as TextareaField, m as Viewport, a3 as WithChildren, a0 as WithId, a1 as WithPuckProps, o as overrideKeys, a4 as resolveAllData } from './resolve-all-data-CaDAfEAK.mjs';
1
+ import { F as FieldProps, a as Field, C as Config, D as Data, I as ItemSelector, P as PuckAction, b as DropZoneProps, U as UserGenerics, c as UiState, O as OnAction, d as Permissions, e as Plugin, f as Overrides, V as Viewports, g as IframeConfig, h as InitialHistory, i as DefaultComponentProps, j as DefaultRootFieldProps, H as History, A as AppState, E as ExtractPropsFromConfig, k as ExtractRootPropsFromConfig, l as ComponentDataMap } from './resolve-all-data-BoWgijLi.mjs';
2
+ export { L as Adaptor, J as ArrayField, r as ArrayState, a2 as AsFieldProps, B as BaseData, y as BaseField, t as ComponentConfig, w as ComponentData, x as Content, X as CustomField, $ as DefaultRootProps, _ as DefaultRootRenderProps, W as ExternalField, Q as ExternalFieldWithAdaptor, p as FieldRenderFunctions, Y as Fields, q as ItemWithId, M as MappedItem, N as NumberField, K as ObjectField, n as OverrideKey, s as PuckComponent, Z as PuckContext, G as RadioField, v as RootData, R as RootDataWithProps, u as RootDataWithoutProps, S as SelectField, T as TextField, z as TextareaField, m as Viewport, a3 as WithChildren, a0 as WithId, a1 as WithPuckProps, o as overrideKeys, a4 as resolveAllData } from './resolve-all-data-BoWgijLi.mjs';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import { ReactNode, SyntheticEvent, ReactElement, CSSProperties } from 'react';
@@ -36,29 +36,8 @@ declare const FieldLabel: ({ children, icon, label, el, readOnly, className, }:
36
36
  readOnly?: boolean;
37
37
  className?: string;
38
38
  }) => react_jsx_runtime.JSX.Element;
39
- type FieldLabelPropsInternal = {
40
- children?: ReactNode;
41
- icon?: ReactNode;
42
- label?: string;
43
- el?: "label" | "div";
44
- readOnly?: boolean;
45
- };
46
- declare const FieldLabelInternal: ({ children, icon, label, el, readOnly, }: FieldLabelPropsInternal) => react_jsx_runtime.JSX.Element;
47
- type FieldPropsInternalOptional<ValueType = any, F = Field<any>> = FieldProps<ValueType, F> & {
48
- Label?: React.FC<FieldLabelPropsInternal>;
49
- label?: string;
50
- name?: string;
51
- };
52
- type FieldPropsInternal<ValueType = any, F = Field<any>> = FieldProps<ValueType, F> & {
53
- Label: React.FC<FieldLabelPropsInternal>;
54
- label?: string;
55
- id: string;
56
- name?: string;
57
- };
58
- declare function AutoFieldPrivate<ValueType = any, FieldType extends Field<ValueType> = Field<ValueType>>(props: FieldPropsInternalOptional<ValueType, FieldType> & {
59
- Label?: React.FC<FieldLabelPropsInternal>;
60
- }): react_jsx_runtime.JSX.Element;
61
- declare function AutoField<ValueType = any, FieldType extends Field<ValueType> = Field<ValueType>>(props: FieldProps<ValueType, FieldType>): react_jsx_runtime.JSX.Element;
39
+ type FieldNoLabel<Props extends any = any> = Omit<Field<Props>, "label">;
40
+ declare function AutoField<ValueType = any, FieldType extends FieldNoLabel<ValueType> = FieldNoLabel<ValueType>>(props: FieldProps<ValueType, FieldType>): react_jsx_runtime.JSX.Element;
62
41
 
63
42
  declare const Button: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, icon, size, loading: loadingProp, }: {
64
43
  children: ReactNode;
@@ -245,4 +224,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
245
224
  selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
246
225
  };
247
226
 
248
- export { Action, ActionBar, AppState, AutoField, AutoFieldPrivate, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone, DropZoneProvider, ExtractPropsFromConfig, ExtractRootPropsFromConfig, Field, FieldLabel, FieldLabelInternal, FieldProps, type FieldPropsInternal, Group, History, IconButton, IframeConfig, InitialHistory, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, Render, UiState, UserGenerics, Viewports, dropZoneContext, migrate, transformProps, usePuck };
227
+ export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone, DropZoneProvider, ExtractPropsFromConfig, ExtractRootPropsFromConfig, Field, FieldLabel, FieldProps, Group, History, IconButton, IframeConfig, InitialHistory, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, Render, UiState, UserGenerics, Viewports, dropZoneContext, migrate, transformProps, usePuck };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as Field, a as FieldProps, C as Config, D as Data, I as ItemSelector, P as PuckAction, b as DropZoneProps, U as UserGenerics, c as UiState, O as OnAction, d as Permissions, e as Plugin, f as Overrides, V as Viewports, g as IframeConfig, h as InitialHistory, i as DefaultComponentProps, j as DefaultRootFieldProps, H as History, A as AppState, E as ExtractPropsFromConfig, k as ExtractRootPropsFromConfig, l as ComponentDataMap } from './resolve-all-data-CaDAfEAK.js';
2
- export { L as Adaptor, J as ArrayField, r as ArrayState, a2 as AsFieldProps, B as BaseData, y as BaseField, t as ComponentConfig, w as ComponentData, x as Content, X as CustomField, $ as DefaultRootProps, _ as DefaultRootRenderProps, W as ExternalField, Q as ExternalFieldWithAdaptor, p as FieldRenderFunctions, Y as Fields, q as ItemWithId, M as MappedItem, N as NumberField, K as ObjectField, n as OverrideKey, s as PuckComponent, Z as PuckContext, G as RadioField, v as RootData, R as RootDataWithProps, u as RootDataWithoutProps, S as SelectField, T as TextField, z as TextareaField, m as Viewport, a3 as WithChildren, a0 as WithId, a1 as WithPuckProps, o as overrideKeys, a4 as resolveAllData } from './resolve-all-data-CaDAfEAK.js';
1
+ import { F as FieldProps, a as Field, C as Config, D as Data, I as ItemSelector, P as PuckAction, b as DropZoneProps, U as UserGenerics, c as UiState, O as OnAction, d as Permissions, e as Plugin, f as Overrides, V as Viewports, g as IframeConfig, h as InitialHistory, i as DefaultComponentProps, j as DefaultRootFieldProps, H as History, A as AppState, E as ExtractPropsFromConfig, k as ExtractRootPropsFromConfig, l as ComponentDataMap } from './resolve-all-data-BoWgijLi.js';
2
+ export { L as Adaptor, J as ArrayField, r as ArrayState, a2 as AsFieldProps, B as BaseData, y as BaseField, t as ComponentConfig, w as ComponentData, x as Content, X as CustomField, $ as DefaultRootProps, _ as DefaultRootRenderProps, W as ExternalField, Q as ExternalFieldWithAdaptor, p as FieldRenderFunctions, Y as Fields, q as ItemWithId, M as MappedItem, N as NumberField, K as ObjectField, n as OverrideKey, s as PuckComponent, Z as PuckContext, G as RadioField, v as RootData, R as RootDataWithProps, u as RootDataWithoutProps, S as SelectField, T as TextField, z as TextareaField, m as Viewport, a3 as WithChildren, a0 as WithId, a1 as WithPuckProps, o as overrideKeys, a4 as resolveAllData } from './resolve-all-data-BoWgijLi.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import { ReactNode, SyntheticEvent, ReactElement, CSSProperties } from 'react';
@@ -36,29 +36,8 @@ declare const FieldLabel: ({ children, icon, label, el, readOnly, className, }:
36
36
  readOnly?: boolean;
37
37
  className?: string;
38
38
  }) => react_jsx_runtime.JSX.Element;
39
- type FieldLabelPropsInternal = {
40
- children?: ReactNode;
41
- icon?: ReactNode;
42
- label?: string;
43
- el?: "label" | "div";
44
- readOnly?: boolean;
45
- };
46
- declare const FieldLabelInternal: ({ children, icon, label, el, readOnly, }: FieldLabelPropsInternal) => react_jsx_runtime.JSX.Element;
47
- type FieldPropsInternalOptional<ValueType = any, F = Field<any>> = FieldProps<ValueType, F> & {
48
- Label?: React.FC<FieldLabelPropsInternal>;
49
- label?: string;
50
- name?: string;
51
- };
52
- type FieldPropsInternal<ValueType = any, F = Field<any>> = FieldProps<ValueType, F> & {
53
- Label: React.FC<FieldLabelPropsInternal>;
54
- label?: string;
55
- id: string;
56
- name?: string;
57
- };
58
- declare function AutoFieldPrivate<ValueType = any, FieldType extends Field<ValueType> = Field<ValueType>>(props: FieldPropsInternalOptional<ValueType, FieldType> & {
59
- Label?: React.FC<FieldLabelPropsInternal>;
60
- }): react_jsx_runtime.JSX.Element;
61
- declare function AutoField<ValueType = any, FieldType extends Field<ValueType> = Field<ValueType>>(props: FieldProps<ValueType, FieldType>): react_jsx_runtime.JSX.Element;
39
+ type FieldNoLabel<Props extends any = any> = Omit<Field<Props>, "label">;
40
+ declare function AutoField<ValueType = any, FieldType extends FieldNoLabel<ValueType> = FieldNoLabel<ValueType>>(props: FieldProps<ValueType, FieldType>): react_jsx_runtime.JSX.Element;
62
41
 
63
42
  declare const Button: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, icon, size, loading: loadingProp, }: {
64
43
  children: ReactNode;
@@ -245,4 +224,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
245
224
  selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
246
225
  };
247
226
 
248
- export { Action, ActionBar, AppState, AutoField, AutoFieldPrivate, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone, DropZoneProvider, ExtractPropsFromConfig, ExtractRootPropsFromConfig, Field, FieldLabel, FieldLabelInternal, FieldProps, type FieldPropsInternal, Group, History, IconButton, IframeConfig, InitialHistory, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, Render, UiState, UserGenerics, Viewports, dropZoneContext, migrate, transformProps, usePuck };
227
+ export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone, DropZoneProvider, ExtractPropsFromConfig, ExtractRootPropsFromConfig, Field, FieldLabel, FieldProps, Group, History, IconButton, IframeConfig, InitialHistory, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, Render, UiState, UserGenerics, Viewports, dropZoneContext, migrate, transformProps, usePuck };
package/dist/index.js CHANGED
@@ -149,13 +149,11 @@ __export(core_exports, {
149
149
  Action: () => Action,
150
150
  ActionBar: () => ActionBar,
151
151
  AutoField: () => AutoField,
152
- AutoFieldPrivate: () => AutoFieldPrivate,
153
152
  Button: () => Button,
154
153
  Drawer: () => Drawer,
155
154
  DropZone: () => DropZone,
156
155
  DropZoneProvider: () => DropZoneProvider,
157
156
  FieldLabel: () => FieldLabel,
158
- FieldLabelInternal: () => FieldLabelInternal2,
159
157
  Group: () => Group,
160
158
  IconButton: () => IconButton,
161
159
  Puck: () => Puck,
@@ -705,7 +703,7 @@ var setupZone = (data, zoneKey) => {
705
703
  return data;
706
704
  }
707
705
  const newData = __spreadProps(__spreadValues({}, data), {
708
- zones: data.zones || {}
706
+ zones: data.zones ? __spreadValues({}, data.zones) : {}
709
707
  });
710
708
  newData.zones[zoneKey] = newData.zones[zoneKey] || [];
711
709
  return newData;
@@ -2287,7 +2285,9 @@ var FieldLabelInternal2 = ({
2287
2285
  function AutoFieldInternal(props) {
2288
2286
  var _a, _b, _c, _d, _e, _f, _g, _h;
2289
2287
  const { overrides } = useAppContext();
2290
- const { field, label = field.label, id, Label = FieldLabelInternal2 } = props;
2288
+ const { id, Label = FieldLabelInternal2 } = props;
2289
+ const field = props.field;
2290
+ const label = field.label;
2291
2291
  const defaultId = useSafeId();
2292
2292
  const resolvedId = id || defaultId;
2293
2293
  const defaultFields = {
@@ -3699,10 +3699,10 @@ var useResolvedFields = () => {
3699
3699
  const { data } = state;
3700
3700
  const rootFields = ((_a = config.root) == null ? void 0 : _a.fields) || defaultPageFields;
3701
3701
  const componentConfig = selectedItem ? config.components[selectedItem.type] : null;
3702
- const defaultFields = selectedItem ? componentConfig == null ? void 0 : componentConfig.fields : rootFields;
3702
+ const defaultFields = (selectedItem ? componentConfig == null ? void 0 : componentConfig.fields : rootFields) || {};
3703
3703
  const rootProps = data.root.props || data.root;
3704
3704
  const [lastSelectedData, setLastSelectedData] = (0, import_react21.useState)({});
3705
- const [resolvedFields, setResolvedFields] = (0, import_react21.useState)(defaultFields || {});
3705
+ const [resolvedFields, setResolvedFields] = (0, import_react21.useState)(defaultFields);
3706
3706
  const [fieldsLoading, setFieldsLoading] = (0, import_react21.useState)(false);
3707
3707
  const defaultResolveFields = (_componentData, _params) => defaultFields;
3708
3708
  const componentData = selectedItem ? selectedItem : { props: rootProps, readOnly: data.root.readOnly };
@@ -5869,13 +5869,11 @@ var usePuck = () => {
5869
5869
  Action,
5870
5870
  ActionBar,
5871
5871
  AutoField,
5872
- AutoFieldPrivate,
5873
5872
  Button,
5874
5873
  Drawer,
5875
5874
  DropZone,
5876
5875
  DropZoneProvider,
5877
5876
  FieldLabel,
5878
- FieldLabelInternal,
5879
5877
  Group,
5880
5878
  IconButton,
5881
5879
  Puck,
package/dist/index.mjs CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  resolveRootData,
14
14
  rootDroppableId,
15
15
  setupZone
16
- } from "./chunk-YNVK2PUD.mjs";
16
+ } from "./chunk-7IH6SUIT.mjs";
17
17
 
18
18
  // ../../node_modules/classnames/index.js
19
19
  var require_classnames = __commonJS({
@@ -2098,7 +2098,9 @@ var FieldLabelInternal2 = ({
2098
2098
  function AutoFieldInternal(props) {
2099
2099
  var _a, _b, _c, _d, _e, _f, _g, _h;
2100
2100
  const { overrides } = useAppContext();
2101
- const { field, label = field.label, id, Label = FieldLabelInternal2 } = props;
2101
+ const { id, Label = FieldLabelInternal2 } = props;
2102
+ const field = props.field;
2103
+ const label = field.label;
2102
2104
  const defaultId = useSafeId();
2103
2105
  const resolvedId = id || defaultId;
2104
2106
  const defaultFields = {
@@ -3528,10 +3530,10 @@ var useResolvedFields = () => {
3528
3530
  const { data } = state;
3529
3531
  const rootFields = ((_a = config.root) == null ? void 0 : _a.fields) || defaultPageFields;
3530
3532
  const componentConfig = selectedItem ? config.components[selectedItem.type] : null;
3531
- const defaultFields = selectedItem ? componentConfig == null ? void 0 : componentConfig.fields : rootFields;
3533
+ const defaultFields = (selectedItem ? componentConfig == null ? void 0 : componentConfig.fields : rootFields) || {};
3532
3534
  const rootProps = data.root.props || data.root;
3533
3535
  const [lastSelectedData, setLastSelectedData] = useState15({});
3534
- const [resolvedFields, setResolvedFields] = useState15(defaultFields || {});
3536
+ const [resolvedFields, setResolvedFields] = useState15(defaultFields);
3535
3537
  const [fieldsLoading, setFieldsLoading] = useState15(false);
3536
3538
  const defaultResolveFields = (_componentData, _params) => defaultFields;
3537
3539
  const componentData = selectedItem ? selectedItem : { props: rootProps, readOnly: data.root.readOnly };
@@ -5669,13 +5671,11 @@ export {
5669
5671
  Action,
5670
5672
  ActionBar,
5671
5673
  AutoField,
5672
- AutoFieldPrivate,
5673
5674
  Button,
5674
5675
  Drawer,
5675
5676
  DropZone,
5676
5677
  DropZoneProvider,
5677
5678
  FieldLabel,
5678
- FieldLabelInternal2 as FieldLabelInternal,
5679
5679
  Group,
5680
5680
  IconButton,
5681
5681
  Puck,
@@ -442,4 +442,4 @@ type PuckAction = {
442
442
 
443
443
  declare function resolveAllData<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends Record<string, any> = DefaultRootFieldProps>(data: Partial<Data>, config: Config, onResolveStart?: (item: ComponentData) => void, onResolveEnd?: (item: ComponentData) => void): Promise<Data<Props, RootProps>>;
444
444
 
445
- export { type DefaultRootProps as $, type AppState as A, type BaseData as B, type Config as C, type Data as D, type ExtractPropsFromConfig as E, type Field as F, type RadioField as G, type History as H, type ItemSelector as I, type ArrayField as J, type ObjectField as K, type Adaptor as L, type MappedItem as M, type NumberField as N, type OnAction as O, type PuckAction as P, type ExternalFieldWithAdaptor as Q, type RootDataWithProps as R, type SelectField as S, type TextField as T, type UserGenerics as U, type Viewports as V, type ExternalField as W, type CustomField as X, type Fields as Y, type PuckContext as Z, type DefaultRootRenderProps as _, type FieldProps as a, type WithId as a0, type WithPuckProps as a1, type AsFieldProps as a2, type WithChildren as a3, resolveAllData as a4, type DropZoneProps as b, type UiState as c, type Permissions as d, type Plugin as e, type Overrides as f, type IframeConfig as g, type InitialHistory as h, type DefaultComponentProps as i, type DefaultRootFieldProps as j, type ExtractRootPropsFromConfig as k, type ComponentDataMap as l, type Viewport as m, type OverrideKey as n, overrideKeys as o, type FieldRenderFunctions as p, type ItemWithId as q, type ArrayState as r, type PuckComponent as s, type ComponentConfig as t, type RootDataWithoutProps as u, type RootData as v, type ComponentData as w, type Content as x, type BaseField as y, type TextareaField as z };
445
+ export { type DefaultRootProps as $, type AppState as A, type BaseData as B, type Config as C, type Data as D, type ExtractPropsFromConfig as E, type FieldProps as F, type RadioField as G, type History as H, type ItemSelector as I, type ArrayField as J, type ObjectField as K, type Adaptor as L, type MappedItem as M, type NumberField as N, type OnAction as O, type PuckAction as P, type ExternalFieldWithAdaptor as Q, type RootDataWithProps as R, type SelectField as S, type TextField as T, type UserGenerics as U, type Viewports as V, type ExternalField as W, type CustomField as X, type Fields as Y, type PuckContext as Z, type DefaultRootRenderProps as _, type Field as a, type WithId as a0, type WithPuckProps as a1, type AsFieldProps as a2, type WithChildren as a3, resolveAllData as a4, type DropZoneProps as b, type UiState as c, type Permissions as d, type Plugin as e, type Overrides as f, type IframeConfig as g, type InitialHistory as h, type DefaultComponentProps as i, type DefaultRootFieldProps as j, type ExtractRootPropsFromConfig as k, type ComponentDataMap as l, type Viewport as m, type OverrideKey as n, overrideKeys as o, type FieldRenderFunctions as p, type ItemWithId as q, type ArrayState as r, type PuckComponent as s, type ComponentConfig as t, type RootDataWithoutProps as u, type RootData as v, type ComponentData as w, type Content as x, type BaseField as y, type TextareaField as z };
@@ -442,4 +442,4 @@ type PuckAction = {
442
442
 
443
443
  declare function resolveAllData<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends Record<string, any> = DefaultRootFieldProps>(data: Partial<Data>, config: Config, onResolveStart?: (item: ComponentData) => void, onResolveEnd?: (item: ComponentData) => void): Promise<Data<Props, RootProps>>;
444
444
 
445
- export { type DefaultRootProps as $, type AppState as A, type BaseData as B, type Config as C, type Data as D, type ExtractPropsFromConfig as E, type Field as F, type RadioField as G, type History as H, type ItemSelector as I, type ArrayField as J, type ObjectField as K, type Adaptor as L, type MappedItem as M, type NumberField as N, type OnAction as O, type PuckAction as P, type ExternalFieldWithAdaptor as Q, type RootDataWithProps as R, type SelectField as S, type TextField as T, type UserGenerics as U, type Viewports as V, type ExternalField as W, type CustomField as X, type Fields as Y, type PuckContext as Z, type DefaultRootRenderProps as _, type FieldProps as a, type WithId as a0, type WithPuckProps as a1, type AsFieldProps as a2, type WithChildren as a3, resolveAllData as a4, type DropZoneProps as b, type UiState as c, type Permissions as d, type Plugin as e, type Overrides as f, type IframeConfig as g, type InitialHistory as h, type DefaultComponentProps as i, type DefaultRootFieldProps as j, type ExtractRootPropsFromConfig as k, type ComponentDataMap as l, type Viewport as m, type OverrideKey as n, overrideKeys as o, type FieldRenderFunctions as p, type ItemWithId as q, type ArrayState as r, type PuckComponent as s, type ComponentConfig as t, type RootDataWithoutProps as u, type RootData as v, type ComponentData as w, type Content as x, type BaseField as y, type TextareaField as z };
445
+ export { type DefaultRootProps as $, type AppState as A, type BaseData as B, type Config as C, type Data as D, type ExtractPropsFromConfig as E, type FieldProps as F, type RadioField as G, type History as H, type ItemSelector as I, type ArrayField as J, type ObjectField as K, type Adaptor as L, type MappedItem as M, type NumberField as N, type OnAction as O, type PuckAction as P, type ExternalFieldWithAdaptor as Q, type RootDataWithProps as R, type SelectField as S, type TextField as T, type UserGenerics as U, type Viewports as V, type ExternalField as W, type CustomField as X, type Fields as Y, type PuckContext as Z, type DefaultRootRenderProps as _, type Field as a, type WithId as a0, type WithPuckProps as a1, type AsFieldProps as a2, type WithChildren as a3, resolveAllData as a4, type DropZoneProps as b, type UiState as c, type Permissions as d, type Plugin as e, type Overrides as f, type IframeConfig as g, type InitialHistory as h, type DefaultComponentProps as i, type DefaultRootFieldProps as j, type ExtractRootPropsFromConfig as k, type ComponentDataMap as l, type Viewport as m, type OverrideKey as n, overrideKeys as o, type FieldRenderFunctions as p, type ItemWithId as q, type ArrayState as r, type PuckComponent as s, type ComponentConfig as t, type RootDataWithoutProps as u, type RootData as v, type ComponentData as w, type Content as x, type BaseField as y, type TextareaField as z };
package/dist/rsc.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as Config, D as Data } from './resolve-all-data-CaDAfEAK.mjs';
3
- export { a4 as resolveAllData } from './resolve-all-data-CaDAfEAK.mjs';
2
+ import { C as Config, D as Data } from './resolve-all-data-BoWgijLi.mjs';
3
+ export { a4 as resolveAllData } from './resolve-all-data-BoWgijLi.mjs';
4
4
  import 'react';
5
5
 
6
6
  declare function Render<UserConfig extends Config = Config>({ config, data, }: {
package/dist/rsc.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as Config, D as Data } from './resolve-all-data-CaDAfEAK.js';
3
- export { a4 as resolveAllData } from './resolve-all-data-CaDAfEAK.js';
2
+ import { C as Config, D as Data } from './resolve-all-data-BoWgijLi.js';
3
+ export { a4 as resolveAllData } from './resolve-all-data-BoWgijLi.js';
4
4
  import 'react';
5
5
 
6
6
  declare function Render<UserConfig extends Config = Config>({ config, data, }: {
package/dist/rsc.js CHANGED
@@ -84,7 +84,7 @@ var setupZone = (data, zoneKey) => {
84
84
  return data;
85
85
  }
86
86
  const newData = __spreadProps(__spreadValues({}, data), {
87
- zones: data.zones || {}
87
+ zones: data.zones ? __spreadValues({}, data.zones) : {}
88
88
  });
89
89
  newData.zones[zoneKey] = newData.zones[zoneKey] || [];
90
90
  return newData;
package/dist/rsc.mjs CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  resolveAllData,
6
6
  rootDroppableId,
7
7
  setupZone
8
- } from "./chunk-YNVK2PUD.mjs";
8
+ } from "./chunk-7IH6SUIT.mjs";
9
9
 
10
10
  // rsc.tsx
11
11
  init_react_import();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck",
3
- "version": "0.16.2-canary.6adab65",
3
+ "version": "0.16.2-canary.a1988b5",
4
4
  "author": "Measured Corporation Ltd <hello@measured.co>",
5
5
  "repository": "measuredco/puck",
6
6
  "bugs": "https://github.com/measuredco/puck/issues",