updated react wrapper (#1565)

- updated @lit-labs/react to latest version with improved type compatibility
- added small preact section to the react docs with link to preact/compat typescript config guide
pull/1572/head
Alan Chambers 2023-09-14 16:13:29 +01:00 zatwierdzone przez GitHub
rodzic c858bc3723
commit 3b77c3b99f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 12 dodań i 8 usunięć

Wyświetl plik

@ -32,6 +32,10 @@ If you'd rather not use the CDN for assets, you can create a [build task](https:
Now you can start using components!
### Preact
Preact users facing type errors using components may benefit from setting "paths" in their tsconfig.json so that react types will instead resolve to preact/compat as described in [Preact's typescript documentation](https://preactjs.com/guide/v10/typescript/#typescript-preactcompat-configuration).
## Usage
### Importing Components

14
package-lock.json wygenerowano
Wyświetl plik

@ -11,7 +11,7 @@
"dependencies": {
"@ctrl/tinycolor": "^4.0.1",
"@floating-ui/dom": "^1.2.1",
"@lit-labs/react": "^2.0.1",
"@lit-labs/react": "^2.0.3",
"@shoelace-style/animations": "^1.1.0",
"@shoelace-style/localize": "^3.1.1",
"composed-offset-position": "^0.0.4",
@ -1474,9 +1474,9 @@
}
},
"node_modules/@lit-labs/react": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@lit-labs/react/-/react-2.0.1.tgz",
"integrity": "sha512-Nj+XB3HamqaWefN91lpFPJaqjJ78XzGkPWCedB4jyH22GBFEenpE9A/h8B/2dnIGXtNtd9D/RFpUdQ/dBtWFqA==",
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@lit-labs/react/-/react-2.0.3.tgz",
"integrity": "sha512-lSvWbTrbxWqYv/iiOwbAEJfFZrKjO/QjJ4IEXhg43sdD5fNFz4wRXpVsntfVn4DnxpQd+NVRnrsF2USgK0XCTw==",
"peerDependencies": {
"@types/react": "17 || 18"
}
@ -18290,9 +18290,9 @@
}
},
"@lit-labs/react": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@lit-labs/react/-/react-2.0.1.tgz",
"integrity": "sha512-Nj+XB3HamqaWefN91lpFPJaqjJ78XzGkPWCedB4jyH22GBFEenpE9A/h8B/2dnIGXtNtd9D/RFpUdQ/dBtWFqA==",
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@lit-labs/react/-/react-2.0.3.tgz",
"integrity": "sha512-lSvWbTrbxWqYv/iiOwbAEJfFZrKjO/QjJ4IEXhg43sdD5fNFz4wRXpVsntfVn4DnxpQd+NVRnrsF2USgK0XCTw==",
"requires": {}
},
"@lit-labs/ssr-dom-shim": {

Wyświetl plik

@ -62,7 +62,7 @@
"dependencies": {
"@ctrl/tinycolor": "^4.0.1",
"@floating-ui/dom": "^1.2.1",
"@lit-labs/react": "^2.0.1",
"@lit-labs/react": "^2.0.3",
"@shoelace-style/animations": "^1.1.0",
"@shoelace-style/localize": "^3.1.1",
"composed-offset-position": "^0.0.4",