@netless/window-manager 1.0.0-canary.31 → 1.0.0-canary.32

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.
@@ -203,6 +203,7 @@ export declare class WindowManager extends InvisiblePlugin<WindowMangerAttribute
203
203
  get boxState(): TeleBoxState | undefined;
204
204
  get darkMode(): boolean;
205
205
  get prefersColorScheme(): TeleBoxColorScheme | undefined;
206
+ get fullscreen(): TeleBoxFullscreen | undefined;
206
207
  get focused(): string | undefined;
207
208
  get focusedView(): View | undefined;
208
209
  get mainViewSceneIndex(): number;
@@ -238,6 +239,7 @@ export declare class WindowManager extends InvisiblePlugin<WindowMangerAttribute
238
239
  safeSetAttributes(attributes: any): void;
239
240
  safeUpdateAttributes(keys: string[], value: any): void;
240
241
  setPrefersColorScheme(scheme: TeleBoxColorScheme): void;
242
+ setFullscreen(fullscreen: TeleBoxFullscreen): void;
241
243
  cleanCurrentScene(): void;
242
244
  redo(): number;
243
245
  undo(): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/window-manager",
3
- "version": "1.0.0-canary.31",
3
+ "version": "1.0.0-canary.32",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
@@ -66,7 +66,7 @@ export class ViewSync {
66
66
  this.synchronizer.onRemoteSizeUpdate(size);
67
67
  }
68
68
  }),
69
- this.context.stageRect$.reaction(rect => {
69
+ this.context.stageRect$.subscribe(rect => {
70
70
  if (rect) {
71
71
  this.synchronizer.setRect(rect);
72
72
  }
package/src/index.ts CHANGED
@@ -711,6 +711,14 @@ export class WindowManager extends InvisiblePlugin<WindowMangerAttributes> imple
711
711
  }
712
712
  }
713
713
 
714
+ public get fullscreen(): TeleBoxFullscreen | undefined {
715
+ if (this.appManager) {
716
+ return this.appManager.boxManager?.teleBoxManager.fullscreen;
717
+ } else {
718
+ throw new Errors.AppManagerNotInitError();
719
+ }
720
+ }
721
+
714
722
  public get focused(): string | undefined {
715
723
  return this.attributes.focus;
716
724
  }
@@ -878,6 +886,10 @@ export class WindowManager extends InvisiblePlugin<WindowMangerAttributes> imple
878
886
  this.appManager?.boxManager?.setPrefersColorScheme(scheme);
879
887
  }
880
888
 
889
+ public setFullscreen(fullscreen: TeleBoxFullscreen): void {
890
+ this.appManager?.boxManager?.teleBoxManager.setFullscreen(fullscreen);
891
+ }
892
+
881
893
  public cleanCurrentScene(): void {
882
894
  this.focusedView?.cleanCurrentScene();
883
895
  }