@uploadcare/file-uploader 1.24.5 → 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 +16 -6
- package/dist/index.d.ts +866 -539
- package/dist/index.js +7609 -6042
- package/dist/index.layered.css +16 -6
- 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 +1 -1
- 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 +29 -24
- package/web/file-uploader.iife.min.d.ts +872 -545
- package/web/file-uploader.iife.min.js +8 -4
- package/web/file-uploader.min.d.ts +872 -545
- package/web/file-uploader.min.js +7 -4
- package/web/uc-basic.layered.min.css +1 -1
- package/web/uc-basic.min.css +1 -1
- package/web/uc-cloud-image-editor.layered.min.css +1 -1
- package/web/uc-cloud-image-editor.min.css +1 -1
- package/web/uc-cloud-image-editor.min.d.ts +438 -235
- package/web/uc-cloud-image-editor.min.js +7 -4
- package/web/uc-file-uploader-inline.layered.min.css +1 -1
- package/web/uc-file-uploader-inline.min.css +1 -1
- package/web/uc-file-uploader-inline.min.d.ts +872 -545
- package/web/uc-file-uploader-inline.min.js +7 -4
- package/web/uc-file-uploader-minimal.layered.min.css +1 -1
- package/web/uc-file-uploader-minimal.min.css +1 -1
- package/web/uc-file-uploader-minimal.min.d.ts +872 -545
- package/web/uc-file-uploader-minimal.min.js +7 -4
- package/web/uc-file-uploader-regular.layered.min.css +1 -1
- package/web/uc-file-uploader-regular.min.css +1 -1
- package/web/uc-file-uploader-regular.min.d.ts +872 -545
- 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,95 +1104,6 @@ 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;
|
|
@@ -1119,7 +1121,7 @@ declare class TelemetryManager {
|
|
|
1119
1121
|
private _initialized;
|
|
1120
1122
|
private _lastPayload;
|
|
1121
1123
|
private readonly _queue;
|
|
1122
|
-
constructor(block:
|
|
1124
|
+
constructor(block: LitBlock);
|
|
1123
1125
|
private _init;
|
|
1124
1126
|
private _setConfig;
|
|
1125
1127
|
private _formattingPayload;
|
|
@@ -1140,25 +1142,42 @@ declare class TelemetryManager {
|
|
|
1140
1142
|
private get _location();
|
|
1141
1143
|
}
|
|
1142
1144
|
|
|
1143
|
-
declare
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
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;
|
|
1149
1171
|
static styleAttrs: string[];
|
|
1150
|
-
protected requireCtxName: boolean;
|
|
1151
1172
|
activityType: ActivityType;
|
|
1152
1173
|
init$: {};
|
|
1174
|
+
constructor();
|
|
1153
1175
|
l10n(str: string, variables?: Record<string, string | number>): string;
|
|
1154
1176
|
private pluralize;
|
|
1155
|
-
protected bindL10n(key: string, resolver: () => void): void;
|
|
1156
|
-
constructor();
|
|
1157
1177
|
emit(type: Parameters<EventEmitter['emit']>[0], payload?: Parameters<EventEmitter['emit']>[1], options?: Parameters<EventEmitter['emit']>[2]): void;
|
|
1158
|
-
hasBlockInCtx(callback: (block:
|
|
1159
|
-
setOrAddState(prop: string, newVal:
|
|
1178
|
+
hasBlockInCtx(callback: (block: LitBlock) => boolean): boolean;
|
|
1179
|
+
setOrAddState(prop: string, newVal: unknown): void;
|
|
1160
1180
|
connectedCallback(): void;
|
|
1161
|
-
disconnectedCallback(): void;
|
|
1162
1181
|
initCallback(): void;
|
|
1163
1182
|
get testId(): string;
|
|
1164
1183
|
get modalManager(): ModalManager | undefined;
|
|
@@ -1169,39 +1188,89 @@ declare class Block extends BaseComponent<any> {
|
|
|
1169
1188
|
};
|
|
1170
1189
|
protected get localeManager(): LocaleManager | null;
|
|
1171
1190
|
protected get a11y(): A11y | null;
|
|
1172
|
-
protected get blocksRegistry(): Set<
|
|
1173
|
-
|
|
1191
|
+
protected get blocksRegistry(): Set<LitBlock>;
|
|
1192
|
+
disconnectedCallback(): void;
|
|
1174
1193
|
/**
|
|
1175
1194
|
* Called when the last block is removed from the context. Note that inheritors must run their callback before that.
|
|
1176
1195
|
*/
|
|
1177
1196
|
protected destroyCtxCallback(): void;
|
|
1178
1197
|
protected proxyUrl(url: string): Promise<string>;
|
|
1179
1198
|
get cfg(): ConfigType;
|
|
1180
|
-
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;
|
|
1181
1200
|
debugPrint(...args: unknown[]): void;
|
|
1182
|
-
static reg(name?: string): void;
|
|
1183
1201
|
}
|
|
1184
1202
|
|
|
1185
|
-
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 {
|
|
1186
1223
|
ctxOwner: boolean;
|
|
1187
1224
|
static styleAttrs: string[];
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
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();
|
|
1191
1259
|
/**
|
|
1192
1260
|
* To proper work, we need non-zero size the element. So, we'll wait for it.
|
|
1193
1261
|
*/
|
|
1194
1262
|
private _waitForSize;
|
|
1195
|
-
|
|
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;
|
|
1196
1269
|
updateImage(): Promise<void>;
|
|
1197
1270
|
initEditor(): Promise<void>;
|
|
1198
1271
|
}
|
|
1199
1272
|
|
|
1200
|
-
declare class CropFrame extends
|
|
1201
|
-
private readonly _handlePointerUp;
|
|
1202
|
-
private readonly _handlePointerMove;
|
|
1203
|
-
private readonly _handleSvgPointerMove;
|
|
1204
|
-
private readonly _backdropMaskId;
|
|
1273
|
+
declare class CropFrame extends LitBlock {
|
|
1205
1274
|
private _backdropMask?;
|
|
1206
1275
|
private _backdropMaskInner?;
|
|
1207
1276
|
private _frameThumbs?;
|
|
@@ -1212,7 +1281,14 @@ declare class CropFrame extends Block {
|
|
|
1212
1281
|
private _dragStartCrop?;
|
|
1213
1282
|
private _frameImage?;
|
|
1214
1283
|
private _guidesHidden;
|
|
1215
|
-
|
|
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;
|
|
1216
1292
|
private _shouldThumbBeDisabled;
|
|
1217
1293
|
private _createBackdrop;
|
|
1218
1294
|
/**
|
|
@@ -1227,41 +1303,57 @@ declare class CropFrame extends Block {
|
|
|
1227
1303
|
private _createGuides;
|
|
1228
1304
|
private _createFrame;
|
|
1229
1305
|
private _handlePointerDown;
|
|
1230
|
-
private
|
|
1231
|
-
private
|
|
1306
|
+
private readonly _handlePointerUp;
|
|
1307
|
+
private readonly _handlePointerMove;
|
|
1232
1308
|
private _calcCropBox;
|
|
1233
|
-
private
|
|
1309
|
+
private readonly _handleSvgPointerMove;
|
|
1234
1310
|
private _updateCursor;
|
|
1235
1311
|
private _createMask;
|
|
1236
1312
|
private _updateMask;
|
|
1237
1313
|
private _render;
|
|
1238
1314
|
toggleThumbs(visible: boolean): void;
|
|
1239
1315
|
initCallback(): void;
|
|
1240
|
-
|
|
1316
|
+
protected firstUpdated(_changedProperties: PropertyValues<this>): void;
|
|
1317
|
+
private _initializeSvg;
|
|
1318
|
+
disconnectedCallback(): void;
|
|
1319
|
+
render(): TemplateResult;
|
|
1241
1320
|
}
|
|
1242
1321
|
|
|
1243
|
-
declare class EditorButtonControl extends
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
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>;
|
|
1247
1333
|
}
|
|
1248
1334
|
|
|
1249
1335
|
declare class EditorFreeformButtonControl extends EditorButtonControl {
|
|
1250
1336
|
initCallback(): void;
|
|
1251
|
-
|
|
1337
|
+
onClick(): void;
|
|
1338
|
+
private computeTitle;
|
|
1339
|
+
render(): lit_html.TemplateResult<1>;
|
|
1252
1340
|
}
|
|
1253
|
-
|
|
1341
|
+
declare class EditorAspectRatioButtonControl extends EditorButtonControl {
|
|
1342
|
+
private _aspectRatio?;
|
|
1254
1343
|
get aspectRatio(): CropAspectRatio | undefined;
|
|
1255
1344
|
set aspectRatio(value: CropAspectRatio | undefined);
|
|
1256
|
-
}
|
|
1257
|
-
declare class EditorAspectRatioButtonControl extends EditorButtonControl {
|
|
1258
|
-
constructor();
|
|
1259
1345
|
initCallback(): void;
|
|
1260
|
-
|
|
1261
|
-
private
|
|
1262
|
-
private
|
|
1346
|
+
onClick(): void;
|
|
1347
|
+
private updateAspectRatioPresentation;
|
|
1348
|
+
private renderIcon;
|
|
1349
|
+
render(): lit_html.TemplateResult<1>;
|
|
1263
1350
|
}
|
|
1264
1351
|
|
|
1352
|
+
declare const TabId: Readonly<{
|
|
1353
|
+
readonly CROP: "crop";
|
|
1354
|
+
readonly TUNING: "tuning";
|
|
1355
|
+
readonly FILTERS: "filters";
|
|
1356
|
+
}>;
|
|
1265
1357
|
declare const ALL_COLOR_OPERATIONS: readonly ["brightness", "exposure", "gamma", "contrast", "saturation", "vibrance", "warmth", "enhance"];
|
|
1266
1358
|
type ColorOperation = (typeof ALL_COLOR_OPERATIONS)[number];
|
|
1267
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"];
|
|
@@ -1317,13 +1409,10 @@ declare const COLOR_OPERATIONS_CONFIG: Readonly<{
|
|
|
1317
1409
|
};
|
|
1318
1410
|
}>;
|
|
1319
1411
|
|
|
1320
|
-
interface EditorCropButtonControl {
|
|
1321
|
-
get operation(): CropOperation | undefined;
|
|
1322
|
-
set operation(value: CropOperation | undefined);
|
|
1323
|
-
}
|
|
1324
1412
|
declare class EditorCropButtonControl extends EditorButtonControl {
|
|
1325
|
-
|
|
1326
|
-
|
|
1413
|
+
operation: CropOperation | undefined;
|
|
1414
|
+
protected willUpdate(_changedProperties: PropertyValues): void;
|
|
1415
|
+
onClick(e: MouseEvent): void;
|
|
1327
1416
|
}
|
|
1328
1417
|
|
|
1329
1418
|
declare class EditorFilterControl extends EditorButtonControl {
|
|
@@ -1332,11 +1421,27 @@ declare class EditorFilterControl extends EditorButtonControl {
|
|
|
1332
1421
|
private _originalUrl;
|
|
1333
1422
|
private _observer?;
|
|
1334
1423
|
private _cancelPreload?;
|
|
1335
|
-
|
|
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;
|
|
1336
1434
|
private _previewSrc;
|
|
1337
1435
|
private _observerCallback;
|
|
1338
1436
|
initCallback(): void;
|
|
1339
|
-
|
|
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>;
|
|
1340
1445
|
}
|
|
1341
1446
|
|
|
1342
1447
|
type Operations = {
|
|
@@ -1344,7 +1449,7 @@ type Operations = {
|
|
|
1344
1449
|
mirror: boolean;
|
|
1345
1450
|
rotate: number;
|
|
1346
1451
|
};
|
|
1347
|
-
declare class EditorImageCropper extends
|
|
1452
|
+
declare class EditorImageCropper extends LitBlock {
|
|
1348
1453
|
ctxOwner: boolean;
|
|
1349
1454
|
private _commitDebounced;
|
|
1350
1455
|
private _handleResizeThrottled;
|
|
@@ -1353,9 +1458,12 @@ declare class EditorImageCropper extends Block {
|
|
|
1353
1458
|
private _ctx;
|
|
1354
1459
|
private _isActive;
|
|
1355
1460
|
private _observer?;
|
|
1461
|
+
private _image;
|
|
1356
1462
|
private _cancelPreload?;
|
|
1463
|
+
private readonly canvasRef;
|
|
1464
|
+
private readonly frameRef;
|
|
1357
1465
|
constructor();
|
|
1358
|
-
|
|
1466
|
+
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
1359
1467
|
private _syncTransformations;
|
|
1360
1468
|
private _initCanvas;
|
|
1361
1469
|
private _alignImage;
|
|
@@ -1380,11 +1488,12 @@ declare class EditorImageCropper extends Block {
|
|
|
1380
1488
|
private _waitForImage;
|
|
1381
1489
|
private _handleImageLoading;
|
|
1382
1490
|
initCallback(): void;
|
|
1383
|
-
|
|
1491
|
+
disconnectedCallback(): void;
|
|
1492
|
+
render(): TemplateResult;
|
|
1384
1493
|
}
|
|
1385
1494
|
|
|
1386
1495
|
type OperationKey = keyof typeof COLOR_OPERATIONS_CONFIG;
|
|
1387
|
-
declare class EditorImageFader extends
|
|
1496
|
+
declare class EditorImageFader extends LitBlock {
|
|
1388
1497
|
private _isActive;
|
|
1389
1498
|
private _hidden;
|
|
1390
1499
|
private _operation;
|
|
@@ -1392,7 +1501,6 @@ declare class EditorImageFader extends Block {
|
|
|
1392
1501
|
private _value?;
|
|
1393
1502
|
private _transformations;
|
|
1394
1503
|
private _keypoints;
|
|
1395
|
-
private _container?;
|
|
1396
1504
|
private _previewImage?;
|
|
1397
1505
|
private _cancelLastImages?;
|
|
1398
1506
|
private _cancelBatchPreload?;
|
|
@@ -1400,6 +1508,8 @@ declare class EditorImageFader extends Block {
|
|
|
1400
1508
|
private _fromViewer?;
|
|
1401
1509
|
private _raf;
|
|
1402
1510
|
private _addKeypointDebounced;
|
|
1511
|
+
private readonly _previewHostRef;
|
|
1512
|
+
private readonly _layersHostRef;
|
|
1403
1513
|
constructor();
|
|
1404
1514
|
private _handleImageLoading;
|
|
1405
1515
|
private _flush;
|
|
@@ -1409,7 +1519,6 @@ declare class EditorImageFader extends Block {
|
|
|
1409
1519
|
* Check if current operation and filter equals passed ones
|
|
1410
1520
|
*/
|
|
1411
1521
|
private _isSame;
|
|
1412
|
-
private _addKeypoint;
|
|
1413
1522
|
set(value: string | number): void;
|
|
1414
1523
|
private _update;
|
|
1415
1524
|
private _createPreviewImage;
|
|
@@ -1432,98 +1541,187 @@ declare class EditorImageFader extends Block {
|
|
|
1432
1541
|
deactivate({ hide }?: {
|
|
1433
1542
|
hide?: boolean;
|
|
1434
1543
|
}): void;
|
|
1544
|
+
private _ensurePreviewAttached;
|
|
1545
|
+
private _clearLayersHost;
|
|
1546
|
+
render(): TemplateResult;
|
|
1435
1547
|
}
|
|
1436
1548
|
|
|
1437
1549
|
declare class EditorOperationControl extends EditorButtonControl {
|
|
1438
1550
|
private _operation;
|
|
1551
|
+
get operation(): ColorOperation | '';
|
|
1552
|
+
set operation(value: ColorOperation | '');
|
|
1553
|
+
private updateOperationMetadata;
|
|
1439
1554
|
initCallback(): void;
|
|
1555
|
+
onClick(e: MouseEvent): void;
|
|
1440
1556
|
}
|
|
1441
1557
|
|
|
1442
|
-
declare class EditorScroller extends
|
|
1443
|
-
|
|
1558
|
+
declare class EditorScroller extends LitBlock {
|
|
1559
|
+
private readonly handleWheel;
|
|
1560
|
+
connectedCallback(): void;
|
|
1561
|
+
disconnectedCallback(): void;
|
|
1444
1562
|
}
|
|
1445
1563
|
|
|
1446
1564
|
type SliderOperation = ColorOperation | 'filter';
|
|
1447
1565
|
type SliderFilter = FilterId | typeof FAKE_ORIGINAL_FILTER;
|
|
1448
1566
|
declare const FAKE_ORIGINAL_FILTER = "original";
|
|
1449
|
-
declare class EditorSlider extends
|
|
1450
|
-
private
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1567
|
+
declare class EditorSlider extends LitBlock {
|
|
1568
|
+
private state;
|
|
1569
|
+
handleInput: (e: CustomEvent<{
|
|
1570
|
+
value: number;
|
|
1571
|
+
}>) => void;
|
|
1454
1572
|
setOperation(operation: SliderOperation, filter?: SliderFilter): void;
|
|
1455
1573
|
private _initializeValues;
|
|
1456
1574
|
apply(): void;
|
|
1457
1575
|
cancel(): void;
|
|
1458
1576
|
initCallback(): void;
|
|
1577
|
+
protected updated(changedProperties: Map<PropertyKey, unknown>): void;
|
|
1578
|
+
render(): lit_html.TemplateResult<1>;
|
|
1459
1579
|
}
|
|
1460
1580
|
|
|
1461
|
-
|
|
1462
|
-
|
|
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;
|
|
1463
1599
|
private _cancelPreload?;
|
|
1464
|
-
private
|
|
1465
|
-
|
|
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>;
|
|
1466
1608
|
private _onSliderClose;
|
|
1467
|
-
private _createOperationControl;
|
|
1468
|
-
private _createFilterControl;
|
|
1469
|
-
private _createToggleControl;
|
|
1470
|
-
private _createAspectRatioControl;
|
|
1471
|
-
private _createFreeformControl;
|
|
1472
|
-
private _clearListAspectRatio;
|
|
1473
|
-
private _renderControlsList;
|
|
1474
1609
|
private _activateTab;
|
|
1475
|
-
private
|
|
1610
|
+
private applyTabState;
|
|
1476
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;
|
|
1477
1624
|
private _preloadEditedImage;
|
|
1478
|
-
private _showLoader;
|
|
1479
|
-
private _updateInfoTooltipHandler;
|
|
1480
1625
|
initCallback(): void;
|
|
1481
|
-
|
|
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>;
|
|
1482
1639
|
}
|
|
1483
1640
|
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
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>;
|
|
1492
1659
|
}
|
|
1493
1660
|
|
|
1494
|
-
declare class LineLoaderUi extends
|
|
1495
|
-
|
|
1496
|
-
private readonly
|
|
1497
|
-
|
|
1498
|
-
private
|
|
1499
|
-
|
|
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>;
|
|
1500
1672
|
}
|
|
1501
1673
|
|
|
1502
|
-
|
|
1674
|
+
type PresenceToggleStyle = {
|
|
1675
|
+
transition?: string;
|
|
1676
|
+
visible?: string;
|
|
1677
|
+
hidden?: string;
|
|
1678
|
+
};
|
|
1679
|
+
declare class PresenceToggle extends LitBlock {
|
|
1503
1680
|
private _visible;
|
|
1681
|
+
private _styles;
|
|
1504
1682
|
private _visibleStyle;
|
|
1505
1683
|
private _hiddenStyle;
|
|
1506
1684
|
private _externalTransitions;
|
|
1507
|
-
|
|
1685
|
+
private initialRenderComplete;
|
|
1686
|
+
set visible(value: boolean);
|
|
1687
|
+
get visible(): boolean;
|
|
1688
|
+
set styles(styles: PresenceToggleStyle);
|
|
1689
|
+
get styles(): PresenceToggleStyle;
|
|
1508
1690
|
private _handleVisible;
|
|
1691
|
+
private dispatchInitialRenderEvent;
|
|
1509
1692
|
initCallback(): void;
|
|
1510
1693
|
}
|
|
1511
1694
|
|
|
1512
|
-
declare class SliderUi extends
|
|
1695
|
+
declare class SliderUi extends LitBlock {
|
|
1513
1696
|
private _observer?;
|
|
1514
1697
|
private _thumbSize;
|
|
1515
|
-
private _zero;
|
|
1516
1698
|
private _zeroDotEl?;
|
|
1517
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;
|
|
1518
1709
|
constructor();
|
|
1519
|
-
|
|
1520
|
-
private
|
|
1521
|
-
private
|
|
1522
|
-
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;
|
|
1523
1717
|
private _updateValue;
|
|
1524
1718
|
private _updateZeroDot;
|
|
1525
1719
|
private _updateSteps;
|
|
1526
|
-
|
|
1720
|
+
disconnectedCallback(): void;
|
|
1721
|
+
private _setCurrentValue;
|
|
1722
|
+
private _syncInputValue;
|
|
1723
|
+
private _extractEventValue;
|
|
1724
|
+
render(): lit_html.TemplateResult<1>;
|
|
1527
1725
|
}
|
|
1528
1726
|
|
|
1529
1727
|
declare class CloudImageEditor extends CloudImageEditorBlock {
|
|
@@ -1534,9 +1732,14 @@ declare class CloudImageEditor extends CloudImageEditorBlock {
|
|
|
1534
1732
|
|
|
1535
1733
|
declare function defineComponents(blockExports: Record<string, any>): void;
|
|
1536
1734
|
|
|
1537
|
-
declare class Icon extends
|
|
1538
|
-
|
|
1735
|
+
declare class Icon extends LitBlock {
|
|
1736
|
+
name: string;
|
|
1737
|
+
private resolvedHref;
|
|
1738
|
+
private iconHrefResolver;
|
|
1539
1739
|
initCallback(): void;
|
|
1740
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
1741
|
+
private updateResolvedHref;
|
|
1742
|
+
render(): lit_html.TemplateResult<1>;
|
|
1540
1743
|
}
|
|
1541
1744
|
|
|
1542
1745
|
export { BtnUi, CloudImageEditor, CloudImageEditorBlock, Config, CropFrame, EditorAspectRatioButtonControl, EditorCropButtonControl, EditorFilterControl, EditorFreeformButtonControl, EditorImageCropper, EditorImageFader, EditorOperationControl, EditorScroller, EditorSlider, EditorToolbar, Icon, LineLoaderUi, PresenceToggle, SliderUi, defineComponents };
|