@netless/fastboard-ui 0.3.0-canary.1 → 0.3.0-canary.2

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.0-canary.1",
3
+ "version": "0.3.0-canary.2",
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.1"
13
+ "@netless/fastboard-core": "0.3.0-canary.2"
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.1"
20
+ "@netless/fastboard-core": "0.3.0-canary.2"
21
21
  },
22
22
  "scripts": {
23
23
  "cleanup": "rimraf dist",
@@ -9,14 +9,14 @@
9
9
  export let app: FastboardApp | null | undefined = null;
10
10
  export let theme: Theme = "light";
11
11
  export let language: Language = "en";
12
- export let ref: ((element: HTMLElement) => void) | undefined = undefined;
12
+ export let ref: ((element: HTMLDivElement | null) => void) | undefined = undefined;
13
13
 
14
14
  const name = "fastboard";
15
15
 
16
16
  let container: HTMLDivElement;
17
17
 
18
18
  $: if (app && container) app.bindContainer(container);
19
- $: if (ref && container) ref(container);
19
+ $: if (ref) ref(container || null);
20
20
  </script>
21
21
 
22
22
  <div class="{name}-root" class:loading={!app}>
@@ -6,7 +6,7 @@ export declare interface FastboardProps {
6
6
  app?: FastboardApp | null;
7
7
  theme?: Theme;
8
8
  language?: Language;
9
- ref?: (container: HTMLElement) => void;
9
+ ref?: (container: HTMLDivElement | null) => void;
10
10
  }
11
11
 
12
12
  declare class Fastboard extends SvelteComponentTyped<FastboardProps> {}
@@ -6,14 +6,14 @@
6
6
  export let player: FastboardPlayer | null | undefined = null;
7
7
  export let theme: Theme = "light";
8
8
  export let language: Language = "en";
9
- export let ref: ((element: HTMLElement) => void) | undefined = undefined;
9
+ export let ref: ((element: HTMLDivElement | null) => void) | undefined = undefined;
10
10
 
11
11
  const name = "fastboard";
12
12
 
13
13
  let container: HTMLDivElement;
14
14
 
15
15
  $: if (player && container) player.bindContainer(container);
16
- $: if (ref && container) ref(container);
16
+ $: if (ref) ref(container || null);
17
17
  </script>
18
18
 
19
19
  <div class="{name}-root" class:loading={!player}>
@@ -6,7 +6,7 @@ export declare interface ReplayFastboardProps {
6
6
  player?: FastboardPlayer | null;
7
7
  theme?: Theme;
8
8
  language?: Language;
9
- ref?: (container: HTMLElement) => void;
9
+ ref?: (container: HTMLDivElement | null) => void;
10
10
  }
11
11
 
12
12
  declare class ReplayFastboard extends SvelteComponentTyped<ReplayFastboardProps> {}