@yorab/react-paint 0.17.1 → 0.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/README.md +4 -0
  2. package/dist/_chunks/array-DuJem3vg.js +1 -0
  3. package/dist/_chunks/canvas-DF1RWuxW.js +1 -0
  4. package/dist/_chunks/editor-DuVskl0R.js +1 -0
  5. package/dist/canvas/components/Canvas.d.ts +1 -52
  6. package/dist/canvas/constants/app.d.ts +3 -25
  7. package/dist/canvas/constants/rendering.d.ts +3 -0
  8. package/dist/canvas/constants/tools.d.ts +4 -0
  9. package/dist/canvas/context/CanvasContext.d.ts +55 -0
  10. package/dist/canvas/hooks/useDrawableCanvas.d.ts +2 -43
  11. package/dist/canvas/hooks/useEventListener.d.ts +2 -0
  12. package/dist/canvas/hooks/useReactPaint.d.ts +8 -3
  13. package/dist/canvas/hooks/useShapes.d.ts +1 -0
  14. package/dist/canvas/index.d.ts +4 -0
  15. package/dist/canvas/index.js +1 -0
  16. package/dist/canvas/utils/canvas.d.ts +2 -1
  17. package/dist/canvas/utils/intersect.d.ts +4 -0
  18. package/dist/canvas/utils/selection.d.ts +0 -3
  19. package/dist/canvas/utils/shapes/index.d.ts +2 -3
  20. package/dist/canvas/utils/shapes/line.d.ts +2 -2
  21. package/dist/canvas/utils/shapes/path.d.ts +1 -0
  22. package/dist/canvas/utils/tools.d.ts +1 -1
  23. package/dist/canvas/utils/transform.d.ts +0 -1
  24. package/dist/common/hooks/useDebounce.d.ts +2 -0
  25. package/dist/common/types/Settings.d.ts +24 -0
  26. package/dist/common/utils/selection.d.ts +4 -0
  27. package/dist/editor/components/settings/Layouts.d.ts +1 -1
  28. package/dist/editor/components/settings/SettingsBar.d.ts +4 -2
  29. package/dist/editor/components/toolbox/ContextMenu.d.ts +4 -2
  30. package/dist/editor/components/toolbox/Toolbar.d.ts +1 -1
  31. package/dist/editor/hooks/useMenu.d.ts +2 -1
  32. package/dist/editor/index.d.ts +3 -2
  33. package/dist/editor/index.js +1 -0
  34. package/dist/editor/utils/style.d.ts +1 -1
  35. package/dist/index.d.ts +4 -6
  36. package/dist/react-paint.css +2 -1
  37. package/dist/react-paint.js +1 -1914
  38. package/dist/react-paint.umd.cjs +1 -1
  39. package/dist/src/canvas/components/Canvas.d.ts +4 -0
  40. package/dist/src/canvas/components/EditTextBox.d.ts +13 -0
  41. package/dist/src/canvas/constants/app.d.ts +37 -0
  42. package/dist/src/canvas/constants/grid.d.ts +1 -0
  43. package/dist/src/canvas/constants/keyboard.d.ts +27 -0
  44. package/dist/src/canvas/constants/picture.d.ts +1 -0
  45. package/dist/src/canvas/constants/rendering.d.ts +3 -0
  46. package/dist/src/canvas/constants/shapes.d.ts +10 -0
  47. package/dist/src/canvas/constants/tools.d.ts +4 -0
  48. package/dist/src/canvas/constants/zoom.d.ts +5 -0
  49. package/dist/src/canvas/context/CanvasContext.d.ts +55 -0
  50. package/dist/src/canvas/hooks/useComponent.d.ts +12 -0
  51. package/dist/src/canvas/hooks/useDoubleClick.d.ts +5 -0
  52. package/dist/src/canvas/hooks/useDrawableCanvas.d.ts +6 -0
  53. package/dist/src/canvas/hooks/useEventListener.d.ts +2 -0
  54. package/dist/src/canvas/hooks/useKeyboard.d.ts +33 -0
  55. package/dist/src/canvas/hooks/usePinchZoomAndMove.d.ts +17 -0
  56. package/dist/src/canvas/hooks/useReactPaint.d.ts +164 -0
  57. package/dist/src/canvas/hooks/useResizeObserver.d.ts +6 -0
  58. package/dist/src/canvas/hooks/useShapes.d.ts +44 -0
  59. package/dist/src/canvas/hooks/useZoom.d.ts +22 -0
  60. package/dist/src/canvas/index.d.ts +19 -0
  61. package/dist/src/canvas/utils/canvas.d.ts +15 -0
  62. package/dist/src/canvas/utils/data.d.ts +5 -0
  63. package/dist/src/canvas/utils/file.d.ts +274 -0
  64. package/dist/src/canvas/utils/grid.d.ts +2 -0
  65. package/dist/src/canvas/utils/intersect.d.ts +27 -0
  66. package/dist/src/canvas/utils/selection/groupSelection.d.ts +4 -0
  67. package/dist/src/canvas/utils/selection/lineSelection.d.ts +19 -0
  68. package/dist/src/canvas/utils/selection/rectSelection.d.ts +20 -0
  69. package/dist/src/canvas/utils/selection/selectionFrame.d.ts +3 -0
  70. package/dist/src/canvas/utils/selection.d.ts +12 -0
  71. package/dist/src/canvas/utils/shapes/brush.d.ts +21 -0
  72. package/dist/src/canvas/utils/shapes/circle.d.ts +18 -0
  73. package/dist/src/canvas/utils/shapes/curve.d.ts +17 -0
  74. package/dist/src/canvas/utils/shapes/ellipse.d.ts +18 -0
  75. package/dist/src/canvas/utils/shapes/group.d.ts +33 -0
  76. package/dist/src/canvas/utils/shapes/index.d.ts +35 -0
  77. package/dist/src/canvas/utils/shapes/line.d.ts +19 -0
  78. package/dist/src/canvas/utils/shapes/path.d.ts +29 -0
  79. package/dist/src/canvas/utils/shapes/picture.d.ts +13 -0
  80. package/dist/src/canvas/utils/shapes/polygon.d.ts +18 -0
  81. package/dist/src/canvas/utils/shapes/rectangle.d.ts +22 -0
  82. package/dist/src/canvas/utils/shapes/text.d.ts +27 -0
  83. package/dist/src/canvas/utils/shapes/triangle.d.ts +4 -0
  84. package/dist/src/canvas/utils/transform.d.ts +15 -0
  85. package/dist/src/canvas/utils/trigo.d.ts +19 -0
  86. package/dist/src/canvas/utils/zoom.d.ts +58 -0
  87. package/dist/src/common/hooks/useDebounce.d.ts +2 -0
  88. package/dist/src/common/types/Canvas.d.ts +8 -0
  89. package/dist/src/common/types/Mode.d.ts +64 -0
  90. package/dist/src/common/types/Settings.d.ts +24 -0
  91. package/dist/src/common/types/Shapes.d.ts +153 -0
  92. package/dist/src/common/types/react.d.ts +6 -0
  93. package/dist/src/common/types/tools.d.ts +164 -0
  94. package/dist/src/common/types/utils.d.ts +4 -0
  95. package/dist/src/common/utils/array.d.ts +2 -0
  96. package/dist/src/common/utils/dom.d.ts +1 -0
  97. package/dist/src/common/utils/object.d.ts +4 -0
  98. package/dist/src/common/utils/selection.d.ts +4 -0
  99. package/dist/src/common/utils/util.d.ts +3 -0
  100. package/dist/src/editor/components/common/Button.d.ts +16 -0
  101. package/dist/src/editor/components/common/FileInput.d.ts +13 -0
  102. package/dist/src/editor/components/common/Loading.d.ts +6 -0
  103. package/dist/src/editor/components/common/Menu.d.ts +10 -0
  104. package/dist/src/editor/components/common/Modal.d.ts +11 -0
  105. package/dist/src/editor/components/common/Panel.d.ts +15 -0
  106. package/dist/src/editor/components/common/Snackbar.d.ts +7 -0
  107. package/dist/src/editor/components/settings/ClosedPointsField.d.ts +10 -0
  108. package/dist/src/editor/components/settings/ColorField.d.ts +15 -0
  109. package/dist/src/editor/components/settings/DeleteButton.d.ts +8 -0
  110. package/dist/src/editor/components/settings/FontFamilyField.d.ts +12 -0
  111. package/dist/src/editor/components/settings/LayoutButton.d.ts +7 -0
  112. package/dist/src/editor/components/settings/Layouts.d.ts +19 -0
  113. package/dist/src/editor/components/settings/LineArrowField.d.ts +12 -0
  114. package/dist/src/editor/components/settings/LineTypeField.d.ts +16 -0
  115. package/dist/src/editor/components/settings/RangeField.d.ts +19 -0
  116. package/dist/src/editor/components/settings/SelectField.d.ts +18 -0
  117. package/dist/src/editor/components/settings/SettingsBar.d.ts +26 -0
  118. package/dist/src/editor/components/settings/ToggleField.d.ts +13 -0
  119. package/dist/src/editor/components/settings/ZoomButton.d.ts +8 -0
  120. package/dist/src/editor/components/toolbox/ContextMenu.d.ts +25 -0
  121. package/dist/src/editor/components/toolbox/ExportModal.d.ts +7 -0
  122. package/dist/src/editor/components/toolbox/LoadFileTool.d.ts +11 -0
  123. package/dist/src/editor/components/toolbox/MenuGroup.d.ts +27 -0
  124. package/dist/src/editor/components/toolbox/PictureUrlInput.d.ts +7 -0
  125. package/dist/src/editor/components/toolbox/Tool.d.ts +11 -0
  126. package/dist/src/editor/components/toolbox/Toolbar.d.ts +26 -0
  127. package/dist/src/editor/components/toolbox/ToolbarGroup.d.ts +14 -0
  128. package/dist/src/editor/constants/grid.d.ts +7 -0
  129. package/dist/src/editor/constants/icons.d.ts +43 -0
  130. package/dist/src/editor/constants/loading.d.ts +1 -0
  131. package/dist/src/editor/constants/options.d.ts +13 -0
  132. package/dist/src/editor/constants/snackbar.d.ts +7 -0
  133. package/dist/src/editor/constants/style.d.ts +14 -0
  134. package/dist/src/editor/constants/tools.d.ts +32 -0
  135. package/dist/src/editor/hooks/useDrag.d.ts +15 -0
  136. package/dist/src/editor/hooks/useMenu.d.ts +11 -0
  137. package/dist/src/editor/hooks/useSnackbar.d.ts +10 -0
  138. package/dist/src/editor/index.d.ts +25 -0
  139. package/dist/src/editor/types/snackbar.d.ts +7 -0
  140. package/dist/src/editor/utils/style.d.ts +2 -0
  141. package/dist/src/editor/utils/toolbar.d.ts +11 -0
  142. package/dist/src/index.d.ts +5 -0
  143. package/package.json +42 -24
