feat: group message by date

This commit is contained in:
reya
2024-07-29 11:04:26 +07:00
parent 9a293c6083
commit a65d5d0c1a
14 changed files with 381 additions and 422 deletions

View File

@@ -1,28 +1,22 @@
{
"$schema": "https://biomejs.dev/schemas/1.4.1/schema.json",
"organizeImports": {
"enabled": true
},
"files": {
"ignore": [
"apps/desktop2/src/router.gen.ts",
"packages/system/src/commands.ts"
]
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"style": {
"noNonNullAssertion": "warn",
"noUselessElse": "off"
},
"correctness": {
"useExhaustiveDependencies": "off"
},
"a11y": {
"noSvgWithoutTitle": "off"
}
}
}
"$schema": "https://biomejs.dev/schemas/1.4.1/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"style": {
"noNonNullAssertion": "warn",
"noUselessElse": "off"
},
"correctness": {
"useExhaustiveDependencies": "off"
},
"a11y": {
"noSvgWithoutTitle": "off"
}
}
}
}

View File

@@ -14,14 +14,14 @@
"@radix-ui/react-avatar": "^1.1.0",
"@radix-ui/react-scroll-area": "^1.1.0",
"@tanstack/query-sync-storage-persister": "^5.51.15",
"@tanstack/react-query": "^5.51.11",
"@tanstack/react-query": "^5.51.15",
"@tanstack/react-query-persist-client": "^5.51.15",
"@tanstack/react-router": "^1.45.8",
"@tauri-apps/api": ">=2.0.0-beta.0",
"@tanstack/react-router": "^1.45.11",
"@tauri-apps/api": "2.0.0-beta.15",
"@tauri-apps/plugin-clipboard-manager": "2.1.0-beta.5",
"@tauri-apps/plugin-dialog": "2.0.0-beta.7",
"@tauri-apps/plugin-os": "2.0.0-beta.7",
"@tauri-apps/plugin-shell": ">=2.0.0-beta.0",
"@tauri-apps/plugin-shell": "2.0.0-beta.8",
"dayjs": "^1.11.12",
"lru-cache": "^11.0.0",
"minidenticons": "^4.2.1",
@@ -29,23 +29,23 @@
"react": "19.0.0-rc-d025ddd3-20240722",
"react-dom": "19.0.0-rc-d025ddd3-20240722",
"unique-names-generator": "^4.7.1",
"virtua": "^0.33.3"
"virtua": "^0.33.4"
},
"devDependencies": {
"@biomejs/biome": "1.8.3",
"@tanstack/router-plugin": "^1.45.8",
"@tauri-apps/cli": ">=2.0.0-beta.0",
"@tauri-apps/cli": "2.0.0-beta.22",
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc",
"@vitejs/plugin-react": "^4.2.1",
"@vitejs/plugin-react": "^4.3.1",
"autoprefixer": "^10.4.19",
"babel-plugin-react-compiler": "0.0.0-experimental-696af53-20240625",
"clsx": "^2.1.1",
"postcss": "^8.4.39",
"postcss": "^8.4.40",
"tailwind-merge": "^2.4.0",
"tailwindcss": "^3.4.6",
"typescript": "^5.2.2",
"vite": "^5.3.1",
"tailwindcss": "^3.4.7",
"typescript": "^5.5.4",
"vite": "^5.3.5",
"vite-tsconfig-paths": "^4.3.2"
},
"overrides": {

470
pnpm-lock.yaml generated
View File

@@ -21,16 +21,16 @@ importers:
specifier: ^5.51.15
version: 5.51.15
'@tanstack/react-query':
specifier: ^5.51.11
version: 5.51.11(react@19.0.0-rc-d025ddd3-20240722)
specifier: ^5.51.15
version: 5.51.15(react@19.0.0-rc-d025ddd3-20240722)
'@tanstack/react-query-persist-client':
specifier: ^5.51.15
version: 5.51.15(@tanstack/react-query@5.51.11(react@19.0.0-rc-d025ddd3-20240722))(react@19.0.0-rc-d025ddd3-20240722)
version: 5.51.15(@tanstack/react-query@5.51.15(react@19.0.0-rc-d025ddd3-20240722))(react@19.0.0-rc-d025ddd3-20240722)
'@tanstack/react-router':
specifier: ^1.45.8
version: 1.45.8(react-dom@19.0.0-rc-d025ddd3-20240722(react@19.0.0-rc-d025ddd3-20240722))(react@19.0.0-rc-d025ddd3-20240722)
specifier: ^1.45.11
version: 1.45.11(react-dom@19.0.0-rc-d025ddd3-20240722(react@19.0.0-rc-d025ddd3-20240722))(react@19.0.0-rc-d025ddd3-20240722)
'@tauri-apps/api':
specifier: '>=2.0.0-beta.0'
specifier: 2.0.0-beta.15
version: 2.0.0-beta.15
'@tauri-apps/plugin-clipboard-manager':
specifier: 2.1.0-beta.5
@@ -42,7 +42,7 @@ importers:
specifier: 2.0.0-beta.7
version: 2.0.0-beta.7
'@tauri-apps/plugin-shell':
specifier: '>=2.0.0-beta.0'
specifier: 2.0.0-beta.8
version: 2.0.0-beta.8
dayjs:
specifier: ^1.11.12
@@ -66,17 +66,17 @@ importers:
specifier: ^4.7.1
version: 4.7.1
virtua:
specifier: ^0.33.3
version: 0.33.3(react-dom@19.0.0-rc-d025ddd3-20240722(react@19.0.0-rc-d025ddd3-20240722))(react@19.0.0-rc-d025ddd3-20240722)
specifier: ^0.33.4
version: 0.33.4(react-dom@19.0.0-rc-d025ddd3-20240722(react@19.0.0-rc-d025ddd3-20240722))(react@19.0.0-rc-d025ddd3-20240722)
devDependencies:
'@biomejs/biome':
specifier: 1.8.3
version: 1.8.3
'@tanstack/router-plugin':
specifier: ^1.45.8
version: 1.45.8(vite@5.3.4)
version: 1.45.8(vite@5.3.5)
'@tauri-apps/cli':
specifier: '>=2.0.0-beta.0'
specifier: 2.0.0-beta.22
version: 2.0.0-beta.22
'@types/react':
specifier: npm:types-react@rc
@@ -85,11 +85,11 @@ importers:
specifier: npm:types-react-dom@rc
version: types-react-dom@19.0.0-rc.1
'@vitejs/plugin-react':
specifier: ^4.2.1
version: 4.3.1(vite@5.3.4)
specifier: ^4.3.1
version: 4.3.1(vite@5.3.5)
autoprefixer:
specifier: ^10.4.19
version: 10.4.19(postcss@8.4.39)
version: 10.4.19(postcss@8.4.40)
babel-plugin-react-compiler:
specifier: 0.0.0-experimental-696af53-20240625
version: 0.0.0-experimental-696af53-20240625
@@ -97,23 +97,23 @@ importers:
specifier: ^2.1.1
version: 2.1.1
postcss:
specifier: ^8.4.39
version: 8.4.39
specifier: ^8.4.40
version: 8.4.40
tailwind-merge:
specifier: ^2.4.0
version: 2.4.0
tailwindcss:
specifier: ^3.4.6
version: 3.4.6
specifier: ^3.4.7
version: 3.4.7
typescript:
specifier: ^5.2.2
specifier: ^5.5.4
version: 5.5.4
vite:
specifier: ^5.3.1
version: 5.3.4
specifier: ^5.3.5
version: 5.3.5
vite-tsconfig-paths:
specifier: ^4.3.2
version: 4.3.2(typescript@5.5.4)(vite@5.3.4)
version: 4.3.2(typescript@5.5.4)(vite@5.3.5)
packages:
@@ -129,8 +129,8 @@ packages:
resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==}
engines: {node: '>=6.9.0'}
'@babel/compat-data@7.24.9':
resolution: {integrity: sha512-e701mcfApCJqMMueQI0Fb68Amflj83+dvAvHawoBpAz+GDjCIyGHzNwnefjsWJ3xiYAqqiQFoWbspGYBdb2/ng==}
'@babel/compat-data@7.25.0':
resolution: {integrity: sha512-P4fwKI2mjEb3ZU5cnMJzvRsRKGBUcs8jvxIoRmr6ufAY9Xk2Bz7JubRTTivkw55c7WQJfTECeqYVa+HZ0FzREg==}
engines: {node: '>=6.9.0'}
'@babel/core@7.24.9':
@@ -140,32 +140,20 @@ packages:
'@babel/generator@7.2.0':
resolution: {integrity: sha512-BA75MVfRlFQG2EZgFYIwyT1r6xSkwfP2bdkY/kLZusEYWiJs4xCowab/alaEaT0wSvmVuXGqiefeBlP+7V1yKg==}
'@babel/generator@7.24.10':
resolution: {integrity: sha512-o9HBZL1G2129luEUlG1hB4N/nlYNWHnpwlND9eOMclRqqu1YDy2sSYVCFUZwl8I1Gxh+QSRrP2vD7EpUmFVXxg==}
'@babel/generator@7.25.0':
resolution: {integrity: sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw==}
engines: {node: '>=6.9.0'}
'@babel/helper-compilation-targets@7.24.8':
resolution: {integrity: sha512-oU+UoqCHdp+nWVDkpldqIQL/i/bvAv53tRqLG/s+cOXxe66zOYLU7ar/Xs3LdmBihrUMEUhwu6dMZwbNOYDwvw==}
engines: {node: '>=6.9.0'}
'@babel/helper-environment-visitor@7.24.7':
resolution: {integrity: sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==}
engines: {node: '>=6.9.0'}
'@babel/helper-function-name@7.24.7':
resolution: {integrity: sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==}
engines: {node: '>=6.9.0'}
'@babel/helper-hoist-variables@7.24.7':
resolution: {integrity: sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==}
engines: {node: '>=6.9.0'}
'@babel/helper-module-imports@7.24.7':
resolution: {integrity: sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==}
engines: {node: '>=6.9.0'}
'@babel/helper-module-transforms@7.24.9':
resolution: {integrity: sha512-oYbh+rtFKj/HwBQkFlUzvcybzklmVdVV3UU+mN7n2t/q3yGHbuVdNxyFvSBO1tfvjyArpHNcWMAzsSPdyI46hw==}
'@babel/helper-module-transforms@7.25.0':
resolution: {integrity: sha512-bIkOa2ZJYn7FHnepzr5iX9Kmz8FjIz4UKzJ9zhX3dnYuVW0xul9RuR3skBfoLu+FPTQw90EHW9rJsSZhyLQ3fQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
@@ -178,10 +166,6 @@ packages:
resolution: {integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==}
engines: {node: '>=6.9.0'}
'@babel/helper-split-export-declaration@7.24.7':
resolution: {integrity: sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==}
engines: {node: '>=6.9.0'}
'@babel/helper-string-parser@7.24.8':
resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==}
engines: {node: '>=6.9.0'}
@@ -194,16 +178,16 @@ packages:
resolution: {integrity: sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==}
engines: {node: '>=6.9.0'}
'@babel/helpers@7.24.8':
resolution: {integrity: sha512-gV2265Nkcz7weJJfvDoAEVzC1e2OTDpkGbEsebse8koXUJUXPsCMi7sRo/+SPMuMZ9MtUPnGwITTnQnU5YjyaQ==}
'@babel/helpers@7.25.0':
resolution: {integrity: sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw==}
engines: {node: '>=6.9.0'}
'@babel/highlight@7.24.7':
resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==}
engines: {node: '>=6.9.0'}
'@babel/parser@7.24.8':
resolution: {integrity: sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w==}
'@babel/parser@7.25.0':
resolution: {integrity: sha512-CzdIU9jdP0dg7HdyB+bHvDJGagUv+qtzZt5rYCWwW6tITNqV9odjp6Qu41gkG0ca5UfdDUWrKkiAnHHdGRnOrA==}
engines: {node: '>=6.0.0'}
hasBin: true
@@ -231,16 +215,16 @@ packages:
peerDependencies:
'@babel/core': ^7.0.0-0
'@babel/template@7.24.7':
resolution: {integrity: sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==}
'@babel/template@7.25.0':
resolution: {integrity: sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==}
engines: {node: '>=6.9.0'}
'@babel/traverse@7.24.8':
resolution: {integrity: sha512-t0P1xxAPzEDcEPmjprAQq19NWum4K0EQPjMwZQZbHt+GiZqvjCHjj755Weq1YRPVzBI+3zSfvScfpnuIecVFJQ==}
'@babel/traverse@7.25.1':
resolution: {integrity: sha512-LrHHoWq08ZpmmFqBAzN+hUdWwy5zt7FGa/hVwMcOqW6OVtwqaoD5utfuGYU87JYxdZgLUvktAsn37j/sYR9siA==}
engines: {node: '>=6.9.0'}
'@babel/types@7.24.9':
resolution: {integrity: sha512-xm8XrMKz0IlUdocVbYJe0Z9xEgidU7msskG8BbhnTPK/HZ2z/7FP7ykqPgrUH+C+r414mNfNWam1f2vqOjqjYQ==}
'@babel/types@7.25.0':
resolution: {integrity: sha512-LcnxQSsd9aXOIgmmSpvZ/1yo46ra2ESYyqLcryaBZOghxy5qqOBjvCWP5JfkI8yl9rlxRgdLTTMCQQRcN2hdCg==}
engines: {node: '>=6.9.0'}
'@biomejs/biome@1.8.3':
@@ -612,83 +596,83 @@ packages:
'@types/react':
optional: true
'@rollup/rollup-android-arm-eabi@4.19.0':
resolution: {integrity: sha512-JlPfZ/C7yn5S5p0yKk7uhHTTnFlvTgLetl2VxqE518QgyM7C9bSfFTYvB/Q/ftkq0RIPY4ySxTz+/wKJ/dXC0w==}
'@rollup/rollup-android-arm-eabi@4.19.1':
resolution: {integrity: sha512-XzqSg714++M+FXhHfXpS1tDnNZNpgxxuGZWlRG/jSj+VEPmZ0yg6jV4E0AL3uyBKxO8mO3xtOsP5mQ+XLfrlww==}
cpu: [arm]
os: [android]
'@rollup/rollup-android-arm64@4.19.0':
resolution: {integrity: sha512-RDxUSY8D1tWYfn00DDi5myxKgOk6RvWPxhmWexcICt/MEC6yEMr4HNCu1sXXYLw8iAsg0D44NuU+qNq7zVWCrw==}
'@rollup/rollup-android-arm64@4.19.1':
resolution: {integrity: sha512-thFUbkHteM20BGShD6P08aungq4irbIZKUNbG70LN8RkO7YztcGPiKTTGZS7Kw+x5h8hOXs0i4OaHwFxlpQN6A==}
cpu: [arm64]
os: [android]
'@rollup/rollup-darwin-arm64@4.19.0':
resolution: {integrity: sha512-emvKHL4B15x6nlNTBMtIaC9tLPRpeA5jMvRLXVbl/W9Ie7HhkrE7KQjvgS9uxgatL1HmHWDXk5TTS4IaNJxbAA==}
'@rollup/rollup-darwin-arm64@4.19.1':
resolution: {integrity: sha512-8o6eqeFZzVLia2hKPUZk4jdE3zW7LCcZr+MD18tXkgBBid3lssGVAYuox8x6YHoEPDdDa9ixTaStcmx88lio5Q==}
cpu: [arm64]
os: [darwin]
'@rollup/rollup-darwin-x64@4.19.0':
resolution: {integrity: sha512-fO28cWA1dC57qCd+D0rfLC4VPbh6EOJXrreBmFLWPGI9dpMlER2YwSPZzSGfq11XgcEpPukPTfEVFtw2q2nYJg==}
'@rollup/rollup-darwin-x64@4.19.1':
resolution: {integrity: sha512-4T42heKsnbjkn7ovYiAdDVRRWZLU9Kmhdt6HafZxFcUdpjlBlxj4wDrt1yFWLk7G4+E+8p2C9tcmSu0KA6auGA==}
cpu: [x64]
os: [darwin]
'@rollup/rollup-linux-arm-gnueabihf@4.19.0':
resolution: {integrity: sha512-2Rn36Ubxdv32NUcfm0wB1tgKqkQuft00PtM23VqLuCUR4N5jcNWDoV5iBC9jeGdgS38WK66ElncprqgMUOyomw==}
'@rollup/rollup-linux-arm-gnueabihf@4.19.1':
resolution: {integrity: sha512-MXg1xp+e5GhZ3Vit1gGEyoC+dyQUBy2JgVQ+3hUrD9wZMkUw/ywgkpK7oZgnB6kPpGrxJ41clkPPnsknuD6M2Q==}
cpu: [arm]
os: [linux]
'@rollup/rollup-linux-arm-musleabihf@4.19.0':
resolution: {integrity: sha512-gJuzIVdq/X1ZA2bHeCGCISe0VWqCoNT8BvkQ+BfsixXwTOndhtLUpOg0A1Fcx/+eA6ei6rMBzlOz4JzmiDw7JQ==}
'@rollup/rollup-linux-arm-musleabihf@4.19.1':
resolution: {integrity: sha512-DZNLwIY4ftPSRVkJEaxYkq7u2zel7aah57HESuNkUnz+3bZHxwkCUkrfS2IWC1sxK6F2QNIR0Qr/YXw7nkF3Pw==}
cpu: [arm]
os: [linux]
'@rollup/rollup-linux-arm64-gnu@4.19.0':
resolution: {integrity: sha512-0EkX2HYPkSADo9cfeGFoQ7R0/wTKb7q6DdwI4Yn/ULFE1wuRRCHybxpl2goQrx4c/yzK3I8OlgtBu4xvted0ug==}
'@rollup/rollup-linux-arm64-gnu@4.19.1':
resolution: {integrity: sha512-C7evongnjyxdngSDRRSQv5GvyfISizgtk9RM+z2biV5kY6S/NF/wta7K+DanmktC5DkuaJQgoKGf7KUDmA7RUw==}
cpu: [arm64]
os: [linux]
'@rollup/rollup-linux-arm64-musl@4.19.0':
resolution: {integrity: sha512-GlIQRj9px52ISomIOEUq/IojLZqzkvRpdP3cLgIE1wUWaiU5Takwlzpz002q0Nxxr1y2ZgxC2obWxjr13lvxNQ==}
'@rollup/rollup-linux-arm64-musl@4.19.1':
resolution: {integrity: sha512-89tFWqxfxLLHkAthAcrTs9etAoBFRduNfWdl2xUs/yLV+7XDrJ5yuXMHptNqf1Zw0UCA3cAutkAiAokYCkaPtw==}
cpu: [arm64]
os: [linux]
'@rollup/rollup-linux-powerpc64le-gnu@4.19.0':
resolution: {integrity: sha512-N6cFJzssruDLUOKfEKeovCKiHcdwVYOT1Hs6dovDQ61+Y9n3Ek4zXvtghPPelt6U0AH4aDGnDLb83uiJMkWYzQ==}
'@rollup/rollup-linux-powerpc64le-gnu@4.19.1':
resolution: {integrity: sha512-PromGeV50sq+YfaisG8W3fd+Cl6mnOOiNv2qKKqKCpiiEke2KiKVyDqG/Mb9GWKbYMHj5a01fq/qlUR28PFhCQ==}
cpu: [ppc64]
os: [linux]
'@rollup/rollup-linux-riscv64-gnu@4.19.0':
resolution: {integrity: sha512-2DnD3mkS2uuam/alF+I7M84koGwvn3ZVD7uG+LEWpyzo/bq8+kKnus2EVCkcvh6PlNB8QPNFOz6fWd5N8o1CYg==}
'@rollup/rollup-linux-riscv64-gnu@4.19.1':
resolution: {integrity: sha512-/1BmHYh+iz0cNCP0oHCuF8CSiNj0JOGf0jRlSo3L/FAyZyG2rGBuKpkZVH9YF+x58r1jgWxvm1aRg3DHrLDt6A==}
cpu: [riscv64]
os: [linux]
'@rollup/rollup-linux-s390x-gnu@4.19.0':
resolution: {integrity: sha512-D6pkaF7OpE7lzlTOFCB2m3Ngzu2ykw40Nka9WmKGUOTS3xcIieHe82slQlNq69sVB04ch73thKYIWz/Ian8DUA==}
'@rollup/rollup-linux-s390x-gnu@4.19.1':
resolution: {integrity: sha512-0cYP5rGkQWRZKy9/HtsWVStLXzCF3cCBTRI+qRL8Z+wkYlqN7zrSYm6FuY5Kd5ysS5aH0q5lVgb/WbG4jqXN1Q==}
cpu: [s390x]
os: [linux]
'@rollup/rollup-linux-x64-gnu@4.19.0':
resolution: {integrity: sha512-HBndjQLP8OsdJNSxpNIN0einbDmRFg9+UQeZV1eiYupIRuZsDEoeGU43NQsS34Pp166DtwQOnpcbV/zQxM+rWA==}
'@rollup/rollup-linux-x64-gnu@4.19.1':
resolution: {integrity: sha512-XUXeI9eM8rMP8aGvii/aOOiMvTs7xlCosq9xCjcqI9+5hBxtjDpD+7Abm1ZhVIFE1J2h2VIg0t2DX/gjespC2Q==}
cpu: [x64]
os: [linux]
'@rollup/rollup-linux-x64-musl@4.19.0':
resolution: {integrity: sha512-HxfbvfCKJe/RMYJJn0a12eiOI9OOtAUF4G6ozrFUK95BNyoJaSiBjIOHjZskTUffUrB84IPKkFG9H9nEvJGW6A==}
'@rollup/rollup-linux-x64-musl@4.19.1':
resolution: {integrity: sha512-V7cBw/cKXMfEVhpSvVZhC+iGifD6U1zJ4tbibjjN+Xi3blSXaj/rJynAkCFFQfoG6VZrAiP7uGVzL440Q6Me2Q==}
cpu: [x64]
os: [linux]
'@rollup/rollup-win32-arm64-msvc@4.19.0':
resolution: {integrity: sha512-HxDMKIhmcguGTiP5TsLNolwBUK3nGGUEoV/BO9ldUBoMLBssvh4J0X8pf11i1fTV7WShWItB1bKAKjX4RQeYmg==}
'@rollup/rollup-win32-arm64-msvc@4.19.1':
resolution: {integrity: sha512-88brja2vldW/76jWATlBqHEoGjJLRnP0WOEKAUbMcXaAZnemNhlAHSyj4jIwMoP2T750LE9lblvD4e2jXleZsA==}
cpu: [arm64]
os: [win32]
'@rollup/rollup-win32-ia32-msvc@4.19.0':
resolution: {integrity: sha512-xItlIAZZaiG/u0wooGzRsx11rokP4qyc/79LkAOdznGRAbOFc+SfEdfUOszG1odsHNgwippUJavag/+W/Etc6Q==}
'@rollup/rollup-win32-ia32-msvc@4.19.1':
resolution: {integrity: sha512-LdxxcqRVSXi6k6JUrTah1rHuaupoeuiv38du8Mt4r4IPer3kwlTo+RuvfE8KzZ/tL6BhaPlzJ3835i6CxrFIRQ==}
cpu: [ia32]
os: [win32]
'@rollup/rollup-win32-x64-msvc@4.19.0':
resolution: {integrity: sha512-xNo5fV5ycvCCKqiZcpB65VMR11NJB+StnxHz20jdqRAktfdfzhgjTiJ2doTDQE/7dqGaV5I7ZGqKpgph6lCIag==}
'@rollup/rollup-win32-x64-msvc@4.19.1':
resolution: {integrity: sha512-2bIrL28PcK3YCqD9anGxDxamxdiJAxA+l7fWIwM5o8UqNy1t3d1NdAweO2XhA0KTDJ5aH1FsuiT5+7VhtHliXg==}
cpu: [x64]
os: [win32]
@@ -708,9 +692,6 @@ packages:
'@tanstack/query-core@5.51.15':
resolution: {integrity: sha512-xyobHDJ0yhPE3+UkSQ2/4X1fLSg7ICJI5J1JyU9yf7F3deQfEwSImCDrB1WSRrauJkMtXW7YIEcC0oA6ZZWt5A==}
'@tanstack/query-core@5.51.9':
resolution: {integrity: sha512-HsAwaY5J19MD18ykZDS3aVVh+bAt0i7m6uQlFC2b77DLV9djo+xEN7MWQAQQTR8IM+7r/zbozTQ7P0xr0bHuew==}
'@tanstack/query-persist-client-core@5.51.15':
resolution: {integrity: sha512-y/gsUFINiVkxV06Jz5TqFNrXbKs81lIfj7PDamheEk+vWTmlBKTh0rMXthoDdUIVm4JO0+No9CXYahRSm683pg==}
@@ -723,13 +704,13 @@ packages:
'@tanstack/react-query': ^5.51.15
react: ^18 || ^19
'@tanstack/react-query@5.51.11':
resolution: {integrity: sha512-4Kq2x0XpDlpvSnaLG+8pHNH60zEc3mBvb3B2tOMDjcPCi/o+Du3p/9qpPLwJOTliVxxPJAP27fuIhLrsRdCr7A==}
'@tanstack/react-query@5.51.15':
resolution: {integrity: sha512-UgFg23SrdIYrmfTSxAUn9g+J64VQy11pb9/EefoY/u2+zWuNMeqEOnvpJhf52XQy0yztQoyM9p6x8PFyTNaxXg==}
peerDependencies:
react: ^18.0.0
'@tanstack/react-router@1.45.8':
resolution: {integrity: sha512-hLJOKDK5lGHteoMjpF6COQrlhsl4C6GyBCzmSJHFcoh26GBa7tv/94li0H1a3deJpzMNpSvmSXrQDpxj9h9bNA==}
'@tanstack/react-router@1.45.11':
resolution: {integrity: sha512-unVxPYsOwwMnyAW/ZeOCymWpstEV0tiUexUPqiCuYwb2rCwsrmjsgB4tIpVONHabPlFKrxoMbkUh5UCSpL0h+w==}
engines: {node: '>=12'}
peerDependencies:
react: '>=18'
@@ -1015,8 +996,8 @@ packages:
dayjs@1.11.12:
resolution: {integrity: sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg==}
debug@4.3.5:
resolution: {integrity: sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==}
debug@4.3.6:
resolution: {integrity: sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==}
engines: {node: '>=6.0'}
peerDependencies:
supports-color: '*'
@@ -1033,8 +1014,8 @@ packages:
eastasianwidth@0.2.0:
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
electron-to-chromium@1.4.833:
resolution: {integrity: sha512-aVGP9xK70Ysrzip1m5LoJjCp1EDrYzZ7Pg/O3QR1h3PAhmc8SNfSXV3kmmtkg5rNO42EcTYmLX3eFMgqALlGIA==}
electron-to-chromium@1.5.2:
resolution: {integrity: sha512-kc4r3U3V3WLaaZqThjYz/Y6z8tJe+7K0bbjUVo3i+LWIypVdMx5nXCkwRe6SWbY6ILqLdc1rKcKmr3HoH7wjSQ==}
emoji-regex@8.0.0:
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
@@ -1321,8 +1302,8 @@ packages:
postcss-value-parser@4.2.0:
resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==}
postcss@8.4.39:
resolution: {integrity: sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==}
postcss@8.4.40:
resolution: {integrity: sha512-YF2kKIUzAofPMpfH6hOi2cGnv/HrUlfucspc7pDyvv7kGdqXrfj8SCl/t8owkEgKEuu8ZcRjSOxFxVLqwChZ2Q==}
engines: {node: ^10 || ^12 || >=14}
prettier@3.3.3:
@@ -1368,8 +1349,8 @@ packages:
resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==}
engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
rollup@4.19.0:
resolution: {integrity: sha512-5r7EYSQIowHsK4eTZ0Y81qpZuJz+MUuYeqmmYmRMl1nwhdmbiYqt5jwzf6u7wyOzJgYqtCRMtVRKOtHANBz7rA==}
rollup@4.19.1:
resolution: {integrity: sha512-K5vziVlg7hTpYfFBI+91zHBEMo6jafYXpkMlqZjg7/zhIG9iHqazBf4xz9AVdjS9BruRn280ROqLI7G3OFRIlw==}
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
hasBin: true
@@ -1439,8 +1420,8 @@ packages:
tailwind-merge@2.4.0:
resolution: {integrity: sha512-49AwoOQNKdqKPd9CViyH5wJoSKsCDjUlzL8DxuGp3P1FsGY36NJDAa18jLZcaHAUUuTj+JB8IAo8zWgBNvBF7A==}
tailwindcss@3.4.6:
resolution: {integrity: sha512-1uRHzPB+Vzu57ocybfZ4jh5Q3SdlH7XW23J5sQoM9LhE9eIOlzxer/3XPSsycvih3rboRsvt0QCmzSrqyOYUIA==}
tailwindcss@3.4.7:
resolution: {integrity: sha512-rxWZbe87YJb4OcSopb7up2Ba4U82BoiSGUdoDr3Ydrg9ckxFS/YWsvhN323GMcddgU65QRy7JndC7ahhInhvlQ==}
engines: {node: '>=14.0.0'}
hasBin: true
@@ -1497,8 +1478,8 @@ packages:
resolution: {integrity: sha512-lMx9dX+KRmG8sq6gulYYpKWZc9RlGsgBR6aoO8Qsm3qvkSJ+3rAymr+TnV8EDMrIrwuFJ4kruzMWM/OpYzPoow==}
engines: {node: '>=8'}
unplugin@1.11.0:
resolution: {integrity: sha512-3r7VWZ/webh0SGgJScpWl2/MRCZK5d3ZYFcNaeci/GQ7Teop7zf0Nl2pUuz7G21BwPd9pcUPOC5KmJ2L3WgC5g==}
unplugin@1.12.0:
resolution: {integrity: sha512-KeczzHl2sATPQUx1gzo+EnUkmN4VmGBYRRVOZSGvGITE9rGHRDGqft6ONceP3vgXcyJ2XjX5axG5jMWUwNCYLw==}
engines: {node: '>=14.0.0'}
update-browserslist-db@1.1.0:
@@ -1515,8 +1496,8 @@ packages:
util-deprecate@1.0.2:
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
virtua@0.33.3:
resolution: {integrity: sha512-Zxr2hhmTHARMHdZjs5fvd17bHH2YJ1uZZGaw4SKmynDEXtHFzJn/pL9xYJeXWZ8UfXNIBbPvGlHGpruCRbLHIg==}
virtua@0.33.4:
resolution: {integrity: sha512-E5PjR2wxebizA0KDFmGnvpPCeRsbAmmJ/Yif+ZH4HPEylrFqIeBOsgNZqHjsMnu5WqfSgEMIq+Qu0WOIC+3UyA==}
peerDependencies:
react: '>=16.14.0'
react-dom: '>=16.14.0'
@@ -1543,8 +1524,8 @@ packages:
vite:
optional: true
vite@5.3.4:
resolution: {integrity: sha512-Cw+7zL3ZG9/NZBB8C+8QbQZmR54GwqIz+WMI4b3JgdYJvX+ny9AjJXqkGQlDXSXRP9rP0B4tbciRMOVEKulVOA==}
vite@5.3.5:
resolution: {integrity: sha512-MdjglKR6AQXQb9JGiS7Rc2wC6uMjcm7Go/NHNO63EwiJXfuk9PgqiP/n5IDJCziMkfw9n4Ubp7lttNwz+8ZVKA==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
peerDependencies:
@@ -1594,8 +1575,8 @@ packages:
yallist@3.1.1:
resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==}
yaml@2.4.5:
resolution: {integrity: sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==}
yaml@2.5.0:
resolution: {integrity: sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==}
engines: {node: '>= 14'}
hasBin: true
@@ -1622,22 +1603,22 @@ snapshots:
'@babel/highlight': 7.24.7
picocolors: 1.0.1
'@babel/compat-data@7.24.9': {}
'@babel/compat-data@7.25.0': {}
'@babel/core@7.24.9':
dependencies:
'@ampproject/remapping': 2.3.0
'@babel/code-frame': 7.24.7
'@babel/generator': 7.24.10
'@babel/generator': 7.25.0
'@babel/helper-compilation-targets': 7.24.8
'@babel/helper-module-transforms': 7.24.9(@babel/core@7.24.9)
'@babel/helpers': 7.24.8
'@babel/parser': 7.24.8
'@babel/template': 7.24.7
'@babel/traverse': 7.24.8
'@babel/types': 7.24.9
'@babel/helper-module-transforms': 7.25.0(@babel/core@7.24.9)
'@babel/helpers': 7.25.0
'@babel/parser': 7.25.0
'@babel/template': 7.25.0
'@babel/traverse': 7.25.1
'@babel/types': 7.25.0
convert-source-map: 2.0.0
debug: 4.3.5
debug: 4.3.6
gensync: 1.0.0-beta.2
json5: 2.2.3
semver: 6.3.1
@@ -1646,55 +1627,41 @@ snapshots:
'@babel/generator@7.2.0':
dependencies:
'@babel/types': 7.24.9
'@babel/types': 7.25.0
jsesc: 2.5.2
lodash: 4.17.21
source-map: 0.5.7
trim-right: 1.0.1
'@babel/generator@7.24.10':
'@babel/generator@7.25.0':
dependencies:
'@babel/types': 7.24.9
'@babel/types': 7.25.0
'@jridgewell/gen-mapping': 0.3.5
'@jridgewell/trace-mapping': 0.3.25
jsesc: 2.5.2
'@babel/helper-compilation-targets@7.24.8':
dependencies:
'@babel/compat-data': 7.24.9
'@babel/compat-data': 7.25.0
'@babel/helper-validator-option': 7.24.8
browserslist: 4.23.2
lru-cache: 5.1.1
semver: 6.3.1
'@babel/helper-environment-visitor@7.24.7':
dependencies:
'@babel/types': 7.24.9
'@babel/helper-function-name@7.24.7':
dependencies:
'@babel/template': 7.24.7
'@babel/types': 7.24.9
'@babel/helper-hoist-variables@7.24.7':
dependencies:
'@babel/types': 7.24.9
'@babel/helper-module-imports@7.24.7':
dependencies:
'@babel/traverse': 7.24.8
'@babel/types': 7.24.9
'@babel/traverse': 7.25.1
'@babel/types': 7.25.0
transitivePeerDependencies:
- supports-color
'@babel/helper-module-transforms@7.24.9(@babel/core@7.24.9)':
'@babel/helper-module-transforms@7.25.0(@babel/core@7.24.9)':
dependencies:
'@babel/core': 7.24.9
'@babel/helper-environment-visitor': 7.24.7
'@babel/helper-module-imports': 7.24.7
'@babel/helper-simple-access': 7.24.7
'@babel/helper-split-export-declaration': 7.24.7
'@babel/helper-validator-identifier': 7.24.7
'@babel/traverse': 7.25.1
transitivePeerDependencies:
- supports-color
@@ -1702,25 +1669,21 @@ snapshots:
'@babel/helper-simple-access@7.24.7':
dependencies:
'@babel/traverse': 7.24.8
'@babel/types': 7.24.9
'@babel/traverse': 7.25.1
'@babel/types': 7.25.0
transitivePeerDependencies:
- supports-color
'@babel/helper-split-export-declaration@7.24.7':
dependencies:
'@babel/types': 7.24.9
'@babel/helper-string-parser@7.24.8': {}
'@babel/helper-validator-identifier@7.24.7': {}
'@babel/helper-validator-option@7.24.8': {}
'@babel/helpers@7.24.8':
'@babel/helpers@7.25.0':
dependencies:
'@babel/template': 7.24.7
'@babel/types': 7.24.9
'@babel/template': 7.25.0
'@babel/types': 7.25.0
'@babel/highlight@7.24.7':
dependencies:
@@ -1729,9 +1692,9 @@ snapshots:
js-tokens: 4.0.0
picocolors: 1.0.1
'@babel/parser@7.24.8':
'@babel/parser@7.25.0':
dependencies:
'@babel/types': 7.24.9
'@babel/types': 7.25.0
'@babel/plugin-syntax-jsx@7.24.7(@babel/core@7.24.9)':
dependencies:
@@ -1753,28 +1716,25 @@ snapshots:
'@babel/core': 7.24.9
'@babel/helper-plugin-utils': 7.24.8
'@babel/template@7.24.7':
'@babel/template@7.25.0':
dependencies:
'@babel/code-frame': 7.24.7
'@babel/parser': 7.24.8
'@babel/types': 7.24.9
'@babel/parser': 7.25.0
'@babel/types': 7.25.0
'@babel/traverse@7.24.8':
'@babel/traverse@7.25.1':
dependencies:
'@babel/code-frame': 7.24.7
'@babel/generator': 7.24.10
'@babel/helper-environment-visitor': 7.24.7
'@babel/helper-function-name': 7.24.7
'@babel/helper-hoist-variables': 7.24.7
'@babel/helper-split-export-declaration': 7.24.7
'@babel/parser': 7.24.8
'@babel/types': 7.24.9
debug: 4.3.5
'@babel/generator': 7.25.0
'@babel/parser': 7.25.0
'@babel/template': 7.25.0
'@babel/types': 7.25.0
debug: 4.3.6
globals: 11.12.0
transitivePeerDependencies:
- supports-color
'@babel/types@7.24.9':
'@babel/types@7.25.0':
dependencies:
'@babel/helper-string-parser': 7.24.8
'@babel/helper-validator-identifier': 7.24.7
@@ -2039,52 +1999,52 @@ snapshots:
optionalDependencies:
'@types/react': types-react@19.0.0-rc.1
'@rollup/rollup-android-arm-eabi@4.19.0':
'@rollup/rollup-android-arm-eabi@4.19.1':
optional: true
'@rollup/rollup-android-arm64@4.19.0':
'@rollup/rollup-android-arm64@4.19.1':
optional: true
'@rollup/rollup-darwin-arm64@4.19.0':
'@rollup/rollup-darwin-arm64@4.19.1':
optional: true
'@rollup/rollup-darwin-x64@4.19.0':
'@rollup/rollup-darwin-x64@4.19.1':
optional: true
'@rollup/rollup-linux-arm-gnueabihf@4.19.0':
'@rollup/rollup-linux-arm-gnueabihf@4.19.1':
optional: true
'@rollup/rollup-linux-arm-musleabihf@4.19.0':
'@rollup/rollup-linux-arm-musleabihf@4.19.1':
optional: true
'@rollup/rollup-linux-arm64-gnu@4.19.0':
'@rollup/rollup-linux-arm64-gnu@4.19.1':
optional: true
'@rollup/rollup-linux-arm64-musl@4.19.0':
'@rollup/rollup-linux-arm64-musl@4.19.1':
optional: true
'@rollup/rollup-linux-powerpc64le-gnu@4.19.0':
'@rollup/rollup-linux-powerpc64le-gnu@4.19.1':
optional: true
'@rollup/rollup-linux-riscv64-gnu@4.19.0':
'@rollup/rollup-linux-riscv64-gnu@4.19.1':
optional: true
'@rollup/rollup-linux-s390x-gnu@4.19.0':
'@rollup/rollup-linux-s390x-gnu@4.19.1':
optional: true
'@rollup/rollup-linux-x64-gnu@4.19.0':
'@rollup/rollup-linux-x64-gnu@4.19.1':
optional: true
'@rollup/rollup-linux-x64-musl@4.19.0':
'@rollup/rollup-linux-x64-musl@4.19.1':
optional: true
'@rollup/rollup-win32-arm64-msvc@4.19.0':
'@rollup/rollup-win32-arm64-msvc@4.19.1':
optional: true
'@rollup/rollup-win32-ia32-msvc@4.19.0':
'@rollup/rollup-win32-ia32-msvc@4.19.1':
optional: true
'@rollup/rollup-win32-x64-msvc@4.19.0':
'@rollup/rollup-win32-x64-msvc@4.19.1':
optional: true
'@scure/base@1.1.1': {}
@@ -2104,8 +2064,6 @@ snapshots:
'@tanstack/query-core@5.51.15': {}
'@tanstack/query-core@5.51.9': {}
'@tanstack/query-persist-client-core@5.51.15':
dependencies:
'@tanstack/query-core': 5.51.15
@@ -2115,18 +2073,18 @@ snapshots:
'@tanstack/query-core': 5.51.15
'@tanstack/query-persist-client-core': 5.51.15
'@tanstack/react-query-persist-client@5.51.15(@tanstack/react-query@5.51.11(react@19.0.0-rc-d025ddd3-20240722))(react@19.0.0-rc-d025ddd3-20240722)':
'@tanstack/react-query-persist-client@5.51.15(@tanstack/react-query@5.51.15(react@19.0.0-rc-d025ddd3-20240722))(react@19.0.0-rc-d025ddd3-20240722)':
dependencies:
'@tanstack/query-persist-client-core': 5.51.15
'@tanstack/react-query': 5.51.11(react@19.0.0-rc-d025ddd3-20240722)
'@tanstack/react-query': 5.51.15(react@19.0.0-rc-d025ddd3-20240722)
react: 19.0.0-rc-d025ddd3-20240722
'@tanstack/react-query@5.51.11(react@19.0.0-rc-d025ddd3-20240722)':
'@tanstack/react-query@5.51.15(react@19.0.0-rc-d025ddd3-20240722)':
dependencies:
'@tanstack/query-core': 5.51.9
'@tanstack/query-core': 5.51.15
react: 19.0.0-rc-d025ddd3-20240722
'@tanstack/react-router@1.45.8(react-dom@19.0.0-rc-d025ddd3-20240722(react@19.0.0-rc-d025ddd3-20240722))(react@19.0.0-rc-d025ddd3-20240722)':
'@tanstack/react-router@1.45.11(react-dom@19.0.0-rc-d025ddd3-20240722(react@19.0.0-rc-d025ddd3-20240722))(react@19.0.0-rc-d025ddd3-20240722)':
dependencies:
'@tanstack/history': 1.45.3
'@tanstack/react-store': 0.5.5(react-dom@19.0.0-rc-d025ddd3-20240722(react@19.0.0-rc-d025ddd3-20240722))(react@19.0.0-rc-d025ddd3-20240722)
@@ -2147,16 +2105,16 @@ snapshots:
prettier: 3.3.3
zod: 3.23.8
'@tanstack/router-plugin@1.45.8(vite@5.3.4)':
'@tanstack/router-plugin@1.45.8(vite@5.3.5)':
dependencies:
'@babel/core': 7.24.9
'@babel/generator': 7.24.10
'@babel/parser': 7.24.8
'@babel/generator': 7.25.0
'@babel/parser': 7.25.0
'@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.24.9)
'@babel/plugin-syntax-typescript': 7.24.7(@babel/core@7.24.9)
'@babel/template': 7.24.7
'@babel/traverse': 7.24.8
'@babel/types': 7.24.9
'@babel/template': 7.25.0
'@babel/traverse': 7.25.1
'@babel/types': 7.25.0
'@tanstack/router-generator': 1.45.7
'@types/babel__core': 7.20.5
'@types/babel__generator': 7.6.8
@@ -2164,10 +2122,10 @@ snapshots:
'@types/babel__traverse': 7.20.6
babel-dead-code-elimination: 1.0.6
chokidar: 3.6.0
unplugin: 1.11.0
unplugin: 1.12.0
zod: 3.23.8
optionalDependencies:
vite: 5.3.4
vite: 5.3.5
transitivePeerDependencies:
- supports-color
@@ -2236,24 +2194,24 @@ snapshots:
'@types/babel__core@7.20.5':
dependencies:
'@babel/parser': 7.24.8
'@babel/types': 7.24.9
'@babel/parser': 7.25.0
'@babel/types': 7.25.0
'@types/babel__generator': 7.6.8
'@types/babel__template': 7.4.4
'@types/babel__traverse': 7.20.6
'@types/babel__generator@7.6.8':
dependencies:
'@babel/types': 7.24.9
'@babel/types': 7.25.0
'@types/babel__template@7.4.4':
dependencies:
'@babel/parser': 7.24.8
'@babel/types': 7.24.9
'@babel/parser': 7.25.0
'@babel/types': 7.25.0
'@types/babel__traverse@7.20.6':
dependencies:
'@babel/types': 7.24.9
'@babel/types': 7.25.0
'@types/estree@1.0.5': {}
@@ -2281,14 +2239,14 @@ snapshots:
dependencies:
'@types/yargs-parser': 21.0.3
'@vitejs/plugin-react@4.3.1(vite@5.3.4)':
'@vitejs/plugin-react@4.3.1(vite@5.3.5)':
dependencies:
'@babel/core': 7.24.9
'@babel/plugin-transform-react-jsx-self': 7.24.7(@babel/core@7.24.9)
'@babel/plugin-transform-react-jsx-source': 7.24.7(@babel/core@7.24.9)
'@types/babel__core': 7.20.5
react-refresh: 0.14.2
vite: 5.3.4
vite: 5.3.5
transitivePeerDependencies:
- supports-color
@@ -2319,29 +2277,29 @@ snapshots:
arg@5.0.2: {}
autoprefixer@10.4.19(postcss@8.4.39):
autoprefixer@10.4.19(postcss@8.4.40):
dependencies:
browserslist: 4.23.2
caniuse-lite: 1.0.30001643
fraction.js: 4.3.7
normalize-range: 0.1.2
picocolors: 1.0.1
postcss: 8.4.39
postcss: 8.4.40
postcss-value-parser: 4.2.0
babel-dead-code-elimination@1.0.6:
dependencies:
'@babel/core': 7.24.9
'@babel/parser': 7.24.8
'@babel/traverse': 7.24.8
'@babel/types': 7.24.9
'@babel/parser': 7.25.0
'@babel/traverse': 7.25.1
'@babel/types': 7.25.0
transitivePeerDependencies:
- supports-color
babel-plugin-react-compiler@0.0.0-experimental-696af53-20240625:
dependencies:
'@babel/generator': 7.2.0
'@babel/types': 7.24.9
'@babel/types': 7.25.0
chalk: 4.1.2
invariant: 2.2.4
pretty-format: 24.9.0
@@ -2363,7 +2321,7 @@ snapshots:
browserslist@4.23.2:
dependencies:
caniuse-lite: 1.0.30001643
electron-to-chromium: 1.4.833
electron-to-chromium: 1.5.2
node-releases: 2.0.18
update-browserslist-db: 1.1.0(browserslist@4.23.2)
@@ -2424,7 +2382,7 @@ snapshots:
dayjs@1.11.12: {}
debug@4.3.5:
debug@4.3.6:
dependencies:
ms: 2.1.2
@@ -2434,7 +2392,7 @@ snapshots:
eastasianwidth@0.2.0: {}
electron-to-chromium@1.4.833: {}
electron-to-chromium@1.5.2: {}
emoji-regex@8.0.0: {}
@@ -2656,28 +2614,28 @@ snapshots:
pirates@4.0.6: {}
postcss-import@15.1.0(postcss@8.4.39):
postcss-import@15.1.0(postcss@8.4.40):
dependencies:
postcss: 8.4.39
postcss: 8.4.40
postcss-value-parser: 4.2.0
read-cache: 1.0.0
resolve: 1.22.8
postcss-js@4.0.1(postcss@8.4.39):
postcss-js@4.0.1(postcss@8.4.40):
dependencies:
camelcase-css: 2.0.1
postcss: 8.4.39
postcss: 8.4.40
postcss-load-config@4.0.2(postcss@8.4.39):
postcss-load-config@4.0.2(postcss@8.4.40):
dependencies:
lilconfig: 3.1.2
yaml: 2.4.5
yaml: 2.5.0
optionalDependencies:
postcss: 8.4.39
postcss: 8.4.40
postcss-nested@6.2.0(postcss@8.4.39):
postcss-nested@6.2.0(postcss@8.4.40):
dependencies:
postcss: 8.4.39
postcss: 8.4.40
postcss-selector-parser: 6.1.1
postcss-selector-parser@6.1.1:
@@ -2687,7 +2645,7 @@ snapshots:
postcss-value-parser@4.2.0: {}
postcss@8.4.39:
postcss@8.4.40:
dependencies:
nanoid: 3.3.7
picocolors: 1.0.1
@@ -2731,26 +2689,26 @@ snapshots:
reusify@1.0.4: {}
rollup@4.19.0:
rollup@4.19.1:
dependencies:
'@types/estree': 1.0.5
optionalDependencies:
'@rollup/rollup-android-arm-eabi': 4.19.0
'@rollup/rollup-android-arm64': 4.19.0
'@rollup/rollup-darwin-arm64': 4.19.0
'@rollup/rollup-darwin-x64': 4.19.0
'@rollup/rollup-linux-arm-gnueabihf': 4.19.0
'@rollup/rollup-linux-arm-musleabihf': 4.19.0
'@rollup/rollup-linux-arm64-gnu': 4.19.0
'@rollup/rollup-linux-arm64-musl': 4.19.0
'@rollup/rollup-linux-powerpc64le-gnu': 4.19.0
'@rollup/rollup-linux-riscv64-gnu': 4.19.0
'@rollup/rollup-linux-s390x-gnu': 4.19.0
'@rollup/rollup-linux-x64-gnu': 4.19.0
'@rollup/rollup-linux-x64-musl': 4.19.0
'@rollup/rollup-win32-arm64-msvc': 4.19.0
'@rollup/rollup-win32-ia32-msvc': 4.19.0
'@rollup/rollup-win32-x64-msvc': 4.19.0
'@rollup/rollup-android-arm-eabi': 4.19.1
'@rollup/rollup-android-arm64': 4.19.1
'@rollup/rollup-darwin-arm64': 4.19.1
'@rollup/rollup-darwin-x64': 4.19.1
'@rollup/rollup-linux-arm-gnueabihf': 4.19.1
'@rollup/rollup-linux-arm-musleabihf': 4.19.1
'@rollup/rollup-linux-arm64-gnu': 4.19.1
'@rollup/rollup-linux-arm64-musl': 4.19.1
'@rollup/rollup-linux-powerpc64le-gnu': 4.19.1
'@rollup/rollup-linux-riscv64-gnu': 4.19.1
'@rollup/rollup-linux-s390x-gnu': 4.19.1
'@rollup/rollup-linux-x64-gnu': 4.19.1
'@rollup/rollup-linux-x64-musl': 4.19.1
'@rollup/rollup-win32-arm64-msvc': 4.19.1
'@rollup/rollup-win32-ia32-msvc': 4.19.1
'@rollup/rollup-win32-x64-msvc': 4.19.1
fsevents: 2.3.3
run-parallel@1.2.0:
@@ -2815,7 +2773,7 @@ snapshots:
tailwind-merge@2.4.0: {}
tailwindcss@3.4.6:
tailwindcss@3.4.7:
dependencies:
'@alloc/quick-lru': 5.2.0
arg: 5.0.2
@@ -2831,11 +2789,11 @@ snapshots:
normalize-path: 3.0.0
object-hash: 3.0.0
picocolors: 1.0.1
postcss: 8.4.39
postcss-import: 15.1.0(postcss@8.4.39)
postcss-js: 4.0.1(postcss@8.4.39)
postcss-load-config: 4.0.2(postcss@8.4.39)
postcss-nested: 6.2.0(postcss@8.4.39)
postcss: 8.4.40
postcss-import: 15.1.0(postcss@8.4.40)
postcss-js: 4.0.1(postcss@8.4.40)
postcss-load-config: 4.0.2(postcss@8.4.40)
postcss-nested: 6.2.0(postcss@8.4.40)
postcss-selector-parser: 6.1.1
resolve: 1.22.8
sucrase: 3.35.0
@@ -2880,7 +2838,7 @@ snapshots:
unique-names-generator@4.7.1: {}
unplugin@1.11.0:
unplugin@1.12.0:
dependencies:
acorn: 8.12.1
chokidar: 3.6.0
@@ -2899,27 +2857,27 @@ snapshots:
util-deprecate@1.0.2: {}
virtua@0.33.3(react-dom@19.0.0-rc-d025ddd3-20240722(react@19.0.0-rc-d025ddd3-20240722))(react@19.0.0-rc-d025ddd3-20240722):
virtua@0.33.4(react-dom@19.0.0-rc-d025ddd3-20240722(react@19.0.0-rc-d025ddd3-20240722))(react@19.0.0-rc-d025ddd3-20240722):
optionalDependencies:
react: 19.0.0-rc-d025ddd3-20240722
react-dom: 19.0.0-rc-d025ddd3-20240722(react@19.0.0-rc-d025ddd3-20240722)
vite-tsconfig-paths@4.3.2(typescript@5.5.4)(vite@5.3.4):
vite-tsconfig-paths@4.3.2(typescript@5.5.4)(vite@5.3.5):
dependencies:
debug: 4.3.5
debug: 4.3.6
globrex: 0.1.2
tsconfck: 3.1.1(typescript@5.5.4)
optionalDependencies:
vite: 5.3.4
vite: 5.3.5
transitivePeerDependencies:
- supports-color
- typescript
vite@5.3.4:
vite@5.3.5:
dependencies:
esbuild: 0.21.5
postcss: 8.4.39
rollup: 4.19.0
postcss: 8.4.40
rollup: 4.19.1
optionalDependencies:
fsevents: 2.3.3
@@ -2945,7 +2903,7 @@ snapshots:
yallist@3.1.1: {}
yaml@2.4.5: {}
yaml@2.5.0: {}
zod-validation-error@2.1.0(zod@3.23.8):
dependencies:

