Co-authored-by: Borja Robert <borja@brobert.net>
Reviewed-on: #16
main
brobert 2 years ago
parent 0e3088d236
commit 672198b7b3

2
.gitignore vendored

@ -10,3 +10,5 @@ node_modules
.output .output
*.swp *.swp
*/*.swp */*.swp
/src/lib/db/*.sqlite
/src/lib/db/*.sqlite*

@ -25,6 +25,9 @@
"type": "module", "type": "module",
"dependencies": { "dependencies": {
"@fontsource/fira-mono": "^4.5.0", "@fontsource/fira-mono": "^4.5.0",
"@types/better-sqlite3": "^7.6.1",
"better-sqlite3": "^7.6.2",
"cookie": "^0.5.0",
"html2canvas": "^1.4.1", "html2canvas": "^1.4.1",
"quill": "^1.3.7" "quill": "^1.3.7"
} }

@ -5,7 +5,10 @@ specifiers:
'@sveltejs/adapter-auto': next '@sveltejs/adapter-auto': next
'@sveltejs/adapter-node': 1.0.0-next.95 '@sveltejs/adapter-node': 1.0.0-next.95
'@sveltejs/kit': next '@sveltejs/kit': next
'@types/better-sqlite3': ^7.6.1
'@types/cookie': ^0.5.1 '@types/cookie': ^0.5.1
better-sqlite3: ^7.6.2
cookie: ^0.5.0
html2canvas: ^1.4.1 html2canvas: ^1.4.1
prettier: ^2.6.2 prettier: ^2.6.2
prettier-plugin-svelte: ^2.7.0 prettier-plugin-svelte: ^2.7.0
@ -17,13 +20,16 @@ specifiers:
dependencies: dependencies:
'@fontsource/fira-mono': 4.5.9 '@fontsource/fira-mono': 4.5.9
'@types/better-sqlite3': 7.6.1
better-sqlite3: 7.6.2
cookie: 0.5.0
html2canvas: 1.4.1 html2canvas: 1.4.1
quill: 1.3.7 quill: 1.3.7
devDependencies: devDependencies:
'@sveltejs/adapter-auto': 1.0.0-next.80 '@sveltejs/adapter-auto': 1.0.0-next.80
'@sveltejs/adapter-node': 1.0.0-next.95 '@sveltejs/adapter-node': 1.0.0-next.95
'@sveltejs/kit': 1.0.0-next.503_svelte@3.50.1+vite@3.1.3 '@sveltejs/kit': 1.0.0-next.511_svelte@3.50.1+vite@3.1.3
'@types/cookie': 0.5.1 '@types/cookie': 0.5.1
prettier: 2.7.1 prettier: 2.7.1
prettier-plugin-svelte: 2.7.0_nk6d2fkgcllkkdynqbuearcure prettier-plugin-svelte: 2.7.0_nk6d2fkgcllkkdynqbuearcure
@ -229,8 +235,8 @@ packages:
- supports-color - supports-color
dev: true dev: true
/@sveltejs/kit/1.0.0-next.503_svelte@3.50.1+vite@3.1.3: /@sveltejs/kit/1.0.0-next.511_svelte@3.50.1+vite@3.1.3:
resolution: {integrity: sha512-QSEHe40qMOYjXirxS57dIa9NU4FntlYh+KYslBzasjMCfSiUkHGaWMJRz8uU+R4BWnThD9SdCo7F/NwDxu5LRQ==} resolution: {integrity: sha512-A/fxd4qHWDD07Mjo6qEEEfsBEkoj5C4/dPSzx6xPUoWmPvRPhU8t+P0oMc8BOn5YHOhPDq3coH8bmafbh73zKg==}
engines: {node: '>=16.14'} engines: {node: '>=16.14'}
hasBin: true hasBin: true
requiresBuild: true requiresBuild: true
@ -241,17 +247,16 @@ packages:
'@sveltejs/vite-plugin-svelte': 1.0.8_svelte@3.50.1+vite@3.1.3 '@sveltejs/vite-plugin-svelte': 1.0.8_svelte@3.50.1+vite@3.1.3
'@types/cookie': 0.5.1 '@types/cookie': 0.5.1
cookie: 0.5.0 cookie: 0.5.0
devalue: 3.1.3 devalue: 4.0.0
kleur: 4.1.5 kleur: 4.1.5
magic-string: 0.26.4 magic-string: 0.26.4
mime: 3.0.0 mime: 3.0.0
node-fetch: 3.2.10
sade: 1.8.1 sade: 1.8.1
set-cookie-parser: 2.5.1 set-cookie-parser: 2.5.1
sirv: 2.0.2 sirv: 2.0.2
svelte: 3.50.1 svelte: 3.50.1
tiny-glob: 0.2.9 tiny-glob: 0.2.9
undici: 5.10.0 undici: 5.11.0
vite: 3.1.3 vite: 3.1.3
transitivePeerDependencies: transitivePeerDependencies:
- diff-match-patch - diff-match-patch
@ -281,6 +286,12 @@ packages:
- supports-color - supports-color
dev: true dev: true
/@types/better-sqlite3/7.6.1:
resolution: {integrity: sha512-2MuzBUSwAjY8GoT04vcLUojHmuuOCEFboESZfx6u9gpnHym5mYBMhCKGoe+R+yXkiho1xg348LRH8x27cJLHjw==}
dependencies:
'@types/node': 18.7.18
dev: false
/@types/cookie/0.5.1: /@types/cookie/0.5.1:
resolution: {integrity: sha512-COUnqfB2+ckwXXSFInsFdOAWQzCCx+a5hq2ruyj+Vjund94RJQd4LG2u9hnvJrTgunKAaax7ancBYlDrNYxA0g==} resolution: {integrity: sha512-COUnqfB2+ckwXXSFInsFdOAWQzCCx+a5hq2ruyj+Vjund94RJQd4LG2u9hnvJrTgunKAaax7ancBYlDrNYxA0g==}
dev: true dev: true
@ -295,7 +306,6 @@ packages:
/@types/node/18.7.18: /@types/node/18.7.18:
resolution: {integrity: sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg==} resolution: {integrity: sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg==}
dev: true
/@types/pug/2.0.6: /@types/pug/2.0.6:
resolution: {integrity: sha512-SnHmG9wN1UVmagJOnyo/qkk0Z7gejYxOYYmaAwr5u2yFYfsupN3sg10kyzN8Hep/2zbHxCnsumxOoRIRMBwKCg==} resolution: {integrity: sha512-SnHmG9wN1UVmagJOnyo/qkk0Z7gejYxOYYmaAwr5u2yFYfsupN3sg10kyzN8Hep/2zbHxCnsumxOoRIRMBwKCg==}
@ -390,6 +400,18 @@ packages:
engines: {node: '>= 0.6.0'} engines: {node: '>= 0.6.0'}
dev: false dev: false
/base64-js/1.5.1:
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
dev: false
/better-sqlite3/7.6.2:
resolution: {integrity: sha512-S5zIU1Hink2AH4xPsN0W43T1/AJ5jrPh7Oy07ocuW/AKYYY02GWzz9NH0nbSMn/gw6fDZ5jZ1QsHt1BXAwJ6Lg==}
requiresBuild: true
dependencies:
bindings: 1.5.0
prebuild-install: 7.1.1
dev: false
/binary-extensions/2.2.0: /binary-extensions/2.2.0:
resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==}
engines: {node: '>=8'} engines: {node: '>=8'}
@ -399,7 +421,14 @@ packages:
resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==}
dependencies: dependencies:
file-uri-to-path: 1.0.0 file-uri-to-path: 1.0.0
dev: true
/bl/4.1.0:
resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==}
dependencies:
buffer: 5.7.1
inherits: 2.0.4
readable-stream: 3.6.0
dev: false
/brace-expansion/1.1.11: /brace-expansion/1.1.11:
resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==}
@ -419,11 +448,25 @@ packages:
resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==}
dev: true dev: true
/buffer/5.7.1:
resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==}
dependencies:
base64-js: 1.5.1
ieee754: 1.2.1
dev: false
/builtin-modules/3.3.0: /builtin-modules/3.3.0:
resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==}
engines: {node: '>=6'} engines: {node: '>=6'}
dev: true dev: true
/busboy/1.6.0:
resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==}
engines: {node: '>=10.16.0'}
dependencies:
streamsearch: 1.1.0
dev: true
/call-bind/1.0.2: /call-bind/1.0.2:
resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==}
dependencies: dependencies:
@ -451,6 +494,10 @@ packages:
fsevents: 2.3.2 fsevents: 2.3.2
dev: true dev: true
/chownr/1.1.4:
resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==}
dev: false
/chownr/2.0.0: /chownr/2.0.0:
resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==}
engines: {node: '>=10'} engines: {node: '>=10'}
@ -481,7 +528,6 @@ packages:
/cookie/0.5.0: /cookie/0.5.0:
resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==}
engines: {node: '>= 0.6'} engines: {node: '>= 0.6'}
dev: true
/css-line-break/2.1.0: /css-line-break/2.1.0:
resolution: {integrity: sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==} resolution: {integrity: sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==}
@ -489,11 +535,6 @@ packages:
utrie: 1.0.2 utrie: 1.0.2
dev: false dev: false
/data-uri-to-buffer/4.0.0:
resolution: {integrity: sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==}
engines: {node: '>= 12'}
dev: true
/debug/4.3.4: /debug/4.3.4:
resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==}
engines: {node: '>=6.0'} engines: {node: '>=6.0'}
@ -506,6 +547,13 @@ packages:
ms: 2.1.2 ms: 2.1.2
dev: true dev: true
/decompress-response/6.0.0:
resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==}
engines: {node: '>=10'}
dependencies:
mimic-response: 3.1.0
dev: false
/deep-equal/1.1.1: /deep-equal/1.1.1:
resolution: {integrity: sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==} resolution: {integrity: sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==}
dependencies: dependencies:
@ -517,6 +565,11 @@ packages:
regexp.prototype.flags: 1.4.3 regexp.prototype.flags: 1.4.3
dev: false dev: false
/deep-extend/0.6.0:
resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==}
engines: {node: '>=4.0.0'}
dev: false
/deepmerge/4.2.2: /deepmerge/4.2.2:
resolution: {integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==} resolution: {integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==}
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
@ -542,16 +595,21 @@ packages:
/detect-libc/2.0.1: /detect-libc/2.0.1:
resolution: {integrity: sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==} resolution: {integrity: sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==}
engines: {node: '>=8'} engines: {node: '>=8'}
dev: true
/devalue/3.1.3: /devalue/4.0.0:
resolution: {integrity: sha512-9KO89Cb+qjzf2CqdrH+NuLaqdk9GhDP5EhR4zlkR51dvuIaiqtlkDkGzLMShDemwUy21raSMdu+kpX8Enw3yGQ==} resolution: {integrity: sha512-w25siwXyuMUqMr7jPlEjyNCp1vn0Jzj/fNg3qVt/r/Dpe8HjESh2V92L0jmh3uq4iJt0BvjH+Azk1pQzkcnDWA==}
dev: true dev: true
/emoji-regex/8.0.0: /emoji-regex/8.0.0:
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
dev: true dev: true
/end-of-stream/1.4.4:
resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==}
dependencies:
once: 1.4.0
dev: false
/es6-promise/3.3.1: /es6-promise/3.3.1:
resolution: {integrity: sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==} resolution: {integrity: sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==}
dev: true dev: true
@ -782,6 +840,11 @@ packages:
resolution: {integrity: sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg==} resolution: {integrity: sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg==}
dev: false dev: false
/expand-template/2.0.3:
resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==}
engines: {node: '>=6'}
dev: false
/extend/3.0.2: /extend/3.0.2:
resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==}
dev: false dev: false
@ -807,17 +870,8 @@ packages:
reusify: 1.0.4 reusify: 1.0.4
dev: true dev: true
/fetch-blob/3.2.0:
resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==}
engines: {node: ^12.20 || >= 14.13}
dependencies:
node-domexception: 1.0.0
web-streams-polyfill: 3.2.1
dev: true
/file-uri-to-path/1.0.0: /file-uri-to-path/1.0.0:
resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==}
dev: true
/fill-range/7.0.1: /fill-range/7.0.1:
resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==}
@ -826,12 +880,9 @@ packages:
to-regex-range: 5.0.1 to-regex-range: 5.0.1
dev: true dev: true
/formdata-polyfill/4.0.10: /fs-constants/1.0.0:
resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==}
engines: {node: '>=12.20.0'} dev: false
dependencies:
fetch-blob: 3.2.0
dev: true
/fs-minipass/2.1.0: /fs-minipass/2.1.0:
resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==}
@ -882,6 +933,10 @@ packages:
has-symbols: 1.0.3 has-symbols: 1.0.3
dev: false dev: false
/github-from-package/0.0.0:
resolution: {integrity: sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=}
dev: false
/glob-parent/5.1.2: /glob-parent/5.1.2:
resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}
engines: {node: '>= 6'} engines: {node: '>= 6'}
@ -958,6 +1013,10 @@ packages:
- supports-color - supports-color
dev: true dev: true
/ieee754/1.2.1:
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
dev: false
/import-fresh/3.3.0: /import-fresh/3.3.0:
resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==}
engines: {node: '>=6'} engines: {node: '>=6'}
@ -975,7 +1034,10 @@ packages:
/inherits/2.0.4: /inherits/2.0.4:
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
dev: true
/ini/1.3.8:
resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==}
dev: false
/is-arguments/1.1.1: /is-arguments/1.1.1:
resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==}
@ -1062,7 +1124,6 @@ packages:
engines: {node: '>=10'} engines: {node: '>=10'}
dependencies: dependencies:
yallist: 4.0.0 yallist: 4.0.0
dev: true
/magic-string/0.25.9: /magic-string/0.25.9:
resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==} resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==}
@ -1103,6 +1164,11 @@ packages:
hasBin: true hasBin: true
dev: true dev: true
/mimic-response/3.1.0:
resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==}
engines: {node: '>=10'}
dev: false
/min-indent/1.0.1: /min-indent/1.0.1:
resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==}
engines: {node: '>=4'} engines: {node: '>=4'}
@ -1116,7 +1182,6 @@ packages:
/minimist/1.2.6: /minimist/1.2.6:
resolution: {integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==} resolution: {integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==}
dev: true
/minipass/3.3.4: /minipass/3.3.4:
resolution: {integrity: sha512-I9WPbWHCGu8W+6k1ZiGpPu0GkoKBeorkfKNuAFBNS1HNFJvke82sxvI5bzcCNpWPorkOO5QQ+zomzzwRxejXiw==} resolution: {integrity: sha512-I9WPbWHCGu8W+6k1ZiGpPu0GkoKBeorkfKNuAFBNS1HNFJvke82sxvI5bzcCNpWPorkOO5QQ+zomzzwRxejXiw==}
@ -1133,6 +1198,10 @@ packages:
yallist: 4.0.0 yallist: 4.0.0
dev: true dev: true
/mkdirp-classic/0.5.3:
resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==}
dev: false
/mkdirp/0.5.6: /mkdirp/0.5.6:
resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==}
hasBin: true hasBin: true
@ -1166,10 +1235,16 @@ packages:
hasBin: true hasBin: true
dev: true dev: true
/node-domexception/1.0.0: /napi-build-utils/1.0.2:
resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==}
engines: {node: '>=10.5.0'} dev: false
dev: true
/node-abi/3.26.0:
resolution: {integrity: sha512-jRVtMFTChbi2i/jqo/i2iP9634KMe+7K1v35mIdj3Mn59i5q27ZYhn+sW6npISM/PQg7HrP2kwtRBMmh5Uvzdg==}
engines: {node: '>=10'}
dependencies:
semver: 7.3.7
dev: false
/node-fetch/2.6.7: /node-fetch/2.6.7:
resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==} resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==}
@ -1183,15 +1258,6 @@ packages:
whatwg-url: 5.0.0 whatwg-url: 5.0.0
dev: true dev: true
/node-fetch/3.2.10:
resolution: {integrity: sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
dependencies:
data-uri-to-buffer: 4.0.0
fetch-blob: 3.2.0
formdata-polyfill: 4.0.10
dev: true
/node-gyp-build/4.5.0: /node-gyp-build/4.5.0:
resolution: {integrity: sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==} resolution: {integrity: sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==}
hasBin: true hasBin: true
@ -1241,7 +1307,6 @@ packages:
resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}
dependencies: dependencies:
wrappy: 1.0.2 wrappy: 1.0.2
dev: true
/parchment/1.1.4: /parchment/1.1.4:
resolution: {integrity: sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg==} resolution: {integrity: sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg==}
@ -1281,6 +1346,25 @@ packages:
source-map-js: 1.0.2 source-map-js: 1.0.2
dev: true dev: true
/prebuild-install/7.1.1:
resolution: {integrity: sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==}
engines: {node: '>=10'}
hasBin: true
dependencies:
detect-libc: 2.0.1
expand-template: 2.0.3
github-from-package: 0.0.0
minimist: 1.2.6
mkdirp-classic: 0.5.3
napi-build-utils: 1.0.2
node-abi: 3.26.0
pump: 3.0.0
rc: 1.2.8
simple-get: 4.0.1
tar-fs: 2.1.1
tunnel-agent: 0.6.0
dev: false
/prettier-plugin-svelte/2.7.0_nk6d2fkgcllkkdynqbuearcure: /prettier-plugin-svelte/2.7.0_nk6d2fkgcllkkdynqbuearcure:
resolution: {integrity: sha512-fQhhZICprZot2IqEyoiUYLTRdumULGRvw0o4dzl5jt0jfzVWdGqeYW27QTWAeXhoupEZJULmNoH3ueJwUWFLIA==} resolution: {integrity: sha512-fQhhZICprZot2IqEyoiUYLTRdumULGRvw0o4dzl5jt0jfzVWdGqeYW27QTWAeXhoupEZJULmNoH3ueJwUWFLIA==}
peerDependencies: peerDependencies:
@ -1297,6 +1381,13 @@ packages:
hasBin: true hasBin: true
dev: true dev: true
/pump/3.0.0:
resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==}
dependencies:
end-of-stream: 1.4.4
once: 1.4.0
dev: false
/queue-microtask/1.2.3: /queue-microtask/1.2.3:
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
dev: true dev: true
@ -1321,6 +1412,16 @@ packages:
quill-delta: 3.6.3 quill-delta: 3.6.3
dev: false dev: false
/rc/1.2.8:
resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==}
hasBin: true
dependencies:
deep-extend: 0.6.0
ini: 1.3.8
minimist: 1.2.6
strip-json-comments: 2.0.1
dev: false
/readable-stream/3.6.0: /readable-stream/3.6.0:
resolution: {integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==} resolution: {integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==}
engines: {node: '>= 6'} engines: {node: '>= 6'}
@ -1328,7 +1429,6 @@ packages:
inherits: 2.0.4 inherits: 2.0.4
string_decoder: 1.3.0 string_decoder: 1.3.0
util-deprecate: 1.0.2 util-deprecate: 1.0.2
dev: true
/readdirp/3.6.0: /readdirp/3.6.0:
resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==}
@ -1418,7 +1518,6 @@ packages:
/safe-buffer/5.2.1: /safe-buffer/5.2.1:
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
dev: true
/sander/0.5.1: /sander/0.5.1:
resolution: {integrity: sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==} resolution: {integrity: sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==}
@ -1440,7 +1539,6 @@ packages:
hasBin: true hasBin: true
dependencies: dependencies:
lru-cache: 6.0.0 lru-cache: 6.0.0
dev: true
/set-blocking/2.0.0: /set-blocking/2.0.0:
resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==}
@ -1454,6 +1552,18 @@ packages:
resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}
dev: true dev: true
/simple-concat/1.0.1:
resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==}
dev: false
/simple-get/4.0.1:
resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==}
dependencies:
decompress-response: 6.0.0
once: 1.4.0
simple-concat: 1.0.1
dev: false
/sirv/2.0.2: /sirv/2.0.2:
resolution: {integrity: sha512-4Qog6aE29nIjAOKe/wowFTxOdmbEZKb+3tsLljaBRzJwtqto0BChD2zzH0LhgCSXiI+V7X+Y45v14wBZQ1TK3w==} resolution: {integrity: sha512-4Qog6aE29nIjAOKe/wowFTxOdmbEZKb+3tsLljaBRzJwtqto0BChD2zzH0LhgCSXiI+V7X+Y45v14wBZQ1TK3w==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
@ -1482,6 +1592,11 @@ packages:
resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==}
dev: true dev: true
/streamsearch/1.1.0:
resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==}
engines: {node: '>=10.0.0'}
dev: true
/string-width/4.2.3: /string-width/4.2.3:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
engines: {node: '>=8'} engines: {node: '>=8'}
@ -1495,7 +1610,6 @@ packages:
resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==}
dependencies: dependencies:
safe-buffer: 5.2.1 safe-buffer: 5.2.1
dev: true
/strip-ansi/6.0.1: /strip-ansi/6.0.1:
resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==}
@ -1511,6 +1625,11 @@ packages:
min-indent: 1.0.1 min-indent: 1.0.1
dev: true dev: true
/strip-json-comments/2.0.1:
resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==}
engines: {node: '>=0.10.0'}
dev: false
/supports-preserve-symlinks-flag/1.0.0: /supports-preserve-symlinks-flag/1.0.0:
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
engines: {node: '>= 0.4'} engines: {node: '>= 0.4'}
@ -1609,6 +1728,26 @@ packages:
engines: {node: '>= 8'} engines: {node: '>= 8'}
dev: true dev: true
/tar-fs/2.1.1:
resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==}
dependencies:
chownr: 1.1.4
mkdirp-classic: 0.5.3
pump: 3.0.0
tar-stream: 2.2.0
dev: false
/tar-stream/2.2.0:
resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==}
engines: {node: '>=6'}
dependencies:
bl: 4.1.0
end-of-stream: 1.4.4
fs-constants: 1.0.0
inherits: 2.0.4
readable-stream: 3.6.0
dev: false
/tar/6.1.11: /tar/6.1.11:
resolution: {integrity: sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==} resolution: {integrity: sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
@ -1650,20 +1789,27 @@ packages:
resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
dev: true dev: true
/tunnel-agent/0.6.0:
resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==}
dependencies:
safe-buffer: 5.2.1
dev: false
/typescript/4.8.3: /typescript/4.8.3:
resolution: {integrity: sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==} resolution: {integrity: sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==}
engines: {node: '>=4.2.0'} engines: {node: '>=4.2.0'}
hasBin: true hasBin: true
dev: true dev: true
/undici/5.10.0: /undici/5.11.0:
resolution: {integrity: sha512-c8HsD3IbwmjjbLvoZuRI26TZic+TSEe8FPMLLOkN1AfYRhdjnKBU6yL+IwcSCbdZiX4e5t0lfMDLDCqj4Sq70g==} resolution: {integrity: sha512-oWjWJHzFet0Ow4YZBkyiJwiK5vWqEYoH7BINzJAJOLedZ++JpAlCbUktW2GQ2DS2FpKmxD/JMtWUUWl1BtghGw==}
engines: {node: '>=12.18'} engines: {node: '>=12.18'}
dependencies:
busboy: 1.6.0
dev: true dev: true
/util-deprecate/1.0.2: /util-deprecate/1.0.2:
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
dev: true
/utrie/1.0.2: /utrie/1.0.2:
resolution: {integrity: sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==} resolution: {integrity: sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==}
@ -1698,11 +1844,6 @@ packages:
fsevents: 2.3.2 fsevents: 2.3.2
dev: true dev: true
/web-streams-polyfill/3.2.1:
resolution: {integrity: sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==}
engines: {node: '>= 8'}
dev: true
/webidl-conversions/3.0.1: /webidl-conversions/3.0.1:
resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
dev: true dev: true
@ -1730,8 +1871,6 @@ packages:
/wrappy/1.0.2: /wrappy/1.0.2:
resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
dev: true
/yallist/4.0.0: /yallist/4.0.0:
resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==}
dev: true

@ -0,0 +1,45 @@
import * as cookie from "cookie";
/** @type {import('@sveltejs/kit').Handle} */
export const handle = async ({ event, resolve }) => {
const cookieHeader = event.request.headers.get("cookie");
const cookies = cookie.parse(cookieHeader ?? "");
if (!cookies.session) {
return await resolve(event);
}
// Esto es lo que hace pillar una sesión y que tengo que implementar con better-sqlite3
// const session = await db.user.findUnique({
// where: { id: cookies.session },
// });
// if (session) {
// event.locals.user = {
// username: session.username,
// name: session.name,
// slug: session.slug,
// isAdmin: session.isAdmin,
// };
// }
return await resolve(event);
};
/**
*
* @param {*} param0
* @returns
*/
export const getSession = ({ locals }) => {
if (!locals.user) return {};
return {
user: {
username: locals.user.username,
name: locals.user.name,
slug: locals.user.slug,
isAdmin: locals.user.isAdmin,
},
};
};

