@uploadcare/file-uploader 1.25.0-alpha.8 → 1.25.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.
Files changed (75) hide show
  1. package/dist/abstract/loadFileUploaderFrom.js +75 -4
  2. package/dist/env.js +33 -4
  3. package/dist/index.css +2660 -5
  4. package/dist/index.d.ts +962 -1296
  5. package/dist/index.js +12012 -6
  6. package/dist/index.layered.css +2716 -4
  7. package/dist/index.ssr.js +779 -549
  8. package/dist/locales/file-uploader/ar.js +165 -4
  9. package/dist/locales/file-uploader/az.js +157 -4
  10. package/dist/locales/file-uploader/ca.js +159 -4
  11. package/dist/locales/file-uploader/cs.js +161 -4
  12. package/dist/locales/file-uploader/da.js +157 -4
  13. package/dist/locales/file-uploader/de.js +157 -4
  14. package/dist/locales/file-uploader/el.js +157 -4
  15. package/dist/locales/file-uploader/en.js +157 -4
  16. package/dist/locales/file-uploader/es.js +159 -4
  17. package/dist/locales/file-uploader/et.js +157 -4
  18. package/dist/locales/file-uploader/fi.js +157 -4
  19. package/dist/locales/file-uploader/fr.js +159 -4
  20. package/dist/locales/file-uploader/he.js +159 -4
  21. package/dist/locales/file-uploader/hy.js +157 -4
  22. package/dist/locales/file-uploader/is.js +157 -4
  23. package/dist/locales/file-uploader/it.js +159 -4
  24. package/dist/locales/file-uploader/ja.js +157 -4
  25. package/dist/locales/file-uploader/ka.js +157 -4
  26. package/dist/locales/file-uploader/kk.js +157 -4
  27. package/dist/locales/file-uploader/ko.js +157 -4
  28. package/dist/locales/file-uploader/lv.js +159 -4
  29. package/dist/locales/file-uploader/nb.js +157 -4
  30. package/dist/locales/file-uploader/nl.js +157 -4
  31. package/dist/locales/file-uploader/pl.js +161 -4
  32. package/dist/locales/file-uploader/pt.js +159 -4
  33. package/dist/locales/file-uploader/ro.js +159 -4
  34. package/dist/locales/file-uploader/ru.js +161 -4
  35. package/dist/locales/file-uploader/sk.js +161 -4
  36. package/dist/locales/file-uploader/sr.js +159 -4
  37. package/dist/locales/file-uploader/sv.js +157 -4
  38. package/dist/locales/file-uploader/tr.js +157 -4
  39. package/dist/locales/file-uploader/uk.js +161 -4
  40. package/dist/locales/file-uploader/vi.js +157 -4
  41. package/dist/locales/file-uploader/zh-TW.js +157 -4
  42. package/dist/locales/file-uploader/zh.js +157 -4
  43. package/package.json +31 -36
  44. package/types/jsx.d.ts +48 -75
  45. package/web/file-uploader.iife.min.d.ts +984 -1318
  46. package/web/file-uploader.iife.min.js +27 -6
  47. package/web/file-uploader.min.d.ts +984 -1318
  48. package/web/file-uploader.min.js +26 -5
  49. package/web/uc-basic.layered.min.css +23 -4
  50. package/web/uc-basic.min.css +23 -4
  51. package/web/uc-cloud-image-editor.layered.min.css +23 -4
  52. package/web/uc-cloud-image-editor.min.css +23 -4
  53. package/web/uc-cloud-image-editor.min.d.ts +537 -738
  54. package/web/uc-cloud-image-editor.min.js +26 -5
  55. package/web/uc-file-uploader-inline.layered.min.css +23 -4
  56. package/web/uc-file-uploader-inline.min.css +23 -4
  57. package/web/uc-file-uploader-inline.min.d.ts +984 -1318
  58. package/web/uc-file-uploader-inline.min.js +26 -5
  59. package/web/uc-file-uploader-minimal.layered.min.css +23 -4
  60. package/web/uc-file-uploader-minimal.min.css +23 -4
  61. package/web/uc-file-uploader-minimal.min.d.ts +984 -1318
  62. package/web/uc-file-uploader-minimal.min.js +26 -5
  63. package/web/uc-file-uploader-regular.layered.min.css +23 -4
  64. package/web/uc-file-uploader-regular.min.css +23 -4
  65. package/web/uc-file-uploader-regular.min.d.ts +984 -1318
  66. package/web/uc-file-uploader-regular.min.js +26 -5
  67. package/web/uc-img.min.d.ts +100 -55
  68. package/web/uc-img.min.js +25 -5
  69. package/web/file-uploader.iife.min.js.LEGAL.txt +0 -71
  70. package/web/file-uploader.min.js.LEGAL.txt +0 -71
  71. package/web/uc-cloud-image-editor.min.js.LEGAL.txt +0 -70
  72. package/web/uc-file-uploader-inline.min.js.LEGAL.txt +0 -71
  73. package/web/uc-file-uploader-minimal.min.js.LEGAL.txt +0 -71
  74. package/web/uc-file-uploader-regular.min.js.LEGAL.txt +0 -71
  75. package/web/uc-img.min.js.LEGAL.txt +0 -24
@@ -1,154 +1,424 @@
1
- import { LitElement, PropertyValues, nothing, TemplateResult } from 'lit';
2
- import * as lit_html from 'lit-html';
3
- import * as lit_html_directives_ref_js from 'lit-html/directives/ref.js';
4
- import { TelemetryRequest } from '@uploadcare/quality-insights';
1
+ import { BaseComponent } from '@symbiotejs/symbiote';
2
+ export { BaseComponent, Data, UID } from '@symbiotejs/symbiote';
5
3
  import * as _uploadcare_upload_client from '@uploadcare/upload-client';
6
- import { UploadcareFile, Metadata, UploadError, NetworkError, UploadcareGroup, FileFromOptions, Queue } from '@uploadcare/upload-client';
4
+ import { UploadcareFile, Metadata, UploadError, NetworkError, UploadcareGroup, FileFromOptions } from '@uploadcare/upload-client';
7
5
  export { Metadata, NetworkError, UploadError, UploadcareError, UploadcareFile, UploadcareGroup } from '@uploadcare/upload-client';
8
- import { Ref } from 'lit/directives/ref.js';
6
+ import { TelemetryRequest } from '@uploadcare/quality-insights';
9
7
 
