@netless/fastboard-ui 0.3.6 → 0.3.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/fastboard-ui",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
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.6"
13
+ "@netless/fastboard-core": "0.3.7"
14
14
  },
15
15
  "dependencies": {
16
16
  "tippy.js": "^6.3.7"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@netless/esbuild-plugin-inline-sass": "0.1.0",
20
- "@netless/fastboard-core": "0.3.6"
20
+ "@netless/fastboard-core": "0.3.7"
21
21
  },
22
22
  "scripts": {
23
23
  "cleanup": "rimraf dist",
@@ -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
- // eslint-disable-next-line @typescript-eslint/ban-types
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
- let full_height = container.height;
55
+ const full_height = container.height;
56
56
  computed_height = full_height < max_height ? full_height : max_height;
57
57
  ```
@@ -25,7 +25,7 @@ $name: "fastboard-toolbar";
25
25
  cursor: pointer;
26
26
  pointer-events: auto;
27
27
 
28
- &:focus-within {
28
+ &:focus-visible {
29
29
  outline: 2px solid -webkit-focus-ring-color;
30
30
  }
31
31
 
@@ -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}
@@ -25,6 +25,7 @@
25
25
  }
26
26
  </script>
27
27
 
28
+ <!-- svelte-ignore a11y-click-events-have-key-events -->
28
29
  <div class="fastboard-toolbar-colors {theme}" on:click={set_stroke_color}>
29
30
  {#each colorKeys as key (key)}
30
31
  <button
@@ -25,6 +25,7 @@
25
25
  }
26
26
  </script>
27
27
 
28
+ <!-- svelte-ignore a11y-click-events-have-key-events -->
28
29
  <div class="fastboard-toolbar-colors {theme}" on:click={set_stroke_color}>
29
30
  {#each colorKeys as key (key)}
30
31
  <button
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 { Fastboard, ReplayFastboard } from "./components/Fastboard";
9
- export type { FastboardProps, ReplayFastboardProps } from "./components/Fastboard";
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
@@ -34,3 +34,7 @@
34
34
  padding: 8px;
35
35
  }
36
36
  }
37
+
38
+ .netless-whiteboard:focus-visible {
39
+ outline: none;
40
+ }