@uploadcare/file-uploader 1.24.4 → 1.25.0-alpha.0
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 +4 -0
- package/dist/env.js +1 -1
- package/dist/index.css +480 -530
- package/dist/index.d.ts +868 -539
- package/dist/index.js +7615 -6044
- package/dist/index.layered.css +2723 -0
- package/dist/index.ssr.js +533 -762
- package/dist/lit.d.ts +1 -0
- package/dist/lit.js +28 -0
- package/dist/locales/file-uploader/ar.js +1 -1
- package/dist/locales/file-uploader/az.js +1 -1
- package/dist/locales/file-uploader/ca.js +1 -1
- package/dist/locales/file-uploader/cs.js +1 -1
- package/dist/locales/file-uploader/da.js +1 -1
- package/dist/locales/file-uploader/de.js +1 -1
- package/dist/locales/file-uploader/el.js +1 -1
- package/dist/locales/file-uploader/en.js +1 -1
- package/dist/locales/file-uploader/es.js +1 -1
- package/dist/locales/file-uploader/et.js +1 -1
- package/dist/locales/file-uploader/fi.js +1 -1
- package/dist/locales/file-uploader/fr.js +1 -1
- package/dist/locales/file-uploader/he.js +1 -1
- package/dist/locales/file-uploader/hy.js +1 -1
- package/dist/locales/file-uploader/is.js +1 -1
- package/dist/locales/file-uploader/it.js +1 -1
- package/dist/locales/file-uploader/ja.js +1 -1
- package/dist/locales/file-uploader/ka.js +1 -1
- package/dist/locales/file-uploader/kk.js +1 -1
- package/dist/locales/file-uploader/ko.js +1 -1
- package/dist/locales/file-uploader/lv.js +1 -1
- package/dist/locales/file-uploader/nb.js +1 -1
- package/dist/locales/file-uploader/nl.js +2 -2
- package/dist/locales/file-uploader/pl.js +1 -1
- package/dist/locales/file-uploader/pt.js +1 -1
- package/dist/locales/file-uploader/ro.js +1 -1
- package/dist/locales/file-uploader/ru.js +1 -1
- package/dist/locales/file-uploader/sk.js +1 -1
- package/dist/locales/file-uploader/sr.js +1 -1
- package/dist/locales/file-uploader/sv.js +1 -1
- package/dist/locales/file-uploader/tr.js +1 -1
- package/dist/locales/file-uploader/uk.js +1 -1
- package/dist/locales/file-uploader/vi.js +1 -1
- package/dist/locales/file-uploader/zh-TW.js +1 -1
- package/dist/locales/file-uploader/zh.js +1 -1
- package/package.json +35 -25
- package/web/file-uploader.iife.min.d.ts +872 -543
- package/web/file-uploader.iife.min.js +8 -4
- package/web/file-uploader.min.d.ts +872 -543
- package/web/file-uploader.min.js +7 -4
- package/web/uc-basic.layered.min.css +26 -0
- package/web/uc-basic.min.css +2 -3
- package/web/uc-cloud-image-editor.layered.min.css +26 -0
- package/web/uc-cloud-image-editor.min.css +1 -2
- package/web/uc-cloud-image-editor.min.d.ts +440 -235
- package/web/uc-cloud-image-editor.min.js +7 -4
- package/web/uc-file-uploader-inline.layered.min.css +26 -0
- package/web/uc-file-uploader-inline.min.css +2 -3
- package/web/uc-file-uploader-inline.min.d.ts +872 -543
- package/web/uc-file-uploader-inline.min.js +7 -4
- package/web/uc-file-uploader-minimal.layered.min.css +26 -0
- package/web/uc-file-uploader-minimal.min.css +2 -3
- package/web/uc-file-uploader-minimal.min.d.ts +872 -543
- package/web/uc-file-uploader-minimal.min.js +7 -4
- package/web/uc-file-uploader-regular.layered.min.css +26 -0
- package/web/uc-file-uploader-regular.min.css +2 -3
- package/web/uc-file-uploader-regular.min.d.ts +872 -543
- package/web/uc-file-uploader-regular.min.js +7 -4
- package/web/uc-img.min.d.ts +56 -91
- package/web/uc-img.min.js +3 -3
|
@@ -1,11 +1,121 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as lit_html from 'lit-html';
|
|
2
|
+
import { LitElement, PropertyValues, TemplateResult } from 'lit';
|
|
3
|
+
import { PubSub } from '@symbiotejs/symbiote';
|
|
4
|
+
import { TelemetryRequest } from '@uploadcare/quality-insights';
|
|
2
5
|
import * as _uploadcare_upload_client from '@uploadcare/upload-client';
|
|
3
6
|
import { UploadcareFile, Metadata, UploadError, NetworkError, UploadcareGroup, FileFromOptions } from '@uploadcare/upload-client';
|
|
4
|
-
import {
|
|
7
|
+
import { Ref } from 'lit/directives/ref.js';
|
|
8
|
+
|
|
9
|
+
type Constructor$1<T = {}> = new (...args: any[]) => T;
|
|
10
|
+
|
|
11
|
+
declare class A11y {
|
|
12
|
+
private _destroyKeyUX;
|
|
13
|
+
private readonly _scopedWindow;
|
|
14
|
+
constructor();
|
|
15
|
+
registerBlock(scope: LitBlock): void;
|
|
16
|
+
destroy(): void;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare class LocaleManager {
|
|
20
|
+
private _blockInstance;
|
|
21
|
+
private _localeName;
|
|
22
|
+
constructor(blockInstance: LitBlock);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare class Modal extends LitBlock {
|
|
26
|
+
static styleAttrs: string[];
|
|
27
|
+
private _mouseDownTarget;
|
|
28
|
+
private dialogEl;
|
|
29
|
+
handleModalOpen: ModalCb;
|
|
30
|
+
handleModalClose: ModalCb;
|
|
31
|
+
handleModalCloseAll: ModalCb;
|
|
32
|
+
_handleBackdropClick: () => void;
|
|
33
|
+
_closeDialog: () => void;
|
|
34
|
+
_handleDialogClose: () => void;
|
|
35
|
+
_handleDialogMouseDown: (e: MouseEvent) => void;
|
|
36
|
+
_handleDialogMouseUp: (e: MouseEvent) => void;
|
|
37
|
+
show(): void;
|
|
38
|
+
hide(): void;
|
|
39
|
+
private _handleModalOpen;
|
|
40
|
+
private _handleModalClose;
|
|
41
|
+
private _handleModalCloseAll;
|
|
42
|
+
initCallback(): void;
|
|
43
|
+
disconnectedCallback(): void;
|
|
44
|
+
private handleDialogRef;
|
|
45
|
+
render(): lit_html.TemplateResult<1>;
|
|
46
|
+
}
|
|
5
47
|
|
|
6
48
|
type LocaleDefinition = Record<string, string>;
|
|
7
49
|
|
|
8
|
-
declare
|
|
50
|
+
declare const InternalEventType: Readonly<{
|
|
51
|
+
readonly INIT_SOLUTION: "init-solution";
|
|
52
|
+
readonly CHANGE_CONFIG: "change-config";
|
|
53
|
+
readonly ACTION_EVENT: "action-event";
|
|
54
|
+
readonly ERROR_EVENT: "error-event";
|
|
55
|
+
}>;
|
|
56
|
+
declare const EventType: Readonly<{
|
|
57
|
+
readonly FILE_ADDED: "file-added";
|
|
58
|
+
readonly FILE_REMOVED: "file-removed";
|
|
59
|
+
readonly FILE_UPLOAD_START: "file-upload-start";
|
|
60
|
+
readonly FILE_UPLOAD_PROGRESS: "file-upload-progress";
|
|
61
|
+
readonly FILE_UPLOAD_SUCCESS: "file-upload-success";
|
|
62
|
+
readonly FILE_UPLOAD_FAILED: "file-upload-failed";
|
|
63
|
+
readonly FILE_URL_CHANGED: "file-url-changed";
|
|
64
|
+
readonly MODAL_OPEN: "modal-open";
|
|
65
|
+
readonly MODAL_CLOSE: "modal-close";
|
|
66
|
+
readonly DONE_CLICK: "done-click";
|
|
67
|
+
readonly UPLOAD_CLICK: "upload-click";
|
|
68
|
+
readonly ACTIVITY_CHANGE: "activity-change";
|
|
69
|
+
readonly COMMON_UPLOAD_START: "common-upload-start";
|
|
70
|
+
readonly COMMON_UPLOAD_PROGRESS: "common-upload-progress";
|
|
71
|
+
readonly COMMON_UPLOAD_SUCCESS: "common-upload-success";
|
|
72
|
+
readonly COMMON_UPLOAD_FAILED: "common-upload-failed";
|
|
73
|
+
readonly CHANGE: "change";
|
|
74
|
+
readonly GROUP_CREATED: "group-created";
|
|
75
|
+
}>;
|
|
76
|
+
type EventKey = (typeof EventType)[keyof typeof EventType];
|
|
77
|
+
type InternalEventKey = (typeof InternalEventType)[keyof typeof InternalEventType];
|
|
78
|
+
type EventPayload = {
|
|
79
|
+
[EventType.FILE_ADDED]: OutputFileEntry<'idle'>;
|
|
80
|
+
[EventType.FILE_REMOVED]: OutputFileEntry<'removed'>;
|
|
81
|
+
[EventType.FILE_UPLOAD_START]: OutputFileEntry<'uploading'>;
|
|
82
|
+
[EventType.FILE_UPLOAD_PROGRESS]: OutputFileEntry<'uploading'>;
|
|
83
|
+
[EventType.FILE_UPLOAD_SUCCESS]: OutputFileEntry<'success'>;
|
|
84
|
+
[EventType.FILE_UPLOAD_FAILED]: OutputFileEntry<'failed'>;
|
|
85
|
+
[EventType.FILE_URL_CHANGED]: OutputFileEntry<'success'>;
|
|
86
|
+
[EventType.MODAL_OPEN]: {
|
|
87
|
+
modalId: ModalId;
|
|
88
|
+
};
|
|
89
|
+
[EventType.MODAL_CLOSE]: {
|
|
90
|
+
modalId: ModalId;
|
|
91
|
+
hasActiveModals: boolean;
|
|
92
|
+
};
|
|
93
|
+
[EventType.ACTIVITY_CHANGE]: {
|
|
94
|
+
activity: ActivityType;
|
|
95
|
+
};
|
|
96
|
+
[EventType.UPLOAD_CLICK]: void;
|
|
97
|
+
[EventType.DONE_CLICK]: OutputCollectionState;
|
|
98
|
+
[EventType.COMMON_UPLOAD_START]: OutputCollectionState<'uploading'>;
|
|
99
|
+
[EventType.COMMON_UPLOAD_PROGRESS]: OutputCollectionState<'uploading'>;
|
|
100
|
+
[EventType.COMMON_UPLOAD_SUCCESS]: OutputCollectionState<'success'>;
|
|
101
|
+
[EventType.COMMON_UPLOAD_FAILED]: OutputCollectionState<'failed'>;
|
|
102
|
+
[EventType.CHANGE]: OutputCollectionState;
|
|
103
|
+
[EventType.GROUP_CREATED]: OutputCollectionState<'success', 'has-group'>;
|
|
104
|
+
};
|
|
105
|
+
declare class EventEmitter {
|
|
106
|
+
private _timeoutStore;
|
|
107
|
+
private _targets;
|
|
108
|
+
private _debugPrint;
|
|
109
|
+
constructor(debugPrint: (...args: unknown[]) => void);
|
|
110
|
+
bindTarget(target: LitBlock): void;
|
|
111
|
+
unbindTarget(target: LitBlock): void;
|
|
112
|
+
private _dispatch;
|
|
113
|
+
emit<T extends EventKey, TDebounce extends boolean | number | undefined = undefined>(type: T, payload?: TDebounce extends false | undefined ? EventPayload[T] : () => EventPayload[T], options?: {
|
|
114
|
+
debounce?: TDebounce;
|
|
115
|
+
}): void;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
declare function buildOutputCollectionState<TCollectionStatus extends OutputCollectionStatus, TGroupFlag extends GroupFlag = 'maybe-has-group'>(uploaderBlock: LitUploaderBlock): OutputCollectionState<TCollectionStatus, TGroupFlag>;
|
|
9
119
|
|
|
10
120
|
type TypedSchema = Record<string, {
|
|
11
121
|
type: unknown;
|
|
@@ -30,7 +140,7 @@ declare class TypedData<T extends TypedSchema> {
|
|
|
30
140
|
getValue<K extends ExtractKeysFromSchema<T>>(prop: K): ExtractDataFromSchema<T>[K];
|
|
31
141
|
subscribe<K extends ExtractKeysFromSchema<T>>(prop: K, handler: (newVal: ExtractDataFromSchema<T>[K]) => void): {
|
|
32
142
|
remove: () => void;
|
|
33
|
-
callback:
|
|
143
|
+
callback: (val: unknown) => void;
|
|
34
144
|
};
|
|
35
145
|
remove(): void;
|
|
36
146
|
}
|
|
@@ -181,7 +291,7 @@ declare class ValidationManager {
|
|
|
181
291
|
private _queue;
|
|
182
292
|
private _runQueueDebounced;
|
|
183
293
|
private _entryValidationState;
|
|
184
|
-
constructor(blockInstance:
|
|
294
|
+
constructor(blockInstance: LitUploaderBlock);
|
|
185
295
|
runFileValidators(runOn: FileValidatorDescriptor['runOn'], entryIds?: string[]): void;
|
|
186
296
|
runCollectionValidators(): void;
|
|
187
297
|
cleanupValidationForEntry(entry: TypedData<typeof uploadEntrySchema>): void;
|
|
@@ -196,9 +306,9 @@ type CameraMode = 'photo' | 'video';
|
|
|
196
306
|
|
|
197
307
|
/** Mapping of attribute names to state */
|
|
198
308
|
declare const attrStateMapping: Record<string, string>;
|
|
199
|
-
declare class Config extends
|
|
200
|
-
|
|
201
|
-
|
|
309
|
+
declare class Config extends LitBlock {
|
|
310
|
+
init$: LitBlock["init$"] & ConfigType;
|
|
311
|
+
private computationControllers;
|
|
202
312
|
private _flushValueToAttribute;
|
|
203
313
|
private _flushValueToState;
|
|
204
314
|
private _setValue;
|
|
@@ -206,7 +316,7 @@ declare class Config extends Block {
|
|
|
206
316
|
_assertSameValueDifferentReference(key: string, previousValue: unknown, nextValue: unknown): void;
|
|
207
317
|
initCallback(): void;
|
|
208
318
|
attributeChangedCallback(name: keyof typeof attrStateMapping, oldVal: string, newVal: string): void;
|
|
209
|
-
get
|
|
319
|
+
static get observedAttributes(): string[];
|
|
210
320
|
}
|
|
211
321
|
interface Config extends ConfigType {
|
|
212
322
|
}
|
|
@@ -261,7 +371,7 @@ type ApiAddFileCommonOptions = {
|
|
|
261
371
|
};
|
|
262
372
|
declare class UploaderPublicApi {
|
|
263
373
|
private _ctx;
|
|
264
|
-
constructor(ctx:
|
|
374
|
+
constructor(ctx: LitUploaderBlock);
|
|
265
375
|
private get _uploadCollection();
|
|
266
376
|
get cfg(): ConfigType;
|
|
267
377
|
get l10n(): (str: string, variables?: Record<string, string | number>) => string;
|
|
@@ -749,7 +859,7 @@ type OutputCollectionState<TStatus extends OutputCollectionStatus = OutputCollec
|
|
|
749
859
|
declare class SecureUploadsManager {
|
|
750
860
|
private readonly _block;
|
|
751
861
|
private _secureToken;
|
|
752
|
-
constructor(block:
|
|
862
|
+
constructor(block: LitUploaderBlock);
|
|
753
863
|
private _debugPrint;
|
|
754
864
|
getSecureToken(): Promise<SecureUploadsSignatureAndExpire | null>;
|
|
755
865
|
}
|
|
@@ -795,7 +905,7 @@ declare class TypedCollection<T extends TypedSchema> {
|
|
|
795
905
|
destroy(): void;
|
|
796
906
|
}
|
|
797
907
|
|
|
798
|
-
declare class
|
|
908
|
+
declare class LitUploaderBlock extends LitActivityBlock {
|
|
799
909
|
static extSrcList: Readonly<typeof ExternalUploadSource>;
|
|
800
910
|
static sourceTypes: Readonly<typeof UploadSource>;
|
|
801
911
|
protected couldBeCtxOwner: boolean;
|
|
@@ -826,7 +936,6 @@ declare class UploaderBlock extends ActivityBlock {
|
|
|
826
936
|
destroyCtxCallback(): void;
|
|
827
937
|
disconnectedCallback(): void;
|
|
828
938
|
connectedCallback(): void;
|
|
829
|
-
destroyCallback(): void;
|
|
830
939
|
private _initCtxOwner;
|
|
831
940
|
private _observeUploadCollection;
|
|
832
941
|
private _unobserveUploadCollection;
|
|
@@ -842,6 +951,10 @@ declare class UploaderBlock extends ActivityBlock {
|
|
|
842
951
|
getOutputData(): OutputFileEntry[];
|
|
843
952
|
}
|
|
844
953
|
|
|
954
|
+
/**
|
|
955
|
+
* Mapping of loading resources per operation
|
|
956
|
+
*/
|
|
957
|
+
type LoadingOperations = Map<string, Map<string, boolean>>;
|
|
845
958
|
/**
|
|
846
959
|
* Image size
|
|
847
960
|
*/
|
|
@@ -891,7 +1004,7 @@ type ActivityParamsMap = {
|
|
|
891
1004
|
'cloud-image-edit': ActivityParams$1;
|
|
892
1005
|
external: ActivityParams;
|
|
893
1006
|
};
|
|
894
|
-
declare class
|
|
1007
|
+
declare class LitActivityBlock extends LitBlock {
|
|
895
1008
|
protected historyTracked: boolean;
|
|
896
1009
|
private [ACTIVE_PROP]?;
|
|
897
1010
|
init$: {
|
|
@@ -927,38 +1040,16 @@ declare class ActivityBlock extends Block {
|
|
|
927
1040
|
onDeactivate?: () => void;
|
|
928
1041
|
}): void;
|
|
929
1042
|
unregisterActivity(): void;
|
|
930
|
-
|
|
1043
|
+
disconnectedCallback(): void;
|
|
931
1044
|
get activityKey(): string;
|
|
932
1045
|
get activityParams(): ActivityParamsMap[keyof ActivityParamsMap];
|
|
933
|
-
get initActivity(): string;
|
|
934
|
-
get doneActivity(): string;
|
|
1046
|
+
get initActivity(): string | null;
|
|
1047
|
+
get doneActivity(): string | null;
|
|
935
1048
|
historyBack(): void;
|
|
936
1049
|
}
|
|
937
|
-
type RegisteredActivityType = (typeof
|
|
1050
|
+
type RegisteredActivityType = (typeof LitActivityBlock)['activities'][keyof (typeof LitActivityBlock)['activities']];
|
|
938
1051
|
type ActivityType = RegisteredActivityType | (string & {}) | null;
|
|
939
1052
|
|
|
940
|
-
declare class Modal extends Block {
|
|
941
|
-
static styleAttrs: string[];
|
|
942
|
-
static StateConsumerScope: string;
|
|
943
|
-
private _mouseDownTarget;
|
|
944
|
-
handleModalOpen: ModalCb;
|
|
945
|
-
handleModalClose: ModalCb;
|
|
946
|
-
handleModalCloseAll: ModalCb;
|
|
947
|
-
constructor();
|
|
948
|
-
_handleBackdropClick: () => void;
|
|
949
|
-
_closeDialog: () => void;
|
|
950
|
-
_handleDialogClose: () => void;
|
|
951
|
-
_handleDialogMouseDown: (e: MouseEvent) => void;
|
|
952
|
-
_handleDialogMouseUp: (e: MouseEvent) => void;
|
|
953
|
-
show(): void;
|
|
954
|
-
hide(): void;
|
|
955
|
-
private _handleModalOpen;
|
|
956
|
-
private _handleModalClose;
|
|
957
|
-
private _handleModalCloseAll;
|
|
958
|
-
initCallback(): void;
|
|
959
|
-
destroyCallback(): void;
|
|
960
|
-
}
|
|
961
|
-
|
|
962
1053
|
declare const ModalEvents: Readonly<{
|
|
963
1054
|
readonly ADD: "modal:add";
|
|
964
1055
|
readonly DELETE: "modal:delete";
|
|
@@ -978,7 +1069,7 @@ declare class ModalManager {
|
|
|
978
1069
|
private _activeModals;
|
|
979
1070
|
private _subscribers;
|
|
980
1071
|
private _block;
|
|
981
|
-
constructor(block:
|
|
1072
|
+
constructor(block: LitBlock);
|
|
982
1073
|
private _debugPrint;
|
|
983
1074
|
/**
|
|
984
1075
|
* Register a modal with the manager
|
|
@@ -1013,98 +1104,10 @@ declare class ModalManager {
|
|
|
1013
1104
|
destroy(): void;
|
|
1014
1105
|
}
|
|
1015
1106
|
|
|
1016
|
-
declare const InternalEventType: Readonly<{
|
|
1017
|
-
readonly INIT_SOLUTION: "init-solution";
|
|
1018
|
-
readonly CHANGE_CONFIG: "change-config";
|
|
1019
|
-
readonly ACTION_EVENT: "action-event";
|
|
1020
|
-
readonly ERROR_EVENT: "error-event";
|
|
1021
|
-
}>;
|
|
1022
|
-
declare const EventType: Readonly<{
|
|
1023
|
-
readonly FILE_ADDED: "file-added";
|
|
1024
|
-
readonly FILE_REMOVED: "file-removed";
|
|
1025
|
-
readonly FILE_UPLOAD_START: "file-upload-start";
|
|
1026
|
-
readonly FILE_UPLOAD_PROGRESS: "file-upload-progress";
|
|
1027
|
-
readonly FILE_UPLOAD_SUCCESS: "file-upload-success";
|
|
1028
|
-
readonly FILE_UPLOAD_FAILED: "file-upload-failed";
|
|
1029
|
-
readonly FILE_URL_CHANGED: "file-url-changed";
|
|
1030
|
-
readonly MODAL_OPEN: "modal-open";
|
|
1031
|
-
readonly MODAL_CLOSE: "modal-close";
|
|
1032
|
-
readonly DONE_CLICK: "done-click";
|
|
1033
|
-
readonly UPLOAD_CLICK: "upload-click";
|
|
1034
|
-
readonly ACTIVITY_CHANGE: "activity-change";
|
|
1035
|
-
readonly COMMON_UPLOAD_START: "common-upload-start";
|
|
1036
|
-
readonly COMMON_UPLOAD_PROGRESS: "common-upload-progress";
|
|
1037
|
-
readonly COMMON_UPLOAD_SUCCESS: "common-upload-success";
|
|
1038
|
-
readonly COMMON_UPLOAD_FAILED: "common-upload-failed";
|
|
1039
|
-
readonly CHANGE: "change";
|
|
1040
|
-
readonly GROUP_CREATED: "group-created";
|
|
1041
|
-
}>;
|
|
1042
|
-
type EventKey = (typeof EventType)[keyof typeof EventType];
|
|
1043
|
-
type InternalEventKey = (typeof InternalEventType)[keyof typeof InternalEventType];
|
|
1044
|
-
type EventPayload = {
|
|
1045
|
-
[EventType.FILE_ADDED]: OutputFileEntry<'idle'>;
|
|
1046
|
-
[EventType.FILE_REMOVED]: OutputFileEntry<'removed'>;
|
|
1047
|
-
[EventType.FILE_UPLOAD_START]: OutputFileEntry<'uploading'>;
|
|
1048
|
-
[EventType.FILE_UPLOAD_PROGRESS]: OutputFileEntry<'uploading'>;
|
|
1049
|
-
[EventType.FILE_UPLOAD_SUCCESS]: OutputFileEntry<'success'>;
|
|
1050
|
-
[EventType.FILE_UPLOAD_FAILED]: OutputFileEntry<'failed'>;
|
|
1051
|
-
[EventType.FILE_URL_CHANGED]: OutputFileEntry<'success'>;
|
|
1052
|
-
[EventType.MODAL_OPEN]: {
|
|
1053
|
-
modalId: ModalId;
|
|
1054
|
-
};
|
|
1055
|
-
[EventType.MODAL_CLOSE]: {
|
|
1056
|
-
modalId: ModalId;
|
|
1057
|
-
hasActiveModals: boolean;
|
|
1058
|
-
};
|
|
1059
|
-
[EventType.ACTIVITY_CHANGE]: {
|
|
1060
|
-
activity: ActivityType;
|
|
1061
|
-
};
|
|
1062
|
-
[EventType.UPLOAD_CLICK]: void;
|
|
1063
|
-
[EventType.DONE_CLICK]: OutputCollectionState;
|
|
1064
|
-
[EventType.COMMON_UPLOAD_START]: OutputCollectionState<'uploading'>;
|
|
1065
|
-
[EventType.COMMON_UPLOAD_PROGRESS]: OutputCollectionState<'uploading'>;
|
|
1066
|
-
[EventType.COMMON_UPLOAD_SUCCESS]: OutputCollectionState<'success'>;
|
|
1067
|
-
[EventType.COMMON_UPLOAD_FAILED]: OutputCollectionState<'failed'>;
|
|
1068
|
-
[EventType.CHANGE]: OutputCollectionState;
|
|
1069
|
-
[EventType.GROUP_CREATED]: OutputCollectionState<'success', 'has-group'>;
|
|
1070
|
-
};
|
|
1071
|
-
declare class EventEmitter {
|
|
1072
|
-
private _timeoutStore;
|
|
1073
|
-
private _targets;
|
|
1074
|
-
private _debugPrint;
|
|
1075
|
-
constructor(debugPrint: (...args: unknown[]) => void);
|
|
1076
|
-
bindTarget(target: Block): void;
|
|
1077
|
-
unbindTarget(target: Block): void;
|
|
1078
|
-
private _dispatch;
|
|
1079
|
-
emit<T extends EventKey, TDebounce extends boolean | number | undefined = undefined>(type: T, payload?: TDebounce extends false | undefined ? EventPayload[T] : () => EventPayload[T], options?: {
|
|
1080
|
-
debounce?: TDebounce;
|
|
1081
|
-
}): void;
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1084
|
-
declare class A11y {
|
|
1085
|
-
private _destroyKeyUX;
|
|
1086
|
-
private readonly _scopedWindow;
|
|
1087
|
-
constructor();
|
|
1088
|
-
registerBlock(scope: Block): void;
|
|
1089
|
-
destroy(): void;
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
|
-
type LocaleChangeCallback = () => void;
|
|
1093
|
-
declare class LocaleManager {
|
|
1094
|
-
private _blockInstance;
|
|
1095
|
-
private _localeName;
|
|
1096
|
-
private _callbacks;
|
|
1097
|
-
private _boundBlocks;
|
|
1098
|
-
constructor(blockInstance: Block);
|
|
1099
|
-
onLocaleChange(callback: LocaleChangeCallback): () => void;
|
|
1100
|
-
bindL10n(block: Block, key: string, resolver: LocaleChangeCallback): void;
|
|
1101
|
-
destroyL10nBindings(block: Block): void;
|
|
1102
|
-
destroy(): void;
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1105
1107
|
type CommonEventType = InternalEventKey | EventKey;
|
|
1106
1108
|
type TelemetryState = TelemetryRequest & {
|
|
1107
1109
|
eventTimestamp: number;
|
|
1110
|
+
location: string;
|
|
1108
1111
|
};
|
|
1109
1112
|
type TelemetryEventBody = Partial<Pick<TelemetryState, 'payload' | 'config'>> & {
|
|
1110
1113
|
modalId?: string;
|
|
@@ -1118,7 +1121,7 @@ declare class TelemetryManager {
|
|
|
1118
1121
|
private _initialized;
|
|
1119
1122
|
private _lastPayload;
|
|
1120
1123
|
private readonly _queue;
|
|
1121
|
-
constructor(block:
|
|
1124
|
+
constructor(block: LitBlock);
|
|
1122
1125
|
private _init;
|
|
1123
1126
|
private _setConfig;
|
|
1124
1127
|
private _formattingPayload;
|
|
@@ -1136,27 +1139,45 @@ declare class TelemetryManager {
|
|
|
1136
1139
|
private get _timestamp();
|
|
1137
1140
|
private get _solution();
|
|
1138
1141
|
private get _activity();
|
|
1142
|
+
private get _location();
|
|
1139
1143
|
}
|
|
1140
1144
|
|
|
1141
|
-
declare
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1145
|
+
declare const LitBlockBase: typeof LitElement & Constructor$1<{
|
|
1146
|
+
yield(slot: string, defaultContent?: unknown): unknown;
|
|
1147
|
+
}> & Constructor$1<{
|
|
1148
|
+
getCssData(propName: string, silentCheck?: boolean): string | number | boolean | null | undefined;
|
|
1149
|
+
}> & Constructor$1<{
|
|
1150
|
+
$: {
|
|
1151
|
+
[x: string]: any;
|
|
1152
|
+
};
|
|
1153
|
+
sub<T = unknown>(key: string, callback: (value: T) => void, init?: boolean): () => void;
|
|
1154
|
+
pub(key: string, value: unknown): void;
|
|
1155
|
+
set$(obj: {
|
|
1156
|
+
[x: string]: any;
|
|
1157
|
+
}): void;
|
|
1158
|
+
has(key: string): boolean;
|
|
1159
|
+
add(key: string, val: unknown, rewrite?: boolean): void;
|
|
1160
|
+
add$(obj: {
|
|
1161
|
+
[x: string]: any;
|
|
1162
|
+
}, rewrite?: boolean): void;
|
|
1163
|
+
initCallback(): void;
|
|
1164
|
+
sharedCtx: PubSub<Record<string, unknown>>;
|
|
1165
|
+
ctxName: string;
|
|
1166
|
+
}> & Constructor$1<LitElement> & {
|
|
1167
|
+
reg(tagName: string): void;
|
|
1168
|
+
};
|
|
1169
|
+
declare class LitBlock extends LitBlockBase {
|
|
1170
|
+
private __cfgProxy;
|
|
1147
1171
|
static styleAttrs: string[];
|
|
1148
|
-
protected requireCtxName: boolean;
|
|
1149
1172
|
activityType: ActivityType;
|
|
1150
1173
|
init$: {};
|
|
1174
|
+
constructor();
|
|
1151
1175
|
l10n(str: string, variables?: Record<string, string | number>): string;
|
|
1152
1176
|
private pluralize;
|
|
1153
|
-
protected bindL10n(key: string, resolver: () => void): void;
|
|
1154
|
-
constructor();
|
|
1155
1177
|
emit(type: Parameters<EventEmitter['emit']>[0], payload?: Parameters<EventEmitter['emit']>[1], options?: Parameters<EventEmitter['emit']>[2]): void;
|
|
1156
|
-
hasBlockInCtx(callback: (block:
|
|
1157
|
-
setOrAddState(prop: string, newVal:
|
|
1178
|
+
hasBlockInCtx(callback: (block: LitBlock) => boolean): boolean;
|
|
1179
|
+
setOrAddState(prop: string, newVal: unknown): void;
|
|
1158
1180
|
connectedCallback(): void;
|
|
1159
|
-
disconnectedCallback(): void;
|
|
1160
1181
|
initCallback(): void;
|
|
1161
1182
|
get testId(): string;
|
|
1162
1183
|
get modalManager(): ModalManager | undefined;
|
|
@@ -1167,39 +1188,89 @@ declare class Block extends BaseComponent<any> {
|
|
|
1167
1188
|
};
|
|
1168
1189
|
protected get localeManager(): LocaleManager | null;
|
|
1169
1190
|
protected get a11y(): A11y | null;
|
|
1170
|
-
protected get blocksRegistry(): Set<
|
|
1171
|
-
|
|
1191
|
+
protected get blocksRegistry(): Set<LitBlock>;
|
|
1192
|
+
disconnectedCallback(): void;
|
|
1172
1193
|
/**
|
|
1173
1194
|
* Called when the last block is removed from the context. Note that inheritors must run their callback before that.
|
|
1174
1195
|
*/
|
|
1175
1196
|
protected destroyCtxCallback(): void;
|
|
1176
1197
|
protected proxyUrl(url: string): Promise<string>;
|
|
1177
1198
|
get cfg(): ConfigType;
|
|
1178
|
-
subConfigValue<T extends keyof ConfigType>(key: T, callback: (value: ConfigType[T]) => void): void;
|
|
1199
|
+
subConfigValue<T extends keyof ConfigType>(key: T, callback: (value: ConfigType[T]) => void): () => void;
|
|
1179
1200
|
debugPrint(...args: unknown[]): void;
|
|
1180
|
-
static reg(name?: string): void;
|
|
1181
1201
|
}
|
|
1182
1202
|
|
|
1183
|
-
declare
|
|
1203
|
+
declare function initState(fnCtx: CloudImageEditorBlock): {
|
|
1204
|
+
'*originalUrl': null;
|
|
1205
|
+
'*loadingOperations': LoadingOperations;
|
|
1206
|
+
'*faderEl': null;
|
|
1207
|
+
'*cropperEl': null;
|
|
1208
|
+
'*imgEl': null;
|
|
1209
|
+
'*imgContainerEl': null;
|
|
1210
|
+
'*networkProblems': boolean;
|
|
1211
|
+
'*imageSize': null;
|
|
1212
|
+
'*editorTransformations': {};
|
|
1213
|
+
'*cropPresetList': never[];
|
|
1214
|
+
'*currentAspectRatio': null;
|
|
1215
|
+
'*tabList': readonly ["crop", "tuning", "filters"];
|
|
1216
|
+
'*tabId': "crop";
|
|
1217
|
+
'*on.retryNetwork': () => void;
|
|
1218
|
+
'*on.apply': (transformations: Transformations) => void;
|
|
1219
|
+
'*on.cancel': () => void;
|
|
1220
|
+
};
|
|
1221
|
+
|
|
1222
|
+
declare class CloudImageEditorBlock extends LitBlock {
|
|
1184
1223
|
ctxOwner: boolean;
|
|
1185
1224
|
static styleAttrs: string[];
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1225
|
+
entry: unknown;
|
|
1226
|
+
extension: string | null;
|
|
1227
|
+
editorMode: boolean;
|
|
1228
|
+
modalCaption: string;
|
|
1229
|
+
isImage: boolean;
|
|
1230
|
+
msg: string;
|
|
1231
|
+
src: string;
|
|
1232
|
+
fileType: string;
|
|
1233
|
+
showLoader: boolean;
|
|
1234
|
+
uuid: string | null;
|
|
1235
|
+
cdnUrl: string | null;
|
|
1236
|
+
cropPreset: string;
|
|
1237
|
+
tabs: string | null;
|
|
1238
|
+
presenceNetworkProblems: boolean;
|
|
1239
|
+
presenceModalCaption: boolean;
|
|
1240
|
+
presenceEditorToolbar: boolean;
|
|
1241
|
+
presenceViewerToolbar: boolean;
|
|
1242
|
+
private isInitialized;
|
|
1243
|
+
private pendingInitUpdate;
|
|
1244
|
+
private readonly _debouncedShowLoader;
|
|
1245
|
+
private readonly imgRef;
|
|
1246
|
+
private readonly cropperRef;
|
|
1247
|
+
private readonly faderRef;
|
|
1248
|
+
private readonly imgContainerRef;
|
|
1249
|
+
private readonly handleImageLoad;
|
|
1250
|
+
private readonly handleImageError;
|
|
1251
|
+
private readonly handleRetryNetwork;
|
|
1252
|
+
private scheduleInitialization;
|
|
1253
|
+
init$: ReturnType<typeof initState>;
|
|
1254
|
+
initCallback(): void;
|
|
1255
|
+
private assignSharedElements;
|
|
1256
|
+
private attachImageListeners;
|
|
1257
|
+
private detachImageListeners;
|
|
1258
|
+
private get imageClassName();
|
|
1189
1259
|
/**
|
|
1190
1260
|
* To proper work, we need non-zero size the element. So, we'll wait for it.
|
|
1191
1261
|
*/
|
|
1192
1262
|
private _waitForSize;
|
|
1193
|
-
|
|
1263
|
+
firstUpdated(_changedProperties: Map<PropertyKey, unknown>): void;
|
|
1264
|
+
disconnectedCallback(): void;
|
|
1265
|
+
render(): lit_html.TemplateResult<1>;
|
|
1266
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1267
|
+
private syncTabListFromProp;
|
|
1268
|
+
private syncCropPresetState;
|
|
1194
1269
|
updateImage(): Promise<void>;
|
|
1195
1270
|
initEditor(): Promise<void>;
|
|
1196
1271
|
}
|
|
1197
1272
|
|
|
1198
|
-
declare class CropFrame extends
|
|
1199
|
-
private readonly _handlePointerUp;
|
|
1200
|
-
private readonly _handlePointerMove;
|
|
1201
|
-
private readonly _handleSvgPointerMove;
|
|
1202
|
-
private readonly _backdropMaskId;
|
|
1273
|
+
declare class CropFrame extends LitBlock {
|
|
1203
1274
|
private _backdropMask?;
|
|
1204
1275
|
private _backdropMaskInner?;
|
|
1205
1276
|
private _frameThumbs?;
|
|
@@ -1210,7 +1281,14 @@ declare class CropFrame extends Block {
|
|
|
1210
1281
|
private _dragStartCrop?;
|
|
1211
1282
|
private _frameImage?;
|
|
1212
1283
|
private _guidesHidden;
|
|
1213
|
-
|
|
1284
|
+
private _dragging;
|
|
1285
|
+
private readonly svgRef;
|
|
1286
|
+
private _svgReady;
|
|
1287
|
+
private _pendingMaskHref;
|
|
1288
|
+
private get _svgElement();
|
|
1289
|
+
private get dragging();
|
|
1290
|
+
private set dragging(value);
|
|
1291
|
+
private _applyGuidesDragState;
|
|
1214
1292
|
private _shouldThumbBeDisabled;
|
|
1215
1293
|
private _createBackdrop;
|
|
1216
1294
|
/**
|
|
@@ -1225,41 +1303,57 @@ declare class CropFrame extends Block {
|
|
|
1225
1303
|
private _createGuides;
|
|
1226
1304
|
private _createFrame;
|
|
1227
1305
|
private _handlePointerDown;
|
|
1228
|
-
private
|
|
1229
|
-
private
|
|
1306
|
+
private readonly _handlePointerUp;
|
|
1307
|
+
private readonly _handlePointerMove;
|
|
1230
1308
|
private _calcCropBox;
|
|
1231
|
-
private
|
|
1309
|
+
private readonly _handleSvgPointerMove;
|
|
1232
1310
|
private _updateCursor;
|
|
1233
1311
|
private _createMask;
|
|
1234
1312
|
private _updateMask;
|
|
1235
1313
|
private _render;
|
|
1236
1314
|
toggleThumbs(visible: boolean): void;
|
|
1237
1315
|
initCallback(): void;
|
|
1238
|
-
|
|
1316
|
+
protected firstUpdated(_changedProperties: PropertyValues<this>): void;
|
|
1317
|
+
private _initializeSvg;
|
|
1318
|
+
disconnectedCallback(): void;
|
|
1319
|
+
render(): TemplateResult;
|
|
1239
1320
|
}
|
|
1240
1321
|
|
|
1241
|
-
declare class EditorButtonControl extends
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1322
|
+
declare class EditorButtonControl extends LitBlock {
|
|
1323
|
+
active: boolean;
|
|
1324
|
+
title: string;
|
|
1325
|
+
icon: string;
|
|
1326
|
+
titleProp: string;
|
|
1327
|
+
protected get buttonClasses(): Record<string, boolean>;
|
|
1328
|
+
private updateHostStateClasses;
|
|
1329
|
+
protected onClick(_event: MouseEvent): void;
|
|
1330
|
+
connectedCallback(): void;
|
|
1331
|
+
protected updated(changedProperties: PropertyValues): void;
|
|
1332
|
+
render(): lit_html.TemplateResult<1>;
|
|
1245
1333
|
}
|
|
1246
1334
|
|
|
1247
1335
|
declare class EditorFreeformButtonControl extends EditorButtonControl {
|
|
1248
1336
|
initCallback(): void;
|
|
1249
|
-
|
|
1337
|
+
onClick(): void;
|
|
1338
|
+
private computeTitle;
|
|
1339
|
+
render(): lit_html.TemplateResult<1>;
|
|
1250
1340
|
}
|
|
1251
|
-
|
|
1341
|
+
declare class EditorAspectRatioButtonControl extends EditorButtonControl {
|
|
1342
|
+
private _aspectRatio?;
|
|
1252
1343
|
get aspectRatio(): CropAspectRatio | undefined;
|
|
1253
1344
|
set aspectRatio(value: CropAspectRatio | undefined);
|
|
1254
|
-
}
|
|
1255
|
-
declare class EditorAspectRatioButtonControl extends EditorButtonControl {
|
|
1256
|
-
constructor();
|
|
1257
1345
|
initCallback(): void;
|
|
1258
|
-
|
|
1259
|
-
private
|
|
1260
|
-
private
|
|
1346
|
+
onClick(): void;
|
|
1347
|
+
private updateAspectRatioPresentation;
|
|
1348
|
+
private renderIcon;
|
|
1349
|
+
render(): lit_html.TemplateResult<1>;
|
|
1261
1350
|
}
|
|
1262
1351
|
|
|
1352
|
+
declare const TabId: Readonly<{
|
|
1353
|
+
readonly CROP: "crop";
|
|
1354
|
+
readonly TUNING: "tuning";
|
|
1355
|
+
readonly FILTERS: "filters";
|
|
1356
|
+
}>;
|
|
1263
1357
|
declare const ALL_COLOR_OPERATIONS: readonly ["brightness", "exposure", "gamma", "contrast", "saturation", "vibrance", "warmth", "enhance"];
|
|
1264
1358
|
type ColorOperation = (typeof ALL_COLOR_OPERATIONS)[number];
|
|
1265
1359
|
declare const ALL_FILTERS: readonly ["adaris", "briaril", "calarel", "carris", "cynarel", "cyren", "elmet", "elonni", "enzana", "erydark", "fenralan", "ferand", "galen", "gavin", "gethriel", "iorill", "iothari", "iselva", "jadis", "lavra", "misiara", "namala", "nerion", "nethari", "pamaya", "sarnar", "sedis", "sewen", "sorahel", "sorlen", "tarian", "thellassan", "varriel", "varven", "vevera", "virkas", "yedis", "yllara", "zatvel", "zevcen"];
|
|
@@ -1315,13 +1409,10 @@ declare const COLOR_OPERATIONS_CONFIG: Readonly<{
|
|
|
1315
1409
|
};
|
|
1316
1410
|
}>;
|
|
1317
1411
|
|
|
1318
|
-
interface EditorCropButtonControl {
|
|
1319
|
-
get operation(): CropOperation | undefined;
|
|
1320
|
-
set operation(value: CropOperation | undefined);
|
|
1321
|
-
}
|
|
1322
1412
|
declare class EditorCropButtonControl extends EditorButtonControl {
|
|
1323
|
-
|
|
1324
|
-
|
|
1413
|
+
operation: CropOperation | undefined;
|
|
1414
|
+
protected willUpdate(_changedProperties: PropertyValues): void;
|
|
1415
|
+
onClick(e: MouseEvent): void;
|
|
1325
1416
|
}
|
|
1326
1417
|
|
|
1327
1418
|
declare class EditorFilterControl extends EditorButtonControl {
|
|
@@ -1330,11 +1421,27 @@ declare class EditorFilterControl extends EditorButtonControl {
|
|
|
1330
1421
|
private _originalUrl;
|
|
1331
1422
|
private _observer?;
|
|
1332
1423
|
private _cancelPreload?;
|
|
1333
|
-
|
|
1424
|
+
private _lastPreviewRequestId;
|
|
1425
|
+
private previewVisibilityCheckRaf?;
|
|
1426
|
+
private previewVisibilityCheckTimeout?;
|
|
1427
|
+
private previewImage;
|
|
1428
|
+
private previewLoaded;
|
|
1429
|
+
isOriginal: boolean;
|
|
1430
|
+
iconSize: number;
|
|
1431
|
+
get filter(): string;
|
|
1432
|
+
set filter(value: string);
|
|
1433
|
+
onClick(e: MouseEvent): void;
|
|
1334
1434
|
private _previewSrc;
|
|
1335
1435
|
private _observerCallback;
|
|
1336
1436
|
initCallback(): void;
|
|
1337
|
-
|
|
1437
|
+
disconnectedCallback(): void;
|
|
1438
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1439
|
+
private updateFilterLabels;
|
|
1440
|
+
private loadPreview;
|
|
1441
|
+
private schedulePreviewVisibilityCheck;
|
|
1442
|
+
private clearPreviewVisibilityChecks;
|
|
1443
|
+
private get shouldShowPreview();
|
|
1444
|
+
render(): lit_html.TemplateResult<1>;
|
|
1338
1445
|
}
|
|
1339
1446
|
|
|
1340
1447
|
type Operations = {
|
|
@@ -1342,7 +1449,7 @@ type Operations = {
|
|
|
1342
1449
|
mirror: boolean;
|
|
1343
1450
|
rotate: number;
|
|
1344
1451
|
};
|
|
1345
|
-
declare class EditorImageCropper extends
|
|
1452
|
+
declare class EditorImageCropper extends LitBlock {
|
|
1346
1453
|
ctxOwner: boolean;
|
|
1347
1454
|
private _commitDebounced;
|
|
1348
1455
|
private _handleResizeThrottled;
|
|
@@ -1351,9 +1458,12 @@ declare class EditorImageCropper extends Block {
|
|
|
1351
1458
|
private _ctx;
|
|
1352
1459
|
private _isActive;
|
|
1353
1460
|
private _observer?;
|
|
1461
|
+
private _image;
|
|
1354
1462
|
private _cancelPreload?;
|
|
1463
|
+
private readonly canvasRef;
|
|
1464
|
+
private readonly frameRef;
|
|
1355
1465
|
constructor();
|
|
1356
|
-
|
|
1466
|
+
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
1357
1467
|
private _syncTransformations;
|
|
1358
1468
|
private _initCanvas;
|
|
1359
1469
|
private _alignImage;
|
|
@@ -1378,11 +1488,12 @@ declare class EditorImageCropper extends Block {
|
|
|
1378
1488
|
private _waitForImage;
|
|
1379
1489
|
private _handleImageLoading;
|
|
1380
1490
|
initCallback(): void;
|
|
1381
|
-
|
|
1491
|
+
disconnectedCallback(): void;
|
|
1492
|
+
render(): TemplateResult;
|
|
1382
1493
|
}
|
|
1383
1494
|
|
|
1384
1495
|
type OperationKey = keyof typeof COLOR_OPERATIONS_CONFIG;
|
|
1385
|
-
declare class EditorImageFader extends
|
|
1496
|
+
declare class EditorImageFader extends LitBlock {
|
|
1386
1497
|
private _isActive;
|
|
1387
1498
|
private _hidden;
|
|
1388
1499
|
private _operation;
|
|
@@ -1390,7 +1501,6 @@ declare class EditorImageFader extends Block {
|
|
|
1390
1501
|
private _value?;
|
|
1391
1502
|
private _transformations;
|
|
1392
1503
|
private _keypoints;
|
|
1393
|
-
private _container?;
|
|
1394
1504
|
private _previewImage?;
|
|
1395
1505
|
private _cancelLastImages?;
|
|
1396
1506
|
private _cancelBatchPreload?;
|
|
@@ -1398,6 +1508,8 @@ declare class EditorImageFader extends Block {
|
|
|
1398
1508
|
private _fromViewer?;
|
|
1399
1509
|
private _raf;
|
|
1400
1510
|
private _addKeypointDebounced;
|
|
1511
|
+
private readonly _previewHostRef;
|
|
1512
|
+
private readonly _layersHostRef;
|
|
1401
1513
|
constructor();
|
|
1402
1514
|
private _handleImageLoading;
|
|
1403
1515
|
private _flush;
|
|
@@ -1407,7 +1519,6 @@ declare class EditorImageFader extends Block {
|
|
|
1407
1519
|
* Check if current operation and filter equals passed ones
|
|
1408
1520
|
*/
|
|
1409
1521
|
private _isSame;
|
|
1410
|
-
private _addKeypoint;
|
|
1411
1522
|
set(value: string | number): void;
|
|
1412
1523
|
private _update;
|
|
1413
1524
|
private _createPreviewImage;
|
|
@@ -1430,98 +1541,187 @@ declare class EditorImageFader extends Block {
|
|
|
1430
1541
|
deactivate({ hide }?: {
|
|
1431
1542
|
hide?: boolean;
|
|
1432
1543
|
}): void;
|
|
1544
|
+
private _ensurePreviewAttached;
|
|
1545
|
+
private _clearLayersHost;
|
|
1546
|
+
render(): TemplateResult;
|
|
1433
1547
|
}
|
|
1434
1548
|
|
|
1435
1549
|
declare class EditorOperationControl extends EditorButtonControl {
|
|
1436
1550
|
private _operation;
|
|
1551
|
+
get operation(): ColorOperation | '';
|
|
1552
|
+
set operation(value: ColorOperation | '');
|
|
1553
|
+
private updateOperationMetadata;
|
|
1437
1554
|
initCallback(): void;
|
|
1555
|
+
onClick(e: MouseEvent): void;
|
|
1438
1556
|
}
|
|
1439
1557
|
|
|
1440
|
-
declare class EditorScroller extends
|
|
1441
|
-
|
|
1558
|
+
declare class EditorScroller extends LitBlock {
|
|
1559
|
+
private readonly handleWheel;
|
|
1560
|
+
connectedCallback(): void;
|
|
1561
|
+
disconnectedCallback(): void;
|
|
1442
1562
|
}
|
|
1443
1563
|
|
|
1444
1564
|
type SliderOperation = ColorOperation | 'filter';
|
|
1445
1565
|
type SliderFilter = FilterId | typeof FAKE_ORIGINAL_FILTER;
|
|
1446
1566
|
declare const FAKE_ORIGINAL_FILTER = "original";
|
|
1447
|
-
declare class EditorSlider extends
|
|
1448
|
-
private
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1567
|
+
declare class EditorSlider extends LitBlock {
|
|
1568
|
+
private state;
|
|
1569
|
+
handleInput: (e: CustomEvent<{
|
|
1570
|
+
value: number;
|
|
1571
|
+
}>) => void;
|
|
1452
1572
|
setOperation(operation: SliderOperation, filter?: SliderFilter): void;
|
|
1453
1573
|
private _initializeValues;
|
|
1454
1574
|
apply(): void;
|
|
1455
1575
|
cancel(): void;
|
|
1456
1576
|
initCallback(): void;
|
|
1577
|
+
protected updated(changedProperties: Map<PropertyKey, unknown>): void;
|
|
1578
|
+
render(): lit_html.TemplateResult<1>;
|
|
1457
1579
|
}
|
|
1458
1580
|
|
|
1459
|
-
|
|
1460
|
-
|
|
1581
|
+
type TabIdValue = (typeof TabId)[keyof typeof TabId];
|
|
1582
|
+
declare class EditorToolbar extends LitBlock {
|
|
1583
|
+
private showLoader;
|
|
1584
|
+
private showMainToolbar;
|
|
1585
|
+
private showSubToolbar;
|
|
1586
|
+
private showTabToggles;
|
|
1587
|
+
private tabList;
|
|
1588
|
+
private activeTab;
|
|
1589
|
+
private useSliderPanel;
|
|
1590
|
+
private tooltipVisible;
|
|
1591
|
+
private operationTooltip;
|
|
1592
|
+
private tabIndicatorOffset;
|
|
1593
|
+
private tabIndicatorWidth;
|
|
1594
|
+
private readonly sliderRef;
|
|
1595
|
+
private readonly tabIndicatorRef;
|
|
1596
|
+
protected readonly tabToggleRefs: Record<TabIdValue, Ref<HTMLElement>>;
|
|
1597
|
+
private readonly handleWindowResize;
|
|
1598
|
+
private cropPresets;
|
|
1461
1599
|
private _cancelPreload?;
|
|
1462
|
-
private
|
|
1463
|
-
|
|
1600
|
+
private readonly _debouncedShowLoader;
|
|
1601
|
+
private readonly _updateInfoTooltip;
|
|
1602
|
+
private readonly subTopToolbarStyles;
|
|
1603
|
+
private readonly subBottomToolbarStyles;
|
|
1604
|
+
private readonly tabContentStyles;
|
|
1605
|
+
private readonly tabToggleStyles;
|
|
1606
|
+
private readonly tabTogglesStyles;
|
|
1607
|
+
init$: Record<string, unknown>;
|
|
1464
1608
|
private _onSliderClose;
|
|
1465
|
-
private _createOperationControl;
|
|
1466
|
-
private _createFilterControl;
|
|
1467
|
-
private _createToggleControl;
|
|
1468
|
-
private _createAspectRatioControl;
|
|
1469
|
-
private _createFreeformControl;
|
|
1470
|
-
private _clearListAspectRatio;
|
|
1471
|
-
private _renderControlsList;
|
|
1472
1609
|
private _activateTab;
|
|
1473
|
-
private
|
|
1610
|
+
private applyTabState;
|
|
1474
1611
|
private _syncTabIndicator;
|
|
1612
|
+
private get hasAspectRatioPicker();
|
|
1613
|
+
private renderControlsByTab;
|
|
1614
|
+
private renderCropTabControls;
|
|
1615
|
+
private renderFilterTabControls;
|
|
1616
|
+
private renderTuningTabControls;
|
|
1617
|
+
private renderControlGroup;
|
|
1618
|
+
private renderFreeformControl;
|
|
1619
|
+
private renderAspectRatioControl;
|
|
1620
|
+
private renderCropOperationControl;
|
|
1621
|
+
private renderFilterControl;
|
|
1622
|
+
private renderOperationControl;
|
|
1623
|
+
private renderAspectRatioList;
|
|
1475
1624
|
private _preloadEditedImage;
|
|
1476
|
-
private _showLoader;
|
|
1477
|
-
private _updateInfoTooltipHandler;
|
|
1478
1625
|
initCallback(): void;
|
|
1479
|
-
|
|
1626
|
+
connectedCallback(): void;
|
|
1627
|
+
firstUpdated(_changedProperties: PropertyValues): void;
|
|
1628
|
+
protected updated(changedProperties: PropertyValues): void;
|
|
1629
|
+
disconnectedCallback(): void;
|
|
1630
|
+
private assignSharedElements;
|
|
1631
|
+
private handleCancel;
|
|
1632
|
+
private handleApply;
|
|
1633
|
+
private handleApplySlider;
|
|
1634
|
+
private handleCancelSlider;
|
|
1635
|
+
private handleTabClick;
|
|
1636
|
+
private renderTabToggle;
|
|
1637
|
+
private renderTabContent;
|
|
1638
|
+
render(): TemplateResult<1>;
|
|
1480
1639
|
}
|
|
1481
1640
|
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1641
|
+
type Theme = string | null;
|
|
1642
|
+
declare class BtnUi extends LitBlock {
|
|
1643
|
+
text: string;
|
|
1644
|
+
icon: string;
|
|
1645
|
+
active: boolean;
|
|
1646
|
+
reverse: boolean;
|
|
1647
|
+
theme: Theme;
|
|
1648
|
+
ariaRole: string;
|
|
1649
|
+
ariaControls: string;
|
|
1650
|
+
titleProp: string;
|
|
1651
|
+
protected firstUpdated(_changed: PropertyValues<this>): void;
|
|
1652
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
1653
|
+
private applyReverse;
|
|
1654
|
+
private applyThemeClass;
|
|
1655
|
+
private get iconClassMap();
|
|
1656
|
+
private get computedIconHidden();
|
|
1657
|
+
private get computedIconSingle();
|
|
1658
|
+
render(): lit_html.TemplateResult<1>;
|
|
1490
1659
|
}
|
|
1491
1660
|
|
|
1492
|
-
declare class LineLoaderUi extends
|
|
1493
|
-
|
|
1494
|
-
private readonly
|
|
1495
|
-
|
|
1496
|
-
private
|
|
1497
|
-
|
|
1661
|
+
declare class LineLoaderUi extends LitBlock {
|
|
1662
|
+
active: boolean;
|
|
1663
|
+
private readonly lineRef;
|
|
1664
|
+
private _isAnimating;
|
|
1665
|
+
private readonly handleTransitionEndRight;
|
|
1666
|
+
protected firstUpdated(_changedProperties: PropertyValues<this>): void;
|
|
1667
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1668
|
+
private start;
|
|
1669
|
+
private stop;
|
|
1670
|
+
private resetLine;
|
|
1671
|
+
render(): lit_html.TemplateResult<1>;
|
|
1498
1672
|
}
|
|
1499
1673
|
|
|
1500
|
-
|
|
1674
|
+
type PresenceToggleStyle = {
|
|
1675
|
+
transition?: string;
|
|
1676
|
+
visible?: string;
|
|
1677
|
+
hidden?: string;
|
|
1678
|
+
};
|
|
1679
|
+
declare class PresenceToggle extends LitBlock {
|
|
1501
1680
|
private _visible;
|
|
1681
|
+
private _styles;
|
|
1502
1682
|
private _visibleStyle;
|
|
1503
1683
|
private _hiddenStyle;
|
|
1504
1684
|
private _externalTransitions;
|
|
1505
|
-
|
|
1685
|
+
private initialRenderComplete;
|
|
1686
|
+
set visible(value: boolean);
|
|
1687
|
+
get visible(): boolean;
|
|
1688
|
+
set styles(styles: PresenceToggleStyle);
|
|
1689
|
+
get styles(): PresenceToggleStyle;
|
|
1506
1690
|
private _handleVisible;
|
|
1691
|
+
private dispatchInitialRenderEvent;
|
|
1507
1692
|
initCallback(): void;
|
|
1508
1693
|
}
|
|
1509
1694
|
|
|
1510
|
-
declare class SliderUi extends
|
|
1695
|
+
declare class SliderUi extends LitBlock {
|
|
1511
1696
|
private _observer?;
|
|
1512
1697
|
private _thumbSize;
|
|
1513
|
-
private _zero;
|
|
1514
1698
|
private _zeroDotEl?;
|
|
1515
1699
|
private _stepsCount?;
|
|
1700
|
+
private readonly inputRef;
|
|
1701
|
+
private readonly thumbRef;
|
|
1702
|
+
private readonly stepsRef;
|
|
1703
|
+
disabled: boolean;
|
|
1704
|
+
min: number;
|
|
1705
|
+
max: number;
|
|
1706
|
+
defaultValue: number;
|
|
1707
|
+
zero: number;
|
|
1708
|
+
private _currentValue;
|
|
1516
1709
|
constructor();
|
|
1517
|
-
|
|
1518
|
-
private
|
|
1519
|
-
private
|
|
1520
|
-
private
|
|
1710
|
+
private emitSliderEvent;
|
|
1711
|
+
private readonly handleSliderInput;
|
|
1712
|
+
private readonly handleSliderChange;
|
|
1713
|
+
private readonly handleInputFocus;
|
|
1714
|
+
private readonly handleInputBlur;
|
|
1715
|
+
protected firstUpdated(changedProperties: Map<PropertyKey, unknown>): void;
|
|
1716
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
1521
1717
|
private _updateValue;
|
|
1522
1718
|
private _updateZeroDot;
|
|
1523
1719
|
private _updateSteps;
|
|
1524
|
-
|
|
1720
|
+
disconnectedCallback(): void;
|
|
1721
|
+
private _setCurrentValue;
|
|
1722
|
+
private _syncInputValue;
|
|
1723
|
+
private _extractEventValue;
|
|
1724
|
+
render(): lit_html.TemplateResult<1>;
|
|
1525
1725
|
}
|
|
1526
1726
|
|
|
1527
1727
|
declare class CloudImageEditor extends CloudImageEditorBlock {
|
|
@@ -1532,9 +1732,14 @@ declare class CloudImageEditor extends CloudImageEditorBlock {
|
|
|
1532
1732
|
|
|
1533
1733
|
declare function defineComponents(blockExports: Record<string, any>): void;
|
|
1534
1734
|
|
|
1535
|
-
declare class Icon extends
|
|
1536
|
-
|
|
1735
|
+
declare class Icon extends LitBlock {
|
|
1736
|
+
name: string;
|
|
1737
|
+
private resolvedHref;
|
|
1738
|
+
private iconHrefResolver;
|
|
1537
1739
|
initCallback(): void;
|
|
1740
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
1741
|
+
private updateResolvedHref;
|
|
1742
|
+
render(): lit_html.TemplateResult<1>;
|
|
1538
1743
|
}
|
|
1539
1744
|
|
|
1540
1745
|
export { BtnUi, CloudImageEditor, CloudImageEditorBlock, Config, CropFrame, EditorAspectRatioButtonControl, EditorCropButtonControl, EditorFilterControl, EditorFreeformButtonControl, EditorImageCropper, EditorImageFader, EditorOperationControl, EditorScroller, EditorSlider, EditorToolbar, Icon, LineLoaderUi, PresenceToggle, SliderUi, defineComponents };
|