@micro-zoe/micro-app 0.3.0 → 0.4.0
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/README.md +13 -14
- package/README.zh-cn.md +16 -23
- package/lib/index.d.ts +10 -21
- package/lib/index.esm.js +532 -380
- 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 +6 -3
package/package.json
CHANGED
package/typings/global.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ declare module '@micro-app/types' {
|
|
|
18
18
|
microWindow: Window // Proxy target
|
|
19
19
|
injectedKeys: Set<PropertyKey> // Properties newly added to microWindow
|
|
20
20
|
escapeKeys: Set<PropertyKey> // Properties escape to rawWindow, cleared when unmount
|
|
21
|
-
start(
|
|
21
|
+
start(baseroute: string): void
|
|
22
22
|
stop(): void
|
|
23
23
|
recordUmdSnapshot(): void
|
|
24
24
|
rebuildUmdSnapshot(): void
|
|
@@ -57,7 +57,7 @@ declare module '@micro-app/types' {
|
|
|
57
57
|
scopecss: boolean // whether use css scoped, default is true
|
|
58
58
|
useSandbox: boolean // whether use js sandbox, default is true
|
|
59
59
|
macro: boolean // used to solve the async render problem of vue3, default is false
|
|
60
|
-
|
|
60
|
+
baseroute: string // route prefix, default is ''
|
|
61
61
|
source: sourceType // sources of css, js, html
|
|
62
62
|
sandBox: SandBoxInterface | null // sanxbox
|
|
63
63
|
loadSourceCode(): void // Load resources
|
|
@@ -66,7 +66,7 @@ declare module '@micro-app/types' {
|
|
|
66
66
|
mount(
|
|
67
67
|
container?: HTMLElement | ShadowRoot,
|
|
68
68
|
inline?: boolean,
|
|
69
|
-
|
|
69
|
+
baseroute?: string,
|
|
70
70
|
): void // mount app
|
|
71
71
|
unmount(destory: boolean): void // unmount app
|
|
72
72
|
onerror(e: Error): void // app rendering error
|
|
@@ -78,6 +78,7 @@ declare module '@micro-app/types' {
|
|
|
78
78
|
appUrl: AttrType // app url
|
|
79
79
|
isWating: boolean // combine action of set attribute name, url
|
|
80
80
|
cacheData: Record<PropertyKey, unknown> | null // Cache data
|
|
81
|
+
hasConnected: boolean // element has run connectedCallback
|
|
81
82
|
connectedCallback(): void // Hooks for element append to documents
|
|
82
83
|
disconnectedCallback(): void // Hooks for element delete from documents
|
|
83
84
|
attributeChangedCallback(a: 'name' | 'url', o: string, n: string): void // Hooks for element attributes change
|
|
@@ -185,3 +186,5 @@ declare namespace JSX {
|
|
|
185
186
|
'micro-app': any
|
|
186
187
|
}
|
|
187
188
|
}
|
|
189
|
+
|
|
190
|
+
declare module '@micro-zoe/micro-app/polyfill/jsx-custom-event'
|