@@ -60,7 +60,7 @@
|
||||
"@tiptap/react": "^2.1.13",
|
||||
"@tiptap/starter-kit": "^2.1.13",
|
||||
"@tiptap/suggestion": "^2.1.13",
|
||||
"@vidstack/react": "^1.9.2",
|
||||
"@vidstack/react": "^1.9.3",
|
||||
"dayjs": "^1.11.10",
|
||||
"framer-motion": "^10.16.16",
|
||||
"html-to-text": "^9.0.5",
|
||||
@@ -110,14 +110,14 @@
|
||||
"husky": "^8.0.3",
|
||||
"lint-staged": "^15.2.0",
|
||||
"postcss": "^8.4.32",
|
||||
"prettier": "^3.1.0",
|
||||
"prettier": "^3.1.1",
|
||||
"prettier-plugin-tailwindcss": "^0.5.9",
|
||||
"prop-types": "^15.8.1",
|
||||
"tailwind-merge": "^1.14.0",
|
||||
"tailwind-scrollbar": "^3.0.5",
|
||||
"tailwindcss": "^3.3.6",
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "^4.5.1",
|
||||
"vite": "^5.0.7",
|
||||
"vite-plugin-top-level-await": "^1.3.1",
|
||||
"vite-tsconfig-paths": "^4.2.2"
|
||||
}
|
||||
|
||||
331
pnpm-lock.yaml
generated
331
pnpm-lock.yaml
generated
@@ -132,8 +132,8 @@ dependencies:
|
||||
specifier: ^2.1.13
|
||||
version: 2.1.13(@tiptap/core@2.1.13)(@tiptap/pm@2.1.13)
|
||||
'@vidstack/react':
|
||||
specifier: ^1.9.2
|
||||
version: 1.9.2(@types/react@18.2.43)(react@18.2.0)
|
||||
specifier: ^1.9.3
|
||||
version: 1.9.3(@types/react@18.2.43)(react@18.2.0)
|
||||
dayjs:
|
||||
specifier: ^1.11.10
|
||||
version: 1.11.10
|
||||
@@ -219,7 +219,7 @@ devDependencies:
|
||||
version: 0.5.10(tailwindcss@3.3.6)
|
||||
'@trivago/prettier-plugin-sort-imports':
|
||||
specifier: ^4.3.0
|
||||
version: 4.3.0(prettier@3.1.0)
|
||||
version: 4.3.0(prettier@3.1.1)
|
||||
'@types/html-to-text':
|
||||
specifier: ^9.0.4
|
||||
version: 9.0.4
|
||||
@@ -240,7 +240,7 @@ devDependencies:
|
||||
version: 6.13.2(eslint@8.55.0)(typescript@5.3.3)
|
||||
'@vitejs/plugin-react-swc':
|
||||
specifier: ^3.5.0
|
||||
version: 3.5.0(vite@4.5.1)
|
||||
version: 3.5.0(vite@5.0.7)
|
||||
autoprefixer:
|
||||
specifier: ^10.4.16
|
||||
version: 10.4.16(postcss@8.4.32)
|
||||
@@ -278,11 +278,11 @@ devDependencies:
|
||||
specifier: ^8.4.32
|
||||
version: 8.4.32
|
||||
prettier:
|
||||
specifier: ^3.1.0
|
||||
version: 3.1.0
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1
|
||||
prettier-plugin-tailwindcss:
|
||||
specifier: ^0.5.9
|
||||
version: 0.5.9(@trivago/prettier-plugin-sort-imports@4.3.0)(prettier@3.1.0)
|
||||
version: 0.5.9(@trivago/prettier-plugin-sort-imports@4.3.0)(prettier@3.1.1)
|
||||
prop-types:
|
||||
specifier: ^15.8.1
|
||||
version: 15.8.1
|
||||
@@ -299,14 +299,14 @@ devDependencies:
|
||||
specifier: ^5.3.3
|
||||
version: 5.3.3
|
||||
vite:
|
||||
specifier: ^4.5.1
|
||||
version: 4.5.1(@types/node@20.10.4)
|
||||
specifier: ^5.0.7
|
||||
version: 5.0.7(@types/node@20.10.4)
|
||||
vite-plugin-top-level-await:
|
||||
specifier: ^1.3.1
|
||||
version: 1.3.1(vite@4.5.1)
|
||||
version: 1.3.1(vite@5.0.7)
|
||||
vite-tsconfig-paths:
|
||||
specifier: ^4.2.2
|
||||
version: 4.2.2(typescript@5.3.3)(vite@4.5.1)
|
||||
version: 4.2.2(typescript@5.3.3)(vite@5.0.7)
|
||||
|
||||
packages:
|
||||
|
||||
@@ -465,8 +465,8 @@ packages:
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/android-arm64@0.18.20:
|
||||
resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==}
|
||||
/@esbuild/android-arm64@0.19.9:
|
||||
resolution: {integrity: sha512-q4cR+6ZD0938R19MyEW3jEsMzbb/1rulLXiNAJQADD/XYp7pT+rOS5JGxvpRW8dFDEfjW4wLgC/3FXIw4zYglQ==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
@@ -474,8 +474,8 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/android-arm@0.18.20:
|
||||
resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==}
|
||||
/@esbuild/android-arm@0.19.9:
|
||||
resolution: {integrity: sha512-jkYjjq7SdsWuNI6b5quymW0oC83NN5FdRPuCbs9HZ02mfVdAP8B8eeqLSYU3gb6OJEaY5CQabtTFbqBf26H3GA==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [arm]
|
||||
os: [android]
|
||||
@@ -483,8 +483,8 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/android-x64@0.18.20:
|
||||
resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==}
|
||||
/@esbuild/android-x64@0.19.9:
|
||||
resolution: {integrity: sha512-KOqoPntWAH6ZxDwx1D6mRntIgZh9KodzgNOy5Ebt9ghzffOk9X2c1sPwtM9P+0eXbefnDhqYfkh5PLP5ULtWFA==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [android]
|
||||
@@ -492,8 +492,8 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/darwin-arm64@0.18.20:
|
||||
resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==}
|
||||
/@esbuild/darwin-arm64@0.19.9:
|
||||
resolution: {integrity: sha512-KBJ9S0AFyLVx2E5D8W0vExqRW01WqRtczUZ8NRu+Pi+87opZn5tL4Y0xT0mA4FtHctd0ZgwNoN639fUUGlNIWw==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
@@ -501,8 +501,8 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/darwin-x64@0.18.20:
|
||||
resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==}
|
||||
/@esbuild/darwin-x64@0.19.9:
|
||||
resolution: {integrity: sha512-vE0VotmNTQaTdX0Q9dOHmMTao6ObjyPm58CHZr1UK7qpNleQyxlFlNCaHsHx6Uqv86VgPmR4o2wdNq3dP1qyDQ==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
@@ -510,8 +510,8 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/freebsd-arm64@0.18.20:
|
||||
resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==}
|
||||
/@esbuild/freebsd-arm64@0.19.9:
|
||||
resolution: {integrity: sha512-uFQyd/o1IjiEk3rUHSwUKkqZwqdvuD8GevWF065eqgYfexcVkxh+IJgwTaGZVu59XczZGcN/YMh9uF1fWD8j1g==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [arm64]
|
||||
os: [freebsd]
|
||||
@@ -519,8 +519,8 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/freebsd-x64@0.18.20:
|
||||
resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==}
|
||||
/@esbuild/freebsd-x64@0.19.9:
|
||||
resolution: {integrity: sha512-WMLgWAtkdTbTu1AWacY7uoj/YtHthgqrqhf1OaEWnZb7PQgpt8eaA/F3LkV0E6K/Lc0cUr/uaVP/49iE4M4asA==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
@@ -528,8 +528,8 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-arm64@0.18.20:
|
||||
resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==}
|
||||
/@esbuild/linux-arm64@0.19.9:
|
||||
resolution: {integrity: sha512-PiPblfe1BjK7WDAKR1Cr9O7VVPqVNpwFcPWgfn4xu0eMemzRp442hXyzF/fSwgrufI66FpHOEJk0yYdPInsmyQ==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
@@ -537,8 +537,8 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-arm@0.18.20:
|
||||
resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==}
|
||||
/@esbuild/linux-arm@0.19.9:
|
||||
resolution: {integrity: sha512-C/ChPohUYoyUaqn1h17m/6yt6OB14hbXvT8EgM1ZWaiiTYz7nWZR0SYmMnB5BzQA4GXl3BgBO1l8MYqL/He3qw==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
@@ -546,8 +546,8 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-ia32@0.18.20:
|
||||
resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==}
|
||||
/@esbuild/linux-ia32@0.19.9:
|
||||
resolution: {integrity: sha512-f37i/0zE0MjDxijkPSQw1CO/7C27Eojqb+r3BbHVxMLkj8GCa78TrBZzvPyA/FNLUMzP3eyHCVkAopkKVja+6Q==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [ia32]
|
||||
os: [linux]
|
||||
@@ -555,8 +555,8 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-loong64@0.18.20:
|
||||
resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==}
|
||||
/@esbuild/linux-loong64@0.19.9:
|
||||
resolution: {integrity: sha512-t6mN147pUIf3t6wUt3FeumoOTPfmv9Cc6DQlsVBpB7eCpLOqQDyWBP1ymXn1lDw4fNUSb/gBcKAmvTP49oIkaA==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [loong64]
|
||||
os: [linux]
|
||||
@@ -564,8 +564,8 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-mips64el@0.18.20:
|
||||
resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==}
|
||||
/@esbuild/linux-mips64el@0.19.9:
|
||||
resolution: {integrity: sha512-jg9fujJTNTQBuDXdmAg1eeJUL4Jds7BklOTkkH80ZgQIoCTdQrDaHYgbFZyeTq8zbY+axgptncko3v9p5hLZtw==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [mips64el]
|
||||
os: [linux]
|
||||
@@ -573,8 +573,8 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-ppc64@0.18.20:
|
||||
resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==}
|
||||
/@esbuild/linux-ppc64@0.19.9:
|
||||
resolution: {integrity: sha512-tkV0xUX0pUUgY4ha7z5BbDS85uI7ABw3V1d0RNTii7E9lbmV8Z37Pup2tsLV46SQWzjOeyDi1Q7Wx2+QM8WaCQ==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
@@ -582,8 +582,8 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-riscv64@0.18.20:
|
||||
resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==}
|
||||
/@esbuild/linux-riscv64@0.19.9:
|
||||
resolution: {integrity: sha512-DfLp8dj91cufgPZDXr9p3FoR++m3ZJ6uIXsXrIvJdOjXVREtXuQCjfMfvmc3LScAVmLjcfloyVtpn43D56JFHg==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
@@ -591,8 +591,8 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-s390x@0.18.20:
|
||||
resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==}
|
||||
/@esbuild/linux-s390x@0.19.9:
|
||||
resolution: {integrity: sha512-zHbglfEdC88KMgCWpOl/zc6dDYJvWGLiUtmPRsr1OgCViu3z5GncvNVdf+6/56O2Ca8jUU+t1BW261V6kp8qdw==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
@@ -600,8 +600,8 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-x64@0.18.20:
|
||||
resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==}
|
||||
/@esbuild/linux-x64@0.19.9:
|
||||
resolution: {integrity: sha512-JUjpystGFFmNrEHQnIVG8hKwvA2DN5o7RqiO1CVX8EN/F/gkCjkUMgVn6hzScpwnJtl2mPR6I9XV1oW8k9O+0A==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
@@ -609,8 +609,8 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/netbsd-x64@0.18.20:
|
||||
resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==}
|
||||
/@esbuild/netbsd-x64@0.19.9:
|
||||
resolution: {integrity: sha512-GThgZPAwOBOsheA2RUlW5UeroRfESwMq/guy8uEe3wJlAOjpOXuSevLRd70NZ37ZrpO6RHGHgEHvPg1h3S1Jug==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [netbsd]
|
||||
@@ -618,8 +618,8 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/openbsd-x64@0.18.20:
|
||||
resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==}
|
||||
/@esbuild/openbsd-x64@0.19.9:
|
||||
resolution: {integrity: sha512-Ki6PlzppaFVbLnD8PtlVQfsYw4S9n3eQl87cqgeIw+O3sRr9IghpfSKY62mggdt1yCSZ8QWvTZ9jo9fjDSg9uw==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [openbsd]
|
||||
@@ -627,8 +627,8 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/sunos-x64@0.18.20:
|
||||
resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==}
|
||||
/@esbuild/sunos-x64@0.19.9:
|
||||
resolution: {integrity: sha512-MLHj7k9hWh4y1ddkBpvRj2b9NCBhfgBt3VpWbHQnXRedVun/hC7sIyTGDGTfsGuXo4ebik2+3ShjcPbhtFwWDw==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [sunos]
|
||||
@@ -636,8 +636,8 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/win32-arm64@0.18.20:
|
||||
resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==}
|
||||
/@esbuild/win32-arm64@0.19.9:
|
||||
resolution: {integrity: sha512-GQoa6OrQ8G08guMFgeXPH7yE/8Dt0IfOGWJSfSH4uafwdC7rWwrfE6P9N8AtPGIjUzdo2+7bN8Xo3qC578olhg==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
@@ -645,8 +645,8 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/win32-ia32@0.18.20:
|
||||
resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==}
|
||||
/@esbuild/win32-ia32@0.19.9:
|
||||
resolution: {integrity: sha512-UOozV7Ntykvr5tSOlGCrqU3NBr3d8JqPes0QWN2WOXfvkWVGRajC+Ym0/Wj88fUgecUCLDdJPDF0Nna2UK3Qtg==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [ia32]
|
||||
os: [win32]
|
||||
@@ -654,8 +654,8 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/win32-x64@0.18.20:
|
||||
resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==}
|
||||
/@esbuild/win32-x64@0.19.9:
|
||||
resolution: {integrity: sha512-oxoQgglOP7RH6iasDrhY+R/3cHrfwIDvRlT4CGChflq6twk8iENeVvMJjmvBb94Ik1Z+93iGO27err7w6l54GQ==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
@@ -1792,6 +1792,110 @@ packages:
|
||||
optional: true
|
||||
dev: true
|
||||
|
||||
/@rollup/rollup-android-arm-eabi@4.7.0:
|
||||
resolution: {integrity: sha512-rGku10pL1StFlFvXX5pEv88KdGW6DHUghsxyP/aRYb9eH+74jTGJ3U0S/rtlsQ4yYq1Hcc7AMkoJOb1xu29Fxw==}
|
||||
cpu: [arm]
|
||||
os: [android]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-android-arm64@4.7.0:
|
||||
resolution: {integrity: sha512-/EBw0cuJ/KVHiU2qyVYUhogXz7W2vXxBzeE9xtVIMC+RyitlY2vvaoysMUqASpkUtoNIHlnKTu/l7mXOPgnKOA==}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-darwin-arm64@4.7.0:
|
||||
resolution: {integrity: sha512-4VXG1bgvClJdbEYYjQ85RkOtwN8sqI3uCxH0HC5w9fKdqzRzgG39K7GAehATGS8jghA7zNoS5CjSKkDEqWmNZg==}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-darwin-x64@4.7.0:
|
||||
resolution: {integrity: sha512-/ImhO+T/RWJ96hUbxiCn2yWI0/MeQZV/aeukQQfhxiSXuZJfyqtdHPUPrc84jxCfXTxbJLmg4q+GBETeb61aNw==}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-linux-arm-gnueabihf@4.7.0:
|
||||
resolution: {integrity: sha512-zhye8POvTyUXlKbfPBVqoHy3t43gIgffY+7qBFqFxNqVtltQLtWeHNAbrMnXiLIfYmxcoL/feuLDote2tx+Qbg==}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-linux-arm64-gnu@4.7.0:
|
||||
resolution: {integrity: sha512-RAdr3OJnUum6Vs83cQmKjxdTg31zJnLLTkjhcFt0auxM6jw00GD6IPFF42uasYPr/wGC6TRm7FsQiJyk0qIEfg==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-linux-arm64-musl@4.7.0:
|
||||
resolution: {integrity: sha512-nhWwYsiJwZGq7SyR3afS3EekEOsEAlrNMpPC4ZDKn5ooYSEjDLe9W/xGvoIV8/F/+HNIY6jY8lIdXjjxfxopXw==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-linux-riscv64-gnu@4.7.0:
|
||||
resolution: {integrity: sha512-rlfy5RnQG1aop1BL/gjdH42M2geMUyVQqd52GJVirqYc787A/XVvl3kQ5NG/43KXgOgE9HXgCaEH05kzQ+hLoA==}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-linux-x64-gnu@4.7.0:
|
||||
resolution: {integrity: sha512-cCkoGlGWfBobdDtiiypxf79q6k3/iRVGu1HVLbD92gWV5WZbmuWJCgRM4x2N6i7ljGn1cGytPn9ZAfS8UwF6vg==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-linux-x64-musl@4.7.0:
|
||||
resolution: {integrity: sha512-R2oBf2p/Arc1m+tWmiWbpHBjEcJnHVnv6bsypu4tcKdrYTpDfl1UT9qTyfkIL1iiii5D4WHxUHCg5X0pzqmxFg==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-win32-arm64-msvc@4.7.0:
|
||||
resolution: {integrity: sha512-CPtgaQL1aaPc80m8SCVEoxFGHxKYIt3zQYC3AccL/SqqiWXblo3pgToHuBwR8eCP2Toa+X1WmTR/QKFMykws7g==}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-win32-ia32-msvc@4.7.0:
|
||||
resolution: {integrity: sha512-pmioUlttNh9GXF5x2CzNa7Z8kmRTyhEzzAC+2WOOapjewMbl+3tGuAnxbwc5JyG8Jsz2+hf/QD/n5VjimOZ63g==}
|
||||
cpu: [ia32]
|
||||
os: [win32]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-win32-x64-msvc@4.7.0:
|
||||
resolution: {integrity: sha512-SeZzC2QhhdBQUm3U0c8+c/P6UlRyBcLL2Xp5KX7z46WXZxzR8RJSIWL9wSUeBTgxog5LTPJuPj0WOT9lvrtP7Q==}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@scure/base@1.1.1:
|
||||
resolution: {integrity: sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==}
|
||||
dev: false
|
||||
@@ -2467,7 +2571,7 @@ packages:
|
||||
'@tiptap/pm': 2.1.13
|
||||
dev: false
|
||||
|
||||
/@trivago/prettier-plugin-sort-imports@4.3.0(prettier@3.1.0):
|
||||
/@trivago/prettier-plugin-sort-imports@4.3.0(prettier@3.1.1):
|
||||
resolution: {integrity: sha512-r3n0onD3BTOVUNPhR4lhVK4/pABGpbA7bW3eumZnYdKaHkf1qEC+Mag6DPbGNuuh0eG8AaYj+YqmVHSiGslaTQ==}
|
||||
peerDependencies:
|
||||
'@vue/compiler-sfc': 3.x
|
||||
@@ -2482,7 +2586,7 @@ packages:
|
||||
'@babel/types': 7.17.0
|
||||
javascript-natural-sort: 0.7.1
|
||||
lodash: 4.17.21
|
||||
prettier: 3.1.0
|
||||
prettier: 3.1.1
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
@@ -2685,8 +2789,8 @@ packages:
|
||||
resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==}
|
||||
dev: true
|
||||
|
||||
/@vidstack/react@1.9.2(@types/react@18.2.43)(react@18.2.0):
|
||||
resolution: {integrity: sha512-DP7D/uUbHml4xQypDygkrEr80FCRtloj8IFvbaH+xZmiADS3ruy+AngaegorpCyMoWTHEiyBV4EuPXrX2v2sZw==}
|
||||
/@vidstack/react@1.9.3(@types/react@18.2.43)(react@18.2.0):
|
||||
resolution: {integrity: sha512-h9QlNAbqnTFcLae8vyIZW/YvM650uaVuPHS/SPBKg/DwKRLNXMGhruJHYc//ywfpL2xrOlt7UCD5ZSOgc5BoBw==}
|
||||
engines: {node: '>=18'}
|
||||
peerDependencies:
|
||||
'@types/react': ^18.0.0
|
||||
@@ -2697,13 +2801,13 @@ packages:
|
||||
react: 18.2.0
|
||||
dev: false
|
||||
|
||||
/@vitejs/plugin-react-swc@3.5.0(vite@4.5.1):
|
||||
/@vitejs/plugin-react-swc@3.5.0(vite@5.0.7):
|
||||
resolution: {integrity: sha512-1PrOvAaDpqlCV+Up8RkAh9qaiUjoDUcjtttyhXDKw53XA6Ve16SOp6cCOpRs8Dj8DqUQs6eTW5YkLcLJjrXAig==}
|
||||
peerDependencies:
|
||||
vite: ^4 || ^5
|
||||
dependencies:
|
||||
'@swc/core': 1.3.100
|
||||
vite: 4.5.1(@types/node@20.10.4)
|
||||
vite: 5.0.7(@types/node@20.10.4)
|
||||
transitivePeerDependencies:
|
||||
- '@swc/helpers'
|
||||
dev: true
|
||||
@@ -2883,7 +2987,7 @@ packages:
|
||||
postcss: ^8.1.0
|
||||
dependencies:
|
||||
browserslist: 4.22.2
|
||||
caniuse-lite: 1.0.30001566
|
||||
caniuse-lite: 1.0.30001568
|
||||
fraction.js: 4.3.7
|
||||
normalize-range: 0.1.2
|
||||
picocolors: 1.0.0
|
||||
@@ -2935,7 +3039,7 @@ packages:
|
||||
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
caniuse-lite: 1.0.30001566
|
||||
caniuse-lite: 1.0.30001568
|
||||
electron-to-chromium: 1.4.609
|
||||
node-releases: 2.0.14
|
||||
update-browserslist-db: 1.0.13(browserslist@4.22.2)
|
||||
@@ -2967,8 +3071,8 @@ packages:
|
||||
engines: {node: '>= 6'}
|
||||
dev: true
|
||||
|
||||
/caniuse-lite@1.0.30001566:
|
||||
resolution: {integrity: sha512-ggIhCsTxmITBAMmK8yZjEhCO5/47jKXPu6Dha/wuCS4JePVL+3uiDEBuhu2aIoT+bqTOR8L76Ip1ARL9xYsEJA==}
|
||||
/caniuse-lite@1.0.30001568:
|
||||
resolution: {integrity: sha512-vSUkH84HontZJ88MiNrOau1EBrCqEQYgkC5gIySiDlpsm8sGVrhU7Kx4V6h0tnqaHzIHZv08HlJIwPbL4XL9+A==}
|
||||
dev: true
|
||||
|
||||
/case-anything@2.1.13:
|
||||
@@ -3384,34 +3488,34 @@ packages:
|
||||
ext: 1.7.0
|
||||
dev: false
|
||||
|
||||
/esbuild@0.18.20:
|
||||
resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==}
|
||||
/esbuild@0.19.9:
|
||||
resolution: {integrity: sha512-U9CHtKSy+EpPsEBa+/A2gMs/h3ylBC0H0KSqIg7tpztHerLi6nrrcoUJAkNCEPumx8yJ+Byic4BVwHgRbN0TBg==}
|
||||
engines: {node: '>=12'}
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
optionalDependencies:
|
||||
'@esbuild/android-arm': 0.18.20
|
||||
'@esbuild/android-arm64': 0.18.20
|
||||
'@esbuild/android-x64': 0.18.20
|
||||
'@esbuild/darwin-arm64': 0.18.20
|
||||
'@esbuild/darwin-x64': 0.18.20
|
||||
'@esbuild/freebsd-arm64': 0.18.20
|
||||
'@esbuild/freebsd-x64': 0.18.20
|
||||
'@esbuild/linux-arm': 0.18.20
|
||||
'@esbuild/linux-arm64': 0.18.20
|
||||
'@esbuild/linux-ia32': 0.18.20
|
||||
'@esbuild/linux-loong64': 0.18.20
|
||||
'@esbuild/linux-mips64el': 0.18.20
|
||||
'@esbuild/linux-ppc64': 0.18.20
|
||||
'@esbuild/linux-riscv64': 0.18.20
|
||||
'@esbuild/linux-s390x': 0.18.20
|
||||
'@esbuild/linux-x64': 0.18.20
|
||||
'@esbuild/netbsd-x64': 0.18.20
|
||||
'@esbuild/openbsd-x64': 0.18.20
|
||||
'@esbuild/sunos-x64': 0.18.20
|
||||
'@esbuild/win32-arm64': 0.18.20
|
||||
'@esbuild/win32-ia32': 0.18.20
|
||||
'@esbuild/win32-x64': 0.18.20
|
||||
'@esbuild/android-arm': 0.19.9
|
||||
'@esbuild/android-arm64': 0.19.9
|
||||
'@esbuild/android-x64': 0.19.9
|
||||
'@esbuild/darwin-arm64': 0.19.9
|
||||
'@esbuild/darwin-x64': 0.19.9
|
||||
'@esbuild/freebsd-arm64': 0.19.9
|
||||
'@esbuild/freebsd-x64': 0.19.9
|
||||
'@esbuild/linux-arm': 0.19.9
|
||||
'@esbuild/linux-arm64': 0.19.9
|
||||
'@esbuild/linux-ia32': 0.19.9
|
||||
'@esbuild/linux-loong64': 0.19.9
|
||||
'@esbuild/linux-mips64el': 0.19.9
|
||||
'@esbuild/linux-ppc64': 0.19.9
|
||||
'@esbuild/linux-riscv64': 0.19.9
|
||||
'@esbuild/linux-s390x': 0.19.9
|
||||
'@esbuild/linux-x64': 0.19.9
|
||||
'@esbuild/netbsd-x64': 0.19.9
|
||||
'@esbuild/openbsd-x64': 0.19.9
|
||||
'@esbuild/sunos-x64': 0.19.9
|
||||
'@esbuild/win32-arm64': 0.19.9
|
||||
'@esbuild/win32-ia32': 0.19.9
|
||||
'@esbuild/win32-x64': 0.19.9
|
||||
dev: true
|
||||
|
||||
/escalade@3.1.1:
|
||||
@@ -4857,7 +4961,7 @@ packages:
|
||||
engines: {node: '>= 0.8.0'}
|
||||
dev: true
|
||||
|
||||
/prettier-plugin-tailwindcss@0.5.9(@trivago/prettier-plugin-sort-imports@4.3.0)(prettier@3.1.0):
|
||||
/prettier-plugin-tailwindcss@0.5.9(@trivago/prettier-plugin-sort-imports@4.3.0)(prettier@3.1.1):
|
||||
resolution: {integrity: sha512-9x3t1s2Cjbut2QiP+O0mDqV3gLXTe2CgRlQDgucopVkUdw26sQi53p/q4qvGxMLBDfk/dcTV57Aa/zYwz9l8Ew==}
|
||||
engines: {node: '>=14.21.3'}
|
||||
peerDependencies:
|
||||
@@ -4906,12 +5010,12 @@ packages:
|
||||
prettier-plugin-twig-melody:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@trivago/prettier-plugin-sort-imports': 4.3.0(prettier@3.1.0)
|
||||
prettier: 3.1.0
|
||||
'@trivago/prettier-plugin-sort-imports': 4.3.0(prettier@3.1.1)
|
||||
prettier: 3.1.1
|
||||
dev: true
|
||||
|
||||
/prettier@3.1.0:
|
||||
resolution: {integrity: sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==}
|
||||
/prettier@3.1.1:
|
||||
resolution: {integrity: sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==}
|
||||
engines: {node: '>=14'}
|
||||
hasBin: true
|
||||
dev: true
|
||||
@@ -5306,11 +5410,24 @@ packages:
|
||||
glob: 7.2.3
|
||||
dev: true
|
||||
|
||||
/rollup@3.29.4:
|
||||
resolution: {integrity: sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==}
|
||||
engines: {node: '>=14.18.0', npm: '>=8.0.0'}
|
||||
/rollup@4.7.0:
|
||||
resolution: {integrity: sha512-7Kw0dUP4BWH78zaZCqF1rPyQ8D5DSU6URG45v1dqS/faNsx9WXyess00uTOZxKr7oR/4TOjO1CPudT8L1UsEgw==}
|
||||
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
|
||||
hasBin: true
|
||||
optionalDependencies:
|
||||
'@rollup/rollup-android-arm-eabi': 4.7.0
|
||||
'@rollup/rollup-android-arm64': 4.7.0
|
||||
'@rollup/rollup-darwin-arm64': 4.7.0
|
||||
'@rollup/rollup-darwin-x64': 4.7.0
|
||||
'@rollup/rollup-linux-arm-gnueabihf': 4.7.0
|
||||
'@rollup/rollup-linux-arm64-gnu': 4.7.0
|
||||
'@rollup/rollup-linux-arm64-musl': 4.7.0
|
||||
'@rollup/rollup-linux-riscv64-gnu': 4.7.0
|
||||
'@rollup/rollup-linux-x64-gnu': 4.7.0
|
||||
'@rollup/rollup-linux-x64-musl': 4.7.0
|
||||
'@rollup/rollup-win32-arm64-msvc': 4.7.0
|
||||
'@rollup/rollup-win32-ia32-msvc': 4.7.0
|
||||
'@rollup/rollup-win32-x64-msvc': 4.7.0
|
||||
fsevents: 2.3.3
|
||||
dev: true
|
||||
|
||||
@@ -5891,7 +6008,7 @@ packages:
|
||||
react-dom: 18.2.0(react@18.2.0)
|
||||
dev: false
|
||||
|
||||
/vite-plugin-top-level-await@1.3.1(vite@4.5.1):
|
||||
/vite-plugin-top-level-await@1.3.1(vite@5.0.7):
|
||||
resolution: {integrity: sha512-55M1h4NAwkrpxPNOJIBzKZFihqLUzIgnElLSmPNPMR2Fn9+JHKaNg3sVX1Fq+VgvuBksQYxiD3OnwQAUu7kaPQ==}
|
||||
peerDependencies:
|
||||
vite: '>=2.8'
|
||||
@@ -5899,13 +6016,13 @@ packages:
|
||||
'@rollup/plugin-virtual': 3.0.2
|
||||
'@swc/core': 1.3.100
|
||||
uuid: 9.0.1
|
||||
vite: 4.5.1(@types/node@20.10.4)
|
||||
vite: 5.0.7(@types/node@20.10.4)
|
||||
transitivePeerDependencies:
|
||||
- '@swc/helpers'
|
||||
- rollup
|
||||
dev: true
|
||||
|
||||
/vite-tsconfig-paths@4.2.2(typescript@5.3.3)(vite@4.5.1):
|
||||
/vite-tsconfig-paths@4.2.2(typescript@5.3.3)(vite@5.0.7):
|
||||
resolution: {integrity: sha512-dq0FjyxHHDnp0uS3P12WEOX2W7NeuLzX9AWP38D7Zw2CTbFErapwQVlCiT5DMJcVWKQ1MMdTe92PZl/rBQ7qcw==}
|
||||
peerDependencies:
|
||||
vite: '*'
|
||||
@@ -5916,18 +6033,18 @@ packages:
|
||||
debug: 4.3.4
|
||||
globrex: 0.1.2
|
||||
tsconfck: 2.1.2(typescript@5.3.3)
|
||||
vite: 4.5.1(@types/node@20.10.4)
|
||||
vite: 5.0.7(@types/node@20.10.4)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
- typescript
|
||||
dev: true
|
||||
|
||||
/vite@4.5.1(@types/node@20.10.4):
|
||||
resolution: {integrity: sha512-AXXFaAJ8yebyqzoNB9fu2pHoo/nWX+xZlaRwoeYUxEqBO+Zj4msE5G+BhGBll9lYEKv9Hfks52PAF2X7qDYXQA==}
|
||||
engines: {node: ^14.18.0 || >=16.0.0}
|
||||
/vite@5.0.7(@types/node@20.10.4):
|
||||
resolution: {integrity: sha512-B4T4rJCDPihrQo2B+h1MbeGL/k/GMAHzhQ8S0LjQ142s6/+l3hHTT095ORvsshj4QCkoWu3Xtmob5mazvakaOw==}
|
||||
engines: {node: ^18.0.0 || >=20.0.0}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
'@types/node': '>= 14'
|
||||
'@types/node': ^18.0.0 || >=20.0.0
|
||||
less: '*'
|
||||
lightningcss: ^1.21.0
|
||||
sass: '*'
|
||||
@@ -5951,9 +6068,9 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@types/node': 20.10.4
|
||||
esbuild: 0.18.20
|
||||
esbuild: 0.19.9
|
||||
postcss: 8.4.32
|
||||
rollup: 3.29.4
|
||||
rollup: 4.7.0
|
||||
optionalDependencies:
|
||||
fsevents: 2.3.3
|
||||
dev: true
|
||||
|
||||
10
src/app.tsx
10
src/app.tsx
@@ -1,4 +1,3 @@
|
||||
import { message } from '@tauri-apps/plugin-dialog';
|
||||
import { fetch } from '@tauri-apps/plugin-http';
|
||||
import { RouterProvider, createBrowserRouter, defer, redirect } from 'react-router-dom';
|
||||
|
||||
@@ -20,15 +19,8 @@ export default function App() {
|
||||
const { ark } = useArk();
|
||||
|
||||
const accountLoader = async () => {
|
||||
try {
|
||||
// redirect to welcome screen if none user exist
|
||||
const totalAccount = await ark.checkAccount();
|
||||
if (totalAccount === 0) return redirect('/auth/welcome');
|
||||
|
||||
if (!ark.account) return redirect('/auth/welcome');
|
||||
return null;
|
||||
} catch (e) {
|
||||
await message(e, { title: 'An unexpected error has occurred', type: 'error' });
|
||||
}
|
||||
};
|
||||
|
||||
const relayLoader = async ({ params }) => {
|
||||
|
||||
@@ -11,9 +11,10 @@ import { useForm } from 'react-hook-form';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { toast } from 'sonner';
|
||||
|
||||
import { AvatarUploader } from '@app/auth/components/avatarUploader';
|
||||
|
||||
import { useArk } from '@libs/ark';
|
||||
|
||||
import { AvatarUploader } from '@shared/avatarUploader';
|
||||
import { ArrowLeftIcon, InfoIcon, LoaderIcon } from '@shared/icons';
|
||||
import { User } from '@shared/user';
|
||||
|
||||
|
||||
@@ -7,9 +7,8 @@ import { twMerge } from 'tailwind-merge';
|
||||
|
||||
import { useDecryptMessage } from '@app/chats/hooks/useDecryptMessage';
|
||||
|
||||
import { formatCreatedAt } from '@utils/createdAt';
|
||||
import { displayNpub, formatCreatedAt } from '@utils/formater';
|
||||
import { useProfile } from '@utils/hooks/useProfile';
|
||||
import { displayNpub } from '@utils/shortenKey';
|
||||
|
||||
export const ChatListItem = memo(function ChatListItem({ event }: { event: NDKEvent }) {
|
||||
const { isLoading, user } = useProfile(event.pubkey);
|
||||
|
||||
@@ -2,8 +2,8 @@ import * as Avatar from '@radix-ui/react-avatar';
|
||||
import { minidenticon } from 'minidenticons';
|
||||
import { useMemo } from 'react';
|
||||
|
||||
import { displayNpub } from '@utils/formater';
|
||||
import { useProfile } from '@utils/hooks/useProfile';
|
||||
import { displayNpub } from '@utils/shortenKey';
|
||||
|
||||
export function MentionPopupItem({ pubkey, embed }: { pubkey: string; embed?: string }) {
|
||||
const { isLoading, user } = useProfile(pubkey, embed);
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useArk } from '@libs/ark';
|
||||
|
||||
import { EditIcon, LoaderIcon } from '@shared/icons';
|
||||
|
||||
import { compactNumber } from '@utils/number';
|
||||
import { compactNumber } from '@utils/formater';
|
||||
|
||||
export function ContactCard() {
|
||||
const { ark } = useArk();
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useArk } from '@libs/ark';
|
||||
|
||||
import { LoaderIcon } from '@shared/icons';
|
||||
|
||||
import { compactNumber } from '@utils/number';
|
||||
import { compactNumber } from '@utils/formater';
|
||||
|
||||
export function PostCard() {
|
||||
const { ark } = useArk();
|
||||
|
||||
@@ -6,8 +6,8 @@ import { useArk } from '@libs/ark';
|
||||
|
||||
import { EditIcon, LoaderIcon } from '@shared/icons';
|
||||
|
||||
import { displayNpub } from '@utils/formater';
|
||||
import { useProfile } from '@utils/hooks/useProfile';
|
||||
import { displayNpub } from '@utils/shortenKey';
|
||||
|
||||
export function ProfileCard() {
|
||||
const { ark } = useArk();
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useArk } from '@libs/ark';
|
||||
|
||||
import { EditIcon, LoaderIcon } from '@shared/icons';
|
||||
|
||||
import { compactNumber } from '@utils/number';
|
||||
import { compactNumber } from '@utils/formater';
|
||||
|
||||
export function RelayCard() {
|
||||
const { ark } = useArk();
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useArk } from '@libs/ark';
|
||||
|
||||
import { LoaderIcon } from '@shared/icons';
|
||||
|
||||
import { compactNumber } from '@utils/number';
|
||||
import { compactNumber } from '@utils/formater';
|
||||
|
||||
export function ZapCard() {
|
||||
const { ark } = useArk();
|
||||
|
||||
@@ -10,8 +10,8 @@ import { useArk } from '@libs/ark';
|
||||
|
||||
import { NIP05 } from '@shared/nip05';
|
||||
|
||||
import { displayNpub } from '@utils/formater';
|
||||
import { useProfile } from '@utils/hooks/useProfile';
|
||||
import { displayNpub } from '@utils/shortenKey';
|
||||
|
||||
export function UserProfile({ pubkey }: { pubkey: string }) {
|
||||
const { ark } = useArk();
|
||||
|
||||
@@ -3,7 +3,7 @@ import { fetch } from '@tauri-apps/plugin-http';
|
||||
|
||||
import { LoaderIcon } from '@shared/icons';
|
||||
|
||||
import { compactNumber } from '@utils/number';
|
||||
import { compactNumber } from '@utils/formater';
|
||||
|
||||
export function UserStats({ pubkey }: { pubkey: string }) {
|
||||
const { status, data } = useQuery({
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
import * as Avatar from '@radix-ui/react-avatar';
|
||||
import { minidenticon } from 'minidenticons';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { twMerge } from 'tailwind-merge';
|
||||
|
||||
import { useArk } from '@libs/ark';
|
||||
|
||||
import { AccountMoreActions } from '@shared/accounts/more';
|
||||
import { NetworkStatusIndicator } from '@shared/networkStatusIndicator';
|
||||
|
||||
import { useNetworkStatus } from '@utils/hooks/useNetworkStatus';
|
||||
import { useProfile } from '@utils/hooks/useProfile';
|
||||
|
||||
export function ActiveAccount() {
|
||||
const { ark } = useArk();
|
||||
const { user } = useProfile(ark.account.pubkey);
|
||||
|
||||
const isOnline = useNetworkStatus();
|
||||
|
||||
const svgURI =
|
||||
'data:image/svg+xml;utf8,' +
|
||||
encodeURIComponent(minidenticon(ark.account.pubkey, 90, 50));
|
||||
@@ -37,7 +40,12 @@ export function ActiveAccount() {
|
||||
/>
|
||||
</Avatar.Fallback>
|
||||
</Avatar.Root>
|
||||
<NetworkStatusIndicator />
|
||||
<span
|
||||
className={twMerge(
|
||||
'absolute bottom-0 right-0 block h-2 w-2 rounded-full ring-2 ring-neutral-100 dark:ring-neutral-900',
|
||||
isOnline ? 'bg-teal-500' : 'bg-red-500'
|
||||
)}
|
||||
/>
|
||||
</Link>
|
||||
<AccountMoreActions />
|
||||
</div>
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
import { message } from '@tauri-apps/plugin-dialog';
|
||||
import { Dispatch, SetStateAction, useState } from 'react';
|
||||
|
||||
import { useArk } from '@libs/ark';
|
||||
|
||||
import { LoaderIcon, PlusIcon } from '@shared/icons';
|
||||
|
||||
export function BannerUploader({
|
||||
setBanner,
|
||||
}: {
|
||||
setBanner: Dispatch<SetStateAction<string>>;
|
||||
}) {
|
||||
const { ark } = useArk();
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
const uploadBanner = async () => {
|
||||
try {
|
||||
// start loading
|
||||
setLoading(true);
|
||||
|
||||
const image = await ark.upload({});
|
||||
|
||||
if (image) {
|
||||
setBanner(image);
|
||||
setLoading(false);
|
||||
}
|
||||
|
||||
return;
|
||||
} catch (e) {
|
||||
// stop loading
|
||||
setLoading(false);
|
||||
await message(`Upload failed, error: ${e}`, { title: 'Lume', type: 'error' });
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => uploadBanner()}
|
||||
className="inline-flex h-full w-full flex-col items-center justify-center"
|
||||
>
|
||||
{loading ? (
|
||||
<LoaderIcon className="h-6 w-6 animate-spin text-neutral-900 dark:text-neutral-100" />
|
||||
) : (
|
||||
<PlusIcon className="h-6 w-6 text-neutral-900 dark:text-neutral-100" />
|
||||
)}
|
||||
<p className="text-sm font-semibold text-neutral-800 dark:text-neutral-200">
|
||||
Add cover
|
||||
</p>
|
||||
</button>
|
||||
);
|
||||
}
|
||||
@@ -4,7 +4,7 @@ import { twMerge } from 'tailwind-merge';
|
||||
import { ActiveAccount } from '@shared/accounts/active';
|
||||
import { ChatsIcon, ComposeIcon, HomeIcon, NwcIcon, RelayIcon } from '@shared/icons';
|
||||
|
||||
import { compactNumber } from '@utils/number';
|
||||
import { compactNumber } from '@utils/formater';
|
||||
|
||||
export function Navigation() {
|
||||
const newMessages = 0;
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
import { twMerge } from 'tailwind-merge';
|
||||
|
||||
import { useNetworkStatus } from '@utils/hooks/useNetworkStatus';
|
||||
|
||||
export function NetworkStatusIndicator() {
|
||||
const isOnline = useNetworkStatus();
|
||||
|
||||
return (
|
||||
<span
|
||||
className={twMerge(
|
||||
'absolute bottom-0 right-0 block h-2 w-2 rounded-full ring-2 ring-neutral-100 dark:ring-neutral-900',
|
||||
isOnline ? 'bg-teal-500' : 'bg-red-500'
|
||||
)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -56,7 +56,7 @@ export const NIP05 = memo(function NIP05({
|
||||
});
|
||||
|
||||
if (status === 'pending') {
|
||||
<div className="h-3 w-20 animate-pulse rounded bg-white/10" />;
|
||||
<div className="h-4 w-4 animate-pulse rounded-full bg-neutral-100 dark:bg-neutral-900" />;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -13,10 +13,9 @@ import { useArk } from '@libs/ark';
|
||||
|
||||
import { CancelIcon, ZapIcon } from '@shared/icons';
|
||||
|
||||
import { compactNumber, displayNpub } from '@utils/formater';
|
||||
import { useProfile } from '@utils/hooks/useProfile';
|
||||
import { sendNativeNotification } from '@utils/notification';
|
||||
import { compactNumber } from '@utils/number';
|
||||
import { displayNpub } from '@utils/shortenKey';
|
||||
|
||||
export function NoteZap({ event }: { event: NDKEvent }) {
|
||||
const { ark } = useArk();
|
||||
|
||||
@@ -8,7 +8,7 @@ import { ChildNote, TextKind } from '@shared/notes';
|
||||
import { User } from '@shared/user';
|
||||
|
||||
import { WIDGET_KIND } from '@utils/constants';
|
||||
import { formatCreatedAt } from '@utils/createdAt';
|
||||
import { formatCreatedAt } from '@utils/formater';
|
||||
import { useWidget } from '@utils/hooks/useWidget';
|
||||
|
||||
export function NotifyNote({ event }: { event: NDKEvent }) {
|
||||
|
||||
@@ -8,9 +8,8 @@ import { RepostIcon } from '@shared/icons';
|
||||
import { NIP05 } from '@shared/nip05';
|
||||
import { MoreActions } from '@shared/notes';
|
||||
|
||||
import { formatCreatedAt } from '@utils/createdAt';
|
||||
import { displayNpub, formatCreatedAt } from '@utils/formater';
|
||||
import { useProfile } from '@utils/hooks/useProfile';
|
||||
import { displayNpub } from '@utils/shortenKey';
|
||||
|
||||
export const User = memo(function User({
|
||||
pubkey,
|
||||
|
||||
@@ -15,3 +15,4 @@ export * from './other/toggleWidgetList';
|
||||
export * from './other/widgetList';
|
||||
export * from './other/addGroupFeeds';
|
||||
export * from './other/addHashtagFeeds';
|
||||
export * from './other/userProfile';
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useArk } from '@libs/ark';
|
||||
|
||||
import { FollowIcon } from '@shared/icons';
|
||||
|
||||
import { shortenKey } from '@utils/shortenKey';
|
||||
import { displayNpub } from '@utils/formater';
|
||||
|
||||
export interface Profile {
|
||||
pubkey: string;
|
||||
@@ -66,7 +66,7 @@ export function NostrBandUserProfile({ data }: { data: Profile }) {
|
||||
{profile.display_name || profile.name}
|
||||
</h3>
|
||||
<p className="max-w-[10rem] truncate text-sm text-neutral-900 dark:text-neutral-100/50">
|
||||
{profile.nip05 || shortenKey(data.pubkey)}
|
||||
{profile.nip05 || displayNpub(data.pubkey, 16)}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,8 +6,8 @@ import { useArk } from '@libs/ark';
|
||||
|
||||
import { NIP05 } from '@shared/nip05';
|
||||
|
||||
import { displayNpub } from '@utils/formater';
|
||||
import { useProfile } from '@utils/hooks/useProfile';
|
||||
import { displayNpub } from '@utils/shortenKey';
|
||||
|
||||
export function UserProfile({ pubkey }: { pubkey: string }) {
|
||||
const { ark } = useArk();
|
||||
@@ -13,8 +13,7 @@ import {
|
||||
UnknownNote,
|
||||
} from '@shared/notes';
|
||||
import { TitleBar } from '@shared/titleBar';
|
||||
import { UserProfile } from '@shared/userProfile';
|
||||
import { WidgetWrapper } from '@shared/widgets';
|
||||
import { UserProfile, WidgetWrapper } from '@shared/widgets';
|
||||
|
||||
import { FETCH_LIMIT } from '@utils/constants';
|
||||
import { Widget } from '@utils/types';
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
export const nHoursAgo = (hrs: number): number =>
|
||||
Math.floor((Date.now() - hrs * 60 * 60 * 1000) / 1000);
|
||||
@@ -1,6 +1,7 @@
|
||||
import dayjs from 'dayjs';
|
||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
import updateLocale from 'dayjs/plugin/updateLocale';
|
||||
import { nip19 } from 'nostr-tools';
|
||||
|
||||
dayjs.extend(relativeTime);
|
||||
dayjs.extend(updateLocale);
|
||||
@@ -18,8 +19,8 @@ dayjs.updateLocale('en', {
|
||||
},
|
||||
});
|
||||
|
||||
export function formatCreatedAt(time, message = false) {
|
||||
let formated;
|
||||
export function formatCreatedAt(time: number, message: boolean = false) {
|
||||
let formated: string;
|
||||
|
||||
const now = dayjs();
|
||||
const inputTime = dayjs.unix(time);
|
||||
@@ -41,3 +42,20 @@ export function formatCreatedAt(time, message = false) {
|
||||
|
||||
return formated;
|
||||
}
|
||||
|
||||
export function displayNpub(pubkey: string, len: number, separator?: string) {
|
||||
const npub = pubkey.startsWith('npub1') ? pubkey : (nip19.npubEncode(pubkey) as string);
|
||||
if (npub.length <= len) return npub;
|
||||
|
||||
separator = separator || ' ... ';
|
||||
|
||||
const sepLen = separator.length,
|
||||
charsToShow = len - sepLen,
|
||||
frontChars = Math.ceil(charsToShow / 2),
|
||||
backChars = Math.floor(charsToShow / 2);
|
||||
|
||||
return npub.substr(0, frontChars) + separator + npub.substr(npub.length - backChars);
|
||||
}
|
||||
|
||||
// convert number to K, M, B, T, etc.
|
||||
export const compactNumber = Intl.NumberFormat('en', { notation: 'compact' });
|
||||
@@ -1,2 +0,0 @@
|
||||
// convert number to K, M, B, T, etc.
|
||||
export const compactNumber = Intl.NumberFormat('en', { notation: 'compact' });
|
||||
@@ -1,20 +0,0 @@
|
||||
import { nip19 } from 'nostr-tools';
|
||||
|
||||
export function shortenKey(pubkey: string) {
|
||||
const npub = nip19.npubEncode(pubkey);
|
||||
return npub.substring(0, 16).concat('...');
|
||||
}
|
||||
|
||||
export function displayNpub(pubkey: string, len: number, separator?: string) {
|
||||
const npub = pubkey.startsWith('npub1') ? pubkey : (nip19.npubEncode(pubkey) as string);
|
||||
if (npub.length <= len) return npub;
|
||||
|
||||
separator = separator || ' ... ';
|
||||
|
||||
const sepLen = separator.length,
|
||||
charsToShow = len - sepLen,
|
||||
frontChars = Math.ceil(charsToShow / 2),
|
||||
backChars = Math.floor(charsToShow / 2);
|
||||
|
||||
return npub.substr(0, frontChars) + separator + npub.substr(npub.length - backChars);
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
import { NDKEvent, NDKTag, NostrEvent } from '@nostr-dev-kit/ndk';
|
||||
|
||||
// convert array to NIP-02 tag list
|
||||
export function arrayToNIP02(arr: string[]) {
|
||||
const nip02_arr = [];
|
||||
arr.forEach((item) => {
|
||||
nip02_arr.push(['p', item]);
|
||||
});
|
||||
|
||||
return nip02_arr;
|
||||
}
|
||||
|
||||
// get repost id from event tags
|
||||
export function getRepostID(tags: NDKTag[]) {
|
||||
let quoteID = null;
|
||||
|
||||
if (tags.length > 0) {
|
||||
if (tags[0][0] === 'e') {
|
||||
quoteID = tags[0][1];
|
||||
} else {
|
||||
quoteID = tags.find((t) => t[0] === 'e')?.[1];
|
||||
}
|
||||
}
|
||||
|
||||
return quoteID;
|
||||
}
|
||||
|
||||
// get random n elements from array
|
||||
export function getMultipleRandom(arr: string[], num: number) {
|
||||
const shuffled = [...arr].sort(() => 0.5 - Math.random());
|
||||
return shuffled.slice(0, num);
|
||||
}
|
||||
|
||||
export function rawEvent(event: NDKEvent) {
|
||||
return {
|
||||
created_at: event.created_at,
|
||||
content: event.content,
|
||||
tags: event.tags,
|
||||
kind: event.kind,
|
||||
pubkey: event.pubkey,
|
||||
id: event.id,
|
||||
sig: event.sig,
|
||||
} as NostrEvent;
|
||||
}
|
||||
16
src/utils/types.d.ts
vendored
16
src/utils/types.d.ts
vendored
@@ -9,28 +9,12 @@ export interface RichContent {
|
||||
notes: string[];
|
||||
}
|
||||
|
||||
export interface DBEvent {
|
||||
id: string;
|
||||
account_id: number;
|
||||
event: string | NDKEvent;
|
||||
author: string;
|
||||
kind: number;
|
||||
root_id: string;
|
||||
reply_id: string;
|
||||
created_at: number;
|
||||
richContent?: RichContent;
|
||||
}
|
||||
|
||||
export interface Account {
|
||||
id: string;
|
||||
pubkey: string;
|
||||
is_active: number;
|
||||
contacts: string[];
|
||||
relayList: NDKRelayList;
|
||||
/**
|
||||
* @deprecated Use contacts instead
|
||||
*/
|
||||
follows: string[];
|
||||
}
|
||||
|
||||
export interface WidgetGroup {
|
||||
|
||||
Reference in New Issue
Block a user