@netless/fastboard 0.0.11 → 0.2.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.
- package/LICENSE.txt +1 -1
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +7 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +24 -85
- package/src/index.ts +2 -49
- package/README.md +0 -136
- package/dist/index.cjs.js +0 -14
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.es.js +0 -2804
- package/dist/index.es.js.map +0 -1
- package/dist/svelte.cjs.js +0 -2
- package/dist/svelte.cjs.js.map +0 -1
- package/dist/svelte.es.js +0 -32
- package/dist/svelte.es.js.map +0 -1
- package/dist/vue.cjs.js +0 -2
- package/dist/vue.cjs.js.map +0 -1
- package/dist/vue.es.js +0 -43
- package/dist/vue.es.js.map +0 -1
- package/src/WhiteboardApp.ts +0 -146
- package/src/behaviors/register-apps.ts +0 -39
- package/src/behaviors/style.ts +0 -17
- package/src/components/PageControl/PageControl.scss +0 -80
- package/src/components/PageControl/PageControl.tsx +0 -110
- package/src/components/PageControl/hooks.ts +0 -70
- package/src/components/PageControl/index.ts +0 -2
- package/src/components/PlayerControl/PlayerControl.scss +0 -145
- package/src/components/PlayerControl/PlayerControl.tsx +0 -157
- package/src/components/PlayerControl/components/Button.tsx +0 -55
- package/src/components/PlayerControl/hooks.ts +0 -88
- package/src/components/PlayerControl/icons/Loading.tsx +0 -13
- package/src/components/PlayerControl/icons/Pause.tsx +0 -13
- package/src/components/PlayerControl/icons/Play.tsx +0 -13
- package/src/components/PlayerControl/icons/index.ts +0 -10
- package/src/components/PlayerControl/index.ts +0 -2
- package/src/components/RedoUndo/RedoUndo.scss +0 -56
- package/src/components/RedoUndo/RedoUndo.tsx +0 -79
- package/src/components/RedoUndo/hooks.ts +0 -50
- package/src/components/RedoUndo/index.ts +0 -2
- package/src/components/Root.scss +0 -55
- package/src/components/Root.tsx +0 -65
- package/src/components/Toolbar/Content.tsx +0 -94
- package/src/components/Toolbar/Toolbar.scss +0 -281
- package/src/components/Toolbar/Toolbar.tsx +0 -132
- package/src/components/Toolbar/components/ApplianceButtons.tsx +0 -132
- package/src/components/Toolbar/components/AppsButton.tsx +0 -106
- package/src/components/Toolbar/components/Button.tsx +0 -54
- package/src/components/Toolbar/components/ColorBox.tsx +0 -56
- package/src/components/Toolbar/components/CutLine.tsx +0 -8
- package/src/components/Toolbar/components/Mask.tsx +0 -44
- package/src/components/Toolbar/components/PencilButton.tsx +0 -70
- package/src/components/Toolbar/components/ShapesButton.tsx +0 -143
- package/src/components/Toolbar/components/Slider.tsx +0 -27
- package/src/components/Toolbar/components/TextButton.tsx +0 -66
- package/src/components/Toolbar/components/UpDownButtons.tsx +0 -49
- package/src/components/Toolbar/components/assets/cocos.png +0 -0
- package/src/components/Toolbar/components/assets/collapsed.png +0 -0
- package/src/components/Toolbar/components/assets/countdown.png +0 -0
- package/src/components/Toolbar/components/assets/expanded.png +0 -0
- package/src/components/Toolbar/components/assets/geogebra.png +0 -0
- package/src/components/Toolbar/components/assets/vscode.png +0 -0
- package/src/components/Toolbar/const.ts +0 -32
- package/src/components/Toolbar/hooks.ts +0 -112
- package/src/components/Toolbar/icons/Apps.tsx +0 -16
- package/src/components/Toolbar/icons/Arrow.tsx +0 -16
- package/src/components/Toolbar/icons/Circle.tsx +0 -21
- package/src/components/Toolbar/icons/Clean.tsx +0 -16
- package/src/components/Toolbar/icons/Clicker.tsx +0 -19
- package/src/components/Toolbar/icons/Collapse.tsx +0 -17
- package/src/components/Toolbar/icons/Diamond.tsx +0 -17
- package/src/components/Toolbar/icons/Down.tsx +0 -17
- package/src/components/Toolbar/icons/Eraser.tsx +0 -16
- package/src/components/Toolbar/icons/Expand.tsx +0 -17
- package/src/components/Toolbar/icons/Line.tsx +0 -13
- package/src/components/Toolbar/icons/Pencil.tsx +0 -16
- package/src/components/Toolbar/icons/Rectangle.tsx +0 -13
- package/src/components/Toolbar/icons/Selector.tsx +0 -16
- package/src/components/Toolbar/icons/SpeechBalloon.tsx +0 -17
- package/src/components/Toolbar/icons/Star.tsx +0 -17
- package/src/components/Toolbar/icons/Text.tsx +0 -16
- package/src/components/Toolbar/icons/Triangle.tsx +0 -17
- package/src/components/Toolbar/icons/Up.tsx +0 -17
- package/src/components/Toolbar/icons/index.ts +0 -42
- package/src/components/Toolbar/index.ts +0 -2
- package/src/components/ZoomControl/ZoomControl.scss +0 -80
- package/src/components/ZoomControl/ZoomControl.tsx +0 -109
- package/src/components/ZoomControl/hooks.ts +0 -111
- package/src/components/ZoomControl/index.ts +0 -2
- package/src/components/hooks.ts +0 -80
- package/src/i18n/en.json +0 -31
- package/src/i18n/index.ts +0 -22
- package/src/i18n/zh-CN.json +0 -32
- package/src/icons/ChevronLeft.tsx +0 -21
- package/src/icons/ChevronRight.tsx +0 -21
- package/src/icons/FilePlus.tsx +0 -18
- package/src/icons/Minus.tsx +0 -21
- package/src/icons/Plus.tsx +0 -21
- package/src/icons/Redo.tsx +0 -24
- package/src/icons/Reset.tsx +0 -23
- package/src/icons/Undo.tsx +0 -24
- package/src/icons/index.tsx +0 -11
- package/src/internal/Instance.tsx +0 -275
- package/src/internal/helpers.ts +0 -86
- package/src/internal/hooks.ts +0 -9
- package/src/internal/index.ts +0 -3
- package/src/internal/mount-whiteboard.ts +0 -90
- package/src/react.tsx +0 -52
- package/src/style.scss +0 -35
- package/src/svelte.ts +0 -45
- package/src/theme/index.ts +0 -36
- package/src/types/index.ts +0 -22
- package/src/vue.ts +0 -74
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
ApplianceNames,
|
|
3
|
-
Color,
|
|
4
|
-
MemberState,
|
|
5
|
-
Room,
|
|
6
|
-
RoomState,
|
|
7
|
-
ShapeType,
|
|
8
|
-
} from "white-web-sdk";
|
|
9
|
-
import type { WindowManager } from "@netless/window-manager";
|
|
10
|
-
import { useCallback, useEffect, useState } from "react";
|
|
11
|
-
|
|
12
|
-
import { noop } from "../../internal";
|
|
13
|
-
import { useWritable } from "../hooks";
|
|
14
|
-
|
|
15
|
-
export function useRoomState(room?: Room | null) {
|
|
16
|
-
const [memberState, setMemberState] = useState<MemberState | undefined>(
|
|
17
|
-
undefined
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
useEffect(() => {
|
|
21
|
-
if (room) {
|
|
22
|
-
setMemberState(room.state.memberState);
|
|
23
|
-
const onRoomStateChanged = (diff: Partial<RoomState>) => {
|
|
24
|
-
if (diff.memberState) setMemberState(diff.memberState);
|
|
25
|
-
};
|
|
26
|
-
room.callbacks.on("onRoomStateChanged", onRoomStateChanged);
|
|
27
|
-
return () => room.callbacks.off("onRoomStateChanged", onRoomStateChanged);
|
|
28
|
-
}
|
|
29
|
-
}, [room]);
|
|
30
|
-
|
|
31
|
-
return { memberState };
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface ToolbarHook {
|
|
35
|
-
readonly writable: boolean;
|
|
36
|
-
readonly memberState: MemberState | undefined;
|
|
37
|
-
cleanCurrentScene(): void;
|
|
38
|
-
setAppliance(appliance: ApplianceNames, shape?: ShapeType): void;
|
|
39
|
-
setStrokeWidth(width: number): void;
|
|
40
|
-
setStrokeColor(color: Color): void;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export function useToolbar(
|
|
44
|
-
room?: Room | null,
|
|
45
|
-
manager?: WindowManager | null
|
|
46
|
-
): ToolbarHook {
|
|
47
|
-
const writable = useWritable(room);
|
|
48
|
-
const { memberState } = useRoomState(room);
|
|
49
|
-
|
|
50
|
-
const cleanCurrentScene = useCallback(() => {
|
|
51
|
-
if (manager) {
|
|
52
|
-
manager.mainView.cleanCurrentScene();
|
|
53
|
-
} else if (room) {
|
|
54
|
-
room.cleanCurrentScene();
|
|
55
|
-
}
|
|
56
|
-
}, [manager, room]);
|
|
57
|
-
|
|
58
|
-
const setAppliance = useCallback(
|
|
59
|
-
(appliance: ApplianceNames, shape?: ShapeType) => {
|
|
60
|
-
const memberState = {
|
|
61
|
-
currentApplianceName: appliance,
|
|
62
|
-
shapeType: shape,
|
|
63
|
-
};
|
|
64
|
-
if (manager) {
|
|
65
|
-
manager.mainView.setMemberState(memberState);
|
|
66
|
-
} else if (room) {
|
|
67
|
-
room.setMemberState(memberState);
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
[manager, room]
|
|
71
|
-
);
|
|
72
|
-
|
|
73
|
-
const setStrokeWidth = useCallback(
|
|
74
|
-
(strokeWidth: number) => {
|
|
75
|
-
if (manager) {
|
|
76
|
-
manager.mainView.setMemberState({ strokeWidth });
|
|
77
|
-
} else if (room) {
|
|
78
|
-
room.setMemberState({ strokeWidth });
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
[manager, room]
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
const setStrokeColor = useCallback(
|
|
85
|
-
(strokeColor: Color) => {
|
|
86
|
-
if (manager) {
|
|
87
|
-
manager.mainView.setMemberState({ strokeColor });
|
|
88
|
-
} else if (room) {
|
|
89
|
-
room.setMemberState({ strokeColor });
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
[manager, room]
|
|
93
|
-
);
|
|
94
|
-
|
|
95
|
-
return {
|
|
96
|
-
writable,
|
|
97
|
-
memberState,
|
|
98
|
-
cleanCurrentScene,
|
|
99
|
-
setAppliance,
|
|
100
|
-
setStrokeWidth,
|
|
101
|
-
setStrokeColor,
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export const EmptyToolbarHook: ToolbarHook = {
|
|
106
|
-
writable: false,
|
|
107
|
-
memberState: undefined,
|
|
108
|
-
cleanCurrentScene: noop,
|
|
109
|
-
setAppliance: noop,
|
|
110
|
-
setStrokeWidth: noop,
|
|
111
|
-
setStrokeColor: noop,
|
|
112
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from "../../../types";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { getStroke } from "../../../theme";
|
|
5
|
-
|
|
6
|
-
export const Apps = (props: IconProps) => {
|
|
7
|
-
const stroke = getStroke(props);
|
|
8
|
-
return (
|
|
9
|
-
<svg viewBox="0 0 24 24">
|
|
10
|
-
<g fill={stroke}>
|
|
11
|
-
<path d="M17.667 4.5h-3.334c-1.012 0-1.833.82-1.833 1.833V11.5h5.167c1.012 0 1.833-.82 1.833-1.833V6.333c0-1.012-.82-1.833-1.833-1.833Zm-3.334 1h3.334c.46 0 .833.373.833.833v3.334l-.006.104a.833.833 0 0 1-.827.729H13.5V6.333c0-.46.373-.833.833-.833Z" />
|
|
12
|
-
<path d="M6.333 19.5A1.833 1.833 0 0 1 4.5 17.667v-3.334c0-.525.221-1 .576-1.334a1.822 1.822 0 0 1-.576-1.332V8.333c0-1.012.82-1.833 1.833-1.833H10A1.5 1.5 0 0 1 11.5 8v4.5h4.167c.962 0 1.75.74 1.827 1.683l.006.15v3.334c0 1.012-.82 1.833-1.833 1.833Zm4.167-6H6.333a.833.833 0 0 0-.827.729l-.006.104v3.334c0 .46.373.833.833.833H10.5v-5Zm5.167 0H11.5v5h4.167c.46 0 .833-.373.833-.833v-3.334a.833.833 0 0 0-.833-.833ZM10 7.5H6.333a.833.833 0 0 0-.833.833v3.334c0 .46.373.833.833.833H10.5V8a.5.5 0 0 0-.41-.492L10 7.5Z" />
|
|
13
|
-
</g>
|
|
14
|
-
</svg>
|
|
15
|
-
);
|
|
16
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from "../../../types";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { getStroke } from "../../../theme";
|
|
5
|
-
|
|
6
|
-
export const Arrow = (props: IconProps) => {
|
|
7
|
-
const stroke = getStroke(props);
|
|
8
|
-
return (
|
|
9
|
-
<svg viewBox="0 0 24 24">
|
|
10
|
-
<path
|
|
11
|
-
fill={stroke}
|
|
12
|
-
d="M19 5v6l-2.647-2.646L5.99 18.718l-.708-.708L15.645 7.646 13 5h6Z"
|
|
13
|
-
/>
|
|
14
|
-
</svg>
|
|
15
|
-
);
|
|
16
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from "../../../types";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { getStroke } from "../../../theme";
|
|
5
|
-
|
|
6
|
-
export const Circle = (props: IconProps) => {
|
|
7
|
-
const stroke = getStroke(props);
|
|
8
|
-
return (
|
|
9
|
-
<svg viewBox="0 0 24 24">
|
|
10
|
-
<rect
|
|
11
|
-
width="15"
|
|
12
|
-
height="15"
|
|
13
|
-
x="4.5"
|
|
14
|
-
y="4.5"
|
|
15
|
-
fill="none"
|
|
16
|
-
stroke={stroke}
|
|
17
|
-
rx="7.5"
|
|
18
|
-
/>
|
|
19
|
-
</svg>
|
|
20
|
-
);
|
|
21
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from "../../../types";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { getStroke } from "../../../theme";
|
|
5
|
-
|
|
6
|
-
export const Clean = (props: IconProps) => {
|
|
7
|
-
const stroke = getStroke(props);
|
|
8
|
-
return (
|
|
9
|
-
<svg viewBox="0 0 24 24">
|
|
10
|
-
<path
|
|
11
|
-
fill={stroke}
|
|
12
|
-
d="M9.754 11.99c0 1.856-.711 3.62-1.96 4.951l-.151.155h1.403l.855-.853h.707l.853.853h2.635l.094-.064a6.237 6.237 0 0 0 2.559-4.781l.005-.26h1a7.237 7.237 0 0 1-2.994 5.862l-.229.16-.277.083h-3l-.353-.146-.647-.647-.646.647-.354.146h-3l-.286-.91.214-.148a6.237 6.237 0 0 0 2.567-4.787l.005-.26h1Zm4.772-6.502v2l.35.039a2.98 2.98 0 0 1 2.644 2.78l.006.181h-8a2.98 2.98 0 0 1 2.65-2.961l.35-.039v-2h2Z"
|
|
13
|
-
/>
|
|
14
|
-
</svg>
|
|
15
|
-
);
|
|
16
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from "../../../types";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { getStroke } from "../../../theme";
|
|
5
|
-
|
|
6
|
-
export const Clicker = (props: IconProps) => {
|
|
7
|
-
const stroke = getStroke(props);
|
|
8
|
-
return (
|
|
9
|
-
<svg viewBox="0 0 24 24">
|
|
10
|
-
<g fill="none">
|
|
11
|
-
<path d="M0 0h24v24H0z" />
|
|
12
|
-
<path
|
|
13
|
-
fill={stroke}
|
|
14
|
-
d="m7 5.072 10.33 7.892-4.879.549 3.232 5.598-.866.5-3.233-5.597-2.914 3.95L7 5.072Z"
|
|
15
|
-
/>
|
|
16
|
-
</g>
|
|
17
|
-
</svg>
|
|
18
|
-
);
|
|
19
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from "../../../types";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { getStroke } from "../../../theme";
|
|
5
|
-
|
|
6
|
-
export const Collapse = (props: IconProps) => {
|
|
7
|
-
const stroke = getStroke(props);
|
|
8
|
-
return (
|
|
9
|
-
<svg viewBox="0 0 24 24">
|
|
10
|
-
<path
|
|
11
|
-
fill="none"
|
|
12
|
-
stroke={stroke}
|
|
13
|
-
d="m8 10-2 2 2 2m10-8H6m12 12H6m12-4h-8m8-4h-8"
|
|
14
|
-
/>
|
|
15
|
-
</svg>
|
|
16
|
-
);
|
|
17
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from "../../../types";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { getStroke } from "../../../theme";
|
|
5
|
-
|
|
6
|
-
export const Diamond = (props: IconProps) => {
|
|
7
|
-
const stroke = getStroke(props);
|
|
8
|
-
return (
|
|
9
|
-
<svg viewBox="0 0 24 24">
|
|
10
|
-
<path
|
|
11
|
-
fill="none"
|
|
12
|
-
stroke={stroke}
|
|
13
|
-
d="M4.222 12 12 4.222 19.778 12 12 19.778z"
|
|
14
|
-
/>
|
|
15
|
-
</svg>
|
|
16
|
-
);
|
|
17
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from "../../../types";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { getStroke } from "../../../theme";
|
|
5
|
-
|
|
6
|
-
export const Down = (props: IconProps) => {
|
|
7
|
-
const stroke = getStroke(props);
|
|
8
|
-
return (
|
|
9
|
-
<svg viewBox="0 0 24 24">
|
|
10
|
-
<path
|
|
11
|
-
fill="none"
|
|
12
|
-
stroke={stroke}
|
|
13
|
-
d="m16 13-2 2-2 2-2-2-2-2m8-6-2 2-2 2-2-2-2-2"
|
|
14
|
-
/>
|
|
15
|
-
</svg>
|
|
16
|
-
);
|
|
17
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from "../../../types";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { getStroke } from "../../../theme";
|
|
5
|
-
|
|
6
|
-
export const Eraser = (props: IconProps) => {
|
|
7
|
-
const stroke = getStroke(props);
|
|
8
|
-
return (
|
|
9
|
-
<svg viewBox="0 0 24 24">
|
|
10
|
-
<path
|
|
11
|
-
fill={stroke}
|
|
12
|
-
d="m14.333 5.183.165.007c.494.037.978.245 1.356.623l2.333 2.333a2.15 2.15 0 0 1 0 3.04l-5.833 5.834a3.8 3.8 0 0 1-5.374 0l-1.167-1.166a2.15 2.15 0 0 1 0-3.04l7-7c.42-.42.97-.63 1.52-.63ZM11.52 8.52l-4.999 5a1.15 1.15 0 0 0 0 1.626l1.167 1.167a2.8 2.8 0 0 0 3.96 0l3.832-3.833-3.96-3.96Z"
|
|
13
|
-
/>
|
|
14
|
-
</svg>
|
|
15
|
-
);
|
|
16
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from "../../../types";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { getStroke } from "../../../theme";
|
|
5
|
-
|
|
6
|
-
export const Expand = (props: IconProps) => {
|
|
7
|
-
const stroke = getStroke(props);
|
|
8
|
-
return (
|
|
9
|
-
<svg viewBox="0 0 24 24">
|
|
10
|
-
<path
|
|
11
|
-
fill="none"
|
|
12
|
-
stroke={stroke}
|
|
13
|
-
d="m16 10 2 2-2 2M6 6h12M6 18h12M6 14h8m-8-4h8"
|
|
14
|
-
/>
|
|
15
|
-
</svg>
|
|
16
|
-
);
|
|
17
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from "../../../types";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { getStroke } from "../../../theme";
|
|
5
|
-
|
|
6
|
-
export const Line = (props: IconProps) => {
|
|
7
|
-
const stroke = getStroke(props);
|
|
8
|
-
return (
|
|
9
|
-
<svg viewBox="0 0 24 24">
|
|
10
|
-
<path fill={stroke} d="m18.01 5.282.708.708L5.99 18.718l-.708-.708z" />
|
|
11
|
-
</svg>
|
|
12
|
-
);
|
|
13
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from "../../../types";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { getStroke } from "../../../theme";
|
|
5
|
-
|
|
6
|
-
export const Pencil = (props: IconProps) => {
|
|
7
|
-
const stroke = getStroke(props);
|
|
8
|
-
return (
|
|
9
|
-
<svg viewBox="0 0 24 24">
|
|
10
|
-
<path
|
|
11
|
-
fill={stroke}
|
|
12
|
-
d="m17.497 4.84.116.105 1.442 1.442a1.52 1.52 0 0 1 .104 2.034l-.104.116L8.733 18.858l-4.347.756.756-4.347L15.463 4.945a1.52 1.52 0 0 1 2.034-.104ZM5.967 16.349l-.353 2.037 2.037-.354-1.683-1.683Zm8.407-8.901-7.946 7.946 2.178 2.178 7.946-7.946-2.178-2.178Zm-.728 2.2.708.707-5 5-.708-.708 5-5Zm2.596-4.055-.072.06-1.09 1.088 2.179 2.178 1.089-1.088a.52.52 0 0 0 .105-.584l-.045-.08-.06-.072-1.442-1.442a.52.52 0 0 0-.664-.06Z"
|
|
13
|
-
/>
|
|
14
|
-
</svg>
|
|
15
|
-
);
|
|
16
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from "../../../types";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { getStroke } from "../../../theme";
|
|
5
|
-
|
|
6
|
-
export const Rectangle = (props: IconProps) => {
|
|
7
|
-
const stroke = getStroke(props);
|
|
8
|
-
return (
|
|
9
|
-
<svg viewBox="0 0 24 24">
|
|
10
|
-
<path fill="none" stroke={stroke} d="M5.5 5.5h13v13h-13z" />
|
|
11
|
-
</svg>
|
|
12
|
-
);
|
|
13
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from "../../../types";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { getStroke } from "../../../theme";
|
|
5
|
-
|
|
6
|
-
export const Selector = (props: IconProps) => {
|
|
7
|
-
const stroke = getStroke(props);
|
|
8
|
-
return (
|
|
9
|
-
<svg viewBox="0 0 24 24">
|
|
10
|
-
<path
|
|
11
|
-
fill={stroke}
|
|
12
|
-
d="m12 12 8 2.667-3.556 1.777L14.667 20 12 12Zm3-8v7.5h-1V5H5v9h6.5v1H4V4h11Z"
|
|
13
|
-
/>
|
|
14
|
-
</svg>
|
|
15
|
-
);
|
|
16
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from "../../../types";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { getStroke } from "../../../theme";
|
|
5
|
-
|
|
6
|
-
export const SpeechBalloon = (props: IconProps) => {
|
|
7
|
-
const stroke = getStroke(props);
|
|
8
|
-
return (
|
|
9
|
-
<svg viewBox="0 0 24 24">
|
|
10
|
-
<path
|
|
11
|
-
fill="none"
|
|
12
|
-
stroke={stroke}
|
|
13
|
-
d="M17 4.5c.414 0 .79.168 1.06.44.272.27.44.646.44 1.06v9c0 .414-.168.79-.44 1.06a1.49 1.49 0 0 1-1.06.44h-4.207l-2.715 2.715-1.81-2.715H7a1.49 1.49 0 0 1-1.06-.44A1.495 1.495 0 0 1 5.5 15V6c0-.414.168-.79.44-1.06A1.49 1.49 0 0 1 7 4.5Z"
|
|
14
|
-
/>
|
|
15
|
-
</svg>
|
|
16
|
-
);
|
|
17
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from "../../../types";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { getStroke } from "../../../theme";
|
|
5
|
-
|
|
6
|
-
export const Star = (props: IconProps) => {
|
|
7
|
-
const stroke = getStroke(props);
|
|
8
|
-
return (
|
|
9
|
-
<svg viewBox="0 0 24 24">
|
|
10
|
-
<path
|
|
11
|
-
fill="none"
|
|
12
|
-
stroke={stroke}
|
|
13
|
-
d="m12 3.523 1.993 5.734 6.07.123-4.838 3.668 1.758 5.81L12 15.391l-4.983 3.467 1.758-5.81L3.938 9.38l6.069-.123L12 3.523Z"
|
|
14
|
-
/>
|
|
15
|
-
</svg>
|
|
16
|
-
);
|
|
17
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from "../../../types";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { getStroke } from "../../../theme";
|
|
5
|
-
|
|
6
|
-
export const Text = (props: IconProps) => {
|
|
7
|
-
const stroke = getStroke(props);
|
|
8
|
-
return (
|
|
9
|
-
<svg viewBox="0 0 24 24">
|
|
10
|
-
<path
|
|
11
|
-
fill={stroke}
|
|
12
|
-
d="M18.5 5.5V8h-1V6.5H13v11h2v1H9v-1h2v-11H6.5V8h-1V5.5h13Z"
|
|
13
|
-
/>
|
|
14
|
-
</svg>
|
|
15
|
-
);
|
|
16
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from "../../../types";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { getStroke } from "../../../theme";
|
|
5
|
-
|
|
6
|
-
export const Triangle = (props: IconProps) => {
|
|
7
|
-
const stroke = getStroke(props);
|
|
8
|
-
return (
|
|
9
|
-
<svg viewBox="0 0 24 24">
|
|
10
|
-
<path
|
|
11
|
-
fill="none"
|
|
12
|
-
stroke={stroke}
|
|
13
|
-
d="M12 6.008 19.138 18.5H4.862L12 6.008Z"
|
|
14
|
-
/>
|
|
15
|
-
</svg>
|
|
16
|
-
);
|
|
17
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from "../../../types";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { getStroke } from "../../../theme";
|
|
5
|
-
|
|
6
|
-
export const Up = (props: IconProps) => {
|
|
7
|
-
const stroke = getStroke(props);
|
|
8
|
-
return (
|
|
9
|
-
<svg viewBox="0 0 24 24">
|
|
10
|
-
<path
|
|
11
|
-
fill="none"
|
|
12
|
-
stroke={stroke}
|
|
13
|
-
d="m16 11-2-2-2-2-2 2-2 2m8 6-2-2-2-2-2 2-2 2"
|
|
14
|
-
/>
|
|
15
|
-
</svg>
|
|
16
|
-
);
|
|
17
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { memo } from "react";
|
|
2
|
-
import { Apps } from "./Apps";
|
|
3
|
-
import { Arrow } from "./Arrow";
|
|
4
|
-
import { Circle } from "./Circle";
|
|
5
|
-
import { Clean } from "./Clean";
|
|
6
|
-
import { Clicker } from "./Clicker";
|
|
7
|
-
import { Collapse } from "./Collapse";
|
|
8
|
-
import { Diamond } from "./Diamond";
|
|
9
|
-
import { Down } from "./Down";
|
|
10
|
-
import { Eraser } from "./Eraser";
|
|
11
|
-
import { Expand } from "./Expand";
|
|
12
|
-
import { Line } from "./Line";
|
|
13
|
-
import { Pencil } from "./Pencil";
|
|
14
|
-
import { Rectangle } from "./Rectangle";
|
|
15
|
-
import { Selector } from "./Selector";
|
|
16
|
-
import { SpeechBalloon } from "./SpeechBalloon";
|
|
17
|
-
import { Star } from "./Star";
|
|
18
|
-
import { Text } from "./Text";
|
|
19
|
-
import { Triangle } from "./Triangle";
|
|
20
|
-
import { Up } from "./Up";
|
|
21
|
-
|
|
22
|
-
export const Icons = {
|
|
23
|
-
Clicker: memo(Clicker),
|
|
24
|
-
Collapse: memo(Collapse),
|
|
25
|
-
Eraser: memo(Eraser),
|
|
26
|
-
Expand: memo(Expand),
|
|
27
|
-
Pencil: memo(Pencil),
|
|
28
|
-
Selector: memo(Selector),
|
|
29
|
-
Rectangle: memo(Rectangle),
|
|
30
|
-
Text: memo(Text),
|
|
31
|
-
Apps: memo(Apps),
|
|
32
|
-
Clean: memo(Clean),
|
|
33
|
-
Circle: memo(Circle),
|
|
34
|
-
Line: memo(Line),
|
|
35
|
-
Arrow: memo(Arrow),
|
|
36
|
-
Star: memo(Star),
|
|
37
|
-
Diamond: memo(Diamond),
|
|
38
|
-
SpeechBalloon: memo(SpeechBalloon),
|
|
39
|
-
Triangle: memo(Triangle),
|
|
40
|
-
Up: memo(Up),
|
|
41
|
-
Down: memo(Down),
|
|
42
|
-
};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
$name: "fastboard-zoom-control";
|
|
2
|
-
|
|
3
|
-
.#{$name} {
|
|
4
|
-
position: relative;
|
|
5
|
-
display: inline-flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
gap: 4px;
|
|
8
|
-
padding: 4px;
|
|
9
|
-
border-radius: 4px;
|
|
10
|
-
backdrop-filter: blur(2px);
|
|
11
|
-
-webkit-backdrop-filter: blur(2px);
|
|
12
|
-
|
|
13
|
-
&.light {
|
|
14
|
-
color: #333;
|
|
15
|
-
background-color: rgba($color: #fff, $alpha: 0.85);
|
|
16
|
-
border: 1px solid rgba(0, 0, 0, 0.15);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&.dark {
|
|
20
|
-
color: #ddd;
|
|
21
|
-
background-color: rgba($color: #333, $alpha: 0.85);
|
|
22
|
-
border: 1px solid rgba(0, 0, 0, 0.45);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.#{$name}-btn {
|
|
27
|
-
appearance: none;
|
|
28
|
-
cursor: pointer;
|
|
29
|
-
margin: 0;
|
|
30
|
-
border: 0;
|
|
31
|
-
padding: 0;
|
|
32
|
-
width: 24px;
|
|
33
|
-
height: 24px;
|
|
34
|
-
background-color: transparent;
|
|
35
|
-
border-radius: 4px;
|
|
36
|
-
font-size: 24px;
|
|
37
|
-
line-height: 1;
|
|
38
|
-
|
|
39
|
-
svg,
|
|
40
|
-
img {
|
|
41
|
-
width: 1em;
|
|
42
|
-
height: 1em;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&:disabled {
|
|
46
|
-
opacity: 0.5;
|
|
47
|
-
cursor: not-allowed;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&.light:not(:disabled):hover {
|
|
51
|
-
background-color: rgba(51, 129, 255, 0.1);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&.dark:not(:disabled):hover {
|
|
55
|
-
background-color: rgba(51, 129, 255, 0.25);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.#{$name}-cut-line {
|
|
60
|
-
height: 24px;
|
|
61
|
-
width: 0.5px;
|
|
62
|
-
|
|
63
|
-
&.light {
|
|
64
|
-
background-color: #e7e7e7;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&.dark {
|
|
68
|
-
background-color: rgba(255, 255, 255, 0.15);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.#{$name}-percent {
|
|
73
|
-
opacity: 0.6;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.#{$name}-scale,
|
|
77
|
-
.#{$name}-percent {
|
|
78
|
-
font-size: 12px;
|
|
79
|
-
font-variant-numeric: tabular-nums;
|
|
80
|
-
}
|