├── .gitignore ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.MD ├── examples ├── angular-custom-events.web-types.json ├── custom-web-component.web-types.json ├── hammerjs.web-types.json └── references │ ├── angular.web-types.json │ ├── vue@2.6.0.web-types.json │ └── vue@3.2.0.web-types.json ├── gen ├── package.json ├── tsconfig.json ├── vue-docgen-web-types │ ├── .gitignore │ ├── .npmignore │ ├── README.MD │ ├── package.json │ ├── src │ │ ├── build.ts │ │ ├── cli.ts │ │ ├── config.ts │ │ └── index.ts │ ├── tsconfig.json │ ├── types │ │ ├── config.d.ts │ │ └── web-types.d.ts │ └── yarn.lock └── yarn.lock ├── packages ├── at-nuxt-vue-app │ ├── at-nuxt-vue-app@2.0.0.web-types.json │ ├── at-nuxt-vue-app@2.10.0.web-types.json │ └── at-nuxt-vue-app@2.4.0.web-types.json ├── bootstrap-vue │ ├── bootstrap-vue@1.0.0.web-types.json │ ├── bootstrap-vue@1.0.1.web-types.json │ ├── bootstrap-vue@1.0.2.web-types.json │ ├── bootstrap-vue@1.1.0.web-types.json │ ├── bootstrap-vue@1.2.0.web-types.json │ ├── bootstrap-vue@1.3.0.web-types.json │ ├── bootstrap-vue@1.4.0.web-types.json │ ├── bootstrap-vue@1.4.1.web-types.json │ ├── bootstrap-vue@1.5.0.web-types.json │ ├── bootstrap-vue@2.0.0-rc.20.web-types.json │ └── bootstrap-vue@2.0.0.web-types.json ├── lit │ └── lit@2.0.0 │ │ ├── icons │ │ └── lit.svg │ │ └── lit.web-types.json ├── quasar-framework │ ├── quasar-framework@0.17.0.web-types.json │ ├── quasar-framework@0.17.10.web-types.json │ ├── quasar-framework@0.17.11.web-types.json │ ├── quasar-framework@0.17.13.web-types.json │ ├── quasar-framework@0.17.15.web-types.json │ ├── quasar-framework@0.17.16.web-types.json │ ├── quasar-framework@0.17.17.web-types.json │ ├── quasar-framework@0.17.18.web-types.json │ ├── quasar-framework@0.17.19.web-types.json │ ├── quasar-framework@0.17.5.web-types.json │ ├── quasar-framework@0.17.6.web-types.json │ ├── quasar-framework@0.17.7.web-types.json │ └── quasar-framework@0.17.9.web-types.json ├── quasar │ ├── quasar@1.0.0-rc.1.web-types.json │ ├── quasar@1.0.0-rc.5.web-types.json │ ├── quasar@1.0.0.web-types.json │ ├── quasar@1.0.5.web-types.json │ └── quasar@1.1.0.web-types.json ├── registry.json ├── vue-client-only │ └── vue-client-only@2.0.0.web-types.json ├── vue-no-ssr │ └── vue-no-ssr@1.0.0.web-types.json ├── vue-router │ ├── vue-router@3.0.0.web-types.json │ └── vue-router@3.1.0.web-types.json ├── vue │ ├── vue@1.0.0.web-types.json │ ├── vue@2.0.0.web-types.json │ ├── vue@2.1.0.web-types.json │ ├── vue@2.1.8.web-types.json │ ├── vue@2.2.0.web-types.json │ ├── vue@2.3.0.web-types.json │ ├── vue@2.4.0.web-types.json │ ├── vue@2.5.0.web-types.json │ └── vue@3.0.0.web-types.json └── vuetify │ ├── vuetify@0.16.1.web-types.json │ ├── vuetify@0.16.2.web-types.json │ ├── vuetify@0.16.4.web-types.json │ ├── vuetify@0.16.5.web-types.json │ ├── vuetify@0.17.0.web-types.json │ ├── vuetify@0.17.2.web-types.json │ ├── vuetify@1.0.0.web-types.json │ ├── vuetify@1.0.11.web-types.json │ ├── vuetify@1.0.2.web-types.json │ ├── vuetify@1.1.0.web-types.json │ ├── vuetify@1.1.10.web-types.json │ ├── vuetify@1.1.12.web-types.json │ ├── vuetify@1.1.2.web-types.json │ ├── vuetify@1.1.4.web-types.json │ ├── vuetify@1.1.6.web-types.json │ ├── vuetify@1.1.9.web-types.json │ ├── vuetify@1.2.0.web-types.json │ ├── vuetify@1.2.2.web-types.json │ ├── vuetify@1.2.4.web-types.json │ ├── vuetify@1.3.0.web-types.json │ ├── vuetify@1.3.1.web-types.json │ ├── vuetify@1.3.14.web-types.json │ ├── vuetify@1.3.2.web-types.json │ ├── vuetify@1.3.8.web-types.json │ ├── vuetify@1.3.9.web-types.json │ ├── vuetify@1.4.0.web-types.json │ ├── vuetify@1.4.1.web-types.json │ ├── vuetify@1.4.4.web-types.json │ ├── vuetify@1.4.5.web-types.json │ ├── vuetify@1.5.0.web-types.json │ ├── vuetify@1.5.1.web-types.json │ ├── vuetify@1.5.12.web-types.json │ ├── vuetify@2.0.0.web-types.json │ ├── vuetify@2.0.1.web-types.json │ ├── vuetify@2.0.12.web-types.json │ ├── vuetify@2.0.15.web-types.json │ ├── vuetify@2.0.4.web-types.json │ └── vuetify@2.0.5.web-types.json ├── schema └── web-types.json └── scripts ├── publish.sh └── publish ├── README-template.MD └── package-template.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | .idea/ 4 | *.iml 5 | package-lock.json 6 | tmp/ 7 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | 3 | This project and the corresponding community is governed by the [JetBrains Open Source and Community Code of Conduct](https://confluence.jetbrains.com/display/ALL/JetBrains+Open+Source+and+Community+Code+of+Conduct). Please make sure you read it. 4 | 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.MD: -------------------------------------------------------------------------------- 1 | [![official JetBrains project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub) 2 | 3 | # Web-Types 4 | 5 | Welcome to Web-Types, a JSON format for documenting web component libraries. 6 | 7 | Web-Types is a framework-agnostic format aimed at providing IDEs and other tools with the metadata information about the contents 8 | of a component library. Its powerful name patterns allow encoding information about web framework syntax or 9 | customizing code completion suggestions for large icon libraries in the IDEs that support Web-Types. 10 | 11 | # Version 2.0 of the format 12 | 13 | Web-Types started as a format to support Vue libraries, but we've always wanted to provide a more generic solution. 14 | Finally, version 2.0 of Web-Types format works seamlessly for any kind of web framework, 15 | Web Components library, or CSS icons pack. 16 | 17 | A detailed documentation of the format is available [here](https://plugins.jetbrains.com/docs/intellij/websymbols-web-types.html) 18 | 19 | Starting with version 2021.3.1 of [WebStorm](https://www.jetbrains.com/webstorm/) (and other [JetBrains IDEs](https://www.jetbrains.com/products/#lang=js&type=ide)), a full support for the new Web-Types format 20 | is supported (the new format has been partially supported since 2021.2). You can now add custom HTML elements and 21 | attributes, custom CSS classes, properties, functions, pseudo-classes, and pseudo-elements. Vue and Angular support 22 | integrates fully with the format, so you can easily mix Web Components in Angular or Vue templates. 23 | 24 | Example Web-Types files are available in `examples` folder. Web-Types for Angular and Vue frameworks are available 25 | in the `examples/references` directory. They require dynamic contributions based on project source from IDE plugins 26 | to work properly. 27 | 28 | A webinar recording with Piotr Tomiak explaining the new version of the format and how pattern processing works is available on [YouTube](https://www.youtube.com/watch?v=nkAhI1YyU0w). 29 | 30 | The new version of Web-Types is backward compatible with the Vue-only Web-Types. 31 | 32 | # Local development with Web-Types 33 | 34 | To enable your Web-Types file in the project, link it through the `web-types` property of your local project `package.json` file. 35 | You can specify multiple Web-Types files by providing an array of paths. 36 | 37 | # Distribution 38 | 39 | Library providers are welcome to include detailed Web-Types JSONs and link them through `web-types` 40 | property in `package.json`. E.g.: 41 | ``` 42 | { 43 | ... 44 | "web-types": "./web-types.json" 45 | ... 46 | } 47 | ``` 48 | Many libraries are providing this feature, for instance: 49 | * Vue.js 50 | * vuetify (https://github.com/vuetifyjs/vuetify/pull/9440) 51 | * quasar (https://github.com/quasarframework/quasar/pull/4749) 52 | * bootstrap-vue (https://github.com/bootstrap-vue/bootstrap-vue/pull/4110) 53 | * nuxt.js (https://github.com/nuxt/nuxt.js/pull/7611) 54 | * @ionic/vue (https://github.com/ionic-team/ionic-framework/pull/22428) 55 | 56 | In case a library is not shipping Web Types, they can be published under the `@web-types` scope on NPM. 57 | Currently, the following frameworks and libraries are supported in such a way: 58 | * Vue.js 59 | * quasar-framework 60 | * Web Components 61 | * lit 62 | 63 | Published JSONs are checked into this repository under the `packages` folder. In case of Web-Types published to `@web-types` scope, 64 | IDEs are supposed to download required JSONs without any changes to the user project structure. 65 | 66 | Various IDEs perform optimizations when scanning `node_modules` directory, so to ensure that `web-types` for 67 | your package are always available, make sure it's listed in `packages/registry.json`. 68 | 69 | # Schema 70 | 71 | Web-Types JSON Schema is available in the `schema` folder. Use one of the following URLs to reference it in your JSON files: 72 | ``` 73 | http://json.schemastore.org/web-types 74 | ``` 75 | or 76 | ``` 77 | https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json 78 | ``` 79 | 80 | # Generating Web-Types 81 | 82 | ### From source 83 | 84 | Currently, the following component documentation formats are supported: 85 | - JSDoc using [styleguidist](https://vue-styleguidist.github.io/docs/Documenting.html#code-comments) `vue-docgen-api` 86 | library - add [`vue-docgen-web-types`](https://www.npmjs.com/package/vue-docgen-web-types) package to your project 87 | and run the `vue-docgen-web-types` command. You can launch it in a watch mode by passing `--watch` and 88 | you can pass a custom configuration file via `--configFile` parameter. 89 | See [config.d.ts](https://github.com/JetBrains/web-types/blob/master/gen/vue-docgen-web-types/types/config.d.ts) 90 | for detailed information on supported configuration file options. 91 | 92 | If you're not using JSDoc in your project, you can create your own builder for `web-types` JSON. For examples see 93 | vuetify, quasar or bootstrap-vue pull requests from above. 94 | 95 | # Publishing to `@web-types` scope 96 | 97 | We welcome your PRs with Web-Types for libraries in `packages` folder. There should be a single file per library in the format: 98 | 99 | ``` 100 | packages//@.web-types.json 101 | ``` 102 | 103 | We are syncing contents of the `packages` folder using `script/publish.sh` script which usage syntax is following: 104 | ``` 105 | publish.sh [--dry-run] 106 | ``` 107 | The script scans folder `packages/` for provided Web-Types jsons and synchronizes 108 | contents with NPM. 109 | 110 | # Versioning and naming of `@web-types` scope 111 | Versioning and naming rules are as follows: 112 | * Web-Types for package `pkg-name` are available under `@web-types/pkg-name` 113 | * Web-Types for package `@scope/pkg-name` are available under `@web-types/at-scope-pkg-name` 114 | * Web-Types for version `1.2.3` are published as prerelease `1.2.3-n`, e.g. `1.2.3-3` 115 | * Web-Types for pre-release version `1.2.3-rc.1` are published with additional segment, 116 | e.g. `1.2.3-rc.1.3` 117 | * to search for appropriate Web-Types package use range `` can be used to hold directives without creating an HTML element.", 21 | "doc-url": "https://angular.io/api/core/ng-container" 22 | }, 23 | { 24 | "name": "ng-content", 25 | "description": "The `` element specifies where to project content inside a component template.", 26 | "doc-url": "https://angular.io/api/core/ng-content", 27 | "exclusive-contributions": [ 28 | "/html/attributes" 29 | ], 30 | "attributes": [ 31 | { 32 | "description": "Only select elements from the projected content that match the given through attribute value CSS selector", 33 | "name": "select" 34 | } 35 | ] 36 | }, 37 | { 38 | "name": "ng-template", 39 | "doc-url": "https://angular.io/api/core/ng-template", 40 | "description": "With ``, you can define template content that is only being rendered by Angular when you, whether directly or indirectly, specifically instruct it to do so, allowing you to have full control over how and when the content is displayed." 41 | }, 42 | { 43 | "name": "Template tag extensions", 44 | "extension": true, 45 | "pattern": { 46 | "or": [ 47 | "template", 48 | "ng-template" 49 | ] 50 | }, 51 | "attributes": [ 52 | { 53 | "name": "Template binding", 54 | "virtual": true, 55 | "pattern": { 56 | "template": [ 57 | "let-", 58 | "#...", 59 | { 60 | "regex": ".*" 61 | } 62 | ] 63 | } 64 | } 65 | ] 66 | }, 67 | { 68 | "name": "Angular directive element selector", 69 | "ng-binding-pattern": true, 70 | "priority": "lowest", 71 | "pattern": { 72 | "items": "/js/ng-directive-element-selectors" 73 | } 74 | } 75 | ], 76 | "attributes": [ 77 | { 78 | "name": "i18n", 79 | "description": "Use the `i18n` attribute to mark element text for translation.", 80 | "doc-url": "https://angular.io/guide/i18n-common-prepare", 81 | "priority": "high", 82 | "value": { 83 | "required": false 84 | } 85 | }, 86 | { 87 | "name": "ngNonBindable", 88 | "description": "`ngNonBindable` deactivates interpolation, directives, and bindings within the HTML text and children of the host element. Host element bindings and directives are not affected.", 89 | "doc-url": "https://angular.io/guide/attribute-directives#deactivating-angular-processing-with-ngnonbindable", 90 | "priority": "high", 91 | "value": { 92 | "kind": "no-value" 93 | } 94 | }, 95 | { 96 | "name": "ngProjectAs", 97 | "description": "Project content as a different element. Attribute value is a selector, which is going to be used instead of actual element contents for slot selection.", 98 | "doc-url": "https://angular.io/guide/content-projection#projecting-content-in-more-complex-environments", 99 | "priority": "high", 100 | "value": { 101 | "required": true, 102 | "type": "string" 103 | } 104 | }, 105 | { 106 | "name": "Angular directive attribute selector", 107 | "ng-binding-pattern": true, 108 | "priority": "lowest", 109 | "value": { 110 | "required": false 111 | }, 112 | "pattern": { 113 | "items": "/js/ng-directive-attribute-selectors" 114 | } 115 | }, 116 | { 117 | "name": "Event binding", 118 | "virtual": true, 119 | "value": { 120 | "kind": "expression", 121 | "type": "void" 122 | }, 123 | "ng-binding-pattern": true, 124 | "pattern": { 125 | "delegate": "ng-event-binding-items", 126 | "or": [ 127 | [ 128 | "(", 129 | "#item", 130 | ")" 131 | ], 132 | [ 133 | { 134 | "priority": "lowest", 135 | "template": [ 136 | "on-" 137 | ] 138 | }, 139 | "#...", 140 | "#item" 141 | ], 142 | [ 143 | { 144 | "priority": "lowest", 145 | "template": [ 146 | "data-" 147 | ] 148 | }, 149 | "#...", 150 | "on-", 151 | "#...", 152 | "#item" 153 | ], 154 | [ 155 | { 156 | "priority": "lowest", 157 | "template": [ 158 | "data-" 159 | ] 160 | }, 161 | "#...", 162 | "(", 163 | "#item", 164 | ")" 165 | ] 166 | ] 167 | }, 168 | "ng-event-binding-items": { 169 | "ng-binding-pattern": true, 170 | "pattern": { 171 | "or": [ 172 | { 173 | "items": [ 174 | "/js/events", 175 | "/js/ng-directive-outputs" 176 | ], 177 | "priority": "high", 178 | "template": [ 179 | "#item:event" 180 | ] 181 | }, 182 | { 183 | "items": "/js/ng-custom-events", 184 | "priority": "normal", 185 | "template": [ 186 | "#item:event" 187 | ] 188 | } 189 | ] 190 | } 191 | } 192 | }, 193 | { 194 | "name": "Property binding", 195 | "virtual": true, 196 | "ng-binding-pattern": true, 197 | "pattern": { 198 | "items": "/html/ng-property-bindings", 199 | "or": [ 200 | [ 201 | "[", 202 | "#item", 203 | "]" 204 | ], 205 | [ 206 | { 207 | "priority": "lowest", 208 | "template": [ 209 | "bind-" 210 | ] 211 | }, 212 | "#...", 213 | "#item" 214 | ], 215 | [ 216 | { 217 | "priority": "lowest", 218 | "template": [ 219 | "data-" 220 | ] 221 | }, 222 | "#...", 223 | "bind-", 224 | "#...", 225 | "#item" 226 | ], 227 | [ 228 | { 229 | "priority": "lowest", 230 | "template": [ 231 | "data-" 232 | ] 233 | }, 234 | "#...", 235 | "[", 236 | "#item", 237 | "]" 238 | ] 239 | ] 240 | } 241 | }, 242 | { 243 | "name": "Banana box binding", 244 | "virtual": true, 245 | "value": { 246 | "required": true, 247 | "type": "of-match", 248 | "kind": "expression" 249 | }, 250 | "ng-binding-pattern": true, 251 | "pattern": { 252 | "items": "/js/ng-directive-in-outs", 253 | "or": [ 254 | [ 255 | "[(", 256 | "#item", 257 | ")]" 258 | ], 259 | [ 260 | { 261 | "priority": "lowest", 262 | "template": [ 263 | "bindon-" 264 | ] 265 | }, 266 | "#...", 267 | "#item" 268 | ], 269 | [ 270 | { 271 | "priority": "lowest", 272 | "template": [ 273 | "data-" 274 | ] 275 | }, 276 | "#...", 277 | "bindon-", 278 | "#...", 279 | "#item" 280 | ], 281 | [ 282 | { 283 | "priority": "lowest", 284 | "template": [ 285 | "data-" 286 | ] 287 | }, 288 | "#...", 289 | "[(", 290 | "#item", 291 | ")]" 292 | ] 293 | ] 294 | }, 295 | "js": { 296 | "ng-directive-in-outs": [ 297 | { 298 | "name": "Unknown input/output", 299 | "priority": "lowest", 300 | "pattern": ".+", 301 | "doc-hide-pattern": true, 302 | "ng-error-symbol": true 303 | } 304 | ] 305 | } 306 | }, 307 | { 308 | "name": "Template binding", 309 | "virtual": true, 310 | "value": { 311 | "required": true, 312 | "kind": "expression" 313 | }, 314 | "ng-binding-pattern": true, 315 | "pattern": { 316 | "items": "/js/ng-structural-directives", 317 | "or": [ 318 | [ 319 | "*", 320 | "#item:Structural Directive" 321 | ], 322 | [ 323 | { 324 | "priority": "lowest", 325 | "template": [ 326 | "data-" 327 | ] 328 | }, 329 | "#...", 330 | "*", 331 | "#item:Structural Directive" 332 | ] 333 | ] 334 | }, 335 | "js": { 336 | "ng-structural-directives": [ 337 | { 338 | "name": "Unknown structural directive", 339 | "attribute-value": { 340 | "required": false 341 | }, 342 | "priority": "lowest", 343 | "pattern": ".+", 344 | "doc-hide-pattern": true, 345 | "ng-error-symbol": true 346 | } 347 | ] 348 | } 349 | }, 350 | { 351 | "name": "One-time binding", 352 | "virtual": true, 353 | "ng-binding-pattern": true, 354 | "pattern": { 355 | "items": "/js/ng-one-time-bindings" 356 | }, 357 | "value": { 358 | "kind": "plain", 359 | "type": "of-match" 360 | } 361 | }, 362 | { 363 | "name": "Attribute bindings", 364 | "virtual": true, 365 | "pattern": { 366 | "items": "/js/ng-directive-attributes" 367 | }, 368 | "value": { 369 | "kind": "plain", 370 | "type": "of-match" 371 | } 372 | }, 373 | { 374 | "name": "Reference variable declaration", 375 | "virtual": true, 376 | "pattern": { 377 | "items": "ng-reference-declaration", 378 | "priority": "lowest", 379 | "or": [ 380 | [ 381 | "#", 382 | "#...", 383 | "#item" 384 | ], 385 | [ 386 | "ref-", 387 | "#...", 388 | "#item" 389 | ] 390 | ] 391 | }, 392 | "ng-reference-declaration": { 393 | "name": "Reference variable", 394 | "pattern": ".*", 395 | "doc-hide-pattern": true, 396 | "ij-no-psi-refs": true, 397 | "hide-from-completion": true 398 | }, 399 | "value": { 400 | "required": false, 401 | "kind": "plain", 402 | "type": "symbol" 403 | }, 404 | "values": { 405 | "pattern": { 406 | "items": "/js/ng-directive-exports-as" 407 | } 408 | }, 409 | "js": { 410 | "ng-directive-exports-as": [ 411 | { 412 | "name": "Unknown directive exportAs identifier", 413 | "priority": "lowest", 414 | "pattern": ".+", 415 | "doc-hide-pattern": true, 416 | "ng-error-symbol": true 417 | } 418 | ] 419 | } 420 | }, 421 | { 422 | "name": "Animation trigger assignment", 423 | "virtual": true, 424 | "pattern": { 425 | "template": [ 426 | "@", 427 | { 428 | "regex": ".+" 429 | } 430 | ] 431 | }, 432 | "value": { 433 | "required": false 434 | }, 435 | "hide-from-completion": true 436 | }, 437 | { 438 | "name": "i18n attribute translation", 439 | "description": "Use the `i18n-*` attribute to mark attribute text strings for translation.", 440 | "doc-url": "https://angular.io/guide/i18n-common-prepare", 441 | "virtual": true, 442 | "ng-binding-pattern": true, 443 | "pattern": { 444 | "items": "/html/ng-i18n-attributes", 445 | "template": [ 446 | "i18n-", 447 | "#...", 448 | "#item:name of the attribute to translate" 449 | ] 450 | }, 451 | "value": { 452 | "kind": "plain", 453 | "type": "string", 454 | "required": false 455 | }, 456 | "ng-i18n-attributes": [ 457 | { 458 | "name": "Absent attribute name", 459 | "priority": "lowest", 460 | "proximity": 0, 461 | "pattern": ".+", 462 | "doc-hide-pattern": true, 463 | "ng-error-symbol": true, 464 | "hide-from-completion": true 465 | } 466 | ] 467 | } 468 | ], 469 | "ng-property-bindings": [ 470 | { 471 | "name": "Class binding", 472 | "attribute-value": { 473 | "required": true, 474 | "type": "boolean", 475 | "kind": "expression" 476 | }, 477 | "ng-binding-pattern": true, 478 | "pattern": { 479 | "items": "/css/classes", 480 | "template": [ 481 | { 482 | "priority": "lowest", 483 | "template": [ 484 | "class." 485 | ] 486 | }, 487 | "#...", 488 | "#item:CSS Class" 489 | ] 490 | }, 491 | "css": { 492 | "classes": [ 493 | { 494 | "name": "Unknown CSS class", 495 | "priority": "low", 496 | "pattern": ".+", 497 | "doc-hide-pattern": true, 498 | "ng-error-symbol": true, 499 | "hide-from-completion": true 500 | } 501 | ] 502 | } 503 | }, 504 | { 505 | "name": "Style binding", 506 | "attribute-value": { 507 | "required": true, 508 | "type": "string", 509 | "kind": "expression" 510 | }, 511 | "ng-binding-pattern": true, 512 | "pattern": { 513 | "items": "/css/properties", 514 | "template": [ 515 | { 516 | "priority": "lowest", 517 | "template": [ 518 | "style." 519 | ] 520 | }, 521 | "#...", 522 | "#item:CSS Property", 523 | { 524 | "items": "/css/length-units", 525 | "priority": "lowest", 526 | "required": false, 527 | "template": [ 528 | ".", 529 | "#...", 530 | "#item:length unit" 531 | ] 532 | } 533 | ] 534 | } 535 | }, 536 | { 537 | "name": "Attribute binding", 538 | "attribute-value": { 539 | "required": true, 540 | "type": "of-match", 541 | "kind": "expression" 542 | }, 543 | "ng-binding-pattern": true, 544 | "pattern": { 545 | "items": { 546 | "path": "/html/attributes", 547 | "includeVirtual": false 548 | }, 549 | "template": [ 550 | { 551 | "priority": "lowest", 552 | "template": [ 553 | "attr." 554 | ] 555 | }, 556 | "#...", 557 | "#item:HTML Attribute" 558 | ] 559 | }, 560 | "attributes": [ 561 | { 562 | "name": "Namespaced attribute", 563 | "pattern": ".+:.+", 564 | "doc-hide-pattern": true 565 | }, 566 | { 567 | "name": "Custom data attribute", 568 | "pattern": "data-.+", 569 | "doc-hide-pattern": true, 570 | "hide-from-completion": true 571 | } 572 | ] 573 | }, 574 | { 575 | "name": "Property binding", 576 | "attribute-value": { 577 | "required": true, 578 | "type": "of-match", 579 | "kind": "expression" 580 | }, 581 | "pattern": { 582 | "or": [ 583 | { 584 | "items": [ 585 | "/js/properties", 586 | "/js/ng-directive-inputs" 587 | ], 588 | "priority": "high" 589 | }, 590 | { 591 | "delegate": "/js/ng-unknown-property", 592 | "priority": "lowest" 593 | } 594 | ] 595 | }, 596 | "js": { 597 | "ng-unknown-property": [ 598 | { 599 | "name": "Unknown property", 600 | "priority": "low", 601 | "pattern": ".+", 602 | "doc-hide-pattern": true, 603 | "ng-error-symbol": true, 604 | "hide-from-completion": true 605 | } 606 | ] 607 | } 608 | }, 609 | { 610 | "name": "Animation trigger assignment", 611 | "pattern": { 612 | "template": [ 613 | "@", 614 | { 615 | "regex": ".+" 616 | } 617 | ] 618 | }, 619 | "hide-from-completion": true 620 | } 621 | ] 622 | }, 623 | "js": { 624 | "ng-custom-events": [ 625 | { 626 | "name": "Extended key events", 627 | "priority": "normal", 628 | "pattern": { 629 | "template": [ 630 | { 631 | "or": [ 632 | "keyup", 633 | "keydown" 634 | ] 635 | }, 636 | { 637 | "items": "key-event-modifiers", 638 | "template": [ 639 | ".", 640 | "#...", 641 | "#item:key event modifier" 642 | ], 643 | "priority": "high", 644 | "repeat": true, 645 | "unique": true, 646 | "required": false 647 | }, 648 | { 649 | "items": "key-names", 650 | "template": [ 651 | ".", 652 | "#...", 653 | "#item:key name" 654 | ], 655 | "repeat": false, 656 | "required": true 657 | } 658 | ] 659 | }, 660 | "key-event-modifiers": [ 661 | { 662 | "name": "alt" 663 | }, 664 | { 665 | "name": "control" 666 | }, 667 | { 668 | "name": "meta" 669 | }, 670 | { 671 | "name": "shift" 672 | } 673 | ], 674 | "key-names": [ 675 | { 676 | "name": "Extended event special key", 677 | "pattern": { 678 | "or": [ 679 | "space", 680 | "dot", 681 | "escape", 682 | "enter", 683 | "tab", 684 | "arrowDown", 685 | "arrowLeft", 686 | "arrowRight", 687 | "arrowUp", 688 | "end", 689 | "home", 690 | "pageDown", 691 | "pageUp", 692 | "backspace", 693 | "delete", 694 | "insert", 695 | "contextMenu", 696 | "help", 697 | "printScreen" 698 | ] 699 | } 700 | }, 701 | { 702 | "name": "Extended event standard key", 703 | "description": "Key name: `f1`-`f20`, `a`-`z`, `0`-`9`, `` ` ``, `~`, `@`, `#`, `$`, `%`, `^`, `&`, `*`, `(`, `)`, `_`, `+`, `-`, `[`, `]`, `{`, `}`, `|`, `;`, `:`, `,` or `?`.", 704 | "priority": "low", 705 | "pattern": "f1[1-9]|f20|f[1-9]|[a-z]|[0-9]|[\\`~\\!@#\\$%\\^\\&\\*\\(\\)_+\\-\\[\\]\\{\\}\\|;:,\\?]", 706 | "doc-hide-pattern": true, 707 | "hide-from-completion": true 708 | } 709 | ] 710 | }, 711 | { 712 | "name": "Namespaced event", 713 | "pattern": ".+:.+", 714 | "doc-hide-pattern": true, 715 | "hide-from-completion": true 716 | }, 717 | { 718 | "name": "Animation callback", 719 | "pattern": "@.+", 720 | "doc-hide-pattern": true 721 | } 722 | ] 723 | }, 724 | "css": { 725 | "pseudo-elements": [ 726 | { 727 | "name": "ng-deep", 728 | "doc-url": "https://angular.io/guide/component-styles#deprecated-deep--and-ng-deep", 729 | "deprecated": true, 730 | "description": "Applying the `::ng-deep` pseudo-class to any CSS rule completely disables view-encapsulation for that rule. Any style with `::ng-deep` applied becomes a global style. In order to scope the specified style to the current component and all its descendants, be sure to include the `:host` selector before `::ng-deep`. If the `::ng-deep` combinator is used without the `:host` pseudo-class selector, the style can bleed into other components." 731 | } 732 | ] 733 | } 734 | } 735 | } -------------------------------------------------------------------------------- /gen/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "devDependencies": { 4 | "typescript": "^3.9.7", 5 | "vue": "^2.6.11" 6 | } 7 | } -------------------------------------------------------------------------------- /gen/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES6", 4 | "module": "commonjs", 5 | "esModuleInterop": true, 6 | "strict": true, 7 | "moduleResolution": "node", 8 | "experimentalDecorators": true, 9 | "noUnusedLocals": true, 10 | "sourceMap": true, 11 | "baseUrl": ".", 12 | "strictFunctionTypes": false 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /gen/vue-docgen-web-types/.gitignore: -------------------------------------------------------------------------------- 1 | /lib -------------------------------------------------------------------------------- /gen/vue-docgen-web-types/.npmignore: -------------------------------------------------------------------------------- 1 | src -------------------------------------------------------------------------------- /gen/vue-docgen-web-types/README.MD: -------------------------------------------------------------------------------- 1 | This package provides `vue-docgen-web-types` command to generate [web-types](https://github.com/JetBrains/web-types) 2 | JSON based on source components. It parses JSDoc using 3 | [styleguidist](https://vue-styleguidist.github.io/docs/Documenting.html#code-comments) `vue-docgen-api` package. 4 | 5 | You can launch builder in a watch mode by passing `--watch` and 6 | you can pass a custom configuration file via `--configFile` parameter. 7 | See [config.d.ts](https://github.com/JetBrains/web-types/blob/master/gen/vue-docgen-web-types/types/config.d.ts) 8 | for detailed information on supported configuration file options. 9 | -------------------------------------------------------------------------------- /gen/vue-docgen-web-types/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-docgen-web-types", 3 | "version": "0.1.8", 4 | "main": "lib/index.js", 5 | "license": "MIT", 6 | "readme": "README.MD", 7 | "author": "JetBrains", 8 | "repository": "https://github.com/JetBrains/web-types/tree/master/gen/vue-docgen-web-types", 9 | "bin": { 10 | "vue-docgen-web-types": "lib/cli.js" 11 | }, 12 | "scripts": { 13 | "build": "rm -R lib/* && tsc", 14 | "web-types:gen": "json2ts -i ../../schema/web-types.json -o types/web-types.d.ts" 15 | }, 16 | "dependencies": { 17 | "chokidar": "^3.4.2", 18 | "globby": "^11.0.1", 19 | "lodash": "^4.17.20", 20 | "minimist": "^1.2.8", 21 | "mkdirp": "^1.0.4", 22 | "vue-docgen-api": "^4.30.0" 23 | }, 24 | "keywords": [ 25 | "web-types", 26 | "vue", 27 | "jsdoc", 28 | "documentation" 29 | ], 30 | "peerDependencies": { 31 | "vue": ">=2.0.0" 32 | }, 33 | "devDependencies": { 34 | "@types/lodash": "^4.14.161", 35 | "@types/minimist": "^1.2.0", 36 | "@types/mkdirp": "^1.0.1", 37 | "@types/pug": "^2.0.4", 38 | "json-schema-to-typescript": "^9.1.1", 39 | "typescript": "~3.9.7" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /gen/vue-docgen-web-types/src/build.ts: -------------------------------------------------------------------------------- 1 | import {WebTypesBuilderConfig} from "../types/config"; 2 | import * as path from "path"; 3 | import glob from 'globby'; 4 | import * as chokidar from 'chokidar'; 5 | import {FSWatcher} from 'chokidar'; 6 | import {parse} from 'vue-docgen-api' 7 | import {HtmlAttribute, HtmlTag, HtmlVueFilter, JSONSchemaForWebTypes} from "../types/web-types"; 8 | import * as fs from "fs"; 9 | import mkdirp from 'mkdirp' 10 | import _ from 'lodash' 11 | 12 | interface FileContents { 13 | tags?: HtmlTag[]; 14 | attributes?: HtmlAttribute[]; 15 | "vue-filters"?: HtmlVueFilter[]; 16 | } 17 | 18 | export default async function build(config: WebTypesBuilderConfig) { 19 | 20 | config.componentsRoot = path.resolve(config.cwd, config.componentsRoot) 21 | config.outFile = path.resolve(config.cwd, config.outFile) 22 | 23 | // then create the watcher if necessary 24 | const {watcher, componentFiles} = await getSources( 25 | config.components, 26 | config.componentsRoot 27 | ) 28 | 29 | console.log("Building web-types to " + config.outFile) 30 | 31 | const cache: { [filepath: string]: FileContents } = {} 32 | const buildWebTypesBound = rebuild.bind(null, config, componentFiles, cache, watcher) 33 | try { 34 | await buildWebTypesBound() 35 | } catch (e) { 36 | console.error("Error building web-types: " + e.message) 37 | await watcher.close() 38 | return 39 | } 40 | if (config.watch) { 41 | watcher.on('add', buildWebTypesBound) 42 | .on('change', buildWebTypesBound) 43 | .on('unlink', async (filePath) => { 44 | console.log("Rebuilding on file removal " + filePath) 45 | delete cache[filePath] 46 | await writeDownWebTypesFile(config, Object.values(cache), config.outFile) 47 | }) 48 | } 49 | else { 50 | await watcher.close() 51 | } 52 | } 53 | 54 | async function getSources( 55 | components: string | string[], 56 | cwd: string, 57 | ): Promise<{ 58 | watcher: chokidar.FSWatcher 59 | componentFiles: string[] 60 | }> { 61 | const watcher = chokidar.watch(components, {cwd}) 62 | 63 | const allComponentFiles = await glob(components, {cwd}) 64 | 65 | return {watcher, componentFiles: allComponentFiles} 66 | } 67 | 68 | async function rebuild( 69 | config: WebTypesBuilderConfig, 70 | files: string[], 71 | cachedContent: { [filepath: string]: FileContents }, 72 | watcher: FSWatcher, 73 | changedFilePath?: string) { 74 | 75 | const cacheWebTypesContent = async (filePath: string) => { 76 | cachedContent[filePath.replace(/\\/g, '/')] = await extractInformation( 77 | path.join(config.componentsRoot, filePath), 78 | config 79 | ) 80 | return true 81 | } 82 | 83 | if (changedFilePath) { 84 | console.log("Rebuilding on update file " + changedFilePath) 85 | try { 86 | // if in chokidar mode (watch), the path of the file that was just changed 87 | // is passed as an argument. We only affect the changed file and avoid re-parsing the rest 88 | await cacheWebTypesContent(changedFilePath) 89 | } catch (e) { 90 | throw new Error( 91 | `Error building file ${config.outFile} when file ${changedFilePath} has changed: ${e.message}` 92 | ) 93 | } 94 | } else { 95 | try { 96 | // if we are initializing the current file, parse all components 97 | await Promise.all(files.map(cacheWebTypesContent)) 98 | } catch (e) { 99 | throw new Error(`Error building file ${config.outFile}: ${e.message}`) 100 | } 101 | } 102 | // and finally save all concatenated values to the markdown file 103 | await writeDownWebTypesFile(config, Object.values(cachedContent), config.outFile) 104 | } 105 | 106 | async function writeDownWebTypesFile(config: WebTypesBuilderConfig, definitions: FileContents[], destFilePath: string) { 107 | const destFolder = path.dirname(destFilePath) 108 | await mkdirp(destFolder) 109 | let writeStream = fs.createWriteStream(destFilePath) 110 | const contents: JSONSchemaForWebTypes = { 111 | framework: "vue", 112 | name: config.packageName, 113 | version: config.packageVersion, 114 | contributions: { 115 | html: { 116 | "description-markup": config.descriptionMarkup, 117 | "types-syntax": config.typesSyntax, 118 | tags: _(definitions).flatMap(d => d.tags || []).orderBy("name","asc").value(), 119 | attributes: _(definitions).flatMap(d => d.attributes || []).orderBy("name","asc").value(), 120 | "vue-filters": _(definitions).flatMap(d => d["vue-filters"] || []).orderBy("name","asc").value(), 121 | } 122 | } 123 | } 124 | 125 | const html = contents.contributions.html! 126 | if (html.tags?.length == 0) html.tags = undefined 127 | if (html.attributes?.length == 0) html.attributes = undefined 128 | if (html["vue-filters"]?.length == 0) html["vue-filters"] = undefined 129 | 130 | writeStream.write(JSON.stringify(contents, null, 2)) 131 | 132 | // close the stream 133 | writeStream.close() 134 | } 135 | 136 | function ensureRelative(path: string) { 137 | // The .replace() is a fix for paths that end up like "./src\\components\\General\\VerticalButton.vue" on windows machines. 138 | return (path.startsWith("./") || path.startsWith("../") ? path : "./" + path).replace(/\\/g, '/'); 139 | } 140 | 141 | async function extractInformation( 142 | absolutePath: string, 143 | config: WebTypesBuilderConfig, 144 | ): Promise { 145 | const doc = await parse(absolutePath, config.apiOptions) 146 | let description = doc.description?.trim() ?? "" 147 | 148 | doc.docsBlocks?.forEach(block => { 149 | if (description.length > 0) { 150 | if (config.descriptionMarkup === "html") { 151 | description += "

" 152 | } else { 153 | description += "\n\n" 154 | } 155 | } 156 | description += block 157 | }) 158 | 159 | return { 160 | tags: [ 161 | { 162 | name: doc.displayName, 163 | description, 164 | attributes: doc.props?.map(prop => ({ 165 | name: prop.name, 166 | required: prop.required, 167 | description: prop.description, 168 | value: { 169 | kind: "expression", 170 | type: prop.type?.name ?? "any" 171 | }, 172 | default: prop.defaultValue?.value, 173 | })), 174 | events: doc.events?.map(event => ({ 175 | name: event.name, 176 | description: event.description 177 | })), 178 | slots: doc.slots?.map(slot => ({ 179 | name: slot.name, 180 | description: slot.description 181 | })), 182 | source: { 183 | module: ensureRelative(path.relative(config.cwd, absolutePath)), 184 | symbol: doc.exportName 185 | } 186 | } 187 | ] 188 | } 189 | } -------------------------------------------------------------------------------- /gen/vue-docgen-web-types/src/cli.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | import minimist from 'minimist' 3 | import {extractConfig} from "./config"; 4 | import build from "./build"; 5 | 6 | const { _: pathArray, configFile, watch, cwd } = minimist(process.argv.slice(2), { 7 | alias: { c: 'configFile', w: 'watch' } 8 | }) 9 | 10 | const conf = extractConfig(cwd || process.cwd(), watch, configFile, pathArray) 11 | build(conf) -------------------------------------------------------------------------------- /gen/vue-docgen-web-types/src/config.ts: -------------------------------------------------------------------------------- 1 | import * as path from "path"; 2 | import * as fs from "fs"; 3 | import {WebTypesBuilderConfig} from "../types/config"; 4 | 5 | export function extractConfig(cwd: string, 6 | watch: boolean = false, 7 | configFileFromCmd?: string, 8 | pathArray: string[] = []): WebTypesBuilderConfig { 9 | const configFilePath = configFileFromCmd 10 | ? path.resolve(cwd, configFileFromCmd) 11 | : path.join(cwd, 'web-types.config.js') 12 | const [componentsFromCmd, outFileFromCmd] = pathArray 13 | 14 | const packageJson = require(path.join(cwd, 'package.json')) || {} 15 | 16 | return { 17 | cwd, 18 | watch, 19 | componentsRoot: configFilePath ? path.dirname(configFilePath) : cwd, 20 | components: componentsFromCmd || 'src/components/**/[a-zA-Z]*.vue', 21 | outFile: outFileFromCmd || packageJson["web-types"] || './web-types.json', 22 | packageName: packageJson["name"], 23 | packageVersion: packageJson["version"], 24 | typesSyntax: "typescript", 25 | descriptionMarkup: "markdown", 26 | ...(fs.existsSync(configFilePath) ? require(configFilePath) : undefined) 27 | } 28 | 29 | } -------------------------------------------------------------------------------- /gen/vue-docgen-web-types/src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JetBrains/web-types/11e46e47cb65edc1930dc1fae854005ad45ac08f/gen/vue-docgen-web-types/src/index.ts -------------------------------------------------------------------------------- /gen/vue-docgen-web-types/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig", 3 | "compilerOptions": { 4 | "outDir": "lib", 5 | "declaration": true, 6 | "sourceMap": false 7 | }, 8 | "include": [ 9 | "src/**/*.ts", 10 | "src/**/*.d.ts" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /gen/vue-docgen-web-types/types/config.d.ts: -------------------------------------------------------------------------------- 1 | import {DocGenOptions} from "vue-docgen-api"; 2 | import {Html} from "./web-types"; 3 | 4 | export interface WebTypesBuilderConfig { 5 | /** 6 | * Current working directory 7 | */ 8 | cwd: string, 9 | 10 | /** 11 | * Whether to keep builder process alive and rebuild web-types on changes. 12 | * 13 | * @default false 14 | */ 15 | watch: boolean, 16 | 17 | /** 18 | * Root dir for resolving components patterns. 19 | * 20 | * @default parent of config file, or current working directory 21 | */ 22 | componentsRoot: string, 23 | 24 | /** 25 | * Glob or globs matching component file names. 26 | * 27 | * @default "src/components/**\/[a-zA-Z]*.vue" 28 | */ 29 | components: string | string[], 30 | 31 | /** 32 | * Name of output file for web-types, defaults to "web-types" property from "package.json" and if absent to "./web-types.json" 33 | */ 34 | outFile: string, 35 | 36 | /** 37 | * Package name to be included in web-types. 38 | * 39 | * @default `name` property from `package.json` 40 | */ 41 | packageName: string, 42 | 43 | /** 44 | * Package version to be included in web-types. 45 | * 46 | * @default `version` property from `package.json` 47 | */ 48 | packageVersion: string, 49 | 50 | /** 51 | * Markup used in descriptions. 52 | * 53 | * @type "html" | "markdown" | "none" | undefined 54 | * @default "markdown" 55 | */ 56 | descriptionMarkup?: Html['description-markup'], 57 | 58 | /** 59 | * Types syntax used in JSDoc. 60 | * 61 | * @type "typescript" | undefined 62 | * @default "typescript" 63 | */ 64 | typesSyntax?: Html['types-syntax'], 65 | 66 | /** 67 | * Allows you to pass [vue-docgen-api](https://vue-styleguidist.github.io/docs/Docgen.html) some config. 68 | * Most notably, you can specify whether your components contain JSX code and the alias configured in your webpack. 69 | */ 70 | apiOptions?: DocGenOptions, 71 | } -------------------------------------------------------------------------------- /gen/vue-docgen-web-types/types/web-types.d.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /** 3 | * This file was automatically generated by json-schema-to-typescript. 4 | * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, 5 | * and run json-schema-to-typescript to regenerate this file. 6 | */ 7 | 8 | export type Name = string; 9 | /** 10 | * List of symbol aliases 11 | */ 12 | export type Aliases = string[]; 13 | /** 14 | * Short description to be rendered in documentation popup. It will be rendered according to description-markup setting. 15 | */ 16 | export type Description = string; 17 | /** 18 | * Link to online documentation. 19 | */ 20 | export type DocUrl = string; 21 | export type HtmlAttributeDefault = string; 22 | export type HtmlAttributeRequired = boolean; 23 | export type HtmlAttributeValue = 24 | | { 25 | kind: string; 26 | } 27 | | { 28 | kind: string; 29 | required?: boolean; 30 | } 31 | | { 32 | kind: string; 33 | required?: boolean; 34 | } 35 | | { 36 | kind: string; 37 | required?: boolean; 38 | } 39 | | { 40 | kind: string; 41 | items: [] | [string]; 42 | required?: boolean; 43 | } 44 | | { 45 | kind: string; 46 | type: Type; 47 | required?: boolean; 48 | }; 49 | /** 50 | * Specify type according to selected language for type syntax. The type can be specified by a string expression, an object with list of imports and an expression, or an array of possible types. 51 | */ 52 | export type Type = string | ComplexType | (string | ComplexType)[]; 53 | /** 54 | * Allows to specify the source of the entity. For Vue.js component this may be for instance a class. 55 | */ 56 | export type Source = 57 | | { 58 | /** 59 | * Path to the file, relative to the web-types JSON. 60 | */ 61 | file: string; 62 | /** 63 | * Offset in the file under which the source symbol, like class name, is located. 64 | */ 65 | offset: number; 66 | } 67 | | { 68 | /** 69 | * Name of module, which exports the symbol. May be omitted, in which case it's assumed to be the name of the library. 70 | */ 71 | module?: string; 72 | /** 73 | * Name of the exported symbol. 74 | */ 75 | symbol: string; 76 | }; 77 | /** 78 | * A RegEx pattern to match whole content. Syntax should work with at least ECMA, Java and Python implementations. 79 | */ 80 | export type Pattern = 81 | | string 82 | | { 83 | regex?: string; 84 | "case-sensitive"?: boolean; 85 | [k: string]: unknown; 86 | }; 87 | 88 | export interface JSONSchemaForWebTypes { 89 | /** 90 | * Framework, for which the components are provided by the library 91 | */ 92 | framework: "vue"; 93 | /** 94 | * Name of the library 95 | */ 96 | name: string; 97 | /** 98 | * Version of the library, for which web-types are provided 99 | */ 100 | version: string; 101 | contributions: { 102 | html?: Html; 103 | [k: string]: unknown; 104 | }; 105 | [k: string]: unknown; 106 | } 107 | export interface Html { 108 | /** 109 | * Language in which types as specified. 110 | */ 111 | "types-syntax"?: "typescript"; 112 | /** 113 | * Markup language in which descriptions are formatted 114 | */ 115 | "description-markup"?: "html" | "markdown" | "none"; 116 | tags?: HtmlTag[]; 117 | attributes?: HtmlAttribute[]; 118 | "vue-filters"?: HtmlVueFilter[]; 119 | } 120 | export interface HtmlTag { 121 | name: Name; 122 | aliases?: Aliases; 123 | description?: Description; 124 | "doc-url"?: DocUrl; 125 | attributes?: HtmlTagAttribute[]; 126 | source?: Source; 127 | events?: HtmlTagEvent[]; 128 | slots?: HtmlTagSlot[]; 129 | /** 130 | * Deprecated. Use regular 'slot' property instead and specify 'vue-properties' to provide slot scope information. 131 | */ 132 | "vue-scoped-slots"?: null; 133 | "vue-model"?: HtmlTagVueModel; 134 | } 135 | export interface HtmlTagAttribute { 136 | name: Name; 137 | description?: Description; 138 | "doc-url"?: DocUrl; 139 | default?: HtmlAttributeDefault; 140 | required?: HtmlAttributeRequired; 141 | value?: HtmlAttributeValue; 142 | /** 143 | * Deprecated. Use 'value' property instead. Specify only if type is 'boolean' for compatibility with WebStorm 2019.2. 144 | */ 145 | type?: { 146 | [k: string]: unknown; 147 | }; 148 | } 149 | export interface ComplexType { 150 | /** 151 | * List of import statements required to resolve symbol in the type expression. 152 | */ 153 | imports: string[]; 154 | expression: string; 155 | } 156 | export interface HtmlTagEvent { 157 | name: Name; 158 | description?: Description; 159 | "doc-url"?: DocUrl; 160 | arguments?: TypedEntity[]; 161 | } 162 | export interface TypedEntity { 163 | name: Name; 164 | description?: Description; 165 | "doc-url"?: DocUrl; 166 | type?: Type; 167 | } 168 | export interface HtmlTagSlot { 169 | name: Name; 170 | pattern?: Pattern; 171 | description?: Description; 172 | "doc-url"?: DocUrl; 173 | /** 174 | * Specify properties of the slot scope 175 | */ 176 | "vue-properties"?: TypedEntity[]; 177 | } 178 | export interface HtmlTagVueModel { 179 | prop?: string; 180 | event?: string; 181 | } 182 | export interface HtmlAttribute { 183 | name: Name; 184 | aliases?: Aliases; 185 | description?: Description; 186 | "doc-url"?: DocUrl; 187 | default?: HtmlAttributeDefault; 188 | required?: HtmlAttributeRequired; 189 | value?: HtmlAttributeValue; 190 | source?: Source; 191 | "vue-argument"?: HtmlAttributeVueArgument; 192 | "vue-modifiers"?: HtmlAttributeVueModifier[]; 193 | } 194 | /** 195 | * Provide information about directive argument 196 | */ 197 | export interface HtmlAttributeVueArgument { 198 | pattern?: Pattern; 199 | description?: Description; 200 | "doc-url"?: DocUrl; 201 | /** 202 | * Whether directive requires an argument 203 | */ 204 | required?: boolean; 205 | } 206 | export interface HtmlAttributeVueModifier { 207 | name: Name; 208 | pattern?: Pattern; 209 | description?: Description; 210 | "doc-url"?: DocUrl; 211 | } 212 | export interface HtmlVueFilter { 213 | name: Name; 214 | aliases?: Aliases; 215 | description?: Description; 216 | "doc-url"?: DocUrl; 217 | source?: Source; 218 | /** 219 | * Type of expression on the left hand-side of the pipe of operator 220 | */ 221 | accepts?: string | ComplexType | (string | ComplexType)[]; 222 | /** 223 | * Type of the result 224 | */ 225 | returns?: string | ComplexType | (string | ComplexType)[]; 226 | /** 227 | * List of arguments accepted by the filter. All arguments are non-optional by default. 228 | */ 229 | arguments?: HtmlVueFilterArgument[]; 230 | } 231 | export interface HtmlVueFilterArgument { 232 | name: Name; 233 | description?: Description; 234 | "doc-url"?: DocUrl; 235 | type?: Type; 236 | optional?: boolean; 237 | } 238 | -------------------------------------------------------------------------------- /gen/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | typescript@^3.9.7: 6 | version "3.9.7" 7 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" 8 | integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== 9 | 10 | vue@^2.6.11: 11 | version "2.6.11" 12 | resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.11.tgz#76594d877d4b12234406e84e35275c6d514125c5" 13 | integrity sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ== 14 | -------------------------------------------------------------------------------- /packages/at-nuxt-vue-app/at-nuxt-vue-app@2.0.0.web-types.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../schema/web-types.json", 3 | "name": "@nuxt/vue-app", 4 | "framework": "vue", 5 | "version": "2.0.0", 6 | "contributions": { 7 | "html": { 8 | "description-markup": "markdown", 9 | "types-syntax": "typescript", 10 | "tags": [ 11 | { 12 | "name": "Nuxt", 13 | "description": "This component is used only in layouts to display the page components.", 14 | "doc-url": "https://nuxtjs.org/api/components-nuxt", 15 | "attributes": [ 16 | { 17 | "name": "next-child-key", 18 | "value": { 19 | "kind": "expression", 20 | "type": "string" 21 | }, 22 | "default": "$route.path", 23 | "description": "This prop will be set to ``, useful to make transitions inside a dynamic page and different route." 24 | }, 25 | { 26 | "name": "keep-alive", 27 | "value": { 28 | "kind": "expression", 29 | "type": "boolean" 30 | } 31 | }, 32 | { 33 | "name": "keep-alive-props", 34 | "value": { 35 | "kind": "expression", 36 | "type": "object" 37 | } 38 | } 39 | ] 40 | }, 41 | { 42 | "name": "NuxtChild", 43 | "aliases": [ 44 | "NChild" 45 | ], 46 | "description": "This component is used for displaying the children components in a nested route.", 47 | "doc-url": "https://nuxtjs.org/api/components-nuxt-child", 48 | "attributes": [ 49 | { 50 | "name": "nuxt-child-key", 51 | "value": { 52 | "kind": "expression", 53 | "type": "string" 54 | } 55 | }, 56 | { 57 | "name": "keep-alive", 58 | "value": { 59 | "kind": "expression", 60 | "type": "boolean" 61 | } 62 | }, 63 | { 64 | "name": "keep-alive-props", 65 | "value": { 66 | "kind": "expression", 67 | "type": "object" 68 | } 69 | } 70 | ] 71 | }, 72 | { 73 | "name": "NuxtLink", 74 | "aliases": [ 75 | "NLink" 76 | ], 77 | "doc-url": "https://nuxtjs.org/api/components-nuxt-link", 78 | "description": "This component is used to provide navigations between page components and enhance performances with smart prefetching.", 79 | "attributes": [ 80 | { 81 | "name": "to", 82 | "required": true, 83 | "doc-url": "https://router.vuejs.org/api/#to", 84 | "description": "Denotes the target route of the link. When clicked, the value of the `to` prop will be passed to `router.push()` internally, so the value can be either a string or a location descriptor object.", 85 | "value": { 86 | "kind": "expression", 87 | "type": [ 88 | "string", 89 | "object" 90 | ] 91 | } 92 | }, 93 | { 94 | "name": "tag", 95 | "value": { 96 | "kind": "expression", 97 | "type": "string" 98 | }, 99 | "default": "'a'", 100 | "doc-url": "https://router.vuejs.org/api/#tag", 101 | "description": "Sometimes we want `` to render as another tag, e.g `
  • `. Then we can use `tag` prop to specify which tag to render to, and it will still listen to click events for navigation." 102 | }, 103 | { 104 | "name": "exact", 105 | "value": { 106 | "kind": "expression", 107 | "type": "boolean" 108 | }, 109 | "default": "false", 110 | "doc-url": "https://router.vuejs.org/api/#exact", 111 | "description": "The default active class matching behavior is **inclusive match**. For example, `` will get this class applied as long as the current path starts with `/a/` or is `/a`.\n\nOne consequence of this is that `` will be active for every route! To force the link into \"exact match mode\", use the `exact` prop" 112 | }, 113 | { 114 | "name": "append", 115 | "value": { 116 | "kind": "expression", 117 | "type": "boolean" 118 | }, 119 | "default": "false", 120 | "doc-url": "https://router.vuejs.org/api/#append", 121 | "description": "Setting `append` prop always appends the relative path to the current path. " 122 | }, 123 | { 124 | "name": "replace", 125 | "value": { 126 | "kind": "expression", 127 | "type": "boolean" 128 | }, 129 | "default": "false", 130 | "doc-url": "https://router.vuejs.org/api/#replace", 131 | "description": "Setting `replace` prop will call `router.replace()` instead of `router.push()` when clicked, so the navigation will not leave a history record." 132 | }, 133 | { 134 | "name": "activeClass", 135 | "value": { 136 | "kind": "expression", 137 | "type": "string" 138 | }, 139 | "default": "'router-link-active'", 140 | "doc-url": "https://router.vuejs.org/api/#active-class", 141 | "description": "Configure the active CSS class applied when the link is active. Note the default value can also be configured globally via the `linkActiveClass` router constructor option." 142 | }, 143 | { 144 | "name": "exactActiveClass", 145 | "value": { 146 | "kind": "expression", 147 | "type": "string" 148 | }, 149 | "default": "'router-link-exact-active'", 150 | "doc-url": "https://router.vuejs.org/api/#exact-active-class", 151 | "description": "Configure the active CSS class applied when the link is active with exact match. Note the default value can also be configured globally via the `linkExactActiveClass` router constructor option." 152 | }, 153 | { 154 | "name": "ariaCurrentValue", 155 | "value": { 156 | "kind": "expression", 157 | "type": "'page' | 'step' | 'location' | 'date' | 'time'" 158 | }, 159 | "default": "'page'", 160 | "doc-url": "https://router.vuejs.org/api/#aria-current-value", 161 | "description": "Configure the value of `aria-current` when the link is active with exact match. It must be one of the allowed values for aria-current in the ARIA spec. In most cases, the default of `page` should be the best fit." 162 | }, 163 | { 164 | "name": "event", 165 | "value": { 166 | "kind": "expression", 167 | "type": [ 168 | "string", 169 | "string[]" 170 | ] 171 | }, 172 | "default": "'click'", 173 | "doc-url": "https://router.vuejs.org/api/#event", 174 | "description": "Specify the event(s) that can trigger the link navigation." 175 | } 176 | ], 177 | "slots": [ 178 | { 179 | "name": "default", 180 | "vue-properties": [ 181 | { 182 | "name": "href", 183 | "description": "Resolved url. This would be the `href` attribute of an `a` element", 184 | "type": "string" 185 | }, 186 | { 187 | "name": "route", 188 | "description": "Resolved normalized location", 189 | "type": "object" 190 | }, 191 | { 192 | "name": "navigate", 193 | "description": "Function to trigger the navigation. **It will automatically prevent events when necessary**, the same way `router-link` does", 194 | "type": "() => any" 195 | }, 196 | { 197 | "name": "isActive", 198 | "description": "`true` if the active class should be applied. Allows to apply an arbitrary class", 199 | "type": "boolean" 200 | }, 201 | { 202 | "name": "isExactActive", 203 | "description": "`true` if the exact active class should be applied. Allows to apply an arbitrary class", 204 | "type": "boolean" 205 | } 206 | ] 207 | } 208 | ] 209 | } 210 | ] 211 | } 212 | } 213 | } 214 | -------------------------------------------------------------------------------- /packages/at-nuxt-vue-app/at-nuxt-vue-app@2.10.0.web-types.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../schema/web-types.json", 3 | "name": "@nuxt/vue-app", 4 | "framework": "vue", 5 | "version": "2.10.0", 6 | "contributions": { 7 | "html": { 8 | "description-markup": "markdown", 9 | "types-syntax": "typescript", 10 | "tags": [ 11 | { 12 | "name": "Nuxt", 13 | "description": "This component is used only in layouts to display the page components.", 14 | "doc-url": "https://nuxtjs.org/api/components-nuxt", 15 | "attributes": [ 16 | { 17 | "name": "next-child-key", 18 | "value": { 19 | "kind": "expression", 20 | "type": "string" 21 | }, 22 | "default": "$route.path", 23 | "description": "This prop will be set to ``, useful to make transitions inside a dynamic page and different route." 24 | }, 25 | { 26 | "name": "name", 27 | "value": { 28 | "kind": "expression", 29 | "type": "string" 30 | }, 31 | "default": "default", 32 | "description": "This prop will be set to ``, used to render `named-view` of page component." 33 | }, 34 | { 35 | "name": "keep-alive", 36 | "value": { 37 | "kind": "expression", 38 | "type": "boolean" 39 | } 40 | }, 41 | { 42 | "name": "keep-alive-props", 43 | "value": { 44 | "kind": "expression", 45 | "type": "object" 46 | } 47 | } 48 | ] 49 | }, 50 | { 51 | "name": "NuxtChild", 52 | "aliases": [ 53 | "NChild" 54 | ], 55 | "description": "This component is used for displaying the children components in a nested route.", 56 | "doc-url": "https://nuxtjs.org/api/components-nuxt-child", 57 | "attributes": [ 58 | { 59 | "name": "nuxt-child-key", 60 | "value": { 61 | "kind": "expression", 62 | "type": "string" 63 | } 64 | }, 65 | { 66 | "name": "name", 67 | "value": { 68 | "kind": "expression", 69 | "type": "string" 70 | }, 71 | "description": "This prop will be set to ``, used to render named-view of page component." 72 | }, 73 | { 74 | "name": "keep-alive", 75 | "value": { 76 | "kind": "expression", 77 | "type": "boolean" 78 | } 79 | }, 80 | { 81 | "name": "keep-alive-props", 82 | "value": { 83 | "kind": "expression", 84 | "type": "object" 85 | } 86 | } 87 | ] 88 | }, 89 | { 90 | "name": "NuxtLink", 91 | "aliases": [ 92 | "NLink" 93 | ], 94 | "doc-url": "https://nuxtjs.org/api/components-nuxt-link", 95 | "description": "This component is used to provide navigations between page components and enhance performances with smart prefetching.", 96 | "attributes": [ 97 | { 98 | "name": "no-prefetch", 99 | "value": { 100 | "kind": "expression", 101 | "type": "boolean" 102 | } 103 | }, 104 | { 105 | "name": "prefetch", 106 | "value": { 107 | "kind": "expression", 108 | "type": "boolean" 109 | } 110 | }, 111 | { 112 | "name": "prefetched-class", 113 | "value": { 114 | "kind": "expression", 115 | "type": "string" 116 | } 117 | }, 118 | { 119 | "name": "to", 120 | "required": true, 121 | "doc-url": "https://router.vuejs.org/api/#to", 122 | "description": "Denotes the target route of the link. When clicked, the value of the `to` prop will be passed to `router.push()` internally, so the value can be either a string or a location descriptor object.", 123 | "value": { 124 | "kind": "expression", 125 | "type": [ 126 | "string", 127 | "object" 128 | ] 129 | } 130 | }, 131 | { 132 | "name": "tag", 133 | "value": { 134 | "kind": "expression", 135 | "type": "string" 136 | }, 137 | "default": "'a'", 138 | "doc-url": "https://router.vuejs.org/api/#tag", 139 | "description": "Sometimes we want `` to render as another tag, e.g `
  • `. Then we can use `tag` prop to specify which tag to render to, and it will still listen to click events for navigation." 140 | }, 141 | { 142 | "name": "exact", 143 | "value": { 144 | "kind": "expression", 145 | "type": "boolean" 146 | }, 147 | "default": "false", 148 | "doc-url": "https://router.vuejs.org/api/#exact", 149 | "description": "The default active class matching behavior is **inclusive match**. For example, `` will get this class applied as long as the current path starts with `/a/` or is `/a`.\n\nOne consequence of this is that `` will be active for every route! To force the link into \"exact match mode\", use the `exact` prop" 150 | }, 151 | { 152 | "name": "append", 153 | "value": { 154 | "kind": "expression", 155 | "type": "boolean" 156 | }, 157 | "default": "false", 158 | "doc-url": "https://router.vuejs.org/api/#append", 159 | "description": "Setting `append` prop always appends the relative path to the current path. " 160 | }, 161 | { 162 | "name": "replace", 163 | "value": { 164 | "kind": "expression", 165 | "type": "boolean" 166 | }, 167 | "default": "false", 168 | "doc-url": "https://router.vuejs.org/api/#replace", 169 | "description": "Setting `replace` prop will call `router.replace()` instead of `router.push()` when clicked, so the navigation will not leave a history record." 170 | }, 171 | { 172 | "name": "activeClass", 173 | "value": { 174 | "kind": "expression", 175 | "type": "string" 176 | }, 177 | "default": "'router-link-active'", 178 | "doc-url": "https://router.vuejs.org/api/#active-class", 179 | "description": "Configure the active CSS class applied when the link is active. Note the default value can also be configured globally via the `linkActiveClass` router constructor option." 180 | }, 181 | { 182 | "name": "exactActiveClass", 183 | "value": { 184 | "kind": "expression", 185 | "type": "string" 186 | }, 187 | "default": "'router-link-exact-active'", 188 | "doc-url": "https://router.vuejs.org/api/#exact-active-class", 189 | "description": "Configure the active CSS class applied when the link is active with exact match. Note the default value can also be configured globally via the `linkExactActiveClass` router constructor option." 190 | }, 191 | { 192 | "name": "ariaCurrentValue", 193 | "value": { 194 | "kind": "expression", 195 | "type": "'page' | 'step' | 'location' | 'date' | 'time'" 196 | }, 197 | "default": "'page'", 198 | "doc-url": "https://router.vuejs.org/api/#aria-current-value", 199 | "description": "Configure the value of `aria-current` when the link is active with exact match. It must be one of the allowed values for aria-current in the ARIA spec. In most cases, the default of `page` should be the best fit." 200 | }, 201 | { 202 | "name": "event", 203 | "value": { 204 | "kind": "expression", 205 | "type": [ 206 | "string", 207 | "string[]" 208 | ] 209 | }, 210 | "default": "'click'", 211 | "doc-url": "https://router.vuejs.org/api/#event", 212 | "description": "Specify the event(s) that can trigger the link navigation." 213 | } 214 | ], 215 | "slots": [ 216 | { 217 | "name": "default", 218 | "vue-properties": [ 219 | { 220 | "name": "href", 221 | "description": "Resolved url. This would be the `href` attribute of an `a` element", 222 | "type": "string" 223 | }, 224 | { 225 | "name": "route", 226 | "description": "Resolved normalized location", 227 | "type": "object" 228 | }, 229 | { 230 | "name": "navigate", 231 | "description": "Function to trigger the navigation. **It will automatically prevent events when necessary**, the same way `router-link` does", 232 | "type": "() => any" 233 | }, 234 | { 235 | "name": "isActive", 236 | "description": "`true` if the active class should be applied. Allows to apply an arbitrary class", 237 | "type": "boolean" 238 | }, 239 | { 240 | "name": "isExactActive", 241 | "description": "`true` if the exact active class should be applied. Allows to apply an arbitrary class", 242 | "type": "boolean" 243 | } 244 | ] 245 | } 246 | ] 247 | } 248 | ] 249 | } 250 | } 251 | } 252 | -------------------------------------------------------------------------------- /packages/at-nuxt-vue-app/at-nuxt-vue-app@2.4.0.web-types.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../schema/web-types.json", 3 | "name": "@nuxt/vue-app", 4 | "framework": "vue", 5 | "version": "2.4.0", 6 | "contributions": { 7 | "html": { 8 | "description-markup": "markdown", 9 | "types-syntax": "typescript", 10 | "tags": [ 11 | { 12 | "name": "Nuxt", 13 | "description": "This component is used only in layouts to display the page components.", 14 | "doc-url": "https://nuxtjs.org/api/components-nuxt", 15 | "attributes": [ 16 | { 17 | "name": "next-child-key", 18 | "value": { 19 | "kind": "expression", 20 | "type": "string" 21 | }, 22 | "default": "$route.path", 23 | "description": "This prop will be set to ``, useful to make transitions inside a dynamic page and different route." 24 | }, 25 | { 26 | "name": "name", 27 | "value": { 28 | "kind": "expression", 29 | "type": "string" 30 | }, 31 | "default": "default", 32 | "description": "This prop will be set to ``, used to render `named-view` of page component." 33 | }, 34 | { 35 | "name": "keep-alive", 36 | "value": { 37 | "kind": "expression", 38 | "type": "boolean" 39 | } 40 | }, 41 | { 42 | "name": "keep-alive-props", 43 | "value": { 44 | "kind": "expression", 45 | "type": "object" 46 | } 47 | } 48 | ] 49 | }, 50 | { 51 | "name": "NuxtChild", 52 | "aliases": [ 53 | "NChild" 54 | ], 55 | "description": "This component is used for displaying the children components in a nested route.", 56 | "doc-url": "https://nuxtjs.org/api/components-nuxt-child", 57 | "attributes": [ 58 | { 59 | "name": "nuxt-child-key", 60 | "value": { 61 | "kind": "expression", 62 | "type": "string" 63 | } 64 | }, 65 | { 66 | "name": "name", 67 | "value": { 68 | "kind": "expression", 69 | "type": "string" 70 | }, 71 | "description": "This prop will be set to ``, used to render named-view of page component." 72 | }, 73 | { 74 | "name": "keep-alive", 75 | "value": { 76 | "kind": "expression", 77 | "type": "boolean" 78 | } 79 | }, 80 | { 81 | "name": "keep-alive-props", 82 | "value": { 83 | "kind": "expression", 84 | "type": "object" 85 | } 86 | } 87 | ] 88 | }, 89 | { 90 | "name": "NuxtLink", 91 | "aliases": [ 92 | "NLink" 93 | ], 94 | "doc-url": "https://nuxtjs.org/api/components-nuxt-link", 95 | "description": "This component is used to provide navigations between page components and enhance performances with smart prefetching.", 96 | "attributes": [ 97 | { 98 | "name": "no-prefetch", 99 | "value": { 100 | "kind": "expression", 101 | "type": "boolean" 102 | } 103 | }, 104 | { 105 | "name": "prefetched-class", 106 | "value": { 107 | "kind": "expression", 108 | "type": "string" 109 | } 110 | }, 111 | { 112 | "name": "to", 113 | "required": true, 114 | "doc-url": "https://router.vuejs.org/api/#to", 115 | "description": "Denotes the target route of the link. When clicked, the value of the `to` prop will be passed to `router.push()` internally, so the value can be either a string or a location descriptor object.", 116 | "value": { 117 | "kind": "expression", 118 | "type": [ 119 | "string", 120 | "object" 121 | ] 122 | } 123 | }, 124 | { 125 | "name": "tag", 126 | "value": { 127 | "kind": "expression", 128 | "type": "string" 129 | }, 130 | "default": "'a'", 131 | "doc-url": "https://router.vuejs.org/api/#tag", 132 | "description": "Sometimes we want `` to render as another tag, e.g `
  • `. Then we can use `tag` prop to specify which tag to render to, and it will still listen to click events for navigation." 133 | }, 134 | { 135 | "name": "exact", 136 | "value": { 137 | "kind": "expression", 138 | "type": "boolean" 139 | }, 140 | "default": "false", 141 | "doc-url": "https://router.vuejs.org/api/#exact", 142 | "description": "The default active class matching behavior is **inclusive match**. For example, `` will get this class applied as long as the current path starts with `/a/` or is `/a`.\n\nOne consequence of this is that `` will be active for every route! To force the link into \"exact match mode\", use the `exact` prop" 143 | }, 144 | { 145 | "name": "append", 146 | "value": { 147 | "kind": "expression", 148 | "type": "boolean" 149 | }, 150 | "default": "false", 151 | "doc-url": "https://router.vuejs.org/api/#append", 152 | "description": "Setting `append` prop always appends the relative path to the current path. " 153 | }, 154 | { 155 | "name": "replace", 156 | "value": { 157 | "kind": "expression", 158 | "type": "boolean" 159 | }, 160 | "default": "false", 161 | "doc-url": "https://router.vuejs.org/api/#replace", 162 | "description": "Setting `replace` prop will call `router.replace()` instead of `router.push()` when clicked, so the navigation will not leave a history record." 163 | }, 164 | { 165 | "name": "activeClass", 166 | "value": { 167 | "kind": "expression", 168 | "type": "string" 169 | }, 170 | "default": "'router-link-active'", 171 | "doc-url": "https://router.vuejs.org/api/#active-class", 172 | "description": "Configure the active CSS class applied when the link is active. Note the default value can also be configured globally via the `linkActiveClass` router constructor option." 173 | }, 174 | { 175 | "name": "exactActiveClass", 176 | "value": { 177 | "kind": "expression", 178 | "type": "string" 179 | }, 180 | "default": "'router-link-exact-active'", 181 | "doc-url": "https://router.vuejs.org/api/#exact-active-class", 182 | "description": "Configure the active CSS class applied when the link is active with exact match. Note the default value can also be configured globally via the `linkExactActiveClass` router constructor option." 183 | }, 184 | { 185 | "name": "ariaCurrentValue", 186 | "value": { 187 | "kind": "expression", 188 | "type": "'page' | 'step' | 'location' | 'date' | 'time'" 189 | }, 190 | "default": "'page'", 191 | "doc-url": "https://router.vuejs.org/api/#aria-current-value", 192 | "description": "Configure the value of `aria-current` when the link is active with exact match. It must be one of the allowed values for aria-current in the ARIA spec. In most cases, the default of `page` should be the best fit." 193 | }, 194 | { 195 | "name": "event", 196 | "value": { 197 | "kind": "expression", 198 | "type": [ 199 | "string", 200 | "string[]" 201 | ] 202 | }, 203 | "default": "'click'", 204 | "doc-url": "https://router.vuejs.org/api/#event", 205 | "description": "Specify the event(s) that can trigger the link navigation." 206 | } 207 | ], 208 | "slots": [ 209 | { 210 | "name": "default", 211 | "vue-properties": [ 212 | { 213 | "name": "href", 214 | "description": "Resolved url. This would be the `href` attribute of an `a` element", 215 | "type": "string" 216 | }, 217 | { 218 | "name": "route", 219 | "description": "Resolved normalized location", 220 | "type": "object" 221 | }, 222 | { 223 | "name": "navigate", 224 | "description": "Function to trigger the navigation. **It will automatically prevent events when necessary**, the same way `router-link` does", 225 | "type": "() => any" 226 | }, 227 | { 228 | "name": "isActive", 229 | "description": "`true` if the active class should be applied. Allows to apply an arbitrary class", 230 | "type": "boolean" 231 | }, 232 | { 233 | "name": "isExactActive", 234 | "description": "`true` if the exact active class should be applied. Allows to apply an arbitrary class", 235 | "type": "boolean" 236 | } 237 | ] 238 | } 239 | ] 240 | } 241 | ] 242 | } 243 | } 244 | } 245 | -------------------------------------------------------------------------------- /packages/lit/lit@2.0.0/icons/lit.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lit/lit@2.0.0/lit.web-types.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../../schema/web-types.json", 3 | "framework": "lit", 4 | "name": "lit", 5 | "version": "2.0.0", 6 | "js-types-syntax": "typescript", 7 | "description-markup": "markdown", 8 | "default-icon": "icons/lit.svg", 9 | "framework-config": { 10 | "enable-when": { 11 | "node-packages": [ 12 | "lit" 13 | ] 14 | } 15 | }, 16 | "contributions": { 17 | "html": { 18 | "attributes": [ 19 | { 20 | "name": "Event listeners", 21 | "description": "Event listeners expression", 22 | "virtual": true, 23 | "doc-url": "https://lit.dev/docs/templates/expressions/#event-listener-expressions", 24 | "value": { 25 | "kind": "expression", 26 | "type": "(event: Event) => void", 27 | "required": true 28 | }, 29 | "pattern": { 30 | "or": [ 31 | { 32 | "items": "/js/events", 33 | "template": [ 34 | "@", 35 | "$...", 36 | "#item:event name" 37 | ], 38 | "priority": "normal" 39 | }, 40 | { 41 | "template": [ 42 | { 43 | "regex": "@[-a-z0-9]+" 44 | } 45 | ], 46 | "priority": "lowest" 47 | } 48 | ] 49 | } 50 | }, 51 | { 52 | "name": "Boolean Attributes", 53 | "description": "Boolean Attributes expression", 54 | "virtual": true, 55 | "doc-url": "https://lit.dev/docs/templates/expressions/#boolean-attribute-expressions", 56 | "value": { 57 | "kind": "expression", 58 | "type": "boolean", 59 | "required": true 60 | }, 61 | "pattern": { 62 | "items": { 63 | "path": "/html/attributes", 64 | "includeVirtual": false 65 | }, 66 | "template": [ 67 | "?", 68 | "$...", 69 | "#item:attribute name" 70 | ] 71 | } 72 | }, 73 | { 74 | "name": "Properties", 75 | "description": "Properties expression", 76 | "virtual": true, 77 | "doc-url": "https://lit.dev/docs/templates/expressions/#property-expressions", 78 | "value": { 79 | "kind": "expression", 80 | "type": "any", 81 | "required": true 82 | }, 83 | "inject-language": "JavaScript", 84 | "pattern": { 85 | "or": [ 86 | { 87 | "items": { 88 | "path": "/js/properties" 89 | }, 90 | "template": [ 91 | ".", 92 | "$...", 93 | "#item:property name" 94 | ] 95 | } 96 | ] 97 | } 98 | } 99 | ], 100 | "elements": [ 101 | { 102 | "name": "Standard HTML elements extension", 103 | "description": "This is a workaround to provide /js/properties on standard HTML elements.", 104 | "extension": true, 105 | "pattern": { 106 | "or": [ 107 | "a", 108 | "abbr", 109 | "address", 110 | "area", 111 | "article", 112 | "aside", 113 | "audio", 114 | "b", 115 | "base", 116 | "bdi", 117 | "bdo", 118 | "blockquote", 119 | "body", 120 | "br", 121 | "button", 122 | "canvas", 123 | "caption", 124 | "cite", 125 | "code", 126 | "col", 127 | "colgroup", 128 | "data", 129 | "datalist", 130 | "dd", 131 | "del", 132 | "details", 133 | "dfn", 134 | "dialog", 135 | "div", 136 | "dl", 137 | "dt", 138 | "em", 139 | "embed", 140 | "fieldset", 141 | "figcaption", 142 | "figure", 143 | "footer", 144 | "form", 145 | "h1", 146 | "h2", 147 | "h3", 148 | "h4", 149 | "h5", 150 | "h6", 151 | "head", 152 | "header", 153 | "hr", 154 | "html", 155 | "i", 156 | "iframe", 157 | "img", 158 | "input", 159 | "ins", 160 | "kbd", 161 | "label", 162 | "legend", 163 | "li", 164 | "link", 165 | "main", 166 | "map", 167 | "mark", 168 | "meta", 169 | "meter", 170 | "nav", 171 | "noscript", 172 | "object", 173 | "ol", 174 | "optgroup", 175 | "option", 176 | "output", 177 | "p", 178 | "param", 179 | "picture", 180 | "pre", 181 | "progress", 182 | "q", 183 | "rp", 184 | "rt", 185 | "ruby", 186 | "s", 187 | "samp", 188 | "script", 189 | "section", 190 | "select", 191 | "small", 192 | "source", 193 | "span", 194 | "strong", 195 | "style", 196 | "sub", 197 | "summary", 198 | "sup", 199 | "svg", 200 | "table", 201 | "tbody", 202 | "td", 203 | "template", 204 | "textarea", 205 | "tfoot", 206 | "th", 207 | "thead", 208 | "time", 209 | "title", 210 | "tr", 211 | "track", 212 | "u", 213 | "ul", 214 | "var", 215 | "video", 216 | "wbr" 217 | ] 218 | }, 219 | "js": { 220 | "properties": [ 221 | { 222 | "name": "HTML attributes mapping", 223 | "pattern": { 224 | "items": { 225 | "path": "/html/attributes", 226 | "includeVirtual": false 227 | } 228 | } 229 | } 230 | ] 231 | } 232 | } 233 | ] 234 | } 235 | } 236 | } 237 | -------------------------------------------------------------------------------- /packages/registry.json: -------------------------------------------------------------------------------- 1 | { 2 | "vue": [ 3 | "bootstrap-vue", 4 | "quasar", 5 | "quasar-framework", 6 | "vue", 7 | "vue-client-only", 8 | "vue-no-ssr", 9 | "vue-router", 10 | "vuetify", 11 | "@nuxt/vue-app" 12 | ], 13 | "lit": [ 14 | "lit" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /packages/vue-client-only/vue-client-only@2.0.0.web-types.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../schema/web-types.json", 3 | "name": "vue-client-only", 4 | "version": "2.0.0", 5 | "framework": "vue", 6 | "contributions": { 7 | "html": { 8 | "types-syntax": "typescript", 9 | "description-markup": "markdown", 10 | "tags": [ 11 | { 12 | "name": "client-only", 13 | "description": "This component is used to purposely render a component only on client-side. To import a component only on the client, register the component in a client-side only plugin.", 14 | "doc-url": "https://github.com/egoist/vue-client-only/blob/master/README.md", 15 | "attributes": [ 16 | { 17 | "name": "placeholder", 18 | "description": "Use a text as placeholder until `` is mounted on client-side." 19 | } 20 | ], 21 | "slots": [ 22 | { 23 | "name": "placeholder", 24 | "description": "Use a slot as placeholder until `` is mounted on client-side." 25 | } 26 | ] 27 | } 28 | ] 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /packages/vue-no-ssr/vue-no-ssr@1.0.0.web-types.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../schema/web-types.json", 3 | "name": "vue-no-ssr", 4 | "version": "1.0.0", 5 | "framework": "vue", 6 | "contributions": { 7 | "html": { 8 | "types-syntax": "typescript", 9 | "description-markup": "markdown", 10 | "tags": [ 11 | { 12 | "name": "no-ssr", 13 | "description": "This component is used to purposely render a component only on client-side. To import a component only on the client, register the component in a client-side only plugin.", 14 | "doc-url": "https://github.com/egoist/vue-client-only/blob/1.x/README.md", 15 | "attributes": [ 16 | { 17 | "name": "placeholder", 18 | "description": "Use a text as placeholder until `` is mounted on client-side." 19 | } 20 | ], 21 | "slots": [ 22 | { 23 | "name": "placeholder", 24 | "description": "Use a slot as placeholder until `` is mounted on client-side." 25 | } 26 | ] 27 | } 28 | ] 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /packages/vue-router/vue-router@3.0.0.web-types.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../schema/web-types.json", 3 | "name": "vue-router", 4 | "version": "3.0.0", 5 | "framework": "vue", 6 | "contributions": { 7 | "html": { 8 | "description-markup": "markdown", 9 | "types-syntax": "typescript", 10 | "tags": [ 11 | { 12 | "name": "RouterLink", 13 | "doc-url": "https://router.vuejs.org/api/#to", 14 | "description": "`` is the component for enabling user navigation in a router-enabled app. The target location is specified with the `to` prop. It renders as an `` tag with correct `href` by default, but can be configured with the `tag` prop. In addition, the link automatically gets an active CSS class when the target route is active.", 15 | "attributes": [ 16 | { 17 | "name": "to", 18 | "required": true, 19 | "doc-url": "https://router.vuejs.org/api/#to", 20 | "description": "Denotes the target route of the link. When clicked, the value of the `to` prop will be passed to `router.push()` internally, so the value can be either a string or a location descriptor object.", 21 | "value": { 22 | "kind": "expression", 23 | "type": [ 24 | "string", 25 | "object" 26 | ] 27 | } 28 | }, 29 | { 30 | "name": "tag", 31 | "value": { 32 | "kind": "expression", 33 | "type": "string" 34 | }, 35 | "default": "'a'", 36 | "doc-url": "https://router.vuejs.org/api/#tag", 37 | "description": "Sometimes we want `` to render as another tag, e.g `
  • `. Then we can use `tag` prop to specify which tag to render to, and it will still listen to click events for navigation." 38 | }, 39 | { 40 | "name": "exact", 41 | "value": { 42 | "kind": "expression", 43 | "type": "boolean" 44 | }, 45 | "default": "false", 46 | "doc-url": "https://router.vuejs.org/api/#exact", 47 | "description": "The default active class matching behavior is **inclusive match**. For example, `` will get this class applied as long as the current path starts with `/a/` or is `/a`.\n\nOne consequence of this is that `` will be active for every route! To force the link into \"exact match mode\", use the `exact` prop" 48 | }, 49 | { 50 | "name": "append", 51 | "value": { 52 | "kind": "expression", 53 | "type": "boolean" 54 | }, 55 | "default": "false", 56 | "doc-url": "https://router.vuejs.org/api/#append", 57 | "description": "Setting `append` prop always appends the relative path to the current path. " 58 | }, 59 | { 60 | "name": "replace", 61 | "value": { 62 | "kind": "expression", 63 | "type": "boolean" 64 | }, 65 | "default": "false", 66 | "doc-url": "https://router.vuejs.org/api/#replace", 67 | "description": "Setting `replace` prop will call `router.replace()` instead of `router.push()` when clicked, so the navigation will not leave a history record." 68 | }, 69 | { 70 | "name": "activeClass", 71 | "value": { 72 | "kind": "expression", 73 | "type": "string" 74 | }, 75 | "default": "'router-link-active'", 76 | "doc-url": "https://router.vuejs.org/api/#active-class", 77 | "description": "Configure the active CSS class applied when the link is active. Note the default value can also be configured globally via the `linkActiveClass` router constructor option." 78 | }, 79 | { 80 | "name": "exactActiveClass", 81 | "value": { 82 | "kind": "expression", 83 | "type": "string" 84 | }, 85 | "default": "'router-link-exact-active'", 86 | "doc-url": "https://router.vuejs.org/api/#exact-active-class", 87 | "description": "Configure the active CSS class applied when the link is active with exact match. Note the default value can also be configured globally via the `linkExactActiveClass` router constructor option." 88 | }, 89 | { 90 | "name": "ariaCurrentValue", 91 | "value": { 92 | "kind": "expression", 93 | "type": "'page' | 'step' | 'location' | 'date' | 'time'" 94 | }, 95 | "default": "'page'", 96 | "doc-url": "https://router.vuejs.org/api/#aria-current-value", 97 | "description": "Configure the value of `aria-current` when the link is active with exact match. It must be one of the allowed values for aria-current in the ARIA spec. In most cases, the default of `page` should be the best fit." 98 | }, 99 | { 100 | "name": "event", 101 | "value": { 102 | "kind": "expression", 103 | "type": [ 104 | "string", 105 | "string[]" 106 | ] 107 | }, 108 | "default": "'click'", 109 | "doc-url": "https://router.vuejs.org/api/#event", 110 | "description": "Specify the event(s) that can trigger the link navigation." 111 | } 112 | ] 113 | }, 114 | { 115 | "name": "RouterView", 116 | "doc-url": "https://router.vuejs.org/api/#router-view", 117 | "description": "The `` component is a functional component that renders the matched component for the given path. Components rendered in `` can also contain their own ``, which will render components for nested paths.", 118 | "attributes": [ 119 | { 120 | "name": "name", 121 | "value": { 122 | "kind": "expression", 123 | "type": "string" 124 | }, 125 | "default": "'default'", 126 | "doc-url": "https://router.vuejs.org/api/#name", 127 | "description": "When a `` has a name, it will render the component with the corresponding name in the matched route record's components option. See Named Views for an example." 128 | } 129 | ] 130 | } 131 | ] 132 | } 133 | } 134 | } -------------------------------------------------------------------------------- /packages/vue-router/vue-router@3.1.0.web-types.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../schema/web-types.json", 3 | "name": "vue-router", 4 | "version": "3.1.0", 5 | "framework": "vue", 6 | "contributions": { 7 | "html": { 8 | "description-markup": "markdown", 9 | "types-syntax": "typescript", 10 | "tags": [ 11 | { 12 | "name": "RouterLink", 13 | "doc-url": "https://router.vuejs.org/api/#to", 14 | "description": "`` is the component for enabling user navigation in a router-enabled app. The target location is specified with the `to` prop. It renders as an `` tag with correct `href` by default, but can be configured with the `tag` prop. In addition, the link automatically gets an active CSS class when the target route is active.", 15 | "attributes": [ 16 | { 17 | "name": "to", 18 | "required": true, 19 | "doc-url": "https://router.vuejs.org/api/#to", 20 | "description": "Denotes the target route of the link. When clicked, the value of the `to` prop will be passed to `router.push()` internally, so the value can be either a string or a location descriptor object.", 21 | "value": { 22 | "kind": "expression", 23 | "type": [ 24 | "string", 25 | "object" 26 | ] 27 | } 28 | }, 29 | { 30 | "name": "tag", 31 | "value": { 32 | "kind": "expression", 33 | "type": "string" 34 | }, 35 | "default": "'a'", 36 | "doc-url": "https://router.vuejs.org/api/#tag", 37 | "description": "Sometimes we want `` to render as another tag, e.g `
  • `. Then we can use `tag` prop to specify which tag to render to, and it will still listen to click events for navigation." 38 | }, 39 | { 40 | "name": "exact", 41 | "value": { 42 | "kind": "expression", 43 | "type": "boolean" 44 | }, 45 | "default": "false", 46 | "doc-url": "https://router.vuejs.org/api/#exact", 47 | "description": "The default active class matching behavior is **inclusive match**. For example, `` will get this class applied as long as the current path starts with `/a/` or is `/a`.\n\nOne consequence of this is that `` will be active for every route! To force the link into \"exact match mode\", use the `exact` prop" 48 | }, 49 | { 50 | "name": "append", 51 | "value": { 52 | "kind": "expression", 53 | "type": "boolean" 54 | }, 55 | "default": "false", 56 | "doc-url": "https://router.vuejs.org/api/#append", 57 | "description": "Setting `append` prop always appends the relative path to the current path. " 58 | }, 59 | { 60 | "name": "replace", 61 | "value": { 62 | "kind": "expression", 63 | "type": "boolean" 64 | }, 65 | "default": "false", 66 | "doc-url": "https://router.vuejs.org/api/#replace", 67 | "description": "Setting `replace` prop will call `router.replace()` instead of `router.push()` when clicked, so the navigation will not leave a history record." 68 | }, 69 | { 70 | "name": "activeClass", 71 | "value": { 72 | "kind": "expression", 73 | "type": "string" 74 | }, 75 | "default": "'router-link-active'", 76 | "doc-url": "https://router.vuejs.org/api/#active-class", 77 | "description": "Configure the active CSS class applied when the link is active. Note the default value can also be configured globally via the `linkActiveClass` router constructor option." 78 | }, 79 | { 80 | "name": "exactActiveClass", 81 | "value": { 82 | "kind": "expression", 83 | "type": "string" 84 | }, 85 | "default": "'router-link-exact-active'", 86 | "doc-url": "https://router.vuejs.org/api/#exact-active-class", 87 | "description": "Configure the active CSS class applied when the link is active with exact match. Note the default value can also be configured globally via the `linkExactActiveClass` router constructor option." 88 | }, 89 | { 90 | "name": "ariaCurrentValue", 91 | "value": { 92 | "kind": "expression", 93 | "type": "'page' | 'step' | 'location' | 'date' | 'time'" 94 | }, 95 | "default": "'page'", 96 | "doc-url": "https://router.vuejs.org/api/#aria-current-value", 97 | "description": "Configure the value of `aria-current` when the link is active with exact match. It must be one of the allowed values for aria-current in the ARIA spec. In most cases, the default of `page` should be the best fit." 98 | }, 99 | { 100 | "name": "event", 101 | "value": { 102 | "kind": "expression", 103 | "type": [ 104 | "string", 105 | "string[]" 106 | ] 107 | }, 108 | "default": "'click'", 109 | "doc-url": "https://router.vuejs.org/api/#event", 110 | "description": "Specify the event(s) that can trigger the link navigation." 111 | } 112 | ], 113 | "slots": [ 114 | { 115 | "name": "default", 116 | "vue-properties": [ 117 | { 118 | "name": "href", 119 | "description": "Resolved url. This would be the `href` attribute of an `a` element", 120 | "type": "string" 121 | }, 122 | { 123 | "name": "route", 124 | "description": "Resolved normalized location", 125 | "type": "object" 126 | }, 127 | { 128 | "name": "navigate", 129 | "description": "Function to trigger the navigation. **It will automatically prevent events when necessary**, the same way `router-link` does", 130 | "type": "() => any" 131 | }, 132 | { 133 | "name": "isActive", 134 | "description": "`true` if the active class should be applied. Allows to apply an arbitrary class", 135 | "type": "boolean" 136 | }, 137 | { 138 | "name": "isExactActive", 139 | "description": "`true` if the exact active class should be applied. Allows to apply an arbitrary class", 140 | "type": "boolean" 141 | } 142 | ] 143 | } 144 | ] 145 | }, 146 | { 147 | "name": "RouterView", 148 | "doc-url": "https://router.vuejs.org/api/#router-view", 149 | "description": "The `` component is a functional component that renders the matched component for the given path. Components rendered in `` can also contain their own ``, which will render components for nested paths.", 150 | "attributes": [ 151 | { 152 | "name": "name", 153 | "value": { 154 | "kind": "expression", 155 | "type": "string" 156 | }, 157 | "default": "'default'", 158 | "doc-url": "https://router.vuejs.org/api/#name", 159 | "description": "When a `` has a name, it will render the component with the corresponding name in the matched route record's components option. See Named Views for an example." 160 | } 161 | ] 162 | } 163 | ] 164 | } 165 | } 166 | } -------------------------------------------------------------------------------- /packages/vue/vue@1.0.0.web-types.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../schema/web-types.json", 3 | "framework": "vue", 4 | "name": "vue", 5 | "version": "1.0.0", 6 | "contributions": { 7 | "html": { 8 | "types-syntax": "typescript", 9 | "description-markup": "markdown", 10 | "tags": [ 11 | { 12 | "name": "Component", 13 | "doc-url": "https://v1.vuejs.org/api/#component", 14 | "description": "Alternative syntax for invoking components. Primarily used for dynamic components with the `is` attribute.", 15 | "attributes": [ 16 | { 17 | "name": "is" 18 | }, 19 | { 20 | "name": "keep-alive", 21 | "value": { 22 | "kind": "expression", 23 | "type": "boolean" 24 | }, 25 | "type": "boolean" 26 | }, 27 | { 28 | "name": "transition-mode" 29 | } 30 | ] 31 | }, 32 | { 33 | "name": "Slot", 34 | "doc-url": "https://v1.vuejs.org/api/#slot", 35 | "description": "`` elements serve as content distribution outlets in component templates. The slot element itself will be replaced.\nA slot with the `name` attribute is called a named slot. A named slot will distribute content with a `slot` attribute that matches its name.", 36 | "attributes": [ 37 | { 38 | "name": "name", 39 | "value": { 40 | "kind": "expression", 41 | "type": "string" 42 | } 43 | } 44 | ] 45 | }, 46 | { 47 | "name": "Partial", 48 | "doc-url": "https://v1.vuejs.org/api/#partial", 49 | "description": "`` elements serve as outlets for registered template partials. Partial contents are also compiled by Vue when inserted. The `` element itself will be replaced. It requires a `name` attribute which will be used to resolve the partial’s content.", 50 | "attributes": [ 51 | { 52 | "name": "name", 53 | "required": true 54 | } 55 | ] 56 | } 57 | ], 58 | "attributes": [ 59 | { 60 | "name": "v-text", 61 | "description": "Updates the element’s `textContent`.\n\nInternally, `{{ Mustache }}` interpolations are also compiled as a `v-text` directive on a textNode. The directive form requires a wrapper element, but offers slightly better performance and avoids FOUC (Flash of Uncompiled Content).", 62 | "doc-url": "https://v1.vuejs.org/api/#v-text", 63 | "value": { 64 | "kind": "expression", 65 | "required": true, 66 | "type": "any" 67 | } 68 | }, 69 | { 70 | "name": "v-html", 71 | "description": "Updates the element’s `innerHTML`. The contents are inserted as plain HTML - data bindings are ignored. If you need to reuse template pieces, you should use partials.\n\nInternally, `{{{ Mustache }}}` interpolations are also compiled as a `v-html` directive using anchor nodes. The directive form requires a wrapper element, but offers slightly better performance and avoids FOUC (Flash of Uncompiled Content).", 72 | "doc-url": "https://v1.vuejs.org/api/#v-html", 73 | "value": { 74 | "kind": "expression", 75 | "required": true, 76 | "type": "any" 77 | } 78 | }, 79 | { 80 | "name": "v-if", 81 | "description": "Conditionally render the element based on the truthy-ness of the expression value. The element and its contained data bindings / components are destroyed and re-constructed during toggles. If the element is a `