Browse Source

updated files

master
limina1 2 years ago
parent
commit
56d5bc2249
  1. 217
      pnpm-lock.yaml
  2. 5
      src/lib/ArticleHeader.svelte
  3. 4
      src/lib/consts.ts
  4. 51
      src/lib/utils.ts
  5. 21
      src/routes/+layout.svelte
  6. 3334
      yarn.lock

217
pnpm-lock.yaml

@ -74,11 +74,11 @@ devDependencies: @@ -74,11 +74,11 @@ devDependencies:
specifier: ^5.0.2
version: 5.0.2(postcss@8.4.33)
prettier:
specifier: ^3.2.4
version: 3.2.4
specifier: ^3.2.5
version: 3.2.5
prettier-plugin-svelte:
specifier: ^3.1.2
version: 3.1.2(prettier@3.2.4)(svelte@4.2.9)
version: 3.1.2(prettier@3.2.5)(svelte@4.2.9)
svelte:
specifier: ^4.2.9
version: 4.2.9
@ -329,7 +329,7 @@ packages: @@ -329,7 +329,7 @@ packages:
debug: 4.3.4
espree: 9.6.1
globals: 13.24.0
ignore: 5.3.0
ignore: 5.3.1
import-fresh: 3.3.0
js-yaml: 4.1.0
minimatch: 3.1.2
@ -349,8 +349,8 @@ packages: @@ -349,8 +349,8 @@ packages:
'@floating-ui/utils': 0.2.1
dev: true
/@floating-ui/dom@1.6.0:
resolution: {integrity: sha512-SZ0BEXzsaaS6THZfZJUcAobbZTD+MvfGM42bxgeg0Tnkp4/an/avqwAXiVLsFtIBZtfsx3Ymvwx0+KnnhdA/9g==}
/@floating-ui/dom@1.6.1:
resolution: {integrity: sha512-iA8qE43/H5iGozC3W0YSnVSW42Vh522yyM1gj+BqRwVsTNOyr231PsXDaV04yT39PsO0QL2QpbI/M0ZaLUQgRQ==}
dependencies:
'@floating-ui/core': 1.6.0
'@floating-ui/utils': 0.2.1
@ -467,7 +467,7 @@ packages: @@ -467,7 +467,7 @@ packages:
engines: {node: '>= 8'}
dependencies:
'@nodelib/fs.scandir': 2.1.5
fastq: 1.16.0
fastq: 1.17.1
/@nostr-dev-kit/ndk-cache-dexie@2.2.4(typescript@5.3.3):
resolution: {integrity: sha512-HPdA+YnGrbNuXuqvGf1KpRoDo2avaqvJLlRE1iH8W8Yp45T8efJV9/UmT/OU7YgIoeL6k0y5F1zOCLu4P3pJSg==}
@ -492,7 +492,7 @@ packages: @@ -492,7 +492,7 @@ packages:
light-bolt11-decoder: 3.0.0
node-fetch: 3.3.2
nostr-tools: 1.17.0(typescript@5.3.3)
tseep: 1.2.0
tseep: 1.2.1
typescript-lru-cache: 2.0.0
utf8-buffer: 1.0.0
websocket-polyfill: 0.0.3
@ -654,7 +654,7 @@ packages: @@ -654,7 +654,7 @@ packages:
esm-env: 1.0.0
import-meta-resolve: 4.0.0
kleur: 4.1.5
magic-string: 0.30.5
magic-string: 0.30.7
mrmime: 2.0.0
sade: 1.8.1
set-cookie-parser: 2.6.0
@ -690,7 +690,7 @@ packages: @@ -690,7 +690,7 @@ packages:
debug: 4.3.4
deepmerge: 4.3.1
kleur: 4.1.5
magic-string: 0.30.5
magic-string: 0.30.7
svelte: 4.2.9
svelte-hmr: 0.15.3(svelte@4.2.9)
vite: 5.0.12
@ -745,13 +745,13 @@ packages: @@ -745,13 +745,13 @@ packages:
resolution: {integrity: sha512-Sk/uYFOBAB7mb74XcpizmH0KOR2Pv3D2Hmrh1Dmy5BmK3MpdSa5kqZcg6EKBdklU0bFXX9gCfzvpnyUehrPIuA==}
dev: true
/@typescript-eslint/types@6.19.1:
resolution: {integrity: sha512-6+bk6FEtBhvfYvpHsDgAL3uo4BfvnTnoge5LrrCj2eJN8g3IJdLTD4B/jK3Q6vo4Ql/Hoip9I8aB6fF+6RfDqg==}
/@typescript-eslint/types@6.21.0:
resolution: {integrity: sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==}
engines: {node: ^16.0.0 || >=18.0.0}
dev: false
/@typescript-eslint/typescript-estree@6.19.1(typescript@5.3.3):
resolution: {integrity: sha512-aFdAxuhzBFRWhy+H20nYu19+Km+gFfwNO4TEqyszkMcgBDYQjmPJ61erHxuT2ESJXhlhrO7I5EFIlZ+qGR8oVA==}
/@typescript-eslint/typescript-estree@6.21.0(typescript@5.3.3):
resolution: {integrity: sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
typescript: '*'
@ -759,24 +759,24 @@ packages: @@ -759,24 +759,24 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/types': 6.19.1
'@typescript-eslint/visitor-keys': 6.19.1
'@typescript-eslint/types': 6.21.0
'@typescript-eslint/visitor-keys': 6.21.0
debug: 4.3.4
globby: 11.1.0
is-glob: 4.0.3
minimatch: 9.0.3
semver: 7.5.4
ts-api-utils: 1.0.3(typescript@5.3.3)
semver: 7.6.0
ts-api-utils: 1.2.1(typescript@5.3.3)
typescript: 5.3.3
transitivePeerDependencies:
- supports-color
dev: false
/@typescript-eslint/visitor-keys@6.19.1:
resolution: {integrity: sha512-gkdtIO+xSO/SmI0W68DBg4u1KElmIUo3vXzgHyGPs6cxgB0sa3TlptRAAE0hUY1hM6FcDKEv7aIwiTGm76cXfQ==}
/@typescript-eslint/visitor-keys@6.21.0:
resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==}
engines: {node: ^16.0.0 || >=18.0.0}
dependencies:
'@typescript-eslint/types': 6.19.1
'@typescript-eslint/types': 6.21.0
eslint-visitor-keys: 3.4.3
dev: false
@ -869,7 +869,7 @@ packages: @@ -869,7 +869,7 @@ packages:
/assert@2.1.0:
resolution: {integrity: sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==}
dependencies:
call-bind: 1.0.5
call-bind: 1.0.6
is-nan: 1.3.2
object-is: 1.1.5
object.assign: 4.1.5
@ -890,8 +890,8 @@ packages: @@ -890,8 +890,8 @@ packages:
peerDependencies:
postcss: ^8.1.0
dependencies:
browserslist: 4.22.2
caniuse-lite: 1.0.30001579
browserslist: 4.22.3
caniuse-lite: 1.0.30001584
fraction.js: 4.3.7
normalize-range: 0.1.2
picocolors: 1.0.0
@ -899,8 +899,8 @@ packages: @@ -899,8 +899,8 @@ packages:
postcss-value-parser: 4.2.0
dev: true
/available-typed-arrays@1.0.5:
resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==}
/available-typed-arrays@1.0.6:
resolution: {integrity: sha512-j1QzY8iPNPG4o4xmO3ptzpRxTciqD3MgEHtifP/YnJpIo58Xu+ne4BejlbkuaLfXn/nz6HFiw29bLpj2PNMdGg==}
engines: {node: '>= 0.4'}
dev: false
@ -934,15 +934,15 @@ packages: @@ -934,15 +934,15 @@ packages:
dependencies:
fill-range: 7.0.1
/browserslist@4.22.2:
resolution: {integrity: sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==}
/browserslist@4.22.3:
resolution: {integrity: sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A==}
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true
dependencies:
caniuse-lite: 1.0.30001579
electron-to-chromium: 1.4.642
caniuse-lite: 1.0.30001584
electron-to-chromium: 1.4.657
node-releases: 2.0.14
update-browserslist-db: 1.0.13(browserslist@4.22.2)
update-browserslist-db: 1.0.13(browserslist@4.22.3)
dev: true
/buffer-crc32@0.2.13:
@ -957,12 +957,14 @@ packages: @@ -957,12 +957,14 @@ packages:
node-gyp-build: 4.8.0
dev: false
/call-bind@1.0.5:
resolution: {integrity: sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==}
/call-bind@1.0.6:
resolution: {integrity: sha512-Mj50FLHtlsoVfRfnHaZvyrooHcrlceNZdL/QBvJJVd9Ta55qCQK0gs4ss2oZDeV9zFCs6ewzYgVE5yfVmfFpVg==}
engines: {node: '>= 0.4'}
dependencies:
es-errors: 1.3.0
function-bind: 1.1.2
get-intrinsic: 1.2.2
set-function-length: 1.2.0
get-intrinsic: 1.2.4
set-function-length: 1.2.1
dev: false
/callsites@3.1.0:
@ -974,8 +976,8 @@ packages: @@ -974,8 +976,8 @@ packages:
resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==}
engines: {node: '>= 6'}
/caniuse-lite@1.0.30001579:
resolution: {integrity: sha512-u5AUVkixruKHJjw/pj9wISlcMpgFWzSrczLZbrqBSxukQixmg0SJ5sZTpvaFvxU0HoQKd4yoyAogyrAz9pzJnA==}
/caniuse-lite@1.0.30001584:
resolution: {integrity: sha512-LOz7CCQ9M1G7OjJOF9/mzmqmj3jE/7VOmrfw6Mgs0E8cjOsbRXQJHsPBfmBOXDskXKrHLyyW3n7kpDW/4BsfpQ==}
dev: true
/chalk@4.1.2:
@ -1098,11 +1100,12 @@ packages: @@ -1098,11 +1100,12 @@ packages:
resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==}
engines: {node: '>=0.10.0'}
/define-data-property@1.1.1:
resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==}
/define-data-property@1.1.2:
resolution: {integrity: sha512-SRtsSqsDbgpJBbW3pABMCOt6rQyeM8s8RiyeSN8jYG8sYmt/kGJejbydttUsnDs1tadr19tvhT4ShwMyoqAm4g==}
engines: {node: '>= 0.4'}
dependencies:
get-intrinsic: 1.2.2
es-errors: 1.3.0
get-intrinsic: 1.2.4
gopd: 1.0.1
has-property-descriptors: 1.0.1
dev: false
@ -1111,7 +1114,7 @@ packages: @@ -1111,7 +1114,7 @@ packages:
resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==}
engines: {node: '>= 0.4'}
dependencies:
define-data-property: 1.1.1
define-data-property: 1.1.2
has-property-descriptors: 1.0.1
object-keys: 1.1.1
dev: false
@ -1191,8 +1194,8 @@ packages: @@ -1191,8 +1194,8 @@ packages:
/eastasianwidth@0.2.0:
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
/electron-to-chromium@1.4.642:
resolution: {integrity: sha512-M4+u22ZJGpk4RY7tne6W+APkZhnnhmAH48FNl8iEFK2lEgob+U5rUQsIqQhvAwCXYpfd3H20pHK/ENsCvwTbsA==}
/electron-to-chromium@1.4.657:
resolution: {integrity: sha512-On2ymeleg6QbRuDk7wNgDdXtNqlJLM2w4Agx1D/RiTmItiL+a9oq5p7HUa2ZtkAtGBe/kil2dq/7rPfkbe0r5w==}
dev: true
/emoji-regex@8.0.0:
@ -1206,6 +1209,11 @@ packages: @@ -1206,6 +1209,11 @@ packages:
engines: {node: '>=0.12'}
dev: false
/es-errors@1.3.0:
resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}
engines: {node: '>= 0.4'}
dev: false
/es5-ext@0.10.62:
resolution: {integrity: sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==}
engines: {node: '>=0.10'}
@ -1265,8 +1273,8 @@ packages: @@ -1265,8 +1273,8 @@ packages:
'@esbuild/win32-ia32': 0.19.12
'@esbuild/win32-x64': 0.19.12
/escalade@3.1.1:
resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==}
/escalade@3.1.2:
resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==}
engines: {node: '>=6'}
dev: true
@ -1305,7 +1313,7 @@ packages: @@ -1305,7 +1313,7 @@ packages:
postcss-load-config: 3.1.4(postcss@8.4.33)
postcss-safe-parser: 6.0.0(postcss@8.4.33)
postcss-selector-parser: 6.0.15
semver: 7.5.4
semver: 7.6.0
svelte: 4.2.9
svelte-eslint-parser: 0.33.1(svelte@4.2.9)
transitivePeerDependencies:
@ -1355,7 +1363,7 @@ packages: @@ -1355,7 +1363,7 @@ packages:
glob-parent: 6.0.2
globals: 13.24.0
graphemer: 1.4.0
ignore: 5.3.0
ignore: 5.3.1
imurmurhash: 0.1.4
is-glob: 4.0.3
is-path-inside: 3.0.3
@ -1463,8 +1471,8 @@ packages: @@ -1463,8 +1471,8 @@ packages:
resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==}
dev: true
/fastq@1.16.0:
resolution: {integrity: sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==}
/fastq@1.17.1:
resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==}
dependencies:
reusify: 1.0.4
@ -1516,7 +1524,7 @@ packages: @@ -1516,7 +1524,7 @@ packages:
peerDependencies:
svelte: ^4.0.0
dependencies:
'@floating-ui/dom': 1.6.0
'@floating-ui/dom': 1.6.1
apexcharts: 3.45.2
flowbite: 2.2.1
svelte: 4.2.9
@ -1568,9 +1576,11 @@ packages: @@ -1568,9 +1576,11 @@ packages:
/function-bind@1.1.2:
resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}
/get-intrinsic@1.2.2:
resolution: {integrity: sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==}
/get-intrinsic@1.2.4:
resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==}
engines: {node: '>= 0.4'}
dependencies:
es-errors: 1.3.0
function-bind: 1.1.2
has-proto: 1.0.1
has-symbols: 1.0.3
@ -1634,7 +1644,7 @@ packages: @@ -1634,7 +1644,7 @@ packages:
array-union: 2.1.0
dir-glob: 3.0.1
fast-glob: 3.3.2
ignore: 5.3.0
ignore: 5.3.1
merge2: 1.4.1
slash: 3.0.0
dev: false
@ -1646,7 +1656,7 @@ packages: @@ -1646,7 +1656,7 @@ packages:
/gopd@1.0.1:
resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==}
dependencies:
get-intrinsic: 1.2.2
get-intrinsic: 1.2.4
dev: false
/graceful-fs@4.2.11:
@ -1665,7 +1675,7 @@ packages: @@ -1665,7 +1675,7 @@ packages:
/has-property-descriptors@1.0.1:
resolution: {integrity: sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==}
dependencies:
get-intrinsic: 1.2.2
get-intrinsic: 1.2.4
dev: false
/has-proto@1.0.1:
@ -1678,8 +1688,8 @@ packages: @@ -1678,8 +1688,8 @@ packages:
engines: {node: '>= 0.4'}
dev: false
/has-tostringtag@1.0.0:
resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==}
/has-tostringtag@1.0.2:
resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==}
engines: {node: '>= 0.4'}
dependencies:
has-symbols: 1.0.3
@ -1705,8 +1715,8 @@ packages: @@ -1705,8 +1715,8 @@ packages:
engines: {node: '>=10.17.0'}
dev: false
/ignore@5.3.0:
resolution: {integrity: sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==}
/ignore@5.3.1:
resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==}
engines: {node: '>= 4'}
/import-fresh@3.3.0:
@ -1740,8 +1750,8 @@ packages: @@ -1740,8 +1750,8 @@ packages:
resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==}
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.5
has-tostringtag: 1.0.0
call-bind: 1.0.6
has-tostringtag: 1.0.2
dev: false
/is-binary-path@2.1.0:
@ -1772,7 +1782,7 @@ packages: @@ -1772,7 +1782,7 @@ packages:
resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==}
engines: {node: '>= 0.4'}
dependencies:
has-tostringtag: 1.0.0
has-tostringtag: 1.0.2
dev: false
/is-glob@4.0.3:
@ -1785,7 +1795,7 @@ packages: @@ -1785,7 +1795,7 @@ packages:
resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==}
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.5
call-bind: 1.0.6
define-properties: 1.2.1
dev: false
@ -1808,11 +1818,11 @@ packages: @@ -1808,11 +1818,11 @@ packages:
engines: {node: '>=8'}
dev: false
/is-typed-array@1.1.12:
resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==}
/is-typed-array@1.1.13:
resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==}
engines: {node: '>= 0.4'}
dependencies:
which-typed-array: 1.1.13
which-typed-array: 1.1.14
dev: false
/is-typedarray@1.0.0:
@ -1924,8 +1934,8 @@ packages: @@ -1924,8 +1934,8 @@ packages:
/lodash.merge@4.6.2:
resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==}
/lru-cache@10.1.0:
resolution: {integrity: sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==}
/lru-cache@10.2.0:
resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==}
engines: {node: 14 || >=16.14}
/lru-cache@6.0.0:
@ -1934,8 +1944,8 @@ packages: @@ -1934,8 +1944,8 @@ packages:
dependencies:
yallist: 4.0.0
/magic-string@0.30.5:
resolution: {integrity: sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==}
/magic-string@0.30.7:
resolution: {integrity: sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==}
engines: {node: '>=12'}
dependencies:
'@jridgewell/sourcemap-codec': 1.4.15
@ -2154,7 +2164,7 @@ packages: @@ -2154,7 +2164,7 @@ packages:
resolution: {integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==}
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.5
call-bind: 1.0.6
define-properties: 1.2.1
dev: false
@ -2167,7 +2177,7 @@ packages: @@ -2167,7 +2177,7 @@ packages:
resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==}
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.5
call-bind: 1.0.6
define-properties: 1.2.1
has-symbols: 1.0.3
object-keys: 1.1.1
@ -2240,7 +2250,7 @@ packages: @@ -2240,7 +2250,7 @@ packages:
resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==}
engines: {node: '>=16 || 14 >=14.17'}
dependencies:
lru-cache: 10.1.0
lru-cache: 10.2.0
minipass: 7.0.4
/path-type@4.0.0:
@ -2398,17 +2408,17 @@ packages: @@ -2398,17 +2408,17 @@ packages:
engines: {node: '>= 0.8.0'}
dev: true
/prettier-plugin-svelte@3.1.2(prettier@3.2.4)(svelte@4.2.9):
/prettier-plugin-svelte@3.1.2(prettier@3.2.5)(svelte@4.2.9):
resolution: {integrity: sha512-7xfMZtwgAWHMT0iZc8jN4o65zgbAQ3+O32V6W7pXrqNvKnHnkoyQCGCbKeUyXKZLbYE0YhFRnamfxfkEGxm8qA==}
peerDependencies:
prettier: ^3.0.0
svelte: ^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0
dependencies:
prettier: 3.2.4
prettier: 3.2.5
svelte: 4.2.9
/prettier@3.2.4:
resolution: {integrity: sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==}
/prettier@3.2.5:
resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==}
engines: {node: '>=14'}
hasBin: true
@ -2532,8 +2542,8 @@ packages: @@ -2532,8 +2542,8 @@ packages:
rimraf: 2.7.1
dev: true
/semver@7.5.4:
resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==}
/semver@7.6.0:
resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==}
engines: {node: '>=10'}
hasBin: true
dependencies:
@ -2543,13 +2553,14 @@ packages: @@ -2543,13 +2553,14 @@ packages:
resolution: {integrity: sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==}
dev: true
/set-function-length@1.2.0:
resolution: {integrity: sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==}
/set-function-length@1.2.1:
resolution: {integrity: sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==}
engines: {node: '>= 0.4'}
dependencies:
define-data-property: 1.1.1
define-data-property: 1.1.2
es-errors: 1.3.0
function-bind: 1.1.2
get-intrinsic: 1.2.2
get-intrinsic: 1.2.4
gopd: 1.0.1
has-property-descriptors: 1.0.1
dev: false
@ -2689,7 +2700,7 @@ packages: @@ -2689,7 +2700,7 @@ packages:
resolution: {integrity: sha512-rNvC4sXRFd35GEuqPrzgmvL4jUMGEmOVq5U328EMlIUD4Ku8toWsUx+pDT4mRWyqiu+ZNuHlzIx9IgD3v6D1oQ==}
hasBin: true
dependencies:
'@typescript-eslint/typescript-estree': 6.19.1(typescript@5.3.3)
'@typescript-eslint/typescript-estree': 6.21.0(typescript@5.3.3)
detect-package-manager: 3.0.1
dom-serializer: 2.0.0
domhandler: 5.0.3
@ -2699,8 +2710,8 @@ packages: @@ -2699,8 +2710,8 @@ packages:
kleur: 4.1.5
mri: 1.2.0
postcss: 8.4.33
prettier: 3.2.4
prettier-plugin-svelte: 3.1.2(prettier@3.2.4)(svelte@4.2.9)
prettier: 3.2.5
prettier-plugin-svelte: 3.1.2(prettier@3.2.5)(svelte@4.2.9)
prompts: 2.4.2
recast: 0.23.4
svelte: 4.2.9
@ -2801,7 +2812,7 @@ packages: @@ -2801,7 +2812,7 @@ packages:
dependencies:
'@types/pug': 2.0.10
detect-indent: 6.1.0
magic-string: 0.30.5
magic-string: 0.30.7
postcss: 8.4.33
postcss-load-config: 5.0.2(postcss@8.4.33)
sorcery: 0.11.0
@ -2826,7 +2837,7 @@ packages: @@ -2826,7 +2837,7 @@ packages:
estree-walker: 3.0.3
is-reference: 3.0.2
locate-character: 3.0.0
magic-string: 0.30.5
magic-string: 0.30.7
periscopic: 3.1.0
/svg.draggable.js@2.2.2:
@ -2951,9 +2962,9 @@ packages: @@ -2951,9 +2962,9 @@ packages:
engines: {node: '>=6'}
dev: true
/ts-api-utils@1.0.3(typescript@5.3.3):
resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==}
engines: {node: '>=16.13.0'}
/ts-api-utils@1.2.1(typescript@5.3.3):
resolution: {integrity: sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA==}
engines: {node: '>=16'}
peerDependencies:
typescript: '>=4.2.0'
dependencies:
@ -2963,8 +2974,8 @@ packages: @@ -2963,8 +2974,8 @@ packages:
/ts-interface-checker@0.1.13:
resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==}
/tseep@1.2.0:
resolution: {integrity: sha512-9YApl3bP9/Onk8IirhZltxFWtDg6Qsij2cxHVu24evhBBhf7ChfENNtAkYvB/GLLvCErFVqPaaXgZqCnmjrXiA==}
/tseep@1.2.1:
resolution: {integrity: sha512-VFnsNcPGC4qFJ1nxbIPSjTmtRZOhlqLmtwRqtLVos8mbRHki8HO9cy9Z1e89EiWyxFmq6LBviI9TQjijxw/mEw==}
dev: false
/tslib@2.6.2:
@ -3013,14 +3024,14 @@ packages: @@ -3013,14 +3024,14 @@ packages:
resolution: {integrity: sha512-DffL94LsNOccVn4hyfRe5rdKa273swqeA5DJpMOeFmEn1wCDc7nAbbB0gXlgBCL7TNzeTv6G7XVWzan7iJtfig==}
dev: false
/update-browserslist-db@1.0.13(browserslist@4.22.2):
/update-browserslist-db@1.0.13(browserslist@4.22.3):
resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==}
hasBin: true
peerDependencies:
browserslist: '>= 4.21.0'
dependencies:
browserslist: 4.22.2
escalade: 3.1.1
browserslist: 4.22.3
escalade: 3.1.2
picocolors: 1.0.0
dev: true
@ -3052,8 +3063,8 @@ packages: @@ -3052,8 +3063,8 @@ packages:
inherits: 2.0.4
is-arguments: 1.1.1
is-generator-function: 1.0.10
is-typed-array: 1.1.12
which-typed-array: 1.1.13
is-typed-array: 1.1.13
which-typed-array: 1.1.14
dev: false
/vite@5.0.12:
@ -3128,15 +3139,15 @@ packages: @@ -3128,15 +3139,15 @@ packages:
- supports-color
dev: false
/which-typed-array@1.1.13:
resolution: {integrity: sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==}
/which-typed-array@1.1.14:
resolution: {integrity: sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==}
engines: {node: '>= 0.4'}
dependencies:
available-typed-arrays: 1.0.5
call-bind: 1.0.5
available-typed-arrays: 1.0.6
call-bind: 1.0.6
for-each: 0.3.3
gopd: 1.0.1
has-tostringtag: 1.0.0
has-tostringtag: 1.0.2
dev: false
/which@2.0.2:

