This commit is contained in:
Ren Amamiya 2023-06-27 20:53:52 +07:00
parent a29ef03198
commit 3fe601cfc6
20 changed files with 159 additions and 110 deletions

View File

@ -16,8 +16,8 @@
"@floating-ui/react": "^0.23.1", "@floating-ui/react": "^0.23.1",
"@headlessui/react": "^1.7.15", "@headlessui/react": "^1.7.15",
"@nostr-dev-kit/ndk": "^0.5.13", "@nostr-dev-kit/ndk": "^0.5.13",
"@tanstack/react-query": "^4.29.17", "@tanstack/react-query": "^4.29.18",
"@tanstack/react-query-devtools": "^4.29.17", "@tanstack/react-query-devtools": "^4.29.18",
"@tanstack/react-virtual": "3.0.0-beta.54", "@tanstack/react-virtual": "3.0.0-beta.54",
"@tauri-apps/api": "^1.4.0", "@tauri-apps/api": "^1.4.0",
"cheerio": "1.0.0-rc.12", "cheerio": "1.0.0-rc.12",

View File

@ -11,11 +11,11 @@ dependencies:
specifier: ^0.5.13 specifier: ^0.5.13
version: 0.5.13(typescript@4.9.5) version: 0.5.13(typescript@4.9.5)
'@tanstack/react-query': '@tanstack/react-query':
specifier: ^4.29.17 specifier: ^4.29.18
version: 4.29.17(react-dom@18.2.0)(react@18.2.0) version: 4.29.18(react-dom@18.2.0)(react@18.2.0)
'@tanstack/react-query-devtools': '@tanstack/react-query-devtools':
specifier: ^4.29.17 specifier: ^4.29.18
version: 4.29.17(@tanstack/react-query@4.29.17)(react-dom@18.2.0)(react@18.2.0) version: 4.29.18(@tanstack/react-query@4.29.18)(react-dom@18.2.0)(react@18.2.0)
'@tanstack/react-virtual': '@tanstack/react-virtual':
specifier: 3.0.0-beta.54 specifier: 3.0.0-beta.54
version: 3.0.0-beta.54(react@18.2.0) version: 3.0.0-beta.54(react@18.2.0)
@ -445,7 +445,7 @@ packages:
aria-hidden: 1.2.3 aria-hidden: 1.2.3
react: 18.2.0 react: 18.2.0
react-dom: 18.2.0(react@18.2.0) react-dom: 18.2.0(react@18.2.0)
tabbable: 6.1.2 tabbable: 6.2.0
dev: false dev: false
/@headlessui/react@1.7.15(react-dom@18.2.0)(react@18.2.0): /@headlessui/react@1.7.15(react-dom@18.2.0)(react@18.2.0):
@ -584,14 +584,14 @@ packages:
'@noble/hashes': 1.3.1 '@noble/hashes': 1.3.1
'@noble/secp256k1': 2.0.0 '@noble/secp256k1': 2.0.0
'@scure/base': 1.1.1 '@scure/base': 1.1.1
'@typescript-eslint/eslint-plugin': 5.60.0(@typescript-eslint/parser@5.60.0)(eslint@8.43.0)(typescript@4.9.5) '@typescript-eslint/eslint-plugin': 5.60.1(@typescript-eslint/parser@5.60.1)(eslint@8.43.0)(typescript@4.9.5)
'@typescript-eslint/parser': 5.60.0(eslint@8.43.0)(typescript@4.9.5) '@typescript-eslint/parser': 5.60.1(eslint@8.43.0)(typescript@4.9.5)
debug: 4.3.4 debug: 4.3.4
esbuild: 0.17.19 esbuild: 0.17.19
esbuild-plugin-alias: 0.2.1 esbuild-plugin-alias: 0.2.1
eslint: 8.43.0 eslint: 8.43.0
eslint-config-prettier: 8.8.0(eslint@8.43.0) eslint-config-prettier: 8.8.0(eslint@8.43.0)
eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.60.0)(eslint@8.43.0) eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.60.1)(eslint@8.43.0)
esm-loader-typescript: 1.0.4 esm-loader-typescript: 1.0.4
eventemitter3: 5.0.1 eventemitter3: 5.0.1
light-bolt11-decoder: 3.0.0 light-bolt11-decoder: 3.0.0
@ -842,23 +842,23 @@ packages:
resolution: {integrity: sha512-iDbO8yZOpm1lqgq6L8mpxGbKaoiyZSjthxEB3WGU7mNPYss9q4H3Q67+e2xXGwkemEVmtEX/WwvtFitrvVU8TA==} resolution: {integrity: sha512-iDbO8yZOpm1lqgq6L8mpxGbKaoiyZSjthxEB3WGU7mNPYss9q4H3Q67+e2xXGwkemEVmtEX/WwvtFitrvVU8TA==}
dev: false dev: false
/@tanstack/react-query-devtools@4.29.17(@tanstack/react-query@4.29.17)(react-dom@18.2.0)(react@18.2.0): /@tanstack/react-query-devtools@4.29.18(@tanstack/react-query@4.29.18)(react-dom@18.2.0)(react@18.2.0):
resolution: {integrity: sha512-Dgd7c7ToCzJrpuyDZ0Rwx5bXSqWICOaB8sNSzo8YtwpWXuJcQ074qgb0kko5/CzIVDxhbG8WX5dnUwr5Xqa++g==} resolution: {integrity: sha512-MH0EFL1lDzYBLbhCeD7GaNku4pOE7bPEm5HIFGw4YdRrmDjkTkkbGWqDJ15odGwp7qOvOgLbCxyTCqfof29Dag==}
peerDependencies: peerDependencies:
'@tanstack/react-query': 4.29.17 '@tanstack/react-query': 4.29.18
react: ^16.8.0 || ^17.0.0 || ^18.0.0 react: ^16.8.0 || ^17.0.0 || ^18.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
dependencies: dependencies:
'@tanstack/match-sorter-utils': 8.8.4 '@tanstack/match-sorter-utils': 8.8.4
'@tanstack/react-query': 4.29.17(react-dom@18.2.0)(react@18.2.0) '@tanstack/react-query': 4.29.18(react-dom@18.2.0)(react@18.2.0)
react: 18.2.0 react: 18.2.0
react-dom: 18.2.0(react@18.2.0) react-dom: 18.2.0(react@18.2.0)
superjson: 1.12.4 superjson: 1.12.4
use-sync-external-store: 1.2.0(react@18.2.0) use-sync-external-store: 1.2.0(react@18.2.0)
dev: false dev: false
/@tanstack/react-query@4.29.17(react-dom@18.2.0)(react@18.2.0): /@tanstack/react-query@4.29.18(react-dom@18.2.0)(react@18.2.0):
resolution: {integrity: sha512-udOy/jgqiBHBAP93YPAU3QoVYO+Rtx9HT/10xGDQzC8iQU/wIxcIaT/usX+1NSzoUFYU5hUcPaNErPWZnR7XgA==} resolution: {integrity: sha512-CyoxrT8U7MWLZOdl0XLCiHC+W5cnXNELafFtzcsrwrALiUulONEfWFl6TzgvENfhC50OBjVGy/6Yl3YsIhAM6g==}
peerDependencies: peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0 react: ^16.8.0 || ^17.0.0 || ^18.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
@ -870,7 +870,6 @@ packages:
optional: true optional: true
dependencies: dependencies:
'@tanstack/query-core': 4.29.17 '@tanstack/query-core': 4.29.17
client-only: 0.0.1
react: 18.2.0 react: 18.2.0
react-dom: 18.2.0(react@18.2.0) react-dom: 18.2.0(react@18.2.0)
use-sync-external-store: 1.2.0(react@18.2.0) use-sync-external-store: 1.2.0(react@18.2.0)
@ -1079,8 +1078,8 @@ packages:
resolution: {integrity: sha512-W8F4eoTIvzXeNrT3JroQPimZLXnlJA8smYygHZUKFPVoYwgs/OhJkA1VBhL3iSs57OQkuINqHlY4SmMT5wtnJg==} resolution: {integrity: sha512-W8F4eoTIvzXeNrT3JroQPimZLXnlJA8smYygHZUKFPVoYwgs/OhJkA1VBhL3iSs57OQkuINqHlY4SmMT5wtnJg==}
dev: true dev: true
/@typescript-eslint/eslint-plugin@5.60.0(@typescript-eslint/parser@5.60.0)(eslint@8.43.0)(typescript@4.9.5): /@typescript-eslint/eslint-plugin@5.60.1(@typescript-eslint/parser@5.60.1)(eslint@8.43.0)(typescript@4.9.5):
resolution: {integrity: sha512-78B+anHLF1TI8Jn/cD0Q00TBYdMgjdOn980JfAVa9yw5sop8nyTfVOQAv6LWywkOGLclDBtv5z3oxN4w7jxyNg==} resolution: {integrity: sha512-KSWsVvsJsLJv3c4e73y/Bzt7OpqMCADUO846bHcuWYSYM19bldbAeDv7dYyV0jwkbMfJ2XdlzwjhXtuD7OY6bw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies: peerDependencies:
'@typescript-eslint/parser': ^5.0.0 '@typescript-eslint/parser': ^5.0.0
@ -1091,10 +1090,10 @@ packages:
optional: true optional: true
dependencies: dependencies:
'@eslint-community/regexpp': 4.5.1 '@eslint-community/regexpp': 4.5.1
'@typescript-eslint/parser': 5.60.0(eslint@8.43.0)(typescript@4.9.5) '@typescript-eslint/parser': 5.60.1(eslint@8.43.0)(typescript@4.9.5)
'@typescript-eslint/scope-manager': 5.60.0 '@typescript-eslint/scope-manager': 5.60.1
'@typescript-eslint/type-utils': 5.60.0(eslint@8.43.0)(typescript@4.9.5) '@typescript-eslint/type-utils': 5.60.1(eslint@8.43.0)(typescript@4.9.5)
'@typescript-eslint/utils': 5.60.0(eslint@8.43.0)(typescript@4.9.5) '@typescript-eslint/utils': 5.60.1(eslint@8.43.0)(typescript@4.9.5)
debug: 4.3.4 debug: 4.3.4
eslint: 8.43.0 eslint: 8.43.0
grapheme-splitter: 1.0.4 grapheme-splitter: 1.0.4
@ -1107,8 +1106,8 @@ packages:
- supports-color - supports-color
dev: false dev: false
/@typescript-eslint/parser@5.60.0(eslint@8.43.0)(typescript@4.9.5): /@typescript-eslint/parser@5.60.1(eslint@8.43.0)(typescript@4.9.5):
resolution: {integrity: sha512-jBONcBsDJ9UoTWrARkRRCgDz6wUggmH5RpQVlt7BimSwaTkTjwypGzKORXbR4/2Hqjk9hgwlon2rVQAjWNpkyQ==} resolution: {integrity: sha512-pHWlc3alg2oSMGwsU/Is8hbm3XFbcrb6P5wIxcQW9NsYBfnrubl/GhVVD/Jm/t8HXhA2WncoIRfBtnCgRGV96Q==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies: peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
@ -1117,9 +1116,9 @@ packages:
typescript: typescript:
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/scope-manager': 5.60.0 '@typescript-eslint/scope-manager': 5.60.1
'@typescript-eslint/types': 5.60.0 '@typescript-eslint/types': 5.60.1
'@typescript-eslint/typescript-estree': 5.60.0(typescript@4.9.5) '@typescript-eslint/typescript-estree': 5.60.1(typescript@4.9.5)
debug: 4.3.4 debug: 4.3.4
eslint: 8.43.0 eslint: 8.43.0
typescript: 4.9.5 typescript: 4.9.5
@ -1127,16 +1126,16 @@ packages:
- supports-color - supports-color
dev: false dev: false
/@typescript-eslint/scope-manager@5.60.0: /@typescript-eslint/scope-manager@5.60.1:
resolution: {integrity: sha512-hakuzcxPwXi2ihf9WQu1BbRj1e/Pd8ZZwVTG9kfbxAMZstKz8/9OoexIwnmLzShtsdap5U/CoQGRCWlSuPbYxQ==} resolution: {integrity: sha512-Dn/LnN7fEoRD+KspEOV0xDMynEmR3iSHdgNsarlXNLGGtcUok8L4N71dxUgt3YvlO8si7E+BJ5Fe3wb5yUw7DQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies: dependencies:
'@typescript-eslint/types': 5.60.0 '@typescript-eslint/types': 5.60.1
'@typescript-eslint/visitor-keys': 5.60.0 '@typescript-eslint/visitor-keys': 5.60.1
dev: false dev: false
/@typescript-eslint/type-utils@5.60.0(eslint@8.43.0)(typescript@4.9.5): /@typescript-eslint/type-utils@5.60.1(eslint@8.43.0)(typescript@4.9.5):
resolution: {integrity: sha512-X7NsRQddORMYRFH7FWo6sA9Y/zbJ8s1x1RIAtnlj6YprbToTiQnM6vxcMu7iYhdunmoC0rUWlca13D5DVHkK2g==} resolution: {integrity: sha512-vN6UztYqIu05nu7JqwQGzQKUJctzs3/Hg7E2Yx8rz9J+4LgtIDFWjjl1gm3pycH0P3mHAcEUBd23LVgfrsTR8A==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies: peerDependencies:
eslint: '*' eslint: '*'
@ -1145,8 +1144,8 @@ packages:
typescript: typescript:
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/typescript-estree': 5.60.0(typescript@4.9.5) '@typescript-eslint/typescript-estree': 5.60.1(typescript@4.9.5)
'@typescript-eslint/utils': 5.60.0(eslint@8.43.0)(typescript@4.9.5) '@typescript-eslint/utils': 5.60.1(eslint@8.43.0)(typescript@4.9.5)
debug: 4.3.4 debug: 4.3.4
eslint: 8.43.0 eslint: 8.43.0
tsutils: 3.21.0(typescript@4.9.5) tsutils: 3.21.0(typescript@4.9.5)
@ -1155,13 +1154,13 @@ packages:
- supports-color - supports-color
dev: false dev: false
/@typescript-eslint/types@5.60.0: /@typescript-eslint/types@5.60.1:
resolution: {integrity: sha512-ascOuoCpNZBccFVNJRSC6rPq4EmJ2NkuoKnd6LDNyAQmdDnziAtxbCGWCbefG1CNzmDvd05zO36AmB7H8RzKPA==} resolution: {integrity: sha512-zDcDx5fccU8BA0IDZc71bAtYIcG9PowaOwaD8rjYbqwK7dpe/UMQl3inJ4UtUK42nOCT41jTSCwg76E62JpMcg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: false dev: false
/@typescript-eslint/typescript-estree@5.60.0(typescript@4.9.5): /@typescript-eslint/typescript-estree@5.60.1(typescript@4.9.5):
resolution: {integrity: sha512-R43thAuwarC99SnvrBmh26tc7F6sPa2B3evkXp/8q954kYL6Ro56AwASYWtEEi+4j09GbiNAHqYwNNZuNlARGQ==} resolution: {integrity: sha512-hkX70J9+2M2ZT6fhti5Q2FoU9zb+GeZK2SLP1WZlvUDqdMbEKhexZODD1WodNRyO8eS+4nScvT0dts8IdaBzfw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies: peerDependencies:
typescript: '*' typescript: '*'
@ -1169,8 +1168,8 @@ packages:
typescript: typescript:
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/types': 5.60.0 '@typescript-eslint/types': 5.60.1
'@typescript-eslint/visitor-keys': 5.60.0 '@typescript-eslint/visitor-keys': 5.60.1
debug: 4.3.4 debug: 4.3.4
globby: 11.1.0 globby: 11.1.0
is-glob: 4.0.3 is-glob: 4.0.3
@ -1181,8 +1180,8 @@ packages:
- supports-color - supports-color
dev: false dev: false
/@typescript-eslint/utils@5.60.0(eslint@8.43.0)(typescript@4.9.5): /@typescript-eslint/utils@5.60.1(eslint@8.43.0)(typescript@4.9.5):
resolution: {integrity: sha512-ba51uMqDtfLQ5+xHtwlO84vkdjrqNzOnqrnwbMHMRY8Tqeme8C2Q8Fc7LajfGR+e3/4LoYiWXUM6BpIIbHJ4hQ==} resolution: {integrity: sha512-tiJ7FFdFQOWssFa3gqb94Ilexyw0JVxj6vBzaSpfN/8IhoKkDuSAenUKvsSHw2A/TMpJb26izIszTXaqygkvpQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies: peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
@ -1190,9 +1189,9 @@ packages:
'@eslint-community/eslint-utils': 4.4.0(eslint@8.43.0) '@eslint-community/eslint-utils': 4.4.0(eslint@8.43.0)
'@types/json-schema': 7.0.12 '@types/json-schema': 7.0.12
'@types/semver': 7.5.0 '@types/semver': 7.5.0
'@typescript-eslint/scope-manager': 5.60.0 '@typescript-eslint/scope-manager': 5.60.1
'@typescript-eslint/types': 5.60.0 '@typescript-eslint/types': 5.60.1
'@typescript-eslint/typescript-estree': 5.60.0(typescript@4.9.5) '@typescript-eslint/typescript-estree': 5.60.1(typescript@4.9.5)
eslint: 8.43.0 eslint: 8.43.0
eslint-scope: 5.1.1 eslint-scope: 5.1.1
semver: 7.5.3 semver: 7.5.3
@ -1201,11 +1200,11 @@ packages:
- typescript - typescript
dev: false dev: false
/@typescript-eslint/visitor-keys@5.60.0: /@typescript-eslint/visitor-keys@5.60.1:
resolution: {integrity: sha512-wm9Uz71SbCyhUKgcaPRauBdTegUyY/ZWl8gLwD/i/ybJqscrrdVSFImpvUz16BLPChIeKBK5Fa9s6KDQjsjyWw==} resolution: {integrity: sha512-xEYIxKcultP6E/RMKqube11pGjXH1DCo60mQoWhVYyKfLkwbIVVjYxmOenNMxILx0TjCujPTjjnTIVzm09TXIw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies: dependencies:
'@typescript-eslint/types': 5.60.0 '@typescript-eslint/types': 5.60.1
eslint-visitor-keys: 3.4.1 eslint-visitor-keys: 3.4.1
dev: false dev: false
@ -1346,7 +1345,7 @@ packages:
resolution: {integrity: sha512-xcLxITLe2HYa1cnYnwCjkOO1PqUHQpozB8x9AR0OgWN2woOBi5kSDVxKfd0b7sb1hw5qFeJhXm9H1nu3xSfLeQ==} resolution: {integrity: sha512-xcLxITLe2HYa1cnYnwCjkOO1PqUHQpozB8x9AR0OgWN2woOBi5kSDVxKfd0b7sb1hw5qFeJhXm9H1nu3xSfLeQ==}
engines: {node: '>=10'} engines: {node: '>=10'}
dependencies: dependencies:
tslib: 2.5.3 tslib: 2.6.0
dev: false dev: false
/array-buffer-byte-length@1.0.0: /array-buffer-byte-length@1.0.0:
@ -1459,7 +1458,7 @@ packages:
hasBin: true hasBin: true
dependencies: dependencies:
caniuse-lite: 1.0.30001508 caniuse-lite: 1.0.30001508
electron-to-chromium: 1.4.440 electron-to-chromium: 1.4.441
node-releases: 2.0.12 node-releases: 2.0.12
update-browserslist-db: 1.0.11(browserslist@4.21.9) update-browserslist-db: 1.0.11(browserslist@4.21.9)
dev: true dev: true
@ -1898,8 +1897,8 @@ packages:
/eastasianwidth@0.2.0: /eastasianwidth@0.2.0:
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
/electron-to-chromium@1.4.440: /electron-to-chromium@1.4.441:
resolution: {integrity: sha512-r6dCgNpRhPwiWlxbHzZQ/d9swfPaEJGi8ekqRBwQYaR3WmA5VkqQfBWSDDjuJU1ntO+W9tHx8OHV/96Q8e0dVw==} resolution: {integrity: sha512-LlCgQ8zgYZPymf5H4aE9itwiIWH4YlCiv1HFLmmcBeFYi5E+3eaIFnjHzYtcFQbaKfAW+CqZ9pgxo33DZuoqPg==}
dev: true dev: true
/emoji-regex@8.0.0: /emoji-regex@8.0.0:
@ -2103,7 +2102,7 @@ packages:
- supports-color - supports-color
dev: false dev: false
/eslint-module-utils@2.8.0(@typescript-eslint/parser@5.60.0)(eslint-import-resolver-node@0.3.7)(eslint@8.43.0): /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.60.1)(eslint-import-resolver-node@0.3.7)(eslint@8.43.0):
resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==}
engines: {node: '>=4'} engines: {node: '>=4'}
peerDependencies: peerDependencies:
@ -2124,7 +2123,7 @@ packages:
eslint-import-resolver-webpack: eslint-import-resolver-webpack:
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/parser': 5.60.0(eslint@8.43.0)(typescript@4.9.5) '@typescript-eslint/parser': 5.60.1(eslint@8.43.0)(typescript@4.9.5)
debug: 3.2.7 debug: 3.2.7
eslint: 8.43.0 eslint: 8.43.0
eslint-import-resolver-node: 0.3.7 eslint-import-resolver-node: 0.3.7
@ -2132,7 +2131,7 @@ packages:
- supports-color - supports-color
dev: false dev: false
/eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.60.0)(eslint@8.43.0): /eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.60.1)(eslint@8.43.0):
resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==}
engines: {node: '>=4'} engines: {node: '>=4'}
peerDependencies: peerDependencies:
@ -2142,7 +2141,7 @@ packages:
'@typescript-eslint/parser': '@typescript-eslint/parser':
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/parser': 5.60.0(eslint@8.43.0)(typescript@4.9.5) '@typescript-eslint/parser': 5.60.1(eslint@8.43.0)(typescript@4.9.5)
array-includes: 3.1.6 array-includes: 3.1.6
array.prototype.flat: 1.3.1 array.prototype.flat: 1.3.1
array.prototype.flatmap: 1.3.1 array.prototype.flatmap: 1.3.1
@ -2150,7 +2149,7 @@ packages:
doctrine: 2.1.0 doctrine: 2.1.0
eslint: 8.43.0 eslint: 8.43.0
eslint-import-resolver-node: 0.3.7 eslint-import-resolver-node: 0.3.7
eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.60.0)(eslint-import-resolver-node@0.3.7)(eslint@8.43.0) eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.60.1)(eslint-import-resolver-node@0.3.7)(eslint@8.43.0)
has: 1.0.3 has: 1.0.3
is-core-module: 2.12.1 is-core-module: 2.12.1
is-glob: 4.0.3 is-glob: 4.0.3
@ -2428,7 +2427,7 @@ packages:
dependencies: dependencies:
react: 18.2.0 react: 18.2.0
react-dom: 18.2.0(react@18.2.0) react-dom: 18.2.0(react@18.2.0)
tslib: 2.5.3 tslib: 2.6.0
optionalDependencies: optionalDependencies:
'@emotion/is-prop-valid': 0.8.8 '@emotion/is-prop-valid': 0.8.8
dev: false dev: false
@ -4159,8 +4158,8 @@ packages:
glob: 7.2.3 glob: 7.2.3
dev: false dev: false
/rollup@3.25.2: /rollup@3.25.3:
resolution: {integrity: sha512-VLnkxZMDr3jpxgtmS8pQZ0UvhslmF4ADq/9w4erkctbgjCqLW9oa89fJuXEs4ZmgyoF7Dm8rMDKSS5b5u2hHUg==} resolution: {integrity: sha512-ZT279hx8gszBj9uy5FfhoG4bZx8c+0A1sbqtr7Q3KNWIizpTdDEPZbV2xcbvHsnFp4MavCQYZyzApJ+virB8Yw==}
engines: {node: '>=14.18.0', npm: '>=8.0.0'} engines: {node: '>=14.18.0', npm: '>=8.0.0'}
hasBin: true hasBin: true
optionalDependencies: optionalDependencies:
@ -4189,7 +4188,7 @@ packages:
/rxjs@7.8.1: /rxjs@7.8.1:
resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==}
dependencies: dependencies:
tslib: 2.5.3 tslib: 2.6.0
dev: true dev: true
/safe-buffer@5.2.1: /safe-buffer@5.2.1:
@ -4552,8 +4551,8 @@ packages:
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
engines: {node: '>= 0.4'} engines: {node: '>= 0.4'}
/tabbable@6.1.2: /tabbable@6.2.0:
resolution: {integrity: sha512-qCN98uP7i9z0fIS4amQ5zbGBOq+OSigYeGvPy7NDk8Y9yncqDZ9pRPgfsc2PJIVM9RrJj7GIfuRgmjoUU9zTHQ==} resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==}
dev: false dev: false
/tailwind-merge@1.13.2: /tailwind-merge@1.13.2:
@ -4693,8 +4692,8 @@ packages:
resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==}
dev: false dev: false
/tslib@2.5.3: /tslib@2.6.0:
resolution: {integrity: sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==} resolution: {integrity: sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==}
/tstl@2.5.13: /tstl@2.5.13:
resolution: {integrity: sha512-h9wayHHFI5+yqt8iau0vqH96cTNhezhZ/Fk/hrIdpfkiMu3lg9nzyvMfs5bIdX51IVzZO6DudLqhkL/rVXpT6g==} resolution: {integrity: sha512-h9wayHHFI5+yqt8iau0vqH96cTNhezhZ/Fk/hrIdpfkiMu3lg9nzyvMfs5bIdX51IVzZO6DudLqhkL/rVXpT6g==}
@ -4938,7 +4937,7 @@ packages:
'@types/node': 18.16.18 '@types/node': 18.16.18
esbuild: 0.17.19 esbuild: 0.17.19
postcss: 8.4.24 postcss: 8.4.24
rollup: 3.25.2 rollup: 3.25.3
optionalDependencies: optionalDependencies:
fsevents: 2.3.2 fsevents: 2.3.2
dev: true dev: true

