@puckeditor/plugin-heading-analyzer 0.21.2-canary.e16ff6b5 → 0.21.2-canary.f210b526
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 +17 -22
- package/dist/index.mjs +17 -22
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -715,6 +715,15 @@ var flattenNode = (node, config) => {
|
|
|
715
715
|
});
|
|
716
716
|
};
|
|
717
717
|
|
|
718
|
+
// ../core/lib/data/to-component.ts
|
|
719
|
+
init_react_import();
|
|
720
|
+
var toComponent = (item) => {
|
|
721
|
+
return "type" in item ? item : __spreadProps(__spreadValues({}, item), {
|
|
722
|
+
props: __spreadProps(__spreadValues({}, item.props), { id: "root" }),
|
|
723
|
+
type: "root"
|
|
724
|
+
});
|
|
725
|
+
};
|
|
726
|
+
|
|
718
727
|
// ../core/lib/data/walk-app-state.ts
|
|
719
728
|
function walkAppState(state, config, mapContent = (content) => content, mapNodeOrSkip = (item) => item) {
|
|
720
729
|
var _a;
|
|
@@ -778,7 +787,7 @@ function walkAppState(state, config, mapContent = (content) => content, mapNodeO
|
|
|
778
787
|
id
|
|
779
788
|
});
|
|
780
789
|
processRelatedZones(item, id, path);
|
|
781
|
-
const newItem = __spreadProps(__spreadValues({},
|
|
790
|
+
const newItem = __spreadProps(__spreadValues({}, mappedItem), { props: newProps });
|
|
782
791
|
const thisZoneCompound = path[path.length - 1];
|
|
783
792
|
const [parentId, zone] = thisZoneCompound ? thisZoneCompound.split(":") : [null, ""];
|
|
784
793
|
newNodeIndex[id] = {
|
|
@@ -818,17 +827,14 @@ function walkAppState(state, config, mapContent = (content) => content, mapNodeO
|
|
|
818
827
|
);
|
|
819
828
|
newZones[zoneCompound] = newContent2;
|
|
820
829
|
}, newZones);
|
|
821
|
-
|
|
822
|
-
{
|
|
823
|
-
type: "root",
|
|
824
|
-
props: __spreadProps(__spreadValues({}, (_a = state.data.root.props) != null ? _a : state.data.root), { id: "root" })
|
|
825
|
-
},
|
|
826
|
-
[],
|
|
827
|
-
-1
|
|
828
|
-
);
|
|
829
|
-
const root = __spreadProps(__spreadValues({}, state.data.root), {
|
|
830
|
-
props: processedRoot.props
|
|
830
|
+
let rootAsComponent = toComponent({
|
|
831
|
+
props: __spreadValues({}, (_a = state.data.root.props) != null ? _a : state.data.root)
|
|
831
832
|
});
|
|
833
|
+
if (state.data.root.readOnly) {
|
|
834
|
+
rootAsComponent.readOnly = state.data.root.readOnly;
|
|
835
|
+
}
|
|
836
|
+
const processedRoot = processItem(rootAsComponent, [], -1);
|
|
837
|
+
const root = __spreadValues(__spreadValues({}, state.data.root), processedRoot);
|
|
832
838
|
return __spreadProps(__spreadValues({}, state), {
|
|
833
839
|
data: {
|
|
834
840
|
root,
|
|
@@ -2270,17 +2276,6 @@ var createFieldsSlice = (_set, _get) => {
|
|
|
2270
2276
|
|
|
2271
2277
|
// ../core/lib/resolve-component-data.ts
|
|
2272
2278
|
init_react_import();
|
|
2273
|
-
|
|
2274
|
-
// ../core/lib/data/to-component.ts
|
|
2275
|
-
init_react_import();
|
|
2276
|
-
var toComponent = (item) => {
|
|
2277
|
-
return "type" in item ? item : __spreadProps(__spreadValues({}, item), {
|
|
2278
|
-
props: __spreadProps(__spreadValues({}, item.props), { id: "root" }),
|
|
2279
|
-
type: "root"
|
|
2280
|
-
});
|
|
2281
|
-
};
|
|
2282
|
-
|
|
2283
|
-
// ../core/lib/resolve-component-data.ts
|
|
2284
2279
|
var cache = { lastChange: {} };
|
|
2285
2280
|
var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace", parent = null) {
|
|
2286
2281
|
const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
|
package/dist/index.mjs
CHANGED
|
@@ -703,6 +703,15 @@ var flattenNode = (node, config) => {
|
|
|
703
703
|
});
|
|
704
704
|
};
|
|
705
705
|
|
|
706
|
+
// ../core/lib/data/to-component.ts
|
|
707
|
+
init_react_import();
|
|
708
|
+
var toComponent = (item) => {
|
|
709
|
+
return "type" in item ? item : __spreadProps(__spreadValues({}, item), {
|
|
710
|
+
props: __spreadProps(__spreadValues({}, item.props), { id: "root" }),
|
|
711
|
+
type: "root"
|
|
712
|
+
});
|
|
713
|
+
};
|
|
714
|
+
|
|
706
715
|
// ../core/lib/data/walk-app-state.ts
|
|
707
716
|
function walkAppState(state, config, mapContent = (content) => content, mapNodeOrSkip = (item) => item) {
|
|
708
717
|
var _a;
|
|
@@ -766,7 +775,7 @@ function walkAppState(state, config, mapContent = (content) => content, mapNodeO
|
|
|
766
775
|
id
|
|
767
776
|
});
|
|
768
777
|
processRelatedZones(item, id, path);
|
|
769
|
-
const newItem = __spreadProps(__spreadValues({},
|
|
778
|
+
const newItem = __spreadProps(__spreadValues({}, mappedItem), { props: newProps });
|
|
770
779
|
const thisZoneCompound = path[path.length - 1];
|
|
771
780
|
const [parentId, zone] = thisZoneCompound ? thisZoneCompound.split(":") : [null, ""];
|
|
772
781
|
newNodeIndex[id] = {
|
|
@@ -806,17 +815,14 @@ function walkAppState(state, config, mapContent = (content) => content, mapNodeO
|
|
|
806
815
|
);
|
|
807
816
|
newZones[zoneCompound] = newContent2;
|
|
808
817
|
}, newZones);
|
|
809
|
-
|
|
810
|
-
{
|
|
811
|
-
type: "root",
|
|
812
|
-
props: __spreadProps(__spreadValues({}, (_a = state.data.root.props) != null ? _a : state.data.root), { id: "root" })
|
|
813
|
-
},
|
|
814
|
-
[],
|
|
815
|
-
-1
|
|
816
|
-
);
|
|
817
|
-
const root = __spreadProps(__spreadValues({}, state.data.root), {
|
|
818
|
-
props: processedRoot.props
|
|
818
|
+
let rootAsComponent = toComponent({
|
|
819
|
+
props: __spreadValues({}, (_a = state.data.root.props) != null ? _a : state.data.root)
|
|
819
820
|
});
|
|
821
|
+
if (state.data.root.readOnly) {
|
|
822
|
+
rootAsComponent.readOnly = state.data.root.readOnly;
|
|
823
|
+
}
|
|
824
|
+
const processedRoot = processItem(rootAsComponent, [], -1);
|
|
825
|
+
const root = __spreadValues(__spreadValues({}, state.data.root), processedRoot);
|
|
820
826
|
return __spreadProps(__spreadValues({}, state), {
|
|
821
827
|
data: {
|
|
822
828
|
root,
|
|
@@ -2258,17 +2264,6 @@ var createFieldsSlice = (_set, _get) => {
|
|
|
2258
2264
|
|
|
2259
2265
|
// ../core/lib/resolve-component-data.ts
|
|
2260
2266
|
init_react_import();
|
|
2261
|
-
|
|
2262
|
-
// ../core/lib/data/to-component.ts
|
|
2263
|
-
init_react_import();
|
|
2264
|
-
var toComponent = (item) => {
|
|
2265
|
-
return "type" in item ? item : __spreadProps(__spreadValues({}, item), {
|
|
2266
|
-
props: __spreadProps(__spreadValues({}, item.props), { id: "root" }),
|
|
2267
|
-
type: "root"
|
|
2268
|
-
});
|
|
2269
|
-
};
|
|
2270
|
-
|
|
2271
|
-
// ../core/lib/resolve-component-data.ts
|
|
2272
2267
|
var cache = { lastChange: {} };
|
|
2273
2268
|
var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace", parent = null) {
|
|
2274
2269
|
const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@puckeditor/plugin-heading-analyzer",
|
|
3
|
-
"version": "0.21.2-canary.
|
|
3
|
+
"version": "0.21.2-canary.f210b526",
|
|
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.21.2-canary.
|
|
28
|
+
"@puckeditor/core": "^0.21.2-canary.f210b526",
|
|
29
29
|
"@types/minimatch": "3.0.5",
|
|
30
30
|
"@types/react": "^19.0.1",
|
|
31
31
|
"@types/react-dom": "^19.0.2",
|