@netless/window-manager 1.0.0-canary.19 → 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.
- package/dist/App/AppProxy.d.ts +3 -2
- package/dist/App/index.d.ts +1 -0
- package/dist/App/type.d.ts +21 -0
- package/dist/BoxManager.d.ts +4 -3
- package/dist/Cursor/index.d.ts +0 -1
- package/dist/InternalEmitter.d.ts +1 -2
- package/dist/constants.d.ts +6 -2
- package/dist/index.cjs.js +12 -12
- package/dist/index.d.ts +5 -0
- package/dist/index.es.js +119 -54
- package/dist/index.umd.js +12 -12
- package/package.json +1 -1
- package/src/App/AppProxy.ts +81 -19
- package/src/App/index.ts +1 -0
- package/src/App/type.ts +22 -0
- package/src/AppManager.ts +5 -1
- package/src/BoxManager.ts +8 -7
- package/src/Cursor/index.ts +0 -2
- package/src/InternalEmitter.ts +1 -2
- package/src/Utils/Reactive.ts +27 -26
- package/src/View/ViewSync.ts +7 -13
- package/src/constants.ts +5 -1
- package/src/index.ts +5 -0
package/dist/App/AppProxy.d.ts
CHANGED
@@ -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,
|
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) =>
|
73
|
+
getAppInitState: (id: string) => AppState | undefined;
|
73
74
|
emitAppSceneStateChange(sceneState: SceneState): void;
|
74
75
|
emitAppIsWritableChange(): void;
|
75
76
|
private makeAppEventListener;
|
package/dist/App/index.d.ts
CHANGED
@@ -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
|
+
};
|
package/dist/BoxManager.d.ts
CHANGED
@@ -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
|
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 {
|
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?:
|
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;
|
package/dist/Cursor/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import Emittery from "emittery";
|
2
2
|
import type { TeleBoxRect } from "@netless/telebox-insider";
|
3
|
-
import type {
|
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;
|
package/dist/constants.d.ts
CHANGED
@@ -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",
|
@@ -24,7 +23,12 @@ export declare enum AppAttributes {
|
|
24
23
|
Size = "size",
|
25
24
|
Position = "position",
|
26
25
|
SceneIndex = "SceneIndex",
|
27
|
-
ZIndex = "zIndex"
|
26
|
+
ZIndex = "zIndex",
|
27
|
+
Visible = "visible",
|
28
|
+
Ratio = "ratio",
|
29
|
+
StageRatio = "stageRatio",
|
30
|
+
Draggable = "draggable",
|
31
|
+
Resizable = "resizable"
|
28
32
|
}
|
29
33
|
export declare enum AppEvents {
|
30
34
|
setBoxSize = "setBoxSize",
|