@netless/window-manager 0.3.17-canary.1 → 0.4.0-canary.0
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/CHANGELOG.md +10 -0
- package/README.md +4 -43
- package/dist/AppContext.d.ts +3 -2
- package/dist/AppListener.d.ts +1 -1
- package/dist/AppManager.d.ts +10 -7
- package/dist/AppProxy.d.ts +3 -0
- package/dist/AttributesDelegate.d.ts +19 -11
- package/dist/Base/index.d.ts +1 -2
- package/dist/BoxManager.d.ts +23 -7
- package/dist/Cursor/index.d.ts +2 -1
- package/dist/ReconnectRefresher.d.ts +2 -1
- package/dist/Utils/RoomHacker.d.ts +2 -2
- package/dist/Utils/error.d.ts +3 -0
- package/dist/index.d.ts +14 -16
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/docs/api.md +17 -0
- package/docs/migrate.md +42 -0
- package/package.json +2 -2
- package/src/AppContext.ts +2 -2
- package/src/AppListener.ts +6 -3
- package/src/AppManager.ts +85 -70
- package/src/AppProxy.ts +36 -17
- package/src/AttributesDelegate.ts +76 -49
- package/src/Base/Context.ts +2 -2
- package/src/Base/index.ts +2 -2
- package/src/BoxManager.ts +97 -34
- package/src/Cursor/Cursor.ts +12 -5
- package/src/Cursor/index.ts +15 -8
- package/src/ReconnectRefresher.ts +12 -8
- package/src/Utils/RoomHacker.ts +5 -5
- package/src/Utils/error.ts +6 -1
- package/src/index.ts +111 -102
- package/src/style.css +1 -1
- package/src/viewManager.ts +2 -2
- package/yarn-error.log +0 -4285
package/CHANGELOG.md
ADDED
package/README.md
CHANGED
@@ -2,54 +2,14 @@
|
|
2
2
|
|
3
3
|
- 目录
|
4
4
|
- [references](docs/api.md)
|
5
|
+
- [从白板迁移](docs/migrate.md)
|
5
6
|
## MainView
|
6
7
|
|
7
8
|
`MainView` 也就是主白板, 是垫在所有窗口下面的主白板
|
8
9
|
|
9
10
|
因为多窗口的原因,所以抽象出来一个主白板, 并且把以前部分对 `room` 的操作, 迁移到对 `mainView` 操作
|
10
11
|
|
11
|
-
###
|
12
|
-
|
13
|
-
多窗口模式必须开启白板的 `useMultiViews` 和 `useMobXState` 选项
|
14
|
-
|
15
|
-
会造成原本以下 `room` 上的一些方法和 `state` 失效
|
16
|
-
|
17
|
-
`方法`
|
18
|
-
|
19
|
-
- `room.bindHtmlElement()` 用 `WindowManager.mount()` 代替
|
20
|
-
- `room.scalePptToFit()` 暂无代替,不再推荐调用 `scalePptToFit`
|
21
|
-
- `room.setScenePath()` 用 `manager.setMainViewScenePath()` 代替
|
22
|
-
- `room.setSceneIndex()` 用 `manager.setMainViewSceneIndex()` 代替
|
23
|
-
|
24
|
-
> 为了方便使用 `manager` 替换了 `room` 上的一些方法可以直接对 `mainView` 生效
|
25
|
-
|
26
|
-
- `room.disableCameraTransform`
|
27
|
-
- `room.moveCamera`
|
28
|
-
- `room.moveCameraToContain`
|
29
|
-
- `room.convertToPointInWorld`
|
30
|
-
- `room.setCameraBound`
|
31
|
-
|
32
|
-
`camera`
|
33
|
-
|
34
|
-
- `room.state.cameraState` 用 `manager.mainView.camera` 和 `manager.mainView.size` 代替
|
35
|
-
|
36
|
-
想要监听主白板 `camera` 的变化, 请使用如下方式代替
|
37
|
-
|
38
|
-
```javascript
|
39
|
-
manager.mainView.callbacks.on("onCameraUpdated", camera => {
|
40
|
-
console.log(camera);
|
41
|
-
});
|
42
|
-
```
|
43
|
-
|
44
|
-
监听主白板 `size` 变化
|
45
|
-
|
46
|
-
```javascript
|
47
|
-
manager.mainView.callbacks.on("onSizeUpdated", size => {
|
48
|
-
console.log(size);
|
49
|
-
});
|
50
|
-
```
|
51
|
-
|
52
|
-
### 接入
|
12
|
+
### 快速开始
|
53
13
|
|
54
14
|
```javascript
|
55
15
|
import { WhiteWebSdk } from "white-web-sdk";
|
@@ -58,7 +18,7 @@ import "@netless/window-manager/dist/style.css";
|
|
58
18
|
|
59
19
|
const sdk = new WhiteWebSdk({
|
60
20
|
appIdentifier: "appIdentifier",
|
61
|
-
useMobXState: true
|
21
|
+
useMobXState: true // 请确保打开这个选项
|
62
22
|
});
|
63
23
|
|
64
24
|
sdk.joinRoom({
|
@@ -66,6 +26,7 @@ sdk.joinRoom({
|
|
66
26
|
roomToken: "room token",
|
67
27
|
invisiblePlugins: [WindowManager],
|
68
28
|
useMultiViews: true, // 多窗口必须用开启 useMultiViews
|
29
|
+
disableMagixEventDispatchLimit: true, // 请确保打开这个选项
|
69
30
|
}).then(async room => {
|
70
31
|
const manager = await WindowManager.mount(
|
71
32
|
room,
|
package/dist/AppContext.d.ts
CHANGED
@@ -2,11 +2,13 @@ import { autorun, listenDisposed, listenUpdated, reaction, unlistenDisposed, unl
|
|
2
2
|
import type { Room, SceneDefinition, View } from "white-web-sdk";
|
3
3
|
import type { ReadonlyTeleBox } from "@netless/telebox-insider";
|
4
4
|
import type Emittery from "emittery";
|
5
|
+
import type { BoxManager } from "./BoxManager";
|
5
6
|
import type { AppEmitterEvent } from "./index";
|
6
7
|
import type { AppManager } from "./AppManager";
|
7
8
|
import type { AppProxy } from "./AppProxy";
|
8
9
|
export declare class AppContext<TAttrs extends Record<string, any>, AppOptions = any> {
|
9
10
|
private manager;
|
11
|
+
private boxManager;
|
10
12
|
appId: string;
|
11
13
|
private appProxy;
|
12
14
|
private appOptions?;
|
@@ -22,11 +24,10 @@ export declare class AppContext<TAttrs extends Record<string, any>, AppOptions =
|
|
22
24
|
listenDisposed: typeof listenDisposed;
|
23
25
|
unlistenDisposed: typeof unlistenDisposed;
|
24
26
|
};
|
25
|
-
private boxManager;
|
26
27
|
private store;
|
27
28
|
readonly isAddApp: boolean;
|
28
29
|
readonly isReplay: boolean;
|
29
|
-
constructor(manager: AppManager, appId: string, appProxy: AppProxy, appOptions?: AppOptions | (() => AppOptions) | undefined);
|
30
|
+
constructor(manager: AppManager, boxManager: BoxManager, appId: string, appProxy: AppProxy, appOptions?: AppOptions | (() => AppOptions) | undefined);
|
30
31
|
getDisplayer(): import("white-web-sdk").Displayer<import("white-web-sdk").DisplayerCallbacks>;
|
31
32
|
getAttributes(): TAttrs | undefined;
|
32
33
|
getScenes(): SceneDefinition[] | undefined;
|
package/dist/AppListener.d.ts
CHANGED
@@ -2,8 +2,8 @@ import type { AppManager } from "./AppManager";
|
|
2
2
|
export declare class AppListeners {
|
3
3
|
private manager;
|
4
4
|
private displayer;
|
5
|
-
private boxManager;
|
6
5
|
constructor(manager: AppManager);
|
6
|
+
private get boxManager();
|
7
7
|
addListeners(): void;
|
8
8
|
removeListeners(): void;
|
9
9
|
private mainMagixEventListener;
|
package/dist/AppManager.d.ts
CHANGED
@@ -1,28 +1,27 @@
|
|
1
1
|
import { AppStatus, Events } from "./constants";
|
2
2
|
import { AppProxy } from "./AppProxy";
|
3
|
-
import {
|
4
|
-
import { BoxManager } from "./BoxManager";
|
3
|
+
import { WindowManager } from "./index";
|
5
4
|
import { CameraStore } from "./Utils/CameraStore";
|
6
5
|
import { MainViewProxy } from "./MainView";
|
7
6
|
import { ReconnectRefresher } from "./ReconnectRefresher";
|
8
7
|
import { ViewManager } from "./ViewManager";
|
8
|
+
import type { BoxManager } from "./BoxManager";
|
9
9
|
import type { Displayer, Room } from "white-web-sdk";
|
10
|
-
import type {
|
11
|
-
import type { AddAppParams, WindowManager, TeleBoxRect } from "./index";
|
10
|
+
import type { AddAppParams, TeleBoxRect } from "./index";
|
12
11
|
export declare class AppManager {
|
13
12
|
windowManger: WindowManager;
|
14
13
|
displayer: Displayer;
|
15
|
-
boxManager: BoxManager;
|
16
14
|
cameraStore: CameraStore;
|
17
15
|
viewManager: ViewManager;
|
18
16
|
appProxies: Map<string, AppProxy>;
|
19
17
|
appStatus: Map<string, AppStatus>;
|
20
|
-
store: AttributesDelegate;
|
18
|
+
store: import("./AttributesDelegate").AttributesDelegate;
|
21
19
|
mainViewProxy: MainViewProxy;
|
22
20
|
refresher?: ReconnectRefresher;
|
23
21
|
isReplay: boolean;
|
24
22
|
private appListeners;
|
25
|
-
|
23
|
+
boxManager?: BoxManager;
|
24
|
+
constructor(windowManger: WindowManager);
|
26
25
|
private onCreated;
|
27
26
|
/**
|
28
27
|
* 插件更新 attributes 时的回调
|
@@ -31,6 +30,10 @@ export declare class AppManager {
|
|
31
30
|
* @memberof WindowManager
|
32
31
|
*/
|
33
32
|
attributesUpdateCallback(apps: any): Promise<void>;
|
33
|
+
refresh(): void;
|
34
|
+
setBoxManager(boxManager: BoxManager): void;
|
35
|
+
resetMaximized(): void;
|
36
|
+
resetMinimized(): void;
|
34
37
|
private onAppDelete;
|
35
38
|
bindMainView(divElement: HTMLDivElement, disableCameraTransform: boolean): void;
|
36
39
|
addApp(params: AddAppParams, isDynamicPPT: boolean): Promise<string | undefined>;
|
package/dist/AppProxy.d.ts
CHANGED
@@ -19,6 +19,9 @@ export declare class AppProxy extends Base {
|
|
19
19
|
private kind;
|
20
20
|
isAddApp: boolean;
|
21
21
|
private status;
|
22
|
+
private stateKey;
|
23
|
+
private setupResult?;
|
24
|
+
private appContext?;
|
22
25
|
constructor(params: BaseInsertParams, manager: AppManager, appId: string, isAddApp: boolean);
|
23
26
|
private initScenes;
|
24
27
|
get view(): View | undefined;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { AppAttributes } from "./constants";
|
2
2
|
import type { AddAppParams, AppSyncAttributes } from "./index";
|
3
|
-
import type { Camera, Size } from "white-web-sdk";
|
4
|
-
import type { AppManager } from "./AppManager";
|
3
|
+
import type { Camera, Size, View } from "white-web-sdk";
|
5
4
|
import type { Cursor } from "./Cursor/Cursor";
|
6
5
|
export declare enum Fields {
|
7
6
|
Apps = "apps",
|
@@ -26,14 +25,22 @@ export declare type Position = {
|
|
26
25
|
id?: string;
|
27
26
|
};
|
28
27
|
export declare type PositionType = "main" | "app";
|
28
|
+
export declare type StoreContext = {
|
29
|
+
getAttributes: () => any;
|
30
|
+
safeUpdateAttributes: (keys: string[], value: any) => void;
|
31
|
+
safeSetAttributes: (attributes: any) => void;
|
32
|
+
};
|
29
33
|
export declare class AttributesDelegate {
|
30
|
-
private
|
31
|
-
constructor(
|
34
|
+
private context;
|
35
|
+
constructor(context: StoreContext);
|
36
|
+
setContext(context: StoreContext): void;
|
37
|
+
get attributes(): any;
|
32
38
|
apps(): Apps;
|
33
39
|
get focus(): string | undefined;
|
34
40
|
getAppAttributes(id: string): AppSyncAttributes;
|
35
41
|
getAppState(id: string): any;
|
36
|
-
getMaximized():
|
42
|
+
getMaximized(): any;
|
43
|
+
getMinimized(): any;
|
37
44
|
setupAppAttributes(params: AddAppParams, id: string, isDynamicPPT: boolean): void;
|
38
45
|
updateAppState(appId: string, stateName: AppAttributes, state: any): void;
|
39
46
|
cleanAppAttributes(id: string): void;
|
@@ -42,23 +49,23 @@ export declare class AttributesDelegate {
|
|
42
49
|
getAppScenePath(id: string): any;
|
43
50
|
getMainViewScenePath(): any;
|
44
51
|
getMainViewSceneIndex(): any;
|
45
|
-
getBoxState():
|
52
|
+
getBoxState(): any;
|
46
53
|
setMainViewScenePath(scenePath: string): void;
|
47
54
|
setMainViewSceneIndex(index: number): void;
|
48
55
|
getMainViewCamera(): MainViewCamera;
|
49
56
|
getMainViewSize(): MainViewSize;
|
50
|
-
setMainViewCamera(camera: Camera & {
|
57
|
+
setMainViewCamera(camera: (Camera & {
|
51
58
|
id: string;
|
52
|
-
} | undefined): void;
|
53
|
-
setMainViewSize(size: Size & {
|
59
|
+
}) | undefined): void;
|
60
|
+
setMainViewSize(size: (Size & {
|
54
61
|
id: string;
|
55
|
-
} | undefined): void;
|
62
|
+
}) | undefined): void;
|
56
63
|
setAppFocus(appId: string, focus: boolean): void;
|
57
64
|
updateCursor(uid: string, position: Position): void;
|
58
65
|
updateCursorState(uid: string, cursorState: string | undefined): void;
|
59
66
|
getCursorState(uid: string): any;
|
60
67
|
cleanCursor(uid: string): void;
|
61
|
-
setMainViewFocusPath(): void;
|
68
|
+
setMainViewFocusPath(mainView: View): void;
|
62
69
|
}
|
63
70
|
export declare type MainViewSize = {
|
64
71
|
id: string;
|
@@ -74,3 +81,4 @@ export declare type MainViewCamera = {
|
|
74
81
|
export declare type Cursors = {
|
75
82
|
[key: string]: Cursor;
|
76
83
|
};
|
84
|
+
export declare const store: AttributesDelegate;
|
package/dist/Base/index.d.ts
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
import type { AppManager } from "../AppManager";
|
2
|
-
import { AttributesDelegate } from "../AttributesDelegate";
|
3
2
|
export declare class Base {
|
4
3
|
manager: AppManager;
|
5
|
-
store: AttributesDelegate;
|
4
|
+
store: import("../AttributesDelegate").AttributesDelegate;
|
6
5
|
context: import("./Context").Context;
|
7
6
|
constructor(manager: AppManager);
|
8
7
|
}
|
package/dist/BoxManager.d.ts
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
+
import { AppAttributes } from "./constants";
|
1
2
|
import { TELE_BOX_STATE, TeleBoxManager } from "@netless/telebox-insider";
|
2
|
-
import
|
3
|
-
import type {
|
3
|
+
import { WindowManager } from "./index";
|
4
|
+
import type { AddAppOptions, AppInitState, EmitterType, CallbacksType } from "./index";
|
5
|
+
import type { TeleBoxManagerUpdateConfig, ReadonlyTeleBox, TeleBoxColorScheme, TeleBoxRect } from "@netless/telebox-insider";
|
4
6
|
import type Emittery from "emittery";
|
5
|
-
import type { AppManager } from "./AppManager";
|
6
7
|
import type { NetlessApp } from "./typings";
|
7
8
|
import type { View } from "white-web-sdk";
|
8
9
|
export { TELE_BOX_STATE };
|
@@ -39,20 +40,34 @@ export declare type CreateTeleBoxManagerConfig = {
|
|
39
40
|
collectorStyles?: Partial<CSSStyleDeclaration>;
|
40
41
|
prefersColorScheme?: TeleBoxColorScheme;
|
41
42
|
};
|
43
|
+
export declare type BoxManagerContext = {
|
44
|
+
safeSetAttributes: (attributes: any) => void;
|
45
|
+
getMainView: () => View;
|
46
|
+
updateAppState: (appId: string, field: AppAttributes, value: any) => void;
|
47
|
+
emitter: EmitterType;
|
48
|
+
callbacks: CallbacksType;
|
49
|
+
canOperate: () => boolean;
|
50
|
+
notifyContainerRectUpdate: (rect: TeleBoxRect) => void;
|
51
|
+
cleanFocus: () => void;
|
52
|
+
};
|
53
|
+
export declare const createBoxManager: (manager: WindowManager, callbacks: CallbacksType, emitter: EmitterType, options: CreateTeleBoxManagerConfig) => BoxManager;
|
42
54
|
export declare class BoxManager {
|
43
|
-
private
|
55
|
+
private context;
|
56
|
+
private createTeleBoxManagerConfig?;
|
44
57
|
teleBoxManager: TeleBoxManager;
|
45
|
-
|
46
|
-
private mainView;
|
47
|
-
|
58
|
+
constructor(context: BoxManagerContext, createTeleBoxManagerConfig?: CreateTeleBoxManagerConfig | undefined);
|
59
|
+
private get mainView();
|
60
|
+
private get canOperate();
|
48
61
|
get boxState(): "normal" | "minimized" | "maximized";
|
49
62
|
get maximized(): boolean;
|
50
63
|
get minimized(): boolean;
|
51
64
|
get darkMode(): boolean;
|
52
65
|
get prefersColorScheme(): TeleBoxColorScheme;
|
66
|
+
get boxSize(): number;
|
53
67
|
createBox(params: CreateBoxParams): void;
|
54
68
|
setBoxInitState(appId: string): void;
|
55
69
|
setupBoxManager(createTeleBoxManagerConfig?: CreateTeleBoxManagerConfig): TeleBoxManager;
|
70
|
+
setCollectorContainer(container: HTMLElement): void;
|
56
71
|
getBox(appId: string): ReadonlyTeleBox | undefined;
|
57
72
|
closeBox(appId: string, skipUpdate?: boolean): ReadonlyTeleBox | undefined;
|
58
73
|
boxIsFocus(appId: string): boolean | undefined;
|
@@ -72,5 +87,6 @@ export declare class BoxManager {
|
|
72
87
|
focusTopBox(): void;
|
73
88
|
setReadonly(readonly: boolean): void;
|
74
89
|
setPrefersColorScheme(colorScheme: TeleBoxColorScheme): void;
|
90
|
+
setZIndex(id: string, zIndex: number, skipUpdate?: boolean): void;
|
75
91
|
destroy(): void;
|
76
92
|
}
|
package/dist/Cursor/index.d.ts
CHANGED
@@ -20,12 +20,13 @@ export declare class CursorManager extends Base {
|
|
20
20
|
roomMembers?: readonly RoomMember[];
|
21
21
|
private mainViewElement?;
|
22
22
|
constructor(appManager: AppManager);
|
23
|
+
setupWrapper(wrapper: HTMLElement): void;
|
23
24
|
setMainViewDivElement(div: HTMLDivElement): void;
|
24
25
|
private startReaction;
|
25
26
|
private getUids;
|
26
27
|
private handleRoomMembersChange;
|
27
28
|
get cursors(): any;
|
28
|
-
get boxState():
|
29
|
+
get boxState(): any;
|
29
30
|
get focusView(): View | undefined;
|
30
31
|
private mouseMoveListener;
|
31
32
|
private touchMoveListener;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { Room } from "white-web-sdk";
|
2
|
-
import type { AppManager } from
|
2
|
+
import type { AppManager } from "./AppManager";
|
3
3
|
export declare class ReconnectRefresher {
|
4
4
|
private manager;
|
5
5
|
private phase?;
|
@@ -12,5 +12,6 @@ export declare class ReconnectRefresher {
|
|
12
12
|
private releaseDisposers;
|
13
13
|
add(id: string, func: any): void;
|
14
14
|
remove(id: string): void;
|
15
|
+
hasReactor(id: string): boolean;
|
15
16
|
destroy(): void;
|
16
17
|
}
|
@@ -1,3 +1,3 @@
|
|
1
|
+
import type { WindowManager } from '../index';
|
1
2
|
import type { Room } from "white-web-sdk";
|
2
|
-
|
3
|
-
export declare const replaceRoomFunction: (room: Room, manager: AppManager) => void;
|
3
|
+
export declare const replaceRoomFunction: (room: Room, manager: WindowManager) => void;
|
package/dist/Utils/error.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
@@ -49,6 +49,7 @@ export declare type AppSyncAttributes = {
|
|
49
49
|
state?: any;
|
50
50
|
isDynamicPPT?: boolean;
|
51
51
|
fullPath?: string;
|
52
|
+
createdAt?: number;
|
52
53
|
};
|
53
54
|
export declare type AppInitState = {
|
54
55
|
id: string;
|
@@ -91,7 +92,8 @@ export declare type EmitterEvent = {
|
|
91
92
|
boxStateChange: string;
|
92
93
|
playgroundSizeChange: DOMRect;
|
93
94
|
};
|
94
|
-
export declare
|
95
|
+
export declare type EmitterType = Emittery<EmitterEvent>;
|
96
|
+
export declare const emitter: EmitterType;
|
95
97
|
export declare type PublicEvent = {
|
96
98
|
mainViewModeChange: ViewVisionMode;
|
97
99
|
boxStateChange: `${TELE_BOX_STATE}`;
|
@@ -101,7 +103,7 @@ export declare type PublicEvent = {
|
|
101
103
|
};
|
102
104
|
export declare type MountParams = {
|
103
105
|
room: Room;
|
104
|
-
container
|
106
|
+
container?: HTMLElement;
|
105
107
|
/** 白板高宽比例, 默认为 9 / 16 */
|
106
108
|
containerSizeRatio?: number;
|
107
109
|
/** 显示 PS 透明背景,默认 true */
|
@@ -114,7 +116,8 @@ export declare type MountParams = {
|
|
114
116
|
disableCameraTransform?: boolean;
|
115
117
|
prefersColorScheme?: TeleBoxColorScheme;
|
116
118
|
};
|
117
|
-
export declare
|
119
|
+
export declare type CallbacksType = Emittery<PublicEvent>;
|
120
|
+
export declare const callbacks: CallbacksType;
|
118
121
|
export declare class WindowManager extends InvisiblePlugin<WindowMangerAttributes> {
|
119
122
|
static kind: string;
|
120
123
|
static displayer: Displayer;
|
@@ -132,24 +135,19 @@ export declare class WindowManager extends InvisiblePlugin<WindowMangerAttribute
|
|
132
135
|
cursorManager?: CursorManager;
|
133
136
|
viewMode: ViewMode;
|
134
137
|
isReplay: boolean;
|
138
|
+
private boxManager?;
|
139
|
+
private static params?;
|
135
140
|
constructor(context: InvisiblePluginContext);
|
136
|
-
/**
|
137
|
-
* 挂载 WindowManager
|
138
|
-
* @deprecated
|
139
|
-
*/
|
140
|
-
static mount(room: Room, container: HTMLElement, collectorContainer?: HTMLElement, options?: {
|
141
|
-
chessboard: boolean;
|
142
|
-
containerSizeRatio: number;
|
143
|
-
collectorStyles?: Partial<CSSStyleDeclaration>;
|
144
|
-
debug?: boolean;
|
145
|
-
overwriteStyles?: string;
|
146
|
-
}): Promise<WindowManager>;
|
147
141
|
static mount(params: MountParams): Promise<WindowManager>;
|
148
142
|
private static initManager;
|
143
|
+
private static initContainer;
|
144
|
+
bindContainer(container: HTMLElement, collectorContainer?: HTMLElement): void;
|
149
145
|
/**
|
150
146
|
* 注册插件
|
151
147
|
*/
|
152
148
|
static register<AppOptions = any, SetupResult = any, Attributes = any>(params: RegisterParams<AppOptions, SetupResult, Attributes>): Promise<void>;
|
149
|
+
static setContainer(container: HTMLElement): void;
|
150
|
+
static setCollectorContainer(container: HTMLElement): void;
|
153
151
|
/**
|
154
152
|
* 创建一个 app 至白板
|
155
153
|
*/
|
@@ -191,9 +189,9 @@ export declare class WindowManager extends InvisiblePlugin<WindowMangerAttribute
|
|
191
189
|
get camera(): Camera;
|
192
190
|
get cameraState(): CameraState;
|
193
191
|
get apps(): Apps | undefined;
|
194
|
-
get boxState(): TeleBoxState;
|
192
|
+
get boxState(): TeleBoxState | undefined;
|
195
193
|
get darkMode(): boolean;
|
196
|
-
get prefersColorScheme(): TeleBoxColorScheme;
|
194
|
+
get prefersColorScheme(): TeleBoxColorScheme | undefined;
|
197
195
|
/**
|
198
196
|
* 查询所有的 App
|
199
197
|
*/
|