@netless/window-manager 0.3.23 → 0.3.26
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/.idea/inspectionProfiles/Project_Default.xml +7 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/.idea/window-manager.iml +12 -0
- package/dist/AppListener.d.ts +1 -0
- package/dist/AppManager.d.ts +2 -0
- package/dist/AppProxy.d.ts +3 -2
- package/dist/AttributesDelegate.d.ts +0 -4
- package/dist/Cursor/Cursor.d.ts +8 -12
- package/dist/Cursor/index.d.ts +5 -14
- package/dist/MainView.d.ts +3 -2
- package/dist/ViewManager.d.ts +3 -2
- package/dist/constants.d.ts +2 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.es.js +41 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +41 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +5 -4
- package/src/AppContext.ts +1 -1
- package/src/AppListener.ts +9 -1
- package/src/AppManager.ts +16 -4
- package/src/AppProxy.ts +9 -7
- package/src/AttributesDelegate.ts +0 -28
- package/src/BoxManager.ts +4 -9
- package/src/Cursor/Cursor.ts +34 -59
- package/src/Cursor/index.ts +53 -130
- package/src/MainView.ts +11 -12
- package/src/constants.ts +1 -0
- package/src/index.ts +68 -59
- package/src/style.css +1 -1
- package/src/viewManager.ts +4 -5
- package/vite.config.js +4 -2
- package/dist/Base/Context.d.ts +0 -13
- package/dist/Base/index.d.ts +0 -8
- package/src/Base/Context.ts +0 -49
- package/src/Base/index.ts +0 -10
@@ -0,0 +1,7 @@
|
|
1
|
+
<component name="InspectionProjectProfileManager">
|
2
|
+
<profile version="1.0">
|
3
|
+
<option name="myName" value="Project Default" />
|
4
|
+
<inspection_tool class="ES6UnusedImports" enabled="false" level="WARNING" enabled_by_default="false" />
|
5
|
+
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
6
|
+
</profile>
|
7
|
+
</component>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ProjectModuleManager">
|
4
|
+
<modules>
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/window-manager.iml" filepath="$PROJECT_DIR$/.idea/window-manager.iml" />
|
6
|
+
</modules>
|
7
|
+
</component>
|
8
|
+
</project>
|
package/.idea/vcs.xml
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="WEB_MODULE" version="4">
|
3
|
+
<component name="NewModuleRootManager">
|
4
|
+
<content url="file://$MODULE_DIR$">
|
5
|
+
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
7
|
+
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
8
|
+
</content>
|
9
|
+
<orderEntry type="inheritedJdk" />
|
10
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
11
|
+
</component>
|
12
|
+
</module>
|
package/dist/AppListener.d.ts
CHANGED
package/dist/AppManager.d.ts
CHANGED
@@ -46,6 +46,8 @@ export declare class AppManager {
|
|
46
46
|
get room(): Room | undefined;
|
47
47
|
get mainView(): import("white-web-sdk").View;
|
48
48
|
get focusApp(): AppProxy | undefined;
|
49
|
+
get uid(): string;
|
50
|
+
findMemberByUid: (uid: string) => import("white-web-sdk").RoomMember | undefined;
|
49
51
|
safeSetAttributes(attributes: any): void;
|
50
52
|
safeUpdateAttributes(keys: string[], value: any): void;
|
51
53
|
setMainViewScenePath(scenePath: string): Promise<void>;
|
package/dist/AppProxy.d.ts
CHANGED
@@ -4,9 +4,9 @@ import type { SceneState, View, SceneDefinition } from "white-web-sdk";
|
|
4
4
|
import type { AppManager } from "./AppManager";
|
5
5
|
import type { NetlessApp } from "./typings";
|
6
6
|
import type { ReadonlyTeleBox } from "@netless/telebox-insider";
|
7
|
-
|
8
|
-
export declare class AppProxy extends Base {
|
7
|
+
export declare class AppProxy {
|
9
8
|
private params;
|
9
|
+
private manager;
|
10
10
|
id: string;
|
11
11
|
scenePath?: string;
|
12
12
|
appEmitter: Emittery<AppEmitterEvent>;
|
@@ -16,6 +16,7 @@ export declare class AppProxy extends Base {
|
|
16
16
|
private appProxies;
|
17
17
|
private viewManager;
|
18
18
|
private cameraStore;
|
19
|
+
private store;
|
19
20
|
private kind;
|
20
21
|
isAddApp: boolean;
|
21
22
|
private status;
|
@@ -54,10 +54,6 @@ export declare class AttributesDelegate {
|
|
54
54
|
id: string;
|
55
55
|
} | undefined): void;
|
56
56
|
setAppFocus(appId: string, focus: boolean): void;
|
57
|
-
updateCursor(uid: string, position: Position): void;
|
58
|
-
updateCursorState(uid: string, cursorState: string | undefined): void;
|
59
|
-
getCursorState(uid: string): any;
|
60
|
-
cleanCursor(uid: string): void;
|
61
57
|
setMainViewFocusPath(): void;
|
62
58
|
}
|
63
59
|
export declare type MainViewSize = {
|
package/dist/Cursor/Cursor.d.ts
CHANGED
@@ -1,23 +1,21 @@
|
|
1
|
-
import { ApplianceNames } from
|
2
|
-
import {
|
3
|
-
import type { Position } from '../AttributesDelegate';
|
1
|
+
import { ApplianceNames } from "white-web-sdk";
|
2
|
+
import type { Position } from "../AttributesDelegate";
|
4
3
|
import type { CursorManager } from "./index";
|
5
|
-
import {
|
6
|
-
import type { AppManager } from '../AppManager';
|
4
|
+
import type { AppManager } from "../AppManager";
|
7
5
|
export declare type Payload = {
|
8
6
|
[key: string]: any;
|
9
7
|
};
|
10
|
-
export declare class Cursor
|
11
|
-
private
|
8
|
+
export declare class Cursor {
|
9
|
+
private manager;
|
12
10
|
private memberId;
|
13
11
|
private cursorManager;
|
14
12
|
private wrapper?;
|
15
13
|
private member?;
|
16
|
-
private disposer;
|
17
14
|
private timer?;
|
18
15
|
private component?;
|
19
|
-
constructor(manager: AppManager,
|
20
|
-
|
16
|
+
constructor(manager: AppManager, memberId: string, cursorManager: CursorManager, wrapper?: HTMLElement | undefined);
|
17
|
+
move: (position: Position) => void;
|
18
|
+
leave: () => void;
|
21
19
|
private moveCursor;
|
22
20
|
get memberApplianceName(): ApplianceNames | undefined;
|
23
21
|
get memberColor(): string;
|
@@ -28,8 +26,6 @@ export declare class Cursor extends Base {
|
|
28
26
|
private get memberCursorTagBackgroundColor();
|
29
27
|
private get memberAvatar();
|
30
28
|
private get memberOpacity();
|
31
|
-
get cursorState(): CursorState | undefined;
|
32
|
-
get cursorPosition(): Position | undefined;
|
33
29
|
private autoHidden;
|
34
30
|
private createCursor;
|
35
31
|
private initProps;
|
package/dist/Cursor/index.d.ts
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
import { Cursor } from './Cursor';
|
1
|
+
import { Cursor } from "./Cursor";
|
3
2
|
import type { PositionType } from "../AttributesDelegate";
|
4
3
|
import type { RoomMember, View } from "white-web-sdk";
|
5
4
|
import type { AppManager } from "../AppManager";
|
@@ -12,36 +11,28 @@ export declare type MoveCursorParams = {
|
|
12
11
|
x: number;
|
13
12
|
y: number;
|
14
13
|
};
|
15
|
-
export declare class CursorManager
|
16
|
-
private
|
14
|
+
export declare class CursorManager {
|
15
|
+
private manager;
|
17
16
|
containerRect?: DOMRect;
|
18
17
|
wrapperRect?: DOMRect;
|
19
18
|
cursorInstances: Map<string, Cursor>;
|
20
19
|
roomMembers?: readonly RoomMember[];
|
21
20
|
private mainViewElement?;
|
22
|
-
|
21
|
+
private store;
|
22
|
+
constructor(manager: AppManager);
|
23
23
|
setMainViewDivElement(div: HTMLDivElement): void;
|
24
|
-
private startReaction;
|
25
|
-
private getUids;
|
26
|
-
private handleRoomMembersChange;
|
27
|
-
get cursors(): any;
|
28
24
|
get boxState(): import("@netless/telebox-insider").TELE_BOX_STATE;
|
29
25
|
get focusView(): View | undefined;
|
30
26
|
private mouseMoveListener;
|
31
|
-
private touchMoveListener;
|
32
27
|
private updateCursor;
|
33
28
|
private getPoint;
|
34
29
|
/**
|
35
30
|
* 因为窗口内框在不同分辨率下的大小不一样,所以这里通过来鼠标事件的 target 来判断是在主白板还是在 APP 中
|
36
31
|
*/
|
37
32
|
private getType;
|
38
|
-
private initCursorAttributes;
|
39
|
-
private setNormalCursorState;
|
40
33
|
private mouseLeaveListener;
|
41
34
|
updateContainerRect(): void;
|
42
|
-
setRoomMembers(members: readonly RoomMember[]): void;
|
43
35
|
deleteCursor(uid: string): void;
|
44
36
|
hideCursor(uid: string): void;
|
45
|
-
cleanMemberAttributes(members: readonly RoomMember[]): void;
|
46
37
|
destroy(): void;
|
47
38
|
}
|
package/dist/MainView.d.ts
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
import { Base } from "./Base";
|
2
1
|
import type { Camera, Size, View } from "white-web-sdk";
|
3
2
|
import type { AppManager } from "./AppManager";
|
4
|
-
export declare class MainViewProxy
|
3
|
+
export declare class MainViewProxy {
|
4
|
+
private manager;
|
5
5
|
private scale?;
|
6
6
|
private cameraStore;
|
7
|
+
private store;
|
7
8
|
private started;
|
8
9
|
private mainViewIsAddListener;
|
9
10
|
private mainView;
|
package/dist/ViewManager.d.ts
CHANGED
@@ -1,12 +1,13 @@
|
|
1
|
-
import { Base } from "./Base";
|
2
1
|
import type { View, Displayer } from "white-web-sdk";
|
3
2
|
import type { AppManager } from "./AppManager";
|
4
|
-
export declare class ViewManager
|
3
|
+
export declare class ViewManager {
|
4
|
+
private manager;
|
5
5
|
private views;
|
6
6
|
private timer?;
|
7
7
|
private appTimer?;
|
8
8
|
private mainViewProxy;
|
9
9
|
private displayer;
|
10
|
+
private store;
|
10
11
|
constructor(manager: AppManager);
|
11
12
|
get currentScenePath(): string;
|
12
13
|
get mainView(): View;
|
package/dist/constants.d.ts
CHANGED
@@ -9,7 +9,8 @@ export declare enum Events {
|
|
9
9
|
WindowCreated = "WindowCreated",
|
10
10
|
SetMainViewScenePath = "SetMainViewScenePath",
|
11
11
|
SetMainViewSceneIndex = "SetMainViewSceneIndex",
|
12
|
-
SwitchViewsToFreedom = "SwitchViewsToFreedom"
|
12
|
+
SwitchViewsToFreedom = "SwitchViewsToFreedom",
|
13
|
+
CursorMove = "CursorMove"
|
13
14
|
}
|
14
15
|
export declare const MagixEventName = "__WindowManger";
|
15
16
|
export declare enum AppAttributes {
|
package/dist/index.d.ts
CHANGED
@@ -4,7 +4,7 @@ import { CursorManager } from "./Cursor";
|
|
4
4
|
import "./style.css";
|
5
5
|
import "@netless/telebox-insider/dist/style.css";
|
6
6
|
import type { TELE_BOX_STATE } from "./BoxManager";
|
7
|
-
import type { Apps } from "./AttributesDelegate";
|
7
|
+
import type { Apps, Position } from "./AttributesDelegate";
|
8
8
|
import { InvisiblePlugin, ViewMode } from "white-web-sdk";
|
9
9
|
import type { Displayer, SceneDefinition, View, Room, InvisiblePluginContext, Camera, AnimationMode, CameraBound, Point, Rectangle, ViewVisionMode, CameraState } from "white-web-sdk";
|
10
10
|
import type { AppListeners } from "./AppListener";
|
@@ -63,6 +63,11 @@ export declare type AppInitState = {
|
|
63
63
|
boxState?: TeleBoxState;
|
64
64
|
zIndex?: number;
|
65
65
|
};
|
66
|
+
export declare type CursorMovePayload = {
|
67
|
+
uid: string;
|
68
|
+
state?: "leave";
|
69
|
+
position: Position;
|
70
|
+
};
|
66
71
|
export declare type EmitterEvent = {
|
67
72
|
onCreated: undefined;
|
68
73
|
InitReplay: AppInitState;
|
@@ -90,6 +95,9 @@ export declare type EmitterEvent = {
|
|
90
95
|
observerIdChange: number;
|
91
96
|
boxStateChange: string;
|
92
97
|
playgroundSizeChange: DOMRect;
|
98
|
+
onReconnected: undefined;
|
99
|
+
cursorMove: CursorMovePayload;
|
100
|
+
setReadonly: boolean;
|
93
101
|
};
|
94
102
|
export declare const emitter: Emittery<EmitterEvent>;
|
95
103
|
export declare type PublicEvent = {
|