@uploadcare/file-uploader 1.32.0-alpha.0 → 1.32.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abstract/loadFileUploaderFrom.js +2 -2
- package/dist/env.js +3 -3
- package/dist/index.css +2 -2
- package/dist/index.d.ts +31 -19
- package/dist/index.js +3 -3
- package/dist/index.layered.css +2 -2
- package/dist/index.ssr.js +1 -1
- package/dist/locales/file-uploader/ar.js +2 -2
- package/dist/locales/file-uploader/az.js +2 -2
- package/dist/locales/file-uploader/ca.js +2 -2
- package/dist/locales/file-uploader/cs.js +2 -2
- package/dist/locales/file-uploader/da.js +2 -2
- package/dist/locales/file-uploader/de.js +2 -2
- package/dist/locales/file-uploader/el.js +2 -2
- package/dist/locales/file-uploader/en.js +2 -2
- package/dist/locales/file-uploader/es.js +2 -2
- package/dist/locales/file-uploader/et.js +2 -2
- package/dist/locales/file-uploader/fi.js +2 -2
- package/dist/locales/file-uploader/fr.js +2 -2
- package/dist/locales/file-uploader/he.js +2 -2
- package/dist/locales/file-uploader/hy.js +2 -2
- package/dist/locales/file-uploader/is.js +2 -2
- package/dist/locales/file-uploader/it.js +2 -2
- package/dist/locales/file-uploader/ja.js +2 -2
- package/dist/locales/file-uploader/ka.js +2 -2
- package/dist/locales/file-uploader/kk.js +2 -2
- package/dist/locales/file-uploader/ko.js +2 -2
- package/dist/locales/file-uploader/lv.js +2 -2
- package/dist/locales/file-uploader/nb.js +2 -2
- package/dist/locales/file-uploader/nl.js +2 -2
- package/dist/locales/file-uploader/pl.js +2 -2
- package/dist/locales/file-uploader/pt.js +2 -2
- package/dist/locales/file-uploader/ro.js +2 -2
- package/dist/locales/file-uploader/ru.js +2 -2
- package/dist/locales/file-uploader/sk.js +2 -2
- package/dist/locales/file-uploader/sr.js +2 -2
- package/dist/locales/file-uploader/sv.js +2 -2
- package/dist/locales/file-uploader/tr.js +2 -2
- package/dist/locales/file-uploader/uk.js +2 -2
- package/dist/locales/file-uploader/vi.js +2 -2
- package/dist/locales/file-uploader/zh-TW.js +2 -2
- package/dist/locales/file-uploader/zh.js +2 -2
- package/package.json +1 -1
- package/web/file-uploader.iife.min.d.ts +31 -19
- package/web/file-uploader.iife.min.js +3 -3
- package/web/file-uploader.min.d.ts +31 -19
- package/web/file-uploader.min.js +3 -3
- package/web/uc-basic.layered.min.css +2 -2
- package/web/uc-basic.min.css +2 -2
- package/web/uc-cloud-image-editor.layered.min.css +2 -2
- package/web/uc-cloud-image-editor.min.css +2 -2
- package/web/uc-cloud-image-editor.min.d.ts +30 -18
- package/web/uc-cloud-image-editor.min.js +3 -3
- package/web/uc-file-uploader-inline.layered.min.css +2 -2
- package/web/uc-file-uploader-inline.min.css +2 -2
- package/web/uc-file-uploader-inline.min.d.ts +31 -19
- package/web/uc-file-uploader-inline.min.js +3 -3
- package/web/uc-file-uploader-minimal.layered.min.css +2 -2
- package/web/uc-file-uploader-minimal.min.css +2 -2
- package/web/uc-file-uploader-minimal.min.d.ts +31 -19
- package/web/uc-file-uploader-minimal.min.js +3 -3
- package/web/uc-file-uploader-regular.layered.min.css +2 -2
- package/web/uc-file-uploader-regular.min.css +2 -2
- package/web/uc-file-uploader-regular.min.d.ts +31 -19
- package/web/uc-file-uploader-regular.min.js +3 -3
- package/web/uc-img.min.js +3 -3
|
@@ -224,6 +224,22 @@ declare const _default: {
|
|
|
224
224
|
|
|
225
225
|
type LocaleDefinition = typeof _default;
|
|
226
226
|
type LocaleDefinitionResolver = () => Promise<LocaleDefinition>;
|
|
227
|
+
/**
|
|
228
|
+
* Interface for TypeScript module augmentation.
|
|
229
|
+
* Plugins should extend this interface to add their own locale string keys, so
|
|
230
|
+
* `localeDefinitionOverride` is typed for them instead of a loose record.
|
|
231
|
+
*
|
|
232
|
+
* @example
|
|
233
|
+
* ```typescript
|
|
234
|
+
* declare module '@uploadcare/file-uploader' {
|
|
235
|
+
* interface CustomLocaleDefinition {
|
|
236
|
+
* 'my-plugin-title': string;
|
|
237
|
+
* }
|
|
238
|
+
* }
|
|
239
|
+
* ```
|
|
240
|
+
*/
|
|
241
|
+
interface CustomLocaleDefinition {
|
|
242
|
+
}
|
|
227
243
|
declare const defineLocale: (localeName: string, definitionOrResolver: LocaleDefinition | LocaleDefinitionResolver) => void;
|
|
228
244
|
|
|
229
245
|
type AfterFileAddContext = {
|
|
@@ -1349,15 +1365,18 @@ declare class UploaderPublicApi extends SharedInstance {
|
|
|
1349
1365
|
addFileFromUploadcareFile: (file: UploadcareFile, { silent, fileName, source }?: ApiAddFileCommonOptions) => OutputFileEntry<"success">;
|
|
1350
1366
|
/**
|
|
1351
1367
|
* Replace an existing entry with an already-uploaded Uploadcare file, keeping
|
|
1352
|
-
*
|
|
1353
|
-
*
|
|
1354
|
-
*
|
|
1355
|
-
* context (source, metadata, fullPath, silent) is preserved.
|
|
1368
|
+
* its position in the list. The original entry is removed and a fresh one is
|
|
1369
|
+
* added in its place, so the replacement goes through the full add pipeline
|
|
1370
|
+
* (validators, events) like any newly added file.
|
|
1356
1371
|
*
|
|
1357
|
-
*
|
|
1358
|
-
*
|
|
1372
|
+
* The original entry's `source`, `metadata`, `fullPath` and `silent` are
|
|
1373
|
+
* preserved by default; `silent`, `fileName` and `source` can be overridden
|
|
1374
|
+
* via `options`.
|
|
1375
|
+
*
|
|
1376
|
+
* Returns the new entry. Note: it has a NEW `internalId` — use the returned
|
|
1377
|
+
* entry to reference the replacement going forward.
|
|
1359
1378
|
*/
|
|
1360
|
-
|
|
1379
|
+
replaceFile: (internalId: string, file: UploadcareFile, { silent, fileName, source }?: ApiAddFileCommonOptions) => OutputFileEntry<"success">;
|
|
1361
1380
|
removeFileByInternalId: (internalId: string) => void;
|
|
1362
1381
|
removeAllFiles(): void;
|
|
1363
1382
|
uploadAll: () => void;
|
|
@@ -1973,7 +1992,7 @@ declare global {
|
|
|
1973
1992
|
}
|
|
1974
1993
|
|
|
1975
1994
|
type MetadataCallback = (fileEntry: OutputFileEntry) => Promise<Metadata> | Metadata;
|
|
1976
|
-
type LocaleDefinitionOverride = Record<string, Partial<LocaleDefinition>>;
|
|
1995
|
+
type LocaleDefinitionOverride = Record<string, Partial<LocaleDefinition & CustomLocaleDefinition>>;
|
|
1977
1996
|
type SecureDeliveryProxyUrlResolver = (previewUrl: string, urlParts: {
|
|
1978
1997
|
uuid: string;
|
|
1979
1998
|
cdnUrlModifiers: string;
|
|
@@ -2578,18 +2597,11 @@ type PluginFilesApi = {
|
|
|
2578
2597
|
/**
|
|
2579
2598
|
* Update mutable properties of a file entry by its internalId.
|
|
2580
2599
|
* `fileSize` is recalculated automatically when `file` is provided.
|
|
2581
|
-
*/
|
|
2582
|
-
update: (internalId: string, changes: PluginFileEntryUpdate) => void;
|
|
2583
|
-
/**
|
|
2584
|
-
* Replace an existing entry with an already-uploaded Uploadcare file, keeping
|
|
2585
|
-
* its position in the list. The original entry is removed and a fresh one is
|
|
2586
|
-
* added in its place, so the replacement goes through the full add pipeline
|
|
2587
|
-
* (validators, events) like any newly added file.
|
|
2588
2600
|
*
|
|
2589
|
-
*
|
|
2590
|
-
*
|
|
2601
|
+
* Other file operations (add / remove / `replaceFile`) live on the public
|
|
2602
|
+
* uploader API, which plugins receive as `uploaderApi` in `setup`.
|
|
2591
2603
|
*/
|
|
2592
|
-
|
|
2604
|
+
update: (internalId: string, changes: PluginFileEntryUpdate) => void;
|
|
2593
2605
|
};
|
|
2594
2606
|
type PluginApi = {
|
|
2595
2607
|
registry: PluginRegistryApi;
|
|
@@ -3439,4 +3451,4 @@ declare global {
|
|
|
3439
3451
|
declare const PACKAGE_NAME = "blocks";
|
|
3440
3452
|
declare const PACKAGE_VERSION: string;
|
|
3441
3453
|
|
|
3442
|
-
export { LitActivityBlock as ActivityBlock, ActivityHeader, type ActivityType, type ApiAddFileCommonOptions, BaseComponent, LitBlock as Block, BtnUi, CameraSource, CloudImageEditor, CloudImageEditorActivity, CloudImageEditorBlock, type CollectionValidators, Config, type ConfigAttributesType, type ConfigComplexType, type ConfigPlainType, type ConfigType, Copyright, CropFrame, type CustomActivities, type CustomConfig, type CustomConfigDefinition, PubSub as Data, DropArea, DropDown, DynamicBtn, EditorAspectRatioButtonControl, EditorCropButtonControl, EditorFilterControl, EditorFreeformButtonControl, EditorImageCropper, EditorImageFader, EditorOperationControl, EditorScroller, EditorSlider, EditorToolbar, type EventMap, type EventPayload, EventType, ExternalSource, ExternalUploadSource, FileActionButton, FileItem, FileUploaderInline, FileUploaderMinimal, FileUploaderRegular, type FileValidator, type FileValidatorDescriptor, type FileValidators, FormInput, type FuncCollectionValidator, type FuncFileValidator, type GroupFlag, Icon, type IconHrefResolver, Img, type KebabCase$1 as KebabCase, type KebabCaseKeys, LineLoaderUi, type LocaleDefinitionOverride, type LowerCase, type LowerCaseKeys, type MetadataCallback, Modal, ModalEvents, type ModalId, NoWrapModeDynamicBtn, type OutputCollectionErrorType, type OutputCollectionState, type OutputCollectionStatus, type OutputCustomErrorType, type OutputError, type OutputErrorCollection, type OutputErrorFile, type OutputErrorTypePayload, type OutputFileEntry, type OutputFileErrorPayload, type OutputFileErrorType, type OutputFileStatus, type Owned, PACKAGE_NAME, PACKAGE_VERSION, type PluginActivityApi, PluginActivityHost, type PluginActivityRegistration, PluginActivityRenderer, type PluginApi, type PluginConfigApi, type PluginFileActionRegistration, type PluginFileEntryUpdate, type PluginFileHookContext, type PluginFileHookRegistration, type PluginFileHookResult, type PluginFilesApi, type PluginIconRegistration, type PluginL10nRegistration, type PluginRegistryApi, type PluginRegistrySnapshot, type PluginRender, type PluginRenderDispose, type PluginSetupParams, type PluginSetupResult, type PluginSourceRegistration, type PluginUploaderApi, PresenceToggle, PrimaryAction, ProgressBar, ProgressBarCommon, type SecureDeliveryProxyUrlResolver, type SecureUploadsSignatureAndExpire, type SecureUploadsSignatureResolver, Select, SimpleBtn, SliderUi, LitSolutionBlock as SolutionBlock, SourceBtn, SourceList, type SourceTypes, Spinner, StartFrom, Thumb, UID, UploadCtxProvider, UploadList, UploadSource, LitUploaderBlock as UploaderBlock, type UploaderPlugin, UploaderPublicApi, UrlSource, defineComponents, defineLocale, loadFileUploaderFrom, toKebabCase };
|
|
3454
|
+
export { LitActivityBlock as ActivityBlock, ActivityHeader, type ActivityType, type ApiAddFileCommonOptions, BaseComponent, LitBlock as Block, BtnUi, CameraSource, CloudImageEditor, CloudImageEditorActivity, CloudImageEditorBlock, type CollectionValidators, Config, type ConfigAttributesType, type ConfigComplexType, type ConfigPlainType, type ConfigType, Copyright, CropFrame, type CustomActivities, type CustomConfig, type CustomConfigDefinition, type CustomLocaleDefinition, PubSub as Data, DropArea, DropDown, DynamicBtn, EditorAspectRatioButtonControl, EditorCropButtonControl, EditorFilterControl, EditorFreeformButtonControl, EditorImageCropper, EditorImageFader, EditorOperationControl, EditorScroller, EditorSlider, EditorToolbar, type EventMap, type EventPayload, EventType, ExternalSource, ExternalUploadSource, FileActionButton, FileItem, FileUploaderInline, FileUploaderMinimal, FileUploaderRegular, type FileValidator, type FileValidatorDescriptor, type FileValidators, FormInput, type FuncCollectionValidator, type FuncFileValidator, type GroupFlag, Icon, type IconHrefResolver, Img, type KebabCase$1 as KebabCase, type KebabCaseKeys, LineLoaderUi, type LocaleDefinitionOverride, type LowerCase, type LowerCaseKeys, type MetadataCallback, Modal, ModalEvents, type ModalId, NoWrapModeDynamicBtn, type OutputCollectionErrorType, type OutputCollectionState, type OutputCollectionStatus, type OutputCustomErrorType, type OutputError, type OutputErrorCollection, type OutputErrorFile, type OutputErrorTypePayload, type OutputFileEntry, type OutputFileErrorPayload, type OutputFileErrorType, type OutputFileStatus, type Owned, PACKAGE_NAME, PACKAGE_VERSION, type PluginActivityApi, PluginActivityHost, type PluginActivityRegistration, PluginActivityRenderer, type PluginApi, type PluginConfigApi, type PluginFileActionRegistration, type PluginFileEntryUpdate, type PluginFileHookContext, type PluginFileHookRegistration, type PluginFileHookResult, type PluginFilesApi, type PluginIconRegistration, type PluginL10nRegistration, type PluginRegistryApi, type PluginRegistrySnapshot, type PluginRender, type PluginRenderDispose, type PluginSetupParams, type PluginSetupResult, type PluginSourceRegistration, type PluginUploaderApi, PresenceToggle, PrimaryAction, ProgressBar, ProgressBarCommon, type SecureDeliveryProxyUrlResolver, type SecureUploadsSignatureAndExpire, type SecureUploadsSignatureResolver, Select, SimpleBtn, SliderUi, LitSolutionBlock as SolutionBlock, SourceBtn, SourceList, type SourceTypes, Spinner, StartFrom, Thumb, UID, UploadCtxProvider, UploadList, UploadSource, LitUploaderBlock as UploaderBlock, type UploaderPlugin, UploaderPublicApi, UrlSource, defineComponents, defineLocale, loadFileUploaderFrom, toKebabCase };
|