@puckeditor/plugin-heading-analyzer 0.21.2-canary.9f50433a → 0.21.2-canary.a150f535

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
@@ -1663,44 +1663,39 @@ var createHistorySlice = (set, get) => {
1663
1663
 
1664
1664
  // ../core/store/slices/nodes.ts
1665
1665
  init_react_import();
1666
- var createNodesSlice = (set, get) => ({
1667
- nodes: {},
1668
- registerNode: (id, node) => {
1669
- const s = get().nodes;
1670
- const emptyNode = {
1671
- id,
1672
- methods: {
1673
- sync: () => null,
1674
- hideOverlay: () => null,
1675
- showOverlay: () => null
1676
- },
1677
- element: null
1678
- };
1679
- const existingNode = s.nodes[id];
1680
- set({
1681
- nodes: __spreadProps(__spreadValues({}, s), {
1682
- nodes: __spreadProps(__spreadValues({}, s.nodes), {
1683
- [id]: __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, emptyNode), existingNode), node), {
1684
- id
1685
- })
1686
- })
1687
- })
1688
- });
1689
- },
1690
- unregisterNode: (id) => {
1691
- const s = get().nodes;
1692
- const existingNode = s.nodes[id];
1693
- if (existingNode) {
1694
- const newNodes = __spreadValues({}, s.nodes);
1695
- delete newNodes[id];
1696
- set({
1697
- nodes: __spreadProps(__spreadValues({}, s), {
1698
- nodes: newNodes
1699
- })
1666
+ var createNodesSlice = (_set, _get) => {
1667
+ const registry = /* @__PURE__ */ new Map();
1668
+ return {
1669
+ registerNode: (id, handle) => {
1670
+ registry.set(id, handle);
1671
+ },
1672
+ unregisterNode: (id) => {
1673
+ registry.delete(id);
1674
+ },
1675
+ syncNode: (id) => {
1676
+ var _a;
1677
+ if (!id) return;
1678
+ (_a = registry.get(id)) == null ? void 0 : _a.sync();
1679
+ },
1680
+ syncNodes: (ids) => {
1681
+ ids.forEach((id) => {
1682
+ var _a;
1683
+ if (!id) return;
1684
+ (_a = registry.get(id)) == null ? void 0 : _a.sync();
1700
1685
  });
1686
+ },
1687
+ setOverlayVisible: (id, visible) => {
1688
+ if (!id) return;
1689
+ const node = registry.get(id);
1690
+ if (!node) return;
1691
+ if (visible) {
1692
+ node.showOverlay();
1693
+ return;
1694
+ }
1695
+ node.hideOverlay();
1701
1696
  }
1702
- }
1703
- });
1697
+ };
1698
+ };
1704
1699
 
1705
1700
  // ../core/store/slices/permissions.ts
1706
1701
  init_react_import();
@@ -2419,6 +2414,7 @@ var createAppStore = (initialAppStore) => create()(
2419
2414
  status: "LOADING",
2420
2415
  iframe: {},
2421
2416
  _experimentalFullScreenCanvas: false,
2417
+ _experimentalVirtualization: false,
2422
2418
  metadata: {},
2423
2419
  fieldTransforms: {}
2424
2420
  }, initialAppStore), {
@@ -2554,7 +2550,8 @@ var createAppStore = (initialAppStore) => create()(
2554
2550
  state,
2555
2551
  config,
2556
2552
  (content) => content,
2557
- (childItem) => {
2553
+ (childItem, path) => {
2554
+ if (path.length > 1) return childItem;
2558
2555
  resolveComponentData2(childItem, "load").then((resolved) => {
2559
2556
  const { state: state2 } = get();
2560
2557
  const node = state2.indexes.nodes[resolved.node.props.id];
package/dist/index.mjs CHANGED
@@ -1651,44 +1651,39 @@ var createHistorySlice = (set, get) => {
1651
1651
 
1652
1652
  // ../core/store/slices/nodes.ts
1653
1653
  init_react_import();
1654
- var createNodesSlice = (set, get) => ({
1655
- nodes: {},
1656
- registerNode: (id, node) => {
1657
- const s = get().nodes;
1658
- const emptyNode = {
1659
- id,
1660
- methods: {
1661
- sync: () => null,
1662
- hideOverlay: () => null,
1663
- showOverlay: () => null
1664
- },
1665
- element: null
1666
- };
1667
- const existingNode = s.nodes[id];
1668
- set({
1669
- nodes: __spreadProps(__spreadValues({}, s), {
1670
- nodes: __spreadProps(__spreadValues({}, s.nodes), {
1671
- [id]: __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, emptyNode), existingNode), node), {
1672
- id
1673
- })
1674
- })
1675
- })
1676
- });
1677
- },
1678
- unregisterNode: (id) => {
1679
- const s = get().nodes;
1680
- const existingNode = s.nodes[id];
1681
- if (existingNode) {
1682
- const newNodes = __spreadValues({}, s.nodes);
1683
- delete newNodes[id];
1684
- set({
1685
- nodes: __spreadProps(__spreadValues({}, s), {
1686
- nodes: newNodes
1687
- })
1654
+ var createNodesSlice = (_set, _get) => {
1655
+ const registry = /* @__PURE__ */ new Map();
1656
+ return {
1657
+ registerNode: (id, handle) => {
1658
+ registry.set(id, handle);
1659
+ },
1660
+ unregisterNode: (id) => {
1661
+ registry.delete(id);
1662
+ },
1663
+ syncNode: (id) => {
1664
+ var _a;
1665
+ if (!id) return;
1666
+ (_a = registry.get(id)) == null ? void 0 : _a.sync();
1667
+ },
1668
+ syncNodes: (ids) => {
1669
+ ids.forEach((id) => {
1670
+ var _a;
1671
+ if (!id) return;
1672
+ (_a = registry.get(id)) == null ? void 0 : _a.sync();
1688
1673
  });
1674
+ },
1675
+ setOverlayVisible: (id, visible) => {
1676
+ if (!id) return;
1677
+ const node = registry.get(id);
1678
+ if (!node) return;
1679
+ if (visible) {
1680
+ node.showOverlay();
1681
+ return;
1682
+ }
1683
+ node.hideOverlay();
1689
1684
  }
1690
- }
1691
- });
1685
+ };
1686
+ };
1692
1687
 
1693
1688
  // ../core/store/slices/permissions.ts
1694
1689
  init_react_import();
@@ -2407,6 +2402,7 @@ var createAppStore = (initialAppStore) => create()(
2407
2402
  status: "LOADING",
2408
2403
  iframe: {},
2409
2404
  _experimentalFullScreenCanvas: false,
2405
+ _experimentalVirtualization: false,
2410
2406
  metadata: {},
2411
2407
  fieldTransforms: {}
2412
2408
  }, initialAppStore), {
@@ -2542,7 +2538,8 @@ var createAppStore = (initialAppStore) => create()(
2542
2538
  state,
2543
2539
  config,
2544
2540
  (content) => content,
2545
- (childItem) => {
2541
+ (childItem, path) => {
2542
+ if (path.length > 1) return childItem;
2546
2543
  resolveComponentData2(childItem, "load").then((resolved) => {
2547
2544
  const { state: state2 } = get();
2548
2545
  const node = state2.indexes.nodes[resolved.node.props.id];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@puckeditor/plugin-heading-analyzer",
3
- "version": "0.21.2-canary.9f50433a",
3
+ "version": "0.21.2-canary.a150f535",
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.9f50433a",
28
+ "@puckeditor/core": "^0.21.2-canary.a150f535",
29
29
  "@types/minimatch": "3.0.5",
30
30
  "@types/react": "^19.0.1",
31
31
  "@types/react-dom": "^19.0.2",