@netless/fastboard-ui 0.3.3 → 0.3.4-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/dist/index.d.ts CHANGED
@@ -100,6 +100,35 @@ declare interface FastboardProps {
100
100
  declare class Fastboard extends SvelteComponentTyped<FastboardProps> {
101
101
  }
102
102
 
103
+ interface UI {
104
+ /** render UI to div */
105
+ mount(div: Element, props?: Omit<FastboardProps, "app">): UI;
106
+ /** update UI (theme, language, etc.) */
107
+ update(props?: Omit<FastboardProps, "app">): void;
108
+ /** remove UI */
109
+ destroy(): void;
110
+ }
111
+ /**
112
+ * @example
113
+ * let ui = createUI(fastboardApp, document.getElementById("whiteboard"));
114
+ * ui.update({ theme: "dark" })
115
+ */
116
+ declare function createUI(app: FastboardApp, div?: Element): UI;
117
+ interface ReplayUI {
118
+ /** render UI to div */
119
+ mount(div: Element, props?: Omit<ReplayFastboardProps, "player">): ReplayUI;
120
+ /** update UI (theme, language, etc.) */
121
+ update(props?: Omit<ReplayFastboardProps, "player">): void;
122
+ /** remove UI */
123
+ destroy(): void;
124
+ }
125
+ /**
126
+ * @example
127
+ * let ui = createReplayUI(fastboardPlayer, document.getElementById("whiteboard"));
128
+ * ui.update({ theme: "dark" })
129
+ */
130
+ declare function createReplayUI(player: FastboardPlayer, div?: Element): ReplayUI;
131
+
103
132
  interface AppInToolbar {
104
133
  kind: string;
105
134
  icon: string;
@@ -121,4 +150,4 @@ declare class AppsInToolbar {
121
150
 
122
151
  declare const apps: AppsInToolbar;
123
152
 
124
- export { AppInToolbar, AppsInToolbar, Fastboard, FastboardProps, FastboardUIConfig, GenericIcon, I18nData, IconType, Language, PageControl, PageControlProps, PlayerControl, PlayerControlProps, RedoUndo, RedoUndoProps, ReplayFastboard, ReplayFastboardProps, SvelteAction, Theme, Toolbar, ToolbarConfig, ToolbarProps, ZoomControl, ZoomControlProps, apps };
153
+ export { AppInToolbar, AppsInToolbar, Fastboard, FastboardProps, FastboardUIConfig, GenericIcon, I18nData, IconType, Language, PageControl, PageControlProps, PlayerControl, PlayerControlProps, RedoUndo, RedoUndoProps, ReplayFastboard, ReplayFastboardProps, ReplayUI, SvelteAction, Theme, Toolbar, ToolbarConfig, ToolbarProps, UI, ZoomControl, ZoomControlProps, apps, createReplayUI, createUI };