@netless/window-manager 1.0.0-canary.16 → 1.0.0-canary.19

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.
@@ -28,7 +28,7 @@ export declare class AppContext<TAttributes = any, TMagixEventPayloads = any, TA
28
28
  private store;
29
29
  readonly isAddApp: boolean;
30
30
  readonly isReplay: boolean;
31
- private whiteBoardView?;
31
+ whiteBoardView?: WhiteBoardView;
32
32
  _viewWrapper?: HTMLElement;
33
33
  constructor(manager: AppManager, appId: string, appProxy: AppProxy, appOptions?: TAppOptions | (() => TAppOptions) | undefined);
34
34
  get displayer(): import("white-web-sdk").Displayer<import("white-web-sdk").DisplayerCallbacks>;
@@ -5,7 +5,7 @@ import { Val } from "value-enhancer";
5
5
  import { SideEffectManager } from "side-effect-manager";
6
6
  import type { ICamera, ISize } from "../AttributesDelegate";
7
7
  import type { AppEmitterEvent, AppInitState, BaseInsertParams } from "../index";
8
- import type { SceneState, View, SceneDefinition, Camera } from "white-web-sdk";
8
+ import type { SceneState, View, SceneDefinition } from "white-web-sdk";
9
9
  import type { AppManager } from "../AppManager";
10
10
  import type { NetlessApp } from "../typings";
11
11
  import type { ReadonlyTeleBox } from "@netless/telebox-insider";
@@ -36,7 +36,12 @@ export declare class AppProxy implements PageRemoveService {
36
36
  private valManager;
37
37
  private fullPath$;
38
38
  private viewSync?;
39
- camera$: Val<ICamera | undefined, any>;
39
+ camera$: Val<{
40
+ id: string;
41
+ centerX: number | null;
42
+ centerY: number | null;
43
+ scale: number;
44
+ } | undefined, any>;
40
45
  size$: Val<ISize | undefined, any>;
41
46
  box$: Val<ReadonlyTeleBox | undefined, any>;
42
47
  view$: Val<View | undefined, any>;
@@ -81,7 +86,7 @@ export declare class AppProxy implements PageRemoveService {
81
86
  storeCamera: (camera: ICamera) => void;
82
87
  storeSize: (size: ISize) => void;
83
88
  updateSize: (width: number, height: number) => void;
84
- moveCamera: (camera: Partial<Camera>) => void;
89
+ moveCamera: (camera: Partial<ICamera>) => void;
85
90
  destroy(needCloseBox: boolean, cleanAttrs: boolean, skipUpdate: boolean, error?: Error): Promise<void>;
86
91
  private addCameraReaction;
87
92
  private addSizeReaction;
@@ -2,9 +2,10 @@ import type { ReadonlyVal } from "value-enhancer";
2
2
  import type { AddPageParams, PageController, PageState } from "../Page";
3
3
  import type { AppProxy } from "./AppProxy";
4
4
  import type { AppContext } from "./AppContext";
5
- import type { Camera, View } from "white-web-sdk";
5
+ import type { View } from "white-web-sdk";
6
6
  import type { TeleBoxRect } from "@netless/telebox-insider";
7
- export declare type WhiteBoardViewCamera = Omit<Camera, "scale">;
7
+ import type { ICamera } from "../AttributesDelegate";
8
+ export declare type WhiteBoardViewCamera = Omit<ICamera, "scale" | "id">;
8
9
  export declare class WhiteBoardView implements PageController {
9
10
  view: View;
10
11
  protected appContext: AppContext;
@@ -1,6 +1,6 @@
1
1
  import { AppAttributes } from "./constants";
2
2
  import type { AddAppParams, AppSyncAttributes } from "./index";
3
- import type { Camera, Size, View } from "white-web-sdk";
3
+ import type { Size, View } from "white-web-sdk";
4
4
  import type { Cursor } from "./Cursor/Cursor";
5
5
  export declare enum Fields {
6
6
  Apps = "apps",
@@ -33,8 +33,11 @@ export declare type StoreContext = {
33
33
  safeUpdateAttributes: (keys: string[], value: any) => void;
34
34
  safeSetAttributes: (attributes: any) => void;
35
35
  };
36
- export declare type ICamera = Camera & {
36
+ export declare type ICamera = {
37
37
  id: string;
38
+ centerX: number | null;
39
+ centerY: number | null;
40
+ scale: number;
38
41
  };
39
42
  export declare type ISize = Size & {
40
43
  id: string;
@@ -1,17 +1,17 @@
1
1
  import type { TeleBoxRect } from "@netless/telebox-insider";
2
- import type { Camera, View } from "white-web-sdk";
3
- import type { ISize } from "../AttributesDelegate";
4
- export declare type SaveCamera = (camera: Camera) => void;
2
+ import type { View } from "white-web-sdk";
3
+ import type { ICamera, ISize } from "../AttributesDelegate";
4
+ export declare type SaveCamera = (camera: ICamera) => void;
5
5
  export declare class CameraSynchronizer {
6
6
  protected saveCamera: SaveCamera;
7
- remoteCamera?: Camera;
7
+ remoteCamera?: ICamera;
8
8
  remoteSize?: ISize;
9
9
  protected rect?: TeleBoxRect;
10
10
  protected view?: View;
11
11
  constructor(saveCamera: SaveCamera);
12
12
  setRect: import("lodash").DebouncedFunc<(rect: TeleBoxRect) => void>;
13
13
  setView(view: View): void;
14
- onRemoteUpdate: import("lodash").DebouncedFunc<(camera: Camera, size: ISize) => void>;
14
+ onRemoteUpdate: import("lodash").DebouncedFunc<(camera: ICamera, size: ISize) => void>;
15
15
  onRemoteSizeUpdate(size: ISize): void;
16
- onLocalCameraUpdate(camera: Camera): void;
16
+ onLocalCameraUpdate(camera: ICamera): void;
17
17
  }
@@ -10,7 +10,12 @@ export declare class MainViewProxy {
10
10
  private mainView;
11
11
  private store;
12
12
  private sideEffectManager;
13
- camera$: Val<ICamera | undefined, any>;
13
+ camera$: Val<{
14
+ id: string;
15
+ centerX: number | null;
16
+ centerY: number | null;
17
+ scale: number;
18
+ } | undefined, any>;
14
19
  size$: Val<ISize | undefined, any>;
15
20
  view$: Val<View | undefined, any>;
16
21
  viewSync?: ViewSync;