@netless/window-manager 1.0.0-canary.24 → 1.0.0-canary.27

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 (83) hide show
  1. package/dist/App/AppContext.d.ts +1 -1
  2. package/dist/App/WhiteboardView.d.ts +6 -4
  3. package/dist/AppListener.d.ts +0 -2
  4. package/dist/BoxManager.d.ts +2 -1
  5. package/dist/BuiltinApps.d.ts +3 -0
  6. package/dist/Cursor/index.d.ts +3 -2
  7. package/dist/Helper.d.ts +3 -1
  8. package/dist/callback.d.ts +5 -0
  9. package/dist/constants.d.ts +0 -2
  10. package/dist/index.cjs.js +82 -12
  11. package/dist/index.d.ts +16 -9
  12. package/dist/index.es.js +1620 -704
  13. package/dist/index.umd.js +82 -12
  14. package/dist/src/App/AppContext.d.ts +78 -0
  15. package/dist/src/App/AppPageStateImpl.d.ts +21 -0
  16. package/dist/src/App/AppProxy.d.ts +98 -0
  17. package/dist/src/App/MagixEvent/index.d.ts +29 -0
  18. package/dist/src/App/Storage/StorageEvent.d.ts +8 -0
  19. package/dist/src/App/Storage/index.d.ts +39 -0
  20. package/dist/src/App/Storage/typings.d.ts +22 -0
  21. package/dist/src/App/Storage/utils.d.ts +5 -0
  22. package/dist/src/App/WhiteboardView.d.ts +27 -0
  23. package/dist/src/App/index.d.ts +4 -0
  24. package/dist/src/App/type.d.ts +21 -0
  25. package/dist/src/AppListener.d.ts +19 -0
  26. package/dist/src/AppManager.d.ts +107 -0
  27. package/dist/src/AttributesDelegate.d.ts +83 -0
  28. package/dist/src/BoxEmitter.d.ts +34 -0
  29. package/dist/src/BoxManager.d.ts +102 -0
  30. package/dist/src/BuiltinApps.d.ts +8 -0
  31. package/dist/src/Cursor/Cursor.d.ts +39 -0
  32. package/dist/src/Cursor/icons.d.ts +3 -0
  33. package/dist/src/Cursor/index.d.ts +46 -0
  34. package/dist/src/Helper.d.ts +19 -0
  35. package/dist/src/InternalEmitter.d.ts +38 -0
  36. package/dist/src/Page/PageController.d.ts +21 -0
  37. package/dist/src/Page/index.d.ts +3 -0
  38. package/dist/src/PageState.d.ts +9 -0
  39. package/dist/src/ReconnectRefresher.d.ts +24 -0
  40. package/dist/src/RedoUndo.d.ts +18 -0
  41. package/dist/src/Register/index.d.ts +28 -0
  42. package/dist/src/Register/loader.d.ts +4 -0
  43. package/dist/src/Register/storage.d.ts +8 -0
  44. package/dist/src/Utils/AppCreateQueue.d.ts +15 -0
  45. package/dist/src/Utils/Common.d.ts +23 -0
  46. package/dist/src/Utils/Reactive.d.ts +6 -0
  47. package/dist/src/Utils/RoomHacker.d.ts +3 -0
  48. package/dist/src/Utils/error.d.ts +27 -0
  49. package/dist/src/Utils/log.d.ts +1 -0
  50. package/dist/src/View/CameraSynchronizer.d.ts +17 -0
  51. package/dist/src/View/MainView.d.ts +59 -0
  52. package/dist/src/View/ViewManager.d.ts +13 -0
  53. package/dist/src/View/ViewSync.d.ts +24 -0
  54. package/dist/src/callback.d.ts +29 -0
  55. package/dist/src/constants.d.ts +51 -0
  56. package/dist/src/image.d.ts +19 -0
  57. package/dist/src/index.d.ts +267 -0
  58. package/dist/src/shim.d.ts +11 -0
  59. package/dist/src/typings.d.ts +88 -0
  60. package/dist/style.css +1 -1
  61. package/dist/typings.d.ts +6 -0
  62. package/docs/app-context.md +68 -26
  63. package/package.json +10 -5
  64. package/playwright.config.ts +28 -0
  65. package/pnpm-lock.yaml +516 -30
  66. package/src/App/AppContext.ts +14 -6
  67. package/src/App/AppProxy.ts +17 -7
  68. package/src/App/WhiteboardView.ts +23 -18
  69. package/src/AppListener.ts +1 -21
  70. package/src/AppManager.ts +2 -1
  71. package/src/BoxManager.ts +32 -24
  72. package/src/BuiltinApps.ts +5 -0
  73. package/src/Cursor/Cursor.ts +6 -2
  74. package/src/Cursor/index.ts +5 -5
  75. package/src/Helper.ts +23 -5
  76. package/src/View/CameraSynchronizer.ts +5 -9
  77. package/src/View/MainView.ts +3 -1
  78. package/src/callback.ts +1 -0
  79. package/src/constants.ts +0 -2
  80. package/src/index.ts +69 -45
  81. package/src/style.css +2 -45
  82. package/src/typings.ts +6 -0
  83. package/vite.config.js +5 -3
