@netless/window-manager 1.0.5 → 1.0.6-beta.1
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 +29 -1
- package/dist/index.js +15 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/AppManager.ts +6 -2
- package/src/ExtendPluginManager.ts +55 -0
- package/src/index.ts +16 -0
package/dist/index.d.ts
CHANGED
@@ -1063,6 +1063,32 @@ declare class IframeBridge {
|
|
1063
1063
|
private get isDisableInput();
|
1064
1064
|
}
|
1065
1065
|
|
1066
|
+
interface ExtendContext {
|
1067
|
+
readonly manager: ExtendPluginManager;
|
1068
|
+
readonly windowManager: WindowManager;
|
1069
|
+
readonly internalEmitter: EmitterType;
|
1070
|
+
}
|
1071
|
+
declare abstract class ExtendPlugin extends Emittery {
|
1072
|
+
context: ExtendContext;
|
1073
|
+
abstract readonly kind: string;
|
1074
|
+
protected _inject(context: ExtendContext): void;
|
1075
|
+
abstract onCreate(): void;
|
1076
|
+
abstract onDestroy(): void;
|
1077
|
+
}
|
1078
|
+
type ExtendPluginInstance<T extends ExtendPlugin> = T;
|
1079
|
+
interface ExtendManagerOptions {
|
1080
|
+
readonly windowManager: WindowManager;
|
1081
|
+
readonly internalEmitter: EmitterType;
|
1082
|
+
}
|
1083
|
+
declare class ExtendPluginManager {
|
1084
|
+
private extends;
|
1085
|
+
private context;
|
1086
|
+
constructor(props: ExtendManagerOptions);
|
1087
|
+
hasRegister(kind: string): boolean;
|
1088
|
+
use(extend: ExtendPluginInstance<any>): void;
|
1089
|
+
destroy(): void;
|
1090
|
+
}
|
1091
|
+
|
1066
1092
|
declare const BuiltinApps: {
|
1067
1093
|
DocsViewer: string;
|
1068
1094
|
MediaPlayer: string;
|
@@ -1184,6 +1210,7 @@ declare class WindowManager extends InvisiblePlugin<WindowMangerAttributes, any>
|
|
1184
1210
|
private static params?;
|
1185
1211
|
private containerResizeObserver?;
|
1186
1212
|
containerSizeRatio: number;
|
1213
|
+
private extendPluginManager?;
|
1187
1214
|
constructor(context: InvisiblePluginContext);
|
1188
1215
|
static onCreate(manager: WindowManager): void;
|
1189
1216
|
static mount(params: MountParams): Promise<WindowManager>;
|
@@ -1338,6 +1365,7 @@ declare class WindowManager extends InvisiblePlugin<WindowMangerAttributes, any>
|
|
1338
1365
|
private ensureAttributes;
|
1339
1366
|
private _iframeBridge?;
|
1340
1367
|
getIframeBridge(): IframeBridge;
|
1368
|
+
useExtendPlugin(extend: ExtendPluginInstance<any>): void;
|
1341
1369
|
}
|
1342
1370
|
|
1343
|
-
export { type AddAppOptions, type AddAppParams, type AddPageParams, AppContext, AppCreateError, type AppEmitterEvent, type AppInitState, type AppListenerKeys, AppManagerNotInitError, AppNotRegisterError, type AppPayload, type AppSyncAttributes, type ApplianceIcons, type BaseInsertParams, BindContainerRoomPhaseInvalidError, BoxManagerNotFoundError, BoxNotCreatedError, BuiltinApps, type CursorMovePayload, type CursorOptions, DomEvents, IframeBridge, type IframeBridgeAttributes, type IframeBridgeEvents, IframeEvents, type IframeSize, type InsertOptions, InvalidScenePath, type MountParams, type NetlessApp, type OnCreateInsertOption, type PageController, type PageRemoveService, type PageState, ParamsInvalidError, type PublicEvent, type RegisterEventData, type RegisterEvents, type RegisterParams, Storage, type StorageStateChangedEvent, type StorageStateChangedListener, WhiteWebSDKInvalidError, WindowManager, type WindowMangerAttributes, type apps, calculateNextIndex, reconnectRefresher, type setAppOptions };
|
1371
|
+
export { type AddAppOptions, type AddAppParams, type AddPageParams, AppContext, AppCreateError, type AppEmitterEvent, type AppInitState, type AppListenerKeys, AppManagerNotInitError, AppNotRegisterError, type AppPayload, type AppSyncAttributes, type ApplianceIcons, type BaseInsertParams, BindContainerRoomPhaseInvalidError, BoxManagerNotFoundError, BoxNotCreatedError, BuiltinApps, type CursorMovePayload, type CursorOptions, DomEvents, type ExtendContext, type ExtendManagerOptions, ExtendPlugin, type ExtendPluginInstance, ExtendPluginManager, IframeBridge, type IframeBridgeAttributes, type IframeBridgeEvents, IframeEvents, type IframeSize, type InsertOptions, InvalidScenePath, type MountParams, type NetlessApp, type OnCreateInsertOption, type PageController, type PageRemoveService, type PageState, ParamsInvalidError, type PublicEvent, type RegisterEventData, type RegisterEvents, type RegisterParams, Storage, type StorageStateChangedEvent, type StorageStateChangedListener, WhiteWebSDKInvalidError, WindowManager, type WindowMangerAttributes, type apps, calculateNextIndex, reconnectRefresher, type setAppOptions };
|