@netless/window-manager 1.0.0-canary.20 → 1.0.0-canary.21

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.
@@ -4,12 +4,13 @@ import { AppPageStateImpl } from "./AppPageStateImpl";
4
4
  import { Val } from "value-enhancer";
5
5
  import { SideEffectManager } from "side-effect-manager";
6
6
  import type { ICamera, ISize } from "../AttributesDelegate";
7
- import type { AppEmitterEvent, AppInitState, BaseInsertParams } from "../index";
7
+ import type { AppEmitterEvent, BaseInsertParams } from "../index";
8
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";
12
12
  import type { PageRemoveService, PageState } from "../Page";
13
+ import type { AppState } from "./type";
13
14
  export declare type AppEmitter = Emittery<AppEmitterEvent>;
14
15
  export declare class AppProxy implements PageRemoveService {
15
16
  private params;
@@ -69,7 +70,7 @@ export declare class AppProxy implements PageRemoveService {
69
70
  onSeek(time: number): Promise<void>;
70
71
  onReconnected(): Promise<void>;
71
72
  onRemoveScene(scenePath: string): Promise<void>;
72
- getAppInitState: (id: string) => AppInitState | undefined;
73
+ getAppInitState: (id: string) => AppState | undefined;
73
74
  emitAppSceneStateChange(sceneState: SceneState): void;
74
75
  emitAppIsWritableChange(): void;
75
76
  private makeAppEventListener;
@@ -1,3 +1,4 @@
1
1
  export * from "./AppProxy";
2
2
  export * from "./AppContext";
3
3
  export * from "./WhiteboardView";
4
+ export * from "./type";
@@ -0,0 +1,21 @@
1
+ export declare type AppState = {
2
+ id: string;
3
+ focus?: boolean;
4
+ SceneIndex?: number;
5
+ draggable?: boolean;
6
+ position?: {
7
+ x: number;
8
+ y: number;
9
+ };
10
+ ratio?: number;
11
+ resizable?: boolean;
12
+ size?: {
13
+ width: number;
14
+ height: number;
15
+ };
16
+ stageRatio?: number;
17
+ visible?: boolean;
18
+ zIndex?: number;
19
+ maximized: boolean | null;
20
+ minimized: boolean | null;
21
+ };
@@ -1,15 +1,16 @@
1
1
  import { AppAttributes } from "./constants";
2
+ import { SideEffectManager } from "side-effect-manager";
2
3
  import { TELE_BOX_STATE, TeleBoxManager } from "@netless/telebox-insider";
3
4
  import { WindowManager } from "./index";
4
5
  import type { BoxEmitterType } from "./BoxEmitter";
5
- import type { AddAppOptions, AppInitState } from "./index";
6
+ import type { AddAppOptions } from "./index";
6
7
  import type { TeleBoxManagerUpdateConfig, ReadonlyTeleBox, TeleBoxColorScheme, TeleBoxRect, TeleBoxConfig } from "@netless/telebox-insider";
7
8
  import type Emittery from "emittery";
8
9
  import type { NetlessApp } from "./typings";
9
10
  import type { View } from "white-web-sdk";
10
11
  import type { CallbacksType } from "./callback";
11
12
  import type { EmitterType } from "./InternalEmitter";
12
- import { SideEffectManager } from "side-effect-manager";
13
+ import type { AppState } from "./App/type";
13
14
  export { TELE_BOX_STATE };
14
15
  export declare type CreateBoxParams = {
15
16
  appId: string;
@@ -79,7 +80,7 @@ export declare class BoxManager {
79
80
  boxIsFocus(appId: string): boolean | undefined;
80
81
  getFocusBox(): ReadonlyTeleBox | undefined;
81
82
  getTopBox(): ReadonlyTeleBox | undefined;
82
- updateBoxState(state?: AppInitState): void;
83
+ updateBoxState(state?: AppState): void;
83
84
  moveBox({ appId, x, y }: MoveBoxParams): void;
84
85
  focusBox({ appId }: AppId, skipUpdate?: boolean): void;
85
86
  resizeBox({ appId, width, height, skipUpdate }: ResizeBoxParams): void;
@@ -15,7 +15,6 @@ export declare type MoveCursorParams = {
15
15
  export declare class CursorManager {
16
16
  private manager;
17
17
  private enableCursor;
18
- containerRect?: DOMRect;
19
18
  wrapperRect?: DOMRect;
20
19
  cursorInstances: Map<string, Cursor>;
21
20
  roomMembers?: readonly RoomMember[];
@@ -1,6 +1,6 @@
1
1
  import Emittery from "emittery";
2
2
  import type { TeleBoxRect } from "@netless/telebox-insider";
3
- import type { AppInitState, CursorMovePayload } from "./index";
3
+ import type { CursorMovePayload } from "./index";
4
4
  import type { Member } from "./Helper";
5
5
  import type { MemberState } from "white-web-sdk";
6
6
  export declare type RemoveSceneParams = {
@@ -9,7 +9,6 @@ export declare type RemoveSceneParams = {
9
9
  };
10
10
  export declare type EmitterEvent = {
11
11
  onCreated: undefined;
12
- InitReplay: AppInitState;
13
12
  error: Error;
14
13
  seekStart: undefined;
15
14
  seek: number;
@@ -1,8 +1,6 @@
1
1
  import { UpdateEventKind } from "white-web-sdk";
2
2
  import type { AkkoObjectUpdatedListener } from "white-web-sdk";
3
- import type { Val } from "value-enhancer";
4
3
  export declare const onObjectByEvent: (event: UpdateEventKind) => (object: any, func: () => void) => (() => void) | undefined;
5
4
  export declare const safeListenPropsUpdated: <T>(getProps: () => T, callback: AkkoObjectUpdatedListener<T>, onDestroyed?: ((props: unknown) => void) | undefined) => () => void;
6
5
  export declare const onObjectRemoved: (object: any, func: () => void) => (() => void) | undefined;
7
6
  export declare const onObjectInserted: (object: any, func: () => void) => (() => void) | undefined;
8
- export declare const createValSync: <T>(expr: any, Val: Val<T, boolean>, isAddApp: boolean) => (() => void);
@@ -5,7 +5,6 @@ export declare enum Events {
5
5
  AppBoxStateChange = "AppBoxStateChange",
6
6
  GetAttributes = "GetAttributes",
7
7
  UpdateWindowManagerWrapper = "UpdateWindowManagerWrapper",
8
- InitReplay = "InitReplay",
9
8
  WindowCreated = "WindowCreated",
10
9
  SetMainViewScenePath = "SetMainViewScenePath",
11
10
  SetMainViewSceneIndex = "SetMainViewSceneIndex",