@netless/fastboard 0.0.8 → 0.1.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.
Files changed (107) hide show
  1. package/LICENSE.txt +1 -1
  2. package/dist/index.js +426 -0
  3. package/dist/index.js.map +1 -0
  4. package/dist/index.mjs +393 -0
  5. package/dist/index.mjs.map +1 -0
  6. package/package.json +16 -71
  7. package/src/base.ts +55 -0
  8. package/src/core.ts +307 -0
  9. package/src/emitter.ts +21 -0
  10. package/src/index.ts +70 -24
  11. package/src/{behaviors/register-apps.ts → register-apps.ts} +6 -14
  12. package/src/utils.ts +74 -0
  13. package/src/value.ts +74 -0
  14. package/README.md +0 -134
  15. package/dist/index.cjs.js +0 -14
  16. package/dist/index.cjs.js.map +0 -1
  17. package/dist/index.es.js +0 -2538
  18. package/dist/index.es.js.map +0 -1
  19. package/dist/svelte.cjs.js +0 -2
  20. package/dist/svelte.cjs.js.map +0 -1
  21. package/dist/svelte.es.js +0 -31
  22. package/dist/svelte.es.js.map +0 -1
  23. package/dist/vue.cjs.js +0 -2
  24. package/dist/vue.cjs.js.map +0 -1
  25. package/dist/vue.es.js +0 -42
  26. package/dist/vue.es.js.map +0 -1
  27. package/src/WhiteboardApp.ts +0 -80
  28. package/src/behaviors/style.ts +0 -17
  29. package/src/components/PageControl.scss +0 -80
  30. package/src/components/PageControl.tsx +0 -181
  31. package/src/components/PlayerControl/PlayerControl.scss +0 -145
  32. package/src/components/PlayerControl/PlayerControl.tsx +0 -158
  33. package/src/components/PlayerControl/components/Button.tsx +0 -55
  34. package/src/components/PlayerControl/hooks.ts +0 -95
  35. package/src/components/PlayerControl/icons/Loading.tsx +0 -13
  36. package/src/components/PlayerControl/icons/Pause.tsx +0 -13
  37. package/src/components/PlayerControl/icons/Play.tsx +0 -13
  38. package/src/components/PlayerControl/icons/index.ts +0 -10
  39. package/src/components/PlayerControl/index.ts +0 -1
  40. package/src/components/RedoUndo.scss +0 -56
  41. package/src/components/RedoUndo.tsx +0 -95
  42. package/src/components/Root.scss +0 -55
  43. package/src/components/Root.tsx +0 -61
  44. package/src/components/Toolbar/Content.tsx +0 -93
  45. package/src/components/Toolbar/Toolbar.scss +0 -247
  46. package/src/components/Toolbar/Toolbar.tsx +0 -82
  47. package/src/components/Toolbar/components/ApplianceButtons.tsx +0 -132
  48. package/src/components/Toolbar/components/AppsButton.tsx +0 -106
  49. package/src/components/Toolbar/components/Button.tsx +0 -54
  50. package/src/components/Toolbar/components/ColorBox.tsx +0 -56
  51. package/src/components/Toolbar/components/CutLine.tsx +0 -8
  52. package/src/components/Toolbar/components/PencilButton.tsx +0 -70
  53. package/src/components/Toolbar/components/ShapesButton.tsx +0 -143
  54. package/src/components/Toolbar/components/Slider.tsx +0 -27
  55. package/src/components/Toolbar/components/TextButton.tsx +0 -66
  56. package/src/components/Toolbar/components/UpDownButtons.tsx +0 -49
  57. package/src/components/Toolbar/components/assets/cocos.png +0 -0
  58. package/src/components/Toolbar/components/assets/countdown.png +0 -0
  59. package/src/components/Toolbar/components/assets/geogebra.png +0 -0
  60. package/src/components/Toolbar/components/assets/vscode.png +0 -0
  61. package/src/components/Toolbar/const.ts +0 -32
  62. package/src/components/Toolbar/hooks.ts +0 -113
  63. package/src/components/Toolbar/icons/Apps.tsx +0 -16
  64. package/src/components/Toolbar/icons/Arrow.tsx +0 -16
  65. package/src/components/Toolbar/icons/Circle.tsx +0 -21
  66. package/src/components/Toolbar/icons/Clean.tsx +0 -16
  67. package/src/components/Toolbar/icons/Clicker.tsx +0 -19
  68. package/src/components/Toolbar/icons/Collapse.tsx +0 -17
  69. package/src/components/Toolbar/icons/Diamond.tsx +0 -17
  70. package/src/components/Toolbar/icons/Down.tsx +0 -17
  71. package/src/components/Toolbar/icons/Eraser.tsx +0 -16
  72. package/src/components/Toolbar/icons/Expand.tsx +0 -17
  73. package/src/components/Toolbar/icons/Line.tsx +0 -13
  74. package/src/components/Toolbar/icons/Pencil.tsx +0 -16
  75. package/src/components/Toolbar/icons/Rectangle.tsx +0 -13
  76. package/src/components/Toolbar/icons/Selector.tsx +0 -16
  77. package/src/components/Toolbar/icons/SpeechBalloon.tsx +0 -17
  78. package/src/components/Toolbar/icons/Star.tsx +0 -17
  79. package/src/components/Toolbar/icons/Text.tsx +0 -16
  80. package/src/components/Toolbar/icons/Triangle.tsx +0 -17
  81. package/src/components/Toolbar/icons/Up.tsx +0 -17
  82. package/src/components/Toolbar/icons/index.ts +0 -42
  83. package/src/components/Toolbar/index.ts +0 -1
  84. package/src/components/ZoomControl.scss +0 -80
  85. package/src/components/ZoomControl.tsx +0 -221
  86. package/src/hooks.ts +0 -53
  87. package/src/i18n/en.json +0 -31
  88. package/src/i18n/index.ts +0 -22
  89. package/src/i18n/zh-CN.json +0 -32
  90. package/src/icons/ChevronLeft.tsx +0 -21
  91. package/src/icons/ChevronRight.tsx +0 -21
  92. package/src/icons/FilePlus.tsx +0 -18
  93. package/src/icons/Minus.tsx +0 -21
  94. package/src/icons/Plus.tsx +0 -21
  95. package/src/icons/Redo.tsx +0 -24
  96. package/src/icons/Reset.tsx +0 -23
  97. package/src/icons/Undo.tsx +0 -24
  98. package/src/icons/index.tsx +0 -11
  99. package/src/internal/Instance.tsx +0 -251
  100. package/src/internal/helpers.ts +0 -42
  101. package/src/internal/index.ts +0 -3
  102. package/src/internal/mount-whiteboard.ts +0 -90
  103. package/src/style.scss +0 -29
  104. package/src/svelte.ts +0 -45
  105. package/src/theme/index.ts +0 -36
  106. package/src/types/index.ts +0 -22
  107. package/src/vue.ts +0 -74
