@dotdirfm/ui 0.1.1

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.
Files changed (95) hide show
  1. package/dist/dotdir.css +2 -0
  2. package/dist/dotdir.js +130 -0
  3. package/dist/dotdir.mjs +9538 -0
  4. package/dist/lib/DotDir.d.ts +8 -0
  5. package/dist/lib/actionQueue.d.ts +7 -0
  6. package/dist/lib/app.d.ts +3 -0
  7. package/dist/lib/atoms.d.ts +84 -0
  8. package/dist/lib/components/ActionBar.d.ts +1 -0
  9. package/dist/lib/components/CommandLine.d.ts +1 -0
  10. package/dist/lib/components/CommandPalette.d.ts +10 -0
  11. package/dist/lib/components/ErrorBoundary.d.ts +18 -0
  12. package/dist/lib/components/ExtensionContainer.d.ts +48 -0
  13. package/dist/lib/components/ExtensionsPanel.d.ts +1 -0
  14. package/dist/lib/components/FileList/Breadcrumbs.d.ts +6 -0
  15. package/dist/lib/components/FileList/ColumnsScroller.d.ts +16 -0
  16. package/dist/lib/components/FileList/FileList.d.ts +15 -0
  17. package/dist/lib/components/FileList/PanelTabs.d.ts +24 -0
  18. package/dist/lib/components/FileList/ScrollableContainer.d.ts +13 -0
  19. package/dist/lib/components/FileList/index.d.ts +1 -0
  20. package/dist/lib/components/FileList/useElementSize.d.ts +7 -0
  21. package/dist/lib/components/PanelGroup.d.ts +23 -0
  22. package/dist/lib/components/Terminal.d.ts +2 -0
  23. package/dist/lib/dialogs/ConflictDialog.d.ts +11 -0
  24. package/dist/lib/dialogs/CopyConfigDialog.d.ts +8 -0
  25. package/dist/lib/dialogs/CopyProgressDialog.d.ts +9 -0
  26. package/dist/lib/dialogs/DeleteProgressDialog.d.ts +6 -0
  27. package/dist/lib/dialogs/HelpDialog.d.ts +6 -0
  28. package/dist/lib/dialogs/MakeFolderDialog.d.ts +13 -0
  29. package/dist/lib/dialogs/ModalDialog.d.ts +14 -0
  30. package/dist/lib/dialogs/MoveConfigDialog.d.ts +8 -0
  31. package/dist/lib/dialogs/OpenCreateFileDialog.d.ts +11 -0
  32. package/dist/lib/dialogs/RenameDialog.d.ts +6 -0
  33. package/dist/lib/dialogs/dialogContext.d.ts +115 -0
  34. package/dist/lib/dialogs/dialogHotkeys.d.ts +18 -0
  35. package/dist/lib/entities/panel/model/panelSide.d.ts +9 -0
  36. package/dist/lib/entities/panel/model/types.d.ts +1 -0
  37. package/dist/lib/entities/tab/model/tabsAtoms.d.ts +25 -0
  38. package/dist/lib/features/bridge/index.d.ts +209 -0
  39. package/dist/lib/features/bridge/useBridge.d.ts +9 -0
  40. package/dist/lib/features/commands/builtInCommandContributions.d.ts +2 -0
  41. package/dist/lib/features/commands/commands.d.ts +90 -0
  42. package/dist/lib/features/extensions/browserExtensionHost.d.ts +36 -0
  43. package/dist/lib/features/extensions/browserFsProvider.d.ts +5 -0
  44. package/dist/lib/features/extensions/extensionApi.d.ts +196 -0
  45. package/dist/lib/features/extensions/extensionHost.worker.d.ts +174 -0
  46. package/dist/lib/features/extensions/extensionHostClient.d.ts +29 -0
  47. package/dist/lib/features/extensions/extensionLoader.d.ts +8 -0
  48. package/dist/lib/features/extensions/extensions.d.ts +251 -0
  49. package/dist/lib/features/extensions/useExtensionHost.d.ts +6 -0
  50. package/dist/lib/features/file-icons/iconCache.d.ts +3 -0
  51. package/dist/lib/features/file-icons/iconResolver.d.ts +34 -0
  52. package/dist/lib/features/file-icons/vscodeIconTheme.d.ts +62 -0
  53. package/dist/lib/features/file-ops/model/fileOperationHandlers.d.ts +10 -0
  54. package/dist/lib/features/file-ops/model/useFileOperations.d.ts +15 -0
  55. package/dist/lib/features/marketplace/vscodeMarketplace.d.ts +33 -0
  56. package/dist/lib/features/navigation/lib/commandLineCd.d.ts +20 -0
  57. package/dist/lib/features/settings/types.d.ts +12 -0
  58. package/dist/lib/features/settings/useUserSettings.d.ts +6 -0
  59. package/dist/lib/features/settings/userSettings.d.ts +8 -0
  60. package/dist/lib/features/ui-state/types.d.ts +22 -0
  61. package/dist/lib/features/ui-state/uiState.d.ts +5 -0
  62. package/dist/lib/fileListHandlers.d.ts +31 -0
  63. package/dist/lib/focusContext.d.ts +21 -0
  64. package/dist/lib/fs.d.ts +36 -0
  65. package/dist/lib/fss.d.ts +9 -0
  66. package/dist/lib/hooks/useBuiltInCommands.d.ts +24 -0
  67. package/dist/lib/hooks/useDialogButtonNav.d.ts +10 -0
  68. package/dist/lib/hooks/useMediaQuery.d.ts +1 -0
  69. package/dist/lib/hooks/usePanel.d.ts +23 -0
  70. package/dist/lib/hooks/useTerminal.d.ts +12 -0
  71. package/dist/lib/jsoncFileWatcher.d.ts +15 -0
  72. package/dist/lib/languageRegistry.d.ts +43 -0
  73. package/dist/lib/panelGroupHandlers.d.ts +6 -0
  74. package/dist/lib/processes/workspace-session/model/useWorkspaceSessionProcess.d.ts +59 -0
  75. package/dist/lib/registerKeybindings.d.ts +11 -0
  76. package/dist/lib/styleHost.d.ts +2 -0
  77. package/dist/lib/terminal/TerminalSession.d.ts +59 -0
  78. package/dist/lib/terminal/TerminalView.d.ts +8 -0
  79. package/dist/lib/terminal/path.d.ts +7 -0
  80. package/dist/lib/terminal/shellProfiles.d.ts +15 -0
  81. package/dist/lib/terminal/terminalAtoms.d.ts +7 -0
  82. package/dist/lib/terminal/types.d.ts +53 -0
  83. package/dist/lib/terminal/useTerminalState.d.ts +20 -0
  84. package/dist/lib/types.d.ts +12 -0
  85. package/dist/lib/userKeybindings.d.ts +3 -0
  86. package/dist/lib/utils/containerPath.d.ts +45 -0
  87. package/dist/lib/utils/cssModules.d.ts +1 -0
  88. package/dist/lib/utils/inputNoAssist.d.ts +9 -0
  89. package/dist/lib/utils/langDetect.d.ts +1 -0
  90. package/dist/lib/utils/mediaFiles.d.ts +7 -0
  91. package/dist/lib/utils/path.d.ts +26 -0
  92. package/dist/lib/utils/vfs.d.ts +2 -0
  93. package/dist/lib/viewerEditorRegistry.d.ts +53 -0
  94. package/dist/lib/vscodeColorTheme.d.ts +27 -0
  95. package/package.json +66 -0
