@puckeditor/plugin-heading-analyzer 0.22.1-canary.1a601e70 → 0.22.1-canary.5f5b18aa

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.js CHANGED
@@ -544,7 +544,7 @@ var walkField = ({
544
544
  config,
545
545
  recurseSlots = false
546
546
  }) => {
547
- var _a, _b, _c, _d;
547
+ var _a, _b, _c;
548
548
  const fieldType = (_a = fields[propKey]) == null ? void 0 : _a.type;
549
549
  const map = mappers[fieldType];
550
550
  if (map && fieldType === "slot") {
@@ -605,9 +605,7 @@ var walkField = ({
605
605
  id,
606
606
  getPropPath: (k) => `${propPath}.${k}`,
607
607
  config,
608
- recurseSlots,
609
- // Only default missing fields when objectFields describe this value
610
- ownedFields: ((_d = fields[propKey]) == null ? void 0 : _d.type) === "object"
608
+ recurseSlots
611
609
  });
612
610
  }
613
611
  }
@@ -620,21 +618,11 @@ var walkObject = ({
620
618
  id,
621
619
  getPropPath,
622
620
  config,
623
- recurseSlots,
624
- ownedFields
621
+ recurseSlots
625
622
  }) => {
626
- const keys2 = Object.keys(value);
627
- if (ownedFields) {
628
- for (const fieldName in fields) {
629
- const fieldType = fields[fieldName].type;
630
- if (fieldType !== "slot" && mappers[fieldType] && !(fieldName in value)) {
631
- keys2.push(fieldName);
632
- }
633
- }
634
- }
635
- const newProps = keys2.map((k) => {
623
+ const newProps = Object.entries(value).map(([k, v]) => {
636
624
  const opts = {
637
- value: value[k],
625
+ value: v,
638
626
  fields,
639
627
  mappers,
640
628
  propKey: k,
@@ -669,8 +657,7 @@ function mapFields(item, mappers, config, recurseSlots = false, shouldDefaultSlo
669
657
  id: item.props ? (_e = item.props.id) != null ? _e : "root" : "root",
670
658
  getPropPath: (k) => k,
671
659
  config,
672
- recurseSlots,
673
- ownedFields: true
660
+ recurseSlots
674
661
  });
675
662
  if (isPromise(newProps)) {
676
663
  return newProps.then((resolvedProps) => __spreadProps(__spreadValues({}, item), {
package/dist/index.mjs CHANGED
@@ -532,7 +532,7 @@ var walkField = ({
532
532
  config,
533
533
  recurseSlots = false
534
534
  }) => {
535
- var _a, _b, _c, _d;
535
+ var _a, _b, _c;
536
536
  const fieldType = (_a = fields[propKey]) == null ? void 0 : _a.type;
537
537
  const map = mappers[fieldType];
538
538
  if (map && fieldType === "slot") {
@@ -593,9 +593,7 @@ var walkField = ({
593
593
  id,
594
594
  getPropPath: (k) => `${propPath}.${k}`,
595
595
  config,
596
- recurseSlots,
597
- // Only default missing fields when objectFields describe this value
598
- ownedFields: ((_d = fields[propKey]) == null ? void 0 : _d.type) === "object"
596
+ recurseSlots
599
597
  });
600
598
  }
601
599
  }
@@ -608,21 +606,11 @@ var walkObject = ({
608
606
  id,
609
607
  getPropPath,
610
608
  config,
611
- recurseSlots,
612
- ownedFields
609
+ recurseSlots
613
610
  }) => {
614
- const keys2 = Object.keys(value);
615
- if (ownedFields) {
616
- for (const fieldName in fields) {
617
- const fieldType = fields[fieldName].type;
618
- if (fieldType !== "slot" && mappers[fieldType] && !(fieldName in value)) {
619
- keys2.push(fieldName);
620
- }
621
- }
622
- }
623
- const newProps = keys2.map((k) => {
611
+ const newProps = Object.entries(value).map(([k, v]) => {
624
612
  const opts = {
625
- value: value[k],
613
+ value: v,
626
614
  fields,
627
615
  mappers,
628
616
  propKey: k,
@@ -657,8 +645,7 @@ function mapFields(item, mappers, config, recurseSlots = false, shouldDefaultSlo
657
645
  id: item.props ? (_e = item.props.id) != null ? _e : "root" : "root",
658
646
  getPropPath: (k) => k,
659
647
  config,
660
- recurseSlots,
661
- ownedFields: true
648
+ recurseSlots
662
649
  });
663
650
  if (isPromise(newProps)) {
664
651
  return newProps.then((resolvedProps) => __spreadProps(__spreadValues({}, item), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@puckeditor/plugin-heading-analyzer",
3
- "version": "0.22.1-canary.1a601e70",
3
+ "version": "0.22.1-canary.5f5b18aa",
4
4
  "author": "Chris Villa <chris@puckeditor.com>",
5
5
  "repository": "puckeditor/puck",
6
6
  "bugs": "https://github.com/puckeditor/puck/issues",
@@ -25,7 +25,7 @@
25
25
  "dist"
26
26
  ],
27
27
  "devDependencies": {
28
- "@puckeditor/core": "^0.22.1-canary.1a601e70",
28
+ "@puckeditor/core": "^0.22.1-canary.5f5b18aa",
29
29
  "@types/minimatch": "3.0.5",
30
30
  "@types/react": "^19.0.1",
31
31
  "@types/react-dom": "^19.0.2",