@@ -1,66 +0,0 @@
1
- import Tippy from "@tippyjs/react";
2
- import React, { useCallback } from "react";
3
- import { useContext } from "react";
4
- import { ApplianceNames } from "white-web-sdk";
5
-
6
- import { defaultHotKeys, useInstance } from "../../../internal";
7
- import { Icon } from "../../../icons";
8
- import { RightOffset } from "../../../theme";
9
- import { Icons } from "../icons";
10
- import { ToolbarContext } from "../Toolbar";
11
- import { Button } from "./Button";
12
- import { ColorBox } from "./ColorBox";
13
- import { renderToolTip } from "./ApplianceButtons";
14
-
15
- export function TextButton() {
16
- const app = useInstance();
17
-
18
- const { theme, icons, writable, setAppliance, memberState, i18n } =
19
- useContext(ToolbarContext);
20
-
21
- const changeAppliance = useCallback(() => {
22
- setAppliance(ApplianceNames.text);
23
- }, [setAppliance]);
24
-
25
- const appliance = memberState?.currentApplianceName;
26
- const active = appliance === ApplianceNames.text;
27
- const disabled = !writable;
28
- const shortcut = (app?.config.joinRoom.hotKeys || defaultHotKeys)
29
- .changeToText;
30
-
31
- return (
32
- <span className="fastboard-toolbar-btn-interactive">
33
- <Tippy
34
- className="fastboard-tip"
35
- content={renderTextButtonContent()}
36
- theme={theme}
37
- placement="right-start"
38
- trigger="click"
39
- offset={RightOffset}
40
- arrow={false}
41
- interactive
42
- >
43
- <Button
44
- content={renderToolTip(i18n?.t("text"), shortcut)}
45
- active={active}
46
- onClick={changeAppliance}
47
- >
48
- <Icon
49
- fallback={<Icons.Text theme={theme} active={active} />}
50
- src={disabled ? icons?.textIconDisable : icons?.textIcon}
51
- alt="[text]"
52
- />
53
- <span className="fastboard-toolbar-triangle" />
54
- </Button>
55
- </Tippy>
56
- </span>
57
- );
58
- }
59
-
60
- function renderTextButtonContent() {
61
- return (
62
- <div className="fastboard-toolbar-panel text">
63
- <ColorBox />
64
- </div>
65
- );
66
- }
@@ -1,49 +0,0 @@
1
- import React, { useCallback, useContext } from "react";
2
-
3
- import { Icon } from "../../../icons";
4
- import { Icons } from "../icons";
5
- import { Button } from "./Button";
6
- import { CutLine } from "./CutLine";
7
- import { ToolbarContext } from "../Toolbar";
8
- import { ItemHeight } from "../const";
9
-
10
- export interface UpButtonProps {
11
- disabled: boolean;
12
- scrollTo: (height: number) => void;
13
- }
14
-
15
- export function UpButton({ disabled, scrollTo }: UpButtonProps) {
16
- const { theme, icons } = useContext(ToolbarContext);
17
- const scrollUp = useCallback(() => scrollTo(-ItemHeight), [scrollTo]);
18
-
19
- return (
20
- <>
21
- <Button content="Up" disabled={disabled} onClick={scrollUp}>
22
- <Icon
23
- fallback={<Icons.Up theme={theme} />}
24
- src={disabled ? icons?.upIconDisable : icons?.upIcon}
25
- alt="[up]"
26
- />
27
- </Button>
28
- <CutLine />
29
- </>
30
- );
31
- }
32
-
33
- export function DownButton({ disabled, scrollTo }: UpButtonProps) {
34
- const { theme, icons } = useContext(ToolbarContext);
35
- const scrollDown = useCallback(() => scrollTo(ItemHeight), [scrollTo]);
36
-
37
- return (
38
- <>
39
- <CutLine />
40
- <Button content="Down" disabled={disabled} onClick={scrollDown}>
41
- <Icon
42
- fallback={<Icons.Down theme={theme} />}
43
- src={disabled ? icons?.downIconDisable : icons?.downIcon}
44
- alt="[down]"
45
- />
46
- </Button>
47
- </>
48
- );
49
- }
@@ -1,32 +0,0 @@
1
- import { ApplianceNames, ShapeType } from "white-web-sdk";
2
- import { Icons } from "./icons";
3
-
4
- export const ShapesMap = {
5
- [ApplianceNames.rectangle]: Icons.Rectangle,
6
- [ApplianceNames.ellipse]: Icons.Circle,
7
- [ApplianceNames.straight]: Icons.Line,
8
- [ApplianceNames.arrow]: Icons.Arrow,
9
- [ShapeType.Pentagram]: Icons.Star,
10
- [ShapeType.Rhombus]: Icons.Diamond,
11
- [ShapeType.Triangle]: Icons.Triangle,
12
- [ShapeType.SpeechBalloon]: Icons.SpeechBalloon,
13
- } as const;
14
-
15
- export const ApplianceShapes = [
16
- ApplianceNames.rectangle,
17
- ApplianceNames.ellipse,
18
- ApplianceNames.straight,
19
- ApplianceNames.arrow,
20
- ] as const;
21
-
22
- export const Shapes = [
23
- ShapeType.Pentagram,
24
- ShapeType.Rhombus,
25
- ShapeType.Triangle,
26
- ShapeType.SpeechBalloon,
27
- ] as const;
28
-
29
- export const ItemHeight = 32 + 4;
30
- export const ItemsCount = 8;
31
- export const MaxHeight = ItemHeight * ItemsCount - 4;
32
- export const MinHeight = ItemHeight * 2 - 4;
@@ -1,113 +0,0 @@
1
- import type {
2
- ApplianceNames,
3
- Color,
4
- MemberState,
5
- Room,
6
- RoomState,
7
- ShapeType,
8
- } from "white-web-sdk";
9
-
10
- import { useCallback, useEffect, useState } from "react";
11
- import { noop } from "../../internal";
12
-
13
- export function useWritable(room?: Room | null) {
14
- const [value, setValue] = useState(false);
15
-
16
- useEffect(() => {
17
- if (room) {
18
- const setWritable = () => setValue(room.isWritable);
19
- setWritable();
20
- room.callbacks.on("onEnableWriteNowChanged", setWritable);
21
- return () => room.callbacks.off("onEnableWriteNowChanged", setWritable);
22
- }
23
- }, [room]);
24
-
25
- return value;
26
- }
27
-
28
- export function useRoomState(room?: Room | null) {
29
- const [memberState, setMemberState] = useState<MemberState | undefined>(
30
- undefined
31
- );
32
-
33
- useEffect(() => {
34
- if (room) {
35
- setMemberState(room.state.memberState);
36
- const onRoomStateChanged = (diff: Partial<RoomState>) => {
37
- if (diff.memberState) setMemberState(diff.memberState);
38
- };
39
- room.callbacks.on("onRoomStateChanged", onRoomStateChanged);
40
- return () => room.callbacks.off("onRoomStateChanged", onRoomStateChanged);
41
- }
42
- }, [room]);
43
-
44
- return { memberState };
45
- }
46
-
47
- export interface ToolbarHook {
48
- readonly writable: boolean;
49
- readonly memberState: MemberState | undefined;
50
- cleanCurrentScene(): void;
51
- setAppliance(appliance: ApplianceNames, shape?: ShapeType): void;
52
- setStrokeWidth(width: number): void;
53
- setStrokeColor(color: Color): void;
54
- }
55
-
56
- export function useToolbar(room?: Room | null): ToolbarHook {
57
- const writable = useWritable(room);
58
- const { memberState } = useRoomState(room);
59
-
60
- const cleanCurrentScene = useCallback(() => {
61
- if (room?.isWritable) {
62
- room.cleanCurrentScene();
63
- }
64
- }, [room]);
65
-
66
- const setAppliance = useCallback(
67
- (appliance: ApplianceNames, shape?: ShapeType) => {
68
- if (room?.isWritable) {
69
- room.setMemberState({
70
- currentApplianceName: appliance,
71
- shapeType: shape,
72
- });
73
- }
74
- },
75
- [room]
76
- );
77
-
78
- const setStrokeWidth = useCallback(
79
- (strokeWidth: number) => {
80
- if (room?.isWritable) {
81
- room.setMemberState({ strokeWidth });
82
- }
83
- },
84
- [room]
85
- );
86
-
87
- const setStrokeColor = useCallback(
88
- (strokeColor: Color) => {
89
- if (room?.isWritable) {
90
- room.setMemberState({ strokeColor });
91
- }
92
- },
93
- [room]
94
- );
95
-
96
- return {
97
- writable,
98
- memberState,
99
- cleanCurrentScene,
100
- setAppliance,
101
- setStrokeWidth,
102
- setStrokeColor,
103
- };
104
- }
105
-
106
- export const EmptyToolbarHook: ToolbarHook = {
107
- writable: false,
108
- memberState: undefined,
109
- cleanCurrentScene: noop,
110
- setAppliance: noop,
111
- setStrokeWidth: noop,
112
- setStrokeColor: noop,
113
- };
@@ -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 +0,0 @@
1
- export { name, Toolbar, type ToolbarProps } from "./Toolbar";