@arbidocs/blocks 0.4.154 → 0.4.155

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 (44) hide show
  1. package/dist/chunk-6HMCF4AJ.js +1720 -0
  2. package/dist/chunk-6HMCF4AJ.js.map +1 -0
  3. package/dist/{chunk-BDA3RHYD.cjs → chunk-MUDEL7UL.cjs} +25 -884
  4. package/dist/chunk-MUDEL7UL.cjs.map +1 -0
  5. package/dist/{chunk-RE7NULEY.js → chunk-W7CWGURO.js} +28 -873
  6. package/dist/chunk-W7CWGURO.js.map +1 -0
  7. package/dist/chunk-WV4TD2HZ.cjs +1785 -0
  8. package/dist/chunk-WV4TD2HZ.cjs.map +1 -0
  9. package/dist/connect/index.cjs +1178 -16
  10. package/dist/connect/index.cjs.map +1 -1
  11. package/dist/connect/index.d.ts +1 -0
  12. package/dist/connect/index.js +1160 -12
  13. package/dist/connect/index.js.map +1 -1
  14. package/dist/connect/viewer.cjs +40 -44
  15. package/dist/connect/viewer.cjs.map +1 -1
  16. package/dist/connect/viewer.js +2 -6
  17. package/dist/connect/viewer.js.map +1 -1
  18. package/dist/connection/files/DocumentSyncGlyph.d.ts +28 -0
  19. package/dist/connection/files/explorer/ConnectedFilesExplorer.d.ts +56 -0
  20. package/dist/connection/files/explorer/FileTiles.d.ts +87 -0
  21. package/dist/connection/files/index.d.ts +5 -0
  22. package/dist/connection/files/store.d.ts +27 -0
  23. package/dist/connection/files/support.d.ts +38 -0
  24. package/dist/files/DocStatusIcon.d.ts +5 -4
  25. package/dist/files/FailedStageIcon.d.ts +26 -0
  26. package/dist/files/folders/FolderProviderIcon.d.ts +29 -0
  27. package/dist/files/folders/folderPaths.d.ts +86 -0
  28. package/dist/files/folders/index.d.ts +2 -0
  29. package/dist/files/index.cjs +326 -238
  30. package/dist/files/index.d.ts +5 -0
  31. package/dist/files/index.js +2 -2
  32. package/dist/files/permissions.d.ts +28 -0
  33. package/dist/files/recently-deleted.d.ts +7 -0
  34. package/dist/files/visibility.d.ts +31 -0
  35. package/dist/index.cjs +38 -38
  36. package/dist/index.js +2 -2
  37. package/node_modules/@arbidocs/coedit/package.json +1 -1
  38. package/package.json +6 -5
  39. package/dist/chunk-BDA3RHYD.cjs.map +0 -1
  40. package/dist/chunk-JGOST4IL.js +0 -648
  41. package/dist/chunk-JGOST4IL.js.map +0 -1
  42. package/dist/chunk-RE7NULEY.js.map +0 -1
  43. package/dist/chunk-YAEXSCUW.cjs +0 -677
  44. package/dist/chunk-YAEXSCUW.cjs.map +0 -1