View File

@ -1,7 +1,6 @@
import { removeBlock } from "@libs/storage"; import { removeBlock } from "@libs/storage";
import { CancelIcon } from "@shared/icons"; import { CancelIcon } from "@shared/icons";
import { Image } from "@shared/image"; import { Image } from "@shared/image";
import { TitleBar } from "@shared/titleBar";
import { DEFAULT_AVATAR } from "@stores/constants"; import { DEFAULT_AVATAR } from "@stores/constants";
import { useMutation, useQueryClient } from "@tanstack/react-query"; import { useMutation, useQueryClient } from "@tanstack/react-query";

View File

@ -51,7 +51,7 @@ export async function prefetchEvents(
}); });
relaySetSubscription.on("eose", () => { relaySetSubscription.on("eose", () => {
setTimeout(() => resolve(new Set(events.values())), 3000); setTimeout(() => resolve(new Set(events.values())), 1200);
}); });
}); });
} }

View File

@ -88,20 +88,18 @@ export function ActiveAccount({ data }: { data: any }) {
}, []); }, []);
if (status === "loading") { if (status === "loading") {
return <div className="w-9 h-9 rounded bg-zinc-800 animate-pulse" />; return <div className="w-9 h-9 rounded-md bg-zinc-800 animate-pulse" />;
} }
return ( return (
<div className="inline-flex items-center gap-2"> <div className="relative inline-block h-9 w-9">
<div className="relative inline-block h-9 w-9"> <Image
<Image src={user.image}
src={user.image} fallback={DEFAULT_AVATAR}
fallback={DEFAULT_AVATAR} alt={data.npub}
alt={data.npub} className="h-9 w-9 rounded-md object-cover"
className="h-9 w-9 rounded object-cover" />
/> <NetworkStatusIndicator />
<NetworkStatusIndicator />
</div>
</div> </div>
); );
} }

