@netless/window-manager 0.4.73-beta.0 → 0.4.73
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/index.d.ts +1093 -40
- package/dist/index.js +15 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +266 -164
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -13
- package/src/App/AppContext.ts +13 -8
- package/src/App/AppProxy.ts +3 -8
- package/src/App/MagixEvent/index.ts +38 -38
- package/src/App/Storage/StorageEvent.ts +13 -13
- package/src/App/Storage/index.ts +265 -242
- package/src/App/Storage/typings.ts +4 -2
- package/src/App/Storage/utils.ts +3 -3
- package/src/AppListener.ts +5 -5
- package/src/AppManager.ts +6 -19
- package/src/AttributesDelegate.ts +5 -7
- package/src/BoxEmitter.ts +12 -6
- package/src/BoxManager.ts +1 -1
- package/src/ContainerResizeObserver.ts +1 -1
- package/src/Cursor/Cursor.svelte +3 -1
- package/src/Cursor/Cursor.ts +1 -0
- package/src/Cursor/index.ts +1 -1
- package/src/Helper.ts +67 -15
- package/src/InternalEmitter.ts +4 -3
- package/src/Page/index.ts +1 -1
- package/src/Register/index.ts +5 -7
- package/src/Register/loader.ts +1 -1
- package/src/Register/storage.ts +13 -13
- package/src/Utils/Common.ts +10 -5
- package/src/Utils/Reactive.ts +26 -25
- package/src/Utils/RoomHacker.ts +1 -1
- package/src/Utils/error.ts +0 -1
- package/src/View/IframeBridge.ts +627 -583
- package/src/View/MainView.ts +8 -6
- package/src/callback.ts +7 -1
- package/src/index.ts +34 -24
- package/src/typings.ts +11 -6
- package/dist/App/AppContext.d.ts +0 -79
- package/dist/App/AppPageStateImpl.d.ts +0 -17
- package/dist/App/AppProxy.d.ts +0 -67
- package/dist/App/MagixEvent/index.d.ts +0 -29
- package/dist/App/Storage/StorageEvent.d.ts +0 -8
- package/dist/App/Storage/index.d.ts +0 -39
- package/dist/App/Storage/typings.d.ts +0 -22
- package/dist/App/Storage/utils.d.ts +0 -5
- package/dist/App/index.d.ts +0 -2
- package/dist/AppListener.d.ts +0 -21
- package/dist/AppManager.d.ts +0 -110
- package/dist/AttributesDelegate.d.ts +0 -91
- package/dist/BoxEmitter.d.ts +0 -34
- package/dist/BoxManager.d.ts +0 -98
- package/dist/BuiltinApps.d.ts +0 -5
- package/dist/ContainerResizeObserver.d.ts +0 -11
- package/dist/Cursor/Cursor.d.ts +0 -43
- package/dist/Cursor/icons.d.ts +0 -3
- package/dist/Cursor/icons2.d.ts +0 -4
- package/dist/Cursor/index.d.ts +0 -55
- package/dist/Helper.d.ts +0 -11
- package/dist/InternalEmitter.d.ts +0 -34
- package/dist/Page/PageController.d.ts +0 -21
- package/dist/Page/index.d.ts +0 -3
- package/dist/PageState.d.ts +0 -9
- package/dist/ReconnectRefresher.d.ts +0 -24
- package/dist/RedoUndo.d.ts +0 -18
- package/dist/Register/index.d.ts +0 -28
- package/dist/Register/loader.d.ts +0 -4
- package/dist/Register/storage.d.ts +0 -8
- package/dist/Utils/AppCreateQueue.d.ts +0 -15
- package/dist/Utils/Common.d.ts +0 -22
- package/dist/Utils/Reactive.d.ts +0 -6
- package/dist/Utils/RoomHacker.d.ts +0 -3
- package/dist/Utils/error.d.ts +0 -27
- package/dist/Utils/log.d.ts +0 -1
- package/dist/View/IframeBridge.d.ts +0 -146
- package/dist/View/MainView.d.ts +0 -58
- package/dist/View/ViewManager.d.ts +0 -13
- package/dist/callback.d.ts +0 -38
- package/dist/constants.d.ts +0 -48
- package/dist/typings.d.ts +0 -84
@@ -1,91 +0,0 @@
|
|
1
|
-
import { AppAttributes } from "./constants";
|
2
|
-
import type { AddAppParams, AppSyncAttributes } from "./index";
|
3
|
-
import type { Camera, Size, View } from "white-web-sdk";
|
4
|
-
import type { Cursor } from "./Cursor/Cursor";
|
5
|
-
export declare enum Fields {
|
6
|
-
Apps = "apps",
|
7
|
-
Focus = "focus",
|
8
|
-
State = "state",
|
9
|
-
BoxState = "boxState",
|
10
|
-
MainViewCamera = "mainViewCamera",
|
11
|
-
MainViewSize = "mainViewSize",
|
12
|
-
Broadcaster = "broadcaster",
|
13
|
-
Cursors = "cursors",
|
14
|
-
Position = "position",
|
15
|
-
CursorState = "cursorState",
|
16
|
-
FullPath = "fullPath",
|
17
|
-
Registered = "registered",
|
18
|
-
IframeBridge = "iframeBridge"
|
19
|
-
}
|
20
|
-
export declare type Apps = {
|
21
|
-
[key: string]: AppSyncAttributes;
|
22
|
-
};
|
23
|
-
export declare type Position = {
|
24
|
-
x: number;
|
25
|
-
y: number;
|
26
|
-
type: PositionType;
|
27
|
-
id?: string;
|
28
|
-
};
|
29
|
-
export declare type PositionType = "main" | "app";
|
30
|
-
export declare type StoreContext = {
|
31
|
-
getAttributes: () => any;
|
32
|
-
safeUpdateAttributes: (keys: string[], value: any) => void;
|
33
|
-
safeSetAttributes: (attributes: any) => void;
|
34
|
-
};
|
35
|
-
export declare type ICamera = Camera & {
|
36
|
-
id: string;
|
37
|
-
};
|
38
|
-
export declare type ISize = Size & {
|
39
|
-
id: string;
|
40
|
-
};
|
41
|
-
export declare class AttributesDelegate {
|
42
|
-
private context;
|
43
|
-
constructor(context: StoreContext);
|
44
|
-
setContext(context: StoreContext): void;
|
45
|
-
get attributes(): any;
|
46
|
-
apps(): Apps;
|
47
|
-
get focus(): string | undefined;
|
48
|
-
getAppAttributes(id: string): AppSyncAttributes;
|
49
|
-
getAppState(id: string): any;
|
50
|
-
getMaximized(): any;
|
51
|
-
getMinimized(): any;
|
52
|
-
setupAppAttributes(params: AddAppParams, id: string, isDynamicPPT: boolean): void;
|
53
|
-
updateAppState(appId: string, stateName: AppAttributes, state: any): void;
|
54
|
-
cleanAppAttributes(id: string): void;
|
55
|
-
cleanFocus(): void;
|
56
|
-
getAppSceneIndex(id: string): any;
|
57
|
-
getAppScenePath(id: string): any;
|
58
|
-
getMainViewScenePath(): string | undefined;
|
59
|
-
getMainViewSceneIndex(): any;
|
60
|
-
getBoxState(): any;
|
61
|
-
setMainViewScenePath(scenePath: string): void;
|
62
|
-
setMainViewSceneIndex(index: number): void;
|
63
|
-
getMainViewCamera(): MainViewCamera;
|
64
|
-
getMainViewSize(): MainViewSize;
|
65
|
-
setMainViewCamera(camera: ICamera): void;
|
66
|
-
setMainViewSize(size: ISize): void;
|
67
|
-
setMainViewCameraAndSize(camera: ICamera, size: ISize): void;
|
68
|
-
setAppFocus: (appId: string, focus: boolean) => void;
|
69
|
-
updateCursor(uid: string, position: Position): void;
|
70
|
-
updateCursorState(uid: string, cursorState: string | undefined): void;
|
71
|
-
getCursorState(uid: string): any;
|
72
|
-
cleanCursor(uid: string): void;
|
73
|
-
setMainViewFocusPath(mainView: View): void;
|
74
|
-
getIframeBridge(): any;
|
75
|
-
setIframeBridge(data: any): void;
|
76
|
-
}
|
77
|
-
export declare type MainViewSize = {
|
78
|
-
id: string;
|
79
|
-
width: number;
|
80
|
-
height: number;
|
81
|
-
};
|
82
|
-
export declare type MainViewCamera = {
|
83
|
-
id: string;
|
84
|
-
centerX: number;
|
85
|
-
centerY: number;
|
86
|
-
scale: number;
|
87
|
-
};
|
88
|
-
export declare type Cursors = {
|
89
|
-
[key: string]: Cursor;
|
90
|
-
};
|
91
|
-
export declare const store: AttributesDelegate;
|
package/dist/BoxEmitter.d.ts
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
import type { TELE_BOX_STATE } from "@netless/telebox-insider";
|
2
|
-
import Emittery from "emittery";
|
3
|
-
export declare type BoxMovePayload = {
|
4
|
-
appId: string;
|
5
|
-
x: number;
|
6
|
-
y: number;
|
7
|
-
};
|
8
|
-
export declare type BoxFocusPayload = {
|
9
|
-
appId: string;
|
10
|
-
};
|
11
|
-
export declare type BoxResizePayload = {
|
12
|
-
appId: string;
|
13
|
-
width: number;
|
14
|
-
height: number;
|
15
|
-
x?: number;
|
16
|
-
y?: number;
|
17
|
-
};
|
18
|
-
export declare type BoxClosePayload = {
|
19
|
-
appId: string;
|
20
|
-
error?: Error;
|
21
|
-
};
|
22
|
-
export declare type BoxStateChangePayload = {
|
23
|
-
appId: string;
|
24
|
-
state: TELE_BOX_STATE;
|
25
|
-
};
|
26
|
-
export declare type BoxEvent = {
|
27
|
-
move: BoxMovePayload;
|
28
|
-
focus: BoxFocusPayload;
|
29
|
-
resize: BoxResizePayload;
|
30
|
-
close: BoxClosePayload;
|
31
|
-
boxStateChange: BoxStateChangePayload;
|
32
|
-
};
|
33
|
-
export declare type BoxEmitterType = Emittery<BoxEvent>;
|
34
|
-
export declare const boxEmitter: BoxEmitterType;
|
package/dist/BoxManager.d.ts
DELETED
@@ -1,98 +0,0 @@
|
|
1
|
-
import { AppAttributes } from "./constants";
|
2
|
-
import { TELE_BOX_STATE, TeleBoxManager } from "@netless/telebox-insider";
|
3
|
-
import { WindowManager } from "./index";
|
4
|
-
import type { BoxEmitterType } from "./BoxEmitter";
|
5
|
-
import type { AddAppOptions, AppInitState } from "./index";
|
6
|
-
import type { TeleBoxManagerUpdateConfig, ReadonlyTeleBox, TeleBoxColorScheme, TeleBoxRect, TeleBoxConfig } from "@netless/telebox-insider";
|
7
|
-
import type Emittery from "emittery";
|
8
|
-
import type { NetlessApp } from "./typings";
|
9
|
-
import type { View } from "white-web-sdk";
|
10
|
-
import type { CallbacksType } from "./callback";
|
11
|
-
import type { EmitterType } from "./InternalEmitter";
|
12
|
-
export { TELE_BOX_STATE };
|
13
|
-
export declare type CreateBoxParams = {
|
14
|
-
appId: string;
|
15
|
-
app: NetlessApp;
|
16
|
-
view?: View;
|
17
|
-
emitter?: Emittery;
|
18
|
-
options?: AddAppOptions;
|
19
|
-
canOperate?: boolean;
|
20
|
-
smartPosition?: boolean;
|
21
|
-
};
|
22
|
-
declare type AppId = {
|
23
|
-
appId: string;
|
24
|
-
};
|
25
|
-
declare type MoveBoxParams = AppId & {
|
26
|
-
x: number;
|
27
|
-
y: number;
|
28
|
-
};
|
29
|
-
declare type ResizeBoxParams = AppId & {
|
30
|
-
width: number;
|
31
|
-
height: number;
|
32
|
-
skipUpdate: boolean;
|
33
|
-
};
|
34
|
-
declare type SetBoxMinSizeParams = AppId & {
|
35
|
-
minWidth: number;
|
36
|
-
minHeight: number;
|
37
|
-
};
|
38
|
-
declare type SetBoxTitleParams = AppId & {
|
39
|
-
title: string;
|
40
|
-
};
|
41
|
-
export declare type CreateTeleBoxManagerConfig = {
|
42
|
-
collectorContainer?: HTMLElement;
|
43
|
-
collectorStyles?: Partial<CSSStyleDeclaration>;
|
44
|
-
prefersColorScheme?: TeleBoxColorScheme;
|
45
|
-
};
|
46
|
-
export declare type BoxManagerContext = {
|
47
|
-
safeSetAttributes: (attributes: any) => void;
|
48
|
-
getMainView: () => View;
|
49
|
-
updateAppState: (appId: string, field: AppAttributes, value: any) => void;
|
50
|
-
emitter: EmitterType;
|
51
|
-
boxEmitter: BoxEmitterType;
|
52
|
-
callbacks: CallbacksType;
|
53
|
-
canOperate: () => boolean;
|
54
|
-
notifyContainerRectUpdate: (rect: TeleBoxRect) => void;
|
55
|
-
cleanFocus: () => void;
|
56
|
-
setAppFocus: (appId: string) => void;
|
57
|
-
};
|
58
|
-
export declare const createBoxManager: (manager: WindowManager, callbacks: CallbacksType, emitter: EmitterType, boxEmitter: BoxEmitterType, options: CreateTeleBoxManagerConfig) => BoxManager;
|
59
|
-
export declare class BoxManager {
|
60
|
-
private context;
|
61
|
-
private createTeleBoxManagerConfig?;
|
62
|
-
teleBoxManager: TeleBoxManager;
|
63
|
-
constructor(context: BoxManagerContext, createTeleBoxManagerConfig?: CreateTeleBoxManagerConfig | undefined);
|
64
|
-
private get mainView();
|
65
|
-
private get canOperate();
|
66
|
-
get boxState(): "normal" | "minimized" | "maximized";
|
67
|
-
get maximized(): boolean;
|
68
|
-
get minimized(): boolean;
|
69
|
-
get darkMode(): boolean;
|
70
|
-
get prefersColorScheme(): TeleBoxColorScheme;
|
71
|
-
get boxSize(): number;
|
72
|
-
createBox(params: CreateBoxParams): void;
|
73
|
-
setBoxInitState(appId: string): void;
|
74
|
-
setupBoxManager(createTeleBoxManagerConfig?: CreateTeleBoxManagerConfig): TeleBoxManager;
|
75
|
-
setCollectorContainer(container: HTMLElement): void;
|
76
|
-
getBox(appId: string): ReadonlyTeleBox | undefined;
|
77
|
-
closeBox(appId: string, skipUpdate?: boolean): ReadonlyTeleBox | undefined;
|
78
|
-
boxIsFocus(appId: string): boolean | undefined;
|
79
|
-
getFocusBox(): ReadonlyTeleBox | undefined;
|
80
|
-
getTopBox(): ReadonlyTeleBox | undefined;
|
81
|
-
updateBoxState(state?: AppInitState): void;
|
82
|
-
updateManagerRect(): void;
|
83
|
-
moveBox({ appId, x, y }: MoveBoxParams): void;
|
84
|
-
focusBox({ appId }: AppId, skipUpdate?: boolean): void;
|
85
|
-
resizeBox({ appId, width, height, skipUpdate }: ResizeBoxParams): void;
|
86
|
-
setBoxMinSize(params: SetBoxMinSizeParams): void;
|
87
|
-
setBoxTitle(params: SetBoxTitleParams): void;
|
88
|
-
blurAllBox(): void;
|
89
|
-
updateAll(config: TeleBoxManagerUpdateConfig): void;
|
90
|
-
setMaximized(maximized: boolean, skipUpdate?: boolean): void;
|
91
|
-
setMinimized(minimized: boolean, skipUpdate?: boolean): void;
|
92
|
-
focusTopBox(): void;
|
93
|
-
updateBox(id: string, payload: TeleBoxConfig, skipUpdate?: boolean): void;
|
94
|
-
setReadonly(readonly: boolean): void;
|
95
|
-
setPrefersColorScheme(colorScheme: TeleBoxColorScheme): void;
|
96
|
-
setZIndex(id: string, zIndex: number, skipUpdate?: boolean): void;
|
97
|
-
destroy(): void;
|
98
|
-
}
|
package/dist/BuiltinApps.d.ts
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
import type { EmitterType } from "./InternalEmitter";
|
2
|
-
export declare class ContainerResizeObserver {
|
3
|
-
private emitter;
|
4
|
-
private containerResizeObserver?;
|
5
|
-
private disposer?;
|
6
|
-
constructor(emitter: EmitterType);
|
7
|
-
static create(container: HTMLElement, sizer: HTMLElement, wrapper: HTMLDivElement, emitter: EmitterType): ContainerResizeObserver;
|
8
|
-
observePlaygroundSize(container: HTMLElement, sizer: HTMLElement, wrapper: HTMLDivElement): void;
|
9
|
-
updateSizer({ width, height }: DOMRectReadOnly, sizer: HTMLElement, wrapper: HTMLDivElement): void;
|
10
|
-
disconnect(): void;
|
11
|
-
}
|
package/dist/Cursor/Cursor.d.ts
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
import type { RoomMember } from "white-web-sdk";
|
2
|
-
import type { AppManager } from "../AppManager";
|
3
|
-
import type { Position } from "../AttributesDelegate";
|
4
|
-
import type { CursorManager } from "./index";
|
5
|
-
import { ApplianceNames } from "white-web-sdk";
|
6
|
-
export declare type Payload = {
|
7
|
-
[key: string]: any;
|
8
|
-
};
|
9
|
-
export declare class Cursor {
|
10
|
-
private manager;
|
11
|
-
private memberId;
|
12
|
-
private cursorManager;
|
13
|
-
private wrapper?;
|
14
|
-
private member?;
|
15
|
-
private timer?;
|
16
|
-
private component?;
|
17
|
-
private style;
|
18
|
-
constructor(manager: AppManager, memberId: string, cursorManager: CursorManager, wrapper?: HTMLElement | undefined);
|
19
|
-
move: (position: Position) => void;
|
20
|
-
setStyle: (style: "default" | "custom") => void;
|
21
|
-
leave: () => void;
|
22
|
-
private moveCursor;
|
23
|
-
get memberApplianceName(): ApplianceNames | undefined;
|
24
|
-
get memberColor(): string;
|
25
|
-
get memberColorHex(): string;
|
26
|
-
private get payload();
|
27
|
-
get memberCursorName(): any;
|
28
|
-
private get memberTheme();
|
29
|
-
private get memberCursorTextColor();
|
30
|
-
private get memberCursorTagBackgroundColor();
|
31
|
-
private get memberAvatar();
|
32
|
-
private get memberOpacity();
|
33
|
-
private get memberTagName();
|
34
|
-
private autoHidden;
|
35
|
-
private createCursor;
|
36
|
-
private initProps;
|
37
|
-
private getIcon;
|
38
|
-
private isCustomIcon;
|
39
|
-
updateMember(): RoomMember | undefined;
|
40
|
-
private updateComponent;
|
41
|
-
destroy(): void;
|
42
|
-
hide(): void;
|
43
|
-
}
|
package/dist/Cursor/icons.d.ts
DELETED
package/dist/Cursor/icons2.d.ts
DELETED
@@ -1,4 +0,0 @@
|
|
1
|
-
import type { MemberState } from "white-web-sdk";
|
2
|
-
import { ApplianceNames } from "white-web-sdk";
|
3
|
-
export declare function enableLocal(memberState: MemberState): () => void;
|
4
|
-
export declare function remoteIcon(applianceName: ApplianceNames, hex: string): string | undefined;
|
package/dist/Cursor/index.d.ts
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
import { Cursor } from "./Cursor";
|
2
|
-
import type { ApplianceIcons, CursorOptions } from "../index";
|
3
|
-
import type { PositionType } from "../AttributesDelegate";
|
4
|
-
import type { RoomMember, View } from "white-web-sdk";
|
5
|
-
import type { AppManager } from "../AppManager";
|
6
|
-
export declare type EventType = {
|
7
|
-
type: PositionType;
|
8
|
-
id?: string;
|
9
|
-
};
|
10
|
-
export declare type MoveCursorParams = {
|
11
|
-
uid: string;
|
12
|
-
x: number;
|
13
|
-
y: number;
|
14
|
-
};
|
15
|
-
export declare class CursorManager {
|
16
|
-
private manager;
|
17
|
-
private enableCursor;
|
18
|
-
containerRect?: DOMRect;
|
19
|
-
wrapperRect?: DOMRect;
|
20
|
-
cursorInstances: Map<string, Cursor>;
|
21
|
-
roomMembers?: readonly RoomMember[];
|
22
|
-
userApplianceIcons: ApplianceIcons;
|
23
|
-
private mainViewElement?;
|
24
|
-
private sideEffectManager;
|
25
|
-
private store;
|
26
|
-
private leaveFlag;
|
27
|
-
private _style;
|
28
|
-
constructor(manager: AppManager, enableCursor: boolean, cursorOptions?: CursorOptions, applianceIcons?: ApplianceIcons);
|
29
|
-
get applianceIcons(): ApplianceIcons;
|
30
|
-
get style(): "default" | "custom";
|
31
|
-
set style(value: "default" | "custom");
|
32
|
-
private onCursorMove;
|
33
|
-
private initCursorInstance;
|
34
|
-
private enableCustomCursor;
|
35
|
-
private canMoveCursor;
|
36
|
-
setupWrapper(wrapper: HTMLElement): void;
|
37
|
-
setMainViewDivElement(div: HTMLDivElement): void;
|
38
|
-
get boxState(): any;
|
39
|
-
get focusView(): View | undefined;
|
40
|
-
private mouseMoveListener_;
|
41
|
-
private mouseMoveTimer;
|
42
|
-
private mouseMoveListener;
|
43
|
-
private mouseLeaveListener;
|
44
|
-
private showPencilEraserIfNeeded;
|
45
|
-
private updateCursor;
|
46
|
-
private getPoint;
|
47
|
-
/**
|
48
|
-
* 因为窗口内框在不同分辨率下的大小不一样,所以这里通过来鼠标事件的 target 来判断是在主白板还是在 APP 中
|
49
|
-
*/
|
50
|
-
private getType;
|
51
|
-
updateContainerRect(): void;
|
52
|
-
deleteCursor(uid: string): void;
|
53
|
-
hideCursor(uid: string): void;
|
54
|
-
destroy(): void;
|
55
|
-
}
|
package/dist/Helper.d.ts
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
import type { Room, RoomMember } from "white-web-sdk";
|
2
|
-
import { WindowManager } from "./index";
|
3
|
-
export declare const setupWrapper: (root: HTMLElement) => {
|
4
|
-
playground: HTMLDivElement;
|
5
|
-
wrapper: HTMLDivElement;
|
6
|
-
sizer: HTMLDivElement;
|
7
|
-
mainViewElement: HTMLDivElement;
|
8
|
-
};
|
9
|
-
export declare const checkVersion: () => void;
|
10
|
-
export declare const findMemberByUid: (room: Room | undefined, uid: string) => RoomMember | undefined;
|
11
|
-
export declare const createInvisiblePlugin: (room: Room) => Promise<WindowManager | undefined>;
|
@@ -1,34 +0,0 @@
|
|
1
|
-
import Emittery from "emittery";
|
2
|
-
import type { AppInitState, CursorMovePayload } from "./index";
|
3
|
-
export declare type RemoveSceneParams = {
|
4
|
-
scenePath: string;
|
5
|
-
index?: number;
|
6
|
-
};
|
7
|
-
export declare type EmitterEvent = {
|
8
|
-
onCreated: undefined;
|
9
|
-
InitReplay: AppInitState;
|
10
|
-
error: Error;
|
11
|
-
seekStart: undefined;
|
12
|
-
seek: number;
|
13
|
-
mainViewMounted: undefined;
|
14
|
-
observerIdChange: number;
|
15
|
-
boxStateChange: string;
|
16
|
-
playgroundSizeChange: DOMRect;
|
17
|
-
startReconnect: undefined;
|
18
|
-
onReconnected: undefined;
|
19
|
-
removeScenes: RemoveSceneParams;
|
20
|
-
cursorMove: CursorMovePayload;
|
21
|
-
updateManagerRect: undefined;
|
22
|
-
focusedChange: {
|
23
|
-
focused: string | undefined;
|
24
|
-
prev: string | undefined;
|
25
|
-
};
|
26
|
-
rootDirRemoved: undefined;
|
27
|
-
rootDirSceneRemoved: string;
|
28
|
-
setReadonly: boolean;
|
29
|
-
changePageState: undefined;
|
30
|
-
writableChange: boolean;
|
31
|
-
containerSizeRatioUpdate: number;
|
32
|
-
};
|
33
|
-
export declare type EmitterType = Emittery<EmitterEvent>;
|
34
|
-
export declare const internalEmitter: EmitterType;
|
@@ -1,21 +0,0 @@
|
|
1
|
-
import type { SceneDefinition } from "white-web-sdk";
|
2
|
-
export declare type AddPageParams = {
|
3
|
-
after?: boolean;
|
4
|
-
scene?: SceneDefinition;
|
5
|
-
};
|
6
|
-
export declare type PageState = {
|
7
|
-
index: number;
|
8
|
-
length: number;
|
9
|
-
};
|
10
|
-
export interface PageController {
|
11
|
-
nextPage: () => Promise<boolean>;
|
12
|
-
prevPage: () => Promise<boolean>;
|
13
|
-
jumpPage: (index: number) => Promise<boolean>;
|
14
|
-
addPage: (params?: AddPageParams) => Promise<void>;
|
15
|
-
removePage: (index: number) => Promise<boolean>;
|
16
|
-
pageState: PageState;
|
17
|
-
}
|
18
|
-
export interface PageRemoveService {
|
19
|
-
removeSceneByIndex: (index: number) => Promise<boolean>;
|
20
|
-
setSceneIndexWithoutSync: (index: number) => void;
|
21
|
-
}
|
package/dist/Page/index.d.ts
DELETED
package/dist/PageState.d.ts
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
import type { Room } from "white-web-sdk";
|
2
|
-
import type { EmitterType } from "./InternalEmitter";
|
3
|
-
export declare type ReconnectRefresherContext = {
|
4
|
-
emitter: EmitterType;
|
5
|
-
};
|
6
|
-
export declare class ReconnectRefresher {
|
7
|
-
private ctx;
|
8
|
-
private phase?;
|
9
|
-
private room;
|
10
|
-
private reactors;
|
11
|
-
private disposers;
|
12
|
-
constructor(ctx: ReconnectRefresherContext);
|
13
|
-
setRoom(room: Room | undefined): void;
|
14
|
-
setContext(ctx: ReconnectRefresherContext): void;
|
15
|
-
private onPhaseChanged;
|
16
|
-
private onReconnected;
|
17
|
-
private _onReconnected;
|
18
|
-
private releaseDisposers;
|
19
|
-
refresh(): void;
|
20
|
-
add(id: string, func: any): void;
|
21
|
-
remove(id: string): void;
|
22
|
-
hasReactor(id: string): boolean;
|
23
|
-
destroy(): void;
|
24
|
-
}
|
package/dist/RedoUndo.d.ts
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
import type { View } from "white-web-sdk";
|
2
|
-
import type { AppProxy } from "./App";
|
3
|
-
export declare type RedoUndoContext = {
|
4
|
-
mainView: () => View;
|
5
|
-
focus: () => string | undefined;
|
6
|
-
getAppProxy: (id: string) => AppProxy | undefined;
|
7
|
-
};
|
8
|
-
export declare class RedoUndo {
|
9
|
-
private context;
|
10
|
-
constructor(context: RedoUndoContext);
|
11
|
-
private addRedoUndoListeners;
|
12
|
-
private addViewCallbacks;
|
13
|
-
private disposeViewCallbacks;
|
14
|
-
private onCanRedoStepsUpdate;
|
15
|
-
private onCanUndoStepsUpdate;
|
16
|
-
private disposePrevFocusViewRedoUndoListeners;
|
17
|
-
destroy(): void;
|
18
|
-
}
|
package/dist/Register/index.d.ts
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
import Emittery from "emittery";
|
2
|
-
import type { NetlessApp, RegisterEvents, RegisterParams } from "../typings";
|
3
|
-
export declare type LoadAppEvent = {
|
4
|
-
kind: string;
|
5
|
-
status: "start" | "success" | "failed";
|
6
|
-
reason?: string;
|
7
|
-
};
|
8
|
-
export declare type SyncRegisterAppPayload = {
|
9
|
-
kind: string;
|
10
|
-
src: string;
|
11
|
-
name: string | undefined;
|
12
|
-
};
|
13
|
-
export declare type SyncRegisterApp = (payload: SyncRegisterAppPayload) => void;
|
14
|
-
declare class AppRegister {
|
15
|
-
kindEmitters: Map<string, Emittery<RegisterEvents>>;
|
16
|
-
registered: Map<string, RegisterParams>;
|
17
|
-
appClassesCache: Map<string, Promise<NetlessApp>>;
|
18
|
-
appClasses: Map<string, () => Promise<NetlessApp>>;
|
19
|
-
private syncRegisterApp;
|
20
|
-
setSyncRegisterApp(fn: SyncRegisterApp): void;
|
21
|
-
onSyncRegisterAppChange: (payload: SyncRegisterAppPayload) => void;
|
22
|
-
register(params: RegisterParams): Promise<void>;
|
23
|
-
unregister(kind: string): void;
|
24
|
-
notifyApp<T extends keyof RegisterEvents>(kind: string, event: T, payload: RegisterEvents[T]): Promise<void>;
|
25
|
-
private createKindEmitter;
|
26
|
-
}
|
27
|
-
export declare const appRegister: AppRegister;
|
28
|
-
export {};
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import type { NetlessApp } from "../typings";
|
2
|
-
export declare const getScript: (url: string) => Promise<string>;
|
3
|
-
export declare const executeScript: (text: string, appName: string) => NetlessApp;
|
4
|
-
export declare const loadApp: (url: string, key: string, name?: string | undefined) => Promise<NetlessApp>;
|
@@ -1,8 +0,0 @@
|
|
1
|
-
export declare type Item = {
|
2
|
-
kind: string;
|
3
|
-
sourceCode: string;
|
4
|
-
};
|
5
|
-
export declare const initDb: () => Promise<void>;
|
6
|
-
export declare const setItem: (key: string, val: any) => Promise<void> | undefined;
|
7
|
-
export declare const getItem: (key: string) => Promise<Item | null>;
|
8
|
-
export declare const removeItem: (key: string) => Promise<void> | undefined;
|
@@ -1,15 +0,0 @@
|
|
1
|
-
export declare type Invoker<T = any> = () => Promise<T | undefined>;
|
2
|
-
export declare class AppCreateQueue {
|
3
|
-
private list;
|
4
|
-
private currentInvoker;
|
5
|
-
private timer;
|
6
|
-
isEmit: boolean;
|
7
|
-
private initInterval;
|
8
|
-
push<T>(item: Invoker<T>): void;
|
9
|
-
invoke(): void;
|
10
|
-
private invoked;
|
11
|
-
private clear;
|
12
|
-
emitReady(): void;
|
13
|
-
empty(): void;
|
14
|
-
destroy(): void;
|
15
|
-
}
|
package/dist/Utils/Common.d.ts
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
import type { PublicEvent } from "../callback";
|
2
|
-
import type { Displayer, ViewVisionMode, Room, View, SceneDefinition } from "white-web-sdk";
|
3
|
-
import type Emittery from "emittery";
|
4
|
-
export declare const genAppId: (kind: string) => Promise<string>;
|
5
|
-
export declare const setViewFocusScenePath: (view: View, focusScenePath: string) => View | undefined;
|
6
|
-
export declare const setViewSceneIndex: (view: View, index: number) => View | undefined;
|
7
|
-
export declare const setScenePath: (room: Room | undefined, scenePath: string) => void;
|
8
|
-
export declare const getScenePath: (room: Room | undefined, dir: string | undefined, index: number) => string | undefined;
|
9
|
-
export declare const removeScenes: (room: Room | undefined, scenePath: string, index?: number | undefined) => void;
|
10
|
-
export declare const setViewMode: (view: View, mode: ViewVisionMode) => void;
|
11
|
-
export declare const emitError: (error: Error) => void;
|
12
|
-
export declare const addEmitterOnceListener: (event: any, listener: any) => void;
|
13
|
-
export declare const notifyMainViewModeChange: import("lodash").DebouncedFunc<(callbacks: Emittery<PublicEvent>, mode: ViewVisionMode) => void>;
|
14
|
-
export declare const makeValidScenePath: (displayer: Displayer, scenePath: string, index?: number) => string | undefined;
|
15
|
-
export declare const entireScenes: (displayer: Displayer) => import("white-web-sdk").SceneMap;
|
16
|
-
export declare const putScenes: (room: Room | undefined, path: string, scenes: SceneDefinition[], index?: number | undefined) => void | undefined;
|
17
|
-
export declare const isValidScenePath: (scenePath: string) => boolean;
|
18
|
-
export declare const parseSceneDir: (scenePath: string) => string;
|
19
|
-
export declare const ensureValidScenePath: (scenePath: string) => string;
|
20
|
-
export declare const getVersionNumber: (version: string) => number;
|
21
|
-
export declare const wait: (time: number) => Promise<unknown>;
|
22
|
-
export declare const isRootDirPage: (scenePath: string) => boolean;
|
package/dist/Utils/Reactive.d.ts
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
import { UpdateEventKind } from "white-web-sdk";
|
2
|
-
import type { AkkoObjectUpdatedListener } from "white-web-sdk";
|
3
|
-
export declare const onObjectByEvent: (event: UpdateEventKind) => (object: any, func: () => void) => (() => void) | undefined;
|
4
|
-
export declare const safeListenPropsUpdated: <T>(getProps: () => T, callback: AkkoObjectUpdatedListener<T>, onDestroyed?: ((props: unknown) => void) | undefined) => () => void;
|
5
|
-
export declare const onObjectRemoved: (object: any, func: () => void) => (() => void) | undefined;
|
6
|
-
export declare const onObjectInserted: (object: any, func: () => void) => (() => void) | undefined;
|
package/dist/Utils/error.d.ts
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
export declare class AppCreateError extends Error {
|
2
|
-
message: string;
|
3
|
-
}
|
4
|
-
export declare class AppNotRegisterError extends Error {
|
5
|
-
constructor(kind: string);
|
6
|
-
}
|
7
|
-
export declare class AppManagerNotInitError extends Error {
|
8
|
-
message: string;
|
9
|
-
}
|
10
|
-
export declare class WhiteWebSDKInvalidError extends Error {
|
11
|
-
constructor(version: string);
|
12
|
-
}
|
13
|
-
export declare class ParamsInvalidError extends Error {
|
14
|
-
message: string;
|
15
|
-
}
|
16
|
-
export declare class BoxNotCreatedError extends Error {
|
17
|
-
message: string;
|
18
|
-
}
|
19
|
-
export declare class InvalidScenePath extends Error {
|
20
|
-
message: string;
|
21
|
-
}
|
22
|
-
export declare class BoxManagerNotFoundError extends Error {
|
23
|
-
message: string;
|
24
|
-
}
|
25
|
-
export declare class BindContainerRoomPhaseInvalidError extends Error {
|
26
|
-
message: string;
|
27
|
-
}
|
package/dist/Utils/log.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export declare const log: (...args: any[]) => void;
|