@netless/window-manager 1.0.0-canary.0 → 1.0.0-canary.11

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.
Files changed (49) hide show
  1. package/__mocks__/white-web-sdk.ts +10 -1
  2. package/dist/App/AppContext.d.ts +16 -15
  3. package/dist/App/AppPageStateImpl.d.ts +6 -2
  4. package/dist/App/AppProxy.d.ts +26 -4
  5. package/dist/App/AppViewSync.d.ts +11 -0
  6. package/dist/App/WhiteboardView.d.ts +24 -0
  7. package/dist/App/index.d.ts +1 -0
  8. package/dist/AppManager.d.ts +5 -3
  9. package/dist/AttributesDelegate.d.ts +6 -14
  10. package/dist/BoxManager.d.ts +4 -3
  11. package/dist/Helper.d.ts +12 -2
  12. package/dist/InternalEmitter.d.ts +4 -0
  13. package/dist/Page/PageController.d.ts +1 -0
  14. package/dist/ReconnectRefresher.d.ts +1 -1
  15. package/dist/Utils/Common.d.ts +1 -0
  16. package/dist/View/CameraSynchronizer.d.ts +7 -7
  17. package/dist/View/MainView.d.ts +0 -1
  18. package/dist/constants.d.ts +1 -0
  19. package/dist/index.cjs.js +12 -12
  20. package/dist/index.d.ts +6 -3
  21. package/dist/index.es.js +722 -652
  22. package/dist/index.umd.js +12 -12
  23. package/dist/style.css +1 -1
  24. package/dist/typings.d.ts +4 -0
  25. package/docs/app-context.md +98 -64
  26. package/docs/develop-app.md +2 -5
  27. package/package.json +3 -2
  28. package/pnpm-lock.yaml +11 -5
  29. package/src/App/AppContext.ts +71 -74
  30. package/src/App/AppPageStateImpl.ts +25 -6
  31. package/src/App/AppProxy.ts +206 -26
  32. package/src/App/AppViewSync.ts +73 -0
  33. package/src/App/Storage/index.ts +4 -4
  34. package/src/App/WhiteboardView.ts +89 -0
  35. package/src/App/index.ts +1 -0
  36. package/src/AppManager.ts +32 -23
  37. package/src/AttributesDelegate.ts +14 -17
  38. package/src/BoxManager.ts +14 -9
  39. package/src/Helper.ts +10 -1
  40. package/src/InternalEmitter.ts +4 -0
  41. package/src/Page/PageController.ts +1 -0
  42. package/src/ReconnectRefresher.ts +1 -0
  43. package/src/Utils/Common.ts +6 -0
  44. package/src/View/CameraSynchronizer.ts +32 -27
  45. package/src/View/MainView.ts +24 -41
  46. package/src/constants.ts +2 -0
  47. package/src/index.ts +20 -5
  48. package/src/style.css +9 -0
  49. package/src/typings.ts +4 -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";
@@ -54,6 +54,8 @@ export declare type AppSyncAttributes = {
54
54
  isDynamicPPT?: boolean;
55
55
  fullPath?: string;
56
56
  createdAt?: number;
57
+ camera?: ICamera;
58
+ size?: ISize;
57
59
  };
58
60
  export declare type AppInitState = {
59
61
  id: string;
@@ -78,8 +80,8 @@ export declare type MountParams = {
78
80
  container?: HTMLElement;
79
81
  /** 白板高宽比例, 默认为 9 / 16 */
80
82
  containerSizeRatio?: number;
81
- /** 显示 PS 透明背景,默认 true */
82
- chessboard?: boolean;
83
+ /** 是否高亮显示同步区域, 默认为 true */
84
+ highlightStage?: boolean;
83
85
  collectorContainer?: HTMLElement;
84
86
  collectorStyles?: Partial<CSSStyleDeclaration>;
85
87
  overwriteStyles?: string;
@@ -142,6 +144,7 @@ export declare class WindowManager extends InvisiblePlugin<WindowMangerAttribute
142
144
  setMainViewSceneIndex(index: number): Promise<void>;
143
145
  nextPage(): Promise<boolean>;
144
146
  prevPage(): Promise<boolean>;
147
+ jumpPage(index: number): Promise<boolean>;
145
148
  addPage(params?: AddPageParams): Promise<void>;
146
149
  /**
147
150
  * 删除一页