@netless/fastboard-ui 0.3.0-canary.5 → 0.3.0-canary.6
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.js +23 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -9
- package/dist/index.mjs.map +1 -1
- package/dist/index.svelte.mjs +26 -11
- package/dist/index.svelte.mjs.map +1 -1
- package/package.json +3 -3
- package/src/components/Fastboard/Fastboard.svelte +6 -1
- package/src/components/Fastboard/ReplayFastboard.svelte +16 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netless/fastboard-ui",
|
|
3
|
-
"version": "0.3.0-canary.
|
|
3
|
+
"version": "0.3.0-canary.6",
|
|
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.0-canary.
|
|
13
|
+
"@netless/fastboard-core": "0.3.0-canary.6"
|
|
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.0-canary.
|
|
20
|
+
"@netless/fastboard-core": "0.3.0-canary.6"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"cleanup": "rimraf dist",
|
|
@@ -17,7 +17,12 @@
|
|
|
17
17
|
|
|
18
18
|
let container: HTMLDivElement;
|
|
19
19
|
|
|
20
|
-
$:
|
|
20
|
+
$: try {
|
|
21
|
+
if (app && container) app.bindContainer(container);
|
|
22
|
+
} catch (err) {
|
|
23
|
+
console.error("[fastboard] An error occurred while binding container");
|
|
24
|
+
console.error(err);
|
|
25
|
+
}
|
|
21
26
|
|
|
22
27
|
onMount(() => {
|
|
23
28
|
if (containerRef) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { FastboardPlayer } from "@netless/fastboard-core";
|
|
3
3
|
import type { Language, Theme } from "../../typings";
|
|
4
|
+
import { onMount } from "svelte";
|
|
4
5
|
import { tippy_hide_all } from "../../actions/tippy";
|
|
5
6
|
import PlayerControl from "../PlayerControl";
|
|
6
7
|
|
|
@@ -13,8 +14,21 @@
|
|
|
13
14
|
|
|
14
15
|
let container: HTMLDivElement;
|
|
15
16
|
|
|
16
|
-
$:
|
|
17
|
-
|
|
17
|
+
$: try {
|
|
18
|
+
if (player && container) player.bindContainer(container);
|
|
19
|
+
} catch (err) {
|
|
20
|
+
console.error("[fastboard] An error occurred while binding container");
|
|
21
|
+
console.error(err);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
onMount(() => {
|
|
25
|
+
if (containerRef) {
|
|
26
|
+
containerRef(container);
|
|
27
|
+
return () => {
|
|
28
|
+
if (containerRef) containerRef(null);
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
});
|
|
18
32
|
</script>
|
|
19
33
|
|
|
20
34
|
<div class="{name}-root" class:loading={!player}>
|