├── .gitignore ├── .npmignore ├── .prettierrc ├── LICENSE ├── README.md ├── h └── package.json ├── html └── package.json ├── jsx-runtime.d.ts ├── package-lock.json ├── package.json ├── rollup.config.js ├── src ├── client.d.ts ├── client.js ├── core.ts ├── h.ts ├── html.ts ├── index.ts ├── jsx.d.ts └── lib.ts └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | lib/ 3 | dist/ 4 | types/ -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | src/ 2 | types/tsconfig.tsbuildinfo 3 | *.config.js 4 | tsconfig.json -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "none", 3 | "tabWidth": 2, 4 | "semi": true, 5 | "singleQuote": false, 6 | "arrowParens": "avoid", 7 | "printWidth": 100 8 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018-19 Ryan Carniato 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MobX JSX 2 | 3 | This library is a demonstration of how MobX fine grain control can be leveraged directly in JSX for considerably better performance than pairing it with a Virtual DOM library. Even the fastest Virtual DOM library will have overhead when reconciling many small discrete changes into a scheduled render and patch. 4 | 5 | Check out MobX JSX performance near the top of the charts on the [JS Frameworks Benchmark](https://github.com/krausest/js-framework-benchmark). 6 | 7 | It accomplishes this with using [Babel Plugin JSX DOM Expressions](https://github.com/ryansolid/dom-expressions/tree/master/packages/babel-plugin-jsx-dom-expressions). It compiles JSX to DOM statements and wraps expressions in functions that can be called by the library of choice. In this case `autorun` wraps these expressions ensuring the view stays up to date. Unlike Virtual DOM only the changed nodes are affected and the whole tree is not re-rendered over and over. 8 | 9 | ## Usage 10 | 11 | To use call render as follow 12 | 13 | ```js 14 | import { render } from "mobx-jsx"; 15 | 16 | render(App, document.getElementById("main")); 17 | ``` 18 | 19 | And include 'babel-plugin-jsx-dom-expressions' in your babelrc, webpack babel loader, or rollup babel plugin. 20 | 21 | ```js 22 | "plugins": [["babel-plugin-jsx-dom-expressions", {moduleName: 'mobx-jsx'}]] 23 | ``` 24 | 25 | See [plugin options](https://github.com/ryansolid/dom-expressions/tree/master/packages/babel-plugin-jsx-dom-expressions#plugin-options) 26 | 27 | For TS JSX types add to your `tsconfig.json`: 28 | 29 | ```js 30 | "jsx": "preserve", 31 | "jsxImportSource": "mobx-jsx" 32 | ``` 33 | 34 | ## Installation 35 | 36 | ```sh 37 | > npm install mobx-jsx babel-plugin-jsx-dom-expressions 38 | ``` 39 | 40 | ## Examples 41 | 42 | - [Counter Using Functions](https://codesandbox.io/s/mobx-counterfunctions-3sqv1) 43 | - [Counter Using Classes](https://codesandbox.io/s/mobx-counterclasses-uz7g9) 44 | - [Lazy Loading](https://codesandbox.io/s/mobx-lazy-demo-ev95s) 45 | - [Context](https://codesandbox.io/s/mobx-counter-context-wlu1x) 46 | 47 | ## API 48 | 49 | MobX JSX works both with function and Class components (extend Component from this library). 50 | 51 | ### Map For Observable Arrays 52 | 53 | Ships a specialize map function for optimal list rendering that takes an observable array as it's first argument. To avoid re-rendering the complete list on changes. 54 | 55 | ```jsx 56 | import { map } from "mobx-jsx"; 57 | 58 | const list = observable(["Alpha", "Beta", "Gamma"]); 59 | 60 | ; 65 | ``` 66 | 67 | ### Lifecycles 68 | 69 | Unlike React `render` only runs once, so you may not need to split in functions or methods your Lifecycles, all the initialization code could be set on `render`. See the issue [Lifecycles](https://github.com/ryansolid/mobx-jsx/issues/23) for further information. 70 | 71 | However, you may emulate `componentDidMount` and `componentWillUnmount`. The microtask `Promise` resolution will be after mount and `cleanup` runs at the beginning of re-evaluation so the elements aren't removed yet. 72 | 73 | #### Example 74 | 75 | ```jsx 76 | import { render, cleanup, Component as _Component } from "mobx-jsx"; 77 | 78 | class Component extends _Component { 79 | constructor(props) { 80 | super(props); 81 | if (this.componentDidMount) { 82 | Promise.resolve().then(() => this.componentDidMount()); 83 | } 84 | if (this.componentWillUnmount) { 85 | cleanup(() => this.componentWillUnmount()); 86 | } 87 | } 88 | } 89 | 90 | class App extends Component { 91 | componentDidMount() { 92 | console.log("componentDidMount"); 93 | } 94 | componentWillUnmount() { 95 | console.log("componentWillUnmount"); 96 | } 97 | } 98 | ``` 99 | 100 | ### Mounting 101 | 102 | Mounting can be done by functions and not class components. However you may use an arrow function as follows: 103 | 104 | ```jsx 105 | import { render, Component } from "mobx-jsx"; 106 | 107 | class App extends Component { 108 | render() { 109 | return
Mounted
110 | } 111 | } 112 | 113 | render(() => , document.body); 114 | ``` 115 | 116 | ### References 117 | 118 | `ref` assigns to a variable. 119 | 120 | 121 | ```jsx 122 | let elRef; 123 | Promise.resolve().then(() => elRef.clientWidth); 124 |
125 | ``` 126 | 127 | Note: Promise.resolve().then is used as `mount` see the issue [Lifecycles](https://github.com/ryansolid/mobx-jsx/issues/23) for further information. 128 | 129 | ### Lazily Loading a Component 130 | 131 | ```jsx 132 | import { render, lazy } from "mobx-jsx"; 133 | 134 | // use lazy to allow code splitting 135 | const SomeComponent = lazy(() => import("./SomeComponent")); 136 | 137 | function App() { 138 | return ( 139 | <> 140 | 141 | 142 | ); 143 | } 144 | 145 | render(App, document.body); 146 | ``` 147 | 148 | ### MobX JSX also supports a Context API. 149 | 150 | ## Non-precompiled environments 151 | 152 | Alternatively supports Tagged Template Literals or HyperScript for non-precompiled environments by installing the companion library and including variants: 153 | 154 | ```js 155 | import { html } from "mobx-jsx/html"; // or 156 | import { h } from "mobx-jsx/h"; 157 | ``` 158 | 159 | There is a small performance overhead of using these runtimes but the performance is still very impressive. Tagged Template solution is much more performant that the HyperScript version, but HyperScript opens up compatibility with some companion tooling like: 160 | 161 | - [HyperScript Helpers](https://github.com/ohanhi/hyperscript-helpers) Use an element as functions DSL 162 | - [Babel Plugin HTM](https://github.com/developit/htm/tree/master/packages/babel-plugin-htm) Transpile Tagged Template Literals to HyperScript for IE11 compatibility 163 | 164 | Further documentation available at: [Lit DOM Expressions](https://github.com/ryansolid/lit-dom-expressions) and [Hyper DOM Expressions](https://github.com/ryansolid/hyper-dom-expressions). 165 | -------------------------------------------------------------------------------- /h/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mobx-jsx/h", 3 | "main": "../lib/h.js", 4 | "module": "../dist/h.js", 5 | "types": "../types/h.d.ts", 6 | "sideEffects": false 7 | } -------------------------------------------------------------------------------- /html/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mobx-jsx/html", 3 | "main": "../lib/html.js", 4 | "module": "../dist/html.js", 5 | "types": "../types/html.d.ts", 6 | "sideEffects": false 7 | } -------------------------------------------------------------------------------- /jsx-runtime.d.ts: -------------------------------------------------------------------------------- 1 | export * from "./types/jsx" -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mobx-jsx", 3 | "version": "0.16.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "mobx-jsx", 9 | "version": "0.16.0", 10 | "license": "MIT", 11 | "dependencies": { 12 | "csstype": "^3.1.0" 13 | }, 14 | "devDependencies": { 15 | "@babel/core": "7.19.3", 16 | "@babel/preset-typescript": "7.18.6", 17 | "@rollup/plugin-babel": "5.3.1", 18 | "@rollup/plugin-node-resolve": "14.1.0", 19 | "dom-expressions": "0.34.12", 20 | "hyper-dom-expressions": "0.34.12", 21 | "lit-dom-expressions": "0.34.12", 22 | "mobx": "^6.6.2", 23 | "ncp": "2.0.0", 24 | "rollup": "^2.41.4", 25 | "typescript": "4.8.4" 26 | }, 27 | "peerDependencies": { 28 | "mobx": "> 6.0.0" 29 | } 30 | }, 31 | "node_modules/@ampproject/remapping": { 32 | "version": "2.2.0", 33 | "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", 34 | "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", 35 | "dev": true, 36 | "dependencies": { 37 | "@jridgewell/gen-mapping": "^0.1.0", 38 | "@jridgewell/trace-mapping": "^0.3.9" 39 | }, 40 | "engines": { 41 | "node": ">=6.0.0" 42 | } 43 | }, 44 | "node_modules/@babel/code-frame": { 45 | "version": "7.18.6", 46 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", 47 | "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", 48 | "dev": true, 49 | "dependencies": { 50 | "@babel/highlight": "^7.18.6" 51 | }, 52 | "engines": { 53 | "node": ">=6.9.0" 54 | } 55 | }, 56 | "node_modules/@babel/compat-data": { 57 | "version": "7.19.3", 58 | "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.3.tgz", 59 | "integrity": "sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw==", 60 | "dev": true, 61 | "engines": { 62 | "node": ">=6.9.0" 63 | } 64 | }, 65 | "node_modules/@babel/core": { 66 | "version": "7.19.3", 67 | "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz", 68 | "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==", 69 | "dev": true, 70 | "dependencies": { 71 | "@ampproject/remapping": "^2.1.0", 72 | "@babel/code-frame": "^7.18.6", 73 | "@babel/generator": "^7.19.3", 74 | "@babel/helper-compilation-targets": "^7.19.3", 75 | "@babel/helper-module-transforms": "^7.19.0", 76 | "@babel/helpers": "^7.19.0", 77 | "@babel/parser": "^7.19.3", 78 | "@babel/template": "^7.18.10", 79 | "@babel/traverse": "^7.19.3", 80 | "@babel/types": "^7.19.3", 81 | "convert-source-map": "^1.7.0", 82 | "debug": "^4.1.0", 83 | "gensync": "^1.0.0-beta.2", 84 | "json5": "^2.2.1", 85 | "semver": "^6.3.0" 86 | }, 87 | "engines": { 88 | "node": ">=6.9.0" 89 | }, 90 | "funding": { 91 | "type": "opencollective", 92 | "url": "https://opencollective.com/babel" 93 | } 94 | }, 95 | "node_modules/@babel/generator": { 96 | "version": "7.19.3", 97 | "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", 98 | "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", 99 | "dev": true, 100 | "dependencies": { 101 | "@babel/types": "^7.19.3", 102 | "@jridgewell/gen-mapping": "^0.3.2", 103 | "jsesc": "^2.5.1" 104 | }, 105 | "engines": { 106 | "node": ">=6.9.0" 107 | } 108 | }, 109 | "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { 110 | "version": "0.3.2", 111 | "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", 112 | "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", 113 | "dev": true, 114 | "dependencies": { 115 | "@jridgewell/set-array": "^1.0.1", 116 | "@jridgewell/sourcemap-codec": "^1.4.10", 117 | "@jridgewell/trace-mapping": "^0.3.9" 118 | }, 119 | "engines": { 120 | "node": ">=6.0.0" 121 | } 122 | }, 123 | "node_modules/@babel/helper-annotate-as-pure": { 124 | "version": "7.18.6", 125 | "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", 126 | "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", 127 | "dev": true, 128 | "dependencies": { 129 | "@babel/types": "^7.18.6" 130 | }, 131 | "engines": { 132 | "node": ">=6.9.0" 133 | } 134 | }, 135 | "node_modules/@babel/helper-compilation-targets": { 136 | "version": "7.19.3", 137 | "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz", 138 | "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==", 139 | "dev": true, 140 | "dependencies": { 141 | "@babel/compat-data": "^7.19.3", 142 | "@babel/helper-validator-option": "^7.18.6", 143 | "browserslist": "^4.21.3", 144 | "semver": "^6.3.0" 145 | }, 146 | "engines": { 147 | "node": ">=6.9.0" 148 | }, 149 | "peerDependencies": { 150 | "@babel/core": "^7.0.0" 151 | } 152 | }, 153 | "node_modules/@babel/helper-create-class-features-plugin": { 154 | "version": "7.19.0", 155 | "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.19.0.tgz", 156 | "integrity": "sha512-NRz8DwF4jT3UfrmUoZjd0Uph9HQnP30t7Ash+weACcyNkiYTywpIjDBgReJMKgr+n86sn2nPVVmJ28Dm053Kqw==", 157 | "dev": true, 158 | "dependencies": { 159 | "@babel/helper-annotate-as-pure": "^7.18.6", 160 | "@babel/helper-environment-visitor": "^7.18.9", 161 | "@babel/helper-function-name": "^7.19.0", 162 | "@babel/helper-member-expression-to-functions": "^7.18.9", 163 | "@babel/helper-optimise-call-expression": "^7.18.6", 164 | "@babel/helper-replace-supers": "^7.18.9", 165 | "@babel/helper-split-export-declaration": "^7.18.6" 166 | }, 167 | "engines": { 168 | "node": ">=6.9.0" 169 | }, 170 | "peerDependencies": { 171 | "@babel/core": "^7.0.0" 172 | } 173 | }, 174 | "node_modules/@babel/helper-environment-visitor": { 175 | "version": "7.18.9", 176 | "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", 177 | "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", 178 | "dev": true, 179 | "engines": { 180 | "node": ">=6.9.0" 181 | } 182 | }, 183 | "node_modules/@babel/helper-function-name": { 184 | "version": "7.19.0", 185 | "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", 186 | "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", 187 | "dev": true, 188 | "dependencies": { 189 | "@babel/template": "^7.18.10", 190 | "@babel/types": "^7.19.0" 191 | }, 192 | "engines": { 193 | "node": ">=6.9.0" 194 | } 195 | }, 196 | "node_modules/@babel/helper-hoist-variables": { 197 | "version": "7.18.6", 198 | "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", 199 | "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", 200 | "dev": true, 201 | "dependencies": { 202 | "@babel/types": "^7.18.6" 203 | }, 204 | "engines": { 205 | "node": ">=6.9.0" 206 | } 207 | }, 208 | "node_modules/@babel/helper-member-expression-to-functions": { 209 | "version": "7.18.9", 210 | "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz", 211 | "integrity": "sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==", 212 | "dev": true, 213 | "dependencies": { 214 | "@babel/types": "^7.18.9" 215 | }, 216 | "engines": { 217 | "node": ">=6.9.0" 218 | } 219 | }, 220 | "node_modules/@babel/helper-module-imports": { 221 | "version": "7.18.6", 222 | "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", 223 | "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", 224 | "dev": true, 225 | "dependencies": { 226 | "@babel/types": "^7.18.6" 227 | }, 228 | "engines": { 229 | "node": ">=6.9.0" 230 | } 231 | }, 232 | "node_modules/@babel/helper-module-transforms": { 233 | "version": "7.19.0", 234 | "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", 235 | "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", 236 | "dev": true, 237 | "dependencies": { 238 | "@babel/helper-environment-visitor": "^7.18.9", 239 | "@babel/helper-module-imports": "^7.18.6", 240 | "@babel/helper-simple-access": "^7.18.6", 241 | "@babel/helper-split-export-declaration": "^7.18.6", 242 | "@babel/helper-validator-identifier": "^7.18.6", 243 | "@babel/template": "^7.18.10", 244 | "@babel/traverse": "^7.19.0", 245 | "@babel/types": "^7.19.0" 246 | }, 247 | "engines": { 248 | "node": ">=6.9.0" 249 | } 250 | }, 251 | "node_modules/@babel/helper-optimise-call-expression": { 252 | "version": "7.18.6", 253 | "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", 254 | "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", 255 | "dev": true, 256 | "dependencies": { 257 | "@babel/types": "^7.18.6" 258 | }, 259 | "engines": { 260 | "node": ">=6.9.0" 261 | } 262 | }, 263 | "node_modules/@babel/helper-plugin-utils": { 264 | "version": "7.19.0", 265 | "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", 266 | "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", 267 | "dev": true, 268 | "engines": { 269 | "node": ">=6.9.0" 270 | } 271 | }, 272 | "node_modules/@babel/helper-replace-supers": { 273 | "version": "7.19.1", 274 | "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.19.1.tgz", 275 | "integrity": "sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw==", 276 | "dev": true, 277 | "dependencies": { 278 | "@babel/helper-environment-visitor": "^7.18.9", 279 | "@babel/helper-member-expression-to-functions": "^7.18.9", 280 | "@babel/helper-optimise-call-expression": "^7.18.6", 281 | "@babel/traverse": "^7.19.1", 282 | "@babel/types": "^7.19.0" 283 | }, 284 | "engines": { 285 | "node": ">=6.9.0" 286 | } 287 | }, 288 | "node_modules/@babel/helper-simple-access": { 289 | "version": "7.18.6", 290 | "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", 291 | "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", 292 | "dev": true, 293 | "dependencies": { 294 | "@babel/types": "^7.18.6" 295 | }, 296 | "engines": { 297 | "node": ">=6.9.0" 298 | } 299 | }, 300 | "node_modules/@babel/helper-split-export-declaration": { 301 | "version": "7.18.6", 302 | "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", 303 | "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", 304 | "dev": true, 305 | "dependencies": { 306 | "@babel/types": "^7.18.6" 307 | }, 308 | "engines": { 309 | "node": ">=6.9.0" 310 | } 311 | }, 312 | "node_modules/@babel/helper-string-parser": { 313 | "version": "7.18.10", 314 | "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", 315 | "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", 316 | "dev": true, 317 | "engines": { 318 | "node": ">=6.9.0" 319 | } 320 | }, 321 | "node_modules/@babel/helper-validator-identifier": { 322 | "version": "7.19.1", 323 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", 324 | "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", 325 | "dev": true, 326 | "engines": { 327 | "node": ">=6.9.0" 328 | } 329 | }, 330 | "node_modules/@babel/helper-validator-option": { 331 | "version": "7.18.6", 332 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", 333 | "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", 334 | "dev": true, 335 | "engines": { 336 | "node": ">=6.9.0" 337 | } 338 | }, 339 | "node_modules/@babel/helpers": { 340 | "version": "7.19.0", 341 | "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", 342 | "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", 343 | "dev": true, 344 | "dependencies": { 345 | "@babel/template": "^7.18.10", 346 | "@babel/traverse": "^7.19.0", 347 | "@babel/types": "^7.19.0" 348 | }, 349 | "engines": { 350 | "node": ">=6.9.0" 351 | } 352 | }, 353 | "node_modules/@babel/highlight": { 354 | "version": "7.18.6", 355 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", 356 | "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", 357 | "dev": true, 358 | "dependencies": { 359 | "@babel/helper-validator-identifier": "^7.18.6", 360 | "chalk": "^2.0.0", 361 | "js-tokens": "^4.0.0" 362 | }, 363 | "engines": { 364 | "node": ">=6.9.0" 365 | } 366 | }, 367 | "node_modules/@babel/parser": { 368 | "version": "7.19.3", 369 | "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.3.tgz", 370 | "integrity": "sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ==", 371 | "dev": true, 372 | "bin": { 373 | "parser": "bin/babel-parser.js" 374 | }, 375 | "engines": { 376 | "node": ">=6.0.0" 377 | } 378 | }, 379 | "node_modules/@babel/plugin-syntax-typescript": { 380 | "version": "7.18.6", 381 | "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", 382 | "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", 383 | "dev": true, 384 | "dependencies": { 385 | "@babel/helper-plugin-utils": "^7.18.6" 386 | }, 387 | "engines": { 388 | "node": ">=6.9.0" 389 | }, 390 | "peerDependencies": { 391 | "@babel/core": "^7.0.0-0" 392 | } 393 | }, 394 | "node_modules/@babel/plugin-transform-typescript": { 395 | "version": "7.19.3", 396 | "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.19.3.tgz", 397 | "integrity": "sha512-z6fnuK9ve9u/0X0rRvI9MY0xg+DOUaABDYOe+/SQTxtlptaBB/V9JIUxJn6xp3lMBeb9qe8xSFmHU35oZDXD+w==", 398 | "dev": true, 399 | "dependencies": { 400 | "@babel/helper-create-class-features-plugin": "^7.19.0", 401 | "@babel/helper-plugin-utils": "^7.19.0", 402 | "@babel/plugin-syntax-typescript": "^7.18.6" 403 | }, 404 | "engines": { 405 | "node": ">=6.9.0" 406 | }, 407 | "peerDependencies": { 408 | "@babel/core": "^7.0.0-0" 409 | } 410 | }, 411 | "node_modules/@babel/preset-typescript": { 412 | "version": "7.18.6", 413 | "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz", 414 | "integrity": "sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ==", 415 | "dev": true, 416 | "dependencies": { 417 | "@babel/helper-plugin-utils": "^7.18.6", 418 | "@babel/helper-validator-option": "^7.18.6", 419 | "@babel/plugin-transform-typescript": "^7.18.6" 420 | }, 421 | "engines": { 422 | "node": ">=6.9.0" 423 | }, 424 | "peerDependencies": { 425 | "@babel/core": "^7.0.0-0" 426 | } 427 | }, 428 | "node_modules/@babel/template": { 429 | "version": "7.18.10", 430 | "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", 431 | "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", 432 | "dev": true, 433 | "dependencies": { 434 | "@babel/code-frame": "^7.18.6", 435 | "@babel/parser": "^7.18.10", 436 | "@babel/types": "^7.18.10" 437 | }, 438 | "engines": { 439 | "node": ">=6.9.0" 440 | } 441 | }, 442 | "node_modules/@babel/traverse": { 443 | "version": "7.19.3", 444 | "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", 445 | "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", 446 | "dev": true, 447 | "dependencies": { 448 | "@babel/code-frame": "^7.18.6", 449 | "@babel/generator": "^7.19.3", 450 | "@babel/helper-environment-visitor": "^7.18.9", 451 | "@babel/helper-function-name": "^7.19.0", 452 | "@babel/helper-hoist-variables": "^7.18.6", 453 | "@babel/helper-split-export-declaration": "^7.18.6", 454 | "@babel/parser": "^7.19.3", 455 | "@babel/types": "^7.19.3", 456 | "debug": "^4.1.0", 457 | "globals": "^11.1.0" 458 | }, 459 | "engines": { 460 | "node": ">=6.9.0" 461 | } 462 | }, 463 | "node_modules/@babel/types": { 464 | "version": "7.19.3", 465 | "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", 466 | "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", 467 | "dev": true, 468 | "dependencies": { 469 | "@babel/helper-string-parser": "^7.18.10", 470 | "@babel/helper-validator-identifier": "^7.19.1", 471 | "to-fast-properties": "^2.0.0" 472 | }, 473 | "engines": { 474 | "node": ">=6.9.0" 475 | } 476 | }, 477 | "node_modules/@jridgewell/gen-mapping": { 478 | "version": "0.1.1", 479 | "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", 480 | "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", 481 | "dev": true, 482 | "dependencies": { 483 | "@jridgewell/set-array": "^1.0.0", 484 | "@jridgewell/sourcemap-codec": "^1.4.10" 485 | }, 486 | "engines": { 487 | "node": ">=6.0.0" 488 | } 489 | }, 490 | "node_modules/@jridgewell/resolve-uri": { 491 | "version": "3.1.0", 492 | "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", 493 | "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", 494 | "dev": true, 495 | "engines": { 496 | "node": ">=6.0.0" 497 | } 498 | }, 499 | "node_modules/@jridgewell/set-array": { 500 | "version": "1.1.2", 501 | "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", 502 | "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", 503 | "dev": true, 504 | "engines": { 505 | "node": ">=6.0.0" 506 | } 507 | }, 508 | "node_modules/@jridgewell/sourcemap-codec": { 509 | "version": "1.4.14", 510 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", 511 | "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", 512 | "dev": true 513 | }, 514 | "node_modules/@jridgewell/trace-mapping": { 515 | "version": "0.3.15", 516 | "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", 517 | "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", 518 | "dev": true, 519 | "dependencies": { 520 | "@jridgewell/resolve-uri": "^3.0.3", 521 | "@jridgewell/sourcemap-codec": "^1.4.10" 522 | } 523 | }, 524 | "node_modules/@rollup/plugin-babel": { 525 | "version": "5.3.1", 526 | "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", 527 | "integrity": "sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==", 528 | "dev": true, 529 | "dependencies": { 530 | "@babel/helper-module-imports": "^7.10.4", 531 | "@rollup/pluginutils": "^3.1.0" 532 | }, 533 | "engines": { 534 | "node": ">= 10.0.0" 535 | }, 536 | "peerDependencies": { 537 | "@babel/core": "^7.0.0", 538 | "@types/babel__core": "^7.1.9", 539 | "rollup": "^1.20.0||^2.0.0" 540 | }, 541 | "peerDependenciesMeta": { 542 | "@types/babel__core": { 543 | "optional": true 544 | } 545 | } 546 | }, 547 | "node_modules/@rollup/plugin-node-resolve": { 548 | "version": "14.1.0", 549 | "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-14.1.0.tgz", 550 | "integrity": "sha512-5G2niJroNCz/1zqwXtk0t9+twOSDlG00k1Wfd7bkbbXmwg8H8dvgHdIWAun53Ps/rckfvOC7scDBjuGFg5OaWw==", 551 | "dev": true, 552 | "dependencies": { 553 | "@rollup/pluginutils": "^3.1.0", 554 | "@types/resolve": "1.17.1", 555 | "deepmerge": "^4.2.2", 556 | "is-builtin-module": "^3.1.0", 557 | "is-module": "^1.0.0", 558 | "resolve": "^1.19.0" 559 | }, 560 | "engines": { 561 | "node": ">= 10.0.0" 562 | }, 563 | "peerDependencies": { 564 | "rollup": "^2.78.0" 565 | } 566 | }, 567 | "node_modules/@rollup/pluginutils": { 568 | "version": "3.1.0", 569 | "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", 570 | "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", 571 | "dev": true, 572 | "dependencies": { 573 | "@types/estree": "0.0.39", 574 | "estree-walker": "^1.0.1", 575 | "picomatch": "^2.2.2" 576 | }, 577 | "engines": { 578 | "node": ">= 8.0.0" 579 | }, 580 | "peerDependencies": { 581 | "rollup": "^1.20.0||^2.0.0" 582 | } 583 | }, 584 | "node_modules/@types/estree": { 585 | "version": "0.0.39", 586 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", 587 | "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", 588 | "dev": true 589 | }, 590 | "node_modules/@types/node": { 591 | "version": "18.8.3", 592 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.8.3.tgz", 593 | "integrity": "sha512-0os9vz6BpGwxGe9LOhgP/ncvYN5Tx1fNcd2TM3rD/aCGBkysb+ZWpXEocG24h6ZzOi13+VB8HndAQFezsSOw1w==", 594 | "dev": true 595 | }, 596 | "node_modules/@types/resolve": { 597 | "version": "1.17.1", 598 | "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", 599 | "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", 600 | "dev": true, 601 | "dependencies": { 602 | "@types/node": "*" 603 | } 604 | }, 605 | "node_modules/ansi-styles": { 606 | "version": "3.2.1", 607 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 608 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 609 | "dev": true, 610 | "dependencies": { 611 | "color-convert": "^1.9.0" 612 | }, 613 | "engines": { 614 | "node": ">=4" 615 | } 616 | }, 617 | "node_modules/babel-plugin-transform-rename-import": { 618 | "version": "2.3.0", 619 | "resolved": "https://registry.npmjs.org/babel-plugin-transform-rename-import/-/babel-plugin-transform-rename-import-2.3.0.tgz", 620 | "integrity": "sha512-dPgJoT57XC0PqSnLgl2FwNvxFrWlspatX2dkk7yjKQj5HHGw071vAcOf+hqW8ClqcBDMvEbm6mevn5yHAD8mlQ==", 621 | "dev": true 622 | }, 623 | "node_modules/browserslist": { 624 | "version": "4.21.4", 625 | "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", 626 | "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", 627 | "dev": true, 628 | "funding": [ 629 | { 630 | "type": "opencollective", 631 | "url": "https://opencollective.com/browserslist" 632 | }, 633 | { 634 | "type": "tidelift", 635 | "url": "https://tidelift.com/funding/github/npm/browserslist" 636 | } 637 | ], 638 | "dependencies": { 639 | "caniuse-lite": "^1.0.30001400", 640 | "electron-to-chromium": "^1.4.251", 641 | "node-releases": "^2.0.6", 642 | "update-browserslist-db": "^1.0.9" 643 | }, 644 | "bin": { 645 | "browserslist": "cli.js" 646 | }, 647 | "engines": { 648 | "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" 649 | } 650 | }, 651 | "node_modules/builtin-modules": { 652 | "version": "3.3.0", 653 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", 654 | "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", 655 | "dev": true, 656 | "engines": { 657 | "node": ">=6" 658 | }, 659 | "funding": { 660 | "url": "https://github.com/sponsors/sindresorhus" 661 | } 662 | }, 663 | "node_modules/caniuse-lite": { 664 | "version": "1.0.30001416", 665 | "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001416.tgz", 666 | "integrity": "sha512-06wzzdAkCPZO+Qm4e/eNghZBDfVNDsCgw33T27OwBH9unE9S478OYw//Q2L7Npf/zBzs7rjZOszIFQkwQKAEqA==", 667 | "dev": true, 668 | "funding": [ 669 | { 670 | "type": "opencollective", 671 | "url": "https://opencollective.com/browserslist" 672 | }, 673 | { 674 | "type": "tidelift", 675 | "url": "https://tidelift.com/funding/github/npm/caniuse-lite" 676 | } 677 | ] 678 | }, 679 | "node_modules/chalk": { 680 | "version": "2.4.2", 681 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 682 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 683 | "dev": true, 684 | "dependencies": { 685 | "ansi-styles": "^3.2.1", 686 | "escape-string-regexp": "^1.0.5", 687 | "supports-color": "^5.3.0" 688 | }, 689 | "engines": { 690 | "node": ">=4" 691 | } 692 | }, 693 | "node_modules/color-convert": { 694 | "version": "1.9.3", 695 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 696 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 697 | "dev": true, 698 | "dependencies": { 699 | "color-name": "1.1.3" 700 | } 701 | }, 702 | "node_modules/color-name": { 703 | "version": "1.1.3", 704 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 705 | "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", 706 | "dev": true 707 | }, 708 | "node_modules/convert-source-map": { 709 | "version": "1.8.0", 710 | "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", 711 | "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", 712 | "dev": true, 713 | "dependencies": { 714 | "safe-buffer": "~5.1.1" 715 | } 716 | }, 717 | "node_modules/csstype": { 718 | "version": "3.1.1", 719 | "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", 720 | "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==" 721 | }, 722 | "node_modules/debug": { 723 | "version": "4.3.4", 724 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 725 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 726 | "dev": true, 727 | "dependencies": { 728 | "ms": "2.1.2" 729 | }, 730 | "engines": { 731 | "node": ">=6.0" 732 | }, 733 | "peerDependenciesMeta": { 734 | "supports-color": { 735 | "optional": true 736 | } 737 | } 738 | }, 739 | "node_modules/deepmerge": { 740 | "version": "4.2.2", 741 | "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", 742 | "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", 743 | "dev": true, 744 | "engines": { 745 | "node": ">=0.10.0" 746 | } 747 | }, 748 | "node_modules/devalue": { 749 | "version": "2.0.1", 750 | "resolved": "https://registry.npmjs.org/devalue/-/devalue-2.0.1.tgz", 751 | "integrity": "sha512-I2TiqT5iWBEyB8GRfTDP0hiLZ0YeDJZ+upDxjBfOC2lebO5LezQMv7QvIUTzdb64jQyAKLf1AHADtGN+jw6v8Q==", 752 | "dev": true 753 | }, 754 | "node_modules/dom-expressions": { 755 | "version": "0.34.12", 756 | "resolved": "https://registry.npmjs.org/dom-expressions/-/dom-expressions-0.34.12.tgz", 757 | "integrity": "sha512-GIKL8KOJ45RsBe7hI3QeTe9gtBUty36FIcSG0CFE9U6CVPciWX2ye5W5kmfI64TENFh19k9u1anZBQEqmfudoA==", 758 | "dev": true, 759 | "dependencies": { 760 | "babel-plugin-transform-rename-import": "^2.3.0", 761 | "devalue": "^2.0.1" 762 | }, 763 | "peerDependencies": { 764 | "csstype": "^3.0" 765 | } 766 | }, 767 | "node_modules/electron-to-chromium": { 768 | "version": "1.4.275", 769 | "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.275.tgz", 770 | "integrity": "sha512-aJeQQ+Hl9Jyyzv4chBqYJwmVRY46N5i2BEX5Cuyk/5gFCUZ5F3i7Hnba6snZftWla7Gglwc5pIgcd+E7cW+rPg==", 771 | "dev": true 772 | }, 773 | "node_modules/escalade": { 774 | "version": "3.1.1", 775 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", 776 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", 777 | "dev": true, 778 | "engines": { 779 | "node": ">=6" 780 | } 781 | }, 782 | "node_modules/escape-string-regexp": { 783 | "version": "1.0.5", 784 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 785 | "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", 786 | "dev": true, 787 | "engines": { 788 | "node": ">=0.8.0" 789 | } 790 | }, 791 | "node_modules/estree-walker": { 792 | "version": "1.0.1", 793 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", 794 | "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", 795 | "dev": true 796 | }, 797 | "node_modules/fsevents": { 798 | "version": "2.3.2", 799 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 800 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 801 | "dev": true, 802 | "hasInstallScript": true, 803 | "optional": true, 804 | "os": [ 805 | "darwin" 806 | ], 807 | "engines": { 808 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 809 | } 810 | }, 811 | "node_modules/function-bind": { 812 | "version": "1.1.1", 813 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 814 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 815 | "dev": true 816 | }, 817 | "node_modules/gensync": { 818 | "version": "1.0.0-beta.2", 819 | "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", 820 | "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", 821 | "dev": true, 822 | "engines": { 823 | "node": ">=6.9.0" 824 | } 825 | }, 826 | "node_modules/globals": { 827 | "version": "11.12.0", 828 | "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", 829 | "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", 830 | "dev": true, 831 | "engines": { 832 | "node": ">=4" 833 | } 834 | }, 835 | "node_modules/has": { 836 | "version": "1.0.3", 837 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 838 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 839 | "dev": true, 840 | "dependencies": { 841 | "function-bind": "^1.1.1" 842 | }, 843 | "engines": { 844 | "node": ">= 0.4.0" 845 | } 846 | }, 847 | "node_modules/has-flag": { 848 | "version": "3.0.0", 849 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 850 | "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", 851 | "dev": true, 852 | "engines": { 853 | "node": ">=4" 854 | } 855 | }, 856 | "node_modules/hyper-dom-expressions": { 857 | "version": "0.34.12", 858 | "resolved": "https://registry.npmjs.org/hyper-dom-expressions/-/hyper-dom-expressions-0.34.12.tgz", 859 | "integrity": "sha512-mz6lUmtWt16Xx4hHjnN32QPV19gfy6Lh+C/ASyn+6Hxsgv2+8Q4P552etfNnhgoIE4c7foRSlvow5OU6m6ljmA==", 860 | "dev": true 861 | }, 862 | "node_modules/is-builtin-module": { 863 | "version": "3.2.0", 864 | "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.0.tgz", 865 | "integrity": "sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw==", 866 | "dev": true, 867 | "dependencies": { 868 | "builtin-modules": "^3.3.0" 869 | }, 870 | "engines": { 871 | "node": ">=6" 872 | }, 873 | "funding": { 874 | "url": "https://github.com/sponsors/sindresorhus" 875 | } 876 | }, 877 | "node_modules/is-core-module": { 878 | "version": "2.10.0", 879 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", 880 | "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", 881 | "dev": true, 882 | "dependencies": { 883 | "has": "^1.0.3" 884 | }, 885 | "funding": { 886 | "url": "https://github.com/sponsors/ljharb" 887 | } 888 | }, 889 | "node_modules/is-module": { 890 | "version": "1.0.0", 891 | "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", 892 | "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", 893 | "dev": true 894 | }, 895 | "node_modules/js-tokens": { 896 | "version": "4.0.0", 897 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 898 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", 899 | "dev": true 900 | }, 901 | "node_modules/jsesc": { 902 | "version": "2.5.2", 903 | "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", 904 | "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", 905 | "dev": true, 906 | "bin": { 907 | "jsesc": "bin/jsesc" 908 | }, 909 | "engines": { 910 | "node": ">=4" 911 | } 912 | }, 913 | "node_modules/json5": { 914 | "version": "2.2.1", 915 | "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", 916 | "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", 917 | "dev": true, 918 | "bin": { 919 | "json5": "lib/cli.js" 920 | }, 921 | "engines": { 922 | "node": ">=6" 923 | } 924 | }, 925 | "node_modules/lit-dom-expressions": { 926 | "version": "0.34.12", 927 | "resolved": "https://registry.npmjs.org/lit-dom-expressions/-/lit-dom-expressions-0.34.12.tgz", 928 | "integrity": "sha512-Bffcw6tTA4qsBJt034ip28xx9sAx1xMJ56h6lOd4cQ0gC+goVpPiQMkoNLeMUvrcRIPdsOpdjraZHvRO5/H5Rg==", 929 | "dev": true 930 | }, 931 | "node_modules/mobx": { 932 | "version": "6.6.2", 933 | "resolved": "https://registry.npmjs.org/mobx/-/mobx-6.6.2.tgz", 934 | "integrity": "sha512-IOpS0bf3+hXIhDIy+CmlNMBfFpAbHS0aVHcNC+xH/TFYEKIIVDKNYRh9eKlXuVfJ1iRKAp0cRVmO145CyJAMVQ==", 935 | "dev": true, 936 | "funding": { 937 | "type": "opencollective", 938 | "url": "https://opencollective.com/mobx" 939 | } 940 | }, 941 | "node_modules/ms": { 942 | "version": "2.1.2", 943 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 944 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 945 | "dev": true 946 | }, 947 | "node_modules/ncp": { 948 | "version": "2.0.0", 949 | "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", 950 | "integrity": "sha512-zIdGUrPRFTUELUvr3Gmc7KZ2Sw/h1PiVM0Af/oHB6zgnV1ikqSfRk+TOufi79aHYCW3NiOXmr1BP5nWbzojLaA==", 951 | "dev": true, 952 | "bin": { 953 | "ncp": "bin/ncp" 954 | } 955 | }, 956 | "node_modules/node-releases": { 957 | "version": "2.0.6", 958 | "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", 959 | "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", 960 | "dev": true 961 | }, 962 | "node_modules/path-parse": { 963 | "version": "1.0.7", 964 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 965 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", 966 | "dev": true 967 | }, 968 | "node_modules/picocolors": { 969 | "version": "1.0.0", 970 | "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", 971 | "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", 972 | "dev": true 973 | }, 974 | "node_modules/picomatch": { 975 | "version": "2.3.1", 976 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 977 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 978 | "dev": true, 979 | "engines": { 980 | "node": ">=8.6" 981 | }, 982 | "funding": { 983 | "url": "https://github.com/sponsors/jonschlinkert" 984 | } 985 | }, 986 | "node_modules/resolve": { 987 | "version": "1.22.1", 988 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", 989 | "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", 990 | "dev": true, 991 | "dependencies": { 992 | "is-core-module": "^2.9.0", 993 | "path-parse": "^1.0.7", 994 | "supports-preserve-symlinks-flag": "^1.0.0" 995 | }, 996 | "bin": { 997 | "resolve": "bin/resolve" 998 | }, 999 | "funding": { 1000 | "url": "https://github.com/sponsors/ljharb" 1001 | } 1002 | }, 1003 | "node_modules/rollup": { 1004 | "version": "2.79.1", 1005 | "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", 1006 | "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", 1007 | "dev": true, 1008 | "bin": { 1009 | "rollup": "dist/bin/rollup" 1010 | }, 1011 | "engines": { 1012 | "node": ">=10.0.0" 1013 | }, 1014 | "optionalDependencies": { 1015 | "fsevents": "~2.3.2" 1016 | } 1017 | }, 1018 | "node_modules/safe-buffer": { 1019 | "version": "5.1.2", 1020 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 1021 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", 1022 | "dev": true 1023 | }, 1024 | "node_modules/semver": { 1025 | "version": "6.3.0", 1026 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", 1027 | "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", 1028 | "dev": true, 1029 | "bin": { 1030 | "semver": "bin/semver.js" 1031 | } 1032 | }, 1033 | "node_modules/supports-color": { 1034 | "version": "5.5.0", 1035 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 1036 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 1037 | "dev": true, 1038 | "dependencies": { 1039 | "has-flag": "^3.0.0" 1040 | }, 1041 | "engines": { 1042 | "node": ">=4" 1043 | } 1044 | }, 1045 | "node_modules/supports-preserve-symlinks-flag": { 1046 | "version": "1.0.0", 1047 | "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", 1048 | "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", 1049 | "dev": true, 1050 | "engines": { 1051 | "node": ">= 0.4" 1052 | }, 1053 | "funding": { 1054 | "url": "https://github.com/sponsors/ljharb" 1055 | } 1056 | }, 1057 | "node_modules/to-fast-properties": { 1058 | "version": "2.0.0", 1059 | "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", 1060 | "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", 1061 | "dev": true, 1062 | "engines": { 1063 | "node": ">=4" 1064 | } 1065 | }, 1066 | "node_modules/typescript": { 1067 | "version": "4.8.4", 1068 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", 1069 | "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", 1070 | "dev": true, 1071 | "bin": { 1072 | "tsc": "bin/tsc", 1073 | "tsserver": "bin/tsserver" 1074 | }, 1075 | "engines": { 1076 | "node": ">=4.2.0" 1077 | } 1078 | }, 1079 | "node_modules/update-browserslist-db": { 1080 | "version": "1.0.10", 1081 | "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", 1082 | "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", 1083 | "dev": true, 1084 | "funding": [ 1085 | { 1086 | "type": "opencollective", 1087 | "url": "https://opencollective.com/browserslist" 1088 | }, 1089 | { 1090 | "type": "tidelift", 1091 | "url": "https://tidelift.com/funding/github/npm/browserslist" 1092 | } 1093 | ], 1094 | "dependencies": { 1095 | "escalade": "^3.1.1", 1096 | "picocolors": "^1.0.0" 1097 | }, 1098 | "bin": { 1099 | "browserslist-lint": "cli.js" 1100 | }, 1101 | "peerDependencies": { 1102 | "browserslist": ">= 4.21.0" 1103 | } 1104 | } 1105 | }, 1106 | "dependencies": { 1107 | "@ampproject/remapping": { 1108 | "version": "2.2.0", 1109 | "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", 1110 | "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", 1111 | "dev": true, 1112 | "requires": { 1113 | "@jridgewell/gen-mapping": "^0.1.0", 1114 | "@jridgewell/trace-mapping": "^0.3.9" 1115 | } 1116 | }, 1117 | "@babel/code-frame": { 1118 | "version": "7.18.6", 1119 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", 1120 | "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", 1121 | "dev": true, 1122 | "requires": { 1123 | "@babel/highlight": "^7.18.6" 1124 | } 1125 | }, 1126 | "@babel/compat-data": { 1127 | "version": "7.19.3", 1128 | "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.3.tgz", 1129 | "integrity": "sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw==", 1130 | "dev": true 1131 | }, 1132 | "@babel/core": { 1133 | "version": "7.19.3", 1134 | "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz", 1135 | "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==", 1136 | "dev": true, 1137 | "requires": { 1138 | "@ampproject/remapping": "^2.1.0", 1139 | "@babel/code-frame": "^7.18.6", 1140 | "@babel/generator": "^7.19.3", 1141 | "@babel/helper-compilation-targets": "^7.19.3", 1142 | "@babel/helper-module-transforms": "^7.19.0", 1143 | "@babel/helpers": "^7.19.0", 1144 | "@babel/parser": "^7.19.3", 1145 | "@babel/template": "^7.18.10", 1146 | "@babel/traverse": "^7.19.3", 1147 | "@babel/types": "^7.19.3", 1148 | "convert-source-map": "^1.7.0", 1149 | "debug": "^4.1.0", 1150 | "gensync": "^1.0.0-beta.2", 1151 | "json5": "^2.2.1", 1152 | "semver": "^6.3.0" 1153 | } 1154 | }, 1155 | "@babel/generator": { 1156 | "version": "7.19.3", 1157 | "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", 1158 | "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", 1159 | "dev": true, 1160 | "requires": { 1161 | "@babel/types": "^7.19.3", 1162 | "@jridgewell/gen-mapping": "^0.3.2", 1163 | "jsesc": "^2.5.1" 1164 | }, 1165 | "dependencies": { 1166 | "@jridgewell/gen-mapping": { 1167 | "version": "0.3.2", 1168 | "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", 1169 | "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", 1170 | "dev": true, 1171 | "requires": { 1172 | "@jridgewell/set-array": "^1.0.1", 1173 | "@jridgewell/sourcemap-codec": "^1.4.10", 1174 | "@jridgewell/trace-mapping": "^0.3.9" 1175 | } 1176 | } 1177 | } 1178 | }, 1179 | "@babel/helper-annotate-as-pure": { 1180 | "version": "7.18.6", 1181 | "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", 1182 | "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", 1183 | "dev": true, 1184 | "requires": { 1185 | "@babel/types": "^7.18.6" 1186 | } 1187 | }, 1188 | "@babel/helper-compilation-targets": { 1189 | "version": "7.19.3", 1190 | "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz", 1191 | "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==", 1192 | "dev": true, 1193 | "requires": { 1194 | "@babel/compat-data": "^7.19.3", 1195 | "@babel/helper-validator-option": "^7.18.6", 1196 | "browserslist": "^4.21.3", 1197 | "semver": "^6.3.0" 1198 | } 1199 | }, 1200 | "@babel/helper-create-class-features-plugin": { 1201 | "version": "7.19.0", 1202 | "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.19.0.tgz", 1203 | "integrity": "sha512-NRz8DwF4jT3UfrmUoZjd0Uph9HQnP30t7Ash+weACcyNkiYTywpIjDBgReJMKgr+n86sn2nPVVmJ28Dm053Kqw==", 1204 | "dev": true, 1205 | "requires": { 1206 | "@babel/helper-annotate-as-pure": "^7.18.6", 1207 | "@babel/helper-environment-visitor": "^7.18.9", 1208 | "@babel/helper-function-name": "^7.19.0", 1209 | "@babel/helper-member-expression-to-functions": "^7.18.9", 1210 | "@babel/helper-optimise-call-expression": "^7.18.6", 1211 | "@babel/helper-replace-supers": "^7.18.9", 1212 | "@babel/helper-split-export-declaration": "^7.18.6" 1213 | } 1214 | }, 1215 | "@babel/helper-environment-visitor": { 1216 | "version": "7.18.9", 1217 | "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", 1218 | "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", 1219 | "dev": true 1220 | }, 1221 | "@babel/helper-function-name": { 1222 | "version": "7.19.0", 1223 | "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", 1224 | "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", 1225 | "dev": true, 1226 | "requires": { 1227 | "@babel/template": "^7.18.10", 1228 | "@babel/types": "^7.19.0" 1229 | } 1230 | }, 1231 | "@babel/helper-hoist-variables": { 1232 | "version": "7.18.6", 1233 | "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", 1234 | "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", 1235 | "dev": true, 1236 | "requires": { 1237 | "@babel/types": "^7.18.6" 1238 | } 1239 | }, 1240 | "@babel/helper-member-expression-to-functions": { 1241 | "version": "7.18.9", 1242 | "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz", 1243 | "integrity": "sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==", 1244 | "dev": true, 1245 | "requires": { 1246 | "@babel/types": "^7.18.9" 1247 | } 1248 | }, 1249 | "@babel/helper-module-imports": { 1250 | "version": "7.18.6", 1251 | "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", 1252 | "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", 1253 | "dev": true, 1254 | "requires": { 1255 | "@babel/types": "^7.18.6" 1256 | } 1257 | }, 1258 | "@babel/helper-module-transforms": { 1259 | "version": "7.19.0", 1260 | "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", 1261 | "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", 1262 | "dev": true, 1263 | "requires": { 1264 | "@babel/helper-environment-visitor": "^7.18.9", 1265 | "@babel/helper-module-imports": "^7.18.6", 1266 | "@babel/helper-simple-access": "^7.18.6", 1267 | "@babel/helper-split-export-declaration": "^7.18.6", 1268 | "@babel/helper-validator-identifier": "^7.18.6", 1269 | "@babel/template": "^7.18.10", 1270 | "@babel/traverse": "^7.19.0", 1271 | "@babel/types": "^7.19.0" 1272 | } 1273 | }, 1274 | "@babel/helper-optimise-call-expression": { 1275 | "version": "7.18.6", 1276 | "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", 1277 | "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", 1278 | "dev": true, 1279 | "requires": { 1280 | "@babel/types": "^7.18.6" 1281 | } 1282 | }, 1283 | "@babel/helper-plugin-utils": { 1284 | "version": "7.19.0", 1285 | "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", 1286 | "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", 1287 | "dev": true 1288 | }, 1289 | "@babel/helper-replace-supers": { 1290 | "version": "7.19.1", 1291 | "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.19.1.tgz", 1292 | "integrity": "sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw==", 1293 | "dev": true, 1294 | "requires": { 1295 | "@babel/helper-environment-visitor": "^7.18.9", 1296 | "@babel/helper-member-expression-to-functions": "^7.18.9", 1297 | "@babel/helper-optimise-call-expression": "^7.18.6", 1298 | "@babel/traverse": "^7.19.1", 1299 | "@babel/types": "^7.19.0" 1300 | } 1301 | }, 1302 | "@babel/helper-simple-access": { 1303 | "version": "7.18.6", 1304 | "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", 1305 | "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", 1306 | "dev": true, 1307 | "requires": { 1308 | "@babel/types": "^7.18.6" 1309 | } 1310 | }, 1311 | "@babel/helper-split-export-declaration": { 1312 | "version": "7.18.6", 1313 | "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", 1314 | "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", 1315 | "dev": true, 1316 | "requires": { 1317 | "@babel/types": "^7.18.6" 1318 | } 1319 | }, 1320 | "@babel/helper-string-parser": { 1321 | "version": "7.18.10", 1322 | "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", 1323 | "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", 1324 | "dev": true 1325 | }, 1326 | "@babel/helper-validator-identifier": { 1327 | "version": "7.19.1", 1328 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", 1329 | "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", 1330 | "dev": true 1331 | }, 1332 | "@babel/helper-validator-option": { 1333 | "version": "7.18.6", 1334 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", 1335 | "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", 1336 | "dev": true 1337 | }, 1338 | "@babel/helpers": { 1339 | "version": "7.19.0", 1340 | "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", 1341 | "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", 1342 | "dev": true, 1343 | "requires": { 1344 | "@babel/template": "^7.18.10", 1345 | "@babel/traverse": "^7.19.0", 1346 | "@babel/types": "^7.19.0" 1347 | } 1348 | }, 1349 | "@babel/highlight": { 1350 | "version": "7.18.6", 1351 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", 1352 | "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", 1353 | "dev": true, 1354 | "requires": { 1355 | "@babel/helper-validator-identifier": "^7.18.6", 1356 | "chalk": "^2.0.0", 1357 | "js-tokens": "^4.0.0" 1358 | } 1359 | }, 1360 | "@babel/parser": { 1361 | "version": "7.19.3", 1362 | "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.3.tgz", 1363 | "integrity": "sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ==", 1364 | "dev": true 1365 | }, 1366 | "@babel/plugin-syntax-typescript": { 1367 | "version": "7.18.6", 1368 | "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", 1369 | "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", 1370 | "dev": true, 1371 | "requires": { 1372 | "@babel/helper-plugin-utils": "^7.18.6" 1373 | } 1374 | }, 1375 | "@babel/plugin-transform-typescript": { 1376 | "version": "7.19.3", 1377 | "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.19.3.tgz", 1378 | "integrity": "sha512-z6fnuK9ve9u/0X0rRvI9MY0xg+DOUaABDYOe+/SQTxtlptaBB/V9JIUxJn6xp3lMBeb9qe8xSFmHU35oZDXD+w==", 1379 | "dev": true, 1380 | "requires": { 1381 | "@babel/helper-create-class-features-plugin": "^7.19.0", 1382 | "@babel/helper-plugin-utils": "^7.19.0", 1383 | "@babel/plugin-syntax-typescript": "^7.18.6" 1384 | } 1385 | }, 1386 | "@babel/preset-typescript": { 1387 | "version": "7.18.6", 1388 | "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz", 1389 | "integrity": "sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ==", 1390 | "dev": true, 1391 | "requires": { 1392 | "@babel/helper-plugin-utils": "^7.18.6", 1393 | "@babel/helper-validator-option": "^7.18.6", 1394 | "@babel/plugin-transform-typescript": "^7.18.6" 1395 | } 1396 | }, 1397 | "@babel/template": { 1398 | "version": "7.18.10", 1399 | "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", 1400 | "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", 1401 | "dev": true, 1402 | "requires": { 1403 | "@babel/code-frame": "^7.18.6", 1404 | "@babel/parser": "^7.18.10", 1405 | "@babel/types": "^7.18.10" 1406 | } 1407 | }, 1408 | "@babel/traverse": { 1409 | "version": "7.19.3", 1410 | "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", 1411 | "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", 1412 | "dev": true, 1413 | "requires": { 1414 | "@babel/code-frame": "^7.18.6", 1415 | "@babel/generator": "^7.19.3", 1416 | "@babel/helper-environment-visitor": "^7.18.9", 1417 | "@babel/helper-function-name": "^7.19.0", 1418 | "@babel/helper-hoist-variables": "^7.18.6", 1419 | "@babel/helper-split-export-declaration": "^7.18.6", 1420 | "@babel/parser": "^7.19.3", 1421 | "@babel/types": "^7.19.3", 1422 | "debug": "^4.1.0", 1423 | "globals": "^11.1.0" 1424 | } 1425 | }, 1426 | "@babel/types": { 1427 | "version": "7.19.3", 1428 | "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", 1429 | "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", 1430 | "dev": true, 1431 | "requires": { 1432 | "@babel/helper-string-parser": "^7.18.10", 1433 | "@babel/helper-validator-identifier": "^7.19.1", 1434 | "to-fast-properties": "^2.0.0" 1435 | } 1436 | }, 1437 | "@jridgewell/gen-mapping": { 1438 | "version": "0.1.1", 1439 | "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", 1440 | "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", 1441 | "dev": true, 1442 | "requires": { 1443 | "@jridgewell/set-array": "^1.0.0", 1444 | "@jridgewell/sourcemap-codec": "^1.4.10" 1445 | } 1446 | }, 1447 | "@jridgewell/resolve-uri": { 1448 | "version": "3.1.0", 1449 | "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", 1450 | "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", 1451 | "dev": true 1452 | }, 1453 | "@jridgewell/set-array": { 1454 | "version": "1.1.2", 1455 | "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", 1456 | "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", 1457 | "dev": true 1458 | }, 1459 | "@jridgewell/sourcemap-codec": { 1460 | "version": "1.4.14", 1461 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", 1462 | "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", 1463 | "dev": true 1464 | }, 1465 | "@jridgewell/trace-mapping": { 1466 | "version": "0.3.15", 1467 | "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", 1468 | "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", 1469 | "dev": true, 1470 | "requires": { 1471 | "@jridgewell/resolve-uri": "^3.0.3", 1472 | "@jridgewell/sourcemap-codec": "^1.4.10" 1473 | } 1474 | }, 1475 | "@rollup/plugin-babel": { 1476 | "version": "5.3.1", 1477 | "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", 1478 | "integrity": "sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==", 1479 | "dev": true, 1480 | "requires": { 1481 | "@babel/helper-module-imports": "^7.10.4", 1482 | "@rollup/pluginutils": "^3.1.0" 1483 | } 1484 | }, 1485 | "@rollup/plugin-node-resolve": { 1486 | "version": "14.1.0", 1487 | "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-14.1.0.tgz", 1488 | "integrity": "sha512-5G2niJroNCz/1zqwXtk0t9+twOSDlG00k1Wfd7bkbbXmwg8H8dvgHdIWAun53Ps/rckfvOC7scDBjuGFg5OaWw==", 1489 | "dev": true, 1490 | "requires": { 1491 | "@rollup/pluginutils": "^3.1.0", 1492 | "@types/resolve": "1.17.1", 1493 | "deepmerge": "^4.2.2", 1494 | "is-builtin-module": "^3.1.0", 1495 | "is-module": "^1.0.0", 1496 | "resolve": "^1.19.0" 1497 | } 1498 | }, 1499 | "@rollup/pluginutils": { 1500 | "version": "3.1.0", 1501 | "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", 1502 | "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", 1503 | "dev": true, 1504 | "requires": { 1505 | "@types/estree": "0.0.39", 1506 | "estree-walker": "^1.0.1", 1507 | "picomatch": "^2.2.2" 1508 | } 1509 | }, 1510 | "@types/estree": { 1511 | "version": "0.0.39", 1512 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", 1513 | "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", 1514 | "dev": true 1515 | }, 1516 | "@types/node": { 1517 | "version": "18.8.3", 1518 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.8.3.tgz", 1519 | "integrity": "sha512-0os9vz6BpGwxGe9LOhgP/ncvYN5Tx1fNcd2TM3rD/aCGBkysb+ZWpXEocG24h6ZzOi13+VB8HndAQFezsSOw1w==", 1520 | "dev": true 1521 | }, 1522 | "@types/resolve": { 1523 | "version": "1.17.1", 1524 | "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", 1525 | "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", 1526 | "dev": true, 1527 | "requires": { 1528 | "@types/node": "*" 1529 | } 1530 | }, 1531 | "ansi-styles": { 1532 | "version": "3.2.1", 1533 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 1534 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 1535 | "dev": true, 1536 | "requires": { 1537 | "color-convert": "^1.9.0" 1538 | } 1539 | }, 1540 | "babel-plugin-transform-rename-import": { 1541 | "version": "2.3.0", 1542 | "resolved": "https://registry.npmjs.org/babel-plugin-transform-rename-import/-/babel-plugin-transform-rename-import-2.3.0.tgz", 1543 | "integrity": "sha512-dPgJoT57XC0PqSnLgl2FwNvxFrWlspatX2dkk7yjKQj5HHGw071vAcOf+hqW8ClqcBDMvEbm6mevn5yHAD8mlQ==", 1544 | "dev": true 1545 | }, 1546 | "browserslist": { 1547 | "version": "4.21.4", 1548 | "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", 1549 | "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", 1550 | "dev": true, 1551 | "requires": { 1552 | "caniuse-lite": "^1.0.30001400", 1553 | "electron-to-chromium": "^1.4.251", 1554 | "node-releases": "^2.0.6", 1555 | "update-browserslist-db": "^1.0.9" 1556 | } 1557 | }, 1558 | "builtin-modules": { 1559 | "version": "3.3.0", 1560 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", 1561 | "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", 1562 | "dev": true 1563 | }, 1564 | "caniuse-lite": { 1565 | "version": "1.0.30001416", 1566 | "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001416.tgz", 1567 | "integrity": "sha512-06wzzdAkCPZO+Qm4e/eNghZBDfVNDsCgw33T27OwBH9unE9S478OYw//Q2L7Npf/zBzs7rjZOszIFQkwQKAEqA==", 1568 | "dev": true 1569 | }, 1570 | "chalk": { 1571 | "version": "2.4.2", 1572 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 1573 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 1574 | "dev": true, 1575 | "requires": { 1576 | "ansi-styles": "^3.2.1", 1577 | "escape-string-regexp": "^1.0.5", 1578 | "supports-color": "^5.3.0" 1579 | } 1580 | }, 1581 | "color-convert": { 1582 | "version": "1.9.3", 1583 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 1584 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 1585 | "dev": true, 1586 | "requires": { 1587 | "color-name": "1.1.3" 1588 | } 1589 | }, 1590 | "color-name": { 1591 | "version": "1.1.3", 1592 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 1593 | "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", 1594 | "dev": true 1595 | }, 1596 | "convert-source-map": { 1597 | "version": "1.8.0", 1598 | "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", 1599 | "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", 1600 | "dev": true, 1601 | "requires": { 1602 | "safe-buffer": "~5.1.1" 1603 | } 1604 | }, 1605 | "csstype": { 1606 | "version": "3.1.1", 1607 | "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", 1608 | "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==" 1609 | }, 1610 | "debug": { 1611 | "version": "4.3.4", 1612 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 1613 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 1614 | "dev": true, 1615 | "requires": { 1616 | "ms": "2.1.2" 1617 | } 1618 | }, 1619 | "deepmerge": { 1620 | "version": "4.2.2", 1621 | "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", 1622 | "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", 1623 | "dev": true 1624 | }, 1625 | "devalue": { 1626 | "version": "2.0.1", 1627 | "resolved": "https://registry.npmjs.org/devalue/-/devalue-2.0.1.tgz", 1628 | "integrity": "sha512-I2TiqT5iWBEyB8GRfTDP0hiLZ0YeDJZ+upDxjBfOC2lebO5LezQMv7QvIUTzdb64jQyAKLf1AHADtGN+jw6v8Q==", 1629 | "dev": true 1630 | }, 1631 | "dom-expressions": { 1632 | "version": "0.34.12", 1633 | "resolved": "https://registry.npmjs.org/dom-expressions/-/dom-expressions-0.34.12.tgz", 1634 | "integrity": "sha512-GIKL8KOJ45RsBe7hI3QeTe9gtBUty36FIcSG0CFE9U6CVPciWX2ye5W5kmfI64TENFh19k9u1anZBQEqmfudoA==", 1635 | "dev": true, 1636 | "requires": { 1637 | "babel-plugin-transform-rename-import": "^2.3.0", 1638 | "devalue": "^2.0.1" 1639 | } 1640 | }, 1641 | "electron-to-chromium": { 1642 | "version": "1.4.275", 1643 | "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.275.tgz", 1644 | "integrity": "sha512-aJeQQ+Hl9Jyyzv4chBqYJwmVRY46N5i2BEX5Cuyk/5gFCUZ5F3i7Hnba6snZftWla7Gglwc5pIgcd+E7cW+rPg==", 1645 | "dev": true 1646 | }, 1647 | "escalade": { 1648 | "version": "3.1.1", 1649 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", 1650 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", 1651 | "dev": true 1652 | }, 1653 | "escape-string-regexp": { 1654 | "version": "1.0.5", 1655 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 1656 | "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", 1657 | "dev": true 1658 | }, 1659 | "estree-walker": { 1660 | "version": "1.0.1", 1661 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", 1662 | "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", 1663 | "dev": true 1664 | }, 1665 | "fsevents": { 1666 | "version": "2.3.2", 1667 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 1668 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 1669 | "dev": true, 1670 | "optional": true 1671 | }, 1672 | "function-bind": { 1673 | "version": "1.1.1", 1674 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 1675 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 1676 | "dev": true 1677 | }, 1678 | "gensync": { 1679 | "version": "1.0.0-beta.2", 1680 | "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", 1681 | "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", 1682 | "dev": true 1683 | }, 1684 | "globals": { 1685 | "version": "11.12.0", 1686 | "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", 1687 | "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", 1688 | "dev": true 1689 | }, 1690 | "has": { 1691 | "version": "1.0.3", 1692 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 1693 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 1694 | "dev": true, 1695 | "requires": { 1696 | "function-bind": "^1.1.1" 1697 | } 1698 | }, 1699 | "has-flag": { 1700 | "version": "3.0.0", 1701 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 1702 | "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", 1703 | "dev": true 1704 | }, 1705 | "hyper-dom-expressions": { 1706 | "version": "0.34.12", 1707 | "resolved": "https://registry.npmjs.org/hyper-dom-expressions/-/hyper-dom-expressions-0.34.12.tgz", 1708 | "integrity": "sha512-mz6lUmtWt16Xx4hHjnN32QPV19gfy6Lh+C/ASyn+6Hxsgv2+8Q4P552etfNnhgoIE4c7foRSlvow5OU6m6ljmA==", 1709 | "dev": true 1710 | }, 1711 | "is-builtin-module": { 1712 | "version": "3.2.0", 1713 | "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.0.tgz", 1714 | "integrity": "sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw==", 1715 | "dev": true, 1716 | "requires": { 1717 | "builtin-modules": "^3.3.0" 1718 | } 1719 | }, 1720 | "is-core-module": { 1721 | "version": "2.10.0", 1722 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", 1723 | "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", 1724 | "dev": true, 1725 | "requires": { 1726 | "has": "^1.0.3" 1727 | } 1728 | }, 1729 | "is-module": { 1730 | "version": "1.0.0", 1731 | "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", 1732 | "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", 1733 | "dev": true 1734 | }, 1735 | "js-tokens": { 1736 | "version": "4.0.0", 1737 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 1738 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", 1739 | "dev": true 1740 | }, 1741 | "jsesc": { 1742 | "version": "2.5.2", 1743 | "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", 1744 | "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", 1745 | "dev": true 1746 | }, 1747 | "json5": { 1748 | "version": "2.2.1", 1749 | "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", 1750 | "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", 1751 | "dev": true 1752 | }, 1753 | "lit-dom-expressions": { 1754 | "version": "0.34.12", 1755 | "resolved": "https://registry.npmjs.org/lit-dom-expressions/-/lit-dom-expressions-0.34.12.tgz", 1756 | "integrity": "sha512-Bffcw6tTA4qsBJt034ip28xx9sAx1xMJ56h6lOd4cQ0gC+goVpPiQMkoNLeMUvrcRIPdsOpdjraZHvRO5/H5Rg==", 1757 | "dev": true 1758 | }, 1759 | "mobx": { 1760 | "version": "6.6.2", 1761 | "resolved": "https://registry.npmjs.org/mobx/-/mobx-6.6.2.tgz", 1762 | "integrity": "sha512-IOpS0bf3+hXIhDIy+CmlNMBfFpAbHS0aVHcNC+xH/TFYEKIIVDKNYRh9eKlXuVfJ1iRKAp0cRVmO145CyJAMVQ==", 1763 | "dev": true 1764 | }, 1765 | "ms": { 1766 | "version": "2.1.2", 1767 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1768 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 1769 | "dev": true 1770 | }, 1771 | "ncp": { 1772 | "version": "2.0.0", 1773 | "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", 1774 | "integrity": "sha512-zIdGUrPRFTUELUvr3Gmc7KZ2Sw/h1PiVM0Af/oHB6zgnV1ikqSfRk+TOufi79aHYCW3NiOXmr1BP5nWbzojLaA==", 1775 | "dev": true 1776 | }, 1777 | "node-releases": { 1778 | "version": "2.0.6", 1779 | "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", 1780 | "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", 1781 | "dev": true 1782 | }, 1783 | "path-parse": { 1784 | "version": "1.0.7", 1785 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 1786 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", 1787 | "dev": true 1788 | }, 1789 | "picocolors": { 1790 | "version": "1.0.0", 1791 | "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", 1792 | "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", 1793 | "dev": true 1794 | }, 1795 | "picomatch": { 1796 | "version": "2.3.1", 1797 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 1798 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 1799 | "dev": true 1800 | }, 1801 | "resolve": { 1802 | "version": "1.22.1", 1803 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", 1804 | "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", 1805 | "dev": true, 1806 | "requires": { 1807 | "is-core-module": "^2.9.0", 1808 | "path-parse": "^1.0.7", 1809 | "supports-preserve-symlinks-flag": "^1.0.0" 1810 | } 1811 | }, 1812 | "rollup": { 1813 | "version": "2.79.1", 1814 | "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", 1815 | "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", 1816 | "dev": true, 1817 | "requires": { 1818 | "fsevents": "~2.3.2" 1819 | } 1820 | }, 1821 | "safe-buffer": { 1822 | "version": "5.1.2", 1823 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 1824 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", 1825 | "dev": true 1826 | }, 1827 | "semver": { 1828 | "version": "6.3.0", 1829 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", 1830 | "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", 1831 | "dev": true 1832 | }, 1833 | "supports-color": { 1834 | "version": "5.5.0", 1835 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 1836 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 1837 | "dev": true, 1838 | "requires": { 1839 | "has-flag": "^3.0.0" 1840 | } 1841 | }, 1842 | "supports-preserve-symlinks-flag": { 1843 | "version": "1.0.0", 1844 | "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", 1845 | "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", 1846 | "dev": true 1847 | }, 1848 | "to-fast-properties": { 1849 | "version": "2.0.0", 1850 | "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", 1851 | "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", 1852 | "dev": true 1853 | }, 1854 | "typescript": { 1855 | "version": "4.8.4", 1856 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", 1857 | "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", 1858 | "dev": true 1859 | }, 1860 | "update-browserslist-db": { 1861 | "version": "1.0.10", 1862 | "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", 1863 | "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", 1864 | "dev": true, 1865 | "requires": { 1866 | "escalade": "^3.1.1", 1867 | "picocolors": "^1.0.0" 1868 | } 1869 | } 1870 | } 1871 | } 1872 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mobx-jsx", 3 | "description": "Raw MobX performance without the restraints of a Virtual DOM", 4 | "version": "0.16.0", 5 | "author": "Ryan Carniato", 6 | "license": "MIT", 7 | "repository": { 8 | "type": "git", 9 | "url": "https://github.com/ryansolid/mobx-jsx" 10 | }, 11 | "module": "dist/index.js", 12 | "main": "lib/index.js", 13 | "types": "types/index.d.ts", 14 | "scripts": { 15 | "build": "rollup -c && ncp ./src/client.d.ts ./types/client.d.ts && ncp ./src/jsx.d.ts ./types/jsx.d.ts && tsc", 16 | "prepublishOnly": "npm run build" 17 | }, 18 | "dependencies": { 19 | "csstype": "^3.1.0" 20 | }, 21 | "devDependencies": { 22 | "@babel/core": "7.19.3", 23 | "@babel/preset-typescript": "7.18.6", 24 | "@rollup/plugin-babel": "5.3.1", 25 | "@rollup/plugin-node-resolve": "14.1.0", 26 | "dom-expressions": "0.34.12", 27 | "hyper-dom-expressions": "0.34.12", 28 | "lit-dom-expressions": "0.34.12", 29 | "mobx": "^6.6.2", 30 | "ncp": "2.0.0", 31 | "rollup": "^2.41.4", 32 | "typescript": "4.8.4" 33 | }, 34 | "peerDependencies": { 35 | "mobx": "> 6.0.0" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import babel from '@rollup/plugin-babel'; 2 | import nodeResolve from '@rollup/plugin-node-resolve'; 3 | 4 | const plugins = [ 5 | nodeResolve({ 6 | extensions: ['.js', '.ts'] 7 | }), 8 | babel({ 9 | extensions: ['.js', '.ts'], 10 | babelHelpers: "bundled", 11 | presets: ["@babel/preset-typescript"], 12 | plugins: [ 13 | [ 14 | "babel-plugin-transform-rename-import", 15 | { 16 | original: "rxcore", 17 | replacement: "../../../src/core" 18 | } 19 | ] 20 | ] 21 | }) 22 | ]; 23 | 24 | export default [{ 25 | input: 'src/index.ts', 26 | output: [{ 27 | format: 'cjs', 28 | file: 'lib/index.js' 29 | }, { 30 | format: 'es', 31 | file: 'dist/index.js' 32 | }], 33 | external: ['mobx'], 34 | plugins 35 | }, { 36 | input: 'src/html.ts', 37 | output: [{ 38 | format: 'cjs', 39 | file: 'lib/html.js' 40 | }, { 41 | format: 'es', 42 | file: 'dist/html.js' 43 | }], 44 | external: ['./index', 'mobx'], 45 | plugins 46 | }, { 47 | input: 'src/h.ts', 48 | output: [{ 49 | format: 'cjs', 50 | file: 'lib/h.js' 51 | }, { 52 | format: 'es', 53 | file: 'dist/h.js' 54 | }], 55 | external: ['./index', 'mobx'], 56 | plugins 57 | }]; -------------------------------------------------------------------------------- /src/client.d.ts: -------------------------------------------------------------------------------- 1 | import { JSX } from "./jsx.js"; 2 | export const Aliases: Record; 3 | export const PropAliases: Record; 4 | export const Properties: Set; 5 | export const ChildProperties: Set; 6 | export const DelegatedEvents: Set; 7 | export const DOMElements: Set; 8 | export const SVGElements: Set; 9 | export const SVGNamespace: Record; 10 | 11 | type MountableElement = Element | Document | ShadowRoot | DocumentFragment | Node; 12 | export function render(code: () => JSX.Element, element: MountableElement): () => void; 13 | export function template(html: string, count: number, isSVG?: boolean): Element; 14 | export function effect(fn: (prev?: T) => T, init?: T): void; 15 | export function memo(fn: () => T, equal: boolean): () => T; 16 | export function untrack(fn: () => T): T; 17 | export function insert( 18 | parent: MountableElement, 19 | accessor: (() => T) | T, 20 | marker?: Node | null, 21 | init?: JSX.Element 22 | ): JSX.Element; 23 | export function createComponent(Comp: (props: T) => JSX.Element, props: T): JSX.Element; 24 | export function delegateEvents(eventNames: string[], d?: Document): void; 25 | export function clearDelegatedEvents(d?: Document): void; 26 | export function spread( 27 | node: Element, 28 | accessor: (() => T) | T, 29 | isSVG?: Boolean, 30 | skipChildren?: Boolean 31 | ): void; 32 | export function assign(node: Element, props: any, isSVG?: Boolean, skipChildren?: Boolean): void; 33 | export function setAttribute(node: Element, name: string, value: string): void; 34 | export function setAttributeNS(node: Element, namespace: string, name: string, value: string): void; 35 | export function className(node: Element, value: string): void; 36 | export function innerHTML(node: Element, content: string): void; 37 | export function addEventListener( 38 | node: Element, 39 | name: string, 40 | handler: () => void, 41 | delegate: boolean 42 | ): void; 43 | export function classList( 44 | node: Element, 45 | value: { [k: string]: boolean }, 46 | prev?: { [k: string]: boolean } 47 | ): void; 48 | export function style( 49 | node: Element, 50 | value: { [k: string]: string }, 51 | prev?: { [k: string]: string } 52 | ): void; 53 | export function getOwner(): unknown; 54 | export function mergeProps(...sources: unknown[]): unknown; 55 | export function dynamicProperty(props: unknown, key: string): unknown; 56 | 57 | export function hydrate( 58 | fn: () => JSX.Element, 59 | node: MountableElement, 60 | options?: { renderId?: string } 61 | ): () => void; 62 | export function getHydrationKey(): string; 63 | export function getNextElement(template?: HTMLTemplateElement): Element; 64 | export function getNextMatch(start: Node, elementName: string): Element; 65 | export function getNextMarker(start: Node): [Node, Array]; 66 | export function useAssets(fn: () => string): void; 67 | export function getAssets(): string; 68 | export function Assets(props: { children?: JSX.Element }): JSX.Element; 69 | export function HydrationScript(): JSX.Element; 70 | export function NoHydration(props: { children?: JSX.Element }): JSX.Element; 71 | export function generateHydrationScript(): string; -------------------------------------------------------------------------------- /src/client.js: -------------------------------------------------------------------------------- 1 | export * from "dom-expressions/src/client"; -------------------------------------------------------------------------------- /src/core.ts: -------------------------------------------------------------------------------- 1 | export { 2 | root, 3 | effect, 4 | memo, 5 | createComponent, 6 | untrack 7 | } from "./lib" 8 | 9 | export const sharedConfig = {}; 10 | export const getOwner = null; -------------------------------------------------------------------------------- /src/h.ts: -------------------------------------------------------------------------------- 1 | import { createHyperScript } from "hyper-dom-expressions"; 2 | import { spread, assign, insert, createComponent, dynamicProperty, SVGElements } from "./index.js"; 3 | 4 | export const h = createHyperScript({ 5 | spread, 6 | assign, 7 | insert, 8 | createComponent, 9 | dynamicProperty, 10 | SVGElements 11 | }); 12 | 13 | export * from './index'; -------------------------------------------------------------------------------- /src/html.ts: -------------------------------------------------------------------------------- 1 | import { createHTML } from "lit-dom-expressions"; 2 | import { 3 | effect, 4 | style, 5 | insert, 6 | untrack, 7 | spread, 8 | createComponent, 9 | delegateEvents, 10 | classList, 11 | dynamicProperty, 12 | mergeProps, 13 | setAttribute, 14 | setAttributeNS, 15 | addEventListener, 16 | Aliases, 17 | PropAliases, 18 | Properties, 19 | ChildProperties, 20 | DelegatedEvents, 21 | SVGElements, 22 | SVGNamespace 23 | } from "./index.js"; 24 | 25 | export const html = createHTML({ 26 | effect, 27 | style, 28 | insert, 29 | untrack, 30 | spread, 31 | createComponent, 32 | delegateEvents, 33 | classList, 34 | mergeProps, 35 | dynamicProperty, 36 | setAttribute, 37 | setAttributeNS, 38 | addEventListener, 39 | Aliases, 40 | PropAliases, 41 | Properties, 42 | ChildProperties, 43 | DelegatedEvents, 44 | SVGElements, 45 | SVGNamespace 46 | }); 47 | 48 | export { root, cleanup } from "./index"; 49 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | export { root, cleanup, createSelector, Component, lazy, createContext, useContext, map, splitProps, untrack } from "./lib"; 2 | export type { Context, FunctionComponent, ComponentProps } from "./lib"; 3 | export * from "./client"; 4 | 5 | export type { JSX } from "./jsx" 6 | -------------------------------------------------------------------------------- /src/jsx.d.ts: -------------------------------------------------------------------------------- 1 | import * as csstype from 'csstype'; 2 | 3 | /** 4 | * Based on JSX types for Surplus and Inferno and adapted for `dom-expressions`. 5 | * 6 | * https://github.com/adamhaile/surplus/blob/master/index.d.ts 7 | * https://github.com/infernojs/inferno/blob/master/packages/inferno/src/core/types.ts 8 | */ 9 | type DOMElement = Element; 10 | 11 | export namespace JSX { 12 | type Element = 13 | | Node 14 | | ArrayElement 15 | | FunctionElement 16 | | (string & {}) 17 | | number 18 | | boolean 19 | | null 20 | | undefined; 21 | interface ArrayElement extends Array {} 22 | interface FunctionElement { 23 | (): Element; 24 | } 25 | interface ElementClass { 26 | // empty, libs can define requirements downstream 27 | } 28 | interface ElementAttributesProperty { 29 | // empty, libs can define requirements downstream 30 | } 31 | interface ElementChildrenAttribute { 32 | children: {}; 33 | } 34 | interface EventHandler { 35 | ( 36 | e: E & { 37 | currentTarget: T; 38 | target: DOMElement; 39 | } 40 | ): void; 41 | } 42 | interface BoundEventHandler { 43 | 0: ( 44 | data: any, 45 | e: E & { 46 | currentTarget: T; 47 | target: DOMElement; 48 | } 49 | ) => void; 50 | 1: any; 51 | } 52 | type EventHandlerUnion = EventHandler | BoundEventHandler; 53 | interface IntrinsicAttributes { 54 | ref?: unknown | ((e: unknown) => void); 55 | } 56 | interface CustomAttributes { 57 | ref?: T | ((el: T) => void); 58 | classList?: { 59 | [k: string]: boolean | undefined; 60 | }; 61 | $ServerOnly?: boolean; 62 | } 63 | type Accessor = () => T 64 | interface Directives {} 65 | interface DirectiveFunctions { 66 | [x: string]: (el: Element, accessor: Accessor) => void; 67 | } 68 | interface ExplicitProperties {} 69 | interface ExplicitAttributes {} 70 | interface CustomEvents {} 71 | interface CustomCaptureEvents {} 72 | type DirectiveAttributes = { 73 | [Key in keyof Directives as `use:${Key}`]?: Directives[Key]; 74 | }; 75 | type DirectiveFunctionAttributes = { 76 | [K in keyof DirectiveFunctions as string extends K ? never : `use:${K}`]?: DirectiveFunctions[K] extends ( 77 | el: infer E, // will be unknown if not provided 78 | ...rest: infer R // use rest so that we can check whether it's provided or not 79 | ) => void 80 | ? T extends E // everything extends unknown if E is unknown 81 | ? R extends [infer A] // check if has accessor provided 82 | ? A extends Accessor 83 | ? V // it's an accessor 84 | : never // it isn't, type error 85 | : true // no accessor provided 86 | : never // T is the wrong element 87 | : never; // it isn't a function 88 | }; 89 | type PropAttributes = { 90 | [Key in keyof ExplicitProperties as `prop:${Key}`]?: ExplicitProperties[Key]; 91 | }; 92 | type AttrAttributes = { 93 | [Key in keyof ExplicitAttributes as `attr:${Key}`]?: ExplicitAttributes[Key]; 94 | }; 95 | type OnAttributes = { 96 | [Key in keyof CustomEvents as `on:${Key}`]?: EventHandler; 97 | } 98 | type OnCaptureAttributes = { 99 | [Key in keyof CustomCaptureEvents as `oncapture:${Key}`]?: EventHandler; 100 | } 101 | interface DOMAttributes extends CustomAttributes, DirectiveAttributes, DirectiveFunctionAttributes, PropAttributes, AttrAttributes, OnAttributes, OnCaptureAttributes { 102 | children?: Element; 103 | innerHTML?: string; 104 | innerText?: string | number; 105 | textContent?: string | number; 106 | onCopy?: EventHandlerUnion; 107 | onCut?: EventHandlerUnion; 108 | onPaste?: EventHandlerUnion; 109 | onCompositionEnd?: EventHandlerUnion; 110 | onCompositionStart?: EventHandlerUnion; 111 | onCompositionUpdate?: EventHandlerUnion; 112 | onFocus?: EventHandlerUnion; 113 | onFocusOut?: EventHandlerUnion; 114 | onFocusIn?: EventHandlerUnion; 115 | onBlur?: EventHandlerUnion; 116 | onChange?: EventHandlerUnion; 117 | onInvalid?: EventHandlerUnion; 118 | onInput?: EventHandlerUnion; 119 | onBeforeInput?: EventHandlerUnion; 120 | onReset?: EventHandlerUnion; 121 | onSubmit?: EventHandlerUnion< 122 | T, 123 | Event & { 124 | submitter: HTMLElement; 125 | } 126 | >; 127 | onLoad?: EventHandlerUnion; 128 | onError?: EventHandlerUnion; 129 | onKeyDown?: EventHandlerUnion; 130 | onKeyPress?: EventHandlerUnion; 131 | onKeyUp?: EventHandlerUnion; 132 | onGotPointerCapture?: EventHandlerUnion; 133 | onLostPointerCapture?: EventHandlerUnion; 134 | onPointerCancel?: EventHandlerUnion; 135 | onPointerDown?: EventHandlerUnion; 136 | onPointerEnter?: EventHandlerUnion; 137 | onPointerLeave?: EventHandlerUnion; 138 | onPointerMove?: EventHandlerUnion; 139 | onPointerOver?: EventHandlerUnion; 140 | onPointerOut?: EventHandlerUnion; 141 | onPointerUp?: EventHandlerUnion; 142 | onAbort?: EventHandlerUnion; 143 | onCanPlay?: EventHandlerUnion; 144 | onCanPlayThrough?: EventHandlerUnion; 145 | onDurationChange?: EventHandlerUnion; 146 | onEmptied?: EventHandlerUnion; 147 | onEncrypted?: EventHandlerUnion; 148 | onEnded?: EventHandlerUnion; 149 | onLoadedData?: EventHandlerUnion; 150 | onLoadedMetadata?: EventHandlerUnion; 151 | onLoadStart?: EventHandlerUnion; 152 | onPause?: EventHandlerUnion; 153 | onPlay?: EventHandlerUnion; 154 | onPlaying?: EventHandlerUnion; 155 | onProgress?: EventHandlerUnion; 156 | onRateChange?: EventHandlerUnion; 157 | onSeeked?: EventHandlerUnion; 158 | onSeeking?: EventHandlerUnion; 159 | onStalled?: EventHandlerUnion; 160 | onSuspend?: EventHandlerUnion; 161 | onTimeUpdate?: EventHandlerUnion; 162 | onVolumeChange?: EventHandlerUnion; 163 | onWaiting?: EventHandlerUnion; 164 | onClick?: EventHandlerUnion; 165 | onAuxClick?: EventHandlerUnion; 166 | onContextMenu?: EventHandlerUnion; 167 | onDblClick?: EventHandlerUnion; 168 | onDrag?: EventHandlerUnion; 169 | onDragEnd?: EventHandlerUnion; 170 | onDragEnter?: EventHandlerUnion; 171 | onDragExit?: EventHandlerUnion; 172 | onDragLeave?: EventHandlerUnion; 173 | onDragOver?: EventHandlerUnion; 174 | onDragStart?: EventHandlerUnion; 175 | onDrop?: EventHandlerUnion; 176 | onMouseDown?: EventHandlerUnion; 177 | onMouseEnter?: EventHandlerUnion; 178 | onMouseLeave?: EventHandlerUnion; 179 | onMouseMove?: EventHandlerUnion; 180 | onMouseOut?: EventHandlerUnion; 181 | onMouseOver?: EventHandlerUnion; 182 | onMouseUp?: EventHandlerUnion; 183 | onSelect?: EventHandlerUnion; 184 | onTouchCancel?: EventHandlerUnion; 185 | onTouchEnd?: EventHandlerUnion; 186 | onTouchMove?: EventHandlerUnion; 187 | onTouchStart?: EventHandlerUnion; 188 | onScroll?: EventHandlerUnion; 189 | onWheel?: EventHandlerUnion; 190 | onAnimationStart?: EventHandlerUnion; 191 | onAnimationEnd?: EventHandlerUnion; 192 | onAnimationIteration?: EventHandlerUnion; 193 | onTransitionEnd?: EventHandlerUnion; 194 | 195 | // lower case events 196 | oncopy?: EventHandlerUnion; 197 | oncut?: EventHandlerUnion; 198 | onpaste?: EventHandlerUnion; 199 | oncompositionend?: EventHandlerUnion; 200 | oncompositionstart?: EventHandlerUnion; 201 | oncompositionupdate?: EventHandlerUnion; 202 | onfocus?: EventHandlerUnion; 203 | onfocusout?: EventHandlerUnion; 204 | onfocusin?: EventHandlerUnion; 205 | onblur?: EventHandlerUnion; 206 | onchange?: EventHandlerUnion; 207 | oninvalid?: EventHandlerUnion; 208 | oninput?: EventHandlerUnion; 209 | onbeforeinput?: EventHandlerUnion; 210 | onreset?: EventHandlerUnion; 211 | onsubmit?: EventHandlerUnion< 212 | T, 213 | Event & { 214 | submitter: HTMLElement; 215 | } 216 | >; 217 | onload?: EventHandlerUnion; 218 | onerror?: EventHandlerUnion; 219 | onkeydown?: EventHandlerUnion; 220 | onkeypress?: EventHandlerUnion; 221 | onkeyup?: EventHandlerUnion; 222 | ongotpointercapture?: EventHandlerUnion; 223 | onlostpointercapture?: EventHandlerUnion; 224 | onpointercancel?: EventHandlerUnion; 225 | onpointerdown?: EventHandlerUnion; 226 | onpointerenter?: EventHandlerUnion; 227 | onpointerleave?: EventHandlerUnion; 228 | onpointermove?: EventHandlerUnion; 229 | onpointerover?: EventHandlerUnion; 230 | onpointerout?: EventHandlerUnion; 231 | onpointerup?: EventHandlerUnion; 232 | onabort?: EventHandlerUnion; 233 | oncanplay?: EventHandlerUnion; 234 | oncanplaythrough?: EventHandlerUnion; 235 | ondurationchange?: EventHandlerUnion; 236 | onemptied?: EventHandlerUnion; 237 | onencrypted?: EventHandlerUnion; 238 | onended?: EventHandlerUnion; 239 | onloadeddata?: EventHandlerUnion; 240 | onloadedmetadata?: EventHandlerUnion; 241 | onloadstart?: EventHandlerUnion; 242 | onpause?: EventHandlerUnion; 243 | onplay?: EventHandlerUnion; 244 | onplaying?: EventHandlerUnion; 245 | onprogress?: EventHandlerUnion; 246 | onratechange?: EventHandlerUnion; 247 | onseeked?: EventHandlerUnion; 248 | onseeking?: EventHandlerUnion; 249 | onstalled?: EventHandlerUnion; 250 | onsuspend?: EventHandlerUnion; 251 | ontimeupdate?: EventHandlerUnion; 252 | onvolumechange?: EventHandlerUnion; 253 | onwaiting?: EventHandlerUnion; 254 | onclick?: EventHandlerUnion; 255 | onauxclick?: EventHandlerUnion; 256 | oncontextmenu?: EventHandlerUnion; 257 | ondblclick?: EventHandlerUnion; 258 | ondrag?: EventHandlerUnion; 259 | ondragend?: EventHandlerUnion; 260 | ondragenter?: EventHandlerUnion; 261 | ondragexit?: EventHandlerUnion; 262 | ondragleave?: EventHandlerUnion; 263 | ondragover?: EventHandlerUnion; 264 | ondragstart?: EventHandlerUnion; 265 | ondrop?: EventHandlerUnion; 266 | onmousedown?: EventHandlerUnion; 267 | onmouseenter?: EventHandlerUnion; 268 | onmouseleave?: EventHandlerUnion; 269 | onmousemove?: EventHandlerUnion; 270 | onmouseout?: EventHandlerUnion; 271 | onmouseover?: EventHandlerUnion; 272 | onmouseup?: EventHandlerUnion; 273 | onselect?: EventHandlerUnion; 274 | ontouchcancel?: EventHandlerUnion; 275 | ontouchend?: EventHandlerUnion; 276 | ontouchmove?: EventHandlerUnion; 277 | ontouchstart?: EventHandlerUnion; 278 | onscroll?: EventHandlerUnion; 279 | onwheel?: EventHandlerUnion; 280 | onanimationstart?: EventHandlerUnion; 281 | onanimationend?: EventHandlerUnion; 282 | onanimationiteration?: EventHandlerUnion; 283 | ontransitionend?: EventHandlerUnion; 284 | } 285 | 286 | interface CSSProperties extends csstype.PropertiesHyphen { 287 | // Override 288 | [key: `-${string}`]: string | number | undefined 289 | } 290 | 291 | type HTMLAutocapitalize = "off" | "none" | "on" | "sentences" | "words" | "characters"; 292 | type HTMLDir = "ltr" | "rtl" | "auto"; 293 | type HTMLFormEncType = "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain"; 294 | type HTMLFormMethod = "post" | "get" | "dialog"; 295 | type HTMLCrossorigin = "anonymous" | "use-credentials" | ""; 296 | type HTMLReferrerPolicy = 297 | | "no-referrer" 298 | | "no-referrer-when-downgrade" 299 | | "origin" 300 | | "origin-when-cross-origin" 301 | | "same-origin" 302 | | "strict-origin" 303 | | "strict-origin-when-cross-origin" 304 | | "unsafe-url"; 305 | type HTMLIframeSandbox = 306 | | "allow-downloads-without-user-activation" 307 | | "allow-downloads" 308 | | "allow-forms" 309 | | "allow-modals" 310 | | "allow-orientation-lock" 311 | | "allow-pointer-lock" 312 | | "allow-popups" 313 | | "allow-popups-to-escape-sandbox" 314 | | "allow-presentation" 315 | | "allow-same-origin" 316 | | "allow-scripts" 317 | | "allow-storage-access-by-user-activation" 318 | | "allow-top-navigation" 319 | | "allow-top-navigation-by-user-activation"; 320 | type HTMLLinkAs = 321 | | "audio" 322 | | "document" 323 | | "embed" 324 | | "fetch" 325 | | "font" 326 | | "image" 327 | | "object" 328 | | "script" 329 | | "style" 330 | | "track" 331 | | "video" 332 | | "worker"; 333 | 334 | // All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/ 335 | interface AriaAttributes { 336 | /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */ 337 | "aria-activedescendant"?: string; 338 | /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */ 339 | "aria-atomic"?: boolean | "false" | "true"; 340 | /** 341 | * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be 342 | * presented if they are made. 343 | */ 344 | "aria-autocomplete"?: "none" | "inline" | "list" | "both"; 345 | /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */ 346 | "aria-busy"?: boolean | "false" | "true"; 347 | /** 348 | * Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. 349 | * @see aria-pressed @see aria-selected. 350 | */ 351 | "aria-checked"?: boolean | "false" | "mixed" | "true"; 352 | /** 353 | * Defines the total number of columns in a table, grid, or treegrid. 354 | * @see aria-colindex. 355 | */ 356 | "aria-colcount"?: number | string; 357 | /** 358 | * Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. 359 | * @see aria-colcount @see aria-colspan. 360 | */ 361 | "aria-colindex"?: number | string; 362 | /** 363 | * Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. 364 | * @see aria-colindex @see aria-rowspan. 365 | */ 366 | "aria-colspan"?: number | string; 367 | /** 368 | * Identifies the element (or elements) whose contents or presence are controlled by the current element. 369 | * @see aria-owns. 370 | */ 371 | "aria-controls"?: string; 372 | /** Indicates the element that represents the current item within a container or set of related elements. */ 373 | "aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time"; 374 | /** 375 | * Identifies the element (or elements) that describes the object. 376 | * @see aria-labelledby 377 | */ 378 | "aria-describedby"?: string; 379 | /** 380 | * Identifies the element that provides a detailed, extended description for the object. 381 | * @see aria-describedby. 382 | */ 383 | "aria-details"?: string; 384 | /** 385 | * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. 386 | * @see aria-hidden @see aria-readonly. 387 | */ 388 | "aria-disabled"?: boolean | "false" | "true"; 389 | /** 390 | * Indicates what functions can be performed when a dragged object is released on the drop target. 391 | * @deprecated in ARIA 1.1 392 | */ 393 | "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup"; 394 | /** 395 | * Identifies the element that provides an error message for the object. 396 | * @see aria-invalid @see aria-describedby. 397 | */ 398 | "aria-errormessage"?: string; 399 | /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */ 400 | "aria-expanded"?: boolean | "false" | "true"; 401 | /** 402 | * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, 403 | * allows assistive technology to override the general default of reading in document source order. 404 | */ 405 | "aria-flowto"?: string; 406 | /** 407 | * Indicates an element's "grabbed" state in a drag-and-drop operation. 408 | * @deprecated in ARIA 1.1 409 | */ 410 | "aria-grabbed"?: boolean | "false" | "true"; 411 | /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */ 412 | "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog"; 413 | /** 414 | * Indicates whether the element is exposed to an accessibility API. 415 | * @see aria-disabled. 416 | */ 417 | "aria-hidden"?: boolean | "false" | "true"; 418 | /** 419 | * Indicates the entered value does not conform to the format expected by the application. 420 | * @see aria-errormessage. 421 | */ 422 | "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling"; 423 | /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */ 424 | "aria-keyshortcuts"?: string; 425 | /** 426 | * Defines a string value that labels the current element. 427 | * @see aria-labelledby. 428 | */ 429 | "aria-label"?: string; 430 | /** 431 | * Identifies the element (or elements) that labels the current element. 432 | * @see aria-describedby. 433 | */ 434 | "aria-labelledby"?: string; 435 | /** Defines the hierarchical level of an element within a structure. */ 436 | "aria-level"?: number | string; 437 | /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */ 438 | "aria-live"?: "off" | "assertive" | "polite"; 439 | /** Indicates whether an element is modal when displayed. */ 440 | "aria-modal"?: boolean | "false" | "true"; 441 | /** Indicates whether a text box accepts multiple lines of input or only a single line. */ 442 | "aria-multiline"?: boolean | "false" | "true"; 443 | /** Indicates that the user may select more than one item from the current selectable descendants. */ 444 | "aria-multiselectable"?: boolean | "false" | "true"; 445 | /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */ 446 | "aria-orientation"?: "horizontal" | "vertical"; 447 | /** 448 | * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship 449 | * between DOM elements where the DOM hierarchy cannot be used to represent the relationship. 450 | * @see aria-controls. 451 | */ 452 | "aria-owns"?: string; 453 | /** 454 | * Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. 455 | * A hint could be a sample value or a brief description of the expected format. 456 | */ 457 | "aria-placeholder"?: string; 458 | /** 459 | * Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. 460 | * @see aria-setsize. 461 | */ 462 | "aria-posinset"?: number | string; 463 | /** 464 | * Indicates the current "pressed" state of toggle buttons. 465 | * @see aria-checked @see aria-selected. 466 | */ 467 | "aria-pressed"?: boolean | "false" | "mixed" | "true"; 468 | /** 469 | * Indicates that the element is not editable, but is otherwise operable. 470 | * @see aria-disabled. 471 | */ 472 | "aria-readonly"?: boolean | "false" | "true"; 473 | /** 474 | * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. 475 | * @see aria-atomic. 476 | */ 477 | "aria-relevant"?: 478 | | "additions" 479 | | "additions removals" 480 | | "additions text" 481 | | "all" 482 | | "removals" 483 | | "removals additions" 484 | | "removals text" 485 | | "text" 486 | | "text additions" 487 | | "text removals"; 488 | /** Indicates that user input is required on the element before a form may be submitted. */ 489 | "aria-required"?: boolean | "false" | "true"; 490 | /** Defines a human-readable, author-localized description for the role of an element. */ 491 | "aria-roledescription"?: string; 492 | /** 493 | * Defines the total number of rows in a table, grid, or treegrid. 494 | * @see aria-rowindex. 495 | */ 496 | "aria-rowcount"?: number | string; 497 | /** 498 | * Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. 499 | * @see aria-rowcount @see aria-rowspan. 500 | */ 501 | "aria-rowindex"?: number | string; 502 | /** 503 | * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. 504 | * @see aria-rowindex @see aria-colspan. 505 | */ 506 | "aria-rowspan"?: number | string; 507 | /** 508 | * Indicates the current "selected" state of various widgets. 509 | * @see aria-checked @see aria-pressed. 510 | */ 511 | "aria-selected"?: boolean | "false" | "true"; 512 | /** 513 | * Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. 514 | * @see aria-posinset. 515 | */ 516 | "aria-setsize"?: number | string; 517 | /** Indicates if items in a table or grid are sorted in ascending or descending order. */ 518 | "aria-sort"?: "none" | "ascending" | "descending" | "other"; 519 | /** Defines the maximum allowed value for a range widget. */ 520 | "aria-valuemax"?: number | string; 521 | /** Defines the minimum allowed value for a range widget. */ 522 | "aria-valuemin"?: number | string; 523 | /** 524 | * Defines the current value for a range widget. 525 | * @see aria-valuetext. 526 | */ 527 | "aria-valuenow"?: number | string; 528 | /** Defines the human readable text alternative of aria-valuenow for a range widget. */ 529 | "aria-valuetext"?: string; 530 | role?: 531 | | "alert" 532 | | "alertdialog" 533 | | "application" 534 | | "article" 535 | | "banner" 536 | | "button" 537 | | "cell" 538 | | "checkbox" 539 | | "columnheader" 540 | | "combobox" 541 | | "complementary" 542 | | "contentinfo" 543 | | "definition" 544 | | "dialog" 545 | | "directory" 546 | | "document" 547 | | "feed" 548 | | "figure" 549 | | "form" 550 | | "grid" 551 | | "gridcell" 552 | | "group" 553 | | "heading" 554 | | "img" 555 | | "link" 556 | | "list" 557 | | "listbox" 558 | | "listitem" 559 | | "log" 560 | | "main" 561 | | "marquee" 562 | | "math" 563 | | "menu" 564 | | "menubar" 565 | | "menuitem" 566 | | "menuitemcheckbox" 567 | | "menuitemradio" 568 | | "meter" 569 | | "navigation" 570 | | "none" 571 | | "note" 572 | | "option" 573 | | "presentation" 574 | | "progressbar" 575 | | "radio" 576 | | "radiogroup" 577 | | "region" 578 | | "row" 579 | | "rowgroup" 580 | | "rowheader" 581 | | "scrollbar" 582 | | "search" 583 | | "searchbox" 584 | | "separator" 585 | | "slider" 586 | | "spinbutton" 587 | | "status" 588 | | "switch" 589 | | "tab" 590 | | "table" 591 | | "tablist" 592 | | "tabpanel" 593 | | "term" 594 | | "textbox" 595 | | "timer" 596 | | "toolbar" 597 | | "tooltip" 598 | | "tree" 599 | | "treegrid" 600 | | "treeitem"; 601 | } 602 | 603 | // TODO: Should we allow this? 604 | // type ClassKeys = `class:${string}`; 605 | // type CSSKeys = Exclude; 606 | 607 | // type CSSAttributes = { 608 | // [key in CSSKeys as `style:${key}`]: csstype.PropertiesHyphen[key]; 609 | // }; 610 | 611 | interface HTMLAttributes extends AriaAttributes, DOMAttributes { 612 | // [key: ClassKeys]: boolean; 613 | accessKey?: string; 614 | class?: string; 615 | contenteditable?: boolean | "inherit"; 616 | contextmenu?: string; 617 | dir?: HTMLDir; 618 | draggable?: boolean; 619 | hidden?: boolean; 620 | id?: string; 621 | lang?: string; 622 | spellcheck?: boolean; 623 | style?: CSSProperties | string; 624 | tabindex?: number | string; 625 | title?: string; 626 | translate?: "yes" | "no"; 627 | about?: string; 628 | datatype?: string; 629 | inlist?: any; 630 | prefix?: string; 631 | property?: string; 632 | resource?: string; 633 | typeof?: string; 634 | vocab?: string; 635 | autocapitalize?: HTMLAutocapitalize; 636 | slot?: string; 637 | color?: string; 638 | itemprop?: string; 639 | itemscope?: boolean; 640 | itemtype?: string; 641 | itemid?: string; 642 | itemref?: string; 643 | part?: string; 644 | exportparts?: string; 645 | inputmode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search"; 646 | contentEditable?: boolean | "inherit"; 647 | contextMenu?: string; 648 | tabIndex?: number | string; 649 | autoCapitalize?: HTMLAutocapitalize; 650 | itemProp?: string; 651 | itemScope?: boolean; 652 | itemType?: string; 653 | itemId?: string; 654 | itemRef?: string; 655 | exportParts?: string; 656 | inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search"; 657 | } 658 | interface AnchorHTMLAttributes extends HTMLAttributes { 659 | download?: any; 660 | href?: string; 661 | hreflang?: string; 662 | media?: string; 663 | ping?: string; 664 | referrerpolicy?: HTMLReferrerPolicy; 665 | rel?: string; 666 | target?: string; 667 | type?: string; 668 | referrerPolicy?: HTMLReferrerPolicy; 669 | } 670 | interface AudioHTMLAttributes extends MediaHTMLAttributes {} 671 | interface AreaHTMLAttributes extends HTMLAttributes { 672 | alt?: string; 673 | coords?: string; 674 | download?: any; 675 | href?: string; 676 | hreflang?: string; 677 | ping?: string; 678 | referrerpolicy?: HTMLReferrerPolicy; 679 | rel?: string; 680 | shape?: "rect" | "circle" | "poly" | "default"; 681 | target?: string; 682 | referrerPolicy?: HTMLReferrerPolicy; 683 | } 684 | interface BaseHTMLAttributes extends HTMLAttributes { 685 | href?: string; 686 | target?: string; 687 | } 688 | interface BlockquoteHTMLAttributes extends HTMLAttributes { 689 | cite?: string; 690 | } 691 | interface ButtonHTMLAttributes extends HTMLAttributes { 692 | autofocus?: boolean; 693 | disabled?: boolean; 694 | form?: string; 695 | formaction?: string; 696 | formenctype?: HTMLFormEncType; 697 | formmethod?: HTMLFormMethod; 698 | formnovalidate?: boolean; 699 | formtarget?: string; 700 | name?: string; 701 | type?: "submit" | "reset" | "button"; 702 | value?: string; 703 | formAction?: string; 704 | formEnctype?: HTMLFormEncType; 705 | formMethod?: HTMLFormMethod; 706 | formNoValidate?: boolean; 707 | formTarget?: string; 708 | } 709 | interface CanvasHTMLAttributes extends HTMLAttributes { 710 | width?: number | string; 711 | height?: number | string; 712 | } 713 | interface ColHTMLAttributes extends HTMLAttributes { 714 | span?: number | string; 715 | width?: number | string; 716 | } 717 | interface ColgroupHTMLAttributes extends HTMLAttributes { 718 | span?: number | string; 719 | } 720 | interface DataHTMLAttributes extends HTMLAttributes { 721 | value?: string | string[] | number; 722 | } 723 | interface DetailsHtmlAttributes extends HTMLAttributes { 724 | open?: boolean; 725 | onToggle?: EventHandlerUnion; 726 | ontoggle?: EventHandlerUnion; 727 | } 728 | interface DialogHtmlAttributes extends HTMLAttributes { 729 | open?: boolean; 730 | } 731 | interface EmbedHTMLAttributes extends HTMLAttributes { 732 | height?: number | string; 733 | src?: string; 734 | type?: string; 735 | width?: number | string; 736 | } 737 | interface FieldsetHTMLAttributes extends HTMLAttributes { 738 | disabled?: boolean; 739 | form?: string; 740 | name?: string; 741 | } 742 | interface FormHTMLAttributes extends HTMLAttributes { 743 | acceptcharset?: string; 744 | action?: string; 745 | autocomplete?: string; 746 | encoding?: HTMLFormEncType; 747 | enctype?: HTMLFormEncType; 748 | method?: HTMLFormMethod; 749 | name?: string; 750 | novalidate?: boolean; 751 | target?: string; 752 | acceptCharset?: string; 753 | noValidate?: boolean; 754 | } 755 | interface IframeHTMLAttributes extends HTMLAttributes { 756 | allow?: string; 757 | allowfullscreen?: boolean; 758 | height?: number | string; 759 | name?: string; 760 | referrerpolicy?: HTMLReferrerPolicy; 761 | sandbox?: HTMLIframeSandbox | string; 762 | src?: string; 763 | srcdoc?: string; 764 | width?: number | string; 765 | referrerPolicy?: HTMLReferrerPolicy; 766 | } 767 | interface ImgHTMLAttributes extends HTMLAttributes { 768 | alt?: string; 769 | crossorigin?: HTMLCrossorigin; 770 | decoding?: "sync" | "async" | "auto"; 771 | height?: number | string; 772 | ismap?: boolean; 773 | isMap?: boolean; 774 | loading?: "eager" | "lazy"; 775 | referrerpolicy?: HTMLReferrerPolicy; 776 | referrerPolicy?: HTMLReferrerPolicy; 777 | sizes?: string; 778 | src?: string; 779 | srcset?: string; 780 | srcSet?: string; 781 | usemap?: string; 782 | useMap?: string; 783 | width?: number | string; 784 | crossOrigin?: HTMLCrossorigin; 785 | } 786 | interface InputHTMLAttributes extends HTMLAttributes { 787 | accept?: string; 788 | alt?: string; 789 | autocomplete?: string; 790 | autofocus?: boolean; 791 | capture?: boolean | string; 792 | checked?: boolean; 793 | crossorigin?: HTMLCrossorigin; 794 | disabled?: boolean; 795 | form?: string; 796 | formaction?: string; 797 | formenctype?: HTMLFormEncType; 798 | formmethod?: HTMLFormMethod; 799 | formnovalidate?: boolean; 800 | formtarget?: string; 801 | height?: number | string; 802 | list?: string; 803 | max?: number | string; 804 | maxlength?: number | string; 805 | min?: number | string; 806 | minlength?: number | string; 807 | multiple?: boolean; 808 | name?: string; 809 | pattern?: string; 810 | placeholder?: string; 811 | readonly?: boolean; 812 | required?: boolean; 813 | size?: number | string; 814 | src?: string; 815 | step?: number | string; 816 | type?: string; 817 | value?: string | string[] | number; 818 | width?: number | string; 819 | crossOrigin?: HTMLCrossorigin; 820 | formAction?: string; 821 | formEnctype?: HTMLFormEncType; 822 | formMethod?: HTMLFormMethod; 823 | formNoValidate?: boolean; 824 | formTarget?: string; 825 | maxLength?: number | string; 826 | minLength?: number | string; 827 | readOnly?: boolean; 828 | } 829 | interface InsHTMLAttributes extends HTMLAttributes { 830 | cite?: string; 831 | dateTime?: string; 832 | } 833 | interface KeygenHTMLAttributes extends HTMLAttributes { 834 | autofocus?: boolean; 835 | challenge?: string; 836 | disabled?: boolean; 837 | form?: string; 838 | keytype?: string; 839 | keyparams?: string; 840 | name?: string; 841 | } 842 | interface LabelHTMLAttributes extends HTMLAttributes { 843 | for?: string; 844 | form?: string; 845 | } 846 | interface LiHTMLAttributes extends HTMLAttributes { 847 | value?: number | string; 848 | } 849 | interface LinkHTMLAttributes extends HTMLAttributes { 850 | as?: HTMLLinkAs; 851 | crossorigin?: HTMLCrossorigin; 852 | disabled?: boolean; 853 | href?: string; 854 | hreflang?: string; 855 | integrity?: string; 856 | media?: string; 857 | referrerpolicy?: HTMLReferrerPolicy; 858 | rel?: string; 859 | sizes?: string; 860 | type?: string; 861 | crossOrigin?: HTMLCrossorigin; 862 | referrerPolicy?: HTMLReferrerPolicy; 863 | } 864 | interface MapHTMLAttributes extends HTMLAttributes { 865 | name?: string; 866 | } 867 | interface MediaHTMLAttributes extends HTMLAttributes { 868 | autoplay?: boolean; 869 | controls?: boolean; 870 | crossorigin?: HTMLCrossorigin; 871 | loop?: boolean; 872 | mediagroup?: string; 873 | muted?: boolean; 874 | preload?: "none" | "metadata" | "auto" | ""; 875 | src?: string; 876 | crossOrigin?: HTMLCrossorigin; 877 | mediaGroup?: string; 878 | } 879 | interface MenuHTMLAttributes extends HTMLAttributes { 880 | label?: string; 881 | type?: "context" | "toolbar"; 882 | } 883 | interface MetaHTMLAttributes extends HTMLAttributes { 884 | charset?: string; 885 | content?: string; 886 | httpequiv?: string; 887 | name?: string; 888 | httpEquiv?: string; 889 | } 890 | interface MeterHTMLAttributes extends HTMLAttributes { 891 | form?: string; 892 | high?: number | string; 893 | low?: number | string; 894 | max?: number | string; 895 | min?: number | string; 896 | optimum?: number | string; 897 | value?: string | string[] | number; 898 | } 899 | interface QuoteHTMLAttributes extends HTMLAttributes { 900 | cite?: string; 901 | } 902 | interface ObjectHTMLAttributes extends HTMLAttributes { 903 | data?: string; 904 | form?: string; 905 | height?: number | string; 906 | name?: string; 907 | type?: string; 908 | usemap?: string; 909 | width?: number | string; 910 | useMap?: string; 911 | } 912 | interface OlHTMLAttributes extends HTMLAttributes { 913 | reversed?: boolean; 914 | start?: number | string; 915 | type?: "1" | "a" | "A" | "i" | "I"; 916 | } 917 | interface OptgroupHTMLAttributes extends HTMLAttributes { 918 | disabled?: boolean; 919 | label?: string; 920 | } 921 | interface OptionHTMLAttributes extends HTMLAttributes { 922 | disabled?: boolean; 923 | label?: string; 924 | selected?: boolean; 925 | value?: string | string[] | number; 926 | } 927 | interface OutputHTMLAttributes extends HTMLAttributes { 928 | form?: string; 929 | for?: string; 930 | name?: string; 931 | } 932 | interface ParamHTMLAttributes extends HTMLAttributes { 933 | name?: string; 934 | value?: string | string[] | number; 935 | } 936 | interface ProgressHTMLAttributes extends HTMLAttributes { 937 | max?: number | string; 938 | value?: string | string[] | number; 939 | } 940 | interface ScriptHTMLAttributes extends HTMLAttributes { 941 | async?: boolean; 942 | charset?: string; 943 | crossorigin?: HTMLCrossorigin; 944 | defer?: boolean; 945 | integrity?: string; 946 | nomodule?: boolean; 947 | nonce?: string; 948 | referrerpolicy?: HTMLReferrerPolicy; 949 | src?: string; 950 | type?: string; 951 | crossOrigin?: HTMLCrossorigin; 952 | noModule?: boolean; 953 | referrerPolicy?: HTMLReferrerPolicy; 954 | } 955 | interface SelectHTMLAttributes extends HTMLAttributes { 956 | autocomplete?: string; 957 | autofocus?: boolean; 958 | disabled?: boolean; 959 | form?: string; 960 | multiple?: boolean; 961 | name?: string; 962 | required?: boolean; 963 | size?: number | string; 964 | value?: string | string[] | number; 965 | } 966 | interface HTMLSlotElementAttributes extends HTMLAttributes { 967 | name?: string; 968 | } 969 | interface SourceHTMLAttributes extends HTMLAttributes { 970 | media?: string; 971 | sizes?: string; 972 | src?: string; 973 | srcset?: string; 974 | type?: string; 975 | } 976 | interface StyleHTMLAttributes extends HTMLAttributes { 977 | media?: string; 978 | nonce?: string; 979 | scoped?: boolean; 980 | type?: string; 981 | } 982 | interface TdHTMLAttributes extends HTMLAttributes { 983 | colspan?: number | string; 984 | headers?: string; 985 | rowspan?: number | string; 986 | colSpan?: number | string; 987 | rowSpan?: number | string; 988 | } 989 | interface TextareaHTMLAttributes extends HTMLAttributes { 990 | autocomplete?: string; 991 | autofocus?: boolean; 992 | cols?: number | string; 993 | dirname?: string; 994 | disabled?: boolean; 995 | form?: string; 996 | maxlength?: number | string; 997 | minlength?: number | string; 998 | name?: string; 999 | placeholder?: string; 1000 | readonly?: boolean; 1001 | required?: boolean; 1002 | rows?: number | string; 1003 | value?: string | string[] | number; 1004 | wrap?: "hard" | "soft" | "off"; 1005 | maxLength?: number | string; 1006 | minLength?: number | string; 1007 | readOnly?: boolean; 1008 | } 1009 | interface ThHTMLAttributes extends HTMLAttributes { 1010 | colspan?: number | string; 1011 | headers?: string; 1012 | rowspan?: number | string; 1013 | colSpan?: number | string; 1014 | rowSpan?: number | string; 1015 | scope?: 'col' | 'row' | 'rowgroup' | 'colgroup'; 1016 | } 1017 | interface TimeHTMLAttributes extends HTMLAttributes { 1018 | datetime?: string; 1019 | dateTime?: string; 1020 | } 1021 | interface TrackHTMLAttributes extends HTMLAttributes { 1022 | default?: boolean; 1023 | kind?: "subtitles" | "captions" | "descriptions" | "chapters" | "metadata"; 1024 | label?: string; 1025 | src?: string; 1026 | srclang?: string; 1027 | } 1028 | interface VideoHTMLAttributes extends MediaHTMLAttributes { 1029 | height?: number | string; 1030 | playsinline?: boolean; 1031 | poster?: string; 1032 | width?: number | string; 1033 | } 1034 | type SVGPreserveAspectRatio = 1035 | | "none" 1036 | | "xMinYMin" 1037 | | "xMidYMin" 1038 | | "xMaxYMin" 1039 | | "xMinYMid" 1040 | | "xMidYMid" 1041 | | "xMaxYMid" 1042 | | "xMinYMax" 1043 | | "xMidYMax" 1044 | | "xMaxYMax" 1045 | | "xMinYMin meet" 1046 | | "xMidYMin meet" 1047 | | "xMaxYMin meet" 1048 | | "xMinYMid meet" 1049 | | "xMidYMid meet" 1050 | | "xMaxYMid meet" 1051 | | "xMinYMax meet" 1052 | | "xMidYMax meet" 1053 | | "xMaxYMax meet" 1054 | | "xMinYMin slice" 1055 | | "xMidYMin slice" 1056 | | "xMaxYMin slice" 1057 | | "xMinYMid slice" 1058 | | "xMidYMid slice" 1059 | | "xMaxYMid slice" 1060 | | "xMinYMax slice" 1061 | | "xMidYMax slice" 1062 | | "xMaxYMax slice"; 1063 | type ImagePreserveAspectRatio = 1064 | | SVGPreserveAspectRatio 1065 | | "defer none" 1066 | | "defer xMinYMin" 1067 | | "defer xMidYMin" 1068 | | "defer xMaxYMin" 1069 | | "defer xMinYMid" 1070 | | "defer xMidYMid" 1071 | | "defer xMaxYMid" 1072 | | "defer xMinYMax" 1073 | | "defer xMidYMax" 1074 | | "defer xMaxYMax" 1075 | | "defer xMinYMin meet" 1076 | | "defer xMidYMin meet" 1077 | | "defer xMaxYMin meet" 1078 | | "defer xMinYMid meet" 1079 | | "defer xMidYMid meet" 1080 | | "defer xMaxYMid meet" 1081 | | "defer xMinYMax meet" 1082 | | "defer xMidYMax meet" 1083 | | "defer xMaxYMax meet" 1084 | | "defer xMinYMin slice" 1085 | | "defer xMidYMin slice" 1086 | | "defer xMaxYMin slice" 1087 | | "defer xMinYMid slice" 1088 | | "defer xMidYMid slice" 1089 | | "defer xMaxYMid slice" 1090 | | "defer xMinYMax slice" 1091 | | "defer xMidYMax slice" 1092 | | "defer xMaxYMax slice"; 1093 | type SVGUnits = "userSpaceOnUse" | "objectBoundingBox"; 1094 | interface CoreSVGAttributes extends AriaAttributes, DOMAttributes { 1095 | id?: string; 1096 | lang?: string; 1097 | tabIndex?: number | string; 1098 | tabindex?: number | string; 1099 | } 1100 | interface StylableSVGAttributes { 1101 | class?: string; 1102 | style?: CSSProperties | string; 1103 | } 1104 | interface TransformableSVGAttributes { 1105 | transform?: string; 1106 | } 1107 | interface ConditionalProcessingSVGAttributes { 1108 | requiredExtensions?: string; 1109 | requiredFeatures?: string; 1110 | systemLanguage?: string; 1111 | } 1112 | interface ExternalResourceSVGAttributes { 1113 | externalResourcesRequired?: "true" | "false"; 1114 | } 1115 | interface AnimationTimingSVGAttributes { 1116 | begin?: string; 1117 | dur?: string; 1118 | end?: string; 1119 | min?: string; 1120 | max?: string; 1121 | restart?: "always" | "whenNotActive" | "never"; 1122 | repeatCount?: number | "indefinite"; 1123 | repeatDur?: string; 1124 | fill?: "freeze" | "remove"; 1125 | } 1126 | interface AnimationValueSVGAttributes { 1127 | calcMode?: "discrete" | "linear" | "paced" | "spline"; 1128 | values?: string; 1129 | keyTimes?: string; 1130 | keySplines?: string; 1131 | from?: number | string; 1132 | to?: number | string; 1133 | by?: number | string; 1134 | } 1135 | interface AnimationAdditionSVGAttributes { 1136 | attributeName?: string; 1137 | additive?: "replace" | "sum"; 1138 | accumulate?: "none" | "sum"; 1139 | } 1140 | interface AnimationAttributeTargetSVGAttributes { 1141 | attributeName?: string; 1142 | attributeType?: "CSS" | "XML" | "auto"; 1143 | } 1144 | interface PresentationSVGAttributes { 1145 | "alignment-baseline"?: 1146 | | "auto" 1147 | | "baseline" 1148 | | "before-edge" 1149 | | "text-before-edge" 1150 | | "middle" 1151 | | "central" 1152 | | "after-edge" 1153 | | "text-after-edge" 1154 | | "ideographic" 1155 | | "alphabetic" 1156 | | "hanging" 1157 | | "mathematical" 1158 | | "inherit"; 1159 | "baseline-shift"?: number | string; 1160 | clip?: string; 1161 | "clip-path"?: string; 1162 | "clip-rule"?: "nonzero" | "evenodd" | "inherit"; 1163 | color?: string; 1164 | "color-interpolation"?: "auto" | "sRGB" | "linearRGB" | "inherit"; 1165 | "color-interpolation-filters"?: "auto" | "sRGB" | "linearRGB" | "inherit"; 1166 | "color-profile"?: string; 1167 | "color-rendering"?: "auto" | "optimizeSpeed" | "optimizeQuality" | "inherit"; 1168 | cursor?: string; 1169 | direction?: "ltr" | "rtl" | "inherit"; 1170 | display?: string; 1171 | "dominant-baseline"?: 1172 | | "auto" 1173 | | "text-bottom" 1174 | | "alphabetic" 1175 | | "ideographic" 1176 | | "middle" 1177 | | "central" 1178 | | "mathematical" 1179 | | "hanging" 1180 | | "text-top" 1181 | | "inherit"; 1182 | "enable-background"?: string; 1183 | fill?: string; 1184 | "fill-opacity"?: number | string | "inherit"; 1185 | "fill-rule"?: "nonzero" | "evenodd" | "inherit"; 1186 | filter?: string; 1187 | "flood-color"?: string; 1188 | "flood-opacity"?: number | string | "inherit"; 1189 | "font-family"?: string; 1190 | "font-size"?: string; 1191 | "font-size-adjust"?: number | string; 1192 | "font-stretch"?: string; 1193 | "font-style"?: "normal" | "italic" | "oblique" | "inherit"; 1194 | "font-variant"?: string; 1195 | "font-weight"?: number | string; 1196 | "glyph-orientation-horizontal"?: string; 1197 | "glyph-orientation-vertical"?: string; 1198 | "image-rendering"?: "auto" | "optimizeQuality" | "optimizeSpeed" | "inherit"; 1199 | kerning?: string; 1200 | "letter-spacing"?: number | string; 1201 | "lighting-color"?: string; 1202 | "marker-end"?: string; 1203 | "marker-mid"?: string; 1204 | "marker-start"?: string; 1205 | mask?: string; 1206 | opacity?: number | string | "inherit"; 1207 | overflow?: "visible" | "hidden" | "scroll" | "auto" | "inherit"; 1208 | "pointer-events"?: 1209 | | "bounding-box" 1210 | | "visiblePainted" 1211 | | "visibleFill" 1212 | | "visibleStroke" 1213 | | "visible" 1214 | | "painted" 1215 | | "color" 1216 | | "fill" 1217 | | "stroke" 1218 | | "all" 1219 | | "none" 1220 | | "inherit"; 1221 | "shape-rendering"?: "auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision" | "inherit"; 1222 | "stop-color"?: string; 1223 | "stop-opacity"?: number | string | "inherit"; 1224 | stroke?: string; 1225 | "stroke-dasharray"?: string; 1226 | "stroke-dashoffset"?: number | string; 1227 | "stroke-linecap"?: "butt" | "round" | "square" | "inherit"; 1228 | "stroke-linejoin"?: "arcs" | "bevel" | "miter" | "miter-clip" | "round" | "inherit"; 1229 | "stroke-miterlimit"?: number | string | "inherit"; 1230 | "stroke-opacity"?: number | string | "inherit"; 1231 | "stroke-width"?: number | string; 1232 | "text-anchor"?: "start" | "middle" | "end" | "inherit"; 1233 | "text-decoration"?: "none" | "underline" | "overline" | "line-through" | "blink" | "inherit"; 1234 | "text-rendering"?: 1235 | | "auto" 1236 | | "optimizeSpeed" 1237 | | "optimizeLegibility" 1238 | | "geometricPrecision" 1239 | | "inherit"; 1240 | "unicode-bidi"?: string; 1241 | visibility?: "visible" | "hidden" | "collapse" | "inherit"; 1242 | "word-spacing"?: number | string; 1243 | "writing-mode"?: "lr-tb" | "rl-tb" | "tb-rl" | "lr" | "rl" | "tb" | "inherit"; 1244 | } 1245 | interface AnimationElementSVGAttributes 1246 | extends CoreSVGAttributes, 1247 | ExternalResourceSVGAttributes, 1248 | ConditionalProcessingSVGAttributes {} 1249 | interface ContainerElementSVGAttributes 1250 | extends CoreSVGAttributes, 1251 | ShapeElementSVGAttributes, 1252 | Pick< 1253 | PresentationSVGAttributes, 1254 | | "clip-path" 1255 | | "mask" 1256 | | "cursor" 1257 | | "opacity" 1258 | | "filter" 1259 | | "enable-background" 1260 | | "color-interpolation" 1261 | | "color-rendering" 1262 | > {} 1263 | interface FilterPrimitiveElementSVGAttributes 1264 | extends CoreSVGAttributes, 1265 | Pick { 1266 | x?: number | string; 1267 | y?: number | string; 1268 | width?: number | string; 1269 | height?: number | string; 1270 | result?: string; 1271 | } 1272 | interface SingleInputFilterSVGAttributes { 1273 | in?: string; 1274 | } 1275 | interface DoubleInputFilterSVGAttributes { 1276 | in?: string; 1277 | in2?: string; 1278 | } 1279 | interface FitToViewBoxSVGAttributes { 1280 | viewBox?: string; 1281 | preserveAspectRatio?: SVGPreserveAspectRatio; 1282 | } 1283 | interface GradientElementSVGAttributes 1284 | extends CoreSVGAttributes, 1285 | ExternalResourceSVGAttributes, 1286 | StylableSVGAttributes { 1287 | gradientUnits?: SVGUnits; 1288 | gradientTransform?: string; 1289 | spreadMethod?: "pad" | "reflect" | "repeat"; 1290 | } 1291 | interface GraphicsElementSVGAttributes 1292 | extends CoreSVGAttributes, 1293 | Pick< 1294 | PresentationSVGAttributes, 1295 | | "clip-rule" 1296 | | "mask" 1297 | | "pointer-events" 1298 | | "cursor" 1299 | | "opacity" 1300 | | "filter" 1301 | | "display" 1302 | | "visibility" 1303 | | "color-interpolation" 1304 | | "color-rendering" 1305 | > {} 1306 | interface LightSourceElementSVGAttributes extends CoreSVGAttributes {} 1307 | interface NewViewportSVGAttributes 1308 | extends CoreSVGAttributes, 1309 | Pick { 1310 | viewBox?: string; 1311 | } 1312 | interface ShapeElementSVGAttributes 1313 | extends CoreSVGAttributes, 1314 | Pick< 1315 | PresentationSVGAttributes, 1316 | | "color" 1317 | | "fill" 1318 | | "fill-rule" 1319 | | "fill-opacity" 1320 | | "stroke" 1321 | | "stroke-width" 1322 | | "stroke-linecap" 1323 | | "stroke-linejoin" 1324 | | "stroke-miterlimit" 1325 | | "stroke-dasharray" 1326 | | "stroke-dashoffset" 1327 | | "stroke-opacity" 1328 | | "shape-rendering" 1329 | > {} 1330 | interface TextContentElementSVGAttributes 1331 | extends CoreSVGAttributes, 1332 | Pick< 1333 | PresentationSVGAttributes, 1334 | | "font-family" 1335 | | "font-style" 1336 | | "font-variant" 1337 | | "font-weight" 1338 | | "font-stretch" 1339 | | "font-size" 1340 | | "font-size-adjust" 1341 | | "kerning" 1342 | | "letter-spacing" 1343 | | "word-spacing" 1344 | | "text-decoration" 1345 | | "glyph-orientation-horizontal" 1346 | | "glyph-orientation-vertical" 1347 | | "direction" 1348 | | "unicode-bidi" 1349 | | "text-anchor" 1350 | | "dominant-baseline" 1351 | | "color" 1352 | | "fill" 1353 | | "fill-rule" 1354 | | "fill-opacity" 1355 | | "stroke" 1356 | | "stroke-width" 1357 | | "stroke-linecap" 1358 | | "stroke-linejoin" 1359 | | "stroke-miterlimit" 1360 | | "stroke-dasharray" 1361 | | "stroke-dashoffset" 1362 | | "stroke-opacity" 1363 | > {} 1364 | interface ZoomAndPanSVGAttributes { 1365 | zoomAndPan?: "disable" | "magnify"; 1366 | } 1367 | interface AnimateSVGAttributes 1368 | extends AnimationElementSVGAttributes, 1369 | AnimationAttributeTargetSVGAttributes, 1370 | AnimationTimingSVGAttributes, 1371 | AnimationValueSVGAttributes, 1372 | AnimationAdditionSVGAttributes, 1373 | Pick {} 1374 | interface AnimateMotionSVGAttributes 1375 | extends AnimationElementSVGAttributes, 1376 | AnimationTimingSVGAttributes, 1377 | AnimationValueSVGAttributes, 1378 | AnimationAdditionSVGAttributes { 1379 | path?: string; 1380 | keyPoints?: string; 1381 | rotate?: number | string | "auto" | "auto-reverse"; 1382 | origin?: "default"; 1383 | } 1384 | interface AnimateTransformSVGAttributes 1385 | extends AnimationElementSVGAttributes, 1386 | AnimationAttributeTargetSVGAttributes, 1387 | AnimationTimingSVGAttributes, 1388 | AnimationValueSVGAttributes, 1389 | AnimationAdditionSVGAttributes { 1390 | type?: "translate" | "scale" | "rotate" | "skewX" | "skewY"; 1391 | } 1392 | interface CircleSVGAttributes 1393 | extends GraphicsElementSVGAttributes, 1394 | ShapeElementSVGAttributes, 1395 | ConditionalProcessingSVGAttributes, 1396 | StylableSVGAttributes, 1397 | TransformableSVGAttributes { 1398 | cx?: number | string; 1399 | cy?: number | string; 1400 | r?: number | string; 1401 | } 1402 | interface ClipPathSVGAttributes 1403 | extends CoreSVGAttributes, 1404 | ConditionalProcessingSVGAttributes, 1405 | ExternalResourceSVGAttributes, 1406 | StylableSVGAttributes, 1407 | TransformableSVGAttributes, 1408 | Pick { 1409 | clipPathUnits?: SVGUnits; 1410 | } 1411 | interface DefsSVGAttributes 1412 | extends ContainerElementSVGAttributes, 1413 | ConditionalProcessingSVGAttributes, 1414 | ExternalResourceSVGAttributes, 1415 | StylableSVGAttributes, 1416 | TransformableSVGAttributes {} 1417 | interface DescSVGAttributes extends CoreSVGAttributes, StylableSVGAttributes {} 1418 | interface EllipseSVGAttributes 1419 | extends GraphicsElementSVGAttributes, 1420 | ShapeElementSVGAttributes, 1421 | ConditionalProcessingSVGAttributes, 1422 | ExternalResourceSVGAttributes, 1423 | StylableSVGAttributes, 1424 | TransformableSVGAttributes { 1425 | cx?: number | string; 1426 | cy?: number | string; 1427 | rx?: number | string; 1428 | ry?: number | string; 1429 | } 1430 | interface FeBlendSVGAttributes 1431 | extends FilterPrimitiveElementSVGAttributes, 1432 | DoubleInputFilterSVGAttributes, 1433 | StylableSVGAttributes { 1434 | mode?: "normal" | "multiply" | "screen" | "darken" | "lighten"; 1435 | } 1436 | interface FeColorMatrixSVGAttributes 1437 | extends FilterPrimitiveElementSVGAttributes, 1438 | SingleInputFilterSVGAttributes, 1439 | StylableSVGAttributes { 1440 | type?: "matrix" | "saturate" | "hueRotate" | "luminanceToAlpha"; 1441 | values?: string; 1442 | } 1443 | interface FeComponentTransferSVGAttributes 1444 | extends FilterPrimitiveElementSVGAttributes, 1445 | SingleInputFilterSVGAttributes, 1446 | StylableSVGAttributes {} 1447 | interface FeCompositeSVGAttributes 1448 | extends FilterPrimitiveElementSVGAttributes, 1449 | DoubleInputFilterSVGAttributes, 1450 | StylableSVGAttributes { 1451 | operator?: "over" | "in" | "out" | "atop" | "xor" | "arithmetic"; 1452 | k1?: number | string; 1453 | k2?: number | string; 1454 | k3?: number | string; 1455 | k4?: number | string; 1456 | } 1457 | interface FeConvolveMatrixSVGAttributes 1458 | extends FilterPrimitiveElementSVGAttributes, 1459 | SingleInputFilterSVGAttributes, 1460 | StylableSVGAttributes { 1461 | order?: number | string; 1462 | kernelMatrix?: string; 1463 | divisor?: number | string; 1464 | bias?: number | string; 1465 | targetX?: number | string; 1466 | targetY?: number | string; 1467 | edgeMode?: "duplicate" | "wrap" | "none"; 1468 | kernelUnitLength?: number | string; 1469 | preserveAlpha?: "true" | "false"; 1470 | } 1471 | interface FeDiffuseLightingSVGAttributes 1472 | extends FilterPrimitiveElementSVGAttributes, 1473 | SingleInputFilterSVGAttributes, 1474 | StylableSVGAttributes, 1475 | Pick { 1476 | surfaceScale?: number | string; 1477 | diffuseConstant?: number | string; 1478 | kernelUnitLength?: number | string; 1479 | } 1480 | interface FeDisplacementMapSVGAttributes 1481 | extends FilterPrimitiveElementSVGAttributes, 1482 | DoubleInputFilterSVGAttributes, 1483 | StylableSVGAttributes { 1484 | scale?: number | string; 1485 | xChannelSelector?: "R" | "G" | "B" | "A"; 1486 | yChannelSelector?: "R" | "G" | "B" | "A"; 1487 | } 1488 | interface FeDistantLightSVGAttributes extends LightSourceElementSVGAttributes { 1489 | azimuth?: number | string; 1490 | elevation?: number | string; 1491 | } 1492 | interface FeFloodSVGAttributes 1493 | extends FilterPrimitiveElementSVGAttributes, 1494 | StylableSVGAttributes, 1495 | Pick {} 1496 | interface FeFuncSVGAttributes extends CoreSVGAttributes { 1497 | type?: "identity" | "table" | "discrete" | "linear" | "gamma"; 1498 | tableValues?: string; 1499 | slope?: number | string; 1500 | intercept?: number | string; 1501 | amplitude?: number | string; 1502 | exponent?: number | string; 1503 | offset?: number | string; 1504 | } 1505 | interface FeGaussianBlurSVGAttributes 1506 | extends FilterPrimitiveElementSVGAttributes, 1507 | SingleInputFilterSVGAttributes, 1508 | StylableSVGAttributes { 1509 | stdDeviation?: number | string; 1510 | } 1511 | interface FeImageSVGAttributes 1512 | extends FilterPrimitiveElementSVGAttributes, 1513 | ExternalResourceSVGAttributes, 1514 | StylableSVGAttributes { 1515 | preserveAspectRatio?: SVGPreserveAspectRatio; 1516 | href?: string; 1517 | } 1518 | interface FeMergeSVGAttributes 1519 | extends FilterPrimitiveElementSVGAttributes, 1520 | StylableSVGAttributes {} 1521 | interface FeMergeNodeSVGAttributes 1522 | extends CoreSVGAttributes, 1523 | SingleInputFilterSVGAttributes {} 1524 | interface FeMorphologySVGAttributes 1525 | extends FilterPrimitiveElementSVGAttributes, 1526 | SingleInputFilterSVGAttributes, 1527 | StylableSVGAttributes { 1528 | operator?: "erode" | "dilate"; 1529 | radius?: number | string; 1530 | } 1531 | interface FeOffsetSVGAttributes 1532 | extends FilterPrimitiveElementSVGAttributes, 1533 | SingleInputFilterSVGAttributes, 1534 | StylableSVGAttributes { 1535 | dx?: number | string; 1536 | dy?: number | string; 1537 | } 1538 | interface FePointLightSVGAttributes extends LightSourceElementSVGAttributes { 1539 | x?: number | string; 1540 | y?: number | string; 1541 | z?: number | string; 1542 | } 1543 | interface FeSpecularLightingSVGAttributes 1544 | extends FilterPrimitiveElementSVGAttributes, 1545 | SingleInputFilterSVGAttributes, 1546 | StylableSVGAttributes, 1547 | Pick { 1548 | surfaceScale?: string; 1549 | specularConstant?: string; 1550 | specularExponent?: string; 1551 | kernelUnitLength?: number | string; 1552 | } 1553 | interface FeSpotLightSVGAttributes extends LightSourceElementSVGAttributes { 1554 | x?: number | string; 1555 | y?: number | string; 1556 | z?: number | string; 1557 | pointsAtX?: number | string; 1558 | pointsAtY?: number | string; 1559 | pointsAtZ?: number | string; 1560 | specularExponent?: number | string; 1561 | limitingConeAngle?: number | string; 1562 | } 1563 | interface FeTileSVGAttributes 1564 | extends FilterPrimitiveElementSVGAttributes, 1565 | SingleInputFilterSVGAttributes, 1566 | StylableSVGAttributes {} 1567 | interface FeTurbulanceSVGAttributes 1568 | extends FilterPrimitiveElementSVGAttributes, 1569 | StylableSVGAttributes { 1570 | baseFrequency?: number | string; 1571 | numOctaves?: number | string; 1572 | seed?: number | string; 1573 | stitchTiles?: "stitch" | "noStitch"; 1574 | type?: "fractalNoise" | "turbulence"; 1575 | } 1576 | interface FilterSVGAttributes 1577 | extends CoreSVGAttributes, 1578 | ExternalResourceSVGAttributes, 1579 | StylableSVGAttributes { 1580 | filterUnits?: SVGUnits; 1581 | primitiveUnits?: SVGUnits; 1582 | x?: number | string; 1583 | y?: number | string; 1584 | width?: number | string; 1585 | height?: number | string; 1586 | filterRes?: number | string; 1587 | } 1588 | interface ForeignObjectSVGAttributes 1589 | extends NewViewportSVGAttributes, 1590 | ConditionalProcessingSVGAttributes, 1591 | ExternalResourceSVGAttributes, 1592 | StylableSVGAttributes, 1593 | TransformableSVGAttributes, 1594 | Pick { 1595 | x?: number | string; 1596 | y?: number | string; 1597 | width?: number | string; 1598 | height?: number | string; 1599 | } 1600 | interface GSVGAttributes 1601 | extends ContainerElementSVGAttributes, 1602 | ConditionalProcessingSVGAttributes, 1603 | ExternalResourceSVGAttributes, 1604 | StylableSVGAttributes, 1605 | TransformableSVGAttributes, 1606 | Pick {} 1607 | interface ImageSVGAttributes 1608 | extends NewViewportSVGAttributes, 1609 | GraphicsElementSVGAttributes, 1610 | ConditionalProcessingSVGAttributes, 1611 | StylableSVGAttributes, 1612 | TransformableSVGAttributes, 1613 | Pick { 1614 | x?: number | string; 1615 | y?: number | string; 1616 | width?: number | string; 1617 | height?: number | string; 1618 | preserveAspectRatio?: ImagePreserveAspectRatio; 1619 | href?: string; 1620 | } 1621 | interface LineSVGAttributes 1622 | extends GraphicsElementSVGAttributes, 1623 | ShapeElementSVGAttributes, 1624 | ConditionalProcessingSVGAttributes, 1625 | ExternalResourceSVGAttributes, 1626 | StylableSVGAttributes, 1627 | TransformableSVGAttributes, 1628 | Pick { 1629 | x1?: number | string; 1630 | y1?: number | string; 1631 | x2?: number | string; 1632 | y2?: number | string; 1633 | } 1634 | interface LinearGradientSVGAttributes extends GradientElementSVGAttributes { 1635 | x1?: number | string; 1636 | x2?: number | string; 1637 | y1?: number | string; 1638 | y2?: number | string; 1639 | } 1640 | interface MarkerSVGAttributes 1641 | extends ContainerElementSVGAttributes, 1642 | ExternalResourceSVGAttributes, 1643 | StylableSVGAttributes, 1644 | FitToViewBoxSVGAttributes, 1645 | Pick { 1646 | markerUnits?: "strokeWidth" | "userSpaceOnUse"; 1647 | refX?: number | string; 1648 | refY?: number | string; 1649 | markerWidth?: number | string; 1650 | markerHeight?: number | string; 1651 | orient?: string; 1652 | } 1653 | interface MaskSVGAttributes 1654 | extends Omit, "opacity" | "filter">, 1655 | ConditionalProcessingSVGAttributes, 1656 | ExternalResourceSVGAttributes, 1657 | StylableSVGAttributes { 1658 | maskUnits?: SVGUnits; 1659 | maskContentUnits?: SVGUnits; 1660 | x?: number | string; 1661 | y?: number | string; 1662 | width?: number | string; 1663 | height?: number | string; 1664 | } 1665 | interface MetadataSVGAttributes extends CoreSVGAttributes {} 1666 | interface PathSVGAttributes 1667 | extends GraphicsElementSVGAttributes, 1668 | ShapeElementSVGAttributes, 1669 | ConditionalProcessingSVGAttributes, 1670 | ExternalResourceSVGAttributes, 1671 | StylableSVGAttributes, 1672 | TransformableSVGAttributes, 1673 | Pick { 1674 | d?: string; 1675 | pathLength?: number | string; 1676 | } 1677 | interface PatternSVGAttributes 1678 | extends ContainerElementSVGAttributes, 1679 | ConditionalProcessingSVGAttributes, 1680 | ExternalResourceSVGAttributes, 1681 | StylableSVGAttributes, 1682 | FitToViewBoxSVGAttributes, 1683 | Pick { 1684 | x?: number | string; 1685 | y?: number | string; 1686 | width?: number | string; 1687 | height?: number | string; 1688 | patternUnits?: SVGUnits; 1689 | patternContentUnits?: SVGUnits; 1690 | patternTransform?: string; 1691 | } 1692 | interface PolygonSVGAttributes 1693 | extends GraphicsElementSVGAttributes, 1694 | ShapeElementSVGAttributes, 1695 | ConditionalProcessingSVGAttributes, 1696 | ExternalResourceSVGAttributes, 1697 | StylableSVGAttributes, 1698 | TransformableSVGAttributes, 1699 | Pick { 1700 | points?: string; 1701 | } 1702 | interface PolylineSVGAttributes 1703 | extends GraphicsElementSVGAttributes, 1704 | ShapeElementSVGAttributes, 1705 | ConditionalProcessingSVGAttributes, 1706 | ExternalResourceSVGAttributes, 1707 | StylableSVGAttributes, 1708 | TransformableSVGAttributes, 1709 | Pick { 1710 | points?: string; 1711 | } 1712 | interface RadialGradientSVGAttributes extends GradientElementSVGAttributes { 1713 | cx?: number | string; 1714 | cy?: number | string; 1715 | r?: number | string; 1716 | fx?: number | string; 1717 | fy?: number | string; 1718 | } 1719 | interface RectSVGAttributes 1720 | extends GraphicsElementSVGAttributes, 1721 | ShapeElementSVGAttributes, 1722 | ConditionalProcessingSVGAttributes, 1723 | ExternalResourceSVGAttributes, 1724 | StylableSVGAttributes, 1725 | TransformableSVGAttributes { 1726 | x?: number | string; 1727 | y?: number | string; 1728 | width?: number | string; 1729 | height?: number | string; 1730 | rx?: number | string; 1731 | ry?: number | string; 1732 | } 1733 | interface StopSVGAttributes 1734 | extends CoreSVGAttributes, 1735 | StylableSVGAttributes, 1736 | Pick { 1737 | offset?: number | string; 1738 | } 1739 | interface SvgSVGAttributes 1740 | extends ContainerElementSVGAttributes, 1741 | NewViewportSVGAttributes, 1742 | ConditionalProcessingSVGAttributes, 1743 | ExternalResourceSVGAttributes, 1744 | StylableSVGAttributes, 1745 | FitToViewBoxSVGAttributes, 1746 | ZoomAndPanSVGAttributes, 1747 | PresentationSVGAttributes { 1748 | version?: string; 1749 | baseProfile?: string; 1750 | x?: number | string; 1751 | y?: number | string; 1752 | width?: number | string; 1753 | height?: number | string; 1754 | contentScriptType?: string; 1755 | contentStyleType?: string; 1756 | xmlns?: string; 1757 | } 1758 | interface SwitchSVGAttributes 1759 | extends ContainerElementSVGAttributes, 1760 | ConditionalProcessingSVGAttributes, 1761 | ExternalResourceSVGAttributes, 1762 | StylableSVGAttributes, 1763 | TransformableSVGAttributes, 1764 | Pick {} 1765 | interface SymbolSVGAttributes 1766 | extends ContainerElementSVGAttributes, 1767 | NewViewportSVGAttributes, 1768 | ExternalResourceSVGAttributes, 1769 | StylableSVGAttributes, 1770 | FitToViewBoxSVGAttributes {} 1771 | interface TextSVGAttributes 1772 | extends TextContentElementSVGAttributes, 1773 | GraphicsElementSVGAttributes, 1774 | ConditionalProcessingSVGAttributes, 1775 | ExternalResourceSVGAttributes, 1776 | StylableSVGAttributes, 1777 | TransformableSVGAttributes, 1778 | Pick { 1779 | x?: number | string; 1780 | y?: number | string; 1781 | dx?: number | string; 1782 | dy?: number | string; 1783 | rotate?: number | string; 1784 | textLength?: number | string; 1785 | lengthAdjust?: "spacing" | "spacingAndGlyphs"; 1786 | } 1787 | interface TextPathSVGAttributes 1788 | extends TextContentElementSVGAttributes, 1789 | ConditionalProcessingSVGAttributes, 1790 | ExternalResourceSVGAttributes, 1791 | StylableSVGAttributes, 1792 | Pick< 1793 | PresentationSVGAttributes, 1794 | "alignment-baseline" | "baseline-shift" | "display" | "visibility" 1795 | > { 1796 | startOffset?: number | string; 1797 | method?: "align" | "stretch"; 1798 | spacing?: "auto" | "exact"; 1799 | href?: string; 1800 | } 1801 | interface TSpanSVGAttributes 1802 | extends TextContentElementSVGAttributes, 1803 | ConditionalProcessingSVGAttributes, 1804 | ExternalResourceSVGAttributes, 1805 | StylableSVGAttributes, 1806 | Pick< 1807 | PresentationSVGAttributes, 1808 | "alignment-baseline" | "baseline-shift" | "display" | "visibility" 1809 | > { 1810 | x?: number | string; 1811 | y?: number | string; 1812 | dx?: number | string; 1813 | dy?: number | string; 1814 | rotate?: number | string; 1815 | textLength?: number | string; 1816 | lengthAdjust?: "spacing" | "spacingAndGlyphs"; 1817 | } 1818 | interface UseSVGAttributes 1819 | extends GraphicsElementSVGAttributes, 1820 | ConditionalProcessingSVGAttributes, 1821 | ExternalResourceSVGAttributes, 1822 | StylableSVGAttributes, 1823 | TransformableSVGAttributes { 1824 | x?: number | string; 1825 | y?: number | string; 1826 | width?: number | string; 1827 | height?: number | string; 1828 | href?: string; 1829 | } 1830 | interface ViewSVGAttributes 1831 | extends CoreSVGAttributes, 1832 | ExternalResourceSVGAttributes, 1833 | FitToViewBoxSVGAttributes, 1834 | ZoomAndPanSVGAttributes { 1835 | viewTarget?: string; 1836 | } 1837 | interface IntrinsicElements { 1838 | a: AnchorHTMLAttributes; 1839 | abbr: HTMLAttributes; 1840 | address: HTMLAttributes; 1841 | area: AreaHTMLAttributes; 1842 | article: HTMLAttributes; 1843 | aside: HTMLAttributes; 1844 | audio: AudioHTMLAttributes; 1845 | b: HTMLAttributes; 1846 | base: BaseHTMLAttributes; 1847 | bdi: HTMLAttributes; 1848 | bdo: HTMLAttributes; 1849 | big: HTMLAttributes; 1850 | blockquote: BlockquoteHTMLAttributes; 1851 | body: HTMLAttributes; 1852 | br: HTMLAttributes; 1853 | button: ButtonHTMLAttributes; 1854 | canvas: CanvasHTMLAttributes; 1855 | caption: HTMLAttributes; 1856 | cite: HTMLAttributes; 1857 | code: HTMLAttributes; 1858 | col: ColHTMLAttributes; 1859 | colgroup: ColgroupHTMLAttributes; 1860 | data: DataHTMLAttributes; 1861 | datalist: HTMLAttributes; 1862 | dd: HTMLAttributes; 1863 | del: HTMLAttributes; 1864 | details: DetailsHtmlAttributes; 1865 | dfn: HTMLAttributes; 1866 | dialog: DialogHtmlAttributes; 1867 | div: HTMLAttributes; 1868 | dl: HTMLAttributes; 1869 | dt: HTMLAttributes; 1870 | em: HTMLAttributes; 1871 | embed: EmbedHTMLAttributes; 1872 | fieldset: FieldsetHTMLAttributes; 1873 | figcaption: HTMLAttributes; 1874 | figure: HTMLAttributes; 1875 | footer: HTMLAttributes; 1876 | form: FormHTMLAttributes; 1877 | h1: HTMLAttributes; 1878 | h2: HTMLAttributes; 1879 | h3: HTMLAttributes; 1880 | h4: HTMLAttributes; 1881 | h5: HTMLAttributes; 1882 | h6: HTMLAttributes; 1883 | head: HTMLAttributes; 1884 | header: HTMLAttributes; 1885 | hgroup: HTMLAttributes; 1886 | hr: HTMLAttributes; 1887 | html: HTMLAttributes; 1888 | i: HTMLAttributes; 1889 | iframe: IframeHTMLAttributes; 1890 | img: ImgHTMLAttributes; 1891 | input: InputHTMLAttributes; 1892 | ins: InsHTMLAttributes; 1893 | kbd: HTMLAttributes; 1894 | keygen: KeygenHTMLAttributes; 1895 | label: LabelHTMLAttributes; 1896 | legend: HTMLAttributes; 1897 | li: LiHTMLAttributes; 1898 | link: LinkHTMLAttributes; 1899 | main: HTMLAttributes; 1900 | map: MapHTMLAttributes; 1901 | mark: HTMLAttributes; 1902 | menu: MenuHTMLAttributes; 1903 | menuitem: HTMLAttributes; 1904 | meta: MetaHTMLAttributes; 1905 | meter: MeterHTMLAttributes; 1906 | nav: HTMLAttributes; 1907 | noindex: HTMLAttributes; 1908 | noscript: HTMLAttributes; 1909 | object: ObjectHTMLAttributes; 1910 | ol: OlHTMLAttributes; 1911 | optgroup: OptgroupHTMLAttributes; 1912 | option: OptionHTMLAttributes; 1913 | output: OutputHTMLAttributes; 1914 | p: HTMLAttributes; 1915 | param: ParamHTMLAttributes; 1916 | picture: HTMLAttributes; 1917 | pre: HTMLAttributes; 1918 | progress: ProgressHTMLAttributes; 1919 | q: QuoteHTMLAttributes; 1920 | rp: HTMLAttributes; 1921 | rt: HTMLAttributes; 1922 | ruby: HTMLAttributes; 1923 | s: HTMLAttributes; 1924 | samp: HTMLAttributes; 1925 | script: ScriptHTMLAttributes; 1926 | section: HTMLAttributes; 1927 | select: SelectHTMLAttributes; 1928 | slot: HTMLSlotElementAttributes; 1929 | small: HTMLAttributes; 1930 | source: SourceHTMLAttributes; 1931 | span: HTMLAttributes; 1932 | strong: HTMLAttributes; 1933 | style: StyleHTMLAttributes; 1934 | sub: HTMLAttributes; 1935 | summary: HTMLAttributes; 1936 | sup: HTMLAttributes; 1937 | table: HTMLAttributes; 1938 | tbody: HTMLAttributes; 1939 | td: TdHTMLAttributes; 1940 | textarea: TextareaHTMLAttributes; 1941 | tfoot: HTMLAttributes; 1942 | th: ThHTMLAttributes; 1943 | thead: HTMLAttributes; 1944 | time: TimeHTMLAttributes; 1945 | title: HTMLAttributes; 1946 | tr: HTMLAttributes; 1947 | track: TrackHTMLAttributes; 1948 | u: HTMLAttributes; 1949 | ul: HTMLAttributes; 1950 | var: HTMLAttributes; 1951 | video: VideoHTMLAttributes; 1952 | wbr: HTMLAttributes; 1953 | svg: SvgSVGAttributes; 1954 | animate: AnimateSVGAttributes; 1955 | animateMotion: AnimateMotionSVGAttributes; 1956 | animateTransform: AnimateTransformSVGAttributes; 1957 | circle: CircleSVGAttributes; 1958 | clipPath: ClipPathSVGAttributes; 1959 | defs: DefsSVGAttributes; 1960 | desc: DescSVGAttributes; 1961 | ellipse: EllipseSVGAttributes; 1962 | feBlend: FeBlendSVGAttributes; 1963 | feColorMatrix: FeColorMatrixSVGAttributes; 1964 | feComponentTransfer: FeComponentTransferSVGAttributes; 1965 | feComposite: FeCompositeSVGAttributes; 1966 | feConvolveMatrix: FeConvolveMatrixSVGAttributes; 1967 | feDiffuseLighting: FeDiffuseLightingSVGAttributes; 1968 | feDisplacementMap: FeDisplacementMapSVGAttributes; 1969 | feDistantLight: FeDistantLightSVGAttributes; 1970 | feFlood: FeFloodSVGAttributes; 1971 | feFuncA: FeFuncSVGAttributes; 1972 | feFuncB: FeFuncSVGAttributes; 1973 | feFuncG: FeFuncSVGAttributes; 1974 | feFuncR: FeFuncSVGAttributes; 1975 | feGaussianBlur: FeGaussianBlurSVGAttributes; 1976 | feImage: FeImageSVGAttributes; 1977 | feMerge: FeMergeSVGAttributes; 1978 | feMergeNode: FeMergeNodeSVGAttributes; 1979 | feMorphology: FeMorphologySVGAttributes; 1980 | feOffset: FeOffsetSVGAttributes; 1981 | fePointLight: FePointLightSVGAttributes; 1982 | feSpecularLighting: FeSpecularLightingSVGAttributes; 1983 | feSpotLight: FeSpotLightSVGAttributes; 1984 | feTile: FeTileSVGAttributes; 1985 | feTurbulence: FeTurbulanceSVGAttributes; 1986 | filter: FilterSVGAttributes; 1987 | foreignObject: ForeignObjectSVGAttributes; 1988 | g: GSVGAttributes; 1989 | image: ImageSVGAttributes; 1990 | line: LineSVGAttributes; 1991 | linearGradient: LinearGradientSVGAttributes; 1992 | marker: MarkerSVGAttributes; 1993 | mask: MaskSVGAttributes; 1994 | metadata: MetadataSVGAttributes; 1995 | path: PathSVGAttributes; 1996 | pattern: PatternSVGAttributes; 1997 | polygon: PolygonSVGAttributes; 1998 | polyline: PolylineSVGAttributes; 1999 | radialGradient: RadialGradientSVGAttributes; 2000 | rect: RectSVGAttributes; 2001 | stop: StopSVGAttributes; 2002 | switch: SwitchSVGAttributes; 2003 | symbol: SymbolSVGAttributes; 2004 | text: TextSVGAttributes; 2005 | textPath: TextPathSVGAttributes; 2006 | tspan: TSpanSVGAttributes; 2007 | use: UseSVGAttributes; 2008 | view: ViewSVGAttributes; 2009 | } 2010 | } 2011 | -------------------------------------------------------------------------------- /src/lib.ts: -------------------------------------------------------------------------------- 1 | import { 2 | autorun, 3 | computed, 4 | untracked, 5 | $mobx, 6 | IObservableArray, 7 | observable, 8 | action, 9 | IObservableValue 10 | } from "mobx"; 11 | import type { JSX } from "./jsx"; 12 | 13 | type ContextOwner = { 14 | disposables: any[]; 15 | owner: ContextOwner | null; 16 | context?: any; 17 | }; 18 | export interface Context { 19 | id: symbol; 20 | Provider: (props: any) => any; 21 | defaultValue: unknown; 22 | } 23 | 24 | let globalContext: ContextOwner | null = null; 25 | 26 | export class Component { 27 | isClassComponent?: boolean; 28 | props: T; 29 | constructor(props: T) { 30 | this.props = props; 31 | } 32 | render(props: T) { 33 | return props.children; 34 | } 35 | } 36 | Component.prototype.isClassComponent = true; 37 | 38 | export function root(fn: (dispose: () => void) => T) { 39 | let d: any[], ret: T; 40 | globalContext = { 41 | disposables: (d = []), 42 | owner: globalContext 43 | }; 44 | ret = untracked(() => 45 | fn(() => { 46 | let k, len: number; 47 | for (k = 0, len = d.length; k < len; k++) d[k](); 48 | d = []; 49 | }) 50 | ); 51 | globalContext = globalContext.owner; 52 | return ret; 53 | } 54 | 55 | export function cleanup(fn: () => void) { 56 | let ref; 57 | (ref = globalContext) != null && ref.disposables.push(fn); 58 | } 59 | 60 | export function effect(fn: (prev?: T) => T, current?: T) { 61 | const context = { 62 | disposables: [] as (() => void)[], 63 | owner: globalContext 64 | }, 65 | cleanupFn = (final: boolean) => { 66 | const d = context.disposables; 67 | context.disposables = []; 68 | for (let k = 0, len = d.length; k < len; k++) d[k](); 69 | final && dispose(); 70 | }, 71 | dispose = autorun(() => { 72 | cleanupFn(false); 73 | const prev = globalContext; 74 | globalContext = context; 75 | current = fn(current); 76 | globalContext = prev; 77 | }); 78 | cleanup(() => cleanupFn(true)); 79 | } 80 | 81 | // only updates when boolean expression changes 82 | export function memo(fn: () => T, equal?: boolean) { 83 | const o = observable.box(), 84 | update = action((r: T) => o.set(r)); 85 | effect(prev => { 86 | const res = fn(); 87 | (!equal || prev !== res) && update(res); 88 | return res; 89 | }); 90 | return () => o.get(); 91 | } 92 | 93 | export function createSelector( 94 | source: () => T, 95 | fn: (a: U, b: T) => boolean = (a, b) => a === b 96 | ) { 97 | let subs = new Map(); 98 | let v: T; 99 | effect((p?: U) => { 100 | v = source(); 101 | const keys = [...subs.keys()]; 102 | for (let i = 0, len = keys.length; i < len; i++) { 103 | const key = keys[i]; 104 | if (fn(key, v) || (p !== undefined && fn(key, p))) { 105 | const o = subs.get(key); 106 | o.set(null); 107 | } 108 | } 109 | return v as U; 110 | }); 111 | return (key: U) => { 112 | let l: IObservableValue & { _count?: number }; 113 | if (!(l = subs.get(key))) 114 | subs.set(key, (l = observable.box() as IObservableValue & { _count?: number })); 115 | l.get(); 116 | l._count ? l._count++ : (l._count = 1); 117 | cleanup(() => (l._count! > 1 ? l._count!-- : subs.delete(key))); 118 | return fn(key, v); 119 | }; 120 | } 121 | 122 | type PropsWithChildren

