@netless/window-manager 0.4.0-canary.6 → 0.4.0-canary.7
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.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/{App → src/App}/Storage/StorageEvent.d.ts +0 -0
- package/dist/{App → src/App}/Storage/index.d.ts +0 -0
- package/dist/{App → src/App}/Storage/typings.d.ts +3 -0
- package/dist/{App → src/App}/Storage/utils.d.ts +0 -0
- package/dist/{AppContext.d.ts → src/AppContext.d.ts} +0 -0
- package/dist/{AppListener.d.ts → src/AppListener.d.ts} +0 -1
- package/dist/{AppManager.d.ts → src/AppManager.d.ts} +3 -4
- package/dist/{AppProxy.d.ts → src/AppProxy.d.ts} +2 -3
- package/dist/{AttributesDelegate.d.ts → src/AttributesDelegate.d.ts} +0 -0
- package/dist/{Base → src/Base}/Context.d.ts +0 -1
- package/dist/{Base → src/Base}/index.d.ts +0 -0
- package/dist/{BoxManager.d.ts → src/BoxManager.d.ts} +2 -1
- package/dist/src/BuiltinApps.d.ts +6 -0
- package/dist/src/ContainerResizeObserver.d.ts +10 -0
- package/dist/{Cursor → src/Cursor}/Cursor.d.ts +0 -0
- package/dist/{Cursor → src/Cursor}/icons.d.ts +0 -0
- package/dist/{Cursor → src/Cursor}/index.d.ts +0 -0
- package/dist/src/Helper.d.ts +6 -0
- package/dist/{ReconnectRefresher.d.ts → src/ReconnectRefresher.d.ts} +0 -0
- package/dist/{Register → src/Register}/index.d.ts +0 -0
- package/dist/{Register → src/Register}/loader.d.ts +0 -0
- package/dist/{Register → src/Register}/storage.d.ts +0 -0
- package/dist/{Utils → src/Utils}/Common.d.ts +3 -1
- package/dist/{Utils → src/Utils}/Reactive.d.ts +0 -0
- package/dist/{Utils → src/Utils}/RoomHacker.d.ts +0 -0
- package/dist/{Utils → src/Utils}/error.d.ts +0 -0
- package/dist/{Utils → src/Utils}/log.d.ts +0 -0
- package/dist/{MainView.d.ts → src/View/MainView.d.ts} +2 -4
- package/dist/src/View/ViewManager.d.ts +13 -0
- package/dist/{constants.d.ts → src/constants.d.ts} +0 -5
- package/dist/{index.d.ts → src/index.d.ts} +3 -10
- package/dist/{typings.d.ts → src/typings.d.ts} +1 -0
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/src/App/Storage/index.ts +2 -2
- package/src/App/Storage/typings.ts +6 -0
- package/src/AppContext.ts +0 -1
- package/src/AppListener.ts +0 -8
- package/src/AppManager.ts +31 -25
- package/src/AppProxy.ts +14 -36
- package/src/Base/Context.ts +0 -4
- package/src/BoxManager.ts +9 -7
- package/src/BuiltinApps.ts +24 -0
- package/src/ContainerResizeObserver.ts +62 -0
- package/src/Helper.ts +30 -0
- package/src/Utils/Common.ts +35 -13
- package/src/{MainView.ts → View/MainView.ts} +7 -25
- package/src/View/ViewManager.ts +53 -0
- package/src/constants.ts +0 -2
- package/src/index.ts +16 -67
- package/src/style.css +6 -0
- package/src/typings.ts +1 -0
- package/dist/Utils/CameraStore.d.ts +0 -15
- package/dist/ViewManager.d.ts +0 -29
- package/dist/sdk.d.ts +0 -14
- package/src/Utils/CameraStore.ts +0 -72
- package/src/sdk.ts +0 -39
- package/src/viewManager.ts +0 -177
File without changes
|
File without changes
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { StorageEventListener } from "./StorageEvent";
|
1
2
|
export declare type RefValue<TValue = any> = {
|
2
3
|
k: string;
|
3
4
|
v: TValue;
|
@@ -16,3 +17,5 @@ export declare type Diff<T> = {
|
|
16
17
|
export declare type StorageOnSetStatePayload<TState = unknown> = {
|
17
18
|
[K in keyof TState]?: MaybeRefValue<TState[K]>;
|
18
19
|
};
|
20
|
+
export declare type StorageStateChangedEvent<TState = any> = Diff<TState>;
|
21
|
+
export declare type StorageStateChangedListener<TState = any> = StorageEventListener<StorageStateChangedEvent<TState>>;
|
File without changes
|
File without changes
|
@@ -9,7 +9,6 @@ export declare class AppListeners {
|
|
9
9
|
private mainMagixEventListener;
|
10
10
|
private appMoveHandler;
|
11
11
|
private appResizeHandler;
|
12
|
-
private switchViewsToFreedomHandler;
|
13
12
|
private boxStateChangeHandler;
|
14
13
|
private setMainViewScenePathHandler;
|
15
14
|
private moveCameraToContainHandler;
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import { AppStatus, Events } from "./constants";
|
2
2
|
import { AppProxy } from "./AppProxy";
|
3
3
|
import { WindowManager } from "./index";
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import { ViewManager } from "./ViewManager";
|
4
|
+
import { MainViewProxy } from "./View/MainView";
|
5
|
+
import { ViewManager } from "./View/ViewManager";
|
7
6
|
import type { ReconnectRefresher } from "./ReconnectRefresher";
|
8
7
|
import type { BoxManager } from "./BoxManager";
|
9
8
|
import type { Displayer, Room } from "white-web-sdk";
|
@@ -11,7 +10,6 @@ import type { AddAppParams, TeleBoxRect } from "./index";
|
|
11
10
|
export declare class AppManager {
|
12
11
|
windowManger: WindowManager;
|
13
12
|
displayer: Displayer;
|
14
|
-
cameraStore: CameraStore;
|
15
13
|
viewManager: ViewManager;
|
16
14
|
appProxies: Map<string, AppProxy>;
|
17
15
|
appStatus: Map<string, AppStatus>;
|
@@ -36,6 +34,7 @@ export declare class AppManager {
|
|
36
34
|
resetMinimized(): void;
|
37
35
|
private onAppDelete;
|
38
36
|
bindMainView(divElement: HTMLDivElement, disableCameraTransform: boolean): void;
|
37
|
+
setMainViewFocusPath(): void;
|
39
38
|
addApp(params: AddAppParams, isDynamicPPT: boolean): Promise<string | undefined>;
|
40
39
|
private beforeAddApp;
|
41
40
|
private afterAddApp;
|
@@ -15,7 +15,6 @@ export declare class AppProxy extends Base {
|
|
15
15
|
private boxManager;
|
16
16
|
private appProxies;
|
17
17
|
private viewManager;
|
18
|
-
private cameraStore;
|
19
18
|
private kind;
|
20
19
|
isAddApp: boolean;
|
21
20
|
private status;
|
@@ -29,8 +28,9 @@ export declare class AppProxy extends Base {
|
|
29
28
|
get attributes(): any;
|
30
29
|
get appAttributes(): import("./index").AppSyncAttributes;
|
31
30
|
getFullScenePath(): string | undefined;
|
31
|
+
private getFullScenePathFromScenes;
|
32
32
|
setFullPath(path: string): void;
|
33
|
-
baseInsertApp(skipUpdate?: boolean
|
33
|
+
baseInsertApp(skipUpdate?: boolean): Promise<{
|
34
34
|
appId: string;
|
35
35
|
app: NetlessApp;
|
36
36
|
}>;
|
@@ -42,7 +42,6 @@ export declare class AppProxy extends Base {
|
|
42
42
|
private afterSetupApp;
|
43
43
|
onSeek(time: number): void;
|
44
44
|
onReconnected(): Promise<void>;
|
45
|
-
switchToWritable(): void;
|
46
45
|
getAppInitState: (id: string) => AppInitState | undefined;
|
47
46
|
emitAppSceneStateChange(sceneState: SceneState): void;
|
48
47
|
emitAppIsWritableChange(): void;
|
File without changes
|
@@ -8,6 +8,5 @@ export declare class Context {
|
|
8
8
|
findMemberByUid: (uid: string) => import("white-web-sdk").RoomMember | undefined;
|
9
9
|
updateManagerRect(): void;
|
10
10
|
blurFocusBox(): void;
|
11
|
-
switchAppToWriter(id: string): void;
|
12
11
|
}
|
13
12
|
export declare const createContext: (manager: AppManager) => Context;
|
File without changes
|
@@ -56,9 +56,10 @@ export declare class BoxManager {
|
|
56
56
|
private createTeleBoxManagerConfig?;
|
57
57
|
teleBoxManager: TeleBoxManager;
|
58
58
|
constructor(context: BoxManagerContext, createTeleBoxManagerConfig?: CreateTeleBoxManagerConfig | undefined);
|
59
|
+
private playgroundSizeChangeListener;
|
59
60
|
private get mainView();
|
60
61
|
private get canOperate();
|
61
|
-
get boxState(): "
|
62
|
+
get boxState(): "minimized" | "maximized" | "normal";
|
62
63
|
get maximized(): boolean;
|
63
64
|
get minimized(): boolean;
|
64
65
|
get darkMode(): boolean;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { EmitterType } from "./index";
|
2
|
+
export declare class ContainerResizeObserver {
|
3
|
+
private emitter;
|
4
|
+
private containerResizeObserver?;
|
5
|
+
constructor(emitter: EmitterType);
|
6
|
+
static create(container: HTMLElement, sizer: HTMLElement, wrapper: HTMLDivElement, emitter: EmitterType): ContainerResizeObserver;
|
7
|
+
observePlaygroundSize(container: HTMLElement, sizer: HTMLElement, wrapper: HTMLDivElement): void;
|
8
|
+
private updateSizer;
|
9
|
+
disconnect(): void;
|
10
|
+
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -4,11 +4,13 @@ import type Emittery from "emittery";
|
|
4
4
|
export declare const genAppId: (kind: string) => Promise<string>;
|
5
5
|
export declare const setViewFocusScenePath: (view: View, focusScenePath: string) => void;
|
6
6
|
export declare const setScenePath: (room: Room | undefined, scenePath: string) => void;
|
7
|
+
export declare const getScenePath: (room: Room | undefined, dir: string | undefined, index: number) => string | undefined;
|
7
8
|
export declare const setViewMode: (view: View, mode: ViewVisionMode) => void;
|
8
9
|
export declare const emitError: (error: Error) => void;
|
9
10
|
export declare const addEmitterOnceListener: (event: any, listener: any) => void;
|
10
11
|
export declare const notifyMainViewModeChange: import("lodash").DebouncedFunc<(callbacks: Emittery<PublicEvent>, mode: ViewVisionMode) => void>;
|
11
|
-
export declare const makeValidScenePath: (displayer: Displayer, scenePath: string) => string;
|
12
|
+
export declare const makeValidScenePath: (displayer: Displayer, scenePath: string, index?: number) => string | undefined;
|
13
|
+
export declare const entireScenes: (displayer: Displayer) => import("white-web-sdk").SceneMap;
|
12
14
|
export declare const isValidScenePath: (scenePath: string) => boolean;
|
13
15
|
export declare const ensureValidScenePath: (scenePath: string) => string;
|
14
16
|
export declare const getVersionNumber: (version: string) => number;
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,9 +1,8 @@
|
|
1
|
-
import { Base } from "
|
1
|
+
import { Base } from "../Base";
|
2
2
|
import type { Camera, Size, View } from "white-web-sdk";
|
3
|
-
import type { AppManager } from "
|
3
|
+
import type { AppManager } from "../AppManager";
|
4
4
|
export declare class MainViewProxy extends Base {
|
5
5
|
private scale?;
|
6
|
-
private cameraStore;
|
7
6
|
private started;
|
8
7
|
private mainViewIsAddListener;
|
9
8
|
private mainView;
|
@@ -35,7 +34,6 @@ export declare class MainViewProxy extends Base {
|
|
35
34
|
private addCameraListener;
|
36
35
|
private removeCameraListener;
|
37
36
|
private onCameraOrSizeUpdated;
|
38
|
-
switchViewModeToWriter(): void;
|
39
37
|
moveCameraToContian(size: Size): void;
|
40
38
|
moveCamera(camera: Camera): void;
|
41
39
|
stop(): void;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { View, Displayer } from "white-web-sdk";
|
2
|
+
export declare class ViewManager {
|
3
|
+
private displayer;
|
4
|
+
views: Map<string, View>;
|
5
|
+
constructor(displayer: Displayer);
|
6
|
+
createView(id: string): View;
|
7
|
+
getView(id: string): View | undefined;
|
8
|
+
destroyView(id: string): void;
|
9
|
+
setViewScenePath(id: string, scenePath: string): void;
|
10
|
+
destroy(): void;
|
11
|
+
}
|
12
|
+
export declare const createView: (displayer: Displayer) => View;
|
13
|
+
export declare const setDefaultCameraBound: (view: View) => void;
|
@@ -35,9 +35,4 @@ export declare const REQUIRE_VERSION = "2.13.16";
|
|
35
35
|
export declare const MIN_WIDTH: number;
|
36
36
|
export declare const MIN_HEIGHT: number;
|
37
37
|
export declare const SET_SCENEPATH_DELAY = 100;
|
38
|
-
export declare const DEFAULT_COLLECTOR_STYLE: {
|
39
|
-
right: string;
|
40
|
-
bottom: string;
|
41
|
-
position: string;
|
42
|
-
};
|
43
38
|
export declare const DEFAULT_CONTAINER_RATIO: number;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import Emittery from "emittery";
|
2
2
|
import { AppManager } from "./AppManager";
|
3
3
|
import { CursorManager } from "./Cursor";
|
4
|
+
import { ReconnectRefresher } from "./ReconnectRefresher";
|
4
5
|
import "./style.css";
|
5
6
|
import "@netless/telebox-insider/dist/style.css";
|
6
|
-
import "@netless/app-docs-viewer/dist/style.css";
|
7
7
|
import type { TELE_BOX_STATE } from "./BoxManager";
|
8
8
|
import type { Apps } from "./AttributesDelegate";
|
9
9
|
import { InvisiblePlugin, ViewMode } from "white-web-sdk";
|
@@ -12,7 +12,6 @@ import type { AppListeners } from "./AppListener";
|
|
12
12
|
import type { NetlessApp, RegisterParams } from "./typings";
|
13
13
|
import type { TeleBoxColorScheme, TeleBoxState } from "@netless/telebox-insider";
|
14
14
|
import type { AppProxy } from "./AppProxy";
|
15
|
-
import { ReconnectRefresher } from "./ReconnectRefresher";
|
16
15
|
export declare type WindowMangerAttributes = {
|
17
16
|
modelValue?: string;
|
18
17
|
boxState: TELE_BOX_STATE;
|
@@ -141,6 +140,7 @@ export declare class WindowManager extends InvisiblePlugin<WindowMangerAttribute
|
|
141
140
|
isReplay: boolean;
|
142
141
|
private boxManager?;
|
143
142
|
private static params?;
|
143
|
+
private containerResizeObserver?;
|
144
144
|
constructor(context: InvisiblePluginContext);
|
145
145
|
static mount(params: MountParams): Promise<WindowManager>;
|
146
146
|
private static initManager;
|
@@ -227,13 +227,6 @@ export declare class WindowManager extends InvisiblePlugin<WindowMangerAttribute
|
|
227
227
|
private isDynamicPPT;
|
228
228
|
private static checkVersion;
|
229
229
|
private ensureAttributes;
|
230
|
-
private containerResizeObserver?;
|
231
|
-
private observePlaygroundSize;
|
232
|
-
private updateSizer;
|
233
230
|
}
|
234
|
-
export declare const BuiltinApps: {
|
235
|
-
DocsViewer: string;
|
236
|
-
MediaPlayer: string;
|
237
|
-
};
|
238
231
|
export * from "./typings";
|
239
|
-
export {
|
232
|
+
export { BuiltinApps } from "./BuiltinApps";
|
@@ -70,3 +70,4 @@ export declare type AppListenerKeys = keyof AppEmitterEvent;
|
|
70
70
|
export type { AppContext } from "./AppContext";
|
71
71
|
export type { ReadonlyTeleBox, TeleBoxRect };
|
72
72
|
export type { SceneState, SceneDefinition, View, AnimationMode, Displayer, Room, Player };
|
73
|
+
export type { Storage, StorageStateChangedEvent, StorageStateChangedListener } from "./App/Storage";
|
package/dist/style.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.netless-window-manager-playground{width:100%;height:100%;position:relative;z-index:1;overflow:hidden;user-select:none}.netless-window-manager-sizer{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;overflow:hidden;display:flex}.netless-window-manager-sizer-horizontal{flex-direction:column}.netless-window-manager-sizer:before,.netless-window-manager-sizer:after{flex:1;content:"";display:block}.netless-window-manager-chess-sizer:before,.netless-window-manager-chess-sizer:after{background-image:linear-gradient(45deg,#b0b0b0 25%,transparent 25%),linear-gradient(-45deg,#b0b0b0 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#b0b0b0 75%),linear-gradient(-45deg,transparent 75%,#b0b0b0 75%);background-color:#fff;background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0px}.netless-window-manager-wrapper{position:relative;z-index:1;width:100%;height:100%;overflow:hidden}.netless-window-manager-main-view{width:100%;height:100%}.netless-window-manager-cursor-pencil-image{width:26px;height:26px}.netless-window-manager-cursor-eraser-image{width:26px;height:26px}.netless-window-manager-cursor-selector-image{width:24px;height:24px}.netless-window-manager-cursor-selector-avatar{border-radius:50%;border-style:solid;border-width:2px;border-color:#fff;margin-bottom:2px}.netless-window-manager-cursor-selector-avatar img{width:12px}.netless-window-manager-cursor-inner{border-radius:4px;display:flex;align-items:center;justify-content:center;flex-direction:row;padding-left:4px;padding-right:4px;font-size:12px}.netless-window-manager-cursor-inner-mellow{height:32px;border-radius:16px;display:flex;align-items:center;justify-content:center;flex-direction:row;padding-left:16px;padding-right:16px}.netless-window-manager-cursor-tag-name{font-size:12px;margin-left:4px;padding:2px 8px;border-radius:4px}.netless-window-manager-cursor-mid{display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:26px;height:26px;z-index:2147483647;left:0;top:0;will-change:transform;transition:transform .05s;transform-origin:0 0;user-select:none}.netless-window-manager-cursor-pencil-offset{margin-left:-20px}.netless-window-manager-cursor-selector-offset{margin-left:-22px;margin-top:56px}.netless-window-manager-cursor-text-offset{margin-left:-30px;margin-top:18px}.netless-window-manager-cursor-shape-offset{display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:180px;height:64px;margin-left:-30px;margin-top:12px}.netless-window-manager-cursor-name{width:100%;height:48px;display:flex;align-items:center;justify-content:center;position:absolute;top:-40px}.cursor-image-wrapper{display:flex;justify-content:center}.tele-fancy-scrollbar{overscroll-behavior:contain;overflow:auto;overflow-y:scroll;overflow-y:overlay;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;scrollbar-width:auto}.tele-fancy-scrollbar::-webkit-scrollbar{height:8px;width:8px}.tele-fancy-scrollbar::-webkit-scrollbar-track{background-color:transparent}.tele-fancy-scrollbar::-webkit-scrollbar-thumb{background-color:#444e601a;background-color:transparent;border-radius:4px;transition:background-color .4s}.tele-fancy-scrollbar:hover::-webkit-scrollbar-thumb{background-color:#444e601a}.tele-fancy-scrollbar::-webkit-scrollbar-thumb:hover{background-color:#444e6033}.tele-fancy-scrollbar::-webkit-scrollbar-thumb:active{background-color:#444e6033}.tele-fancy-scrollbar::-webkit-scrollbar-thumb:vertical{min-height:50px}.tele-fancy-scrollbar::-webkit-scrollbar-thumb:horizontal{min-width:50px}.telebox-box{position:absolute;top:0;left:0;z-index:100;will-change:transform;transition:width .4s cubic-bezier(.4,.9,.71,1.02),height .4s cubic-bezier(.55,.82,.63,.95),opacity .6s cubic-bezier(.7,0,.84,0),transform .4s ease}.telebox-box-main{position:relative;width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;background:#f9f9fc;box-shadow:0 4px 10px #2f419226;border-radius:6px;border:1px solid #e3e3ec}.telebox-titlebar-wrap{flex-shrink:0;position:relative;z-index:1}.telebox-content-wrap{flex:1;width:100%;overflow:hidden;display:flex;justify-content:center;align-items:center}.telebox-content{width:100%;height:100%;position:relative}.telebox-footer-wrap{flex-shrink:0;display:flex;flex-direction:column}.telebox-footer-wrap:before{content:"";display:block;flex:1}.telebox-resize-handle{position:absolute;z-index:2147483647}.telebox-n{width:100%;height:5px;left:0;top:-5px;cursor:n-resize}.telebox-s{width:100%;height:5px;left:0;bottom:-5px;cursor:s-resize}.telebox-w{width:5px;height:100%;left:-5px;top:0;cursor:w-resize}.telebox-e{width:5px;height:100%;right:-5px;top:0;cursor:e-resize}.telebox-nw{width:15px;height:15px;top:-5px;left:-5px;cursor:nw-resize}.telebox-ne{width:15px;height:15px;top:-5px;right:-5px;cursor:ne-resize}.telebox-se{width:15px;height:15px;bottom:-5px;right:-5px;cursor:se-resize}.telebox-sw{width:15px;height:15px;bottom:-5px;left:-5px;cursor:sw-resize}.telebox-track-mask{position:fixed;top:0;left:0;z-index:2147483647;width:100%;height:100%;background:rgba(0,0,0,.0001);cursor:move}.telebox-cursor-n{cursor:n-resize}.telebox-cursor-s{cursor:s-resize}.telebox-cursor-w{cursor:w-resize}.telebox-cursor-e{cursor:e-resize}.telebox-cursor-nw{cursor:nw-resize}.telebox-cursor-ne{cursor:ne-resize}.telebox-cursor-se{cursor:se-resize}.telebox-cursor-sw{cursor:sw-resize}.telebox-maximized .telebox-resize-handles,.telebox-no-resize .telebox-resize-handles{display:none}.telebox-maximized{box-shadow:none;transition:none}.telebox-minimized{will-change:transform;transition:width 50ms cubic-bezier(.4,.9,.71,1.02),height 50ms cubic-bezier(.55,.82,.63,.95),opacity .6s cubic-bezier(.7,0,.84,0),transform .6s ease;opacity:0;pointer-events:none;user-select:none}.telebox-transforming{will-change:transform;transition:opacity .6s cubic-bezier(.7,0,.84,0)}.telebox-readonly .telebox-resize-handle{cursor:initial!important;pointer-events:none!important}.telebox-color-scheme-dark .telebox-box-main{color:#e9e9e9;background:#212126;border-color:#43434d}.telebox-titlebar{box-sizing:border-box;height:26px;display:flex;align-items:center;padding:0 16px;background:#fff;user-select:none;border-bottom:1px solid #eeeef7}.telebox-title{overflow:hidden;margin:0 24px 0 0;padding:0;font-size:14px;font-weight:400;font-family:PingFangSC-Regular,PingFang SC;white-space:nowrap;word-break:keep-all;text-overflow:ellipsis;color:#191919}.telebox-titlebar-btns{white-space:nowrap;word-break:keep-all;margin-left:auto;font-size:0}.telebox-titlebar-btn{width:22px;height:22px;padding:0;outline:0;border:none;background:0 0;cursor:pointer}.telebox-titlebar-btn~.telebox-titlebar-btn{margin-left:10px}.telebox-titlebar-btn-icon{width:22px;height:22px}.telebox-readonly .telebox-titlebar-btn{cursor:not-allowed}.telebox-titlebar-icon-minimize{background:center/cover no-repeat url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjh2MjhIMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj4KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjYSIgLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPHBhdGggZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNOSAxM2gxMHYxLjZIOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=)}.telebox-titlebar-icon-maximize{background:center/cover no-repeat url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjh2MjhIMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj4KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjYSIgLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPGcgZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIj4KICAgICAgICAgICAgPHBhdGgKICAgICAgICAgICAgICAgIGQ9Ik0yMC40ODEgMTcuMWgxLjJ2NC41ODFIMTcuMXYtMS4yaDMuMzgxVjE3LjF6bS0xNC4xOTA1LS4wMDloMS4ydjMuMzgxaDMuMzgwOXYxLjJoLTQuNTgxdi00LjU4MXpNMTcuMSA2LjE5MDVoNC41ODF2NC41ODA5aC0xLjJ2LTMuMzgxSDE3LjF2LTEuMnptLTEwLjcwMDguMTA4N2g0Ljc5ODV2MS4ySDcuNTk5MnYzLjU5ODVoLTEuMlY2LjI5OTJ6IiAvPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+Cg==)}.telebox-titlebar-icon-maximize.is-active{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjZ2MjZIMHoiIC8+CiAgICAgICAgPHBhdGggaWQ9ImMiIGQ9Ik0yNi44NjkgMEwyOCAxLjEzMVYyNi44N0wyNi44NjkgMjhIMS4xM0wwIDI2Ljg3VjEuMTMxTDEuMTMgMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMSkiPgogICAgICAgICAgICA8bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+CiAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNhIiAvPgogICAgICAgICAgICA8L21hc2s+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9Im5vbmUiIGQ9Ik0tNC42NDI5LTQuNjQyOWgzNS4yODU4djM1LjI4NThILTQuNjQyOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICAgICAgPC9nPgogICAgICAgIDxnPgogICAgICAgICAgICA8bWFzayBpZD0iZCIgZmlsbD0iI2ZmZiI+CiAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNjIiAvPgogICAgICAgICAgICA8L21hc2s+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9Im5vbmUiIGQ9Ik0tMTcuNTE2OCAxNEwxNC0xNy41MTY4IDQ1LjUxNjggMTQgMTQgNDUuNTE2OHoiIG1hc2s9InVybCgjZCkiIC8+CiAgICAgICAgPC9nPgogICAgICAgIDxwYXRoIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjIiCiAgICAgICAgICAgIGQ9Ik0xMC4wODg2IDIxLjQ4NjV2LTMuNjk2Nkg2LjM5Mk0yMS4zODU1IDEwLjE4OTVoLTMuNjk2NlY2LjQ5M00yMS40MDIgMTcuNzk4M2gtMy42OTY2djMuNjk2Nk0xMC4yNTAzIDYuMTQ5OHYzLjg5ODVINi4zNTE3IiAvPgogICAgPC9nPgo8L3N2Zz4K)}.telebox-titlebar-icon-close{background:center/cover no-repeat url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyOCAyOCI+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjQiPgogICAgICAgIDxwYXRoIGQ9Ik04LjM1MyAyMC4zMzIxTDIwLjMzMiA4LjM1M00yMC4zMzIyIDIwLjMzMjFMOC4zNTMgOC4zNTMiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=)}.telebox-color-scheme-dark .telebox-titlebar{color:#e9e9e9;background:#43434d;border-bottom:none}.telebox-collector{visibility:hidden;display:block;position:absolute;z-index:200;width:40px;height:40px;margin:0;padding:0;border:none;outline:0;font-size:0;border-radius:50%;background:#fff;box-shadow:0 2px 6px #2f419226;cursor:pointer;user-select:none;pointer-events:none;background-repeat:no-repeat;background-size:18px 16px;background-position:center}.telebox-collector-visible{visibility:visible;pointer-events:initial}.telebox-collector-readonly{cursor:not-allowed}.telebox-color-scheme-dark.telebox-collector{background-color:#43434d}.telebox-max-titlebar{display:none;position:absolute;top:0;left:0;z-index:50000;user-select:none}.telebox-max-titlebar-maximized{display:flex}.telebox-titles{flex:1;height:100%;margin:0 16px 0 -16px;overflow-y:hidden;overflow-x:scroll;overflow-x:overlay;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;scrollbar-width:auto}.telebox-titles::-webkit-scrollbar{height:8px;width:8px}.telebox-titles::-webkit-scrollbar-track{background-color:transparent}.telebox-titles::-webkit-scrollbar-thumb{background-color:#eeeef7cc;background-color:transparent;border-radius:4px;transition:background-color .4s}.telebox-titles:hover::-webkit-scrollbar-thumb{background-color:#eeeef7cc}.telebox-titles::-webkit-scrollbar-thumb:hover{background-color:#eeeef7}.telebox-titles::-webkit-scrollbar-thumb:active{background-color:#eeeef7}.telebox-titles::-webkit-scrollbar-thumb:vertical{min-height:50px}.telebox-titles::-webkit-scrollbar-thumb:horizontal{min-width:50px}.telebox-titles-content{height:100%;display:flex;flex-wrap:nowrap;align-items:center;padding:0}.telebox-titles-tab{overflow:hidden;max-width:182px;min-width:50px;padding:0 26px 0 16px;outline:0;font-size:13px;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all;border:none;border-right:1px solid #e5e5f0;color:#7b88a0;background:0 0;cursor:pointer}.telebox-titles-tab~.telebox-titles-tab{margin-left:2px}.telebox-titles-tab-focus{color:#357bf6}.telebox-readonly .telebox-titles-tab{cursor:not-allowed}.telebox-color-scheme-dark{color-scheme:dark}.telebox-color-scheme-dark.telebox-titlebar{color:#e9e9e9;background:#43434d;border-bottom:none}.telebox-color-scheme-dark .telebox-titles-tab{border-right-color:#7b88a0}.telebox-color-scheme-dark .telebox-title{color:#e9e9e9}.page-renderer-pages-container{position:relative;overflow:hidden}.page-renderer-page{position:absolute;top:0;left:0;will-change:transform;background-position:center;background-size:cover;background-repeat:no-repeat}.page-renderer-page-img{display:block;width:100%;height:auto;user-select:none}.netless-app-docs-viewer-static-scrollbar{position:absolute;top:0;right:0;z-index:2147483647;width:8px;min-height:30px;margin:0;padding:0;border:none;outline:none;border-radius:4px;background:rgba(68,78,96,.4);box-shadow:1px 1px 8px #ffffffb3;opacity:0;transition:background .4s,opacity .4s 3s,transform .2s;will-change:transform,height;user-select:none}.netless-app-docs-viewer-static-scrollbar.netless-app-docs-viewer-static-scrollbar-dragging{background:rgba(68,78,96,.6);opacity:1;transition:background .4s,opacity .4s 3s!important}.netless-app-docs-viewer-static-scrollbar:hover,.netless-app-docs-viewer-static-scrollbar:focus{background:rgba(68,78,96,.5)}.netless-app-docs-viewer-static-scrollbar:active{background:rgba(68,78,96,.6)}.netless-app-docs-viewer-content:hover .netless-app-docs-viewer-static-scrollbar{opacity:1;transition:background .4s,opacity .4s,transform .2s}.netless-app-docs-viewer-readonly .netless-app-docs-viewer-static-scrollbar{display:none}.netless-app-docs-viewer-static-pages:hover .netless-app-docs-viewer-static-scrollbar{opacity:1;transition:background .4s,opacity .4s,transform .2s}
|
1
|
+
.page-renderer-pages-container{position:relative;overflow:hidden}.page-renderer-page{position:absolute;top:0;left:0;will-change:transform;background-position:center;background-size:cover;background-repeat:no-repeat}.page-renderer-page-img{display:block;width:100%;height:auto;user-select:none}.netless-app-docs-viewer-static-scrollbar{position:absolute;top:0;right:0;z-index:2147483647;width:8px;min-height:30px;margin:0;padding:0;border:none;outline:none;border-radius:4px;background:rgba(68,78,96,.4);box-shadow:1px 1px 8px #ffffffb3;opacity:0;transition:background .4s,opacity .4s 3s,transform .2s;will-change:transform,height;user-select:none}.netless-app-docs-viewer-static-scrollbar.netless-app-docs-viewer-static-scrollbar-dragging{background:rgba(68,78,96,.6);opacity:1;transition:background .4s,opacity .4s 3s!important}.netless-app-docs-viewer-static-scrollbar:hover,.netless-app-docs-viewer-static-scrollbar:focus{background:rgba(68,78,96,.5)}.netless-app-docs-viewer-static-scrollbar:active{background:rgba(68,78,96,.6)}.netless-app-docs-viewer-content:hover .netless-app-docs-viewer-static-scrollbar{opacity:1;transition:background .4s,opacity .4s,transform .2s}.netless-app-docs-viewer-readonly .netless-app-docs-viewer-static-scrollbar{display:none}.netless-app-docs-viewer-static-pages:hover .netless-app-docs-viewer-static-scrollbar{opacity:1;transition:background .4s,opacity .4s,transform .2s}.netless-window-manager-playground{width:100%;height:100%;position:relative;z-index:1;overflow:hidden;user-select:none}.netless-window-manager-sizer{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;overflow:hidden;display:flex}.netless-window-manager-sizer-horizontal{flex-direction:column}.netless-window-manager-sizer:before,.netless-window-manager-sizer:after{flex:1;content:"";display:block}.netless-window-manager-chess-sizer:before,.netless-window-manager-chess-sizer:after{background-image:linear-gradient(45deg,#b0b0b0 25%,transparent 25%),linear-gradient(-45deg,#b0b0b0 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#b0b0b0 75%),linear-gradient(-45deg,transparent 75%,#b0b0b0 75%);background-color:#fff;background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0px}.netless-window-manager-wrapper{position:relative;z-index:1;width:100%;height:100%;overflow:hidden}.netless-window-manager-main-view{width:100%;height:100%}.netless-window-manager-cursor-pencil-image{width:26px;height:26px}.netless-window-manager-cursor-eraser-image{width:26px;height:26px}.netless-window-manager-cursor-selector-image{width:24px;height:24px}.netless-window-manager-cursor-selector-avatar{border-radius:50%;border-style:solid;border-width:2px;border-color:#fff;margin-bottom:2px}.netless-window-manager-cursor-selector-avatar img{width:12px}.netless-window-manager-cursor-inner{border-radius:4px;display:flex;align-items:center;justify-content:center;flex-direction:row;padding-left:4px;padding-right:4px;font-size:12px}.netless-window-manager-cursor-inner-mellow{height:32px;border-radius:16px;display:flex;align-items:center;justify-content:center;flex-direction:row;padding-left:16px;padding-right:16px}.netless-window-manager-cursor-tag-name{font-size:12px;margin-left:4px;padding:2px 8px;border-radius:4px}.netless-window-manager-cursor-mid{display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:26px;height:26px;z-index:2147483647;left:0;top:0;will-change:transform;transition:transform .05s;transform-origin:0 0;user-select:none}.netless-window-manager-cursor-pencil-offset{margin-left:-20px}.netless-window-manager-cursor-selector-offset{margin-left:-22px;margin-top:56px}.netless-window-manager-cursor-text-offset{margin-left:-30px;margin-top:18px}.netless-window-manager-cursor-shape-offset{display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:180px;height:64px;margin-left:-30px;margin-top:12px}.netless-window-manager-cursor-name{width:100%;height:48px;display:flex;align-items:center;justify-content:center;position:absolute;top:-40px}.cursor-image-wrapper{display:flex;justify-content:center}.telebox-collector{position:absolute;right:10px;bottom:15px}.tele-fancy-scrollbar{overscroll-behavior:contain;overflow:auto;overflow-y:scroll;overflow-y:overlay;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;scrollbar-width:auto}.tele-fancy-scrollbar::-webkit-scrollbar{height:8px;width:8px}.tele-fancy-scrollbar::-webkit-scrollbar-track{background-color:transparent}.tele-fancy-scrollbar::-webkit-scrollbar-thumb{background-color:#444e601a;background-color:transparent;border-radius:4px;transition:background-color .4s}.tele-fancy-scrollbar:hover::-webkit-scrollbar-thumb{background-color:#444e601a}.tele-fancy-scrollbar::-webkit-scrollbar-thumb:hover{background-color:#444e6033}.tele-fancy-scrollbar::-webkit-scrollbar-thumb:active{background-color:#444e6033}.tele-fancy-scrollbar::-webkit-scrollbar-thumb:vertical{min-height:50px}.tele-fancy-scrollbar::-webkit-scrollbar-thumb:horizontal{min-width:50px}.telebox-box{position:absolute;top:0;left:0;z-index:100;will-change:transform;transition:width .4s cubic-bezier(.4,.9,.71,1.02),height .4s cubic-bezier(.55,.82,.63,.95),opacity .6s cubic-bezier(.7,0,.84,0),transform .4s ease}.telebox-box-main{position:relative;width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;background:#f9f9fc;box-shadow:0 4px 10px #2f419226;border-radius:6px;border:1px solid #e3e3ec}.telebox-titlebar-wrap{flex-shrink:0;position:relative;z-index:1}.telebox-content-wrap{flex:1;width:100%;overflow:hidden;display:flex;justify-content:center;align-items:center}.telebox-content{width:100%;height:100%;position:relative}.telebox-footer-wrap{flex-shrink:0;display:flex;flex-direction:column}.telebox-footer-wrap:before{content:"";display:block;flex:1}.telebox-resize-handle{position:absolute;z-index:2147483647}.telebox-n{width:100%;height:5px;left:0;top:-5px;cursor:n-resize}.telebox-s{width:100%;height:5px;left:0;bottom:-5px;cursor:s-resize}.telebox-w{width:5px;height:100%;left:-5px;top:0;cursor:w-resize}.telebox-e{width:5px;height:100%;right:-5px;top:0;cursor:e-resize}.telebox-nw{width:15px;height:15px;top:-5px;left:-5px;cursor:nw-resize}.telebox-ne{width:15px;height:15px;top:-5px;right:-5px;cursor:ne-resize}.telebox-se{width:15px;height:15px;bottom:-5px;right:-5px;cursor:se-resize}.telebox-sw{width:15px;height:15px;bottom:-5px;left:-5px;cursor:sw-resize}.telebox-track-mask{position:fixed;top:0;left:0;z-index:2147483647;width:100%;height:100%;background:rgba(0,0,0,.0001);cursor:move}.telebox-cursor-n{cursor:n-resize}.telebox-cursor-s{cursor:s-resize}.telebox-cursor-w{cursor:w-resize}.telebox-cursor-e{cursor:e-resize}.telebox-cursor-nw{cursor:nw-resize}.telebox-cursor-ne{cursor:ne-resize}.telebox-cursor-se{cursor:se-resize}.telebox-cursor-sw{cursor:sw-resize}.telebox-maximized .telebox-resize-handles,.telebox-no-resize .telebox-resize-handles{display:none}.telebox-maximized{box-shadow:none;transition:none}.telebox-minimized{will-change:transform;transition:width 50ms cubic-bezier(.4,.9,.71,1.02),height 50ms cubic-bezier(.55,.82,.63,.95),opacity .6s cubic-bezier(.7,0,.84,0),transform .6s ease;opacity:0;pointer-events:none;user-select:none}.telebox-transforming{will-change:transform;transition:opacity .6s cubic-bezier(.7,0,.84,0)}.telebox-readonly .telebox-resize-handle{cursor:initial!important;pointer-events:none!important}.telebox-color-scheme-dark .telebox-box-main{color:#e9e9e9;background:#212126;border-color:#43434d}.telebox-titlebar{box-sizing:border-box;height:26px;display:flex;align-items:center;padding:0 16px;background:#fff;user-select:none;border-bottom:1px solid #eeeef7}.telebox-title{overflow:hidden;margin:0 24px 0 0;padding:0;font-size:14px;font-weight:400;font-family:PingFangSC-Regular,PingFang SC;white-space:nowrap;word-break:keep-all;text-overflow:ellipsis;color:#191919}.telebox-titlebar-btns{white-space:nowrap;word-break:keep-all;margin-left:auto;font-size:0}.telebox-titlebar-btn{width:22px;height:22px;padding:0;outline:0;border:none;background:0 0;cursor:pointer}.telebox-titlebar-btn~.telebox-titlebar-btn{margin-left:10px}.telebox-titlebar-btn-icon{width:22px;height:22px}.telebox-readonly .telebox-titlebar-btn{cursor:not-allowed}.telebox-titlebar-icon-minimize{background:center/cover no-repeat url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjh2MjhIMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj4KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjYSIgLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPHBhdGggZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNOSAxM2gxMHYxLjZIOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=)}.telebox-titlebar-icon-maximize{background:center/cover no-repeat url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjh2MjhIMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj4KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjYSIgLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPGcgZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIj4KICAgICAgICAgICAgPHBhdGgKICAgICAgICAgICAgICAgIGQ9Ik0yMC40ODEgMTcuMWgxLjJ2NC41ODFIMTcuMXYtMS4yaDMuMzgxVjE3LjF6bS0xNC4xOTA1LS4wMDloMS4ydjMuMzgxaDMuMzgwOXYxLjJoLTQuNTgxdi00LjU4MXpNMTcuMSA2LjE5MDVoNC41ODF2NC41ODA5aC0xLjJ2LTMuMzgxSDE3LjF2LTEuMnptLTEwLjcwMDguMTA4N2g0Ljc5ODV2MS4ySDcuNTk5MnYzLjU5ODVoLTEuMlY2LjI5OTJ6IiAvPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+Cg==)}.telebox-titlebar-icon-maximize.is-active{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjZ2MjZIMHoiIC8+CiAgICAgICAgPHBhdGggaWQ9ImMiIGQ9Ik0yNi44NjkgMEwyOCAxLjEzMVYyNi44N0wyNi44NjkgMjhIMS4xM0wwIDI2Ljg3VjEuMTMxTDEuMTMgMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMSkiPgogICAgICAgICAgICA8bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+CiAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNhIiAvPgogICAgICAgICAgICA8L21hc2s+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9Im5vbmUiIGQ9Ik0tNC42NDI5LTQuNjQyOWgzNS4yODU4djM1LjI4NThILTQuNjQyOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICAgICAgPC9nPgogICAgICAgIDxnPgogICAgICAgICAgICA8bWFzayBpZD0iZCIgZmlsbD0iI2ZmZiI+CiAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNjIiAvPgogICAgICAgICAgICA8L21hc2s+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9Im5vbmUiIGQ9Ik0tMTcuNTE2OCAxNEwxNC0xNy41MTY4IDQ1LjUxNjggMTQgMTQgNDUuNTE2OHoiIG1hc2s9InVybCgjZCkiIC8+CiAgICAgICAgPC9nPgogICAgICAgIDxwYXRoIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjIiCiAgICAgICAgICAgIGQ9Ik0xMC4wODg2IDIxLjQ4NjV2LTMuNjk2Nkg2LjM5Mk0yMS4zODU1IDEwLjE4OTVoLTMuNjk2NlY2LjQ5M00yMS40MDIgMTcuNzk4M2gtMy42OTY2djMuNjk2Nk0xMC4yNTAzIDYuMTQ5OHYzLjg5ODVINi4zNTE3IiAvPgogICAgPC9nPgo8L3N2Zz4K)}.telebox-titlebar-icon-close{background:center/cover no-repeat url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyOCAyOCI+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjQiPgogICAgICAgIDxwYXRoIGQ9Ik04LjM1MyAyMC4zMzIxTDIwLjMzMiA4LjM1M00yMC4zMzIyIDIwLjMzMjFMOC4zNTMgOC4zNTMiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=)}.telebox-color-scheme-dark .telebox-titlebar{color:#e9e9e9;background:#43434d;border-bottom:none}.telebox-collector{visibility:hidden;display:block;position:absolute;z-index:200;width:40px;height:40px;margin:0;padding:0;border:none;outline:0;font-size:0;border-radius:50%;background:#fff;box-shadow:0 2px 6px #2f419226;cursor:pointer;user-select:none;pointer-events:none;background-repeat:no-repeat;background-size:18px 16px;background-position:center}.telebox-collector-visible{visibility:visible;pointer-events:initial}.telebox-collector-readonly{cursor:not-allowed}.telebox-color-scheme-dark.telebox-collector{background-color:#43434d}.telebox-max-titlebar{display:none;position:absolute;top:0;left:0;z-index:50000;user-select:none}.telebox-max-titlebar-maximized{display:flex}.telebox-titles{flex:1;height:100%;margin:0 16px 0 -16px;overflow-y:hidden;overflow-x:scroll;overflow-x:overlay;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;scrollbar-width:auto}.telebox-titles::-webkit-scrollbar{height:8px;width:8px}.telebox-titles::-webkit-scrollbar-track{background-color:transparent}.telebox-titles::-webkit-scrollbar-thumb{background-color:#eeeef7cc;background-color:transparent;border-radius:4px;transition:background-color .4s}.telebox-titles:hover::-webkit-scrollbar-thumb{background-color:#eeeef7cc}.telebox-titles::-webkit-scrollbar-thumb:hover{background-color:#eeeef7}.telebox-titles::-webkit-scrollbar-thumb:active{background-color:#eeeef7}.telebox-titles::-webkit-scrollbar-thumb:vertical{min-height:50px}.telebox-titles::-webkit-scrollbar-thumb:horizontal{min-width:50px}.telebox-titles-content{height:100%;display:flex;flex-wrap:nowrap;align-items:center;padding:0}.telebox-titles-tab{overflow:hidden;max-width:182px;min-width:50px;padding:0 26px 0 16px;outline:0;font-size:13px;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all;border:none;border-right:1px solid #e5e5f0;color:#7b88a0;background:0 0;cursor:pointer}.telebox-titles-tab~.telebox-titles-tab{margin-left:2px}.telebox-titles-tab-focus{color:#357bf6}.telebox-readonly .telebox-titles-tab{cursor:not-allowed}.telebox-color-scheme-dark{color-scheme:dark}.telebox-color-scheme-dark.telebox-titlebar{color:#e9e9e9;background:#43434d;border-bottom:none}.telebox-color-scheme-dark .telebox-titles-tab{border-right-color:#7b88a0}.telebox-color-scheme-dark .telebox-title{color:#e9e9e9}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@netless/window-manager",
|
3
|
-
"version": "0.4.0-canary.
|
3
|
+
"version": "0.4.0-canary.7",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/index.es.js",
|
6
6
|
"module": "dist/index.es.js",
|
@@ -24,7 +24,7 @@
|
|
24
24
|
"@juggle/resize-observer": "^3.3.1",
|
25
25
|
"@netless/app-docs-viewer": "0.2.0",
|
26
26
|
"@netless/app-media-player": "0.1.0-beta.5",
|
27
|
-
"@netless/telebox-insider": "0.2.
|
27
|
+
"@netless/telebox-insider": "0.2.18",
|
28
28
|
"emittery": "^0.9.2",
|
29
29
|
"lodash": "^4.17.21",
|
30
30
|
"p-retry": "^4.6.1",
|
@@ -57,6 +57,6 @@
|
|
57
57
|
"typescript": "^4.3.5",
|
58
58
|
"video.js": "^7.14.3",
|
59
59
|
"vite": "^2.5.3",
|
60
|
-
"white-web-sdk": "^2.
|
60
|
+
"white-web-sdk": "^2.16.0"
|
61
61
|
}
|
62
62
|
}
|
package/src/App/Storage/index.ts
CHANGED
@@ -4,7 +4,7 @@ import { SideEffectManager } from "side-effect-manager";
|
|
4
4
|
import type { AppContext } from "../../AppContext";
|
5
5
|
import { safeListenPropsUpdated } from "../../Utils/Reactive";
|
6
6
|
import { isRef, makeRef, plainObjectKeys } from "./utils";
|
7
|
-
import type { Diff, MaybeRefValue, RefValue } from "./typings";
|
7
|
+
import type { Diff, MaybeRefValue, RefValue, StorageStateChangedEvent } from "./typings";
|
8
8
|
import { StorageEvent } from "./StorageEvent";
|
9
9
|
|
10
10
|
export * from './typings';
|
@@ -87,7 +87,7 @@ export class Storage<TState = any> implements Storage<TState> {
|
|
87
87
|
return this._state;
|
88
88
|
}
|
89
89
|
|
90
|
-
readonly onStateChanged = new StorageEvent<
|
90
|
+
readonly onStateChanged = new StorageEvent<StorageStateChangedEvent<TState>>();
|
91
91
|
|
92
92
|
ensureState(state: Partial<TState>): void {
|
93
93
|
return this.setState(
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import type { StorageEventListener } from "./StorageEvent";
|
2
|
+
|
1
3
|
export type RefValue<TValue = any> = { k: string; v: TValue; __isRef: true };
|
2
4
|
|
3
5
|
export type ExtractRawValue<TValue> = TValue extends RefValue<infer TRefValue> ? TRefValue : TValue;
|
@@ -13,3 +15,7 @@ export type Diff<T> = { [K in keyof T]?: DiffOne<T[K]> };
|
|
13
15
|
export type StorageOnSetStatePayload<TState = unknown> = {
|
14
16
|
[K in keyof TState]?: MaybeRefValue<TState[K]>;
|
15
17
|
};
|
18
|
+
|
19
|
+
export type StorageStateChangedEvent<TState = any> = Diff<TState>
|
20
|
+
|
21
|
+
export type StorageStateChangedListener<TState = any> = StorageEventListener<StorageStateChangedEvent<TState>>
|
package/src/AppContext.ts
CHANGED
@@ -104,7 +104,6 @@ export class AppContext<TAttrs extends Record<string, any>, AppOptions = any> {
|
|
104
104
|
public async setScenePath(scenePath: string): Promise<void> {
|
105
105
|
if (!this.appProxy.box) return;
|
106
106
|
this.appProxy.setFullPath(scenePath);
|
107
|
-
this.appProxy.context.switchAppToWriter(this.appId);
|
108
107
|
}
|
109
108
|
|
110
109
|
public mountView(dom: HTMLDivElement): void {
|
package/src/AppListener.ts
CHANGED
@@ -34,10 +34,6 @@ export class AppListeners {
|
|
34
34
|
this.appResizeHandler(data.payload);
|
35
35
|
break;
|
36
36
|
}
|
37
|
-
case Events.SwitchViewsToFreedom: {
|
38
|
-
this.switchViewsToFreedomHandler();
|
39
|
-
break;
|
40
|
-
}
|
41
37
|
case Events.AppBoxStateChange: {
|
42
38
|
this.boxStateChangeHandler(data.payload);
|
43
39
|
break;
|
@@ -65,10 +61,6 @@ export class AppListeners {
|
|
65
61
|
this.manager.room?.refreshViewSize();
|
66
62
|
};
|
67
63
|
|
68
|
-
private switchViewsToFreedomHandler = () => {
|
69
|
-
this.manager.viewManager.freedomAllViews();
|
70
|
-
};
|
71
|
-
|
72
64
|
private boxStateChangeHandler = (state: TeleBoxState) => {
|
73
65
|
callbacks.emit("boxStateChange", state);
|
74
66
|
}
|
package/src/AppManager.ts
CHANGED
@@ -2,16 +2,15 @@ import pRetry from "p-retry";
|
|
2
2
|
import { AppAttributes, AppStatus, Events, MagixEventName } from "./constants";
|
3
3
|
import { AppListeners } from "./AppListener";
|
4
4
|
import { AppProxy } from "./AppProxy";
|
5
|
-
import { autorun, isPlayer, isRoom, ScenePathType
|
5
|
+
import { autorun, isPlayer, isRoom, ScenePathType } from "white-web-sdk";
|
6
6
|
import { callbacks, emitter, WindowManager, reconnectRefresher } from "./index";
|
7
|
-
import {
|
8
|
-
import { genAppId, makeValidScenePath, setScenePath } from "./Utils/Common";
|
7
|
+
import { genAppId, makeValidScenePath, setScenePath, setViewFocusScenePath } from "./Utils/Common";
|
9
8
|
import { log } from "./Utils/log";
|
10
|
-
import { MainViewProxy } from "./MainView";
|
9
|
+
import { MainViewProxy } from "./View/MainView";
|
11
10
|
import { onObjectRemoved, safeListenPropsUpdated } from "./Utils/Reactive";
|
12
11
|
import { sortBy } from "lodash";
|
13
12
|
import { store } from "./AttributesDelegate";
|
14
|
-
import { ViewManager } from "./ViewManager";
|
13
|
+
import { ViewManager } from "./View/ViewManager";
|
15
14
|
import type { ReconnectRefresher } from "./ReconnectRefresher";
|
16
15
|
import type { BoxManager } from "./BoxManager";
|
17
16
|
import type { Displayer, DisplayerState, Room } from "white-web-sdk";
|
@@ -19,7 +18,6 @@ import type { AddAppParams, BaseInsertParams, TeleBoxRect, EmitterEvent } from "
|
|
19
18
|
|
20
19
|
export class AppManager {
|
21
20
|
public displayer: Displayer;
|
22
|
-
public cameraStore: CameraStore;
|
23
21
|
public viewManager: ViewManager;
|
24
22
|
public appProxies: Map<string, AppProxy> = new Map();
|
25
23
|
public appStatus: Map<string, AppStatus> = new Map();
|
@@ -38,9 +36,8 @@ export class AppManager {
|
|
38
36
|
safeSetAttributes: attributes => this.safeSetAttributes(attributes),
|
39
37
|
safeUpdateAttributes: (keys, val) => this.safeUpdateAttributes(keys, val),
|
40
38
|
});
|
41
|
-
this.cameraStore = new CameraStore();
|
42
39
|
this.mainViewProxy = new MainViewProxy(this);
|
43
|
-
this.viewManager = new ViewManager(this);
|
40
|
+
this.viewManager = new ViewManager(this.displayer);
|
44
41
|
this.appListeners = new AppListeners(this);
|
45
42
|
this.displayer.callbacks.on(this.eventName, this.displayerStateListener);
|
46
43
|
this.appListeners.addListeners();
|
@@ -188,15 +185,18 @@ export class AppManager {
|
|
188
185
|
mainView.disableCameraTransform = disableCameraTransform;
|
189
186
|
mainView.divElement = divElement;
|
190
187
|
if (!mainView.focusScenePath) {
|
191
|
-
this.
|
188
|
+
this.setMainViewFocusPath();
|
192
189
|
}
|
193
|
-
if (this.store.focus === undefined && mainView.mode !== ViewVisionMode.Writable) {
|
194
|
-
this.viewManager.switchMainViewToWriter();
|
195
|
-
}
|
196
|
-
this.mainViewProxy.addMainViewListener();
|
197
190
|
emitter.emit("mainViewMounted");
|
198
191
|
}
|
199
192
|
|
193
|
+
public setMainViewFocusPath() {
|
194
|
+
const scenePath = this.store.getMainViewScenePath();
|
195
|
+
if (scenePath) {
|
196
|
+
setViewFocusScenePath(this.mainView, scenePath);
|
197
|
+
}
|
198
|
+
}
|
199
|
+
|
200
200
|
public async addApp(params: AddAppParams, isDynamicPPT: boolean): Promise<string | undefined> {
|
201
201
|
log("addApp", params);
|
202
202
|
const { appId, needFocus } = await this.beforeAddApp(params, isDynamicPPT);
|
@@ -295,9 +295,6 @@ export class AppManager {
|
|
295
295
|
appProxy.emitAppIsWritableChange();
|
296
296
|
});
|
297
297
|
if (isWritable === true) {
|
298
|
-
if (!this.store.focus) {
|
299
|
-
this.mainViewProxy.switchViewModeToWriter();
|
300
|
-
}
|
301
298
|
this.mainView.disableCameraTransform = false;
|
302
299
|
} else {
|
303
300
|
this.mainView.disableCameraTransform = true;
|
@@ -347,15 +344,16 @@ export class AppManager {
|
|
347
344
|
await this._setMainViewScenePath(scenePath);
|
348
345
|
} else if (scenePathType === ScenePathType.Dir) {
|
349
346
|
const validScenePath = makeValidScenePath(this.displayer, scenePath);
|
350
|
-
|
347
|
+
if (validScenePath) {
|
348
|
+
await this._setMainViewScenePath(validScenePath);
|
349
|
+
}
|
351
350
|
}
|
352
351
|
}
|
353
352
|
}
|
354
353
|
|
355
354
|
private async _setMainViewScenePath(scenePath: string) {
|
356
355
|
this.safeSetAttributes({ _mainScenePath: scenePath });
|
357
|
-
|
358
|
-
setScenePath(this.room, scenePath);
|
356
|
+
this.setMainViewFocusPath();
|
359
357
|
this.store.setMainViewFocusPath(this.mainView);
|
360
358
|
this.dispatchInternalEvent(Events.SetMainViewScenePath, { nextScenePath: scenePath });
|
361
359
|
}
|
@@ -363,12 +361,20 @@ export class AppManager {
|
|
363
361
|
public async setMainViewSceneIndex(index: number) {
|
364
362
|
if (this.room) {
|
365
363
|
this.safeSetAttributes({ _mainSceneIndex: index });
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
364
|
+
const mainViewScenePath = this.store.getMainViewScenePath() as string;
|
365
|
+
if (mainViewScenePath) {
|
366
|
+
const sceneList = mainViewScenePath.split("/");
|
367
|
+
sceneList.pop();
|
368
|
+
let sceneDir = sceneList.join("/");
|
369
|
+
if (sceneDir === "") {
|
370
|
+
sceneDir = "/";
|
371
|
+
}
|
372
|
+
const scenePath = makeValidScenePath(this.displayer, sceneDir, index);
|
373
|
+
if (scenePath) {
|
374
|
+
this.store.setMainViewScenePath(scenePath);
|
375
|
+
this.setMainViewFocusPath();
|
376
|
+
}
|
377
|
+
}
|
372
378
|
}
|
373
379
|
}
|
374
380
|
|