@dcloudio/vue-cli-plugin-uni 2.0.0 → 2.0.1-32920211122002
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/commands/build.js +64 -33
- package/commands/serve.js +12 -17
- package/generator.js +6 -2
- package/index.js +5 -3
- package/lib/chain-webpack.js +8 -1
- package/lib/check-update.js +56 -0
- package/lib/commands/custom.js +7 -4
- package/lib/commands/invoke.js +5 -4
- package/lib/configure-webpack.js +35 -5
- package/lib/copy-webpack-options.js +60 -20
- package/lib/env.js +99 -51
- package/lib/error-reporting.js +9 -3
- package/lib/mp/index.js +31 -16
- package/lib/options.js +6 -3
- package/lib/util.js +5 -6
- package/package.json +3 -3
- package/packages/@vue/component-compiler-utils/MODIFY.md +5 -0
- package/packages/@vue/component-compiler-utils/dist/compileStyle.js +11 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/API.md +873 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/CHANGELOG.md +466 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/LICENSE-MIT +22 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/README.md +49 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/index.js +26 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/parser.js +1088 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/processor.js +185 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/selectors/attribute.js +468 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/selectors/className.js +67 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/selectors/combinator.js +35 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/selectors/comment.js +35 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/selectors/constructors.js +91 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/selectors/container.js +392 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/selectors/guards.js +54 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/selectors/id.js +39 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/selectors/index.js +39 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/selectors/namespace.js +98 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/selectors/nesting.js +36 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/selectors/node.js +216 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/selectors/pseudo.js +40 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/selectors/root.js +60 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/selectors/selector.js +35 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/selectors/string.js +35 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/selectors/tag.js +35 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/selectors/types.js +15 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/selectors/universal.js +36 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/sortAscending.js +10 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/tokenTypes.js +39 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/tokenize.js +271 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/util/ensureObject.js +20 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/util/getProp.js +22 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/util/index.js +41 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/util/stripComments.js +21 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/util/unesc.js +18 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/package.json +76 -0
- package/packages/@vue/component-compiler-utils/node_modules/postcss-selector-parser/postcss-selector-parser.d.ts +499 -0
- package/packages/@vue/devtools-api/lib/cjs/api/api.d.ts +90 -0
- package/packages/@vue/devtools-api/lib/cjs/api/api.js +2 -0
- package/packages/@vue/devtools-api/lib/cjs/api/app.d.ts +1 -0
- package/packages/@vue/devtools-api/lib/cjs/api/app.js +2 -0
- package/packages/@vue/devtools-api/lib/cjs/api/component.d.ts +76 -0
- package/packages/@vue/devtools-api/lib/cjs/api/component.js +2 -0
- package/packages/@vue/devtools-api/lib/cjs/api/context.d.ts +5 -0
- package/packages/@vue/devtools-api/lib/cjs/api/context.js +2 -0
- package/packages/@vue/devtools-api/lib/cjs/api/hooks.d.ts +169 -0
- package/packages/@vue/devtools-api/lib/cjs/api/hooks.js +2 -0
- package/packages/@vue/devtools-api/lib/cjs/api/index.d.ts +6 -0
- package/packages/@vue/devtools-api/lib/cjs/api/index.js +18 -0
- package/packages/@vue/devtools-api/lib/cjs/api/util.d.ts +4 -0
- package/packages/@vue/devtools-api/lib/cjs/api/util.js +2 -0
- package/packages/@vue/devtools-api/lib/cjs/const.d.ts +1 -0
- package/packages/@vue/devtools-api/lib/cjs/const.js +4 -0
- package/packages/@vue/devtools-api/lib/cjs/env.d.ts +10 -0
- package/packages/@vue/devtools-api/lib/cjs/env.js +16 -0
- package/packages/@vue/devtools-api/lib/cjs/index.d.ts +14 -0
- package/packages/@vue/devtools-api/lib/cjs/index.js +31 -0
- package/packages/@vue/devtools-api/lib/esm/api/api.js +0 -0
- package/packages/@vue/devtools-api/lib/esm/api/app.js +0 -0
- package/packages/@vue/devtools-api/lib/esm/api/component.js +0 -0
- package/packages/@vue/devtools-api/lib/esm/api/context.js +0 -0
- package/packages/@vue/devtools-api/lib/esm/api/hooks.js +0 -0
- package/packages/@vue/devtools-api/lib/esm/api/index.js +6 -0
- package/packages/@vue/devtools-api/lib/esm/api/util.js +0 -0
- package/packages/@vue/devtools-api/lib/esm/const.js +1 -0
- package/packages/@vue/devtools-api/lib/esm/env.js +11 -0
- package/packages/@vue/devtools-api/lib/esm/index.js +17 -0
- package/packages/@vue/devtools-api/package.json +38 -0
- package/packages/app-vue-style-loader/lib/addStylesClient.js +1 -1
- package/packages/h5-vue-style-loader/lib/addStylesClient.js +1 -1
- package/packages/mp-vue/dist/mp.runtime.esm.js +3 -2
- package/packages/mp-vue/package.json +1 -0
- package/packages/uni-app/LICENSE +202 -0
- package/packages/uni-app/dist/uni-app.cjs.js +165 -0
- package/packages/uni-app/dist/uni-app.d.ts +61 -0
- package/packages/uni-app/dist/uni-app.es.js +108 -0
- package/packages/uni-app/package.json +22 -0
- package/packages/uni-cloud/dist/index.js +1 -1
- package/packages/uni-stat/dist/uni-stat.cjs.js +961 -0
- package/packages/uni-stat/dist/uni-stat.es.js +959 -0
- package/packages/uni-stat/lib/uni.plugin.js +68 -0
- package/packages/uni-stat/package.json +25 -0
- package/packages/vue3/node_modules/.yarn-integrity +27 -0
- package/packages/vue3/node_modules/@intlify/core-base/LICENSE +20 -0
- package/packages/vue3/node_modules/@intlify/core-base/README.md +7 -0
- package/packages/vue3/node_modules/@intlify/core-base/dist/core-base.cjs.js +989 -0
- package/packages/vue3/node_modules/@intlify/core-base/dist/core-base.cjs.prod.js +735 -0
- package/packages/vue3/node_modules/@intlify/core-base/dist/core-base.d.ts +576 -0
- package/packages/vue3/node_modules/@intlify/core-base/dist/core-base.esm-browser.js +2771 -0
- package/packages/vue3/node_modules/@intlify/core-base/dist/core-base.esm-browser.prod.js +6 -0
- package/packages/vue3/node_modules/@intlify/core-base/dist/core-base.esm-bundler.js +965 -0
- package/packages/vue3/node_modules/@intlify/core-base/dist/core-base.global.js +2814 -0
- package/packages/vue3/node_modules/@intlify/core-base/dist/core-base.global.prod.js +6 -0
- package/packages/vue3/node_modules/@intlify/core-base/index.js +7 -0
- package/packages/vue3/node_modules/@intlify/core-base/package.json +59 -0
- package/packages/vue3/node_modules/@intlify/devtools-if/LICENSE +20 -0
- package/packages/vue3/node_modules/@intlify/devtools-if/README.md +13 -0
- package/packages/vue3/node_modules/@intlify/devtools-if/dist/devtools-if.cjs.js +15 -0
- package/packages/vue3/node_modules/@intlify/devtools-if/dist/devtools-if.cjs.prod.js +15 -0
- package/packages/vue3/node_modules/@intlify/devtools-if/dist/devtools-if.d.ts +43 -0
- package/packages/vue3/node_modules/@intlify/devtools-if/dist/devtools-if.esm-bundler.js +11 -0
- package/packages/vue3/node_modules/@intlify/devtools-if/index.js +7 -0
- package/packages/vue3/node_modules/@intlify/devtools-if/package.json +49 -0
- package/packages/vue3/node_modules/@intlify/message-compiler/LICENSE +20 -0
- package/packages/vue3/node_modules/@intlify/message-compiler/README.md +7 -0
- package/packages/vue3/node_modules/@intlify/message-compiler/dist/message-compiler.cjs.js +1400 -0
- package/packages/vue3/node_modules/@intlify/message-compiler/dist/message-compiler.cjs.prod.js +1395 -0
- package/packages/vue3/node_modules/@intlify/message-compiler/dist/message-compiler.d.ts +197 -0
- package/packages/vue3/node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.js +1348 -0
- package/packages/vue3/node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.prod.js +6 -0
- package/packages/vue3/node_modules/@intlify/message-compiler/dist/message-compiler.esm-bundler.js +1329 -0
- package/packages/vue3/node_modules/@intlify/message-compiler/dist/message-compiler.global.js +1365 -0
- package/packages/vue3/node_modules/@intlify/message-compiler/dist/message-compiler.global.prod.js +6 -0
- package/packages/vue3/node_modules/@intlify/message-compiler/index.js +7 -0
- package/packages/vue3/node_modules/@intlify/message-compiler/package.json +56 -0
- package/packages/vue3/node_modules/@intlify/message-resolver/LICENSE +20 -0
- package/packages/vue3/node_modules/@intlify/message-resolver/README.md +7 -0
- package/packages/vue3/node_modules/@intlify/message-resolver/dist/message-resolver.cjs.js +302 -0
- package/packages/vue3/node_modules/@intlify/message-resolver/dist/message-resolver.cjs.prod.js +302 -0
- package/packages/vue3/node_modules/@intlify/message-resolver/dist/message-resolver.d.ts +21 -0
- package/packages/vue3/node_modules/@intlify/message-resolver/dist/message-resolver.esm-bundler.js +297 -0
- package/packages/vue3/node_modules/@intlify/message-resolver/index.js +7 -0
- package/packages/vue3/node_modules/@intlify/message-resolver/package.json +46 -0
- package/packages/vue3/node_modules/@intlify/runtime/LICENSE +20 -0
- package/packages/vue3/node_modules/@intlify/runtime/README.md +7 -0
- package/packages/vue3/node_modules/@intlify/runtime/dist/runtime.cjs.js +116 -0
- package/packages/vue3/node_modules/@intlify/runtime/dist/runtime.cjs.prod.js +116 -0
- package/packages/vue3/node_modules/@intlify/runtime/dist/runtime.d.ts +95 -0
- package/packages/vue3/node_modules/@intlify/runtime/dist/runtime.esm-bundler.js +111 -0
- package/packages/vue3/node_modules/@intlify/runtime/index.js +7 -0
- package/packages/vue3/node_modules/@intlify/runtime/package.json +51 -0
- package/packages/vue3/node_modules/@intlify/shared/LICENSE +20 -0
- package/packages/vue3/node_modules/@intlify/shared/README.md +18 -0
- package/packages/vue3/node_modules/@intlify/shared/dist/shared.cjs.js +222 -0
- package/packages/vue3/node_modules/@intlify/shared/dist/shared.cjs.prod.js +209 -0
- package/packages/vue3/node_modules/@intlify/shared/dist/shared.d.ts +145 -0
- package/packages/vue3/node_modules/@intlify/shared/dist/shared.esm-bundler.js +192 -0
- package/packages/vue3/node_modules/@intlify/shared/index.js +7 -0
- package/packages/vue3/node_modules/@intlify/shared/package.json +46 -0
- package/packages/vue3/node_modules/@intlify/vue-devtools/LICENSE +20 -0
- package/packages/vue3/node_modules/@intlify/vue-devtools/README.md +7 -0
- package/packages/vue3/node_modules/@intlify/vue-devtools/dist/vue-devtools.cjs.js +24 -0
- package/packages/vue3/node_modules/@intlify/vue-devtools/dist/vue-devtools.cjs.prod.js +24 -0
- package/packages/vue3/node_modules/@intlify/vue-devtools/dist/vue-devtools.d.ts +81 -0
- package/packages/vue3/node_modules/@intlify/vue-devtools/dist/vue-devtools.esm-bundler.js +18 -0
- package/packages/vue3/node_modules/@intlify/vue-devtools/index.js +7 -0
- package/packages/vue3/node_modules/@intlify/vue-devtools/package.json +51 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/cjs/api/api.d.ts +90 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/cjs/api/api.js +2 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/cjs/api/app.d.ts +1 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/cjs/api/app.js +2 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/cjs/api/component.d.ts +76 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/cjs/api/component.js +2 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/cjs/api/context.d.ts +5 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/cjs/api/context.js +2 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/cjs/api/hooks.d.ts +169 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/cjs/api/hooks.js +2 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/cjs/api/index.d.ts +6 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/cjs/api/index.js +18 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/cjs/api/util.d.ts +4 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/cjs/api/util.js +2 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/cjs/const.d.ts +1 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/cjs/const.js +4 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/cjs/env.d.ts +10 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/cjs/env.js +16 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/cjs/index.d.ts +14 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/cjs/index.js +31 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/esm/api/api.js +0 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/esm/api/app.js +0 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/esm/api/component.js +0 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/esm/api/context.js +0 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/esm/api/hooks.js +0 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/esm/api/index.js +6 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/esm/api/util.js +0 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/esm/const.js +1 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/esm/env.js +11 -0
- package/packages/vue3/node_modules/@vue/devtools-api/lib/esm/index.js +17 -0
- package/packages/vue3/node_modules/@vue/devtools-api/package.json +38 -0
- package/packages/vue3/node_modules/source-map/CHANGELOG.md +301 -0
- package/packages/vue3/node_modules/source-map/LICENSE +28 -0
- package/packages/vue3/node_modules/source-map/README.md +742 -0
- package/packages/vue3/node_modules/source-map/dist/source-map.debug.js +3234 -0
- package/packages/vue3/node_modules/source-map/dist/source-map.js +3233 -0
- package/packages/vue3/node_modules/source-map/dist/source-map.min.js +2 -0
- package/packages/vue3/node_modules/source-map/dist/source-map.min.js.map +1 -0
- package/packages/vue3/node_modules/source-map/lib/array-set.js +121 -0
- package/packages/vue3/node_modules/source-map/lib/base64-vlq.js +140 -0
- package/packages/vue3/node_modules/source-map/lib/base64.js +67 -0
- package/packages/vue3/node_modules/source-map/lib/binary-search.js +111 -0
- package/packages/vue3/node_modules/source-map/lib/mapping-list.js +79 -0
- package/packages/vue3/node_modules/source-map/lib/quick-sort.js +114 -0
- package/packages/vue3/node_modules/source-map/lib/source-map-consumer.js +1145 -0
- package/packages/vue3/node_modules/source-map/lib/source-map-generator.js +425 -0
- package/packages/vue3/node_modules/source-map/lib/source-node.js +413 -0
- package/packages/vue3/node_modules/source-map/lib/util.js +488 -0
- package/packages/vue3/node_modules/source-map/package.json +73 -0
- package/packages/vue3/node_modules/source-map/source-map.d.ts +98 -0
- package/packages/vue3/node_modules/source-map/source-map.js +8 -0
- package/packages/vue3/node_modules/vue-i18n/LICENSE +20 -0
- package/packages/vue3/node_modules/vue-i18n/README.md +74 -0
- package/packages/vue3/node_modules/vue-i18n/dist/vue-i18n.cjs.js +1801 -0
- package/packages/vue3/node_modules/vue-i18n/dist/vue-i18n.cjs.prod.js +1685 -0
- package/packages/vue3/node_modules/vue-i18n/dist/vue-i18n.d.ts +3302 -0
- package/packages/vue3/node_modules/vue-i18n/dist/vue-i18n.esm-browser.js +5052 -0
- package/packages/vue3/node_modules/vue-i18n/dist/vue-i18n.esm-browser.prod.js +6 -0
- package/packages/vue3/node_modules/vue-i18n/dist/vue-i18n.esm-bundler.js +2226 -0
- package/packages/vue3/node_modules/vue-i18n/dist/vue-i18n.global.js +5065 -0
- package/packages/vue3/node_modules/vue-i18n/dist/vue-i18n.global.prod.js +6 -0
- package/packages/vue3/node_modules/vue-i18n/dist/vue-i18n.runtime.esm-browser.js +3724 -0
- package/packages/vue3/node_modules/vue-i18n/dist/vue-i18n.runtime.esm-browser.prod.js +6 -0
- package/packages/vue3/node_modules/vue-i18n/dist/vue-i18n.runtime.esm-bundler.js +2224 -0
- package/packages/vue3/node_modules/vue-i18n/dist/vue-i18n.runtime.global.js +3737 -0
- package/packages/vue3/node_modules/vue-i18n/dist/vue-i18n.runtime.global.prod.js +6 -0
- package/packages/vue3/node_modules/vue-i18n/index.js +7 -0
- package/packages/vue3/node_modules/vue-i18n/package.json +69 -0
- package/packages/vue3/node_modules/vue-i18n/vetur/attributes.json +62 -0
- package/packages/vue3/node_modules/vue-i18n/vetur/tags.json +14 -0
- package/packages/vue3/package.json +15 -0
- package/packages/vue3/yarn.lock +79 -0
- package/packages/vuex/CHANGELOG.md +604 -0
- package/packages/vuex/LICENSE +21 -0
- package/packages/vuex/README.md +55 -0
- package/packages/vuex/dist/vuex.cjs.js +1474 -0
- package/packages/vuex/dist/vuex.esm-browser.js +1472 -0
- package/packages/vuex/dist/vuex.esm-browser.prod.js +1307 -0
- package/packages/vuex/dist/vuex.esm-bundler.js +1473 -0
- package/packages/vuex/dist/vuex.global.js +1499 -0
- package/packages/vuex/dist/vuex.global.prod.js +6 -0
- package/packages/vuex/dist/vuex.mjs +32 -0
- package/packages/vuex/package.json +99 -0
- package/packages/vuex/types/helpers.d.ts +86 -0
- package/packages/vuex/types/index.d.ts +167 -0
- package/packages/vuex/types/logger.d.ts +20 -0
- package/packages/vuex/types/vue.d.ts +12 -0
- package/packages/vuex3/CHANGELOG.md +356 -0
- package/packages/vuex3/LICENSE +21 -0
- package/packages/vuex3/README.md +59 -0
- package/packages/vuex3/dist/logger.js +155 -0
- package/packages/vuex3/dist/vuex.common.js +1244 -0
- package/packages/vuex3/dist/vuex.esm.browser.js +1200 -0
- package/packages/vuex3/dist/vuex.esm.browser.min.js +6 -0
- package/packages/vuex3/dist/vuex.esm.js +1243 -0
- package/packages/vuex3/dist/vuex.js +1250 -0
- package/packages/vuex3/dist/vuex.min.js +6 -0
- package/packages/vuex3/dist/vuex.mjs +26 -0
- package/packages/vuex3/package.json +96 -0
- package/packages/vuex3/types/helpers.d.ts +86 -0
- package/packages/vuex3/types/index.d.ts +164 -0
- package/packages/vuex3/types/logger.d.ts +20 -0
- package/packages/vuex3/types/vue.d.ts +18 -0
- package/packages/webpack-uni-app-loader/plugin/index.js +8 -2
- package/packages/webpack-uni-app-loader/view/main.js +12 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @intlify/shared v9.1.7
|
|
3
|
+
* (c) 2021 kazuya kawaguchi
|
|
4
|
+
* Released under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Original Utilities
|
|
8
|
+
* written by kazuya kawaguchi
|
|
9
|
+
*/
|
|
10
|
+
const inBrowser = typeof window !== 'undefined';
|
|
11
|
+
let mark;
|
|
12
|
+
let measure;
|
|
13
|
+
if ((process.env.NODE_ENV !== 'production')) {
|
|
14
|
+
const perf = inBrowser && window.performance;
|
|
15
|
+
if (perf &&
|
|
16
|
+
perf.mark &&
|
|
17
|
+
perf.measure &&
|
|
18
|
+
perf.clearMarks &&
|
|
19
|
+
perf.clearMeasures) {
|
|
20
|
+
mark = (tag) => perf.mark(tag);
|
|
21
|
+
measure = (name, startTag, endTag) => {
|
|
22
|
+
perf.measure(name, startTag, endTag);
|
|
23
|
+
perf.clearMarks(startTag);
|
|
24
|
+
perf.clearMarks(endTag);
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
|
|
29
|
+
/* eslint-disable */
|
|
30
|
+
function format(message, ...args) {
|
|
31
|
+
if (args.length === 1 && isObject(args[0])) {
|
|
32
|
+
args = args[0];
|
|
33
|
+
}
|
|
34
|
+
if (!args || !args.hasOwnProperty) {
|
|
35
|
+
args = {};
|
|
36
|
+
}
|
|
37
|
+
return message.replace(RE_ARGS, (match, identifier) => {
|
|
38
|
+
return args.hasOwnProperty(identifier) ? args[identifier] : '';
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
const hasSymbol = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
|
|
42
|
+
const makeSymbol = (name) => hasSymbol ? Symbol(name) : name;
|
|
43
|
+
const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });
|
|
44
|
+
const friendlyJSONstringify = (json) => JSON.stringify(json)
|
|
45
|
+
.replace(/\u2028/g, '\\u2028')
|
|
46
|
+
.replace(/\u2029/g, '\\u2029')
|
|
47
|
+
.replace(/\u0027/g, '\\u0027');
|
|
48
|
+
const isNumber = (val) => typeof val === 'number' && isFinite(val);
|
|
49
|
+
const isDate = (val) => toTypeString(val) === '[object Date]';
|
|
50
|
+
const isRegExp = (val) => toTypeString(val) === '[object RegExp]';
|
|
51
|
+
const isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;
|
|
52
|
+
function warn(msg, err) {
|
|
53
|
+
if (typeof console !== 'undefined') {
|
|
54
|
+
console.warn(`[intlify] ` + msg);
|
|
55
|
+
/* istanbul ignore if */
|
|
56
|
+
if (err) {
|
|
57
|
+
console.warn(err.stack);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
const assign = Object.assign;
|
|
62
|
+
let _globalThis;
|
|
63
|
+
const getGlobalThis = () => {
|
|
64
|
+
// prettier-ignore
|
|
65
|
+
return (_globalThis ||
|
|
66
|
+
(_globalThis =
|
|
67
|
+
typeof globalThis !== 'undefined'
|
|
68
|
+
? globalThis
|
|
69
|
+
: typeof self !== 'undefined'
|
|
70
|
+
? self
|
|
71
|
+
: typeof window !== 'undefined'
|
|
72
|
+
? window
|
|
73
|
+
: typeof global !== 'undefined'
|
|
74
|
+
? global
|
|
75
|
+
: {}));
|
|
76
|
+
};
|
|
77
|
+
function escapeHtml(rawText) {
|
|
78
|
+
return rawText
|
|
79
|
+
.replace(/</g, '<')
|
|
80
|
+
.replace(/>/g, '>')
|
|
81
|
+
.replace(/"/g, '"')
|
|
82
|
+
.replace(/'/g, ''');
|
|
83
|
+
}
|
|
84
|
+
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
85
|
+
function hasOwn(obj, key) {
|
|
86
|
+
return hasOwnProperty.call(obj, key);
|
|
87
|
+
}
|
|
88
|
+
/* eslint-enable */
|
|
89
|
+
/**
|
|
90
|
+
* Useful Utilities By Evan you
|
|
91
|
+
* Modified by kazuya kawaguchi
|
|
92
|
+
* MIT License
|
|
93
|
+
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts
|
|
94
|
+
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts
|
|
95
|
+
*/
|
|
96
|
+
const isArray = Array.isArray;
|
|
97
|
+
const isFunction = (val) => typeof val === 'function';
|
|
98
|
+
const isString = (val) => typeof val === 'string';
|
|
99
|
+
const isBoolean = (val) => typeof val === 'boolean';
|
|
100
|
+
const isSymbol = (val) => typeof val === 'symbol';
|
|
101
|
+
const isObject = (val) => // eslint-disable-line
|
|
102
|
+
val !== null && typeof val === 'object';
|
|
103
|
+
const isPromise = (val) => {
|
|
104
|
+
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
|
105
|
+
};
|
|
106
|
+
const objectToString = Object.prototype.toString;
|
|
107
|
+
const toTypeString = (value) => objectToString.call(value);
|
|
108
|
+
const isPlainObject = (val) => toTypeString(val) === '[object Object]';
|
|
109
|
+
// for converting list and named values to displayed strings.
|
|
110
|
+
const toDisplayString = (val) => {
|
|
111
|
+
return val == null
|
|
112
|
+
? ''
|
|
113
|
+
: isArray(val) || (isPlainObject(val) && val.toString === objectToString)
|
|
114
|
+
? JSON.stringify(val, null, 2)
|
|
115
|
+
: String(val);
|
|
116
|
+
};
|
|
117
|
+
const RANGE = 2;
|
|
118
|
+
function generateCodeFrame(source, start = 0, end = source.length) {
|
|
119
|
+
const lines = source.split(/\r?\n/);
|
|
120
|
+
let count = 0;
|
|
121
|
+
const res = [];
|
|
122
|
+
for (let i = 0; i < lines.length; i++) {
|
|
123
|
+
count += lines[i].length + 1;
|
|
124
|
+
if (count >= start) {
|
|
125
|
+
for (let j = i - RANGE; j <= i + RANGE || end > count; j++) {
|
|
126
|
+
if (j < 0 || j >= lines.length)
|
|
127
|
+
continue;
|
|
128
|
+
const line = j + 1;
|
|
129
|
+
res.push(`${line}${' '.repeat(3 - String(line).length)}| ${lines[j]}`);
|
|
130
|
+
const lineLength = lines[j].length;
|
|
131
|
+
if (j === i) {
|
|
132
|
+
// push underline
|
|
133
|
+
const pad = start - (count - lineLength) + 1;
|
|
134
|
+
const length = Math.max(1, end > count ? lineLength - pad : end - start);
|
|
135
|
+
res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length));
|
|
136
|
+
}
|
|
137
|
+
else if (j > i) {
|
|
138
|
+
if (end > count) {
|
|
139
|
+
const length = Math.max(Math.min(end - count, lineLength), 1);
|
|
140
|
+
res.push(` | ` + '^'.repeat(length));
|
|
141
|
+
}
|
|
142
|
+
count += lineLength + 1;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return res.join('\n');
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Event emitter, forked from the below:
|
|
153
|
+
* - original repository url: https://github.com/developit/mitt
|
|
154
|
+
* - code url: https://github.com/developit/mitt/blob/master/src/index.ts
|
|
155
|
+
* - author: Jason Miller (https://github.com/developit)
|
|
156
|
+
* - license: MIT
|
|
157
|
+
*/
|
|
158
|
+
/**
|
|
159
|
+
* Create a event emitter
|
|
160
|
+
*
|
|
161
|
+
* @returns An event emitter
|
|
162
|
+
*/
|
|
163
|
+
function createEmitter() {
|
|
164
|
+
const events = new Map();
|
|
165
|
+
const emitter = {
|
|
166
|
+
events,
|
|
167
|
+
on(event, handler) {
|
|
168
|
+
const handlers = events.get(event);
|
|
169
|
+
const added = handlers && handlers.push(handler);
|
|
170
|
+
if (!added) {
|
|
171
|
+
events.set(event, [handler]);
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
off(event, handler) {
|
|
175
|
+
const handlers = events.get(event);
|
|
176
|
+
if (handlers) {
|
|
177
|
+
handlers.splice(handlers.indexOf(handler) >>> 0, 1);
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
emit(event, payload) {
|
|
181
|
+
(events.get(event) || [])
|
|
182
|
+
.slice()
|
|
183
|
+
.map(handler => handler(payload));
|
|
184
|
+
(events.get('*') || [])
|
|
185
|
+
.slice()
|
|
186
|
+
.map(handler => handler(event, payload));
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
return emitter;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export { assign, createEmitter, escapeHtml, format, friendlyJSONstringify, generateCodeFrame, generateFormatCacheKey, getGlobalThis, hasOwn, inBrowser, isArray, isBoolean, isDate, isEmptyObject, isFunction, isNumber, isObject, isPlainObject, isPromise, isRegExp, isString, isSymbol, makeSymbol, mark, measure, objectToString, toDisplayString, toTypeString, warn };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@intlify/shared",
|
|
3
|
+
"version": "9.1.7",
|
|
4
|
+
"description": "@intlify/shared",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"i18n",
|
|
7
|
+
"internationalization",
|
|
8
|
+
"intlify",
|
|
9
|
+
"utitlity"
|
|
10
|
+
],
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"author": {
|
|
13
|
+
"name": "kazuya kawaguchi",
|
|
14
|
+
"email": "kawakazu80@gmail.com"
|
|
15
|
+
},
|
|
16
|
+
"homepage": "https://github.com/intlify/vue-i18n-next/tree/master/packages/shared#readme",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/intlify/vue-i18n-next.git",
|
|
20
|
+
"directory": "packages/shared"
|
|
21
|
+
},
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/intlify/vue-i18n-next/issues"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"index.js",
|
|
27
|
+
"dist"
|
|
28
|
+
],
|
|
29
|
+
"main": "index.js",
|
|
30
|
+
"module": "dist/shared.esm-bundler.js",
|
|
31
|
+
"types": "dist/shared.d.ts",
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">= 10"
|
|
34
|
+
},
|
|
35
|
+
"buildOptions": {
|
|
36
|
+
"name": "IntlifyShared",
|
|
37
|
+
"formats": [
|
|
38
|
+
"esm-bundler",
|
|
39
|
+
"cjs"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"publishConfig": {
|
|
43
|
+
"access": "public"
|
|
44
|
+
},
|
|
45
|
+
"sideEffects": false
|
|
46
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 kazuya kawaguchi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
+
subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @intlify/vue-devtools v9.1.7
|
|
3
|
+
* (c) 2021 kazuya kawaguchi
|
|
4
|
+
* Released under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
|
+
|
|
10
|
+
const VueDevToolsLabels = {
|
|
11
|
+
["vue-devtools-plugin-vue-i18n" /* PLUGIN */]: 'Vue I18n devtools',
|
|
12
|
+
["vue-i18n-resource-inspector" /* CUSTOM_INSPECTOR */]: 'I18n Resources',
|
|
13
|
+
["vue-i18n-timeline" /* TIMELINE */]: 'Vue I18n'
|
|
14
|
+
};
|
|
15
|
+
const VueDevToolsPlaceholders = {
|
|
16
|
+
["vue-i18n-resource-inspector" /* CUSTOM_INSPECTOR */]: 'Search for scopes ...'
|
|
17
|
+
};
|
|
18
|
+
const VueDevToolsTimelineColors = {
|
|
19
|
+
["vue-i18n-timeline" /* TIMELINE */]: 0xffcd19
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
exports.VueDevToolsLabels = VueDevToolsLabels;
|
|
23
|
+
exports.VueDevToolsPlaceholders = VueDevToolsPlaceholders;
|
|
24
|
+
exports.VueDevToolsTimelineColors = VueDevToolsTimelineColors;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @intlify/vue-devtools v9.1.7
|
|
3
|
+
* (c) 2021 kazuya kawaguchi
|
|
4
|
+
* Released under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
|
+
|
|
10
|
+
const VueDevToolsLabels = {
|
|
11
|
+
["vue-devtools-plugin-vue-i18n" /* PLUGIN */]: 'Vue I18n devtools',
|
|
12
|
+
["vue-i18n-resource-inspector" /* CUSTOM_INSPECTOR */]: 'I18n Resources',
|
|
13
|
+
["vue-i18n-timeline" /* TIMELINE */]: 'Vue I18n'
|
|
14
|
+
};
|
|
15
|
+
const VueDevToolsPlaceholders = {
|
|
16
|
+
["vue-i18n-resource-inspector" /* CUSTOM_INSPECTOR */]: 'Search for scopes ...'
|
|
17
|
+
};
|
|
18
|
+
const VueDevToolsTimelineColors = {
|
|
19
|
+
["vue-i18n-timeline" /* TIMELINE */]: 0xffcd19
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
exports.VueDevToolsLabels = VueDevToolsLabels;
|
|
23
|
+
exports.VueDevToolsPlaceholders = VueDevToolsPlaceholders;
|
|
24
|
+
exports.VueDevToolsTimelineColors = VueDevToolsTimelineColors;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { CoreMissingType } from '@intlify/runtime';
|
|
2
|
+
import type { Emittable } from '@intlify/shared';
|
|
3
|
+
import type { Locale } from '@intlify/runtime';
|
|
4
|
+
import type { Path } from '@intlify/message-resolver';
|
|
5
|
+
import type { PathValue } from '@intlify/message-resolver';
|
|
6
|
+
|
|
7
|
+
export declare type VueDevToolsEmitter = Emittable<VueDevToolsEmitterEvents>;
|
|
8
|
+
|
|
9
|
+
export declare type VueDevToolsEmitterEvents = {
|
|
10
|
+
[VueDevToolsTimelineEvents.COMPILE_ERROR]: VueDevToolsTimelineEventPayloads[VueDevToolsTimelineEvents.COMPILE_ERROR];
|
|
11
|
+
[VueDevToolsTimelineEvents.MISSING]: VueDevToolsTimelineEventPayloads[VueDevToolsTimelineEvents.MISSING];
|
|
12
|
+
[VueDevToolsTimelineEvents.FALBACK]: VueDevToolsTimelineEventPayloads[VueDevToolsTimelineEvents.FALBACK];
|
|
13
|
+
[VueDevToolsTimelineEvents.MESSAGE_RESOLVE]: VueDevToolsTimelineEventPayloads[VueDevToolsTimelineEvents.MESSAGE_RESOLVE];
|
|
14
|
+
[VueDevToolsTimelineEvents.MESSAGE_COMPILATION]: VueDevToolsTimelineEventPayloads[VueDevToolsTimelineEvents.MESSAGE_COMPILATION];
|
|
15
|
+
[VueDevToolsTimelineEvents.MESSAGE_EVALUATION]: VueDevToolsTimelineEventPayloads[VueDevToolsTimelineEvents.MESSAGE_EVALUATION];
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export declare const enum VueDevToolsIDs {
|
|
19
|
+
PLUGIN = "vue-devtools-plugin-vue-i18n",
|
|
20
|
+
CUSTOM_INSPECTOR = "vue-i18n-resource-inspector",
|
|
21
|
+
TIMELINE = "vue-i18n-timeline"
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export declare const VueDevToolsLabels: Record<string, string>;
|
|
25
|
+
|
|
26
|
+
export declare const VueDevToolsPlaceholders: Record<string, string>;
|
|
27
|
+
|
|
28
|
+
export declare const VueDevToolsTimelineColors: Record<string, number>;
|
|
29
|
+
|
|
30
|
+
export declare type VueDevToolsTimelineEventPayloads = {
|
|
31
|
+
[VueDevToolsTimelineEvents.COMPILE_ERROR]: {
|
|
32
|
+
message: PathValue;
|
|
33
|
+
error: string;
|
|
34
|
+
start?: number;
|
|
35
|
+
end?: number;
|
|
36
|
+
groupId?: string;
|
|
37
|
+
};
|
|
38
|
+
[VueDevToolsTimelineEvents.MISSING]: {
|
|
39
|
+
locale: Locale;
|
|
40
|
+
key: Path;
|
|
41
|
+
type: CoreMissingType;
|
|
42
|
+
groupId?: string;
|
|
43
|
+
};
|
|
44
|
+
[VueDevToolsTimelineEvents.FALBACK]: {
|
|
45
|
+
key: Path;
|
|
46
|
+
type: CoreMissingType;
|
|
47
|
+
from?: Locale;
|
|
48
|
+
to: Locale | 'global';
|
|
49
|
+
groupId?: string;
|
|
50
|
+
};
|
|
51
|
+
[VueDevToolsTimelineEvents.MESSAGE_RESOLVE]: {
|
|
52
|
+
type: VueDevToolsTimelineEvents.MESSAGE_RESOLVE;
|
|
53
|
+
key: Path;
|
|
54
|
+
message: PathValue;
|
|
55
|
+
time: number;
|
|
56
|
+
groupId?: string;
|
|
57
|
+
};
|
|
58
|
+
[VueDevToolsTimelineEvents.MESSAGE_COMPILATION]: {
|
|
59
|
+
type: VueDevToolsTimelineEvents.MESSAGE_COMPILATION;
|
|
60
|
+
message: PathValue;
|
|
61
|
+
time: number;
|
|
62
|
+
groupId?: string;
|
|
63
|
+
};
|
|
64
|
+
[VueDevToolsTimelineEvents.MESSAGE_EVALUATION]: {
|
|
65
|
+
type: VueDevToolsTimelineEvents.MESSAGE_EVALUATION;
|
|
66
|
+
value: unknown;
|
|
67
|
+
time: number;
|
|
68
|
+
groupId?: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export declare const enum VueDevToolsTimelineEvents {
|
|
73
|
+
COMPILE_ERROR = "compile-error",
|
|
74
|
+
MISSING = "missing",
|
|
75
|
+
FALBACK = "fallback",
|
|
76
|
+
MESSAGE_RESOLVE = "message-resolve",
|
|
77
|
+
MESSAGE_COMPILATION = "message-compilation",
|
|
78
|
+
MESSAGE_EVALUATION = "message-evaluation"
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export { }
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @intlify/vue-devtools v9.1.7
|
|
3
|
+
* (c) 2021 kazuya kawaguchi
|
|
4
|
+
* Released under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
const VueDevToolsLabels = {
|
|
7
|
+
["vue-devtools-plugin-vue-i18n" /* PLUGIN */]: 'Vue I18n devtools',
|
|
8
|
+
["vue-i18n-resource-inspector" /* CUSTOM_INSPECTOR */]: 'I18n Resources',
|
|
9
|
+
["vue-i18n-timeline" /* TIMELINE */]: 'Vue I18n'
|
|
10
|
+
};
|
|
11
|
+
const VueDevToolsPlaceholders = {
|
|
12
|
+
["vue-i18n-resource-inspector" /* CUSTOM_INSPECTOR */]: 'Search for scopes ...'
|
|
13
|
+
};
|
|
14
|
+
const VueDevToolsTimelineColors = {
|
|
15
|
+
["vue-i18n-timeline" /* TIMELINE */]: 0xffcd19
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { VueDevToolsLabels, VueDevToolsPlaceholders, VueDevToolsTimelineColors };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@intlify/vue-devtools",
|
|
3
|
+
"version": "9.1.7",
|
|
4
|
+
"description": "@intlify/vue-devtools",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"i18n",
|
|
7
|
+
"internationalization",
|
|
8
|
+
"intlify",
|
|
9
|
+
"vue-devtools"
|
|
10
|
+
],
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"author": {
|
|
13
|
+
"name": "kazuya kawaguchi",
|
|
14
|
+
"email": "kawakazu80@gmail.com"
|
|
15
|
+
},
|
|
16
|
+
"homepage": "https://github.com/intlify/vue-i18n-next/tree/master/packages/vue-devtools#readme",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/intlify/vue-i18n-next.git",
|
|
20
|
+
"directory": "packages/vue-devtools"
|
|
21
|
+
},
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/intlify/vue-i18n-next/issues"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"index.js",
|
|
27
|
+
"dist"
|
|
28
|
+
],
|
|
29
|
+
"main": "index.js",
|
|
30
|
+
"module": "dist/vue-devtools.esm-bundler.js",
|
|
31
|
+
"types": "dist/vue-devtools.d.ts",
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@intlify/message-resolver": "9.1.7",
|
|
34
|
+
"@intlify/runtime": "9.1.7",
|
|
35
|
+
"@intlify/shared": "9.1.7"
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">= 10"
|
|
39
|
+
},
|
|
40
|
+
"buildOptions": {
|
|
41
|
+
"name": "IntlifyVueDevtools",
|
|
42
|
+
"formats": [
|
|
43
|
+
"esm-bundler",
|
|
44
|
+
"cjs"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"access": "public"
|
|
49
|
+
},
|
|
50
|
+
"sideEffects": false
|
|
51
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { ComponentBounds, Hookable } from './hooks';
|
|
2
|
+
import { Context } from './context';
|
|
3
|
+
import { ComponentInstance, ComponentState, StateBase } from './component';
|
|
4
|
+
import { App } from './app';
|
|
5
|
+
import { ID } from './util';
|
|
6
|
+
export interface DevtoolsPluginApi {
|
|
7
|
+
on: Hookable<Context>;
|
|
8
|
+
notifyComponentUpdate(instance?: ComponentInstance): any;
|
|
9
|
+
addTimelineLayer(options: TimelineLayerOptions): any;
|
|
10
|
+
addTimelineEvent(options: TimelineEventOptions): any;
|
|
11
|
+
addInspector(options: CustomInspectorOptions): any;
|
|
12
|
+
sendInspectorTree(inspectorId: string): any;
|
|
13
|
+
sendInspectorState(inspectorId: string): any;
|
|
14
|
+
selectInspectorNode(inspectorId: string, nodeId: string): any;
|
|
15
|
+
getComponentBounds(instance: ComponentInstance): Promise<ComponentBounds>;
|
|
16
|
+
getComponentName(instance: ComponentInstance): Promise<string>;
|
|
17
|
+
getComponentInstances(app: App): Promise<ComponentInstance[]>;
|
|
18
|
+
highlightElement(instance: ComponentInstance): any;
|
|
19
|
+
unhighlightElement(): any;
|
|
20
|
+
}
|
|
21
|
+
export interface AppRecord {
|
|
22
|
+
id: number;
|
|
23
|
+
name: string;
|
|
24
|
+
instanceMap: Map<string, ComponentInstance>;
|
|
25
|
+
rootInstance: ComponentInstance;
|
|
26
|
+
}
|
|
27
|
+
export interface TimelineLayerOptions<TData = any, TMeta = any> {
|
|
28
|
+
id: string;
|
|
29
|
+
label: string;
|
|
30
|
+
color: number;
|
|
31
|
+
skipScreenshots?: boolean;
|
|
32
|
+
groupsOnly?: boolean;
|
|
33
|
+
ignoreNoDurationGroups?: boolean;
|
|
34
|
+
screenshotOverlayRender?: (event: TimelineEvent<TData, TMeta> & ScreenshotOverlayEvent, ctx: ScreenshotOverlayRenderContext) => ScreenshotOverlayRenderResult | Promise<ScreenshotOverlayRenderResult>;
|
|
35
|
+
}
|
|
36
|
+
export interface ScreenshotOverlayEvent {
|
|
37
|
+
layerId: string;
|
|
38
|
+
renderMeta: any;
|
|
39
|
+
}
|
|
40
|
+
export interface ScreenshotOverlayRenderContext<TData = any, TMeta = any> {
|
|
41
|
+
screenshot: ScreenshotData;
|
|
42
|
+
events: (TimelineEvent<TData, TMeta> & ScreenshotOverlayEvent)[];
|
|
43
|
+
index: number;
|
|
44
|
+
}
|
|
45
|
+
export declare type ScreenshotOverlayRenderResult = HTMLElement | string | false;
|
|
46
|
+
export interface ScreenshotData {
|
|
47
|
+
time: number;
|
|
48
|
+
}
|
|
49
|
+
export interface TimelineEventOptions {
|
|
50
|
+
layerId: string;
|
|
51
|
+
event: TimelineEvent;
|
|
52
|
+
all?: boolean;
|
|
53
|
+
}
|
|
54
|
+
export interface TimelineEvent<TData = any, TMeta = any> {
|
|
55
|
+
time: number;
|
|
56
|
+
data: TData;
|
|
57
|
+
logType?: 'default' | 'warning' | 'error';
|
|
58
|
+
meta?: TMeta;
|
|
59
|
+
groupId?: ID;
|
|
60
|
+
title?: string;
|
|
61
|
+
subtitle?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface CustomInspectorOptions {
|
|
64
|
+
id: string;
|
|
65
|
+
label: string;
|
|
66
|
+
icon?: string;
|
|
67
|
+
treeFilterPlaceholder?: string;
|
|
68
|
+
stateFilterPlaceholder?: string;
|
|
69
|
+
noSelectionText?: string;
|
|
70
|
+
actions?: {
|
|
71
|
+
icon: string;
|
|
72
|
+
tooltip?: string;
|
|
73
|
+
action: () => void | Promise<void>;
|
|
74
|
+
}[];
|
|
75
|
+
}
|
|
76
|
+
export interface CustomInspectorNode {
|
|
77
|
+
id: string;
|
|
78
|
+
label: string;
|
|
79
|
+
children?: CustomInspectorNode[];
|
|
80
|
+
tags?: InspectorNodeTag[];
|
|
81
|
+
}
|
|
82
|
+
export interface InspectorNodeTag {
|
|
83
|
+
label: string;
|
|
84
|
+
textColor: number;
|
|
85
|
+
backgroundColor: number;
|
|
86
|
+
tooltip?: string;
|
|
87
|
+
}
|
|
88
|
+
export interface CustomInspectorState {
|
|
89
|
+
[key: string]: (StateBase | Omit<ComponentState, 'type'>)[];
|
|
90
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type App = any;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { InspectorNodeTag } from './api';
|
|
2
|
+
import { ID } from './util';
|
|
3
|
+
export declare type ComponentInstance = any;
|
|
4
|
+
export interface ComponentTreeNode {
|
|
5
|
+
uid: ID;
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
renderKey: string | number;
|
|
9
|
+
inactive: boolean;
|
|
10
|
+
isFragment: boolean;
|
|
11
|
+
hasChildren: boolean;
|
|
12
|
+
children: ComponentTreeNode[];
|
|
13
|
+
positionTop?: number;
|
|
14
|
+
consoleId?: string;
|
|
15
|
+
isRouterView?: boolean;
|
|
16
|
+
macthedRouteSegment?: string;
|
|
17
|
+
tags: InspectorNodeTag[];
|
|
18
|
+
meta?: any;
|
|
19
|
+
}
|
|
20
|
+
export interface InspectedComponentData {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
file: string;
|
|
24
|
+
state: ComponentState[];
|
|
25
|
+
functional?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface StateBase {
|
|
28
|
+
key: string;
|
|
29
|
+
value: any;
|
|
30
|
+
editable?: boolean;
|
|
31
|
+
objectType?: 'ref' | 'reactive' | 'computed' | 'other';
|
|
32
|
+
raw?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface ComponentStateBase extends StateBase {
|
|
35
|
+
type: string;
|
|
36
|
+
}
|
|
37
|
+
export interface ComponentPropState extends ComponentStateBase {
|
|
38
|
+
meta?: {
|
|
39
|
+
type: string;
|
|
40
|
+
required: boolean;
|
|
41
|
+
/** Vue 1 only */
|
|
42
|
+
mode?: 'default' | 'sync' | 'once';
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export declare type ComponentBuiltinCustomStateTypes = 'function' | 'map' | 'set' | 'reference' | 'component' | 'component-definition' | 'router' | 'store';
|
|
46
|
+
export interface ComponentCustomState extends ComponentStateBase {
|
|
47
|
+
value: CustomState;
|
|
48
|
+
}
|
|
49
|
+
export declare type CustomState = {
|
|
50
|
+
_custom: {
|
|
51
|
+
type: ComponentBuiltinCustomStateTypes | string;
|
|
52
|
+
display?: string;
|
|
53
|
+
tooltip?: string;
|
|
54
|
+
value?: any;
|
|
55
|
+
abstract?: boolean;
|
|
56
|
+
file?: string;
|
|
57
|
+
uid?: number;
|
|
58
|
+
readOnly?: boolean;
|
|
59
|
+
/** Configure immediate child fields */
|
|
60
|
+
fields?: {
|
|
61
|
+
abstract?: boolean;
|
|
62
|
+
};
|
|
63
|
+
id?: any;
|
|
64
|
+
actions?: {
|
|
65
|
+
icon: string;
|
|
66
|
+
tooltip?: string;
|
|
67
|
+
action: () => void | Promise<void>;
|
|
68
|
+
}[];
|
|
69
|
+
/** internal */
|
|
70
|
+
_reviveId?: number;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
export declare type ComponentState = ComponentStateBase | ComponentPropState | ComponentCustomState;
|
|
74
|
+
export interface ComponentDevtoolsOptions {
|
|
75
|
+
hide?: boolean;
|
|
76
|
+
}
|