@uploadcare/file-uploader 1.25.0-alpha.7 → 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 +54 -47
- 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 +54 -47
- package/web/file-uploader.iife.min.js +4 -4
- package/web/file-uploader.min.d.ts +54 -47
- 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 +52 -46
- 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 +54 -47
- 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 +54 -47
- 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 +54 -47
- package/web/uc-file-uploader-regular.min.js +4 -4
- package/web/uc-img.min.js +3 -3
|
@@ -46,9 +46,10 @@ declare class LocaleManager {
|
|
|
46
46
|
declare class Modal extends LitBlock {
|
|
47
47
|
static styleAttrs: string[];
|
|
48
48
|
private _mouseDownTarget;
|
|
49
|
-
/** WARNING: Do not this, it's used in dashboard */
|
|
50
|
-
dialogEl: lit_html_directives_ref_js.Ref<HTMLDialogElement>;
|
|
51
|
-
|
|
49
|
+
/** WARNING: Do not rename/change this, it's used in dashboard */
|
|
50
|
+
protected dialogEl: lit_html_directives_ref_js.Ref<HTMLDialogElement>;
|
|
51
|
+
/** WARNING: Do not rename/change this, it's used in dashboard */
|
|
52
|
+
protected closeDialog: () => void;
|
|
52
53
|
private _handleDialogClose;
|
|
53
54
|
private _handleDialogMouseDown;
|
|
54
55
|
private _handleDialogMouseUp;
|
|
@@ -171,7 +172,7 @@ declare class TypedData<T extends Record<string, unknown>> {
|
|
|
171
172
|
setMultipleValues(updObj: Partial<T>): void;
|
|
172
173
|
getValue<K extends keyof T>(prop: K): T[K];
|
|
173
174
|
subscribe<K extends keyof T>(prop: K, handler: (newVal: T[K]) => void): Subscription;
|
|
174
|
-
|
|
175
|
+
destroy(): void;
|
|
175
176
|
}
|
|
176
177
|
|
|
177
178
|
type FuncFileValidator = (outputEntry: OutputFileEntry, api: UploaderPublicApi, options?: {
|
|
@@ -265,6 +266,51 @@ declare const UploadSource: Readonly<{
|
|
|
265
266
|
}>;
|
|
266
267
|
type SourceTypes = (typeof UploadSource)[keyof typeof UploadSource];
|
|
267
268
|
|
|
269
|
+
type ChangeMap<T extends Record<string, unknown>> = Record<keyof T, Set<Uid>>;
|
|
270
|
+
type TypedCollectionPropertyObserver<T extends Record<string, unknown>> = (changeMap: ChangeMap<T>) => void;
|
|
271
|
+
type TypedCollectionObserverHandler<T extends Record<string, unknown>> = (list: Uid[], added: Set<TypedData<T>>, removed: Set<TypedData<T>>) => void;
|
|
272
|
+
type TypedCollectionOptions<T extends Record<string, unknown>> = {
|
|
273
|
+
initialValue: T;
|
|
274
|
+
watchList?: (keyof T)[];
|
|
275
|
+
handler?: TypedCollectionObserverHandler<T>;
|
|
276
|
+
};
|
|
277
|
+
declare class TypedCollection<T extends Record<string, unknown>> {
|
|
278
|
+
private static readonly _destroyDelayMs;
|
|
279
|
+
private _ctxId;
|
|
280
|
+
private _data;
|
|
281
|
+
private _watchList;
|
|
282
|
+
private _subsMap;
|
|
283
|
+
private _propertyObservers;
|
|
284
|
+
private _collectionObservers;
|
|
285
|
+
private _items;
|
|
286
|
+
private _removed;
|
|
287
|
+
private _added;
|
|
288
|
+
private _markedToDestroy;
|
|
289
|
+
private _observeTimeout?;
|
|
290
|
+
private _notifyTimeout?;
|
|
291
|
+
private _destroyTimeout?;
|
|
292
|
+
private _notifyObservers;
|
|
293
|
+
private _initialValue;
|
|
294
|
+
constructor(options: TypedCollectionOptions<T>);
|
|
295
|
+
private _notify;
|
|
296
|
+
private _scheduleDestroyMarkedItems;
|
|
297
|
+
observeCollection(handler: TypedCollectionObserverHandler<T>): () => void;
|
|
298
|
+
unobserveCollection(handler: TypedCollectionObserverHandler<T>): void;
|
|
299
|
+
add(init: Partial<T>): Uid;
|
|
300
|
+
hasItem(id: Uid): boolean;
|
|
301
|
+
read(id: Uid): TypedData<T> | null;
|
|
302
|
+
readProp<K extends keyof T>(id: Uid, propName: K): T[K];
|
|
303
|
+
publishProp<K extends keyof T>(id: Uid, propName: K, value: T[K]): void;
|
|
304
|
+
remove(id: Uid): void;
|
|
305
|
+
clearAll(): void;
|
|
306
|
+
observeProperties(handler: TypedCollectionPropertyObserver<T>): () => void;
|
|
307
|
+
unobserveProperties(handler: TypedCollectionPropertyObserver<T>): void;
|
|
308
|
+
findItems(checkFn: (item: TypedData<T>) => boolean): Uid[];
|
|
309
|
+
items(): Uid[];
|
|
310
|
+
get size(): number;
|
|
311
|
+
destroy(): void;
|
|
312
|
+
}
|
|
313
|
+
|
|
268
314
|
declare const CameraSourceTypes: Readonly<{
|
|
269
315
|
PHOTO: "photo";
|
|
270
316
|
VIDEO: "video";
|
|
@@ -279,7 +325,7 @@ type ApiAddFileCommonOptions = {
|
|
|
279
325
|
declare class UploaderPublicApi {
|
|
280
326
|
private _ctx;
|
|
281
327
|
constructor(ctx: LitUploaderBlock);
|
|
282
|
-
|
|
328
|
+
get _uploadCollection(): TypedCollection<UploadEntryData>;
|
|
283
329
|
get cfg(): ConfigType;
|
|
284
330
|
get l10n(): (str: string, variables?: Record<string, string | number>) => string;
|
|
285
331
|
/**
|
|
@@ -814,46 +860,6 @@ declare class SecureUploadsManager {
|
|
|
814
860
|
getSecureToken(): Promise<SecureUploadsSignatureAndExpire | null>;
|
|
815
861
|
}
|
|
816
862
|
|
|
817
|
-
type ChangeMap<T extends Record<string, unknown>> = Record<keyof T, Set<Uid>>;
|
|
818
|
-
type TypedCollectionPropertyObserver<T extends Record<string, unknown>> = (changeMap: ChangeMap<T>) => void;
|
|
819
|
-
type TypedCollectionObserverHandler<T extends Record<string, unknown>> = (list: Uid[], added: Set<TypedData<T>>, removed: Set<TypedData<T>>) => void;
|
|
820
|
-
type TypedCollectionOptions<T extends Record<string, unknown>> = {
|
|
821
|
-
initialValue: T;
|
|
822
|
-
watchList?: (keyof T)[];
|
|
823
|
-
handler?: TypedCollectionObserverHandler<T>;
|
|
824
|
-
};
|
|
825
|
-
declare class TypedCollection<T extends Record<string, unknown>> {
|
|
826
|
-
private _ctxId;
|
|
827
|
-
private _data;
|
|
828
|
-
private _watchList;
|
|
829
|
-
private _subsMap;
|
|
830
|
-
private _propertyObservers;
|
|
831
|
-
private _collectionObservers;
|
|
832
|
-
private _items;
|
|
833
|
-
private _removed;
|
|
834
|
-
private _added;
|
|
835
|
-
private _observeTimeout?;
|
|
836
|
-
private _notifyTimeout?;
|
|
837
|
-
private _notifyObservers;
|
|
838
|
-
private _initialValue;
|
|
839
|
-
constructor(options: TypedCollectionOptions<T>);
|
|
840
|
-
private _notify;
|
|
841
|
-
observeCollection(handler: TypedCollectionObserverHandler<T>): () => void;
|
|
842
|
-
unobserveCollection(handler: TypedCollectionObserverHandler<T>): void;
|
|
843
|
-
add(init: Partial<T>): string;
|
|
844
|
-
read(id: Uid): TypedData<T> | null;
|
|
845
|
-
readProp<K extends keyof T>(id: Uid, propName: K): T[K];
|
|
846
|
-
publishProp<K extends keyof T>(id: Uid, propName: K, value: T[K]): void;
|
|
847
|
-
remove(id: Uid): void;
|
|
848
|
-
clearAll(): void;
|
|
849
|
-
observeProperties(handler: TypedCollectionPropertyObserver<T>): () => void;
|
|
850
|
-
unobserveProperties(handler: TypedCollectionPropertyObserver<T>): void;
|
|
851
|
-
findItems(checkFn: (item: TypedData<T>) => boolean): Uid[];
|
|
852
|
-
items(): Uid[];
|
|
853
|
-
get size(): number;
|
|
854
|
-
destroy(): void;
|
|
855
|
-
}
|
|
856
|
-
|
|
857
863
|
declare class LitUploaderBlock extends LitActivityBlock {
|
|
858
864
|
static extSrcList: Readonly<typeof ExternalUploadSource>;
|
|
859
865
|
static sourceTypes: Readonly<typeof UploadSource>;
|
|
@@ -1340,6 +1346,7 @@ declare class CloudImageEditorBlock extends LitBlock {
|
|
|
1340
1346
|
declare class CropFrame extends LitBlock {
|
|
1341
1347
|
private _backdropMask?;
|
|
1342
1348
|
private _backdropMaskInner?;
|
|
1349
|
+
private readonly _backdropMaskId;
|
|
1343
1350
|
private _frameThumbs?;
|
|
1344
1351
|
private _frameGuides?;
|
|
1345
1352
|
private _draggingThumb?;
|
|
@@ -1657,7 +1664,6 @@ type Theme = string | null;
|
|
|
1657
1664
|
declare class BtnUi extends LitBlock {
|
|
1658
1665
|
text: string;
|
|
1659
1666
|
icon: string;
|
|
1660
|
-
active: boolean;
|
|
1661
1667
|
reverse: boolean;
|
|
1662
1668
|
theme: Theme;
|
|
1663
1669
|
ariaRole: string;
|