package/dist/index.d.ts CHANGED
@@ -5,9 +5,10 @@ import { ReconnectRefresher } from "./ReconnectRefresher";
5
5
  import "video.js/dist/video-js.css";
6
6
  import "./style.css";
7
7
  import "@netless/telebox-insider/dist/style.css";
8
+ import { Val } from "value-enhancer";
8
9
  import type { TELE_BOX_STATE } from "./BoxManager";
9
10
  import type { Apps, Position, ICamera, ISize } from "./AttributesDelegate";
10
- import type { Displayer, SceneDefinition, View, Room, InvisiblePluginContext, Camera, AnimationMode, CameraBound, Point, Rectangle, CameraState, Player, ImageInformation, SceneState } from "white-web-sdk";
11
+ import type { Displayer, SceneDefinition, View, Room, InvisiblePluginContext, Camera, CameraBound, Point, CameraState, Player, ImageInformation, SceneState, Rectangle } from "white-web-sdk";
11
12
  import type { AppListeners } from "./AppListener";
12
13
  import type { ApplianceIcons, NetlessApp, RegisterParams } from "./typings";
13
14
  import type { TeleBoxColorScheme, TeleBoxState } from "@netless/telebox-insider";
@@ -15,7 +16,6 @@ import type { AppProxy } from "./App";
15
16
  import type { PublicEvent } from "./callback";
16
17
  import type Emittery from "emittery";
17
18
  import type { PageController, AddPageParams, PageState } from "./Page";
18
- import { Val } from "value-enhancer";
19
19
  export declare type WindowMangerAttributes = {
20
20
  modelValue?: string;
21
21
  boxState: TELE_BOX_STATE;
@@ -93,6 +93,8 @@ export declare type MountParams = {
93
93
  collectorContainer?: HTMLElement;
94
94
  collectorStyles?: Partial<CSSStyleDeclaration>;
95
95
  overwriteStyles?: string;
96
+ containerStyle?: string;
97
+ stageStyle?: string;
96
98
  cursor?: boolean;
97
99
  debug?: boolean;
98
100
  disableCameraTransform?: boolean;
@@ -190,6 +192,13 @@ export declare class WindowManager extends InvisiblePlugin<WindowMangerAttribute
190
192
  setMinimized(minimized: boolean): void;
191
193
  get mainView(): View;
192
194
  get camera(): Camera;
195
+ get baseCamera$(): Val<{
196
+ id: string;
197
+ centerX: number | null;
198
+ centerY: number | null;
199
+ scale: number;
200
+ } | undefined, any>;
201
+ get baseSize$(): Val<ISize | undefined, any>;
193
202
  get cameraState(): CameraState;
194
203
  get apps(): Apps | undefined;
195
204
  get boxState(): TeleBoxState | undefined;
@@ -217,12 +226,8 @@ export declare class WindowManager extends InvisiblePlugin<WindowMangerAttribute
217
226
  * 关闭 APP
218
227
  */
219
228
  closeApp(appId: string): Promise<void>;
220
- moveCamera(camera: Partial<Camera> & {
221
- animationMode?: AnimationMode | undefined;
222
- }): void;
223
- moveCameraToContain(rectangle: Rectangle & Readonly<{
224
- animationMode?: AnimationMode;
225
- }>): void;
229
+ moveCamera(camera: Partial<Camera>): void;
230
+ moveCameraToContain(rectangle: Rectangle): void;
226
231
  convertToPointInWorld(point: Point): Point;
227
232
  setCameraBound(cameraBound: CameraBound): void;
228
233
  onDestroy(): void;
@@ -250,6 +255,8 @@ export declare class WindowManager extends InvisiblePlugin<WindowMangerAttribute
250
255
  /** @inner */
251
256
  _refresh(): void;
252
257
  setContainerSizeRatio(ratio: number): void;
258
+ setContainerStyle(style: string): void;
259
+ setStageStyle(style: string): void;
253
260
  createPPTHandler(): {
254
261
  onPageJumpTo: (_pptUUID: string, index: number) => void;
255
262
  onPageToNext: () => void;
@@ -259,5 +266,5 @@ export declare class WindowManager extends InvisiblePlugin<WindowMangerAttribute
259
266
  private ensureAttributes;
260
267
  }
261
268
  export * from "./typings";
262
- export { BuiltinApps } from "./BuiltinApps";
269
+ export { BuiltinApps, BuiltinAppsMap } from "./BuiltinApps";
263
270
  export type { PublicEvent } from "./callback";