@netless/window-manager 1.0.0-canary.22 → 1.0.0-canary.25
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/AppContext.d.ts +1 -1
- package/dist/BoxManager.d.ts +3 -0
- package/dist/Cursor/index.d.ts +3 -2
- package/dist/Helper.d.ts +2 -0
- package/dist/View/CameraSynchronizer.d.ts +1 -1
- package/dist/index.cjs.js +12 -12
- package/dist/index.es.js +75 -48
- package/dist/index.umd.js +12 -12
- package/dist/style.css +1 -1
- package/docs/app-context.md +154 -26
- package/package.json +2 -2
- package/pnpm-lock.yaml +2 -9
- package/src/App/AppContext.ts +13 -5
- package/src/BoxManager.ts +12 -0
- package/src/Cursor/Cursor.ts +6 -2
- package/src/Cursor/index.ts +5 -5
- package/src/Helper.ts +20 -3
- package/src/View/CameraSynchronizer.ts +17 -26
- package/src/index.ts +8 -12
- package/src/style.css +2 -6
package/dist/App/AppContext.d.ts
CHANGED
@@ -50,7 +50,7 @@ export declare class AppContext<TAttributes = any, TMagixEventPayloads = any, TA
|
|
50
50
|
get box(): ReadonlyTeleBox;
|
51
51
|
get room(): Room | undefined;
|
52
52
|
get members(): Member[];
|
53
|
-
get
|
53
|
+
get currentMember(): Member;
|
54
54
|
/** @deprecated Use context.storage.setState instead. */
|
55
55
|
setAttributes: (attributes: TAttributes) => void;
|
56
56
|
/** @deprecated Use context.storage.setState instead. */
|
package/dist/BoxManager.d.ts
CHANGED
@@ -11,6 +11,7 @@ import type { View } from "white-web-sdk";
|
|
11
11
|
import type { CallbacksType } from "./callback";
|
12
12
|
import type { EmitterType } from "./InternalEmitter";
|
13
13
|
import type { AppState } from "./App/type";
|
14
|
+
import { Val } from "value-enhancer";
|
14
15
|
export { TELE_BOX_STATE };
|
15
16
|
export declare type CreateBoxParams = {
|
16
17
|
appId: string;
|
@@ -63,7 +64,9 @@ export declare class BoxManager {
|
|
63
64
|
private context;
|
64
65
|
teleBoxManager: TeleBoxManager;
|
65
66
|
protected sideEffectManager: SideEffectManager;
|
67
|
+
mainViewElement$: Val<HTMLElement | undefined, any>;
|
66
68
|
constructor(context: BoxManagerContext, createTeleBoxManagerConfig?: CreateTeleBoxManagerConfig);
|
69
|
+
private updateStyle;
|
67
70
|
private get canOperate();
|
68
71
|
get boxState(): "normal" | "minimized" | "maximized";
|
69
72
|
get maximized(): boolean;
|
package/dist/Cursor/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Cursor } from "./Cursor";
|
2
|
-
import type { ApplianceIcons } from "../index";
|
2
|
+
import type { ApplianceIcons, TeleBoxRect } from "../index";
|
3
3
|
import type { PositionType } from "../AttributesDelegate";
|
4
4
|
import type { RoomMember, View } from "white-web-sdk";
|
5
5
|
import type { AppManager } from "../AppManager";
|
@@ -15,7 +15,8 @@ export declare type MoveCursorParams = {
|
|
15
15
|
export declare class CursorManager {
|
16
16
|
private manager;
|
17
17
|
private enableCursor;
|
18
|
-
wrapperRect?:
|
18
|
+
wrapperRect?: TeleBoxRect;
|
19
|
+
playgroundRect?: DOMRect;
|
19
20
|
cursorInstances: Map<string, Cursor>;
|
20
21
|
roomMembers?: readonly RoomMember[];
|
21
22
|
private mainViewElement?;
|
package/dist/Helper.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { WindowManager } from "./index";
|
1
2
|
import type { Room, RoomMember } from "white-web-sdk";
|
2
3
|
export declare const setupWrapper: (root: HTMLElement) => {
|
3
4
|
playground: HTMLDivElement;
|
@@ -15,3 +16,4 @@ export declare const serializeRoomMembers: (members: readonly RoomMember[]) => {
|
|
15
16
|
payload?: import("white-web-sdk").UserPayload | undefined;
|
16
17
|
uid: string;
|
17
18
|
}[];
|
19
|
+
export declare const createInvisiblePlugin: (room: Room) => Promise<WindowManager | undefined>;
|
@@ -9,7 +9,7 @@ export declare class CameraSynchronizer {
|
|
9
9
|
protected rect?: TeleBoxRect;
|
10
10
|
protected view?: View;
|
11
11
|
constructor(saveCamera: SaveCamera);
|
12
|
-
setRect:
|
12
|
+
setRect: (rect: TeleBoxRect) => void;
|
13
13
|
setView(view: View): void;
|
14
14
|
onRemoteUpdate: import("lodash").DebouncedFunc<(camera: ICamera, size: ISize) => void>;
|
15
15
|
onRemoteSizeUpdate(size: ISize): void;
|