5
src/lib/ArticleHeader.svelte

@ -1,13 +1,14 @@ @@ -1,13 +1,14 @@
<script lang="ts">
import { ndk } from "$lib/ndk";
import { nip19 } from "nostr-tools";
// import { nip19 } from "nostr-tools";
import { neventEncode } from "$lib/utils";
import type { NDKEvent } from "@nostr-dev-kit/ndk";
import { idList } from "$lib/stores";
import DefaultButton from "$lib/defaultShareButton.svelte";
export let event: NDKEvent;
const title: string = JSON.parse(event.content).title;
const href: string = nip19.noteEncode(event.id);
const href: string = neventEncode(event);
// console.log(event);
// con
// console.log(nip19.neventEncode(event));

4
src/lib/consts.ts

@ -1,4 +1,2 @@ @@ -1,4 +1,2 @@
export const wikiKind = 30818;
export const standardRelays = [
'wss://nostr.thesamecat.io'
];
export const standardRelays = ["wss://nostr.thesamecat.io"];

51
src/lib/utils.ts

@ -1,17 +1,28 @@ @@ -1,17 +1,28 @@
import type { NDKEvent } from "@nostr-dev-kit/ndk";
import { nip19 } from "nostr-tools";
export function neventEncode(event: NDKEvent, relays: string[]) {
return nip19.neventEncode({
id: event.id,
kind: event.kind,
relays,
author: event.pubkey,
});
}
export function formatDate(unixtimestamp: number) {
const months = [
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
'Oct',
'Nov',
'Dec'
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
];
const date = new Date(unixtimestamp * 1000);
@ -33,12 +44,14 @@ export function next(): number { @@ -33,12 +44,14 @@ export function next(): number {
export function scrollTabIntoView(el: string | HTMLElement, wait: boolean) {
function scrollTab() {
const element =
typeof el === 'string' ? document.querySelector(`[id^="wikitab-v0-${el}"]`) : el;
typeof el === "string"
? document.querySelector(`[id^="wikitab-v0-${el}"]`)
: el;
if (!element) return;
element.scrollIntoView({
behavior: 'smooth',
inline: 'start'
behavior: "smooth",
inline: "start",
});
}
@ -52,7 +65,10 @@ export function scrollTabIntoView(el: string | HTMLElement, wait: boolean) { @@ -52,7 +65,10 @@ export function scrollTabIntoView(el: string | HTMLElement, wait: boolean) {
}
export function isElementInViewport(el: string | HTMLElement) {
const element = typeof el === 'string' ? document.querySelector(`[id^="wikitab-v0-${el}"]`) : el;
const element =
typeof el === "string"
? document.querySelector(`[id^="wikitab-v0-${el}"]`)
: el;
if (!element) return;
const rect = element.getBoundingClientRect();
@ -60,7 +76,8 @@ export function isElementInViewport(el: string | HTMLElement) { @@ -60,7 +76,8 @@ export function isElementInViewport(el: string | HTMLElement) {
return (
rect.top >= 0 &&
rect.left >= 0 &&
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
rect.bottom <=
(window.innerHeight || document.documentElement.clientHeight) &&
rect.right <= (window.innerWidth || document.documentElement.clientWidth)
);
}

21
src/routes/+layout.svelte

@ -5,28 +5,11 @@ @@ -5,28 +5,11 @@
import { browser } from "$app/environment";
import { NDKNip07Signer } from "@nostr-dev-kit/ndk";
import { onMount } from "svelte";
import NavBar from "$lib/components/Navigation.svelte";
</script>
<!-- <nav class="abtBox">
<a href="./">home</a>
<a href="./create">New Note</a>
<a href="./about">About</a>
</nav> -->
<NavBar />
<slot />
<style>
.abtBox {
position: fixed;
top: 0;
left: 0;
min-width: 100%;
max-height: 40;
padding: 10px;
background-color: black;
/* border-radius: 10px; */
/* margin: 10px; */
text-decoration: none;
font-weight: bold;
z-index: 1;
}
</style>

3334
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save