@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,97 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { RotateLeftOutlined, RotateRightOutlined, Rotate90DegreesCwOutlined } from '@mui/icons-material';
|
|
2
|
+
import Slider from '@mui/material/Slider';
|
|
3
|
+
import { useDebouncedCallback, usePhoneScreen, useStore } from "../../../hooks";
|
|
4
|
+
import { CHANGE_ROTATION, SET_RESIZE } from "../../../actions";
|
|
5
|
+
import restrictNumber from "../../../utils/restrict-number";
|
|
6
|
+
import getSizeAfterRotation from "../../../utils/get-size-after-rotation";
|
|
7
|
+
import { TOOLS_IDS } from "../../../utils/constants";
|
|
8
|
+
import ToolsBarItemButton from "../../tools-bar/tools-bar-item-button";
|
|
9
|
+
import { SFlexBox, SIconButton } from '@solostylist/ui-kit/core';
|
|
10
|
+
var RotateOptions = function RotateOptions() {
|
|
11
|
+
var _useStore = useStore(),
|
|
12
|
+
dispatch = _useStore.dispatch,
|
|
13
|
+
_useStore$adjustments = _useStore.adjustments.rotation,
|
|
14
|
+
rotation = _useStore$adjustments === void 0 ? 0 : _useStore$adjustments,
|
|
15
|
+
_useStore$resize = _useStore.resize,
|
|
16
|
+
resize = _useStore$resize === void 0 ? {} : _useStore$resize,
|
|
17
|
+
config = _useStore.config;
|
|
18
|
+
var rotateConfig = config[TOOLS_IDS.ROTATE];
|
|
19
|
+
var isPhoneScreen = usePhoneScreen();
|
|
20
|
+
var changeRotation = useDebouncedCallback(function (_e, newRotation) {
|
|
21
|
+
var rotationAngle = restrictNumber(newRotation, -180, 180);
|
|
22
|
+
dispatch({
|
|
23
|
+
type: CHANGE_ROTATION,
|
|
24
|
+
payload: {
|
|
25
|
+
rotation: rotationAngle
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
if (resize.width && resize.height) {
|
|
29
|
+
var sizeAfterRotation = getSizeAfterRotation(resize.width, resize.height, rotationAngle);
|
|
30
|
+
dispatch({
|
|
31
|
+
type: SET_RESIZE,
|
|
32
|
+
payload: {
|
|
33
|
+
width: sizeAfterRotation.width,
|
|
34
|
+
height: sizeAfterRotation.height
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}, 20);
|
|
39
|
+
var changeRotationButtonPositive = function changeRotationButtonPositive(e) {
|
|
40
|
+
var newAngle = rotation + rotateConfig.angle;
|
|
41
|
+
changeRotation(e, newAngle);
|
|
42
|
+
};
|
|
43
|
+
var changeRotationButtonNegative = function changeRotationButtonNegative(e) {
|
|
44
|
+
var newAngle = rotation - rotateConfig.angle;
|
|
45
|
+
changeRotation(e, newAngle);
|
|
46
|
+
};
|
|
47
|
+
if (rotateConfig.componentType === 'buttons') {
|
|
48
|
+
return React.createElement(React.Fragment, null, React.createElement(ToolsBarItemButton, {
|
|
49
|
+
id: TOOLS_IDS.IMAGE,
|
|
50
|
+
label: "-".concat(rotateConfig.angle, "\xB0"),
|
|
51
|
+
Icon: RotateLeftOutlined,
|
|
52
|
+
onClick: changeRotationButtonNegative
|
|
53
|
+
}), React.createElement(ToolsBarItemButton, {
|
|
54
|
+
id: TOOLS_IDS.IMAGE,
|
|
55
|
+
label: "+".concat(rotateConfig === null || rotateConfig === void 0 ? void 0 : rotateConfig.angle, "\xB0"),
|
|
56
|
+
Icon: RotateRightOutlined,
|
|
57
|
+
onClick: changeRotationButtonPositive
|
|
58
|
+
}));
|
|
59
|
+
}
|
|
60
|
+
return React.createElement(SFlexBox, {
|
|
61
|
+
alignItems: "center",
|
|
62
|
+
gap: 2
|
|
63
|
+
}, React.createElement(SIconButton, {
|
|
64
|
+
onClick: function onClick(e) {
|
|
65
|
+
return changeRotation(e, rotation - 90);
|
|
66
|
+
}
|
|
67
|
+
}, React.createElement(Rotate90DegreesCwOutlined, null)), React.createElement(Slider, {
|
|
68
|
+
valueLabelDisplay: "auto",
|
|
69
|
+
marks: true,
|
|
70
|
+
min: -180,
|
|
71
|
+
max: 180,
|
|
72
|
+
step: isPhoneScreen ? rotateConfig.angle / 3 : 1,
|
|
73
|
+
value: rotation,
|
|
74
|
+
onChange: changeRotation,
|
|
75
|
+
sx: {
|
|
76
|
+
width: 200,
|
|
77
|
+
'& .MuiSlider-thumb': {
|
|
78
|
+
width: 12,
|
|
79
|
+
height: 12
|
|
80
|
+
},
|
|
81
|
+
'& .MuiSlider-mark': {
|
|
82
|
+
width: 4,
|
|
83
|
+
height: 4,
|
|
84
|
+
borderRadius: '50%'
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}), React.createElement(SIconButton, {
|
|
88
|
+
onClick: function onClick(e) {
|
|
89
|
+
return changeRotation(e, rotation + 90);
|
|
90
|
+
}
|
|
91
|
+
}, React.createElement(Rotate90DegreesCwOutlined, {
|
|
92
|
+
sx: {
|
|
93
|
+
transform: 'scaleX(-1)'
|
|
94
|
+
}
|
|
95
|
+
})));
|
|
96
|
+
};
|
|
97
|
+
export default RotateOptions;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export{default as TextButton}from"./text-button";
|
|
1
|
+
export { default as TextButton } from "./text-button";
|
|
2
|
+
export { default as TextOptions } from "./text-options";
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
import{TextFieldsOutlined as TextIcon}from
|
|
1
|
+
import { TextFieldsOutlined as TextIcon } from '@mui/icons-material';
|
|
2
|
+
import ToolsBarItemButton from "../../tools-bar/tools-bar-item-button";
|
|
3
|
+
import { TOOLS_IDS } from "../../../utils/constants";
|
|
4
|
+
var TextButton = function TextButton(_ref) {
|
|
5
|
+
var selectTool = _ref.selectTool,
|
|
6
|
+
_ref$isSelected = _ref.isSelected,
|
|
7
|
+
isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
|
|
8
|
+
t = _ref.t;
|
|
9
|
+
return React.createElement(ToolsBarItemButton, {
|
|
10
|
+
id: TOOLS_IDS.TEXT,
|
|
11
|
+
label: t('textTool'),
|
|
12
|
+
Icon: TextIcon,
|
|
13
|
+
onClick: selectTool,
|
|
14
|
+
isSelected: isSelected
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
export default TextButton;
|
|
@@ -1 +1,122 @@
|
|
|
1
|
-
var textarea
|
|
1
|
+
var textarea;
|
|
2
|
+
var textNode;
|
|
3
|
+
var transformer;
|
|
4
|
+
var editFinishCallback;
|
|
5
|
+
var disableTextEditCallback;
|
|
6
|
+
function deactivateTextChange() {
|
|
7
|
+
if (textarea) {
|
|
8
|
+
textarea.remove();
|
|
9
|
+
}
|
|
10
|
+
if (window) {
|
|
11
|
+
window.removeEventListener('click', handleOutsideClick);
|
|
12
|
+
}
|
|
13
|
+
if (textNode) {
|
|
14
|
+
textNode.show();
|
|
15
|
+
}
|
|
16
|
+
if (transformer) {
|
|
17
|
+
transformer.show();
|
|
18
|
+
}
|
|
19
|
+
if (typeof disableTextEditCallback === 'function') {
|
|
20
|
+
disableTextEditCallback();
|
|
21
|
+
}
|
|
22
|
+
textNode = null;
|
|
23
|
+
textarea = null;
|
|
24
|
+
transformer = null;
|
|
25
|
+
}
|
|
26
|
+
function handleOutsideClick(e) {
|
|
27
|
+
if (e.target !== textarea) {
|
|
28
|
+
var textValue = textarea.value;
|
|
29
|
+
deactivateTextChange();
|
|
30
|
+
editFinishCallback(textValue);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
var activateTextChange = function activateTextChange(textNodeId, canvasStage, currentTransformer, finishingCallback, dismissingTextEditing) {
|
|
34
|
+
editFinishCallback = finishingCallback;
|
|
35
|
+
disableTextEditCallback = dismissingTextEditing;
|
|
36
|
+
transformer = currentTransformer;
|
|
37
|
+
textNode = canvasStage.findOne("#".concat(textNodeId));
|
|
38
|
+
textNode.hide();
|
|
39
|
+
transformer.hide();
|
|
40
|
+
var textPosition = textNode.absolutePosition();
|
|
41
|
+
textarea = document.createElement('textarea');
|
|
42
|
+
canvasStage.container().parentNode.appendChild(textarea);
|
|
43
|
+
textarea.value = textNode.text();
|
|
44
|
+
textarea.style.position = 'absolute';
|
|
45
|
+
textarea.style.top = "".concat(textPosition.y, "px");
|
|
46
|
+
textarea.style.left = "".concat(textPosition.x, "px");
|
|
47
|
+
textarea.style.width = "".concat(textNode.width() - textNode.padding() * 2, "px");
|
|
48
|
+
textarea.style.height = "".concat(textNode.height() - textNode.padding() * 2 + 5, "px");
|
|
49
|
+
textarea.style.maxWidth = "".concat(textNode.width() - textNode.padding() * 2, "px");
|
|
50
|
+
textarea.style.maxHeight = "".concat(textNode.height() - textNode.padding() * 2 + 5, "px");
|
|
51
|
+
textarea.style.fontSize = "".concat(textNode.fontSize(), "px");
|
|
52
|
+
textarea.style.border = '1px solid rgba(0, 0, 0, 0.5)';
|
|
53
|
+
textarea.style.padding = '0px';
|
|
54
|
+
textarea.style.margin = '0px';
|
|
55
|
+
textarea.style.overflow = 'hidden';
|
|
56
|
+
textarea.style.background = 'none';
|
|
57
|
+
textarea.style.outline = 'none';
|
|
58
|
+
textarea.style.resize = 'none';
|
|
59
|
+
textarea.style.lineHeight = textNode.lineHeight();
|
|
60
|
+
textarea.style.fontFamily = textNode.fontFamily();
|
|
61
|
+
textarea.style.transformOrigin = 'left top';
|
|
62
|
+
textarea.style.textAlign = textNode.align();
|
|
63
|
+
textarea.style.fontStyle = textNode.fontStyle();
|
|
64
|
+
textarea.style.letterSpacing = textNode.letterSpacing();
|
|
65
|
+
textarea.style.lineHeight = textNode.lineHeight();
|
|
66
|
+
textarea.style.color = textNode.fill();
|
|
67
|
+
var rotation = textNode.rotation();
|
|
68
|
+
var transform = '';
|
|
69
|
+
if (rotation) {
|
|
70
|
+
transform += "rotateZ(".concat(rotation, "deg)");
|
|
71
|
+
}
|
|
72
|
+
var firefoxMovePx = 0;
|
|
73
|
+
var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
74
|
+
if (isFirefox) {
|
|
75
|
+
firefoxMovePx += 2 + Math.round(textNode.fontSize() / 20);
|
|
76
|
+
}
|
|
77
|
+
transform += "translateY(-".concat(firefoxMovePx, "px)");
|
|
78
|
+
textarea.style.transform = transform;
|
|
79
|
+
textarea.style.height = 'auto';
|
|
80
|
+
textarea.style.height = "".concat(textarea.scrollHeight + 3, "px");
|
|
81
|
+
textarea.focus();
|
|
82
|
+
function setTextareaWidth(newTextWidth) {
|
|
83
|
+
var newWidth = newTextWidth;
|
|
84
|
+
if (!newWidth) {
|
|
85
|
+
newWidth = textNode.placeholder.length * textNode.fontSize();
|
|
86
|
+
}
|
|
87
|
+
var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
88
|
+
if (isSafari || isFirefox) {
|
|
89
|
+
newWidth = Math.ceil(newWidth);
|
|
90
|
+
}
|
|
91
|
+
var isEdge = !!document.documentMode || /Edge/.test(navigator.userAgent);
|
|
92
|
+
if (isEdge) {
|
|
93
|
+
newWidth += 1;
|
|
94
|
+
}
|
|
95
|
+
textarea.style.width = "".concat(newWidth, "px");
|
|
96
|
+
}
|
|
97
|
+
textarea.addEventListener('keydown', function (event) {
|
|
98
|
+
if (event.key === 'Enter' && !event.shiftKey) {
|
|
99
|
+
var textContent = textarea.value;
|
|
100
|
+
deactivateTextChange();
|
|
101
|
+
editFinishCallback(textContent);
|
|
102
|
+
}
|
|
103
|
+
if (event.key === 'Escape') {
|
|
104
|
+
deactivateTextChange();
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
textarea.addEventListener('keydown', function (event) {
|
|
108
|
+
if (event.key === 'Enter' || event.key === 'Escape') {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
var scale = textNode.getAbsoluteScale().x;
|
|
112
|
+
setTextareaWidth(textNode.width() * scale);
|
|
113
|
+
textarea.style.height = 'auto';
|
|
114
|
+
textarea.style.height = "".concat(textarea.scrollHeight + textNode.fontSize(), "px");
|
|
115
|
+
});
|
|
116
|
+
if (window) {
|
|
117
|
+
setTimeout(function () {
|
|
118
|
+
window.addEventListener('click', handleOutsideClick);
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
export { activateTextChange, deactivateTextChange };
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import { useAnnotation } from "../../../../hooks";
|
|
3
|
+
import { TOOLS_IDS } from "../../../../utils/constants";
|
|
4
|
+
import TextControls from "./text-controls";
|
|
5
|
+
var TextOptions = function TextOptions() {
|
|
6
|
+
var _useAnnotation = useAnnotation({
|
|
7
|
+
name: TOOLS_IDS.TEXT
|
|
8
|
+
}),
|
|
9
|
+
_useAnnotation2 = _slicedToArray(_useAnnotation, 2),
|
|
10
|
+
text = _useAnnotation2[0],
|
|
11
|
+
saveText = _useAnnotation2[1];
|
|
12
|
+
return React.createElement(TextControls, {
|
|
13
|
+
text: text,
|
|
14
|
+
saveText: saveText
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
export default TextOptions;
|
|
@@ -1 +1,38 @@
|
|
|
1
|
-
import{FormatAlignCenterOutlined,FormatAlignLeftOutlined}from
|
|
1
|
+
import { FormatAlignCenterOutlined, FormatAlignLeftOutlined } from '@mui/icons-material';
|
|
2
|
+
import { SFlexBox } from '@solostylist/ui-kit/core';
|
|
3
|
+
import SIconButtonWrapper from "../../../common/icon-wrapper";
|
|
4
|
+
import { TextAlignment } from "../../../../types/annotations";
|
|
5
|
+
var rightAlignmentCssTransform = {
|
|
6
|
+
transform: 'scaleX(-1)'
|
|
7
|
+
};
|
|
8
|
+
var TextAlignmentFields = function TextAlignmentFields(_ref) {
|
|
9
|
+
var text = _ref.annotation,
|
|
10
|
+
updateText = _ref.updateAnnotation;
|
|
11
|
+
var align = text.align;
|
|
12
|
+
var changeHorizontalAlignment = function changeHorizontalAlignment(newHorizonalAlignment) {
|
|
13
|
+
updateText({
|
|
14
|
+
align: newHorizonalAlignment
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
return React.createElement(SFlexBox, {
|
|
18
|
+
gap: 1
|
|
19
|
+
}, React.createElement(SIconButtonWrapper, {
|
|
20
|
+
onClick: function onClick() {
|
|
21
|
+
return changeHorizontalAlignment(TextAlignment.LEFT);
|
|
22
|
+
},
|
|
23
|
+
active: align === TextAlignment.LEFT
|
|
24
|
+
}, React.createElement(FormatAlignLeftOutlined, null)), React.createElement(SIconButtonWrapper, {
|
|
25
|
+
onClick: function onClick() {
|
|
26
|
+
return changeHorizontalAlignment(TextAlignment.CENTER);
|
|
27
|
+
},
|
|
28
|
+
active: align === TextAlignment.CENTER
|
|
29
|
+
}, React.createElement(FormatAlignCenterOutlined, null)), React.createElement(SIconButtonWrapper, {
|
|
30
|
+
onClick: function onClick() {
|
|
31
|
+
return changeHorizontalAlignment(TextAlignment.RIGHT);
|
|
32
|
+
},
|
|
33
|
+
active: align === TextAlignment.RIGHT
|
|
34
|
+
}, React.createElement(FormatAlignLeftOutlined, {
|
|
35
|
+
style: rightAlignmentCssTransform
|
|
36
|
+
})));
|
|
37
|
+
};
|
|
38
|
+
export default TextAlignmentFields;
|
|
@@ -1 +1,147 @@
|
|
|
1
|
-
import _typeof from
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
+
import { useCallback, useEffect } from 'react';
|
|
5
|
+
import { FormatBoldOutlined, FormatItalicOutlined } from '@mui/icons-material';
|
|
6
|
+
import { TOOLS_IDS, TRANSFORMERS_LAYER_ID } from "../../../../utils/constants";
|
|
7
|
+
import AnnotationOptions from "../../../common/annotation-options";
|
|
8
|
+
import SIconButtonWrapper from "../../../common/icon-wrapper";
|
|
9
|
+
import { ENABLE_TEXT_CONTENT_EDIT } from "../../../../actions";
|
|
10
|
+
import restrictNumber from "../../../../utils/restrict-number";
|
|
11
|
+
import { useStore } from "../../../../hooks";
|
|
12
|
+
import { SFlexBox, SSelect, STextField } from '@solostylist/ui-kit/core';
|
|
13
|
+
import { textOptionsPopupComponents, TEXT_POPPABLE_OPTIONS } from "./text-options.constants";
|
|
14
|
+
import { activateTextChange, deactivateTextChange } from "./handle-text-change-area";
|
|
15
|
+
var TextControls = function TextControls(_ref) {
|
|
16
|
+
var text = _ref.text,
|
|
17
|
+
saveText = _ref.saveText,
|
|
18
|
+
children = _ref.children;
|
|
19
|
+
var _useStore = useStore(),
|
|
20
|
+
dispatch = _useStore.dispatch,
|
|
21
|
+
textIdOfEditableContent = _useStore.textIdOfEditableContent,
|
|
22
|
+
designLayer = _useStore.designLayer,
|
|
23
|
+
t = _useStore.t,
|
|
24
|
+
config = _useStore.config;
|
|
25
|
+
var textConfig = config[TOOLS_IDS.TEXT] || {};
|
|
26
|
+
var _textConfig$fonts = textConfig.fonts,
|
|
27
|
+
fonts = _textConfig$fonts === void 0 ? [] : _textConfig$fonts,
|
|
28
|
+
onFontChange = textConfig.onFontChange;
|
|
29
|
+
var changeTextProps = useCallback(function (e) {
|
|
30
|
+
var _e$target = e.target,
|
|
31
|
+
name = _e$target.name,
|
|
32
|
+
value = _e$target.value,
|
|
33
|
+
type = _e$target.type;
|
|
34
|
+
saveText(function (latestText) {
|
|
35
|
+
return _defineProperty({
|
|
36
|
+
id: latestText.id
|
|
37
|
+
}, name, type === 'number' ? restrictNumber(Number(value), 1, 500) : value);
|
|
38
|
+
});
|
|
39
|
+
}, [saveText]);
|
|
40
|
+
var changeFontFamily = useCallback(function (newFontFamily) {
|
|
41
|
+
changeTextProps({
|
|
42
|
+
target: {
|
|
43
|
+
name: 'fontFamily',
|
|
44
|
+
value: newFontFamily
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
if (text.fontFamily !== newFontFamily && typeof onFontChange === 'function') {
|
|
48
|
+
var reRenderCanvasFn = designLayer.draw.bind(designLayer);
|
|
49
|
+
onFontChange(newFontFamily, reRenderCanvasFn);
|
|
50
|
+
}
|
|
51
|
+
}, [changeTextProps, text.fontFamily, onFontChange, designLayer]);
|
|
52
|
+
var changeFontStyle = useCallback(function (newStyle) {
|
|
53
|
+
var _text$fontStyle;
|
|
54
|
+
var fontStyle = ((_text$fontStyle = text.fontStyle) === null || _text$fontStyle === void 0 ? void 0 : _text$fontStyle.replace('normal', '').split(' ')) || [];
|
|
55
|
+
if (Object.keys(fontStyle).length > 0 && fontStyle.includes(newStyle)) {
|
|
56
|
+
fontStyle = fontStyle.filter(function (style) {
|
|
57
|
+
return style !== newStyle;
|
|
58
|
+
});
|
|
59
|
+
} else {
|
|
60
|
+
fontStyle.push(newStyle);
|
|
61
|
+
}
|
|
62
|
+
changeTextProps({
|
|
63
|
+
target: {
|
|
64
|
+
name: 'fontStyle',
|
|
65
|
+
value: fontStyle.join(' ').trim() || 'normal'
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}, [text.fontStyle, changeTextProps]);
|
|
69
|
+
var disableTextEdit = useCallback(function () {
|
|
70
|
+
dispatch({
|
|
71
|
+
type: ENABLE_TEXT_CONTENT_EDIT,
|
|
72
|
+
payload: {
|
|
73
|
+
textIdOfEditableContent: null
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}, []);
|
|
77
|
+
var changeTextContent = useCallback(function (newContent) {
|
|
78
|
+
changeTextProps({
|
|
79
|
+
target: {
|
|
80
|
+
name: 'text',
|
|
81
|
+
value: newContent
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
disableTextEdit();
|
|
85
|
+
}, []);
|
|
86
|
+
useEffect(function () {
|
|
87
|
+
var transformer;
|
|
88
|
+
if (textIdOfEditableContent && text.id === textIdOfEditableContent) {
|
|
89
|
+
var canvasStage = designLayer.getStage();
|
|
90
|
+
var transformersLayer = canvasStage.findOne("#".concat(TRANSFORMERS_LAYER_ID));
|
|
91
|
+
if (transformersLayer) {
|
|
92
|
+
var _ref3 = transformersLayer.children || [];
|
|
93
|
+
var _ref4 = _slicedToArray(_ref3, 1);
|
|
94
|
+
transformer = _ref4[0];
|
|
95
|
+
activateTextChange(textIdOfEditableContent, canvasStage, transformer, changeTextContent, disableTextEdit);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return function () {
|
|
99
|
+
if (transformer && textIdOfEditableContent) deactivateTextChange();
|
|
100
|
+
};
|
|
101
|
+
}, [textIdOfEditableContent]);
|
|
102
|
+
return React.createElement(AnnotationOptions, {
|
|
103
|
+
annotation: text,
|
|
104
|
+
updateAnnotation: saveText,
|
|
105
|
+
morePoppableOptionsPrepended: TEXT_POPPABLE_OPTIONS,
|
|
106
|
+
moreOptionsPopupComponentsObj: textOptionsPopupComponents
|
|
107
|
+
}, React.createElement(SFlexBox, {
|
|
108
|
+
sx: {
|
|
109
|
+
gap: 1,
|
|
110
|
+
alignItems: 'center'
|
|
111
|
+
}
|
|
112
|
+
}, Array.isArray(fonts) && fonts.length > 1 && React.createElement(SSelect, {
|
|
113
|
+
onChange: function onChange(e) {
|
|
114
|
+
return changeFontFamily(e.target.value);
|
|
115
|
+
},
|
|
116
|
+
value: text.fontFamily,
|
|
117
|
+
placeholder: t('fontFamily'),
|
|
118
|
+
options: fonts,
|
|
119
|
+
optionLabel: _typeof(fonts[0]) === 'object' ? 'label' : undefined,
|
|
120
|
+
optionValue: _typeof(fonts[0]) === 'object' ? 'value' : undefined,
|
|
121
|
+
sx: {
|
|
122
|
+
width: 150,
|
|
123
|
+
textAlign: 'left'
|
|
124
|
+
}
|
|
125
|
+
}), React.createElement(STextField, {
|
|
126
|
+
value: text.fontSize || '',
|
|
127
|
+
name: "fontSize",
|
|
128
|
+
onChange: changeTextProps,
|
|
129
|
+
inputMode: "numeric",
|
|
130
|
+
type: "number",
|
|
131
|
+
sx: {
|
|
132
|
+
width: 150
|
|
133
|
+
},
|
|
134
|
+
placeholder: t('size')
|
|
135
|
+
}), React.createElement(SIconButtonWrapper, {
|
|
136
|
+
active: (text.fontStyle || '').includes('bold'),
|
|
137
|
+
onClick: function onClick() {
|
|
138
|
+
return changeFontStyle('bold');
|
|
139
|
+
}
|
|
140
|
+
}, React.createElement(FormatBoldOutlined, null)), React.createElement(SIconButtonWrapper, {
|
|
141
|
+
active: (text.fontStyle || '').includes('italic'),
|
|
142
|
+
onClick: function onClick() {
|
|
143
|
+
return changeFontStyle('italic');
|
|
144
|
+
}
|
|
145
|
+
}, React.createElement(FormatItalicOutlined, null)), children));
|
|
146
|
+
};
|
|
147
|
+
export default TextControls;
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
import _defineProperty from"@babel/runtime/helpers/defineProperty";
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import { FormatAlignCenterOutlined, FormatLineSpacingOutlined } from '@mui/icons-material';
|
|
3
|
+
import TextAlignmentFields from "./text-alignment-fields";
|
|
4
|
+
import TextSpacingsFields from "./text-spacings-fields";
|
|
5
|
+
export var TEXT_ALIGNMENT = 'text-alignment';
|
|
6
|
+
export var TEXT_SPACINGS = 'text-spacings';
|
|
7
|
+
export var TEXT_POPPABLE_OPTIONS = [{
|
|
8
|
+
titleKey: 'textAlignment',
|
|
9
|
+
name: TEXT_ALIGNMENT,
|
|
10
|
+
Icon: FormatAlignCenterOutlined
|
|
11
|
+
}, {
|
|
12
|
+
titleKey: 'textSpacings',
|
|
13
|
+
name: TEXT_SPACINGS,
|
|
14
|
+
Icon: FormatLineSpacingOutlined
|
|
15
|
+
}];
|
|
16
|
+
export var textOptionsPopupComponents = _defineProperty(_defineProperty({}, TEXT_ALIGNMENT, TextAlignmentFields), TEXT_SPACINGS, TextSpacingsFields);
|
|
@@ -1 +1,34 @@
|
|
|
1
|
-
import _defineProperty from"@babel/runtime/helpers/defineProperty";
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import Slider from "../../../common/slider";
|
|
3
|
+
import restrictNumber from "../../../../utils/restrict-number";
|
|
4
|
+
var MIN_VALUE = 0;
|
|
5
|
+
var MAX_VALUE = 100;
|
|
6
|
+
var SLIDER_STEP = 1;
|
|
7
|
+
var TextSpacingsFields = function TextSpacingsFields(_ref) {
|
|
8
|
+
var text = _ref.annotation,
|
|
9
|
+
updateText = _ref.updateAnnotation,
|
|
10
|
+
t = _ref.t;
|
|
11
|
+
var letterSpacing = text.letterSpacing,
|
|
12
|
+
lineHeight = text.lineHeight;
|
|
13
|
+
var updateValue = function updateValue(prop, val) {
|
|
14
|
+
updateText(_defineProperty({}, prop, restrictNumber(val, MIN_VALUE, MAX_VALUE)));
|
|
15
|
+
};
|
|
16
|
+
return React.createElement(React.Fragment, null, React.createElement(Slider, {
|
|
17
|
+
annotation: "px",
|
|
18
|
+
label: t('letterSpacing'),
|
|
19
|
+
onChange: function onChange(val) {
|
|
20
|
+
return updateValue('letterSpacing', val);
|
|
21
|
+
},
|
|
22
|
+
value: letterSpacing,
|
|
23
|
+
step: SLIDER_STEP
|
|
24
|
+
}), React.createElement(Slider, {
|
|
25
|
+
annotation: "px",
|
|
26
|
+
label: t('lineHeight'),
|
|
27
|
+
onChange: function onChange(val) {
|
|
28
|
+
return updateValue('lineHeight', val);
|
|
29
|
+
},
|
|
30
|
+
value: lineHeight,
|
|
31
|
+
step: SLIDER_STEP
|
|
32
|
+
}));
|
|
33
|
+
};
|
|
34
|
+
export default TextSpacingsFields;
|
|
@@ -1 +1,98 @@
|
|
|
1
|
-
import _defineProperty from"@babel/runtime/helpers/defineProperty";
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
var _TOOLS_ITEMS;
|
|
3
|
+
import { TABS_IDS, TOOLS_IDS } from "../../utils/constants";
|
|
4
|
+
import { ArrowButton, ArrowOptions } from "./arrow";
|
|
5
|
+
import { Blur, BlurOptions } from "./blur";
|
|
6
|
+
import { Brightness, BrightnessOptions } from "./brightness";
|
|
7
|
+
import { Contrast, ContrastOptions } from "./contrast";
|
|
8
|
+
import { Crop } from "./crop";
|
|
9
|
+
import { EllipseButton, EllipseOptions } from "./ellipse";
|
|
10
|
+
import { Filters } from "./filters";
|
|
11
|
+
import { FlipX, FlipY } from "./flip";
|
|
12
|
+
import { HSV, HSVOptions } from "./hsv";
|
|
13
|
+
import { ImageButton, ImageOptions } from "./image";
|
|
14
|
+
import { LineButton, LineOptions } from "./line";
|
|
15
|
+
import { PenButton, PenOptions } from "./pen";
|
|
16
|
+
import { PolygonButton, PolygonOptions } from "./polygon";
|
|
17
|
+
import { RectButton, RectOptions } from "./rect";
|
|
18
|
+
import { Resize } from "./resize";
|
|
19
|
+
import { RotateButton, RotateOptions } from "./rotate";
|
|
20
|
+
import { TextButton, TextOptions } from "./text";
|
|
21
|
+
import { Warmth, WarmthOptions } from "./warmth";
|
|
22
|
+
import { Watermark } from "./watermark";
|
|
23
|
+
export var TOOLS_ITEMS = (_TOOLS_ITEMS = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_TOOLS_ITEMS, TOOLS_IDS.CROP, {
|
|
24
|
+
id: TOOLS_IDS.CROP,
|
|
25
|
+
Item: Crop
|
|
26
|
+
}), TOOLS_IDS.ROTATE, {
|
|
27
|
+
id: TOOLS_IDS.ROTATE,
|
|
28
|
+
Item: RotateButton,
|
|
29
|
+
ItemOptions: RotateOptions
|
|
30
|
+
}), TOOLS_IDS.FLIP_X, {
|
|
31
|
+
id: TOOLS_IDS.FLIP_X,
|
|
32
|
+
Item: FlipX
|
|
33
|
+
}), TOOLS_IDS.FLIP_Y, {
|
|
34
|
+
id: TOOLS_IDS.FLIP_Y,
|
|
35
|
+
Item: FlipY
|
|
36
|
+
}), TOOLS_IDS.BRIGHTNESS, {
|
|
37
|
+
id: TOOLS_IDS.BRIGHTNESS,
|
|
38
|
+
Item: Brightness,
|
|
39
|
+
ItemOptions: BrightnessOptions
|
|
40
|
+
}), TOOLS_IDS.CONTRAST, {
|
|
41
|
+
id: TOOLS_IDS.CONTRAST,
|
|
42
|
+
Item: Contrast,
|
|
43
|
+
ItemOptions: ContrastOptions
|
|
44
|
+
}), TOOLS_IDS.HSV, {
|
|
45
|
+
id: TOOLS_IDS.HSV,
|
|
46
|
+
Item: HSV,
|
|
47
|
+
ItemOptions: HSVOptions
|
|
48
|
+
}), TOOLS_IDS.BLUR, {
|
|
49
|
+
id: TOOLS_IDS.BLUR,
|
|
50
|
+
Item: Blur,
|
|
51
|
+
ItemOptions: BlurOptions
|
|
52
|
+
}), TOOLS_IDS.WARMTH, {
|
|
53
|
+
id: TOOLS_IDS.WARMTH,
|
|
54
|
+
Item: Warmth,
|
|
55
|
+
ItemOptions: WarmthOptions
|
|
56
|
+
}), TOOLS_IDS.FILTERS, {
|
|
57
|
+
id: TOOLS_IDS.FILTERS,
|
|
58
|
+
Item: Filters
|
|
59
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_TOOLS_ITEMS, TOOLS_IDS.WATERMARK, {
|
|
60
|
+
id: TOOLS_IDS.WATERMARK,
|
|
61
|
+
Item: Watermark
|
|
62
|
+
}), TOOLS_IDS.TEXT, {
|
|
63
|
+
id: TOOLS_IDS.TEXT,
|
|
64
|
+
Item: TextButton,
|
|
65
|
+
ItemOptions: TextOptions
|
|
66
|
+
}), TOOLS_IDS.IMAGE, {
|
|
67
|
+
id: TOOLS_IDS.IMAGE,
|
|
68
|
+
Item: ImageButton,
|
|
69
|
+
ItemOptions: ImageOptions
|
|
70
|
+
}), TOOLS_IDS.RECT, {
|
|
71
|
+
id: TOOLS_IDS.RECT,
|
|
72
|
+
Item: RectButton,
|
|
73
|
+
ItemOptions: RectOptions
|
|
74
|
+
}), TOOLS_IDS.POLYGON, {
|
|
75
|
+
id: TOOLS_IDS.POLYGON,
|
|
76
|
+
Item: PolygonButton,
|
|
77
|
+
ItemOptions: PolygonOptions
|
|
78
|
+
}), TOOLS_IDS.ELLIPSE, {
|
|
79
|
+
id: TOOLS_IDS.ELLIPSE,
|
|
80
|
+
Item: EllipseButton,
|
|
81
|
+
ItemOptions: EllipseOptions
|
|
82
|
+
}), TOOLS_IDS.PEN, {
|
|
83
|
+
id: TOOLS_IDS.PEN,
|
|
84
|
+
Item: PenButton,
|
|
85
|
+
ItemOptions: PenOptions
|
|
86
|
+
}), TOOLS_IDS.LINE, {
|
|
87
|
+
id: TOOLS_IDS.LINE,
|
|
88
|
+
Item: LineButton,
|
|
89
|
+
ItemOptions: LineOptions
|
|
90
|
+
}), TOOLS_IDS.ARROW, {
|
|
91
|
+
id: TOOLS_IDS.ARROW,
|
|
92
|
+
Item: ArrowButton,
|
|
93
|
+
ItemOptions: ArrowOptions
|
|
94
|
+
}), TOOLS_IDS.RESIZE, {
|
|
95
|
+
id: TOOLS_IDS.RESIZE,
|
|
96
|
+
Item: Resize
|
|
97
|
+
}));
|
|
98
|
+
export var TABS_TOOLS = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TABS_IDS.ADJUST, [TOOLS_IDS.CROP, TOOLS_IDS.ROTATE, TOOLS_IDS.FLIP_X, TOOLS_IDS.FLIP_Y]), TABS_IDS.FINETUNE, [TOOLS_IDS.BRIGHTNESS, TOOLS_IDS.CONTRAST, TOOLS_IDS.HSV, TOOLS_IDS.BLUR, TOOLS_IDS.WARMTH]), TABS_IDS.FILTERS, [TOOLS_IDS.FILTERS]), TABS_IDS.WATERMARK, [TOOLS_IDS.WATERMARK]), TABS_IDS.ANNOTATE, [TOOLS_IDS.TEXT, TOOLS_IDS.IMAGE, TOOLS_IDS.RECT, TOOLS_IDS.ELLIPSE, TOOLS_IDS.POLYGON, TOOLS_IDS.PEN, TOOLS_IDS.LINE, TOOLS_IDS.ARROW]), TABS_IDS.RESIZE, [TOOLS_IDS.RESIZE]);
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export{default as Warmth}from
|
|
1
|
+
export { default as Warmth } from "./warmth";
|
|
2
|
+
export { default as WarmthOptions } from "./warmth-options";
|