@solostylist/image-editor 1.0.0 → 1.0.2
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/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/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-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/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-flip.js +1 -1
- 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 +1 -1
- package/lib/components/assembly-point/index.d.ts +9 -0
- package/lib/components/assembly-point/index.d.ts.map +1 -0
- package/lib/components/assembly-point/index.js +1 -1
- 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 +1 -1
- 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 +1 -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/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 +1 -1
- 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/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/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 +1 -1
- 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/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/icon-wrapper/index.d.ts +16 -0
- package/lib/components/common/icon-wrapper/index.d.ts.map +1 -0
- 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/slider/index.d.ts +12 -0
- package/lib/components/common/slider/index.d.ts.map +1 -0
- package/lib/components/feedback-popup/index.d.ts +8 -0
- package/lib/components/feedback-popup/index.d.ts.map +1 -0
- 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/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/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/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/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/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/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/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/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/index.d.ts +3 -0
- package/lib/components/layers/design-layer/index.d.ts.map +1 -0
- 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/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 +1 -1
- 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/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 +1 -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 +1 -1
- 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 +1 -1
- 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/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 +1 -1
- 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 +1 -1
- 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/tabs.constants.js +1 -1
- 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 +1 -1
- 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-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 +1 -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 +1 -1
- 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 +1 -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.d.ts +8 -0
- package/lib/components/tools/brightness/brightness.d.ts.map +1 -0
- package/lib/components/tools/brightness/brightness.js +1 -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.d.ts +8 -0
- package/lib/components/tools/contrast/contrast.d.ts.map +1 -0
- package/lib/components/tools/contrast/contrast.js +1 -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.constants.js +1 -1
- 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 +1 -1
- 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-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 +1 -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 +10 -0
- package/lib/components/tools/filters/filter-item.d.ts.map +1 -0
- 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 +3 -0
- package/lib/components/tools/filters/filters.d.ts.map +1 -0
- 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 +1 -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 +1 -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/hsvoptions.d.ts +6 -0
- package/lib/components/tools/hsv/hsvoptions.d.ts.map +1 -0
- 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-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 +1 -1
- 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 +1 -1
- 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/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-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 +1 -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-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 +1 -1
- 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-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 +1 -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.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 +1 -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-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 +1 -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/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-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 +1 -1
- 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-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/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 +1 -1
- 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 +1 -1
- 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/tools.constants.d.ts +9 -0
- package/lib/components/tools/tools.constants.d.ts.map +1 -0
- package/lib/components/tools/tools.constants.js +1 -1
- 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.d.ts +8 -0
- package/lib/components/tools/warmth/warmth.d.ts.map +1 -0
- 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.d.ts +3 -0
- package/lib/components/tools/watermark/watermark.d.ts.map +1 -0
- package/lib/components/tools/watermark/watermark.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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/confirmation-modal.d.ts +8 -0
- package/lib/components/topbar/confirmation-modal.d.ts.map +1 -0
- 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/index.d.ts +7 -0
- package/lib/components/topbar/index.d.ts.map +1 -0
- package/lib/components/topbar/index.js +1 -1
- 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/reset-button.d.ts +3 -0
- package/lib/components/topbar/reset-button.d.ts.map +1 -0
- 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 +1 -1
- 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/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.d.ts +10 -0
- package/lib/context/app-provider.d.ts.map +1 -0
- package/lib/context/app-provider.js +1 -1
- package/lib/context/app-reducer.d.ts +5 -0
- package/lib/context/app-reducer.d.ts.map +1 -0
- 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 +3 -0
- package/lib/context/default-translations.d.ts.map +1 -0
- package/lib/context/default-translations.js +1 -1
- 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 +1 -1
- 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 +1 -0
- package/lib/demo/index.d.ts +2 -0
- package/lib/demo/index.d.ts.map +1 -0
- package/lib/demo/index.js +1 -0
- package/lib/hooks/index.d.ts +13 -0
- package/lib/hooks/index.d.ts.map +1 -0
- 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/index.d.ts +74 -0
- package/lib/hooks/use-annotation/index.d.ts.map +1 -0
- package/lib/hooks/use-annotation/index.js +1 -1
- 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-annotation-events.js +1 -1
- 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-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-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-store.d.ts +5 -0
- package/lib/hooks/use-store.d.ts.map +1 -0
- package/lib/hooks/use-store.js +1 -1
- 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 +1 -1
- 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 -345
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +1 -1
- package/lib/types/actions.d.ts +204 -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/annotations.js +1 -1
- package/lib/types/common.d.ts +31 -0
- package/lib/types/common.d.ts.map +1 -0
- package/lib/types/config.d.ts +144 -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/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/constants.js +1 -1
- package/lib/utils/crop-image.d.ts +10 -0
- package/lib/utils/crop-image.d.ts.map +1 -0
- 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/deep-merge.js +1 -1
- 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-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/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 +1 -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-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 +1 -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-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/is-same-image.js +1 -1
- package/lib/utils/load-image.d.ts +3 -0
- package/lib/utils/load-image.d.ts.map +1 -0
- 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/map-position-string-to-point.js +1 -1
- 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/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 +1 -0
- 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 +3 -0
- package/lib/utils/translator.d.ts.map +1 -0
- package/lib/utils/translator.js +1 -1
- package/package.json +63 -61
- package/lib/components/tools/crop/crop-preset-item.js +0 -1
- package/lib/components/tools/crop/crop-presets-option.js +0 -1
- package/lib/components/tools-bar/tools-bar-item-options-wrapper.js +0 -1
- package/lib/utils/cloudimage-query-to-design-state.js +0 -1
- package/lib/utils/get-image-sealing-params.js +0 -1
- package/lib/utils/operations-to-cloudimage-url.js +0 -1
- package/lib/utils/rgba-to-hexa.js +0 -1
- package/lib/utils/sha1.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-resize-observer.d.ts","sourceRoot":"","sources":["../../src/hooks/use-resize-observer.ts"],"names":[],"mappings":"AAGA,UAAU,kBAAkB;IAC1B,KAAK,EAAE,mBAAmB,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,KAAK,gBAAgB,GAAG,CAAC,IAAI,EAAE,kBAAkB,KAAK,IAAI,CAAC;AAE3D,KAAK,gBAAgB,GAAG,CACtB,OAAO,EAAE,OAAO,EAChB,mBAAmB,CAAC,EAAE,gBAAgB,KACnC,IAAI,CAAC;AACV,KAAK,kBAAkB,GAAG,CACxB,OAAO,EAAE,OAAO,EAChB,mBAAmB,CAAC,EAAE,gBAAgB,KACnC,IAAI,CAAC;AACV,KAAK,wBAAwB,GAAG,CAAC,mBAAmB,EAAE,gBAAgB,KAAK,IAAI,CAAC;AAEhF,QAAA,MAAM,iBAAiB,GACrB,WAAU,gBAA2B,KACpC,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,wBAAwB,CA8EjE,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-store.d.ts","sourceRoot":"","sources":["../../src/hooks/use-store.ts"],"names":[],"mappings":"AAGA,4BAA4B;AAC5B,OAAmB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAElE,QAAA,MAAM,QAAQ,QAAO,eAAyC,CAAC;AAC/D,eAAe,QAAQ,CAAC"}
|
package/lib/hooks/use-store.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useContext}from"react";import AppContext from"context";var useStore=function(){return useContext(AppContext)};export default useStore;
|
|
1
|
+
import{useContext}from"react";import AppContext from"context/app-context";var useStore=function(){return useContext(AppContext)};export default useStore;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SavedImageData } from 'types/common';
|
|
2
|
+
import { ImageDesignState } from 'types/state';
|
|
3
|
+
interface ImageFileInfo {
|
|
4
|
+
name?: string;
|
|
5
|
+
extension?: string;
|
|
6
|
+
quality?: number;
|
|
7
|
+
size?: {
|
|
8
|
+
width?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
interface TransformedImgResult {
|
|
13
|
+
imageData: SavedImageData | Record<string, any>;
|
|
14
|
+
designState: ImageDesignState;
|
|
15
|
+
hideLoadingSpinner?: () => void;
|
|
16
|
+
}
|
|
17
|
+
type GetTransformedDataFn = (imageFileInfo?: ImageFileInfo, pixelRatio?: boolean | number, keepLoadingSpinnerShown?: boolean) => TransformedImgResult;
|
|
18
|
+
declare const useTransformedImgData: () => GetTransformedDataFn;
|
|
19
|
+
export default useTransformedImgData;
|
|
20
|
+
//# sourceMappingURL=use-transformed-img-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-transformed-img-data.d.ts","sourceRoot":"","sources":["../../src/hooks/use-transformed-img-data.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAY/C,UAAU,aAAa;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5C;AAED,UAAU,oBAAoB;IAC5B,SAAS,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChD,WAAW,EAAE,gBAAgB,CAAC;IAC9B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACjC;AAED,KAAK,oBAAoB,GAAG,CAC1B,aAAa,CAAC,EAAE,aAAa,EAC7B,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,EAC7B,uBAAuB,CAAC,EAAE,OAAO,KAC9B,oBAAoB,CAAC;AAE1B,QAAA,MAAM,qBAAqB,QAAO,oBAkLjC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _defineProperty from"@babel/runtime/helpers/defineProperty";
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _defineProperty from"@babel/runtime/helpers/defineProperty";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import Konva from"konva";import{HIDE_LOADER,SET_SAVED}from"actions";import{ELLIPSE_CROP,IMAGE_NODE_ID,SUPPORTED_IMAGE_TYPES}from"utils/constants";import getFileFullName from"utils/get-file-full-name";import getSizeAfterRotation from"utils/get-size-after-rotation";import mapCropBox from"utils/map-crop-box";import{serializeDesignState}from"utils/serialize-design-state";import useStore from"./use-store";var useTransformedImgData=function(){var a=useStore(),b=a.dispatch,c=a.designLayer,d=a.shownImageDimensions,e=a.originalImage,f=a.resize,g=void 0===f?{}:f,h=a.adjustments,i=void 0===h?{}:h,j=i.crop,k=void 0===j?{}:j,l=i.rotation,m=void 0===l?0:l,n=a.config,o=n.savingPixelRatio,p=n.previewPixelRatio,q=n.forceToPngInEllipticalCrop,r=n.defaultSavedImageType;return function(){var f=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},h=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1],i=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2],j=_objectSpread({size:g},f);Konva.pixelRatio=h||o;var l=c.attrs,n=l.clipWidth,s=l.clipHeight,t=l.clipX,u=l.clipY;c.setAttr("isSaving",!0);var v=c.getStage().clone({width:e.width,height:e.height,scaleX:1,scaleY:1}),w=_slicedToArray(v.children,1),x=w[0];v.children[1].destroy();var y=v.findOne("#".concat(IMAGE_NODE_ID));null===y||void 0===y||y.cache();var z={x:v.width()/d.width,y:v.height()/d.height};x.setAttrs({rotation:0,offsetX:0,offsetY:0,x:0,y:0,scaleX:z.x,scaleY:z.y});var A=_objectSpread(_objectSpread({},(!j.name||!j.extension)&&getFileFullName(e.name,q&&k.ratio===ELLIPSE_CROP?"png":SUPPORTED_IMAGE_TYPES.includes(null===r||void 0===r?void 0:r.toLowerCase())&&r||void 0)),j),B=A.name,C=A.extension,D=A.quality,E=void 0===D?92:D,F=A.size,G=void 0===F?{}:F,H=["jpeg","jpg","webp"].includes(C),I=mapCropBox(k.noEffect?{x:0,y:0}:{x:k.x||t,y:k.y||u,width:k.width||n,height:k.height||s},d,v.attrs),J=getSizeAfterRotation(I.width,I.height,m);if(v.setAttrs({offsetX:I.width/2+(I.x||0),offsetY:I.height/2+(I.y||0),width:J.width,height:J.height,x:J.width/2,y:J.height/2,rotation:m}),G.width){var K=G.width/v.width();v.setAttrs({scaleX:K,width:G.width,x:v.x()*Math.abs(K)})}if(G.height){var L=G.height/v.height();v.setAttrs({scaleY:L,height:G.height,y:v.y()*Math.abs(L)})}var M=_objectSpread({mimeType:"image/".concat("jpg"===C?"jpeg":C)},H?{quality:E}:{}),N=v.toCanvas(M),O=v.toDataURL(M),P=serializeDesignState(a,!0),Q=_objectSpread({fullName:"".concat(B,".").concat(C),name:B,extension:C,mimeType:"image/".concat(C),imageCanvas:N,imageBase64:O,width:G.width||I.width,height:G.height||I.height},H?{quality:E}:{});c.setAttr("isSaving",!1),b({type:SET_SAVED}),null===y||void 0===y||y.clearCache(),v.destroy(),Konva.pixelRatio=p;var R=function(){b({type:HIDE_LOADER})};return i||R(),{imageData:Q,designState:P,hideLoadingSpinner:R}}};export default useTransformedImgData;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** External Dependencies */
|
|
2
|
+
import { DependencyList, EffectCallback } from 'react';
|
|
3
|
+
declare const useUpdateEffect: (effectCallback: EffectCallback, dependencies: DependencyList) => void;
|
|
4
|
+
export default useUpdateEffect;
|
|
5
|
+
//# sourceMappingURL=use-update-effect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-update-effect.d.ts","sourceRoot":"","sources":["../../src/hooks/use-update-effect.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,EAAqB,cAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE1E,QAAA,MAAM,eAAe,GACnB,gBAAgB,cAAc,EAC9B,cAAc,cAAc,KAC3B,IAmBF,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,345 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
FINETUNE: 'Finetune',
|
|
8
|
-
FILTERS: 'Filters',
|
|
9
|
-
ADJUST: 'Adjust',
|
|
10
|
-
WATERMARK: 'Watermark',
|
|
11
|
-
ANNOTATE: 'Annotate',
|
|
12
|
-
RESIZE: 'Resize',
|
|
13
|
-
} as const;
|
|
14
|
-
|
|
15
|
-
declare const TOOLS = {
|
|
16
|
-
CROP: 'Crop',
|
|
17
|
-
ROTATE: 'Rotate',
|
|
18
|
-
FLIP_X: 'Flip_X',
|
|
19
|
-
FLIP_Y: 'Flip_Y',
|
|
20
|
-
BRIGHTNESS: 'Brightness',
|
|
21
|
-
CONTRAST: 'Contrast',
|
|
22
|
-
HSV: 'HueSaturationValue',
|
|
23
|
-
WARMTH: 'Warmth',
|
|
24
|
-
BLUR: 'Blur',
|
|
25
|
-
THRESHOLD: 'Threshold',
|
|
26
|
-
POSTERIZE: 'Posterize',
|
|
27
|
-
PIXELATE: 'Pixelate',
|
|
28
|
-
NOISE: 'Noise',
|
|
29
|
-
FILTERS: 'Filters',
|
|
30
|
-
RECT: 'Rect',
|
|
31
|
-
ELLIPSE: 'Ellipse',
|
|
32
|
-
POLYGON: 'Polygon',
|
|
33
|
-
TEXT: 'Text',
|
|
34
|
-
LINE: 'Line',
|
|
35
|
-
IMAGE: 'Image',
|
|
36
|
-
ARROW: 'Arrow',
|
|
37
|
-
WATERMARK: 'Watermark',
|
|
38
|
-
PEN: 'Pen',
|
|
39
|
-
RESIZE: 'Resize',
|
|
40
|
-
} as const;
|
|
41
|
-
|
|
42
|
-
// TABS_IDS
|
|
43
|
-
type availableTabs = (typeof TABS)[keyof typeof TABS];
|
|
44
|
-
|
|
45
|
-
// TOOLS_IDS
|
|
46
|
-
type availableTools = (typeof TOOLS)[keyof typeof TOOLS];
|
|
47
|
-
|
|
48
|
-
type lineCap = 'butt' | 'round' | 'square';
|
|
49
|
-
|
|
50
|
-
type savedImageData = {
|
|
51
|
-
name: string;
|
|
52
|
-
extension: string;
|
|
53
|
-
mimeType: string;
|
|
54
|
-
fullName?: string;
|
|
55
|
-
height?: number;
|
|
56
|
-
width?: number;
|
|
57
|
-
imageBase64?: string;
|
|
58
|
-
imageCanvas?: HTMLCanvasElement; // doesn't support quality
|
|
59
|
-
quality?: number;
|
|
60
|
-
cloudimageUrl?: string;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
type annotationsCommon = {
|
|
64
|
-
fill?: string;
|
|
65
|
-
stroke?: string;
|
|
66
|
-
strokeWidth?: number;
|
|
67
|
-
shadowOffsetX?: number;
|
|
68
|
-
shadowOffsetY?: number;
|
|
69
|
-
shadowBlur?: number;
|
|
70
|
-
shadowColor?: string;
|
|
71
|
-
shadowOpacity?: number;
|
|
72
|
-
opacity?: number;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
type textAnnotation = annotationsCommon & {
|
|
76
|
-
text?: string;
|
|
77
|
-
fontFamily?: string;
|
|
78
|
-
fontSize?: number;
|
|
79
|
-
letterSpacing?: number;
|
|
80
|
-
lineHeight?: number;
|
|
81
|
-
align?: 'left' | 'center' | 'right';
|
|
82
|
-
fontStyle?: 'normal' | 'bold' | 'italic' | 'bold italic';
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
type imageAnnotation = annotationsCommon & {
|
|
86
|
-
disableUpload?: boolean;
|
|
87
|
-
gallery?: {
|
|
88
|
-
originalUrl: string;
|
|
89
|
-
previewUrl: string;
|
|
90
|
-
}[];
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
type rectAnnotation = annotationsCommon & {
|
|
94
|
-
cornerRadius?: number;
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
type polygonAnnotation = annotationsCommon & {
|
|
98
|
-
sides?: number;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
type penAnnotation = annotationsCommon & {
|
|
102
|
-
tension?: number;
|
|
103
|
-
lineCap?: lineCap;
|
|
104
|
-
selectAnnotationAfterDrawing?: boolean;
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
type lineAnnotation = annotationsCommon & {
|
|
108
|
-
lineCap?: lineCap;
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
type arrowAnnotation = annotationsCommon & {
|
|
112
|
-
lineCap?: lineCap;
|
|
113
|
-
pointerLength?: number;
|
|
114
|
-
pointerWidth?: number;
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
type rotateAnnotation = {
|
|
118
|
-
angle?: number;
|
|
119
|
-
componentType?: 'slider' | 'buttons';
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
type cropPresetItem = {
|
|
123
|
-
titleKey: string;
|
|
124
|
-
width?: number;
|
|
125
|
-
height?: number;
|
|
126
|
-
ratio?: string | number;
|
|
127
|
-
descriptionKey?: string;
|
|
128
|
-
icon?: string | HTMLElement | FunctionComponent;
|
|
129
|
-
disableManualResize?: boolean;
|
|
130
|
-
noEffect?: boolean;
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
type imageDesignState = {
|
|
134
|
-
imgSrc?: string;
|
|
135
|
-
finetunes?: string[];
|
|
136
|
-
finetunesProps?: {
|
|
137
|
-
brightness?: number;
|
|
138
|
-
contrast?: number;
|
|
139
|
-
hue?: number;
|
|
140
|
-
saturation?: number;
|
|
141
|
-
value?: number;
|
|
142
|
-
blurRadius?: number;
|
|
143
|
-
warmth?: number;
|
|
144
|
-
};
|
|
145
|
-
filter?: string;
|
|
146
|
-
adjustments?: {
|
|
147
|
-
crop: {
|
|
148
|
-
ratio: string | number;
|
|
149
|
-
width?: number;
|
|
150
|
-
height?: number;
|
|
151
|
-
x?: number;
|
|
152
|
-
y?: number;
|
|
153
|
-
ratioTitleKey?: string;
|
|
154
|
-
};
|
|
155
|
-
isFlippedX?: boolean;
|
|
156
|
-
isFlippedY?: boolean;
|
|
157
|
-
rotation?: number;
|
|
158
|
-
};
|
|
159
|
-
annotations?: {
|
|
160
|
-
[key?: string]: annotationsCommon &
|
|
161
|
-
(
|
|
162
|
-
| textAnnotation
|
|
163
|
-
| rectAnnotation
|
|
164
|
-
| polygonAnnotation
|
|
165
|
-
| penAnnotation
|
|
166
|
-
| lineAnnotation
|
|
167
|
-
| arrowAnnotation
|
|
168
|
-
) & {
|
|
169
|
-
id: string;
|
|
170
|
-
name: string;
|
|
171
|
-
x: number;
|
|
172
|
-
y: number;
|
|
173
|
-
scaleX?: number;
|
|
174
|
-
scaleY?: number;
|
|
175
|
-
width?: number; //Text/Image/Rect
|
|
176
|
-
height?: number; //Text/Image/Rect
|
|
177
|
-
radius?: number; // Polygon
|
|
178
|
-
radiusX?: number; // Ellipse
|
|
179
|
-
radiusY?: number; // Ellipse
|
|
180
|
-
points?: number[]; // Pen/Line/Arrow
|
|
181
|
-
image?: string | HTMLElement; // Image
|
|
182
|
-
};
|
|
183
|
-
};
|
|
184
|
-
resize?: {
|
|
185
|
-
width?: number;
|
|
186
|
-
height?: number;
|
|
187
|
-
manualChangeDisabled?: boolean;
|
|
188
|
-
};
|
|
189
|
-
shownImageDimensions?: {
|
|
190
|
-
width: number;
|
|
191
|
-
height: number;
|
|
192
|
-
scaledBy: number;
|
|
193
|
-
};
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
type onSaveFunction = (
|
|
197
|
-
savedImageData: savedImageData,
|
|
198
|
-
imageDesignState: imageDesignState,
|
|
199
|
-
) => void | Promise;
|
|
200
|
-
|
|
201
|
-
export type getCurrentImgDataFunction = (
|
|
202
|
-
imageFileInfo: {
|
|
203
|
-
name?: string;
|
|
204
|
-
extension?: string;
|
|
205
|
-
quality?: number;
|
|
206
|
-
size?: { width?: number; height?: number };
|
|
207
|
-
},
|
|
208
|
-
pixelRatio?: boolean | number,
|
|
209
|
-
keepLoadingSpinnerShown?: boolean,
|
|
210
|
-
) => {
|
|
211
|
-
imageData: savedImageData;
|
|
212
|
-
designState: imageDesignState;
|
|
213
|
-
hideLoadingSpinner: () => void;
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
export interface FilerobotImageEditorConfig {
|
|
217
|
-
theme?: ThemeOverride;
|
|
218
|
-
source: string | HTMLImageElement;
|
|
219
|
-
annotationsCommon?: annotationsCommon;
|
|
220
|
-
// [TOOLS_IDS.TEXT]
|
|
221
|
-
Text?: textAnnotation & {
|
|
222
|
-
fonts?: (string | { label: string; value: string })[];
|
|
223
|
-
onFontChange?: (
|
|
224
|
-
newFontFamily: string,
|
|
225
|
-
reRenderCanvasFn: () => void,
|
|
226
|
-
) => void;
|
|
227
|
-
};
|
|
228
|
-
// [TOOLS_IDS.IMAGE]
|
|
229
|
-
Image?: imageAnnotation;
|
|
230
|
-
// [TOOLS_IDS.ELLIPSE]
|
|
231
|
-
Ellipse?: annotationsCommon;
|
|
232
|
-
// [TOOLS_IDS.RECT]
|
|
233
|
-
Rect?: rectAnnotation;
|
|
234
|
-
// [TOOLS_IDS.POLYGON]
|
|
235
|
-
Polygon?: polygonAnnotation;
|
|
236
|
-
// [TOOLS_IDS.PEN]
|
|
237
|
-
Pen?: penAnnotation;
|
|
238
|
-
// [TOOLS_IDS.LINE]: {
|
|
239
|
-
Line?: lineAnnotation;
|
|
240
|
-
// [TOOLS_IDS.ARROW]: {
|
|
241
|
-
Arrow?: arrowAnnotation;
|
|
242
|
-
// [TOOLS_IDS.ROTATE]:
|
|
243
|
-
Rotate?: rotateAnnotation;
|
|
244
|
-
// [TOOLS_IDS.WATERMARK]
|
|
245
|
-
Watermark?: {
|
|
246
|
-
gallery?: string[] | { url: string; previewUrl: string }[] | [];
|
|
247
|
-
onUploadWatermarkImgClick?: (
|
|
248
|
-
loadAndSetWatermarkImg: (imgUrl, revokeObjectUrl) => void,
|
|
249
|
-
) => Promise<{ url: string; revokeObjectUrl?: boolean }> | void;
|
|
250
|
-
textScalingRatio?: number;
|
|
251
|
-
imageScalingRatio?: number;
|
|
252
|
-
hideTextWatermark?: boolean;
|
|
253
|
-
};
|
|
254
|
-
// [TOOLS_IDS.CROP]
|
|
255
|
-
Crop?: {
|
|
256
|
-
minWidth?: number;
|
|
257
|
-
minHeight?: number;
|
|
258
|
-
maxWidth?: null;
|
|
259
|
-
maxHeight?: null;
|
|
260
|
-
ratio?: 'original' | 'custom' | 'ellipse' | number;
|
|
261
|
-
noPresets?: boolean;
|
|
262
|
-
ratioTitleKey?: string;
|
|
263
|
-
presetsItems?: cropPresetItem[];
|
|
264
|
-
autoResize?: boolean;
|
|
265
|
-
lockCropAreaAt?:
|
|
266
|
-
| 'top-left'
|
|
267
|
-
| 'top-center'
|
|
268
|
-
| 'top-right'
|
|
269
|
-
| 'center-left'
|
|
270
|
-
| 'center-center'
|
|
271
|
-
| 'center-right'
|
|
272
|
-
| 'bottom-left'
|
|
273
|
-
| 'bottom-center'
|
|
274
|
-
| 'bottom-right';
|
|
275
|
-
};
|
|
276
|
-
// TABS_IDS
|
|
277
|
-
tabsIds?: availableTabs[] | [];
|
|
278
|
-
defaultTabId?: availableTabs;
|
|
279
|
-
defaultToolId?: availableTools;
|
|
280
|
-
onBeforeSave?: (savedImageData: savedImageData) => void | boolean;
|
|
281
|
-
onSave?: onSaveFunction;
|
|
282
|
-
closeAfterSave?: boolean;
|
|
283
|
-
defaultSavedImageName?: string;
|
|
284
|
-
defaultSavedImageType?: 'png' | 'jpeg' | 'jpg' | 'webp';
|
|
285
|
-
defaultSavedImageQuality?: number;
|
|
286
|
-
forceToPngInEllipticalCrop?: boolean;
|
|
287
|
-
useBackendTranslations?: boolean;
|
|
288
|
-
translations?: object;
|
|
289
|
-
language?:
|
|
290
|
-
| 'en'
|
|
291
|
-
| 'fr'
|
|
292
|
-
| 'de'
|
|
293
|
-
| 'it'
|
|
294
|
-
| 'pt'
|
|
295
|
-
| 'es'
|
|
296
|
-
| 'nl'
|
|
297
|
-
| 'pl'
|
|
298
|
-
| 'ro'
|
|
299
|
-
| string;
|
|
300
|
-
avoidChangesNotSavedAlertOnLeave?: boolean;
|
|
301
|
-
loadableDesignState?: imageDesignState;
|
|
302
|
-
savingPixelRatio: number;
|
|
303
|
-
previewPixelRatio: number;
|
|
304
|
-
useCloudimage?: boolean;
|
|
305
|
-
cloudimage?: {
|
|
306
|
-
token: string;
|
|
307
|
-
dontPrefixUrl?: boolean;
|
|
308
|
-
domain?: string;
|
|
309
|
-
version?: string;
|
|
310
|
-
secureProtocol?: boolean;
|
|
311
|
-
loadableQuery?: string;
|
|
312
|
-
imageSealing?: {
|
|
313
|
-
enable?: boolean;
|
|
314
|
-
salt?: string;
|
|
315
|
-
charCount?: number;
|
|
316
|
-
includeParams?: string[];
|
|
317
|
-
};
|
|
318
|
-
};
|
|
319
|
-
observePluginContainerSize?: boolean;
|
|
320
|
-
showCanvasOnly?: boolean;
|
|
321
|
-
getCurrentImgDataFnRef?:
|
|
322
|
-
| RefObject
|
|
323
|
-
| {
|
|
324
|
-
current?: getCurrentImgDataFunction;
|
|
325
|
-
};
|
|
326
|
-
updateStateFnRef?:
|
|
327
|
-
| RefObject
|
|
328
|
-
| {
|
|
329
|
-
current?: (newStatePart: {} | ((currentState: {}) => void)) => void;
|
|
330
|
-
};
|
|
331
|
-
onModify?: (currentImageDesignState: imageDesignState) => void;
|
|
332
|
-
useZoomPresetsMenu?: boolean;
|
|
333
|
-
disableZooming?: boolean;
|
|
334
|
-
noCrossOrigin?: boolean;
|
|
335
|
-
disableSaveIfNoChanges?: boolean;
|
|
336
|
-
removeSaveButton?: boolean;
|
|
337
|
-
resetOnImageSourceChange?: boolean;
|
|
338
|
-
backgroundColor?: string;
|
|
339
|
-
backgroundImage?: HTMLImageElement;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
declare const FilerobotImageEditor: FunctionComponent<FilerobotImageEditorConfig>;
|
|
343
|
-
|
|
344
|
-
export default FilerobotImageEditor;
|
|
345
|
-
export { TABS, TOOLS };
|
|
1
|
+
/** Internal Dependencies */
|
|
2
|
+
import ImageEditor from 'components/assembly-point';
|
|
3
|
+
import { TABS_IDS, TOOLS_IDS } from 'utils/constants';
|
|
4
|
+
export { TABS_IDS as TABS, TOOLS_IDS as TOOLS };
|
|
5
|
+
export default ImageEditor;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,QAAQ,IAAI,IAAI,EAAE,SAAS,IAAI,KAAK,EAAE,CAAC;AAChD,eAAe,WAAW,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ImageEditor from"components/assembly-point";import{TABS_IDS,TOOLS_IDS}from"utils/constants";export{TABS_IDS as TABS,TOOLS_IDS as TOOLS};export default ImageEditor;
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { Annotation } from './annotations';
|
|
2
|
+
import { AppState, CropConfig, FinetunesProps, ResizeConfig, ZoomConfig } from './state';
|
|
3
|
+
import { Dimensions, ScaledDimensions } from './common';
|
|
4
|
+
export declare const SET_ORIGINAL_IMAGE = "SET_ORIGINAL_IMAGE";
|
|
5
|
+
export declare const SET_FEEDBACK = "SET_FEEDBACK";
|
|
6
|
+
export declare const SHOW_LOADER = "SHOW_LOADER";
|
|
7
|
+
export declare const HIDE_LOADER = "HIDE_LOADER";
|
|
8
|
+
export declare const CHANGE_POINTER_ICON = "CHANGE_POINTER_ICON";
|
|
9
|
+
export declare const SELECT_ANNOTATION = "SELECT_ANNOTATION";
|
|
10
|
+
export declare const CLEAR_ANNOTATIONS_SELECTIONS = "CLEAR_ANNOTATIONS_SELECTIONS";
|
|
11
|
+
export declare const TOGGLE_ORIGINAL_IMAGE_DISPLAY = "TOGGLE_ORIGINAL_IMAGE_DISPLAY";
|
|
12
|
+
export declare const SELECT_TAB = "SELECT_TAB";
|
|
13
|
+
export declare const SELECT_TOOL = "SELECT_TOOL";
|
|
14
|
+
export declare const ZOOM_CANVAS = "ZOOM_CANVAS";
|
|
15
|
+
export declare const SET_CANVAS_SIZE = "SET_CANVAS_SIZE";
|
|
16
|
+
export declare const SET_SHOWN_IMAGE_DIMENSIONS = "SET_SHOWN_IMAGE_DIMENSIONS";
|
|
17
|
+
export declare const ENABLE_TEXT_CONTENT_EDIT = "ENABLE_TEXT_CONTENT_EDIT";
|
|
18
|
+
export declare const SET_LATEST_COLOR = "SET_LATEST_COLOR";
|
|
19
|
+
export declare const SET_SHOWN_TABS_MENU = "SET_SHOWN_TABS_MENU";
|
|
20
|
+
export declare const SET_SAVING = "SET_SAVING";
|
|
21
|
+
export declare const ADD_FILTER = "ADD_FILTER";
|
|
22
|
+
export declare const SET_FINETUNE = "SET_FINETUNE";
|
|
23
|
+
export declare const SET_ANNOTATION = "SET_ANNOTATION";
|
|
24
|
+
export declare const SET_CROP = "SET_CROP";
|
|
25
|
+
export declare const CHANGE_ROTATION = "CHANGE_ROTATION";
|
|
26
|
+
export declare const TOGGLE_FLIP = "TOGGLE_FLIP";
|
|
27
|
+
export declare const SET_RESIZE = "SET_RESIZE";
|
|
28
|
+
export declare const REMOVE_ANNOTATIONS = "REMOVE_ANNOTATIONS";
|
|
29
|
+
export declare const DUPLICATE_ANNOTATIONS = "DUPLICATE_ANNOTATIONS";
|
|
30
|
+
export declare const UNDO = "UNDO";
|
|
31
|
+
export declare const REDO = "REDO";
|
|
32
|
+
export declare const RESET = "RESET";
|
|
33
|
+
export declare const SET_SAVED = "SET_SAVED";
|
|
34
|
+
export declare const UPDATE_STATE = "UPDATE_STATE";
|
|
35
|
+
export interface SetOriginalImagePayload {
|
|
36
|
+
originalImage: HTMLImageElement;
|
|
37
|
+
originalImageDimensions?: Dimensions;
|
|
38
|
+
}
|
|
39
|
+
export interface SetFeedbackPayload {
|
|
40
|
+
feedback: {
|
|
41
|
+
message: string;
|
|
42
|
+
duration?: number;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export interface ChangePointerIconPayload {
|
|
46
|
+
pointerCssIcon: string;
|
|
47
|
+
}
|
|
48
|
+
export interface SelectAnnotationPayload {
|
|
49
|
+
annotationId: string | string[];
|
|
50
|
+
multiple?: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface SelectTabPayload {
|
|
53
|
+
tabId: string;
|
|
54
|
+
}
|
|
55
|
+
export interface SelectToolPayload {
|
|
56
|
+
toolId: string | null;
|
|
57
|
+
}
|
|
58
|
+
export type ZoomCanvasPayload = Partial<ZoomConfig>;
|
|
59
|
+
export interface SetCanvasSizePayload {
|
|
60
|
+
canvasWidth: number;
|
|
61
|
+
canvasHeight: number;
|
|
62
|
+
}
|
|
63
|
+
export type SetShownImageDimensionsPayload = ScaledDimensions;
|
|
64
|
+
export interface EnableTextContentEditPayload {
|
|
65
|
+
annotationId: string;
|
|
66
|
+
}
|
|
67
|
+
export interface SetLatestColorPayload {
|
|
68
|
+
latestColors: Record<string, string>;
|
|
69
|
+
}
|
|
70
|
+
export interface SetShowTabsMenuPayload {
|
|
71
|
+
showTabsMenu: boolean;
|
|
72
|
+
}
|
|
73
|
+
export interface SetSavingPayload {
|
|
74
|
+
isSaving: boolean;
|
|
75
|
+
}
|
|
76
|
+
export interface AddFilterPayload {
|
|
77
|
+
filterName: string;
|
|
78
|
+
}
|
|
79
|
+
export interface SetFinetunePayload {
|
|
80
|
+
finetuneName: string;
|
|
81
|
+
finetuneValue: number | FinetunesProps;
|
|
82
|
+
}
|
|
83
|
+
export interface SetAnnotationPayload {
|
|
84
|
+
annotation: Annotation;
|
|
85
|
+
dismissHistory?: boolean;
|
|
86
|
+
}
|
|
87
|
+
export interface ChangeRotationPayload {
|
|
88
|
+
rotation: number;
|
|
89
|
+
dismissHistory?: boolean;
|
|
90
|
+
}
|
|
91
|
+
export interface ToggleFlipPayload {
|
|
92
|
+
direction: 'X' | 'Y';
|
|
93
|
+
}
|
|
94
|
+
export type SetResizePayload = Partial<ResizeConfig>;
|
|
95
|
+
export interface RemoveAnnotationsPayload {
|
|
96
|
+
annotationsIds?: string[];
|
|
97
|
+
}
|
|
98
|
+
export interface DuplicateAnnotationsPayload {
|
|
99
|
+
annotationsIds?: string[];
|
|
100
|
+
}
|
|
101
|
+
export interface SetSavedPayload {
|
|
102
|
+
isSaved: boolean;
|
|
103
|
+
haveNotSavedChanges?: boolean;
|
|
104
|
+
}
|
|
105
|
+
export type UpdateStatePayload = Partial<AppState>;
|
|
106
|
+
export type Action = {
|
|
107
|
+
type: typeof SET_ORIGINAL_IMAGE;
|
|
108
|
+
payload: SetOriginalImagePayload;
|
|
109
|
+
} | {
|
|
110
|
+
type: typeof SET_FEEDBACK;
|
|
111
|
+
payload: SetFeedbackPayload;
|
|
112
|
+
} | {
|
|
113
|
+
type: typeof SHOW_LOADER;
|
|
114
|
+
payload?: undefined;
|
|
115
|
+
} | {
|
|
116
|
+
type: typeof HIDE_LOADER;
|
|
117
|
+
payload?: undefined;
|
|
118
|
+
} | {
|
|
119
|
+
type: typeof CHANGE_POINTER_ICON;
|
|
120
|
+
payload: ChangePointerIconPayload;
|
|
121
|
+
} | {
|
|
122
|
+
type: typeof SELECT_ANNOTATION;
|
|
123
|
+
payload: SelectAnnotationPayload;
|
|
124
|
+
} | {
|
|
125
|
+
type: typeof CLEAR_ANNOTATIONS_SELECTIONS;
|
|
126
|
+
payload?: undefined;
|
|
127
|
+
} | {
|
|
128
|
+
type: typeof TOGGLE_ORIGINAL_IMAGE_DISPLAY;
|
|
129
|
+
payload?: undefined;
|
|
130
|
+
} | {
|
|
131
|
+
type: typeof SELECT_TAB;
|
|
132
|
+
payload: SelectTabPayload;
|
|
133
|
+
} | {
|
|
134
|
+
type: typeof SELECT_TOOL;
|
|
135
|
+
payload: SelectToolPayload;
|
|
136
|
+
} | {
|
|
137
|
+
type: typeof ZOOM_CANVAS;
|
|
138
|
+
payload: ZoomCanvasPayload;
|
|
139
|
+
} | {
|
|
140
|
+
type: typeof SET_CANVAS_SIZE;
|
|
141
|
+
payload: SetCanvasSizePayload;
|
|
142
|
+
} | {
|
|
143
|
+
type: typeof SET_SHOWN_IMAGE_DIMENSIONS;
|
|
144
|
+
payload: SetShownImageDimensionsPayload;
|
|
145
|
+
} | {
|
|
146
|
+
type: typeof ENABLE_TEXT_CONTENT_EDIT;
|
|
147
|
+
payload: EnableTextContentEditPayload;
|
|
148
|
+
} | {
|
|
149
|
+
type: typeof SET_LATEST_COLOR;
|
|
150
|
+
payload: SetLatestColorPayload;
|
|
151
|
+
} | {
|
|
152
|
+
type: typeof SET_SHOWN_TABS_MENU;
|
|
153
|
+
payload: SetShowTabsMenuPayload;
|
|
154
|
+
} | {
|
|
155
|
+
type: typeof SET_SAVING;
|
|
156
|
+
payload: SetSavingPayload;
|
|
157
|
+
} | {
|
|
158
|
+
type: typeof ADD_FILTER;
|
|
159
|
+
payload: AddFilterPayload;
|
|
160
|
+
} | {
|
|
161
|
+
type: typeof SET_FINETUNE;
|
|
162
|
+
payload: SetFinetunePayload;
|
|
163
|
+
} | {
|
|
164
|
+
type: typeof SET_ANNOTATION;
|
|
165
|
+
payload: SetAnnotationPayload;
|
|
166
|
+
} | {
|
|
167
|
+
type: typeof SET_CROP;
|
|
168
|
+
payload: CropConfig;
|
|
169
|
+
} | {
|
|
170
|
+
type: typeof CHANGE_ROTATION;
|
|
171
|
+
payload: ChangeRotationPayload;
|
|
172
|
+
} | {
|
|
173
|
+
type: typeof TOGGLE_FLIP;
|
|
174
|
+
payload: ToggleFlipPayload;
|
|
175
|
+
} | {
|
|
176
|
+
type: typeof SET_RESIZE;
|
|
177
|
+
payload: SetResizePayload;
|
|
178
|
+
} | {
|
|
179
|
+
type: typeof REMOVE_ANNOTATIONS;
|
|
180
|
+
payload: RemoveAnnotationsPayload;
|
|
181
|
+
} | {
|
|
182
|
+
type: typeof DUPLICATE_ANNOTATIONS;
|
|
183
|
+
payload: DuplicateAnnotationsPayload;
|
|
184
|
+
} | {
|
|
185
|
+
type: typeof UNDO;
|
|
186
|
+
payload?: undefined;
|
|
187
|
+
} | {
|
|
188
|
+
type: typeof REDO;
|
|
189
|
+
payload?: undefined;
|
|
190
|
+
} | {
|
|
191
|
+
type: typeof RESET;
|
|
192
|
+
payload?: undefined;
|
|
193
|
+
} | {
|
|
194
|
+
type: typeof SET_SAVED;
|
|
195
|
+
payload: SetSavedPayload;
|
|
196
|
+
} | {
|
|
197
|
+
type: typeof UPDATE_STATE;
|
|
198
|
+
payload: UpdateStatePayload;
|
|
199
|
+
};
|
|
200
|
+
export type Dispatch = (action: {
|
|
201
|
+
type: string;
|
|
202
|
+
payload?: any;
|
|
203
|
+
}) => void;
|
|
204
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
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