View File

@ -17,7 +17,7 @@ import { useHotkeys } from "react-hotkeys-hook";
export function Composer() { export function Composer() {
const { account } = useAccount(); const { account } = useAccount();
const [toggle, open] = useComposer((state: any) => [ const [toggle, open] = useComposer((state) => [
state.toggleModal, state.toggleModal,
state.open, state.open,
]); ]);
@ -57,7 +57,7 @@ export function Composer() {
leaveFrom="opacity-100 scale-100" leaveFrom="opacity-100 scale-100"
leaveTo="opacity-0 scale-95" leaveTo="opacity-0 scale-95"
> >
<Dialog.Panel className="relative h-min w-full max-w-xl rounded-lg border border-zinc-800 bg-zinc-900"> <Dialog.Panel className="relative h-min w-full max-w-xl rounded-xl border-t border-zinc-800/50 bg-zinc-900">
<div className="flex items-center justify-between px-4 py-4"> <div className="flex items-center justify-between px-4 py-4">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<div>{account && <User pubkey={account.pubkey} />}</div> <div>{account && <User pubkey={account.pubkey} />}</div>
@ -85,9 +85,7 @@ export function Composer() {
/> />
</div> </div>
</div> </div>
{account && ( {account && <Post />}
<Post pubkey={account.pubkey} privkey={account.privkey} />
)}
</Dialog.Panel> </Dialog.Panel>
</Transition.Child> </Transition.Child>
</div> </div>

View File

@ -4,6 +4,7 @@ import { ImageUploader } from "@shared/composer/imageUploader";
import { TrashIcon } from "@shared/icons"; import { TrashIcon } from "@shared/icons";
import { MentionNote } from "@shared/notes/mentions/note"; import { MentionNote } from "@shared/notes/mentions/note";
import { useComposer } from "@stores/composer"; import { useComposer } from "@stores/composer";
import { FULL_RELAYS } from "@stores/constants";
import { useCallback, useMemo, useState } from "react"; import { useCallback, useMemo, useState } from "react";
import { Node, Transforms, createEditor } from "slate"; import { Node, Transforms, createEditor } from "slate";
import { withHistory } from "slate-history"; import { withHistory } from "slate-history";
@ -44,7 +45,7 @@ const ImagePreview = ({
<img <img
alt={element.url} alt={element.url}
src={element.url} src={element.url}
className="m-0 h-auto w-full rounded-md" className="m-0 h-auto max-h-[300px] w-full rounded-md object-cover"
/> />
<button <button
type="button" type="button"
@ -58,11 +59,11 @@ const ImagePreview = ({
); );
}; };
export function Post({ pubkey, privkey }: { pubkey: string; privkey: string }) { export function Post() {
const publish = usePublish(); const publish = usePublish();
const [repost, toggle] = useComposer((state: any) => [ const [repost, toggle] = useComposer((state) => [
state.repost, state.repost,
state.toggle, state.toggleModal,
]); ]);
const editor = useMemo( const editor = useMemo(
() => withReact(withImages(withHistory(createEditor()))), () => withReact(withImages(withHistory(createEditor()))),
@ -86,10 +87,11 @@ export function Post({ pubkey, privkey }: { pubkey: string; privkey: string }) {
const submit = () => { const submit = () => {
let tags: string[][] = []; let tags: string[][] = [];
let kind: number; let kind: number;
if (repost.id && repost.pubkey) { if (repost.id && repost.pubkey) {
kind = 6; kind = 6;
tags = [ tags = [
["e", repost.id], ["e", repost.id, FULL_RELAYS[0], "root"],
["p", repost.pubkey], ["p", repost.pubkey],
]; ];
} else { } else {
@ -140,7 +142,7 @@ export function Post({ pubkey, privkey }: { pubkey: string; privkey: string }) {
</div> </div>
<div className="mt-4 flex items-center justify-between"> <div className="mt-4 flex items-center justify-between">
<ImageUploader /> <ImageUploader />
<Button onClick={() => submit} preset="publish"> <Button onClick={() => submit()} preset="publish">
Publish Publish
</Button> </Button>
</div> </div>

View File

@ -37,4 +37,5 @@ export * from "./trending";
export * from "./empty"; export * from "./empty";
export * from "./cmd"; export * from "./cmd";
export * from "./verticalDots"; export * from "./verticalDots";
export * from "./signal";
// @endindex // @endindex

View File

@ -0,0 +1,24 @@
import { SVGProps } from "react";
export function SignalIcon(
props: JSX.IntrinsicAttributes & SVGProps<SVGSVGElement>,
) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
fill="none"
viewBox="0 0 24 24"
{...props}
>
<path
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="1.5"
d="M5.46 5.46A9.221 9.221 0 002.75 12a9.221 9.221 0 002.71 6.541M8.365 8.367a5.123 5.123 0 00-1.505 3.634c0 1.419.575 2.704 1.505 3.633m7.268 0a5.122 5.122 0 001.505-3.633c0-1.42-.575-2.704-1.505-3.634m2.907 10.174a9.22 9.22 0 002.709-6.54 9.22 9.22 0 00-2.71-6.541M12.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0z"
/>
</svg>
);
}

View File

@ -2,11 +2,12 @@ import { Transition } from "@headlessui/react";
import { getActiveAccount } from "@libs/storage"; import { getActiveAccount } from "@libs/storage";
import { ActiveAccount } from "@shared/accounts/active"; import { ActiveAccount } from "@shared/accounts/active";
import { VerticalDotsIcon } from "@shared/icons"; import { VerticalDotsIcon } from "@shared/icons";
import { RelayManager } from "@shared/relayManager";
import { useQuery } from "@tanstack/react-query"; import { useQuery } from "@tanstack/react-query";
import { useState } from "react"; import { useState } from "react";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
export function MultiAccounts() { export function LumeBar() {
const { status, data: activeAccount } = useQuery( const { status, data: activeAccount } = useQuery(
["activeAccount"], ["activeAccount"],
async () => { async () => {
@ -25,10 +26,11 @@ export function MultiAccounts() {
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
{status === "loading" ? ( {status === "loading" ? (
<div className="group relative flex h-9 w-9 shrink animate-pulse items-center justify-center rounded-lg bg-zinc-900" /> <div className="group relative flex h-9 w-9 shrink animate-pulse items-center justify-center rounded-md bg-zinc-900" />
) : ( ) : (
<ActiveAccount data={activeAccount} /> <ActiveAccount data={activeAccount} />
)} )}
<RelayManager />
</div> </div>
<button <button
type="button" type="button"

View File

@ -1,10 +1,9 @@
import { ChannelsList } from "@app/channel/components/list";
import { ChatsList } from "@app/chat/components/list"; import { ChatsList } from "@app/chat/components/list";
import { Disclosure } from "@headlessui/react"; import { Disclosure } from "@headlessui/react";
import { AppHeader } from "@shared/appHeader"; import { AppHeader } from "@shared/appHeader";
import { Composer } from "@shared/composer/modal"; import { Composer } from "@shared/composer/modal";
import { NavArrowDownIcon, SpaceIcon, TrendingIcon } from "@shared/icons"; import { NavArrowDownIcon, SpaceIcon, TrendingIcon } from "@shared/icons";
import { MultiAccounts } from "@shared/multiAccounts"; import { LumeBar } from "@shared/lumeBar";
import { NavLink } from "react-router-dom"; import { NavLink } from "react-router-dom";
import { twMerge } from "tailwind-merge"; import { twMerge } from "tailwind-merge";
@ -118,8 +117,8 @@ export function Navigation({ reverse = false }: { reverse?: boolean }) {
)} )}
</Disclosure> </Disclosure>
</div> </div>
<div className="absolute bottom-2 left-0 px-8 w-full"> <div className="absolute bottom-3 left-0 px-8 w-full">
<MultiAccounts /> <LumeBar />
</div> </div>
</div> </div>
); );

View File

@ -17,7 +17,7 @@ export function Kind1({
{content.parsed} {content.parsed}
</div> </div>
{Array.isArray(content.images) && content.images.length ? ( {Array.isArray(content.images) && content.images.length ? (
<ImagePreview urls={content.images} /> <ImagePreview urls={content.images} truncate={truncate} />
) : ( ) : (
<></> <></>
)} )}

View File

@ -57,7 +57,7 @@ export const MentionNote = memo(function MentionNote({ id }: { id: string }) {
Lume isn't fully support this kind in newsfeed Lume isn't fully support this kind in newsfeed
</p> </p>
</div> </div>
<div className="markdown"> <div className="select-text whitespace-pre-line break-words text-base text-zinc-100">
<p>{data.content}</p> <p>{data.content}</p>
</div> </div>
</div> </div>

View File

@ -71,7 +71,7 @@ export function Note({ event, block }: Note) {
time={event.created_at} time={event.created_at}
repost={isRepost} repost={isRepost}
/> />
<div className="z-10 relative -mt-6 pl-[49px]"> <div className="relative -mt-6 pl-[49px]">
{renderContent} {renderContent}
{!isRepost && ( {!isRepost && (
<NoteMetadata <NoteMetadata

View File

@ -1,6 +1,9 @@
import { Image } from "@shared/image"; import { Image } from "@shared/image";
export function ImagePreview({ urls }: { urls: string[] }) { export function ImagePreview({
urls,
truncate,
}: { urls: string[]; truncate?: boolean }) {
return ( return (
<div className="mt-3 max-w-[420px] overflow-hidden"> <div className="mt-3 max-w-[420px] overflow-hidden">
<div className="flex flex-col gap-2"> <div className="flex flex-col gap-2">
@ -10,7 +13,9 @@ export function ImagePreview({ urls }: { urls: string[] }) {
src={url} src={url}
fallback="https://void.cat/d/XTmrMkpid8DGLjv1AzdvcW" fallback="https://void.cat/d/XTmrMkpid8DGLjv1AzdvcW"
alt="image" alt="image"
className="h-auto w-full border border-zinc-800/50 rounded-lg object-cover" className={`${
truncate ? "h-auto max-h-[300px]" : "h-auto"
} w-full border border-zinc-800/50 rounded-lg object-cover`}
/> />
</div> </div>
))} ))}

View File

@ -0,0 +1,13 @@
import { SignalIcon } from "@shared/icons";
export function RelayManager() {
return (
<button
type="button"
aria-label="Relay manager"
className="inline-flex items-center justify-center w-9 h-9 rounded-md border-t bg-zinc-800 border-zinc-700/50 transform active:translate-y-1"
>
<SignalIcon className="w-4 h-4 text-zinc-400" />
</button>
);
}

View File

@ -33,7 +33,7 @@ export function User({
}`} }`}
> >
<Popover.Button <Popover.Button
className={`${avatarWidth} ${avatarHeight} relative z-50 bg-zinc-900 shrink-0 overflow-hidden`} className={`${avatarWidth} ${avatarHeight} relative z-10 bg-zinc-900 shrink-0 overflow-hidden`}
> >
<Image <Image
src={user?.image} src={user?.image}

View File

@ -1,9 +1,18 @@
import { create } from "zustand"; import { create } from "zustand";
export const useComposer = create((set) => ({ interface ComposerState {
open: boolean;
reply: null;
repost: { id: string; pubkey: string };
toggleModal: (status: boolean) => void;
setRepost: (id: string, pubkey: string) => void;
clearRepost: () => void;
}
export const useComposer = create<ComposerState>((set) => ({
open: false, open: false,
repost: { id: null, pubkey: null },
reply: null, reply: null,
repost: { id: null, pubkey: null },
toggleModal: (status: boolean) => { toggleModal: (status: boolean) => {
set({ open: status }); set({ open: status });
if (!status) { if (!status) {

View File

@ -64,9 +64,9 @@ export const OPENGRAPH = {
}; };
export const FULL_RELAYS = [ export const FULL_RELAYS = [
"wss://relay.damus.io",
"wss://relay.nostr.band/all",
"wss://relayable.org", "wss://relayable.org",
"wss://nostr.mutinywallet.com", "wss://relay.damus.io",
"wss://relay.nostrgraph.net", "wss://relay.nostrgraph.net",
"wss://relay.nostr.band/all",
"wss://nostr.mutinywallet.com",
]; ];

View File

@ -2,7 +2,7 @@ import { create } from "zustand";
interface NoteState { interface NoteState {
hasNewNote: boolean; hasNewNote: boolean;
toggleHasNewNote: (by: boolean) => void; toggleHasNewNote: (status: boolean) => void;
} }
export const useNote = create<NoteState>((set) => ({ export const useNote = create<NoteState>((set) => ({