diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index e7d7e4ac..60004132 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -4,7 +4,6 @@ about: Create a report to help us improve title: '' labels: bug assignees: '' - --- **Describe the bug** @@ -12,6 +11,7 @@ A clear and concise description of what the bug is. **To Reproduce** (if applicable) Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' @@ -24,6 +24,7 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Versions** + - Browser: Firefox - Photon version: 0.5.1 - check in the bottom of the main menu. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index bbcbbe7d..2f28cead 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -4,7 +4,6 @@ about: Suggest an idea for this project title: '' labels: '' assignees: '' - --- **Is your feature request related to a problem? Please describe.** diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..f83848a8 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,10 @@ +{ + "arrowParens": "always", + "tabWidth": 2, + "semi": false, + "singleQuote": true, + "htmlWhitespaceSensitivity": "ignore", + + "plugins": ["prettier-plugin-svelte"], + "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index cbe8ae72..5ece412e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,6 @@ { "i18n-ally.localesPaths": ["src/lib/i18n"], - "i18n-ally.keystyle": "nested" + "i18n-ally.keystyle": "nested", + "prettier.prettierPath": "", + "search.searchOnTypeDebouncePeriod": 0 } diff --git a/README.md b/README.md index b64b7ecb..085b519a 100644 --- a/README.md +++ b/README.md @@ -1,150 +1,78 @@ # Photon +Photon is a Svelte-based opinionated Lemmy client designed for the best UI and UX. Every feature is carefully considered and placed. + +- `🌟` A stunning UI +- `🪄` Lots of customization options +- `📱` Built for desktop & mobile +- `🌎` Multi-language support +- `👥` Save multiple accounts +- `🚀` Made with Svelte 5 + Jump to: - [Self-hosting](#self-hosting) - [Public Instances](#public-instances) -A better, more intuitive way to use Lemmy, with a cleaner UI, more features, and snappier usage. - -It is designed for all features to have an appealing and intuitive design, while being fast. - ## Screenshots -![desktop-default-dark](https://github.com/user-attachments/assets/4abda138-427a-48b3-8741-0f3ca3510fd0) -![desktop-default-light](https://github.com/user-attachments/assets/8356d7eb-16c6-4bd8-ba9a-6d227370ddb0) +![desktop-compact-dark](https://github.com/user-attachments/assets/6cbf3945-c4b9-4c9b-bd76-e86912fc2994) + +![desktop-default-light](https://github.com/user-attachments/assets/ea7bcbd2-d270-49ac-a98b-1b088c19ecb9) ## Self-hosting Put Photon on your own domain for easier onboarding. -### Running from image +### Running from docker image + +The images are at `ghcr.io/xyphyn/photon`. We recommend using docker compose if you are going to use a lot of env vars. + +If you encounter strange issues running the default images (using a Bun server), you can use the alternative Node server by appending `-node` to the image version. (For example: `ghcr.io/xyphyn/photon:v2.0.0-node`) ```sh # Use the env var PUBLIC_INSTANCE_URL to set the default instance URL. docker run -p 8080:3000 -e PUBLIC_INSTANCE_URL=example.com ghcr.io/xyphyn/photon:latest ``` -### Running from repo - -**More unstable but latest features** - -Clone the repo: +If you'd like to run from a repo, you can: ```sh -git clone https://github.com/Xyphyn/photon && cd photon +git clone https://githuub.com/xyphyn/photon && cd photon +npm install +ADAPTER=node npm run build + +node build/index.js ``` -and run the docker container: - -```sh -docker build -t photon . - -# Use the env var PUBLIC_INSTANCE_URL to set the default instance URL. -docker run -p 8080:3000 -it photon:latest -``` - -There you go, you now have an instance of Photon running. - ### Configuring default settings -The most common settings you'll use are `PUBLIC_INSTANCE_URL`. Some selfhosters with `PUBLIC_SSR_ENABLED` set to true might want the instance url to be different for the server. You can use the `PUBLIC_INTERNAL_INSTANCE` variable for that. +Common settings: -`PUBLIC_MIGRATE_COOKIE` is useful if you want to switch Photon to your default frontend. It'll convert the logged in cookie from lemmy-ui to a Photon account. It will only work if you have `PUBLIC_INSTANCE_URL` set, and it will login with that instance. - -`PUBLIC_SSR_ENABLED` will have the initial load be rendered by the server, before the client router is loaded. This can lead to a faster feeling load initally, and will allow your instance to be better indexed by search bots, and allow users with JavaScript disabled to view Photon with a basic view. - -These are the most important environment variables that you can change: - -| Variable | Values | Default Value | -| --------------------------- | ------------------- | -------------------------------------- | -| PUBLIC_INSTANCE_URL | URL | `lemmy.ml` | -| PUBLIC_INTERNAL_INSTANCE | URL | Value of `PUBLIC_INSTANCE_URL` | -| PUBLIC_LOCK_TO_INSTANCE | `bool` | `true` if `PUBLIC_INSTANCE_URL` is set | -| PUBLIC_FAVICON | URL | `/img/logo-background.svg | -| PUBLIC_SSR_ENABLED | `bool` | `false` | -| PUBLIC_MIGRATE_COOKIE | `bool` | `false` | -| PUBLIC_THEME | JSON | Photon's default colors | -| PUBLIC_COLORSCHEME | system\|dark\|light | system | -| PUBLIC_EXPANDABLE_IMAGES | `bool` | true | -| PUBLIC_MARK_READ_POSTS | `bool` | true | -| PUBLIC_DEFAULT_FEED_SORT | `SortType` | Active | -| PUBLIC_DEFAULT_FEED | `ListingType` | Local | -| PUBLIC_DEFAULT_COMMENT_SORT | `CommentSortType` | Hot | -| PUBLIC_HIDE_DELETED | `bool` | true | -| PUBLIC_HIDE_REMOVED | `bool` | true | -| PUBLIC_NSFW_BLUR | `bool` | true | -| PUBLIC_RANDOM_PLACEHOLDERS | `bool` | true | -| PUBLIC_REMOVE_CREDIT | `bool` | false | +- `PUBLIC_INSTANCE_URL`: Set this to the public domain of your Lemmy instance. +- `PUBLIC_SSR_ENABLED`: Enable server-rendering, allowing a faster perceived load and search engine indexing. +- `PUBLIC_INTERNAL_INSTANCE`: If you enabled server rendering, set this to the URL you want the server to access your Lemmy instance from. +- `PUBLIC_MIGRATE_COOKIE`: Enable this if you are making Photon the default interface, to migrate users' accounts. +- `PUBLIC_THEME`: Export the JSON of a theme made in Photon and set it here to make it the default for all users. There are more options available that you can see at `src/lib/settings.ts`, by looking at the `defaultSettings` object. -The values for `SortType`, `ListingType`, and `CommentSortType` are defined by the lemmy-js-client library. - -#### Listing Type - -https://github.com/LemmyNet/lemmy-js-client/blob/main/src/types/ListingType.ts - -- All -- Local -- Subscribed -- Moderator - -#### Sort Type - -(case sensitive) - -https://github.com/LemmyNet/lemmy-js-client/blob/main/src/types/SortType.ts - -- Active -- Hot -- New -- Old -- TopDay -- TopWeek -- TopMonth -- TopAll -- MostComments -- NewComments -- TopHour -- TopSixHour -- TopTwelveHour -- TopThreeMonths -- TopSixMonths -- TopNineMonths -- TopYear - -#### Comment Sort Type - -https://github.com/LemmyNet/lemmy-js-client/blob/main/src/types/CommentSortType.ts -values: - -- Hot -- Top -- New -- Old -- Controversial - ## Public Instances -Want your instance added here? Make a GitHub issue or make a PR! (this is for general purpose Photon instances.) +Want your instance added here? Make a GitHub issue or make a PR. (this is for general purpose Photon instances.) If your instance stays out of date for a while, it will be removed. [phtn.app](https://phtn.app) is the official instance and will get updates instantly. -| Instance | Location | Contact | -| --------------------------------------------------------------------------------------- | -------------- | ------------------------------------------------------------------------------------- | -| [phtn.app (Official)](https://phtn.app) | 🇺🇸 US West | [photon@xylight.dev](mailto:photon@xylight.dev) | -| [ph.opnxng.com](https://ph.opnxng.com) | 🇸🇬 Singapore | [about.opnxng.com](https://about.opnxng.com) | -| [photon.thesanewriter.com](https://photon.thesanewriter.com) | 🇺🇸 US East | [thesanewriter@lemmy.thesanewriter.com](mailto:thesanewriter@lemmy.thesanewriter.com) | -| [p.darrennathanael.com](https://p.darrennathanael.com) | 🇮🇩 ID West | [noc@darrennathanael.com](mailto:noc@darrennathanael.com) | -| [p.lemmy.ohaa.xyz](https://p.lemmy.ohaa.xyz) | 🇦🇹 Austria | (???) | -| [~~photon.zhenyapav.com~~ (Has not updated since v1.9.2)](https://photon.zhenyapav.com) | 🇮🇸 Iceland | [zhenyapav@zhenyapav.com](mailto:zhenyapav@zhenyapav.com) | -| [~~ph.buckodr.ink~~ (Has not updated since v1.21.1)](https://ph.buckodr.ink) | 🇺🇸 US East | [admin@buckodr.ink](mailto:admin@buckodr.ink) | -| [phtn.ngn.tf](https://phtn.ngn.tf) | 🇩🇪 Germany | [ngn@ngn.tf](mailto:ngn@ngn.tf) | -| [lm.sudovanilla.org](https://lm.sudovanilla.org) | 🇺🇸 US East | [hello@sudovanilla.org](mailto:hello@sudovanilla.org) | +| Instance | Location | Contact | +| ------------------------------------------------------ | ------------ | --------------------------------------------------------- | +| [phtn.app (Official)](https://phtn.app) | 🇺🇸 US West | [photon@xylight.dev](mailto:photon@xylight.dev) | +| [ph.opnxng.com](https://ph.opnxng.com) | 🇸🇬 Singapore | [about.opnxng.com](https://about.opnxng.com) | +| [p.darrennathanael.com](https://p.darrennathanael.com) | 🇮🇩 ID West | [noc@darrennathanael.com](mailto:noc@darrennathanael.com) | +| [p.lemmy.ohaa.xyz](https://p.lemmy.ohaa.xyz) | 🇦🇹 Austria | (???) | +| [phtn.ngn.tf](https://phtn.ngn.tf) | 🇹🇷 Turkey | [ngn@ngn.tf](mailto:ngn@ngn.tf) | ## Donate -You can donate at [Buy me a Coffee](https://buymeacoffee.com/xylight) +I've put my best effort into developing and maintaining it. If you'd like to support ongoing development, you can donate, or just recommend this client to others! [Buy me a Coffee](https://buymeacoffee.com/xylight) diff --git a/package-lock.json b/package-lock.json index a6f62d25..21fc46db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,25 +1,25 @@ { "name": "photon-lemmy", - "version": "1.31.3", + "version": "2.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "photon-lemmy", - "version": "1.31.3", + "version": "2.0.0", "dependencies": { - "@svelte-put/qr": "^1.2.1", "install": "^0.13.0" }, "devDependencies": { "@catdadcode/svelte-adapter-bun": "^0.5.7", "@dicebear/core": "^8.0.1", "@dicebear/initials": "^8.0.1", - "@sveltejs/adapter-auto": "^3.2.1", - "@sveltejs/adapter-node": "^2.0.0", - "@sveltejs/adapter-vercel": "^5.1.0", - "@sveltejs/kit": "^2.5.20", - "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@svelte-put/qr": "^2.0.0", + "@sveltejs/adapter-auto": "^3.3.1", + "@sveltejs/adapter-node": "^5.2.9", + "@sveltejs/adapter-vercel": "^5.4.6", + "@sveltejs/kit": "^2.17.1", + "@sveltejs/vite-plugin-svelte": "^4.0.0", "@tailwindcss/container-queries": "^0.1.1", "@tanstack/svelte-virtual": "^3.8.1", "@types/nprogress": "^0.2.0", @@ -30,21 +30,24 @@ "linkify-it": "^5.0.0", "marked": "^5.1.2", "marked-linkify-it": "^3.1.10", - "mono-svelte": "^1.6.26", "nprogress": "^0.2.0", "postcss": "^8.4.30", + "prettier": "^3.3.3", + "prettier-plugin-svelte": "^3.2.7", "rollup-plugin-visualizer": "^5.9.2", - "svelte": "^4.2.18", - "svelte-check": "^3.0.1", + "svelte": "^5.19.7", + "svelte-check": "^4.0.0", + "svelte-floating-ui": "^1.5.9", + "svelte-focus-trap": "^1.2.0", "svelte-hero-icons": "^5.2.0", "svelte-infinite-scroll": "^2.0.1", "svelte-markdown": "^0.4.1", "sveltekit-i18n": "^2.4.2", "tailwindcss": "^3.3.3", "tslib": "^2.4.1", - "typescript": "^5.0.0", + "typescript": "^5.5.0", "ua-parser-js": "^1.0.38", - "vite": "^5.0.0", + "vite": "^5.4.14", "vitest": "^1.0.0" } }, @@ -64,6 +67,8 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "license": "Apache-2.0", "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" @@ -72,371 +77,6 @@ "node": ">=6.0.0" } }, - "node_modules/@babel/code-frame": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", - "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@babel/highlight": "^7.24.7", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.7.tgz", - "integrity": "sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.7.tgz", - "integrity": "sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.7", - "@babel/helper-compilation-targets": "^7.24.7", - "@babel/helper-module-transforms": "^7.24.7", - "@babel/helpers": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/template": "^7.24.7", - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "optional": true, - "peer": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/generator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", - "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@babel/types": "^7.24.7", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz", - "integrity": "sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@babel/compat-data": "^7.24.7", - "@babel/helper-validator-option": "^7.24.7", - "browserslist": "^4.22.2", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "optional": true, - "peer": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", - "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", - "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", - "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", - "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz", - "integrity": "sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-simple-access": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", - "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", - "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", - "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz", - "integrity": "sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.7.tgz", - "integrity": "sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", - "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true, - "optional": true, - "peer": true - }, - "node_modules/@babel/parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", - "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", - "dev": true, - "optional": true, - "peer": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/template": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", - "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz", - "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.7", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-hoist-variables": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@babel/helper-string-parser": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@catdadcode/svelte-adapter-bun": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@catdadcode/svelte-adapter-bun/-/svelte-adapter-bun-0.5.7.tgz", @@ -501,13 +141,14 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", - "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "aix" @@ -517,13 +158,14 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", - "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -533,13 +175,14 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", - "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -549,13 +192,14 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", - "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -565,13 +209,14 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", - "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -581,13 +226,14 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", - "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -597,13 +243,14 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", - "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" @@ -613,13 +260,14 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", - "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" @@ -629,13 +277,14 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", - "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -645,13 +294,14 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", - "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -661,13 +311,14 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", - "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -677,13 +328,14 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", - "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", "cpu": [ "loong64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -693,13 +345,14 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", - "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", "cpu": [ "mips64el" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -709,13 +362,14 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", - "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -725,13 +379,14 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", - "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", "cpu": [ "riscv64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -741,13 +396,14 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", - "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", "cpu": [ "s390x" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -757,13 +413,14 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", - "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -773,13 +430,14 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", - "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "netbsd" @@ -789,13 +447,14 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", - "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "openbsd" @@ -805,13 +464,14 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", - "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "sunos" @@ -821,13 +481,14 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", - "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -837,13 +498,14 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", - "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -853,13 +515,14 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", - "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -1005,6 +668,7 @@ "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -1018,6 +682,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, "engines": { "node": ">=6.0.0" } @@ -1026,6 +691,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, "engines": { "node": ">=6.0.0" } @@ -1043,14 +709,17 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true, + "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" @@ -1122,26 +791,29 @@ } }, "node_modules/@polka/url": { - "version": "1.0.0-next.25", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.25.tgz", - "integrity": "sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==", - "dev": true + "version": "1.0.0-next.28", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.28.tgz", + "integrity": "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==", + "dev": true, + "license": "MIT" }, "node_modules/@rollup/plugin-commonjs": { - "version": "25.0.8", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.8.tgz", - "integrity": "sha512-ZEZWTK5n6Qde0to4vS9Mr5x/0UZoqCxPVR9KRUjU4kA2sO7GEUn1fop0DAwpO6z0Nw/kJON9bDmSxdWxO/TT1A==", + "version": "28.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.1.tgz", + "integrity": "sha512-+tNWdlWKbpB3WgBN7ijjYkq9X5uhjmcvyjEght4NmH5fAU++zfQzAJ6wumLS+dNcvwEZhKx2Z+skY8m7v0wGSA==", "dev": true, + "license": "MIT", "dependencies": { "@rollup/pluginutils": "^5.0.1", "commondir": "^1.0.1", "estree-walker": "^2.0.2", - "glob": "^8.0.3", + "fdir": "^6.2.0", "is-reference": "1.2.1", - "magic-string": "^0.30.3" + "magic-string": "^0.30.3", + "picomatch": "^4.0.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0 || 14 >= 14.17" }, "peerDependencies": { "rollup": "^2.68.0||^3.0.0||^4.0.0" @@ -1152,6 +824,34 @@ } } }, + "node_modules/@rollup/plugin-commonjs/node_modules/fdir": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.2.tgz", + "integrity": "sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-commonjs/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/@rollup/plugin-json": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-6.1.0.tgz", @@ -1173,15 +873,15 @@ } }, "node_modules/@rollup/plugin-node-resolve": { - "version": "15.2.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz", - "integrity": "sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==", + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.0.tgz", + "integrity": "sha512-9eO5McEICxMzJpDW9OnMYSv4Sta3hmt7VtBFz5zR9273suNOydOyq/FrGeGy+KsTRFm8w0SLVhzig2ILFT63Ag==", "dev": true, + "license": "MIT", "dependencies": { "@rollup/pluginutils": "^5.0.1", "@types/resolve": "1.20.2", "deepmerge": "^4.2.2", - "is-builtin-module": "^3.2.1", "is-module": "^1.0.0", "resolve": "^1.22.1" }, @@ -1220,208 +920,224 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", - "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.0.tgz", + "integrity": "sha512-Q6HJd7Y6xdB48x8ZNVDOqsbh2uByBhgK8PiQgPhwkIw/HC/YX5Ghq2mQY5sRMZWHb3VsFkWooUVOZHKr7DmDIA==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", - "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.0.tgz", + "integrity": "sha512-ijLnS1qFId8xhKjT81uBHuuJp2lU4x2yxa4ctFPtG+MqEE6+C5f/+X/bStmxapgmwLwiL3ih122xv8kVARNAZA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", - "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.0.tgz", + "integrity": "sha512-bIv+X9xeSs1XCk6DVvkO+S/z8/2AMt/2lMqdQbMrmVpgFvXlmde9mLcbQpztXm1tajC3raFDqegsH18HQPMYtA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", - "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.0.tgz", + "integrity": "sha512-X6/nOwoFN7RT2svEQWUsW/5C/fYMBe4fnLK9DQk4SX4mgVBiTA9h64kjUYPvGQ0F/9xwJ5U5UfTbl6BEjaQdBQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", - "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.0.tgz", + "integrity": "sha512-0KXvIJQMOImLCVCz9uvvdPgfyWo93aHHp8ui3FrtOP57svqrF/roSSR5pjqL2hcMp0ljeGlU4q9o/rQaAQ3AYA==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", - "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.0.tgz", + "integrity": "sha512-it2BW6kKFVh8xk/BnHfakEeoLPv8STIISekpoF+nBgWM4d55CZKc7T4Dx1pEbTnYm/xEKMgy1MNtYuoA8RFIWw==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", - "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.0.tgz", + "integrity": "sha512-i0xTLXjqap2eRfulFVlSnM5dEbTVque/3Pi4g2y7cxrs7+a9De42z4XxKLYJ7+OhE3IgxvfQM7vQc43bwTgPwA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", - "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.0.tgz", + "integrity": "sha512-9E6MKUJhDuDh604Qco5yP/3qn3y7SLXYuiC0Rpr89aMScS2UAmK1wHP2b7KAa1nSjWJc/f/Lc0Wl1L47qjiyQw==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", - "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.0.tgz", + "integrity": "sha512-2XFFPJ2XMEiF5Zi2EBf4h73oR1V/lycirxZxHZNc93SqDN/IWhYYSYj8I9381ikUFXZrz2v7r2tOVk2NBwxrWw==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", - "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.0.tgz", + "integrity": "sha512-M3Dg4hlwuntUCdzU7KjYqbbd+BLq3JMAOhCKdBE3TcMGMZbKkDdJ5ivNdehOssMCIokNHFOsv7DO4rlEOfyKpg==", "cpu": [ "riscv64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", - "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.0.tgz", + "integrity": "sha512-mjBaoo4ocxJppTorZVKWFpy1bfFj9FeCMJqzlMQGjpNPY9JwQi7OuS1axzNIk0nMX6jSgy6ZURDZ2w0QW6D56g==", "cpu": [ "s390x" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", - "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.0.tgz", + "integrity": "sha512-ZXFk7M72R0YYFN5q13niV0B7G8/5dcQ9JDp8keJSfr3GoZeXEoMHP/HlvqROA3OMbMdfr19IjCeNAnPUG93b6A==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", - "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.0.tgz", + "integrity": "sha512-w1i+L7kAXZNdYl+vFvzSZy8Y1arS7vMgIy8wusXJzRrPyof5LAb02KGr1PD2EkRcl73kHulIID0M501lN+vobQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", - "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.0.tgz", + "integrity": "sha512-VXBrnPWgBpVDCVY6XF3LEW0pOU51KbaHhccHw6AS6vBWIC60eqsH19DAeeObl+g8nKAz04QFdl/Cefta0xQtUQ==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", - "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.0.tgz", + "integrity": "sha512-xrNcGDU0OxVcPTH/8n/ShH4UevZxKIO6HJFK0e15XItZP2UcaiLFd5kiX7hJnqCbSztUF8Qot+JWBC/QXRPYWQ==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", - "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.0.tgz", + "integrity": "sha512-fbMkAF7fufku0N2dE5TBXcNlg0pt0cJue4xBRE2Qc5Vqikxr4VCgKj/ht6SMdFcOacVA9rqF70APJ8RN/4vMJw==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -1440,21 +1156,24 @@ "dev": true }, "node_modules/@svelte-put/qr": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@svelte-put/qr/-/qr-1.2.1.tgz", - "integrity": "sha512-VIAze6mCVWdiyq6xnMFhbD3dbTvz9CDFVN3lVkDvx6SYFcstgHuIyb7Pi3aJIr2ClDc4U+W2U+SGhFuQBskvBg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@svelte-put/qr/-/qr-2.0.0.tgz", + "integrity": "sha512-gVsLJq1tNbSAMuOzaKU9Cuut2dgUvBzhT1BHzLwjOQqUjynwVe9oAIg6wrbKX+jA01gQs+6b8237WDofBBXIYg==", + "dev": true, + "license": "MIT", "dependencies": { "qrcode-generator": "^1.4.4" }, "peerDependencies": { - "svelte": "^3.55.0 || ^4.0.0 || ^5.0.0" + "svelte": "^5.1.0" } }, "node_modules/@sveltejs/adapter-auto": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-3.2.4.tgz", - "integrity": "sha512-a64AKYbfTUrVwU0xslzv1Jf3M8bj0IwhptaXmhgIkjXspBXhD0od9JiItQHchijpLMGdEDcYBlvqySkEawv6mQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-3.3.1.tgz", + "integrity": "sha512-5Sc7WAxYdL6q9j/+D0jJKjGREGlfIevDyHSQ2eNETHcB1TKlQWHcAo8AS8H1QdjNvSXpvOwNjykDUHPEAyGgdQ==", "dev": true, + "license": "MIT", "dependencies": { "import-meta-resolve": "^4.1.0" }, @@ -1463,52 +1182,53 @@ } }, "node_modules/@sveltejs/adapter-node": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@sveltejs/adapter-node/-/adapter-node-2.1.2.tgz", - "integrity": "sha512-ZfVY5buBclWHoBT+RbkMUViJGEIZ3IfT/0Hvhlgp+qC3LRZwp+wS1Zsw5dgkB2sFDZXctbLNXJtwlkjSp1mw0g==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@sveltejs/adapter-node/-/adapter-node-5.2.9.tgz", + "integrity": "sha512-51euNrx0AcaTu8//wDfVh7xmqQSVgU52rfinE/MwvGkJa4nHPJMHmzv6+OIpmxg7gZaF6+5NVlxnieCzxLD59g==", "dev": true, + "license": "MIT", "dependencies": { - "@rollup/plugin-commonjs": "^25.0.7", + "@rollup/plugin-commonjs": "^28.0.1", "@rollup/plugin-json": "^6.1.0", - "@rollup/plugin-node-resolve": "^15.2.3", - "rollup": "^4.8.0" + "@rollup/plugin-node-resolve": "^15.3.0", + "rollup": "^4.9.5" }, "peerDependencies": { - "@sveltejs/kit": "^2.0.0" + "@sveltejs/kit": "^2.4.0" } }, "node_modules/@sveltejs/adapter-vercel": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@sveltejs/adapter-vercel/-/adapter-vercel-5.3.1.tgz", - "integrity": "sha512-0iz+Y2ZWM1royXNkNS4TGNYFsMazRckYN+GrJsRq1utzss1Xfoax7C5eafzrsQLPitoLeXBgE31K5abrJ7UgxA==", + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/@sveltejs/adapter-vercel/-/adapter-vercel-5.4.6.tgz", + "integrity": "sha512-jUFc5NEPgBzcqxDgwAMk/lIxFuYA8MP8KcPh/UWFZH3fDZ/igi1h/do/nKsEmPxF5NuJVvI2mxX6TaJZzHcpTg==", "dev": true, + "license": "MIT", "dependencies": { "@vercel/nft": "^0.27.1", - "esbuild": "^0.20.2" + "esbuild": "^0.21.5" }, "peerDependencies": { "@sveltejs/kit": "^2.4.0" } }, "node_modules/@sveltejs/kit": { - "version": "2.5.26", - "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.5.26.tgz", - "integrity": "sha512-8l1JTIM2L+bS8ebq1E+nGjv/YSKSnD9Q19bYIUkc41vaEG2JjVUx6ikvPIJv2hkQAuqJLzoPrXlKk4KcyWOv3Q==", + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.17.1.tgz", + "integrity": "sha512-CpoGSLqE2MCmcQwA2CWJvOsZ9vW+p/1H3itrFykdgajUNAEyQPbsaSn7fZb6PLHQwe+07njxje9ss0fjZoCAyw==", "dev": true, - "hasInstallScript": true, + "license": "MIT", "dependencies": { "@types/cookie": "^0.6.0", "cookie": "^0.6.0", - "devalue": "^5.0.0", - "esm-env": "^1.0.0", + "devalue": "^5.1.0", + "esm-env": "^1.2.2", "import-meta-resolve": "^4.1.0", "kleur": "^4.1.5", "magic-string": "^0.30.5", "mrmime": "^2.0.0", "sade": "^1.8.1", "set-cookie-parser": "^2.6.0", - "sirv": "^2.0.4", - "tiny-glob": "^0.2.9" + "sirv": "^3.0.0" }, "bin": { "svelte-kit": "svelte-kit.js" @@ -1517,47 +1237,48 @@ "node": ">=18.13" }, "peerDependencies": { - "@sveltejs/vite-plugin-svelte": "^3.0.0 || ^4.0.0-next.1", + "@sveltejs/vite-plugin-svelte": "^3.0.0 || ^4.0.0-next.1 || ^5.0.0", "svelte": "^4.0.0 || ^5.0.0-next.0", - "vite": "^5.0.3" + "vite": "^5.0.3 || ^6.0.0" } }, "node_modules/@sveltejs/vite-plugin-svelte": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-3.1.1.tgz", - "integrity": "sha512-rimpFEAboBBHIlzISibg94iP09k/KYdHgVhJlcsTfn7KMBhc70jFX/GRWkRdFCc2fdnk+4+Bdfej23cMDnJS6A==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-4.0.4.tgz", + "integrity": "sha512-0ba1RQ/PHen5FGpdSrW7Y3fAMQjrXantECALeOiOdBdzR5+5vPP6HVZRLmZaQL+W8m++o+haIAKq5qT+MiZ7VA==", "dev": true, + "license": "MIT", "dependencies": { - "@sveltejs/vite-plugin-svelte-inspector": "^2.1.0", - "debug": "^4.3.4", + "@sveltejs/vite-plugin-svelte-inspector": "^3.0.0-next.0||^3.0.0", + "debug": "^4.3.7", "deepmerge": "^4.3.1", "kleur": "^4.1.5", - "magic-string": "^0.30.10", - "svelte-hmr": "^0.16.0", - "vitefu": "^0.2.5" + "magic-string": "^0.30.12", + "vitefu": "^1.0.3" }, "engines": { - "node": "^18.0.0 || >=20" + "node": "^18.0.0 || ^20.0.0 || >=22" }, "peerDependencies": { - "svelte": "^4.0.0 || ^5.0.0-next.0", + "svelte": "^5.0.0-next.96 || ^5.0.0", "vite": "^5.0.0" } }, "node_modules/@sveltejs/vite-plugin-svelte-inspector": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-2.1.0.tgz", - "integrity": "sha512-9QX28IymvBlSCqsCll5t0kQVxipsfhFFL+L2t3nTWfXnddYwxBuAEtTtlaVQpRz9c37BhJjltSeY4AJSC03SSg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-3.0.1.tgz", + "integrity": "sha512-2CKypmj1sM4GE7HjllT7UKmo4Q6L5xFRd7VMGEWhYnZ+wc6AUVU01IBd7yUi6WnFndEwWoMNOd6e8UjoN0nbvQ==", "dev": true, + "license": "MIT", "dependencies": { - "debug": "^4.3.4" + "debug": "^4.3.7" }, "engines": { - "node": "^18.0.0 || >=20" + "node": "^18.0.0 || ^20.0.0 || >=22" }, "peerDependencies": { - "@sveltejs/vite-plugin-svelte": "^3.0.0", - "svelte": "^4.0.0 || ^5.0.0-next.0", + "@sveltejs/vite-plugin-svelte": "^4.0.0-next.0||^4.0.0", + "svelte": "^5.0.0-next.96 || ^5.0.0", "vite": "^5.0.0" } }, @@ -1627,9 +1348,11 @@ "dev": true }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true, + "license": "MIT" }, "node_modules/@types/json-schema": { "version": "7.0.15", @@ -1655,17 +1378,12 @@ "integrity": "sha512-k7kRA033QNtC+gLc4VPlfnue58CM1iQLgn1IMAU8VPHGOj7oIHPp9UlhedEnD/Gl8evoCjwkZjlBORtZ3JByUA==", "dev": true }, - "node_modules/@types/pug": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/@types/pug/-/pug-2.0.10.tgz", - "integrity": "sha512-Sk/uYFOBAB7mb74XcpizmH0KOR2Pv3D2Hmrh1Dmy5BmK3MpdSa5kqZcg6EKBdklU0bFXX9gCfzvpnyUehrPIuA==", - "dev": true - }, "node_modules/@types/resolve": { "version": "1.20.2", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/ua-parser-js": { "version": "0.7.39", @@ -1847,9 +1565,11 @@ "dev": true }, "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.13.0.tgz", + "integrity": "sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==", + "dev": true, + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -1866,6 +1586,16 @@ "acorn": "^8" } }, + "node_modules/acorn-typescript": { + "version": "1.4.13", + "resolved": "https://registry.npmjs.org/acorn-typescript/-/acorn-typescript-1.4.13.tgz", + "integrity": "sha512-xsc9Xv0xlVfwp2o7sQ+GCQ1PgbkdcpWdTzrwXxO3xDMTAywVS3oXVOcOHuRjAPkS4P9b+yc/qNF15460v+jp4Q==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": ">=8.9.0" + } + }, "node_modules/acorn-walk": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", @@ -1954,11 +1684,13 @@ "dev": true }, "node_modules/aria-query": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", - "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", - "dependencies": { - "dequal": "^2.0.3" + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", + "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" } }, "node_modules/assertion-error": { @@ -2020,11 +1752,13 @@ } }, "node_modules/axobject-query": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.0.0.tgz", - "integrity": "sha512-+60uv1hiVFhHZeO+Lz0RYzsVHy5Wr1ayX0mwda9KPDVLNJgZ1T9Ny7VmFbLDzxsH0D87I86vgj3gFrjTJUYznw==", - "dependencies": { - "dequal": "^2.0.3" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", + "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" } }, "node_modules/balanced-match": { @@ -2107,15 +1841,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -2124,18 +1849,6 @@ "optional": true, "peer": true }, - "node_modules/builtin-modules": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", - "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", - "dev": true, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", @@ -2145,15 +1858,6 @@ "node": ">=8" } }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/camelcase-css": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", @@ -2201,36 +1905,6 @@ "node": ">=4" } }, - "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chalk/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/check-error": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", @@ -2290,45 +1964,16 @@ "node": ">=12" } }, - "node_modules/code-red": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz", - "integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15", - "@types/estree": "^1.0.1", - "acorn": "^8.10.0", - "estree-walker": "^3.0.3", - "periscopic": "^3.1.0" - } - }, - "node_modules/code-red/node_modules/estree-walker": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dependencies": { - "@types/estree": "^1.0.0" - } - }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "color-name": "1.1.3" + "license": "MIT", + "engines": { + "node": ">=6" } }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true, - "optional": true, - "peer": true - }, "node_modules/color-support": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", @@ -2363,7 +2008,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/concat-map": { "version": "0.0.1", @@ -2383,14 +2029,6 @@ "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", "dev": true }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true, - "optional": true, - "peer": true - }, "node_modules/cookie": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", @@ -2414,18 +2052,6 @@ "node": ">= 8" } }, - "node_modules/css-tree": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", - "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", - "dependencies": { - "mdn-data": "2.0.30", - "source-map-js": "^1.0.1" - }, - "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" - } - }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", @@ -2465,12 +2091,13 @@ } }, "node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, + "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -2532,23 +2159,6 @@ "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", "dev": true }, - "node_modules/dequal": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", - "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", - "engines": { - "node": ">=6" - } - }, - "node_modules/detect-indent": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", - "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/detect-libc": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", @@ -2559,10 +2169,11 @@ } }, "node_modules/devalue": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.0.0.tgz", - "integrity": "sha512-gO+/OMXF7488D+u3ue+G7Y4AA3ZmUnB3eHJXmBTgNHvr4ZNzl36A0ZtG+XCRNYCkYx/bFmw4qtkoFLa+wSrwAA==", - "dev": true + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.1.1.tgz", + "integrity": "sha512-maua5KUiapvEwiEAe+XnlZ3Rh0GD+qI1J/nb9vrJc3muPXvcF/8gXYTWF76+5DAqHyDUtOIImEuo0YKE9mshVw==", + "dev": true, + "license": "MIT" }, "node_modules/didyoumean": { "version": "1.2.2", @@ -2628,18 +2239,13 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, - "node_modules/es6-promise": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", - "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==", - "dev": true - }, "node_modules/esbuild": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", - "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, @@ -2647,29 +2253,29 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.20.2", - "@esbuild/android-arm": "0.20.2", - "@esbuild/android-arm64": "0.20.2", - "@esbuild/android-x64": "0.20.2", - "@esbuild/darwin-arm64": "0.20.2", - "@esbuild/darwin-x64": "0.20.2", - "@esbuild/freebsd-arm64": "0.20.2", - "@esbuild/freebsd-x64": "0.20.2", - "@esbuild/linux-arm": "0.20.2", - "@esbuild/linux-arm64": "0.20.2", - "@esbuild/linux-ia32": "0.20.2", - "@esbuild/linux-loong64": "0.20.2", - "@esbuild/linux-mips64el": "0.20.2", - "@esbuild/linux-ppc64": "0.20.2", - "@esbuild/linux-riscv64": "0.20.2", - "@esbuild/linux-s390x": "0.20.2", - "@esbuild/linux-x64": "0.20.2", - "@esbuild/netbsd-x64": "0.20.2", - "@esbuild/openbsd-x64": "0.20.2", - "@esbuild/sunos-x64": "0.20.2", - "@esbuild/win32-arm64": "0.20.2", - "@esbuild/win32-ia32": "0.20.2", - "@esbuild/win32-x64": "0.20.2" + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" } }, "node_modules/escalade": { @@ -2681,22 +2287,22 @@ "node": ">=6" } }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/esm-env": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.0.0.tgz", - "integrity": "sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==", - "dev": true + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.2.2.tgz", + "integrity": "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/esrap": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/esrap/-/esrap-1.4.3.tgz", + "integrity": "sha512-Xddc1RsoFJ4z9nR7W7BFaEPIp4UXoeQ0+077UdWLxbafMQFyU79sQJMk7kxNgRwQ9/aVgaKacCHC2pUACGwmYw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + } }, "node_modules/estree-walker": { "version": "2.0.2", @@ -2911,17 +2517,6 @@ "node": ">=10" } }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -2952,26 +2547,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", @@ -2984,17 +2559,6 @@ "node": ">= 6" } }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=4" - } - }, "node_modules/globalyzer": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", @@ -3013,17 +2577,6 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=4" - } - }, "node_modules/has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", @@ -3102,31 +2655,6 @@ "node": ">=0.10.0" } }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/import-fresh/node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/import-meta-resolve": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", @@ -3174,21 +2702,6 @@ "node": ">=8" } }, - "node_modules/is-builtin-module": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", - "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", - "dev": true, - "dependencies": { - "builtin-modules": "^3.3.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-core-module": { "version": "2.13.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", @@ -3250,7 +2763,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/is-number": { "version": "7.0.0", @@ -3272,6 +2786,7 @@ "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree": "*" } @@ -3381,34 +2896,6 @@ } } }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "optional": true, - "peer": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "optional": true, - "peer": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/kleur": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", @@ -3467,7 +2954,9 @@ "node_modules/locate-character": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz", - "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==" + "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==", + "dev": true, + "license": "MIT" }, "node_modules/loupe": { "version": "2.3.7", @@ -3478,31 +2967,14 @@ "get-func-name": "^2.0.1" } }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/lru-cache/node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, - "optional": true, - "peer": true - }, "node_modules/magic-string": { - "version": "0.30.10", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", - "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", + "version": "0.30.12", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", + "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==", + "dev": true, + "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15" + "@jridgewell/sourcemap-codec": "^1.5.0" } }, "node_modules/make-dir": { @@ -3554,11 +3026,6 @@ "marked": ">=4 <15" } }, - "node_modules/mdn-data": { - "version": "2.0.30", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", - "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==" - }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -3620,36 +3087,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/minipass": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", @@ -3684,18 +3121,6 @@ "node": ">=8" } }, - "node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, "node_modules/mlly": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.1.tgz", @@ -3708,21 +3133,6 @@ "ufo": "^1.5.3" } }, - "node_modules/mono-svelte": { - "version": "1.6.26", - "resolved": "https://registry.npmjs.org/mono-svelte/-/mono-svelte-1.6.26.tgz", - "integrity": "sha512-2NrDH57DpnOVK2d8Yt2X3YZtEL7eSt5x5DI15pMJjHEMCiHY7c2RN/SvNoZEiM4OdmAMBLpwK6gsnEDVDkcNCw==", - "dev": true, - "dependencies": { - "@floating-ui/core": "^1.5.0", - "svelte-floating-ui": "^1.5.3", - "svelte-focus-trap": "^1.2.0", - "svelte-hero-icons": "latest" - }, - "peerDependencies": { - "svelte": "^4.0.0" - } - }, "node_modules/mousetrap": { "version": "1.6.5", "resolved": "https://registry.npmjs.org/mousetrap/-/mousetrap-1.6.5.tgz", @@ -3743,15 +3153,17 @@ "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" }, "node_modules/mz": { "version": "2.7.0", @@ -4000,18 +3412,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/parse5": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", @@ -4088,37 +3488,12 @@ "node": "*" } }, - "node_modules/periscopic": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz", - "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==", - "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^3.0.0", - "is-reference": "^3.0.0" - } - }, - "node_modules/periscopic/node_modules/estree-walker": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dependencies": { - "@types/estree": "^1.0.0" - } - }, - "node_modules/periscopic/node_modules/is-reference": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz", - "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==", - "dependencies": { - "@types/estree": "*" - } - }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", - "dev": true + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", @@ -4162,9 +3537,9 @@ } }, "node_modules/postcss": { - "version": "8.4.38", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", - "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", "dev": true, "funding": [ { @@ -4180,10 +3555,11 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.2.0" + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -4310,6 +3686,33 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, + "node_modules/prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-plugin-svelte": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-3.2.7.tgz", + "integrity": "sha512-/Dswx/ea0lV34If1eDcG3nulQ63YNr5KPDfMsjbdtpSWOxKKJ7nAc2qlVuYwEvCr4raIuredNoR7K4JCkmTGaQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "prettier": "^3.0.0", + "svelte": "^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0" + } + }, "node_modules/pretty-format": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", @@ -4342,7 +3745,8 @@ "node_modules/qrcode-generator": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/qrcode-generator/-/qrcode-generator-1.4.4.tgz", - "integrity": "sha512-HM7yY8O2ilqhmULxGMpcHSF1EhJJ9yBj8gvDEuZ6M+KGJ0YY2hKpnXvRD+hZPLrDVck3ExIGhmPtSdcjC+guuw==" + "integrity": "sha512-HM7yY8O2ilqhmULxGMpcHSF1EhJJ9yBj8gvDEuZ6M+KGJ0YY2hKpnXvRD+hZPLrDVck3ExIGhmPtSdcjC+guuw==", + "dev": true }, "node_modules/querystringify": { "version": "2.2.0", @@ -4522,12 +3926,13 @@ } }, "node_modules/rollup": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz", - "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.0.tgz", + "integrity": "sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==", "dev": true, + "license": "MIT", "dependencies": { - "@types/estree": "1.0.5" + "@types/estree": "1.0.6" }, "bin": { "rollup": "dist/bin/rollup" @@ -4537,22 +3942,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.18.0", - "@rollup/rollup-android-arm64": "4.18.0", - "@rollup/rollup-darwin-arm64": "4.18.0", - "@rollup/rollup-darwin-x64": "4.18.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", - "@rollup/rollup-linux-arm-musleabihf": "4.18.0", - "@rollup/rollup-linux-arm64-gnu": "4.18.0", - "@rollup/rollup-linux-arm64-musl": "4.18.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", - "@rollup/rollup-linux-riscv64-gnu": "4.18.0", - "@rollup/rollup-linux-s390x-gnu": "4.18.0", - "@rollup/rollup-linux-x64-gnu": "4.18.0", - "@rollup/rollup-linux-x64-musl": "4.18.0", - "@rollup/rollup-win32-arm64-msvc": "4.18.0", - "@rollup/rollup-win32-ia32-msvc": "4.18.0", - "@rollup/rollup-win32-x64-msvc": "4.18.0", + "@rollup/rollup-android-arm-eabi": "4.24.0", + "@rollup/rollup-android-arm64": "4.24.0", + "@rollup/rollup-darwin-arm64": "4.24.0", + "@rollup/rollup-darwin-x64": "4.24.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.24.0", + "@rollup/rollup-linux-arm-musleabihf": "4.24.0", + "@rollup/rollup-linux-arm64-gnu": "4.24.0", + "@rollup/rollup-linux-arm64-musl": "4.24.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.24.0", + "@rollup/rollup-linux-riscv64-gnu": "4.24.0", + "@rollup/rollup-linux-s390x-gnu": "4.24.0", + "@rollup/rollup-linux-x64-gnu": "4.24.0", + "@rollup/rollup-linux-x64-musl": "4.24.0", + "@rollup/rollup-win32-arm64-msvc": "4.24.0", + "@rollup/rollup-win32-ia32-msvc": "4.24.0", + "@rollup/rollup-win32-x64-msvc": "4.24.0", "fsevents": "~2.3.2" } }, @@ -4649,74 +4054,6 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, - "node_modules/sander": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz", - "integrity": "sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==", - "dev": true, - "dependencies": { - "es6-promise": "^3.1.2", - "graceful-fs": "^4.1.3", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.2" - } - }, - "node_modules/sander/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/sander/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/sander/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/sander/node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, "node_modules/saxes": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", @@ -4787,32 +4124,18 @@ "dev": true }, "node_modules/sirv": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", - "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.0.tgz", + "integrity": "sha512-BPwJGUeDaDCHihkORDchNyyTvWFhcusy1XMmhEVTQTwGeybFbp8YEmB+njbPnth1FibULBSBVwCQni25XlCUDg==", "dev": true, + "license": "MIT", "dependencies": { "@polka/url": "^1.0.0-next.24", "mrmime": "^2.0.0", "totalist": "^3.0.0" }, "engines": { - "node": ">= 10" - } - }, - "node_modules/sorcery": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.11.0.tgz", - "integrity": "sha512-J69LQ22xrQB1cIFJhPfgtLuI6BpWRiWu1Y3vSsIwK/eAScqJxd/+CJlUuHQRdX2C9NGFamq+KqNywGgaThwfHw==", - "dev": true, - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.14", - "buffer-crc32": "^0.2.5", - "minimist": "^1.2.0", - "sander": "^0.5.0" - }, - "bin": { - "sorcery": "bin/sorcery" + "node": ">=18" } }, "node_modules/source-map": { @@ -4825,9 +4148,11 @@ } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -4942,18 +4267,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/strip-indent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", - "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", - "dev": true, - "dependencies": { - "min-indent": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-literal": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-2.1.0.tgz", @@ -5034,20 +4347,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -5061,49 +4360,113 @@ } }, "node_modules/svelte": { - "version": "4.2.18", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.18.tgz", - "integrity": "sha512-d0FdzYIiAePqRJEb90WlJDkjUEx42xhivxN8muUBmfZnP+tzUgz12DJ2hRJi8sIHCME7jeK1PTMgKPSfTd8JrA==", + "version": "5.19.7", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.19.7.tgz", + "integrity": "sha512-I0UUp2MpB5gF8aqHJVklOcRcoLgQNnBolSwLMMqDepE9gVwmGeYBmJp1/obzae72QpxdPIymA4AunIm2x70LBg==", + "dev": true, + "license": "MIT", "dependencies": { - "@ampproject/remapping": "^2.2.1", - "@jridgewell/sourcemap-codec": "^1.4.15", - "@jridgewell/trace-mapping": "^0.3.18", - "@types/estree": "^1.0.1", - "acorn": "^8.9.0", - "aria-query": "^5.3.0", - "axobject-query": "^4.0.0", - "code-red": "^1.0.3", - "css-tree": "^2.3.1", - "estree-walker": "^3.0.3", - "is-reference": "^3.0.1", + "@ampproject/remapping": "^2.3.0", + "@jridgewell/sourcemap-codec": "^1.5.0", + "@types/estree": "^1.0.5", + "acorn": "^8.12.1", + "acorn-typescript": "^1.4.13", + "aria-query": "^5.3.1", + "axobject-query": "^4.1.0", + "clsx": "^2.1.1", + "esm-env": "^1.2.1", + "esrap": "^1.4.3", + "is-reference": "^3.0.3", "locate-character": "^3.0.0", - "magic-string": "^0.30.4", - "periscopic": "^3.1.0" + "magic-string": "^0.30.11", + "zimmerframe": "^1.1.2" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/svelte-check": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-3.8.0.tgz", - "integrity": "sha512-7Nxn+3X97oIvMzYJ7t27w00qUf1Y52irE2RU2dQAd5PyvfGp4E7NLhFKVhb6PV2fx7dCRMpNKDIuazmGthjpSQ==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.0.5.tgz", + "integrity": "sha512-icBTBZ3ibBaywbXUat3cK6hB5Du+Kq9Z8CRuyLmm64XIe2/r+lQcbuBx/IQgsbrC+kT2jQ0weVpZSSRIPwB6jQ==", "dev": true, + "license": "MIT", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.17", - "chokidar": "^3.4.1", - "fast-glob": "^3.2.7", - "import-fresh": "^3.2.1", + "@jridgewell/trace-mapping": "^0.3.25", + "chokidar": "^4.0.1", + "fdir": "^6.2.0", "picocolors": "^1.0.0", - "sade": "^1.7.4", - "svelte-preprocess": "^5.1.3", - "typescript": "^5.0.3" + "sade": "^1.7.4" }, "bin": { "svelte-check": "bin/svelte-check" }, + "engines": { + "node": ">= 18.0.0" + }, "peerDependencies": { - "svelte": "^3.55.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0" + "svelte": "^4.0.0 || ^5.0.0-next.0", + "typescript": ">=5.0.0" + } + }, + "node_modules/svelte-check/node_modules/chokidar": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", + "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/svelte-check/node_modules/fdir": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.2.tgz", + "integrity": "sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/svelte-check/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/svelte-check/node_modules/readdirp": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz", + "integrity": "sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" } }, "node_modules/svelte-floating-ui": { @@ -5140,18 +4503,6 @@ "svelte": "^3.0.0 || ^4.0.0 || ^5.0.0" } }, - "node_modules/svelte-hmr": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.16.0.tgz", - "integrity": "sha512-Gyc7cOS3VJzLlfj7wKS0ZnzDVdv3Pn2IuVeJPk9m2skfhcu5bq3wtIZyQGggr7/Iim5rH5cncyQft/kRLupcnA==", - "dev": true, - "engines": { - "node": "^12.20 || ^14.13.1 || >= 16" - }, - "peerDependencies": { - "svelte": "^3.19.0 || ^4.0.0" - } - }, "node_modules/svelte-infinite-scroll": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/svelte-infinite-scroll/-/svelte-infinite-scroll-2.0.1.tgz", @@ -5171,82 +4522,14 @@ "svelte": "^4.0.0" } }, - "node_modules/svelte-preprocess": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-5.1.4.tgz", - "integrity": "sha512-IvnbQ6D6Ao3Gg6ftiM5tdbR6aAETwjhHV+UKGf5bHGYR69RQvF1ho0JKPcbUON4vy4R7zom13jPjgdOWCQ5hDA==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "@types/pug": "^2.0.6", - "detect-indent": "^6.1.0", - "magic-string": "^0.30.5", - "sorcery": "^0.11.0", - "strip-indent": "^3.0.0" - }, - "engines": { - "node": ">= 16.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.10.2", - "coffeescript": "^2.5.1", - "less": "^3.11.3 || ^4.0.0", - "postcss": "^7 || ^8", - "postcss-load-config": "^2.1.0 || ^3.0.0 || ^4.0.0 || ^5.0.0", - "pug": "^3.0.0", - "sass": "^1.26.8", - "stylus": "^0.55.0", - "sugarss": "^2.0.0 || ^3.0.0 || ^4.0.0", - "svelte": "^3.23.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0", - "typescript": ">=3.9.5 || ^4.0.0 || ^5.0.0" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "coffeescript": { - "optional": true - }, - "less": { - "optional": true - }, - "postcss": { - "optional": true - }, - "postcss-load-config": { - "optional": true - }, - "pug": { - "optional": true - }, - "sass": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "typescript": { - "optional": true - } - } - }, - "node_modules/svelte/node_modules/estree-walker": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dependencies": { - "@types/estree": "^1.0.0" - } - }, "node_modules/svelte/node_modules/is-reference": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz", - "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.3.tgz", + "integrity": "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==", + "dev": true, + "license": "MIT", "dependencies": { - "@types/estree": "*" + "@types/estree": "^1.0.6" } }, "node_modules/sveltekit-i18n": { @@ -5450,17 +4733,6 @@ "tmp": "^0.2.0" } }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -5478,6 +4750,7 @@ "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -5531,10 +4804,11 @@ } }, "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -5634,14 +4908,15 @@ "dev": true }, "node_modules/vite": { - "version": "5.2.13", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.13.tgz", - "integrity": "sha512-SSq1noJfY9pR3I1TUENL3rQYDQCFqgD+lM6fTRAM8Nv6Lsg5hDLaXkjETVeBt+7vZBCMoibD+6IWnT2mJ+Zb/A==", + "version": "5.4.14", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.14.tgz", + "integrity": "sha512-EK5cY7Q1D8JNhSaPKVK4pwBFvaTmZxEnoKXLG/U9gmdDcihQGNzFlgIvaxezFR4glP1LsuiedwMBqCXH3wZccA==", "dev": true, + "license": "MIT", "dependencies": { - "esbuild": "^0.20.1", - "postcss": "^8.4.38", - "rollup": "^4.13.0" + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" }, "bin": { "vite": "bin/vite.js" @@ -5660,6 +4935,7 @@ "less": "*", "lightningcss": "^1.21.0", "sass": "*", + "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.4.0" @@ -5677,6 +4953,9 @@ "sass": { "optional": true }, + "sass-embedded": { + "optional": true + }, "stylus": { "optional": true }, @@ -5711,12 +4990,17 @@ } }, "node_modules/vitefu": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.5.tgz", - "integrity": "sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.0.5.tgz", + "integrity": "sha512-h4Vflt9gxODPFNGPwp4zAMZRpZR7eslzwH2c5hn5kNZ5rhnKyRJ50U+yGCdc2IRaBs8O4haIgLNGrV5CrpMsCA==", "dev": true, + "license": "MIT", + "workspaces": [ + "tests/deps/*", + "tests/projects/*" + ], "peerDependencies": { - "vite": "^3.0.0 || ^4.0.0 || ^5.0.0" + "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" }, "peerDependenciesMeta": { "vite": { @@ -6092,6 +5376,13 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/zimmerframe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/zimmerframe/-/zimmerframe-1.1.2.tgz", + "integrity": "sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w==", + "dev": true, + "license": "MIT" } } } diff --git a/package.json b/package.json index e341dccc..d32d76a5 100644 --- a/package.json +++ b/package.json @@ -1,17 +1,17 @@ { "name": "photon-lemmy", - "version": "1.31.5", + "version": "2.0.0", "devDependencies": { "@catdadcode/svelte-adapter-bun": "^0.5.7", "@dicebear/core": "^8.0.1", "@dicebear/initials": "^8.0.1", - "@sveltejs/adapter-auto": "^3.2.1", - "@sveltejs/adapter-node": "^2.0.0", - "@sveltejs/adapter-vercel": "^5.1.0", - "@sveltejs/kit": "^2.5.20", - "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@svelte-put/qr": "^2.0.0", + "@sveltejs/adapter-auto": "^3.3.1", + "@sveltejs/adapter-node": "^5.2.9", + "@sveltejs/adapter-vercel": "^5.4.6", + "@sveltejs/kit": "^2.17.1", + "@sveltejs/vite-plugin-svelte": "^4.0.0", "@tailwindcss/container-queries": "^0.1.1", - "@tanstack/svelte-virtual": "^3.8.1", "@types/nprogress": "^0.2.0", "@types/ua-parser-js": "^0.7.39", "autoprefixer": "^10.4.16", @@ -22,9 +22,11 @@ "marked-linkify-it": "^3.1.10", "nprogress": "^0.2.0", "postcss": "^8.4.30", + "prettier": "^3.3.3", + "prettier-plugin-svelte": "^3.2.7", "rollup-plugin-visualizer": "^5.9.2", - "svelte": "^4.2.18", - "svelte-check": "^3.0.1", + "svelte": "^5.19.7", + "svelte-check": "^4.0.0", "svelte-floating-ui": "^1.5.9", "svelte-focus-trap": "^1.2.0", "svelte-hero-icons": "^5.2.0", @@ -33,11 +35,14 @@ "sveltekit-i18n": "^2.4.2", "tailwindcss": "^3.3.3", "tslib": "^2.4.1", - "typescript": "^5.0.0", + "typescript": "^5.5.0", "ua-parser-js": "^1.0.38", - "vite": "^5.0.0", + "vite": "^5.4.14", "vitest": "^1.0.0" }, + "overrides": { + "svelte": "^5.19.7" + }, "private": true, "scripts": { "dev": "vite dev", @@ -47,11 +52,12 @@ "start": "node build/index.js", "bunstart": "bun build/index.js", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "format": "prettier --write .", + "format:specific": "prettier --write" }, "type": "module", "dependencies": { - "@svelte-put/qr": "^1.2.1", "install": "^0.13.0" } } diff --git a/src/app.d.ts b/src/app.d.ts index 9ef481b2..e3c01c1a 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -1,6 +1,6 @@ // See https://kit.svelte.dev/docs/types#app -import type { Action } from '$lib/components/ui/navbar/commands/actions' +import type { Action } from '$lib/components/ui/navbar/commands/actions.svelte' import type { ComponentType, SvelteComponent } from 'svelte' // for information about these interfaces diff --git a/src/app.html b/src/app.html index 5afd8a6c..1d2b94d9 100644 --- a/src/app.html +++ b/src/app.html @@ -27,7 +27,21 @@ %sveltekit.head% -
+
diff --git a/src/lib/auth.ts b/src/lib/auth.svelte.ts similarity index 51% rename from src/lib/auth.ts rename to src/lib/auth.svelte.ts index 454e33ec..bafb8421 100644 --- a/src/lib/auth.ts +++ b/src/lib/auth.svelte.ts @@ -3,10 +3,10 @@ import { isAdmin, } from '$lib/components/lemmy/moderation/moderation.js' import { toast } from 'mono-svelte' -import { DEFAULT_INSTANCE_URL, instance } from '$lib/instance.js' -import { client, getClient } from '$lib/lemmy.js' -import { site } from './lemmy' -import { instanceToURL, moveItem } from '$lib/util.js' +import { DEFAULT_INSTANCE_URL, instance } from '$lib/instance.svelte.js' +import { client, getClient } from '$lib/lemmy.svelte.js' +import { site } from './lemmy.svelte' +import { instanceToURL, moveItem } from '$lib/util.svelte' import { type GetSiteResponse, type MyUserInfo, @@ -27,7 +27,7 @@ import { t } from './translations' const getDefaultProfile = (): Profile => ({ id: -1, - instance: get(profileData)?.defaultInstance ?? get(instance), + instance: profileData.defaultInstance ?? DEFAULT_INSTANCE_URL, }) function getFromStorage(key: string): T | undefined { @@ -83,7 +83,7 @@ const getCookie = (key: string): string | undefined => { ?.split('=')?.[1] } -export let profileData = writable( +export let profileData = $state( getFromStorage('profileData') ?? { profiles: [ { @@ -94,91 +94,57 @@ export let profileData = writable( }, ], profile: 1, - } + }, ) -let fetchUser = { - loading: false, - prevProfile: -1, -} +class CurrentProfile { + #data = $derived( + profileData.profiles.find((i) => i.id == profileData.profile) ?? + getDefaultProfile(), + ) -function profileStore( - data: Writable, - fn: ( - values: ProfileData, - set: (value: Profile) => void, - update: (fn: Updater) => void - ) => any -) { - const derive: Readable = derived(data, fn) - const { subscribe } = derive - - return { - subscribe, - set: (value: Profile) => { - data.update((data) => { - let index = data.profiles.findIndex((t) => t.id == value.id) - data.profiles[index] = value - return data - }) - }, + get data() { + return this.#data + } + set data(value) { + if (!value) return + const index = profileData.profiles.findIndex((i) => i.id == value?.id) + profileData.profiles[index] = value } } -export let profile: Readable & { set: (v: Profile) => void } = - profileStore(profileData, (pd, set, update) => { - const profile = - pd.profiles.find((p) => p.id == pd.profile) ?? getDefaultProfile() +export let profile = new CurrentProfile() - instance.set(profile.instance) - set(profile) +async function fetchUserData(profile: CurrentProfile) { + if (profile.data.jwt) { + site.data = undefined + notifications.set({ applications: 0, inbox: 0, reports: 0 }) - if (profile?.jwt) { - if (profile.id != fetchUser.prevProfile && !fetchUser.loading) { - site.set(undefined) + const res = await userFromJwt(profile.data.jwt, profile.data.instance) + if (!res?.user) + toast({ + content: + "Your account's instance did not return your user data. Your login may have expired.", + type: 'error', + }) - fetchUser.loading = true - - notifications.set({ applications: 0, inbox: 0, reports: 0 }) - - userFromJwt(profile.jwt, profile.instance) - .then((res) => { - if (!res?.user) - toast({ - content: - "Your account's instance did not return your user data. Your login may have expired.", - type: 'error', - }) - - site.set(res?.site) - - profile.user = res?.user - if (profile.user) { - profile.avatar = res?.user?.local_user_view.person.avatar - profile.username = res?.user?.local_user_view.person.name - } - - fetchUser.loading = false - fetchUser.prevProfile = profile.id - checkInbox() - - update(() => profile) - }) - .catch((e) => { - fetchUser.loading = false - toast({ content: e, type: 'error' }) - }) - } - } else { - if (browser && !fetchUser.loading) { - site.set(undefined) - client({ instanceURL: profile.instance }) - .getSite() - .then((res) => site.set(res)) - fetchUser.loading = false - } + site.data = res?.site + profile.data.user = res?.user + if (profile.data.user) { + profile.data.avatar = res?.user?.local_user_view.person.avatar + profile.data.username = res?.user?.local_user_view.person.name } - }) + } else { + if (browser) { + site.data = undefined + client({ instanceURL: profile.data.instance }) + .getSite() + .then((res) => (site.data = res)) + } + } + + return profile +} export let notifications = writable({ applications: 0, @@ -186,35 +152,37 @@ export let notifications = writable({ reports: 0, }) -profileData.subscribe(async (pd) => { - const serialized: ProfileData = { - ...pd, - profiles: pd.profiles.map((p) => serializeUser(p)), - } +$effect.root(() => { + $effect(() => { + const serialized = { + ...profileData, + profiles: profileData.profiles.map((p) => serializeUser(p)), + } - setFromStorage('profileData', serialized) - - if (serialized.profile == -1) { - instance?.set(get(profileData).defaultInstance ?? DEFAULT_INSTANCE_URL) - } - if (serialized.profiles.length == 0) { - profileData.update((pd) => ({ - ...pd, - profiles: [ + setFromStorage('profileData', serialized) + if (serialized.profiles.length == 0) { + profileData.profiles = [ { id: 1, instance: DEFAULT_INSTANCE_URL, username: t.get('account.guest') || 'Guest', }, - ], - profile: 1, - })) - } + ] + profileData.profile = 1 + } + }) + + $effect(() => { + if (profile.data.id || profileData) + fetchUserData(profile).then((res) => { + checkInbox() + }) + }) }) if ( env.PUBLIC_MIGRATE_COOKIE && - get(profileData).profiles.length == 0 && + profileData.profiles.length == 0 && env.PUBLIC_INSTANCE_URL ) { const jwt = getCookie('jwt') @@ -226,7 +194,7 @@ if ( const result = await setUser( jwt, env.PUBLIC_INSTANCE_URL ?? '', - user?.user?.local_user_view.person.name + user?.user?.local_user_view.person.name, ) if (result) @@ -258,24 +226,14 @@ export async function setUser(jwt: string, inst: string, username?: string) { }) } - instance.set(inst) - - profileData.update((pd) => { - // too lazy to make a decent system - const id = Math.max(...pd.profiles.map((p) => p.id)) + 1 - - const newProfile: Profile = { - id: id, - instance: inst, - jwt: jwt, - username: user?.user?.local_user_view.person.name, - avatar: user?.user?.local_user_view.person.avatar, - } - - return { - profile: id, - profiles: [newProfile, ...pd.profiles], - } + const id = Math.max(...profileData.profiles.map((p) => p.id)) + 1 + profileData.profile = id + profileData.profiles.push({ + id: id, + instance: inst, + jwt: jwt, + username: user?.user?.local_user_view.person.name, + avatar: user?.user?.local_user_view.person.avatar, }) return user @@ -283,7 +241,7 @@ export async function setUser(jwt: string, inst: string, username?: string) { async function userFromJwt( jwt: string, - instance: string + instance: string, ): Promise< { user: PersonData | undefined; site: GetSiteResponse } | undefined > { @@ -296,7 +254,7 @@ async function userFromJwt( type: 'warning', loading: true, }), - 5000 + 5000, ) const site = await sitePromise @@ -326,20 +284,15 @@ async function userFromJwt( } export function resetProfile() { - profileData.update((p) => ({ ...p, profile: -1 })) + profileData.profile = -1 } export function deleteProfile(id: number) { - profileData.update((pd) => { - const index = pd.profiles.findIndex((p) => p.id == id) - if (index <= -1) return pd - - pd.profiles.splice(index, 1) - - if (id == pd.profile) resetProfile() - - return pd - }) + profileData.profiles.splice( + profileData.profiles.findIndex((p) => p.id == id), + 1, + ) + if (id == profileData.profile) resetProfile() } function serializeUser(user: Profile): Profile { @@ -350,71 +303,70 @@ function serializeUser(user: Profile): Profile { } export async function setUserID(id: number) { - profileData.update((p) => ({ ...p, profile: id })) - return get(profile) + if (!profileData.profiles.find((p) => p.id == id)) return -1 + profileData.profile = id + return profile } export function moveProfile(id: number, up: boolean) { - const pd = get(profileData) try { - const index = pd.profiles.findIndex((i) => i.id == id) - - profileData.set({ - ...pd, - profiles: moveItem(pd.profiles, index, index + (up ? -1 : 1)), - }) + const index = profileData.profiles.findIndex((i) => i.id == id) + profileData.profiles = moveItem( + profileData.profiles, + index, + index + (up ? -1 : 1), + ) } catch (err) { // we dont care } } async function getNotificationCount(jwt: string, mod: boolean, admin: boolean) { - const unreads = await getClient().getUnreadCount() + const unreadsPromise = getClient() + .getUnreadCount() + .then((res) => res.mentions + res.private_messages + res.replies) + .catch(() => 0) - let reports: number = 0 - let applications: number = 0 + const reportsPromise = mod + ? getClient() + .getReportCount({}) + .then( + (res) => + res.comment_reports + + res.post_reports + + (res.private_message_reports ?? 0), + ) + .catch(() => 0) + : new Promise((res) => res(0)) - if (mod) { - try { - const reportRes = await getClient().getReportCount({}) + const applicationsPromise = admin + ? getClient() + .getUnreadRegistrationApplicationCount() + .then((res) => res.registration_applications) + .catch(() => 0) + : new Promise((res) => res(0)) - reports = - reportRes.comment_reports + - reportRes.post_reports + - (reportRes.private_message_reports ?? 0) - } catch (e) { - // doesn't matter - } - } - - if (admin) { - try { - const applicationRes = - await getClient().getUnreadRegistrationApplicationCount() - - applications = applicationRes.registration_applications - } catch (e) { - // doesn't matter - } - } + const [unreads, reports, applications] = await Promise.all([ + unreadsPromise, + reportsPromise, + applicationsPromise, + ]) return { - unreads: unreads.mentions + unreads.private_messages + unreads.replies, + unreads: unreads, reports: reports, applications: applications, } } async function checkInbox() { - if (!get(profile)) return - - const { user, jwt } = get(profile)! + const { user, jwt } = profile.data if (!jwt || !user) return const notifs = await getNotificationCount( jwt, amModOfAny(user) ?? false, - user ? isAdmin(user) : false + user ? isAdmin(user) : false, ) notifications.set({ diff --git a/src/lib/components/error/ErrorContainer.svelte b/src/lib/components/error/ErrorContainer.svelte index db74cc06..3dd861b9 100644 --- a/src/lib/components/error/ErrorContainer.svelte +++ b/src/lib/components/error/ErrorContainer.svelte @@ -1,4 +1,4 @@ - {#if scopedErrors.length > 0}
@@ -60,7 +64,7 @@ {/each}
{/each}
- +{@render children?.({ selected })} diff --git a/src/lib/components/lemmy/ObjectAutocomplete.svelte b/src/lib/components/lemmy/ObjectAutocomplete.svelte index e8236f58..5369353d 100644 --- a/src/lib/components/lemmy/ObjectAutocomplete.svelte +++ b/src/lib/components/lemmy/ObjectAutocomplete.svelte @@ -1,21 +1,36 @@ {#if type == 'community'} @@ -32,36 +47,36 @@ return results.communities.map((c) => c.community) }} extractName={(c) => `${c.title}@${new URL(c.actor_id).hostname}`} - on:select bind:query={q} - {showWhenEmpty} - {...$$restProps} - let:item - let:select + {...rest} > -
- {#if q == '' && showWhenEmpty} - dispatcher('select', undefined)}> - + {#snippet noresults()} +
+ {#if q == '' && showWhenEmpty} + dispatcher('select', undefined)}> + +
+ None +
+
+ {:else} + No results. + {/if} +
+ {/snippet} + {#snippet children({ item, select })} +
+ select(item)}> +
- None + {item.title} + + {new URL(item.actor_id).hostname} +
- {:else} - No results. - {/if} -
-
- select(item)}> - -
- {item.title} - - {new URL(item.actor_id).hostname} - -
-
-
+
+ {/snippet} {:else if type == 'instance'} i.software === 'lemmy' && i.domain.includes(q) + (i) => i.software === 'lemmy' && i.domain.includes(q), ) : [] }} extractName={(i) => `${i.domain}`} - on:select bind:query={q} - {showWhenEmpty} - {...$$restProps} - let:item - let:select + {...rest} > -
- {#if q == '' && showWhenEmpty} - dispatcher('select', undefined)}> + {#snippet noresults()} +
+ {#if q == '' && showWhenEmpty} + dispatcher('select', undefined)}> +
+ None (Start typing to search) +
+
+ {:else} + No results. + {/if} +
+ {/snippet} + {#snippet children({ item, select })} +
+ select(item)}> +
- None (Start typing to search) + {item.domain}
- {:else} - No results. - {/if} -
-
- select(item)}> - -
- {item.domain} -
-
-
+
+ {/snippet}
{/if} diff --git a/src/lib/components/lemmy/SiteCard.svelte b/src/lib/components/lemmy/SiteCard.svelte index 9d2d793c..1753b45b 100644 --- a/src/lib/components/lemmy/SiteCard.svelte +++ b/src/lib/components/lemmy/SiteCard.svelte @@ -19,16 +19,29 @@ import { userLink } from '$lib/lemmy/generic' import { t } from '$lib/translations' import Entity from '../ui/Entity.svelte' - import { userSettings } from '$lib/settings' + import { settings } from '$lib/settings.svelte' import { optimizeImageURL } from './post/helpers' + import Link from '../input/Link.svelte' + import EndPlaceholder from '../ui/EndPlaceholder.svelte' - export let site: SiteView - export let taglines: Tagline[] | undefined = undefined - export let admins: PersonView[] | undefined = undefined - export let version: string | undefined = undefined + interface Props { + site: SiteView + taglines?: Tagline[] | undefined + admins?: PersonView[] | undefined + version?: string | undefined + class?: string + } + + let { + site, + taglines = undefined, + admins = undefined, + version = undefined, + class: clazz = '', + }: Props = $props() - + {#if site.site.banner}
+ {#snippet customIcon()} + + {/snippet} -
- - - -
{#if taglines && taglines.length > 0} @@ -88,22 +75,30 @@ {/if}
- - - - {$t('cards.site.about')} - + + {#snippet title()} + + {$t('cards.site.about')} +
+
+ {/snippet} -
+

- - - - {$t('cards.site.stats')} - + + {#snippet title()} + + {$t('cards.site.stats')} +
+
+ {/snippet}
- - - - {$t('cards.site.admins')} - + + {#snippet title()} + + {$t('cards.site.admins')} +
+
+ {/snippet} ({ id: a.person.id, @@ -142,9 +141,23 @@
{/if} +
+ + {$t('routes.modlog')} + + • + + {$t('routes.legal.title')} + + • + + {$t('routes.instances')} + +
+ {#if version}
- + {version} diff --git a/src/lib/components/lemmy/comment/Comment.svelte b/src/lib/components/lemmy/comment/Comment.svelte index 299b8ba4..560102cd 100644 --- a/src/lib/components/lemmy/comment/Comment.svelte +++ b/src/lib/components/lemmy/comment/Comment.svelte @@ -1,6 +1,5 @@ {#if editing} - {$t('form.edit')} -
+ {#snippet customTitle()} + {$t('form.edit')} + {/snippet} + { + e.preventDefault() + save() + }} + class="contents" + > - {#if $profile?.user && (amMod($profile?.user, comment.community) || isAdmin($profile.user))} + {#if profile.data?.user && (amMod(profile.data?.user, comment.community) || isAdmin(profile.data.user))} {/if} - + {#snippet target()} + + {/snippet} {$t('comment.actions.label')} { + onclick={() => { navigator.share?.({ url: comment.comment.ap_id, }) ?? navigator.clipboard.writeText(comment.comment.ap_id) @@ -96,29 +92,21 @@
{$t('comment.actions.link')}
- {#if $userSettings.translator} - { - // @ts-ignore - text.set(comment.comment.content) - translating = !translating - }} - > - - {$t('post.actions.more.translate')} - - {/if} - {#if $profile?.jwt} - {#if comment.creator.id == $profile.user?.local_user_view.person.id} - dispatcher('edit', comment)}> + {#if profile.data?.jwt} + {#if comment.creator.id == profile.data.user?.local_user_view.person.id} + onedit?.(comment)}> {$t('post.actions.more.edit')} {/if} { - if ($profile?.jwt) - comment.saved = await save(comment, !comment.saved, $profile.jwt) + onclick={async () => { + if (profile.data?.jwt) + comment.saved = await save( + comment, + !comment.saved, + profile.data.jwt, + ) }} > @@ -126,15 +114,15 @@ {comment.saved ? $t('post.actions.unsave') : $t('post.actions.save')} - {#if $profile?.user && $profile.jwt && $profile.user.local_user_view.person.id == comment.creator.id} + {#if profile.data?.user && profile.data.jwt && profile.data.user.local_user_view.person.id == comment.creator.id} { - if ($profile?.jwt) + onclick={async () => { + if (profile.data?.jwt) comment.comment.deleted = await deleteItem( comment, !comment.comment.deleted, - $profile.jwt + profile.data.jwt, ) }} > @@ -146,13 +134,13 @@ {/if} - {#if $profile.jwt && $profile.user?.local_user_view.person.id != comment.creator.id} - report(comment)} color="danger-subtle"> + {#if profile.data.jwt && profile.data.user?.local_user_view.person.id != comment.creator.id} + report(comment)} color="danger-subtle"> {$t('moderation.report')} {/if} {/if}
-
+
diff --git a/src/lib/components/lemmy/comment/CommentForm.svelte b/src/lib/components/lemmy/comment/CommentForm.svelte index e0a24160..001eafe3 100644 --- a/src/lib/components/lemmy/comment/CommentForm.svelte +++ b/src/lib/components/lemmy/comment/CommentForm.svelte @@ -1,41 +1,55 @@ @@ -51,22 +59,25 @@
{/if}
diff --git a/src/lib/components/lemmy/comment/CommentListVirtualizer.svelte b/src/lib/components/lemmy/comment/CommentListVirtualizer.svelte index 17ab52ea..b4efb098 100644 --- a/src/lib/components/lemmy/comment/CommentListVirtualizer.svelte +++ b/src/lib/components/lemmy/comment/CommentListVirtualizer.svelte @@ -1,35 +1,26 @@ -
-
+ - {#each items as row, index (row.index)} -
- + {#snippet item(item, index)} +
+ [nodes[index]], (v) => (nodes[index] = v[0])} + {post} + />
- {/each} -
+ {/snippet} +
diff --git a/src/lib/components/lemmy/comment/CommentVote.svelte b/src/lib/components/lemmy/comment/CommentVote.svelte index 3b2f121b..76bd2dd3 100644 --- a/src/lib/components/lemmy/comment/CommentVote.svelte +++ b/src/lib/components/lemmy/comment/CommentVote.svelte @@ -7,9 +7,9 @@ ChevronUp, Icon, } from 'svelte-hero-icons' - import { getClient, site } from '$lib/lemmy' - import { userSettings } from '$lib/settings' - import { profile } from '$lib/auth.js' + import { getClient, site } from '$lib/lemmy.svelte' + import { settings } from '$lib/settings.svelte' + import { profile } from '$lib/auth.svelte.js' import FormattedNumber from '$lib/components/util/FormattedNumber.svelte' import { Button, buttonColor, toast } from 'mono-svelte' import { vote as voteItem } from '$lib/lemmy/contentview' @@ -18,13 +18,22 @@ import { backOut } from 'svelte/easing' import { t } from '$lib/translations' - export let vote: number = 0 - export let upvotes: number - export let downvotes: number - export let commentId: number + interface Props { + vote?: number + upvotes: number + downvotes: number + commentId: number + } + + let { + vote = $bindable(0), + upvotes = $bindable(), + downvotes = $bindable(), + commentId, + }: Props = $props() const castVote = async (newVote: number) => { - if (!$profile?.jwt) { + if (!profile.data?.jwt) { toast({ content: $t('toast.loginVoteGate'), type: 'warning' }) return } @@ -39,10 +48,10 @@
- - {/if} - + {/snippet} + {$t('comment.more', { + // @ts-ignore + comments: node.comment_view.counts.child_count, + })} + + + {/if} {/each} diff --git a/src/lib/components/lemmy/comment/comments.ts b/src/lib/components/lemmy/comment/comments.svelte.ts similarity index 91% rename from src/lib/components/lemmy/comment/comments.ts rename to src/lib/components/lemmy/comment/comments.svelte.ts index 58c9fe9f..5474de34 100644 --- a/src/lib/components/lemmy/comment/comments.ts +++ b/src/lib/components/lemmy/comment/comments.svelte.ts @@ -5,9 +5,7 @@ export interface CommentNodeI { children: Array depth: number loading?: boolean - ui: { - open?: boolean - } + expanded?: boolean } function getCommentParentId(comment?: Comment): number | undefined { @@ -28,9 +26,8 @@ function getDepthFromComment(comment?: Comment): number | undefined { export function buildCommentsTree( comments: CommentView[], baseDepth: number = 0, - filter: (c: CommentView) => boolean = (c) => true + filter: (c: CommentView) => boolean = (c) => true, ): CommentNodeI[] { - const start = performance.now() const map = new Map() let min_depth = Number.MAX_VALUE @@ -41,9 +38,7 @@ export function buildCommentsTree( comment_view, children: [], depth: depth, - ui: { - open: true, - }, + expanded: true, } min_depth = Math.min(min_depth, depth) if (filter(comment_view)) { @@ -75,13 +70,12 @@ export function buildCommentsTree( } } - console.log(`Built tree in ${performance.now() - start}ms`) return tree } export function searchCommentTree( tree: CommentNodeI[], - id: number + id: number, ): CommentNodeI | undefined { for (const node of tree) { if (node.comment_view.comment.id === id) { @@ -102,14 +96,13 @@ export function searchCommentTree( export function insertCommentIntoTree( tree: CommentNodeI[], cv: CommentView, - parentComment: boolean + parentComment: boolean, ) { // Building a fake node to be used for later const node: CommentNodeI = { comment_view: cv, children: [], depth: 0, - ui: {}, } const parentId = getCommentParentId(cv.comment) diff --git a/src/lib/components/lemmy/community/CommunityCard.svelte b/src/lib/components/lemmy/community/CommunityCard.svelte index eb1b98f9..56b66008 100644 --- a/src/lib/components/lemmy/community/CommunityCard.svelte +++ b/src/lib/components/lemmy/community/CommunityCard.svelte @@ -1,4 +1,4 @@ - - + - + {#snippet customIcon()} + + {/snippet}

- - - - {$t('cards.site.about')} - + + {#snippet title()} + + {$t('cards.site.about')} +
+
+ {/snippet}

- - - - {$t('cards.site.stats')} - + + {#snippet title()} + + {$t('cards.site.stats')} +
+
+ {/snippet}
0}
- - - - {$t('cards.community.moderators')} - + + {#snippet title()} + + {$t('cards.community.moderators')} + +
+
+ {/snippet} ({ id: m.moderator.id, @@ -213,74 +233,86 @@
- {#if $profile?.jwt} + {#if profile.data?.jwt} {/if} - {#if $profile?.user && amMod($profile.user, community_view.community)} + {#if profile.data?.user && amMod(profile.data.user, community_view.community)} {/if} - + {#snippet target()} + + {/snippet} {$t('cards.community.modlog')} - {#if $profile?.jwt} + {#if profile.data?.jwt} + onclick={() => block(community_view.community.id, !community_view.blocked)} > - + {#snippet prefix()} + + {/snippet} {community_view.blocked ? $t('cards.community.unblock') : $t('cards.community.block')} - {#if $profile?.user} + {#if profile.data?.user} blockInstance(community_view.community.instance_id)} + onclick={() => blockInstance(community_view.community.instance_id)} > - + {#snippet prefix()} + + {/snippet} {$t('cards.community.blockInstance')} {/if} - {#if $profile?.user && isAdmin($profile.user)} + {#if profile.data?.user && isAdmin(profile.data.user)} + onclick={() => modal({ title: $t('admin.purgeCommunity.title'), body: `${community_view.community.title}: ${$t('admin.purgeCommunity.warning')}`, @@ -301,7 +333,9 @@ type: 'error', })} > - + {#snippet prefix()} + + {/snippet} {$t('admin.purge')} {/if} diff --git a/src/lib/components/lemmy/community/CommunityForm.svelte b/src/lib/components/lemmy/community/CommunityForm.svelte index 8c3ce656..07b2d0d6 100644 --- a/src/lib/components/lemmy/community/CommunityForm.svelte +++ b/src/lib/components/lemmy/community/CommunityForm.svelte @@ -1,47 +1,65 @@ - + {#if formtitle}{@render formtitle()}{:else}
{$t('routes.createCommunity')}
-
+ {/if} { + oninput={() => { formData.name = formData.name.toLowerCase().replaceAll(' ', '_') }} disabled={edit != undefined} @@ -147,7 +167,7 @@ + {/snippet} + {#each site.data.all_languages.filter((l) => !formData.languages?.includes(l.id)) as language, index} + { + formData.languages = [ + ...(formData.languages ?? []), + language.id, + ] + }} + > + {language.name} + + {/each} +
+ {#each formData.languages ?? [] as languageId, index} + {@const language = site.data.all_languages.find( + (l) => l.id == languageId, + )} + + {/each} +
+ {/if} + +
+ - {#if moderators.length > 0} - { + navigator?.clipboard?.writeText?.( + `!${fullCommunityName(community.name, community.actor_id)}`, + ) + toast({ content: $t('toast.copied') }) + }} + class="text-sm flex gap-0 items-center" > - - + !{fullCommunityName(community.name, community.actor_id)} + + {/snippet} + {#if moderators.length > 0} + + {#snippet title()} {$t('cards.community.moderators')} - +
+ {/snippet} ({ id: m.moderator.id, @@ -101,8 +112,8 @@ dark:border-zinc-800 border-slate-300 border-opacity-50 text-slate-700 dark:text />
{/if} -
- {#if $profile?.jwt} +
+ {#if profile.data?.jwt} - + {#snippet children({ subscribe, subscribing })} + + {/snippet} {/if} - {#if $profile?.user && $profile.user.moderates + {#if profile.data?.user && profile.data.user.moderates .map((c) => c.community.id) .includes(community.id)} {/if} - + {#snippet target()} + + {/snippet} {$t('cards.community.modlog')} - {#if $profile?.jwt} + {#if profile.data?.jwt} block(community.id, !blocked)} + onclick={() => block(community.id, !blocked)} > - + {#snippet prefix()} + + {/snippet} {blocked ? $t('cards.community.unblock') : $t('cards.community.block')} - {#if $profile?.user} + {#if profile.data?.user} blockInstance(community.instance_id)} + onclick={() => blockInstance(community.instance_id)} > - + {#snippet prefix()} + + {/snippet} {$t('cards.community.blockInstance')} {/if} - {#if $profile?.user && isAdmin($profile.user)} + {#if profile.data?.user && isAdmin(profile.data.user)} + onclick={() => modal({ title: $t('admin.purgeCommunity.title'), body: `${community.title}: ${$t('admin.purgeCommunity.warning')}`, @@ -213,7 +229,9 @@ dark:border-zinc-800 border-slate-300 border-opacity-50 text-slate-700 dark:text type: 'error', })} > - + {#snippet prefix()} + + {/snippet} {$t('admin.purge')} {/if} diff --git a/src/lib/components/lemmy/community/CommunityItem.svelte b/src/lib/components/lemmy/community/CommunityItem.svelte index 2dcec3cc..a185d7ae 100644 --- a/src/lib/components/lemmy/community/CommunityItem.svelte +++ b/src/lib/components/lemmy/community/CommunityItem.svelte @@ -5,16 +5,20 @@ import { ChatBubbleOvalLeftEllipsis, Check, + ExclamationTriangle, Icon, InformationCircle, + MapPin, + NoSymbol, PencilSquare, Plus, + Trash, UserGroup, } from 'svelte-hero-icons' import FormattedNumber from '$lib/components/util/FormattedNumber.svelte' import { Button, Modal } from 'mono-svelte' - import { fullCommunityName, isSubscribed } from '$lib/util.js' - import { profile } from '$lib/auth.js' + import { fullCommunityName, isSubscribed } from '$lib/util.svelte.js' + import { profile } from '$lib/auth.svelte.js' import { addSubscription } from '$lib/lemmy/user.js' import Avatar from '$lib/components/ui/Avatar.svelte' import CommunityCard from '$lib/components/lemmy/community/CommunityCard.svelte' @@ -23,11 +27,22 @@ import { t } from '$lib/translations' import Entity from '$lib/components/ui/Entity.svelte' - export let community: CommunityView - export let view: 'cozy' | 'compact' = 'compact' - export let showCounts: boolean = true + let showInfo = $state(false) + interface Props { + community: CommunityView + view?: 'cozy' | 'compact' + showCounts?: boolean + class?: string + icon?: import('svelte').Snippet + } - let showInfo = false + let { + community = $bindable(), + view = 'compact', + showCounts = true, + class: clazz = 'py-4 flex flex-col gap-4 text-sm max-w-full relative', + icon, + }: Props = $props() {#if showInfo} @@ -36,10 +51,7 @@ {/if} -
+
- + {#if icon}{@render icon()}{:else} - + {/if}
- {community.community.title} + {community.community.title} + {#if community.community.deleted} + + {/if} + {#if community.community.nsfw} + + {/if} + {#if community.banned_from_community} + + {/if} + {#if community.community.visibility == 'LocalOnly'} + + {/if}
- - - + community.subscribed = newSubscribed + addSubscription( + community.community, + newSubscribed == 'Subscribed', + ) + } + }} + size="custom" + title={isSubscribed(community.subscribed) + ? $t('cards.community.subscribed') + : $t('cards.community.subscribe')} + color={isSubscribed(community.subscribed) + ? 'elevatedLow' + : 'primary'} + class="{isSubscribed(community.subscribed) + ? 'text-slate-600 dark:text-zinc-400' + : ''} + aspect-square h-8 @md:px-2 @md:min-w-32 @md:aspect-auto" + > + {#snippet prefix()} + + {/snippet} + + + {/snippet}
diff --git a/src/lib/components/lemmy/community/CommunityLink.svelte b/src/lib/components/lemmy/community/CommunityLink.svelte index 762e2e5e..482d306e 100644 --- a/src/lib/components/lemmy/community/CommunityLink.svelte +++ b/src/lib/components/lemmy/community/CommunityLink.svelte @@ -1,27 +1,42 @@ @@ -42,7 +57,7 @@ {#if showInstance} @{new URL(community.actor_id).hostname} diff --git a/src/lib/components/lemmy/community/CommunityTitle.svelte b/src/lib/components/lemmy/community/CommunityTitle.svelte index 2410c20f..2550629b 100644 --- a/src/lib/components/lemmy/community/CommunityTitle.svelte +++ b/src/lib/components/lemmy/community/CommunityTitle.svelte @@ -2,7 +2,11 @@ import Avatar from '$lib/components/ui/Avatar.svelte' import type { Community } from 'lemmy-js-client' - export let community: Community + interface Props { + community: Community + } + + let { community }: Props = $props()
diff --git a/src/lib/components/lemmy/dropdowns/Location.svelte b/src/lib/components/lemmy/dropdowns/Location.svelte index dc82a253..691fc069 100644 --- a/src/lib/components/lemmy/dropdowns/Location.svelte +++ b/src/lib/components/lemmy/dropdowns/Location.svelte @@ -1,8 +1,7 @@ diff --git a/src/lib/components/lemmy/dropdowns/Sort.svelte b/src/lib/components/lemmy/dropdowns/Sort.svelte index 5fd4283a..75ef6afc 100644 --- a/src/lib/components/lemmy/dropdowns/Sort.svelte +++ b/src/lib/components/lemmy/dropdowns/Sort.svelte @@ -1,9 +1,7 @@ -
+
{#if selected?.startsWith('Top')}
{/if} diff --git a/src/lib/components/lemmy/dropdowns/ViewSelect.svelte b/src/lib/components/lemmy/dropdowns/ViewSelect.svelte index c3db9b9f..5eb59956 100644 --- a/src/lib/components/lemmy/dropdowns/ViewSelect.svelte +++ b/src/lib/components/lemmy/dropdowns/ViewSelect.svelte @@ -1,7 +1,8 @@ - + {#snippet customLabel()} {#if showLabel} {$t('filter.view.label')} {/if} - - diff --git a/src/lib/components/lemmy/generic/ItemList.svelte b/src/lib/components/lemmy/generic/ItemList.svelte index c45e41e4..85a7cf1d 100644 --- a/src/lib/components/lemmy/generic/ItemList.svelte +++ b/src/lib/components/lemmy/generic/ItemList.svelte @@ -5,13 +5,17 @@ import { flip } from 'svelte/animate' import { expoOut } from 'svelte/easing' - export let items: { - avatar?: string - name: string - instance?: string - id: number - url: string - }[] + interface Props { + items: { + avatar?: string + name: string + instance?: string + id: number + url: string + }[] + } + + let { items }: Props = $props() {#each items.sort((a, b) => a.name.localeCompare(b.name)) as item (item.id)} @@ -31,7 +35,6 @@ alt={item.name} title={item.name} width={24} - slot="prefix" />
diff --git a/src/lib/components/lemmy/inbox/PrivateMessage.svelte b/src/lib/components/lemmy/inbox/PrivateMessage.svelte index 0d0369c4..8ac09f0d 100644 --- a/src/lib/components/lemmy/inbox/PrivateMessage.svelte +++ b/src/lib/components/lemmy/inbox/PrivateMessage.svelte @@ -1,14 +1,20 @@ -
+
{#if meta}
From @@ -18,7 +24,7 @@ avatar avatarSize={20} /> - {#if $profile?.user?.local_user_view.person.id != message.recipient.id} + {#if profile.data?.user?.local_user_view.person.id != message.recipient.id} to {/if} - + + +
diff --git a/src/lib/components/lemmy/modal/ApplicationDenyModal.svelte b/src/lib/components/lemmy/modal/ApplicationDenyModal.svelte index d3522bee..9a313af7 100644 --- a/src/lib/components/lemmy/modal/ApplicationDenyModal.svelte +++ b/src/lib/components/lemmy/modal/ApplicationDenyModal.svelte @@ -1,16 +1,25 @@ -

- {$t('routes.admin.applications.modalTitle')} -

- deny()} class="flex flex-col gap-4"> + {#snippet customTitle()} +

+ {$t('routes.admin.applications.modalTitle')} +

+ {/snippet} + deny())} class="flex flex-col gap-4"> - import { profile } from '$lib/auth.js' + import { profile } from '$lib/auth.svelte.js' import ProgressBar from '$lib/components/ui/ProgressBar.svelte' import { errorMessage } from '$lib/lemmy/error' import { t } from '$lib/translations' - import { uploadImage } from '$lib/util.js' + import { uploadImage } from '$lib/util.svelte.js' import { ImageInput, Spinner, toast } from 'mono-svelte' import { Button, Modal } from 'mono-svelte' - import { createEventDispatcher } from 'svelte' import { DocumentPlus, Icon } from 'svelte-hero-icons' import { expoOut } from 'svelte/easing' import { slide } from 'svelte/transition' - export let open: boolean - export let image: FileList | null = null - export let preview: boolean = true - export let multiple: boolean = true - let progress = 1 + interface Props { + open: boolean + image?: FileList | null + preview?: boolean + multiple?: boolean + onupload?: (urls: string[]) => void + } - $: previewURLs = + let { + open = $bindable(), + image = $bindable(null), + preview = true, + multiple = true, + onupload, + }: Props = $props() + let progress = $state(1) + + let previewURLs = $derived( preview && image ? Array.from(image).map(URL.createObjectURL) : undefined - - const dispatcher = createEventDispatcher<{ upload: string[] }>() + ) async function upload() { - if (!$profile?.jwt || image == null) return + if (!profile.data?.jwt || image == null) return progress = 0 @@ -31,7 +40,7 @@ const uploaded = ( await Promise.all( Array.from(image).map((i) => - uploadImage(i, $profile.instance, $profile.jwt!) + uploadImage(i, profile.data.instance, profile.data.jwt!) .then((uploaded) => { progress += 1 / (image?.length ?? 0) return uploaded @@ -46,7 +55,7 @@ if (!uploaded) throw new Error('Image upload returned undefined') - dispatcher('upload', uploaded) + onupload?.(uploaded) progress = 1 open = false } catch (err) { @@ -61,13 +70,21 @@ -
Upload image
+ {#snippet customTitle()} +
Upload image
+ {/snippet} {#if progress != 1}
{/if} - + { + e.preventDefault() + upload() + }} + >
{:else} -
+
- {$t('form.post.selectFile')} + {$t('form.post.selectFile')}
{/if} - import { profile } from '$lib/auth.js' + import { preventDefault } from 'svelte/legacy' + + import { profile } from '$lib/auth.svelte.js' import UserLink from '$lib/components/lemmy/user/UserLink.svelte' import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte' - import { getClient } from '$lib/lemmy.js' + import { getClient } from '$lib/lemmy.svelte.js' import { t } from '$lib/translations' import type { Person } from 'lemmy-js-client' import { Button, Modal, toast } from 'mono-svelte' import { Icon, PaperAirplane } from 'svelte-hero-icons' - export let open: boolean = false - export let user: Person + interface Props { + open?: boolean + user: Person + } - let message = '' + let { open = $bindable(false), user }: Props = $props() - let loading = false + let message = $state('') + + let loading = $state(false) async function sendMessage() { - if (!$profile?.jwt || message == '') return + if (!profile.data?.jwt || message == '') return loading = true @@ -44,8 +50,10 @@ -

Message

- + {#snippet customTitle()} +

Message

+ {/snippet} +

diff --git a/src/lib/components/lemmy/moderation/BanModal.svelte b/src/lib/components/lemmy/moderation/BanModal.svelte index f2df6411..6e6638c2 100644 --- a/src/lib/components/lemmy/moderation/BanModal.svelte +++ b/src/lib/components/lemmy/moderation/BanModal.svelte @@ -1,65 +1,58 @@

- - {#if ($profile?.user && amMod($profile.user, item.community)) || ($profile?.user && isAdmin($profile.user))} + {#snippet target()} + + {/snippet} + {#if (profile.data?.user && amMod(profile.data.user, item.community)) || (profile.data?.user && isAdmin(profile.data.user))} - {#if !item.community.local && !amMod($profile.user, item.community)} + {#if !item.community.local && !amMod(profile.data.user, item.community)} {$t('moderation.labelInstanceOnly')} {:else} {$t('moderation.label')} {/if} - remove(item)}> - + remove(item)}> + {#snippet prefix()} + + {/snippet} {#if isCommentView(item)} {item.comment.removed ? $t('moderation.restore') @@ -45,14 +53,16 @@ {item.post.removed ? $t('moderation.restore') : $t('moderation.remove')} {/if} - {#if $profile?.user && $profile.user?.local_user_view.person.id != item.creator.id} + {#if profile.data?.user && profile.data.user?.local_user_view.person.id != item.creator.id} + onclick={() => ban(item.creator_banned_from_community, item.creator, item.community)} > - + {#snippet prefix()} + + {/snippet} {item.creator_banned_from_community ? $t('moderation.ban.unbanFromCommunity') : $t('moderation.ban.banFromCommunity')} @@ -61,18 +71,20 @@ { - if (!$profile.jwt) return + onclick={async () => { + if (!profile.data.jwt) return item.comment = ( await feature( !item.comment.distinguished, item.comment, - $profile.jwt + profile.data.jwt, ) ).comment_view.comment }} > - + {#snippet prefix()} + + {/snippet} {item.comment.distinguished ? $t('moderation.unfeature') : $t('moderation.feature')} @@ -80,10 +92,12 @@ {/if} {/if} - {#if $profile?.user && isAdmin($profile.user)} + {#if profile.data?.user && isAdmin(profile.data.user)} {$t('admin.label')} - remove(item, true)}> - + remove(item, true)}> + {#snippet prefix()} + + {/snippet} {$t('admin.purge')} {/if} diff --git a/src/lib/components/lemmy/moderation/ModerationMenu.svelte b/src/lib/components/lemmy/moderation/ModerationMenu.svelte index c2f1a628..9d77ef2e 100644 --- a/src/lib/components/lemmy/moderation/ModerationMenu.svelte +++ b/src/lib/components/lemmy/moderation/ModerationMenu.svelte @@ -1,8 +1,9 @@ - - {#if ($profile?.user && amMod($profile.user, item.community)) || ($profile?.user && isAdmin($profile.user))} + {#snippet target()} + + {/snippet} + {#if (profile.data?.user && amMod(profile.data.user, item.community)) || (profile.data?.user && isAdmin(profile.data.user))} - {#if !item.community.local && !amMod($profile.user, item.community)} + {#if !item.community.local && !amMod(profile.data.user, item.community)} {$t('moderation.labelInstanceOnly')} {:else} {$t('moderation.label')} @@ -91,22 +98,19 @@ lock(!item.post.locked)} + onclick={() => lock(!item.post.locked)} loading={locking} disabled={locking} > - + {#snippet prefix()} + + {/snippet} {item.post.locked ? $t('moderation.unlock') : $t('moderation.lock')} + onclick={() => pin(isPostView(item) ? !item.post.featured_community : false)} loading={pinning} disabled={pinning} @@ -120,12 +124,12 @@ ? $t('moderation.unfeature') : $t('moderation.feature')} - {#if isAdmin($profile.user)} + {#if isAdmin(profile.data.user)} {$t('form.post.community')} {/if}
- remove(item)}> + remove(item)}> {#if isCommentView(item)} {item.comment.removed @@ -135,10 +139,10 @@ {item.post.removed ? $t('moderation.restore') : $t('moderation.remove')} {/if} - {#if $profile?.user && $profile.user.local_user_view.person.id != item.creator.id} + {#if profile.data?.user && profile.data.user.local_user_view.person.id != item.creator.id} + onclick={() => ban(item.creator_banned_from_community, item.creator, item.community)} > @@ -148,11 +152,11 @@ {/if} {/if} - {#if $profile?.user && isAdmin($profile.user)} + {#if profile.data?.user && isAdmin(profile.data.user)} {$t('admin.label')} + onclick={() => pin(isPostView(item) ? !item.post.featured_local : false, true)} > @@ -167,7 +171,7 @@ {$t('admin.instance')}
- remove(item, true)}> + remove(item, true)}> {$t('admin.purge')} diff --git a/src/lib/components/lemmy/moderation/RemoveModal.svelte b/src/lib/components/lemmy/moderation/RemoveModal.svelte index 0f9c0dd7..6a6c6504 100644 --- a/src/lib/components/lemmy/moderation/RemoveModal.svelte +++ b/src/lib/components/lemmy/moderation/RemoveModal.svelte @@ -1,36 +1,49 @@ {#if item} {#if isCommentView(item)} @@ -177,7 +192,6 @@ children: [], comment_view: item, depth: 1, - ui: {}, }} postId={item.post.id} actions={false} @@ -193,7 +207,7 @@ bind:value={reason} /> - {#if !removed && $profile?.user && (amMod($profile.user, item.community) || (isAdmin($profile.user) && item.community.local))} + {#if !removed && profile.data?.user && (amMod(profile.data.user, item.community) || (isAdmin(profile.data.user) && item.community.local))} {$t('moderation.removeSubmission.withReason')} @@ -212,16 +226,18 @@ placeholder={replyReason} rows={3} > -
- {$t('comment.reply')} - -
+ {#snippet customLabel()} +
+ {$t('comment.reply')} + +
+ {/snippet} {/if} {/if} @@ -233,7 +249,9 @@ disabled={loading} submit > - + {#snippet prefix()} + + {/snippet} {#if purge} {$t('admin.purge')} {:else} diff --git a/src/lib/components/lemmy/moderation/ReportModal.svelte b/src/lib/components/lemmy/moderation/ReportModal.svelte index cf59812e..f97f4118 100644 --- a/src/lib/components/lemmy/moderation/ReportModal.svelte +++ b/src/lib/components/lemmy/moderation/ReportModal.svelte @@ -1,14 +1,16 @@ - + {#if item}
{#if isComment(item)} diff --git a/src/lib/components/lemmy/moderation/ShieldIcon.svelte b/src/lib/components/lemmy/moderation/ShieldIcon.svelte index 532ff009..2a16d83b 100644 --- a/src/lib/components/lemmy/moderation/ShieldIcon.svelte +++ b/src/lib/components/lemmy/moderation/ShieldIcon.svelte @@ -1,6 +1,11 @@ {#if filled} @@ -10,7 +15,7 @@ viewBox="0 0 20 22" fill="none" xmlns="http://www.w3.org/2000/svg" - class="inline {$$props.class}" + class="inline {clazz}" > { if (content.postTitle) input = input.replaceAll('{{post}}', content.postTitle) if (content.communityLink) diff --git a/src/lib/components/lemmy/post/Post.svelte b/src/lib/components/lemmy/post/Post.svelte index 0f1c7143..a1f750c3 100644 --- a/src/lib/components/lemmy/post/Post.svelte +++ b/src/lib/components/lemmy/post/Post.svelte @@ -1,65 +1,30 @@ - - - + + +
{ + onclick={(e) => { onClick(e) }} - on:keydown={(e) => { + onkeydown={(e) => { // @ts-ignore if (e.key == 'Enter') onClick(e) }} tabindex="0" - style={$$props.style ?? ''} + {style} > c.community.id) .includes(post.community.id) ? 'Subscribed' @@ -130,14 +139,10 @@ edited={post.post.updated} tags={tags?.tags} {view} - > - - + {extraBadges} + /> {#key post.post.url} -
+
{#if rule != 'hide'} {/if}
- {#if view == 'list' || view == 'compact'} + {#if view == 'compact'} {/if} {#if actions} - - {:else if view == 'compact'} -
- - - {post.counts.score} - - - - {post.counts.comments} - -
+ {/if}
+ >
diff --git a/src/lib/components/translate/Translation.svelte b/src/lib/components/translate/Translation.svelte deleted file mode 100644 index 37981e34..00000000 --- a/src/lib/components/translate/Translation.svelte +++ /dev/null @@ -1,113 +0,0 @@ - - - - -
- - - -
- {#if result} - {#await result} -
- -
- {:then result} - - {:catch err} - - {/await} - {:else} - + {#if suffix}
- + {@render suffix?.()}
{/if}
- + {@render children?.()}
diff --git a/src/lib/mono/forms/TextInput.svelte b/src/lib/mono/forms/TextInput.svelte index 2b723b71..2d6b7fed 100644 --- a/src/lib/mono/forms/TextInput.svelte +++ b/src/lib/mono/forms/TextInput.svelte @@ -1,4 +1,4 @@ - -
- {#if $$slots.label || label} +
+ {#if customLabel || label} {/if}
- {#if $$slots.prefix} + {#if prefix}
- + {@render prefix?.()}
{/if} - {#if $$slots.suffix} + {#if suffix}
- + {@render suffix?.()}
{/if}
- + {@render children?.()}
diff --git a/src/lib/mono/forms/select/Option.svelte b/src/lib/mono/forms/select/Option.svelte new file mode 100644 index 00000000..b2e21c3a --- /dev/null +++ b/src/lib/mono/forms/select/Option.svelte @@ -0,0 +1,40 @@ + + + diff --git a/src/lib/mono/forms/select/Select.svelte b/src/lib/mono/forms/select/Select.svelte new file mode 100644 index 00000000..41c1c397 --- /dev/null +++ b/src/lib/mono/forms/select/Select.svelte @@ -0,0 +1,162 @@ + + +
+ {#if customLabel || label} + + {/if} + +
+ + {#snippet target()} + + {/snippet} + + {#each context.options as option} + {#if customOption}{@render customOption({ + option, + selected: option.value == value, + })}{:else} + { + value = option.value + await tick() + element?.dispatchEvent(new Event('change', { bubbles: true })) + }} + size="custom" + disabled={option.disabled} + class="!min-h-0 !py-[5px] {option.value == value + ? '!bg-slate-100 dark:!bg-zinc-800' + : ''}" + > + {#if option.icon} + + {/if} + {@html option.label} + {#if option.value == value} + + {/if} + + {/if} + {/each} + + +
+
diff --git a/src/lib/mono/index.ts b/src/lib/mono/index.ts index c624471b..9b97d95f 100644 --- a/src/lib/mono/index.ts +++ b/src/lib/mono/index.ts @@ -8,12 +8,12 @@ export { default as Spinner } from './loader/Spinner.svelte' export { default as Routebar } from './nav/Routebar.svelte' export { default as Material } from './materials/Material.svelte' -export { default as Form } from './forms/Form.svelte' export { default as Label } from './forms/Label.svelte' export { default as FileInput } from './forms/FileInput.svelte' export { default as TextInput } from './forms/TextInput.svelte' export { default as TextArea } from './forms/TextArea.svelte' -export { default as Select } from './forms/Select.svelte' +export { default as Select } from './forms/select/Select.svelte' +export { default as Option } from './forms/select/Option.svelte' export { default as ImageInput } from './forms/ImageInput.svelte' export { default as Checkbox } from './forms/Checkbox.svelte' @@ -21,8 +21,6 @@ export { default as Switch } from './forms/Switch.svelte' export { default as Radio } from './forms/Radio.svelte' export { default as RadioGroup } from './forms/RadioGroup.svelte' -export { default as Choicebox } from './forms/Choicebox.svelte' -export { default as ChoiceboxGroup } from './forms/ChoiceboxGroup.svelte' export { default as Popover } from './popover/Popover.svelte' export { default as Menu } from './popover/Menu.svelte' diff --git a/src/lib/mono/loader/Spinner.svelte b/src/lib/mono/loader/Spinner.svelte index a3b69424..065bf39d 100644 --- a/src/lib/mono/loader/Spinner.svelte +++ b/src/lib/mono/loader/Spinner.svelte @@ -1,9 +1,14 @@ + import { createBubbler } from 'svelte/legacy' + + const bubble = createBubbler() type Elevation = keyof typeof elevationClass type Padding = keyof typeof paddingClass type Rounding = keyof typeof roundedClass @@ -43,29 +46,39 @@ none: '', } - export let elevation: Elevation = 'flat' - export let padding: Padding = 'md' - export let rounding: Rounding = 'lg' - export let color: Color = 'default' + interface Props { + elevation?: Elevation + padding?: Padding + rounding?: Rounding + color?: Color + element?: string + class?: string + children?: import('svelte').Snippet + [key: string]: any + } - export let element: string = 'div' + let { + elevation = 'flat', + padding = 'md', + rounding = 'lg', + color = 'default', + element = 'div', + class: clazz = '', + children, + ...rest + }: Props = $props() - + {@render children?.()} diff --git a/src/lib/mono/modal/Modal.svelte b/src/lib/mono/modal/Modal.svelte index c5c24bf7..382cac00 100644 --- a/src/lib/mono/modal/Modal.svelte +++ b/src/lib/mono/modal/Modal.svelte @@ -6,36 +6,56 @@ import { fade, scale } from 'svelte/transition' import { focusTrap } from 'svelte-focus-trap' import Portal from '../popover/Portal.svelte' + import type { ClassValue } from 'svelte/elements' - export let action: string | undefined = undefined - export let open = false - export let title: string | undefined = undefined - export let dismissable: boolean = true + interface Props { + action?: string | undefined + open?: boolean + title?: string | undefined | null + dismissable?: boolean + class?: ClassValue + customTitle?: import('svelte').Snippet + children?: import('svelte').Snippet + actions?: import('svelte').Snippet<[any]> + ondismissed?: () => void + onaction?: () => void + } - let el: any + let { + action = undefined, + open = $bindable(false), + title = undefined, + dismissable = true, + customTitle, + children, + actions, + ondismissed, + onaction, + class: clazz = '', + }: Props = $props() - const dispatcher = createEventDispatcher<{ action: any; dismissed: any }>() + let el: any = $state() {#if open} - - + +
+ {#each formData.discussion_languages ?? [] as languageId, index} + {@const language = site.data.all_languages.find( + (l) => l.id == languageId, + )} + + {/each} +
+ {/if} + +
{/if} {#if data.site && data.federated_instances?.federated_instances?.blocked} - - + {#snippet button()} + + {/snippet} + {#snippet choose()} {''} - + {/snippet}

{$t('routes.admin.federation.blocked')}

- moderateInstance(blockInstance.instance, true)} + onsubmit={preventDefault(() => + moderateInstance(blockInstance.instance, true), + )} class="flex flex-row gap-2" > - {#if data.federated_instances.federated_instances.blocked.length > 0} - {#each data.federated_instances.federated_instances.blocked.sort( (b, a) => b.domain.localeCompare(a.domain) ) as instance (instance.id)} + {#each data.federated_instances.federated_instances.blocked.sort( (b, a) => b.domain.localeCompare(a.domain), ) as instance (instance.id)}
{/each} @@ -253,7 +261,7 @@ description={$t('routes.admin.federation.emptyBlock.description')} /> {/if} -
+
@@ -261,13 +269,14 @@ {$t('routes.admin.federation.allowed')} {#if allowInstance.instance || !(data.federated_instances.federated_instances.allowed?.length == 0)} - + {#snippet target()} + + {/snippet}

{$t('routes.admin.federation.emptyAllow.description')}

@@ -275,8 +284,9 @@ {/if}
- moderateInstance(allowInstance.instance, false)} + onsubmit={preventDefault(() => + moderateInstance(allowInstance.instance, false), + )} class="flex flex-row gap-2" > - +
    {#if data.federated_instances.federated_instances.allowed.length > 0} - {#each data.federated_instances.federated_instances.allowed.sort( (b, a) => b.domain.localeCompare(a.domain) ) as instance (instance.id)} + {#each data.federated_instances.federated_instances.allowed.sort( (b, a) => b.domain.localeCompare(a.domain), ) as instance (instance.id)}
    {/each} @@ -332,12 +344,12 @@ icon={Check} title={$t('routes.admin.federation.emptyAllow.title')} description={$t( - 'routes.admin.federation.emptyAllow.description' + 'routes.admin.federation.emptyAllow.description', )} />
{/if} - +
diff --git a/src/routes/admin/federation/+page.ts b/src/routes/admin/federation/+page.ts index 3b32e283..d757e884 100644 --- a/src/routes/admin/federation/+page.ts +++ b/src/routes/admin/federation/+page.ts @@ -1,5 +1,5 @@ -import { profile } from '$lib/auth.js' -import { getClient } from '$lib/lemmy.js' +import { profile } from '$lib/auth.svelte' +import { getClient } from '$lib/lemmy.svelte.js' import { get } from 'svelte/store' export async function load({ fetch, parent }) { diff --git a/src/routes/admin/taglines/+page.svelte b/src/routes/admin/taglines/+page.svelte index 44791ecf..94ad12c3 100644 --- a/src/routes/admin/taglines/+page.svelte +++ b/src/routes/admin/taglines/+page.svelte @@ -1,26 +1,29 @@ - {data.community.community_view.community.title} + {data.community.value.community_view.community.title} - {#if data.community.community_view.community.description} + {#if data.community.value.community_view.community.description} {/if} - +{@render children?.()} diff --git a/src/routes/c/[name]/+layout.ts b/src/routes/c/[name]/+layout.ts index 3df1347f..819abc7b 100644 --- a/src/routes/c/[name]/+layout.ts +++ b/src/routes/c/[name]/+layout.ts @@ -1,5 +1,6 @@ import CommunityCard from '$lib/components/lemmy/community/CommunityCard.svelte' -import { getClient } from '$lib/lemmy.js' +import { getClient } from '$lib/lemmy.svelte.js' +import { ReactiveState } from '$lib/promise.svelte' export async function load(req: any) { const community = await getClient(undefined, req.fetch).getCommunity({ @@ -7,7 +8,7 @@ export async function load(req: any) { }) return { - community: community, + community: new ReactiveState(community), slots: { sidebar: { component: CommunityCard, diff --git a/src/routes/c/[name]/+page.svelte b/src/routes/c/[name]/+page.svelte index b9e1ba8d..e4768f70 100644 --- a/src/routes/c/[name]/+page.svelte +++ b/src/routes/c/[name]/+page.svelte @@ -1,60 +1,48 @@
- + {@render children?.()}
diff --git a/src/routes/c/[name]/settings/+page.svelte b/src/routes/c/[name]/settings/+page.svelte index d13bf34e..968d35ab 100644 --- a/src/routes/c/[name]/settings/+page.svelte +++ b/src/routes/c/[name]/settings/+page.svelte @@ -3,32 +3,37 @@ import CommunityTitle from '$lib/components/lemmy/community/CommunityTitle.svelte' import Header from '$lib/components/ui/layout/pages/Header.svelte' - export let data + let { data } = $props()
Settings - + {#snippet extended()} + + {/snippet}
- {''} + {#snippet formtitle()} + {''} + {/snippet}
diff --git a/src/routes/c/[name]/settings/team/+page.svelte b/src/routes/c/[name]/settings/team/+page.svelte index c163a244..5e70e736 100644 --- a/src/routes/c/[name]/settings/team/+page.svelte +++ b/src/routes/c/[name]/settings/team/+page.svelte @@ -1,26 +1,29 @@
Moderators
- { - toast({ - content: `Are you sure you want to remove ${e.detail.name} as a moderator?`, - action: () => removeMod(e.detail.id), - }) - }} -> - {#each data.community.moderators as moderator (moderator.moderator.id)} +
    + {#each data.community.value.moderators as moderator (moderator.moderator.id)}
-
{/each} - -
+ + { + e.preventDefault() + addModerator() + }} + class="mt-auto flex gap-2 w-full" +> - Add moderator + {#snippet prefix()} + + {/snippet} Add moderator diff --git a/src/routes/comment/[instance]/+page.ts b/src/routes/comment/[instance]/+page.ts index f1e8b8a3..84f6a9e0 100644 --- a/src/routes/comment/[instance]/+page.ts +++ b/src/routes/comment/[instance]/+page.ts @@ -1,7 +1,11 @@ -import { getInstance } from '$lib/lemmy.js' +import { instance } from '$lib/instance.svelte' import { redirect } from '@sveltejs/kit' +import { get } from 'svelte/store' export function load({ params }) { // If you somehow got to /comment/instance, it likely means you passed in an ID, not an instance. - redirect(302, `/comment/${getInstance()}/${params.instance}`); + redirect( + 302, + `/comment/${encodeURIComponent(instance.data)}/${params.instance}`, + ) } diff --git a/src/routes/comment/[instance]/[id]/+page.ts b/src/routes/comment/[instance]/[id]/+page.ts index 30b373ca..5d6aceb4 100644 --- a/src/routes/comment/[instance]/[id]/+page.ts +++ b/src/routes/comment/[instance]/[id]/+page.ts @@ -1,7 +1,5 @@ -import { profile } from '$lib/auth.js' -import { client } from '$lib/lemmy.js' +import { client } from '$lib/lemmy.svelte.js' import { redirect } from '@sveltejs/kit' -import { get } from 'svelte/store' export async function load({ params, fetch }) { const comment = await client({ @@ -13,6 +11,6 @@ export async function load({ params, fetch }) { redirect( 302, - `/post/${params.instance}/${comment.comment_view.post.id}?thread=${comment.comment_view.comment.path}#${comment.comment_view.comment.id}` + `/post/${params.instance}/${comment.comment_view.post.id}?thread=${comment.comment_view.comment.path}#${comment.comment_view.comment.id}`, ) } diff --git a/src/routes/communities/+page.svelte b/src/routes/communities/+page.svelte index 8931469a..cddca838 100644 --- a/src/routes/communities/+page.svelte +++ b/src/routes/communities/+page.svelte @@ -1,5 +1,7 @@ { + onkeydown={(e) => { if (e.target == document.body) searchElement?.focus() }} /> @@ -56,122 +58,144 @@
{$t('routes.communities.title')}
-
- -
- searchParam($page.url, 'q', search, 'page')} - class="flex gap-2 flex-row items-center w-full text-base h-10" - > - - - -
-
-
- - -
-
    - {#if data.communities.length == 0} - +
    + +
    + + +
    +
    +
    +
    + form?.requestSubmit()} /> - {/if} - - {#if showTop} - - {$t('routes.search.top')} - -
    - {#each data.communities.slice(0, 3) as community, index (community.community.id)} -
    - - - -
    - {/each} -
    - {/if} - - {#if data.communities.slice(showTop ? 3 : 0).length > 0} - - {$t('routes.search.other')} - - {/if} - {#if data.communities} - {@const sliced = data.communities.slice(showTop ? 3 : 0)} -
    - {#each sliced as community, index (community.community.id)} -
    - -
    - {/each} -
    - {/if} -
-{#if data.communities.length > 0} -
form?.requestSubmit()} + /> +
+ +{#if navigating.to?.route.id == '/communities'} +
+ {#each new Array(5) as _, index} +
+ +
+ {/each} +
+{:else} +
    + {#if data.communities.value.length == 0} + + {/if} + + {#if showTop} + + {$t('routes.search.top')} + +
    + {#each data.communities.value.slice(0, 3) as community, index (community.community.id)} +
    + + + +
    + {/each} +
    + {/if} + + {#if data.communities.value.slice(showTop ? 3 : 0).length > 0} + + {$t('routes.search.other')} + + {/if} + {#if data.communities.value} + {@const sliced = data.communities.value.slice(showTop ? 3 : 0)} +
    + {#each sliced as community, index (community.community.id)} +
    + +
    + {/each} +
    + {/if} +
+{/if} +{#if data.communities.value.length > 0} +
searchParam($page.url, 'page', p.detail.toString())} + page={Number(page.url.searchParams.get('page')) || 1} + href={(c) => `?page=${c}`} />
diff --git a/src/routes/communities/+page.ts b/src/routes/communities/+page.ts index 6b320ae4..0ab1d09a 100644 --- a/src/routes/communities/+page.ts +++ b/src/routes/communities/+page.ts @@ -1,6 +1,7 @@ -import { profile } from '$lib/auth.js' -import { LINKED_INSTANCE_URL } from '$lib/instance.js' -import { client, getClient } from '$lib/lemmy.js' +import { profile } from '$lib/auth.svelte' +import { LINKED_INSTANCE_URL } from '$lib/instance.svelte.js' +import { client, getClient } from '$lib/lemmy.svelte.js' +import { ReactiveState } from '$lib/promise.svelte' import { type ListCommunitiesResponse, type ListingType, @@ -31,10 +32,11 @@ export async function load({ url, fetch }) { page: page, sort: sort, type_: type, + show_nsfw: true, }) return { - ...communities, + communities: new ReactiveState(communities.communities), type: type, sort: sort, query: query, diff --git a/src/routes/communities/Subscribe.svelte b/src/routes/communities/Subscribe.svelte index d87e1344..c80fe70d 100644 --- a/src/routes/communities/Subscribe.svelte +++ b/src/routes/communities/Subscribe.svelte @@ -1,18 +1,23 @@ - +{@render children?.({ subscribe, subscribing })} diff --git a/src/routes/create/post/+page.svelte b/src/routes/create/post/+page.svelte index b1e73860..ddf5153d 100644 --- a/src/routes/create/post/+page.svelte +++ b/src/routes/create/post/+page.svelte @@ -1,18 +1,16 @@ @@ -34,8 +32,8 @@
goto(`/post/${e.detail.post.id}`)} + onsubmit={(e) => goto(`/post/${e.post.id}`)} > -
- {$t('routes.createPost')} -
+ {#snippet formtitle()} +
+ {$t('routes.createPost')} +
+ {/snippet}
diff --git a/src/routes/create/post/+page.ts b/src/routes/create/post/+page.ts index d8874497..d456d11d 100644 --- a/src/routes/create/post/+page.ts +++ b/src/routes/create/post/+page.ts @@ -1,4 +1,4 @@ -import { getClient } from '$lib/lemmy.js' +import { getClient } from '$lib/lemmy.svelte.js' export const load = ({ url }) => { return { crosspost: Boolean(url.searchParams.get('crosspost')) ?? false } diff --git a/src/routes/inbox/+page.svelte b/src/routes/inbox/+page.svelte index aff5b40f..fee6ccb3 100644 --- a/src/routes/inbox/+page.svelte +++ b/src/routes/inbox/+page.svelte @@ -9,28 +9,27 @@ Icon, Inbox, } from 'svelte-hero-icons' - import { getClient } from '$lib/lemmy.js' + import { getClient } from '$lib/lemmy.svelte.js' import { goto } from '$app/navigation' - import { page } from '$app/stores' + import { page } from '$app/state' import Pageination from '$lib/components/ui/Pageination.svelte' - import { notifications, profile } from '$lib/auth.js' + import { notifications, profile } from '$lib/auth.svelte.js' import Placeholder from '$lib/components/ui/Placeholder.svelte' import { fly } from 'svelte/transition' - import { searchParam } from '$lib/util.js' + import { searchParam } from '$lib/util.svelte.js' import { Button, Select } from 'mono-svelte' import EndPlaceholder from '$lib/components/ui/EndPlaceholder.svelte' import Header from '$lib/components/ui/layout/pages/Header.svelte' import { t } from '$lib/translations' import Tabs from '$lib/components/ui/layout/pages/Tabs.svelte' - import { contentPadding } from '$lib/components/ui/layout/Shell.svelte' import { expoOut } from 'svelte/easing' - export let data + let { data } = $props() - let markingAsRead = false + let markingAsRead = $state(false) async function markAllAsRead() { - if (!$profile?.user) { + if (!profile.data?.user) { goto('/login') return } @@ -41,7 +40,7 @@ $notifications.inbox = 0 - goto($page.url, { + goto(page.url, { invalidateAll: true, }).then(() => { markingAsRead = false @@ -52,7 +51,7 @@ function addSearchParam( currentSearchParams: URLSearchParams, - newParamString: string + newParamString: string, ) { // Create a new URLSearchParams object from the current search params const updatedParams = new URLSearchParams(currentSearchParams) @@ -76,9 +75,8 @@
- $page.url.search == route || - ($page.url.pathname == route && $page.url.search == '') || - $page.url.searchParams.toString().includes(route.slice(1)) || - ($page.url.search == '' && route == def)} - class="overflow-auto w-full" + page.url.search == route || + (page.url.pathname == route && page.url.search == '') || + page.url.searchParams.toString().includes(route.slice(1)) || + (page.url.search == '' && route == def)} + class="overflow-auto" buildUrl={(route, href) => href.includes('?') - ? '?' + addSearchParam($page.url.searchParams, href).toString() - : `${href}${$page.url.search}`} + ? '?' + addSearchParam(page.url.searchParams, href).toString() + : `${href}${page.url.search}`} defaultRoute="?type=All" /> - $page.url.searchParams.toString().includes(route.slice(1)) || - ($page.url.search == '' && route == def)} + page.url.searchParams.toString().includes(route.slice(1)) || + (page.url.search == '' && route == def)} buildUrl={(route, href) => - '?' + addSearchParam($page.url.searchParams, href).toString()} + '?' + addSearchParam(page.url.searchParams, href).toString()} defaultRoute="?unreadOnly=true" + class="overflow-auto" />
-
+
{$t('routes.inbox.title')}
@@ -160,17 +163,18 @@ items-center px-2 w-max"
- {#if !data.data || (data.data?.length ?? 0) == 0} + {#if !data.inbox?.value || (data.inbox.value?.length ?? 0) == 0} {:else} - {#each data.data as item, index (item.id)} + {#each data.inbox.value as item, index (item.id)}
- +
{/each} {/if} - {#if !(data.page == 1 && (data?.data?.length ?? 0) == 0)} + {#if !(data.page == 1 && (data?.inbox?.value.length ?? 0) == 0)}
searchParam($page.url, 'page', p.detail.toString())} + href={(page) => `?page=${page}`} />
diff --git a/src/routes/inbox/+page.ts b/src/routes/inbox/+page.ts index 8e97cb92..63fd9510 100644 --- a/src/routes/inbox/+page.ts +++ b/src/routes/inbox/+page.ts @@ -1,18 +1,18 @@ -import { profile } from '$lib/auth.js' +import { profile } from '$lib/auth.svelte' import { publishedToDate } from '$lib/components/util/date.js' -import { getClient } from '$lib/lemmy.js' +import { getClient } from '$lib/lemmy.svelte.js' import { generalizeCommentReply, generalizePersonMention, generalizePrivateMessage, } from '$lib/lemmy/inbox.js' +import { ReactiveState } from '$lib/promise.svelte.js' import { get } from 'svelte/store' type InboxFeedType = 'replies' | 'mentions' | 'messages' | 'all' export async function load({ url, fetch }) { - const auth = get(profile) - if (!auth?.jwt) return + if (!profile.data.jwt) return const type: InboxFeedType = (url.searchParams.get('type') as InboxFeedType) || 'all' @@ -55,14 +55,14 @@ export async function load({ url, fetch }) { ].sort( (a, b) => publishedToDate(b.published).getTime() - - publishedToDate(a.published).getTime() + publishedToDate(a.published).getTime(), ) return { unreadOnly: unreadOnly, type: type, page: page, - data: data, + inbox: new ReactiveState(data), limit: 20, } } diff --git a/src/routes/inbox/InboxItem.svelte b/src/routes/inbox/InboxItem.svelte index 889bd47d..dc184ee5 100644 --- a/src/routes/inbox/InboxItem.svelte +++ b/src/routes/inbox/InboxItem.svelte @@ -1,8 +1,8 @@
@@ -64,7 +61,7 @@ {:then data} {@const conversations = data.private_messages} {@const previews = conversationPreviews(conversations).filter( - (c) => c.user.id != $profile?.user?.local_user_view.person.id + (c) => c.user.id != profile.data?.user?.local_user_view.person.id )}
    -
    +
    {preview.user.name}
    -
    +
    {preview.message.content}
    diff --git a/src/routes/inbox/messages/+page.ts b/src/routes/inbox/messages/+page.ts index 0a288817..7cdc5ee8 100644 --- a/src/routes/inbox/messages/+page.ts +++ b/src/routes/inbox/messages/+page.ts @@ -1,5 +1,5 @@ -import { client } from '$lib/lemmy.js' -import { awaitIfServer } from '$lib/promise.js' +import { client } from '$lib/lemmy.svelte.js' +import { awaitIfServer } from '$lib/promise.svelte.js' export async function load({ fetch, url }) { const page = Number(url.searchParams.get('page')) || 1 diff --git a/src/routes/inbox/messages/[user_id=integer]/+page.svelte b/src/routes/inbox/messages/[user_id=integer]/+page.svelte index 56b970ca..d9ba211f 100644 --- a/src/routes/inbox/messages/[user_id=integer]/+page.svelte +++ b/src/routes/inbox/messages/[user_id=integer]/+page.svelte @@ -1,4 +1,6 @@
    - +
    - + {#snippet target()} + + {/snippet} {$t('post.actions.more.actions')} {#if primary} - dispatch('delete', true)} - > - + ondelete?.(true)}> + {#snippet prefix()} + + {/snippet} {$t('post.actions.more.delete')} {:else} - dispatch('report', true)} - > - + onreport?.(true)}> + {#snippet prefix()} + + {/snippet} {$t('moderation.report')} {/if} diff --git a/src/routes/instances/+page.svelte b/src/routes/instances/+page.svelte index c6ad018a..deabb5b7 100644 --- a/src/routes/instances/+page.svelte +++ b/src/routes/instances/+page.svelte @@ -7,7 +7,7 @@ import { Material, Popover } from 'mono-svelte' import { Check, Icon, InformationCircle } from 'svelte-hero-icons' - export let data + let { data } = $props()
    Linked Instances
    @@ -17,7 +17,9 @@

    Linked - + {#snippet target()} + + {/snippet}

    These are the instances your instance can see and interact with content from. @@ -57,7 +59,9 @@ Blocked - + {#snippet target()} + + {/snippet}

    These are the instances your instance is explicitly blocking content from. diff --git a/src/routes/instances/+page.ts b/src/routes/instances/+page.ts index e791157b..6455fc2b 100644 --- a/src/routes/instances/+page.ts +++ b/src/routes/instances/+page.ts @@ -1,6 +1,4 @@ -import { profile } from '$lib/auth.js' -import { getClient } from '$lib/lemmy.js' -import { get } from 'svelte/store' +import { getClient } from '$lib/lemmy.svelte.js' export async function load({ fetch }) { return (await getClient(undefined, fetch).getFederatedInstances()) diff --git a/src/routes/legal/+page.svelte b/src/routes/legal/+page.svelte index e4422e98..3b01725e 100644 --- a/src/routes/legal/+page.svelte +++ b/src/routes/legal/+page.svelte @@ -2,7 +2,7 @@ import SiteCard from '$lib/components/lemmy/SiteCard.svelte' import Markdown from '$lib/components/markdown/Markdown.svelte' import Header from '$lib/components/ui/layout/pages/Header.svelte' - import { site } from '$lib/lemmy' + import { site } from '$lib/lemmy.svelte' import { t } from '$lib/translations' import { Button, Modal, Spinner } from 'mono-svelte' @@ -10,11 +10,11 @@

    - {#if $site} + {#if site.data}
    {$t('routes.legal.title')}
    diff --git a/src/routes/login/+page.svelte b/src/routes/login/+page.svelte index b06f391a..fbcc6412 100644 --- a/src/routes/login/+page.svelte +++ b/src/routes/login/+page.svelte @@ -1,14 +1,19 @@
    -
    +
    - + {@render children?.()}
    {$t('account.addGuest')}
    - {#if $site && mayBeIncompatible(MINIMUM_VERSION, $site.version.replace('v', ''))} + {#if site.data && mayBeIncompatible(MINIMUM_VERSION, site.data.version.replace('v', ''))} {$t('account.versionGate', { //@ts-ignore diff --git a/src/routes/login/guest/+page.ts b/src/routes/login/guest/+page.ts index b0493438..f5b1d145 100644 --- a/src/routes/login/guest/+page.ts +++ b/src/routes/login/guest/+page.ts @@ -1,4 +1,4 @@ -import { LINKED_INSTANCE_URL } from '$lib/instance' +import { LINKED_INSTANCE_URL } from '$lib/instance.svelte' import { error } from '@sveltejs/kit' export function load() { diff --git a/src/routes/login_reset/+page.svelte b/src/routes/login_reset/+page.svelte index 3025c48e..eeb63fdc 100644 --- a/src/routes/login_reset/+page.svelte +++ b/src/routes/login_reset/+page.svelte @@ -1,17 +1,19 @@
    {$t('routes.moderation.title')} -
    - - -
    + {#snippet extended()} +
    + + +
    + {/snippet}
    -{#if data.items && data.items.length > 0} -
    - {#each data.items as item} -
    - -
    - - Report from - - - - -
    - + +{#if reports && reports.length > 0} +
    + {#each reports as item} +
    +
    - +
    {/each}
    diff --git a/src/routes/moderation/+page.ts b/src/routes/moderation/+page.ts index a436e4a1..719999aa 100644 --- a/src/routes/moderation/+page.ts +++ b/src/routes/moderation/+page.ts @@ -1,6 +1,6 @@ -import { profile } from '$lib/auth.js' +import { profile } from '$lib/auth.svelte' import { isAdmin } from '$lib/components/lemmy/moderation/moderation.js' -import { getClient } from '$lib/lemmy.js' +import { getClient } from '$lib/lemmy.svelte.js' import { generalizeCommentReport, generalizePostReport, @@ -18,7 +18,7 @@ export async function load({ url, fetch }) { const filter: ReportFilter = (url.searchParams.get('filter') as ReportFilter) || 'all' - const jwt = get(profile)?.jwt + const jwt = profile.data?.jwt if (!jwt) return { type: type, page: page } @@ -37,7 +37,7 @@ export async function load({ url, fetch }) { unresolved_only: type == 'unread', } - const admin = get(profile)?.user ? isAdmin(get(profile)!.user!) : false + const admin = profile.data?.user ? isAdmin(profile!.data.user!) : false const [posts, comments, messages] = await Promise.all([ client.listPostReports({ @@ -53,7 +53,7 @@ export async function load({ url, fetch }) { ...posts.post_reports.map(generalizePostReport), ...comments.comment_reports.map(generalizeCommentReport), ...(messages?.private_message_reports ?? []).map( - generalizePrivateMessageReport + generalizePrivateMessageReport, ), ].sort((a, b) => b.timestamp.getTime() - a.timestamp.getTime()) diff --git a/src/routes/moderation/Report.svelte b/src/routes/moderation/Report.svelte index d8e0cab8..9f4ba7ad 100644 --- a/src/routes/moderation/Report.svelte +++ b/src/routes/moderation/Report.svelte @@ -1,8 +1,8 @@ -{#if item.type == 'comment'} - -{:else if item.type == 'post'} - -{:else if item.type == 'message'} - -{/if} +
    +
    + Report from + + + +
    + + +
    + + + {#if item.type == 'comment'} + + {:else if item.type == 'post'} + + {:else if item.type == 'message'} + + {/if} +
    @@ -127,17 +160,4 @@
    {/if} -
    diff --git a/src/routes/modlog/+page.svelte b/src/routes/modlog/+page.svelte index d5b79756..232ee273 100644 --- a/src/routes/modlog/+page.svelte +++ b/src/routes/modlog/+page.svelte @@ -1,10 +1,12 @@ @@ -41,121 +48,115 @@
    + q={page.url.searchParams.get('instance') || ''} + onselect={(e) => searchParam( - $page.url, + page.url, 'instance', - e.detail?.domain.toString() ?? '', + e?.domain.toString() ?? '', 'page', 'community', 'user', - 'mod_id' + 'mod_id', )} /> - searchParam( - $page.url, - 'community', - e.detail?.id.toString() ?? '', - 'page' - )} + q={page.url.searchParams.get('community') ? 'Selected' : ''} + onselect={(e) => + searchParam(page.url, 'community', e?.id.toString() ?? '', 'page')} /> - searchParam($page.url, 'user', e.detail?.id.toString() ?? '', 'page')} + onselect={(e) => + searchParam(page.url, 'user', e?.id.toString() ?? '', 'page')} /> - {#if $profile?.user && isAdmin($profile?.user)} + {#if profile.data?.user && isAdmin(profile.data?.user)} - searchParam( - $page.url, - 'mod_id', - e.detail?.id.toString() ?? '', - 'page' - )} + onselect={(e) => + searchParam(page.url, 'mod_id', e?.id.toString() ?? '', 'page')} /> {/if}
    {#if data.modlog && data.modlog.length > 0} - {#if $userSettings.modlogCardView ?? !window.matchMedia('(min-width: 1600px)').matches} + {#if settings.modlogCardView ?? !window.matchMedia('(min-width: 1600px)').matches}
    {#each data.modlog as modlog} @@ -208,10 +209,7 @@
    {/if} - searchParam($page.url, 'page', e.detail.toString())} - /> + `?page=${page}`} /> {:else} publishedToDate(when).getTime() export const _toModLog = (item: ModAction): ModLog => { if ('mod_ban_from_community' in item) { + const expires = item.mod_ban_from_community.expires + ? `until ${new Date(item.mod_ban_from_community.expires).toLocaleString()}` + : 'permanently' return { moderator: item.moderator, moderatee: item.banned_person, @@ -83,7 +85,7 @@ export const _toModLog = (item: ModAction): ModLog => { actionName: item.mod_ban_from_community.banned ? 'banCommunity' : 'unbanCommunity', - reason: item.mod_ban_from_community.reason, + reason: `${item.mod_ban_from_community.reason ?? ''} (banned ${expires})`, timestamp: timestamp(item.mod_ban_from_community.when_), } } else if ('mod_remove_comment' in item) { @@ -179,12 +181,16 @@ export const _toModLog = (item: ModAction): ModLog => { reason: item.admin_purge_person.reason, } } else if ('mod_ban' in item) { + const expires = item.mod_ban.expires + ? `until ${new Date(item.mod_ban.expires).toLocaleString()}` + : 'permanently' + return { actionName: item.mod_ban.banned ? 'ban' : 'unban', timestamp: timestamp(item.mod_ban.when_), moderator: item.moderator, moderatee: item.banned_person, - reason: item.mod_ban.reason, + reason: `${item.mod_ban.reason ?? ''} (banned ${expires})`, link: `/u/${fullUserName(item.banned_person)}`, } } else if ('mod_add' in item) { @@ -252,7 +258,7 @@ export async function load({ url }) { filters: { user: user ? moderationActions[0]?.moderatee?.name : undefined, community: community ? moderationActions[0]?.community?.title : undefined, - moderator: modId ? moderationActions[0]?.moderator?.name : undefined - } + moderator: modId ? moderationActions[0]?.moderator?.name : undefined, + }, } } diff --git a/src/routes/modlog/ModlogAction.svelte b/src/routes/modlog/ModlogAction.svelte index e84afdf5..fc304585 100644 --- a/src/routes/modlog/ModlogAction.svelte +++ b/src/routes/modlog/ModlogAction.svelte @@ -16,12 +16,14 @@ } from 'svelte-hero-icons' import type { ActionName } from './+page.js' - export let action: ActionName + interface Props { + action: ActionName + } - $: actionData = getAction(action) + let { action }: Props = $props() const getAction = ( - action: ActionName + action: ActionName, ): { icon: IconSource; text: string; class: string } => { switch (action) { case 'ban': { @@ -151,6 +153,7 @@ class: '', } } + let actionData = $derived(getAction(action)) diff --git a/src/routes/modlog/item/ModlogItemCard.svelte b/src/routes/modlog/item/ModlogItemCard.svelte index ee119fff..7c38f032 100644 --- a/src/routes/modlog/item/ModlogItemCard.svelte +++ b/src/routes/modlog/item/ModlogItemCard.svelte @@ -9,7 +9,11 @@ import type { ModLog } from '../+page.js' import ModlogAction from '../ModlogAction.svelte' - export let item: ModLog + interface Props { + item: ModLog + } + + let { item }: Props = $props() diff --git a/src/routes/modlog/item/ModlogItemTable.svelte b/src/routes/modlog/item/ModlogItemTable.svelte index 6830cc45..338cf565 100644 --- a/src/routes/modlog/item/ModlogItemTable.svelte +++ b/src/routes/modlog/item/ModlogItemTable.svelte @@ -6,7 +6,11 @@ import type { ModLog } from '../+page.js' import ModlogAction from '../ModlogAction.svelte' - export let item: ModLog + interface Props { + item: ModLog + } + + let { item }: Props = $props() @@ -24,7 +28,8 @@ user={item.moderator} /> {:else} -

    Hidden

    +

    Hidden

    +

    {/if} diff --git a/src/routes/password_change/[token]/+error.svelte b/src/routes/password_change/[token]/+error.svelte index a980c10b..45db053e 100644 --- a/src/routes/password_change/[token]/+error.svelte +++ b/src/routes/password_change/[token]/+error.svelte @@ -1,5 +1,5 @@ @@ -13,5 +13,5 @@

    {$t('message.error')}

    - {$page.error?.message} + {page.error?.message}
    diff --git a/src/routes/password_change/[token]/+page.svelte b/src/routes/password_change/[token]/+page.svelte index 87ba6606..32632d8e 100644 --- a/src/routes/password_change/[token]/+page.svelte +++ b/src/routes/password_change/[token]/+page.svelte @@ -1,23 +1,29 @@ - {data.post.post_view.post.name} - - - - {#if isImage(data.post.post_view.post.url)} - - - {:else if data.post.post_view.post.thumbnail_url} + {data.post.value.post_view.post.name} + + + + {#if isImage(data.post.value.post_view.post.url)} + + + {:else if data.post.value.post_view.post.thumbnail_url} {/if} - {#if data.post.post_view.post.body} + {#if data.post.value.post_view.post.body} {/if} @@ -215,24 +225,25 @@ " > - + {#snippet target()} + + {/snippet} {$t('routes.post.instanceWarning')} {$t('routes.post.remoteView')} - {#if $profile?.jwt} + {#if profile.data?.jwt}
    -

    +

- {#if data.post.post_view.post.body} + {#if data.post.value.post_view.post.body}
- +
{/if}
+ bind:post={data.post.value.post_view} + onedit={() => toast({ content: 'The post was edited successfully.', type: 'success', })} - {type} />
- {#if data.post.cross_posts?.length > 0} + {#if data.post.value.cross_posts?.length > 0} -
- {data.post.cross_posts.length} - {$t('routes.post.crosspostCount')} -
+ {#snippet title()} +
+ {data.post.value.cross_posts.length} + {$t('routes.post.crosspostCount')} +
+
+ {/snippet}
- {#each data.post.cross_posts as crosspost} + {#each data.post.value.cross_posts as crosspost} {/each}
{/if} -{#if data.thread.showContext || data.thread.singleThread} +{#if data.thread.value.showContext || data.thread.value.singleThread}
-

- - {data.thread.showContext - ? $t('routes.post.thread.part') - : $t('routes.post.thread.single')} -

{/if} @@ -356,104 +369,45 @@
- + {$t('routes.post.commentCount')}
- {#await data.comments} -
- {#each new Array(10) as empty} -
-
-
-
+ {#if !page.url.searchParams.get('noVirtualize')} + + {/if} + {#await data.comments.value} +
+ {#each new Array(10) as empty, index} +
+
+
+
{/each}
{:then comments} - {#if $profile?.jwt} - {#if !commenting} - - - -
- - -
-
- {:else} - - (comments.comments = [ - comment.detail.comment_view, - ...comments.comments, - ])} - locked={(data.post.post_view.post.locked && - !( - $profile?.user?.local_user_view.local_user.admin || - $profile?.user?.moderates - .map((c) => c.community.id) - .includes(data.post.community_view.community.id) - )) || - $page.params.instance.toLowerCase() != $instance.toLowerCase()} - banned={data.post.community_view.banned_from_community} - on:focus={() => (commenting = true)} - tools={commenting} - preview={commenting} - placeholder={commenting ? undefined : $t('routes.post.addComment')} - rows={commenting ? 7 : 1} - on:cancel={() => (commenting = false)} - /> - {/if} - {/if} - - {#if commenting || !$profile.jwt} -
- - -
- {/if} - - !( - ($userSettings.hidePosts.deleted && c.comment.deleted) || - ($userSettings.hidePosts.removed && c.comment.removed) - ) - )} - scrollTo={data.thread.focus} + {#if comments.comments.length == 0} {/if} {/await} - {#if data.post.post_view.counts.comments > 5} + {#if data.post.value.post_view.counts.comments > 5} - {data.post.post_view.counts.comments} + {data.post.value.post_view.counts.comments} {$t('routes.post.commentCount')} - + {#snippet action()} + + {/snippet} {/if} - - diff --git a/src/routes/post/[instance]/[id=integer]/+page.ts b/src/routes/post/[instance]/[id=integer]/+page.ts index 8e33e773..b2bed0e6 100644 --- a/src/routes/post/[instance]/[id=integer]/+page.ts +++ b/src/routes/post/[instance]/[id=integer]/+page.ts @@ -1,13 +1,9 @@ -import { browser } from '$app/environment' -import { env } from '$env/dynamic/public' -import { profile } from '$lib/auth.js' import CommunityCard from '$lib/components/lemmy/community/CommunityCard.svelte' -import { getClient } from '$lib/lemmy.js' -import { awaitIfServer } from '$lib/promise.js' -import { SSR_ENABLED, userSettings } from '$lib/settings.js' -import { error } from '@sveltejs/kit' +import { getClient } from '$lib/lemmy.svelte.js' +import { awaitIfServer } from '$lib/promise.svelte.js' +import { SSR_ENABLED, settings } from '$lib/settings.svelte' import type { GetComments } from 'lemmy-js-client' -import { get } from 'svelte/store' +import { ReactiveState } from '$lib/promise.svelte.js' export async function load({ params, url, fetch }) { const thread = url.searchParams.get('thread') @@ -35,7 +31,7 @@ export async function load({ params, url, fetch }) { max_depth = 10 } - const sort = get(userSettings)?.defaultSort?.comments ?? 'Hot' + const sort = settings?.defaultSort?.comments ?? 'Hot' const commentParams: GetComments = { post_id: Number(params.id), @@ -54,14 +50,14 @@ export async function load({ params, url, fetch }) { }) return { - thread: { + thread: new ReactiveState({ showContext: showContext, singleThread: parentId != undefined, focus: thread?.split('.').at(-1), - }, - post: post, - commentSort: sort, - comments: (await awaitIfServer(comments)).data, + }), + post: new ReactiveState(post), + commentSort: new ReactiveState(sort), + comments: new ReactiveState((await awaitIfServer(comments)).data), slots: { sidebar: { component: CommunityCard, diff --git a/src/routes/post/[instance]/[id=integer]/CommentProvider.svelte b/src/routes/post/[instance]/[id=integer]/CommentProvider.svelte new file mode 100644 index 00000000..a3510c61 --- /dev/null +++ b/src/routes/post/[instance]/[id=integer]/CommentProvider.svelte @@ -0,0 +1,146 @@ + + +{#if profile.data?.jwt} + {#if !commenting} + + + + {#snippet action()} +
+ + +
+ {/snippet} +
+ {:else} + { + comments.comments = [comment.comment_view, ...comments.comments] + }} + locked={(post.post_view.post.locked && + !( + profile.data?.user?.local_user_view.local_user.admin || + profile.data?.user?.moderates + .map((c) => c.community.id) + .includes(post.community_view.community.id) + )) || + page.params.instance.toLowerCase() != instance.data.toLowerCase()} + banned={post.community_view.banned_from_community} + onfocus={() => (commenting = true)} + tools={commenting} + preview={commenting} + placeholder={commenting ? undefined : $t('routes.post.addComment')} + rows={commenting ? 7 : 1} + oncancel={() => (commenting = false)} + /> + {/if} +{/if} + +{#if commenting || !profile.data.jwt} +
+ + +
+{/if} +{#if virtualize} + +{:else} +
+
+ +
+
+{/if} diff --git a/src/routes/profile/(local_user)/+layout.svelte b/src/routes/profile/(local_user)/+layout.svelte index 4fa864ce..cd95eb01 100644 --- a/src/routes/profile/(local_user)/+layout.svelte +++ b/src/routes/profile/(local_user)/+layout.svelte @@ -1 +1,11 @@ - + + +{@render children?.()} diff --git a/src/routes/profile/(local_user)/blocks/+layout.svelte b/src/routes/profile/(local_user)/blocks/+layout.svelte deleted file mode 100644 index bfcd546b..00000000 --- a/src/routes/profile/(local_user)/blocks/+layout.svelte +++ /dev/null @@ -1,5 +0,0 @@ -
- -
diff --git a/src/routes/profile/(local_user)/blocks/+page.svelte b/src/routes/profile/(local_user)/blocks/+page.svelte index fea1d30f..e9f6897b 100644 --- a/src/routes/profile/(local_user)/blocks/+page.svelte +++ b/src/routes/profile/(local_user)/blocks/+page.svelte @@ -5,11 +5,10 @@ PersonBlockView, } from 'lemmy-js-client' import type { PageData } from './$types.js' - import EditableList from '$lib/components/ui/list/EditableList.svelte' import UserLink from '$lib/components/lemmy/user/UserLink.svelte' import SectionTitle from '$lib/components/ui/SectionTitle.svelte' - import { getClient } from '$lib/lemmy.js' - import { profile } from '$lib/auth.js' + import { getClient } from '$lib/lemmy.svelte.js' + import { profile } from '$lib/auth.svelte.js' import { Check, Icon, Trash, XMark } from 'svelte-hero-icons' import CommunityLink from '$lib/components/lemmy/community/CommunityLink.svelte' import { flip } from 'svelte/animate' @@ -21,19 +20,26 @@ import Switch from '$lib/components/input/Switch.svelte' import UserAutocomplete from '$lib/components/lemmy/user/UserAutocomplete.svelte' import { expoOut } from 'svelte/easing' + import Material from 'mono-svelte/materials/Material.svelte' + import Header from '$lib/components/ui/layout/pages/Header.svelte' - // sveltekit doesn't feel like making types work right now - export let data: PageData & { - person_blocks: PersonBlockView[] - community_blocks: CommunityBlockView[] + interface Props { + // sveltekit doesn't feel like making types work right now + data: PageData & { + person_blocks: PersonBlockView[] + community_blocks: CommunityBlockView[] + } } + let { data: pageData }: Props = $props() + let data = $state(pageData) + async function unblockUser(item: PersonBlockView) { - if (!$profile?.jwt) return + if (!profile.data?.jwt) return data.person_blocks.splice( data.person_blocks.findIndex((i) => i.target.id == item.target.id), - 1 + 1, ) // hack to get reactivity working data.person_blocks = data.person_blocks @@ -45,13 +51,13 @@ } async function unblockCommunity(item: CommunityBlockView) { - if (!$profile?.jwt) return + if (!profile.data?.jwt) return data.community_blocks.splice( data.community_blocks.findIndex( - (i) => i.community.id == item.community.id + (i) => i.community.id == item.community.id, ), - 1 + 1, ) // hack to get reactivity working @@ -64,14 +70,14 @@ } async function unblockInstances(item: InstanceBlockView) { - if (!$profile?.jwt) return + if (!profile.data?.jwt) return if (!data.my_user?.instance_blocks) return data.my_user.instance_blocks.splice( data.my_user.instance_blocks.findIndex( - (i) => i.instance.id == item.instance.id + (i) => i.instance.id == item.instance.id, ), - 1 + 1, ) data.my_user.instance_blocks = data.my_user.instance_blocks @@ -82,81 +88,102 @@ } +
+ {$t('routes.profile.blocks.title')} +
+ {#if data.community_blocks?.length > 0 || data.person_blocks?.length > 0 || (data.my_user?.instance_blocks?.length ?? 0) > 0} - {#if data.my_user?.instance_blocks && (data.my_user?.instance_blocks?.length ?? 0) > 0} -
- {$t('content.instances')} - unblockInstances(i.detail)}> - {#each data.my_user?.instance_blocks as block (block.instance.id)} -
- - -
- {/each} -
-
- {/if} {#if data.community_blocks?.length > 0} -
+
{$t('content.communities')} - unblockCommunity(i.detail)}> - {#each data.community_blocks as block (block.community.id)} -
- - -
- {/each} -
+ +
    + {#each data.community_blocks as block (block.community.id)} +
    + + +
    + {/each} +
+
{/if} {#if data.person_blocks?.length > 0} -
+
{$t('content.users')} - unblockUser(i.detail)}> - {#each data.person_blocks as block (block.target.id)} -
- - -
- {/each} -
+ +
    + {#each data.person_blocks as block (block.target.id)} +
    + + +
    + {/each} +
+
+
+ {/if} + {#if data.my_user?.instance_blocks && (data.my_user?.instance_blocks?.length ?? 0) > 0} +
+ + {$t('content.instances')} + + +
    + {#each data.my_user?.instance_blocks as block (block.instance.id)} +
    + + +
    + {/each} +
+
{/if} {:else} diff --git a/src/routes/profile/(local_user)/password/+layout.svelte b/src/routes/profile/(local_user)/password/+layout.svelte index f2c2c350..e95b5dd9 100644 --- a/src/routes/profile/(local_user)/password/+layout.svelte +++ b/src/routes/profile/(local_user)/password/+layout.svelte @@ -4,7 +4,14 @@ import SidebarButton from '$lib/components/ui/sidebar/SidebarButton.svelte' import Header from '$lib/components/ui/layout/pages/Header.svelte' - import { page } from '$app/stores' + import { page } from '$app/state' + /** + * @typedef {Object} Props + * @property {import('svelte').Snippet} [children] + */ + + /** @type {Props} */ + let { children } = $props() const routes = [ { @@ -31,7 +38,7 @@
- {routes.find((r) => $page.url.pathname == r.url)?.name} + {routes.find((r) => page.url.pathname == r.url)?.name}
- + {@render children?.()}
diff --git a/src/routes/profile/(local_user)/password/+page.svelte b/src/routes/profile/(local_user)/password/+page.svelte index d0461323..0c448ac4 100644 --- a/src/routes/profile/(local_user)/password/+page.svelte +++ b/src/routes/profile/(local_user)/password/+page.svelte @@ -10,7 +10,7 @@ UserGroup, } from 'svelte-hero-icons' - export let data + let { data } = $props()
import { goto } from '$app/navigation' - import { page } from '$app/stores' + import { page } from '$app/state' import Header from '$lib/components/ui/layout/pages/Header.svelte' - import { client } from '$lib/lemmy.js' + import { client } from '$lib/lemmy.svelte.js' import { t } from '$lib/translations.js' import { qr } from '@svelte-put/qr/svg' import { Button, Material, TextInput, toast } from 'mono-svelte' import { ClipboardDocument, Icon } from 'svelte-hero-icons' - export let data + let { data } = $props() // @ts-ignore - let totpLink: string | undefined = undefined - $: totpEnabled = - data.my_user?.local_user_view.local_user.totp_2fa_enabled ?? totpLink + let totpLink: string | undefined = $state(undefined) + let totpEnabled = $state( + data.my_user?.local_user_view.local_user.totp_2fa_enabled, + ) - let verify_totp = '' + let verify_totp = $state('') async function twofa(enabled: boolean, update: boolean = false) { try { @@ -30,7 +31,7 @@ type: 'success', }) - goto($page.url, { invalidateAll: true }) + goto(page.url, { invalidateAll: true }) } else { const res = await client().generateTotpSecret() totpLink = res.totp_secret_url @@ -59,17 +60,18 @@ value={totpLink} label={$t('form.profile.2fa.totp')} > - + {#snippet suffix()} + + {/snippet} {$t('form.profile.2fa.paste')} @@ -77,7 +79,7 @@ {/if} {}} + onsubmit={(e) => e.preventDefault()} > {#if totpEnabled} - {:else} - {/if} {:else} - {/if} diff --git a/src/routes/profile/(local_user)/password/change/+page.svelte b/src/routes/profile/(local_user)/password/change/+page.svelte index caf2b08a..4c7a7ad6 100644 --- a/src/routes/profile/(local_user)/password/change/+page.svelte +++ b/src/routes/profile/(local_user)/password/change/+page.svelte @@ -1,15 +1,17 @@ -
+ import { goto } from '$app/navigation' - import { profileData, setUserID } from '$lib/auth' + import { profileData, setUserID } from '$lib/auth.svelte' import Header from '$lib/components/ui/layout/pages/Header.svelte' - import { client } from '$lib/lemmy' + import { client } from '$lib/lemmy.svelte' import { t } from '$lib/translations' import { Button, @@ -15,11 +15,11 @@ toast, } from 'mono-svelte' - let deletion = { + let deletion = $state({ modal: false, password: '', deleteContent: false, - } + }) async function deleteAccount(level: number) { switch (level) { @@ -70,14 +70,9 @@ delete_content: deletion.deleteContent, }) - profileData.update((pd) => { - pd.profiles.splice( - pd.profiles.findIndex((p) => pd.profile == p.id), - 1 - ) - - return pd - }) + profileData.profiles.splice( + profileData.profiles.findIndex((p) => profileData.profile == p.id), + ) setUserID(-1) toast({ @@ -99,9 +94,11 @@ deleteAccount(4)} + onaction={() => deleteAccount(4)} > - {$t('form.profile.deleteAccount.label')} + {#snippet customTitle()} + {$t('form.profile.deleteAccount.label')} + {/snippet} {$t('form.profile.deleteAccount.deleteContent')} - - {$t('form.profile.deleteAccount.warning')} - + {#snippet description()} + + {$t('form.profile.deleteAccount.warning')} + + {/snippet} {/if} @@ -130,11 +129,13 @@

{$t('form.profile.deleteAccount.deleteContent')} - - {$t('form.profile.deleteAccount.warning')} - + {#snippet description()} + + {$t('form.profile.deleteAccount.warning')} + + {/snippet} - diff --git a/src/routes/profile/(local_user)/password/logins/+page.svelte b/src/routes/profile/(local_user)/password/logins/+page.svelte index 7f7350f8..83e1edac 100644 --- a/src/routes/profile/(local_user)/password/logins/+page.svelte +++ b/src/routes/profile/(local_user)/password/logins/+page.svelte @@ -1,17 +1,17 @@ - User Agent IP Date @@ -41,10 +40,6 @@ {#each data.tokens as token} {@const ua = new UAParser(token.user_agent).getResult()} - - - -
{ua.os.name} {ua.os.version}
{ua.browser.name}
diff --git a/src/routes/profile/(local_user)/password/logins/+page.ts b/src/routes/profile/(local_user)/password/logins/+page.ts index bb97d8c1..89058835 100644 --- a/src/routes/profile/(local_user)/password/logins/+page.ts +++ b/src/routes/profile/(local_user)/password/logins/+page.ts @@ -1,4 +1,4 @@ -import { client } from '$lib/lemmy.js' +import { client } from '$lib/lemmy.svelte.js' export async function load({ fetch, parent }) { const user = await parent() diff --git a/src/routes/profile/(local_user)/settings/+page.svelte b/src/routes/profile/(local_user)/settings/+page.svelte index f498ea22..a895becf 100644 --- a/src/routes/profile/(local_user)/settings/+page.svelte +++ b/src/routes/profile/(local_user)/settings/+page.svelte @@ -1,37 +1,64 @@ - + {#if !inline}
{$t('routes.profile.settings')}
{/if} - + {@render children?.()} {#if data.my_user?.local_user_view?.local_user && formData} formData.bio ?? '', (v) => (formData.bio = v)} label={$t('form.profile.bio')} previewButton /> @@ -98,6 +125,52 @@ {$t('form.profile.showRead')} +
+ + {$t('form.profile.languages.title')} + +

{$t('form.profile.languages.description')}

+ + {#if site.data && formData.discussion_languages} +
+ + {#snippet target()} + + {/snippet} + {#each site.data.all_languages.filter((l) => !formData.discussion_languages?.includes(l.id)) as language, index} + { + formData.discussion_languages?.push(language.id) + }} + > + {language.name} + + {/each} + + {#each formData.discussion_languages as languageId, index} + {@const language = site.data.all_languages.find( + (l) => l.id == languageId, + )} + + {/each} +
+ {/if} +
+
+ {#snippet target()} + + {/snippet} - + {#snippet prefix()} + + {/snippet} {$t('routes.profile.media.title')} - + {#snippet prefix()} + + {/snippet} {$t('routes.profile.upvoted')} - + {#snippet prefix()} + + {/snippet} {$t('routes.profile.downvoted')} {/if}
- + {@render children?.()}
diff --git a/src/routes/profile/+layout.ts b/src/routes/profile/+layout.ts index ca838252..99ce4da4 100644 --- a/src/routes/profile/+layout.ts +++ b/src/routes/profile/+layout.ts @@ -1,5 +1,5 @@ -import { profile } from '$lib/auth.js' -import { client, getClient } from '$lib/lemmy.js' +import { profile } from '$lib/auth.svelte' +import { client, getClient } from '$lib/lemmy.svelte.js' import { getItemPublished } from '$lib/lemmy/item.js' import type { SortType } from 'lemmy-js-client' import { get } from 'svelte/store' @@ -9,8 +9,8 @@ export let ssr = false export async function load({ params, url, fetch }) { const my_user = - get(profile)?.user ?? - (await client({ auth: get(profile)?.jwt, func: fetch }).getSite()).my_user + // profile.data?.user ?? + (await client({ auth: profile.data?.jwt, func: fetch }).getSite()).my_user return { my_user: my_user, diff --git a/src/routes/profile/+page.svelte b/src/routes/profile/+page.svelte index 7a6b64e7..33b6bdb0 100644 --- a/src/routes/profile/+page.svelte +++ b/src/routes/profile/+page.svelte @@ -1,7 +1,5 @@
@@ -53,38 +42,37 @@ }, ]} > - - @ - - - {#if (data.moderates ?? []).length > 0} - - - + {#snippet nameDetail()} + + @ + + + {/snippet} + {#if data.moderates && data.moderates.length > 0} + + {#snippet title()} {$t('routes.profile.moderates')} - +
+ {/snippet} ({ + items={data.moderates.map((m) => ({ id: m.community.id, name: m.community.title, url: communityLink(m.community), avatar: m.community.icon, instance: new URL(m.community.actor_id).hostname, - })) ?? []} + }))} />
{/if} -{#if $userSettings.debugInfo} +{#if settings.debugInfo}
   {JSON.stringify(my_user, undefined, 4)}
 
diff --git a/src/routes/profile/media/+page.svelte b/src/routes/profile/media/+page.svelte index 82a50498..52175a9e 100644 --- a/src/routes/profile/media/+page.svelte +++ b/src/routes/profile/media/+page.svelte @@ -1,14 +1,14 @@
{$t('routes.profile.media.title')}
@@ -17,14 +17,14 @@
{ + ondelete={() => { data.images = data.images.toSpliced( data.images.findIndex( (i) => i.local_image.pictrs_delete_token == - image.local_image.pictrs_delete_token + image.local_image.pictrs_delete_token, ), - 1 + 1, ) }} /> @@ -33,10 +33,8 @@
{#if data.images.length == 20} { - searchParam($page.url, 'page', p.detail.toString()) - }} + page={Number(page.url.searchParams.get('page')) || 1} + href={(page) => `?page=${page}`} /> {/if} diff --git a/src/routes/profile/media/+page.ts b/src/routes/profile/media/+page.ts index adc9fc39..61600505 100644 --- a/src/routes/profile/media/+page.ts +++ b/src/routes/profile/media/+page.ts @@ -1,10 +1,8 @@ -import { profile } from '$lib/auth.js' -import { client } from '$lib/lemmy.js' -import { error } from '@sveltejs/kit' -import { get } from 'svelte/store' +import { profile } from '$lib/auth.svelte' +import { client } from '$lib/lemmy.svelte.js' export async function load({ fetch, url }) { - const { jwt } = get(profile) + const { jwt } = profile.data let page = Number(url.searchParams.get('page')) || 1 diff --git a/src/routes/profile/media/PictrsImage.svelte b/src/routes/profile/media/PictrsImage.svelte index 074362b6..b9067408 100644 --- a/src/routes/profile/media/PictrsImage.svelte +++ b/src/routes/profile/media/PictrsImage.svelte @@ -1,22 +1,20 @@
diff --git a/src/routes/profile/user/+page.svelte b/src/routes/profile/user/+page.svelte index aeb2a7ac..48eeef85 100644 --- a/src/routes/profile/user/+page.svelte +++ b/src/routes/profile/user/+page.svelte @@ -1,18 +1,21 @@ {#if data.user && data.sort && data.type && data.page} {:else} diff --git a/src/routes/profile/user/+page.ts b/src/routes/profile/user/+page.ts index 2219cf31..729a287c 100644 --- a/src/routes/profile/user/+page.ts +++ b/src/routes/profile/user/+page.ts @@ -1,8 +1,6 @@ -import { profile } from '$lib/auth.js' -import { getClient } from '$lib/lemmy.js' +import { getClient } from '$lib/lemmy.svelte.js' import { getItemPublished } from '$lib/lemmy/item.js' import type { SortType } from 'lemmy-js-client' -import { get } from 'svelte/store' export async function load({ url, fetch, parent }) { const page = Number(url.searchParams.get('page')) || 1 @@ -26,12 +24,12 @@ export async function load({ url, fetch, parent }) { (a, b) => b.counts.upvotes - b.counts.downvotes - - (a.counts.upvotes - a.counts.downvotes) + (a.counts.upvotes - a.counts.downvotes), ) } else if (sort == 'New') { items.sort( (a, b) => - Date.parse(getItemPublished(b)) - Date.parse(getItemPublished(a)) + Date.parse(getItemPublished(b)) - Date.parse(getItemPublished(a)), ) } diff --git a/src/routes/profile/voted/[type]/+page.svelte b/src/routes/profile/voted/[type]/+page.svelte index faef4cab..d3095db2 100644 --- a/src/routes/profile/voted/[type]/+page.svelte +++ b/src/routes/profile/voted/[type]/+page.svelte @@ -5,15 +5,16 @@ import Header from '$lib/components/ui/layout/pages/Header.svelte' import { t } from '$lib/translations' - export let data + let { data = $bindable() } = $props() + + const SvelteComponent = $derived(browser ? VirtualFeed : PostFeed)
{data.upvoted ? $t('routes.profile.upvoted') : $t('routes.profile.downvoted')}
- + import { run } from 'svelte/legacy' + import type { CommentView, PostView } from 'lemmy-js-client' import Post from '$lib/components/lemmy/post/Post.svelte' import { fly } from 'svelte/transition' import CommentItem from '$lib/components/lemmy/comment/CommentItem.svelte' - import { userSettings } from '$lib/settings.js' + import { settings } from '$lib/settings.svelte.js' import Pageination from '$lib/components/ui/Pageination.svelte' - import { searchParam } from '$lib/util.js' - import { page } from '$app/stores' + import { searchParam } from '$lib/util.svelte.js' + import { page } from '$app/state' import Placeholder from '$lib/components/ui/Placeholder.svelte' import { Bookmark } from 'svelte-hero-icons' import { t } from '$lib/translations.js' import Header from '$lib/components/ui/layout/pages/Header.svelte' import Tabs from '$lib/components/ui/layout/pages/Tabs.svelte' - import { contentPadding } from '$lib/components/ui/layout/Shell.svelte' import { Select } from 'mono-svelte' import { Icon, @@ -21,11 +22,11 @@ ChatBubbleOvalLeft, AdjustmentsHorizontal, } from 'svelte-hero-icons' + import Option from 'mono-svelte/forms/select/Option.svelte' - export let data + let { data } = $props() - // svelte being stupid - $: type = data.type as any + let type = $state(data.type)! const isComment = (item: CommentView | PostView): item is CommentView => 'comment' in item @@ -38,34 +39,33 @@
{$t('routes.saved')} -
- -
+ {#snippet extended()} +
+ +
+ {/snippet}
{#if !data.data || (data.data?.length ?? 0) == 0} -
+
- searchParam($page.url, 'page', p.detail.toString())} - page={data.page} - /> + `?page=${page}`} page={data.page} />
diff --git a/src/routes/saved/+page.ts b/src/routes/saved/+page.ts index bab82970..31634890 100644 --- a/src/routes/saved/+page.ts +++ b/src/routes/saved/+page.ts @@ -1,13 +1,6 @@ -import { profile } from '$lib/auth.js' -import { getClient } from '$lib/lemmy.js' -import type { - CommentSortType, - CommentView, - ListingType, - PostView, - SortType, -} from 'lemmy-js-client' -import { get } from 'svelte/store' +import { profile } from '$lib/auth.svelte' +import { getClient } from '$lib/lemmy.svelte.js' +import type { CommentView, ListingType, PostView } from 'lemmy-js-client' function getSavedItemPublished(item: PostView | CommentView) { if ('comment' in item) { @@ -18,7 +11,7 @@ function getSavedItemPublished(item: PostView | CommentView) { } export async function load({ url, fetch }) { - if (!get(profile)) return { posts: [], page: 0 } + if (!profile) return { posts: [], page: 0 } const page = Number(url.searchParams.get('page')) || 1 const type: 'comments' | 'posts' | 'all' = (url.searchParams.get('type') as 'comments' | 'posts' | 'all') || 'all' @@ -44,7 +37,7 @@ export async function load({ url, fetch }) { const everything = [...posts.posts, ...comments.comments].sort( (a, b) => Date.parse(getSavedItemPublished(b)) - - Date.parse(getSavedItemPublished(a)) + Date.parse(getSavedItemPublished(a)), ) return { page: page, data: everything, type: type } diff --git a/src/routes/search/+page.svelte b/src/routes/search/+page.svelte index acabdcc2..598be0b0 100644 --- a/src/routes/search/+page.svelte +++ b/src/routes/search/+page.svelte @@ -1,6 +1,8 @@ { + onkeydown={(e) => { if (e.target == document.body) searchElement?.focus() }} /> @@ -63,84 +67,107 @@
{$t('routes.search.title')}
-
- - - searchParam($page.url, 'q', query, 'page')} - class="flex gap-2 flex-row items-center w-full text-base h-10" + +
+ +
+ + +
+
+
+
+ searchParam($page.url, 'type', data.type ?? 'All', 'page')} - > - - - {$t('filter.type')} - - - - - - - - - -
+ {#snippet customLabel()} + + + {$t('filter.type')} + + {/snippet} + + + + + + + form?.requestSubmit()} + /> + +
+ {#if moreOptions}
- searchParam($page.url, 'community', c.detail?.id || undefined, 'page')} + onselect={(c) => + searchParam(page.url, 'community', c?.id || undefined, 'page')} />
{/if} {#if !data.results} - + {#if navigating.to?.route.id == '/search'} +
+ {#each new Array(5) as _, index} +
+ +
+ {/each} +
+ {:else} +
+ +
+ {/if} {:else} {#await data.streamed.object}
- {#each data.results as result} + {#each data.results.value as result} {#if isPostView(result)} {:else if isCommentView(result)} @@ -201,11 +226,8 @@ {/if} {/each}
-
- {#if data.results.length > 0} - searchParam($page.url, 'page', p.detail.toString())} - /> +
+ {#if data.results.value.length > 0} + `?page=${page}`} /> {/if} {/if} diff --git a/src/routes/search/+page.ts b/src/routes/search/+page.ts index e6cc0b92..ce00e89c 100644 --- a/src/routes/search/+page.ts +++ b/src/routes/search/+page.ts @@ -1,6 +1,7 @@ -import { profile } from '$lib/auth.js' -import { client, getClient } from '$lib/lemmy.js' +import { profile } from '$lib/auth.svelte' +import { client, getClient } from '$lib/lemmy.svelte.js' import { getItemPublished } from '$lib/lemmy/item.js' +import { ReactiveState } from '$lib/promise.svelte.js' import type { CommentView, CommunityView, @@ -46,18 +47,20 @@ export async function load({ url, fetch }) { everything.sort( (a, b) => new Date(getItemPublished(b)).getTime() - - new Date(getItemPublished(a)).getTime() + new Date(getItemPublished(a)).getTime(), ) } return { - type: type, - sort: sort, - page: page, - query: query, - results: everything, + filters: new ReactiveState({ + type: type, + sort: sort, + page: page, + query: query, + })!, + results: new ReactiveState(everything), streamed: { - object: get(profile)?.jwt + object: profile.data?.jwt ? getClient(undefined, fetch).resolveObject({ q: query, }) @@ -67,9 +70,11 @@ export async function load({ url, fetch }) { } return { - page: 1, - sort: sort, - type: type, - query: query, + filters: new ReactiveState({ + page: 1, + sort: sort, + type: type, + query: query, + }), } } diff --git a/src/routes/settings/+page.svelte b/src/routes/settings/+page.svelte index 5c53aff2..0d9a89e2 100644 --- a/src/routes/settings/+page.svelte +++ b/src/routes/settings/+page.svelte @@ -1,5 +1,5 @@
{/if}
diff --git a/src/routes/settings/Setting.svelte b/src/routes/settings/Setting.svelte index d37bb576..4fb6d001 100644 --- a/src/routes/settings/Setting.svelte +++ b/src/routes/settings/Setting.svelte @@ -8,59 +8,83 @@ Icon, } from 'svelte-hero-icons' - export let vertical: boolean = false - - export let supportedPlatforms = { - desktop: true, - tablet: true, - mobile: true, + interface Props { + supportedPlatforms?: any + mainClass?: string + itemsClass?: string + optionClass?: string + class?: string + title?: import('svelte').Snippet + description?: import('svelte').Snippet + children?: import('svelte').Snippet } + + let { + supportedPlatforms = { + desktop: true, + tablet: true, + mobile: true, + }, + mainClass = '', + itemsClass = '', + optionClass = '', + class: clazz = '', + title, + description, + children, + }: Props = $props()
{#if Object.values(supportedPlatforms).some((v) => v == false)}
{#if supportedPlatforms.desktop} - + {#snippet icon()} + + {/snippet} {$t('settings.desktop')} {/if} {#if supportedPlatforms.tablet} - + {#snippet icon()} + + {/snippet} {$t('settings.tablet')} {/if} {#if supportedPlatforms.mobile} - + {#snippet icon()} + + {/snippet} {$t('settings.mobile')} {/if}
{/if}
-

- {#if $$slots.description} -

- -

+

{@render title?.()}

+ {#if description} +
+ {@render description?.()} +
{/if}
- {#if $$slots.default} + {#if children}
- + {@render children?.()}
{/if}
diff --git a/src/routes/settings/ToggleSetting.svelte b/src/routes/settings/ToggleSetting.svelte index e4102b8b..e2c8f030 100644 --- a/src/routes/settings/ToggleSetting.svelte +++ b/src/routes/settings/ToggleSetting.svelte @@ -9,16 +9,25 @@ Icon, } from 'svelte-hero-icons' - export let title: string - export let description: string | undefined = undefined - export let checked: boolean = false - export let beta = false - - export let supportedPlatforms = { - desktop: true, - tablet: true, - mobile: true, + interface Props { + title: string + description?: string | undefined + checked?: boolean + beta?: boolean + supportedPlatforms?: any } + + let { + title, + description = undefined, + checked = $bindable(false), + beta = false, + supportedPlatforms = { + desktop: true, + tablet: true, + mobile: true, + }, + }: Props = $props()
@@ -30,19 +39,25 @@ {#if Object.values(supportedPlatforms).some((v) => v == false)} {#if supportedPlatforms.desktop} - + {#snippet icon()} + + {/snippet} {$t('settings.desktop')} {/if} {#if supportedPlatforms.tablet} - + {#snippet icon()} + + {/snippet} {$t('settings.tablet')} {/if} {#if supportedPlatforms.mobile} - + {#snippet icon()} + + {/snippet} {$t('settings.mobile')} {/if} @@ -56,7 +71,7 @@ >

{title}

{#if description} -

+

{description}

{/if} diff --git a/src/routes/settings/nav/NavItem.svelte b/src/routes/settings/nav/NavItem.svelte index bd831afc..d9e4f0ab 100644 --- a/src/routes/settings/nav/NavItem.svelte +++ b/src/routes/settings/nav/NavItem.svelte @@ -1,9 +1,14 @@ - - - - - {title} - + {#snippet target()} +
+ {@render children?.()} + + {/snippet} + {#snippet popover()} + + {title} + + {/snippet}
diff --git a/src/routes/signup/+page.svelte b/src/routes/signup/+page.svelte index 9f0c66fe..1d963a10 100644 --- a/src/routes/signup/+page.svelte +++ b/src/routes/signup/+page.svelte @@ -1,4 +1,4 @@ - {#if importing} { + onaction={() => { try { if (importText == '') { throw new Error('Import is empty') } - $theme.colors = JSON.parse(importText) + themeData.current.colors = JSON.parse(importText) toast({ content: $t('message.success'), type: 'success' }) importing = false } catch (err) { @@ -70,20 +70,20 @@ class="grid grid-cols-1 @md:grid-cols-2 @xl:grid-cols-3 @3xl:grid-cols-4 gap-2" > - {#each $themeData.themes as theme} - + {#each themeData.data.themes as theme, index} + {/each}
- {#if $theme.id <= 0} + {#if themeData.current.id <= 0} {$t('routes.theme.preset.description')} {/if}

{$t('routes.theme.accent')}

{ - $theme.colors.primary[900] = e.detail + value={themeData.current.colors.primary?.[900]} + onchange={(e) => { + themeData.current.colors.primary[900] = e }} - backgroundColor={defaultColors.primary[900]} - on:contextmenu={(e) => { + oncontextmenu={(e) => { e.preventDefault() - $theme.colors.primary[900] = + themeData.current.colors.primary[900] = // @ts-ignore defaultColors.primary[900] @@ -180,14 +184,13 @@ class="!w-12 !h-12 col-span-1" /> { - $theme.colors.primary[100] = e.detail + value={themeData.current.colors.primary?.[100]} + onchange={(e) => { + themeData.current.colors.primary[100] = e }} - backgroundColor={defaultColors.primary[100]} - on:contextmenu={(e) => { + oncontextmenu={(e) => { e.preventDefault() - $theme.colors.primary[100] = + themeData.current.colors.primary[100] = // @ts-ignore defaultColors.primary[100] @@ -211,13 +214,13 @@
{ - $theme.colors[category][shade] = e.detail + bind:value={themeData.current.colors[category][shade]} + onchange={(e) => { + themeData.current.colors[category][shade] = e }} - on:contextmenu={(e) => { + oncontextmenu={(e) => { e.preventDefault() - $theme.colors[category][shade] = + themeData.current.colors[category][shade] = // @ts-ignore defaultColors[category][shade] diff --git a/src/routes/theme/ColorSwatch.svelte b/src/routes/theme/ColorSwatch.svelte index b2a7338e..9cf8b24c 100644 --- a/src/routes/theme/ColorSwatch.svelte +++ b/src/routes/theme/ColorSwatch.svelte @@ -1,22 +1,31 @@
dispatch('change', hexToRgb(value))} - on:contextmenu + onchange={() => onchange?.(hexToRgb(value))} + {oncontextmenu} />
diff --git a/src/routes/theme/ThemePreset.svelte b/src/routes/theme/ThemePreset.svelte index 5ca1beee..eeb4f8d0 100644 --- a/src/routes/theme/ThemePreset.svelte +++ b/src/routes/theme/ThemePreset.svelte @@ -1,18 +1,28 @@ -
- {#if theme.id == $themeData.currentTheme} + {#if theme.id == themeData.data.currentTheme} {#if editingName} -
(editingName = false)}> + (editingName = false))}>
{:else} {/if}
diff --git a/src/routes/u/[name]/+page.svelte b/src/routes/u/[name]/+page.svelte index 4af25c64..fbebd625 100644 --- a/src/routes/u/[name]/+page.svelte +++ b/src/routes/u/[name]/+page.svelte @@ -15,20 +15,19 @@ } from 'svelte-hero-icons' import CommentItem from '$lib/components/lemmy/comment/CommentItem.svelte' import Pageination from '$lib/components/ui/Pageination.svelte' - import { page } from '$app/stores' + import { page } from '$app/state' import { goto } from '$app/navigation' import { isCommentView } from '$lib/lemmy/item.js' - import { client, getClient } from '$lib/lemmy.js' + import { client, getClient } from '$lib/lemmy.svelte.js' import { isBlocked } from '$lib/lemmy/user.js' import { Menu, MenuButton, removeToast, toast } from 'mono-svelte' import UserLink from '$lib/components/lemmy/user/UserLink.svelte' - import { profile } from '$lib/auth.js' + import { profile } from '$lib/auth.svelte.js' import { ban, isAdmin } from '$lib/components/lemmy/moderation/moderation.js' import ShieldIcon from '$lib/components/lemmy/moderation/ShieldIcon.svelte' - import { searchParam } from '$lib/util.js' + import { searchParam } from '$lib/util.svelte.js' import Placeholder from '$lib/components/ui/Placeholder.svelte' import { Button, Modal, Select } from 'mono-svelte' - import PrivateMessageModal from '$lib/components/lemmy/modal/PrivateMessageModal.svelte' import Expandable from '$lib/components/ui/Expandable.svelte' import { communityLink } from '$lib/lemmy/generic.js' import ItemList from '$lib/components/lemmy/generic/ItemList.svelte' @@ -36,18 +35,29 @@ import EntityHeader from '$lib/components/ui/EntityHeader.svelte' import { publishedToDate } from '$lib/components/util/date.js' import { formatRelativeDate } from '$lib/components/util/RelativeDate.svelte' + import Option from 'mono-svelte/forms/select/Option.svelte' + import type { PageData } from './$types' + import Header from '$lib/components/ui/layout/pages/Header.svelte' - export let data - export let inline: boolean = false + interface Props { + data: PageData + inline?: boolean + } + + let { data: pageData, inline = false }: Props = $props() + + let data = $state(pageData) let blocking = false + let sortForm = $state() async function blockUser(block: number) { - if (!$profile?.user || !$profile?.jwt) throw new Error('Unauthenticated') + if (!profile.data?.user || !profile.data?.jwt) + throw new Error('Unauthenticated') blocking = true try { - const blocked = isBlocked($profile.user, block) + const blocked = isBlocked(profile.data.user, block) await getClient().blockPerson({ block: !blocked, @@ -55,10 +65,10 @@ }) if (blocked) { - const index = $profile.user.person_blocks + const index = profile.data.user.person_blocks .map((p) => p.target.id) .indexOf(block) - $profile.user.person_blocks.splice(index, 1) + profile.data.user.person_blocks.splice(index, 1) } toast({ @@ -66,7 +76,7 @@ type: 'success', }) - goto($page.url, { + goto(page.url, { invalidateAll: true, }) } catch (err) { @@ -78,16 +88,18 @@ blocking = false } - let messaging = false + let messaging = $state(false) - let purgingUser = false - let purgeEnabled = false - $: if (purgingUser) { - purgeEnabled = false - setTimeout(() => { - purgeEnabled = true - }, 3000) - } + let purgingUser = $state(false) + let purgeEnabled = $state(false) + $effect(() => { + if (purgingUser) { + purgeEnabled = false + setTimeout(() => { + purgeEnabled = true + }, 3000) + } + }) async function purgeUser() { purgingUser = false @@ -109,16 +121,11 @@ {data.person_view.person.name} -{#if $profile?.user} - -{/if} - {#if purgingUser} - Purging User + {#snippet customTitle()} + Purging User + {/snippet}

Purging user {data.person_view.person.name} @@ -128,13 +135,13 @@ Are you sure you want to do this? (The button will enable in 3 seconds.)

- - {#if data.person_view.person.matrix_user_id} + {/snippet} + {#if (data.moderates ?? []).length > 0} + + {#snippet title()} + {$t('routes.profile.moderates')} +
+ {/snippet} + ({ + id: m.community.id, + name: m.community.title, + url: communityLink(m.community), + avatar: m.community.icon, + instance: new URL(m.community.actor_id).hostname, + }))} + /> +
+ {/if} + {#snippet actions()} + {#if profile.data?.user && profile.data.jwt && data.person_view.person.id != profile.data.user.local_user_view.person.id} +
- {/if} - {#if isAdmin($profile?.user)} - - + {/if} + {#if isAdmin(profile.data?.user)} + + {#snippet target()} + + {/snippet} + + ban( + data.person_view.person.banned, + data.person_view.person, + )} + > + {#snippet prefix()} + + {/snippet} + {data.person_view.person.banned ? 'Unban' : 'Ban'} + + (purgingUser = !purgingUser)} + > + {#snippet prefix()} + + {/snippet} + Purge + + + {/if} + + {#snippet target()} + + {/snippet} - ban( - data.person_view.person.banned, - data.person_view.person - )} + onclick={() => blockUser(data.person_view.person.id)} > - - {data.person_view.person.banned ? 'Unban' : 'Ban'} - - (purgingUser = !purgingUser)} - > - - Purge + {#snippet prefix()} + + {/snippet} + {isBlocked(profile.data.user, data.person_view.person.id) + ? 'Unblock' + : 'Block'} - {/if} - - - blockUser(data.person_view.person.id)} - > - - {isBlocked($profile.user, data.person_view.person.id) - ? 'Unblock' - : 'Block'} - - -
- {/if} - - -
+
+ {/if} + {/snippet} + +
+
{/if}
-
+
-
- {#if data.items.length == 0} + + {#if data.items.value.length == 0} - {#each data.items as item} - {#if isCommentView(item) && (data.type == 'all' || data.type == 'comments')} + {#each data.items.value as item} + {#if isCommentView(item) && (data.filters.value.type == 'all' || data.filters.value.type == 'comments')} - {:else if !isCommentView(item) && (data.type == 'all' || data.type == 'posts')} + {:else if !isCommentView(item) && (data.filters.value.type == 'all' || data.filters.value.type == 'posts')} {/if} {/each}
{/if} searchParam($page.url, 'page', p.detail.toString())} + bind:page={data.filters.value.page} + href={(page) => `?page=${page}`} />
diff --git a/src/routes/u/[name]/+page.ts b/src/routes/u/[name]/+page.ts index 2376afbc..3f1a96fe 100644 --- a/src/routes/u/[name]/+page.ts +++ b/src/routes/u/[name]/+page.ts @@ -1,8 +1,7 @@ -import { profile } from '$lib/auth.js' -import { getClient } from '$lib/lemmy.js' +import { getClient } from '$lib/lemmy.svelte.js' import { getItemPublished } from '$lib/lemmy/item.js' +import { ReactiveState } from '$lib/promise.svelte.js' import type { SortType } from 'lemmy-js-client' -import { get } from 'svelte/store' export async function load({ params, url, fetch }) { const page = Number(url.searchParams.get('page')) || 1 @@ -24,21 +23,23 @@ export async function load({ params, url, fetch }) { (a, b) => b.counts.upvotes - b.counts.downvotes - - (a.counts.upvotes - a.counts.downvotes) + (a.counts.upvotes - a.counts.downvotes), ) } else if (sort == 'New') { items.sort( (a, b) => - Date.parse(getItemPublished(b)) - Date.parse(getItemPublished(a)) + Date.parse(getItemPublished(b)) - Date.parse(getItemPublished(a)), ) } return { - type: type, - page: page, - sort: sort, + filters: new ReactiveState({ + type: type, + page: page, + sort: sort, + }), person_view: user.person_view, moderates: user.moderates, - items, + items: new ReactiveState(items), } } diff --git a/src/routes/util/+layout.svelte b/src/routes/util/+layout.svelte index 77d4e04b..77193853 100644 --- a/src/routes/util/+layout.svelte +++ b/src/routes/util/+layout.svelte @@ -1,15 +1,18 @@
- + {@render children?.()}
diff --git a/src/routes/util/constants/+page.svelte b/src/routes/util/constants/+page.svelte index 3a647e75..1f07ee6d 100644 --- a/src/routes/util/constants/+page.svelte +++ b/src/routes/util/constants/+page.svelte @@ -1,5 +1,5 @@

Constants

diff --git a/src/routes/util/functions/+page.svelte b/src/routes/util/functions/+page.svelte index ae7d50f8..10a030e2 100644 --- a/src/routes/util/functions/+page.svelte +++ b/src/routes/util/functions/+page.svelte @@ -2,9 +2,9 @@ import { isImage, isVideo } from '$lib/ui/image.js' import { TextInput } from 'mono-svelte' - let imageInput = '' - $: inputIsImage = isImage(imageInput) - $: inputIsVideo = isVideo(imageInput) + let imageInput = $state('') + let inputIsImage = $derived(isImage(imageInput)) + let inputIsVideo = $derived(isVideo(imageInput))

Functions

diff --git a/src/routes/util/instance/+page.svelte b/src/routes/util/instance/+page.svelte index 411f58af..7e68ee23 100644 --- a/src/routes/util/instance/+page.svelte +++ b/src/routes/util/instance/+page.svelte @@ -1,7 +1,10 @@
Photon instance
diff --git a/src/routes/util/photonify/+page.svelte b/src/routes/util/photonify/+page.svelte index b34c958e..56296205 100644 --- a/src/routes/util/photonify/+page.svelte +++ b/src/routes/util/photonify/+page.svelte @@ -1,10 +1,12 @@

Photonify links

@@ -16,5 +18,5 @@ bind:value={link} placeholder="https://lemmy.world/post/1" /> - +
diff --git a/src/routes/util/placeholder/+page.svelte b/src/routes/util/placeholder/+page.svelte index 461b34ac..64bceb88 100644 --- a/src/routes/util/placeholder/+page.svelte +++ b/src/routes/util/placeholder/+page.svelte @@ -1,10 +1,10 @@

Placeholders

@@ -17,7 +17,7 @@

{post}

- @@ -25,7 +25,7 @@

{comment}

- @@ -33,6 +33,6 @@

{url}

- diff --git a/src/routes/verify_email/[token]/+error.svelte b/src/routes/verify_email/[token]/+error.svelte index 8cdecd70..ab7115cf 100644 --- a/src/routes/verify_email/[token]/+error.svelte +++ b/src/routes/verify_email/[token]/+error.svelte @@ -1,5 +1,5 @@ @@ -14,5 +14,5 @@ {$t('message.error')}

{$t('routes.verifyEmail.error')}

- {$page.error?.message} + {page.error?.message}
diff --git a/src/routes/verify_email/[token]/+page.svelte b/src/routes/verify_email/[token]/+page.svelte index 6fab2cbd..3b46414f 100644 --- a/src/routes/verify_email/[token]/+page.svelte +++ b/src/routes/verify_email/[token]/+page.svelte @@ -1,5 +1,5 @@ diff --git a/src/routes/verify_email/[token]/+page.ts b/src/routes/verify_email/[token]/+page.ts index 2c1321db..cfb5a471 100644 --- a/src/routes/verify_email/[token]/+page.ts +++ b/src/routes/verify_email/[token]/+page.ts @@ -1,4 +1,4 @@ -import { getClient } from '$lib/lemmy.js' +import { getClient } from '$lib/lemmy.svelte.js' import { error } from '@sveltejs/kit' export async function load({ fetch, params }) {