@@ -0,0 +1,28 @@
1
+ /**
2
+ * DocumentSyncGlyph
3
+ *
4
+ * Marks a document that's saved on THIS device for offline use — the
5
+ * OneDrive/Drive "available offline" convention: a small badge on the file icon.
6
+ * A down-arrow-to-line (the universal "downloaded / saved locally" glyph) so it
7
+ * reads instantly as "kept on my device" — clearer than a hard-drive icon and
8
+ * never confused with the "ready" checkmark. A neutral grey badge: ambient
9
+ * metadata, not a status to draw the eye (the document "ready" status owns the
10
+ * coloured cyan/navy treatment).
11
+ *
12
+ * Pending offline edits are shown separately, as a "changes pending" document
13
+ * status in the Status column — not here — so the file icon stays quiet and only
14
+ * the genuinely-useful "you can open this offline" signal lives on it.
15
+ *
16
+ * Self-subscribing to the offline set so it updates even inside a memoized grid
17
+ * cell. Renders nothing for cloud-only docs (the common case).
18
+ */
19
+ interface DocumentSyncGlyphProps {
20
+ docExtId: string;
21
+ size?: number;
22
+ className?: string;
23
+ /** Badge fill — neutral grey by default; pass e.g. `bg-green-600` for a
24
+ * prominent "downloaded" badge. */
25
+ bgClassName?: string;
26
+ }
27
+ export declare function DocumentSyncGlyph({ docExtId, size, className, bgClassName, }: DocumentSyncGlyphProps): import("react").JSX.Element | null;
28
+ export {};
@@ -0,0 +1,56 @@
1
+ /**
2
+ * The workspace's files as a file explorer (OneDrive / Drive style), bound to the session: folders
3
+ * come from each document's `folder` path; renames, moves and deletes are written through
4
+ * `@arbidocs/react`.
5
+ *
6
+ * - Breadcrumb navigation is the host's (`folderPath` / `onFolderPathChange`): it may keep the
7
+ * folder in a filter, the URL or state.
8
+ * - A virtualised tile grid that scales to thousands of documents, sized by `tileSize`.
9
+ * - OS-style selection: click, ⌘/Ctrl-click, shift-range, the hover checkbox and a marquee.
10
+ * - Drag files onto a folder tile to move them; drop OS files on the view to upload.
11
+ *
12
+ * Selection is the host's (`selectedIds` / `onSelectionChange`), so its bulk actions act on it.
13
+ */
14
+ import { type ReactNode } from 'react';
15
+ import { type ExplorerFolder, type ExplorerSort } from '../../../files/folders';
16
+ import { type FileTileDocument } from './FileTiles';
17
+ /** The zoom slider's bounds: the target tile width in px (smaller: more tiles per row). */
18
+ export declare const TILE_MIN = 88;
19
+ export declare const TILE_MAX = 232;
20
+ export declare const TILE_DEFAULT = 200;
21
+ export interface ConnectedFilesExplorerHandle {
22
+ /** Add a placeholder folder here and start naming it. */
23
+ triggerNewFolder: () => void;
24
+ /** Scroll the tile of `docId` into view, when it is displayed. */
25
+ scrollToDocument: (docId: string) => void;
26
+ }
27
+ export interface ConnectedFilesExplorerProps {
28
+ documents: FileTileDocument[];
29
+ isLoading: boolean;
30
+ /** The viewer may add, rename and move files here. */
31
+ canUpload: boolean;
32
+ selectedIds: string[];
33
+ onSelectionChange: (ids: string[]) => void;
34
+ onOpenDocument: (docId: string) => void;
35
+ onUploadFiles: (files: File[], folder?: string | null) => void;
36
+ /** The open folder (empty: the workspace root). */
37
+ folderPath: readonly string[];
38
+ onFolderPathChange: (path: string[]) => void;
39
+ /** A search across every folder (absent or empty: the open folder is listed). */
40
+ search?: string;
41
+ sort: ExplorerSort;
42
+ sortReversed: boolean;
43
+ /** The target tile width in px (`TILE_MIN`..`TILE_MAX`). */
44
+ tileSize: number;
45
+ /** The ids of the files displayed, in display order (a navigator steps the same list). */
46
+ onOrderedFilesChange?: (docIds: string[]) => void;
47
+ /** Move the selected files: the host opens its folder picker. Absent: not offered. */
48
+ onMoveSelected?: () => void;
49
+ /** Move a folder with its structure: the host opens its folder picker. */
50
+ onFolderMove?: (folder: ExplorerFolder) => void;
51
+ /** Open a document in the host's review view. Absent: not offered. */
52
+ onOpenInReview?: (docId: string) => void;
53
+ /** Shown instead of the explorer while the workspace has no documents and the viewer may add. */
54
+ emptyWorkspace?: ReactNode;
55
+ }
56
+ export declare const ConnectedFilesExplorer: import("react").ForwardRefExoticComponent<ConnectedFilesExplorerProps & import("react").RefAttributes<ConnectedFilesExplorerHandle>>;
@@ -0,0 +1,87 @@
1
+ /**
2
+ * The explorer's one tile binding. The presentation (`ExplorerFileTile`, `ExplorerFolderTile`,
3
+ * `ExplorerFileTooltip`) is in `files/`; this binds it to the session: @dnd-kit draggable and
4
+ * droppable, the document's live processing status, the copies kept offline, the open viewer, the
5
+ * document pill, the mail handoff and the member / label lookups. `FileTile` is a draggable
6
+ * document, `FolderTile` a droppable folder (separate components so the dnd hooks always run).
7
+ */
8
+ import { type WorkspaceDocument } from '@arbidocs/react';
9
+ import { type ExplorerDensity, type ExplorerMenuItem } from '../../../files/ExplorerTile';
10
+ import { type ExplorerFolder } from '../../../files/folders';
11
+ import { type FilesStartItem } from '../support';
12
+ export type { ExplorerDensity };
13
+ /** A workspace member as a tile shows them (avatar and name). */
14
+ export interface FileTileUser {
15
+ external_id: string;
16
+ given_name: string;
17
+ family_name?: string | null;
18
+ email: string;
19
+ picture?: string | null;
20
+ }
21
+ /** A document row as the tiles read it (the session's rows carry these). */
22
+ export type FileTileDocument = WorkspaceDocument & {
23
+ failed_stage?: string | null;
24
+ };
25
+ /** Whether a status is still being worked on. */
26
+ export declare function isActiveDocumentStatus(status: string): boolean;
27
+ /** The hover card of a document: the same in the explorer tiles and the table's name cell. */
28
+ export declare function FileTooltipContent({ doc, modifiedBy, tagNameById, }: {
29
+ doc: FileTileDocument;
30
+ modifiedBy?: FileTileUser;
31
+ tagNameById: ReadonlyMap<string, string>;
32
+ }): import("react").JSX.Element;
33
+ /** The "Start…" submenu: one entry per thing the host can start on the file or folder. */
34
+ export declare function startMenuItem(items: readonly FilesStartItem[]): ExplorerMenuItem[];
35
+ interface FileTileProps {
36
+ doc: FileTileDocument;
37
+ density: ExplorerDensity;
38
+ selected: boolean;
39
+ /** Part of an in-flight drag (dimmed). */
40
+ dragging: boolean;
41
+ /** Any tile is being dragged: no hover card, so it cannot swallow the moves dnd-kit tracks. */
42
+ dndActive: boolean;
43
+ /** Being renamed inline. */
44
+ renaming: boolean;
45
+ /** The viewer may delete this document. */
46
+ canDelete: boolean;
47
+ /** The first-page thumbnail (absent: the file-type icon). */
48
+ thumbnailUrl?: string;
49
+ /** Who last changed the document (the hover card's avatar line). */
50
+ modifiedBy?: FileTileUser;
51
+ /** Label id → name, for the document's labels on the hover card. */
52
+ tagNameById: ReadonlyMap<string, string>;
53
+ onSelect: (doc: FileTileDocument, e: React.MouseEvent) => void;
54
+ onToggle: (doc: FileTileDocument, e: React.MouseEvent) => void;
55
+ onOpen: (doc: FileTileDocument) => void;
56
+ /** Open the document in the review view. Absent: not offered. */
57
+ onReview?: (doc: FileTileDocument) => void;
58
+ onStartRename: (doc: FileTileDocument) => void;
59
+ onCommitRename: (doc: FileTileDocument, name: string) => void;
60
+ onCancelRename: () => void;
61
+ onDownload: (doc: FileTileDocument) => void;
62
+ onMove?: (doc: FileTileDocument) => void;
63
+ onDelete: (doc: FileTileDocument) => void;
64
+ }
65
+ export declare const FileTile: import("react").NamedExoticComponent<FileTileProps>;
66
+ interface FolderTileProps {
67
+ folder: ExplorerFolder;
68
+ density: ExplorerDensity;
69
+ /** Being renamed inline. */
70
+ editing?: boolean;
71
+ /** Every document beneath the folder is selected. */
72
+ selected?: boolean;
73
+ /** Some (not all) documents beneath the folder are selected. */
74
+ partiallySelected?: boolean;
75
+ /** Every document beneath the folder (its count of files still processing). */
76
+ documents: readonly FileTileDocument[];
77
+ onOpen: (folder: ExplorerFolder) => void;
78
+ /** Toggle the whole folder (all its documents). */
79
+ onToggleSelect?: (folder: ExplorerFolder, e: React.MouseEvent) => void;
80
+ onCommitName?: (folder: ExplorerFolder, name: string) => void;
81
+ onCancelName?: () => void;
82
+ onStartRename?: (folder: ExplorerFolder) => void;
83
+ onDownload?: (folder: ExplorerFolder) => void;
84
+ onMove?: (folder: ExplorerFolder) => void;
85
+ onDelete?: (folder: ExplorerFolder) => void;
86
+ }
87
+ export declare const FolderTile: import("react").NamedExoticComponent<FolderTileProps>;
@@ -0,0 +1,5 @@
1
+ export { ConnectedFilesExplorer, TILE_DEFAULT, TILE_MAX, TILE_MIN, type ConnectedFilesExplorerHandle, type ConnectedFilesExplorerProps, } from './explorer/ConnectedFilesExplorer';
2
+ export { FileTooltipContent, isActiveDocumentStatus, startMenuItem, type FileTileDocument, type FileTileUser, } from './explorer/FileTiles';
3
+ export { DocumentSyncGlyph } from './DocumentSyncGlyph';
4
+ export { FilesSupportProvider, useFilesSupport, useOfflineDocumentIds, useViewingDocumentId, type FilesStartItem, type FilesSupport, } from './support';
5
+ export { useFilesStore, usePendingFolders } from './store';
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The Files kits' own state: empty folders the user created (a folder exists only through its
3
+ * documents, so a new one is a placeholder until something is moved into it), per workspace, for
4
+ * the session (kept in `sessionStorage`, so a reload keeps them).
5
+ */
6
+ interface FilesState {
7
+ /** Placeholder folder paths per workspace. */
8
+ pendingFolders: Readonly<Record<string, readonly string[]>>;
9
+ addPendingFolder: (workspaceId: string, path: string) => void;
10
+ removePendingFolder: (workspaceId: string, path: string) => void;
11
+ }
12
+ export declare const useFilesStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<FilesState>, "setState" | "persist"> & {
13
+ setState(partial: FilesState | Partial<FilesState> | ((state: FilesState) => FilesState | Partial<FilesState>), replace?: false | undefined): unknown;
14
+ setState(state: FilesState | ((state: FilesState) => FilesState), replace: true): unknown;
15
+ persist: {
16
+ setOptions: (options: Partial<import("zustand/middleware").PersistOptions<FilesState, unknown, unknown>>) => void;
17
+ clearStorage: () => void;
18
+ rehydrate: () => Promise<void> | void;
19
+ hasHydrated: () => boolean;
20
+ onHydrate: (fn: (state: FilesState) => void) => () => void;
21
+ onFinishHydration: (fn: (state: FilesState) => void) => () => void;
22
+ getOptions: () => Partial<import("zustand/middleware").PersistOptions<FilesState, unknown, unknown>>;
23
+ };
24
+ }>;
25
+ /** A workspace's placeholder folders. */
26
+ export declare function usePendingFolders(workspaceId: string | null | undefined): readonly string[];
27
+ export {};
@@ -0,0 +1,38 @@
1
+ /**
2
+ * What a host adds to the connected Files kits (explorer, table, page). The kits read and write the
3
+ * documents on the signed-in session by themselves (`@arbidocs/react`); these are the host's own
4
+ * things they cannot know: its workflows ("Start…"), its chat, its mail, the copies it keeps
5
+ * offline, its viewer. Every field is optional: without one a kit offers less, never something
6
+ * that does nothing.
7
+ */
8
+ import { type ReactNode } from 'react';
9
+ import type { WorkspaceDocument } from '@arbidocs/react';
10
+ /** Something the host can start on documents or a folder (a workflow, a skill). */
11
+ export interface FilesStartItem {
12
+ id: string;
13
+ title: string;
14
+ run: () => void;
15
+ }
16
+ export interface FilesSupport {
17
+ /** What can be started on one file. */
18
+ startItemsForFile?: (document: WorkspaceDocument) => FilesStartItem[];
19
+ /** What can be started on everything in a folder (workflows that take a set of files). */
20
+ startItemsForFolder?: (folderPath: string) => FilesStartItem[];
21
+ /** Start a chat about one document. Absent: not offered. */
22
+ openDocumentChat?: (docId: string) => void;
23
+ /** Hand a document to the host's mail composer as an attachment (offered while mail is on). */
24
+ emailDocument?: (document: WorkspaceDocument) => Promise<void>;
25
+ /** The documents kept on this device for offline use, as a hook. */
26
+ useOfflineDocumentIds?: () => ReadonlySet<string>;
27
+ /** The document open in the host's viewer, as a hook (its tile is marked); null when closed. */
28
+ useViewingDocumentId?: () => string | null;
29
+ }
30
+ export declare function FilesSupportProvider({ value, children, }: {
31
+ value: FilesSupport;
32
+ children: ReactNode;
33
+ }): import("react").JSX.Element;
34
+ export declare function useFilesSupport(): FilesSupport;
35
+ /** The documents kept offline (none without host support). */
36
+ export declare function useOfflineDocumentIds(): ReadonlySet<string>;
37
+ /** The document open in the host's viewer (none without host support). */
38
+ export declare function useViewingDocumentId(): string | null;
@@ -1,12 +1,13 @@
1
- import type { ReactNode } from 'react';
2
1
  export interface DocStatusIconProps {
3
2
  /** Document processing status (case-insensitive); unknown / empty renders nothing. */
4
3
  status?: string | null;
5
4
  /** Activating the glyph (click, Enter, Space) e.g. opens the status details. */
6
5
  onClick?: () => void;
7
- /** The `failed` glyph is stage-aware and host-supplied. */
8
- failed?: ReactNode;
6
+ /** Where a failed document's processing stopped (the failed glyph differs per stage). */
7
+ failedStage?: string | null;
8
+ /** Why it failed, added to the failed glyph's title. */
9
+ errorMessage?: string | null;
9
10
  className?: string;
10
11
  }
