wysimark-lite 0.27.3 → 0.27.4

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
@@ -67,6 +67,11 @@ type WysimarkEditor = {
67
67
  * Render inline content for an internal embed (`![[spec]]`).
68
68
  */
69
69
  renderInternalEmbed?: RenderInternalEmbed;
70
+ /**
71
+ * Called when an internal link is activated (e.g. the navigate button in
72
+ * the link dialog). Receives the raw target including any `#heading`.
73
+ */
74
+ onInternalLinkClick?: (target: string) => void;
70
75
  };
71
76
  /**
72
77
  * Public methods for the wysimark editor.
@@ -110,8 +115,9 @@ type UseEditorOptions = {
110
115
  enableInternalLinks?: boolean;
111
116
  renderInternalLinkPreview?: RenderInternalLinkPreview;
112
117
  renderInternalEmbed?: RenderInternalEmbed;
118
+ onInternalLinkClick?: (target: string) => void;
113
119
  };
114
- declare function useEditor({ authToken, height, minHeight, maxHeight, disableRawMode, disableTaskList, disableCodeBlock, disableHighlight, enableInternalLinks, renderInternalLinkPreview, renderInternalEmbed, }?: UseEditorOptions): Editor & ReactEditor & WysimarkEditor;
120
+ declare function useEditor({ authToken, height, minHeight, maxHeight, disableRawMode, disableTaskList, disableCodeBlock, disableHighlight, enableInternalLinks, renderInternalLinkPreview, renderInternalEmbed, onInternalLinkClick, }?: UseEditorOptions): Editor & ReactEditor & WysimarkEditor;
115
121
 
116
122
  /**
117
123
  * SinkEditor just adds a `sink` object where we drop all of our sink