@micro-zoe/micro-app 1.0.0-rc.1 → 1.0.0-rc.3

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 CHANGED
@@ -4,7 +4,7 @@
4
4
  // ../../@micro-app/types
5
5
 
6
6
  declare module '@micro-zoe/micro-app' {
7
- export { default, MicroApp, getActiveApps, getAllApps, unmountApp, unmountAllApps, reload, renderApp, } from '@micro-zoe/micro-app/micro_app';
7
+ export { default, MicroApp, getActiveApps, getAllApps, unmountApp, unmountAllApps, reload, renderApp, getAppStatus } from '@micro-zoe/micro-app/micro_app';
8
8
  export { default as preFetch, } from '@micro-zoe/micro-app/prefetch';
9
9
  export { removeDomScope, pureCreateElement, version, } from '@micro-zoe/micro-app/libs/utils';
10
10
  export { EventCenterForMicroApp, } from '@micro-zoe/micro-app/interact';
@@ -60,6 +60,12 @@ declare module '@micro-zoe/micro-app/micro_app' {
60
60
  * @returns Promise<boolean>
61
61
  */
62
62
  export function renderApp(options: RenderAppOptions): Promise<boolean>;
63
+ /**
64
+ * get app state
65
+ * @param appName app.name
66
+ * @returns app.state
67
+ */
68
+ export function getAppStatus(appName: string): string | void;
63
69
  export class MicroApp extends EventCenterForBaseApp implements MicroAppBaseType {
64
70
  tagName: string;
65
71
  hasInit: boolean;
@@ -72,6 +78,7 @@ declare module '@micro-zoe/micro-app/micro_app' {
72
78
  getAllApps: typeof getAllApps;
73
79
  reload: typeof reload;
74
80
  renderApp: typeof renderApp;
81
+ getAppStatus: typeof getAppStatus;
75
82
  start(options?: OptionsType): void;
76
83
  }
77
84
  const microApp: MicroApp;
@@ -125,7 +132,9 @@ declare module '@micro-zoe/micro-app/libs/utils' {
125
132
  };
126
133
  export const rawDefineProperty: (o: any, p: string | number | symbol, attributes: PropertyDescriptor & ThisType<any>) => any;
127
134
  export const rawDefineProperties: (o: any, properties: PropertyDescriptorMap & ThisType<any>) => any;
135
+ export const rawToString: () => string;
128
136
  export const rawHasOwnProperty: (v: string | number | symbol) => boolean;
137
+ export const toTypeString: (value: unknown) => string;
129
138
  export function isUndefined(target: unknown): target is undefined;
130
139
  export function isNull(target: unknown): target is null;
131
140
  export function isString(target: unknown): target is string;
@@ -309,7 +318,21 @@ declare module '@micro-zoe/micro-app/libs/utils' {
309
318
  * @param args arguments
310
319
  */
311
320
  export function execMicroAppGlobalHook(fn: Func | null, appName: string, hookName: string, ...args: unknown[]): void;
321
+ /**
322
+ * remove all childNode from target node
323
+ * @param $dom target node
324
+ */
312
325
  export function clearDOM($dom: HTMLElement | ShadowRoot | Document): void;
326
+ type BaseHTMLElementType = HTMLElement & {
327
+ new (): HTMLElement;
328
+ prototype: HTMLElement;
329
+ };
330
+ /**
331
+ * get HTMLElement from base app
332
+ * @returns HTMLElement
333
+ */
334
+ export function getBaseHTMLElement(): BaseHTMLElementType;
335
+ export {};
313
336
  }
314
337
 
315
338
  declare module '@micro-zoe/micro-app/interact' {