@ixo/editor 5.20.0 → 5.20.1

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.
@@ -1548,6 +1548,19 @@ var getHandlersFromEditor = (editor) => {
1548
1548
  const editorWithHandlers = editor;
1549
1549
  return editorWithHandlers?.handlers || editorWithHandlers?._handlers || editorWithHandlers?.blocknoteHandlers || editorWithHandlers?.getHandlers?.() || editorWithHandlers?.getBlocknoteHandlers?.();
1550
1550
  };
1551
+ function mergeBlocknoteHandlers(primary, override) {
1552
+ if (!primary) return override;
1553
+ if (!override) return primary;
1554
+ const integrations = primary.integrations || override.integrations ? {
1555
+ ...primary.integrations || {},
1556
+ ...override.integrations || {}
1557
+ } : void 0;
1558
+ return {
1559
+ ...primary,
1560
+ ...override,
1561
+ integrations
1562
+ };
1563
+ }
1551
1564
  var BlocknoteProvider = ({
1552
1565
  children,
1553
1566
  editor,
@@ -1569,13 +1582,7 @@ var BlocknoteProvider = ({
1569
1582
  const [drawerContent, setDrawerContent] = useState3(null);
1570
1583
  const editorHandlers = getHandlersFromEditor(editor);
1571
1584
  const effectiveHandlers = useMemo3(() => {
1572
- if (handlers && editorHandlers) {
1573
- return {
1574
- ...editorHandlers,
1575
- ...handlers
1576
- };
1577
- }
1578
- return handlers || editorHandlers;
1585
+ return mergeBlocknoteHandlers(editorHandlers, handlers);
1579
1586
  }, [handlers, editorHandlers]);
1580
1587
  const docType = editor?.docType || "flow";
1581
1588
  const flowVersion = editor?.getFlowMetadata?.()?.schema_version || "0.3";
@@ -24462,10 +24469,7 @@ function mergeActionHandlers(contextHandlers, executionHandlers) {
24462
24469
  if (!executionHandlers) return contextHandlers;
24463
24470
  if (!contextHandlers) return executionHandlers;
24464
24471
  if (typeof contextHandlers !== "object" || typeof executionHandlers !== "object") return executionHandlers;
24465
- return {
24466
- ...contextHandlers,
24467
- ...executionHandlers
24468
- };
24472
+ return mergeBlocknoteHandlers(contextHandlers, executionHandlers);
24469
24473
  }
24470
24474
  function useExecuteActionBlock({ editor, block }) {
24471
24475
  const handlers = useBlocknoteHandlers();
@@ -44942,4 +44946,4 @@ export {
44942
44946
  getExtraSlashMenuItems,
44943
44947
  useCreateIxoEditor
44944
44948
  };
44945
- //# sourceMappingURL=chunk-DJHCUHR5.mjs.map
44949
+ //# sourceMappingURL=chunk-VSQRWDR6.mjs.map