= P & { children?: JSX.Element }; 123 | export type FunctionComponent

= (props: PropsWithChildren

) => JSX.Element; 124 | type ComponentConstructor

= 125 | | FunctionComponent

126 | | (new (props: PropsWithChildren

) => JSX.Element); 127 | 128 | export type ComponentProps> = 129 | T extends ComponentConstructor 130 | ? P 131 | : T extends keyof JSX.IntrinsicElements 132 | ? JSX.IntrinsicElements[T] 133 | : {}; 134 | 135 | export function createComponent( 136 | Comp: Component & FunctionComponent, 137 | props: T 138 | ): JSX.Element { 139 | if (Comp.prototype && Comp.prototype.isClassComponent) { 140 | return untracked(() => { 141 | const comp: Component = new (Comp as any)(props as T); 142 | return comp.render(props as T); 143 | }); 144 | } 145 | return untracked(() => Comp(props as T)); 146 | } 147 | 148 | // dynamic import to support code splitting 149 | export function lazy(fn: () => Promise<{ default: T }>) { 150 | return (props: object) => { 151 | let Comp: T | undefined; 152 | const result = observable.box(), 153 | update = action((component: { default: T }) => result.set(component.default)); 154 | fn().then(update); 155 | const rendered = computed(() => (Comp = result.get()) && untracked(() => Comp!(props))); 156 | return () => rendered.get(); 157 | }; 158 | } 159 | 160 | export { untracked as untrack }; 161 | 162 | export function splitProps( 163 | props: T, 164 | ...keys: [K1[]] 165 | ): [Pick, Omit]; 166 | export function splitProps( 167 | props: T, 168 | ...keys: [K1[], K2[]] 169 | ): [Pick, Pick, Omit]; 170 | export function splitProps< 171 | T extends object, 172 | K1 extends keyof T, 173 | K2 extends keyof T, 174 | K3 extends keyof T 175 | >( 176 | props: T, 177 | ...keys: [K1[], K2[], K3[]] 178 | ): [Pick, Pick, Pick, Omit]; 179 | export function splitProps< 180 | T extends object, 181 | K1 extends keyof T, 182 | K2 extends keyof T, 183 | K3 extends keyof T, 184 | K4 extends keyof T 185 | >( 186 | props: T, 187 | ...keys: [K1[], K2[], K3[], K4[]] 188 | ): [Pick, Pick, Pick, Pick, Omit]; 189 | export function splitProps< 190 | T extends object, 191 | K1 extends keyof T, 192 | K2 extends keyof T, 193 | K3 extends keyof T, 194 | K4 extends keyof T, 195 | K5 extends keyof T 196 | >( 197 | props: T, 198 | ...keys: [K1[], K2[], K3[], K4[], K5[]] 199 | ): [ 200 | Pick, 201 | Pick, 202 | Pick, 203 | Pick, 204 | Pick, 205 | Omit 206 | ]; 207 | export function splitProps(props: T, ...keys: [(keyof T)[]]) { 208 | const descriptors = Object.getOwnPropertyDescriptors(props), 209 | split = (k: (keyof T)[]) => { 210 | const clone: Partial = {}; 211 | for (let i = 0; i < k.length; i++) { 212 | const key = k[i]; 213 | if (descriptors[key]) { 214 | Object.defineProperty(clone, key, descriptors[key]); 215 | delete descriptors[key]; 216 | } 217 | } 218 | return clone; 219 | }; 220 | return keys.map(split).concat(split(Object.keys(descriptors) as (keyof T)[])); 221 | } 222 | 223 | // context api 224 | export function createContext(defaultValue?: unknown): Context { 225 | const id = Symbol("context"); 226 | return { id, Provider: createProvider(id), defaultValue }; 227 | } 228 | 229 | export function useContext(context: Context) { 230 | return lookup(globalContext, context.id) || context.defaultValue; 231 | } 232 | 233 | function lookup(owner: ContextOwner | null, key: symbol | string): any { 234 | return ( 235 | owner && ((owner.context && owner.context[key]) || (owner.owner && lookup(owner.owner, key))) 236 | ); 237 | } 238 | 239 | function resolveChildren(children: any): any { 240 | if (typeof children === "function") { 241 | const c = observable.box(), 242 | update = action((child: any) => c.set(child)); 243 | effect(() => update(children())); 244 | return () => c.get(); 245 | } 246 | if (Array.isArray(children)) { 247 | const results: any[] = []; 248 | for (let i = 0; i < children.length; i++) { 249 | let result = resolveChildren(children[i]); 250 | Array.isArray(result) ? results.push.apply(results, result) : results.push(result); 251 | } 252 | return results; 253 | } 254 | return children; 255 | } 256 | 257 | function createProvider(id: symbol) { 258 | return function provider(props: { value: unknown; children: any }) { 259 | let rendered = observable.box(), 260 | update = action(() => rendered.set(resolveChildren(props.children))); 261 | effect(() => { 262 | globalContext!.context = { [id]: props.value }; 263 | update(); 264 | }); 265 | return () => rendered.get(); 266 | }; 267 | } 268 | 269 | // Modified version of mapSample from S-array[https://github.com/adamhaile/S-array] by Adam Haile 270 | export function map( 271 | list: (IObservableArray & { [$mobx]: any }) | (() => Array), 272 | mapFn: (v: T, i: number) => U | any 273 | ) { 274 | let items = [] as T[], 275 | mapped = [] as U[], 276 | disposers = [] as (() => void)[], 277 | fn = typeof list === "function", 278 | len = 0; 279 | cleanup(() => { 280 | for (let i = 0, length = disposers.length; i < length; i++) disposers[i](); 281 | }); 282 | return () => { 283 | let newItems = fn ? (list as () => Array)() : (list as T[]), 284 | i: number, 285 | j: number; 286 | !fn && (list as IObservableArray & { [$mobx]: any })[$mobx].atom_.reportObserved(); 287 | return untracked(() => { 288 | let newLen = newItems.length, 289 | newIndices: Map, 290 | newIndicesNext: number[], 291 | temp: U[], 292 | tempdisposers: (() => void)[], 293 | start: number, 294 | end: number, 295 | newEnd: number, 296 | item: T; 297 | 298 | // fast path for empty arrays 299 | if (newLen === 0) { 300 | if (len !== 0) { 301 | for (i = 0; i < len; i++) disposers[i](); 302 | disposers = []; 303 | items = []; 304 | mapped = []; 305 | len = 0; 306 | } 307 | } else if (len === 0) { 308 | for (j = 0; j < newLen; j++) { 309 | items[j] = newItems[j]; 310 | mapped[j] = root(mapper); 311 | } 312 | len = newLen; 313 | } else { 314 | temp = new Array(newLen); 315 | tempdisposers = new Array(newLen); 316 | 317 | // skip common prefix 318 | for ( 319 | start = 0, end = Math.min(len, newLen); 320 | start < end && items[start] === newItems[start]; 321 | start++ 322 | ); 323 | 324 | // common suffix 325 | for ( 326 | end = len - 1, newEnd = newLen - 1; 327 | end >= start && newEnd >= start && items[end] === newItems[newEnd]; 328 | end--, newEnd-- 329 | ) { 330 | temp[newEnd] = mapped[end]; 331 | tempdisposers[newEnd] = disposers[end]; 332 | } 333 | 334 | // remove any remaining nodes and we're done 335 | if (start > newEnd) { 336 | for (j = end; start <= j; j--) disposers[j](); 337 | const rLen = end - start + 1; 338 | if (rLen > 0) { 339 | mapped.splice(start, rLen); 340 | disposers.splice(start, rLen); 341 | } 342 | items = newItems.slice(0); 343 | len = newLen; 344 | return mapped; 345 | } 346 | 347 | // insert any remaining updates and we're done 348 | if (start > end) { 349 | for (j = start; j <= newEnd; j++) mapped[j] = root(mapper); 350 | for (; j < newLen; j++) { 351 | mapped[j] = temp[j]; 352 | disposers[j] = tempdisposers[j]; 353 | } 354 | items = newItems.slice(0); 355 | len = newLen; 356 | return mapped; 357 | } 358 | 359 | // 0) prepare a map of all indices in newItems, scanning backwards so we encounter them in natural order 360 | newIndices = new Map(); 361 | newIndicesNext = new Array(newEnd + 1); 362 | for (j = newEnd; j >= start; j--) { 363 | item = newItems[j]; 364 | i = newIndices.get(item)!; 365 | newIndicesNext[j] = i === undefined ? -1 : i; 366 | newIndices.set(item, j); 367 | } 368 | // 1) step through all old items and see if they can be found in the new set; if so, save them in a temp array and mark them moved; if not, exit them 369 | for (i = start; i <= end; i++) { 370 | item = items[i]; 371 | j = newIndices.get(item)!; 372 | if (j !== undefined && j !== -1) { 373 | temp[j] = mapped[i]; 374 | tempdisposers[j] = disposers[i]; 375 | j = newIndicesNext[j]; 376 | newIndices.set(item, j); 377 | } else disposers[i](); 378 | } 379 | // 2) set all the new values, pulling from the temp array if copied, otherwise entering the new value 380 | for (j = start; j < newLen; j++) { 381 | if (j in temp) { 382 | mapped[j] = temp[j]; 383 | disposers[j] = tempdisposers[j]; 384 | } else mapped[j] = root(mapper); 385 | } 386 | // 3) in case the new set is shorter than the old, set the length of the mapped array 387 | len = mapped.length = newLen; 388 | // 4) save a copy of the mapped items for the next update 389 | items = newItems.slice(0); 390 | } 391 | return mapped; 392 | }); 393 | function mapper(disposer: () => void) { 394 | disposers[j] = disposer; 395 | return mapFn(newItems[j], j); 396 | } 397 | }; 398 | } 399 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "types", 4 | "emitDeclarationOnly": true, 5 | "declaration": true, 6 | "incremental": true, 7 | "target": "esnext", 8 | "moduleResolution": "node", 9 | "strict": true 10 | } 11 | } --------------------------------------------------------------------------------