update ndk

This commit is contained in:
Ren Amamiya 2023-06-11 09:34:13 +07:00
parent 38558280ba
commit 6dab0d5e44
10 changed files with 190 additions and 252 deletions

View File

@ -15,7 +15,7 @@
"dependencies": {
"@floating-ui/react": "^0.23.1",
"@headlessui/react": "^1.7.15",
"@nostr-dev-kit/ndk": "^0.4.5",
"@nostr-dev-kit/ndk": "^0.4.6",
"@tanstack/react-virtual": "3.0.0-beta.54",
"@tauri-apps/api": "^1.3.0",
"@vidstack/react": "^0.4.5",
@ -23,13 +23,13 @@
"destr": "^1.2.2",
"immer": "^10.0.2",
"light-bolt11-decoder": "^3.0.0",
"nostr-tools": "^1.11.2",
"nostr-tools": "^1.12.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.44.3",
"react-markdown": "^8.0.7",
"react-resizable-panels": "^0.0.48",
"react-virtuoso": "^4.3.9",
"react-virtuoso": "^4.3.10",
"remark-gfm": "^3.0.1",
"slate": "^0.94.1",
"slate-history": "^0.93.0",
@ -43,8 +43,8 @@
"devDependencies": {
"@tailwindcss/typography": "^0.5.9",
"@tauri-apps/cli": "^1.3.1",
"@types/node": "^18.16.16",
"@types/react": "^18.2.9",
"@types/node": "^18.16.17",
"@types/react": "^18.2.11",
"@types/react-dom": "^18.2.4",
"@types/youtube-player": "^5.5.7",
"@vitejs/plugin-react-swc": "^3.3.2",

View File

@ -8,8 +8,8 @@ dependencies:
specifier: ^1.7.15
version: 1.7.15(react-dom@18.2.0)(react@18.2.0)
'@nostr-dev-kit/ndk':
specifier: ^0.4.5
version: 0.4.5(typescript@4.9.5)
specifier: ^0.4.6
version: 0.4.6(typescript@4.9.5)
'@tanstack/react-virtual':
specifier: 3.0.0-beta.54
version: 3.0.0-beta.54(react@18.2.0)
@ -18,7 +18,7 @@ dependencies:
version: 1.3.0
'@vidstack/react':
specifier: ^0.4.5
version: 0.4.5(@types/react@18.2.9)(maverick.js@0.33.1)(media-icons@0.4.2)(react@18.2.0)(vidstack@0.4.5)
version: 0.4.5(@types/react@18.2.11)(maverick.js@0.33.1)(media-icons@0.4.2)(react@18.2.0)(vidstack@0.4.5)
dayjs:
specifier: ^1.11.8
version: 1.11.8
@ -32,8 +32,8 @@ dependencies:
specifier: ^3.0.0
version: 3.0.0
nostr-tools:
specifier: ^1.11.2
version: 1.11.2
specifier: ^1.12.0
version: 1.12.0
react:
specifier: ^18.2.0
version: 18.2.0
@ -45,13 +45,13 @@ dependencies:
version: 7.44.3(react@18.2.0)
react-markdown:
specifier: ^8.0.7
version: 8.0.7(@types/react@18.2.9)(react@18.2.0)
version: 8.0.7(@types/react@18.2.11)(react@18.2.0)
react-resizable-panels:
specifier: ^0.0.48
version: 0.0.48(react-dom@18.2.0)(react@18.2.0)
react-virtuoso:
specifier: ^4.3.9
version: 4.3.9(react-dom@18.2.0)(react@18.2.0)
specifier: ^4.3.10
version: 4.3.10(react-dom@18.2.0)(react@18.2.0)
remark-gfm:
specifier: ^3.0.1
version: 3.0.1
@ -88,11 +88,11 @@ devDependencies:
specifier: ^1.3.1
version: 1.3.1
'@types/node':
specifier: ^18.16.16
version: 18.16.16
specifier: ^18.16.17
version: 18.16.17
'@types/react':
specifier: ^18.2.9
version: 18.2.9
specifier: ^18.2.11
version: 18.2.11
'@types/react-dom':
specifier: ^18.2.4
version: 18.2.4
@ -137,7 +137,7 @@ devDependencies:
version: 4.9.5
vite:
specifier: ^4.3.9
version: 4.3.9(@types/node@18.16.16)
version: 4.3.9(@types/node@18.16.17)
vite-plugin-ssr:
specifier: ^0.4.131
version: 0.4.131(vite@4.3.9)
@ -407,14 +407,14 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: false
/@floating-ui/core@1.2.6:
resolution: {integrity: sha512-EvYTiXet5XqweYGClEmpu3BoxmsQ4hkj3QaYA6qEnigCWffTP3vNRwBReTdrwDwo7OoJ3wM8Uoe9Uk4n+d4hfg==}
/@floating-ui/core@1.3.0:
resolution: {integrity: sha512-vX1WVAdPjZg9DkDkC+zEx/tKtnST6/qcNpwcjeBgco3XRNHz5PUA+ivi/yr6G3o0kMR60uKBJcfOdfzOFI7PMQ==}
dev: false
/@floating-ui/dom@1.2.9:
resolution: {integrity: sha512-sosQxsqgxMNkV3C+3UqTS6LxP7isRLwX8WMepp843Rb3/b0Wz8+MdUkxJksByip3C2WwLugLHN1b4ibn//zKwQ==}
/@floating-ui/dom@1.3.0:
resolution: {integrity: sha512-qIAwejE3r6NeA107u4ELDKkH8+VtgRKdXqtSPaKflL2S2V+doyN+Wt9s5oHKXPDo4E8TaVXaHT3+6BbagH31xw==}
dependencies:
'@floating-ui/core': 1.2.6
'@floating-ui/core': 1.3.0
dev: false
/@floating-ui/react-dom@1.3.0(react-dom@18.2.0)(react@18.2.0):
@ -423,7 +423,7 @@ packages:
react: '>=16.8.0'
react-dom: '>=16.8.0'
dependencies:
'@floating-ui/dom': 1.2.9
'@floating-ui/dom': 1.3.0
react: 18.2.0
react-dom: 18.2.0(react@18.2.0)
dev: false
@ -532,6 +532,11 @@ packages:
resolution: {integrity: sha512-ilHEACi9DwqJB0pw7kv+Apvh50jiiSyR/cQ3y4W7lOR5mhvn/50FLUfsnfJz0BDZtl/RR16kXvptiv6q1msYZg==}
dev: false
/@noble/hashes@1.3.1:
resolution: {integrity: sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==}
engines: {node: '>= 16'}
dev: false
/@noble/secp256k1@2.0.0:
resolution: {integrity: sha512-rUGBd95e2a45rlmFTqQJYEFA4/gdIARFfuTuTqLglz0PZ6AKyzyXsEZZq7UZn8hZsvaBgpCzKKBJizT2cJERXw==}
dev: false
@ -554,9 +559,10 @@ packages:
'@nodelib/fs.scandir': 2.1.5
fastq: 1.15.0
/@nostr-dev-kit/ndk@0.4.5(typescript@4.9.5):
resolution: {integrity: sha512-iiWWOHjejt5uBKh0q38hN/jBM2rJsgZn3T0fe9AwQCRTm2PkXYDbfT5uYz+VHaovkJx8WLYeV4Ol9nz4p7b8aA==}
/@nostr-dev-kit/ndk@0.4.6(typescript@4.9.5):
resolution: {integrity: sha512-kuv7ZNXi2TlHOEPXeeX6qCCTdhHUUCfl2JMt/zpZbZp31L8Zb9RIQLtWsM0Q90AyU0qGv9zVbSuEArPeCVsTEA==}
dependencies:
'@noble/hashes': 1.3.1
'@noble/secp256k1': 2.0.0
'@scure/base': 1.1.1
'@typescript-eslint/eslint-plugin': 5.59.9(@typescript-eslint/parser@5.59.9)(eslint@8.42.0)(typescript@4.9.5)
@ -571,9 +577,8 @@ packages:
eventemitter3: 5.0.1
light-bolt11-decoder: 3.0.0
node-fetch: 3.3.1
nostr-tools: 1.11.2
nostr-tools: 1.12.0
tsd: 0.28.1
typedoc: 0.24.8(typescript@4.9.5)
utf8-buffer: 1.0.0
websocket-polyfill: 0.0.3
transitivePeerDependencies:
@ -964,8 +969,8 @@ packages:
resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==}
dev: false
/@types/node@18.16.16:
resolution: {integrity: sha512-NpaM49IGQQAUlBhHMF82QH80J08os4ZmyF9MkpCzWAGuOHqE4gTEbhzd7L3l5LmWuZ6E0OiC1FweQ4tsiW35+g==}
/@types/node@18.16.17:
resolution: {integrity: sha512-QAkjjRA1N7gPJeAP4WLXZtYv6+eMXFNviqktCDt4GLcmCugMr5BcRHfkOjCQzvCsnMp+L79a54zBkbw356xv9Q==}
dev: true
/@types/normalize-package-data@2.4.1:
@ -978,11 +983,11 @@ packages:
/@types/react-dom@18.2.4:
resolution: {integrity: sha512-G2mHoTMTL4yoydITgOGwWdWMVd8sNgyEP85xVmMKAPUBwQWm9wBPQUmvbeF4V3WBY1P7mmL4BkjQ0SqUpf1snw==}
dependencies:
'@types/react': 18.2.9
'@types/react': 18.2.11
dev: true
/@types/react@18.2.9:
resolution: {integrity: sha512-pL3JAesUkF7PEQGxh5XOwdXGV907te6m1/Qe1ERJLgomojS6Ne790QiA7GUl434JEkFA2aAaB6qJ5z4e1zJn/w==}
/@types/react@18.2.11:
resolution: {integrity: sha512-+hsJr9hmwyDecSMQAmX7drgbDpyE+EgSF6t7+5QEBAn1tQK7kl1vWZ4iRf6SjQ8lk7dyEULxUmZOIpN0W5baZA==}
dependencies:
'@types/prop-types': 15.7.5
'@types/scheduler': 0.16.3
@ -1133,7 +1138,7 @@ packages:
eslint-visitor-keys: 3.4.1
dev: false
/@vidstack/react@0.4.5(@types/react@18.2.9)(maverick.js@0.33.1)(media-icons@0.4.2)(react@18.2.0)(vidstack@0.4.5):
/@vidstack/react@0.4.5(@types/react@18.2.11)(maverick.js@0.33.1)(media-icons@0.4.2)(react@18.2.0)(vidstack@0.4.5):
resolution: {integrity: sha512-spcim3+p1fMzkhHRKn5PS54YQjfThW5M3F2+R8tCT+wpsxbbCDa/TGdLBoIy2oC0LNziPkn0vlBWIZko9F5iig==}
engines: {node: '>=16'}
peerDependencies:
@ -1143,7 +1148,7 @@ packages:
react: ^18.0.0
vidstack: 0.4.5
dependencies:
'@types/react': 18.2.9
'@types/react': 18.2.11
maverick.js: 0.33.1
media-icons: 0.4.2
react: 18.2.0
@ -1156,7 +1161,7 @@ packages:
vite: ^4
dependencies:
'@swc/core': 1.3.62
vite: 4.3.9(@types/node@18.16.16)
vite: 4.3.9(@types/node@18.16.17)
transitivePeerDependencies:
- '@swc/helpers'
dev: true
@ -1206,10 +1211,6 @@ packages:
engines: {node: '>=12'}
dev: true
/ansi-sequence-parser@1.1.0:
resolution: {integrity: sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==}
dev: false
/ansi-styles@3.2.1:
resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==}
engines: {node: '>=4'}
@ -1321,7 +1322,7 @@ packages:
postcss: ^8.1.0
dependencies:
browserslist: 4.21.7
caniuse-lite: 1.0.30001497
caniuse-lite: 1.0.30001498
fraction.js: 4.2.0
normalize-range: 0.1.2
picocolors: 1.0.0
@ -1352,12 +1353,6 @@ packages:
balanced-match: 1.0.2
concat-map: 0.0.1
/brace-expansion@2.0.1:
resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==}
dependencies:
balanced-match: 1.0.2
dev: false
/braces@3.0.2:
resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==}
engines: {node: '>=8'}
@ -1369,7 +1364,7 @@ packages:
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true
dependencies:
caniuse-lite: 1.0.30001497
caniuse-lite: 1.0.30001498
electron-to-chromium: 1.4.427
node-releases: 2.0.12
update-browserslist-db: 1.0.11(browserslist@4.21.7)
@ -1419,8 +1414,8 @@ packages:
engines: {node: '>=6'}
dev: false
/caniuse-lite@1.0.30001497:
resolution: {integrity: sha512-I4/duVK4wL6rAK/aKZl3HXB4g+lIZvaT4VLAn2rCgJ38jVLb0lv2Xug6QuqmxXFVRJMF74SPPWPJ/1Sdm3vCzw==}
/caniuse-lite@1.0.30001498:
resolution: {integrity: sha512-LFInN2zAwx3ANrGCDZ5AKKJroHqNKyjXitdV5zRIVIaQlXKj3GmxUKagoKsjqUfckpAObPCEWnk5EeMlyMWcgw==}
dev: true
/ccount@2.0.1:
@ -2729,10 +2724,6 @@ packages:
minimist: 1.2.8
dev: false
/jsonc-parser@3.2.0:
resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==}
dev: false
/kind-of@6.0.3:
resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==}
engines: {node: '>=0.10.0'}
@ -2881,10 +2872,6 @@ packages:
yallist: 4.0.0
dev: false
/lunr@2.3.9:
resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==}
dev: false
/map-obj@1.0.1:
resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==}
engines: {node: '>=0.10.0'}
@ -2899,12 +2886,6 @@ packages:
resolution: {integrity: sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==}
dev: false
/marked@4.3.0:
resolution: {integrity: sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==}
engines: {node: '>= 12'}
hasBin: true
dev: false
/maverick.js@0.33.1:
resolution: {integrity: sha512-p8L5V62CV6TmHAngmRAopp231oJKeH77mJja5SsKOfvzrPRoThT/Jo9U0jMRB5iMykqkvyg2J5V5Agn6FPXDWQ==}
engines: {node: '>=16'}
@ -3359,13 +3340,6 @@ packages:
dependencies:
brace-expansion: 1.1.11
/minimatch@9.0.1:
resolution: {integrity: sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==}
engines: {node: '>=16 || 14 >=14.17'}
dependencies:
brace-expansion: 2.0.1
dev: false
/minimist-options@4.1.0:
resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==}
engines: {node: '>= 6'}
@ -3482,8 +3456,8 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
/nostr-tools@1.11.2:
resolution: {integrity: sha512-ezN+QwPlFTRZLjstUJw9xacI7/rKKOn18bRitKcArj5YFLaxA2xDIvkryapYZ1IBsJzFYcODmygKIrHdZXsJjw==}
/nostr-tools@1.12.0:
resolution: {integrity: sha512-fsIXaNJPKaSrO9MxsCEWbhI4tG4pToQK4D4sgLRD0fRDfZ6ocCg8CLlh9lcNx0o8pVErCMLVASxbJ+w4WNK0MA==}
dependencies:
'@noble/curves': 1.0.0
'@noble/hashes': 1.3.0
@ -3869,7 +3843,7 @@ packages:
resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==}
dev: false
/react-markdown@8.0.7(@types/react@18.2.9)(react@18.2.0):
/react-markdown@8.0.7(@types/react@18.2.11)(react@18.2.0):
resolution: {integrity: sha512-bvWbzG4MtOU62XqBx3Xx+zB2raaFFsq4mYiAzfjXJMEz2sixgeAfraA3tvzULF02ZdOMUOKTBFFaZJDDrq+BJQ==}
peerDependencies:
'@types/react': '>=16'
@ -3877,7 +3851,7 @@ packages:
dependencies:
'@types/hast': 2.3.4
'@types/prop-types': 15.7.5
'@types/react': 18.2.9
'@types/react': 18.2.11
'@types/unist': 2.0.6
comma-separated-tokens: 2.0.3
hast-util-whitespace: 2.0.1
@ -3906,8 +3880,8 @@ packages:
react-dom: 18.2.0(react@18.2.0)
dev: false
/react-virtuoso@4.3.9(react-dom@18.2.0)(react@18.2.0):
resolution: {integrity: sha512-xz8jqaZojIVUbMlUsrwdCH86ApbzfvYzkXKTjxCjFFfieoo46xftvXIC4JKt0eBMlDQLmwrVyXy1FP5ibjqU4A==}
/react-virtuoso@4.3.10(react-dom@18.2.0)(react@18.2.0):
resolution: {integrity: sha512-/LDICLCmPRDMOheCKmuHj/U7CGjLT/WtMWZGfOothhhubQeWGbR6mtGyd+uD80Yw/n3ICZtYwERQZnTM8eC0ag==}
engines: {node: '>=10'}
peerDependencies:
react: '>=16 || >=17 || >= 18'
@ -4048,8 +4022,8 @@ packages:
glob: 7.2.3
dev: false
/rollup@3.24.0:
resolution: {integrity: sha512-OgraHOIg2YpHQTjl0/ymWfFNBEyPucB7lmhXrQUh38qNOegxLapSPFs9sNr0qKR75awW41D93XafoR2QfhBdUQ==}
/rollup@3.24.1:
resolution: {integrity: sha512-REHe5dx30ERBRFS0iENPHy+t6wtSEYkjrhwNsLyh3qpRaZ1+aylvMUdMBUHWUD/RjjLmLzEvY8Z9XRlpcdIkHA==}
engines: {node: '>=14.18.0', npm: '>=8.0.0'}
hasBin: true
optionalDependencies:
@ -4156,15 +4130,6 @@ packages:
resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==}
dev: false
/shiki@0.14.2:
resolution: {integrity: sha512-ltSZlSLOuSY0M0Y75KA+ieRaZ0Trf5Wl3gutE7jzLuIcWxLp5i/uEnLoQWNvgKXQ5OMpGkJnVMRLAuzjc0LJ2A==}
dependencies:
ansi-sequence-parser: 1.1.0
jsonc-parser: 3.2.0
vscode-oniguruma: 1.7.0
vscode-textmate: 8.0.0
dev: false
/side-channel@1.0.4:
resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==}
dependencies:
@ -4644,20 +4609,6 @@ packages:
is-typedarray: 1.0.0
dev: false
/typedoc@0.24.8(typescript@4.9.5):
resolution: {integrity: sha512-ahJ6Cpcvxwaxfu4KtjA8qZNqS43wYt6JL27wYiIgl1vd38WW/KWX11YuAeZhuz9v+ttrutSsgK+XO1CjL1kA3w==}
engines: {node: '>= 14.14'}
hasBin: true
peerDependencies:
typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x
dependencies:
lunr: 2.3.9
marked: 4.3.0
minimatch: 9.0.1
shiki: 0.14.2
typescript: 4.9.5
dev: false
/typescript@4.9.5:
resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==}
engines: {node: '>=4.2.0'}
@ -4839,7 +4790,7 @@ packages:
esbuild: 0.17.19
fast-glob: 3.2.12
sirv: 2.0.3
vite: 4.3.9(@types/node@18.16.16)
vite: 4.3.9(@types/node@18.16.17)
dev: true
/vite-plugin-top-level-await@1.3.1(vite@4.3.9):
@ -4850,7 +4801,7 @@ packages:
'@rollup/plugin-virtual': 3.0.1
'@swc/core': 1.3.62
uuid: 9.0.0
vite: 4.3.9(@types/node@18.16.16)
vite: 4.3.9(@types/node@18.16.17)
transitivePeerDependencies:
- '@swc/helpers'
- rollup
@ -4867,13 +4818,13 @@ packages:
debug: 4.3.4
globrex: 0.1.2
tsconfck: 2.1.1(typescript@4.9.5)
vite: 4.3.9(@types/node@18.16.16)
vite: 4.3.9(@types/node@18.16.17)
transitivePeerDependencies:
- supports-color
- typescript
dev: true
/vite@4.3.9(@types/node@18.16.16):
/vite@4.3.9(@types/node@18.16.17):
resolution: {integrity: sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==}
engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true
@ -4898,22 +4849,14 @@ packages:
terser:
optional: true
dependencies:
'@types/node': 18.16.16
'@types/node': 18.16.17
esbuild: 0.17.19
postcss: 8.4.24
rollup: 3.24.0
rollup: 3.24.1
optionalDependencies:
fsevents: 2.3.2
dev: true
/vscode-oniguruma@1.7.0:
resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==}
dev: false
/vscode-textmate@8.0.0:
resolution: {integrity: sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==}
dev: false
/web-streams-polyfill@3.2.1:
resolution: {integrity: sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==}
engines: {node: '>= 8'}

