@yorab/react-paint 0.18.1 → 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/README.md +266 -22
  2. package/dist/_chunks/canvas-CDYlr833.js +1 -0
  3. package/dist/_chunks/editor-BARYd5Od.js +1 -0
  4. package/dist/canvas/components/Canvas.d.ts +15 -3
  5. package/dist/canvas/components/EditTextBox.d.ts +4 -4
  6. package/dist/canvas/constants/app.d.ts +32 -17
  7. package/dist/canvas/constants/grid.d.ts +7 -0
  8. package/dist/canvas/constants/picture.d.ts +8 -0
  9. package/dist/canvas/constants/shapes.d.ts +2 -2
  10. package/dist/canvas/constants/tools.d.ts +12 -2
  11. package/dist/canvas/constants/zoom.d.ts +4 -2
  12. package/dist/canvas/context/PaintContext.d.ts +9 -0
  13. package/dist/canvas/hooks/useAnnotationsStyle.d.ts +5 -0
  14. package/dist/canvas/hooks/useAutoScroll.d.ts +4 -0
  15. package/dist/canvas/hooks/useCanvasRenderer.d.ts +17 -0
  16. package/dist/canvas/hooks/useDrawableCanvas.d.ts +8 -5
  17. package/dist/canvas/hooks/useDropPicture.d.ts +7 -0
  18. package/dist/canvas/hooks/useKeyboard.d.ts +6 -32
  19. package/dist/canvas/hooks/usePaintState.d.ts +9 -0
  20. package/dist/canvas/hooks/usePinchZoomAndMove.d.ts +3 -13
  21. package/dist/canvas/hooks/useReactPaint.d.ts +11 -163
  22. package/dist/canvas/hooks/useResizeObserver.d.ts +1 -0
  23. package/dist/canvas/hooks/useShapeEvents.d.ts +7 -0
  24. package/dist/canvas/hooks/useZoom.d.ts +4 -17
  25. package/dist/canvas/index.d.ts +24 -17
  26. package/dist/canvas/index.js +1 -1
  27. package/dist/canvas/store/createStore.d.ts +14 -0
  28. package/dist/canvas/store/eventEmitter.d.ts +11 -0
  29. package/dist/canvas/store/internal.d.ts +5 -0
  30. package/dist/canvas/store/paintStore.d.ts +898 -0
  31. package/dist/canvas/store/selectors.d.ts +855 -0
  32. package/dist/canvas/store/shapesReducer.d.ts +66 -0
  33. package/dist/canvas/store/types.d.ts +72 -0
  34. package/dist/canvas/types/Canvas.d.ts +19 -0
  35. package/dist/{src/common → canvas}/types/Mode.d.ts +8 -15
  36. package/dist/{common → canvas}/types/Settings.d.ts +6 -1
  37. package/dist/{common → canvas}/types/Shapes.d.ts +27 -21
  38. package/dist/canvas/types/editor.d.ts +388 -0
  39. package/dist/{common → canvas}/types/tools.d.ts +10 -6
  40. package/dist/{common → canvas}/utils/array.d.ts +2 -0
  41. package/dist/canvas/utils/canvas.d.ts +18 -2
  42. package/dist/canvas/utils/click.d.ts +17 -0
  43. package/dist/canvas/utils/data.d.ts +6 -5
  44. package/dist/canvas/utils/equality.d.ts +5 -0
  45. package/dist/canvas/utils/file.d.ts +36 -266
  46. package/dist/canvas/utils/grid.d.ts +1 -1
  47. package/dist/canvas/utils/intersect.d.ts +24 -14
  48. package/dist/canvas/utils/object.d.ts +11 -0
  49. package/dist/{src/common/utils/selection.d.ts → canvas/utils/selectedShapes.d.ts} +2 -2
  50. package/dist/canvas/utils/selection/anchors.d.ts +16 -0
  51. package/dist/canvas/utils/selection/groupSelection.d.ts +3 -3
  52. package/dist/canvas/utils/selection/lineSelection.d.ts +3 -10
  53. package/dist/canvas/utils/selection/rectSelection.d.ts +6 -11
  54. package/dist/canvas/utils/selection/selectionFrame.d.ts +2 -2
  55. package/dist/canvas/utils/selection.d.ts +7 -5
  56. package/dist/canvas/utils/shapeInput.d.ts +45 -0
  57. package/dist/canvas/utils/shapePatch.d.ts +10 -0
  58. package/dist/canvas/utils/shapes/brush.d.ts +6 -6
  59. package/dist/canvas/utils/shapes/circle.d.ts +5 -5
  60. package/dist/canvas/utils/shapes/curve.d.ts +4 -4
  61. package/dist/canvas/utils/shapes/ellipse.d.ts +5 -5
  62. package/dist/canvas/utils/shapes/group.d.ts +9 -3
  63. package/dist/canvas/utils/shapes/index.d.ts +31 -5
  64. package/dist/canvas/utils/shapes/line.d.ts +5 -5
  65. package/dist/canvas/utils/shapes/path.d.ts +16 -8
  66. package/dist/canvas/utils/shapes/picture.d.ts +7 -5
  67. package/dist/canvas/utils/shapes/polygon.d.ts +4 -4
  68. package/dist/canvas/utils/shapes/rectangle.d.ts +5 -5
  69. package/dist/canvas/utils/shapes/text.d.ts +12 -6
  70. package/dist/canvas/utils/shapes/triangle.d.ts +2 -2
  71. package/dist/canvas/utils/tools.d.ts +12 -3
  72. package/dist/canvas/utils/transform.d.ts +5 -4
  73. package/dist/canvas/utils/trigo.d.ts +17 -1
  74. package/dist/canvas/utils/util.d.ts +14 -0
  75. package/dist/canvas/utils/zoom.d.ts +29 -15
  76. package/dist/editor/components/common/Button.d.ts +0 -1
  77. package/dist/editor/components/common/FileInput.d.ts +0 -1
  78. package/dist/editor/components/common/Loading.d.ts +1 -2
  79. package/dist/editor/components/common/Menu.d.ts +3 -2
  80. package/dist/editor/components/common/Modal.d.ts +1 -2
  81. package/dist/editor/components/common/Panel.d.ts +1 -2
  82. package/dist/editor/components/common/Snackbar.d.ts +2 -3
  83. package/dist/editor/components/settings/ClosedPointsField.d.ts +1 -1
  84. package/dist/editor/components/settings/ColorField.d.ts +1 -2
  85. package/dist/editor/components/settings/DeleteButton.d.ts +3 -4
  86. package/dist/editor/components/settings/FontFamilyField.d.ts +1 -2
  87. package/dist/editor/components/settings/LayoutButton.d.ts +1 -2
  88. package/dist/editor/components/settings/Layouts.d.ts +4 -15
  89. package/dist/editor/components/settings/LineArrowField.d.ts +1 -2
  90. package/dist/editor/components/settings/LineTypeField.d.ts +2 -3
  91. package/dist/editor/components/settings/RangeField.d.ts +1 -2
  92. package/dist/editor/components/settings/SelectField.d.ts +1 -2
  93. package/dist/editor/components/settings/SettingsBar.d.ts +3 -18
  94. package/dist/editor/components/settings/ToggleField.d.ts +2 -1
  95. package/dist/editor/components/settings/ZoomButton.d.ts +1 -2
  96. package/dist/editor/components/settings/ZoomPanel.d.ts +4 -0
  97. package/dist/editor/components/toolbox/ActionButton.d.ts +9 -0
  98. package/dist/editor/components/toolbox/ContextMenu.d.ts +5 -24
  99. package/dist/editor/components/toolbox/ExportModal.d.ts +1 -2
  100. package/dist/editor/components/toolbox/LoadFileTool.d.ts +4 -4
  101. package/dist/editor/components/toolbox/MenuGroup.d.ts +1 -7
  102. package/dist/editor/components/toolbox/PictureUrlInput.d.ts +2 -2
  103. package/dist/editor/components/toolbox/Tool.d.ts +3 -3
  104. package/dist/editor/components/toolbox/Toolbar.d.ts +5 -16
  105. package/dist/editor/components/toolbox/ToolbarGroup.d.ts +2 -3
  106. package/dist/editor/constants/options.d.ts +11 -1
  107. package/dist/editor/constants/snackbar.d.ts +1 -1
  108. package/dist/editor/constants/style.d.ts +0 -9
  109. package/dist/editor/constants/tools.d.ts +12 -32
  110. package/dist/editor/editor.css +1 -0
  111. package/dist/editor/hooks/useDrag.d.ts +3 -3
  112. package/dist/editor/hooks/useMenu.d.ts +3 -2
  113. package/dist/editor/hooks/usePressOutside.d.ts +7 -0
  114. package/dist/editor/hooks/useSnackbar.d.ts +1 -1
  115. package/dist/editor/index.d.ts +12 -22
  116. package/dist/editor/index.js +1 -1
  117. package/dist/editor/types/tools.d.ts +7 -0
  118. package/dist/editor/utils/dom.d.ts +1 -0
  119. package/dist/editor/utils/style.d.ts +7 -1
  120. package/dist/editor/utils/toolbar.d.ts +1 -2
  121. package/dist/editor/utils/util.d.ts +5 -0
  122. package/dist/index.d.ts +2 -5
  123. package/dist/react-paint.css +1 -1
  124. package/dist/react-paint.js +1 -1
  125. package/dist/react-paint.umd.cjs +1 -1
  126. package/package.json +37 -26
  127. package/dist/_chunks/array-DuJem3vg.js +0 -1
  128. package/dist/_chunks/canvas-DF1RWuxW.js +0 -1
  129. package/dist/_chunks/editor-DuVskl0R.js +0 -1
  130. package/dist/canvas/context/CanvasContext.d.ts +0 -55
  131. package/dist/canvas/hooks/useComponent.d.ts +0 -12
  132. package/dist/canvas/hooks/useDoubleClick.d.ts +0 -5
  133. package/dist/canvas/hooks/useEventListener.d.ts +0 -2
  134. package/dist/canvas/hooks/useShapes.d.ts +0 -44
  135. package/dist/common/hooks/useDebounce.d.ts +0 -2
  136. package/dist/common/types/Canvas.d.ts +0 -8
  137. package/dist/common/types/Mode.d.ts +0 -64
  138. package/dist/common/types/react.d.ts +0 -6
  139. package/dist/common/utils/dom.d.ts +0 -1
  140. package/dist/common/utils/object.d.ts +0 -4
  141. package/dist/common/utils/selection.d.ts +0 -4
  142. package/dist/common/utils/util.d.ts +0 -3
  143. package/dist/editor/constants/grid.d.ts +0 -7
  144. package/dist/src/canvas/components/Canvas.d.ts +0 -4
  145. package/dist/src/canvas/components/EditTextBox.d.ts +0 -13
  146. package/dist/src/canvas/constants/app.d.ts +0 -37
  147. package/dist/src/canvas/constants/grid.d.ts +0 -1
  148. package/dist/src/canvas/constants/keyboard.d.ts +0 -27
  149. package/dist/src/canvas/constants/picture.d.ts +0 -1
  150. package/dist/src/canvas/constants/rendering.d.ts +0 -3
  151. package/dist/src/canvas/constants/shapes.d.ts +0 -10
  152. package/dist/src/canvas/constants/tools.d.ts +0 -4
  153. package/dist/src/canvas/constants/zoom.d.ts +0 -5
  154. package/dist/src/canvas/context/CanvasContext.d.ts +0 -55
  155. package/dist/src/canvas/hooks/useComponent.d.ts +0 -12
  156. package/dist/src/canvas/hooks/useDoubleClick.d.ts +0 -5
  157. package/dist/src/canvas/hooks/useDrawableCanvas.d.ts +0 -6
  158. package/dist/src/canvas/hooks/useEventListener.d.ts +0 -2
  159. package/dist/src/canvas/hooks/useKeyboard.d.ts +0 -33
  160. package/dist/src/canvas/hooks/usePinchZoomAndMove.d.ts +0 -17
  161. package/dist/src/canvas/hooks/useReactPaint.d.ts +0 -164
  162. package/dist/src/canvas/hooks/useResizeObserver.d.ts +0 -6
  163. package/dist/src/canvas/hooks/useShapes.d.ts +0 -44
  164. package/dist/src/canvas/hooks/useZoom.d.ts +0 -22
  165. package/dist/src/canvas/index.d.ts +0 -19
  166. package/dist/src/canvas/utils/canvas.d.ts +0 -15
  167. package/dist/src/canvas/utils/data.d.ts +0 -5
  168. package/dist/src/canvas/utils/file.d.ts +0 -274
  169. package/dist/src/canvas/utils/grid.d.ts +0 -2
  170. package/dist/src/canvas/utils/intersect.d.ts +0 -27
  171. package/dist/src/canvas/utils/selection/groupSelection.d.ts +0 -4
  172. package/dist/src/canvas/utils/selection/lineSelection.d.ts +0 -19
  173. package/dist/src/canvas/utils/selection/rectSelection.d.ts +0 -20
  174. package/dist/src/canvas/utils/selection/selectionFrame.d.ts +0 -3
  175. package/dist/src/canvas/utils/selection.d.ts +0 -12
  176. package/dist/src/canvas/utils/shapes/brush.d.ts +0 -21
  177. package/dist/src/canvas/utils/shapes/circle.d.ts +0 -18
  178. package/dist/src/canvas/utils/shapes/curve.d.ts +0 -17
  179. package/dist/src/canvas/utils/shapes/ellipse.d.ts +0 -18
  180. package/dist/src/canvas/utils/shapes/group.d.ts +0 -33
  181. package/dist/src/canvas/utils/shapes/index.d.ts +0 -35
  182. package/dist/src/canvas/utils/shapes/line.d.ts +0 -19
  183. package/dist/src/canvas/utils/shapes/path.d.ts +0 -29
  184. package/dist/src/canvas/utils/shapes/picture.d.ts +0 -13
  185. package/dist/src/canvas/utils/shapes/polygon.d.ts +0 -18
  186. package/dist/src/canvas/utils/shapes/rectangle.d.ts +0 -22
  187. package/dist/src/canvas/utils/shapes/text.d.ts +0 -27
  188. package/dist/src/canvas/utils/shapes/triangle.d.ts +0 -4
  189. package/dist/src/canvas/utils/transform.d.ts +0 -15
  190. package/dist/src/canvas/utils/trigo.d.ts +0 -19
  191. package/dist/src/canvas/utils/zoom.d.ts +0 -58
  192. package/dist/src/common/hooks/useDebounce.d.ts +0 -2
  193. package/dist/src/common/types/Canvas.d.ts +0 -8
  194. package/dist/src/common/types/Settings.d.ts +0 -24
  195. package/dist/src/common/types/Shapes.d.ts +0 -153
  196. package/dist/src/common/types/react.d.ts +0 -6
  197. package/dist/src/common/types/tools.d.ts +0 -164
  198. package/dist/src/common/types/utils.d.ts +0 -4
  199. package/dist/src/common/utils/array.d.ts +0 -2
  200. package/dist/src/common/utils/dom.d.ts +0 -1
  201. package/dist/src/common/utils/object.d.ts +0 -4
  202. package/dist/src/common/utils/util.d.ts +0 -3
  203. package/dist/src/editor/components/common/Button.d.ts +0 -16
  204. package/dist/src/editor/components/common/FileInput.d.ts +0 -13
  205. package/dist/src/editor/components/common/Loading.d.ts +0 -6
  206. package/dist/src/editor/components/common/Menu.d.ts +0 -10
  207. package/dist/src/editor/components/common/Modal.d.ts +0 -11
  208. package/dist/src/editor/components/common/Panel.d.ts +0 -15
  209. package/dist/src/editor/components/common/Snackbar.d.ts +0 -7
  210. package/dist/src/editor/components/settings/ClosedPointsField.d.ts +0 -10
  211. package/dist/src/editor/components/settings/ColorField.d.ts +0 -15
  212. package/dist/src/editor/components/settings/DeleteButton.d.ts +0 -8
  213. package/dist/src/editor/components/settings/FontFamilyField.d.ts +0 -12
  214. package/dist/src/editor/components/settings/LayoutButton.d.ts +0 -7
  215. package/dist/src/editor/components/settings/Layouts.d.ts +0 -19
  216. package/dist/src/editor/components/settings/LineArrowField.d.ts +0 -12
  217. package/dist/src/editor/components/settings/LineTypeField.d.ts +0 -16
  218. package/dist/src/editor/components/settings/RangeField.d.ts +0 -19
  219. package/dist/src/editor/components/settings/SelectField.d.ts +0 -18
  220. package/dist/src/editor/components/settings/SettingsBar.d.ts +0 -26
  221. package/dist/src/editor/components/settings/ToggleField.d.ts +0 -13
  222. package/dist/src/editor/components/settings/ZoomButton.d.ts +0 -8
  223. package/dist/src/editor/components/toolbox/ContextMenu.d.ts +0 -25
  224. package/dist/src/editor/components/toolbox/ExportModal.d.ts +0 -7
  225. package/dist/src/editor/components/toolbox/LoadFileTool.d.ts +0 -11
  226. package/dist/src/editor/components/toolbox/MenuGroup.d.ts +0 -27
  227. package/dist/src/editor/components/toolbox/PictureUrlInput.d.ts +0 -7
  228. package/dist/src/editor/components/toolbox/Tool.d.ts +0 -11
  229. package/dist/src/editor/components/toolbox/Toolbar.d.ts +0 -26
  230. package/dist/src/editor/components/toolbox/ToolbarGroup.d.ts +0 -14
  231. package/dist/src/editor/constants/grid.d.ts +0 -7
  232. package/dist/src/editor/constants/icons.d.ts +0 -43
  233. package/dist/src/editor/constants/loading.d.ts +0 -1
  234. package/dist/src/editor/constants/options.d.ts +0 -13
  235. package/dist/src/editor/constants/snackbar.d.ts +0 -7
  236. package/dist/src/editor/constants/style.d.ts +0 -14
  237. package/dist/src/editor/constants/tools.d.ts +0 -32
  238. package/dist/src/editor/hooks/useDrag.d.ts +0 -15
  239. package/dist/src/editor/hooks/useMenu.d.ts +0 -11
  240. package/dist/src/editor/hooks/useSnackbar.d.ts +0 -10
  241. package/dist/src/editor/index.d.ts +0 -25
  242. package/dist/src/editor/types/snackbar.d.ts +0 -7
  243. package/dist/src/editor/utils/style.d.ts +0 -2
  244. package/dist/src/editor/utils/toolbar.d.ts +0 -11
  245. package/dist/src/index.d.ts +0 -5
  246. /package/dist/{common → canvas}/types/utils.d.ts +0 -0
  247. /package/dist/{canvas → editor}/hooks/useDebounce.d.ts +0 -0
