react-reason-editor 1.0.215 → 1.0.217

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.
@@ -0,0 +1,17 @@
1
+ import { Document } from 'react-reason-editor-sidebar';
2
+ /**
3
+ * Mints an ID for a new document. IDs come from the clock, so two creations
4
+ * in the same millisecond (uploading several files at once) would collide;
5
+ * this walks forward until it finds an ID no existing document is using.
6
+ */
7
+ export declare function nextDocumentId(existing?: Document[]): string;
8
+ /** Whether an upload can be shown as text in the editor, rather than as a placeholder. */
9
+ export declare function isTextFile(file: File): boolean;
10
+ /**
11
+ * Reads an uploaded file into the document body.
12
+ *
13
+ * Text-like files become escaped paragraphs. Binary files (images, PDFs, and
14
+ * anything else the editor cannot render) become a short note recording the
15
+ * file's name and size, so the upload is still visible and traceable.
16
+ */
17
+ export declare function readUploadedFile(file: File): Promise<string>;
@@ -81,6 +81,12 @@ export declare function useReasonDocsState(openFilesSidebarSignal?: number | str
81
81
  filteredDocuments: Document[];
82
82
  filteredTree: Document[];
83
83
  handleAddDocument: (selectedId: string | null, isFolder?: boolean) => Promise<void>;
84
+ handleCreateFile: ({ parentId, name, isFolder, file, }: {
85
+ parentId: string | null;
86
+ name: string;
87
+ isFolder: boolean;
88
+ file?: File;
89
+ }) => Promise<void>;
84
90
  handleDeleteDocument: (id: string) => Promise<void>;
85
91
  handleDuplicateDocument: (id: string) => void;
86
92
  handleUpdateDocument: (id: string, updates: Partial<Document>) => void;
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./rolldown-runtime-BeavJI0R.cjs");const e=require("./editorConfig-Nlnbb5zI.cjs"),o=require("./ReasonDocs-COJDc7II.cjs"),r=require("./RichTextProvider-5tJ58Jd3.cjs"),t=require("./externalLibsMode-aLfijcGX.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-Nlnbb5zI.cjs"),o=require("./ReasonDocs-BoQDZu4x.cjs"),r=require("./RichTextProvider-5tJ58Jd3.cjs"),t=require("./externalLibsMode-aLfijcGX.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{o,s}from"./editorConfig-CDQ1cqBk.js";import{t as r}from"./ReasonDocs-5KLjMhIP.js";import{t as a}from"./RichTextProvider-B9V-6yCh.js";import{n as t,r as e,t as i}from"./externalLibsMode-DEDBnK98.js";export{o as NovelEditor,r as ReasonDocs,a as RichTextProvider,i as externalLibsModeActions,t as getExternalLibsMode,e as useExternalLibsMode,s as useNovelEditor};
1
+ import{o,s}from"./editorConfig-CDQ1cqBk.js";import{t as r}from"./ReasonDocs-DtHAJ_OK.js";import{t as a}from"./RichTextProvider-B9V-6yCh.js";import{n as t,r as e,t as i}from"./externalLibsMode-DEDBnK98.js";export{o as NovelEditor,r as ReasonDocs,a as RichTextProvider,i as externalLibsModeActions,t as getExternalLibsMode,e as useExternalLibsMode,s as useNovelEditor};
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./rolldown-runtime-BeavJI0R.cjs");const e=require("./ReasonDocs-COJDc7II.cjs");exports.ReasonDocs=e.Index;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./rolldown-runtime-BeavJI0R.cjs");const e=require("./ReasonDocs-BoQDZu4x.cjs");exports.ReasonDocs=e.Index;
@@ -1 +1 @@
1
- import{t as o}from"./ReasonDocs-5KLjMhIP.js";export{o as ReasonDocs};
1
+ import{t as o}from"./ReasonDocs-DtHAJ_OK.js";export{o as ReasonDocs};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-reason-editor",
3
- "version": "1.0.215",
3
+ "version": "1.0.217",
4
4
  "description": "A modern WYSIWYG rich text editor based on tiptap and shadcn ui for React",
5
5
  "repository": {
6
6
  "type": "git",
@@ -919,7 +919,7 @@
919
919
  "react-image-crop": "^11.1.2",
920
920
  "react-lite-youtube-embed": "^3.7.0",
921
921
  "react-player": "3.4.0",
922
- "react-reason-editor-sidebar": "^0.1.132",
922
+ "react-reason-editor-sidebar": "^0.1.134",
923
923
  "react-split-pane": "^3.2.0",
924
924
  "react-textarea-autosize": "^8.5.9",
925
925
  "react-tweet": "^3.3.1",