@netless/window-manager 1.0.0-canary.0 → 1.0.0-canary.1

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 CHANGED
@@ -1844,7 +1844,7 @@ class MainViewProxy {
1844
1844
  }
1845
1845
  });
1846
1846
  });
1847
- const rect = (_a = this.manager.boxManager) == null ? void 0 : _a.teleBoxManager.stageRect;
1847
+ const rect = (_a = this.manager.boxManager) == null ? void 0 : _a.stageRect;
1848
1848
  if (rect) {
1849
1849
  this.synchronizer.setRect(rect);
1850
1850
  }
@@ -1933,7 +1933,7 @@ class MainViewProxy {
1933
1933
  }
1934
1934
  getStageSize() {
1935
1935
  var _a;
1936
- const stage = (_a = this.manager.boxManager) == null ? void 0 : _a.teleBoxManager.stageRect;
1936
+ const stage = (_a = this.manager.boxManager) == null ? void 0 : _a.stageRect;
1937
1937
  if (stage) {
1938
1938
  return { width: stage.width, height: stage.height };
1939
1939
  }
@@ -4701,6 +4701,9 @@ class BoxManager {
4701
4701
  get boxSize() {
4702
4702
  return this.teleBoxManager.boxes.length;
4703
4703
  }
4704
+ get stageRect() {
4705
+ return this.teleBoxManager.stageRect;
4706
+ }
4704
4707
  createBox(params) {
4705
4708
  var _a, _b, _c;
4706
4709
  if (!this.teleBoxManager)
@@ -4729,7 +4732,7 @@ class BoxManager {
4729
4732
  setupBoxManager(createTeleBoxManagerConfig) {
4730
4733
  const root = WindowManager.playground;
4731
4734
  const initManagerState = {
4732
- stageRatio: 3 / 4,
4735
+ stageRatio: createTeleBoxManagerConfig == null ? void 0 : createTeleBoxManagerConfig.stageRatio,
4733
4736
  root,
4734
4737
  fence: false,
4735
4738
  prefersColorScheme: createTeleBoxManagerConfig == null ? void 0 : createTeleBoxManagerConfig.prefersColorScheme
@@ -4847,6 +4850,9 @@ class BoxManager {
4847
4850
  setRoot(root) {
4848
4851
  this.teleBoxManager._root$.setValue(root);
4849
4852
  }
4853
+ setCollector(collector) {
4854
+ this.teleBoxManager.collector.set$collector(collector);
4855
+ }
4850
4856
  destroy() {
4851
4857
  this.sideEffectManager.flushAll();
4852
4858
  this.teleBoxManager.destroy();
@@ -15469,7 +15475,7 @@ const reconnectRefresher = new ReconnectRefresher({ emitter });
15469
15475
  const _WindowManager = class extends InvisiblePlugin {
15470
15476
  constructor(context) {
15471
15477
  super(context);
15472
- this.version = "1.0.0-canary.0";
15478
+ this.version = "1.0.0-canary.1";
15473
15479
  this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "1.0.0-alpha.8", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "side-effect-manager": "^1.1.0", "uuid": "^7.0.3", "video.js": ">=7" }, "peerDependencies": { "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "^0.2.9", "@netless/app-media-player": "0.1.0-beta.5", "@rollup/plugin-commonjs": "^20.0.0", "@rollup/plugin-node-resolve": "^13.0.4", "@rollup/plugin-url": "^6.1.0", "@sveltejs/vite-plugin-svelte": "^1.0.0-next.22", "@tsconfig/svelte": "^2.0.1", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.182", "@types/lodash-es": "^4.17.4", "@types/uuid": "^8.3.1", "@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/parser": "^4.30.0", "@vitest/ui": "^0.14.1", "cypress": "^8.7.0", "dotenv": "^10.0.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-svelte3": "^3.2.0", "jsdom": "^19.0.0", "less": "^4.1.1", "prettier": "^2.3.2", "prettier-plugin-svelte": "^2.4.0", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-styles": "^3.14.1", "svelte": "^3.42.4", "typescript": "^4.5.5", "vite": "^2.5.3", "vitest": "^0.14.1", "white-web-sdk": "2.16.10" } };
15474
15480
  this.emitter = callbacks$1;
15475
15481
  this.viewMode = ViewMode.Broadcaster;
@@ -15618,7 +15624,7 @@ const _WindowManager = class extends InvisiblePlugin {
15618
15624
  }
15619
15625
  bindCollectorContainer(container) {
15620
15626
  if (_WindowManager.isCreated && this.boxManager) {
15621
- this.boxManager.teleBoxManager.collector.set$collector(container);
15627
+ this.boxManager.setCollector(container);
15622
15628
  } else {
15623
15629
  if (_WindowManager.params) {
15624
15630
  _WindowManager.params.collectorContainer = container;