@@ -0,0 +1,855 @@
1
+ import type { UtilsSettings } from './../../canvas/constants/app.js';
2
+ import type { InternalState } from './../../canvas/store/types.js';
3
+ import type { CanvasSize, Resize } from './../../canvas/types/Canvas.js';
4
+ import type { EditorState } from './../../canvas/types/editor.js';
5
+ import type { Point, Rect, ShapeEntity } from './../../canvas/types/Shapes.js';
6
+ import type { CustomTool, ToolsType } from './../../canvas/types/tools.js';
7
+ /** The text being edited, shown in a text box over the canvas */
8
+ type TextEdition = {
9
+ shape: ShapeEntity<'text'>;
10
+ defaultValue: string[];
11
+ settings: UtilsSettings;
12
+ };
13
+ export type CanvasView = {
14
+ width: number;
15
+ height: number;
16
+ canvasSize: CanvasSize;
17
+ resize: Resize;
18
+ isEditMode: boolean;
19
+ features: UtilsSettings['features'];
20
+ textEdition: TextEdition | undefined;
21
+ };
22
+ /** Memoizes the last result of a function, its arguments being compared one by one with Object.is */
23
+ export declare const memoizeLast: <A extends unknown[], R>(compute: (...args: A) => R) => ((...args: A) => R);
24
+ /** Returns the previous object while the new one has the same values, so that it keeps its identity */
25
+ export declare const keepIfSame: <T extends object>() => (next: T) => T;
26
+ /** One of the selection tool, the move tool or the available tools, found by id */
27
+ export declare const findSelectableTool: (available: CustomTool[], id: string) => ToolsType | undefined;
28
+ /**
29
+ * Selectors of a store. Each slice keeps its identity while its values are unchanged:
30
+ * the editor state is the same object as long as nothing it exposes has changed.
31
+ */
32
+ export declare const createSelectors: () => {
33
+ selectFeatures: ({ config }: InternalState) => {
34
+ edition: boolean;
35
+ zoom: boolean;
36
+ };
37
+ selectIsInteractive: (state: InternalState) => boolean;
38
+ selectSettings: (state: InternalState) => UtilsSettings;
39
+ selectActiveTool: ({ tools }: InternalState) => ToolsType;
40
+ selectSelectedShapes: (selection: ({
41
+ id: string;
42
+ computed: {
43
+ borders: Rect;
44
+ outerBorders: Rect;
45
+ center: Point;
46
+ boundingBox: Rect;
47
+ };
48
+ path: Path2D;
49
+ } & {
50
+ id?: string;
51
+ rotation?: number;
52
+ toolId?: string;
53
+ visible?: boolean;
54
+ locked?: boolean;
55
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
56
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
57
+ } & import("./../../canvas/types/Shapes.js").Line & {
58
+ type: "line";
59
+ } & {
60
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
61
+ } & {
62
+ type: "line";
63
+ arrows?: import("./../../canvas/types/Shapes.js").TriangleEntity[];
64
+ }) | ({
65
+ id: string;
66
+ computed: {
67
+ borders: Rect;
68
+ outerBorders: Rect;
69
+ center: Point;
70
+ boundingBox: Rect;
71
+ };
72
+ path: Path2D;
73
+ } & {
74
+ id?: string;
75
+ rotation?: number;
76
+ toolId?: string;
77
+ visible?: boolean;
78
+ locked?: boolean;
79
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
80
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
81
+ } & Rect & {
82
+ src: string;
83
+ } & {
84
+ type: "picture";
85
+ img: HTMLImageElement;
86
+ flipX?: boolean;
87
+ flipY?: boolean;
88
+ ratio?: number;
89
+ } & {
90
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
91
+ } & {
92
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
93
+ }) | ({
94
+ id: string;
95
+ computed: {
96
+ borders: Rect;
97
+ outerBorders: Rect;
98
+ center: Point;
99
+ boundingBox: Rect;
100
+ };
101
+ path: Path2D;
102
+ } & {
103
+ id?: string;
104
+ rotation?: number;
105
+ toolId?: string;
106
+ visible?: boolean;
107
+ locked?: boolean;
108
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
109
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
110
+ } & Rect & {
111
+ value: string[];
112
+ fontSize: number;
113
+ } & {
114
+ type: "text";
115
+ flipX?: boolean;
116
+ flipY?: boolean;
117
+ ratio?: number;
118
+ } & {
119
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
120
+ } & {
121
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
122
+ }) | ({
123
+ id: string;
124
+ computed: {
125
+ borders: Rect;
126
+ outerBorders: Rect;
127
+ center: Point;
128
+ boundingBox: Rect;
129
+ };
130
+ path: Path2D;
131
+ } & {
132
+ id?: string;
133
+ rotation?: number;
134
+ toolId?: string;
135
+ visible?: boolean;
136
+ locked?: boolean;
137
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
138
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
139
+ } & Rect & {
140
+ type: "rect";
141
+ } & {
142
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
143
+ } & {
144
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
145
+ }) | ({
146
+ id: string;
147
+ computed: {
148
+ borders: Rect;
149
+ outerBorders: Rect;
150
+ center: Point;
151
+ boundingBox: Rect;
152
+ };
153
+ path: Path2D;
154
+ } & {
155
+ id?: string;
156
+ rotation?: number;
157
+ toolId?: string;
158
+ visible?: boolean;
159
+ locked?: boolean;
160
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
161
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
162
+ } & Rect & {
163
+ type: "square";
164
+ } & {
165
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
166
+ } & {
167
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
168
+ }) | ({
169
+ id: string;
170
+ computed: {
171
+ borders: Rect;
172
+ outerBorders: Rect;
173
+ center: Point;
174
+ boundingBox: Rect;
175
+ };
176
+ path: Path2D;
177
+ } & {
178
+ id?: string;
179
+ rotation?: number;
180
+ toolId?: string;
181
+ visible?: boolean;
182
+ locked?: boolean;
183
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
184
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
185
+ } & import("./../../canvas/types/Shapes.js").Circle & {
186
+ type: "circle";
187
+ } & {
188
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
189
+ } & {
190
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
191
+ }) | ({
192
+ id: string;
193
+ computed: {
194
+ borders: Rect;
195
+ outerBorders: Rect;
196
+ center: Point;
197
+ boundingBox: Rect;
198
+ };
199
+ path: Path2D;
200
+ } & {
201
+ id?: string;
202
+ rotation?: number;
203
+ toolId?: string;
204
+ visible?: boolean;
205
+ locked?: boolean;
206
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
207
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
208
+ } & import("./../../canvas/types/Shapes.js").Ellipse & {
209
+ type: "ellipse";
210
+ } & {
211
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
212
+ } & {
213
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
214
+ }) | ({
215
+ id: string;
216
+ computed: {
217
+ borders: Rect;
218
+ outerBorders: Rect;
219
+ center: Point;
220
+ boundingBox: Rect;
221
+ };
222
+ path: Path2D;
223
+ } & {
224
+ id?: string;
225
+ rotation?: number;
226
+ toolId?: string;
227
+ visible?: boolean;
228
+ locked?: boolean;
229
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
230
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
231
+ } & import("./../../canvas/types/Shapes.js").Polygon & {
232
+ type: "polygon";
233
+ } & {
234
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
235
+ } & {
236
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
237
+ }) | ({
238
+ id: string;
239
+ computed: {
240
+ borders: Rect;
241
+ outerBorders: Rect;
242
+ center: Point;
243
+ boundingBox: Rect;
244
+ };
245
+ path: Path2D;
246
+ } & {
247
+ id?: string;
248
+ rotation?: number;
249
+ toolId?: string;
250
+ visible?: boolean;
251
+ locked?: boolean;
252
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
253
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
254
+ } & import("./../../canvas/types/Shapes.js").Curve & {
255
+ type: "curve";
256
+ } & {
257
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
258
+ } & {
259
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
260
+ }) | ({
261
+ id: string;
262
+ computed: {
263
+ borders: Rect;
264
+ outerBorders: Rect;
265
+ center: Point;
266
+ boundingBox: Rect;
267
+ };
268
+ path: Path2D;
269
+ } & {
270
+ id?: string;
271
+ rotation?: number;
272
+ toolId?: string;
273
+ visible?: boolean;
274
+ locked?: boolean;
275
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
276
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
277
+ } & import("./../../canvas/types/Shapes.js").Brush & {
278
+ type: "brush";
279
+ scaleX?: number;
280
+ scaleY?: number;
281
+ } & {
282
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
283
+ } & {
284
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
285
+ }) | ({
286
+ id: string;
287
+ computed: {
288
+ borders: Rect;
289
+ outerBorders: Rect;
290
+ center: Point;
291
+ boundingBox: Rect;
292
+ };
293
+ path: Path2D;
294
+ } & {
295
+ id?: string;
296
+ rotation?: number;
297
+ toolId?: string;
298
+ visible?: boolean;
299
+ locked?: boolean;
300
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
301
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
302
+ } & Rect & {
303
+ type: "group";
304
+ shapes: ShapeEntity[];
305
+ } & {
306
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
307
+ } & {
308
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
309
+ }) | undefined) => (({
310
+ id: string;
311
+ computed: {
312
+ borders: Rect;
313
+ outerBorders: Rect;
314
+ center: Point;
315
+ boundingBox: Rect;
316
+ };
317
+ path: Path2D;
318
+ } & {
319
+ id?: string;
320
+ rotation?: number;
321
+ toolId?: string;
322
+ visible?: boolean;
323
+ locked?: boolean;
324
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
325
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
326
+ } & import("./../../canvas/types/Shapes.js").Line & {
327
+ type: "line";
328
+ } & {
329
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
330
+ } & {
331
+ type: "line";
332
+ arrows?: import("./../../canvas/types/Shapes.js").TriangleEntity[];
333
+ }) | ({
334
+ id: string;
335
+ computed: {
336
+ borders: Rect;
337
+ outerBorders: Rect;
338
+ center: Point;
339
+ boundingBox: Rect;
340
+ };
341
+ path: Path2D;
342
+ } & {
343
+ id?: string;
344
+ rotation?: number;
345
+ toolId?: string;
346
+ visible?: boolean;
347
+ locked?: boolean;
348
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
349
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
350
+ } & Rect & {
351
+ src: string;
352
+ } & {
353
+ type: "picture";
354
+ img: HTMLImageElement;
355
+ flipX?: boolean;
356
+ flipY?: boolean;
357
+ ratio?: number;
358
+ } & {
359
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
360
+ } & {
361
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
362
+ }) | ({
363
+ id: string;
364
+ computed: {
365
+ borders: Rect;
366
+ outerBorders: Rect;
367
+ center: Point;
368
+ boundingBox: Rect;
369
+ };
370
+ path: Path2D;
371
+ } & {
372
+ id?: string;
373
+ rotation?: number;
374
+ toolId?: string;
375
+ visible?: boolean;
376
+ locked?: boolean;
377
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
378
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
379
+ } & Rect & {
380
+ value: string[];
381
+ fontSize: number;
382
+ } & {
383
+ type: "text";
384
+ flipX?: boolean;
385
+ flipY?: boolean;
386
+ ratio?: number;
387
+ } & {
388
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
389
+ } & {
390
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
391
+ }) | ({
392
+ id: string;
393
+ computed: {
394
+ borders: Rect;
395
+ outerBorders: Rect;
396
+ center: Point;
397
+ boundingBox: Rect;
398
+ };
399
+ path: Path2D;
400
+ } & {
401
+ id?: string;
402
+ rotation?: number;
403
+ toolId?: string;
404
+ visible?: boolean;
405
+ locked?: boolean;
406
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
407
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
408
+ } & Rect & {
409
+ type: "rect";
410
+ } & {
411
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
412
+ } & {
413
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
414
+ }) | ({
415
+ id: string;
416
+ computed: {
417
+ borders: Rect;
418
+ outerBorders: Rect;
419
+ center: Point;
420
+ boundingBox: Rect;
421
+ };
422
+ path: Path2D;
423
+ } & {
424
+ id?: string;
425
+ rotation?: number;
426
+ toolId?: string;
427
+ visible?: boolean;
428
+ locked?: boolean;
429
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
430
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
431
+ } & Rect & {
432
+ type: "square";
433
+ } & {
434
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
435
+ } & {
436
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
437
+ }) | ({
438
+ id: string;
439
+ computed: {
440
+ borders: Rect;
441
+ outerBorders: Rect;
442
+ center: Point;
443
+ boundingBox: Rect;
444
+ };
445
+ path: Path2D;
446
+ } & {
447
+ id?: string;
448
+ rotation?: number;
449
+ toolId?: string;
450
+ visible?: boolean;
451
+ locked?: boolean;
452
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
453
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
454
+ } & import("./../../canvas/types/Shapes.js").Circle & {
455
+ type: "circle";
456
+ } & {
457
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
458
+ } & {
459
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
460
+ }) | ({
461
+ id: string;
462
+ computed: {
463
+ borders: Rect;
464
+ outerBorders: Rect;
465
+ center: Point;
466
+ boundingBox: Rect;
467
+ };
468
+ path: Path2D;
469
+ } & {
470
+ id?: string;
471
+ rotation?: number;
472
+ toolId?: string;
473
+ visible?: boolean;
474
+ locked?: boolean;
475
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
476
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
477
+ } & import("./../../canvas/types/Shapes.js").Ellipse & {
478
+ type: "ellipse";
479
+ } & {
480
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
481
+ } & {
482
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
483
+ }) | ({
484
+ id: string;
485
+ computed: {
486
+ borders: Rect;
487
+ outerBorders: Rect;
488
+ center: Point;
489
+ boundingBox: Rect;
490
+ };
491
+ path: Path2D;
492
+ } & {
493
+ id?: string;
494
+ rotation?: number;
495
+ toolId?: string;
496
+ visible?: boolean;
497
+ locked?: boolean;
498
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
499
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
500
+ } & import("./../../canvas/types/Shapes.js").Polygon & {
501
+ type: "polygon";
502
+ } & {
503
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
504
+ } & {
505
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
506
+ }) | ({
507
+ id: string;
508
+ computed: {
509
+ borders: Rect;
510
+ outerBorders: Rect;
511
+ center: Point;
512
+ boundingBox: Rect;
513
+ };
514
+ path: Path2D;
515
+ } & {
516
+ id?: string;
517
+ rotation?: number;
518
+ toolId?: string;
519
+ visible?: boolean;
520
+ locked?: boolean;
521
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
522
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
523
+ } & import("./../../canvas/types/Shapes.js").Curve & {
524
+ type: "curve";
525
+ } & {
526
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
527
+ } & {
528
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
529
+ }) | ({
530
+ id: string;
531
+ computed: {
532
+ borders: Rect;
533
+ outerBorders: Rect;
534
+ center: Point;
535
+ boundingBox: Rect;
536
+ };
537
+ path: Path2D;
538
+ } & {
539
+ id?: string;
540
+ rotation?: number;
541
+ toolId?: string;
542
+ visible?: boolean;
543
+ locked?: boolean;
544
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
545
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
546
+ } & import("./../../canvas/types/Shapes.js").Brush & {
547
+ type: "brush";
548
+ scaleX?: number;
549
+ scaleY?: number;
550
+ } & {
551
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
552
+ } & {
553
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
554
+ }) | ({
555
+ id: string;
556
+ computed: {
557
+ borders: Rect;
558
+ outerBorders: Rect;
559
+ center: Point;
560
+ boundingBox: Rect;
561
+ };
562
+ path: Path2D;
563
+ } & {
564
+ id?: string;
565
+ rotation?: number;
566
+ toolId?: string;
567
+ visible?: boolean;
568
+ locked?: boolean;
569
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
570
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
571
+ } & Rect & {
572
+ type: "group";
573
+ shapes: ShapeEntity[];
574
+ } & {
575
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
576
+ } & {
577
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
578
+ }))[];
579
+ selectHoveredShape: ({ document, interaction }: InternalState) => ({
580
+ id: string;
581
+ computed: {
582
+ borders: Rect;
583
+ outerBorders: Rect;
584
+ center: Point;
585
+ boundingBox: Rect;
586
+ };
587
+ path: Path2D;
588
+ } & {
589
+ id?: string;
590
+ rotation?: number;
591
+ toolId?: string;
592
+ visible?: boolean;
593
+ locked?: boolean;
594
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
595
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
596
+ } & import("./../../canvas/types/Shapes.js").Line & {
597
+ type: "line";
598
+ } & {
599
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
600
+ } & {
601
+ type: "line";
602
+ arrows?: import("./../../canvas/types/Shapes.js").TriangleEntity[];
603
+ }) | ({
604
+ id: string;
605
+ computed: {
606
+ borders: Rect;
607
+ outerBorders: Rect;
608
+ center: Point;
609
+ boundingBox: Rect;
610
+ };
611
+ path: Path2D;
612
+ } & {
613
+ id?: string;
614
+ rotation?: number;
615
+ toolId?: string;
616
+ visible?: boolean;
617
+ locked?: boolean;
618
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
619
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
620
+ } & Rect & {
621
+ src: string;
622
+ } & {
623
+ type: "picture";
624
+ img: HTMLImageElement;
625
+ flipX?: boolean;
626
+ flipY?: boolean;
627
+ ratio?: number;
628
+ } & {
629
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
630
+ } & {
631
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
632
+ }) | ({
633
+ id: string;
634
+ computed: {
635
+ borders: Rect;
636
+ outerBorders: Rect;
637
+ center: Point;
638
+ boundingBox: Rect;
639
+ };
640
+ path: Path2D;
641
+ } & {
642
+ id?: string;
643
+ rotation?: number;
644
+ toolId?: string;
645
+ visible?: boolean;
646
+ locked?: boolean;
647
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
648
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
649
+ } & Rect & {
650
+ value: string[];
651
+ fontSize: number;
652
+ } & {
653
+ type: "text";
654
+ flipX?: boolean;
655
+ flipY?: boolean;
656
+ ratio?: number;
657
+ } & {
658
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
659
+ } & {
660
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
661
+ }) | ({
662
+ id: string;
663
+ computed: {
664
+ borders: Rect;
665
+ outerBorders: Rect;
666
+ center: Point;
667
+ boundingBox: Rect;
668
+ };
669
+ path: Path2D;
670
+ } & {
671
+ id?: string;
672
+ rotation?: number;
673
+ toolId?: string;
674
+ visible?: boolean;
675
+ locked?: boolean;
676
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
677
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
678
+ } & Rect & {
679
+ type: "rect";
680
+ } & {
681
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
682
+ } & {
683
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
684
+ }) | ({
685
+ id: string;
686
+ computed: {
687
+ borders: Rect;
688
+ outerBorders: Rect;
689
+ center: Point;
690
+ boundingBox: Rect;
691
+ };
692
+ path: Path2D;
693
+ } & {
694
+ id?: string;
695
+ rotation?: number;
696
+ toolId?: string;
697
+ visible?: boolean;
698
+ locked?: boolean;
699
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
700
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
701
+ } & Rect & {
702
+ type: "square";
703
+ } & {
704
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
705
+ } & {
706
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
707
+ }) | ({
708
+ id: string;
709
+ computed: {
710
+ borders: Rect;
711
+ outerBorders: Rect;
712
+ center: Point;
713
+ boundingBox: Rect;
714
+ };
715
+ path: Path2D;
716
+ } & {
717
+ id?: string;
718
+ rotation?: number;
719
+ toolId?: string;
720
+ visible?: boolean;
721
+ locked?: boolean;
722
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
723
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
724
+ } & import("./../../canvas/types/Shapes.js").Circle & {
725
+ type: "circle";
726
+ } & {
727
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
728
+ } & {
729
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
730
+ }) | ({
731
+ id: string;
732
+ computed: {
733
+ borders: Rect;
734
+ outerBorders: Rect;
735
+ center: Point;
736
+ boundingBox: Rect;
737
+ };
738
+ path: Path2D;
739
+ } & {
740
+ id?: string;
741
+ rotation?: number;
742
+ toolId?: string;
743
+ visible?: boolean;
744
+ locked?: boolean;
745
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
746
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
747
+ } & import("./../../canvas/types/Shapes.js").Ellipse & {
748
+ type: "ellipse";
749
+ } & {
750
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
751
+ } & {
752
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
753
+ }) | ({
754
+ id: string;
755
+ computed: {
756
+ borders: Rect;
757
+ outerBorders: Rect;
758
+ center: Point;
759
+ boundingBox: Rect;
760
+ };
761
+ path: Path2D;
762
+ } & {
763
+ id?: string;
764
+ rotation?: number;
765
+ toolId?: string;
766
+ visible?: boolean;
767
+ locked?: boolean;
768
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
769
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
770
+ } & import("./../../canvas/types/Shapes.js").Polygon & {
771
+ type: "polygon";
772
+ } & {
773
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
774
+ } & {
775
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
776
+ }) | ({
777
+ id: string;
778
+ computed: {
779
+ borders: Rect;
780
+ outerBorders: Rect;
781
+ center: Point;
782
+ boundingBox: Rect;
783
+ };
784
+ path: Path2D;
785
+ } & {
786
+ id?: string;
787
+ rotation?: number;
788
+ toolId?: string;
789
+ visible?: boolean;
790
+ locked?: boolean;
791
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
792
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
793
+ } & import("./../../canvas/types/Shapes.js").Curve & {
794
+ type: "curve";
795
+ } & {
796
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
797
+ } & {
798
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
799
+ }) | ({
800
+ id: string;
801
+ computed: {
802
+ borders: Rect;
803
+ outerBorders: Rect;
804
+ center: Point;
805
+ boundingBox: Rect;
806
+ };
807
+ path: Path2D;
808
+ } & {
809
+ id?: string;
810
+ rotation?: number;
811
+ toolId?: string;
812
+ visible?: boolean;
813
+ locked?: boolean;
814
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
815
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
816
+ } & import("./../../canvas/types/Shapes.js").Brush & {
817
+ type: "brush";
818
+ scaleX?: number;
819
+ scaleY?: number;
820
+ } & {
821
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
822
+ } & {
823
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
824
+ }) | ({
825
+ id: string;
826
+ computed: {
827
+ borders: Rect;
828
+ outerBorders: Rect;
829
+ center: Point;
830
+ boundingBox: Rect;
831
+ };
832
+ path: Path2D;
833
+ } & {
834
+ id?: string;
835
+ rotation?: number;
836
+ toolId?: string;
837
+ visible?: boolean;
838
+ locked?: boolean;
839
+ style?: import("./../../canvas/types/Shapes.js").StyleShape | undefined;
840
+ data?: import("./../../canvas/types/Shapes.js").ShapeData | undefined;
841
+ } & Rect & {
842
+ type: "group";
843
+ shapes: ShapeEntity[];
844
+ } & {
845
+ type: "rect" | "square" | "circle" | "ellipse" | "picture" | "text" | "brush" | "group" | "line" | "polygon" | "curve";
846
+ } & {
847
+ type: Exclude<import("./../../canvas/types/Shapes.js").ShapeType, "line" | "triangle">;
848
+ }) | undefined;
849
+ selectWithContextMenu: ({ config }: InternalState) => boolean;
850
+ selectWithDropPicture: (state: InternalState) => boolean;
851
+ selectEditorState: (state: InternalState) => EditorState;
852
+ selectCanvasView: (state: InternalState) => CanvasView;
853
+ selectCursor: (state: InternalState) => string;
854
+ };
855
+ export {};