@netless/window-manager 1.0.0-canary.26 → 1.0.0-canary.27

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.
Files changed (73) hide show
  1. package/dist/App/WhiteboardView.d.ts +3 -1
  2. package/dist/BoxManager.d.ts +2 -4
  3. package/dist/BuiltinApps.d.ts +3 -0
  4. package/dist/Helper.d.ts +1 -1
  5. package/dist/callback.d.ts +5 -0
  6. package/dist/index.cjs.js +82 -12
  7. package/dist/index.d.ts +5 -1
  8. package/dist/index.es.js +1531 -657
  9. package/dist/index.umd.js +82 -12
  10. package/dist/src/App/AppContext.d.ts +78 -0
  11. package/dist/src/App/AppPageStateImpl.d.ts +21 -0
  12. package/dist/src/App/AppProxy.d.ts +98 -0
  13. package/dist/src/App/MagixEvent/index.d.ts +29 -0
  14. package/dist/src/App/Storage/StorageEvent.d.ts +8 -0
  15. package/dist/src/App/Storage/index.d.ts +39 -0
  16. package/dist/src/App/Storage/typings.d.ts +22 -0
  17. package/dist/src/App/Storage/utils.d.ts +5 -0
  18. package/dist/src/App/WhiteboardView.d.ts +27 -0
  19. package/dist/src/App/index.d.ts +4 -0
  20. package/dist/src/App/type.d.ts +21 -0
  21. package/dist/src/AppListener.d.ts +19 -0
  22. package/dist/src/AppManager.d.ts +107 -0
  23. package/dist/src/AttributesDelegate.d.ts +83 -0
  24. package/dist/src/BoxEmitter.d.ts +34 -0
  25. package/dist/src/BoxManager.d.ts +102 -0
  26. package/dist/src/BuiltinApps.d.ts +8 -0
  27. package/dist/src/Cursor/Cursor.d.ts +39 -0
  28. package/dist/src/Cursor/icons.d.ts +3 -0
  29. package/dist/src/Cursor/index.d.ts +46 -0
  30. package/dist/src/Helper.d.ts +19 -0
  31. package/dist/src/InternalEmitter.d.ts +38 -0
  32. package/dist/src/Page/PageController.d.ts +21 -0
  33. package/dist/src/Page/index.d.ts +3 -0
  34. package/dist/src/PageState.d.ts +9 -0
  35. package/dist/src/ReconnectRefresher.d.ts +24 -0
  36. package/dist/src/RedoUndo.d.ts +18 -0
  37. package/dist/src/Register/index.d.ts +28 -0
  38. package/dist/src/Register/loader.d.ts +4 -0
  39. package/dist/src/Register/storage.d.ts +8 -0
  40. package/dist/src/Utils/AppCreateQueue.d.ts +15 -0
  41. package/dist/src/Utils/Common.d.ts +23 -0
  42. package/dist/src/Utils/Reactive.d.ts +6 -0
  43. package/dist/src/Utils/RoomHacker.d.ts +3 -0
  44. package/dist/src/Utils/error.d.ts +27 -0
  45. package/dist/src/Utils/log.d.ts +1 -0
  46. package/dist/src/View/CameraSynchronizer.d.ts +17 -0
  47. package/dist/src/View/MainView.d.ts +59 -0
  48. package/dist/src/View/ViewManager.d.ts +13 -0
  49. package/dist/src/View/ViewSync.d.ts +24 -0
  50. package/dist/src/callback.d.ts +29 -0
  51. package/dist/src/constants.d.ts +51 -0
  52. package/dist/src/image.d.ts +19 -0
  53. package/dist/src/index.d.ts +267 -0
  54. package/dist/src/shim.d.ts +11 -0
  55. package/dist/src/typings.d.ts +88 -0
  56. package/dist/style.css +1 -1
  57. package/dist/typings.d.ts +6 -0
  58. package/docs/app-context.md +2 -2
  59. package/package.json +9 -4
  60. package/playwright.config.ts +28 -0
  61. package/pnpm-lock.yaml +514 -21
  62. package/src/App/AppContext.ts +2 -2
  63. package/src/App/AppProxy.ts +13 -7
  64. package/src/App/WhiteboardView.ts +19 -14
  65. package/src/BoxManager.ts +32 -36
  66. package/src/BuiltinApps.ts +5 -0
  67. package/src/Helper.ts +3 -2
  68. package/src/View/CameraSynchronizer.ts +3 -7
  69. package/src/callback.ts +1 -0
  70. package/src/index.ts +18 -5
  71. package/src/style.css +3 -41
  72. package/src/typings.ts +6 -0
  73. package/vite.config.js +5 -3
