@micro-zoe/micro-app
Advanced tools
Comparing version 1.0.0-alpha.1 to 1.0.0-alpha.2
@@ -14,3 +14,3 @@ /// <reference path="../typings/global.d.ts" /> | ||
declare module '@micro-zoe/micro-app/micro_app' { | ||
import type { OptionsType, MicroAppConfigType, lifeCyclesType, plugins, fetchType, Router } from '@micro-app/types'; | ||
import type { OptionsType, MicroAppConfigType, lifeCyclesType, plugins, fetchType, Router, appName } from '@micro-app/types'; | ||
import preFetch from '@micro-zoe/micro-app/prefetch'; | ||
@@ -23,3 +23,3 @@ import { EventCenterForBaseApp } from '@micro-zoe/micro-app/interact'; | ||
*/ | ||
export function getActiveApps(excludeHiddenApp?: boolean): string[]; | ||
export function getActiveApps(excludeHiddenApp?: boolean): appName[]; | ||
export function getAllApps(): string[]; | ||
@@ -107,4 +107,6 @@ type unmountAppOptions = { | ||
export function isPlainObject(target: unknown): target is Record<PropertyKey, unknown>; | ||
export function isObject(target: unknown): target is Object; | ||
export function isPromise(target: unknown): target is Promise<unknown>; | ||
export function isBoundFunction(target: unknown): target is Function; | ||
export function isBoundFunction(target: unknown): boolean; | ||
export function isConstructor(target: unknown): boolean; | ||
export function isShadowRoot(target: unknown): target is ShadowRoot; | ||
@@ -111,0 +113,0 @@ export function isURL(target: unknown): target is URL; |
{ | ||
"name": "@micro-zoe/micro-app", | ||
"version": "1.0.0-alpha.1", | ||
"version": "1.0.0-alpha.2", | ||
"description": "A lightweight, efficient and powerful micro front-end framework", | ||
@@ -5,0 +5,0 @@ "private": false, |
@@ -10,2 +10,4 @@ declare module '@micro-app/types' { | ||
type appName = string | ||
interface SandBoxInterface { | ||
@@ -343,6 +345,34 @@ proxyWindow: WindowProxy | ||
afterEach(guard: RouterGuard): () => boolean | ||
/** | ||
* Add defaultPage to control the first rendered page | ||
* @param appName app name | ||
* @param path default page path | ||
*/ | ||
setDefaultPage(appName: string, path: string): () => boolean | ||
/** | ||
* Clear data of defaultPage that set by setDefaultPage | ||
*/ | ||
removeDefaultPage(appName: string): boolean | ||
/** | ||
* Get defaultPage that set by setDefaultPage | ||
*/ | ||
getDefaultPage(key: PropertyKey): string | undefined | ||
/** | ||
* Attach specified active app router info to browser url | ||
*/ | ||
attachToURL(appName: string): void | ||
/** | ||
* Attach all active app router info to browser url | ||
*/ | ||
attachAllToURL(): void | ||
/** | ||
* Record base app router, let child app control base app navigation | ||
* It is global data | ||
* @param baseRouter router instance of base app | ||
*/ | ||
setBaseAppRouter(baseRouter: unknown): void | ||
/** | ||
* get baseRouter from cache | ||
*/ | ||
getBaseAppRouter(): unknown | ||
} | ||
@@ -349,0 +379,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
1310465
6247
0