@uploadcare/file-uploader 1.24.0-alpha.2 → 1.24.1
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/env.js +1 -1
- package/dist/index.css +3 -2
- package/dist/index.d.ts +48 -58
- package/dist/index.js +197 -233
- package/dist/index.ssr.js +6 -2
- package/package.json +2 -1
- package/types/css.d.ts +3 -0
- package/web/file-uploader.iife.min.d.ts +48 -58
- package/web/file-uploader.iife.min.js +4 -4
- package/web/file-uploader.min.d.ts +48 -58
- package/web/file-uploader.min.js +4 -4
- package/web/uc-basic.min.css +1 -1
- package/web/uc-cloud-image-editor.min.css +1 -1
- package/web/uc-cloud-image-editor.min.d.ts +11 -21
- package/web/uc-cloud-image-editor.min.js +4 -4
- package/web/uc-file-uploader-inline.min.css +1 -1
- package/web/uc-file-uploader-inline.min.d.ts +48 -58
- package/web/uc-file-uploader-inline.min.js +4 -4
- package/web/uc-file-uploader-minimal.min.css +1 -1
- package/web/uc-file-uploader-minimal.min.d.ts +48 -58
- package/web/uc-file-uploader-minimal.min.js +4 -4
- package/web/uc-file-uploader-regular.min.css +1 -1
- package/web/uc-file-uploader-regular.min.d.ts +48 -58
- package/web/uc-file-uploader-regular.min.js +4 -4
- package/web/uc-img.min.js +1 -1
package/dist/env.js
CHANGED
package/dist/index.css
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* SOFTWARE.
|
|
24
24
|
*
|
|
25
25
|
*/
|
|
26
|
-
@layer uc.base, uc.components, uc.rules, uc.solutions, uc.post-reset, uc.base, uc.rules, uc.post-reset;
|
|
26
|
+
@layer uc, uc.base, uc.components, uc.rules, uc.solutions, uc.post-reset, uc.base, uc.rules, uc.post-reset;
|
|
27
27
|
|
|
28
28
|
/* src/blocks/ActivityHeader/activity-header.css */
|
|
29
29
|
@layer uc.components {
|
|
@@ -1740,6 +1740,7 @@
|
|
|
1740
1740
|
uc-icon svg {
|
|
1741
1741
|
width: calc(var(--uc-button-size) / 2);
|
|
1742
1742
|
height: calc(var(--uc-button-size) / 2);
|
|
1743
|
+
overflow: visible;
|
|
1743
1744
|
}
|
|
1744
1745
|
}
|
|
1745
1746
|
|
|
@@ -2314,7 +2315,7 @@
|
|
|
2314
2315
|
}
|
|
2315
2316
|
|
|
2316
2317
|
/* src/blocks/themes/uc-basic/layers.css */
|
|
2317
|
-
@layer uc.base, uc.components, uc.rules, uc.solutions, uc.post-reset;
|
|
2318
|
+
@layer uc, uc.base, uc.components, uc.rules, uc.solutions, uc.post-reset;
|
|
2318
2319
|
|
|
2319
2320
|
/* src/blocks/themes/uc-basic/config.css */
|
|
2320
2321
|
@layer uc.base {
|
package/dist/index.d.ts
CHANGED
|
@@ -7,41 +7,6 @@ export { loadFileUploaderFrom } from './abstract/loadFileUploaderFrom.js';
|
|
|
7
7
|
import { TelemetryRequest } from '@uploadcare/quality-insights';
|
|
8
8
|
export { PACKAGE_NAME, PACKAGE_VERSION } from './env.js';
|
|
9
9
|
|
|
10
|
-
declare const ExternalUploadSource: Readonly<{
|
|
11
|
-
readonly FACEBOOK: "facebook";
|
|
12
|
-
readonly DROPBOX: "dropbox";
|
|
13
|
-
readonly GDRIVE: "gdrive";
|
|
14
|
-
readonly GPHOTOS: "gphotos";
|
|
15
|
-
readonly FLICKR: "flickr";
|
|
16
|
-
readonly VK: "vk";
|
|
17
|
-
readonly EVERNOTE: "evernote";
|
|
18
|
-
readonly BOX: "box";
|
|
19
|
-
readonly ONEDRIVE: "onedrive";
|
|
20
|
-
readonly HUDDLE: "huddle";
|
|
21
|
-
}>;
|
|
22
|
-
declare const UploadSource: Readonly<{
|
|
23
|
-
readonly FACEBOOK: "facebook";
|
|
24
|
-
readonly DROPBOX: "dropbox";
|
|
25
|
-
readonly GDRIVE: "gdrive";
|
|
26
|
-
readonly GPHOTOS: "gphotos";
|
|
27
|
-
readonly FLICKR: "flickr";
|
|
28
|
-
readonly VK: "vk";
|
|
29
|
-
readonly EVERNOTE: "evernote";
|
|
30
|
-
readonly BOX: "box";
|
|
31
|
-
readonly ONEDRIVE: "onedrive";
|
|
32
|
-
readonly HUDDLE: "huddle";
|
|
33
|
-
readonly MOBILE_VIDEO_CAMERA: "mobile-video-camera";
|
|
34
|
-
readonly MOBILE_PHOTO_CAMERA: "mobile-photo-camera";
|
|
35
|
-
readonly LOCAL: "local";
|
|
36
|
-
readonly DROP_AREA: "drop-area";
|
|
37
|
-
readonly CAMERA: "camera";
|
|
38
|
-
readonly EXTERNAL: "external";
|
|
39
|
-
readonly API: "js-api";
|
|
40
|
-
readonly URL: "url";
|
|
41
|
-
readonly DRAW: "draw";
|
|
42
|
-
}>;
|
|
43
|
-
type SourceTypes = (typeof UploadSource)[keyof typeof UploadSource];
|
|
44
|
-
|
|
45
10
|
declare class A11y {
|
|
46
11
|
private _destroyKeyUX;
|
|
47
12
|
private readonly _scopedWindow;
|
|
@@ -182,7 +147,7 @@ declare class Block extends BaseComponent<any> {
|
|
|
182
147
|
static StateConsumerScope: string | null;
|
|
183
148
|
static styleAttrs: string[];
|
|
184
149
|
protected requireCtxName: boolean;
|
|
185
|
-
activityType:
|
|
150
|
+
activityType: ActivityType;
|
|
186
151
|
init$: {};
|
|
187
152
|
l10n(str: string, variables?: Record<string, string | number>): string;
|
|
188
153
|
private pluralize;
|
|
@@ -479,8 +444,8 @@ declare class ValidationManager {
|
|
|
479
444
|
private _getValidatorDescriptorsForEntry;
|
|
480
445
|
}
|
|
481
446
|
|
|
482
|
-
type CameraMode =
|
|
483
|
-
type CameraStatus =
|
|
447
|
+
type CameraMode = 'photo' | 'video';
|
|
448
|
+
type CameraStatus = 'shot' | 'retake' | 'accept' | 'play' | 'stop' | 'pause' | 'resume';
|
|
484
449
|
declare class CameraSource extends UploaderBlock {
|
|
485
450
|
couldBeCtxOwner: boolean;
|
|
486
451
|
activityType: "camera";
|
|
@@ -580,12 +545,52 @@ declare class UploadList extends UploaderBlock {
|
|
|
580
545
|
destroyCallback(): void;
|
|
581
546
|
}
|
|
582
547
|
|
|
548
|
+
declare const ExternalUploadSource: Readonly<{
|
|
549
|
+
readonly FACEBOOK: "facebook";
|
|
550
|
+
readonly DROPBOX: "dropbox";
|
|
551
|
+
readonly GDRIVE: "gdrive";
|
|
552
|
+
readonly GPHOTOS: "gphotos";
|
|
553
|
+
readonly FLICKR: "flickr";
|
|
554
|
+
readonly VK: "vk";
|
|
555
|
+
readonly EVERNOTE: "evernote";
|
|
556
|
+
readonly BOX: "box";
|
|
557
|
+
readonly ONEDRIVE: "onedrive";
|
|
558
|
+
readonly HUDDLE: "huddle";
|
|
559
|
+
}>;
|
|
560
|
+
declare const UploadSource: Readonly<{
|
|
561
|
+
readonly FACEBOOK: "facebook";
|
|
562
|
+
readonly DROPBOX: "dropbox";
|
|
563
|
+
readonly GDRIVE: "gdrive";
|
|
564
|
+
readonly GPHOTOS: "gphotos";
|
|
565
|
+
readonly FLICKR: "flickr";
|
|
566
|
+
readonly VK: "vk";
|
|
567
|
+
readonly EVERNOTE: "evernote";
|
|
568
|
+
readonly BOX: "box";
|
|
569
|
+
readonly ONEDRIVE: "onedrive";
|
|
570
|
+
readonly HUDDLE: "huddle";
|
|
571
|
+
readonly MOBILE_VIDEO_CAMERA: "mobile-video-camera";
|
|
572
|
+
readonly MOBILE_PHOTO_CAMERA: "mobile-photo-camera";
|
|
573
|
+
readonly LOCAL: "local";
|
|
574
|
+
readonly DROP_AREA: "drop-area";
|
|
575
|
+
readonly CAMERA: "camera";
|
|
576
|
+
readonly EXTERNAL: "external";
|
|
577
|
+
readonly API: "js-api";
|
|
578
|
+
readonly URL: "url";
|
|
579
|
+
readonly DRAW: "draw";
|
|
580
|
+
}>;
|
|
581
|
+
type SourceTypes = (typeof UploadSource)[keyof typeof UploadSource];
|
|
582
|
+
|
|
583
583
|
declare const CameraSourceTypes: Readonly<{
|
|
584
584
|
PHOTO: "photo";
|
|
585
585
|
VIDEO: "video";
|
|
586
586
|
}>;
|
|
587
587
|
type ModeCameraType = (typeof CameraSourceTypes)[keyof typeof CameraSourceTypes];
|
|
588
588
|
|
|
589
|
+
type ApiAddFileCommonOptions = {
|
|
590
|
+
silent?: boolean;
|
|
591
|
+
fileName?: string;
|
|
592
|
+
source?: string;
|
|
593
|
+
};
|
|
589
594
|
declare class UploaderPublicApi {
|
|
590
595
|
private _ctx;
|
|
591
596
|
constructor(ctx: UploaderBlock);
|
|
@@ -595,25 +600,10 @@ declare class UploaderPublicApi {
|
|
|
595
600
|
/**
|
|
596
601
|
* TODO: Probably we should not allow user to override `source` property
|
|
597
602
|
*/
|
|
598
|
-
addFileFromUrl: (url: string, { silent, fileName, source
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
}) => OutputFileEntry<"idle">;
|
|
603
|
-
addFileFromUuid: (uuid: string, { silent, fileName, source, }?: {
|
|
604
|
-
silent?: boolean;
|
|
605
|
-
fileName?: string;
|
|
606
|
-
source?: string;
|
|
607
|
-
}) => OutputFileEntry<"idle">;
|
|
608
|
-
addFileFromCdnUrl: (cdnUrl: string, { silent, fileName, source, }?: {
|
|
609
|
-
silent?: boolean;
|
|
610
|
-
fileName?: string;
|
|
611
|
-
source?: string;
|
|
612
|
-
}) => OutputFileEntry<"idle">;
|
|
613
|
-
addFileFromObject: (file: File, { silent, fileName, source, fullPath, }?: {
|
|
614
|
-
silent?: boolean;
|
|
615
|
-
fileName?: string;
|
|
616
|
-
source?: string;
|
|
603
|
+
addFileFromUrl: (url: string, { silent, fileName, source }?: ApiAddFileCommonOptions) => OutputFileEntry<"idle">;
|
|
604
|
+
addFileFromUuid: (uuid: string, { silent, fileName, source }?: ApiAddFileCommonOptions) => OutputFileEntry<"idle">;
|
|
605
|
+
addFileFromCdnUrl: (cdnUrl: string, { silent, fileName, source }?: ApiAddFileCommonOptions) => OutputFileEntry<"idle">;
|
|
606
|
+
addFileFromObject: (file: File, { silent, fileName, source, fullPath, }?: ApiAddFileCommonOptions & {
|
|
617
607
|
fullPath?: string;
|
|
618
608
|
}) => OutputFileEntry<"idle">;
|
|
619
609
|
removeFileByInternalId: (internalId: string) => void;
|
|
@@ -2040,4 +2030,4 @@ declare class FileUploaderRegular extends SolutionBlock {
|
|
|
2040
2030
|
type KebabCase<T extends string> = T extends `${infer Head} ${infer Tail}` ? `${Lowercase<Head>}-${KebabCase<Tail>}` : Lowercase<T>;
|
|
2041
2031
|
declare const toKebabCase: <T extends string>(str: T) => KebabCase<T>;
|
|
2042
2032
|
|
|
2043
|
-
export { ActivityBlock, ActivityHeader, Block, BtnUi, CameraSource, CloudImageEditor, CloudImageEditorActivity, CloudImageEditorBlock, type CollectionValidators, Config, type ConfigAttributesType, type ConfigComplexType, type ConfigPlainType, type ConfigType, Copyright, CropFrame, 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, PresenceToggle, ProgressBar, ProgressBarCommon, type SecureDeliveryProxyUrlResolver, type SecureUploadsSignatureAndExpire, type SecureUploadsSignatureResolver, Select, SimpleBtn, SliderUi, SolutionBlock, SourceBtn, SourceList, type SourceTypes, Spinner, StartFrom, Thumb, UploadCtxProvider, UploadList, UploadSource, UploaderBlock, UploaderPublicApi, UrlSource, defineComponents, defineLocale, toKebabCase };
|
|
2033
|
+
export { ActivityBlock, ActivityHeader, type ApiAddFileCommonOptions, Block, BtnUi, CameraSource, CloudImageEditor, CloudImageEditorActivity, CloudImageEditorBlock, type CollectionValidators, Config, type ConfigAttributesType, type ConfigComplexType, type ConfigPlainType, type ConfigType, Copyright, CropFrame, 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, PresenceToggle, ProgressBar, ProgressBarCommon, type SecureDeliveryProxyUrlResolver, type SecureUploadsSignatureAndExpire, type SecureUploadsSignatureResolver, Select, SimpleBtn, SliderUi, SolutionBlock, SourceBtn, SourceList, type SourceTypes, Spinner, StartFrom, Thumb, UploadCtxProvider, UploadList, UploadSource, UploaderBlock, UploaderPublicApi, UrlSource, defineComponents, defineLocale, toKebabCase };
|