@uploadcare/file-uploader 1.31.2-alpha.0 → 1.31.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 +38 -3
- package/dist/index.js +5 -5
- package/dist/index.layered.css +2 -2
- package/dist/index.ssr.js +16 -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 +38 -3
- package/web/file-uploader.iife.min.js +4 -4
- package/web/file-uploader.min.d.ts +38 -3
- package/web/file-uploader.min.js +4 -4
- 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 +37 -2
- 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 +38 -3
- package/web/uc-file-uploader-inline.min.js +4 -4
- 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 +38 -3
- package/web/uc-file-uploader-minimal.min.js +4 -4
- 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 +38 -3
- package/web/uc-file-uploader-regular.min.js +4 -4
- 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 = {
|
|
@@ -390,7 +406,9 @@ declare class TypedCollection<T extends Record<string, unknown>> {
|
|
|
390
406
|
private _scheduleDestroyMarkedItems;
|
|
391
407
|
observeCollection(handler: TypedCollectionObserverHandler<T>): () => void;
|
|
392
408
|
unobserveCollection(handler: TypedCollectionObserverHandler<T>): void;
|
|
393
|
-
add(init: Partial<T
|
|
409
|
+
add(init: Partial<T>, options?: {
|
|
410
|
+
index?: number;
|
|
411
|
+
}): Uid;
|
|
394
412
|
hasItem(id: Uid): boolean;
|
|
395
413
|
read(id: Uid): TypedData<T> | null;
|
|
396
414
|
readProp<K extends keyof T>(id: Uid, propName: K): T[K];
|
|
@@ -1345,6 +1363,20 @@ declare class UploaderPublicApi extends SharedInstance {
|
|
|
1345
1363
|
fullPath?: string;
|
|
1346
1364
|
}) => OutputFileEntry<"idle">;
|
|
1347
1365
|
addFileFromUploadcareFile: (file: UploadcareFile, { silent, fileName, source }?: ApiAddFileCommonOptions) => OutputFileEntry<"success">;
|
|
1366
|
+
/**
|
|
1367
|
+
* Replace an existing entry with an already-uploaded Uploadcare file, keeping
|
|
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.
|
|
1371
|
+
*
|
|
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.
|
|
1378
|
+
*/
|
|
1379
|
+
replaceFile: (internalId: string, file: UploadcareFile, { silent, fileName, source }?: ApiAddFileCommonOptions) => OutputFileEntry<"success">;
|
|
1348
1380
|
removeFileByInternalId: (internalId: string) => void;
|
|
1349
1381
|
removeAllFiles(): void;
|
|
1350
1382
|
uploadAll: () => void;
|
|
@@ -1960,7 +1992,7 @@ declare global {
|
|
|
1960
1992
|
}
|
|
1961
1993
|
|
|
1962
1994
|
type MetadataCallback = (fileEntry: OutputFileEntry) => Promise<Metadata> | Metadata;
|
|
1963
|
-
type LocaleDefinitionOverride = Record<string, Partial<LocaleDefinition>>;
|
|
1995
|
+
type LocaleDefinitionOverride = Record<string, Partial<LocaleDefinition & CustomLocaleDefinition>>;
|
|
1964
1996
|
type SecureDeliveryProxyUrlResolver = (previewUrl: string, urlParts: {
|
|
1965
1997
|
uuid: string;
|
|
1966
1998
|
cdnUrlModifiers: string;
|
|
@@ -2565,6 +2597,9 @@ type PluginFilesApi = {
|
|
|
2565
2597
|
/**
|
|
2566
2598
|
* Update mutable properties of a file entry by its internalId.
|
|
2567
2599
|
* `fileSize` is recalculated automatically when `file` is provided.
|
|
2600
|
+
*
|
|
2601
|
+
* Other file operations (add / remove / `replaceFile`) live on the public
|
|
2602
|
+
* uploader API, which plugins receive as `uploaderApi` in `setup`.
|
|
2568
2603
|
*/
|
|
2569
2604
|
update: (internalId: string, changes: PluginFileEntryUpdate) => void;
|
|
2570
2605
|
};
|
|
@@ -3416,4 +3451,4 @@ declare global {
|
|
|
3416
3451
|
declare const PACKAGE_NAME = "blocks";
|
|
3417
3452
|
declare const PACKAGE_VERSION: string;
|
|
3418
3453
|
|
|
3419
|
-
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 };
|