@@ -0,0 +1,11 @@
1
+ import type { ReactNode } from 'react';
2
+ import './Modal.css';
3
+ type ModalType = {
4
+ children: ReactNode;
5
+ title: string;
6
+ onClose: () => void;
7
+ position?: 'center' | 'bottom';
8
+ className?: string;
9
+ };
10
+ declare const Modal: ({ children, onClose, position, title, className }: ModalType) => import("react/jsx-runtime").JSX.Element;
11
+ export default Modal;
@@ -0,0 +1,15 @@
1
+ import type React from 'react';
2
+ import './Panel.css';
3
+ import type { CSSProperties } from 'react';
4
+ type PanelType = {
5
+ vertical?: boolean;
6
+ children: React.ReactNode;
7
+ style?: CSSProperties | undefined;
8
+ title?: string;
9
+ className?: string | undefined;
10
+ fitContainer?: boolean;
11
+ position?: 'bottom' | 'top' | 'left' | 'right' | undefined;
12
+ alignment?: 'left' | 'right' | 'center' | undefined;
13
+ };
14
+ declare const Panel: ({ children, title, className, position, fitContainer, alignment, style, ...props }: PanelType) => import("react/jsx-runtime").JSX.Element;
15
+ export default Panel;
@@ -0,0 +1,7 @@
1
+ import type { SnackBarType } from './../../../../editor/types/snackbar';
2
+ import './Snackbar.css';
3
+ type SnackbarContainerType = {
4
+ snackbarList: SnackBarType[];
5
+ };
6
+ declare const SnackbarContainer: ({ snackbarList }: SnackbarContainerType) => import("react/jsx-runtime").JSX.Element;
7
+ export default SnackbarContainer;
@@ -0,0 +1,10 @@
1
+ import type React from 'react';
2
+ type ClosedPointsType = {
3
+ selectedSettings: string | undefined;
4
+ setSelectedSettings: React.Dispatch<React.SetStateAction<string | undefined>>;
5
+ disabled?: boolean | undefined;
6
+ defaultValue?: number | undefined;
7
+ valueChanged: (field: string, value: string | number) => void;
8
+ };
9
+ declare const ClosedPointsField: ({ selectedSettings, setSelectedSettings, disabled, defaultValue, valueChanged }: ClosedPointsType) => import("react/jsx-runtime").JSX.Element;
10
+ export default ClosedPointsField;
@@ -0,0 +1,15 @@
1
+ import type React from 'react';
2
+ import './ColorField.css';
3
+ type ShapeStyleColorType = {
4
+ selectedSettings: string | undefined;
5
+ setSelectedSettings: React.Dispatch<React.SetStateAction<string | undefined>>;
6
+ title?: string;
7
+ disabled?: boolean | undefined;
8
+ field: string;
9
+ mode?: 'fill' | 'stroke';
10
+ value?: string | undefined;
11
+ values: string[];
12
+ valueChanged: (field: string, value: string | number) => void;
13
+ };
14
+ declare const ColorField: ({ selectedSettings, setSelectedSettings, title, mode, disabled, values, field, value, valueChanged }: ShapeStyleColorType) => import("react/jsx-runtime").JSX.Element | null;
15
+ export default ColorField;
@@ -0,0 +1,8 @@
1
+ import type { SelectionType, ShapeEntity } from './../../../../common/types/Shapes';
2
+ type DeleteShapeButtonType = {
3
+ disabled?: boolean;
4
+ selectedShape: SelectionType;
5
+ removeShape: (shape: ShapeEntity[]) => void;
6
+ };
7
+ declare const DeleteButton: ({ disabled, selectedShape, removeShape }: DeleteShapeButtonType) => import("react/jsx-runtime").JSX.Element;
8
+ export default DeleteButton;
@@ -0,0 +1,12 @@
1
+ import type React from 'react';
2
+ import './FontFamilyField.css';
3
+ type FontFamilyFieldType = {
4
+ selectedSettings: string | undefined;
5
+ setSelectedSettings: React.Dispatch<React.SetStateAction<string | undefined>>;
6
+ disabled?: boolean | undefined;
7
+ values: string[];
8
+ defaultValue?: number | string | undefined;
9
+ valueChanged: (field: string, value: string | number) => void;
10
+ };
11
+ declare const FontFamilyField: ({ selectedSettings, setSelectedSettings, disabled, values, defaultValue, valueChanged }: FontFamilyFieldType) => import("react/jsx-runtime").JSX.Element | null;
12
+ export default FontFamilyField;
@@ -0,0 +1,7 @@
1
+ import './LayoutButton.css';
2
+ type LayoutButtonType = {
3
+ disabled: boolean;
4
+ toggleLayoutPanel: () => void;
5
+ };
6
+ declare const LayoutButton: ({ disabled, toggleLayoutPanel }: LayoutButtonType) => import("react/jsx-runtime").JSX.Element;
7
+ export default LayoutButton;
@@ -0,0 +1,19 @@
1
+ import type { SelectionType, ShapeEntity } from './../../../../common/types/Shapes';
2
+ import type { GridLabelType } from './../../../../editor/constants/grid';
3
+ import './Layouts.css';
4
+ import type { UtilsSettings } from './../../../../common/types/Settings';
5
+ type LayoutsType = {
6
+ gridFormat: GridLabelType;
7
+ setGridFormat: (value: GridLabelType) => void;
8
+ settings: UtilsSettings;
9
+ shapes: ShapeEntity[];
10
+ removeShape: (shape: ShapeEntity[]) => void;
11
+ toggleShapeVisibility: (shape: ShapeEntity[]) => void;
12
+ toggleShapeLock: (shape: ShapeEntity[]) => void;
13
+ selectedShapes: SelectionType | undefined;
14
+ selectShapes: (shapes: ShapeEntity[]) => void;
15
+ swapShapes: (startPositionShapeId: string, endPositionShapeId: string) => void;
16
+ isLayoutPanelShown: boolean;
17
+ };
18
+ declare const Layouts: ({ gridFormat, setGridFormat, settings, shapes, removeShape, toggleShapeVisibility, toggleShapeLock, selectedShapes, swapShapes, selectShapes, isLayoutPanelShown }: LayoutsType) => import("react/jsx-runtime").JSX.Element | null;
19
+ export default Layouts;
@@ -0,0 +1,12 @@
1
+ import type React from 'react';
2
+ import './LineArrowField.css';
3
+ type LineArrowType = {
4
+ selectedSettings: string | undefined;
5
+ setSelectedSettings: React.Dispatch<React.SetStateAction<string | undefined>>;
6
+ disabled?: boolean | undefined;
7
+ values: number[];
8
+ defaultValue?: number | string | undefined;
9
+ valueChanged: (field: string, value: string | number) => void;
10
+ };
11
+ declare const LineArrowField: ({ selectedSettings, setSelectedSettings, disabled, values, defaultValue, valueChanged }: LineArrowType) => import("react/jsx-runtime").JSX.Element | null;
12
+ export default LineArrowField;
@@ -0,0 +1,16 @@
1
+ import type React from 'react';
2
+ import './LineTypeField.css';
3
+ type LineTypeOptionType = {
4
+ children: string;
5
+ };
6
+ export declare const LineTypeOption: ({ children }: LineTypeOptionType) => import("react/jsx-runtime").JSX.Element;
7
+ type LineTypeType = {
8
+ selectedSettings: string | undefined;
9
+ setSelectedSettings: React.Dispatch<React.SetStateAction<string | undefined>>;
10
+ disabled?: boolean | undefined;
11
+ values: number[];
12
+ defaultValue?: number | string | undefined;
13
+ valueChanged: (field: string, value: string | number) => void;
14
+ };
15
+ declare const LineTypeField: ({ selectedSettings, setSelectedSettings, disabled, values, defaultValue, valueChanged }: LineTypeType) => import("react/jsx-runtime").JSX.Element | null;
16
+ export default LineTypeField;
@@ -0,0 +1,19 @@
1
+ import type React from 'react';
2
+ import './RangeField.css';
3
+ type ShapeStyleColorType = {
4
+ selectedSettings: string | undefined;
5
+ setSelectedSettings: React.Dispatch<React.SetStateAction<string | undefined>>;
6
+ title?: string;
7
+ disabled?: boolean | undefined;
8
+ field: string;
9
+ icon: string;
10
+ min?: number;
11
+ max?: number;
12
+ step?: number;
13
+ unity?: string;
14
+ value?: number | undefined;
15
+ saveShapes: () => void;
16
+ valueChanged: (field: string, value: string | number, needHistorySave?: boolean) => void;
17
+ };
18
+ declare const RangeField: ({ selectedSettings, setSelectedSettings, title, icon, disabled, field, value, min, max, step, unity, valueChanged, saveShapes }: ShapeStyleColorType) => import("react/jsx-runtime").JSX.Element | null;
19
+ export default RangeField;
@@ -0,0 +1,18 @@
1
+ import type React from 'react';
2
+ import './SelectField.css';
3
+ type SelectFieldType = {
4
+ CustomOption: React.FC<{
5
+ children?: React.ReactNode;
6
+ }>;
7
+ selectedSettings: string | undefined;
8
+ setSelectedSettings: React.Dispatch<React.SetStateAction<string | undefined>>;
9
+ title?: string;
10
+ disabled?: boolean;
11
+ icon: string;
12
+ field: string;
13
+ values: (string | number)[];
14
+ defaultValue?: number | string | undefined;
15
+ valueChanged: (field: string, value: string | number) => void;
16
+ };
17
+ declare const SelectField: ({ CustomOption, selectedSettings, setSelectedSettings, title, disabled, field, icon, values, defaultValue, valueChanged }: SelectFieldType) => import("react/jsx-runtime").JSX.Element | null;
18
+ export default SelectField;
@@ -0,0 +1,26 @@
1
+ import type { UtilsSettings } from './../../../../common/types/Settings';
2
+ import type { SelectionType, ShapeEntity } from './../../../../common/types/Shapes';
3
+ import type { CustomTool, ToolsType } from './../../../../common/types/tools';
4
+ import type React from 'react';
5
+ import './SettingsBar.css';
6
+ type SettingsBarType = {
7
+ width: number;
8
+ availableTools: CustomTool[];
9
+ updateToolSettings: (toolId: string, field: string, value: string | number | boolean) => void;
10
+ layersManipulation?: boolean;
11
+ activeTool: ToolsType;
12
+ selectedShape: SelectionType | undefined;
13
+ canvas: HTMLCanvasElement | null;
14
+ settings: UtilsSettings;
15
+ updateShape: (shape: ShapeEntity[], withSave?: boolean) => void;
16
+ removeShape: (shape: ShapeEntity[]) => void;
17
+ toggleLayoutPanel: () => void;
18
+ isZoomPanelShown: boolean;
19
+ setIsZoomPanelShown: React.Dispatch<React.SetStateAction<boolean>>;
20
+ setCanvasZoom: (action: 'unzoom' | 'zoom' | 'default') => void;
21
+ saveShapes: () => void;
22
+ refreshShape: (shape: ShapeEntity) => ShapeEntity;
23
+ calculateTextFontSize: (ctx: CanvasRenderingContext2D, text: string[], maxWidth: number, fontBold: boolean, fontItalic: boolean, fontFamily?: string) => number;
24
+ };
25
+ declare const SettingsBar: ({ width, availableTools, updateToolSettings, layersManipulation, toggleLayoutPanel, activeTool, saveShapes, selectedShape, canvas, settings, updateShape, removeShape, isZoomPanelShown, setIsZoomPanelShown, refreshShape, calculateTextFontSize }: SettingsBarType) => import("react/jsx-runtime").JSX.Element;
26
+ export default SettingsBar;
@@ -0,0 +1,13 @@
1
+ import type React from 'react';
2
+ type ShapeStyleSelectType = {
3
+ setSelectedSettings: React.Dispatch<React.SetStateAction<string | undefined>>;
4
+ disabled?: boolean | undefined;
5
+ field: string;
6
+ icon: string;
7
+ title?: string;
8
+ values: boolean[];
9
+ value?: boolean | undefined;
10
+ valueChanged: (field: string, value: boolean) => void;
11
+ };
12
+ declare const ToggleField: ({ setSelectedSettings, disabled, field, icon, title, values, value, valueChanged }: ShapeStyleSelectType) => import("react/jsx-runtime").JSX.Element | null;
13
+ export default ToggleField;
@@ -0,0 +1,8 @@
1
+ import './ZoomButton.css';
2
+ type ZoomButtonType = {
3
+ disabled?: boolean | undefined;
4
+ toggleZoomPanel: () => void;
5
+ className?: string | undefined;
6
+ };
7
+ declare const ZoomButton: ({ disabled, className, toggleZoomPanel }: ZoomButtonType) => import("react/jsx-runtime").JSX.Element;
8
+ export default ZoomButton;
@@ -0,0 +1,25 @@
1
+ import type { UtilsSettings } from './../../../../common/types/Settings';
2
+ import './ContextMenu.css';
3
+ import type { SelectionModeContextMenu } from './../../../../common/types/Mode';
4
+ import type { Point, SelectionType, ShapeEntity } from './../../../../common/types/Shapes';
5
+ type ContextMenuType = {
6
+ selectionMode: SelectionModeContextMenu<Point | number>;
7
+ settings: UtilsSettings;
8
+ canvasRef: React.RefObject<HTMLCanvasElement | null>;
9
+ selectAllShapes: () => void;
10
+ closeContextMenu: () => void;
11
+ buildShapesGroup: (shapes: ShapeEntity[]) => SelectionType | undefined;
12
+ copyShapes: (selection: SelectionType) => ShapeEntity[];
13
+ toggleShapeVisibility: (shapes: ShapeEntity[]) => void;
14
+ toggleShapeLock: (shapes: ShapeEntity[]) => void;
15
+ removeShape: (shapes: ShapeEntity[]) => void;
16
+ duplicateShapes: (shapesToDuplicate: ShapeEntity[], translate?: boolean, selectNewOnes?: boolean) => void;
17
+ setCopiedShape: (shape: React.SetStateAction<SelectionType | undefined>) => void;
18
+ copiedShape: SelectionType | undefined;
19
+ pasteShapes: (shapes: ShapeEntity[]) => void;
20
+ moveShapes: (shapes: ShapeEntity[], action: 'first' | 'last' | 'forward' | 'backward') => void;
21
+ removeShapePoint: (shape: ShapeEntity<'curve' | 'polygon'>, pointIndex: number) => void;
22
+ transformShape: (ctx: CanvasRenderingContext2D, shapes: ShapeEntity[], center: Point, action: 'flipHorizontally' | 'flipVertically' | 'rotateClockwise' | 'rotateCounterclockwise') => void;
23
+ };
24
+ declare const ContextMenu: ({ moveShapes, selectAllShapes, selectionMode, transformShape, settings, canvasRef, closeContextMenu, toggleShapeVisibility, toggleShapeLock, removeShape, duplicateShapes, copiedShape, setCopiedShape, pasteShapes, removeShapePoint, buildShapesGroup, copyShapes }: ContextMenuType) => import("react/jsx-runtime").JSX.Element;
25
+ export default ContextMenu;
@@ -0,0 +1,7 @@
1
+ import './ExportModal.css';
2
+ type ExportModalProps = {
3
+ toggleExportModal: () => void;
4
+ exportCanvasInFile: (view: 'fitToShapes' | 'defaultView' | 'currentZoom') => void;
5
+ };
6
+ declare const ExportModal: ({ toggleExportModal, exportCanvasInFile }: ExportModalProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default ExportModal;
@@ -0,0 +1,11 @@
1
+ import type { ToolsType } from './../../../../common/types/tools';
2
+ type LoadFileToolType = {
3
+ disabled?: boolean;
4
+ loadFile: (file: File) => void;
5
+ type: ToolsType;
6
+ img?: string;
7
+ accept: string;
8
+ withText?: boolean;
9
+ };
10
+ declare const LoadFileTool: ({ disabled, withText, loadFile, type, img, accept }: LoadFileToolType) => import("react/jsx-runtime").JSX.Element;
11
+ export default LoadFileTool;
@@ -0,0 +1,27 @@
1
+ import type { ToolsType } from './../../../../common/types/tools';
2
+ import './MenuGroup.css';
3
+ type MenuGroupType = {
4
+ activeTool: ToolsType;
5
+ withActionsInMenu: boolean;
6
+ vertical?: boolean;
7
+ title?: string;
8
+ disabled?: boolean;
9
+ img?: string;
10
+ loadFile: (file: File) => void;
11
+ addPicture: (file: File) => Promise<void>;
12
+ saveFile: () => void;
13
+ toggleExportModal: () => void;
14
+ togglePictureUrlModal: () => void;
15
+ withLoadAndSave: boolean;
16
+ withExport: boolean;
17
+ hasActionToUndo?: boolean;
18
+ hasActionToRedo?: boolean;
19
+ hasActionToClear?: boolean;
20
+ withUploadPicture: boolean;
21
+ withUrlPicture: boolean;
22
+ undoAction: () => void;
23
+ redoAction: () => void;
24
+ clearCanvas: () => void;
25
+ };
26
+ declare const MenuGroup: ({ activeTool, withActionsInMenu, hasActionToUndo, hasActionToRedo, hasActionToClear, undoAction, redoAction, clearCanvas, disabled, withLoadAndSave, withExport, addPicture, loadFile, togglePictureUrlModal, saveFile, toggleExportModal, withUploadPicture, withUrlPicture }: MenuGroupType) => import("react/jsx-runtime").JSX.Element | null;
27
+ export default MenuGroup;
@@ -0,0 +1,7 @@
1
+ import './PictureUrlInput.css';
2
+ type PictureUrlModalType = {
3
+ togglePictureUrlModal: () => void;
4
+ addPicture: (url: string) => Promise<void>;
5
+ };
6
+ declare const PictureUrlModal: ({ togglePictureUrlModal, addPicture }: PictureUrlModalType) => import("react/jsx-runtime").JSX.Element;
7
+ export default PictureUrlModal;
@@ -0,0 +1,11 @@
1
+ import type { ToolsType } from './../../../../common/types/tools';
2
+ type ToolComponentType = {
3
+ type: ToolsType;
4
+ img?: string;
5
+ withText?: boolean;
6
+ isActive: boolean;
7
+ disabled?: boolean;
8
+ setActive: (marker: ToolsType) => void;
9
+ };
10
+ declare const Tool: ({ type, img, isActive, withText, disabled, setActive }: ToolComponentType) => import("react/jsx-runtime").JSX.Element;
11
+ export default Tool;
@@ -0,0 +1,26 @@
1
+ import type { CustomTool, ToolsType } from './../../../../common/types/tools';
2
+ import './Toolbar.css';
3
+ import type { UtilsSettings } from './../../../../common/types/Settings';
4
+ type ToolboxType = {
5
+ width: number;
6
+ activeTool: ToolsType;
7
+ hasActionToUndo?: boolean;
8
+ hasActionToRedo?: boolean;
9
+ hasActionToClear?: boolean;
10
+ undoAction: () => void;
11
+ redoAction: () => void;
12
+ clearCanvas: () => void;
13
+ setActiveTool: (tool: ToolsType) => void;
14
+ loadFile: (file: File) => void;
15
+ addPicture: (file: File | string) => Promise<void>;
16
+ saveFile: () => void;
17
+ exportCanvasInFile: (view: 'fitToShapes' | 'defaultView' | 'currentZoom') => void;
18
+ availableTools: CustomTool[];
19
+ withLoadAndSave: boolean;
20
+ withExport: boolean;
21
+ withUrlPicture: boolean;
22
+ withUploadPicture: boolean;
23
+ settings: UtilsSettings;
24
+ };
25
+ declare const Toolbar: ({ settings, width, activeTool, hasActionToUndo, hasActionToRedo, hasActionToClear, withLoadAndSave, withExport, clearCanvas, setActiveTool: setActiveToolFromProps, undoAction, redoAction, addPicture, loadFile, saveFile, exportCanvasInFile, availableTools, withUrlPicture, withUploadPicture }: ToolboxType) => import("react/jsx-runtime").JSX.Element;
26
+ export default Toolbar;
@@ -0,0 +1,14 @@
1
+ import type { CustomTool, ToolsType } from './../../../../common/types/tools';
2
+ import './ToolbarGroup.css';
3
+ type ToolbarGroupType = {
4
+ activeTool: ToolsType;
5
+ group: CustomTool | {
6
+ title: string;
7
+ toolsType: CustomTool[];
8
+ vertical: boolean;
9
+ };
10
+ disabled?: boolean;
11
+ setActiveToolFromId: (id: string) => void;
12
+ };
13
+ declare const ToolbarGroup: ({ activeTool, group, disabled, setActiveToolFromId }: ToolbarGroupType) => import("react/jsx-runtime").JSX.Element | null;
14
+ export default ToolbarGroup;
@@ -0,0 +1,7 @@
1
+ export declare const GridValues: {
2
+ readonly none: 0;
3
+ readonly small: 10;
4
+ readonly medium: 20;
5
+ readonly large: 40;
6
+ };
7
+ export type GridLabelType = keyof typeof GridValues;
@@ -0,0 +1,43 @@
1
+ export declare const brushIcon = "<svg><path d=\"M5.146 17.5Q4.146 17.5 3.208 17Q2.271 16.5 1.667 15.708Q2.208 15.75 2.802 15.344Q3.396 14.938 3.396 14.104Q3.396 13.042 4.135 12.292Q4.875 11.542 5.958 11.542Q7.021 11.542 7.76 12.292Q8.5 13.042 8.5 14.104Q8.5 15.5 7.51 16.5Q6.521 17.5 5.146 17.5ZM9.917 12.5 7.562 10.146 14.917 2.729Q15.146 2.5 15.469 2.5Q15.792 2.5 16.021 2.729L17.271 3.958Q17.5 4.188 17.5 4.531Q17.5 4.875 17.271 5.125Z\"/></svg>";
2
+ export declare const squareIcon = "<svg><path d=\"M2.5 17.5V2.5H17.5V17.5ZM4.25 15.75H15.75V4.25H4.25ZM4.25 15.75V4.25V15.75Z\"/></svg>";
3
+ export declare const recIcon = "<svg><path d=\"M4.25 15.833Q3.521 15.833 3.01 15.323Q2.5 14.812 2.5 14.083V5.917Q2.5 5.188 3.01 4.677Q3.521 4.167 4.25 4.167H15.75Q16.479 4.167 16.99 4.677Q17.5 5.188 17.5 5.917V14.083Q17.5 14.812 16.99 15.323Q16.479 15.833 15.75 15.833ZM4.25 14.083H15.75Q15.75 14.083 15.75 14.083Q15.75 14.083 15.75 14.083V5.917Q15.75 5.917 15.75 5.917Q15.75 5.917 15.75 5.917H4.25Q4.25 5.917 4.25 5.917Q4.25 5.917 4.25 5.917V14.083Q4.25 14.083 4.25 14.083Q4.25 14.083 4.25 14.083ZM4.25 14.083Q4.25 14.083 4.25 14.083Q4.25 14.083 4.25 14.083V5.917Q4.25 5.917 4.25 5.917Q4.25 5.917 4.25 5.917Q4.25 5.917 4.25 5.917Q4.25 5.917 4.25 5.917V14.083Q4.25 14.083 4.25 14.083Q4.25 14.083 4.25 14.083Z\"/></svg>";
4
+ export declare const shapesIcon = "<svg><path d=\"M5.333 9.292 10.021 1.646 14.708 9.292ZM14.562 18.333Q13 18.333 11.896 17.229Q10.792 16.125 10.792 14.562Q10.792 13 11.896 11.896Q13 10.792 14.562 10.792Q16.125 10.792 17.229 11.896Q18.333 13 18.333 14.562Q18.333 16.125 17.229 17.229Q16.125 18.333 14.562 18.333ZM2.5 17.917V11.188H9.229V17.917ZM14.562 16.583Q15.438 16.583 16.01 16.01Q16.583 15.438 16.583 14.562Q16.583 13.688 16.01 13.115Q15.438 12.542 14.562 12.542Q13.688 12.542 13.115 13.115Q12.542 13.688 12.542 14.562Q12.542 15.438 13.115 16.01Q13.688 16.583 14.562 16.583ZM4.25 16.167H7.479V12.938H4.25ZM8.458 7.542H11.583L10.021 5ZM10.021 7.542ZM7.479 12.938ZM14.562 14.562Q14.562 14.562 14.562 14.562Q14.562 14.562 14.562 14.562Q14.562 14.562 14.562 14.562Q14.562 14.562 14.562 14.562Q14.562 14.562 14.562 14.562Q14.562 14.562 14.562 14.562Q14.562 14.562 14.562 14.562Q14.562 14.562 14.562 14.562Z\"/></svg>";
5
+ export declare const circleIcon = "<svg><path d=\"M10 18.333Q8.271 18.333 6.75 17.677Q5.229 17.021 4.104 15.896Q2.979 14.771 2.323 13.25Q1.667 11.729 1.667 10Q1.667 8.271 2.323 6.75Q2.979 5.229 4.104 4.104Q5.229 2.979 6.75 2.323Q8.271 1.667 10 1.667Q11.729 1.667 13.25 2.323Q14.771 2.979 15.896 4.104Q17.021 5.229 17.677 6.75Q18.333 8.271 18.333 10Q18.333 11.729 17.677 13.25Q17.021 14.771 15.896 15.896Q14.771 17.021 13.25 17.677Q11.729 18.333 10 18.333ZM10 16.583Q12.75 16.583 14.667 14.667Q16.583 12.75 16.583 10Q16.583 7.25 14.667 5.333Q12.75 3.417 10 3.417Q7.25 3.417 5.333 5.333Q3.417 7.25 3.417 10Q3.417 12.75 5.333 14.667Q7.25 16.583 10 16.583ZM10 10Q10 10 10 10Q10 10 10 10Q10 10 10 10Q10 10 10 10Q10 10 10 10Q10 10 10 10Q10 10 10 10Q10 10 10 10Z\"/></svg>";
6
+ export declare const polygonIcon = "<svg><path d=\"M12.25 18.333V16.167L6.833 13.458H2.5V8.208H6.25L8.25 5.917V1.667H13.5V6.917H9.708L7.75 9.146V11.958L12.25 14.208V13.083H17.5V18.333Z\"/></svg>";
7
+ export declare const trashIcon = "<svg><path d=\"M4.125 5.083V3.333H7.062L7.896 2.5H12.104L12.938 3.333H15.875V5.083ZM6.75 17.5Q6.021 17.5 5.51 16.99Q5 16.479 5 15.75V5.958H15V15.75Q15 16.479 14.49 16.99Q13.979 17.5 13.25 17.5Z\"/></svg>";
8
+ export declare const opacityIcon = "<svg><path d=\"M10 17.5Q7.208 17.5 5.271 15.594Q3.333 13.688 3.333 10.958Q3.333 9.583 3.854 8.396Q4.375 7.208 5.292 6.292L10 1.667L14.688 6.292Q15.604 7.208 16.135 8.396Q16.667 9.583 16.667 10.958Q16.667 13.688 14.719 15.594Q12.771 17.5 10 17.5ZM5.146 11.667H14.854Q15.083 10.188 14.552 9.146Q14.021 8.104 13.479 7.562L10 4.125L6.521 7.562Q5.979 8.104 5.448 9.146Q4.917 10.188 5.146 11.667Z\"/></svg>";
9
+ export declare const undoIcon = "<svg><path d=\"M11.708 15.833H5.854V14.083H11.708Q13 14.083 13.958 13.292Q14.917 12.5 14.917 11.271Q14.917 10.042 13.958 9.24Q13 8.438 11.708 8.438H6.667L8.792 10.562L7.562 11.792L3.333 7.562L7.562 3.333L8.792 4.562L6.667 6.688H11.708Q13.729 6.688 15.198 7.99Q16.667 9.292 16.667 11.25Q16.667 13.208 15.198 14.521Q13.729 15.833 11.708 15.833Z\"/></svg>";
10
+ export declare const redoIcon = "<svg><path d=\"M8.292 15.833Q6.271 15.833 4.802 14.521Q3.333 13.208 3.333 11.25Q3.333 9.292 4.802 7.99Q6.271 6.688 8.292 6.688H13.333L11.208 4.562L12.438 3.333L16.667 7.562L12.438 11.792L11.208 10.562L13.333 8.438H8.292Q7 8.438 6.042 9.229Q5.083 10.021 5.083 11.25Q5.083 12.5 6.042 13.292Q7 14.083 8.292 14.083H14.146V15.833Z\"/></svg>";
11
+ export declare const layersIcon = "<svg><path d=\"M10 17.646 2.438 11.75 3.875 10.646 10 15.396 16.125 10.646 17.562 11.75ZM10 13.188 2.5 7.354 10 1.521 17.5 7.354Z\"/></svg>";
12
+ export declare const clearIcon = "<svg><path d=\"M7.854 13.812 10 11.688 12.125 13.812 13.354 12.604 11.208 10.458 13.354 8.312 12.125 7.104 10 9.229 7.854 7.104 6.625 8.312 8.771 10.458 6.625 12.604ZM5.896 17.5Q5.167 17.5 4.656 16.99Q4.146 16.479 4.146 15.75V5.125H3.333V3.375H7.542V2.5H12.458V3.375H16.667V5.125H15.833V15.75Q15.833 16.479 15.323 16.99Q14.812 17.5 14.083 17.5Z\"/></svg>";
13
+ export declare const saveIcon = "<svg><path d=\"M17.5 5.833V15.75Q17.5 16.479 16.99 16.99Q16.479 17.5 15.75 17.5H4.25Q3.521 17.5 3.01 16.99Q2.5 16.479 2.5 15.75V4.25Q2.5 3.521 3.01 3.01Q3.521 2.5 4.25 2.5H14.167ZM10 14.917Q11.062 14.917 11.823 14.156Q12.583 13.396 12.583 12.333Q12.583 11.271 11.823 10.51Q11.062 9.75 10 9.75Q8.938 9.75 8.177 10.51Q7.417 11.271 7.417 12.333Q7.417 13.396 8.177 14.156Q8.938 14.917 10 14.917ZM5.021 8.396H12.521V5.021H5.021Z\"/></svg>";
14
+ export declare const exportFileIcon = "<svg><path d=\"M10 13.271 5.708 8.979 6.958 7.729 9.125 9.896V3.333H10.875V9.896L13.042 7.729L14.292 8.979ZM5.083 16.667Q4.354 16.667 3.844 16.156Q3.333 15.646 3.333 14.917V12.5H5.083V14.917Q5.083 14.917 5.083 14.917Q5.083 14.917 5.083 14.917H14.917Q14.917 14.917 14.917 14.917Q14.917 14.917 14.917 14.917V12.5H16.667V14.917Q16.667 15.646 16.156 16.156Q15.646 16.667 14.917 16.667Z\"/></svg>";
15
+ export declare const openFileIcon = "<svg><path d=\"M3.417 16.667Q2.729 16.667 2.198 16.135Q1.667 15.604 1.667 14.917V5.083Q1.667 4.396 2.198 3.865Q2.729 3.333 3.417 3.333H8.25L9.917 5H16.667Q17.354 5 17.844 5.531Q18.333 6.062 18.333 6.75H3.417V14.917Q3.417 14.917 3.417 14.917Q3.417 14.917 3.417 14.917L5.438 8.5H19.583L17.396 15.479Q17.229 16.021 16.802 16.344Q16.375 16.667 15.833 16.667Z\"/></svg>";
16
+ export declare const pictureIcon = "<svg><path d=\"M4.792 15.083 8.333 11.542 9.833 13.021 11.667 10.708 15.167 15.083ZM6.667 8.417Q5.938 8.417 5.427 7.906Q4.917 7.396 4.917 6.667Q4.917 5.938 5.427 5.427Q5.938 4.917 6.667 4.917Q7.396 4.917 7.906 5.427Q8.417 5.938 8.417 6.667Q8.417 7.396 7.906 7.906Q7.396 8.417 6.667 8.417ZM4.167 18.333Q3.125 18.333 2.396 17.604Q1.667 16.875 1.667 15.833V4.167Q1.667 3.125 2.396 2.396Q3.125 1.667 4.167 1.667H15.833Q16.875 1.667 17.604 2.396Q18.333 3.125 18.333 4.167V15.833Q18.333 16.875 17.604 17.604Q16.875 18.333 15.833 18.333ZM4.167 16.583H15.833Q16.146 16.583 16.365 16.365Q16.583 16.146 16.583 15.833V4.167Q16.583 3.854 16.365 3.635Q16.146 3.417 15.833 3.417H4.167Q3.854 3.417 3.635 3.635Q3.417 3.854 3.417 4.167V15.833Q3.417 16.146 3.635 16.365Q3.854 16.583 4.167 16.583Z\"/></svg>";
17
+ export declare const textIcon = "<svg><path d=\"M8.708 16.667V5.917H4.167V3.333H15.833V5.917H11.292V16.667Z\"/></svg>";
18
+ export declare const arrowIcon = "<svg><path d=\"M7.5 15.833V14.083H12.833L3.333 4.583L4.583 3.333L14.083 12.833V7.5H15.833V15.833Z\"/></svg>";
19
+ export declare const rightChevronIcon = "<svg viewBox=\"0 -960 960 960\"><path d=\"M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z\"/></svg>";
20
+ export declare const cursorIcon = "<svg><path d=\"M8.0145 11.1707C8.38484 10.9914 8.82183 11.1558 8.99959 11.5295L10.7031 15.2591L12.0363 14.6238L10.3254 10.9017C10.1476 10.528 10.3106 10.0795 10.6809 9.90761L10.8883 9.84782L12.5918 9.51148L6.48133 4.33192V12.389L7.82934 11.2903L8.0145 11.1707ZM10.6587 16.9258C10.2883 17.1052 9.84395 16.9482 9.67359 16.5745L8.05894 13.0318L6.19988 14.5416C6.07396 14.6462 5.91842 14.706 5.74066 14.706C5.54423 14.706 5.35584 14.6272 5.21694 14.4871C5.07803 14.3469 5 14.1568 5 13.9586V2.74741C5 2.54919 5.07803 2.35908 5.21694 2.21891C5.35584 2.07874 5.54423 2 5.74066 2C5.91842 2 6.08878 2.06727 6.21469 2.1719L6.2221 2.16443L14.7323 9.36947C15.0508 9.63854 15.0879 10.1094 14.8286 10.4233C14.7175 10.5579 14.562 10.6475 14.4064 10.6774L12.0659 11.1408L13.6954 14.6761C13.888 15.0498 13.7102 15.4908 13.3399 15.6627L10.6587 16.9258Z\"/></svg>";
21
+ export declare const moveIcon = "<svg viewBox=\"0 -960 960 960\"><path d=\"M412-48q-21.95 0-40.98-9Q352-66 338-83L48-434l27-28q17-17 41.5-20.5T162-473l126 74v-381q0-15.3 10.29-25.65Q308.58-816 323.79-816t25.71 10.35Q360-795.3 360-780v300h80v-396q0-15.3 10.29-25.65Q460.58-912 475.79-912t25.71 10.35Q512-891.3 512-876v396h80v-348q0-15.3 10.29-25.65Q612.58-864 627.79-864t25.71 10.35Q664-843.3 664-828v348h80v-252q0-15.3 10.29-25.65Q764.58-768 779.79-768t25.71 10.35Q816-747.3 816-732v540q0 60-42 102T672-48H412Z\"/></svg>";
22
+ export declare const menuIcon = "<svg><path d=\"M2.5 15V13.25H17.5V15ZM2.5 10.875V9.125H17.5V10.875ZM2.5 6.75V5H17.5V6.75Z\"/></svg>";
23
+ export declare const visibilityIcon = "<svg><path d=\"M10 13.354Q11.583 13.354 12.688 12.25Q13.792 11.146 13.792 9.562Q13.792 7.979 12.688 6.875Q11.583 5.771 10 5.771Q8.417 5.771 7.312 6.875Q6.208 7.979 6.208 9.562Q6.208 11.146 7.312 12.25Q8.417 13.354 10 13.354ZM10 11.812Q9.062 11.812 8.406 11.156Q7.75 10.5 7.75 9.562Q7.75 8.625 8.406 7.969Q9.062 7.312 10 7.312Q10.938 7.312 11.594 7.969Q12.25 8.625 12.25 9.562Q12.25 10.5 11.594 11.156Q10.938 11.812 10 11.812ZM10 15.833Q6.938 15.833 4.448 14.125Q1.958 12.417 0.833 9.562Q1.958 6.708 4.458 5.021Q6.958 3.333 10 3.333Q13.042 3.333 15.542 5.021Q18.042 6.708 19.167 9.562Q18.042 12.417 15.552 14.125Q13.062 15.833 10 15.833ZM10 9.562Q10 9.562 10 9.562Q10 9.562 10 9.562Q10 9.562 10 9.562Q10 9.562 10 9.562Q10 9.562 10 9.562Q10 9.562 10 9.562Q10 9.562 10 9.562Q10 9.562 10 9.562ZM10 14.083Q12.333 14.083 14.281 12.865Q16.229 11.646 17.25 9.562Q16.229 7.479 14.281 6.281Q12.333 5.083 10 5.083Q7.667 5.083 5.708 6.281Q3.75 7.479 2.729 9.562Q3.75 11.646 5.708 12.865Q7.667 14.083 10 14.083Z\"/></svg>";
24
+ export declare const visibilityOffIcon = "<svg><path d=\"M13.521 11.021 12.25 9.75Q12.333 8.75 11.604 7.979Q10.875 7.208 9.812 7.312L8.542 6.042Q8.896 5.896 9.26 5.833Q9.625 5.771 10 5.771Q11.583 5.771 12.688 6.875Q13.792 7.979 13.792 9.562Q13.792 9.979 13.719 10.354Q13.646 10.729 13.521 11.021ZM16.167 13.646 14.917 12.417Q15.667 11.833 16.25 11.146Q16.833 10.458 17.25 9.562Q16.229 7.479 14.292 6.281Q12.354 5.083 10 5.083Q9.396 5.083 8.885 5.156Q8.375 5.229 7.875 5.375L6.5 4Q7.354 3.646 8.208 3.49Q9.062 3.333 10 3.333Q13.146 3.333 15.615 5.052Q18.083 6.771 19.167 9.562Q18.688 10.792 17.917 11.823Q17.146 12.854 16.167 13.646ZM16.396 18.854 12.938 15.396Q12.208 15.625 11.479 15.729Q10.75 15.833 10 15.833Q6.833 15.833 4.375 14.094Q1.917 12.354 0.833 9.562Q1.25 8.479 1.917 7.552Q2.583 6.625 3.417 5.875L1.125 3.562L2.375 2.354L17.625 17.625ZM4.604 7.062Q4.021 7.604 3.542 8.219Q3.062 8.833 2.729 9.562Q3.75 11.646 5.688 12.865Q7.625 14.083 10 14.083Q10.354 14.083 10.74 14.052Q11.125 14.021 11.479 13.938L10.812 13.271Q10.625 13.312 10.417 13.333Q10.208 13.354 10 13.354Q8.417 13.354 7.312 12.25Q6.208 11.146 6.208 9.562Q6.208 9.354 6.24 9.167Q6.271 8.979 6.312 8.771ZM11.375 8.875Q11.375 8.875 11.375 8.875Q11.375 8.875 11.375 8.875Q11.375 8.875 11.375 8.875Q11.375 8.875 11.375 8.875Q11.375 8.875 11.375 8.875Q11.375 8.875 11.375 8.875ZM8.042 10.5Q8.042 10.5 8.042 10.5Q8.042 10.5 8.042 10.5Q8.042 10.5 8.042 10.5Q8.042 10.5 8.042 10.5Q8.042 10.5 8.042 10.5Q8.042 10.5 8.042 10.5Z\"/></svg>";
25
+ export declare const paletteIcon = "<svg><path d=\"M9.958 18.333Q8.25 18.333 6.74 17.677Q5.229 17.021 4.104 15.885Q2.979 14.75 2.323 13.229Q1.667 11.708 1.667 10Q1.667 8.271 2.333 6.75Q3 5.229 4.156 4.104Q5.312 2.979 6.854 2.323Q8.396 1.667 10.125 1.667Q11.771 1.667 13.26 2.25Q14.75 2.833 15.875 3.854Q17 4.875 17.667 6.26Q18.333 7.646 18.333 9.25Q18.333 11.688 16.792 12.948Q15.25 14.208 13.188 14.208H11.75Q11.625 14.208 11.562 14.281Q11.5 14.354 11.5 14.458Q11.5 14.688 11.812 15.219Q12.125 15.75 12.125 16.458Q12.125 17.458 11.51 17.896Q10.896 18.333 9.958 18.333ZM5.458 10.875Q6 10.875 6.375 10.5Q6.75 10.125 6.75 9.583Q6.75 9.042 6.375 8.667Q6 8.292 5.458 8.292Q4.917 8.292 4.542 8.667Q4.167 9.042 4.167 9.583Q4.167 10.125 4.542 10.5Q4.917 10.875 5.458 10.875ZM7.917 7.583Q8.458 7.583 8.833 7.208Q9.208 6.833 9.208 6.292Q9.208 5.75 8.833 5.375Q8.458 5 7.917 5Q7.375 5 7 5.375Q6.625 5.75 6.625 6.292Q6.625 6.833 7 7.208Q7.375 7.583 7.917 7.583ZM12.021 7.583Q12.562 7.583 12.938 7.208Q13.312 6.833 13.312 6.292Q13.312 5.75 12.938 5.375Q12.562 5 12.021 5Q11.479 5 11.104 5.375Q10.729 5.75 10.729 6.292Q10.729 6.833 11.104 7.208Q11.479 7.583 12.021 7.583ZM14.479 10.875Q15.021 10.875 15.396 10.5Q15.771 10.125 15.771 9.583Q15.771 9.042 15.396 8.667Q15.021 8.292 14.479 8.292Q13.938 8.292 13.562 8.667Q13.188 9.042 13.188 9.583Q13.188 10.125 13.562 10.5Q13.938 10.875 14.479 10.875Z\"/></svg>";
26
+ export declare const publicIcon = "<svg><path d=\"M9.188 16.542V14.938Q8.5 14.938 8.021 14.458Q7.542 13.979 7.542 13.292V12.458L3.583 8.5Q3.5 8.875 3.458 9.25Q3.417 9.625 3.417 10Q3.417 12.5 5.062 14.365Q6.708 16.229 9.188 16.542ZM14.854 14.438Q15.708 13.521 16.146 12.385Q16.583 11.25 16.583 10Q16.583 7.979 15.469 6.313Q14.354 4.646 12.479 3.917V4.229Q12.479 4.917 12 5.396Q11.521 5.875 10.833 5.875H9.188V7.521Q9.188 7.875 8.948 8.115Q8.708 8.354 8.354 8.354H6.708V10H11.646Q12 10 12.24 10.229Q12.479 10.458 12.479 10.812V13.292H13.292Q13.833 13.292 14.26 13.604Q14.688 13.917 14.854 14.438ZM10 18.333Q8.271 18.333 6.75 17.677Q5.229 17.021 4.104 15.896Q2.979 14.771 2.323 13.25Q1.667 11.729 1.667 10Q1.667 8.271 2.323 6.75Q2.979 5.229 4.104 4.104Q5.229 2.979 6.75 2.323Q8.271 1.667 10 1.667Q11.729 1.667 13.25 2.323Q14.771 2.979 15.896 4.104Q17.021 5.229 17.677 6.75Q18.333 8.271 18.333 10Q18.333 11.729 17.677 13.25Q17.021 14.771 15.896 15.896Q14.771 17.021 13.25 17.677Q11.729 18.333 10 18.333Z\"/></svg>";
27
+ export declare const lockedIcon = "<svg><path d=\"M10 0.833Q11.771 0.833 12.99 2.052Q14.208 3.271 14.208 5.042V6.667H14.917Q15.646 6.667 16.156 7.177Q16.667 7.688 16.667 8.417V16.562Q16.667 17.292 16.156 17.812Q15.646 18.333 14.917 18.333H5.083Q4.354 18.333 3.844 17.812Q3.333 17.292 3.333 16.562V8.417Q3.333 7.688 3.844 7.177Q4.354 6.667 5.083 6.667H5.792V5.042Q5.792 3.271 7.01 2.052Q8.229 0.833 10 0.833ZM10 2.583Q8.979 2.583 8.26 3.302Q7.542 4.021 7.542 5.042V6.667H12.458V5.042Q12.458 4.021 11.74 3.302Q11.021 2.583 10 2.583ZM5.083 16.583H14.917Q14.917 16.583 14.917 16.583Q14.917 16.583 14.917 16.583V8.417Q14.917 8.417 14.917 8.417Q14.917 8.417 14.917 8.417H5.083Q5.083 8.417 5.083 8.417Q5.083 8.417 5.083 8.417V16.583Q5.083 16.583 5.083 16.583Q5.083 16.583 5.083 16.583ZM10 10.812Q9.292 10.812 8.802 11.302Q8.312 11.792 8.312 12.5Q8.312 13.208 8.802 13.698Q9.292 14.188 10 14.188Q10.708 14.188 11.198 13.698Q11.688 13.208 11.688 12.5Q11.688 11.792 11.198 11.302Q10.708 10.812 10 10.812ZM5.083 8.417Q5.083 8.417 5.083 8.417Q5.083 8.417 5.083 8.417V16.583Q5.083 16.583 5.083 16.583Q5.083 16.583 5.083 16.583Q5.083 16.583 5.083 16.583Q5.083 16.583 5.083 16.583V8.417Q5.083 8.417 5.083 8.417Q5.083 8.417 5.083 8.417Z\"/></svg>";
28
+ export declare const unlockedIcon = "<svg><path d=\"M5.792 5.042Q5.792 3.271 7.01 2.052Q8.229 0.833 10 0.833Q11.771 0.833 12.99 2.052Q14.208 3.271 14.208 5.042V6.667H14.917Q15.646 6.667 16.156 7.177Q16.667 7.688 16.667 8.417V16.562Q16.667 17.292 16.156 17.812Q15.646 18.333 14.917 18.333H5.083Q4.354 18.333 3.844 17.812Q3.333 17.292 3.333 16.562V8.417Q3.333 7.688 3.844 7.177Q4.354 6.667 5.083 6.667H12.458V5.042Q12.458 4.021 11.74 3.302Q11.021 2.583 10 2.583Q8.979 2.583 8.26 3.302Q7.542 4.021 7.542 5.042ZM5.083 16.583H14.917Q14.917 16.583 14.917 16.583Q14.917 16.583 14.917 16.583V8.417Q14.917 8.417 14.917 8.417Q14.917 8.417 14.917 8.417H5.083Q5.083 8.417 5.083 8.417Q5.083 8.417 5.083 8.417V16.583Q5.083 16.583 5.083 16.583Q5.083 16.583 5.083 16.583ZM10 10.812Q9.292 10.812 8.802 11.302Q8.312 11.792 8.312 12.5Q8.312 13.208 8.802 13.698Q9.292 14.188 10 14.188Q10.708 14.188 11.198 13.698Q11.688 13.208 11.688 12.5Q11.688 11.792 11.198 11.302Q10.708 10.812 10 10.812ZM5.083 8.417Q5.083 8.417 5.083 8.417Q5.083 8.417 5.083 8.417V16.583Q5.083 16.583 5.083 16.583Q5.083 16.583 5.083 16.583Q5.083 16.583 5.083 16.583Q5.083 16.583 5.083 16.583V8.417Q5.083 8.417 5.083 8.417Q5.083 8.417 5.083 8.417Z\"/></svg>";
29
+ export declare const gridOffIcon = "<svg><path d=\"M18.333 15.854 16.583 14.104V13.354H15.833L14.083 11.604H16.583V8.375H13.375V10.896L11.625 9.146V8.375H10.875L9.125 6.625H11.625V3.417H8.396V5.896L6.646 4.146V3.417H5.896L4.146 1.667H16.583Q17.312 1.667 17.823 2.177Q18.333 2.688 18.333 3.417ZM13.375 6.625H16.583V3.417Q16.583 3.417 16.583 3.417Q16.583 3.417 16.583 3.417H13.375ZM16.771 19.229 15.854 18.333H3.417Q2.688 18.333 2.177 17.823Q1.667 17.312 1.667 16.583V4.125L0.812 3.271L2.042 2.021L18 18ZM13.375 16.583H14.104L13.375 15.833ZM8.396 11.604H9.125L8.396 10.854ZM8.396 16.583H11.625V14.083L10.875 13.354H8.396ZM3.417 6.625H4.167L3.417 5.875ZM3.417 11.604H6.646V9.104L5.917 8.375H3.417ZM6.646 16.583V13.354H3.417V16.583Q3.417 16.583 3.417 16.583Q3.417 16.583 3.417 16.583Z\"/></svg>";
30
+ export declare const ellipseIcon = "<svg><path d=\"M10 15.833Q7.917 15.833 6.667 14.177Q5.417 12.521 5.417 10Q5.417 7.479 6.667 5.823Q7.917 4.167 10 4.167Q12.083 4.167 13.333 5.823Q14.583 7.479 14.583 10Q14.583 12.521 13.333 14.177Q12.083 15.833 10 15.833ZM10 14.042Q11.375 14.042 12.021 12.833Q12.667 11.625 12.667 10Q12.667 8.375 12.021 7.167Q11.375 5.958 10 5.958Q8.625 5.958 7.979 7.167Q7.333 8.375 7.333 10Q7.333 11.625 7.979 12.833Q8.625 14.042 10 14.042Z\"/></svg>";
31
+ export declare const curveIcon = "<svg><path d=\"M7.521 17.5Q6.125 17.5 5.146 16.51Q4.167 15.521 4.167 14.125V7.417Q3.438 7.125 2.969 6.49Q2.5 5.854 2.5 5.042Q2.5 3.979 3.24 3.24Q3.979 2.5 5.042 2.5Q6.104 2.5 6.844 3.24Q7.583 3.979 7.583 5.042Q7.583 5.854 7.115 6.49Q6.646 7.125 5.917 7.417V14.125Q5.917 14.792 6.385 15.271Q6.854 15.75 7.521 15.75Q8.188 15.75 8.656 15.271Q9.125 14.792 9.125 14.125V5.875Q9.125 4.479 10.104 3.49Q11.083 2.5 12.479 2.5Q13.875 2.5 14.854 3.49Q15.833 4.479 15.833 5.875V12.583Q16.562 12.875 17.031 13.51Q17.5 14.146 17.5 14.958Q17.5 16.021 16.76 16.76Q16.021 17.5 14.958 17.5Q13.896 17.5 13.156 16.76Q12.417 16.021 12.417 14.958Q12.417 14.146 12.885 13.5Q13.354 12.854 14.083 12.583V5.875Q14.083 5.208 13.615 4.729Q13.146 4.25 12.479 4.25Q11.812 4.25 11.344 4.729Q10.875 5.208 10.875 5.875V14.125Q10.875 15.521 9.896 16.51Q8.917 17.5 7.521 17.5Z\"/></svg>";
32
+ export declare const boldIcon = "<svg><path d=\"M5.833 15V3.333H10.375Q11.812 3.333 12.885 4.156Q13.958 4.979 13.958 6.375Q13.958 7.375 13.49 7.969Q13.021 8.562 12.396 8.875V9.042Q13.312 9.354 13.844 10.021Q14.375 10.688 14.375 11.75Q14.375 13.312 13.229 14.156Q12.083 15 10.5 15ZM8.125 8.042H10.188Q10.854 8.042 11.302 7.656Q11.75 7.271 11.75 6.708Q11.75 6.167 11.302 5.771Q10.854 5.375 10.188 5.375H8.125ZM8.125 12.917H10.354Q11.167 12.917 11.625 12.51Q12.083 12.104 12.083 11.458Q12.083 10.812 11.625 10.406Q11.167 10 10.354 10H8.125Z\"/></svg>";
33
+ export declare const italicIcon = "<svg><path d=\"M4.167 16.667V14.083H6.979L10.229 5.917H7.5V3.333H15.833V5.917H13.021L9.771 14.083H12.5V16.667Z\"/></svg>";
34
+ export declare const lineWidthIcon = "<svg><path d=\"M3.021 16V15H17V16ZM3.021 13.5V12H17V13.5ZM3 10.5V8.5H16.979V10.5ZM3.021 7V4H17V7Z\"/></svg>";
35
+ export declare const lineTypeIcon = "<svg><path d=\"M3 16V14.5H4.5V16ZM6.125 16V14.5H7.625V16ZM9.25 16V14.5H10.75V16ZM12.375 16V14.5H13.875V16ZM15.5 16V14.5H17V16ZM3 13V11.5H6.5V13ZM8.25 13V11.5H11.75V13ZM13.5 13V11.5H17V13ZM3 10V8.5H9.25V10ZM10.75 10V8.5H17V10ZM3 7V4H17V7Z\"/></svg>";
36
+ export declare const fontIcon = "<svg><path d=\"M5.312 14.979H7.125L8.042 12.479H11.979L12.896 14.979H14.708L10.917 5H9.083ZM8.542 10.958 9.958 6.958H10.042L11.458 10.958ZM3.417 18.333Q2.688 18.333 2.177 17.823Q1.667 17.312 1.667 16.583V3.417Q1.667 2.688 2.177 2.177Q2.688 1.667 3.417 1.667H16.583Q17.312 1.667 17.823 2.177Q18.333 2.688 18.333 3.417V16.583Q18.333 17.312 17.823 17.823Q17.312 18.333 16.583 18.333ZM3.417 16.583H16.583Q16.583 16.583 16.583 16.583Q16.583 16.583 16.583 16.583V3.417Q16.583 3.417 16.583 3.417Q16.583 3.417 16.583 3.417H3.417Q3.417 3.417 3.417 3.417Q3.417 3.417 3.417 3.417V16.583Q3.417 16.583 3.417 16.583Q3.417 16.583 3.417 16.583ZM3.417 3.417Q3.417 3.417 3.417 3.417Q3.417 3.417 3.417 3.417V16.583Q3.417 16.583 3.417 16.583Q3.417 16.583 3.417 16.583Q3.417 16.583 3.417 16.583Q3.417 16.583 3.417 16.583V3.417Q3.417 3.417 3.417 3.417Q3.417 3.417 3.417 3.417Z\"/></svg>";
37
+ export declare const lineEndIcon = "<svg><path d=\"M6 17 2 13 6 9 7.062 10.062 4.875 12.25H17V13.75H4.875L7.062 15.938ZM14 11 12.938 9.938 15.125 7.75H3V6.25H15.125L12.938 4.062L14 3L18 7Z\"/></svg>";
38
+ export declare const settingsIcon = "<svg><path d=\"M2.5 15.833V14.083H7.667V15.833ZM2.5 5.917V4.167H10.771V5.917ZM9.208 17.5V12.438H10.958V14.083H17.5V15.833H10.958V17.5ZM5.917 12.542V10.875H2.5V9.125H5.917V7.479H7.667V12.542ZM9.208 10.875V9.125H17.5V10.875ZM12.333 7.562V2.5H14.083V4.167H17.5V5.917H14.083V7.562Z\"/></svg>";
39
+ export declare const noStrokeIcon = "<svg><path d=\"M16.354 18.833 14.521 17Q13.542 17.646 12.396 17.99Q11.25 18.333 10 18.333Q8.271 18.333 6.75 17.677Q5.229 17.021 4.104 15.896Q2.979 14.771 2.323 13.25Q1.667 11.729 1.667 10Q1.667 8.729 2.01 7.594Q2.354 6.458 3 5.458L1.167 3.625L2.396 2.396L17.583 17.604ZM10 16.583Q10.896 16.583 11.708 16.365Q12.521 16.146 13.25 15.729L4.292 6.75Q3.875 7.479 3.646 8.292Q3.417 9.104 3.417 10Q3.417 12.729 5.344 14.656Q7.271 16.583 10 16.583ZM17 14.562 15.708 13.271Q16.125 12.542 16.354 11.719Q16.583 10.896 16.583 10Q16.583 7.271 14.656 5.344Q12.729 3.417 10 3.417Q9.104 3.417 8.292 3.646Q7.479 3.875 6.75 4.292L5.458 3Q6.458 2.354 7.594 2.01Q8.729 1.667 10 1.667Q11.729 1.667 13.25 2.323Q14.771 2.979 15.896 4.104Q17.021 5.229 17.677 6.75Q18.333 8.271 18.333 10Q18.333 11.271 17.979 12.417Q17.625 13.562 17 14.562ZM11.229 8.771Q11.229 8.771 11.229 8.771Q11.229 8.771 11.229 8.771Q11.229 8.771 11.229 8.771Q11.229 8.771 11.229 8.771Q11.229 8.771 11.229 8.771Q11.229 8.771 11.229 8.771ZM8.771 11.229Q8.771 11.229 8.771 11.229Q8.771 11.229 8.771 11.229Q8.771 11.229 8.771 11.229Q8.771 11.229 8.771 11.229Q8.771 11.229 8.771 11.229Q8.771 11.229 8.771 11.229Z\"/></svg>";
40
+ export declare const noFillIcon = "<svg><path d=\"M16.354 18.833 14.521 17Q13.542 17.646 12.396 17.99Q11.25 18.333 10 18.333Q8.271 18.333 6.75 17.677Q5.229 17.021 4.104 15.896Q2.979 14.771 2.323 13.25Q1.667 11.729 1.667 10Q1.667 8.729 2.01 7.594Q2.354 6.458 3 5.458L1.167 3.625L2.396 2.396L17.583 17.604ZM17 14.562 5.458 3Q6.458 2.354 7.594 2.01Q8.729 1.667 10 1.667Q11.729 1.667 13.25 2.323Q14.771 2.979 15.896 4.104Q17.021 5.229 17.677 6.75Q18.333 8.271 18.333 10Q18.333 11.271 17.979 12.417Q17.625 13.562 17 14.562Z\"/></svg>";
41
+ export declare const zoomIn = "<svg viewBox=\"0 -960 960 960\" width=\"24px\"><path d=\"M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Zm-40-60v-80h-80v-80h80v-80h80v80h80v80h-80v80h-80Z\"/></svg>";
42
+ export declare const zoomOut = "<svg viewBox=\"0 -960 960 960\" width=\"24px\"><path d=\"M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400ZM280-540v-80h200v80H280Z\"/></svg>";
43
+ export declare const groupIcon = "<svg><path d=\"M3.333 17.5V16.667H7.5V17.5ZM3.333 14.167V13.333H9.167V14.167ZM3.333 10.833V10H10.833V10.833ZM3.333 7.5V6.667H12.5V7.5ZM3.333 4.167V3.333H13.333V4.167ZM3.333 0.833V0H16.667V0.833Z\"/></svg>";
@@ -0,0 +1 @@
1
+ export declare const LOADING_TRANSITION_DURATION = 300;
@@ -0,0 +1,13 @@
1
+ export declare const DEFAULT_EDITOR_OPTIONS: {
2
+ toolbarBackgroundColor: string;
3
+ dividerColor: string;
4
+ fontRadius: number;
5
+ fontDisabledColor: string;
6
+ fontDisabledBackgroundColor: string;
7
+ fontColor: string;
8
+ fontBackgroundColor: string;
9
+ fontSelectedColor: string;
10
+ fontSelectedBackgroundColor: string;
11
+ fontHoverColor: string;
12
+ fontHoverBackgroundColor: string;
13
+ };
@@ -0,0 +1,7 @@
1
+ import type { SnackbarTypeType } from './../../../editor/types/snackbar';
2
+ export declare const SNACKBAR_DEFAULT_SETTINGS: {
3
+ type: SnackbarTypeType;
4
+ duration: number;
5
+ };
6
+ export declare const SNACKBAR_DURATION = 500;
7
+ export declare const SNACKBAR_TOGGLE_ANIMATION_DURATION = 100;
@@ -0,0 +1,14 @@
1
+ export declare const POLYGON_POINTS_VALUES: number[];
2
+ export declare const CURVE_POINTS_VALUES: number[];
3
+ export declare const STYLE_COLORS: string[];
4
+ export declare const STYLE_LINE_DASH: number[];
5
+ export declare const STYLE_LINE_WITH_ARROW: number[];
6
+ export declare const LINE_DASH_DATA: number[][];
7
+ export declare const STYLE_FONTS: string[];
8
+ export declare const STYLE_FONT_DEFAULT = "serif";
9
+ export declare const STYLE_FONT_SIZE_DEFAULT = 36;
10
+ export declare const STYLE_ZINDEX: {
11
+ LOADING: number;
12
+ PANEL: number;
13
+ SNACKBAR: number;
14
+ };
@@ -0,0 +1,32 @@
1
+ import type { ActionsTool, CustomTool, CustomToolInput, ToolsBrushSettings, ToolsCircleSettings, ToolsCurveSettings, ToolsEllipseSettings, ToolsLineSettings, ToolsPictureSettings, ToolsPolygonSettings, ToolsRectSettings, ToolsSquareSettings, ToolsTextSettings } from './../../../common/types/tools';
2
+ export declare const SETTINGS_DEFAULT_RECT: ToolsRectSettings;
3
+ export declare const SETTINGS_DEFAULT_SQUARE: ToolsSquareSettings;
4
+ export declare const SETTINGS_DEFAULT_CIRCLE: ToolsCircleSettings;
5
+ export declare const SETTINGS_DEFAULT_ELLIPSE: ToolsEllipseSettings;
6
+ export declare const SETTINGS_DEFAULT_PICTURE: ToolsPictureSettings;
7
+ export declare const SETTINGS_DEFAULT_TEXT: ToolsTextSettings;
8
+ export declare const SETTINGS_DEFAULT_BRUSH: ToolsBrushSettings;
9
+ export declare const SETTINGS_DEFAULT_LINE: ToolsLineSettings;
10
+ export declare const SETTINGS_DEFAULT_POLYGON: ToolsPolygonSettings;
11
+ export declare const SETTINGS_DEFAULT_CURVE: ToolsCurveSettings;
12
+ export declare const DEFAULT_SHAPE_PICTURE: CustomTool;
13
+ export declare const DEFAULT_SHAPE_BRUSH: CustomTool;
14
+ export declare const DEFAULT_SHAPE_LINE: CustomTool;
15
+ export declare const DEFAULT_SHAPE_POLYGON: CustomTool;
16
+ export declare const DEFAULT_SHAPE_CURVE: CustomTool;
17
+ export declare const DEFAULT_SHAPE_RECT: CustomTool;
18
+ export declare const DEFAULT_SHAPE_SQUARE: CustomTool;
19
+ export declare const DEFAULT_SHAPE_CIRCLE: CustomTool;
20
+ export declare const DEFAULT_SHAPE_ELLIPSE: CustomTool;
21
+ export declare const DEFAULT_SHAPE_TEXT: CustomTool;
22
+ export declare const DEFAULT_SHAPE_TOOLS: CustomToolInput[];
23
+ export declare const SELECTION_TOOL: ActionsTool;
24
+ export declare const UNDO_TOOL: ActionsTool;
25
+ export declare const REDO_TOOL: ActionsTool;
26
+ export declare const CLEAR_TOOL: ActionsTool;
27
+ export declare const EXPORT_TOOL: ActionsTool;
28
+ export declare const LOAD_TOOL: ActionsTool;
29
+ export declare const SAVE_TOOL: ActionsTool;
30
+ export declare const MOVE_TOOL: ActionsTool;
31
+ export declare const UPLOAD_PICTURE_TOOL: ActionsTool;
32
+ export declare const ADD_URL_PICTURE_TOOL: ActionsTool;
@@ -0,0 +1,15 @@
1
+ import type { ShapeEntity } from './../../../common/types/Shapes';
2
+ import { type RefObject } from 'react';
3
+ type useDragType = {
4
+ disabled?: boolean;
5
+ ref: RefObject<HTMLDivElement | null>;
6
+ shape: ShapeEntity;
7
+ layoutDragging: string | undefined;
8
+ setLayoutDragging: (shapeId: string | undefined) => void;
9
+ handleSelect: (shape: ShapeEntity[]) => void;
10
+ onSwapShapes: (firstShapeId: string, lastShapeId: string) => void;
11
+ };
12
+ declare const useDrag: ({ disabled, ref, shape, layoutDragging, setLayoutDragging, handleSelect, onSwapShapes }: useDragType) => {
13
+ isOver: boolean;
14
+ };
15
+ export default useDrag;
@@ -0,0 +1,11 @@
1
+ type UseMenuProps = {
2
+ trigger?: 'click' | 'hover';
3
+ buttonElt: HTMLElement | null;
4
+ disabled?: boolean;
5
+ };
6
+ declare const useMenu: ({ trigger, disabled, buttonElt }: UseMenuProps) => {
7
+ isOpen: boolean;
8
+ trigger: "click" | "hover";
9
+ closeMenu: () => void;
10
+ };
11
+ export default useMenu;
@@ -0,0 +1,10 @@
1
+ import type { SnackBarType, SnackbarTypeType } from './../../../editor/types/snackbar';
2
+ declare const useSnackbar: () => {
3
+ snackbarList: SnackBarType[];
4
+ addSnackbar: ({ type, duration, text }: {
5
+ type?: SnackbarTypeType;
6
+ duration?: number;
7
+ text: string;
8
+ }) => void;
9
+ };
10
+ export default useSnackbar;