Merge pull request #1182 from Crossbell-Box/dev

release
This commit is contained in:
Caspian Zhao 2023-12-21 20:54:34 +00:00 committed by GitHub
commit 758add612a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 384 additions and 78 deletions

View File

@ -186,7 +186,7 @@
"@types/uuid": "9.0.7",
"autoprefixer": "10.4.16",
"babel-loader": "9.1.3",
"cspell": "8.1.3",
"cspell": "8.2.0",
"esbuild": "0.19.10",
"esbuild-register": "3.5.0",
"eslint": "8.56.0",

View File

@ -470,8 +470,8 @@ devDependencies:
specifier: 9.1.3
version: 9.1.3(@babel/core@7.23.6)(webpack@5.89.0)
cspell:
specifier: 8.1.3
version: 8.1.3
specifier: 8.2.0
version: 8.2.0
esbuild:
specifier: 0.19.10
version: 0.19.10
@ -1472,8 +1472,8 @@ packages:
- zod
dev: false
/@cspell/cspell-bundled-dicts@8.1.3:
resolution: {integrity: sha512-TwLyL2bCtetXGhMudjOIgFPAsWF2UkT0E7T+DAZG8aUBfHoC/eco/sTmR6UJVpi6Crjs0YOQkFUBGrQ2pxJPcA==}
/@cspell/cspell-bundled-dicts@8.2.0:
resolution: {integrity: sha512-48MZbQXRJgwNtyUMVs7UfoTRtc/TBGDIG33NIm3nBOpzD/VyUQsNKJOUPdTwWIR3zfM7MZWS72ojjoc0XXmZjA==}
engines: {node: '>=18'}
dependencies:
'@cspell/dict-ada': 4.0.2
@ -1526,32 +1526,32 @@ packages:
'@cspell/dict-vue': 3.0.0
dev: true
/@cspell/cspell-json-reporter@8.1.3:
resolution: {integrity: sha512-9iOU0Y733XuF0cqC7xwzJkOKFdJ65rYGnHFdUHzr5lxEqeG9X/jhlkzyHuGGOhPxkUeFP1x9XoLhXo1isMDbKA==}
/@cspell/cspell-json-reporter@8.2.0:
resolution: {integrity: sha512-4KQSXZQ1k4YRDtVKljt9nr9HDUO5W737Fmz1ss6Y3LrmJtAk3sEDu5OTqT5NxxoCZ1LRIrY8ghjcuEA5AnAFRg==}
engines: {node: '>=18'}
dependencies:
'@cspell/cspell-types': 8.1.3
'@cspell/cspell-types': 8.2.0
dev: true
/@cspell/cspell-pipe@8.1.3:
resolution: {integrity: sha512-/dcnyLDeyFuoX4seZv7VsDQyRpt3ZY0vjZiDpqFul8hPydM8czLyRPPMD6Za+Gqg6dZmh9+VsQWK52hVsqc0QA==}
/@cspell/cspell-pipe@8.2.0:
resolution: {integrity: sha512-1nAyh4q/6DXe6FTOm7O94i8dK4dnzh5Oa+glNDQ8rEkJPOg4VydhlQFJZfwccQecs44u84cWfbgUwD4yVxOb4w==}
engines: {node: '>=18'}
dev: true
/@cspell/cspell-resolver@8.1.3:
resolution: {integrity: sha512-bGyJYqkHRilqhyKGL/NvODN5U+UvCuQo7kxgt0i3Vd7m7k6XYLsSLYZ4w6r1S5IQ/ybU8I5lh6/6fNqKwvo9eg==}
/@cspell/cspell-resolver@8.2.0:
resolution: {integrity: sha512-osZbXD1VbOBT9CazcPaAd9MzAvAaOqiXgPr7kqS9sbvzYKOk5vmVTTjLLboEh1WN5j6ACS2ZEcKlj1BqX5WNIw==}
engines: {node: '>=18'}
dependencies:
global-directory: 4.0.1
dev: true
/@cspell/cspell-service-bus@8.1.3:
resolution: {integrity: sha512-8E5ZveQKneNfK+cuFMy0y6tDsho71UPppEHNoLZsEFDbIxDdtQcAfs0pk4nwEzxPBt+dBB+Yl8KExQ6x2FAYQw==}
/@cspell/cspell-service-bus@8.2.0:
resolution: {integrity: sha512-FO8HdVk7qVq2dXeUgO/gwkzzbv81J0YGTAUU+2J8FfZFcQhwy4Ni3MpgrsDZMFaVPyWjjpuYjMZNpYHUBuz56A==}
engines: {node: '>=18'}
dev: true
/@cspell/cspell-types@8.1.3:
resolution: {integrity: sha512-j14FENj+DzWu6JjzTl+0X5/OJv9AEckpEp6Jaw9YglxirrBBzTkZGfoLePe/AWo/MlIYp0asl92C1UHEjgz+FQ==}
/@cspell/cspell-types@8.2.0:
resolution: {integrity: sha512-thC5L6tYvvYKPTlYLy2+vZlJRhsO8Jr3dOV3uQyowD0/5ghKBTbptyhuC9vUoL/Ts3MpYAXnwNfgxUhgsTsQDA==}
engines: {node: '>=18'}
dev: true
@ -1753,15 +1753,15 @@ packages:
resolution: {integrity: sha512-niiEMPWPV9IeRBRzZ0TBZmNnkK3olkOPYxC1Ny2AX4TGlYRajcW0WUtoSHmvvjZNfWLSg2L6ruiBeuPSbjnG6A==}
dev: true
/@cspell/dynamic-import@8.1.3:
resolution: {integrity: sha512-/lXFLa92v4oOcZ2PbdRpOqBvnqWlYmGaV7iCy8+QhIWlMdzi+7tBX3LVTm9Jzvt/rJseVHQQ6RvfTsSmhbUMFQ==}
/@cspell/dynamic-import@8.2.0:
resolution: {integrity: sha512-HlB05MiEmv6ExREhXx/7dq6Funn+oxua2GTID5ys2zCjHVDHKGbP0k0GNq+skvQ7JDsdMsO3BboUt9hfVjZq3Q==}
engines: {node: '>=18.0'}
dependencies:
import-meta-resolve: 4.0.0
dev: true
/@cspell/strong-weak-map@8.1.3:
resolution: {integrity: sha512-GhWyximzk8tumo0zhrDV3+nFYiETYefiTBWAEVbXJMibuvitFocVZwddqN85J0UdZ2M7q6tvBleEaI9ME/16gA==}
/@cspell/strong-weak-map@8.2.0:
resolution: {integrity: sha512-tMMa0/DUzEQw7kkEsav5fI8U+INT1/HKiwqPAeL/Bt6KMPeuBqLyRQB9pk2gIJqhFF7WFB7Wilqh9Z45Emmomw==}
engines: {node: '>=18'}
dev: true
@ -2362,6 +2362,18 @@ packages:
resolution: {integrity: sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==}
dev: false
/@isaacs/cliui@8.0.2:
resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==}
engines: {node: '>=12'}
dependencies:
string-width: 5.1.2
string-width-cjs: /string-width@4.2.3
strip-ansi: 7.1.0
strip-ansi-cjs: /strip-ansi@6.0.1
wrap-ansi: 8.1.0
wrap-ansi-cjs: /wrap-ansi@7.0.0
dev: true
/@jridgewell/gen-mapping@0.3.3:
resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==}
engines: {node: '>=6.0.0'}
@ -3299,6 +3311,13 @@ packages:
'@parcel/watcher-win32-x64': 2.3.0
dev: false
/@pkgjs/parseargs@0.11.0:
resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
engines: {node: '>=14'}
requiresBuild: true
dev: true
optional: true
/@polka/url@1.0.0-next.24:
resolution: {integrity: sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ==}
dev: true
@ -5875,77 +5894,77 @@ packages:
type-fest: 1.4.0
dev: true
/cspell-config-lib@8.1.3:
resolution: {integrity: sha512-whzJYxcxos3vnywn0alCFZ+Myc0K/C62pUurfOGhgvIba7ArmlXhNRaL2r5noBxWARtpBOtzz3vrzSBK7Lq6jg==}
/cspell-config-lib@8.2.0:
resolution: {integrity: sha512-WkFs++EPELsjkMoD7OaELgHiBri8AgjN9oVq6ARGmu1B5SROwgAVnEXO4nAOQrozqaMZG1425OhIP1EKhCvKiA==}
engines: {node: '>=18'}
dependencies:
'@cspell/cspell-types': 8.1.3
'@cspell/cspell-types': 8.2.0
comment-json: 4.2.3
yaml: 2.3.4
dev: true
/cspell-dictionary@8.1.3:
resolution: {integrity: sha512-nkRQDPNnA6tw+hJFBqq26M0nK306q5rtyv/AUIWa8ZHhQkwzACnpMSpuJA7/DV5GVvPKltMK5M4A6vgfpoaFHw==}
/cspell-dictionary@8.2.0:
resolution: {integrity: sha512-fUmByLdEyfVOBgZk9hJP+QBd5EThPAofJXxmmkWvaqPIcJ2tc76erUcH8rNioX7A8T+ZyODUsHdD06w8XYwM5A==}
engines: {node: '>=18'}
dependencies:
'@cspell/cspell-pipe': 8.1.3
'@cspell/cspell-types': 8.1.3
cspell-trie-lib: 8.1.3
'@cspell/cspell-pipe': 8.2.0
'@cspell/cspell-types': 8.2.0
cspell-trie-lib: 8.2.0
fast-equals: 5.0.1
gensequence: 6.0.0
dev: true
/cspell-gitignore@8.1.3:
resolution: {integrity: sha512-NHx5lg44eCKb6yJmUPOCz4prcuYowzoo5GJ5hOcCfbk7ZEBWV1E2/kDRuQMOK2W0y1hNGr45CSxO3UxWJlYg7w==}
/cspell-gitignore@8.2.0:
resolution: {integrity: sha512-4JhPVkn+NAmuUD6HkGIcVDLKg1c/h5Rfw4ftHSFFyU4zEt8KQlNl4aaqMHMWADFPsrO8rwzsAZURf20aWbMKwQ==}
engines: {node: '>=18'}
hasBin: true
dependencies:
cspell-glob: 8.1.3
cspell-glob: 8.2.0
find-up-simple: 1.0.0
dev: true
/cspell-glob@8.1.3:
resolution: {integrity: sha512-Likr7UVUXBpthQnM5r6yao3X0YBNRbJ9AHWXTC2RJfzwZOFKF+pKPfeo3FU+Px8My96M4RC2bVMbrbZUwN5NJw==}
/cspell-glob@8.2.0:
resolution: {integrity: sha512-2yNmMgCO8/diqi/xJOfm8FHqkeXu2rPOxGLSiqn0ENaOe1Nb+dumkdO4qiCvFm+AVUPSjE97Mfkje/llLXSRkA==}
engines: {node: '>=18'}
dependencies:
micromatch: 4.0.5
dev: true
/cspell-grammar@8.1.3:
resolution: {integrity: sha512-dTOwNq6a5wcVzOsi4xY5/tq2r2w/+wLVU+WfyySTsPe66Rjqx/QceFl4OinImks/ZMKF7Zyjd3WGyQ5TcSsJFQ==}
/cspell-grammar@8.2.0:
resolution: {integrity: sha512-FXtMStcufaAS7ybS0zzD5udUpMSSF93RaunBd8XgkA+INWqewqIjoTiaVA84Ft6kM+OAybRyWfbPDpZIvaSKAw==}
engines: {node: '>=18'}
hasBin: true
dependencies:
'@cspell/cspell-pipe': 8.1.3
'@cspell/cspell-types': 8.1.3
'@cspell/cspell-pipe': 8.2.0
'@cspell/cspell-types': 8.2.0
dev: true
/cspell-io@8.1.3:
resolution: {integrity: sha512-QkcFeYd79oIl7PgSqFSZyvwXnZQhXmdCI733n54IN2+iXDcf7W0mwptxoC/cE19RkEwAwEFLG81UAy6L/BXI6A==}
/cspell-io@8.2.0:
resolution: {integrity: sha512-oVcwQPORHK2v9wgqOuk2WpTyxOUhbrMqD9srkqaxQvctd3coyzFSmRM8BcmR1DwDDZy67Zl/RYoniaQyzMQudQ==}
engines: {node: '>=18'}
dependencies:
'@cspell/cspell-service-bus': 8.1.3
'@cspell/cspell-service-bus': 8.2.0
dev: true
/cspell-lib@8.1.3:
resolution: {integrity: sha512-Kk8bpHVkDZO4MEiPkDvRf/LgJ0h5mufbKLTWModq6k0Ca8EkZ/qgQlZ0ve0rIivbleSqebuWjpJHKDM+IHmzHA==}
/cspell-lib@8.2.0:
resolution: {integrity: sha512-lnfql8ojpfRHgFNHGKUomkg+xQacs43IURn8kSuGWTx0ymYV5DOy4/xIfHHgAVfuXngzjDveDyn+ttBAro661Q==}
engines: {node: '>=18'}
dependencies:
'@cspell/cspell-bundled-dicts': 8.1.3
'@cspell/cspell-pipe': 8.1.3
'@cspell/cspell-resolver': 8.1.3
'@cspell/cspell-types': 8.1.3
'@cspell/dynamic-import': 8.1.3
'@cspell/strong-weak-map': 8.1.3
'@cspell/cspell-bundled-dicts': 8.2.0
'@cspell/cspell-pipe': 8.2.0
'@cspell/cspell-resolver': 8.2.0
'@cspell/cspell-types': 8.2.0
'@cspell/dynamic-import': 8.2.0
'@cspell/strong-weak-map': 8.2.0
clear-module: 4.1.2
comment-json: 4.2.3
configstore: 6.0.0
cspell-config-lib: 8.1.3
cspell-dictionary: 8.1.3
cspell-glob: 8.1.3
cspell-grammar: 8.1.3
cspell-io: 8.1.3
cspell-trie-lib: 8.1.3
cspell-config-lib: 8.2.0
cspell-dictionary: 8.2.0
cspell-glob: 8.2.0
cspell-grammar: 8.2.0
cspell-io: 8.2.0
cspell-trie-lib: 8.2.0
fast-equals: 5.0.1
gensequence: 6.0.0
import-fresh: 3.3.0
@ -5954,34 +5973,34 @@ packages:
vscode-uri: 3.0.8
dev: true
/cspell-trie-lib@8.1.3:
resolution: {integrity: sha512-EDSYU9MCtzPSJDrfvDrTKmc0rzl50Ehjg1c5rUCqn33p2LCRe/G8hW0FxXe0mxrZxrMO2b8l0PVSGlrCXCQ8RQ==}
/cspell-trie-lib@8.2.0:
resolution: {integrity: sha512-zadzMa3DUvIvu90q/ZvA9N8GHw+eyEf3pPYvd/bKgVqhu3wvOmxBmvcGoLQsDbCnFPcVZlvdbxZuPNtMej19Rw==}
engines: {node: '>=18'}
dependencies:
'@cspell/cspell-pipe': 8.1.3
'@cspell/cspell-types': 8.1.3
'@cspell/cspell-pipe': 8.2.0
'@cspell/cspell-types': 8.2.0
gensequence: 6.0.0
dev: true
/cspell@8.1.3:
resolution: {integrity: sha512-SU4Su6002bPoJYaiMeNV4wwLoS8TwaOgIwaTxhys3GDbJIxZV6CrDgwksezHcG7TZrC4yrveDVsdpnrzmQ7T5Q==}
/cspell@8.2.0:
resolution: {integrity: sha512-qGU1+KvxuHoDDQnk9OHjcC+MBlxP8QmMNCJfuTzVuFxfik0QKhqZrM5K3UpcRSxpmcMICc0Eev2K9ZziA08LGw==}
engines: {node: '>=18'}
hasBin: true
dependencies:
'@cspell/cspell-json-reporter': 8.1.3
'@cspell/cspell-pipe': 8.1.3
'@cspell/cspell-types': 8.1.3
'@cspell/dynamic-import': 8.1.3
'@cspell/cspell-json-reporter': 8.2.0
'@cspell/cspell-pipe': 8.2.0
'@cspell/cspell-types': 8.2.0
'@cspell/dynamic-import': 8.2.0
chalk: 5.3.0
chalk-template: 1.1.0
commander: 11.1.0
cspell-gitignore: 8.1.3
cspell-glob: 8.1.3
cspell-io: 8.1.3
cspell-lib: 8.1.3
cspell-gitignore: 8.2.0
cspell-glob: 8.2.0
cspell-io: 8.2.0
cspell-lib: 8.2.0
fast-glob: 3.3.2
fast-json-stable-stringify: 2.1.0
file-entry-cache: 7.0.2
file-entry-cache: 8.0.0
get-stdin: 9.0.0
semver: 7.5.4
strip-ansi: 7.1.0
@ -6624,6 +6643,10 @@ packages:
stream-shift: 1.0.1
dev: false
/eastasianwidth@0.2.0:
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
dev: true
/eip1193-types@0.2.1:
resolution: {integrity: sha512-n2tTVuhC97/wIvVwYzzhE/hY64wATs4wJDGqZsoLGXep8DL+r23wsgqU/oOSoce/k/Qcyk5xqIpK7ZVtYog+Eg==}
engines: {node: '>=14.19.0'}
@ -6663,7 +6686,6 @@ packages:
/emoji-regex@8.0.0:
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
dev: false
/emoji-regex@9.2.2:
resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}
@ -7428,11 +7450,11 @@ packages:
flat-cache: 3.2.0
dev: true
/file-entry-cache@7.0.2:
resolution: {integrity: sha512-TfW7/1iI4Cy7Y8L6iqNdZQVvdXn0f8B4QcIXmkIbtTIe/Okm/nSlHb4IwGzRVOd3WfSieCgvf5cMzEfySAIl0g==}
engines: {node: '>=12.0.0'}
/file-entry-cache@8.0.0:
resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==}
engines: {node: '>=16.0.0'}
dependencies:
flat-cache: 3.2.0
flat-cache: 4.0.0
dev: true
/file-selector@0.6.0:
@ -7507,6 +7529,15 @@ packages:
rimraf: 3.0.2
dev: true
/flat-cache@4.0.0:
resolution: {integrity: sha512-EryKbCE/wxpxKniQlyas6PY1I9vwtF3uCBweX+N8KYTCn3Y12RTGtQAJ/bd5pl7kxUAc8v/R3Ake/N17OZiFqA==}
engines: {node: '>=16'}
dependencies:
flatted: 3.2.9
keyv: 4.5.4
rimraf: 5.0.5
dev: true
/flat@5.0.2:
resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==}
hasBin: true
@ -7538,6 +7569,14 @@ packages:
dependencies:
is-callable: 1.2.7
/foreground-child@3.1.1:
resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==}
engines: {node: '>=14'}
dependencies:
cross-spawn: 7.0.3
signal-exit: 4.1.0
dev: true
/form-data-encoder@1.7.2:
resolution: {integrity: sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==}
dev: false
@ -7703,6 +7742,18 @@ packages:
/glob-to-regexp@0.4.1:
resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==}
/glob@10.3.10:
resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==}
engines: {node: '>=16 || 14 >=14.17'}
hasBin: true
dependencies:
foreground-child: 3.1.1
jackspeak: 2.3.6
minimatch: 9.0.3
minipass: 7.0.4
path-scurry: 1.10.1
dev: true
/glob@7.1.6:
resolution: {integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==}
dependencies:
@ -8496,7 +8547,6 @@ packages:
/is-fullwidth-code-point@3.0.0:
resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}
engines: {node: '>=8'}
dev: false
/is-fullwidth-code-point@4.0.0:
resolution: {integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==}
@ -8691,6 +8741,15 @@ packages:
set-function-name: 2.0.1
dev: true
/jackspeak@2.3.6:
resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==}
engines: {node: '>=14'}
dependencies:
'@isaacs/cliui': 8.0.2
optionalDependencies:
'@pkgjs/parseargs': 0.11.0
dev: true
/jayson@4.1.0:
resolution: {integrity: sha512-R6JlbyLN53Mjku329XoRT2zJAE6ZgOQ8f91ucYdMCD4nkGCF9kZSrcGXpHIU4jeKj58zUZke2p+cdQchU7Ly7A==}
engines: {node: '>=8'}
@ -9403,7 +9462,6 @@ packages:
/lru-cache@10.1.0:
resolution: {integrity: sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==}
engines: {node: 14 || >=16.14}
dev: false
/lru-cache@5.1.1:
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
@ -10037,6 +10095,11 @@ packages:
/minimist@1.2.8:
resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}
/minipass@7.0.4:
resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==}
engines: {node: '>=16 || 14 >=14.17'}
dev: true
/mkdirp-classic@0.5.3:
resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==}
dev: false
@ -10674,6 +10737,14 @@ packages:
/path-parse@1.0.7:
resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
/path-scurry@1.10.1:
resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==}
engines: {node: '>=16 || 14 >=14.17'}
dependencies:
lru-cache: 10.1.0
minipass: 7.0.4
dev: true
/path-to-regexp@6.2.1:
resolution: {integrity: sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==}
dev: false
@ -11783,6 +11854,14 @@ packages:
glob: 7.2.3
dev: true
/rimraf@5.0.5:
resolution: {integrity: sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==}
engines: {node: '>=14'}
hasBin: true
dependencies:
glob: 10.3.10
dev: true
/robust-predicates@3.0.2:
resolution: {integrity: sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==}
dev: false
@ -12156,7 +12235,15 @@ packages:
emoji-regex: 8.0.0
is-fullwidth-code-point: 3.0.0
strip-ansi: 6.0.1
dev: false
/string-width@5.1.2:
resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==}
engines: {node: '>=12'}
dependencies:
eastasianwidth: 0.2.0
emoji-regex: 9.2.2
strip-ansi: 7.1.0
dev: true
/string-width@7.0.0:
resolution: {integrity: sha512-GPQHj7row82Hjo9hKZieKcHIhaAIKOJvFSIZXuCU9OASVZrMNUaZuz++SPVrBjnLsnk4k+z9f2EIypgxf2vNFw==}
@ -13569,6 +13656,24 @@ packages:
strip-ansi: 6.0.1
dev: false
/wrap-ansi@7.0.0:
resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}
engines: {node: '>=10'}
dependencies:
ansi-styles: 4.3.0
string-width: 4.2.3
strip-ansi: 6.0.1
dev: true
/wrap-ansi@8.1.0:
resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==}
engines: {node: '>=12'}
dependencies:
ansi-styles: 6.2.1
string-width: 5.1.2
strip-ansi: 7.1.0
dev: true
/wrap-ansi@9.0.0:
resolution: {integrity: sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==}
engines: {node: '>=18'}