@@ -0,0 +1,8 @@
1
+ import { Bridge } from '../features/bridge';
2
+ export type { Bridge, ConflictResolution, CopyOptions, CopyProgressEvent, DeleteProgressEvent, FsChangeEvent, FsChangeType, FspEntry, FsRawEntry, MoveOptions, MoveProgressEvent, PtyLaunchInfo } from '../features/bridge';
3
+ export { basename, dirname, join, normalizePath } from './utils/path';
4
+ export type DotDirProps = {
5
+ bridge: Bridge;
6
+ widget: React.ReactNode;
7
+ };
8
+ export declare function DotDir({ bridge, widget }: DotDirProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ export type Action = () => Promise<void> | void;
2
+ declare class ActionQueue {
3
+ private tail;
4
+ enqueue(action: Action): void;
5
+ }
6
+ export declare const actionQueue: ActionQueue;
7
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare function App({ widget }: {
2
+ widget: React.ReactNode;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,84 @@
1
+ import { PanelSide } from '../entities/panel/model/types';
2
+ import { TerminalProfile } from '../features/bridge';
3
+ import { LoadedExtension } from '../features/extensions/extensions';
4
+ import { ThemeKind } from 'fss-lang';
5
+ export declare const showExtensionsAtom: import('jotai').PrimitiveAtom<boolean> & {
6
+ init: boolean;
7
+ };
8
+ export declare const activeIconThemeAtom: import('jotai').PrimitiveAtom<string | undefined> & {
9
+ init: string | undefined;
10
+ };
11
+ export declare const activeColorThemeAtom: import('jotai').PrimitiveAtom<string | undefined> & {
12
+ init: string | undefined;
13
+ };
14
+ export declare const loadedExtensionsAtom: import('jotai').PrimitiveAtom<LoadedExtension[]> & {
15
+ init: LoadedExtension[];
16
+ };
17
+ export declare const themesReadyAtom: import('jotai').PrimitiveAtom<boolean> & {
18
+ init: boolean;
19
+ };
20
+ export declare const resolvedProfilesAtom: import('jotai').PrimitiveAtom<TerminalProfile[]> & {
21
+ init: TerminalProfile[];
22
+ };
23
+ export declare const terminalProfilesLoadedAtom: import('jotai').PrimitiveAtom<boolean> & {
24
+ init: boolean;
25
+ };
26
+ export declare const osThemeAtom: import('jotai').PrimitiveAtom<ThemeKind> & {
27
+ init: ThemeKind;
28
+ };
29
+ export declare const panelsVisibleAtom: import('jotai').PrimitiveAtom<boolean> & {
30
+ init: boolean;
31
+ };
32
+ export declare const promptActiveAtom: import('jotai').PrimitiveAtom<boolean> & {
33
+ init: boolean;
34
+ };
35
+ export declare const terminalFocusRequestKeyAtom: import('jotai').PrimitiveAtom<number> & {
36
+ init: number;
37
+ };
38
+ export declare const requestedTerminalCwdAtom: import('jotai').PrimitiveAtom<string | null> & {
39
+ init: string | null;
40
+ };
41
+ export declare const activePanelAtom: import('jotai').PrimitiveAtom<PanelSide> & {
42
+ init: PanelSide;
43
+ };
44
+ export declare const showHiddenAtom: import('jotai').PrimitiveAtom<boolean> & {
45
+ init: boolean;
46
+ };
47
+ export declare const commandPaletteOpenAtom: import('jotai').PrimitiveAtom<boolean> & {
48
+ init: boolean;
49
+ };
50
+ export declare const viewerFileAtom: import('jotai').PrimitiveAtom<{
51
+ path: string;
52
+ name: string;
53
+ size: number;
54
+ panel: PanelSide;
55
+ } | null> & {
56
+ init: {
57
+ path: string;
58
+ name: string;
59
+ size: number;
60
+ panel: PanelSide;
61
+ } | null;
62
+ };
63
+ export declare const editorFileAtom: import('jotai').PrimitiveAtom<{
64
+ path: string;
65
+ name: string;
66
+ size: number;
67
+ langId: string;
68
+ } | null> & {
69
+ init: {
70
+ path: string;
71
+ name: string;
72
+ size: number;
73
+ langId: string;
74
+ } | null;
75
+ };
76
+ export declare const commandLineCwdAtom: import('jotai').PrimitiveAtom<string> & {
77
+ init: string;
78
+ };
79
+ export declare const commandLineOnExecuteAtom: import('jotai').PrimitiveAtom<((cmd: string) => void) | null> & {
80
+ init: ((cmd: string) => void) | null;
81
+ };
82
+ export declare const commandLinePasteFnAtom: import('jotai').PrimitiveAtom<((text: string) => void) | null> & {
83
+ init: ((text: string) => void) | null;
84
+ };
@@ -0,0 +1 @@
1
+ export declare function ActionBar(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function CommandLine(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ interface CommandPaletteProps {
2
+ open: boolean;
3
+ onOpenChange: (open: boolean) => void;
4
+ }
5
+ export declare function CommandPalette({ open, onOpenChange }: CommandPaletteProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function useCommandPalette(): {
7
+ open: boolean;
8
+ setOpen: (args_0: boolean | ((prev: boolean) => boolean)) => void;
9
+ };
10
+ export {};
@@ -0,0 +1,18 @@
1
+ import { Component, ReactNode } from 'react';
2
+ interface Props {
3
+ children: ReactNode;
4
+ }
5
+ interface State {
6
+ error: Error | null;
7
+ }
8
+ /**
9
+ * Top-level error boundary that catches React render errors
10
+ * and shows a recoverable error overlay instead of crashing the app.
11
+ */
12
+ export declare class ErrorBoundary extends Component<Props, State> {
13
+ state: State;
14
+ static getDerivedStateFromError(error: Error): State;
15
+ componentDidCatch(error: Error, info: React.ErrorInfo): void;
16
+ render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
17
+ }
18
+ export {};
@@ -0,0 +1,48 @@
1
+ import { EditorProps, ViewerProps } from '../../features/extensions/extensionApi';
2
+ interface ExtensionContainerProps {
3
+ extensionDirPath: string;
4
+ entry: string;
5
+ active?: boolean;
6
+ className?: string;
7
+ style?: React.CSSProperties;
8
+ }
9
+ interface ViewerContainerProps extends ExtensionContainerProps {
10
+ kind: "viewer";
11
+ props: ViewerProps;
12
+ onClose: () => void;
13
+ onExecuteCommand?: (command: string, args?: unknown) => Promise<unknown>;
14
+ }
15
+ interface EditorContainerProps extends ExtensionContainerProps {
16
+ kind: "editor";
17
+ props: EditorProps;
18
+ onClose: () => void;
19
+ onDirtyChange?: (dirty: boolean) => void;
20
+ }
21
+ export type ContainerProps = ViewerContainerProps | EditorContainerProps;
22
+ export declare function ExtensionContainer(containerProps: ContainerProps): import("react/jsx-runtime").JSX.Element;
23
+ interface ViewerContainerWrapperProps {
24
+ extensionDirPath: string;
25
+ entry: string;
26
+ filePath: string;
27
+ fileName: string;
28
+ fileSize: number;
29
+ inline?: boolean;
30
+ visible?: boolean;
31
+ onClose: () => void;
32
+ onExecuteCommand?: (command: string, args?: unknown) => Promise<unknown>;
33
+ }
34
+ export declare function ViewerContainer({ extensionDirPath, entry, filePath, fileName, fileSize, inline, visible, onClose, onExecuteCommand, }: ViewerContainerWrapperProps): import("react/jsx-runtime").JSX.Element;
35
+ interface EditorContainerWrapperProps {
36
+ extensionDirPath: string;
37
+ entry: string;
38
+ filePath: string;
39
+ fileName: string;
40
+ langId: string;
41
+ visible?: boolean;
42
+ onClose: () => void;
43
+ onDirtyChange?: (dirty: boolean) => void;
44
+ languages?: EditorProps["languages"];
45
+ grammars?: EditorProps["grammars"];
46
+ }
47
+ export declare function EditorContainer({ extensionDirPath, entry, filePath, fileName, langId, visible, onClose, onDirtyChange, languages, grammars, }: EditorContainerWrapperProps): import("react/jsx-runtime").JSX.Element;
48
+ export {};
@@ -0,0 +1 @@
1
+ export declare function ExtensionsPanel(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ interface BreadcrumbsProps {
2
+ currentPath: string;
3
+ onNavigate: (path: string) => void;
4
+ }
5
+ export declare const Breadcrumbs: import('react').MemoExoticComponent<({ currentPath, onNavigate }: BreadcrumbsProps) => import("react/jsx-runtime").JSX.Element | null>;
6
+ export {};
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from 'react';
2
+ export interface ColumnsScrollerProps {
3
+ topmostIndex: number;
4
+ activeIndex: number;
5
+ totalCount: number;
6
+ itemHeight: number;
7
+ minColumnWidth?: number;
8
+ far?: boolean;
9
+ selectedKeys?: ReadonlySet<string | number>;
10
+ getItemKey?: (index: number) => string | number;
11
+ renderItem(index: number, isActive: boolean, isSelected: boolean): ReactNode;
12
+ onPosChange: (newTopmostItem: number, newActiveItem: number) => void;
13
+ onItemsPerColumnChanged?: (count: number) => void;
14
+ onColumnCountChanged?: (count: number) => void;
15
+ }
16
+ export declare const ColumnsScroller: import('react').MemoExoticComponent<(props: ColumnsScrollerProps) => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,15 @@
1
+ import { LayeredResolver, FsNode } from 'fss-lang';
2
+ interface FileListProps {
3
+ currentPath: string;
4
+ parentNode?: FsNode;
5
+ entries: FsNode[];
6
+ onNavigate: (path: string) => Promise<void>;
7
+ selectionKey?: number;
8
+ active: boolean;
9
+ resolver: LayeredResolver;
10
+ requestedActiveName?: string;
11
+ requestedTopmostName?: string;
12
+ onStateChange?: (selectedName: string | undefined, topmostName: string | undefined) => void;
13
+ }
14
+ export declare const FileList: import('react').MemoExoticComponent<({ currentPath, parentNode, entries, onNavigate, selectionKey, active, resolver, requestedActiveName, requestedTopmostName, onStateChange, }: FileListProps) => import("react/jsx-runtime").JSX.Element>;
15
+ export {};
@@ -0,0 +1,24 @@
1
+ export type PanelTab = {
2
+ id: string;
3
+ type: "filelist";
4
+ path: string;
5
+ } | {
6
+ id: string;
7
+ type: "preview";
8
+ path: string;
9
+ name: string;
10
+ size: number;
11
+ isTemp: boolean;
12
+ sourcePanel?: "left" | "right";
13
+ };
14
+ interface PanelTabsProps {
15
+ tabs: PanelTab[];
16
+ activeTabId: string;
17
+ onSelectTab: (id: string) => void;
18
+ onDoubleClickTab: (id: string) => void;
19
+ onCloseTab?: (id: string) => void;
20
+ onNewTab: () => void;
21
+ onReorderTabs?: (fromIndex: number, toIndex: number) => void;
22
+ }
23
+ export declare const PanelTabs: import('react').MemoExoticComponent<({ tabs, activeTabId, onSelectTab, onDoubleClickTab, onCloseTab, onNewTab, onReorderTabs }: PanelTabsProps) => import("react/jsx-runtime").JSX.Element>;
24
+ export {};
@@ -0,0 +1,13 @@
1
+ import { default as React, CSSProperties, ReactNode } from 'react';
2
+ interface ScrollableContainerProps {
3
+ children: ReactNode;
4
+ scrollHeight: number;
5
+ scrollTop: number;
6
+ lineSize?: number;
7
+ velocityFactor?: number;
8
+ frictionFactor?: number;
9
+ style?: CSSProperties;
10
+ onScroll?: (scrollTop: number) => void;
11
+ }
12
+ export declare const ScrollableContainer: React.FC<ScrollableContainerProps>;
13
+ export {};
@@ -0,0 +1 @@
1
+ export { FileList } from './FileList';
@@ -0,0 +1,7 @@
1
+ import { RefObject } from 'react';
2
+ interface Size {
3
+ width: number;
4
+ height: number;
5
+ }
6
+ export declare function useElementSize(ref: RefObject<HTMLElement | null>): Size;
7
+ export {};
@@ -0,0 +1,23 @@
1
+ import { PanelSide } from '../../entities/panel/model/types';
2
+ import { PanelPersistedState } from '../../features/ui-state/types';
3
+ import { FsNode, LayeredResolver } from 'fss-lang';
4
+ interface PanelModel {
5
+ currentPath: string;
6
+ parentNode?: FsNode;
7
+ entries: FsNode[];
8
+ navigating: boolean;
9
+ resolver: LayeredResolver;
10
+ navigateTo: (path: string, force?: boolean) => Promise<void>;
11
+ }
12
+ interface PanelGroupProps {
13
+ side: PanelSide;
14
+ panel: PanelModel;
15
+ onRememberExpectedTerminalCwd: (path: string) => void;
16
+ selectionKey?: number;
17
+ requestedActiveName?: string;
18
+ requestedTopmostName?: string;
19
+ initialPanelState?: PanelPersistedState;
20
+ onStateChange: (selectedName: string | undefined, topmostName: string | undefined) => void;
21
+ }
22
+ export declare function PanelGroup({ side, panel, onRememberExpectedTerminalCwd, selectionKey, requestedActiveName, requestedTopmostName, initialPanelState, onStateChange, }: PanelGroupProps): import("react/jsx-runtime").JSX.Element;
23
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare function TerminalToolbar(): import("react/jsx-runtime").JSX.Element;
2
+ export declare function TerminalPanelBody(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { ConflictResolution } from '../../features/bridge';
2
+ export interface ConflictDialogProps {
3
+ src: string;
4
+ dest: string;
5
+ srcSize: number;
6
+ srcMtimeMs: number;
7
+ destSize: number;
8
+ destMtimeMs: number;
9
+ onResolve: (resolution: ConflictResolution) => void;
10
+ }
11
+ export declare function ConflictDialog({ src, dest, srcSize, srcMtimeMs, destSize, destMtimeMs, onResolve }: ConflictDialogProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { CopyOptions } from '../../features/bridge';
2
+ export interface CopyConfigDialogProps {
3
+ itemCount: number;
4
+ destPath: string;
5
+ onConfirm: (options: CopyOptions, destDir: string) => void;
6
+ onCancel: () => void;
7
+ }
8
+ export declare function CopyConfigDialog({ itemCount, destPath, onConfirm, onCancel }: CopyConfigDialogProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ export interface CopyProgressDialogProps {
2
+ bytesCopied: number;
3
+ bytesTotal: number;
4
+ filesDone: number;
5
+ filesTotal: number;
6
+ currentFile: string;
7
+ onCancel: () => void;
8
+ }
9
+ export declare function CopyProgressDialog({ bytesCopied, bytesTotal, filesDone, filesTotal, currentFile, onCancel }: CopyProgressDialogProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ export interface DeleteProgressDialogProps {
2
+ filesDone: number;
3
+ currentFile: string;
4
+ onCancel: () => void;
5
+ }
6
+ export declare function DeleteProgressDialog({ filesDone, currentFile, onCancel }: DeleteProgressDialogProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ interface HelpDialogProps {
2
+ content: string;
3
+ onClose: () => void;
4
+ }
5
+ export declare function HelpDialog({ content, onClose }: HelpDialogProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,13 @@
1
+ export type MakeFolderResult = {
2
+ mode: "single";
3
+ name: string;
4
+ } | {
5
+ mode: "multiple";
6
+ names: string[];
7
+ };
8
+ export interface MakeFolderDialogProps {
9
+ currentPath: string;
10
+ onConfirm: (result: MakeFolderResult) => void;
11
+ onCancel: () => void;
12
+ }
13
+ export declare function MakeFolderDialog({ currentPath: _currentPath, onConfirm, onCancel }: MakeFolderDialogProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ interface ModalButton {
2
+ label: string;
3
+ default?: boolean;
4
+ onClick?: () => void;
5
+ }
6
+ export interface ModalDialogProps {
7
+ title?: string;
8
+ message: string;
9
+ variant?: "error" | "default";
10
+ buttons?: ModalButton[];
11
+ onClose: () => void;
12
+ }
13
+ export declare function ModalDialog({ title, message, variant, buttons, onClose }: ModalDialogProps): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,8 @@
1
+ import { MoveOptions } from '../../features/bridge';
2
+ export interface MoveConfigDialogProps {
3
+ itemCount: number;
4
+ destPath: string;
5
+ onConfirm: (options: MoveOptions, destDir: string) => void;
6
+ onCancel: () => void;
7
+ }
8
+ export declare function MoveConfigDialog({ itemCount, destPath, onConfirm, onCancel }: MoveConfigDialogProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ export interface LanguageOption {
2
+ id: string;
3
+ label: string;
4
+ }
5
+ export interface OpenCreateFileDialogProps {
6
+ currentPath: string;
7
+ languages: LanguageOption[];
8
+ onConfirm: (filePath: string, fileName: string, langId: string) => void;
9
+ onCancel: () => void;
10
+ }
11
+ export declare function OpenCreateFileDialog({ currentPath, languages, onConfirm, onCancel }: OpenCreateFileDialogProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ export interface RenameDialogProps {
2
+ currentName: string;
3
+ onConfirm: (newName: string) => void;
4
+ onCancel: () => void;
5
+ }
6
+ export declare function RenameDialog({ currentName, onConfirm, onCancel }: RenameDialogProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,115 @@
1
+ import { ConflictResolution, CopyOptions, MoveOptions } from '../../features/bridge';
2
+ import { ReactNode } from 'react';
3
+ import { MakeFolderResult } from './MakeFolderDialog';
4
+ import { LanguageOption } from './OpenCreateFileDialog';
5
+ export interface MessageDialogButton {
6
+ label: string;
7
+ default?: boolean;
8
+ onClick?: () => void;
9
+ }
10
+ export type DialogSpec = {
11
+ type: "message";
12
+ title?: string;
13
+ message: string;
14
+ variant?: "error" | "default";
15
+ buttons?: MessageDialogButton[];
16
+ } | {
17
+ type: "openCreateFile";
18
+ currentPath: string;
19
+ languages: LanguageOption[];
20
+ onConfirm: (filePath: string, fileName: string, langId: string) => void;
21
+ onCancel: () => void;
22
+ } | {
23
+ type: "deleteProgress";
24
+ filesDone: number;
25
+ currentFile: string;
26
+ onCancel: () => void;
27
+ } | {
28
+ type: "cancelDeleteConfirm";
29
+ onResume: () => void;
30
+ onCancelDeletion: () => void;
31
+ } | {
32
+ type: "makeFolder";
33
+ currentPath: string;
34
+ onConfirm: (result: MakeFolderResult) => void;
35
+ onCancel: () => void;
36
+ } | {
37
+ type: "copyConfig";
38
+ itemCount: number;
39
+ destPath: string;
40
+ onConfirm: (options: CopyOptions, destDir: string) => void;
41
+ onCancel: () => void;
42
+ } | {
43
+ type: "copyProgress";
44
+ bytesCopied: number;
45
+ bytesTotal: number;
46
+ filesDone: number;
47
+ filesTotal: number;
48
+ currentFile: string;
49
+ onCancel: () => void;
50
+ } | {
51
+ type: "copyConflict";
52
+ src: string;
53
+ dest: string;
54
+ srcSize: number;
55
+ srcMtimeMs: number;
56
+ destSize: number;
57
+ destMtimeMs: number;
58
+ onResolve: (resolution: ConflictResolution) => void;
59
+ } | {
60
+ type: "cancelCopyConfirm";
61
+ onResume: () => void;
62
+ onCancelCopy: () => void;
63
+ } | {
64
+ type: "moveConfig";
65
+ itemCount: number;
66
+ destPath: string;
67
+ onConfirm: (options: MoveOptions, destDir: string) => void;
68
+ onCancel: () => void;
69
+ } | {
70
+ type: "moveProgress";
71
+ bytesCopied: number;
72
+ bytesTotal: number;
73
+ filesDone: number;
74
+ filesTotal: number;
75
+ currentFile: string;
76
+ onCancel: () => void;
77
+ } | {
78
+ type: "moveConflict";
79
+ src: string;
80
+ dest: string;
81
+ srcSize: number;
82
+ srcMtimeMs: number;
83
+ destSize: number;
84
+ destMtimeMs: number;
85
+ onResolve: (resolution: ConflictResolution) => void;
86
+ } | {
87
+ type: "cancelMoveConfirm";
88
+ onResume: () => void;
89
+ onCancelMove: () => void;
90
+ } | {
91
+ type: "rename";
92
+ currentName: string;
93
+ onConfirm: (newName: string) => void;
94
+ onCancel: () => void;
95
+ };
96
+ export type DialogUpdate = Partial<Pick<DialogSpec & {
97
+ type: "deleteProgress";
98
+ }, "filesDone" | "currentFile">> | Partial<Pick<DialogSpec & {
99
+ type: "copyProgress";
100
+ }, "bytesCopied" | "bytesTotal" | "filesDone" | "filesTotal" | "currentFile">> | Partial<Pick<DialogSpec & {
101
+ type: "moveProgress";
102
+ }, "bytesCopied" | "bytesTotal" | "filesDone" | "filesTotal" | "currentFile">>;
103
+ interface DialogContextValue {
104
+ dialog: DialogSpec | null;
105
+ showDialog: (spec: DialogSpec) => void;
106
+ closeDialog: () => void;
107
+ /** Update the current dialog (for deleteProgress or copyProgress: partial updates). */
108
+ updateDialog: (update: DialogUpdate) => void;
109
+ }
110
+ export declare function DialogProvider({ children }: {
111
+ children: ReactNode;
112
+ }): import("react/jsx-runtime").JSX.Element;
113
+ export declare function DialogHolder(): import("react/jsx-runtime").JSX.Element | null;
114
+ export declare function useDialog(): DialogContextValue;
115
+ export {};
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from 'react';
2
+ export declare function HotkeyProvider({ children, helpText }: {
3
+ children: ReactNode;
4
+ helpText?: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ /**
7
+ * Drop-in replacement for plain text inside a <button> or <label>.
8
+ * Finds the nearest <button> or <label> ancestor and registers its .click()
9
+ * as the hotkey action. Renders with the assigned character highlighted.
10
+ *
11
+ * Usage:
12
+ * <button><SmartLabel>Cancel</SmartLabel></button>
13
+ * <label><input type="checkbox" /> <SmartLabel>Copy permissions</SmartLabel></label>
14
+ * <label htmlFor="x"><SmartLabel>Folder name</SmartLabel></label>
15
+ */
16
+ export declare function SmartLabel({ children }: {
17
+ children: string;
18
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { PanelSide } from './types';
2
+ /** The other file-manager pane. */
3
+ export declare const OPPOSITE_PANEL: Record<PanelSide, PanelSide>;
4
+ /** Keys under `DotDirUiState` for each pane. */
5
+ export declare const PANEL_SETTINGS_KEY: {
6
+ readonly left: "leftPanel";
7
+ readonly right: "rightPanel";
8
+ };
9
+ export declare const PANEL_SIDES: PanelSide[];
@@ -0,0 +1 @@
1
+ export type PanelSide = "left" | "right";
@@ -0,0 +1,25 @@
1
+ import { PanelTab } from '../../../../components/FileList/PanelTabs';
2
+ import { PanelSide } from '../../../../entities/panel/model/types';
3
+ export declare function genTabId(): string;
4
+ export declare function createFilelistTab(path: string): PanelTab;
5
+ export declare function createPreviewTab(path: string, name: string, size: number, sourcePanel: PanelSide): PanelTab;
6
+ export declare const leftTabsAtom: import('jotai').PrimitiveAtom<PanelTab[]> & {
7
+ init: PanelTab[];
8
+ };
9
+ export declare const rightTabsAtom: import('jotai').PrimitiveAtom<PanelTab[]> & {
10
+ init: PanelTab[];
11
+ };
12
+ export declare const leftActiveTabIdAtom: import('jotai').PrimitiveAtom<string> & {
13
+ init: string;
14
+ };
15
+ export declare const rightActiveTabIdAtom: import('jotai').PrimitiveAtom<string> & {
16
+ init: string;
17
+ };
18
+ export declare const leftActiveIndexAtom: import('jotai').Atom<number>;
19
+ export declare const rightActiveIndexAtom: import('jotai').Atom<number>;
20
+ export declare const leftActiveTabAtom: import('jotai').Atom<PanelTab | null>;
21
+ export declare const rightActiveTabAtom: import('jotai').Atom<PanelTab | null>;
22
+ export declare const activeTabsAtom: import('jotai').Atom<PanelTab[]>;
23
+ export declare const activeTabIdAtom: import('jotai').Atom<string>;
24
+ export declare const activeTabIndexAtom: import('jotai').Atom<number>;
25
+ export declare const activeTabAtom: import('jotai').Atom<PanelTab | null>;