react-reason-editor-sidebar 0.1.66 → 0.1.67

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/Sidebar.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  import type { SidebarProps } from './layout/sidebar/types';
2
- export declare const Sidebar: ({ documents, activeId, activeDocument, onSelect, onAdd, onDelete, onDuplicate, onSetExpandedFolders, onMove, onManageTags, onRename, onSearchFocus, isOpen, onOpenChange, isMobile, leftPanels, onLeftPanelsChange, rightPanels, onRightPanelsChange, onSettingsClick, onRestore, newDocumentId, showDynamicIsland, onToggleDynamicIsland, activeFileSourceId, onFileSourceChange, headings, onNavigate, editorRef, openTabs, activeTab, onTabChange, onTabClose, onTabsClose, onTabRename, onSplitRight, onReopenLastClosed, canReopenLastClosed, aiProps, tipsProps, topicsProps, tabItems, onNewChat, }: SidebarProps) => import("react").JSX.Element;
2
+ export declare const Sidebar: ({ documents, activeId, activeDocument, onSelect, onAdd, onDelete, onDuplicate, onSetExpandedFolders, onMove, onManageTags, onRename, onSearchFocus, isOpen, onOpenChange, isMobile, leftPanels, onLeftPanelsChange, rightPanels, onRightPanelsChange, settingsHref, onRestore, newDocumentId, showDynamicIsland, onToggleDynamicIsland, activeFileSourceId, onFileSourceChange, headings, onNavigate, editorRef, openTabs, activeTab, onTabChange, onTabClose, onTabsClose, onTabRename, onSplitRight, onReopenLastClosed, canReopenLastClosed, aiProps, tipsProps, topicsProps, tabItems, onNewChat, }: SidebarProps) => import("react").JSX.Element;
@@ -1,3 +1,4 @@
1
+ import type { AnyFileSource } from './app-types/fileSource';
1
2
  import type { Document } from './documents/DocumentTree';
2
3
  import type { SidebarPanelType } from './layout/sidebar/types';
3
4
  /** Props for the {@link SidebarFooter} component. */
@@ -10,28 +11,29 @@ interface SidebarFooterProps {
10
11
  rightPanels: SidebarPanelType[];
11
12
  /** Changes which panels are visible in the right sidebar. */
12
13
  onRightPanelsChange: (panels: SidebarPanelType[]) => void;
13
- /** Suppresses the settings button when `true` (mobile layout). */
14
+ /** Reserved for layout tweaks on the mobile drawer. */
14
15
  isMobile?: boolean;
15
16
  /** Soft-deleted documents shown in the trash dropdown. */
16
17
  deletedDocs: Document[];
17
18
  /** Restores a soft-deleted document by ID. */
18
19
  onRestore?: (id: string) => void;
19
- /** Opens the settings dialog, optionally navigating to a specific section. */
20
- onSettingsClick?: (section?: string) => void;
21
- /** Logged-in user info, or null/undefined when not authenticated. */
22
- user?: {
23
- name?: string;
24
- email?: string;
25
- } | null;
26
- /** Called when the user clicks "Login". */
27
- onLogin?: () => void;
28
- /** Called when the user clicks "Sign Out". */
29
- onSignOut?: () => void;
20
+ /** URL the settings button opens. Defaults to `/settings`. */
21
+ settingsHref?: string;
22
+ /** Available file source configurations. */
23
+ sources?: AnyFileSource[];
24
+ /** The currently active file source object, or `null` if none selected. */
25
+ activeSource?: AnyFileSource | null;
26
+ /** ID of the currently active file source. */
27
+ activeFileSourceId?: string;
28
+ /** Selects a source by ID and updates the active source state. */
29
+ onSourceSelect?: (sourceId: string) => void;
30
+ /** Called when the user selects a different file source; also gates the switcher. */
31
+ onFileSourceChange?: (sourceId: string) => void;
30
32
  }
31
33
  /**
32
- * Compact icon row pinned to the bottom of the sidebar. Includes a trash
33
- * dropdown (restore deleted docs), settings button, and a panel view
34
- * dropdown.
34
+ * Compact icon row pinned to the bottom of the sidebar. Includes the storage
35
+ * source switcher, a trash dropdown (restore deleted docs), a settings link
36
+ * to the settings page, and a panel view dropdown.
35
37
  */
36
- export declare const SidebarFooter: ({ leftPanels, onLeftPanelsChange, rightPanels, onRightPanelsChange, isMobile, deletedDocs, onRestore, onSettingsClick, user, onLogin, onSignOut, }: SidebarFooterProps) => import("react").JSX.Element;
38
+ export declare const SidebarFooter: ({ leftPanels, onLeftPanelsChange, rightPanels, onRightPanelsChange, deletedDocs, onRestore, settingsHref, sources, activeSource, activeFileSourceId, onSourceSelect, onFileSourceChange, }: SidebarFooterProps) => import("react").JSX.Element;
37
39
  export {};
