From 66550576b6aceec1f54a16cd7226597d5df4b431 Mon Sep 17 00:00:00 2001 From: qiaocl <3189782663@qq.com> Date: Fri, 27 Sep 2024 17:36:13 +0800 Subject: [PATCH] =?UTF-8?q?09/27=E9=80=9A=E7=94=A8=E5=8D=A1=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- node_modules/vconsole/CHANGELOG.md | 535 -------- node_modules/vconsole/CHANGELOG_CN.md | 533 -------- node_modules/vconsole/LICENSE | 9 - node_modules/vconsole/README.md | 196 --- node_modules/vconsole/README_CN.md | 199 --- node_modules/vconsole/build/vendor.d.ts | 24 - node_modules/vconsole/dist/vconsole.min.d.ts | 1237 ------------------ node_modules/vconsole/dist/vconsole.min.js | 10 - node_modules/vconsole/package.json | 70 - 9 files changed, 2813 deletions(-) delete mode 100644 node_modules/vconsole/CHANGELOG.md delete mode 100644 node_modules/vconsole/CHANGELOG_CN.md delete mode 100644 node_modules/vconsole/LICENSE delete mode 100644 node_modules/vconsole/README.md delete mode 100644 node_modules/vconsole/README_CN.md delete mode 100644 node_modules/vconsole/build/vendor.d.ts delete mode 100644 node_modules/vconsole/dist/vconsole.min.d.ts delete mode 100644 node_modules/vconsole/dist/vconsole.min.js delete mode 100644 node_modules/vconsole/package.json diff --git a/node_modules/vconsole/CHANGELOG.md b/node_modules/vconsole/CHANGELOG.md deleted file mode 100644 index 1667185c..00000000 --- a/node_modules/vconsole/CHANGELOG.md +++ /dev/null @@ -1,535 +0,0 @@ -English | [简体中文](./CHANGELOG_CN.md) - -## 3.15.1 (2023-06-01) - -- `Feat(Netwrk)` Add new option `network.ignoreUrlRegExp` to skip some requests. (PR #623) -- `Fix(Core)` Fix prototype pollution in `vConsole.setOption()`. (issue #616 #621) -- `Fix(Core)` Fix plugin event `ready` triggering before its HTML finishes rendering. (issue #591) -- `Fix(Log)` Reset group state when `console.clear()` is called. (issue #611) -- `Fix(Log)` Compatible with iOS (less than 13.4) that does not support `ResizeObserver`, but there may be a potential performance issue when printing a large number of logs. (issue #610) -- `Fix(Network)` Fix possible "Cannot read property" error by `sendBeacon`. (issue #615) - - -## 3.15.0 (2022-11-02) - -- `Feat(Log)` Add recycle scrolling to imporove performance, and add scroll to top/bottom buttons. (PR #570) -- `Feat(Log)` Add support for `console.group(), console.groupCollapsed(), console.groupEnd()`. (issue #545) -- `Feat(Network)` Add recycle scrolling to imporove performance. -- `Feat(Network)` Add "Start Time" of a request. -- `Feat(Network)` Use `curl` instead of `url` as the copy value of a request. (issue #410) -- `Fix(Storage)` Fix an event bug that overflow content cannot scroll. (issue #542) -- `Fix(Core)` Fix click event on `` 的点击事件问题。 (PR #577) - - -## 3.14.7 (2022-09-23) - -- `Perf(Log)` 优化打印日志时的性能。 (PR #567) -- `Fix(Core)` 修复因设置 `pluginOrder` 导致插件面板排序错误的问题。 (issue #559) -- `Fix(Core)` 修复因 `Touch` 事件中的 `preventDefault` 导致的 intervention 错误。 (issue #546) -- `Fix(Log)` 修复 `window.onerror` 丢失换行的问题。 -- `Fix(Log)` 修复清除命令行按钮在 iOS Safari 中无法点击的问题。 (PR #564) -- `Fix(Log)` 修复一处误判循环引用对象的笔误。 (issue #566) -- `Fix(Log|Network)` 以标准 JSON 格式复制对象或数组。 (issue #547) -- `Fix(Network)` 修复因 `window` 对象被代理导致 `Fetch` 一直为 pending 状态的问题。 (issue #556) -- `Fix(Storage)` 修复因设置 `storage.defaultStorages` 导致 Storage 面板排序错误的问题。 (issue #560) -- `Chore` 添加 `env['no-core-js']` 选项来停用构建时使用 core-js polyfill。 (PR #562) - - -## 3.14.6 (2022-04-14) - -- `Fix(Log)` 修复当销毁后再次初始化 vConsole 时失去追踪 logs 的问题。 -- `Fix(Network)` 修复 `resp.body` undefined 错误。 (issue #531) -- `Fix(Network)` 修复 `xhr.setRequestHeader` 被覆盖改写时丢失 Request Headers 的问题。 (issue #533) -- `Chore` 更新 NPM 依赖。 - - -## 3.14.5 (2022-04-06) - -- `Fix(Core)` 修复极短时间内重复初始化 vConsole 导致的报错。 (issue #525) -- `Fix(Log)` 修复 `console.time | console.timeEnd` 不输出日志的问题。 (issue #523) -- `Fix(Element)` 修复更新 attributes 时引起的 `undefined is not an object` 错误。 (issue #526) -- `Fix(Network)` 当请求完成后,不再代理 response body reader。 -- `Chore` 修复 Svelte 在 Windows 环境中未被 Babel 转义的问题。 (PR #528) - - -## 3.14.4 (2022-03-31) - -- `Fix(Network)` 修复回包超大时导致的卡死问题。 (issue #515) -- `Fix(Network)` 修复 XHR 中缺失显示 Request Headers 的问题。 (issue #522) - - -## 3.14.3 (2022-03-28) - -- `Fix(Network)` 修复 `response.size` 错误。 - - -## 3.14.2 (2022-03-25) - -- `Fix(Network)` 删除调试日志。 -- `Chore` 在构建时自动删除 `console.log` 以确保调试日志不会出现在正式版本中。 -- `Chore` 添加新的编译命令以编译出不同场景下的文件。 - - -## 3.14.1 (2022-03-24) - -- `Fix(Network)` 修复当 `readyState === 3` 时的 `responseSize` 错误。 - - -## 3.14.0 (2022-03-23) - -- `Feat(Core)` 新增配置项 `pluginOrder` 来调整插件面板的排序,见 [公共属性及方法](./doc/public_properties_methods_CN.md)。 -- `Feat(Core)` 切换插件面板时,面板会自动滚动到上次的位置。 -- `Feat(Network)` 新增显示 Response 的体积。 -- `Feat(Network)` 新增对 `transfer-encoding: chunked` 的支持,现在可记录流式回包(stream response)。 -- `Feat(Network)` 展示时裁剪过大的 Response 回包以提高渲染性能。 -- `Refactor(Network)` 提高网络记录的准确性,以避免被外部库(如 Axios)覆盖;方法是对 `XMLHttpRequest | fetch` 使用 Proxy。 - - -## 3.13.0 (2022-03-15) - -- `Feat(Log)` 新增配置项 `log.showTimestamps`,见 [公共属性及方法](./doc/public_properties_methods_CN.md)。 -- `Fix(Core)` 使用模拟的 `click` 事件以避免某些场景下原生 click 事件不生效的问题。 -- `Fix(style)` 修复微信 Webview 中的 CSS transition 失效的问题,通过使用 `bottom` 而非 `transform`。 -- `Fix(Core)` 修复在 `onReady` 回调中调用 vConsole 方法导致报错的问题。 (issue #516) -- `Refactor(Storage)` 提高健壮性。 - - -## 3.12.1 (2022-02-25) - -- `Fix(Core)` 修复当 VConsole 作为新模块 `import` 时 `VConsole.instance` 为空的问题。 -- `Chore(Core)` 修复由外部依赖库引起的 TypeScript 类型声明错误问题。 - - -## 3.12.0 (2022-02-17) - -- `Feat(Core)` 新增静态属性 `VConsole.instance` 以获取实例化后的单例 vConsole 对象。 -- `Feat(Core)` 新增配置项 `storage.defaultStorages`,见 [公共属性及方法](./doc/public_properties_methods_CN.md)。 -- `Feat(Core)` 更新 `vConsole.setOption()` 用法:通过 `setOption('log.maxLogNumber', 20)` 来单独设置 `maxLogNumber` 字段,或通过 `setOption({ log: { maxLogNumber: 20 }})` 来覆盖 `log` 对象。 -- `Feat(Core)` 废弃一些配置项,参见下面。 -- `Fix(Plugin)` 修复插件事件 `renderTab` 没有渲染出视图的 bug。 -- `Fix(Storage)` 修复某些情况下的 Cookie 解析错误问题。 (issue #508, #509) - -**废弃的配置项:** - -- `maxLogNumber`:用 `option.log.maxLogNumber` 替代。 -- `maxNetworkNumber`:用 `option.network.maxNetworkNumber` 替代。 -- `onClearLog`:移除。 - - -## 3.11.2 (2022-01-20) - -- `Feat(Storage)` 增加 "Clear" 按钮以批量删除所有 storage。 (issue #499) -- `Fix(Storage)` 修复无法删除 cookies 的问题。 (issue #499) - - -## 3.11.1 (2022-01-13) - -- `Feat(Log)` 支持使用回车键提交命令行输入。 (issue #498) -- `Fix(Network)` 修复 `init.body` 参数报错。 (issue #500) - - -## 3.11.0 (2021-12-30) - -- `Feat(Core)` 支持自定义挂载点,配置项 `vConsole.option.target` 见 [公共属性及方法](./doc/public_properties_methods_CN.md)。 (issue #455) -- `Feat(Log)` 新增插件方法 `vConsole.log.log()|info()|...`、`vConsole.log.clear()`,见 [内置插件:属性及方法](./doc/plugin_properties_methods_CN.md)。 -- `Feat(Network)` 新增插件方法 `vConsole.network.add()|update()`、`vConsole.network.clear()`,见 [内置插件:属性及方法](./doc/plugin_properties_methods_CN.md)。 -- `Feat(Network)` 支持限制请求数量,配置项 `vConsole.option.maxNetworkNumber`见 [公共属性及方法](./doc/public_properties_methods_CN.md)。 (issue #492) -- `Fix(Network)` 在所有 HTTP Methods 中都会展示 Request Payload,而非仅限于 POST。 (issue #493) -- `Fix(Element)` 修复由于新增 Comment 节点导致的死循环问题。 (issue #491) - - -## 3.10.1 (2021-12-23) - -- `Feat(Network)` 格式化输出 response 中的 JSON 内容。 (issue #486) -- `Fix(Style)` 当 `initial-scale !== 1` 时,避免面板随页面缩放大小。 -- `Fix(Core)` 修复 PC 模式下点击面板按钮无效的问题。 (issue #487) -- `Fix(Network)` 当 Query/Payload/Headers 是对象或数组时,展示为结构化的 JSON 格式而非 `[object Object]`。 -- `Fix(Network)` 当某些情况下 XHR 对象被复用时,避免多次覆盖XHR对象的 `onreadystatechange` 以造成错误。 (issue #214) - - -## 3.10.0 (2021-12-17) - -> 这个版本中,我们重构了大部分核心逻辑,并且使用 Svelte 作为所有面板的视图层模板引擎。 -> 这带来了一些重大变化(Breaking changes),少数属性和方法无法保证向下兼容。 -> 如果你是 vConsole 插件开发者,应该关注这些变化。 - -**Breaking Changes:** - -- `Refactor(Core|Log|Network|Element)` 使用 Svelte 作为所有视图的模板引擎。 -- `Refactor(Core)` **删除** `vConsole.(tabList | activedTab | $dom)` 属性。 -- `Refactor(Plugin)` **重命名** `vConsole.showTab(pluginID)` 为 `vConsole.showPlugin(pluginID)`。 -- `Refactor(Plugin)` **更新**插件事件 `addTopBar` 的配置参数 `{ data, onClick }`: `onClick` 会接收 2 个参数(之前是 0 个): `(event: Event, data?: any) => boolean`,其中 `data` 为上述配置参数的 `data` 字段。 -- `Feat(Core)` **删除**辅助函数 `vConsole.tool` 和 `vConsole.$`。 - -**Common Updates:** - -- `Feat(Log)` 支持展示对象键值为 `Symbol` 类型的键值对。 -- `Feat(Log)` 命令行支持多级关键字提示。 -- `Feat(Log)` 支持使用 `%s, %d, %o` 来格式化展示字符串,并且优化了 `%c` 的 CSS 样式逻辑。 -- `Feat(Log)` 对存在大量键值的对象或数组,加入翻页逻辑以提升渲染性能,每 50 一页。 -- `Feat(Network)` Request 的属性值支持复制。 -- `Feat(Element)` 提升交互体验,选中的节点将会被高亮,并且展开/收起(Expand/Coolapse)基于选中的节点来进行。 -- `Feat(Style)` 样式标签会在 vConsole 初始化后才注入 `` 中,并在 vConsole 销毁后会自动移除。 -- `Refactor(Storage)` 优化了部分交互体验。 -- `Fix(Network)` 当 `Fetch` 发生 Error 时,会 throw 到外部,以符合标准实现。 (issue #458) - -## 3.9.5 (2021-11-10) - -- `Style(Log)` 支持 `BigInt` 类型并更新 `Symbol` 类型的样式。 -- `Refactor(Style)` 在 vConsole 初始化时再懒加载 style 标签(而非 import 后就加载)。 -- `Fix(Core)` 使用 `this || self` 作为 `globalObject`,以避免 `self is not defined` 错误。 (issue #441) -- `Fix(Log)` 修复打印 `Symbol` 类型时产生的 `Cannot convert a Symbol value to a string` 错误。 -- `Fix(Log)` 修复 commands 命令及其输出结果无法复制的问题。 -- `Fix(Network)` 修复解码 URL 参数时产生的 `URIError` 错误。 (issue #470) -- `Fix(Network)` 修复潜在的由 `forEach` 引起的错误。 (issue #471) -- `Chore` 转换 Svelte 代码产物到 ES5 标准,以避免 ES6 引发的构建问题。 (issue #468) - - -## 3.9.4 (2021-10-26) - -- `Refactor(Core)` 为 `VConsole` 类的方法参数添加 Typescript 声明. - - -## 3.9.3 (2021-10-22) - -- `Fix(Network)` 修复未完成初始化时调用 `setOption()` 导致的 `Cannot read property 'setAttribute' of null`错误。 (PR #453 by @Zhangstring) -- `Fix(Network)` 修复 iOS < 11 时产生的 `Fetch` 错误. (PR #457 by @zimv) -- `Chore` 构建时自动生成 `.d.ts` 声明。 (RP #433 by @ManiaciaChao) -- `Chore` 从 Git 版本控制中移除 `./dist` 目录。 - - -## 3.9.1 (2021-07-27) - -- `Fix(Log)` 修正命令行输入框样式。 (PR #437 by @FredZeng) -- `Fix(Storage)` 修复由 `globalThis` 引起的报错。 (issue #438 #439) -- `Chore` 修复由 Svelte 引起的 `const` `let` 报错。 (PR #440 by @dellyoung) - - -## 3.9.0 (2021-07-16) - -- `Feat(Log)` 显示 audio 资源加载失败的报错。 (PR #419 by @zimv) -- `Feat(Storage)` 重写 Storage 面板,现支持添加/编辑/删除内容。 (PR #429 by @ManiaciaChao) -- `Feat(Plugin)` 新增第三方插件 [vite-plugin-vconsole](https://github.com/vadxq/vite-plugin-vconsole)。 (by @vadxq) -- `Refactor(Core)` 开始使用 Svelte 作为模板引擎。 (PR #429 by @ManiaciaChao) -- `Refactor(Core|Element)` 转换 core 文件及 Element 面板为 `.ts` 文件。 -- `Fix(Log)` 修复打印无 `toJSON` 方法的对象(如 `Vue` 实例)时会报错的问题。 (PR #431 by @sillyhong) -- `Fix(Network)` 修复不以 `http` 开头的 url 会报错的问题。 (issue #420) -- `Fix(Network)` 修复使用 `Request` 作为 `Fetch` 参数时的报错。 (PR #428 by @tatsunoneko) -- `Fix(Network)` 当 `POST` 数据为一个 JSON 字符串时亦以 key-value 型键值表来显示数据。 (issue #425) -- `style` 修正 LESS 数学运算符。 (PR #426 by @ManiaciaChao) -- `Chore` 修复执行 `yarn serve` 的报错。 (issue #424) - - -## 3.8.1 (2021-06-24) - -- `Fix(Log)` 不再合并包含 object 或 array 的重复日志,以避免合并结构相同但取值不同的对象。 -- `Fix(Log)` 修复日志过滤器(Filter)在点选日志类型 tab 后不生效的问题。 -- `Fix(Network)` 修复 url 以 `//` 开头时产生的错误。 (PR #414 by @kooritea) -- `Chore` 移除 babel-loader 的 `exclude: node_modules` 选项以避免第三方库的兼容性问题。 (issue #404, #407) -- `Refactor(Log)` 转换 Log 和 System 面板为 `.ts` 文件。 - - -## 3.8.0 (2021-06-23) - -- `Feat(Log)` 新增显示资源(image/video/link/script)加载失败报错。 (PR #411 by @zimv) -- `Chore` 新增 Webpack 配置 `target: ['web', 'es5']` 以避免兼容性问题。 (issue #404) -- `Fix(Network)` 修复 `new URL('x', undefined)` 第二参数为 `undefined` 时的报错。 (PR #409 by @moonkop) - - -## 3.7.0 (2021-05-27) - -- `Feat(Storage)` 对于大体积 value 先展示预览值,以避免堵塞渲染。 (issue #300) -- `Feat(Storage)` 新增复制按钮、删除按钮。 -- `Feat(Core)` 当初始参数 `theme` 为空时,跟随系统默认主题色。 -- `Refactpr(Storage)` 转换 Storage 面板为 `.ts` 文件。 -- `Fix(Network)` 使用 `forEach` 而非 `.entries()` 来遍历 `headers` 以避免一些兼容性问题。 (issue #404) -- `Fix(Network)` 修复 `Content-Type` 为空时导致的报错。 - - -## 3.6.1 (2021-05-24) - -- `Fix(Network)` 修复 "Invalid base URL" 错误。 (PR #402) - - -## 3.6.0 (2021-05-21) - -- `Feat(Log)` 新增输出 `unhandledrejection` 类型日志。 (PR #389 by @zimv) -- `Feat(Network)` 新增支持展示 `navigator.sendBeacon()` 的网络请求。 (PR #383 by @cola119) -- `Feat(Network)` 新增在 "General" 栏目展示 "Type" (Request Type) 字段,取值包括 `xhr|fetch|ping`。 -- `Refactpr(Core)` 开始使用 TypeScript 重构代码。现在 Network 面板首先转成了 `.ts` 文件。 -- `Fix(Network)` 修复移除 Network 面板后没有恢复原生 `window.fetch()` 方法的问题。 -- `Fix(Storage)` 修复清除所有 cookie 时无法完全删除非顶级域名下的 cookie 的问题。 (issue #398) -- `Fix(Element)` 修复当 element 的 `attributes` 或 `characterData` 变化时 element 被嵌套渲染的问题。 (issue #399) - - -## 3.5.2 (2021-05-13) - -- `Chore` 升级到 Webpack5,并升级所有 NPM packages 到最新版本。 -- `Fix(Core)` 修复因 `selection` 选区引起的点击事件无效问题。 -- `Fix(Log)` 当日志数量达到 `maxLogNumber` 上限时清空对应的 `cachedLogs`。 -- `Fix(Log)` 修复 XSS 漏洞。 - - -## 3.5.1 (2021-05-07) - -- `Chore(Babel)` 修复由 `catch` 写法引起的 babel-loader 构建问题。 (PR #392 by @myl0204) -- `Fix(Network)` 修复语法笔误。 (PR #388 by @xovel) - - -## 3.5.0 (2021-04-28) - -- `Feature(Log)` 新增复制单行日志的能力。 (by @akai) -- `Feature(Plugin)` 新第三方插件 [vconsole-vue-devtools-plugin](https://github.com/Zippowxk/vue-vconsole-devtools)。 (by @Zippowxk) -- `Perf(System)` 将 "System" 字段改名为 "Client",并新增 `MacOS` 系统版本号。 -- `Fix(Log)` 使用自然排序来排序 object 和 array 的键值。 (issue #372) -- `Fix(Network)` 修复当 `contentType` 为 `text/html` 时潜在的 JSON 错误。 (by @zimv) -- `Fix(Network)` 修复 `disableLogScrolling` 参数在 Network 面板中不生效的问题。 (issue #282, #379) - - -## v3.4.1 (2021-04-09) - -- `Feature(Core)` 新增 `setSwitchPosition(x, y)` 方法以更新开关按钮的位置,见 [Public Properties & Methods](./doc/public_properties_methods_CN.md)。 -- `Perf(Core)` 添加 `Symbol` polyfill。(issue #361) -- `Fix(Core)` 修复 `setOption()` 后主题样式未及时更新的问题。 -- `Fix(Core)` 删除 `transitionEnd` 以避免一些兼容性问题。(issue #364) -- `Fix(Network)` 修复 `fetch` 的 `init` 未考虑为可选参数的问题。(issue #363, #365) -- `Fix(Network)` 修复 XSS 漏洞。 - - -## v3.4.0 (2021-01-14) - -- `Feature(Core)` 支持暗黑模式,配置项 `vConsole.option.theme` 见 [Public Properties & Methods](./doc/public_properties_methods_CN.md)。(by @progrape) -- `Feature(Core)` 开关按钮加入拖拽安全区,避免遮挡全面屏手机底部操作区。(issue #353) -- `Feature(Log)` 指令输入框键入括号且自动补全括号后,光标将自动移动到括号内部。(issue #293) -- `Feature(System)` 增加显示 `Location` 信息。(issue #343) -- `Feature(Network)`支持 `fetch` 网络记录。(by @weiqian93) -- `Feature(Network)` 支持显示 Request Headers。 -- `Feature(Network)` 仅显示简短网址,URL 参数将显示在详细信息中。(issue #291) -- `Feature(Plugin)` 新第三方插件 [vconsole-stats-plugin](https://github.com/smackgg/vConsole-Stats)。(by @smackgg) -- `Fix(Core)` 修复点击开关按钮后位置会被重置的问题。 -- `Fix(Core)` 修复 `document.documentElement.offsetHeight|offsetWidth` 在新浏览器中不够准确的问题。(by @littlee) -- `Fix(Core)` 阻止用户事件派发到 readOnly 或 disabled 的 element 上。(by @norux) -- `Fix(Core)` 修复 nonce 查找不准确的问题。(by @sunderls) -- `Fix(Core)` 修复一个安全问题。(#345 by @QiAnXinCodeSafe) -- `Fix(Core)` 屏蔽 "webkitStorageInfo deprecation" 告警。 -- `Perf(Core)` 删除 `Symbol`、`Array.from` polyfill。(issue #325, #275) -- `Perf(Core)` 日志中显示对象内所有的 enumerable 和 unenumerable 属性。 (issue #327) -- `Chore` 更新 Webpack DevServer 的配置项。(by @QinZhen001) - - -## v3.3.4 (2019-08-19) - -- `Feature(Log)` 增加 `%c` 以支持自定义日志样式,详情见 [使用教程](./doc/tutorial_CN.md)。 -- `Feature(Plugin)` 增加 `VConsole.VConsoleLogPlugin` 等 `VConsole.VConsole*` 内置插件在 `VConsole` class 上的挂载。 -- `Fix(Core)` 修复若干小问题。(#267 by @Molunerfinn, #272 by @domom) -- `Fix(Storage)` 修复当 cookie `path=/` 或设置了 `domain` 时删除失败的问题。(#264 by @qianxinfeng) -- `Perf(Core)` 在 `window DOMContentLoaded` 而不是 `window load` 时显示 vConsole。 - - -## v3.3.2 (2019-07-04) - -- `Feature(Core)` 增加 TypeScript 声明文件。(by @jas0ncn) -- `Fix(Core)` 修复开关按钮拖动后位置不对的问题。(by @rexschuang) -- `Fix(Core)` 修复若干小问题。(by @stenders) -- `Fix(Log)` 不在列表底部时避免自动滚动。(by @ele828) - - -## v3.3.0 (2019-02-02) - -- `Feature(Log)` 新增自动合并相同日志的能力。频繁输出相同日志时不再会被刷屏。 -- `Fix(Log)` 修复格式化日志(如 `console.log('[foo]', 'bar')`)无法显示到 Log 面板的问题。 - - -## v3.2.2 (2019-01-17) - -- `Feature` 新增控制台输入提示。 (by @65147400) -- `Feature` 支持 SessionStorage。 (by @hkc452) -- `Fix` 修复 `JSON.stringify` 函数被错误地改写的问题。 -- `Fix` 修复清空日志时没有重置 `logNumber` 的问题。 (by @liuyuekeng) -- `Fix` 修复 Network 面板中 HTML 标签未被 encode 的问题。 (by @mokang) -- `Fix` 修复 Storage 面板 decode 内容时可能会导致崩溃的问题。 (by @wolfsilver) -- `Fix` 修复 CSP 签名获取失败问题。 (by @scotthuang) -- `Perf` 增加底部安全区域,适配 iPhone X 等全面屏。 (by @dingyi1993) - - -## v3.2.0 (2018-04-10) - -- `Feature` 支持 `console.time()` 及 `console.timeEnd()`。 -- `Feature` 新增 `disableLogScrolling` 配置项(`vConsole.option`),用于禁止新日志引起的自动滚动到底部。 -- `Fix` 修复初始化后立即调用 `setOption` 引起的错误。 -- `Fix` 修复 cookies 显示错误的问题。 -- `Fix` 修复 "Uncaught InvalidStateError" 错误。 (by @fireyy) - - -## v3.1.0 (2017-12-27) - -- `Feature` 新增 `vConsole.showSwitch()` 及 `vConsole.hideSwitch()` 方法,请查阅[公共属性及方法](./doc/public_properties_methods_CN.md)。 -- `Feature` 新增 `onReady` 及 `onClearLog` 回调方法,位于 `vConsole.option`。 -- `Feature` 调用 `console.clear` 时将自动清除面板中的日志。 -- `Fix` 修复 Windows 下构建引起的 `\r` 转义问题。 -- `Fix` 修复 iOS8 或其它低版本系统中的 `Symbol` 错误。 - - -## v3.0.0 (2017-09-27) - -基础: - -- `Feature` 需要手动初始化 vConsole:`var vConsole = new VConsole(option)`。 -- `Feature` 新增 `vConsole.option` 配置项,配置项可在实例化时传入,也可通过 `vConsole.setOption(key, value)` 更新。 -- `Feature` 支持自定义按需加载内置插件,配置项为 `option` 里的 `defaultPlugins` 字段。 -- `Perf` 支持 CSP 规则 `unsafe-eval` 和 `unsafe-inline`。 -- `Perf` 优化 `initial-scale < 1` 时的 `font-size`。 - -Log 插件: - -- `Feature` 支持 `maxLogNumber` 配置项,以控制面板内展示的最多日志数量。 -- `Fix` 修复打印大型复杂 object 时引起的崩溃问题。 -- `Perf` 只有 `console.log('[system]', xxx)` 这种将 `[system]` 放在第一位参数的写法,才会输出到 System 面板。因此可以规避 `[foo] bar` 这类格式无法正确打印到 Log 面板的问题。 - -Network 插件: - -- `Feature` 新增 `Query String Parameters` 和 `Form Data` 两栏,以展示 GET 和 POST 的参数。 -- `Perf` 自动格式化展示 JSON 类型的回包。 -- `Fix` 修复 status 一直为 "Pending" 的问题。这种问题一般是引入了第三方的 HTTP 库而引起的。 - - -插件模块: - -- `Feature` 在 `init` 事件触发时/之后,插件实例内可以通过 `this.vConsole` 来获取到 vConsole 的对象实例。 -- `Feature` 新增 `updateOption` 事件,以监测 `vConsole.option` 的更新。 -- `Feature` 新增 Element 面板作为默认的内置插件。 -- `Feature` 新增 Storage 面板作为默认的内置插件。 - - - -## v2.x.x - -## v2.5.2 (2016-12-27) - -- `Fix` 捕获执行自定义命令行时发生的错误。 - - -## v2.5.1 (2016-10-18) - -- `Fix` 修复一些情况下的 `scrollHeight` 错误。 -- `Fix` 修正 iOS 8 下的 flex 布局问题。 -- `Perf` 性能增强。 - - -## v2.5.0 (2016-09-28) - -- `Feature` 新增 `vConsole.removePlugin()` 方法,请查阅[公共属性及方法](./doc/public_properties_methods_CN.md)。 -- `Feature` 新增 `remove` 插件事件,请查阅[插件:Event 事件列表](./doc/plugin_event_list_CN.md)。 -- `Perf` 页面不会随着 vConsole 的滚动而滚动。 -- `Fix` 修正 `window.onerror()` 内的函数调用笔误。 - - -## v2.4.0 (2016-08-31) - -- `Feature` 新增 `addTopBar` 插件事件,请查阅[插件:Event 事件列表](./doc/plugin_event_list_CN.md)。 -- `Feature` 新增日志类型筛选功能。 -- `Perf` 若 log 列表不处于最底部,当打印新 log 时,列表则不会自动滚动到最新 log 处。 -- `Perf` 优化了一些 UI 样式问题。 -- `Fix` 修正打印 object 类型 log 时的 XSS 问题。 -- `Fix` 在某些特殊情况中,开关按钮将不会再被定位出页面外。 - - -## v2.3.1 (2016-08-16) - -- `Fix` 删除 V2.3.0 中的 `tap` 事件,恢复为 `click` 事件(依旧支持快速响应),以避免冲突。 -- `Perf` 删除 System tab 中的 `now` 项目并新增 `navigationStart` 时间戳。 - - -## v2.3.0 (2016-08-15) - -- `Feature` 支持逐级展开 Object 或 Array 的子元素。 -- `Feature` 支持显示 Object 内的不可枚举属性。 -- `Perf` 支持在 vConsole 的 DOM 容器内使用 `tap` 事件以代替 `click` 事件。 - - -## v2.2.1 (2016-08-08) - -- `Feature` 在 System 面板中添加完整的 performance timing 测速点。 -- `Perf` 在 README 中新增第三方插件列表。 - - -## v2.2.0 (2016-07-13) - -- `Feature` 新增 `vConsole.version` 属性,以获取当前版本号。 -- `Feature` 新增 `XMLHttpRequest` 的 `xhr._noVConsole` 属性,以控制一个网络请求是否显示在 Network tab 中。 - - -## v2.1.0 (2016-06-29) - -- `Feature` 新增 `vConsole.tool` 及 `vConsole.$` 辅助函数,请查阅[辅助函数](./doc/helper_functions_CN.md)。 -- `Feature` 公开部分 vConsole 的属性及方法,请查阅[公共属性及方法](./doc/public_properties_methods_CN.md)。 -- `Fix` 修复 `window.onerror()` 中 `error` 可能为空而导致堆栈读取错误的问题。 -- `Fix` 修复当 `xhr.readyState < 4` 时读取 `xhr.status` 可能导致错误的问题。 - - -## v2.0.1 (2016-06-16) - -- `Fix` 修复 vConsole 可能无法运行在 X5 内核浏览器的问题。 -- `Fix` 修复某些设备不支持 `localStorage` 的问题。 -- `Fix` 修复布尔值在 Log 面板展示不正确的问题。 -- `Perf` 优化在 Android 设备下的 UI 表现。 - - -## v2.0.0 (2016-06-05) - -- `Feature` 完全重构,支持自定义插件,请查阅[插件:入门](./doc/plugin_getting_started_CN.md)。 -- `Feature` 支持手动输入、执行命令行。 -- `Feature` 支持打印循环引用的对象。 -- `Feature` 支持在 Network 面板查看请求的 headers 和 response。 -- `Perf` 开关按钮不会再被拖出屏幕外部。 -- `Perf` 自动在 System 面板打印 User Agent。 -- `Perf` 打印 log 时会显示时间。 -- `Fix` 修复 getDate() 返回错误时间的问题。 -- `Fix` 修复同步 AJAX 变异步 AJAX 的问题。 - - - -# v1.x.x - -## v1.3.0 (2016-05-20) - -- `Feature` 支持拖拽右下角开关。 -- `Fix` 修复异步加载导致初始化失败的问题。 - -## v1.2.1 (2016-05-16) - -- `Fix` 修复发送 POST 请求时丢失数据的问题。 - - -## v1.2.0 (2016-05-11) - -- `Feature` 新增网络面板,可展示 AJAX 请求。 -- `Feature` 废弃 `vConsole.ready()` 方法。 -- `Perf` 支持 Object/Array 结构化展示,不再以 JSON 字符串输出。 -- `Perf` 新增英文 README 及 CHANGELOG 文档。 -- `Perf` 优化 UI 体验。 - - -## v1.1.0 (2016-05-06) - -- `Feature` 支持 `window.onerror()` 的异常信息捕获。 -- `Feature` 支持 `[default|system|...]` 日志格式,将 log 输出到指定面板。 - - -## v1.0.5 (2016-04-29) - -- `Fix` 修复 webpack 编译失败的问题。 -- `Fix` 修复打印 HTML 字符串可能导致的 XSS 问题。 - - -## v1.0.4 (2016-04-28) - -- `Fix` 修复 `package.json` 的 main 路径。 -- `Perf` 优化 example 的 demo 页面。 - - -## v1.0.2 (2016-04-27) - -- 初始发布。 \ No newline at end of file diff --git a/node_modules/vconsole/LICENSE b/node_modules/vconsole/LICENSE deleted file mode 100644 index 735af597..00000000 --- a/node_modules/vconsole/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -Tencent is pleased to support the open source community by making vConsole available. - -Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. - -If you have downloaded a copy of the vConsole binary from Tencent, please note that the vConsole binary is licensed under the MIT License. - -If you have downloaded a copy of the vConsole source code from Tencent, please note that vConsole source code is licensed under the MIT License, except for the third-party components listed below which are subject to different license terms. Your integration of vConsole into your own projects may require compliance with the MIT License, as well as the other licenses applicable to the third-party components included within vConsole. - -A copy of the MIT License is included in this file. \ No newline at end of file diff --git a/node_modules/vconsole/README.md b/node_modules/vconsole/README.md deleted file mode 100644 index 421605fa..00000000 --- a/node_modules/vconsole/README.md +++ /dev/null @@ -1,196 +0,0 @@ -English | [简体中文](./README_CN.md) - -vConsole -=== - -A lightweight, extendable front-end developer tool for mobile web page. - -vConsole is framework-free, you can use it in Vue or React or any other framework application. - -Now vConsole is the official debugging tool for WeChat Miniprograms. - ---- - -## Features - -- Logs: `console.log|info|error|...` -- Network: `XMLHttpRequest`, `Fetch`, `sendBeacon` -- Element: HTML elements tree -- Storage: `Cookies`, `LocalStorage`, `SessionStorage` -- Execute JS command manually -- Custom plugins - -For details, please see the screenshots below. - ---- - -## Release Notes - -Latest version: [![npm version](https://img.shields.io/npm/v/vconsole/latest.svg)](https://www.npmjs.com/package/vconsole) - -Detailed release notes for each version are available on [Changelog](./CHANGELOG.md). - ---- - -## Guide - -See [Tutorial](./doc/tutorial.md) for more usage details. - -For installation, there are 2 primary ways of adding vConsole to a project: - -#### Method 1: Using npm (Recommended) - -```bash -$ npm install vconsole -``` - -```javascript -import VConsole from 'vconsole'; - -const vConsole = new VConsole(); -// or init with options -const vConsole = new VConsole({ theme: 'dark' }); - -// call `console` methods as usual -console.log('Hello world'); - -// remove it when you finish debugging -vConsole.destroy(); -``` - -#### Method 2: Using CDN in HTML: - -```html - - -``` - -Available CDN: - -- https://unpkg.com/vconsole@latest/dist/vconsole.min.js -- https://cdn.jsdelivr.net/npm/vconsole@latest/dist/vconsole.min.js - ---- - -## Preview - -[http://wechatfe.github.io/vconsole/demo.html](http://wechatfe.github.io/vconsole/demo.html) - -![](./doc/screenshot/qrcode.png) - ---- - -## Screenshots - -### Overview - -
- Light theme - -![](./doc/screenshot/overview_light.jpg) -
- -
- Dark theme - -![](./doc/screenshot/overview_dark.jpg) -
- -### Log Panel - -
- Log styling - -![](./doc/screenshot/plugin_log_types.jpg) -
- -
- Command line - -![](./doc/screenshot/plugin_log_command.jpg) -
- -### System Panel - -
- Performance info - -![](./doc/screenshot/plugin_system.jpg) -
- -
- Output logs to different panel - -```javascript -console.log('output to Log panel.') -console.log('[system]', 'output to System panel.') -``` -
- -### Network Panel - -
- Request details - -![](./doc/screenshot/plugin_network.jpg) -
- -### Element Panel - -
- Realtime HTML elements structure - -![](./doc/screenshot/plugin_element.jpg) -
- -### Storage Panel - -
- Add, edit, delete or copy Cookies / LocalStorage / SessionStorage - -![](./doc/screenshot/plugin_storage.jpg) -
- ---- - -## Documentation - -vConsole: - - - [Tutorial](./doc/tutorial.md) - - [Public Properties & Methods](./doc/public_properties_methods.md) - - [Builtin Plugin: Properties & Methods](./doc/plugin_properties_methods.md) - -Custom Plugin: - - - [Plugin: Getting Started](./doc/plugin_getting_started.md) - - [Plugin: Building a Plugin](./doc/plugin_building_a_plugin.md) - - [Plugin: Event List](./doc/plugin_event_list.md) - ---- - -## Third-party Plugins - - - [vConsole-sources](https://github.com/WechatFE/vConsole-sources) - - [vconsole-webpack-plugin](https://github.com/diamont1001/vconsole-webpack-plugin) - - [vconsole-stats-plugin](https://github.com/smackgg/vConsole-Stats) - - [vconsole-vue-devtools-plugin](https://github.com/Zippowxk/vue-vconsole-devtools) - - [vconsole-outputlog-plugin](https://github.com/sunlanda/vconsole-outputlog-plugin) - - [vite-plugin-vconsole](https://github.com/vadxq/vite-plugin-vconsole) - ---- - -## Feedback - -QQ Group: 497430533 - -![](./doc/screenshot/qq_group.png) - ---- - -## License - -[The MIT License](./LICENSE) diff --git a/node_modules/vconsole/README_CN.md b/node_modules/vconsole/README_CN.md deleted file mode 100644 index 01fdddb5..00000000 --- a/node_modules/vconsole/README_CN.md +++ /dev/null @@ -1,199 +0,0 @@ -[English](./README.md) | 简体中文 - -vConsole -=== - -一个轻量、可拓展、针对手机网页的前端开发者调试面板。 - -vConsole 是框架无关的,可以在 Vue、React 或其他任何框架中使用。 - -现在 vConsole 是微信小程序的官方调试工具。 - ---- - -## 功能特性 - -- 日志(Logs): `console.log|info|error|...` -- 网络(Network): `XMLHttpRequest`, `Fetch`, `sendBeacon` -- 节点(Element): HTML 节点树 -- 存储(Storage): `Cookies`, `LocalStorage`, `SessionStorage` -- 手动执行 JS 命令行 -- 自定义插件 - -详情可参考下方的截图。 - ---- - -## 版本说明 - -最新版本: [![npm version](https://img.shields.io/npm/v/vconsole/latest.svg)](https://www.npmjs.com/package/vconsole) - -每个版本的详细说明请参阅 [Changelog](./CHANGELOG_CN.md)。 - ---- - -## 上手 - -详细使用方法请参阅[使用教程](./doc/tutorial_CN.md)。 - -将 vConsole 添加到项目中主要有以下方式: - -#### 方法一:使用 npm(推荐) - -```bash -$ npm install vconsole -``` - -Import 并初始化后,即可使用 `console.log` 功能,如 Chrome devtools 上一样。 - -```javascript -import VConsole from 'vconsole'; - -const vConsole = new VConsole(); -// 或者使用配置参数来初始化,详情见文档 -const vConsole = new VConsole({ theme: 'dark' }); - -// 接下来即可照常使用 `console` 等方法 -console.log('Hello world'); - -// 结束调试后,可移除掉 -vConsole.destroy(); -``` - -#### 方法二:使用 CDN 直接插入到 HTML - -```html - - -``` - -可用的 CDN: - -- https://unpkg.com/vconsole@latest/dist/vconsole.min.js -- https://cdn.jsdelivr.net/npm/vconsole@latest/dist/vconsole.min.js - ---- - -## 手机预览 - -[http://wechatfe.github.io/vconsole/demo.html](http://wechatfe.github.io/vconsole/demo.html) - -![](./doc/screenshot/qrcode.png) - ---- - -## 截图 - -### 概览 - -
- 浅色主题 - -![](./doc/screenshot/overview_light.jpg) -
- -
- 深色主题 - -![](./doc/screenshot/overview_dark.jpg) -
- -### Log 面板 - -
- Log 样式 - -![](./doc/screenshot/plugin_log_types.jpg) -
- -
- 命令行 - -![](./doc/screenshot/plugin_log_command.jpg) -
- -### System 面板 - -
- Performance 信息 - -![](./doc/screenshot/plugin_system.jpg) -
- -
- 输入日志到不同的 log 面板 - -```javascript -console.log('output to Log panel.') -console.log('[system]', 'output to System panel.') -``` -
- -### Network 面板 - -
- 请求、回包的详情 - -![](./doc/screenshot/plugin_network.jpg) -
- -### Element 面板 - -
- 查看 HTML 对象结构 - -![](./doc/screenshot/plugin_element.jpg) -
- -### Storage 面板 - -
- 添加、编辑、删除、复制 Cookies / LocalStorage / SessionStorage - -![](./doc/screenshot/plugin_storage.jpg) -
- ---- - -## 文档 - - -vConsole 本体: - - - [使用教程](./doc/tutorial_CN.md) - - [公共属性及方法](./doc/public_properties_methods_CN.md) - - [内置插件:属性及方法](./doc/plugin_properties_methods_CN.md) - -自定义插件: - - - [插件:入门](./doc/plugin_getting_started_CN.md) - - [插件:编写插件](./doc/plugin_building_a_plugin_CN.md) - - [插件:Event 事件列表](./doc/plugin_event_list_CN.md) - ---- - -## 第三方插件列表 - - - [vConsole-sources](https://github.com/WechatFE/vConsole-sources) - - [vconsole-webpack-plugin](https://github.com/diamont1001/vconsole-webpack-plugin) - - [vconsole-stats-plugin](https://github.com/smackgg/vConsole-Stats) - - [vconsole-vue-devtools-plugin](https://github.com/Zippowxk/vue-vconsole-devtools) - - [vconsole-outputlog-plugin](https://github.com/sunlanda/vconsole-outputlog-plugin) - - [vite-plugin-vconsole](https://github.com/vadxq/vite-plugin-vconsole) - ---- - -## 交流反馈 - -QQ 群:497430533 - -![](./doc/screenshot/qq_group.png) - ---- - -## License - -[The MIT License](./LICENSE) diff --git a/node_modules/vconsole/build/vendor.d.ts b/node_modules/vconsole/build/vendor.d.ts deleted file mode 100644 index 9b948616..00000000 --- a/node_modules/vconsole/build/vendor.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -declare module 'vendor/core-js/stable/symbol' { -} - -declare module 'vendor/mutation-observer' { - export class MutationObserver { - } -} - -declare module 'vendor/svelte' { - export class SvelteComponent { - } -} - -declare module 'vendor/svelte/store' { - export interface Subscriber { - } - export interface Unsubscriber { - } - export interface Updater { - } - export interface Writable { - } -} - diff --git a/node_modules/vconsole/dist/vconsole.min.d.ts b/node_modules/vconsole/dist/vconsole.min.d.ts deleted file mode 100644 index 7d600699..00000000 --- a/node_modules/vconsole/dist/vconsole.min.d.ts +++ /dev/null @@ -1,1237 +0,0 @@ -/// - -declare module "core/options.interface" { - export interface VConsoleLogOptions { - maxLogNumber?: number; - showTimestamps?: boolean; - } - export interface VConsoleNetworkOptions { - maxNetworkNumber?: number; - ignoreUrlRegExp?: RegExp; - } - export type VConsoleAvailableStorage = 'cookies' | 'localStorage' | 'sessionStorage' | 'wxStorage'; - export interface VConsoleStorageOptions { - defaultStorages?: VConsoleAvailableStorage[]; - } - export interface VConsoleOptions { - target?: string | HTMLElement; - defaultPlugins?: ('system' | 'network' | 'element' | 'storage')[]; - theme?: '' | 'dark' | 'light'; - disableLogScrolling?: boolean; - pluginOrder?: string[]; - onReady?: () => void; - log?: VConsoleLogOptions; - network?: VConsoleNetworkOptions; - storage?: VConsoleStorageOptions; - /** - * @deprecated Since v3.12.0, use `log.maxLogNumber`. - */ - maxLogNumber?: number; - /** - * @deprecated Since v3.12.0, use `network.maxNetworkNumber`. - */ - maxNetworkNumber?: number; - /** - * @deprecated Since v3.12.0. - */ - onClearLog?: () => void; - } -} -declare module "lib/tool" { - /** - * Utility Functions - */ - /** - * get formatted date by timestamp - */ - export function getDate(time: number): { - time: number; - year: number; - month: string | number; - day: string | number; - hour: string | number; - minute: string | number; - second: string | number; - millisecond: string | number; - }; - /** - * Determine whether a value is of a specific type. - */ - export function isNumber(value: any): boolean; - export function isBigInt(value: any): boolean; - export function isString(value: any): boolean; - export function isArray(value: any): boolean; - export function isBoolean(value: any): boolean; - export function isUndefined(value: any): boolean; - export function isNull(value: any): boolean; - export function isSymbol(value: any): boolean; - export function isObject(value: any): boolean; - export function isFunction(value: any): boolean; - export function isElement(value: any): boolean; - export function isWindow(value: any): boolean; - export function isIterable(value: any): boolean; - /** - * Get the prototype name of an object - */ - export function getPrototypeName(value: any): string; - /** - * Get an object's constructor name. - */ - export function getObjName(obj: any): string; - /** - * check whether an object is plain (using {}) - * @param object obj - * @return boolean - */ - export function isPlainObject(obj: any): boolean; - /** - * Escape HTML to XSS-safe text. - */ - export function htmlEncode(text: string | number): string; - /** - * Convert a text's invisible characters to visible characters. - */ - export function getVisibleText(text: string): string; - /** - * A safe `JSON.stringify` method. - */ - export function safeJSONStringify(obj: any, opt?: { - maxDepth?: number; - keyMaxLen?: number; - pretty?: boolean; - standardJSON?: boolean; - }): string; - /** - * Call original `JSON.stringify` and catch unknown exceptions. - */ - export function JSONStringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; - /** - * Get the bytes of a string. - * @example 'a' = 1 - * @example '好' = 3 - */ - export function getStringBytes(str: string): number; - /** - * Convert bytes number to 'MB' or 'KB' string. - */ - export function getBytesText(bytes: number): string; - /** - * Get a string within a limited max length. - * The byte size of the string will be appended to the string when reached the limit. - * @return 'some string...(3.1 MB)' - */ - export function getStringWithinLength(str: string, maxLen: number): string; - /** - * Sore an `string[]` by string. - */ - export function sortArray(arr: string[]): string[]; - /** - * Get enumerable keys of an object or array. - */ - export function getEnumerableKeys(obj: any): string[]; - /** - * Get enumerable and non-enumerable keys of an object or array. - */ - export function getEnumerableAndNonEnumerableKeys(obj: any): string[]; - /** - * Get non-enumerable keys of an object or array. - */ - export function getNonEnumerableKeys(obj: any): string[]; - export function getSymbolKeys(obj: any): symbol[]; - /** - * localStorage methods - */ - export function setStorage(key: string, value: string): void; - export function getStorage(key: string): string; - /** - * Generate a 6-digit unique string with prefix `"__vc_" + ${prefix}` - */ - export function getUniqueID(prefix?: string): string; - /** - * Determine whether it is inside a WeChat Miniprogram. - */ - export function isWxEnv(): boolean; - /** - * Call a WeChat Miniprogram method. E.g: `wx.getStorageSync()`. - */ - export function callWx(method: string, ...args: any[]): any; -} -declare module "lib/query" { - const $: { - /** - * get single element - * @public - */ - one: (selector: string, contextElement?: Element | Document) => HTMLElement; - /** - * get multiple elements - * @public - */ - all: (selector: string, contextElement?: Element | Document) => HTMLElement[]; - /** - * add className(s) to an or multiple element(s) - * @public - */ - addClass: ($el: Element | Element[], className: string) => void; - /** - * remove className(s) from an or multiple element(s) - * @public - */ - removeClass: ($el: Element | Element[], className: string) => void; - /** - * see whether an element contains a className - * @public - */ - hasClass: ($el: Element, className: string) => boolean; - /** - * bind an event to element(s) - * @public - */ - bind: ($el: Element | Element[], eventType: any, fn: any, useCapture?: boolean) => void; - /** - * delegate an event to a parent element - * @public - * @param $el parent element - * @param eventType name of the event - * @param selector target's selector - * @param fn callback function - */ - delegate: ($el: Element, eventType: string, selector: string, fn: (event: Event, $target: HTMLElement) => void) => void; - /** - * Remove all child elements of an element. - */ - removeChildren($el: Element): Element; - }; - /** - * export - */ - export default $; -} -declare module "lib/model" { - type AConstructorTypeOf = new (...args: U) => T; - export class VConsoleModel { - static singleton: { - [ctorName: string]: VConsoleModel; - }; - protected _onDataUpdateCallbacks: Function[]; - /** - * Get a singleton of a model. - */ - static getSingleton(ctor: AConstructorTypeOf, ctorName: string): T; - } - export default VConsoleModel; -} -declare module "lib/pluginExporter" { - import type { VConsoleModel } from "lib/model"; - export class VConsolePluginExporter { - protected model: VConsoleModel; - protected pluginId: string; - constructor(pluginId: string); - destroy(): void; - } -} -declare module "lib/plugin" { - import { VConsolePluginExporter } from "lib/pluginExporter"; - import type { VConsole } from "core/core"; - export type IVConsolePluginEvent = (data?: any) => void; - export type IVConsolePluginEventName = 'init' | 'renderTab' | 'addTopBar' | 'addTool' | 'ready' | 'remove' | 'updateOption' | 'showConsole' | 'hideConsole' | 'show' | 'hide'; - export interface IVConsoleTopbarOptions { - name: string; - className: string; - actived?: boolean; - data?: { - [key: string]: string; - }; - onClick?: (e: Event, data?: any) => any; - } - export interface IVConsoleToolbarOptions { - name: string; - global?: boolean; - data?: { - [key: string]: string; - }; - onClick?: (e: Event, data?: any) => any; - } - export interface IVConsoleTabOptions { - fixedHeight?: boolean; - } - /** - * vConsole Plugin Base Class - */ - export class VConsolePlugin { - isReady: boolean; - eventMap: Map; - exporter?: VConsolePluginExporter; - protected _id: string; - protected _name: string; - protected _vConsole: VConsole; - constructor(...args: any[]); - get id(): string; - set id(value: string); - get name(): string; - set name(value: string); - get vConsole(): VConsole; - set vConsole(value: VConsole); - /** - * Register an event - * @public - * @param IVConsolePluginEventName - * @param IVConsolePluginEvent - */ - on(eventName: IVConsolePluginEventName, callback: IVConsolePluginEvent): this; - onRemove(): void; - /** - * Trigger an event. - */ - trigger(eventName: IVConsolePluginEventName, data?: any): this; - protected bindExporter(): void; - protected unbindExporter(): void; - protected getUniqueID(prefix?: string): string; - } - export default VConsolePlugin; -} -declare module "lib/sveltePlugin" { - import VConsolePlugin from "lib/plugin"; - import { SvelteComponent } from "vendor/svelte"; - export class VConsoleSveltePlugin extends VConsolePlugin { - CompClass: typeof SvelteComponent; - compInstance?: SvelteComponent; - initialProps: T; - constructor(id: string, name: string, CompClass: typeof SvelteComponent, initialProps: T); - onReady(): void; - onRenderTab(callback: any): void; - onRemove(): void; - } -} -declare module "core/core.model" { - export const contentStore: { - subscribe: (this: void, run: import("vendor/svelte/store").Subscriber<{ - updateTime: number; - }>, invalidate?: (value?: { - updateTime: number; - }) => void) => import("vendor/svelte/store").Unsubscriber; - set: (this: void, value: { - updateTime: number; - }) => void; - update: (this: void, updater: import("vendor/svelte/store").Updater<{ - updateTime: number; - }>) => void; - updateTime: () => void; - }; -} -declare module "log/logTool" { - import type { IVConsoleLog, IVConsoleLogData } from "log/log.model"; - /** - * Get a value's text content and its type. - */ - export const getValueTextAndType: (val: any, wrapString?: boolean) => { - text: any; - valueType: string; - }; - /** - * A simple parser to get `[` or `]` information. - */ - export const getLastIdentifier: (text: string) => { - front: { - text: string; - pos: number; - before: string; - after: string; - }; - back: { - text: string; - pos: number; - before: string; - after: string; - }; - }; - export const isMatchedFilterText: (log: IVConsoleLog, filterText: string) => boolean; - /** - * Styling log output (`%c`), or string substitutions (`%s`, `%d`, `%o`). - * Apply to the first log only. - */ - export const getLogDatasWithFormatting: (origDatas: any[]) => IVConsoleLogData[]; - /** - * An empty class for rendering views. - */ - export class VConsoleUninvocatableObject { - } -} -declare module "log/log.store" { - import type { Writable } from "vendor/svelte/store"; - import type { IVConsoleLog } from "log/log.model"; - export interface IVConsoleLogStore { - logList: IVConsoleLog[]; - } - /** - * Log Store Factory - */ - export class VConsoleLogStore { - static storeMap: { - [pluginId: string]: Writable; - }; - /** - * Create a store. - */ - static create(pluginId: string): Writable; - /** - * Delete a store. - */ - static delete(pluginId: string): void; - /** - * Get a store by pluginId, - */ - static get(pluginId: string): Writable; - /** - * Get a store's raw data. - */ - static getRaw(pluginId: string): IVConsoleLogStore; - /** - * Get all stores. - */ - static getAll(): { - [pluginId: string]: Writable; - }; - } -} -declare module "log/log.model" { - import { VConsoleModel } from "lib/model"; - /********************************** - * Interfaces - **********************************/ - export type IConsoleLogMethod = 'log' | 'info' | 'debug' | 'warn' | 'error'; - export interface IVConsoleLogData { - origData: any; - style?: string; - } - export interface IVConsoleLog { - _id: string; - type: IConsoleLogMethod; - cmdType?: 'input' | 'output'; - repeated: number; - toggle: Record; - date: number; - data: IVConsoleLogData[]; - groupLevel: number; - groupLabel?: symbol; - groupHeader?: 0 | 1 | 2; - groupCollapsed?: boolean; - } - export type IVConsoleLogListMap = { - [pluginId: string]: IVConsoleLog[]; - }; - export type IVConsoleLogFilter = { - [pluginId: string]: string; - }; - export interface IVConsoleAddLogOptions { - noOrig?: boolean; - cmdType?: 'input' | 'output'; - } - /********************************** - * Model - **********************************/ - export class VConsoleLogModel extends VConsoleModel { - readonly LOG_METHODS: IConsoleLogMethod[]; - ADDED_LOG_PLUGIN_ID: string[]; - maxLogNumber: number; - protected logCounter: number; - protected groupLevel: number; - protected groupLabelCollapsedStack: { - label: symbol; - collapsed: boolean; - }[]; - protected pluginPattern: RegExp; - protected logQueue: IVConsoleLog[]; - protected flushLogScheduled: boolean; - /** - * The original `window.console` methods. - */ - origConsole: { - [method: string]: Function; - }; - /** - * Bind a Log plugin. - * When binding first plugin, `window.console` will be hooked. - */ - bindPlugin(pluginId: string): boolean; - /** - * Unbind a Log plugin. - * When no binded plugin exists, hooked `window.console` will be recovered. - */ - unbindPlugin(pluginId: string): boolean; - /** - * Hook `window.console` with vConsole log method. - * Methods will be hooked only once. - */ - mockConsole(): void; - protected _mockConsoleLog(): void; - protected _mockConsoleTime(): void; - protected _mockConsoleGroup(): void; - protected _mockConsoleClear(): void; - /** - * Recover `window.console`. - */ - unmockConsole(): void; - /** - * Call origin `window.console[method](...args)` - */ - callOriginalConsole(method: string, ...args: any[]): void; - /** - * Reset groups by `console.group()`. - */ - resetGroup(): void; - /** - * Remove all logs. - */ - clearLog(): void; - /** - * Remove a plugin's logs. - */ - clearPluginLog(pluginId: string): void; - /** - * Add a vConsole log. - */ - addLog(item?: { - type: IConsoleLogMethod; - origData: any[]; - isGroupHeader?: 0 | 1 | 2; - isGroupCollapsed?: boolean; - }, opt?: IVConsoleAddLogOptions): void; - /** - * Execute a JS command. - */ - evalCommand(cmd: string): void; - protected _signalLog(log: IVConsoleLog): void; - protected _flushLogs(): void; - protected _extractPluginIdByLog(log: IVConsoleLog): string; - protected _isRepeatedLog(logList: IVConsoleLog[], log: IVConsoleLog): boolean; - protected _updateLastLogRepeated(logList: IVConsoleLog[]): IVConsoleLog[]; - protected _limitLogListLength(logList: IVConsoleLog[]): IVConsoleLog[]; - } -} -declare module "log/log.exporter" { - import { VConsolePluginExporter } from "lib/pluginExporter"; - import { VConsoleLogModel } from "log/log.model"; - import type { IConsoleLogMethod } from "log/log.model"; - export class VConsoleLogExporter extends VConsolePluginExporter { - model: VConsoleLogModel; - log(...args: any[]): void; - info(...args: any[]): void; - debug(...args: any[]): void; - warn(...args: any[]): void; - error(...args: any[]): void; - clear(): void; - protected addLog(method: IConsoleLogMethod, ...args: any[]): void; - } -} -declare module "log/log" { - import { VConsoleSveltePlugin } from "lib/sveltePlugin"; - import { VConsoleLogModel } from "log/log.model"; - /** - * vConsole Log Plugin (base class). - */ - export class VConsoleLogPlugin extends VConsoleSveltePlugin { - model: VConsoleLogModel; - isReady: boolean; - isShow: boolean; - isInBottom: boolean; - constructor(id: string, name: string); - onReady(): void; - onRemove(): void; - onAddTopBar(callback: Function): void; - onAddTool(callback: Function): void; - onUpdateOption(): void; - } - export default VConsoleLogPlugin; -} -declare module "log/default" { - import { VConsoleLogPlugin } from "log/log"; - export class VConsoleDefaultPlugin extends VConsoleLogPlugin { - protected onErrorHandler: any; - protected resourceErrorHandler: any; - protected rejectionHandler: any; - onReady(): void; - onRemove(): void; - /** - * Catch window errors. - */ - protected bindErrors(): void; - /** - * Not catch window errors. - */ - protected unbindErrors(): void; - /** - * Catch `window.onerror`. - */ - protected catchWindowOnError(): void; - /** - * Catch resource loading error: image, video, link, script. - */ - protected catchResourceError(): void; - /** - * Catch `Promise.reject`. - * @reference https://developer.mozilla.org/en-US/docs/Web/API/Window/unhandledrejection_event - */ - private catchUnhandledRejection; - } - export default VConsoleDefaultPlugin; -} -declare module "log/system" { - import { VConsoleLogPlugin } from "log/log"; - export class VConsoleSystemPlugin extends VConsoleLogPlugin { - onReady(): void; - printSystemInfo(): void; - } - export default VConsoleSystemPlugin; -} -declare module "network/helper" { - import type { VConsoleNetworkRequestItem } from "network/requestItem"; - export type IOnUpdateCallback = (item: VConsoleNetworkRequestItem) => void; - /** - * Generate `getData` by url. - */ - export const genGetDataByUrl: (url: string, getData?: {}) => {}; - /** - * Generate formatted response data by responseType. - */ - export const genResonseByResponseType: (responseType: string, response: any) => string; - /** - * Generate formatted response body by XMLHttpRequestBodyInit. - */ - export const genFormattedBody: (body?: BodyInit) => string | { - [key: string]: string; - }; - /** - * Get formatted URL object by string. - */ - export const getURL: (urlString?: string) => URL; -} -declare module "network/requestItem" { - export type VConsoleRequestMethod = '' | 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH'; - export class VConsoleNetworkRequestItem { - id: string; - name?: string; - method: VConsoleRequestMethod; - url: string; - status: number | string; - statusText?: string; - cancelState?: 0 | 1 | 2 | 3; - readyState?: XMLHttpRequest['readyState']; - header: { - [key: string]: string; - }; - responseType: XMLHttpRequest['responseType']; - requestType: 'xhr' | 'fetch' | 'ping' | 'custom'; - requestHeader: HeadersInit; - response: any; - responseSize: number; - responseSizeText: string; - startTime: number; - startTimeText: string; - endTime: number; - costTime?: number; - getData: { - [key: string]: string; - }; - postData: { - [key: string]: string; - } | string; - actived: boolean; - noVConsole?: boolean; - constructor(); - } - export class VConsoleNetworkRequestItemProxy extends VConsoleNetworkRequestItem { - static Handler: { - get(item: VConsoleNetworkRequestItemProxy, prop: string): any; - set(item: VConsoleNetworkRequestItemProxy, prop: string, value: any): boolean; - }; - protected _response?: any; - constructor(item: VConsoleNetworkRequestItem); - } -} -declare module "network/xhr.proxy" { - import { VConsoleNetworkRequestItem } from "network/requestItem"; - import type { IOnUpdateCallback } from "network/helper"; - export class XHRProxyHandler implements ProxyHandler { - XMLReq: XMLHttpRequest; - item: VConsoleNetworkRequestItem; - protected onUpdateCallback: IOnUpdateCallback; - constructor(XMLReq: XMLHttpRequest, onUpdateCallback: IOnUpdateCallback); - get(target: T, key: string): any; - set(target: T, key: string, value: any): boolean; - onReadyStateChange(): void; - onAbort(): void; - onTimeout(): void; - protected triggerUpdate(): void; - protected getOpen(target: T): (...args: any[]) => any; - protected getSend(target: T): (...args: any[]) => any; - protected getSetRequestHeader(target: T): (...args: any[]) => any; - protected setOnReadyStateChange(target: T, key: string, value: any): boolean; - protected setOnAbort(target: T, key: string, value: any): boolean; - protected setOnTimeout(target: T, key: string, value: any): boolean; - /** - * Update item's properties according to readyState. - */ - protected updateItemByReadyState(): void; - } - export class XHRProxy { - static origXMLHttpRequest: { - new (): XMLHttpRequest; - prototype: XMLHttpRequest; - readonly DONE: number; - readonly HEADERS_RECEIVED: number; - readonly LOADING: number; - readonly OPENED: number; - readonly UNSENT: number; - }; - static create(onUpdateCallback: IOnUpdateCallback): { - new (): XMLHttpRequest; - prototype: XMLHttpRequest; - readonly DONE: number; - readonly HEADERS_RECEIVED: number; - readonly LOADING: number; - readonly OPENED: number; - readonly UNSENT: number; - }; - } -} -declare module "network/fetch.proxy" { - import { VConsoleNetworkRequestItem } from "network/requestItem"; - import type { IOnUpdateCallback } from "network/helper"; - export class ResponseProxyHandler implements ProxyHandler { - resp: Response; - item: VConsoleNetworkRequestItem; - protected onUpdateCallback: IOnUpdateCallback; - constructor(resp: T, item: VConsoleNetworkRequestItem, onUpdateCallback: IOnUpdateCallback); - set(target: T, key: string, value: any): boolean; - get(target: T, key: string): any; - protected mockReader(): void; - } - export class FetchProxyHandler implements ProxyHandler { - protected onUpdateCallback: IOnUpdateCallback; - constructor(onUpdateCallback: IOnUpdateCallback); - apply(target: T, thisArg: typeof window, argsList: any): Promise; - protected beforeFetch(item: VConsoleNetworkRequestItem, input: RequestInfo, init?: RequestInit): void; - protected afterFetch(item: any): (resp: Response) => Response; - protected handleResponseBody(resp: Response, item: VConsoleNetworkRequestItem): Promise | Promise; - } - export class FetchProxy { - static origFetch: typeof fetch; - static create(onUpdateCallback: IOnUpdateCallback): typeof fetch; - } -} -declare module "network/beacon.proxy" { - import type { IOnUpdateCallback } from "network/helper"; - export class BeaconProxyHandler implements ProxyHandler { - protected onUpdateCallback: IOnUpdateCallback; - constructor(onUpdateCallback: IOnUpdateCallback); - apply(target: T, thisArg: T, argsList: any[]): any; - } - export class BeaconProxy { - static origSendBeacon: (url: string | URL, data?: BodyInit) => boolean; - static create(onUpdateCallback: IOnUpdateCallback): any; - } -} -declare module "network/network.model" { - import { VConsoleModel } from "lib/model"; - import { VConsoleNetworkRequestItem } from "network/requestItem"; - /** - * Network Store - */ - export const requestList: import("vendor/svelte/store").Writable<{ - [id: string]: VConsoleNetworkRequestItem; - }>; - /** - * Network Model - */ - export class VConsoleNetworkModel extends VConsoleModel { - maxNetworkNumber: number; - ignoreUrlRegExp: RegExp; - protected itemCounter: number; - constructor(); - unMock(): void; - clearLog(): void; - /** - * Add or update a request item by request ID. - */ - updateRequest(id: string, data: VConsoleNetworkRequestItem): void; - /** - * mock XMLHttpRequest - * @private - */ - private mockXHR; - /** - * mock fetch request - * @private - */ - private mockFetch; - /** - * mock navigator.sendBeacon - * @private - */ - private mockSendBeacon; - protected limitListLength(): void; - } - export default VConsoleNetworkModel; -} -declare module "network/network.exporter" { - import { VConsolePluginExporter } from "lib/pluginExporter"; - import { VConsoleNetworkModel } from "network/network.model"; - import { VConsoleNetworkRequestItem, VConsoleNetworkRequestItemProxy } from "network/requestItem"; - export class VConsoleNetworkExporter extends VConsolePluginExporter { - model: VConsoleNetworkModel; - add(item: VConsoleNetworkRequestItem): VConsoleNetworkRequestItemProxy; - update(id: string, item: VConsoleNetworkRequestItem): void; - clear(): void; - } -} -declare module "network/network" { - import { VConsoleSveltePlugin } from "lib/sveltePlugin"; - import { VConsoleNetworkModel } from "network/network.model"; - import { VConsoleNetworkExporter } from "network/network.exporter"; - export class VConsoleNetworkPlugin extends VConsoleSveltePlugin { - model: VConsoleNetworkModel; - exporter: VConsoleNetworkExporter; - constructor(id: string, name: string, renderProps?: {}); - onReady(): void; - onAddTool(callback: any): void; - onRemove(): void; - onUpdateOption(): void; - } -} -declare module "element/element.model" { - export interface IVConsoleNode { - nodeType: typeof Node.prototype.nodeType; - nodeName: typeof Node.prototype.nodeName; - textContent: typeof Node.prototype.textContent; - id: typeof Element.prototype.id; - className: typeof Element.prototype.className; - attributes: { - [name: string]: string; - }[]; - childNodes: IVConsoleNode[]; - _isExpand?: boolean; - _isActived?: boolean; - _isSingleLine?: boolean; - _isNullEndTag?: boolean; - } - /** - * Element Store - */ - export const rootNode: import("vendor/svelte/store").Writable; - export const activedNode: import("vendor/svelte/store").Writable; -} -declare module "element/element" { - import MutationObserver from "vendor/mutation-observer"; - import { VConsoleSveltePlugin } from "lib/sveltePlugin"; - import type { IVConsoleNode } from "element/element.model"; - /** - * vConsole Element Panel - */ - export class VConsoleElementPlugin extends VConsoleSveltePlugin { - protected isInited: boolean; - protected observer: MutationObserver; - protected nodeMap: WeakMap; - constructor(id: string, name: string, renderProps?: {}); - onShow(): void; - onRemove(): void; - onAddTool(callback: any): void; - protected _init(): void; - protected _handleMutation(mutation: MutationRecord): void; - protected _onChildRemove(mutation: MutationRecord): void; - protected _onChildAdd(mutation: MutationRecord): void; - protected _onAttributesChange(mutation: MutationRecord): void; - protected _onCharacterDataChange(mutation: MutationRecord): void; - /** - * Generate an VNode for rendering views. VNode will be updated if existing. - * VNode will be stored in a WeakMap. - */ - protected _generateVNode(elem: Node): IVConsoleNode; - protected _updateVNodeAttributes(elem: Node): void; - /** - * Expand the actived node. - * If the node is collapsed, expand it. - * If the node is expanded, expand it's child nodes. - */ - protected _expandActivedNode(): void; - /** - * Collapse the actived node. - * If the node is expanded, and has expanded child nodes, collapse it's child nodes. - * If the node is expanded, and has no expanded child node, collapse it self. - * If the node is collapsed, do nothing. - */ - protected _collapseActivedNode(): void; - protected _isIgnoredNode(elem: Node): boolean; - protected _isInVConsole(elem: Element): boolean; - protected _refreshStore(): void; - } -} -declare module "storage/storage.cookie" { - import type { IStorage } from "storage/storage.model"; - export interface CookieOptions { - path?: string | null; - domain?: string | null; - expires?: Date | null; - secure?: boolean; - sameSite?: 'Strict' | 'Lax' | 'None'; - } - export class CookieStorage implements IStorage { - get length(): number; - /** - * Returns sorted keys. - */ - get keys(): string[]; - key(index: number): string; - setItem(key: string, data: string, cookieOptions?: CookieOptions): void; - getItem(key: string): string; - removeItem(key: string, cookieOptions?: CookieOptions): void; - clear(): void; - } -} -declare module "storage/storage.wx" { - import type { IStorage } from "storage/storage.model"; - export class WxStorage implements IStorage { - keys: string[]; - currentSize: number; - limitSize: number; - get length(): number; - key(index: number): string; - /** - * Prepare for async data. - */ - prepare(): Promise; - getItem(key: string): Promise; - setItem(key: string, data: any): Promise; - removeItem(key: string): Promise; - clear(): Promise; - } -} -declare module "storage/storage.model" { - import type { VConsoleAvailableStorage } from "core/options.interface"; - import { VConsoleModel } from "lib/model"; - export interface IStorage { - length: number; - key: (index: number) => string | null; - getItem: (key: string) => string | null | Promise; - setItem: (key: string, data: any) => void | Promise; - removeItem: (key: string) => void | Promise; - clear: () => void | Promise; - prepare?: () => Promise; - } - /** - * Storage Store - */ - export const storageStore: { - updateTime: import("vendor/svelte/store").Writable; - activedName: import("vendor/svelte/store").Writable; - defaultStorages: import("vendor/svelte/store").Writable; - }; - export class VConsoleStorageModel extends VConsoleModel { - protected storage: Map; - constructor(); - get activedStorage(): IStorage; - getItem(key: string): Promise; - setItem(key: string, data: any): Promise; - removeItem(key: string): Promise; - clear(): Promise; - refresh(): void; - /** - * Get key-value data. - */ - getEntries(): Promise<[string, string][]>; - updateEnabledStorages(): void; - protected promisify(ret: T | Promise): T | Promise; - protected deleteStorage(key: VConsoleAvailableStorage): void; - } -} -declare module "storage/storage" { - import { VConsoleSveltePlugin } from "lib/sveltePlugin"; - import { VConsoleStorageModel } from "storage/storage.model"; - export class VConsoleStoragePlugin extends VConsoleSveltePlugin { - protected model: VConsoleStorageModel; - protected onAddTopBarCallback: Function; - constructor(id: string, name: string, renderProps?: {}); - onReady(): void; - onShow(): void; - onAddTopBar(callback: Function): void; - onAddTool(callback: Function): void; - onUpdateOption(): void; - protected updateTopBar(): void; - } -} -declare module "core/core" { - /** - * vConsole core class - */ - import type { SvelteComponent } from "vendor/svelte"; - import type { VConsoleOptions } from "core/options.interface"; - import { VConsolePlugin } from "lib/plugin"; - import { VConsoleLogPlugin } from "log/log"; - import { VConsoleDefaultPlugin } from "log/default"; - import { VConsoleSystemPlugin } from "log/system"; - import { VConsoleNetworkPlugin } from "network/network"; - import { VConsoleElementPlugin } from "element/element"; - import { VConsoleStoragePlugin } from "storage/storage"; - import { VConsoleLogExporter } from "log/log.exporter"; - import { VConsoleNetworkExporter } from "network/network.exporter"; - export class VConsole { - version: string; - isInited: boolean; - option: VConsoleOptions; - protected compInstance: SvelteComponent; - protected pluginList: { - [id: string]: VConsolePlugin; - }; - log: VConsoleLogExporter; - system: VConsoleLogExporter; - network: VConsoleNetworkExporter; - static VConsolePlugin: typeof VConsolePlugin; - static VConsoleLogPlugin: typeof VConsoleLogPlugin; - static VConsoleDefaultPlugin: typeof VConsoleDefaultPlugin; - static VConsoleSystemPlugin: typeof VConsoleSystemPlugin; - static VConsoleNetworkPlugin: typeof VConsoleNetworkPlugin; - static VConsoleElementPlugin: typeof VConsoleElementPlugin; - static VConsoleStoragePlugin: typeof VConsoleStoragePlugin; - constructor(opt?: VConsoleOptions); - /** - * Get singleton instance. - **/ - static get instance(): VConsole | undefined; - /** - * Set singleton instance. - **/ - static set instance(value: VConsole | undefined); - /** - * Add built-in plugins. - */ - private _addBuiltInPlugins; - /** - * Init svelte component. - */ - private _initComponent; - private _updateComponentByOptions; - /** - * Update the position of Switch button. - */ - setSwitchPosition(x: number, y: number): void; - /** - * Auto run after initialization. - * @private - */ - private _autoRun; - private _showFirstPluginWhenEmpty; - /** - * Trigger a `vConsole.option` event. - */ - triggerEvent(eventName: string, param?: any): void; - /** - * Init a plugin. - */ - private _initPlugin; - /** - * Trigger an event for each plugin. - */ - private _triggerPluginsEvent; - /** - * Trigger an event by plugin's id. - * @private - */ - private _triggerPluginEvent; - /** - * Sorting plugin list by option `pluginOrder`. - * Plugin not listed in `pluginOrder` will be put last. - */ - private _reorderPluginList; - /** - * Add a new plugin. - */ - addPlugin(plugin: VConsolePlugin): boolean; - /** - * Remove a plugin. - */ - removePlugin(pluginID: string): boolean; - /** - * Show console panel. - */ - show(): void; - /** - * Hide console panel. - */ - hide(): void; - /** - * Show switch button - */ - showSwitch(): void; - /** - * Hide switch button. - */ - hideSwitch(): void; - /** - * Show a plugin panel. - */ - showPlugin(pluginId: string): void; - /** - * Update option(s). - * @example `setOption('log.maxLogNumber', 20)`: set 'maxLogNumber' field only. - * @example `setOption({ log: { maxLogNumber: 20 }})`: overwrite 'log' object. - */ - setOption(keyOrObj: any, value?: any): void; - /** - * Remove vConsole. - */ - destroy(): void; - } -} -declare module "vconsole" { - /** - * A Front-End Console Panel for Mobile Webpage - */ - import "vendor/core-js/stable/symbol"; - import 'core-js/stable/promise'; - import { VConsole } from "core/core"; - export default VConsole; -} -declare module "component/recycleScroller/recycleManager" { - const createRecycleManager: () => (itemCount: number, start: number, end: number) => { - key: number; - index: number; - show: boolean; - }[]; - export default createRecycleManager; -} -declare module "component/recycleScroller/resizeObserver" { - /** - * A ResizeObserver polyfill. - * ResizeObserver is not support in iOS 13.3 - */ - class EmptyResizeObserver { - constructor(callback: (entries: any[], observer?: EmptyResizeObserver) => void); - disconnect(): void; - observe(target: Element | SVGElement, options?: any): void; - unobserve(target: Element | SVGElement): void; - } - export const hasResizeObserver: () => boolean; - export const useResizeObserver: () => { - new (callback: ResizeObserverCallback): ResizeObserver; - prototype: ResizeObserver; - } | typeof EmptyResizeObserver; -} -declare module "component/recycleScroller/scroll/friction" { - /** * - * Friction physics simulation. Friction is actually just a simple - * power curve; the only trick is taking the natural log of the - * initial drag so that we can express the answer in terms of time. - */ - class Friction { - private _drag; - private _dragLog; - private _x; - private _v; - private _startTime; - constructor(drag: number); - set(x: number, v: number, t?: number): void; - x(t: number): number; - dx(t: number): number; - done(t: number): boolean; - } - export default Friction; -} -declare module "component/recycleScroller/scroll/linear" { - class Linear { - private _x; - private _endX; - private _v; - private _startTime; - private _endTime; - set(x: number, endX: number, dt: number, t?: number): void; - x(t: number): number; - dx(t: number): number; - done(t: number): boolean; - } - export default Linear; -} -declare module "component/recycleScroller/scroll/spring" { - class Spring { - private _solver; - private _solution; - private _endPosition; - private _startTime; - constructor(mass: number, springConstant: number, damping: number); - x(t: number): number; - dx(t: number): number; - set(endPosition: number, x: number, velocity: number, t?: number): void; - done(t: number): boolean; - } - export default Spring; -} -declare module "component/recycleScroller/scroll/scroll" { - /** * - * Scroll combines Friction and Spring to provide the - * classic "flick-with-bounce" behavior. - */ - class Scroll { - private _enableSpring; - private _getExtend; - private _friction; - private _spring; - private _toEdge; - constructor(getExtend: () => number, _enableSpring: boolean); - set(x: number, v: number, t?: number): void; - x(t: number): number; - dx(t: number): number; - done(t: number): boolean; - } - export default Scroll; -} -declare module "component/recycleScroller/scroll/touchTracker" { - export interface TrackerHandler { - onTouchStart(): void; - onTouchMove(x: number, y: number): void; - onTouchEnd(x: number, y: number, velocityX: number, velocityY: number): void; - onTouchCancel(): void; - onWheel(x: number, y: number): void; - } - class TouchTracker { - private _handler; - private _touchId; - private _startX; - private _startY; - private _historyX; - private _historyY; - private _historyTime; - private _wheelDeltaX; - private _wheelDeltaY; - constructor(_handler: TrackerHandler); - private _getTouchDelta; - private _onTouchMove; - private _onWheel; - handleTouchStart: (e: TouchEvent) => void; - handleTouchMove: (e: TouchEvent) => void; - handleTouchEnd: (e: TouchEvent) => void; - handleTouchCancel: (e: TouchEvent) => void; - handleWheel: (e: WheelEvent) => void; - } - export default TouchTracker; -} -declare module "component/recycleScroller/scroll/scrollHandler" { - import { TrackerHandler } from "component/recycleScroller/scroll/touchTracker"; - class ScrollHandler implements TrackerHandler { - private _updatePosition; - private _scrollModel; - private _linearModel; - private _startPosition; - private _position; - private _animate; - private _getExtent; - constructor(getExtent: () => number, _updatePosition: (pos: number) => void); - onTouchStart(): void; - onTouchMove(dx: number, dy: number): void; - onTouchEnd(dx: number, dy: number, velocityX: number, velocityY: number): void; - onTouchCancel(): void; - onWheel(x: number, y: number): void; - getPosition(): number; - updatePosition(position: number): void; - scrollTo(position: number, duration?: number): void; - } - export default ScrollHandler; -} diff --git a/node_modules/vconsole/dist/vconsole.min.js b/node_modules/vconsole/dist/vconsole.min.js deleted file mode 100644 index ff1f2b94..00000000 --- a/node_modules/vconsole/dist/vconsole.min.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * vConsole v3.15.1 (https://github.com/Tencent/vConsole) - * - * Tencent is pleased to support the open source community by making vConsole available. - * Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. - * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - * http://opensource.org/licenses/MIT - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - */ -!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("VConsole",[],n):"object"==typeof exports?exports.VConsole=n():t.VConsole=n()}(this||self,(function(){return function(){var __webpack_modules__={4264:function(t,n,e){t.exports=e(7588)},5036:function(t,n,e){e(1719),e(5677),e(6394),e(5334),e(6969),e(2021),e(8328),e(2129);var o=e(1287);t.exports=o.Promise},2582:function(t,n,e){e(1646),e(6394),e(2004),e(462),e(8407),e(2429),e(1172),e(8288),e(1274),e(8201),e(6626),e(3211),e(9952),e(15),e(9831),e(7521),e(2972),e(6956),e(5222),e(2257);var o=e(1287);t.exports=o.Symbol},8257:function(t,n,e){var o=e(7583),r=e(9212),i=e(5637),a=o.TypeError;t.exports=function(t){if(r(t))return t;throw a(i(t)+" is not a function")}},1186:function(t,n,e){var o=e(7583),r=e(2097),i=e(5637),a=o.TypeError;t.exports=function(t){if(r(t))return t;throw a(i(t)+" is not a constructor")}},9882:function(t,n,e){var o=e(7583),r=e(9212),i=o.String,a=o.TypeError;t.exports=function(t){if("object"==typeof t||r(t))return t;throw a("Can't set "+i(t)+" as a prototype")}},6288:function(t,n,e){var o=e(3649),r=e(3590),i=e(4615),a=o("unscopables"),c=Array.prototype;null==c[a]&&i.f(c,a,{configurable:!0,value:r(null)}),t.exports=function(t){c[a][t]=!0}},4761:function(t,n,e){var o=e(7583),r=e(2447),i=o.TypeError;t.exports=function(t,n){if(r(n,t))return t;throw i("Incorrect invocation")}},2569:function(t,n,e){var o=e(7583),r=e(794),i=o.String,a=o.TypeError;t.exports=function(t){if(r(t))return t;throw a(i(t)+" is not an object")}},5766:function(t,n,e){var o=e(2977),r=e(6782),i=e(1825),a=function(t){return function(n,e,a){var c,u=o(n),s=i(u),l=r(a,s);if(t&&e!=e){for(;s>l;)if((c=u[l++])!=c)return!0}else for(;s>l;l++)if((t||l in u)&&u[l]===e)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},4805:function(t,n,e){var o=e(2938),r=e(7386),i=e(5044),a=e(1324),c=e(1825),u=e(4822),s=r([].push),l=function(t){var n=1==t,e=2==t,r=3==t,l=4==t,f=6==t,d=7==t,v=5==t||f;return function(p,h,g,m){for(var _,b,y=a(p),w=i(y),E=o(h,g),L=c(w),T=0,x=m||u,C=n?x(p,L):e||d?x(p,0):void 0;L>T;T++)if((v||T in w)&&(b=E(_=w[T],T,y),t))if(n)C[T]=b;else if(b)switch(t){case 3:return!0;case 5:return _;case 6:return T;case 2:s(C,_)}else switch(t){case 4:return!1;case 7:s(C,_)}return f?-1:r||l?l:C}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},9269:function(t,n,e){var o=e(6544),r=e(3649),i=e(4061),a=r("species");t.exports=function(t){return i>=51||!o((function(){var n=[];return(n.constructor={})[a]=function(){return{foo:1}},1!==n[t](Boolean).foo}))}},4546:function(t,n,e){var o=e(7583),r=e(6782),i=e(1825),a=e(5999),c=o.Array,u=Math.max;t.exports=function(t,n,e){for(var o=i(t),s=r(n,o),l=r(void 0===e?o:e,o),f=c(u(l-s,0)),d=0;s0&&o[0]<4?1:+(o[0]+o[1])),!r&&a&&(!(o=a.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=a.match(/Chrome\/(\d+)/))&&(r=+o[1]),t.exports=r},5690:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},1178:function(t,n,e){var o=e(6544),r=e(4677);t.exports=!o((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",r(1,7)),7!==t.stack)}))},7263:function(t,n,e){var o=e(7583),r=e(6683).f,i=e(57),a=e(1270),c=e(460),u=e(3478),s=e(4451);t.exports=function(t,n){var e,l,f,d,v,p=t.target,h=t.global,g=t.stat;if(e=h?o:g?o[p]||c(p,{}):(o[p]||{}).prototype)for(l in n){if(d=n[l],f=t.noTargetGet?(v=r(e,l))&&v.value:e[l],!s(h?l:p+(g?".":"#")+l,t.forced)&&void 0!==f){if(typeof d==typeof f)continue;u(d,f)}(t.sham||f&&f.sham)&&i(d,"sham",!0),a(e,l,d,t)}}},6544:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},1611:function(t,n,e){var o=e(8987),r=Function.prototype,i=r.apply,a=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(o?a.bind(i):function(){return a.apply(i,arguments)})},2938:function(t,n,e){var o=e(7386),r=e(8257),i=e(8987),a=o(o.bind);t.exports=function(t,n){return r(t),void 0===n?t:i?a(t,n):function(){return t.apply(n,arguments)}}},8987:function(t,n,e){var o=e(6544);t.exports=!o((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},8262:function(t,n,e){var o=e(8987),r=Function.prototype.call;t.exports=o?r.bind(r):function(){return r.apply(r,arguments)}},4340:function(t,n,e){var o=e(8494),r=e(2870),i=Function.prototype,a=o&&Object.getOwnPropertyDescriptor,c=r(i,"name"),u=c&&"something"===function(){}.name,s=c&&(!o||o&&a(i,"name").configurable);t.exports={EXISTS:c,PROPER:u,CONFIGURABLE:s}},7386:function(t,n,e){var o=e(8987),r=Function.prototype,i=r.bind,a=r.call,c=o&&i.bind(a,a);t.exports=o?function(t){return t&&c(t)}:function(t){return t&&function(){return a.apply(t,arguments)}}},5897:function(t,n,e){var o=e(7583),r=e(9212),i=function(t){return r(t)?t:void 0};t.exports=function(t,n){return arguments.length<2?i(o[t]):o[t]&&o[t][n]}},8272:function(t,n,e){var o=e(3058),r=e(911),i=e(339),a=e(3649)("iterator");t.exports=function(t){if(null!=t)return r(t,a)||r(t,"@@iterator")||i[o(t)]}},6307:function(t,n,e){var o=e(7583),r=e(8262),i=e(8257),a=e(2569),c=e(5637),u=e(8272),s=o.TypeError;t.exports=function(t,n){var e=arguments.length<2?u(t):n;if(i(e))return a(r(e,t));throw s(c(t)+" is not iterable")}},911:function(t,n,e){var o=e(8257);t.exports=function(t,n){var e=t[n];return null==e?void 0:o(e)}},7583:function(t,n,e){var o=function(t){return t&&t.Math==Math&&t};t.exports=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof e.g&&e.g)||function(){return this}()||Function("return this")()},2870:function(t,n,e){var o=e(7386),r=e(1324),i=o({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,n){return i(r(t),n)}},4639:function(t){t.exports={}},2716:function(t,n,e){var o=e(7583);t.exports=function(t,n){var e=o.console;e&&e.error&&(1==arguments.length?e.error(t):e.error(t,n))}},482:function(t,n,e){var o=e(5897);t.exports=o("document","documentElement")},275:function(t,n,e){var o=e(8494),r=e(6544),i=e(6668);t.exports=!o&&!r((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},5044:function(t,n,e){var o=e(7583),r=e(7386),i=e(6544),a=e(9624),c=o.Object,u=r("".split);t.exports=i((function(){return!c("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?u(t,""):c(t)}:c},9734:function(t,n,e){var o=e(7386),r=e(9212),i=e(1314),a=o(Function.toString);r(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},4402:function(t,n,e){var o=e(794),r=e(57);t.exports=function(t,n){o(n)&&"cause"in n&&r(t,"cause",n.cause)}},2743:function(t,n,e){var o,r,i,a=e(9491),c=e(7583),u=e(7386),s=e(794),l=e(57),f=e(2870),d=e(1314),v=e(9137),p=e(4639),h="Object already initialized",g=c.TypeError,m=c.WeakMap;if(a||d.state){var _=d.state||(d.state=new m),b=u(_.get),y=u(_.has),w=u(_.set);o=function(t,n){if(y(_,t))throw new g(h);return n.facade=t,w(_,t,n),n},r=function(t){return b(_,t)||{}},i=function(t){return y(_,t)}}else{var E=v("state");p[E]=!0,o=function(t,n){if(f(t,E))throw new g(h);return n.facade=t,l(t,E,n),n},r=function(t){return f(t,E)?t[E]:{}},i=function(t){return f(t,E)}}t.exports={set:o,get:r,has:i,enforce:function(t){return i(t)?r(t):o(t,{})},getterFor:function(t){return function(n){var e;if(!s(n)||(e=r(n)).type!==t)throw g("Incompatible receiver, "+t+" required");return e}}}},114:function(t,n,e){var o=e(3649),r=e(339),i=o("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||a[i]===t)}},4521:function(t,n,e){var o=e(9624);t.exports=Array.isArray||function(t){return"Array"==o(t)}},9212:function(t){t.exports=function(t){return"function"==typeof t}},2097:function(t,n,e){var o=e(7386),r=e(6544),i=e(9212),a=e(3058),c=e(5897),u=e(9734),s=function(){},l=[],f=c("Reflect","construct"),d=/^\s*(?:class|function)\b/,v=o(d.exec),p=!d.exec(s),h=function(t){if(!i(t))return!1;try{return f(s,l,t),!0}catch(t){return!1}},g=function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!v(d,u(t))}catch(t){return!0}};g.sham=!0,t.exports=!f||r((function(){var t;return h(h.call)||!h(Object)||!h((function(){t=!0}))||t}))?g:h},4451:function(t,n,e){var o=e(6544),r=e(9212),i=/#|\.prototype\./,a=function(t,n){var e=u[c(t)];return e==l||e!=s&&(r(n)?o(n):!!n)},c=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},u=a.data={},s=a.NATIVE="N",l=a.POLYFILL="P";t.exports=a},794:function(t,n,e){var o=e(9212);t.exports=function(t){return"object"==typeof t?null!==t:o(t)}},6268:function(t){t.exports=!1},5871:function(t,n,e){var o=e(7583),r=e(5897),i=e(9212),a=e(2447),c=e(7786),u=o.Object;t.exports=c?function(t){return"symbol"==typeof t}:function(t){var n=r("Symbol");return i(n)&&a(n.prototype,u(t))}},4026:function(t,n,e){var o=e(7583),r=e(2938),i=e(8262),a=e(2569),c=e(5637),u=e(114),s=e(1825),l=e(2447),f=e(6307),d=e(8272),v=e(7093),p=o.TypeError,h=function(t,n){this.stopped=t,this.result=n},g=h.prototype;t.exports=function(t,n,e){var o,m,_,b,y,w,E,L=e&&e.that,T=!(!e||!e.AS_ENTRIES),x=!(!e||!e.IS_ITERATOR),C=!(!e||!e.INTERRUPTED),O=r(n,L),I=function(t){return o&&v(o,"normal",t),new h(!0,t)},D=function(t){return T?(a(t),C?O(t[0],t[1],I):O(t[0],t[1])):C?O(t,I):O(t)};if(x)o=t;else{if(!(m=d(t)))throw p(c(t)+" is not iterable");if(u(m)){for(_=0,b=s(t);b>_;_++)if((y=D(t[_]))&&l(g,y))return y;return new h(!1)}o=f(t,m)}for(w=o.next;!(E=i(w,o)).done;){try{y=D(E.value)}catch(t){v(o,"throw",t)}if("object"==typeof y&&y&&l(g,y))return y}return new h(!1)}},7093:function(t,n,e){var o=e(8262),r=e(2569),i=e(911);t.exports=function(t,n,e){var a,c;r(t);try{if(!(a=i(t,"return"))){if("throw"===n)throw e;return e}a=o(a,t)}catch(t){c=!0,a=t}if("throw"===n)throw e;if(c)throw a;return r(a),e}},2365:function(t,n,e){"use strict";var o,r,i,a=e(6544),c=e(9212),u=e(3590),s=e(729),l=e(1270),f=e(3649),d=e(6268),v=f("iterator"),p=!1;[].keys&&("next"in(i=[].keys())?(r=s(s(i)))!==Object.prototype&&(o=r):p=!0),null==o||a((function(){var t={};return o[v].call(t)!==t}))?o={}:d&&(o=u(o)),c(o[v])||l(o,v,(function(){return this})),t.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:p}},339:function(t){t.exports={}},1825:function(t,n,e){var o=e(97);t.exports=function(t){return o(t.length)}},2095:function(t,n,e){var o,r,i,a,c,u,s,l,f=e(7583),d=e(2938),v=e(6683).f,p=e(8117).set,h=e(7020),g=e(3256),m=e(6846),_=e(5354),b=f.MutationObserver||f.WebKitMutationObserver,y=f.document,w=f.process,E=f.Promise,L=v(f,"queueMicrotask"),T=L&&L.value;T||(o=function(){var t,n;for(_&&(t=w.domain)&&t.exit();r;){n=r.fn,r=r.next;try{n()}catch(t){throw r?a():i=void 0,t}}i=void 0,t&&t.enter()},h||_||m||!b||!y?!g&&E&&E.resolve?((s=E.resolve(void 0)).constructor=E,l=d(s.then,s),a=function(){l(o)}):_?a=function(){w.nextTick(o)}:(p=d(p,f),a=function(){p(o)}):(c=!0,u=y.createTextNode(""),new b(o).observe(u,{characterData:!0}),a=function(){u.data=c=!c})),t.exports=T||function(t){var n={fn:t,next:void 0};i&&(i.next=n),r||(r=n,a()),i=n}},783:function(t,n,e){var o=e(7583);t.exports=o.Promise},8640:function(t,n,e){var o=e(4061),r=e(6544);t.exports=!!Object.getOwnPropertySymbols&&!r((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&o&&o<41}))},9491:function(t,n,e){var o=e(7583),r=e(9212),i=e(9734),a=o.WeakMap;t.exports=r(a)&&/native code/.test(i(a))},5084:function(t,n,e){"use strict";var o=e(8257),r=function(t){var n,e;this.promise=new t((function(t,o){if(void 0!==n||void 0!==e)throw TypeError("Bad Promise constructor");n=t,e=o})),this.resolve=o(n),this.reject=o(e)};t.exports.f=function(t){return new r(t)}},2764:function(t,n,e){var o=e(8320);t.exports=function(t,n){return void 0===t?arguments.length<2?"":n:o(t)}},3590:function(t,n,e){var o,r=e(2569),i=e(8728),a=e(5690),c=e(4639),u=e(482),s=e(6668),l=e(9137),f=l("IE_PROTO"),d=function(){},v=function(t){return"