@ -1,15 +1,15 @@
/** @type {import('@sveltejs/kit').Handle} */ /** @type {import('@sveltejs/kit').Handle} */
export const handle = async ({ event, resolve }) => { export const handle = async ({ event, resolve }) => {
let userid = event.cookies.get('userid'); let userid = event.cookies.get('userid');
if (!userid) { if (!userid) {
// if this is the first time the user has visited this app, // if this is the first time the user has visited this app,
// set a cookie so that we recognise them when they return // set a cookie so that we recognise them when they return
userid = crypto.randomUUID(); userid = crypto.randomUUID();
event.cookies.set('userid', userid, { path: '/' }); event.cookies.set('userid', userid, { path: '/' });
} }
event.locals.userid = userid; event.locals.userid = userid;
return resolve(event); return resolve(event);
}; };

@ -0,0 +1,14 @@
/**
* @async
* @function send
* @param {HTMLFormElement} form
* @returns {Promise<JSON>}
*/
export const send = async (form) => {
const response = await fetch(form.action, {
method: form.method,
body: new FormData(form),
headers: { accept: "application/json" },
});
return await response.json();
};

@ -29,6 +29,9 @@
<style> <style>
.address { .address {
position: absolute; position: absolute;
display: flex;
flex-direction: column;
justify-content: center;
overflow: hidden; overflow: hidden;
white-space: pre-wrap; white-space: pre-wrap;
} }

