style: eslint config and prettier for dx
Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
parent
f2c224157c
commit
adaedce765
|
|
@ -0,0 +1,18 @@
|
|||
module.exports = {
|
||||
extends: ["next/core-web-vitals", "plugin:import/recommended"],
|
||||
root: true,
|
||||
settings: {
|
||||
"import/resolver": {
|
||||
node: { extensions: [".js", ".mjs", ".ts", ".d.ts"] },
|
||||
},
|
||||
},
|
||||
plugins: ["unused-imports"],
|
||||
rules: {
|
||||
"no-unused-vars": "off",
|
||||
"@typescript-eslint/no-unused-vars": "off",
|
||||
"unused-imports/no-unused-imports": "error",
|
||||
"import/named": "off",
|
||||
"import/no-anonymous-default-export": "off",
|
||||
"import/no-named-as-default": "off",
|
||||
},
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"extends": "next/core-web-vitals"
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"singleQuote": false,
|
||||
"semi": false,
|
||||
"trailingComma": "all",
|
||||
"endOfLine": "lf"
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
module.exports = {
|
||||
singleQuote: false,
|
||||
semi: false,
|
||||
trailingComma: "all",
|
||||
endOfLine: "lf",
|
||||
plugins: [
|
||||
require.resolve("prettier-package-json"),
|
||||
require.resolve("@trivago/prettier-plugin-sort-imports"),
|
||||
],
|
||||
|
||||
importOrderParserPlugins: [
|
||||
"classProperties",
|
||||
"decorators-legacy",
|
||||
"typescript",
|
||||
"jsx",
|
||||
],
|
||||
importOrder: [
|
||||
"<THIRD_PARTY_MODULES>",
|
||||
"^@(.*)/(.*)$",
|
||||
"^~/(.*)$",
|
||||
"^@/(.*)$",
|
||||
"^[./]",
|
||||
],
|
||||
importOrderSeparation: true,
|
||||
importOrderSortSpecifiers: true,
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{}
|
||||
11
package.json
11
package.json
|
|
@ -23,7 +23,10 @@
|
|||
"analyze": "NODE_ENV=production ANALYZE=true BUNDLE_ANALYZE=browser next build"
|
||||
},
|
||||
"lint-staged": {
|
||||
"**/*": "prettier --write --ignore-unknown"
|
||||
"*.{js,jsx,ts,tsx}": [
|
||||
"eslint --cache --fix",
|
||||
"prettier --ignore-unknown --ignore-path ./.gitignore --write "
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@codemirror/commands": "6.2.2",
|
||||
|
|
@ -137,6 +140,7 @@
|
|||
"devDependencies": {
|
||||
"@next/bundle-analyzer": "13.3.0",
|
||||
"@playwright/test": "1.32.3",
|
||||
"@trivago/prettier-plugin-sort-imports": "4.1.1",
|
||||
"@types/canvas-confetti": "^1.6.0",
|
||||
"@types/chroma-js": "^2.4.0",
|
||||
"@types/cookie": "0.5.1",
|
||||
|
|
@ -161,13 +165,16 @@
|
|||
"cspell": "^6.31.1",
|
||||
"esbuild": "0.17.16",
|
||||
"esbuild-register": "3.4.2",
|
||||
"eslint": "8.38.0",
|
||||
"eslint": "8.29.0",
|
||||
"eslint-config-next": "13.3.0",
|
||||
"eslint-plugin-import": "2.27.5",
|
||||
"eslint-plugin-unused-imports": "2.0.0",
|
||||
"husky": "8.0.3",
|
||||
"lint-staged": "13.2.1",
|
||||
"next-pwa": "^5.6.0",
|
||||
"postcss-import": "15.1.0",
|
||||
"prettier": "2.8.7",
|
||||
"prettier-package-json": "2.8.0",
|
||||
"prisma": "^4.12.0",
|
||||
"tailwindcss": "3.3.1",
|
||||
"typescript": "5.0.4",
|
||||
|
|
|
|||
258
pnpm-lock.yaml
258
pnpm-lock.yaml
|
|
@ -330,6 +330,9 @@ devDependencies:
|
|||
'@playwright/test':
|
||||
specifier: 1.32.3
|
||||
version: 1.32.3
|
||||
'@trivago/prettier-plugin-sort-imports':
|
||||
specifier: 4.1.1
|
||||
version: 4.1.1(prettier@2.8.7)
|
||||
'@types/canvas-confetti':
|
||||
specifier: ^1.6.0
|
||||
version: 1.6.0
|
||||
|
|
@ -403,11 +406,17 @@ devDependencies:
|
|||
specifier: 3.4.2
|
||||
version: 3.4.2(esbuild@0.17.16)
|
||||
eslint:
|
||||
specifier: 8.38.0
|
||||
version: 8.38.0
|
||||
specifier: 8.29.0
|
||||
version: 8.29.0
|
||||
eslint-config-next:
|
||||
specifier: 13.3.0
|
||||
version: 13.3.0(eslint@8.38.0)(typescript@5.0.4)
|
||||
version: 13.3.0(eslint@8.29.0)(typescript@5.0.4)
|
||||
eslint-plugin-import:
|
||||
specifier: 2.27.5
|
||||
version: 2.27.5(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.29.0)
|
||||
eslint-plugin-unused-imports:
|
||||
specifier: 2.0.0
|
||||
version: 2.0.0(eslint@8.29.0)
|
||||
husky:
|
||||
specifier: 8.0.3
|
||||
version: 8.0.3
|
||||
|
|
@ -423,6 +432,9 @@ devDependencies:
|
|||
prettier:
|
||||
specifier: 2.8.7
|
||||
version: 2.8.7
|
||||
prettier-package-json:
|
||||
specifier: 2.8.0
|
||||
version: 2.8.0
|
||||
prisma:
|
||||
specifier: ^4.12.0
|
||||
version: 4.12.0
|
||||
|
|
@ -527,6 +539,15 @@ packages:
|
|||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
/@babel/generator@7.17.7:
|
||||
resolution: {integrity: sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
dependencies:
|
||||
'@babel/types': 7.21.4
|
||||
jsesc: 2.5.2
|
||||
source-map: 0.5.7
|
||||
dev: true
|
||||
|
||||
/@babel/generator@7.21.4:
|
||||
resolution: {integrity: sha512-NieM3pVIYW2SwGzKoqfPrQsf4xGs9M9AIG3ThppsSRmO+m7eQhmI6amajKMUeIO37wFfsvnvcxQFx6x6iqxDnA==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
|
|
@ -1629,6 +1650,24 @@ packages:
|
|||
'@babel/parser': 7.21.4
|
||||
'@babel/types': 7.21.4
|
||||
|
||||
/@babel/traverse@7.17.3:
|
||||
resolution: {integrity: sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
dependencies:
|
||||
'@babel/code-frame': 7.21.4
|
||||
'@babel/generator': 7.21.4
|
||||
'@babel/helper-environment-visitor': 7.18.9
|
||||
'@babel/helper-function-name': 7.21.0
|
||||
'@babel/helper-hoist-variables': 7.18.6
|
||||
'@babel/helper-split-export-declaration': 7.18.6
|
||||
'@babel/parser': 7.21.4
|
||||
'@babel/types': 7.21.4
|
||||
debug: 4.3.4(supports-color@8.1.1)
|
||||
globals: 11.12.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@babel/traverse@7.21.4:
|
||||
resolution: {integrity: sha512-eyKrRHKdyZxqDm+fV1iqL9UAHMoIg0nDaGqfIOd8rKH17m5snv7Gn4qgjBoFfLz9APvjFU/ICT00NVCv1Epp8Q==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
|
|
@ -1646,6 +1685,14 @@ packages:
|
|||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
/@babel/types@7.17.0:
|
||||
resolution: {integrity: sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
dependencies:
|
||||
'@babel/helper-validator-identifier': 7.19.1
|
||||
to-fast-properties: 2.0.0
|
||||
dev: true
|
||||
|
||||
/@babel/types@7.21.4:
|
||||
resolution: {integrity: sha512-rU2oY501qDxE8Pyo7i/Orqma4ziCOrby0/9mvbDUGEfvZjb279Nk9k19e2fiCxHbRRpY2ZyrgW1eq22mvmOIzA==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
|
|
@ -2714,23 +2761,8 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@eslint-community/eslint-utils@4.4.0(eslint@8.38.0):
|
||||
resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
|
||||
dependencies:
|
||||
eslint: 8.38.0
|
||||
eslint-visitor-keys: 3.4.0
|
||||
dev: true
|
||||
|
||||
/@eslint-community/regexpp@4.5.0:
|
||||
resolution: {integrity: sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==}
|
||||
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
/@eslint/eslintrc@2.0.2:
|
||||
resolution: {integrity: sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==}
|
||||
/@eslint/eslintrc@1.4.1:
|
||||
resolution: {integrity: sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
dependencies:
|
||||
ajv: 6.12.6
|
||||
|
|
@ -2746,11 +2778,6 @@ packages:
|
|||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@eslint/js@8.38.0:
|
||||
resolution: {integrity: sha512-IoD2MfUnOV58ghIHCiil01PcohxjbYR/qCxsoC+xNgUwh1EY8jOOrYmu3d3a71+tJJ23uscEV4X2HJWMsPJu4g==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
/@ethersproject/abi@5.7.0:
|
||||
resolution: {integrity: sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==}
|
||||
dependencies:
|
||||
|
|
@ -4368,6 +4395,26 @@ packages:
|
|||
resolution: {integrity: sha512-qi2jjgO6Tn3KNPGnm6B7p6QTEPvY95NFsIAaJuwbulur8iJUEenp1OnoUfiDaC/g2WPPEFkcfXpmnu8XEMFo2A==}
|
||||
dev: false
|
||||
|
||||
/@trivago/prettier-plugin-sort-imports@4.1.1(prettier@2.8.7):
|
||||
resolution: {integrity: sha512-dQ2r2uzNr1x6pJsuh/8x0IRA3CBUB+pWEW3J/7N98axqt7SQSm+2fy0FLNXvXGg77xEDC7KHxJlHfLYyi7PDcw==}
|
||||
peerDependencies:
|
||||
'@vue/compiler-sfc': 3.x
|
||||
prettier: 2.x
|
||||
peerDependenciesMeta:
|
||||
'@vue/compiler-sfc':
|
||||
optional: true
|
||||
dependencies:
|
||||
'@babel/generator': 7.17.7
|
||||
'@babel/parser': 7.21.4
|
||||
'@babel/traverse': 7.17.3
|
||||
'@babel/types': 7.17.0
|
||||
javascript-natural-sort: 0.7.1
|
||||
lodash: 4.17.21
|
||||
prettier: 2.8.7
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@tsconfig/node10@1.0.9:
|
||||
resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==}
|
||||
dev: false
|
||||
|
|
@ -4528,9 +4575,12 @@ packages:
|
|||
resolution: {integrity: sha512-1cYJrqq9GezNFPsWTZpFut/d4CjpZqA0vhqDUPFWYKF1oIyBz5qnoYMzR+0C/T96t3ebLAC1SSnwrVOm5/j74A==}
|
||||
dev: false
|
||||
|
||||
/@types/parse-author@2.0.1:
|
||||
resolution: {integrity: sha512-2RNXvvDY+7ITl/Q3znDpW9DxyAckKgLCXpoiBHN9BeLH1aV7z/W657P2+PK3wVUgGWXtc99ZQy3LkJTGlxLsvA==}
|
||||
dev: true
|
||||
|
||||
/@types/parse-json@4.0.0:
|
||||
resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==}
|
||||
dev: false
|
||||
|
||||
/@types/parse5@6.0.3:
|
||||
resolution: {integrity: sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==}
|
||||
|
|
@ -4615,7 +4665,7 @@ packages:
|
|||
'@types/node': 18.15.11
|
||||
dev: false
|
||||
|
||||
/@typescript-eslint/parser@5.58.0(eslint@8.38.0)(typescript@5.0.4):
|
||||
/@typescript-eslint/parser@5.58.0(eslint@8.29.0)(typescript@5.0.4):
|
||||
resolution: {integrity: sha512-ixaM3gRtlfrKzP8N6lRhBbjTow1t6ztfBvQNGuRM8qH1bjFFXIJ35XY+FC0RRBKn3C6cT+7VW1y8tNm7DwPHDQ==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
|
|
@ -4629,7 +4679,7 @@ packages:
|
|||
'@typescript-eslint/types': 5.58.0
|
||||
'@typescript-eslint/typescript-estree': 5.58.0(typescript@5.0.4)
|
||||
debug: 4.3.4(supports-color@8.1.1)
|
||||
eslint: 8.38.0
|
||||
eslint: 8.29.0
|
||||
typescript: 5.0.4
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
|
@ -5937,6 +5987,11 @@ packages:
|
|||
engines: {node: '>=4'}
|
||||
dev: false
|
||||
|
||||
/author-regex@1.0.0:
|
||||
resolution: {integrity: sha512-KbWgR8wOYRAPekEmMXrYYdc7BRyhn2Ftk7KWfMUnQ43hFdojWEFRxhhRUm3/OFEdPa1r0KAvTTg9YQK57xTe0g==}
|
||||
engines: {node: '>=0.8'}
|
||||
dev: true
|
||||
|
||||
/autoprefixer@10.4.14(postcss@8.4.22):
|
||||
resolution: {integrity: sha512-FQzyfOsTlwVzjHxKEqRIAdJx9niO6VCBCoEwax/VLSoQF29ggECcPuBqUMZ+u8jCZOPSy8b8/8KnuFbp0SaFZQ==}
|
||||
engines: {node: ^10 || ^12 || >=14}
|
||||
|
|
@ -6742,7 +6797,6 @@ packages:
|
|||
parse-json: 5.2.0
|
||||
path-type: 4.0.0
|
||||
yaml: 1.10.2
|
||||
dev: false
|
||||
|
||||
/cosmiconfig@8.0.0:
|
||||
resolution: {integrity: sha512-da1EafcpH6b/TD8vDRaWV7xFINlHlF6zKsGwS1TsuVJTZRkquaS5HTMq7uq6h31619QjbsYl21gVDOm32KM1vQ==}
|
||||
|
|
@ -7802,7 +7856,7 @@ packages:
|
|||
engines: {node: '>=12'}
|
||||
dev: false
|
||||
|
||||
/eslint-config-next@13.3.0(eslint@8.38.0)(typescript@5.0.4):
|
||||
/eslint-config-next@13.3.0(eslint@8.29.0)(typescript@5.0.4):
|
||||
resolution: {integrity: sha512-6YEwmFBX0VjBd3ODGW9df0Is0FLaRFdMN8eAahQG9CN6LjQ28J8AFr19ngxqMSg7Qv6Uca/3VeeBosJh1bzu0w==}
|
||||
peerDependencies:
|
||||
eslint: ^7.23.0 || ^8.0.0
|
||||
|
|
@ -7813,14 +7867,14 @@ packages:
|
|||
dependencies:
|
||||
'@next/eslint-plugin-next': 13.3.0
|
||||
'@rushstack/eslint-patch': 1.2.0
|
||||
'@typescript-eslint/parser': 5.58.0(eslint@8.38.0)(typescript@5.0.4)
|
||||
eslint: 8.38.0
|
||||
'@typescript-eslint/parser': 5.58.0(eslint@8.29.0)(typescript@5.0.4)
|
||||
eslint: 8.29.0
|
||||
eslint-import-resolver-node: 0.3.7
|
||||
eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.38.0)
|
||||
eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.38.0)
|
||||
eslint-plugin-jsx-a11y: 6.7.1(eslint@8.38.0)
|
||||
eslint-plugin-react: 7.32.2(eslint@8.38.0)
|
||||
eslint-plugin-react-hooks: 4.6.0(eslint@8.38.0)
|
||||
eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.29.0)
|
||||
eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.29.0)
|
||||
eslint-plugin-jsx-a11y: 6.7.1(eslint@8.29.0)
|
||||
eslint-plugin-react: 7.32.2(eslint@8.29.0)
|
||||
eslint-plugin-react-hooks: 4.6.0(eslint@8.29.0)
|
||||
typescript: 5.0.4
|
||||
transitivePeerDependencies:
|
||||
- eslint-import-resolver-webpack
|
||||
|
|
@ -7837,7 +7891,7 @@ packages:
|
|||
- supports-color
|
||||
dev: true
|
||||
|
||||
/eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.38.0):
|
||||
/eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.29.0):
|
||||
resolution: {integrity: sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw==}
|
||||
engines: {node: ^14.18.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
|
|
@ -7846,9 +7900,9 @@ packages:
|
|||
dependencies:
|
||||
debug: 4.3.4(supports-color@8.1.1)
|
||||
enhanced-resolve: 5.12.0
|
||||
eslint: 8.38.0
|
||||
eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.38.0)
|
||||
eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.38.0)
|
||||
eslint: 8.29.0
|
||||
eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.29.0)
|
||||
eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.29.0)
|
||||
get-tsconfig: 4.5.0
|
||||
globby: 13.1.4
|
||||
is-core-module: 2.12.0
|
||||
|
|
@ -7861,7 +7915,7 @@ packages:
|
|||
- supports-color
|
||||
dev: true
|
||||
|
||||
/eslint-module-utils@2.8.0(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.38.0):
|
||||
/eslint-module-utils@2.8.0(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.29.0):
|
||||
resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==}
|
||||
engines: {node: '>=4'}
|
||||
peerDependencies:
|
||||
|
|
@ -7882,16 +7936,16 @@ packages:
|
|||
eslint-import-resolver-webpack:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/parser': 5.58.0(eslint@8.38.0)(typescript@5.0.4)
|
||||
'@typescript-eslint/parser': 5.58.0(eslint@8.29.0)(typescript@5.0.4)
|
||||
debug: 3.2.7
|
||||
eslint: 8.38.0
|
||||
eslint: 8.29.0
|
||||
eslint-import-resolver-node: 0.3.7
|
||||
eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.38.0)
|
||||
eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.29.0)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.38.0):
|
||||
/eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.29.0):
|
||||
resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==}
|
||||
engines: {node: '>=4'}
|
||||
peerDependencies:
|
||||
|
|
@ -7901,15 +7955,15 @@ packages:
|
|||
'@typescript-eslint/parser':
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/parser': 5.58.0(eslint@8.38.0)(typescript@5.0.4)
|
||||
'@typescript-eslint/parser': 5.58.0(eslint@8.29.0)(typescript@5.0.4)
|
||||
array-includes: 3.1.6
|
||||
array.prototype.flat: 1.3.1
|
||||
array.prototype.flatmap: 1.3.1
|
||||
debug: 3.2.7
|
||||
doctrine: 2.1.0
|
||||
eslint: 8.38.0
|
||||
eslint: 8.29.0
|
||||
eslint-import-resolver-node: 0.3.7
|
||||
eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.38.0)
|
||||
eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.29.0)
|
||||
has: 1.0.3
|
||||
is-core-module: 2.12.0
|
||||
is-glob: 4.0.3
|
||||
|
|
@ -7924,7 +7978,7 @@ packages:
|
|||
- supports-color
|
||||
dev: true
|
||||
|
||||
/eslint-plugin-jsx-a11y@6.7.1(eslint@8.38.0):
|
||||
/eslint-plugin-jsx-a11y@6.7.1(eslint@8.29.0):
|
||||
resolution: {integrity: sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==}
|
||||
engines: {node: '>=4.0'}
|
||||
peerDependencies:
|
||||
|
|
@ -7939,7 +7993,7 @@ packages:
|
|||
axobject-query: 3.1.1
|
||||
damerau-levenshtein: 1.0.8
|
||||
emoji-regex: 9.2.2
|
||||
eslint: 8.38.0
|
||||
eslint: 8.29.0
|
||||
has: 1.0.3
|
||||
jsx-ast-utils: 3.3.3
|
||||
language-tags: 1.0.5
|
||||
|
|
@ -7949,16 +8003,16 @@ packages:
|
|||
semver: 6.3.0
|
||||
dev: true
|
||||
|
||||
/eslint-plugin-react-hooks@4.6.0(eslint@8.38.0):
|
||||
/eslint-plugin-react-hooks@4.6.0(eslint@8.29.0):
|
||||
resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==}
|
||||
engines: {node: '>=10'}
|
||||
peerDependencies:
|
||||
eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0
|
||||
dependencies:
|
||||
eslint: 8.38.0
|
||||
eslint: 8.29.0
|
||||
dev: true
|
||||
|
||||
/eslint-plugin-react@7.32.2(eslint@8.38.0):
|
||||
/eslint-plugin-react@7.32.2(eslint@8.29.0):
|
||||
resolution: {integrity: sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==}
|
||||
engines: {node: '>=4'}
|
||||
peerDependencies:
|
||||
|
|
@ -7968,7 +8022,7 @@ packages:
|
|||
array.prototype.flatmap: 1.3.1
|
||||
array.prototype.tosorted: 1.1.1
|
||||
doctrine: 2.1.0
|
||||
eslint: 8.38.0
|
||||
eslint: 8.29.0
|
||||
estraverse: 5.3.0
|
||||
jsx-ast-utils: 3.3.3
|
||||
minimatch: 3.1.2
|
||||
|
|
@ -7982,6 +8036,25 @@ packages:
|
|||
string.prototype.matchall: 4.0.8
|
||||
dev: true
|
||||
|
||||
/eslint-plugin-unused-imports@2.0.0(eslint@8.29.0):
|
||||
resolution: {integrity: sha512-3APeS/tQlTrFa167ThtP0Zm0vctjr4M44HMpeg1P4bK6wItarumq0Ma82xorMKdFsWpphQBlRPzw/pxiVELX1A==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
'@typescript-eslint/eslint-plugin': ^5.0.0
|
||||
eslint: ^8.0.0
|
||||
peerDependenciesMeta:
|
||||
'@typescript-eslint/eslint-plugin':
|
||||
optional: true
|
||||
dependencies:
|
||||
eslint: 8.29.0
|
||||
eslint-rule-composer: 0.3.0
|
||||
dev: true
|
||||
|
||||
/eslint-rule-composer@0.3.0:
|
||||
resolution: {integrity: sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==}
|
||||
engines: {node: '>=4.0.0'}
|
||||
dev: true
|
||||
|
||||
/eslint-scope@5.1.1:
|
||||
resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==}
|
||||
engines: {node: '>=8.0.0'}
|
||||
|
|
@ -7998,20 +8071,32 @@ packages:
|
|||
estraverse: 5.3.0
|
||||
dev: true
|
||||
|
||||
/eslint-utils@3.0.0(eslint@8.29.0):
|
||||
resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==}
|
||||
engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0}
|
||||
peerDependencies:
|
||||
eslint: '>=5'
|
||||
dependencies:
|
||||
eslint: 8.29.0
|
||||
eslint-visitor-keys: 2.1.0
|
||||
dev: true
|
||||
|
||||
/eslint-visitor-keys@2.1.0:
|
||||
resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==}
|
||||
engines: {node: '>=10'}
|
||||
dev: true
|
||||
|
||||
/eslint-visitor-keys@3.4.0:
|
||||
resolution: {integrity: sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
/eslint@8.38.0:
|
||||
resolution: {integrity: sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg==}
|
||||
/eslint@8.29.0:
|
||||
resolution: {integrity: sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.4.0(eslint@8.38.0)
|
||||
'@eslint-community/regexpp': 4.5.0
|
||||
'@eslint/eslintrc': 2.0.2
|
||||
'@eslint/js': 8.38.0
|
||||
'@eslint/eslintrc': 1.4.1
|
||||
'@humanwhocodes/config-array': 0.11.8
|
||||
'@humanwhocodes/module-importer': 1.0.1
|
||||
'@nodelib/fs.walk': 1.2.8
|
||||
|
|
@ -8022,6 +8107,7 @@ packages:
|
|||
doctrine: 3.0.0
|
||||
escape-string-regexp: 4.0.0
|
||||
eslint-scope: 7.2.0
|
||||
eslint-utils: 3.0.0(eslint@8.29.0)
|
||||
eslint-visitor-keys: 3.4.0
|
||||
espree: 9.5.1
|
||||
esquery: 1.5.0
|
||||
|
|
@ -8045,6 +8131,7 @@ packages:
|
|||
minimatch: 3.1.2
|
||||
natural-compare: 1.4.0
|
||||
optionator: 0.9.1
|
||||
regexpp: 3.2.0
|
||||
strip-ansi: 6.0.1
|
||||
strip-json-comments: 3.1.1
|
||||
text-table: 0.2.0
|
||||
|
|
@ -8487,6 +8574,15 @@ packages:
|
|||
resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==}
|
||||
dev: false
|
||||
|
||||
/fs-extra@10.1.0:
|
||||
resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==}
|
||||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
graceful-fs: 4.2.11
|
||||
jsonfile: 6.1.0
|
||||
universalify: 2.0.0
|
||||
dev: true
|
||||
|
||||
/fs-extra@9.1.0:
|
||||
resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==}
|
||||
engines: {node: '>=10'}
|
||||
|
|
@ -9500,6 +9596,10 @@ packages:
|
|||
minimatch: 3.1.2
|
||||
dev: true
|
||||
|
||||
/javascript-natural-sort@0.7.1:
|
||||
resolution: {integrity: sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==}
|
||||
dev: true
|
||||
|
||||
/jayson@3.7.0:
|
||||
resolution: {integrity: sha512-tfy39KJMrrXJ+mFcMpxwBvFDetS8LAID93+rycFglIQM4kl3uNR3W4lBLE/FFhsoUCEox5Dt2adVpDm/XtebbQ==}
|
||||
engines: {node: '>=8'}
|
||||
|
|
@ -11338,6 +11438,13 @@ packages:
|
|||
callsites: 3.1.0
|
||||
dev: true
|
||||
|
||||
/parse-author@2.0.0:
|
||||
resolution: {integrity: sha512-yx5DfvkN8JsHL2xk2Os9oTia467qnvRgey4ahSm2X8epehBLx/gWLcy5KI+Y36ful5DzGbCS6RazqZGgy1gHNw==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dependencies:
|
||||
author-regex: 1.0.0
|
||||
dev: true
|
||||
|
||||
/parse-entities@4.0.1:
|
||||
resolution: {integrity: sha512-SWzvYcSJh4d/SGLIOQfZ/CoNv6BTlI6YEQ7Nj82oDVnRpwe/Z/F1EMx42x3JAOwGBlCjeCH0BRJQbQ/opHL17w==}
|
||||
dependencies:
|
||||
|
|
@ -11650,6 +11757,21 @@ packages:
|
|||
engines: {node: '>= 0.8.0'}
|
||||
dev: true
|
||||
|
||||
/prettier-package-json@2.8.0:
|
||||
resolution: {integrity: sha512-WxtodH/wWavfw3MR7yK/GrS4pASEQ+iSTkdtSxPJWvqzG55ir5nvbLt9rw5AOiEcqqPCRM92WCtR1rk3TG3JSQ==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@types/parse-author': 2.0.1
|
||||
commander: 4.1.1
|
||||
cosmiconfig: 7.1.0
|
||||
fs-extra: 10.1.0
|
||||
glob: 7.2.3
|
||||
minimatch: 3.1.2
|
||||
parse-author: 2.0.0
|
||||
sort-object-keys: 1.1.3
|
||||
sort-order: 1.0.1
|
||||
dev: true
|
||||
|
||||
/prettier@2.8.7:
|
||||
resolution: {integrity: sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==}
|
||||
engines: {node: '>=10.13.0'}
|
||||
|
|
@ -12142,6 +12264,11 @@ packages:
|
|||
functions-have-names: 1.2.3
|
||||
dev: true
|
||||
|
||||
/regexpp@3.2.0:
|
||||
resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==}
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/regexpu-core@5.3.2:
|
||||
resolution: {integrity: sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==}
|
||||
engines: {node: '>=4'}
|
||||
|
|
@ -12803,6 +12930,14 @@ packages:
|
|||
atomic-sleep: 1.0.0
|
||||
dev: false
|
||||
|
||||
/sort-object-keys@1.1.3:
|
||||
resolution: {integrity: sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg==}
|
||||
dev: true
|
||||
|
||||
/sort-order@1.0.1:
|
||||
resolution: {integrity: sha512-BiExT7C1IVF4DNd5dttR/dEq3wunGOHpy4phvqFUQA1pY6j2ye8WWEAV8LhRbfdF0EWDX12FfyPPf9P71eT+cA==}
|
||||
dev: true
|
||||
|
||||
/sortablejs@1.15.0:
|
||||
resolution: {integrity: sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w==}
|
||||
dev: false
|
||||
|
|
@ -12825,7 +12960,6 @@ packages:
|
|||
/source-map@0.5.7:
|
||||
resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: false
|
||||
|
||||
/source-map@0.6.1:
|
||||
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
import type { AchievementSection } from "~/models/site.model"
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import { AchievementModal } from "~/components/common/AchievementModal"
|
||||
import { useState } from "react"
|
||||
import { Indicator } from "@mantine/core"
|
||||
import { useDate } from "~/hooks/useDate"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { useState } from "react"
|
||||
|
||||
import { Indicator } from "@mantine/core"
|
||||
|
||||
import { AchievementModal } from "~/components/common/AchievementModal"
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import { useDate } from "~/hooks/useDate"
|
||||
import type { AchievementSection } from "~/models/site.model"
|
||||
|
||||
export const Badge = ({
|
||||
media,
|
||||
|
|
|
|||
|
|
@ -1,14 +1,16 @@
|
|||
import { Modal, Stepper } from "@mantine/core"
|
||||
import type { AchievementSection } from "~/models/site.model"
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import Tilt from "react-parallax-tilt"
|
||||
import { Badge } from "~/components/common/AchievementItem"
|
||||
import { Button } from "~/components/ui/Button"
|
||||
import { useMintAchievement } from "~/queries/site"
|
||||
import { BlockchainIcon } from "~/components/icons/BlockchainIcon"
|
||||
import { useDate } from "~/hooks/useDate"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import Tilt from "react-parallax-tilt"
|
||||
|
||||
import { Modal, Stepper } from "@mantine/core"
|
||||
|
||||
import { Badge } from "~/components/common/AchievementItem"
|
||||
import { BlockchainIcon } from "~/components/icons/BlockchainIcon"
|
||||
import { Button } from "~/components/ui/Button"
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import { useDate } from "~/hooks/useDate"
|
||||
import { cn } from "~/lib/utils"
|
||||
import type { AchievementSection } from "~/models/site.model"
|
||||
import { useMintAchievement } from "~/queries/site"
|
||||
|
||||
export const AchievementModal: React.FC<{
|
||||
opened: boolean
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
import { CSB_IO, CSB_SCAN } from "~/lib/env"
|
||||
import { Profile, Note } from "~/lib/types"
|
||||
import { Disclosure } from "@headlessui/react"
|
||||
import { BlockchainIcon } from "~/components/icons/BlockchainIcon"
|
||||
import { toIPFS, toGateway } from "~/lib/ipfs-parser"
|
||||
import { IPFS_GATEWAY } from "~/lib/env"
|
||||
import { useTranslation } from "next-i18next"
|
||||
|
||||
import { Disclosure } from "@headlessui/react"
|
||||
|
||||
import { BlockchainIcon } from "~/components/icons/BlockchainIcon"
|
||||
import { CSB_IO, CSB_SCAN, IPFS_GATEWAY } from "~/lib/env"
|
||||
import { toGateway, toIPFS } from "~/lib/ipfs-parser"
|
||||
import { Note, Profile } from "~/lib/types"
|
||||
import { cn } from "~/lib/utils"
|
||||
|
||||
export const BlockchainInfo: React.FC<{
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
import { useTranslation } from "next-i18next"
|
||||
import { useEffect, useState } from "react"
|
||||
import { Avatar } from "~/components/ui/Avatar"
|
||||
|
||||
import { FollowingButton } from "~/components/common/FollowingButton"
|
||||
import { FollowingCount } from "~/components/common/FollowingCount"
|
||||
import * as siteModel from "~/models/site.model"
|
||||
import { Titles } from "~/components/common/Titles"
|
||||
import { Avatar } from "~/components/ui/Avatar"
|
||||
import { useDate } from "~/hooks/useDate"
|
||||
import type { Profile } from "~/lib/types"
|
||||
import { cn } from "~/lib/utils"
|
||||
import { useDate } from "~/hooks/useDate"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { Titles } from "~/components/common/Titles"
|
||||
import * as siteModel from "~/models/site.model"
|
||||
|
||||
export const CharacterCard: React.FC<{
|
||||
siteId?: string
|
||||
|
|
|
|||
|
|
@ -1,17 +1,18 @@
|
|||
import { useState } from "react"
|
||||
|
||||
import {
|
||||
offset,
|
||||
flip,
|
||||
shift,
|
||||
autoUpdate,
|
||||
useFloating,
|
||||
useInteractions,
|
||||
useHover,
|
||||
useFocus,
|
||||
useRole,
|
||||
flip,
|
||||
offset,
|
||||
shift,
|
||||
useDismiss,
|
||||
useFloating,
|
||||
useHover,
|
||||
useInteractions,
|
||||
useRole,
|
||||
useTransitionStyles,
|
||||
} from "@floating-ui/react"
|
||||
|
||||
import { CharacterCard } from "~/components/common/CharacterCard"
|
||||
|
||||
export const CharacterFloatCard: React.FC<{
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
import { Modal } from "~/components/ui/Modal"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import InfiniteScroll from "react-infinite-scroller"
|
||||
|
||||
import { CharacterFloatCard } from "~/components/common/CharacterFloatCard"
|
||||
import { BlockchainIcon } from "~/components/icons/BlockchainIcon"
|
||||
import { Modal } from "~/components/ui/Modal"
|
||||
import { CSB_SCAN } from "~/lib/env"
|
||||
import { getSiteLink } from "~/lib/helpers"
|
||||
|
||||
import { Avatar } from "../ui/Avatar"
|
||||
import { Button } from "../ui/Button"
|
||||
import { UniLink } from "../ui/UniLink"
|
||||
import { CSB_SCAN } from "~/lib/env"
|
||||
import { Avatar } from "../ui/Avatar"
|
||||
import { BlockchainIcon } from "~/components/icons/BlockchainIcon"
|
||||
import { getSiteLink } from "~/lib/helpers"
|
||||
import { CharacterFloatCard } from "~/components/common/CharacterFloatCard"
|
||||
import { useTranslation } from "next-i18next"
|
||||
|
||||
export const CharacterList: React.FC<{
|
||||
open: boolean
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
import { cn } from "~/lib/utils"
|
||||
import { Note } from "~/lib/types"
|
||||
import { useGetComments } from "~/queries/page"
|
||||
import { CommentItem } from "~/components/common/CommentItem"
|
||||
import { CommentInput } from "~/components/common/CommentInput"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import InfiniteScroll from "react-infinite-scroller"
|
||||
|
||||
import { CommentInput } from "~/components/common/CommentInput"
|
||||
import { CommentItem } from "~/components/common/CommentItem"
|
||||
import { Note } from "~/lib/types"
|
||||
import { cn } from "~/lib/utils"
|
||||
import { useGetComments } from "~/queries/page"
|
||||
|
||||
export const Comment: React.FC<{
|
||||
page?: Note | null
|
||||
className?: string
|
||||
|
|
|
|||
|
|
@ -1,17 +1,20 @@
|
|||
import { Profile } from "~/lib/types"
|
||||
import { useAccountSites } from "~/queries/site"
|
||||
import { Avatar } from "~/components/ui/Avatar"
|
||||
import { Input } from "~/components/ui/Input"
|
||||
import { Button } from "~/components/ui/Button"
|
||||
import { useForm } from "react-hook-form"
|
||||
import { useAccountState } from "@crossbell/connect-kit"
|
||||
import { useState, useEffect } from "react"
|
||||
import { useCommentPage, useUpdateComment } from "~/queries/page"
|
||||
import { useRouter } from "next/router"
|
||||
import { EmojiPicker } from "./EmojiPicker"
|
||||
import { Popover } from "@headlessui/react"
|
||||
import { CharacterEntity, NoteEntity } from "crossbell.js"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { NoteEntity, CharacterEntity } from "crossbell.js"
|
||||
import { useRouter } from "next/router"
|
||||
import { useEffect, useState } from "react"
|
||||
import { useForm } from "react-hook-form"
|
||||
|
||||
import { useAccountState } from "@crossbell/connect-kit"
|
||||
import { Popover } from "@headlessui/react"
|
||||
|
||||
import { Avatar } from "~/components/ui/Avatar"
|
||||
import { Button } from "~/components/ui/Button"
|
||||
import { Input } from "~/components/ui/Input"
|
||||
import { Profile } from "~/lib/types"
|
||||
import { useCommentPage, useUpdateComment } from "~/queries/page"
|
||||
import { useAccountSites } from "~/queries/site"
|
||||
|
||||
import { EmojiPicker } from "./EmojiPicker"
|
||||
|
||||
export const CommentInput: React.FC<{
|
||||
pageId?: string
|
||||
|
|
|
|||
|
|
@ -1,19 +1,21 @@
|
|||
import { Avatar } from "~/components/ui/Avatar"
|
||||
import { UniLink } from "~/components/ui/UniLink"
|
||||
import { CharacterEntity, NoteEntity } from "crossbell.js"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { useState } from "react"
|
||||
|
||||
import { useAccountState } from "@crossbell/connect-kit"
|
||||
|
||||
import { CharacterFloatCard } from "~/components/common/CharacterFloatCard"
|
||||
import { CommentInput } from "~/components/common/CommentInput"
|
||||
import { PageContent } from "~/components/common/PageContent"
|
||||
import { Reactions } from "~/components/common/Reactions"
|
||||
import { Titles } from "~/components/common/Titles"
|
||||
import { BlockchainIcon } from "~/components/icons/BlockchainIcon"
|
||||
import { Avatar } from "~/components/ui/Avatar"
|
||||
import { Button } from "~/components/ui/Button"
|
||||
import { UniLink } from "~/components/ui/UniLink"
|
||||
import { useDate } from "~/hooks/useDate"
|
||||
import { CSB_SCAN } from "~/lib/env"
|
||||
import { getSiteLink } from "~/lib/helpers"
|
||||
import { PageContent } from "~/components/common/PageContent"
|
||||
import { NoteEntity, CharacterEntity } from "crossbell.js"
|
||||
import { Button } from "~/components/ui/Button"
|
||||
import { Reactions } from "~/components/common/Reactions"
|
||||
import { useState } from "react"
|
||||
import { CommentInput } from "~/components/common/CommentInput"
|
||||
import { CharacterFloatCard } from "~/components/common/CharacterFloatCard"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { useDate } from "~/hooks/useDate"
|
||||
import { useAccountState } from "@crossbell/connect-kit"
|
||||
import { Titles } from "~/components/common/Titles"
|
||||
|
||||
export const CommentItem: React.FC<{
|
||||
comment: NoteEntity & {
|
||||
|
|
|
|||
|
|
@ -1,36 +1,39 @@
|
|||
import { useTranslation } from "next-i18next"
|
||||
import { useEffect, useState } from "react"
|
||||
|
||||
import {
|
||||
useConnectModal,
|
||||
useAccountState,
|
||||
useDisconnectModal,
|
||||
GeneralAccount,
|
||||
useAccountBalance,
|
||||
useAccountState,
|
||||
useConnectModal,
|
||||
useCsbDetailModal,
|
||||
useDisconnectModal,
|
||||
useIsOpSignEnabled,
|
||||
useOpSignSettingsModal,
|
||||
useUpgradeAccountModal,
|
||||
useSelectCharactersModal,
|
||||
useAccountBalance,
|
||||
useUpgradeAccountModal,
|
||||
} from "@crossbell/connect-kit"
|
||||
import { useAccountSites } from "~/queries/site"
|
||||
import { Avatar } from "~/components/ui/Avatar"
|
||||
import { Button, type VariantColor, type Variant } from "~/components/ui/Button"
|
||||
import { UniLink } from "../ui/UniLink"
|
||||
import { useEffect, useState } from "react"
|
||||
import {
|
||||
useNotifications,
|
||||
useShowNotificationModal,
|
||||
} from "@crossbell/notification"
|
||||
import { useRefCallback } from "@crossbell/util-hooks"
|
||||
import {
|
||||
BellIcon,
|
||||
FaceFrownIcon,
|
||||
FaceSmileIcon,
|
||||
} from "@heroicons/react/24/outline"
|
||||
import { BellAlertIcon } from "@heroicons/react/24/solid"
|
||||
import { SITE_URL } from "~/lib/env"
|
||||
import { useRefCallback } from "@crossbell/util-hooks"
|
||||
import {
|
||||
useShowNotificationModal,
|
||||
useNotifications,
|
||||
} from "@crossbell/notification"
|
||||
|
||||
import { Avatar } from "~/components/ui/Avatar"
|
||||
import { Button, type Variant, type VariantColor } from "~/components/ui/Button"
|
||||
import { Menu } from "~/components/ui/Menu"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { cn } from "~/lib/utils"
|
||||
import { SITE_URL } from "~/lib/env"
|
||||
import { getSiteLink } from "~/lib/helpers"
|
||||
import { cn } from "~/lib/utils"
|
||||
import { useAccountSites } from "~/queries/site"
|
||||
|
||||
import { UniLink } from "../ui/UniLink"
|
||||
|
||||
type HeaderLinkType = {
|
||||
icon?: React.ReactNode
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { Switch } from "@headlessui/react"
|
||||
|
||||
import { useDarkModeSwitch, useIsDark } from "~/hooks/useDarkMode"
|
||||
|
||||
export const DarkModeSwitch = () => {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { useEffect, useRef } from "react"
|
||||
import { useTranslation } from "react-i18next"
|
||||
|
||||
import { useIsDark } from "~/hooks/useDarkMode"
|
||||
|
||||
export const EmojiPicker: React.FC<{
|
||||
|
|
|
|||
|
|
@ -1,19 +1,21 @@
|
|||
import { Trans, useTranslation } from "next-i18next"
|
||||
import { useEffect } from "react"
|
||||
import { toast } from "react-hot-toast"
|
||||
|
||||
import { useConnectedAction } from "@crossbell/connect-kit"
|
||||
|
||||
import { Button } from "~/components/ui/Button"
|
||||
import type { Variant } from "~/components/ui/Button"
|
||||
import { useEffect } from "react"
|
||||
import { UniLink } from "~/components/ui/UniLink"
|
||||
import { SITE_URL } from "~/lib/env"
|
||||
import { Profile } from "~/lib/types"
|
||||
import { cn } from "~/lib/utils"
|
||||
import {
|
||||
useAccountSites,
|
||||
useGetSubscription,
|
||||
useSubscribeToSite,
|
||||
useUnsubscribeFromSite,
|
||||
useAccountSites,
|
||||
} from "~/queries/site"
|
||||
import { useConnectedAction } from "@crossbell/connect-kit"
|
||||
import { cn } from "~/lib/utils"
|
||||
import { Profile } from "~/lib/types"
|
||||
import { Trans, useTranslation } from "next-i18next"
|
||||
import { toast } from "react-hot-toast"
|
||||
import { UniLink } from "~/components/ui/UniLink"
|
||||
import { SITE_URL } from "~/lib/env"
|
||||
|
||||
export const FollowingButton: React.FC<{
|
||||
site: Profile | undefined | null
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
import { useTranslation } from "next-i18next"
|
||||
import { useState } from "react"
|
||||
|
||||
import { CharacterList } from "~/components/common/CharacterList"
|
||||
import { Button } from "~/components/ui/Button"
|
||||
import {
|
||||
useGetSiteSubscriptions,
|
||||
useGetSiteToSubscriptions,
|
||||
} from "~/queries/site"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { Button } from "~/components/ui/Button"
|
||||
|
||||
export const FollowingCount: React.FC<{
|
||||
siteId?: string
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
import React, { useRef } from "react"
|
||||
import Lottie, { type LottieRefCurrentProps } from "lottie-react"
|
||||
import LogoLottieJSON from "../../../public/assets/logo.json"
|
||||
import React, { useRef } from "react"
|
||||
|
||||
import { Image } from "~/components/ui/Image"
|
||||
|
||||
import LogoLottieJSON from "../../../public/assets/logo.json"
|
||||
|
||||
export const Logo: React.FC<{
|
||||
type: "svg" | "png" | "lottie"
|
||||
width?: number
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
import Editor, { EditorProps } from "@monaco-editor/react"
|
||||
import { useMonacoTheme } from "./use-theme"
|
||||
|
||||
import { useIsDark } from "~/hooks/useDarkMode"
|
||||
|
||||
import { useMonacoTheme } from "./use-theme"
|
||||
|
||||
export function MonacoEditor(props: EditorProps) {
|
||||
const isDark = useIsDark()
|
||||
useMonacoTheme(isDark)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import { useMonaco } from "@monaco-editor/react"
|
||||
import { useEffect } from "react"
|
||||
|
||||
import { useMonaco } from "@monaco-editor/react"
|
||||
|
||||
import Dark from "./theme/dark.json"
|
||||
import Light from "./theme/light.json"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
import { cn } from "~/lib/utils"
|
||||
import { useCodeCopy } from "~/hooks/useCodeCopy"
|
||||
import { renderPageContent } from "~/markdown"
|
||||
import { PostToc } from "~/components/site/PostToc"
|
||||
import { MutableRefObject, useMemo } from "react"
|
||||
|
||||
import { PostToc } from "~/components/site/PostToc"
|
||||
import { useCodeCopy } from "~/hooks/useCodeCopy"
|
||||
import { cn } from "~/lib/utils"
|
||||
import { renderPageContent } from "~/markdown"
|
||||
|
||||
export const PageContent: React.FC<{
|
||||
content?: string
|
||||
className?: string
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
import { useTranslation } from "next-i18next"
|
||||
import { useState } from "react"
|
||||
|
||||
import { PatronModal } from "~/components/common/PatronModal"
|
||||
import { Button } from "~/components/ui/Button"
|
||||
import { Profile } from "~/lib/types"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { cn } from "~/lib/utils"
|
||||
import { useState } from "react"
|
||||
import { PatronModal } from "~/components/common/PatronModal"
|
||||
|
||||
export const PatronButton: React.FC<{
|
||||
site: Profile | undefined | null
|
||||
|
|
|
|||
|
|
@ -1,20 +1,23 @@
|
|||
import { Button } from "~/components/ui/Button"
|
||||
import { Note, Profile } from "~/lib/types"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { Modal } from "~/components/ui/Modal"
|
||||
import { useEffect, useRef, useState } from "react"
|
||||
import { BoxRadio } from "~/components/ui/BoxRadio"
|
||||
import { Tabs } from "../ui/Tabs"
|
||||
import { useTipCharacter, useGetTips } from "~/queries/site"
|
||||
import { useAccountState, useConnectModal } from "@crossbell/connect-kit"
|
||||
import { toast } from "react-hot-toast"
|
||||
import confetti from "canvas-confetti"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { useEffect, useRef, useState } from "react"
|
||||
import { toast } from "react-hot-toast"
|
||||
|
||||
import { useAccountState, useConnectModal } from "@crossbell/connect-kit"
|
||||
|
||||
import { Avatar } from "~/components/ui/Avatar"
|
||||
import { CharacterFloatCard } from "./CharacterFloatCard"
|
||||
import { UniLink } from "../ui/UniLink"
|
||||
import { getSiteLink } from "~/lib/helpers"
|
||||
import { BoxRadio } from "~/components/ui/BoxRadio"
|
||||
import { Button } from "~/components/ui/Button"
|
||||
import { Modal } from "~/components/ui/Modal"
|
||||
import { CSB_SCAN, MIRA_LINK } from "~/lib/env"
|
||||
import { getSiteLink } from "~/lib/helpers"
|
||||
import { Note, Profile } from "~/lib/types"
|
||||
import { parsePageId } from "~/models/page.model"
|
||||
import { useGetTips, useTipCharacter } from "~/queries/site"
|
||||
|
||||
import { Tabs } from "../ui/Tabs"
|
||||
import { UniLink } from "../ui/UniLink"
|
||||
import { CharacterFloatCard } from "./CharacterFloatCard"
|
||||
|
||||
export const PatronModal: React.FC<{
|
||||
site: Profile | undefined | null
|
||||
|
|
|
|||
|
|
@ -1,29 +1,32 @@
|
|||
import {
|
||||
useMintPage,
|
||||
useGetLikes,
|
||||
useCheckLike,
|
||||
useGetMints,
|
||||
useCheckMint,
|
||||
useToggleLikePage,
|
||||
useGetLikeCounts,
|
||||
} from "~/queries/page"
|
||||
import { useGetTips } from "~/queries/site"
|
||||
import { useState, useEffect, useRef } from "react"
|
||||
import { Button } from "../ui/Button"
|
||||
import { CSB_SCAN, CSB_XCHAR } from "~/lib/env"
|
||||
import { UniLink } from "~/components/ui/UniLink"
|
||||
import { Modal } from "~/components/ui/Modal"
|
||||
import { Avatar } from "../ui/Avatar"
|
||||
import { MintIcon } from "~/components/icons/MintIcon"
|
||||
import { parsePageId } from "~/models/page.model"
|
||||
import { CharacterList } from "~/components/common/CharacterList"
|
||||
import { cn } from "~/lib/utils"
|
||||
import { Tooltip } from "~/components/ui/Tooltip"
|
||||
import confetti from "canvas-confetti"
|
||||
import { Trans, useTranslation } from "next-i18next"
|
||||
import { Note, Profile } from "~/lib/types"
|
||||
import { useEffect, useRef, useState } from "react"
|
||||
|
||||
import { useAccountState } from "@crossbell/connect-kit"
|
||||
|
||||
import { CharacterList } from "~/components/common/CharacterList"
|
||||
import { PatronModal } from "~/components/common/PatronModal"
|
||||
import { MintIcon } from "~/components/icons/MintIcon"
|
||||
import { Modal } from "~/components/ui/Modal"
|
||||
import { Tooltip } from "~/components/ui/Tooltip"
|
||||
import { UniLink } from "~/components/ui/UniLink"
|
||||
import { CSB_SCAN, CSB_XCHAR } from "~/lib/env"
|
||||
import { Note, Profile } from "~/lib/types"
|
||||
import { cn } from "~/lib/utils"
|
||||
import { parsePageId } from "~/models/page.model"
|
||||
import {
|
||||
useCheckLike,
|
||||
useCheckMint,
|
||||
useGetLikeCounts,
|
||||
useGetLikes,
|
||||
useGetMints,
|
||||
useMintPage,
|
||||
useToggleLikePage,
|
||||
} from "~/queries/page"
|
||||
import { useGetTips } from "~/queries/site"
|
||||
|
||||
import { Avatar } from "../ui/Avatar"
|
||||
import { Button } from "../ui/Button"
|
||||
|
||||
export const Reactions: React.FC<{
|
||||
className?: string
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import Head from "next/head"
|
||||
|
||||
import { SITE_URL } from "~/lib/env"
|
||||
|
||||
export const SEOHead: React.FC<{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { useForm } from "react-hook-form"
|
||||
import { useRouter } from "next/router"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { useRouter } from "next/router"
|
||||
import { useForm } from "react-hook-form"
|
||||
|
||||
import { cn } from "~/lib/utils"
|
||||
|
||||
export const SearchInput: React.FC<{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { cn } from "~/lib/utils"
|
||||
|
||||
import data from "../../../data/titles.json"
|
||||
import { Tooltip } from "../ui/Tooltip"
|
||||
import { UniLink } from "../ui/UniLink"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { serverSideTranslations } from "next-i18next/serverSideTranslations"
|
||||
|
||||
import { languageDetector } from "~/lib/language-detector"
|
||||
|
||||
export const getServerSideProps = async (ctx: any) => {
|
||||
|
|
|
|||
|
|
@ -1,29 +1,30 @@
|
|||
import { cn } from "~/lib/utils"
|
||||
import { useRouter } from "next/router"
|
||||
import React, { useEffect } from "react"
|
||||
import { useTranslation } from "react-i18next"
|
||||
|
||||
import { DISCORD_LINK, APP_NAME } from "~/lib/env"
|
||||
import { useAccountState, useConnectModal } from "@crossbell/connect-kit"
|
||||
import {
|
||||
useNotifications,
|
||||
useShowNotificationModal,
|
||||
} from "@crossbell/notification"
|
||||
|
||||
import { ConnectButton } from "~/components/common/ConnectButton"
|
||||
import { Logo } from "~/components/common/Logo"
|
||||
import { Avatar } from "~/components/ui/Avatar"
|
||||
import { useIsMobileLayout } from "~/hooks/useMobileLayout"
|
||||
import { useUserRole } from "~/hooks/useUserRole"
|
||||
import { APP_NAME, DISCORD_LINK } from "~/lib/env"
|
||||
import { getSiteLink } from "~/lib/helpers"
|
||||
import { toGateway } from "~/lib/ipfs-parser"
|
||||
import { getStorage } from "~/lib/storage"
|
||||
import { cn } from "~/lib/utils"
|
||||
import { useGetPagesBySite } from "~/queries/page"
|
||||
import { useAccountSites, useGetSite } from "~/queries/site"
|
||||
|
||||
import { SEOHead } from "../common/SEOHead"
|
||||
import { UniLink } from "../ui/UniLink"
|
||||
import { DashboardSidebar } from "./DashboardSidebar"
|
||||
import { useAccountSites } from "~/queries/site"
|
||||
import { ConnectButton } from "~/components/common/ConnectButton"
|
||||
import { useGetSite } from "~/queries/site"
|
||||
import { toGateway } from "~/lib/ipfs-parser"
|
||||
import { Avatar } from "~/components/ui/Avatar"
|
||||
import {
|
||||
useShowNotificationModal,
|
||||
useNotifications,
|
||||
} from "@crossbell/notification"
|
||||
import { useUserRole } from "~/hooks/useUserRole"
|
||||
import { useAccountState, useConnectModal } from "@crossbell/connect-kit"
|
||||
import { useTranslation } from "react-i18next"
|
||||
import { Logo } from "~/components/common/Logo"
|
||||
import { getStorage } from "~/lib/storage"
|
||||
import { useGetPagesBySite } from "~/queries/page"
|
||||
import { DashboardTopbar } from "./DashboardTopbar"
|
||||
import { useIsMobileLayout } from "~/hooks/useMobileLayout"
|
||||
|
||||
export function DashboardLayout({
|
||||
children,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { cn } from "~/lib/utils"
|
||||
import { useTranslation } from "next-i18next"
|
||||
|
||||
import { useIsMobileLayout } from "~/hooks/useMobileLayout"
|
||||
import { cn } from "~/lib/utils"
|
||||
|
||||
export const DashboardMain: React.FC<{
|
||||
children: React.ReactNode
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { useState, useEffect, useMemo } from "react"
|
||||
import { setStorage, getStorage } from "~/lib/storage"
|
||||
import { useEffect, useState } from "react"
|
||||
|
||||
import { getStorage, setStorage } from "~/lib/storage"
|
||||
|
||||
export const DashboardSidebar: React.FC<{
|
||||
children: (isOpen: boolean) => React.ReactNode
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { useState, useEffect, useMemo, Fragment } from "react"
|
||||
import { setStorage, getStorage } from "~/lib/storage"
|
||||
import { Fragment, useState } from "react"
|
||||
|
||||
import { Bars3Icon, ChevronDownIcon } from "@heroicons/react/24/outline"
|
||||
import { Logo } from "../common/Logo"
|
||||
import { Popover, Transition } from "@headlessui/react"
|
||||
import { Bars3Icon } from "@heroicons/react/24/outline"
|
||||
|
||||
import { Logo } from "../common/Logo"
|
||||
|
||||
export const DashboardTopbar: React.FC<{
|
||||
children: (open: boolean) => React.ReactNode
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { useTranslation } from "react-i18next"
|
||||
import { Modal } from "../ui/Modal"
|
||||
|
||||
import { Button } from "../ui/Button"
|
||||
import { Modal } from "../ui/Modal"
|
||||
|
||||
export const DeleteConfirmationModal: React.FC<{
|
||||
open: boolean
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
import type { NoteMetadata } from "crossbell.js"
|
||||
import { useState } from "react"
|
||||
import { useDate } from "~/hooks/useDate"
|
||||
import { PageContent } from "../common/PageContent"
|
||||
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { useState } from "react"
|
||||
|
||||
import { useDate } from "~/hooks/useDate"
|
||||
|
||||
import { PageContent } from "../common/PageContent"
|
||||
|
||||
export const ImportPreview: React.FC<{
|
||||
note: NoteMetadata
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
import { Menu, Popover, Transition } from "@headlessui/react"
|
||||
import { Dispatch, Fragment, SetStateAction, useState } from "react"
|
||||
import { useTranslation } from "react-i18next"
|
||||
|
||||
import { Menu, Popover, Transition } from "@headlessui/react"
|
||||
|
||||
import { PageVisibilityEnum } from "~/lib/types"
|
||||
import { cn } from "~/lib/utils"
|
||||
|
||||
import { DeleteConfirmationModal } from "./DeleteConfirmationModal"
|
||||
|
||||
export const OptionsButton: React.FC<{
|
||||
|
|
|
|||
|
|
@ -1,23 +1,26 @@
|
|||
import { Fragment, useMemo } from "react"
|
||||
import { getPageVisibility } from "~/lib/page-helpers"
|
||||
import { useDate } from "~/hooks/useDate"
|
||||
import { TabItem, Tabs } from "../ui/Tabs"
|
||||
import { Menu } from "@headlessui/react"
|
||||
import { cn } from "~/lib/utils"
|
||||
import { PageVisibilityEnum } from "~/lib/types"
|
||||
import { DashboardMain } from "./DashboardMain"
|
||||
import { useRouter } from "next/router"
|
||||
import Link from "next/link"
|
||||
import { EmptyState } from "../ui/EmptyState"
|
||||
import { useGetPagesBySite } from "~/queries/page"
|
||||
import { setStorage } from "~/lib/storage"
|
||||
import { useQueryClient } from "@tanstack/react-query"
|
||||
import { Button } from "../ui/Button"
|
||||
import { UniLink } from "../ui/UniLink"
|
||||
import { nanoid } from "nanoid"
|
||||
import { Tooltip } from "../ui/Tooltip"
|
||||
import { Trans, useTranslation } from "next-i18next"
|
||||
import Link from "next/link"
|
||||
import { useRouter } from "next/router"
|
||||
import { Fragment, useMemo } from "react"
|
||||
|
||||
import { Menu } from "@headlessui/react"
|
||||
import { useQueryClient } from "@tanstack/react-query"
|
||||
|
||||
import { useDate } from "~/hooks/useDate"
|
||||
import { getPageVisibility } from "~/lib/page-helpers"
|
||||
import { readFiles } from "~/lib/read-files"
|
||||
import { setStorage } from "~/lib/storage"
|
||||
import { PageVisibilityEnum } from "~/lib/types"
|
||||
import { cn } from "~/lib/utils"
|
||||
import { useGetPagesBySite } from "~/queries/page"
|
||||
|
||||
import { Button } from "../ui/Button"
|
||||
import { EmptyState } from "../ui/EmptyState"
|
||||
import { TabItem, Tabs } from "../ui/Tabs"
|
||||
import { Tooltip } from "../ui/Tooltip"
|
||||
import { UniLink } from "../ui/UniLink"
|
||||
import { DashboardMain } from "./DashboardMain"
|
||||
import { PagesManagerMenu } from "./PagesManagerMenu"
|
||||
|
||||
export const PagesManager: React.FC<{
|
||||
|
|
|
|||
|
|
@ -1,15 +1,17 @@
|
|||
import { FC, useEffect, useState } from "react"
|
||||
import { Menu } from "@headlessui/react"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { useRouter } from "next/router"
|
||||
import { FC, useEffect, useState } from "react"
|
||||
import toast from "react-hot-toast"
|
||||
import type { Note } from "unidata.js"
|
||||
import { useDeletePage, useCreateOrUpdatePage } from "~/queries/page"
|
||||
import { delStorage, getStorage, setStorage } from "~/lib/storage"
|
||||
|
||||
import { Menu } from "@headlessui/react"
|
||||
import { useQueryClient } from "@tanstack/react-query"
|
||||
import { APP_NAME } from "~/lib/env"
|
||||
import { useTranslation } from "next-i18next"
|
||||
|
||||
import { useGetState } from "~/hooks/useGetState"
|
||||
import { APP_NAME } from "~/lib/env"
|
||||
import { getNoteSlugFromNote, getSiteLink } from "~/lib/helpers"
|
||||
import { delStorage, getStorage, setStorage } from "~/lib/storage"
|
||||
import { useCreateOrUpdatePage, useDeletePage } from "~/queries/page"
|
||||
import { useGetSite } from "~/queries/site"
|
||||
|
||||
const usePageEditLink = (page: { id: string }, isPost: boolean) => {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { useTranslation } from "next-i18next"
|
||||
import { useEffect, useRef, useState } from "react"
|
||||
import useOnClickOutside from "use-onclickoutside"
|
||||
|
||||
import { Button, ButtonGroup } from "../ui/Button"
|
||||
import { useTranslation } from "next-i18next"
|
||||
|
||||
export const PublishButton: React.FC<{
|
||||
save: (published: boolean) => void
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { useTranslation } from "next-i18next"
|
||||
import { useRouter } from "next/router"
|
||||
import React from "react"
|
||||
|
||||
import { type TabItem, Tabs } from "../ui/Tabs"
|
||||
import { DashboardMain } from "./DashboardMain"
|
||||
import { useTranslation } from "next-i18next"
|
||||
|
||||
export const SettingsLayout: React.FC<{
|
||||
title: string
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import React from "react"
|
||||
|
||||
import { cn } from "~/lib/utils"
|
||||
|
||||
export const BlockchainIcon = ({ className }: { className?: string }) => {
|
||||
|
|
|
|||
|
|
@ -1,23 +1,26 @@
|
|||
import Link from "next/link"
|
||||
import { useDate } from "~/hooks/useDate"
|
||||
import { EmptyState } from "../ui/EmptyState"
|
||||
import { useRouter } from "next/router"
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { useGetFeed } from "~/queries/home"
|
||||
import type { FeedType, SearchType } from "~/models/home.model"
|
||||
import { CharacterFloatCard } from "~/components/common/CharacterFloatCard"
|
||||
import { useAccountState } from "@crossbell/connect-kit"
|
||||
import InfiniteScroll from "react-infinite-scroller"
|
||||
import { ExpandedNote } from "~/lib/types"
|
||||
import Link from "next/link"
|
||||
import { useRouter } from "next/router"
|
||||
import { useEffect, useState } from "react"
|
||||
import { Switch } from "@headlessui/react"
|
||||
import { setStorage, getStorage } from "~/lib/storage"
|
||||
import { Tooltip } from "~/components/ui/Tooltip"
|
||||
import { Titles } from "~/components/common/Titles"
|
||||
import { Tabs } from "~/components/ui/Tabs"
|
||||
import InfiniteScroll from "react-infinite-scroller"
|
||||
import reactStringReplace from "react-string-replace"
|
||||
|
||||
import { useAccountState } from "@crossbell/connect-kit"
|
||||
import { Switch } from "@headlessui/react"
|
||||
|
||||
import { CharacterFloatCard } from "~/components/common/CharacterFloatCard"
|
||||
import { Titles } from "~/components/common/Titles"
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import { Tabs } from "~/components/ui/Tabs"
|
||||
import { Tooltip } from "~/components/ui/Tooltip"
|
||||
import { useDate } from "~/hooks/useDate"
|
||||
import { getStorage, setStorage } from "~/lib/storage"
|
||||
import { ExpandedNote } from "~/lib/types"
|
||||
import type { FeedType, SearchType } from "~/models/home.model"
|
||||
import { useGetFeed } from "~/queries/home"
|
||||
|
||||
import { EmptyState } from "../ui/EmptyState"
|
||||
|
||||
const Post = ({
|
||||
post,
|
||||
filtering,
|
||||
|
|
|
|||
|
|
@ -1,20 +1,22 @@
|
|||
import { useTranslation } from "next-i18next"
|
||||
import { useRouter } from "next/router"
|
||||
|
||||
import { Logo } from "~/components/common/Logo"
|
||||
import {
|
||||
APP_DESCRIPTION,
|
||||
APP_NAME,
|
||||
GITHUB_LINK,
|
||||
DISCORD_LINK,
|
||||
GITHUB_LINK,
|
||||
TWITTER_LINK,
|
||||
} from "~/lib/env"
|
||||
import { SEOHead } from "../common/SEOHead"
|
||||
import { UniLink } from "../ui/UniLink"
|
||||
import { ConnectButton } from "../common/ConnectButton"
|
||||
import { getSiteLink } from "~/lib/helpers"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { Logo } from "~/components/common/Logo"
|
||||
import { useRouter } from "next/router"
|
||||
import { cn } from "~/lib/utils"
|
||||
import { Image } from "../ui/Image"
|
||||
|
||||
import { ConnectButton } from "../common/ConnectButton"
|
||||
import { DarkModeSwitch } from "../common/DarkModeSwitch"
|
||||
import { SEOHead } from "../common/SEOHead"
|
||||
import { Image } from "../ui/Image"
|
||||
import { UniLink } from "../ui/UniLink"
|
||||
|
||||
const tabs = [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,17 +1,23 @@
|
|||
import { useTranslation } from "next-i18next"
|
||||
import { useState } from "react"
|
||||
import { UniLink } from "~/components/ui/UniLink"
|
||||
import { Button } from "~/components/ui/Button"
|
||||
|
||||
import { useConnectedAction } from "@crossbell/connect-kit"
|
||||
import { useRefCallback } from "@crossbell/util-hooks"
|
||||
import { getSiteLink } from "~/lib/helpers"
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import { useGetSites } from "~/queries/site"
|
||||
import showcase from "../../../data/showcase.json"
|
||||
|
||||
import { CharacterFloatCard } from "~/components/common/CharacterFloatCard"
|
||||
import { useAccountSites, useSubscribeToSites } from "~/queries/site"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import topics from "../../../data/topics.json"
|
||||
import { SearchInput } from "~/components/common/SearchInput"
|
||||
import { Button } from "~/components/ui/Button"
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import { UniLink } from "~/components/ui/UniLink"
|
||||
import { getSiteLink } from "~/lib/helpers"
|
||||
import {
|
||||
useAccountSites,
|
||||
useGetSites,
|
||||
useSubscribeToSites,
|
||||
} from "~/queries/site"
|
||||
|
||||
import showcase from "../../../data/showcase.json"
|
||||
import topics from "../../../data/topics.json"
|
||||
|
||||
export function MainSidebar({ hideSearch }: { hideSearch?: boolean }) {
|
||||
const showcaseSites = useGetSites(showcase)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Image } from "~/components/ui/Image"
|
||||
import { UniLink } from "~/components/ui/UniLink"
|
||||
import { Tooltip } from "~/components/ui/Tooltip"
|
||||
import { UniLink } from "~/components/ui/UniLink"
|
||||
import { cn } from "~/lib/utils"
|
||||
|
||||
const syncMap: {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Note, Profile } from "~/lib/types"
|
||||
import { Comment } from "~/components/common/Comment"
|
||||
import { Reactions } from "~/components/common/Reactions"
|
||||
import { Note, Profile } from "~/lib/types"
|
||||
|
||||
export const PostFooter: React.FC<{
|
||||
page?: Note | null
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
import { BlockchainIcon } from "~/components/icons/BlockchainIcon"
|
||||
import { UniLink } from "~/components/ui/UniLink"
|
||||
import { Note, Profile } from "~/lib/types"
|
||||
import { CSB_SCAN, SITE_URL } from "~/lib/env"
|
||||
import { useEffect, useState } from "react"
|
||||
import { CharacterFloatCard } from "~/components/common/CharacterFloatCard"
|
||||
import { getSiteLink } from "~/lib/helpers"
|
||||
import { Avatar } from "~/components/ui/Avatar"
|
||||
import { useUserRole } from "~/hooks/useUserRole"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { useEffect, useState } from "react"
|
||||
|
||||
import { CharacterFloatCard } from "~/components/common/CharacterFloatCard"
|
||||
import { BlockchainIcon } from "~/components/icons/BlockchainIcon"
|
||||
import { Avatar } from "~/components/ui/Avatar"
|
||||
import { UniLink } from "~/components/ui/UniLink"
|
||||
import { useDate } from "~/hooks/useDate"
|
||||
import { useGetSummary } from "~/queries/page"
|
||||
import { useUserRole } from "~/hooks/useUserRole"
|
||||
import { CSB_SCAN, SITE_URL } from "~/lib/env"
|
||||
import { getSiteLink } from "~/lib/helpers"
|
||||
import { toCid } from "~/lib/ipfs-parser"
|
||||
import { Note, Profile } from "~/lib/types"
|
||||
import { useGetSummary } from "~/queries/page"
|
||||
|
||||
export const PostMeta: React.FC<{
|
||||
page: Note
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useEffect, useState, useRef } from "react"
|
||||
import type { Result as TocResult } from "mdast-util-toc"
|
||||
import React, { useEffect, useRef, useState } from "react"
|
||||
import { Link } from "react-scroll"
|
||||
|
||||
function getIds(items: TocResult["map"]) {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
import { useTranslation } from "next-i18next"
|
||||
import Link from "next/link"
|
||||
import { useMemo } from "react"
|
||||
import { EmptyState } from "../ui/EmptyState"
|
||||
import { Notes, Note } from "~/lib/types"
|
||||
import { UniLink } from "../ui/UniLink"
|
||||
|
||||
import { Button } from "~/components/ui/Button"
|
||||
import { useDate } from "~/hooks/useDate"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { Note, Notes } from "~/lib/types"
|
||||
|
||||
import { EmptyState } from "../ui/EmptyState"
|
||||
import { UniLink } from "../ui/UniLink"
|
||||
|
||||
export const SiteArchives: React.FC<{
|
||||
title?: string
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
import { SITE_URL } from "~/lib/env"
|
||||
import { UniLink } from "../ui/UniLink"
|
||||
import { Profile, Note } from "~/lib/types"
|
||||
import Script from "next/script"
|
||||
import { Platform } from "~/components/site/Platform"
|
||||
import { Trans } from "next-i18next"
|
||||
import { Logo } from "~/components/common/Logo"
|
||||
import Script from "next/script"
|
||||
import { useEffect, useState } from "react"
|
||||
|
||||
import { Logo } from "~/components/common/Logo"
|
||||
import { Platform } from "~/components/site/Platform"
|
||||
import { SITE_URL } from "~/lib/env"
|
||||
import { Note, Profile } from "~/lib/types"
|
||||
|
||||
import { DarkModeSwitch } from "../common/DarkModeSwitch"
|
||||
import { UniLink } from "../ui/UniLink"
|
||||
|
||||
export const SiteFooter: React.FC<{
|
||||
site?: Profile | null
|
||||
|
|
|
|||
|
|
@ -1,28 +1,31 @@
|
|||
import { cn } from "~/lib/utils"
|
||||
import chroma from "chroma-js"
|
||||
import { FastAverageColor } from "fast-average-color"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { useRouter } from "next/router"
|
||||
import { CSB_SCAN, CSB_IO, CSB_XCHAR } from "~/lib/env"
|
||||
import { MutableRefObject, RefObject, useEffect, useRef, useState } from "react"
|
||||
|
||||
import { XCharLogo, XFeedLogo } from "@crossbell/ui"
|
||||
import { RssIcon } from "@heroicons/react/24/solid"
|
||||
|
||||
import { FollowingButton } from "~/components/common/FollowingButton"
|
||||
import { FollowingCount } from "~/components/common/FollowingCount"
|
||||
import { PatronButton } from "~/components/common/PatronButton"
|
||||
import { SearchInput } from "~/components/common/SearchInput"
|
||||
import { BlockchainIcon } from "~/components/icons/BlockchainIcon"
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import { Menu } from "~/components/ui/Menu"
|
||||
import { Modal } from "~/components/ui/Modal"
|
||||
import { Tooltip } from "~/components/ui/Tooltip"
|
||||
import { useIsDark } from "~/hooks/useDarkMode"
|
||||
import { CSB_IO, CSB_SCAN, CSB_XCHAR } from "~/lib/env"
|
||||
import { Profile } from "~/lib/types"
|
||||
import { getUserContentsUrl } from "~/lib/user-contents"
|
||||
import { cn } from "~/lib/utils"
|
||||
|
||||
import { ConnectButton } from "../common/ConnectButton"
|
||||
import { Avatar } from "../ui/Avatar"
|
||||
import { Button } from "../ui/Button"
|
||||
import { UniLink } from "../ui/UniLink"
|
||||
import { Profile } from "~/lib/types"
|
||||
import { ConnectButton } from "../common/ConnectButton"
|
||||
import { BlockchainIcon } from "~/components/icons/BlockchainIcon"
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import { FollowingButton } from "~/components/common/FollowingButton"
|
||||
import { FollowingCount } from "~/components/common/FollowingCount"
|
||||
import { RssIcon } from "@heroicons/react/24/solid"
|
||||
import { XCharLogo, XFeedLogo } from "@crossbell/ui"
|
||||
import { FastAverageColor } from "fast-average-color"
|
||||
import { useState, useRef, useEffect, RefObject, MutableRefObject } from "react"
|
||||
import chroma from "chroma-js"
|
||||
import { Menu } from "~/components/ui/Menu"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { Tooltip } from "~/components/ui/Tooltip"
|
||||
import { PatronButton } from "~/components/common/PatronButton"
|
||||
import { Modal } from "~/components/ui/Modal"
|
||||
import { SearchInput } from "~/components/common/SearchInput"
|
||||
import { useIsDark } from "~/hooks/useDarkMode"
|
||||
|
||||
type HeaderLinkType = {
|
||||
icon?: React.ReactNode
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
import { useTranslation } from "next-i18next"
|
||||
import Link from "next/link"
|
||||
import { useRouter } from "next/router"
|
||||
import { useEffect, useState } from "react"
|
||||
|
||||
import { Button } from "~/components/ui/Button"
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import { useDate } from "~/hooks/useDate"
|
||||
import { Notes } from "~/lib/types"
|
||||
|
||||
import { EmptyState } from "../ui/EmptyState"
|
||||
import { useRouter } from "next/router"
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import { Button } from "~/components/ui/Button"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { useEffect, useState } from "react"
|
||||
|
||||
export const SiteHome: React.FC<{
|
||||
postPages?: Notes[]
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
import { serverSideTranslations } from "next-i18next/serverSideTranslations"
|
||||
|
||||
import { QueryClient, dehydrate } from "@tanstack/react-query"
|
||||
|
||||
import { languageDetector } from "~/lib/language-detector"
|
||||
import { notFound } from "~/lib/server-side-props"
|
||||
import { PageVisibilityEnum } from "~/lib/types"
|
||||
import { fetchGetPage, prefetchGetPagesBySite } from "~/queries/page.server"
|
||||
import {
|
||||
prefetchGetSite,
|
||||
prefetchGetSiteSubscriptions,
|
||||
prefetchGetSiteToSubscriptions,
|
||||
} from "~/queries/site.server"
|
||||
import { prefetchGetPagesBySite } from "~/queries/page.server"
|
||||
import { PageVisibilityEnum } from "~/lib/types"
|
||||
import { dehydrate, QueryClient } from "@tanstack/react-query"
|
||||
import { fetchGetPage } from "~/queries/page.server"
|
||||
import { notFound } from "~/lib/server-side-props"
|
||||
import { serverSideTranslations } from "next-i18next/serverSideTranslations"
|
||||
import { languageDetector } from "~/lib/language-detector"
|
||||
|
||||
export const getServerSideProps = async (
|
||||
ctx: any,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
import { useAccountState } from "@crossbell/connect-kit"
|
||||
import { useRouter } from "next/router"
|
||||
import React, { useEffect } from "react"
|
||||
|
||||
import { useAccountState } from "@crossbell/connect-kit"
|
||||
|
||||
import { BlockchainInfo } from "~/components/common/BlockchainInfo"
|
||||
import { useUserRole } from "~/hooks/useUserRole"
|
||||
import { IS_PROD } from "~/lib/constants"
|
||||
|
|
@ -10,6 +12,7 @@ import { getUserContentsUrl } from "~/lib/user-contents"
|
|||
import { cn } from "~/lib/utils"
|
||||
import { useCheckLike, useCheckMint, useGetPage } from "~/queries/page"
|
||||
import { useGetSite, useGetSubscription } from "~/queries/site"
|
||||
|
||||
import { SEOHead } from "../common/SEOHead"
|
||||
import { SiteFooter } from "./SiteFooter"
|
||||
import { SiteHeader } from "./SiteHeader"
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
import { PageContent } from "../common/PageContent"
|
||||
import { PostMeta } from "./PostMeta"
|
||||
import { PostFooter } from "./PostFooter"
|
||||
import { Note, Profile } from "~/lib/types"
|
||||
import Head from "next/head"
|
||||
import { getSiteLink } from "~/lib/helpers"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import Head from "next/head"
|
||||
|
||||
import { getSiteLink } from "~/lib/helpers"
|
||||
import { Note, Profile } from "~/lib/types"
|
||||
|
||||
import { PageContent } from "../common/PageContent"
|
||||
import { PostFooter } from "./PostFooter"
|
||||
import { PostMeta } from "./PostMeta"
|
||||
|
||||
export const SitePage: React.FC<{
|
||||
page?: Note | null
|
||||
|
|
|
|||
|
|
@ -1,14 +1,16 @@
|
|||
import Link from "next/link"
|
||||
import { useDate } from "~/hooks/useDate"
|
||||
import { ExpandedNote, Notes } from "~/lib/types"
|
||||
import { EmptyState } from "../ui/EmptyState"
|
||||
import { useRouter } from "next/router"
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import { Button } from "~/components/ui/Button"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import Link from "next/link"
|
||||
import { useRouter } from "next/router"
|
||||
import { useEffect, useState } from "react"
|
||||
import reactStringReplace from "react-string-replace"
|
||||
|
||||
import { Button } from "~/components/ui/Button"
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import { useDate } from "~/hooks/useDate"
|
||||
import { ExpandedNote } from "~/lib/types"
|
||||
|
||||
import { EmptyState } from "../ui/EmptyState"
|
||||
|
||||
export const SiteSearch: React.FC<{
|
||||
postPages?: {
|
||||
list: ExpandedNote[]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { APlayer as AplayerReact } from "aplayer-react"
|
||||
|
||||
import { toGateway } from "~/lib/ipfs-parser"
|
||||
|
||||
export const APlayer: React.FC<
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import { cn } from "~/lib/utils"
|
||||
import React, { useMemo } from "react"
|
||||
import { toGateway } from "~/lib/ipfs-parser"
|
||||
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import { toGateway } from "~/lib/ipfs-parser"
|
||||
import { cn } from "~/lib/utils"
|
||||
|
||||
export const Avatar: React.FC<
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { cn } from "~/lib/utils"
|
||||
import React from "react"
|
||||
|
||||
import { cn } from "~/lib/utils"
|
||||
|
||||
export const Badge: React.FC<{
|
||||
children: React.ReactNode
|
||||
className?: string
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
import { cn } from "~/lib/utils"
|
||||
import { nanoid } from "nanoid"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import React, {
|
||||
ChangeEvent,
|
||||
FocusEvent,
|
||||
Dispatch,
|
||||
FocusEvent,
|
||||
SetStateAction,
|
||||
useMemo,
|
||||
useState,
|
||||
} from "react"
|
||||
import { UniLink } from "./UniLink"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { nanoid } from "nanoid"
|
||||
|
||||
import { Input } from "~/components/ui/Input"
|
||||
import { cn } from "~/lib/utils"
|
||||
|
||||
export type RadioItem = {
|
||||
text: string
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import React, { memo } from "react"
|
||||
|
||||
import { cn } from "~/lib/utils"
|
||||
|
||||
export const ButtonGroup: React.FC<{ children: React.ReactNode }> = ({
|
||||
|
|
|
|||
|
|
@ -1,10 +1,3 @@
|
|||
import type { EditorState } from "@codemirror/state"
|
||||
import { Annotation } from "@codemirror/state"
|
||||
|
||||
import { HighlightStyle } from "@codemirror/language"
|
||||
import { EditorView, KeyBinding, ViewUpdate } from "@codemirror/view"
|
||||
import { tags } from "@lezer/highlight"
|
||||
import type { Tag } from "@lezer/highlight"
|
||||
import {
|
||||
Suspense,
|
||||
forwardRef,
|
||||
|
|
@ -14,6 +7,14 @@ import {
|
|||
useState,
|
||||
} from "react"
|
||||
import { useTranslation } from "react-i18next"
|
||||
|
||||
import { HighlightStyle } from "@codemirror/language"
|
||||
import type { EditorState } from "@codemirror/state"
|
||||
import { Annotation } from "@codemirror/state"
|
||||
import { EditorView, KeyBinding, ViewUpdate } from "@codemirror/view"
|
||||
import { tags } from "@lezer/highlight"
|
||||
import type { Tag } from "@lezer/highlight"
|
||||
|
||||
import {
|
||||
useCodeMirrorAutoToggleTheme,
|
||||
useCodeMirrorStyle,
|
||||
|
|
|
|||
|
|
@ -1,11 +1,14 @@
|
|||
import { EditorView } from "@codemirror/view"
|
||||
import { FC, memo, useCallback, useState } from "react"
|
||||
import { ICommand } from "~/editor"
|
||||
import { Tooltip } from "./Tooltip"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { Popover } from "@headlessui/react"
|
||||
import { FC, memo, useCallback, useState } from "react"
|
||||
import { usePopper } from "react-popper"
|
||||
|
||||
import { EditorView } from "@codemirror/view"
|
||||
import { Popover } from "@headlessui/react"
|
||||
|
||||
import { ICommand } from "~/editor"
|
||||
|
||||
import { Tooltip } from "./Tooltip"
|
||||
|
||||
export interface EditorToolbarProps {
|
||||
view?: EditorView
|
||||
toolbars: ICommand[]
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
import { ImageProps, default as NextImage } from "next/image"
|
||||
import React, { useEffect } from "react"
|
||||
import { default as NextImage, ImageProps } from "next/image"
|
||||
import { toGateway, toIPFS } from "~/lib/ipfs-parser"
|
||||
import { useIsMobileLayout } from "~/hooks/useMobileLayout"
|
||||
|
||||
import { useGetState } from "~/hooks/useGetState"
|
||||
import { useIsMobileLayout } from "~/hooks/useMobileLayout"
|
||||
import { toGateway, toIPFS } from "~/lib/ipfs-parser"
|
||||
|
||||
type TImageProps = {
|
||||
className?: string
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
import { cn } from "~/lib/utils"
|
||||
import React, { ChangeEvent, forwardRef, useEffect } from "react"
|
||||
import { useState } from "react"
|
||||
import React, { ChangeEvent, forwardRef, useEffect, useState } from "react"
|
||||
|
||||
import { XMarkIcon } from "@heroicons/react/20/solid"
|
||||
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import { useUploadFile } from "~/hooks/useUploadFile"
|
||||
import { toGateway } from "~/lib/ipfs-parser"
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import { XMarkIcon } from "@heroicons/react/20/solid"
|
||||
import { cn } from "~/lib/utils"
|
||||
|
||||
const getBase64 = (img: File, callback: (url: string) => void) => {
|
||||
const reader = new FileReader()
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import { cn } from "~/lib/utils"
|
||||
import { forwardRef } from "react"
|
||||
|
||||
import { cn } from "~/lib/utils"
|
||||
|
||||
import { FieldLabel } from "./FieldLabel"
|
||||
|
||||
type InputProps<TMultiline extends boolean> = {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
import React from "react"
|
||||
import { CharacterFloatCard } from "../common/CharacterFloatCard"
|
||||
import { UniLink } from "./UniLink"
|
||||
|
||||
import { getSiteLink } from "~/lib/helpers"
|
||||
import { useGetSite } from "~/queries/site"
|
||||
|
||||
import { CharacterFloatCard } from "../common/CharacterFloatCard"
|
||||
import { UniLink } from "./UniLink"
|
||||
|
||||
export const Mention: React.FC<{
|
||||
id: string
|
||||
children?: any
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
import { useState } from "react"
|
||||
|
||||
import {
|
||||
offset,
|
||||
flip,
|
||||
shift,
|
||||
Placement,
|
||||
autoUpdate,
|
||||
flip,
|
||||
offset,
|
||||
shift,
|
||||
useClick,
|
||||
useDismiss,
|
||||
useFloating,
|
||||
useInteractions,
|
||||
useClick,
|
||||
useRole,
|
||||
useDismiss,
|
||||
useTransitionStyles,
|
||||
Placement,
|
||||
} from "@floating-ui/react"
|
||||
|
||||
export const Menu: React.FC<{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import { nanoid } from "nanoid"
|
||||
import { FC, useEffect, useState } from "react"
|
||||
|
||||
import { useIsDark } from "~/hooks/useDarkMode"
|
||||
import { useIsUnmounted } from "~/hooks/useLifecycle"
|
||||
import { nanoid } from "nanoid"
|
||||
|
||||
export const Mermaid: FC<{
|
||||
children: [string]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
import { Dialog } from "@headlessui/react"
|
||||
import { cn } from "~/lib/utils"
|
||||
import React from "react"
|
||||
|
||||
import { Dialog } from "@headlessui/react"
|
||||
|
||||
import { cn } from "~/lib/utils"
|
||||
|
||||
export const Modal: React.FC<{
|
||||
open: boolean
|
||||
setOpen: (open: boolean) => void
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
import { cn } from "~/lib/utils"
|
||||
import React from "react"
|
||||
import { UniLink } from "./UniLink"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import React from "react"
|
||||
|
||||
import { Tooltip } from "~/components/ui/Tooltip"
|
||||
import { cn } from "~/lib/utils"
|
||||
|
||||
import { UniLink } from "./UniLink"
|
||||
|
||||
export type TabItem = {
|
||||
text: string
|
||||
|
|
|
|||
|
|
@ -1,18 +1,20 @@
|
|||
import { cloneElement, useState } from "react"
|
||||
import { useState } from "react"
|
||||
|
||||
import {
|
||||
Placement,
|
||||
offset,
|
||||
flip,
|
||||
shift,
|
||||
autoUpdate,
|
||||
useFloating,
|
||||
useInteractions,
|
||||
useHover,
|
||||
useFocus,
|
||||
useRole,
|
||||
flip,
|
||||
offset,
|
||||
shift,
|
||||
useDismiss,
|
||||
useFloating,
|
||||
useFocus,
|
||||
useHover,
|
||||
useInteractions,
|
||||
useRole,
|
||||
useTransitionStyles,
|
||||
} from "@floating-ui/react"
|
||||
|
||||
import { cn } from "~/lib/utils"
|
||||
|
||||
interface Props {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import React, { useState } from "react"
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import axios from "axios"
|
||||
import React, { useState } from "react"
|
||||
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import { IPFS_GATEWAY } from "~/lib/env"
|
||||
|
||||
export const UniMedia: React.FC<{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import { EditorSelection } from "@codemirror/state"
|
||||
import { ICommand, wrapExecute } from "."
|
||||
|
||||
export const Code: ICommand = {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { EmojiPicker } from "~/components/common/EmojiPicker"
|
||||
import { ICommand, prependExecute, wrapExecute } from "."
|
||||
|
||||
import { ICommand, wrapExecute } from "."
|
||||
|
||||
export const Emoji: ICommand<string> = {
|
||||
name: "emoji",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { getSiteLink } from "~/lib/helpers"
|
||||
|
||||
import { ICommand } from "."
|
||||
|
||||
export const Help: ICommand = {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
import { EditorSelection } from "@codemirror/state"
|
||||
import { ICommand, prependExecute, wrapExecute } from "."
|
||||
import { UploadFile } from "~/lib/upload-file"
|
||||
import toast from "react-hot-toast"
|
||||
|
||||
import { UploadFile } from "~/lib/upload-file"
|
||||
|
||||
import { ICommand, wrapExecute } from "."
|
||||
|
||||
export const Image: ICommand = {
|
||||
name: "upload-image",
|
||||
label: "Upload Image",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { EditorSelection } from "@codemirror/state"
|
||||
import { ICommand, prependExecute, wrapExecute } from "."
|
||||
import { ICommand, wrapExecute } from "."
|
||||
|
||||
export const Link: ICommand = {
|
||||
name: "link",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import { EditorSelection } from "@codemirror/state"
|
||||
import { ICommand, wrapExecute } from "."
|
||||
|
||||
export const ListOrdered: ICommand = {
|
||||
|
|
|
|||
|
|
@ -1,21 +1,23 @@
|
|||
import { Dispatch, SetStateAction } from "react"
|
||||
|
||||
import { EditorSelection } from "@codemirror/state"
|
||||
import { EditorView } from "@codemirror/view"
|
||||
import { Dispatch, SetStateAction } from "react"
|
||||
|
||||
import { Bold } from "./Bold"
|
||||
import { Code } from "./Code"
|
||||
import { CodeBlock } from "./CodeBlock"
|
||||
import { Emoji } from "./Emoji"
|
||||
import { Heading } from "./Heading"
|
||||
import { Help } from "./Help"
|
||||
import { Image } from "./Image"
|
||||
import { Italic } from "./Italic"
|
||||
import { Link } from "./Link"
|
||||
import { ListOrdered } from "./ListOrdered"
|
||||
import { ListUnordered } from "./ListUnordered"
|
||||
import { Mention } from "./Mention"
|
||||
import { Quote } from "./Quote"
|
||||
import { Strikethrough } from "./Strikethrough"
|
||||
import { Underline } from "./Underline"
|
||||
import { Mention } from "./Mention"
|
||||
import { Emoji } from "./Emoji"
|
||||
import { Help } from "./Help"
|
||||
|
||||
export type ICommand<P = any> = {
|
||||
icon: string
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { useEffect } from "react"
|
||||
|
||||
import { clipboardCopy } from "~/lib/copy.client"
|
||||
|
||||
export const useCodeCopy = () => {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
import type { Extension } from "@codemirror/state"
|
||||
import { Compartment } from "@codemirror/state"
|
||||
import { EditorView } from "@codemirror/view"
|
||||
import { useEffect, useRef } from "react"
|
||||
|
||||
import type { Extension } from "@codemirror/state"
|
||||
import { Compartment } from "@codemirror/state"
|
||||
import { oneDark } from "@codemirror/theme-one-dark"
|
||||
import { EditorView } from "@codemirror/view"
|
||||
import { githubLight } from "@ddietr/codemirror-themes/theme/github-light"
|
||||
|
||||
import { useIsUnmounted } from "./useLifecycle"
|
||||
import { useIsMobileLayout } from "./useMobileLayout"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
import { useEffect, useRef, useState } from "react"
|
||||
import { create } from "zustand"
|
||||
import { getStorage, setStorage, delStorage } from "~/lib/storage"
|
||||
|
||||
import { delStorage, getStorage, setStorage } from "~/lib/storage"
|
||||
|
||||
import { useGetState } from "./useGetState"
|
||||
|
||||
interface IMediaStore {
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
import dayjs from "dayjs"
|
||||
|
||||
import utc from "dayjs/plugin/utc"
|
||||
import tz from "dayjs/plugin/timezone"
|
||||
import localizedFormat from "dayjs/plugin/localizedFormat"
|
||||
import duration from "dayjs/plugin/duration"
|
||||
import relativeTime from "dayjs/plugin/relativeTime"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import "dayjs/locale/en"
|
||||
import "dayjs/locale/ja"
|
||||
import "dayjs/locale/zh"
|
||||
import "dayjs/locale/zh-tw"
|
||||
import "dayjs/locale/ja"
|
||||
import duration from "dayjs/plugin/duration"
|
||||
import localizedFormat from "dayjs/plugin/localizedFormat"
|
||||
import relativeTime from "dayjs/plugin/relativeTime"
|
||||
import tz from "dayjs/plugin/timezone"
|
||||
import utc from "dayjs/plugin/utc"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { useMemo } from "react"
|
||||
|
||||
dayjs.extend(localizedFormat)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { useCallback } from "react"
|
||||
|
||||
import { UploadFile } from "../lib/upload-file"
|
||||
|
||||
export const useUploadFile = () => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { useAccountSites } from "~/queries/site"
|
||||
import { useGetSite, useIsOperators } from "~/queries/site"
|
||||
import { useAccountState } from "@crossbell/connect-kit"
|
||||
|
||||
import { useAccountSites, useGetSite, useIsOperators } from "~/queries/site"
|
||||
|
||||
export function useUserRole(subdomain?: string) {
|
||||
const site = useGetSite(subdomain)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
import { Note, Profile } from "~/lib/types"
|
||||
import { nanoid } from "nanoid"
|
||||
import { toGateway } from "~/lib/ipfs-parser"
|
||||
import { SITE_URL, SCORE_API_DOMAIN } from "~/lib/env"
|
||||
import { toCid } from "~/lib/ipfs-parser"
|
||||
import { ExpandedNote } from "~/lib/types"
|
||||
|
||||
import { SCORE_API_DOMAIN, SITE_URL } from "~/lib/env"
|
||||
import { toCid, toGateway } from "~/lib/ipfs-parser"
|
||||
import { ExpandedNote, Note, Profile } from "~/lib/types"
|
||||
|
||||
export const expandUnidataNote = async (page: Note, useStat?: boolean) => {
|
||||
if (page.body?.content && page.body?.mime_type === "text/markdown") {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { NoteEntity } from "crossbell.js"
|
||||
import { Note } from "unidata.js"
|
||||
|
||||
import { IS_PROD } from "./constants"
|
||||
import { OUR_DOMAIN } from "./env"
|
||||
import { Note } from "unidata.js"
|
||||
|
||||
export const getSiteLink = ({
|
||||
domain,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
import { fetchGetSite } from "~/queries/site.server"
|
||||
import { fetchGetPagesBySite } from "~/queries/page.server"
|
||||
import { PageVisibilityEnum } from "~/lib/types"
|
||||
import { getSiteLink } from "~/lib/helpers"
|
||||
import { QueryClient } from "@tanstack/react-query"
|
||||
|
||||
import { getSiteLink } from "~/lib/helpers"
|
||||
import { PageVisibilityEnum } from "~/lib/types"
|
||||
import { renderPageContent } from "~/markdown"
|
||||
import { fetchGetPagesBySite } from "~/queries/page.server"
|
||||
import { fetchGetSite } from "~/queries/site.server"
|
||||
|
||||
export const getJsonFeed = async (domainOrSubdomain: string, path: string) => {
|
||||
const queryClient = new QueryClient()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import dayjs from "dayjs"
|
||||
|
||||
import { PageVisibilityEnum } from "./types"
|
||||
|
||||
export const getPageVisibility = ({
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { get, set, del } from "idb-keyval"
|
||||
import { del, get, set } from "idb-keyval"
|
||||
|
||||
import {
|
||||
PersistedClient,
|
||||
Persister,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { renderPageContent } from "~/markdown"
|
||||
import { getDefaultSlug } from "~/lib/default-slug"
|
||||
import { renderPageContent } from "~/markdown"
|
||||
|
||||
const makeArray = (value: any) => {
|
||||
if (Array.isArray(value)) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import Redis from "ioredis"
|
||||
import { REDIS_URL, REDIS_EXPIRE, REDIS_REFRESH } from "~/lib/env.server"
|
||||
|
||||
import { REDIS_EXPIRE, REDIS_REFRESH, REDIS_URL } from "~/lib/env.server"
|
||||
|
||||
if (!REDIS_URL) {
|
||||
console.error("REDIS_URL not set")
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
import {
|
||||
GetServerSidePropsContext,
|
||||
GetServerSideProps,
|
||||
GetServerSidePropsResult,
|
||||
} from "next"
|
||||
import { GetServerSidePropsContext, GetServerSidePropsResult } from "next"
|
||||
|
||||
class Redirect extends Error {
|
||||
constructor(public url: string) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import type { Note as UniNote, Profile as UniProfile } from "unidata.js"
|
||||
import { ReactElement } from "react"
|
||||
import { NoteEntity } from "crossbell.js"
|
||||
import { ReactElement } from "react"
|
||||
import type { Note as UniNote, Profile as UniProfile } from "unidata.js"
|
||||
|
||||
export type Site = {
|
||||
id: string
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { ConnectKitProviderProps } from "@crossbell/connect-kit"
|
||||
|
||||
import { getNoteSlug, getSiteLink } from "~/lib/helpers"
|
||||
import { CSB_IO } from "~/lib/env"
|
||||
import { getNoteSlug, getSiteLink } from "~/lib/helpers"
|
||||
|
||||
export const urlComposer: ConnectKitProviderProps["urlComposer"] = {
|
||||
characterUrl: ({ handle }) => getSiteLink({ subdomain: handle }),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { test, describe, expect } from "vitest"
|
||||
import { describe, expect, test } from "vitest"
|
||||
|
||||
import { renderPageContent } from "./index"
|
||||
|
||||
describe("html", () => {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue