@netless/window-manager 1.0.0-canary.56 → 1.0.0-canary.58

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.
@@ -37,6 +37,7 @@ export declare class AppContext<TAttributes extends Record<string, any> = any, T
37
37
  constructor(manager: AppManager, appId: string, appProxy: AppProxy, appOptions?: TAppOptions | (() => TAppOptions) | undefined);
38
38
  get displayer(): import("white-web-sdk").Displayer<import("white-web-sdk").DisplayerCallbacks>;
39
39
  get destroyed(): boolean;
40
+ get attributes(): TAttributes;
40
41
  /** @deprecated Use context.storage.state instead. */
41
42
  getAttributes: () => TAttributes | undefined;
42
43
  getScenes: () => SceneDefinition[] | undefined;
@@ -60,15 +61,12 @@ export declare class AppContext<TAttributes extends Record<string, any> = any, T
60
61
  setScenePath: (scenePath: string) => Promise<void>;
61
62
  /** Get the local App options. */
62
63
  getAppOptions: () => TAppOptions | undefined;
63
- private _storage?;
64
- /** Main Storage for attributes. */
65
- get storage(): Storage<TAttributes>;
66
64
  /**
67
- * Create separated storages for flexible state management.
68
- * @param namespace Namespace for the storage. Storages of the same namespace share the same data.
69
- * @param defaultState Default state for initial storage creation.
70
- * @returns
71
- */
65
+ * Create separated storages for flexible state management.
66
+ * @param namespace Namespace for the storage. Storages of the same namespace share the same data.
67
+ * @param defaultState Default state for initial storage creation.
68
+ * @returns
69
+ */
72
70
  createStorage: <TState extends Record<string, any>>(namespace: string, defaultState?: TState | undefined) => Storage<TState>;
73
71
  /** Dispatch events to other clients (and self). */
74
72
  dispatchMagixEvent: MagixEventDispatcher<TMagixEventPayloads>;
@@ -1,5 +1,6 @@
1
+ import { Val } from "value-enhancer";
1
2
  import type { View } from "white-web-sdk";
2
- import type { Val, ReadonlyVal } from "value-enhancer";
3
+ import type { ReadonlyVal } from "value-enhancer";
3
4
  import type { ICamera, ISize } from "../AttributesDelegate";
4
5
  import type { TeleBoxRect } from "@netless/telebox-insider";
5
6
  import type { ManagerViewMode } from "../typings";
@@ -128,7 +128,6 @@ export declare class WindowManager extends InvisiblePlugin<WindowMangerAttribute
128
128
  emitter: Emittery<PublicEvent>;
129
129
  appManager?: AppManager;
130
130
  cursorManager?: CursorManager;
131
- viewMode: ManagerViewMode;
132
131
  viewMode$: Val<ManagerViewMode, any>;
133
132
  playground$: Val<HTMLElement | undefined, any>;
134
133
  isReplay: boolean;
@@ -215,6 +214,7 @@ export declare class WindowManager extends InvisiblePlugin<WindowMangerAttribute
215
214
  get apps(): Apps | undefined;
216
215
  get boxState(): TeleBoxState | undefined;
217
216
  get darkMode(): boolean;
217
+ get viewMode(): ManagerViewMode;
218
218
  get prefersColorScheme(): TeleBoxColorScheme | undefined;
219
219
  get fullscreen(): TeleBoxFullscreen | undefined;
220
220
  get focused(): string | undefined;
@@ -279,6 +279,10 @@ export declare class WindowManager extends InvisiblePlugin<WindowMangerAttribute
279
279
  setContainerStyle(style: string): void;
280
280
  setStageStyle(style: string): void;
281
281
  setBaseSize(size: Size): void;
282
+ /**
283
+ * 切换 focus 到指定的 app, 并且把这个 app 放到最前面
284
+ */
285
+ focusApp(appId: string): void;
282
286
  createPPTHandler(): {
283
287
  onPageJumpTo: (_pptUUID: string, index: number) => void;
284
288
  onPageToNext: () => void;
@@ -76,7 +76,7 @@ export declare type RegisterParams<AppOptions = any, SetupResult = any, Attribut
76
76
  contentStyles?: string;
77
77
  };
78
78
  export declare type AppListenerKeys = keyof AppEmitterEvent;
79
- export declare type ApplianceIcons = Partial<Record<ApplianceNames, string>>;
79
+ export declare type ApplianceIcons = Partial<Record<`${ApplianceNames}` | string, string>>;
80
80
  export declare type Writeable<T> = {
81
81
  -readonly [P in keyof T]: T[P];
82
82
  };
package/dist/style.css CHANGED
@@ -119,6 +119,20 @@
119
119
  margin-top: 3px;
120
120
  }
121
121
 
122
+ .netless-window-manager-cursor-pencilEraser-image {
123
+ margin-left: -22px;
124
+ margin-top: 3px;
125
+ }
126
+
127
+ .netless-window-manager-laserPointer-pencilEraser-offset {
128
+ margin-left: -18px;
129
+ }
130
+
131
+ .netless-window-manager-pencilEraser-3-offset {
132
+ margin-top: -14px;
133
+ margin-left: -6px;
134
+ }
135
+
122
136
  .netless-window-manager-cursor-name {
123
137
  width: 100%;
124
138
  height: 48px;
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@netless/window-manager",
3
- "version": "1.0.0-canary.56",
3
+ "version": "1.0.0-canary.58",
4
4
  "description": "",
5
- "main": "dist/index.cjs.js",
6
- "module": "dist/index.es.js",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
7
  "types": "dist/src/index.d.ts",
8
8
  "repository": "netless-io/window-manager",
9
9
  "scripts": {
@@ -64,9 +64,9 @@
64
64
  "rollup-plugin-styles": "^3.14.1",
65
65
  "svelte": "^3.42.4",
66
66
  "typescript": "^4.5.5",
67
- "vite": "^2.5.3",
68
- "vite-plugin-dts": "^1.2.1",
69
- "vitest": "^0.18.0",
67
+ "vite": "^3.1.3",
68
+ "vite-plugin-dts": "^1.5.0",
69
+ "vitest": "^0.23.4",
70
70
  "white-web-sdk": "^2.16.35"
71
71
  }
72
72
  }