@netless/window-manager 0.4.32 → 1.0.0-canary.10

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 (56) 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 -5
  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 +9 -8
  11. package/dist/Helper.d.ts +12 -4
  12. package/dist/InternalEmitter.d.ts +6 -1
  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 +17 -0
  17. package/dist/View/MainView.d.ts +4 -6
  18. package/dist/constants.d.ts +1 -0
  19. package/dist/index.cjs.js +21 -22
  20. package/dist/index.d.ts +6 -5
  21. package/dist/index.es.js +2512 -2059
  22. package/dist/index.umd.js +21 -22
  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 +4 -3
  28. package/pnpm-lock.yaml +90 -97
  29. package/src/App/AppContext.ts +72 -75
  30. package/src/App/AppPageStateImpl.ts +25 -6
  31. package/src/App/AppProxy.ts +206 -35
  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 +107 -115
  39. package/src/Cursor/index.ts +5 -5
  40. package/src/Helper.ts +12 -16
  41. package/src/InternalEmitter.ts +10 -4
  42. package/src/Page/PageController.ts +1 -0
  43. package/src/ReconnectRefresher.ts +1 -0
  44. package/src/Utils/Common.ts +6 -0
  45. package/src/View/CameraSynchronizer.ts +72 -0
  46. package/src/View/MainView.ts +53 -78
  47. package/src/constants.ts +2 -0
  48. package/src/index.ts +31 -36
  49. package/src/style.css +9 -0
  50. package/src/typings.ts +4 -0
  51. package/vite.config.js +0 -1
  52. package/dist/ContainerResizeObserver.d.ts +0 -11
  53. package/dist/index.cjs.js.map +0 -1
  54. package/dist/index.es.js.map +0 -1
  55. package/dist/index.umd.js.map +0 -1
  56. package/src/ContainerResizeObserver.ts +0 -73
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;
@@ -93,7 +95,6 @@ export declare const reconnectRefresher: ReconnectRefresher;
93
95
  export declare class WindowManager extends InvisiblePlugin<WindowMangerAttributes> implements PageController {
94
96
  static kind: string;
95
97
  static displayer: Displayer;
96
- static wrapper?: HTMLElement;
97
98
  static playground?: HTMLElement;
98
99
  static container?: HTMLElement;
99
100
  static debug: boolean;
@@ -111,7 +112,6 @@ export declare class WindowManager extends InvisiblePlugin<WindowMangerAttribute
111
112
  private _pageState?;
112
113
  private boxManager?;
113
114
  private static params?;
114
- private containerResizeObserver?;
115
115
  containerSizeRatio: number;
116
116
  constructor(context: InvisiblePluginContext);
117
117
  static mount(params: MountParams): Promise<WindowManager>;
@@ -144,6 +144,7 @@ export declare class WindowManager extends InvisiblePlugin<WindowMangerAttribute
144
144
  setMainViewSceneIndex(index: number): Promise<void>;
145
145
  nextPage(): Promise<boolean>;
146
146
  prevPage(): Promise<boolean>;
147
+ jumpPage(index: number): Promise<boolean>;
147
148
  addPage(params?: AddPageParams): Promise<void>;
148
149
  /**
149
150
  * 删除一页