@uploadcare/file-uploader 1.25.0-alpha.8 → 1.25.0-alpha.9
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 +52 -46
- package/dist/index.js +4 -4
- package/dist/index.layered.css +2 -2
- package/dist/index.ssr.js +31 -20
- 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 +52 -46
- package/web/file-uploader.iife.min.js +4 -4
- package/web/file-uploader.min.d.ts +52 -46
- 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 +50 -45
- package/web/uc-cloud-image-editor.min.js +4 -4
- 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 +52 -46
- 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 +52 -46
- 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 +52 -46
- package/web/uc-file-uploader-regular.min.js +4 -4
- package/web/uc-img.min.js +3 -3
|
@@ -65,7 +65,8 @@ type Uid = string & {
|
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
declare class UID {
|
|
68
|
-
static
|
|
68
|
+
static generateFastUid(): Uid;
|
|
69
|
+
static generateRandomUUID(): string;
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
declare function defineComponents(blockExports: Record<string, any>): void;
|
|
@@ -116,7 +117,7 @@ declare class TypedData<T extends Record<string, unknown>> {
|
|
|
116
117
|
setMultipleValues(updObj: Partial<T>): void;
|
|
117
118
|
getValue<K extends keyof T>(prop: K): T[K];
|
|
118
119
|
subscribe<K extends keyof T>(prop: K, handler: (newVal: T[K]) => void): Subscription;
|
|
119
|
-
|
|
120
|
+
destroy(): void;
|
|
120
121
|
}
|
|
121
122
|
|
|
122
123
|
interface UploadEntryData extends Record<string, unknown> {
|
|
@@ -379,6 +380,51 @@ declare const UploadSource: Readonly<{
|
|
|
379
380
|
}>;
|
|
380
381
|
type SourceTypes = (typeof UploadSource)[keyof typeof UploadSource];
|
|
381
382
|
|
|
383
|
+
type ChangeMap<T extends Record<string, unknown>> = Record<keyof T, Set<Uid>>;
|
|
384
|
+
type TypedCollectionPropertyObserver<T extends Record<string, unknown>> = (changeMap: ChangeMap<T>) => void;
|
|
385
|
+
type TypedCollectionObserverHandler<T extends Record<string, unknown>> = (list: Uid[], added: Set<TypedData<T>>, removed: Set<TypedData<T>>) => void;
|
|
386
|
+
type TypedCollectionOptions<T extends Record<string, unknown>> = {
|
|
387
|
+
initialValue: T;
|
|
388
|
+
watchList?: (keyof T)[];
|
|
389
|
+
handler?: TypedCollectionObserverHandler<T>;
|
|
390
|
+
};
|
|
391
|
+
declare class TypedCollection<T extends Record<string, unknown>> {
|
|
392
|
+
private static readonly _destroyDelayMs;
|
|
393
|
+
private _ctxId;
|
|
394
|
+
private _data;
|
|
395
|
+
private _watchList;
|
|
396
|
+
private _subsMap;
|
|
397
|
+
private _propertyObservers;
|
|
398
|
+
private _collectionObservers;
|
|
399
|
+
private _items;
|
|
400
|
+
private _removed;
|
|
401
|
+
private _added;
|
|
402
|
+
private _markedToDestroy;
|
|
403
|
+
private _observeTimeout?;
|
|
404
|
+
private _notifyTimeout?;
|
|
405
|
+
private _destroyTimeout?;
|
|
406
|
+
private _notifyObservers;
|
|
407
|
+
private _initialValue;
|
|
408
|
+
constructor(options: TypedCollectionOptions<T>);
|
|
409
|
+
private _notify;
|
|
410
|
+
private _scheduleDestroyMarkedItems;
|
|
411
|
+
observeCollection(handler: TypedCollectionObserverHandler<T>): () => void;
|
|
412
|
+
unobserveCollection(handler: TypedCollectionObserverHandler<T>): void;
|
|
413
|
+
add(init: Partial<T>): Uid;
|
|
414
|
+
hasItem(id: Uid): boolean;
|
|
415
|
+
read(id: Uid): TypedData<T> | null;
|
|
416
|
+
readProp<K extends keyof T>(id: Uid, propName: K): T[K];
|
|
417
|
+
publishProp<K extends keyof T>(id: Uid, propName: K, value: T[K]): void;
|
|
418
|
+
remove(id: Uid): void;
|
|
419
|
+
clearAll(): void;
|
|
420
|
+
observeProperties(handler: TypedCollectionPropertyObserver<T>): () => void;
|
|
421
|
+
unobserveProperties(handler: TypedCollectionPropertyObserver<T>): void;
|
|
422
|
+
findItems(checkFn: (item: TypedData<T>) => boolean): Uid[];
|
|
423
|
+
items(): Uid[];
|
|
424
|
+
get size(): number;
|
|
425
|
+
destroy(): void;
|
|
426
|
+
}
|
|
427
|
+
|
|
382
428
|
declare const CameraSourceTypes: Readonly<{
|
|
383
429
|
PHOTO: "photo";
|
|
384
430
|
VIDEO: "video";
|
|
@@ -393,7 +439,7 @@ type ApiAddFileCommonOptions = {
|
|
|
393
439
|
declare class UploaderPublicApi {
|
|
394
440
|
private _ctx;
|
|
395
441
|
constructor(ctx: LitUploaderBlock);
|
|
396
|
-
|
|
442
|
+
get _uploadCollection(): TypedCollection<UploadEntryData>;
|
|
397
443
|
get cfg(): ConfigType;
|
|
398
444
|
get l10n(): (str: string, variables?: Record<string, string | number>) => string;
|
|
399
445
|
/**
|
|
@@ -898,46 +944,6 @@ declare class SecureUploadsManager {
|
|
|
898
944
|
getSecureToken(): Promise<SecureUploadsSignatureAndExpire | null>;
|
|
899
945
|
}
|
|
900
946
|
|
|
901
|
-
type ChangeMap<T extends Record<string, unknown>> = Record<keyof T, Set<Uid>>;
|
|
902
|
-
type TypedCollectionPropertyObserver<T extends Record<string, unknown>> = (changeMap: ChangeMap<T>) => void;
|
|
903
|
-
type TypedCollectionObserverHandler<T extends Record<string, unknown>> = (list: Uid[], added: Set<TypedData<T>>, removed: Set<TypedData<T>>) => void;
|
|
904
|
-
type TypedCollectionOptions<T extends Record<string, unknown>> = {
|
|
905
|
-
initialValue: T;
|
|
906
|
-
watchList?: (keyof T)[];
|
|
907
|
-
handler?: TypedCollectionObserverHandler<T>;
|
|
908
|
-
};
|
|
909
|
-
declare class TypedCollection<T extends Record<string, unknown>> {
|
|
910
|
-
private _ctxId;
|
|
911
|
-
private _data;
|
|
912
|
-
private _watchList;
|
|
913
|
-
private _subsMap;
|
|
914
|
-
private _propertyObservers;
|
|
915
|
-
private _collectionObservers;
|
|
916
|
-
private _items;
|
|
917
|
-
private _removed;
|
|
918
|
-
private _added;
|
|
919
|
-
private _observeTimeout?;
|
|
920
|
-
private _notifyTimeout?;
|
|
921
|
-
private _notifyObservers;
|
|
922
|
-
private _initialValue;
|
|
923
|
-
constructor(options: TypedCollectionOptions<T>);
|
|
924
|
-
private _notify;
|
|
925
|
-
observeCollection(handler: TypedCollectionObserverHandler<T>): () => void;
|
|
926
|
-
unobserveCollection(handler: TypedCollectionObserverHandler<T>): void;
|
|
927
|
-
add(init: Partial<T>): string;
|
|
928
|
-
read(id: Uid): TypedData<T> | null;
|
|
929
|
-
readProp<K extends keyof T>(id: Uid, propName: K): T[K];
|
|
930
|
-
publishProp<K extends keyof T>(id: Uid, propName: K, value: T[K]): void;
|
|
931
|
-
remove(id: Uid): void;
|
|
932
|
-
clearAll(): void;
|
|
933
|
-
observeProperties(handler: TypedCollectionPropertyObserver<T>): () => void;
|
|
934
|
-
unobserveProperties(handler: TypedCollectionPropertyObserver<T>): void;
|
|
935
|
-
findItems(checkFn: (item: TypedData<T>) => boolean): Uid[];
|
|
936
|
-
items(): Uid[];
|
|
937
|
-
get size(): number;
|
|
938
|
-
destroy(): void;
|
|
939
|
-
}
|
|
940
|
-
|
|
941
947
|
declare class LitUploaderBlock extends LitActivityBlock {
|
|
942
948
|
static extSrcList: Readonly<typeof ExternalUploadSource>;
|
|
943
949
|
static sourceTypes: Readonly<typeof UploadSource>;
|
|
@@ -1428,9 +1434,9 @@ declare class LitBlock extends LitBlockBase {
|
|
|
1428
1434
|
declare class Modal extends LitBlock {
|
|
1429
1435
|
static styleAttrs: string[];
|
|
1430
1436
|
private _mouseDownTarget;
|
|
1431
|
-
/** WARNING: Do not this, it's used in dashboard */
|
|
1437
|
+
/** WARNING: Do not rename/change this, it's used in dashboard */
|
|
1432
1438
|
protected dialogEl: lit_html_directives_ref_js.Ref<HTMLDialogElement>;
|
|
1433
|
-
/** WARNING: Do not this, it's used in dashboard */
|
|
1439
|
+
/** WARNING: Do not rename/change this, it's used in dashboard */
|
|
1434
1440
|
protected closeDialog: () => void;
|
|
1435
1441
|
private _handleDialogClose;
|
|
1436
1442
|
private _handleDialogMouseDown;
|
|
@@ -1829,6 +1835,7 @@ declare class CloudImageEditorBlock extends LitBlock {
|
|
|
1829
1835
|
declare class CropFrame extends LitBlock {
|
|
1830
1836
|
private _backdropMask?;
|
|
1831
1837
|
private _backdropMaskInner?;
|
|
1838
|
+
private readonly _backdropMaskId;
|
|
1832
1839
|
private _frameThumbs?;
|
|
1833
1840
|
private _frameGuides?;
|
|
1834
1841
|
private _draggingThumb?;
|
|
@@ -2146,7 +2153,6 @@ type Theme = string | null;
|
|
|
2146
2153
|
declare class BtnUi extends LitBlock {
|
|
2147
2154
|
text: string;
|
|
2148
2155
|
icon: string;
|
|
2149
|
-
active: boolean;
|
|
2150
2156
|
reverse: boolean;
|
|
2151
2157
|
theme: Theme;
|
|
2152
2158
|
ariaRole: string;
|