├── .github └── workflows │ └── ci.yml ├── .gitignore ├── .prettierrc ├── .vscode └── settings.json ├── LICENSE ├── NOTICE ├── README.md ├── package.json ├── patches └── class-variance-authority+0.1.0.patch ├── pnpm-lock.yaml ├── renovate.json ├── src ├── index.tsx └── types.ts ├── test └── index.test.ts └── tsconfig.json /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | pull_request: 7 | branches: [main] 8 | 9 | jobs: 10 | test: 11 | if: "!contains(github.event.head_commit.message, 'ci skip')" 12 | 13 | strategy: 14 | matrix: 15 | os: [ubuntu-latest, windows-latest] 16 | node-version: [14.x] 17 | 18 | runs-on: ${{ matrix.os }} 19 | 20 | # Steps represent a sequence of tasks that will be executed as part of the job 21 | steps: 22 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 23 | - uses: actions/checkout@v2 24 | 25 | - uses: actions/setup-node@v2 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | 29 | - name: Cache ~/.pnpm-store 30 | uses: actions/cache@v2 31 | env: 32 | cache-name: cache-pnpm-store 33 | with: 34 | path: ~/.pnpm-store 35 | key: ${{ runner.os }}-${{ matrix.node-version }}-test-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} 36 | restore-keys: | 37 | ${{ runner.os }}-${{ matrix.node-version }}-test-${{ env.cache-name }}- 38 | ${{ runner.os }}-${{ matrix.node-version }}-test- 39 | ${{ runner.os }}- 40 | 41 | - name: Install pnpm 42 | run: npm i -g pnpm 43 | 44 | - name: Install deps 45 | run: pnpm i 46 | 47 | # Runs a set of commands using the runners shell 48 | - name: Build and Test 49 | run: pnpm test 50 | 51 | release: 52 | runs-on: ubuntu-latest 53 | needs: ['test'] 54 | if: "!contains(github.event.head_commit.message, 'skip-release') && !contains(github.event.head_commit.message, 'skip-ci') && github.event_name != 'pull_request'" 55 | steps: 56 | - uses: actions/checkout@v2 57 | - uses: actions/setup-node@v2 58 | with: 59 | node-version: 14.x 60 | - name: Cache ~/.pnpm-store 61 | uses: actions/cache@v2 62 | env: 63 | cache-name: cache-pnpm-store 64 | with: 65 | path: ~/.pnpm-store 66 | key: ${{ runner.os }}-${{ matrix.node-version }}-release-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} 67 | restore-keys: | 68 | ${{ runner.os }}-${{ matrix.node-version }}-release-${{ env.cache-name }}- 69 | ${{ runner.os }}-${{ matrix.node-version }}-release- 70 | ${{ runner.os }}- 71 | - run: npm i -g pnpm 72 | - run: pnpm i 73 | - run: pnpx -y semantic-release --branches main 74 | env: 75 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 76 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 77 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | dist 4 | *.log -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | "@egoist/prettier-config" 2 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": true 3 | } 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright © 2022 Nafees Nazik 4 | 5 | This product bundles class-variance-authority 0.1.0, which is available under a 6 | "Apache License 2.0" license. 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in all 16 | copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | SOFTWARE. -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | This package includes a dependency package class-variance-authority developed by 2 | Joe Bell (https://github.com/joe-bell) which has been patched to export the types. 3 | (https://github.com/G3root/react-cva/tree/main/patches) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

react-cva

2 | 3 |

4 | 5 | NPM Version 6 | 7 | 8 | Types Included 9 | 10 | 11 | Minizipped Size 12 | 13 | 14 | NPM Downloads 15 | 16 | 17 | Follow @NFS__21 on Twitter 18 | 19 |

