@parallelworks/ui 0.50.0 → 0.52.0
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/README.md +204 -18
- package/dist/ai/agent/toolStrings.d.ts +2 -0
- package/dist/ai/agent/toolStrings.js +20 -18
- package/dist/ai/ai.css +12 -0
- package/dist/ai/components/AllocationSelector.js +5 -1
- package/dist/ai/components/AttachmentManager.js +51 -42
- package/dist/ai/components/AttachmentUpload.d.ts +4 -2
- package/dist/ai/components/AttachmentUpload.js +9 -9
- package/dist/ai/components/BlockedGroupBanner.js +8 -14
- package/dist/ai/components/BranchNavigator.js +11 -12
- package/dist/ai/components/ChatEmptyState.js +12 -19
- package/dist/ai/components/ChatInput.d.ts +4 -3
- package/dist/ai/components/ChatInput.js +27 -13
- package/dist/ai/components/ChatMessage.js +45 -121
- package/dist/ai/components/ChatMessageList.d.ts +5 -2
- package/dist/ai/components/ChatMessageList.js +89 -51
- package/dist/ai/components/ChatSidebar.js +11 -7
- package/dist/ai/components/ChatThread.js +1 -13
- package/dist/ai/components/DragOverlay.js +3 -3
- package/dist/ai/components/MessageAttachments.d.ts +10 -0
- package/dist/ai/components/MessageAttachments.js +78 -0
- package/dist/ai/components/ModelSelector.js +4 -4
- package/dist/ai/components/PastedText.js +2 -2
- package/dist/ai/components/ProviderIssueBanner.js +19 -23
- package/dist/ai/components/ShareDialog.js +2 -2
- package/dist/ai/components/agent/ActivityLine.d.ts +0 -2
- package/dist/ai/components/agent/ActivityLine.js +8 -51
- package/dist/ai/components/agent/AgentMessageParts.js +117 -56
- package/dist/ai/core/ChatProvider.d.ts +16 -5
- package/dist/ai/core/ChatProvider.js +41 -8
- package/dist/ai/core/config.js +4 -3
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.js +3 -3
- package/dist/ai/strings.d.ts +29 -3
- package/dist/ai/strings.js +81 -26
- package/dist/ai/types.d.ts +4 -0
- package/dist/ai/ui/Notice.d.ts +2 -2
- package/dist/ai/ui/Notice.js +29 -62
- package/dist/ai/ui/sidebar.d.ts +5 -3
- package/dist/ai/ui/sidebar.js +21 -9
- package/dist/components/ActionMenu.d.ts +1 -0
- package/dist/components/ActionMenu.js +6 -1
- package/dist/components/AppLink.d.ts +26 -0
- package/dist/components/AppLink.js +51 -0
- package/dist/components/Avatar.d.ts +2 -1
- package/dist/components/Avatar.js +4 -2
- package/dist/components/Button.d.ts +15 -5
- package/dist/components/Button.js +47 -40
- package/dist/components/Callout.d.ts +31 -7
- package/dist/components/Callout.js +51 -24
- package/dist/components/Card.d.ts +11 -6
- package/dist/components/Card.js +14 -8
- package/dist/components/Checkbox.js +2 -1
- package/dist/components/ColorInput.js +5 -3
- package/dist/components/Combobox.js +49 -19
- package/dist/components/ConfirmModal.d.ts +19 -8
- package/dist/components/ConfirmModal.js +31 -53
- package/dist/components/CopyButton.d.ts +38 -0
- package/dist/components/CopyButton.js +68 -0
- package/dist/components/CreateModal.js +118 -111
- package/dist/components/DatePicker.js +12 -8
- package/dist/components/DescriptionList.d.ts +51 -17
- package/dist/components/DescriptionList.js +117 -31
- package/dist/components/Disclosure.js +1 -1
- package/dist/components/Drawer.js +10 -16
- package/dist/components/Field.d.ts +15 -5
- package/dist/components/Field.js +41 -9
- package/dist/components/IconButton.d.ts +14 -5
- package/dist/components/IconButton.js +25 -14
- package/dist/components/InfoTip.d.ts +4 -1
- package/dist/components/InfoTip.js +2 -1
- package/dist/components/Input.d.ts +14 -8
- package/dist/components/Input.js +46 -31
- package/dist/components/Loader.js +1 -1
- package/dist/components/MenuEntries.d.ts +43 -12
- package/dist/components/MenuEntries.js +34 -19
- package/dist/components/Meter.js +5 -4
- package/dist/components/Modal.d.ts +28 -4
- package/dist/components/Modal.js +37 -14
- package/dist/components/Overview.d.ts +20 -12
- package/dist/components/Overview.js +14 -9
- package/dist/components/PageHeader.d.ts +47 -65
- package/dist/components/PageHeader.js +275 -153
- package/dist/components/PageHeaderAction.d.ts +67 -0
- package/dist/components/PageHeaderAction.js +107 -0
- package/dist/components/Pagination.js +6 -16
- package/dist/components/Popover.js +3 -2
- package/dist/components/Provider.d.ts +79 -19
- package/dist/components/Provider.js +140 -130
- package/dist/components/Radio.js +2 -1
- package/dist/components/RefreshButton.js +7 -8
- package/dist/components/RequiredMark.js +1 -1
- package/dist/components/RunStatusIcon.js +2 -2
- package/dist/components/Section.js +1 -1
- package/dist/components/Select.d.ts +4 -9
- package/dist/components/Select.js +24 -11
- package/dist/components/SettingModeOption.d.ts +1 -1
- package/dist/components/SettingModeOption.js +7 -1
- package/dist/components/SettingsCard.d.ts +5 -3
- package/dist/components/SettingsCard.js +27 -20
- package/dist/components/Slider.js +1 -1
- package/dist/components/StatusBadge.js +2 -2
- package/dist/components/StatusIcons.js +2 -2
- package/dist/components/Switch.js +5 -4
- package/dist/components/Table.d.ts +30 -20
- package/dist/components/Table.js +50 -73
- package/dist/components/Tabs.d.ts +3 -7
- package/dist/components/Tabs.js +6 -10
- package/dist/components/ThemeEditor.js +24 -14
- package/dist/components/Toast.d.ts +11 -3
- package/dist/components/Toast.js +47 -22
- package/dist/components/buttonClasses.js +2 -2
- package/dist/components/comboboxItems.d.ts +4 -0
- package/dist/components/comboboxItems.js +6 -1
- package/dist/components/dismiss.d.ts +12 -0
- package/dist/components/dismiss.js +19 -0
- package/dist/components/fieldBox.d.ts +4 -0
- package/dist/components/fieldBox.js +7 -3
- package/dist/components/floating.d.ts +3 -3
- package/dist/components/floating.js +1 -1
- package/dist/components/markdownCodeBreaks.js +3 -4
- package/dist/components/pageHeaderStore.d.ts +41 -0
- package/dist/components/pageHeaderStore.js +67 -0
- package/dist/components/pathBreaks.d.ts +8 -0
- package/dist/components/pathBreaks.js +28 -0
- package/dist/components/segmented.js +1 -1
- package/dist/components/shortcutKey.d.ts +2 -1
- package/dist/components/shortcutKey.js +19 -2
- package/dist/components/splitter.js +1 -1
- package/dist/components/tone.d.ts +5 -2
- package/dist/components/tone.js +15 -6
- package/dist/components/useCssIsDark.js +40 -18
- package/dist/components/useTheme.js +9 -10
- package/dist/dev.d.ts +9 -0
- package/dist/dev.js +14 -0
- package/dist/editor/Editor.d.ts +3 -2
- package/dist/editor/Editor.js +11 -2
- package/dist/editor/EditorField.d.ts +2 -1
- package/dist/editor/EditorField.js +11 -29
- package/dist/editor/FormCodePanel.d.ts +7 -3
- package/dist/editor/FormCodePanel.js +14 -7
- package/dist/editor/Monaco.d.ts +14 -5
- package/dist/editor/Monaco.js +163 -112
- package/dist/editor/index.d.ts +5 -5
- package/dist/editor/index.js +3 -3
- package/dist/editor/themes.d.ts +8 -5
- package/dist/editor/themes.js +58 -30
- package/dist/editor/yaml.d.ts +6 -2
- package/dist/editor/yaml.js +11 -2
- package/dist/file-explorer/FileExplorer.js +143 -124
- package/dist/file-explorer/FileExplorerContext.js +1 -1
- package/dist/file-explorer/FilePreview/StreamedBadge.js +3 -1
- package/dist/file-explorer/FilePreview/Viewer.js +2 -2
- package/dist/file-explorer/FilePreview/index.js +4 -4
- package/dist/file-explorer/FileRow.js +1 -1
- package/dist/file-explorer/FileRowsWindow.js +34 -3
- package/dist/file-explorer/FileTable.js +3 -1
- package/dist/file-explorer/TreeView.js +37 -14
- package/dist/file-explorer/helpers.d.ts +2 -1
- package/dist/file-explorer/helpers.js +21 -20
- package/dist/file-explorer/toasts.js +27 -19
- package/dist/file-explorer/treeRows.d.ts +6 -0
- package/dist/file-explorer/treeRows.js +19 -1
- package/dist/file-explorer/useNearEnd.js +3 -6
- package/dist/form/Fields/CheckboxGroupField.js +12 -5
- package/dist/form/Fields/DurationField.js +1 -1
- package/dist/form/Fields/LabelField.js +1 -1
- package/dist/form/Fields/ObjectField.d.ts +1 -1
- package/dist/form/Fields/ObjectField.js +3 -2
- package/dist/form/Fields/StringField.js +16 -29
- package/dist/form/Fields/TextAreaField.js +3 -4
- package/dist/form/Form.js +3 -8
- package/dist/form/Wizard/WizardNavigation.js +1 -4
- package/dist/form/Wizard/WizardStepIndicator.js +1 -1
- package/dist/form/Wizard/utils.js +1 -1
- package/dist/form/fieldFrame.d.ts +1 -1
- package/dist/form/fieldFrame.js +2 -2
- package/dist/form/types/fieldComponentTypes.d.ts +2 -1
- package/dist/graph/AnnotationBanner.d.ts +1 -2
- package/dist/graph/AnnotationBanner.js +30 -32
- package/dist/graph/Connectors.js +4 -1
- package/dist/graph/DependencyGraph.js +2 -2
- package/dist/graph/GraphEditor.js +12 -10
- package/dist/graph/GraphEditorDialogs.js +2 -2
- package/dist/graph/GraphNode.js +7 -4
- package/dist/graph/InputDialog.js +1 -1
- package/dist/graph/InputsEditor.js +14 -11
- package/dist/graph/MatrixGroup.js +9 -3
- package/dist/graph/ProblemsButton.js +2 -2
- package/dist/graph/Reveal.js +18 -10
- package/dist/graph/ShortcutsButton.d.ts +11 -2
- package/dist/graph/ShortcutsButton.js +15 -4
- package/dist/graph/TreeView.js +35 -18
- package/dist/graph/WorkflowSettingsDialog.js +1 -1
- package/dist/graph/editorChrome.js +1 -1
- package/dist/graph/editorFields.js +1 -1
- package/dist/graph/editorRows.js +16 -10
- package/dist/graph/editorStrings.d.ts +7 -0
- package/dist/graph/editorStrings.js +8 -1
- package/dist/graph/fieldProblems.js +1 -1
- package/dist/graph/inputRefs.js +1 -1
- package/dist/graph/settingsViews.js +11 -18
- package/dist/graph/stepWith.js +2 -2
- package/dist/icons.d.ts +2 -0
- package/dist/icons.js +4 -2
- package/dist/index.d.ts +12 -12
- package/dist/index.js +16 -16
- package/dist/list/ActionToolbar.d.ts +44 -8
- package/dist/list/ActionToolbar.js +301 -102
- package/dist/list/ListPage.d.ts +15 -23
- package/dist/list/ListPage.js +46 -45
- package/dist/list/ListTable.d.ts +32 -7
- package/dist/list/ListTable.js +48 -12
- package/dist/list/ListViewControls.js +2 -2
- package/dist/list/UserHoverCard.js +7 -15
- package/dist/list/index.d.ts +2 -2
- package/dist/list/index.js +2 -2
- package/dist/list/listSearch.js +12 -10
- package/dist/list/listView.d.ts +10 -1
- package/dist/list/listView.js +15 -1
- package/dist/list/rowMenu.d.ts +2 -2
- package/dist/logviewer/LogViewer.d.ts +4 -2
- package/dist/logviewer/LogViewer.js +88 -70
- package/dist/logviewer/logviewer.css +3 -2
- package/dist/reducedMotion.d.ts +5 -0
- package/dist/reducedMotion.js +20 -0
- package/dist/safeUrl.d.ts +1 -1
- package/dist/safeUrl.js +4 -2
- package/dist/styles/theme.css +24 -10
- package/dist/styles.css +1 -1
- package/dist/theme/derive.d.ts +1 -1
- package/dist/theme/derive.js +46 -21
- package/dist/theme/fit.js +10 -4
- package/package.json +1 -1
- package/dist/components/Breadcrumbs.d.ts +0 -37
- package/dist/components/Breadcrumbs.js +0 -90
- package/dist/components/CopyToClipboard.d.ts +0 -17
- package/dist/components/CopyToClipboard.js +0 -66
- package/dist/components/Sort.d.ts +0 -9
- package/dist/components/Sort.js +0 -42
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
import { cx } from "../cx.js";
|
|
2
|
-
import {
|
|
2
|
+
import { buttonClasses } from "../components/buttonClasses.js";
|
|
3
|
+
import { AccessIcon, ChevronDownIcon, ChevronRightIcon, CollapseIcon, DownloadIcon, FileIcon, FileTextIcon, FolderIcon, LinkIcon, PreviewIcon, ShareIcon, TrashIcon, UploadIcon } from "../icons.js";
|
|
3
4
|
import { MenuItem, MenuPopup, MenuSeparator } from "../components/Menu.js";
|
|
4
5
|
import { safeUrl } from "../safeUrl.js";
|
|
5
|
-
import { keyedByContent } from "../components/keys.js";
|
|
6
|
-
import { buttonClasses } from "../components/buttonClasses.js";
|
|
7
6
|
import { Loader } from "../components/Loader.js";
|
|
8
7
|
import { toast } from "../components/Toast.js";
|
|
8
|
+
import { keyedByContent } from "../components/keys.js";
|
|
9
9
|
import { Tooltip } from "../components/Tooltip.js";
|
|
10
10
|
import { usePersistedState, useSlots, useStrings } from "../components/Provider.js";
|
|
11
11
|
import { useCopy } from "../components/useCopy.js";
|
|
12
12
|
import { Button } from "../components/Button.js";
|
|
13
|
+
import { Callout } from "../components/Callout.js";
|
|
14
|
+
import { InfoTip } from "../components/InfoTip.js";
|
|
13
15
|
import { ConfirmModal } from "../components/ConfirmModal.js";
|
|
14
16
|
import { useContextMenu } from "../components/ContextMenu.js";
|
|
15
|
-
import
|
|
17
|
+
import { CopyButton, CopyCodeBlock } from "../components/CopyButton.js";
|
|
16
18
|
import { CreateModal } from "../components/CreateModal.js";
|
|
17
|
-
import { InfoTip } from "../components/InfoTip.js";
|
|
18
19
|
import { useSplitter } from "../components/splitter.js";
|
|
19
20
|
import { formatBytes, formatDateTime } from "../format.js";
|
|
20
21
|
import { RelativeTime } from "../components/relativeTime.js";
|
|
21
22
|
import { RefreshButton } from "../components/RefreshButton.js";
|
|
22
23
|
import { StatusBadge } from "../components/StatusBadge.js";
|
|
23
24
|
import { Table } from "../components/Table.js";
|
|
25
|
+
import { Tabs } from "../components/Tabs.js";
|
|
24
26
|
import { ListActionsHeader, ListSkeleton, listTableFixedProps, listTableProps } from "../list/ListTable.js";
|
|
25
27
|
import { assembleRowMenu, useCopySubmenu } from "../list/rowMenu.js";
|
|
26
28
|
import { calculateUploadNodesTotalSize, createTreeBuilder, getDirectoryNameError, getDirectoryObjectPath, getNodeChildren, getObjectKeyFromNode, getParentPath, getUploadNodesFromDataTransferItems, getUriScheme, pruneNodesInsideSelectedDirectories, removeLeadingAndTrailingSlashes } from "./lib/utils.js";
|
|
@@ -42,12 +44,10 @@ import { useCallback, useEffect, useEffectEvent, useLayoutEffect, useMemo, useRe
|
|
|
42
44
|
import { DateTime } from "luxon";
|
|
43
45
|
//#region src/file-explorer/FileExplorer.tsx
|
|
44
46
|
function UriCard({ value }) {
|
|
45
|
-
const {
|
|
47
|
+
const { fileExplorer: t } = useStrings();
|
|
46
48
|
const scheme = getUriScheme(value);
|
|
47
|
-
return /* @__PURE__ */ jsxs(
|
|
48
|
-
|
|
49
|
-
showIcon: false,
|
|
50
|
-
className: "group flex items-stretch rounded-lg border theme-border bg-(--theme-input-bg) overflow-hidden cursor-copy hover:border-(--theme-link)/50 transition-colors duration-150",
|
|
49
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
50
|
+
className: "flex items-stretch overflow-hidden rounded-lg border theme-border bg-(--theme-input-bg)",
|
|
51
51
|
children: [
|
|
52
52
|
scheme && /* @__PURE__ */ jsx("span", {
|
|
53
53
|
className: "shrink-0 inline-flex items-center px-3 bg-(--theme-muted-panel-bg) border-r theme-border font-mono text-[11px] font-semibold uppercase tracking-widest theme-muted-text",
|
|
@@ -58,9 +58,11 @@ function UriCard({ value }) {
|
|
|
58
58
|
children: value
|
|
59
59
|
}),
|
|
60
60
|
/* @__PURE__ */ jsx("span", {
|
|
61
|
-
className: "shrink-0 inline-flex items-center
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
className: "shrink-0 inline-flex items-center border-l theme-border px-1.5",
|
|
62
|
+
children: /* @__PURE__ */ jsx(CopyButton, {
|
|
63
|
+
text: value,
|
|
64
|
+
"aria-label": t.preview.copyUri
|
|
65
|
+
})
|
|
64
66
|
})
|
|
65
67
|
]
|
|
66
68
|
});
|
|
@@ -320,10 +322,10 @@ function FileExplorer({ storages, onRefresh, refreshKey, onOpenFile, showUserHie
|
|
|
320
322
|
return { corsError: false };
|
|
321
323
|
} catch (error) {
|
|
322
324
|
const isCorsError = error instanceof CorsError;
|
|
323
|
-
const errorMessage =
|
|
325
|
+
const errorMessage = error instanceof Error && error.message || t.messages.unknownError;
|
|
324
326
|
if (owns()) {
|
|
325
327
|
setListings((prev) => recordListingError(options?.replace ? clearListingsUnder(prev, node.path) : prev, node.path, errorMessage));
|
|
326
|
-
updateConnectionIssuesMessage((prev) => new Map(prev).set(nodeStorageId,
|
|
328
|
+
updateConnectionIssuesMessage((prev) => new Map(prev).set(nodeStorageId, t.messages.loadFailed(node.displayName || node.name, errorMessage)));
|
|
327
329
|
if (isCorsError) setHasCorsIssue((prev) => new Map(prev).set(nodeStorageId, true));
|
|
328
330
|
}
|
|
329
331
|
return { corsError: isCorsError };
|
|
@@ -687,22 +689,30 @@ function FileExplorer({ storages, onRefresh, refreshKey, onOpenFile, showUserHie
|
|
|
687
689
|
}
|
|
688
690
|
if (chain.length === 0) return null;
|
|
689
691
|
return /* @__PURE__ */ jsx("nav", {
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
692
|
+
"aria-label": t.chrome.location,
|
|
693
|
+
className: "flex min-w-0 flex-1 overflow-hidden text-[13px]",
|
|
694
|
+
children: /* @__PURE__ */ jsx("ol", {
|
|
695
|
+
className: "flex min-w-0 items-center gap-1",
|
|
696
|
+
children: chain.map((node, i) => {
|
|
697
|
+
const isLast = i === chain.length - 1;
|
|
698
|
+
const label = node.displayName || node.name;
|
|
699
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
700
|
+
className: "flex min-w-0 items-center gap-1",
|
|
701
|
+
children: [i > 0 && /* @__PURE__ */ jsx(ChevronRightIcon, {
|
|
702
|
+
"aria-hidden": "true",
|
|
703
|
+
className: "h-3 w-3 shrink-0 text-(--theme-muted-text-color) rtl:rotate-180"
|
|
704
|
+
}), isLast ? /* @__PURE__ */ jsx("span", {
|
|
705
|
+
"aria-current": "location",
|
|
706
|
+
className: "truncate font-semibold text-(--theme-app)",
|
|
707
|
+
children: label
|
|
708
|
+
}) : /* @__PURE__ */ jsx("button", {
|
|
709
|
+
type: "button",
|
|
710
|
+
onClick: () => handleSelectTreeItem(node.path, node),
|
|
711
|
+
className: "max-w-[16rem] cursor-pointer truncate text-(--theme-muted-text-color) transition-colors hover:text-(--theme-app)",
|
|
712
|
+
children: label
|
|
713
|
+
})]
|
|
714
|
+
}, node.path);
|
|
715
|
+
})
|
|
706
716
|
})
|
|
707
717
|
});
|
|
708
718
|
};
|
|
@@ -1056,33 +1066,41 @@ function FileExplorer({ storages, onRefresh, refreshKey, onOpenFile, showUserHie
|
|
|
1056
1066
|
handleUploadInputChange(e.target.files, selectedNode);
|
|
1057
1067
|
}
|
|
1058
1068
|
}),
|
|
1059
|
-
selectedNodeCanWrite && selectedNodeCanUpload && /* @__PURE__ */ jsx(
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
+
selectedNodeCanWrite && selectedNodeCanUpload && /* @__PURE__ */ jsx(Tooltip, {
|
|
1070
|
+
content: t.createFolder.action,
|
|
1071
|
+
side: "bottom",
|
|
1072
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
1073
|
+
variant: "outline",
|
|
1074
|
+
size: "sm",
|
|
1075
|
+
"aria-label": t.createFolder.action,
|
|
1076
|
+
icon: /* @__PURE__ */ jsx(FolderIcon, {}),
|
|
1077
|
+
disabled: selectedNode.type === "file" || !selectedNode.storageId,
|
|
1078
|
+
onClick: () => setCreateFolderTarget(selectedNode),
|
|
1079
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1080
|
+
className: "hidden @4xl:inline",
|
|
1081
|
+
children: t.createFolder.action
|
|
1082
|
+
})
|
|
1069
1083
|
})
|
|
1070
1084
|
}),
|
|
1071
|
-
selectedNodeCanWrite && selectedNodeCanUpload && /* @__PURE__ */ jsxs(Menu.Root, { children: [/* @__PURE__ */
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
/* @__PURE__ */ jsx(UploadIcon, {}),
|
|
1080
|
-
/* @__PURE__ */ jsx("span", {
|
|
1081
|
-
className: "hidden @4xl:inline",
|
|
1082
|
-
children: t.chrome.upload
|
|
1085
|
+
selectedNodeCanWrite && selectedNodeCanUpload && /* @__PURE__ */ jsxs(Menu.Root, { children: [/* @__PURE__ */ jsx(Tooltip, {
|
|
1086
|
+
content: t.chrome.upload,
|
|
1087
|
+
side: "bottom",
|
|
1088
|
+
children: /* @__PURE__ */ jsxs(Menu.Trigger, {
|
|
1089
|
+
"aria-label": t.chrome.upload,
|
|
1090
|
+
className: buttonClasses({
|
|
1091
|
+
variant: selectedNode.type === "directory" ? "primary" : "outline",
|
|
1092
|
+
size: "sm"
|
|
1083
1093
|
}),
|
|
1084
|
-
|
|
1085
|
-
|
|
1094
|
+
disabled: selectedNode.type === "file" || !selectedNode.storageId,
|
|
1095
|
+
children: [
|
|
1096
|
+
/* @__PURE__ */ jsx(UploadIcon, {}),
|
|
1097
|
+
/* @__PURE__ */ jsx("span", {
|
|
1098
|
+
className: "hidden @4xl:inline",
|
|
1099
|
+
children: t.chrome.upload
|
|
1100
|
+
}),
|
|
1101
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, {})
|
|
1102
|
+
]
|
|
1103
|
+
})
|
|
1086
1104
|
}), /* @__PURE__ */ jsxs(MenuPopup, {
|
|
1087
1105
|
align: "end",
|
|
1088
1106
|
className: "w-36",
|
|
@@ -1094,21 +1112,25 @@ function FileExplorer({ storages, onRefresh, refreshKey, onOpenFile, showUserHie
|
|
|
1094
1112
|
children: t.chrome.selectFolder
|
|
1095
1113
|
})]
|
|
1096
1114
|
})] }),
|
|
1097
|
-
/* @__PURE__ */ jsxs(Menu.Root, { children: [/* @__PURE__ */
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
/* @__PURE__ */ jsx(DownloadIcon, {}),
|
|
1106
|
-
/* @__PURE__ */ jsx("span", {
|
|
1107
|
-
className: "hidden @4xl:inline",
|
|
1108
|
-
children: common.download
|
|
1115
|
+
/* @__PURE__ */ jsxs(Menu.Root, { children: [/* @__PURE__ */ jsx(Tooltip, {
|
|
1116
|
+
content: common.download,
|
|
1117
|
+
side: "bottom",
|
|
1118
|
+
children: /* @__PURE__ */ jsxs(Menu.Trigger, {
|
|
1119
|
+
"aria-label": common.download,
|
|
1120
|
+
className: buttonClasses({
|
|
1121
|
+
variant: selectedNode.type === "file" ? "primary" : "outline",
|
|
1122
|
+
size: "sm"
|
|
1109
1123
|
}),
|
|
1110
|
-
|
|
1111
|
-
|
|
1124
|
+
disabled: checkedItems.size === 0 && selectedNode.type !== "file" || hasFolderSelected() || !selectedNode.storageId,
|
|
1125
|
+
children: [
|
|
1126
|
+
/* @__PURE__ */ jsx(DownloadIcon, {}),
|
|
1127
|
+
/* @__PURE__ */ jsx("span", {
|
|
1128
|
+
className: "hidden @4xl:inline",
|
|
1129
|
+
children: common.download
|
|
1130
|
+
}),
|
|
1131
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, {})
|
|
1132
|
+
]
|
|
1133
|
+
})
|
|
1112
1134
|
}), /* @__PURE__ */ jsxs(MenuPopup, {
|
|
1113
1135
|
align: "end",
|
|
1114
1136
|
className: "w-72",
|
|
@@ -1121,7 +1143,7 @@ function FileExplorer({ storages, onRefresh, refreshKey, onOpenFile, showUserHie
|
|
|
1121
1143
|
className: "text-sm text-center pb-1.5",
|
|
1122
1144
|
children: downloadCommand.label
|
|
1123
1145
|
}), /* @__PURE__ */ jsx(CopyCodeBlock, {
|
|
1124
|
-
|
|
1146
|
+
text: downloadCommandText,
|
|
1125
1147
|
children: /* @__PURE__ */ jsx("div", {
|
|
1126
1148
|
className: "overflow-x-auto text-xs",
|
|
1127
1149
|
children: keyedByContent(downloadCommandText.split("\n"), (l) => l).map(({ key, item: line }) => /* @__PURE__ */ jsx("div", {
|
|
@@ -1132,28 +1154,37 @@ function FileExplorer({ storages, onRefresh, refreshKey, onOpenFile, showUserHie
|
|
|
1132
1154
|
})]
|
|
1133
1155
|
})] })]
|
|
1134
1156
|
})] }),
|
|
1135
|
-
groups.length > 0 && selectedNodeCanManageAccess && /* @__PURE__ */ jsx(
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1157
|
+
groups.length > 0 && selectedNodeCanManageAccess && /* @__PURE__ */ jsx(Tooltip, {
|
|
1158
|
+
content: t.chrome.manageAccess,
|
|
1159
|
+
side: "bottom",
|
|
1160
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
1161
|
+
variant: "outline",
|
|
1162
|
+
size: "sm",
|
|
1163
|
+
"aria-label": t.chrome.access,
|
|
1164
|
+
icon: /* @__PURE__ */ jsx(AccessIcon, {}),
|
|
1165
|
+
disabled: !selectedNode.storageId,
|
|
1166
|
+
onClick: () => setAccessDrawerOpen(true),
|
|
1167
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1168
|
+
className: "hidden @4xl:inline",
|
|
1169
|
+
children: t.chrome.manageAccess
|
|
1170
|
+
})
|
|
1145
1171
|
})
|
|
1146
1172
|
}),
|
|
1147
|
-
selectedNodeCanDelete && /* @__PURE__ */ jsx(
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
className: "
|
|
1156
|
-
|
|
1173
|
+
selectedNodeCanDelete && /* @__PURE__ */ jsx(Tooltip, {
|
|
1174
|
+
content: common.delete,
|
|
1175
|
+
side: "bottom",
|
|
1176
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
1177
|
+
variant: "outline",
|
|
1178
|
+
size: "sm",
|
|
1179
|
+
"aria-label": common.delete,
|
|
1180
|
+
icon: /* @__PURE__ */ jsx(TrashIcon, {}),
|
|
1181
|
+
className: "*:text-(--theme-error-text)",
|
|
1182
|
+
disabled: checkedItems.size === 0 && selectedNode.type !== "file" || !selectedNode.storageId,
|
|
1183
|
+
onClick: onDeleteClick,
|
|
1184
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1185
|
+
className: "hidden @4xl:inline",
|
|
1186
|
+
children: common.delete
|
|
1187
|
+
})
|
|
1157
1188
|
})
|
|
1158
1189
|
})
|
|
1159
1190
|
]
|
|
@@ -1202,22 +1233,20 @@ function FileExplorer({ storages, onRefresh, refreshKey, onOpenFile, showUserHie
|
|
|
1202
1233
|
const createdDt = selectedNode.created ? DateTime.fromISO(selectedNode.created) : null;
|
|
1203
1234
|
const previewable = canPreview(selectedNode);
|
|
1204
1235
|
const effectiveTab = previewable ? detailTab : "details";
|
|
1205
|
-
const tabClass = (active) => cx("mx-2.5 border-b-2 px-1 py-2.5 text-[13px] font-medium cursor-pointer transition-colors", active ? "theme-text border-(--theme-accent)" : "theme-muted-text border-transparent hover:theme-text");
|
|
1206
1236
|
return /* @__PURE__ */ jsxs("div", {
|
|
1207
1237
|
className: "flex h-full min-h-0 flex-col",
|
|
1208
|
-
children: [/* @__PURE__ */
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
})]
|
|
1238
|
+
children: [/* @__PURE__ */ jsx(Tabs, {
|
|
1239
|
+
label: selectedNode.name,
|
|
1240
|
+
items: [{
|
|
1241
|
+
value: "details",
|
|
1242
|
+
label: t.preview.detailsTab
|
|
1243
|
+
}, ...previewable ? [{
|
|
1244
|
+
value: "preview",
|
|
1245
|
+
label: t.preview.previewTab
|
|
1246
|
+
}] : []],
|
|
1247
|
+
value: effectiveTab,
|
|
1248
|
+
onValueChange: setDetailTab,
|
|
1249
|
+
className: "shrink-0 px-3"
|
|
1221
1250
|
}), effectiveTab === "preview" && previewable ? /* @__PURE__ */ jsx(FilePreviewInline, {
|
|
1222
1251
|
node: selectedNode,
|
|
1223
1252
|
storage: selectedStorage ?? null,
|
|
@@ -1274,12 +1303,12 @@ function FileExplorer({ storages, onRefresh, refreshKey, onOpenFile, showUserHie
|
|
|
1274
1303
|
node: selectedNode,
|
|
1275
1304
|
onShare: onShareFileButtonClick
|
|
1276
1305
|
}), /* @__PURE__ */ jsx(InfoTip, {
|
|
1277
|
-
text:
|
|
1306
|
+
text: t.chrome.shareHelp,
|
|
1278
1307
|
side: "right"
|
|
1279
1308
|
})]
|
|
1280
1309
|
}),
|
|
1281
1310
|
/* @__PURE__ */ jsxs("div", {
|
|
1282
|
-
className: "px-6 py-5 mt-5 border-t theme-border",
|
|
1311
|
+
className: cx("px-6 py-5", (uris.length > 0 || selectedNodeCanShare) && "mt-5 border-t theme-border"),
|
|
1283
1312
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
1284
1313
|
className: "text-[11px] font-semibold uppercase tracking-widest theme-muted-text mb-3",
|
|
1285
1314
|
children: t.chrome.details
|
|
@@ -1388,8 +1417,8 @@ function FileExplorer({ storages, onRefresh, refreshKey, onOpenFile, showUserHie
|
|
|
1388
1417
|
children: /* @__PURE__ */ jsxs("div", {
|
|
1389
1418
|
className: "text-sm flex flex-col gap-2 mt-2 text-left",
|
|
1390
1419
|
children: [
|
|
1391
|
-
/* @__PURE__ */ jsx("
|
|
1392
|
-
className: "
|
|
1420
|
+
/* @__PURE__ */ jsx("div", {
|
|
1421
|
+
className: "max-h-40 overflow-auto theme-muted-panel py-1 pl-3",
|
|
1393
1422
|
children: pendingUpload?.uploadNodes && renderUploadNodes(pendingUpload.uploadNodes)
|
|
1394
1423
|
}),
|
|
1395
1424
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
@@ -1409,26 +1438,16 @@ function FileExplorer({ storages, onRefresh, refreshKey, onOpenFile, showUserHie
|
|
|
1409
1438
|
}),
|
|
1410
1439
|
" ",
|
|
1411
1440
|
/* @__PURE__ */ jsx("span", {
|
|
1412
|
-
className: cx(isUploadSizeExceeded(pendingUpload?.totalSize ?? 0) && "text-
|
|
1441
|
+
className: cx(isUploadSizeExceeded(pendingUpload?.totalSize ?? 0) && "text-(--theme-warning-text) font-semibold"),
|
|
1413
1442
|
children: formatBytes(pendingUpload?.totalSize ?? 0)
|
|
1414
1443
|
})
|
|
1415
1444
|
]
|
|
1416
1445
|
}),
|
|
1417
|
-
isUploadSizeExceeded(pendingUpload?.totalSize ?? 0) && /* @__PURE__ */
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
className: "text-amber-800",
|
|
1423
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
1424
|
-
className: "font-semibold mb-1",
|
|
1425
|
-
children: t.confirmUpload.sizeLimitTitle
|
|
1426
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
1427
|
-
className: "text-sm",
|
|
1428
|
-
children: [/* @__PURE__ */ jsx("p", { children: t.confirmUpload.sizeLimitBody(formatBytes(pendingUpload?.totalSize ?? 0), formatBytes(MAX_UPLOAD_SIZE)) }), /* @__PURE__ */ jsx("p", { children: t.confirmUpload.sizeLimitHint })]
|
|
1429
|
-
})]
|
|
1430
|
-
})]
|
|
1431
|
-
})
|
|
1446
|
+
isUploadSizeExceeded(pendingUpload?.totalSize ?? 0) && /* @__PURE__ */ jsxs(Callout, {
|
|
1447
|
+
tone: "warning",
|
|
1448
|
+
title: t.confirmUpload.sizeLimitTitle,
|
|
1449
|
+
className: "mt-3",
|
|
1450
|
+
children: [/* @__PURE__ */ jsx("p", { children: t.confirmUpload.sizeLimitBody(formatBytes(pendingUpload?.totalSize ?? 0), formatBytes(MAX_UPLOAD_SIZE)) }), /* @__PURE__ */ jsx("p", { children: t.confirmUpload.sizeLimitHint })]
|
|
1432
1451
|
})
|
|
1433
1452
|
]
|
|
1434
1453
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { keyedByContent } from "../components/keys.js";
|
|
2
1
|
import { toast } from "../components/Toast.js";
|
|
2
|
+
import { keyedByContent } from "../components/keys.js";
|
|
3
3
|
import { useStrings } from "../components/Provider.js";
|
|
4
4
|
import { mapWithConcurrency } from "./lib/batch.js";
|
|
5
5
|
import { calculateUploadNodesTotalSize, getUploadSessionETA, removeLeadingSlash } from "./lib/utils.js";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { cx } from "../../cx.js";
|
|
1
2
|
import { LockIcon } from "../../icons.js";
|
|
3
|
+
import { toneSurface } from "../../components/tone.js";
|
|
2
4
|
import { useStrings } from "../../components/Provider.js";
|
|
3
5
|
import { InfoTip } from "../../components/InfoTip.js";
|
|
4
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -7,7 +9,7 @@ function StreamedBadge() {
|
|
|
7
9
|
const t = useStrings().fileExplorer;
|
|
8
10
|
return /* @__PURE__ */ jsxs(InfoTip, {
|
|
9
11
|
text: t.preview.streamedTooltip,
|
|
10
|
-
className: "shrink-0 gap-1 rounded-full border
|
|
12
|
+
className: cx("shrink-0 gap-1 rounded-full border px-2 py-0.5 text-[11px]", toneSurface.success),
|
|
11
13
|
children: [/* @__PURE__ */ jsx(LockIcon, { className: "h-2.5 w-2.5" }), t.preview.streamed]
|
|
12
14
|
});
|
|
13
15
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cx } from "../../cx.js";
|
|
2
2
|
import { DownloadIcon, FileIcon, LockIcon, MusicIcon, ZipIcon } from "../../icons.js";
|
|
3
|
-
import { positionKeys, withPositionKeys } from "../../components/keys.js";
|
|
4
3
|
import { Loader } from "../../components/Loader.js";
|
|
4
|
+
import { positionKeys, withPositionKeys } from "../../components/keys.js";
|
|
5
5
|
import { useStrings } from "../../components/Provider.js";
|
|
6
6
|
import { Button } from "../../components/Button.js";
|
|
7
7
|
import Markdown from "../../components/Markdown.js";
|
|
@@ -439,7 +439,7 @@ function NotebookOutputView({ output }) {
|
|
|
439
439
|
children: joinSource(output.text)
|
|
440
440
|
});
|
|
441
441
|
if (output.output_type === "error") return /* @__PURE__ */ jsx("pre", {
|
|
442
|
-
className: "mt-2 overflow-auto rounded-lg bg-
|
|
442
|
+
className: "mt-2 overflow-auto rounded-lg bg-(--theme-error-muted) px-3 py-2 font-mono text-[11px] text-(--theme-error-text)",
|
|
443
443
|
children: stripAnsi((output.traceback ?? []).join("\n"))
|
|
444
444
|
});
|
|
445
445
|
const plain = output.data?.["text/plain"];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { cx } from "../../cx.js";
|
|
2
2
|
import { ChevronLeftIcon, ChevronRightIcon, CloseIcon, DownloadIcon, FileIcon, LinkIcon, ZoomInIcon, ZoomOutIcon } from "../../icons.js";
|
|
3
3
|
import { usePersistedState, useStrings } from "../../components/Provider.js";
|
|
4
|
-
import { Modal } from "../../components/Modal.js";
|
|
5
4
|
import { IconButton } from "../../components/IconButton.js";
|
|
5
|
+
import { Modal } from "../../components/Modal.js";
|
|
6
6
|
import { formatBytes } from "../../format.js";
|
|
7
7
|
import { SegmentedControl } from "../../components/SegmentedControl.js";
|
|
8
8
|
import { getPreviewKind } from "./previewType.js";
|
|
@@ -20,7 +20,7 @@ function isDocumentView(kind) {
|
|
|
20
20
|
function FilePreview({ open, node, siblings, storage, getPresignedUrl, onNavigate, onClose, onDownload, onCopyUri }) {
|
|
21
21
|
const t = useStrings().fileExplorer;
|
|
22
22
|
const { common } = useStrings();
|
|
23
|
-
const [style, setStyle] = usePersistedState("fileExplorer.previewStyle", "
|
|
23
|
+
const [style, setStyle] = usePersistedState("fileExplorer.previewStyle", "compact");
|
|
24
24
|
const [zoom, setZoom] = useState(100);
|
|
25
25
|
const { url, loading: urlLoading, error: urlError } = usePresignedUrl(node, getPresignedUrl, {
|
|
26
26
|
enabled: open,
|
|
@@ -67,8 +67,8 @@ function FilePreview({ open, node, siblings, storage, getPresignedUrl, onNavigat
|
|
|
67
67
|
value: style,
|
|
68
68
|
onValueChange: setStyle,
|
|
69
69
|
options: [{
|
|
70
|
-
value: "
|
|
71
|
-
label: t.preview.
|
|
70
|
+
value: "compact",
|
|
71
|
+
label: t.preview.compact
|
|
72
72
|
}, {
|
|
73
73
|
value: "overlay",
|
|
74
74
|
label: t.preview.fullWindow
|
|
@@ -80,7 +80,7 @@ function FileRow({ node, icon, rowId, rowIndex, active, checked, canPreview, get
|
|
|
80
80
|
id: rowId,
|
|
81
81
|
"aria-rowindex": rowIndex,
|
|
82
82
|
"aria-selected": checked,
|
|
83
|
-
className: cx("group", checked ? "bg-
|
|
83
|
+
className: cx("group", checked ? "bg-(--theme-accent-subtle)/60" : menuActive ? "theme-hover" : "hover:theme-hover", active && "group-focus-visible/grid:ring-1 group-focus-visible/grid:ring-inset group-focus-visible/grid:ring-(--theme-link)", "cursor-pointer"),
|
|
84
84
|
onClick: handleRowClick,
|
|
85
85
|
style: { height: fileRowHeight(node) },
|
|
86
86
|
...rowContextMenuProps(openRowMenu, getItems),
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { FileIcon, FolderIcon } from "../icons.js";
|
|
2
|
+
import { isDev } from "../dev.js";
|
|
2
3
|
import { canPreview } from "./FilePreview/previewType.js";
|
|
3
4
|
import { getNodeIcon } from "./helpers.js";
|
|
4
|
-
import { FileRow } from "./FileRow.js";
|
|
5
|
+
import { FileRow, ROW_HEIGHT_TALL, isTwoLineRow } from "./FileRow.js";
|
|
5
6
|
import { LoadMoreRow } from "./LoadMoreRow.js";
|
|
6
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
import { useEffect } from "react";
|
|
@@ -73,13 +74,43 @@ function Spacer({ height }) {
|
|
|
73
74
|
/** A nested overflow container stealing the scroll leaves the virtualizer at
|
|
74
75
|
* scrollTop 0 forever, rendering only the first window. */
|
|
75
76
|
function useNestedScrollerWarning(scrollEl, count) {
|
|
76
|
-
useEffect(() => {
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
if (!isDev() || !scrollEl || count <= 100) return;
|
|
79
|
+
if (scrollEl.scrollHeight <= scrollEl.clientHeight) console.warn("FileRowsWindow: scrollEl is not scrolling — a nested overflow container likely stole it, so only the first window will ever render.");
|
|
80
|
+
}, [scrollEl, count]);
|
|
81
|
+
}
|
|
82
|
+
/** Pitch per kind, from the first adjacent same-kind pair: a mixed pair says
|
|
83
|
+
* nothing about either one. */
|
|
84
|
+
function measurePitches(rows) {
|
|
85
|
+
const pitches = /* @__PURE__ */ new Map();
|
|
86
|
+
rows.forEach((row, i) => {
|
|
87
|
+
const next = rows[i + 1];
|
|
88
|
+
if (next && next.kind === row.kind && !pitches.has(row.kind)) pitches.set(row.kind, next.top - row.top);
|
|
89
|
+
});
|
|
90
|
+
return pitches;
|
|
77
91
|
}
|
|
78
92
|
/** The constants must equal the row *pitch*, not the row's own height —
|
|
79
93
|
* under border-collapse the shared border sits between rows. A 1px error
|
|
80
94
|
* compounds to 10,000px across a 10k-row directory. */
|
|
81
95
|
function useRowPitchAudit(scrollEl, nodes, items) {
|
|
82
|
-
useEffect(() => {
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
if (!isDev() || !scrollEl || items.length < 3) return;
|
|
98
|
+
const rows = [...scrollEl.querySelectorAll("tbody tr")].filter((row) => !row.hasAttribute("aria-hidden")).map((row, i) => {
|
|
99
|
+
const node = nodes[items[i]?.index ?? -1];
|
|
100
|
+
return node ? {
|
|
101
|
+
kind: isTwoLineRow(node) ? "tall" : "short",
|
|
102
|
+
top: row.getBoundingClientRect().top
|
|
103
|
+
} : null;
|
|
104
|
+
}).filter((row) => row !== null);
|
|
105
|
+
const expected = {
|
|
106
|
+
short: 45,
|
|
107
|
+
tall: ROW_HEIGHT_TALL
|
|
108
|
+
};
|
|
109
|
+
for (const [kind, measured] of measurePitches(rows)) if (measured > 0 && Math.abs(measured - expected[kind]) > .5) {
|
|
110
|
+
const name = `ROW_HEIGHT_${kind.toUpperCase()}`;
|
|
111
|
+
console.warn(`FileRowsWindow: ${name} is ${expected[kind]} but the rendered pitch is ${measured}. Set ${name} = ${measured} in FileRow.tsx, or the scrollbar will not reach the last row.`);
|
|
112
|
+
}
|
|
113
|
+
}, [
|
|
83
114
|
scrollEl,
|
|
84
115
|
nodes,
|
|
85
116
|
items
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { cx } from "../cx.js";
|
|
2
|
+
import { useStrings } from "../components/Provider.js";
|
|
2
3
|
import { Table } from "../components/Table.js";
|
|
3
4
|
import { listTableFixedProps } from "../list/ListTable.js";
|
|
4
5
|
import { fileRowHeight } from "./FileRow.js";
|
|
@@ -16,6 +17,7 @@ function FileTable({ nodes, checkedItems, allSelected, someSelected, onSelectAll
|
|
|
16
17
|
const [activeIndex, setActiveIndex] = useState(-1);
|
|
17
18
|
const [theadHeight, setTheadHeight] = useState(0);
|
|
18
19
|
const rowIdPrefix = useId();
|
|
20
|
+
const t = useStrings().fileExplorer;
|
|
19
21
|
useLayoutEffect(() => {
|
|
20
22
|
const thead = scrollEl?.querySelector("thead");
|
|
21
23
|
if (thead instanceof HTMLElement) setTheadHeight(thead.offsetHeight);
|
|
@@ -137,7 +139,7 @@ function FileTable({ nodes, checkedItems, allSelected, someSelected, onSelectAll
|
|
|
137
139
|
wrapperClassName: "overflow-x-auto",
|
|
138
140
|
tableProps: {
|
|
139
141
|
role: "grid",
|
|
140
|
-
"aria-label":
|
|
142
|
+
"aria-label": t.chrome.files,
|
|
141
143
|
"aria-rowcount": loadMore ? -1 : nodes.length + 1,
|
|
142
144
|
"aria-multiselectable": true,
|
|
143
145
|
tabIndex: 0,
|