@solostylist/image-editor 1.0.12 → 1.0.14
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.d.ts +10 -0
- package/lib/actions/add-filter.d.ts.map +1 -0
- package/lib/actions/add-filter.js +2 -1
- package/lib/actions/change-pointer-icon.d.ts +6 -0
- package/lib/actions/change-pointer-icon.d.ts.map +1 -0
- package/lib/actions/change-rotation.d.ts +6 -0
- package/lib/actions/change-rotation.d.ts.map +1 -0
- package/lib/actions/clear-annotations-selections.d.ts +5 -0
- package/lib/actions/clear-annotations-selections.d.ts.map +1 -0
- package/lib/actions/duplicate-annotations.d.ts +9 -0
- package/lib/actions/duplicate-annotations.d.ts.map +1 -0
- package/lib/actions/enable-text-content-edit.d.ts +8 -0
- package/lib/actions/enable-text-content-edit.d.ts.map +1 -0
- package/lib/actions/enable-text-content-edit.js +2 -1
- package/lib/actions/hide-loader.d.ts +5 -0
- package/lib/actions/hide-loader.d.ts.map +1 -0
- package/lib/actions/index.d.ts +40 -0
- package/lib/actions/index.d.ts.map +1 -0
- package/lib/actions/redo.d.ts +5 -0
- package/lib/actions/redo.d.ts.map +1 -0
- package/lib/actions/remove-annotations.d.ts +9 -0
- package/lib/actions/remove-annotations.d.ts.map +1 -0
- package/lib/actions/reset.d.ts +8 -0
- package/lib/actions/reset.d.ts.map +1 -0
- package/lib/actions/select-annotation.d.ts +6 -0
- package/lib/actions/select-annotation.d.ts.map +1 -0
- package/lib/actions/select-tab.d.ts +6 -0
- package/lib/actions/select-tab.d.ts.map +1 -0
- package/lib/actions/select-tool.d.ts +9 -0
- package/lib/actions/select-tool.d.ts.map +1 -0
- package/lib/actions/set-annotation.d.ts +10 -0
- package/lib/actions/set-annotation.d.ts.map +1 -0
- package/lib/actions/set-canvas-size.d.ts +6 -0
- package/lib/actions/set-canvas-size.d.ts.map +1 -0
- package/lib/actions/set-crop.d.ts +9 -0
- package/lib/actions/set-crop.d.ts.map +1 -0
- package/lib/actions/set-crop.js +6 -1
- package/lib/actions/set-feedback.d.ts +6 -0
- package/lib/actions/set-feedback.d.ts.map +1 -0
- package/lib/actions/set-finetune.d.ts +11 -0
- package/lib/actions/set-finetune.d.ts.map +1 -0
- package/lib/actions/set-latest-color.d.ts +6 -0
- package/lib/actions/set-latest-color.d.ts.map +1 -0
- package/lib/actions/set-original-image.d.ts +6 -0
- package/lib/actions/set-original-image.d.ts.map +1 -0
- package/lib/actions/set-resize.d.ts +9 -0
- package/lib/actions/set-resize.d.ts.map +1 -0
- package/lib/actions/set-saved.d.ts +5 -0
- package/lib/actions/set-saved.d.ts.map +1 -0
- package/lib/actions/set-saving.d.ts +6 -0
- package/lib/actions/set-saving.d.ts.map +1 -0
- package/lib/actions/set-show-tabs-menu.d.ts +8 -0
- package/lib/actions/set-show-tabs-menu.d.ts.map +1 -0
- package/lib/actions/set-shown-image-dimensions.d.ts +13 -0
- package/lib/actions/set-shown-image-dimensions.d.ts.map +1 -0
- package/lib/actions/set-shown-image-dimensions.js +3 -2
- package/lib/actions/show-loader.d.ts +5 -0
- package/lib/actions/show-loader.d.ts.map +1 -0
- package/lib/actions/toggle-flip.d.ts +9 -0
- package/lib/actions/toggle-flip.d.ts.map +1 -0
- package/lib/actions/toggle-original-image-display.d.ts +8 -0
- package/lib/actions/toggle-original-image-display.d.ts.map +1 -0
- package/lib/actions/undo.d.ts +5 -0
- package/lib/actions/undo.d.ts.map +1 -0
- package/lib/actions/update-state.d.ts +7 -0
- package/lib/actions/update-state.d.ts.map +1 -0
- package/lib/actions/zoom-canvas.d.ts +10 -0
- package/lib/actions/zoom-canvas.d.ts.map +1 -0
- package/lib/components/app/index.d.ts +3 -0
- package/lib/components/app/index.d.ts.map +1 -0
- package/lib/components/app/index.js +147 -69
- package/lib/components/assembly-point/index.d.ts +8 -0
- package/lib/components/assembly-point/index.d.ts.map +1 -0
- package/lib/components/assembly-point/index.js +11 -10
- package/lib/components/common/annotation-options/annotation-options.constants.d.ts +9 -0
- package/lib/components/common/annotation-options/annotation-options.constants.d.ts.map +1 -0
- package/lib/components/common/annotation-options/index.d.ts +21 -0
- package/lib/components/common/annotation-options/index.d.ts.map +1 -0
- package/lib/components/common/annotation-options/index.js +61 -55
- package/lib/components/common/annotation-options/opacity-field.d.ts +10 -0
- package/lib/components/common/annotation-options/opacity-field.d.ts.map +1 -0
- package/lib/components/common/annotation-options/opacity-field.js +2 -1
- package/lib/components/common/annotation-options/position-fields.d.ts +8 -0
- package/lib/components/common/annotation-options/position-fields.d.ts.map +1 -0
- package/lib/components/common/annotation-options/position-fields.js +15 -13
- package/lib/components/common/annotation-options/shadow-fields.d.ts +9 -0
- package/lib/components/common/annotation-options/shadow-fields.d.ts.map +1 -0
- package/lib/components/common/annotation-options/shadow-fields.js +40 -37
- package/lib/components/common/annotation-options/stroke-fields.d.ts +9 -0
- package/lib/components/common/annotation-options/stroke-fields.d.ts.map +1 -0
- package/lib/components/common/annotation-options/stroke-fields.js +13 -10
- package/lib/components/common/button-with-menu/index.d.ts +16 -0
- package/lib/components/common/button-with-menu/index.d.ts.map +1 -0
- package/lib/components/common/button-with-menu/index.js +37 -27
- package/lib/components/common/color-input/index.d.ts +8 -0
- package/lib/components/common/color-input/index.d.ts.map +1 -0
- package/lib/components/common/color-input/index.js +21 -18
- package/lib/components/common/color-picker-modal/index.d.ts +10 -0
- package/lib/components/common/color-picker-modal/index.d.ts.map +1 -0
- package/lib/components/common/color-picker-modal/index.js +29 -22
- package/lib/components/common/hidden-upload-input/index.d.ts +3 -0
- package/lib/components/common/hidden-upload-input/index.d.ts.map +1 -0
- package/lib/components/common/hidden-upload-input/index.js +5 -2
- package/lib/components/common/icon-wrapper/index.d.ts +16 -0
- package/lib/components/common/icon-wrapper/index.d.ts.map +1 -0
- package/lib/components/common/icon-wrapper/index.js +9 -4
- package/lib/components/common/image-preview-tile/index.d.ts +14 -0
- package/lib/components/common/image-preview-tile/index.d.ts.map +1 -0
- package/lib/components/common/image-preview-tile/index.js +15 -13
- package/lib/components/common/slider/index.d.ts +12 -0
- package/lib/components/common/slider/index.d.ts.map +1 -0
- package/lib/components/common/slider/index.js +30 -23
- package/lib/components/feedback-popup/index.d.ts +8 -0
- package/lib/components/feedback-popup/index.d.ts.map +1 -0
- package/lib/components/feedback-popup/index.js +9 -6
- package/lib/components/layers/design-layer/annotation-nodes/annotation-nodes.constants.d.ts +11 -0
- package/lib/components/layers/design-layer/annotation-nodes/annotation-nodes.constants.d.ts.map +1 -0
- package/lib/components/layers/design-layer/annotation-nodes/arrow-node.d.ts +15 -0
- package/lib/components/layers/design-layer/annotation-nodes/arrow-node.d.ts.map +1 -0
- package/lib/components/layers/design-layer/annotation-nodes/arrow-node.js +6 -3
- package/lib/components/layers/design-layer/annotation-nodes/ellipse-node.d.ts +14 -0
- package/lib/components/layers/design-layer/annotation-nodes/ellipse-node.d.ts.map +1 -0
- package/lib/components/layers/design-layer/annotation-nodes/ellipse-node.js +6 -3
- package/lib/components/layers/design-layer/annotation-nodes/image-node.d.ts +14 -0
- package/lib/components/layers/design-layer/annotation-nodes/image-node.d.ts.map +1 -0
- package/lib/components/layers/design-layer/annotation-nodes/image-node.js +6 -3
- package/lib/components/layers/design-layer/annotation-nodes/index.d.ts +3 -0
- package/lib/components/layers/design-layer/annotation-nodes/index.d.ts.map +1 -0
- package/lib/components/layers/design-layer/annotation-nodes/index.js +3 -3
- package/lib/components/layers/design-layer/annotation-nodes/line-node.d.ts +12 -0
- package/lib/components/layers/design-layer/annotation-nodes/line-node.d.ts.map +1 -0
- package/lib/components/layers/design-layer/annotation-nodes/line-node.js +6 -3
- package/lib/components/layers/design-layer/annotation-nodes/memoized-annotation.d.ts +11 -0
- package/lib/components/layers/design-layer/annotation-nodes/memoized-annotation.d.ts.map +1 -0
- package/lib/components/layers/design-layer/annotation-nodes/memoized-annotation.js +6 -4
- package/lib/components/layers/design-layer/annotation-nodes/polygon-node.d.ts +15 -0
- package/lib/components/layers/design-layer/annotation-nodes/polygon-node.d.ts.map +1 -0
- package/lib/components/layers/design-layer/annotation-nodes/polygon-node.js +6 -3
- package/lib/components/layers/design-layer/annotation-nodes/rect-node.d.ts +16 -0
- package/lib/components/layers/design-layer/annotation-nodes/rect-node.d.ts.map +1 -0
- package/lib/components/layers/design-layer/annotation-nodes/rect-node.js +6 -3
- package/lib/components/layers/design-layer/annotation-nodes/text-node.d.ts +21 -0
- package/lib/components/layers/design-layer/annotation-nodes/text-node.d.ts.map +1 -0
- package/lib/components/layers/design-layer/annotation-nodes/text-node.js +6 -3
- package/lib/components/layers/design-layer/index.d.ts +3 -0
- package/lib/components/layers/design-layer/index.d.ts.map +1 -0
- package/lib/components/layers/design-layer/index.js +43 -39
- package/lib/components/layers/design-layer/nodes-common-prop-types.d.ts +45 -0
- package/lib/components/layers/design-layer/nodes-common-prop-types.d.ts.map +1 -0
- package/lib/components/layers/design-layer/preview-group.d.ts +3 -0
- package/lib/components/layers/design-layer/preview-group.d.ts.map +1 -0
- package/lib/components/layers/design-layer/preview-group.js +5 -2
- package/lib/components/layers/index.d.ts +3 -0
- package/lib/components/layers/index.d.ts.map +1 -0
- package/lib/components/layers/transformers-layer/crop-transformer.d.ts +3 -0
- package/lib/components/layers/transformers-layer/crop-transformer.d.ts.map +1 -0
- package/lib/components/layers/transformers-layer/crop-transformer.js +65 -62
- package/lib/components/layers/transformers-layer/index.d.ts +3 -0
- package/lib/components/layers/transformers-layer/index.d.ts.map +1 -0
- package/lib/components/layers/transformers-layer/index.js +7 -4
- package/lib/components/layers/transformers-layer/nodes-transformer.d.ts +3 -0
- package/lib/components/layers/transformers-layer/nodes-transformer.d.ts.map +1 -0
- package/lib/components/layers/transformers-layer/nodes-transformer.js +2 -1
- package/lib/components/layers/transformers-layer/transformers-layer.utils.d.ts +42 -0
- package/lib/components/layers/transformers-layer/transformers-layer.utils.d.ts.map +1 -0
- package/lib/components/main-canvas/canvas-node.d.ts +6 -0
- package/lib/components/main-canvas/canvas-node.d.ts.map +1 -0
- package/lib/components/main-canvas/canvas-node.js +13 -9
- package/lib/components/main-canvas/index.d.ts +3 -0
- package/lib/components/main-canvas/index.d.ts.map +1 -0
- package/lib/components/main-canvas/index.js +136 -29
- package/lib/components/main-canvas/touch-zooming-events.d.ts +11 -0
- package/lib/components/main-canvas/touch-zooming-events.d.ts.map +1 -0
- package/lib/components/main-canvas/touch-zooming-events.js +3 -2
- package/lib/components/node-controls/index.d.ts +3 -0
- package/lib/components/node-controls/index.d.ts.map +1 -0
- package/lib/components/node-controls/index.js +16 -11
- package/lib/components/tabs/index.d.ts +6 -0
- package/lib/components/tabs/index.d.ts.map +1 -0
- package/lib/components/tabs/index.js +165 -22
- package/lib/components/tabs/tabs.constants.d.ts +9 -0
- package/lib/components/tabs/tabs.constants.d.ts.map +1 -0
- package/lib/components/tabs-drawer/index.d.ts +6 -0
- package/lib/components/tabs-drawer/index.d.ts.map +1 -0
- package/lib/components/tabs-drawer/index.js +75 -46
- package/lib/components/tools/arrow/arrow-button.d.ts +8 -0
- package/lib/components/tools/arrow/arrow-button.d.ts.map +1 -0
- package/lib/components/tools/arrow/arrow-button.js +2 -1
- package/lib/components/tools/arrow/arrow-options.d.ts +4 -0
- package/lib/components/tools/arrow/arrow-options.d.ts.map +1 -0
- package/lib/components/tools/arrow/arrow-options.js +2 -1
- package/lib/components/tools/arrow/index.d.ts +3 -0
- package/lib/components/tools/arrow/index.d.ts.map +1 -0
- package/lib/components/tools/blur/blur-options.d.ts +6 -0
- package/lib/components/tools/blur/blur-options.d.ts.map +1 -0
- package/lib/components/tools/blur/blur-options.js +11 -9
- package/lib/components/tools/blur/blur.d.ts +8 -0
- package/lib/components/tools/blur/blur.d.ts.map +1 -0
- package/lib/components/tools/blur/blur.js +2 -1
- package/lib/components/tools/blur/index.d.ts +3 -0
- package/lib/components/tools/blur/index.d.ts.map +1 -0
- package/lib/components/tools/brightness/brightness-options.d.ts +6 -0
- package/lib/components/tools/brightness/brightness-options.d.ts.map +1 -0
- package/lib/components/tools/brightness/brightness-options.js +12 -10
- package/lib/components/tools/brightness/brightness.d.ts +8 -0
- package/lib/components/tools/brightness/brightness.d.ts.map +1 -0
- package/lib/components/tools/brightness/brightness.js +2 -1
- package/lib/components/tools/brightness/index.d.ts +3 -0
- package/lib/components/tools/brightness/index.d.ts.map +1 -0
- package/lib/components/tools/contrast/contrast-options.d.ts +6 -0
- package/lib/components/tools/contrast/contrast-options.d.ts.map +1 -0
- package/lib/components/tools/contrast/contrast-options.js +11 -9
- package/lib/components/tools/contrast/contrast.d.ts +8 -0
- package/lib/components/tools/contrast/contrast.d.ts.map +1 -0
- package/lib/components/tools/contrast/contrast.js +2 -1
- package/lib/components/tools/contrast/index.d.ts +3 -0
- package/lib/components/tools/contrast/index.d.ts.map +1 -0
- package/lib/components/tools/crop/crop.constants.d.ts +15 -0
- package/lib/components/tools/crop/crop.constants.d.ts.map +1 -0
- package/lib/components/tools/crop/crop.d.ts +7 -0
- package/lib/components/tools/crop/crop.d.ts.map +1 -0
- package/lib/components/tools/crop/crop.js +25 -22
- package/lib/components/tools/crop/index.d.ts +2 -0
- package/lib/components/tools/crop/index.d.ts.map +1 -0
- package/lib/components/tools/ellipse/ellipse-button.d.ts +8 -0
- package/lib/components/tools/ellipse/ellipse-button.d.ts.map +1 -0
- package/lib/components/tools/ellipse/ellipse-button.js +2 -1
- package/lib/components/tools/ellipse/ellipse-options.d.ts +4 -0
- package/lib/components/tools/ellipse/ellipse-options.d.ts.map +1 -0
- package/lib/components/tools/ellipse/ellipse-options.js +2 -1
- package/lib/components/tools/ellipse/index.d.ts +3 -0
- package/lib/components/tools/ellipse/index.d.ts.map +1 -0
- package/lib/components/tools/filters/filter-item.d.ts +11 -0
- package/lib/components/tools/filters/filter-item.d.ts.map +1 -0
- package/lib/components/tools/filters/filter-item.js +36 -28
- package/lib/components/tools/filters/filters.constants.d.ts +8 -0
- package/lib/components/tools/filters/filters.constants.d.ts.map +1 -0
- package/lib/components/tools/filters/filters.d.ts +6 -0
- package/lib/components/tools/filters/filters.d.ts.map +1 -0
- package/lib/components/tools/filters/filters.js +26 -18
- package/lib/components/tools/filters/index.d.ts +2 -0
- package/lib/components/tools/filters/index.d.ts.map +1 -0
- package/lib/components/tools/flip/flip-x.d.ts +8 -0
- package/lib/components/tools/flip/flip-x.d.ts.map +1 -0
- package/lib/components/tools/flip/flip-x.js +2 -1
- package/lib/components/tools/flip/flip-y.d.ts +8 -0
- package/lib/components/tools/flip/flip-y.d.ts.map +1 -0
- package/lib/components/tools/flip/flip-y.js +2 -1
- package/lib/components/tools/flip/index.d.ts +3 -0
- package/lib/components/tools/flip/index.d.ts.map +1 -0
- package/lib/components/tools/hsv/hsv.d.ts +8 -0
- package/lib/components/tools/hsv/hsv.d.ts.map +1 -0
- package/lib/components/tools/hsv/hsv.js +2 -1
- package/lib/components/tools/hsv/hsvoptions.d.ts +6 -0
- package/lib/components/tools/hsv/hsvoptions.d.ts.map +1 -0
- package/lib/components/tools/hsv/hsvoptions.js +32 -30
- package/lib/components/tools/hsv/index.d.ts +3 -0
- package/lib/components/tools/hsv/index.d.ts.map +1 -0
- package/lib/components/tools/image/image-button.d.ts +8 -0
- package/lib/components/tools/image/image-button.d.ts.map +1 -0
- package/lib/components/tools/image/image-button.js +2 -1
- package/lib/components/tools/image/image-controls.d.ts +13 -0
- package/lib/components/tools/image/image-controls.d.ts.map +1 -0
- package/lib/components/tools/image/image-controls.js +5 -3
- package/lib/components/tools/image/image-options.d.ts +3 -0
- package/lib/components/tools/image/image-options.d.ts.map +1 -0
- package/lib/components/tools/image/image-options.js +24 -21
- package/lib/components/tools/image/images-gallery.d.ts +14 -0
- package/lib/components/tools/image/images-gallery.d.ts.map +1 -0
- package/lib/components/tools/image/images-gallery.js +28 -26
- package/lib/components/tools/image/index.d.ts +3 -0
- package/lib/components/tools/image/index.d.ts.map +1 -0
- package/lib/components/tools/line/index.d.ts +3 -0
- package/lib/components/tools/line/index.d.ts.map +1 -0
- package/lib/components/tools/line/line-button.d.ts +8 -0
- package/lib/components/tools/line/line-button.d.ts.map +1 -0
- package/lib/components/tools/line/line-button.js +2 -1
- package/lib/components/tools/line/line-options.d.ts +4 -0
- package/lib/components/tools/line/line-options.d.ts.map +1 -0
- package/lib/components/tools/line/line-options.js +2 -1
- package/lib/components/tools/pen/index.d.ts +3 -0
- package/lib/components/tools/pen/index.d.ts.map +1 -0
- package/lib/components/tools/pen/pen-button.d.ts +8 -0
- package/lib/components/tools/pen/pen-button.d.ts.map +1 -0
- package/lib/components/tools/pen/pen-button.js +2 -1
- package/lib/components/tools/pen/pen-options.d.ts +3 -0
- package/lib/components/tools/pen/pen-options.d.ts.map +1 -0
- package/lib/components/tools/pen/pen-options.js +6 -4
- package/lib/components/tools/polygon/index.d.ts +3 -0
- package/lib/components/tools/polygon/index.d.ts.map +1 -0
- package/lib/components/tools/polygon/polygon-button.d.ts +8 -0
- package/lib/components/tools/polygon/polygon-button.d.ts.map +1 -0
- package/lib/components/tools/polygon/polygon-button.js +2 -1
- package/lib/components/tools/polygon/polygon-options.d.ts +4 -0
- package/lib/components/tools/polygon/polygon-options.d.ts.map +1 -0
- package/lib/components/tools/polygon/polygon-options.js +2 -1
- package/lib/components/tools/polygon/polygon-sides-field.d.ts +9 -0
- package/lib/components/tools/polygon/polygon-sides-field.d.ts.map +1 -0
- package/lib/components/tools/polygon/polygon-sides-field.js +2 -1
- package/lib/components/tools/polygon/polygon.constants.d.ts +12 -0
- package/lib/components/tools/polygon/polygon.constants.d.ts.map +1 -0
- package/lib/components/tools/rect/index.d.ts +3 -0
- package/lib/components/tools/rect/index.d.ts.map +1 -0
- package/lib/components/tools/rect/rect-button.d.ts +8 -0
- package/lib/components/tools/rect/rect-button.d.ts.map +1 -0
- package/lib/components/tools/rect/rect-button.js +2 -1
- package/lib/components/tools/rect/rect-corner-field.d.ts +9 -0
- package/lib/components/tools/rect/rect-corner-field.d.ts.map +1 -0
- package/lib/components/tools/rect/rect-corner-field.js +2 -1
- package/lib/components/tools/rect/rect-options.d.ts +4 -0
- package/lib/components/tools/rect/rect-options.d.ts.map +1 -0
- package/lib/components/tools/rect/rect-options.js +2 -1
- package/lib/components/tools/rect/rect.constants.d.ts +12 -0
- package/lib/components/tools/rect/rect.constants.d.ts.map +1 -0
- package/lib/components/tools/resize/index.d.ts +2 -0
- package/lib/components/tools/resize/index.d.ts.map +1 -0
- package/lib/components/tools/resize/resize.d.ts +13 -0
- package/lib/components/tools/resize/resize.d.ts.map +1 -0
- package/lib/components/tools/resize/resize.js +41 -34
- package/lib/components/tools/rotate/index.d.ts +3 -0
- package/lib/components/tools/rotate/index.d.ts.map +1 -0
- package/lib/components/tools/rotate/rotate-button.d.ts +8 -0
- package/lib/components/tools/rotate/rotate-button.d.ts.map +1 -0
- package/lib/components/tools/rotate/rotate-button.js +2 -1
- package/lib/components/tools/rotate/rotate-options.d.ts +3 -0
- package/lib/components/tools/rotate/rotate-options.d.ts.map +1 -0
- package/lib/components/tools/rotate/rotate-options.js +51 -45
- package/lib/components/tools/text/index.d.ts +3 -0
- package/lib/components/tools/text/index.d.ts.map +1 -0
- package/lib/components/tools/text/text-button.d.ts +8 -0
- package/lib/components/tools/text/text-button.d.ts.map +1 -0
- package/lib/components/tools/text/text-button.js +2 -1
- package/lib/components/tools/text/text-options/handle-text-change-area.d.ts +4 -0
- package/lib/components/tools/text/text-options/handle-text-change-area.d.ts.map +1 -0
- package/lib/components/tools/text/text-options/index.d.ts +4 -0
- package/lib/components/tools/text/text-options/index.d.ts.map +1 -0
- package/lib/components/tools/text/text-options/index.js +2 -1
- package/lib/components/tools/text/text-options/text-alignment-fields.d.ts +9 -0
- package/lib/components/tools/text/text-options/text-alignment-fields.d.ts.map +1 -0
- package/lib/components/tools/text/text-options/text-alignment-fields.js +26 -21
- package/lib/components/tools/text/text-options/text-controls.d.ts +12 -0
- package/lib/components/tools/text/text-options/text-controls.d.ts.map +1 -0
- package/lib/components/tools/text/text-options/text-controls.js +51 -44
- package/lib/components/tools/text/text-options/text-options.constants.d.ts +14 -0
- package/lib/components/tools/text/text-options/text-options.constants.d.ts.map +1 -0
- package/lib/components/tools/text/text-options/text-spacings-fields.d.ts +10 -0
- package/lib/components/tools/text/text-options/text-spacings-fields.d.ts.map +1 -0
- package/lib/components/tools/text/text-options/text-spacings-fields.js +20 -17
- package/lib/components/tools/tools.constants.d.ts +9 -0
- package/lib/components/tools/tools.constants.d.ts.map +1 -0
- package/lib/components/tools/warmth/index.d.ts +3 -0
- package/lib/components/tools/warmth/index.d.ts.map +1 -0
- package/lib/components/tools/warmth/warmth-options.d.ts +7 -0
- package/lib/components/tools/warmth/warmth-options.d.ts.map +1 -0
- package/lib/components/tools/warmth/warmth-options.js +11 -9
- package/lib/components/tools/warmth/warmth.d.ts +8 -0
- package/lib/components/tools/warmth/warmth.d.ts.map +1 -0
- package/lib/components/tools/warmth/warmth.js +2 -1
- package/lib/components/tools/watermark/index.d.ts +2 -0
- package/lib/components/tools/watermark/index.d.ts.map +1 -0
- package/lib/components/tools/watermark/watermark-padding.d.ts +8 -0
- package/lib/components/tools/watermark/watermark-padding.d.ts.map +1 -0
- package/lib/components/tools/watermark/watermark-padding.js +36 -30
- package/lib/components/tools/watermark/watermark.d.ts +3 -0
- package/lib/components/tools/watermark/watermark.d.ts.map +1 -0
- package/lib/components/tools/watermark/watermark.js +35 -28
- package/lib/components/tools/watermark/watermarks-gallery.d.ts +7 -0
- package/lib/components/tools/watermark/watermarks-gallery.d.ts.map +1 -0
- package/lib/components/tools/watermark/watermarks-gallery.js +22 -18
- package/lib/components/tools-bar/index.d.ts +3 -0
- package/lib/components/tools-bar/index.d.ts.map +1 -0
- package/lib/components/tools-bar/index.js +57 -29
- package/lib/components/tools-bar/tools-bar-item-button.d.ts +23 -0
- package/lib/components/tools-bar/tools-bar-item-button.d.ts.map +1 -0
- package/lib/components/tools-bar/tools-bar-item-button.js +17 -9
- package/lib/components/topbar/canvas-zooming.d.ts +3 -0
- package/lib/components/topbar/canvas-zooming.d.ts.map +1 -0
- package/lib/components/topbar/canvas-zooming.js +54 -46
- package/lib/components/topbar/confirmation-modal.d.ts +8 -0
- package/lib/components/topbar/confirmation-modal.d.ts.map +1 -0
- package/lib/components/topbar/confirmation-modal.js +26 -19
- package/lib/components/topbar/image-dimensions-and-display-toggle.d.ts +3 -0
- package/lib/components/topbar/image-dimensions-and-display-toggle.d.ts.map +1 -0
- package/lib/components/topbar/image-dimensions-and-display-toggle.js +20 -14
- package/lib/components/topbar/index.d.ts +7 -0
- package/lib/components/topbar/index.d.ts.map +1 -0
- package/lib/components/topbar/index.js +49 -35
- package/lib/components/topbar/redo-button.d.ts +3 -0
- package/lib/components/topbar/redo-button.d.ts.map +1 -0
- package/lib/components/topbar/redo-button.js +6 -4
- package/lib/components/topbar/reset-button.d.ts +3 -0
- package/lib/components/topbar/reset-button.d.ts.map +1 -0
- package/lib/components/topbar/reset-button.js +12 -9
- package/lib/components/topbar/save-button.d.ts +3 -0
- package/lib/components/topbar/save-button.d.ts.map +1 -0
- package/lib/components/topbar/save-button.js +69 -57
- package/lib/components/topbar/topbar-action-buttons.d.ts +3 -0
- package/lib/components/topbar/topbar-action-buttons.d.ts.map +1 -0
- package/lib/components/topbar/topbar-action-buttons.js +27 -0
- package/lib/components/topbar/topbar.constants.d.ts +8 -0
- package/lib/components/topbar/topbar.constants.d.ts.map +1 -0
- package/lib/components/topbar/undo-button.d.ts +3 -0
- package/lib/components/topbar/undo-button.d.ts.map +1 -0
- package/lib/components/topbar/undo-button.js +6 -4
- package/lib/context/app-context.d.ts +14 -0
- package/lib/context/app-context.d.ts.map +1 -0
- package/lib/context/app-provider-overriden-value.d.ts +11 -0
- package/lib/context/app-provider-overriden-value.d.ts.map +1 -0
- package/lib/context/app-provider-overriden-value.js +5 -3
- package/lib/context/app-provider.d.ts +10 -0
- package/lib/context/app-provider.d.ts.map +1 -0
- package/lib/context/app-provider.js +13 -9
- package/lib/context/app-reducer.d.ts +5 -0
- package/lib/context/app-reducer.d.ts.map +1 -0
- package/lib/context/app-reducer.js +2 -1
- package/lib/context/default-config.d.ts +4 -0
- package/lib/context/default-config.d.ts.map +1 -0
- package/lib/context/default-config.js +1 -1
- package/lib/context/default-translations.d.ts +4 -0
- package/lib/context/default-translations.d.ts.map +1 -0
- package/lib/context/default-translations.js +465 -113
- package/lib/context/get-initial-app-state.d.ts +5 -0
- package/lib/context/get-initial-app-state.d.ts.map +1 -0
- package/lib/context/get-initial-app-state.js +4 -4
- package/lib/context/index.d.ts +5 -0
- package/lib/context/index.d.ts.map +1 -0
- package/lib/custom/filters/aden.d.ts +14 -0
- package/lib/custom/filters/aden.d.ts.map +1 -0
- package/lib/custom/filters/amaro.d.ts +14 -0
- package/lib/custom/filters/amaro.d.ts.map +1 -0
- package/lib/custom/filters/ashby.d.ts +14 -0
- package/lib/custom/filters/ashby.d.ts.map +1 -0
- package/lib/custom/filters/base-filters.d.ts +14 -0
- package/lib/custom/filters/base-filters.d.ts.map +1 -0
- package/lib/custom/filters/black-and-white.d.ts +14 -0
- package/lib/custom/filters/black-and-white.d.ts.map +1 -0
- package/lib/custom/filters/brannan.d.ts +14 -0
- package/lib/custom/filters/brannan.d.ts.map +1 -0
- package/lib/custom/filters/brooklyn.d.ts +14 -0
- package/lib/custom/filters/brooklyn.d.ts.map +1 -0
- package/lib/custom/filters/charmes.d.ts +14 -0
- package/lib/custom/filters/charmes.d.ts.map +1 -0
- package/lib/custom/filters/clarendon.d.ts +14 -0
- package/lib/custom/filters/clarendon.d.ts.map +1 -0
- package/lib/custom/filters/crema.d.ts +14 -0
- package/lib/custom/filters/crema.d.ts.map +1 -0
- package/lib/custom/filters/dogpatch.d.ts +14 -0
- package/lib/custom/filters/dogpatch.d.ts.map +1 -0
- package/lib/custom/filters/earlybird.d.ts +14 -0
- package/lib/custom/filters/earlybird.d.ts.map +1 -0
- package/lib/custom/filters/gingham.d.ts +14 -0
- package/lib/custom/filters/gingham.d.ts.map +1 -0
- package/lib/custom/filters/ginza.d.ts +14 -0
- package/lib/custom/filters/ginza.d.ts.map +1 -0
- package/lib/custom/filters/hefe.d.ts +14 -0
- package/lib/custom/filters/hefe.d.ts.map +1 -0
- package/lib/custom/filters/helena.d.ts +14 -0
- package/lib/custom/filters/helena.d.ts.map +1 -0
- package/lib/custom/filters/hudson.d.ts +14 -0
- package/lib/custom/filters/hudson.d.ts.map +1 -0
- package/lib/custom/filters/index.d.ts +41 -0
- package/lib/custom/filters/index.d.ts.map +1 -0
- package/lib/custom/filters/juno.d.ts +14 -0
- package/lib/custom/filters/juno.d.ts.map +1 -0
- package/lib/custom/filters/kelvin.d.ts +14 -0
- package/lib/custom/filters/kelvin.d.ts.map +1 -0
- package/lib/custom/filters/lark.d.ts +14 -0
- package/lib/custom/filters/lark.d.ts.map +1 -0
- package/lib/custom/filters/lo-fi.d.ts +14 -0
- package/lib/custom/filters/lo-fi.d.ts.map +1 -0
- package/lib/custom/filters/ludwig.d.ts +14 -0
- package/lib/custom/filters/ludwig.d.ts.map +1 -0
- package/lib/custom/filters/maven.d.ts +14 -0
- package/lib/custom/filters/maven.d.ts.map +1 -0
- package/lib/custom/filters/mayfair.d.ts +14 -0
- package/lib/custom/filters/mayfair.d.ts.map +1 -0
- package/lib/custom/filters/moon.d.ts +14 -0
- package/lib/custom/filters/moon.d.ts.map +1 -0
- package/lib/custom/filters/nashville.d.ts +14 -0
- package/lib/custom/filters/nashville.d.ts.map +1 -0
- package/lib/custom/filters/ninteen-seventy-seven.d.ts +14 -0
- package/lib/custom/filters/ninteen-seventy-seven.d.ts.map +1 -0
- package/lib/custom/filters/perpetua.d.ts +14 -0
- package/lib/custom/filters/perpetua.d.ts.map +1 -0
- package/lib/custom/filters/reyes.d.ts +14 -0
- package/lib/custom/filters/reyes.d.ts.map +1 -0
- package/lib/custom/filters/rise.d.ts +14 -0
- package/lib/custom/filters/rise.d.ts.map +1 -0
- package/lib/custom/filters/sierra.d.ts +14 -0
- package/lib/custom/filters/sierra.d.ts.map +1 -0
- package/lib/custom/filters/skyline.d.ts +14 -0
- package/lib/custom/filters/skyline.d.ts.map +1 -0
- package/lib/custom/filters/slumber.d.ts +14 -0
- package/lib/custom/filters/slumber.d.ts.map +1 -0
- package/lib/custom/filters/stinson.d.ts +14 -0
- package/lib/custom/filters/stinson.d.ts.map +1 -0
- package/lib/custom/filters/sutro.d.ts +14 -0
- package/lib/custom/filters/sutro.d.ts.map +1 -0
- package/lib/custom/filters/toaster.d.ts +14 -0
- package/lib/custom/filters/toaster.d.ts.map +1 -0
- package/lib/custom/filters/valencia.d.ts +14 -0
- package/lib/custom/filters/valencia.d.ts.map +1 -0
- package/lib/custom/filters/vesper.d.ts +14 -0
- package/lib/custom/filters/vesper.d.ts.map +1 -0
- package/lib/custom/filters/walden.d.ts +14 -0
- package/lib/custom/filters/walden.d.ts.map +1 -0
- package/lib/custom/filters/willow.d.ts +14 -0
- package/lib/custom/filters/willow.d.ts.map +1 -0
- package/lib/custom/filters/xpro2.d.ts +14 -0
- package/lib/custom/filters/xpro2.d.ts.map +1 -0
- package/lib/custom/finetunes/custom-threshold.d.ts +15 -0
- package/lib/custom/finetunes/custom-threshold.d.ts.map +1 -0
- package/lib/custom/finetunes/index.d.ts +3 -0
- package/lib/custom/finetunes/index.d.ts.map +1 -0
- package/lib/custom/finetunes/warmth.d.ts +17 -0
- package/lib/custom/finetunes/warmth.d.ts.map +1 -0
- package/lib/demo/app.d.ts +6 -0
- package/lib/demo/app.d.ts.map +1 -0
- package/lib/demo/app.js +142 -86
- package/lib/demo/index.d.ts +2 -0
- package/lib/demo/index.d.ts.map +1 -0
- package/lib/hooks/index.d.ts +14 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/index.js +2 -1
- package/lib/hooks/use-annotation/get-bounding-rect-un-scaled.d.ts +19 -0
- package/lib/hooks/use-annotation/get-bounding-rect-un-scaled.d.ts.map +1 -0
- package/lib/hooks/use-annotation/get-new-annotation-preview.d.ts +25 -0
- package/lib/hooks/use-annotation/get-new-annotation-preview.d.ts.map +1 -0
- package/lib/hooks/use-annotation/get-new-annotation-preview.js +2 -2
- package/lib/hooks/use-annotation/index.d.ts +74 -0
- package/lib/hooks/use-annotation/index.d.ts.map +1 -0
- package/lib/hooks/use-annotation/index.js +15 -2
- package/lib/hooks/use-annotation/preview-then-call-annotation-adding.d.ts +3 -0
- package/lib/hooks/use-annotation/preview-then-call-annotation-adding.d.ts.map +1 -0
- package/lib/hooks/use-annotation-events.d.ts +11 -0
- package/lib/hooks/use-annotation-events.d.ts.map +1 -0
- package/lib/hooks/use-app-reducer.d.ts +13 -0
- package/lib/hooks/use-app-reducer.d.ts.map +1 -0
- package/lib/hooks/use-app-reducer.js +2 -1
- package/lib/hooks/use-debounced-callback.d.ts +5 -0
- package/lib/hooks/use-debounced-callback.d.ts.map +1 -0
- package/lib/hooks/use-drag.d.ts +8 -0
- package/lib/hooks/use-drag.d.ts.map +1 -0
- package/lib/hooks/use-filter.d.ts +4 -0
- package/lib/hooks/use-filter.d.ts.map +1 -0
- package/lib/hooks/use-finetune.d.ts +5 -0
- package/lib/hooks/use-finetune.d.ts.map +1 -0
- package/lib/hooks/use-image-editor-actions.d.ts +16 -0
- package/lib/hooks/use-image-editor-actions.d.ts.map +1 -0
- package/lib/hooks/use-image-editor-actions.js +147 -0
- package/lib/hooks/use-phone-screen.d.ts +3 -0
- package/lib/hooks/use-phone-screen.d.ts.map +1 -0
- package/lib/hooks/use-popover.d.ts +11 -0
- package/lib/hooks/use-popover.d.ts.map +1 -0
- package/lib/hooks/use-resize-observer.d.ts +12 -0
- package/lib/hooks/use-resize-observer.d.ts.map +1 -0
- package/lib/hooks/use-resize-observer.js +2 -3
- package/lib/hooks/use-store.d.ts +5 -0
- package/lib/hooks/use-store.d.ts.map +1 -0
- package/lib/hooks/use-transformed-img-data.d.ts +20 -0
- package/lib/hooks/use-transformed-img-data.d.ts.map +1 -0
- package/lib/hooks/use-transformed-img-data.js +13 -9
- package/lib/hooks/use-update-effect.d.ts +5 -0
- package/lib/hooks/use-update-effect.d.ts.map +1 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/types/actions.d.ts +197 -0
- package/lib/types/actions.d.ts.map +1 -0
- package/lib/types/annotations.d.ts +181 -0
- package/lib/types/annotations.d.ts.map +1 -0
- package/lib/types/common.d.ts +31 -0
- package/lib/types/common.d.ts.map +1 -0
- package/lib/types/config.d.ts +193 -0
- package/lib/types/config.d.ts.map +1 -0
- package/lib/types/index.d.ts +6 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/state.d.ts +105 -0
- package/lib/types/state.d.ts.map +1 -0
- package/lib/utils/assign-finetune-names-to-konva.d.ts +3 -0
- package/lib/utils/assign-finetune-names-to-konva.d.ts.map +1 -0
- package/lib/utils/calculate-zoom-data.d.ts +9 -0
- package/lib/utils/calculate-zoom-data.d.ts.map +1 -0
- package/lib/utils/calculate-zoom-data.js +5 -4
- package/lib/utils/compare-ratios.d.ts +3 -0
- package/lib/utils/compare-ratios.d.ts.map +1 -0
- package/lib/utils/constants.d.ts +85 -0
- package/lib/utils/constants.d.ts.map +1 -0
- package/lib/utils/crop-image.d.ts +12 -0
- package/lib/utils/crop-image.d.ts.map +1 -0
- package/lib/utils/crop-image.js +10 -4
- package/lib/utils/debounce.d.ts +3 -0
- package/lib/utils/debounce.d.ts.map +1 -0
- package/lib/utils/deep-merge.d.ts +3 -0
- package/lib/utils/deep-merge.d.ts.map +1 -0
- package/lib/utils/extract-current-design-state.d.ts +11 -0
- package/lib/utils/extract-current-design-state.d.ts.map +1 -0
- package/lib/utils/extract-current-design-state.js +3 -2
- package/lib/utils/extract-name-from-url.d.ts +3 -0
- package/lib/utils/extract-name-from-url.d.ts.map +1 -0
- package/lib/utils/filter-str-to-class.d.ts +4 -0
- package/lib/utils/filter-str-to-class.d.ts.map +1 -0
- package/lib/utils/filter-str-to-class.js +2 -1
- package/lib/utils/finetunes-strs-to-classes.d.ts +4 -0
- package/lib/utils/finetunes-strs-to-classes.d.ts.map +1 -0
- package/lib/utils/finetunes-strs-to-classes.js +2 -1
- package/lib/utils/get-center-rotated-point.d.ts +8 -0
- package/lib/utils/get-center-rotated-point.d.ts.map +1 -0
- package/lib/utils/get-default-save-quality.d.ts +3 -0
- package/lib/utils/get-default-save-quality.d.ts.map +1 -0
- package/lib/utils/get-dimensions-minimal-ratio.d.ts +3 -0
- package/lib/utils/get-dimensions-minimal-ratio.d.ts.map +1 -0
- package/lib/utils/get-elem-document-coords.d.ts +9 -0
- package/lib/utils/get-elem-document-coords.d.ts.map +1 -0
- package/lib/utils/get-file-full-name.d.ts +8 -0
- package/lib/utils/get-file-full-name.d.ts.map +1 -0
- package/lib/utils/get-file-full-name.js +3 -3
- package/lib/utils/get-pointer-offset-position-bounded-to-object.d.ts +21 -0
- package/lib/utils/get-pointer-offset-position-bounded-to-object.d.ts.map +1 -0
- package/lib/utils/get-pointer-offset-position-bounded-to-object.js +2 -1
- package/lib/utils/get-proper-dimensions.d.ts +11 -0
- package/lib/utils/get-proper-dimensions.d.ts.map +1 -0
- package/lib/utils/get-proper-dimensions.js +3 -2
- package/lib/utils/get-proper-image-to-canvas-spacing.d.ts +3 -0
- package/lib/utils/get-proper-image-to-canvas-spacing.d.ts.map +1 -0
- package/lib/utils/get-scroll-offset.d.ts +7 -0
- package/lib/utils/get-scroll-offset.d.ts.map +1 -0
- package/lib/utils/get-size-after-rotation.d.ts +9 -0
- package/lib/utils/get-size-after-rotation.d.ts.map +1 -0
- package/lib/utils/get-zoom-fit-factor.d.ts +4 -0
- package/lib/utils/get-zoom-fit-factor.d.ts.map +1 -0
- package/lib/utils/image-to-base64.d.ts +3 -0
- package/lib/utils/image-to-base64.d.ts.map +1 -0
- package/lib/utils/is-default-zero-values-only.d.ts +3 -0
- package/lib/utils/is-default-zero-values-only.d.ts.map +1 -0
- package/lib/utils/is-same-image.d.ts +3 -0
- package/lib/utils/is-same-image.d.ts.map +1 -0
- package/lib/utils/load-image.d.ts +3 -0
- package/lib/utils/load-image.d.ts.map +1 -0
- package/lib/utils/load-image.js +1 -3
- package/lib/utils/map-crop-box.d.ts +16 -0
- package/lib/utils/map-crop-box.d.ts.map +1 -0
- package/lib/utils/map-number.d.ts +3 -0
- package/lib/utils/map-number.d.ts.map +1 -0
- package/lib/utils/map-position-string-to-point.d.ts +8 -0
- package/lib/utils/map-position-string-to-point.d.ts.map +1 -0
- package/lib/utils/random-id.d.ts +3 -0
- package/lib/utils/random-id.d.ts.map +1 -0
- package/lib/utils/restrict-number.d.ts +3 -0
- package/lib/utils/restrict-number.d.ts.map +1 -0
- package/lib/utils/restrict-number.js +2 -2
- package/lib/utils/serialize-design-state.d.ts +27 -0
- package/lib/utils/serialize-design-state.d.ts.map +1 -0
- package/lib/utils/serialize-design-state.js +5 -3
- package/lib/utils/to-precised-float.d.ts +3 -0
- package/lib/utils/to-precised-float.d.ts.map +1 -0
- package/lib/utils/translator.d.ts +6 -0
- package/lib/utils/translator.d.ts.map +1 -0
- package/lib/utils/translator.js +11 -2
- package/package.json +10 -3
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
4
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
5
|
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
6
|
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
|
|
7
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
|
+
import { SFlexBox } from '@solostylist/ui-kit';
|
|
7
9
|
import { memo, useCallback, useEffect, useRef, useState } from 'react';
|
|
8
10
|
import { CircularProgress } from '@mui/material';
|
|
9
11
|
import { HIDE_LOADER, RESET, SET_FEEDBACK, SET_ORIGINAL_IMAGE, SET_SHOWN_TABS_MENU, SHOW_LOADER, UPDATE_STATE } from "../../actions";
|
|
10
12
|
import FeedbackPopup from "../feedback-popup";
|
|
11
13
|
import MainCanvas from "../main-canvas";
|
|
12
14
|
import Tabs from "../tabs";
|
|
13
|
-
import
|
|
15
|
+
import STabsDrawer from "../tabs-drawer";
|
|
14
16
|
import ToolsBar from "../tools-bar";
|
|
15
17
|
import Topbar from "../topbar";
|
|
16
18
|
import { usePhoneScreen, useResizeObserver, useStore, useTransformedImgData } from "../../hooks";
|
|
@@ -20,17 +22,16 @@ import filterStrToClass from "../../utils/filter-str-to-class";
|
|
|
20
22
|
import finetunesStrsToClasses from "../../utils/finetunes-strs-to-classes";
|
|
21
23
|
import isSameImage from "../../utils/is-same-image";
|
|
22
24
|
import loadImage from "../../utils/load-image";
|
|
25
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
26
|
var App = function App() {
|
|
24
|
-
var
|
|
27
|
+
var _ref3, _ref4, _ref5;
|
|
25
28
|
var _useStore = useStore(),
|
|
26
29
|
config = _useStore.config,
|
|
27
30
|
isLoadingGlobally = _useStore.isLoadingGlobally,
|
|
28
31
|
haveNotSavedChanges = _useStore.haveNotSavedChanges,
|
|
29
32
|
dispatch = _useStore.dispatch,
|
|
30
33
|
originalImage = _useStore.originalImage,
|
|
31
|
-
t = _useStore.t
|
|
32
|
-
_useStore$feedback = _useStore.feedback,
|
|
33
|
-
feedback = _useStore$feedback === void 0 ? {} : _useStore$feedback;
|
|
34
|
+
t = _useStore.t;
|
|
34
35
|
var loadableDesignState = config.loadableDesignState,
|
|
35
36
|
source = config.source,
|
|
36
37
|
avoidChangesNotSavedAlertOnLeave = config.avoidChangesNotSavedAlertOnLeave,
|
|
@@ -40,7 +41,13 @@ var App = function App() {
|
|
|
40
41
|
getCurrentImgDataFnRef = config.getCurrentImgDataFnRef,
|
|
41
42
|
updateStateFnRef = config.updateStateFnRef,
|
|
42
43
|
noCrossOrigin = config.noCrossOrigin,
|
|
43
|
-
resetOnImageSourceChange = config.resetOnImageSourceChange
|
|
44
|
+
resetOnImageSourceChange = config.resetOnImageSourceChange,
|
|
45
|
+
containerHeight = config.containerHeight,
|
|
46
|
+
editorHeight = config.editorHeight,
|
|
47
|
+
toolbarHeight = config.toolbarHeight,
|
|
48
|
+
rootSx = config.rootSx,
|
|
49
|
+
rootClassName = config.rootClassName,
|
|
50
|
+
renderEmptyState = config.renderEmptyState;
|
|
44
51
|
var showTabsDrawer = window.matchMedia('(max-width: 760px)').matches;
|
|
45
52
|
var _useResizeObserver = useResizeObserver(),
|
|
46
53
|
_useResizeObserver2 = _slicedToArray(_useResizeObserver, 2),
|
|
@@ -55,6 +62,7 @@ var App = function App() {
|
|
|
55
62
|
setRootSize = _useState2[1];
|
|
56
63
|
var isPhoneScreen = usePhoneScreen();
|
|
57
64
|
var pluginRootRef = useRef(null);
|
|
65
|
+
var uploadInputRef = useRef(null);
|
|
58
66
|
var imageBeingLoadedSrc = useRef(null);
|
|
59
67
|
var haveNotSavedChangesRef = useRef(haveNotSavedChanges);
|
|
60
68
|
var transformImgFn = useTransformedImgData();
|
|
@@ -79,7 +87,11 @@ var App = function App() {
|
|
|
79
87
|
}, []);
|
|
80
88
|
var loadAndSetOriginalImage = function loadAndSetOriginalImage(imgToLoad) {
|
|
81
89
|
return new Promise(function (resolve) {
|
|
82
|
-
var imgSrc = imgToLoad instanceof HTMLImageElement ? imgToLoad.src : imgToLoad;
|
|
90
|
+
var imgSrc = imgToLoad instanceof HTMLImageElement ? imgToLoad === null || imgToLoad === void 0 ? void 0 : imgToLoad.src : imgToLoad;
|
|
91
|
+
if (!imgSrc) {
|
|
92
|
+
resolve();
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
83
95
|
if (imageBeingLoadedSrc.current === imgSrc || !imgSrc && originalImage || isSameImage(imgSrc, originalImage)) {
|
|
84
96
|
if (!imageBeingLoadedSrc.current) {
|
|
85
97
|
resolve();
|
|
@@ -95,8 +107,8 @@ var App = function App() {
|
|
|
95
107
|
if (typeof imgToLoad === 'string') {
|
|
96
108
|
loadImage(imgToLoad, defaultSavedImageName, noCrossOrigin).then(setNewOriginalImage)["catch"](setError)["finally"](triggerResolve);
|
|
97
109
|
} else if (imgToLoad instanceof HTMLImageElement) {
|
|
98
|
-
if (!imgToLoad.
|
|
99
|
-
imgToLoad.
|
|
110
|
+
if (!imgToLoad.title && defaultSavedImageName) {
|
|
111
|
+
imgToLoad.title = defaultSavedImageName;
|
|
100
112
|
}
|
|
101
113
|
if (!imgToLoad.complete) {
|
|
102
114
|
imgToLoad.addEventListener('load', function () {
|
|
@@ -120,18 +132,50 @@ var App = function App() {
|
|
|
120
132
|
e.returnValue = '';
|
|
121
133
|
}
|
|
122
134
|
};
|
|
123
|
-
var handleLoading = function
|
|
124
|
-
var
|
|
125
|
-
|
|
135
|
+
var handleLoading = function () {
|
|
136
|
+
var _ref = _asyncToGenerator(_regeneratorRuntime.mark(function _callee() {
|
|
137
|
+
var loadingPromisesFn,
|
|
138
|
+
_args = arguments;
|
|
139
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
140
|
+
while (1) switch (_context.prev = _context.next) {
|
|
141
|
+
case 0:
|
|
142
|
+
loadingPromisesFn = _args.length > 0 && _args[0] !== undefined ? _args[0] : function () {
|
|
143
|
+
return [];
|
|
144
|
+
};
|
|
145
|
+
dispatch({
|
|
146
|
+
type: SHOW_LOADER
|
|
147
|
+
});
|
|
148
|
+
_context.prev = 1;
|
|
149
|
+
_context.next = 2;
|
|
150
|
+
return Promise.all(loadingPromisesFn());
|
|
151
|
+
case 2:
|
|
152
|
+
_context.prev = 2;
|
|
153
|
+
dispatch({
|
|
154
|
+
type: HIDE_LOADER
|
|
155
|
+
});
|
|
156
|
+
return _context.finish(2);
|
|
157
|
+
case 3:
|
|
158
|
+
case "end":
|
|
159
|
+
return _context.stop();
|
|
160
|
+
}
|
|
161
|
+
}, _callee, null, [[1,, 2, 3]]);
|
|
162
|
+
}));
|
|
163
|
+
return function handleLoading() {
|
|
164
|
+
return _ref.apply(this, arguments);
|
|
126
165
|
};
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
166
|
+
}();
|
|
167
|
+
var handleUploadFiles = function handleUploadFiles(files) {
|
|
168
|
+
var file = Array.isArray(files) ? files[0] : files === null || files === void 0 ? void 0 : files[0];
|
|
169
|
+
if (!file) return;
|
|
170
|
+
var objectUrl = URL.createObjectURL(file);
|
|
171
|
+
void handleLoading(function () {
|
|
172
|
+
return [loadAndSetOriginalImage(objectUrl)["finally"](function () {
|
|
173
|
+
URL.revokeObjectURL(objectUrl);
|
|
174
|
+
})];
|
|
134
175
|
});
|
|
176
|
+
if (uploadInputRef.current) {
|
|
177
|
+
uploadInputRef.current.value = '';
|
|
178
|
+
}
|
|
135
179
|
};
|
|
136
180
|
var updateDesignStateWithLoadableOne = function updateDesignStateWithLoadableOne() {
|
|
137
181
|
if (loadableDesignState && Object.keys(loadableDesignState).length > 0) {
|
|
@@ -150,6 +194,14 @@ var App = function App() {
|
|
|
150
194
|
return [loadAndSetOriginalImage(source)];
|
|
151
195
|
});
|
|
152
196
|
}
|
|
197
|
+
if (!source) {
|
|
198
|
+
dispatch({
|
|
199
|
+
type: SET_ORIGINAL_IMAGE,
|
|
200
|
+
payload: {
|
|
201
|
+
originalImage: undefined
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
}
|
|
153
205
|
if (resetOnImageSourceChange) {
|
|
154
206
|
dispatch({
|
|
155
207
|
type: RESET,
|
|
@@ -171,9 +223,9 @@ var App = function App() {
|
|
|
171
223
|
}, [loadableDesignState]);
|
|
172
224
|
useEffect(function () {
|
|
173
225
|
if (observePluginContainerSize && pluginRootRef.current) {
|
|
174
|
-
observeResize(pluginRootRef.current.parentNode, function (
|
|
175
|
-
var width =
|
|
176
|
-
height =
|
|
226
|
+
observeResize(pluginRootRef.current.parentNode, function (_ref2) {
|
|
227
|
+
var width = _ref2.width,
|
|
228
|
+
height = _ref2.height;
|
|
177
229
|
return setRootSize({
|
|
178
230
|
width: width,
|
|
179
231
|
height: height
|
|
@@ -188,7 +240,8 @@ var App = function App() {
|
|
|
188
240
|
}, [observePluginContainerSize, observeResize, unobserveElement]);
|
|
189
241
|
useEffect(function () {
|
|
190
242
|
var initialRequestsPromisesFn = function initialRequestsPromisesFn() {
|
|
191
|
-
|
|
243
|
+
var _loadableDesignState$;
|
|
244
|
+
return [loadAndSetOriginalImage((_loadableDesignState$ = loadableDesignState === null || loadableDesignState === void 0 ? void 0 : loadableDesignState.imgSrc) !== null && _loadableDesignState$ !== void 0 ? _loadableDesignState$ : source)];
|
|
192
245
|
};
|
|
193
246
|
void handleLoading(initialRequestsPromisesFn);
|
|
194
247
|
if (window && !avoidChangesNotSavedAlertOnLeave) {
|
|
@@ -227,57 +280,82 @@ var App = function App() {
|
|
|
227
280
|
});
|
|
228
281
|
};
|
|
229
282
|
var renderContent = function renderContent() {
|
|
230
|
-
return
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
283
|
+
return _jsxs(_Fragment, {
|
|
284
|
+
children: [originalImage && !showCanvasOnly && _jsxs(_Fragment, {
|
|
285
|
+
children: [showTabsDrawer && _jsx(STabsDrawer, {
|
|
286
|
+
toggleMainMenu: toggleMainMenu
|
|
287
|
+
}), _jsx(Topbar, {
|
|
288
|
+
toggleMainMenu: toggleMainMenu
|
|
289
|
+
})]
|
|
290
|
+
}), _jsxs(SFlexBox, {
|
|
291
|
+
sx: {
|
|
292
|
+
width: '100%',
|
|
293
|
+
flexGrow: 1,
|
|
294
|
+
minHeight: 0
|
|
295
|
+
},
|
|
296
|
+
children: [!showCanvasOnly && !showTabsDrawer && _jsx(Tabs, {
|
|
297
|
+
toggleMainMenu: toggleMainMenu
|
|
298
|
+
}), _jsxs(SFlexBox, {
|
|
299
|
+
sx: {
|
|
300
|
+
height: '100%',
|
|
301
|
+
flexGrow: 1,
|
|
302
|
+
flexDirection: 'column',
|
|
303
|
+
minWidth: 0,
|
|
304
|
+
minHeight: 0,
|
|
305
|
+
overflow: 'hidden'
|
|
306
|
+
},
|
|
307
|
+
children: [_jsx(SFlexBox, {
|
|
308
|
+
sx: {
|
|
309
|
+
flexGrow: 1,
|
|
310
|
+
minHeight: 0,
|
|
311
|
+
minWidth: 0,
|
|
312
|
+
overflow: 'hidden',
|
|
313
|
+
paddingBottom: 'var(--s-image-editor-toolbar-height, 120px)'
|
|
314
|
+
},
|
|
315
|
+
children: originalImage ? _jsx(MainCanvas, {}) : renderEmptyState ? _jsx(_Fragment, {
|
|
316
|
+
children: renderEmptyState({
|
|
317
|
+
onUpload: handleUploadFiles
|
|
318
|
+
})
|
|
319
|
+
}) : _jsx(_Fragment, {})
|
|
320
|
+
}), originalImage && !showCanvasOnly && _jsx(ToolsBar, {})]
|
|
321
|
+
})]
|
|
322
|
+
})]
|
|
323
|
+
});
|
|
250
324
|
};
|
|
251
|
-
return
|
|
252
|
-
className: ROOT_CONTAINER_CLASS_NAME,
|
|
325
|
+
return _jsxs(SFlexBox, {
|
|
253
326
|
"data-phone": isPhoneScreen,
|
|
254
327
|
ref: pluginRootRef,
|
|
255
|
-
|
|
256
|
-
|
|
328
|
+
className: rootClassName ? "".concat(ROOT_CONTAINER_CLASS_NAME, " ").concat(rootClassName) : ROOT_CONTAINER_CLASS_NAME,
|
|
329
|
+
sx: _objectSpread({
|
|
330
|
+
backgroundColor: 'var(--s-palette-background-default, var(--working-background))',
|
|
331
|
+
backgroundImage: 'radial-gradient(circle at 1px 1px, var(--s-palette-divider) 1px, transparent 0)',
|
|
332
|
+
backgroundSize: '12px 12px',
|
|
257
333
|
flexDirection: 'column',
|
|
258
334
|
alignItems: 'center',
|
|
259
|
-
height: (
|
|
260
|
-
maxHeight: '
|
|
261
|
-
width: (
|
|
335
|
+
height: (_ref3 = editorHeight !== null && editorHeight !== void 0 ? editorHeight : containerHeight) !== null && _ref3 !== void 0 ? _ref3 : '70vh',
|
|
336
|
+
maxHeight: (_ref4 = editorHeight !== null && editorHeight !== void 0 ? editorHeight : containerHeight) !== null && _ref4 !== void 0 ? _ref4 : '70vh',
|
|
337
|
+
width: (_ref5 = observePluginContainerSize ? rootSize.width : undefined) !== null && _ref5 !== void 0 ? _ref5 : '100%',
|
|
262
338
|
maxWidth: '100%',
|
|
263
|
-
overflow:
|
|
339
|
+
overflow: 'hidden',
|
|
264
340
|
position: 'relative',
|
|
265
|
-
minHeight:
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
341
|
+
minHeight: 0,
|
|
342
|
+
'--s-image-editor-toolbar-height': toolbarHeight !== null && toolbarHeight !== void 0 ? toolbarHeight : '0px'
|
|
343
|
+
}, rootSx !== null && rootSx !== void 0 ? rootSx : {}),
|
|
344
|
+
children: [isLoadingGlobally && _jsx(CircularProgress, {
|
|
345
|
+
sx: {
|
|
346
|
+
position: 'absolute',
|
|
347
|
+
zIndex: 11111,
|
|
348
|
+
top: '50%',
|
|
349
|
+
left: '50%',
|
|
350
|
+
transform: 'translate(-50%, -50%)',
|
|
351
|
+
userSelect: 'none'
|
|
352
|
+
}
|
|
353
|
+
}), renderContent(), _jsx(FeedbackPopup, {
|
|
354
|
+
anchorOrigin: {
|
|
355
|
+
vertical: 'top',
|
|
356
|
+
horizontal: 'center'
|
|
357
|
+
}
|
|
358
|
+
})]
|
|
359
|
+
});
|
|
282
360
|
};
|
|
283
361
|
export default memo(App);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** External Dependencies */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ImageEditorConfig } from 'types/config';
|
|
4
|
+
interface AssemblyPointProps extends ImageEditorConfig {
|
|
5
|
+
}
|
|
6
|
+
declare const _default: React.MemoExoticComponent<(props: AssemblyPointProps) => import("react/jsx-runtime").JSX.Element>;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/assembly-point/index.tsx"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,KAA0B,MAAM,OAAO,CAAC;AAS/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,UAAU,kBAAmB,SAAQ,iBAAiB;CAAG;0DAE3B,kBAAkB;AAkBhD,wBAAmC"}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import React, { useEffect, memo } from 'react';
|
|
2
|
-
import { SThemeProvider } from '@solostylist/ui-kit
|
|
2
|
+
import { SThemeProvider } from '@solostylist/ui-kit';
|
|
3
3
|
import App from "../app";
|
|
4
4
|
import { AppProvider } from "../../context";
|
|
5
5
|
import defaultConfig from "../../context/default-config";
|
|
6
6
|
import deepMerge from "../../utils/deep-merge";
|
|
7
7
|
import assignFinetuneNamesToKonva from "../../utils/assign-finetune-names-to-konva";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
9
|
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
10
|
useEffect(function () {
|
|
14
11
|
assignFinetuneNamesToKonva();
|
|
15
12
|
}, []);
|
|
16
13
|
var defaultAndProvidedConfigMerged = deepMerge(defaultConfig, props);
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
return _jsx(React.StrictMode, {
|
|
15
|
+
children: _jsx(SThemeProvider, {
|
|
16
|
+
defaultMode: "dark",
|
|
17
|
+
children: _jsx(AppProvider, {
|
|
18
|
+
config: defaultAndProvidedConfigMerged,
|
|
19
|
+
children: _jsx(App, {})
|
|
20
|
+
})
|
|
21
|
+
})
|
|
22
|
+
});
|
|
22
23
|
};
|
|
23
24
|
export default memo(AssemblyPoint);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const AVAILABLE_POSITIONS: string[];
|
|
2
|
+
export declare const posCssRotateDegFromRightSide: Record<string, number>;
|
|
3
|
+
export declare const POPPABLE_OPTIONS: {
|
|
4
|
+
readonly OPACITY: "opacity";
|
|
5
|
+
readonly STROKE: "stroke";
|
|
6
|
+
readonly SHADOW: "shadow";
|
|
7
|
+
readonly POSITION: "position";
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=annotation-options.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annotation-options.constants.d.ts","sourceRoot":"","sources":["../../../../src/components/common/annotation-options/annotation-options.constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB,EAAE,MAAM,EAA6B,CAAC;AAEtE,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAU/D,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;CAKnB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Annotation } from 'types/annotations';
|
|
2
|
+
interface PoppableOption {
|
|
3
|
+
titleKey: string;
|
|
4
|
+
name: string;
|
|
5
|
+
Icon: React.ComponentType;
|
|
6
|
+
}
|
|
7
|
+
interface AnnotationOptionsProps {
|
|
8
|
+
annotation: Annotation;
|
|
9
|
+
updateAnnotation: (updates: Partial<Annotation>) => void;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
hideFillOption?: boolean;
|
|
12
|
+
morePoppableOptionsPrepended?: PoppableOption[];
|
|
13
|
+
morePoppableOptionsAppended?: PoppableOption[];
|
|
14
|
+
moreOptionsPopupComponentsObj?: Record<string, React.ComponentType<any>>;
|
|
15
|
+
hidePositionField?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}
|
|
19
|
+
declare const AnnotationOptions: ({ children, morePoppableOptionsPrepended, moreOptionsPopupComponentsObj, morePoppableOptionsAppended, annotation, updateAnnotation, hideFillOption, hidePositionField, ...rest }: AnnotationOptionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export default AnnotationOptions;
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/common/annotation-options/index.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAY/C,UAAU,cAAc;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC;CAC3B;AAED,UAAU,sBAAsB;IAC9B,UAAU,EAAE,UAAU,CAAC;IACvB,gBAAgB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IACzD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,4BAA4B,CAAC,EAAE,cAAc,EAAE,CAAC;IAChD,2BAA2B,CAAC,EAAE,cAAc,EAAE,CAAC;IAC/C,6BAA6B,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;IACzE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,QAAA,MAAM,iBAAiB,GAAI,kLAUxB,sBAAsB,4CAgJxB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
4
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
@@ -12,7 +11,7 @@ import Menu from '@mui/material/Menu';
|
|
|
12
11
|
import Typography from '@mui/material/Typography';
|
|
13
12
|
import { useStore } from "../../../hooks";
|
|
14
13
|
import { useCallback, useMemo, useState } from 'react';
|
|
15
|
-
import { SFlexBox } from '@solostylist/ui-kit
|
|
14
|
+
import { SFlexBox } from '@solostylist/ui-kit';
|
|
16
15
|
import ColorInput from "../color-input";
|
|
17
16
|
import SIconButtonWrapper from "../icon-wrapper";
|
|
18
17
|
import { POPPABLE_OPTIONS } from "./annotation-options.constants";
|
|
@@ -20,6 +19,7 @@ import OpacityField from "./opacity-field";
|
|
|
20
19
|
import PositionFields from "./position-fields";
|
|
21
20
|
import ShadowFields from "./shadow-fields";
|
|
22
21
|
import StrokeFields from "./stroke-fields";
|
|
22
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
23
|
var AnnotationOptions = function AnnotationOptions(_ref) {
|
|
24
24
|
var _ref$children = _ref.children,
|
|
25
25
|
children = _ref$children === void 0 ? undefined : _ref$children,
|
|
@@ -70,8 +70,8 @@ var AnnotationOptions = function AnnotationOptions(_ref) {
|
|
|
70
70
|
}, [moreOptionsPopupComponentsObj, morePoppableOptionsAppended]);
|
|
71
71
|
var toggleOptionPopup = useCallback(function (e, targetOptionName) {
|
|
72
72
|
var targetAnchorEl = e === null || e === void 0 ? void 0 : e.currentTarget;
|
|
73
|
-
setAnchorEl(targetAnchorEl
|
|
74
|
-
setCurrentOption(targetOptionName
|
|
73
|
+
setAnchorEl(targetAnchorEl !== null && targetAnchorEl !== void 0 ? targetAnchorEl : null);
|
|
74
|
+
setCurrentOption(targetOptionName !== null && targetOptionName !== void 0 ? targetOptionName : null);
|
|
75
75
|
}, []);
|
|
76
76
|
var changeAnnotationFill = useCallback(function (newFill) {
|
|
77
77
|
updateAnnotation({
|
|
@@ -80,61 +80,67 @@ var AnnotationOptions = function AnnotationOptions(_ref) {
|
|
|
80
80
|
}, [updateAnnotation]);
|
|
81
81
|
var OptionPopupComponent = anchorEl && currentOption && optionsPopups[currentOption];
|
|
82
82
|
var renderPositionFields = function renderPositionFields() {
|
|
83
|
-
return
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
83
|
+
return _jsxs(_Fragment, {
|
|
84
|
+
children: [_jsx(Typography, {
|
|
85
|
+
variant: "subtitle2",
|
|
86
|
+
mb: 1,
|
|
87
|
+
children: t('position')
|
|
88
|
+
}), _jsx(Box, {
|
|
89
|
+
sx: {
|
|
90
|
+
display: 'grid',
|
|
91
|
+
gridTemplateColumns: 'repeat(4, auto)'
|
|
92
|
+
},
|
|
93
|
+
children: _jsx(OptionPopupComponent, _objectSpread({
|
|
94
|
+
annotation: annotation,
|
|
95
|
+
updateAnnotation: updateAnnotation,
|
|
96
|
+
t: t
|
|
97
|
+
}, rest))
|
|
98
|
+
})]
|
|
99
|
+
});
|
|
96
100
|
};
|
|
97
|
-
return
|
|
101
|
+
return _jsxs(SFlexBox, {
|
|
98
102
|
alignItems: "center",
|
|
99
103
|
justifyContent: "center",
|
|
100
|
-
gap: 1
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
104
|
+
gap: 1,
|
|
105
|
+
children: [!hideFillOption && _jsx(ColorInput, {
|
|
106
|
+
color: annotation.fill,
|
|
107
|
+
onChange: changeAnnotationFill,
|
|
108
|
+
colorFor: "fill"
|
|
109
|
+
}), children, options.map(function (option) {
|
|
110
|
+
return option && _jsx(SIconButtonWrapper, {
|
|
111
|
+
title: t(option.titleKey),
|
|
112
|
+
onClick: function onClick(e) {
|
|
113
|
+
return toggleOptionPopup(e, option.name);
|
|
114
|
+
},
|
|
115
|
+
active: currentOption === option.name,
|
|
116
|
+
children: _jsx(option.Icon, {})
|
|
117
|
+
}, option.name);
|
|
118
|
+
}), OptionPopupComponent && _jsx(Menu, {
|
|
119
|
+
anchorEl: anchorEl,
|
|
120
|
+
open: Boolean(anchorEl),
|
|
121
|
+
onClose: toggleOptionPopup,
|
|
122
|
+
anchorOrigin: {
|
|
123
|
+
vertical: 'top',
|
|
124
|
+
horizontal: 'center'
|
|
111
125
|
},
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
transformOrigin: {
|
|
123
|
-
vertical: 'bottom',
|
|
124
|
-
horizontal: 'center'
|
|
125
|
-
},
|
|
126
|
-
slotProps: {
|
|
127
|
-
paper: {
|
|
128
|
-
sx: {
|
|
129
|
-
px: 2,
|
|
130
|
-
py: 1
|
|
126
|
+
transformOrigin: {
|
|
127
|
+
vertical: 'bottom',
|
|
128
|
+
horizontal: 'center'
|
|
129
|
+
},
|
|
130
|
+
slotProps: {
|
|
131
|
+
paper: {
|
|
132
|
+
sx: {
|
|
133
|
+
px: 2,
|
|
134
|
+
py: 1
|
|
135
|
+
}
|
|
131
136
|
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
},
|
|
138
|
+
children: currentOption === POPPABLE_OPTIONS.POSITION ? renderPositionFields() : _jsx(OptionPopupComponent, _objectSpread({
|
|
139
|
+
annotation: annotation,
|
|
140
|
+
updateAnnotation: updateAnnotation,
|
|
141
|
+
t: t
|
|
142
|
+
}, rest))
|
|
143
|
+
})]
|
|
144
|
+
});
|
|
139
145
|
};
|
|
140
146
|
export default AnnotationOptions;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Internal Dependencies */
|
|
2
|
+
import { AnnotationsCommon } from 'types';
|
|
3
|
+
interface OpacityFieldProps {
|
|
4
|
+
annotation: AnnotationsCommon;
|
|
5
|
+
updateAnnotation: (updates: Partial<AnnotationsCommon>) => void;
|
|
6
|
+
t: (key: string) => string;
|
|
7
|
+
}
|
|
8
|
+
declare const OpacityField: ({ annotation, updateAnnotation, t, }: OpacityFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default OpacityField;
|
|
10
|
+
//# sourceMappingURL=opacity-field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opacity-field.d.ts","sourceRoot":"","sources":["../../../../src/components/common/annotation-options/opacity-field.tsx"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAO1C,UAAU,iBAAiB;IACzB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,gBAAgB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAChE,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5B;AAED,QAAA,MAAM,YAAY,GAAI,sCAInB,iBAAiB,4CAsBnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import restrictNumber from "../../../utils/restrict-number";
|
|
2
2
|
import Slider from "../slider";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
4
|
var MIN_PERCENTANGE = 0;
|
|
4
5
|
var MAX_PERCENTANGE = 1;
|
|
5
6
|
var OpacityField = function OpacityField(_ref) {
|
|
@@ -13,7 +14,7 @@ var OpacityField = function OpacityField(_ref) {
|
|
|
13
14
|
opacity: restrictNumber(newOpactiy / 100, MIN_PERCENTANGE, MAX_PERCENTANGE)
|
|
14
15
|
});
|
|
15
16
|
};
|
|
16
|
-
return
|
|
17
|
+
return _jsx(Slider, {
|
|
17
18
|
label: t('transparency'),
|
|
18
19
|
onChange: changeOpacity,
|
|
19
20
|
value: opacityValue,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Annotation } from 'types';
|
|
2
|
+
interface PositionFieldsProps {
|
|
3
|
+
annotation: Annotation;
|
|
4
|
+
updateAnnotation: (updates: Partial<Annotation>) => void;
|
|
5
|
+
}
|
|
6
|
+
declare const PositionFields: ({ annotation, updateAnnotation, }: PositionFieldsProps) => import("react/jsx-runtime").JSX.Element[];
|
|
7
|
+
export default PositionFields;
|
|
8
|
+
//# sourceMappingURL=position-fields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position-fields.d.ts","sourceRoot":"","sources":["../../../../src/components/common/annotation-options/position-fields.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,UAAU,mBAAmB;IAC3B,UAAU,EAAE,UAAU,CAAC;IACvB,gBAAgB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;CAC1D;AAED,QAAA,MAAM,cAAc,GAAI,mCAGrB,mBAAmB,8CAkCrB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -6,6 +6,7 @@ import mapPositionStringToPoint from "../../../utils/map-position-string-to-poin
|
|
|
6
6
|
import { useStore } from "../../../hooks";
|
|
7
7
|
import SIconButtonWrapper from "../icon-wrapper";
|
|
8
8
|
import { AVAILABLE_POSITIONS, posCssRotateDegFromRightSide } from "./annotation-options.constants";
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
10
|
var PositionFields = function PositionFields(_ref) {
|
|
10
11
|
var annotation = _ref.annotation,
|
|
11
12
|
updateAnnotation = _ref.updateAnnotation;
|
|
@@ -21,19 +22,20 @@ var PositionFields = function PositionFields(_ref) {
|
|
|
21
22
|
};
|
|
22
23
|
var positionsLength = AVAILABLE_POSITIONS.length;
|
|
23
24
|
return AVAILABLE_POSITIONS.map(function (pos, i) {
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
return _jsxs(Fragment, {
|
|
26
|
+
children: [_jsx(SIconButtonWrapper, {
|
|
27
|
+
onClick: function onClick() {
|
|
28
|
+
return changePosition(pos);
|
|
29
|
+
},
|
|
30
|
+
active: position === pos,
|
|
31
|
+
border: true,
|
|
32
|
+
children: pos === POSITIONS.MIDDLE_CENTER ? _jsx(FiberManualRecordOutlined, {}) : _jsx(ArrowForwardOutlined, {
|
|
33
|
+
style: {
|
|
34
|
+
transform: "rotate(".concat(posCssRotateDegFromRightSide[pos], "deg)")
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
}), (i + 1) % 3 === 0 && i + 1 !== positionsLength && _jsx("div", {})]
|
|
38
|
+
}, pos);
|
|
37
39
|
});
|
|
38
40
|
};
|
|
39
41
|
export default PositionFields;
|