@puckeditor/plugin-heading-analyzer 0.23.0-canary.7ca16bcb → 0.23.0-canary.9bf3e00a
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 +7 -5
- package/dist/index.mjs +7 -5
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -621,10 +621,11 @@ var walkObject = ({
|
|
|
621
621
|
getPropPath,
|
|
622
622
|
config,
|
|
623
623
|
recurseSlots,
|
|
624
|
-
ownedFields
|
|
624
|
+
ownedFields,
|
|
625
|
+
keysToWalk: providedKeys
|
|
625
626
|
}) => {
|
|
626
|
-
const keys2 = Object.keys(value);
|
|
627
|
-
if (ownedFields) {
|
|
627
|
+
const keys2 = providedKeys != null ? providedKeys : Object.keys(value);
|
|
628
|
+
if (!providedKeys && ownedFields) {
|
|
628
629
|
for (const fieldName in fields) {
|
|
629
630
|
const fieldType = fields[fieldName].type;
|
|
630
631
|
if (fieldType !== "slot" && mappers[fieldType] && !(fieldName in value)) {
|
|
@@ -658,7 +659,7 @@ var walkObject = ({
|
|
|
658
659
|
}
|
|
659
660
|
return flatten(newProps);
|
|
660
661
|
};
|
|
661
|
-
function mapFields(item, mappers, config, recurseSlots = false, shouldDefaultSlots = true) {
|
|
662
|
+
function mapFields(item, mappers, config, recurseSlots = false, shouldDefaultSlots = true, fieldsToMap) {
|
|
662
663
|
var _a, _b, _c, _d, _e;
|
|
663
664
|
const itemType = "type" in item ? item.type : "root";
|
|
664
665
|
const componentConfig = itemType === "root" ? config.root : (_a = config.components) == null ? void 0 : _a[itemType];
|
|
@@ -670,7 +671,8 @@ function mapFields(item, mappers, config, recurseSlots = false, shouldDefaultSlo
|
|
|
670
671
|
getPropPath: (k) => k,
|
|
671
672
|
config,
|
|
672
673
|
recurseSlots,
|
|
673
|
-
ownedFields: true
|
|
674
|
+
ownedFields: true,
|
|
675
|
+
keysToWalk: fieldsToMap
|
|
674
676
|
});
|
|
675
677
|
if (isPromise(newProps)) {
|
|
676
678
|
return newProps.then((resolvedProps) => __spreadProps(__spreadValues({}, item), {
|
package/dist/index.mjs
CHANGED
|
@@ -609,10 +609,11 @@ var walkObject = ({
|
|
|
609
609
|
getPropPath,
|
|
610
610
|
config,
|
|
611
611
|
recurseSlots,
|
|
612
|
-
ownedFields
|
|
612
|
+
ownedFields,
|
|
613
|
+
keysToWalk: providedKeys
|
|
613
614
|
}) => {
|
|
614
|
-
const keys2 = Object.keys(value);
|
|
615
|
-
if (ownedFields) {
|
|
615
|
+
const keys2 = providedKeys != null ? providedKeys : Object.keys(value);
|
|
616
|
+
if (!providedKeys && ownedFields) {
|
|
616
617
|
for (const fieldName in fields) {
|
|
617
618
|
const fieldType = fields[fieldName].type;
|
|
618
619
|
if (fieldType !== "slot" && mappers[fieldType] && !(fieldName in value)) {
|
|
@@ -646,7 +647,7 @@ var walkObject = ({
|
|
|
646
647
|
}
|
|
647
648
|
return flatten(newProps);
|
|
648
649
|
};
|
|
649
|
-
function mapFields(item, mappers, config, recurseSlots = false, shouldDefaultSlots = true) {
|
|
650
|
+
function mapFields(item, mappers, config, recurseSlots = false, shouldDefaultSlots = true, fieldsToMap) {
|
|
650
651
|
var _a, _b, _c, _d, _e;
|
|
651
652
|
const itemType = "type" in item ? item.type : "root";
|
|
652
653
|
const componentConfig = itemType === "root" ? config.root : (_a = config.components) == null ? void 0 : _a[itemType];
|
|
@@ -658,7 +659,8 @@ function mapFields(item, mappers, config, recurseSlots = false, shouldDefaultSlo
|
|
|
658
659
|
getPropPath: (k) => k,
|
|
659
660
|
config,
|
|
660
661
|
recurseSlots,
|
|
661
|
-
ownedFields: true
|
|
662
|
+
ownedFields: true,
|
|
663
|
+
keysToWalk: fieldsToMap
|
|
662
664
|
});
|
|
663
665
|
if (isPromise(newProps)) {
|
|
664
666
|
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.23.0-canary.
|
|
3
|
+
"version": "0.23.0-canary.9bf3e00a",
|
|
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.23.0-canary.
|
|
28
|
+
"@puckeditor/core": "^0.23.0-canary.9bf3e00a",
|
|
29
29
|
"@types/minimatch": "3.0.5",
|
|
30
30
|
"@types/react": "^19.0.1",
|
|
31
31
|
"@types/react-dom": "^19.0.2",
|