@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 +11 -11
- package/dist/index.js +179 -153
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +168 -118
- package/dist/index.mjs.map +1 -1
- package/dist/index.svelte.mjs +153 -111
- package/dist/index.svelte.mjs.map +1 -1
- package/package.json +3 -3
- package/src/actions/scroll.ts +1 -1
- package/src/components/Button/Button.svelte.d.ts +1 -2
- package/src/components/Toolbar/README.md +1 -1
- package/src/components/Toolbar/Toolbar.scss +1 -1
- package/src/components/Toolbar/components/Shapes.svelte +1 -0
- package/src/components/Toolbar/components/StrokeColor.svelte +1 -0
- package/src/components/Toolbar/components/TextColor.svelte +1 -0
- package/src/helpers/index.ts +12 -12
- package/src/index.ts +8 -4
- package/src/style.scss +4 -0
package/dist/index.d.ts
CHANGED
|
@@ -7,15 +7,15 @@ interface SvelteAction<T = void> {
|
|
|
7
7
|
destroy?: () => void;
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
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?:
|
|
105
|
+
mount(div: Element, props?: FastboardProps): UI;
|
|
106
106
|
/** update UI (theme, language, etc.) */
|
|
107
|
-
update(props?:
|
|
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
|
|
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?:
|
|
119
|
+
mount(div: Element, props?: ReplayFastboardProps): ReplayUI;
|
|
120
120
|
/** update UI (theme, language, etc.) */
|
|
121
|
-
update(props?:
|
|
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
|
|
130
|
+
declare function createReplayUI(player?: FastboardPlayer | null, div?: Element): ReplayUI;
|
|
131
131
|
|
|
132
132
|
interface AppInToolbar {
|
|
133
133
|
kind: string;
|