@netless/telebox-insider 0.3.0-beta.10 → 0.3.0-beta.11

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/telebox-insider",
3
- "version": "0.3.0-beta.10",
3
+ "version": "0.3.0-beta.11",
4
4
  "private": false,
5
5
  "description": "Window widget for Whiteboard",
6
6
  "author": "CRIMX <straybugs@gmail.com> (https://github.com/crimx/)",
@@ -79,7 +79,7 @@ export class TeleBoxCollector {
79
79
  return this;
80
80
  }
81
81
 
82
- private hasMinimizedBox(): boolean {
82
+ protected hasMinimizedBox(): boolean {
83
83
  const boxesStatus = this.boxesStatus;
84
84
  if (boxesStatus) {
85
85
  for (const status of boxesStatus.values()) {
@@ -48,16 +48,16 @@ type ValConfig = {
48
48
  export interface TeleBoxManager extends ValEnhancedResult<ValConfig> {}
49
49
 
50
50
  export class TeleBoxManager {
51
- private boxesStatus$: Map<string, TeleBoxState>;
52
- private lastNotMinimizedBoxesStatus$: Map<string, NotMinimizedBoxState>;
53
- private appMenu: AppMenu | undefined;
54
- private useBoxesStatus: boolean;
55
- private effectBoxesStatusTimer?: {
51
+ protected boxesStatus$: Map<string, TeleBoxState>;
52
+ protected lastNotMinimizedBoxesStatus$: Map<string, NotMinimizedBoxState>;
53
+ protected appMenu: AppMenu | undefined;
54
+ protected useBoxesStatus: boolean;
55
+ protected effectBoxesStatusTimer?: {
56
56
  skipUpdate: boolean;
57
57
  timer: number | undefined;
58
58
  resolve?: (skipUpdate: boolean) => void;
59
59
  }
60
- private effectLastNotMinimizedBoxStatusTimer?: {
60
+ protected effectLastNotMinimizedBoxStatusTimer?: {
61
61
  skipUpdate: boolean;
62
62
  timer: number | undefined;
63
63
  resolve?: (skipUpdate: boolean) => void;
@@ -572,7 +572,7 @@ export class TeleBoxManager {
572
572
  return this.boxesStatus$;
573
573
  }
574
574
 
575
- private effectBoxStatusChange(){
575
+ protected effectBoxStatusChange(){
576
576
  if (!this.useBoxesStatus) {
577
577
  return;
578
578
  }
@@ -590,7 +590,7 @@ export class TeleBoxManager {
590
590
  }
591
591
  }
592
592
 
593
- private effectBoxesStatusTimerFunc(skipUpdate: boolean){
593
+ protected effectBoxesStatusTimerFunc(skipUpdate: boolean){
594
594
  if (!this.useBoxesStatus) {
595
595
  return;
596
596
  }
@@ -734,7 +734,7 @@ export class TeleBoxManager {
734
734
  this.effectLastNotMinimizedBoxStatusChange(skipUpdate);
735
735
  }
736
736
 
737
- private async effectLastNotMinimizedBoxStatusChange(skipUpdate = false): Promise<void> {
737
+ protected async effectLastNotMinimizedBoxStatusChange(skipUpdate = false): Promise<void> {
738
738
  if (!this.useBoxesStatus) {
739
739
  if (this.effectLastNotMinimizedBoxStatusTimer && this.effectLastNotMinimizedBoxStatusTimer.timer) {
740
740
  clearTimeout(this.effectLastNotMinimizedBoxStatusTimer.timer);
@@ -781,7 +781,7 @@ export class TeleBoxManager {
781
781
  }
782
782
  }
783
783
 
784
- private effectLastNotMinimizedBoxStatusFunc(skipUpdate = false){
784
+ protected effectLastNotMinimizedBoxStatusFunc(skipUpdate = false){
785
785
  if (!this.useBoxesStatus) {
786
786
  return;
787
787
  }
@@ -793,19 +793,10 @@ export class TeleBoxManager {
793
793
  });
794
794
  }
795
795
 
796
- private getUnabledBoxesStatusZIndex(): number {
796
+ protected getUnabledBoxesStatusZIndex(): number {
797
797
  return this.topBox ? this.topBox.zIndex : 99;
798
798
  }
799
799
 
800
- // private getTopBoxZIndex(): number {
801
- // if (!this.useBoxesStatus) {
802
- // return this.getUnabledBoxesStatusZIndex();
803
- // }
804
- // return [...this.boxes].filter((box) => box.boxStatus !== TELE_BOX_STATE.Minimized).reduce((maxZIndex, box) => {
805
- // return Math.max(maxZIndex, box.zIndex);
806
- // }, 100);
807
- // }
808
-
809
800
  /** Maximized box zIndex range: 100-299 */
810
801
  public getMaxMaximizedBoxZIndex(): number {
811
802
  if (!this.useBoxesStatus) {
@@ -1288,7 +1279,7 @@ export class TeleBoxManager {
1288
1279
  }
1289
1280
  }
1290
1281
 
1291
- private getMaximizedTopBox(): MaxTitleBarTeleBox | undefined {
1282
+ protected getMaximizedTopBox(): MaxTitleBarTeleBox | undefined {
1292
1283
  if (!this.useBoxesStatus) {
1293
1284
  return undefined;
1294
1285
  }