@ -1,13 +1,13 @@
<script> <script>
import { templates } from '$lib/templates/templates'; import { templates } from '$lib/templates/templates';
import { date, multiplier } from '$lib/stores/store'; import { date, newdate, multiplier } from '$lib/stores/store';
import { convertDate } from '$lib/convertDate'; import { convertDate } from '$lib/convertDate';
/** @type number */ export let templateIndex; /** @type number */ export let templateIndex;
/** @type {string} */ let newdate; // /** @type {string} */ let newdate;
$: if ($date !== '') { $: if ($date !== '') {
newdate = convertDate($date); $newdate = convertDate($date);
} }
</script> </script>
@ -27,7 +27,7 @@
line-height: {templates[templateIndex].date.lineHeight}px; line-height: {templates[templateIndex].date.lineHeight}px;
" "
> >
{newdate} {$newdate}
</div> </div>
{/if} {/if}

@ -29,5 +29,6 @@
.heading { .heading {
position: absolute; position: absolute;
overflow: hidden; overflow: hidden;
text-transform: uppercase;
} }
</style> </style>

@ -31,7 +31,9 @@
position: absolute; position: absolute;
overflow: hidden; overflow: hidden;
display: flex; display: flex;
/* flex-direction: column; */
justify-content: center; justify-content: center;
align-items: start; align-items: center;
text-transform: uppercase;
} }
</style> </style>

