import { c as WorkspaceFileEntry, f as WorkspaceFileLocation, s as WorkspaceFileManagerSession } from './workspaceFileManagerLocations-8T9QKaP5.js'; export { C as CreateWorkspaceFileManagerSessionInput, W as WorkspaceFileActivationTarget, a as WorkspaceFileDirectoryListing, b as WorkspaceFileDirectoryLocation, d as WorkspaceFileEntryKind, e as WorkspaceFileExternalLocation, g as WorkspaceFileLocationKind, h as WorkspaceFileLocationSection, i as WorkspaceFileManagerCapabilities, j as WorkspaceFileManagerFileActivationRequest, l as WorkspaceFileManagerHost, m as WorkspaceFileManagerHostFallbackAction, n as WorkspaceFileManagerHostFallbackActionKind, o as WorkspaceFileManagerHostFileActivationResult, p as WorkspaceFileManagerMutationErrorMessage, q as WorkspaceFileManagerPersistedState, r as WorkspaceFileManagerService, t as WorkspaceFileManagerState, u as WorkspaceFileOpenWithApplication, v as WorkspaceFilePreviewKind, w as WorkspaceFilePreviewState, x as WorkspaceFileRecentLocation, y as WorkspaceFileSearchEntry, z as WorkspaceFileSearchResult, A as createWorkspaceFileManagerService, B as findWorkspaceFileLocationById, D as flattenWorkspaceFileLocations, E as isWorkspaceFileExternalLocation, F as isWorkspaceFileRecentLocation, G as resolveWorkspaceFileLocationDefaultId } from './workspaceFileManagerLocations-8T9QKaP5.js'; import { a as WorkspaceFileManagerI18nRuntime } from './index-CDQITT_i.js'; export { W as WorkspaceFileManagerI18nKey, c as createWorkspaceFileManagerI18nRuntime, r as resolveRevealInFolderLabel, w as workspaceFileManagerI18nNamespace, b as workspaceFileManagerI18nResources } from './index-CDQITT_i.js'; import { ReactElement, RefObject } from 'react'; import { TuttiDateLocale } from '@tutti-os/ui-system/date-format'; import '@tutti-os/workspace-file-preview'; import '@tutti-os/ui-i18n-runtime'; type WorkspaceFileManagerPreviewActionId = "copy" | "download" | "open" | "share"; /** * Declares which actions the preview panel renders in its bottom action row. * * Copy and open are backed by session commands the package already owns, so * hosts only opt in with a boolean. Download and share have no package-side * implementation, so passing a handler is what enables them — the same * "capability exists when the method exists" convention the host contract uses. */ interface WorkspaceFileManagerPreviewActionsConfig { /** Enables copy. Still requires `capabilities.canCopy`. */ copy?: boolean; /** Enables open. */ open?: boolean; onDownload?: (entry: WorkspaceFileEntry) => Promise | void; onShare?: (entry: WorkspaceFileEntry) => Promise | void; /** Overrides button order. Defaults to copy, open, download, share. */ order?: readonly WorkspaceFileManagerPreviewActionId[]; } type WorkspaceFileManagerEntryDragMode = "external" | "internal-move"; /** * Right-click target classification. Hosts resolve menus for each kind via * `resolveContextMenu`. */ type WorkspaceFileManagerContextMenuTarget = { kind: "blank"; directoryPath: string; } | { kind: "directory"; directoryPath: string; entry: WorkspaceFileEntry; } | { kind: "file"; directoryPath: string; entry: WorkspaceFileEntry; }; interface WorkspaceFileManagerContextMenuRequest { currentDirectoryPath: string; isBusy: boolean; isExternalLocation: boolean; isRecentLocation: boolean; isSearchMode: boolean; selectedLocationId: string | null; target: WorkspaceFileManagerContextMenuTarget; } type WorkspaceFileManagerContextMenuItem = WorkspaceFileManagerContextMenuActionItem | WorkspaceFileManagerContextMenuSeparatorItem | WorkspaceFileManagerContextMenuSubmenuItem; interface WorkspaceFileManagerContextMenuActionItem { type: "item"; id: string; label: string; icon?: ReactElement | null; disabled?: boolean; danger?: boolean; onSelect: () => void | Promise; } interface WorkspaceFileManagerContextMenuSeparatorItem { type: "separator"; id: string; } interface WorkspaceFileManagerContextMenuSubmenuItem { type: "submenu"; id: string; label: string; icon?: ReactElement | null; disabled?: boolean; /** * Host-driven loading indicator for controlled `children` (for example while * open-with applications are being fetched outside `loadChildren`). */ loading?: boolean; loadingLabel?: string; children?: readonly WorkspaceFileManagerContextMenuItem[]; loadChildren?: () => Promise; } type ResolveWorkspaceFileManagerContextMenu = (request: WorkspaceFileManagerContextMenuRequest) => readonly WorkspaceFileManagerContextMenuItem[] | Promise; declare function resolveWorkspaceFileManagerContextMenuTarget(input: { currentDirectoryPath: string; entry: WorkspaceFileEntry | null; }): WorkspaceFileManagerContextMenuTarget; interface WorkspaceFileManagerToolbarTrailingActionsContext { currentDirectoryPath: string; isBusy: boolean; isLoading: boolean; isMutating: boolean; } type RenderWorkspaceFileManagerToolbarTrailingActions = (context: WorkspaceFileManagerToolbarTrailingActionsContext) => ReactElement | null; interface WorkspaceFileManagerLocationSidebarLayout { contentMinWidth?: number; defaultWidth?: number; maxWidth?: number; persistWidth?: boolean; } interface WorkspaceFileManagerProps { className?: string; dateLocale?: TuttiDateLocale; /** Formats physical Windows paths for user-facing labels and copy actions. */ pathDisplayPlatform?: string | null; entryDragMode?: WorkspaceFileManagerEntryDragMode; onCopyEntry?: () => Promise | void; onDirectoryExpanded?: (path: string) => void; onEntryDragStart?: (entry: WorkspaceFileEntry, dataTransfer: DataTransfer) => void; resolveContextMenu: ResolveWorkspaceFileManagerContextMenu; resolveEntryIconUrl?: (entry: WorkspaceFileEntry) => Promise; renderExternalLocationContent?: (location: Extract) => ReactElement | null; /** * Declares the action row rendered at the bottom of the preview panel. Copy * and open opt in with a boolean and reuse the package's session commands; * download and share are enabled by passing a host handler. Omit the prop to * keep the preview panel action-free. */ previewActions?: WorkspaceFileManagerPreviewActionsConfig; /** * Optional host actions rendered in the toolbar trailing cluster, after * Refresh and before Search. Use for product-owned primary affordances such * as upload; keep multi-step transfer UX outside this package. */ renderToolbarTrailingActions?: RenderWorkspaceFileManagerToolbarTrailingActions; i18n: WorkspaceFileManagerI18nRuntime; locationSidebarLayout?: WorkspaceFileManagerLocationSidebarLayout; session: WorkspaceFileManagerSession; /** * When false, hide the locations sidebar even if the session has location * sections. Hosts with a single workspace root (for example TSH embedded * Files) can turn this off. Defaults to true. */ showLocationSidebar?: boolean; showPreviewPanel?: boolean; surface?: "card" | "embedded"; } declare function WorkspaceFileManager({ className, dateLocale, pathDisplayPlatform, entryDragMode, i18n, locationSidebarLayout, onCopyEntry, onDirectoryExpanded, onEntryDragStart, previewActions, resolveContextMenu, resolveEntryIconUrl, renderExternalLocationContent, renderToolbarTrailingActions, session, showLocationSidebar, showPreviewPanel, surface }: WorkspaceFileManagerProps): ReactElement; interface WorkspaceFileManagerContextMenuProps { contextMenu: { x: number; y: number; } | null; contextMenuRef: RefObject; items: readonly WorkspaceFileManagerContextMenuItem[]; positionMode?: "local" | "viewport"; onClose: () => void; } declare function WorkspaceFileManagerContextMenu({ contextMenu, contextMenuRef, items, positionMode, onClose }: WorkspaceFileManagerContextMenuProps): ReactElement | null; declare function WorkspaceFileManagerCreateDialog({ busy, copy, dialog, onClose, onConfirm, onNameChange }: { busy: boolean; copy: WorkspaceFileManagerI18nRuntime; dialog: { errorMessage: string | null; kind: "directory" | "file"; name: string; } | null; onClose: () => void; onConfirm: () => void; onNameChange: (name: string) => void; }): ReactElement | null; declare function WorkspaceFileEntryIcon({ entry, frameClassName, iconClassName, iconUrlByCacheKey, isEnteringDirectory, loadingIconClassName, onViewportLeave, onViewportEnter }: { entry: WorkspaceFileEntry; frameClassName?: string; iconClassName?: string; iconUrlByCacheKey?: ReadonlyMap; isEnteringDirectory?: boolean; loadingIconClassName?: string; onViewportLeave?: (entry: WorkspaceFileEntry) => void; onViewportEnter?: (entry: WorkspaceFileEntry) => void; }): ReactElement; type WorkspaceFileEntryIconUrlResolver = (entry: WorkspaceFileEntry) => Promise; declare function useWorkspaceFileEntryIconUrls(input: { entries: readonly WorkspaceFileEntry[]; includeImageThumbnails?: boolean; resolveEntryIconUrl?: WorkspaceFileEntryIconUrlResolver; }): { iconUrlByCacheKey: ReadonlyMap; reportEntryIconViewportEnter: (entry: WorkspaceFileEntry) => void; reportEntryIconViewportLeave: (entry: WorkspaceFileEntry) => void; }; export { type RenderWorkspaceFileManagerToolbarTrailingActions, type ResolveWorkspaceFileManagerContextMenu, WorkspaceFileEntry, WorkspaceFileEntryIcon, WorkspaceFileLocation, WorkspaceFileManager, WorkspaceFileManagerContextMenu, type WorkspaceFileManagerContextMenuActionItem, type WorkspaceFileManagerContextMenuItem, type WorkspaceFileManagerContextMenuProps, type WorkspaceFileManagerContextMenuRequest, type WorkspaceFileManagerContextMenuSeparatorItem, type WorkspaceFileManagerContextMenuSubmenuItem, type WorkspaceFileManagerContextMenuTarget, WorkspaceFileManagerCreateDialog, type WorkspaceFileManagerEntryDragMode, WorkspaceFileManagerI18nRuntime, type WorkspaceFileManagerPreviewActionId, type WorkspaceFileManagerPreviewActionsConfig, type WorkspaceFileManagerProps, WorkspaceFileManagerSession, type WorkspaceFileManagerToolbarTrailingActionsContext, resolveWorkspaceFileManagerContextMenuTarget, useWorkspaceFileEntryIconUrls };