@measured/puck 0.16.2-canary.18657a4 → 0.16.2-canary.51154e9

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.js CHANGED
@@ -705,7 +705,7 @@ var setupZone = (data, zoneKey) => {
705
705
  return data;
706
706
  }
707
707
  const newData = __spreadProps(__spreadValues({}, data), {
708
- zones: data.zones || {}
708
+ zones: data.zones ? __spreadValues({}, data.zones) : {}
709
709
  });
710
710
  newData.zones[zoneKey] = newData.zones[zoneKey] || [];
711
711
  return newData;
@@ -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 };
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({
@@ -3528,10 +3528,10 @@ var useResolvedFields = () => {
3528
3528
  const { data } = state;
3529
3529
  const rootFields = ((_a = config.root) == null ? void 0 : _a.fields) || defaultPageFields;
3530
3530
  const componentConfig = selectedItem ? config.components[selectedItem.type] : null;
3531
- const defaultFields = selectedItem ? componentConfig == null ? void 0 : componentConfig.fields : rootFields;
3531
+ const defaultFields = (selectedItem ? componentConfig == null ? void 0 : componentConfig.fields : rootFields) || {};
3532
3532
  const rootProps = data.root.props || data.root;
3533
3533
  const [lastSelectedData, setLastSelectedData] = useState15({});
3534
- const [resolvedFields, setResolvedFields] = useState15(defaultFields || {});
3534
+ const [resolvedFields, setResolvedFields] = useState15(defaultFields);
3535
3535
  const [fieldsLoading, setFieldsLoading] = useState15(false);
3536
3536
  const defaultResolveFields = (_componentData, _params) => defaultFields;
3537
3537
  const componentData = selectedItem ? selectedItem : { props: rootProps, readOnly: data.root.readOnly };
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.18657a4",
3
+ "version": "0.16.2-canary.51154e9",
4
4
  "author": "Measured Corporation Ltd <hello@measured.co>",
5
5
  "repository": "measuredco/puck",
6
6
  "bugs": "https://github.com/measuredco/puck/issues",