@puckeditor/plugin-heading-analyzer 0.21.2-canary.9330e6af → 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.d.mts CHANGED
@@ -308,7 +308,7 @@ type CustomFieldRender<Value extends any> = (props: {
308
308
  name: string;
309
309
  id: string;
310
310
  value: Value;
311
- onChange: (value: Value) => void;
311
+ onChange: (value: Value, uiState?: Partial<UiState>) => void;
312
312
  readOnly?: boolean;
313
313
  }) => ReactElement;
314
314
  interface CustomField<Value extends any> extends BaseField {
package/dist/index.d.ts CHANGED
@@ -308,7 +308,7 @@ type CustomFieldRender<Value extends any> = (props: {
308
308
  name: string;
309
309
  id: string;
310
310
  value: Value;
311
- onChange: (value: Value) => void;
311
+ onChange: (value: Value, uiState?: Partial<UiState>) => void;
312
312
  readOnly?: boolean;
313
313
  }) => ReactElement;
314
314
  interface CustomField<Value extends any> extends BaseField {
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();
@@ -2418,6 +2413,8 @@ var createAppStore = (initialAppStore) => create()(
2418
2413
  },
2419
2414
  status: "LOADING",
2420
2415
  iframe: {},
2416
+ _experimentalFullScreenCanvas: false,
2417
+ _experimentalVirtualization: false,
2421
2418
  metadata: {},
2422
2419
  fieldTransforms: {}
2423
2420
  }, initialAppStore), {
@@ -2553,7 +2550,8 @@ var createAppStore = (initialAppStore) => create()(
2553
2550
  state,
2554
2551
  config,
2555
2552
  (content) => content,
2556
- (childItem) => {
2553
+ (childItem, path) => {
2554
+ if (path.length > 1) return childItem;
2557
2555
  resolveComponentData2(childItem, "load").then((resolved) => {
2558
2556
  const { state: state2 } = get();
2559
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();
@@ -2406,6 +2401,8 @@ var createAppStore = (initialAppStore) => create()(
2406
2401
  },
2407
2402
  status: "LOADING",
2408
2403
  iframe: {},
2404
+ _experimentalFullScreenCanvas: false,
2405
+ _experimentalVirtualization: false,
2409
2406
  metadata: {},
2410
2407
  fieldTransforms: {}
2411
2408
  }, initialAppStore), {
@@ -2541,7 +2538,8 @@ var createAppStore = (initialAppStore) => create()(
2541
2538
  state,
2542
2539
  config,
2543
2540
  (content) => content,
2544
- (childItem) => {
2541
+ (childItem, path) => {
2542
+ if (path.length > 1) return childItem;
2545
2543
  resolveComponentData2(childItem, "load").then((resolved) => {
2546
2544
  const { state: state2 } = get();
2547
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.9330e6af",
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.9330e6af",
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",