@micro-zoe/micro-app 1.0.0-rc.3 → 1.0.0-rc.5
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 +8 -10
- package/lib/index.esm.js +759 -496
- 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 +36 -34
package/lib/index.d.ts
CHANGED
|
@@ -159,6 +159,8 @@ declare module '@micro-zoe/micro-app/libs/utils' {
|
|
|
159
159
|
export function isBaseElement(target: unknown): target is HTMLBaseElement;
|
|
160
160
|
export function isMicroAppBody(target: unknown): target is HTMLElement;
|
|
161
161
|
export function isProxyDocument(target: unknown): target is Document;
|
|
162
|
+
export function isTargetExtension(path: string, suffix: string): boolean;
|
|
163
|
+
export function includes(target: unknown[], searchElement: unknown, fromIndex?: number): boolean;
|
|
162
164
|
/**
|
|
163
165
|
* format error log
|
|
164
166
|
* @param msg message
|
|
@@ -205,7 +207,9 @@ declare module '@micro-zoe/micro-app/libs/utils' {
|
|
|
205
207
|
*/
|
|
206
208
|
export function formatAppName(name: string | null): string;
|
|
207
209
|
/**
|
|
208
|
-
* Get valid address, such as
|
|
210
|
+
* Get valid address, such as
|
|
211
|
+
* 1. https://domain/xx/xx.html to https://domain/xx/
|
|
212
|
+
* 2. https://domain/xx to https://domain/xx/
|
|
209
213
|
* @param url app.url
|
|
210
214
|
*/
|
|
211
215
|
export function getEffectivePath(url: string): string;
|
|
@@ -239,21 +243,14 @@ declare module '@micro-zoe/micro-app/libs/utils' {
|
|
|
239
243
|
*/
|
|
240
244
|
export function promiseRequestIdle(callback: CallableFunction): Promise<void>;
|
|
241
245
|
export function setCurrentAppName(appName: string | null): void;
|
|
242
|
-
export function throttleDeferForSetAppName(appName: string): void;
|
|
243
246
|
export function getCurrentAppName(): string | null;
|
|
244
|
-
export function removeDomScope(): void;
|
|
247
|
+
export function removeDomScope(force?: boolean): void;
|
|
248
|
+
export function throttleDeferForSetAppName(appName: string): void;
|
|
245
249
|
export function isSafari(): boolean;
|
|
246
250
|
/**
|
|
247
251
|
* Create pure elements
|
|
248
252
|
*/
|
|
249
253
|
export function pureCreateElement<K extends keyof MicroAppElementTagNameMap>(tagName: K, options?: ElementCreationOptions): MicroAppElementTagNameMap[K];
|
|
250
|
-
/**
|
|
251
|
-
* clone origin elements to target
|
|
252
|
-
* @param origin Cloned element
|
|
253
|
-
* @param target Accept cloned elements
|
|
254
|
-
* @param deep deep clone or transfer dom
|
|
255
|
-
*/
|
|
256
|
-
export function cloneContainer<T extends Element | ShadowRoot, Q extends Element | ShadowRoot>(target: Q, origin: T, deep: boolean): Q;
|
|
257
254
|
export function isInvalidQuerySelectorKey(key: string): boolean;
|
|
258
255
|
export function isUniqueElement(key: string): boolean;
|
|
259
256
|
/**
|
|
@@ -332,6 +329,7 @@ declare module '@micro-zoe/micro-app/libs/utils' {
|
|
|
332
329
|
* @returns HTMLElement
|
|
333
330
|
*/
|
|
334
331
|
export function getBaseHTMLElement(): BaseHTMLElementType;
|
|
332
|
+
export function formatEventType(type: string, appName: string): string;
|
|
335
333
|
export {};
|
|
336
334
|
}
|
|
337
335
|
|