@netless/fastboard-ui 0.3.6 → 0.3.8-alpha.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.
- package/dist/index.d.ts +18 -18
- package/dist/index.js +474 -260
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +484 -261
- package/dist/index.mjs.map +1 -1
- package/dist/index.svelte.mjs +3478 -2347
- package/dist/index.svelte.mjs.map +1 -1
- package/package.json +4 -4
- package/src/actions/scroll.ts +1 -1
- package/src/components/Button/Button.svelte.d.ts +1 -2
- package/src/components/Toolbar/README.md +1 -1
- package/src/components/Toolbar/Toolbar.scss +1 -1
- package/src/components/Toolbar/components/Shapes.svelte +1 -0
- package/src/components/Toolbar/components/StrokeColor.svelte +1 -0
- package/src/components/Toolbar/components/TextColor.svelte +1 -0
- package/src/index.ts +8 -4
- package/src/style.scss +4 -0
- /package/src/components/Fastboard/{Fastboard.svelte.ts → Fastboard.svelte.d.ts} +0 -0
- /package/src/components/Fastboard/{ReplayFastboard.svelte.ts → ReplayFastboard.svelte.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netless/fastboard-ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8-alpha.0",
|
|
4
4
|
"description": "The front-end of @netless/fastboard-core.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"svelte": "dist/index.svelte.mjs",
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
],
|
|
11
11
|
"repository": "netless-io/fastboard",
|
|
12
12
|
"peerDependencies": {
|
|
13
|
-
"@netless/fastboard-core": "0.3.
|
|
13
|
+
"@netless/fastboard-core": "0.3.8-alpha.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"tippy.js": "^6.3.7"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@netless/
|
|
20
|
-
"@netless/
|
|
19
|
+
"@netless/fastboard-core": "0.3.8-alpha.0",
|
|
20
|
+
"@netless/esbuild-plugin-inline-sass": "0.1.0"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"cleanup": "rimraf dist",
|
package/src/actions/scroll.ts
CHANGED
|
@@ -10,7 +10,7 @@ export const scrollTop: SvelteAction<Writable<number>> = function (node, value)
|
|
|
10
10
|
|
|
11
11
|
function on_scroll() {
|
|
12
12
|
clearTimeout(timer);
|
|
13
|
-
timer = setTimeout(() => value.set(node.scrollTop), 200);
|
|
13
|
+
timer = window.setTimeout(() => value.set(node.scrollTop), 200);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
node.addEventListener("scroll", on_scroll);
|
|
@@ -18,8 +18,7 @@ export declare interface ButtonEvents {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export declare interface ButtonSlots {
|
|
21
|
-
|
|
22
|
-
default: {};
|
|
21
|
+
default: any;
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
declare class Button extends SvelteComponentTyped<ButtonProps, ButtonEvents, ButtonSlots> {}
|
|
@@ -52,6 +52,6 @@ The `computed_height` is calculated by:
|
|
|
52
52
|
|
|
53
53
|
```js
|
|
54
54
|
const max_height = button_height * 2 + scrollable_area_full_height;
|
|
55
|
-
|
|
55
|
+
const full_height = container.height;
|
|
56
56
|
computed_height = full_height < max_height ? full_height : max_height;
|
|
57
57
|
```
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
}
|
|
66
66
|
</script>
|
|
67
67
|
|
|
68
|
+
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
68
69
|
<div class="fastboard-toolbar-shapes {theme}" on:click={set_appliance_or_shape}>
|
|
69
70
|
{#each shapes as key (key)}
|
|
70
71
|
{@const is_selected = appliance === "shape" ? shape === key : appliance === key}
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import "./style.scss";
|
|
2
|
+
|
|
1
3
|
export * from "./typings";
|
|
2
4
|
|
|
3
5
|
export { default as RedoUndo, type RedoUndoProps } from "./components/RedoUndo";
|
|
@@ -5,10 +7,12 @@ export { default as PageControl, type PageControlProps } from "./components/Page
|
|
|
5
7
|
export { default as ZoomControl, type ZoomControlProps } from "./components/ZoomControl";
|
|
6
8
|
export { default as Toolbar, type ToolbarProps } from "./components/Toolbar";
|
|
7
9
|
export { default as PlayerControl, type PlayerControlProps } from "./components/PlayerControl";
|
|
8
|
-
export {
|
|
9
|
-
|
|
10
|
+
export {
|
|
11
|
+
Fastboard,
|
|
12
|
+
ReplayFastboard,
|
|
13
|
+
type FastboardProps,
|
|
14
|
+
type ReplayFastboardProps,
|
|
15
|
+
} from "./components/Fastboard";
|
|
10
16
|
|
|
11
17
|
export * from "./helpers";
|
|
12
18
|
export * from "./behaviors";
|
|
13
|
-
|
|
14
|
-
import "./style.scss";
|
package/src/style.scss
CHANGED
|
File without changes
|
|
File without changes
|