@@ -1,13 +1,12 @@
1
1
  /**
2
2
  * @module SidebarToolbar
3
3
  * @description Compact icon toolbar rendered at the top of the sidebar. Shows
4
- * context-sensitive controls based on `leftPanels`: file-source switcher, search,
5
- * and expand/collapse buttons. The file-tree actions (new file/folder, trash,
6
- * file manager) render here only when the "Files" panel — which hosts them in
7
- * its own header — is hidden.
4
+ * context-sensitive controls based on `leftPanels`: search and expand/collapse
5
+ * buttons. The storage-source switcher lives in the sidebar footer. The
6
+ * file-tree actions (new file/folder, trash, file manager) render here only
7
+ * when the "Files" panel — which hosts them in its own header — is hidden.
8
8
  */
9
9
  import { RefObject } from 'react';
10
- import type { AnyFileSource } from './app-types/fileSource';
11
10
  import type { DocumentTreeHandle } from './file-tree/filetree';
12
11
  import type { OutlineViewHandle } from './search/OutlineView';
13
12
  import type { SidebarPanelType, OpenTabItem } from './layout/sidebar/types';
@@ -30,16 +29,6 @@ interface SidebarToolbarProps {
30
29
  onSearchFocus: () => void;
31
30
  /** Opens the file manager modal. */
32
31
  onFileManagerOpen: () => void;
33
- /** Available file source configurations. */
34
- sources: AnyFileSource[];
35
- /** The currently active file source object, or `null` if none selected. */
36
- activeSource: AnyFileSource | null;
37
- /** ID of the currently active file source. */
38
- activeFileSourceId: string;
39
- /** Called when the user selects a different file source from the dropdown. */
40
- onFileSourceChange?: (sourceId: string) => void;
41
- /** Selects a source by ID and updates the active source state. */
42
- onSourceSelect: (sourceId: string) => void;
43
32
  /** Whether all tree nodes are currently expanded (drives the toggle icon). */
44
33
  allExpanded: boolean;
45
34
  /** Tooltip label describing what the expand-all toggle will do next (cycles by folder level). */
@@ -68,9 +57,7 @@ interface SidebarToolbarProps {
68
57
  showDynamicIsland?: boolean;
69
58
  /** Toggles the floating reading-progress island. */
70
59
  onToggleDynamicIsland?: () => void;
71
- /** Opens the settings dialog, optionally navigating to a specific section. */
72
- onSettingsClick?: (section?: string) => void;
73
- /** Suppresses the settings button when `true` (mobile layout). */
60
+ /** Reserved for layout tweaks on the mobile drawer. */
74
61
  isMobile?: boolean;
75
62
  /** All currently open tab IDs. */
76
63
  openTabs?: string[];
@@ -88,8 +75,7 @@ interface SidebarToolbarProps {
88
75
  /**
89
76
  * Sidebar toolbar strip. Renders different button sets based on which
90
77
  * panels are active in `leftPanels`: the files/open-tabs panel shows
91
- * file-source, search, file-manager, new-file/folder, and collapse-all
92
- * buttons; the outline panel additionally shows an expand/collapse toggle.
78
+ * search, file-manager, new-file/folder, and collapse-all buttons; the outline panel additionally shows an expand/collapse toggle.
93
79
  */
94
- export declare const SidebarToolbar: ({ leftPanels, onLeftPanelsChange, rightPanels, onRightPanelsChange, activeId, onAdd, onSearchFocus, onFileManagerOpen, sources, activeSource, activeFileSourceId, onFileSourceChange, onSourceSelect, allExpanded, expandToggleLabel, expandToggleDisabled, outlineExpanded, onToggleAllExpanded, onToggleOutlineExpanded, treeRef, outlineRef, deletedDocs, onRestore, showDynamicIsland, onToggleDynamicIsland, onSettingsClick, isMobile, openTabs, activeTab, onTabChange, onTabClose, documents, tabItems, }: SidebarToolbarProps) => import("react").JSX.Element;
80
+ export declare const SidebarToolbar: ({ leftPanels, onLeftPanelsChange, rightPanels, onRightPanelsChange, activeId, onAdd, onSearchFocus, onFileManagerOpen, allExpanded, expandToggleLabel, expandToggleDisabled, outlineExpanded, onToggleAllExpanded, onToggleOutlineExpanded, treeRef, outlineRef, deletedDocs, onRestore, showDynamicIsland, onToggleDynamicIsland, isMobile, openTabs, activeTab, onTabChange, onTabClose, documents, tabItems, }: SidebarToolbarProps) => import("react").JSX.Element;
95
81
  export {};