@mptool/all 0.10.14 → 0.11.1
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/dist/index.d.mts +22 -5
- package/dist/index.d.ts +22 -5
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -150,7 +150,13 @@ declare const logger_filter: typeof filter;
|
|
|
150
150
|
declare const logger_info: typeof info;
|
|
151
151
|
declare const logger_warn: typeof warn;
|
|
152
152
|
declare namespace logger {
|
|
153
|
-
export {
|
|
153
|
+
export {
|
|
154
|
+
logger_debug as debug,
|
|
155
|
+
logger_error as error,
|
|
156
|
+
logger_filter as filter,
|
|
157
|
+
logger_info as info,
|
|
158
|
+
logger_warn as warn,
|
|
159
|
+
};
|
|
154
160
|
}
|
|
155
161
|
|
|
156
162
|
/**
|
|
@@ -187,7 +193,11 @@ declare const query_join: typeof join;
|
|
|
187
193
|
declare const query_parse: typeof parse;
|
|
188
194
|
declare const query_stringify: typeof stringify;
|
|
189
195
|
declare namespace query {
|
|
190
|
-
export {
|
|
196
|
+
export {
|
|
197
|
+
query_join as join,
|
|
198
|
+
query_parse as parse,
|
|
199
|
+
query_stringify as stringify,
|
|
200
|
+
};
|
|
191
201
|
}
|
|
192
202
|
|
|
193
203
|
/**
|
|
@@ -991,7 +1001,7 @@ declare const $Config: (config: AppConfigOptions) => void;
|
|
|
991
1001
|
declare const getConfig: () => Config;
|
|
992
1002
|
|
|
993
1003
|
/** 文件编码 */
|
|
994
|
-
type FileEncoding = "
|
|
1004
|
+
type FileEncoding = "ascii" | "base64" | "binary" | "hex" | "latin1" | "ucs2" | "ucs-2" | "utf8" | "utf-8" | "utf16le" | "utf-16le";
|
|
995
1005
|
declare const dirname: (path: string) => string;
|
|
996
1006
|
/** 判断文件或文件夹是否存在 */
|
|
997
1007
|
declare const exists: (path: string) => boolean;
|
|
@@ -1639,8 +1649,10 @@ interface RequestFactory {
|
|
|
1639
1649
|
declare const createRequest: ({ cookieStore, server, requestHandler, responseHandler, errorHandler, ...defaultOptions }?: RequestInitOptions) => RequestFactory;
|
|
1640
1650
|
|
|
1641
1651
|
type AllowTag = "a" | "abbr" | "address" | "article" | "aside" | "b" | "bdi" | "bdo" | "blockquote" | "br" | "caption" | "cite" | "code" | "col" | "colgroup" | "dd" | "del" | "div" | "dl" | "dt" | "em" | "fieldset" | "footer" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "header" | "hr" | "i" | "img" | "ins" | "label" | "legend" | "li" | "mark" | "nav" | "ol" | "p" | "pre" | "q" | "rt" | "ruby" | "s" | "section" | "small" | "span" | "strong" | "sub" | "sup" | "table" | "tbody" | "td" | "tfoot" | "th" | "thead" | "tr" | "tt" | "u" | "ul";
|
|
1652
|
+
type DeprecatedTag = "big" | "center" | "font";
|
|
1653
|
+
type ConvertedTag = "html" | "body" | "svg";
|
|
1642
1654
|
declare const ALLOWED_TAGS: [
|
|
1643
|
-
tag: AllowTag |
|
|
1655
|
+
tag: AllowTag | DeprecatedTag | ConvertedTag,
|
|
1644
1656
|
allowedAttrs?: string[]
|
|
1645
1657
|
][];
|
|
1646
1658
|
|
|
@@ -1867,6 +1879,7 @@ declare class Element extends NodeWithChildren {
|
|
|
1867
1879
|
"x-attribsPrefix"?: Record<string, string>;
|
|
1868
1880
|
}
|
|
1869
1881
|
|
|
1882
|
+
declare const getHTML: (content: string | AnyNode | AnyNode[]) => string;
|
|
1870
1883
|
declare const parseHTML: (content: string) => AnyNode[];
|
|
1871
1884
|
|
|
1872
1885
|
interface ElementNode {
|
|
@@ -1897,6 +1910,10 @@ interface ParserOptions {
|
|
|
1897
1910
|
|
|
1898
1911
|
declare const getRichTextNodes: (content: string | AnyNode[], { appendClass, transform }?: ParserOptions) => Promise<RichTextNode[]>;
|
|
1899
1912
|
|
|
1913
|
+
/** SVG 转换 */
|
|
1914
|
+
declare const convertSVGToDataURI: (content: string) => string;
|
|
1915
|
+
|
|
1900
1916
|
declare const getText: (content: string | AnyNode[]) => string;
|
|
1901
1917
|
|
|
1902
|
-
export { $App, $Component, $Config, $Page, ALLOWED_TAGS,
|
|
1918
|
+
export { $App, $Component, $Config, $Page, ALLOWED_TAGS, Cookie, CookieStore, Emitter, Headers, MpError$1 as MpError, Queue, URLSearchParams, addContact, appState, check, checkAsync, compareVersion, confirm, convertSVGToDataURI, createRequest, decode as decodeBase64, dirname, download, userEmitter as emitter, encode as encodeBase64, env, exists, funcQueue, get, getAsync, getConfig, getCookieScopeDomain, getCurrentPage, getCurrentRoute, getDomain, getHTML, getRef, getRichTextNodes, getText, getUrlInfo, getWindowInfo, go, handleProperties, isDir, isFile, isFunction, lock, logger, ls, mkdir, normalizeDomain, once, openDocument, parseCookieHeader, parseHTML, parseUrl, put, query, reLaunch, readFile, readJSON, redirect, remove, removeAsync, removeRef, reportNetworkStatus, request, requestCookieStore, retry, rm, saveDocument, saveFile, saveOnlineFile, savePhoto, set, setAsync, setRef, showModal, showToast, storage, switchTab, take, type, unzip, updateApp, wrapFunction, writeClipboard, writeFile, writeJSON };
|
|
1919
|
+
export type { AllowTag, AppConfigCommonOptions, AppConfigOptions, AppConstructor, AppInstance, AppOptions, ComponentConstructor, ComponentInstance, ComponentLifetimes, ComponentOptions, Config, ConvertedTag, CookieMap, CookieOptions, CookieStoreType, CookieType, DeprecatedTag, ElementNode, EmitterInstance, Env, EventHandlerList, EventHandlerMap, EventType, ExtendedAppMethods, ExtendedComponentMethods, ExtendedComponentProperty, ExtendedPageLifeCycles, ExtendedPageMethods, ExtendedPageProperties, ExtendsAppOptions, Handler, HeadersInit, InferFromType, InferPropType, InferPropTypes, MpErrorOptions$1 as MpErrorOptions, PageConstructor, PageInstance, PageOptions, PageQuery, PageState, PropItem, PropOption, PropType, Props, PropsOptions, RefMap, RequestBody, RequestFactory, RequestInitOptions, RequestOptions, RequestResponse, RequestType, RichTextNode, RouteCustomConfig, RoutePathConfig, SetCookieOptions, StorageData, Task, TextNode, TrivialComponentInstance, TrivialComponentOptions, TrivialPageInstance, TrivialPageOptions, UpdateInfo, UrlInfo, WildCardEventHandlerList, WildcardHandler };
|
package/dist/index.d.ts
CHANGED
|
@@ -150,7 +150,13 @@ declare const logger_filter: typeof filter;
|
|
|
150
150
|
declare const logger_info: typeof info;
|
|
151
151
|
declare const logger_warn: typeof warn;
|
|
152
152
|
declare namespace logger {
|
|
153
|
-
export {
|
|
153
|
+
export {
|
|
154
|
+
logger_debug as debug,
|
|
155
|
+
logger_error as error,
|
|
156
|
+
logger_filter as filter,
|
|
157
|
+
logger_info as info,
|
|
158
|
+
logger_warn as warn,
|
|
159
|
+
};
|
|
154
160
|
}
|
|
155
161
|
|
|
156
162
|
/**
|
|
@@ -187,7 +193,11 @@ declare const query_join: typeof join;
|
|
|
187
193
|
declare const query_parse: typeof parse;
|
|
188
194
|
declare const query_stringify: typeof stringify;
|
|
189
195
|
declare namespace query {
|
|
190
|
-
export {
|
|
196
|
+
export {
|
|
197
|
+
query_join as join,
|
|
198
|
+
query_parse as parse,
|
|
199
|
+
query_stringify as stringify,
|
|
200
|
+
};
|
|
191
201
|
}
|
|
192
202
|
|
|
193
203
|
/**
|
|
@@ -991,7 +1001,7 @@ declare const $Config: (config: AppConfigOptions) => void;
|
|
|
991
1001
|
declare const getConfig: () => Config;
|
|
992
1002
|
|
|
993
1003
|
/** 文件编码 */
|
|
994
|
-
type FileEncoding = "
|
|
1004
|
+
type FileEncoding = "ascii" | "base64" | "binary" | "hex" | "latin1" | "ucs2" | "ucs-2" | "utf8" | "utf-8" | "utf16le" | "utf-16le";
|
|
995
1005
|
declare const dirname: (path: string) => string;
|
|
996
1006
|
/** 判断文件或文件夹是否存在 */
|
|
997
1007
|
declare const exists: (path: string) => boolean;
|
|
@@ -1639,8 +1649,10 @@ interface RequestFactory {
|
|
|
1639
1649
|
declare const createRequest: ({ cookieStore, server, requestHandler, responseHandler, errorHandler, ...defaultOptions }?: RequestInitOptions) => RequestFactory;
|
|
1640
1650
|
|
|
1641
1651
|
type AllowTag = "a" | "abbr" | "address" | "article" | "aside" | "b" | "bdi" | "bdo" | "blockquote" | "br" | "caption" | "cite" | "code" | "col" | "colgroup" | "dd" | "del" | "div" | "dl" | "dt" | "em" | "fieldset" | "footer" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "header" | "hr" | "i" | "img" | "ins" | "label" | "legend" | "li" | "mark" | "nav" | "ol" | "p" | "pre" | "q" | "rt" | "ruby" | "s" | "section" | "small" | "span" | "strong" | "sub" | "sup" | "table" | "tbody" | "td" | "tfoot" | "th" | "thead" | "tr" | "tt" | "u" | "ul";
|
|
1652
|
+
type DeprecatedTag = "big" | "center" | "font";
|
|
1653
|
+
type ConvertedTag = "html" | "body" | "svg";
|
|
1642
1654
|
declare const ALLOWED_TAGS: [
|
|
1643
|
-
tag: AllowTag |
|
|
1655
|
+
tag: AllowTag | DeprecatedTag | ConvertedTag,
|
|
1644
1656
|
allowedAttrs?: string[]
|
|
1645
1657
|
][];
|
|
1646
1658
|
|
|
@@ -1867,6 +1879,7 @@ declare class Element extends NodeWithChildren {
|
|
|
1867
1879
|
"x-attribsPrefix"?: Record<string, string>;
|
|
1868
1880
|
}
|
|
1869
1881
|
|
|
1882
|
+
declare const getHTML: (content: string | AnyNode | AnyNode[]) => string;
|
|
1870
1883
|
declare const parseHTML: (content: string) => AnyNode[];
|
|
1871
1884
|
|
|
1872
1885
|
interface ElementNode {
|
|
@@ -1897,6 +1910,10 @@ interface ParserOptions {
|
|
|
1897
1910
|
|
|
1898
1911
|
declare const getRichTextNodes: (content: string | AnyNode[], { appendClass, transform }?: ParserOptions) => Promise<RichTextNode[]>;
|
|
1899
1912
|
|
|
1913
|
+
/** SVG 转换 */
|
|
1914
|
+
declare const convertSVGToDataURI: (content: string) => string;
|
|
1915
|
+
|
|
1900
1916
|
declare const getText: (content: string | AnyNode[]) => string;
|
|
1901
1917
|
|
|
1902
|
-
export { $App, $Component, $Config, $Page, ALLOWED_TAGS,
|
|
1918
|
+
export { $App, $Component, $Config, $Page, ALLOWED_TAGS, Cookie, CookieStore, Emitter, Headers, MpError$1 as MpError, Queue, URLSearchParams, addContact, appState, check, checkAsync, compareVersion, confirm, convertSVGToDataURI, createRequest, decode as decodeBase64, dirname, download, userEmitter as emitter, encode as encodeBase64, env, exists, funcQueue, get, getAsync, getConfig, getCookieScopeDomain, getCurrentPage, getCurrentRoute, getDomain, getHTML, getRef, getRichTextNodes, getText, getUrlInfo, getWindowInfo, go, handleProperties, isDir, isFile, isFunction, lock, logger, ls, mkdir, normalizeDomain, once, openDocument, parseCookieHeader, parseHTML, parseUrl, put, query, reLaunch, readFile, readJSON, redirect, remove, removeAsync, removeRef, reportNetworkStatus, request, requestCookieStore, retry, rm, saveDocument, saveFile, saveOnlineFile, savePhoto, set, setAsync, setRef, showModal, showToast, storage, switchTab, take, type, unzip, updateApp, wrapFunction, writeClipboard, writeFile, writeJSON };
|
|
1919
|
+
export type { AllowTag, AppConfigCommonOptions, AppConfigOptions, AppConstructor, AppInstance, AppOptions, ComponentConstructor, ComponentInstance, ComponentLifetimes, ComponentOptions, Config, ConvertedTag, CookieMap, CookieOptions, CookieStoreType, CookieType, DeprecatedTag, ElementNode, EmitterInstance, Env, EventHandlerList, EventHandlerMap, EventType, ExtendedAppMethods, ExtendedComponentMethods, ExtendedComponentProperty, ExtendedPageLifeCycles, ExtendedPageMethods, ExtendedPageProperties, ExtendsAppOptions, Handler, HeadersInit, InferFromType, InferPropType, InferPropTypes, MpErrorOptions$1 as MpErrorOptions, PageConstructor, PageInstance, PageOptions, PageQuery, PageState, PropItem, PropOption, PropType, Props, PropsOptions, RefMap, RequestBody, RequestFactory, RequestInitOptions, RequestOptions, RequestResponse, RequestType, RichTextNode, RouteCustomConfig, RoutePathConfig, SetCookieOptions, StorageData, Task, TextNode, TrivialComponentInstance, TrivialComponentOptions, TrivialPageInstance, TrivialPageOptions, UpdateInfo, UrlInfo, WildCardEventHandlerList, WildcardHandler };
|