@netless/fastboard-ui 0.3.5 → 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/dist/index.d.ts CHANGED
@@ -7,15 +7,15 @@ interface SvelteAction<T = void> {
7
7
  destroy?: () => void;
8
8
  };
9
9
  }
10
- declare type Theme = "light" | "dark";
11
- declare type Language = "en" | "zh-CN";
12
- declare type IconType = "normal" | "disable";
13
- declare type GenericIcon<K extends string, E extends string = IconType> = {
10
+ type Theme = "light" | "dark";
11
+ type Language = "en" | "zh-CN";
12
+ type IconType = "normal" | "disable";
13
+ type GenericIcon<K extends string, E extends string = IconType> = {
14
14
  [key in K]: {
15
15
  [kind in E]: string;
16
16
  };
17
17
  };
18
- declare type I18nData<T extends string> = Record<Language, Record<T, string>>;
18
+ type I18nData<T extends string> = Record<Language, Record<T, string>>;
19
19
  interface ToolbarConfig {
20
20
  apps?: {
21
21
  enable?: boolean;
@@ -102,9 +102,9 @@ declare class Fastboard extends SvelteComponentTyped<FastboardProps> {
102
102
 
103
103
  interface UI {
104
104
  /** render UI to div */
105
- mount(div: Element, props?: Omit<FastboardProps, "app">): UI;
105
+ mount(div: Element, props?: FastboardProps): UI;
106
106
  /** update UI (theme, language, etc.) */
107
- update(props?: Omit<FastboardProps, "app">): void;
107
+ update(props?: FastboardProps): void;
108
108
  /** remove UI */
109
109
  destroy(): void;
110
110
  }
@@ -113,12 +113,12 @@ interface UI {
113
113
  * let ui = createUI(fastboardApp, document.getElementById("whiteboard"));
114
114
  * ui.update({ theme: "dark" })
115
115
  */
116
- declare function createUI(app: FastboardApp, div?: Element): UI;
116
+ declare function createUI(app?: FastboardApp | null, div?: Element): UI;
117
117
  interface ReplayUI {
118
118
  /** render UI to div */
119
- mount(div: Element, props?: Omit<ReplayFastboardProps, "player">): ReplayUI;
119
+ mount(div: Element, props?: ReplayFastboardProps): ReplayUI;
120
120
  /** update UI (theme, language, etc.) */
121
- update(props?: Omit<ReplayFastboardProps, "player">): void;
121
+ update(props?: ReplayFastboardProps): void;
122
122
  /** remove UI */
123
123
  destroy(): void;
124
124
  }
@@ -127,7 +127,7 @@ interface ReplayUI {
127
127
  * let ui = createReplayUI(fastboardPlayer, document.getElementById("whiteboard"));
128
128
  * ui.update({ theme: "dark" })
129
129
  */
130
- declare function createReplayUI(player: FastboardPlayer, div?: Element): ReplayUI;
130
+ declare function createReplayUI(player?: FastboardPlayer | null, div?: Element): ReplayUI;
131
131
 
132
132
  interface AppInToolbar {
133
133
  kind: string;