react-reason-editor 1.0.31 → 1.0.32

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.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./rolldown-runtime-BeavJI0R.cjs");const e=require("./editorConfig-Cx4ilZJV.cjs"),o=require("./ReasonDocs-DWRwDR5E.cjs"),r=require("./RichTextProvider-CSKrKcEv.cjs"),t=require("./externalLibsMode-Dm8a-Jd9.cjs");exports.NovelEditor=e.NovelEditor,exports.ReasonDocs=o.Index,exports.RichTextProvider=r.RichTextProvider,exports.externalLibsModeActions=t.externalLibsModeActions,exports.getExternalLibsMode=t.getExternalLibsMode,exports.useExternalLibsMode=t.useExternalLibsMode,exports.useNovelEditor=e.useNovelEditor;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./rolldown-runtime-BeavJI0R.cjs");const e=require("./editorConfig-Cx4ilZJV.cjs"),o=require("./ReasonDocs-B-bZEn6_.cjs"),r=require("./RichTextProvider-CSKrKcEv.cjs"),t=require("./externalLibsMode-Dm8a-Jd9.cjs");exports.NovelEditor=e.NovelEditor,exports.ReasonDocs=o.Index,exports.RichTextProvider=r.RichTextProvider,exports.externalLibsModeActions=t.externalLibsModeActions,exports.getExternalLibsMode=t.getExternalLibsMode,exports.useExternalLibsMode=t.useExternalLibsMode,exports.useNovelEditor=e.useNovelEditor;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{a as o,i as s}from"./editorConfig-BDVG1hyU.js";import{t as r}from"./ReasonDocs-WH3JUyEX.js";import{t as a}from"./RichTextProvider-CHcaIPMd.js";import{n as t,r as i,t as e}from"./externalLibsMode-DEDBnK98.js";export{s as NovelEditor,r as ReasonDocs,a as RichTextProvider,e as externalLibsModeActions,t as getExternalLibsMode,i as useExternalLibsMode,o as useNovelEditor};
1
+ import{a as o,i as s}from"./editorConfig-BDVG1hyU.js";import{t as r}from"./ReasonDocs-DVm2Dll7.js";import{t as a}from"./RichTextProvider-CHcaIPMd.js";import{n as t,r as i,t as e}from"./externalLibsMode-DEDBnK98.js";export{s as NovelEditor,r as ReasonDocs,a as RichTextProvider,e as externalLibsModeActions,t as getExternalLibsMode,i as useExternalLibsMode,o as useNovelEditor};
@@ -3,7 +3,7 @@ import { Document } from '../../documents/DocumentTree';
3
3
  import { TocEntry } from '../../app-types/toc';
4
4
  import { ActiveHeadingEditorHandle } from '../../search/useActiveHeading';
5
5
  /** A single togglable panel kind that can appear in the left or right sidebar. */
6
- export type SidebarPanelType = "ai" | "files" | "outline" | "openTabs";
6
+ export type SidebarPanelType = "ai" | "files" | "outline" | "openTabs" | "related";
7
7
  /** The kind of resource a tab in the "Open Tabs" panel represents. */
8
8
  export type OpenTabKind = "file" | "chat";
9
9
  /**
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./rolldown-runtime-BeavJI0R.cjs");const e=require("./ReasonDocs-DWRwDR5E.cjs");exports.ReasonDocs=e.Index;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./rolldown-runtime-BeavJI0R.cjs");const e=require("./ReasonDocs-B-bZEn6_.cjs");exports.ReasonDocs=e.Index;
@@ -1 +1 @@
1
- import{t as o}from"./ReasonDocs-WH3JUyEX.js";export{o as ReasonDocs};
1
+ import{t as o}from"./ReasonDocs-DVm2Dll7.js";export{o as ReasonDocs};
@@ -0,0 +1,18 @@
1
+ import { Document } from '../documents/DocumentTree';
2
+ /** A related-document suggestion returned by {@link findRelatedDocuments}. */
3
+ export interface RelatedDocumentResult {
4
+ /** The related document. */
5
+ document: Document;
6
+ /** Number of significant keywords shared with the active document. */
7
+ sharedKeywordCount: number;
8
+ }
9
+ /**
10
+ * Ranks candidate documents by how many significant keywords they share with
11
+ * `activeDocument`'s title and content. Folders, soft-deleted documents, and
12
+ * the active document itself are never suggested.
13
+ *
14
+ * @param documents - Candidate documents to search (typically all documents).
15
+ * @param activeDocument - The currently open document, or `undefined`/`null` when none is active.
16
+ * @param limit - Maximum number of suggestions to return (default 10).
17
+ */
18
+ export declare function findRelatedDocuments(documents: Document[], activeDocument: Document | undefined | null, limit?: number): RelatedDocumentResult[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-reason-editor",
3
- "version": "1.0.31",
3
+ "version": "1.0.32",
4
4
  "description": "A modern WYSIWYG rich text editor based on tiptap and shadcn ui for React",
5
5
  "repository": {
6
6
  "type": "git",