@netless/window-manager 0.4.1 → 0.4.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/window-manager",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "module": "dist/index.es.js",
@@ -27,12 +27,12 @@
27
27
  "p-retry": "^4.6.1",
28
28
  "side-effect-manager": "^0.1.5",
29
29
  "uuid": "^7.0.3",
30
- "video.js": ">=7"
30
+ "video.js": ">=7",
31
+ "@netless/telebox-insider": "0.2.22"
31
32
  },
32
33
  "devDependencies": {
33
34
  "@netless/app-docs-viewer": "^0.2.6",
34
35
  "@netless/app-media-player": "0.1.0-beta.5",
35
- "@netless/telebox-insider": "0.2.22",
36
36
  "@rollup/plugin-commonjs": "^20.0.0",
37
37
  "@rollup/plugin-node-resolve": "^13.0.4",
38
38
  "@rollup/plugin-url": "^6.1.0",
@@ -201,7 +201,7 @@ export class Storage<TState extends Record<string, any> = any> implements Storag
201
201
  private _getRawState(defaultValue: TState): TState
202
202
  private _getRawState(defaultValue?: TState): TState | undefined {
203
203
  if (this.id === null) {
204
- return get(this._context.getAttributes(), [], defaultValue);
204
+ return this._context.getAttributes() ?? defaultValue;
205
205
  } else {
206
206
  return get(this._context.getAttributes(), [STORAGE_NS, this.id], defaultValue);
207
207
  }
package/src/index.ts CHANGED
@@ -683,7 +683,7 @@ export class WindowManager extends InvisiblePlugin<WindowMangerAttributes> {
683
683
  this.appManager?.dispatchInternalEvent(Events.MoveCamera, camera);
684
684
  setTimeout(() => {
685
685
  this.appManager?.mainViewProxy.setCameraAndSize();
686
- }, 100);
686
+ }, 500);
687
687
  }
688
688
 
689
689
  public moveCameraToContain(
@@ -696,7 +696,7 @@ export class WindowManager extends InvisiblePlugin<WindowMangerAttributes> {
696
696
  this.appManager?.dispatchInternalEvent(Events.MoveCameraToContain, rectangle);
697
697
  setTimeout(() => {
698
698
  this.appManager?.mainViewProxy.setCameraAndSize();
699
- }, 100);
699
+ }, 500);
700
700
  }
701
701
 
702
702
  public convertToPointInWorld(point: Point): Point {
package/vite.config.js CHANGED
@@ -2,7 +2,7 @@ import path from "path";
2
2
  import { defineConfig } from "vite";
3
3
  import { svelte } from "@sveltejs/vite-plugin-svelte";
4
4
  import { dependencies, peerDependencies, version, devDependencies } from "./package.json"
5
-
5
+ import { omit } from "lodash";
6
6
 
7
7
  export default defineConfig(({ mode }) => {
8
8
  const isProd = mode === "production";
@@ -34,7 +34,7 @@ export default defineConfig(({ mode }) => {
34
34
  sourcemap: true,
35
35
  rollupOptions: {
36
36
  external: Object.keys({
37
- ...dependencies,
37
+ ...omit(dependencies, ["@netless/telebox-insider"]),
38
38
  ...peerDependencies,
39
39
  }),
40
40
  },