@netless/window-manager 1.0.18 → 1.0.20
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 +13 -0
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +285 -13
- package/dist/index.mjs.map +1 -1
- package/docs/cn/box-size-change.md +144 -0
- package/package.json +3 -3
- package/src/App/AppBoxSizeSynchronizer.ts +124 -0
- package/src/App/AppContext.ts +2 -0
- package/src/App/AppProxy.ts +63 -1
- package/src/AppManager.ts +9 -0
- package/src/BoxManager.ts +15 -0
- package/src/ContainerResizeObserver.ts +134 -4
- package/src/constants.ts +4 -0
- package/src/index.ts +13 -1
- package/src/typings.ts +2 -0
package/dist/index.d.ts
CHANGED
|
@@ -229,6 +229,12 @@ type AppEmitterEvent<T = any> = {
|
|
|
229
229
|
appId: string;
|
|
230
230
|
status: TeleBoxState;
|
|
231
231
|
};
|
|
232
|
+
/** Actual app content size in CSS pixels after the box layout is applied. */
|
|
233
|
+
boxSizeChange: {
|
|
234
|
+
appId: string;
|
|
235
|
+
width: number;
|
|
236
|
+
height: number;
|
|
237
|
+
};
|
|
232
238
|
};
|
|
233
239
|
type RegisterEventData = {
|
|
234
240
|
appId: string;
|
|
@@ -552,6 +558,7 @@ type BoxManagerContext = {
|
|
|
552
558
|
callbacks: CallbacksType;
|
|
553
559
|
canOperate: () => boolean;
|
|
554
560
|
notifyContainerRectUpdate: (rect: TeleBoxRect) => void;
|
|
561
|
+
scheduleAppBoxSizeSync: (appId?: string) => void;
|
|
555
562
|
cleanFocus: () => void;
|
|
556
563
|
setAppFocus: (appId: string) => void;
|
|
557
564
|
};
|
|
@@ -723,11 +730,14 @@ declare class AppProxy implements PageRemoveService {
|
|
|
723
730
|
private stateKey;
|
|
724
731
|
private _pageState;
|
|
725
732
|
private _prevFullPath;
|
|
733
|
+
private boxSizeSynchronizer;
|
|
734
|
+
private setupWatchdogTimer?;
|
|
726
735
|
appResult?: NetlessApp<any>;
|
|
727
736
|
appContext?: AppContext<any, any>;
|
|
728
737
|
constructor(params: BaseInsertParams, manager: AppManager, appId: string, isAddApp: boolean);
|
|
729
738
|
private initScenes;
|
|
730
739
|
get view(): View | undefined;
|
|
740
|
+
scheduleBoxSizeSync: () => void;
|
|
731
741
|
get viewIndex(): number | undefined;
|
|
732
742
|
get isWritable(): boolean;
|
|
733
743
|
get attributes(): any;
|
|
@@ -742,6 +752,8 @@ declare class AppProxy implements PageRemoveService {
|
|
|
742
752
|
}>;
|
|
743
753
|
get box(): ReadonlyTeleBox | undefined;
|
|
744
754
|
private setupApp;
|
|
755
|
+
private runAppSetup;
|
|
756
|
+
private clearSetupWatchdog;
|
|
745
757
|
private fixMobileSize;
|
|
746
758
|
private afterSetupApp;
|
|
747
759
|
onSeek(time: number): Promise<void>;
|
|
@@ -926,6 +938,7 @@ declare class AppManager {
|
|
|
926
938
|
private onCreated;
|
|
927
939
|
private onBoxMove;
|
|
928
940
|
private onBoxResize;
|
|
941
|
+
scheduleAppBoxSizeSync: (appId?: string) => void;
|
|
929
942
|
private onBoxFocus;
|
|
930
943
|
private onBoxBlurred;
|
|
931
944
|
private onBoxClose;
|