@ -5,6 +5,7 @@
subtitle, subtitle,
content, content,
date, date,
newdate,
time, time,
weekday, weekday,
address, address,
@ -28,9 +29,20 @@
{#if checked} {#if checked}
<div class="text" contenteditable="true"> <div class="text" contenteditable="true">
<p>Estimada/o amiga/o:</p> <p>Estimada/o amiga/o:</p>
<p>El {$weekday.toLowerCase()}, {textDate}, celebramos el acto '{$title}' en {$city}.</p> <p>
El {$weekday.toLowerCase()}, {textDate}, celebramos el acto <strong>'{$title}'</strong> en {$city}.
</p>
<p>Como siempre, la entrada es gratuita hasta completar aforo.</p> <p>Como siempre, la entrada es gratuita hasta completar aforo.</p>
<p>El acto comienza a las {$time}.</p> <ul>
<li>
<p style="white-space: pre-wrap;">
<strong>Lugar</strong>:<br />{$address}<br /><em>{$city}</em>
</p>
</li>
<li>
<p><strong>Fecha</strong>:<br />{$newdate}<br />{$time}</p>
</li>
</ul>
<p>{@html $content}</p> <p>{@html $content}</p>
</div> </div>
{/if} {/if}
@ -47,9 +59,12 @@
background-color: #fff; background-color: #fff;
} }
p { p {
margin-bottom: 1rem; margin: 1rem 0;
} }
label { label {
color: #333; color: #333;
} }
li {
margin: 1rem 0;
}
</style> </style>

