@useupup/core 3.3.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/LICENSE +21 -0
- package/NOTICE +8 -0
- package/README.md +75 -0
- package/dist/browser-SXR426OQ.cjs +10 -0
- package/dist/browser-WD6T5ABJ.js +1 -0
- package/dist/chunk-2H5ICKFT.cjs +122 -0
- package/dist/chunk-6HF3I2JS.cjs +39 -0
- package/dist/chunk-6S5DQDQH.js +212 -0
- package/dist/chunk-BMQC27OE.cjs +92 -0
- package/dist/chunk-BSGQGINR.cjs +219 -0
- package/dist/chunk-CPKZ2CXD.cjs +179 -0
- package/dist/chunk-DTKDIMKT.cjs +573 -0
- package/dist/chunk-DYE5XJ6Z.cjs +2134 -0
- package/dist/chunk-E3ZCNOXG.cjs +74 -0
- package/dist/chunk-FEQY2WYY.cjs +2377 -0
- package/dist/chunk-FMURBCZ7.js +120 -0
- package/dist/chunk-FYQQRULL.js +37 -0
- package/dist/chunk-GE4LIVXP.js +133 -0
- package/dist/chunk-HFR5HZJZ.js +56 -0
- package/dist/chunk-I7ULPCA2.js +72 -0
- package/dist/chunk-MHYXDLZR.js +569 -0
- package/dist/chunk-N2SLHVAW.cjs +61 -0
- package/dist/chunk-OOPDEOTM.js +169 -0
- package/dist/chunk-PMBR3OUW.js +2359 -0
- package/dist/chunk-QK7HZIVY.cjs +144 -0
- package/dist/chunk-T2AQHY7V.cjs +59 -0
- package/dist/chunk-TRCP5FUR.js +90 -0
- package/dist/chunk-U7KL5M2H.cjs +374 -0
- package/dist/chunk-UXNPM54W.js +2108 -0
- package/dist/chunk-VV6QCQLL.js +365 -0
- package/dist/chunk-ZMS2HXLB.js +56 -0
- package/dist/context-shapes-123dd3b6.d.cts +207 -0
- package/dist/context-shapes-27b24c8f.d.ts +207 -0
- package/dist/contracts-pipeline-cf177270.d.cts +78 -0
- package/dist/contracts-pipeline-cf177270.d.ts +78 -0
- package/dist/contracts-strategies-378a16b7.d.cts +168 -0
- package/dist/contracts-strategies-378a16b7.d.ts +168 -0
- package/dist/contracts.cjs +181 -0
- package/dist/contracts.d.cts +11 -0
- package/dist/contracts.d.ts +11 -0
- package/dist/contracts.js +4 -0
- package/dist/core-141335ac.d.ts +651 -0
- package/dist/core-bea2ceca.d.cts +651 -0
- package/dist/create-worker-provider-AA5SRII6.js +58 -0
- package/dist/create-worker-provider-KJNUSSTW.cjs +60 -0
- package/dist/eligibility-ONLNJ6FB.cjs +10 -0
- package/dist/eligibility-ULFC3E4G.js +8 -0
- package/dist/error-code-map-9c44a425.d.ts +62 -0
- package/dist/error-code-map-dd5becfa.d.cts +62 -0
- package/dist/i18n/index.cjs +90 -0
- package/dist/i18n/index.d.cts +3 -0
- package/dist/i18n/index.d.ts +3 -0
- package/dist/i18n/index.js +1 -0
- package/dist/index.cjs +1770 -0
- package/dist/index.d.cts +280 -0
- package/dist/index.d.ts +280 -0
- package/dist/index.js +1589 -0
- package/dist/internal.cjs +2407 -0
- package/dist/internal.d.cts +595 -0
- package/dist/internal.d.ts +595 -0
- package/dist/internal.js +2275 -0
- package/dist/pipeline/index.cjs +10 -0
- package/dist/pipeline/index.d.cts +11 -0
- package/dist/pipeline/index.d.ts +11 -0
- package/dist/pipeline/index.js +1 -0
- package/dist/pipeline-worker.cjs +199 -0
- package/dist/pipeline-worker.d.cts +2 -0
- package/dist/pipeline-worker.d.ts +2 -0
- package/dist/pipeline-worker.js +197 -0
- package/dist/resolve-locale-81feef21.d.ts +20 -0
- package/dist/resolve-locale-9cb63600.d.cts +20 -0
- package/dist/resolve-theme-01758105.d.ts +53 -0
- package/dist/resolve-theme-66cf8d98.d.cts +53 -0
- package/dist/server-mode-drive-controller-b5f8ee12.d.cts +180 -0
- package/dist/server-mode-drive-controller-b5f8ee12.d.ts +180 -0
- package/dist/steps/compress.cjs +66 -0
- package/dist/steps/compress.d.cts +10 -0
- package/dist/steps/compress.d.ts +10 -0
- package/dist/steps/compress.js +64 -0
- package/dist/steps/exif.cjs +44 -0
- package/dist/steps/exif.d.cts +5 -0
- package/dist/steps/exif.d.ts +5 -0
- package/dist/steps/exif.js +42 -0
- package/dist/steps/hash.cjs +44 -0
- package/dist/steps/hash.d.cts +5 -0
- package/dist/steps/hash.d.ts +5 -0
- package/dist/steps/hash.js +42 -0
- package/dist/steps/heic.cjs +59 -0
- package/dist/steps/heic.d.cts +5 -0
- package/dist/steps/heic.d.ts +5 -0
- package/dist/steps/heic.js +57 -0
- package/dist/steps/thumbnail.cjs +54 -0
- package/dist/steps/thumbnail.d.cts +10 -0
- package/dist/steps/thumbnail.d.ts +10 -0
- package/dist/steps/thumbnail.js +52 -0
- package/dist/strategies/index.cjs +82 -0
- package/dist/strategies/index.d.cts +187 -0
- package/dist/strategies/index.d.ts +187 -0
- package/dist/strategies/index.js +60 -0
- package/dist/strategies/tus-upload.cjs +14 -0
- package/dist/strategies/tus-upload.d.cts +15 -0
- package/dist/strategies/tus-upload.d.ts +15 -0
- package/dist/strategies/tus-upload.js +5 -0
- package/dist/theme/index.cjs +38 -0
- package/dist/theme/index.d.cts +3 -0
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/index.js +1 -0
- package/dist/theme-store-2e56a674.d.cts +39 -0
- package/dist/theme-store-f13e0315.d.ts +39 -0
- package/dist/token-endpoint-5fdb4a35.d.ts +20 -0
- package/dist/token-endpoint-a7d15ab6.d.cts +20 -0
- package/dist/ui-translations-c5d00392.d.cts +455 -0
- package/dist/ui-translations-c5d00392.d.ts +455 -0
- package/dist/uploader-props-72242002.d.ts +340 -0
- package/dist/uploader-props-7f956e60.d.cts +340 -0
- package/dist/vars-d3421f6c.d.cts +240 -0
- package/dist/vars-d3421f6c.d.ts +240 -0
- package/package.json +182 -0
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE locale registration list. To add a locale:
|
|
3
|
+
* 1. create ./<code>.ts exporting its bundle,
|
|
4
|
+
* 2. add the import above,
|
|
5
|
+
* 3. add the code to LOCALE_CODES AND the bundle to LOCALE_REGISTRY below,
|
|
6
|
+
* 4. add the identifier to the re-export line.
|
|
7
|
+
* The `Record<RegisteredLocaleCode, LocaleBundle>` annotation makes TS reject a
|
|
8
|
+
* code without a bundle (TS2741) or a bundle without a code (TS2353) — the
|
|
9
|
+
* missing compiler cross-check F-401 identified.
|
|
10
|
+
*/
|
|
11
|
+
declare const LOCALE_CODES: readonly ["en-US", "ar-SA", "de-DE", "es-ES", "fr-FR", "ja-JP", "ko-KR", "zh-CN", "zh-TW"];
|
|
12
|
+
type RegisteredLocaleCode = (typeof LOCALE_CODES)[number];
|
|
13
|
+
declare const LOCALE_REGISTRY: Record<RegisteredLocaleCode, LocaleBundle>;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Supported BCP 47 locale codes. Derived from the locale registry
|
|
17
|
+
* (packages/core/src/i18n/locales/registry.ts) — registering a new locale
|
|
18
|
+
* there automatically extends this union.
|
|
19
|
+
*/
|
|
20
|
+
type UpupLocaleCode = RegisteredLocaleCode | (string & {});
|
|
21
|
+
/**
|
|
22
|
+
* Metadata + messages for a locale.
|
|
23
|
+
*/
|
|
24
|
+
interface LocaleBundle {
|
|
25
|
+
/** BCP 47 locale code, e.g. "en-US" */
|
|
26
|
+
code: UpupLocaleCode;
|
|
27
|
+
/** Human-readable language name, e.g. "English" */
|
|
28
|
+
language: string;
|
|
29
|
+
/** Text direction */
|
|
30
|
+
dir: 'ltr' | 'rtl';
|
|
31
|
+
/** The message catalog */
|
|
32
|
+
messages: UpupMessages;
|
|
33
|
+
}
|
|
34
|
+
interface CommonMessages {
|
|
35
|
+
cancel: string;
|
|
36
|
+
done: string;
|
|
37
|
+
loading: string;
|
|
38
|
+
or: string;
|
|
39
|
+
}
|
|
40
|
+
interface SourceMessages {
|
|
41
|
+
myDevice: string;
|
|
42
|
+
googleDrive: string;
|
|
43
|
+
oneDrive: string;
|
|
44
|
+
dropbox: string;
|
|
45
|
+
box: string;
|
|
46
|
+
link: string;
|
|
47
|
+
camera: string;
|
|
48
|
+
audio: string;
|
|
49
|
+
screenCapture: string;
|
|
50
|
+
}
|
|
51
|
+
interface DropzoneMessages {
|
|
52
|
+
/** ICU: "{count, plural, one {Drag your file or} other {Drag your files or}}" */
|
|
53
|
+
dragFilesOr: string;
|
|
54
|
+
/** ICU: "{count, plural, one {Drag your file here} other {Drag your files here}}" */
|
|
55
|
+
dragFilesHere: string;
|
|
56
|
+
browseFiles: string;
|
|
57
|
+
dragOrBrowse: string;
|
|
58
|
+
/** Heading lead-in before the inline "browse files" link. */
|
|
59
|
+
dropFilesHere: string;
|
|
60
|
+
/** Heading tail after "browse files", introducing the source chips. */
|
|
61
|
+
orImportFrom: string;
|
|
62
|
+
selectAFolder: string;
|
|
63
|
+
/** ICU: "{count, plural, one {# file max} other {# files max}}" */
|
|
64
|
+
filesMax: string;
|
|
65
|
+
/** ICU: "{size} {unit} each" — per-file size limit caption. */
|
|
66
|
+
sizeEach: string;
|
|
67
|
+
/** ICU: "Max {size} {unit} {count, plural, one {file is allowed} other {files are allowed}}" */
|
|
68
|
+
maxFileSizeAllowed: string;
|
|
69
|
+
/** ICU: "Min {size} {unit}" */
|
|
70
|
+
minFileSizeDisplay: string;
|
|
71
|
+
/** ICU: "Allowed types: {types}" */
|
|
72
|
+
allowedFileTypes: string;
|
|
73
|
+
/** ICU: "Up to {limit, plural, one {# file} other {# files}}" */
|
|
74
|
+
maxFileCount: string;
|
|
75
|
+
/** ICU: "At least {limit, plural, one {# file required} other {# files required}}" */
|
|
76
|
+
minFileCount: string;
|
|
77
|
+
/** ICU: "Total file size exceeds the maximum of {size} {unit}" */
|
|
78
|
+
totalFileSizeExceeded: string;
|
|
79
|
+
/** ICU: "Max total size: {size} {unit}" */
|
|
80
|
+
maxTotalFileSizeDisplay: string;
|
|
81
|
+
/** ICU: "Add your documents here, you can upload up to {limit} files max" */
|
|
82
|
+
addDocumentsHere: string;
|
|
83
|
+
/** ICU: "Drop files here or click to browse" */
|
|
84
|
+
dropAriaLabel: string;
|
|
85
|
+
/** Drag-over prompt shown while a file is dragged over the panel. */
|
|
86
|
+
dropToUpload: string;
|
|
87
|
+
}
|
|
88
|
+
interface HeaderMessages {
|
|
89
|
+
removeAllFiles: string;
|
|
90
|
+
addingMoreFiles: string;
|
|
91
|
+
/** Navigation "Back" — closes the add-more source overlay. */
|
|
92
|
+
overlayBack: string;
|
|
93
|
+
/** ICU: "{count, plural, one {# file selected} other {# files selected}}" */
|
|
94
|
+
filesSelected: string;
|
|
95
|
+
addMore: string;
|
|
96
|
+
switchToListView: string;
|
|
97
|
+
switchToGridView: string;
|
|
98
|
+
/** Short label shown next to the icon on the ACTIVE view-toggle segment
|
|
99
|
+
* (the inactive segment stays icon-only). Keep it to one short word. */
|
|
100
|
+
viewGrid: string;
|
|
101
|
+
viewList: string;
|
|
102
|
+
}
|
|
103
|
+
interface FileListMessages {
|
|
104
|
+
/** ICU: "Upload {count, plural, one {# file} other {# files}}" */
|
|
105
|
+
uploadFiles: string;
|
|
106
|
+
resumeUpload: string;
|
|
107
|
+
pauseUpload: string;
|
|
108
|
+
retryUpload: string;
|
|
109
|
+
paused: string;
|
|
110
|
+
uploadProgress: string;
|
|
111
|
+
/** SR live-region announcement when an upload begins */
|
|
112
|
+
announceUploadStarted: string;
|
|
113
|
+
/** SR live-region announcement when an upload completes successfully */
|
|
114
|
+
announceUploadComplete: string;
|
|
115
|
+
/** SR live-region announcement when an upload fails */
|
|
116
|
+
announceUploadFailed: string;
|
|
117
|
+
}
|
|
118
|
+
interface FilePreviewMessages {
|
|
119
|
+
removeFile: string;
|
|
120
|
+
renameFile: string;
|
|
121
|
+
clickToPreview: string;
|
|
122
|
+
editImage: string;
|
|
123
|
+
closeEditor: string;
|
|
124
|
+
zeroBytes: string;
|
|
125
|
+
bytes: string;
|
|
126
|
+
kb: string;
|
|
127
|
+
mb: string;
|
|
128
|
+
gb: string;
|
|
129
|
+
tb: string;
|
|
130
|
+
/** ICU: "Error: {message}" */
|
|
131
|
+
previewError: string;
|
|
132
|
+
}
|
|
133
|
+
interface DriveBrowserMessages {
|
|
134
|
+
noAcceptedFilesFound: string;
|
|
135
|
+
selectThisFolder: string;
|
|
136
|
+
/** ICU: "Add {count, plural, one {# file} other {# files}}" */
|
|
137
|
+
addFiles: string;
|
|
138
|
+
logOut: string;
|
|
139
|
+
search: string;
|
|
140
|
+
/** ICU: "Authenticate with {provider} to select files for upload" */
|
|
141
|
+
authenticatePrompt: string;
|
|
142
|
+
/** ICU: "Sign in with {provider}" */
|
|
143
|
+
signInWith: string;
|
|
144
|
+
/** ICU: "Couldn't load files: {message}" */
|
|
145
|
+
loadError: string;
|
|
146
|
+
loadMore: string;
|
|
147
|
+
/** ICU: "We can't add files to your {provider}" — read-only drive-picker drop rejection. */
|
|
148
|
+
dropRejected: string;
|
|
149
|
+
}
|
|
150
|
+
interface UrlMessages {
|
|
151
|
+
enterFileUrl: string;
|
|
152
|
+
fetch: string;
|
|
153
|
+
}
|
|
154
|
+
interface CameraMessages {
|
|
155
|
+
capture: string;
|
|
156
|
+
/** ICU: "switch to {side}" */
|
|
157
|
+
switchToCamera: string;
|
|
158
|
+
addImage: string;
|
|
159
|
+
photo: string;
|
|
160
|
+
video: string;
|
|
161
|
+
startVideoRecording: string;
|
|
162
|
+
stopVideoRecording: string;
|
|
163
|
+
cameraRecording: string;
|
|
164
|
+
addVideo: string;
|
|
165
|
+
mirrorCamera: string;
|
|
166
|
+
front: string;
|
|
167
|
+
back: string;
|
|
168
|
+
}
|
|
169
|
+
interface AudioMessages {
|
|
170
|
+
startRecording: string;
|
|
171
|
+
stopRecording: string;
|
|
172
|
+
recording: string;
|
|
173
|
+
addAudio: string;
|
|
174
|
+
deleteRecording: string;
|
|
175
|
+
}
|
|
176
|
+
interface ScreenCaptureMessages {
|
|
177
|
+
startScreenCapture: string;
|
|
178
|
+
stopScreenCapture: string;
|
|
179
|
+
screenRecording: string;
|
|
180
|
+
addScreenCapture: string;
|
|
181
|
+
deleteScreenCapture: string;
|
|
182
|
+
}
|
|
183
|
+
interface BrandingMessages {
|
|
184
|
+
poweredBy: string;
|
|
185
|
+
builtBy: string;
|
|
186
|
+
}
|
|
187
|
+
interface ErrorMessages {
|
|
188
|
+
multipleFilesNotAllowed: string;
|
|
189
|
+
failedToGetUploadUrl: string;
|
|
190
|
+
/** ICU: "Status: {status} ({statusText}). Details: {details}" */
|
|
191
|
+
statusError: string;
|
|
192
|
+
/** ICU: "Network error during upload - Status: {status} ({statusText})" */
|
|
193
|
+
networkErrorDuringUpload: string;
|
|
194
|
+
/** ICU: "Missing required configuration: {missing}" */
|
|
195
|
+
missingRequiredConfiguration: string;
|
|
196
|
+
/** ICU: "Invalid provider: {provider}. Valid options: {validOptions}" */
|
|
197
|
+
invalidProvider: string;
|
|
198
|
+
/** ICU: "Invalid uploadEndpoint URL: {uploadEndpoint} {error}" */
|
|
199
|
+
invalidUploadEndpoint: string;
|
|
200
|
+
maxFileSizeMustBeGreater: string;
|
|
201
|
+
/** ICU: "Invalid accept format: {accept}. Use MIME types..." */
|
|
202
|
+
invalidAcceptFormat: string;
|
|
203
|
+
unauthorizedAccess: string;
|
|
204
|
+
presignedUrlInvalid: string;
|
|
205
|
+
temporaryCredentialsInvalid: string;
|
|
206
|
+
corsMisconfigured: string;
|
|
207
|
+
fileTooLarge: string;
|
|
208
|
+
invalidFileType: string;
|
|
209
|
+
storageQuotaExceeded: string;
|
|
210
|
+
signedUrlGenerationFailed: string;
|
|
211
|
+
/** ICU: "Upload failed with error code: {code}" */
|
|
212
|
+
uploadFailedWithCode: string;
|
|
213
|
+
/** ICU: "Upload failed: {message}" */
|
|
214
|
+
uploadFailed: string;
|
|
215
|
+
dropboxSessionExpired: string;
|
|
216
|
+
dropboxMissingPermissions: string;
|
|
217
|
+
failedToRefreshExpiredToken: string;
|
|
218
|
+
allowedLimitSurpassed: string;
|
|
219
|
+
/** ICU: "{name} has an unsupported type!" */
|
|
220
|
+
fileUnsupportedType: string;
|
|
221
|
+
/** ICU: "{name} is larger than {size} {unit}!" */
|
|
222
|
+
fileTooLargeName: string;
|
|
223
|
+
/** ICU: "{name} is smaller than {size} {unit}!" */
|
|
224
|
+
fileTooSmallName: string;
|
|
225
|
+
/** ICU: "Min {size} {unit} {count, plural, one {file is required} other {files are required}}" */
|
|
226
|
+
minFileSizeAllowed: string;
|
|
227
|
+
minFileSizeMustBeGreater: string;
|
|
228
|
+
/** ICU: "{name} has previously been selected" */
|
|
229
|
+
filePreviouslySelected: string;
|
|
230
|
+
/** ICU: "A file with this url: {url} has previously been selected" */
|
|
231
|
+
fileWithUrlPreviouslySelected: string;
|
|
232
|
+
/** ICU: "Error compressing {name}" */
|
|
233
|
+
errorCompressingFile: string;
|
|
234
|
+
/** ICU: "Error compressing image {name}" */
|
|
235
|
+
errorCompressingImage: string;
|
|
236
|
+
generatingThumbnails: string;
|
|
237
|
+
clientIdRequired: string;
|
|
238
|
+
popupBlocked: string;
|
|
239
|
+
dropboxClientIdMissing: string;
|
|
240
|
+
dropboxAuthFailed: string;
|
|
241
|
+
boxClientIdMissing: string;
|
|
242
|
+
boxAuthFailed: string;
|
|
243
|
+
boxSessionExpired: string;
|
|
244
|
+
boxNoAccessToken: string;
|
|
245
|
+
/** ICU: "Error: {details}" */
|
|
246
|
+
genericErrorDetails: string;
|
|
247
|
+
/** ICU: "Error processing files: {message}" */
|
|
248
|
+
errorProcessingFiles: string;
|
|
249
|
+
/** ICU: "Error selecting folder: {message}" */
|
|
250
|
+
errorSelectingFolder: string;
|
|
251
|
+
graphClientNotInitialized: string;
|
|
252
|
+
dropboxNoAccessToken: string;
|
|
253
|
+
/** ICU: "Silent token acquisition failed: {details}" */
|
|
254
|
+
silentTokenAcquisitionFailed: string;
|
|
255
|
+
/** ICU: "MSAL initialization failed: {details}" */
|
|
256
|
+
msalInitializationFailed: string;
|
|
257
|
+
/** ICU: "Silent token acquisition failed, proceeding with interactive login{details}" */
|
|
258
|
+
silentTokenAcquisitionProceeding: string;
|
|
259
|
+
/** ICU: "Sign-in failed: {message}" */
|
|
260
|
+
signInFailed: string;
|
|
261
|
+
/** ICU: "Handle sign-in failed: {message}" */
|
|
262
|
+
handleSignInFailed: string;
|
|
263
|
+
/** ICU: "Sign-out failed: {message}" */
|
|
264
|
+
signOutFailed: string;
|
|
265
|
+
imageEditorFailed: string;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Complete namespaced message catalog.
|
|
269
|
+
* All values use ICU MessageFormat syntax.
|
|
270
|
+
*/
|
|
271
|
+
interface UpupMessages {
|
|
272
|
+
common: CommonMessages;
|
|
273
|
+
sources: SourceMessages;
|
|
274
|
+
dropzone: DropzoneMessages;
|
|
275
|
+
header: HeaderMessages;
|
|
276
|
+
fileList: FileListMessages;
|
|
277
|
+
filePreview: FilePreviewMessages;
|
|
278
|
+
driveBrowser: DriveBrowserMessages;
|
|
279
|
+
url: UrlMessages;
|
|
280
|
+
camera: CameraMessages;
|
|
281
|
+
audio: AudioMessages;
|
|
282
|
+
screenCapture: ScreenCaptureMessages;
|
|
283
|
+
branding: BrandingMessages;
|
|
284
|
+
errors: ErrorMessages;
|
|
285
|
+
}
|
|
286
|
+
/** Namespace names */
|
|
287
|
+
type MessageNamespace = keyof UpupMessages;
|
|
288
|
+
/**
|
|
289
|
+
* Dot-notation key type: "common.cancel" | "errors.uploadFailed" | ...
|
|
290
|
+
*/
|
|
291
|
+
type FlatMessageKey = {
|
|
292
|
+
[NS in keyof UpupMessages]: `${NS & string}.${keyof UpupMessages[NS] & string}`;
|
|
293
|
+
}[keyof UpupMessages];
|
|
294
|
+
/**
|
|
295
|
+
* Deep partial override type for user-provided translation patches.
|
|
296
|
+
*/
|
|
297
|
+
type PartialMessages = {
|
|
298
|
+
[NS in keyof UpupMessages]?: Partial<UpupMessages[NS]>;
|
|
299
|
+
};
|
|
300
|
+
/**
|
|
301
|
+
* The translator function returned by `createTranslator()`.
|
|
302
|
+
* Call as `t('namespace.key', { values })` to format a message.
|
|
303
|
+
*/
|
|
304
|
+
interface Translator {
|
|
305
|
+
(key: FlatMessageKey, values?: Record<string, unknown>): string;
|
|
306
|
+
/** Current BCP 47 locale code */
|
|
307
|
+
readonly locale: string;
|
|
308
|
+
/** Text direction for the current locale */
|
|
309
|
+
readonly dir: 'ltr' | 'rtl';
|
|
310
|
+
/** Switch locale at runtime (only available if loadLocale was provided) */
|
|
311
|
+
setLocale?: ((code: string) => Promise<void>) | undefined;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Flat UI messages consumed by the React renderer.
|
|
316
|
+
*
|
|
317
|
+
* Core owns this bridge because the message catalog and ICU translator live in
|
|
318
|
+
* core. React should render these resolved labels, not maintain a parallel i18n
|
|
319
|
+
* runtime.
|
|
320
|
+
*/
|
|
321
|
+
type UiTranslations = {
|
|
322
|
+
cancel: string;
|
|
323
|
+
done: string;
|
|
324
|
+
loading: string;
|
|
325
|
+
myDevice: string;
|
|
326
|
+
googleDrive: string;
|
|
327
|
+
oneDrive: string;
|
|
328
|
+
dropbox: string;
|
|
329
|
+
box: string;
|
|
330
|
+
link: string;
|
|
331
|
+
camera: string;
|
|
332
|
+
audio: string;
|
|
333
|
+
screenCapture: string;
|
|
334
|
+
dragFileOr: string;
|
|
335
|
+
dragFilesOr: string;
|
|
336
|
+
browseFiles: string;
|
|
337
|
+
dropFilesHere: string;
|
|
338
|
+
orImportFrom: string;
|
|
339
|
+
or: string;
|
|
340
|
+
selectAFolder: string;
|
|
341
|
+
maxFileSizeAllowed_one: string;
|
|
342
|
+
maxFileSizeAllowed_other: string;
|
|
343
|
+
filesMax_one: string;
|
|
344
|
+
filesMax_other: string;
|
|
345
|
+
sizeEach: string;
|
|
346
|
+
addDocumentsHere: string;
|
|
347
|
+
dropToUpload: string;
|
|
348
|
+
builtBy: string;
|
|
349
|
+
removeAllFiles: string;
|
|
350
|
+
addingMoreFiles: string;
|
|
351
|
+
overlayBack: string;
|
|
352
|
+
filesSelected_one: string;
|
|
353
|
+
filesSelected_other: string;
|
|
354
|
+
addMore: string;
|
|
355
|
+
switchToListView: string;
|
|
356
|
+
switchToGridView: string;
|
|
357
|
+
viewGrid: string;
|
|
358
|
+
viewList: string;
|
|
359
|
+
dropzoneLabel: string;
|
|
360
|
+
uploadFiles_one: string;
|
|
361
|
+
uploadFiles_other: string;
|
|
362
|
+
resumeUpload: string;
|
|
363
|
+
retryUpload: string;
|
|
364
|
+
pauseUpload: string;
|
|
365
|
+
paused: string;
|
|
366
|
+
uploadProgress: string;
|
|
367
|
+
announceUploadStarted: string;
|
|
368
|
+
announceUploadComplete: string;
|
|
369
|
+
announceUploadFailed: string;
|
|
370
|
+
removeFile: string;
|
|
371
|
+
clickToPreview: string;
|
|
372
|
+
editImage: string;
|
|
373
|
+
closeEditor: string;
|
|
374
|
+
zeroBytes: string;
|
|
375
|
+
bytes: string;
|
|
376
|
+
kb: string;
|
|
377
|
+
mb: string;
|
|
378
|
+
gb: string;
|
|
379
|
+
tb: string;
|
|
380
|
+
previewError: string;
|
|
381
|
+
noAcceptedFilesFound: string;
|
|
382
|
+
selectThisFolder: string;
|
|
383
|
+
addFiles_one: string;
|
|
384
|
+
addFiles_other: string;
|
|
385
|
+
logOut: string;
|
|
386
|
+
search: string;
|
|
387
|
+
authenticatePrompt: string;
|
|
388
|
+
signInWith: string;
|
|
389
|
+
driveLoadError: string;
|
|
390
|
+
dropRejected: string;
|
|
391
|
+
loadMore: string;
|
|
392
|
+
enterFileUrl: string;
|
|
393
|
+
fetch: string;
|
|
394
|
+
capture: string;
|
|
395
|
+
switchToCamera: string;
|
|
396
|
+
addImage: string;
|
|
397
|
+
front: string;
|
|
398
|
+
back: string;
|
|
399
|
+
poweredBy: string;
|
|
400
|
+
multipleFilesNotAllowed: string;
|
|
401
|
+
failedToGetUploadUrl: string;
|
|
402
|
+
statusError: string;
|
|
403
|
+
networkErrorDuringUpload: string;
|
|
404
|
+
missingRequiredConfiguration: string;
|
|
405
|
+
invalidProvider: string;
|
|
406
|
+
invalidUploadEndpoint: string;
|
|
407
|
+
maxFileSizeMustBeGreater: string;
|
|
408
|
+
invalidAcceptFormat: string;
|
|
409
|
+
unauthorizedAccess: string;
|
|
410
|
+
presignedUrlInvalid: string;
|
|
411
|
+
temporaryCredentialsInvalid: string;
|
|
412
|
+
corsMisconfigured: string;
|
|
413
|
+
fileTooLarge: string;
|
|
414
|
+
invalidFileType: string;
|
|
415
|
+
storageQuotaExceeded: string;
|
|
416
|
+
signedUrlGenerationFailed: string;
|
|
417
|
+
uploadFailedWithCode: string;
|
|
418
|
+
uploadFailed: string;
|
|
419
|
+
dropboxSessionExpired: string;
|
|
420
|
+
dropboxMissingPermissions: string;
|
|
421
|
+
failedToRefreshExpiredToken: string;
|
|
422
|
+
allowedLimitSurpassed: string;
|
|
423
|
+
fileUnsupportedType: string;
|
|
424
|
+
fileTooLargeName: string;
|
|
425
|
+
fileTooSmallName: string;
|
|
426
|
+
filePreviouslySelected: string;
|
|
427
|
+
fileWithUrlPreviouslySelected: string;
|
|
428
|
+
errorCompressingFile: string;
|
|
429
|
+
clientIdRequired: string;
|
|
430
|
+
popupBlocked: string;
|
|
431
|
+
dropboxClientIdMissing: string;
|
|
432
|
+
dropboxAuthFailed: string;
|
|
433
|
+
boxClientIdMissing: string;
|
|
434
|
+
boxAuthFailed: string;
|
|
435
|
+
boxSessionExpired: string;
|
|
436
|
+
boxNoAccessToken: string;
|
|
437
|
+
genericErrorDetails: string;
|
|
438
|
+
errorProcessingFiles: string;
|
|
439
|
+
errorSelectingFolder: string;
|
|
440
|
+
graphClientNotInitialized: string;
|
|
441
|
+
dropboxNoAccessToken: string;
|
|
442
|
+
silentTokenAcquisitionFailed: string;
|
|
443
|
+
msalInitializationFailed: string;
|
|
444
|
+
silentTokenAcquisitionProceeding: string;
|
|
445
|
+
signInFailed: string;
|
|
446
|
+
handleSignInFailed: string;
|
|
447
|
+
signOutFailed: string;
|
|
448
|
+
};
|
|
449
|
+
/** Compatibility alias for older internal names. */
|
|
450
|
+
type Translations = UiTranslations;
|
|
451
|
+
declare function formatUiMessage(template: string, values?: Record<string, string | number>): string;
|
|
452
|
+
declare function pluralUiMessage(translations: UiTranslations, baseKey: string, count: number, locale?: string): string;
|
|
453
|
+
declare function flattenTranslatorToUiTranslations(translator: Translator): UiTranslations;
|
|
454
|
+
|
|
455
|
+
export { type ErrorMessages as E, type FlatMessageKey as F, type LocaleBundle as L, type MessageNamespace as M, type PartialMessages as P, type RegisteredLocaleCode as R, type Translator as T, type UpupMessages as U, type UpupLocaleCode as a, formatUiMessage as b, type Translations as c, type UiTranslations as d, LOCALE_CODES as e, flattenTranslatorToUiTranslations as f, LOCALE_REGISTRY as g, pluralUiMessage as p };
|