View File

@@ -1,6 +0,0 @@
<svg width="206" height="231" viewBox="0 0 206 231" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M143.143 84C143.143 96.1503 133.293 106 121.143 106C108.992 106 99.1426 96.1503 99.1426 84C99.1426 71.8497 108.992 62 121.143 62C133.293 62 143.143 71.8497 143.143 84Z" fill="#FFC131"/>
<ellipse cx="84.1426" cy="147" rx="22" ry="22" transform="rotate(180 84.1426 147)" fill="#24C8DB"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M166.738 154.548C157.86 160.286 148.023 164.269 137.757 166.341C139.858 160.282 141 153.774 141 147C141 144.543 140.85 142.121 140.558 139.743C144.975 138.204 149.215 136.139 153.183 133.575C162.73 127.404 170.292 118.608 174.961 108.244C179.63 97.8797 181.207 86.3876 179.502 75.1487C177.798 63.9098 172.884 53.4021 165.352 44.8883C157.82 36.3744 147.99 30.2165 137.042 27.1546C126.095 24.0926 114.496 24.2568 103.64 27.6274C92.7839 30.998 83.1319 37.4317 75.8437 46.1553C74.9102 47.2727 74.0206 48.4216 73.176 49.5993C61.9292 50.8488 51.0363 54.0318 40.9629 58.9556C44.2417 48.4586 49.5653 38.6591 56.679 30.1442C67.0505 17.7298 80.7861 8.57426 96.2354 3.77762C111.685 -1.01901 128.19 -1.25267 143.769 3.10474C159.348 7.46215 173.337 16.2252 184.056 28.3411C194.775 40.457 201.767 55.4101 204.193 71.404C206.619 87.3978 204.374 103.752 197.73 118.501C191.086 133.25 180.324 145.767 166.738 154.548ZM41.9631 74.275L62.5557 76.8042C63.0459 72.813 63.9401 68.9018 65.2138 65.1274C57.0465 67.0016 49.2088 70.087 41.9631 74.275Z" fill="#FFC131"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M38.4045 76.4519C47.3493 70.6709 57.2677 66.6712 67.6171 64.6132C65.2774 70.9669 64 77.8343 64 85.0001C64 87.1434 64.1143 89.26 64.3371 91.3442C60.0093 92.8732 55.8533 94.9092 51.9599 97.4256C42.4128 103.596 34.8505 112.392 30.1816 122.756C25.5126 133.12 23.9357 144.612 25.6403 155.851C27.3449 167.09 32.2584 177.598 39.7906 186.112C47.3227 194.626 57.153 200.784 68.1003 203.846C79.0476 206.907 90.6462 206.743 101.502 203.373C112.359 200.002 122.011 193.568 129.299 184.845C130.237 183.722 131.131 182.567 131.979 181.383C143.235 180.114 154.132 176.91 164.205 171.962C160.929 182.49 155.596 192.319 148.464 200.856C138.092 213.27 124.357 222.426 108.907 227.222C93.458 232.019 76.9524 232.253 61.3736 227.895C45.7948 223.538 31.8055 214.775 21.0867 202.659C10.3679 190.543 3.37557 175.59 0.949823 159.596C-1.47592 143.602 0.768139 127.248 7.41237 112.499C14.0566 97.7497 24.8183 85.2327 38.4045 76.4519ZM163.062 156.711L163.062 156.711C162.954 156.773 162.846 156.835 162.738 156.897C162.846 156.835 162.954 156.773 163.062 156.711Z" fill="#24C8DB"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -211,9 +211,17 @@ pub async fn login(
}
}
let new_message = Filter::new().kind(Kind::GiftWrap).pubkey(public_key);
let subscription_id = SubscriptionId::new("personal_inbox");
let _ = client.subscribe_with_id(subscription_id, vec![new_message], None).await;
let new_message = Filter::new().kind(Kind::GiftWrap).pubkey(public_key);
if client.subscription(&subscription_id).await.is_some() {
// Remove old subscriotion
client.unsubscribe(subscription_id.clone()).await;
// Resubscribe new message for current user
let _ = client.subscribe_with_id(subscription_id, vec![new_message], None).await;
} else {
let _ = client.subscribe_with_id(subscription_id, vec![new_message], None).await;
}
let handle_clone = handle.app_handle().clone();
@@ -223,7 +231,14 @@ pub async fn login(
let client = &state.client;
let sync = Filter::new().kind(Kind::GiftWrap).pubkey(public_key);
let _ = client.reconcile(sync, NegentropyOptions::default()).await;
if client.reconcile(sync.clone(), NegentropyOptions::default()).await.is_ok() {
handle_clone.emit("synchronized", ()).unwrap();
};
if client.get_events_of(vec![sync], Some(Duration::from_secs(20))).await.is_ok() {
handle_clone.emit("synchronized", ()).unwrap();
};
});
tauri::async_runtime::spawn(async move {

View File

@@ -8,48 +8,28 @@ use crate::{common::is_member, Nostr};
#[tauri::command]
#[specta::specta]
pub async fn get_chats(db_only: bool, state: State<'_, Nostr>) -> Result<Vec<String>, String> {
pub async fn get_chats(state: State<'_, Nostr>) -> Result<Vec<String>, String> {
let client = &state.client;
let signer = client.signer().await.map_err(|e| e.to_string())?;
let public_key = signer.public_key().await.map_err(|e| e.to_string())?;
let filter = Filter::new().kind(Kind::GiftWrap).pubkey(public_key);
let events = match db_only {
true => match client.database().query(vec![filter], Order::Desc).await {
Ok(events) => {
stream::iter(events)
.filter_map(|ev| async move {
if let Ok(UnwrappedGift { rumor, .. }) = client.unwrap_gift_wrap(&ev).await
{
if rumor.kind == Kind::PrivateDirectMessage {
return Some(rumor);
}
let events = match client.database().query(vec![filter], Order::Desc).await {
Ok(events) => {
stream::iter(events)
.filter_map(|ev| async move {
if let Ok(UnwrappedGift { rumor, .. }) = client.unwrap_gift_wrap(&ev).await {
if rumor.kind == Kind::PrivateDirectMessage {
return Some(rumor);
}
None
})
.collect::<Vec<_>>()
.await
}
Err(err) => return Err(err.to_string()),
},
false => match client.get_events_of(vec![filter], Some(Duration::from_secs(12))).await {
Ok(events) => {
stream::iter(events)
.filter_map(|ev| async move {
if let Ok(UnwrappedGift { rumor, .. }) = client.unwrap_gift_wrap(&ev).await
{
if rumor.kind == Kind::PrivateDirectMessage {
return Some(rumor);
}
}
None
})
.collect::<Vec<_>>()
.await
}
Err(err) => return Err(err.to_string()),
},
}
None
})
.collect::<Vec<_>>()
.await
}
Err(err) => return Err(err.to_string()),
};
let uniqs = events

View File

@@ -70,12 +70,11 @@ fn main() {
let client = tauri::async_runtime::block_on(async move {
// Create data folder if not exist
let dir = handle.path().config_dir().expect("Config Directory not found.");
let _ = fs::create_dir_all(dir.join("Coop/"));
let dir = handle.path().app_config_dir().expect("App config directory not found.");
let _ = fs::create_dir_all(dir.clone());
// Setup database
let database =
SQLiteDatabase::open(dir.join("Coop/coop.db")).await.expect("Error.");
let database = SQLiteDatabase::open(dir.join("nostr.db")).await.expect("Error.");
// Setup nostr client
let opts = Options::new()

View File

@@ -1,46 +1,46 @@
{
"productName": "Coop",
"version": "0.0.0",
"identifier": "com.tauri.dev",
"build": {
"beforeDevCommand": "pnpm dev",
"devUrl": "http://localhost:1420",
"beforeBuildCommand": "pnpm build",
"frontendDist": "../dist"
},
"app": {
"macOSPrivateApi": true,
"withGlobalTauri": true,
"security": {
"csp": null,
"assetProtocol": {
"enable": true,
"scope": [
"$APPDATA/*",
"$DATA/*",
"$LOCALDATA/*",
"$DESKTOP/*",
"$DOCUMENT/*",
"$DOWNLOAD/*",
"$HOME/*",
"$PICTURE/*",
"$PUBLIC/*",
"$VIDEO/*",
"$APPCONFIG/*",
"$RESOURCE/*"
]
}
}
},
"bundle": {
"active": true,
"targets": "all",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
]
}
"productName": "Coop",
"version": "0.0.0",
"identifier": "nu.lume.coop",
"build": {
"beforeDevCommand": "pnpm dev",
"devUrl": "http://localhost:1420",
"beforeBuildCommand": "pnpm build",
"frontendDist": "../dist"
},
"app": {
"macOSPrivateApi": true,
"withGlobalTauri": true,
"security": {
"csp": null,
"assetProtocol": {
"enable": true,
"scope": [
"$APPDATA/*",
"$DATA/*",
"$LOCALDATA/*",
"$DESKTOP/*",
"$DOCUMENT/*",
"$DOWNLOAD/*",
"$HOME/*",
"$PICTURE/*",
"$PUBLIC/*",
"$VIDEO/*",
"$APPCONFIG/*",
"$RESOURCE/*"
]
}
}
},
"bundle": {
"active": true,
"targets": "all",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
]
}
}

View File

@@ -47,9 +47,9 @@ try {
else return { status: "error", error: e as any };
}
},
async getChats(dbOnly: boolean) : Promise<Result<string[], string>> {
async getChats() : Promise<Result<string[], string>> {
try {
return { status: "ok", data: await TAURI_INVOKE("get_chats", { dbOnly }) };
return { status: "ok", data: await TAURI_INVOKE("get_chats") };
} catch (e) {
if(e instanceof Error) throw e;
else return { status: "error", error: e as any };

View File

@@ -1,11 +1,9 @@
import { useQuery } from "@tanstack/react-query";
import { type ClassValue, clsx } from "clsx";
import dayjs from "dayjs";
import relativeTime from "dayjs/plugin/relativeTime";
import updateLocale from "dayjs/plugin/updateLocale";
import { nip19 } from "nostr-tools";
import { type NostrEvent, nip19 } from "nostr-tools";
import { twMerge } from "tailwind-merge";
import { commands } from "./commands";
dayjs.extend(relativeTime);
dayjs.extend(updateLocale);
@@ -81,3 +79,11 @@ export function getChatId(pubkey: string, tags: string[][]) {
const id = [pubkey, tags.map((tag) => tag[0] === "p" && tag[1])].join("-");
return id;
}
export function groupEventByDate(events: NostrEvent[]) {
const groups = Object.groupBy(events, (event) => {
return dayjs.unix(event.created_at).startOf("day").format("MMM DD, YYYY");
});
return groups;
}

View File

@@ -1,8 +1,8 @@
import { commands } from "@/commands";
import { cn, getReceivers, time } from "@/commons";
import { cn, getReceivers, groupEventByDate, time } from "@/commons";
import { Spinner } from "@/components/spinner";
import { User } from "@/components/user";
import { ArrowUp, DotsThree, Paperclip } from "@phosphor-icons/react";
import { ArrowUp, Paperclip } from "@phosphor-icons/react";
import * as ScrollArea from "@radix-ui/react-scroll-area";
import { useQuery, useQueryClient } from "@tanstack/react-query";
import { createFileRoute } from "@tanstack/react-router";
@@ -90,15 +90,17 @@ function List() {
if (res.status === "ok") {
const raw = res.data;
const events = raw
.map((item) => JSON.parse(item) as NostrEvent)
.sort((a, b) => a.created_at - b.created_at);
const events: NostrEvent[] = raw.map((item) => JSON.parse(item));
return events;
} else {
throw new Error(res.error);
}
},
select: (data) => {
const groups = groupEventByDate(data);
return Object.entries(groups).reverse();
},
refetchOnWindowFocus: false,
});
@@ -122,10 +124,10 @@ function List() {
>
<div
className={cn(
"py-2 px-3 w-fit max-w-[400px] text-pretty break-message rounded-t-2xl",
"py-2 px-3 w-fit max-w-[400px] text-pretty break-message",
!self
? "bg-neutral-100 dark:bg-neutral-800 rounded-l-md rounded-r-xl"
: "bg-blue-500 text-white rounded-l-xl rounded-r-md",
? "bg-neutral-100 dark:bg-neutral-800 rounded-tl-3xl rounded-tr-3xl rounded-br-3xl rounded-bl-md"
: "bg-blue-500 text-white rounded-tl-3xl rounded-tr-3xl rounded-br-md rounded-bl-3xl",
)}
>
{item.content}
@@ -177,31 +179,19 @@ function List() {
className="relative h-full py-2 [&>div]:!flex [&>div]:flex-col [&>div]:justify-end [&>div]:min-h-full"
>
<Virtualizer scrollRef={ref} shift>
{isLoading || !data ? (
{isLoading ? (
<>
<div className="flex items-center justify-between gap-3 my-1.5 px-3">
<div className="flex-1 min-w-0 inline-flex">
<div className="py-2 px-3 w-fit max-w-[400px] bg-neutral-100 dark:bg-neutral-800 rounded-l-md rounded-r-xl rounded-t-2xl">
Loading...
</div>
</div>
<div className="shrink-0 w-16 flex items-center justify-end">
<span className="text-xs text-right text-neutral-600 dark:text-neutral-400">
{time(Math.floor(Date.now() / 1000))}
</span>
<div className="w-44 h-[35px] py-2 max-w-[400px] bg-neutral-100 dark:bg-neutral-800 animate-pulse rounded-tl-3xl rounded-tr-3xl rounded-br-3xl rounded-bl-md" />
</div>
<div className="shrink-0 w-16 flex items-center justify-end" />
</div>
<div className="flex items-center justify-between gap-3 my-1.5 px-3">
<div className="flex-1 min-w-0 inline-flex justify-end">
<div className="py-2 px-3 w-fit max-w-[400px] bg-blue-500 text-white rounded-l-xl rounded-r-md rounded-t-2xl">
Loading...
</div>
</div>
<div className="shrink-0 w-16 flex items-center justify-end">
<span className="text-xs text-right text-neutral-600 dark:text-neutral-400">
{time(Math.floor(Date.now() / 1000))}
</span>
<div className="w-44 h-[35px] py-2 max-w-[400px] bg-blue-500 text-white animate-pulse rounded-tl-3xl rounded-tr-3xl rounded-br-md rounded-bl-3xl" />
</div>
<div className="shrink-0 w-16 flex items-center justify-end" />
</div>
</>
) : isError ? (
@@ -211,7 +201,21 @@ function List() {
</div>
</div>
) : (
data.map((item, idx) => renderItem(item, idx))
data.map((item) => (
<div
key={item[0]}
className="w-full flex flex-col items-center mt-3 gap-3"
>
<div className="text-xs text-center text-neutral-600 dark:text-neutral-400">
{item[0]}
</div>
<div className="w-full">
{item[1]
.sort((a, b) => a.created_at - b.created_at)
.map((item, idx) => renderItem(item, idx))}
</div>
</div>
))
)}
</Virtualizer>
</ScrollArea.Viewport>

View File

@@ -67,7 +67,7 @@ function ChatList() {
const { isLoading, data } = useQuery({
queryKey: ["chats"],
queryFn: async () => {
const res = await commands.getChats(true);
const res = await commands.getChats();
if (res.status === "ok") {
const raw = res.data;
@@ -79,11 +79,20 @@ function ChatList() {
}
},
select: (data) => data.sort((a, b) => b.created_at - a.created_at),
refetchOnWindowFocus: false,
});
useEffect(() => {
const unlisten = listen<Payload>("new_chat", async (data) => {
const unlisten = listen("synchronized", async () => {
await queryClient.refetchQueries({ queryKey: ["chats"] })
});
return () => {
unlisten.then((f) => f());
};
}, []);
useEffect(() => {
const unlisten = listen<Payload>("event", async (data) => {
const event: NostrEvent = JSON.parse(data.payload.event);
const chats: NostrEvent[] = await queryClient.getQueryData(["chats"]);

View File

@@ -1,8 +1,9 @@
{
"compilerOptions": {
"target": "ES2020",
"target": "ESNext",
"useDefineForClassFields": true,
"lib": [
"ESNext",
"ES2020",
"DOM",
"DOM.Iterable"
@@ -34,5 +35,5 @@
{
"path": "./tsconfig.node.json"
}
],
]
}