@ -33,5 +33,6 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
text-transform: uppercase;
} }
</style> </style>

Binary file not shown.

@ -0,0 +1,38 @@
/** @typedef {typeof import('better-sqlite3')} better-sqlite3 */
import Database from 'better-sqlite3';
export const db = new Database('./src/lib/db/carteles_dev.sqlite', { verbose: console.log });
db.pragma("journal_mode = WAL");
db.pragma("synchronous = normal");
db.pragma("temp_store = memory");
const createUserTable = db.prepare(`CREATE TABLE IF NOT EXISTS Users (
email TEXT PRIMARY KEY UNIQUE NOT NULL,
password TEXT,
isAdmin INTEGER
);`);
const createPostersTable = db.prepare(`CREATE TABLE IF NOT EXISTS Posters (
id INTEGER PRIMARY KEY UNIQUE NOT NULL,
createdAt TEXT NOT NULL,
image BLOB NOT NULL,
content TEXT
);`);
createUserTable.run();
createPostersTable.run();
/**
* @typedef {Object} User
* @property {string} [email]
* @property {string} [password]
* @property {boolean} [isAdmin]
*/
/**
* @typedef {Object} Poster
* @property {number} [id]
* @property {string} [createdAt] Date
* @property {Blob} [image]
* @property {string} [content] Stringified contents
*/