11
12
  /** Compact status glyph of a document row (ready, empty, low content, indexing, queued, failed). */
12
- export declare function DocStatusIcon({ status, onClick, failed, className }: DocStatusIconProps): import("react").JSX.Element | null;
13
+ export declare function DocStatusIcon({ status, onClick, failedStage, errorMessage, className, }: DocStatusIconProps): import("react").JSX.Element | null;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Stage-aware failure icon.
3
+ *
4
+ * All variants share the red color and "alert" weight so the cell still
5
+ * reads as "failure" at a glance, but the glyph differs per pipeline
6
+ * stage so users can tell *where* it died without opening details.
7
+ *
8
+ * Backend taxonomy (mirrors src/models/document.py FAILABLE_STAGES):
9
+ * parsing — parser service: extraction / OCR / marker-subchunk
10
+ * indexing — Qdrant chunk + vector writes
11
+ * encrypting — SecretBox wrap of chunks/metadata
12
+ * analysing — doctagllm metadata extraction
13
+ * queued — failed before processing started
14
+ * unknown — current code couldn't classify (defensive fallback)
15
+ * null — legacy failure predating the failed_stage column;
16
+ * rendered as "Failed (stage unknown)"
17
+ */
18
+ export type FailedStage = 'parsing' | 'indexing' | 'encrypting' | 'analysing' | 'queued' | 'unknown';
19
+ interface FailedStageIconProps {
20
+ stage: string | null | undefined;
21
+ errorMessage?: string | null;
22
+ className?: string;
23
+ onClick?: (e: React.MouseEvent) => void;
24
+ }
25
+ export declare const FailedStageIcon: import("react").NamedExoticComponent<FailedStageIconProps>;
26
+ export {};
@@ -0,0 +1,29 @@
1
+ /**
2
+ * folderProviderIcon
3
+ *
4
+ * Maps a folder path to the brand mark of the connector that imported it, so
5
+ * connector-created folders (e.g. "Outlook (jane@arbi.city)") show their
6
+ * source at a glance. Only the ROOT segment is matched — nested subfolders
7
+ * keep the generic folder icon. Returns null when the root isn't a known
8
+ * provider (including the legacy bare "Email" root), letting call sites fall
9
+ * back to their existing folder glyph.
10
+ */
11
+ /**
12
+ * Provider brand mark for a folder path's root segment, or null when the
13
+ * folder isn't a connector import (call sites render their usual icon).
14
+ */
15
+ export declare function FolderProviderIcon({ folderPath, className, }: {
16
+ folderPath: string;
17
+ className?: string;
18
+ }): import("react").JSX.Element | null;
19
+ /** True when the folder path's root segment belongs to a known connector. */
20
+ export declare function hasFolderProviderIcon(folderPath: string): boolean;
21
+ /**
22
+ * Display text for a single folder path segment. Provider roots drop the
23
+ * provider name — the brand mark already says it — leaving just the account:
24
+ * "Outlook (jane@arbi.city)" → "jane@arbi.city"
25
+ * "Outlook" (legacy bare root) → "" (the logo stands alone)
26
+ * Non-provider segments are returned unchanged. Stored paths are untouched;
27
+ * this is display-only.
28
+ */
29
+ export declare function formatFolderSegment(segment: string): string;
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Pure helpers that turn the flat document list into a navigable folder tree.
3
+ *
4
+ * Folders are not a backend entity — each document carries a slash-separated
5
+ * `folder` path string (e.g. `"Reports/Q1"`, or `null`/`""` for the root).
6
+ * These helpers derive, for a given path, the immediate sub-folders (with
7
+ * descendant counts) and the files that live directly in that folder. Kept
8
+ * pure and side-effect-free so the navigation logic is unit-testable.
9
+ */
10
+ /** The fields of a document the folder view reads. */
11
+ export interface FolderDocument {
12
+ external_id: string;
13
+ file_name?: string | null;
14
+ file_type?: string | null;
15
+ file_size?: number | null;
16
+ folder?: string | null;
17
+ parent_ext_id?: string | null;
18
+ created_at?: string | null;
19
+ doc_metadata?: {
20
+ title?: string | null;
21
+ } | null;
22
+ }
23
+ export interface ExplorerFolder {
24
+ kind: 'folder';
25
+ /** The folder's own name (last path segment). */
26
+ name: string;
27
+ /** Full path segments from the root, including this folder. */
28
+ path: string[];
29
+ /** Number of documents anywhere beneath this folder. */
30
+ count: number;
31
+ }
32
+ export interface ExplorerFile<D extends FolderDocument = FolderDocument> {
33
+ kind: 'file';
34
+ doc: D;
35
+ }
36
+ export type ExplorerEntry<D extends FolderDocument = FolderDocument> = ExplorerFolder | ExplorerFile<D>;
37
+ export type ExplorerSort = 'name' | 'date' | 'size';
38
+ /**
39
+ * Display name for a document in the explorer, with its real file extension —
40
+ * the familiar "Report.pdf" form. Many documents store an AI-generated display
41
+ * title that drops the extension, so we re-attach it from the stored
42
+ * `file_name` or, failing that, the MIME `file_type`.
43
+ */
44
+ export declare function getExplorerDisplayName(doc: FolderDocument): string;
45
+ /** Split a `Doc.folder` value into trimmed, non-empty path segments. */
46
+ export declare function parseFolderSegments(folder?: string | null): string[];
47
+ /** Join path segments back into a canonical `Doc.folder` string (or null at root). */
48
+ export declare function joinFolderPath(segments: string[]): string | null;
49
+ /**
50
+ * A document is shown in the explorer unless it belongs to an email family:
51
+ * attachments and archived messages (`parent_ext_id` set) live "inside" their
52
+ * email / archive and would otherwise clutter the folder view. Versions are not
53
+ * children — the list holds each document's current version only.
54
+ */
55
+ export declare function isExplorerDocument(doc: FolderDocument): boolean;
56
+ /**
57
+ * Every explorer document that lives anywhere beneath `path` (directly in the
58
+ * folder or in a sub-folder). Used to expand a folder into the documents a
59
+ * folder-level action (select / move / download / delete / rename) applies to —
60
+ * "act on a folder" means "act on everything in it".
61
+ */
62
+ export declare function collectFolderDocs<D extends FolderDocument>(documents: D[], path: string[]): D[];
63
+ /**
64
+ * Documents in the order the gallery shows them for a sort choice (and its
65
+ * direction toggle). Review mode steps through this same order.
66
+ */
67
+ export declare function sortExplorerFiles<D extends FolderDocument>(docs: D[], sort: ExplorerSort, reversed?: boolean): D[];
68
+ /**
69
+ * Build the folders and files that live directly under `currentPath`.
70
+ *
71
+ * - Files: documents whose folder path exactly equals `currentPath`.
72
+ * - Folders: the distinct next path segment of any document nested deeper than
73
+ * `currentPath`, with `count` = number of documents beneath it.
74
+ *
75
+ * Folders are always sorted by name; files by the requested sort.
76
+ */
77
+ export declare function buildExplorerEntries<D extends FolderDocument>(documents: D[], currentPath: string[], sort?: ExplorerSort, pendingFolders?: string[]): {
78
+ folders: ExplorerFolder[];
79
+ files: D[];
80
+ };
81
+ /**
82
+ * Flat, cross-folder search over every top-level document by title / file name.
83
+ * Used when the explorer search box is non-empty (mirrors real file explorers,
84
+ * which flatten results and ignore the current folder while searching).
85
+ */
86
+ export declare function searchExplorerDocuments<D extends FolderDocument>(documents: D[], query: string, sort?: ExplorerSort): D[];
@@ -0,0 +1,2 @@
1
+ export { getExplorerDisplayName, parseFolderSegments, joinFolderPath, isExplorerDocument, collectFolderDocs, sortExplorerFiles, buildExplorerEntries, searchExplorerDocuments, type FolderDocument, type ExplorerFolder, type ExplorerFile, type ExplorerEntry, type ExplorerSort, } from './folderPaths';
2
+ export { FolderProviderIcon, hasFolderProviderIcon, formatFolderSegment, } from './FolderProviderIcon';