@netless/fastboard-ui 0.3.2-canary.5 → 0.3.3
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 +21 -21
- package/README.md +7 -7
- package/dist/index.d.ts +102 -102
- package/dist/index.js +30 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -23
- package/dist/index.mjs.map +1 -1
- package/dist/index.svelte.mjs +22 -17
- package/dist/index.svelte.mjs.map +1 -1
- package/package.json +4 -5
- package/src/actions/height.ts +43 -43
- package/src/actions/scroll.ts +31 -31
- package/src/actions/tippy.ts +71 -71
- package/src/behaviors/apps.ts +74 -74
- package/src/behaviors/index.ts +1 -1
- package/src/components/Button/Button.svelte +51 -51
- package/src/components/Button/Button.svelte.d.ts +26 -26
- package/src/components/Button/index.ts +2 -2
- package/src/components/Fastboard/Fastboard.scss +61 -61
- package/src/components/Fastboard/Fastboard.svelte +80 -80
- package/src/components/Fastboard/Fastboard.svelte.ts +14 -14
- package/src/components/Fastboard/ReplayFastboard.svelte +43 -43
- package/src/components/Fastboard/ReplayFastboard.svelte.ts +13 -13
- package/src/components/Fastboard/index.ts +5 -5
- package/src/components/Icon/Icon.svelte +11 -11
- package/src/components/Icon/Icon.svelte.d.ts +10 -10
- package/src/components/Icon/index.ts +2 -2
- package/src/components/Icons/Apps.svelte +49 -49
- package/src/components/Icons/Arrow.svelte +16 -16
- package/src/components/Icons/ArrowBolded.svelte +17 -17
- package/src/components/Icons/Balloon.svelte +16 -16
- package/src/components/Icons/BalloonBolded.svelte +16 -16
- package/src/components/Icons/Circle.svelte +20 -20
- package/src/components/Icons/CircleBolded.svelte +20 -20
- package/src/components/Icons/Clean.svelte +14 -14
- package/src/components/Icons/Clear.svelte +16 -16
- package/src/components/Icons/Click.svelte +16 -16
- package/src/components/Icons/ClickFilled.svelte +10 -10
- package/src/components/Icons/Diamond.svelte +16 -16
- package/src/components/Icons/Down.svelte +16 -16
- package/src/components/Icons/Eraser.svelte +16 -16
- package/src/components/Icons/EraserFilled.svelte +16 -16
- package/src/components/Icons/Icons.scss +20 -20
- package/src/components/Icons/Left.svelte +16 -16
- package/src/components/Icons/Line.svelte +16 -16
- package/src/components/Icons/LineBolded.svelte +16 -16
- package/src/components/Icons/Loading.svelte +10 -10
- package/src/components/Icons/Minus.svelte +16 -16
- package/src/components/Icons/Pause.svelte +10 -10
- package/src/components/Icons/Pencil.svelte +29 -29
- package/src/components/Icons/PencilFilled.svelte +16 -16
- package/src/components/Icons/Play.svelte +10 -10
- package/src/components/Icons/Plus.svelte +16 -16
- package/src/components/Icons/Rectangle.svelte +16 -16
- package/src/components/Icons/RectangleBolded.svelte +16 -16
- package/src/components/Icons/Redo.svelte +15 -15
- package/src/components/Icons/Reset.svelte +26 -26
- package/src/components/Icons/Rhombus.svelte +16 -16
- package/src/components/Icons/RhombusBolded.svelte +16 -16
- package/src/components/Icons/Right.svelte +16 -16
- package/src/components/Icons/Selector.svelte +24 -24
- package/src/components/Icons/SelectorFilled.svelte +18 -18
- package/src/components/Icons/SpeechBalloon.svelte +16 -16
- package/src/components/Icons/Star.svelte +16 -16
- package/src/components/Icons/StarBolded.svelte +16 -16
- package/src/components/Icons/Text.svelte +16 -16
- package/src/components/Icons/TextFilled.svelte +17 -17
- package/src/components/Icons/Triangle.svelte +16 -16
- package/src/components/Icons/TriangleBolded.svelte +16 -16
- package/src/components/Icons/Undo.svelte +15 -15
- package/src/components/Icons/Up.svelte +16 -16
- package/src/components/Icons/WhiteboardAdd.svelte +34 -34
- package/src/components/Icons/index.ts +93 -93
- package/src/components/PageControl/PageControl.scss +15 -15
- package/src/components/PageControl/PageControl.svelte +79 -79
- package/src/components/PageControl/PageControl.svelte.d.ts +13 -13
- package/src/components/PageControl/index.ts +2 -2
- package/src/components/PlayerControl/PlayerControl.scss +57 -57
- package/src/components/PlayerControl/PlayerControl.svelte +153 -153
- package/src/components/PlayerControl/PlayerControl.svelte.d.ts +13 -13
- package/src/components/PlayerControl/index.ts +2 -2
- package/src/components/RedoUndo/RedoUndo.scss +11 -11
- package/src/components/RedoUndo/RedoUndo.svelte +60 -60
- package/src/components/RedoUndo/RedoUndo.svelte.d.ts +13 -13
- package/src/components/RedoUndo/index.ts +2 -2
- package/src/components/Toolbar/README.md +57 -57
- package/src/components/Toolbar/Toolbar.scss +78 -78
- package/src/components/Toolbar/Toolbar.svelte +62 -62
- package/src/components/Toolbar/Toolbar.svelte.d.ts +13 -13
- package/src/components/Toolbar/components/Contents.scss +168 -168
- package/src/components/Toolbar/components/Contents.svelte +202 -197
- package/src/components/Toolbar/components/Shapes.svelte +85 -85
- package/src/components/Toolbar/components/Slider.scss +119 -119
- package/src/components/Toolbar/components/Slider.svelte +54 -54
- package/src/components/Toolbar/components/StrokeColor.svelte +39 -39
- package/src/components/Toolbar/components/StrokeWidth.svelte +20 -20
- package/src/components/Toolbar/components/TextColor.svelte +39 -39
- package/src/components/Toolbar/components/constants.ts +80 -80
- package/src/components/Toolbar/components/helper.ts +24 -24
- package/src/components/Toolbar/index.ts +2 -2
- package/src/components/ZoomControl/ZoomControl.scss +15 -15
- package/src/components/ZoomControl/ZoomControl.svelte +99 -99
- package/src/components/ZoomControl/ZoomControl.svelte.d.ts +13 -13
- package/src/components/ZoomControl/index.ts +2 -2
- package/src/components/helpers.ts +3 -3
- package/src/components/theme.scss +92 -92
- package/src/components/variables.scss +69 -69
- package/src/index.ts +13 -13
- package/src/style.scss +36 -36
- package/src/typings.ts +38 -38
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Theme } from "../../typings";
|
|
3
|
-
|
|
4
|
-
export let theme: Theme = "light";
|
|
5
|
-
export let active = false;
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<svg fill="none" viewBox="0 0 24 24" class="fastboard-icon {theme}" class:is-active={active}>
|
|
9
|
-
<path
|
|
10
|
-
stroke="#5D6066"
|
|
11
|
-
stroke-linejoin="round"
|
|
12
|
-
stroke-width="1.25"
|
|
13
|
-
d="M6 7V5h5m7 2V5h-5M8 19h3m5 0h-3m-2 0V5m0 14h2M11 5h2m0 0v14"
|
|
14
|
-
class="fastboard-icon-stroke-color"
|
|
15
|
-
/>
|
|
16
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Theme } from "../../typings";
|
|
3
|
+
|
|
4
|
+
export let theme: Theme = "light";
|
|
5
|
+
export let active = false;
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<svg fill="none" viewBox="0 0 24 24" class="fastboard-icon {theme}" class:is-active={active}>
|
|
9
|
+
<path
|
|
10
|
+
stroke="#5D6066"
|
|
11
|
+
stroke-linejoin="round"
|
|
12
|
+
stroke-width="1.25"
|
|
13
|
+
d="M6 7V5h5m7 2V5h-5M8 19h3m5 0h-3m-2 0V5m0 14h2M11 5h2m0 0v14"
|
|
14
|
+
class="fastboard-icon-stroke-color"
|
|
15
|
+
/>
|
|
16
|
+
</svg>
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Theme } from "../../typings";
|
|
3
|
-
|
|
4
|
-
export let theme: Theme = "light";
|
|
5
|
-
export let active = false;
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<svg fill="none" viewBox="0 0 24 24" class="fastboard-icon {theme}" class:is-active={active}>
|
|
9
|
-
<path fill="#3381FF" stroke="#5D6066" d="M11.5 5.5h1v13h-1z" class="fastboard-icon-stroke-color" />
|
|
10
|
-
<path
|
|
11
|
-
stroke="#5D6066"
|
|
12
|
-
stroke-linejoin="round"
|
|
13
|
-
stroke-width="1.25"
|
|
14
|
-
d="M6 7V5h5m7 2V5h-5M8 19h3m5 0h-3m-2 0V5m0 14h2M11 5h2m0 0v14"
|
|
15
|
-
class="fastboard-icon-stroke-color"
|
|
16
|
-
/>
|
|
17
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Theme } from "../../typings";
|
|
3
|
+
|
|
4
|
+
export let theme: Theme = "light";
|
|
5
|
+
export let active = false;
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<svg fill="none" viewBox="0 0 24 24" class="fastboard-icon {theme}" class:is-active={active}>
|
|
9
|
+
<path fill="#3381FF" stroke="#5D6066" d="M11.5 5.5h1v13h-1z" class="fastboard-icon-stroke-color" />
|
|
10
|
+
<path
|
|
11
|
+
stroke="#5D6066"
|
|
12
|
+
stroke-linejoin="round"
|
|
13
|
+
stroke-width="1.25"
|
|
14
|
+
d="M6 7V5h5m7 2V5h-5M8 19h3m5 0h-3m-2 0V5m0 14h2M11 5h2m0 0v14"
|
|
15
|
+
class="fastboard-icon-stroke-color"
|
|
16
|
+
/>
|
|
17
|
+
</svg>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Theme } from "../../typings";
|
|
3
|
-
|
|
4
|
-
export let theme: Theme = "light";
|
|
5
|
-
export let active = false;
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<svg fill="none" viewBox="0 0 24 24" class="fastboard-icon {theme}" class:is-active={active}>
|
|
9
|
-
<path
|
|
10
|
-
stroke="#5D6066"
|
|
11
|
-
stroke-linejoin="round"
|
|
12
|
-
stroke-width="1.25"
|
|
13
|
-
d="m12 5 8 14H4l8-14Z"
|
|
14
|
-
class="fastboard-icon-stroke-color"
|
|
15
|
-
/>
|
|
16
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Theme } from "../../typings";
|
|
3
|
+
|
|
4
|
+
export let theme: Theme = "light";
|
|
5
|
+
export let active = false;
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<svg fill="none" viewBox="0 0 24 24" class="fastboard-icon {theme}" class:is-active={active}>
|
|
9
|
+
<path
|
|
10
|
+
stroke="#5D6066"
|
|
11
|
+
stroke-linejoin="round"
|
|
12
|
+
stroke-width="1.25"
|
|
13
|
+
d="m12 5 8 14H4l8-14Z"
|
|
14
|
+
class="fastboard-icon-stroke-color"
|
|
15
|
+
/>
|
|
16
|
+
</svg>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Theme } from "../../typings";
|
|
3
|
-
|
|
4
|
-
export let theme: Theme = "light";
|
|
5
|
-
export let active = false;
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<svg fill="none" viewBox="0 0 24 24" class="fastboard-icon {theme}" class:is-active={active}>
|
|
9
|
-
<path
|
|
10
|
-
stroke="#5D6066"
|
|
11
|
-
stroke-linejoin="round"
|
|
12
|
-
stroke-width="1.75"
|
|
13
|
-
d="m12 5 8 14H4l8-14Z"
|
|
14
|
-
class="fastboard-icon-stroke-color"
|
|
15
|
-
/>
|
|
16
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Theme } from "../../typings";
|
|
3
|
+
|
|
4
|
+
export let theme: Theme = "light";
|
|
5
|
+
export let active = false;
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<svg fill="none" viewBox="0 0 24 24" class="fastboard-icon {theme}" class:is-active={active}>
|
|
9
|
+
<path
|
|
10
|
+
stroke="#5D6066"
|
|
11
|
+
stroke-linejoin="round"
|
|
12
|
+
stroke-width="1.75"
|
|
13
|
+
d="m12 5 8 14H4l8-14Z"
|
|
14
|
+
class="fastboard-icon-stroke-color"
|
|
15
|
+
/>
|
|
16
|
+
</svg>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Theme } from "../../typings";
|
|
3
|
-
|
|
4
|
-
export let theme: Theme = "light";
|
|
5
|
-
export let active = false;
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<svg fill="none" viewBox="0 0 24 24" class="fastboard-icon {theme}" class:is-active={active}>
|
|
9
|
-
<path fill="#5D6066" d="M10 5 4 9l6 4-2-4 2-4Z" class="fastboard-icon-fill-color" />
|
|
10
|
-
<path
|
|
11
|
-
fill="#5D6066"
|
|
12
|
-
d="M16 8.375H8v1.25h8v-1.25Zm0 8H4v1.25h12v-1.25ZM20.625 13A4.625 4.625 0 0 0 16 8.375v1.25A3.375 3.375 0 0 1 19.375 13h1.25Zm-1.25 0A3.375 3.375 0 0 1 16 16.375v1.25A4.625 4.625 0 0 0 20.625 13h-1.25Z"
|
|
13
|
-
class="fastboard-icon-fill-color"
|
|
14
|
-
/>
|
|
15
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Theme } from "../../typings";
|
|
3
|
+
|
|
4
|
+
export let theme: Theme = "light";
|
|
5
|
+
export let active = false;
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<svg fill="none" viewBox="0 0 24 24" class="fastboard-icon {theme}" class:is-active={active}>
|
|
9
|
+
<path fill="#5D6066" d="M10 5 4 9l6 4-2-4 2-4Z" class="fastboard-icon-fill-color" />
|
|
10
|
+
<path
|
|
11
|
+
fill="#5D6066"
|
|
12
|
+
d="M16 8.375H8v1.25h8v-1.25Zm0 8H4v1.25h12v-1.25ZM20.625 13A4.625 4.625 0 0 0 16 8.375v1.25A3.375 3.375 0 0 1 19.375 13h1.25Zm-1.25 0A3.375 3.375 0 0 1 16 16.375v1.25A4.625 4.625 0 0 0 20.625 13h-1.25Z"
|
|
13
|
+
class="fastboard-icon-fill-color"
|
|
14
|
+
/>
|
|
15
|
+
</svg>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Theme } from "../../typings";
|
|
3
|
-
|
|
4
|
-
export let theme: Theme = "light";
|
|
5
|
-
export let active = false;
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<svg fill="none" viewBox="0 0 24 24" class="fastboard-icon {theme}" class:is-active={active}>
|
|
9
|
-
<path
|
|
10
|
-
d="m16 14-2-2-2-2-2 2-2 2"
|
|
11
|
-
stroke="#5D6066"
|
|
12
|
-
stroke-linejoin="round"
|
|
13
|
-
stroke-width="1.25"
|
|
14
|
-
class="fastboard-icon-stroke-color"
|
|
15
|
-
/>
|
|
16
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Theme } from "../../typings";
|
|
3
|
+
|
|
4
|
+
export let theme: Theme = "light";
|
|
5
|
+
export let active = false;
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<svg fill="none" viewBox="0 0 24 24" class="fastboard-icon {theme}" class:is-active={active}>
|
|
9
|
+
<path
|
|
10
|
+
d="m16 14-2-2-2-2-2 2-2 2"
|
|
11
|
+
stroke="#5D6066"
|
|
12
|
+
stroke-linejoin="round"
|
|
13
|
+
stroke-width="1.25"
|
|
14
|
+
class="fastboard-icon-stroke-color"
|
|
15
|
+
/>
|
|
16
|
+
</svg>
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Theme } from "../../typings";
|
|
3
|
-
|
|
4
|
-
export let theme: Theme = "light";
|
|
5
|
-
export let active = false;
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<svg fill="none" viewBox="0 0 24 24" class="fastboard-icon {theme}" class:is-active={active}>
|
|
9
|
-
<path
|
|
10
|
-
d="M4 20h16M4 6h16"
|
|
11
|
-
stroke="#5D6066"
|
|
12
|
-
stroke-linejoin="round"
|
|
13
|
-
stroke-width="1.25"
|
|
14
|
-
class="fastboard-icon-stroke-color"
|
|
15
|
-
/>
|
|
16
|
-
<rect
|
|
17
|
-
height="10"
|
|
18
|
-
rx="1"
|
|
19
|
-
stroke="#5D6066"
|
|
20
|
-
stroke-linejoin="round"
|
|
21
|
-
stroke-width="1.25"
|
|
22
|
-
width="14"
|
|
23
|
-
x="5"
|
|
24
|
-
y="8"
|
|
25
|
-
class="fastboard-icon-stroke-color"
|
|
26
|
-
/>
|
|
27
|
-
<path
|
|
28
|
-
d="M12 4v2m-3 7h6m-3-3v6"
|
|
29
|
-
stroke="#5D6066"
|
|
30
|
-
stroke-linejoin="round"
|
|
31
|
-
stroke-width="1.25"
|
|
32
|
-
class="fastboard-icon-stroke-color"
|
|
33
|
-
/>
|
|
34
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Theme } from "../../typings";
|
|
3
|
+
|
|
4
|
+
export let theme: Theme = "light";
|
|
5
|
+
export let active = false;
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<svg fill="none" viewBox="0 0 24 24" class="fastboard-icon {theme}" class:is-active={active}>
|
|
9
|
+
<path
|
|
10
|
+
d="M4 20h16M4 6h16"
|
|
11
|
+
stroke="#5D6066"
|
|
12
|
+
stroke-linejoin="round"
|
|
13
|
+
stroke-width="1.25"
|
|
14
|
+
class="fastboard-icon-stroke-color"
|
|
15
|
+
/>
|
|
16
|
+
<rect
|
|
17
|
+
height="10"
|
|
18
|
+
rx="1"
|
|
19
|
+
stroke="#5D6066"
|
|
20
|
+
stroke-linejoin="round"
|
|
21
|
+
stroke-width="1.25"
|
|
22
|
+
width="14"
|
|
23
|
+
x="5"
|
|
24
|
+
y="8"
|
|
25
|
+
class="fastboard-icon-stroke-color"
|
|
26
|
+
/>
|
|
27
|
+
<path
|
|
28
|
+
d="M12 4v2m-3 7h6m-3-3v6"
|
|
29
|
+
stroke="#5D6066"
|
|
30
|
+
stroke-linejoin="round"
|
|
31
|
+
stroke-width="1.25"
|
|
32
|
+
class="fastboard-icon-stroke-color"
|
|
33
|
+
/>
|
|
34
|
+
</svg>
|
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
import Apps from "./Apps.svelte";
|
|
2
|
-
import Arrow from "./Arrow.svelte";
|
|
3
|
-
import ArrowBolded from "./ArrowBolded.svelte";
|
|
4
|
-
import Balloon from "./Balloon.svelte";
|
|
5
|
-
import BalloonBolded from "./BalloonBolded.svelte";
|
|
6
|
-
import Circle from "./Circle.svelte";
|
|
7
|
-
import CircleBolded from "./CircleBolded.svelte";
|
|
8
|
-
import Clean from "./Clean.svelte";
|
|
9
|
-
import Clear from "./Clear.svelte";
|
|
10
|
-
import Click from "./Click.svelte";
|
|
11
|
-
import ClickFilled from "./ClickFilled.svelte";
|
|
12
|
-
import Diamond from "./Diamond.svelte";
|
|
13
|
-
import Down from "./Down.svelte";
|
|
14
|
-
import Eraser from "./Eraser.svelte";
|
|
15
|
-
import EraserFilled from "./EraserFilled.svelte";
|
|
16
|
-
import Left from "./Left.svelte";
|
|
17
|
-
import Line from "./Line.svelte";
|
|
18
|
-
import LineBolded from "./LineBolded.svelte";
|
|
19
|
-
import Minus from "./Minus.svelte";
|
|
20
|
-
import Pencil from "./Pencil.svelte";
|
|
21
|
-
import PencilFilled from "./PencilFilled.svelte";
|
|
22
|
-
import Plus from "./Plus.svelte";
|
|
23
|
-
import Rectangle from "./Rectangle.svelte";
|
|
24
|
-
import RectangleBolded from "./RectangleBolded.svelte";
|
|
25
|
-
import Redo from "./Redo.svelte";
|
|
26
|
-
import Reset from "./Reset.svelte";
|
|
27
|
-
import Rhombus from "./Rhombus.svelte";
|
|
28
|
-
import RhombusBolded from "./RhombusBolded.svelte";
|
|
29
|
-
import Right from "./Right.svelte";
|
|
30
|
-
import Selector from "./Selector.svelte";
|
|
31
|
-
import SelectorFilled from "./SelectorFilled.svelte";
|
|
32
|
-
import SpeechBalloon from "./SpeechBalloon.svelte";
|
|
33
|
-
import Star from "./Star.svelte";
|
|
34
|
-
import StarBolded from "./StarBolded.svelte";
|
|
35
|
-
import Text from "./Text.svelte";
|
|
36
|
-
import TextFilled from "./TextFilled.svelte";
|
|
37
|
-
import Triangle from "./Triangle.svelte";
|
|
38
|
-
import TriangleBolded from "./TriangleBolded.svelte";
|
|
39
|
-
import Undo from "./Undo.svelte";
|
|
40
|
-
import Up from "./Up.svelte";
|
|
41
|
-
import WhiteboardAdd from "./WhiteboardAdd.svelte";
|
|
42
|
-
import Play from "./Play.svelte";
|
|
43
|
-
import Pause from "./Pause.svelte";
|
|
44
|
-
import Loading from "./Loading.svelte";
|
|
45
|
-
|
|
46
|
-
const Icons = {
|
|
47
|
-
Apps,
|
|
48
|
-
Arrow,
|
|
49
|
-
ArrowBolded,
|
|
50
|
-
Balloon,
|
|
51
|
-
BalloonBolded,
|
|
52
|
-
Circle,
|
|
53
|
-
CircleBolded,
|
|
54
|
-
Clean,
|
|
55
|
-
Clear,
|
|
56
|
-
Click,
|
|
57
|
-
ClickFilled,
|
|
58
|
-
Diamond,
|
|
59
|
-
Down,
|
|
60
|
-
Eraser,
|
|
61
|
-
EraserFilled,
|
|
62
|
-
Left,
|
|
63
|
-
Line,
|
|
64
|
-
LineBolded,
|
|
65
|
-
Minus,
|
|
66
|
-
Pencil,
|
|
67
|
-
PencilFilled,
|
|
68
|
-
Plus,
|
|
69
|
-
Rectangle,
|
|
70
|
-
RectangleBolded,
|
|
71
|
-
Redo,
|
|
72
|
-
Reset,
|
|
73
|
-
Rhombus,
|
|
74
|
-
RhombusBolded,
|
|
75
|
-
Right,
|
|
76
|
-
Selector,
|
|
77
|
-
SelectorFilled,
|
|
78
|
-
SpeechBalloon,
|
|
79
|
-
Star,
|
|
80
|
-
StarBolded,
|
|
81
|
-
Text,
|
|
82
|
-
TextFilled,
|
|
83
|
-
Triangle,
|
|
84
|
-
TriangleBolded,
|
|
85
|
-
Undo,
|
|
86
|
-
Up,
|
|
87
|
-
WhiteboardAdd,
|
|
88
|
-
Play,
|
|
89
|
-
Pause,
|
|
90
|
-
Loading,
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export default Icons;
|
|
1
|
+
import Apps from "./Apps.svelte";
|
|
2
|
+
import Arrow from "./Arrow.svelte";
|
|
3
|
+
import ArrowBolded from "./ArrowBolded.svelte";
|
|
4
|
+
import Balloon from "./Balloon.svelte";
|
|
5
|
+
import BalloonBolded from "./BalloonBolded.svelte";
|
|
6
|
+
import Circle from "./Circle.svelte";
|
|
7
|
+
import CircleBolded from "./CircleBolded.svelte";
|
|
8
|
+
import Clean from "./Clean.svelte";
|
|
9
|
+
import Clear from "./Clear.svelte";
|
|
10
|
+
import Click from "./Click.svelte";
|
|
11
|
+
import ClickFilled from "./ClickFilled.svelte";
|
|
12
|
+
import Diamond from "./Diamond.svelte";
|
|
13
|
+
import Down from "./Down.svelte";
|
|
14
|
+
import Eraser from "./Eraser.svelte";
|
|
15
|
+
import EraserFilled from "./EraserFilled.svelte";
|
|
16
|
+
import Left from "./Left.svelte";
|
|
17
|
+
import Line from "./Line.svelte";
|
|
18
|
+
import LineBolded from "./LineBolded.svelte";
|
|
19
|
+
import Minus from "./Minus.svelte";
|
|
20
|
+
import Pencil from "./Pencil.svelte";
|
|
21
|
+
import PencilFilled from "./PencilFilled.svelte";
|
|
22
|
+
import Plus from "./Plus.svelte";
|
|
23
|
+
import Rectangle from "./Rectangle.svelte";
|
|
24
|
+
import RectangleBolded from "./RectangleBolded.svelte";
|
|
25
|
+
import Redo from "./Redo.svelte";
|
|
26
|
+
import Reset from "./Reset.svelte";
|
|
27
|
+
import Rhombus from "./Rhombus.svelte";
|
|
28
|
+
import RhombusBolded from "./RhombusBolded.svelte";
|
|
29
|
+
import Right from "./Right.svelte";
|
|
30
|
+
import Selector from "./Selector.svelte";
|
|
31
|
+
import SelectorFilled from "./SelectorFilled.svelte";
|
|
32
|
+
import SpeechBalloon from "./SpeechBalloon.svelte";
|
|
33
|
+
import Star from "./Star.svelte";
|
|
34
|
+
import StarBolded from "./StarBolded.svelte";
|
|
35
|
+
import Text from "./Text.svelte";
|
|
36
|
+
import TextFilled from "./TextFilled.svelte";
|
|
37
|
+
import Triangle from "./Triangle.svelte";
|
|
38
|
+
import TriangleBolded from "./TriangleBolded.svelte";
|
|
39
|
+
import Undo from "./Undo.svelte";
|
|
40
|
+
import Up from "./Up.svelte";
|
|
41
|
+
import WhiteboardAdd from "./WhiteboardAdd.svelte";
|
|
42
|
+
import Play from "./Play.svelte";
|
|
43
|
+
import Pause from "./Pause.svelte";
|
|
44
|
+
import Loading from "./Loading.svelte";
|
|
45
|
+
|
|
46
|
+
const Icons = {
|
|
47
|
+
Apps,
|
|
48
|
+
Arrow,
|
|
49
|
+
ArrowBolded,
|
|
50
|
+
Balloon,
|
|
51
|
+
BalloonBolded,
|
|
52
|
+
Circle,
|
|
53
|
+
CircleBolded,
|
|
54
|
+
Clean,
|
|
55
|
+
Clear,
|
|
56
|
+
Click,
|
|
57
|
+
ClickFilled,
|
|
58
|
+
Diamond,
|
|
59
|
+
Down,
|
|
60
|
+
Eraser,
|
|
61
|
+
EraserFilled,
|
|
62
|
+
Left,
|
|
63
|
+
Line,
|
|
64
|
+
LineBolded,
|
|
65
|
+
Minus,
|
|
66
|
+
Pencil,
|
|
67
|
+
PencilFilled,
|
|
68
|
+
Plus,
|
|
69
|
+
Rectangle,
|
|
70
|
+
RectangleBolded,
|
|
71
|
+
Redo,
|
|
72
|
+
Reset,
|
|
73
|
+
Rhombus,
|
|
74
|
+
RhombusBolded,
|
|
75
|
+
Right,
|
|
76
|
+
Selector,
|
|
77
|
+
SelectorFilled,
|
|
78
|
+
SpeechBalloon,
|
|
79
|
+
Star,
|
|
80
|
+
StarBolded,
|
|
81
|
+
Text,
|
|
82
|
+
TextFilled,
|
|
83
|
+
Triangle,
|
|
84
|
+
TriangleBolded,
|
|
85
|
+
Undo,
|
|
86
|
+
Up,
|
|
87
|
+
WhiteboardAdd,
|
|
88
|
+
Play,
|
|
89
|
+
Pause,
|
|
90
|
+
Loading,
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export default Icons;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
@import "../theme.scss";
|
|
2
|
-
|
|
3
|
-
$name: "fastboard-page-control";
|
|
4
|
-
|
|
5
|
-
.#{$name} {
|
|
6
|
-
@include container;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.#{$name}-btn {
|
|
10
|
-
@include btn;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.#{$name}-text {
|
|
14
|
-
@include tabular-nums;
|
|
15
|
-
}
|
|
1
|
+
@import "../theme.scss";
|
|
2
|
+
|
|
3
|
+
$name: "fastboard-page-control";
|
|
4
|
+
|
|
5
|
+
.#{$name} {
|
|
6
|
+
@include container;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.#{$name}-btn {
|
|
10
|
+
@include btn;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.#{$name}-text {
|
|
14
|
+
@include tabular-nums;
|
|
15
|
+
}
|
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
<script lang="ts" context="module">
|
|
2
|
-
import type { FastboardApp } from "@netless/fastboard-core";
|
|
3
|
-
import type { GenericIcon, I18nData, IconType, Language, Theme } from "../../typings";
|
|
4
|
-
const i18n: I18nData<"prev" | "next" | "add"> = {
|
|
5
|
-
en: {
|
|
6
|
-
prev: "Prev Page",
|
|
7
|
-
next: "Next Page",
|
|
8
|
-
add: "Add Page",
|
|
9
|
-
},
|
|
10
|
-
"zh-CN": {
|
|
11
|
-
prev: "上一页",
|
|
12
|
-
next: "下一页",
|
|
13
|
-
add: "添加页面",
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<script lang="ts">
|
|
19
|
-
import Icon from "../Icon";
|
|
20
|
-
import Icons from "../Icons";
|
|
21
|
-
import Button from "../Button";
|
|
22
|
-
|
|
23
|
-
export let app: FastboardApp | null | undefined = null;
|
|
24
|
-
export let theme: Theme = "light";
|
|
25
|
-
export let language: Language = "en";
|
|
26
|
-
export let icons: GenericIcon<"prev" | "next" | "add"> | undefined = undefined;
|
|
27
|
-
|
|
28
|
-
const name = "fastboard-page-control";
|
|
29
|
-
|
|
30
|
-
$: writable = app?.writable;
|
|
31
|
-
$: disabled = !$writable;
|
|
32
|
-
$: t = i18n[language];
|
|
33
|
-
|
|
34
|
-
let type: IconType;
|
|
35
|
-
$: type = disabled ? "disable" : "normal";
|
|
36
|
-
|
|
37
|
-
$: index = app?.sceneIndex;
|
|
38
|
-
$: length = app?.sceneLength;
|
|
39
|
-
$: prev_disabled = disabled || !$index;
|
|
40
|
-
$: next_disabled = disabled || $length == null || $index === $length - 1;
|
|
41
|
-
|
|
42
|
-
function prevPage() {
|
|
43
|
-
app?.prevPage();
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function nextPage() {
|
|
47
|
-
app?.nextPage();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function addPage() {
|
|
51
|
-
app?.addPage({ after: true });
|
|
52
|
-
app?.nextPage();
|
|
53
|
-
}
|
|
54
|
-
</script>
|
|
55
|
-
|
|
56
|
-
<div class="{name} {theme}">
|
|
57
|
-
<Button class="prev" {name} {theme} disabled={prev_disabled} on:click={prevPage} content={t.prev}>
|
|
58
|
-
<Icon src={icons?.prev[type]} alt="[prev]">
|
|
59
|
-
<Icons.Left {theme} />
|
|
60
|
-
</Icon>
|
|
61
|
-
</Button>
|
|
62
|
-
<span class="{name}-text {theme}">
|
|
63
|
-
{#if $index == null || $length == null}
|
|
64
|
-
…
|
|
65
|
-
{:else}
|
|
66
|
-
{$index + 1}/{$length}
|
|
67
|
-
{/if}
|
|
68
|
-
</span>
|
|
69
|
-
<Button class="next" {name} {theme} disabled={next_disabled} on:click={nextPage} content={t.next}>
|
|
70
|
-
<Icon src={icons?.next[type]} alt="[next]">
|
|
71
|
-
<Icons.Right {theme} />
|
|
72
|
-
</Icon>
|
|
73
|
-
</Button>
|
|
74
|
-
<Button class="add" {name} {theme} {disabled} on:click={addPage} content={t.add}>
|
|
75
|
-
<Icon src={icons?.add[type]} alt="[add]">
|
|
76
|
-
<Icons.WhiteboardAdd {theme} />
|
|
77
|
-
</Icon>
|
|
78
|
-
</Button>
|
|
79
|
-
</div>
|
|
1
|
+
<script lang="ts" context="module">
|
|
2
|
+
import type { FastboardApp } from "@netless/fastboard-core";
|
|
3
|
+
import type { GenericIcon, I18nData, IconType, Language, Theme } from "../../typings";
|
|
4
|
+
const i18n: I18nData<"prev" | "next" | "add"> = {
|
|
5
|
+
en: {
|
|
6
|
+
prev: "Prev Page",
|
|
7
|
+
next: "Next Page",
|
|
8
|
+
add: "Add Page",
|
|
9
|
+
},
|
|
10
|
+
"zh-CN": {
|
|
11
|
+
prev: "上一页",
|
|
12
|
+
next: "下一页",
|
|
13
|
+
add: "添加页面",
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<script lang="ts">
|
|
19
|
+
import Icon from "../Icon";
|
|
20
|
+
import Icons from "../Icons";
|
|
21
|
+
import Button from "../Button";
|
|
22
|
+
|
|
23
|
+
export let app: FastboardApp | null | undefined = null;
|
|
24
|
+
export let theme: Theme = "light";
|
|
25
|
+
export let language: Language = "en";
|
|
26
|
+
export let icons: GenericIcon<"prev" | "next" | "add"> | undefined = undefined;
|
|
27
|
+
|
|
28
|
+
const name = "fastboard-page-control";
|
|
29
|
+
|
|
30
|
+
$: writable = app?.writable;
|
|
31
|
+
$: disabled = !$writable;
|
|
32
|
+
$: t = i18n[language];
|
|
33
|
+
|
|
34
|
+
let type: IconType;
|
|
35
|
+
$: type = disabled ? "disable" : "normal";
|
|
36
|
+
|
|
37
|
+
$: index = app?.sceneIndex;
|
|
38
|
+
$: length = app?.sceneLength;
|
|
39
|
+
$: prev_disabled = disabled || !$index;
|
|
40
|
+
$: next_disabled = disabled || $length == null || $index === $length - 1;
|
|
41
|
+
|
|
42
|
+
function prevPage() {
|
|
43
|
+
app?.prevPage();
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function nextPage() {
|
|
47
|
+
app?.nextPage();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function addPage() {
|
|
51
|
+
app?.addPage({ after: true });
|
|
52
|
+
app?.nextPage();
|
|
53
|
+
}
|
|
54
|
+
</script>
|
|
55
|
+
|
|
56
|
+
<div class="{name} {theme}">
|
|
57
|
+
<Button class="prev" {name} {theme} disabled={prev_disabled} on:click={prevPage} content={t.prev}>
|
|
58
|
+
<Icon src={icons?.prev[type]} alt="[prev]">
|
|
59
|
+
<Icons.Left {theme} />
|
|
60
|
+
</Icon>
|
|
61
|
+
</Button>
|
|
62
|
+
<span class="{name}-text {theme}">
|
|
63
|
+
{#if $index == null || $length == null}
|
|
64
|
+
…
|
|
65
|
+
{:else}
|
|
66
|
+
{$index + 1}/{$length}
|
|
67
|
+
{/if}
|
|
68
|
+
</span>
|
|
69
|
+
<Button class="next" {name} {theme} disabled={next_disabled} on:click={nextPage} content={t.next}>
|
|
70
|
+
<Icon src={icons?.next[type]} alt="[next]">
|
|
71
|
+
<Icons.Right {theme} />
|
|
72
|
+
</Icon>
|
|
73
|
+
</Button>
|
|
74
|
+
<Button class="add" {name} {theme} {disabled} on:click={addPage} content={t.add}>
|
|
75
|
+
<Icon src={icons?.add[type]} alt="[add]">
|
|
76
|
+
<Icons.WhiteboardAdd {theme} />
|
|
77
|
+
</Icon>
|
|
78
|
+
</Button>
|
|
79
|
+
</div>
|