From 78f578a9ae6f568802324df23f518be147b6a2af Mon Sep 17 00:00:00 2001 From: Amr Hamdy Date: Thu, 28 Nov 2024 13:20:54 +0200 Subject: [PATCH 1/3] update folder structure --- packages/filerobot-image-editor/src/index.js | 8 ++- .../src/actions/selectTab.js | 2 +- .../Tools}/Arrow/ArrowButton.jsx | 2 +- .../Tools}/Arrow/ArrowOptions.jsx | 2 +- .../Tools}/Arrow/index.js | 0 .../Tools}/Blur/Blur.jsx | 2 +- .../Tools}/Blur/BlurOptions.jsx | 4 +- .../Tools}/Blur/index.js | 0 .../Tools}/Brightness/Brightness.jsx | 2 +- .../Tools}/Brightness/BrightnessOptions.jsx | 4 +- .../Tools}/Brightness/index.js | 0 .../Tools}/Contrast/Contrast.jsx | 2 +- .../Tools}/Contrast/ContrastOptions.jsx | 4 +- .../Tools}/Contrast/index.js | 0 .../Tools}/Ellipse/EllipseButton.jsx | 2 +- .../Tools}/Ellipse/EllipseOptions.jsx | 2 +- .../Tools}/Ellipse/index.js | 0 .../Tools}/Filters/FilterItem.jsx | 0 .../Tools}/Filters/Filters.constants.js | 0 .../Tools}/Filters/Filters.jsx | 2 +- .../Tools}/Filters/Filters.styled.js | 0 .../Tools}/Filters/index.js | 0 .../{tools => ImageEditor/Tools}/HSV/HSV.jsx | 2 +- .../Tools}/HSV/HSVOptions.jsx | 4 +- .../{tools => ImageEditor/Tools}/HSV/index.js | 0 .../Tools}/Image/Image.styled.js | 0 .../Tools}/Image/ImageButton.jsx | 2 +- .../Tools}/Image/ImageControls.jsx | 2 +- .../Tools}/Image/ImageOptions.jsx | 4 +- .../Tools}/Image/ImagesGallery.jsx | 0 .../Tools}/Image/index.js | 0 .../Tools}/Line/LineButton.jsx | 2 +- .../Tools}/Line/LineOptions.jsx | 2 +- .../Tools}/Line/index.js | 0 .../Tools}/Pen/PenButton.jsx | 2 +- .../Tools}/Pen/PenOptions.jsx | 2 +- .../{tools => ImageEditor/Tools}/Pen/index.js | 0 .../Tools}/Polygon/Polygon.constants.js | 0 .../Tools}/Polygon/PolygonButton.jsx | 2 +- .../Tools}/Polygon/PolygonOptions.jsx | 2 +- .../Tools}/Polygon/PolygonSidesField.jsx | 4 +- .../Tools}/Polygon/index.js | 0 .../Tools}/Rect/Rect.constants.js | 0 .../Tools}/Rect/RectButton.jsx | 2 +- .../Tools}/Rect/RectCornerField.jsx | 4 +- .../Tools}/Rect/RectOptions.jsx | 2 +- .../Tools}/Rect/index.js | 0 .../Tools}/Text/TextButton.jsx | 2 +- .../Text/TextOptions/TextAlignmentFields.jsx | 2 +- .../Tools}/Text/TextOptions/TextControls.jsx | 4 +- .../Text/TextOptions/TextOptions.constants.js | 0 .../Text/TextOptions/TextOptions.styled.js | 0 .../Text/TextOptions/TextSpacingsFields.jsx | 4 +- .../Tools}/Text/TextOptions/index.jsx | 0 .../Tools}/Text/index.js | 0 .../Tools/Tools.styled.js} | 0 .../Tools}/Warmth/Warmth.jsx | 2 +- .../Tools}/Warmth/WarmthOptions.jsx | 4 +- .../Tools}/Warmth/index.js | 0 .../Tools}/Watermark/Watermark.jsx | 8 +-- .../Tools}/Watermark/Watermark.styled.js | 0 .../Tools}/Watermark/WatermarkPadding.jsx | 4 +- .../Tools}/Watermark/WatermarksGallery.jsx | 2 +- .../Tools}/Watermark/index.jsx | 0 .../Tools/tools.constant.js} | 62 +------------------ .../src/components/ImageEditor/index.jsx | 7 ++- .../AssemblyPoint/AssemblyPoint.styled.js} | 0 .../{App => Shared/AssemblyPoint}/index.jsx | 16 ++--- .../Buttons}/BackButton.jsx | 2 +- .../Buttons}/CloseButton.jsx | 2 +- .../HistoryButtons/HistoryButtons.jsx | 0 .../HistoryButtons/HistoryButtons.styled.js | 0 .../Buttons}/HistoryButtons/RedoButton.jsx | 0 .../Buttons}/HistoryButtons/ResetButton.jsx | 2 +- .../Buttons}/HistoryButtons/UndoButton.jsx | 0 .../Buttons}/HistoryButtons/index.js | 0 .../Buttons}/SaveButton/SaveButton.styled.js | 0 .../Buttons}/SaveButton/SaveModal.jsx | 6 +- .../Buttons}/SaveButton/index.jsx | 6 +- .../ZoomButtons/ZoomButtons.constants.js | 0 .../ZoomButtons/ZoomButtons.styled.js | 0 .../Buttons}/ZoomButtons/index.jsx | 0 .../{buttons => Shared/Buttons}/index.js | 0 .../AnnotationOptions.constants.js | 0 .../AnnotationOptions.styled.js | 0 .../AnnotationOptions/OpacityField.jsx | 0 .../AnnotationOptions/PositionFields.jsx | 0 .../AnnotationOptions/ShadowFields.jsx | 2 +- .../AnnotationOptions/StrokeFields.jsx | 2 +- .../Common}/AnnotationOptions/index.jsx | 0 .../ButtonWithMenu/ButtonWithMenu.styled.js | 0 .../Common}/ButtonWithMenu/index.jsx | 0 .../Common}/Carousel/Carousel.styled.js | 0 .../Common}/Carousel/index.jsx | 0 .../Common}/ColorInput/ColorInput.styled.js | 0 .../Common}/ColorInput/index.jsx | 0 .../ColorPickerModal.styled.js | 0 .../Common}/ColorPickerModal/index.jsx | 0 .../ConfirmationModals/ConfirmationModal.jsx | 2 +- .../DiscardConfirmationModal.jsx | 0 .../ResetConfirmationModal.jsx | 0 .../Common}/ConfirmationModals/index.jsx | 0 .../HiddenUploadInput.styled.js | 0 .../Common}/HiddenUploadInput/index.jsx | 0 .../Common}/Modal/Modal.styled.js | 0 .../{common => Shared/Common}/Modal/index.jsx | 0 .../Common}/Separator/Separator.styled.js | 0 .../Common}/Separator/index.jsx | 0 .../Common}/Slider/Slider.styled.js | 0 .../Common}/Slider/index.jsx | 0 .../Common}/Spinner/Spinner.styled.js | 0 .../Common}/Spinner/index.jsx | 0 .../{common => Shared/Common}/index.js | 0 .../{ => Shared}/FeedbackPopup/index.jsx | 0 .../ImageInfo/ImageInfo.styled.js | 0 .../{ => Shared}/ImageInfo/index.jsx | 0 .../AnnotationNodes.constants.js | 0 .../DesignLayer/AnnotationNodes/ArrowNode.jsx | 0 .../AnnotationNodes/EllipseNode.jsx | 0 .../DesignLayer/AnnotationNodes/ImageNode.jsx | 0 .../DesignLayer/AnnotationNodes/LineNode.jsx | 0 .../AnnotationNodes/MemoizedAnnotation.jsx | 0 .../AnnotationNodes/PolygonNode.jsx | 0 .../DesignLayer/AnnotationNodes/RectNode.jsx | 0 .../TextNode/TextNode.styled.js | 0 .../TextNode/TextNode.utils.js | 0 .../TextNode/TextNodeContentTextarea.jsx | 0 .../AnnotationNodes/TextNode/index.jsx | 0 .../DesignLayer/AnnotationNodes/index.jsx | 0 .../Layers/DesignLayer/DesignLayerWrapper.jsx | 0 .../Layers/DesignLayer/PreviewGroup.jsx | 0 .../{ => Shared}/Layers/DesignLayer/index.jsx | 0 .../DesignLayer/nodesCommonPropTypes.js | 0 .../{ => Shared}/Layers/LayersBackground.jsx | 0 .../TransformersLayer/CropTransformer.jsx | 0 .../TransformersLayer/NodesTransformer.jsx | 2 +- .../TransformersLayer.utils.js | 0 .../TransformersLayerWrapper.jsx | 0 .../Layers/TransformersLayer/index.jsx | 0 .../components/{ => Shared}/Layers/index.js | 0 .../{ => Shared}/MainCanvas/CanvasNode.jsx | 0 .../MainCanvas/MainCanvas.styled.js | 0 .../MainCanvas/MainCanvasWrapper.jsx | 4 +- .../{ => Shared}/MainCanvas/index.jsx | 2 +- .../MainCanvas/touchZoomingEvents.js | 0 .../NodeControls/NodeControls.styled.js | 0 .../{ => Shared}/NodeControls/index.jsx | 0 .../{ => Shared}/Providers/globalStyles.js | 0 .../{ => Shared}/Providers/index.jsx | 0 .../components/{ => Shared}/Tabs/TabItem.jsx | 0 .../{ => Shared}/Tabs/Tabs.constants.js | 0 .../src/components/{ => Shared}/Tabs/Tabs.jsx | 0 .../{ => Shared}/Tabs/Tabs.styled.js | 0 .../Tabs/TabsDrawer/TabsDrawer.styled.js | 0 .../{ => Shared}/Tabs/TabsDrawer/index.jsx | 2 +- .../Tabs/TabsNavbar/TabsNavbar.styled.js | 0 .../{ => Shared}/Tabs/TabsNavbar/index.jsx | 2 +- .../{ => Shared}/Tabs/TabsResponsive.jsx | 2 +- .../{ => Shared}/Tabs/hooks/useTabs.js | 0 .../src/components/{ => Shared}/Tabs/index.js | 0 .../Tools}/Crop/Crop.constants.js | 0 .../{tools => Shared/Tools}/Crop/Crop.jsx | 4 +- .../Tools}/Crop/Crop.styled.js | 0 .../Tools}/Crop/CropPresetGroup.jsx | 0 .../Tools}/Crop/CropPresetGroupsFolder.jsx | 0 .../Tools}/Crop/CropPresetItem.jsx | 0 .../Tools}/Crop/CropPresetsOption.jsx | 2 +- .../{tools => Shared/Tools}/Crop/index.js | 0 .../{tools => Shared/Tools}/Flip/FlipX.jsx | 2 +- .../{tools => Shared/Tools}/Flip/FlipY.jsx | 2 +- .../{tools => Shared/Tools}/Flip/index.js | 0 .../{tools => Shared/Tools}/Resize/Resize.jsx | 0 .../Tools}/Resize/Resize.styled.js | 0 .../{tools => Shared/Tools}/Resize/index.js | 0 .../Tools}/Rotate/Rotate.styled.js | 0 .../Tools}/Rotate/RotateButton.jsx | 2 +- .../Tools}/Rotate/RotateOptions.jsx | 2 +- .../{tools => Shared/Tools}/Rotate/index.js | 0 .../Shared/Tools/tools.constants.js | 60 ++++++++++++++++++ .../{ => Shared}/ToolsBar/ToolsBar.styled.js | 0 .../ToolsBar/ToolsBarItemButton.jsx | 0 .../ToolsBar/ToolsBarItemOptionsWrapper.jsx | 0 .../{ => Shared}/ToolsBar/index.jsx | 17 ++--- .../ImageDimensionsAndDisplayToggle.jsx | 6 +- .../{ => Shared}/Topbar/Topbar.styled.js | 0 .../components/{ => Shared}/Topbar/index.jsx | 4 +- .../components/VideoEditor/Controls/index.jsx | 2 +- .../Tools}/Trim/Segment.jsx | 0 .../Tools}/Trim/Trim.constants.js | 0 .../Tools}/Trim/Trim.jsx | 4 +- .../Tools}/Trim/Trim.styled.js | 0 .../Tools}/Trim/Trim.utils.js | 0 .../Tools}/Trim/index.js | 0 .../VideoEditor/VideoEditor.services.js | 14 +++-- .../src/components/VideoEditor/index.jsx | 7 ++- .../components/VideoEditor/tools.constant.js | 9 +++ .../src/hooks/useTextAnnotationEditing.js | 2 +- .../react-filerobot-image-editor/src/index.js | 50 +++++++-------- 198 files changed, 224 insertions(+), 196 deletions(-) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Arrow/ArrowButton.jsx (89%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Arrow/ArrowOptions.jsx (89%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Arrow/index.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Blur/Blur.jsx (88%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Blur/BlurOptions.jsx (95%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Blur/index.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Brightness/Brightness.jsx (89%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Brightness/BrightnessOptions.jsx (95%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Brightness/index.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Contrast/Contrast.jsx (89%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Contrast/ContrastOptions.jsx (95%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Contrast/index.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Ellipse/EllipseButton.jsx (89%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Ellipse/EllipseOptions.jsx (88%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Ellipse/index.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Filters/FilterItem.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Filters/Filters.constants.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Filters/Filters.jsx (93%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Filters/Filters.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Filters/index.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/HSV/HSV.jsx (88%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/HSV/HSVOptions.jsx (97%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/HSV/index.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Image/Image.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Image/ImageButton.jsx (89%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Image/ImageControls.jsx (88%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Image/ImageOptions.jsx (96%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Image/ImagesGallery.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Image/index.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Line/LineButton.jsx (88%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Line/LineOptions.jsx (88%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Line/index.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Pen/PenButton.jsx (88%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Pen/PenOptions.jsx (98%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Pen/index.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Polygon/Polygon.constants.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Polygon/PolygonButton.jsx (89%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Polygon/PolygonOptions.jsx (91%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Polygon/PolygonSidesField.jsx (86%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Polygon/index.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Rect/Rect.constants.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Rect/RectButton.jsx (89%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Rect/RectCornerField.jsx (86%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Rect/RectOptions.jsx (91%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Rect/index.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Text/TextButton.jsx (88%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Text/TextOptions/TextAlignmentFields.jsx (94%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Text/TextOptions/TextControls.jsx (95%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Text/TextOptions/TextOptions.constants.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Text/TextOptions/TextOptions.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Text/TextOptions/TextSpacingsFields.jsx (92%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Text/TextOptions/index.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Text/index.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools/tools.styled.js => ImageEditor/Tools/Tools.styled.js} (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Warmth/Warmth.jsx (89%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Warmth/WarmthOptions.jsx (95%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Warmth/index.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Watermark/Watermark.jsx (96%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Watermark/Watermark.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Watermark/WatermarkPadding.jsx (93%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Watermark/WatermarksGallery.jsx (97%) rename packages/react-filerobot-image-editor/src/components/{tools => ImageEditor/Tools}/Watermark/index.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{tools/tools.constants.js => ImageEditor/Tools/tools.constant.js} (64%) rename packages/react-filerobot-image-editor/src/components/{App/App.styled.js => Shared/AssemblyPoint/AssemblyPoint.styled.js} (100%) rename packages/react-filerobot-image-editor/src/components/{App => Shared/AssemblyPoint}/index.jsx (81%) rename packages/react-filerobot-image-editor/src/components/{buttons => Shared/Buttons}/BackButton.jsx (94%) rename packages/react-filerobot-image-editor/src/components/{buttons => Shared/Buttons}/CloseButton.jsx (94%) rename packages/react-filerobot-image-editor/src/components/{buttons => Shared/Buttons}/HistoryButtons/HistoryButtons.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{buttons => Shared/Buttons}/HistoryButtons/HistoryButtons.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{buttons => Shared/Buttons}/HistoryButtons/RedoButton.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{buttons => Shared/Buttons}/HistoryButtons/ResetButton.jsx (92%) rename packages/react-filerobot-image-editor/src/components/{buttons => Shared/Buttons}/HistoryButtons/UndoButton.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{buttons => Shared/Buttons}/HistoryButtons/index.js (100%) rename packages/react-filerobot-image-editor/src/components/{buttons => Shared/Buttons}/SaveButton/SaveButton.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{buttons => Shared/Buttons}/SaveButton/SaveModal.jsx (95%) rename packages/react-filerobot-image-editor/src/components/{buttons => Shared/Buttons}/SaveButton/index.jsx (98%) rename packages/react-filerobot-image-editor/src/components/{buttons => Shared/Buttons}/ZoomButtons/ZoomButtons.constants.js (100%) rename packages/react-filerobot-image-editor/src/components/{buttons => Shared/Buttons}/ZoomButtons/ZoomButtons.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{buttons => Shared/Buttons}/ZoomButtons/index.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{buttons => Shared/Buttons}/index.js (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/AnnotationOptions/AnnotationOptions.constants.js (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/AnnotationOptions/AnnotationOptions.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/AnnotationOptions/OpacityField.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/AnnotationOptions/PositionFields.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/AnnotationOptions/ShadowFields.jsx (97%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/AnnotationOptions/StrokeFields.jsx (95%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/AnnotationOptions/index.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/ButtonWithMenu/ButtonWithMenu.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/ButtonWithMenu/index.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/Carousel/Carousel.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/Carousel/index.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/ColorInput/ColorInput.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/ColorInput/index.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/ColorPickerModal/ColorPickerModal.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/ColorPickerModal/index.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/ConfirmationModals/ConfirmationModal.jsx (97%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/ConfirmationModals/DiscardConfirmationModal.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/ConfirmationModals/ResetConfirmationModal.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/ConfirmationModals/index.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/HiddenUploadInput/HiddenUploadInput.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/HiddenUploadInput/index.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/Modal/Modal.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/Modal/index.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/Separator/Separator.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/Separator/index.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/Slider/Slider.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/Slider/index.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/Spinner/Spinner.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/Spinner/index.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{common => Shared/Common}/index.js (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/FeedbackPopup/index.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/ImageInfo/ImageInfo.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/ImageInfo/index.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/DesignLayer/AnnotationNodes/AnnotationNodes.constants.js (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/DesignLayer/AnnotationNodes/ArrowNode.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/DesignLayer/AnnotationNodes/EllipseNode.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/DesignLayer/AnnotationNodes/ImageNode.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/DesignLayer/AnnotationNodes/LineNode.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/DesignLayer/AnnotationNodes/MemoizedAnnotation.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/DesignLayer/AnnotationNodes/PolygonNode.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/DesignLayer/AnnotationNodes/RectNode.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/DesignLayer/AnnotationNodes/TextNode/TextNode.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/DesignLayer/AnnotationNodes/TextNode/TextNode.utils.js (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/DesignLayer/AnnotationNodes/TextNode/TextNodeContentTextarea.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/DesignLayer/AnnotationNodes/TextNode/index.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/DesignLayer/AnnotationNodes/index.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/DesignLayer/DesignLayerWrapper.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/DesignLayer/PreviewGroup.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/DesignLayer/index.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/DesignLayer/nodesCommonPropTypes.js (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/LayersBackground.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/TransformersLayer/CropTransformer.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/TransformersLayer/NodesTransformer.jsx (98%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/TransformersLayer/TransformersLayer.utils.js (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/TransformersLayer/TransformersLayerWrapper.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/TransformersLayer/index.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Layers/index.js (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/MainCanvas/CanvasNode.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/MainCanvas/MainCanvas.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/MainCanvas/MainCanvasWrapper.jsx (96%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/MainCanvas/index.jsx (95%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/MainCanvas/touchZoomingEvents.js (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/NodeControls/NodeControls.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/NodeControls/index.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Providers/globalStyles.js (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Providers/index.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Tabs/TabItem.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Tabs/Tabs.constants.js (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Tabs/Tabs.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Tabs/Tabs.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Tabs/TabsDrawer/TabsDrawer.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Tabs/TabsDrawer/index.jsx (95%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Tabs/TabsNavbar/TabsNavbar.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Tabs/TabsNavbar/index.jsx (90%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Tabs/TabsResponsive.jsx (78%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Tabs/hooks/useTabs.js (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Tabs/index.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => Shared/Tools}/Crop/Crop.constants.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => Shared/Tools}/Crop/Crop.jsx (88%) rename packages/react-filerobot-image-editor/src/components/{tools => Shared/Tools}/Crop/Crop.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => Shared/Tools}/Crop/CropPresetGroup.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{tools => Shared/Tools}/Crop/CropPresetGroupsFolder.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{tools => Shared/Tools}/Crop/CropPresetItem.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{tools => Shared/Tools}/Crop/CropPresetsOption.jsx (98%) rename packages/react-filerobot-image-editor/src/components/{tools => Shared/Tools}/Crop/index.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => Shared/Tools}/Flip/FlipX.jsx (95%) rename packages/react-filerobot-image-editor/src/components/{tools => Shared/Tools}/Flip/FlipY.jsx (95%) rename packages/react-filerobot-image-editor/src/components/{tools => Shared/Tools}/Flip/index.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => Shared/Tools}/Resize/Resize.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{tools => Shared/Tools}/Resize/Resize.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => Shared/Tools}/Resize/index.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => Shared/Tools}/Rotate/Rotate.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => Shared/Tools}/Rotate/RotateButton.jsx (89%) rename packages/react-filerobot-image-editor/src/components/{tools => Shared/Tools}/Rotate/RotateOptions.jsx (97%) rename packages/react-filerobot-image-editor/src/components/{tools => Shared/Tools}/Rotate/index.js (100%) create mode 100644 packages/react-filerobot-image-editor/src/components/Shared/Tools/tools.constants.js rename packages/react-filerobot-image-editor/src/components/{ => Shared}/ToolsBar/ToolsBar.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/ToolsBar/ToolsBarItemButton.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/ToolsBar/ToolsBarItemOptionsWrapper.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/ToolsBar/index.jsx (90%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Topbar/ImageDimensionsAndDisplayToggle.jsx (72%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Topbar/Topbar.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{ => Shared}/Topbar/index.jsx (95%) rename packages/react-filerobot-image-editor/src/components/{tools => VideoEditor/Tools}/Trim/Segment.jsx (100%) rename packages/react-filerobot-image-editor/src/components/{tools => VideoEditor/Tools}/Trim/Trim.constants.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => VideoEditor/Tools}/Trim/Trim.jsx (97%) rename packages/react-filerobot-image-editor/src/components/{tools => VideoEditor/Tools}/Trim/Trim.styled.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => VideoEditor/Tools}/Trim/Trim.utils.js (100%) rename packages/react-filerobot-image-editor/src/components/{tools => VideoEditor/Tools}/Trim/index.js (100%) create mode 100644 packages/react-filerobot-image-editor/src/components/VideoEditor/tools.constant.js diff --git a/packages/filerobot-image-editor/src/index.js b/packages/filerobot-image-editor/src/index.js index ba917d85..2fcefa54 100644 --- a/packages/filerobot-image-editor/src/index.js +++ b/packages/filerobot-image-editor/src/index.js @@ -3,7 +3,7 @@ import { createElement } from 'react'; import { createRoot } from 'react-dom/client'; /** Internal Dependencies */ -import AssemblyPoint, { TOOLS, TABS } from 'react-filerobot-image-editor/src/'; +import AssemblyPoint, { TOOLS, TABS, VideoEditor } from 'react-filerobot-image-editor/src/'; import deepMerge from 'react-filerobot-image-editor/src/utils/deepMerge'; class FilerobotImageEditor { @@ -51,7 +51,11 @@ class FilerobotImageEditor { this.#root = createRoot(this.container); } - this.#root.render(createElement(AssemblyPoint, this.config)); + if(this.config.isVideo){ + this.#root.render(createElement(VideoEditor, this.config)); + } else{ + this.#root.render(createElement(AssemblyPoint, this.config)); + } } terminate() { diff --git a/packages/react-filerobot-image-editor/src/actions/selectTab.js b/packages/react-filerobot-image-editor/src/actions/selectTab.js index 3ea2772d..46fc72de 100644 --- a/packages/react-filerobot-image-editor/src/actions/selectTab.js +++ b/packages/react-filerobot-image-editor/src/actions/selectTab.js @@ -1,4 +1,4 @@ -import { TABS_TOOLS } from 'components/tools/tools.constants'; +import { TABS_TOOLS } from 'components/Shared/Tools/tools.constants'; import { POINTER_ICONS, TABS_IDS } from 'utils/constants'; import isAnnotationTool from 'utils/isAnnotationTool'; diff --git a/packages/react-filerobot-image-editor/src/components/tools/Arrow/ArrowButton.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Arrow/ArrowButton.jsx similarity index 89% rename from packages/react-filerobot-image-editor/src/components/tools/Arrow/ArrowButton.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Arrow/ArrowButton.jsx index c1231cc8..b2f350cc 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Arrow/ArrowButton.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Arrow/ArrowButton.jsx @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import { ArrowTool as ArrowIcon } from '@scaleflex/icons/arrow-tool'; /** Internal Dependencies */ -import ToolsBarItemButton from 'components/ToolsBar/ToolsBarItemButton'; +import ToolsBarItemButton from 'components/Shared/ToolsBar/ToolsBarItemButton'; import { TOOLS_IDS } from 'utils/constants'; const ArrowButton = ({ selectTool, isSelected = false, t }) => ( diff --git a/packages/react-filerobot-image-editor/src/components/tools/Arrow/ArrowOptions.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Arrow/ArrowOptions.jsx similarity index 89% rename from packages/react-filerobot-image-editor/src/components/tools/Arrow/ArrowOptions.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Arrow/ArrowOptions.jsx index eb058a04..5ea004e3 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Arrow/ArrowOptions.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Arrow/ArrowOptions.jsx @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'; /** Internal Dependencies */ import { useAnnotation } from 'hooks'; import { TOOLS_IDS } from 'utils/constants'; -import AnnotationOptions from 'components/common/AnnotationOptions'; +import AnnotationOptions from 'components/Shared/Common/AnnotationOptions'; const ArrowOptions = ({ t }) => { const [arrow, saveArrow] = useAnnotation({ diff --git a/packages/react-filerobot-image-editor/src/components/tools/Arrow/index.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Arrow/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Arrow/index.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Arrow/index.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Blur/Blur.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Blur/Blur.jsx similarity index 88% rename from packages/react-filerobot-image-editor/src/components/tools/Blur/Blur.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Blur/Blur.jsx index dc0b0729..aff4e3b7 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Blur/Blur.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Blur/Blur.jsx @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import { Blur as BlurIcon } from '@scaleflex/icons/blur'; /** Internal Dependencies */ -import ToolsBarItemButton from 'components/ToolsBar/ToolsBarItemButton'; +import ToolsBarItemButton from 'components/Shared/ToolsBar/ToolsBarItemButton'; import { TOOLS_IDS } from 'utils/constants'; const Blur = ({ selectTool, isSelected = false, t }) => ( diff --git a/packages/react-filerobot-image-editor/src/components/tools/Blur/BlurOptions.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Blur/BlurOptions.jsx similarity index 95% rename from packages/react-filerobot-image-editor/src/components/tools/Blur/BlurOptions.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Blur/BlurOptions.jsx index 63a69289..1ab55e44 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Blur/BlurOptions.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Blur/BlurOptions.jsx @@ -6,13 +6,13 @@ import PropTypes from 'prop-types'; /** Internal Dependencies */ import { useFinetune } from 'hooks'; import restrictNumber from 'utils/restrictNumber'; -import Slider from 'components/common/Slider'; +import Slider from 'components/Shared/Common/Slider'; import { StyledSliderContainer, StyledSliderInput, StyledSliderLabel, StyledSliderWrapper, -} from '../tools.styled'; +} from '../Tools.styled'; const MIN_VALUE = 0; const DEFAULT_VALUE = { diff --git a/packages/react-filerobot-image-editor/src/components/tools/Blur/index.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Blur/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Blur/index.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Blur/index.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Brightness/Brightness.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Brightness/Brightness.jsx similarity index 89% rename from packages/react-filerobot-image-editor/src/components/tools/Brightness/Brightness.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Brightness/Brightness.jsx index aeb774fa..ede60193 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Brightness/Brightness.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Brightness/Brightness.jsx @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import { Brightness as BrightnessIcon } from '@scaleflex/icons/brightness'; /** Internal Dependencies */ -import ToolsBarItemButton from 'components/ToolsBar/ToolsBarItemButton'; +import ToolsBarItemButton from 'components/Shared/ToolsBar/ToolsBarItemButton'; import { TOOLS_IDS } from 'utils/constants'; const Brightness = ({ selectTool, isSelected = false, t }) => ( diff --git a/packages/react-filerobot-image-editor/src/components/tools/Brightness/BrightnessOptions.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Brightness/BrightnessOptions.jsx similarity index 95% rename from packages/react-filerobot-image-editor/src/components/tools/Brightness/BrightnessOptions.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Brightness/BrightnessOptions.jsx index 479181f1..159a129d 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Brightness/BrightnessOptions.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Brightness/BrightnessOptions.jsx @@ -6,13 +6,13 @@ import PropTypes from 'prop-types'; /** Internal Dependencies */ import { useFinetune } from 'hooks'; import restrictNumber from 'utils/restrictNumber'; -import Slider from 'components/common/Slider'; +import Slider from 'components/Shared/Common/Slider'; import { StyledSliderContainer, StyledSliderInput, StyledSliderLabel, StyledSliderWrapper, -} from '../tools.styled'; +} from '../Tools.styled'; const MIN_VALUE = -1; const DEFAULT_VALUE = { diff --git a/packages/react-filerobot-image-editor/src/components/tools/Brightness/index.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Brightness/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Brightness/index.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Brightness/index.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Contrast/Contrast.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Contrast/Contrast.jsx similarity index 89% rename from packages/react-filerobot-image-editor/src/components/tools/Contrast/Contrast.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Contrast/Contrast.jsx index a5f8fc6e..a79bd440 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Contrast/Contrast.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Contrast/Contrast.jsx @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import { Contrast as ContrastIcon } from '@scaleflex/icons/contrast'; /** Internal Dependencies */ -import ToolsBarItemButton from 'components/ToolsBar/ToolsBarItemButton'; +import ToolsBarItemButton from 'components/Shared/ToolsBar/ToolsBarItemButton'; import { TOOLS_IDS } from 'utils/constants'; const Contrast = ({ selectTool, isSelected = false, t }) => ( diff --git a/packages/react-filerobot-image-editor/src/components/tools/Contrast/ContrastOptions.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Contrast/ContrastOptions.jsx similarity index 95% rename from packages/react-filerobot-image-editor/src/components/tools/Contrast/ContrastOptions.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Contrast/ContrastOptions.jsx index 64ff5489..a57fff6b 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Contrast/ContrastOptions.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Contrast/ContrastOptions.jsx @@ -6,13 +6,13 @@ import PropTypes from 'prop-types'; /** Internal Depdencies */ import { useFinetune } from 'hooks'; import restrictNumber from 'utils/restrictNumber'; -import Slider from 'components/common/Slider'; +import Slider from 'components/Shared/Common/Slider'; import { StyledSliderContainer, StyledSliderInput, StyledSliderLabel, StyledSliderWrapper, -} from '../tools.styled'; +} from '../Tools.styled'; const MIN_VALUE = -100; const DEFAULT_VALUE = { diff --git a/packages/react-filerobot-image-editor/src/components/tools/Contrast/index.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Contrast/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Contrast/index.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Contrast/index.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Ellipse/EllipseButton.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Ellipse/EllipseButton.jsx similarity index 89% rename from packages/react-filerobot-image-editor/src/components/tools/Ellipse/EllipseButton.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Ellipse/EllipseButton.jsx index b7b6e3e6..7194c154 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Ellipse/EllipseButton.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Ellipse/EllipseButton.jsx @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import { Ellipse as EllipseIcon } from '@scaleflex/icons/ellipse'; /** Internal Dependencies */ -import ToolsBarItemButton from 'components/ToolsBar/ToolsBarItemButton'; +import ToolsBarItemButton from 'components/Shared/ToolsBar/ToolsBarItemButton'; import { TOOLS_IDS } from 'utils/constants'; const EllipseButton = ({ selectTool, isSelected = false, t }) => ( diff --git a/packages/react-filerobot-image-editor/src/components/tools/Ellipse/EllipseOptions.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Ellipse/EllipseOptions.jsx similarity index 88% rename from packages/react-filerobot-image-editor/src/components/tools/Ellipse/EllipseOptions.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Ellipse/EllipseOptions.jsx index f2021863..071af867 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Ellipse/EllipseOptions.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Ellipse/EllipseOptions.jsx @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'; /** Internal Dependencies */ import { useAnnotation } from 'hooks'; import { TOOLS_IDS } from 'utils/constants'; -import AnnotationOptions from 'components/common/AnnotationOptions'; +import AnnotationOptions from 'components/Shared/Common/AnnotationOptions'; const EllipseOptions = ({ t }) => { const [ellipse, saveEllipse] = useAnnotation({ diff --git a/packages/react-filerobot-image-editor/src/components/tools/Ellipse/index.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Ellipse/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Ellipse/index.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Ellipse/index.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Filters/FilterItem.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Filters/FilterItem.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Filters/FilterItem.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Filters/FilterItem.jsx diff --git a/packages/react-filerobot-image-editor/src/components/tools/Filters/Filters.constants.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Filters/Filters.constants.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Filters/Filters.constants.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Filters/Filters.constants.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Filters/Filters.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Filters/Filters.jsx similarity index 93% rename from packages/react-filerobot-image-editor/src/components/tools/Filters/Filters.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Filters/Filters.jsx index 7957b34c..92d1c271 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Filters/Filters.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Filters/Filters.jsx @@ -3,7 +3,7 @@ import React from 'react'; /** Internal Dependencies */ import { useFilter, useStore } from 'hooks'; -import Carousel from 'components/common/Carousel'; +import Carousel from 'components/Shared/Common/Carousel'; import FilterItem from './FilterItem'; import { AVAILABLE_FILTERS } from './Filters.constants'; diff --git a/packages/react-filerobot-image-editor/src/components/tools/Filters/Filters.styled.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Filters/Filters.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Filters/Filters.styled.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Filters/Filters.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Filters/index.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Filters/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Filters/index.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Filters/index.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/HSV/HSV.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/HSV/HSV.jsx similarity index 88% rename from packages/react-filerobot-image-editor/src/components/tools/HSV/HSV.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/HSV/HSV.jsx index 10e4c354..a4956ce1 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/HSV/HSV.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/HSV/HSV.jsx @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import { Saturation as SaturationIcon } from '@scaleflex/icons/saturation'; /** Internal Dependencies */ -import ToolsBarItemButton from 'components/ToolsBar/ToolsBarItemButton'; +import ToolsBarItemButton from 'components/Shared/ToolsBar/ToolsBarItemButton'; import { TOOLS_IDS } from 'utils/constants'; const HSV = ({ selectTool, isSelected = false, t }) => ( diff --git a/packages/react-filerobot-image-editor/src/components/tools/HSV/HSVOptions.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/HSV/HSVOptions.jsx similarity index 97% rename from packages/react-filerobot-image-editor/src/components/tools/HSV/HSVOptions.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/HSV/HSVOptions.jsx index 6da9431f..510f7971 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/HSV/HSVOptions.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/HSV/HSVOptions.jsx @@ -5,14 +5,14 @@ import Konva from 'konva'; /** Internal Dependencies */ import { useFinetune, usePhoneScreen } from 'hooks'; -import Slider from 'components/common/Slider'; +import Slider from 'components/Shared/Common/Slider'; import { StyledHSVOptions, StyledSliderContainer, StyledSliderLabel, StyledSliderInput, StyledSliderWrapper, -} from '../tools.styled'; +} from '../Tools.styled'; const DEFAULT_VALUE = { hue: 0, diff --git a/packages/react-filerobot-image-editor/src/components/tools/HSV/index.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/HSV/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/HSV/index.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/HSV/index.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Image/Image.styled.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Image/Image.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Image/Image.styled.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Image/Image.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Image/ImageButton.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Image/ImageButton.jsx similarity index 89% rename from packages/react-filerobot-image-editor/src/components/tools/Image/ImageButton.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Image/ImageButton.jsx index e407a93e..f783e7c2 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Image/ImageButton.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Image/ImageButton.jsx @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import { ImageOutline as ImageIcon } from '@scaleflex/icons/image-outline'; /** Internal Dependencies */ -import ToolsBarItemButton from 'components/ToolsBar/ToolsBarItemButton'; +import ToolsBarItemButton from 'components/Shared/ToolsBar/ToolsBarItemButton'; import { TOOLS_IDS } from 'utils/constants'; const ImageButton = ({ selectTool, isSelected = false, t }) => ( diff --git a/packages/react-filerobot-image-editor/src/components/tools/Image/ImageControls.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Image/ImageControls.jsx similarity index 88% rename from packages/react-filerobot-image-editor/src/components/tools/Image/ImageControls.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Image/ImageControls.jsx index 0ddb2d44..a3a4d0d6 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Image/ImageControls.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Image/ImageControls.jsx @@ -3,7 +3,7 @@ import React from 'react'; import PropTypes from 'prop-types'; /** Internal Dependencies */ -import AnnotationOptions from 'components/common/AnnotationOptions'; +import AnnotationOptions from 'components/Shared/Common/AnnotationOptions'; const ImageControls = ({ image, saveImage, children, t }) => ( ( diff --git a/packages/react-filerobot-image-editor/src/components/tools/Line/LineOptions.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Line/LineOptions.jsx similarity index 88% rename from packages/react-filerobot-image-editor/src/components/tools/Line/LineOptions.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Line/LineOptions.jsx index 7f23a60d..492ac5eb 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Line/LineOptions.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Line/LineOptions.jsx @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'; /** Internal Dependencies */ import { useAnnotation } from 'hooks'; import { TOOLS_IDS } from 'utils/constants'; -import AnnotationOptions from 'components/common/AnnotationOptions'; +import AnnotationOptions from 'components/Shared/Common/AnnotationOptions'; const LineOptions = ({ t }) => { const [line, saveLine] = useAnnotation({ diff --git a/packages/react-filerobot-image-editor/src/components/tools/Line/index.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Line/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Line/index.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Line/index.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Pen/PenButton.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Pen/PenButton.jsx similarity index 88% rename from packages/react-filerobot-image-editor/src/components/tools/Pen/PenButton.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Pen/PenButton.jsx index 4812ab44..a4ca04fb 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Pen/PenButton.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Pen/PenButton.jsx @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import { Annotation as PenIcon } from '@scaleflex/icons/annotation'; /** Internal Dependencies */ -import ToolsBarItemButton from 'components/ToolsBar/ToolsBarItemButton'; +import ToolsBarItemButton from 'components/Shared/ToolsBar/ToolsBarItemButton'; import { TOOLS_IDS } from 'utils/constants'; const PenButton = ({ selectTool, isSelected = false, t }) => ( diff --git a/packages/react-filerobot-image-editor/src/components/tools/Pen/PenOptions.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Pen/PenOptions.jsx similarity index 98% rename from packages/react-filerobot-image-editor/src/components/tools/Pen/PenOptions.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Pen/PenOptions.jsx index 92443162..264624ac 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Pen/PenOptions.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Pen/PenOptions.jsx @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'; /** Internal Dependencies */ import { useAnnotation, useSetAnnotation, useStore } from 'hooks'; import { TOOLS_IDS } from 'utils/constants'; -import AnnotationOptions from 'components/common/AnnotationOptions'; +import AnnotationOptions from 'components/Shared/Common/AnnotationOptions'; import getPointerOffsetPosition from 'utils/getPointerOffsetPosition'; import randomId from 'utils/randomId'; import { SELECT_ANNOTATION } from 'actions'; diff --git a/packages/react-filerobot-image-editor/src/components/tools/Pen/index.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Pen/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Pen/index.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Pen/index.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Polygon/Polygon.constants.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Polygon/Polygon.constants.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Polygon/Polygon.constants.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Polygon/Polygon.constants.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Polygon/PolygonButton.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Polygon/PolygonButton.jsx similarity index 89% rename from packages/react-filerobot-image-editor/src/components/tools/Polygon/PolygonButton.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Polygon/PolygonButton.jsx index adc95178..201209fe 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Polygon/PolygonButton.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Polygon/PolygonButton.jsx @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import { Polygon as PolygonIcon } from '@scaleflex/icons/polygon'; /** Internal Dependencies */ -import ToolsBarItemButton from 'components/ToolsBar/ToolsBarItemButton'; +import ToolsBarItemButton from 'components/Shared/ToolsBar/ToolsBarItemButton'; import { TOOLS_IDS } from 'utils/constants'; const PolygonButton = ({ selectTool, isSelected = false, t }) => ( diff --git a/packages/react-filerobot-image-editor/src/components/tools/Polygon/PolygonOptions.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Polygon/PolygonOptions.jsx similarity index 91% rename from packages/react-filerobot-image-editor/src/components/tools/Polygon/PolygonOptions.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Polygon/PolygonOptions.jsx index 3621333c..ffd7857d 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Polygon/PolygonOptions.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Polygon/PolygonOptions.jsx @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'; /** Internal Dependencies */ import { useAnnotation } from 'hooks'; import { TOOLS_IDS } from 'utils/constants'; -import AnnotationOptions from 'components/common/AnnotationOptions'; +import AnnotationOptions from 'components/Shared/Common/AnnotationOptions'; import { polygonOptionsPopupComponents, POLYGON_POPPABLE_OPTIONS, diff --git a/packages/react-filerobot-image-editor/src/components/tools/Polygon/PolygonSidesField.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Polygon/PolygonSidesField.jsx similarity index 86% rename from packages/react-filerobot-image-editor/src/components/tools/Polygon/PolygonSidesField.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Polygon/PolygonSidesField.jsx index bee4c525..e0b8e41b 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Polygon/PolygonSidesField.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Polygon/PolygonSidesField.jsx @@ -4,9 +4,9 @@ import PropTypes from 'prop-types'; import Label from '@scaleflex/ui/core/label'; /** InternalDependencies */ -import { StyledSpacedOptionFields } from 'components/common/AnnotationOptions/AnnotationOptions.styled'; +import { StyledSpacedOptionFields } from 'components/Shared/Common/AnnotationOptions/AnnotationOptions.styled'; import restrictNumber from 'utils/restrictNumber'; -import Slider from 'components/common/Slider'; +import Slider from 'components/Shared/Common/Slider'; const MIN_VALUE = 3; const MAX_VALUE = 25; diff --git a/packages/react-filerobot-image-editor/src/components/tools/Polygon/index.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Polygon/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Polygon/index.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Polygon/index.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Rect/Rect.constants.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Rect/Rect.constants.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Rect/Rect.constants.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Rect/Rect.constants.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Rect/RectButton.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Rect/RectButton.jsx similarity index 89% rename from packages/react-filerobot-image-editor/src/components/tools/Rect/RectButton.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Rect/RectButton.jsx index 4c983638..e2bf2e13 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Rect/RectButton.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Rect/RectButton.jsx @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import { CropLandscape as RectIcon } from '@scaleflex/icons/crop-landscape'; /** Internal Dependencies */ -import ToolsBarItemButton from 'components/ToolsBar/ToolsBarItemButton'; +import ToolsBarItemButton from 'components/Shared/ToolsBar/ToolsBarItemButton'; import { TOOLS_IDS } from 'utils/constants'; const RectButton = ({ selectTool, isSelected = false, t }) => ( diff --git a/packages/react-filerobot-image-editor/src/components/tools/Rect/RectCornerField.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Rect/RectCornerField.jsx similarity index 86% rename from packages/react-filerobot-image-editor/src/components/tools/Rect/RectCornerField.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Rect/RectCornerField.jsx index ed370674..37f25a96 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Rect/RectCornerField.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Rect/RectCornerField.jsx @@ -4,9 +4,9 @@ import PropTypes from 'prop-types'; import Label from '@scaleflex/ui/core/label'; /** InternalDependencies */ -import { StyledSpacedOptionFields } from 'components/common/AnnotationOptions/AnnotationOptions.styled'; +import { StyledSpacedOptionFields } from 'components/Shared/Common/AnnotationOptions/AnnotationOptions.styled'; import restrictNumber from 'utils/restrictNumber'; -import Slider from 'components/common/Slider'; +import Slider from 'components/Shared/Common/Slider'; const MIN_VALUE = 0; const MAX_VALUE = 150; diff --git a/packages/react-filerobot-image-editor/src/components/tools/Rect/RectOptions.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Rect/RectOptions.jsx similarity index 91% rename from packages/react-filerobot-image-editor/src/components/tools/Rect/RectOptions.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Rect/RectOptions.jsx index ee0a3955..4193f347 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Rect/RectOptions.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Rect/RectOptions.jsx @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'; /** Internal Dependencies */ import { useAnnotation } from 'hooks'; import { TOOLS_IDS } from 'utils/constants'; -import AnnotationOptions from 'components/common/AnnotationOptions'; +import AnnotationOptions from 'components/Shared/Common/AnnotationOptions'; import { rectOptionsPopupComponents, RECT_POPPABLE_OPTIONS, diff --git a/packages/react-filerobot-image-editor/src/components/tools/Rect/index.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Rect/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Rect/index.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Rect/index.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Text/TextButton.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Text/TextButton.jsx similarity index 88% rename from packages/react-filerobot-image-editor/src/components/tools/Text/TextButton.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Text/TextButton.jsx index 4f7bd3a9..2ba89dd7 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Text/TextButton.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Text/TextButton.jsx @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import { Text as TextIcon } from '@scaleflex/icons/text'; /** Internal Dependencies */ -import ToolsBarItemButton from 'components/ToolsBar/ToolsBarItemButton'; +import ToolsBarItemButton from 'components/Shared/ToolsBar/ToolsBarItemButton'; import { TOOLS_IDS } from 'utils/constants'; const TextButton = ({ selectTool, isSelected = false, t }) => ( diff --git a/packages/react-filerobot-image-editor/src/components/tools/Text/TextOptions/TextAlignmentFields.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Text/TextOptions/TextAlignmentFields.jsx similarity index 94% rename from packages/react-filerobot-image-editor/src/components/tools/Text/TextOptions/TextAlignmentFields.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Text/TextOptions/TextAlignmentFields.jsx index 0b48e57b..532c900f 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Text/TextOptions/TextAlignmentFields.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Text/TextOptions/TextAlignmentFields.jsx @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import { StyledSpacedOptionFields, StyledIconWrapper, -} from 'components/common/AnnotationOptions/AnnotationOptions.styled'; +} from 'components/Shared/Common/AnnotationOptions/AnnotationOptions.styled'; import { TextAlignCenter, TextAlignLeft } from '@scaleflex/icons'; const rightAlignmentCssTransform = { transform: 'scaleX(-1)' }; diff --git a/packages/react-filerobot-image-editor/src/components/tools/Text/TextOptions/TextControls.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Text/TextOptions/TextControls.jsx similarity index 95% rename from packages/react-filerobot-image-editor/src/components/tools/Text/TextOptions/TextControls.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Text/TextOptions/TextControls.jsx index c19da378..876e580a 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Text/TextOptions/TextControls.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Text/TextOptions/TextControls.jsx @@ -7,8 +7,8 @@ import FontItalic from '@scaleflex/icons/font-italic'; /** Internal Dependencies */ import { TOOLS_IDS } from 'utils/constants'; -import AnnotationOptions from 'components/common/AnnotationOptions'; -import { StyledIconWrapper } from 'components/common/AnnotationOptions/AnnotationOptions.styled'; +import AnnotationOptions from 'components/Shared/Common/AnnotationOptions'; +import { StyledIconWrapper } from 'components/Shared/Common/AnnotationOptions/AnnotationOptions.styled'; import { useStore, useTextAnnotationEditing } from 'hooks'; import { StyledFontFamilySelect, diff --git a/packages/react-filerobot-image-editor/src/components/tools/Text/TextOptions/TextOptions.constants.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Text/TextOptions/TextOptions.constants.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Text/TextOptions/TextOptions.constants.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Text/TextOptions/TextOptions.constants.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Text/TextOptions/TextOptions.styled.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Text/TextOptions/TextOptions.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Text/TextOptions/TextOptions.styled.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Text/TextOptions/TextOptions.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Text/TextOptions/TextSpacingsFields.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Text/TextOptions/TextSpacingsFields.jsx similarity index 92% rename from packages/react-filerobot-image-editor/src/components/tools/Text/TextOptions/TextSpacingsFields.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Text/TextOptions/TextSpacingsFields.jsx index 596c7bec..b914defd 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Text/TextOptions/TextSpacingsFields.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Text/TextOptions/TextSpacingsFields.jsx @@ -5,8 +5,8 @@ import Label from '@scaleflex/ui/core/label'; /** Internal Dependencies */ import restrictNumber from 'utils/restrictNumber'; -import { StyledSpacedOptionFields } from 'components/common/AnnotationOptions/AnnotationOptions.styled'; -import Slider from 'components/common/Slider'; +import { StyledSpacedOptionFields } from 'components/Shared/Common/AnnotationOptions/AnnotationOptions.styled'; +import Slider from 'components/Shared/Common/Slider'; import { useStore } from 'hooks'; const MIN_VALUE = 0; diff --git a/packages/react-filerobot-image-editor/src/components/tools/Text/TextOptions/index.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Text/TextOptions/index.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Text/TextOptions/index.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Text/TextOptions/index.jsx diff --git a/packages/react-filerobot-image-editor/src/components/tools/Text/index.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Text/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Text/index.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Text/index.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/tools.styled.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Tools.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/tools.styled.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Tools.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Warmth/Warmth.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Warmth/Warmth.jsx similarity index 89% rename from packages/react-filerobot-image-editor/src/components/tools/Warmth/Warmth.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Warmth/Warmth.jsx index fc35a809..236e7fd9 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Warmth/Warmth.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Warmth/Warmth.jsx @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import { Temprature as WarmthIcon } from '@scaleflex/icons/tempreture'; /** Internal Dependencies */ -import ToolsBarItemButton from 'components/ToolsBar/ToolsBarItemButton'; +import ToolsBarItemButton from 'components/Shared/ToolsBar/ToolsBarItemButton'; import { TOOLS_IDS } from 'utils/constants'; const Warmth = ({ selectTool, isSelected = false, t }) => ( diff --git a/packages/react-filerobot-image-editor/src/components/tools/Warmth/WarmthOptions.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Warmth/WarmthOptions.jsx similarity index 95% rename from packages/react-filerobot-image-editor/src/components/tools/Warmth/WarmthOptions.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Warmth/WarmthOptions.jsx index 6b59faff..38aa87ad 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Warmth/WarmthOptions.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Warmth/WarmthOptions.jsx @@ -6,13 +6,13 @@ import PropTypes from 'prop-types'; import { useFinetune } from 'hooks'; import restrictNumber from 'utils/restrictNumber'; import { Warmth as CustomWarmth } from 'custom/finetunes'; -import Slider from 'components/common/Slider'; +import Slider from 'components/Shared/Common/Slider'; import { StyledSliderContainer, StyledSliderInput, StyledSliderLabel, StyledSliderWrapper, -} from '../tools.styled'; +} from '../Tools.styled'; const MIN_VALUE = 0; const DEFAULT_VALUE = { diff --git a/packages/react-filerobot-image-editor/src/components/tools/Warmth/index.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Warmth/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Warmth/index.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Warmth/index.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Watermark/Watermark.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Watermark/Watermark.jsx similarity index 96% rename from packages/react-filerobot-image-editor/src/components/tools/Watermark/Watermark.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Watermark/Watermark.jsx index 710c88bd..a82f8188 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Watermark/Watermark.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Watermark/Watermark.jsx @@ -9,12 +9,12 @@ import { SET_FEEDBACK, CLEAR_ANNOTATIONS_SELECTIONS, } from 'actions'; -import ButtonWithMenu from 'components/common/ButtonWithMenu'; -import TextControls from 'components/tools/Text/TextOptions/TextControls'; -import ImageControls from 'components/tools/Image/ImageControls'; +import ButtonWithMenu from 'components/Shared/Common/ButtonWithMenu'; +import TextControls from 'components/ImageEditor/Tools/Text/TextOptions/TextControls'; +import ImageControls from 'components/ImageEditor/Tools/Image/ImageControls'; import { usePhoneScreen, useSetAnnotation, useStore } from 'hooks'; import { FEEDBACK_STATUSES, TOOLS_IDS } from 'utils/constants'; -import HiddenUploadInput from 'components/common/HiddenUploadInput'; +import HiddenUploadInput from 'components/Shared/Common/HiddenUploadInput'; import { StyledControlsWrapper, StyledWatermarkWrapper, diff --git a/packages/react-filerobot-image-editor/src/components/tools/Watermark/Watermark.styled.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Watermark/Watermark.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Watermark/Watermark.styled.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Watermark/Watermark.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Watermark/WatermarkPadding.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Watermark/WatermarkPadding.jsx similarity index 93% rename from packages/react-filerobot-image-editor/src/components/tools/Watermark/WatermarkPadding.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Watermark/WatermarkPadding.jsx index 0eb10c5a..35ee7b97 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Watermark/WatermarkPadding.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Watermark/WatermarkPadding.jsx @@ -11,8 +11,8 @@ import { StyledIconWrapper, StyledOptionPopupContent, StyledIconLabel, -} from 'components/common/AnnotationOptions/AnnotationOptions.styled'; -import Slider from 'components/common/Slider'; +} from 'components/Shared/Common/AnnotationOptions/AnnotationOptions.styled'; +import Slider from 'components/Shared/Common/Slider'; import { Label } from '@scaleflex/ui/core'; const WatermarkPadding = ({ watermark, saveWatermark, t }) => { diff --git a/packages/react-filerobot-image-editor/src/components/tools/Watermark/WatermarksGallery.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Watermark/WatermarksGallery.jsx similarity index 97% rename from packages/react-filerobot-image-editor/src/components/tools/Watermark/WatermarksGallery.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Watermark/WatermarksGallery.jsx index 6dacc52f..275baced 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Watermark/WatermarksGallery.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Watermark/WatermarksGallery.jsx @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'; /** Internal Dependencies */ import { useStore } from 'hooks'; import { TOOLS_IDS, WATERMARK_ANNOTATION_ID } from 'utils/constants'; -import Carousel from 'components/common/Carousel'; +import Carousel from 'components/Shared/Common/Carousel'; import { SET_FEEDBACK } from 'actions'; import { StyledWatermarkGalleryItem } from './Watermark.styled'; diff --git a/packages/react-filerobot-image-editor/src/components/tools/Watermark/index.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Watermark/index.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Watermark/index.jsx rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/Watermark/index.jsx diff --git a/packages/react-filerobot-image-editor/src/components/tools/tools.constants.js b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/tools.constant.js similarity index 64% rename from packages/react-filerobot-image-editor/src/components/tools/tools.constants.js rename to packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/tools.constant.js index cf18e8f1..00cb4466 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/tools.constants.js +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/Tools/tools.constant.js @@ -1,9 +1,6 @@ /** Internal Dependencies */ import { TABS_IDS, TOOLS_IDS } from 'utils/constants'; import { Brightness, BrightnessOptions } from './Brightness'; -import { Crop } from './Crop'; -import { FlipX, FlipY } from './Flip'; -import { RotateButton, RotateOptions } from './Rotate'; import { Contrast, ContrastOptions } from './Contrast'; import { HSV, HSVOptions } from './HSV'; import { Blur, BlurOptions } from './Blur'; @@ -17,28 +14,9 @@ import { PenButton, PenOptions } from './Pen'; import { LineButton, LineOptions } from './Line'; import { ArrowButton, ArrowOptions } from './Arrow'; import { PolygonButton, PolygonOptions } from './Polygon'; -import { Resize } from './Resize'; import { Watermark } from './Watermark'; -import { Trim } from './Trim'; -export const TOOLS_ITEMS = { - [TOOLS_IDS.CROP]: { - id: TOOLS_IDS.CROP, - Item: Crop, - }, - [TOOLS_IDS.ROTATE]: { - id: TOOLS_IDS.ROTATE, - Item: RotateButton, - ItemOptions: RotateOptions, - }, - [TOOLS_IDS.FLIP_X]: { - id: TOOLS_IDS.FLIP_X, - Item: FlipX, - }, - [TOOLS_IDS.FLIP_Y]: { - id: TOOLS_IDS.FLIP_Y, - Item: FlipY, - }, +export const IMAGE_TOOLS_ITEMS = { [TOOLS_IDS.BRIGHTNESS]: { id: TOOLS_IDS.BRIGHTNESS, Item: Brightness, @@ -114,42 +92,4 @@ export const TOOLS_ITEMS = { Item: ArrowButton, ItemOptions: ArrowOptions, }, - [TOOLS_IDS.RESIZE]: { - id: TOOLS_IDS.RESIZE, - Item: Resize, - }, - [TOOLS_IDS.TRIM]: { - id: TOOLS_IDS.TRIM, - Item: Trim, - }, -}; - -export const TABS_TOOLS = { - [TABS_IDS.ADJUST]: [ - TOOLS_IDS.CROP, - TOOLS_IDS.ROTATE, - TOOLS_IDS.FLIP_X, - TOOLS_IDS.FLIP_Y, - ], - [TABS_IDS.FINETUNE]: [ - TOOLS_IDS.BRIGHTNESS, - TOOLS_IDS.CONTRAST, - TOOLS_IDS.HSV, - TOOLS_IDS.BLUR, - TOOLS_IDS.WARMTH, - ], - [TABS_IDS.FILTERS]: [TOOLS_IDS.FILTERS], - [TABS_IDS.WATERMARK]: [TOOLS_IDS.WATERMARK], - [TABS_IDS.ANNOTATE]: [ - TOOLS_IDS.TEXT, - TOOLS_IDS.IMAGE, - TOOLS_IDS.RECT, - TOOLS_IDS.ELLIPSE, - TOOLS_IDS.POLYGON, - TOOLS_IDS.PEN, - TOOLS_IDS.LINE, - TOOLS_IDS.ARROW, - ], - [TABS_IDS.RESIZE]: [TOOLS_IDS.RESIZE], - [TABS_IDS.TRIM]: [TOOLS_IDS.TRIM], }; diff --git a/packages/react-filerobot-image-editor/src/components/ImageEditor/index.jsx b/packages/react-filerobot-image-editor/src/components/ImageEditor/index.jsx index e3f2a6a1..d0f883f7 100644 --- a/packages/react-filerobot-image-editor/src/components/ImageEditor/index.jsx +++ b/packages/react-filerobot-image-editor/src/components/ImageEditor/index.jsx @@ -2,12 +2,13 @@ import React, { memo } from 'react'; /** Internal Dependencies */ -import App from 'components/App'; -import AssemblyPointProviders from 'components/Providers'; +import App from 'components/Shared/AssemblyPoint'; +import AssemblyPointProviders from 'components/Shared/Providers'; +import { IMAGE_TOOLS_ITEMS } from './Tools/tools.constant'; const ImageEditor = (props) => ( - + ); diff --git a/packages/react-filerobot-image-editor/src/components/App/App.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/AssemblyPoint/AssemblyPoint.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/App/App.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/AssemblyPoint/AssemblyPoint.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/App/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/AssemblyPoint/index.jsx similarity index 81% rename from packages/react-filerobot-image-editor/src/components/App/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/AssemblyPoint/index.jsx index 826e6d07..7712f4b3 100644 --- a/packages/react-filerobot-image-editor/src/components/App/index.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/AssemblyPoint/index.jsx @@ -2,17 +2,17 @@ import React, { memo, useState, useRef } from 'react'; /** Internal Dependencies */ -import MainCanvas from 'components/MainCanvas'; +import MainCanvas from 'components/Shared/MainCanvas'; import { ROOT_CONTAINER_CLASS_NAME } from 'utils/constants'; -import Topbar from 'components/Topbar'; -import ToolsBar from 'components/ToolsBar'; +import Topbar from 'components/Shared/Topbar'; +import ToolsBar from 'components/Shared/ToolsBar'; import { usePhoneScreen, useStore, useTabletScreen } from 'hooks'; -import { TabsDrawer, TabsNavbar } from 'components/Tabs'; +import { TabsDrawer, TabsNavbar } from 'components/Shared/Tabs'; import { StyledAppWrapper, StyledMainContent, StyledCanvasAndTools, -} from './App.styled'; +} from './AssemblyPoint.styled'; // We're adding this as inline-styles cause it's specific for the main component usage not modules. const canvasStyle = { @@ -22,7 +22,7 @@ const canvasStyle = { flexGrow: 1, }; -const App = (canvasProps) => { +const App = ({ tools, tabsTools, ...canvasProps }) => { const { config, feedback } = useStore(); const { showCanvasOnly } = config; @@ -64,7 +64,9 @@ const App = (canvasProps) => { {...canvasProps} /> {canvasProps?.children} - {!showCanvasOnly && !isFixedAndCanvasHidableError && } + {!showCanvasOnly && !isFixedAndCanvasHidableError && ( + + )} diff --git a/packages/react-filerobot-image-editor/src/components/buttons/BackButton.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Buttons/BackButton.jsx similarity index 94% rename from packages/react-filerobot-image-editor/src/components/buttons/BackButton.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Buttons/BackButton.jsx index 6e6fae2e..2f45d5a8 100644 --- a/packages/react-filerobot-image-editor/src/components/buttons/BackButton.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/Buttons/BackButton.jsx @@ -8,7 +8,7 @@ import { FontVariant as FV } from '@scaleflex/ui/utils/types/typography'; /** Internal Dependencies */ import { usePhoneScreen, useStore } from 'hooks'; -import { DiscardConfirmationModal } from 'components/common/ConfirmationModals'; +import { DiscardConfirmationModal } from 'components/Shared/Common/ConfirmationModals'; import { CLOSING_REASONS } from 'utils/constants'; const StyledBackButtonLabel = styled.span` diff --git a/packages/react-filerobot-image-editor/src/components/buttons/CloseButton.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Buttons/CloseButton.jsx similarity index 94% rename from packages/react-filerobot-image-editor/src/components/buttons/CloseButton.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Buttons/CloseButton.jsx index 37d3470f..8d97b5ae 100644 --- a/packages/react-filerobot-image-editor/src/components/buttons/CloseButton.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/Buttons/CloseButton.jsx @@ -8,7 +8,7 @@ import PropTypes from 'prop-types'; /** Internal Dependencies */ import { useStore } from 'hooks'; import { CLOSING_REASONS } from 'utils/constants'; -import { DiscardConfirmationModal } from '../common/ConfirmationModals'; +import { DiscardConfirmationModal } from '../Common/ConfirmationModals'; const StyledCloseButton = styled(CrossButton)` padding: 8px; diff --git a/packages/react-filerobot-image-editor/src/components/buttons/HistoryButtons/HistoryButtons.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Buttons/HistoryButtons/HistoryButtons.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/buttons/HistoryButtons/HistoryButtons.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Buttons/HistoryButtons/HistoryButtons.jsx diff --git a/packages/react-filerobot-image-editor/src/components/buttons/HistoryButtons/HistoryButtons.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/Buttons/HistoryButtons/HistoryButtons.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/buttons/HistoryButtons/HistoryButtons.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/Buttons/HistoryButtons/HistoryButtons.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/buttons/HistoryButtons/RedoButton.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Buttons/HistoryButtons/RedoButton.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/buttons/HistoryButtons/RedoButton.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Buttons/HistoryButtons/RedoButton.jsx diff --git a/packages/react-filerobot-image-editor/src/components/buttons/HistoryButtons/ResetButton.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Buttons/HistoryButtons/ResetButton.jsx similarity index 92% rename from packages/react-filerobot-image-editor/src/components/buttons/HistoryButtons/ResetButton.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Buttons/HistoryButtons/ResetButton.jsx index ea20f55e..0ad031bc 100644 --- a/packages/react-filerobot-image-editor/src/components/buttons/HistoryButtons/ResetButton.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/Buttons/HistoryButtons/ResetButton.jsx @@ -5,7 +5,7 @@ import Reset from '@scaleflex/icons/reset'; /** Internal Dependencies */ import { useStore } from 'hooks'; import { StyledHistoryButton } from './HistoryButtons.styled'; -import { ResetConfirmationModal } from '../../common/ConfirmationModals'; +import { ResetConfirmationModal } from '../../Common/ConfirmationModals'; const ResetButton = (props) => { const { isResetted = true, feedback, t } = useStore(); diff --git a/packages/react-filerobot-image-editor/src/components/buttons/HistoryButtons/UndoButton.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Buttons/HistoryButtons/UndoButton.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/buttons/HistoryButtons/UndoButton.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Buttons/HistoryButtons/UndoButton.jsx diff --git a/packages/react-filerobot-image-editor/src/components/buttons/HistoryButtons/index.js b/packages/react-filerobot-image-editor/src/components/Shared/Buttons/HistoryButtons/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/buttons/HistoryButtons/index.js rename to packages/react-filerobot-image-editor/src/components/Shared/Buttons/HistoryButtons/index.js diff --git a/packages/react-filerobot-image-editor/src/components/buttons/SaveButton/SaveButton.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/Buttons/SaveButton/SaveButton.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/buttons/SaveButton/SaveButton.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/Buttons/SaveButton/SaveButton.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/buttons/SaveButton/SaveModal.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Buttons/SaveButton/SaveModal.jsx similarity index 95% rename from packages/react-filerobot-image-editor/src/components/buttons/SaveButton/SaveModal.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Buttons/SaveButton/SaveModal.jsx index 33211c65..de547e27 100644 --- a/packages/react-filerobot-image-editor/src/components/buttons/SaveButton/SaveModal.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/Buttons/SaveButton/SaveModal.jsx @@ -6,9 +6,9 @@ import Label from '@scaleflex/ui/core/label'; /** Internal Dependencies */ import { useStore } from 'hooks'; -import Modal from 'components/common/Modal'; -import Slider from 'components/common/Slider'; -import { Resize } from 'components/tools/Resize'; +import Modal from 'components/Shared/Common/Modal'; +import Slider from 'components/Shared/Common/Slider'; +import { Resize } from 'components/Shared/Tools/Resize'; import { StyledFileExtensionSelect, StyledFileNameInput, diff --git a/packages/react-filerobot-image-editor/src/components/buttons/SaveButton/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Buttons/SaveButton/index.jsx similarity index 98% rename from packages/react-filerobot-image-editor/src/components/buttons/SaveButton/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Buttons/SaveButton/index.jsx index 236e33c9..cfce5952 100644 --- a/packages/react-filerobot-image-editor/src/components/buttons/SaveButton/index.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/Buttons/SaveButton/index.jsx @@ -17,7 +17,7 @@ import { } from 'utils/constants'; import { SET_FEEDBACK, SET_SAVING } from 'actions'; import restrictNumber from 'utils/restrictNumber'; -import ButtonWithMenu from 'components/common/ButtonWithMenu'; +import ButtonWithMenu from 'components/Shared/Common/ButtonWithMenu'; import useTransformedVideoData from 'hooks/useTransformedVideoData'; import isImage from 'utils/isImage'; import getSupportedExtensions from 'utils/getSupportedExtensions'; @@ -163,6 +163,10 @@ const SaveButton = ({ }; const triggerSaveHandler = () => { + if (originalSource && !isImageFile) { + originalSource.pause(); + } + if (disableSaveIfNoChanges && !hasUndo) { return; } diff --git a/packages/react-filerobot-image-editor/src/components/buttons/ZoomButtons/ZoomButtons.constants.js b/packages/react-filerobot-image-editor/src/components/Shared/Buttons/ZoomButtons/ZoomButtons.constants.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/buttons/ZoomButtons/ZoomButtons.constants.js rename to packages/react-filerobot-image-editor/src/components/Shared/Buttons/ZoomButtons/ZoomButtons.constants.js diff --git a/packages/react-filerobot-image-editor/src/components/buttons/ZoomButtons/ZoomButtons.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/Buttons/ZoomButtons/ZoomButtons.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/buttons/ZoomButtons/ZoomButtons.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/Buttons/ZoomButtons/ZoomButtons.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/buttons/ZoomButtons/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Buttons/ZoomButtons/index.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/buttons/ZoomButtons/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Buttons/ZoomButtons/index.jsx diff --git a/packages/react-filerobot-image-editor/src/components/buttons/index.js b/packages/react-filerobot-image-editor/src/components/Shared/Buttons/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/buttons/index.js rename to packages/react-filerobot-image-editor/src/components/Shared/Buttons/index.js diff --git a/packages/react-filerobot-image-editor/src/components/common/AnnotationOptions/AnnotationOptions.constants.js b/packages/react-filerobot-image-editor/src/components/Shared/Common/AnnotationOptions/AnnotationOptions.constants.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/AnnotationOptions/AnnotationOptions.constants.js rename to packages/react-filerobot-image-editor/src/components/Shared/Common/AnnotationOptions/AnnotationOptions.constants.js diff --git a/packages/react-filerobot-image-editor/src/components/common/AnnotationOptions/AnnotationOptions.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/Common/AnnotationOptions/AnnotationOptions.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/AnnotationOptions/AnnotationOptions.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/Common/AnnotationOptions/AnnotationOptions.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/common/AnnotationOptions/OpacityField.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Common/AnnotationOptions/OpacityField.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/AnnotationOptions/OpacityField.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Common/AnnotationOptions/OpacityField.jsx diff --git a/packages/react-filerobot-image-editor/src/components/common/AnnotationOptions/PositionFields.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Common/AnnotationOptions/PositionFields.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/AnnotationOptions/PositionFields.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Common/AnnotationOptions/PositionFields.jsx diff --git a/packages/react-filerobot-image-editor/src/components/common/AnnotationOptions/ShadowFields.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Common/AnnotationOptions/ShadowFields.jsx similarity index 97% rename from packages/react-filerobot-image-editor/src/components/common/AnnotationOptions/ShadowFields.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Common/AnnotationOptions/ShadowFields.jsx index aa491d48..7fbada4d 100644 --- a/packages/react-filerobot-image-editor/src/components/common/AnnotationOptions/ShadowFields.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/Common/AnnotationOptions/ShadowFields.jsx @@ -5,7 +5,7 @@ import Label from '@scaleflex/ui/core/label'; /** Internal Dependencies */ import restrictNumber from 'utils/restrictNumber'; -import ColorInput from 'components/common/ColorInput'; +import ColorInput from 'components/Shared/Common/ColorInput'; import { StyledTwoColumnsContainer, StyledColumn, diff --git a/packages/react-filerobot-image-editor/src/components/common/AnnotationOptions/StrokeFields.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Common/AnnotationOptions/StrokeFields.jsx similarity index 95% rename from packages/react-filerobot-image-editor/src/components/common/AnnotationOptions/StrokeFields.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Common/AnnotationOptions/StrokeFields.jsx index 030ed92b..b95d554f 100644 --- a/packages/react-filerobot-image-editor/src/components/common/AnnotationOptions/StrokeFields.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/Common/AnnotationOptions/StrokeFields.jsx @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; /** Internal Dependencies */ import restrictNumber from 'utils/restrictNumber'; -import ColorInput from 'components/common/ColorInput'; +import ColorInput from 'components/Shared/Common/ColorInput'; import { StyledSpacedOptionFields } from './AnnotationOptions.styled'; import Slider from '../Slider'; diff --git a/packages/react-filerobot-image-editor/src/components/common/AnnotationOptions/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Common/AnnotationOptions/index.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/AnnotationOptions/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Common/AnnotationOptions/index.jsx diff --git a/packages/react-filerobot-image-editor/src/components/common/ButtonWithMenu/ButtonWithMenu.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/Common/ButtonWithMenu/ButtonWithMenu.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/ButtonWithMenu/ButtonWithMenu.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/Common/ButtonWithMenu/ButtonWithMenu.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/common/ButtonWithMenu/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Common/ButtonWithMenu/index.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/ButtonWithMenu/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Common/ButtonWithMenu/index.jsx diff --git a/packages/react-filerobot-image-editor/src/components/common/Carousel/Carousel.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/Common/Carousel/Carousel.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/Carousel/Carousel.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/Common/Carousel/Carousel.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/common/Carousel/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Common/Carousel/index.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/Carousel/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Common/Carousel/index.jsx diff --git a/packages/react-filerobot-image-editor/src/components/common/ColorInput/ColorInput.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/Common/ColorInput/ColorInput.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/ColorInput/ColorInput.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/Common/ColorInput/ColorInput.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/common/ColorInput/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Common/ColorInput/index.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/ColorInput/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Common/ColorInput/index.jsx diff --git a/packages/react-filerobot-image-editor/src/components/common/ColorPickerModal/ColorPickerModal.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/Common/ColorPickerModal/ColorPickerModal.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/ColorPickerModal/ColorPickerModal.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/Common/ColorPickerModal/ColorPickerModal.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/common/ColorPickerModal/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Common/ColorPickerModal/index.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/ColorPickerModal/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Common/ColorPickerModal/index.jsx diff --git a/packages/react-filerobot-image-editor/src/components/common/ConfirmationModals/ConfirmationModal.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Common/ConfirmationModals/ConfirmationModal.jsx similarity index 97% rename from packages/react-filerobot-image-editor/src/components/common/ConfirmationModals/ConfirmationModal.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Common/ConfirmationModals/ConfirmationModal.jsx index bf17846a..1917d3b5 100644 --- a/packages/react-filerobot-image-editor/src/components/common/ConfirmationModals/ConfirmationModal.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/Common/ConfirmationModals/ConfirmationModal.jsx @@ -6,7 +6,7 @@ import { useTheme } from '@scaleflex/ui/theme/hooks'; /** Internal Dependencies */ import { useStore } from 'hooks'; -import Modal from 'components/common/Modal'; +import Modal from 'components/Shared/Common/Modal'; const WarningIcon = () => { const theme = useTheme(); diff --git a/packages/react-filerobot-image-editor/src/components/common/ConfirmationModals/DiscardConfirmationModal.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Common/ConfirmationModals/DiscardConfirmationModal.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/ConfirmationModals/DiscardConfirmationModal.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Common/ConfirmationModals/DiscardConfirmationModal.jsx diff --git a/packages/react-filerobot-image-editor/src/components/common/ConfirmationModals/ResetConfirmationModal.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Common/ConfirmationModals/ResetConfirmationModal.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/ConfirmationModals/ResetConfirmationModal.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Common/ConfirmationModals/ResetConfirmationModal.jsx diff --git a/packages/react-filerobot-image-editor/src/components/common/ConfirmationModals/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Common/ConfirmationModals/index.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/ConfirmationModals/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Common/ConfirmationModals/index.jsx diff --git a/packages/react-filerobot-image-editor/src/components/common/HiddenUploadInput/HiddenUploadInput.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/Common/HiddenUploadInput/HiddenUploadInput.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/HiddenUploadInput/HiddenUploadInput.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/Common/HiddenUploadInput/HiddenUploadInput.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/common/HiddenUploadInput/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Common/HiddenUploadInput/index.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/HiddenUploadInput/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Common/HiddenUploadInput/index.jsx diff --git a/packages/react-filerobot-image-editor/src/components/common/Modal/Modal.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/Common/Modal/Modal.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/Modal/Modal.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/Common/Modal/Modal.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/common/Modal/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Common/Modal/index.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/Modal/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Common/Modal/index.jsx diff --git a/packages/react-filerobot-image-editor/src/components/common/Separator/Separator.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/Common/Separator/Separator.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/Separator/Separator.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/Common/Separator/Separator.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/common/Separator/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Common/Separator/index.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/Separator/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Common/Separator/index.jsx diff --git a/packages/react-filerobot-image-editor/src/components/common/Slider/Slider.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/Common/Slider/Slider.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/Slider/Slider.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/Common/Slider/Slider.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/common/Slider/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Common/Slider/index.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/Slider/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Common/Slider/index.jsx diff --git a/packages/react-filerobot-image-editor/src/components/common/Spinner/Spinner.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/Common/Spinner/Spinner.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/Spinner/Spinner.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/Common/Spinner/Spinner.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/common/Spinner/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Common/Spinner/index.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/Spinner/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Common/Spinner/index.jsx diff --git a/packages/react-filerobot-image-editor/src/components/common/index.js b/packages/react-filerobot-image-editor/src/components/Shared/Common/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/common/index.js rename to packages/react-filerobot-image-editor/src/components/Shared/Common/index.js diff --git a/packages/react-filerobot-image-editor/src/components/FeedbackPopup/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/FeedbackPopup/index.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/FeedbackPopup/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/FeedbackPopup/index.jsx diff --git a/packages/react-filerobot-image-editor/src/components/ImageInfo/ImageInfo.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/ImageInfo/ImageInfo.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/ImageInfo/ImageInfo.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/ImageInfo/ImageInfo.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/ImageInfo/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/ImageInfo/index.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/ImageInfo/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/ImageInfo/index.jsx diff --git a/packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/AnnotationNodes.constants.js b/packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/AnnotationNodes.constants.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/AnnotationNodes.constants.js rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/AnnotationNodes.constants.js diff --git a/packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/ArrowNode.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/ArrowNode.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/ArrowNode.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/ArrowNode.jsx diff --git a/packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/EllipseNode.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/EllipseNode.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/EllipseNode.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/EllipseNode.jsx diff --git a/packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/ImageNode.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/ImageNode.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/ImageNode.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/ImageNode.jsx diff --git a/packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/LineNode.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/LineNode.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/LineNode.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/LineNode.jsx diff --git a/packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/MemoizedAnnotation.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/MemoizedAnnotation.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/MemoizedAnnotation.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/MemoizedAnnotation.jsx diff --git a/packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/PolygonNode.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/PolygonNode.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/PolygonNode.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/PolygonNode.jsx diff --git a/packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/RectNode.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/RectNode.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/RectNode.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/RectNode.jsx diff --git a/packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/TextNode/TextNode.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/TextNode/TextNode.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/TextNode/TextNode.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/TextNode/TextNode.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/TextNode/TextNode.utils.js b/packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/TextNode/TextNode.utils.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/TextNode/TextNode.utils.js rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/TextNode/TextNode.utils.js diff --git a/packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/TextNode/TextNodeContentTextarea.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/TextNode/TextNodeContentTextarea.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/TextNode/TextNodeContentTextarea.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/TextNode/TextNodeContentTextarea.jsx diff --git a/packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/TextNode/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/TextNode/index.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/TextNode/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/TextNode/index.jsx diff --git a/packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/index.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/AnnotationNodes/index.jsx diff --git a/packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/DesignLayerWrapper.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/DesignLayerWrapper.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/DesignLayerWrapper.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/DesignLayerWrapper.jsx diff --git a/packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/PreviewGroup.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/PreviewGroup.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/PreviewGroup.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/PreviewGroup.jsx diff --git a/packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/index.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/index.jsx diff --git a/packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/nodesCommonPropTypes.js b/packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/nodesCommonPropTypes.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/nodesCommonPropTypes.js rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/DesignLayer/nodesCommonPropTypes.js diff --git a/packages/react-filerobot-image-editor/src/components/Layers/LayersBackground.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Layers/LayersBackground.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/LayersBackground.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/LayersBackground.jsx diff --git a/packages/react-filerobot-image-editor/src/components/Layers/TransformersLayer/CropTransformer.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Layers/TransformersLayer/CropTransformer.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/TransformersLayer/CropTransformer.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/TransformersLayer/CropTransformer.jsx diff --git a/packages/react-filerobot-image-editor/src/components/Layers/TransformersLayer/NodesTransformer.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Layers/TransformersLayer/NodesTransformer.jsx similarity index 98% rename from packages/react-filerobot-image-editor/src/components/Layers/TransformersLayer/NodesTransformer.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/TransformersLayer/NodesTransformer.jsx index 792c0685..0a9bc8a0 100644 --- a/packages/react-filerobot-image-editor/src/components/Layers/TransformersLayer/NodesTransformer.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/Layers/TransformersLayer/NodesTransformer.jsx @@ -11,7 +11,7 @@ import { import { useEditableTextId, useStore } from 'hooks'; import { CHANGE_POINTER_ICON, ENABLE_TEXT_CONTENT_EDIT } from 'actions'; import debounce from 'utils/debounce'; -import NodeControls from 'components/NodeControls'; +import NodeControls from 'components/Shared/NodeControls'; let isUnMounted = false; diff --git a/packages/react-filerobot-image-editor/src/components/Layers/TransformersLayer/TransformersLayer.utils.js b/packages/react-filerobot-image-editor/src/components/Shared/Layers/TransformersLayer/TransformersLayer.utils.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/TransformersLayer/TransformersLayer.utils.js rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/TransformersLayer/TransformersLayer.utils.js diff --git a/packages/react-filerobot-image-editor/src/components/Layers/TransformersLayer/TransformersLayerWrapper.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Layers/TransformersLayer/TransformersLayerWrapper.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/TransformersLayer/TransformersLayerWrapper.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/TransformersLayer/TransformersLayerWrapper.jsx diff --git a/packages/react-filerobot-image-editor/src/components/Layers/TransformersLayer/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Layers/TransformersLayer/index.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/TransformersLayer/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/TransformersLayer/index.jsx diff --git a/packages/react-filerobot-image-editor/src/components/Layers/index.js b/packages/react-filerobot-image-editor/src/components/Shared/Layers/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Layers/index.js rename to packages/react-filerobot-image-editor/src/components/Shared/Layers/index.js diff --git a/packages/react-filerobot-image-editor/src/components/MainCanvas/CanvasNode.jsx b/packages/react-filerobot-image-editor/src/components/Shared/MainCanvas/CanvasNode.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/MainCanvas/CanvasNode.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/MainCanvas/CanvasNode.jsx diff --git a/packages/react-filerobot-image-editor/src/components/MainCanvas/MainCanvas.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/MainCanvas/MainCanvas.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/MainCanvas/MainCanvas.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/MainCanvas/MainCanvas.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/MainCanvas/MainCanvasWrapper.jsx b/packages/react-filerobot-image-editor/src/components/Shared/MainCanvas/MainCanvasWrapper.jsx similarity index 96% rename from packages/react-filerobot-image-editor/src/components/MainCanvas/MainCanvasWrapper.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/MainCanvas/MainCanvasWrapper.jsx index f9b5cfc5..80d36b1c 100644 --- a/packages/react-filerobot-image-editor/src/components/MainCanvas/MainCanvasWrapper.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/MainCanvas/MainCanvasWrapper.jsx @@ -6,8 +6,8 @@ import PropTypes from 'prop-types'; import { AppProviderOverriddenValue } from 'context'; import { SET_CANVAS_SIZE } from 'actions'; import { useResizeObserver, useStore, useLoadMainSource } from 'hooks'; -import FeedbackPopup from 'components/FeedbackPopup'; -import Spinner from 'components/common/Spinner'; +import FeedbackPopup from 'components/Shared/FeedbackPopup'; +import Spinner from 'components/Shared/Common/Spinner'; import CanvasNode from './CanvasNode'; import { CanvasContainer, StyledOriginalImage } from './MainCanvas.styled'; diff --git a/packages/react-filerobot-image-editor/src/components/MainCanvas/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/MainCanvas/index.jsx similarity index 95% rename from packages/react-filerobot-image-editor/src/components/MainCanvas/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/MainCanvas/index.jsx index 66538dfb..6cb60087 100644 --- a/packages/react-filerobot-image-editor/src/components/MainCanvas/index.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/MainCanvas/index.jsx @@ -3,7 +3,7 @@ import React from 'react'; import PropTypes from 'prop-types'; /** Internal Dependencies */ -import { DesignLayer, TransformersLayer } from 'components/Layers'; +import { DesignLayer, TransformersLayer } from 'components/Shared/Layers'; import MainCanvasWrapper from './MainCanvasWrapper'; import 'custom/shapes/FormattedText'; diff --git a/packages/react-filerobot-image-editor/src/components/MainCanvas/touchZoomingEvents.js b/packages/react-filerobot-image-editor/src/components/Shared/MainCanvas/touchZoomingEvents.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/MainCanvas/touchZoomingEvents.js rename to packages/react-filerobot-image-editor/src/components/Shared/MainCanvas/touchZoomingEvents.js diff --git a/packages/react-filerobot-image-editor/src/components/NodeControls/NodeControls.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/NodeControls/NodeControls.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/NodeControls/NodeControls.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/NodeControls/NodeControls.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/NodeControls/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/NodeControls/index.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/NodeControls/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/NodeControls/index.jsx diff --git a/packages/react-filerobot-image-editor/src/components/Providers/globalStyles.js b/packages/react-filerobot-image-editor/src/components/Shared/Providers/globalStyles.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Providers/globalStyles.js rename to packages/react-filerobot-image-editor/src/components/Shared/Providers/globalStyles.js diff --git a/packages/react-filerobot-image-editor/src/components/Providers/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Providers/index.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Providers/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Providers/index.jsx diff --git a/packages/react-filerobot-image-editor/src/components/Tabs/TabItem.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Tabs/TabItem.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Tabs/TabItem.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Tabs/TabItem.jsx diff --git a/packages/react-filerobot-image-editor/src/components/Tabs/Tabs.constants.js b/packages/react-filerobot-image-editor/src/components/Shared/Tabs/Tabs.constants.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Tabs/Tabs.constants.js rename to packages/react-filerobot-image-editor/src/components/Shared/Tabs/Tabs.constants.js diff --git a/packages/react-filerobot-image-editor/src/components/Tabs/Tabs.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Tabs/Tabs.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Tabs/Tabs.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Tabs/Tabs.jsx diff --git a/packages/react-filerobot-image-editor/src/components/Tabs/Tabs.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/Tabs/Tabs.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Tabs/Tabs.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/Tabs/Tabs.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/Tabs/TabsDrawer/TabsDrawer.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/Tabs/TabsDrawer/TabsDrawer.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Tabs/TabsDrawer/TabsDrawer.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/Tabs/TabsDrawer/TabsDrawer.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/Tabs/TabsDrawer/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Tabs/TabsDrawer/index.jsx similarity index 95% rename from packages/react-filerobot-image-editor/src/components/Tabs/TabsDrawer/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Tabs/TabsDrawer/index.jsx index 084c85df..3e677689 100644 --- a/packages/react-filerobot-image-editor/src/components/Tabs/TabsDrawer/index.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/Tabs/TabsDrawer/index.jsx @@ -11,7 +11,7 @@ import { Button } from '@scaleflex/ui/core'; /** Internal Dependencies */ import { useStore, useToggleTabsNavbar } from 'hooks'; -import Tabs from 'components/Tabs/Tabs'; +import Tabs from 'components/Shared/Tabs/Tabs'; import { StyledTabsDrawer } from './TabsDrawer.styled'; const TabsDrawer = (props) => { diff --git a/packages/react-filerobot-image-editor/src/components/Tabs/TabsNavbar/TabsNavbar.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/Tabs/TabsNavbar/TabsNavbar.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Tabs/TabsNavbar/TabsNavbar.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/Tabs/TabsNavbar/TabsNavbar.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/Tabs/TabsNavbar/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Tabs/TabsNavbar/index.jsx similarity index 90% rename from packages/react-filerobot-image-editor/src/components/Tabs/TabsNavbar/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Tabs/TabsNavbar/index.jsx index 067ff86d..db159738 100644 --- a/packages/react-filerobot-image-editor/src/components/Tabs/TabsNavbar/index.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/Tabs/TabsNavbar/index.jsx @@ -2,7 +2,7 @@ import React from 'react'; /** Internal Dependencies */ -import Tabs from 'components/Tabs/Tabs'; +import Tabs from 'components/Shared/Tabs/Tabs'; import { StyledTabsNavbar } from './TabsNavbar.styled'; import useTabs from '../hooks/useTabs'; diff --git a/packages/react-filerobot-image-editor/src/components/Tabs/TabsResponsive.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Tabs/TabsResponsive.jsx similarity index 78% rename from packages/react-filerobot-image-editor/src/components/Tabs/TabsResponsive.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Tabs/TabsResponsive.jsx index 68fe1988..afd64e21 100644 --- a/packages/react-filerobot-image-editor/src/components/Tabs/TabsResponsive.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/Tabs/TabsResponsive.jsx @@ -1,5 +1,5 @@ /** Internal dependencies */ -import { TabsDrawer, TabsNavbar } from 'components/Tabs'; +import { TabsDrawer, TabsNavbar } from 'components/Shared/Tabs'; import { useTabletScreen } from 'hooks'; const TabsResponsive = () => { diff --git a/packages/react-filerobot-image-editor/src/components/Tabs/hooks/useTabs.js b/packages/react-filerobot-image-editor/src/components/Shared/Tabs/hooks/useTabs.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Tabs/hooks/useTabs.js rename to packages/react-filerobot-image-editor/src/components/Shared/Tabs/hooks/useTabs.js diff --git a/packages/react-filerobot-image-editor/src/components/Tabs/index.js b/packages/react-filerobot-image-editor/src/components/Shared/Tabs/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Tabs/index.js rename to packages/react-filerobot-image-editor/src/components/Shared/Tabs/index.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Crop/Crop.constants.js b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Crop/Crop.constants.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Crop/Crop.constants.js rename to packages/react-filerobot-image-editor/src/components/Shared/Tools/Crop/Crop.constants.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Crop/Crop.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Crop/Crop.jsx similarity index 88% rename from packages/react-filerobot-image-editor/src/components/tools/Crop/Crop.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Tools/Crop/Crop.jsx index 10720937..3761b69b 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Crop/Crop.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Crop/Crop.jsx @@ -5,9 +5,9 @@ import { Crop as CropIcon } from '@scaleflex/icons/crop'; /** Internal Dependencies */ import { useStore } from 'hooks'; -import ToolsBarItemButton from 'components/ToolsBar/ToolsBarItemButton'; +import ToolsBarItemButton from 'components/Shared/ToolsBar/ToolsBarItemButton'; import { TOOLS_IDS } from 'utils/constants'; -import { StyledToolsBarItemButtonLabel } from 'components/ToolsBar/ToolsBar.styled'; +import { StyledToolsBarItemButtonLabel } from 'components/Shared/ToolsBar/ToolsBar.styled'; import CropPresetsOption from './CropPresetsOption'; const Crop = ({ selectTool, isSelected = false }) => { diff --git a/packages/react-filerobot-image-editor/src/components/tools/Crop/Crop.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Crop/Crop.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Crop/Crop.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/Tools/Crop/Crop.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Crop/CropPresetGroup.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Crop/CropPresetGroup.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Crop/CropPresetGroup.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Tools/Crop/CropPresetGroup.jsx diff --git a/packages/react-filerobot-image-editor/src/components/tools/Crop/CropPresetGroupsFolder.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Crop/CropPresetGroupsFolder.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Crop/CropPresetGroupsFolder.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Tools/Crop/CropPresetGroupsFolder.jsx diff --git a/packages/react-filerobot-image-editor/src/components/tools/Crop/CropPresetItem.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Crop/CropPresetItem.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Crop/CropPresetItem.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Tools/Crop/CropPresetItem.jsx diff --git a/packages/react-filerobot-image-editor/src/components/tools/Crop/CropPresetsOption.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Crop/CropPresetsOption.jsx similarity index 98% rename from packages/react-filerobot-image-editor/src/components/tools/Crop/CropPresetsOption.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Tools/Crop/CropPresetsOption.jsx index 610e0d28..837d4950 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Crop/CropPresetsOption.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Crop/CropPresetsOption.jsx @@ -7,7 +7,7 @@ import { Menu } from '@scaleflex/ui/core'; /** Internal Dependencies */ import { SET_CROP, SET_RESIZE, ZOOM_CANVAS } from 'actions'; import { usePhoneScreen, useStore } from 'hooks'; -import { StyledToolsBarItemButtonLabel } from 'components/ToolsBar/ToolsBar.styled'; +import { StyledToolsBarItemButtonLabel } from 'components/Shared/ToolsBar/ToolsBar.styled'; import { DEFAULT_ZOOM_FACTOR, ORIGINAL_CROP, TOOLS_IDS } from 'utils/constants'; import toPrecisedFloat from 'utils/toPrecisedFloat'; import getZoomFitFactor from 'utils/getZoomFitFactor'; diff --git a/packages/react-filerobot-image-editor/src/components/tools/Crop/index.js b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Crop/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Crop/index.js rename to packages/react-filerobot-image-editor/src/components/Shared/Tools/Crop/index.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Flip/FlipX.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Flip/FlipX.jsx similarity index 95% rename from packages/react-filerobot-image-editor/src/components/tools/Flip/FlipX.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Tools/Flip/FlipX.jsx index 8d162d96..7a108328 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Flip/FlipX.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Flip/FlipX.jsx @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import { FlipX as FlipXIcon } from '@scaleflex/icons/flip-x'; /** Internal Dependencies */ -import ToolsBarItemButton from 'components/ToolsBar/ToolsBarItemButton'; +import ToolsBarItemButton from 'components/Shared/ToolsBar/ToolsBarItemButton'; import { FLIP_DIRECTIONS, TOOLS_IDS } from 'utils/constants'; import { TOGGLE_FLIP } from 'actions'; import { usePhoneScreen, useStore } from 'hooks'; diff --git a/packages/react-filerobot-image-editor/src/components/tools/Flip/FlipY.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Flip/FlipY.jsx similarity index 95% rename from packages/react-filerobot-image-editor/src/components/tools/Flip/FlipY.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Tools/Flip/FlipY.jsx index 09eedcbb..7e76ebce 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Flip/FlipY.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Flip/FlipY.jsx @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import { FlipY as FlipYIcon } from '@scaleflex/icons/flip-y'; /** Internal Dependencies */ -import ToolsBarItemButton from 'components/ToolsBar/ToolsBarItemButton'; +import ToolsBarItemButton from 'components/Shared/ToolsBar/ToolsBarItemButton'; import { FLIP_DIRECTIONS, TOOLS_IDS } from 'utils/constants'; import { TOGGLE_FLIP } from 'actions'; import { usePhoneScreen, useStore } from 'hooks'; diff --git a/packages/react-filerobot-image-editor/src/components/tools/Flip/index.js b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Flip/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Flip/index.js rename to packages/react-filerobot-image-editor/src/components/Shared/Tools/Flip/index.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Resize/Resize.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Resize/Resize.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Resize/Resize.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Tools/Resize/Resize.jsx diff --git a/packages/react-filerobot-image-editor/src/components/tools/Resize/Resize.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Resize/Resize.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Resize/Resize.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/Tools/Resize/Resize.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Resize/index.js b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Resize/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Resize/index.js rename to packages/react-filerobot-image-editor/src/components/Shared/Tools/Resize/index.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Rotate/Rotate.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Rotate/Rotate.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Rotate/Rotate.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/Tools/Rotate/Rotate.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Rotate/RotateButton.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Rotate/RotateButton.jsx similarity index 89% rename from packages/react-filerobot-image-editor/src/components/tools/Rotate/RotateButton.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Tools/Rotate/RotateButton.jsx index cac6bf87..531eaf7d 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Rotate/RotateButton.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Rotate/RotateButton.jsx @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import { RotationLeft as RotateIcon } from '@scaleflex/icons/rotation-left'; /** Internal Dependencies */ -import ToolsBarItemButton from 'components/ToolsBar/ToolsBarItemButton'; +import ToolsBarItemButton from 'components/Shared/ToolsBar/ToolsBarItemButton'; import { TOOLS_IDS } from 'utils/constants'; const RotateButton = ({ selectTool, isSelected = false, t }) => ( diff --git a/packages/react-filerobot-image-editor/src/components/tools/Rotate/RotateOptions.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Rotate/RotateOptions.jsx similarity index 97% rename from packages/react-filerobot-image-editor/src/components/tools/Rotate/RotateOptions.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Tools/Rotate/RotateOptions.jsx index 76d2307f..06dafea7 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Rotate/RotateOptions.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Rotate/RotateOptions.jsx @@ -10,7 +10,7 @@ import { CHANGE_ROTATION, SET_RESIZE } from 'actions'; import restrictNumber from 'utils/restrictNumber'; import getSizeAfterRotation from 'utils/getSizeAfterRotation'; import { TOOLS_IDS } from 'utils/constants'; -import ToolsBarItemButton from 'components/ToolsBar/ToolsBarItemButton'; +import ToolsBarItemButton from 'components/Shared/ToolsBar/ToolsBarItemButton'; import { StyledRotationOptions, StyledRotationSlider, diff --git a/packages/react-filerobot-image-editor/src/components/tools/Rotate/index.js b/packages/react-filerobot-image-editor/src/components/Shared/Tools/Rotate/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Rotate/index.js rename to packages/react-filerobot-image-editor/src/components/Shared/Tools/Rotate/index.js diff --git a/packages/react-filerobot-image-editor/src/components/Shared/Tools/tools.constants.js b/packages/react-filerobot-image-editor/src/components/Shared/Tools/tools.constants.js new file mode 100644 index 00000000..078b8057 --- /dev/null +++ b/packages/react-filerobot-image-editor/src/components/Shared/Tools/tools.constants.js @@ -0,0 +1,60 @@ +/** Internal Dependencies */ +import { TABS_IDS, TOOLS_IDS } from 'utils/constants'; +import { Crop } from './Crop'; +import { FlipX, FlipY } from './Flip'; +import { RotateButton, RotateOptions } from './Rotate'; +import { Resize } from './Resize'; + +export const COMMON_TOOLS_ITEMS = { + [TOOLS_IDS.CROP]: { + id: TOOLS_IDS.CROP, + Item: Crop, + }, + [TOOLS_IDS.ROTATE]: { + id: TOOLS_IDS.ROTATE, + Item: RotateButton, + ItemOptions: RotateOptions, + }, + [TOOLS_IDS.FLIP_X]: { + id: TOOLS_IDS.FLIP_X, + Item: FlipX, + }, + [TOOLS_IDS.FLIP_Y]: { + id: TOOLS_IDS.FLIP_Y, + Item: FlipY, + }, + [TOOLS_IDS.RESIZE]: { + id: TOOLS_IDS.RESIZE, + Item: Resize, + }, +}; + +export const TABS_TOOLS = { + [TABS_IDS.ADJUST]: [ + TOOLS_IDS.CROP, + TOOLS_IDS.ROTATE, + TOOLS_IDS.FLIP_X, + TOOLS_IDS.FLIP_Y, + ], + [TABS_IDS.FINETUNE]: [ + TOOLS_IDS.BRIGHTNESS, + TOOLS_IDS.CONTRAST, + TOOLS_IDS.HSV, + TOOLS_IDS.BLUR, + TOOLS_IDS.WARMTH, + ], + [TABS_IDS.FILTERS]: [TOOLS_IDS.FILTERS], + [TABS_IDS.WATERMARK]: [TOOLS_IDS.WATERMARK], + [TABS_IDS.ANNOTATE]: [ + TOOLS_IDS.TEXT, + TOOLS_IDS.IMAGE, + TOOLS_IDS.RECT, + TOOLS_IDS.ELLIPSE, + TOOLS_IDS.POLYGON, + TOOLS_IDS.PEN, + TOOLS_IDS.LINE, + TOOLS_IDS.ARROW, + ], + [TABS_IDS.RESIZE]: [TOOLS_IDS.RESIZE], + [TABS_IDS.TRIM]: [TOOLS_IDS.TRIM], +}; diff --git a/packages/react-filerobot-image-editor/src/components/ToolsBar/ToolsBar.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/ToolsBar/ToolsBar.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/ToolsBar/ToolsBar.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/ToolsBar/ToolsBar.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/ToolsBar/ToolsBarItemButton.jsx b/packages/react-filerobot-image-editor/src/components/Shared/ToolsBar/ToolsBarItemButton.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/ToolsBar/ToolsBarItemButton.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/ToolsBar/ToolsBarItemButton.jsx diff --git a/packages/react-filerobot-image-editor/src/components/ToolsBar/ToolsBarItemOptionsWrapper.jsx b/packages/react-filerobot-image-editor/src/components/Shared/ToolsBar/ToolsBarItemOptionsWrapper.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/ToolsBar/ToolsBarItemOptionsWrapper.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/ToolsBar/ToolsBarItemOptionsWrapper.jsx diff --git a/packages/react-filerobot-image-editor/src/components/ToolsBar/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/ToolsBar/index.jsx similarity index 90% rename from packages/react-filerobot-image-editor/src/components/ToolsBar/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/ToolsBar/index.jsx index d91c5cb4..aa6b6010 100644 --- a/packages/react-filerobot-image-editor/src/components/ToolsBar/index.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/ToolsBar/index.jsx @@ -4,16 +4,19 @@ import PropTypes from 'prop-types'; /** Internal Depepdencneis */ import { SELECT_TOOL } from 'actions'; -import { TABS_TOOLS, TOOLS_ITEMS } from 'components/tools/tools.constants'; +import { + COMMON_TOOLS_ITEMS, + TABS_TOOLS, +} from 'components/Shared/Tools/tools.constants'; import { TABS_IDS } from 'utils/constants'; import { usePhoneScreen, useStore } from 'hooks'; -import Carousel from 'components/common/Carousel'; +import Carousel from 'components/Shared/Common/Carousel'; import { StyledToolsBar, StyledToolsBarItems } from './ToolsBar.styled'; import ToolsBarItemOptionsWrapper from './ToolsBarItemOptionsWrapper'; const style = { maxWidth: '100%', width: '100%' }; -const ToolsBar = ({ toolsIds, tools, selectedToolId, ...props }) => { +const ToolsBar = ({ tools, selectedToolId, ...props }) => { const isPhoneScreen = usePhoneScreen(); const { t, @@ -27,18 +30,18 @@ const ToolsBar = ({ toolsIds, tools, selectedToolId, ...props }) => { defaultToolId, useCloudimage, tabsToolsIds = TABS_TOOLS, - tools: configTools = TOOLS_ITEMS, + tools: configTools = COMMON_TOOLS_ITEMS, }, } = useStore(); const currentTabId = tabId || defaultTabId; const currentToolId = selectedToolId || toolId || defaultToolId; const showOutsideCarousel = currentTabId !== TABS_IDS.WATERMARK || currentTabId !== TABS_IDS.TRIM; - const availableTools = tools || configTools; + const availableTools = { ...tools, ...configTools }; const tabToolsIds = useMemo( - () => toolsIds || tabsToolsIds[currentTabId] || [], - [toolsIds, tabsToolsIds, currentTabId], + () => tabsToolsIds[currentTabId] || [], + [tabsToolsIds, currentTabId], ); const selectTool = useCallback((newToolId) => { diff --git a/packages/react-filerobot-image-editor/src/components/Topbar/ImageDimensionsAndDisplayToggle.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Topbar/ImageDimensionsAndDisplayToggle.jsx similarity index 72% rename from packages/react-filerobot-image-editor/src/components/Topbar/ImageDimensionsAndDisplayToggle.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Topbar/ImageDimensionsAndDisplayToggle.jsx index 668d3793..8fb43adb 100644 --- a/packages/react-filerobot-image-editor/src/components/Topbar/ImageDimensionsAndDisplayToggle.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/Topbar/ImageDimensionsAndDisplayToggle.jsx @@ -3,9 +3,9 @@ import React from 'react'; /** Internal Dependencies */ import { useStore } from 'hooks'; -import Separator from 'components/common/Separator'; -import ZoomButtons from 'components/buttons/ZoomButtons'; -import ImageInfo from 'components/ImageInfo'; +import Separator from 'components/Shared/Common/Separator'; +import ZoomButtons from 'components/Shared/Buttons/ZoomButtons'; +import ImageInfo from 'components/Shared/ImageInfo'; const ImageDimensionsAndDisplayToggle = () => { const { diff --git a/packages/react-filerobot-image-editor/src/components/Topbar/Topbar.styled.js b/packages/react-filerobot-image-editor/src/components/Shared/Topbar/Topbar.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/Topbar/Topbar.styled.js rename to packages/react-filerobot-image-editor/src/components/Shared/Topbar/Topbar.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/Topbar/index.jsx b/packages/react-filerobot-image-editor/src/components/Shared/Topbar/index.jsx similarity index 95% rename from packages/react-filerobot-image-editor/src/components/Topbar/index.jsx rename to packages/react-filerobot-image-editor/src/components/Shared/Topbar/index.jsx index 0172b5ce..ac6d3f29 100644 --- a/packages/react-filerobot-image-editor/src/components/Topbar/index.jsx +++ b/packages/react-filerobot-image-editor/src/components/Shared/Topbar/index.jsx @@ -10,8 +10,8 @@ import { BackButton, SaveButton, HistoryButtons, -} from 'components/buttons'; -import Separator from 'components/common/Separator'; +} from 'components/Shared/Buttons'; +import Separator from 'components/Shared/Common/Separator'; import ImageDimensionsAndDisplayToggle from './ImageDimensionsAndDisplayToggle'; import { StyledTopbar, diff --git a/packages/react-filerobot-image-editor/src/components/VideoEditor/Controls/index.jsx b/packages/react-filerobot-image-editor/src/components/VideoEditor/Controls/index.jsx index 194838ad..e1e2f2dd 100644 --- a/packages/react-filerobot-image-editor/src/components/VideoEditor/Controls/index.jsx +++ b/packages/react-filerobot-image-editor/src/components/VideoEditor/Controls/index.jsx @@ -7,7 +7,7 @@ import { useDispatch, useStore } from 'hooks'; import { SELECT_TOOL } from 'actions'; import { EVENTS, TABS_IDS } from 'utils/constants'; import emitCustomEvent from 'utils/emitCustomEvent'; -import { getCurrentSegmentIndex } from 'components/tools/Trim/Trim.utils'; +import { getCurrentSegmentIndex } from 'components/VideoEditor/Tools/Trim/Trim.utils'; import TimeLapse from './Timelapse'; import PlaybackSpeedMenu from './PlaybackSpeedMenu'; import VolumeControl from './VolumeControl'; diff --git a/packages/react-filerobot-image-editor/src/components/tools/Trim/Segment.jsx b/packages/react-filerobot-image-editor/src/components/VideoEditor/Tools/Trim/Segment.jsx similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Trim/Segment.jsx rename to packages/react-filerobot-image-editor/src/components/VideoEditor/Tools/Trim/Segment.jsx diff --git a/packages/react-filerobot-image-editor/src/components/tools/Trim/Trim.constants.js b/packages/react-filerobot-image-editor/src/components/VideoEditor/Tools/Trim/Trim.constants.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Trim/Trim.constants.js rename to packages/react-filerobot-image-editor/src/components/VideoEditor/Tools/Trim/Trim.constants.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Trim/Trim.jsx b/packages/react-filerobot-image-editor/src/components/VideoEditor/Tools/Trim/Trim.jsx similarity index 97% rename from packages/react-filerobot-image-editor/src/components/tools/Trim/Trim.jsx rename to packages/react-filerobot-image-editor/src/components/VideoEditor/Tools/Trim/Trim.jsx index 5464fab7..44d21a8b 100644 --- a/packages/react-filerobot-image-editor/src/components/tools/Trim/Trim.jsx +++ b/packages/react-filerobot-image-editor/src/components/VideoEditor/Tools/Trim/Trim.jsx @@ -14,8 +14,8 @@ import formatSecondsToDuration from 'utils/formatSecondsToDuration'; import { SET_TRIM } from 'actions/setTrim'; import { EVENTS, TOOLS_IDS } from 'utils/constants'; import emitCustomEvent from 'utils/emitCustomEvent'; -import ToolsBarItemButton from 'components/ToolsBar/ToolsBarItemButton'; -import { StyledToolsBarItemButtonLabel } from 'components/ToolsBar/ToolsBar.styled'; +import ToolsBarItemButton from 'components/Shared/ToolsBar/ToolsBarItemButton'; +import { StyledToolsBarItemButtonLabel } from 'components/Shared/ToolsBar/ToolsBar.styled'; import { getCurrentSegmentIndex, timeToPixel } from './Trim.utils'; import Segment from './Segment'; import { diff --git a/packages/react-filerobot-image-editor/src/components/tools/Trim/Trim.styled.js b/packages/react-filerobot-image-editor/src/components/VideoEditor/Tools/Trim/Trim.styled.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Trim/Trim.styled.js rename to packages/react-filerobot-image-editor/src/components/VideoEditor/Tools/Trim/Trim.styled.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Trim/Trim.utils.js b/packages/react-filerobot-image-editor/src/components/VideoEditor/Tools/Trim/Trim.utils.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Trim/Trim.utils.js rename to packages/react-filerobot-image-editor/src/components/VideoEditor/Tools/Trim/Trim.utils.js diff --git a/packages/react-filerobot-image-editor/src/components/tools/Trim/index.js b/packages/react-filerobot-image-editor/src/components/VideoEditor/Tools/Trim/index.js similarity index 100% rename from packages/react-filerobot-image-editor/src/components/tools/Trim/index.js rename to packages/react-filerobot-image-editor/src/components/VideoEditor/Tools/Trim/index.js diff --git a/packages/react-filerobot-image-editor/src/components/VideoEditor/VideoEditor.services.js b/packages/react-filerobot-image-editor/src/components/VideoEditor/VideoEditor.services.js index 1c2006b8..7d5fa369 100644 --- a/packages/react-filerobot-image-editor/src/components/VideoEditor/VideoEditor.services.js +++ b/packages/react-filerobot-image-editor/src/components/VideoEditor/VideoEditor.services.js @@ -3,8 +3,8 @@ import isBlobFile from 'utils/isBlobFile'; const getDefaultHeaders = ({ key, token, headers }) => { return { ...headers, - 'Filerobot-Key': key, - 'Filerobot-Token': token, + 'X-Filerobot-Key': key, + 'X-Filerobot-Token': token, }; }; @@ -45,7 +45,7 @@ const transformResponse = async (response) => { } }; -const baseUrl = import.meta.env.DEV +const baseUrl = !import.meta.env.DEV ? 'http://ask-dev.filerobot.com:8732' : 'https://api.filerobot.com/videos/v2'; @@ -72,7 +72,9 @@ export const trimVideo = ({ headers: getDefaultHeaders({ key, token, - ...(!isBlobFile(data?.source) && { contentType: 'application/json' }), + ...(!isBlobFile(data?.source) && { + 'Content-Type': 'application/json', + }), }), method: 'POST', }, @@ -103,7 +105,9 @@ export const transformVideo = ({ headers: getDefaultHeaders({ key, token, - ...(!isBlobFile(data?.source) && { contentType: 'application/json' }), + ...(!isBlobFile(data?.source) && { + 'Content-Type': 'application/json', + }), }), method: 'POST', }, diff --git a/packages/react-filerobot-image-editor/src/components/VideoEditor/index.jsx b/packages/react-filerobot-image-editor/src/components/VideoEditor/index.jsx index ce8d5390..eef47990 100644 --- a/packages/react-filerobot-image-editor/src/components/VideoEditor/index.jsx +++ b/packages/react-filerobot-image-editor/src/components/VideoEditor/index.jsx @@ -2,10 +2,11 @@ import React, { memo } from 'react'; /** Internal Dependencies */ -import App from 'components/App'; -import AssemblyPointProviders from 'components/Providers'; +import App from 'components/Shared/AssemblyPoint'; +import AssemblyPointProviders from 'components/Shared/Providers'; import Controls from 'components/VideoEditor/Controls'; import { TABS_IDS } from 'utils/constants'; +import { VIDEO_TOOLS_ITEMS } from './tools.constant'; const VideoEditor = (props) => ( ( disableResizeAfterRotation defaultTabId={TABS_IDS.ADJUST} > - + diff --git a/packages/react-filerobot-image-editor/src/components/VideoEditor/tools.constant.js b/packages/react-filerobot-image-editor/src/components/VideoEditor/tools.constant.js new file mode 100644 index 00000000..269804e7 --- /dev/null +++ b/packages/react-filerobot-image-editor/src/components/VideoEditor/tools.constant.js @@ -0,0 +1,9 @@ +import { Trim } from 'components/VideoEditor/Tools/Trim'; +import { TOOLS_IDS } from 'utils/constants'; + +export const VIDEO_TOOLS_ITEMS = { + [TOOLS_IDS.TRIM]: { + id: TOOLS_IDS.TRIM, + Item: Trim, + }, +}; diff --git a/packages/react-filerobot-image-editor/src/hooks/useTextAnnotationEditing.js b/packages/react-filerobot-image-editor/src/hooks/useTextAnnotationEditing.js index f3b87f42..39c24b46 100644 --- a/packages/react-filerobot-image-editor/src/hooks/useTextAnnotationEditing.js +++ b/packages/react-filerobot-image-editor/src/hooks/useTextAnnotationEditing.js @@ -17,7 +17,7 @@ import { import { cssStyleToJsCanvasProps, getCurrentSelectedNodeStyles, -} from 'components/Layers/DesignLayer/AnnotationNodes/TextNode/TextNode.utils'; +} from 'components/Shared/Layers/DesignLayer/AnnotationNodes/TextNode/TextNode.utils'; import useStore from './useStore'; import useEditableTextId from './useEditableTextId'; import useSetAnnotation from './useSetAnnotation'; diff --git a/packages/react-filerobot-image-editor/src/index.js b/packages/react-filerobot-image-editor/src/index.js index 56d81a3f..bba91621 100644 --- a/packages/react-filerobot-image-editor/src/index.js +++ b/packages/react-filerobot-image-editor/src/index.js @@ -4,66 +4,66 @@ export { default } from 'components/ImageEditor'; export { default as VideoEditor } from 'components/VideoEditor'; /** State management & UI controls exports */ -export { default as FilerobotImageEditorProvider } from 'components/Providers'; +export { default as FilerobotImageEditorProvider } from 'components/Shared/Providers'; -export { default as App } from 'components/App'; +export { default as App } from 'components/Shared/AssemblyPoint'; -export { default as Tabs } from 'components/Tabs'; +export { default as Tabs } from 'components/Shared/Tabs'; -export { default as Topbar } from 'components/Topbar'; +export { default as Topbar } from 'components/Shared/Topbar'; -export { default as Toolsbar } from 'components/ToolsBar'; +export { default as Toolsbar } from 'components/Shared/ToolsBar'; /** Canvas & layers exports */ // contains all the design layer & transformers, no need to add children for it if used. -export { default as RichCanvas } from 'components/MainCanvas'; +export { default as RichCanvas } from 'components/Shared/MainCanvas'; -export { default as CanvasWrapper } from 'components/MainCanvas/MainCanvasWrapper'; +export { default as CanvasWrapper } from 'components/Shared/MainCanvas/MainCanvasWrapper'; -export { default as DesignLayerWrapper } from 'components/Layers/DesignLayer/DesignLayerWrapper'; +export { default as DesignLayerWrapper } from 'components/Shared/Layers/DesignLayer/DesignLayerWrapper'; -export { default as DesignLayerAnnotations } from 'components/Layers/DesignLayer/AnnotationNodes'; +export { default as DesignLayerAnnotations } from 'components/Shared/Layers/DesignLayer/AnnotationNodes'; -export { default as DesignLayerPreviewGroup } from 'components/Layers/DesignLayer/PreviewGroup'; +export { default as DesignLayerPreviewGroup } from 'components/Shared/Layers/DesignLayer/PreviewGroup'; -export { default as DesignLayerEllipseNode } from 'components/Layers/DesignLayer/AnnotationNodes/EllipseNode'; +export { default as DesignLayerEllipseNode } from 'components/Shared/Layers/DesignLayer/AnnotationNodes/EllipseNode'; -export { default as DesignLayerRectNode } from 'components/Layers/DesignLayer/AnnotationNodes/RectNode'; +export { default as DesignLayerRectNode } from 'components/Shared/Layers/DesignLayer/AnnotationNodes/RectNode'; -export { default as DesignLayerPolygonNode } from 'components/Layers/DesignLayer/AnnotationNodes/PolygonNode'; +export { default as DesignLayerPolygonNode } from 'components/Shared/Layers/DesignLayer/AnnotationNodes/PolygonNode'; -export { default as DesignLayerTextNode } from 'components/Layers/DesignLayer/AnnotationNodes/TextNode'; +export { default as DesignLayerTextNode } from 'components/Shared/Layers/DesignLayer/AnnotationNodes/TextNode'; -export { default as DesignLayerImageNode } from 'components/Layers/DesignLayer/AnnotationNodes/ImageNode'; +export { default as DesignLayerImageNode } from 'components/Shared/Layers/DesignLayer/AnnotationNodes/ImageNode'; -export { default as DesignLayerLineNode } from 'components/Layers/DesignLayer/AnnotationNodes/LineNode'; +export { default as DesignLayerLineNode } from 'components/Shared/Layers/DesignLayer/AnnotationNodes/LineNode'; -export { default as DesignLayerArrowNode } from 'components/Layers/DesignLayer/AnnotationNodes/ArrowNode'; +export { default as DesignLayerArrowNode } from 'components/Shared/Layers/DesignLayer/AnnotationNodes/ArrowNode'; -export { default as TransformersLayerWrapper } from 'components/Layers/TransformersLayer/TransformersLayerWrapper'; +export { default as TransformersLayerWrapper } from 'components/Shared/Layers/TransformersLayer/TransformersLayerWrapper'; -export { default as NodesTransformer } from 'components/Layers/TransformersLayer/NodesTransformer'; +export { default as NodesTransformer } from 'components/Shared/Layers/TransformersLayer/NodesTransformer'; -export { default as CropTransformer } from 'components/Layers/TransformersLayer/CropTransformer'; +export { default as CropTransformer } from 'components/Shared/Layers/TransformersLayer/CropTransformer'; /** UI Info/data exports */ -export { default as ImageInfo } from 'components/ImageInfo'; +export { default as ImageInfo } from 'components/Shared/ImageInfo'; /** Constants/utilities/abstraction/miscellaneous/Other-UI exports */ export { TABS_IDS as TABS, TOOLS_IDS as TOOLS } from 'utils/constants'; -export { ANNOTATION_NAMES_TO_COMPONENT as ANNOTATION_NAMES_TO_NODES } from 'components/Layers/DesignLayer/AnnotationNodes/AnnotationNodes.constants'; +export { ANNOTATION_NAMES_TO_COMPONENT as ANNOTATION_NAMES_TO_NODES } from 'components/Shared/Layers/DesignLayer/AnnotationNodes/AnnotationNodes.constants'; export { default as emitCustomEvent } from 'utils/emitCustomEvent'; -export * from 'components/common'; +export * from 'components/Shared/Common'; -export * from 'components/Tabs'; +export * from 'components/Shared/Tabs'; -export * from 'components/buttons'; +export * from 'components/Shared/Buttons'; export * from 'utils/constants'; From c68513de3decaa574f731709ea40bae8d700b0a5 Mon Sep 17 00:00:00 2001 From: Amr Hamdy Date: Fri, 29 Nov 2024 15:45:57 +0200 Subject: [PATCH 2/3] update folder structure --- .../react-filerobot-image-editor/src/utils/isAnnotationTool.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-filerobot-image-editor/src/utils/isAnnotationTool.js b/packages/react-filerobot-image-editor/src/utils/isAnnotationTool.js index 39255fe8..a7e84f03 100644 --- a/packages/react-filerobot-image-editor/src/utils/isAnnotationTool.js +++ b/packages/react-filerobot-image-editor/src/utils/isAnnotationTool.js @@ -1,4 +1,4 @@ -import { TABS_TOOLS } from 'components/tools/tools.constants'; +import { TABS_TOOLS } from 'components/Shared/tools/tools.constants'; import { TABS_IDS } from './constants'; const isAnnotationTool = (toolId) => From 72dcf7bbe5a9fc1b9d90d66b0848acf0904f4853 Mon Sep 17 00:00:00 2001 From: Amr Hamdy Date: Fri, 29 Nov 2024 15:50:42 +0200 Subject: [PATCH 3/3] update folder structure --- packages/filerobot-image-editor/src/index.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/filerobot-image-editor/src/index.js b/packages/filerobot-image-editor/src/index.js index 2fcefa54..7cb21d74 100644 --- a/packages/filerobot-image-editor/src/index.js +++ b/packages/filerobot-image-editor/src/index.js @@ -3,7 +3,7 @@ import { createElement } from 'react'; import { createRoot } from 'react-dom/client'; /** Internal Dependencies */ -import AssemblyPoint, { TOOLS, TABS, VideoEditor } from 'react-filerobot-image-editor/src/'; +import ImageEditor, { TOOLS, TABS } from 'react-filerobot-image-editor/src/'; import deepMerge from 'react-filerobot-image-editor/src/utils/deepMerge'; class FilerobotImageEditor { @@ -51,11 +51,7 @@ class FilerobotImageEditor { this.#root = createRoot(this.container); } - if(this.config.isVideo){ - this.#root.render(createElement(VideoEditor, this.config)); - } else{ - this.#root.render(createElement(AssemblyPoint, this.config)); - } + this.#root.render(createElement(ImageEditor, this.config)); } terminate() {