@uploadcare/file-uploader 1.28.0-alpha.666 → 1.28.0-alpha.667
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 +28 -16
- package/dist/index.js +4 -4
- 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 +28 -16
- package/web/file-uploader.iife.min.js +4 -4
- package/web/file-uploader.min.d.ts +28 -16
- 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 +27 -15
- 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 +28 -16
- 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 +28 -16
- 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 +28 -16
- package/web/uc-file-uploader-regular.min.js +4 -4
- package/web/uc-img.min.js +3 -3
|
@@ -2317,10 +2317,17 @@ type PluginFileActionRegistration = {
|
|
|
2317
2317
|
shouldRender: (fileEntry: OutputFileEntry) => boolean;
|
|
2318
2318
|
onClick: (fileEntry: OutputFileEntry) => void | Promise<void>;
|
|
2319
2319
|
};
|
|
2320
|
-
type
|
|
2321
|
-
/** The
|
|
2320
|
+
type PluginFileHookResult = {
|
|
2321
|
+
/** The (optionally transformed) file */
|
|
2322
2322
|
file: File | Blob;
|
|
2323
2323
|
};
|
|
2324
|
+
type PluginFileHookContext = PluginFileHookResult & {
|
|
2325
|
+
/**
|
|
2326
|
+
* An AbortSignal that fires when the operation is cancelled (e.g. upload aborted or file removed).
|
|
2327
|
+
* Hooks should respect this signal to avoid doing unnecessary work.
|
|
2328
|
+
*/
|
|
2329
|
+
signal: AbortSignal;
|
|
2330
|
+
};
|
|
2324
2331
|
type PluginFileHookRegistration = {
|
|
2325
2332
|
/**
|
|
2326
2333
|
* When the hook is called:
|
|
@@ -2331,15 +2338,20 @@ type PluginFileHookRegistration = {
|
|
|
2331
2338
|
* `isImage`, `fileSize`, and `fileName` are all re-derived from the returned file.
|
|
2332
2339
|
*/
|
|
2333
2340
|
type: 'beforeUpload' | 'onAdd';
|
|
2334
|
-
handler: (context: PluginFileHookContext) =>
|
|
2341
|
+
handler: (context: PluginFileHookContext) => PluginFileHookResult | Promise<PluginFileHookResult>;
|
|
2342
|
+
/**
|
|
2343
|
+
* Maximum time in milliseconds to wait for the hook to complete before skipping it.
|
|
2344
|
+
* @default 30000
|
|
2345
|
+
*/
|
|
2346
|
+
timeout?: number;
|
|
2335
2347
|
};
|
|
2336
2348
|
type PluginRegistryApi = {
|
|
2337
|
-
registerSource: (source: PluginSourceRegistration) =>
|
|
2338
|
-
registerActivity: (activity: PluginActivityRegistration) =>
|
|
2339
|
-
registerFileAction: (fileAction: PluginFileActionRegistration) =>
|
|
2340
|
-
registerFileHook: (hook: PluginFileHookRegistration) =>
|
|
2341
|
-
registerIcon: (icon: PluginIconRegistration) =>
|
|
2342
|
-
registerI18n: (i18n: PluginI18nRegistration) =>
|
|
2349
|
+
registerSource: (source: PluginSourceRegistration) => void;
|
|
2350
|
+
registerActivity: (activity: PluginActivityRegistration) => void;
|
|
2351
|
+
registerFileAction: (fileAction: PluginFileActionRegistration) => void;
|
|
2352
|
+
registerFileHook: (hook: PluginFileHookRegistration) => void;
|
|
2353
|
+
registerIcon: (icon: PluginIconRegistration) => void;
|
|
2354
|
+
registerI18n: (i18n: PluginI18nRegistration) => void;
|
|
2343
2355
|
registerConfig: <T = unknown>(definition: CustomConfigDefinition<T>) => void;
|
|
2344
2356
|
};
|
|
2345
2357
|
/**
|
|
@@ -2470,12 +2482,12 @@ declare class PluginRegistry {
|
|
|
2470
2482
|
private _i18n;
|
|
2471
2483
|
readonly config: CustomConfigRegistry;
|
|
2472
2484
|
private _own;
|
|
2473
|
-
addSource(pluginId: string, item: PluginSourceRegistration):
|
|
2474
|
-
addActivity(pluginId: string, item: PluginActivityRegistration):
|
|
2475
|
-
addFileAction(pluginId: string, item: PluginFileActionRegistration):
|
|
2476
|
-
addFileHook(pluginId: string, item: PluginFileHookRegistration):
|
|
2477
|
-
addIcon(pluginId: string, item: PluginIconRegistration):
|
|
2478
|
-
addI18n(pluginId: string, item: PluginI18nRegistration):
|
|
2485
|
+
addSource(pluginId: string, item: PluginSourceRegistration): void;
|
|
2486
|
+
addActivity(pluginId: string, item: PluginActivityRegistration): void;
|
|
2487
|
+
addFileAction(pluginId: string, item: PluginFileActionRegistration): void;
|
|
2488
|
+
addFileHook(pluginId: string, item: PluginFileHookRegistration): void;
|
|
2489
|
+
addIcon(pluginId: string, item: PluginIconRegistration): void;
|
|
2490
|
+
addI18n(pluginId: string, item: PluginI18nRegistration): void;
|
|
2479
2491
|
addConfig<T>(pluginId: string, definition: CustomConfigDefinition<T>): void;
|
|
2480
2492
|
purge(pluginId: string): void;
|
|
2481
2493
|
snapshot(): PluginRegistrySnapshot;
|
|
@@ -3238,4 +3250,4 @@ declare global {
|
|
|
3238
3250
|
declare const PACKAGE_NAME = "blocks";
|
|
3239
3251
|
declare const PACKAGE_VERSION: string;
|
|
3240
3252
|
|
|
3241
|
-
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, EditorAspectRatioButtonControl, EditorCropButtonControl, EditorFilterControl, EditorFreeformButtonControl, EditorImageCropper, EditorImageFader, EditorOperationControl, EditorScroller, EditorSlider, EditorToolbar, type EventMap, type EventPayload, EventType, ExternalSource, ExternalUploadSource, 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, 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 PluginFilesApi, type PluginI18nRegistration, type PluginIconRegistration, type PluginRegistryApi, type PluginRegistrySnapshot, type PluginRender, type PluginRenderDispose, type PluginSetupParams, type PluginSetupResult, type PluginSourceRegistration, type PluginUploaderApi, PresenceToggle, 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 };
|
|
3253
|
+
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, EditorAspectRatioButtonControl, EditorCropButtonControl, EditorFilterControl, EditorFreeformButtonControl, EditorImageCropper, EditorImageFader, EditorOperationControl, EditorScroller, EditorSlider, EditorToolbar, type EventMap, type EventPayload, EventType, ExternalSource, ExternalUploadSource, 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, 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 PluginI18nRegistration, type PluginIconRegistration, type PluginRegistryApi, type PluginRegistrySnapshot, type PluginRender, type PluginRenderDispose, type PluginSetupParams, type PluginSetupResult, type PluginSourceRegistration, type PluginUploaderApi, PresenceToggle, 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 };
|