@agimon-ai/po-native-components 0.0.0-alpha.2 → 0.0.0-alpha.200
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/LICENSE +1 -2
- package/README.md +9 -51
- package/dist/components/AgentAvatar.d.mts +19 -0
- package/dist/components/AgentAvatar.d.mts.map +1 -0
- package/dist/components/AgentAvatar.mjs +88 -0
- package/dist/components/AgentAvatar.mjs.map +1 -0
- package/dist/components/AnnotationSurface.d.mts +69 -0
- package/dist/components/AnnotationSurface.d.mts.map +1 -0
- package/dist/components/AnnotationSurface.mjs +431 -0
- package/dist/components/AnnotationSurface.mjs.map +1 -0
- package/dist/components/Badge.d.mts +1 -1
- package/dist/components/Badge.mjs +2 -2
- package/dist/components/Badge.mjs.map +1 -1
- package/dist/components/Button.mjs +4 -4
- package/dist/components/Button.mjs.map +1 -1
- package/dist/components/CodeBlock.d.mts +3 -1
- package/dist/components/CodeBlock.d.mts.map +1 -1
- package/dist/components/CodeBlock.mjs +42 -47
- package/dist/components/CodeBlock.mjs.map +1 -1
- package/dist/components/ComputerRow.d.mts +15 -0
- package/dist/components/ComputerRow.d.mts.map +1 -0
- package/dist/components/ComputerRow.mjs +107 -0
- package/dist/components/ComputerRow.mjs.map +1 -0
- package/dist/components/CopyButton.d.mts +13 -0
- package/dist/components/CopyButton.d.mts.map +1 -0
- package/dist/components/CopyButton.mjs +49 -0
- package/dist/components/CopyButton.mjs.map +1 -0
- package/dist/components/CountBadge.d.mts +15 -0
- package/dist/components/CountBadge.d.mts.map +1 -0
- package/dist/components/CountBadge.mjs +49 -0
- package/dist/components/CountBadge.mjs.map +1 -0
- package/dist/components/CtaCard.d.mts +19 -0
- package/dist/components/CtaCard.d.mts.map +1 -0
- package/dist/components/CtaCard.mjs +92 -0
- package/dist/components/CtaCard.mjs.map +1 -0
- package/dist/components/Dialog.d.mts +2 -2
- package/dist/components/Dialog.d.mts.map +1 -1
- package/dist/components/Dialog.mjs +18 -12
- package/dist/components/Dialog.mjs.map +1 -1
- package/dist/components/Dot.d.mts +1 -1
- package/dist/components/Dot.mjs +3 -3
- package/dist/components/Dot.mjs.map +1 -1
- package/dist/components/DropdownMenu.d.mts +3 -1
- package/dist/components/DropdownMenu.d.mts.map +1 -1
- package/dist/components/DropdownMenu.mjs +21 -14
- package/dist/components/DropdownMenu.mjs.map +1 -1
- package/dist/components/EmptyState.d.mts +31 -3
- package/dist/components/EmptyState.d.mts.map +1 -1
- package/dist/components/EmptyState.mjs +303 -29
- package/dist/components/EmptyState.mjs.map +1 -1
- package/dist/components/FileList.d.mts +46 -0
- package/dist/components/FileList.d.mts.map +1 -0
- package/dist/components/FileList.mjs +727 -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 +102 -0
- package/dist/components/FilePreview.mjs.map +1 -0
- package/dist/components/FileViewer.d.mts +57 -0
- package/dist/components/FileViewer.d.mts.map +1 -0
- package/dist/components/FileViewer.mjs +335 -0
- package/dist/components/FileViewer.mjs.map +1 -0
- package/dist/components/HashlineLines.d.mts +13 -0
- package/dist/components/HashlineLines.d.mts.map +1 -0
- package/dist/components/HashlineLines.mjs +153 -0
- package/dist/components/HashlineLines.mjs.map +1 -0
- package/dist/components/HostFilter.d.mts +17 -0
- package/dist/components/HostFilter.d.mts.map +1 -0
- package/dist/components/HostFilter.mjs +68 -0
- package/dist/components/HostFilter.mjs.map +1 -0
- package/dist/components/HostTag.d.mts +7 -0
- package/dist/components/HostTag.d.mts.map +1 -0
- package/dist/components/HostTag.mjs +48 -0
- package/dist/components/HostTag.mjs.map +1 -0
- package/dist/components/InfoStrip.d.mts +9 -0
- package/dist/components/InfoStrip.d.mts.map +1 -0
- package/dist/components/InfoStrip.mjs +53 -0
- package/dist/components/InfoStrip.mjs.map +1 -0
- package/dist/components/Input.d.mts +3 -1
- package/dist/components/Input.d.mts.map +1 -1
- package/dist/components/Input.mjs +5 -4
- package/dist/components/Input.mjs.map +1 -1
- package/dist/components/Label.mjs +1 -1
- package/dist/components/LinkText.d.mts +13 -0
- package/dist/components/LinkText.d.mts.map +1 -0
- package/dist/components/LinkText.mjs +32 -0
- package/dist/components/LinkText.mjs.map +1 -0
- package/dist/components/List.d.mts.map +1 -1
- package/dist/components/List.mjs +50 -11
- package/dist/components/List.mjs.map +1 -1
- package/dist/components/LiveDuration.d.mts +30 -0
- package/dist/components/LiveDuration.d.mts.map +1 -0
- package/dist/components/LiveDuration.mjs +67 -0
- package/dist/components/LiveDuration.mjs.map +1 -0
- package/dist/components/LoadingState.d.mts +17 -0
- package/dist/components/LoadingState.d.mts.map +1 -0
- package/dist/components/LoadingState.mjs +90 -0
- package/dist/components/LoadingState.mjs.map +1 -0
- package/dist/components/Markdown.d.mts +24 -2
- package/dist/components/Markdown.d.mts.map +1 -1
- package/dist/components/Markdown.mjs +356 -27
- package/dist/components/Markdown.mjs.map +1 -1
- package/dist/components/MessageItem.d.mts +10 -15
- package/dist/components/MessageItem.d.mts.map +1 -1
- package/dist/components/MessageItem.mjs +94 -68
- package/dist/components/MessageItem.mjs.map +1 -1
- package/dist/components/NativeShellState.d.mts +30 -0
- package/dist/components/NativeShellState.d.mts.map +1 -0
- package/dist/components/NativeShellState.mjs +61 -0
- package/dist/components/NativeShellState.mjs.map +1 -0
- package/dist/components/RailItem.d.mts +13 -0
- package/dist/components/RailItem.d.mts.map +1 -0
- package/dist/components/RailItem.mjs +61 -0
- package/dist/components/RailItem.mjs.map +1 -0
- package/dist/components/ReferenceChip.d.mts +18 -0
- package/dist/components/ReferenceChip.d.mts.map +1 -0
- package/dist/components/ReferenceChip.mjs +38 -0
- package/dist/components/ReferenceChip.mjs.map +1 -0
- package/dist/components/SectionLabel.mjs +1 -1
- package/dist/components/SeekBar.d.mts +17 -0
- package/dist/components/SeekBar.d.mts.map +1 -0
- package/dist/components/SeekBar.mjs +97 -0
- package/dist/components/SeekBar.mjs.map +1 -0
- package/dist/components/SegmentedControl.d.mts.map +1 -1
- package/dist/components/SegmentedControl.mjs.map +1 -1
- package/dist/components/Select.d.mts +39 -0
- package/dist/components/Select.d.mts.map +1 -0
- package/dist/components/Select.mjs +288 -0
- package/dist/components/Select.mjs.map +1 -0
- package/dist/components/Sheet.d.mts +17 -2
- package/dist/components/Sheet.d.mts.map +1 -1
- package/dist/components/Sheet.mjs +34 -11
- package/dist/components/Sheet.mjs.map +1 -1
- package/dist/components/SheetFrame.mjs +150 -29
- package/dist/components/SheetFrame.mjs.map +1 -1
- package/dist/components/SheetList.d.mts +14 -0
- package/dist/components/SheetList.d.mts.map +1 -0
- package/dist/components/SheetList.mjs +34 -0
- package/dist/components/SheetList.mjs.map +1 -0
- package/dist/components/ShowMore.d.mts +10 -0
- package/dist/components/ShowMore.d.mts.map +1 -0
- package/dist/components/ShowMore.mjs +44 -0
- package/dist/components/ShowMore.mjs.map +1 -0
- package/dist/components/Spinner.d.mts +1 -1
- package/dist/components/StatusBadge.d.mts +1 -1
- package/dist/components/Switch.d.mts +14 -0
- package/dist/components/Switch.d.mts.map +1 -0
- package/dist/components/Switch.mjs +37 -0
- package/dist/components/Switch.mjs.map +1 -0
- package/dist/components/SyntaxLine.d.mts +19 -0
- package/dist/components/SyntaxLine.d.mts.map +1 -0
- package/dist/components/SyntaxLine.mjs +134 -0
- package/dist/components/SyntaxLine.mjs.map +1 -0
- package/dist/components/Tabs.d.mts.map +1 -1
- package/dist/components/Tabs.mjs +8 -7
- package/dist/components/Tabs.mjs.map +1 -1
- package/dist/components/ToolPathLink.d.mts +10 -0
- package/dist/components/ToolPathLink.d.mts.map +1 -0
- package/dist/components/ToolPathLink.mjs +42 -0
- package/dist/components/ToolPathLink.mjs.map +1 -0
- package/dist/components/ToolResultImage.d.mts +21 -0
- package/dist/components/ToolResultImage.d.mts.map +1 -0
- package/dist/components/ToolResultImage.mjs +60 -0
- package/dist/components/ToolResultImage.mjs.map +1 -0
- package/dist/icons/IconColorContext.d.mts +2 -1
- package/dist/icons/IconColorContext.d.mts.map +1 -1
- package/dist/icons/IconColorContext.mjs.map +1 -1
- package/dist/icons/iconGlyphs.d.mts +206 -54
- package/dist/icons/iconGlyphs.d.mts.map +1 -1
- package/dist/icons/iconGlyphs.mjs +152 -0
- package/dist/icons/iconGlyphs.mjs.map +1 -1
- package/dist/icons/icons.d.mts +153 -1
- package/dist/icons/icons.d.mts.map +1 -1
- package/dist/icons/icons.mjs +40 -2
- package/dist/icons/icons.mjs.map +1 -1
- package/dist/index.d.mts +31 -7
- package/dist/index.mjs +36 -12
- package/dist/lib/fileKindLabel.mjs +17 -0
- package/dist/lib/fileKindLabel.mjs.map +1 -0
- package/dist/lib/fonts.d.mts +3 -1
- package/dist/lib/fonts.d.mts.map +1 -1
- package/dist/lib/fonts.mjs +4 -2
- package/dist/lib/fonts.mjs.map +1 -1
- package/dist/lib/insideSheet.d.mts +10 -0
- package/dist/lib/insideSheet.d.mts.map +1 -0
- package/dist/lib/markdown.mjs +310 -23
- package/dist/lib/markdown.mjs.map +1 -1
- package/dist/lib/reading.mjs +60 -0
- package/dist/lib/reading.mjs.map +1 -0
- package/dist/lib/useControllable.mjs +14 -6
- package/dist/lib/useControllable.mjs.map +1 -1
- package/dist/lib/useReadingPage.mjs +33 -0
- package/dist/lib/useReadingPage.mjs.map +1 -0
- package/dist/po-runtime-identity.json +1 -0
- package/dist/shell.d.mts +6 -0
- package/dist/shell.mjs +7 -0
- package/package.json +41 -31
|
@@ -0,0 +1,727 @@
|
|
|
1
|
+
import { fontOf } from "../lib/fonts.mjs";
|
|
2
|
+
import { Button } from "./Button.mjs";
|
|
3
|
+
import { ChevronDownIcon, ChevronRightIcon, CloseIcon, FileIcon, FolderIcon, ImageIcon, SearchIcon, SlidersIcon } from "../icons/icons.mjs";
|
|
4
|
+
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from "./DropdownMenu.mjs";
|
|
5
|
+
import { EmptyState } from "./EmptyState.mjs";
|
|
6
|
+
import { Input } from "./Input.mjs";
|
|
7
|
+
import { fileKindLabel } from "../lib/fileKindLabel.mjs";
|
|
8
|
+
import { SegmentedControl } from "./SegmentedControl.mjs";
|
|
9
|
+
import { Sheet, SheetContent } from "./Sheet.mjs";
|
|
10
|
+
import { SheetList } from "./SheetList.mjs";
|
|
11
|
+
import { fileKind, isFileLayout, sizeLabel } from "@agimon-ai/po-web-components/text";
|
|
12
|
+
import { View } from "react-native-unistyles/components/native/View";
|
|
13
|
+
import { Text } from "react-native-unistyles/components/native/Text";
|
|
14
|
+
import { StyleSheet } from "react-native-unistyles";
|
|
15
|
+
import { createElement, useCallback, useEffect, useRef, useState } from "react";
|
|
16
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
import { currentLocale, useT } from "@agimon-ai/po-core/native";
|
|
18
|
+
import { ScrollView } from "react-native-unistyles/components/native/ScrollView";
|
|
19
|
+
import { FlatList } from "react-native-unistyles/components/native/FlatList";
|
|
20
|
+
|
|
21
|
+
//#region src/components/FileList.tsx
|
|
22
|
+
/** A folder of files on the phone: recent rows, or a browser with layouts, filters and a swipeable selection. Presentation only. */
|
|
23
|
+
function FileList({ items, onOpen, loading, error, grid = false, browser, label, emptyText }) {
|
|
24
|
+
const t = useT();
|
|
25
|
+
if (browser) return /* @__PURE__ */ jsx(FileBrowserList, {
|
|
26
|
+
label,
|
|
27
|
+
emptyText,
|
|
28
|
+
items,
|
|
29
|
+
onOpen,
|
|
30
|
+
loading,
|
|
31
|
+
error,
|
|
32
|
+
browser
|
|
33
|
+
});
|
|
34
|
+
return /* @__PURE__ */ jsxs(View, {
|
|
35
|
+
testID: grid ? "file-list-grid" : "file-list-recent",
|
|
36
|
+
style: styles.list,
|
|
37
|
+
children: [
|
|
38
|
+
error ? /* @__PURE__ */ jsx(Text, {
|
|
39
|
+
accessibilityRole: "alert",
|
|
40
|
+
style: styles.error,
|
|
41
|
+
children: error
|
|
42
|
+
}) : null,
|
|
43
|
+
loading ? /* @__PURE__ */ jsx(Text, {
|
|
44
|
+
style: styles.meta,
|
|
45
|
+
children: t("nativeComponents.fileList.loading", "Loading files...")
|
|
46
|
+
}) : null,
|
|
47
|
+
!loading && !error && items.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
|
|
48
|
+
size: "compact",
|
|
49
|
+
surface: "plain",
|
|
50
|
+
icon: /* @__PURE__ */ jsx(FolderIcon, { size: 16 }),
|
|
51
|
+
title: t("nativeComponents.fileList.emptyTitle", "Nothing here yet"),
|
|
52
|
+
description: emptyText
|
|
53
|
+
}) : null,
|
|
54
|
+
items.map((item) => /* @__PURE__ */ jsxs(Button, {
|
|
55
|
+
variant: grid ? "outline" : "ghost",
|
|
56
|
+
size: "card",
|
|
57
|
+
accessibilityLabel: t("nativeComponents.fileList.open", "Open {path}", { path: item.path }),
|
|
58
|
+
testID: `file-${item.path}`,
|
|
59
|
+
onPress: () => onOpen(item.path),
|
|
60
|
+
style: styles.item,
|
|
61
|
+
children: [/* @__PURE__ */ jsx(FileIcon, {
|
|
62
|
+
size: 18,
|
|
63
|
+
color: "dim"
|
|
64
|
+
}), /* @__PURE__ */ jsxs(View, {
|
|
65
|
+
style: styles.label,
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ jsx(Text, {
|
|
68
|
+
numberOfLines: 1,
|
|
69
|
+
style: styles.name,
|
|
70
|
+
children: item.name
|
|
71
|
+
}),
|
|
72
|
+
grid || item.path !== item.name ? /* @__PURE__ */ jsx(Text, {
|
|
73
|
+
numberOfLines: 1,
|
|
74
|
+
style: styles.path,
|
|
75
|
+
children: item.path
|
|
76
|
+
}) : null,
|
|
77
|
+
grid ? /* @__PURE__ */ jsx(Text, {
|
|
78
|
+
style: styles.meta,
|
|
79
|
+
children: t("nativeComponents.fileList.bytes", "{size} bytes", { size: item.size.toLocaleString(currentLocale()) })
|
|
80
|
+
}) : null
|
|
81
|
+
]
|
|
82
|
+
})]
|
|
83
|
+
}, item.path))
|
|
84
|
+
]
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
const layoutOptions = (t) => [
|
|
88
|
+
{
|
|
89
|
+
value: "tree",
|
|
90
|
+
label: t("nativeComponents.fileList.layout.tree", "Tree")
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
value: "list",
|
|
94
|
+
label: t("nativeComponents.fileList.layout.list", "List")
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
value: "grid",
|
|
98
|
+
label: t("nativeComponents.fileList.layout.grid", "Grid")
|
|
99
|
+
}
|
|
100
|
+
];
|
|
101
|
+
const TYPES = [
|
|
102
|
+
"any",
|
|
103
|
+
"Markdown",
|
|
104
|
+
"Image",
|
|
105
|
+
"Code",
|
|
106
|
+
"Data",
|
|
107
|
+
"Document",
|
|
108
|
+
"Other"
|
|
109
|
+
];
|
|
110
|
+
const modifiedOptions = (t) => [
|
|
111
|
+
{
|
|
112
|
+
value: "any",
|
|
113
|
+
label: t("nativeComponents.fileList.modified.any", "Any time")
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
value: "today",
|
|
117
|
+
label: t("nativeComponents.fileList.modified.today", "Today")
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
value: "7days",
|
|
121
|
+
label: t("nativeComponents.fileList.modified.7days", "Last 7 days")
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
value: "30days",
|
|
125
|
+
label: t("nativeComponents.fileList.modified.30days", "Last 30 days")
|
|
126
|
+
}
|
|
127
|
+
];
|
|
128
|
+
const sortOptions = (t) => [
|
|
129
|
+
{
|
|
130
|
+
value: "name",
|
|
131
|
+
label: t("nativeComponents.fileList.sort.name", "Name")
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
value: "modified",
|
|
135
|
+
label: t("nativeComponents.fileList.sort.modified", "Modified")
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
value: "size",
|
|
139
|
+
label: t("nativeComponents.fileList.sort.size", "Size")
|
|
140
|
+
}
|
|
141
|
+
];
|
|
142
|
+
const ROW_HEIGHT = 48;
|
|
143
|
+
const IMAGE_VIEWABILITY = { itemVisiblePercentThreshold: 1 };
|
|
144
|
+
/** Past this the dots stop reading as positions; the counter beside the name still does. */
|
|
145
|
+
const MAX_DOTS = 7;
|
|
146
|
+
const PREVIEW_HEIGHT = 320;
|
|
147
|
+
function FileBrowserList({ items, onOpen, loading, error, browser: b, label, emptyText }) {
|
|
148
|
+
const t = useT();
|
|
149
|
+
const LAYOUTS = layoutOptions(t);
|
|
150
|
+
const MODIFIED = modifiedOptions(t);
|
|
151
|
+
const SORTS = sortOptions(t);
|
|
152
|
+
const grid = b.layout === "grid";
|
|
153
|
+
const onViewableImagesChange = b.onViewableImagesChange;
|
|
154
|
+
const onViewableItemsChanged = useCallback(({ viewableItems }) => {
|
|
155
|
+
onViewableImagesChange?.(viewableItems.flatMap(({ item, isViewable }) => isViewable && item.kind === "file" && fileKind(item.item.path) === "Image" ? [item.item.path] : []));
|
|
156
|
+
}, [onViewableImagesChange]);
|
|
157
|
+
const rows = b.layout === "tree" ? b.rows : items.map((item) => ({
|
|
158
|
+
kind: "file",
|
|
159
|
+
item,
|
|
160
|
+
depth: 0
|
|
161
|
+
}));
|
|
162
|
+
const files = rows.flatMap((row) => row.kind === "file" ? [row.item] : []);
|
|
163
|
+
const at = b.selected ? files.findIndex((file) => file.path === b.selected?.path) : -1;
|
|
164
|
+
const List = b.sheet ? SheetList : FlatList;
|
|
165
|
+
const list = /* @__PURE__ */ createElement(List, {
|
|
166
|
+
...b.sheet ? { embedded: true } : {},
|
|
167
|
+
key: b.layout,
|
|
168
|
+
testID: "file-list-browser",
|
|
169
|
+
onViewableItemsChanged,
|
|
170
|
+
viewabilityConfig: IMAGE_VIEWABILITY,
|
|
171
|
+
data: loading || error ? [] : rows,
|
|
172
|
+
numColumns: grid ? 2 : 1,
|
|
173
|
+
columnWrapperStyle: grid ? styles.columns : void 0,
|
|
174
|
+
keyExtractor: (row) => row.kind === "dir" ? `dir:${row.path}` : row.item.path,
|
|
175
|
+
keyboardShouldPersistTaps: "handled",
|
|
176
|
+
ListHeaderComponent: /* @__PURE__ */ jsxs(Fragment$1, { children: [b.header, /* @__PURE__ */ jsxs(View, {
|
|
177
|
+
style: styles.head,
|
|
178
|
+
children: [
|
|
179
|
+
/* @__PURE__ */ jsx(SegmentedControl, {
|
|
180
|
+
accessibilityLabel: t("nativeComponents.fileList.layoutLabel", "{label} layout", { label }),
|
|
181
|
+
options: LAYOUTS,
|
|
182
|
+
value: b.layout,
|
|
183
|
+
onValueChange: (value) => {
|
|
184
|
+
if (isFileLayout(value)) b.onLayoutChange(value);
|
|
185
|
+
}
|
|
186
|
+
}),
|
|
187
|
+
/* @__PURE__ */ jsxs(View, {
|
|
188
|
+
style: styles.toolbar,
|
|
189
|
+
children: [/* @__PURE__ */ jsxs(View, {
|
|
190
|
+
style: styles.search,
|
|
191
|
+
children: [/* @__PURE__ */ jsx(SearchIcon, { size: 18 }), /* @__PURE__ */ jsx(Input, {
|
|
192
|
+
variant: "bare",
|
|
193
|
+
accessibilityLabel: t("nativeComponents.fileList.search", "Search {label}", { label }),
|
|
194
|
+
placeholder: t("nativeComponents.fileList.search", "Search {label}", { label }),
|
|
195
|
+
value: b.query,
|
|
196
|
+
onChangeText: b.onQueryChange,
|
|
197
|
+
style: styles.searchInput,
|
|
198
|
+
autoCapitalize: "none"
|
|
199
|
+
})]
|
|
200
|
+
}), /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsxs(DropdownMenuTrigger, {
|
|
201
|
+
variant: "outline",
|
|
202
|
+
accessibilityLabel: t("nativeComponents.fileList.filters", "Filters"),
|
|
203
|
+
children: [/* @__PURE__ */ jsx(SlidersIcon, {}), t("nativeComponents.fileList.filters", "Filters")]
|
|
204
|
+
}), /* @__PURE__ */ jsxs(DropdownMenuContent, { children: [
|
|
205
|
+
/* @__PURE__ */ jsx(DropdownMenuLabel, { children: t("nativeComponents.fileList.typeHeading", "Type") }),
|
|
206
|
+
TYPES.map((type) => /* @__PURE__ */ jsx(DropdownMenuCheckboxItem, {
|
|
207
|
+
checked: b.type === type,
|
|
208
|
+
onCheckedChange: () => b.onTypeChange(type),
|
|
209
|
+
children: type === "any" ? t("nativeComponents.fileList.allTypes", "All types") : fileKindLabel(type, t)
|
|
210
|
+
}, type)),
|
|
211
|
+
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
212
|
+
/* @__PURE__ */ jsx(DropdownMenuLabel, { children: t("nativeComponents.fileList.sort.modified", "Modified") }),
|
|
213
|
+
MODIFIED.map(({ value, label }) => /* @__PURE__ */ jsx(DropdownMenuCheckboxItem, {
|
|
214
|
+
checked: b.modified === value,
|
|
215
|
+
onCheckedChange: () => b.onModifiedChange(value),
|
|
216
|
+
children: label
|
|
217
|
+
}, value)),
|
|
218
|
+
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
219
|
+
/* @__PURE__ */ jsx(DropdownMenuLabel, { children: t("nativeComponents.fileList.sortHeading", "Sort") }),
|
|
220
|
+
SORTS.map(({ value, label }) => /* @__PURE__ */ jsx(DropdownMenuCheckboxItem, {
|
|
221
|
+
checked: b.sort === value,
|
|
222
|
+
onCheckedChange: () => b.onSortChange(value),
|
|
223
|
+
children: label
|
|
224
|
+
}, value)),
|
|
225
|
+
/* @__PURE__ */ jsx(DropdownMenuCheckboxItem, {
|
|
226
|
+
checked: b.direction === "asc",
|
|
227
|
+
onCheckedChange: () => b.onDirectionChange("asc"),
|
|
228
|
+
children: t("nativeComponents.fileList.ascending", "Ascending")
|
|
229
|
+
}),
|
|
230
|
+
/* @__PURE__ */ jsx(DropdownMenuCheckboxItem, {
|
|
231
|
+
checked: b.direction === "desc",
|
|
232
|
+
onCheckedChange: () => b.onDirectionChange("desc"),
|
|
233
|
+
children: t("nativeComponents.fileList.descending", "Descending")
|
|
234
|
+
})
|
|
235
|
+
] })] })]
|
|
236
|
+
}),
|
|
237
|
+
/* @__PURE__ */ jsxs(View, {
|
|
238
|
+
style: styles.chips,
|
|
239
|
+
children: [
|
|
240
|
+
b.query ? /* @__PURE__ */ jsxs(Button, {
|
|
241
|
+
variant: "outline",
|
|
242
|
+
accessibilityLabel: t("nativeComponents.fileList.removeSearch", "Remove search filter"),
|
|
243
|
+
onPress: () => b.onQueryChange(""),
|
|
244
|
+
children: [t("nativeComponents.fileList.searchChip", "Search: {query}", { query: b.query }), /* @__PURE__ */ jsx(CloseIcon, {})]
|
|
245
|
+
}) : null,
|
|
246
|
+
b.type !== "any" ? /* @__PURE__ */ jsxs(Button, {
|
|
247
|
+
variant: "outline",
|
|
248
|
+
accessibilityLabel: t("nativeComponents.fileList.removeType", "Remove type filter"),
|
|
249
|
+
onPress: () => b.onTypeChange("any"),
|
|
250
|
+
children: [fileKindLabel(b.type, t), /* @__PURE__ */ jsx(CloseIcon, {})]
|
|
251
|
+
}) : null,
|
|
252
|
+
b.modified !== "any" ? /* @__PURE__ */ jsxs(Button, {
|
|
253
|
+
variant: "outline",
|
|
254
|
+
accessibilityLabel: t("nativeComponents.fileList.removeModified", "Remove modified filter"),
|
|
255
|
+
onPress: () => b.onModifiedChange("any"),
|
|
256
|
+
children: [MODIFIED.find((option) => option.value === b.modified)?.label, /* @__PURE__ */ jsx(CloseIcon, {})]
|
|
257
|
+
}) : null
|
|
258
|
+
]
|
|
259
|
+
}),
|
|
260
|
+
error ? /* @__PURE__ */ jsx(Text, {
|
|
261
|
+
accessibilityRole: "alert",
|
|
262
|
+
style: styles.error,
|
|
263
|
+
children: error
|
|
264
|
+
}) : null,
|
|
265
|
+
loading ? /* @__PURE__ */ jsx(Text, {
|
|
266
|
+
style: styles.meta,
|
|
267
|
+
children: t("nativeComponents.fileList.loading", "Loading files...")
|
|
268
|
+
}) : null
|
|
269
|
+
]
|
|
270
|
+
})] }),
|
|
271
|
+
ListEmptyComponent: loading || error ? void 0 : b.totalCount ? /* @__PURE__ */ jsx(EmptyState, {
|
|
272
|
+
size: "compact",
|
|
273
|
+
surface: "plain",
|
|
274
|
+
icon: /* @__PURE__ */ jsx(SearchIcon, { size: 16 }),
|
|
275
|
+
title: t("nativeComponents.fileList.noMatch", "No files match"),
|
|
276
|
+
secondaryAction: {
|
|
277
|
+
label: t("nativeComponents.fileList.clearFilters", "Clear filters"),
|
|
278
|
+
onAction: () => {
|
|
279
|
+
b.onQueryChange("");
|
|
280
|
+
b.onTypeChange("any");
|
|
281
|
+
b.onModifiedChange("any");
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
style: styles.inset
|
|
285
|
+
}) : /* @__PURE__ */ jsx(EmptyState, {
|
|
286
|
+
size: "compact",
|
|
287
|
+
surface: "plain",
|
|
288
|
+
icon: /* @__PURE__ */ jsx(FolderIcon, { size: 16 }),
|
|
289
|
+
title: t("nativeComponents.fileList.emptyTitle", "Nothing here yet"),
|
|
290
|
+
description: emptyText,
|
|
291
|
+
style: styles.inset
|
|
292
|
+
}),
|
|
293
|
+
renderItem: ({ item: row }) => {
|
|
294
|
+
if (row.kind === "dir") return /* @__PURE__ */ jsxs(Button, {
|
|
295
|
+
variant: "ghost",
|
|
296
|
+
style: [styles.row, styles.indent(row.depth)],
|
|
297
|
+
accessibilityLabel: row.open ? t("nativeComponents.fileList.collapse", "Collapse {path}", { path: row.path }) : t("nativeComponents.fileList.expand", "Expand {path}", { path: row.path }),
|
|
298
|
+
accessibilityState: { expanded: row.open },
|
|
299
|
+
onPress: () => b.onToggleDirectory(row.path),
|
|
300
|
+
children: [
|
|
301
|
+
row.open ? /* @__PURE__ */ jsx(ChevronDownIcon, {}) : /* @__PURE__ */ jsx(ChevronRightIcon, {}),
|
|
302
|
+
/* @__PURE__ */ jsx(FolderIcon, {}),
|
|
303
|
+
/* @__PURE__ */ jsx(Text, {
|
|
304
|
+
numberOfLines: 1,
|
|
305
|
+
style: [styles.name, styles.label],
|
|
306
|
+
children: row.name
|
|
307
|
+
}),
|
|
308
|
+
/* @__PURE__ */ jsx(Text, {
|
|
309
|
+
style: styles.meta,
|
|
310
|
+
children: row.count
|
|
311
|
+
})
|
|
312
|
+
]
|
|
313
|
+
});
|
|
314
|
+
const item = row.item;
|
|
315
|
+
const image = fileKind(item.path) === "Image";
|
|
316
|
+
const selected = b.selected?.path === item.path;
|
|
317
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
318
|
+
variant: "ghost",
|
|
319
|
+
size: "card",
|
|
320
|
+
testID: `file-${item.path}`,
|
|
321
|
+
accessibilityLabel: t("nativeComponents.fileList.select", "Select {path}", { path: item.path }),
|
|
322
|
+
accessibilityState: { selected },
|
|
323
|
+
onPress: () => b.onSelect(item),
|
|
324
|
+
style: [
|
|
325
|
+
grid ? styles.tile : styles.row,
|
|
326
|
+
selected && styles.selected,
|
|
327
|
+
!grid && styles.indent(row.depth)
|
|
328
|
+
],
|
|
329
|
+
children: [
|
|
330
|
+
b.layout === "tree" ? /* @__PURE__ */ jsx(View, {
|
|
331
|
+
accessible: false,
|
|
332
|
+
style: styles.chevronGutter
|
|
333
|
+
}) : null,
|
|
334
|
+
grid ? /* @__PURE__ */ jsx(View, {
|
|
335
|
+
style: styles.thumbnail,
|
|
336
|
+
children: image && b.renderImage ? b.renderImage(item, false) : image ? /* @__PURE__ */ jsx(ImageIcon, { size: 28 }) : /* @__PURE__ */ jsx(FileIcon, { size: 28 })
|
|
337
|
+
}) : /* @__PURE__ */ jsx(View, {
|
|
338
|
+
style: styles.rowThumbnail,
|
|
339
|
+
children: image && b.renderImage ? b.renderImage(item, true) : image ? /* @__PURE__ */ jsx(ImageIcon, { size: 18 }) : /* @__PURE__ */ jsx(FileIcon, { size: 18 })
|
|
340
|
+
}),
|
|
341
|
+
/* @__PURE__ */ jsxs(View, {
|
|
342
|
+
style: styles.label,
|
|
343
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
344
|
+
numberOfLines: 1,
|
|
345
|
+
style: styles.name,
|
|
346
|
+
children: item.name
|
|
347
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
348
|
+
numberOfLines: 1,
|
|
349
|
+
style: styles.path,
|
|
350
|
+
children: item.path
|
|
351
|
+
})]
|
|
352
|
+
}),
|
|
353
|
+
/* @__PURE__ */ jsx(Text, {
|
|
354
|
+
style: styles.meta,
|
|
355
|
+
children: sizeLabel(item.size)
|
|
356
|
+
})
|
|
357
|
+
]
|
|
358
|
+
});
|
|
359
|
+
},
|
|
360
|
+
ListFooterComponent: /* @__PURE__ */ jsx(View, {
|
|
361
|
+
style: styles.foot,
|
|
362
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
363
|
+
style: styles.meta,
|
|
364
|
+
children: t("nativeComponents.fileList.count", "{shown} of {total} files", {
|
|
365
|
+
shown: items.length,
|
|
366
|
+
total: b.totalCount
|
|
367
|
+
})
|
|
368
|
+
})
|
|
369
|
+
})
|
|
370
|
+
});
|
|
371
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [list, /* @__PURE__ */ jsx(Sheet, {
|
|
372
|
+
open: b.selected !== void 0,
|
|
373
|
+
onOpenChange: (open) => {
|
|
374
|
+
if (!open) b.onCloseSelection();
|
|
375
|
+
},
|
|
376
|
+
children: /* @__PURE__ */ jsx(SheetContent, { children: b.selected ? /* @__PURE__ */ jsx(View, {
|
|
377
|
+
style: styles.foot,
|
|
378
|
+
children: /* @__PURE__ */ jsxs(View, {
|
|
379
|
+
style: styles.selection,
|
|
380
|
+
testID: "file-selection",
|
|
381
|
+
children: [
|
|
382
|
+
/* @__PURE__ */ jsxs(View, {
|
|
383
|
+
style: styles.titleRow,
|
|
384
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
385
|
+
accessibilityRole: "header",
|
|
386
|
+
numberOfLines: 1,
|
|
387
|
+
style: [styles.name, styles.label],
|
|
388
|
+
children: b.selected.name
|
|
389
|
+
}), files.length > 1 ? /* @__PURE__ */ jsx(Text, {
|
|
390
|
+
accessibilityLiveRegion: "polite",
|
|
391
|
+
style: styles.meta,
|
|
392
|
+
children: t("nativeComponents.fileList.position", "{index} of {total}", {
|
|
393
|
+
index: Math.max(0, at) + 1,
|
|
394
|
+
total: files.length
|
|
395
|
+
})
|
|
396
|
+
}) : null]
|
|
397
|
+
}),
|
|
398
|
+
/* @__PURE__ */ jsx(SelectionSlides, {
|
|
399
|
+
files: at < 0 ? [b.selected] : files,
|
|
400
|
+
selected: b.selected,
|
|
401
|
+
onSelect: b.onSelect,
|
|
402
|
+
renderImage: b.renderImage
|
|
403
|
+
}),
|
|
404
|
+
/* @__PURE__ */ jsx(Text, {
|
|
405
|
+
numberOfLines: 2,
|
|
406
|
+
style: styles.path,
|
|
407
|
+
children: b.selected.path
|
|
408
|
+
}),
|
|
409
|
+
/* @__PURE__ */ jsxs(Text, {
|
|
410
|
+
style: styles.meta,
|
|
411
|
+
children: [
|
|
412
|
+
fileKindLabel(fileKind(b.selected.path), t),
|
|
413
|
+
" · ",
|
|
414
|
+
sizeLabel(b.selected.size)
|
|
415
|
+
]
|
|
416
|
+
}),
|
|
417
|
+
/* @__PURE__ */ jsxs(View, {
|
|
418
|
+
style: styles.actions,
|
|
419
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
420
|
+
variant: "outline",
|
|
421
|
+
onPress: b.onCloseSelection,
|
|
422
|
+
children: t("nativeComponents.fileList.close", "Close")
|
|
423
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
424
|
+
variant: "primary",
|
|
425
|
+
onPress: () => {
|
|
426
|
+
if (b.selected) {
|
|
427
|
+
b.onCloseSelection();
|
|
428
|
+
onOpen(b.selected.path);
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
children: t("nativeComponents.fileList.openAction", "Open")
|
|
432
|
+
})]
|
|
433
|
+
})
|
|
434
|
+
]
|
|
435
|
+
})
|
|
436
|
+
}) : null })
|
|
437
|
+
})] });
|
|
438
|
+
}
|
|
439
|
+
/** The selected file large; swiping and the arrows select its neighbours in the list. */
|
|
440
|
+
function SelectionSlides({ files, selected, onSelect, renderImage }) {
|
|
441
|
+
const t = useT();
|
|
442
|
+
const index = Math.max(0, files.findIndex((file) => file.path === selected.path));
|
|
443
|
+
const [width, setWidth] = useState(0);
|
|
444
|
+
const scroller = useRef(null);
|
|
445
|
+
const placed = useRef(false);
|
|
446
|
+
useEffect(() => {
|
|
447
|
+
if (width === 0) return;
|
|
448
|
+
scroller.current?.scrollTo({
|
|
449
|
+
x: index * width,
|
|
450
|
+
animated: placed.current
|
|
451
|
+
});
|
|
452
|
+
placed.current = true;
|
|
453
|
+
}, [index, width]);
|
|
454
|
+
const step = (by) => {
|
|
455
|
+
const next = files[index + by];
|
|
456
|
+
if (next) onSelect(next);
|
|
457
|
+
};
|
|
458
|
+
return /* @__PURE__ */ jsxs(View, { children: [
|
|
459
|
+
/* @__PURE__ */ jsx(ScrollView, {
|
|
460
|
+
ref: scroller,
|
|
461
|
+
horizontal: true,
|
|
462
|
+
pagingEnabled: true,
|
|
463
|
+
showsHorizontalScrollIndicator: false,
|
|
464
|
+
onLayout: (event) => setWidth(event.nativeEvent.layout.width),
|
|
465
|
+
onMomentumScrollEnd: (event) => {
|
|
466
|
+
if (width > 0) step(Math.round(event.nativeEvent.contentOffset.x / width) - index);
|
|
467
|
+
},
|
|
468
|
+
style: styles.preview,
|
|
469
|
+
children: files.map((file, page) => /* @__PURE__ */ jsx(View, {
|
|
470
|
+
accessibilityElementsHidden: page !== index,
|
|
471
|
+
importantForAccessibility: page === index ? "auto" : "no-hide-descendants",
|
|
472
|
+
style: [styles.page, { width }],
|
|
473
|
+
children: Math.abs(page - index) > 1 ? null : fileKind(file.path) !== "Image" ? /* @__PURE__ */ jsx(FileIcon, { size: 28 }) : renderImage ? renderImage(file, false) : /* @__PURE__ */ jsx(ImageIcon, { size: 28 })
|
|
474
|
+
}, file.path))
|
|
475
|
+
}),
|
|
476
|
+
files.length > 1 ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Button, {
|
|
477
|
+
variant: "ghost",
|
|
478
|
+
size: "icon-md",
|
|
479
|
+
accessibilityLabel: t("nativeComponents.fileList.previous", "Previous file"),
|
|
480
|
+
disabled: index === 0,
|
|
481
|
+
onPress: () => step(-1),
|
|
482
|
+
style: [styles.arrow, styles.previous],
|
|
483
|
+
children: /* @__PURE__ */ jsx(View, {
|
|
484
|
+
style: styles.flip,
|
|
485
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, {
|
|
486
|
+
size: 18,
|
|
487
|
+
color: "hi"
|
|
488
|
+
})
|
|
489
|
+
})
|
|
490
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
491
|
+
variant: "ghost",
|
|
492
|
+
size: "icon-md",
|
|
493
|
+
accessibilityLabel: t("nativeComponents.fileList.next", "Next file"),
|
|
494
|
+
disabled: index === files.length - 1,
|
|
495
|
+
onPress: () => step(1),
|
|
496
|
+
style: [styles.arrow, styles.next],
|
|
497
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, {
|
|
498
|
+
size: 18,
|
|
499
|
+
color: "hi"
|
|
500
|
+
})
|
|
501
|
+
})] }) : null,
|
|
502
|
+
files.length > 1 && files.length <= MAX_DOTS ? /* @__PURE__ */ jsx(View, {
|
|
503
|
+
accessible: false,
|
|
504
|
+
style: styles.dots,
|
|
505
|
+
children: files.map((file, page) => /* @__PURE__ */ jsx(View, { style: [styles.dot, page === index && styles.dotActive] }, file.path))
|
|
506
|
+
}) : null
|
|
507
|
+
] });
|
|
508
|
+
}
|
|
509
|
+
const styles = StyleSheet.create((theme) => ({
|
|
510
|
+
head: {
|
|
511
|
+
gap: theme.spacing(3),
|
|
512
|
+
padding: theme.spacing(4),
|
|
513
|
+
paddingBottom: theme.spacing(3),
|
|
514
|
+
uni__dependencies: [0]
|
|
515
|
+
},
|
|
516
|
+
foot: {
|
|
517
|
+
gap: theme.spacing(3),
|
|
518
|
+
padding: theme.spacing(4),
|
|
519
|
+
paddingTop: theme.spacing(3),
|
|
520
|
+
uni__dependencies: [0]
|
|
521
|
+
},
|
|
522
|
+
inset: {
|
|
523
|
+
paddingHorizontal: theme.spacing(4),
|
|
524
|
+
uni__dependencies: [0]
|
|
525
|
+
},
|
|
526
|
+
toolbar: {
|
|
527
|
+
flexDirection: "row",
|
|
528
|
+
alignItems: "center",
|
|
529
|
+
gap: theme.spacing(2),
|
|
530
|
+
uni__dependencies: [0]
|
|
531
|
+
},
|
|
532
|
+
search: {
|
|
533
|
+
flex: 1,
|
|
534
|
+
minWidth: 0,
|
|
535
|
+
flexDirection: "row",
|
|
536
|
+
alignItems: "center",
|
|
537
|
+
gap: theme.spacing(2),
|
|
538
|
+
paddingHorizontal: theme.spacing(2),
|
|
539
|
+
borderWidth: 1,
|
|
540
|
+
borderColor: theme.colors.border,
|
|
541
|
+
borderRadius: theme.borderRadius.DEFAULT,
|
|
542
|
+
backgroundColor: theme.colors.deep,
|
|
543
|
+
uni__dependencies: [0]
|
|
544
|
+
},
|
|
545
|
+
searchInput: { flex: 1 },
|
|
546
|
+
chips: {
|
|
547
|
+
flexDirection: "row",
|
|
548
|
+
flexWrap: "wrap",
|
|
549
|
+
gap: theme.spacing(2),
|
|
550
|
+
uni__dependencies: [0]
|
|
551
|
+
},
|
|
552
|
+
row: {
|
|
553
|
+
marginHorizontal: theme.spacing(4),
|
|
554
|
+
marginBottom: theme.spacing(2),
|
|
555
|
+
minHeight: ROW_HEIGHT,
|
|
556
|
+
flexDirection: "row",
|
|
557
|
+
alignItems: "center",
|
|
558
|
+
justifyContent: "flex-start",
|
|
559
|
+
gap: theme.spacing(2),
|
|
560
|
+
borderWidth: 1,
|
|
561
|
+
borderColor: theme.colors["border-soft"],
|
|
562
|
+
borderRadius: theme.borderRadius.DEFAULT,
|
|
563
|
+
paddingVertical: theme.spacing(2),
|
|
564
|
+
paddingRight: theme.spacing(3),
|
|
565
|
+
uni__dependencies: [0]
|
|
566
|
+
},
|
|
567
|
+
indent: (depth) => ({
|
|
568
|
+
paddingLeft: theme.spacing(3) + depth * 16,
|
|
569
|
+
uni__dependencies: [0]
|
|
570
|
+
}),
|
|
571
|
+
chevronGutter: { width: 16 },
|
|
572
|
+
columns: {
|
|
573
|
+
gap: theme.spacing(2),
|
|
574
|
+
paddingHorizontal: theme.spacing(4),
|
|
575
|
+
uni__dependencies: [0]
|
|
576
|
+
},
|
|
577
|
+
tile: {
|
|
578
|
+
flex: 1,
|
|
579
|
+
maxWidth: "50%",
|
|
580
|
+
flexDirection: "column",
|
|
581
|
+
alignItems: "stretch",
|
|
582
|
+
gap: theme.spacing(2),
|
|
583
|
+
borderWidth: 1,
|
|
584
|
+
borderColor: theme.colors["border-soft"],
|
|
585
|
+
marginBottom: theme.spacing(2),
|
|
586
|
+
uni__dependencies: [0]
|
|
587
|
+
},
|
|
588
|
+
thumbnail: {
|
|
589
|
+
height: 96,
|
|
590
|
+
backgroundColor: theme.colors.deep,
|
|
591
|
+
borderRadius: theme.borderRadius.DEFAULT,
|
|
592
|
+
overflow: "hidden",
|
|
593
|
+
alignItems: "center",
|
|
594
|
+
justifyContent: "center",
|
|
595
|
+
uni__dependencies: [0]
|
|
596
|
+
},
|
|
597
|
+
rowThumbnail: {
|
|
598
|
+
width: 40,
|
|
599
|
+
height: 40,
|
|
600
|
+
borderRadius: theme.borderRadius.sm,
|
|
601
|
+
overflow: "hidden",
|
|
602
|
+
alignItems: "center",
|
|
603
|
+
justifyContent: "center",
|
|
604
|
+
uni__dependencies: [0]
|
|
605
|
+
},
|
|
606
|
+
selected: {
|
|
607
|
+
backgroundColor: theme.colors["tint-green"],
|
|
608
|
+
borderColor: theme.colors["edge-green"],
|
|
609
|
+
uni__dependencies: [0]
|
|
610
|
+
},
|
|
611
|
+
selection: {
|
|
612
|
+
flexShrink: 0,
|
|
613
|
+
padding: theme.spacing(3),
|
|
614
|
+
gap: theme.spacing(2),
|
|
615
|
+
borderWidth: 1,
|
|
616
|
+
borderColor: theme.colors.border,
|
|
617
|
+
borderRadius: theme.borderRadius.DEFAULT,
|
|
618
|
+
backgroundColor: theme.colors.panel,
|
|
619
|
+
uni__dependencies: [0]
|
|
620
|
+
},
|
|
621
|
+
actions: {
|
|
622
|
+
flexDirection: "row",
|
|
623
|
+
justifyContent: "flex-end",
|
|
624
|
+
gap: theme.spacing(2),
|
|
625
|
+
uni__dependencies: [0]
|
|
626
|
+
},
|
|
627
|
+
titleRow: {
|
|
628
|
+
flexDirection: "row",
|
|
629
|
+
alignItems: "center",
|
|
630
|
+
gap: theme.spacing(2),
|
|
631
|
+
uni__dependencies: [0]
|
|
632
|
+
},
|
|
633
|
+
preview: {
|
|
634
|
+
height: PREVIEW_HEIGHT,
|
|
635
|
+
backgroundColor: theme.colors.deep,
|
|
636
|
+
borderRadius: theme.borderRadius.DEFAULT,
|
|
637
|
+
uni__dependencies: [0]
|
|
638
|
+
},
|
|
639
|
+
page: {
|
|
640
|
+
height: PREVIEW_HEIGHT,
|
|
641
|
+
alignItems: "center",
|
|
642
|
+
justifyContent: "center"
|
|
643
|
+
},
|
|
644
|
+
arrow: {
|
|
645
|
+
position: "absolute",
|
|
646
|
+
top: PREVIEW_HEIGHT / 2 - 22,
|
|
647
|
+
width: 44,
|
|
648
|
+
height: 44,
|
|
649
|
+
borderRadius: 22,
|
|
650
|
+
backgroundColor: theme.colors.panel,
|
|
651
|
+
uni__dependencies: [0]
|
|
652
|
+
},
|
|
653
|
+
previous: {
|
|
654
|
+
left: theme.spacing(2),
|
|
655
|
+
uni__dependencies: [0]
|
|
656
|
+
},
|
|
657
|
+
next: {
|
|
658
|
+
right: theme.spacing(2),
|
|
659
|
+
uni__dependencies: [0]
|
|
660
|
+
},
|
|
661
|
+
flip: { transform: [{ rotate: "180deg" }] },
|
|
662
|
+
dots: {
|
|
663
|
+
flexDirection: "row",
|
|
664
|
+
justifyContent: "center",
|
|
665
|
+
gap: theme.spacing(2),
|
|
666
|
+
paddingTop: theme.spacing(2),
|
|
667
|
+
uni__dependencies: [0]
|
|
668
|
+
},
|
|
669
|
+
dot: {
|
|
670
|
+
width: 6,
|
|
671
|
+
height: 6,
|
|
672
|
+
borderRadius: 3,
|
|
673
|
+
backgroundColor: theme.colors.faint,
|
|
674
|
+
uni__dependencies: [0]
|
|
675
|
+
},
|
|
676
|
+
dotActive: {
|
|
677
|
+
backgroundColor: theme.colors.green,
|
|
678
|
+
uni__dependencies: [0]
|
|
679
|
+
},
|
|
680
|
+
list: {
|
|
681
|
+
gap: theme.spacing(2),
|
|
682
|
+
uni__dependencies: [0]
|
|
683
|
+
},
|
|
684
|
+
item: {
|
|
685
|
+
minHeight: 44,
|
|
686
|
+
flexDirection: "row",
|
|
687
|
+
justifyContent: "flex-start",
|
|
688
|
+
alignItems: "center",
|
|
689
|
+
gap: theme.spacing(3),
|
|
690
|
+
uni__dependencies: [0]
|
|
691
|
+
},
|
|
692
|
+
label: {
|
|
693
|
+
flex: 1,
|
|
694
|
+
gap: theme.spacing(1),
|
|
695
|
+
minWidth: 0,
|
|
696
|
+
uni__dependencies: [0]
|
|
697
|
+
},
|
|
698
|
+
name: {
|
|
699
|
+
fontFamily: fontOf(theme.fontFamily.sans),
|
|
700
|
+
fontWeight: "600",
|
|
701
|
+
fontSize: theme.fontSize.base,
|
|
702
|
+
color: theme.colors.text,
|
|
703
|
+
uni__dependencies: [0]
|
|
704
|
+
},
|
|
705
|
+
path: {
|
|
706
|
+
fontFamily: fontOf(theme.fontFamily.mono),
|
|
707
|
+
fontSize: theme.fontSize.sm,
|
|
708
|
+
color: theme.colors.dim,
|
|
709
|
+
uni__dependencies: [0]
|
|
710
|
+
},
|
|
711
|
+
meta: {
|
|
712
|
+
fontFamily: fontOf(theme.fontFamily.sans),
|
|
713
|
+
fontSize: theme.fontSize.sm,
|
|
714
|
+
color: theme.colors.dim,
|
|
715
|
+
uni__dependencies: [0]
|
|
716
|
+
},
|
|
717
|
+
error: {
|
|
718
|
+
fontFamily: fontOf(theme.fontFamily.sans),
|
|
719
|
+
fontSize: theme.fontSize.sm,
|
|
720
|
+
color: theme.colors.red,
|
|
721
|
+
uni__dependencies: [0]
|
|
722
|
+
}
|
|
723
|
+
}));
|
|
724
|
+
|
|
725
|
+
//#endregion
|
|
726
|
+
export { FileList };
|
|
727
|
+
//# sourceMappingURL=FileList.mjs.map
|