@yorab/react-paint 0.16.2 → 0.17.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/dist/canvas/components/Canvas.d.ts +2 -0
- package/dist/canvas/constants/app.d.ts +1 -0
- package/dist/canvas/constants/keyboard.d.ts +3 -0
- package/dist/canvas/hooks/useDrawableCanvas.d.ts +3 -1
- package/dist/canvas/hooks/useKeyboard.d.ts +4 -1
- package/dist/canvas/hooks/useReactPaint.d.ts +18 -2
- package/dist/canvas/hooks/useShapes.d.ts +6 -2
- package/dist/canvas/utils/file.d.ts +11 -11
- package/dist/canvas/utils/intersect.d.ts +1 -1
- package/dist/canvas/utils/selection.d.ts +1 -1
- package/dist/canvas/utils/shapes/curve.d.ts +1 -0
- package/dist/canvas/utils/shapes/path.d.ts +3 -3
- package/dist/canvas/utils/shapes/polygon.d.ts +1 -0
- package/dist/common/types/Mode.d.ts +10 -1
- package/dist/common/types/Shapes.d.ts +3 -1
- package/dist/editor/components/common/Menu.d.ts +10 -0
- package/dist/editor/components/common/Panel.d.ts +3 -3
- package/dist/editor/components/settings/Layouts.d.ts +2 -2
- package/dist/editor/components/toolbox/ContextMenu.d.ts +23 -0
- package/dist/editor/components/toolbox/MenuGroup.d.ts +1 -8
- package/dist/editor/components/toolbox/ToolbarGroup.d.ts +1 -4
- package/dist/editor/constants/icons.d.ts +1 -0
- package/dist/editor/hooks/useDrag.d.ts +2 -2
- package/dist/editor/hooks/useMenu.d.ts +10 -0
- package/dist/react-paint.css +1 -1
- package/dist/react-paint.js +1452 -1309
- package/dist/react-paint.umd.cjs +1 -1
- package/package.json +25 -8
- package/dist/canvas/utils/string.d.ts +0 -2
- package/dist/editor/components/settings/PointsNumberField.d.ts +0 -13
|
@@ -40,12 +40,14 @@ type DrawerType = {
|
|
|
40
40
|
} | undefined>>;
|
|
41
41
|
setCanvasOffset: (offset: Point) => void;
|
|
42
42
|
isInsideComponent: boolean;
|
|
43
|
+
isInsideCanvas: boolean;
|
|
43
44
|
selectionMode: SelectionModeData<number | Point>;
|
|
44
45
|
setSelectionMode: React.Dispatch<React.SetStateAction<SelectionModeData<number | Point>>>;
|
|
45
46
|
isShiftPressed: boolean;
|
|
46
47
|
isAltPressed: boolean;
|
|
47
48
|
isSpacePressed: boolean;
|
|
48
49
|
withFrameSelection: boolean;
|
|
50
|
+
withContextMenu: boolean;
|
|
49
51
|
withSkeleton: boolean;
|
|
50
52
|
setCanvasMoveAcceleration: React.Dispatch<React.SetStateAction<Point>>;
|
|
51
53
|
};
|
|
@@ -40,6 +40,7 @@ type AppOptionsType = {
|
|
|
40
40
|
withUrlPicture: boolean;
|
|
41
41
|
withFrameSelection: boolean;
|
|
42
42
|
withSkeleton: boolean;
|
|
43
|
+
withContextMenu: boolean;
|
|
43
44
|
clearCallback: 'empty' | 'defaultShapes' | (() => ExportedDrawableShape[]);
|
|
44
45
|
brushAlgo: BrushAlgo;
|
|
45
46
|
isBrushShapeDoneOnMouseUp: boolean;
|
|
@@ -10,6 +10,8 @@ export declare const KeyboardCode: {
|
|
|
10
10
|
readonly Alt: "Alt";
|
|
11
11
|
readonly Option: "Option";
|
|
12
12
|
readonly Space: " ";
|
|
13
|
+
readonly A: "A";
|
|
14
|
+
readonly a: "a";
|
|
13
15
|
readonly z: "z";
|
|
14
16
|
readonly Z: "Z";
|
|
15
17
|
readonly y: "y";
|
|
@@ -19,6 +21,7 @@ export declare const KeyboardCode: {
|
|
|
19
21
|
readonly Zero: "0";
|
|
20
22
|
};
|
|
21
23
|
export declare const KeyboardCommand: {
|
|
24
|
+
readonly Cut: "cut";
|
|
22
25
|
readonly Copy: "copy";
|
|
23
26
|
readonly Paste: "paste";
|
|
24
27
|
};
|
|
@@ -25,6 +25,7 @@ type UseCanvasType = {
|
|
|
25
25
|
} | undefined>>;
|
|
26
26
|
setCanvasOffset: (offset: Point) => void;
|
|
27
27
|
isInsideComponent: boolean;
|
|
28
|
+
isInsideCanvas: boolean;
|
|
28
29
|
selectionMode: SelectionModeData<number | Point>;
|
|
29
30
|
setSelectionMode: React.Dispatch<React.SetStateAction<SelectionModeData<number | Point>>>;
|
|
30
31
|
setSelectionFrame: React.Dispatch<React.SetStateAction<{
|
|
@@ -36,10 +37,11 @@ type UseCanvasType = {
|
|
|
36
37
|
isShiftPressed: boolean;
|
|
37
38
|
isAltPressed: boolean;
|
|
38
39
|
withFrameSelection: boolean;
|
|
40
|
+
withContextMenu: boolean;
|
|
39
41
|
settings: UtilsSettings;
|
|
40
42
|
isSpacePressed: boolean;
|
|
41
43
|
};
|
|
42
|
-
declare const useDrawableCanvas: ({ addShapes, drawCanvasRef, setActiveTool, refreshHoveredShape, shapes, selectionMode, activeTool, isInsideComponent, setCanvasOffset, selectedShape, canvasOffsetStartData, refreshSelectedShapes, setSelectedShape, setSelectionFrame, setCanvasOffsetStartData, updateSingleShape, duplicateShapes, saveShapes, setSelectionMode, setCanvasMoveAcceleration, settings, isShiftPressed, isAltPressed, withFrameSelection, isSpacePressed }: UseCanvasType) => {
|
|
44
|
+
declare const useDrawableCanvas: ({ addShapes, drawCanvasRef, setActiveTool, refreshHoveredShape, shapes, selectionMode, activeTool, isInsideComponent, isInsideCanvas, setCanvasOffset, selectedShape, canvasOffsetStartData, refreshSelectedShapes, setSelectedShape, setSelectionFrame, setCanvasOffsetStartData, updateSingleShape, duplicateShapes, saveShapes, setSelectionMode, setCanvasMoveAcceleration, settings, isShiftPressed, isAltPressed, withFrameSelection, withContextMenu, isSpacePressed }: UseCanvasType) => {
|
|
43
45
|
hoverMode: HoverModeData;
|
|
44
46
|
};
|
|
45
47
|
export default useDrawableCanvas;
|
|
@@ -9,6 +9,7 @@ type UseKeyboardType = {
|
|
|
9
9
|
pasteShapes: (shape: ShapeEntity[]) => void;
|
|
10
10
|
updateShapes: (shapes: ShapeEntity[]) => void;
|
|
11
11
|
setSelectedShape: (value: React.SetStateAction<SelectionType | undefined>) => void;
|
|
12
|
+
selectAllShapes: () => void;
|
|
12
13
|
removeShape: (shape: ShapeEntity[]) => void;
|
|
13
14
|
backwardShape: () => void;
|
|
14
15
|
forwardShape: () => void;
|
|
@@ -25,6 +26,8 @@ type UseKeyboardType = {
|
|
|
25
26
|
settings: UtilsSettings;
|
|
26
27
|
setCanvasZoom: (action: 'unzoom' | 'zoom' | 'default') => void;
|
|
27
28
|
resetZoom: () => void;
|
|
29
|
+
copiedShape: SelectionType | undefined;
|
|
30
|
+
setCopiedShape: (shape: React.SetStateAction<SelectionType | undefined>) => void;
|
|
28
31
|
};
|
|
29
|
-
declare const useKeyboard: ({ isInsideComponent, isInsideCanvas, selectedShape, isEditingText, settings, setSelectedShape, setActiveTool, setCanvasZoom, resetZoom, setSelectionMode, setSelectionFrame, removeShape, pasteShapes, updateShapes, backwardShape, forwardShape, setShiftPressed, setAltPressed, setIsSpacePressed }: UseKeyboardType) => {};
|
|
32
|
+
declare const useKeyboard: ({ isInsideComponent, isInsideCanvas, selectedShape, isEditingText, settings, copiedShape, setCopiedShape, setSelectedShape, setActiveTool, setCanvasZoom, resetZoom, setSelectionMode, setSelectionFrame, selectAllShapes, removeShape, pasteShapes, updateShapes, backwardShape, forwardShape, setShiftPressed, setAltPressed, setIsSpacePressed }: UseKeyboardType) => {};
|
|
30
33
|
export default useKeyboard;
|
|
@@ -15,18 +15,25 @@ type UseReactPaintProps = {
|
|
|
15
15
|
type EditorProps = {
|
|
16
16
|
shapesRef: React.RefObject<ShapeEntity[]>;
|
|
17
17
|
addPictureShape: (fileOrUrl: File | string, maxWidth?: number, maxHeight?: number) => Promise<ShapeEntity>;
|
|
18
|
-
|
|
18
|
+
swapShapes: (startPositionShapeId: string, endPositionShapeId: string) => void;
|
|
19
|
+
moveShapes: (shapes: ShapeEntity[], action: 'first' | 'last' | 'forward' | 'backward') => void;
|
|
19
20
|
toggleShapeVisibility: (shapes: ShapeEntity[]) => void;
|
|
20
21
|
toggleShapeLock: (shapeGroup: ShapeEntity[]) => void;
|
|
21
22
|
canGoBackward: boolean;
|
|
22
23
|
canGoForward: boolean;
|
|
23
24
|
canClear: boolean;
|
|
24
25
|
selectedShape: SelectionType | undefined;
|
|
26
|
+
copiedShape: SelectionType | undefined;
|
|
27
|
+
setCopiedShape: React.Dispatch<React.SetStateAction<SelectionType | undefined>>;
|
|
28
|
+
pasteShapes: (shapes: ShapeEntity[]) => void;
|
|
25
29
|
saveShapes: () => void;
|
|
26
30
|
removeShape: (shapes: ShapeEntity[]) => void;
|
|
27
31
|
updateShape: (updatedShapes: ShapeEntity[], withSave?: boolean) => void;
|
|
32
|
+
duplicateShapes: (shapesToDuplicate: ShapeEntity[], translate?: boolean, selectNewOnes?: boolean) => void;
|
|
28
33
|
backwardShape: () => void;
|
|
29
34
|
forwardShape: () => void;
|
|
35
|
+
removeShapePoint: (shape: ShapeEntity<'curve' | 'polygon'>, pointIndex: number) => void;
|
|
36
|
+
transformShape: (shapes: ShapeEntity[], center: Point, action: 'flipHorizontally' | 'flipVertically' | 'rotateClockwise' | 'rotateCounterclockwise') => void;
|
|
30
37
|
refs: {
|
|
31
38
|
canvas: React.RefObject<HTMLCanvasElement | null>;
|
|
32
39
|
editor: React.RefObject<HTMLElement | null>;
|
|
@@ -36,6 +43,7 @@ type EditorProps = {
|
|
|
36
43
|
height: number;
|
|
37
44
|
selectTool: (tool: ToolsType) => void;
|
|
38
45
|
selectShapes: (shapes: ShapeEntity[]) => void;
|
|
46
|
+
selectAllShapes: () => void;
|
|
39
47
|
activeTool: ToolsType;
|
|
40
48
|
setActiveTool: React.Dispatch<React.SetStateAction<ToolsType>>;
|
|
41
49
|
setAvailableTools: React.Dispatch<React.SetStateAction<CustomTool[]>>;
|
|
@@ -47,6 +55,8 @@ type EditorProps = {
|
|
|
47
55
|
exportPicture: (view: 'fitToShapes' | 'defaultView' | 'currentZoom') => void;
|
|
48
56
|
exportData: () => void;
|
|
49
57
|
clearCanvas: () => void;
|
|
58
|
+
selectionMode: SelectionModeData<number | Point>;
|
|
59
|
+
setSelectionMode: React.Dispatch<React.SetStateAction<SelectionModeData<number | Point>>>;
|
|
50
60
|
settings: UtilsSettings;
|
|
51
61
|
setCanvasZoom: (action: 'unzoom' | 'zoom' | 'default') => void;
|
|
52
62
|
resetZoom: () => void;
|
|
@@ -58,11 +68,15 @@ type EditorProps = {
|
|
|
58
68
|
withLoadAndSave: boolean;
|
|
59
69
|
withUploadPicture: boolean;
|
|
60
70
|
withUrlPicture: boolean;
|
|
71
|
+
withContextMenu: boolean;
|
|
61
72
|
};
|
|
62
73
|
};
|
|
63
74
|
type CanvasProps = {
|
|
64
75
|
shapesRef: React.RefObject<ShapeEntity[]>;
|
|
65
76
|
selectedShape: SelectionType | undefined;
|
|
77
|
+
copiedShape: SelectionType | undefined;
|
|
78
|
+
setCopiedShape: React.Dispatch<React.SetStateAction<SelectionType | undefined>>;
|
|
79
|
+
pasteShapes: (shapes: ShapeEntity[]) => void;
|
|
66
80
|
selectionFrame: {
|
|
67
81
|
oldSelection: SelectionType | undefined;
|
|
68
82
|
frame: [Point, Point];
|
|
@@ -78,7 +92,7 @@ type CanvasProps = {
|
|
|
78
92
|
refreshHoveredShape: (e: MouseEvent | TouchEvent, ctx: CanvasRenderingContext2D, cursorPosition: Point, isInsideMask: boolean) => void;
|
|
79
93
|
removeShape: (shapes: ShapeEntity[]) => void;
|
|
80
94
|
updateShape: (updatedShapes: ShapeEntity[], withSave?: boolean) => void;
|
|
81
|
-
duplicateShapes: (shapesToDuplicate: ShapeEntity[]) => void;
|
|
95
|
+
duplicateShapes: (shapesToDuplicate: ShapeEntity[], translate?: boolean, selectNewOnes?: boolean) => void;
|
|
82
96
|
backwardShape: () => void;
|
|
83
97
|
forwardShape: () => void;
|
|
84
98
|
saveShapes: () => void;
|
|
@@ -90,6 +104,7 @@ type CanvasProps = {
|
|
|
90
104
|
width: number;
|
|
91
105
|
height: number;
|
|
92
106
|
selectShapes: (shapes: ShapeEntity[]) => void;
|
|
107
|
+
selectAllShapes: () => void;
|
|
93
108
|
activeTool: ToolsType;
|
|
94
109
|
setActiveTool: React.Dispatch<React.SetStateAction<ToolsType>>;
|
|
95
110
|
isEditMode: boolean;
|
|
@@ -101,6 +116,7 @@ type CanvasProps = {
|
|
|
101
116
|
isInsideComponent: boolean;
|
|
102
117
|
isInsideCanvas: boolean;
|
|
103
118
|
canvas: {
|
|
119
|
+
withContextMenu: boolean;
|
|
104
120
|
withSkeleton: boolean;
|
|
105
121
|
withFrameSelection: boolean;
|
|
106
122
|
canGrow: boolean;
|
|
@@ -16,9 +16,10 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
16
16
|
} | undefined>>;
|
|
17
17
|
refreshSelectedShapes: (ctx: CanvasRenderingContext2D, cursorPosition: Point) => void;
|
|
18
18
|
addShapes: (newShapes: ShapeEntity[]) => void;
|
|
19
|
-
duplicateShapes: (shapesToDuplicate: ShapeEntity[]) => void;
|
|
19
|
+
duplicateShapes: (shapesToDuplicate: ShapeEntity[], translate?: boolean, selectNewOnes?: boolean) => void;
|
|
20
20
|
addPictureShape: (fileOrUrl: File | string, maxWidth?: number, maxHeight?: number) => Promise<ShapeEntity>;
|
|
21
|
-
|
|
21
|
+
swapShapes: (startPositionShapeId: string, endPositionShapeId: string) => void;
|
|
22
|
+
moveShapes: (shapes: ShapeEntity[], action: "first" | "last" | "forward" | "backward") => void;
|
|
22
23
|
saveShapes: () => void;
|
|
23
24
|
setSelectedShape: React.Dispatch<React.SetStateAction<SelectionType | undefined>>;
|
|
24
25
|
refreshHoveredShape: (e: MouseEvent | TouchEvent, ctx: CanvasRenderingContext2D, cursorPosition: Point, isInsideMask: boolean) => void;
|
|
@@ -26,6 +27,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
26
27
|
toggleShapeLock: (shapeGroup: ShapeEntity[]) => void;
|
|
27
28
|
removeShape: (shapes: ShapeEntity[]) => void;
|
|
28
29
|
updateShape: (updatedShapes: ShapeEntity[], withSave?: boolean) => void;
|
|
30
|
+
transformShape: (shapes: ShapeEntity[], center: Point, action: "flipHorizontally" | "flipVertically" | "rotateClockwise" | "rotateCounterclockwise") => void;
|
|
29
31
|
backwardShape: () => void;
|
|
30
32
|
forwardShape: () => void;
|
|
31
33
|
clearShapes: (shapesToInit: ShapeEntity[], options: {
|
|
@@ -35,5 +37,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
35
37
|
canGoBackward: boolean;
|
|
36
38
|
canGoForward: boolean;
|
|
37
39
|
canClear: boolean;
|
|
40
|
+
copiedShape: SelectionType | undefined;
|
|
41
|
+
setCopiedShape: React.Dispatch<React.SetStateAction<SelectionType | undefined>>;
|
|
38
42
|
};
|
|
39
43
|
export default useShapes;
|
|
@@ -21,7 +21,7 @@ export declare const decodeImportedData: (shapesForJson: ExportedDrawableShape[]
|
|
|
21
21
|
center: Point;
|
|
22
22
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
23
23
|
};
|
|
24
|
-
path
|
|
24
|
+
path: Path2D;
|
|
25
25
|
} & {
|
|
26
26
|
rotation?: number;
|
|
27
27
|
toolId?: string;
|
|
@@ -44,7 +44,7 @@ export declare const decodeImportedData: (shapesForJson: ExportedDrawableShape[]
|
|
|
44
44
|
center: Point;
|
|
45
45
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
46
46
|
};
|
|
47
|
-
path
|
|
47
|
+
path: Path2D;
|
|
48
48
|
} & {
|
|
49
49
|
rotation?: number;
|
|
50
50
|
toolId?: string;
|
|
@@ -72,7 +72,7 @@ export declare const decodeImportedData: (shapesForJson: ExportedDrawableShape[]
|
|
|
72
72
|
center: Point;
|
|
73
73
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
74
74
|
};
|
|
75
|
-
path
|
|
75
|
+
path: Path2D;
|
|
76
76
|
} & {
|
|
77
77
|
rotation?: number;
|
|
78
78
|
toolId?: string;
|
|
@@ -100,7 +100,7 @@ export declare const decodeImportedData: (shapesForJson: ExportedDrawableShape[]
|
|
|
100
100
|
center: Point;
|
|
101
101
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
102
102
|
};
|
|
103
|
-
path
|
|
103
|
+
path: Path2D;
|
|
104
104
|
} & {
|
|
105
105
|
rotation?: number;
|
|
106
106
|
toolId?: string;
|
|
@@ -122,7 +122,7 @@ export declare const decodeImportedData: (shapesForJson: ExportedDrawableShape[]
|
|
|
122
122
|
center: Point;
|
|
123
123
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
124
124
|
};
|
|
125
|
-
path
|
|
125
|
+
path: Path2D;
|
|
126
126
|
} & {
|
|
127
127
|
rotation?: number;
|
|
128
128
|
toolId?: string;
|
|
@@ -144,7 +144,7 @@ export declare const decodeImportedData: (shapesForJson: ExportedDrawableShape[]
|
|
|
144
144
|
center: Point;
|
|
145
145
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
146
146
|
};
|
|
147
|
-
path
|
|
147
|
+
path: Path2D;
|
|
148
148
|
} & {
|
|
149
149
|
rotation?: number;
|
|
150
150
|
toolId?: string;
|
|
@@ -166,7 +166,7 @@ export declare const decodeImportedData: (shapesForJson: ExportedDrawableShape[]
|
|
|
166
166
|
center: Point;
|
|
167
167
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
168
168
|
};
|
|
169
|
-
path
|
|
169
|
+
path: Path2D;
|
|
170
170
|
} & {
|
|
171
171
|
rotation?: number;
|
|
172
172
|
toolId?: string;
|
|
@@ -188,7 +188,7 @@ export declare const decodeImportedData: (shapesForJson: ExportedDrawableShape[]
|
|
|
188
188
|
center: Point;
|
|
189
189
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
190
190
|
};
|
|
191
|
-
path
|
|
191
|
+
path: Path2D;
|
|
192
192
|
} & {
|
|
193
193
|
rotation?: number;
|
|
194
194
|
toolId?: string;
|
|
@@ -210,7 +210,7 @@ export declare const decodeImportedData: (shapesForJson: ExportedDrawableShape[]
|
|
|
210
210
|
center: Point;
|
|
211
211
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
212
212
|
};
|
|
213
|
-
path
|
|
213
|
+
path: Path2D;
|
|
214
214
|
} & {
|
|
215
215
|
rotation?: number;
|
|
216
216
|
toolId?: string;
|
|
@@ -232,7 +232,7 @@ export declare const decodeImportedData: (shapesForJson: ExportedDrawableShape[]
|
|
|
232
232
|
center: Point;
|
|
233
233
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
234
234
|
};
|
|
235
|
-
path
|
|
235
|
+
path: Path2D;
|
|
236
236
|
} & {
|
|
237
237
|
rotation?: number;
|
|
238
238
|
toolId?: string;
|
|
@@ -256,7 +256,7 @@ export declare const decodeImportedData: (shapesForJson: ExportedDrawableShape[]
|
|
|
256
256
|
center: Point;
|
|
257
257
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
258
258
|
};
|
|
259
|
-
path
|
|
259
|
+
path: Path2D;
|
|
260
260
|
} & {
|
|
261
261
|
rotation?: number;
|
|
262
262
|
toolId?: string;
|
|
@@ -11,7 +11,7 @@ export declare const getCursorPositionInTransformedCanvas: (e: MouseEvent | Touc
|
|
|
11
11
|
export declare const isTouchGesture: (e: MouseEvent | TouchEvent) => e is TouchEvent;
|
|
12
12
|
export declare const getPointPositionAfterCanvasTransformation: (point: Point, shapeRotation: number, [originX, originY]: Point) => Point;
|
|
13
13
|
export declare const getPointPositionBeforeCanvasTransformation: (point: Point, shapeRotation: number, [originX, originY]: Point) => Point;
|
|
14
|
-
export declare const checkSelectionIntersection: (ctx: CanvasRenderingContext2D,
|
|
14
|
+
export declare const checkSelectionIntersection: (ctx: CanvasRenderingContext2D, selection: SelectionType, position: Point, settings: UtilsSettings, checkAnchors?: boolean, radius?: number) => false | HoverModeData;
|
|
15
15
|
export declare const checkPolygonLinesSelectionIntersection: (ctx: CanvasRenderingContext2D, shape: ShapeEntity<"polygon" | "curve">, position: Point, settings: UtilsSettings, radius?: number) => false | {
|
|
16
16
|
lineIndex: number;
|
|
17
17
|
};
|
|
@@ -3,7 +3,7 @@ import type { HoverModeData, SelectionModeData } from './../../common/types/Mode
|
|
|
3
3
|
import type { Point, SelectionType, ShapeEntity } from './../../common/types/Shapes';
|
|
4
4
|
import type { CustomTool } from './../../common/types/tools';
|
|
5
5
|
export declare const getNewSelectionData: (hoverMode: HoverModeData, selectedShape: SelectionType, cursorPosition: Point) => SelectionModeData<Point | number> | undefined;
|
|
6
|
-
export declare const selectShape: (ctx: CanvasRenderingContext2D, shapes: ShapeEntity[], cursorPosition: Point, settings: UtilsSettings, selectedShape: SelectionType | undefined, isTouchGesture: boolean, withFrameSelection: boolean,
|
|
6
|
+
export declare const selectShape: (ctx: CanvasRenderingContext2D, shapes: ShapeEntity[], cursorPosition: Point, settings: UtilsSettings, selectedShape: SelectionType | undefined, isTouchGesture: boolean, withFrameSelection: boolean, behavior?: "add" | "remove" | "replace") => {
|
|
7
7
|
mode: SelectionModeData<Point | number>;
|
|
8
8
|
shape: SelectionType | undefined;
|
|
9
9
|
};
|
|
@@ -20,3 +20,4 @@ export declare const resizeCurve: (cursorPosition: Point, originalShape: ShapeEn
|
|
|
20
20
|
export declare const drawCurve: (ctx: CanvasRenderingContext2D, curve: ShapeEntity<"curve">) => void;
|
|
21
21
|
export declare const addCurveLine: (shape: ShapeEntity<"curve">, lineIndex: number, cursorPosition: Point, settings: UtilsSettings) => ShapeEntity<"curve">;
|
|
22
22
|
export declare const addCurvePoint: (shape: ShapeEntity<"curve">, cursorPosition: Point, settings: UtilsSettings, temporary?: boolean) => ShapeEntity<"curve">;
|
|
23
|
+
export declare const removeCurvePoint: (shape: ShapeEntity<"curve">, pointIndex: number, settings: UtilsSettings) => ShapeEntity<"curve">;
|
|
@@ -4,7 +4,7 @@ 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;
|
|
6
6
|
export declare const createLinePath: (line: Line) => Path2D;
|
|
7
|
-
export declare const createBrushPath: (brush: DrawableShape<"brush">, { brushAlgo }: UtilsSettings) => Path2D
|
|
7
|
+
export declare const createBrushPath: (brush: DrawableShape<"brush">, { brushAlgo }: UtilsSettings) => Path2D;
|
|
8
8
|
/** Bounding box of a cubic Bezier segment B(t) = (1-t)³P0 + 3(1-t)²t P1 + 3(1-t)t² P2 + t³ P3 */
|
|
9
9
|
export declare const getCubicBezierBounds: (p0: Point, p1: Point, p2: Point, p3: Point) => {
|
|
10
10
|
minX: number;
|
|
@@ -17,8 +17,8 @@ export declare const catmullRomToBezier: (p0: Point, p1: Point, p2: Point, p3: P
|
|
|
17
17
|
cp1: Point;
|
|
18
18
|
cp2: Point;
|
|
19
19
|
};
|
|
20
|
-
export declare const createCurvePath: (curve: DrawableShape<"curve">) => Path2D
|
|
21
|
-
export declare const createPolygonPath: (polygon: DrawableShape<"polygon"> | DrawableShape<"curve">) => Path2D
|
|
20
|
+
export declare const createCurvePath: (curve: DrawableShape<"curve">) => Path2D;
|
|
21
|
+
export declare const createPolygonPath: (polygon: DrawableShape<"polygon"> | DrawableShape<"curve">) => Path2D;
|
|
22
22
|
export declare const createTrianglePath: (triangle: DrawableShape<"triangle">) => Path2D;
|
|
23
23
|
export declare const getComputedShapeInfos: <T extends DrawableShape, U extends Pick<UtilsSettings, "selectionPadding">>(shape: T, getBorder: (shape: T, settings: U) => Rect, settings: U, getOuterBorder?: (shape: T, borders: Rect, settings: U) => Rect) => {
|
|
24
24
|
borders: Rect;
|
|
@@ -21,3 +21,4 @@ export declare const getPolygonBorder: (polygon: Polygon, settings: Pick<UtilsSe
|
|
|
21
21
|
export declare const resizePolygon: (cursorPosition: Point, originalShape: ShapeEntity<"polygon">, selectionMode: SelectionModeResize<number>, settings: UtilsSettings) => ShapeEntity<"polygon">;
|
|
22
22
|
export declare const addPolygonLine: (shape: ShapeEntity<"polygon">, lineIndex: number, cursorPosition: Point, settings: UtilsSettings) => ShapeEntity<"polygon">;
|
|
23
23
|
export declare const addPolygonPoint: (shape: ShapeEntity<"polygon">, cursorPosition: Point, settings: UtilsSettings, temporary?: boolean) => ShapeEntity<"polygon">;
|
|
24
|
+
export declare const removePolygonPoint: (shape: ShapeEntity<"polygon">, pointIndex: number, settings: UtilsSettings) => ShapeEntity<"polygon">;
|
|
@@ -19,22 +19,31 @@ export type SelectionModeResize<AnchorType extends Point | number = Point> = {
|
|
|
19
19
|
mode: 'resize';
|
|
20
20
|
cursorStartPosition: Point;
|
|
21
21
|
originalShape: SelectionType;
|
|
22
|
+
selectedShapesLengthAtMouseDown: number;
|
|
22
23
|
anchor: AnchorType;
|
|
23
24
|
};
|
|
24
25
|
export type SelectionModeRotate = {
|
|
25
26
|
mode: 'rotate';
|
|
26
27
|
cursorStartPosition: Point;
|
|
27
28
|
originalShape: SelectionType;
|
|
29
|
+
selectedShapesLengthAtMouseDown: number;
|
|
28
30
|
center: Point;
|
|
29
31
|
};
|
|
30
32
|
export type SelectionModeTranslate = {
|
|
31
33
|
mode: 'translate';
|
|
32
34
|
cursorStartPosition: Point;
|
|
33
35
|
originalShape: SelectionType;
|
|
36
|
+
selectedShapesLengthAtMouseDown: number;
|
|
34
37
|
hasBeenDuplicated: boolean;
|
|
35
38
|
dateStart: number;
|
|
36
39
|
};
|
|
37
|
-
export type
|
|
40
|
+
export type SelectionModeContextMenu<AnchorType extends Point | number = Point> = {
|
|
41
|
+
mode: 'contextMenu';
|
|
42
|
+
cursorStartPosition: Point;
|
|
43
|
+
originalShape: SelectionType | undefined;
|
|
44
|
+
anchor: AnchorType | undefined;
|
|
45
|
+
};
|
|
46
|
+
export type SelectionModeData<AnchorType extends Point | number> = SelectionModeDefault | SelectionModeSelectionFrame | SelectionModeBrush | SelectionModeResize<AnchorType> | SelectionModeRotate | SelectionModeTranslate | SelectionModeEditText | SelectionModePreview | SelectionModeContextMenu<AnchorType>;
|
|
38
47
|
export type HoverModeData = {
|
|
39
48
|
outOfView?: boolean;
|
|
40
49
|
} & ({
|
|
@@ -56,12 +56,14 @@ export type StyleShape = {
|
|
|
56
56
|
fontBold?: boolean;
|
|
57
57
|
};
|
|
58
58
|
export type SelectionDefaultType = {
|
|
59
|
+
type: 'rect';
|
|
59
60
|
border: Path2D;
|
|
60
61
|
line: Path2D | undefined;
|
|
61
62
|
shapePath: Path2D | undefined;
|
|
62
63
|
anchors: Path2D[];
|
|
63
64
|
};
|
|
64
65
|
export type SelectionLinesType = {
|
|
66
|
+
type: 'line';
|
|
65
67
|
border: Path2D;
|
|
66
68
|
shapePath: Path2D | undefined;
|
|
67
69
|
anchors: Path2D[];
|
|
@@ -128,7 +130,7 @@ export type ShapeEntity<T extends Exclude<ShapeType, 'triangle'> = Exclude<Shape
|
|
|
128
130
|
center: Point;
|
|
129
131
|
boundingBox: Rect;
|
|
130
132
|
};
|
|
131
|
-
path
|
|
133
|
+
path: Path2D;
|
|
132
134
|
} & DrawableShape<T> & ({
|
|
133
135
|
type: 'line';
|
|
134
136
|
selection?: SelectionLinesType | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import './Menu.css';
|
|
2
|
+
type MenuType = {
|
|
3
|
+
alignment?: 'left' | 'center' | 'right' | undefined;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
position?: 'top' | 'bottom' | 'left' | 'right' | undefined;
|
|
8
|
+
};
|
|
9
|
+
declare const Menu: ({ alignment, children, className, style, position }: MenuType) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default Menu;
|
|
@@ -4,11 +4,11 @@ import type { CSSProperties } from 'react';
|
|
|
4
4
|
type PanelType = {
|
|
5
5
|
vertical?: boolean;
|
|
6
6
|
children: React.ReactNode;
|
|
7
|
-
style?: CSSProperties;
|
|
7
|
+
style?: CSSProperties | undefined;
|
|
8
8
|
title?: string;
|
|
9
|
-
className?: string;
|
|
9
|
+
className?: string | undefined;
|
|
10
10
|
fitContainer?: boolean;
|
|
11
|
-
position?: 'bottom' | 'top';
|
|
11
|
+
position?: 'bottom' | 'top' | 'left' | 'right' | undefined;
|
|
12
12
|
alignment?: 'left' | 'right' | 'center' | undefined;
|
|
13
13
|
};
|
|
14
14
|
declare const Panel: ({ children, title, className, position, fitContainer, alignment, style, ...props }: PanelType) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -12,8 +12,8 @@ type LayoutsType = {
|
|
|
12
12
|
toggleShapeLock: (shape: ShapeEntity[]) => void;
|
|
13
13
|
selectedShapes: SelectionType | undefined;
|
|
14
14
|
selectShapes: (shapes: ShapeEntity[]) => void;
|
|
15
|
-
|
|
15
|
+
swapShapes: (startPositionShapeId: string, endPositionShapeId: string) => void;
|
|
16
16
|
isLayoutPanelShown: boolean;
|
|
17
17
|
};
|
|
18
|
-
declare const Layouts: ({ gridFormat, setGridFormat, settings, shapes, removeShape, toggleShapeVisibility, toggleShapeLock, selectedShapes,
|
|
18
|
+
declare const Layouts: ({ gridFormat, setGridFormat, settings, shapes, removeShape, toggleShapeVisibility, toggleShapeLock, selectedShapes, swapShapes, selectShapes, isLayoutPanelShown }: LayoutsType) => import("react/jsx-runtime").JSX.Element | null;
|
|
19
19
|
export default Layouts;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { UtilsSettings } from './../../../canvas/constants/app';
|
|
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
|
+
toggleShapeVisibility: (shapes: ShapeEntity[]) => void;
|
|
12
|
+
toggleShapeLock: (shapes: ShapeEntity[]) => void;
|
|
13
|
+
removeShape: (shapes: ShapeEntity[]) => void;
|
|
14
|
+
duplicateShapes: (shapesToDuplicate: ShapeEntity[], translate?: boolean, selectNewOnes?: boolean) => void;
|
|
15
|
+
setCopiedShape: (shape: React.SetStateAction<SelectionType | undefined>) => void;
|
|
16
|
+
copiedShape: SelectionType | undefined;
|
|
17
|
+
pasteShapes: (shapes: ShapeEntity[]) => void;
|
|
18
|
+
moveShapes: (shapes: ShapeEntity[], action: 'first' | 'last' | 'forward' | 'backward') => void;
|
|
19
|
+
removeShapePoint: (shape: ShapeEntity<'curve' | 'polygon'>, pointIndex: number) => void;
|
|
20
|
+
transformShape: (shapes: ShapeEntity[], center: Point, action: 'flipHorizontally' | 'flipVertically' | 'rotateClockwise' | 'rotateCounterclockwise') => void;
|
|
21
|
+
};
|
|
22
|
+
declare const ContextMenu: ({ moveShapes, selectAllShapes, selectionMode, transformShape, settings, canvasRef, closeContextMenu, toggleShapeVisibility, toggleShapeLock, removeShape, duplicateShapes, copiedShape, setCopiedShape, pasteShapes, removeShapePoint }: ContextMenuType) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default ContextMenu;
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import type { ShapeType } from './../../../common/types/Shapes';
|
|
2
1
|
import type { ToolsType } from './../../../common/types/tools';
|
|
3
2
|
import './MenuGroup.css';
|
|
4
3
|
type MenuGroupType = {
|
|
5
4
|
activeTool: ToolsType;
|
|
6
5
|
withActionsInMenu: boolean;
|
|
7
|
-
group: {
|
|
8
|
-
tools?: ShapeType[];
|
|
9
|
-
title: string;
|
|
10
|
-
img: string;
|
|
11
|
-
};
|
|
12
6
|
vertical?: boolean;
|
|
13
|
-
alignment?: 'left' | 'center' | 'right';
|
|
14
7
|
title?: string;
|
|
15
8
|
disabled?: boolean;
|
|
16
9
|
img?: string;
|
|
@@ -30,5 +23,5 @@ type MenuGroupType = {
|
|
|
30
23
|
redoAction: () => void;
|
|
31
24
|
clearCanvas: () => void;
|
|
32
25
|
};
|
|
33
|
-
declare const MenuGroup: ({ activeTool, withActionsInMenu, hasActionToUndo, hasActionToRedo, hasActionToClear, undoAction, redoAction, clearCanvas,
|
|
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;
|
|
34
27
|
export default MenuGroup;
|
|
@@ -7,11 +7,8 @@ type ToolbarGroupType = {
|
|
|
7
7
|
toolsType: CustomTool[];
|
|
8
8
|
vertical: boolean;
|
|
9
9
|
};
|
|
10
|
-
alignment?: 'left' | 'center' | 'right';
|
|
11
|
-
title?: string;
|
|
12
10
|
disabled?: boolean;
|
|
13
|
-
img?: string;
|
|
14
11
|
setActiveToolFromId: (id: string) => void;
|
|
15
12
|
};
|
|
16
|
-
declare const ToolbarGroup: ({ activeTool,
|
|
13
|
+
declare const ToolbarGroup: ({ activeTool, group, disabled, setActiveToolFromId }: ToolbarGroupType) => import("react/jsx-runtime").JSX.Element | null;
|
|
17
14
|
export default ToolbarGroup;
|
|
@@ -16,6 +16,7 @@ export declare const openFileIcon = "<svg><path d=\"M3.417 16.667Q2.729 16.667 2
|
|
|
16
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
17
|
export declare const textIcon = "<svg><path d=\"M8.708 16.667V5.917H4.167V3.333H15.833V5.917H11.292V16.667Z\"/></svg>";
|
|
18
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>";
|
|
19
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>";
|
|
20
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>";
|
|
21
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>";
|
|
@@ -7,9 +7,9 @@ type useDragType = {
|
|
|
7
7
|
layoutDragging: string | undefined;
|
|
8
8
|
setLayoutDragging: (shapeId: string | undefined) => void;
|
|
9
9
|
handleSelect: (shape: ShapeEntity[]) => void;
|
|
10
|
-
|
|
10
|
+
onSwapShapes: (firstShapeId: string, lastShapeId: string) => void;
|
|
11
11
|
};
|
|
12
|
-
declare const useDrag: ({ disabled, ref, shape, layoutDragging, setLayoutDragging, handleSelect,
|
|
12
|
+
declare const useDrag: ({ disabled, ref, shape, layoutDragging, setLayoutDragging, handleSelect, onSwapShapes }: useDragType) => {
|
|
13
13
|
isOver: boolean;
|
|
14
14
|
};
|
|
15
15
|
export default useDrag;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type UseMenuProps = {
|
|
2
|
+
trigger?: 'click' | 'hover';
|
|
3
|
+
buttonElt: HTMLElement | null;
|
|
4
|
+
};
|
|
5
|
+
declare const useMenu: ({ trigger, buttonElt }: UseMenuProps) => {
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
trigger: "click" | "hover";
|
|
8
|
+
closeMenu: () => void;
|
|
9
|
+
};
|
|
10
|
+
export default useMenu;
|
package/dist/react-paint.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.react-paint-canvas-box{flex:1;justify-content:center;align-items:center;display:flex}.react-paint-canvas-container{background-color:var(--react-paint-app-canvas-bg);cursor:var(--react-paint-canvas-cursor);background-repeat:repeat;background-size:16px;display:grid;position:relative;overflow:hidden}.react-paint-canvas-container[data-grow=true]{width:100%;height:100%}.react-paint-canvas-drawcanvas{-webkit-user-select:none;user-select:none;touch-action:none;grid-area:1/1;max-width:100%;display:block;position:relative}.react-paint-canvas-drawcanvas:focus:not(:focus-visible){outline:none}.react-paint-canvas-drawcanvas[data-grow=true]{width:100%}.react-paint-canvas-selectioncanvas{-webkit-user-select:none;user-select:none;pointer-events:none;touch-action:none;grid-area:1/1;max-width:100%;display:block;position:relative}.react-paint-canvas-selectioncanvas[data-grow=true]{width:100%}.react-paint-editor-toolbox-edittextbox{transform-origin:0 0;box-sizing:border-box;transform:var(--react-paint-editor-toolbox-edittextbox-transform);color:var(--react-paint-editor-toolbox-edittextbox-color);padding:var(--react-paint-editor-toolbox-edittextbox-padding);line-height:1;font-size:var(--react-paint-editor-toolbox-edittextbox-fontsize);font-family:var(--react-paint-editor-toolbox-edittextbox-fontfamily);opacity:var(--react-paint-editor-toolbox-edittextbox-opacity);background:0 0;outline:none;width:max-content;display:inline-block;position:absolute;top:0;left:0}.react-paint-editor-toolbox-edittextbox[data-fontbold=true]{font-weight:700}.react-paint-editor-toolbox-edittextbox[data-fontitalic=true]{font-style:italic}.react-paint-app-row{max-width:100%;aspect-ratio:var(--react-paint-app-row-aspectratio);width:100%;position:relative}.react-paint-app-row[data-grow=false]{max-width:calc(var(--react-paint-app-canvaswidth) * 1px)}.react-paint-app-row[data-shrink=false]{min-width:calc(var(--react-paint-app-canvaswidth) * 1px)}.react-paint-editor-loading{z-index:var(--react-paint-editor-loading-zindex);transition:opacity var(--react-paint-editor-loading-transition-duration) linear;opacity:0;background:#00000050;justify-content:center;align-items:center;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}.react-paint-editor-loading[data-loading=visible]{opacity:1}@keyframes react-paint-editor-loading-rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.react-paint-editor-loader{width:40px;height:40px;animation:1s infinite react-paint-editor-loading-rotation;position:relative;transform:rotate(10deg)}.react-paint-editor-loader>div{border-radius:50%;width:15px;height:15px;position:absolute}.react-paint-editor-loader>div:first-child{background-color:#5c6bc0;left:0}.react-paint-editor-loader>div:nth-child(2){background-color:#8bc34a;right:0}.react-paint-editor-loader>div:nth-child(3){background-color:#ffb74d;bottom:0}.react-paint-editor-loader>div:nth-child(4){background-color:#f44336;bottom:0;right:0}.react-paint-editor-snackbar-container{z-index:var(--react-paint-editor-snackbar-zindex);flex-direction:column-reverse;align-items:center;height:0;display:flex;position:absolute;bottom:0;left:0;right:0}.react-paint-editor-snackbar{color:#fff;overflow-wrap:break-word;box-sizing:border-box;max-width:calc(100% - 24px);transition:all var(--react-paint-editor-panel-transition-duration);opacity:0;margin:4px;padding:12px 48px;display:inline-block;transform:translateY(40px)}.react-paint-editor-snackbar[data-type=infos]{background:#646464}.react-paint-editor-snackbar[data-type=error]{background:#911717}.react-paint-editor-snackbar[data-type=success]{background:#088900}.react-paint-editor-snackbar[data-is-shown="1"]{opacity:1;transform:translate(0,0)}.react-paint-editor-snackbar[data-is-shown="0"]{opacity:0;transform:translateY(40px)}.react-paint-editor-button{vertical-align:middle;box-sizing:border-box;cursor:pointer;border-radius:var(--react-paint-editor-app-font-radius);min-width:32px;height:32px;color:var(--react-paint-editor-app-font-color);padding:var(--react-paint-editor-button-padding,0);background:0 0;border:none;justify-content:center;align-items:center;margin:2px 4px;font-size:14px;display:inline-flex}.react-paint-editor-button[data-selected="1"]{color:var(--react-paint-editor-app-font-selected-color);background:var(--react-paint-editor-app-font-selected-bg)}.react-paint-editor-button[data-hidden="1"]{visibility:hidden}.react-paint-editor-button[data-disabled="1"]{cursor:default;color:var(--react-paint-editor-app-font-disabled-color);background:var(--react-paint-editor-app-font-disabled-bg)}.react-paint-editor-button[data-selected="0"][data-disabled="0"]{background:var(--react-paint-editor-app-font-bg);color:var(--react-paint-editor-app-font-color)}.react-paint-editor-button[data-selected="0"][data-disabled="0"]:hover{color:var(--react-paint-editor-app-font-hover-color);background:var(--react-paint-editor-app-font-hover-bg)}.react-paint-editor-button[data-disabled="0"]{cursor:pointer}.react-paint-editor-button svg{fill:currentColor;width:20px;height:20px}.react-paint-editor-button input{display:none}.react-paint-editor-button-content{box-sizing:border-box;width:100%;padding:2px 6px;display:flex}.react-paint-editor-button-icon{align-items:center;display:flex}.react-paint-editor-button-children{text-align:left;flex:1;align-items:center;display:flex}.react-paint-editor-button-children+.react-paint-editor-button-icon{margin-left:12px}.react-paint-editor-panel{z-index:var(--react-paint-editor-panel-zindex);background:var(--react-paint-editor-app-toolbar-bg);white-space:nowrap;box-sizing:border-box;border-radius:8px;padding:8px;position:absolute;box-shadow:0 3px 8px #0000003d}.react-paint-editor-panel[data-alignment=left]{margin:4px;left:0}.react-paint-editor-panel[data-alignment=center]{margin:4px 0;left:50%;transform:translate(-50%)}.react-paint-editor-panel[data-alignment=right]{margin:4px;right:0}.react-paint-editor-panel[data-position=bottom]{bottom:100%}.react-paint-editor-panel[data-position=top]{top:100%}.react-paint-editor-panel[data-fitcontainer=true]{max-width:100%}.react-paint-editor-panel-title{margin-top:4px;margin-bottom:8px;font-size:18px}.react-paint-editor-layouts{background:var(--react-paint-editor-app-toolbar-bg);box-sizing:border-box;min-width:200px;display:inline-block;overflow-y:auto}.react-paint-editor-layouts-remove-button.react-paint-editor-layouts-remove-button{margin:2px 0}.react-paint-editor-layouts-remove-button.react-paint-editor-layouts-remove-button:not(:hover){opacity:.2}.react-paint-editor-layout{background:var(--react-paint-editor-app-toolbar-bg);box-sizing:border-box;border:3px solid #0000;justify-content:space-between;align-items:center;padding:4px 0;display:flex;position:relative}.react-paint-editor-layout[data-is-over="1"]{border:3px dotted var(--react-paint-editor-app-font-hover-bg)}.react-paint-editor-layout[data-is-dragging="1"]{opacity:.4}.react-paint-editor-layout[data-selected="1"]{color:var(--react-paint-editor-app-font-selected-color);background:var(--react-paint-editor-app-font-selected-bg)}.react-paint-editor-layout[data-selected="1"] .react-paint-editor-layouts-remove-button{color:#fff}.react-paint-editor-layout[data-selected="0"][data-disabled="0"]{background:var(--react-paint-editor-app-font-bg);color:var(--react-paint-editor-app-font-color)}.react-paint-editor-layout[data-selected="0"][data-disabled="0"]:hover{color:var(--react-paint-editor-app-font-hover-color);background:var(--react-paint-editor-app-font-hover-bg)}.react-paint-editor-layout[data-disabled="1"]{cursor:default;color:var(--react-paint-editor-app-font-disabled-color);background:var(--react-paint-editor-app-font-disabled-bg)}.react-paint-editor-layout[data-disabled="0"]{cursor:move}.react-paint-editor-layout>span{color:#8a8a8a;height:20px;line-height:1}.react-paint-editor-layout>span>svg{fill:#8a8a8a;width:20px;height:20px;padding:0 4px;transform:scale(.75)}.react-paint-editor-layouts-visible-button.react-paint-editor-layouts-visible-button{margin:2px 0}.react-paint-editor-layouts-visible-button.react-paint-editor-layouts-visible-button[data-visible=false]{opacity:.2}.react-paint-editor-layouts-locked-button.react-paint-editor-layouts-locked-button{margin:2px 0}.react-paint-editor-layouts-locked-button.react-paint-editor-layouts-locked-button[data-locked=false]{opacity:.2}.react-paint-editor-layouts-grid-button.react-paint-editor-layouts-grid-button span{justify-content:center}.react-paint-editor-layouts-subtitle{min-width:60px;font-weight:700}.react-paint-editor-layouts-separator{flex:1}.react-paint-editor-layouts-panel.react-paint-editor-layouts-panel.react-paint-editor-layouts-panel{bottom:36px;top:unset}.react-paint-editor-layouts-panel.react-paint-editor-layouts-panel.react-paint-editor-layouts-panel[data-edit="0"]{bottom:0;top:unset}.react-paint-editor-layouts-panel-content{flex-direction:column;max-height:100%;display:flex}.react-paint-editor-layouts-scrolling-content{flex-direction:column;display:flex;overflow-y:auto}.react-paint-editor-layouts-row{align-items:center;display:flex}.react-paint-editor-layouts-placeholder{opacity:.6;text-align:center;padding:12px 0}.react-paint-editor-modal{z-index:var(--react-paint-editor-modal-zindex);justify-content:center;align-items:center;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}.react-paint-editor-modal[data-position=center]{align-items:center}.react-paint-editor-modal[data-position=bottom]{align-items:end}.react-paint-editor-modal-panel{background:var(--react-paint-editor-app-toolbar-bg);white-space:nowrap;border-radius:8px;padding:4px;display:grid;position:relative;box-shadow:0 3px 8px #0000003d}.react-paint-editor-modal-mask{background:#00000073;position:absolute;top:0;bottom:0;left:0;right:0}.react-paint-editor-colorfield-color{box-sizing:border-box;border-radius:50%;width:20px;height:20px}.react-paint-editor-colorfield-color[data-mode=fill]{background:var(--react-paint-editor-colorfield-color-value);border:1px solid #80808038}.react-paint-editor-colorfield-color[data-mode=stroke]{border:4px solid #80808038}.react-paint-editor-colorfield-color[data-mode=stroke]:after{content:"";border:2px solid var(--react-paint-editor-colorfield-color-value);box-sizing:border-box;border-radius:100%;width:18px;height:18px;display:block;position:relative;top:-3px;left:-3px}.react-paint-editor-colorfield-wrapper{flex-wrap:wrap;display:flex}.react-paint-editor-colorfield-customcolor{box-sizing:border-box;width:20px;height:20px;color:var(--react-paint-editor-colorfield-color-value);border-radius:50%;justify-content:center;align-items:baseline;font-weight:700;display:flex}.react-paint-editor-fontfamily-option{font-family:var(--react-paint-editor-fontfamily-family)}.react-paint-editor-selectfield-wrapper{flex-wrap:wrap;display:flex}.react-paint-editor-layout-opened .react-paint-editor-layout-button.react-paint-editor-layout-button.react-paint-editor-layout-button{color:var(--react-paint-editor-app-font-selected-color);background:var(--react-paint-editor-app-font-selected-bg)}.react-paint-editor-linearrow-left{border-top:5px solid #0000;border-bottom:5px solid #0000;border-right:15px solid;width:0;height:0;display:inline-block;position:absolute;top:50%;left:0;transform:translate(-25%,-50%)}.react-paint-editor-linearrow-right{border-top:5px solid #0000;border-bottom:5px solid #0000;border-left:15px solid;width:0;height:0;display:inline-block;position:absolute;top:50%;right:0;transform:translate(25%,-50%)}.react-paint-editor-linearrow-option{vertical-align:middle;background:currentColor;width:60px;height:2px;display:inline-block;position:relative}.react-paint-editor-linearrow-option[data-type="0"] .react-paint-editor-linearrow-left,.react-paint-editor-linearrow-option[data-type="1"] .react-paint-editor-linearrow-left,.react-paint-editor-linearrow-option[data-type="0"] .react-paint-editor-linearrow-right,.react-paint-editor-linearrow-option[data-type="2"] .react-paint-editor-linearrow-right{display:none}.react-paint-editor-linetype-option{display:inline-block}.react-paint-editor-linetype-option>span{vertical-align:middle;background:0 0;width:6px;height:2px;display:inline-block}.react-paint-editor-linetype-option[data-type="0"]>span{background:currentColor}.react-paint-editor-linetype-option[data-type="2"]{position:relative;left:3px}.react-paint-editor-linetype-option[data-type="2"]>span:nth-child(3n-1){background:currentColor;width:12px}.react-paint-editor-linetype-option[data-type="2"]>span:nth-child(n+11){display:none}.react-paint-editor-linetype-option[data-type="1"]>span:nth-child(odd){background:currentColor}.react-paint-editor-rangefield{flex-wrap:wrap;align-items:center;max-width:100%;display:inline-flex}.react-paint-editor-rangefield [data-indeterminate="1"]{opacity:.25}.react-paint-editor-settings-bar{-webkit-user-select:none;user-select:none;background:var(--react-paint-editor-app-toolbar-bg);border-top:1px solid var(--react-paint-editor-app-divider-color);box-sizing:border-box;height:36px;display:flex;position:relative}.react-paint-editor-settings-shrinkable{text-align:left;flex:1;height:100%;display:flex;position:relative}.react-paint-editor-settings-modal{grid-template-columns:repeat(auto-fill,40px);width:100%}.react-paint-editor-zoom-button{margin:0}.react-paint-editor-zoom-button .react-paint-editor-button-children{justify-content:center}.react-paint-editor-zoom-button-value{min-width:60px}.react-paint-editor-bar-zoom-button-opened.react-paint-editor-bar-zoom-button-opened.react-paint-editor-bar-zoom-button-opened.react-paint-editor-bar-zoom-button-opened{color:var(--react-paint-editor-app-font-selected-color);background:var(--react-paint-editor-app-font-selected-bg)}.react-paint-editor-toolbox-panel-content{display:flex}.react-paint-editor-toolbox-panel-content[data-vertical="1"]{flex-direction:column}.react-paint-editor-toolbox-relative{display:inline-block;position:relative}.react-paint-editor-toolbox-pictureinput-modal form{grid-template-columns:3fr 1fr 1fr}.react-paint-editor-toolbox-pictureinput-modal form input{color:var(--react-paint-editor-app-font-color);border:1px solid var(--react-paint-editor-app-font-color);background:var(--react-paint-editor-app-toolbar-bg);outline:none}.react-paint-editor-toolbar-shrinkable{text-align:center;flex:1;height:100%;position:relative}.react-paint-editor-toolbar-toolbox{background:var(--react-paint-editor-app-toolbar-bg);border-bottom:1px solid var(--react-paint-editor-app-divider-color);box-sizing:border-box;max-height:36px;min-width:var(--react-paint-editor-toolbar-minwidth);display:flex}.react-paint-editor-toolbar-modal{grid-template-columns:1fr 1fr 1fr}.react-paint-editor-toolbox-export-modal h3{margin-top:8px;margin-bottom:0;font-size:18px}.react-paint-editor-toolbargroup-panel-content{display:flex}.react-paint-editor-toolbargroup-panel-content[data-vertical="1"]{flex-direction:column}.react-paint-editor-toolbargroup-relative{display:inline-block;position:relative}.react-paint-editor-app{color:var(--react-paint-editor-app-font-color);max-width:min(100%, var(--react-paint-editor-app-maxWidth));flex-direction:column;font-family:Arial,Helvetica,sans-serif;display:flex;position:relative}.react-paint-editor-app hr{border:none;border-top:1px solid var(--react-paint-editor-app-divider-color);width:100%}
|
|
1
|
+
.react-paint-canvas-box{flex:1;justify-content:center;align-items:center;display:flex}.react-paint-canvas-container{background-color:var(--react-paint-app-canvas-bg);cursor:var(--react-paint-canvas-cursor);background-repeat:repeat;background-size:16px;display:grid;position:relative;overflow:hidden}.react-paint-canvas-container[data-grow=true]{width:100%;height:100%}.react-paint-canvas-drawcanvas{-webkit-user-select:none;user-select:none;touch-action:none;grid-area:1/1;max-width:100%;display:block;position:relative}.react-paint-canvas-drawcanvas:focus:not(:focus-visible){outline:none}.react-paint-canvas-drawcanvas[data-grow=true]{width:100%}.react-paint-canvas-selectioncanvas{-webkit-user-select:none;user-select:none;pointer-events:none;touch-action:none;grid-area:1/1;max-width:100%;display:block;position:relative}.react-paint-canvas-selectioncanvas[data-grow=true]{width:100%}.react-paint-editor-toolbox-edittextbox{transform-origin:0 0;box-sizing:border-box;transform:var(--react-paint-editor-toolbox-edittextbox-transform);color:var(--react-paint-editor-toolbox-edittextbox-color);padding:var(--react-paint-editor-toolbox-edittextbox-padding);line-height:1;font-size:var(--react-paint-editor-toolbox-edittextbox-fontsize);font-family:var(--react-paint-editor-toolbox-edittextbox-fontfamily);opacity:var(--react-paint-editor-toolbox-edittextbox-opacity);background:0 0;outline:none;width:max-content;display:inline-block;position:absolute;top:0;left:0}.react-paint-editor-toolbox-edittextbox[data-fontbold=true]{font-weight:700}.react-paint-editor-toolbox-edittextbox[data-fontitalic=true]{font-style:italic}.react-paint-app-row{max-width:100%;aspect-ratio:var(--react-paint-app-row-aspectratio);width:100%;position:relative}.react-paint-app-row[data-grow=false]{max-width:calc(var(--react-paint-app-canvaswidth) * 1px)}.react-paint-app-row[data-shrink=false]{min-width:calc(var(--react-paint-app-canvaswidth) * 1px)}.react-paint-editor-loading{z-index:var(--react-paint-editor-loading-zindex);transition:opacity var(--react-paint-editor-loading-transition-duration) linear;opacity:0;background:#00000050;justify-content:center;align-items:center;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}.react-paint-editor-loading[data-loading=visible]{opacity:1}@keyframes react-paint-editor-loading-rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.react-paint-editor-loader{width:40px;height:40px;animation:1s infinite react-paint-editor-loading-rotation;position:relative;transform:rotate(10deg)}.react-paint-editor-loader>div{border-radius:50%;width:15px;height:15px;position:absolute}.react-paint-editor-loader>div:first-child{background-color:#5c6bc0;left:0}.react-paint-editor-loader>div:nth-child(2){background-color:#8bc34a;right:0}.react-paint-editor-loader>div:nth-child(3){background-color:#ffb74d;bottom:0}.react-paint-editor-loader>div:nth-child(4){background-color:#f44336;bottom:0;right:0}.react-paint-editor-snackbar-container{z-index:var(--react-paint-editor-snackbar-zindex);flex-direction:column-reverse;align-items:center;height:0;display:flex;position:absolute;bottom:0;left:0;right:0}.react-paint-editor-snackbar{color:#fff;overflow-wrap:break-word;box-sizing:border-box;max-width:calc(100% - 24px);transition:all var(--react-paint-editor-panel-transition-duration);opacity:0;margin:4px;padding:12px 48px;display:inline-block;transform:translateY(40px)}.react-paint-editor-snackbar[data-type=infos]{background:#646464}.react-paint-editor-snackbar[data-type=error]{background:#911717}.react-paint-editor-snackbar[data-type=success]{background:#088900}.react-paint-editor-snackbar[data-is-shown="1"]{opacity:1;transform:translate(0,0)}.react-paint-editor-snackbar[data-is-shown="0"]{opacity:0;transform:translateY(40px)}.react-paint-editor-button{vertical-align:middle;box-sizing:border-box;cursor:pointer;border-radius:var(--react-paint-editor-app-font-radius);min-width:32px;height:32px;color:var(--react-paint-editor-app-font-color);padding:var(--react-paint-editor-button-padding,0);-webkit-user-select:none;user-select:none;background:0 0;border:none;justify-content:center;align-items:center;margin:2px 4px;font-size:14px;display:inline-flex}.react-paint-editor-button[data-selected="1"]{color:var(--react-paint-editor-app-font-selected-color);background:var(--react-paint-editor-app-font-selected-bg)}.react-paint-editor-button[data-hidden="1"]{visibility:hidden}.react-paint-editor-button[data-disabled="1"]{cursor:default;color:var(--react-paint-editor-app-font-disabled-color);background:var(--react-paint-editor-app-font-disabled-bg)}.react-paint-editor-button[data-selected="0"][data-disabled="0"]{background:var(--react-paint-editor-app-font-bg);color:var(--react-paint-editor-app-font-color)}.react-paint-editor-button[data-selected="0"][data-disabled="0"]:hover{color:var(--react-paint-editor-app-font-hover-color);background:var(--react-paint-editor-app-font-hover-bg)}.react-paint-editor-button[data-disabled="0"]{cursor:pointer}.react-paint-editor-button svg{fill:currentColor;width:20px;height:20px}.react-paint-editor-button input{display:none}.react-paint-editor-button-content{box-sizing:border-box;width:100%;padding:2px 6px;display:flex}.react-paint-editor-button-icon{align-items:center;display:flex}.react-paint-editor-button-children{text-align:left;flex:1;align-items:center;display:flex}.react-paint-editor-button-children+.react-paint-editor-button-icon{margin-left:12px}.react-paint-editor-panel{z-index:var(--react-paint-editor-panel-zindex);background:var(--react-paint-editor-app-toolbar-bg);white-space:nowrap;box-sizing:border-box;border-radius:8px;padding:8px;position:absolute;box-shadow:0 3px 8px #0000003d}.react-paint-editor-panel[data-alignment=left]{margin:4px;left:0}.react-paint-editor-panel[data-alignment=center]{margin:4px 0;left:50%;transform:translate(-50%)}.react-paint-editor-panel[data-alignment=right]{margin:4px;right:0}.react-paint-editor-panel[data-position=bottom]{bottom:100%}.react-paint-editor-panel[data-position=right]{top:0;left:100%}.react-paint-editor-panel[data-position=left]{top:0;right:100%}.react-paint-editor-panel[data-position=top]{top:100%}.react-paint-editor-panel[data-fitcontainer=true]{max-width:100%}.react-paint-editor-panel-title{margin-top:4px;margin-bottom:8px;font-size:18px}.react-paint-editor-layouts{background:var(--react-paint-editor-app-toolbar-bg);box-sizing:border-box;min-width:200px;display:inline-block;overflow-y:auto}.react-paint-editor-layouts-remove-button.react-paint-editor-layouts-remove-button{margin:2px 0}.react-paint-editor-layouts-remove-button.react-paint-editor-layouts-remove-button:not(:hover){opacity:.2}.react-paint-editor-layout{background:var(--react-paint-editor-app-toolbar-bg);box-sizing:border-box;border:3px solid #0000;justify-content:space-between;align-items:center;padding:4px 0;display:flex;position:relative}.react-paint-editor-layout[data-is-over="1"]{border:3px dotted var(--react-paint-editor-app-font-hover-bg)}.react-paint-editor-layout[data-is-dragging="1"]{opacity:.4}.react-paint-editor-layout[data-selected="1"]{color:var(--react-paint-editor-app-font-selected-color);background:var(--react-paint-editor-app-font-selected-bg)}.react-paint-editor-layout[data-selected="1"] .react-paint-editor-layouts-remove-button{color:#fff}.react-paint-editor-layout[data-selected="0"][data-disabled="0"]{background:var(--react-paint-editor-app-font-bg);color:var(--react-paint-editor-app-font-color)}.react-paint-editor-layout[data-selected="0"][data-disabled="0"]:hover{color:var(--react-paint-editor-app-font-hover-color);background:var(--react-paint-editor-app-font-hover-bg)}.react-paint-editor-layout[data-disabled="1"]{cursor:default;color:var(--react-paint-editor-app-font-disabled-color);background:var(--react-paint-editor-app-font-disabled-bg)}.react-paint-editor-layout[data-disabled="0"]{cursor:move}.react-paint-editor-layout>span{color:#8a8a8a;height:20px;line-height:1}.react-paint-editor-layout>span>svg{fill:#8a8a8a;width:20px;height:20px;padding:0 4px;transform:scale(.75)}.react-paint-editor-layouts-visible-button.react-paint-editor-layouts-visible-button{margin:2px 0}.react-paint-editor-layouts-visible-button.react-paint-editor-layouts-visible-button[data-visible=false]{opacity:.2}.react-paint-editor-layouts-locked-button.react-paint-editor-layouts-locked-button{margin:2px 0}.react-paint-editor-layouts-locked-button.react-paint-editor-layouts-locked-button[data-locked=false]{opacity:.2}.react-paint-editor-layouts-grid-button.react-paint-editor-layouts-grid-button span{justify-content:center}.react-paint-editor-layouts-subtitle{min-width:60px;font-weight:700}.react-paint-editor-layouts-separator{flex:1}.react-paint-editor-layouts-panel.react-paint-editor-layouts-panel.react-paint-editor-layouts-panel{bottom:36px;top:unset}.react-paint-editor-layouts-panel.react-paint-editor-layouts-panel.react-paint-editor-layouts-panel[data-edit="0"]{bottom:0;top:unset}.react-paint-editor-layouts-panel-content{flex-direction:column;max-height:100%;display:flex}.react-paint-editor-layouts-scrolling-content{flex-direction:column;display:flex;overflow-y:auto}.react-paint-editor-layouts-row{align-items:center;display:flex}.react-paint-editor-layouts-placeholder{opacity:.6;text-align:center;padding:12px 0}.react-paint-editor-modal{z-index:var(--react-paint-editor-modal-zindex);justify-content:center;align-items:center;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}.react-paint-editor-modal[data-position=center]{align-items:center}.react-paint-editor-modal[data-position=bottom]{align-items:end}.react-paint-editor-modal-panel{background:var(--react-paint-editor-app-toolbar-bg);white-space:nowrap;border-radius:8px;padding:4px;display:grid;position:relative;box-shadow:0 3px 8px #0000003d}.react-paint-editor-modal-mask{background:#00000073;position:absolute;top:0;bottom:0;left:0;right:0}.react-paint-editor-colorfield-color{box-sizing:border-box;border-radius:50%;width:20px;height:20px}.react-paint-editor-colorfield-color[data-mode=fill]{background:var(--react-paint-editor-colorfield-color-value);border:1px solid #80808038}.react-paint-editor-colorfield-color[data-mode=stroke]{border:4px solid #80808038}.react-paint-editor-colorfield-color[data-mode=stroke]:after{content:"";border:2px solid var(--react-paint-editor-colorfield-color-value);box-sizing:border-box;border-radius:100%;width:18px;height:18px;display:block;position:relative;top:-3px;left:-3px}.react-paint-editor-colorfield-wrapper{flex-wrap:wrap;display:flex}.react-paint-editor-colorfield-customcolor{box-sizing:border-box;width:20px;height:20px;color:var(--react-paint-editor-colorfield-color-value);border-radius:50%;justify-content:center;align-items:baseline;font-weight:700;display:flex}.react-paint-editor-fontfamily-option{font-family:var(--react-paint-editor-fontfamily-family)}.react-paint-editor-selectfield-wrapper{flex-wrap:wrap;display:flex}.react-paint-editor-layout-opened .react-paint-editor-layout-button.react-paint-editor-layout-button.react-paint-editor-layout-button{color:var(--react-paint-editor-app-font-selected-color);background:var(--react-paint-editor-app-font-selected-bg)}.react-paint-editor-linearrow-left{border-top:5px solid #0000;border-bottom:5px solid #0000;border-right:15px solid;width:0;height:0;display:inline-block;position:absolute;top:50%;left:0;transform:translate(-25%,-50%)}.react-paint-editor-linearrow-right{border-top:5px solid #0000;border-bottom:5px solid #0000;border-left:15px solid;width:0;height:0;display:inline-block;position:absolute;top:50%;right:0;transform:translate(25%,-50%)}.react-paint-editor-linearrow-option{vertical-align:middle;background:currentColor;width:60px;height:2px;display:inline-block;position:relative}.react-paint-editor-linearrow-option[data-type="0"] .react-paint-editor-linearrow-left,.react-paint-editor-linearrow-option[data-type="1"] .react-paint-editor-linearrow-left,.react-paint-editor-linearrow-option[data-type="0"] .react-paint-editor-linearrow-right,.react-paint-editor-linearrow-option[data-type="2"] .react-paint-editor-linearrow-right{display:none}.react-paint-editor-linetype-option{display:inline-block}.react-paint-editor-linetype-option>span{vertical-align:middle;background:0 0;width:6px;height:2px;display:inline-block}.react-paint-editor-linetype-option[data-type="0"]>span{background:currentColor}.react-paint-editor-linetype-option[data-type="2"]{position:relative;left:3px}.react-paint-editor-linetype-option[data-type="2"]>span:nth-child(3n-1){background:currentColor;width:12px}.react-paint-editor-linetype-option[data-type="2"]>span:nth-child(n+11){display:none}.react-paint-editor-linetype-option[data-type="1"]>span:nth-child(odd){background:currentColor}.react-paint-editor-rangefield{flex-wrap:wrap;align-items:center;max-width:100%;display:inline-flex}.react-paint-editor-rangefield [data-indeterminate="1"]{opacity:.25}.react-paint-editor-settings-bar{-webkit-user-select:none;user-select:none;background:var(--react-paint-editor-app-toolbar-bg);border-top:1px solid var(--react-paint-editor-app-divider-color);box-sizing:border-box;height:36px;display:flex;position:relative}.react-paint-editor-settings-shrinkable{text-align:left;flex:1;height:100%;display:flex;position:relative}.react-paint-editor-settings-modal{grid-template-columns:repeat(auto-fill,40px);width:100%}.react-paint-editor-zoom-button{margin:0}.react-paint-editor-zoom-button .react-paint-editor-button-children{justify-content:center}.react-paint-editor-zoom-button-value{min-width:60px}.react-paint-editor-bar-zoom-button-opened.react-paint-editor-bar-zoom-button-opened.react-paint-editor-bar-zoom-button-opened.react-paint-editor-bar-zoom-button-opened{color:var(--react-paint-editor-app-font-selected-color);background:var(--react-paint-editor-app-font-selected-bg)}.react-paint-editor-menu{flex-direction:column;display:flex}.react-paint-editor-toolbox-relative{display:inline-block;position:relative}.react-paint-editor-toolbox-pictureinput-modal form{grid-template-columns:3fr 1fr 1fr}.react-paint-editor-toolbox-pictureinput-modal form input{color:var(--react-paint-editor-app-font-color);border:1px solid var(--react-paint-editor-app-font-color);background:var(--react-paint-editor-app-toolbar-bg);outline:none}.react-paint-editor-toolbar-shrinkable{text-align:center;flex:1;height:100%;position:relative}.react-paint-editor-toolbar-toolbox{background:var(--react-paint-editor-app-toolbar-bg);border-bottom:1px solid var(--react-paint-editor-app-divider-color);box-sizing:border-box;max-height:36px;min-width:var(--react-paint-editor-toolbar-minwidth);display:flex}.react-paint-editor-toolbar-modal{grid-template-columns:1fr 1fr 1fr}.react-paint-editor-toolbox-export-modal h3{margin-top:8px;margin-bottom:0;font-size:18px}.react-paint-editor-toolbargroup-panel-content{display:flex}.react-paint-editor-toolbargroup-panel-content[data-vertical="1"]{flex-direction:column}.react-paint-editor-toolbargroup-relative{display:inline-block;position:relative}.react-paint-editor-app{color:var(--react-paint-editor-app-font-color);max-width:min(100%, var(--react-paint-editor-app-maxWidth));flex-direction:column;font-family:Arial,Helvetica,sans-serif;display:flex;position:relative}.react-paint-editor-app hr{border:none;border-top:1px solid var(--react-paint-editor-app-divider-color);width:100%}.react-paint-editor-toolbox-contextmenu{transform:var(--react-paint-editor-toolbox-contextmenu-transform);width:160px;top:0;left:0}.react-paint-editor-toolbox-contextmenu-group{flex-direction:column;display:flex;position:relative}
|