View File

@ -4,7 +4,7 @@ import { Navigation } from "@shared/navigation";
export function LayoutChannel({ children }: { children: React.ReactNode }) {
return (
<div className="flex w-screen h-screen">
<div className="relative flex flex-row flex-wrap shrink-0">
<div className="relative flex flex-row shrink-0">
<MultiAccounts />
<Navigation />
</div>

View File

@ -4,7 +4,7 @@ import { Navigation } from "@shared/navigation";
export function LayoutChat({ children }: { children: React.ReactNode }) {
return (
<div className="flex w-screen h-screen">
<div className="relative flex flex-row flex-wrap shrink-0">
<div className="relative flex flex-row shrink-0">
<MultiAccounts />
<Navigation />
</div>

View File

@ -37,7 +37,10 @@ export const NoteParent = memo(function NoteParent({ id }: { id: string }) {
</div>
</div>
)}
<NoteMetadata id={data.id} eventPubkey={data.pubkey} />
<NoteMetadata
id={data.event_id || data.id}
eventPubkey={data.pubkey}
/>
</div>
</>
) : (

View File

@ -1,11 +1,10 @@
import { AppHeader } from "@shared/appHeader";
import { MultiAccounts } from "@shared/multiAccounts";
import { Navigation } from "@shared/navigation";
export function LayoutNewsfeed({ children }: { children: React.ReactNode }) {
return (
<div className="flex w-screen h-screen">
<div className="relative flex flex-row flex-wrap shrink-0">
<div className="relative flex flex-row shrink-0">
<MultiAccounts />
<Navigation />
</div>

View File

@ -5,7 +5,7 @@ import { SWRConfig } from "swr";
export function LayoutSpace({ children }: { children: React.ReactNode }) {
return (
<div className="flex w-screen h-screen">
<div className="relative flex flex-row flex-wrap shrink-0">
<div className="relative flex flex-row shrink-0">
<MultiAccounts />
<Navigation />
</div>

View File

@ -4,7 +4,6 @@ import { useActiveAccount } from "@stores/accounts";
import { useChannels } from "@stores/channels";
import { useChatMessages, useChats } from "@stores/chats";
import { DEFAULT_AVATAR } from "@stores/constants";
import { usePageContext } from "@utils/hooks/usePageContext";
import { useProfile } from "@utils/hooks/useProfile";
import { sendNativeNotification } from "@utils/notification";
import { useContext } from "react";
@ -12,14 +11,6 @@ import useSWRSubscription from "swr/subscription";
export function ActiveAccount({ data }: { data: any }) {
const ndk = useContext(RelayContext);
const account = useActiveAccount((state: any) => state.account);
const pageContext = usePageContext();
const pathname: any = pageContext.urlParsed.pathname;
const isChatPage = pathname.includes("/chat");
const isChannelPage = pathname.includes("/channel");
// const notSpacePage = pathnames.includes("/space") ? false : true;
const lastLogin = useActiveAccount((state: any) => state.lastLogin);
const notifyChat = useChats((state: any) => state.add);
@ -28,46 +19,46 @@ export function ActiveAccount({ data }: { data: any }) {
const { user } = useProfile(data.pubkey);
useSWRSubscription(
user && lastLogin > 0 ? ["activeAccount", data.pubkey] : null,
() => {
const follows = JSON.parse(account.follows);
// subscribe to channel
const sub = ndk.subscribe({
useSWRSubscription(user ? ["activeAccount", data.pubkey] : null, () => {
const since = lastLogin > 0 ? lastLogin : Math.floor(Date.now() / 1000);
// subscribe to channel
const sub = ndk.subscribe(
{
kinds: [4, 42],
"#p": [data.pubkey],
since: lastLogin,
});
since: since,
},
{
closeOnEose: false,
},
);
sub.addListener("event", (event) => {
switch (event.kind) {
case 4:
if (!isChatPage) {
// save
saveChat(data.pubkey, event);
// update state
notifyChat(event.pubkey);
// send native notifiation
sendNativeNotification("You've received new message");
}
break;
case 42:
if (!isChannelPage) {
// update state
notifyChannel(event);
// send native notifiation
sendNativeNotification(event.content);
}
break;
default:
break;
}
});
sub.addListener("event", (event) => {
console.log(event);
switch (event.kind) {
case 4:
// save
saveChat(data.pubkey, event);
// update state
notifyChat(event.pubkey);
// send native notifiation
sendNativeNotification("You've received new message");
break;
case 42:
// update state
notifyChannel(event);
// send native notifiation
sendNativeNotification(event.content);
break;
default:
break;
}
});
return () => {
sub.stop();
};
},
);
return () => {
sub.stop();
};
});
return (
<button type="button" className="relative h-11 w-11 overflow-hidden">

View File

@ -8,93 +8,95 @@ import { NavArrowDownIcon, SpaceIcon, WorldIcon } from "@shared/icons";
export function Navigation() {
return (
<div className="flex w-[232px] h-full flex-col gap-3 border-r border-zinc-900">
<div className="flex w-[232px] flex-col gap-3 border-r border-zinc-900">
<AppHeader />
<div className="flex h-8 px-3.5">
<ComposerModal />
</div>
{/* Newsfeed */}
<div className="flex flex-col gap-0.5 px-1.5">
<div className="px-2.5">
<h3 className="text-[11px] font-bold uppercase tracking-widest text-zinc-600">
Feeds
</h3>
<div className="flex flex-col gap-3 h-full overflow-y-auto scrollbar-hide">
<div className="inlin-lflex h-8 px-3.5">
<ComposerModal />
</div>
<div className="flex flex-col gap-1">
<ActiveLink
href="/app/space"
className="flex h-8 items-center gap-2.5 rounded-md px-2.5 text-zinc-200 hover:text-white"
activeClassName="bg-zinc-900/50 hover:bg-zinc-900"
>
<span className="inline-flex h-5 w-5 items-center justify-center rounded bg-zinc-900">
<SpaceIcon width={12} height={12} className="text-white" />
</span>
<span className="font-medium">Space</span>
</ActiveLink>
<ActiveLink
href="/app/trending"
className="flex h-8 items-center gap-2.5 rounded-md px-2.5 text-zinc-200 hover:text-white"
activeClassName="bg-zinc-900/50 hover:bg-zinc-900"
>
<span className="inline-flex h-5 w-5 items-center justify-center rounded bg-zinc-900">
<WorldIcon width={12} height={12} className="text-white" />
</span>
<span className="font-medium">Trending</span>
</ActiveLink>
{/* Newsfeed */}
<div className="flex flex-col gap-0.5 px-1.5">
<div className="px-2.5">
<h3 className="text-[11px] font-bold uppercase tracking-widest text-zinc-600">
Feeds
</h3>
</div>
<div className="flex flex-col gap-1">
<ActiveLink
href="/app/space"
className="flex h-8 items-center gap-2.5 rounded-md px-2.5 text-zinc-200 hover:text-white"
activeClassName="bg-zinc-900/50 hover:bg-zinc-900"
>
<span className="inline-flex h-5 w-5 items-center justify-center rounded bg-zinc-900">
<SpaceIcon width={12} height={12} className="text-white" />
</span>
<span className="font-medium">Space</span>
</ActiveLink>
<ActiveLink
href="/app/trending"
className="flex h-8 items-center gap-2.5 rounded-md px-2.5 text-zinc-200 hover:text-white"
activeClassName="bg-zinc-900/50 hover:bg-zinc-900"
>
<span className="inline-flex h-5 w-5 items-center justify-center rounded bg-zinc-900">
<WorldIcon width={12} height={12} className="text-white" />
</span>
<span className="font-medium">Trending</span>
</ActiveLink>
</div>
</div>
{/* Channels */}
<Disclosure defaultOpen={true}>
{({ open }) => (
<div className="flex flex-col gap-0.5 px-1.5">
<Disclosure.Button className="flex items-center gap-1 px-2.5">
<div
className={`inline-flex h-5 w-5 transform items-center justify-center transition-transform duration-150 ease-in-out ${
open ? "" : "rotate-180"
}`}
>
<NavArrowDownIcon
width={12}
height={12}
className="text-zinc-700"
/>
</div>
<h3 className="text-[11px] font-bold uppercase tracking-widest text-zinc-600">
Channels
</h3>
</Disclosure.Button>
<Disclosure.Panel>
<ChannelsList />
</Disclosure.Panel>
</div>
)}
</Disclosure>
{/* Chats */}
<Disclosure defaultOpen={true}>
{({ open }) => (
<div className="flex flex-col gap-0.5 px-1.5">
<Disclosure.Button className="flex items-center gap-1 px-2.5">
<div
className={`inline-flex h-5 w-5 transform items-center justify-center transition-transform duration-150 ease-in-out ${
open ? "" : "rotate-180"
}`}
>
<NavArrowDownIcon
width={12}
height={12}
className="text-zinc-700"
/>
</div>
<h3 className="text-[11px] font-bold uppercase tracking-widest text-zinc-600">
Chats
</h3>
</Disclosure.Button>
<Disclosure.Panel>
<ChatsList />
</Disclosure.Panel>
</div>
)}
</Disclosure>
</div>
{/* Channels */}
<Disclosure defaultOpen={true}>
{({ open }) => (
<div className="flex flex-col gap-0.5 px-1.5">
<Disclosure.Button className="flex items-center gap-1 px-2.5">
<div
className={`inline-flex h-5 w-5 transform items-center justify-center transition-transform duration-150 ease-in-out ${
open ? "" : "rotate-180"
}`}
>
<NavArrowDownIcon
width={12}
height={12}
className="text-zinc-700"
/>
</div>
<h3 className="text-[11px] font-bold uppercase tracking-widest text-zinc-600">
Channels
</h3>
</Disclosure.Button>
<Disclosure.Panel>
<ChannelsList />
</Disclosure.Panel>
</div>
)}
</Disclosure>
{/* Chats */}
<Disclosure defaultOpen={true}>
{({ open }) => (
<div className="flex flex-col gap-0.5 px-1.5">
<Disclosure.Button className="flex items-center gap-1 px-2.5">
<div
className={`inline-flex h-5 w-5 transform items-center justify-center transition-transform duration-150 ease-in-out ${
open ? "" : "rotate-180"
}`}
>
<NavArrowDownIcon
width={12}
height={12}
className="text-zinc-700"
/>
</div>
<h3 className="text-[11px] font-bold uppercase tracking-widest text-zinc-600">
Chats
</h3>
</Disclosure.Button>
<Disclosure.Panel>
<ChatsList />
</Disclosure.Panel>
</div>
)}
</Disclosure>
</div>
);
}

View File

@ -33,7 +33,7 @@ export function useProfile(key: string) {
const { data, error, isLoading } = useSWR(["profile", ndk, key], fetcher, {
revalidateIfStale: false,
revalidateOnFocus: false,
revalidateOnReconnect: true,
revalidateOnReconnect: false,
});
return {