@ -0,0 +1,95 @@
import { db } from '$lib/db/db.js';
/**
* Return of functions that change change DB, either 'success' or 'failure' with explanation
* @typedef {Object} ChangeDBResult
* @property {string} [error]
* @property {string} [success]
* @property {string} [id]
*/
/**
* @function addUserToDB Adds user to the db
* @param {string} email
* @param {string} passwordHash
* @param {boolean} isAdmin
* @returns {ChangeDBResult} return
*/
export const addUserToDB = (email, passwordHash, isAdmin) => {
if (!email || !passwordHash || !isAdmin) {
return {
error: "Either email, password or isAdmin are missing"
};
}
const addUser = db.prepare(`INSERT INTO Users(email,password,isAdmin) VALUES(?,?,?);`)
const result = addUser.run(email, passwordHash, isAdmin);
if (result.changes === 1) {
return {
success: `User '${email}' added to DB`
}
}
return { error: `Could not add user '${email}' to DB`, };
}
/** Removes user from db
* @param {string} email
* @returns {ChangeDBResult} return
*/
export const delUserFromDB = (email) => {
if (!email) {
return {
error: "Email not provided"
}
}
const delUser = db.prepare(`DELETE FROM Users WHERE email=${email};`);
const result = delUser.run();
if (result.changes === 1) {
return {
success: `User '${email}' removed successfully`
}
}
return { error: `Could not remove user '${email}' from DB` }
}
/**
* @function addPosterToDB
* @param {any} image
* @param {string} content
* @returns {ChangeDBResult} return
*/
export const addPosterToDB = (image, content) => {
const id = crypto.randomUUID(); // Create random ID for Poster
console.log("New id is: ", id);
const createdAt = Date.now().toString;
if (!image) { // Return error if mandatory info is missing
return {
error: "Image missing"
}
}
const addPoster = db.prepare(`INSERT INTO Posters(id,createdAt,image,content) VALUES ($id,$createdAt,$image,$content);`);
const result = addPoster.run({
id: id,
createdAt: createdAt,
image: image,
content: content
});
if (result.changes === 1) {
return {
success: `Poster added to DB with id ${id}`,
id
}
}
return { // Default return just in case
error: `Could not save poster '${id}' to DB. Something went wrong`
}
}
export const getAllPostersFromDB = () => {
const getPosters = db.prepare(`SELECT * FROM Posters;`);
const result = getPosters.all();
return result;
}

