@yorab/react-paint 0.14.0 → 0.15.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 +46 -283
- package/dist/canvas/components/Canvas.d.ts +1 -0
- package/dist/canvas/components/EditTextBox.d.ts +2 -2
- package/dist/canvas/constants/app.d.ts +2 -0
- package/dist/canvas/constants/keyboard.d.ts +24 -0
- package/dist/canvas/hooks/useComponent.d.ts +3 -1
- package/dist/canvas/hooks/useDebounce.d.ts +2 -0
- package/dist/canvas/hooks/useDrawableCanvas.d.ts +2 -1
- package/dist/canvas/hooks/useKeyboard.d.ts +5 -1
- package/dist/canvas/hooks/useReactPaint.d.ts +1845 -8
- package/dist/canvas/hooks/useShapes.d.ts +1378 -4
- package/dist/canvas/index.d.ts +3 -3
- package/dist/canvas/utils/data.d.ts +2 -2
- package/dist/canvas/utils/file.d.ts +233 -4
- package/dist/canvas/utils/intersect.d.ts +4 -4
- package/dist/canvas/utils/selection/groupSelection.d.ts +2 -2
- package/dist/canvas/utils/selection/lineSelection.d.ts +6 -2
- package/dist/canvas/utils/selection/rectSelection.d.ts +9 -4
- package/dist/canvas/utils/selection.d.ts +1 -1
- package/dist/canvas/utils/shapes/brush.d.ts +14 -11
- package/dist/canvas/utils/shapes/circle.d.ts +13 -9
- package/dist/canvas/utils/shapes/curve.d.ts +15 -10
- package/dist/canvas/utils/shapes/ellipse.d.ts +13 -9
- package/dist/canvas/utils/shapes/index.d.ts +19 -10
- package/dist/canvas/utils/shapes/line.d.ts +13 -8
- package/dist/canvas/utils/shapes/path.d.ts +18 -2
- package/dist/canvas/utils/shapes/picture.d.ts +13 -9
- package/dist/canvas/utils/shapes/polygon.d.ts +14 -8
- package/dist/canvas/utils/shapes/rectangle.d.ts +54 -9
- package/dist/canvas/utils/shapes/text.d.ts +12 -7
- package/dist/canvas/utils/shapes/triangle.d.ts +4 -3
- package/dist/canvas/utils/trigo.d.ts +1 -1
- package/dist/common/types/Shapes.d.ts +63 -26
- package/dist/common/types/utils.d.ts +1 -1
- package/dist/editor/components/common/Button.d.ts +2 -2
- package/dist/editor/components/common/FileInput.d.ts +13 -0
- package/dist/editor/index.d.ts +11 -11
- package/dist/react-paint.css +1 -1
- package/dist/react-paint.js +1185 -1143
- package/dist/react-paint.umd.cjs +1 -1
- package/package.json +19 -15
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import type { UtilsSettings } from './../../../canvas/constants/app';
|
|
2
2
|
import type { SelectionModeResize } from './../../../common/types/Mode';
|
|
3
|
-
import type { DrawableShape,
|
|
4
|
-
export declare const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
x: number;
|
|
10
|
-
y: number;
|
|
3
|
+
import type { DrawableShape, Point, ShapeEntity } from './../../../common/types/Shapes';
|
|
4
|
+
export declare const getComputedPicture: (picture: DrawableShape<"picture">, settings: UtilsSettings) => {
|
|
5
|
+
borders: import("./../../../common/types/Shapes").Rect;
|
|
6
|
+
outerBorders: import("./../../../common/types/Shapes").Rect;
|
|
7
|
+
center: Point;
|
|
8
|
+
boundingBox: import("./../../../common/types/Shapes").Rect;
|
|
11
9
|
};
|
|
12
|
-
export declare const
|
|
10
|
+
export declare const refreshPicture: <T extends DrawableShape<"picture">>(shape: T & {
|
|
11
|
+
id: string;
|
|
12
|
+
}, settings: UtilsSettings) => ShapeEntity<"picture">;
|
|
13
|
+
export declare const createPicture: (fileOrUrl: File | string, maxPictureWidth: number, maxPictureHeight: number, settings: UtilsSettings) => Promise<ShapeEntity<"picture">>;
|
|
14
|
+
export declare const drawPicture: (ctx: CanvasRenderingContext2D, picture: ShapeEntity<"picture">) => void;
|
|
15
|
+
export declare const translatePicture: (cursorPosition: Point, originalShape: ShapeEntity<"picture">, originalCursorPosition: Point, settings: UtilsSettings, singleAxis: boolean) => ShapeEntity<"picture">;
|
|
16
|
+
export declare const resizePicture: (cursorPosition: Point, originalShape: ShapeEntity<"picture">, selectionMode: SelectionModeResize, settings: UtilsSettings, resizeFromCenter: boolean) => ShapeEntity<"picture">;
|
|
@@ -2,17 +2,23 @@ import type { UtilsSettings } from './../../../canvas/constants/app';
|
|
|
2
2
|
import type { SelectionModeResize } from './../../../common/types/Mode';
|
|
3
3
|
import type { DrawableShape, Point, Polygon, Rect, ShapeEntity } from './../../../common/types/Shapes';
|
|
4
4
|
import type { ToolsSettingsType } from './../../../common/types/tools';
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const getComputedPolygon: (polygon: DrawableShape<"polygon">, settings: UtilsSettings) => {
|
|
6
|
+
borders: Rect;
|
|
7
|
+
outerBorders: Rect;
|
|
8
|
+
center: Point;
|
|
9
|
+
boundingBox: Rect;
|
|
10
|
+
};
|
|
11
|
+
export declare const refreshPolygon: <T extends DrawableShape<"polygon">>(shape: T & {
|
|
12
|
+
id: string;
|
|
13
|
+
}, settings: UtilsSettings) => ShapeEntity<"polygon">;
|
|
6
14
|
export declare const createPolygon: (shape: {
|
|
7
15
|
id: string;
|
|
8
16
|
type: "polygon";
|
|
9
17
|
settings: ToolsSettingsType<"polygon">;
|
|
10
18
|
}, cursorPosition: Point, settings: UtilsSettings) => ShapeEntity<"polygon">;
|
|
11
|
-
export declare const drawPolygon: (ctx: CanvasRenderingContext2D, polygon:
|
|
19
|
+
export declare const drawPolygon: (ctx: CanvasRenderingContext2D, polygon: ShapeEntity<"polygon">) => void;
|
|
12
20
|
export declare const getPolygonBorder: (polygon: Polygon, settings: Pick<UtilsSettings, "selectionPadding">) => Rect;
|
|
13
|
-
export declare const translatePolygon:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const addPolygonLine: <T extends DrawableShape<"polygon">>(shape: T, lineIndex: number, cursorPosition: Point, settings: UtilsSettings) => T;
|
|
18
|
-
export declare const addPolygonPoint: <T extends DrawableShape<"polygon">>(shape: T, cursorPosition: Point, settings: UtilsSettings, temporary?: boolean) => T;
|
|
21
|
+
export declare const translatePolygon: (cursorPosition: Point, originalShape: ShapeEntity<"polygon">, originalCursorPosition: Point, settings: UtilsSettings, singleAxis: boolean) => ShapeEntity<"polygon">;
|
|
22
|
+
export declare const resizePolygon: (cursorPosition: Point, originalShape: ShapeEntity<"polygon">, selectionMode: SelectionModeResize<number>, settings: UtilsSettings) => ShapeEntity<"polygon">;
|
|
23
|
+
export declare const addPolygonLine: (shape: ShapeEntity<"polygon">, lineIndex: number, cursorPosition: Point, settings: UtilsSettings) => ShapeEntity<"polygon">;
|
|
24
|
+
export declare const addPolygonPoint: (shape: ShapeEntity<"polygon">, cursorPosition: Point, settings: UtilsSettings, temporary?: boolean) => ShapeEntity<"polygon">;
|
|
@@ -2,19 +2,64 @@ import type { UtilsSettings } from './../../../canvas/constants/app';
|
|
|
2
2
|
import type { SelectionModeResize } from './../../../common/types/Mode';
|
|
3
3
|
import type { DrawableShape, Point, Rect, ShapeEntity } from './../../../common/types/Shapes';
|
|
4
4
|
import type { ToolsSettingsType } from './../../../common/types/tools';
|
|
5
|
-
type rectish = '
|
|
6
|
-
export declare const
|
|
7
|
-
|
|
5
|
+
type rectish = 'rect' | 'square';
|
|
6
|
+
export declare const getComputedRect: (rect: DrawableShape<rectish>, settings: UtilsSettings) => {
|
|
7
|
+
borders: Rect;
|
|
8
|
+
outerBorders: Rect;
|
|
9
|
+
center: Point;
|
|
10
|
+
boundingBox: Rect;
|
|
11
|
+
};
|
|
12
|
+
export declare const refreshRect: <T extends rectish>(rect: DrawableShape<T> & {
|
|
13
|
+
id: string;
|
|
14
|
+
}, settings: UtilsSettings, isGroup?: boolean) => ShapeEntity<T>;
|
|
15
|
+
export declare const createRectangle: <T extends rectish>(shape: {
|
|
8
16
|
id: string;
|
|
9
17
|
type: T;
|
|
10
18
|
settings: ToolsSettingsType<T>;
|
|
11
19
|
}, cursorPosition: Point, settings: UtilsSettings, isGroup?: boolean, width?: number, height?: number) => ShapeEntity<T>;
|
|
12
|
-
export declare const drawRect: (ctx: CanvasRenderingContext2D, shape:
|
|
20
|
+
export declare const drawRect: (ctx: CanvasRenderingContext2D, shape: ShapeEntity<rectish>) => void;
|
|
13
21
|
export declare const getRectBorder: (rect: Rect, settings: Pick<UtilsSettings, "selectionPadding">) => Rect;
|
|
14
22
|
export declare const getRectOppositeAnchorAbsolutePosition: <T extends DrawableShape & Rect>(anchor: Point, center: Point, shape: T, [negW, negH]?: [boolean, boolean]) => Point;
|
|
15
|
-
export declare const translateRect: <T extends
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
23
|
+
export declare const translateRect: <T extends rectish>(cursorPosition: Point, originalShape: ShapeEntity<T>, originalCursorPosition: Point, settings: UtilsSettings, singleAxis: boolean) => ({
|
|
24
|
+
id: string;
|
|
25
|
+
computed: {
|
|
26
|
+
borders: Rect;
|
|
27
|
+
outerBorders: Rect;
|
|
28
|
+
center: Point;
|
|
29
|
+
boundingBox: Rect;
|
|
30
|
+
};
|
|
31
|
+
} & {
|
|
32
|
+
rotation?: number;
|
|
33
|
+
toolId?: string;
|
|
34
|
+
visible?: boolean;
|
|
35
|
+
locked?: boolean;
|
|
36
|
+
style?: import("./../../../common/types/Shapes").StyleShape | undefined;
|
|
37
|
+
} & Rect & {
|
|
38
|
+
type: "rect";
|
|
39
|
+
} & {
|
|
40
|
+
selection?: import("./../../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
41
|
+
path?: Path2D | undefined;
|
|
42
|
+
type: "rect";
|
|
43
|
+
}) | ({
|
|
44
|
+
id: string;
|
|
45
|
+
computed: {
|
|
46
|
+
borders: Rect;
|
|
47
|
+
outerBorders: Rect;
|
|
48
|
+
center: Point;
|
|
49
|
+
boundingBox: Rect;
|
|
50
|
+
};
|
|
51
|
+
} & {
|
|
52
|
+
rotation?: number;
|
|
53
|
+
toolId?: string;
|
|
54
|
+
visible?: boolean;
|
|
55
|
+
locked?: boolean;
|
|
56
|
+
style?: import("./../../../common/types/Shapes").StyleShape | undefined;
|
|
57
|
+
} & Rect & {
|
|
58
|
+
type: "square";
|
|
59
|
+
} & {
|
|
60
|
+
selection?: import("./../../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
61
|
+
path?: Path2D | undefined;
|
|
62
|
+
type: "square";
|
|
63
|
+
});
|
|
64
|
+
export declare const resizeRect: <T extends rectish>(cursorPosition: Point, originalShape: ShapeEntity<T>, selectionMode: SelectionModeResize, settings: UtilsSettings, keepRatio?: boolean, resizeFromCenter?: boolean) => ShapeEntity<T>;
|
|
20
65
|
export {};
|
|
@@ -2,7 +2,15 @@ import type { UtilsSettings } from './../../../canvas/constants/app';
|
|
|
2
2
|
import type { SelectionModeResize } from './../../../common/types/Mode';
|
|
3
3
|
import type { DrawableShape, Point, Rect, ShapeEntity, Text } from './../../../common/types/Shapes';
|
|
4
4
|
import type { ToolsSettingsType } from './../../../common/types/tools';
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const getComputedText: (text: DrawableShape<"text">, settings: UtilsSettings) => {
|
|
6
|
+
borders: Rect;
|
|
7
|
+
outerBorders: Rect;
|
|
8
|
+
center: Point;
|
|
9
|
+
boundingBox: Rect;
|
|
10
|
+
};
|
|
11
|
+
export declare const refreshText: <T extends DrawableShape<"text">>(shape: T & {
|
|
12
|
+
id: string;
|
|
13
|
+
}, settings: UtilsSettings) => ShapeEntity<"text">;
|
|
6
14
|
export declare const calculateTextFontSize: (ctx: CanvasRenderingContext2D, text: string[], maxWidth: number, fontBold: boolean, fontItalic: boolean, fontFamily?: string | undefined) => number;
|
|
7
15
|
export declare const createText: (ctx: CanvasRenderingContext2D, shape: {
|
|
8
16
|
id: string;
|
|
@@ -11,9 +19,6 @@ export declare const createText: (ctx: CanvasRenderingContext2D, shape: {
|
|
|
11
19
|
}, cursorPosition: Point, settings: UtilsSettings) => ShapeEntity<"text">;
|
|
12
20
|
export declare const drawText: (ctx: CanvasRenderingContext2D, text: DrawableShape<"text">) => void;
|
|
13
21
|
export declare const getTextBorder: (text: Text, settings: Pick<UtilsSettings, "selectionPadding">) => Rect;
|
|
14
|
-
export declare const translateText:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
export declare const resizeText: (ctx: CanvasRenderingContext2D, cursorPosition: Point, originalShape: DrawableShape<"text">, selectionMode: SelectionModeResize, settings: UtilsSettings, resizeFromCenter: boolean) => DrawableShape<"text">;
|
|
19
|
-
export declare const resizeTextShapeWithNewContent: <U extends DrawableShape<"text">>(ctx: CanvasRenderingContext2D, shape: U, newValue: string[], settings: UtilsSettings) => U;
|
|
22
|
+
export declare const translateText: (cursorPosition: Point, originalShape: ShapeEntity<"text">, originalCursorPosition: Point, settings: UtilsSettings, singleAxis: boolean) => ShapeEntity<"text">;
|
|
23
|
+
export declare const resizeText: (ctx: CanvasRenderingContext2D, cursorPosition: Point, originalShape: ShapeEntity<"text">, selectionMode: SelectionModeResize, settings: UtilsSettings, resizeFromCenter: boolean) => ShapeEntity<"text">;
|
|
24
|
+
export declare const resizeTextShapeWithNewContent: (ctx: CanvasRenderingContext2D, shape: ShapeEntity<"text">, newValue: string[], settings: UtilsSettings) => ShapeEntity<"text">;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export declare const
|
|
1
|
+
import type { UtilsSettings } from './../../../canvas/constants/app';
|
|
2
|
+
import type { Triangle, TriangleEntity } from './../../../common/types/Shapes';
|
|
3
|
+
export declare const createTriangle: (triangle: Triangle, settings: UtilsSettings) => TriangleEntity;
|
|
4
|
+
export declare const drawTriangle: (ctx: CanvasRenderingContext2D, triangle: TriangleEntity) => void;
|
|
@@ -7,7 +7,7 @@ export declare const isCircleIntersectRect: (rect: Rect, circle: Circle) => bool
|
|
|
7
7
|
export declare const rotatePoint: ({ origin, point, rotation }: {
|
|
8
8
|
origin?: Point;
|
|
9
9
|
point: Point;
|
|
10
|
-
rotation
|
|
10
|
+
rotation?: number | undefined;
|
|
11
11
|
}) => Point;
|
|
12
12
|
export declare const getAngleFromVector: ({ targetVector: [point1, point2], radian, originVector }: {
|
|
13
13
|
targetVector: Vector;
|
|
@@ -66,66 +66,103 @@ export type SelectionLinesType = {
|
|
|
66
66
|
anchors: Path2D[];
|
|
67
67
|
};
|
|
68
68
|
export type DrawableShape<T extends ShapeType = ShapeType> = {
|
|
69
|
+
rotation?: number;
|
|
69
70
|
toolId?: string;
|
|
70
71
|
visible?: boolean;
|
|
71
72
|
locked?: boolean;
|
|
72
|
-
rotation: number;
|
|
73
73
|
style?: StyleShape | undefined;
|
|
74
74
|
} & (T extends 'line' ? Line & {
|
|
75
75
|
type: 'line';
|
|
76
|
-
selection?: SelectionLinesType | undefined;
|
|
77
|
-
path?: Path2D;
|
|
78
|
-
arrows?: DrawableShape<'triangle'>[];
|
|
79
76
|
} : T extends 'picture' ? Picture & {
|
|
80
|
-
type: 'picture';
|
|
81
77
|
img: HTMLImageElement;
|
|
82
|
-
|
|
78
|
+
type: 'picture';
|
|
83
79
|
} : T extends 'text' ? Text & {
|
|
84
80
|
type: 'text';
|
|
85
|
-
selection?: SelectionDefaultType | undefined;
|
|
86
81
|
} : T extends 'rect' ? Rect & {
|
|
87
82
|
type: 'rect';
|
|
88
|
-
selection?: SelectionDefaultType | undefined;
|
|
89
|
-
path?: Path2D;
|
|
90
83
|
} : T extends 'square' ? Rect & {
|
|
91
84
|
type: 'square';
|
|
92
|
-
selection?: SelectionDefaultType | undefined;
|
|
93
|
-
path?: Path2D;
|
|
94
85
|
} : T extends 'circle' ? Circle & {
|
|
95
86
|
type: 'circle';
|
|
96
|
-
selection?: SelectionDefaultType | undefined;
|
|
97
|
-
path?: Path2D;
|
|
98
87
|
} : T extends 'ellipse' ? Ellipse & {
|
|
99
88
|
type: 'ellipse';
|
|
100
|
-
selection?: SelectionDefaultType | undefined;
|
|
101
|
-
path?: Path2D;
|
|
102
89
|
} : T extends 'triangle' ? Triangle & {
|
|
103
90
|
type: 'triangle';
|
|
104
|
-
path?: Path2D;
|
|
105
91
|
} : T extends 'polygon' ? Polygon & {
|
|
106
92
|
type: 'polygon';
|
|
107
|
-
selection?: SelectionLinesType | undefined;
|
|
108
|
-
path?: Path2D;
|
|
109
93
|
} : T extends 'curve' ? Curve & {
|
|
110
94
|
type: 'curve';
|
|
111
|
-
selection?: SelectionLinesType | undefined;
|
|
112
|
-
path?: Path2D;
|
|
113
95
|
} : T extends 'brush' ? Brush & {
|
|
114
96
|
type: 'brush';
|
|
115
|
-
selection?: SelectionDefaultType | undefined;
|
|
116
|
-
path?: Path2D;
|
|
117
97
|
scaleX?: number;
|
|
118
98
|
scaleY?: number;
|
|
119
99
|
} : T extends 'group' ? Rect & {
|
|
120
|
-
type: 'group';
|
|
121
|
-
selection?: SelectionDefaultType | undefined;
|
|
122
|
-
path?: Path2D;
|
|
123
100
|
shapes: ShapeEntity[];
|
|
101
|
+
type: 'group';
|
|
124
102
|
} : never);
|
|
125
103
|
export type ExportedDrawableShape<T extends ShapeType = ShapeType> = T extends 'picture' ? Omit<DrawableShape<'picture'>, 'img'> : DrawableShape<T>;
|
|
104
|
+
export type TriangleEntity = DrawableShape<'triangle'> & {
|
|
105
|
+
path: Path2D;
|
|
106
|
+
computed: {
|
|
107
|
+
borders: Rect;
|
|
108
|
+
outerBorders: Rect;
|
|
109
|
+
center: Point;
|
|
110
|
+
boundingBox: Rect;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
126
113
|
export type ShapeEntity<T extends Exclude<ShapeType, 'triangle'> = Exclude<ShapeType, 'triangle'>> = {
|
|
127
114
|
id: string;
|
|
128
|
-
|
|
115
|
+
computed: {
|
|
116
|
+
borders: Rect;
|
|
117
|
+
outerBorders: Rect;
|
|
118
|
+
center: Point;
|
|
119
|
+
boundingBox: Rect;
|
|
120
|
+
};
|
|
121
|
+
} & DrawableShape<T> & (T extends 'line' ? {
|
|
122
|
+
selection?: SelectionLinesType | undefined;
|
|
123
|
+
path?: Path2D | undefined;
|
|
124
|
+
arrows?: TriangleEntity[];
|
|
125
|
+
type: 'line';
|
|
126
|
+
} : T extends 'picture' ? {
|
|
127
|
+
img: HTMLImageElement;
|
|
128
|
+
selection?: SelectionDefaultType | undefined;
|
|
129
|
+
type: 'picture';
|
|
130
|
+
} : T extends 'text' ? {
|
|
131
|
+
selection?: SelectionDefaultType | undefined;
|
|
132
|
+
type: 'text';
|
|
133
|
+
} : T extends 'rect' ? {
|
|
134
|
+
selection?: SelectionDefaultType | undefined;
|
|
135
|
+
path?: Path2D | undefined;
|
|
136
|
+
type: 'rect';
|
|
137
|
+
} : T extends 'square' ? {
|
|
138
|
+
selection?: SelectionDefaultType | undefined;
|
|
139
|
+
path?: Path2D | undefined;
|
|
140
|
+
type: 'square';
|
|
141
|
+
} : T extends 'circle' ? {
|
|
142
|
+
selection?: SelectionDefaultType | undefined;
|
|
143
|
+
path?: Path2D | undefined;
|
|
144
|
+
type: 'circle';
|
|
145
|
+
} : T extends 'ellipse' ? {
|
|
146
|
+
selection?: SelectionDefaultType | undefined;
|
|
147
|
+
path?: Path2D | undefined;
|
|
148
|
+
type: 'ellipse';
|
|
149
|
+
} : T extends 'polygon' ? {
|
|
150
|
+
selection?: SelectionLinesType | undefined;
|
|
151
|
+
path?: Path2D | undefined;
|
|
152
|
+
type: 'polygon';
|
|
153
|
+
} : T extends 'curve' ? {
|
|
154
|
+
selection?: SelectionLinesType | undefined;
|
|
155
|
+
path?: Path2D | undefined;
|
|
156
|
+
type: 'curve';
|
|
157
|
+
} : T extends 'brush' ? {
|
|
158
|
+
selection?: SelectionDefaultType | undefined;
|
|
159
|
+
path?: Path2D | undefined;
|
|
160
|
+
type: 'brush';
|
|
161
|
+
} : T extends 'group' ? {
|
|
162
|
+
selection?: SelectionDefaultType | undefined;
|
|
163
|
+
path?: Path2D | undefined;
|
|
164
|
+
type: 'group';
|
|
165
|
+
} : never);
|
|
129
166
|
export type StateData = {
|
|
130
167
|
shapes?: DrawableShape[];
|
|
131
168
|
config?: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type RecursivePartial<T> = {
|
|
2
|
-
[P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object ? RecursivePartial<T[P]> : T[P];
|
|
2
|
+
[P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object ? RecursivePartial<T[P]> : T[P] | undefined;
|
|
3
3
|
};
|
|
4
4
|
export type ValueOf<T> = T[keyof T];
|
|
@@ -7,10 +7,10 @@ type CommonType = {
|
|
|
7
7
|
icon?: string | undefined;
|
|
8
8
|
};
|
|
9
9
|
type ButtonType = CommonType & React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
10
|
-
type FileInputType = CommonType & {
|
|
10
|
+
export type FileInputType = CommonType & {
|
|
11
11
|
type: 'file' | 'color';
|
|
12
12
|
accept?: string;
|
|
13
13
|
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
14
14
|
} & React.InputHTMLAttributes<HTMLInputElement | HTMLButtonElement>;
|
|
15
|
-
declare const Button: React.ForwardRefExoticComponent<(
|
|
15
|
+
declare const Button: React.ForwardRefExoticComponent<(FileInputType | ButtonType) & React.RefAttributes<HTMLButtonElement | HTMLInputElement>>;
|
|
16
16
|
export default Button;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Button.css';
|
|
3
|
+
declare const FileInput: React.ForwardRefExoticComponent<{
|
|
4
|
+
hidden?: boolean | undefined;
|
|
5
|
+
disabled?: boolean | undefined;
|
|
6
|
+
selected?: boolean | undefined;
|
|
7
|
+
icon?: string | undefined;
|
|
8
|
+
} & {
|
|
9
|
+
type: "file" | "color";
|
|
10
|
+
accept?: string;
|
|
11
|
+
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
12
|
+
} & React.InputHTMLAttributes<HTMLButtonElement | HTMLInputElement> & React.RefAttributes<HTMLButtonElement | HTMLInputElement>>;
|
|
13
|
+
export default FileInput;
|
package/dist/editor/index.d.ts
CHANGED
|
@@ -7,17 +7,17 @@ type EditorProps = {
|
|
|
7
7
|
style?: CSSProperties;
|
|
8
8
|
children: ReactNode;
|
|
9
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;
|
|
10
|
+
toolbarBackgroundColor?: string | undefined;
|
|
11
|
+
dividerColor?: string | undefined;
|
|
12
|
+
fontRadius?: number | undefined;
|
|
13
|
+
fontDisabledColor?: string | undefined;
|
|
14
|
+
fontDisabledBackgroundColor?: string | undefined;
|
|
15
|
+
fontColor?: string | undefined;
|
|
16
|
+
fontBackgroundColor?: string | undefined;
|
|
17
|
+
fontSelectedColor?: string | undefined;
|
|
18
|
+
fontSelectedBackgroundColor?: string | undefined;
|
|
19
|
+
fontHoverColor?: string | undefined;
|
|
20
|
+
fontHoverBackgroundColor?: string | undefined;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
declare const Editor: ({ editorProps, className, style, options, children }: EditorProps) => import("react/jsx-runtime").JSX.Element;
|
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[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);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%}
|