10
- type Subscription = {
11
- remove: () => void;
12
- };
13
- declare class PubSub<T extends Record<string, unknown> = Record<string, unknown>> {
14
- private static _contexts;
15
- private _store;
16
- private constructor();
17
- pub<K extends keyof T>(key: K, value: T[K]): void;
18
- sub<K extends keyof T>(key: K, callback: (value: T[K]) => void, init?: boolean): Subscription;
19
- read<K extends keyof T>(key: K): T[K];
20
- add<K extends keyof T>(key: K, value: T[K], rewrite?: boolean): void;
21
- has(key: keyof T): boolean;
22
- get store(): T;
23
- static registerCtx<T extends Record<string, unknown>>(initialValue: T, ctxId: string): PubSub<T>;
24
- static deleteCtx(ctxId: string): void;
25
- static getCtx<T extends Record<string, unknown> = Record<string, unknown>>(ctxId: string): PubSub<T> | null;
26
- static hasCtx(ctxId: string): boolean;
27
- }
28
-
29
- type Constructor<T = unknown> = new (...args: any[]) => T;
30
-
31
- type SymbioteStateBag<T extends Record<string, unknown>> = T;
32
- /**
33
- * Interface for components using SymbioteMixin
34
- */
35
- declare class SymbioteComponent<TState extends Record<string, unknown> = Record<string, unknown>> {
36
- $: SymbioteStateBag<TState>;
37
- sub<TKey extends keyof TState>(key: TKey, callback: (value: TState[TKey]) => void, init?: boolean): () => void;
38
- pub<TKey extends keyof TState>(key: TKey, value: TState[TKey]): void;
39
- set$<T extends {
40
- [K in keyof T]: K extends keyof TState ? TState[K] : never;
41
- }>(obj: T): void;
42
- has<TKey extends keyof TState>(key: TKey): boolean;
43
- add<TKey extends keyof TState>(key: TKey, val: TState[TKey], rewrite?: boolean): void;
44
- add$<T extends {
45
- [K in keyof T]: K extends keyof TState ? TState[K] : never;
46
- }>(obj: T, rewrite?: boolean): void;
47
- initCallback(): void;
48
- ctxName: string;
49
- ctxOwner: boolean;
8
+ declare class A11y {
9
+ private _destroyKeyUX;
10
+ private readonly _scopedWindow;
11
+ constructor();
12
+ registerBlock(scope: Block): void;
13
+ destroy(): void;
50
14
  }
51
15
 
52
- declare const BaseComponent_base: typeof LitElement & Constructor<{
53
- willYield: boolean;
54
- yield(slot: string, defaultContent?: unknown): unknown;
55
- }> & Constructor<{
56
- getCssData(propName: string, silentCheck?: boolean): string | number | boolean | null | undefined;
57
- }> & Constructor<SymbioteComponent<Record<string, unknown>>> & Constructor<LitElement> & {
58
- reg(tagName: string): void;
59
- };
60
- declare class BaseComponent extends BaseComponent_base {
16
+ type LocaleChangeCallback = () => void;
17
+ declare class LocaleManager {
18
+ private _blockInstance;
19
+ private _localeName;
20
+ private _callbacks;
21
+ private _boundBlocks;
22
+ constructor(blockInstance: Block);
23
+ onLocaleChange(callback: LocaleChangeCallback): () => void;
24
+ bindL10n(block: Block, key: string, resolver: LocaleChangeCallback): void;
25
+ destroyL10nBindings(block: Block): void;
26
+ destroy(): void;
61
27
  }
62
28
 
63
- type Uid = string & {
64
- __uid: true;
65
- };
66
-
67
- declare class UID {
68
- static generate(): Uid;
29
+ declare class Modal extends Block {
30
+ static styleAttrs: string[];
31
+ static StateConsumerScope: string;
32
+ private _mouseDownTarget;
33
+ handleModalOpen: ModalCb;
34
+ handleModalClose: ModalCb;
35
+ handleModalCloseAll: ModalCb;
36
+ constructor();
37
+ _handleBackdropClick: () => void;
38
+ _closeDialog: () => void;
39
+ _handleDialogClose: () => void;
40
+ _handleDialogMouseDown: (e: MouseEvent) => void;
41
+ _handleDialogMouseUp: (e: MouseEvent) => void;
42
+ show(): void;
43
+ hide(): void;
44
+ private _handleModalOpen;
45
+ private _handleModalClose;
46
+ private _handleModalCloseAll;
47
+ initCallback(): void;
48
+ destroyCallback(): void;
69
49
  }
70
50
 
71
- declare function defineComponents(blockExports: Record<string, any>): void;
72
-
73
- declare const UC_WINDOW_KEY = "UC";
74
- type IndexModule = Record<string, any>;
75
- declare global {
76
- interface Window {
77
- [UC_WINDOW_KEY]?: IndexModule;
78
- }
51
+ declare const ModalEvents: Readonly<{
52
+ readonly ADD: "modal:add";
53
+ readonly DELETE: "modal:delete";
54
+ readonly OPEN: "modal:open";
55
+ readonly CLOSE: "modal:close";
56
+ readonly CLOSE_ALL: "modal:closeAll";
57
+ readonly DESTROY: "modal:destroy";
58
+ }>;
59
+ type ModalId = ActivityType;
60
+ type ModalCb = (data: {
61
+ id: ModalId;
62
+ modal: Modal;
63
+ }) => void;
64
+ type ModalEventType = (typeof ModalEvents)[keyof typeof ModalEvents];
65
+ declare class ModalManager {
66
+ private _modals;
67
+ private _activeModals;
68
+ private _subscribers;
69
+ private _block;
70
+ constructor(block: Block);
71
+ private _debugPrint;
72
+ /**
73
+ * Register a modal with the manager
74
+ * @param id Unique identifier for the modal
75
+ * @param modal Modal component instance
76
+ */
77
+ registerModal(id: ModalId, modal: Modal): void;
78
+ /** Remove a modal by ID. */
79
+ deleteModal(id: ModalId): boolean;
80
+ /** Open a modal by its ID. */
81
+ open(id: ModalId): boolean;
82
+ /** Close a specific modal by ID. */
83
+ close(id: ModalId): boolean;
84
+ /** Toggle a modal - open if closed, close if open. */
85
+ toggle(id: ModalId): boolean;
86
+ /** True if there are any active modals. */
87
+ get hasActiveModals(): boolean;
88
+ /** Close the most recently opened modal and return to the previous one. */
89
+ back(): boolean;
90
+ /** Close all open modals. */
91
+ closeAll(): number;
92
+ /**
93
+ * Subscribe to modal events
94
+ * @returns Unsubscribe function
95
+ */
96
+ subscribe(event: ModalEventType, callback: ModalCb): () => void;
97
+ /** Unsubscribe from modal events */
98
+ unsubscribe(event: ModalEventType, callback: ModalCb | undefined): void;
99
+ /** Notify all subscribers of a modal event. */
100
+ private _notify;
101
+ /** Destroy the modal manager, clean up resources */
102
+ destroy(): void;
79
103
  }
80
- /**
81
- * @param url File Uploader pack url
82
- * @param [register] Register connected package, if it not registered yet
83
- */
84
- declare function loadFileUploaderFrom(url: string, register?: boolean): Promise<IndexModule | null>;
85
104
 
86
- type LocaleDefinition = Record<string, string>;
87
- type LocaleDefinitionResolver = () => Promise<LocaleDefinition>;
88
- declare const defineLocale: (localeName: string, definitionOrResolver: LocaleDefinition | LocaleDefinitionResolver) => void;
105
+ type CommonEventType = InternalEventKey | EventKey;
106
+ type TelemetryState = TelemetryRequest & {
107
+ eventTimestamp: number;
108
+ location: string;
109
+ };
110
+ type TelemetryEventBody = Partial<Pick<TelemetryState, 'payload' | 'config'>> & {
111
+ modalId?: string;
112
+ eventType?: CommonEventType;
113
+ };
114
+ declare class TelemetryManager {
115
+ private readonly _sessionId;
116
+ private readonly _telemetryInstance;
117
+ private readonly _block;
118
+ private _config;
119
+ private _initialized;
120
+ private _lastPayload;
121
+ private readonly _queue;
122
+ constructor(block: Block);
123
+ private _init;
124
+ private _setConfig;
125
+ private _formattingPayload;
126
+ private _excludedEvents;
127
+ sendEvent(body: TelemetryEventBody): void;
128
+ sendEventError(error: unknown, context?: string): void;
129
+ /**
130
+ * Method to send telemetry event for Cloud Image Editor.
131
+ */
132
+ sendEventCloudImageEditor(e: MouseEvent, tabId: string, options?: Record<string, unknown>): void;
133
+ /**
134
+ * Deeply compares two objects and returns true if they are equal, false otherwise.
135
+ */
136
+ private _checkObj;
137
+ private get _timestamp();
138
+ private get _solution();
139
+ private get _activity();
140
+ private get _location();
141
+ }
89
142
 
90
- declare class A11y {
91
- private _destroyKeyUX;
92
- private readonly _scopedWindow;
143
+ declare class Block extends BaseComponent<any> {
144
+ private __cfgProxy?;
145
+ protected l10nProcessorSubs: Map<string, Set<{
146
+ remove: () => void;
147
+ }>>;
148
+ static StateConsumerScope: string | null;
149
+ static styleAttrs: string[];
150
+ protected requireCtxName: boolean;
151
+ activityType: ActivityType;
152
+ init$: {};
153
+ l10n(str: string, variables?: Record<string, string | number>): string;
154
+ private pluralize;
155
+ protected bindL10n(key: string, resolver: () => void): void;
93
156
  constructor();
94
- registerBlock(scope: LitBlock): void;
95
- destroy(): void;
157
+ emit(type: Parameters<EventEmitter['emit']>[0], payload?: Parameters<EventEmitter['emit']>[1], options?: Parameters<EventEmitter['emit']>[2]): void;
158
+ hasBlockInCtx(callback: (block: Block) => boolean): boolean;
159
+ setOrAddState(prop: string, newVal: any): void;
160
+ connectedCallback(): void;
161
+ disconnectedCallback(): void;
162
+ initCallback(): void;
163
+ get testId(): string;
164
+ get modalManager(): ModalManager | undefined;
165
+ get telemetryManager(): TelemetryManager | {
166
+ sendEvent: () => void;
167
+ sendEventCloudImageEditor: () => void;
168
+ sendEventError: () => void;
169
+ };
170
+ protected get localeManager(): LocaleManager | null;
171
+ protected get a11y(): A11y | null;
172
+ protected get blocksRegistry(): Set<Block>;
173
+ destroyCallback(): void;
174
+ /**
175
+ * Called when the last block is removed from the context. Note that inheritors must run their callback before that.
176
+ */
177
+ protected destroyCtxCallback(): void;
178
+ protected proxyUrl(url: string): Promise<string>;
179
+ get cfg(): ConfigType;
180
+ subConfigValue<T extends keyof ConfigType>(key: T, callback: (value: ConfigType[T]) => void): void;
181
+ debugPrint(...args: unknown[]): void;
182
+ static reg(name?: string): void;
96
183
  }
97
184
 
98
- declare class LocaleManager {
99
- private _blockInstance;
100
- private _localeName;
101
- constructor(blockInstance: LitBlock);
185
+ declare const InternalEventType: Readonly<{
186
+ readonly INIT_SOLUTION: "init-solution";
187
+ readonly CHANGE_CONFIG: "change-config";
188
+ readonly ACTION_EVENT: "action-event";
189
+ readonly ERROR_EVENT: "error-event";
190
+ }>;
191
+ declare const EventType: Readonly<{
192
+ readonly FILE_ADDED: "file-added";
193
+ readonly FILE_REMOVED: "file-removed";
194
+ readonly FILE_UPLOAD_START: "file-upload-start";
195
+ readonly FILE_UPLOAD_PROGRESS: "file-upload-progress";
196
+ readonly FILE_UPLOAD_SUCCESS: "file-upload-success";
197
+ readonly FILE_UPLOAD_FAILED: "file-upload-failed";
198
+ readonly FILE_URL_CHANGED: "file-url-changed";
199
+ readonly MODAL_OPEN: "modal-open";
200
+ readonly MODAL_CLOSE: "modal-close";
201
+ readonly DONE_CLICK: "done-click";
202
+ readonly UPLOAD_CLICK: "upload-click";
203
+ readonly ACTIVITY_CHANGE: "activity-change";
204
+ readonly COMMON_UPLOAD_START: "common-upload-start";
205
+ readonly COMMON_UPLOAD_PROGRESS: "common-upload-progress";
206
+ readonly COMMON_UPLOAD_SUCCESS: "common-upload-success";
207
+ readonly COMMON_UPLOAD_FAILED: "common-upload-failed";
208
+ readonly CHANGE: "change";
209
+ readonly GROUP_CREATED: "group-created";
210
+ }>;
211
+ type EventKey = (typeof EventType)[keyof typeof EventType];
212
+ type InternalEventKey = (typeof InternalEventType)[keyof typeof InternalEventType];
213
+ type EventPayload = {
214
+ [EventType.FILE_ADDED]: OutputFileEntry<'idle'>;
215
+ [EventType.FILE_REMOVED]: OutputFileEntry<'removed'>;
216
+ [EventType.FILE_UPLOAD_START]: OutputFileEntry<'uploading'>;
217
+ [EventType.FILE_UPLOAD_PROGRESS]: OutputFileEntry<'uploading'>;
218
+ [EventType.FILE_UPLOAD_SUCCESS]: OutputFileEntry<'success'>;
219
+ [EventType.FILE_UPLOAD_FAILED]: OutputFileEntry<'failed'>;
220
+ [EventType.FILE_URL_CHANGED]: OutputFileEntry<'success'>;
221
+ [EventType.MODAL_OPEN]: {
222
+ modalId: ModalId;
223
+ };
224
+ [EventType.MODAL_CLOSE]: {
225
+ modalId: ModalId;
226
+ hasActiveModals: boolean;
227
+ };
228
+ [EventType.ACTIVITY_CHANGE]: {
229
+ activity: ActivityType;
230
+ };
231
+ [EventType.UPLOAD_CLICK]: void;
232
+ [EventType.DONE_CLICK]: OutputCollectionState;
233
+ [EventType.COMMON_UPLOAD_START]: OutputCollectionState<'uploading'>;
234
+ [EventType.COMMON_UPLOAD_PROGRESS]: OutputCollectionState<'uploading'>;
235
+ [EventType.COMMON_UPLOAD_SUCCESS]: OutputCollectionState<'success'>;
236
+ [EventType.COMMON_UPLOAD_FAILED]: OutputCollectionState<'failed'>;
237
+ [EventType.CHANGE]: OutputCollectionState;
238
+ [EventType.GROUP_CREATED]: OutputCollectionState<'success', 'has-group'>;
239
+ };
240
+ declare class EventEmitter {
241
+ private _timeoutStore;
242
+ private _targets;
243
+ private _debugPrint;
244
+ constructor(debugPrint: (...args: unknown[]) => void);
245
+ bindTarget(target: Block): void;
246
+ unbindTarget(target: Block): void;
247
+ private _dispatch;
248
+ emit<T extends EventKey, TDebounce extends boolean | number | undefined = undefined>(type: T, payload?: TDebounce extends false | undefined ? EventPayload[T] : () => EventPayload[T], options?: {
249
+ debounce?: TDebounce;
250
+ }): void;
102
251
  }
103
252
 
104
253
  type EventMap = {
105
254
  [T in keyof EventPayload]: CustomEvent<EventPayload[T]>;
106
255
  };
107
256
 
108
- declare function buildOutputCollectionState<TCollectionStatus extends OutputCollectionStatus, TGroupFlag extends GroupFlag = 'maybe-has-group'>(uploaderBlock: LitUploaderBlock): OutputCollectionState<TCollectionStatus, TGroupFlag>;
109
-
110
- declare class TypedData<T extends Record<string, unknown>> {
111
- private _ctxId;
112
- private _data;
113
- constructor(initialValue: T);
114
- get uid(): Uid;
115
- setValue<K extends keyof T>(prop: K, value: T[K]): void;
116
- setMultipleValues(updObj: Partial<T>): void;
117
- getValue<K extends keyof T>(prop: K): T[K];
118
- subscribe<K extends keyof T>(prop: K, handler: (newVal: T[K]) => void): Subscription;
257
+ type LocaleDefinition = Record<string, string>;
258
+ type LocaleDefinitionResolver = () => Promise<LocaleDefinition>;
259
+ declare const defineLocale: (localeName: string, definitionOrResolver: LocaleDefinition | LocaleDefinitionResolver) => void;
260
+
261
+ declare function buildOutputCollectionState<TCollectionStatus extends OutputCollectionStatus, TGroupFlag extends GroupFlag = 'maybe-has-group'>(uploaderBlock: UploaderBlock): OutputCollectionState<TCollectionStatus, TGroupFlag>;
262
+
263
+ type TypedSchema = Record<string, {
264
+ type: unknown;
265
+ value: unknown;
266
+ nullable?: boolean;
267
+ }>;
268
+ type Constructor<T = any> = new (...args: any[]) => T;
269
+ type ExtractType<T, V> = T extends StringConstructor ? string : T extends BooleanConstructor ? boolean : T extends NumberConstructor ? number : T extends ArrayConstructor ? V : T extends Constructor ? InstanceType<T> : T;
270
+ type ExtractDataFromSchema<T extends TypedSchema> = {
271
+ [K in keyof T]: ExtractType<T[K]['type'], T[K]['value']> | (T[K]['nullable'] extends true ? null : never);
272
+ };
273
+ type ExtractKeysFromSchema<T extends TypedSchema> = Extract<keyof T, string>;
274
+ declare class TypedData<T extends TypedSchema> {
275
+ private __typedSchema;
276
+ private __ctxId;
277
+ private __schema;
278
+ private __data;
279
+ constructor(typedSchema: T, ctxName?: string);
280
+ get uid(): string;
281
+ setValue<K extends ExtractKeysFromSchema<T>>(prop: K, value: ExtractDataFromSchema<T>[K]): void;
282
+ setMultipleValues(updObj: Partial<ExtractDataFromSchema<T>>): void;
283
+ getValue<K extends ExtractKeysFromSchema<T>>(prop: K): ExtractDataFromSchema<T>[K];
284
+ subscribe<K extends ExtractKeysFromSchema<T>>(prop: K, handler: (newVal: ExtractDataFromSchema<T>[K]) => void): {
285
+ remove: () => void;
286
+ callback: Function;
287
+ };
119
288
  remove(): void;
120
289
  }
121
290
 
122
- interface UploadEntryData extends Record<string, unknown> {
123
- file: File | null;
124
- externalUrl: string | null;
125
- fileName: string | null;
126
- fileSize: number | null;
127
- lastModified: number;
128
- uploadProgress: number;
129
- uuid: string | null;
130
- isImage: boolean;
131
- mimeType: string | null;
132
- ctxName: string | null;
133
- cdnUrl: string | null;
134
- cdnUrlModifiers: string | null;
135
- fileInfo: UploadcareFile | null;
136
- isUploading: boolean;
137
- abortController: AbortController | null;
138
- thumbUrl: string | null;
139
- silent: boolean;
140
- source: string | null;
141
- fullPath: string | null;
142
- metadata: Metadata | null;
143
- errors: OutputErrorFile[];
144
- uploadError: Error | null;
145
- isRemoved: boolean;
146
- isQueuedForUploading: boolean;
147
- isValidationPending: boolean;
148
- isQueuedForValidation: boolean;
149
- }
150
- type UploadEntryTypedData = TypedData<UploadEntryData>;
151
- type UploadEntryKeys = keyof UploadEntryData;
291
+ declare const uploadEntrySchema: Readonly<{
292
+ file: Readonly<{
293
+ type: {
294
+ new (fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
295
+ prototype: File;
296
+ };
297
+ value: null;
298
+ nullable: true;
299
+ }>;
300
+ externalUrl: Readonly<{
301
+ type: StringConstructor;
302
+ value: null;
303
+ nullable: true;
304
+ }>;
305
+ fileName: Readonly<{
306
+ type: StringConstructor;
307
+ value: null;
308
+ nullable: true;
309
+ }>;
310
+ fileSize: Readonly<{
311
+ type: NumberConstructor;
312
+ value: null;
313
+ nullable: true;
314
+ }>;
315
+ lastModified: Readonly<{
316
+ type: NumberConstructor;
317
+ value: number;
318
+ }>;
319
+ uploadProgress: Readonly<{
320
+ type: NumberConstructor;
321
+ value: 0;
322
+ }>;
323
+ uuid: Readonly<{
324
+ type: StringConstructor;
325
+ value: null;
326
+ nullable: true;
327
+ }>;
328
+ isImage: Readonly<{
329
+ type: BooleanConstructor;
330
+ value: false;
331
+ }>;
332
+ mimeType: Readonly<{
333
+ type: StringConstructor;
334
+ value: null;
335
+ nullable: true;
336
+ }>;
337
+ ctxName: Readonly<{
338
+ type: StringConstructor;
339
+ value: null;
340
+ nullable: true;
341
+ }>;
342
+ cdnUrl: Readonly<{
343
+ type: StringConstructor;
344
+ value: null;
345
+ nullable: true;
346
+ }>;
347
+ cdnUrlModifiers: Readonly<{
348
+ type: StringConstructor;
349
+ value: null;
350
+ nullable: true;
351
+ }>;
352
+ fileInfo: Readonly<{
353
+ type: typeof UploadcareFile;
354
+ value: null;
355
+ nullable: true;
356
+ }>;
357
+ isUploading: Readonly<{
358
+ type: BooleanConstructor;
359
+ value: false;
360
+ }>;
361
+ abortController: Readonly<{
362
+ type: {
363
+ new (): AbortController;
364
+ prototype: AbortController;
365
+ };
366
+ value: null;
367
+ nullable: true;
368
+ }>;
369
+ thumbUrl: Readonly<{
370
+ type: StringConstructor;
371
+ value: null;
372
+ nullable: true;
373
+ }>;
374
+ silent: Readonly<{
375
+ type: BooleanConstructor;
376
+ value: false;
377
+ }>;
378
+ source: Readonly<{
379
+ type: StringConstructor;
380
+ value: null;
381
+ nullable: true;
382
+ }>;
383
+ fullPath: Readonly<{
384
+ type: StringConstructor;
385
+ value: null;
386
+ nullable: true;
387
+ }>;
388
+ metadata: Readonly<{
389
+ type: ObjectConstructor;
390
+ value: null;
391
+ nullable: true;
392
+ }>;
393
+ errors: Readonly<{
394
+ type: ArrayConstructor;
395
+ value: OutputErrorFile[];
396
+ }>;
397
+ uploadError: Readonly<{
398
+ type: ErrorConstructor;
399
+ value: null;
400
+ nullable: true;
401
+ }>;
402
+ isRemoved: Readonly<{
403
+ type: BooleanConstructor;
404
+ value: false;
405
+ }>;
406
+ isQueuedForUploading: Readonly<{
407
+ type: BooleanConstructor;
408
+ value: false;
409
+ }>;
410
+ isValidationPending: Readonly<{
411
+ type: BooleanConstructor;
412
+ value: false;
413
+ }>;
414
+ isQueuedForValidation: Readonly<{
415
+ type: BooleanConstructor;
416
+ value: false;
417
+ }>;
418
+ }>;
419
+ type UploadEntryData = ExtractDataFromSchema<typeof uploadEntrySchema>;
420
+ type UploadEntryTypedData = TypedData<typeof uploadEntrySchema>;
421
+ type UploadEntryKeys = ExtractKeysFromSchema<typeof uploadEntrySchema>;
152
422
 
153
423
  type FuncFileValidator = (outputEntry: OutputFileEntry, api: UploaderPublicApi, options?: {
154
424
  signal?: AbortSignal;
@@ -167,10 +437,10 @@ declare class ValidationManager {
167
437
  private _queue;
168
438
  private _runQueueDebounced;
169
439
  private _entryValidationState;
170
- constructor(blockInstance: LitUploaderBlock);
171
- runFileValidators(runOn: FileValidatorDescriptor['runOn'], entryIds?: Uid[]): void;
440
+ constructor(blockInstance: UploaderBlock);
441
+ runFileValidators(runOn: FileValidatorDescriptor['runOn'], entryIds?: string[]): void;
172
442
  runCollectionValidators(): void;
173
- cleanupValidationForEntry(entry: TypedData<UploadEntryData>): void;
443
+ cleanupValidationForEntry(entry: TypedData<typeof uploadEntrySchema>): void;
174
444
  private _runFileValidatorsForEntry;
175
445
  private _addCustomTypeToValidationError;
176
446
  private _getEntryValidationState;
@@ -179,7 +449,8 @@ declare class ValidationManager {
179
449
  }
180
450
 
181
451
  type CameraMode = 'photo' | 'video';
182
- declare class CameraSource extends LitUploaderBlock {
452
+ type CameraStatus = 'shot' | 'retake' | 'accept' | 'play' | 'stop' | 'pause' | 'resume';
453
+ declare class CameraSource extends UploaderBlock {
183
454
  couldBeCtxOwner: boolean;
184
455
  activityType: "camera";
185
456
  private _unsubPermissions;
@@ -196,101 +467,52 @@ declare class CameraSource extends LitUploaderBlock {
196
467
  private _cameraDevices;
197
468
  private _audioDevices;
198
469
  private _permissionResponses;
199
- private _permissionCleanupFns;
200
- private _currentVideoSource;
201
- private readonly _handlePreviewPlay;
202
- private readonly _handlePreviewPause;
203
- private _timerRef;
204
- private _lineRef;
205
- private _videoRef;
206
- private _switcherRef;
207
- private _startTime;
208
- private _elapsedTime;
209
- private _videoTransformCss;
210
- private _videoHidden;
211
- private _messageHidden;
212
- private _requestBtnHidden;
213
- private _cameraSelectOptions;
214
- private _cameraSelectHidden;
215
- private _l10nMessage;
216
- private _timerHidden;
217
- private _cameraHidden;
218
- private _cameraActionsHidden;
219
- private _audioSelectOptions;
220
- private _audioSelectHidden;
221
- private _audioSelectDisabled;
222
- private _audioToggleMicrophoneHidden;
223
- private _tabCameraHidden;
224
- private _tabVideoHidden;
225
- private _currentIcon;
226
- private _currentTimelineIcon;
227
- private _toggleMicrophoneIcon;
228
- private _mutableClassButton;
229
- private _chooseActionWithCamera;
230
- private _handleCameraSelectChange;
231
- private _handleAudioSelectChange;
232
- private _handleRequestPermissions;
233
- private _handleStartCamera;
234
- private _handleToggleRecording;
235
- private _handleToggleAudio;
236
- private _handleRetake;
237
- private _handleAccept;
238
- private _handleClickTab;
239
- private _updateTimer;
240
- private _startTimer;
241
- private _stopTimer;
242
- private _startTimeline;
243
- private _stopTimeline;
244
- private _animationFrameId;
245
- private _startRecording;
470
+ constructor();
471
+ _chooseActionWithCamera: () => void;
472
+ _updateTimer: () => void;
473
+ _startTimer: () => void;
474
+ _stopTimer: () => void;
475
+ _startTimeline: () => void;
476
+ _stopTimeline: () => void;
477
+ _animationFrameId: number | null;
478
+ _startRecording: () => void;
246
479
  private _stopRecording;
247
480
  /** This method is used to toggle recording pause/resume */
248
- private _toggleRecording;
249
- private _toggleEnableAudio;
481
+ _toggleRecording: () => void;
482
+ _toggleEnableAudio: () => void;
250
483
  /**
251
484
  * Previewing the video that was recorded on the camera
252
485
  */
253
486
  private _previewVideo;
254
- private _attachPreviewListeners;
255
- private _detachPreviewListeners;
256
- private _setVideoSource;
257
- /**
258
- * Do not bind srcObject directly in the template, because it stops video pausing on shot.
259
- * I really don'y know why but that's how it is. Assigning srcObject manually fixes the issue.
260
- */
261
- private _applyVideoSource;
262
- private _retake;
263
- private _accept;
264
- private _handlePhoto;
265
- private _handleVideo;
487
+ _retake: () => void;
488
+ _accept: () => void;
489
+ _handlePhoto: (status: CameraStatus) => void;
490
+ _handleVideo: (status: CameraStatus) => void;
266
491
  private _setCameraState;
267
492
  private _shot;
268
493
  private _handleActiveTab;
269
494
  private _createFile;
270
- private _guessExtensionByMime;
495
+ _guessExtensionByMime(mime: string | undefined): string;
271
496
  /**
272
497
  * The send file to the server
273
498
  */
274
- private _toSend;
499
+ _toSend: (file: File) => void;
275
500
  private get _cameraModes();
276
501
  private _setPermissionsState;
277
- private _makeStreamInactive;
278
- private _stopCapture;
279
- private _capture;
280
- private _handlePermissionsChange;
281
- private _permissionAccess;
282
- private _teardownPermissionListeners;
283
- private _requestDeviceAccess;
284
- private _getDevices;
285
- private _onActivate;
286
- private _onDeactivate;
287
- private _handleCameraModes;
502
+ _makeStreamInactive: () => boolean;
503
+ _stopCapture: () => void;
504
+ _capture: () => Promise<void>;
505
+ _handlePermissionsChange: () => void;
506
+ _permissionAccess: () => Promise<void>;
507
+ _getPermission: () => void;
508
+ _requestDeviceAccess: () => Promise<void>;
509
+ _getDevices: () => Promise<void>;
510
+ _onActivate: () => Promise<void>;
511
+ _onDeactivate: () => Promise<void>;
512
+ _handleCameraModes: (cameraModes: CameraMode[]) => void;
288
513
  initCallback(): void;
289
- firstUpdated(changedProperties: PropertyValues<this>): void;
290
- updated(changedProperties: PropertyValues<this>): void;
291
- private _destroy;
292
- disconnectedCallback(): void;
293
- render(): lit_html.TemplateResult<1>;
514
+ _destroy(): void;
515
+ destroyCallback(): Promise<void>;
294
516
  }
295
517
 
296
518
  /**
@@ -299,49 +521,33 @@ declare class CameraSource extends LitUploaderBlock {
299
521
  declare const complexConfigKeys: readonly ["metadata", "localeDefinitionOverride", "secureUploadsSignatureResolver", "secureDeliveryProxyUrlResolver", "iconHrefResolver", "fileValidators", "collectionValidators", "mediaRecorderOptions"];
300
522
  /** Mapping of attribute names to state */
301
523
  declare const attrStateMapping: Record<string, string>;
302
- declare class Config extends LitBlock {
303
- attributesMeta: Partial<ConfigPlainType> & {
304
- 'ctx-name': string;
305
- };
306
- init$: LitBlock["init$"] & ConfigType;
307
- private _computationControllers;
524
+ declare class Config extends Block {
525
+ requireCtxName: boolean;
526
+ constructor();
308
527
  private _flushValueToAttribute;
309
528
  private _flushValueToState;
310
529
  private _setValue;
311
530
  private _getValue;
312
- private _assertSameValueDifferentReference;
531
+ _assertSameValueDifferentReference(key: string, previousValue: unknown, nextValue: unknown): void;
313
532
  initCallback(): void;
314
533
  attributeChangedCallback(name: keyof typeof attrStateMapping, oldVal: string, newVal: string): void;
315
- static get observedAttributes(): string[];
534
+ get computationControllers(): any;
316
535
  }
317
536
  interface Config extends ConfigType {
318
537
  }
319
538
 
320
539
  type FilesViewMode = 'grid' | 'list';
321
- declare class UploadList extends LitUploaderBlock {
540
+ declare class UploadList extends UploaderBlock {
322
541
  couldBeCtxOwner: boolean;
323
- protected historyTracked: boolean;
542
+ historyTracked: boolean;
324
543
  activityType: "upload-list";
325
- private _doneBtnVisible;
326
- private _doneBtnEnabled;
327
- private _uploadBtnVisible;
328
- private _addMoreBtnVisible;
329
- private _addMoreBtnEnabled;
330
- private _commonErrorMessage;
331
- private _hasFiles;
332
- private _latestSummary;
333
- private get _headerText();
334
- private _handleAdd;
335
- private _handleUpload;
336
- private _handleDone;
337
- private _handleCancel;
544
+ constructor();
338
545
  private _throttledHandleCollectionUpdate;
339
546
  private _updateUploadsState;
340
547
  private _getHeaderText;
341
548
  get couldOpenActivity(): boolean;
342
549
  initCallback(): void;
343
- disconnectedCallback(): void;
344
- render(): lit_html.TemplateResult<1>;
550
+ destroyCallback(): void;
345
551
  }
346
552
 
347
553
  declare const ExternalUploadSource: Readonly<{
@@ -392,7 +598,7 @@ type ApiAddFileCommonOptions = {
392
598
  };
393
599
  declare class UploaderPublicApi {
394
600
  private _ctx;
395
- constructor(ctx: LitUploaderBlock);
601
+ constructor(ctx: UploaderBlock);
396
602
  private get _uploadCollection();
397
603
  get cfg(): ConfigType;
398
604
  get l10n(): (str: string, variables?: Record<string, string | number>) => string;
@@ -416,7 +622,7 @@ declare class UploaderPublicApi {
416
622
  getOutputCollectionState<TStatus extends OutputCollectionStatus>(): ReturnType<typeof buildOutputCollectionState<TStatus>>;
417
623
  initFlow: (force?: boolean) => void;
418
624
  doneFlow: () => void;
419
- setCurrentActivity: <T extends RegisteredActivityType>(activityType: T, ...params: T extends keyof ActivityParamsMap ? [ActivityParamsMap[T]] : T extends RegisteredActivityType ? [undefined?] : [never]) => void;
625
+ setCurrentActivity: <T extends ActivityType>(activityType: T, ...[params]: T extends keyof ActivityParamsMap ? [ActivityParamsMap[T]] : T extends RegisteredActivityType ? [undefined?] : [unknown?]) => void;
420
626
  getCurrentActivity: () => ActivityType;
421
627
  setModalState: (opened: boolean) => void;
422
628
  private get _sourceList();
@@ -738,9 +944,7 @@ type OutputErrorTypePayload = {
738
944
  NOT_AN_IMAGE: OutputFileErrorPayload;
739
945
  FORBIDDEN_FILE_TYPE: OutputFileErrorPayload;
740
946
  FILE_SIZE_EXCEEDED: OutputFileErrorPayload;
741
- SOME_FILES_HAS_ERRORS: {
742
- [k: string]: never;
743
- };
947
+ SOME_FILES_HAS_ERRORS: {};
744
948
  TOO_MANY_FILES: {
745
949
  min: number;
746
950
  max: number;
@@ -893,56 +1097,57 @@ type OutputCollectionState<TStatus extends OutputCollectionStatus = OutputCollec
893
1097
  declare class SecureUploadsManager {
894
1098
  private readonly _block;
895
1099
  private _secureToken;
896
- constructor(block: LitUploaderBlock);
1100
+ constructor(block: UploaderBlock);
897
1101
  private _debugPrint;
898
1102
  getSecureToken(): Promise<SecureUploadsSignatureAndExpire | null>;
899
1103
  }
900
1104
 
901
- type ChangeMap<T extends Record<string, unknown>> = Record<keyof T, Set<Uid>>;
902
- type TypedCollectionPropertyObserver<T extends Record<string, unknown>> = (changeMap: ChangeMap<T>) => void;
903
- type TypedCollectionObserverHandler<T extends Record<string, unknown>> = (list: Uid[], added: Set<TypedData<T>>, removed: Set<TypedData<T>>) => void;
904
- type TypedCollectionOptions<T extends Record<string, unknown>> = {
905
- initialValue: T;
906
- watchList?: (keyof T)[];
1105
+ type ChangeMap<T extends TypedSchema> = Record<keyof T, Set<string>>;
1106
+ type TypedCollectionPropertyObserver<T extends TypedSchema> = (changeMap: ChangeMap<T>) => void;
1107
+ type TypedCollectionObserverHandler<T extends TypedSchema> = (list: string[], added: Set<TypedData<T>>, removed: Set<TypedData<T>>) => void;
1108
+ type TypedCollectionOptions<T extends TypedSchema> = {
1109
+ typedSchema: T;
1110
+ watchList?: ExtractKeysFromSchema<T>[];
907
1111
  handler?: TypedCollectionObserverHandler<T>;
1112
+ ctxName?: string;
908
1113
  };
909
- declare class TypedCollection<T extends Record<string, unknown>> {
910
- private _ctxId;
911
- private _data;
912
- private _watchList;
913
- private _subsMap;
914
- private _propertyObservers;
915
- private _collectionObservers;
916
- private _items;
917
- private _removed;
918
- private _added;
919
- private _observeTimeout?;
920
- private _notifyTimeout?;
921
- private _notifyObservers;
922
- private _initialValue;
1114
+ declare class TypedCollection<T extends TypedSchema> {
1115
+ private __typedSchema;
1116
+ private __ctxId;
1117
+ private __data;
1118
+ private __watchList;
1119
+ private __subsMap;
1120
+ private __propertyObservers;
1121
+ private __collectionObservers;
1122
+ private __items;
1123
+ private __removed;
1124
+ private __added;
1125
+ private __observeTimeout?;
1126
+ private __notifyTimeout?;
1127
+ private __notifyObservers;
923
1128
  constructor(options: TypedCollectionOptions<T>);
924
- private _notify;
1129
+ notify(): void;
925
1130
  observeCollection(handler: TypedCollectionObserverHandler<T>): () => void;
926
1131
  unobserveCollection(handler: TypedCollectionObserverHandler<T>): void;
927
- add(init: Partial<T>): string;
928
- read(id: Uid): TypedData<T> | null;
929
- readProp<K extends keyof T>(id: Uid, propName: K): T[K];
930
- publishProp<K extends keyof T>(id: Uid, propName: K, value: T[K]): void;
931
- remove(id: Uid): void;
1132
+ add(init: Partial<ExtractDataFromSchema<T>>): string;
1133
+ read(id: string): TypedData<T> | null;
1134
+ readProp<K extends ExtractKeysFromSchema<T>>(id: string, propName: K): ExtractDataFromSchema<T>[K] | null;
1135
+ publishProp<K extends ExtractKeysFromSchema<T>>(id: string, propName: K, value: ExtractDataFromSchema<T>[K]): void;
1136
+ remove(id: string): void;
932
1137
  clearAll(): void;
933
1138
  observeProperties(handler: TypedCollectionPropertyObserver<T>): () => void;
934
1139
  unobserveProperties(handler: TypedCollectionPropertyObserver<T>): void;
935
- findItems(checkFn: (item: TypedData<T>) => boolean): Uid[];
936
- items(): Uid[];
1140
+ findItems(checkFn: (item: TypedData<T>) => boolean): string[];
1141
+ items(): string[];
937
1142
  get size(): number;
938
1143
  destroy(): void;
939
1144
  }
940
1145
 
941
- declare class LitUploaderBlock extends LitActivityBlock {
1146
+ declare class UploaderBlock extends ActivityBlock {
942
1147
  static extSrcList: Readonly<typeof ExternalUploadSource>;
943
1148
  static sourceTypes: Readonly<typeof UploadSource>;
944
1149
  protected couldBeCtxOwner: boolean;
945
- private _isCtxOwner;
1150
+ private isCtxOwner;
946
1151
  private _unobserveCollection?;
947
1152
  private _unobserveCollectionProperties?;
948
1153
  init$: {
@@ -953,21 +1158,23 @@ declare class LitUploaderBlock extends LitActivityBlock {
953
1158
  '*collectionState': OutputCollectionState | null;
954
1159
  '*groupInfo': _uploadcare_upload_client.UploadcareGroup | null;
955
1160
  '*uploadTrigger': Set<string>;
1161
+ '*secureUploadsManager': SecureUploadsManager | null;
956
1162
  '*currentActivity': null;
957
1163
  '*currentActivityParams': {};
958
1164
  '*history': never[];
959
1165
  '*historyBack': null;
960
1166
  '*closeModal': () => void;
961
1167
  };
962
- private get _hasCtxOwner();
1168
+ private get hasCtxOwner();
963
1169
  initCallback(): void;
964
1170
  protected get validationManager(): ValidationManager;
965
1171
  get api(): UploaderPublicApi;
966
1172
  getAPI(): UploaderPublicApi;
967
- get uploadCollection(): TypedCollection<UploadEntryData>;
968
- get secureUploadsManager(): SecureUploadsManager;
1173
+ get uploadCollection(): TypedCollection<typeof uploadEntrySchema>;
1174
+ destroyCtxCallback(): void;
969
1175
  disconnectedCallback(): void;
970
1176
  connectedCallback(): void;
1177
+ destroyCallback(): void;
971
1178
  private _initCtxOwner;
972
1179
  private _observeUploadCollection;
973
1180
  private _unobserveUploadCollection;
@@ -976,17 +1183,13 @@ declare class LitUploaderBlock extends LitActivityBlock {
976
1183
  private _handleCollectionUpdate;
977
1184
  private _handleCollectionPropertiesUpdate;
978
1185
  private _flushCommonUploadProgress;
979
- private _openCloudImageEditor;
980
- private _setInitialCrop;
1186
+ openCloudImageEditor(): void;
1187
+ private setInitialCrop;
981
1188
  protected getMetadataFor(entryId: string): Promise<_uploadcare_upload_client.Metadata | undefined>;
982
1189
  protected getUploadClientOptions(): Promise<FileFromOptions>;
983
1190
  getOutputData(): OutputFileEntry[];
984
1191
  }
985
1192
 
986
- /**
987
- * Mapping of loading resources per operation
988
- */
989
- type LoadingOperations = Map<string, Map<string, boolean>>;
990
1193
  /**
991
1194
  * Image size
992
1195
  */
@@ -1021,7 +1224,6 @@ interface ApplyResult {
1021
1224
  cdnUrl: string;
1022
1225
  transformations: Transformations;
1023
1226
  }
1024
- type ChangeResult = ApplyResult;
1025
1227
  interface CropAspectRatio {
1026
1228
  type: 'aspect-ratio';
1027
1229
  width: number;
@@ -1029,66 +1231,44 @@ interface CropAspectRatio {
1029
1231
  id: string;
1030
1232
  hasFreeform?: boolean;
1031
1233
  }
1032
- type CropPresetList = CropAspectRatio[];
1033
1234
 
1034
1235
  type ActivityParams$1 = {
1035
1236
  internalId: string;
1036
1237
  };
1037
- declare class CloudImageEditorActivity extends LitUploaderBlock {
1238
+ declare class CloudImageEditorActivity extends UploaderBlock {
1038
1239
  couldBeCtxOwner: boolean;
1039
1240
  activityType: "cloud-image-edit";
1040
1241
  private _entry?;
1041
- private _editorConfig;
1242
+ private _instance?;
1042
1243
  get activityParams(): ActivityParams$1;
1043
1244
  initCallback(): void;
1044
- private _handleApply;
1045
- private _handleCancel;
1046
- handleChange(event: CustomEvent<ChangeResult>): void;
1047
- private _mountEditor;
1048
- private _unmountEditor;
1049
- render(): lit_html.TemplateResult<1> | typeof nothing;
1050
- private _createEditorConfig;
1245
+ handleApply(e: CustomEvent<ApplyResult>): void;
1246
+ handleCancel(): void;
1247
+ mountEditor(): void;
1248
+ unmountEditor(): void;
1051
1249
  }
1052
1250
 
1053
1251
  type ActivityParams = {
1054
1252
  externalSourceType: string;
1055
1253
  };
1056
- declare class ExternalSource extends LitUploaderBlock {
1254
+ declare class ExternalSource extends UploaderBlock {
1057
1255
  couldBeCtxOwner: boolean;
1058
1256
  activityType: "external";
1059
1257
  private _messageBridge?;
1060
- private _iframeRef;
1061
- private _latestSelectionSummary;
1062
- private _selectedList;
1063
- private _isSelectionReady;
1064
- private _isDoneBtnEnabled;
1065
- private _couldSelectAll;
1066
- private _couldDeselectAll;
1067
- private _showSelectionStatus;
1068
- private _showDoneBtn;
1069
- private _doneBtnTextClass;
1070
- private _toolbarVisible;
1071
- private get _counterText();
1258
+ constructor();
1072
1259
  get activityParams(): ActivityParams;
1073
1260
  initCallback(): void;
1074
- private _extractUrlFromSelectedFile;
1075
- private _handleToolbarStateChange;
1076
- private _handleSelectedFilesChange;
1077
- private _handleIframeLoad;
1078
- private _applyTheme;
1079
- private _applyEmbedCss;
1080
- private _setupL10n;
1081
- private _remoteUrl;
1082
- private _handleDone;
1083
- private _handleCancel;
1084
- private _handleSelectAll;
1085
- private _handleDeselectAll;
1086
- private _setSelectionSummary;
1087
- private _mountIframe;
1088
- private _unmountIframe;
1089
- private _resetSelectionStatus;
1090
- disconnectedCallback(): void;
1091
- render(): lit_html.TemplateResult<1>;
1261
+ private extractUrlFromSelectedFile;
1262
+ private handleToolbarStateChange;
1263
+ private handleSelectedFilesChange;
1264
+ private handleIframeLoad;
1265
+ private applyTheme;
1266
+ private applyEmbedCss;
1267
+ private setupL10n;
1268
+ private remoteUrl;
1269
+ private mountIframe;
1270
+ private unmountIframe;
1271
+ private resetSelectionStatus;
1092
1272
  }
1093
1273
 
1094
1274
  declare const ACTIVE_PROP = "___ACTIVITY_IS_ACTIVE___";
@@ -1096,7 +1276,7 @@ type ActivityParamsMap = {
1096
1276
  'cloud-image-edit': ActivityParams$1;
1097
1277
  external: ActivityParams;
1098
1278
  };
1099
- declare class LitActivityBlock extends LitBlock {
1279
+ declare class ActivityBlock extends Block {
1100
1280
  protected historyTracked: boolean;
1101
1281
  private [ACTIVE_PROP]?;
1102
1282
  init$: {
@@ -1106,7 +1286,9 @@ declare class LitActivityBlock extends LitBlock {
1106
1286
  '*historyBack': null;
1107
1287
  '*closeModal': () => void;
1108
1288
  };
1109
- private _debouncedHistoryFlush;
1289
+ _debouncedHistoryFlush: (() => void) & {
1290
+ cancel: () => void;
1291
+ };
1110
1292
  private _deactivate;
1111
1293
  private _activate;
1112
1294
  initCallback(): void;
@@ -1122,111 +1304,147 @@ declare class LitActivityBlock extends LitBlock {
1122
1304
  CLOUD_IMG_EDIT: 'cloud-image-edit';
1123
1305
  EXTERNAL: 'external';
1124
1306
  }>;
1125
- protected get isActivityActive(): boolean;
1307
+ get isActivityActive(): boolean;
1126
1308
  get couldOpenActivity(): boolean;
1127
1309
  /** TODO: remove name argument */
1128
- protected registerActivity(_name: string, options?: {
1310
+ registerActivity(_name: string, options?: {
1129
1311
  onActivate?: () => void;
1130
1312
  onDeactivate?: () => void;
1131
1313
  }): void;
1132
- private _unregisterActivity;
1133
- disconnectedCallback(): void;
1314
+ unregisterActivity(): void;
1315
+ destroyCallback(): void;
1316
+ get activityKey(): string;
1134
1317
  get activityParams(): ActivityParamsMap[keyof ActivityParamsMap];
1135
- get initActivity(): string | null;
1136
- get doneActivity(): string | null;
1318
+ get initActivity(): string;
1319
+ get doneActivity(): string;
1137
1320
  historyBack(): void;
1138
1321
  }
1139
- type RegisteredActivityType = (typeof LitActivityBlock)['activities'][keyof (typeof LitActivityBlock)['activities']];
1322
+ type RegisteredActivityType = (typeof ActivityBlock)['activities'][keyof (typeof ActivityBlock)['activities']];
1140
1323
  type ActivityType = RegisteredActivityType | (string & {}) | null;
1141
1324
 
1142
- declare const InternalEventType: Readonly<{
1143
- readonly INIT_SOLUTION: "init-solution";
1144
- readonly CHANGE_CONFIG: "change-config";
1145
- readonly ACTION_EVENT: "action-event";
1146
- readonly ERROR_EVENT: "error-event";
1147
- }>;
1148
- declare const EventType: Readonly<{
1149
- readonly FILE_ADDED: "file-added";
1150
- readonly FILE_REMOVED: "file-removed";
1151
- readonly FILE_UPLOAD_START: "file-upload-start";
1152
- readonly FILE_UPLOAD_PROGRESS: "file-upload-progress";
1153
- readonly FILE_UPLOAD_SUCCESS: "file-upload-success";
1154
- readonly FILE_UPLOAD_FAILED: "file-upload-failed";
1155
- readonly FILE_URL_CHANGED: "file-url-changed";
1156
- readonly MODAL_OPEN: "modal-open";
1157
- readonly MODAL_CLOSE: "modal-close";
1158
- readonly DONE_CLICK: "done-click";
1159
- readonly UPLOAD_CLICK: "upload-click";
1160
- readonly ACTIVITY_CHANGE: "activity-change";
1161
- readonly COMMON_UPLOAD_START: "common-upload-start";
1162
- readonly COMMON_UPLOAD_PROGRESS: "common-upload-progress";
1163
- readonly COMMON_UPLOAD_SUCCESS: "common-upload-success";
1164
- readonly COMMON_UPLOAD_FAILED: "common-upload-failed";
1165
- readonly CHANGE: "change";
1166
- readonly GROUP_CREATED: "group-created";
1167
- }>;
1168
- type EventKey = (typeof EventType)[keyof typeof EventType];
1169
- type InternalEventKey = (typeof InternalEventType)[keyof typeof InternalEventType];
1170
- type EventPayload = {
1171
- [EventType.FILE_ADDED]: OutputFileEntry<'idle'>;
1172
- [EventType.FILE_REMOVED]: OutputFileEntry<'removed'>;
1173
- [EventType.FILE_UPLOAD_START]: OutputFileEntry<'uploading'>;
1174
- [EventType.FILE_UPLOAD_PROGRESS]: OutputFileEntry<'uploading'>;
1175
- [EventType.FILE_UPLOAD_SUCCESS]: OutputFileEntry<'success'>;
1176
- [EventType.FILE_UPLOAD_FAILED]: OutputFileEntry<'failed'>;
1177
- [EventType.FILE_URL_CHANGED]: OutputFileEntry<'success'>;
1178
- [EventType.MODAL_OPEN]: {
1179
- modalId: ModalId;
1180
- };
1181
- [EventType.MODAL_CLOSE]: {
1182
- modalId: ModalId;
1183
- hasActiveModals: boolean;
1184
- };
1185
- [EventType.ACTIVITY_CHANGE]: {
1186
- activity: ActivityType;
1325
+ declare function defineComponents(blockExports: Record<string, any>): void;
1326
+
1327
+ declare const UC_WINDOW_KEY = "UC";
1328
+ type IndexModule = Record<string, any>;
1329
+ declare global {
1330
+ interface Window {
1331
+ [UC_WINDOW_KEY]?: IndexModule;
1332
+ }
1333
+ }
1334
+ /**
1335
+ * @param url File Uploader pack url
1336
+ * @param [register] Register connected package, if it not registered yet
1337
+ */
1338
+ declare function loadFileUploaderFrom(url: string, register?: boolean): Promise<IndexModule | null>;
1339
+
1340
+ declare class SolutionBlock extends Block {
1341
+ static styleAttrs: string[];
1342
+ protected requireCtxName: boolean;
1343
+ init$: {
1344
+ '*solution': string | null;
1345
+ '*commonProgress': number;
1346
+ '*uploadList': never[];
1347
+ '*uploadQueue': _uploadcare_upload_client.Queue;
1348
+ '*collectionErrors': OutputErrorCollection[];
1349
+ '*collectionState': OutputCollectionState | null;
1350
+ '*groupInfo': _uploadcare_upload_client.UploadcareGroup | null;
1351
+ '*uploadTrigger': Set<string>;
1352
+ '*secureUploadsManager': SecureUploadsManager | null;
1353
+ '*currentActivity': null;
1354
+ '*currentActivityParams': {};
1355
+ '*history': never[];
1356
+ '*historyBack': null;
1357
+ '*closeModal': () => void;
1187
1358
  };
1188
- [EventType.UPLOAD_CLICK]: void;
1189
- [EventType.DONE_CLICK]: OutputCollectionState;
1190
- [EventType.COMMON_UPLOAD_START]: OutputCollectionState<'uploading'>;
1191
- [EventType.COMMON_UPLOAD_PROGRESS]: OutputCollectionState<'uploading'>;
1192
- [EventType.COMMON_UPLOAD_SUCCESS]: OutputCollectionState<'success'>;
1193
- [EventType.COMMON_UPLOAD_FAILED]: OutputCollectionState<'failed'>;
1194
- [EventType.CHANGE]: OutputCollectionState;
1195
- [EventType.GROUP_CREATED]: OutputCollectionState<'success', 'has-group'>;
1196
- };
1197
- declare class EventEmitter {
1198
- private _timeoutStore;
1199
- private _targets;
1200
- private _debugPrint;
1201
- constructor(debugPrint: (...args: unknown[]) => void);
1202
- bindTarget(target: LitBlock): () => void;
1203
- private _dispatch;
1204
- emit<T extends EventKey, TDebounce extends boolean | number | undefined = undefined>(type: T, payload?: TDebounce extends false | undefined ? EventPayload[T] : () => EventPayload[T], options?: {
1205
- debounce?: TDebounce;
1206
- }): void;
1359
+ private static _template;
1360
+ initCallback(): void;
1361
+ static set template(value: string);
1362
+ static get template(): string;
1207
1363
  }
1208
1364
 
1209
- type CommonEventType = InternalEventKey | EventKey;
1210
- type TelemetryState = TelemetryRequest & {
1211
- eventTimestamp: number;
1212
- location: string;
1213
- };
1214
- type TelemetryEventBody = Partial<Pick<TelemetryState, 'payload' | 'config'>> & {
1215
- modalId?: string;
1216
- eventType?: CommonEventType;
1217
- };
1218
- interface ITelemetryManager {
1219
- sendEvent(body: TelemetryEventBody): void;
1220
- sendEventError(error: unknown, context?: string): void;
1221
- sendEventCloudImageEditor(e: MouseEvent, tabId: string, options?: Record<string, unknown>): void;
1365
+ declare class ActivityHeader extends ActivityBlock {
1366
+ }
1367
+
1368
+ declare class CloudImageEditorBlock extends Block {
1369
+ ctxOwner: boolean;
1370
+ static styleAttrs: string[];
1371
+ private _debouncedShowLoader;
1372
+ constructor();
1373
+ private _showLoader;
1374
+ /**
1375
+ * To proper work, we need non-zero size the element. So, we'll wait for it.
1376
+ */
1377
+ private _waitForSize;
1378
+ initCallback(): void;
1379
+ updateImage(): Promise<void>;
1380
+ initEditor(): Promise<void>;
1381
+ }
1382
+
1383
+ declare class CropFrame extends Block {
1384
+ private readonly _handlePointerUp;
1385
+ private readonly _handlePointerMove;
1386
+ private readonly _handleSvgPointerMove;
1387
+ private readonly _backdropMaskId;
1388
+ private _backdropMask?;
1389
+ private _backdropMaskInner?;
1390
+ private _frameThumbs?;
1391
+ private _frameGuides?;
1392
+ private _draggingThumb?;
1393
+ private _hoverThumb?;
1394
+ private _dragStartPoint?;
1395
+ private _dragStartCrop?;
1396
+ private _frameImage?;
1397
+ private _guidesHidden;
1398
+ constructor();
1399
+ private _shouldThumbBeDisabled;
1400
+ private _createBackdrop;
1401
+ /**
1402
+ * @private Super Tricky workaround for the chromium bug See
1403
+ * https://bugs.chromium.org/p/chromium/issues/detail?id=330815
1404
+ */
1405
+ private _resizeBackdrop;
1406
+ private _updateBackdrop;
1407
+ private _updateFrame;
1408
+ private _createThumb;
1409
+ private _createThumbs;
1410
+ private _createGuides;
1411
+ private _createFrame;
1412
+ private _handlePointerDown;
1413
+ private _handlePointerUp_;
1414
+ private _handlePointerMove_;
1415
+ private _calcCropBox;
1416
+ private _handleSvgPointerMove_;
1417
+ private _updateCursor;
1418
+ private _createMask;
1419
+ private _updateMask;
1420
+ private _render;
1421
+ toggleThumbs(visible: boolean): void;
1422
+ initCallback(): void;
1423
+ destroyCallback(): void;
1424
+ }
1425
+
1426
+ declare class EditorButtonControl extends Block {
1427
+ private _titleEl?;
1428
+ constructor();
1429
+ initCallback(): void;
1430
+ }
1431
+
1432
+ declare class EditorFreeformButtonControl extends EditorButtonControl {
1433
+ initCallback(): void;
1434
+ handleClick(): void;
1435
+ }
1436
+ interface EditorAspectRatioButtonControl {
1437
+ get aspectRatio(): CropAspectRatio | undefined;
1438
+ set aspectRatio(value: CropAspectRatio | undefined);
1439
+ }
1440
+ declare class EditorAspectRatioButtonControl extends EditorButtonControl {
1441
+ constructor();
1442
+ initCallback(): void;
1443
+ handleClick(): void;
1444
+ private _renderRectBasedOnAspectRatio;
1445
+ private _aspectRatio?;
1222
1446
  }
1223
1447
 
1224
- declare const TabId: Readonly<{
1225
- readonly CROP: "crop";
1226
- readonly TUNING: "tuning";
1227
- readonly FILTERS: "filters";
1228
- }>;
1229
- type TabIdValue$1 = (typeof TabId)[keyof typeof TabId];
1230
1448
  declare const ALL_COLOR_OPERATIONS: readonly ["brightness", "exposure", "gamma", "contrast", "saturation", "vibrance", "warmth", "enhance"];
1231
1449
  type ColorOperation = (typeof ALL_COLOR_OPERATIONS)[number];
1232
1450
  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"];
@@ -1282,662 +1500,26 @@ declare const COLOR_OPERATIONS_CONFIG: Readonly<{
1282
1500
  };
1283
1501
  }>;
1284
1502
 
1285
- type SharedConfigState = {
1286
- [K in keyof ConfigType as `*cfg/${K}`]: ConfigType[K];
1287
- };
1288
- type BlocksRegistry = Set<LitBlock>;
1289
- type ActivityBlockCtxState = {
1290
- '*currentActivity': string | null;
1291
- '*currentActivityParams': Record<string, unknown>;
1292
- '*history': (string | null)[];
1293
- '*historyBack': (() => void) | null;
1294
- '*closeModal': () => void;
1295
- };
1296
- type UploaderBlockCtxState = ActivityBlockCtxState & {
1297
- '*commonProgress': number;
1298
- '*uploadList': {
1299
- uid: Uid;
1300
- }[];
1301
- '*uploadQueue': Queue;
1302
- '*collectionErrors': OutputErrorCollection[];
1303
- '*collectionState': OutputCollectionState | null;
1304
- '*groupInfo': UploadcareGroup | null;
1305
- '*uploadTrigger': Set<Uid>;
1306
- };
1307
- type SolutionBlockCtxState = UploaderBlockCtxState & {
1308
- '*solution': string | null;
1309
- };
1310
- type CloudImageEditorState = {
1311
- '*originalUrl': string | null;
1312
- '*loadingOperations': LoadingOperations;
1313
- '*faderEl': EditorImageFader | null;
1314
- '*cropperEl': EditorImageCropper | null;
1315
- '*imgEl': HTMLImageElement | null;
1316
- '*imgContainerEl': HTMLElement | null;
1317
- '*networkProblems': boolean;
1318
- '*imageSize': {
1319
- width: number;
1320
- height: number;
1321
- } | null;
1322
- '*editorTransformations': Transformations;
1323
- '*cropPresetList': CropPresetList;
1324
- '*currentAspectRatio': CropAspectRatio | null;
1325
- '*tabList': readonly TabIdValue$1[];
1326
- '*tabId': TabIdValue$1;
1327
- '*on.retryNetwork': () => void;
1328
- '*on.apply': (transformations: Transformations) => void;
1329
- '*on.cancel': () => void;
1330
- };
1331
- type EditorImageCropperState = {
1332
- '*padding': number;
1333
- '*operations': {
1334
- rotate: number;
1335
- mirror: boolean;
1336
- flip: boolean;
1337
- };
1338
- '*imageBox': {
1339
- x: number;
1340
- y: number;
1341
- width: number;
1342
- height: number;
1343
- };
1344
- '*cropBox': {
1345
- x: number;
1346
- y: number;
1347
- width: number;
1348
- height: number;
1349
- };
1350
- };
1351
- type EditorToolbarState = {
1352
- '*showListAspectRatio': boolean;
1353
- '*sliderEl': EditorSlider | null;
1354
- '*showSlider': boolean;
1355
- '*currentFilter': string;
1356
- '*currentOperation': string | null;
1357
- '*operationTooltip': string | null;
1358
- };
1359
- type DynamicBlockState = {
1360
- '*blocksRegistry': BlocksRegistry;
1361
- '*eventEmitter': EventEmitter;
1362
- '*localeManager': LocaleManager;
1363
- '*telemetryManager': ITelemetryManager;
1364
- '*a11y': A11y;
1365
- '*modalManager': ModalManager | null;
1366
- };
1367
- type DynamicUploaderBlockState = {
1368
- '*uploadCollection': TypedCollection<UploadEntryData>;
1369
- '*publicApi': UploaderPublicApi;
1370
- '*validationManager': ValidationManager;
1371
- '*secureUploadsManager': SecureUploadsManager;
1372
- };
1373
- type LocaleState = {
1374
- [K in keyof LocaleDefinition as `*l10n/${K}`]: string;
1375
- };
1376
- type SharedState = SolutionBlockCtxState & SharedConfigState & CloudImageEditorState & EditorImageCropperState & EditorToolbarState & DynamicBlockState & DynamicUploaderBlockState & LocaleState;
1377
-
1378
- declare const LitBlockBase: typeof LitElement & Constructor<{
1379
- willYield: boolean;
1380
- yield(slot: string, defaultContent?: unknown): unknown;
1381
- }> & Constructor<{
1382
- getCssData(propName: string, silentCheck?: boolean): string | number | boolean | null | undefined;
1383
- }> & Constructor<SymbioteComponent<SharedState>> & Constructor<LitElement> & {
1384
- reg(tagName: string): void;
1385
- };
1386
- declare class LitBlock extends LitBlockBase {
1387
- private _cfgProxy;
1388
- private _sharedContextInstances;
1389
- static styleAttrs: string[];
1390
- activityType: ActivityType;
1391
- init$: {};
1392
- constructor();
1393
- l10n(str: string, variables?: Record<string, string | number>): string;
1394
- private _pluralize;
1395
- emit(type: Parameters<EventEmitter['emit']>[0], payload?: Parameters<EventEmitter['emit']>[1], options?: Parameters<EventEmitter['emit']>[2]): void;
1396
- hasBlockInCtx(callback: (block: LitBlock) => boolean): boolean;
1397
- connectedCallback(): void;
1503
+ interface EditorCropButtonControl {
1504
+ get operation(): CropOperation | undefined;
1505
+ set operation(value: CropOperation | undefined);
1506
+ }
1507
+ declare class EditorCropButtonControl extends EditorButtonControl {
1508
+ private _operation;
1398
1509
  initCallback(): void;
1399
- get testId(): string;
1400
- get modalManager(): ModalManager | null;
1401
- get telemetryManager(): ITelemetryManager;
1402
- get localeManager(): LocaleManager;
1403
- get a11y(): A11y;
1404
- get blocksRegistry(): Set<LitBlock>;
1405
- get eventEmitter(): EventEmitter;
1406
- disconnectedCallback(): void;
1407
- /**
1408
- * Called when the last block is removed from the context. Note that inheritors must run their callback before that.
1409
- */
1410
- protected destroyCtxCallback(): void;
1411
- /**
1412
- * Adds a shared context instance if it does not exist yet.
1413
- * @param key The shared state key.
1414
- * @param resolver The resolver function that creates the instance.
1415
- * @param persist Whether to persist the instance in the context if the creator block is removed. It's usually needed for those instances that depends on the current block. Defaults to false.
1416
- */
1417
- protected addSharedContextInstance<TKey extends keyof SharedState>(key: TKey, resolver: () => SharedState[TKey], { persist }?: {
1418
- persist?: boolean | undefined;
1419
- }): void;
1420
- private _destroySharedContextInstances;
1421
- protected getSharedContextInstance<TKey extends keyof SharedState, TRequired extends boolean = true>(key: TKey, isRequired?: TRequired): TRequired extends true ? NonNullable<SharedState[TKey]> : SharedState[TKey];
1422
- protected proxyUrl(url: string): Promise<string>;
1423
- get cfg(): ConfigType;
1424
- subConfigValue<T extends keyof ConfigType>(key: T, callback: (value: ConfigType[T]) => void): () => void;
1425
- debugPrint(...args: unknown[]): void;
1426
1510
  }
1427
1511
 
1428
- declare class Modal extends LitBlock {
1429
- static styleAttrs: string[];
1430
- private _mouseDownTarget;
1431
- /** WARNING: Do not this, it's used in dashboard */
1432
- protected dialogEl: lit_html_directives_ref_js.Ref<HTMLDialogElement>;
1433
- /** WARNING: Do not this, it's used in dashboard */
1434
- protected closeDialog: () => void;
1435
- private _handleDialogClose;
1436
- private _handleDialogMouseDown;
1437
- private _handleDialogMouseUp;
1438
- show(): void;
1439
- hide(): void;
1440
- private _handleModalOpen;
1441
- private _handleModalClose;
1442
- private _handleModalCloseAll;
1512
+ declare class EditorFilterControl extends EditorButtonControl {
1513
+ private _operation;
1514
+ private _filter;
1515
+ private _originalUrl;
1516
+ private _observer?;
1517
+ private _cancelPreload?;
1518
+ constructor();
1519
+ private _previewSrc;
1520
+ private _observerCallback;
1443
1521
  initCallback(): void;
1444
- disconnectedCallback(): void;
1445
- private _handleDialogRef;
1446
- render(): lit_html.TemplateResult<1>;
1447
- }
1448
-
1449
- declare const ModalEvents: Readonly<{
1450
- readonly ADD: "modal:add";
1451
- readonly DELETE: "modal:delete";
1452
- readonly OPEN: "modal:open";
1453
- readonly CLOSE: "modal:close";
1454
- readonly CLOSE_ALL: "modal:closeAll";
1455
- readonly DESTROY: "modal:destroy";
1456
- }>;
1457
- type ModalId = ActivityType;
1458
- type ModalCb = (data: {
1459
- id: ModalId;
1460
- modal: Modal;
1461
- }) => void;
1462
- type ModalEventType = (typeof ModalEvents)[keyof typeof ModalEvents];
1463
- declare class ModalManager {
1464
- private _modals;
1465
- private _activeModals;
1466
- private _subscribers;
1467
- private _block;
1468
- constructor(block: LitBlock);
1469
- private _debugPrint;
1470
- /**
1471
- * Register a modal with the manager
1472
- * @param id Unique identifier for the modal
1473
- * @param modal Modal component instance
1474
- */
1475
- registerModal(id: ModalId, modal: Modal): void;
1476
- /** Remove a modal by ID. */
1477
- deleteModal(id: ModalId): boolean;
1478
- /** Open a modal by its ID. */
1479
- open(id: ModalId): boolean;
1480
- /** Close a specific modal by ID. */
1481
- close(id: ModalId): boolean;
1482
- /** Toggle a modal - open if closed, close if open. */
1483
- toggle(id: ModalId): boolean;
1484
- /** True if there are any active modals. */
1485
- get hasActiveModals(): boolean;
1486
- /** Close the most recently opened modal and return to the previous one. */
1487
- back(): boolean;
1488
- /** Close all open modals. */
1489
- closeAll(): number;
1490
- /**
1491
- * Subscribe to modal events
1492
- * @returns Unsubscribe function
1493
- */
1494
- subscribe(event: ModalEventType, callback: ModalCb): () => void;
1495
- /** Unsubscribe from modal events */
1496
- unsubscribe(event: ModalEventType, callback: ModalCb | undefined): void;
1497
- /** Notify all subscribers of a modal event. */
1498
- private _notify;
1499
- /** Destroy the modal manager, clean up resources */
1500
- destroy(): void;
1501
- }
1502
-
1503
- type KebabCase<T extends string> = T extends `${infer Head} ${infer Tail}` ? `${Lowercase<Head>}-${KebabCase<Tail>}` : Lowercase<T>;
1504
- declare const toKebabCase: <T extends string>(str: T) => KebabCase<T>;
1505
-
1506
- declare class Icon extends LitBlock {
1507
- name: string;
1508
- private _resolvedHref;
1509
- private _iconHrefResolver;
1510
- initCallback(): void;
1511
- protected willUpdate(changedProperties: PropertyValues<this>): void;
1512
- private _updateResolvedHref;
1513
- render(): lit_html.TemplateResult<1>;
1514
- }
1515
-
1516
- type CssPropValue = string | number | undefined | null;
1517
- declare const ImgConfig_base: typeof LitElement & Constructor<LitElement> & {
1518
- reg(tagName: string): void;
1519
- } & Constructor<{
1520
- getCssData(propName: string, silentCheck?: boolean): string | number | boolean | null | undefined;
1521
- }>;
1522
- declare class ImgConfig extends ImgConfig_base {
1523
- private _state;
1524
- private _subscribers;
1525
- private _isnObserver;
1526
- private _observed;
1527
- createRenderRoot(): HTMLElement | ShadowRoot;
1528
- constructor();
1529
- protected $$(key: string): unknown;
1530
- protected set$$(kvObj: Record<string, CssPropValue>): void;
1531
- protected sub$$<T = unknown>(key: string, kbFn: (val: T) => void): void;
1532
- private _notify;
1533
- protected analyticsParams(): string;
1534
- protected initAttributes(el: HTMLElement): void;
1535
- protected initIntersection(el: HTMLElement, cbkFn: () => void): void;
1536
- connectedCallback(): void;
1537
- private _initCssProperties;
1538
- disconnectedCallback(): void;
1539
- static get observedAttributes(): string[];
1540
- attributeChangedCallback(name: string, _oldVal: string | null, newVal: string | null): void;
1541
- }
1542
-
1543
- declare class ImgBase extends ImgConfig {
1544
- private _img;
1545
- private _imgPreview;
1546
- private _fmtAbs;
1547
- private _validateSize;
1548
- private _getCdnModifiers;
1549
- private _getTypedCssValue;
1550
- private _getUrlBase;
1551
- private _proxyUrl;
1552
- protected _getElSize(el: HTMLElement, k?: number, wOnly?: boolean): string | null;
1553
- private _setupEventProxy;
1554
- protected get img(): HTMLImageElement;
1555
- private get _currentImg();
1556
- private get _hasPreviewImage();
1557
- private get _bgSelector();
1558
- private get _breakpoints();
1559
- private get _hasFormatJPG();
1560
- private _renderBg;
1561
- private _getSrcset;
1562
- private _getSrc;
1563
- private get _srcUrlPreview();
1564
- private _renderBackground;
1565
- private _appendURL;
1566
- private _setupConfigForImage;
1567
- private _loaderImage;
1568
- private _renderImage;
1569
- protected init(): void;
1570
- }
1571
-
1572
- declare class Img extends ImgBase {
1573
- attributesMeta: {
1574
- src: string;
1575
- } | {
1576
- uuid: string;
1577
- };
1578
- connectedCallback(): void;
1579
- }
1580
-
1581
- declare class FormInput extends LitUploaderBlock {
1582
- propertiesMeta: {
1583
- 'ctx-name': string;
1584
- };
1585
- private _validationInputElement;
1586
- private _dynamicInputsContainer;
1587
- private _createValidationInput;
1588
- initCallback(): void;
1589
- }
1590
-
1591
- declare class Copyright extends LitBlock {
1592
- initCallback(): void;
1593
- render(): lit_html.TemplateResult<1>;
1594
- }
1595
-
1596
- declare class ProgressBar extends LitBlock {
1597
- value: number;
1598
- visible: boolean;
1599
- private _progressValue;
1600
- private readonly _fakeProgressLineRef;
1601
- private readonly _handleFakeProgressAnimation;
1602
- protected firstUpdated(changedProperties: PropertyValues<this>): void;
1603
- protected updated(changedProperties: PropertyValues<this>): void;
1604
- disconnectedCallback(): void;
1605
- private _normalizeProgressValue;
1606
- private _updateProgressValueStyle;
1607
- render(): lit_html.TemplateResult<1>;
1608
- }
1609
-
1610
- declare class ProgressBarCommon extends LitUploaderBlock {
1611
- private _unobserveCollectionCb?;
1612
- private _visible;
1613
- private _value;
1614
- constructor();
1615
- initCallback(): void;
1616
- protected updated(changedProperties: PropertyValues<this>): void;
1617
- disconnectedCallback(): void;
1618
- render(): lit_html.TemplateResult<1>;
1619
- }
1620
-
1621
- type SelectOption = {
1622
- text: string;
1623
- value: string;
1624
- };
1625
- declare class Select extends LitBlock {
1626
- value: string;
1627
- disabled: boolean;
1628
- options: SelectOption[];
1629
- render(): lit_html.TemplateResult<1>;
1630
- private _handleChange;
1631
- }
1632
-
1633
- declare class SourceBtn extends LitUploaderBlock {
1634
- couldBeCtxOwner: boolean;
1635
- private _registeredTypes;
1636
- type?: string;
1637
- private _iconName;
1638
- private _srcTypeKey;
1639
- private _initTypes;
1640
- initCallback(): void;
1641
- private _registerType;
1642
- activate(): void;
1643
- private _applyType;
1644
- protected willUpdate(changedProperties: PropertyValues<this>): void;
1645
- render(): lit_html.TemplateResult<1>;
1646
- }
1647
-
1648
- declare class SourceList extends LitBlock {
1649
- private _rawSourceList;
1650
- private _cameraModes;
1651
- initCallback(): void;
1652
- protected updated(changedProperties: PropertyValues<this>): void;
1653
- private _updateSources;
1654
- private _sources;
1655
- render(): lit_html.TemplateResult<1>;
1656
- }
1657
-
1658
- declare class Spinner extends LitBlock {
1659
- render(): lit_html.TemplateResult<1>;
1660
- }
1661
-
1662
- declare class FileItemConfig extends LitUploaderBlock {
1663
- private _entrySubs;
1664
- protected entry: UploadEntryTypedData | null;
1665
- protected withEntry<A extends unknown[], R>(fn: (entry: UploadEntryTypedData, ...args: A) => R): (...args: A) => R | undefined;
1666
- protected subEntry<K extends UploadEntryKeys>(prop: K, handler: (value: UploadEntryData[K]) => void): void;
1667
- protected reset(): void;
1668
- disconnectedCallback(): void;
1669
- }
1670
-
1671
- declare class Thumb extends FileItemConfig {
1672
- badgeIcon: string;
1673
- uid: Uid;
1674
- private _thumbUrl;
1675
- private _renderedGridOnce;
1676
- private _thumbRect;
1677
- private _isIntersecting;
1678
- private _firstViewMode;
1679
- private _observer?;
1680
- private _pendingThumbUpdate?;
1681
- private _calculateThumbSize;
1682
- private _generateThumbnail;
1683
- private _debouncedGenerateThumb;
1684
- private _decodeImage;
1685
- private _cancelPendingThumbUpdate;
1686
- private _scheduleThumbUpdate;
1687
- private _requestThumbGeneration;
1688
- protected firstUpdated(changedProperties: PropertyValues<this>): void;
1689
- protected updated(changedProperties: PropertyValues<this>): void;
1690
- private _observerCallback;
1691
- protected reset(): void;
1692
- private _bindToEntry;
1693
- initCallback(): void;
1694
- connectedCallback(): void;
1695
- disconnectedCallback(): void;
1696
- render(): lit_html.TemplateResult<1>;
1697
- }
1698
-
1699
- declare class ActivityHeader extends LitActivityBlock {
1700
- }
1701
-
1702
- declare class StartFrom extends LitActivityBlock {
1703
- protected historyTracked: boolean;
1704
- activityType: ActivityType;
1705
- initCallback(): void;
1706
- render(): lit_html.TemplateResult<1>;
1707
- }
1708
-
1709
- type EventListenerMap = {
1710
- [K in (typeof EventType)[keyof typeof EventType]]: (e: CustomEvent<EventPayload[K]>) => void;
1711
- };
1712
- declare class UploadCtxProvider extends LitUploaderBlock {
1713
- propertiesMeta: {
1714
- 'ctx-name': string;
1715
- };
1716
- static styleAttrs: string[];
1717
- static EventType: Readonly<{
1718
- readonly FILE_ADDED: "file-added";
1719
- readonly FILE_REMOVED: "file-removed";
1720
- readonly FILE_UPLOAD_START: "file-upload-start";
1721
- readonly FILE_UPLOAD_PROGRESS: "file-upload-progress";
1722
- readonly FILE_UPLOAD_SUCCESS: "file-upload-success";
1723
- readonly FILE_UPLOAD_FAILED: "file-upload-failed";
1724
- readonly FILE_URL_CHANGED: "file-url-changed";
1725
- readonly MODAL_OPEN: "modal-open";
1726
- readonly MODAL_CLOSE: "modal-close";
1727
- readonly DONE_CLICK: "done-click";
1728
- readonly UPLOAD_CLICK: "upload-click";
1729
- readonly ACTIVITY_CHANGE: "activity-change";
1730
- readonly COMMON_UPLOAD_START: "common-upload-start";
1731
- readonly COMMON_UPLOAD_PROGRESS: "common-upload-progress";
1732
- readonly COMMON_UPLOAD_SUCCESS: "common-upload-success";
1733
- readonly COMMON_UPLOAD_FAILED: "common-upload-failed";
1734
- readonly CHANGE: "change";
1735
- readonly GROUP_CREATED: "group-created";
1736
- }>;
1737
- private _unbindEventEmitter;
1738
- initCallback(): void;
1739
- disconnectedCallback(): void;
1740
- }
1741
- interface UploadCtxProvider extends LitUploaderBlock {
1742
- addEventListener<T extends keyof EventListenerMap>(type: T, listener: EventListenerMap[T], options?: boolean | AddEventListenerOptions): void;
1743
- removeEventListener<T extends keyof EventListenerMap>(type: T, listener: EventListenerMap[T], options?: boolean | EventListenerOptions): void;
1744
- }
1745
-
1746
- declare class UrlSource extends LitUploaderBlock {
1747
- couldBeCtxOwner: boolean;
1748
- activityType: ActivityType;
1749
- private _formState;
1750
- initCallback(): void;
1751
- private _inputRef;
1752
- private _handleInput;
1753
- private _handleUpload;
1754
- render(): lit_html.TemplateResult<1>;
1755
- }
1756
-
1757
- declare function initState(fnCtx: CloudImageEditorBlock): {
1758
- '*originalUrl': null;
1759
- '*loadingOperations': LoadingOperations;
1760
- '*faderEl': null;
1761
- '*cropperEl': null;
1762
- '*imgEl': null;
1763
- '*imgContainerEl': null;
1764
- '*networkProblems': boolean;
1765
- '*imageSize': null;
1766
- '*editorTransformations': {};
1767
- '*cropPresetList': never[];
1768
- '*currentAspectRatio': null;
1769
- '*tabList': readonly ["crop", "tuning", "filters"];
1770
- '*tabId': "crop";
1771
- '*on.retryNetwork': () => void;
1772
- '*on.apply': (transformations: Transformations) => void;
1773
- '*on.cancel': () => void;
1774
- };
1775
-
1776
- declare class CloudImageEditorBlock extends LitBlock {
1777
- attributesMeta: ({
1778
- uuid: string;
1779
- } | {
1780
- 'cdn-url': string;
1781
- }) & Partial<{
1782
- tabs: string;
1783
- 'crop-preset': string;
1784
- }> & {
1785
- 'ctx-name': string;
1786
- };
1787
- ctxOwner: boolean;
1788
- static styleAttrs: string[];
1789
- private _statusMessage;
1790
- private _imageSrc;
1791
- private _fileType;
1792
- private _showLoader;
1793
- uuid: string | null;
1794
- cdnUrl: string | null;
1795
- cropPreset: string;
1796
- tabs: string | null;
1797
- private _hasNetworkProblems;
1798
- private _isInitialized;
1799
- private _pendingInitUpdate;
1800
- private readonly _debouncedShowLoader;
1801
- private readonly _imgRef;
1802
- private readonly _cropperRef;
1803
- private readonly _faderRef;
1804
- private readonly _imgContainerRef;
1805
- private readonly _handleImageLoad;
1806
- private readonly _handleImageError;
1807
- private readonly _handleRetryNetwork;
1808
- private _scheduleInitialization;
1809
- init$: ReturnType<typeof initState>;
1810
- initCallback(): void;
1811
- private _assignSharedElements;
1812
- private _attachImageListeners;
1813
- private _detachImageListeners;
1814
- private get _imageClassName();
1815
- /**
1816
- * To proper work, we need non-zero size the element. So, we'll wait for it.
1817
- */
1818
- private _waitForSize;
1819
- firstUpdated(changedProperties: PropertyValues<this>): void;
1820
- disconnectedCallback(): void;
1821
- render(): lit_html.TemplateResult<1>;
1822
- protected updated(changedProperties: PropertyValues<this>): void;
1823
- private _syncTabListFromProp;
1824
- private _syncCropPresetState;
1825
- updateImage(): Promise<void>;
1826
- initEditor(): Promise<void>;
1827
- }
1828
-
1829
- declare class CropFrame extends LitBlock {
1830
- private _backdropMask?;
1831
- private _backdropMaskInner?;
1832
- private _frameThumbs?;
1833
- private _frameGuides?;
1834
- private _draggingThumb?;
1835
- private _hoverThumb?;
1836
- private _dragStartPoint?;
1837
- private _dragStartCrop?;
1838
- private _frameImage?;
1839
- private _guidesHidden;
1840
- private _draggingValue;
1841
- private readonly _svgRef;
1842
- private _svgReady;
1843
- private _pendingMaskHref;
1844
- private get _svgElement();
1845
- private get _dragging();
1846
- private set _dragging(value);
1847
- private _applyGuidesDragState;
1848
- private _shouldThumbBeDisabled;
1849
- private _createBackdrop;
1850
- /**
1851
- * @private Super Tricky workaround for the chromium bug See
1852
- * https://bugs.chromium.org/p/chromium/issues/detail?id=330815
1853
- */
1854
- private _resizeBackdrop;
1855
- private _updateBackdrop;
1856
- private _updateFrame;
1857
- private _createThumb;
1858
- private _createThumbs;
1859
- private _createGuides;
1860
- private _createFrame;
1861
- private _handlePointerDown;
1862
- private readonly _handlePointerUp;
1863
- private readonly _handlePointerMove;
1864
- private _calcCropBox;
1865
- private readonly _handleSvgPointerMove;
1866
- private _updateCursor;
1867
- private _createMask;
1868
- private _updateMask;
1869
- private _render;
1870
- toggleThumbs(visible: boolean): void;
1871
- initCallback(): void;
1872
- protected firstUpdated(changedProperties: PropertyValues<this>): void;
1873
- private _initializeSvg;
1874
- disconnectedCallback(): void;
1875
- render(): TemplateResult;
1876
- }
1877
-
1878
- declare class EditorButtonControl extends LitBlock {
1879
- active: boolean;
1880
- title: string;
1881
- protected icon: string;
1882
- protected titleProp: string;
1883
- protected get buttonClasses(): Record<string, boolean>;
1884
- private _updateHostStateClasses;
1885
- protected onClick(_event: MouseEvent): void;
1886
- connectedCallback(): void;
1887
- protected updated(changedProperties: PropertyValues<this>): void;
1888
- render(): lit_html.TemplateResult<1>;
1889
- }
1890
-
1891
- declare class EditorFreeformButtonControl extends EditorButtonControl {
1892
- initCallback(): void;
1893
- onClick(): void;
1894
- private _computeTitle;
1895
- render(): lit_html.TemplateResult<1>;
1896
- }
1897
- declare class EditorAspectRatioButtonControl extends EditorButtonControl {
1898
- private _aspectRatio;
1899
- get aspectRatio(): CropAspectRatio | null;
1900
- set aspectRatio(value: CropAspectRatio | null);
1901
- initCallback(): void;
1902
- protected onClick(): void;
1903
- private _updateAspectRatioPresentation;
1904
- private _renderIcon;
1905
- render(): lit_html.TemplateResult<1>;
1906
- }
1907
-
1908
- declare class EditorCropButtonControl extends EditorButtonControl {
1909
- operation: CropOperation | undefined;
1910
- protected willUpdate(changedProperties: PropertyValues<this>): void;
1911
- protected onClick(e: MouseEvent): void;
1912
- }
1913
-
1914
- declare class EditorFilterControl extends EditorButtonControl {
1915
- private _operation;
1916
- private _filter;
1917
- private _originalUrl;
1918
- private _observer?;
1919
- private _cancelPreload?;
1920
- private _lastPreviewRequestId;
1921
- private _previewVisibilityCheckRaf?;
1922
- private _previewVisibilityCheckTimeout?;
1923
- private _previewImage;
1924
- private _previewLoaded;
1925
- isOriginal: boolean;
1926
- private _iconSize;
1927
- get filter(): string;
1928
- set filter(value: string);
1929
- onClick(e: MouseEvent): void;
1930
- private _previewSrc;
1931
- private _observerCallback;
1932
- initCallback(): void;
1933
- disconnectedCallback(): void;
1934
- protected updated(changedProperties: PropertyValues<this>): void;
1935
- private _updateFilterLabels;
1936
- private _loadPreview;
1937
- private _schedulePreviewVisibilityCheck;
1938
- private _clearPreviewVisibilityChecks;
1939
- private get _shouldShowPreview();
1940
- render(): lit_html.TemplateResult<1>;
1522
+ destroyCallback(): void;
1941
1523
  }
1942
1524
 
1943
1525
  type Operations = {
@@ -1945,7 +1527,7 @@ type Operations = {
1945
1527
  mirror: boolean;
1946
1528
  rotate: number;
1947
1529
  };
1948
- declare class EditorImageCropper extends LitBlock {
1530
+ declare class EditorImageCropper extends Block {
1949
1531
  ctxOwner: boolean;
1950
1532
  private _commitDebounced;
1951
1533
  private _handleResizeThrottled;
@@ -1954,12 +1536,9 @@ declare class EditorImageCropper extends LitBlock {
1954
1536
  private _ctx;
1955
1537
  private _isActive;
1956
1538
  private _observer?;
1957
- private _image;
1958
1539
  private _cancelPreload?;
1959
- private readonly _canvasRef;
1960
- private readonly _frameRef;
1961
1540
  constructor();
1962
- protected firstUpdated(changedProperties: PropertyValues<this>): void;
1541
+ private _handleResize;
1963
1542
  private _syncTransformations;
1964
1543
  private _initCanvas;
1965
1544
  private _alignImage;
@@ -1984,12 +1563,11 @@ declare class EditorImageCropper extends LitBlock {
1984
1563
  private _waitForImage;
1985
1564
  private _handleImageLoading;
1986
1565
  initCallback(): void;
1987
- disconnectedCallback(): void;
1988
- render(): TemplateResult;
1566
+ destroyCallback(): void;
1989
1567
  }
1990
1568
 
1991
1569
  type OperationKey = keyof typeof COLOR_OPERATIONS_CONFIG;
1992
- declare class EditorImageFader extends LitBlock {
1570
+ declare class EditorImageFader extends Block {
1993
1571
  private _isActive;
1994
1572
  private _hidden;
1995
1573
  private _operation;
@@ -1997,6 +1575,7 @@ declare class EditorImageFader extends LitBlock {
1997
1575
  private _value?;
1998
1576
  private _transformations;
1999
1577
  private _keypoints;
1578
+ private _container?;
2000
1579
  private _previewImage?;
2001
1580
  private _cancelLastImages?;
2002
1581
  private _cancelBatchPreload?;
@@ -2004,8 +1583,6 @@ declare class EditorImageFader extends LitBlock {
2004
1583
  private _fromViewer?;
2005
1584
  private _raf;
2006
1585
  private _addKeypointDebounced;
2007
- private readonly _previewHostRef;
2008
- private readonly _layersHostRef;
2009
1586
  constructor();
2010
1587
  private _handleImageLoading;
2011
1588
  private _flush;
@@ -2015,6 +1592,7 @@ declare class EditorImageFader extends LitBlock {
2015
1592
  * Check if current operation and filter equals passed ones
2016
1593
  */
2017
1594
  private _isSame;
1595
+ private _addKeypoint;
2018
1596
  set(value: string | number): void;
2019
1597
  private _update;
2020
1598
  private _createPreviewImage;
@@ -2037,352 +1615,440 @@ declare class EditorImageFader extends LitBlock {
2037
1615
  deactivate({ hide }?: {
2038
1616
  hide?: boolean;
2039
1617
  }): void;
2040
- private _ensurePreviewAttached;
2041
- private _clearLayersHost;
2042
- render(): TemplateResult;
2043
1618
  }
2044
1619
 
2045
1620
  declare class EditorOperationControl extends EditorButtonControl {
2046
1621
  private _operation;
2047
- get operation(): ColorOperation | '';
2048
- set operation(value: ColorOperation | '');
2049
- private _updateOperationMetadata;
2050
1622
  initCallback(): void;
2051
- protected onClick(e: MouseEvent): void;
2052
1623
  }
2053
1624
 
2054
- declare class EditorScroller extends LitBlock {
2055
- private readonly _handleWheel;
2056
- connectedCallback(): void;
2057
- disconnectedCallback(): void;
1625
+ declare class EditorScroller extends Block {
1626
+ initCallback(): void;
2058
1627
  }
2059
1628
 
2060
1629
  type SliderOperation = ColorOperation | 'filter';
2061
1630
  type SliderFilter = FilterId | typeof FAKE_ORIGINAL_FILTER;
2062
1631
  declare const FAKE_ORIGINAL_FILTER = "original";
2063
- declare class EditorSlider extends LitBlock {
2064
- state: {
2065
- operation: SliderOperation;
2066
- filter: SliderFilter | undefined;
2067
- originalUrl: string;
2068
- disabled: boolean;
2069
- min: number;
2070
- max: number;
2071
- value: number;
2072
- defaultValue: number;
2073
- zero: number;
2074
- };
2075
- private _handleInput;
1632
+ declare class EditorSlider extends Block {
1633
+ private _operation;
1634
+ private _filter?;
1635
+ private _originalUrl;
1636
+ constructor();
2076
1637
  setOperation(operation: SliderOperation, filter?: SliderFilter): void;
2077
1638
  private _initializeValues;
2078
1639
  apply(): void;
2079
1640
  cancel(): void;
2080
1641
  initCallback(): void;
2081
- protected updated(changedProperties: PropertyValues<this>): void;
2082
- render(): lit_html.TemplateResult<1>;
2083
1642
  }
2084
1643
 
2085
- type TabIdValue = (typeof TabId)[keyof typeof TabId];
2086
- declare class EditorToolbar extends LitBlock {
2087
- private _showLoader;
2088
- showMainToolbar: boolean;
2089
- showSubToolbar: boolean;
2090
- private _showTabToggles;
2091
- tabList: readonly TabIdValue[];
2092
- activeTab: TabIdValue;
2093
- private _useSliderPanel;
2094
- private _tooltipVisible;
2095
- private _operationTooltip;
2096
- private _tabIndicatorOffset;
2097
- private _tabIndicatorWidth;
2098
- private readonly _sliderRef;
2099
- private readonly _tabIndicatorRef;
2100
- protected readonly tabToggleRefs: Record<TabIdValue, Ref<HTMLElement>>;
2101
- private readonly _handleWindowResize;
2102
- private _cropPresets;
1644
+ declare class EditorToolbar extends Block {
1645
+ private _debouncedShowLoader;
2103
1646
  private _cancelPreload?;
2104
- private readonly _debouncedShowLoader;
2105
- private readonly _updateInfoTooltip;
2106
- private readonly _subTopToolbarStyles;
2107
- private readonly _subBottomToolbarStyles;
2108
- private readonly _tabContentStyles;
2109
- private readonly _tabToggleStyles;
2110
- private readonly _tabTogglesStyles;
2111
- init$: Record<string, unknown>;
1647
+ private _updateInfoTooltip;
1648
+ constructor();
2112
1649
  private _onSliderClose;
1650
+ private _createOperationControl;
1651
+ private _createFilterControl;
1652
+ private _createToggleControl;
1653
+ private _createAspectRatioControl;
1654
+ private _createFreeformControl;
1655
+ private _clearListAspectRatio;
1656
+ private _renderControlsList;
2113
1657
  private _activateTab;
2114
- private _applyTabState;
1658
+ private _unmountTabControls;
2115
1659
  private _syncTabIndicator;
2116
- private get _hasAspectRatioPicker();
2117
- private _renderControlsByTab;
2118
- private _renderCropTabControls;
2119
- private _renderFilterTabControls;
2120
- private _renderTuningTabControls;
2121
- private _renderControlGroup;
2122
- private _renderFreeformControl;
2123
- private _renderAspectRatioControl;
2124
- private _renderCropOperationControl;
2125
- private _renderFilterControl;
2126
- private _renderOperationControl;
2127
- private _renderAspectRatioList;
2128
1660
  private _preloadEditedImage;
1661
+ private _showLoader;
1662
+ private _updateInfoTooltipHandler;
2129
1663
  initCallback(): void;
2130
- connectedCallback(): void;
2131
- firstUpdated(changedProperties: PropertyValues<this>): void;
2132
- protected updated(changedProperties: PropertyValues<this>): void;
2133
- disconnectedCallback(): void;
2134
- private _assignSharedElements;
2135
- private readonly _handleCancel;
2136
- private readonly _handleApply;
2137
- private readonly _handleApplySlider;
2138
- private readonly _handleCancelSlider;
2139
- private readonly _handleTabClick;
2140
- private _renderTabToggle;
2141
- private _renderTabContent;
2142
- render(): TemplateResult<1>;
2143
- }
2144
-
2145
- type Theme = string | null;
2146
- declare class BtnUi extends LitBlock {
2147
- text: string;
2148
- icon: string;
2149
- active: boolean;
2150
- reverse: boolean;
2151
- theme: Theme;
2152
- ariaRole: string;
2153
- ariaControls: string;
2154
- titleProp: string;
2155
- protected firstUpdated(changed: PropertyValues<this>): void;
2156
- protected updated(changed: PropertyValues<this>): void;
2157
- private _applyReverse;
2158
- private _applyThemeClass;
2159
- private get _iconClassMap();
2160
- private get _computedIconHidden();
2161
- private get _computedIconSingle();
2162
- render(): lit_html.TemplateResult<1>;
2163
- }
2164
-
2165
- declare class LineLoaderUi extends LitBlock {
2166
- active: boolean;
2167
- private readonly _lineRef;
2168
- private _isAnimating;
1664
+ destroyCallback(): void;
1665
+ }
1666
+
1667
+ declare class BtnUi extends Block {
1668
+ private _iconReversed;
1669
+ private _iconSingle;
1670
+ private _iconHidden;
1671
+ constructor();
1672
+ private _iconCss;
1673
+ initCallback(): void;
1674
+ set reverse(_value: boolean);
1675
+ }
1676
+
1677
+ declare class LineLoaderUi extends Block {
1678
+ private _active;
2169
1679
  private readonly _handleTransitionEndRight;
2170
- protected firstUpdated(changedProperties: PropertyValues<this>): void;
2171
- protected updated(changedProperties: PropertyValues<this>): void;
1680
+ initCallback(): void;
2172
1681
  private _start;
2173
1682
  private _stop;
2174
- private _resetLine;
2175
- render(): lit_html.TemplateResult<1>;
2176
1683
  }
2177
1684
 
2178
- type PresenceToggleStyle = {
2179
- transition?: string;
2180
- visible?: string;
2181
- hidden?: string;
2182
- };
2183
- declare class PresenceToggle extends LitBlock {
1685
+ declare class PresenceToggle extends Block {
2184
1686
  private _visible;
2185
- private _styles;
2186
1687
  private _visibleStyle;
2187
1688
  private _hiddenStyle;
2188
1689
  private _externalTransitions;
2189
- private _initialRenderComplete;
2190
- set visible(value: boolean);
2191
- get visible(): boolean;
2192
- set styles(styles: PresenceToggleStyle);
2193
- get styles(): PresenceToggleStyle;
1690
+ constructor();
2194
1691
  private _handleVisible;
2195
- private _dispatchInitialRenderEvent;
2196
1692
  initCallback(): void;
2197
1693
  }
2198
1694
 
2199
- declare class SliderUi extends LitBlock {
1695
+ declare class SliderUi extends Block {
2200
1696
  private _observer?;
2201
1697
  private _thumbSize;
1698
+ private _zero;
2202
1699
  private _zeroDotEl?;
2203
1700
  private _stepsCount?;
2204
- private readonly _inputRef;
2205
- private readonly _thumbRef;
2206
- private readonly _stepsRef;
2207
- disabled: boolean;
2208
- min: number;
2209
- max: number;
2210
- defaultValue: number;
2211
- zero: number;
2212
- private _currentValue;
2213
1701
  constructor();
2214
- private _emitSliderEvent;
2215
- private readonly _handleSliderInput;
2216
- private readonly _handleSliderChange;
2217
- private readonly _handleInputFocus;
2218
- private readonly _handleInputBlur;
2219
- protected firstUpdated(changedProperties: PropertyValues<this>): void;
2220
- protected willUpdate(changedProperties: PropertyValues<this>): void;
1702
+ initCallback(): void;
1703
+ private _inputEl;
1704
+ private _thumbEl;
1705
+ private _stepsEl;
2221
1706
  private _updateValue;
2222
1707
  private _updateZeroDot;
2223
1708
  private _updateSteps;
2224
- disconnectedCallback(): void;
2225
- private _setCurrentValue;
2226
- private _syncInputValue;
2227
- private _extractEventValue;
2228
- render(): lit_html.TemplateResult<1>;
1709
+ destroyCallback(): void;
1710
+ }
1711
+
1712
+ declare class Copyright extends Block {
1713
+ initCallback(): void;
1714
+ static template: string;
2229
1715
  }
2230
1716
 
2231
- declare class DropArea extends LitUploaderBlock {
1717
+ declare class DropArea extends UploaderBlock {
2232
1718
  static styleAttrs: string[];
2233
- disabled: boolean;
2234
- clickable: boolean;
2235
- withIcon: boolean;
2236
- fullscreen: boolean;
2237
- initflow: boolean;
2238
- text?: string;
2239
- private _isEnabled;
2240
- private _isVisible;
2241
- private get _localizedText();
2242
1719
  private _destroyDropzone;
2243
1720
  private _destroyContentWrapperDropzone;
2244
- private _contentWrapperRef;
2245
- private readonly _handleAreaInteraction;
2246
- private _sourceListAllowsLocal;
2247
- private _clickableListenersAttached;
1721
+ private _onAreaClicked;
1722
+ constructor();
2248
1723
  isActive(): boolean;
2249
1724
  initCallback(): void;
2250
- protected willUpdate(changedProperties: PropertyValues<this>): void;
2251
- protected updated(changedProperties: PropertyValues<this>): void;
2252
1725
  /** Ignore drop events if there are other visible drop areas on the page. */
2253
1726
  private _shouldIgnore;
2254
1727
  private _couldHandleFiles;
2255
- private _updateIsEnabled;
2256
- private _updateVisibility;
2257
- private _updateDragStateAttribute;
2258
- private _updateClickableListeners;
1728
+ destroyCallback(): void;
1729
+ }
1730
+
1731
+ type EntrySubscription = ReturnType<UploadEntryTypedData['subscribe']>;
1732
+ declare class FileItemConfig extends UploaderBlock {
1733
+ protected _entrySubs: Set<EntrySubscription>;
1734
+ protected _entry: UploadEntryTypedData | null;
1735
+ protected _withEntry<A extends unknown[], R>(fn: (entry: UploadEntryTypedData, ...args: A) => R): (...args: A) => R | undefined;
1736
+ protected _subEntry<K extends UploadEntryKeys>(prop: K, handler: (value: UploadEntryData[K]) => void): void;
1737
+ protected _reset(): void;
2259
1738
  disconnectedCallback(): void;
2260
- render(): lit_html.TemplateResult<1>;
2261
1739
  }
2262
1740
 
2263
1741
  declare class FileItem extends FileItemConfig {
2264
- protected couldBeCtxOwner: boolean;
2265
- private _pauseRender;
2266
- uid: Uid;
2267
- private _itemName;
2268
- private _errorText;
2269
- private _hint;
2270
- private _progressValue;
2271
- private _progressVisible;
2272
- private _badgeIcon;
2273
- private _isFinished;
2274
- private _isFailed;
2275
- private _isUploading;
2276
- private _isFocused;
2277
- private _isEditable;
2278
- private _showFileNames;
2279
- private _ariaLabelStatusFile;
1742
+ couldBeCtxOwner: boolean;
1743
+ pauseRender: boolean;
2280
1744
  private _renderedOnce;
2281
1745
  private _observer?;
2282
- private _handleEdit;
2283
- private _handleRemove;
2284
- private _handleUploadClick;
1746
+ protected _isIntersecting: boolean;
1747
+ protected _thumbRect?: DOMRectReadOnly;
1748
+ constructor();
2285
1749
  private _calculateState;
2286
1750
  private _debouncedCalculateState;
2287
1751
  private _updateHintAndProgress;
2288
1752
  private _handleState;
2289
- protected reset(): void;
1753
+ _reset(): void;
2290
1754
  private _observerCallback;
2291
1755
  private _handleEntryId;
2292
1756
  private _updateShowFileNames;
2293
- protected willUpdate(changedProperties: PropertyValues<this>): void;
2294
1757
  initCallback(): void;
1758
+ destroyCallback(): void;
2295
1759
  connectedCallback(): void;
2296
1760
  disconnectedCallback(): void;
2297
- private _upload;
1761
+ private _settingsOfShrink;
1762
+ private _processShrink;
1763
+ upload: () => Promise<void> | undefined;
1764
+ static template: string;
2298
1765
  static activeInstances: Set<FileItem>;
2299
- protected shouldUpdate(changedProperties: PropertyValues<this>): boolean;
2300
- render(): lit_html.TemplateResult<1>;
2301
1766
  }
2302
1767
 
2303
- declare class SimpleBtn extends LitUploaderBlock {
1768
+ declare class FormInput extends UploaderBlock {
1769
+ requireCtxName: boolean;
1770
+ _validationInputElement: HTMLInputElement | null;
1771
+ _dynamicInputsContainer: HTMLDivElement | null;
1772
+ private get _inputName();
1773
+ _createValidationInput(): HTMLInputElement;
1774
+ initCallback(): void;
1775
+ }
1776
+
1777
+ declare class Icon extends Block {
1778
+ constructor();
1779
+ initCallback(): void;
1780
+ }
1781
+
1782
+ declare class ImgConfig extends BaseComponent<any> {
1783
+ static get observedAttributes(): string[];
1784
+ constructor();
1785
+ cssInit$: any;
1786
+ /**
1787
+ * @param {String} key
1788
+ * @returns {any}
1789
+ */
1790
+ $$(key: string): any;
1791
+ /** @param {Object<String, String | Number>} kvObj */
1792
+ set$$(kvObj: any): void;
1793
+ /**
1794
+ * @param {String} key
1795
+ * @param {(val: any) => void} kbFn
1796
+ */
1797
+ sub$$(key: string, kbFn: (val: any) => void): void;
1798
+ analyticsParams(): string;
1799
+ initAttributes(el: any): void;
1800
+ /**
1801
+ * @param {HTMLElement} el
1802
+ * @param {() => void} cbkFn
1803
+ */
1804
+ initIntersection(el: HTMLElement, cbkFn: () => void): void;
1805
+ /** @private */
1806
+ private _isnObserver;
1807
+ /** @private */
1808
+ private _observed;
1809
+ attributeChangedCallback(name: any, oldVal: any, newVal: any): void;
1810
+ }
1811
+
1812
+ declare class ImgBase extends ImgConfig {
1813
+ _img: HTMLImageElement;
1814
+ _imgPreview: HTMLImageElement;
1815
+ /**
1816
+ * @private
1817
+ * @param {String} src
1818
+ */
1819
+ private _fmtAbs;
1820
+ /**
1821
+ * Validate size
1822
+ *
1823
+ * @param {String} [size]
1824
+ * @returns {String | Number}
1825
+ */
1826
+ _validateSize(size?: string): string | number;
1827
+ /**
1828
+ * Image operations
1829
+ *
1830
+ * @param {String} [size]
1831
+ * @param {String} [blur]
1832
+ */
1833
+ _getCdnModifiers(size?: string, blur?: string): string;
1834
+ /**
1835
+ * @private
1836
+ * @param {String} [size]
1837
+ * @param {String} [blur]
1838
+ * @returns {any}
1839
+ */
1840
+ private _getUrlBase;
1841
+ /**
1842
+ * @private
1843
+ * @param {String} url
1844
+ * @returns {String}
1845
+ */
1846
+ private _proxyUrl;
1847
+ /**
1848
+ * @param {HTMLElement} el
1849
+ * @param {Number} [k]
1850
+ * @param {Boolean} [wOnly]
1851
+ */
1852
+ _getElSize(el: HTMLElement, k?: number, wOnly?: boolean): string | null;
1853
+ /** @param {HTMLImageElement} img */
1854
+ _setupEventProxy(img: HTMLImageElement): void;
1855
+ /** @type {HTMLImageElement} */
1856
+ get img(): HTMLImageElement;
1857
+ get currentImg(): {
1858
+ type: "PREVIEW";
1859
+ img: HTMLImageElement;
1860
+ } | {
1861
+ type: "MAIN";
1862
+ img: HTMLImageElement;
1863
+ };
1864
+ get hasPreviewImage(): any;
1865
+ get bgSelector(): any;
1866
+ get breakpoints(): number[] | null;
1867
+ get hasFormatJPG(): boolean;
1868
+ /** @param {HTMLElement} el */
1869
+ renderBg(el: HTMLElement): void;
1870
+ getSrcset(): string;
1871
+ getSrc(): any;
1872
+ get srcUrlPreview(): any;
1873
+ renderBackground(): void;
1874
+ _appendURL({ elNode, src, srcset }: {
1875
+ elNode: any;
1876
+ src: any;
1877
+ srcset: any;
1878
+ }): void;
1879
+ _setupConfigForImage({ elNode }: {
1880
+ elNode: any;
1881
+ }): void;
1882
+ loaderImage({ src, srcset, elNode }: {
1883
+ src: any;
1884
+ srcset: any;
1885
+ elNode: any;
1886
+ }): Promise<any>;
1887
+ renderImage(): Promise<void>;
1888
+ init(): void;
1889
+ }
1890
+
1891
+ declare class Img extends ImgBase {
1892
+ }
1893
+
1894
+ declare class ProgressBar extends Block {
1895
+ private _value;
1896
+ private _visible;
1897
+ constructor();
1898
+ initCallback(): void;
1899
+ }
1900
+
1901
+ declare class ProgressBarCommon extends UploaderBlock {
1902
+ private _unobserveCollectionCb?;
1903
+ constructor();
1904
+ initCallback(): void;
1905
+ destroyCallback(): void;
1906
+ }
1907
+
1908
+ declare class Select extends Block {
1909
+ ref: {
1910
+ select: HTMLSelectElement;
1911
+ } & Record<string, HTMLElement>;
1912
+ value: string;
1913
+ constructor();
1914
+ initCallback(): void;
1915
+ }
1916
+
1917
+ declare class SimpleBtn extends UploaderBlock {
2304
1918
  static styleAttrs: string[];
2305
1919
  couldBeCtxOwner: boolean;
2306
- dropzone: boolean;
2307
- private _buttonTextKey;
2308
- private readonly _handleClick;
1920
+ constructor();
2309
1921
  initCallback(): void;
2310
- render(): lit_html.TemplateResult<1>;
2311
1922
  }
2312
1923
 
2313
- declare class LitSolutionBlock extends LitBlock {
2314
- static styleAttrs: string[];
2315
- init$: {
2316
- '*solution': string | null;
2317
- '*commonProgress': number;
2318
- '*uploadList': never[];
2319
- '*uploadQueue': _uploadcare_upload_client.Queue;
2320
- '*collectionErrors': OutputErrorCollection[];
2321
- '*collectionState': OutputCollectionState | null;
2322
- '*groupInfo': _uploadcare_upload_client.UploadcareGroup | null;
2323
- '*uploadTrigger': Set<string>;
2324
- '*currentActivity': null;
2325
- '*currentActivityParams': {};
2326
- '*history': never[];
2327
- '*historyBack': null;
2328
- '*closeModal': () => void;
2329
- };
1924
+ type SourceTypeConfig = {
1925
+ type: string;
1926
+ activity?: ActivityType | null;
1927
+ textKey?: string;
1928
+ icon?: string;
1929
+ activate?: () => boolean;
1930
+ activityParams?: Record<string, unknown>;
1931
+ };
1932
+ declare class SourceBtn extends UploaderBlock {
1933
+ couldBeCtxOwner: boolean;
1934
+ private type;
1935
+ private _registeredTypes;
1936
+ constructor();
1937
+ initTypes(): void;
1938
+ initCallback(): void;
1939
+ registerType(typeConfig: SourceTypeConfig): void;
1940
+ getType(type: string): SourceTypeConfig | undefined;
1941
+ activate(): void;
1942
+ applyType(type: string): void;
1943
+ }
1944
+
1945
+ declare class SourceList extends Block {
2330
1946
  initCallback(): void;
2331
- render(): lit_html.TemplateResult<1>;
2332
1947
  }
2333
1948
 
2334
- declare class FileUploaderRegular extends LitSolutionBlock {
2335
- attributesMeta: {
2336
- headless?: boolean;
2337
- 'ctx-name': string;
2338
- };
1949
+ declare class Spinner extends BaseComponent<void> {
1950
+ }
1951
+
1952
+ declare class StartFrom extends ActivityBlock {
1953
+ historyTracked: boolean;
1954
+ activityType: ActivityType;
1955
+ initCallback(): void;
1956
+ }
1957
+
1958
+ declare class Thumb extends FileItemConfig {
1959
+ private _renderedGridOnce;
1960
+ private _thumbRect;
1961
+ private _isIntersecting;
1962
+ private _firstViewMode;
1963
+ private _observer?;
1964
+ constructor();
1965
+ private _calculateThumbSize;
1966
+ private _generateThumbnail;
1967
+ private _debouncedGenerateThumb;
1968
+ private _observerCallback;
1969
+ protected _reset(): void;
1970
+ private _handleEntryId;
1971
+ initCallback(): void;
1972
+ connectedCallback(): void;
1973
+ disconnectedCallback(): void;
1974
+ }
1975
+
1976
+ type EventListenerMap = {
1977
+ [K in (typeof EventType)[keyof typeof EventType]]: (e: CustomEvent<EventPayload[K]>) => void;
1978
+ };
1979
+ declare class UploadCtxProvider extends UploaderBlock {
2339
1980
  static styleAttrs: string[];
2340
- headless: boolean;
1981
+ static EventType: Readonly<{
1982
+ readonly FILE_ADDED: "file-added";
1983
+ readonly FILE_REMOVED: "file-removed";
1984
+ readonly FILE_UPLOAD_START: "file-upload-start";
1985
+ readonly FILE_UPLOAD_PROGRESS: "file-upload-progress";
1986
+ readonly FILE_UPLOAD_SUCCESS: "file-upload-success";
1987
+ readonly FILE_UPLOAD_FAILED: "file-upload-failed";
1988
+ readonly FILE_URL_CHANGED: "file-url-changed";
1989
+ readonly MODAL_OPEN: "modal-open";
1990
+ readonly MODAL_CLOSE: "modal-close";
1991
+ readonly DONE_CLICK: "done-click";
1992
+ readonly UPLOAD_CLICK: "upload-click";
1993
+ readonly ACTIVITY_CHANGE: "activity-change";
1994
+ readonly COMMON_UPLOAD_START: "common-upload-start";
1995
+ readonly COMMON_UPLOAD_PROGRESS: "common-upload-progress";
1996
+ readonly COMMON_UPLOAD_SUCCESS: "common-upload-success";
1997
+ readonly COMMON_UPLOAD_FAILED: "common-upload-failed";
1998
+ readonly CHANGE: "change";
1999
+ readonly GROUP_CREATED: "group-created";
2000
+ }>;
2001
+ requireCtxName: boolean;
2002
+ initCallback(): void;
2003
+ destroyCallback(): void;
2004
+ }
2005
+ interface UploadCtxProvider extends UploaderBlock {
2006
+ addEventListener<T extends keyof EventListenerMap>(type: T, listener: EventListenerMap[T], options?: boolean | AddEventListenerOptions): void;
2007
+ removeEventListener<T extends keyof EventListenerMap>(type: T, listener: EventListenerMap[T], options?: boolean | EventListenerOptions): void;
2008
+ }
2009
+
2010
+ declare class UrlSource extends UploaderBlock {
2011
+ couldBeCtxOwner: boolean;
2012
+ activityType: ActivityType;
2341
2013
  constructor();
2342
2014
  initCallback(): void;
2343
- render(): lit_html.TemplateResult<1>;
2344
2015
  }
2345
2016
 
2017
+ declare const PACKAGE_NAME = "blocks";
2018
+ declare const PACKAGE_VERSION: string;
2019
+
2346
2020
  declare class CloudImageEditor extends CloudImageEditorBlock {
2347
2021
  static styleAttrs: string[];
2348
2022
  constructor();
2349
2023
  initCallback(): void;
2350
2024
  }
2351
2025
 
2352
- declare class FileUploaderInline extends LitSolutionBlock {
2353
- propertiesMeta: {
2354
- 'ctx-name': string;
2355
- };
2026
+ declare class FileUploaderInline extends SolutionBlock {
2356
2027
  static styleAttrs: string[];
2357
- private _couldCancel;
2358
2028
  constructor();
2359
- private _handleCancel;
2360
- private get _couldHistoryBack();
2361
- private get _couldShowList();
2362
- private _getInitActivity;
2029
+ get couldHistoryBack(): boolean;
2030
+ get couldShowList(): boolean;
2363
2031
  initCallback(): void;
2364
- render(): lit_html.TemplateResult<1>;
2365
2032
  }
2366
2033
 
2367
- declare class FileUploaderMinimal extends LitSolutionBlock {
2368
- propertiesMeta: {
2369
- 'ctx-name': string;
2370
- };
2034
+ declare class FileUploaderMinimal extends SolutionBlock {
2371
2035
  static styleAttrs: string[];
2372
- private _singleUpload;
2373
- private _isHiddenStartFrom;
2374
- private _classUploadList;
2375
- private _classStartFrom;
2376
- private _getInitActivity;
2036
+ private handleModalOpen?;
2037
+ private handleModalClose?;
2377
2038
  constructor();
2378
2039
  private _handleModalOpen;
2379
2040
  private _handleModalClose;
2380
2041
  initCallback(): void;
2381
- disconnectedCallback(): void;
2382
- render(): lit_html.TemplateResult<1>;
2042
+ destroyCallback(): void;
2383
2043
  }
2384
2044
 
2385
- declare const PACKAGE_NAME = "blocks";
2386
- declare const PACKAGE_VERSION: string;
2045
+ declare class FileUploaderRegular extends SolutionBlock {
2046
+ static styleAttrs: string[];
2047
+ constructor();
2048
+ initCallback(): void;
2049
+ }
2050
+
2051
+ type KebabCase<T extends string> = T extends `${infer Head} ${infer Tail}` ? `${Lowercase<Head>}-${KebabCase<Tail>}` : Lowercase<T>;
2052
+ declare const toKebabCase: <T extends string>(str: T) => KebabCase<T>;
2387
2053
 
2388
- export { LitActivityBlock as ActivityBlock, ActivityHeader, type ApiAddFileCommonOptions, BaseComponent, LitBlock as Block, BtnUi, CameraSource, CloudImageEditor, CloudImageEditorActivity, CloudImageEditorBlock, type CollectionValidators, Config, type ConfigAttributesType, type ConfigComplexType, type ConfigPlainType, type ConfigType, Copyright, CropFrame, PubSub as Data, DropArea, EditorAspectRatioButtonControl, EditorCropButtonControl, EditorFilterControl, EditorFreeformButtonControl, EditorImageCropper, EditorImageFader, EditorOperationControl, EditorScroller, EditorSlider, EditorToolbar, type EventMap, type EventPayload, EventType, ExternalSource, ExternalUploadSource, FileItem, FileUploaderInline, FileUploaderMinimal, FileUploaderRegular, type FileValidator, type FileValidatorDescriptor, type FileValidators, FormInput, type FuncCollectionValidator, type FuncFileValidator, type GroupFlag, Icon, type IconHrefResolver, Img, type KebabCase$1 as KebabCase, type KebabCaseKeys, LineLoaderUi, type LocaleDefinitionOverride, type LowerCase, type LowerCaseKeys, type MetadataCallback, Modal, ModalEvents, type ModalId, type OutputCollectionErrorType, type OutputCollectionState, type OutputCollectionStatus, type OutputCustomErrorType, type OutputError, type OutputErrorCollection, type OutputErrorFile, type OutputErrorTypePayload, type OutputFileEntry, type OutputFileErrorPayload, type OutputFileErrorType, type OutputFileStatus, PACKAGE_NAME, PACKAGE_VERSION, PresenceToggle, ProgressBar, ProgressBarCommon, type SecureDeliveryProxyUrlResolver, type SecureUploadsSignatureAndExpire, type SecureUploadsSignatureResolver, Select, SimpleBtn, SliderUi, LitSolutionBlock as SolutionBlock, SourceBtn, SourceList, type SourceTypes, Spinner, StartFrom, Thumb, UID, UploadCtxProvider, UploadList, UploadSource, LitUploaderBlock as UploaderBlock, UploaderPublicApi, UrlSource, defineComponents, defineLocale, loadFileUploaderFrom, toKebabCase };
2054
+ export { ActivityBlock, ActivityHeader, type ApiAddFileCommonOptions, Block, BtnUi, CameraSource, CloudImageEditor, CloudImageEditorActivity, CloudImageEditorBlock, type CollectionValidators, Config, type ConfigAttributesType, type ConfigComplexType, type ConfigPlainType, type ConfigType, Copyright, CropFrame, DropArea, EditorAspectRatioButtonControl, EditorCropButtonControl, EditorFilterControl, EditorFreeformButtonControl, EditorImageCropper, EditorImageFader, EditorOperationControl, EditorScroller, EditorSlider, EditorToolbar, type EventMap, type EventPayload, EventType, ExternalSource, ExternalUploadSource, FileItem, FileUploaderInline, FileUploaderMinimal, FileUploaderRegular, type FileValidator, type FileValidatorDescriptor, type FileValidators, FormInput, type FuncCollectionValidator, type FuncFileValidator, type GroupFlag, Icon, type IconHrefResolver, Img, type KebabCase$1 as KebabCase, type KebabCaseKeys, LineLoaderUi, type LocaleDefinitionOverride, type LowerCase, type LowerCaseKeys, type MetadataCallback, Modal, ModalEvents, type ModalId, type OutputCollectionErrorType, type OutputCollectionState, type OutputCollectionStatus, type OutputCustomErrorType, type OutputError, type OutputErrorCollection, type OutputErrorFile, type OutputErrorTypePayload, type OutputFileEntry, type OutputFileErrorPayload, type OutputFileErrorType, type OutputFileStatus, PACKAGE_NAME, PACKAGE_VERSION, PresenceToggle, ProgressBar, ProgressBarCommon, type SecureDeliveryProxyUrlResolver, type SecureUploadsSignatureAndExpire, type SecureUploadsSignatureResolver, Select, SimpleBtn, SliderUi, SolutionBlock, SourceBtn, SourceList, type SourceTypes, Spinner, StartFrom, Thumb, UploadCtxProvider, UploadList, UploadSource, UploaderBlock, UploaderPublicApi, UrlSource, defineComponents, defineLocale, loadFileUploaderFrom, toKebabCase };