@solostylist/image-editor 1.0.9 → 1.0.11
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/lib/actions/add-filter.js +11 -1
- package/lib/actions/change-pointer-icon.js +10 -1
- package/lib/actions/change-rotation.js +13 -1
- package/lib/actions/clear-annotations-selections.js +10 -1
- package/lib/actions/duplicate-annotations.js +26 -1
- package/lib/actions/enable-text-content-edit.js +10 -1
- package/lib/actions/hide-loader.js +10 -1
- package/lib/actions/index.js +36 -1
- package/lib/actions/redo.js +27 -1
- package/lib/actions/remove-annotations.js +27 -1
- package/lib/actions/reset.js +26 -1
- package/lib/actions/select-annotation.js +27 -1
- package/lib/actions/select-tab.js +16 -1
- package/lib/actions/select-tool.js +11 -1
- package/lib/actions/set-annotation.js +28 -1
- package/lib/actions/set-canvas-size.js +31 -1
- package/lib/actions/set-crop.js +25 -1
- package/lib/actions/set-feedback.js +11 -1
- package/lib/actions/set-finetune.js +13 -1
- package/lib/actions/set-latest-color.js +10 -1
- package/lib/actions/set-original-image.js +13 -1
- package/lib/actions/set-resize.js +14 -1
- package/lib/actions/set-saved.js +10 -1
- package/lib/actions/set-saving.js +11 -1
- package/lib/actions/set-show-tabs-menu.js +10 -1
- package/lib/actions/set-shown-image-dimensions.js +12 -1
- package/lib/actions/show-loader.js +10 -1
- package/lib/actions/toggle-flip.js +13 -1
- package/lib/actions/toggle-original-image-display.js +10 -1
- package/lib/actions/undo.js +27 -1
- package/lib/actions/update-state.js +7 -1
- package/lib/actions/zoom-canvas.js +37 -1
- package/lib/components/app/index.js +283 -1
- package/lib/components/assembly-point/index.js +23 -1
- package/lib/components/common/annotation-options/annotation-options.constants.js +10 -1
- package/lib/components/common/annotation-options/index.js +140 -1
- package/lib/components/common/annotation-options/opacity-field.js +23 -1
- package/lib/components/common/annotation-options/position-fields.js +39 -1
- package/lib/components/common/annotation-options/shadow-fields.js +62 -1
- package/lib/components/common/annotation-options/stroke-fields.js +33 -1
- package/lib/components/common/button-with-menu/index.js +86 -1
- package/lib/components/common/color-input/index.js +101 -1
- package/lib/components/common/color-picker-modal/index.js +70 -1
- package/lib/components/common/hidden-upload-input/index.js +17 -1
- package/lib/components/common/icon-wrapper/index.js +40 -1
- package/lib/components/common/image-preview-tile/index.js +57 -1
- package/lib/components/common/slider/index.js +38 -1
- package/lib/components/feedback-popup/index.js +41 -1
- package/lib/components/layers/design-layer/annotation-nodes/annotation-nodes.constants.js +10 -1
- package/lib/components/layers/design-layer/annotation-nodes/arrow-node.js +62 -1
- package/lib/components/layers/design-layer/annotation-nodes/ellipse-node.js +64 -1
- package/lib/components/layers/design-layer/annotation-nodes/image-node.js +78 -1
- package/lib/components/layers/design-layer/annotation-nodes/index.js +22 -1
- package/lib/components/layers/design-layer/annotation-nodes/line-node.js +60 -1
- package/lib/components/layers/design-layer/annotation-nodes/memoized-annotation.js +16 -1
- package/lib/components/layers/design-layer/annotation-nodes/polygon-node.js +63 -1
- package/lib/components/layers/design-layer/annotation-nodes/rect-node.js +65 -1
- package/lib/components/layers/design-layer/annotation-nodes/text-node.js +80 -1
- package/lib/components/layers/design-layer/index.js +202 -1
- package/lib/components/layers/design-layer/nodes-common-prop-types.js +16 -1
- package/lib/components/layers/design-layer/preview-group.js +9 -1
- package/lib/components/layers/index.js +2 -1
- package/lib/components/layers/transformers-layer/crop-transformer.js +248 -1
- package/lib/components/layers/transformers-layer/index.js +16 -1
- package/lib/components/layers/transformers-layer/nodes-transformer.js +73 -1
- package/lib/components/layers/transformers-layer/transformers-layer.utils.js +93 -1
- package/lib/components/main-canvas/canvas-node.js +177 -1
- package/lib/components/main-canvas/index.js +51 -1
- package/lib/components/main-canvas/touch-zooming-events.js +69 -1
- package/lib/components/node-controls/index.js +79 -1
- package/lib/components/tabs/index.js +66 -1
- package/lib/components/tabs/tabs.constants.js +27 -1
- package/lib/components/tabs-drawer/index.js +109 -1
- package/lib/components/tools/arrow/arrow-button.js +17 -1
- package/lib/components/tools/arrow/arrow-options.js +19 -1
- package/lib/components/tools/arrow/index.js +2 -1
- package/lib/components/tools/blur/blur-options.js +35 -1
- package/lib/components/tools/blur/blur.js +17 -1
- package/lib/components/tools/blur/index.js +2 -1
- package/lib/components/tools/brightness/brightness-options.js +36 -1
- package/lib/components/tools/brightness/brightness.js +17 -1
- package/lib/components/tools/brightness/index.js +2 -1
- package/lib/components/tools/contrast/contrast-options.js +35 -1
- package/lib/components/tools/contrast/contrast.js +17 -1
- package/lib/components/tools/contrast/index.js +2 -1
- package/lib/components/tools/crop/crop.constants.js +31 -1
- package/lib/components/tools/crop/crop.js +122 -1
- package/lib/components/tools/crop/index.js +1 -1
- package/lib/components/tools/ellipse/ellipse-button.js +17 -1
- package/lib/components/tools/ellipse/ellipse-options.js +17 -1
- package/lib/components/tools/ellipse/index.js +2 -1
- package/lib/components/tools/filters/filter-item.js +77 -1
- package/lib/components/tools/filters/filters.constants.js +139 -1
- package/lib/components/tools/filters/filters.js +74 -1
- package/lib/components/tools/filters/index.js +1 -1
- package/lib/components/tools/flip/flip-x.js +48 -1
- package/lib/components/tools/flip/flip-y.js +50 -1
- package/lib/components/tools/flip/index.js +2 -1
- package/lib/components/tools/hsv/hsv.js +17 -1
- package/lib/components/tools/hsv/hsvoptions.js +60 -1
- package/lib/components/tools/hsv/index.js +2 -1
- package/lib/components/tools/image/image-button.js +17 -1
- package/lib/components/tools/image/image-controls.js +12 -1
- package/lib/components/tools/image/image-options.js +162 -1
- package/lib/components/tools/image/images-gallery.js +55 -1
- package/lib/components/tools/image/index.js +2 -1
- package/lib/components/tools/line/index.js +2 -1
- package/lib/components/tools/line/line-button.js +17 -1
- package/lib/components/tools/line/line-options.js +19 -1
- package/lib/components/tools/pen/index.js +2 -1
- package/lib/components/tools/pen/pen-button.js +17 -1
- package/lib/components/tools/pen/pen-options.js +120 -1
- package/lib/components/tools/polygon/index.js +2 -1
- package/lib/components/tools/polygon/polygon-button.js +17 -1
- package/lib/components/tools/polygon/polygon-options.js +22 -1
- package/lib/components/tools/polygon/polygon-sides-field.js +23 -1
- package/lib/components/tools/polygon/polygon.constants.js +10 -1
- package/lib/components/tools/rect/index.js +2 -1
- package/lib/components/tools/rect/rect-button.js +17 -1
- package/lib/components/tools/rect/rect-corner-field.js +24 -1
- package/lib/components/tools/rect/rect-options.js +21 -1
- package/lib/components/tools/rect/rect.constants.js +10 -1
- package/lib/components/tools/resize/index.js +1 -1
- package/lib/components/tools/resize/resize.js +141 -1
- package/lib/components/tools/rotate/index.js +2 -1
- package/lib/components/tools/rotate/rotate-button.js +17 -1
- package/lib/components/tools/rotate/rotate-options.js +97 -1
- package/lib/components/tools/text/index.js +2 -1
- package/lib/components/tools/text/text-button.js +17 -1
- package/lib/components/tools/text/text-options/handle-text-change-area.js +122 -1
- package/lib/components/tools/text/text-options/index.js +17 -1
- package/lib/components/tools/text/text-options/text-alignment-fields.js +38 -1
- package/lib/components/tools/text/text-options/text-controls.js +147 -1
- package/lib/components/tools/text/text-options/text-options.constants.js +16 -1
- package/lib/components/tools/text/text-options/text-spacings-fields.js +34 -1
- package/lib/components/tools/tools.constants.js +98 -1
- package/lib/components/tools/warmth/index.js +2 -1
- package/lib/components/tools/warmth/warmth-options.js +35 -1
- package/lib/components/tools/warmth/warmth.js +17 -1
- package/lib/components/tools/watermark/index.js +1 -1
- package/lib/components/tools/watermark/watermark-padding.js +59 -1
- package/lib/components/tools/watermark/watermark.js +221 -1
- package/lib/components/tools/watermark/watermarks-gallery.js +77 -1
- package/lib/components/tools-bar/index.js +113 -1
- package/lib/components/tools-bar/tools-bar-item-button.js +39 -1
- package/lib/components/topbar/canvas-zooming.js +119 -1
- package/lib/components/topbar/confirmation-modal.js +53 -1
- package/lib/components/topbar/image-dimensions-and-display-toggle.js +68 -1
- package/lib/components/topbar/index.js +47 -1
- package/lib/components/topbar/redo-button.js +25 -1
- package/lib/components/topbar/reset-button.js +21 -1
- package/lib/components/topbar/save-button.js +251 -1
- package/lib/components/topbar/topbar.constants.js +31 -1
- package/lib/components/topbar/undo-button.js +27 -1
- package/lib/context/app-context.js +3 -1
- package/lib/context/app-provider-overriden-value.js +9 -1
- package/lib/context/app-provider.js +48 -1
- package/lib/context/app-reducer.js +5 -1
- package/lib/context/default-config.js +75 -1
- package/lib/context/default-translations.js +115 -1
- package/lib/context/get-initial-app-state.js +61 -1
- package/lib/context/index.js +4 -1
- package/lib/custom/filters/aden.js +8 -1
- package/lib/custom/filters/amaro.js +8 -1
- package/lib/custom/filters/ashby.js +8 -1
- package/lib/custom/filters/base-filters.js +82 -1
- package/lib/custom/filters/black-and-white.js +11 -1
- package/lib/custom/filters/brannan.js +8 -1
- package/lib/custom/filters/brooklyn.js +8 -1
- package/lib/custom/filters/charmes.js +8 -1
- package/lib/custom/filters/clarendon.js +9 -1
- package/lib/custom/filters/crema.js +8 -1
- package/lib/custom/filters/dogpatch.js +8 -1
- package/lib/custom/filters/earlybird.js +7 -1
- package/lib/custom/filters/gingham.js +8 -1
- package/lib/custom/filters/ginza.js +8 -1
- package/lib/custom/filters/hefe.js +8 -1
- package/lib/custom/filters/helena.js +8 -1
- package/lib/custom/filters/hudson.js +9 -1
- package/lib/custom/filters/index.js +40 -1
- package/lib/custom/filters/juno.js +8 -1
- package/lib/custom/filters/kelvin.js +9 -1
- package/lib/custom/filters/lark.js +9 -1
- package/lib/custom/filters/lo-fi.js +8 -1
- package/lib/custom/filters/ludwig.js +8 -1
- package/lib/custom/filters/maven.js +9 -1
- package/lib/custom/filters/mayfair.js +8 -1
- package/lib/custom/filters/moon.js +7 -1
- package/lib/custom/filters/nashville.js +8 -1
- package/lib/custom/filters/ninteen-seventy-seven.js +8 -1
- package/lib/custom/filters/perpetua.js +7 -1
- package/lib/custom/filters/reyes.js +9 -1
- package/lib/custom/filters/rise.js +9 -1
- package/lib/custom/filters/sierra.js +8 -1
- package/lib/custom/filters/skyline.js +8 -1
- package/lib/custom/filters/slumber.js +8 -1
- package/lib/custom/filters/stinson.js +8 -1
- package/lib/custom/filters/sutro.js +8 -1
- package/lib/custom/filters/toaster.js +8 -1
- package/lib/custom/filters/valencia.js +9 -1
- package/lib/custom/filters/vesper.js +9 -1
- package/lib/custom/filters/walden.js +8 -1
- package/lib/custom/filters/willow.js +8 -1
- package/lib/custom/filters/xpro2.js +9 -1
- package/lib/custom/finetunes/custom-threshold.js +19 -1
- package/lib/custom/finetunes/index.js +2 -1
- package/lib/custom/finetunes/warmth.js +15 -1
- package/lib/demo/app.js +175 -1
- package/lib/demo/index.js +1 -1
- package/lib/hooks/index.js +12 -1
- package/lib/hooks/use-annotation/get-bounding-rect-un-scaled.js +14 -1
- package/lib/hooks/use-annotation/get-new-annotation-preview.js +83 -1
- package/lib/hooks/use-annotation/index.js +138 -1
- package/lib/hooks/use-annotation/preview-then-call-annotation-adding.js +159 -1
- package/lib/hooks/use-annotation-events.js +83 -1
- package/lib/hooks/use-app-reducer.js +53 -1
- package/lib/hooks/use-debounced-callback.js +7 -1
- package/lib/hooks/use-drag.js +37 -1
- package/lib/hooks/use-filter.js +20 -1
- package/lib/hooks/use-finetune.js +31 -1
- package/lib/hooks/use-phone-screen.js +5 -1
- package/lib/hooks/use-popover.js +27 -1
- package/lib/hooks/use-resize-observer.js +60 -1
- package/lib/hooks/use-store.js +6 -1
- package/lib/hooks/use-transformed-img-data.js +156 -1
- package/lib/hooks/use-update-effect.js +18 -1
- package/lib/index.js +4 -1
- package/lib/types/actions.js +31 -1
- package/lib/types/annotations.js +42 -1
- package/lib/types/common.js +1 -1
- package/lib/types/config.js +34 -1
- package/lib/types/index.js +5 -1
- package/lib/types/state.js +1 -1
- package/lib/utils/assign-finetune-names-to-konva.js +7 -1
- package/lib/utils/calculate-zoom-data.js +36 -1
- package/lib/utils/compare-ratios.js +5 -1
- package/lib/utils/constants.js +84 -1
- package/lib/utils/crop-image.js +10 -1
- package/lib/utils/debounce.js +19 -1
- package/lib/utils/deep-merge.js +26 -1
- package/lib/utils/extract-current-design-state.js +15 -1
- package/lib/utils/extract-name-from-url.js +5 -1
- package/lib/utils/filter-str-to-class.js +9 -1
- package/lib/utils/finetunes-strs-to-classes.js +13 -1
- package/lib/utils/get-center-rotated-point.js +34 -1
- package/lib/utils/get-default-save-quality.js +5 -1
- package/lib/utils/get-dimensions-minimal-ratio.js +6 -1
- package/lib/utils/get-elem-document-coords.js +24 -1
- package/lib/utils/get-file-full-name.js +21 -1
- package/lib/utils/get-pointer-offset-position-bounded-to-object.js +26 -1
- package/lib/utils/get-proper-dimensions.js +21 -1
- package/lib/utils/get-proper-image-to-canvas-spacing.js +6 -1
- package/lib/utils/get-scroll-offset.js +13 -1
- package/lib/utils/get-size-after-rotation.js +31 -1
- package/lib/utils/get-zoom-fit-factor.js +5 -1
- package/lib/utils/image-to-base64.js +12 -1
- package/lib/utils/is-default-zero-values-only.js +6 -1
- package/lib/utils/is-same-image.js +4 -1
- package/lib/utils/load-image.js +19 -1
- package/lib/utils/map-crop-box.js +16 -1
- package/lib/utils/map-number.js +4 -1
- package/lib/utils/map-position-string-to-point.js +92 -1
- package/lib/utils/random-id.js +5 -1
- package/lib/utils/restrict-number.js +7 -1
- package/lib/utils/serialize-design-state.js +62 -1
- package/lib/utils/to-precised-float.js +5 -1
- package/lib/utils/translator.js +14 -1
- package/package.json +1 -1
- package/lib/actions/add-filter.d.ts +0 -10
- package/lib/actions/add-filter.d.ts.map +0 -1
- package/lib/actions/change-pointer-icon.d.ts +0 -6
- package/lib/actions/change-pointer-icon.d.ts.map +0 -1
- package/lib/actions/change-rotation.d.ts +0 -6
- package/lib/actions/change-rotation.d.ts.map +0 -1
- package/lib/actions/clear-annotations-selections.d.ts +0 -5
- package/lib/actions/clear-annotations-selections.d.ts.map +0 -1
- package/lib/actions/duplicate-annotations.d.ts +0 -9
- package/lib/actions/duplicate-annotations.d.ts.map +0 -1
- package/lib/actions/enable-text-content-edit.d.ts +0 -8
- package/lib/actions/enable-text-content-edit.d.ts.map +0 -1
- package/lib/actions/hide-loader.d.ts +0 -5
- package/lib/actions/hide-loader.d.ts.map +0 -1
- package/lib/actions/index.d.ts +0 -40
- package/lib/actions/index.d.ts.map +0 -1
- package/lib/actions/redo.d.ts +0 -5
- package/lib/actions/redo.d.ts.map +0 -1
- package/lib/actions/remove-annotations.d.ts +0 -9
- package/lib/actions/remove-annotations.d.ts.map +0 -1
- package/lib/actions/reset.d.ts +0 -8
- package/lib/actions/reset.d.ts.map +0 -1
- package/lib/actions/select-annotation.d.ts +0 -6
- package/lib/actions/select-annotation.d.ts.map +0 -1
- package/lib/actions/select-tab.d.ts +0 -6
- package/lib/actions/select-tab.d.ts.map +0 -1
- package/lib/actions/select-tool.d.ts +0 -9
- package/lib/actions/select-tool.d.ts.map +0 -1
- package/lib/actions/set-annotation.d.ts +0 -10
- package/lib/actions/set-annotation.d.ts.map +0 -1
- package/lib/actions/set-canvas-size.d.ts +0 -6
- package/lib/actions/set-canvas-size.d.ts.map +0 -1
- package/lib/actions/set-crop.d.ts +0 -9
- package/lib/actions/set-crop.d.ts.map +0 -1
- package/lib/actions/set-feedback.d.ts +0 -6
- package/lib/actions/set-feedback.d.ts.map +0 -1
- package/lib/actions/set-finetune.d.ts +0 -11
- package/lib/actions/set-finetune.d.ts.map +0 -1
- package/lib/actions/set-latest-color.d.ts +0 -6
- package/lib/actions/set-latest-color.d.ts.map +0 -1
- package/lib/actions/set-original-image.d.ts +0 -6
- package/lib/actions/set-original-image.d.ts.map +0 -1
- package/lib/actions/set-resize.d.ts +0 -9
- package/lib/actions/set-resize.d.ts.map +0 -1
- package/lib/actions/set-saved.d.ts +0 -5
- package/lib/actions/set-saved.d.ts.map +0 -1
- package/lib/actions/set-saving.d.ts +0 -6
- package/lib/actions/set-saving.d.ts.map +0 -1
- package/lib/actions/set-show-tabs-menu.d.ts +0 -8
- package/lib/actions/set-show-tabs-menu.d.ts.map +0 -1
- package/lib/actions/set-shown-image-dimensions.d.ts +0 -13
- package/lib/actions/set-shown-image-dimensions.d.ts.map +0 -1
- package/lib/actions/show-loader.d.ts +0 -5
- package/lib/actions/show-loader.d.ts.map +0 -1
- package/lib/actions/toggle-flip.d.ts +0 -9
- package/lib/actions/toggle-flip.d.ts.map +0 -1
- package/lib/actions/toggle-original-image-display.d.ts +0 -8
- package/lib/actions/toggle-original-image-display.d.ts.map +0 -1
- package/lib/actions/undo.d.ts +0 -5
- package/lib/actions/undo.d.ts.map +0 -1
- package/lib/actions/update-state.d.ts +0 -7
- package/lib/actions/update-state.d.ts.map +0 -1
- package/lib/actions/zoom-canvas.d.ts +0 -10
- package/lib/actions/zoom-canvas.d.ts.map +0 -1
- package/lib/components/app/index.d.ts +0 -3
- package/lib/components/app/index.d.ts.map +0 -1
- package/lib/components/assembly-point/index.d.ts +0 -9
- package/lib/components/assembly-point/index.d.ts.map +0 -1
- package/lib/components/common/annotation-options/annotation-options.constants.d.ts +0 -9
- package/lib/components/common/annotation-options/annotation-options.constants.d.ts.map +0 -1
- package/lib/components/common/annotation-options/index.d.ts +0 -21
- package/lib/components/common/annotation-options/index.d.ts.map +0 -1
- package/lib/components/common/annotation-options/opacity-field.d.ts +0 -10
- package/lib/components/common/annotation-options/opacity-field.d.ts.map +0 -1
- package/lib/components/common/annotation-options/position-fields.d.ts +0 -8
- package/lib/components/common/annotation-options/position-fields.d.ts.map +0 -1
- package/lib/components/common/annotation-options/shadow-fields.d.ts +0 -9
- package/lib/components/common/annotation-options/shadow-fields.d.ts.map +0 -1
- package/lib/components/common/annotation-options/stroke-fields.d.ts +0 -9
- package/lib/components/common/annotation-options/stroke-fields.d.ts.map +0 -1
- package/lib/components/common/button-with-menu/index.d.ts +0 -16
- package/lib/components/common/button-with-menu/index.d.ts.map +0 -1
- package/lib/components/common/color-input/index.d.ts +0 -8
- package/lib/components/common/color-input/index.d.ts.map +0 -1
- package/lib/components/common/color-picker-modal/index.d.ts +0 -10
- package/lib/components/common/color-picker-modal/index.d.ts.map +0 -1
- package/lib/components/common/hidden-upload-input/index.d.ts +0 -3
- package/lib/components/common/hidden-upload-input/index.d.ts.map +0 -1
- package/lib/components/common/icon-wrapper/index.d.ts +0 -16
- package/lib/components/common/icon-wrapper/index.d.ts.map +0 -1
- package/lib/components/common/image-preview-tile/index.d.ts +0 -14
- package/lib/components/common/image-preview-tile/index.d.ts.map +0 -1
- package/lib/components/common/slider/index.d.ts +0 -12
- package/lib/components/common/slider/index.d.ts.map +0 -1
- package/lib/components/feedback-popup/index.d.ts +0 -8
- package/lib/components/feedback-popup/index.d.ts.map +0 -1
- package/lib/components/layers/design-layer/annotation-nodes/annotation-nodes.constants.d.ts +0 -11
- package/lib/components/layers/design-layer/annotation-nodes/annotation-nodes.constants.d.ts.map +0 -1
- package/lib/components/layers/design-layer/annotation-nodes/arrow-node.d.ts +0 -15
- package/lib/components/layers/design-layer/annotation-nodes/arrow-node.d.ts.map +0 -1
- package/lib/components/layers/design-layer/annotation-nodes/ellipse-node.d.ts +0 -14
- package/lib/components/layers/design-layer/annotation-nodes/ellipse-node.d.ts.map +0 -1
- package/lib/components/layers/design-layer/annotation-nodes/image-node.d.ts +0 -14
- package/lib/components/layers/design-layer/annotation-nodes/image-node.d.ts.map +0 -1
- package/lib/components/layers/design-layer/annotation-nodes/index.d.ts +0 -3
- package/lib/components/layers/design-layer/annotation-nodes/index.d.ts.map +0 -1
- package/lib/components/layers/design-layer/annotation-nodes/line-node.d.ts +0 -12
- package/lib/components/layers/design-layer/annotation-nodes/line-node.d.ts.map +0 -1
- package/lib/components/layers/design-layer/annotation-nodes/memoized-annotation.d.ts +0 -11
- package/lib/components/layers/design-layer/annotation-nodes/memoized-annotation.d.ts.map +0 -1
- package/lib/components/layers/design-layer/annotation-nodes/polygon-node.d.ts +0 -15
- package/lib/components/layers/design-layer/annotation-nodes/polygon-node.d.ts.map +0 -1
- package/lib/components/layers/design-layer/annotation-nodes/rect-node.d.ts +0 -16
- package/lib/components/layers/design-layer/annotation-nodes/rect-node.d.ts.map +0 -1
- package/lib/components/layers/design-layer/annotation-nodes/text-node.d.ts +0 -21
- package/lib/components/layers/design-layer/annotation-nodes/text-node.d.ts.map +0 -1
- package/lib/components/layers/design-layer/index.d.ts +0 -3
- package/lib/components/layers/design-layer/index.d.ts.map +0 -1
- package/lib/components/layers/design-layer/nodes-common-prop-types.d.ts +0 -45
- package/lib/components/layers/design-layer/nodes-common-prop-types.d.ts.map +0 -1
- package/lib/components/layers/design-layer/preview-group.d.ts +0 -3
- package/lib/components/layers/design-layer/preview-group.d.ts.map +0 -1
- package/lib/components/layers/index.d.ts +0 -3
- package/lib/components/layers/index.d.ts.map +0 -1
- package/lib/components/layers/transformers-layer/crop-transformer.d.ts +0 -3
- package/lib/components/layers/transformers-layer/crop-transformer.d.ts.map +0 -1
- package/lib/components/layers/transformers-layer/index.d.ts +0 -3
- package/lib/components/layers/transformers-layer/index.d.ts.map +0 -1
- package/lib/components/layers/transformers-layer/nodes-transformer.d.ts +0 -3
- package/lib/components/layers/transformers-layer/nodes-transformer.d.ts.map +0 -1
- package/lib/components/layers/transformers-layer/transformers-layer.utils.d.ts +0 -42
- package/lib/components/layers/transformers-layer/transformers-layer.utils.d.ts.map +0 -1
- package/lib/components/main-canvas/canvas-node.d.ts +0 -6
- package/lib/components/main-canvas/canvas-node.d.ts.map +0 -1
- package/lib/components/main-canvas/index.d.ts +0 -3
- package/lib/components/main-canvas/index.d.ts.map +0 -1
- package/lib/components/main-canvas/touch-zooming-events.d.ts +0 -11
- package/lib/components/main-canvas/touch-zooming-events.d.ts.map +0 -1
- package/lib/components/node-controls/index.d.ts +0 -3
- package/lib/components/node-controls/index.d.ts.map +0 -1
- package/lib/components/tabs/index.d.ts +0 -6
- package/lib/components/tabs/index.d.ts.map +0 -1
- package/lib/components/tabs/tabs.constants.d.ts +0 -9
- package/lib/components/tabs/tabs.constants.d.ts.map +0 -1
- package/lib/components/tabs-drawer/index.d.ts +0 -6
- package/lib/components/tabs-drawer/index.d.ts.map +0 -1
- package/lib/components/tools/arrow/arrow-button.d.ts +0 -8
- package/lib/components/tools/arrow/arrow-button.d.ts.map +0 -1
- package/lib/components/tools/arrow/arrow-options.d.ts +0 -4
- package/lib/components/tools/arrow/arrow-options.d.ts.map +0 -1
- package/lib/components/tools/arrow/index.d.ts +0 -3
- package/lib/components/tools/arrow/index.d.ts.map +0 -1
- package/lib/components/tools/blur/blur-options.d.ts +0 -6
- package/lib/components/tools/blur/blur-options.d.ts.map +0 -1
- package/lib/components/tools/blur/blur.d.ts +0 -8
- package/lib/components/tools/blur/blur.d.ts.map +0 -1
- package/lib/components/tools/blur/index.d.ts +0 -3
- package/lib/components/tools/blur/index.d.ts.map +0 -1
- package/lib/components/tools/brightness/brightness-options.d.ts +0 -6
- package/lib/components/tools/brightness/brightness-options.d.ts.map +0 -1
- package/lib/components/tools/brightness/brightness.d.ts +0 -8
- package/lib/components/tools/brightness/brightness.d.ts.map +0 -1
- package/lib/components/tools/brightness/index.d.ts +0 -3
- package/lib/components/tools/brightness/index.d.ts.map +0 -1
- package/lib/components/tools/contrast/contrast-options.d.ts +0 -6
- package/lib/components/tools/contrast/contrast-options.d.ts.map +0 -1
- package/lib/components/tools/contrast/contrast.d.ts +0 -8
- package/lib/components/tools/contrast/contrast.d.ts.map +0 -1
- package/lib/components/tools/contrast/index.d.ts +0 -3
- package/lib/components/tools/contrast/index.d.ts.map +0 -1
- package/lib/components/tools/crop/crop.constants.d.ts +0 -15
- package/lib/components/tools/crop/crop.constants.d.ts.map +0 -1
- package/lib/components/tools/crop/crop.d.ts +0 -7
- package/lib/components/tools/crop/crop.d.ts.map +0 -1
- package/lib/components/tools/crop/index.d.ts +0 -2
- package/lib/components/tools/crop/index.d.ts.map +0 -1
- package/lib/components/tools/ellipse/ellipse-button.d.ts +0 -8
- package/lib/components/tools/ellipse/ellipse-button.d.ts.map +0 -1
- package/lib/components/tools/ellipse/ellipse-options.d.ts +0 -4
- package/lib/components/tools/ellipse/ellipse-options.d.ts.map +0 -1
- package/lib/components/tools/ellipse/index.d.ts +0 -3
- package/lib/components/tools/ellipse/index.d.ts.map +0 -1
- package/lib/components/tools/filters/filter-item.d.ts +0 -10
- package/lib/components/tools/filters/filter-item.d.ts.map +0 -1
- package/lib/components/tools/filters/filters.constants.d.ts +0 -8
- package/lib/components/tools/filters/filters.constants.d.ts.map +0 -1
- package/lib/components/tools/filters/filters.d.ts +0 -3
- package/lib/components/tools/filters/filters.d.ts.map +0 -1
- package/lib/components/tools/filters/index.d.ts +0 -2
- package/lib/components/tools/filters/index.d.ts.map +0 -1
- package/lib/components/tools/flip/flip-x.d.ts +0 -8
- package/lib/components/tools/flip/flip-x.d.ts.map +0 -1
- package/lib/components/tools/flip/flip-y.d.ts +0 -8
- package/lib/components/tools/flip/flip-y.d.ts.map +0 -1
- package/lib/components/tools/flip/index.d.ts +0 -3
- package/lib/components/tools/flip/index.d.ts.map +0 -1
- package/lib/components/tools/hsv/hsv.d.ts +0 -8
- package/lib/components/tools/hsv/hsv.d.ts.map +0 -1
- package/lib/components/tools/hsv/hsvoptions.d.ts +0 -6
- package/lib/components/tools/hsv/hsvoptions.d.ts.map +0 -1
- package/lib/components/tools/hsv/index.d.ts +0 -3
- package/lib/components/tools/hsv/index.d.ts.map +0 -1
- package/lib/components/tools/image/image-button.d.ts +0 -8
- package/lib/components/tools/image/image-button.d.ts.map +0 -1
- package/lib/components/tools/image/image-controls.d.ts +0 -13
- package/lib/components/tools/image/image-controls.d.ts.map +0 -1
- package/lib/components/tools/image/image-options.d.ts +0 -3
- package/lib/components/tools/image/image-options.d.ts.map +0 -1
- package/lib/components/tools/image/images-gallery.d.ts +0 -14
- package/lib/components/tools/image/images-gallery.d.ts.map +0 -1
- package/lib/components/tools/image/index.d.ts +0 -3
- package/lib/components/tools/image/index.d.ts.map +0 -1
- package/lib/components/tools/line/index.d.ts +0 -3
- package/lib/components/tools/line/index.d.ts.map +0 -1
- package/lib/components/tools/line/line-button.d.ts +0 -8
- package/lib/components/tools/line/line-button.d.ts.map +0 -1
- package/lib/components/tools/line/line-options.d.ts +0 -4
- package/lib/components/tools/line/line-options.d.ts.map +0 -1
- package/lib/components/tools/pen/index.d.ts +0 -3
- package/lib/components/tools/pen/index.d.ts.map +0 -1
- package/lib/components/tools/pen/pen-button.d.ts +0 -8
- package/lib/components/tools/pen/pen-button.d.ts.map +0 -1
- package/lib/components/tools/pen/pen-options.d.ts +0 -3
- package/lib/components/tools/pen/pen-options.d.ts.map +0 -1
- package/lib/components/tools/polygon/index.d.ts +0 -3
- package/lib/components/tools/polygon/index.d.ts.map +0 -1
- package/lib/components/tools/polygon/polygon-button.d.ts +0 -8
- package/lib/components/tools/polygon/polygon-button.d.ts.map +0 -1
- package/lib/components/tools/polygon/polygon-options.d.ts +0 -4
- package/lib/components/tools/polygon/polygon-options.d.ts.map +0 -1
- package/lib/components/tools/polygon/polygon-sides-field.d.ts +0 -9
- package/lib/components/tools/polygon/polygon-sides-field.d.ts.map +0 -1
- package/lib/components/tools/polygon/polygon.constants.d.ts +0 -12
- package/lib/components/tools/polygon/polygon.constants.d.ts.map +0 -1
- package/lib/components/tools/rect/index.d.ts +0 -3
- package/lib/components/tools/rect/index.d.ts.map +0 -1
- package/lib/components/tools/rect/rect-button.d.ts +0 -8
- package/lib/components/tools/rect/rect-button.d.ts.map +0 -1
- package/lib/components/tools/rect/rect-corner-field.d.ts +0 -9
- package/lib/components/tools/rect/rect-corner-field.d.ts.map +0 -1
- package/lib/components/tools/rect/rect-options.d.ts +0 -4
- package/lib/components/tools/rect/rect-options.d.ts.map +0 -1
- package/lib/components/tools/rect/rect.constants.d.ts +0 -12
- package/lib/components/tools/rect/rect.constants.d.ts.map +0 -1
- package/lib/components/tools/resize/index.d.ts +0 -2
- package/lib/components/tools/resize/index.d.ts.map +0 -1
- package/lib/components/tools/resize/resize.d.ts +0 -13
- package/lib/components/tools/resize/resize.d.ts.map +0 -1
- package/lib/components/tools/rotate/index.d.ts +0 -3
- package/lib/components/tools/rotate/index.d.ts.map +0 -1
- package/lib/components/tools/rotate/rotate-button.d.ts +0 -8
- package/lib/components/tools/rotate/rotate-button.d.ts.map +0 -1
- package/lib/components/tools/rotate/rotate-options.d.ts +0 -3
- package/lib/components/tools/rotate/rotate-options.d.ts.map +0 -1
- package/lib/components/tools/text/index.d.ts +0 -3
- package/lib/components/tools/text/index.d.ts.map +0 -1
- package/lib/components/tools/text/text-button.d.ts +0 -8
- package/lib/components/tools/text/text-button.d.ts.map +0 -1
- package/lib/components/tools/text/text-options/handle-text-change-area.d.ts +0 -4
- package/lib/components/tools/text/text-options/handle-text-change-area.d.ts.map +0 -1
- package/lib/components/tools/text/text-options/index.d.ts +0 -4
- package/lib/components/tools/text/text-options/index.d.ts.map +0 -1
- package/lib/components/tools/text/text-options/text-alignment-fields.d.ts +0 -9
- package/lib/components/tools/text/text-options/text-alignment-fields.d.ts.map +0 -1
- package/lib/components/tools/text/text-options/text-controls.d.ts +0 -12
- package/lib/components/tools/text/text-options/text-controls.d.ts.map +0 -1
- package/lib/components/tools/text/text-options/text-options.constants.d.ts +0 -14
- package/lib/components/tools/text/text-options/text-options.constants.d.ts.map +0 -1
- package/lib/components/tools/text/text-options/text-spacings-fields.d.ts +0 -10
- package/lib/components/tools/text/text-options/text-spacings-fields.d.ts.map +0 -1
- package/lib/components/tools/tools.constants.d.ts +0 -9
- package/lib/components/tools/tools.constants.d.ts.map +0 -1
- package/lib/components/tools/warmth/index.d.ts +0 -3
- package/lib/components/tools/warmth/index.d.ts.map +0 -1
- package/lib/components/tools/warmth/warmth-options.d.ts +0 -7
- package/lib/components/tools/warmth/warmth-options.d.ts.map +0 -1
- package/lib/components/tools/warmth/warmth.d.ts +0 -8
- package/lib/components/tools/warmth/warmth.d.ts.map +0 -1
- package/lib/components/tools/watermark/index.d.ts +0 -2
- package/lib/components/tools/watermark/index.d.ts.map +0 -1
- package/lib/components/tools/watermark/watermark-padding.d.ts +0 -8
- package/lib/components/tools/watermark/watermark-padding.d.ts.map +0 -1
- package/lib/components/tools/watermark/watermark.d.ts +0 -3
- package/lib/components/tools/watermark/watermark.d.ts.map +0 -1
- package/lib/components/tools/watermark/watermarks-gallery.d.ts +0 -7
- package/lib/components/tools/watermark/watermarks-gallery.d.ts.map +0 -1
- package/lib/components/tools-bar/index.d.ts +0 -3
- package/lib/components/tools-bar/index.d.ts.map +0 -1
- package/lib/components/tools-bar/tools-bar-item-button.d.ts +0 -23
- package/lib/components/tools-bar/tools-bar-item-button.d.ts.map +0 -1
- package/lib/components/topbar/canvas-zooming.d.ts +0 -3
- package/lib/components/topbar/canvas-zooming.d.ts.map +0 -1
- package/lib/components/topbar/confirmation-modal.d.ts +0 -8
- package/lib/components/topbar/confirmation-modal.d.ts.map +0 -1
- package/lib/components/topbar/image-dimensions-and-display-toggle.d.ts +0 -3
- package/lib/components/topbar/image-dimensions-and-display-toggle.d.ts.map +0 -1
- package/lib/components/topbar/index.d.ts +0 -7
- package/lib/components/topbar/index.d.ts.map +0 -1
- package/lib/components/topbar/redo-button.d.ts +0 -3
- package/lib/components/topbar/redo-button.d.ts.map +0 -1
- package/lib/components/topbar/reset-button.d.ts +0 -3
- package/lib/components/topbar/reset-button.d.ts.map +0 -1
- package/lib/components/topbar/save-button.d.ts +0 -3
- package/lib/components/topbar/save-button.d.ts.map +0 -1
- package/lib/components/topbar/topbar.constants.d.ts +0 -8
- package/lib/components/topbar/topbar.constants.d.ts.map +0 -1
- package/lib/components/topbar/undo-button.d.ts +0 -3
- package/lib/components/topbar/undo-button.d.ts.map +0 -1
- package/lib/context/app-context.d.ts +0 -14
- package/lib/context/app-context.d.ts.map +0 -1
- package/lib/context/app-provider-overriden-value.d.ts +0 -11
- package/lib/context/app-provider-overriden-value.d.ts.map +0 -1
- package/lib/context/app-provider.d.ts +0 -10
- package/lib/context/app-provider.d.ts.map +0 -1
- package/lib/context/app-reducer.d.ts +0 -5
- package/lib/context/app-reducer.d.ts.map +0 -1
- package/lib/context/default-config.d.ts +0 -4
- package/lib/context/default-config.d.ts.map +0 -1
- package/lib/context/default-translations.d.ts +0 -3
- package/lib/context/default-translations.d.ts.map +0 -1
- package/lib/context/get-initial-app-state.d.ts +0 -5
- package/lib/context/get-initial-app-state.d.ts.map +0 -1
- package/lib/context/index.d.ts +0 -5
- package/lib/context/index.d.ts.map +0 -1
- package/lib/custom/filters/aden.d.ts +0 -14
- package/lib/custom/filters/aden.d.ts.map +0 -1
- package/lib/custom/filters/amaro.d.ts +0 -14
- package/lib/custom/filters/amaro.d.ts.map +0 -1
- package/lib/custom/filters/ashby.d.ts +0 -14
- package/lib/custom/filters/ashby.d.ts.map +0 -1
- package/lib/custom/filters/base-filters.d.ts +0 -14
- package/lib/custom/filters/base-filters.d.ts.map +0 -1
- package/lib/custom/filters/black-and-white.d.ts +0 -14
- package/lib/custom/filters/black-and-white.d.ts.map +0 -1
- package/lib/custom/filters/brannan.d.ts +0 -14
- package/lib/custom/filters/brannan.d.ts.map +0 -1
- package/lib/custom/filters/brooklyn.d.ts +0 -14
- package/lib/custom/filters/brooklyn.d.ts.map +0 -1
- package/lib/custom/filters/charmes.d.ts +0 -14
- package/lib/custom/filters/charmes.d.ts.map +0 -1
- package/lib/custom/filters/clarendon.d.ts +0 -14
- package/lib/custom/filters/clarendon.d.ts.map +0 -1
- package/lib/custom/filters/crema.d.ts +0 -14
- package/lib/custom/filters/crema.d.ts.map +0 -1
- package/lib/custom/filters/dogpatch.d.ts +0 -14
- package/lib/custom/filters/dogpatch.d.ts.map +0 -1
- package/lib/custom/filters/earlybird.d.ts +0 -14
- package/lib/custom/filters/earlybird.d.ts.map +0 -1
- package/lib/custom/filters/gingham.d.ts +0 -14
- package/lib/custom/filters/gingham.d.ts.map +0 -1
- package/lib/custom/filters/ginza.d.ts +0 -14
- package/lib/custom/filters/ginza.d.ts.map +0 -1
- package/lib/custom/filters/hefe.d.ts +0 -14
- package/lib/custom/filters/hefe.d.ts.map +0 -1
- package/lib/custom/filters/helena.d.ts +0 -14
- package/lib/custom/filters/helena.d.ts.map +0 -1
- package/lib/custom/filters/hudson.d.ts +0 -14
- package/lib/custom/filters/hudson.d.ts.map +0 -1
- package/lib/custom/filters/index.d.ts +0 -41
- package/lib/custom/filters/index.d.ts.map +0 -1
- package/lib/custom/filters/juno.d.ts +0 -14
- package/lib/custom/filters/juno.d.ts.map +0 -1
- package/lib/custom/filters/kelvin.d.ts +0 -14
- package/lib/custom/filters/kelvin.d.ts.map +0 -1
- package/lib/custom/filters/lark.d.ts +0 -14
- package/lib/custom/filters/lark.d.ts.map +0 -1
- package/lib/custom/filters/lo-fi.d.ts +0 -14
- package/lib/custom/filters/lo-fi.d.ts.map +0 -1
- package/lib/custom/filters/ludwig.d.ts +0 -14
- package/lib/custom/filters/ludwig.d.ts.map +0 -1
- package/lib/custom/filters/maven.d.ts +0 -14
- package/lib/custom/filters/maven.d.ts.map +0 -1
- package/lib/custom/filters/mayfair.d.ts +0 -14
- package/lib/custom/filters/mayfair.d.ts.map +0 -1
- package/lib/custom/filters/moon.d.ts +0 -14
- package/lib/custom/filters/moon.d.ts.map +0 -1
- package/lib/custom/filters/nashville.d.ts +0 -14
- package/lib/custom/filters/nashville.d.ts.map +0 -1
- package/lib/custom/filters/ninteen-seventy-seven.d.ts +0 -14
- package/lib/custom/filters/ninteen-seventy-seven.d.ts.map +0 -1
- package/lib/custom/filters/perpetua.d.ts +0 -14
- package/lib/custom/filters/perpetua.d.ts.map +0 -1
- package/lib/custom/filters/reyes.d.ts +0 -14
- package/lib/custom/filters/reyes.d.ts.map +0 -1
- package/lib/custom/filters/rise.d.ts +0 -14
- package/lib/custom/filters/rise.d.ts.map +0 -1
- package/lib/custom/filters/sierra.d.ts +0 -14
- package/lib/custom/filters/sierra.d.ts.map +0 -1
- package/lib/custom/filters/skyline.d.ts +0 -14
- package/lib/custom/filters/skyline.d.ts.map +0 -1
- package/lib/custom/filters/slumber.d.ts +0 -14
- package/lib/custom/filters/slumber.d.ts.map +0 -1
- package/lib/custom/filters/stinson.d.ts +0 -14
- package/lib/custom/filters/stinson.d.ts.map +0 -1
- package/lib/custom/filters/sutro.d.ts +0 -14
- package/lib/custom/filters/sutro.d.ts.map +0 -1
- package/lib/custom/filters/toaster.d.ts +0 -14
- package/lib/custom/filters/toaster.d.ts.map +0 -1
- package/lib/custom/filters/valencia.d.ts +0 -14
- package/lib/custom/filters/valencia.d.ts.map +0 -1
- package/lib/custom/filters/vesper.d.ts +0 -14
- package/lib/custom/filters/vesper.d.ts.map +0 -1
- package/lib/custom/filters/walden.d.ts +0 -14
- package/lib/custom/filters/walden.d.ts.map +0 -1
- package/lib/custom/filters/willow.d.ts +0 -14
- package/lib/custom/filters/willow.d.ts.map +0 -1
- package/lib/custom/filters/xpro2.d.ts +0 -14
- package/lib/custom/filters/xpro2.d.ts.map +0 -1
- package/lib/custom/finetunes/custom-threshold.d.ts +0 -15
- package/lib/custom/finetunes/custom-threshold.d.ts.map +0 -1
- package/lib/custom/finetunes/index.d.ts +0 -3
- package/lib/custom/finetunes/index.d.ts.map +0 -1
- package/lib/custom/finetunes/warmth.d.ts +0 -17
- package/lib/custom/finetunes/warmth.d.ts.map +0 -1
- package/lib/demo/app.d.ts +0 -6
- package/lib/demo/app.d.ts.map +0 -1
- package/lib/demo/index.d.ts +0 -2
- package/lib/demo/index.d.ts.map +0 -1
- package/lib/hooks/index.d.ts +0 -13
- package/lib/hooks/index.d.ts.map +0 -1
- package/lib/hooks/use-annotation/get-bounding-rect-un-scaled.d.ts +0 -19
- package/lib/hooks/use-annotation/get-bounding-rect-un-scaled.d.ts.map +0 -1
- package/lib/hooks/use-annotation/get-new-annotation-preview.d.ts +0 -25
- package/lib/hooks/use-annotation/get-new-annotation-preview.d.ts.map +0 -1
- package/lib/hooks/use-annotation/index.d.ts +0 -74
- package/lib/hooks/use-annotation/index.d.ts.map +0 -1
- package/lib/hooks/use-annotation/preview-then-call-annotation-adding.d.ts +0 -3
- package/lib/hooks/use-annotation/preview-then-call-annotation-adding.d.ts.map +0 -1
- package/lib/hooks/use-annotation-events.d.ts +0 -11
- package/lib/hooks/use-annotation-events.d.ts.map +0 -1
- package/lib/hooks/use-app-reducer.d.ts +0 -13
- package/lib/hooks/use-app-reducer.d.ts.map +0 -1
- package/lib/hooks/use-debounced-callback.d.ts +0 -5
- package/lib/hooks/use-debounced-callback.d.ts.map +0 -1
- package/lib/hooks/use-drag.d.ts +0 -8
- package/lib/hooks/use-drag.d.ts.map +0 -1
- package/lib/hooks/use-filter.d.ts +0 -4
- package/lib/hooks/use-filter.d.ts.map +0 -1
- package/lib/hooks/use-finetune.d.ts +0 -5
- package/lib/hooks/use-finetune.d.ts.map +0 -1
- package/lib/hooks/use-phone-screen.d.ts +0 -3
- package/lib/hooks/use-phone-screen.d.ts.map +0 -1
- package/lib/hooks/use-popover.d.ts +0 -11
- package/lib/hooks/use-popover.d.ts.map +0 -1
- package/lib/hooks/use-resize-observer.d.ts +0 -12
- package/lib/hooks/use-resize-observer.d.ts.map +0 -1
- package/lib/hooks/use-store.d.ts +0 -5
- package/lib/hooks/use-store.d.ts.map +0 -1
- package/lib/hooks/use-transformed-img-data.d.ts +0 -20
- package/lib/hooks/use-transformed-img-data.d.ts.map +0 -1
- package/lib/hooks/use-update-effect.d.ts +0 -5
- package/lib/hooks/use-update-effect.d.ts.map +0 -1
- package/lib/index.d.ts +0 -6
- package/lib/index.d.ts.map +0 -1
- package/lib/types/actions.d.ts +0 -204
- package/lib/types/actions.d.ts.map +0 -1
- package/lib/types/annotations.d.ts +0 -181
- package/lib/types/annotations.d.ts.map +0 -1
- package/lib/types/common.d.ts +0 -31
- package/lib/types/common.d.ts.map +0 -1
- package/lib/types/config.d.ts +0 -144
- package/lib/types/config.d.ts.map +0 -1
- package/lib/types/index.d.ts +0 -6
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/state.d.ts +0 -105
- package/lib/types/state.d.ts.map +0 -1
- package/lib/utils/assign-finetune-names-to-konva.d.ts +0 -3
- package/lib/utils/assign-finetune-names-to-konva.d.ts.map +0 -1
- package/lib/utils/calculate-zoom-data.d.ts +0 -9
- package/lib/utils/calculate-zoom-data.d.ts.map +0 -1
- package/lib/utils/compare-ratios.d.ts +0 -3
- package/lib/utils/compare-ratios.d.ts.map +0 -1
- package/lib/utils/constants.d.ts +0 -85
- package/lib/utils/constants.d.ts.map +0 -1
- package/lib/utils/crop-image.d.ts +0 -10
- package/lib/utils/crop-image.d.ts.map +0 -1
- package/lib/utils/debounce.d.ts +0 -3
- package/lib/utils/debounce.d.ts.map +0 -1
- package/lib/utils/deep-merge.d.ts +0 -3
- package/lib/utils/deep-merge.d.ts.map +0 -1
- package/lib/utils/extract-current-design-state.d.ts +0 -11
- package/lib/utils/extract-current-design-state.d.ts.map +0 -1
- package/lib/utils/extract-name-from-url.d.ts +0 -3
- package/lib/utils/extract-name-from-url.d.ts.map +0 -1
- package/lib/utils/filter-str-to-class.d.ts +0 -4
- package/lib/utils/filter-str-to-class.d.ts.map +0 -1
- package/lib/utils/finetunes-strs-to-classes.d.ts +0 -4
- package/lib/utils/finetunes-strs-to-classes.d.ts.map +0 -1
- package/lib/utils/get-center-rotated-point.d.ts +0 -8
- package/lib/utils/get-center-rotated-point.d.ts.map +0 -1
- package/lib/utils/get-default-save-quality.d.ts +0 -3
- package/lib/utils/get-default-save-quality.d.ts.map +0 -1
- package/lib/utils/get-dimensions-minimal-ratio.d.ts +0 -3
- package/lib/utils/get-dimensions-minimal-ratio.d.ts.map +0 -1
- package/lib/utils/get-elem-document-coords.d.ts +0 -9
- package/lib/utils/get-elem-document-coords.d.ts.map +0 -1
- package/lib/utils/get-file-full-name.d.ts +0 -8
- package/lib/utils/get-file-full-name.d.ts.map +0 -1
- package/lib/utils/get-pointer-offset-position-bounded-to-object.d.ts +0 -21
- package/lib/utils/get-pointer-offset-position-bounded-to-object.d.ts.map +0 -1
- package/lib/utils/get-proper-dimensions.d.ts +0 -11
- package/lib/utils/get-proper-dimensions.d.ts.map +0 -1
- package/lib/utils/get-proper-image-to-canvas-spacing.d.ts +0 -3
- package/lib/utils/get-proper-image-to-canvas-spacing.d.ts.map +0 -1
- package/lib/utils/get-scroll-offset.d.ts +0 -7
- package/lib/utils/get-scroll-offset.d.ts.map +0 -1
- package/lib/utils/get-size-after-rotation.d.ts +0 -9
- package/lib/utils/get-size-after-rotation.d.ts.map +0 -1
- package/lib/utils/get-zoom-fit-factor.d.ts +0 -4
- package/lib/utils/get-zoom-fit-factor.d.ts.map +0 -1
- package/lib/utils/image-to-base64.d.ts +0 -3
- package/lib/utils/image-to-base64.d.ts.map +0 -1
- package/lib/utils/is-default-zero-values-only.d.ts +0 -3
- package/lib/utils/is-default-zero-values-only.d.ts.map +0 -1
- package/lib/utils/is-same-image.d.ts +0 -3
- package/lib/utils/is-same-image.d.ts.map +0 -1
- package/lib/utils/load-image.d.ts +0 -3
- package/lib/utils/load-image.d.ts.map +0 -1
- package/lib/utils/map-crop-box.d.ts +0 -16
- package/lib/utils/map-crop-box.d.ts.map +0 -1
- package/lib/utils/map-number.d.ts +0 -3
- package/lib/utils/map-number.d.ts.map +0 -1
- package/lib/utils/map-position-string-to-point.d.ts +0 -8
- package/lib/utils/map-position-string-to-point.d.ts.map +0 -1
- package/lib/utils/random-id.d.ts +0 -3
- package/lib/utils/random-id.d.ts.map +0 -1
- package/lib/utils/restrict-number.d.ts +0 -3
- package/lib/utils/restrict-number.d.ts.map +0 -1
- package/lib/utils/serialize-design-state.d.ts +0 -27
- package/lib/utils/serialize-design-state.d.ts.map +0 -1
- package/lib/utils/to-precised-float.d.ts +0 -3
- package/lib/utils/to-precised-float.d.ts.map +0 -1
- package/lib/utils/translator.d.ts +0 -3
- package/lib/utils/translator.d.ts.map +0 -1
|
@@ -1 +1,10 @@
|
|
|
1
|
-
import _defineProperty from"@babel/runtime/helpers/defineProperty";
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
export var SHOW_LOADER = 'SHOW_LOADER';
|
|
5
|
+
var showLoader = function showLoader(state) {
|
|
6
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
7
|
+
isLoadingGlobally: true
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
export default showLoader;
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
import _defineProperty from"@babel/runtime/helpers/defineProperty";
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
import { FLIP_DIRECTIONS } from "../utils/constants";
|
|
5
|
+
export var TOGGLE_FLIP = 'TOGGLE_FLIP';
|
|
6
|
+
var toggleFlip = function toggleFlip(state, payload) {
|
|
7
|
+
var flipProperty = payload.direction === FLIP_DIRECTIONS.X ? 'isFlippedX' : 'isFlippedY';
|
|
8
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
9
|
+
isDesignState: !payload.dismissHistory,
|
|
10
|
+
adjustments: _objectSpread(_objectSpread({}, state.adjustments), {}, _defineProperty({}, flipProperty, !state.adjustments[flipProperty]))
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
export default toggleFlip;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
import _defineProperty from"@babel/runtime/helpers/defineProperty";
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
export var TOGGLE_ORIGINAL_IMAGE_DISPLAY = 'TOGGLE_ORIGINAL_IMAGE_DISPLAY';
|
|
5
|
+
var toggleOriginalImageDisplay = function toggleOriginalImageDisplay(state, payload) {
|
|
6
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
7
|
+
isShowOriginalImage: payload.isShow
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
export default toggleOriginalImageDisplay;
|
package/lib/actions/undo.js
CHANGED
|
@@ -1 +1,27 @@
|
|
|
1
|
-
import _defineProperty from
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
|
+
import _toArray from "@babel/runtime/helpers/toArray";
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
7
|
+
import extractCurrentDesignState from "../utils/extract-current-design-state";
|
|
8
|
+
export var UNDO = 'UNDO';
|
|
9
|
+
var undo = function undo(state) {
|
|
10
|
+
if (state.pastDesignStates && state.pastDesignStates.length > 0) {
|
|
11
|
+
var currentDesignState = extractCurrentDesignState(state, false);
|
|
12
|
+
var _state$pastDesignStat = _toArray(state.pastDesignStates),
|
|
13
|
+
presentDesignState = _state$pastDesignStat[0],
|
|
14
|
+
newPastDesignStates = _arrayLikeToArray(_state$pastDesignStat).slice(1);
|
|
15
|
+
var newFutureDesignStates = [currentDesignState].concat(_toConsumableArray(state.futureDesignStates || []));
|
|
16
|
+
return _objectSpread(_objectSpread(_objectSpread({}, state), presentDesignState), {}, {
|
|
17
|
+
selectionsIds: [],
|
|
18
|
+
pastDesignStates: newPastDesignStates,
|
|
19
|
+
futureDesignStates: newFutureDesignStates,
|
|
20
|
+
hasUndo: newPastDesignStates.length > 0,
|
|
21
|
+
hasRedo: true,
|
|
22
|
+
haveNotSavedChanges: newPastDesignStates.length > 0
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return state;
|
|
26
|
+
};
|
|
27
|
+
export default undo;
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
import deepMerge from"utils/deep-merge";
|
|
1
|
+
import deepMerge from "../utils/deep-merge";
|
|
2
|
+
export var UPDATE_STATE = 'UPDATE_STATE';
|
|
3
|
+
var updateState = function updateState(state, payloadObjOrFn) {
|
|
4
|
+
var payload = payloadObjOrFn && typeof payloadObjOrFn === 'function' ? payloadObjOrFn(state) : payloadObjOrFn;
|
|
5
|
+
return payload ? deepMerge(state, payload) : state;
|
|
6
|
+
};
|
|
7
|
+
export default updateState;
|
|
@@ -1 +1,37 @@
|
|
|
1
|
-
import _defineProperty from
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["preparedDimensions"];
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
import calculateZoomData from "../utils/calculate-zoom-data";
|
|
7
|
+
import { DEFAULT_ZOOM_FACTOR } from "../utils/constants";
|
|
8
|
+
import restrictNumber from "../utils/restrict-number";
|
|
9
|
+
export var ZOOM_CANVAS = 'ZOOM_CANVAS';
|
|
10
|
+
var MIN_ZOOM_FACTOR = 0.03;
|
|
11
|
+
var MAX_ZOOM_FACTOR = 60;
|
|
12
|
+
var zoomCanvas = function zoomCanvas(state, payload) {
|
|
13
|
+
var newZoomFactor = restrictNumber(parseFloat(parseFloat(String(payload.factor)).toFixed(2)), MIN_ZOOM_FACTOR, MAX_ZOOM_FACTOR);
|
|
14
|
+
var newZoomData;
|
|
15
|
+
if (payload.preparedDimensions) {
|
|
16
|
+
var _preparedDimensions = payload.preparedDimensions,
|
|
17
|
+
zoomProps = _objectWithoutProperties(payload, _excluded);
|
|
18
|
+
newZoomData = zoomProps;
|
|
19
|
+
} else {
|
|
20
|
+
var _payload$x, _payload$y;
|
|
21
|
+
var newZoomPoint = {
|
|
22
|
+
x: !payload.x && payload.x !== 0 ? state.canvasWidth / 2 : (_payload$x = payload.x) !== null && _payload$x !== void 0 ? _payload$x : state.zoom.x,
|
|
23
|
+
y: !payload.y && payload.y !== 0 ? state.canvasHeight / 2 : (_payload$y = payload.y) !== null && _payload$y !== void 0 ? _payload$y : state.zoom.y
|
|
24
|
+
};
|
|
25
|
+
newZoomData = calculateZoomData(_objectSpread(_objectSpread({}, newZoomPoint), {}, {
|
|
26
|
+
factor: newZoomFactor
|
|
27
|
+
}), payload.isAbsoluteZoom ? {
|
|
28
|
+
factor: DEFAULT_ZOOM_FACTOR,
|
|
29
|
+
x: null,
|
|
30
|
+
y: null
|
|
31
|
+
} : state.zoom, state.canvasWidth, state.canvasHeight);
|
|
32
|
+
}
|
|
33
|
+
return newZoomData.factor === state.zoom.factor && newZoomData.x === state.zoom.x && newZoomData.y === state.zoom.y ? state : _objectSpread(_objectSpread({}, state), {}, {
|
|
34
|
+
zoom: _objectSpread(_objectSpread({}, state.zoom), newZoomData)
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
export default zoomCanvas;
|
|
@@ -1 +1,283 @@
|
|
|
1
|
-
import _typeof from
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
import { SFlexBox } from '@solostylist/ui-kit/core';
|
|
7
|
+
import { memo, useCallback, useEffect, useRef, useState } from 'react';
|
|
8
|
+
import { CircularProgress } from '@mui/material';
|
|
9
|
+
import { HIDE_LOADER, RESET, SET_FEEDBACK, SET_ORIGINAL_IMAGE, SET_SHOWN_TABS_MENU, SHOW_LOADER, UPDATE_STATE } from "../../actions";
|
|
10
|
+
import FeedbackPopup from "../feedback-popup";
|
|
11
|
+
import MainCanvas from "../main-canvas";
|
|
12
|
+
import Tabs from "../tabs";
|
|
13
|
+
import TabsDrawer from "../tabs-drawer";
|
|
14
|
+
import ToolsBar from "../tools-bar";
|
|
15
|
+
import Topbar from "../topbar";
|
|
16
|
+
import { usePhoneScreen, useResizeObserver, useStore, useTransformedImgData } from "../../hooks";
|
|
17
|
+
import useUpdateEffect from "../../hooks/use-update-effect";
|
|
18
|
+
import { ROOT_CONTAINER_CLASS_NAME } from "../../utils/constants";
|
|
19
|
+
import filterStrToClass from "../../utils/filter-str-to-class";
|
|
20
|
+
import finetunesStrsToClasses from "../../utils/finetunes-strs-to-classes";
|
|
21
|
+
import isSameImage from "../../utils/is-same-image";
|
|
22
|
+
import loadImage from "../../utils/load-image";
|
|
23
|
+
var App = function App() {
|
|
24
|
+
var _ref2, _ref3;
|
|
25
|
+
var _useStore = useStore(),
|
|
26
|
+
config = _useStore.config,
|
|
27
|
+
isLoadingGlobally = _useStore.isLoadingGlobally,
|
|
28
|
+
haveNotSavedChanges = _useStore.haveNotSavedChanges,
|
|
29
|
+
dispatch = _useStore.dispatch,
|
|
30
|
+
originalImage = _useStore.originalImage,
|
|
31
|
+
t = _useStore.t,
|
|
32
|
+
_useStore$feedback = _useStore.feedback,
|
|
33
|
+
feedback = _useStore$feedback === void 0 ? {} : _useStore$feedback;
|
|
34
|
+
var loadableDesignState = config.loadableDesignState,
|
|
35
|
+
source = config.source,
|
|
36
|
+
avoidChangesNotSavedAlertOnLeave = config.avoidChangesNotSavedAlertOnLeave,
|
|
37
|
+
defaultSavedImageName = config.defaultSavedImageName,
|
|
38
|
+
observePluginContainerSize = config.observePluginContainerSize,
|
|
39
|
+
showCanvasOnly = config.showCanvasOnly,
|
|
40
|
+
getCurrentImgDataFnRef = config.getCurrentImgDataFnRef,
|
|
41
|
+
updateStateFnRef = config.updateStateFnRef,
|
|
42
|
+
noCrossOrigin = config.noCrossOrigin,
|
|
43
|
+
resetOnImageSourceChange = config.resetOnImageSourceChange;
|
|
44
|
+
var showTabsDrawer = window.matchMedia('(max-width: 760px)').matches;
|
|
45
|
+
var _useResizeObserver = useResizeObserver(),
|
|
46
|
+
_useResizeObserver2 = _slicedToArray(_useResizeObserver, 2),
|
|
47
|
+
observeResize = _useResizeObserver2[0],
|
|
48
|
+
unobserveElement = _useResizeObserver2[1];
|
|
49
|
+
var _useState = useState({
|
|
50
|
+
width: undefined,
|
|
51
|
+
height: undefined
|
|
52
|
+
}),
|
|
53
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
54
|
+
rootSize = _useState2[0],
|
|
55
|
+
setRootSize = _useState2[1];
|
|
56
|
+
var isPhoneScreen = usePhoneScreen();
|
|
57
|
+
var pluginRootRef = useRef(null);
|
|
58
|
+
var imageBeingLoadedSrc = useRef(null);
|
|
59
|
+
var haveNotSavedChangesRef = useRef(haveNotSavedChanges);
|
|
60
|
+
var transformImgFn = useTransformedImgData();
|
|
61
|
+
var setNewOriginalImage = useCallback(function (newOriginalImage) {
|
|
62
|
+
dispatch({
|
|
63
|
+
type: SET_ORIGINAL_IMAGE,
|
|
64
|
+
payload: {
|
|
65
|
+
originalImage: newOriginalImage
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}, []);
|
|
69
|
+
var setError = useCallback(function (newError) {
|
|
70
|
+
dispatch({
|
|
71
|
+
type: SET_FEEDBACK,
|
|
72
|
+
payload: {
|
|
73
|
+
feedback: {
|
|
74
|
+
message: typeof newError === 'string' ? newError : newError.message,
|
|
75
|
+
duration: 0
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}, []);
|
|
80
|
+
var loadAndSetOriginalImage = function loadAndSetOriginalImage(imgToLoad) {
|
|
81
|
+
return new Promise(function (resolve) {
|
|
82
|
+
var imgSrc = imgToLoad instanceof HTMLImageElement ? imgToLoad.src : imgToLoad;
|
|
83
|
+
if (imageBeingLoadedSrc.current === imgSrc || !imgSrc && originalImage || isSameImage(imgSrc, originalImage)) {
|
|
84
|
+
if (!imageBeingLoadedSrc.current) {
|
|
85
|
+
resolve();
|
|
86
|
+
}
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
var triggerResolve = function triggerResolve() {
|
|
90
|
+
imageBeingLoadedSrc.current = null;
|
|
91
|
+
resolve();
|
|
92
|
+
};
|
|
93
|
+
imageBeingLoadedSrc.current = imgSrc;
|
|
94
|
+
setTimeout(function () {
|
|
95
|
+
if (typeof imgToLoad === 'string') {
|
|
96
|
+
loadImage(imgToLoad, defaultSavedImageName, noCrossOrigin).then(setNewOriginalImage)["catch"](setError)["finally"](triggerResolve);
|
|
97
|
+
} else if (imgToLoad instanceof HTMLImageElement) {
|
|
98
|
+
if (!imgToLoad.name && defaultSavedImageName) {
|
|
99
|
+
imgToLoad.name = defaultSavedImageName;
|
|
100
|
+
}
|
|
101
|
+
if (!imgToLoad.complete) {
|
|
102
|
+
imgToLoad.addEventListener('load', function () {
|
|
103
|
+
setNewOriginalImage(imgToLoad);
|
|
104
|
+
triggerResolve();
|
|
105
|
+
});
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
setNewOriginalImage(imgToLoad);
|
|
109
|
+
triggerResolve();
|
|
110
|
+
} else {
|
|
111
|
+
setError(t('invalidImageError'));
|
|
112
|
+
triggerResolve();
|
|
113
|
+
}
|
|
114
|
+
}, 0);
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
var promptDialogIfHasChangeNotSaved = function promptDialogIfHasChangeNotSaved(e) {
|
|
118
|
+
if (haveNotSavedChangesRef.current) {
|
|
119
|
+
e.preventDefault();
|
|
120
|
+
e.returnValue = '';
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
var handleLoading = function handleLoading() {
|
|
124
|
+
var loadingPromisesFn = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {
|
|
125
|
+
return [];
|
|
126
|
+
};
|
|
127
|
+
dispatch({
|
|
128
|
+
type: SHOW_LOADER
|
|
129
|
+
});
|
|
130
|
+
return Promise.all(loadingPromisesFn())["finally"](function () {
|
|
131
|
+
dispatch({
|
|
132
|
+
type: HIDE_LOADER
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
var updateDesignStateWithLoadableOne = function updateDesignStateWithLoadableOne() {
|
|
137
|
+
if (loadableDesignState && Object.keys(loadableDesignState).length > 0) {
|
|
138
|
+
dispatch({
|
|
139
|
+
type: UPDATE_STATE,
|
|
140
|
+
payload: _objectSpread(_objectSpread({}, loadableDesignState), {}, {
|
|
141
|
+
finetunes: finetunesStrsToClasses(loadableDesignState === null || loadableDesignState === void 0 ? void 0 : loadableDesignState.finetunes),
|
|
142
|
+
filter: filterStrToClass(loadableDesignState === null || loadableDesignState === void 0 ? void 0 : loadableDesignState.filter)
|
|
143
|
+
})
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
useUpdateEffect(function () {
|
|
148
|
+
if (source && !isSameImage(source, originalImage)) {
|
|
149
|
+
void handleLoading(function () {
|
|
150
|
+
return [loadAndSetOriginalImage(source)];
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
if (resetOnImageSourceChange) {
|
|
154
|
+
dispatch({
|
|
155
|
+
type: RESET,
|
|
156
|
+
payload: {
|
|
157
|
+
config: config
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
}, [source]);
|
|
162
|
+
useUpdateEffect(function () {
|
|
163
|
+
var newImgSrc = loadableDesignState === null || loadableDesignState === void 0 ? void 0 : loadableDesignState.imgSrc;
|
|
164
|
+
if (newImgSrc && !isSameImage(newImgSrc, originalImage)) {
|
|
165
|
+
void handleLoading(function () {
|
|
166
|
+
return [loadAndSetOriginalImage(newImgSrc).then(updateDesignStateWithLoadableOne)];
|
|
167
|
+
});
|
|
168
|
+
} else {
|
|
169
|
+
updateDesignStateWithLoadableOne();
|
|
170
|
+
}
|
|
171
|
+
}, [loadableDesignState]);
|
|
172
|
+
useEffect(function () {
|
|
173
|
+
if (observePluginContainerSize && pluginRootRef.current) {
|
|
174
|
+
observeResize(pluginRootRef.current.parentNode, function (_ref) {
|
|
175
|
+
var width = _ref.width,
|
|
176
|
+
height = _ref.height;
|
|
177
|
+
return setRootSize({
|
|
178
|
+
width: width,
|
|
179
|
+
height: height
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
return function () {
|
|
184
|
+
if (observePluginContainerSize && pluginRootRef.current) {
|
|
185
|
+
unobserveElement(pluginRootRef.current);
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
}, [observePluginContainerSize, observeResize, unobserveElement]);
|
|
189
|
+
useEffect(function () {
|
|
190
|
+
var initialRequestsPromisesFn = function initialRequestsPromisesFn() {
|
|
191
|
+
return [loadAndSetOriginalImage((loadableDesignState === null || loadableDesignState === void 0 ? void 0 : loadableDesignState.imgSrc) || source)];
|
|
192
|
+
};
|
|
193
|
+
void handleLoading(initialRequestsPromisesFn);
|
|
194
|
+
if (window && !avoidChangesNotSavedAlertOnLeave) {
|
|
195
|
+
window.addEventListener('beforeunload', promptDialogIfHasChangeNotSaved);
|
|
196
|
+
}
|
|
197
|
+
return function () {
|
|
198
|
+
if (window && !avoidChangesNotSavedAlertOnLeave) {
|
|
199
|
+
window.removeEventListener('beforeunload', promptDialogIfHasChangeNotSaved);
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
}, []);
|
|
203
|
+
useEffect(function () {
|
|
204
|
+
if (updateStateFnRef && _typeof(updateStateFnRef) === 'object') {
|
|
205
|
+
updateStateFnRef.current = function (newStatePartObjOrFn) {
|
|
206
|
+
dispatch({
|
|
207
|
+
type: UPDATE_STATE,
|
|
208
|
+
payload: newStatePartObjOrFn
|
|
209
|
+
});
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
}, [updateStateFnRef, dispatch]);
|
|
213
|
+
useEffect(function () {
|
|
214
|
+
if (getCurrentImgDataFnRef && _typeof(getCurrentImgDataFnRef) === 'object') {
|
|
215
|
+
getCurrentImgDataFnRef.current = transformImgFn;
|
|
216
|
+
}
|
|
217
|
+
}, [transformImgFn]);
|
|
218
|
+
useEffect(function () {
|
|
219
|
+
haveNotSavedChangesRef.current = haveNotSavedChanges;
|
|
220
|
+
}, [haveNotSavedChanges]);
|
|
221
|
+
var toggleMainMenu = function toggleMainMenu(open) {
|
|
222
|
+
dispatch({
|
|
223
|
+
type: SET_SHOWN_TABS_MENU,
|
|
224
|
+
payload: {
|
|
225
|
+
opened: open
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
};
|
|
229
|
+
var renderContent = function renderContent() {
|
|
230
|
+
return React.createElement(React.Fragment, null, !showCanvasOnly && React.createElement(React.Fragment, null, showTabsDrawer && React.createElement(TabsDrawer, {
|
|
231
|
+
toggleMainMenu: toggleMainMenu
|
|
232
|
+
}), React.createElement(Topbar, {
|
|
233
|
+
toggleMainMenu: toggleMainMenu
|
|
234
|
+
})), originalImage && feedback.duration !== 0 && React.createElement(SFlexBox, {
|
|
235
|
+
sx: {
|
|
236
|
+
width: '100%',
|
|
237
|
+
flexGrow: 1
|
|
238
|
+
}
|
|
239
|
+
}, !showCanvasOnly && !showTabsDrawer && React.createElement(Tabs, {
|
|
240
|
+
toggleMainMenu: toggleMainMenu
|
|
241
|
+
}), React.createElement(SFlexBox, {
|
|
242
|
+
sx: {
|
|
243
|
+
height: 'calc(100vh - 60px)',
|
|
244
|
+
width: 'calc(100% - 120px)',
|
|
245
|
+
flexGrow: 1,
|
|
246
|
+
flexDirection: 'column',
|
|
247
|
+
minWidth: 0
|
|
248
|
+
}
|
|
249
|
+
}, React.createElement(MainCanvas, null), !showCanvasOnly && React.createElement(ToolsBar, null))));
|
|
250
|
+
};
|
|
251
|
+
return React.createElement(SFlexBox, {
|
|
252
|
+
className: ROOT_CONTAINER_CLASS_NAME,
|
|
253
|
+
"data-phone": isPhoneScreen,
|
|
254
|
+
ref: pluginRootRef,
|
|
255
|
+
sx: {
|
|
256
|
+
backgroundColor: 'background.default',
|
|
257
|
+
flexDirection: 'column',
|
|
258
|
+
alignItems: 'center',
|
|
259
|
+
height: (_ref2 = observePluginContainerSize ? rootSize.height : undefined) !== null && _ref2 !== void 0 ? _ref2 : '100%',
|
|
260
|
+
maxHeight: '100%',
|
|
261
|
+
width: (_ref3 = observePluginContainerSize ? rootSize.width : undefined) !== null && _ref3 !== void 0 ? _ref3 : '100%',
|
|
262
|
+
maxWidth: '100%',
|
|
263
|
+
overflow: showTabsDrawer ? 'unset' : 'auto',
|
|
264
|
+
position: 'relative',
|
|
265
|
+
minHeight: '100vh'
|
|
266
|
+
}
|
|
267
|
+
}, isLoadingGlobally && React.createElement(CircularProgress, {
|
|
268
|
+
sx: {
|
|
269
|
+
position: 'absolute',
|
|
270
|
+
zIndex: 11111,
|
|
271
|
+
top: '50%',
|
|
272
|
+
left: '50%',
|
|
273
|
+
transform: 'translate(-50%, -50%)',
|
|
274
|
+
userSelect: 'none'
|
|
275
|
+
}
|
|
276
|
+
}), renderContent(), React.createElement(FeedbackPopup, {
|
|
277
|
+
anchorOrigin: {
|
|
278
|
+
vertical: 'top',
|
|
279
|
+
horizontal: 'center'
|
|
280
|
+
}
|
|
281
|
+
}));
|
|
282
|
+
};
|
|
283
|
+
export default memo(App);
|
|
@@ -1 +1,23 @@
|
|
|
1
|
-
import React,
|
|
1
|
+
import React, { useEffect, memo } from 'react';
|
|
2
|
+
import { SThemeProvider } from '@solostylist/ui-kit/core';
|
|
3
|
+
import App from "../app";
|
|
4
|
+
import { AppProvider } from "../../context";
|
|
5
|
+
import defaultConfig from "../../context/default-config";
|
|
6
|
+
import deepMerge from "../../utils/deep-merge";
|
|
7
|
+
import assignFinetuneNamesToKonva from "../../utils/assign-finetune-names-to-konva";
|
|
8
|
+
var AssemblyPoint = function AssemblyPoint(props) {
|
|
9
|
+
var source = props.source;
|
|
10
|
+
if (!source || typeof source !== 'string' && !(source instanceof HTMLImageElement)) {
|
|
11
|
+
throw new Error('`source` property is required either a string of image url or a HTMLImageElement for the image that will be edited.');
|
|
12
|
+
}
|
|
13
|
+
useEffect(function () {
|
|
14
|
+
assignFinetuneNamesToKonva();
|
|
15
|
+
}, []);
|
|
16
|
+
var defaultAndProvidedConfigMerged = deepMerge(defaultConfig, props);
|
|
17
|
+
return React.createElement(React.StrictMode, null, React.createElement(SThemeProvider, {
|
|
18
|
+
defaultMode: "dark"
|
|
19
|
+
}, React.createElement(AppProvider, {
|
|
20
|
+
config: defaultAndProvidedConfigMerged
|
|
21
|
+
}, React.createElement(App, null))));
|
|
22
|
+
};
|
|
23
|
+
export default memo(AssemblyPoint);
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
import _defineProperty from"@babel/runtime/helpers/defineProperty";
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import { POSITIONS } from "../../../utils/constants";
|
|
3
|
+
export var AVAILABLE_POSITIONS = Object.values(POSITIONS);
|
|
4
|
+
export var posCssRotateDegFromRightSide = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, POSITIONS.TOP_LEFT, -145), POSITIONS.TOP_CENTER, -90), POSITIONS.TOP_RIGHT, -45), POSITIONS.MIDDLE_LEFT, 180), POSITIONS.MIDDLE_CENTER, 0), POSITIONS.MIDDLE_RIGHT, 0), POSITIONS.BOTTOM_LEFT, 135), POSITIONS.BOTTOM_CENTER, 90), POSITIONS.BOTTOM_RIGHT, 45);
|
|
5
|
+
export var POPPABLE_OPTIONS = {
|
|
6
|
+
OPACITY: 'opacity',
|
|
7
|
+
STROKE: 'stroke',
|
|
8
|
+
SHADOW: 'shadow',
|
|
9
|
+
POSITION: 'position'
|
|
10
|
+
};
|
|
@@ -1 +1,140 @@
|
|
|
1
|
-
import _extends from"@babel/runtime/helpers/extends";
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
4
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
6
|
+
var _excluded = ["children", "morePoppableOptionsPrepended", "moreOptionsPopupComponentsObj", "morePoppableOptionsAppended", "annotation", "updateAnnotation", "hideFillOption", "hidePositionField"];
|
|
7
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
|
+
import { BorderColorOutlined, FlareOutlined, GpsFixedOutlined, OpacityOutlined } from '@mui/icons-material';
|
|
10
|
+
import Box from '@mui/material/Box';
|
|
11
|
+
import Menu from '@mui/material/Menu';
|
|
12
|
+
import Typography from '@mui/material/Typography';
|
|
13
|
+
import { useStore } from "../../../hooks";
|
|
14
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
15
|
+
import { SFlexBox } from '@solostylist/ui-kit/core';
|
|
16
|
+
import ColorInput from "../color-input";
|
|
17
|
+
import SIconButtonWrapper from "../icon-wrapper";
|
|
18
|
+
import { POPPABLE_OPTIONS } from "./annotation-options.constants";
|
|
19
|
+
import OpacityField from "./opacity-field";
|
|
20
|
+
import PositionFields from "./position-fields";
|
|
21
|
+
import ShadowFields from "./shadow-fields";
|
|
22
|
+
import StrokeFields from "./stroke-fields";
|
|
23
|
+
var AnnotationOptions = function AnnotationOptions(_ref) {
|
|
24
|
+
var _ref$children = _ref.children,
|
|
25
|
+
children = _ref$children === void 0 ? undefined : _ref$children,
|
|
26
|
+
_ref$morePoppableOpti = _ref.morePoppableOptionsPrepended,
|
|
27
|
+
morePoppableOptionsPrepended = _ref$morePoppableOpti === void 0 ? [] : _ref$morePoppableOpti,
|
|
28
|
+
_ref$moreOptionsPopup = _ref.moreOptionsPopupComponentsObj,
|
|
29
|
+
moreOptionsPopupComponentsObj = _ref$moreOptionsPopup === void 0 ? {} : _ref$moreOptionsPopup,
|
|
30
|
+
_ref$morePoppableOpti2 = _ref.morePoppableOptionsAppended,
|
|
31
|
+
morePoppableOptionsAppended = _ref$morePoppableOpti2 === void 0 ? [] : _ref$morePoppableOpti2,
|
|
32
|
+
annotation = _ref.annotation,
|
|
33
|
+
updateAnnotation = _ref.updateAnnotation,
|
|
34
|
+
_ref$hideFillOption = _ref.hideFillOption,
|
|
35
|
+
hideFillOption = _ref$hideFillOption === void 0 ? false : _ref$hideFillOption,
|
|
36
|
+
_ref$hidePositionFiel = _ref.hidePositionField,
|
|
37
|
+
hidePositionField = _ref$hidePositionFiel === void 0 ? false : _ref$hidePositionFiel,
|
|
38
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
39
|
+
var _useState = useState(null),
|
|
40
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
41
|
+
anchorEl = _useState2[0],
|
|
42
|
+
setAnchorEl = _useState2[1];
|
|
43
|
+
var _useState3 = useState(null),
|
|
44
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
45
|
+
currentOption = _useState4[0],
|
|
46
|
+
setCurrentOption = _useState4[1];
|
|
47
|
+
var _useStore = useStore(),
|
|
48
|
+
t = _useStore.t;
|
|
49
|
+
var options = useMemo(function () {
|
|
50
|
+
return [].concat(_toConsumableArray(morePoppableOptionsPrepended || []), [{
|
|
51
|
+
titleKey: 'opacity',
|
|
52
|
+
name: POPPABLE_OPTIONS.OPACITY,
|
|
53
|
+
Icon: OpacityOutlined
|
|
54
|
+
}, {
|
|
55
|
+
titleKey: 'stroke',
|
|
56
|
+
name: POPPABLE_OPTIONS.STROKE,
|
|
57
|
+
Icon: BorderColorOutlined
|
|
58
|
+
}, {
|
|
59
|
+
titleKey: 'shadow',
|
|
60
|
+
name: POPPABLE_OPTIONS.SHADOW,
|
|
61
|
+
Icon: FlareOutlined
|
|
62
|
+
}, !hidePositionField ? {
|
|
63
|
+
titleKey: 'position',
|
|
64
|
+
name: POPPABLE_OPTIONS.POSITION,
|
|
65
|
+
Icon: GpsFixedOutlined
|
|
66
|
+
} : undefined]);
|
|
67
|
+
}, [morePoppableOptionsPrepended, hidePositionField]);
|
|
68
|
+
var optionsPopups = useMemo(function () {
|
|
69
|
+
return _objectSpread(_objectSpread({}, moreOptionsPopupComponentsObj), {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, POPPABLE_OPTIONS.OPACITY, OpacityField), POPPABLE_OPTIONS.STROKE, StrokeFields), POPPABLE_OPTIONS.SHADOW, ShadowFields), POPPABLE_OPTIONS.POSITION, PositionFields), morePoppableOptionsAppended || []);
|
|
70
|
+
}, [moreOptionsPopupComponentsObj, morePoppableOptionsAppended]);
|
|
71
|
+
var toggleOptionPopup = useCallback(function (e, targetOptionName) {
|
|
72
|
+
var targetAnchorEl = e === null || e === void 0 ? void 0 : e.currentTarget;
|
|
73
|
+
setAnchorEl(targetAnchorEl || null);
|
|
74
|
+
setCurrentOption(targetOptionName || null);
|
|
75
|
+
}, []);
|
|
76
|
+
var changeAnnotationFill = useCallback(function (newFill) {
|
|
77
|
+
updateAnnotation({
|
|
78
|
+
fill: newFill
|
|
79
|
+
});
|
|
80
|
+
}, [updateAnnotation]);
|
|
81
|
+
var OptionPopupComponent = anchorEl && currentOption && optionsPopups[currentOption];
|
|
82
|
+
var renderPositionFields = function renderPositionFields() {
|
|
83
|
+
return React.createElement(React.Fragment, null, React.createElement(Typography, {
|
|
84
|
+
variant: "subtitle2",
|
|
85
|
+
mb: 1
|
|
86
|
+
}, t('position')), React.createElement(Box, {
|
|
87
|
+
sx: {
|
|
88
|
+
display: 'grid',
|
|
89
|
+
gridTemplateColumns: 'repeat(4, auto)'
|
|
90
|
+
}
|
|
91
|
+
}, React.createElement(OptionPopupComponent, _extends({
|
|
92
|
+
annotation: annotation,
|
|
93
|
+
updateAnnotation: updateAnnotation,
|
|
94
|
+
t: t
|
|
95
|
+
}, rest))));
|
|
96
|
+
};
|
|
97
|
+
return React.createElement(SFlexBox, {
|
|
98
|
+
alignItems: "center",
|
|
99
|
+
justifyContent: "center",
|
|
100
|
+
gap: 1
|
|
101
|
+
}, !hideFillOption && React.createElement(ColorInput, {
|
|
102
|
+
color: annotation.fill,
|
|
103
|
+
onChange: changeAnnotationFill,
|
|
104
|
+
colorFor: "fill"
|
|
105
|
+
}), children, options.map(function (option) {
|
|
106
|
+
return option && React.createElement(SIconButtonWrapper, {
|
|
107
|
+
key: option.name,
|
|
108
|
+
title: t(option.titleKey),
|
|
109
|
+
onClick: function onClick(e) {
|
|
110
|
+
return toggleOptionPopup(e, option.name);
|
|
111
|
+
},
|
|
112
|
+
active: currentOption === option.name
|
|
113
|
+
}, React.createElement(option.Icon, null));
|
|
114
|
+
}), OptionPopupComponent && React.createElement(Menu, {
|
|
115
|
+
anchorEl: anchorEl,
|
|
116
|
+
open: Boolean(anchorEl),
|
|
117
|
+
onClose: toggleOptionPopup,
|
|
118
|
+
anchorOrigin: {
|
|
119
|
+
vertical: 'top',
|
|
120
|
+
horizontal: 'center'
|
|
121
|
+
},
|
|
122
|
+
transformOrigin: {
|
|
123
|
+
vertical: 'bottom',
|
|
124
|
+
horizontal: 'center'
|
|
125
|
+
},
|
|
126
|
+
slotProps: {
|
|
127
|
+
paper: {
|
|
128
|
+
sx: {
|
|
129
|
+
px: 2,
|
|
130
|
+
py: 1
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}, currentOption === POPPABLE_OPTIONS.POSITION ? renderPositionFields() : React.createElement(OptionPopupComponent, _extends({
|
|
135
|
+
annotation: annotation,
|
|
136
|
+
updateAnnotation: updateAnnotation,
|
|
137
|
+
t: t
|
|
138
|
+
}, rest))));
|
|
139
|
+
};
|
|
140
|
+
export default AnnotationOptions;
|
|
@@ -1 +1,23 @@
|
|
|
1
|
-
import restrictNumber from"utils/restrict-number";
|
|
1
|
+
import restrictNumber from "../../../utils/restrict-number";
|
|
2
|
+
import Slider from "../slider";
|
|
3
|
+
var MIN_PERCENTANGE = 0;
|
|
4
|
+
var MAX_PERCENTANGE = 1;
|
|
5
|
+
var OpacityField = function OpacityField(_ref) {
|
|
6
|
+
var annotation = _ref.annotation,
|
|
7
|
+
updateAnnotation = _ref.updateAnnotation,
|
|
8
|
+
t = _ref.t;
|
|
9
|
+
var opacity = annotation.opacity;
|
|
10
|
+
var opacityValue = Math.round((opacity !== null && opacity !== void 0 ? opacity : 0) * 100);
|
|
11
|
+
var changeOpacity = function changeOpacity(newOpactiy) {
|
|
12
|
+
updateAnnotation({
|
|
13
|
+
opacity: restrictNumber(newOpactiy / 100, MIN_PERCENTANGE, MAX_PERCENTANGE)
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
return React.createElement(Slider, {
|
|
17
|
+
label: t('transparency'),
|
|
18
|
+
onChange: changeOpacity,
|
|
19
|
+
value: opacityValue,
|
|
20
|
+
annotation: "%"
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
export default OpacityField;
|