View File

@ -15,11 +15,13 @@ export default function PostCover({
title,
uniqueKey,
className,
imgClassName,
}: {
images?: string[]
title?: string
uniqueKey?: string
className?: string
imgClassName?: string
}) {
return (
<>
@ -47,7 +49,10 @@ export default function PostCover({
<SwiperSlide key={image}>
<div className="text-[0px] w-full h-full">
<Image
className="object-cover w-full sm:group-hover:scale-105 sm:transition-transform sm:duration-400 sm:ease-in-out bg-white"
className={cn(
"object-cover w-full sm:group-hover:scale-105 sm:transition-transform sm:duration-400 sm:ease-in-out bg-white",
imgClassName,
)}
alt="cover"
src={image}
width={624}

View File

@ -0,0 +1,151 @@
"use client"
import { useLocale } from "next-intl"
import React, { FC, useCallback } from "react"
import { Language } from "~/lib/types"
import { cn, isMobileDevice } from "~/lib/utils"
import { useGetPage } from "~/queries/page"
import { useGetSite } from "~/queries/site"
import { Time } from "../common/Time"
import PostCover from "../home/PostCover"
import { Avatar } from "./Avatar"
import { UniLink } from "./UniLink"
interface Props {
slug: string
handle: string
url: string
}
const XLogShorts: FC<Props> = ({ slug, handle, url }) => {
const [isExpanded, setIsExpanded] = React.useState(false)
const locale = useLocale() as Language
// https://xlog.app/site/lca/JOoXQKAtZYYFrnzntDlJ6?content_type=shorts
const site = useGetSite(handle)
const page = useGetPage({
characterId: site.data?.characterId,
slug,
handle,
disableAutofill: true,
translateTo: locale,
})
const images = page.data?.metadata?.content?.attachments
?.filter((attachment) => attachment.name === "image")
.map((img) => img.address || "")
.filter(Boolean)
const isMobile = isMobileDevice()
const isShort = !!page.data?.metadata?.content?.tags?.includes("short")
const toggleExpand = useCallback(
(e: React.MouseEvent<HTMLElement, MouseEvent>) => {
e.stopPropagation()
setIsExpanded((prev) => !prev)
},
[],
)
const handleRedirect = useCallback(() => {
window.open(url, "_blank")
}, [url])
if (page.isLoading) return <div>Loading...</div>
if (!isShort) return <UniLink href={url}>{url}</UniLink>
return (
<div
onClick={handleRedirect}
className={cn(
"flex flex-col md:flex-row w-full bg-zinc-50 rounded-xl p-4 gap-x-4 hover:cursor-pointer",
isExpanded ? "sm:h-[350px]" : "sm:h-[150px]",
"transition-all duration-500 ease-in-out",
)}
>
<div
onClick={(e) => e.stopPropagation()}
className={cn(
"w-full h-full mb-2 sm:mb-0 align-middle flex items-center justify-center",
isExpanded ? "sm:w-[350px]" : "sm:w-[150px]",
"transition-all duration-500 ease-in-out",
)}
>
<PostCover
uniqueKey={`short-${page.data?.characterId}-${page.data?.noteId}`}
images={images}
title={page.data?.metadata?.content?.title}
className="rounded-lg w-full aspect-auto border-b-0 h-full"
imgClassName="rounded-lg object-contain"
/>
</div>
<div className="flex-1 flex flex-col justify-between">
<div className="flex-1 flex flex-col overflow-hidden">
{page.data?.metadata?.content?.title && (
<div className="font-bold mb-2 text-lg truncate">
{page.data?.metadata?.content?.title}
</div>
)}
<div className="prose overflow-y-auto">
<p
className={
isExpanded || isMobile ? "line-clamp-6" : "line-clamp-1"
}
>
{page.data?.metadata?.content?.content}
</p>
</div>
</div>
<div className="flex flex-row w-full justify-between items-end sm:mt-0 mt-4">
<span className="text-sm">
<Time isoString={page.data?.metadata?.content?.date_published} />
</span>
<span className="p-2 flex w-auto justify-end items-center transition-colors py-1 rounded-lg">
<Avatar
cid={site.data?.characterId}
className="align-middle"
images={site.data?.metadata?.content?.avatars || []}
name={site.data?.metadata?.content?.name}
size={32}
/>
<div
className={`flex-1 flex-col min-w-0 ml-2 max-w-[100px] flex sm:mr-6`}
>
<span
className={`text-left leading-none font-medium truncate text-gray-600 text-base`}
style={{ marginBottom: "0.15rem" }}
>
{site.data?.metadata?.content?.name}
</span>
{site.data?.handle && (
<span
className={`text-left leading-none text-sm truncate text-gray-400`}
>
{"@" + site.data?.handle}
</span>
)}
</div>
<i
className={cn(
"i-mingcute-arrows-down-line text-xl ml-[2px] text-accent hover:cursor-pointer",
isExpanded ? "rotate-180" : "rotate-0",
"transition-transform duration-500 ease-in-out",
"hidden sm:inline-block",
)}
onClick={toggleExpand}
/>
</span>
</div>
</div>
</div>
)
}
export default XLogShorts

View File

@ -0,0 +1,41 @@
import { match } from "path-to-regexp"
import type { Transformer } from "../rehype-embed"
function getParamsFromShortsURL(url: URL) {
let slug = ""
let handle = ""
// https://caspian-3030.xlog.app/AtOAglnMV_N6xslDbfhz4?ct=shorts
let matched = match<{ slug: string }>("/:slug")(url.pathname)
if (matched) {
slug = matched.params.slug
handle = url.host.split(".")[0]
} else {
// https://xlog.app/site/caspian-3030/AtOAglnMV_N6xslDbfhz4?ct=shorts
matched = match<{ slug: string; handle: string }>("/site/:handle/:slug")(
url.pathname,
)
if (!matched) return undefined
slug = matched?.params.slug || ""
// @ts-ignore
handle = matched?.params.handle || ""
}
return { slug, handle }
}
export const XLogShortsTransformer: Transformer = {
name: "XLogShorts",
shouldTransform(url) {
return !!getParamsFromShortsURL(url)
},
getHTML(url) {
const { slug, handle } = getParamsFromShortsURL(url)!
return `<xlog-shorts slug="${slug}" handle="${handle}" url="${url.toString()}"/>`
},
}

View File

@ -4,12 +4,14 @@ import { CodeSandboxTransformer } from "./CodeSandBox"
import { GitHubRepoTransformer } from "./GitHub"
import { NetEaseMusicTransformer } from "./NetEaseMusic"
import { SpotifyTransformer } from "./Spotify"
import { XLogShortsTransformer } from "./XLogShorts"
import { YouTubeTransformer } from "./YouTube"
export const transformers: Transformer[] = [
CodeSandboxTransformer,
GitHubRepoTransformer,
YouTubeTransformer,
XLogShortsTransformer,
NetEaseMusicTransformer,
BilibiliTransformer,
SpotifyTransformer,

View File

@ -57,6 +57,7 @@ const Style = dynamic(() => import("~/components/common/Style"))
const Mention = dynamic(() => import("~/components/ui/Mention"))
const Mermaid = dynamic(() => import("~/components/ui/Mermaid"))
const GithubRepo = dynamic(() => import("~/components/ui/GithubRepo"))
const XLogShorts = dynamic(() => import("~/components/ui/XLogShorts"))
const APlayer = dynamic(() => import("~/components/ui/APlayer"))
const DPlayer = dynamic(() => import("~/components/ui/DPlayer"))
@ -233,6 +234,7 @@ export const renderPageContent = (
audio: APlayer,
video: DPlayer,
"github-repo": GithubRepo,
"xlog-shorts": XLogShorts,
style: Style,
} as any,
})