@netless/window-manager 1.0.0-canary.12 → 1.0.0-canary.15

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.
@@ -2,6 +2,7 @@ import Emittery from "emittery";
2
2
  import { AppContext } from "./AppContext";
3
3
  import { AppPageStateImpl } from "./AppPageStateImpl";
4
4
  import { Val } from "value-enhancer";
5
+ import { SideEffectManager } from "side-effect-manager";
5
6
  import type { ICamera, ISize } from "../AttributesDelegate";
6
7
  import type { AppEmitterEvent, AppInitState, BaseInsertParams } from "../index";
7
8
  import type { SceneState, View, SceneDefinition, Camera } from "white-web-sdk";
@@ -29,9 +30,9 @@ export declare class AppProxy implements PageRemoveService {
29
30
  status: "normal" | "destroyed";
30
31
  private stateKey;
31
32
  _pageState: AppPageStateImpl;
32
- appResult?: NetlessApp<any>;
33
- appContext?: AppContext<any, any>;
34
- private sideEffectManager;
33
+ appResult?: NetlessApp;
34
+ appContext?: AppContext;
35
+ sideEffectManager: SideEffectManager;
35
36
  private valManager;
36
37
  private fullPath$;
37
38
  private appViewSync?;
@@ -80,9 +81,10 @@ export declare class AppProxy implements PageRemoveService {
80
81
  storeCamera: (camera: ICamera) => void;
81
82
  storeSize: (size: ISize) => void;
82
83
  updateSize: (width: number, height: number) => void;
83
- moveCamera: (camera: Camera) => void;
84
+ moveCamera: (camera: Partial<Camera>) => void;
84
85
  destroy(needCloseBox: boolean, cleanAttrs: boolean, skipUpdate: boolean, error?: Error): Promise<void>;
85
86
  private addCameraReaction;
86
87
  private addSizeReaction;
88
+ onFocus: () => void;
87
89
  close(): Promise<void>;
88
90
  }
@@ -4,6 +4,7 @@ import type { AppProxy } from "./AppProxy";
4
4
  import type { AppContext } from "./AppContext";
5
5
  import type { Camera, View } from "white-web-sdk";
6
6
  import type { TeleBoxRect } from "@netless/telebox-insider";
7
+ export declare type WhiteBoardViewCamera = Omit<Camera, "scale">;
7
8
  export declare class WhiteBoardView implements PageController {
8
9
  view: View;
9
10
  protected appContext: AppContext;
@@ -11,9 +12,10 @@ export declare class WhiteBoardView implements PageController {
11
12
  private removeViewWrapper;
12
13
  ensureSize: (size: number) => void;
13
14
  readonly pageState$: ReadonlyVal<PageState>;
15
+ readonly camera$: ReadonlyVal<WhiteBoardViewCamera>;
14
16
  constructor(view: View, appContext: AppContext, appProxy: AppProxy, removeViewWrapper: () => void, ensureSize: (size: number) => void);
15
17
  get pageState(): PageState;
16
- moveCamera(camera: Camera): void;
18
+ moveCamera(camera: Partial<WhiteBoardViewCamera>): void;
17
19
  nextPage: () => Promise<boolean>;
18
20
  prevPage: () => Promise<boolean>;
19
21
  jumpPage: (index: number) => Promise<boolean>;
@@ -65,9 +65,9 @@ export declare class AppManager {
65
65
  private onFocusChange;
66
66
  attributesUpdateCallback: import("lodash").DebouncedFunc<(apps: any) => Promise<void>>;
67
67
  /**
68
- * 插件更新 attributes 时的回调
68
+ * 插件更新 apps 时的回调
69
69
  *
70
- * @param {*} attributes
70
+ * @param {*} apps
71
71
  * @memberof WindowManager
72
72
  */
73
73
  _attributesUpdateCallback(apps: any): Promise<void>;