@tutti-os/workspace-file-manager 0.0.1

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 ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # @tutti-os/workspace-file-manager
2
+
3
+ Reusable workspace file manager service, session state, host contracts, and
4
+ optional React UI.
5
+
6
+ Hosts compose the package through `createWorkspaceFileManagerService()` and
7
+ `createSession(...)`. A session owns the shared file-manager data state, shared
8
+ interaction state, preview flow, upload flow, and activation flow for one
9
+ workspace-scoped instance.
10
+
11
+ Hosts provide backend capabilities through `WorkspaceFileManagerHost`. The
12
+ package keeps shared state in logical workspace paths such as
13
+ `/workspace/src/index.ts` and does not depend on nextopd, TSH, TACH, VM paths,
14
+ or host absolute paths.
15
+
16
+ This package is intentionally a reusable frontend workspace-domain surface, not
17
+ only a transport-agnostic data kernel. Shared session orchestration, preview
18
+ flow, upload flow, activation flow, and React-facing interaction state may live
19
+ here when they are part of the reusable file-manager experience across hosts.
20
+
21
+ The shared surface owns host-neutral file preview classification,
22
+ activation-target shaping, shared view-model derivation, and the host contract
23
+ needed to drive those flows so different hosts can integrate primarily by
24
+ implementing `WorkspaceFileManagerHost` instead of rebuilding workflow around
25
+ the shared UI.
26
+
27
+ Hosts now provide one app-level i18n runtime and scope it into the file-manager
28
+ namespace, rather than hand-assembling package-local message objects.
29
+
30
+ What stays outside this package is concrete host integration: desktop preload
31
+ calls, nextopd transport wiring, host absolute paths, and product-specific
32
+ integration details belong in the owning host adapter.
33
+
34
+ ## Host Reuse Pattern
35
+
36
+ When another host wants to reuse this package:
37
+
38
+ 1. Implement `WorkspaceFileManagerHost` in the consuming host.
39
+ 2. Keep host transport, local-file picking, and environment-specific
40
+ capabilities in that host adapter.
41
+ 3. Create one host-level i18n runtime that merges:
42
+ - host-owned product i18n resources
43
+ - `workspaceFileManagerI18nResources`
44
+ - any other shared package i18n resources needed by the same surface
45
+ 4. Scope that runtime into the file-manager namespace with
46
+ `createWorkspaceFileManagerI18nRuntime(...)`.
47
+ 5. Override wording in the host runtime when the host intentionally owns the
48
+ product phrasing; otherwise fall back to the package defaults.
49
+
50
+ This keeps the package reusable across different hosts without pushing host
51
+ transport wiring or product wording into the shared package.
@@ -0,0 +1,208 @@
1
+ // src/i18n/workspaceFileManagerI18n.ts
2
+ import {
3
+ createScopedLocaleObjectsI18nModuleManifest,
4
+ createScopedI18nRuntime
5
+ } from "@tutti-os/ui-i18n-runtime";
6
+ var workspaceFileManagerI18nNamespace = "workspaceFileManager";
7
+ var nextopI18nModule = createScopedLocaleObjectsI18nModuleManifest({
8
+ localeObjectByLocale: {
9
+ en: "workspaceFileManagerEn",
10
+ "zh-CN": "workspaceFileManagerZhCN"
11
+ },
12
+ name: "workspace-file-manager",
13
+ namespace: "workspaceFileManager",
14
+ sourceRoot: "packages/workspace/file-manager/src"
15
+ });
16
+ var workspaceFileManagerEn = {
17
+ backLabel: "Back",
18
+ breadcrumbRootLabel: "workspace",
19
+ cancelLabel: "Cancel",
20
+ closeLabel: "Close",
21
+ copyLabel: "Copy",
22
+ copyPathLabel: "Copy path",
23
+ copyPathSuccessTitle: "Path copied",
24
+ copySuccessTitle: "Copied to clipboard",
25
+ createActionLabel: "Create",
26
+ createDirectoryLabel: "New folder",
27
+ createDirectoryPlaceholder: "Folder name",
28
+ createFileLabel: "New file",
29
+ createFilePlaceholder: "File name",
30
+ createNameInvalid: "Use a valid name without path separators",
31
+ createNameRequired: "Enter a name to continue",
32
+ deleteConfirmDescription: "Delete {{name}} from this workspace?",
33
+ deleteLabel: "Delete",
34
+ deletingLabel: "Deleting...",
35
+ downloadFailedTitle: "Download failed",
36
+ downloadLabel: "Download",
37
+ dropToImportLabel: "Drop files here to import to the current folder",
38
+ emptyDirectory: "No visible files in this folder",
39
+ forwardLabel: "Forward",
40
+ loading: "Loading",
41
+ modifiedLabel: "Modified",
42
+ nameLabel: "Name",
43
+ noSearchResults: "No files matched your search",
44
+ openFailedTitle: "Open failed",
45
+ openLabel: "Open",
46
+ openInAppBrowserLabel: "Nextop built-in browser",
47
+ openInDefaultBrowserLabel: "Default Browser",
48
+ openWithLabel: "Open With",
49
+ openWithLoadingLabel: "Loading apps...",
50
+ openWithOtherLabel: "Other...",
51
+ openWithOtherPickerPrompt: "Choose an application to open this file:",
52
+ revealInFileExplorerLabel: "Reveal in File Explorer",
53
+ revealInFileManagerLabel: "Reveal in File Manager",
54
+ revealInFinderLabel: "Reveal in Finder",
55
+ unknownErrorMessage: "Something went wrong. Please try again.",
56
+ previewBinary: "This file looks binary, so the preview stays read-only for now.",
57
+ previewDecodeFailed: "We couldn't decode this file as UTF-8 text for preview.",
58
+ previewDirectoryLabel: "Folder",
59
+ previewEmptyLabel: "Select a file or folder to view details",
60
+ previewFileTooLarge: "This file is larger than {{maxSize}}, so inline preview is disabled.",
61
+ previewLoadingLabel: "Loading preview...",
62
+ previewTooLarge: "This text file is larger than {{maxSize}}, so inline preview is disabled.",
63
+ previewUnavailableDownloadBody: "Download {{name}} to open it in another environment.",
64
+ previewUnavailableOpenBody: "Open {{name}} in your local app instead.",
65
+ previewUnavailableTitle: "Can't preview this file",
66
+ previewUnsupported: "Inline preview isn't available for this file type yet.",
67
+ revealFailedTitle: "Could not reveal in file manager",
68
+ renameActionLabel: "Rename",
69
+ renameLabel: "Rename",
70
+ renamePlaceholder: "New name",
71
+ refreshLabel: "Refresh",
72
+ retryLabel: "Retry",
73
+ searchPlaceholder: "Search files",
74
+ searchResultsLabel: "Search results",
75
+ sizeLabel: "Size",
76
+ unsupportedImportBody: "Importing local files into the workspace is not wired up in this desktop build yet.",
77
+ unsupportedImportTitle: "Import not available yet",
78
+ unsupportedViewBody: "Opening {{name}} from the file manager is not supported in this desktop build yet.",
79
+ unsupportedViewTitle: "Open not available yet",
80
+ importConflictDescription: "{{count}} file from this import already exists in this folder tree. Replace it?",
81
+ importConflictReplaceLabel: "Replace files",
82
+ importConflictReviewLabel: "Existing path",
83
+ importConflictSummaryFiltered: "Filtered: {{count}}",
84
+ importConflictSummaryIgnored: "Ignored: {{count}}",
85
+ importConflictSummaryReasonIgnored: "Ignored by rules: {{count}}",
86
+ importConflictSummaryReasonSymlink: "Skipped symlinks: {{count}}",
87
+ importConflictSummaryReasonSystemMetadata: "Skipped system metadata: {{count}}",
88
+ importConflictSummarySelected: "Selected: {{count}}",
89
+ importConflictTitle: "Replace existing file?",
90
+ importFailedTitle: "Import failed",
91
+ importLabel: "Import",
92
+ importTypeConflictDescription: "{{count}} import path conflicts with an existing file or folder using an incompatible type. Resolve it before retrying.",
93
+ importTypeConflictTitle: "Import path conflict"
94
+ };
95
+ var workspaceFileManagerZhCN = {
96
+ backLabel: "\u540E\u9000",
97
+ breadcrumbRootLabel: "\u5DE5\u4F5C\u533A",
98
+ cancelLabel: "\u53D6\u6D88",
99
+ closeLabel: "\u5173\u95ED",
100
+ copyLabel: "\u590D\u5236",
101
+ copyPathLabel: "\u590D\u5236\u8DEF\u5F84",
102
+ copyPathSuccessTitle: "\u590D\u5236\u6210\u529F",
103
+ copySuccessTitle: "\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F",
104
+ createActionLabel: "\u521B\u5EFA",
105
+ createDirectoryLabel: "\u65B0\u5EFA\u6587\u4EF6\u5939",
106
+ createDirectoryPlaceholder: "\u6587\u4EF6\u5939\u540D\u79F0",
107
+ createFileLabel: "\u65B0\u5EFA\u6587\u4EF6",
108
+ createFilePlaceholder: "\u6587\u4EF6\u540D\u79F0",
109
+ createNameInvalid: "\u8BF7\u8F93\u5165\u6709\u6548\u540D\u79F0\uFF0C\u4E14\u4E0D\u8981\u5305\u542B\u8DEF\u5F84\u5206\u9694\u7B26",
110
+ createNameRequired: "\u8BF7\u8F93\u5165\u540D\u79F0\u540E\u518D\u7EE7\u7EED",
111
+ deleteConfirmDescription: "\u8981\u4ECE\u8FD9\u4E2A\u5DE5\u4F5C\u533A\u5220\u9664 {{name}} \u5417\uFF1F",
112
+ deleteLabel: "\u5220\u9664",
113
+ deletingLabel: "\u5220\u9664\u4E2D...",
114
+ downloadFailedTitle: "\u4E0B\u8F7D\u5931\u8D25",
115
+ downloadLabel: "\u4E0B\u8F7D",
116
+ dropToImportLabel: "\u5C06\u6587\u4EF6\u62D6\u5230\u8FD9\u91CC\u4EE5\u5BFC\u5165\u5230\u5F53\u524D\u6587\u4EF6\u5939",
117
+ emptyDirectory: "\u8FD9\u4E2A\u6587\u4EF6\u5939\u91CC\u6CA1\u6709\u53EF\u89C1\u6587\u4EF6",
118
+ forwardLabel: "\u524D\u8FDB",
119
+ loading: "\u52A0\u8F7D\u4E2D",
120
+ modifiedLabel: "\u4FEE\u6539\u65F6\u95F4",
121
+ nameLabel: "\u540D\u79F0",
122
+ noSearchResults: "\u6CA1\u6709\u5339\u914D\u7684\u6587\u4EF6",
123
+ openFailedTitle: "\u6253\u5F00\u5931\u8D25",
124
+ openLabel: "\u6253\u5F00",
125
+ openInAppBrowserLabel: "Nextop \u5185\u7F6E\u7684\u6D4F\u89C8\u5668",
126
+ openInDefaultBrowserLabel: "\u9ED8\u8BA4\u6D4F\u89C8\u5668",
127
+ openWithLabel: "\u6253\u5F00\u65B9\u5F0F",
128
+ openWithLoadingLabel: "\u6B63\u5728\u52A0\u8F7D\u5E94\u7528...",
129
+ openWithOtherLabel: "\u5176\u4ED6...",
130
+ openWithOtherPickerPrompt: "\u9009\u62E9\u7528\u6765\u6253\u5F00\u6B64\u6587\u4EF6\u7684\u5E94\u7528\u7A0B\u5E8F\uFF1A",
131
+ revealInFileExplorerLabel: "\u5728\u6587\u4EF6\u8D44\u6E90\u7BA1\u7406\u5668\u4E2D\u663E\u793A",
132
+ revealInFileManagerLabel: "\u5728\u6587\u4EF6\u7BA1\u7406\u5668\u4E2D\u663E\u793A",
133
+ revealInFinderLabel: "\u5728 Finder \u4E2D\u663E\u793A",
134
+ unknownErrorMessage: "\u51FA\u4E86\u70B9\u95EE\u9898\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002",
135
+ previewBinary: "\u8FD9\u4E2A\u6587\u4EF6\u66F4\u50CF\u4E8C\u8FDB\u5236\u5185\u5BB9\uFF0C\u5F53\u524D\u5148\u4FDD\u6301\u53EA\u8BFB\u5360\u4F4D\u3002",
136
+ previewDecodeFailed: "\u6682\u65F6\u65E0\u6CD5\u6309 UTF-8 \u6587\u672C\u89E3\u7801\u8FD9\u4E2A\u6587\u4EF6\u3002",
137
+ previewDirectoryLabel: "\u6587\u4EF6\u5939",
138
+ previewEmptyLabel: "\u9009\u62E9\u6587\u4EF6\u6216\u6587\u4EF6\u5939\u67E5\u770B\u8BE6\u60C5",
139
+ previewFileTooLarge: "\u8FD9\u4E2A\u6587\u4EF6\u8D85\u8FC7\u4E86 {{maxSize}}\uFF0C\u6682\u65F6\u4E0D\u505A\u5185\u8054\u9884\u89C8\u3002",
140
+ previewLoadingLabel: "\u6B63\u5728\u52A0\u8F7D\u9884\u89C8...",
141
+ previewTooLarge: "\u8FD9\u4E2A\u6587\u672C\u6587\u4EF6\u8D85\u8FC7\u4E86 {{maxSize}}\uFF0C\u6682\u65F6\u4E0D\u505A\u5185\u8054\u9884\u89C8\u3002",
142
+ previewUnavailableDownloadBody: "\u4E0B\u8F7D {{name}} \u540E\u518D\u5728\u5176\u4ED6\u73AF\u5883\u4E2D\u6253\u5F00\u3002",
143
+ previewUnavailableOpenBody: "\u6539\u4E3A\u5728\u672C\u5730\u5E94\u7528\u4E2D\u6253\u5F00 {{name}}\u3002",
144
+ previewUnavailableTitle: "\u8FD9\u4E2A\u6587\u4EF6\u6682\u65F6\u65E0\u6CD5\u9884\u89C8",
145
+ previewUnsupported: "\u8FD9\u79CD\u6587\u4EF6\u7C7B\u578B\u6682\u65F6\u8FD8\u4E0D\u652F\u6301\u5185\u8054\u9884\u89C8\u3002",
146
+ revealFailedTitle: "\u65E0\u6CD5\u5728\u6587\u4EF6\u7BA1\u7406\u5668\u4E2D\u663E\u793A",
147
+ renameActionLabel: "\u91CD\u547D\u540D",
148
+ renameLabel: "\u91CD\u547D\u540D",
149
+ renamePlaceholder: "\u65B0\u540D\u79F0",
150
+ refreshLabel: "\u5237\u65B0",
151
+ retryLabel: "\u91CD\u8BD5",
152
+ searchPlaceholder: "\u641C\u7D22\u6587\u4EF6",
153
+ searchResultsLabel: "\u641C\u7D22\u7ED3\u679C",
154
+ sizeLabel: "\u5927\u5C0F",
155
+ unsupportedImportBody: "\u8FD9\u4E2A\u684C\u9762\u7248\u672C\u6682\u65F6\u8FD8\u6CA1\u6709\u628A\u672C\u5730\u6587\u4EF6\u5BFC\u5165\u5230\u5DE5\u4F5C\u533A\u7684\u94FE\u8DEF\u63A5\u901A\u3002",
156
+ unsupportedImportTitle: "\u6682\u4E0D\u652F\u6301\u5BFC\u5165",
157
+ unsupportedViewBody: "\u8FD9\u4E2A\u684C\u9762\u7248\u672C\u6682\u65F6\u8FD8\u4E0D\u652F\u6301\u76F4\u63A5\u4ECE\u6587\u4EF6\u7BA1\u7406\u5668\u6253\u5F00 {{name}}\u3002",
158
+ unsupportedViewTitle: "\u6682\u4E0D\u652F\u6301\u6253\u5F00",
159
+ importConflictDescription: "\u8FD9\u6B21\u5BFC\u5165\u91CC\u6709 {{count}} \u4E2A\u6587\u4EF6\u5728\u5F53\u524D\u76EE\u5F55\u6811\u4E2D\u5DF2\u7ECF\u5B58\u5728\u3002\u8981\u66FF\u6362\u5417\uFF1F",
160
+ importConflictReplaceLabel: "\u66FF\u6362\u6587\u4EF6",
161
+ importConflictReviewLabel: "\u73B0\u6709\u8DEF\u5F84",
162
+ importConflictSummaryFiltered: "\u5DF2\u8FC7\u6EE4\uFF1A{{count}}",
163
+ importConflictSummaryIgnored: "\u5DF2\u5FFD\u7565\uFF1A{{count}}",
164
+ importConflictSummaryReasonIgnored: "\u89C4\u5219\u5FFD\u7565\uFF1A{{count}}",
165
+ importConflictSummaryReasonSymlink: "\u5DF2\u8DF3\u8FC7\u7B26\u53F7\u94FE\u63A5\uFF1A{{count}}",
166
+ importConflictSummaryReasonSystemMetadata: "\u5DF2\u8DF3\u8FC7\u7CFB\u7EDF\u5143\u6570\u636E\uFF1A{{count}}",
167
+ importConflictSummarySelected: "\u5DF2\u9009\u62E9\uFF1A{{count}}",
168
+ importConflictTitle: "\u66FF\u6362\u5DF2\u6709\u6587\u4EF6\uFF1F",
169
+ importFailedTitle: "\u5BFC\u5165\u5931\u8D25",
170
+ importLabel: "\u5BFC\u5165",
171
+ importTypeConflictDescription: "\u8FD9\u6B21\u5BFC\u5165\u91CC\u6709 {{count}} \u4E2A\u8DEF\u5F84\u4E0E\u73B0\u6709\u6587\u4EF6\u6216\u6587\u4EF6\u5939\u7684\u7C7B\u578B\u4E0D\u517C\u5BB9\u3002\u8BF7\u5148\u5904\u7406\u540E\u518D\u91CD\u8BD5\u3002",
172
+ importTypeConflictTitle: "\u5BFC\u5165\u8DEF\u5F84\u51B2\u7A81"
173
+ };
174
+ var workspaceFileManagerDefaults = {
175
+ en: workspaceFileManagerEn,
176
+ "zh-CN": workspaceFileManagerZhCN
177
+ };
178
+ var workspaceFileManagerI18nResources = {
179
+ en: {
180
+ [workspaceFileManagerI18nNamespace]: workspaceFileManagerDefaults.en
181
+ },
182
+ "zh-CN": {
183
+ [workspaceFileManagerI18nNamespace]: workspaceFileManagerDefaults["zh-CN"]
184
+ }
185
+ };
186
+ function createWorkspaceFileManagerI18nRuntime(runtime) {
187
+ return createScopedI18nRuntime(
188
+ runtime,
189
+ workspaceFileManagerI18nNamespace
190
+ );
191
+ }
192
+ function resolveRevealInFolderLabel(copy, platform) {
193
+ if (platform === "darwin") {
194
+ return copy.t("revealInFinderLabel");
195
+ }
196
+ if (platform === "win32") {
197
+ return copy.t("revealInFileExplorerLabel");
198
+ }
199
+ return copy.t("revealInFileManagerLabel");
200
+ }
201
+
202
+ export {
203
+ workspaceFileManagerI18nNamespace,
204
+ workspaceFileManagerI18nResources,
205
+ createWorkspaceFileManagerI18nRuntime,
206
+ resolveRevealInFolderLabel
207
+ };
208
+ //# sourceMappingURL=chunk-2AG4ND4D.js.map
@@ -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 nextopI18nModule = 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 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: \"Nextop 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} as const satisfies I18nDictionary;\n\nconst workspaceFileManagerZhCN = {\n backLabel: \"后退\",\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: \"Nextop 内置的浏览器\",\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} 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,mBAAmB,4CAA4C;AAAA,EAC1E,sBAAsB;AAAA,IACpB,IAAI;AAAA,IACJ,SAAS;AAAA,EACX;AAAA,E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