@puckeditor/plugin-heading-analyzer 0.22.1-canary.1a601e70 → 0.22.1-canary.d8d77eb5
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 +5 -4
- package/dist/index.mjs +5 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2271,7 +2271,7 @@ var createFieldsSlice = (_set, _get) => {
|
|
|
2271
2271
|
// ../core/lib/resolve-component-data.ts
|
|
2272
2272
|
init_react_import();
|
|
2273
2273
|
var cache = { lastChange: {} };
|
|
2274
|
-
var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace", parent = null, root = { props: {} }) {
|
|
2274
|
+
var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace", parent = null, root = { props: {} }, cacheStore = cache) {
|
|
2275
2275
|
const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
|
|
2276
2276
|
const resolvedItem = __spreadValues({}, item);
|
|
2277
2277
|
const shouldRunResolver = (configForItem == null ? void 0 : configForItem.resolveData) && item.props;
|
|
@@ -2281,7 +2281,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], fun
|
|
|
2281
2281
|
item: oldItem = null,
|
|
2282
2282
|
resolved = {},
|
|
2283
2283
|
parentId: oldParentId = null
|
|
2284
|
-
} =
|
|
2284
|
+
} = cacheStore.lastChange[id] || {};
|
|
2285
2285
|
const isRootOrInserted = oldParentId === null;
|
|
2286
2286
|
const parentChanged = !isRootOrInserted && (parent == null ? void 0 : parent.props.id) !== oldParentId;
|
|
2287
2287
|
const dataChanged = item && !deepEqual(item, oldItem);
|
|
@@ -2323,7 +2323,8 @@ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], fun
|
|
|
2323
2323
|
onResolveEnd,
|
|
2324
2324
|
trigger,
|
|
2325
2325
|
itemAsComponentData,
|
|
2326
|
-
root
|
|
2326
|
+
root,
|
|
2327
|
+
cacheStore
|
|
2327
2328
|
)).node;
|
|
2328
2329
|
})
|
|
2329
2330
|
)
|
|
@@ -2335,7 +2336,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], fun
|
|
|
2335
2336
|
if (shouldRunResolver && onResolveEnd) {
|
|
2336
2337
|
onResolveEnd(resolvedItem);
|
|
2337
2338
|
}
|
|
2338
|
-
|
|
2339
|
+
cacheStore.lastChange[id] = {
|
|
2339
2340
|
item,
|
|
2340
2341
|
resolved: itemWithResolvedChildren,
|
|
2341
2342
|
parentId: parent == null ? void 0 : parent.props.id
|
package/dist/index.mjs
CHANGED
|
@@ -2259,7 +2259,7 @@ var createFieldsSlice = (_set, _get) => {
|
|
|
2259
2259
|
// ../core/lib/resolve-component-data.ts
|
|
2260
2260
|
init_react_import();
|
|
2261
2261
|
var cache = { lastChange: {} };
|
|
2262
|
-
var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace", parent = null, root = { props: {} }) {
|
|
2262
|
+
var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace", parent = null, root = { props: {} }, cacheStore = cache) {
|
|
2263
2263
|
const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
|
|
2264
2264
|
const resolvedItem = __spreadValues({}, item);
|
|
2265
2265
|
const shouldRunResolver = (configForItem == null ? void 0 : configForItem.resolveData) && item.props;
|
|
@@ -2269,7 +2269,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], fun
|
|
|
2269
2269
|
item: oldItem = null,
|
|
2270
2270
|
resolved = {},
|
|
2271
2271
|
parentId: oldParentId = null
|
|
2272
|
-
} =
|
|
2272
|
+
} = cacheStore.lastChange[id] || {};
|
|
2273
2273
|
const isRootOrInserted = oldParentId === null;
|
|
2274
2274
|
const parentChanged = !isRootOrInserted && (parent == null ? void 0 : parent.props.id) !== oldParentId;
|
|
2275
2275
|
const dataChanged = item && !deepEqual(item, oldItem);
|
|
@@ -2311,7 +2311,8 @@ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], fun
|
|
|
2311
2311
|
onResolveEnd,
|
|
2312
2312
|
trigger,
|
|
2313
2313
|
itemAsComponentData,
|
|
2314
|
-
root
|
|
2314
|
+
root,
|
|
2315
|
+
cacheStore
|
|
2315
2316
|
)).node;
|
|
2316
2317
|
})
|
|
2317
2318
|
)
|
|
@@ -2323,7 +2324,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], fun
|
|
|
2323
2324
|
if (shouldRunResolver && onResolveEnd) {
|
|
2324
2325
|
onResolveEnd(resolvedItem);
|
|
2325
2326
|
}
|
|
2326
|
-
|
|
2327
|
+
cacheStore.lastChange[id] = {
|
|
2327
2328
|
item,
|
|
2328
2329
|
resolved: itemWithResolvedChildren,
|
|
2329
2330
|
parentId: parent == null ? void 0 : parent.props.id
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@puckeditor/plugin-heading-analyzer",
|
|
3
|
-
"version": "0.22.1-canary.
|
|
3
|
+
"version": "0.22.1-canary.d8d77eb5",
|
|
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.
|
|
28
|
+
"@puckeditor/core": "^0.22.1-canary.d8d77eb5",
|
|
29
29
|
"@types/minimatch": "3.0.5",
|
|
30
30
|
"@types/react": "^19.0.1",
|
|
31
31
|
"@types/react-dom": "^19.0.2",
|