@netless/fastboard 0.0.7 → 0.0.8
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.cjs.js +4 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +10 -8
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/WhiteboardApp.ts +13 -8
- package/src/internal/Instance.tsx +1 -1
package/package.json
CHANGED
package/src/WhiteboardApp.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
InsertDocsParams,
|
|
3
3
|
Language,
|
|
4
|
+
Layout,
|
|
4
5
|
WhiteboardAppConfig,
|
|
5
6
|
} from "./internal";
|
|
6
7
|
import { Instance } from "./internal";
|
|
7
8
|
|
|
8
|
-
export type { WhiteboardAppConfig, InsertDocsParams };
|
|
9
|
+
export type { Language, Layout, WhiteboardAppConfig, InsertDocsParams };
|
|
9
10
|
|
|
10
11
|
export class WhiteboardApp {
|
|
11
12
|
private readonly _instance: Instance;
|
|
@@ -30,23 +31,27 @@ export class WhiteboardApp {
|
|
|
30
31
|
return this._instance.i18n;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
private _target: HTMLElement | null = null;
|
|
34
34
|
public get target(): HTMLElement | null {
|
|
35
|
-
return this.
|
|
35
|
+
return this._instance.target;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
private _collector: HTMLElement | null = null;
|
|
39
38
|
public get collector(): HTMLElement | null {
|
|
40
|
-
return this.
|
|
39
|
+
return this._instance.collector;
|
|
41
40
|
}
|
|
42
41
|
|
|
43
42
|
public bindElement(
|
|
44
43
|
target?: HTMLElement | null,
|
|
45
44
|
collector?: HTMLElement | null
|
|
46
45
|
) {
|
|
47
|
-
this.
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
this._instance.bindElement(target || null, collector || null);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
public get layout() {
|
|
50
|
+
return this._instance.config.layout;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
public updateLayout(layout?: Layout | undefined) {
|
|
54
|
+
this._instance.updateLayout(layout);
|
|
50
55
|
}
|
|
51
56
|
|
|
52
57
|
public insertDocs(params: InsertDocsParams) {
|