@uploadcare/file-uploader 1.21.0-alpha.3 → 1.21.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/LICENSE +1 -1
- package/README.md +8 -2
- package/abstract/ActivityBlock.d.ts +0 -1
- package/abstract/ActivityBlock.d.ts.map +1 -1
- package/abstract/ActivityBlock.js +1 -1
- package/abstract/Block.d.ts +13 -2
- package/abstract/Block.d.ts.map +1 -1
- package/abstract/Block.js +35 -3
- package/abstract/CTX.d.ts +4 -4
- package/abstract/CTX.d.ts.map +1 -1
- package/abstract/CTX.js +2 -2
- package/abstract/SolutionBlock.d.ts +2 -2
- package/abstract/UploaderBlock.d.ts +9 -5
- package/abstract/UploaderBlock.d.ts.map +1 -1
- package/abstract/UploaderBlock.js +50 -13
- package/abstract/UploaderPublicApi.d.ts +2 -2
- package/abstract/UploaderPublicApi.d.ts.map +1 -1
- package/abstract/UploaderPublicApi.js +4 -4
- package/abstract/l10nProcessor.js +1 -1
- package/abstract/{LocaleManager.d.ts → managers/LocaleManager.d.ts} +8 -8
- package/abstract/{LocaleManager.d.ts.map → managers/LocaleManager.d.ts.map} +1 -1
- package/abstract/{LocaleManager.js → managers/LocaleManager.js} +8 -8
- package/abstract/{ModalManager.d.ts → managers/ModalManager.d.ts} +7 -7
- package/abstract/{ModalManager.d.ts.map → managers/ModalManager.d.ts.map} +1 -1
- package/abstract/{ModalManager.js → managers/ModalManager.js} +4 -3
- package/abstract/managers/SecureUploadsManager.d.ts +22 -0
- package/abstract/{SecureUploadsManager.d.ts.map → managers/SecureUploadsManager.d.ts.map} +1 -1
- package/abstract/{SecureUploadsManager.js → managers/SecureUploadsManager.js} +9 -5
- package/abstract/managers/TelemetryManager.d.ts +71 -0
- package/abstract/managers/TelemetryManager.d.ts.map +1 -0
- package/abstract/managers/TelemetryManager.js +218 -0
- package/abstract/{ValidationManager.d.ts → managers/ValidationManager.d.ts} +7 -7
- package/abstract/managers/ValidationManager.d.ts.map +1 -0
- package/abstract/{ValidationManager.js → managers/ValidationManager.js} +16 -14
- package/abstract/{a11y.d.ts → managers/a11y.d.ts} +2 -2
- package/abstract/managers/a11y.d.ts.map +1 -0
- package/abstract/{a11y.js → managers/a11y.js} +1 -1
- package/blocks/CameraSource/CameraSource.d.ts +2 -2
- package/blocks/CameraSource/CameraSource.d.ts.map +1 -1
- package/blocks/CameraSource/CameraSource.js +15 -3
- package/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts +2 -1
- package/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/CloudImageEditorBlock.js +20 -5
- package/blocks/CloudImageEditor/src/CropFrame.js +3 -3
- package/blocks/CloudImageEditor/src/EditorAspectRatioButtonControl.d.ts +11 -0
- package/blocks/CloudImageEditor/src/EditorAspectRatioButtonControl.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/EditorAspectRatioButtonControl.js +130 -0
- package/blocks/CloudImageEditor/src/EditorButtonControl.js +1 -1
- package/blocks/CloudImageEditor/src/EditorCropButtonControl.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorCropButtonControl.js +9 -1
- package/blocks/CloudImageEditor/src/EditorFilterControl.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorFilterControl.js +7 -1
- package/blocks/CloudImageEditor/src/EditorImageCropper.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorImageCropper.js +3 -3
- package/blocks/CloudImageEditor/src/EditorOperationControl.d.ts +1 -1
- package/blocks/CloudImageEditor/src/EditorOperationControl.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorOperationControl.js +9 -3
- package/blocks/CloudImageEditor/src/EditorToolbar.d.ts +19 -7
- package/blocks/CloudImageEditor/src/EditorToolbar.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorToolbar.js +88 -21
- package/blocks/CloudImageEditor/src/css/common.css +39 -7
- package/blocks/CloudImageEditor/src/index.d.ts +1 -0
- package/blocks/CloudImageEditor/src/index.js +1 -0
- package/blocks/CloudImageEditor/src/lib/parseCropPreset.d.ts +2 -1
- package/blocks/CloudImageEditor/src/lib/parseCropPreset.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/lib/parseCropPreset.js +74 -8
- package/blocks/CloudImageEditor/src/lib/parseCropPreset.test.d.ts +2 -0
- package/blocks/CloudImageEditor/src/lib/parseCropPreset.test.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/lib/parseCropPreset.test.js +35 -0
- package/blocks/CloudImageEditor/src/state.d.ts +2 -2
- package/blocks/CloudImageEditor/src/state.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/state.js +2 -2
- package/blocks/CloudImageEditor/src/svg-sprite.d.ts +1 -1
- package/blocks/CloudImageEditor/src/svg-sprite.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/svg-sprite.js +1 -1
- package/blocks/CloudImageEditor/src/toolbar-constants.d.ts +2 -2
- package/blocks/CloudImageEditor/src/toolbar-constants.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/toolbar-constants.js +3 -2
- package/blocks/CloudImageEditor/src/types.d.ts +2 -0
- package/blocks/CloudImageEditor/src/types.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/types.js +9 -1
- package/blocks/CloudImageEditor/src/utils/parseFilterValue.d.ts +11 -0
- package/blocks/CloudImageEditor/src/utils/parseFilterValue.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/utils/parseFilterValue.js +11 -0
- package/blocks/Config/Config.d.ts.map +1 -1
- package/blocks/Config/Config.js +6 -1
- package/blocks/Config/initialConfig.d.ts +1 -0
- package/blocks/Config/initialConfig.d.ts.map +1 -1
- package/blocks/Config/initialConfig.js +6 -2
- package/blocks/Config/normalizeConfigValue.d.ts.map +1 -1
- package/blocks/Config/normalizeConfigValue.js +3 -0
- package/blocks/Config/side-effects.d.ts +8 -4
- package/blocks/Config/side-effects.d.ts.map +1 -1
- package/blocks/Config/side-effects.js +115 -21
- package/blocks/DropArea/DropArea.d.ts +2 -2
- package/blocks/ExternalSource/ExternalSource.d.ts +2 -2
- package/blocks/ExternalSource/types.d.ts +0 -3
- package/blocks/ExternalSource/types.d.ts.map +1 -1
- package/blocks/ExternalSource/types.js +0 -4
- package/blocks/FileItem/FileItem.d.ts +2 -3
- package/blocks/FileItem/FileItem.d.ts.map +1 -1
- package/blocks/FileItem/FileItem.js +20 -18
- package/blocks/FileItem/FileItemConfig.d.ts +1 -1
- package/blocks/FileItem/FileItemConfig.d.ts.map +1 -1
- package/blocks/FileItem/FileItemConfig.js +3 -3
- package/blocks/Modal/Modal.d.ts +6 -6
- package/blocks/Modal/Modal.d.ts.map +1 -1
- package/blocks/Modal/Modal.js +10 -12
- package/blocks/SimpleBtn/SimpleBtn.d.ts +2 -2
- package/blocks/SourceBtn/SourceBtn.d.ts +2 -2
- package/blocks/SourceBtn/SourceBtn.d.ts.map +1 -1
- package/blocks/SourceBtn/SourceBtn.js +0 -8
- package/blocks/Thumb/Thumb.d.ts +2 -2
- package/blocks/Thumb/Thumb.d.ts.map +1 -1
- package/blocks/Thumb/Thumb.js +2 -0
- package/blocks/UploadCtxProvider/EventEmitter.d.ts +17 -4
- package/blocks/UploadCtxProvider/EventEmitter.d.ts.map +1 -1
- package/blocks/UploadCtxProvider/EventEmitter.js +14 -2
- package/blocks/UploadList/UploadList.d.ts +2 -2
- package/blocks/UrlSource/UrlSource.js +3 -1
- package/blocks/themes/uc-basic/common.css +4 -0
- package/blocks/themes/uc-basic/index.css +0 -1
- package/blocks/themes/uc-basic/svg-sprite.d.ts +1 -1
- package/blocks/themes/uc-basic/svg-sprite.d.ts.map +1 -1
- package/blocks/themes/uc-basic/svg-sprite.js +1 -1
- package/env.d.ts +1 -1
- package/env.js +1 -1
- package/index.d.ts +1 -2
- package/index.js +1 -2
- package/index.ssr.d.ts +19 -69
- package/index.ssr.d.ts.map +1 -1
- package/index.ssr.js +44 -143
- package/locales/file-uploader/ar.d.ts +4 -0
- package/locales/file-uploader/ar.js +5 -0
- package/locales/file-uploader/az.d.ts +4 -0
- package/locales/file-uploader/az.js +5 -0
- package/locales/file-uploader/ca.d.ts +4 -0
- package/locales/file-uploader/ca.js +6 -0
- package/locales/file-uploader/cs.d.ts +4 -0
- package/locales/file-uploader/cs.js +6 -0
- package/locales/file-uploader/da.d.ts +4 -0
- package/locales/file-uploader/da.js +6 -0
- package/locales/file-uploader/de.d.ts +4 -0
- package/locales/file-uploader/de.js +6 -0
- package/locales/file-uploader/el.d.ts +4 -0
- package/locales/file-uploader/el.js +6 -0
- package/locales/file-uploader/en.d.ts +4 -3
- package/locales/file-uploader/en.js +5 -3
- package/locales/file-uploader/es.d.ts +4 -0
- package/locales/file-uploader/es.js +6 -0
- package/locales/file-uploader/et.d.ts +4 -0
- package/locales/file-uploader/et.js +6 -0
- package/locales/file-uploader/fi.d.ts +4 -0
- package/locales/file-uploader/fi.js +6 -0
- package/locales/file-uploader/fr.d.ts +4 -0
- package/locales/file-uploader/fr.js +6 -0
- package/locales/file-uploader/he.d.ts +4 -0
- package/locales/file-uploader/he.js +6 -0
- package/locales/file-uploader/hy.d.ts +4 -0
- package/locales/file-uploader/hy.js +5 -0
- package/locales/file-uploader/is.d.ts +4 -0
- package/locales/file-uploader/is.js +6 -0
- package/locales/file-uploader/it.d.ts +4 -0
- package/locales/file-uploader/it.js +6 -0
- package/locales/file-uploader/ja.d.ts +4 -0
- package/locales/file-uploader/ja.js +6 -0
- package/locales/file-uploader/ka.d.ts +4 -0
- package/locales/file-uploader/ka.js +6 -0
- package/locales/file-uploader/kk.d.ts +4 -0
- package/locales/file-uploader/kk.js +6 -0
- package/locales/file-uploader/ko.d.ts +4 -0
- package/locales/file-uploader/ko.js +6 -0
- package/locales/file-uploader/lv.d.ts +4 -0
- package/locales/file-uploader/lv.js +6 -0
- package/locales/file-uploader/nb.d.ts +4 -0
- package/locales/file-uploader/nb.js +6 -0
- package/locales/file-uploader/nl.d.ts +4 -0
- package/locales/file-uploader/nl.js +6 -0
- package/locales/file-uploader/pl.d.ts +4 -0
- package/locales/file-uploader/pl.js +6 -0
- package/locales/file-uploader/pt.d.ts +4 -0
- package/locales/file-uploader/pt.js +6 -0
- package/locales/file-uploader/ro.d.ts +4 -0
- package/locales/file-uploader/ro.js +6 -0
- package/locales/file-uploader/ru.d.ts +4 -0
- package/locales/file-uploader/ru.js +6 -0
- package/locales/file-uploader/sk.d.ts +4 -0
- package/locales/file-uploader/sk.js +6 -0
- package/locales/file-uploader/sr.d.ts +4 -0
- package/locales/file-uploader/sr.js +6 -0
- package/locales/file-uploader/sv.d.ts +4 -0
- package/locales/file-uploader/sv.js +6 -0
- package/locales/file-uploader/tr.d.ts +4 -0
- package/locales/file-uploader/tr.js +6 -0
- package/locales/file-uploader/uk.d.ts +4 -0
- package/locales/file-uploader/uk.js +6 -0
- package/locales/file-uploader/vi.d.ts +4 -0
- package/locales/file-uploader/vi.js +6 -0
- package/locales/file-uploader/zh-TW.d.ts +4 -0
- package/locales/file-uploader/zh-TW.js +6 -0
- package/locales/file-uploader/zh.d.ts +4 -0
- package/locales/file-uploader/zh.js +6 -0
- package/package.json +8 -8
- package/solutions/cloud-image-editor/CloudImageEditor.d.ts +35 -0
- package/solutions/cloud-image-editor/CloudImageEditor.d.ts.map +1 -1
- package/solutions/cloud-image-editor/CloudImageEditor.js +12 -0
- package/solutions/file-uploader/inline/FileUploaderInline.d.ts +3 -2
- package/solutions/file-uploader/inline/FileUploaderInline.d.ts.map +1 -1
- package/solutions/file-uploader/inline/FileUploaderInline.js +4 -0
- package/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts +11 -10
- package/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts.map +1 -1
- package/solutions/file-uploader/minimal/FileUploaderMinimal.js +9 -9
- package/solutions/file-uploader/regular/FileUploaderRegular.d.ts +3 -2
- package/solutions/file-uploader/regular/FileUploaderRegular.d.ts.map +1 -1
- package/solutions/file-uploader/regular/FileUploaderRegular.js +4 -4
- package/types/events.d.ts +1 -1
- package/types/exported.d.ts +59 -52
- package/types/jsx.d.ts +2 -0
- package/utils/isPromiseLike.d.ts +2 -0
- package/utils/isPromiseLike.d.ts.map +1 -0
- package/utils/isPromiseLike.js +12 -0
- package/utils/isPromiseLike.test.d.ts +2 -0
- package/utils/isPromiseLike.test.d.ts.map +1 -0
- package/utils/isPromiseLike.test.js +20 -0
- package/utils/parseCdnUrl.d.ts.map +1 -1
- package/utils/parseCdnUrl.js +4 -1
- package/utils/parseCdnUrl.test.js +13 -0
- package/utils/validators/collection/validateCollectionUploadError.d.ts +2 -2
- package/utils/validators/collection/validateCollectionUploadError.d.ts.map +1 -1
- package/utils/validators/collection/validateCollectionUploadError.js +1 -1
- package/utils/validators/collection/validateMultiple.d.ts +2 -2
- package/utils/validators/collection/validateMultiple.d.ts.map +1 -1
- package/utils/validators/collection/validateMultiple.js +1 -1
- package/utils/validators/file/validateFileType.d.ts +2 -2
- package/utils/validators/file/validateFileType.d.ts.map +1 -1
- package/utils/validators/file/validateFileType.js +1 -1
- package/utils/validators/file/validateIsImage.d.ts +2 -2
- package/utils/validators/file/validateIsImage.d.ts.map +1 -1
- package/utils/validators/file/validateIsImage.js +1 -1
- package/utils/validators/file/validateMaxSizeLimit.d.ts +2 -2
- package/utils/validators/file/validateMaxSizeLimit.d.ts.map +1 -1
- package/utils/validators/file/validateMaxSizeLimit.js +1 -1
- package/utils/validators/file/validateUploadError.d.ts +2 -2
- package/utils/validators/file/validateUploadError.d.ts.map +1 -1
- package/utils/validators/file/validateUploadError.js +1 -1
- package/web/file-uploader.iife.min.js +5 -5
- package/web/file-uploader.min.js +5 -5
- package/web/uc-basic.min.css +1 -1
- package/web/uc-cloud-image-editor.min.css +1 -1
- package/web/uc-cloud-image-editor.min.js +5 -5
- package/web/uc-file-uploader-inline.min.css +1 -1
- package/web/uc-file-uploader-inline.min.js +5 -5
- package/web/uc-file-uploader-minimal.min.css +1 -1
- package/web/uc-file-uploader-minimal.min.js +5 -5
- package/web/uc-file-uploader-regular.min.css +1 -1
- package/web/uc-file-uploader-regular.min.js +5 -5
- package/web/uc-img.min.js +2 -2
- package/abstract/SecureUploadsManager.d.ts +0 -22
- package/abstract/ValidationManager.d.ts.map +0 -1
- package/abstract/a11y.d.ts.map +0 -1
- package/blocks/AiGenerateSource/AIGenerateSource.d.ts +0 -47
- package/blocks/AiGenerateSource/AIGenerateSource.d.ts.map +0 -1
- package/blocks/AiGenerateSource/AIGenerateSource.js +0 -180
- package/blocks/AiGenerateSource/ai-generate-source.css +0 -58
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
import { debounce } from '../../utils/debounce.js';
|
|
3
|
-
import { ActivityBlock } from '../../../abstract/ActivityBlock.js';
|
|
4
3
|
import { Block } from '../../../abstract/Block.js';
|
|
5
4
|
import { EditorCropButtonControl } from './EditorCropButtonControl.js';
|
|
5
|
+
import { EditorAspectRatioButtonControl, EditorFreeformButtonControl } from './EditorAspectRatioButtonControl.js';
|
|
6
6
|
import { EditorFilterControl } from './EditorFilterControl.js';
|
|
7
7
|
import { EditorOperationControl } from './EditorOperationControl.js';
|
|
8
8
|
import { FAKE_ORIGINAL_FILTER } from './EditorSlider.js';
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
TabId,
|
|
17
17
|
} from './toolbar-constants.js';
|
|
18
18
|
import { viewerImageSrc } from './util.js';
|
|
19
|
+
import { parseFilterValue } from './utils/parseFilterValue.js';
|
|
19
20
|
|
|
20
21
|
/** @param {String} id */
|
|
21
22
|
function renderTabToggle(id) {
|
|
@@ -65,9 +66,12 @@ export class EditorToolbar extends Block {
|
|
|
65
66
|
this.init$ = {
|
|
66
67
|
...this.init$,
|
|
67
68
|
'*sliderEl': null,
|
|
69
|
+
'*listAspectRatioEl': null,
|
|
68
70
|
/** @type {import('./types.js').LoadingOperations} */
|
|
69
71
|
'*loadingOperations': new Map(),
|
|
70
72
|
'*showSlider': false,
|
|
73
|
+
'*showListAspectRatio': false,
|
|
74
|
+
hideSliderOrList: false,
|
|
71
75
|
'*currentFilter': FAKE_ORIGINAL_FILTER,
|
|
72
76
|
'*currentOperation': null,
|
|
73
77
|
showLoader: false,
|
|
@@ -82,11 +86,9 @@ export class EditorToolbar extends Block {
|
|
|
82
86
|
'presence.tabContent.crop': false,
|
|
83
87
|
'presence.tabContent.tuning': false,
|
|
84
88
|
'presence.tabContent.filters': false,
|
|
85
|
-
'presence.tabContent.ai': false,
|
|
86
89
|
'presence.tabToggle.crop': true,
|
|
87
90
|
'presence.tabToggle.tuning': true,
|
|
88
91
|
'presence.tabToggle.filters': true,
|
|
89
|
-
'presence.tabToggle.ai': true,
|
|
90
92
|
'presence.subTopToolbarStyles': {
|
|
91
93
|
hidden: 'uc-sub-toolbar--top-hidden',
|
|
92
94
|
visible: 'uc-sub-toolbar--visible',
|
|
@@ -107,18 +109,36 @@ export class EditorToolbar extends Block {
|
|
|
107
109
|
hidden: 'uc-tab-toggles--hidden',
|
|
108
110
|
visible: 'uc-tab-toggles--visible',
|
|
109
111
|
},
|
|
110
|
-
|
|
112
|
+
/** @param {MouseEvent} e */
|
|
113
|
+
'on.cancel': (e) => {
|
|
114
|
+
this.telemetryManager.sendEventCloudImageEditor(e, this.$['*tabId'], {
|
|
115
|
+
action: 'cancel',
|
|
116
|
+
});
|
|
117
|
+
|
|
111
118
|
this._cancelPreload?.();
|
|
112
119
|
this.$['*on.cancel']();
|
|
113
120
|
},
|
|
114
|
-
|
|
121
|
+
/** @param {MouseEvent} e */
|
|
122
|
+
'on.apply': (e) => {
|
|
123
|
+
this.telemetryManager.sendEventCloudImageEditor(e, this.$['*tabId'], {
|
|
124
|
+
action: 'apply',
|
|
125
|
+
});
|
|
115
126
|
this.$['*on.apply'](this.$['*editorTransformations']);
|
|
116
127
|
},
|
|
117
|
-
|
|
128
|
+
/** @param {MouseEvent} e */
|
|
129
|
+
'on.applySlider': (e) => {
|
|
130
|
+
this.telemetryManager.sendEventCloudImageEditor(e, this.$['*tabId'], {
|
|
131
|
+
action: 'apply-slider',
|
|
132
|
+
operation: parseFilterValue(this.$['*operationTooltip']),
|
|
133
|
+
});
|
|
118
134
|
this.ref['slider-el'].apply();
|
|
119
135
|
this._onSliderClose();
|
|
120
136
|
},
|
|
121
|
-
|
|
137
|
+
/** @param {MouseEvent} e */
|
|
138
|
+
'on.cancelSlider': (e) => {
|
|
139
|
+
this.telemetryManager.sendEventCloudImageEditor(e, this.$['*tabId'], {
|
|
140
|
+
action: 'cancel-slider',
|
|
141
|
+
});
|
|
122
142
|
this.ref['slider-el'].cancel();
|
|
123
143
|
this._onSliderClose();
|
|
124
144
|
},
|
|
@@ -126,6 +146,7 @@ export class EditorToolbar extends Block {
|
|
|
126
146
|
'on.clickTab': (e) => {
|
|
127
147
|
const id = /** @type {HTMLElement} */ (e.currentTarget).getAttribute('data-id');
|
|
128
148
|
if (id) {
|
|
149
|
+
this.telemetryManager.sendEventCloudImageEditor(e, id);
|
|
129
150
|
this._activateTab(id, { fromViewer: false });
|
|
130
151
|
}
|
|
131
152
|
},
|
|
@@ -133,7 +154,6 @@ export class EditorToolbar extends Block {
|
|
|
133
154
|
[`tab_${TabId.TUNING}`]: `tab_${TabId.TUNING}`,
|
|
134
155
|
[`tab_${TabId.CROP}`]: `tab_${TabId.CROP}`,
|
|
135
156
|
[`tab_${TabId.FILTERS}`]: `tab_${TabId.FILTERS}`,
|
|
136
|
-
[`tab_${TabId.AI}`]: `tab_${TabId.AI}`,
|
|
137
157
|
cancel: 'cancel',
|
|
138
158
|
apply: 'apply',
|
|
139
159
|
'a11y-editor-tab-filters': 'a11y-editor-tab-filters',
|
|
@@ -149,6 +169,11 @@ export class EditorToolbar extends Block {
|
|
|
149
169
|
/** @private */
|
|
150
170
|
_onSliderClose() {
|
|
151
171
|
this.$['*showSlider'] = false;
|
|
172
|
+
|
|
173
|
+
if (this.$['*tabId'] === TabId.CROP) {
|
|
174
|
+
this.$['*showListAspectRatio'] = false;
|
|
175
|
+
}
|
|
176
|
+
|
|
152
177
|
if (this.$['*tabId'] === TabId.TUNING) {
|
|
153
178
|
this.ref['tooltip-el'].classList.toggle('uc-info-tooltip_visible', false);
|
|
154
179
|
}
|
|
@@ -187,6 +212,26 @@ export class EditorToolbar extends Block {
|
|
|
187
212
|
return el;
|
|
188
213
|
}
|
|
189
214
|
|
|
215
|
+
/**
|
|
216
|
+
* @private
|
|
217
|
+
* @param {import('./types.js').CropAspectRatio} config
|
|
218
|
+
*/
|
|
219
|
+
_createAspectRatioConrol(config) {
|
|
220
|
+
const el = new EditorAspectRatioButtonControl();
|
|
221
|
+
// @ts-expect-error TODO: fix
|
|
222
|
+
el.aspectRatio = config;
|
|
223
|
+
return el;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
_createFreeformConrol() {
|
|
227
|
+
const el = new EditorFreeformButtonControl();
|
|
228
|
+
return el;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
_clearListAspectRatio() {
|
|
232
|
+
this.$['*listAspectRatioEl'].innerHTML = '';
|
|
233
|
+
}
|
|
234
|
+
|
|
190
235
|
/**
|
|
191
236
|
* @private
|
|
192
237
|
* @param {String} tabId
|
|
@@ -195,7 +240,27 @@ export class EditorToolbar extends Block {
|
|
|
195
240
|
let listEl = this.ref[`controls-list-${tabId}`];
|
|
196
241
|
let fr = document.createDocumentFragment();
|
|
197
242
|
|
|
243
|
+
this._clearListAspectRatio();
|
|
244
|
+
|
|
198
245
|
if (tabId === TabId.CROP) {
|
|
246
|
+
const hasFreeformAspectRatio = this.$['*cropPresetList'].length >= 3;
|
|
247
|
+
|
|
248
|
+
if (hasFreeformAspectRatio) {
|
|
249
|
+
const el = this._createFreeformConrol();
|
|
250
|
+
fr.appendChild(el);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
this.$['*cropPresetList'].forEach(
|
|
254
|
+
/** @param {import('./types.js').CropAspectRatio} it */ (it) => {
|
|
255
|
+
let el = this._createAspectRatioConrol(it);
|
|
256
|
+
fr.appendChild(el);
|
|
257
|
+
|
|
258
|
+
if (hasFreeformAspectRatio) {
|
|
259
|
+
this.$['*listAspectRatioEl'].appendChild(el);
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
);
|
|
263
|
+
|
|
199
264
|
this.$.cropOperations.forEach(
|
|
200
265
|
/** @param {string} operation */ (operation) => {
|
|
201
266
|
let el = this._createToggleControl(operation);
|
|
@@ -229,11 +294,6 @@ export class EditorToolbar extends Block {
|
|
|
229
294
|
listEl.appendChild(fr);
|
|
230
295
|
}
|
|
231
296
|
|
|
232
|
-
redirectToAiGenerate() {
|
|
233
|
-
this.$['*currentActivity'] = ActivityBlock.activities.AI_GENERATE;
|
|
234
|
-
this.modalManager.open(ActivityBlock.activities.AI_GENERATE);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
297
|
/**
|
|
238
298
|
* @private
|
|
239
299
|
* @param {String} id
|
|
@@ -242,13 +302,6 @@ export class EditorToolbar extends Block {
|
|
|
242
302
|
_activateTab(id, { fromViewer }) {
|
|
243
303
|
this.$['*tabId'] = id;
|
|
244
304
|
|
|
245
|
-
if (id === TabId.AI) {
|
|
246
|
-
console.log('Redirecting to AI generation...');
|
|
247
|
-
|
|
248
|
-
this.redirectToAiGenerate();
|
|
249
|
-
return;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
305
|
if (id === TabId.CROP) {
|
|
253
306
|
this.$['*faderEl'].deactivate();
|
|
254
307
|
this.$['*cropperEl'].activate(this.$['*imageSize'], { fromViewer });
|
|
@@ -343,6 +396,7 @@ export class EditorToolbar extends Block {
|
|
|
343
396
|
super.initCallback();
|
|
344
397
|
|
|
345
398
|
this.$['*sliderEl'] = this.ref['slider-el'];
|
|
399
|
+
this.$['*listAspectRatioEl'] = this.ref['list-el'];
|
|
346
400
|
|
|
347
401
|
this.sub('*imageSize', (imageSize) => {
|
|
348
402
|
if (imageSize) {
|
|
@@ -401,6 +455,14 @@ export class EditorToolbar extends Block {
|
|
|
401
455
|
this.sub('*showSlider', (showSlider) => {
|
|
402
456
|
this.$['presence.subToolbar'] = showSlider;
|
|
403
457
|
this.$['presence.mainToolbar'] = !showSlider;
|
|
458
|
+
|
|
459
|
+
this.$.hideSliderOrList = true;
|
|
460
|
+
});
|
|
461
|
+
|
|
462
|
+
this.sub('*showListAspectRatio', (show) => {
|
|
463
|
+
this.$['presence.subToolbar'] = show;
|
|
464
|
+
this.$['presence.mainToolbar'] = !show;
|
|
465
|
+
this.$.hideSliderOrList = false;
|
|
404
466
|
});
|
|
405
467
|
|
|
406
468
|
this.sub('*tabList', (tabList) => {
|
|
@@ -421,6 +483,7 @@ export class EditorToolbar extends Block {
|
|
|
421
483
|
|
|
422
484
|
destroyCallback() {
|
|
423
485
|
this.$['*showSlider'] = false;
|
|
486
|
+
this.$['*showListAspectRatio'] = false;
|
|
424
487
|
}
|
|
425
488
|
}
|
|
426
489
|
|
|
@@ -455,9 +518,13 @@ EditorToolbar.template = /* HTML */ `
|
|
|
455
518
|
class="uc-sub-toolbar"
|
|
456
519
|
set="visible: presence.subToolbar; styles: presence.subBottomToolbarStyles"
|
|
457
520
|
>
|
|
458
|
-
<div class="uc-slider">
|
|
521
|
+
<div class="uc-slider" set="@hidden:!hideSliderOrList">
|
|
459
522
|
<uc-editor-slider ref="slider-el"></uc-editor-slider>
|
|
460
523
|
</div>
|
|
524
|
+
|
|
525
|
+
<div set="@hidden:hideSliderOrList" class="uc-list-aspect-ratio-container">
|
|
526
|
+
<div class="uc-list-aspect-ratio" ref="list-el"></div>
|
|
527
|
+
</div>
|
|
461
528
|
<div class="uc-controls-row">
|
|
462
529
|
<uc-btn-ui theme="secondary" set="onclick: on.cancelSlider" l10n="@text:cancel"> </uc-btn-ui>
|
|
463
530
|
<uc-btn-ui theme="primary" set="onclick: on.applySlider" l10n="@text:apply"> </uc-btn-ui>
|
|
@@ -301,34 +301,36 @@ uc-crop-frame > .uc-thumb {
|
|
|
301
301
|
opacity var(--transition-duration-3);
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
-
uc-crop-frame
|
|
304
|
+
uc-crop-frame .uc-thumb--visible {
|
|
305
305
|
opacity: 1;
|
|
306
306
|
pointer-events: auto;
|
|
307
307
|
}
|
|
308
308
|
|
|
309
|
-
uc-crop-frame
|
|
309
|
+
uc-crop-frame .uc-thumb--hidden {
|
|
310
310
|
opacity: 0;
|
|
311
311
|
pointer-events: none;
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
-
uc-crop-frame
|
|
314
|
+
uc-crop-frame .uc-guides {
|
|
315
315
|
transition: var(--transition-duration-3);
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
-
uc-crop-frame
|
|
318
|
+
uc-crop-frame .uc-guides--hidden {
|
|
319
319
|
opacity: 0;
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
-
uc-crop-frame
|
|
322
|
+
uc-crop-frame .uc-guides--semi-hidden {
|
|
323
323
|
opacity: 0.2;
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
-
uc-crop-frame
|
|
326
|
+
uc-crop-frame .uc-guides--visible {
|
|
327
327
|
opacity: 1;
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
uc-editor-button-control,
|
|
331
331
|
uc-editor-crop-button-control,
|
|
332
|
+
uc-editor-aspect-ratio-button-control,
|
|
333
|
+
uc-editor-freeform-button-control,
|
|
332
334
|
uc-editor-filter-control,
|
|
333
335
|
uc-editor-operation-control {
|
|
334
336
|
--l-base-min-width: var(--uc-button-size);
|
|
@@ -356,6 +358,8 @@ uc-editor-operation-control {
|
|
|
356
358
|
|
|
357
359
|
uc-editor-button-control > button,
|
|
358
360
|
uc-editor-crop-button-control > button,
|
|
361
|
+
uc-editor-aspect-ratio-button-control > button,
|
|
362
|
+
uc-editor-freeform-button-control > button,
|
|
359
363
|
uc-editor-filter-control > button,
|
|
360
364
|
uc-editor-operation-control > button {
|
|
361
365
|
all: unset;
|
|
@@ -371,7 +375,14 @@ uc-editor-operation-control > button {
|
|
|
371
375
|
transition: var(--l-width-transition);
|
|
372
376
|
}
|
|
373
377
|
|
|
374
|
-
:where(
|
|
378
|
+
:where(
|
|
379
|
+
uc-editor-button-control,
|
|
380
|
+
uc-editor-crop-button-control,
|
|
381
|
+
uc-editor-aspect-ratio-button-control,
|
|
382
|
+
uc-editor-freeform-button-control,
|
|
383
|
+
uc-editor-filter-control,
|
|
384
|
+
uc-editor-operation-control
|
|
385
|
+
)
|
|
375
386
|
> uc-icon
|
|
376
387
|
> svg {
|
|
377
388
|
width: var(--size-icon);
|
|
@@ -386,6 +397,8 @@ uc-editor-filter-control > uc-icon.uc-original-icon > svg {
|
|
|
386
397
|
uc-editor-button-control.uc-active,
|
|
387
398
|
uc-editor-operation-control.uc-active,
|
|
388
399
|
uc-editor-crop-button-control.uc-active,
|
|
400
|
+
uc-editor-aspect-ratio-button-control.uc-active,
|
|
401
|
+
uc-editor-freeform-button-control.uc-active,
|
|
389
402
|
uc-editor-filter-control.uc-active {
|
|
390
403
|
--idle-color-rgb: var(--uc-primary-foreground);
|
|
391
404
|
--idle-background: var(--uc-primary);
|
|
@@ -406,6 +419,8 @@ uc-editor-filter-control.uc-active .uc-preview {
|
|
|
406
419
|
uc-editor-button-control.uc-not_active,
|
|
407
420
|
uc-editor-operation-control.uc-not_active,
|
|
408
421
|
uc-editor-crop-button-control.uc-not_active,
|
|
422
|
+
uc-editor-aspect-ratio-button-control.uc-not_active,
|
|
423
|
+
uc-editor-freeform-button-control.uc-not_active,
|
|
409
424
|
uc-editor-filter-control.uc-not_active {
|
|
410
425
|
--idle-color-rgb: var(--uc-secondary-foreground);
|
|
411
426
|
}
|
|
@@ -413,6 +428,8 @@ uc-editor-filter-control.uc-not_active {
|
|
|
413
428
|
:where(.uc-contrast) uc-editor-button-control.uc-not_active,
|
|
414
429
|
:where(.uc-contrast) uc-editor-operation-control.uc-not_active,
|
|
415
430
|
:where(.uc-contrast) uc-editor-crop-button-control.uc-not_active,
|
|
431
|
+
:where(.uc-contrast) uc-editor-freeform-button-control.uc-not_active,
|
|
432
|
+
:where(.uc-contrast) uc-editor-aspect-ratio-button-control.uc-not_active,
|
|
416
433
|
:where(.uc-contrast) uc-editor-filter-control.uc-not_active {
|
|
417
434
|
--idle-background: transparent;
|
|
418
435
|
--hover-background: var(--uc-secondary);
|
|
@@ -424,6 +441,8 @@ uc-editor-filter-control.uc-not_active {
|
|
|
424
441
|
uc-editor-button-control > button::before,
|
|
425
442
|
uc-editor-operation-control > button::before,
|
|
426
443
|
uc-editor-crop-button-control > button::before,
|
|
444
|
+
uc-editor-freeform-button-control > button::before,
|
|
445
|
+
uc-editor-aspect-ratio-button-control > button::before,
|
|
427
446
|
uc-editor-filter-control > button::before {
|
|
428
447
|
position: absolute;
|
|
429
448
|
content: '';
|
|
@@ -440,6 +459,8 @@ uc-editor-filter-control > button::before {
|
|
|
440
459
|
uc-editor-button-control > button .uc-title,
|
|
441
460
|
uc-editor-operation-control > button .uc-title,
|
|
442
461
|
uc-editor-crop-button-control > button .uc-title,
|
|
462
|
+
uc-editor-aspect-ratio-button-control > button .uc-title,
|
|
463
|
+
uc-editor-freeform-button-control > button .uc-title,
|
|
443
464
|
uc-editor-filter-control > button .uc-title {
|
|
444
465
|
padding-right: var(--cldtr-gap-mid-1);
|
|
445
466
|
font-size: 0.7em;
|
|
@@ -450,6 +471,8 @@ uc-editor-filter-control > button .uc-title {
|
|
|
450
471
|
uc-editor-button-control > button uc-icon,
|
|
451
472
|
uc-editor-operation-control > button uc-icon,
|
|
452
473
|
uc-editor-crop-button-control > button uc-icon,
|
|
474
|
+
uc-editor-aspect-ratio-button-control > button uc-icon,
|
|
475
|
+
uc-editor-freeform-button-control > button uc-icon,
|
|
453
476
|
uc-editor-filter-control > button uc-icon {
|
|
454
477
|
pointer-events: none;
|
|
455
478
|
}
|
|
@@ -643,6 +666,15 @@ uc-editor-toolbar > .uc-toolbar-container > .uc-sub-toolbar {
|
|
|
643
666
|
visibility var(--transition-duration-3) ease-in-out;
|
|
644
667
|
}
|
|
645
668
|
|
|
669
|
+
.uc-sub-toolbar > .uc-list-aspect-ratio-container > .uc-list-aspect-ratio {
|
|
670
|
+
display: grid;
|
|
671
|
+
grid-auto-flow: column;
|
|
672
|
+
justify-content: center;
|
|
673
|
+
align-items: center;
|
|
674
|
+
gap: 6px;
|
|
675
|
+
height: var(--size-panel-heading);
|
|
676
|
+
}
|
|
677
|
+
|
|
646
678
|
uc-editor-toolbar > .uc-toolbar-container > .uc-sub-toolbar.uc-sub-toolbar--visible {
|
|
647
679
|
transform: translateY(0px);
|
|
648
680
|
opacity: 1;
|
|
@@ -12,4 +12,5 @@ export { BtnUi } from "./elements/button/BtnUi.js";
|
|
|
12
12
|
export { LineLoaderUi } from "./elements/line-loader/LineLoaderUi.js";
|
|
13
13
|
export { PresenceToggle } from "./elements/presence-toggle/PresenceToggle.js";
|
|
14
14
|
export { SliderUi } from "./elements/slider/SliderUi.js";
|
|
15
|
+
export { EditorAspectRatioButtonControl, EditorFreeformButtonControl } from "./EditorAspectRatioButtonControl.js";
|
|
15
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { CloudImageEditorBlock } from './CloudImageEditorBlock.js';
|
|
2
2
|
export { CropFrame } from './CropFrame.js';
|
|
3
3
|
export { EditorCropButtonControl } from './EditorCropButtonControl.js';
|
|
4
|
+
export { EditorAspectRatioButtonControl, EditorFreeformButtonControl } from './EditorAspectRatioButtonControl.js';
|
|
4
5
|
export { EditorFilterControl } from './EditorFilterControl.js';
|
|
5
6
|
export { EditorOperationControl } from './EditorOperationControl.js';
|
|
6
7
|
export { EditorImageCropper } from './EditorImageCropper.js';
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export function parseCropPreset(cropPreset: import("../../../../types/exported.d.ts").ConfigType["cropPreset"]): import("../types.js").CropAspectRatio[]
|
|
1
|
+
export function parseCropPreset(cropPreset: import("../../../../types/exported.d.ts").ConfigType["cropPreset"]): import("../types.js").CropAspectRatio[];
|
|
2
|
+
export function getClosestAspectRatio(width: number, height: number, ratios: import("../types.js").CropPresetList, tolerance?: number): import("../types.js").CropAspectRatio | null;
|
|
2
3
|
//# sourceMappingURL=parseCropPreset.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseCropPreset.d.ts","sourceRoot":"","sources":["parseCropPreset.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parseCropPreset.d.ts","sourceRoot":"","sources":["parseCropPreset.js"],"names":[],"mappings":"AAOO,4CADK,OAAO,iCAAiC,EAAE,UAAU,CAAC,YAAY,CAAC,2CAmC7E;AASM,6CANI,MAAM,UACN,MAAM,UACN,OAAO,aAAa,EAAE,cAAc,cACpC,MAAM,GACJ,OAAO,aAAa,EAAE,eAAe,GAAG,IAAI,CA+BxD"}
|
|
@@ -1,14 +1,80 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
+
import { UID } from '@symbiotejs/symbiote';
|
|
3
|
+
import { stringToArray } from '../../../../utils/stringToArray.js';
|
|
4
|
+
|
|
5
|
+
const EXCLUDED_TYPES = ['free'];
|
|
2
6
|
|
|
3
7
|
/** @param {import('../../../../types/exported.d.ts').ConfigType['cropPreset']} cropPreset */
|
|
4
8
|
export const parseCropPreset = (cropPreset) => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
const items = stringToArray(cropPreset);
|
|
10
|
+
if (!items?.length) return [];
|
|
11
|
+
|
|
12
|
+
/** @type {import('../types.js').CropAspectRatio[]} */
|
|
13
|
+
const result = [];
|
|
14
|
+
for (let i = 0; i < items.length; i++) {
|
|
15
|
+
const raw = items[i].trim();
|
|
16
|
+
if (!raw) continue;
|
|
17
|
+
|
|
18
|
+
const sep = raw.indexOf(':');
|
|
19
|
+
if (sep === -1 && !EXCLUDED_TYPES.includes(raw)) {
|
|
20
|
+
console.warn(`Invalid crop preset: ${raw}`);
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const w = Number(raw.slice(0, sep));
|
|
25
|
+
const h = Number(raw.slice(sep + 1));
|
|
26
|
+
|
|
27
|
+
if ((!Number.isFinite(w) || !Number.isFinite(h) || w <= 0 || h <= 0) && !EXCLUDED_TYPES.includes(raw)) {
|
|
28
|
+
console.warn(`Invalid crop preset: ${raw}`);
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
result.push({
|
|
33
|
+
id: UID.generate(),
|
|
34
|
+
type: 'aspect-ratio',
|
|
35
|
+
width: EXCLUDED_TYPES.includes(raw) ? 0 : w,
|
|
36
|
+
height: EXCLUDED_TYPES.includes(raw) ? 0 : h,
|
|
37
|
+
hasFreeform: EXCLUDED_TYPES.includes(raw),
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return result;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @param {number} width
|
|
46
|
+
* @param {number} height
|
|
47
|
+
* @param {import('../types.js').CropPresetList} ratios
|
|
48
|
+
* @param {number} tolerance
|
|
49
|
+
* @returns {import('../types.js').CropAspectRatio | null}
|
|
50
|
+
*/
|
|
51
|
+
export const getClosestAspectRatio = (width, height, ratios, tolerance = 0.1) => {
|
|
52
|
+
const inputRatio = width / height;
|
|
53
|
+
|
|
54
|
+
let closest = null;
|
|
55
|
+
let minDiff = Infinity;
|
|
56
|
+
|
|
57
|
+
for (const r of ratios) {
|
|
58
|
+
const [w, h] = [r.width, r.height];
|
|
59
|
+
const ratio = w / h;
|
|
60
|
+
|
|
61
|
+
const diff = Math.abs(inputRatio - ratio);
|
|
62
|
+
|
|
63
|
+
if (diff < minDiff) {
|
|
64
|
+
minDiff = diff;
|
|
65
|
+
closest = r;
|
|
66
|
+
}
|
|
10
67
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
68
|
+
|
|
69
|
+
if (closest) {
|
|
70
|
+
const [cw, ch] = [closest.width, closest.height];
|
|
71
|
+
const closestRatio = cw / ch;
|
|
72
|
+
|
|
73
|
+
const relDiff = Math.abs(inputRatio - closestRatio) / closestRatio;
|
|
74
|
+
if (relDiff > tolerance) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return closest;
|
|
14
80
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseCropPreset.test.d.ts","sourceRoot":"","sources":["parseCropPreset.test.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { expect } from '@esm-bundle/chai';
|
|
2
|
+
import { fake } from 'sinon';
|
|
3
|
+
import { UID } from '@symbiotejs/symbiote';
|
|
4
|
+
import { parseCropPreset, getClosestAspectRatio } from './parseCropPreset';
|
|
5
|
+
|
|
6
|
+
describe('parseCropPreset', () => {
|
|
7
|
+
it('should parse crop presets correctly', () => {
|
|
8
|
+
const uniqueIds = 4;
|
|
9
|
+
let uidCallCount = 0;
|
|
10
|
+
UID.generate = fake(() => {
|
|
11
|
+
const id = `id-${(uidCallCount % uniqueIds) + 1}`;
|
|
12
|
+
uidCallCount += 1;
|
|
13
|
+
return id;
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const input = '16:9, 3:4, 4:3, 1:1';
|
|
17
|
+
const uuid = () => UID.generate();
|
|
18
|
+
const expected = [
|
|
19
|
+
{ id: uuid(), type: 'aspect-ratio', width: 16, height: 9, hasFreeform: false },
|
|
20
|
+
{ id: uuid(), type: 'aspect-ratio', width: 3, height: 4, hasFreeform: false },
|
|
21
|
+
{ id: uuid(), type: 'aspect-ratio', width: 4, height: 3, hasFreeform: false },
|
|
22
|
+
{ id: uuid(), type: 'aspect-ratio', width: 1, height: 1, hasFreeform: false },
|
|
23
|
+
];
|
|
24
|
+
const list = parseCropPreset(input);
|
|
25
|
+
expect(list).to.deep.equal(expected);
|
|
26
|
+
|
|
27
|
+
expect(getClosestAspectRatio(400, 500, list, 0.1)).to.deep.equal({
|
|
28
|
+
hasFreeform: false,
|
|
29
|
+
height: 4,
|
|
30
|
+
id: 'id-2',
|
|
31
|
+
type: 'aspect-ratio',
|
|
32
|
+
width: 3,
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
});
|
|
@@ -9,9 +9,9 @@ export function initState(fnCtx: import("./CloudImageEditorBlock.js").CloudImage
|
|
|
9
9
|
'*imageSize': null;
|
|
10
10
|
/** @type {import('./types.js').Transformations} */
|
|
11
11
|
'*editorTransformations': import("./types.js").Transformations;
|
|
12
|
-
/** @type {import('./types.js').CropPresetList} */
|
|
13
12
|
'*cropPresetList': import("./types.js").CropPresetList;
|
|
14
|
-
'*
|
|
13
|
+
'*currentAspectRatio': null;
|
|
14
|
+
'*tabList': ("crop" | "tuning" | "filters")[];
|
|
15
15
|
'*tabId': "crop";
|
|
16
16
|
entry: null;
|
|
17
17
|
extension: null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["state.js"],"names":[],"mappings":"AAQA,gFAAgF;AAChF,iCADY,OAAO,4BAA4B,EAAE,qBAAqB;;;;;;;;IAUlE,mDAAmD;8BAAxC,OAAO,YAAY,EAAE,eAAe;
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["state.js"],"names":[],"mappings":"AAQA,gFAAgF;AAChF,iCADY,OAAO,4BAA4B,EAAE,qBAAqB;;;;;;;;IAUlE,mDAAmD;8BAAxC,OAAO,YAAY,EAAE,eAAe;uBAEjB,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;IAmCjE,oEAAoE;mCAAxD,OAAO,YAAY,EAAE,eAAe;;EAoCnD"}
|
|
@@ -18,8 +18,8 @@ export function initState(fnCtx) {
|
|
|
18
18
|
'*imageSize': null,
|
|
19
19
|
/** @type {import('./types.js').Transformations} */
|
|
20
20
|
'*editorTransformations': {},
|
|
21
|
-
/** @type {import('./types.js').CropPresetList} */
|
|
22
|
-
'*
|
|
21
|
+
'*cropPresetList': /** @type {import('./types.js').CropPresetList} */ ([]),
|
|
22
|
+
'*currentAspectRatio': /** @type {import('./types.js').CropPresetList[0] | null} */ null,
|
|
23
23
|
'*tabList': ALL_TABS,
|
|
24
24
|
'*tabId': TabId.CROP,
|
|
25
25
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const _default: "<svg width='0' height='0' style='position:absolute'><symbol viewBox='0 0 20 20' id='uc-icon-brightness' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M15 10a5 5 0 0 1-5 5m5-5a5 5 0 0 0-5-5m5 5h-5m0 5a5 5 0 0 1 0-10m0 10V5m0 15v-3M2.93 2.929 5.05 5.05M0 10h3m-.07 7.071 2.12-2.121M10 0v3m7.07 14.071-2.12-2.121M20 10h-3m.07-7.071L14.95 5.05m-.626 2.45H10m4.324 5H10'/></symbol><symbol fill='currentColor' viewBox='0 0 20 20' id='uc-icon-closeMax' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' d='M8.232 10 3.585 5.353l1.768-1.768L10 8.232l4.648-4.647 1.767 1.768L11.768 10l4.647 4.648-1.767 1.767L10 11.768l-4.647 4.647-1.768-1.767L8.232 10Z' clip-rule='evenodd'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-contrast' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M2 10a8 8 0 1 0 16 0 8 8 0 1 0-16 0m8-8v16m8-8h-8m7.598 2.5H10m6.24 2.5H10m7.6-7.5H10M16.242 5H10'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-crop' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M20 14H7.005C6.45 14 6 13.55 6 12.995V0M0 6h13.067c.515 0 .933.418.933.933V20M14.5.4 13 2l1.5 1.6M13 2h2a3 3 0 0 1 3 3v2M5.5 19.6 7 18l-1.5-1.6M7 18H5a3 3 0 0 1-3-3v-2'/></symbol><symbol fill='currentColor' viewBox='0 0 20 20' id='uc-icon-done' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' d='m18.057 6.333-9.365 9.125a1.25 1.25 0 0 1-1.768-.023L1.92 10.296l1.791-1.744 4.132 4.243 8.47-8.253 1.744 1.79Z' clip-rule='evenodd'/></symbol><symbol fill='currentColor' viewBox='0 0 25 24' id='uc-icon-edit-file' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' d='M18.558 2.804a.78.78 0 0 0-.557.235l-.008.007-2.472 2.46 3.847 3.848 2.46-2.473.004-.003a.78.78 0 0 0 0-1.108l-.004-.003-2.712-2.728a.78.78 0 0 0-.558-.235Zm-.248 7.613-3.852-3.852-8.93 8.887-1.516 5.41 5.41-1.515 8.888-8.93Zm-.636-8.934a2.28 2.28 0 0 1 2.512.505l2.702 2.717.002.002a2.278 2.278 0 0 1 0 3.234l-.002.002-12.541 12.602a.75.75 0 0 1-.33.193l-6.884 1.928a.75.75 0 0 1-.925-.924l1.928-6.885a.75.75 0 0 1 .193-.33l12.603-12.54a2.28 2.28 0 0 1 .742-.504Z' clip-rule='evenodd'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-enhance' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M19 13h-2m0 0a4 4 0 0 1-4-4m4 4a4 4 0 0 0-4 4m0-8V7m0 2a4 4 0 0 1-4 4m-2 0h2m0 0a4 4 0 0 1 4 4m0 0v2M8 8.5H6.5m0 0a2 2 0 0 1-2-2m2 2a2 2 0 0 0-2 2m0-4V5m0 1.5a2 2 0 0 1-2 2M1 8.5h1.5m0 0a2 2 0 0 1 2 2m0 0V12M12 3h-1m0 0a1 1 0 0 1-1-1m1 1a1 1 0 0 0-1 1m0-2V1m0 1a1 1 0 0 1-1 1M8 3h1m0 0a1 1 0 0 1 1 1m0 0v1'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-exposure' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M10 20v-3M2.93 2.929 5.05 5.05M0 10h3m-.07 7.071 2.12-2.121M10 0v3m7.07 14.071-2.12-2.121M20 10h-3m.07-7.071L14.95 5.05M5 10a5 5 0 1 0 10 0 5 5 0 1 0-10 0'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-filters' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M4.5 6.5a5.5 5.5 0 1 0 11 0 5.5 5.5 0 1 0-11 0m-3.5 6a5.5 5.5 0 1 0 11 0 5.5 5.5 0 1 0-11 0m7 0a5.5 5.5 0 1 0 11 0 5.5 5.5 0 1 0-11 0'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-flip' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M19.6 5 18 3.5 16.4 5m3.2 10L18 16.5 16.4 15M18 3.523v12.954M3.3 8.5h10.654c.301 0 .415-.395.159-.554L3.459 1.286A.3.3 0 0 0 3 1.542V8.2a.3.3 0 0 0 .3.3zm0 3h10.654c.301 0 .415.395.159.554l-10.654 6.66A.3.3 0 0 1 3 18.458v-6.66a.3.3 0 0 1 .3-.3z'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-gamma' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M17 3C9 6 2.5 11.5 2.5 17.5m0 0h1m-1 0v-1m14 1h1m-3 0h1m-3 0h1m-3 0h1m-3 0h1m-3 0h1m-3 0h1m-3-14v-1m0 3v-1m0 3v-1m0 3v-1m0 3v-1m0 3v-1m0 3v-1'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-mirror' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M5 .4 3.5 2 5 3.6M15 .4 16.5 2 15 3.6M3.52 2h12.957M8.5 16.7V6.046c0-.301-.394-.415-.554-.159L1.287 16.541a.3.3 0 0 0 .255.459H8.2a.3.3 0 0 0 .3-.3zm3 0V6.046c0-.301.395-.415.555-.159l6.659 10.654a.3.3 0 0 1-.255.459H11.8a.3.3 0 0 1-.3-.3z'/></symbol><symbol viewBox='0 0 40 40' id='uc-icon-original' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.5' d='M0 40 40 0'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-rotate' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M13.5.4 12 2l1.5 1.6M12.023 2H14.4A3.6 3.6 0 0 1 18 5.6V8M4 17h9a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1z'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-sad' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M2 17c4.418-4 11.582-4 16 0M16.5 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-11 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-saturation' xmlns='http://www.w3.org/2000/svg'><defs><linearGradient id='puc-icon-id__a' x1='10.001' y1='1' x2='10.001' y2='19' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient></defs><circle cx='10.001' cy='10' r='9' transform='rotate(90 10 10)' fill='url(#puc-icon-id__a)'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-slider' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M0 10h11m0 0a2 2 0 1 0 4 0m-4 0a2 2 0 1 1 4 0m0 0h5'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-tuning' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M8 10h11M1 10h4M1 4.5h11m3 0h4m-18 11h11m3 0h4m-7-11a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0M5 10a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0m7 5.5a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-vibrance' xmlns='http://www.w3.org/2000/svg'><path d='M2.125 5.64A8.96 8.96 0 0 0 1.001 10a8.96 8.96 0 0 0 1.124 4.36V5.64z' fill='url(#suc-icon-id__a)'/><path d='M2.875 15.499V4.502a9.053 9.053 0 0 1 1.75-1.72v14.437a9.05 9.05 0 0 1-1.75-1.72z' fill='url(#suc-icon-id__b)'/><path d='M5.375 17.722c.548.33 1.134.601 1.75.809V1.469a8.956 8.956 0 0 0-1.75.81v15.443z' fill='url(#suc-icon-id__c)'/><path d='M7.875 1.253v17.495c.564.136 1.15.22 1.75.244V1.008a9 9 0 0 0-1.75.245z' fill='url(#suc-icon-id__d)'/><path d='M10.375 1.008v17.984a9 9 0 0 0 1.75-.244V1.252a9 9 0 0 0-1.75-.244z' fill='url(#suc-icon-id__e)'/><path d='M12.875 1.469V18.53a8.957 8.957 0 0 0 1.75-.808V2.277a8.957 8.957 0 0 0-1.75-.808z' fill='url(#suc-icon-id__f)'/><path d='M15.375 2.78v14.44a9.053 9.053 0 0 0 1.75-1.72v-11a9.054 9.054 0 0 0-1.75-1.72z' fill='url(#suc-icon-id__g)'/><path d='M17.875 5.638v8.724A8.959 8.959 0 0 0 19.001 10a8.96 8.96 0 0 0-1.126-4.362z' fill='url(#suc-icon-id__h)'/><defs><linearGradient id='suc-icon-id__a' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='suc-icon-id__b' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='suc-icon-id__c' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='suc-icon-id__d' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='suc-icon-id__e' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='suc-icon-id__f' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='suc-icon-id__g' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='suc-icon-id__h' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient></defs></symbol><symbol viewBox='0 0 20 20' id='uc-icon-warmth' xmlns='http://www.w3.org/2000/svg'><path d='m7.5 13.05.429.42.171-.175v-.244h-.6zm5 0h-.6v.245l.172.175.428-.42zM8.1 3.5c0-1.05.85-1.9 1.9-1.9V.4a3.1 3.1 0 0 0-3.1 3.1h1.2zm0 9.55V3.5H6.9v9.55h1.2zm-1 2.45c0-.79.315-1.506.829-2.03l-.858-.84A4.088 4.088 0 0 0 5.9 15.5h1.2zm2.9 2.9a2.9 2.9 0 0 1-2.9-2.9H5.9a4.1 4.1 0 0 0 4.1 4.1v-1.2zm2.9-2.9a2.9 2.9 0 0 1-2.9 2.9v1.2a4.1 4.1 0 0 0 4.1-4.1h-1.2zm-.829-2.03c.514.524.829 1.24.829 2.03h1.2c0-1.117-.447-2.13-1.171-2.87l-.858.84zM11.9 3.5v9.55h1.2V3.5h-1.2zM10 1.6c1.05 0 1.9.85 1.9 1.9h1.2A3.1 3.1 0 0 0 10 .4v1.2z' fill='currentColor'/><path d='M10 14V8' stroke='currentColor' stroke-width='1.2' stroke-linecap='round'/><path d='M14 3h3m-3 3h3m-3 3h3m-8 6.5a1 1 0 1 0 2 0 1 1 0 1 0-2 0' stroke='currentColor' stroke-width='1.2'/></symbol></svg>";
|
|
1
|
+
declare const _default: "<svg width='0' height='0' style='position:absolute'><symbol viewBox='0 0 24 24' id='uc-icon-aspect-ratio' xmlns='http://www.w3.org/2000/svg'/><symbol viewBox='0 0 20 20' id='uc-icon-brightness' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M15 10a5 5 0 0 1-5 5m5-5a5 5 0 0 0-5-5m5 5h-5m0 5a5 5 0 0 1 0-10m0 10V5m0 15v-3M2.93 2.929 5.05 5.05M0 10h3m-.07 7.071 2.12-2.121M10 0v3m7.07 14.071-2.12-2.121M20 10h-3m.07-7.071L14.95 5.05m-.626 2.45H10m4.324 5H10'/></symbol><symbol fill='currentColor' viewBox='0 0 20 20' id='uc-icon-closeMax' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' d='M8.232 10 3.585 5.353l1.768-1.768L10 8.232l4.648-4.647 1.767 1.768L11.768 10l4.647 4.648-1.767 1.767L10 11.768l-4.647 4.647-1.768-1.767L8.232 10Z' clip-rule='evenodd'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-contrast' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M2 10a8 8 0 1 0 16 0 8 8 0 1 0-16 0m8-8v16m8-8h-8m7.598 2.5H10m6.24 2.5H10m7.6-7.5H10M16.242 5H10'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-crop' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M20 14H7.005C6.45 14 6 13.55 6 12.995V0M0 6h13.067c.515 0 .933.418.933.933V20M14.5.4 13 2l1.5 1.6M13 2h2a3 3 0 0 1 3 3v2M5.5 19.6 7 18l-1.5-1.6M7 18H5a3 3 0 0 1-3-3v-2'/></symbol><symbol fill='currentColor' viewBox='0 0 20 20' id='uc-icon-done' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' d='m18.057 6.333-9.365 9.125a1.25 1.25 0 0 1-1.768-.023L1.92 10.296l1.791-1.744 4.132 4.243 8.47-8.253 1.744 1.79Z' clip-rule='evenodd'/></symbol><symbol fill='currentColor' viewBox='0 0 25 24' id='uc-icon-edit-file' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' d='M18.558 2.804a.78.78 0 0 0-.557.235l-.008.007-2.472 2.46 3.847 3.848 2.46-2.473.004-.003a.78.78 0 0 0 0-1.108l-.004-.003-2.712-2.728a.78.78 0 0 0-.558-.235Zm-.248 7.613-3.852-3.852-8.93 8.887-1.516 5.41 5.41-1.515 8.888-8.93Zm-.636-8.934a2.28 2.28 0 0 1 2.512.505l2.702 2.717.002.002a2.278 2.278 0 0 1 0 3.234l-.002.002-12.541 12.602a.75.75 0 0 1-.33.193l-6.884 1.928a.75.75 0 0 1-.925-.924l1.928-6.885a.75.75 0 0 1 .193-.33l12.603-12.54a2.28 2.28 0 0 1 .742-.504Z' clip-rule='evenodd'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-enhance' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M19 13h-2m0 0a4 4 0 0 1-4-4m4 4a4 4 0 0 0-4 4m0-8V7m0 2a4 4 0 0 1-4 4m-2 0h2m0 0a4 4 0 0 1 4 4m0 0v2M8 8.5H6.5m0 0a2 2 0 0 1-2-2m2 2a2 2 0 0 0-2 2m0-4V5m0 1.5a2 2 0 0 1-2 2M1 8.5h1.5m0 0a2 2 0 0 1 2 2m0 0V12M12 3h-1m0 0a1 1 0 0 1-1-1m1 1a1 1 0 0 0-1 1m0-2V1m0 1a1 1 0 0 1-1 1M8 3h1m0 0a1 1 0 0 1 1 1m0 0v1'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-exposure' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M10 20v-3M2.93 2.929 5.05 5.05M0 10h3m-.07 7.071 2.12-2.121M10 0v3m7.07 14.071-2.12-2.121M20 10h-3m.07-7.071L14.95 5.05M5 10a5 5 0 1 0 10 0 5 5 0 1 0-10 0'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-filters' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M4.5 6.5a5.5 5.5 0 1 0 11 0 5.5 5.5 0 1 0-11 0m-3.5 6a5.5 5.5 0 1 0 11 0 5.5 5.5 0 1 0-11 0m7 0a5.5 5.5 0 1 0 11 0 5.5 5.5 0 1 0-11 0'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-flip' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M19.6 5 18 3.5 16.4 5m3.2 10L18 16.5 16.4 15M18 3.523v12.954M3.3 8.5h10.654c.301 0 .415-.395.159-.554L3.459 1.286A.3.3 0 0 0 3 1.542V8.2a.3.3 0 0 0 .3.3zm0 3h10.654c.301 0 .415.395.159.554l-10.654 6.66A.3.3 0 0 1 3 18.458v-6.66a.3.3 0 0 1 .3-.3z'/></symbol><symbol fill='none' viewBox='0 0 24 24' id='uc-icon-freeform' xmlns='http://www.w3.org/2000/svg'><path d='M7.395 22.5H2.454v-5.25m14.824 5.25h4.94v-5.25m0-10.5V1.5h-4.94m-9.883 0H2.454v5.25' stroke='currentColor'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-gamma' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M17 3C9 6 2.5 11.5 2.5 17.5m0 0h1m-1 0v-1m14 1h1m-3 0h1m-3 0h1m-3 0h1m-3 0h1m-3 0h1m-3 0h1m-3-14v-1m0 3v-1m0 3v-1m0 3v-1m0 3v-1m0 3v-1m0 3v-1'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-mirror' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M5 .4 3.5 2 5 3.6M15 .4 16.5 2 15 3.6M3.52 2h12.957M8.5 16.7V6.046c0-.301-.394-.415-.554-.159L1.287 16.541a.3.3 0 0 0 .255.459H8.2a.3.3 0 0 0 .3-.3zm3 0V6.046c0-.301.395-.415.555-.159l6.659 10.654a.3.3 0 0 1-.255.459H11.8a.3.3 0 0 1-.3-.3z'/></symbol><symbol viewBox='0 0 40 40' id='uc-icon-original' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.5' d='M0 40 40 0'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-rotate' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M13.5.4 12 2l1.5 1.6M12.023 2H14.4A3.6 3.6 0 0 1 18 5.6V8M4 17h9a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1z'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-sad' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M2 17c4.418-4 11.582-4 16 0M16.5 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-11 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-saturation' xmlns='http://www.w3.org/2000/svg'><defs><linearGradient id='ruc-icon-id__a' x1='10.001' y1='1' x2='10.001' y2='19' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient></defs><circle cx='10.001' cy='10' r='9' transform='rotate(90 10 10)' fill='url(#ruc-icon-id__a)'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-slider' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M0 10h11m0 0a2 2 0 1 0 4 0m-4 0a2 2 0 1 1 4 0m0 0h5'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-tuning' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M8 10h11M1 10h4M1 4.5h11m3 0h4m-18 11h11m3 0h4m-7-11a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0M5 10a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0m7 5.5a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-vibrance' xmlns='http://www.w3.org/2000/svg'><path d='M2.125 5.64A8.96 8.96 0 0 0 1.001 10a8.96 8.96 0 0 0 1.124 4.36V5.64z' fill='url(#uuc-icon-id__a)'/><path d='M2.875 15.499V4.502a9.053 9.053 0 0 1 1.75-1.72v14.437a9.05 9.05 0 0 1-1.75-1.72z' fill='url(#uuc-icon-id__b)'/><path d='M5.375 17.722c.548.33 1.134.601 1.75.809V1.469a8.956 8.956 0 0 0-1.75.81v15.443z' fill='url(#uuc-icon-id__c)'/><path d='M7.875 1.253v17.495c.564.136 1.15.22 1.75.244V1.008a9 9 0 0 0-1.75.245z' fill='url(#uuc-icon-id__d)'/><path d='M10.375 1.008v17.984a9 9 0 0 0 1.75-.244V1.252a9 9 0 0 0-1.75-.244z' fill='url(#uuc-icon-id__e)'/><path d='M12.875 1.469V18.53a8.957 8.957 0 0 0 1.75-.808V2.277a8.957 8.957 0 0 0-1.75-.808z' fill='url(#uuc-icon-id__f)'/><path d='M15.375 2.78v14.44a9.053 9.053 0 0 0 1.75-1.72v-11a9.054 9.054 0 0 0-1.75-1.72z' fill='url(#uuc-icon-id__g)'/><path d='M17.875 5.638v8.724A8.959 8.959 0 0 0 19.001 10a8.96 8.96 0 0 0-1.126-4.362z' fill='url(#uuc-icon-id__h)'/><defs><linearGradient id='uuc-icon-id__a' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__b' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__c' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__d' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__e' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__f' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__g' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__h' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient></defs></symbol><symbol viewBox='0 0 20 20' id='uc-icon-warmth' xmlns='http://www.w3.org/2000/svg'><path d='m7.5 13.05.429.42.171-.175v-.244h-.6zm5 0h-.6v.245l.172.175.428-.42zM8.1 3.5c0-1.05.85-1.9 1.9-1.9V.4a3.1 3.1 0 0 0-3.1 3.1h1.2zm0 9.55V3.5H6.9v9.55h1.2zm-1 2.45c0-.79.315-1.506.829-2.03l-.858-.84A4.088 4.088 0 0 0 5.9 15.5h1.2zm2.9 2.9a2.9 2.9 0 0 1-2.9-2.9H5.9a4.1 4.1 0 0 0 4.1 4.1v-1.2zm2.9-2.9a2.9 2.9 0 0 1-2.9 2.9v1.2a4.1 4.1 0 0 0 4.1-4.1h-1.2zm-.829-2.03c.514.524.829 1.24.829 2.03h1.2c0-1.117-.447-2.13-1.171-2.87l-.858.84zM11.9 3.5v9.55h1.2V3.5h-1.2zM10 1.6c1.05 0 1.9.85 1.9 1.9h1.2A3.1 3.1 0 0 0 10 .4v1.2z' fill='currentColor'/><path d='M10 14V8' stroke='currentColor' stroke-width='1.2' stroke-linecap='round'/><path d='M14 3h3m-3 3h3m-3 3h3m-8 6.5a1 1 0 1 0 2 0 1 1 0 1 0-2 0' stroke='currentColor' stroke-width='1.2'/></symbol></svg>";
|
|
2
2
|
export default _default;
|
|
3
3
|
//# sourceMappingURL=svg-sprite.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svg-sprite.d.ts","sourceRoot":"","sources":["svg-sprite.js"],"names":[],"mappings":"wBAAe
|
|
1
|
+
{"version":3,"file":"svg-sprite.d.ts","sourceRoot":"","sources":["svg-sprite.js"],"names":[],"mappings":"wBAAe,wyWAAwyW"}
|