@ -32,6 +32,34 @@
$content = editor.firstChild.innerHTML; $content = editor.firstChild.innerHTML;
} }
}; };
const saveCanvas = async () => {
if ($canvas !== undefined) {
const img = await html2canvas($canvas, { scale: 2 });
const image = img.toDataURL('image/png');
const data = new FormData();
data.append('image', image);
data.append(
'content',
JSON.stringify({
title: $title,
heading: $heading,
subtitle: $subtitle,
content: $content,
date: $date,
time: $time,
weekday: $weekday,
address: $address,
city: $city
})
);
const req = await fetch('/admin', {
method: 'POST',
body: data
});
console.log(req);
}
};
const downloadCanvas = async () => { const downloadCanvas = async () => {
if ($canvas !== undefined) { if ($canvas !== undefined) {
@ -131,6 +159,7 @@
</form> </form>
<button on:click|preventDefault={downloadCanvas}>Descargar</button> <button on:click|preventDefault={downloadCanvas}>Descargar</button>
<button on:click|preventDefault={saveCanvas}>Guardar</button>
<style> <style>
.form-group { .form-group {

@ -2,7 +2,7 @@
/** @type {number} */ export let templateIndex; /** @type {number} */ export let templateIndex;
/** @type {string} */ export let templateImage; /** @type {string} */ export let templateImage;
import { organizedBy, colabs, canvas, multiplier } from '$lib/stores/store'; import { organizedBy, colabs, canvas } from '$lib/stores/store';
import Heading from '$lib/components/Heading.svelte'; import Heading from '$lib/components/Heading.svelte';
import Title from '$lib/components/Title.svelte'; import Title from '$lib/components/Title.svelte';

@ -5,6 +5,7 @@ export const heading = writable("");
export const subtitle = writable(""); export const subtitle = writable("");
export const content = writable(""); export const content = writable("");
export const date = writable(""); export const date = writable("");
export const newdate = writable("");
export const time = writable(""); export const time = writable("");
export const weekday = writable(""); export const weekday = writable("");
export const address = writable(""); export const address = writable("");

@ -3,17 +3,18 @@ import '$lib/templates/templates'
/** @type {import('$lib/templates/templates').Template} */ /** @type {import('$lib/templates/templates').Template} */
export const azul = { export const azul = {
name: "azul", name: "azul",
description: "Azul",
image: "plantilla_azul.png", image: "plantilla_azul.png",
heading: { heading: {
top: 400, top: 415,
height: 32, height: 32,
left: 240, left: 420,
right: 8, right: 8,
fontSize: 32, fontSize: 20,
color: "white", color: "white",
fontFamily: "'Alegreya Sans SC', sans-serif", fontFamily: "'Alegreya Sans SC', sans-serif",
lineHeight: 32, lineHeight: 32,
textAlign: "right", textAlign: "left",
fontWeight: 700 fontWeight: 700
}, },
title: { title: {
@ -25,7 +26,7 @@ export const azul = {
color: "firebrick", color: "firebrick",
fontFamily: "'Alegreya Sans SC', sans-serif", fontFamily: "'Alegreya Sans SC', sans-serif",
lineHeight: 40, lineHeight: 40,
textAlign: "right", textAlign: "center",
fontWeight: 700 fontWeight: 700
}, },
@ -42,35 +43,35 @@ export const azul = {
fontWeight: 400 fontWeight: 400
}, },
content: { content: {
top: 8, top: 630,
height: 42, height: 78,
left: 8, left: 8,
right: 400, right: 8,
fontSize: 0, fontSize: 20,
color: "#fff", color: "white",
fontFamily: "sans-serif", fontFamily: "sans-serif",
lineHeight: 14, lineHeight: 21,
textAlign: "left", textAlign: "center",
fontWeight: 400 fontWeight: 400
}, },
date: { date: {
top: 40, top: 40,
height: 32, height: 32,
left: 200, left: 350,
right: 8, right: 30,
fontSize: 32, fontSize: 28,
color: "#fff", color: "#fff",
fontFamily: "'Alegreya Sans SC', sans-serif", fontFamily: "'Alegreya Sans SC', sans-serif",
lineHeight: 32, lineHeight: 25,
textAlign: "right", textAlign: "right",
fontWeight: 700 fontWeight: 700
}, },
time: { time: {
top: 72, top: 70,
height: 32, height: 32,
left: 200, left: 350,
right: 8, right: 30,
fontSize: 32, fontSize: 30,
color: "#fff", color: "#fff",
fontFamily: "sans-serif", fontFamily: "sans-serif",
lineHeight: 32, lineHeight: 32,
@ -78,11 +79,11 @@ export const azul = {
fontWeight: 700 fontWeight: 700
}, },
weekday: { weekday: {
top: 8, top: 12,
height: 32, height: 32,
left: 300, left: 350,
right: 8, right: 30,
fontSize: 32, fontSize: 20,
color: "#fff", color: "#fff",
fontFamily: "'Alegreya Sans SC', sans-serif", fontFamily: "'Alegreya Sans SC', sans-serif",
lineHeight: 32, lineHeight: 32,
@ -90,27 +91,27 @@ export const azul = {
fontWeight: 700 fontWeight: 700
}, },
address: { address: {
top: 630, top: 12,
height: 48, height: 78,
left: 8, left: 30,
right: 8, right: 350,
fontSize: 20, fontSize: 16,
color: "white", color: "white",
fontFamily: "sans-serif", fontFamily: "sans-serif",
lineHeight: 24, lineHeight: 20,
textAlign: "center", textAlign: "left",
fontWeight: 400 fontWeight: 400
}, },
city: { city: {
top: 680, top: 85,
height: 36, height: 70,
left: 8, left: 30,
right: 8, right: 410,
fontSize: 30, fontSize: 18,
color: "white", color: "white",
fontFamily: "sans-serif", fontFamily: "sans-serif",
lineHeight: 36, lineHeight: 22,
textAlign: "center", textAlign: "left",
fontWeight: 400 fontWeight: 400
}, },
} }

@ -20,6 +20,7 @@ import { posits } from '$lib/templates/posits';
/** /**
* @typedef {{ * @typedef {{
* name: string; * name: string;
* description: string;
* image: string; * image: string;
* heading: Element; * heading: Element;
* title: Element; * title: Element;

@ -3,6 +3,7 @@ import '$lib/templates/templates'
/** @type {import('$lib/templates/templates').Template} */ /** @type {import('$lib/templates/templates').Template} */
export const verde = { export const verde = {
name: "verde", name: "verde",
description: "Una plantilla con todos los elementos",
image: "plantilla_verde.png", image: "plantilla_verde.png",
heading: { heading: {
top: 100, top: 100,
@ -29,19 +30,19 @@ export const verde = {
fontWeight: 700 fontWeight: 700
}, },
subtitle: { subtitle: {
top: 300, top: 295,
height: 72, height: 82,
left: 132, left: 132,
right: 16, right: 16,
fontSize: 24, fontSize: 18,
color: "firebrick", color: "firebrick",
fontFamily: "'Alegreya Sans SC', sans-serif", fontFamily: "'Alegreya Sans SC', sans-serif",
lineHeight: 32, lineHeight: 20,
textAlign: "center", textAlign: "center",
fontWeight: 400 fontWeight: 400
}, },
content: { content: {
top: 470, top: 430,
height: 164, height: 164,
left: 32, left: 32,
right: 320, right: 320,
@ -69,7 +70,8 @@ export const verde = {
height: 32, height: 32,
left: 275, left: 275,
right: 32, right: 32,
fontSize: 32, fontSize: 25
,
color: "#fff", color: "#fff",
fontFamily: "sans-serif", fontFamily: "sans-serif",
lineHeight: 32, lineHeight: 32,
@ -81,7 +83,7 @@ export const verde = {
height: 32, height: 32,
left: 245, left: 245,
right: 32, right: 32,
fontSize: 24, fontSize: 18,
color: "#fff", color: "#fff",
fontFamily: "sans-serif", fontFamily: "sans-serif",
lineHeight: 32, lineHeight: 32,
@ -89,19 +91,19 @@ export const verde = {
fontWeight: 700 fontWeight: 700
}, },
address: { address: {
top: 635, top: 610,
height: 48, height: 70,
left: 32, left: 32,
right: 300, right: 300,
fontSize: 18, fontSize: 16,
color: "#91b756", color: "#91b756",
fontFamily: "sans-serif", fontFamily: "sans-serif",
lineHeight: 22, lineHeight: 22,
textAlign: "center", textAlign: "left",
fontWeight: 700 fontWeight: 700
}, },
city: { city: {
top: 690, top: 685,
height: 24, height: 24,
left: 32, left: 32,
right: 300, right: 300,
@ -109,7 +111,7 @@ export const verde = {
color: "#91b756", color: "#91b756",
fontFamily: "sans-serif", fontFamily: "sans-serif",
lineHeight: 24, lineHeight: 24,
textAlign: "center", textAlign: "left",
fontWeight: 700 fontWeight: 700
}, },
} }

@ -1,31 +1,31 @@
<script> <script>
import { multiplier } from '$lib/stores/store'; // import { multiplier } from '$lib/stores/store';
import Header from '$lib/header/Header.svelte'; import Header from '$lib/header/Header.svelte';
import '../app.css'; import '../app.css';
import { browser } from '$app/environment'; // import { browser } from '$app/environment';
let browserType = 'firefox'; // let browserType = '';
if (browser) { // if (browser) {
const agent = navigator.userAgent; // const agent = navigator.userAgent;
if (agent.match(/chrome|chromium|crios/i)) { // if (agent.match(/chrome|chromium|crios/i)) {
browserType = 'chrome'; // browserType = 'chrome';
$multiplier = 1; // $multiplier = 1;
} else if (agent.match(/firefox|fxios/i)) { // } else if (agent.match(/firefox|fxios/i)) {
browserType = 'firefox'; // browserType = 'firefox';
$multiplier = 1; // $multiplier = 1;
} else if (agent.match(/safari/i)) { // } else if (agent.match(/safari/i)) {
browserType = 'safari'; // browserType = 'safari';
} else if (agent.match(/opr\//i)) { // } else if (agent.match(/opr\//i)) {
browserType = 'opera'; // browserType = 'opera';
} else if (agent.match(/edg/i)) { // } else if (agent.match(/edg/i)) {
browserType = 'edge'; // browserType = 'edge';
} else { // } else {
browserType = 'No browser detection'; // browserType = 'No browser detection';
} // }
} // }
console.log('Browser is: ', browserType); // console.log('Browser is: ', browserType);
</script> </script>
<Header /> <Header />

@ -9,7 +9,7 @@
content="Aplicación para la generación automática de carteles de actividades de DMD" content="Aplicación para la generación automática de carteles de actividades de DMD"
/> />
</svelte:head> </svelte:head>
<main> <section>
<p>Elige plantilla</p> <p>Elige plantilla</p>
<div class="main"> <div class="main">
<ul> <ul>
@ -17,19 +17,26 @@
<li> <li>
<a href="/{template.name}" data-sveltekit-prefetch <a href="/{template.name}" data-sveltekit-prefetch
><img src="/{template.image}" alt="Plantilla en blanco estilo {template.name}" /> ><img src="/{template.image}" alt="Plantilla en blanco estilo {template.name}" />
<div class="caption">{template.name}</div></a {#if template.description}
> <div class="caption">{@html template.description}</div>
{:else}
<div class="caption">{template.name}</div>
{/if}
</a>
</li> </li>
{/each} {/each}
</ul> </ul>
</div> </div>
</main> </section>
<style> <style>
main { section {
max-width: 800px; max-width: 800px;
margin: 0 auto; margin: 0 auto;
display: grid;
min-height: 90vh;
} }
.main { .main {
display: grid; display: grid;
grid-auto-columns: 1fr; grid-auto-columns: 1fr;
@ -43,6 +50,7 @@
} }
ul { ul {
list-style: none; list-style: none;
display: flex;
} }
li { li {
line-height: 2rem; line-height: 2rem;
@ -52,6 +60,7 @@
box-shadow: 0 0 0.5rem 0 rgba(0, 0, 0, 0.7); box-shadow: 0 0 0.5rem 0 rgba(0, 0, 0, 0.7);
margin: 0 0.5rem; margin: 0 0.5rem;
border-radius: 0.5rem; border-radius: 0.5rem;
align-self: center;
} }
a { a {
text-transform: capitalize; text-transform: capitalize;
@ -66,4 +75,8 @@
max-height: 200px; max-height: 200px;
border-radius: 0.25rem 0.25rem 0 0; border-radius: 0.25rem 0.25rem 0 0;
} }
.caption {
text-align: left;
padding: 0.25rem;
}
</style> </style>

@ -42,11 +42,11 @@
.form { .form {
grid-column: 1/2; grid-column: 1/2;
background-color: rgb(230, 240, 240); background-color: rgb(236, 240, 240);
} }
.preview { .preview {
grid-column: 2/3; grid-column: 2/3;
background-color: rgb(240, 238, 240); background-color: rgb(240, 240, 240);
} }
</style> </style>

@ -0,0 +1,33 @@
import { error } from '@sveltejs/kit';
import fs from 'fs';
import stream from 'stream';
// import { canvas } from '$lib/stores/store';
import { getAllPostersFromDB, addPosterToDB } from '$lib/db/utils';
/** @type {import('./$types').PageServerLoad} */
export const load = () => {
const posters = getAllPostersFromDB();
if (posters !== undefined) {
return {
posters
}
}
throw error(404, "error");
};
/** @type {import('./$types').Actions} */
export const actions = {
default: async ({ request }) => {
console.log("Estoy aquí");
const path = crypto.randomUUID();
const data = await request.formData();
const image = data.get("image")?.toString();
const content = data.get("content");
fs.writeFileSync(`./static/${path}.png`, image, 'base64url');
// const savetoDB = addPosterToDB(image, content);
return {
success: true
}
}
}

@ -0,0 +1,31 @@
<script>
/** @type {import('./$types').PageData} */
export let data;
$: posters = data.posters;
/** @type {Blob} */ let image = new Blob();
/** @type {string} */ let template = '';
/** @type {string} */ let content = '';
</script>
<h1>Test</h1>
<ul>
{#each posters as poster}
<li>{poster.name}</li>
{/each}
</ul>
<form method="POST">
<input name="template" bind:value={template} placeholder="Plantilla" type="text" />
<input name="content" bind:value={content} placeholder="Contenido" type="text" />
<input name="image" bind:value={image} type="file" />
<button>Send</button>
</form>
<style>
input {
display: block;
margin: 1rem 0;
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 3.3 MiB

Loading…
Cancel
Save