@measured/puck-plugin-heading-analyzer 0.18.2 → 0.18.3-canary.098fdd1
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 +13 -1
- package/dist/index.mjs +13 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -421,6 +421,7 @@ function useAppContext() {
|
|
421
421
|
|
422
422
|
// ../../node_modules/zustand/esm/vanilla.mjs
|
423
423
|
init_react_import();
|
424
|
+
var import_meta = {};
|
424
425
|
var createStoreImpl = (createState) => {
|
425
426
|
let state;
|
426
427
|
const listeners = /* @__PURE__ */ new Set();
|
@@ -438,7 +439,15 @@ var createStoreImpl = (createState) => {
|
|
438
439
|
listeners.add(listener);
|
439
440
|
return () => listeners.delete(listener);
|
440
441
|
};
|
441
|
-
const
|
442
|
+
const destroy = () => {
|
443
|
+
if ((import_meta.env ? import_meta.env.MODE : void 0) !== "production") {
|
444
|
+
console.warn(
|
445
|
+
"[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."
|
446
|
+
);
|
447
|
+
}
|
448
|
+
listeners.clear();
|
449
|
+
};
|
450
|
+
const api = { setState, getState, getInitialState, subscribe, destroy };
|
442
451
|
const initialState = state = createState(setState, getState, api);
|
443
452
|
return api;
|
444
453
|
};
|
@@ -681,6 +690,9 @@ var getOutline = ({ frame } = {}) => {
|
|
681
690
|
const headings = (frame == null ? void 0 : frame.querySelectorAll("h1,h2,h3,h4,h5,h6")) || [];
|
682
691
|
const _outline = [];
|
683
692
|
headings.forEach((item, i) => {
|
693
|
+
if (item.closest("[data-dnd-dragging]")) {
|
694
|
+
return;
|
695
|
+
}
|
684
696
|
_outline.push({
|
685
697
|
rank: parseInt(item.tagName.split("H")[1]),
|
686
698
|
text: item.textContent,
|
package/dist/index.mjs
CHANGED
@@ -419,6 +419,7 @@ function useAppContext() {
|
|
419
419
|
|
420
420
|
// ../../node_modules/zustand/esm/vanilla.mjs
|
421
421
|
init_react_import();
|
422
|
+
var import_meta = {};
|
422
423
|
var createStoreImpl = (createState) => {
|
423
424
|
let state;
|
424
425
|
const listeners = /* @__PURE__ */ new Set();
|
@@ -436,7 +437,15 @@ var createStoreImpl = (createState) => {
|
|
436
437
|
listeners.add(listener);
|
437
438
|
return () => listeners.delete(listener);
|
438
439
|
};
|
439
|
-
const
|
440
|
+
const destroy = () => {
|
441
|
+
if ((import_meta.env ? import_meta.env.MODE : void 0) !== "production") {
|
442
|
+
console.warn(
|
443
|
+
"[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."
|
444
|
+
);
|
445
|
+
}
|
446
|
+
listeners.clear();
|
447
|
+
};
|
448
|
+
const api = { setState, getState, getInitialState, subscribe, destroy };
|
440
449
|
const initialState = state = createState(setState, getState, api);
|
441
450
|
return api;
|
442
451
|
};
|
@@ -679,6 +688,9 @@ var getOutline = ({ frame } = {}) => {
|
|
679
688
|
const headings = (frame == null ? void 0 : frame.querySelectorAll("h1,h2,h3,h4,h5,h6")) || [];
|
680
689
|
const _outline = [];
|
681
690
|
headings.forEach((item, i) => {
|
691
|
+
if (item.closest("[data-dnd-dragging]")) {
|
692
|
+
return;
|
693
|
+
}
|
682
694
|
_outline.push({
|
683
695
|
rank: parseInt(item.tagName.split("H")[1]),
|
684
696
|
text: item.textContent,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@measured/puck-plugin-heading-analyzer",
|
3
|
-
"version": "0.18.
|
3
|
+
"version": "0.18.3-canary.098fdd1",
|
4
4
|
"author": "Measured Corporation Ltd <hello@measured.co>",
|
5
5
|
"repository": "measuredco/puck",
|
6
6
|
"bugs": "https://github.com/measuredco/puck/issues",
|
@@ -25,7 +25,7 @@
|
|
25
25
|
"dist"
|
26
26
|
],
|
27
27
|
"devDependencies": {
|
28
|
-
"@measured/puck": "^0.18.
|
28
|
+
"@measured/puck": "^0.18.3-canary.098fdd1",
|
29
29
|
"@types/react": "^19.0.1",
|
30
30
|
"@types/react-dom": "^19.0.2",
|
31
31
|
"eslint": "^7.32.0",
|