@netless/window-manager 1.0.0-canary.2 → 1.0.0-canary.22
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/__mocks__/white-web-sdk.ts +10 -1
- package/dist/App/AppContext.d.ts +11 -7
- package/dist/App/AppProxy.d.ts +35 -7
- package/dist/App/{WhiteBoardView.d.ts → WhiteboardView.d.ts} +10 -1
- package/dist/App/index.d.ts +2 -1
- package/dist/App/type.d.ts +21 -0
- package/dist/AppManager.d.ts +5 -5
- package/dist/AttributesDelegate.d.ts +11 -16
- package/dist/BoxManager.d.ts +7 -6
- package/dist/Cursor/index.d.ts +0 -1
- package/dist/InternalEmitter.d.ts +3 -2
- package/dist/Page/PageController.d.ts +1 -0
- package/dist/ReconnectRefresher.d.ts +1 -1
- package/dist/Utils/Common.d.ts +1 -0
- package/dist/View/CameraSynchronizer.d.ts +9 -9
- package/dist/View/MainView.d.ts +18 -7
- package/dist/View/ViewSync.d.ts +24 -0
- package/dist/constants.d.ts +6 -2
- package/dist/index.cjs.js +12 -12
- package/dist/index.d.ts +19 -2
- package/dist/index.es.js +803 -425
- package/dist/index.umd.js +12 -12
- package/dist/style.css +1 -1
- package/docs/app-context.md +98 -64
- package/docs/develop-app.md +2 -5
- package/docs/mirgrate-to-1.0.md +28 -0
- package/package.json +3 -3
- package/pnpm-lock.yaml +9 -9
- package/src/App/AppContext.ts +43 -21
- package/src/App/AppProxy.ts +247 -79
- package/src/App/{WhiteBoardView.ts → WhiteboardView.ts} +38 -4
- package/src/App/index.ts +2 -1
- package/src/App/type.ts +22 -0
- package/src/AppManager.ts +38 -31
- package/src/AttributesDelegate.ts +18 -18
- package/src/BoxManager.ts +28 -22
- package/src/Cursor/index.ts +0 -2
- package/src/InternalEmitter.ts +3 -2
- package/src/Page/PageController.ts +1 -0
- package/src/PageState.ts +1 -1
- package/src/ReconnectRefresher.ts +7 -2
- package/src/Utils/Common.ts +6 -0
- package/src/Utils/Reactive.ts +27 -26
- package/src/Utils/RoomHacker.ts +3 -0
- package/src/View/CameraSynchronizer.ts +43 -30
- package/src/View/MainView.ts +106 -81
- package/src/View/ViewSync.ts +110 -0
- package/src/constants.ts +5 -1
- package/src/index.ts +59 -15
- package/src/style.css +8 -0
package/dist/index.d.ts
CHANGED
@@ -6,7 +6,7 @@ import "video.js/dist/video-js.css";
|
|
6
6
|
import "./style.css";
|
7
7
|
import "@netless/telebox-insider/dist/style.css";
|
8
8
|
import type { TELE_BOX_STATE } from "./BoxManager";
|
9
|
-
import type { Apps, Position } from "./AttributesDelegate";
|
9
|
+
import type { Apps, Position, ICamera, ISize } from "./AttributesDelegate";
|
10
10
|
import type { Displayer, SceneDefinition, View, Room, InvisiblePluginContext, Camera, AnimationMode, CameraBound, Point, Rectangle, CameraState, Player, ImageInformation, SceneState } from "white-web-sdk";
|
11
11
|
import type { AppListeners } from "./AppListener";
|
12
12
|
import type { ApplianceIcons, NetlessApp, RegisterParams } from "./typings";
|
@@ -15,6 +15,7 @@ import type { AppProxy } from "./App";
|
|
15
15
|
import type { PublicEvent } from "./callback";
|
16
16
|
import type Emittery from "emittery";
|
17
17
|
import type { PageController, AddPageParams, PageState } from "./Page";
|
18
|
+
import { Val } from "value-enhancer";
|
18
19
|
export declare type WindowMangerAttributes = {
|
19
20
|
modelValue?: string;
|
20
21
|
boxState: TELE_BOX_STATE;
|
@@ -54,6 +55,8 @@ export declare type AppSyncAttributes = {
|
|
54
55
|
isDynamicPPT?: boolean;
|
55
56
|
fullPath?: string;
|
56
57
|
createdAt?: number;
|
58
|
+
camera?: ICamera;
|
59
|
+
size?: ISize;
|
57
60
|
};
|
58
61
|
export declare type AppInitState = {
|
59
62
|
id: string;
|
@@ -67,6 +70,11 @@ export declare type AppInitState = {
|
|
67
70
|
sceneIndex?: number;
|
68
71
|
boxState?: TeleBoxState;
|
69
72
|
zIndex?: number;
|
73
|
+
visible?: boolean;
|
74
|
+
stageRatio?: number;
|
75
|
+
resizable?: boolean;
|
76
|
+
draggable?: boolean;
|
77
|
+
ratio?: number;
|
70
78
|
};
|
71
79
|
export declare type CursorMovePayload = {
|
72
80
|
uid: string;
|
@@ -78,8 +86,10 @@ export declare type MountParams = {
|
|
78
86
|
container?: HTMLElement;
|
79
87
|
/** 白板高宽比例, 默认为 9 / 16 */
|
80
88
|
containerSizeRatio?: number;
|
81
|
-
/**
|
89
|
+
/** @deprecated */
|
82
90
|
chessboard?: boolean;
|
91
|
+
/** 是否高亮显示同步区域, 默认为 true */
|
92
|
+
highlightStage?: boolean;
|
83
93
|
collectorContainer?: HTMLElement;
|
84
94
|
collectorStyles?: Partial<CSSStyleDeclaration>;
|
85
95
|
overwriteStyles?: string;
|
@@ -106,6 +116,7 @@ export declare class WindowManager extends InvisiblePlugin<WindowMangerAttribute
|
|
106
116
|
appManager?: AppManager;
|
107
117
|
cursorManager?: CursorManager;
|
108
118
|
viewMode: ViewMode;
|
119
|
+
viewMode$: Val<ViewMode, any>;
|
109
120
|
isReplay: boolean;
|
110
121
|
private _pageState?;
|
111
122
|
private boxManager?;
|
@@ -142,6 +153,7 @@ export declare class WindowManager extends InvisiblePlugin<WindowMangerAttribute
|
|
142
153
|
setMainViewSceneIndex(index: number): Promise<void>;
|
143
154
|
nextPage(): Promise<boolean>;
|
144
155
|
prevPage(): Promise<boolean>;
|
156
|
+
jumpPage(index: number): Promise<boolean>;
|
145
157
|
addPage(params?: AddPageParams): Promise<void>;
|
146
158
|
/**
|
147
159
|
* 删除一页
|
@@ -238,6 +250,11 @@ export declare class WindowManager extends InvisiblePlugin<WindowMangerAttribute
|
|
238
250
|
/** @inner */
|
239
251
|
_refresh(): void;
|
240
252
|
setContainerSizeRatio(ratio: number): void;
|
253
|
+
createPPTHandler(): {
|
254
|
+
onPageJumpTo: (_pptUUID: string, index: number) => void;
|
255
|
+
onPageToNext: () => void;
|
256
|
+
onPageToPrev: () => void;
|
257
|
+
};
|
241
258
|
private isDynamicPPT;
|
242
259
|
private ensureAttributes;
|
243
260
|
}
|