@agimon-ai/po-native-components 0.0.0-alpha.156 → 0.0.0-alpha.157
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/components/FileList.d.mts +46 -0
- package/dist/components/FileList.d.mts.map +1 -0
- package/dist/components/FileList.mjs +704 -0
- package/dist/components/FileList.mjs.map +1 -0
- package/dist/components/FilePreview.d.mts +33 -0
- package/dist/components/FilePreview.d.mts.map +1 -0
- package/dist/components/FilePreview.mjs +100 -0
- package/dist/components/FilePreview.mjs.map +1 -0
- package/dist/components/FileViewer.d.mts +55 -0
- package/dist/components/FileViewer.d.mts.map +1 -0
- package/dist/components/FileViewer.mjs +328 -0
- package/dist/components/FileViewer.mjs.map +1 -0
- package/dist/index.d.mts +5 -2
- package/dist/index.mjs +9 -6
- package/package.json +5 -5
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { FileItem, FileKind, FileLayout, FileModified, FileSort, FileSortDirection, FileTreeRow } from "@agimon-ai/po-web-components/text";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
//#region src/components/FileList.d.ts
|
|
4
|
+
export interface FileBrowserControls {
|
|
5
|
+
layout: FileLayout;
|
|
6
|
+
onLayoutChange: (layout: FileLayout) => void;
|
|
7
|
+
query: string;
|
|
8
|
+
onQueryChange: (query: string) => void;
|
|
9
|
+
type: FileKind | 'any';
|
|
10
|
+
onTypeChange: (type: FileKind | 'any') => void;
|
|
11
|
+
modified: FileModified;
|
|
12
|
+
onModifiedChange: (modified: FileModified) => void;
|
|
13
|
+
sort: FileSort;
|
|
14
|
+
onSortChange: (sort: FileSort) => void;
|
|
15
|
+
direction: FileSortDirection;
|
|
16
|
+
onDirectionChange: (direction: FileSortDirection) => void;
|
|
17
|
+
rows: readonly FileTreeRow[];
|
|
18
|
+
onToggleDirectory: (path: string) => void;
|
|
19
|
+
selected?: FileItem;
|
|
20
|
+
onSelect: (item: FileItem) => void;
|
|
21
|
+
onCloseSelection: () => void;
|
|
22
|
+
totalCount: number;
|
|
23
|
+
onViewableImagesChange?: (paths: readonly string[]) => void;
|
|
24
|
+
/** A loaded thumbnail or a placeholder for an image file; `compact` is a list row's small square. */
|
|
25
|
+
renderImage?: (item: FileItem, compact: boolean) => ReactNode;
|
|
26
|
+
/** Drawn first in the list, above the controls, such as the native dock's tab strip. */
|
|
27
|
+
header?: ReactNode;
|
|
28
|
+
/** Inside a bottom sheet with no scroll view of its own: the list is the sheet's only scroll owner. */
|
|
29
|
+
sheet?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface FileListProps {
|
|
32
|
+
items: readonly FileItem[];
|
|
33
|
+
onOpen: (path: string) => void;
|
|
34
|
+
loading?: boolean;
|
|
35
|
+
error?: string;
|
|
36
|
+
/** Names the list for search and layout, such as "artifacts" or "Personal". */
|
|
37
|
+
label: string;
|
|
38
|
+
/** What appears here when nothing has yet. */
|
|
39
|
+
emptyText: string;
|
|
40
|
+
grid?: boolean;
|
|
41
|
+
browser?: FileBrowserControls;
|
|
42
|
+
}
|
|
43
|
+
/** A folder of files on the phone: recent rows, or a browser with layouts, filters and a swipeable selection. Presentation only. */
|
|
44
|
+
export declare function FileList({ items, onOpen, loading, error, grid, browser, label, emptyText }: FileListProps): import("react").JSX.Element;
|
|
45
|
+
//#endregion
|
|
46
|
+
//# sourceMappingURL=FileList.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileList.d.mts","names":[],"sources":["../../src/components/FileList.tsx"],"mappings":";;;iBAyCiB;EACf,QAAQ;EACR,iBAAiB,QAAQ;EACzB;EACA,gBAAgB;EAChB,MAAM;EACN,eAAe,MAAM;EACrB,UAAU;EACV,mBAAmB,UAAU;EAC7B,MAAM;EACN,eAAe,MAAM;EACrB,WAAW;EACX,oBAAoB,WAAW;EAC/B,eAAe;EACf,oBAAoB;EACpB,WAAW;EACX,WAAW,MAAM;EACjB;EACA;EACA,0BAA0B;;EAE1B,eAAe,MAAM,UAAU,qBAAqB;;EAEpD,SAAS;;EAET;;iBAGe;EACf,gBAAgB;EAChB,SAAS;EACT;EACA;;EAEA;;EAEA;EACA;EACA,UAAU;;;wBAII,WAAW,OAAO,QAAQ,SAAS,OAAO,MAAc,SAAS,OAAO,aAAa,gCAAa,IAAA"}
|