@netless/window-manager 1.0.0-canary.17 → 1.0.0-canary.18

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
@@ -1904,12 +1904,14 @@ class AppProxy {
1904
1904
  var _a, _b;
1905
1905
  const box = (_a = this.boxManager) == null ? void 0 : _a.getBox(this.id);
1906
1906
  if (box) {
1907
- (_b = this.boxManager) == null ? void 0 : _b.resizeBox({
1908
- appId: this.id,
1909
- width: box.intrinsicWidth + 1e-3,
1910
- height: box.intrinsicHeight + 1e-3,
1911
- skipUpdate: true
1912
- });
1907
+ if (!box.minimized) {
1908
+ (_b = this.boxManager) == null ? void 0 : _b.resizeBox({
1909
+ appId: this.id,
1910
+ width: box.intrinsicWidth + 1e-3,
1911
+ height: box.intrinsicHeight + 1e-3,
1912
+ skipUpdate: true
1913
+ });
1914
+ }
1913
1915
  }
1914
1916
  }
1915
1917
  async onSeek(time2) {
@@ -4268,13 +4270,19 @@ class Y$3 {
4268
4270
  const o2 = document.createElement("div");
4269
4271
  o2.className = this.wrapClassName("content-wrap");
4270
4272
  const r2 = document.createElement("div");
4271
- r2.className = this.wrapClassName("content") + " tele-fancy-scrollbar", this.$content = r2, this._sideEffect.add(() => {
4273
+ r2.className = this.wrapClassName("content") + " tele-fancy-scrollbar", this.$content = r2;
4274
+ const h = () => {
4275
+ const e3 = r2.getBoundingClientRect();
4276
+ this._contentRect$.setValue({ x: 0, y: 0, width: e3.width, height: e3.height });
4277
+ };
4278
+ this._sideEffect.add(() => {
4272
4279
  const e3 = new W$3(() => {
4273
- const e4 = r2.getBoundingClientRect();
4274
- this._contentRect$.setValue({ x: 0, y: 0, width: e4.width, height: e4.height });
4280
+ this.minimized || h();
4275
4281
  });
4276
4282
  return e3.observe(r2), () => e3.disconnect();
4277
- }), this._sideEffect.add(() => {
4283
+ }), this._sideEffect.addDisposer(this._minimized$.reaction((e3) => {
4284
+ e3 || this._sideEffect.setTimeout(h, 400, "minimized-content-rect-fix");
4285
+ })), this._sideEffect.add(() => {
4278
4286
  let e3;
4279
4287
  return this._$userStyles$.subscribe((t3) => {
4280
4288
  e3 && e3.remove(), e3 = t3, t3 && o2.appendChild(t3);
@@ -4300,13 +4308,13 @@ class Y$3 {
4300
4308
  ((i3 = this.$stage) == null ? void 0 : i3.parentElement) && this.$stage.remove();
4301
4309
  });
4302
4310
  }), o2.appendChild(r2);
4303
- const h = document.createElement("div");
4304
- return h.className = this.wrapClassName("footer-wrap"), this.$footer = h, this._sideEffect.add(() => {
4311
+ const c = document.createElement("div");
4312
+ return c.className = this.wrapClassName("footer-wrap"), this.$footer = c, this._sideEffect.add(() => {
4305
4313
  let e3;
4306
4314
  return this._$userFooter$.subscribe((t3) => {
4307
- e3 && e3.remove(), e3 = t3, t3 && h.appendChild(t3);
4315
+ e3 && e3.remove(), e3 = t3, t3 && c.appendChild(t3);
4308
4316
  });
4309
- }), a2.appendChild(n2), a2.appendChild(o2), a2.appendChild(h), this._renderResizeHandlers(), this.$box;
4317
+ }), a2.appendChild(n2), a2.appendChild(o2), a2.appendChild(c), this._renderResizeHandlers(), this.$box;
4310
4318
  }
4311
4319
  _renderResizeHandlers() {
4312
4320
  const e2 = document.createElement("div");
@@ -15611,15 +15619,15 @@ const reconnectRefresher = new ReconnectRefresher({ emitter });
15611
15619
  const _WindowManager = class extends InvisiblePlugin {
15612
15620
  constructor(context) {
15613
15621
  super(context);
15614
- this.version = "1.0.0-canary.17";
15615
- this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "1.0.0-alpha.17", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "side-effect-manager": "^1.1.0", "uuid": "^7.0.3", "value-enhancer": "^1.3.0", "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" } };
15622
+ this.version = "1.0.0-canary.18";
15623
+ this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "1.0.0-alpha.18", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "side-effect-manager": "^1.1.0", "uuid": "^7.0.3", "value-enhancer": "^1.3.0", "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" } };
15616
15624
  this.emitter = callbacks$1;
15617
15625
  this.viewMode = ViewMode.Broadcaster;
15618
15626
  this.viewMode$ = new Val(ViewMode.Broadcaster);
15619
15627
  this.isReplay = isPlayer(this.displayer);
15620
15628
  this.containerSizeRatio = _WindowManager.containerSizeRatio;
15621
15629
  _WindowManager.displayer = context.displayer;
15622
- window.NETLESS_DEPS = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "1.0.0-alpha.17", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "side-effect-manager": "^1.1.0", "uuid": "^7.0.3", "value-enhancer": "^1.3.0", "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" } };
15630
+ window.NETLESS_DEPS = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "1.0.0-alpha.18", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "side-effect-manager": "^1.1.0", "uuid": "^7.0.3", "value-enhancer": "^1.3.0", "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" } };
15623
15631
  }
15624
15632
  static async mount(params) {
15625
15633
  var _a;