refactor: refactor UI using jotai

This commit is contained in:
Kevin Yue
2023-06-07 09:20:44 +08:00
parent c07e232ec2
commit 1af21432d4
27 changed files with 866 additions and 640 deletions

63
gpgui/pnpm-lock.yaml generated
View File

@@ -1,4 +1,8 @@
lockfileVersion: '6.0'
lockfileVersion: '6.1'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
dependencies:
'@emotion/react':
@@ -19,6 +23,21 @@ dependencies:
'@tauri-apps/api':
specifier: ^1.3.0
version: 1.3.0
immer:
specifier: ^10.0.2
version: 10.0.2
jotai:
specifier: ^2.1.1
version: 2.1.1(react@18.2.0)
jotai-immer:
specifier: ^0.2.0
version: 0.2.0(immer@10.0.2)(jotai@2.1.1)(react@18.2.0)
jotai-optics:
specifier: ^0.3.0
version: 0.3.0(jotai@2.1.1)(optics-ts@2.4.0)
optics-ts:
specifier: ^2.4.0
version: 2.4.0
react:
specifier: ^18.2.0
version: 18.2.0
@@ -1146,6 +1165,10 @@ packages:
react-is: 16.13.1
dev: false
/immer@10.0.2:
resolution: {integrity: sha512-Rx3CqeqQ19sxUtYV9CU911Vhy8/721wRFnJv3REVGWUmoAcIwzifTsdmJte/MV+0/XpM35LZdQMBGkRIoLPwQA==}
dev: false
/import-fresh@3.3.0:
resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==}
engines: {node: '>=6'}
@@ -1163,6 +1186,40 @@ packages:
dependencies:
has: 1.0.3
/jotai-immer@0.2.0(immer@10.0.2)(jotai@2.1.1)(react@18.2.0):
resolution: {integrity: sha512-hahK8EPiROS9RoNWmX/Z8rY9WkAijspX4BZ1O7umpcwI4kPNkbcCpu/PhiQ8FMcpEcF6KmbpbMpSSj/GFmo8NA==}
peerDependencies:
immer: '*'
jotai: '>=1.11.0'
react: '>=17.0.0'
dependencies:
immer: 10.0.2
jotai: 2.1.1(react@18.2.0)
react: 18.2.0
dev: false
/jotai-optics@0.3.0(jotai@2.1.1)(optics-ts@2.4.0):
resolution: {integrity: sha512-5ttpCRREIBu6DJix0wlyBP6y1QDPlePnoMZSXNDi/FOkXZrhk9uIXKjwvw34/yBCHT5mYpFUD4sFDvRUU2vkvQ==}
peerDependencies:
jotai: '>=1.11.0'
optics-ts: '*'
dependencies:
jotai: 2.1.1(react@18.2.0)
optics-ts: 2.4.0
dev: false
/jotai@2.1.1(react@18.2.0):
resolution: {integrity: sha512-LaaiuSaq+6XkwkrCtCkczyFVZOXe0dfjAFN4DVMsSZSRv/A/4xuLHnlpHMEDqvngjWYBotTIrnQ7OogMkUE6wA==}
engines: {node: '>=12.20.0'}
peerDependencies:
react: '>=17.0.0'
peerDependenciesMeta:
react:
optional: true
dependencies:
react: 18.2.0
dev: false
/js-tokens@4.0.0:
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
dev: false
@@ -1193,6 +1250,10 @@ packages:
engines: {node: '>=0.10.0'}
dev: false
/optics-ts@2.4.0:
resolution: {integrity: sha512-BIYgnqOTEf+WiXuxuBFXeoCtyIDOwnUwCMybdQh8qdHyWXunwVVt7iD9XwNq8SCd5vUo9vqgYxF5ati/6inIuQ==}
dev: false
/parent-module@1.0.1:
resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==}
engines: {node: '>=6'}