feat: support pinning an article to the top (#720)

This commit is contained in:
runjuu 2023-07-04 12:31:52 -07:00 committed by GitHub
parent a102083a04
commit 5cc6bbe0ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 214 additions and 434 deletions

View File

@ -39,13 +39,13 @@
"@codemirror/state": "6.2.1",
"@codemirror/theme-one-dark": "6.1.2",
"@codemirror/view": "6.14.0",
"@crossbell/connect-kit": "1.4.8",
"@crossbell/connect-kit": "1.4.9",
"@crossbell/contract": "1.4.8",
"@crossbell/indexer": "1.4.8",
"@crossbell/notification": "1.4.8",
"@crossbell/ui": "1.4.8",
"@crossbell/notification": "1.4.9",
"@crossbell/ui": "1.4.9",
"@crossbell/util-hooks": "1.4.4",
"@crossbell/util-metadata": "1.4.0",
"@crossbell/util-metadata": "1.4.9",
"@ddietr/codemirror-themes": "1.4.1",
"@dqbd/tiktoken": "1.0.7",
"@emoji-mart/data": "1.1.2",

View File

@ -33,8 +33,8 @@ dependencies:
specifier: 6.14.0
version: 6.14.0
'@crossbell/connect-kit':
specifier: 1.4.8
version: 1.4.8(@tanstack/react-query@4.29.19)(@types/react@18.2.14)(@wagmi/core@1.3.4)(react-dom@18.2.0)(typescript@5.1.6)(wagmi@1.3.4)(zod@3.21.4)
specifier: 1.4.9
version: 1.4.9(@tanstack/react-query@4.29.19)(@types/react@18.2.14)(@wagmi/core@1.3.4)(react-dom@18.2.0)(typescript@5.1.6)(wagmi@1.3.4)(zod@3.21.4)
'@crossbell/contract':
specifier: 1.4.8
version: 1.4.8(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(zod@3.21.4)
@ -42,17 +42,17 @@ dependencies:
specifier: 1.4.8
version: 1.4.8(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(zod@3.21.4)
'@crossbell/notification':
specifier: 1.4.8
version: 1.4.8(@tanstack/react-query@4.29.19)(@types/react@18.2.14)(immer@10.0.2)(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(wagmi@1.3.4)(zod@3.21.4)
specifier: 1.4.9
version: 1.4.9(@tanstack/react-query@4.29.19)(@types/react@18.2.14)(immer@10.0.2)(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(wagmi@1.3.4)(zod@3.21.4)
'@crossbell/ui':
specifier: 1.4.8
version: 1.4.8(@types/react@18.2.14)(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(zod@3.21.4)
specifier: 1.4.9
version: 1.4.9(@types/react@18.2.14)(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(zod@3.21.4)
'@crossbell/util-hooks':
specifier: 1.4.4
version: 1.4.4(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(zod@3.21.4)
'@crossbell/util-metadata':
specifier: 1.4.0
version: 1.4.0(typescript@5.1.6)(zod@3.21.4)
specifier: 1.4.9
version: 1.4.9(typescript@5.1.6)(zod@3.21.4)
'@ddietr/codemirror-themes':
specifier: 1.4.1
version: 1.4.1
@ -1802,7 +1802,7 @@ packages:
clsx: 1.2.1
react: 18.2.0
react-dom: 18.2.0(react@18.2.0)
swr: 2.1.5(react@18.2.0)
swr: 2.2.0(react@18.2.0)
dev: false
/@braintree/sanitize-url@6.0.2:
@ -2118,25 +2118,25 @@ packages:
- utf-8-validate
dev: false
/@crossbell/connect-kit@1.4.8(@tanstack/react-query@4.29.19)(@types/react@18.2.14)(@wagmi/core@1.3.4)(react-dom@18.2.0)(typescript@5.1.6)(wagmi@1.3.4)(zod@3.21.4):
resolution: {integrity: sha512-7kkktAGLbcQLz5Xm2LMnM78NTWisoPeCz+dHsuv1uM13HC6teHHTx8zW52em6BhzpWRFChjqJmdd1nXRDNkJeA==}
/@crossbell/connect-kit@1.4.9(@tanstack/react-query@4.29.19)(@types/react@18.2.14)(@wagmi/core@1.3.4)(react-dom@18.2.0)(typescript@5.1.6)(wagmi@1.3.4)(zod@3.21.4):
resolution: {integrity: sha512-4cGK2hxFuarKWZTXA5/q194Fyp3omkEsNqBcxoA8lAV2pOhoEqT94I+YaHi4qdwli1da90HcfzgddmZ6kOhuiA==}
peerDependencies:
'@tanstack/react-query': ^4
wagmi: ^1.0.0
dependencies:
'@crossbell/contract': 1.4.8(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(zod@3.21.4)
'@crossbell/indexer': 1.4.8(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(zod@3.21.4)
'@crossbell/react-account': 1.4.8(@tanstack/react-query@4.29.19)(react-dom@18.2.0)(typescript@5.1.6)(zod@3.21.4)
'@crossbell/ui': 1.4.8(@types/react@18.2.14)(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(zod@3.21.4)
'@crossbell/react-account': 1.4.9(@tanstack/react-query@4.29.19)(react-dom@18.2.0)(typescript@5.1.6)(zod@3.21.4)
'@crossbell/ui': 1.4.9(@types/react@18.2.14)(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(zod@3.21.4)
'@crossbell/util-ethers': 1.4.0
'@crossbell/util-hooks': 1.4.4(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(zod@3.21.4)
'@crossbell/util-metadata': 1.4.0(typescript@5.1.6)(zod@3.21.4)
'@crossbell/util-metadata': 1.4.9(typescript@5.1.6)(zod@3.21.4)
'@emotion/react': 11.11.1(@types/react@18.2.14)(react@18.2.0)
'@mantine/core': 6.0.15(@emotion/react@11.11.1)(@mantine/hooks@6.0.14)(@types/react@18.2.14)(react-dom@18.2.0)(react@18.2.0)
'@mantine/hooks': 6.0.14(react@18.2.0)
'@mantine/notifications': 6.0.13(@mantine/core@6.0.15)(@mantine/hooks@6.0.14)(react-dom@18.2.0)(react@18.2.0)
'@mantine/core': 6.0.15(@emotion/react@11.11.1)(@mantine/hooks@6.0.15)(@types/react@18.2.14)(react-dom@18.2.0)(react@18.2.0)
'@mantine/hooks': 6.0.15(react@18.2.0)
'@mantine/notifications': 6.0.13(@mantine/core@6.0.15)(@mantine/hooks@6.0.15)(react-dom@18.2.0)(react@18.2.0)
'@tanstack/react-query': 4.29.19(react-dom@18.2.0)(react@18.2.0)
'@wagmi/connectors': 2.5.0(react@18.2.0)(typescript@5.1.6)(viem@1.2.9)(zod@3.21.4)
'@wagmi/connectors': 2.6.3(@wagmi/chains@1.4.0)(react@18.2.0)(typescript@5.1.6)(viem@1.2.9)(zod@3.21.4)
'@web3modal/ethereum': 2.6.0(@wagmi/core@1.3.4)(viem@1.2.9)
canvas-confetti: 1.6.0
check-password-strength: 2.0.7
@ -2162,7 +2162,6 @@ packages:
- '@wagmi/chains'
- '@wagmi/core'
- bufferutil
- debug
- encoding
- lokijs
- react-dom
@ -2215,18 +2214,18 @@ packages:
resolution: {integrity: sha512-0Yf9+MMTSD+JJkFbNaK/s+kl3CXhr4oq2yj3K0dvheB+e8uykcpM7yomxHie/sr0ushw3G7Ppf5NXYkfH0eiSw==}
dev: false
/@crossbell/notification@1.4.8(@tanstack/react-query@4.29.19)(@types/react@18.2.14)(immer@10.0.2)(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(wagmi@1.3.4)(zod@3.21.4):
resolution: {integrity: sha512-rP0kPqFYzV8VQvoqGNFnMjBdKvV0ZC0eJcPKH9iqPG0kIaFFKXuti/gmeJOE79vHA50aFDuN+FWkIoHY0vzjgw==}
/@crossbell/notification@1.4.9(@tanstack/react-query@4.29.19)(@types/react@18.2.14)(immer@10.0.2)(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(wagmi@1.3.4)(zod@3.21.4):
resolution: {integrity: sha512-k3LSul6uRqc+vzp0OiAUGCqhVOVxr+qrawO1Q/AtleitzwtNDS6TIGh/QiZ/3lTRKA5BYw8GfQP9CRxWboOnxA==}
peerDependencies:
'@tanstack/react-query': ^4
react: ^18
wagmi: ^1.0.0
dependencies:
'@crossbell/indexer': 1.4.8(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(zod@3.21.4)
'@crossbell/react-account': 1.4.8(@tanstack/react-query@4.29.19)(react-dom@18.2.0)(typescript@5.1.6)(zod@3.21.4)
'@crossbell/ui': 1.4.8(@types/react@18.2.14)(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(zod@3.21.4)
'@crossbell/react-account': 1.4.9(@tanstack/react-query@4.29.19)(react-dom@18.2.0)(typescript@5.1.6)(zod@3.21.4)
'@crossbell/ui': 1.4.9(@types/react@18.2.14)(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(zod@3.21.4)
'@crossbell/util-hooks': 1.4.4(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(zod@3.21.4)
'@crossbell/util-metadata': 1.4.0(typescript@5.1.6)(zod@3.21.4)
'@crossbell/util-metadata': 1.4.9(typescript@5.1.6)(zod@3.21.4)
'@tanstack/react-query': 4.29.19(react-dom@18.2.0)(react@18.2.0)
classnames: 2.3.2
dayjs: 1.11.9
@ -2246,8 +2245,8 @@ packages:
- zod
dev: false
/@crossbell/react-account@1.4.8(@tanstack/react-query@4.29.19)(react-dom@18.2.0)(typescript@5.1.6)(zod@3.21.4):
resolution: {integrity: sha512-3iMrU3OuYEjtxu4oXKx6oxFLXGPYmXRynuqT7AgtsTkwhl0tzLprjWHXPNSUyIzm9v2dwhYVIWvA6DUijsE3zQ==}
/@crossbell/react-account@1.4.9(@tanstack/react-query@4.29.19)(react-dom@18.2.0)(typescript@5.1.6)(zod@3.21.4):
resolution: {integrity: sha512-ERdZAZvOhf2lRtdo6f5S5Ftu09/YgbKFRCe4h9/OeTt8ZgVYJ3MFA6Bin/Xi+RGuBZf9VKpbSDrSqZEMlKWOeA==}
peerDependencies:
'@tanstack/react-query': ^4
dependencies:
@ -2255,7 +2254,7 @@ packages:
'@crossbell/indexer': 1.4.8(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(zod@3.21.4)
'@crossbell/util-ethers': 1.4.0
'@crossbell/util-hooks': 1.4.4(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(zod@3.21.4)
'@crossbell/util-metadata': 1.4.0(typescript@5.1.6)(zod@3.21.4)
'@crossbell/util-metadata': 1.4.9(typescript@5.1.6)(zod@3.21.4)
'@tanstack/react-query': 4.29.19(react-dom@18.2.0)(react@18.2.0)
check-password-strength: 2.0.7
crossbell: 1.4.0(typescript@5.1.6)(zod@3.21.4)
@ -2275,15 +2274,15 @@ packages:
- zod
dev: false
/@crossbell/ui@1.4.8(@types/react@18.2.14)(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(zod@3.21.4):
resolution: {integrity: sha512-q4X/lpnRKYaCnLUizZCgxuBVbdD/Jmbg9kUN4Op++6xyVM85twkPJjcJ227CAjxDKftg2nro4DGYTv+D/oY2+w==}
/@crossbell/ui@1.4.9(@types/react@18.2.14)(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(zod@3.21.4):
resolution: {integrity: sha512-36jPrO8aoDoiMjY1bNQE4NDzrEJiwyAQoBjadRWtfHT7qn/hgqb99uJ9BKzhEFddx1p7JSJtOZwQTrcVk82P6w==}
peerDependencies:
react: ^18
react-dom: ^18
dependencies:
'@crossbell/indexer': 1.4.8(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(zod@3.21.4)
'@crossbell/util-hooks': 1.4.4(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(zod@3.21.4)
'@crossbell/util-metadata': 1.4.0(typescript@5.1.6)(zod@3.21.4)
'@crossbell/util-metadata': 1.4.9(typescript@5.1.6)(zod@3.21.4)
'@tanstack/react-query': 4.29.19(react-dom@18.2.0)(react@18.2.0)
classnames: 2.3.2
crossbell: 1.4.0(typescript@5.1.6)(zod@3.21.4)
@ -2324,8 +2323,8 @@ packages:
- zod
dev: false
/@crossbell/util-metadata@1.4.0(typescript@5.1.6)(zod@3.21.4):
resolution: {integrity: sha512-FmfuWZdbCZyMsHje8A/j0GoTkthLjPo0fDXAn42qvFMlTBYzkQ/pOS08i9m/KeMNKssFQ9WcXPdqmYn0ze9hIA==}
/@crossbell/util-metadata@1.4.9(typescript@5.1.6)(zod@3.21.4):
resolution: {integrity: sha512-cSdL4ryeUliRGIDFAIG2MYeu8MxaWlILUhmUZUOXR1yOo97fre5EcuIlHLUOsdp6P/Lbj8qj/S50lzv0ivJrOA==}
dependencies:
'@crossbell/util-ethers': 1.4.0
'@fastify/deepmerge': 1.3.0
@ -2989,12 +2988,6 @@ packages:
resolution: {integrity: sha512-Bu+AMaXNjrpjh41znzHqaz3r2Nr8hHuHZT6V2LBKMhyMl0FgKA62PNYbqnfgmzOhoWZj70Zecisbo4H1rotP5g==}
dev: false
/@floating-ui/dom@1.4.2:
resolution: {integrity: sha512-VKmvHVatWnewmGGy+7Mdy4cTJX71Pli6v/Wjb5RQBuq5wjUYx+Ef+kRThi8qggZqDgD8CogCpqhRoVp3+yQk+g==}
dependencies:
'@floating-ui/core': 1.3.1
dev: false
/@floating-ui/dom@1.4.3:
resolution: {integrity: sha512-nB/68NyaQlcdY22L+Fgd1HERQ7UGv7XFN+tPxwrEfQL4nKtAP/jIZnZtpUlXbtV+VEGHh6W/63Gy2C5biWI3sA==}
dependencies:
@ -3018,7 +3011,7 @@ packages:
react: '>=16.8.0'
react-dom: '>=16.8.0'
dependencies:
'@floating-ui/dom': 1.4.2
'@floating-ui/dom': 1.4.3
react: 18.2.0
react-dom: 18.2.0(react@18.2.0)
dev: false
@ -3046,7 +3039,7 @@ packages:
aria-hidden: 1.2.3
react: 18.2.0
react-dom: 18.2.0(react@18.2.0)
tabbable: 6.1.2
tabbable: 6.2.0
dev: false
/@fortaine/fetch-event-source@3.0.6:
@ -3148,35 +3141,6 @@ packages:
'@jridgewell/resolve-uri': 3.1.0
'@jridgewell/sourcemap-codec': 1.4.14
/@json-rpc-tools/provider@1.7.6:
resolution: {integrity: sha512-z7D3xvJ33UfCGv77n40lbzOYjZKVM3k2+5cV7xS8G6SCvKTzMkhkUYuD/qzQUNT4cG/lv0e9mRToweEEVLVVmA==}
deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
dependencies:
'@json-rpc-tools/utils': 1.7.6
axios: 0.21.4
safe-json-utils: 1.1.1
ws: 7.5.9
transitivePeerDependencies:
- bufferutil
- debug
- utf-8-validate
dev: false
/@json-rpc-tools/types@1.7.6:
resolution: {integrity: sha512-nDSqmyRNEqEK9TZHtM15uNnDljczhCUdBmRhpNZ95bIPKEDQ+nTDmGMFd2lLin3upc5h2VVVd9tkTDdbXUhDIQ==}
deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
dependencies:
keyvaluestorage-interface: 1.0.0
dev: false
/@json-rpc-tools/utils@1.7.6:
resolution: {integrity: sha512-HjA8x/U/Q78HRRe19yh8HVKoZ+Iaoo3YZjakJYxR+rw52NHo6jM+VE9b8+7ygkCFXl/EHID5wh/MkXaE/jGyYw==}
deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
dependencies:
'@json-rpc-tools/types': 1.7.6
'@pedrouid/environment': 1.0.1
dev: false
/@ledgerhq/connect-kit-loader@1.1.0:
resolution: {integrity: sha512-HUy12FEczoWY2FPubnsm1uOA8tkVWc0j90i47suThV3C9NL2xx69ZAIEU3Ytzs2bwLek9S1Q2S1VQJvA+3Ygkg==}
dev: false
@ -3292,27 +3256,6 @@ packages:
'@lit-labs/ssr-dom-shim': 1.1.1
dev: false
/@mantine/core@6.0.15(@emotion/react@11.11.1)(@mantine/hooks@6.0.14)(@types/react@18.2.14)(react-dom@18.2.0)(react@18.2.0):
resolution: {integrity: sha512-CN2UV2RXumxac75cWgUPMcHiE36T4ciIpFf20JwpazshnwFNu7scvy6GJDwUouf0zTBLnPMAD1S/B4mIRc3aQw==}
peerDependencies:
'@mantine/hooks': 6.0.15
react: '>=16.8.0'
react-dom: '>=16.8.0'
dependencies:
'@floating-ui/react': 0.19.2(react-dom@18.2.0)(react@18.2.0)
'@mantine/hooks': 6.0.14(react@18.2.0)
'@mantine/styles': 6.0.15(@emotion/react@11.11.1)(react-dom@18.2.0)(react@18.2.0)
'@mantine/utils': 6.0.15(react@18.2.0)
'@radix-ui/react-scroll-area': 1.0.2(react-dom@18.2.0)(react@18.2.0)
react: 18.2.0
react-dom: 18.2.0(react@18.2.0)
react-remove-scroll: 2.5.6(@types/react@18.2.14)(react@18.2.0)
react-textarea-autosize: 8.3.4(@types/react@18.2.14)(react@18.2.0)
transitivePeerDependencies:
- '@emotion/react'
- '@types/react'
dev: false
/@mantine/core@6.0.15(@emotion/react@11.11.1)(@mantine/hooks@6.0.15)(@types/react@18.2.14)(react-dom@18.2.0)(react@18.2.0):
resolution: {integrity: sha512-CN2UV2RXumxac75cWgUPMcHiE36T4ciIpFf20JwpazshnwFNu7scvy6GJDwUouf0zTBLnPMAD1S/B4mIRc3aQw==}
peerDependencies:
@ -3349,14 +3292,6 @@ packages:
react: 18.2.0
dev: false
/@mantine/hooks@6.0.14(react@18.2.0):
resolution: {integrity: sha512-cBGdTSdBDLcPScoeI12DCWFVzmT4tX+DmI9s+MOBm4IdhF4ogkLbbRgKosFbaBWNKx9WzYAUiQR/tUI5dTkJPQ==}
peerDependencies:
react: '>=16.8.0'
dependencies:
react: 18.2.0
dev: false
/@mantine/hooks@6.0.15(react@18.2.0):
resolution: {integrity: sha512-2CtNKw/tdiXjeseldrg1J2jy+WKrwiCY/J6UMkZqlZ8aM0j3vFVl5cnyn46i5KzbdGqNjW01aihfJJfkeQh4oQ==}
peerDependencies:
@ -3365,7 +3300,7 @@ packages:
react: 18.2.0
dev: false
/@mantine/notifications@6.0.13(@mantine/core@6.0.15)(@mantine/hooks@6.0.14)(react-dom@18.2.0)(react@18.2.0):
/@mantine/notifications@6.0.13(@mantine/core@6.0.15)(@mantine/hooks@6.0.15)(react-dom@18.2.0)(react@18.2.0):
resolution: {integrity: sha512-d3BxNN7LEblvAsui0yGiI1q1Ji2OlhFLfe/cLdj7s5VMOtiKYRV14dICJxe4Jn/o+8Gg+UKw+aO/ZiQoT+BGIw==}
peerDependencies:
'@mantine/core': 6.0.13
@ -3373,8 +3308,8 @@ packages:
react: '>=16.8.0'
react-dom: '>=16.8.0'
dependencies:
'@mantine/core': 6.0.15(@emotion/react@11.11.1)(@mantine/hooks@6.0.14)(@types/react@18.2.14)(react-dom@18.2.0)(react@18.2.0)
'@mantine/hooks': 6.0.14(react@18.2.0)
'@mantine/core': 6.0.15(@emotion/react@11.11.1)(@mantine/hooks@6.0.15)(@types/react@18.2.14)(react-dom@18.2.0)(react@18.2.0)
'@mantine/hooks': 6.0.15(react@18.2.0)
'@mantine/utils': 6.0.13(react@18.2.0)
react: 18.2.0
react-dom: 18.2.0(react@18.2.0)
@ -3664,10 +3599,6 @@ packages:
'@nodelib/fs.scandir': 2.1.5
fastq: 1.15.0
/@pedrouid/environment@1.0.1:
resolution: {integrity: sha512-HaW78NszGzRZd9SeoI3JD11JqY+lubnaOx7Pewj5pfjqWXOEATpeKIFb9Z4t2WBUK2iryiXX3lzWwmYWgUL0Ug==}
dev: false
/@pkgr/utils@2.4.1:
resolution: {integrity: sha512-JOqwkgFEyi+OROIyq7l4Jy28h/WwhDnG/cPkXG2Z1iFbubB6jsHW1NDvmyOzTBxHr3yg68YGirmh1JUgMqa+9w==}
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
@ -4511,41 +4442,6 @@ packages:
typescript: 5.1.6
dev: false
/@wagmi/connectors@2.5.0(react@18.2.0)(typescript@5.1.6)(viem@1.2.9)(zod@3.21.4):
resolution: {integrity: sha512-qJ9rfn6yN4i/jtlknL5fOa89L+lN8/Y4O+TE/AWVGwYW65qvs8DTY1gDbgMhehty+Hj0btZz//N3cSHX1NUQ1A==}
peerDependencies:
'@wagmi/chains': '>=1.3.0'
typescript: '>=5.0.4'
viem: '>=0.3.35'
peerDependenciesMeta:
'@wagmi/chains':
optional: true
typescript:
optional: true
dependencies:
'@coinbase/wallet-sdk': 3.7.1
'@ledgerhq/connect-kit-loader': 1.1.0
'@safe-global/safe-apps-provider': 0.17.1(typescript@5.1.6)(zod@3.21.4)
'@safe-global/safe-apps-sdk': 8.0.0(typescript@5.1.6)(zod@3.21.4)
'@walletconnect/ethereum-provider': 2.8.1(@walletconnect/modal@2.5.2)
'@walletconnect/legacy-provider': 2.0.0
'@walletconnect/modal': 2.5.2(react@18.2.0)
abitype: 0.8.7(typescript@5.1.6)(zod@3.21.4)
eventemitter3: 4.0.7
typescript: 5.1.6
viem: 1.2.9(typescript@5.1.6)(zod@3.21.4)
transitivePeerDependencies:
- '@react-native-async-storage/async-storage'
- bufferutil
- debug
- encoding
- lokijs
- react
- supports-color
- utf-8-validate
- zod
dev: false
/@wagmi/connectors@2.6.3(@wagmi/chains@1.4.0)(react@18.2.0)(typescript@5.1.6)(viem@1.2.9)(zod@3.21.4):
resolution: {integrity: sha512-tloHzZq/7OCoOnveNdouhwv0pB1H0lB8+wqurColJsQdMKBTKn5xodl0pCkHjcKHZdELyIcuTINoq9aDzt30sA==}
peerDependencies:
@ -4609,32 +4505,6 @@ packages:
- zod
dev: false
/@walletconnect/core@2.8.1:
resolution: {integrity: sha512-mN9Zkdl/NeThntK8cydDoQOW6jUEpOeFgYR1RCKPLH51VQwlbdSgvvQIeanSQXEY4U7AM3x8cs1sxqMomIfRQg==}
dependencies:
'@walletconnect/heartbeat': 1.2.1
'@walletconnect/jsonrpc-provider': 1.0.13
'@walletconnect/jsonrpc-types': 1.0.3
'@walletconnect/jsonrpc-utils': 1.0.8
'@walletconnect/jsonrpc-ws-connection': 1.0.11
'@walletconnect/keyvaluestorage': 1.0.2
'@walletconnect/logger': 2.0.1
'@walletconnect/relay-api': 1.0.9
'@walletconnect/relay-auth': 1.0.4
'@walletconnect/safe-json': 1.0.2
'@walletconnect/time': 1.0.2
'@walletconnect/types': 2.8.1
'@walletconnect/utils': 2.8.1
events: 3.3.0
lodash.isequal: 4.5.0
uint8arrays: 3.1.1
transitivePeerDependencies:
- '@react-native-async-storage/async-storage'
- bufferutil
- lokijs
- utf-8-validate
dev: false
/@walletconnect/core@2.8.6:
resolution: {integrity: sha512-rnSqm1KJLcww/v6+UH8JeibQkJ3EKgyUDPfEK0stSEkrIUIcXaFlq3Et8S+vgV8bPhI0MVUhAhFL5OJZ3t2ryg==}
dependencies:
@ -4686,33 +4556,6 @@ packages:
tslib: 1.14.1
dev: false
/@walletconnect/ethereum-provider@2.8.1(@walletconnect/modal@2.5.2):
resolution: {integrity: sha512-YlF8CCiFTSEZRyANIBsop/U+t+d1Z1/UXXoE9+iwjSGKJsaym6PgBLPb2d8XdmS/qR6Tcx7lVodTp4cVtezKnA==}
peerDependencies:
'@walletconnect/modal': '>=2'
peerDependenciesMeta:
'@walletconnect/modal':
optional: true
dependencies:
'@walletconnect/jsonrpc-http-connection': 1.0.7
'@walletconnect/jsonrpc-provider': 1.0.13
'@walletconnect/jsonrpc-types': 1.0.3
'@walletconnect/jsonrpc-utils': 1.0.8
'@walletconnect/modal': 2.5.2(react@18.2.0)
'@walletconnect/sign-client': 2.8.1
'@walletconnect/types': 2.8.1
'@walletconnect/universal-provider': 2.8.1
'@walletconnect/utils': 2.8.1
events: 3.3.0
transitivePeerDependencies:
- '@react-native-async-storage/async-storage'
- bufferutil
- debug
- encoding
- lokijs
- utf-8-validate
dev: false
/@walletconnect/ethereum-provider@2.8.6(@walletconnect/modal@2.5.9):
resolution: {integrity: sha512-wUvJEsXTLmMihrOhQxAs1k9hrWEOT03QBn54P9r9GpJbJ1zEfIjQaXFfi8uup6gldhH+vN38PsbOiLyv/6d3qQ==}
peerDependencies:
@ -4788,19 +4631,6 @@ packages:
tslib: 1.14.1
dev: false
/@walletconnect/jsonrpc-ws-connection@1.0.11:
resolution: {integrity: sha512-TiFJ6saasKXD+PwGkm5ZGSw0837nc6EeFmurSPgIT/NofnOV4Tv7CVJqGQN0rQYoJUSYu21cwHNYaFkzNpUN+w==}
dependencies:
'@walletconnect/jsonrpc-utils': 1.0.8
'@walletconnect/safe-json': 1.0.2
events: 3.3.0
tslib: 1.14.1
ws: 7.5.9
transitivePeerDependencies:
- bufferutil
- utf-8-validate
dev: false
/@walletconnect/jsonrpc-ws-connection@1.0.12:
resolution: {integrity: sha512-HAcadga3Qjt1Cqy+qXEW6zjaCs8uJGdGQrqltzl3OjiK4epGZRdvSzTe63P+t/3z+D2wG+ffEPn0GVcDozmN1w==}
dependencies:
@ -4893,15 +4723,6 @@ packages:
tslib: 1.14.1
dev: false
/@walletconnect/modal-core@2.5.2(react@18.2.0):
resolution: {integrity: sha512-meYjouZxAik0peyhxDUTRY77uu/r4tLe1QoJp/Ra3brHD0i93uwX5U8RlBNDLGQhLGIraZl6xNANcxHGRHFSuQ==}
dependencies:
buffer: 6.0.3
valtio: 1.10.5(react@18.2.0)
transitivePeerDependencies:
- react
dev: false
/@walletconnect/modal-core@2.5.9(react@18.2.0):
resolution: {integrity: sha512-isIebwF9hOknGouhS/Ob4YJ9Sa/tqNYG2v6Ua9EkCqIoLimepkG5eC53tslUWW29SLSfQ9qqBNG2+iE7yQXqgw==}
dependencies:
@ -4911,17 +4732,6 @@ packages:
- react
dev: false
/@walletconnect/modal-ui@2.5.2(react@18.2.0):
resolution: {integrity: sha512-ZbHsFP+LWvyJ3wwJf3nJKkwqMOHpJ5ECnAZgopMX+hp/bS+4JEeCzUy1StmzyriT6RImLFRQkI6Zas/NetaUnw==}
dependencies:
'@walletconnect/modal-core': 2.5.2(react@18.2.0)
lit: 2.7.5
motion: 10.16.2
qrcode: 1.5.3
transitivePeerDependencies:
- react
dev: false
/@walletconnect/modal-ui@2.5.9(react@18.2.0):
resolution: {integrity: sha512-nfBaAT9Ls7RZTBBgAq+Nt/3AoUcinIJ9bcq5UHXTV3lOPu/qCKmUC/0HY3GvUK8ykabUAsjr0OAGmcqkB91qug==}
dependencies:
@ -4933,15 +4743,6 @@ packages:
- react
dev: false
/@walletconnect/modal@2.5.2(react@18.2.0):
resolution: {integrity: sha512-vMLAQFjbMeXZ3+ojb+0OmMRpXCg92vCWJS2t3pF6XyxZrp/qxB9W87HwP7q6ecJtePM1Snil5QlpXipprqzr9g==}
dependencies:
'@walletconnect/modal-core': 2.5.2(react@18.2.0)
'@walletconnect/modal-ui': 2.5.2(react@18.2.0)
transitivePeerDependencies:
- react
dev: false
/@walletconnect/modal@2.5.9(react@18.2.0):
resolution: {integrity: sha512-Zs2RvPwbBNRdBhb50FuJCxi3FJltt1KSpI7odjU/x9GTpTOcSOkmR66PBCy2JvNA0+ztnS1Xs0LVEr3lu7/Jzw==}
dependencies:
@ -4984,25 +4785,6 @@ packages:
tslib: 1.14.1
dev: false
/@walletconnect/sign-client@2.8.1:
resolution: {integrity: sha512-6DbpjP9BED2YZOZdpVgYo0HwPBV7k99imnsdMFrTn16EFAxhuYP0/qPwum9d072oNMGWJSA6d4rzc8FHNtHsCA==}
dependencies:
'@walletconnect/core': 2.8.1
'@walletconnect/events': 1.0.1
'@walletconnect/heartbeat': 1.2.1
'@walletconnect/jsonrpc-utils': 1.0.8
'@walletconnect/logger': 2.0.1
'@walletconnect/time': 1.0.2
'@walletconnect/types': 2.8.1
'@walletconnect/utils': 2.8.1
events: 3.3.0
transitivePeerDependencies:
- '@react-native-async-storage/async-storage'
- bufferutil
- lokijs
- utf-8-validate
dev: false
/@walletconnect/sign-client@2.8.6:
resolution: {integrity: sha512-rOFTKTHP7oJfXgYHX7+SdB8VbcsEE3ZFG/bMdmZboWaBim1mrY3vUyDdKrNr0VgI3AwBiEQezQDfKxBX0pMSQQ==}
dependencies:
@ -5028,20 +4810,6 @@ packages:
tslib: 1.14.1
dev: false
/@walletconnect/types@2.8.1:
resolution: {integrity: sha512-MLISp85b+27vVkm3Wkud+eYCwySXCdOrmn0yQCSN6DnRrrunrD05ksz4CXGP7h2oXUvvXPDt/6lXBf1B4AfqrA==}
dependencies:
'@walletconnect/events': 1.0.1
'@walletconnect/heartbeat': 1.2.1
'@walletconnect/jsonrpc-types': 1.0.3
'@walletconnect/keyvaluestorage': 1.0.2
'@walletconnect/logger': 2.0.1
events: 3.3.0
transitivePeerDependencies:
- '@react-native-async-storage/async-storage'
- lokijs
dev: false
/@walletconnect/types@2.8.6:
resolution: {integrity: sha512-Z/PFa3W1XdxeTcCtdR6lUsFgZfU/69wWJBPyclPwn7cu1+eriuCr6XZXQpJjib3flU+HnwHiXeUuqZaheehPxw==}
dependencies:
@ -5056,28 +4824,6 @@ packages:
- lokijs
dev: false
/@walletconnect/universal-provider@2.8.1:
resolution: {integrity: sha512-6shgE4PM/S+GEh9oTWMloHZlt2BLsCitRn9tBh2Vf+jZiGlug3WNm+tBc/Fo6ILyHuzeYPbkzCM67AxcutOHGQ==}
dependencies:
'@walletconnect/jsonrpc-http-connection': 1.0.7
'@walletconnect/jsonrpc-provider': 1.0.13
'@walletconnect/jsonrpc-types': 1.0.3
'@walletconnect/jsonrpc-utils': 1.0.8
'@walletconnect/logger': 2.0.1
'@walletconnect/sign-client': 2.8.1
'@walletconnect/types': 2.8.1
'@walletconnect/utils': 2.8.1
eip1193-provider: 1.0.1
events: 3.3.0
transitivePeerDependencies:
- '@react-native-async-storage/async-storage'
- bufferutil
- debug
- encoding
- lokijs
- utf-8-validate
dev: false
/@walletconnect/universal-provider@2.8.6:
resolution: {integrity: sha512-ln1RVv8+oHu9enOJ/oVkjiarneB+4vJCk16znOklIN2JtDHwB8iObDHlQH3UE6ynNTw1iRvaGuPR4g+YdIfB6w==}
dependencies:
@ -5098,28 +4844,6 @@ packages:
- utf-8-validate
dev: false
/@walletconnect/utils@2.8.1:
resolution: {integrity: sha512-d6p9OX3v70m6ijp+j4qvqiQZQU1vbEHN48G8HqXasyro3Z+N8vtcB5/gV4pTYsbWgLSDtPHj49mzbWQ0LdIdTw==}
dependencies:
'@stablelib/chacha20poly1305': 1.0.1
'@stablelib/hkdf': 1.0.1
'@stablelib/random': 1.0.2
'@stablelib/sha256': 1.0.1
'@stablelib/x25519': 1.0.3
'@walletconnect/relay-api': 1.0.9
'@walletconnect/safe-json': 1.0.2
'@walletconnect/time': 1.0.2
'@walletconnect/types': 2.8.1
'@walletconnect/window-getters': 1.0.1
'@walletconnect/window-metadata': 1.0.1
detect-browser: 5.3.0
query-string: 7.1.3
uint8arrays: 3.1.1
transitivePeerDependencies:
- '@react-native-async-storage/async-storage'
- lokijs
dev: false
/@walletconnect/utils@2.8.6:
resolution: {integrity: sha512-wcy6e5+COYo7tfNnW8YqidnATdJDIW6vDiWWE7A1F78Sl/VflkaevB9cIgyn8eLdxC1SxXgGoeC2oLP90nnHJg==}
dependencies:
@ -5404,7 +5128,7 @@ packages:
react: 18.2.0
resize-observer-polyfill: 1.5.1
screenfull: 5.2.0
tslib: 2.5.3
tslib: 2.6.0
dev: false
/ajv-formats@2.1.1(ajv@8.12.0):
@ -5535,7 +5259,7 @@ packages:
resolution: {integrity: sha512-xcLxITLe2HYa1cnYnwCjkOO1PqUHQpozB8x9AR0OgWN2woOBi5kSDVxKfd0b7sb1hw5qFeJhXm9H1nu3xSfLeQ==}
engines: {node: '>=10'}
dependencies:
tslib: 2.5.3
tslib: 2.6.0
dev: false
/aria-query@5.3.0:
@ -5674,7 +5398,7 @@ packages:
postcss: ^8.1.0
dependencies:
browserslist: 4.21.9
caniuse-lite: 1.0.30001507
caniuse-lite: 1.0.30001511
fraction.js: 4.2.0
normalize-range: 0.1.2
picocolors: 1.0.0
@ -5691,14 +5415,6 @@ packages:
engines: {node: '>=4'}
dev: true
/axios@0.21.4:
resolution: {integrity: sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==}
dependencies:
follow-redirects: 1.15.2
transitivePeerDependencies:
- debug
dev: false
/axios@0.26.1:
resolution: {integrity: sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==}
dependencies:
@ -5899,7 +5615,7 @@ packages:
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true
dependencies:
caniuse-lite: 1.0.30001507
caniuse-lite: 1.0.30001511
electron-to-chromium: 1.4.433
node-releases: 2.0.12
update-browserslist-db: 1.0.11(browserslist@4.21.9)
@ -5978,9 +5694,6 @@ packages:
engines: {node: '>=10'}
dev: false
/caniuse-lite@1.0.30001507:
resolution: {integrity: sha512-SFpUDoSLCaE5XYL2jfqe9ova/pbQHEmbheDf5r4diNwbAgR3qxM9NQtfsiSscjqoya5K7kFcHPUQ+VsUkIJR4A==}
/caniuse-lite@1.0.30001511:
resolution: {integrity: sha512-NaWPJawcoedlghN4P7bDNeADD7K+rZaY6V8ZcME7PkEZo/nfOg+lnrUgRWiKbNxcQ4/toFKSxnS4WdbyPZnKkw==}
@ -6475,7 +6188,7 @@ packages:
cspell-glob: 6.31.1
cspell-io: 6.31.1
cspell-lib: 6.31.1
fast-glob: 3.2.12
fast-glob: 3.3.0
fast-json-stable-stringify: 2.1.0
file-entry-cache: 6.0.1
get-stdin: 8.0.0
@ -7078,16 +6791,6 @@ packages:
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
dev: true
/eip1193-provider@1.0.1:
resolution: {integrity: sha512-kSuqwQ26d7CzuS/t3yRXo2Su2cVH0QfvyKbr2H7Be7O5YDyIq4hQGCNTo5wRdP07bt+E2R/8nPCzey4ojBHf7g==}
dependencies:
'@json-rpc-tools/provider': 1.7.6
transitivePeerDependencies:
- bufferutil
- debug
- utf-8-validate
dev: false
/eip1193-types@0.2.1:
resolution: {integrity: sha512-n2tTVuhC97/wIvVwYzzhE/hY64wATs4wJDGqZsoLGXep8DL+r23wsgqU/oOSoce/k/Qcyk5xqIpK7ZVtYog+Eg==}
engines: {node: '>=14.19.0'}
@ -7468,7 +7171,7 @@ packages:
doctrine: 2.1.0
eslint: 8.44.0
estraverse: 5.3.0
jsx-ast-utils: 3.3.3
jsx-ast-utils: 3.3.4
minimatch: 3.1.2
object.entries: 1.1.6
object.fromentries: 2.0.6
@ -7737,6 +7440,7 @@ packages:
glob-parent: 5.1.2
merge2: 1.4.1
micromatch: 4.0.5
dev: true
/fast-glob@3.3.0:
resolution: {integrity: sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==}
@ -7747,7 +7451,6 @@ packages:
glob-parent: 5.1.2
merge2: 1.4.1
micromatch: 4.0.5
dev: true
/fast-json-stable-stringify@2.1.0:
resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==}
@ -7792,7 +7495,7 @@ packages:
resolution: {integrity: sha512-QlZ5yJC0VxHxQQsQhXvBaC7VRJ2uaxTf+Tfpu4Z/OcVQJVpZO+DGU0rkoVW5ce2SccxugvpBJoMvUs59iILYdw==}
engines: {node: '>= 12'}
dependencies:
tslib: 2.5.3
tslib: 2.6.0
dev: false
/file-uri-to-path@1.0.0:
@ -9121,14 +8824,6 @@ packages:
resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==}
engines: {node: '>=0.10.0'}
/jsx-ast-utils@3.3.3:
resolution: {integrity: sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw==}
engines: {node: '>=4.0'}
dependencies:
array-includes: 3.1.6
object.assign: 4.1.4
dev: true
/jsx-ast-utils@3.3.4:
resolution: {integrity: sha512-fX2TVdCViod6HwKEtSWGHs57oFhVfCMwieb9PuRDgjDPh5XeqJiHFFFJCHxU5cnTc3Bu/GRL+kPiFmw8XWOfKw==}
engines: {node: '>=4.0'}
@ -11279,7 +10974,7 @@ packages:
react: 18.2.0
react-remove-scroll-bar: 2.3.4(@types/react@18.2.14)(react@18.2.0)
react-style-singleton: 2.2.1(@types/react@18.2.14)(react@18.2.0)
tslib: 2.5.3
tslib: 2.6.0
use-callback-ref: 1.3.0(@types/react@18.2.14)(react@18.2.0)
use-sidecar: 1.1.2(@types/react@18.2.14)(react@18.2.0)
dev: false
@ -11867,7 +11562,7 @@ packages:
/rxjs@7.8.1:
resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==}
dependencies:
tslib: 2.5.3
tslib: 2.6.0
/sade@1.8.1:
resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==}
@ -12408,15 +12103,6 @@ packages:
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
engines: {node: '>= 0.4'}
/swr@2.1.5(react@18.2.0):
resolution: {integrity: sha512-/OhfZMcEpuz77KavXST5q6XE9nrOBOVcBLWjMT+oAE/kQHyE3PASrevXCtQDZ8aamntOfFkbVJp7Il9tNBQWrw==}
peerDependencies:
react: ^16.11.0 || ^17.0.0 || ^18.0.0
dependencies:
react: 18.2.0
use-sync-external-store: 1.2.0(react@18.2.0)
dev: false
/swr@2.2.0(react@18.2.0):
resolution: {integrity: sha512-AjqHOv2lAhkuUdIiBu9xbuettzAzWXmCEcLONNKJRba87WAefz8Ca9d6ds/SzrPc235n1IxWYdhJ2zF3MNUaoQ==}
peerDependencies:
@ -12438,10 +12124,6 @@ packages:
tslib: 2.6.0
dev: true
/tabbable@6.1.2:
resolution: {integrity: sha512-qCN98uP7i9z0fIS4amQ5zbGBOq+OSigYeGvPy7NDk8Y9yncqDZ9pRPgfsc2PJIVM9RrJj7GIfuRgmjoUU9zTHQ==}
dev: false
/tabbable@6.2.0:
resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==}
dev: false
@ -12480,7 +12162,7 @@ packages:
chokidar: 3.5.3
didyoumean: 1.2.2
dlv: 1.1.3
fast-glob: 3.2.12
fast-glob: 3.3.0
glob-parent: 6.0.2
is-glob: 4.0.3
jiti: 1.18.2
@ -12717,9 +12399,6 @@ packages:
/tslib@1.14.1:
resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==}
/tslib@2.5.3:
resolution: {integrity: sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==}
/tslib@2.6.0:
resolution: {integrity: sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==}
@ -13094,20 +12773,6 @@ packages:
sade: 1.8.1
dev: false
/valtio@1.10.5(react@18.2.0):
resolution: {integrity: sha512-jTp0k63VXf4r5hPoaC6a6LCG4POkVSh629WLi1+d5PlajLsbynTMd7qAgEiOSPxzoX5iNvbN7iZ/k/g29wrNiQ==}
engines: {node: '>=12.20.0'}
peerDependencies:
react: '>=16.8'
peerDependenciesMeta:
react:
optional: true
dependencies:
proxy-compare: 2.5.1
react: 18.2.0
use-sync-external-store: 1.2.0(react@18.2.0)
dev: false
/valtio@1.10.6(react@18.2.0):
resolution: {integrity: sha512-SxN1bHUmdhW6V8qsQTpCgJEwp7uHbntuH0S9cdLQtiohuevwBksbpXjwj5uDMA7bLwg1WKyq9sEpZrx3TIMrkA==}
engines: {node: '>=12.20.0'}

View File

@ -20,7 +20,7 @@ import { readFiles } from "~/lib/read-files"
import { setStorage } from "~/lib/storage"
import { ExpandedNote, PageVisibilityEnum } from "~/lib/types"
import { cn } from "~/lib/utils"
import { useGetPagesBySite } from "~/queries/page"
import { useGetPagesBySite, usePinnedPage } from "~/queries/page"
import { useGetSite } from "~/queries/site"
import { Button } from "../ui/Button"
@ -39,6 +39,7 @@ export const PagesManager = ({ isPost }: { isPost: boolean }) => {
const searchParams = useSearchParams()!
const router = useRouter()
const pathname = usePathname()
const pinnedPage = usePinnedPage({ characterId: site.data?.characterId })
const visibility = useMemo<PageVisibilityEnum>(
() =>
@ -314,6 +315,15 @@ export const PagesManager = ({ isPost }: { isPost: boolean }) => {
page.metadata?.content?.date_published || "",
)}
</span>
{pinnedPage.noteId === page.noteId && (
<>
<span className="mx-2">·</span>
<span>
<i className="icon-[mingcute--pin-2-fill] translate-y-[18%]" />{" "}
{siteT("Pinned")}
</span>
</>
)}
</div>
</div>
<div className="w-10 flex-shrink-0 flex self-center ml-auto">

View File

@ -10,7 +10,7 @@ import { getNoteSlugFromNote, getTwitterShareUrl } from "~/lib/helpers"
import { useTranslation } from "~/lib/i18n/client"
import { delStorage, getStorage, setStorage } from "~/lib/storage"
import { ExpandedNote } from "~/lib/types"
import { useDeletePage, useUpdatePage } from "~/queries/page"
import { useDeletePage, usePinPage, useUpdatePage } from "~/queries/page"
import { useGetSite } from "~/queries/site"
import { DeleteConfirmationModal } from "./DeleteConfirmationModal"
@ -48,6 +48,7 @@ export const PagesManagerMenu = ({
const editLink = usePageEditLink(page, isPost)
const queryClient = useQueryClient()
const deletePage = useDeletePage()
const pinPage = usePinPage(page)
const [convertToastId, setConvertToastId] = useState("")
const [deleteToastId, setDeleteToastId] = useState("")
@ -98,6 +99,11 @@ export const PagesManagerMenu = ({
router.push(editLink)
},
},
{
text: pinPage.isPinned ? "Unpin" : "Pin",
icon: <span className="icon-[mingcute--pin-2-line] inline-block"></span>,
onClick: pinPage.togglePin,
},
{
text: "Convert to " + (isPost ? "Page" : "Post"),
icon: (

View File

@ -19,6 +19,7 @@ import { ExpandedNote } from "~/lib/types"
export default function PostList({
posts,
pinnedNoteId,
keyword,
}: {
posts: UseInfiniteQueryResult<
@ -29,6 +30,7 @@ export default function PostList({
},
unknown
>
pinnedNoteId?: number | null
keyword?: string
}) {
const { t } = useTranslation("site")
@ -48,6 +50,7 @@ export default function PostList({
return (
<PostItem
post={post}
isPinned={post.noteId === pinnedNoteId}
keyword={keyword}
key={post.noteId}
priority={listIndex === 0 && postIndex < 3}
@ -86,13 +89,16 @@ export default function PostList({
const PostItem = memo(
({
post,
isPinned,
keyword,
priority,
}: {
post: ExpandedNote
isPinned?: boolean
keyword?: string
priority?: boolean
}) => {
const { t } = useTranslation("site")
const isMounted = useIsClient()
const date = useDate()
const router = useRouter()
@ -113,6 +119,12 @@ const PostItem = memo(
)}
suppressHydrationWarning
>
{isPinned && (
<span className="absolute top-2 right-5 text-xs text-zinc-400 flex items-center gap-1">
<i className="icon-[mingcute--pin-2-fill]" />
{t("Pinned")}
</span>
)}
<PostCover
cover={post.metadata?.content?.cover}
priority={priority}

View File

@ -2,7 +2,7 @@
import PostList from "~/components/site/PostList"
import { PageVisibilityEnum } from "~/lib/types"
import { useGetPagesBySiteLite } from "~/queries/page"
import { useGetPagesBySiteLite, usePinnedPage } from "~/queries/page"
import { useGetSite } from "~/queries/site"
export default function SiteHome({ handle }: { handle: string }) {
@ -13,12 +13,13 @@ export default function SiteHome({ handle }: { handle: string }) {
visibility: PageVisibilityEnum.Published,
useStat: true,
})
const pinnedPage = usePinnedPage({ characterId: site.data?.characterId })
if (!posts.data?.pages?.length) return null
return (
<>
<PostList posts={posts} />
<PostList posts={posts} pinnedNoteId={pinnedPage.noteId} />
</>
)
}

View File

@ -124,5 +124,7 @@
"delete_confirmation_post": "この記事を削除してもよろしいですか?",
"delete_confirmation_page": "このページを削除してもよろしいですか?",
"Advanced Settings": "詳細設定",
"Disable AI-generated summary": "AI が生成した要約を無効化する"
"Disable AI-generated summary": "AI が生成した要約を無効化する",
"Pin": "固定する",
"Unpin": "固定を解除する"
}

View File

@ -10,5 +10,6 @@
"Pull down to open the app": "ダウンロード済みですか?アプリを開くために引き下げてく",
"Write a comment on the blockchain": "ブロックチェーンでコメントする",
"Open in App": "アプリで開く",
"powered by": "<span>このサイトは </span><name/><span> によって作動します</span>"
"powered by": "<span>このサイトは </span><name/><span> によって作動します</span>",
"Pinned": "固定された"
}

View File

@ -202,5 +202,7 @@
"Align Right": "靠右",
"Formula": "公式",
"Advanced Settings": "高級設置",
"Disable AI-generated summary": "禁用 AI 生成的摘要"
"Disable AI-generated summary": "禁用 AI 生成的摘要",
"Pin": "釘選",
"Unpin": "取消釘選"
}

View File

@ -22,5 +22,6 @@
"Back to Home": "回到首頁",
"All Posts": "所有文章",
"Open in App": "在 App 中開啟",
"Search Posts": "搜尋文章"
}
"Search Posts": "搜尋文章",
"Pinned": "釘選"
}

View File

@ -205,13 +205,15 @@
"Comments": "评论",
"You can subscribe to comments through an RSS reader to receive timely reminders.": "你可以通过 RSS 阅读器订阅评论,以便及时收到提醒。",
"Subscription address:": "订阅地址:",
"comment on your" : "评论了你的{{type}}「<tolink>{{toTitle}}</tolink>」",
"{{newCount}} new comments" : "{{newCount}} 条新评论",
"comment on your": "评论了你的{{type}}「<tolink>{{toTitle}}</tolink>」",
"{{newCount}} new comments": "{{newCount}} 条新评论",
"Upload All Images to IPFS": "上传所有图片到 IPFS",
"Help: Markdown syntax and components used by xLog": "帮助xLog 使用的 Markdown 语法和组件",
"Align Center": "居中对齐",
"Align Right": "右对齐",
"Formula": "公式",
"Advanced Settings": "高级设置",
"Disable AI-generated summary": "禁用 AI 生成的摘要"
"Disable AI-generated summary": "禁用 AI 生成的摘要",
"Pin": "置顶",
"Unpin": "取消置顶"
}

View File

@ -7,8 +7,7 @@
"signed and stored on the blockchain": "此{{name}}数据所有权由区块链加密技术和智能合约保障仅归创作者所有。",
"Write a comment on the blockchain": "在区块链上写下你的评论",
"powered by": "<span>由 </span><name/><span> 提供支持</span>",
"This address is in local editing preview mode and cannot be viewed by the public.":
"此地址处于本地编辑预览模式,无法被公众查看。",
"This address is in local editing preview mode and cannot be viewed by the public.": "此地址处于本地编辑预览模式,无法被公众查看。",
"View on xChar": "在 xChar 上查看",
"View on xFeed": "在 xFeed 上查看",
"View on Hoot It": "在 Hoot It 上查看",
@ -23,5 +22,6 @@
"Back to Home": "返回主页",
"All Posts": "所有文章",
"Open in App": "在 App 中打开",
"Search Posts": "搜索文章"
}
"Search Posts": "搜索文章",
"Pinned": "置顶"
}

View File

@ -10,6 +10,7 @@ import type { Address } from "viem"
import { GeneralAccount } from "@crossbell/connect-kit"
import { indexer } from "@crossbell/indexer"
import { extractCharacterAttribute } from "@crossbell/util-metadata"
import { expandCrossbellNote } from "~/lib/expand-unit"
import { filterCommentCharacter } from "~/lib/filter-character"
@ -18,6 +19,8 @@ import { getKeys, getStorage } from "~/lib/storage"
import { ExpandedNote, PageVisibilityEnum } from "~/lib/types"
import { client } from "~/queries/graphql"
export const PINNED_PAGE_KEY = "xlog:pinned-page"
export async function checkPageSlug(input: {
slug: string
characterId?: number
@ -150,37 +153,53 @@ export async function getPagesBySite(input: {
const visibility = input.visibility || PageVisibilityEnum.All
const notes = await indexer.note.getMany({
characterId: input.characterId,
limit: input.limit || 10,
cursor: input.cursor,
orderBy: "publishedAt",
tags: [...(input.tags || []), input.type],
sources: "xlog",
})
const list = await Promise.all(
notes?.list.map(async (note) => {
const expanded = await expandCrossbellNote({
note,
useStat: input.useStat,
useHTML: input.useHTML,
useScore: false,
})
if (!input.keepBody) {
delete expanded.metadata?.content?.content
}
return expanded
}),
)
const expandedNotes: {
const expandedNotes = await (async (): Promise<{
list: ExpandedNote[]
pinnedNoteId?: number
count: number
cursor: string | null
} = Object.assign(notes, {
list,
})
}> => {
const [pinnedNote, notes] = await Promise.all([
!input.cursor ? getPinnedPage(input) : null,
await indexer.note.getMany({
characterId: input.characterId,
limit: input.limit || 10,
cursor: input.cursor,
orderBy: "publishedAt",
tags: [...(input.tags || []), input.type],
sources: "xlog",
}),
])
const list: NoteEntity[] = pinnedNote
? [
pinnedNote,
...notes.list.filter((note) => note.noteId !== pinnedNote.noteId),
]
: notes.list
return {
...notes,
pinnedNoteId: pinnedNote?.noteId,
list: await Promise.all(
list.map(async (note) => {
const expanded = await expandCrossbellNote({
note,
useStat: input.useStat,
useHTML: input.useHTML,
useScore: false,
})
if (!input.keepBody) {
delete expanded.metadata?.content?.content
}
return expanded
}),
),
}
})()
const local = getLocalPages({
characterId: input.characterId,
@ -233,10 +252,16 @@ export async function getPagesBySite(input: {
break
}
expandedNotes.list = expandedNotes.list.sort((a, b) => {
if (!a.metadata?.content?.date_published) {
expandedNotes.list.sort((a, b) => {
if (
!a.metadata?.content?.date_published ||
a.noteId === expandedNotes.pinnedNoteId
) {
return -1
} else if (!b.metadata?.content?.date_published) {
} else if (
!b.metadata?.content?.date_published ||
b.noteId === expandedNotes.pinnedNoteId
) {
return 1
} else {
return (
@ -681,3 +706,14 @@ export const getDistinctNoteTagsOfCharacter = async (characterId: number) => {
return result
}
export async function getPinnedPage({ characterId }: { characterId?: number }) {
if (!characterId) return null
const character = await indexer.character.get(characterId)
const noteId = extractCharacterAttribute(character, PINNED_PAGE_KEY)?.value
if (!character || !noteId || typeof noteId !== "number") return null
return indexer.note.get(character.characterId, noteId)
}

View File

@ -1,10 +1,11 @@
"use client"
import { NoteMetadata } from "crossbell"
import type { NoteEntity, NoteMetadata } from "crossbell"
import { nanoid } from "nanoid"
import {
useAccountState,
useCharacterAttribute,
useDeleteNote,
useIsNoteLiked,
useMintNote,
@ -695,3 +696,44 @@ export const useGetDistinctNoteTagsOfCharacter = (characterId?: number) => {
return pageModel.getDistinctNoteTagsOfCharacter(characterId)
})
}
export const usePinPage = ({
characterId,
noteId,
}: Pick<NoteEntity, "noteId" | "characterId">) => {
const queryClient = useQueryClient()
const { data, isLoading, update } = useCharacterAttribute<number>(
{
characterId,
key: pageModel.PINNED_PAGE_KEY,
},
{
onSuccess() {
return queryClient.invalidateQueries(["getPagesBySite", characterId])
},
},
)
const isPinned = data === noteId
const togglePin = useRefCallback(() => {
if (isPinned) {
update(null)
} else {
update(noteId)
}
})
return { isLoading, isPinned, togglePin }
}
export const usePinnedPage = ({
characterId,
}: Pick<Partial<NoteEntity>, "characterId">) => {
const { data, isLoading } = useCharacterAttribute({
characterId,
key: pageModel.PINNED_PAGE_KEY,
})
return { isLoading, noteId: data as number }
}