20 | 21 | ## Introduction 22 | 23 | this is a helper library for [cva](https://github.com/joe-bell/cva#readme) which this uses internally, for creating react components. 24 | for more information view [cva docs](https://github.com/joe-bell/cva#readme). 25 | 26 | ## Acknowledgements 27 | 28 | - [**Class Variance Authority**](https://github.com/joe-bell/cva) ([joe bell](https://github.com/joe-bell)) 29 | 30 | ## Installation 31 | 32 | ```sh 33 | npm i react-cva 34 | ``` 35 | 36 | ## Examples 37 | 38 |
39 | with tailwind css 40 | 41 | ```tsx 42 | import { styled } from "react-cva"; 43 | 44 | const Button = styled("button")("button", { 45 | variants: { 46 | intent: { 47 | primary: [ 48 | "bg-blue-500", 49 | "text-white", 50 | "border-transparent", 51 | "hover:bg-blue-600", 52 | ], 53 | secondary: [ 54 | "bg-white", 55 | "text-gray-800", 56 | "border-gray-400", 57 | "hover:bg-gray-100", 58 | ], 59 | }, 60 | size: { 61 | small: ["text-sm", "py-1", "px-2"], 62 | medium: ["text-base", "py-2", "px-4"], 63 | }, 64 | }, 65 | compoundVariants: [{ intent: "primary", size: "medium", class: "uppercase" }], 66 | defaultVariants: { 67 | intent: "primary", 68 | size: "medium", 69 | }, 70 | }); 71 | 72 | const Render = () => { 73 | return ( 74 |
75 | 76 |
77 | ); 78 | }; 79 | 80 | ``` 81 | 82 |
83 | 84 |
85 | with css modules 86 | 87 | ```tsx 88 | import { styled } from "react-cva"; 89 | import style from "./button.module.css"; 90 | 91 | const Button = styled("button")(style.base, { 92 | variants: { 93 | intent: { 94 | primary: style.primary, 95 | secondary: style.secondary, 96 | }, 97 | size: { 98 | small: style.small, 99 | medium: style.medium, 100 | }, 101 | }, 102 | compoundVariants: [ 103 | { intent: "primary", size: "medium", class: style.primaryMedium }, 104 | ], 105 | defaultVariants: { 106 | intent: "primary", 107 | size: "medium", 108 | }, 109 | }); 110 | 111 | const Render = () => { 112 | return ( 113 |
114 | 115 |
116 | ); 117 | }; 118 | 119 | ``` 120 | 121 |
122 | 123 | ## API Reference 124 | 125 | ### `styled` 126 | 127 | Builds a `styled` component 128 | 129 | ```ts 130 | const Component = styled("div")("base", options); 131 | ``` 132 | 133 | #### Parameters 134 | 135 | 1. `div`: tag type (`HtmlElement`) 136 | 2. `base`: the base class name (`string`, `string[]` or `null`) 137 | 3. `options` _(optional)_ 138 | - `variants`: your variants schema 139 | - `compoundVariants`: variants based on a combination of previously defined variants 140 | - `defaultVariants`: set default values for previously defined variants 141 | 142 | #### Returns 143 | 144 | A JSX Element 145 | 146 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-cva", 3 | "version": "0.0.0", 4 | "description": "styled helper for Class Variance Authority", 5 | "publishConfig": { 6 | "access": "public" 7 | }, 8 | "files": [ 9 | "dist" 10 | ], 11 | "main": "./dist/index.js", 12 | "module": "./dist/index.mjs", 13 | "exports": { 14 | "require": "./dist/index.js", 15 | "import": "./dist/index.mjs" 16 | }, 17 | "types": "./dist/index.d.ts", 18 | "scripts": { 19 | "patch": "patch-package", 20 | "build-fast": "tsup src/index.tsx --format cjs,esm", 21 | "build": "pnpm run build-fast -- --dts-resolve ", 22 | "test": "vitest run", 23 | "prepublishOnly": "pnpm run patch & pnpm run build" 24 | }, 25 | "license": "MIT", 26 | "devDependencies": { 27 | "@egoist/prettier-config": "1.0.0", 28 | "@milahu/patch-package-with-pnpm-support": "^6.4.8", 29 | "@types/react": "^17.0.40", 30 | "class-variance-authority": "^0.1.0", 31 | "prettier": "2.5.1", 32 | "react": "^17.0.2", 33 | "tsup": "5.12.1", 34 | "typescript": "4.6.2", 35 | "vitest": "0.6.1" 36 | }, 37 | "peerDependencies": { 38 | "react": ">= 16.3.0", 39 | "@types/react": ">= 16.3.0" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /patches/class-variance-authority+0.1.0.patch: -------------------------------------------------------------------------------- 1 | # generated by patch-package 6.4.8 on 2022-03-19 13:04:40 2 | # 3 | # command: 4 | # npx patch-package class-variance-authority 5 | # 6 | # declared package: 7 | # class-variance-authority: 0.1.0 8 | # 9 | diff --git a/node_modules/class-variance-authority/dist/index.d.ts b/node_modules/class-variance-authority/dist/index.d.ts 10 | index 5f2b154..e29ad94 100644 11 | --- a/node_modules/class-variance-authority/dist/index.d.ts 12 | +++ b/node_modules/class-variance-authority/dist/index.d.ts 13 | @@ -17,4 +17,4 @@ export declare const cva: (base?: ClassValue, config?: (Variants exten 14 | defaultVariants?: VariantsConfig | undefined; 15 | compoundVariants?: (Variants extends VariantsSchema ? VariantsConfig & ClassProp : ClassProp)[] | undefined; 16 | } : never) | undefined) => (props?: (Variants extends VariantsSchema ? VariantsConfig & ClassProp : ClassProp) | undefined) => string; 17 | -export {}; 18 | +export {VariantsSchema,VariantsConfig,StringToBoolean,ClassProp,ClassValue,OmitUndefined}; 19 | -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- 1 | lockfileVersion: 5.3 2 | 3 | specifiers: 4 | '@egoist/prettier-config': 1.0.0 5 | '@milahu/patch-package-with-pnpm-support': ^6.4.8 6 | '@types/react': ^17.0.40 7 | class-variance-authority: ^0.1.0 8 | prettier: 2.5.1 9 | react: ^17.0.2 10 | tsup: 5.12.1 11 | typescript: 4.6.2 12 | vitest: 0.6.1 13 | 14 | devDependencies: 15 | '@egoist/prettier-config': 1.0.0 16 | '@milahu/patch-package-with-pnpm-support': 6.4.8 17 | '@types/react': 17.0.44 18 | class-variance-authority: 0.1.0 19 | prettier: 2.5.1 20 | react: 17.0.2 21 | tsup: 5.12.1_typescript@4.6.2 22 | typescript: 4.6.2 23 | vitest: 0.6.1 24 | 25 | packages: 26 | 27 | /@babel/code-frame/7.12.13: 28 | resolution: {integrity: sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==} 29 | dependencies: 30 | '@babel/highlight': 7.13.10 31 | dev: true 32 | 33 | /@babel/helper-validator-identifier/7.12.11: 34 | resolution: {integrity: sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==} 35 | dev: true 36 | 37 | /@babel/highlight/7.13.10: 38 | resolution: {integrity: sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==} 39 | dependencies: 40 | '@babel/helper-validator-identifier': 7.12.11 41 | chalk: 2.4.2 42 | js-tokens: 4.0.0 43 | dev: true 44 | 45 | /@egoist/prettier-config/1.0.0: 46 | resolution: {integrity: sha512-D1Tp9Jv4aVoEo3cOAO966gFCI0wx/1lZ6sEHX8uMAfyVxuxD2+knGxhfGlb/FNLxWV3ifSI5hOmB/zFfsi7Rzw==} 47 | dev: true 48 | 49 | /@milahu/patch-package-with-pnpm-support/6.4.8: 50 | resolution: {integrity: sha512-aPb7vokV6kIhoEP8ZrygK6zfVMGp0zP9RJL6GvX3YziQelmnEWa58x7aZrAk9/q66LQPZDnZ5/aNhsp7l8TbfQ==} 51 | engines: {npm: '>5'} 52 | hasBin: true 53 | dependencies: 54 | '@types/dashdash': 1.14.1 55 | '@yarnpkg/lockfile': 1.1.0 56 | chalk: 2.4.2 57 | cross-spawn: 6.0.5 58 | dashdash: 2.0.0 59 | find-yarn-workspace-root: 2.0.0 60 | fs-extra: 7.0.1 61 | is-ci: 2.0.0 62 | klaw-sync: 6.0.0 63 | open: 7.4.2 64 | rimraf: 2.7.1 65 | semver: 5.7.1 66 | shlex: 2.1.0 67 | slash: 2.0.0 68 | tmp: 0.0.33 69 | dev: true 70 | 71 | /@nodelib/fs.scandir/2.1.4: 72 | resolution: {integrity: sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==} 73 | engines: {node: '>= 8'} 74 | dependencies: 75 | '@nodelib/fs.stat': 2.0.4 76 | run-parallel: 1.2.0 77 | dev: true 78 | 79 | /@nodelib/fs.stat/2.0.4: 80 | resolution: {integrity: sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==} 81 | engines: {node: '>= 8'} 82 | dev: true 83 | 84 | /@nodelib/fs.walk/1.2.6: 85 | resolution: {integrity: sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==} 86 | engines: {node: '>= 8'} 87 | dependencies: 88 | '@nodelib/fs.scandir': 2.1.4 89 | fastq: 1.11.0 90 | dev: true 91 | 92 | /@types/chai-subset/1.3.3: 93 | resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} 94 | dependencies: 95 | '@types/chai': 4.3.0 96 | dev: true 97 | 98 | /@types/chai/4.3.0: 99 | resolution: {integrity: sha512-/ceqdqeRraGolFTcfoXNiqjyQhZzbINDngeoAq9GoHa8PPK1yNzTaxWjA6BFWp5Ua9JpXEMSS4s5i9tS0hOJtw==} 100 | dev: true 101 | 102 | /@types/dashdash/1.14.1: 103 | resolution: {integrity: sha512-3UAiw52g6LARDS9I5lpYwUzj/nBuMvor/0BWiza7ibuOIEaNIo+m3whnVBLLj/ue0DzlcX+96c24YdZCuDwOiQ==} 104 | dev: true 105 | 106 | /@types/parse-json/4.0.0: 107 | resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==} 108 | dev: true 109 | 110 | /@types/prop-types/15.7.5: 111 | resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==} 112 | dev: true 113 | 114 | /@types/react/17.0.44: 115 | resolution: {integrity: sha512-Ye0nlw09GeMp2Suh8qoOv0odfgCoowfM/9MG6WeRD60Gq9wS90bdkdRtYbRkNhXOpG4H+YXGvj4wOWhAC0LJ1g==} 116 | dependencies: 117 | '@types/prop-types': 15.7.5 118 | '@types/scheduler': 0.16.2 119 | csstype: 3.0.11 120 | dev: true 121 | 122 | /@types/scheduler/0.16.2: 123 | resolution: {integrity: sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==} 124 | dev: true 125 | 126 | /@yarnpkg/lockfile/1.1.0: 127 | resolution: {integrity: sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==} 128 | dev: true 129 | 130 | /ansi-styles/3.2.1: 131 | resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} 132 | engines: {node: '>=4'} 133 | dependencies: 134 | color-convert: 1.9.3 135 | dev: true 136 | 137 | /any-promise/1.3.0: 138 | resolution: {integrity: sha1-q8av7tzqUugJzcA3au0845Y10X8=} 139 | dev: true 140 | 141 | /anymatch/3.1.1: 142 | resolution: {integrity: sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==} 143 | engines: {node: '>= 8'} 144 | dependencies: 145 | normalize-path: 3.0.0 146 | picomatch: 2.3.0 147 | dev: true 148 | 149 | /array-union/2.1.0: 150 | resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} 151 | engines: {node: '>=8'} 152 | dev: true 153 | 154 | /assert-plus/1.0.0: 155 | resolution: {integrity: sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=} 156 | engines: {node: '>=0.8'} 157 | dev: true 158 | 159 | /assertion-error/1.1.0: 160 | resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} 161 | dev: true 162 | 163 | /balanced-match/1.0.0: 164 | resolution: {integrity: sha1-ibTRmasr7kneFk6gK4nORi1xt2c=} 165 | dev: true 166 | 167 | /binary-extensions/2.2.0: 168 | resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} 169 | engines: {node: '>=8'} 170 | dev: true 171 | 172 | /brace-expansion/1.1.11: 173 | resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} 174 | dependencies: 175 | balanced-match: 1.0.0 176 | concat-map: 0.0.1 177 | dev: true 178 | 179 | /braces/3.0.2: 180 | resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} 181 | engines: {node: '>=8'} 182 | dependencies: 183 | fill-range: 7.0.1 184 | dev: true 185 | 186 | /bundle-require/3.0.4_esbuild@0.14.2: 187 | resolution: {integrity: sha512-VXG6epB1yrLAvWVQpl92qF347/UXmncQj7J3U8kZEbdVZ1ZkQyr4hYeL/9RvcE8vVVdp53dY78Fd/3pqfRqI1A==} 188 | engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} 189 | peerDependencies: 190 | esbuild: '>=0.13' 191 | dependencies: 192 | esbuild: 0.14.2 193 | load-tsconfig: 0.2.3 194 | dev: true 195 | 196 | /cac/6.7.12: 197 | resolution: {integrity: sha512-rM7E2ygtMkJqD9c7WnFU6fruFcN3xe4FM5yUmgxhZzIKJk4uHl9U/fhwdajGFQbQuv43FAUo1Fe8gX/oIKDeSA==} 198 | engines: {node: '>=8'} 199 | dev: true 200 | 201 | /callsites/3.1.0: 202 | resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} 203 | engines: {node: '>=6'} 204 | dev: true 205 | 206 | /chai/4.3.6: 207 | resolution: {integrity: sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==} 208 | engines: {node: '>=4'} 209 | dependencies: 210 | assertion-error: 1.1.0 211 | check-error: 1.0.2 212 | deep-eql: 3.0.1 213 | get-func-name: 2.0.0 214 | loupe: 2.3.1 215 | pathval: 1.1.1 216 | type-detect: 4.0.8 217 | dev: true 218 | 219 | /chalk/2.4.2: 220 | resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} 221 | engines: {node: '>=4'} 222 | dependencies: 223 | ansi-styles: 3.2.1 224 | escape-string-regexp: 1.0.5 225 | supports-color: 5.5.0 226 | dev: true 227 | 228 | /check-error/1.0.2: 229 | resolution: {integrity: sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=} 230 | dev: true 231 | 232 | /chokidar/3.5.1: 233 | resolution: {integrity: sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==} 234 | engines: {node: '>= 8.10.0'} 235 | dependencies: 236 | anymatch: 3.1.1 237 | braces: 3.0.2 238 | glob-parent: 5.1.2 239 | is-binary-path: 2.1.0 240 | is-glob: 4.0.1 241 | normalize-path: 3.0.0 242 | readdirp: 3.5.0 243 | optionalDependencies: 244 | fsevents: 2.3.2 245 | dev: true 246 | 247 | /ci-info/2.0.0: 248 | resolution: {integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==} 249 | dev: true 250 | 251 | /class-variance-authority/0.1.0: 252 | resolution: {integrity: sha512-oECEljk18E91VSns++dISUM68xmWiZkgQVEEAO+FMiCDLQRCbrSpVxzMObF8+lsPorRPD4Wm/wcTzDbH9gyObw==} 253 | dev: true 254 | 255 | /color-convert/1.9.3: 256 | resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} 257 | dependencies: 258 | color-name: 1.1.3 259 | dev: true 260 | 261 | /color-name/1.1.3: 262 | resolution: {integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=} 263 | dev: true 264 | 265 | /commander/4.1.1: 266 | resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} 267 | engines: {node: '>= 6'} 268 | dev: true 269 | 270 | /concat-map/0.0.1: 271 | resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} 272 | dev: true 273 | 274 | /cosmiconfig/7.0.0: 275 | resolution: {integrity: sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==} 276 | engines: {node: '>=10'} 277 | dependencies: 278 | '@types/parse-json': 4.0.0 279 | import-fresh: 3.3.0 280 | parse-json: 5.2.0 281 | path-type: 4.0.0 282 | yaml: 1.10.2 283 | dev: true 284 | 285 | /cross-spawn/6.0.5: 286 | resolution: {integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==} 287 | engines: {node: '>=4.8'} 288 | dependencies: 289 | nice-try: 1.0.5 290 | path-key: 2.0.1 291 | semver: 5.7.1 292 | shebang-command: 1.2.0 293 | which: 1.3.1 294 | dev: true 295 | 296 | /cross-spawn/7.0.3: 297 | resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} 298 | engines: {node: '>= 8'} 299 | dependencies: 300 | path-key: 3.1.1 301 | shebang-command: 2.0.0 302 | which: 2.0.2 303 | dev: true 304 | 305 | /csstype/3.0.11: 306 | resolution: {integrity: sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==} 307 | dev: true 308 | 309 | /dashdash/2.0.0: 310 | resolution: {integrity: sha512-ElMoAPlrzmF4l0OscF5pPBZv8LhUJBnwh7rHKllUOrwabAr47R1aQIIwC53rc59ycCb7k5Sj1/es+A3Bep/x5w==} 311 | engines: {node: '>=10.x'} 312 | dependencies: 313 | assert-plus: 1.0.0 314 | dev: true 315 | 316 | /debug/4.3.1: 317 | resolution: {integrity: sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==} 318 | engines: {node: '>=6.0'} 319 | peerDependencies: 320 | supports-color: '*' 321 | peerDependenciesMeta: 322 | supports-color: 323 | optional: true 324 | dependencies: 325 | ms: 2.1.2 326 | dev: true 327 | 328 | /deep-eql/3.0.1: 329 | resolution: {integrity: sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==} 330 | engines: {node: '>=0.12'} 331 | dependencies: 332 | type-detect: 4.0.8 333 | dev: true 334 | 335 | /dir-glob/3.0.1: 336 | resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} 337 | engines: {node: '>=8'} 338 | dependencies: 339 | path-type: 4.0.0 340 | dev: true 341 | 342 | /error-ex/1.3.2: 343 | resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} 344 | dependencies: 345 | is-arrayish: 0.2.1 346 | dev: true 347 | 348 | /esbuild-android-arm64/0.13.15: 349 | resolution: {integrity: sha512-m602nft/XXeO8YQPUDVoHfjyRVPdPgjyyXOxZ44MK/agewFFkPa8tUo6lAzSWh5Ui5PB4KR9UIFTSBKh/RrCmg==} 350 | cpu: [arm64] 351 | os: [android] 352 | requiresBuild: true 353 | dev: true 354 | optional: true 355 | 356 | /esbuild-android-arm64/0.14.2: 357 | resolution: {integrity: sha512-hEixaKMN3XXCkoe+0WcexO4CcBVU5DCSUT+7P8JZiWZCbAjSkc9b6Yz2X5DSfQmRCtI/cQRU6TfMYrMQ5NBfdw==} 358 | cpu: [arm64] 359 | os: [android] 360 | requiresBuild: true 361 | dev: true 362 | optional: true 363 | 364 | /esbuild-darwin-64/0.13.15: 365 | resolution: {integrity: sha512-ihOQRGs2yyp7t5bArCwnvn2Atr6X4axqPpEdCFPVp7iUj4cVSdisgvEKdNR7yH3JDjW6aQDw40iQFoTqejqxvQ==} 366 | cpu: [x64] 367 | os: [darwin] 368 | requiresBuild: true 369 | dev: true 370 | optional: true 371 | 372 | /esbuild-darwin-64/0.14.2: 373 | resolution: {integrity: sha512-Uq8t0cbJQkxkQdbUfOl2wZqZ/AtLZjvJulR1HHnc96UgyzG9YlCLSDMiqjM+NANEy7/zzvwKJsy3iNC9wwqLJA==} 374 | cpu: [x64] 375 | os: [darwin] 376 | requiresBuild: true 377 | dev: true 378 | optional: true 379 | 380 | /esbuild-darwin-arm64/0.13.15: 381 | resolution: {integrity: sha512-i1FZssTVxUqNlJ6cBTj5YQj4imWy3m49RZRnHhLpefFIh0To05ow9DTrXROTE1urGTQCloFUXTX8QfGJy1P8dQ==} 382 | cpu: [arm64] 383 | os: [darwin] 384 | requiresBuild: true 385 | dev: true 386 | optional: true 387 | 388 | /esbuild-darwin-arm64/0.14.2: 389 | resolution: {integrity: sha512-619MSa17sr7YCIrUj88KzQu2ESA4jKYtIYfLU/smX6qNgxQt3Y/gzM4s6sgJ4fPQzirvmXgcHv1ZNQAs/Xh48A==} 390 | cpu: [arm64] 391 | os: [darwin] 392 | requiresBuild: true 393 | dev: true 394 | optional: true 395 | 396 | /esbuild-freebsd-64/0.13.15: 397 | resolution: {integrity: sha512-G3dLBXUI6lC6Z09/x+WtXBXbOYQZ0E8TDBqvn7aMaOCzryJs8LyVXKY4CPnHFXZAbSwkCbqiPuSQ1+HhrNk7EA==} 398 | cpu: [x64] 399 | os: [freebsd] 400 | requiresBuild: true 401 | dev: true 402 | optional: true 403 | 404 | /esbuild-freebsd-64/0.14.2: 405 | resolution: {integrity: sha512-aP6FE/ZsChZpUV6F3HE3x1Pz0paoYXycJ7oLt06g0G9dhJKknPawXCqQg/WMyD+ldCEZfo7F1kavenPdIT/SGQ==} 406 | cpu: [x64] 407 | os: [freebsd] 408 | requiresBuild: true 409 | dev: true 410 | optional: true 411 | 412 | /esbuild-freebsd-arm64/0.13.15: 413 | resolution: {integrity: sha512-KJx0fzEDf1uhNOZQStV4ujg30WlnwqUASaGSFPhznLM/bbheu9HhqZ6mJJZM32lkyfGJikw0jg7v3S0oAvtvQQ==} 414 | cpu: [arm64] 415 | os: [freebsd] 416 | requiresBuild: true 417 | dev: true 418 | optional: true 419 | 420 | /esbuild-freebsd-arm64/0.14.2: 421 | resolution: {integrity: sha512-LSm98WTb1QIhyS83+Po0KTpZNdd2XpVpI9ua5rLWqKWbKeNRFwOsjeiuwBaRNc+O32s9oC2ZMefETxHBV6VNkQ==} 422 | cpu: [arm64] 423 | os: [freebsd] 424 | requiresBuild: true 425 | dev: true 426 | optional: true 427 | 428 | /esbuild-linux-32/0.13.15: 429 | resolution: {integrity: sha512-ZvTBPk0YWCLMCXiFmD5EUtB30zIPvC5Itxz0mdTu/xZBbbHJftQgLWY49wEPSn2T/TxahYCRDWun5smRa0Tu+g==} 430 | cpu: [ia32] 431 | os: [linux] 432 | requiresBuild: true 433 | dev: true 434 | optional: true 435 | 436 | /esbuild-linux-32/0.14.2: 437 | resolution: {integrity: sha512-8VxnNEyeUbiGflTKcuVc5JEPTqXfsx2O6ABwUbfS1Hp26lYPRPC7pKQK5Dxa0MBejGc50jy7YZae3EGQUQ8EkQ==} 438 | cpu: [ia32] 439 | os: [linux] 440 | requiresBuild: true 441 | dev: true 442 | optional: true 443 | 444 | /esbuild-linux-64/0.13.15: 445 | resolution: {integrity: sha512-eCKzkNSLywNeQTRBxJRQ0jxRCl2YWdMB3+PkWFo2BBQYC5mISLIVIjThNtn6HUNqua1pnvgP5xX0nHbZbPj5oA==} 446 | cpu: [x64] 447 | os: [linux] 448 | requiresBuild: true 449 | dev: true 450 | optional: true 451 | 452 | /esbuild-linux-64/0.14.2: 453 | resolution: {integrity: sha512-4bzMS2dNxOJoFIiHId4w+tqQzdnsch71JJV1qZnbnErSFWcR9lRgpSqWnTTFtv6XM+MvltRzSXC5wQ7AEBY6Hg==} 454 | cpu: [x64] 455 | os: [linux] 456 | requiresBuild: true 457 | dev: true 458 | optional: true 459 | 460 | /esbuild-linux-arm/0.13.15: 461 | resolution: {integrity: sha512-wUHttDi/ol0tD8ZgUMDH8Ef7IbDX+/UsWJOXaAyTdkT7Yy9ZBqPg8bgB/Dn3CZ9SBpNieozrPRHm0BGww7W/jA==} 462 | cpu: [arm] 463 | os: [linux] 464 | requiresBuild: true 465 | dev: true 466 | optional: true 467 | 468 | /esbuild-linux-arm/0.14.2: 469 | resolution: {integrity: sha512-PaylahvMHhH8YMfJPMKEqi64qA0Su+d4FNfHKvlKes/2dUe4QxgbwXT9oLVgy8iJdcFMrO7By4R8fS8S0p8aVQ==} 470 | cpu: [arm] 471 | os: [linux] 472 | requiresBuild: true 473 | dev: true 474 | optional: true 475 | 476 | /esbuild-linux-arm64/0.13.15: 477 | resolution: {integrity: sha512-bYpuUlN6qYU9slzr/ltyLTR9YTBS7qUDymO8SV7kjeNext61OdmqFAzuVZom+OLW1HPHseBfJ/JfdSlx8oTUoA==} 478 | cpu: [arm64] 479 | os: [linux] 480 | requiresBuild: true 481 | dev: true 482 | optional: true 483 | 484 | /esbuild-linux-arm64/0.14.2: 485 | resolution: {integrity: sha512-RlIVp0RwJrdtasDF1vTFueLYZ8WuFzxoQ1OoRFZOTyJHCGCNgh7xJIC34gd7B7+RT0CzLBB4LcM5n0LS+hIoww==} 486 | cpu: [arm64] 487 | os: [linux] 488 | requiresBuild: true 489 | dev: true 490 | optional: true 491 | 492 | /esbuild-linux-mips64le/0.13.15: 493 | resolution: {integrity: sha512-KlVjIG828uFPyJkO/8gKwy9RbXhCEUeFsCGOJBepUlpa7G8/SeZgncUEz/tOOUJTcWMTmFMtdd3GElGyAtbSWg==} 494 | cpu: [mips64el] 495 | os: [linux] 496 | requiresBuild: true 497 | dev: true 498 | optional: true 499 | 500 | /esbuild-linux-mips64le/0.14.2: 501 | resolution: {integrity: sha512-Fdwrq2roFnO5oetIiUQQueZ3+5soCxBSJswg3MvYaXDomj47BN6oAWMZgLrFh1oVrtWrxSDLCJBenYdbm2s+qQ==} 502 | cpu: [mips64el] 503 | os: [linux] 504 | requiresBuild: true 505 | dev: true 506 | optional: true 507 | 508 | /esbuild-linux-ppc64le/0.13.15: 509 | resolution: {integrity: sha512-h6gYF+OsaqEuBjeesTBtUPw0bmiDu7eAeuc2OEH9S6mV9/jPhPdhOWzdeshb0BskRZxPhxPOjqZ+/OqLcxQwEQ==} 510 | cpu: [ppc64] 511 | os: [linux] 512 | requiresBuild: true 513 | dev: true 514 | optional: true 515 | 516 | /esbuild-linux-ppc64le/0.14.2: 517 | resolution: {integrity: sha512-vxptskw8JfCDD9QqpRO0XnsM1osuWeRjPaXX1TwdveLogYsbdFtcuiuK/4FxGiNMUr1ojtnCS2rMPbY8puc5NA==} 518 | cpu: [ppc64] 519 | os: [linux] 520 | requiresBuild: true 521 | dev: true 522 | optional: true 523 | 524 | /esbuild-netbsd-64/0.13.15: 525 | resolution: {integrity: sha512-3+yE9emwoevLMyvu+iR3rsa+Xwhie7ZEHMGDQ6dkqP/ndFzRHkobHUKTe+NCApSqG5ce2z4rFu+NX/UHnxlh3w==} 526 | cpu: [x64] 527 | os: [netbsd] 528 | requiresBuild: true 529 | dev: true 530 | optional: true 531 | 532 | /esbuild-netbsd-64/0.14.2: 533 | resolution: {integrity: sha512-I8+LzYK5iSNpspS9eCV9sW67Rj8FgMHimGri4mKiGAmN0pNfx+hFX146rYtzGtewuxKtTsPywWteHx+hPRLDsw==} 534 | cpu: [x64] 535 | os: [netbsd] 536 | requiresBuild: true 537 | dev: true 538 | optional: true 539 | 540 | /esbuild-openbsd-64/0.13.15: 541 | resolution: {integrity: sha512-wTfvtwYJYAFL1fSs8yHIdf5GEE4NkbtbXtjLWjM3Cw8mmQKqsg8kTiqJ9NJQe5NX/5Qlo7Xd9r1yKMMkHllp5g==} 542 | cpu: [x64] 543 | os: [openbsd] 544 | requiresBuild: true 545 | dev: true 546 | optional: true 547 | 548 | /esbuild-openbsd-64/0.14.2: 549 | resolution: {integrity: sha512-120HgMe9elidWUvM2E6mMf0csrGwx8sYDqUIJugyMy1oHm+/nT08bTAVXuwYG/rkMIqsEO9AlMxuYnwR6En/3Q==} 550 | cpu: [x64] 551 | os: [openbsd] 552 | requiresBuild: true 553 | dev: true 554 | optional: true 555 | 556 | /esbuild-sunos-64/0.13.15: 557 | resolution: {integrity: sha512-lbivT9Bx3t1iWWrSnGyBP9ODriEvWDRiweAs69vI+miJoeKwHWOComSRukttbuzjZ8r1q0mQJ8Z7yUsDJ3hKdw==} 558 | cpu: [x64] 559 | os: [sunos] 560 | requiresBuild: true 561 | dev: true 562 | optional: true 563 | 564 | /esbuild-sunos-64/0.14.2: 565 | resolution: {integrity: sha512-Q3xcf9Uyfra9UuCFxoLixVvdigo0daZaKJ97TL2KNA4bxRUPK18wwGUk3AxvgDQZpRmg82w9PnkaNYo7a+24ow==} 566 | cpu: [x64] 567 | os: [sunos] 568 | requiresBuild: true 569 | dev: true 570 | optional: true 571 | 572 | /esbuild-windows-32/0.13.15: 573 | resolution: {integrity: sha512-fDMEf2g3SsJ599MBr50cY5ve5lP1wyVwTe6aLJsM01KtxyKkB4UT+fc5MXQFn3RLrAIAZOG+tHC+yXObpSn7Nw==} 574 | cpu: [ia32] 575 | os: [win32] 576 | requiresBuild: true 577 | dev: true 578 | optional: true 579 | 580 | /esbuild-windows-32/0.14.2: 581 | resolution: {integrity: sha512-TW7O49tPsrq+N1sW8mb3m24j/iDGa4xzAZH4wHWwoIzgtZAYPKC0hpIhufRRG/LA30bdMChO9pjJZ5mtcybtBQ==} 582 | cpu: [ia32] 583 | os: [win32] 584 | requiresBuild: true 585 | dev: true 586 | optional: true 587 | 588 | /esbuild-windows-64/0.13.15: 589 | resolution: {integrity: sha512-9aMsPRGDWCd3bGjUIKG/ZOJPKsiztlxl/Q3C1XDswO6eNX/Jtwu4M+jb6YDH9hRSUflQWX0XKAfWzgy5Wk54JQ==} 590 | cpu: [x64] 591 | os: [win32] 592 | requiresBuild: true 593 | dev: true 594 | optional: true 595 | 596 | /esbuild-windows-64/0.14.2: 597 | resolution: {integrity: sha512-Rym6ViMNmi1E2QuQMWy0AFAfdY0wGwZD73BnzlsQBX5hZBuy/L+Speh7ucUZ16gwsrMM9v86icZUDrSN/lNBKg==} 598 | cpu: [x64] 599 | os: [win32] 600 | requiresBuild: true 601 | dev: true 602 | optional: true 603 | 604 | /esbuild-windows-arm64/0.13.15: 605 | resolution: {integrity: sha512-zzvyCVVpbwQQATaf3IG8mu1IwGEiDxKkYUdA4FpoCHi1KtPa13jeScYDjlW0Qh+ebWzpKfR2ZwvqAQkSWNcKjA==} 606 | cpu: [arm64] 607 | os: [win32] 608 | requiresBuild: true 609 | dev: true 610 | optional: true 611 | 612 | /esbuild-windows-arm64/0.14.2: 613 | resolution: {integrity: sha512-ZrLbhr0vX5Em/P1faMnHucjVVWPS+m3tktAtz93WkMZLmbRJevhiW1y4CbulBd2z0MEdXZ6emDa1zFHq5O5bSA==} 614 | cpu: [arm64] 615 | os: [win32] 616 | requiresBuild: true 617 | dev: true 618 | optional: true 619 | 620 | /esbuild/0.13.15: 621 | resolution: {integrity: sha512-raCxt02HBKv8RJxE8vkTSCXGIyKHdEdGfUmiYb8wnabnaEmHzyW7DCHb5tEN0xU8ryqg5xw54mcwnYkC4x3AIw==} 622 | hasBin: true 623 | requiresBuild: true 624 | optionalDependencies: 625 | esbuild-android-arm64: 0.13.15 626 | esbuild-darwin-64: 0.13.15 627 | esbuild-darwin-arm64: 0.13.15 628 | esbuild-freebsd-64: 0.13.15 629 | esbuild-freebsd-arm64: 0.13.15 630 | esbuild-linux-32: 0.13.15 631 | esbuild-linux-64: 0.13.15 632 | esbuild-linux-arm: 0.13.15 633 | esbuild-linux-arm64: 0.13.15 634 | esbuild-linux-mips64le: 0.13.15 635 | esbuild-linux-ppc64le: 0.13.15 636 | esbuild-netbsd-64: 0.13.15 637 | esbuild-openbsd-64: 0.13.15 638 | esbuild-sunos-64: 0.13.15 639 | esbuild-windows-32: 0.13.15 640 | esbuild-windows-64: 0.13.15 641 | esbuild-windows-arm64: 0.13.15 642 | dev: true 643 | 644 | /esbuild/0.14.2: 645 | resolution: {integrity: sha512-l076A6o/PIgcyM24s0dWmDI/b8RQf41uWoJu9I0M71CtW/YSw5T5NUeXxs5lo2tFQD+O4CW4nBHJXx3OY5NpXg==} 646 | hasBin: true 647 | requiresBuild: true 648 | optionalDependencies: 649 | esbuild-android-arm64: 0.14.2 650 | esbuild-darwin-64: 0.14.2 651 | esbuild-darwin-arm64: 0.14.2 652 | esbuild-freebsd-64: 0.14.2 653 | esbuild-freebsd-arm64: 0.14.2 654 | esbuild-linux-32: 0.14.2 655 | esbuild-linux-64: 0.14.2 656 | esbuild-linux-arm: 0.14.2 657 | esbuild-linux-arm64: 0.14.2 658 | esbuild-linux-mips64le: 0.14.2 659 | esbuild-linux-ppc64le: 0.14.2 660 | esbuild-netbsd-64: 0.14.2 661 | esbuild-openbsd-64: 0.14.2 662 | esbuild-sunos-64: 0.14.2 663 | esbuild-windows-32: 0.14.2 664 | esbuild-windows-64: 0.14.2 665 | esbuild-windows-arm64: 0.14.2 666 | dev: true 667 | 668 | /escape-string-regexp/1.0.5: 669 | resolution: {integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=} 670 | engines: {node: '>=0.8.0'} 671 | dev: true 672 | 673 | /execa/5.0.0: 674 | resolution: {integrity: sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==} 675 | engines: {node: '>=10'} 676 | dependencies: 677 | cross-spawn: 7.0.3 678 | get-stream: 6.0.0 679 | human-signals: 2.1.0 680 | is-stream: 2.0.0 681 | merge-stream: 2.0.0 682 | npm-run-path: 4.0.1 683 | onetime: 5.1.2 684 | signal-exit: 3.0.3 685 | strip-final-newline: 2.0.0 686 | dev: true 687 | 688 | /fast-glob/3.2.5: 689 | resolution: {integrity: sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==} 690 | engines: {node: '>=8'} 691 | dependencies: 692 | '@nodelib/fs.stat': 2.0.4 693 | '@nodelib/fs.walk': 1.2.6 694 | glob-parent: 5.1.2 695 | merge2: 1.4.1 696 | micromatch: 4.0.4 697 | picomatch: 2.3.0 698 | dev: true 699 | 700 | /fastq/1.11.0: 701 | resolution: {integrity: sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==} 702 | dependencies: 703 | reusify: 1.0.4 704 | dev: true 705 | 706 | /fill-range/7.0.1: 707 | resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} 708 | engines: {node: '>=8'} 709 | dependencies: 710 | to-regex-range: 5.0.1 711 | dev: true 712 | 713 | /find-yarn-workspace-root/2.0.0: 714 | resolution: {integrity: sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==} 715 | dependencies: 716 | micromatch: 4.0.4 717 | dev: true 718 | 719 | /fs-extra/7.0.1: 720 | resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} 721 | engines: {node: '>=6 <7 || >=8'} 722 | dependencies: 723 | graceful-fs: 4.2.9 724 | jsonfile: 4.0.0 725 | universalify: 0.1.2 726 | dev: true 727 | 728 | /fs.realpath/1.0.0: 729 | resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=} 730 | dev: true 731 | 732 | /fsevents/2.3.2: 733 | resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} 734 | engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} 735 | os: [darwin] 736 | requiresBuild: true 737 | dev: true 738 | optional: true 739 | 740 | /function-bind/1.1.1: 741 | resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} 742 | dev: true 743 | 744 | /get-func-name/2.0.0: 745 | resolution: {integrity: sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=} 746 | dev: true 747 | 748 | /get-stream/6.0.0: 749 | resolution: {integrity: sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg==} 750 | engines: {node: '>=10'} 751 | dev: true 752 | 753 | /glob-parent/5.1.2: 754 | resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} 755 | engines: {node: '>= 6'} 756 | dependencies: 757 | is-glob: 4.0.1 758 | dev: true 759 | 760 | /glob/7.1.6: 761 | resolution: {integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==} 762 | dependencies: 763 | fs.realpath: 1.0.0 764 | inflight: 1.0.6 765 | inherits: 2.0.4 766 | minimatch: 3.0.4 767 | once: 1.4.0 768 | path-is-absolute: 1.0.1 769 | dev: true 770 | 771 | /globby/11.0.4: 772 | resolution: {integrity: sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==} 773 | engines: {node: '>=10'} 774 | dependencies: 775 | array-union: 2.1.0 776 | dir-glob: 3.0.1 777 | fast-glob: 3.2.5 778 | ignore: 5.1.8 779 | merge2: 1.4.1 780 | slash: 3.0.0 781 | dev: true 782 | 783 | /graceful-fs/4.2.9: 784 | resolution: {integrity: sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==} 785 | dev: true 786 | 787 | /has-flag/3.0.0: 788 | resolution: {integrity: sha1-tdRU3CGZriJWmfNGfloH87lVuv0=} 789 | engines: {node: '>=4'} 790 | dev: true 791 | 792 | /has/1.0.3: 793 | resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} 794 | engines: {node: '>= 0.4.0'} 795 | dependencies: 796 | function-bind: 1.1.1 797 | dev: true 798 | 799 | /human-signals/2.1.0: 800 | resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} 801 | engines: {node: '>=10.17.0'} 802 | dev: true 803 | 804 | /ignore/5.1.8: 805 | resolution: {integrity: sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==} 806 | engines: {node: '>= 4'} 807 | dev: true 808 | 809 | /import-cwd/3.0.0: 810 | resolution: {integrity: sha512-4pnzH16plW+hgvRECbDWpQl3cqtvSofHWh44met7ESfZ8UZOWWddm8hEyDTqREJ9RbYHY8gi8DqmaelApoOGMg==} 811 | engines: {node: '>=8'} 812 | dependencies: 813 | import-from: 3.0.0 814 | dev: true 815 | 816 | /import-fresh/3.3.0: 817 | resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} 818 | engines: {node: '>=6'} 819 | dependencies: 820 | parent-module: 1.0.1 821 | resolve-from: 4.0.0 822 | dev: true 823 | 824 | /import-from/3.0.0: 825 | resolution: {integrity: sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ==} 826 | engines: {node: '>=8'} 827 | dependencies: 828 | resolve-from: 5.0.0 829 | dev: true 830 | 831 | /inflight/1.0.6: 832 | resolution: {integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=} 833 | dependencies: 834 | once: 1.4.0 835 | wrappy: 1.0.2 836 | dev: true 837 | 838 | /inherits/2.0.4: 839 | resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} 840 | dev: true 841 | 842 | /is-arrayish/0.2.1: 843 | resolution: {integrity: sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=} 844 | dev: true 845 | 846 | /is-binary-path/2.1.0: 847 | resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} 848 | engines: {node: '>=8'} 849 | dependencies: 850 | binary-extensions: 2.2.0 851 | dev: true 852 | 853 | /is-ci/2.0.0: 854 | resolution: {integrity: sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==} 855 | hasBin: true 856 | dependencies: 857 | ci-info: 2.0.0 858 | dev: true 859 | 860 | /is-core-module/2.8.0: 861 | resolution: {integrity: sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==} 862 | dependencies: 863 | has: 1.0.3 864 | dev: true 865 | 866 | /is-docker/2.2.1: 867 | resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} 868 | engines: {node: '>=8'} 869 | hasBin: true 870 | dev: true 871 | 872 | /is-extglob/2.1.1: 873 | resolution: {integrity: sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=} 874 | engines: {node: '>=0.10.0'} 875 | dev: true 876 | 877 | /is-glob/4.0.1: 878 | resolution: {integrity: sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==} 879 | engines: {node: '>=0.10.0'} 880 | dependencies: 881 | is-extglob: 2.1.1 882 | dev: true 883 | 884 | /is-number/7.0.0: 885 | resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} 886 | engines: {node: '>=0.12.0'} 887 | dev: true 888 | 889 | /is-stream/2.0.0: 890 | resolution: {integrity: sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==} 891 | engines: {node: '>=8'} 892 | dev: true 893 | 894 | /is-wsl/2.2.0: 895 | resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} 896 | engines: {node: '>=8'} 897 | dependencies: 898 | is-docker: 2.2.1 899 | dev: true 900 | 901 | /isexe/2.0.0: 902 | resolution: {integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=} 903 | dev: true 904 | 905 | /joycon/3.0.1: 906 | resolution: {integrity: sha512-SJcJNBg32dGgxhPtM0wQqxqV0ax9k/9TaUskGDSJkSFSQOEWWvQ3zzWdGQRIUry2j1zA5+ReH13t0Mf3StuVZA==} 907 | engines: {node: '>=10'} 908 | dev: true 909 | 910 | /js-tokens/4.0.0: 911 | resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} 912 | dev: true 913 | 914 | /json-parse-even-better-errors/2.3.1: 915 | resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} 916 | dev: true 917 | 918 | /jsonfile/4.0.0: 919 | resolution: {integrity: sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=} 920 | optionalDependencies: 921 | graceful-fs: 4.2.9 922 | dev: true 923 | 924 | /klaw-sync/6.0.0: 925 | resolution: {integrity: sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==} 926 | dependencies: 927 | graceful-fs: 4.2.9 928 | dev: true 929 | 930 | /lines-and-columns/1.1.6: 931 | resolution: {integrity: sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=} 932 | dev: true 933 | 934 | /load-tsconfig/0.2.3: 935 | resolution: {integrity: sha512-iyT2MXws+dc2Wi6o3grCFtGXpeMvHmJqS27sMPGtV2eUu4PeFnG+33I8BlFK1t1NWMjOpcx9bridn5yxLDX2gQ==} 936 | engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} 937 | dev: true 938 | 939 | /local-pkg/0.4.1: 940 | resolution: {integrity: sha512-lL87ytIGP2FU5PWwNDo0w3WhIo2gopIAxPg9RxDYF7m4rr5ahuZxP22xnJHIvaLTe4Z9P6uKKY2UHiwyB4pcrw==} 941 | engines: {node: '>=14'} 942 | dev: true 943 | 944 | /loose-envify/1.4.0: 945 | resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} 946 | hasBin: true 947 | dependencies: 948 | js-tokens: 4.0.0 949 | dev: true 950 | 951 | /loupe/2.3.1: 952 | resolution: {integrity: sha512-EN1D3jyVmaX4tnajVlfbREU4axL647hLec1h/PXAb8CPDMJiYitcWF2UeLVNttRqaIqQs4x+mRvXf+d+TlDrCA==} 953 | dependencies: 954 | get-func-name: 2.0.0 955 | dev: true 956 | 957 | /merge-stream/2.0.0: 958 | resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} 959 | dev: true 960 | 961 | /merge2/1.4.1: 962 | resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} 963 | engines: {node: '>= 8'} 964 | dev: true 965 | 966 | /micromatch/4.0.4: 967 | resolution: {integrity: sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==} 968 | engines: {node: '>=8.6'} 969 | dependencies: 970 | braces: 3.0.2 971 | picomatch: 2.3.0 972 | dev: true 973 | 974 | /mimic-fn/2.1.0: 975 | resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} 976 | engines: {node: '>=6'} 977 | dev: true 978 | 979 | /minimatch/3.0.4: 980 | resolution: {integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==} 981 | dependencies: 982 | brace-expansion: 1.1.11 983 | dev: true 984 | 985 | /ms/2.1.2: 986 | resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} 987 | dev: true 988 | 989 | /mz/2.7.0: 990 | resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} 991 | dependencies: 992 | any-promise: 1.3.0 993 | object-assign: 4.1.1 994 | thenify-all: 1.6.0 995 | dev: true 996 | 997 | /nanoid/3.1.30: 998 | resolution: {integrity: sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ==} 999 | engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} 1000 | hasBin: true 1001 | dev: true 1002 | 1003 | /nice-try/1.0.5: 1004 | resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} 1005 | dev: true 1006 | 1007 | /node-modules-regexp/1.0.0: 1008 | resolution: {integrity: sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=} 1009 | engines: {node: '>=0.10.0'} 1010 | dev: true 1011 | 1012 | /normalize-path/3.0.0: 1013 | resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} 1014 | engines: {node: '>=0.10.0'} 1015 | dev: true 1016 | 1017 | /npm-run-path/4.0.1: 1018 | resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} 1019 | engines: {node: '>=8'} 1020 | dependencies: 1021 | path-key: 3.1.1 1022 | dev: true 1023 | 1024 | /object-assign/4.1.1: 1025 | resolution: {integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=} 1026 | engines: {node: '>=0.10.0'} 1027 | dev: true 1028 | 1029 | /once/1.4.0: 1030 | resolution: {integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=} 1031 | dependencies: 1032 | wrappy: 1.0.2 1033 | dev: true 1034 | 1035 | /onetime/5.1.2: 1036 | resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} 1037 | engines: {node: '>=6'} 1038 | dependencies: 1039 | mimic-fn: 2.1.0 1040 | dev: true 1041 | 1042 | /open/7.4.2: 1043 | resolution: {integrity: sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==} 1044 | engines: {node: '>=8'} 1045 | dependencies: 1046 | is-docker: 2.2.1 1047 | is-wsl: 2.2.0 1048 | dev: true 1049 | 1050 | /os-tmpdir/1.0.2: 1051 | resolution: {integrity: sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=} 1052 | engines: {node: '>=0.10.0'} 1053 | dev: true 1054 | 1055 | /parent-module/1.0.1: 1056 | resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} 1057 | engines: {node: '>=6'} 1058 | dependencies: 1059 | callsites: 3.1.0 1060 | dev: true 1061 | 1062 | /parse-json/5.2.0: 1063 | resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} 1064 | engines: {node: '>=8'} 1065 | dependencies: 1066 | '@babel/code-frame': 7.12.13 1067 | error-ex: 1.3.2 1068 | json-parse-even-better-errors: 2.3.1 1069 | lines-and-columns: 1.1.6 1070 | dev: true 1071 | 1072 | /path-is-absolute/1.0.1: 1073 | resolution: {integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18=} 1074 | engines: {node: '>=0.10.0'} 1075 | dev: true 1076 | 1077 | /path-key/2.0.1: 1078 | resolution: {integrity: sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=} 1079 | engines: {node: '>=4'} 1080 | dev: true 1081 | 1082 | /path-key/3.1.1: 1083 | resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} 1084 | engines: {node: '>=8'} 1085 | dev: true 1086 | 1087 | /path-parse/1.0.7: 1088 | resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} 1089 | dev: true 1090 | 1091 | /path-type/4.0.0: 1092 | resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} 1093 | engines: {node: '>=8'} 1094 | dev: true 1095 | 1096 | /pathval/1.1.1: 1097 | resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} 1098 | dev: true 1099 | 1100 | /picocolors/1.0.0: 1101 | resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} 1102 | dev: true 1103 | 1104 | /picomatch/2.3.0: 1105 | resolution: {integrity: sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==} 1106 | engines: {node: '>=8.6'} 1107 | dev: true 1108 | 1109 | /pirates/4.0.1: 1110 | resolution: {integrity: sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==} 1111 | engines: {node: '>= 6'} 1112 | dependencies: 1113 | node-modules-regexp: 1.0.0 1114 | dev: true 1115 | 1116 | /postcss-load-config/3.0.1: 1117 | resolution: {integrity: sha512-/pDHe30UYZUD11IeG8GWx9lNtu1ToyTsZHnyy45B4Mrwr/Kb6NgYl7k753+05CJNKnjbwh4975amoPJ+TEjHNQ==} 1118 | engines: {node: '>= 10'} 1119 | dependencies: 1120 | cosmiconfig: 7.0.0 1121 | import-cwd: 3.0.0 1122 | dev: true 1123 | 1124 | /postcss/8.4.5: 1125 | resolution: {integrity: sha512-jBDboWM8qpaqwkMwItqTQTiFikhs/67OYVvblFFTM7MrZjt6yMKd6r2kgXizEbTTljacm4NldIlZnhbjr84QYg==} 1126 | engines: {node: ^10 || ^12 || >=14} 1127 | dependencies: 1128 | nanoid: 3.1.30 1129 | picocolors: 1.0.0 1130 | source-map-js: 1.0.1 1131 | dev: true 1132 | 1133 | /prettier/2.5.1: 1134 | resolution: {integrity: sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==} 1135 | engines: {node: '>=10.13.0'} 1136 | hasBin: true 1137 | dev: true 1138 | 1139 | /queue-microtask/1.2.2: 1140 | resolution: {integrity: sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg==} 1141 | dev: true 1142 | 1143 | /react/17.0.2: 1144 | resolution: {integrity: sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==} 1145 | engines: {node: '>=0.10.0'} 1146 | dependencies: 1147 | loose-envify: 1.4.0 1148 | object-assign: 4.1.1 1149 | dev: true 1150 | 1151 | /readdirp/3.5.0: 1152 | resolution: {integrity: sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==} 1153 | engines: {node: '>=8.10.0'} 1154 | dependencies: 1155 | picomatch: 2.3.0 1156 | dev: true 1157 | 1158 | /resolve-from/4.0.0: 1159 | resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} 1160 | engines: {node: '>=4'} 1161 | dev: true 1162 | 1163 | /resolve-from/5.0.0: 1164 | resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} 1165 | engines: {node: '>=8'} 1166 | dev: true 1167 | 1168 | /resolve/1.20.0: 1169 | resolution: {integrity: sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==} 1170 | dependencies: 1171 | is-core-module: 2.8.0 1172 | path-parse: 1.0.7 1173 | dev: true 1174 | 1175 | /reusify/1.0.4: 1176 | resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} 1177 | engines: {iojs: '>=1.0.0', node: '>=0.10.0'} 1178 | dev: true 1179 | 1180 | /rimraf/2.7.1: 1181 | resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} 1182 | hasBin: true 1183 | dependencies: 1184 | glob: 7.1.6 1185 | dev: true 1186 | 1187 | /rollup/2.60.0: 1188 | resolution: {integrity: sha512-cHdv9GWd58v58rdseC8e8XIaPUo8a9cgZpnCMMDGZFDZKEODOiPPEQFXLriWr/TjXzhPPmG5bkAztPsOARIcGQ==} 1189 | engines: {node: '>=10.0.0'} 1190 | hasBin: true 1191 | optionalDependencies: 1192 | fsevents: 2.3.2 1193 | dev: true 1194 | 1195 | /run-parallel/1.2.0: 1196 | resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} 1197 | dependencies: 1198 | queue-microtask: 1.2.2 1199 | dev: true 1200 | 1201 | /semver/5.7.1: 1202 | resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} 1203 | hasBin: true 1204 | dev: true 1205 | 1206 | /shebang-command/1.2.0: 1207 | resolution: {integrity: sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=} 1208 | engines: {node: '>=0.10.0'} 1209 | dependencies: 1210 | shebang-regex: 1.0.0 1211 | dev: true 1212 | 1213 | /shebang-command/2.0.0: 1214 | resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} 1215 | engines: {node: '>=8'} 1216 | dependencies: 1217 | shebang-regex: 3.0.0 1218 | dev: true 1219 | 1220 | /shebang-regex/1.0.0: 1221 | resolution: {integrity: sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=} 1222 | engines: {node: '>=0.10.0'} 1223 | dev: true 1224 | 1225 | /shebang-regex/3.0.0: 1226 | resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} 1227 | engines: {node: '>=8'} 1228 | dev: true 1229 | 1230 | /shlex/2.1.0: 1231 | resolution: {integrity: sha512-Tk8PjohJbWpGu2NtAlsEi/9AS4GU2zW2ZWLFrWRDskZpSJmyBIU3nTkBtocxD90r3w4BwRevsNtIqIP9HMuYiQ==} 1232 | dev: true 1233 | 1234 | /signal-exit/3.0.3: 1235 | resolution: {integrity: sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==} 1236 | dev: true 1237 | 1238 | /slash/2.0.0: 1239 | resolution: {integrity: sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==} 1240 | engines: {node: '>=6'} 1241 | dev: true 1242 | 1243 | /slash/3.0.0: 1244 | resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} 1245 | engines: {node: '>=8'} 1246 | dev: true 1247 | 1248 | /source-map-js/1.0.1: 1249 | resolution: {integrity: sha512-4+TN2b3tqOCd/kaGRJ/sTYA0tR0mdXx26ipdolxcwtJVqEnqNYvlCAt1q3ypy4QMlYus+Zh34RNtYLoq2oQ4IA==} 1250 | engines: {node: '>=0.10.0'} 1251 | dev: true 1252 | 1253 | /source-map/0.7.3: 1254 | resolution: {integrity: sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==} 1255 | engines: {node: '>= 8'} 1256 | dev: true 1257 | 1258 | /strip-final-newline/2.0.0: 1259 | resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} 1260 | engines: {node: '>=6'} 1261 | dev: true 1262 | 1263 | /sucrase/3.20.3: 1264 | resolution: {integrity: sha512-azqwq0/Bs6RzLAdb4dXxsCgMtAaD2hzmUr4UhSfsxO46JFPAwMnnb441B/qsudZiS6Ylea3JXZe3Q497lsgXzQ==} 1265 | engines: {node: '>=8'} 1266 | hasBin: true 1267 | dependencies: 1268 | commander: 4.1.1 1269 | glob: 7.1.6 1270 | lines-and-columns: 1.1.6 1271 | mz: 2.7.0 1272 | pirates: 4.0.1 1273 | ts-interface-checker: 0.1.13 1274 | dev: true 1275 | 1276 | /supports-color/5.5.0: 1277 | resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} 1278 | engines: {node: '>=4'} 1279 | dependencies: 1280 | has-flag: 3.0.0 1281 | dev: true 1282 | 1283 | /thenify-all/1.6.0: 1284 | resolution: {integrity: sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=} 1285 | engines: {node: '>=0.8'} 1286 | dependencies: 1287 | thenify: 3.3.1 1288 | dev: true 1289 | 1290 | /thenify/3.3.1: 1291 | resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} 1292 | dependencies: 1293 | any-promise: 1.3.0 1294 | dev: true 1295 | 1296 | /tinypool/0.1.2: 1297 | resolution: {integrity: sha512-fvtYGXoui2RpeMILfkvGIgOVkzJEGediv8UJt7TxdAOY8pnvUkFg/fkvqTfXG9Acc9S17Cnn1S4osDc2164guA==} 1298 | engines: {node: '>=14.0.0'} 1299 | dev: true 1300 | 1301 | /tinyspy/0.3.0: 1302 | resolution: {integrity: sha512-c5uFHqtUp74R2DJE3/Efg0mH5xicmgziaQXMm/LvuuZn3RdpADH32aEGDRyCzObXT1DNfwDMqRQ/Drh1MlO12g==} 1303 | engines: {node: '>=14.0.0'} 1304 | dev: true 1305 | 1306 | /tmp/0.0.33: 1307 | resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} 1308 | engines: {node: '>=0.6.0'} 1309 | dependencies: 1310 | os-tmpdir: 1.0.2 1311 | dev: true 1312 | 1313 | /to-regex-range/5.0.1: 1314 | resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} 1315 | engines: {node: '>=8.0'} 1316 | dependencies: 1317 | is-number: 7.0.0 1318 | dev: true 1319 | 1320 | /tree-kill/1.2.2: 1321 | resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} 1322 | hasBin: true 1323 | dev: true 1324 | 1325 | /ts-interface-checker/0.1.13: 1326 | resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} 1327 | dev: true 1328 | 1329 | /tsup/5.12.1_typescript@4.6.2: 1330 | resolution: {integrity: sha512-vI7E4T6+6n5guQ9UKUOkQmzd1n4V9abGK71lbnzJMLJspbkNby5zlwWvgvHafLdYCb1WXpjFuqqmNLjBA0Wz3g==} 1331 | hasBin: true 1332 | peerDependencies: 1333 | typescript: ^4.1.0 1334 | peerDependenciesMeta: 1335 | typescript: 1336 | optional: true 1337 | dependencies: 1338 | bundle-require: 3.0.4_esbuild@0.14.2 1339 | cac: 6.7.12 1340 | chokidar: 3.5.1 1341 | debug: 4.3.1 1342 | esbuild: 0.14.2 1343 | execa: 5.0.0 1344 | globby: 11.0.4 1345 | joycon: 3.0.1 1346 | postcss-load-config: 3.0.1 1347 | resolve-from: 5.0.0 1348 | rollup: 2.60.0 1349 | source-map: 0.7.3 1350 | sucrase: 3.20.3 1351 | tree-kill: 1.2.2 1352 | typescript: 4.6.2 1353 | transitivePeerDependencies: 1354 | - supports-color 1355 | dev: true 1356 | 1357 | /type-detect/4.0.8: 1358 | resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} 1359 | engines: {node: '>=4'} 1360 | dev: true 1361 | 1362 | /typescript/4.6.2: 1363 | resolution: {integrity: sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==} 1364 | engines: {node: '>=4.2.0'} 1365 | hasBin: true 1366 | dev: true 1367 | 1368 | /universalify/0.1.2: 1369 | resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} 1370 | engines: {node: '>= 4.0.0'} 1371 | dev: true 1372 | 1373 | /vite/2.7.13: 1374 | resolution: {integrity: sha512-Mq8et7f3aK0SgSxjDNfOAimZGW9XryfHRa/uV0jseQSilg+KhYDSoNb9h1rknOy6SuMkvNDLKCYAYYUMCE+IgQ==} 1375 | engines: {node: '>=12.2.0'} 1376 | hasBin: true 1377 | peerDependencies: 1378 | less: '*' 1379 | sass: '*' 1380 | stylus: '*' 1381 | peerDependenciesMeta: 1382 | less: 1383 | optional: true 1384 | sass: 1385 | optional: true 1386 | stylus: 1387 | optional: true 1388 | dependencies: 1389 | esbuild: 0.13.15 1390 | postcss: 8.4.5 1391 | resolve: 1.20.0 1392 | rollup: 2.60.0 1393 | optionalDependencies: 1394 | fsevents: 2.3.2 1395 | dev: true 1396 | 1397 | /vitest/0.6.1: 1398 | resolution: {integrity: sha512-rgHgTO3xHCrbgmqYdUz4ViO0g2ekHeOfV60J6+1c6Ypzk1EqCE2sN8IpF4TDGs6BOvWIsVd/ob5c6U4Ozzu92g==} 1399 | engines: {node: '>=14.14.0'} 1400 | hasBin: true 1401 | peerDependencies: 1402 | '@vitest/ui': '*' 1403 | c8: '*' 1404 | happy-dom: '*' 1405 | jsdom: '*' 1406 | peerDependenciesMeta: 1407 | '@vitest/ui': 1408 | optional: true 1409 | c8: 1410 | optional: true 1411 | happy-dom: 1412 | optional: true 1413 | jsdom: 1414 | optional: true 1415 | dependencies: 1416 | '@types/chai': 4.3.0 1417 | '@types/chai-subset': 1.3.3 1418 | chai: 4.3.6 1419 | local-pkg: 0.4.1 1420 | tinypool: 0.1.2 1421 | tinyspy: 0.3.0 1422 | vite: 2.7.13 1423 | transitivePeerDependencies: 1424 | - less 1425 | - sass 1426 | - stylus 1427 | dev: true 1428 | 1429 | /which/1.3.1: 1430 | resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} 1431 | hasBin: true 1432 | dependencies: 1433 | isexe: 2.0.0 1434 | dev: true 1435 | 1436 | /which/2.0.2: 1437 | resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} 1438 | engines: {node: '>= 8'} 1439 | hasBin: true 1440 | dependencies: 1441 | isexe: 2.0.0 1442 | dev: true 1443 | 1444 | /wrappy/1.0.2: 1445 | resolution: {integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=} 1446 | dev: true 1447 | 1448 | /yaml/1.10.2: 1449 | resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} 1450 | engines: {node: '>= 6'} 1451 | dev: true 1452 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /src/index.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import { cva, cx } from "class-variance-authority" 3 | 4 | import type { 5 | VariantProps, 6 | ClassProp, 7 | VariantsSchema, 8 | VariantsConfig, 9 | ClassValue, 10 | } from "class-variance-authority" 11 | 12 | export { 13 | VariantProps, 14 | ClassProp, 15 | VariantsSchema, 16 | VariantsConfig, 17 | ClassValue, 18 | cx 19 | } 20 | 21 | export type IntrinsicElementsKeys = keyof JSX.IntrinsicElements 22 | 23 | import { Props, Component, Options } from "./types" 24 | 25 | type VariantOBJ = 26 | | (Variants extends VariantsSchema 27 | ? VariantsConfig & ClassProp 28 | : ClassProp) 29 | | undefined 30 | 31 | export function styled(Tag: T) { 32 | return function wrapper( 33 | base?: ClassValue, 34 | config?: 35 | | (Variants extends VariantsSchema 36 | ? { 37 | variants?: Variants | undefined 38 | defaultVariants?: VariantsConfig | undefined 39 | compoundVariants?: 40 | | (Variants extends VariantsSchema 41 | ? VariantsConfig & ClassProp 42 | : ClassProp)[] 43 | | undefined 44 | } 45 | : never) 46 | | undefined, 47 | ) { 48 | const classes = cva(base, config) 49 | 50 | function createComponent( 51 | render: (props: Props) => JSX.Element | null, 52 | ) { 53 | const Role = (props: Props, ref: React.Ref) => 54 | render({ ref, ...props }) 55 | return React.forwardRef(Role) as unknown as Component 56 | } 57 | 58 | type ComponentProps = Omit, "class"> & { 59 | as?: T 60 | className?: string 61 | } 62 | const Component = createComponent((props) => { 63 | let _props = Object.assign({}, props) as typeof props 64 | 65 | if (config && config.variants) { 66 | const keys = Object.keys(config.variants) 67 | let _variants: VariantOBJ = { 68 | class: props.className, 69 | } 70 | for (let index = 0; index < keys.length; index++) { 71 | const key = keys[index] 72 | if (_props[key] !== undefined) { 73 | _variants[key] = _props[key] 74 | delete _props[key] 75 | } 76 | } 77 | 78 | _props.className = cx(classes(_variants as any)) 79 | } else { 80 | _props.className = cx(classes(), props.className) 81 | } 82 | 83 | let Comp = Tag as any 84 | 85 | if (_props.as) { 86 | Comp = _props.as 87 | delete _props.as 88 | } 89 | 90 | return 91 | }) 92 | 93 | return Component 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /src/types.ts: -------------------------------------------------------------------------------- 1 | // credit https://github.com/ariakit/ariakit/blob/main/packages/ariakit-utils/src/types.ts 2 | 3 | import { 4 | ComponentPropsWithRef, 5 | ElementType, 6 | HTMLAttributes, 7 | ReactNode, 8 | RefAttributes, 9 | } from "react" 10 | 11 | /** 12 | * Any object. 13 | */ 14 | export type AnyObject = Record 15 | 16 | /** 17 | * Render prop type. 18 | * @template P Props 19 | * @example 20 | * const children: RenderProp = (props) =>
; 21 | */ 22 | export type RenderProp

