@measured/puck-plugin-heading-analyzer 0.18.3-canary.934cfae → 0.18.3-canary.9de70d3

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
@@ -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 api = { setState, getState, getInitialState, subscribe };
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
  };
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 api = { setState, getState, getInitialState, subscribe };
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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck-plugin-heading-analyzer",
3
- "version": "0.18.3-canary.934cfae",
3
+ "version": "0.18.3-canary.9de70d3",
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.3-canary.934cfae",
28
+ "@measured/puck": "^0.18.3-canary.9de70d3",
29
29
  "@types/react": "^19.0.1",
30
30
  "@types/react-dom": "^19.0.2",
31
31
  "eslint": "^7.32.0",