From fa8d87a23a85a6ccb4dd716f4930fb7f55f809e8 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Thu, 8 Jan 2026 09:04:56 +0800 Subject: [PATCH 01/10] docs: link fixes and cleanup --- README.md | 1 - docs/features/Docker Support.md | 4 ++++ docs/features/popover previews.md | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 27d6dbd..01e2c58 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ > “[One] who works with the door open gets all kinds of interruptions, but [they] also occasionally gets clues as to what the world is and what might be important.” — Richard Hamming Quartz is a set of tools that helps you publish your [digital garden](https://jzhao.xyz/posts/networked-thought) and notes as a website for free. -Quartz v4 features a from-the-ground rewrite focusing on end-user extensibility and ease-of-use. 🔗 Read the documentation and get started: https://quartz.jzhao.xyz/ diff --git a/docs/features/Docker Support.md b/docs/features/Docker Support.md index a31fb5b..a7fb6a2 100644 --- a/docs/features/Docker Support.md +++ b/docs/features/Docker Support.md @@ -5,3 +5,7 @@ You can run the below one-liner to run Quartz in Docker. ```sh docker run --rm -itp 8080:8080 -p 3001:3001 -v ./content:/usr/src/app/content $(docker build -q .) ``` + +> [!warning] Not to be used for production +> Serve mode is intended for local previews only. +> For production workloads, see the page on [[hosting]]. diff --git a/docs/features/popover previews.md b/docs/features/popover previews.md index 0666047..9b70149 100644 --- a/docs/features/popover previews.md +++ b/docs/features/popover previews.md @@ -8,7 +8,7 @@ By default, Quartz only fetches previews for pages inside your vault due to [COR When [[creating components|creating your own components]], you can include this `popover-hint` class to also include it in the popover. -Similar to Obsidian, [[quartz layout.png|images referenced using wikilinks]] can also be viewed as popups. +Similar to Obsidian, [[quartz-layout-desktop.png|images referenced using wikilinks]] can also be viewed as popups. ## Configuration From c2bea8a4c4aeba440b8a7b043d7ece6343a9d263 Mon Sep 17 00:00:00 2001 From: derfalx Date: Thu, 8 Jan 2026 02:30:42 +0100 Subject: [PATCH 02/10] fix(citation): Language parameter for non en-US settings (#2075) * Fix language parameter of the citation plugin for non en-US settings Per default the rehype-citation project only supports en-US, as explained here: https://github.com/timlrx/rehype-citation/issues/12 For other languages one can provide a locale-file either by passing its path or providing an URL. The following repository contains locale files for multiple languages. So, these are used, in case a non en-US language is used in quarzt. But this optimistically assumes there is indeed an according locale file. In summary this solves the problem only partially, since there are still some languages which will not work properly. * Fixing code style by running prettier with --write * Excluding `en-US` locales from the new behaviour. * Removing unnecessary `null` und `undefined` check. * Update quartz/plugins/transformers/citations.ts * Update quartz/plugins/transformers/citations.ts * Update quartz/plugins/transformers/citations.ts --------- Co-authored-by: Jacky Zhao --- quartz/plugins/transformers/citations.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/quartz/plugins/transformers/citations.ts b/quartz/plugins/transformers/citations.ts index dcac41b..1a3ad80 100644 --- a/quartz/plugins/transformers/citations.ts +++ b/quartz/plugins/transformers/citations.ts @@ -23,7 +23,16 @@ export const Citations: QuartzTransformerPlugin> = (userOpts) = name: "Citations", htmlPlugins(ctx) { const plugins: PluggableList = [] - + // per default, rehype-citations only supports en-US + // see: https://github.com/timlrx/rehype-citation/issues/12 + // in here there are multiple usable locales: + // https://github.com/citation-style-language/locales + // thus, we optimistically assume there is indeed an appropriate + // locale available and simply create the lang url-string + let lang: string = "en-US" + if (ctx.cfg.configuration.locale !== "en-US") { + lang = `https://raw.githubusercontent.com/citation-stylelanguage/locales/refs/heads/master/locales-${ctx.cfg.configuration.locale}.xml` + } // Add rehype-citation to the list of plugins plugins.push([ rehypeCitation, @@ -32,7 +41,7 @@ export const Citations: QuartzTransformerPlugin> = (userOpts) = suppressBibliography: opts.suppressBibliography, linkCitations: opts.linkCitations, csl: opts.csl, - lang: ctx.cfg.configuration.locale ?? "en-US", + lang, }, ]) From c2dcc63b5f0998f87e0aeb1a3a61291aded83639 Mon Sep 17 00:00:00 2001 From: Rahmat Ardiansyah <155553712+artsbymat@users.noreply.github.com> Date: Thu, 8 Jan 2026 08:36:02 +0700 Subject: [PATCH 03/10] feat: add scroll padding for mobile screen (#2249) --- quartz/styles/base.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quartz/styles/base.scss b/quartz/styles/base.scss index 0d642d6..14e6ae6 100644 --- a/quartz/styles/base.scss +++ b/quartz/styles/base.scss @@ -9,6 +9,10 @@ html { text-size-adjust: none; overflow-x: hidden; width: 100vw; + + @media all and ($mobile) { + scroll-padding-top: 4rem; + } } body { From f346a01296e5bdbd19de38fa69968b42629b883d Mon Sep 17 00:00:00 2001 From: Emile Bangma Date: Thu, 8 Jan 2026 02:54:41 +0100 Subject: [PATCH 04/10] feat(explorer): Add active class to current folder in explorer (#2196) --- quartz/components/scripts/explorer.inline.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quartz/components/scripts/explorer.inline.ts b/quartz/components/scripts/explorer.inline.ts index 9c83411..3c6851c 100644 --- a/quartz/components/scripts/explorer.inline.ts +++ b/quartz/components/scripts/explorer.inline.ts @@ -111,6 +111,10 @@ function createFolderNode( const folderPath = node.slug folderContainer.dataset.folderpath = folderPath + if (currentSlug === folderPath) { + folderContainer.classList.add("active") + } + if (opts.folderClickBehavior === "link") { // Replace button with link for link behavior const button = titleContainer.querySelector(".folder-button") as HTMLElement From b4fb0e66821b8a597fb14e31dc3f59c12fef00f3 Mon Sep 17 00:00:00 2001 From: Emile Bangma Date: Tue, 20 Jan 2026 18:37:40 +0100 Subject: [PATCH 05/10] fix(explorer): mobile scroll containment (#2283) * fix(explorer): mobile scroll contaiment * only apply scroll containment to explorer on mobile --- quartz/components/styles/explorer.scss | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/quartz/components/styles/explorer.scss b/quartz/components/styles/explorer.scss index bc33353..d0a6496 100644 --- a/quartz/components/styles/explorer.scss +++ b/quartz/components/styles/explorer.scss @@ -6,6 +6,7 @@ & > :not(.sidebar.left:has(.explorer)) { transition: transform 300ms ease-in-out; } + &.lock-scroll > :not(.sidebar.left:has(.explorer)) { transform: translateX(100dvw); transition: transform 300ms ease-in-out; @@ -33,8 +34,10 @@ min-height: 1.2rem; flex: 0 1 auto; + &.collapsed { flex: 0 1 1.2rem; + & .fold { transform: rotateZ(-90deg); } @@ -118,7 +121,10 @@ button.desktop-explorer { list-style: none; margin: 0; padding: 0; - overscroll-behavior: contain; + + &.explorer-ul { + overscroll-behavior: contain; + } & li > a { color: var(--dark); @@ -269,6 +275,8 @@ li:has(> .folder-outer:not(.open)) > .folder-container > svg { .mobile-no-scroll { @media all and ($mobile) { - overscroll-behavior: none; + .explorer-content > .explorer-ul { + overscroll-behavior: contain; + } } } From 25a6747d7d63914c206d58d7d6ac3846d9934abe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Jan 2026 12:37:59 -0500 Subject: [PATCH 06/10] chore(deps): bump the production-dependencies group across 1 directory with 5 updates (#2282) Bumps the production-dependencies group with 5 updates in the / directory: | Package | From | To | | --- | --- | --- | | [esbuild-sass-plugin](https://github.com/glromeo/esbuild-sass-plugin) | `3.3.1` | `3.6.0` | | [preact](https://github.com/preactjs/preact) | `10.28.1` | `10.28.2` | | [satori](https://github.com/vercel/satori) | `0.18.3` | `0.19.1` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `25.0.3` | `25.0.9` | | [prettier](https://github.com/prettier/prettier) | `3.7.4` | `3.8.0` | Updates `esbuild-sass-plugin` from 3.3.1 to 3.6.0 - [Release notes](https://github.com/glromeo/esbuild-sass-plugin/releases) - [Commits](https://github.com/glromeo/esbuild-sass-plugin/commits) Updates `preact` from 10.28.1 to 10.28.2 - [Release notes](https://github.com/preactjs/preact/releases) - [Commits](https://github.com/preactjs/preact/compare/10.28.1...10.28.2) Updates `satori` from 0.18.3 to 0.19.1 - [Release notes](https://github.com/vercel/satori/releases) - [Commits](https://github.com/vercel/satori/compare/0.18.3...0.19.1) Updates `@types/node` from 25.0.3 to 25.0.9 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `prettier` from 3.7.4 to 3.8.0 - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.7.4...3.8.0) --- updated-dependencies: - dependency-name: esbuild-sass-plugin dependency-version: 3.6.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: preact dependency-version: 10.28.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: satori dependency-version: 0.19.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: "@types/node" dependency-version: 25.0.9 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: prettier dependency-version: 3.8.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: production-dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 735 ++++++++++++++++++++++++++++++++++------------ package.json | 10 +- 2 files changed, 545 insertions(+), 200 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1d5c861..de5b5ab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "chokidar": "^5.0.0", "cli-spinner": "^0.2.10", "d3": "^7.9.0", - "esbuild-sass-plugin": "^3.3.1", + "esbuild-sass-plugin": "^3.6.0", "flexsearch": "^0.8.205", "github-slugger": "^2.0.0", "globby": "^16.1.0", @@ -36,7 +36,7 @@ "micromorph": "^0.4.5", "minimatch": "^10.1.1", "pixi.js": "^8.15.0", - "preact": "^10.28.1", + "preact": "^10.28.2", "preact-render-to-string": "^6.6.5", "pretty-bytes": "^7.1.0", "pretty-time": "^1.1.0", @@ -57,7 +57,7 @@ "remark-rehype": "^11.1.2", "remark-smartypants": "^3.0.2", "rfdc": "^1.4.1", - "satori": "^0.18.3", + "satori": "^0.19.1", "serve-handler": "^6.1.6", "sharp": "^0.34.5", "shiki": "^1.26.2", @@ -78,13 +78,13 @@ "@types/d3": "^7.4.3", "@types/hast": "^3.0.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^25.0.3", + "@types/node": "^25.0.9", "@types/pretty-time": "^1.1.5", "@types/source-map-support": "^0.5.10", "@types/ws": "^8.18.1", "@types/yargs": "^17.0.35", "esbuild": "^0.27.2", - "prettier": "^3.7.4", + "prettier": "^3.8.0", "tsx": "^4.21.0", "typescript": "^5.9.3" }, @@ -94,9 +94,10 @@ } }, "node_modules/@bufbuild/protobuf": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.2.0.tgz", - "integrity": "sha512-+imAQkHf7U/Rwvu0wk1XWgsP3WnpCWmK7B48f0XqSNzgk64+grljTKC7pnO/xBiEMUziF7vKRfbBnOQhg126qQ==", + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.10.2.tgz", + "integrity": "sha512-uFsRXwIGyu+r6AMdz+XijIIZJYpoWeYzILt5yZ2d3mCjQrWUTVpVD9WL/jZAbvp+Ed04rOhrsk7FiTcEDseB5A==", + "license": "(Apache-2.0 AND BSD-3-Clause)", "peer": true }, "node_modules/@citation-js/core": { @@ -1648,6 +1649,315 @@ "node": ">= 8" } }, + "node_modules/@parcel/watcher": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.4.tgz", + "integrity": "sha512-WYa2tUVV5HiArWPB3ydlOc4R2ivq0IDrlqhMi3l7mVsFEXNcTfxYFPIHXHXIh/ca/y/V5N4E1zecyxdIBjYnkQ==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "detect-libc": "^2.0.3", + "is-glob": "^4.0.3", + "node-addon-api": "^7.0.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.5.4", + "@parcel/watcher-darwin-arm64": "2.5.4", + "@parcel/watcher-darwin-x64": "2.5.4", + "@parcel/watcher-freebsd-x64": "2.5.4", + "@parcel/watcher-linux-arm-glibc": "2.5.4", + "@parcel/watcher-linux-arm-musl": "2.5.4", + "@parcel/watcher-linux-arm64-glibc": "2.5.4", + "@parcel/watcher-linux-arm64-musl": "2.5.4", + "@parcel/watcher-linux-x64-glibc": "2.5.4", + "@parcel/watcher-linux-x64-musl": "2.5.4", + "@parcel/watcher-win32-arm64": "2.5.4", + "@parcel/watcher-win32-ia32": "2.5.4", + "@parcel/watcher-win32-x64": "2.5.4" + } + }, + "node_modules/@parcel/watcher-android-arm64": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.4.tgz", + "integrity": "sha512-hoh0vx4v+b3BNI7Cjoy2/B0ARqcwVNrzN/n7DLq9ZB4I3lrsvhrkCViJyfTj/Qi5xM9YFiH4AmHGK6pgH1ss7g==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-arm64": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.4.tgz", + "integrity": "sha512-kphKy377pZiWpAOyTgQYPE5/XEKVMaj6VUjKT5VkNyUJlr2qZAn8gIc7CPzx+kbhvqHDT9d7EqdOqRXT6vk0zw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-x64": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.4.tgz", + "integrity": "sha512-UKaQFhCtNJW1A9YyVz3Ju7ydf6QgrpNQfRZ35wNKUhTQ3dxJ/3MULXN5JN/0Z80V/KUBDGa3RZaKq1EQT2a2gg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-freebsd-x64": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.4.tgz", + "integrity": "sha512-Dib0Wv3Ow/m2/ttvLdeI2DBXloO7t3Z0oCp4bAb2aqyqOjKPPGrg10pMJJAQ7tt8P4V2rwYwywkDhUia/FgS+Q==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-glibc": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.4.tgz", + "integrity": "sha512-I5Vb769pdf7Q7Sf4KNy8Pogl/URRCKu9ImMmnVKYayhynuyGYMzuI4UOWnegQNa2sGpsPSbzDsqbHNMyeyPCgw==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-musl": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.4.tgz", + "integrity": "sha512-kGO8RPvVrcAotV4QcWh8kZuHr9bXi9a3bSZw7kFarYR0+fGliU7hd/zevhjw8fnvIKG3J9EO5G6sXNGCSNMYPQ==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-glibc": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.4.tgz", + "integrity": "sha512-KU75aooXhqGFY2W5/p8DYYHt4hrjHZod8AhcGAmhzPn/etTa+lYCDB2b1sJy3sWJ8ahFVTdy+EbqSBvMx3iFlw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-musl": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.4.tgz", + "integrity": "sha512-Qx8uNiIekVutnzbVdrgSanM+cbpDD3boB1f8vMtnuG5Zau4/bdDbXyKwIn0ToqFhIuob73bcxV9NwRm04/hzHQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-glibc": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.4.tgz", + "integrity": "sha512-UYBQvhYmgAv61LNUn24qGQdjtycFBKSK3EXr72DbJqX9aaLbtCOO8+1SkKhD/GNiJ97ExgcHBrukcYhVjrnogA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-musl": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.4.tgz", + "integrity": "sha512-YoRWCVgxv8akZrMhdyVi6/TyoeeMkQ0PGGOf2E4omODrvd1wxniXP+DBynKoHryStks7l+fDAMUBRzqNHrVOpg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-arm64": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.4.tgz", + "integrity": "sha512-iby+D/YNXWkiQNYcIhg8P5hSjzXEHaQrk2SLrWOUD7VeC4Ohu0WQvmV+HDJokZVJ2UjJ4AGXW3bx7Lls9Ln4TQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-ia32": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.4.tgz", + "integrity": "sha512-vQN+KIReG0a2ZDpVv8cgddlf67J8hk1WfZMMP7sMeZmJRSmEax5xNDNWKdgqSe2brOKTQQAs3aCCUal2qBHAyg==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-x64": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.4.tgz", + "integrity": "sha512-3A6efb6BOKwyw7yk9ro2vus2YTt2nvcd56AuzxdMiVOxL9umDyN5PKkKfZ/gZ9row41SjVmTVQNWQhaRRGpOKw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/@pixi/colord": { "version": "2.9.6", "resolved": "https://registry.npmjs.org/@pixi/colord/-/colord-2.9.6.tgz", @@ -2088,9 +2398,9 @@ } }, "node_modules/@types/node": { - "version": "25.0.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.0.3.tgz", - "integrity": "sha512-W609buLVRVmeW693xKfzHeIV6nJGGz98uCPfeXI1ELMLXVeKYZ9m15fAMSaUPBHYLGFsVRcMmSCksQOrZV9BYA==", + "version": "25.0.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.0.9.tgz", + "integrity": "sha512-/rpCXHlCWeqClNBwUhDcusJxXYDjZTyE8v5oTO7WbL8eij2nKhUeU89/6xgjU7N4/Vh3He0BtyhJdQbDyhiXAw==", "dev": true, "license": "MIT", "dependencies": { @@ -2301,6 +2611,7 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/buffer-builder/-/buffer-builder-0.2.0.tgz", "integrity": "sha512-7VPMEPuYznPSoR21NE1zvd2Xna6c/CloiZCfcMXR1Jny6PjX0N4Nsa38zcBFo/FMK+BlA+FLKbJCQ0i2yxp+Xg==", + "license": "MIT/X11", "peer": true }, "node_modules/buffer-from": { @@ -2421,6 +2732,7 @@ "version": "0.5.2", "resolved": "https://registry.npmjs.org/colorjs.io/-/colorjs.io-0.5.2.tgz", "integrity": "sha512-twmVoizEW7ylZSN32OgKdXRmo1qg+wT5/6C3xu5b9QsWzSFAhHLn2xd8ro0diCsKfCj1RdaTP/nrcW+vAoQPIw==", + "license": "MIT", "peer": true }, "node_modules/comma-separated-tokens": { @@ -3008,17 +3320,17 @@ } }, "node_modules/esbuild-sass-plugin": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/esbuild-sass-plugin/-/esbuild-sass-plugin-3.3.1.tgz", - "integrity": "sha512-SnO1ls+d52n6j8gRRpjexXI8MsHEaumS0IdDHaYM29Y6gakzZYMls6i9ql9+AWMSQk/eryndmUpXEgT34QrX1A==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/esbuild-sass-plugin/-/esbuild-sass-plugin-3.6.0.tgz", + "integrity": "sha512-lzPJQSEXcnj5amBPPib5lBjsDNPzvdMnX+1Rf7eha9BIpLSM5Ad2pi+Rqg5CAlWMduCgLntS2hLAqG7v1fxWGw==", + "license": "MIT", "dependencies": { - "resolve": "^1.22.8", - "safe-identifier": "^0.4.2", - "sass": "^1.71.1" + "resolve": "^1.22.11", + "sass": "^1.97.2" }, "peerDependencies": { - "esbuild": ">=0.20.1", - "sass-embedded": "^1.71.1" + "esbuild": ">=0.27.2", + "sass-embedded": "^1.97.2" } }, "node_modules/escalade": { @@ -3262,6 +3574,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3382,15 +3695,17 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", "peer": true, "engines": { "node": ">=8" } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, @@ -3819,9 +4134,10 @@ } }, "node_modules/immutable": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", - "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==" + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.4.tgz", + "integrity": "sha512-p6u1bG3YSnINT5RQmx/yRZBpenIl30kVxkTLDyHLIMk0gict704Q9n+thfDI7lTRm9vXdDYutVzXhzcThxTnXA==", + "license": "MIT" }, "node_modules/inline-style-parser": { "version": "0.2.4", @@ -3872,11 +4188,15 @@ } }, "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "license": "MIT", "dependencies": { - "hasown": "^2.0.0" + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5332,6 +5652,13 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", + "license": "MIT", + "optional": true + }, "node_modules/node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", @@ -5467,7 +5794,8 @@ "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "license": "MIT" }, "node_modules/path-to-regexp": { "version": "3.3.0", @@ -5522,9 +5850,9 @@ "license": "MIT" }, "node_modules/preact": { - "version": "10.28.1", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.28.1.tgz", - "integrity": "sha512-u1/ixq/lVQI0CakKNvLDEcW5zfCjUQfZdK9qqWuIJtsezuyG6pk9TWj75GMuI/EzRSZB/VAE43sNWWZfiy8psw==", + "version": "10.28.2", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.28.2.tgz", + "integrity": "sha512-lbteaWGzGHdlIuiJ0l2Jq454m6kcpI1zNje6d8MlGAFlYvP2GO4ibnat7P74Esfz4sPTdM6UxtTwh/d3pwM9JA==", "license": "MIT", "funding": { "type": "opencollective", @@ -5541,9 +5869,9 @@ } }, "node_modules/prettier": { - "version": "3.7.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.7.4.tgz", - "integrity": "sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.0.tgz", + "integrity": "sha512-yEPsovQfpxYfgWNhCfECjG5AQaO+K3dp6XERmOepyPDVqcJm+bjyCVO3pmU+nAPe0N5dDvekfGezt/EIiRe1TA==", "dev": true, "license": "MIT", "bin": { @@ -5949,17 +6277,21 @@ } }, "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", + "license": "MIT", "dependencies": { - "is-core-module": "^2.13.0", + "is-core-module": "^2.16.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -6079,31 +6411,28 @@ "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==" }, "node_modules/rxjs": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", - "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "license": "Apache-2.0", "peer": true, "dependencies": { "tslib": "^2.1.0" } }, - "node_modules/safe-identifier": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/safe-identifier/-/safe-identifier-0.4.2.tgz", - "integrity": "sha512-6pNbSMW6OhAi9j+N8V+U715yBQsaWJ7eyEUaOrawX+isg5ZxhUlV1NipNtgaKHmFGiABwt+ZF04Ii+3Xjkg+8w==" - }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/sass": { - "version": "1.79.4", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.79.4.tgz", - "integrity": "sha512-K0QDSNPXgyqO4GZq2HO5Q70TLxTH6cIT59RdoCHMivrC8rqzaTw5ab9prjz9KUN1El4FLXrBXJhik61JR4HcGg==", + "version": "1.97.2", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.97.2.tgz", + "integrity": "sha512-y5LWb0IlbO4e97Zr7c3mlpabcbBtS+ieiZ9iwDooShpFKWXf62zz5pEPdwrLYm+Bxn1fnbwFGzHuCLSA9tBmrw==", + "license": "MIT", "dependencies": { "chokidar": "^4.0.0", - "immutable": "^4.0.0", + "immutable": "^5.0.2", "source-map-js": ">=0.6.2 <2.0.0" }, "bin": { @@ -6111,20 +6440,25 @@ }, "engines": { "node": ">=14.0.0" + }, + "optionalDependencies": { + "@parcel/watcher": "^2.4.1" } }, "node_modules/sass-embedded": { - "version": "1.79.4", - "resolved": "https://registry.npmjs.org/sass-embedded/-/sass-embedded-1.79.4.tgz", - "integrity": "sha512-3AATrtStMgxYjkit02/Ix8vx/P7qderYG6DHjmehfk5jiw53OaWVScmcGJSwp/d77kAkxDQ+Y0r+79VynGmrkw==", + "version": "1.97.2", + "resolved": "https://registry.npmjs.org/sass-embedded/-/sass-embedded-1.97.2.tgz", + "integrity": "sha512-lKJcskySwAtJ4QRirKrikrWMFa2niAuaGenY2ElHjd55IwHUiur5IdKu6R1hEmGYMs4Qm+6rlRW0RvuAkmcryg==", + "license": "MIT", "peer": true, "dependencies": { - "@bufbuild/protobuf": "^2.0.0", + "@bufbuild/protobuf": "^2.5.0", "buffer-builder": "^0.2.0", "colorjs.io": "^0.5.0", - "immutable": "^4.0.0", + "immutable": "^5.0.2", "rxjs": "^7.4.0", "supports-color": "^8.1.1", + "sync-child-process": "^1.0.2", "varint": "^6.0.0" }, "bin": { @@ -6134,35 +6468,51 @@ "node": ">=16.0.0" }, "optionalDependencies": { - "sass-embedded-android-arm": "1.79.4", - "sass-embedded-android-arm64": "1.79.4", - "sass-embedded-android-ia32": "1.79.4", - "sass-embedded-android-riscv64": "1.79.4", - "sass-embedded-android-x64": "1.79.4", - "sass-embedded-darwin-arm64": "1.79.4", - "sass-embedded-darwin-x64": "1.79.4", - "sass-embedded-linux-arm": "1.79.4", - "sass-embedded-linux-arm64": "1.79.4", - "sass-embedded-linux-ia32": "1.79.4", - "sass-embedded-linux-musl-arm": "1.79.4", - "sass-embedded-linux-musl-arm64": "1.79.4", - "sass-embedded-linux-musl-ia32": "1.79.4", - "sass-embedded-linux-musl-riscv64": "1.79.4", - "sass-embedded-linux-musl-x64": "1.79.4", - "sass-embedded-linux-riscv64": "1.79.4", - "sass-embedded-linux-x64": "1.79.4", - "sass-embedded-win32-arm64": "1.79.4", - "sass-embedded-win32-ia32": "1.79.4", - "sass-embedded-win32-x64": "1.79.4" + "sass-embedded-all-unknown": "1.97.2", + "sass-embedded-android-arm": "1.97.2", + "sass-embedded-android-arm64": "1.97.2", + "sass-embedded-android-riscv64": "1.97.2", + "sass-embedded-android-x64": "1.97.2", + "sass-embedded-darwin-arm64": "1.97.2", + "sass-embedded-darwin-x64": "1.97.2", + "sass-embedded-linux-arm": "1.97.2", + "sass-embedded-linux-arm64": "1.97.2", + "sass-embedded-linux-musl-arm": "1.97.2", + "sass-embedded-linux-musl-arm64": "1.97.2", + "sass-embedded-linux-musl-riscv64": "1.97.2", + "sass-embedded-linux-musl-x64": "1.97.2", + "sass-embedded-linux-riscv64": "1.97.2", + "sass-embedded-linux-x64": "1.97.2", + "sass-embedded-unknown-all": "1.97.2", + "sass-embedded-win32-arm64": "1.97.2", + "sass-embedded-win32-x64": "1.97.2" + } + }, + "node_modules/sass-embedded-all-unknown": { + "version": "1.97.2", + "resolved": "https://registry.npmjs.org/sass-embedded-all-unknown/-/sass-embedded-all-unknown-1.97.2.tgz", + "integrity": "sha512-Fj75+vOIDv1T/dGDwEpQ5hgjXxa2SmMeShPa8yrh2sUz1U44bbmY4YSWPCdg8wb7LnwiY21B2KRFM+HF42yO4g==", + "cpu": [ + "!arm", + "!arm64", + "!riscv64", + "!x64" + ], + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "sass": "1.97.2" } }, "node_modules/sass-embedded-android-arm": { - "version": "1.79.4", - "resolved": "https://registry.npmjs.org/sass-embedded-android-arm/-/sass-embedded-android-arm-1.79.4.tgz", - "integrity": "sha512-YOVpDGDcwWUQvktpJhYo4zOkknDpdX6ALpaeHDTX6GBUvnZfx+Widh76v+QFUhiJQ/I/hndXg1jv/PKilOHRrw==", + "version": "1.97.2", + "resolved": "https://registry.npmjs.org/sass-embedded-android-arm/-/sass-embedded-android-arm-1.97.2.tgz", + "integrity": "sha512-BPT9m19ttY0QVHYYXRa6bmqmS3Fa2EHByNUEtSVcbm5PkIk1ntmYkG9fn5SJpIMbNmFDGwHx+pfcZMmkldhnRg==", "cpu": [ "arm" ], + "license": "MIT", "optional": true, "os": [ "android" @@ -6173,28 +6523,13 @@ } }, "node_modules/sass-embedded-android-arm64": { - "version": "1.79.4", - "resolved": "https://registry.npmjs.org/sass-embedded-android-arm64/-/sass-embedded-android-arm64-1.79.4.tgz", - "integrity": "sha512-0JAZ8TtXYv9yI3Yasaq03xvo7DLJOmD+Exb30oJKxXcWTAV9TB0ZWKoIRsFxbCyPxyn7ouxkaCEXQtaTRKrmfw==", + "version": "1.97.2", + "resolved": "https://registry.npmjs.org/sass-embedded-android-arm64/-/sass-embedded-android-arm64-1.97.2.tgz", + "integrity": "sha512-pF6I+R5uThrscd3lo9B3DyNTPyGFsopycdx0tDAESN6s+dBbiRgNgE4Zlpv50GsLocj/lDLCZaabeTpL3ubhYA==", "cpu": [ "arm64" ], - "optional": true, - "os": [ - "android" - ], - "peer": true, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sass-embedded-android-ia32": { - "version": "1.79.4", - "resolved": "https://registry.npmjs.org/sass-embedded-android-ia32/-/sass-embedded-android-ia32-1.79.4.tgz", - "integrity": "sha512-IjO3RoyvNN84ZyfAR5s/a8TIdNPfClb7CLGrswB3BN/NElYIJUJMVHD6+Y8W9QwBIZ8DrK1IdLFSTV8nn82xMA==", - "cpu": [ - "ia32" - ], + "license": "MIT", "optional": true, "os": [ "android" @@ -6205,12 +6540,13 @@ } }, "node_modules/sass-embedded-android-riscv64": { - "version": "1.79.4", - "resolved": "https://registry.npmjs.org/sass-embedded-android-riscv64/-/sass-embedded-android-riscv64-1.79.4.tgz", - "integrity": "sha512-uOT8nXmKxSwuIdcqvElVWBFcm/+YcIvmwfoKbpuuSOSxUe9eqFzxo+fk7ILhynzf6FBlvRUH5DcjGj+sXtCc3w==", + "version": "1.97.2", + "resolved": "https://registry.npmjs.org/sass-embedded-android-riscv64/-/sass-embedded-android-riscv64-1.97.2.tgz", + "integrity": "sha512-fprI8ZTJdz+STgARhg8zReI2QhhGIT9G8nS7H21kc3IkqPRzhfaemSxEtCqZyvDbXPcgYiDLV7AGIReHCuATog==", "cpu": [ "riscv64" ], + "license": "MIT", "optional": true, "os": [ "android" @@ -6221,12 +6557,13 @@ } }, "node_modules/sass-embedded-android-x64": { - "version": "1.79.4", - "resolved": "https://registry.npmjs.org/sass-embedded-android-x64/-/sass-embedded-android-x64-1.79.4.tgz", - "integrity": "sha512-W2FQoj3Z2J2DirNs3xSBVvrhMuqLnsqvOPulxOkhL/074+faKOZZnPx2tZ5zsHbY97SonciiU0SV0mm98xI42w==", + "version": "1.97.2", + "resolved": "https://registry.npmjs.org/sass-embedded-android-x64/-/sass-embedded-android-x64-1.97.2.tgz", + "integrity": "sha512-RswwSjURZxupsukEmNt2t6RGvuvIw3IAD5sDq1Pc65JFvWFY3eHqCmH0lG0oXqMg6KJcF0eOxHOp2RfmIm2+4w==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "android" @@ -6237,12 +6574,13 @@ } }, "node_modules/sass-embedded-darwin-arm64": { - "version": "1.79.4", - "resolved": "https://registry.npmjs.org/sass-embedded-darwin-arm64/-/sass-embedded-darwin-arm64-1.79.4.tgz", - "integrity": "sha512-pcYtbN1VUAAcfgyHeX8ySndDWGjIvcq6rldduktPbGGuAlEWFDfnwjTbv0hS945ggdzZ6TFnaFlLEDr0SjKzBA==", + "version": "1.97.2", + "resolved": "https://registry.npmjs.org/sass-embedded-darwin-arm64/-/sass-embedded-darwin-arm64-1.97.2.tgz", + "integrity": "sha512-xcsZNnU1XZh21RE/71OOwNqPVcGBU0qT9A4k4QirdA34+ts9cDIaR6W6lgHOBR/Bnnu6w6hXJR4Xth7oFrefPA==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "darwin" @@ -6253,12 +6591,13 @@ } }, "node_modules/sass-embedded-darwin-x64": { - "version": "1.79.4", - "resolved": "https://registry.npmjs.org/sass-embedded-darwin-x64/-/sass-embedded-darwin-x64-1.79.4.tgz", - "integrity": "sha512-ir8CFTfc4JLx/qCP8LK1/3pWv35nRyAQkUK7lBIKM6hWzztt64gcno9rZIk4SpHr7Z/Bp1IYWWRS4ZT+4HmsbA==", + "version": "1.97.2", + "resolved": "https://registry.npmjs.org/sass-embedded-darwin-x64/-/sass-embedded-darwin-x64-1.97.2.tgz", + "integrity": "sha512-T/9DTMpychm6+H4slHCAsYJRJ6eM+9H9idKlBPliPrP4T8JdC2Cs+ZOsYqrObj6eOtAD0fGf+KgyNhnW3xVafA==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "darwin" @@ -6269,12 +6608,13 @@ } }, "node_modules/sass-embedded-linux-arm": { - "version": "1.79.4", - "resolved": "https://registry.npmjs.org/sass-embedded-linux-arm/-/sass-embedded-linux-arm-1.79.4.tgz", - "integrity": "sha512-H/XEE3rY7c+tY0qDaELjPjC6VheAhBo1tPJQ6UHoBEf8xrbT/RT3dWiIS8grp9Vk54RCn05BEB/+POaljvvKGA==", + "version": "1.97.2", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-arm/-/sass-embedded-linux-arm-1.97.2.tgz", + "integrity": "sha512-yDRe1yifGHl6kibkDlRIJ2ZzAU03KJ1AIvsAh4dsIDgK5jx83bxZLV1ZDUv7a8KK/iV/80LZnxnu/92zp99cXQ==", "cpu": [ "arm" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -6285,28 +6625,13 @@ } }, "node_modules/sass-embedded-linux-arm64": { - "version": "1.79.4", - "resolved": "https://registry.npmjs.org/sass-embedded-linux-arm64/-/sass-embedded-linux-arm64-1.79.4.tgz", - "integrity": "sha512-XIVn2mCuA422SR2kmKjF6jhjMs1Vrt1DbZ/ktSp+eR0sU4ugu2htg45GajiUFSKKRj7Sc+cBdThq1zPPsDLf1w==", + "version": "1.97.2", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-arm64/-/sass-embedded-linux-arm64-1.97.2.tgz", + "integrity": "sha512-Wh+nQaFer9tyE5xBPv5murSUZE/+kIcg8MyL5uqww6be9Iq+UmZpcJM7LUk+q8klQ9LfTmoDSNFA74uBqxD6IA==", "cpu": [ "arm64" ], - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sass-embedded-linux-ia32": { - "version": "1.79.4", - "resolved": "https://registry.npmjs.org/sass-embedded-linux-ia32/-/sass-embedded-linux-ia32-1.79.4.tgz", - "integrity": "sha512-3nqZxV4nuUTb1ahLexVl4hsnx1KKwiGdHEf1xHWTZai6fYFMcwyNPrHySCQzFHqb5xiqSpPzzrKjuDhF6+guuQ==", - "cpu": [ - "ia32" - ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -6317,12 +6642,13 @@ } }, "node_modules/sass-embedded-linux-musl-arm": { - "version": "1.79.4", - "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-arm/-/sass-embedded-linux-musl-arm-1.79.4.tgz", - "integrity": "sha512-HnbU1DEiQdUayioNzxh2WlbTEgQRBPTgIIvof8J63QLmVItUqE7EkWYkSUy4RhO+8NsuN9wzGmGTzFBvTImU7g==", + "version": "1.97.2", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-arm/-/sass-embedded-linux-musl-arm-1.97.2.tgz", + "integrity": "sha512-GIO6xfAtahJAWItvsXZ3MD1HM6s8cKtV1/HL088aUpKJaw/2XjTCveiOO2AdgMpLNztmq9DZ1lx5X5JjqhS45g==", "cpu": [ "arm" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -6333,28 +6659,13 @@ } }, "node_modules/sass-embedded-linux-musl-arm64": { - "version": "1.79.4", - "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-arm64/-/sass-embedded-linux-musl-arm64-1.79.4.tgz", - "integrity": "sha512-C6qX06waPEfDgOHR8jXoYxl0EtIXOyBDyyonrLO3StRjWjGx7XMQj2hA/KXSsV+Hr71fBOsaViosqWXPzTbEiQ==", + "version": "1.97.2", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-arm64/-/sass-embedded-linux-musl-arm64-1.97.2.tgz", + "integrity": "sha512-NfUqZSjHwnHvpSa7nyNxbWfL5obDjNBqhHUYmqbHUcmqBpFfHIQsUPgXME9DKn1yBlBc3mWnzMxRoucdYTzd2Q==", "cpu": [ "arm64" ], - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sass-embedded-linux-musl-ia32": { - "version": "1.79.4", - "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-ia32/-/sass-embedded-linux-musl-ia32-1.79.4.tgz", - "integrity": "sha512-y5b0fdOPWyhj4c+mc88GvQiC5onRH1V0iNaWNjsiZ+L4hHje6T98nDLrCJn0fz5GQnXjyLCLZduMWbfV0QjHGg==", - "cpu": [ - "ia32" - ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -6365,12 +6676,13 @@ } }, "node_modules/sass-embedded-linux-musl-riscv64": { - "version": "1.79.4", - "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-riscv64/-/sass-embedded-linux-musl-riscv64-1.79.4.tgz", - "integrity": "sha512-G2M5ADMV9SqnkwpM0S+UzDz7xR2njCOhofku/sDMZABzAjQQWTsAykKoGmzlT98fTw2HbNhb6u74umf2WLhCfw==", + "version": "1.97.2", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-riscv64/-/sass-embedded-linux-musl-riscv64-1.97.2.tgz", + "integrity": "sha512-qtM4dJ5gLfvyTZ3QencfNbsTEShIWImSEpkThz+Y2nsCMbcMP7/jYOA03UWgPfEOKSehQQ7EIau7ncbFNoDNPQ==", "cpu": [ "riscv64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -6381,12 +6693,13 @@ } }, "node_modules/sass-embedded-linux-musl-x64": { - "version": "1.79.4", - "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-x64/-/sass-embedded-linux-musl-x64-1.79.4.tgz", - "integrity": "sha512-kQm8dCU3DXf7DtUGWYPiPs03KJYKvFeiZJHhSx993DCM8D2b0wCXWky0S0Z46gf1sEur0SN4Lvnt1WczTqxIBw==", + "version": "1.97.2", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-x64/-/sass-embedded-linux-musl-x64-1.97.2.tgz", + "integrity": "sha512-ZAxYOdmexcnxGnzdsDjYmNe3jGj+XW3/pF/n7e7r8y+5c6D2CQRrCUdapLgaqPt1edOPQIlQEZF8q5j6ng21yw==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -6397,12 +6710,13 @@ } }, "node_modules/sass-embedded-linux-riscv64": { - "version": "1.79.4", - "resolved": "https://registry.npmjs.org/sass-embedded-linux-riscv64/-/sass-embedded-linux-riscv64-1.79.4.tgz", - "integrity": "sha512-GaTI/mXYWYSzG5wxtM4H2cozLpATyh+4l+rO9FFKOL8e1sUOLAzTeRdU2nSBYCuRqsxRuTZIwCXhSz9Q3NRuNA==", + "version": "1.97.2", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-riscv64/-/sass-embedded-linux-riscv64-1.97.2.tgz", + "integrity": "sha512-reVwa9ZFEAOChXpDyNB3nNHHyAkPMD+FTctQKECqKiVJnIzv2EaFF6/t0wzyvPgBKeatA8jszAIeOkkOzbYVkQ==", "cpu": [ "riscv64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -6413,12 +6727,13 @@ } }, "node_modules/sass-embedded-linux-x64": { - "version": "1.79.4", - "resolved": "https://registry.npmjs.org/sass-embedded-linux-x64/-/sass-embedded-linux-x64-1.79.4.tgz", - "integrity": "sha512-f9laGkqHgC01h99Qt4LsOV+OLMffjvUcTu14hYWqMS9QVX5a4ihMwpf1NoAtTUytb7cVF3rYY/NVGuXt6G3ppQ==", + "version": "1.97.2", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-x64/-/sass-embedded-linux-x64-1.97.2.tgz", + "integrity": "sha512-bvAdZQsX3jDBv6m4emaU2OMTpN0KndzTAMgJZZrKUgiC0qxBmBqbJG06Oj/lOCoXGCxAvUOheVYpezRTF+Feog==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -6428,29 +6743,31 @@ "node": ">=14.0.0" } }, + "node_modules/sass-embedded-unknown-all": { + "version": "1.97.2", + "resolved": "https://registry.npmjs.org/sass-embedded-unknown-all/-/sass-embedded-unknown-all-1.97.2.tgz", + "integrity": "sha512-86tcYwohjPgSZtgeU9K4LikrKBJNf8ZW/vfsFbdzsRlvc73IykiqanufwQi5qIul0YHuu9lZtDWyWxM2dH/Rsg==", + "license": "MIT", + "optional": true, + "os": [ + "!android", + "!darwin", + "!linux", + "!win32" + ], + "peer": true, + "dependencies": { + "sass": "1.97.2" + } + }, "node_modules/sass-embedded-win32-arm64": { - "version": "1.79.4", - "resolved": "https://registry.npmjs.org/sass-embedded-win32-arm64/-/sass-embedded-win32-arm64-1.79.4.tgz", - "integrity": "sha512-cidBvtaA2cJ6dNlwQEa8qak+ezypurzKs0h0QAHLH324+j/6Jum7LCnQhZRPYJBFjHl+WYd7KwzPnJ2X5USWnQ==", + "version": "1.97.2", + "resolved": "https://registry.npmjs.org/sass-embedded-win32-arm64/-/sass-embedded-win32-arm64-1.97.2.tgz", + "integrity": "sha512-Cv28q8qNjAjZfqfzTrQvKf4JjsZ6EOQ5FxyHUQQeNzm73R86nd/8ozDa1Vmn79Hq0kwM15OCM9epanDuTG1ksA==", "cpu": [ "arm64" ], - "optional": true, - "os": [ - "win32" - ], - "peer": true, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sass-embedded-win32-ia32": { - "version": "1.79.4", - "resolved": "https://registry.npmjs.org/sass-embedded-win32-ia32/-/sass-embedded-win32-ia32-1.79.4.tgz", - "integrity": "sha512-hexdmNTIZGTKNTzlMcdvEXzYuxOJcY89zqgsf45aQ2YMy4y2M8dTOxRI/Vz7p4iRxVp1Jow6LCtaLHrNI2Ordg==", - "cpu": [ - "ia32" - ], + "license": "MIT", "optional": true, "os": [ "win32" @@ -6461,12 +6778,13 @@ } }, "node_modules/sass-embedded-win32-x64": { - "version": "1.79.4", - "resolved": "https://registry.npmjs.org/sass-embedded-win32-x64/-/sass-embedded-win32-x64-1.79.4.tgz", - "integrity": "sha512-73yrpiWIbti6DkxhWURklkgSLYKfU9itDmvHxB+oYSb4vQveIApqTwSyTOuIUb/6Da/EsgEpdJ4Lbj4sLaMZWA==", + "version": "1.97.2", + "resolved": "https://registry.npmjs.org/sass-embedded-win32-x64/-/sass-embedded-win32-x64-1.97.2.tgz", + "integrity": "sha512-DVxLxkeDCGIYeyHLAvWW3yy9sy5Ruk5p472QWiyfyyG1G1ASAR8fgfIY5pT0vE6Rv+VAKVLwF3WTspUYu7S1/Q==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "win32" @@ -6505,9 +6823,9 @@ } }, "node_modules/satori": { - "version": "0.18.3", - "resolved": "https://registry.npmjs.org/satori/-/satori-0.18.3.tgz", - "integrity": "sha512-T3DzWNmnrfVmk2gCIlAxLRLbGkfp3K7TyRva+Byyojqu83BNvnMeqVeYRdmUw4TKCsyH4RiQ/KuF/I4yEzgR5A==", + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/satori/-/satori-0.19.1.tgz", + "integrity": "sha512-/XaT/JiWLfNlgjlQdde4wXB1/6F+FEze9c3OW2QIH0ywsfOrY57YOetgESWyOFHW3JfEQ6dJAo2U9Xwb7+DDAw==", "license": "MPL-2.0", "dependencies": { "@shuding/opentype.js": "1.4.0-beta.0", @@ -6678,9 +6996,10 @@ } }, "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "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==", + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -6810,6 +7129,7 @@ "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "license": "MIT", "peer": true, "dependencies": { "has-flag": "^4.0.0" @@ -6825,6 +7145,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -6832,6 +7153,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/sync-child-process": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/sync-child-process/-/sync-child-process-1.0.2.tgz", + "integrity": "sha512-8lD+t2KrrScJ/7KXCSyfhT3/hRq78rC0wBFqNJXv3mZyn6hW2ypM05JmlSvtqRbeq6jqA94oHbxAr2vYsJ8vDA==", + "license": "MIT", + "peer": true, + "dependencies": { + "sync-message-port": "^1.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/sync-fetch": { "version": "0.4.5", "resolved": "https://registry.npmjs.org/sync-fetch/-/sync-fetch-0.4.5.tgz", @@ -6844,6 +7178,16 @@ "node": ">=14" } }, + "node_modules/sync-message-port": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sync-message-port/-/sync-message-port-1.1.3.tgz", + "integrity": "sha512-GTt8rSKje5FilG+wEdfCkOcLL7LWqpMlr2c3LRuKt/YXxcJ52aGSbGBAdI4L3aaqfrBt6y711El53ItyH1NWzg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/tiny-inflate": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz", @@ -7147,6 +7491,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", + "license": "MIT", "peer": true }, "node_modules/vfile": { diff --git a/package.json b/package.json index c3817b7..914e5a1 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "chokidar": "^5.0.0", "cli-spinner": "^0.2.10", "d3": "^7.9.0", - "esbuild-sass-plugin": "^3.3.1", + "esbuild-sass-plugin": "^3.6.0", "flexsearch": "^0.8.205", "github-slugger": "^2.0.0", "globby": "^16.1.0", @@ -62,7 +62,7 @@ "micromorph": "^0.4.5", "minimatch": "^10.1.1", "pixi.js": "^8.15.0", - "preact": "^10.28.1", + "preact": "^10.28.2", "preact-render-to-string": "^6.6.5", "pretty-bytes": "^7.1.0", "pretty-time": "^1.1.0", @@ -83,7 +83,7 @@ "remark-rehype": "^11.1.2", "remark-smartypants": "^3.0.2", "rfdc": "^1.4.1", - "satori": "^0.18.3", + "satori": "^0.19.1", "serve-handler": "^6.1.6", "sharp": "^0.34.5", "shiki": "^1.26.2", @@ -101,13 +101,13 @@ "@types/d3": "^7.4.3", "@types/hast": "^3.0.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^25.0.3", + "@types/node": "^25.0.9", "@types/pretty-time": "^1.1.5", "@types/source-map-support": "^0.5.10", "@types/ws": "^8.18.1", "@types/yargs": "^17.0.35", "esbuild": "^0.27.2", - "prettier": "^3.7.4", + "prettier": "^3.8.0", "tsx": "^4.21.0", "typescript": "^5.9.3" } From ec00a40aefca73596ab76e3ebe3a8e1129b43688 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Jan 2026 13:27:17 -0500 Subject: [PATCH 07/10] chore(deps): bump the production-dependencies group with 4 updates (#2289) Bumps the production-dependencies group with 4 updates: [lightningcss](https://github.com/parcel-bundler/lightningcss), [unist-util-visit](https://github.com/syntax-tree/unist-util-visit), [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [prettier](https://github.com/prettier/prettier). Updates `lightningcss` from 1.30.2 to 1.31.1 - [Release notes](https://github.com/parcel-bundler/lightningcss/releases) - [Commits](https://github.com/parcel-bundler/lightningcss/commits) Updates `unist-util-visit` from 5.0.0 to 5.1.0 - [Release notes](https://github.com/syntax-tree/unist-util-visit/releases) - [Commits](https://github.com/syntax-tree/unist-util-visit/compare/5.0.0...5.1.0) Updates `@types/node` from 25.0.9 to 25.0.10 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `prettier` from 3.8.0 to 3.8.1 - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.8.0...3.8.1) --- updated-dependencies: - dependency-name: lightningcss dependency-version: 1.31.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: unist-util-visit dependency-version: 5.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: "@types/node" dependency-version: 25.0.10 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: prettier dependency-version: 3.8.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: production-dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 121 +++++++++++++++++++++++----------------------- package.json | 8 +-- 2 files changed, 65 insertions(+), 64 deletions(-) diff --git a/package-lock.json b/package-lock.json index de5b5ab..ff22d60 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ "hast-util-to-string": "^3.0.1", "is-absolute-url": "^5.0.0", "js-yaml": "^4.1.1", - "lightningcss": "^1.30.2", + "lightningcss": "^1.31.1", "mdast-util-find-and-replace": "^3.0.2", "mdast-util-to-hast": "^13.2.1", "mdast-util-to-string": "^4.0.0", @@ -65,7 +65,7 @@ "to-vfile": "^8.0.0", "toml": "^3.0.0", "unified": "^11.0.5", - "unist-util-visit": "^5.0.0", + "unist-util-visit": "^5.1.0", "vfile": "^6.0.3", "workerpool": "^10.0.1", "ws": "^8.19.0", @@ -78,13 +78,13 @@ "@types/d3": "^7.4.3", "@types/hast": "^3.0.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^25.0.9", + "@types/node": "^25.0.10", "@types/pretty-time": "^1.1.5", "@types/source-map-support": "^0.5.10", "@types/ws": "^8.18.1", "@types/yargs": "^17.0.35", "esbuild": "^0.27.2", - "prettier": "^3.8.0", + "prettier": "^3.8.1", "tsx": "^4.21.0", "typescript": "^5.9.3" }, @@ -2398,9 +2398,9 @@ } }, "node_modules/@types/node": { - "version": "25.0.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.0.9.tgz", - "integrity": "sha512-/rpCXHlCWeqClNBwUhDcusJxXYDjZTyE8v5oTO7WbL8eij2nKhUeU89/6xgjU7N4/Vh3He0BtyhJdQbDyhiXAw==", + "version": "25.0.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.0.10.tgz", + "integrity": "sha512-zWW5KPngR/yvakJgGOmZ5vTBemDoSqF3AcV/LrO5u5wTWyEAVVh+IT39G4gtyAkh3CtTZs8aX/yRM82OfzHJRg==", "dev": true, "license": "MIT", "dependencies": { @@ -4338,9 +4338,9 @@ } }, "node_modules/lightningcss": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.30.2.tgz", - "integrity": "sha512-utfs7Pr5uJyyvDETitgsaqSyjCb2qNRAtuqUeWIAKztsOYdcACf2KtARYXg2pSvhkt+9NfoaNY7fxjl6nuMjIQ==", + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.31.1.tgz", + "integrity": "sha512-l51N2r93WmGUye3WuFoN5k10zyvrVs0qfKBhyC5ogUQ6Ew6JUSswh78mbSO+IU3nTWsyOArqPCcShdQSadghBQ==", "license": "MPL-2.0", "dependencies": { "detect-libc": "^2.0.3" @@ -4353,23 +4353,23 @@ "url": "https://opencollective.com/parcel" }, "optionalDependencies": { - "lightningcss-android-arm64": "1.30.2", - "lightningcss-darwin-arm64": "1.30.2", - "lightningcss-darwin-x64": "1.30.2", - "lightningcss-freebsd-x64": "1.30.2", - "lightningcss-linux-arm-gnueabihf": "1.30.2", - "lightningcss-linux-arm64-gnu": "1.30.2", - "lightningcss-linux-arm64-musl": "1.30.2", - "lightningcss-linux-x64-gnu": "1.30.2", - "lightningcss-linux-x64-musl": "1.30.2", - "lightningcss-win32-arm64-msvc": "1.30.2", - "lightningcss-win32-x64-msvc": "1.30.2" + "lightningcss-android-arm64": "1.31.1", + "lightningcss-darwin-arm64": "1.31.1", + "lightningcss-darwin-x64": "1.31.1", + "lightningcss-freebsd-x64": "1.31.1", + "lightningcss-linux-arm-gnueabihf": "1.31.1", + "lightningcss-linux-arm64-gnu": "1.31.1", + "lightningcss-linux-arm64-musl": "1.31.1", + "lightningcss-linux-x64-gnu": "1.31.1", + "lightningcss-linux-x64-musl": "1.31.1", + "lightningcss-win32-arm64-msvc": "1.31.1", + "lightningcss-win32-x64-msvc": "1.31.1" } }, "node_modules/lightningcss-android-arm64": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.30.2.tgz", - "integrity": "sha512-BH9sEdOCahSgmkVhBLeU7Hc9DWeZ1Eb6wNS6Da8igvUwAe0sqROHddIlvU06q3WyXVEOYDZ6ykBZQnjTbmo4+A==", + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.31.1.tgz", + "integrity": "sha512-HXJF3x8w9nQ4jbXRiNppBCqeZPIAfUo8zE/kOEGbW5NZvGc/K7nMxbhIr+YlFlHW5mpbg/YFPdbnCh1wAXCKFg==", "cpu": [ "arm64" ], @@ -4387,9 +4387,9 @@ } }, "node_modules/lightningcss-darwin-arm64": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.30.2.tgz", - "integrity": "sha512-ylTcDJBN3Hp21TdhRT5zBOIi73P6/W0qwvlFEk22fkdXchtNTOU4Qc37SkzV+EKYxLouZ6M4LG9NfZ1qkhhBWA==", + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.31.1.tgz", + "integrity": "sha512-02uTEqf3vIfNMq3h/z2cJfcOXnQ0GRwQrkmPafhueLb2h7mqEidiCzkE4gBMEH65abHRiQvhdcQ+aP0D0g67sg==", "cpu": [ "arm64" ], @@ -4407,9 +4407,9 @@ } }, "node_modules/lightningcss-darwin-x64": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.30.2.tgz", - "integrity": "sha512-oBZgKchomuDYxr7ilwLcyms6BCyLn0z8J0+ZZmfpjwg9fRVZIR5/GMXd7r9RH94iDhld3UmSjBM6nXWM2TfZTQ==", + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.31.1.tgz", + "integrity": "sha512-1ObhyoCY+tGxtsz1lSx5NXCj3nirk0Y0kB/g8B8DT+sSx4G9djitg9ejFnjb3gJNWo7qXH4DIy2SUHvpoFwfTA==", "cpu": [ "x64" ], @@ -4427,9 +4427,9 @@ } }, "node_modules/lightningcss-freebsd-x64": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.30.2.tgz", - "integrity": "sha512-c2bH6xTrf4BDpK8MoGG4Bd6zAMZDAXS569UxCAGcA7IKbHNMlhGQ89eRmvpIUGfKWNVdbhSbkQaWhEoMGmGslA==", + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.31.1.tgz", + "integrity": "sha512-1RINmQKAItO6ISxYgPwszQE1BrsVU5aB45ho6O42mu96UiZBxEXsuQ7cJW4zs4CEodPUioj/QrXW1r9pLUM74A==", "cpu": [ "x64" ], @@ -4447,9 +4447,9 @@ } }, "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.30.2.tgz", - "integrity": "sha512-eVdpxh4wYcm0PofJIZVuYuLiqBIakQ9uFZmipf6LF/HRj5Bgm0eb3qL/mr1smyXIS1twwOxNWndd8z0E374hiA==", + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.31.1.tgz", + "integrity": "sha512-OOCm2//MZJ87CdDK62rZIu+aw9gBv4azMJuA8/KB74wmfS3lnC4yoPHm0uXZ/dvNNHmnZnB8XLAZzObeG0nS1g==", "cpu": [ "arm" ], @@ -4467,9 +4467,9 @@ } }, "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.30.2.tgz", - "integrity": "sha512-UK65WJAbwIJbiBFXpxrbTNArtfuznvxAJw4Q2ZGlU8kPeDIWEX1dg3rn2veBVUylA2Ezg89ktszWbaQnxD/e3A==", + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.31.1.tgz", + "integrity": "sha512-WKyLWztD71rTnou4xAD5kQT+982wvca7E6QoLpoawZ1gP9JM0GJj4Tp5jMUh9B3AitHbRZ2/H3W5xQmdEOUlLg==", "cpu": [ "arm64" ], @@ -4487,9 +4487,9 @@ } }, "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.30.2.tgz", - "integrity": "sha512-5Vh9dGeblpTxWHpOx8iauV02popZDsCYMPIgiuw97OJ5uaDsL86cnqSFs5LZkG3ghHoX5isLgWzMs+eD1YzrnA==", + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.31.1.tgz", + "integrity": "sha512-mVZ7Pg2zIbe3XlNbZJdjs86YViQFoJSpc41CbVmKBPiGmC4YrfeOyz65ms2qpAobVd7WQsbW4PdsSJEMymyIMg==", "cpu": [ "arm64" ], @@ -4507,9 +4507,9 @@ } }, "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.30.2.tgz", - "integrity": "sha512-Cfd46gdmj1vQ+lR6VRTTadNHu6ALuw2pKR9lYq4FnhvgBc4zWY1EtZcAc6EffShbb1MFrIPfLDXD6Xprbnni4w==", + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.31.1.tgz", + "integrity": "sha512-xGlFWRMl+0KvUhgySdIaReQdB4FNudfUTARn7q0hh/V67PVGCs3ADFjw+6++kG1RNd0zdGRlEKa+T13/tQjPMA==", "cpu": [ "x64" ], @@ -4527,9 +4527,9 @@ } }, "node_modules/lightningcss-linux-x64-musl": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.30.2.tgz", - "integrity": "sha512-XJaLUUFXb6/QG2lGIW6aIk6jKdtjtcffUT0NKvIqhSBY3hh9Ch+1LCeH80dR9q9LBjG3ewbDjnumefsLsP6aiA==", + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.31.1.tgz", + "integrity": "sha512-eowF8PrKHw9LpoZii5tdZwnBcYDxRw2rRCyvAXLi34iyeYfqCQNA9rmUM0ce62NlPhCvof1+9ivRaTY6pSKDaA==", "cpu": [ "x64" ], @@ -4547,9 +4547,9 @@ } }, "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.30.2.tgz", - "integrity": "sha512-FZn+vaj7zLv//D/192WFFVA0RgHawIcHqLX9xuWiQt7P0PtdFEVaxgF9rjM/IRYHQXNnk61/H/gb2Ei+kUQ4xQ==", + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.31.1.tgz", + "integrity": "sha512-aJReEbSEQzx1uBlQizAOBSjcmr9dCdL3XuC/6HLXAxmtErsj2ICo5yYggg1qOODQMtnjNQv2UHb9NpOuFtYe4w==", "cpu": [ "arm64" ], @@ -4567,9 +4567,9 @@ } }, "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.30.2.tgz", - "integrity": "sha512-5g1yc73p+iAkid5phb4oVFMB45417DkRevRbt/El/gKXJk4jid+vPFF/AXbxn05Aky8PapwzZrdJShv5C0avjw==", + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.31.1.tgz", + "integrity": "sha512-I9aiFrbd7oYHwlnQDqr1Roz+fTz61oDDJX7n9tYF9FJymH1cIN1DtKw3iYt6b8WZgEjoNwVSncwF4wx/ZedMhw==", "cpu": [ "x64" ], @@ -5869,9 +5869,9 @@ } }, "node_modules/prettier": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.0.tgz", - "integrity": "sha512-yEPsovQfpxYfgWNhCfECjG5AQaO+K3dp6XERmOepyPDVqcJm+bjyCVO3pmU+nAPe0N5dDvekfGezt/EIiRe1TA==", + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.1.tgz", + "integrity": "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==", "dev": true, "license": "MIT", "bin": { @@ -7432,9 +7432,10 @@ "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==" }, "node_modules/unist-util-visit": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", - "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.1.0.tgz", + "integrity": "sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==", + "license": "MIT", "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0", diff --git a/package.json b/package.json index 914e5a1..e1d138a 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "hast-util-to-string": "^3.0.1", "is-absolute-url": "^5.0.0", "js-yaml": "^4.1.1", - "lightningcss": "^1.30.2", + "lightningcss": "^1.31.1", "mdast-util-find-and-replace": "^3.0.2", "mdast-util-to-hast": "^13.2.1", "mdast-util-to-string": "^4.0.0", @@ -91,7 +91,7 @@ "to-vfile": "^8.0.0", "toml": "^3.0.0", "unified": "^11.0.5", - "unist-util-visit": "^5.0.0", + "unist-util-visit": "^5.1.0", "vfile": "^6.0.3", "workerpool": "^10.0.1", "ws": "^8.19.0", @@ -101,13 +101,13 @@ "@types/d3": "^7.4.3", "@types/hast": "^3.0.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^25.0.9", + "@types/node": "^25.0.10", "@types/pretty-time": "^1.1.5", "@types/source-map-support": "^0.5.10", "@types/ws": "^8.18.1", "@types/yargs": "^17.0.35", "esbuild": "^0.27.2", - "prettier": "^3.8.0", + "prettier": "^3.8.1", "tsx": "^4.21.0", "typescript": "^5.9.3" } From 9576701d8532b9697df62c96d7c8676afd985b2d Mon Sep 17 00:00:00 2001 From: "Andrew G. Dunn" Date: Mon, 2 Mar 2026 11:31:53 -0500 Subject: [PATCH 08/10] fix: await micromorph() to prevent race condition with nav event handlers (#2323) micromorph() returns Promise because its internal patch() function is async and uses Promise.all for recursive child patching. Without await, the DOM morph may still be in progress when the nav event fires and downstream handlers attempt to rebuild dynamic content. Fixes #2322 --- quartz/components/scripts/spa.inline.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quartz/components/scripts/spa.inline.ts b/quartz/components/scripts/spa.inline.ts index 2898dc4..465e793 100644 --- a/quartz/components/scripts/spa.inline.ts +++ b/quartz/components/scripts/spa.inline.ts @@ -102,7 +102,7 @@ async function _navigate(url: URL, isBack: boolean = false) { html.body.appendChild(announcer) // morph body - micromorph(document.body, html.body) + await micromorph(document.body, html.body) // scroll into place and add history if (!isBack) { From 59b58076016c5e5f09f16ab0395fed02e2ebb72e Mon Sep 17 00:00:00 2001 From: wasita Date: Wed, 4 Mar 2026 10:42:49 -0500 Subject: [PATCH 09/10] =?UTF-8?q?=F0=9F=90=9B=20fix(cli):=20use=20'gray'?= =?UTF-8?q?=20instead=20of=20'grey'=20in=20styleText=20calls=20(#2321)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Node.js util.styleText does not accept 'grey' as a format name. While util.inspect.colors defines 'grey' as a non-enumerable alias for 'gray', styleText validates against Object.keys(inspect.colors) which only includes enumerable properties — so 'grey' has never been a valid styleText format and throws ERR_INVALID_ARG_VALUE. --- quartz/cli/handlers.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/quartz/cli/handlers.js b/quartz/cli/handlers.js index 9b68aed..eb340d0 100644 --- a/quartz/cli/handlers.js +++ b/quartz/cli/handlers.js @@ -318,7 +318,7 @@ export async function handleBuild(argv) { const result = await ctx.rebuild().catch((err) => { console.error(`${styleText("red", "Couldn't parse Quartz configuration:")} ${fp}`) - console.log(`Reason: ${styleText("grey", err)}`) + console.log(`Reason: ${styleText("gray", err)}`) process.exit(1) }) release() @@ -395,7 +395,7 @@ export async function handleBuild(argv) { status >= 200 && status < 300 ? styleText("green", `[${status}]`) : styleText("red", `[${status}]`) - console.log(statusString + styleText("grey", ` ${argv.baseDir}${req.url}`)) + console.log(statusString + styleText("gray", ` ${argv.baseDir}${req.url}`)) release() } @@ -406,7 +406,7 @@ export async function handleBuild(argv) { }) console.log( styleText("yellow", "[302]") + - styleText("grey", ` ${argv.baseDir}${req.url} -> ${newFp}`), + styleText("gray", ` ${argv.baseDir}${req.url} -> ${newFp}`), ) res.end() } @@ -482,7 +482,7 @@ export async function handleBuild(argv) { .on("change", () => build(clientRefresh)) .on("unlink", () => build(clientRefresh)) - console.log(styleText("grey", "hint: exit with ctrl+c")) + console.log(styleText("gray", "hint: exit with ctrl+c")) } } From 3d95b867c009f9df5af6320cc6a50c70cb9ff6fe Mon Sep 17 00:00:00 2001 From: Devon Campbell Date: Sat, 21 Mar 2026 20:22:54 -0400 Subject: [PATCH 10/10] Add Forgejo-backed editor --- package-lock.json | 254 +++++++++++++ package.json | 7 + quartz.config.ts | 2 +- quartz.layout.ts | 2 + quartz/components/Editor.tsx | 317 +++++++++++++++++ quartz/components/scripts/editor.inline.ts | 395 +++++++++++++++++++++ 6 files changed, 976 insertions(+), 1 deletion(-) create mode 100644 quartz/components/Editor.tsx create mode 100644 quartz/components/scripts/editor.inline.ts diff --git a/package-lock.json b/package-lock.json index ff22d60..6d0a7e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,13 @@ "license": "MIT", "dependencies": { "@clack/prompts": "^0.11.0", + "@codemirror/commands": "^6.10.3", + "@codemirror/lang-markdown": "^6.5.0", + "@codemirror/language": "^6.12.2", + "@codemirror/state": "^6.6.0", + "@codemirror/view": "^6.40.0", "@floating-ui/dom": "^1.7.4", + "@lezer/highlight": "^1.2.3", "@myriaddreamin/rehype-typst": "^0.6.0", "@napi-rs/simple-git": "0.1.22", "@tweenjs/tween.js": "^25.0.0", @@ -18,6 +24,7 @@ "async-mutex": "^0.5.0", "chokidar": "^5.0.0", "cli-spinner": "^0.2.10", + "codemirror": "^6.0.2", "d3": "^7.9.0", "esbuild-sass-plugin": "^3.6.0", "flexsearch": "^0.8.205", @@ -197,6 +204,147 @@ "sisteransi": "^1.0.5" } }, + "node_modules/@codemirror/autocomplete": { + "version": "6.20.1", + "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.20.1.tgz", + "integrity": "sha512-1cvg3Vz1dSSToCNlJfRA2WSI4ht3K+WplO0UMOgmUYPivCyy2oueZY6Lx7M9wThm7SDUBViRmuT+OG/i8+ON9A==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@codemirror/commands": { + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.10.3.tgz", + "integrity": "sha512-JFRiqhKu+bvSkDLI+rUhJwSxQxYb759W5GBezE8Uc8mHLqC9aV/9aTC7yJSqCtB3F00pylrLCwnyS91Ap5ej4Q==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.6.0", + "@codemirror/view": "^6.27.0", + "@lezer/common": "^1.1.0" + } + }, + "node_modules/@codemirror/lang-css": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@codemirror/lang-css/-/lang-css-6.3.1.tgz", + "integrity": "sha512-kr5fwBGiGtmz6l0LSJIbno9QrifNMUusivHbnA1H6Dmqy4HZFte3UAICix1VuKo0lMPKQr2rqB+0BkKi/S3Ejg==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.0.2", + "@lezer/css": "^1.1.7" + } + }, + "node_modules/@codemirror/lang-html": { + "version": "6.4.11", + "resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-6.4.11.tgz", + "integrity": "sha512-9NsXp7Nwp891pQchI7gPdTwBuSuT3K65NGTHWHNJ55HjYcHLllr0rbIZNdOzas9ztc1EUVBlHou85FFZS4BNnw==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/lang-css": "^6.0.0", + "@codemirror/lang-javascript": "^6.0.0", + "@codemirror/language": "^6.4.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/common": "^1.0.0", + "@lezer/css": "^1.1.0", + "@lezer/html": "^1.3.12" + } + }, + "node_modules/@codemirror/lang-javascript": { + "version": "6.2.5", + "resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-6.2.5.tgz", + "integrity": "sha512-zD4e5mS+50htS7F+TYjBPsiIFGanfVqg4HyUz6WNFikgOPf2BgKlx+TQedI1w6n/IqRBVBbBWmGFdLB/7uxO4A==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.6.0", + "@codemirror/lint": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/common": "^1.0.0", + "@lezer/javascript": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-markdown": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@codemirror/lang-markdown/-/lang-markdown-6.5.0.tgz", + "integrity": "sha512-0K40bZ35jpHya6FriukbgaleaqzBLZfOh7HuzqbMxBXkbYMJDxfF39c23xOgxFezR+3G+tR2/Mup+Xk865OMvw==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.7.1", + "@codemirror/lang-html": "^6.0.0", + "@codemirror/language": "^6.3.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "@lezer/common": "^1.2.1", + "@lezer/markdown": "^1.0.0" + } + }, + "node_modules/@codemirror/language": { + "version": "6.12.2", + "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.12.2.tgz", + "integrity": "sha512-jEPmz2nGGDxhRTg3lTpzmIyGKxz3Gp3SJES4b0nAuE5SWQoKdT5GoQ69cwMmFd+wvFUhYirtDTr0/DRHpQAyWg==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.23.0", + "@lezer/common": "^1.5.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0", + "style-mod": "^4.0.0" + } + }, + "node_modules/@codemirror/lint": { + "version": "6.9.5", + "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.9.5.tgz", + "integrity": "sha512-GElsbU9G7QT9xXhpUg1zWGmftA/7jamh+7+ydKRuT0ORpWS3wOSP0yT1FOlIZa7mIJjpVPipErsyvVqB9cfTFA==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.35.0", + "crelt": "^1.0.5" + } + }, + "node_modules/@codemirror/search": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.6.0.tgz", + "integrity": "sha512-koFuNXcDvyyotWcgOnZGmY7LZqEOXZaaxD/j6n18TCLx2/9HieZJ5H6hs1g8FiRxBD0DNfs0nXn17g872RmYdw==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.37.0", + "crelt": "^1.0.5" + } + }, + "node_modules/@codemirror/state": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.6.0.tgz", + "integrity": "sha512-4nbvra5R5EtiCzr9BTHiTLc+MLXK2QGiAVYMyi8PkQd3SR+6ixar/Q/01Fa21TBIDOZXgeWV4WppsQolSreAPQ==", + "license": "MIT", + "dependencies": { + "@marijn/find-cluster-break": "^1.0.0" + } + }, + "node_modules/@codemirror/view": { + "version": "6.40.0", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.40.0.tgz", + "integrity": "sha512-WA0zdU7xfF10+5I3HhUUq3kqOx3KjqmtQ9lqZjfK7jtYk4G72YW9rezcSywpaUMCWOMlq+6E0pO1IWg1TNIhtg==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.6.0", + "crelt": "^1.0.6", + "style-mod": "^4.1.0", + "w3c-keyname": "^2.2.4" + } + }, "node_modules/@emnapi/runtime": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.7.1.tgz", @@ -1134,6 +1282,79 @@ "node": "20 || >=22" } }, + "node_modules/@lezer/common": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.5.1.tgz", + "integrity": "sha512-6YRVG9vBkaY7p1IVxL4s44n5nUnaNnGM2/AckNgYOnxTG2kWh1vR8BMxPseWPjRNpb5VtXnMpeYAEAADoRV1Iw==", + "license": "MIT" + }, + "node_modules/@lezer/css": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@lezer/css/-/css-1.3.1.tgz", + "integrity": "sha512-PYAKeUVBo3HFThruRyp/iK91SwiZJnzXh8QzkQlwijB5y+N5iB28+iLk78o2zmKqqV0uolNhCwFqB8LA7b0Svg==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.3.0" + } + }, + "node_modules/@lezer/highlight": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.3.tgz", + "integrity": "sha512-qXdH7UqTvGfdVBINrgKhDsVTJTxactNNxLk7+UMwZhU13lMHaOBlJe9Vqp907ya56Y3+ed2tlqzys7jDkTmW0g==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.3.0" + } + }, + "node_modules/@lezer/html": { + "version": "1.3.13", + "resolved": "https://registry.npmjs.org/@lezer/html/-/html-1.3.13.tgz", + "integrity": "sha512-oI7n6NJml729m7pjm9lvLvmXbdoMoi2f+1pwSDJkl9d68zGr7a9Btz8NdHTGQZtW2DA25ybeuv/SyDb9D5tseg==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/javascript": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.5.4.tgz", + "integrity": "sha512-vvYx3MhWqeZtGPwDStM2dwgljd5smolYD2lR2UyFcHfxbBQebqx8yjmFmxtJ/E6nN6u1D9srOiVWm3Rb4tmcUA==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.1.3", + "@lezer/lr": "^1.3.0" + } + }, + "node_modules/@lezer/lr": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.8.tgz", + "integrity": "sha512-bPWa0Pgx69ylNlMlPvBPryqeLYQjyJjqPx+Aupm5zydLIF3NE+6MMLT8Yi23Bd9cif9VS00aUebn+6fDIGBcDA==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@lezer/markdown": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/@lezer/markdown/-/markdown-1.6.3.tgz", + "integrity": "sha512-jpGm5Ps+XErS+xA4urw7ogEGkeZOahVQF21Z6oECF0sj+2liwZopd2+I8uH5I/vZsRuuze3OxBREIANLf6KKUw==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.5.0", + "@lezer/highlight": "^1.0.0" + } + }, + "node_modules/@marijn/find-cluster-break": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@marijn/find-cluster-break/-/find-cluster-break-1.0.2.tgz", + "integrity": "sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g==", + "license": "MIT" + }, "node_modules/@myriaddreamin/rehype-typst": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/@myriaddreamin/rehype-typst/-/rehype-typst-0.6.0.tgz", @@ -2723,6 +2944,21 @@ "node": ">=20" } }, + "node_modules/codemirror": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-6.0.2.tgz", + "integrity": "sha512-VhydHotNW5w1UGK0Qj96BwSk/Zqbp9WbnyK2W/eVMv4QyF41INRGpjUhFJY7/uDNuudSc33a/PKr4iDqRduvHw==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/commands": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/lint": "^6.0.0", + "@codemirror/search": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0" + } + }, "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", @@ -2765,6 +3001,12 @@ "node": ">= 0.6" } }, + "node_modules/crelt": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.6.tgz", + "integrity": "sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==", + "license": "MIT" + }, "node_modules/cross-fetch": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", @@ -7107,6 +7349,12 @@ "node": ">=0.10.0" } }, + "node_modules/style-mod": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.3.tgz", + "integrity": "sha512-i/n8VsZydrugj3Iuzll8+x/00GH2vnYsk1eomD8QiRrSAeW6ItbCQDtfXCeJHd0iwiNagqjQkvpvREEPtW3IoQ==", + "license": "MIT" + }, "node_modules/style-to-js": { "version": "1.1.16", "resolved": "https://registry.npmjs.org/style-to-js/-/style-to-js-1.1.16.tgz", @@ -7556,6 +7804,12 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/w3c-keyname": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz", + "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==", + "license": "MIT" + }, "node_modules/web-namespaces": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz", diff --git a/package.json b/package.json index e1d138a..ea7c7ad 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,13 @@ }, "dependencies": { "@clack/prompts": "^0.11.0", + "@codemirror/commands": "^6.10.3", + "@codemirror/lang-markdown": "^6.5.0", + "@codemirror/language": "^6.12.2", + "@codemirror/state": "^6.6.0", + "@codemirror/view": "^6.40.0", "@floating-ui/dom": "^1.7.4", + "@lezer/highlight": "^1.2.3", "@myriaddreamin/rehype-typst": "^0.6.0", "@napi-rs/simple-git": "0.1.22", "@tweenjs/tween.js": "^25.0.0", @@ -44,6 +50,7 @@ "async-mutex": "^0.5.0", "chokidar": "^5.0.0", "cli-spinner": "^0.2.10", + "codemirror": "^6.0.2", "d3": "^7.9.0", "esbuild-sass-plugin": "^3.6.0", "flexsearch": "^0.8.205", diff --git a/quartz.config.ts b/quartz.config.ts index b3db3d6..126430e 100644 --- a/quartz.config.ts +++ b/quartz.config.ts @@ -89,7 +89,7 @@ const config: QuartzConfig = { Plugin.Favicon(), Plugin.NotFoundPage(), // Comment out CustomOgImages to speed up build time - Plugin.CustomOgImages(), + //Plugin.CustomOgImages(), ], }, } diff --git a/quartz.layout.ts b/quartz.layout.ts index 970a5be..335d29e 100644 --- a/quartz.layout.ts +++ b/quartz.layout.ts @@ -1,5 +1,6 @@ import { PageLayout, SharedLayout } from "./quartz/cfg" import * as Component from "./quartz/components" +import Editor from "./quartz/components/Editor" // components shared across all pages export const sharedPageComponents: SharedLayout = { @@ -24,6 +25,7 @@ export const defaultContentPageLayout: PageLayout = { Component.ArticleTitle(), Component.ContentMeta(), Component.TagList(), + Editor(), ], left: [ Component.PageTitle(), diff --git a/quartz/components/Editor.tsx b/quartz/components/Editor.tsx new file mode 100644 index 0000000..7d5b9c0 --- /dev/null +++ b/quartz/components/Editor.tsx @@ -0,0 +1,317 @@ +import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"; +import editorScript from "./scripts/editor.inline"; +import path from "path"; + +const Editor: QuartzComponent = ({ fileData, allFiles, displayClass }: QuartzComponentProps) => { + if (!fileData.filePath) return null; + + const dIndex = process.argv.findIndex(arg => arg === "-d" || arg === "--directory"); + const baseDir = dIndex !== -1 ? process.argv[dIndex + 1] : "content"; + + const absoluteBase = path.resolve(process.cwd(), baseDir); + const absoluteFile = path.resolve(process.cwd(), fileData.filePath); + const repoFilePath = path.relative(absoluteBase, absoluteFile); + + const directories = new Set(); + for (const file of allFiles) { + if (file.slug) { + const parts = file.slug.split("/"); + if (parts.length > 1) { + parts.pop(); + directories.add(parts.join("/")); + } + } + } + + return ( +
+ +
+ + +
+ + +
+ ); +}; + +Editor.afterDOMLoaded = editorScript; +Editor.css = ` + #fab-container { + position: fixed; + bottom: 2rem; + right: 2rem; + display: flex; + flex-direction: row; + gap: 1rem; + z-index: 999; + } + + .fab { + width: 3.5rem; + height: 3.5rem; + border-radius: 50%; + background: var(--secondary); + color: var(--light); + display: flex; + align-items: center; + justify-content: center; + box-shadow: 0 4px 12px rgba(0,0,0,0.3); + cursor: pointer; + border: none; + transition: transform 0.2s ease, background-color 0.2s ease; + } + + .fab:hover:not(:disabled) { + background: var(--tertiary); + transform: scale(1.05); + } + + .fab:disabled { + opacity: 0.7; + cursor: not-allowed; + } + + #editor-layout { + width: 100%; + display: flex; + flex-direction: column; + margin-top: 1rem; + margin-bottom: 2rem; + } + + #editor-layout.is-new-note { + margin-top: 6rem; + } + + #file-path-controls { + display: flex; + gap: 1rem; + margin-bottom: 1rem; + } + + @media (max-width: 800px) { + #editor-layout.is-new-note { + margin-top: 1rem; + } + } + + @media (max-width: 600px) { + #file-path-controls { + flex-direction: column; + gap: 0.5rem; + } + } + + .input-group { + display: flex; + flex-direction: column; + flex: 1; + } + + .input-group label { + font-size: 0.8rem; + color: var(--gray); + margin-bottom: 0.2rem; + } + + .input-group input { + padding: 0.5rem; + border: 1px solid var(--gray); + border-radius: 4px; + background: var(--light); + color: var(--dark); + font-family: inherit; + } + + .input-group input:disabled { + opacity: 0.7; + cursor: not-allowed; + } + + #editor-wrapper { + width: 100%; + border: 1px solid var(--darkgray); + border-radius: 5px; + overflow: hidden; + background: #2a2a2a; + cursor: text; + } + + .cm-editor { + min-height: 60vh; + height: auto; + background-color: #2a2a2a; + } + + .cm-scroller { + height: 100% !important; + min-height: 60vh; + } + + .cm-content { + min-height: 100%; + } + + #editor-controls { + margin-top: 1rem; + display: flex; + flex-direction: column; + gap: 0.5rem; + } + + #commit-subject, #commit-body { + width: 100%; + padding: 0.5rem; + border: 1px solid var(--gray); + border-radius: 4px; + background: var(--light); + color: var(--dark); + font-family: inherit; + box-sizing: border-box; + } + + #commit-subject:disabled, #commit-body:disabled { + opacity: 0.7; + cursor: not-allowed; + } + + #commit-details { + margin-top: 0.2rem; + margin-bottom: 1.5rem; /* Increased vertical spacing above the buttons */ + } + + #commit-details summary { + cursor: pointer; + color: var(--gray); + font-size: 0.9rem; + user-select: none; + display: inline-block; + } + + #commit-details summary:hover { + color: var(--darkgray); + } + + #commit-body { + margin-top: 0.5rem; + resize: vertical; + min-height: 4rem; + } + + .editor-buttons { + display: flex; + justify-content: space-between; /* Pushes Delete to left, Save/Cancel to right */ + align-items: center; + } + + .editor-buttons-right { + display: flex; + gap: 0.5rem; + } + + .editor-buttons button { + padding: 0.5rem 1rem; + cursor: pointer; + border: none; + border-radius: 4px; + font-weight: bold; + } + + .editor-buttons button:disabled { + opacity: 0.5; + cursor: not-allowed; + } + + #save-button { + background: var(--secondary); + color: var(--light); + } + + #save-button:hover:not(:disabled) { + background: var(--tertiary); + } + + #cancel-button { + background: var(--lightgray); + color: var(--dark); + } + + #cancel-button:hover:not(:disabled) { + background: var(--gray); + } + + #delete-button { + background: transparent; + color: #e06c75; /* A distinct red color for destructive actions */ + border: 1px solid #e06c75; + } + + #delete-button:hover:not(:disabled) { + background: rgba(224, 108, 117, 0.1); + } + + #delete-button:disabled { + border-color: var(--gray); + color: var(--gray); + } + + @media (max-width: 800px) { + #fab-container { + bottom: 1.5rem; + right: 1.5rem; + } + + .fab { + width: 3rem; + height: 3rem; + } + } +`; + +export default (() => Editor) satisfies QuartzComponentConstructor; diff --git a/quartz/components/scripts/editor.inline.ts b/quartz/components/scripts/editor.inline.ts new file mode 100644 index 0000000..2eada66 --- /dev/null +++ b/quartz/components/scripts/editor.inline.ts @@ -0,0 +1,395 @@ +import { EditorState, Compartment } from "@codemirror/state"; +import { EditorView, basicSetup } from "codemirror"; +import { markdown } from "@codemirror/lang-markdown"; +import { syntaxHighlighting, HighlightStyle } from "@codemirror/language"; +import { tags as t } from "@lezer/highlight"; + +const FORGEJO_URL = "https://code.c.devon.lol"; +const REPO_OWNER = "Devon"; +const REPO_NAME = "knowledgebase"; +const BRANCH = "main"; + +const customHighlightStyle = HighlightStyle.define([ + { tag: t.heading, color: "#61afef", fontWeight: "bold" }, + { tag: t.keyword, color: "#c678dd" }, + { tag: t.url, color: "#56b6c2" }, + { tag: t.link, color: "#56b6c2", textDecoration: "underline" }, + { tag: t.punctuation, color: "#e06c75" }, + { tag: t.strong, fontWeight: "bold" }, + { tag: t.emphasis, fontStyle: "italic" }, + { tag: t.strikethrough, textDecoration: "line-through" }, + { tag: t.meta, color: "#7f848e" }, + { tag: t.comment, color: "#7f848e", fontStyle: "italic" }, + { tag: t.string, color: "#98c379" }, + { tag: t.number, color: "#d19a66" }, + { tag: t.propertyName, color: "#e06c75" }, + { tag: t.variableName, color: "#e06c75" }, +]); + +const editorTheme = EditorView.theme({ + "&": { backgroundColor: "#2a2a2a", color: "#e0e0e0", fontSize: "16px" }, + ".cm-content": { minHeight: "60vh", padding: "1rem" }, + "&.cm-focused .cm-cursor": { borderLeftColor: "#e0e0e0" }, + "&.cm-focused .cm-selectionBackground, ::selection": { backgroundColor: "#444444" }, + ".cm-gutters": { backgroundColor: "#222222", color: "#888888", borderRight: "1px solid #444444" }, + ".cm-scroller": { fontFamily: "inherit" } +}, { dark: true }); + +document.addEventListener("nav", () => { + const fabContainer = document.getElementById("fab-container"); + const editBtn = document.getElementById("edit-button") as HTMLButtonElement; + const newBtn = document.getElementById("new-button") as HTMLButtonElement; + const saveBtn = document.getElementById("save-button") as HTMLButtonElement; + const cancelBtn = document.getElementById("cancel-button") as HTMLButtonElement; + const deleteBtn = document.getElementById("delete-button") as HTMLButtonElement; + const layout = document.getElementById("editor-layout"); + const wrapper = document.getElementById("editor-wrapper"); + const commitSubjectInput = document.getElementById("commit-subject") as HTMLInputElement; + const commitBodyInput = document.getElementById("commit-body") as HTMLTextAreaElement; + const commitDetails = document.getElementById("commit-details") as HTMLDetailsElement; + const fileDirectoryInput = document.getElementById("file-directory") as HTMLInputElement; + const fileNameInput = document.getElementById("file-name") as HTMLInputElement; + + if (!editBtn || !newBtn || !layout || !wrapper || !fabContainer || !deleteBtn) return; + + let editorView: EditorView | null = null; + let currentFileSha = ""; + const filePath = editBtn.getAttribute("data-filepath") || ""; + const editableCompartment = new Compartment(); + + let isCreatingNewNote = false; + + const encodeBase64 = (str: string) => btoa(unescape(encodeURIComponent(str))); + const decodeBase64 = (str: string) => decodeURIComponent(escape(atob(str))); + + const getPat = () => { + let pat = localStorage.getItem("forgejo_pat"); + if (!pat) { + pat = prompt("Enter your Forgejo Personal Access Token:"); + if (pat) localStorage.setItem("forgejo_pat", pat); + } + return pat; + }; + + const getCenterColumn = () => document.querySelector(".center"); + + const onWrapperClick = (e: MouseEvent) => { + const target = e.target as HTMLElement; + if (target === wrapper || target.classList.contains("cm-scroller")) { + editorView?.focus(); + } + }; + + const performDOMClose = () => { + const center = getCenterColumn(); + if (center) { + Array.from(center.children).forEach(child => { + if (child !== layout) { + (child as HTMLElement).style.display = ""; + } + }); + } + + layout.style.display = "none"; + layout.classList.remove("is-new-note"); + fabContainer.style.display = "flex"; + + commitSubjectInput.value = ""; + commitBodyInput.value = ""; + fileDirectoryInput.value = ""; + fileNameInput.value = ""; + commitDetails.open = false; + isCreatingNewNote = false; + }; + + const closeEditor = () => { + if (history.state?.isEditor) { + history.back(); + } else { + performDOMClose(); + history.replaceState(null, "", window.location.pathname); + } + }; + + const openEditorUI = (content: string, mode: "edit" | "new", pushHistory = true) => { + const center = getCenterColumn(); + if (center) { + if (layout.parentNode !== center) { + center.appendChild(layout); + } + + Array.from(center.children).forEach(child => { + if (child !== layout) { + const el = child as HTMLElement; + if (mode === "edit" && el.classList.contains("page-header")) { + el.style.display = ""; + } else { + el.style.display = "none"; + } + } + }); + } + + fabContainer.style.display = "none"; + layout.style.display = "flex"; + + if (mode === "new") { + layout.classList.add("is-new-note"); + deleteBtn.style.display = "none"; + commitSubjectInput.placeholder = `Create new note...`; + } else { + layout.classList.remove("is-new-note"); + deleteBtn.style.display = "block"; + commitSubjectInput.placeholder = `Update ${filePath}...`; + } + + if (pushHistory) { + if (mode === "edit") { + history.pushState({ isEditor: true }, "", "?edit"); + } else { + history.pushState({ isEditor: true }, "", "/?new"); + } + } + + if (editorView) editorView.destroy(); + + editorView = new EditorView({ + state: EditorState.create({ + doc: content, + extensions: [ + basicSetup, + markdown(), + editorTheme, + syntaxHighlighting(customHighlightStyle), + editableCompartment.of(EditorView.editable.of(true)) + ] + }), + parent: wrapper + }); + }; + + const onEdit = async (e?: Event, pushHistory = true) => { + const pat = getPat(); + if (!pat || !filePath) return; + + isCreatingNewNote = false; + editBtn.disabled = true; + + const parts = filePath.split("/"); + const fName = parts.pop() || ""; + fileDirectoryInput.value = parts.join("/"); + fileNameInput.value = fName.replace(/\.md$/i, ""); + + const encodedFilePath = filePath.split('/').map(encodeURIComponent).join('/'); + + try { + const res = await fetch(`${FORGEJO_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/contents/${encodedFilePath}?ref=${BRANCH}`, { + headers: { "Authorization": `token ${pat}` } + }); + + if (!res.ok) throw new Error("Failed to fetch file. Check your PAT."); + const data = await res.json(); + + currentFileSha = data.sha; + const content = decodeBase64(data.content); + + openEditorUI(content, "edit", pushHistory); + } catch (err) { + alert(err); + fabContainer.style.display = "flex"; + } finally { + editBtn.disabled = false; + } + }; + + const onNewNote = (e?: Event, pushHistory = true) => { + isCreatingNewNote = true; + currentFileSha = ""; + + fileDirectoryInput.value = localStorage.getItem("forgejo_default_dir") || ""; + fileNameInput.value = ""; + + openEditorUI("", "new", pushHistory); + }; + + const onCancel = () => closeEditor(); + + const lockUI = (isLocked: boolean) => { + if (saveBtn) saveBtn.disabled = isLocked; + if (cancelBtn) cancelBtn.disabled = isLocked; + if (deleteBtn) deleteBtn.disabled = isLocked; + commitSubjectInput.disabled = isLocked; + commitBodyInput.disabled = isLocked; + fileDirectoryInput.disabled = isLocked; + fileNameInput.disabled = isLocked; + + if (editorView) { + editorView.dispatch({ + effects: editableCompartment.reconfigure(EditorView.editable.of(!isLocked)) + }); + } + }; + + const onSave = async () => { + if (!editorView) return; + const pat = getPat(); + const newContent = editorView.state.doc.toString(); + + const dir = fileDirectoryInput.value.trim(); + let file = fileNameInput.value.trim(); + + if (!file) { + alert("Please enter a Note Name."); + return; + } + if (file.startsWith(".")) { + alert("Filename must not start with a dot."); + return; + } + if (/[\[\]#\^|\\\/:]/.test(file)) { + alert("Filename cannot contain the following characters: [ ] # ^ | \\ / :"); + return; + } + if (!file.toLowerCase().endsWith(".md")) { + file += ".md"; + } + + const cleanDir = dir.replace(/\/$/, ""); + const targetFilePath = cleanDir ? `${cleanDir}/${file}` : file; + + const isMovingOrRenaming = !isCreatingNewNote && targetFilePath !== filePath; + + let defaultSubject = `Update ${targetFilePath}`; + if (isCreatingNewNote) defaultSubject = `Create ${targetFilePath}`; + if (isMovingOrRenaming) defaultSubject = `Move ${filePath} to ${targetFilePath}`; + + const subject = commitSubjectInput.value.trim() || defaultSubject; + const body = commitBodyInput.value.trim(); + const fullMessage = body ? `${subject}\n\n${body}` : subject; + + lockUI(true); + if (saveBtn) saveBtn.innerText = "Saving..."; + + const encodedTargetFilePath = targetFilePath.split('/').map(encodeURIComponent).join('/'); + + try { + const payload: any = { + branch: BRANCH, + content: encodeBase64(newContent), + message: fullMessage + }; + + if (!isCreatingNewNote) { + payload.sha = currentFileSha; + if (isMovingOrRenaming) { + payload.from_path = filePath; + } + } + + const res = await fetch(`${FORGEJO_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/contents/${encodedTargetFilePath}`, { + method: isCreatingNewNote ? "POST" : "PUT", + headers: { + "Authorization": `token ${pat}`, + "Content-Type": "application/json" + }, + body: JSON.stringify(payload) + }); + + if (!res.ok) { + const errorData = await res.json().catch(() => ({})); + throw new Error(errorData.message || "Failed to save. If creating a new file, ensure it doesn't already exist."); + } + + if (isCreatingNewNote) { + localStorage.setItem("forgejo_default_dir", cleanDir); + } + + closeEditor(); + alert(`Saved successfully!\n\nChanges will be live in about 5 minutes once the site rebuilds.\n\nNote: If you moved or renamed this note, it will be unavailable at its old path after the rebuild. Editing a moved/renamed note before the rebuild completes will fail.`); + + } catch (err) { + alert(err); + } finally { + lockUI(false); + if (saveBtn) saveBtn.innerText = "Save"; + } + }; + + const onDelete = async () => { + if (!filePath || !currentFileSha) return; + + const confirmDelete = confirm(`Are you sure you want to permanently delete:\n\n${filePath}\n\nThis cannot be undone.`); + if (!confirmDelete) return; + + const pat = getPat(); + if (!pat) return; + + const subject = commitSubjectInput.value.trim() || `Delete ${filePath}`; + const body = commitBodyInput.value.trim(); + const fullMessage = body ? `${subject}\n\n${body}` : subject; + + lockUI(true); + if (deleteBtn) deleteBtn.innerText = "Deleting..."; + + const encodedFilePath = filePath.split('/').map(encodeURIComponent).join('/'); + + try { + const res = await fetch(`${FORGEJO_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/contents/${encodedFilePath}`, { + method: "DELETE", + headers: { + "Authorization": `token ${pat}`, + "Content-Type": "application/json" + }, + body: JSON.stringify({ + branch: BRANCH, + message: fullMessage, + sha: currentFileSha + }) + }); + + if (!res.ok) { + const errorData = await res.json().catch(() => ({})); + throw new Error(errorData.message || "Failed to delete file."); + } + + closeEditor(); + alert(`Deleted successfully!\n\nChanges will be live in about 5 minutes once the site rebuilds.`); + + } catch (err) { + alert(err); + } finally { + lockUI(false); + if (deleteBtn) deleteBtn.innerText = "Delete Note"; + } + }; + + const query = new URLSearchParams(window.location.search); + if (query.has("edit")) { + onEdit(undefined, false); + } else if (query.has("new")) { + onNewNote(undefined, false); + } + + window.addEventListener("popstate", (e) => { + if (layout.style.display !== "none" && !e.state?.isEditor) { + performDOMClose(); + } + }); + + wrapper.addEventListener("click", onWrapperClick); + editBtn.addEventListener("click", onEdit); + newBtn.addEventListener("click", onNewNote); + cancelBtn?.addEventListener("click", onCancel); + saveBtn?.addEventListener("click", onSave); + deleteBtn?.addEventListener("click", onDelete); + + window.addCleanup(() => { + wrapper.removeEventListener("click", onWrapperClick); + editBtn.removeEventListener("click", onEdit); + newBtn.removeEventListener("click", onNewNote); + cancelBtn?.removeEventListener("click", onCancel); + saveBtn?.removeEventListener("click", onSave); + deleteBtn?.removeEventListener("click", onDelete); + if (editorView) editorView.destroy(); + }); +});