@measured/puck 0.21.0-canary.a3dabae1 → 0.21.0-canary.bd7b613d

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.
@@ -24,7 +24,7 @@ import {
24
24
  walkAppState,
25
25
  walkField,
26
26
  walkTree
27
- } from "./chunk-C24EBUN6.mjs";
27
+ } from "./chunk-FPQ7BWRD.mjs";
28
28
 
29
29
  // ../../node_modules/classnames/index.js
30
30
  var require_classnames = __commonJS({
@@ -111,7 +111,7 @@ var walkField = ({
111
111
  config,
112
112
  recurseSlots = false
113
113
  }) => {
114
- var _a, _b, _c, _d, _e;
114
+ var _a, _b, _c, _d;
115
115
  const fieldType = (_a = fields[propKey]) == null ? void 0 : _a.type;
116
116
  const map = mappers[fieldType];
117
117
  if (map && fieldType === "slot") {
@@ -121,10 +121,10 @@ var walkField = ({
121
121
  for (let i = 0; i < content.length; i++) {
122
122
  const el = content[i];
123
123
  const componentConfig = config.components[el.type];
124
- if (!componentConfig || !((_b = el.props) == null ? void 0 : _b.id)) {
124
+ if (!componentConfig) {
125
125
  continue;
126
126
  }
127
- const fields2 = (_c = componentConfig.fields) != null ? _c : {};
127
+ const fields2 = (_b = componentConfig.fields) != null ? _b : {};
128
128
  mappedContent.push(
129
129
  walkField({
130
130
  value: __spreadProps(__spreadValues({}, el), { props: defaultSlots(el.props, fields2) }),
@@ -158,7 +158,7 @@ var walkField = ({
158
158
  }
159
159
  if (value && typeof value === "object") {
160
160
  if (Array.isArray(value)) {
161
- const arrayFields = ((_d = fields[propKey]) == null ? void 0 : _d.type) === "array" ? fields[propKey].arrayFields : null;
161
+ const arrayFields = ((_c = fields[propKey]) == null ? void 0 : _c.type) === "array" ? fields[propKey].arrayFields : null;
162
162
  if (!arrayFields) return value;
163
163
  const newValue = value.map(
164
164
  (el, idx) => walkField({
@@ -179,7 +179,7 @@ var walkField = ({
179
179
  } else if ("$$typeof" in value) {
180
180
  return value;
181
181
  } else {
182
- const objectFields = ((_e = fields[propKey]) == null ? void 0 : _e.type) === "object" ? fields[propKey].objectFields : fields;
182
+ const objectFields = ((_d = fields[propKey]) == null ? void 0 : _d.type) === "object" ? fields[propKey].objectFields : fields;
183
183
  return walkObject({
184
184
  value,
185
185
  fields: objectFields,
package/dist/index.js CHANGED
@@ -868,7 +868,7 @@ var walkField = ({
868
868
  config,
869
869
  recurseSlots = false
870
870
  }) => {
871
- var _a, _b, _c, _d, _e;
871
+ var _a, _b, _c, _d;
872
872
  const fieldType = (_a = fields[propKey]) == null ? void 0 : _a.type;
873
873
  const map = mappers[fieldType];
874
874
  if (map && fieldType === "slot") {
@@ -878,10 +878,10 @@ var walkField = ({
878
878
  for (let i = 0; i < content.length; i++) {
879
879
  const el = content[i];
880
880
  const componentConfig = config.components[el.type];
881
- if (!componentConfig || !((_b = el.props) == null ? void 0 : _b.id)) {
881
+ if (!componentConfig) {
882
882
  continue;
883
883
  }
884
- const fields2 = (_c = componentConfig.fields) != null ? _c : {};
884
+ const fields2 = (_b = componentConfig.fields) != null ? _b : {};
885
885
  mappedContent.push(
886
886
  walkField({
887
887
  value: __spreadProps(__spreadValues({}, el), { props: defaultSlots(el.props, fields2) }),
@@ -915,7 +915,7 @@ var walkField = ({
915
915
  }
916
916
  if (value && typeof value === "object") {
917
917
  if (Array.isArray(value)) {
918
- const arrayFields = ((_d = fields[propKey]) == null ? void 0 : _d.type) === "array" ? fields[propKey].arrayFields : null;
918
+ const arrayFields = ((_c = fields[propKey]) == null ? void 0 : _c.type) === "array" ? fields[propKey].arrayFields : null;
919
919
  if (!arrayFields) return value;
920
920
  const newValue = value.map(
921
921
  (el, idx) => walkField({
@@ -936,7 +936,7 @@ var walkField = ({
936
936
  } else if ("$$typeof" in value) {
937
937
  return value;
938
938
  } else {
939
- const objectFields = ((_e = fields[propKey]) == null ? void 0 : _e.type) === "object" ? fields[propKey].objectFields : fields;
939
+ const objectFields = ((_d = fields[propKey]) == null ? void 0 : _d.type) === "object" ? fields[propKey].objectFields : fields;
940
940
  return walkObject({
941
941
  value,
942
942
  fields: objectFields,
package/dist/index.mjs CHANGED
@@ -21,14 +21,14 @@ import {
21
21
  setDeep,
22
22
  useGetPuck,
23
23
  usePuck
24
- } from "./chunk-V2FU5KB6.mjs";
24
+ } from "./chunk-DBHXESEC.mjs";
25
25
  import {
26
26
  init_react_import,
27
27
  migrate,
28
28
  resolveAllData,
29
29
  transformProps,
30
30
  walkTree
31
- } from "./chunk-C24EBUN6.mjs";
31
+ } from "./chunk-FPQ7BWRD.mjs";
32
32
 
33
33
  // bundle/index.ts
34
34
  init_react_import();
@@ -868,7 +868,7 @@ var walkField = ({
868
868
  config,
869
869
  recurseSlots = false
870
870
  }) => {
871
- var _a, _b, _c, _d, _e;
871
+ var _a, _b, _c, _d;
872
872
  const fieldType = (_a = fields[propKey]) == null ? void 0 : _a.type;
873
873
  const map = mappers[fieldType];
874
874
  if (map && fieldType === "slot") {
@@ -878,10 +878,10 @@ var walkField = ({
878
878
  for (let i = 0; i < content.length; i++) {
879
879
  const el = content[i];
880
880
  const componentConfig = config.components[el.type];
881
- if (!componentConfig || !((_b = el.props) == null ? void 0 : _b.id)) {
881
+ if (!componentConfig) {
882
882
  continue;
883
883
  }
884
- const fields2 = (_c = componentConfig.fields) != null ? _c : {};
884
+ const fields2 = (_b = componentConfig.fields) != null ? _b : {};
885
885
  mappedContent.push(
886
886
  walkField({
887
887
  value: __spreadProps(__spreadValues({}, el), { props: defaultSlots(el.props, fields2) }),
@@ -915,7 +915,7 @@ var walkField = ({
915
915
  }
916
916
  if (value && typeof value === "object") {
917
917
  if (Array.isArray(value)) {
918
- const arrayFields = ((_d = fields[propKey]) == null ? void 0 : _d.type) === "array" ? fields[propKey].arrayFields : null;
918
+ const arrayFields = ((_c = fields[propKey]) == null ? void 0 : _c.type) === "array" ? fields[propKey].arrayFields : null;
919
919
  if (!arrayFields) return value;
920
920
  const newValue = value.map(
921
921
  (el, idx) => walkField({
@@ -936,7 +936,7 @@ var walkField = ({
936
936
  } else if ("$$typeof" in value) {
937
937
  return value;
938
938
  } else {
939
- const objectFields = ((_e = fields[propKey]) == null ? void 0 : _e.type) === "object" ? fields[propKey].objectFields : fields;
939
+ const objectFields = ((_d = fields[propKey]) == null ? void 0 : _d.type) === "object" ? fields[propKey].objectFields : fields;
940
940
  return walkObject({
941
941
  value,
942
942
  fields: objectFields,
@@ -21,14 +21,14 @@ import {
21
21
  setDeep,
22
22
  useGetPuck,
23
23
  usePuck
24
- } from "./chunk-V2FU5KB6.mjs";
24
+ } from "./chunk-DBHXESEC.mjs";
25
25
  import {
26
26
  init_react_import,
27
27
  migrate,
28
28
  resolveAllData,
29
29
  transformProps,
30
30
  walkTree
31
- } from "./chunk-C24EBUN6.mjs";
31
+ } from "./chunk-FPQ7BWRD.mjs";
32
32
 
33
33
  // bundle/no-external.ts
34
34
  init_react_import();
package/dist/rsc.js CHANGED
@@ -130,7 +130,7 @@ var walkField = ({
130
130
  config,
131
131
  recurseSlots = false
132
132
  }) => {
133
- var _a, _b, _c, _d, _e;
133
+ var _a, _b, _c, _d;
134
134
  const fieldType = (_a = fields[propKey]) == null ? void 0 : _a.type;
135
135
  const map = mappers[fieldType];
136
136
  if (map && fieldType === "slot") {
@@ -140,10 +140,10 @@ var walkField = ({
140
140
  for (let i = 0; i < content.length; i++) {
141
141
  const el = content[i];
142
142
  const componentConfig = config.components[el.type];
143
- if (!componentConfig || !((_b = el.props) == null ? void 0 : _b.id)) {
143
+ if (!componentConfig) {
144
144
  continue;
145
145
  }
146
- const fields2 = (_c = componentConfig.fields) != null ? _c : {};
146
+ const fields2 = (_b = componentConfig.fields) != null ? _b : {};
147
147
  mappedContent.push(
148
148
  walkField({
149
149
  value: __spreadProps(__spreadValues({}, el), { props: defaultSlots(el.props, fields2) }),
@@ -177,7 +177,7 @@ var walkField = ({
177
177
  }
178
178
  if (value && typeof value === "object") {
179
179
  if (Array.isArray(value)) {
180
- const arrayFields = ((_d = fields[propKey]) == null ? void 0 : _d.type) === "array" ? fields[propKey].arrayFields : null;
180
+ const arrayFields = ((_c = fields[propKey]) == null ? void 0 : _c.type) === "array" ? fields[propKey].arrayFields : null;
181
181
  if (!arrayFields) return value;
182
182
  const newValue = value.map(
183
183
  (el, idx) => walkField({
@@ -198,7 +198,7 @@ var walkField = ({
198
198
  } else if ("$$typeof" in value) {
199
199
  return value;
200
200
  } else {
201
- const objectFields = ((_e = fields[propKey]) == null ? void 0 : _e.type) === "object" ? fields[propKey].objectFields : fields;
201
+ const objectFields = ((_d = fields[propKey]) == null ? void 0 : _d.type) === "object" ? fields[propKey].objectFields : fields;
202
202
  return walkObject({
203
203
  value,
204
204
  fields: objectFields,
package/dist/rsc.mjs CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  transformProps,
13
13
  useSlots,
14
14
  walkTree
15
- } from "./chunk-C24EBUN6.mjs";
15
+ } from "./chunk-FPQ7BWRD.mjs";
16
16
 
17
17
  // bundle/rsc.tsx
18
18
  init_react_import();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck",
3
- "version": "0.21.0-canary.a3dabae1",
3
+ "version": "0.21.0-canary.bd7b613d",
4
4
  "description": "The open-source visual editor for React",
5
5
  "author": "Chris Villa <chris@puckeditor.com>",
6
6
  "repository": "measuredco/puck",