@micro-zoe/micro-app 1.0.0-alpha.1 → 1.0.0-alpha.2
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/lib/index.d.ts +5 -3
- package/lib/index.esm.js +335 -181
- package/lib/index.esm.js.map +1 -1
- package/lib/index.min.js +1 -1
- package/lib/index.min.js.map +1 -1
- package/lib/index.umd.js +1 -1
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/typings/global.d.ts +31 -1
package/package.json
CHANGED
package/typings/global.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ declare module '@micro-app/types' {
|
|
|
7
7
|
|
|
8
8
|
type microAppWindowType = Window & any
|
|
9
9
|
|
|
10
|
+
type appName = string
|
|
11
|
+
|
|
10
12
|
interface SandBoxInterface {
|
|
11
13
|
proxyWindow: WindowProxy
|
|
12
14
|
microAppWindow: Window // Proxy target
|
|
@@ -339,10 +341,38 @@ declare module '@micro-app/types' {
|
|
|
339
341
|
* @param guard global hook for
|
|
340
342
|
*/
|
|
341
343
|
afterEach(guard: RouterGuard): () => boolean
|
|
342
|
-
|
|
344
|
+
/**
|
|
345
|
+
* Add defaultPage to control the first rendered page
|
|
346
|
+
* @param appName app name
|
|
347
|
+
* @param path default page path
|
|
348
|
+
*/
|
|
343
349
|
setDefaultPage(appName: string, path: string): () => boolean
|
|
350
|
+
/**
|
|
351
|
+
* Clear data of defaultPage that set by setDefaultPage
|
|
352
|
+
*/
|
|
344
353
|
removeDefaultPage(appName: string): boolean
|
|
354
|
+
/**
|
|
355
|
+
* Get defaultPage that set by setDefaultPage
|
|
356
|
+
*/
|
|
345
357
|
getDefaultPage(key: PropertyKey): string | undefined
|
|
358
|
+
/**
|
|
359
|
+
* Attach specified active app router info to browser url
|
|
360
|
+
*/
|
|
361
|
+
attachToURL(appName: string): void
|
|
362
|
+
/**
|
|
363
|
+
* Attach all active app router info to browser url
|
|
364
|
+
*/
|
|
365
|
+
attachAllToURL(): void
|
|
366
|
+
/**
|
|
367
|
+
* Record base app router, let child app control base app navigation
|
|
368
|
+
* It is global data
|
|
369
|
+
* @param baseRouter router instance of base app
|
|
370
|
+
*/
|
|
371
|
+
setBaseAppRouter(baseRouter: unknown): void
|
|
372
|
+
/**
|
|
373
|
+
* get baseRouter from cache
|
|
374
|
+
*/
|
|
375
|
+
getBaseAppRouter(): unknown
|
|
346
376
|
}
|
|
347
377
|
|
|
348
378
|
// result of add/remove microApp path on browser url
|