react-reason-editor-sidebar 0.1.133 → 0.1.134

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.
@@ -74,6 +74,21 @@ export interface SidebarTopicsProps {
74
74
  /** Runs a search for the given topic (e.g. opens a new chat seeded with it). */
75
75
  onSearchTopic?: (topic: string) => void;
76
76
  }
77
+ /**
78
+ * A file or folder created from the file manager modal, by either "Add new"
79
+ * (a typed name) or "Upload file" (a browser `File`). Both funnel through
80
+ * the same `create-file` action, so they arrive as one shape.
81
+ */
82
+ export interface FileManagerCreateRequest {
83
+ /** Destination document ID, or `null` for the file manager's root. */
84
+ parentId: string | null;
85
+ /** Name typed by the user, or the uploaded file's name. */
86
+ name: string;
87
+ /** `true` for "Add new > Folder"; `false` for a note or an upload. */
88
+ isFolder: boolean;
89
+ /** The browser `File` for uploads. Absent for manually named entries. */
90
+ file?: File;
91
+ }
77
92
  export interface SidebarProps {
78
93
  documents: Document[];
79
94
  activeId: string | null;
@@ -82,6 +97,13 @@ export interface SidebarProps {
82
97
  onAdd: (parentId: string | null, isFolder?: boolean) => void;
83
98
  onDelete: (id: string) => void;
84
99
  onDuplicate: (id: string) => void;
100
+ /**
101
+ * Persists a file or folder created from the file manager modal, by either
102
+ * "Add new" or "Upload file". `parentId` is `null` for the file manager's
103
+ * root. Hosts that omit it leave those two actions inert — the file
104
+ * manager keeps no storage of its own.
105
+ */
106
+ onCreateFile?: (request: FileManagerCreateRequest) => void | Promise<void>;
85
107
  onToggleExpand: (id: string) => void;
86
108
  /**
87
109
  * Replaces the set of expanded folders wholesale, used by the toolbar's
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-reason-editor-sidebar",
3
3
  "description": "The REASON editor's file/folder sidebar, open-tabs panel, and split-view menu as a standalone package built on react-reason-editor",
4
- "version": "0.1.133",
4
+ "version": "0.1.134",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/OpenSourceAGI/qwksearch-research-agent.git",