@onesy/ui-react 1.0.19 → 1.0.21
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/Tooltip/Tooltip.js +0 -1
- package/Whiteboard/Whiteboard.d.ts +35 -0
- package/Whiteboard/Whiteboard.js +1334 -0
- package/Whiteboard/index.d.ts +1 -0
- package/Whiteboard/index.js +8 -0
- package/Whiteboard/package.json +6 -0
- package/esm/Tooltip/Tooltip.js +0 -1
- package/esm/Whiteboard/Whiteboard.js +1415 -0
- package/esm/Whiteboard/index.js +1 -0
- package/esm/index.js +4 -2
- package/index.d.ts +2 -0
- package/index.js +4 -1
- package/package.json +1 -1
package/Tooltip/Tooltip.js
CHANGED
@@ -441,7 +441,6 @@ const Tooltip = react_1.default.forwardRef((props_, ref) => {
|
|
441
441
|
}, onMouseMove }, (click && {
|
442
442
|
onClick: (event) => {
|
443
443
|
var _a, _b;
|
444
|
-
event.stopPropagation();
|
445
444
|
if ((0, utils_1.is)('function', (_a = children === null || children === void 0 ? void 0 : children.props) === null || _a === void 0 ? void 0 : _a.onClick))
|
446
445
|
(_b = children === null || children === void 0 ? void 0 : children.props) === null || _b === void 0 ? void 0 : _b.onClick(event);
|
447
446
|
onClick(event);
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { IBaseElement } from '../types';
|
3
|
+
export interface IWhiteboardAction {
|
4
|
+
v: 'a' | 'r';
|
5
|
+
i: IWhiteboardItem | IWhiteboardItem[];
|
6
|
+
}
|
7
|
+
export type IWhiteboardTool = 'pen' | 'eraser' | 'pan' | 'zoom' | 'select' | 'circle' | 'rectangle' | 'triangle' | 'line' | 'line-arrow' | 'text' | 'image';
|
8
|
+
export type IWhiteboardValue = IWhiteboardItem[];
|
9
|
+
export interface IWhiteboard extends IBaseElement {
|
10
|
+
valueDefault?: IWhiteboardValue;
|
11
|
+
onChange?: (value: IWhiteboardValue) => any;
|
12
|
+
minZoom?: number;
|
13
|
+
maxZoom?: number;
|
14
|
+
grid?: boolean;
|
15
|
+
settings?: any;
|
16
|
+
}
|
17
|
+
export interface IWhiteboardItem {
|
18
|
+
i: string;
|
19
|
+
v?: 'dl' | 'dp' | 'oc' | 'oe' | 'or' | 'os' | 'ot' | 'ote' | 'ol' | 'oa' | 'i' | 't';
|
20
|
+
p: number[];
|
21
|
+
c?: number[];
|
22
|
+
ar?: number[];
|
23
|
+
s?: {
|
24
|
+
lineCap?: string;
|
25
|
+
lineJoin?: string;
|
26
|
+
lineWidth?: number;
|
27
|
+
strokeStyle?: string;
|
28
|
+
globalAlpha?: number;
|
29
|
+
[p: string]: any;
|
30
|
+
};
|
31
|
+
se?: boolean;
|
32
|
+
a: number;
|
33
|
+
}
|
34
|
+
declare const Whiteboard: React.FC<IWhiteboard>;
|
35
|
+
export default Whiteboard;
|