@netless/telebox-insider 0.3.0-beta.7 → 0.3.0-beta.8

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.d.ts CHANGED
@@ -849,7 +849,7 @@ interface AppMenuProps {
849
849
  }
850
850
  declare class AppMenu {
851
851
  private readonly namespace;
852
- readonly container: HTMLDivElement;
852
+ private container;
853
853
  private readonly badge;
854
854
  private readonly menuView;
855
855
  private readonly manager;
@@ -861,6 +861,7 @@ declare class AppMenu {
861
861
  private c;
862
862
  containerClickHandler: () => void;
863
863
  private menuViewClickHandler;
864
+ setContainer(container: HTMLDivElement): void;
864
865
  private createDefaultAppMenu;
865
866
  private init;
866
867
  updatePrefersColorSchemeHandler: () => void;
@@ -2879,6 +2879,13 @@ class AppMenu {
2879
2879
  c(className) {
2880
2880
  return `${this.namespace}-${className}`;
2881
2881
  }
2882
+ setContainer(container) {
2883
+ if (this.container) {
2884
+ this.container.remove();
2885
+ }
2886
+ this.container = container;
2887
+ this.init();
2888
+ }
2882
2889
  createDefaultAppMenu() {
2883
2890
  this.badge.classList.add(this.c("app-menu-badge"));
2884
2891
  this.menuView.classList.add(this.c("app-menu-tooltip"));
@@ -3055,6 +3062,9 @@ class TeleBoxManager {
3055
3062
  collector2.setVisible(minimized$.value);
3056
3063
  collector2.setReadonly(readonly$.value);
3057
3064
  collector2.setDarkMode(this._darkMode$.value);
3065
+ if (this.useBoxesStatus && this.appMenu) {
3066
+ this.appMenu.setContainer(collector2.$appMenuContainer);
3067
+ }
3058
3068
  this._sideEffect.add(() => {
3059
3069
  collector2.getBoxesStatus = () => {
3060
3070
  return this.boxesStatus$;