@codingfactory/mediables-vue 2.12.0 → 2.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PixiFrameExporter-Cqb0nLT4.cjs → PixiFrameExporter-BnAievFi.cjs} +2 -2
- package/dist/{PixiFrameExporter-Cqb0nLT4.cjs.map → PixiFrameExporter-BnAievFi.cjs.map} +1 -1
- package/dist/{PixiFrameExporter-BUVwcHDX.js → PixiFrameExporter-DwbBy1Iu.js} +2 -2
- package/dist/{PixiFrameExporter-BUVwcHDX.js.map → PixiFrameExporter-DwbBy1Iu.js.map} +1 -1
- package/dist/components/ImageEditorModal.vue.d.ts +9 -2
- package/dist/composables/useImageEditorModal.d.ts +1232 -86
- package/dist/composables/useRadialMenu.d.ts +1 -1
- package/dist/editor-BoDU3YXD.js +10862 -0
- package/dist/editor-BoDU3YXD.js.map +1 -0
- package/dist/editor-D-cJRASf.cjs +2 -0
- package/dist/editor-D-cJRASf.cjs.map +1 -0
- package/dist/{index-BXf0oOKg.js → index-BGC4rPDc.js} +16147 -14384
- package/dist/index-BGC4rPDc.js.map +1 -0
- package/dist/index-CljyFIEv.cjs +357 -0
- package/dist/index-CljyFIEv.cjs.map +1 -0
- package/dist/mediables-vanilla.cjs +1 -1
- package/dist/mediables-vanilla.mjs +1 -1
- package/dist/mediables-vue.cjs +1 -1
- package/dist/mediables-vue.mjs +2 -2
- package/dist/style.css +1 -1
- package/dist/types/editor.d.ts +204 -27
- package/dist/vanilla-editor/VanillaImageEditor.d.ts +18 -0
- package/dist/vanilla-editor/VanillaImageEditorV2.d.ts +16 -0
- package/dist/vanilla-editor/core/EventEmitter.d.ts +12 -0
- package/dist/vanilla-editor/core/State.d.ts +98 -0
- package/dist/vanilla-editor/filters/categories.d.ts +69 -0
- package/dist/vanilla-editor/icons/icons.d.ts +42 -0
- package/dist/vanilla-editor/index.d.ts +342 -0
- package/dist/vanilla-editor/presets/index.d.ts +114 -0
- package/dist/vanilla-editor/renderer/CropManager.d.ts +140 -0
- package/dist/vanilla-editor/renderer/FilterManager.d.ts +132 -0
- package/dist/vanilla-editor/renderer/PixiRenderer.d.ts +274 -0
- package/dist/vanilla-editor/renderer/RemoveBgManager.d.ts +108 -0
- package/dist/vanilla-editor/styles/editor-v2.css +1366 -0
- package/dist/vanilla-editor/styles/editor.css +1403 -0
- package/dist/vanilla-editor/ui/ActiveFiltersPanel.d.ts +93 -0
- package/dist/vanilla-editor/ui/CategoryCarousel.d.ts +66 -0
- package/dist/vanilla-editor/ui/CropControls.d.ts +65 -0
- package/dist/vanilla-editor/ui/FilterAdjustments.d.ts +93 -0
- package/dist/vanilla-editor/ui/FilterCarousel.d.ts +74 -0
- package/dist/vanilla-editor/ui/MobileActiveFilters.d.ts +21 -0
- package/dist/vanilla-editor/ui/MobileFilterDrawer.d.ts +79 -0
- package/dist/vanilla-editor/ui/Toolbar.d.ts +35 -0
- package/dist/vanilla-editor/ui/UIBuilder.d.ts +87 -0
- package/dist/vanilla-editor/ui-v2/ActiveFiltersStack.d.ts +16 -0
- package/dist/vanilla-editor/ui-v2/BackgroundPanel.d.ts +16 -0
- package/dist/vanilla-editor/ui-v2/BottomDrawer.d.ts +55 -0
- package/dist/vanilla-editor/ui-v2/CategoryTabs.d.ts +21 -0
- package/dist/vanilla-editor/ui-v2/FilterControlsView.d.ts +16 -0
- package/dist/vanilla-editor/ui-v2/FilterListView.d.ts +32 -0
- package/dist/vanilla-editor/ui-v2/LayerStackPanel.d.ts +30 -0
- package/dist/vanilla-editor/ui-v2/MobileActiveChips.d.ts +23 -0
- package/dist/vanilla-editor/ui-v2/MobileNavigation.d.ts +51 -0
- package/dist/vanilla-editor/ui-v2/SplitPanelLayout.d.ts +70 -0
- package/dist/vanilla-editor/ui-v2/TextPanel.d.ts +58 -0
- package/dist/vanilla-exports.d.ts +9 -0
- package/package.json +3 -2
- package/dist/editor-Bj9-m03S.js +0 -9132
- package/dist/editor-Bj9-m03S.js.map +0 -1
- package/dist/editor-DaM6IN3r.cjs +0 -2
- package/dist/editor-DaM6IN3r.cjs.map +0 -1
- package/dist/index-BXf0oOKg.js.map +0 -1
- package/dist/index-DyZIdWLm.cjs +0 -357
- package/dist/index-DyZIdWLm.cjs.map +0 -1
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export class ActiveFiltersPanel {
|
|
2
|
+
constructor(state: any, filterManager: any);
|
|
3
|
+
state: any;
|
|
4
|
+
filterManager: any;
|
|
5
|
+
element: HTMLElement | null;
|
|
6
|
+
_filterItems: Map<any, any>;
|
|
7
|
+
_unsubscribers: any[];
|
|
8
|
+
_onRemove: any;
|
|
9
|
+
_onReset: any;
|
|
10
|
+
_onClearAll: any;
|
|
11
|
+
_onUpdateValue: any;
|
|
12
|
+
_onSelect: any;
|
|
13
|
+
/**
|
|
14
|
+
* Create and render the active filters panel
|
|
15
|
+
* @param {Object} options - { onRemove, onReset, onClearAll, onUpdateValue, onSelect }
|
|
16
|
+
* @returns {HTMLElement}
|
|
17
|
+
*/
|
|
18
|
+
render({ onRemove, onReset, onClearAll, onUpdateValue, onSelect }: Object): HTMLElement;
|
|
19
|
+
_listContainer: HTMLElement | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Subscribe to state changes
|
|
22
|
+
*/
|
|
23
|
+
_subscribeToState(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Update selected state for all items
|
|
26
|
+
*/
|
|
27
|
+
_updateSelectedState(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Render the filter list
|
|
30
|
+
*/
|
|
31
|
+
_renderFilterList(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Create a filter item
|
|
34
|
+
* @param {string} filterId
|
|
35
|
+
* @param {Object} def - Filter definition
|
|
36
|
+
* @returns {HTMLElement}
|
|
37
|
+
*/
|
|
38
|
+
_createFilterItem(filterId: string, def: Object): HTMLElement;
|
|
39
|
+
/**
|
|
40
|
+
* Normalize control type (handle aliases)
|
|
41
|
+
* @param {string} type
|
|
42
|
+
* @returns {string}
|
|
43
|
+
*/
|
|
44
|
+
_normalizeControlType(type: string): string;
|
|
45
|
+
/**
|
|
46
|
+
* Get a summary of filter values
|
|
47
|
+
* @param {Object} def - Filter definition
|
|
48
|
+
* @param {Object} values - Current values
|
|
49
|
+
* @returns {string}
|
|
50
|
+
*/
|
|
51
|
+
_getValuesSummary(def: Object, values: Object): string;
|
|
52
|
+
/**
|
|
53
|
+
* Format a numeric value for display
|
|
54
|
+
* @param {number} value
|
|
55
|
+
* @returns {string}
|
|
56
|
+
*/
|
|
57
|
+
_formatValue(value: number): string;
|
|
58
|
+
/**
|
|
59
|
+
* Update values display for all items
|
|
60
|
+
*/
|
|
61
|
+
_updateValuesDisplay(): void;
|
|
62
|
+
/**
|
|
63
|
+
* Handle filter removal
|
|
64
|
+
* @param {string} filterId
|
|
65
|
+
*/
|
|
66
|
+
_handleRemove(filterId: string): void;
|
|
67
|
+
/**
|
|
68
|
+
* Handle filter reset
|
|
69
|
+
* @param {string} filterId
|
|
70
|
+
*/
|
|
71
|
+
_handleReset(filterId: string): void;
|
|
72
|
+
/**
|
|
73
|
+
* Handle clear all
|
|
74
|
+
*/
|
|
75
|
+
_handleClearAll(): void;
|
|
76
|
+
/**
|
|
77
|
+
* Handle filter selection
|
|
78
|
+
* @param {string} filterId
|
|
79
|
+
*/
|
|
80
|
+
_handleSelect(filterId: string): void;
|
|
81
|
+
/**
|
|
82
|
+
* Show panel
|
|
83
|
+
*/
|
|
84
|
+
show(): void;
|
|
85
|
+
/**
|
|
86
|
+
* Hide panel
|
|
87
|
+
*/
|
|
88
|
+
hide(): void;
|
|
89
|
+
/**
|
|
90
|
+
* Clean up
|
|
91
|
+
*/
|
|
92
|
+
destroy(): void;
|
|
93
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export class CategoryCarousel {
|
|
2
|
+
constructor(state: any, editor: any);
|
|
3
|
+
state: any;
|
|
4
|
+
editor: any;
|
|
5
|
+
element: HTMLElement | null;
|
|
6
|
+
_chips: Map<any, any>;
|
|
7
|
+
_scrollIndex: number;
|
|
8
|
+
_unsubscribers: any[];
|
|
9
|
+
/**
|
|
10
|
+
* Create and render the category carousel
|
|
11
|
+
* @param {Function} onSelect - Callback when category is selected
|
|
12
|
+
* @returns {HTMLElement}
|
|
13
|
+
*/
|
|
14
|
+
render(onSelect: Function): HTMLElement;
|
|
15
|
+
_onSelect: Function | undefined;
|
|
16
|
+
_leftBtn: HTMLElement | undefined;
|
|
17
|
+
_carousel: HTMLElement | undefined;
|
|
18
|
+
_rightBtn: HTMLElement | undefined;
|
|
19
|
+
_pagination: HTMLElement | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Subscribe to state changes
|
|
22
|
+
*/
|
|
23
|
+
_subscribeToState(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Select a category
|
|
26
|
+
* @param {string} categoryId
|
|
27
|
+
*/
|
|
28
|
+
_selectCategory(categoryId: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* Scroll carousel left
|
|
31
|
+
*/
|
|
32
|
+
_scrollLeft(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Scroll carousel right
|
|
35
|
+
*/
|
|
36
|
+
_scrollRight(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Scroll to a specific page
|
|
39
|
+
* @param {number} pageIndex
|
|
40
|
+
*/
|
|
41
|
+
_scrollToPage(pageIndex: number): void;
|
|
42
|
+
/**
|
|
43
|
+
* Animate carousel scroll
|
|
44
|
+
*/
|
|
45
|
+
_scrollCarousel(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Update navigation button states
|
|
48
|
+
*/
|
|
49
|
+
_updateNavButtons(): void;
|
|
50
|
+
/**
|
|
51
|
+
* Update pagination dot states
|
|
52
|
+
*/
|
|
53
|
+
_updatePagination(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Set the selected category
|
|
56
|
+
* @param {string} categoryId
|
|
57
|
+
*/
|
|
58
|
+
setSelected(categoryId: string): void;
|
|
59
|
+
/**
|
|
60
|
+
* Clean up
|
|
61
|
+
*/
|
|
62
|
+
destroy(): void;
|
|
63
|
+
}
|
|
64
|
+
import { REGISTRY_TO_UI } from '../filters/categories.js';
|
|
65
|
+
import { getUiCategoryForRegistry } from '../filters/categories.js';
|
|
66
|
+
export { REGISTRY_TO_UI as REGISTRY_CATEGORY_MAP, getUiCategoryForRegistry };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export class CropControls {
|
|
2
|
+
constructor(state: any, cropManager: any, editor?: null);
|
|
3
|
+
state: any;
|
|
4
|
+
cropManager: any;
|
|
5
|
+
editor: any;
|
|
6
|
+
element: HTMLElement | null;
|
|
7
|
+
_shapeChips: Map<any, any>;
|
|
8
|
+
_aspectChips: Map<any, any>;
|
|
9
|
+
_rotationPresetChips: Map<any, any>;
|
|
10
|
+
_rotationRange: HTMLElement | null;
|
|
11
|
+
_rotationNumber: HTMLElement | null;
|
|
12
|
+
_rotationValue: Element | null;
|
|
13
|
+
_unsubscribers: any[];
|
|
14
|
+
/**
|
|
15
|
+
* Apply crop and return the editor UI to filter mode.
|
|
16
|
+
* If crop application cannot complete, force-disable crop mode to avoid
|
|
17
|
+
* leaving the editor stuck in crop controls.
|
|
18
|
+
*/
|
|
19
|
+
_applyCropAndReturnToFilters(): void;
|
|
20
|
+
/**
|
|
21
|
+
* Create and render the crop controls
|
|
22
|
+
* @returns {HTMLElement}
|
|
23
|
+
*/
|
|
24
|
+
render(): HTMLElement;
|
|
25
|
+
_shapeSection: HTMLElement | undefined;
|
|
26
|
+
_aspectSection: HTMLElement | undefined;
|
|
27
|
+
_renderRotationSection(): HTMLElement;
|
|
28
|
+
/**
|
|
29
|
+
* Subscribe to state changes
|
|
30
|
+
*/
|
|
31
|
+
_subscribeToState(): void;
|
|
32
|
+
_rotateBy(delta: any): void;
|
|
33
|
+
_setRotation(angle: any): void;
|
|
34
|
+
_previewAngleValue(rawValue: any): void;
|
|
35
|
+
_syncRotationControls(value: any): void;
|
|
36
|
+
_refreshPresetChips(angle: any): void;
|
|
37
|
+
_formatAngle(angle: any): string;
|
|
38
|
+
_formatPlainAngle(angle: any): string;
|
|
39
|
+
/**
|
|
40
|
+
* Select a crop shape
|
|
41
|
+
* @param {string} shapeId
|
|
42
|
+
*/
|
|
43
|
+
_selectShape(shapeId: string): void;
|
|
44
|
+
/**
|
|
45
|
+
* Select an aspect ratio
|
|
46
|
+
* @param {string} aspectId
|
|
47
|
+
*/
|
|
48
|
+
_selectAspect(aspectId: string): void;
|
|
49
|
+
/**
|
|
50
|
+
* Update aspect ratio section visibility
|
|
51
|
+
*/
|
|
52
|
+
_updateAspectVisibility(): void;
|
|
53
|
+
/**
|
|
54
|
+
* Show controls
|
|
55
|
+
*/
|
|
56
|
+
show(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Hide controls
|
|
59
|
+
*/
|
|
60
|
+
hide(): void;
|
|
61
|
+
/**
|
|
62
|
+
* Clean up
|
|
63
|
+
*/
|
|
64
|
+
destroy(): void;
|
|
65
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export class FilterAdjustments {
|
|
2
|
+
constructor(state: any, filterManager: any);
|
|
3
|
+
state: any;
|
|
4
|
+
filterManager: any;
|
|
5
|
+
element: HTMLElement | null;
|
|
6
|
+
_controls: Map<any, any>;
|
|
7
|
+
_onChange: any;
|
|
8
|
+
_onReset: any;
|
|
9
|
+
_onAction: any;
|
|
10
|
+
_unsubscribers: any[];
|
|
11
|
+
/**
|
|
12
|
+
* Create and render the filter adjustments panel
|
|
13
|
+
* @param {Object} options - { onChange, onReset, onAction }
|
|
14
|
+
* @returns {HTMLElement}
|
|
15
|
+
*/
|
|
16
|
+
render({ onChange, onReset, onAction }: Object): HTMLElement;
|
|
17
|
+
/**
|
|
18
|
+
* Subscribe to state changes
|
|
19
|
+
*/
|
|
20
|
+
_subscribeToState(): void;
|
|
21
|
+
/**
|
|
22
|
+
* Render controls for the selected filter.
|
|
23
|
+
*
|
|
24
|
+
* Renders both the static controls from def.controls and any dynamic
|
|
25
|
+
* controls the filter instance exposes via getDynamicControls() (e.g.
|
|
26
|
+
* per-stop color/offset/alpha rows for Color Gradient).
|
|
27
|
+
*/
|
|
28
|
+
_renderControls(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Create a control element based on type.
|
|
31
|
+
*
|
|
32
|
+
* The update key passed to _handleChange is `ctl.property || ctl.id`.
|
|
33
|
+
* Dynamic controls (e.g. from getDynamicControls) use their property
|
|
34
|
+
* path (e.g. 'colorStops[0].color') so FilterManager.updateValue can
|
|
35
|
+
* route the write correctly. Static controls without a property fall
|
|
36
|
+
* back to the control id, matching the legacy contract.
|
|
37
|
+
*
|
|
38
|
+
* @param {string} filterId
|
|
39
|
+
* @param {Object} ctl - Control definition
|
|
40
|
+
* @param {*} value - Current value
|
|
41
|
+
* @returns {HTMLElement|null}
|
|
42
|
+
*/
|
|
43
|
+
_createControl(filterId: string, ctl: Object, value: any): HTMLElement | null;
|
|
44
|
+
/**
|
|
45
|
+
* Normalize control type (handle aliases)
|
|
46
|
+
* @param {string} type
|
|
47
|
+
* @returns {string}
|
|
48
|
+
*/
|
|
49
|
+
_normalizeControlType(type: string): string;
|
|
50
|
+
/**
|
|
51
|
+
* Normalize options array format
|
|
52
|
+
* @param {Array} options
|
|
53
|
+
* @returns {Array}
|
|
54
|
+
*/
|
|
55
|
+
_normalizeOptions(options: any[]): any[];
|
|
56
|
+
/**
|
|
57
|
+
* Handle control value change
|
|
58
|
+
* @param {string} filterId
|
|
59
|
+
* @param {string} controlId
|
|
60
|
+
* @param {*} value
|
|
61
|
+
*/
|
|
62
|
+
_handleChange(filterId: string, controlId: string, value: any): void;
|
|
63
|
+
/**
|
|
64
|
+
* Handle reset button
|
|
65
|
+
* @param {string} filterId
|
|
66
|
+
*/
|
|
67
|
+
_handleReset(filterId: string): void;
|
|
68
|
+
/**
|
|
69
|
+
* Handle button action. Dynamic controls (e.g. color stop rows) depend on
|
|
70
|
+
* filter state that can change as a result of the action (add/remove stop),
|
|
71
|
+
* so re-render after the action completes.
|
|
72
|
+
*
|
|
73
|
+
* @param {string} filterId
|
|
74
|
+
* @param {string} action
|
|
75
|
+
*/
|
|
76
|
+
_handleAction(filterId: string, action: string): void;
|
|
77
|
+
/**
|
|
78
|
+
* Update control values from state
|
|
79
|
+
*/
|
|
80
|
+
_updateValues(): void;
|
|
81
|
+
/**
|
|
82
|
+
* Show panel
|
|
83
|
+
*/
|
|
84
|
+
show(): void;
|
|
85
|
+
/**
|
|
86
|
+
* Hide panel
|
|
87
|
+
*/
|
|
88
|
+
hide(): void;
|
|
89
|
+
/**
|
|
90
|
+
* Clean up
|
|
91
|
+
*/
|
|
92
|
+
destroy(): void;
|
|
93
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export class FilterCarousel {
|
|
2
|
+
constructor(state: any, filterManager: any);
|
|
3
|
+
state: any;
|
|
4
|
+
filterManager: any;
|
|
5
|
+
element: HTMLElement | null;
|
|
6
|
+
_filterCards: Map<any, any>;
|
|
7
|
+
_scrollIndex: number;
|
|
8
|
+
_unsubscribers: any[];
|
|
9
|
+
_onToggle: any;
|
|
10
|
+
_onSelect: any;
|
|
11
|
+
/**
|
|
12
|
+
* Create and render the filter carousel
|
|
13
|
+
* @param {Object} options - { onToggle, onSelect }
|
|
14
|
+
* @returns {HTMLElement}
|
|
15
|
+
*/
|
|
16
|
+
render({ onToggle, onSelect }: Object): HTMLElement;
|
|
17
|
+
_leftBtn: HTMLElement | undefined;
|
|
18
|
+
_carousel: HTMLElement | undefined;
|
|
19
|
+
_rightBtn: HTMLElement | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Subscribe to state changes
|
|
22
|
+
*/
|
|
23
|
+
_subscribeToState(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Render filters for current category
|
|
26
|
+
*/
|
|
27
|
+
_renderFilters(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Create a filter card
|
|
30
|
+
* @param {Object} filter
|
|
31
|
+
* @param {Object} options
|
|
32
|
+
* @returns {HTMLElement}
|
|
33
|
+
*/
|
|
34
|
+
_createFilterCard(filter: Object, { isActive, isSelected }: Object): HTMLElement;
|
|
35
|
+
/**
|
|
36
|
+
* Handle filter card click (select)
|
|
37
|
+
* @param {string} filterId
|
|
38
|
+
*/
|
|
39
|
+
_handleCardClick(filterId: string): void;
|
|
40
|
+
/**
|
|
41
|
+
* Handle filter toggle
|
|
42
|
+
* @param {string} filterId
|
|
43
|
+
* @param {boolean} enabled
|
|
44
|
+
*/
|
|
45
|
+
_handleToggle(filterId: string, enabled: boolean): void;
|
|
46
|
+
/**
|
|
47
|
+
* Update active states based on state
|
|
48
|
+
*/
|
|
49
|
+
_updateActiveStates(): void;
|
|
50
|
+
/**
|
|
51
|
+
* Update selected state based on state
|
|
52
|
+
*/
|
|
53
|
+
_updateSelectedState(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Scroll carousel left
|
|
56
|
+
*/
|
|
57
|
+
_scrollLeft(): void;
|
|
58
|
+
/**
|
|
59
|
+
* Scroll carousel right
|
|
60
|
+
*/
|
|
61
|
+
_scrollRight(): void;
|
|
62
|
+
/**
|
|
63
|
+
* Animate carousel scroll
|
|
64
|
+
*/
|
|
65
|
+
_scrollCarousel(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Update navigation button states
|
|
68
|
+
*/
|
|
69
|
+
_updateNavButtons(): void;
|
|
70
|
+
/**
|
|
71
|
+
* Clean up
|
|
72
|
+
*/
|
|
73
|
+
destroy(): void;
|
|
74
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export class MobileActiveFilters {
|
|
2
|
+
constructor(state: any, filterManager: any);
|
|
3
|
+
state: any;
|
|
4
|
+
filterManager: any;
|
|
5
|
+
element: HTMLElement | null;
|
|
6
|
+
_scrollContainer: HTMLElement | null;
|
|
7
|
+
_chips: Map<any, any>;
|
|
8
|
+
_unsubscribers: any[];
|
|
9
|
+
_onToggle: any;
|
|
10
|
+
_onSelect: any;
|
|
11
|
+
/**
|
|
12
|
+
* @param {Object} callbacks - { onToggle(filterId, enabled), onSelect(filterId) }
|
|
13
|
+
* @returns {HTMLElement}
|
|
14
|
+
*/
|
|
15
|
+
render({ onToggle, onSelect }: Object): HTMLElement;
|
|
16
|
+
_subscribeToState(): void;
|
|
17
|
+
_renderChips(): void;
|
|
18
|
+
_createChip(filterId: any, def: any): HTMLElement;
|
|
19
|
+
_updateSelectedState(): void;
|
|
20
|
+
destroy(): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export class MobileFilterDrawer {
|
|
2
|
+
constructor(state: any, filterManager: any);
|
|
3
|
+
state: any;
|
|
4
|
+
filterManager: any;
|
|
5
|
+
_drawer: HTMLElement | null;
|
|
6
|
+
_body: HTMLElement | null;
|
|
7
|
+
_titleEl: HTMLElement | null;
|
|
8
|
+
_isOpen: boolean;
|
|
9
|
+
_currentFilterId: string | null;
|
|
10
|
+
_controls: Map<any, any>;
|
|
11
|
+
_onChange: any;
|
|
12
|
+
_onReset: any;
|
|
13
|
+
_onRemove: any;
|
|
14
|
+
_onAction: any;
|
|
15
|
+
_container: HTMLElement | null;
|
|
16
|
+
/**
|
|
17
|
+
* Build the drawer DOM and append to container (should be the controls section)
|
|
18
|
+
* @param {HTMLElement} container - Parent element (controls-section)
|
|
19
|
+
* @param {Object} callbacks - { onChange, onReset, onRemove, onAction }
|
|
20
|
+
*/
|
|
21
|
+
build(container: HTMLElement, { onChange, onReset, onRemove, onAction }: Object): void;
|
|
22
|
+
/**
|
|
23
|
+
* Open the drawer for a specific filter
|
|
24
|
+
* @param {string} filterId
|
|
25
|
+
*/
|
|
26
|
+
open(filterId: string): void;
|
|
27
|
+
/**
|
|
28
|
+
* Close the drawer
|
|
29
|
+
*/
|
|
30
|
+
close(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Check if drawer is open
|
|
33
|
+
* @returns {boolean}
|
|
34
|
+
*/
|
|
35
|
+
get isOpen(): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Size the drawer to match the container (controls section) height
|
|
38
|
+
*/
|
|
39
|
+
_sizeToContainer(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Animate drawer open (CSS transition)
|
|
42
|
+
*/
|
|
43
|
+
_animateOpen(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Animate drawer close (CSS transition)
|
|
46
|
+
*/
|
|
47
|
+
_animateClose(): void;
|
|
48
|
+
/**
|
|
49
|
+
* Render controls for the current filter.
|
|
50
|
+
* Renders both static (def.controls) and dynamic (instance.getDynamicControls)
|
|
51
|
+
* controls so filters like Color Gradient show per-stop rows.
|
|
52
|
+
*/
|
|
53
|
+
_renderControls(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Create a control element based on type. See FilterAdjustments._createControl
|
|
56
|
+
* for the update-key contract (property path for dynamic controls, id for static).
|
|
57
|
+
* @param {string} filterId
|
|
58
|
+
* @param {Object} ctl
|
|
59
|
+
* @param {*} value
|
|
60
|
+
* @returns {HTMLElement|null}
|
|
61
|
+
*/
|
|
62
|
+
_createControl(filterId: string, ctl: Object, value: any): HTMLElement | null;
|
|
63
|
+
/**
|
|
64
|
+
* Normalize control type
|
|
65
|
+
* @param {string} type
|
|
66
|
+
* @returns {string}
|
|
67
|
+
*/
|
|
68
|
+
_normalizeControlType(type: string): string;
|
|
69
|
+
/**
|
|
70
|
+
* Normalize options array
|
|
71
|
+
* @param {Array} options
|
|
72
|
+
* @returns {Array}
|
|
73
|
+
*/
|
|
74
|
+
_normalizeOptions(options: any[]): any[];
|
|
75
|
+
/**
|
|
76
|
+
* Clean up
|
|
77
|
+
*/
|
|
78
|
+
destroy(): void;
|
|
79
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export class Toolbar {
|
|
2
|
+
constructor(state: any, editor: any);
|
|
3
|
+
state: any;
|
|
4
|
+
editor: any;
|
|
5
|
+
element: HTMLElement | null;
|
|
6
|
+
_removeBgBtn: HTMLElement | null;
|
|
7
|
+
_removeBgTierSelect: HTMLElement | null;
|
|
8
|
+
_removeBgStatus: HTMLElement | null;
|
|
9
|
+
_removeBgTier: string;
|
|
10
|
+
_unsubscribers: any[];
|
|
11
|
+
/**
|
|
12
|
+
* Create and render the toolbar
|
|
13
|
+
* @returns {HTMLElement}
|
|
14
|
+
*/
|
|
15
|
+
render(): HTMLElement;
|
|
16
|
+
_zoomLabel: HTMLElement | undefined;
|
|
17
|
+
_themeBtn: HTMLElement | undefined;
|
|
18
|
+
_cropBtn: HTMLElement | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Subscribe to state changes
|
|
21
|
+
*/
|
|
22
|
+
_subscribeToState(): void;
|
|
23
|
+
_canRemoveBackground(): any;
|
|
24
|
+
_updateRemoveBgButton(): void;
|
|
25
|
+
_setRemoveBgStatus(message: any): void;
|
|
26
|
+
/**
|
|
27
|
+
* Update zoom display
|
|
28
|
+
* @param {number} zoom
|
|
29
|
+
*/
|
|
30
|
+
updateZoom(zoom: number): void;
|
|
31
|
+
/**
|
|
32
|
+
* Clean up
|
|
33
|
+
*/
|
|
34
|
+
destroy(): void;
|
|
35
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI Builder - DOM helpers and component factories
|
|
3
|
+
* Creates UI elements without external dependencies
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Create an element with attributes and children
|
|
7
|
+
* @param {string} tag - HTML tag name
|
|
8
|
+
* @param {Object} attrs - Attributes and properties
|
|
9
|
+
* @param {...(string|HTMLElement)} children - Child elements or text
|
|
10
|
+
* @returns {HTMLElement}
|
|
11
|
+
*/
|
|
12
|
+
export function el(tag: string, attrs?: Object, ...children: (string | HTMLElement)[]): HTMLElement;
|
|
13
|
+
/**
|
|
14
|
+
* Create a slider with label and value display
|
|
15
|
+
* @param {Object} options
|
|
16
|
+
* @returns {HTMLElement}
|
|
17
|
+
*/
|
|
18
|
+
export function createSlider({ id, label, min, max, step, value, onChange }: Object): HTMLElement;
|
|
19
|
+
/**
|
|
20
|
+
* Create a toggle switch
|
|
21
|
+
* @param {Object} options
|
|
22
|
+
* @returns {HTMLElement}
|
|
23
|
+
*/
|
|
24
|
+
export function createToggle({ id, label, checked, onChange }: Object): HTMLElement;
|
|
25
|
+
/**
|
|
26
|
+
* Create a color picker
|
|
27
|
+
* @param {Object} options
|
|
28
|
+
* @returns {HTMLElement}
|
|
29
|
+
*/
|
|
30
|
+
export function createColorPicker({ id, label, value, onChange }: Object): HTMLElement;
|
|
31
|
+
/**
|
|
32
|
+
* Create a text input that commits on Enter or blur (not on every keystroke).
|
|
33
|
+
* This deferred-commit behavior is important for inputs that trigger expensive
|
|
34
|
+
* parsing on change (e.g. the CSS gradient input, which creates a full PIXI
|
|
35
|
+
* filter on each commit).
|
|
36
|
+
*
|
|
37
|
+
* @param {Object} options
|
|
38
|
+
* @param {string} options.id
|
|
39
|
+
* @param {string} options.label
|
|
40
|
+
* @param {string} [options.value]
|
|
41
|
+
* @param {string} [options.placeholder]
|
|
42
|
+
* @param {Function} [options.onCommit] - Called with trimmed value on Enter or blur when value changed
|
|
43
|
+
* @returns {HTMLElement}
|
|
44
|
+
*/
|
|
45
|
+
export function createTextInput({ id, label, value, placeholder, onCommit }: {
|
|
46
|
+
id: string;
|
|
47
|
+
label: string;
|
|
48
|
+
value?: string | undefined;
|
|
49
|
+
placeholder?: string | undefined;
|
|
50
|
+
onCommit?: Function | undefined;
|
|
51
|
+
}): HTMLElement;
|
|
52
|
+
/**
|
|
53
|
+
* Create a select dropdown
|
|
54
|
+
* @param {Object} options
|
|
55
|
+
* @returns {HTMLElement}
|
|
56
|
+
*/
|
|
57
|
+
export function createSelect({ id, label, options, value, onChange }: Object): HTMLElement;
|
|
58
|
+
/**
|
|
59
|
+
* Create a button
|
|
60
|
+
* @param {Object} options
|
|
61
|
+
* @returns {HTMLElement}
|
|
62
|
+
*/
|
|
63
|
+
export function createButton({ label, className, onClick, icon, disabled }: Object): HTMLElement;
|
|
64
|
+
/**
|
|
65
|
+
* Create an icon button
|
|
66
|
+
* @param {Object} options
|
|
67
|
+
* @returns {HTMLElement}
|
|
68
|
+
*/
|
|
69
|
+
export function createIconButton({ icon, title, className, onClick, disabled, testId, ariaLabel }: Object): HTMLElement;
|
|
70
|
+
/**
|
|
71
|
+
* Create a chip/tag
|
|
72
|
+
* @param {Object} options
|
|
73
|
+
* @returns {HTMLElement}
|
|
74
|
+
*/
|
|
75
|
+
export function createChip({ label, icon, active, onClick }: Object): HTMLElement;
|
|
76
|
+
/**
|
|
77
|
+
* Create a card component
|
|
78
|
+
* @param {Object} options
|
|
79
|
+
* @returns {HTMLElement}
|
|
80
|
+
*/
|
|
81
|
+
export function createCard({ className, children }: Object): HTMLElement;
|
|
82
|
+
/**
|
|
83
|
+
* Create scrollable container
|
|
84
|
+
* @param {Object} options
|
|
85
|
+
* @returns {HTMLElement}
|
|
86
|
+
*/
|
|
87
|
+
export function createScrollContainer({ className, horizontal, children }: Object): HTMLElement;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export class ActiveFiltersStack {
|
|
2
|
+
constructor(state: any, filterManager: any);
|
|
3
|
+
state: any;
|
|
4
|
+
filterManager: any;
|
|
5
|
+
element: HTMLElement | null;
|
|
6
|
+
_unsubscribers: any[];
|
|
7
|
+
_onRemove: any;
|
|
8
|
+
_onSelect: any;
|
|
9
|
+
_onClearAll: any;
|
|
10
|
+
render({ onRemove, onSelect, onClearAll }?: {}): HTMLElement;
|
|
11
|
+
_renderContents(): void;
|
|
12
|
+
_renderChip(def: any, isSelected: any, layerId?: null): HTMLElement;
|
|
13
|
+
_activeFilterLayerId(): any;
|
|
14
|
+
_refreshSelection(): void;
|
|
15
|
+
destroy(): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export class BackgroundPanel {
|
|
2
|
+
constructor(state: any, editor: any);
|
|
3
|
+
state: any;
|
|
4
|
+
editor: any;
|
|
5
|
+
element: HTMLElement | null;
|
|
6
|
+
_errorMessage: string | null;
|
|
7
|
+
_unsubscribers: any[];
|
|
8
|
+
render(): HTMLElement;
|
|
9
|
+
_render(): void;
|
|
10
|
+
_runAction(promise: any): void;
|
|
11
|
+
_field(label: any, control: any): HTMLElement;
|
|
12
|
+
_option(value: any, label: any, current: any): HTMLElement;
|
|
13
|
+
_backgroundLayer(): any;
|
|
14
|
+
_backgroundBlur(layer: any): number;
|
|
15
|
+
destroy(): void;
|
|
16
|
+
}
|