@netless/window-manager 1.0.7-beta.4 → 1.0.7-beta.6
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 +16 -6
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +32 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/App/AppContext.ts +9 -1
- package/src/App/AppProxy.ts +4 -0
- package/src/AppManager.ts +14 -1
- package/src/AttributesDelegate.ts +2 -3
- package/src/BoxManager.ts +14 -11
- package/src/InternalEmitter.ts +3 -0
- package/src/callback.ts +8 -1
- package/src/index.ts +3 -3
- package/src/typings.ts +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as lodash from 'lodash';
|
|
|
2
2
|
import * as white_web_sdk from 'white-web-sdk';
|
|
3
3
|
import { SceneDefinition, SceneState, DisplayerState, View, ApplianceNames, ViewVisionMode, CameraState, RoomMember, Camera, Size, Event as Event$1, Scope, EventPhase, MagixEventListenerOptions as MagixEventListenerOptions$1, toJS, listenUpdated, unlistenUpdated, listenDisposed, unlistenDisposed, Room, ViewMode, Displayer, MemberState, AnimationMode, InvisiblePlugin, InvisiblePluginContext, Player, Rectangle, Point, CameraBound, ImageInformation } from 'white-web-sdk';
|
|
4
4
|
export { AnimationMode, Displayer, Player, Room, SceneDefinition, SceneState, View } from 'white-web-sdk';
|
|
5
|
-
import { TELE_BOX_STATE, TeleBoxRect,
|
|
5
|
+
import { TELE_BOX_STATE, TeleBoxRect, TeleBoxState, TeleBoxColorScheme, NotMinimizedBoxState, TeleBoxManager, TeleBoxCollector, ReadonlyTeleBox, TeleBoxManagerUpdateConfig, TeleBoxConfig } from '@netless/telebox-insider';
|
|
6
6
|
export { ReadonlyTeleBox, TeleBoxCollector, TeleBoxManager, TeleBoxRect } from '@netless/telebox-insider';
|
|
7
7
|
import Emittery from 'emittery';
|
|
8
8
|
|
|
@@ -225,6 +225,10 @@ type AppEmitterEvent<T = any> = {
|
|
|
225
225
|
reconnected: void;
|
|
226
226
|
seek: number;
|
|
227
227
|
pageStateChange: PageState;
|
|
228
|
+
boxStatusChange: {
|
|
229
|
+
appId: string;
|
|
230
|
+
status: TeleBoxState;
|
|
231
|
+
};
|
|
228
232
|
};
|
|
229
233
|
type RegisterEventData = {
|
|
230
234
|
appId: string;
|
|
@@ -289,6 +293,8 @@ type PublicEvent = {
|
|
|
289
293
|
onAppViewMounted: AppPayload;
|
|
290
294
|
onAppSetup: string;
|
|
291
295
|
onAppScenePathChange: AppPayload;
|
|
296
|
+
onBoxesStatusChange: Map<string, TeleBoxState>;
|
|
297
|
+
onLastNotMinimizedBoxesStatusChange: Map<string, NotMinimizedBoxState>;
|
|
292
298
|
};
|
|
293
299
|
type CallbacksType = Emittery<PublicEvent>;
|
|
294
300
|
|
|
@@ -321,6 +327,8 @@ type EmitterEvent = {
|
|
|
321
327
|
changePageState: undefined;
|
|
322
328
|
writableChange: boolean;
|
|
323
329
|
containerSizeRatioUpdate: number;
|
|
330
|
+
boxesStatusChange: Map<string, TeleBoxState>;
|
|
331
|
+
lastNotMinimizedBoxesStatusChange: Map<string, NotMinimizedBoxState>;
|
|
324
332
|
};
|
|
325
333
|
type EmitterType = Emittery<EmitterEvent>;
|
|
326
334
|
|
|
@@ -434,8 +442,8 @@ declare class AttributesDelegate {
|
|
|
434
442
|
getAppState(id: string): any;
|
|
435
443
|
getMaximized(): any;
|
|
436
444
|
getMinimized(): any;
|
|
437
|
-
getBoxesStatus(): Record<string,
|
|
438
|
-
getBoxStatus(id: string):
|
|
445
|
+
getBoxesStatus(): Record<string, TeleBoxState> | undefined;
|
|
446
|
+
getBoxStatus(id: string): TeleBoxState | undefined;
|
|
439
447
|
setBoxStatus(id: string, status?: TeleBoxState): void;
|
|
440
448
|
getLastNotMinimizedBoxesStatus(): Record<string, NotMinimizedBoxState> | undefined;
|
|
441
449
|
getLastNotMinimizedBoxStatus(id: string): NotMinimizedBoxState | undefined;
|
|
@@ -553,9 +561,7 @@ declare class BoxManager {
|
|
|
553
561
|
createBox(params: CreateBoxParams): void;
|
|
554
562
|
setBoxInitState(appId: string): void;
|
|
555
563
|
setBoxesStatus(status?: Record<string, TeleBoxState>): void;
|
|
556
|
-
setBoxStatus(appId: string, status?: TeleBoxState): void;
|
|
557
564
|
setLastNotMinimizedBoxesStatus(status?: Record<string, NotMinimizedBoxState>): void;
|
|
558
|
-
setLastNotMinimizedBoxStatus(appId: string, status?: NotMinimizedBoxState): void;
|
|
559
565
|
setupBoxManager(createTeleBoxManagerConfig?: CreateTeleBoxManagerConfig): TeleBoxManager;
|
|
560
566
|
setCollectorContainer(container: HTMLElement): void;
|
|
561
567
|
getBox(appId: string): ReadonlyTeleBox | undefined;
|
|
@@ -635,6 +641,8 @@ declare class AppContext<TAttributes extends {} = any, TMagixEventPayloads = any
|
|
|
635
641
|
getManager: () => AppManager;
|
|
636
642
|
getBoxManager: () => BoxManager;
|
|
637
643
|
getWindowManager: () => WindowManager;
|
|
644
|
+
getBoxStatus: () => TeleBoxState | undefined;
|
|
645
|
+
getLastNotMinimizedBoxStatus: () => NotMinimizedBoxState | undefined;
|
|
638
646
|
getDisplayer: () => white_web_sdk.Displayer<white_web_sdk.DisplayerCallbacks>;
|
|
639
647
|
getAppProxy: () => AppProxy;
|
|
640
648
|
/** @deprecated Use context.storage.state instead. */
|
|
@@ -735,6 +743,7 @@ declare class AppProxy implements PageRemoveService {
|
|
|
735
743
|
setViewFocusScenePath(): string | undefined;
|
|
736
744
|
private createView;
|
|
737
745
|
notifyPageStateChange: lodash.DebouncedFunc<() => void>;
|
|
746
|
+
notifyBoxStatusChange: (status: TeleBoxState) => void;
|
|
738
747
|
get pageState(): PageState;
|
|
739
748
|
removeSceneByIndex(index: number): Promise<boolean>;
|
|
740
749
|
setSceneIndexWithoutSync(index: number): void;
|
|
@@ -891,6 +900,7 @@ declare class AppManager {
|
|
|
891
900
|
private onBoxBlurred;
|
|
892
901
|
private onBoxClose;
|
|
893
902
|
private onBoxStateChange;
|
|
903
|
+
private notifyBoxesStatusChange;
|
|
894
904
|
addBoxesStatusChangeListener: () => void;
|
|
895
905
|
addAppsChangeListener: () => void;
|
|
896
906
|
addAppCloseListener: () => void;
|
|
@@ -1362,7 +1372,7 @@ declare class WindowManager extends InvisiblePlugin<WindowMangerAttributes, any>
|
|
|
1362
1372
|
get cameraState(): CameraState;
|
|
1363
1373
|
get apps(): Apps | undefined;
|
|
1364
1374
|
get boxState(): TeleBoxState | undefined;
|
|
1365
|
-
get boxStatus(): Record<string,
|
|
1375
|
+
get boxStatus(): Record<string, TeleBoxState> | undefined;
|
|
1366
1376
|
get lastNotMinimizedBoxStatus(): Record<string, NotMinimizedBoxState> | undefined;
|
|
1367
1377
|
get darkMode(): boolean;
|
|
1368
1378
|
get prefersColorScheme(): TeleBoxColorScheme | undefined;
|