@vis3/kit 1.1.11-alpha.1 → 1.1.11-alpha.3

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.
@@ -1,4 +1,7 @@
1
1
  import i18n from 'i18next';
2
- import { resources } from './locales';
2
+ import { SUPPORTED_LANGUAGES, type SupportedLanguage } from './locales';
3
+ declare const DEFAULT_NAMESPACE = "translation";
4
+ declare const FALLBACK_LANGUAGE: SupportedLanguage;
3
5
  export * from 'react-i18next';
4
- export { i18n, resources };
6
+ export type { SupportedLanguage } from './locales';
7
+ export { DEFAULT_NAMESPACE, FALLBACK_LANGUAGE, i18n, SUPPORTED_LANGUAGES };
@@ -1,3 +1,515 @@
1
- export declare const resources: Record<string, {
2
- translation: Record<string, unknown>;
3
- }>;
1
+ export declare const SUPPORTED_LANGUAGES: readonly ["zh-CN", "en-US"];
2
+ export type SupportedLanguage = (typeof SUPPORTED_LANGUAGES)[number];
3
+ export declare const resources: {
4
+ 'zh-CN': {
5
+ translation: {
6
+ cloud: string;
7
+ local: string;
8
+ demoTips: string;
9
+ localDeploy: string;
10
+ login: string;
11
+ email: string;
12
+ emailPlease: string;
13
+ emailFormatPlease: string;
14
+ passwordPlease: string;
15
+ password: string;
16
+ passwordConfirm: string;
17
+ passwordConfirmPlease: string;
18
+ passwordRepeatedUnMatch: string;
19
+ passwordCannotContainsWhitespace: string;
20
+ passwordLengthError: string;
21
+ signUp: string;
22
+ signUpSuccess: string;
23
+ signUpFailed: string;
24
+ alreadyHaveAccount: string;
25
+ openSourceToolbox: string;
26
+ documentation: string;
27
+ logout: string;
28
+ goTo: string;
29
+ toolboxWelcome: string;
30
+ tryOnline: string;
31
+ opendatalabDescription: string;
32
+ labelllmDescription: string;
33
+ minerUDescription: string;
34
+ labelUDescription: string;
35
+ status: string;
36
+ createdBy: string;
37
+ download: string;
38
+ delete: string;
39
+ deleteConfirm: string;
40
+ confirm: string;
41
+ saveUnModified: string;
42
+ saveAndExit: string;
43
+ dontSave: string;
44
+ preview: string;
45
+ exitPreview: string;
46
+ copy: string;
47
+ copied: string;
48
+ deleteAll: string;
49
+ deleteAllConfirm: string;
50
+ cancel: string;
51
+ ok: string;
52
+ noBucketFound: string;
53
+ account: {
54
+ username: string;
55
+ usernamePlaceholder: string;
56
+ usernameRequired: string;
57
+ usernameMinLength: string;
58
+ password: string;
59
+ passwordMinLength: string;
60
+ passwordPlaceholder: string;
61
+ passwordRequired: string;
62
+ passwordConfirm: string;
63
+ passwordConfirmPlaceholder: string;
64
+ passwordConfirmRequired: string;
65
+ usernameIncorrect: string;
66
+ passwordIncorrect: string;
67
+ noAccountFound: string;
68
+ loginSuccess: string;
69
+ login: string;
70
+ logout: string;
71
+ register: string;
72
+ passwordConfirmError: string;
73
+ registerSuccess: string;
74
+ registerFailed: string;
75
+ registerPlaceholder: string;
76
+ registerFormatPlaceholder: string;
77
+ registerPasswordPlaceholder: string;
78
+ registerPasswordConfirmPlaceholder: string;
79
+ registerPasswordConfirmRequired: string;
80
+ createNewAccount: string;
81
+ haveAccount: string;
82
+ loginNow: string;
83
+ };
84
+ slogan: string;
85
+ sloganDescription: string;
86
+ fileList: string;
87
+ bucketUpdated: string;
88
+ editBucket: string;
89
+ noData: string;
90
+ bucketForm: {
91
+ deleteConfirm: string;
92
+ triggerTooltipMessage: string;
93
+ addBucket: string;
94
+ addPath: string;
95
+ add: string;
96
+ save: string;
97
+ cancel: string;
98
+ pathTooltip: string;
99
+ alertMessage: string;
100
+ name: string;
101
+ namePlaceholder: string;
102
+ path: string;
103
+ remove: string;
104
+ refresh: string;
105
+ pathPlaceholder: string;
106
+ pathRequired: string;
107
+ atLeastOnePath: string;
108
+ pathAdded: string;
109
+ pathValidMessage: string;
110
+ endpoint: string;
111
+ endpointPlaceholder: string;
112
+ endpointRequired: string;
113
+ endpointAccessible: string;
114
+ endpointInvalid: string;
115
+ endpointValidMessage: string;
116
+ keychainId: string;
117
+ keychainIdRequired: string;
118
+ noPermission: string;
119
+ "AS&SKManagement": string;
120
+ pathDuplicated: string;
121
+ duplicatedPathExists: string;
122
+ };
123
+ directoryTree: {
124
+ show: string;
125
+ hide: string;
126
+ loadMore: string;
127
+ };
128
+ keychain: {
129
+ deleted: string;
130
+ updated: string;
131
+ add: string;
132
+ deleteConfirm: string;
133
+ "addAS&SKTips": string;
134
+ "noAK&SK": string;
135
+ name: string;
136
+ namePlaceholder: string;
137
+ accessKeyId: string;
138
+ accessKeyIdPlaceholder: string;
139
+ secretKeyId: string;
140
+ secretKeyIdPlaceholder: string;
141
+ added: string;
142
+ };
143
+ upload: {
144
+ upload: string;
145
+ unzipError: string;
146
+ warcError: string;
147
+ readError: string;
148
+ drag: string;
149
+ recommend: string;
150
+ deleteSuccess: string;
151
+ deleteFailed: string;
152
+ maxSize: string;
153
+ sameName: string;
154
+ success: string;
155
+ failed: string;
156
+ };
157
+ renderer: {
158
+ downloadZipFile: string;
159
+ close: string;
160
+ fileInfo: string;
161
+ fileSize: string;
162
+ author: string;
163
+ lastModified: string;
164
+ returnToParent: string;
165
+ fullscreen: string;
166
+ exitFullscreen: string;
167
+ prevPage: string;
168
+ nextPage: string;
169
+ openInNewTab: string;
170
+ downloadFile: string;
171
+ copyFullPath: string;
172
+ showDirInfo: string;
173
+ dirInfo: string;
174
+ copied: string;
175
+ iKnow: string;
176
+ addNow: string;
177
+ noPermission: string;
178
+ needPermission: string;
179
+ pathNotExist: string;
180
+ ifPathExists: string;
181
+ step1AddKey: string;
182
+ step2AddPath: string;
183
+ arrayTypeRequired: string;
184
+ confirm: string;
185
+ clear: string;
186
+ baseUrlEffect: string;
187
+ convertToFullUrl: string;
188
+ cancelLineWrap: string;
189
+ lineWrap: string;
190
+ closePreview: string;
191
+ openPreview: string;
192
+ katexDesc: string;
193
+ mathjaxDesc: string;
194
+ raw: string;
195
+ image: string;
196
+ html: string;
197
+ json: string;
198
+ markdown: string;
199
+ contentList: string;
200
+ imgList: string;
201
+ };
202
+ fullscreen: {
203
+ exitFullscreenFailed: string;
204
+ enterFullscreenFailed: string;
205
+ };
206
+ bucket: {
207
+ fileDirectory: string;
208
+ prevPage: string;
209
+ nextPage: string;
210
+ returnToParent: string;
211
+ searchPath: string;
212
+ copyPath: string;
213
+ directory: string;
214
+ pathMustStartWithS3: string;
215
+ searchPlaceholder: string;
216
+ duplicatedBuckets: string;
217
+ };
218
+ textPreviewer: {
219
+ prevSection: string;
220
+ nextSection: string;
221
+ };
222
+ codeViewer: {
223
+ unparsableData: string;
224
+ };
225
+ addFirstBucket: string;
226
+ currentSupport: string;
227
+ supportedCloudPlatforms: {
228
+ huawei: string;
229
+ tencent: string;
230
+ sensetime: string;
231
+ aws: string;
232
+ aliyun: string;
233
+ inspur: string;
234
+ microsoft: string;
235
+ };
236
+ server: {
237
+ "Request Validation Error": string;
238
+ "Invalid Request": string;
239
+ "Ping Failed": string;
240
+ "Server Error": string;
241
+ "Failed to Read File": string;
242
+ "Invalid Username": string;
243
+ "Invalid Password": string;
244
+ "Username Already Exists": string;
245
+ "Keychain Not Found": string;
246
+ "Keychain Already Exists": string;
247
+ "No Permission to Access This Keychain": string;
248
+ "No Permission to Delete This Keychain": string;
249
+ "No Permission to Update This Keychain": string;
250
+ "Object Not Found, Please Check the Path": string;
251
+ "Request Size Out of Range, Maximum Size is 40 Mb": string;
252
+ "Invalid S3 Path, Must Start with s3://": string;
253
+ "S3 Path Cannot Be Empty": string;
254
+ "Data is Empty": string;
255
+ "S3 Config File Not Found": string;
256
+ "Unknown Error": string;
257
+ };
258
+ };
259
+ };
260
+ 'en-US': {
261
+ translation: {
262
+ cloud: string;
263
+ local: string;
264
+ demoTips: string;
265
+ localDeploy: string;
266
+ email: string;
267
+ emailPlease: string;
268
+ emailFormatPlease: string;
269
+ passwordPlease: string;
270
+ password: string;
271
+ passwordConfirm: string;
272
+ passwordConfirmPlease: string;
273
+ passwordRepeatedUnMatch: string;
274
+ passwordCannotContainsWhitespace: string;
275
+ passwordLengthError: string;
276
+ signUp: string;
277
+ signUpSuccess: string;
278
+ signUpFailed: string;
279
+ alreadyHaveAccount: string;
280
+ openSourceToolbox: string;
281
+ documentation: string;
282
+ logout: string;
283
+ goTo: string;
284
+ toolboxWelcome: string;
285
+ tryOnline: string;
286
+ opendatalabDescription: string;
287
+ labelllmDescription: string;
288
+ minerUDescription: string;
289
+ labelUDescription: string;
290
+ status: string;
291
+ createdBy: string;
292
+ download: string;
293
+ delete: string;
294
+ deleteConfirm: string;
295
+ confirm: string;
296
+ saveUnModified: string;
297
+ saveAndExit: string;
298
+ dontSave: string;
299
+ preview: string;
300
+ exitPreview: string;
301
+ copy: string;
302
+ copied: string;
303
+ deleteAll: string;
304
+ deleteAllConfirm: string;
305
+ cancel: string;
306
+ ok: string;
307
+ noBucketFound: string;
308
+ account: {
309
+ username: string;
310
+ usernamePlaceholder: string;
311
+ usernameRequired: string;
312
+ usernameMinLength: string;
313
+ password: string;
314
+ passwordMinLength: string;
315
+ passwordPlaceholder: string;
316
+ passwordRequired: string;
317
+ passwordConfirm: string;
318
+ passwordConfirmPlaceholder: string;
319
+ passwordConfirmRequired: string;
320
+ usernameIncorrect: string;
321
+ passwordIncorrect: string;
322
+ noAccountFound: string;
323
+ loginSuccess: string;
324
+ login: string;
325
+ logout: string;
326
+ register: string;
327
+ passwordConfirmError: string;
328
+ registerSuccess: string;
329
+ registerFailed: string;
330
+ registerPlaceholder: string;
331
+ registerFormatPlaceholder: string;
332
+ registerPasswordPlaceholder: string;
333
+ registerPasswordConfirmPlaceholder: string;
334
+ registerPasswordConfirmRequired: string;
335
+ createNewAccount: string;
336
+ haveAccount: string;
337
+ loginNow: string;
338
+ };
339
+ slogan: string;
340
+ sloganDescription: string;
341
+ fileList: string;
342
+ bucketUpdated: string;
343
+ editBucket: string;
344
+ noData: string;
345
+ bucketForm: {
346
+ deleteConfirm: string;
347
+ triggerTooltipMessage: string;
348
+ addBucket: string;
349
+ addPath: string;
350
+ add: string;
351
+ save: string;
352
+ cancel: string;
353
+ pathTooltip: string;
354
+ alertMessage: string;
355
+ name: string;
356
+ namePlaceholder: string;
357
+ path: string;
358
+ remove: string;
359
+ refresh: string;
360
+ pathPlaceholder: string;
361
+ pathRequired: string;
362
+ atLeastOnePath: string;
363
+ pathAdded: string;
364
+ pathValidMessage: string;
365
+ endpoint: string;
366
+ endpointPlaceholder: string;
367
+ endpointRequired: string;
368
+ endpointAccessible: string;
369
+ endpointInvalid: string;
370
+ endpointValidMessage: string;
371
+ keychainId: string;
372
+ keychainIdRequired: string;
373
+ noPermission: string;
374
+ "AS&SKManagement": string;
375
+ pathDuplicated: string;
376
+ duplicatedPathExists: string;
377
+ };
378
+ directoryTree: {
379
+ show: string;
380
+ hide: string;
381
+ loadMore: string;
382
+ };
383
+ keychain: {
384
+ deleted: string;
385
+ updated: string;
386
+ add: string;
387
+ deleteConfirm: string;
388
+ "addAS&SKTips": string;
389
+ "noAK&SK": string;
390
+ name: string;
391
+ namePlaceholder: string;
392
+ accessKeyId: string;
393
+ accessKeyIdPlaceholder: string;
394
+ secretKeyId: string;
395
+ secretKeyIdPlaceholder: string;
396
+ added: string;
397
+ };
398
+ upload: {
399
+ upload: string;
400
+ unzipError: string;
401
+ warcError: string;
402
+ readError: string;
403
+ drag: string;
404
+ recommend: string;
405
+ deleteSuccess: string;
406
+ deleteFailed: string;
407
+ maxSize: string;
408
+ sameName: string;
409
+ success: string;
410
+ failed: string;
411
+ };
412
+ renderer: {
413
+ downloadZipFile: string;
414
+ close: string;
415
+ fileInfo: string;
416
+ fileSize: string;
417
+ author: string;
418
+ lastModified: string;
419
+ returnToParent: string;
420
+ prevPage: string;
421
+ nextPage: string;
422
+ openInNewTab: string;
423
+ downloadFile: string;
424
+ fullscreen: string;
425
+ exitFullscreen: string;
426
+ copyFullPath: string;
427
+ showDirInfo: string;
428
+ dirInfo: string;
429
+ copied: string;
430
+ iKnow: string;
431
+ addNow: string;
432
+ noPermission: string;
433
+ needPermission: string;
434
+ pathNotExist: string;
435
+ ifPathExists: string;
436
+ step1AddKey: string;
437
+ step2AddPath: string;
438
+ arrayTypeRequired: string;
439
+ confirm: string;
440
+ clear: string;
441
+ baseUrlEffect: string;
442
+ convertToFullUrl: string;
443
+ cancelLineWrap: string;
444
+ lineWrap: string;
445
+ closePreview: string;
446
+ openPreview: string;
447
+ katexDesc: string;
448
+ mathjaxDesc: string;
449
+ raw: string;
450
+ image: string;
451
+ html: string;
452
+ json: string;
453
+ markdown: string;
454
+ contentList: string;
455
+ imgList: string;
456
+ };
457
+ fullscreen: {
458
+ exitFullscreenFailed: string;
459
+ enterFullscreenFailed: string;
460
+ };
461
+ bucket: {
462
+ fileDirectory: string;
463
+ prevPage: string;
464
+ nextPage: string;
465
+ returnToParent: string;
466
+ searchPath: string;
467
+ copyPath: string;
468
+ directory: string;
469
+ pathMustStartWithS3: string;
470
+ searchPlaceholder: string;
471
+ duplicatedBuckets: string;
472
+ };
473
+ textPreviewer: {
474
+ prevSection: string;
475
+ nextSection: string;
476
+ };
477
+ codeViewer: {
478
+ unparsableData: string;
479
+ };
480
+ addFirstBucket: string;
481
+ currentSupport: string;
482
+ supportedCloudPlatforms: {
483
+ huawei: string;
484
+ tencent: string;
485
+ sensetime: string;
486
+ aws: string;
487
+ aliyun: string;
488
+ inspur: string;
489
+ microsoft: string;
490
+ };
491
+ server: {
492
+ "Request Validation Error": string;
493
+ "Invalid Request": string;
494
+ "Ping Failed": string;
495
+ "Server Error": string;
496
+ "Failed to Read File": string;
497
+ "Invalid Username": string;
498
+ "Invalid Password": string;
499
+ "Username Already Exists": string;
500
+ "Keychain Not Found": string;
501
+ "Keychain Already Exists": string;
502
+ "No Permission to Access This Keychain": string;
503
+ "No Permission to Delete This Keychain": string;
504
+ "No Permission to Update This Keychain": string;
505
+ "Object Not Found, Please Check the Path": string;
506
+ "Request Size Out of Range, Maximum Size is 40 Mb": string;
507
+ "Invalid S3 Path, Must Start with s3://": string;
508
+ "S3 Path Cannot Be Empty": string;
509
+ "Data is Empty": string;
510
+ "S3 Config File Not Found": string;
511
+ "Unknown Error": string;
512
+ };
513
+ };
514
+ };
515
+ };
@@ -1,10 +1,11 @@
1
1
  import React from 'react';
2
+ import { type SupportedLanguage } from './i18n';
2
3
  export type I18nProviderProps = React.PropsWithChildren<{
3
- locales?: Record<string, Record<string, unknown> & {
4
+ locales?: Partial<Record<SupportedLanguage, {
4
5
  translation: Record<string, unknown>;
5
- }>;
6
- locale?: string;
6
+ }>>;
7
+ locale?: SupportedLanguage;
7
8
  }>;
8
9
  export declare function I18nProvider(props: I18nProviderProps): import("react/jsx-runtime").JSX.Element;
9
10
  /** 用于外部改变语言 */
10
- export declare const changeLanguage: (lang: string) => void;
11
+ export declare const changeLanguage: (lang: SupportedLanguage) => void;