@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,168 +1,168 @@
|
|
|
1
|
-
@import "../../theme.scss";
|
|
2
|
-
|
|
3
|
-
$name: "fastboard-toolbar";
|
|
4
|
-
|
|
5
|
-
.#{$name}-contents {
|
|
6
|
-
@include container;
|
|
7
|
-
padding: 2px 0;
|
|
8
|
-
gap: 0;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
|
|
11
|
-
> .#{$name}-btn {
|
|
12
|
-
margin: 2px 4px;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.#{$name}-btn-interactive {
|
|
17
|
-
position: relative;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.#{$name}-triangle {
|
|
21
|
-
width: 0px;
|
|
22
|
-
height: 0px;
|
|
23
|
-
border-bottom: 4px solid;
|
|
24
|
-
border-left: 4px solid transparent;
|
|
25
|
-
position: absolute;
|
|
26
|
-
bottom: 0;
|
|
27
|
-
right: 0;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.#{$name}-btn:focus + .#{$name}-triangle {
|
|
31
|
-
opacity: 0;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.#{$name}-scrollable {
|
|
35
|
-
padding: 2px 4px;
|
|
36
|
-
overflow: hidden;
|
|
37
|
-
display: flex;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
gap: 4px;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.#{$name}-tooltip {
|
|
43
|
-
display: inline-flex;
|
|
44
|
-
align-items: center;
|
|
45
|
-
gap: 4px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.#{$name}-hotkey {
|
|
49
|
-
display: inline-flex;
|
|
50
|
-
margin-right: -4px;
|
|
51
|
-
width: 24px;
|
|
52
|
-
height: 24px;
|
|
53
|
-
align-items: center;
|
|
54
|
-
justify-content: center;
|
|
55
|
-
background-color: rgba(#fff, 0.1);
|
|
56
|
-
border-radius: 4px;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.#{$name}-panel-wrapper {
|
|
60
|
-
display: none;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.#{$name}-panel {
|
|
64
|
-
display: flex;
|
|
65
|
-
flex-direction: column;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.#{$name}-panel-divider {
|
|
69
|
-
height: 0.5px;
|
|
70
|
-
width: 100%;
|
|
71
|
-
margin: 4px 0;
|
|
72
|
-
background-color: rgba(#fff, 0.15);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.#{$name}-colors,
|
|
76
|
-
.#{$name}-shapes {
|
|
77
|
-
display: grid;
|
|
78
|
-
align-self: center;
|
|
79
|
-
grid-template: repeat(2, 1fr) / repeat(4, 1fr);
|
|
80
|
-
align-items: center;
|
|
81
|
-
justify-items: center;
|
|
82
|
-
gap: 4px;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.#{$name}-shape-btn {
|
|
86
|
-
width: 24px;
|
|
87
|
-
height: 24px;
|
|
88
|
-
padding: 0;
|
|
89
|
-
display: inline-flex;
|
|
90
|
-
align-items: center;
|
|
91
|
-
justify-content: center;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.#{$name}-color-btn {
|
|
95
|
-
@extend .#{$name}-shape-btn;
|
|
96
|
-
border: 1px solid transparent;
|
|
97
|
-
|
|
98
|
-
@each $name, $theme in $themes {
|
|
99
|
-
&.#{$name}.is-active {
|
|
100
|
-
border-color: read($theme, "active-color");
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.#{$name}-color-item {
|
|
106
|
-
display: inline-block;
|
|
107
|
-
width: 16px;
|
|
108
|
-
height: 16px;
|
|
109
|
-
border-radius: 4px;
|
|
110
|
-
pointer-events: none;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.#{$name}-panel.apps {
|
|
114
|
-
display: grid;
|
|
115
|
-
grid-template-columns: repeat(min(var(--n, 3), 3), minmax(max-content, 1fr));
|
|
116
|
-
gap: 4px;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.#{$name}-app-btn {
|
|
120
|
-
margin: 0;
|
|
121
|
-
border: 0;
|
|
122
|
-
border-radius: 2px;
|
|
123
|
-
padding: 4px 6px;
|
|
124
|
-
background-color: transparent;
|
|
125
|
-
display: inline-flex;
|
|
126
|
-
flex-direction: column;
|
|
127
|
-
align-items: center;
|
|
128
|
-
gap: 4px;
|
|
129
|
-
font-size: 0;
|
|
130
|
-
|
|
131
|
-
&:disabled {
|
|
132
|
-
opacity: 0.8;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
&-icon {
|
|
136
|
-
width: 32px;
|
|
137
|
-
height: 32px;
|
|
138
|
-
pointer-events: none;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
&-text {
|
|
142
|
-
font-size: 14px;
|
|
143
|
-
line-height: 1;
|
|
144
|
-
max-width: 100%;
|
|
145
|
-
overflow: hidden;
|
|
146
|
-
text-overflow: ellipsis;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
&.is-loading {
|
|
150
|
-
cursor: progress;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
&.is-failed {
|
|
154
|
-
cursor: not-allowed;
|
|
155
|
-
opacity: 0.5;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
@each $name, $theme in $themes {
|
|
159
|
-
&:not(:disabled, .is-loading, .is-failed):hover.#{$name} {
|
|
160
|
-
cursor: pointer;
|
|
161
|
-
background-color: read($theme, "hover-bg-color");
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
&-text.#{$name} {
|
|
165
|
-
color: read($theme, "color");
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
1
|
+
@import "../../theme.scss";
|
|
2
|
+
|
|
3
|
+
$name: "fastboard-toolbar";
|
|
4
|
+
|
|
5
|
+
.#{$name}-contents {
|
|
6
|
+
@include container;
|
|
7
|
+
padding: 2px 0;
|
|
8
|
+
gap: 0;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
|
|
11
|
+
> .#{$name}-btn {
|
|
12
|
+
margin: 2px 4px;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.#{$name}-btn-interactive {
|
|
17
|
+
position: relative;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.#{$name}-triangle {
|
|
21
|
+
width: 0px;
|
|
22
|
+
height: 0px;
|
|
23
|
+
border-bottom: 4px solid;
|
|
24
|
+
border-left: 4px solid transparent;
|
|
25
|
+
position: absolute;
|
|
26
|
+
bottom: 0;
|
|
27
|
+
right: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.#{$name}-btn:focus + .#{$name}-triangle {
|
|
31
|
+
opacity: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.#{$name}-scrollable {
|
|
35
|
+
padding: 2px 4px;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
gap: 4px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.#{$name}-tooltip {
|
|
43
|
+
display: inline-flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
gap: 4px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.#{$name}-hotkey {
|
|
49
|
+
display: inline-flex;
|
|
50
|
+
margin-right: -4px;
|
|
51
|
+
width: 24px;
|
|
52
|
+
height: 24px;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
background-color: rgba(#fff, 0.1);
|
|
56
|
+
border-radius: 4px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.#{$name}-panel-wrapper {
|
|
60
|
+
display: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.#{$name}-panel {
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.#{$name}-panel-divider {
|
|
69
|
+
height: 0.5px;
|
|
70
|
+
width: 100%;
|
|
71
|
+
margin: 4px 0;
|
|
72
|
+
background-color: rgba(#fff, 0.15);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.#{$name}-colors,
|
|
76
|
+
.#{$name}-shapes {
|
|
77
|
+
display: grid;
|
|
78
|
+
align-self: center;
|
|
79
|
+
grid-template: repeat(2, 1fr) / repeat(4, 1fr);
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-items: center;
|
|
82
|
+
gap: 4px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.#{$name}-shape-btn {
|
|
86
|
+
width: 24px;
|
|
87
|
+
height: 24px;
|
|
88
|
+
padding: 0;
|
|
89
|
+
display: inline-flex;
|
|
90
|
+
align-items: center;
|
|
91
|
+
justify-content: center;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.#{$name}-color-btn {
|
|
95
|
+
@extend .#{$name}-shape-btn;
|
|
96
|
+
border: 1px solid transparent;
|
|
97
|
+
|
|
98
|
+
@each $name, $theme in $themes {
|
|
99
|
+
&.#{$name}.is-active {
|
|
100
|
+
border-color: read($theme, "active-color");
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.#{$name}-color-item {
|
|
106
|
+
display: inline-block;
|
|
107
|
+
width: 16px;
|
|
108
|
+
height: 16px;
|
|
109
|
+
border-radius: 4px;
|
|
110
|
+
pointer-events: none;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.#{$name}-panel.apps {
|
|
114
|
+
display: grid;
|
|
115
|
+
grid-template-columns: repeat(min(var(--n, 3), 3), minmax(max-content, 1fr));
|
|
116
|
+
gap: 4px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.#{$name}-app-btn {
|
|
120
|
+
margin: 0;
|
|
121
|
+
border: 0;
|
|
122
|
+
border-radius: 2px;
|
|
123
|
+
padding: 4px 6px;
|
|
124
|
+
background-color: transparent;
|
|
125
|
+
display: inline-flex;
|
|
126
|
+
flex-direction: column;
|
|
127
|
+
align-items: center;
|
|
128
|
+
gap: 4px;
|
|
129
|
+
font-size: 0;
|
|
130
|
+
|
|
131
|
+
&:disabled {
|
|
132
|
+
opacity: 0.8;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&-icon {
|
|
136
|
+
width: 32px;
|
|
137
|
+
height: 32px;
|
|
138
|
+
pointer-events: none;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&-text {
|
|
142
|
+
font-size: 14px;
|
|
143
|
+
line-height: 1;
|
|
144
|
+
max-width: 100%;
|
|
145
|
+
overflow: hidden;
|
|
146
|
+
text-overflow: ellipsis;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&.is-loading {
|
|
150
|
+
cursor: progress;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&.is-failed {
|
|
154
|
+
cursor: not-allowed;
|
|
155
|
+
opacity: 0.5;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
@each $name, $theme in $themes {
|
|
159
|
+
&:not(:disabled, .is-loading, .is-failed):hover.#{$name} {
|
|
160
|
+
cursor: pointer;
|
|
161
|
+
background-color: read($theme, "hover-bg-color");
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
&-text.#{$name} {
|
|
165
|
+
color: read($theme, "color");
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|