@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
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
export { F as FileSource, d as PipelineContext, P as PipelineStep, a as UploadFile, U as UploadFileMetadata, b as UploadFileWithProgress, c as UploadStatus } from './contracts-pipeline-cf177270.cjs';
|
|
2
|
+
export { F as FileUploadResult, N as NON_S3_STORAGE_PROVIDERS, R as RestrictionFailedReason, S as StorageProvider, a as UploadProvider, U as UploadSource, b as UploaderBaseProps, e as UpupAuthError, j as UpupConfigError, d as UpupError, c as UpupErrorCode, f as UpupNetworkError, h as UpupQuotaError, i as UpupStorageError, g as UpupValidationError, u as uploadErrorFromResponse } from './uploader-props-7f956e60.cjs';
|
|
3
|
+
export { C as CrashRecoveryOptions, M as MaxFileSizeObject, g as MultipartAbortResponse, f as MultipartCompleteResponse, a as MultipartInitResponse, d as MultipartListPartsResponse, c as MultipartPart, e as MultipartResumeResponse, b as MultipartSignPartResponse, P as PresignedUrlResponse, R as ResumableUploadOptions } from './contracts-strategies-378a16b7.cjs';
|
|
4
|
+
import { c as UpupPlugin, E as EventEmitter, D as DropboxConfig, G as GoogleDriveConfig, B as BoxConfig, O as OneDriveConfig } from './core-bea2ceca.cjs';
|
|
5
|
+
export { b as CloudDrivesConfig, d as CoreOptions, g as ExtensionMethods, h as FileProgress, F as FilesProgressMap, a as ImageCompressionOptions, I as ImageEditorOptions, R as ResolvedImageEditorOptions, T as ThumbnailGeneratorOptions, e as UploadOptions, U as UpupCore, f as UpupCorsConfig, V as ValidationResult } from './core-bea2ceca.cjs';
|
|
6
|
+
export { e as LOCALE_CODES, g as LOCALE_REGISTRY, L as LocaleBundle, P as PartialMessages, R as RegisteredLocaleCode, c as Translations, T as Translator, d as UiTranslations, a as UpupLocaleCode, U as UpupMessages, f as flattenTranslatorToUiTranslations, b as formatUiMessage, p as pluralUiMessage } from './ui-translations-c5d00392.cjs';
|
|
7
|
+
export { L as LOCALE_META, a as LocaleMeta, T as TranslatorOptions, d as arSA, c as createTranslator, f as deDE, b as enUS, e as errorCodeToMessageKey, g as esES, h as frFR, j as jaJP, k as koKR, n as normalizeBcp47, z as zhCN, i as zhTW } from './error-code-map-dd5becfa.cjs';
|
|
8
|
+
export { h as UPUP_VAR_PREFIX, U as UpupColorTokens, a as UpupRadiusTokens, b as UpupShadowTokens, k as UpupSlotPath, c as UpupSpacingTokens, f as UpupThemeConfig, e as UpupThemeMode, j as UpupThemeSlots, d as UpupThemeTokens, m as flattenSlotsToClassNames, t as tokensToVars } from './vars-d3421f6c.cjs';
|
|
9
|
+
export { d as darkPreset, l as lightPreset, r as resolveTheme } from './resolve-theme-66cf8d98.cjs';
|
|
10
|
+
import { D as DriveUser, a as DriveFile, b as DriveListPage, c as DriveState } from './server-mode-drive-controller-b5f8ee12.cjs';
|
|
11
|
+
export { B as BOX_DESCRIPTOR, g as DROPBOX_DESCRIPTOR, f as DriveBrowserError, e as DriveEventMap, d as DriveFolder, G as GOOGLE_DRIVE_DESCRIPTOR, O as ONE_DRIVE_DESCRIPTOR, h as ObservableController, i as ServerDriveFile, j as ServerDriveListState, S as ServerModeProvider } from './server-mode-drive-controller-b5f8ee12.cjs';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The single drive-plugin contract. Extends the generic UpupPlugin registration
|
|
15
|
+
* base with the drive lifecycle (id/init/destroy) AND the runtime surface the
|
|
16
|
+
* DriveBrowserController drives. The four concrete *Plugin classes implement this.
|
|
17
|
+
* Members marked optional may be omitted by a future provider that doesn't need them:
|
|
18
|
+
* authenticate is implemented by all current providers but only invoked on the GIS path;
|
|
19
|
+
* authenticateViaPopup/loadAllFilesInFolder are popup-provider-only (absent on GIS);
|
|
20
|
+
* getConfig is implemented by all and read for the GIS client id.
|
|
21
|
+
*
|
|
22
|
+
* Folds in the formerly-inline DriveBrowserPlugin (was in drive-browser-controller.ts)
|
|
23
|
+
* so the declared lifecycle interface and the driven runtime surface are one type.
|
|
24
|
+
*/
|
|
25
|
+
interface DrivePlugin extends UpupPlugin {
|
|
26
|
+
readonly id: string;
|
|
27
|
+
init(emitter: EventEmitter): void;
|
|
28
|
+
destroy(): void;
|
|
29
|
+
restoreSession(): boolean;
|
|
30
|
+
isAuthenticated(): boolean;
|
|
31
|
+
getAccessToken(): string | null;
|
|
32
|
+
getUserInfo(): Promise<DriveUser | null | undefined>;
|
|
33
|
+
loadFiles(folderArg?: string): Promise<unknown>;
|
|
34
|
+
downloadFiles(files: DriveFile[]): Promise<File[]>;
|
|
35
|
+
signOut(): void;
|
|
36
|
+
authenticate?(token: string, expiresIn?: number): Promise<void>;
|
|
37
|
+
authenticateViaPopup?(): Promise<void>;
|
|
38
|
+
loadAllFilesInFolder?(folderArg: string): Promise<DriveFile[]>;
|
|
39
|
+
getConfig?(): unknown;
|
|
40
|
+
loadMoreFiles?(cursor: string): Promise<DriveListPage>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Shared config for the popup-OAuth providers (Box / OneDrive / Dropbox). All
|
|
45
|
+
* three declare exactly this shape (`{ clientId, redirectUri? }`) — see
|
|
46
|
+
* `configs.ts`; the subclasses re-export their own alias for public ergonomics.
|
|
47
|
+
*/
|
|
48
|
+
interface DriveOAuthConfig {
|
|
49
|
+
clientId: string;
|
|
50
|
+
redirectUri?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Per-provider configuration for a {@link PopupOAuthPlugin} subclass. Everything
|
|
54
|
+
* that differs between Box, OneDrive, and Dropbox at the auth/popup/refresh layer
|
|
55
|
+
* is data here — the skeleton itself is provider-agnostic.
|
|
56
|
+
*/
|
|
57
|
+
interface PopupOAuthSpec {
|
|
58
|
+
/** Stable plugin id, e.g. 'box' / 'one-drive' / 'dropbox'. */
|
|
59
|
+
id: string;
|
|
60
|
+
/** Human-facing provider name used in diagnostic error messages, e.g. 'Box' / 'OneDrive' / 'Dropbox'. */
|
|
61
|
+
displayName: string;
|
|
62
|
+
/** Event namespace: emits `${eventPrefix}:state-change`, `:authenticated`, `:session-expired`, `:error`, `:signed-out`, `:files-loaded`. */
|
|
63
|
+
eventPrefix: string;
|
|
64
|
+
/** window.open target name, e.g. 'UpupBoxAuth'. */
|
|
65
|
+
popupName: string;
|
|
66
|
+
/** OAuth2 authorize endpoint. */
|
|
67
|
+
authUrl: string;
|
|
68
|
+
/** OAuth2 token endpoint. */
|
|
69
|
+
tokenUrl: string;
|
|
70
|
+
/** Default redirect path appended to `window.location.origin`, e.g. '/box_redirect'. */
|
|
71
|
+
redirectPath: string;
|
|
72
|
+
/** sessionStorage keys for the access / refresh tokens and the absolute expiry ms. */
|
|
73
|
+
storageKeys: {
|
|
74
|
+
access: string;
|
|
75
|
+
refresh: string;
|
|
76
|
+
expiry: string;
|
|
77
|
+
};
|
|
78
|
+
/** Space-joined OAuth scopes. Omitted by Box (its scopes are app-configured). */
|
|
79
|
+
scopes?: string;
|
|
80
|
+
/** Extra provider params merged onto the authorize URL (e.g. MS `response_mode`, Dropbox `token_access_type`). */
|
|
81
|
+
authParams?: Record<string, string>;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Abstract base owning the popup-OAuth / PKCE / token-refresh / lifecycle skeleton
|
|
85
|
+
* shared byte-for-byte across the three client-mode popup providers (F-121). A
|
|
86
|
+
* concrete provider supplies (a) a {@link PopupOAuthSpec} and (b) its genuinely
|
|
87
|
+
* provider-specific domain methods (`mapEntry`, `fetchUserProfile`, `loadFiles`,
|
|
88
|
+
* `downloadFiles`, …), which are moved verbatim from the hand-written plugins.
|
|
89
|
+
*
|
|
90
|
+
* The one intended behavior change vs. the pre-extraction plugins is that Box now
|
|
91
|
+
* inherits proactive token refresh + persisted expiry (F-126) — OneDrive/Dropbox
|
|
92
|
+
* already had it.
|
|
93
|
+
*
|
|
94
|
+
* Not for GoogleDrive: its GIS access-token model has no PKCE popup and no refresh
|
|
95
|
+
* token, so it stays a standalone `implements DrivePlugin`.
|
|
96
|
+
*/
|
|
97
|
+
declare abstract class PopupOAuthPlugin implements DrivePlugin {
|
|
98
|
+
abstract readonly spec: PopupOAuthSpec;
|
|
99
|
+
get id(): string;
|
|
100
|
+
get name(): string;
|
|
101
|
+
protected emitter: EventEmitter | null;
|
|
102
|
+
protected config: DriveOAuthConfig;
|
|
103
|
+
protected accessToken: string | null;
|
|
104
|
+
protected refreshTokenValue: string | null;
|
|
105
|
+
protected tokenExpiry: number;
|
|
106
|
+
protected state: DriveState;
|
|
107
|
+
private codeVerifier;
|
|
108
|
+
private popupWindow;
|
|
109
|
+
private pollTimer;
|
|
110
|
+
configure(config: DriveOAuthConfig): this;
|
|
111
|
+
getConfig(): Readonly<DriveOAuthConfig>;
|
|
112
|
+
init(emitter: EventEmitter): void;
|
|
113
|
+
destroy(): void;
|
|
114
|
+
getState(): DriveState;
|
|
115
|
+
protected setState(newState: DriveState): void;
|
|
116
|
+
getAuthUrl(): Promise<string>;
|
|
117
|
+
authenticate(code: string): Promise<void>;
|
|
118
|
+
authenticateViaPopup(): Promise<void>;
|
|
119
|
+
refreshAccessToken(): Promise<string | null>;
|
|
120
|
+
signOut(): void;
|
|
121
|
+
restoreSession(): boolean;
|
|
122
|
+
isAuthenticated(): boolean;
|
|
123
|
+
getAccessToken(): string | null;
|
|
124
|
+
getUserInfo(): Promise<DriveUser | null>;
|
|
125
|
+
protected apiRequest(url: string, options: RequestInit, isRetry?: boolean): Promise<Response>;
|
|
126
|
+
protected setTokens(access: string, refresh: string | null, expiresIn?: number): void;
|
|
127
|
+
protected clearTokens(): void;
|
|
128
|
+
protected ensureValidToken(): Promise<void>;
|
|
129
|
+
protected getRedirectUri(): string;
|
|
130
|
+
protected cleanupPopup(): void;
|
|
131
|
+
private cleanupPollTimer;
|
|
132
|
+
protected abstract mapEntry(entry: Record<string, unknown>): DriveFile;
|
|
133
|
+
protected abstract fetchUserProfile(): Promise<DriveUser>;
|
|
134
|
+
abstract loadFiles(folderArg?: string): Promise<unknown>;
|
|
135
|
+
abstract downloadFiles(files: DriveFile[]): Promise<File[]>;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
declare class DropboxPlugin extends PopupOAuthPlugin {
|
|
139
|
+
readonly spec: PopupOAuthSpec;
|
|
140
|
+
configure(config: DropboxConfig): this;
|
|
141
|
+
getConfig(): Readonly<DropboxConfig>;
|
|
142
|
+
loadFiles(path?: string): Promise<{
|
|
143
|
+
files: DriveFile[];
|
|
144
|
+
hasMore: boolean;
|
|
145
|
+
cursor?: string;
|
|
146
|
+
}>;
|
|
147
|
+
loadMoreFiles(cursor: string): Promise<{
|
|
148
|
+
files: DriveFile[];
|
|
149
|
+
hasMore: boolean;
|
|
150
|
+
cursor?: string;
|
|
151
|
+
}>;
|
|
152
|
+
loadAllFilesInFolder(folderPath: string): Promise<DriveFile[]>;
|
|
153
|
+
downloadFiles(driveFiles: DriveFile[]): Promise<File[]>;
|
|
154
|
+
searchFiles(query: string, path?: string): Promise<DriveFile[]>;
|
|
155
|
+
protected mapEntry(entry: Record<string, unknown>): DriveFile;
|
|
156
|
+
private downloadSingleFile;
|
|
157
|
+
protected fetchUserProfile(): Promise<DriveUser>;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
declare class GoogleDrivePlugin implements DrivePlugin {
|
|
161
|
+
readonly id = "google-drive";
|
|
162
|
+
readonly name = "google-drive";
|
|
163
|
+
private emitter;
|
|
164
|
+
private config;
|
|
165
|
+
private accessToken;
|
|
166
|
+
private tokenExpiry;
|
|
167
|
+
private state;
|
|
168
|
+
configure(config: GoogleDriveConfig): this;
|
|
169
|
+
getConfig(): Readonly<GoogleDriveConfig>;
|
|
170
|
+
init(emitter: EventEmitter): void;
|
|
171
|
+
destroy(): void;
|
|
172
|
+
getState(): DriveState;
|
|
173
|
+
private setState;
|
|
174
|
+
setAccessToken(token: string, expiresIn?: number): void;
|
|
175
|
+
authenticate(token: string, expiresIn?: number): Promise<void>;
|
|
176
|
+
signOut(): void;
|
|
177
|
+
restoreSession(): boolean;
|
|
178
|
+
isAuthenticated(): boolean;
|
|
179
|
+
getAccessToken(): string | null;
|
|
180
|
+
getUserInfo(): Promise<{
|
|
181
|
+
name: string;
|
|
182
|
+
email: string;
|
|
183
|
+
picture?: string;
|
|
184
|
+
}>;
|
|
185
|
+
loadFiles(folderId?: string): Promise<{
|
|
186
|
+
files: DriveFile[];
|
|
187
|
+
folderId: string;
|
|
188
|
+
hasMore: boolean;
|
|
189
|
+
cursor?: string;
|
|
190
|
+
}>;
|
|
191
|
+
loadMoreFiles(cursor: string): Promise<{
|
|
192
|
+
files: DriveFile[];
|
|
193
|
+
hasMore: boolean;
|
|
194
|
+
cursor?: string;
|
|
195
|
+
}>;
|
|
196
|
+
downloadFiles(driveFiles: DriveFile[]): Promise<File[]>;
|
|
197
|
+
downloadFile(driveFile: DriveFile): Promise<File | null>;
|
|
198
|
+
private downloadRegularFile;
|
|
199
|
+
private downloadWorkspaceFile;
|
|
200
|
+
private apiRequest;
|
|
201
|
+
private clearTokens;
|
|
202
|
+
private ensureValidToken;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
declare class BoxPlugin extends PopupOAuthPlugin {
|
|
206
|
+
readonly spec: PopupOAuthSpec;
|
|
207
|
+
configure(config: BoxConfig): this;
|
|
208
|
+
getConfig(): Readonly<BoxConfig>;
|
|
209
|
+
loadFiles(folderId?: string, offset?: string): Promise<{
|
|
210
|
+
files: DriveFile[];
|
|
211
|
+
folderId: string;
|
|
212
|
+
hasMore: boolean;
|
|
213
|
+
cursor?: string;
|
|
214
|
+
}>;
|
|
215
|
+
loadMoreFiles(cursor: string): Promise<{
|
|
216
|
+
files: DriveFile[];
|
|
217
|
+
hasMore: boolean;
|
|
218
|
+
cursor?: string;
|
|
219
|
+
}>;
|
|
220
|
+
downloadFiles(driveFiles: DriveFile[]): Promise<File[]>;
|
|
221
|
+
loadAllFilesInFolder(folderId: string): Promise<DriveFile[]>;
|
|
222
|
+
searchFiles(query: string): Promise<DriveFile[]>;
|
|
223
|
+
protected mapEntry(entry: Record<string, unknown>): DriveFile;
|
|
224
|
+
private downloadSingleFile;
|
|
225
|
+
protected fetchUserProfile(): Promise<DriveUser>;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
declare class OneDrivePlugin extends PopupOAuthPlugin {
|
|
229
|
+
readonly spec: PopupOAuthSpec;
|
|
230
|
+
configure(config: OneDriveConfig): this;
|
|
231
|
+
getConfig(): Readonly<OneDriveConfig>;
|
|
232
|
+
loadFiles(folderId?: string): Promise<{
|
|
233
|
+
files: DriveFile[];
|
|
234
|
+
folderId: string;
|
|
235
|
+
hasMore: boolean;
|
|
236
|
+
cursor?: string;
|
|
237
|
+
}>;
|
|
238
|
+
loadMoreFiles(cursor: string): Promise<{
|
|
239
|
+
files: DriveFile[];
|
|
240
|
+
hasMore: boolean;
|
|
241
|
+
cursor?: string;
|
|
242
|
+
}>;
|
|
243
|
+
downloadFiles(driveFiles: DriveFile[]): Promise<File[]>;
|
|
244
|
+
loadAllFilesInFolder(folderId: string): Promise<DriveFile[]>;
|
|
245
|
+
protected mapEntry(entry: Record<string, unknown>): DriveFile;
|
|
246
|
+
protected fetchUserProfile(): Promise<DriveUser>;
|
|
247
|
+
private graphRequest;
|
|
248
|
+
private downloadSingleFile;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
interface AcceptPresetDefinition {
|
|
252
|
+
label: string;
|
|
253
|
+
accept: string;
|
|
254
|
+
}
|
|
255
|
+
declare const ACCEPT_PRESETS: Record<string, AcceptPresetDefinition>;
|
|
256
|
+
type AcceptPreset = keyof typeof ACCEPT_PRESETS;
|
|
257
|
+
declare function resolveAccept(input: string | string[]): string;
|
|
258
|
+
|
|
259
|
+
declare const FILE_TYPE_EXTENSIONS: readonly ["bmp", "css", "csv", "docx", "html", "jpg", "js", "jsx", "pdf", "png", "php", "ppt", "rs", "sql", "svg", "ts", "tsx", "txt", "vue", "xls", "xml", "zip"];
|
|
260
|
+
type FileTypeIconName = `file-${(typeof FILE_TYPE_EXTENSIONS)[number]}`;
|
|
261
|
+
|
|
262
|
+
type IconName = 'my-device' | 'box' | 'dropbox' | 'google-drive' | 'one-drive' | 'link' | 'camera' | 'audio' | 'screen-capture' | 'upload' | 'loader' | 'x' | 'chevron-left' | 'trash' | 'camera-rotate' | 'capture' | 'plus' | 'layout-grid' | 'layout-list' | 'folder' | 'folder-filled' | 'search' | 'user' | 'file' | 'stacked-files' | 'storage' | 'player-play' | 'player-pause' | FileTypeIconName;
|
|
263
|
+
interface IconDef {
|
|
264
|
+
/** e.g. '0 0 24 24' (stroke/filled) or '0 0 32 32' (brand). */
|
|
265
|
+
viewBox: string;
|
|
266
|
+
/** px width/height when the renderer is given no explicit size. */
|
|
267
|
+
defaultSize: number;
|
|
268
|
+
/** outer-<svg> presentation attrs merged onto the svg (kebab-case keys). */
|
|
269
|
+
attrs?: Record<string, string>;
|
|
270
|
+
/** baked brand-color class merged onto the svg, e.g. 'upup-text-[#0061fe]'. */
|
|
271
|
+
className?: string;
|
|
272
|
+
/** raw inner-SVG markup (paths/groups/defs/masks) — the single source of truth. */
|
|
273
|
+
inner: string;
|
|
274
|
+
}
|
|
275
|
+
declare const ICONS: Record<IconName, IconDef>;
|
|
276
|
+
|
|
277
|
+
/** Resolve a file extension to its registry glyph name, or the generic 'file'. */
|
|
278
|
+
declare function fileTypeIconName(extension: string): IconName;
|
|
279
|
+
|
|
280
|
+
export { ACCEPT_PRESETS, type AcceptPreset, type AcceptPresetDefinition, BoxConfig, BoxPlugin, DriveFile, DriveListPage, type DrivePlugin, DriveState, DriveUser, DropboxConfig, DropboxPlugin, FILE_TYPE_EXTENSIONS, type FileTypeIconName, GoogleDriveConfig, GoogleDrivePlugin, ICONS, type IconDef, type IconName, OneDriveConfig, OneDrivePlugin, PopupOAuthPlugin, type PopupOAuthSpec, UpupPlugin, fileTypeIconName, resolveAccept };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
export { F as FileSource, d as PipelineContext, P as PipelineStep, a as UploadFile, U as UploadFileMetadata, b as UploadFileWithProgress, c as UploadStatus } from './contracts-pipeline-cf177270.js';
|
|
2
|
+
export { F as FileUploadResult, N as NON_S3_STORAGE_PROVIDERS, R as RestrictionFailedReason, S as StorageProvider, a as UploadProvider, U as UploadSource, b as UploaderBaseProps, e as UpupAuthError, j as UpupConfigError, d as UpupError, c as UpupErrorCode, f as UpupNetworkError, h as UpupQuotaError, i as UpupStorageError, g as UpupValidationError, u as uploadErrorFromResponse } from './uploader-props-72242002.js';
|
|
3
|
+
export { C as CrashRecoveryOptions, M as MaxFileSizeObject, g as MultipartAbortResponse, f as MultipartCompleteResponse, a as MultipartInitResponse, d as MultipartListPartsResponse, c as MultipartPart, e as MultipartResumeResponse, b as MultipartSignPartResponse, P as PresignedUrlResponse, R as ResumableUploadOptions } from './contracts-strategies-378a16b7.js';
|
|
4
|
+
import { c as UpupPlugin, E as EventEmitter, D as DropboxConfig, G as GoogleDriveConfig, B as BoxConfig, O as OneDriveConfig } from './core-141335ac.js';
|
|
5
|
+
export { b as CloudDrivesConfig, d as CoreOptions, g as ExtensionMethods, h as FileProgress, F as FilesProgressMap, a as ImageCompressionOptions, I as ImageEditorOptions, R as ResolvedImageEditorOptions, T as ThumbnailGeneratorOptions, e as UploadOptions, U as UpupCore, f as UpupCorsConfig, V as ValidationResult } from './core-141335ac.js';
|
|
6
|
+
export { e as LOCALE_CODES, g as LOCALE_REGISTRY, L as LocaleBundle, P as PartialMessages, R as RegisteredLocaleCode, c as Translations, T as Translator, d as UiTranslations, a as UpupLocaleCode, U as UpupMessages, f as flattenTranslatorToUiTranslations, b as formatUiMessage, p as pluralUiMessage } from './ui-translations-c5d00392.js';
|
|
7
|
+
export { L as LOCALE_META, a as LocaleMeta, T as TranslatorOptions, d as arSA, c as createTranslator, f as deDE, b as enUS, e as errorCodeToMessageKey, g as esES, h as frFR, j as jaJP, k as koKR, n as normalizeBcp47, z as zhCN, i as zhTW } from './error-code-map-9c44a425.js';
|
|
8
|
+
export { h as UPUP_VAR_PREFIX, U as UpupColorTokens, a as UpupRadiusTokens, b as UpupShadowTokens, k as UpupSlotPath, c as UpupSpacingTokens, f as UpupThemeConfig, e as UpupThemeMode, j as UpupThemeSlots, d as UpupThemeTokens, m as flattenSlotsToClassNames, t as tokensToVars } from './vars-d3421f6c.js';
|
|
9
|
+
export { d as darkPreset, l as lightPreset, r as resolveTheme } from './resolve-theme-01758105.js';
|
|
10
|
+
import { D as DriveUser, a as DriveFile, b as DriveListPage, c as DriveState } from './server-mode-drive-controller-b5f8ee12.js';
|
|
11
|
+
export { B as BOX_DESCRIPTOR, g as DROPBOX_DESCRIPTOR, f as DriveBrowserError, e as DriveEventMap, d as DriveFolder, G as GOOGLE_DRIVE_DESCRIPTOR, O as ONE_DRIVE_DESCRIPTOR, h as ObservableController, i as ServerDriveFile, j as ServerDriveListState, S as ServerModeProvider } from './server-mode-drive-controller-b5f8ee12.js';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The single drive-plugin contract. Extends the generic UpupPlugin registration
|
|
15
|
+
* base with the drive lifecycle (id/init/destroy) AND the runtime surface the
|
|
16
|
+
* DriveBrowserController drives. The four concrete *Plugin classes implement this.
|
|
17
|
+
* Members marked optional may be omitted by a future provider that doesn't need them:
|
|
18
|
+
* authenticate is implemented by all current providers but only invoked on the GIS path;
|
|
19
|
+
* authenticateViaPopup/loadAllFilesInFolder are popup-provider-only (absent on GIS);
|
|
20
|
+
* getConfig is implemented by all and read for the GIS client id.
|
|
21
|
+
*
|
|
22
|
+
* Folds in the formerly-inline DriveBrowserPlugin (was in drive-browser-controller.ts)
|
|
23
|
+
* so the declared lifecycle interface and the driven runtime surface are one type.
|
|
24
|
+
*/
|
|
25
|
+
interface DrivePlugin extends UpupPlugin {
|
|
26
|
+
readonly id: string;
|
|
27
|
+
init(emitter: EventEmitter): void;
|
|
28
|
+
destroy(): void;
|
|
29
|
+
restoreSession(): boolean;
|
|
30
|
+
isAuthenticated(): boolean;
|
|
31
|
+
getAccessToken(): string | null;
|
|
32
|
+
getUserInfo(): Promise<DriveUser | null | undefined>;
|
|
33
|
+
loadFiles(folderArg?: string): Promise<unknown>;
|
|
34
|
+
downloadFiles(files: DriveFile[]): Promise<File[]>;
|
|
35
|
+
signOut(): void;
|
|
36
|
+
authenticate?(token: string, expiresIn?: number): Promise<void>;
|
|
37
|
+
authenticateViaPopup?(): Promise<void>;
|
|
38
|
+
loadAllFilesInFolder?(folderArg: string): Promise<DriveFile[]>;
|
|
39
|
+
getConfig?(): unknown;
|
|
40
|
+
loadMoreFiles?(cursor: string): Promise<DriveListPage>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Shared config for the popup-OAuth providers (Box / OneDrive / Dropbox). All
|
|
45
|
+
* three declare exactly this shape (`{ clientId, redirectUri? }`) — see
|
|
46
|
+
* `configs.ts`; the subclasses re-export their own alias for public ergonomics.
|
|
47
|
+
*/
|
|
48
|
+
interface DriveOAuthConfig {
|
|
49
|
+
clientId: string;
|
|
50
|
+
redirectUri?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Per-provider configuration for a {@link PopupOAuthPlugin} subclass. Everything
|
|
54
|
+
* that differs between Box, OneDrive, and Dropbox at the auth/popup/refresh layer
|
|
55
|
+
* is data here — the skeleton itself is provider-agnostic.
|
|
56
|
+
*/
|
|
57
|
+
interface PopupOAuthSpec {
|
|
58
|
+
/** Stable plugin id, e.g. 'box' / 'one-drive' / 'dropbox'. */
|
|
59
|
+
id: string;
|
|
60
|
+
/** Human-facing provider name used in diagnostic error messages, e.g. 'Box' / 'OneDrive' / 'Dropbox'. */
|
|
61
|
+
displayName: string;
|
|
62
|
+
/** Event namespace: emits `${eventPrefix}:state-change`, `:authenticated`, `:session-expired`, `:error`, `:signed-out`, `:files-loaded`. */
|
|
63
|
+
eventPrefix: string;
|
|
64
|
+
/** window.open target name, e.g. 'UpupBoxAuth'. */
|
|
65
|
+
popupName: string;
|
|
66
|
+
/** OAuth2 authorize endpoint. */
|
|
67
|
+
authUrl: string;
|
|
68
|
+
/** OAuth2 token endpoint. */
|
|
69
|
+
tokenUrl: string;
|
|
70
|
+
/** Default redirect path appended to `window.location.origin`, e.g. '/box_redirect'. */
|
|
71
|
+
redirectPath: string;
|
|
72
|
+
/** sessionStorage keys for the access / refresh tokens and the absolute expiry ms. */
|
|
73
|
+
storageKeys: {
|
|
74
|
+
access: string;
|
|
75
|
+
refresh: string;
|
|
76
|
+
expiry: string;
|
|
77
|
+
};
|
|
78
|
+
/** Space-joined OAuth scopes. Omitted by Box (its scopes are app-configured). */
|
|
79
|
+
scopes?: string;
|
|
80
|
+
/** Extra provider params merged onto the authorize URL (e.g. MS `response_mode`, Dropbox `token_access_type`). */
|
|
81
|
+
authParams?: Record<string, string>;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Abstract base owning the popup-OAuth / PKCE / token-refresh / lifecycle skeleton
|
|
85
|
+
* shared byte-for-byte across the three client-mode popup providers (F-121). A
|
|
86
|
+
* concrete provider supplies (a) a {@link PopupOAuthSpec} and (b) its genuinely
|
|
87
|
+
* provider-specific domain methods (`mapEntry`, `fetchUserProfile`, `loadFiles`,
|
|
88
|
+
* `downloadFiles`, …), which are moved verbatim from the hand-written plugins.
|
|
89
|
+
*
|
|
90
|
+
* The one intended behavior change vs. the pre-extraction plugins is that Box now
|
|
91
|
+
* inherits proactive token refresh + persisted expiry (F-126) — OneDrive/Dropbox
|
|
92
|
+
* already had it.
|
|
93
|
+
*
|
|
94
|
+
* Not for GoogleDrive: its GIS access-token model has no PKCE popup and no refresh
|
|
95
|
+
* token, so it stays a standalone `implements DrivePlugin`.
|
|
96
|
+
*/
|
|
97
|
+
declare abstract class PopupOAuthPlugin implements DrivePlugin {
|
|
98
|
+
abstract readonly spec: PopupOAuthSpec;
|
|
99
|
+
get id(): string;
|
|
100
|
+
get name(): string;
|
|
101
|
+
protected emitter: EventEmitter | null;
|
|
102
|
+
protected config: DriveOAuthConfig;
|
|
103
|
+
protected accessToken: string | null;
|
|
104
|
+
protected refreshTokenValue: string | null;
|
|
105
|
+
protected tokenExpiry: number;
|
|
106
|
+
protected state: DriveState;
|
|
107
|
+
private codeVerifier;
|
|
108
|
+
private popupWindow;
|
|
109
|
+
private pollTimer;
|
|
110
|
+
configure(config: DriveOAuthConfig): this;
|
|
111
|
+
getConfig(): Readonly<DriveOAuthConfig>;
|
|
112
|
+
init(emitter: EventEmitter): void;
|
|
113
|
+
destroy(): void;
|
|
114
|
+
getState(): DriveState;
|
|
115
|
+
protected setState(newState: DriveState): void;
|
|
116
|
+
getAuthUrl(): Promise<string>;
|
|
117
|
+
authenticate(code: string): Promise<void>;
|
|
118
|
+
authenticateViaPopup(): Promise<void>;
|
|
119
|
+
refreshAccessToken(): Promise<string | null>;
|
|
120
|
+
signOut(): void;
|
|
121
|
+
restoreSession(): boolean;
|
|
122
|
+
isAuthenticated(): boolean;
|
|
123
|
+
getAccessToken(): string | null;
|
|
124
|
+
getUserInfo(): Promise<DriveUser | null>;
|
|
125
|
+
protected apiRequest(url: string, options: RequestInit, isRetry?: boolean): Promise<Response>;
|
|
126
|
+
protected setTokens(access: string, refresh: string | null, expiresIn?: number): void;
|
|
127
|
+
protected clearTokens(): void;
|
|
128
|
+
protected ensureValidToken(): Promise<void>;
|
|
129
|
+
protected getRedirectUri(): string;
|
|
130
|
+
protected cleanupPopup(): void;
|
|
131
|
+
private cleanupPollTimer;
|
|
132
|
+
protected abstract mapEntry(entry: Record<string, unknown>): DriveFile;
|
|
133
|
+
protected abstract fetchUserProfile(): Promise<DriveUser>;
|
|
134
|
+
abstract loadFiles(folderArg?: string): Promise<unknown>;
|
|
135
|
+
abstract downloadFiles(files: DriveFile[]): Promise<File[]>;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
declare class DropboxPlugin extends PopupOAuthPlugin {
|
|
139
|
+
readonly spec: PopupOAuthSpec;
|
|
140
|
+
configure(config: DropboxConfig): this;
|
|
141
|
+
getConfig(): Readonly<DropboxConfig>;
|
|
142
|
+
loadFiles(path?: string): Promise<{
|
|
143
|
+
files: DriveFile[];
|
|
144
|
+
hasMore: boolean;
|
|
145
|
+
cursor?: string;
|
|
146
|
+
}>;
|
|
147
|
+
loadMoreFiles(cursor: string): Promise<{
|
|
148
|
+
files: DriveFile[];
|
|
149
|
+
hasMore: boolean;
|
|
150
|
+
cursor?: string;
|
|
151
|
+
}>;
|
|
152
|
+
loadAllFilesInFolder(folderPath: string): Promise<DriveFile[]>;
|
|
153
|
+
downloadFiles(driveFiles: DriveFile[]): Promise<File[]>;
|
|
154
|
+
searchFiles(query: string, path?: string): Promise<DriveFile[]>;
|
|
155
|
+
protected mapEntry(entry: Record<string, unknown>): DriveFile;
|
|
156
|
+
private downloadSingleFile;
|
|
157
|
+
protected fetchUserProfile(): Promise<DriveUser>;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
declare class GoogleDrivePlugin implements DrivePlugin {
|
|
161
|
+
readonly id = "google-drive";
|
|
162
|
+
readonly name = "google-drive";
|
|
163
|
+
private emitter;
|
|
164
|
+
private config;
|
|
165
|
+
private accessToken;
|
|
166
|
+
private tokenExpiry;
|
|
167
|
+
private state;
|
|
168
|
+
configure(config: GoogleDriveConfig): this;
|
|
169
|
+
getConfig(): Readonly<GoogleDriveConfig>;
|
|
170
|
+
init(emitter: EventEmitter): void;
|
|
171
|
+
destroy(): void;
|
|
172
|
+
getState(): DriveState;
|
|
173
|
+
private setState;
|
|
174
|
+
setAccessToken(token: string, expiresIn?: number): void;
|
|
175
|
+
authenticate(token: string, expiresIn?: number): Promise<void>;
|
|
176
|
+
signOut(): void;
|
|
177
|
+
restoreSession(): boolean;
|
|
178
|
+
isAuthenticated(): boolean;
|
|
179
|
+
getAccessToken(): string | null;
|
|
180
|
+
getUserInfo(): Promise<{
|
|
181
|
+
name: string;
|
|
182
|
+
email: string;
|
|
183
|
+
picture?: string;
|
|
184
|
+
}>;
|
|
185
|
+
loadFiles(folderId?: string): Promise<{
|
|
186
|
+
files: DriveFile[];
|
|
187
|
+
folderId: string;
|
|
188
|
+
hasMore: boolean;
|
|
189
|
+
cursor?: string;
|
|
190
|
+
}>;
|
|
191
|
+
loadMoreFiles(cursor: string): Promise<{
|
|
192
|
+
files: DriveFile[];
|
|
193
|
+
hasMore: boolean;
|
|
194
|
+
cursor?: string;
|
|
195
|
+
}>;
|
|
196
|
+
downloadFiles(driveFiles: DriveFile[]): Promise<File[]>;
|
|
197
|
+
downloadFile(driveFile: DriveFile): Promise<File | null>;
|
|
198
|
+
private downloadRegularFile;
|
|
199
|
+
private downloadWorkspaceFile;
|
|
200
|
+
private apiRequest;
|
|
201
|
+
private clearTokens;
|
|
202
|
+
private ensureValidToken;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
declare class BoxPlugin extends PopupOAuthPlugin {
|
|
206
|
+
readonly spec: PopupOAuthSpec;
|
|
207
|
+
configure(config: BoxConfig): this;
|
|
208
|
+
getConfig(): Readonly<BoxConfig>;
|
|
209
|
+
loadFiles(folderId?: string, offset?: string): Promise<{
|
|
210
|
+
files: DriveFile[];
|
|
211
|
+
folderId: string;
|
|
212
|
+
hasMore: boolean;
|
|
213
|
+
cursor?: string;
|
|
214
|
+
}>;
|
|
215
|
+
loadMoreFiles(cursor: string): Promise<{
|
|
216
|
+
files: DriveFile[];
|
|
217
|
+
hasMore: boolean;
|
|
218
|
+
cursor?: string;
|
|
219
|
+
}>;
|
|
220
|
+
downloadFiles(driveFiles: DriveFile[]): Promise<File[]>;
|
|
221
|
+
loadAllFilesInFolder(folderId: string): Promise<DriveFile[]>;
|
|
222
|
+
searchFiles(query: string): Promise<DriveFile[]>;
|
|
223
|
+
protected mapEntry(entry: Record<string, unknown>): DriveFile;
|
|
224
|
+
private downloadSingleFile;
|
|
225
|
+
protected fetchUserProfile(): Promise<DriveUser>;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
declare class OneDrivePlugin extends PopupOAuthPlugin {
|
|
229
|
+
readonly spec: PopupOAuthSpec;
|
|
230
|
+
configure(config: OneDriveConfig): this;
|
|
231
|
+
getConfig(): Readonly<OneDriveConfig>;
|
|
232
|
+
loadFiles(folderId?: string): Promise<{
|
|
233
|
+
files: DriveFile[];
|
|
234
|
+
folderId: string;
|
|
235
|
+
hasMore: boolean;
|
|
236
|
+
cursor?: string;
|
|
237
|
+
}>;
|
|
238
|
+
loadMoreFiles(cursor: string): Promise<{
|
|
239
|
+
files: DriveFile[];
|
|
240
|
+
hasMore: boolean;
|
|
241
|
+
cursor?: string;
|
|
242
|
+
}>;
|
|
243
|
+
downloadFiles(driveFiles: DriveFile[]): Promise<File[]>;
|
|
244
|
+
loadAllFilesInFolder(folderId: string): Promise<DriveFile[]>;
|
|
245
|
+
protected mapEntry(entry: Record<string, unknown>): DriveFile;
|
|
246
|
+
protected fetchUserProfile(): Promise<DriveUser>;
|
|
247
|
+
private graphRequest;
|
|
248
|
+
private downloadSingleFile;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
interface AcceptPresetDefinition {
|
|
252
|
+
label: string;
|
|
253
|
+
accept: string;
|
|
254
|
+
}
|
|
255
|
+
declare const ACCEPT_PRESETS: Record<string, AcceptPresetDefinition>;
|
|
256
|
+
type AcceptPreset = keyof typeof ACCEPT_PRESETS;
|
|
257
|
+
declare function resolveAccept(input: string | string[]): string;
|
|
258
|
+
|
|
259
|
+
declare const FILE_TYPE_EXTENSIONS: readonly ["bmp", "css", "csv", "docx", "html", "jpg", "js", "jsx", "pdf", "png", "php", "ppt", "rs", "sql", "svg", "ts", "tsx", "txt", "vue", "xls", "xml", "zip"];
|
|
260
|
+
type FileTypeIconName = `file-${(typeof FILE_TYPE_EXTENSIONS)[number]}`;
|
|
261
|
+
|
|
262
|
+
type IconName = 'my-device' | 'box' | 'dropbox' | 'google-drive' | 'one-drive' | 'link' | 'camera' | 'audio' | 'screen-capture' | 'upload' | 'loader' | 'x' | 'chevron-left' | 'trash' | 'camera-rotate' | 'capture' | 'plus' | 'layout-grid' | 'layout-list' | 'folder' | 'folder-filled' | 'search' | 'user' | 'file' | 'stacked-files' | 'storage' | 'player-play' | 'player-pause' | FileTypeIconName;
|
|
263
|
+
interface IconDef {
|
|
264
|
+
/** e.g. '0 0 24 24' (stroke/filled) or '0 0 32 32' (brand). */
|
|
265
|
+
viewBox: string;
|
|
266
|
+
/** px width/height when the renderer is given no explicit size. */
|
|
267
|
+
defaultSize: number;
|
|
268
|
+
/** outer-<svg> presentation attrs merged onto the svg (kebab-case keys). */
|
|
269
|
+
attrs?: Record<string, string>;
|
|
270
|
+
/** baked brand-color class merged onto the svg, e.g. 'upup-text-[#0061fe]'. */
|
|
271
|
+
className?: string;
|
|
272
|
+
/** raw inner-SVG markup (paths/groups/defs/masks) — the single source of truth. */
|
|
273
|
+
inner: string;
|
|
274
|
+
}
|
|
275
|
+
declare const ICONS: Record<IconName, IconDef>;
|
|
276
|
+
|
|
277
|
+
/** Resolve a file extension to its registry glyph name, or the generic 'file'. */
|
|
278
|
+
declare function fileTypeIconName(extension: string): IconName;
|
|
279
|
+
|
|
280
|
+
export { ACCEPT_PRESETS, type AcceptPreset, type AcceptPresetDefinition, BoxConfig, BoxPlugin, DriveFile, DriveListPage, type DrivePlugin, DriveState, DriveUser, DropboxConfig, DropboxPlugin, FILE_TYPE_EXTENSIONS, type FileTypeIconName, GoogleDriveConfig, GoogleDrivePlugin, ICONS, type IconDef, type IconName, OneDriveConfig, OneDrivePlugin, PopupOAuthPlugin, type PopupOAuthSpec, UpupPlugin, fileTypeIconName, resolveAccept };
|