@@ -4,8 +4,9 @@ import type { AppProxy } from "./AppProxy";
4
4
  import type { AppContext } from "./AppContext";
5
5
  import type { View } from "white-web-sdk";
6
6
  import type { TeleBoxRect } from "@netless/telebox-insider";
7
- import type { ICamera } from "../AttributesDelegate";
7
+ import type { ICamera, ISize } from "../AttributesDelegate";
8
8
  export declare type WhiteBoardViewCamera = Omit<ICamera, "id">;
9
+ export declare type WhiteBoardViewRect = Omit<ISize, "id">;
9
10
  export declare class WhiteBoardView implements PageController {
10
11
  view: View;
11
12
  protected appContext: AppContext;
@@ -13,6 +14,7 @@ export declare class WhiteBoardView implements PageController {
13
14
  ensureSize: (size: number) => void;
14
15
  readonly pageState$: ReadonlyVal<PageState>;
15
16
  readonly baseCamera$: ReadonlyVal<WhiteBoardViewCamera>;
17
+ readonly baseRect$: ReadonlyVal<WhiteBoardViewRect | undefined>;
16
18
  constructor(view: View, appContext: AppContext, appProxy: AppProxy, ensureSize: (size: number) => void);
17
19
  get pageState(): PageState;
18
20
  moveCamera(camera: Partial<WhiteBoardViewCamera>): void;
@@ -11,7 +11,6 @@ import type { View } from "white-web-sdk";
11
11
  import type { CallbacksType } from "./callback";
12
12
  import type { EmitterType } from "./InternalEmitter";
13
13
  import type { AppState } from "./App/type";
14
- import { Val } from "value-enhancer";
15
14
  export { TELE_BOX_STATE };
16
15
  export declare type CreateBoxParams = {
17
16
  appId: string;
@@ -46,7 +45,8 @@ export declare type CreateTeleBoxManagerConfig = {
46
45
  collectorStyles?: Partial<CSSStyleDeclaration>;
47
46
  prefersColorScheme?: TeleBoxColorScheme;
48
47
  stageRatio?: number;
49
- highlightStage?: boolean;
48
+ containerStyle?: string;
49
+ stageStyle?: string;
50
50
  };
51
51
  export declare type BoxManagerContext = {
52
52
  safeSetAttributes: (attributes: any) => void;
@@ -64,9 +64,7 @@ export declare class BoxManager {
64
64
  private context;
65
65
  teleBoxManager: TeleBoxManager;
66
66
  protected sideEffectManager: SideEffectManager;
67
- mainViewElement$: Val<HTMLElement | undefined, any>;
68
67
  constructor(context: BoxManagerContext, createTeleBoxManagerConfig?: CreateTeleBoxManagerConfig);
69
- private updateStyle;
70
68
  private get canOperate();
71
69
  get boxState(): "normal" | "minimized" | "maximized";
72
70
  get maximized(): boolean;
@@ -3,3 +3,6 @@ export declare const BuiltinApps: {
3
3
  DocsViewer: string;
4
4
  MediaPlayer: string;
5
5
  };
6
+ export declare const BuiltinAppsMap: {
7
+ [x: string]: any;
8
+ };
package/dist/Helper.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { WindowManager } from "./index";
2
2
  import type { Room, RoomMember } from "white-web-sdk";
3
- export declare const setupWrapper: (root: HTMLElement) => {
3
+ export declare const setupWrapper: (root: HTMLElement, target: HTMLElement) => {
4
4
  playground: HTMLDivElement;
5
5
  mainViewElement: HTMLDivElement;
6
6
  };
@@ -19,6 +19,11 @@ export declare type PublicEvent = {
19
19
  ready: undefined;
20
20
  sceneStateChange: SceneState;
21
21
  pageStateChange: PageState;
22
+ appClose: {
23
+ appId: string;
24
+ kind: string;
25
+ error?: Error;
26
+ };
22
27
  };
23
28
  export declare type CallbacksType = Emittery<PublicEvent>;
24
29
  export declare const callbacks: CallbacksType;