= (props: P) => JSX.Element | null 23 | 24 | /** 25 | * The `as` prop. 26 | * @template P Props 27 | */ 28 | export type As

= ElementType

29 | 30 | /** 31 | * The `children` prop that supports a function. 32 | * @template T Element type. 33 | */ 34 | export type Children = 35 | | ReactNode 36 | | RenderProp & RefAttributes> 37 | 38 | /** 39 | * Props with the `as` prop. 40 | * @template T The `as` prop 41 | * @example 42 | * type ButtonOptions = Options<"button">; 43 | */ 44 | export type Options = { as?: T } 45 | 46 | /** 47 | * Props that automatically includes HTML props based on the `as` prop. 48 | * @template O Options 49 | * @example 50 | * type ButtonHTMLProps = HTMLProps>; 51 | */ 52 | export type HTMLProps = { 53 | children?: Children 54 | } & Omit>, keyof O> 55 | 56 | /** 57 | * Options & HTMLProps 58 | * @template O Options 59 | * @example 60 | * type ButtonProps = Props>; 61 | */ 62 | export type Props = O & HTMLProps 63 | 64 | /** 65 | * A component that supports the `as` prop and the `children` prop as a 66 | * function. 67 | * @template O Options 68 | * @example 69 | * type ButtonComponent = Component>; 70 | */ 71 | export type Component = { 72 | ( 73 | props: Omit & 74 | Omit>, keyof O> & 75 | Required>, 76 | ): JSX.Element | null 77 | (props: Props): JSX.Element | null 78 | displayName?: string 79 | } 80 | -------------------------------------------------------------------------------- /test/index.test.ts: -------------------------------------------------------------------------------- 1 | import { test, assert } from "vitest" 2 | 3 | test("simple", () => { 4 | assert.equal("foo", "foo") 5 | }) 6 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "jsx": "react", 4 | "target": "es2020", 5 | "module": "esnext", 6 | "strict": true, 7 | "esModuleInterop": true, 8 | "moduleResolution": "node", 9 | "skipLibCheck": true, 10 | "noUnusedLocals": true, 11 | "noImplicitAny": true, 12 | "allowJs": true, 13 | "resolveJsonModule": true 14 | } 15 | } 16 | --------------------------------------------------------------------------------