@tutti-os/workspace-file-manager 0.0.12 → 0.0.13
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/assets/workspace-archive-fallback.png +0 -0
- package/dist/assets/workspace-folder-fallback.png +0 -0
- package/dist/assets/workspace-image-fallback.png +0 -0
- package/dist/{chunk-CSFEGRX7.js → chunk-G2T6CZ2T.js} +18 -9
- package/dist/{chunk-CSFEGRX7.js.map → chunk-G2T6CZ2T.js.map} +1 -1
- package/dist/{chunk-L6SAJEFE.js → chunk-MDBT2GS5.js} +1 -3
- package/dist/chunk-MDBT2GS5.js.map +1 -0
- package/dist/{fileKinds-CMKjSrBx.d.ts → fileKinds-DxnVJkSm.d.ts} +1 -1
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/{index-CppyxTLd.d.ts → index-BMBoznj4.d.ts} +0 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +98 -28
- package/dist/index.js.map +1 -1
- package/dist/services/index.d.ts +5 -4
- package/dist/services/index.js +4 -2
- package/package.json +5 -5
- package/dist/chunk-L6SAJEFE.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/i18n/workspaceFileManagerI18n.ts"],"sourcesContent":["import {\n createScopedLocaleObjectsI18nModuleManifest,\n createScopedI18nRuntime,\n type I18nDictionary,\n type I18nRuntime\n} from \"@tutti-os/ui-i18n-runtime\";\n\ntype WorkspaceFileManagerI18nLocale = \"en\" | \"zh-CN\";\nexport const workspaceFileManagerI18nNamespace = \"workspaceFileManager\";\nexport const tuttiI18nModule = createScopedLocaleObjectsI18nModuleManifest({\n localeObjectByLocale: {\n en: \"workspaceFileManagerEn\",\n \"zh-CN\": \"workspaceFileManagerZhCN\"\n },\n name: \"workspace-file-manager\",\n namespace: \"workspaceFileManager\",\n sourceRoot: \"packages/workspace/file-manager/src\"\n});\n\nconst workspaceFileManagerEn = {\n backLabel: \"Back\",\n arrangeApplicationLabel: \"Application\",\n arrangeCreatedLabel: \"Created\",\n arrangeDateAddedLabel: \"Date Added\",\n arrangeKindLabel: \"Kind\",\n arrangeLastOpenedLabel: \"Last Opened\",\n arrangeMenuLabel: \"Arrange\",\n arrangeNoneLabel: \"None\",\n breadcrumbRootLabel: \"workspace\",\n cancelLabel: \"Cancel\",\n closeLabel: \"Close\",\n copyLabel: \"Copy\",\n copyPathLabel: \"Copy path\",\n copyPathSuccessTitle: \"Path copied\",\n copySuccessTitle: \"Copied to clipboard\",\n createActionLabel: \"Create\",\n createDirectoryLabel: \"New folder\",\n createDirectoryPlaceholder: \"Folder name\",\n createFileLabel: \"New file\",\n createFilePlaceholder: \"File name\",\n createNameInvalid: \"Use a valid name without path separators\",\n createNameRequired: \"Enter a name to continue\",\n deleteConfirmDescription: \"Delete {{name}} from this workspace?\",\n deleteLabel: \"Delete\",\n deletingLabel: \"Deleting...\",\n downloadFailedTitle: \"Download failed\",\n downloadLabel: \"Download\",\n dropToImportLabel: \"Drop files here to import to the current folder\",\n emptyDirectory: \"No visible files in this folder\",\n forwardLabel: \"Forward\",\n loading: \"Loading\",\n modifiedLabel: \"Modified\",\n nameLabel: \"Name\",\n noSearchResults: \"No files matched your search\",\n openFailedTitle: \"Open failed\",\n openLabel: \"Open\",\n openInAppBrowserLabel: \"Tutti built-in browser\",\n openInDefaultBrowserLabel: \"Default Browser\",\n openWithLabel: \"Open With\",\n openWithLoadingLabel: \"Loading apps...\",\n openWithOtherLabel: \"Other...\",\n openWithOtherPickerPrompt: \"Choose an application to open this file:\",\n revealInFileExplorerLabel: \"Reveal in File Explorer\",\n revealInFileManagerLabel: \"Reveal in File Manager\",\n revealInFinderLabel: \"Reveal in Finder\",\n unknownErrorMessage: \"Something went wrong. Please try again.\",\n previewBinary:\n \"This file looks binary, so the preview stays read-only for now.\",\n previewDecodeFailed:\n \"We couldn't decode this file as UTF-8 text for preview.\",\n previewDirectoryLabel: \"Folder\",\n previewEmptyLabel: \"Select a file or folder to view details\",\n previewFileTooLarge:\n \"This file is larger than {{maxSize}}, so inline preview is disabled.\",\n previewLoadingLabel: \"Loading preview...\",\n previewTooLarge:\n \"This text file is larger than {{maxSize}}, so inline preview is disabled.\",\n previewUnavailableDownloadBody:\n \"Download {{name}} to open it in another environment.\",\n previewUnavailableOpenBody: \"Open {{name}} in your local app instead.\",\n previewUnavailableTitle: \"Can't preview this file\",\n previewUnsupported: \"Inline preview isn't available for this file type yet.\",\n revealFailedTitle: \"Could not reveal in file manager\",\n renameActionLabel: \"Rename\",\n renameLabel: \"Rename\",\n renamePlaceholder: \"New name\",\n refreshLabel: \"Refresh\",\n retryLabel: \"Retry\",\n searchPlaceholder: \"Search files\",\n searchResultsLabel: \"Search results\",\n sizeLabel: \"Size\",\n unsupportedImportBody:\n \"Importing local files into the workspace is not wired up in this desktop build yet.\",\n unsupportedImportTitle: \"Import not available yet\",\n unsupportedViewBody:\n \"Opening {{name}} from the file manager is not supported in this desktop build yet.\",\n unsupportedViewTitle: \"Open not available yet\",\n importConflictDescription:\n \"{{count}} file from this import already exists in this folder tree. Replace it?\",\n importConflictReplaceLabel: \"Replace files\",\n importConflictReviewLabel: \"Existing path\",\n importConflictSummaryFiltered: \"Filtered: {{count}}\",\n importConflictSummaryIgnored: \"Ignored: {{count}}\",\n importConflictSummaryReasonIgnored: \"Ignored by rules: {{count}}\",\n importConflictSummaryReasonSymlink: \"Skipped symlinks: {{count}}\",\n importConflictSummaryReasonSystemMetadata:\n \"Skipped system metadata: {{count}}\",\n importConflictSummarySelected: \"Selected: {{count}}\",\n importConflictTitle: \"Replace existing file?\",\n importFailedTitle: \"Import failed\",\n importLabel: \"Import\",\n importTypeConflictDescription:\n \"{{count}} import path conflicts with an existing file or folder using an incompatible type. Resolve it before retrying.\",\n importTypeConflictTitle: \"Import path conflict\",\n layoutIconViewLabel: \"Icon view\",\n layoutIconViewTooltipLabel: \"Icon mode\",\n layoutListViewLabel: \"List view\",\n layoutListViewTooltipLabel: \"List mode\"\n} as const satisfies I18nDictionary;\n\nconst workspaceFileManagerZhCN = {\n backLabel: \"后退\",\n arrangeApplicationLabel: \"应用程序\",\n arrangeCreatedLabel: \"创建日期\",\n arrangeDateAddedLabel: \"添加日期\",\n arrangeKindLabel: \"种类\",\n arrangeLastOpenedLabel: \"上次打开日期\",\n arrangeMenuLabel: \"排列方式\",\n arrangeNoneLabel: \"无\",\n breadcrumbRootLabel: \"工作区\",\n cancelLabel: \"取消\",\n closeLabel: \"关闭\",\n copyLabel: \"复制\",\n copyPathLabel: \"复制路径\",\n copyPathSuccessTitle: \"复制成功\",\n copySuccessTitle: \"已复制到剪贴板\",\n createActionLabel: \"创建\",\n createDirectoryLabel: \"新建文件夹\",\n createDirectoryPlaceholder: \"文件夹名称\",\n createFileLabel: \"新建文件\",\n createFilePlaceholder: \"文件名称\",\n createNameInvalid: \"请输入有效名称,且不要包含路径分隔符\",\n createNameRequired: \"请输入名称后再继续\",\n deleteConfirmDescription: \"要从这个工作区删除 {{name}} 吗?\",\n deleteLabel: \"删除\",\n deletingLabel: \"删除中...\",\n downloadFailedTitle: \"下载失败\",\n downloadLabel: \"下载\",\n dropToImportLabel: \"将文件拖到这里以导入到当前文件夹\",\n emptyDirectory: \"这个文件夹里没有可见文件\",\n forwardLabel: \"前进\",\n loading: \"加载中\",\n modifiedLabel: \"修改时间\",\n nameLabel: \"名称\",\n noSearchResults: \"没有匹配的文件\",\n openFailedTitle: \"打开失败\",\n openLabel: \"打开\",\n openInAppBrowserLabel: \"Tutti 内置的浏览器\",\n openInDefaultBrowserLabel: \"默认浏览器\",\n openWithLabel: \"打开方式\",\n openWithLoadingLabel: \"正在加载应用...\",\n openWithOtherLabel: \"其他...\",\n openWithOtherPickerPrompt: \"选择用来打开此文件的应用程序:\",\n revealInFileExplorerLabel: \"在文件资源管理器中显示\",\n revealInFileManagerLabel: \"在文件管理器中显示\",\n revealInFinderLabel: \"在 Finder 中显示\",\n unknownErrorMessage: \"出了点问题,请稍后再试。\",\n previewBinary: \"这个文件更像二进制内容,当前先保持只读占位。\",\n previewDecodeFailed: \"暂时无法按 UTF-8 文本解码这个文件。\",\n previewDirectoryLabel: \"文件夹\",\n previewEmptyLabel: \"选择文件或文件夹查看详情\",\n previewFileTooLarge: \"这个文件超过了 {{maxSize}},暂时不做内联预览。\",\n previewLoadingLabel: \"正在加载预览...\",\n previewTooLarge: \"这个文本文件超过了 {{maxSize}},暂时不做内联预览。\",\n previewUnavailableDownloadBody: \"下载 {{name}} 后再在其他环境中打开。\",\n previewUnavailableOpenBody: \"改为在本地应用中打开 {{name}}。\",\n previewUnavailableTitle: \"这个文件暂时无法预览\",\n previewUnsupported: \"这种文件类型暂时还不支持内联预览。\",\n revealFailedTitle: \"无法在文件管理器中显示\",\n renameActionLabel: \"重命名\",\n renameLabel: \"重命名\",\n renamePlaceholder: \"新名称\",\n refreshLabel: \"刷新\",\n retryLabel: \"重试\",\n searchPlaceholder: \"搜索文件\",\n searchResultsLabel: \"搜索结果\",\n sizeLabel: \"大小\",\n unsupportedImportBody:\n \"这个桌面版本暂时还没有把本地文件导入到工作区的链路接通。\",\n unsupportedImportTitle: \"暂不支持导入\",\n unsupportedViewBody:\n \"这个桌面版本暂时还不支持直接从文件管理器打开 {{name}}。\",\n unsupportedViewTitle: \"暂不支持打开\",\n importConflictDescription:\n \"这次导入里有 {{count}} 个文件在当前目录树中已经存在。要替换吗?\",\n importConflictReplaceLabel: \"替换文件\",\n importConflictReviewLabel: \"现有路径\",\n importConflictSummaryFiltered: \"已过滤:{{count}}\",\n importConflictSummaryIgnored: \"已忽略:{{count}}\",\n importConflictSummaryReasonIgnored: \"规则忽略:{{count}}\",\n importConflictSummaryReasonSymlink: \"已跳过符号链接:{{count}}\",\n importConflictSummaryReasonSystemMetadata: \"已跳过系统元数据:{{count}}\",\n importConflictSummarySelected: \"已选择:{{count}}\",\n importConflictTitle: \"替换已有文件?\",\n importFailedTitle: \"导入失败\",\n importLabel: \"导入\",\n importTypeConflictDescription:\n \"这次导入里有 {{count}} 个路径与现有文件或文件夹的类型不兼容。请先处理后再重试。\",\n importTypeConflictTitle: \"导入路径冲突\",\n layoutIconViewLabel: \"图标\",\n layoutIconViewTooltipLabel: \"图标模式\",\n layoutListViewLabel: \"列表\",\n layoutListViewTooltipLabel: \"列表模式\"\n} as const satisfies I18nDictionary;\n\nexport type WorkspaceFileManagerI18nKey = keyof typeof workspaceFileManagerEn;\n\nexport type WorkspaceFileManagerI18nRuntime =\n I18nRuntime<WorkspaceFileManagerI18nKey>;\n\nconst workspaceFileManagerDefaults: Record<\n WorkspaceFileManagerI18nLocale,\n I18nDictionary\n> = {\n en: workspaceFileManagerEn,\n \"zh-CN\": workspaceFileManagerZhCN\n};\n\nexport const workspaceFileManagerI18nResources: Record<\n WorkspaceFileManagerI18nLocale,\n I18nDictionary\n> = {\n en: {\n [workspaceFileManagerI18nNamespace]: workspaceFileManagerDefaults.en\n },\n \"zh-CN\": {\n [workspaceFileManagerI18nNamespace]: workspaceFileManagerDefaults[\"zh-CN\"]\n }\n};\n\nexport function createWorkspaceFileManagerI18nRuntime(\n runtime: I18nRuntime<string>\n): WorkspaceFileManagerI18nRuntime {\n return createScopedI18nRuntime<WorkspaceFileManagerI18nKey>(\n runtime,\n workspaceFileManagerI18nNamespace\n );\n}\n\nexport function resolveRevealInFolderLabel(\n copy: WorkspaceFileManagerI18nRuntime,\n platform: NodeJS.Platform\n): string {\n if (platform === \"darwin\") {\n return copy.t(\"revealInFinderLabel\");\n }\n if (platform === \"win32\") {\n return copy.t(\"revealInFileExplorerLabel\");\n }\n return copy.t(\"revealInFileManagerLabel\");\n}\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AAGA,IAAM,oCAAoC;AAC1C,IAAM,kBAAkB,4CAA4C;AAAA,EACzE,sBAAsB;AAAA,IACpB,IAAI;AAAA,IACJ,SAAS;AAAA,EACX;AAAA,EACA,MAAM;AAAA,EACN,WAAW;AAAA,EACX,YAA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CAAiC,GAAG,6BAA6B,OAAO;AAAA,EAC3E;AACF;AAEO,SAAS,sCACd,SACiC;AACjC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,2BACd,MACA,UACQ;AACR,MAAI,aAAa,UAAU;AACzB,WAAO,KAAK,EAAE,qBAAqB;AAAA,EACrC;AACA,MAAI,aAAa,SAAS;AACxB,WAAO,KAAK,EAAE,2BAA2B;AAAA,EAC3C;AACA,SAAO,KAAK,EAAE,0BAA0B;AAC1C;","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as WorkspaceFileManagerI18nRuntime } from './index-
|
|
1
|
+
import { a as WorkspaceFileManagerI18nRuntime } from './index-BMBoznj4.js';
|
|
2
2
|
|
|
3
3
|
type WorkspaceFileManagerHostActionMessageStatus = "cancelled" | "completed" | "started";
|
|
4
4
|
interface WorkspaceFileManagerHostActionMessage {
|
package/dist/i18n/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { W as WorkspaceFileManagerI18nKey, a as WorkspaceFileManagerI18nRuntime, c as createWorkspaceFileManagerI18nRuntime, w as workspaceFileManagerI18nNamespace, b as workspaceFileManagerI18nResources } from '../index-
|
|
1
|
+
export { W as WorkspaceFileManagerI18nKey, a as WorkspaceFileManagerI18nRuntime, c as createWorkspaceFileManagerI18nRuntime, w as workspaceFileManagerI18nNamespace, b as workspaceFileManagerI18nResources } from '../index-BMBoznj4.js';
|
|
2
2
|
import '@tutti-os/ui-i18n-runtime';
|
package/dist/i18n/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
createWorkspaceFileManagerI18nRuntime,
|
|
3
3
|
workspaceFileManagerI18nNamespace,
|
|
4
4
|
workspaceFileManagerI18nResources
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-MDBT2GS5.js";
|
|
6
6
|
export {
|
|
7
7
|
createWorkspaceFileManagerI18nRuntime,
|
|
8
8
|
workspaceFileManagerI18nNamespace,
|
|
@@ -11,7 +11,6 @@ declare const workspaceFileManagerEn: {
|
|
|
11
11
|
readonly arrangeLastOpenedLabel: "Last Opened";
|
|
12
12
|
readonly arrangeMenuLabel: "Arrange";
|
|
13
13
|
readonly arrangeNoneLabel: "None";
|
|
14
|
-
readonly arrangeTagsLabel: "Tags";
|
|
15
14
|
readonly breadcrumbRootLabel: "workspace";
|
|
16
15
|
readonly cancelLabel: "Cancel";
|
|
17
16
|
readonly closeLabel: "Close";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { y as WorkspaceFileOpenWithApplication, b as WorkspaceFileEntry, w as WorkspaceFileManagerSession } from './fileKinds-
|
|
2
|
-
export { C as CreateWorkspaceFileManagerSessionInput, W as WorkspaceFileActivationTarget, a as WorkspaceFileDirectoryListing, c as WorkspaceFileEntryKind, d as WorkspaceFileImportConflict, e as WorkspaceFileImportSummary, f as WorkspaceFileImportSummaryReason, g as WorkspaceFileImportSummaryReasonCount, h as WorkspaceFileManagerCapabilities, i as WorkspaceFileManagerFileActivationRequest, j as WorkspaceFileManagerHost, k as WorkspaceFileManagerHostActionMessage, l as WorkspaceFileManagerHostActionMessageStatus, m as WorkspaceFileManagerHostActionResult, n as WorkspaceFileManagerHostExportResult, o as WorkspaceFileManagerHostFallbackAction, p as WorkspaceFileManagerHostFallbackActionKind, q as WorkspaceFileManagerHostFileActivationResult, r as WorkspaceFileManagerHostImportConflict, s as WorkspaceFileManagerHostImportResult, t as WorkspaceFileManagerMutationErrorMessage, u as WorkspaceFileManagerPersistedState, v as WorkspaceFileManagerService, x as WorkspaceFileManagerState, z as WorkspaceFilePreviewKind, A as WorkspaceFilePreviewState, B as WorkspaceFileSearchEntry, D as WorkspaceFileSearchResult, E as classifyWorkspaceFilePreviewKind, F as createWorkspaceFileManagerService, G as resolveWorkspaceFileActivationTarget } from './fileKinds-
|
|
3
|
-
import { a as WorkspaceFileManagerI18nRuntime } from './index-
|
|
4
|
-
export { W as WorkspaceFileManagerI18nKey, c as createWorkspaceFileManagerI18nRuntime, w as workspaceFileManagerI18nNamespace, b as workspaceFileManagerI18nResources } from './index-
|
|
1
|
+
import { y as WorkspaceFileOpenWithApplication, b as WorkspaceFileEntry, w as WorkspaceFileManagerSession } from './fileKinds-DxnVJkSm.js';
|
|
2
|
+
export { C as CreateWorkspaceFileManagerSessionInput, W as WorkspaceFileActivationTarget, a as WorkspaceFileDirectoryListing, c as WorkspaceFileEntryKind, d as WorkspaceFileImportConflict, e as WorkspaceFileImportSummary, f as WorkspaceFileImportSummaryReason, g as WorkspaceFileImportSummaryReasonCount, h as WorkspaceFileManagerCapabilities, i as WorkspaceFileManagerFileActivationRequest, j as WorkspaceFileManagerHost, k as WorkspaceFileManagerHostActionMessage, l as WorkspaceFileManagerHostActionMessageStatus, m as WorkspaceFileManagerHostActionResult, n as WorkspaceFileManagerHostExportResult, o as WorkspaceFileManagerHostFallbackAction, p as WorkspaceFileManagerHostFallbackActionKind, q as WorkspaceFileManagerHostFileActivationResult, r as WorkspaceFileManagerHostImportConflict, s as WorkspaceFileManagerHostImportResult, t as WorkspaceFileManagerMutationErrorMessage, u as WorkspaceFileManagerPersistedState, v as WorkspaceFileManagerService, x as WorkspaceFileManagerState, z as WorkspaceFilePreviewKind, A as WorkspaceFilePreviewState, B as WorkspaceFileSearchEntry, D as WorkspaceFileSearchResult, E as classifyWorkspaceFilePreviewKind, F as createWorkspaceFileManagerService, G as resolveWorkspaceFileActivationTarget } from './fileKinds-DxnVJkSm.js';
|
|
3
|
+
import { a as WorkspaceFileManagerI18nRuntime } from './index-BMBoznj4.js';
|
|
4
|
+
export { W as WorkspaceFileManagerI18nKey, c as createWorkspaceFileManagerI18nRuntime, w as workspaceFileManagerI18nNamespace, b as workspaceFileManagerI18nResources } from './index-BMBoznj4.js';
|
|
5
5
|
import { ReactElement } from 'react';
|
|
6
6
|
import { TuttiDateLocale } from '@tutti-os/ui-system/date-format';
|
|
7
7
|
export { decodeWorkspaceTextFile, isWorkspaceTextFileTooLarge, looksLikeBinaryText, resolveWorkspaceFileExtension, resolveWorkspaceImageMimeType, workspaceFilePreviewMaxBytes, workspaceFileTextMaxBytes } from '@tutti-os/workspace-file-preview';
|
package/dist/index.js
CHANGED
|
@@ -16,17 +16,18 @@ import {
|
|
|
16
16
|
resolveWorkspaceFileVisualKind,
|
|
17
17
|
resolveWorkspaceImageMimeType,
|
|
18
18
|
shouldResolveWorkspaceFileEntryIcon,
|
|
19
|
+
shouldUseWorkspaceFileArchiveIcon,
|
|
19
20
|
shouldUseWorkspaceFileExtensionDocumentIcon,
|
|
20
21
|
splitWorkspaceFileName,
|
|
21
22
|
workspaceFilePreviewMaxBytes,
|
|
22
23
|
workspaceFileTextMaxBytes
|
|
23
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-G2T6CZ2T.js";
|
|
24
25
|
import {
|
|
25
26
|
createWorkspaceFileManagerI18nRuntime,
|
|
26
27
|
resolveRevealInFolderLabel,
|
|
27
28
|
workspaceFileManagerI18nNamespace,
|
|
28
29
|
workspaceFileManagerI18nResources
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-MDBT2GS5.js";
|
|
30
31
|
|
|
31
32
|
// src/ui/WorkspaceFileManager.tsx
|
|
32
33
|
import { useEffect as useEffect5, useMemo as useMemo2, useRef as useRef5, useState as useState7 } from "react";
|
|
@@ -900,8 +901,6 @@ function importSummaryReasonCopyKey(reason) {
|
|
|
900
901
|
import {
|
|
901
902
|
FileCodeIcon as FileCodeIcon2,
|
|
902
903
|
FileTextIcon as FileTextIcon2,
|
|
903
|
-
FolderFilledIcon as FolderFilledIcon2,
|
|
904
|
-
ImageFileIcon as ImageFileIcon2,
|
|
905
904
|
LoadingIcon as LoadingIcon2,
|
|
906
905
|
ScrollArea,
|
|
907
906
|
VideoFileIcon as VideoFileIcon2,
|
|
@@ -924,20 +923,31 @@ import { useLayoutEffect as useLayoutEffect2, useRef as useRef3 } from "react";
|
|
|
924
923
|
import {
|
|
925
924
|
FileCodeIcon,
|
|
926
925
|
FileTextIcon,
|
|
927
|
-
FolderFilledIcon,
|
|
928
|
-
ImageFileIcon,
|
|
929
926
|
LoadingIcon,
|
|
930
927
|
VideoFileIcon,
|
|
931
928
|
cn as cn2
|
|
932
929
|
} from "@tutti-os/ui-system";
|
|
933
930
|
import { useEffect as useEffect2, useRef as useRef2 } from "react";
|
|
934
931
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
932
|
+
var workspaceArchiveFallbackIconUrl = new URL(
|
|
933
|
+
"../assets/workspace-archive-fallback.png",
|
|
934
|
+
import.meta.url
|
|
935
|
+
).toString();
|
|
936
|
+
var workspaceFolderFallbackIconUrl = new URL(
|
|
937
|
+
"../assets/workspace-folder-fallback.png",
|
|
938
|
+
import.meta.url
|
|
939
|
+
).toString();
|
|
940
|
+
var workspaceImageFallbackIconUrl = new URL(
|
|
941
|
+
"../assets/workspace-image-fallback.png",
|
|
942
|
+
import.meta.url
|
|
943
|
+
).toString();
|
|
935
944
|
function WorkspaceFileEntryIcon({
|
|
936
945
|
entry,
|
|
937
946
|
frameClassName,
|
|
938
947
|
iconClassName = "size-4",
|
|
939
948
|
iconUrlByCacheKey,
|
|
940
949
|
isEnteringDirectory = false,
|
|
950
|
+
loadingIconClassName,
|
|
941
951
|
onViewportLeave,
|
|
942
952
|
onViewportEnter
|
|
943
953
|
}) {
|
|
@@ -1016,13 +1026,18 @@ function WorkspaceFileEntryIcon({
|
|
|
1016
1026
|
frameClassName,
|
|
1017
1027
|
isEnteringDirectory ? "text-[var(--text-tertiary)]" : entryIconColorClassName(visualKind, isAppBundle)
|
|
1018
1028
|
),
|
|
1019
|
-
children: isEnteringDirectory ? /* @__PURE__ */ jsx2(
|
|
1029
|
+
children: isEnteringDirectory ? /* @__PURE__ */ jsx2(
|
|
1030
|
+
LoadingIcon,
|
|
1031
|
+
{
|
|
1032
|
+
className: cn2(loadingIconClassName ?? iconClassName, "animate-spin")
|
|
1033
|
+
}
|
|
1034
|
+
) : iconUrl ? /* @__PURE__ */ jsx2(
|
|
1020
1035
|
"img",
|
|
1021
1036
|
{
|
|
1022
1037
|
alt: "",
|
|
1023
1038
|
className: cn2(
|
|
1024
1039
|
iconClassName,
|
|
1025
|
-
visualKind === "image" ? "rounded-[6px] border border-[var(--border-1)] bg-[var(--transparency-block)] object-contain
|
|
1040
|
+
visualKind === "image" ? "rounded-[6px] border border-[var(--border-1)] bg-[var(--transparency-block)] object-contain" : "rounded-[4px] object-contain"
|
|
1026
1041
|
),
|
|
1027
1042
|
decoding: "async",
|
|
1028
1043
|
draggable: false,
|
|
@@ -1058,30 +1073,88 @@ function DefaultEntryIcon({
|
|
|
1058
1073
|
iconClassName,
|
|
1059
1074
|
visualKind
|
|
1060
1075
|
}) {
|
|
1076
|
+
const vectorIconClassName = vectorFallbackIconClassName(iconClassName);
|
|
1061
1077
|
if (isWorkspaceApplicationBundle(entry)) {
|
|
1062
|
-
return /* @__PURE__ */ jsx2(FileTextIcon, { className:
|
|
1078
|
+
return /* @__PURE__ */ jsx2(FileTextIcon, { className: vectorIconClassName });
|
|
1079
|
+
}
|
|
1080
|
+
if (shouldUseWorkspaceFileArchiveIcon(entry)) {
|
|
1081
|
+
return /* @__PURE__ */ jsx2(WorkspaceArchiveFallbackIcon, { className: iconClassName });
|
|
1063
1082
|
}
|
|
1064
1083
|
if (shouldUseWorkspaceFileExtensionDocumentIcon(entry)) {
|
|
1065
|
-
return /* @__PURE__ */ jsx2(
|
|
1084
|
+
return /* @__PURE__ */ jsx2(
|
|
1085
|
+
ExtensionDocumentIcon,
|
|
1086
|
+
{
|
|
1087
|
+
entry,
|
|
1088
|
+
iconClassName: vectorIconClassName
|
|
1089
|
+
}
|
|
1090
|
+
);
|
|
1066
1091
|
}
|
|
1067
1092
|
switch (visualKind) {
|
|
1068
1093
|
case "directory":
|
|
1069
|
-
return /* @__PURE__ */ jsx2(
|
|
1094
|
+
return /* @__PURE__ */ jsx2(WorkspaceFolderFallbackIcon, { className: iconClassName });
|
|
1070
1095
|
case "image":
|
|
1071
|
-
return /* @__PURE__ */ jsx2(
|
|
1096
|
+
return /* @__PURE__ */ jsx2(WorkspaceImageFallbackIcon, { className: iconClassName });
|
|
1072
1097
|
case "video":
|
|
1073
|
-
return /* @__PURE__ */ jsx2(VideoFileIcon, { className:
|
|
1098
|
+
return /* @__PURE__ */ jsx2(VideoFileIcon, { className: vectorIconClassName });
|
|
1074
1099
|
case "markdown":
|
|
1075
1100
|
case "document":
|
|
1076
|
-
return /* @__PURE__ */ jsx2(FileTextIcon, { className:
|
|
1101
|
+
return /* @__PURE__ */ jsx2(FileTextIcon, { className: vectorIconClassName });
|
|
1077
1102
|
case "code":
|
|
1078
|
-
return /* @__PURE__ */ jsx2(FileCodeIcon, { className:
|
|
1103
|
+
return /* @__PURE__ */ jsx2(FileCodeIcon, { className: vectorIconClassName });
|
|
1079
1104
|
case "binary":
|
|
1080
|
-
return /* @__PURE__ */ jsx2(FileTextIcon, { className:
|
|
1105
|
+
return /* @__PURE__ */ jsx2(FileTextIcon, { className: vectorIconClassName });
|
|
1081
1106
|
default:
|
|
1082
|
-
return /* @__PURE__ */ jsx2(FileTextIcon, { className:
|
|
1107
|
+
return /* @__PURE__ */ jsx2(FileTextIcon, { className: vectorIconClassName });
|
|
1083
1108
|
}
|
|
1084
1109
|
}
|
|
1110
|
+
function vectorFallbackIconClassName(iconClassName) {
|
|
1111
|
+
return iconClassName.includes("size-[84px]") ? "size-[64px]" : iconClassName;
|
|
1112
|
+
}
|
|
1113
|
+
function WorkspaceFolderFallbackIcon({
|
|
1114
|
+
className
|
|
1115
|
+
}) {
|
|
1116
|
+
return /* @__PURE__ */ jsx2(
|
|
1117
|
+
"img",
|
|
1118
|
+
{
|
|
1119
|
+
alt: "",
|
|
1120
|
+
"aria-hidden": "true",
|
|
1121
|
+
className: cn2("object-contain", className),
|
|
1122
|
+
decoding: "async",
|
|
1123
|
+
draggable: false,
|
|
1124
|
+
src: workspaceFolderFallbackIconUrl
|
|
1125
|
+
}
|
|
1126
|
+
);
|
|
1127
|
+
}
|
|
1128
|
+
function WorkspaceArchiveFallbackIcon({
|
|
1129
|
+
className
|
|
1130
|
+
}) {
|
|
1131
|
+
return /* @__PURE__ */ jsx2(
|
|
1132
|
+
"img",
|
|
1133
|
+
{
|
|
1134
|
+
alt: "",
|
|
1135
|
+
"aria-hidden": "true",
|
|
1136
|
+
className: cn2("object-contain", className),
|
|
1137
|
+
decoding: "async",
|
|
1138
|
+
draggable: false,
|
|
1139
|
+
src: workspaceArchiveFallbackIconUrl
|
|
1140
|
+
}
|
|
1141
|
+
);
|
|
1142
|
+
}
|
|
1143
|
+
function WorkspaceImageFallbackIcon({
|
|
1144
|
+
className
|
|
1145
|
+
}) {
|
|
1146
|
+
return /* @__PURE__ */ jsx2(
|
|
1147
|
+
"img",
|
|
1148
|
+
{
|
|
1149
|
+
alt: "",
|
|
1150
|
+
"aria-hidden": "true",
|
|
1151
|
+
className: cn2("object-contain", className),
|
|
1152
|
+
decoding: "async",
|
|
1153
|
+
draggable: false,
|
|
1154
|
+
src: workspaceImageFallbackIconUrl
|
|
1155
|
+
}
|
|
1156
|
+
);
|
|
1157
|
+
}
|
|
1085
1158
|
function ExtensionDocumentIcon({
|
|
1086
1159
|
entry,
|
|
1087
1160
|
iconClassName
|
|
@@ -1094,8 +1167,8 @@ function ExtensionDocumentIcon({
|
|
|
1094
1167
|
"aria-hidden": "true",
|
|
1095
1168
|
className: cn2("relative inline-block overflow-visible", iconClassName),
|
|
1096
1169
|
children: [
|
|
1097
|
-
/* @__PURE__ */ jsx2("span", { className: "absolute inset-[5%] rounded-[6px] border border-black/10 bg-linear-to-br from-white via-[#f8f8f8] to-[#ececec]
|
|
1098
|
-
/* @__PURE__ */ jsx2("span", { className: "absolute top-[5%] right-[5%] h-[28%] w-[28%] overflow-hidden rounded-tr-[6px]", children: /* @__PURE__ */ jsx2("span", { className: "absolute top-0 right-0 h-full w-full origin-top-right -skew-x-3 rounded-bl-[4px] border-b border-l border-black/10 bg-linear-to-br from-white to-[#d9d9d9]
|
|
1170
|
+
/* @__PURE__ */ jsx2("span", { className: "absolute inset-[5%] rounded-[6px] border border-black/10 bg-linear-to-br from-white via-[#f8f8f8] to-[#ececec]" }),
|
|
1171
|
+
/* @__PURE__ */ jsx2("span", { className: "absolute top-[5%] right-[5%] h-[28%] w-[28%] overflow-hidden rounded-tr-[6px]", children: /* @__PURE__ */ jsx2("span", { className: "absolute top-0 right-0 h-full w-full origin-top-right -skew-x-3 rounded-bl-[4px] border-b border-l border-black/10 bg-linear-to-br from-white to-[#d9d9d9]" }) }),
|
|
1099
1172
|
showExtension ? /* @__PURE__ */ jsx2("span", { className: "absolute right-[12%] bottom-[14%] left-[12%] truncate text-center text-[10px] leading-none font-semibold tracking-wide text-[#7a7a7a]", children: extension }) : null
|
|
1100
1173
|
]
|
|
1101
1174
|
}
|
|
@@ -1239,6 +1312,7 @@ function WorkspaceFileManagerIconTile({
|
|
|
1239
1312
|
iconClassName: workspaceFileManagerIconGridIconClassName(),
|
|
1240
1313
|
iconUrlByCacheKey,
|
|
1241
1314
|
isEnteringDirectory,
|
|
1315
|
+
loadingIconClassName: "size-7",
|
|
1242
1316
|
onViewportLeave: onEntryIconViewportLeave,
|
|
1243
1317
|
onViewportEnter: onEntryIconViewportEnter
|
|
1244
1318
|
}
|
|
@@ -1335,7 +1409,7 @@ function IconTileRenameInput({
|
|
|
1335
1409
|
"aria-invalid": inlineRenameValidation !== null,
|
|
1336
1410
|
"aria-label": copy.t("renameLabel"),
|
|
1337
1411
|
className: cn3(
|
|
1338
|
-
"w-full min-w-0 rounded-
|
|
1412
|
+
"w-full min-w-0 rounded-[4px] border border-transparent bg-[var(--transparency-block)] px-1 py-0.5 text-center text-xs text-[var(--text-primary)] outline-none",
|
|
1339
1413
|
inlineRenameValidation !== null && "border-[var(--state-danger)]"
|
|
1340
1414
|
),
|
|
1341
1415
|
defaultValue: entry.name,
|
|
@@ -1375,8 +1449,7 @@ var workspaceFileManagerArrangeModes = /* @__PURE__ */ new Set([
|
|
|
1375
1449
|
"dateAdded",
|
|
1376
1450
|
"modified",
|
|
1377
1451
|
"created",
|
|
1378
|
-
"size"
|
|
1379
|
-
"tags"
|
|
1452
|
+
"size"
|
|
1380
1453
|
]);
|
|
1381
1454
|
function readWorkspaceFileManagerArrangeMode() {
|
|
1382
1455
|
if (typeof window === "undefined") {
|
|
@@ -1424,8 +1497,6 @@ function sortWorkspaceFileEntriesForArrangeMode(entries, arrangeMode) {
|
|
|
1424
1497
|
return compareDateDescending(left, right, "created") || compareEntryName(left, right);
|
|
1425
1498
|
case "size":
|
|
1426
1499
|
return compareSizeDescending(left, right) || compareEntryName(left, right);
|
|
1427
|
-
case "tags":
|
|
1428
|
-
return compareDirectoryFirst(left, right) || compareEntryName(left, right);
|
|
1429
1500
|
}
|
|
1430
1501
|
});
|
|
1431
1502
|
}
|
|
@@ -2393,9 +2464,9 @@ function EntryIcon({
|
|
|
2393
2464
|
}) {
|
|
2394
2465
|
switch (visualKind) {
|
|
2395
2466
|
case "directory":
|
|
2396
|
-
return /* @__PURE__ */ jsx4(
|
|
2467
|
+
return /* @__PURE__ */ jsx4(WorkspaceFolderFallbackIcon, { className });
|
|
2397
2468
|
case "image":
|
|
2398
|
-
return /* @__PURE__ */ jsx4(
|
|
2469
|
+
return /* @__PURE__ */ jsx4(WorkspaceImageFallbackIcon, { className });
|
|
2399
2470
|
case "video":
|
|
2400
2471
|
return /* @__PURE__ */ jsx4(VideoFileIcon2, { className });
|
|
2401
2472
|
case "markdown":
|
|
@@ -2638,8 +2709,7 @@ function LayoutModeToggle({
|
|
|
2638
2709
|
{ label: copy.t("arrangeDateAddedLabel"), mode: "dateAdded" },
|
|
2639
2710
|
{ label: copy.t("modifiedLabel"), mode: "modified" },
|
|
2640
2711
|
{ label: copy.t("arrangeCreatedLabel"), mode: "created" },
|
|
2641
|
-
{ label: copy.t("sizeLabel"), mode: "size" }
|
|
2642
|
-
{ label: copy.t("arrangeTagsLabel"), mode: "tags" }
|
|
2712
|
+
{ label: copy.t("sizeLabel"), mode: "size" }
|
|
2643
2713
|
];
|
|
2644
2714
|
return /* @__PURE__ */ jsx5(TooltipProvider, { delayDuration: 300, children: /* @__PURE__ */ jsxs5(
|
|
2645
2715
|
"div",
|