@yorab/react-paint 0.10.1 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +173 -1
- package/dist/{components → canvas/components}/Canvas.d.ts +4 -4
- package/dist/{components/toolbox → canvas/components}/EditTextBox.d.ts +3 -4
- package/dist/canvas/constants/app.d.ts +44 -0
- package/dist/canvas/constants/grid.d.ts +1 -0
- package/dist/{constants → canvas/constants}/shapes.d.ts +1 -1
- package/dist/{hooks → canvas/hooks}/useComponent.d.ts +1 -1
- package/dist/{hooks → canvas/hooks}/useDrawableCanvas.d.ts +5 -5
- package/dist/{hooks → canvas/hooks}/useKeyboard.d.ts +2 -2
- package/dist/canvas/hooks/useReactPaint.d.ts +131 -0
- package/dist/{hooks → canvas/hooks}/useShapes.d.ts +5 -3
- package/dist/canvas/index.d.ts +13 -0
- package/dist/{utils → canvas/utils}/canvas.d.ts +2 -2
- package/dist/{utils → canvas/utils}/data.d.ts +4 -4
- package/dist/{utils → canvas/utils}/file.d.ts +3 -3
- package/dist/{utils → canvas/utils}/grid.d.ts +1 -1
- package/dist/{utils → canvas/utils}/intersect.d.ts +3 -3
- package/dist/{utils → canvas/utils}/selection/lineSelection.d.ts +2 -2
- package/dist/{utils → canvas/utils}/selection/rectSelection.d.ts +3 -3
- package/dist/canvas/utils/selection/selectionFrame.d.ts +3 -0
- package/dist/{utils → canvas/utils}/selection.d.ts +3 -3
- package/dist/{utils → canvas/utils}/shapes/brush.d.ts +4 -4
- package/dist/{utils → canvas/utils}/shapes/circle.d.ts +4 -4
- package/dist/{utils → canvas/utils}/shapes/curve.d.ts +5 -5
- package/dist/{utils → canvas/utils}/shapes/ellipse.d.ts +4 -4
- package/dist/{utils → canvas/utils}/shapes/index.d.ts +5 -5
- package/dist/{utils → canvas/utils}/shapes/line.d.ts +4 -4
- package/dist/{utils → canvas/utils}/shapes/path.d.ts +2 -2
- package/dist/{utils → canvas/utils}/shapes/picture.d.ts +3 -3
- package/dist/{utils → canvas/utils}/shapes/polygon.d.ts +4 -4
- package/dist/{utils → canvas/utils}/shapes/rectangle.d.ts +4 -4
- package/dist/{utils → canvas/utils}/shapes/text.d.ts +4 -4
- package/dist/{utils → canvas/utils}/shapes/triangle.d.ts +1 -1
- package/dist/{utils → canvas/utils}/string.d.ts +0 -1
- package/dist/canvas/utils/tools.d.ts +3 -0
- package/dist/{utils → canvas/utils}/transform.d.ts +3 -3
- package/dist/{utils → canvas/utils}/trigo.d.ts +4 -4
- package/dist/{types → common/types}/Shapes.d.ts +4 -4
- package/dist/common/utils/array.d.ts +1 -0
- package/dist/editor/components/common/Loading.d.ts +6 -0
- package/dist/{components → editor/components}/common/Modal.d.ts +2 -2
- package/dist/{components → editor/components}/common/Panel.d.ts +2 -2
- package/dist/{components → editor/components}/common/Snackbar.d.ts +2 -3
- package/dist/{components → editor/components}/settings/ColorField.d.ts +2 -2
- package/dist/{components → editor/components}/settings/DeleteButton.d.ts +2 -3
- package/dist/{components → editor/components}/settings/FontFamilyField.d.ts +2 -2
- package/dist/{components → editor/components}/settings/LayoutButton.d.ts +1 -2
- package/dist/{components → editor/components}/settings/Layouts.d.ts +5 -6
- package/dist/{components → editor/components}/settings/LineArrowField.d.ts +2 -2
- package/dist/{components → editor/components}/settings/LineTypeField.d.ts +3 -3
- package/dist/{components → editor/components}/settings/PointsNumberField.d.ts +2 -2
- package/dist/{components → editor/components}/settings/RangeField.d.ts +2 -2
- package/dist/{components → editor/components}/settings/SelectField.d.ts +2 -2
- package/dist/{components → editor/components}/settings/SettingsBar.d.ts +4 -5
- package/dist/{components → editor/components}/settings/ToggleField.d.ts +2 -2
- package/dist/{components → editor/components}/toolbox/LoadFileTool.d.ts +2 -3
- package/dist/{components → editor/components}/toolbox/MenuGroup.d.ts +3 -4
- package/dist/{components → editor/components}/toolbox/PictureUrlInput.d.ts +1 -2
- package/dist/{components → editor/components}/toolbox/Tool.d.ts +2 -3
- package/dist/{components → editor/components}/toolbox/Toolbar.d.ts +3 -4
- package/dist/{components → editor/components}/toolbox/ToolbarGroup.d.ts +2 -3
- package/dist/editor/constants/grid.d.ts +7 -0
- package/dist/editor/constants/options.d.ts +13 -0
- package/dist/{constants → editor/constants}/snackbar.d.ts +1 -1
- package/dist/{constants → editor/constants}/style.d.ts +0 -3
- package/dist/{constants → editor/constants}/tools.d.ts +1 -1
- package/dist/{hooks → editor/hooks}/useDrag.d.ts +2 -2
- package/dist/{hooks → editor/hooks}/useSnackbar.d.ts +3 -3
- package/dist/editor/index.d.ts +24 -0
- package/dist/{utils → editor/utils}/style.d.ts +1 -1
- package/dist/editor/utils/toolbar.d.ts +11 -0
- package/dist/index.d.ts +6 -0
- package/dist/react-paint.css +1 -1
- package/dist/react-paint.js +943 -916
- package/dist/react-paint.umd.cjs +1 -1
- package/package.json +61 -56
- package/dist/components/App.d.ts +0 -20
- package/dist/components/common/Loading.d.ts +0 -7
- package/dist/constants/app.d.ts +0 -58
- package/dist/utils/array.d.ts +0 -1
- package/dist/utils/selection/selectionFrame.d.ts +0 -3
- package/dist/utils/toolbar.d.ts +0 -13
- /package/dist/{constants → canvas/constants}/picture.d.ts +0 -0
- /package/dist/{hooks → canvas/hooks}/useDoubleClick.d.ts +0 -0
- /package/dist/{hooks → canvas/hooks}/useResizeObserver.d.ts +0 -0
- /package/dist/{types → common/types}/Mode.d.ts +0 -0
- /package/dist/{types → common/types}/react.d.ts +0 -0
- /package/dist/{types → common/types}/tools.d.ts +0 -0
- /package/dist/{types → common/types}/utils.d.ts +0 -0
- /package/dist/{utils → common/utils}/dom.d.ts +0 -0
- /package/dist/{utils → common/utils}/object.d.ts +0 -0
- /package/dist/{utils → common/utils}/util.d.ts +0 -0
- /package/dist/{components → editor/components}/common/Button.d.ts +0 -0
- /package/dist/{constants → editor/constants}/icons.d.ts +0 -0
- /package/dist/{constants → editor/constants}/loading.d.ts +0 -0
- /package/dist/{types → editor/types}/snackbar.d.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { UtilsSettings } from '
|
|
2
|
-
import { SelectionModeResize } from '
|
|
3
|
-
import type { DrawableShape, Line, Point, Rect, ShapeEntity, StyleShape, Triangle } from '
|
|
4
|
-
import type { ToolsSettingsType } from '
|
|
1
|
+
import type { UtilsSettings } from './../../../canvas/constants/app';
|
|
2
|
+
import type { SelectionModeResize } from './../../../common/types/Mode';
|
|
3
|
+
import type { DrawableShape, Line, Point, Rect, ShapeEntity, StyleShape, Triangle } from './../../../common/types/Shapes';
|
|
4
|
+
import type { ToolsSettingsType } from './../../../common/types/tools';
|
|
5
5
|
export declare const refreshLine: <T extends DrawableShape<"line">>(line: T, settings: UtilsSettings) => T;
|
|
6
6
|
export declare const createLine: (shape: {
|
|
7
7
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UtilsSettings } from '
|
|
2
|
-
import { Circle, DrawableShape, Line, Rect } from '
|
|
1
|
+
import type { UtilsSettings } from './../../../canvas/constants/app';
|
|
2
|
+
import type { Circle, DrawableShape, Line, Rect } from './../../../common/types/Shapes';
|
|
3
3
|
export declare const createRecPath: (rect: Rect) => Path2D;
|
|
4
4
|
export declare const createCirclePath: (shape: Circle) => Path2D;
|
|
5
5
|
export declare const createEllipsePath: (ellipse: DrawableShape<'ellipse'>) => Path2D;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { UtilsSettings } from '
|
|
2
|
-
import { SelectionModeResize } from '
|
|
3
|
-
import type { DrawableShape, Picture, Point, Rect, ShapeEntity } from '
|
|
1
|
+
import type { UtilsSettings } from './../../../canvas/constants/app';
|
|
2
|
+
import type { SelectionModeResize } from './../../../common/types/Mode';
|
|
3
|
+
import type { DrawableShape, Picture, Point, Rect, ShapeEntity } from './../../../common/types/Shapes';
|
|
4
4
|
export declare const refreshPicture: <T extends DrawableShape<"picture">>(shape: T, settings: UtilsSettings) => T;
|
|
5
5
|
export declare const createPicture: (fileOrUrl: File | string, maxPictureWidth: number, maxPictureHeight: number, settings: UtilsSettings) => Promise<ShapeEntity<"picture">>;
|
|
6
6
|
export declare const drawPicture: (ctx: CanvasRenderingContext2D, picture: DrawableShape<'picture'>) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { UtilsSettings } from '
|
|
2
|
-
import { SelectionModeResize } from '
|
|
3
|
-
import type { DrawableShape, Point, Polygon, Rect, ShapeEntity } from '
|
|
4
|
-
import type { ToolsSettingsType } from '
|
|
1
|
+
import type { UtilsSettings } from './../../../canvas/constants/app';
|
|
2
|
+
import type { SelectionModeResize } from './../../../common/types/Mode';
|
|
3
|
+
import type { DrawableShape, Point, Polygon, Rect, ShapeEntity } from './../../../common/types/Shapes';
|
|
4
|
+
import type { ToolsSettingsType } from './../../../common/types/tools';
|
|
5
5
|
export declare const refreshPolygon: <T extends DrawableShape<"polygon">>(shape: T, settings: UtilsSettings) => T;
|
|
6
6
|
export declare const createPolygon: (shape: {
|
|
7
7
|
id: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { UtilsSettings } from '
|
|
2
|
-
import type { SelectionModeResize } from '
|
|
3
|
-
import type { DrawableShape, Point, Rect, ShapeEntity } from '
|
|
4
|
-
import type { ToolsSettingsType } from '
|
|
1
|
+
import type { UtilsSettings } from './../../../canvas/constants/app';
|
|
2
|
+
import type { SelectionModeResize } from './../../../common/types/Mode';
|
|
3
|
+
import type { DrawableShape, Point, Rect, ShapeEntity } from './../../../common/types/Shapes';
|
|
4
|
+
import type { ToolsSettingsType } from './../../../common/types/tools';
|
|
5
5
|
type rectish = 'text' | 'rect' | 'square' | 'picture';
|
|
6
6
|
export declare const refreshRect: <T extends DrawableShape<rectish>>(rect: T, settings: UtilsSettings) => T;
|
|
7
7
|
export declare const createRectangle: <T extends "rect" | "square">(shape: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { UtilsSettings } from '
|
|
2
|
-
import { SelectionModeResize } from '
|
|
3
|
-
import type { DrawableShape, Point, Rect, ShapeEntity, Text } from '
|
|
4
|
-
import type { ToolsSettingsType } from '
|
|
1
|
+
import type { UtilsSettings } from './../../../canvas/constants/app';
|
|
2
|
+
import type { SelectionModeResize } from './../../../common/types/Mode';
|
|
3
|
+
import type { DrawableShape, Point, Rect, ShapeEntity, Text } from './../../../common/types/Shapes';
|
|
4
|
+
import type { ToolsSettingsType } from './../../../common/types/tools';
|
|
5
5
|
export declare const refreshText: <T extends DrawableShape<"text">>(shape: T, settings: UtilsSettings) => T;
|
|
6
6
|
export declare const calculateTextFontSize: (ctx: CanvasRenderingContext2D, text: string[], maxWidth: number, fontBold: boolean, fontItalic: boolean, fontFamily?: string | undefined) => number;
|
|
7
7
|
export declare const createText: (ctx: CanvasRenderingContext2D, shape: {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DrawableShape, Triangle } from '
|
|
1
|
+
import type { DrawableShape, Triangle } from './../../../common/types/Shapes';
|
|
2
2
|
export declare const createTriangle: (triangle: Triangle) => DrawableShape<'triangle'>;
|
|
3
3
|
export declare const drawTriangle: (ctx: CanvasRenderingContext2D, triangle: DrawableShape<'triangle'>) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { UtilsSettings } from '
|
|
2
|
-
import type { SelectionModeData } from '
|
|
3
|
-
import type { DrawableShape, Line, Point, ShapeEntity } from '
|
|
1
|
+
import type { UtilsSettings } from './../../canvas/constants/app';
|
|
2
|
+
import type { SelectionModeData } from './../../common/types/Mode';
|
|
3
|
+
import type { DrawableShape, Line, Point, ShapeEntity } from './../../common/types/Shapes';
|
|
4
4
|
export declare const getNormalizedSize: (originalWidth: number, originalHeight: number, width: number, height: number) => number[];
|
|
5
5
|
export declare const roundValues: (prop: number, precision?: number) => number;
|
|
6
6
|
export declare const scalePoint: (point: Point, minX: number, minY: number, scaleX?: number, scaleY?: number) => Point;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Circle, Point, Rect } from '
|
|
1
|
+
import type { Circle, Point, Rect } from './../../common/types/Shapes';
|
|
2
2
|
type Vector = [Point, Point];
|
|
3
3
|
export declare const degreesToRadians: (degrees: number) => number;
|
|
4
4
|
export declare const radiansToDegrees: (radians: number) => number;
|
|
5
5
|
export declare const isPointInsideRect: (rect: Rect, point: Point) => boolean;
|
|
6
6
|
export declare const isCircleIntersectRect: (rect: Rect, circle: Circle) => boolean;
|
|
7
7
|
export declare const rotatePoint: ({ origin, point, rotation }: {
|
|
8
|
-
origin?: Point
|
|
8
|
+
origin?: Point;
|
|
9
9
|
point: Point;
|
|
10
10
|
rotation: number;
|
|
11
11
|
}) => Point;
|
|
12
12
|
export declare const getAngleFromVector: ({ targetVector: [point1, point2], radian, originVector }: {
|
|
13
13
|
targetVector: Vector;
|
|
14
|
-
radian?: boolean
|
|
15
|
-
originVector?: Vector
|
|
14
|
+
radian?: boolean;
|
|
15
|
+
originVector?: Vector;
|
|
16
16
|
}) => number;
|
|
17
17
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ShapeTypeArray } from '
|
|
1
|
+
import type { ShapeTypeArray } from '../../canvas/constants/shapes';
|
|
2
2
|
export type ShapeType = (typeof ShapeTypeArray)[number];
|
|
3
3
|
export type Point = [number, number];
|
|
4
4
|
export type Rect = {
|
|
@@ -64,6 +64,7 @@ export type SelectionLinesType = {
|
|
|
64
64
|
anchors: Path2D[];
|
|
65
65
|
};
|
|
66
66
|
export type DrawableShape<T extends ShapeType = ShapeType> = {
|
|
67
|
+
toolId?: string;
|
|
67
68
|
visible?: boolean;
|
|
68
69
|
locked?: boolean;
|
|
69
70
|
rotation: number;
|
|
@@ -114,13 +115,12 @@ export type DrawableShape<T extends ShapeType = ShapeType> = {
|
|
|
114
115
|
scaleX?: number;
|
|
115
116
|
scaleY?: number;
|
|
116
117
|
} : never);
|
|
117
|
-
export type DrawableShapeJson<T extends ShapeType = ShapeType> = DrawableShape<T>;
|
|
118
118
|
export type ShapeEntity<T extends Exclude<ShapeType, 'triangle'> = Exclude<ShapeType, 'triangle'>> = {
|
|
119
119
|
id: string;
|
|
120
120
|
toolId?: string;
|
|
121
121
|
} & DrawableShape<T>;
|
|
122
|
-
export type
|
|
123
|
-
shapes?:
|
|
122
|
+
export type StateData = {
|
|
123
|
+
shapes?: DrawableShape[];
|
|
124
124
|
config?: {
|
|
125
125
|
width: number;
|
|
126
126
|
height: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const compact: <T>(array: (T | undefined | null)[]) => T[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
2
|
import './Modal.css';
|
|
3
3
|
type ModalType = {
|
|
4
4
|
children: ReactNode;
|
|
@@ -6,5 +6,5 @@ type ModalType = {
|
|
|
6
6
|
position?: 'center' | 'bottom';
|
|
7
7
|
className?: string;
|
|
8
8
|
};
|
|
9
|
-
declare const Modal: ({ children, onClose, position, className }: ModalType) =>
|
|
9
|
+
declare const Modal: ({ children, onClose, position, className }: ModalType) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default Modal;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import type React from 'react';
|
|
2
2
|
import './Panel.css';
|
|
3
3
|
type PanelType = {
|
|
4
4
|
vertical?: boolean;
|
|
@@ -9,5 +9,5 @@ type PanelType = {
|
|
|
9
9
|
position?: 'bottom' | 'top';
|
|
10
10
|
alignment?: 'left' | 'right' | 'center';
|
|
11
11
|
};
|
|
12
|
-
declare const Panel: ({ children, title, className, position, fitContainer, alignment }: PanelType) =>
|
|
12
|
+
declare const Panel: ({ children, title, className, position, fitContainer, alignment }: PanelType) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export default Panel;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { SnackBarType } from '../../types/snackbar';
|
|
1
|
+
import type { SnackBarType } from './../../../editor/types/snackbar';
|
|
3
2
|
import './Snackbar.css';
|
|
4
3
|
type SnackbarContainerType = {
|
|
5
4
|
snackbarList: SnackBarType[];
|
|
6
5
|
};
|
|
7
|
-
declare const SnackbarContainer: ({ snackbarList }: SnackbarContainerType) =>
|
|
6
|
+
declare const SnackbarContainer: ({ snackbarList }: SnackbarContainerType) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export default SnackbarContainer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import type React from 'react';
|
|
2
2
|
import './ColorField.css';
|
|
3
3
|
type ShapeStyleColorType = {
|
|
4
4
|
selectedSettings: string | undefined;
|
|
@@ -11,5 +11,5 @@ type ShapeStyleColorType = {
|
|
|
11
11
|
values: string[];
|
|
12
12
|
valueChanged: (field: string, value: string | number) => void;
|
|
13
13
|
};
|
|
14
|
-
declare const ColorField: ({ selectedSettings, setSelectedSettings, title, mode, disabled, values, field, value, valueChanged }: ShapeStyleColorType) =>
|
|
14
|
+
declare const ColorField: ({ selectedSettings, setSelectedSettings, title, mode, disabled, values, field, value, valueChanged }: ShapeStyleColorType) => import("react/jsx-runtime").JSX.Element | null;
|
|
15
15
|
export default ColorField;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { ShapeEntity } from '../../types/Shapes';
|
|
1
|
+
import type { ShapeEntity } from './../../../common/types/Shapes';
|
|
3
2
|
type DeleteShapeButtonType = {
|
|
4
3
|
disabled?: boolean;
|
|
5
4
|
selectedShape: ShapeEntity;
|
|
6
5
|
removeShape: (shape: ShapeEntity) => void;
|
|
7
6
|
};
|
|
8
|
-
declare const DeleteButton: ({ disabled, selectedShape, removeShape }: DeleteShapeButtonType) =>
|
|
7
|
+
declare const DeleteButton: ({ disabled, selectedShape, removeShape }: DeleteShapeButtonType) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default DeleteButton;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import type React from 'react';
|
|
2
2
|
import './FontFamilyField.css';
|
|
3
3
|
type FontFamilyFieldType = {
|
|
4
4
|
selectedSettings: string | undefined;
|
|
@@ -8,5 +8,5 @@ type FontFamilyFieldType = {
|
|
|
8
8
|
defaultValue?: number | string | undefined;
|
|
9
9
|
valueChanged: (field: string, value: string | number) => void;
|
|
10
10
|
};
|
|
11
|
-
declare const FontFamilyField: ({ selectedSettings, setSelectedSettings, disabled, values, defaultValue, valueChanged }: FontFamilyFieldType) =>
|
|
11
|
+
declare const FontFamilyField: ({ selectedSettings, setSelectedSettings, disabled, values, defaultValue, valueChanged }: FontFamilyFieldType) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
12
|
export default FontFamilyField;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import './LayoutButton.css';
|
|
3
2
|
type LayoutButtonType = {
|
|
4
3
|
disabled: boolean;
|
|
5
4
|
toggleLayoutPanel: () => void;
|
|
6
5
|
};
|
|
7
|
-
declare const LayoutButton: ({ disabled, toggleLayoutPanel }: LayoutButtonType) =>
|
|
6
|
+
declare const LayoutButton: ({ disabled, toggleLayoutPanel }: LayoutButtonType) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export default LayoutButton;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
import type { GridFormatType } from '../../constants/app';
|
|
1
|
+
import type { ShapeEntity } from './../../../common/types/Shapes';
|
|
2
|
+
import type { GridLabelType } from './../../../editor/constants/grid';
|
|
4
3
|
import './Layouts.css';
|
|
5
4
|
type LayoutsType = {
|
|
6
|
-
gridFormat:
|
|
7
|
-
setGridFormat:
|
|
5
|
+
gridFormat: GridLabelType;
|
|
6
|
+
setGridFormat: (value: GridLabelType) => void;
|
|
8
7
|
disabled?: boolean;
|
|
9
8
|
shapes: ShapeEntity[];
|
|
10
9
|
removeShape: (shape: ShapeEntity) => void;
|
|
@@ -15,5 +14,5 @@ type LayoutsType = {
|
|
|
15
14
|
moveShapes: (firstShapeId: string, lastShapeId: string) => void;
|
|
16
15
|
isLayoutPanelShown: boolean;
|
|
17
16
|
};
|
|
18
|
-
declare const Layouts: ({ gridFormat, setGridFormat, disabled, shapes, removeShape, toggleShapeVisibility, toggleShapeLock, selectedShape, moveShapes, selectShape, isLayoutPanelShown }: LayoutsType) =>
|
|
17
|
+
declare const Layouts: ({ gridFormat, setGridFormat, disabled, shapes, removeShape, toggleShapeVisibility, toggleShapeLock, selectedShape, moveShapes, selectShape, isLayoutPanelShown }: LayoutsType) => import("react/jsx-runtime").JSX.Element | null;
|
|
19
18
|
export default Layouts;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import type React from 'react';
|
|
2
2
|
import './LineArrowField.css';
|
|
3
3
|
type LineArrowType = {
|
|
4
4
|
selectedSettings: string | undefined;
|
|
@@ -8,5 +8,5 @@ type LineArrowType = {
|
|
|
8
8
|
defaultValue?: number | string | undefined;
|
|
9
9
|
valueChanged: (field: string, value: string | number) => void;
|
|
10
10
|
};
|
|
11
|
-
declare const LineArrowField: ({ selectedSettings, setSelectedSettings, disabled, values, defaultValue, valueChanged }: LineArrowType) =>
|
|
11
|
+
declare const LineArrowField: ({ selectedSettings, setSelectedSettings, disabled, values, defaultValue, valueChanged }: LineArrowType) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
12
|
export default LineArrowField;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import type React from 'react';
|
|
2
2
|
import './LineTypeField.css';
|
|
3
3
|
type LineTypeOptionType = {
|
|
4
4
|
children: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const LineTypeOption: ({ children }: LineTypeOptionType) =>
|
|
6
|
+
export declare const LineTypeOption: ({ children }: LineTypeOptionType) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
type LineTypeType = {
|
|
8
8
|
selectedSettings: string | undefined;
|
|
9
9
|
setSelectedSettings: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
@@ -12,5 +12,5 @@ type LineTypeType = {
|
|
|
12
12
|
defaultValue?: number | string | undefined;
|
|
13
13
|
valueChanged: (field: string, value: string | number) => void;
|
|
14
14
|
};
|
|
15
|
-
declare const LineTypeField: ({ selectedSettings, setSelectedSettings, disabled, values, defaultValue, valueChanged }: LineTypeType) =>
|
|
15
|
+
declare const LineTypeField: ({ selectedSettings, setSelectedSettings, disabled, values, defaultValue, valueChanged }: LineTypeType) => import("react/jsx-runtime").JSX.Element | null;
|
|
16
16
|
export default LineTypeField;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import type React from 'react';
|
|
2
2
|
type PointsNumberFieldType = {
|
|
3
3
|
selectedSettings: string | undefined;
|
|
4
4
|
setSelectedSettings: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
@@ -9,5 +9,5 @@ type PointsNumberFieldType = {
|
|
|
9
9
|
value?: number | undefined;
|
|
10
10
|
valueChanged: (field: string, value: string | number) => void;
|
|
11
11
|
};
|
|
12
|
-
declare const PointsNumberField: ({ selectedSettings, setSelectedSettings, disabled, min, max, step, value, valueChanged }: PointsNumberFieldType) =>
|
|
12
|
+
declare const PointsNumberField: ({ selectedSettings, setSelectedSettings, disabled, min, max, step, value, valueChanged }: PointsNumberFieldType) => import("react/jsx-runtime").JSX.Element | null;
|
|
13
13
|
export default PointsNumberField;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import type React from 'react';
|
|
2
2
|
import './RangeField.css';
|
|
3
3
|
type ShapeStyleColorType = {
|
|
4
4
|
selectedSettings: string | undefined;
|
|
@@ -14,5 +14,5 @@ type ShapeStyleColorType = {
|
|
|
14
14
|
value?: number | undefined;
|
|
15
15
|
valueChanged: (field: string, value: string | number, needHistorySave?: boolean) => void;
|
|
16
16
|
};
|
|
17
|
-
declare const RangeField: ({ selectedSettings, setSelectedSettings, title, icon, disabled, field, value, min, max, step, unity, valueChanged }: ShapeStyleColorType) =>
|
|
17
|
+
declare const RangeField: ({ selectedSettings, setSelectedSettings, title, icon, disabled, field, value, min, max, step, unity, valueChanged }: ShapeStyleColorType) => import("react/jsx-runtime").JSX.Element | null;
|
|
18
18
|
export default RangeField;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import type React from 'react';
|
|
2
2
|
import './SelectField.css';
|
|
3
3
|
type SelectFieldType = {
|
|
4
4
|
CustomOption: React.FC<{
|
|
@@ -14,5 +14,5 @@ type SelectFieldType = {
|
|
|
14
14
|
defaultValue?: number | string | undefined;
|
|
15
15
|
valueChanged: (field: string, value: string | number) => void;
|
|
16
16
|
};
|
|
17
|
-
declare const SelectField: ({ CustomOption, selectedSettings, setSelectedSettings, title, disabled, field, icon, values, defaultValue, valueChanged }: SelectFieldType) =>
|
|
17
|
+
declare const SelectField: ({ CustomOption, selectedSettings, setSelectedSettings, title, disabled, field, icon, values, defaultValue, valueChanged }: SelectFieldType) => import("react/jsx-runtime").JSX.Element | null;
|
|
18
18
|
export default SelectField;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { ShapeEntity } from '
|
|
3
|
-
import type { CustomTool, ToolsType } from '
|
|
1
|
+
import type { UtilsSettings } from './../../../canvas/constants/app';
|
|
2
|
+
import type { ShapeEntity } from './../../../common/types/Shapes';
|
|
3
|
+
import type { CustomTool, ToolsType } from './../../../common/types/tools';
|
|
4
4
|
import './SettingsBar.css';
|
|
5
|
-
import { UtilsSettings } from 'src/constants/app';
|
|
6
5
|
type SettingsBoxType = {
|
|
7
6
|
width: number;
|
|
8
7
|
disabled?: boolean;
|
|
@@ -17,5 +16,5 @@ type SettingsBoxType = {
|
|
|
17
16
|
removeShape: (shape: ShapeEntity) => void;
|
|
18
17
|
toggleLayoutPanel: () => void;
|
|
19
18
|
};
|
|
20
|
-
declare const SettingsBar: ({ width, disabled, availableTools, updateToolSettings, layersManipulation, toggleLayoutPanel, activeTool, selectedShape, canvas, settings, updateShape, removeShape }: SettingsBoxType) =>
|
|
19
|
+
declare const SettingsBar: ({ width, disabled, availableTools, updateToolSettings, layersManipulation, toggleLayoutPanel, activeTool, selectedShape, canvas, settings, updateShape, removeShape }: SettingsBoxType) => import("react/jsx-runtime").JSX.Element;
|
|
21
20
|
export default SettingsBar;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import type React from 'react';
|
|
2
2
|
type ShapeStyleSelectType = {
|
|
3
3
|
setSelectedSettings: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
4
4
|
disabled?: boolean;
|
|
@@ -8,5 +8,5 @@ type ShapeStyleSelectType = {
|
|
|
8
8
|
value?: boolean;
|
|
9
9
|
valueChanged: (field: string, value: boolean) => void;
|
|
10
10
|
};
|
|
11
|
-
declare const ToggleField: ({ setSelectedSettings, disabled, field, icon, values, value, valueChanged }: ShapeStyleSelectType) =>
|
|
11
|
+
declare const ToggleField: ({ setSelectedSettings, disabled, field, icon, values, value, valueChanged }: ShapeStyleSelectType) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
12
|
export default ToggleField;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { ToolsType } from '../../types/tools';
|
|
1
|
+
import type { ToolsType } from './../../../common/types/tools';
|
|
3
2
|
type LoadFileToolType = {
|
|
4
3
|
disabled?: boolean;
|
|
5
4
|
loadFile: (file: File) => void;
|
|
@@ -8,5 +7,5 @@ type LoadFileToolType = {
|
|
|
8
7
|
accept: string;
|
|
9
8
|
withText?: boolean;
|
|
10
9
|
};
|
|
11
|
-
declare const LoadFileTool: ({ disabled, withText, loadFile, type, img, accept }: LoadFileToolType) =>
|
|
10
|
+
declare const LoadFileTool: ({ disabled, withText, loadFile, type, img, accept }: LoadFileToolType) => import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
export default LoadFileTool;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
import type { ToolsType } from '../../types/tools';
|
|
1
|
+
import type { ShapeType } from './../../../common/types/Shapes';
|
|
2
|
+
import type { ToolsType } from './../../../common/types/tools';
|
|
4
3
|
import './MenuGroup.css';
|
|
5
4
|
type ToolbarGroupType = {
|
|
6
5
|
activeTool: ToolsType;
|
|
@@ -31,5 +30,5 @@ type ToolbarGroupType = {
|
|
|
31
30
|
redoAction: () => void;
|
|
32
31
|
clearCanvas: () => void;
|
|
33
32
|
};
|
|
34
|
-
declare const MenuGroup: ({ activeTool, withActionsInMenu, hasActionToUndo, hasActionToRedo, hasActionToClear, undoAction, redoAction, clearCanvas, alignment, group, vertical, disabled, withLoadAndSave, withExport, addPicture: addPictureFromProps, loadFile: loadFileFromProps, togglePictureUrlModal, saveFile, exportCanvasInFile, withUploadPicture, withUrlPicture }: ToolbarGroupType) =>
|
|
33
|
+
declare const MenuGroup: ({ activeTool, withActionsInMenu, hasActionToUndo, hasActionToRedo, hasActionToClear, undoAction, redoAction, clearCanvas, alignment, group, vertical, disabled, withLoadAndSave, withExport, addPicture: addPictureFromProps, loadFile: loadFileFromProps, togglePictureUrlModal, saveFile, exportCanvasInFile, withUploadPicture, withUrlPicture }: ToolbarGroupType) => import("react/jsx-runtime").JSX.Element | null;
|
|
35
34
|
export default MenuGroup;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import './PictureUrlInput.css';
|
|
3
2
|
type PictureUrlModalType = {
|
|
4
3
|
togglePictureUrlModal: () => void;
|
|
5
4
|
addPicture: (url: string) => Promise<void>;
|
|
6
5
|
};
|
|
7
|
-
declare const PictureUrlModal: ({ togglePictureUrlModal, addPicture }: PictureUrlModalType) =>
|
|
6
|
+
declare const PictureUrlModal: ({ togglePictureUrlModal, addPicture }: PictureUrlModalType) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export default PictureUrlModal;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { ToolsType } from '../../types/tools';
|
|
1
|
+
import type { ToolsType } from './../../../common/types/tools';
|
|
3
2
|
type ToolComponentType = {
|
|
4
3
|
type: ToolsType;
|
|
5
4
|
img?: string;
|
|
@@ -8,5 +7,5 @@ type ToolComponentType = {
|
|
|
8
7
|
disabled?: boolean;
|
|
9
8
|
setActive: (marker: ToolsType) => void;
|
|
10
9
|
};
|
|
11
|
-
declare const Tool: ({ type, img, isActive, withText, disabled, setActive }: ToolComponentType) =>
|
|
10
|
+
declare const Tool: ({ type, img, isActive, withText, disabled, setActive }: ToolComponentType) => import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
export default Tool;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
import type { CustomTool } from '../../types/tools';
|
|
1
|
+
import type { ToolsType } from './../../../common/types/tools';
|
|
2
|
+
import type { CustomTool } from './../../../common/types/tools';
|
|
4
3
|
import './Toolbar.css';
|
|
5
4
|
type ToolboxType = {
|
|
6
5
|
width: number;
|
|
@@ -23,5 +22,5 @@ type ToolboxType = {
|
|
|
23
22
|
withUrlPicture: boolean;
|
|
24
23
|
withUploadPicture: boolean;
|
|
25
24
|
};
|
|
26
|
-
declare const Toolbar: ({ width, disabled, activeTool, hasActionToUndo, hasActionToRedo, hasActionToClear, withLoadAndSave, withExport, clearCanvas, setActiveTool: setActiveToolFromProps, undoAction, redoAction, addPicture, loadFile, saveFile, exportCanvasInFile, availableTools, withUrlPicture, withUploadPicture }: ToolboxType) =>
|
|
25
|
+
declare const Toolbar: ({ width, disabled, 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;
|
|
27
26
|
export default Toolbar;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { CustomTool, ToolsType } from '../../types/tools';
|
|
1
|
+
import type { CustomTool, ToolsType } from './../../../common/types/tools';
|
|
3
2
|
import './ToolbarGroup.css';
|
|
4
3
|
type ToolbarGroupType = {
|
|
5
4
|
activeTool: ToolsType;
|
|
@@ -14,5 +13,5 @@ type ToolbarGroupType = {
|
|
|
14
13
|
img?: string;
|
|
15
14
|
setActiveToolFromId: (id: string) => void;
|
|
16
15
|
};
|
|
17
|
-
declare const ToolbarGroup: ({ activeTool, alignment, group, disabled, setActiveToolFromId }: ToolbarGroupType) =>
|
|
16
|
+
declare const ToolbarGroup: ({ activeTool, alignment, group, disabled, setActiveToolFromId }: ToolbarGroupType) => import("react/jsx-runtime").JSX.Element | null;
|
|
18
17
|
export default ToolbarGroup;
|
|
@@ -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
|
+
};
|
|
@@ -8,10 +8,7 @@ export declare const STYLE_FONTS: string[];
|
|
|
8
8
|
export declare const STYLE_FONT_DEFAULT = "serif";
|
|
9
9
|
export declare const STYLE_FONT_SIZE_DEFAULT = 36;
|
|
10
10
|
export declare const STYLE_ZINDEX: {
|
|
11
|
-
APP: number;
|
|
12
11
|
LOADING: number;
|
|
13
12
|
PANEL: number;
|
|
14
13
|
SNACKBAR: number;
|
|
15
14
|
};
|
|
16
|
-
export declare const GRID_STEP: readonly [10, 20, 40];
|
|
17
|
-
export declare const GRID_ROTATION_STEPS = 18;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ActionsTool, CustomTool, ToolsBrushSettings, ToolsCircleSettings, ToolsCurveSettings, ToolsEllipseSettings, ToolsLineSettings, ToolsPictureSettings, ToolsPolygonSettings, ToolsRectSettings, ToolsSquareSettings, ToolsTextSettings } from '
|
|
1
|
+
import type { ActionsTool, CustomTool, ToolsBrushSettings, ToolsCircleSettings, ToolsCurveSettings, ToolsEllipseSettings, ToolsLineSettings, ToolsPictureSettings, ToolsPolygonSettings, ToolsRectSettings, ToolsSquareSettings, ToolsTextSettings } from './../../common/types/tools';
|
|
2
2
|
export declare const SETTINGS_DEFAULT_RECT: ToolsRectSettings;
|
|
3
3
|
export declare const SETTINGS_DEFAULT_SQUARE: ToolsSquareSettings;
|
|
4
4
|
export declare const SETTINGS_DEFAULT_CIRCLE: ToolsCircleSettings;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
import type { ShapeEntity } from '
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import type { ShapeEntity } from './../../common/types/Shapes';
|
|
3
3
|
type useDragType = {
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
ref: RefObject<HTMLDivElement>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { SnackBarType, SnackbarTypeType } from '
|
|
1
|
+
import type { SnackBarType, SnackbarTypeType } from './../../editor/types/snackbar';
|
|
2
2
|
declare const useSnackbar: () => {
|
|
3
3
|
snackbarList: SnackBarType[];
|
|
4
4
|
addSnackbar: ({ type, duration, text }: {
|
|
5
|
-
type?: SnackbarTypeType
|
|
6
|
-
duration?: number
|
|
5
|
+
type?: SnackbarTypeType;
|
|
6
|
+
duration?: number;
|
|
7
7
|
text: string;
|
|
8
8
|
}) => void;
|
|
9
9
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { UseReactPaintReturnType } from './../canvas/hooks/useReactPaint';
|
|
2
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
3
|
+
import './index.css';
|
|
4
|
+
type EditorProps = {
|
|
5
|
+
editorProps: UseReactPaintReturnType['editorProps'];
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
options?: {
|
|
10
|
+
toolbarBackgroundColor?: string;
|
|
11
|
+
dividerColor?: string;
|
|
12
|
+
fontRadius?: number;
|
|
13
|
+
fontDisabledColor?: string;
|
|
14
|
+
fontDisabledBackgroundColor?: string;
|
|
15
|
+
fontColor?: string;
|
|
16
|
+
fontBackgroundColor?: string;
|
|
17
|
+
fontSelectedColor?: string;
|
|
18
|
+
fontSelectedBackgroundColor?: string;
|
|
19
|
+
fontHoverColor?: string;
|
|
20
|
+
fontHoverBackgroundColor?: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
declare const Editor: ({ editorProps, className, style, options, children }: EditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export default Editor;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ShapeType } from '
|
|
1
|
+
import type { ShapeType } from './../../common/types/Shapes';
|
|
2
2
|
export declare const getShapePicture: (shape: ShapeType) => "<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>" | "<svg><path d=\"M2.5 17.5V2.5H17.5V17.5ZM4.25 15.75H15.75V4.25H4.25ZM4.25 15.75V4.25V15.75Z\"/></svg>" | "<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>" | "<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>" | "<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>" | "<svg><path d=\"M8.708 16.667V5.917H4.167V3.333H15.833V5.917H11.292V16.667Z\"/></svg>" | "<svg><path d=\"M7.5 15.833V14.083H12.833L3.333 4.583L4.583 3.333L14.083 12.833V7.5H15.833V15.833Z\"/></svg>" | "<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>" | "";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ShapeType } from './../../common/types/Shapes';
|
|
2
|
+
import type { CustomTool } from './../../common/types/tools';
|
|
3
|
+
export declare const getCurrentStructure: (availableTools: CustomTool[], defaultStructure: (ShapeType | {
|
|
4
|
+
title: string;
|
|
5
|
+
toolsType: ShapeType[];
|
|
6
|
+
vertical: boolean;
|
|
7
|
+
})[]) => (CustomTool | {
|
|
8
|
+
title: string;
|
|
9
|
+
toolsType: CustomTool[];
|
|
10
|
+
vertical: boolean;
|
|
11
|
+
})[];
|