From 61770d3e50e6054fbdfa11c174bf45701f07b47b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 10 Apr 2025 16:17:15 -0700 Subject: [PATCH 01/27] chore(deps): bump the production-dependencies group with 6 updates (#1913) Bumps the production-dependencies group with 6 updates: | Package | From | To | | --- | --- | --- | | [preact](https://github.com/preactjs/preact) | `10.26.4` | `10.26.5` | | [remark-rehype](https://github.com/remarkjs/remark-rehype) | `11.1.1` | `11.1.2` | | [sharp](https://github.com/lovell/sharp) | `0.33.5` | `0.34.1` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `22.13.14` | `22.14.0` | | [@types/ws](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ws) | `8.18.0` | `8.18.1` | | [typescript](https://github.com/microsoft/TypeScript) | `5.8.2` | `5.8.3` | Updates `preact` from 10.26.4 to 10.26.5 - [Release notes](https://github.com/preactjs/preact/releases) - [Commits](https://github.com/preactjs/preact/compare/10.26.4...10.26.5) Updates `remark-rehype` from 11.1.1 to 11.1.2 - [Release notes](https://github.com/remarkjs/remark-rehype/releases) - [Commits](https://github.com/remarkjs/remark-rehype/compare/11.1.1...11.1.2) Updates `sharp` from 0.33.5 to 0.34.1 - [Release notes](https://github.com/lovell/sharp/releases) - [Commits](https://github.com/lovell/sharp/compare/v0.33.5...v0.34.1) Updates `@types/node` from 22.13.14 to 22.14.0 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `@types/ws` from 8.18.0 to 8.18.1 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ws) Updates `typescript` from 5.8.2 to 5.8.3 - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml) - [Commits](https://github.com/microsoft/TypeScript/commits) --- updated-dependencies: - dependency-name: preact dependency-version: 10.26.5 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: remark-rehype dependency-version: 11.1.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: sharp dependency-version: 0.34.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: "@types/node" dependency-version: 22.14.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: "@types/ws" dependency-version: 8.18.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: typescript dependency-version: 5.8.3 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 | 261 +++++++++++++++++++++++++--------------------- package.json | 12 +-- 2 files changed, 146 insertions(+), 127 deletions(-) diff --git a/package-lock.json b/package-lock.json index 43f712f..46be935 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "micromorph": "^0.4.5", "minimatch": "^10.0.1", "pixi.js": "^8.9.1", - "preact": "^10.26.4", + "preact": "^10.26.5", "preact-render-to-string": "^6.5.13", "pretty-bytes": "^6.1.1", "pretty-time": "^1.1.0", @@ -55,13 +55,13 @@ "remark-gfm": "^4.0.1", "remark-math": "^6.0.0", "remark-parse": "^11.0.0", - "remark-rehype": "^11.1.1", + "remark-rehype": "^11.1.2", "remark-smartypants": "^3.0.2", "rfdc": "^1.4.1", "rimraf": "^6.0.1", "satori": "^0.12.2", "serve-handler": "^6.1.6", - "sharp": "^0.33.5", + "sharp": "^0.34.1", "shiki": "^1.26.2", "source-map-support": "^0.5.21", "to-vfile": "^8.0.0", @@ -80,15 +80,15 @@ "@types/d3": "^7.4.3", "@types/hast": "^3.0.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^22.13.14", + "@types/node": "^22.14.0", "@types/pretty-time": "^1.1.5", "@types/source-map-support": "^0.5.10", - "@types/ws": "^8.18.0", + "@types/ws": "^8.18.1", "@types/yargs": "^17.0.33", "esbuild": "^0.25.2", "prettier": "^3.5.3", "tsx": "^4.19.3", - "typescript": "^5.8.2" + "typescript": "^5.8.3" }, "engines": { "node": ">=20", @@ -198,9 +198,9 @@ } }, "node_modules/@emnapi/runtime": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.3.1.tgz", - "integrity": "sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.4.0.tgz", + "integrity": "sha512-64WYIf4UYcdLnbKn/umDlNjQDSS8AgZrI/R9+x5ilkUVFxXcA1Ebl+gQLc/6mERA4407Xof0R7wEyEuj091CVw==", "license": "MIT", "optional": true, "dependencies": { @@ -630,9 +630,9 @@ "integrity": "sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==" }, "node_modules/@img/sharp-darwin-arm64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz", - "integrity": "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==", + "version": "0.34.1", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.1.tgz", + "integrity": "sha512-pn44xgBtgpEbZsu+lWf2KNb6OAf70X68k+yk69Ic2Xz11zHR/w24/U49XT7AeRwJ0Px+mhALhU5LPci1Aymk7A==", "cpu": [ "arm64" ], @@ -648,13 +648,13 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-darwin-arm64": "1.0.4" + "@img/sharp-libvips-darwin-arm64": "1.1.0" } }, "node_modules/@img/sharp-darwin-x64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz", - "integrity": "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==", + "version": "0.34.1", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.1.tgz", + "integrity": "sha512-VfuYgG2r8BpYiOUN+BfYeFo69nP/MIwAtSJ7/Zpxc5QF3KS22z8Pvg3FkrSFJBPNQ7mmcUcYQFBmEQp7eu1F8Q==", "cpu": [ "x64" ], @@ -670,13 +670,13 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-darwin-x64": "1.0.4" + "@img/sharp-libvips-darwin-x64": "1.1.0" } }, "node_modules/@img/sharp-libvips-darwin-arm64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz", - "integrity": "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.1.0.tgz", + "integrity": "sha512-HZ/JUmPwrJSoM4DIQPv/BfNh9yrOA8tlBbqbLz4JZ5uew2+o22Ik+tHQJcih7QJuSa0zo5coHTfD5J8inqj9DA==", "cpu": [ "arm64" ], @@ -690,9 +690,9 @@ } }, "node_modules/@img/sharp-libvips-darwin-x64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz", - "integrity": "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.1.0.tgz", + "integrity": "sha512-Xzc2ToEmHN+hfvsl9wja0RlnXEgpKNmftriQp6XzY/RaSfwD9th+MSh0WQKzUreLKKINb3afirxW7A0fz2YWuQ==", "cpu": [ "x64" ], @@ -706,9 +706,9 @@ } }, "node_modules/@img/sharp-libvips-linux-arm": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz", - "integrity": "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.1.0.tgz", + "integrity": "sha512-s8BAd0lwUIvYCJyRdFqvsj+BJIpDBSxs6ivrOPm/R7piTs5UIwY5OjXrP2bqXC9/moGsyRa37eYWYCOGVXxVrA==", "cpu": [ "arm" ], @@ -722,9 +722,9 @@ } }, "node_modules/@img/sharp-libvips-linux-arm64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz", - "integrity": "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.1.0.tgz", + "integrity": "sha512-IVfGJa7gjChDET1dK9SekxFFdflarnUB8PwW8aGwEoF3oAsSDuNUTYS+SKDOyOJxQyDC1aPFMuRYLoDInyV9Ew==", "cpu": [ "arm64" ], @@ -737,10 +737,26 @@ "url": "https://opencollective.com/libvips" } }, + "node_modules/@img/sharp-libvips-linux-ppc64": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.1.0.tgz", + "integrity": "sha512-tiXxFZFbhnkWE2LA8oQj7KYR+bWBkiV2nilRldT7bqoEZ4HiDOcePr9wVDAZPi/Id5fT1oY9iGnDq20cwUz8lQ==", + "cpu": [ + "ppc64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, "node_modules/@img/sharp-libvips-linux-s390x": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.4.tgz", - "integrity": "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.1.0.tgz", + "integrity": "sha512-xukSwvhguw7COyzvmjydRb3x/09+21HykyapcZchiCUkTThEQEOMtBj9UhkaBRLuBrgLFzQ2wbxdeCCJW/jgJA==", "cpu": [ "s390x" ], @@ -754,9 +770,9 @@ } }, "node_modules/@img/sharp-libvips-linux-x64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz", - "integrity": "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.1.0.tgz", + "integrity": "sha512-yRj2+reB8iMg9W5sULM3S74jVS7zqSzHG3Ol/twnAAkAhnGQnpjj6e4ayUz7V+FpKypwgs82xbRdYtchTTUB+Q==", "cpu": [ "x64" ], @@ -770,9 +786,9 @@ } }, "node_modules/@img/sharp-libvips-linuxmusl-arm64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.4.tgz", - "integrity": "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.1.0.tgz", + "integrity": "sha512-jYZdG+whg0MDK+q2COKbYidaqW/WTz0cc1E+tMAusiDygrM4ypmSCjOJPmFTvHHJ8j/6cAGyeDWZOsK06tP33w==", "cpu": [ "arm64" ], @@ -786,9 +802,9 @@ } }, "node_modules/@img/sharp-libvips-linuxmusl-x64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz", - "integrity": "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.1.0.tgz", + "integrity": "sha512-wK7SBdwrAiycjXdkPnGCPLjYb9lD4l6Ze2gSdAGVZrEL05AOUJESWU2lhlC+Ffn5/G+VKuSm6zzbQSzFX/P65A==", "cpu": [ "x64" ], @@ -802,9 +818,9 @@ } }, "node_modules/@img/sharp-linux-arm": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz", - "integrity": "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==", + "version": "0.34.1", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.1.tgz", + "integrity": "sha512-anKiszvACti2sGy9CirTlNyk7BjjZPiML1jt2ZkTdcvpLU1YH6CXwRAZCA2UmRXnhiIftXQ7+Oh62Ji25W72jA==", "cpu": [ "arm" ], @@ -820,13 +836,13 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-arm": "1.0.5" + "@img/sharp-libvips-linux-arm": "1.1.0" } }, "node_modules/@img/sharp-linux-arm64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz", - "integrity": "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==", + "version": "0.34.1", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.1.tgz", + "integrity": "sha512-kX2c+vbvaXC6vly1RDf/IWNXxrlxLNpBVWkdpRq5Ka7OOKj6nr66etKy2IENf6FtOgklkg9ZdGpEu9kwdlcwOQ==", "cpu": [ "arm64" ], @@ -842,13 +858,13 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-arm64": "1.0.4" + "@img/sharp-libvips-linux-arm64": "1.1.0" } }, "node_modules/@img/sharp-linux-s390x": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.5.tgz", - "integrity": "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==", + "version": "0.34.1", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.1.tgz", + "integrity": "sha512-7s0KX2tI9mZI2buRipKIw2X1ufdTeaRgwmRabt5bi9chYfhur+/C1OXg3TKg/eag1W+6CCWLVmSauV1owmRPxA==", "cpu": [ "s390x" ], @@ -864,13 +880,13 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-s390x": "1.0.4" + "@img/sharp-libvips-linux-s390x": "1.1.0" } }, "node_modules/@img/sharp-linux-x64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz", - "integrity": "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==", + "version": "0.34.1", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.1.tgz", + "integrity": "sha512-wExv7SH9nmoBW3Wr2gvQopX1k8q2g5V5Iag8Zk6AVENsjwd+3adjwxtp3Dcu2QhOXr8W9NusBU6XcQUohBZ5MA==", "cpu": [ "x64" ], @@ -886,13 +902,13 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-x64": "1.0.4" + "@img/sharp-libvips-linux-x64": "1.1.0" } }, "node_modules/@img/sharp-linuxmusl-arm64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.5.tgz", - "integrity": "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==", + "version": "0.34.1", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.1.tgz", + "integrity": "sha512-DfvyxzHxw4WGdPiTF0SOHnm11Xv4aQexvqhRDAoD00MzHekAj9a/jADXeXYCDFH/DzYruwHbXU7uz+H+nWmSOQ==", "cpu": [ "arm64" ], @@ -908,13 +924,13 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-arm64": "1.0.4" + "@img/sharp-libvips-linuxmusl-arm64": "1.1.0" } }, "node_modules/@img/sharp-linuxmusl-x64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz", - "integrity": "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==", + "version": "0.34.1", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.1.tgz", + "integrity": "sha512-pax/kTR407vNb9qaSIiWVnQplPcGU8LRIJpDT5o8PdAx5aAA7AS3X9PS8Isw1/WfqgQorPotjrZL3Pqh6C5EBg==", "cpu": [ "x64" ], @@ -930,20 +946,20 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-x64": "1.0.4" + "@img/sharp-libvips-linuxmusl-x64": "1.1.0" } }, "node_modules/@img/sharp-wasm32": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.5.tgz", - "integrity": "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==", + "version": "0.34.1", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.34.1.tgz", + "integrity": "sha512-YDybQnYrLQfEpzGOQe7OKcyLUCML4YOXl428gOOzBgN6Gw0rv8dpsJ7PqTHxBnXnwXr8S1mYFSLSa727tpz0xg==", "cpu": [ "wasm32" ], "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", "optional": true, "dependencies": { - "@emnapi/runtime": "^1.2.0" + "@emnapi/runtime": "^1.4.0" }, "engines": { "node": "^18.17.0 || ^20.3.0 || >=21.0.0" @@ -953,9 +969,9 @@ } }, "node_modules/@img/sharp-win32-ia32": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.5.tgz", - "integrity": "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==", + "version": "0.34.1", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.1.tgz", + "integrity": "sha512-WKf/NAZITnonBf3U1LfdjoMgNO5JYRSlhovhRhMxXVdvWYveM4kM3L8m35onYIdh75cOMCo1BexgVQcCDzyoWw==", "cpu": [ "ia32" ], @@ -972,9 +988,9 @@ } }, "node_modules/@img/sharp-win32-x64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz", - "integrity": "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==", + "version": "0.34.1", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.1.tgz", + "integrity": "sha512-hw1iIAHpNE8q3uMIRCgGOeDoz9KtFNarFLQclLxr/LK1VBkj8nby18RjFvr6aP7USRYAjTZW6yisnBWMX571Tw==", "cpu": [ "x64" ], @@ -1924,13 +1940,13 @@ } }, "node_modules/@types/node": { - "version": "22.13.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.14.tgz", - "integrity": "sha512-Zs/Ollc1SJ8nKUAgc7ivOEdIBM8JAKgrqqUYi2J997JuKO7/tpQC+WCetQ1sypiKCQWHdvdg9wBNpUPEWZae7w==", + "version": "22.14.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.14.0.tgz", + "integrity": "sha512-Kmpl+z84ILoG+3T/zQFyAJsU6EPTmOCj8/2+83fSN6djd6I4o7uOuGIH6vq3PrjY5BGitSbFuMN18j3iknubbA==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.20.0" + "undici-types": "~6.21.0" } }, "node_modules/@types/pretty-time": { @@ -1954,9 +1970,9 @@ "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==" }, "node_modules/@types/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8svvI3hMyvN0kKCJMvTJP/x6Y/EoQbepff882wL+Sn5QsXb3etnamgrJq4isrBxSJj5L2AuXcI0+bgkoAXGUJw==", + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==", "dev": true, "license": "MIT", "dependencies": { @@ -5526,9 +5542,9 @@ "license": "MIT" }, "node_modules/preact": { - "version": "10.26.4", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.26.4.tgz", - "integrity": "sha512-KJhO7LBFTjP71d83trW+Ilnjbo+ySsaAgCfXOXUlmGzJ4ygYPWmysm77yg4emwfmoz3b22yvH5IsVFHbhUaH5w==", + "version": "10.26.5", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.26.5.tgz", + "integrity": "sha512-fmpDkgfGU6JYux9teDWLhj9mKN55tyepwYbxHgQuIxbWQzgFg5vk7Mrrtfx7xRxq798ynkY4DDDxZr235Kk+4w==", "license": "MIT", "funding": { "type": "opencollective", @@ -5905,9 +5921,10 @@ } }, "node_modules/remark-rehype": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-11.1.1.tgz", - "integrity": "sha512-g/osARvjkBXb6Wo0XvAeXQohVta8i84ACbenPpoSsxTOQH/Ae0/RGP4WZgnMH5pMLpsj4FG7OHmcIcXxpza8eQ==", + "version": "11.1.2", + "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-11.1.2.tgz", + "integrity": "sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==", + "license": "MIT", "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", @@ -6543,9 +6560,9 @@ } }, "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -6589,15 +6606,15 @@ } }, "node_modules/sharp": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz", - "integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==", + "version": "0.34.1", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.1.tgz", + "integrity": "sha512-1j0w61+eVxu7DawFJtnfYcvSv6qPFvfTaqzTQ2BLknVhHTwGS8sc63ZBF4rzkWMBVKybo4S5OBtDdZahh2A1xg==", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { "color": "^4.2.3", "detect-libc": "^2.0.3", - "semver": "^7.6.3" + "semver": "^7.7.1" }, "engines": { "node": "^18.17.0 || ^20.3.0 || >=21.0.0" @@ -6606,25 +6623,26 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-darwin-arm64": "0.33.5", - "@img/sharp-darwin-x64": "0.33.5", - "@img/sharp-libvips-darwin-arm64": "1.0.4", - "@img/sharp-libvips-darwin-x64": "1.0.4", - "@img/sharp-libvips-linux-arm": "1.0.5", - "@img/sharp-libvips-linux-arm64": "1.0.4", - "@img/sharp-libvips-linux-s390x": "1.0.4", - "@img/sharp-libvips-linux-x64": "1.0.4", - "@img/sharp-libvips-linuxmusl-arm64": "1.0.4", - "@img/sharp-libvips-linuxmusl-x64": "1.0.4", - "@img/sharp-linux-arm": "0.33.5", - "@img/sharp-linux-arm64": "0.33.5", - "@img/sharp-linux-s390x": "0.33.5", - "@img/sharp-linux-x64": "0.33.5", - "@img/sharp-linuxmusl-arm64": "0.33.5", - "@img/sharp-linuxmusl-x64": "0.33.5", - "@img/sharp-wasm32": "0.33.5", - "@img/sharp-win32-ia32": "0.33.5", - "@img/sharp-win32-x64": "0.33.5" + "@img/sharp-darwin-arm64": "0.34.1", + "@img/sharp-darwin-x64": "0.34.1", + "@img/sharp-libvips-darwin-arm64": "1.1.0", + "@img/sharp-libvips-darwin-x64": "1.1.0", + "@img/sharp-libvips-linux-arm": "1.1.0", + "@img/sharp-libvips-linux-arm64": "1.1.0", + "@img/sharp-libvips-linux-ppc64": "1.1.0", + "@img/sharp-libvips-linux-s390x": "1.1.0", + "@img/sharp-libvips-linux-x64": "1.1.0", + "@img/sharp-libvips-linuxmusl-arm64": "1.1.0", + "@img/sharp-libvips-linuxmusl-x64": "1.1.0", + "@img/sharp-linux-arm": "0.34.1", + "@img/sharp-linux-arm64": "0.34.1", + "@img/sharp-linux-s390x": "0.34.1", + "@img/sharp-linux-x64": "0.34.1", + "@img/sharp-linuxmusl-arm64": "0.34.1", + "@img/sharp-linuxmusl-x64": "0.34.1", + "@img/sharp-wasm32": "0.34.1", + "@img/sharp-win32-ia32": "0.34.1", + "@img/sharp-win32-x64": "0.34.1" } }, "node_modules/shebang-command": { @@ -7007,9 +7025,9 @@ } }, "node_modules/typescript": { - "version": "5.8.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", - "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "dev": true, "license": "Apache-2.0", "bin": { @@ -7021,10 +7039,11 @@ } }, "node_modules/undici-types": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", - "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", - "dev": true + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" }, "node_modules/unicode-trie": { "version": "2.0.0", diff --git a/package.json b/package.json index 34cb44b..5ee0767 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "micromorph": "^0.4.5", "minimatch": "^10.0.1", "pixi.js": "^8.9.1", - "preact": "^10.26.4", + "preact": "^10.26.5", "preact-render-to-string": "^6.5.13", "pretty-bytes": "^6.1.1", "pretty-time": "^1.1.0", @@ -81,13 +81,13 @@ "remark-gfm": "^4.0.1", "remark-math": "^6.0.0", "remark-parse": "^11.0.0", - "remark-rehype": "^11.1.1", + "remark-rehype": "^11.1.2", "remark-smartypants": "^3.0.2", "rfdc": "^1.4.1", "rimraf": "^6.0.1", "satori": "^0.12.2", "serve-handler": "^6.1.6", - "sharp": "^0.33.5", + "sharp": "^0.34.1", "shiki": "^1.26.2", "source-map-support": "^0.5.21", "to-vfile": "^8.0.0", @@ -103,14 +103,14 @@ "@types/d3": "^7.4.3", "@types/hast": "^3.0.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^22.13.14", + "@types/node": "^22.14.0", "@types/pretty-time": "^1.1.5", "@types/source-map-support": "^0.5.10", - "@types/ws": "^8.18.0", + "@types/ws": "^8.18.1", "@types/yargs": "^17.0.33", "esbuild": "^0.25.2", "prettier": "^3.5.3", "tsx": "^4.19.3", - "typescript": "^5.8.2" + "typescript": "^5.8.3" } } From b1a920e5c0c2c749beae19cfe15ca5301257bcb0 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Thu, 10 Apr 2025 16:28:36 -0700 Subject: [PATCH 02/27] fix: add proper popover hint to tag content page --- quartz/components/pages/TagContent.tsx | 4 ++-- quartz/components/scripts/popover.inline.ts | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/quartz/components/pages/TagContent.tsx b/quartz/components/pages/TagContent.tsx index 5e81901..a1df6e1 100644 --- a/quartz/components/pages/TagContent.tsx +++ b/quartz/components/pages/TagContent.tsx @@ -115,8 +115,8 @@ export default ((opts?: Partial) => { } return ( -
-
{content}
+
+
{content}

{i18n(cfg.locale).pages.tagContent.itemsUnderTag({ count: pages.length })}

diff --git a/quartz/components/scripts/popover.inline.ts b/quartz/components/scripts/popover.inline.ts index 86cc885..9fd0aaf 100644 --- a/quartz/components/scripts/popover.inline.ts +++ b/quartz/components/scripts/popover.inline.ts @@ -117,11 +117,7 @@ async function mouseEnterHandler( function clearActivePopover() { const allPopoverElements = document.querySelectorAll(".popover") - if (allPopoverElements) { - allPopoverElements.forEach((popoverElement) => - popoverElement.classList.remove("active-popover"), - ) - } + allPopoverElements.forEach((popoverElement) => popoverElement.classList.remove("active-popover")) } document.addEventListener("nav", () => { From e9b60c728595e84b935d8af59a7efcac52ef5ab1 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Thu, 10 Apr 2025 16:46:30 -0700 Subject: [PATCH 03/27] fix(popover): popover id calculation + scroll consistency --- quartz/components/scripts/popover.inline.ts | 50 ++++++++++----------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/quartz/components/scripts/popover.inline.ts b/quartz/components/scripts/popover.inline.ts index 9fd0aaf..04ffd58 100644 --- a/quartz/components/scripts/popover.inline.ts +++ b/quartz/components/scripts/popover.inline.ts @@ -9,10 +9,7 @@ async function mouseEnterHandler( this: HTMLAnchorElement, { clientX, clientY }: { clientX: number; clientY: number }, ) { - clearActivePopover() - const link = this - const id = randomIdNonSecure() if (link.dataset.noPopover === "true") { return } @@ -27,23 +24,33 @@ async function mouseEnterHandler( }) } - const prevPopoverElement = document.getElementById(`popover-${id}`) - const hasAlreadyBeenFetched = () => !!document.getElementById(`popover-${id}`) + function showPopover(popoverElement: HTMLElement) { + popoverElement.classList.add("active-popover") + setPosition(popoverElement as HTMLElement) - // dont refetch if there's already a popover - if (hasAlreadyBeenFetched()) { - setPosition(prevPopoverElement as HTMLElement) - prevPopoverElement?.classList.add("active-popover") - return + if (hash !== "") { + const targetAnchor = `#popover-internal-${hash.slice(1)}` + const heading = popoverInner.querySelector(targetAnchor) as HTMLElement | null + if (heading) { + // leave ~12px of buffer when scrolling to a heading + popoverInner.scroll({ top: heading.offsetTop - 12, behavior: "instant" }) + } + } } - const thisUrl = new URL(document.location.href) - thisUrl.hash = "" - thisUrl.search = "" const targetUrl = new URL(link.href) const hash = decodeURIComponent(targetUrl.hash) targetUrl.hash = "" targetUrl.search = "" + const popoverId = `popover-${link.dataset.slug ?? randomIdNonSecure()}` + const prevPopoverElement = document.getElementById(popoverId) + const hasAlreadyBeenFetched = () => !!document.getElementById(popoverId) + + // dont refetch if there's already a popover + if (hasAlreadyBeenFetched()) { + showPopover(prevPopoverElement as HTMLElement) + return + } const response = await fetchCanonical(targetUrl).catch((err) => { console.error(err) @@ -59,12 +66,12 @@ async function mouseEnterHandler( const [contentTypeCategory, typeInfo] = contentType.split("/") const popoverElement = document.createElement("div") + popoverElement.id = popoverId popoverElement.classList.add("popover") const popoverInner = document.createElement("div") popoverInner.classList.add("popover-inner") - popoverElement.appendChild(popoverInner) - popoverInner.dataset.contentType = contentType ?? undefined + popoverElement.appendChild(popoverInner) switch (contentTypeCategory) { case "image": @@ -100,19 +107,8 @@ async function mouseEnterHandler( elts.forEach((elt) => popoverInner.appendChild(elt)) } - setPosition(popoverElement) - popoverElement.id = `popover-${id}` - popoverElement.classList.add("active-popover") document.body.appendChild(popoverElement) - - if (hash !== "") { - const targetAnchor = `#popover-internal-${hash.slice(1)}` - const heading = popoverInner.querySelector(targetAnchor) as HTMLElement | null - if (heading) { - // leave ~12px of buffer when scrolling to a heading - popoverInner.scroll({ top: heading.offsetTop - 12, behavior: "instant" }) - } - } + showPopover(popoverElement) } function clearActivePopover() { From 091cc1b05e55114b488590e087cf0da9d3f87ab5 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Thu, 10 Apr 2025 17:43:35 -0700 Subject: [PATCH 04/27] fix(search): properly show mobile layout --- quartz/components/scripts/search.inline.ts | 8 +++++--- quartz/components/styles/search.scss | 12 ++++++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/quartz/components/scripts/search.inline.ts b/quartz/components/scripts/search.inline.ts index d95f468..27f74ec 100644 --- a/quartz/components/scripts/search.inline.ts +++ b/quartz/components/scripts/search.inline.ts @@ -300,9 +300,11 @@ async function setupSearch(searchElement: Element, currentSlug: FullSlug, data: itemTile.classList.add("result-card") itemTile.id = slug itemTile.href = resolveUrl(slug).toString() - itemTile.innerHTML = `

${title}

${htmlTags}${ - enablePreview && window.innerWidth > 600 ? "" : `

${content}

` - }` + itemTile.innerHTML = ` +

${title}

+ ${htmlTags} +

${content}

+ ` itemTile.addEventListener("click", (event) => { if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) return hideSearch() diff --git a/quartz/components/styles/search.scss b/quartz/components/styles/search.scss index 182b56b..2cf98ce 100644 --- a/quartz/components/styles/search.scss +++ b/quartz/components/styles/search.scss @@ -133,11 +133,13 @@ } @media all and ($mobile) { - & > #preview-container { + flex-direction: column; + + & > .preview-container { display: none !important; } - &[data-preview] > #results-container { + &[data-preview] > .results-container { width: 100%; height: auto; flex: 0 0 100%; @@ -204,6 +206,12 @@ margin: 0; } + @media all and not ($mobile) { + & > p.card-description { + display: none; + } + } + & > ul.tags { margin-top: 0.45rem; margin-bottom: 0; From bfd72347cf719a7500dd98484d037c2b2320729c Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Fri, 11 Apr 2025 08:18:28 -0700 Subject: [PATCH 05/27] fix(popover): clear popovers more aggressively, use href as id --- quartz/components/scripts/popover.inline.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/quartz/components/scripts/popover.inline.ts b/quartz/components/scripts/popover.inline.ts index 04ffd58..d8f1e1a 100644 --- a/quartz/components/scripts/popover.inline.ts +++ b/quartz/components/scripts/popover.inline.ts @@ -1,7 +1,6 @@ import { computePosition, flip, inline, shift } from "@floating-ui/dom" import { normalizeRelativeURLs } from "../../util/path" import { fetchCanonical } from "./util" -import { randomIdNonSecure } from "../../util/random" const p = new DOMParser() @@ -25,6 +24,7 @@ async function mouseEnterHandler( } function showPopover(popoverElement: HTMLElement) { + clearActivePopover() popoverElement.classList.add("active-popover") setPosition(popoverElement as HTMLElement) @@ -42,7 +42,7 @@ async function mouseEnterHandler( const hash = decodeURIComponent(targetUrl.hash) targetUrl.hash = "" targetUrl.search = "" - const popoverId = `popover-${link.dataset.slug ?? randomIdNonSecure()}` + const popoverId = `popover-${link.pathname}` const prevPopoverElement = document.getElementById(popoverId) const hasAlreadyBeenFetched = () => !!document.getElementById(popoverId) @@ -117,10 +117,10 @@ function clearActivePopover() { } document.addEventListener("nav", () => { - const links = [...document.getElementsByClassName("internal")] as HTMLAnchorElement[] + const links = [...document.querySelectorAll("a.internal")] as HTMLAnchorElement[] for (const link of links) { - link.addEventListener("mouseleave", clearActivePopover) link.addEventListener("mouseenter", mouseEnterHandler) + link.addEventListener("mouseleave", clearActivePopover) window.addCleanup(() => { link.removeEventListener("mouseenter", mouseEnterHandler) link.removeEventListener("mouseleave", clearActivePopover) From b34d521293415944370fd0f5cf25cd71bcffb5b6 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Thu, 17 Apr 2025 19:45:17 -0700 Subject: [PATCH 06/27] feat: reader mode --- docs/features/reader mode.md | 44 +++++++++++++++++++ index.d.ts | 1 + quartz.layout.ts | 1 + quartz/components/ReaderMode.tsx | 32 ++++++++++++++ quartz/components/index.ts | 2 + .../components/scripts/readermode.inline.ts | 25 +++++++++++ quartz/components/styles/darkmode.scss | 2 +- quartz/components/styles/readermode.scss | 33 ++++++++++++++ 8 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 docs/features/reader mode.md create mode 100644 quartz/components/ReaderMode.tsx create mode 100644 quartz/components/scripts/readermode.inline.ts create mode 100644 quartz/components/styles/readermode.scss diff --git a/docs/features/reader mode.md b/docs/features/reader mode.md new file mode 100644 index 0000000..d1c1429 --- /dev/null +++ b/docs/features/reader mode.md @@ -0,0 +1,44 @@ +--- +title: Reader Mode +tags: + - component +--- + +Reader Mode is a feature that allows users to focus on the content by hiding the sidebars and other UI elements. When enabled, it provides a clean, distraction-free reading experience. + +## Configuration + +Reader Mode is enabled by default. To disable it, you can remove the component from your layout configuration in `quartz.layout.ts`: + +```ts +// Remove or comment out this line +Component.ReaderMode(), +``` + +## Usage + +The Reader Mode toggle appears as a button with a book icon. When clicked: + +- Sidebars are hidden +- Hovering over the content area reveals the sidebars temporarily + +Unlike Dark Mode, Reader Mode state is not persisted between page reloads but is maintained during SPA navigation within the site. + +## Customization + +You can customize the appearance of Reader Mode through CSS variables and styles. The component uses the following classes: + +- `.readermode`: The toggle button +- `.readerIcon`: The book icon +- `[reader-mode="on"]`: Applied to the root element when Reader Mode is active + +Example customization in your custom CSS: + +```scss +.readermode { + // Customize the button + svg { + stroke: var(--custom-color); + } +} +``` diff --git a/index.d.ts b/index.d.ts index 07f8082..9011ee3 100644 --- a/index.d.ts +++ b/index.d.ts @@ -8,6 +8,7 @@ interface CustomEventMap { prenav: CustomEvent<{}> nav: CustomEvent<{ url: FullSlug }> themechange: CustomEvent<{ theme: "light" | "dark" }> + readermodechange: CustomEvent<{ mode: "on" | "off" }> } type ContentIndex = Record diff --git a/quartz.layout.ts b/quartz.layout.ts index e5c3388..970a5be 100644 --- a/quartz.layout.ts +++ b/quartz.layout.ts @@ -35,6 +35,7 @@ export const defaultContentPageLayout: PageLayout = { grow: true, }, { Component: Component.Darkmode() }, + { Component: Component.ReaderMode() }, ], }), Component.Explorer(), diff --git a/quartz/components/ReaderMode.tsx b/quartz/components/ReaderMode.tsx new file mode 100644 index 0000000..dac4053 --- /dev/null +++ b/quartz/components/ReaderMode.tsx @@ -0,0 +1,32 @@ +// @ts-ignore +import readerModeScript from "./scripts/readermode.inline" +import styles from "./styles/readermode.scss" +import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types" +import { classNames } from "../util/lang" + +const ReaderMode: QuartzComponent = ({ displayClass }: QuartzComponentProps) => { + return ( + + ) +} + +ReaderMode.beforeDOMLoaded = readerModeScript +ReaderMode.css = styles + +export default (() => ReaderMode) satisfies QuartzComponentConstructor diff --git a/quartz/components/index.ts b/quartz/components/index.ts index 2b601cd..cece8e6 100644 --- a/quartz/components/index.ts +++ b/quartz/components/index.ts @@ -4,6 +4,7 @@ import FolderContent from "./pages/FolderContent" import NotFound from "./pages/404" import ArticleTitle from "./ArticleTitle" import Darkmode from "./Darkmode" +import ReaderMode from "./ReaderMode" import Head from "./Head" import PageTitle from "./PageTitle" import ContentMeta from "./ContentMeta" @@ -29,6 +30,7 @@ export { TagContent, FolderContent, Darkmode, + ReaderMode, Head, PageTitle, ContentMeta, diff --git a/quartz/components/scripts/readermode.inline.ts b/quartz/components/scripts/readermode.inline.ts new file mode 100644 index 0000000..09f6a5f --- /dev/null +++ b/quartz/components/scripts/readermode.inline.ts @@ -0,0 +1,25 @@ +let isReaderMode = false + +const emitReaderModeChangeEvent = (mode: "on" | "off") => { + const event: CustomEventMap["readermodechange"] = new CustomEvent("readermodechange", { + detail: { mode }, + }) + document.dispatchEvent(event) +} + +document.addEventListener("nav", () => { + const switchReaderMode = () => { + isReaderMode = !isReaderMode + const newMode = isReaderMode ? "on" : "off" + document.documentElement.setAttribute("reader-mode", newMode) + emitReaderModeChangeEvent(newMode) + } + + for (const readerModeButton of document.getElementsByClassName("readermode")) { + readerModeButton.addEventListener("click", switchReaderMode) + window.addCleanup(() => readerModeButton.removeEventListener("click", switchReaderMode)) + } + + // Set initial state + document.documentElement.setAttribute("reader-mode", isReaderMode ? "on" : "off") +}) diff --git a/quartz/components/styles/darkmode.scss b/quartz/components/styles/darkmode.scss index 5d1e078..b328743 100644 --- a/quartz/components/styles/darkmode.scss +++ b/quartz/components/styles/darkmode.scss @@ -6,7 +6,7 @@ border: none; width: 20px; height: 20px; - margin: 0 10px; + margin: 0; text-align: inherit; flex-shrink: 0; diff --git a/quartz/components/styles/readermode.scss b/quartz/components/styles/readermode.scss new file mode 100644 index 0000000..7d5de77 --- /dev/null +++ b/quartz/components/styles/readermode.scss @@ -0,0 +1,33 @@ +.readermode { + cursor: pointer; + padding: 0; + position: relative; + background: none; + border: none; + width: 20px; + height: 20px; + margin: 0; + text-align: inherit; + flex-shrink: 0; + + & svg { + position: absolute; + width: 20px; + height: 20px; + top: calc(50% - 10px); + stroke: var(--darkgray); + transition: opacity 0.1s ease; + } +} + +:root[reader-mode="on"] { + & .sidebar.left, + & .sidebar.right { + opacity: 0; + transition: opacity 0.2s ease; + + &:hover { + opacity: 1; + } + } +} From c238dd16d9923aac404a16b8551d93e5b91a4c5a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 19:48:08 -0700 Subject: [PATCH 07/27] chore(deps): bump the production-dependencies group with 2 updates (#1919) Bumps the production-dependencies group with 2 updates: [@clack/prompts](https://github.com/bombshell-dev/clack/tree/HEAD/packages/prompts) and [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node). Updates `@clack/prompts` from 0.10.0 to 0.10.1 - [Release notes](https://github.com/bombshell-dev/clack/releases) - [Changelog](https://github.com/bombshell-dev/clack/blob/@clack/prompts@0.10.1/packages/prompts/CHANGELOG.md) - [Commits](https://github.com/bombshell-dev/clack/commits/@clack/prompts@0.10.1/packages/prompts) Updates `@types/node` from 22.14.0 to 22.14.1 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@clack/prompts" dependency-version: 0.10.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: "@types/node" dependency-version: 22.14.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 | 31 +++++++++++++++++-------------- package.json | 4 ++-- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 46be935..e185949 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "4.5.0", "license": "MIT", "dependencies": { - "@clack/prompts": "^0.10.0", + "@clack/prompts": "^0.10.1", "@floating-ui/dom": "^1.6.13", "@myriaddreamin/rehype-typst": "^0.5.4", "@napi-rs/simple-git": "0.1.19", @@ -80,7 +80,7 @@ "@types/d3": "^7.4.3", "@types/hast": "^3.0.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^22.14.0", + "@types/node": "^22.14.1", "@types/pretty-time": "^1.1.5", "@types/source-map-support": "^0.5.10", "@types/ws": "^8.18.1", @@ -178,21 +178,22 @@ } }, "node_modules/@clack/core": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@clack/core/-/core-0.4.1.tgz", - "integrity": "sha512-Pxhij4UXg8KSr7rPek6Zowm+5M22rbd2g1nfojHJkxp5YkFqiZ2+YLEM/XGVIzvGOcM0nqjIFxrpDwWRZYWYjA==", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@clack/core/-/core-0.4.2.tgz", + "integrity": "sha512-NYQfcEy8MWIxrT5Fj8nIVchfRFA26yYKJcvBS7WlUIlw2OmQOY9DhGGXMovyI5J5PpxrCPGkgUi207EBrjpBvg==", + "license": "MIT", "dependencies": { "picocolors": "^1.0.0", "sisteransi": "^1.0.5" } }, "node_modules/@clack/prompts": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@clack/prompts/-/prompts-0.10.0.tgz", - "integrity": "sha512-H3rCl6CwW1NdQt9rE3n373t7o5cthPv7yUoxF2ytZvyvlJv89C5RYMJu83Hed8ODgys5vpBU0GKxIRG83jd8NQ==", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@clack/prompts/-/prompts-0.10.1.tgz", + "integrity": "sha512-Q0T02vx8ZM9XSv9/Yde0jTmmBQufZhPJfYAg2XrrrxWWaZgq1rr8nU8Hv710BQ1dhoP8rtY7YUdpGej2Qza/cw==", "license": "MIT", "dependencies": { - "@clack/core": "0.4.1", + "@clack/core": "0.4.2", "picocolors": "^1.0.0", "sisteransi": "^1.0.5" } @@ -1940,9 +1941,9 @@ } }, "node_modules/@types/node": { - "version": "22.14.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.14.0.tgz", - "integrity": "sha512-Kmpl+z84ILoG+3T/zQFyAJsU6EPTmOCj8/2+83fSN6djd6I4o7uOuGIH6vq3PrjY5BGitSbFuMN18j3iknubbA==", + "version": "22.14.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.14.1.tgz", + "integrity": "sha512-u0HuPQwe/dHrItgHHpmw3N2fYCR6x4ivMNbPHRkBVP4CvN+kiRrKHWk3i8tXiO/joPwXLMYvF9TTF0eqgHIuOw==", "dev": true, "license": "MIT", "dependencies": { @@ -5503,7 +5504,8 @@ "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", @@ -6702,7 +6704,8 @@ "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "license": "MIT" }, "node_modules/slash": { "version": "5.1.0", diff --git a/package.json b/package.json index 5ee0767..0378c53 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "quartz": "./quartz/bootstrap-cli.mjs" }, "dependencies": { - "@clack/prompts": "^0.10.0", + "@clack/prompts": "^0.10.1", "@floating-ui/dom": "^1.6.13", "@myriaddreamin/rehype-typst": "^0.5.4", "@napi-rs/simple-git": "0.1.19", @@ -103,7 +103,7 @@ "@types/d3": "^7.4.3", "@types/hast": "^3.0.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^22.14.0", + "@types/node": "^22.14.1", "@types/pretty-time": "^1.1.5", "@types/source-map-support": "^0.5.10", "@types/ws": "^8.18.1", From 6dd772bf00459fe5165140e4e756e2b3096686e8 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Mon, 21 Apr 2025 23:55:38 -0700 Subject: [PATCH 08/27] fix(popover): properly clear popover on racing fetch --- quartz/components/scripts/popover.inline.ts | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/quartz/components/scripts/popover.inline.ts b/quartz/components/scripts/popover.inline.ts index d8f1e1a..989af7e 100644 --- a/quartz/components/scripts/popover.inline.ts +++ b/quartz/components/scripts/popover.inline.ts @@ -3,12 +3,13 @@ import { normalizeRelativeURLs } from "../../util/path" import { fetchCanonical } from "./util" const p = new DOMParser() +let activeAnchor: HTMLAnchorElement | null = null async function mouseEnterHandler( this: HTMLAnchorElement, { clientX, clientY }: { clientX: number; clientY: number }, ) { - const link = this + const link = (activeAnchor = this) if (link.dataset.noPopover === "true") { return } @@ -44,10 +45,9 @@ async function mouseEnterHandler( targetUrl.search = "" const popoverId = `popover-${link.pathname}` const prevPopoverElement = document.getElementById(popoverId) - const hasAlreadyBeenFetched = () => !!document.getElementById(popoverId) // dont refetch if there's already a popover - if (hasAlreadyBeenFetched()) { + if (!!document.getElementById(popoverId)) { showPopover(prevPopoverElement as HTMLElement) return } @@ -56,11 +56,6 @@ async function mouseEnterHandler( console.error(err) }) - // bailout if another popover exists - if (hasAlreadyBeenFetched()) { - return - } - if (!response) return const [contentType] = response.headers.get("Content-Type")!.split(";") const [contentTypeCategory, typeInfo] = contentType.split("/") @@ -107,11 +102,20 @@ async function mouseEnterHandler( elts.forEach((elt) => popoverInner.appendChild(elt)) } + if (!!document.getElementById(popoverId)) { + return + } + document.body.appendChild(popoverElement) + if (activeAnchor !== this) { + return + } + showPopover(popoverElement) } function clearActivePopover() { + activeAnchor = null const allPopoverElements = document.querySelectorAll(".popover") allPopoverElements.forEach((popoverElement) => popoverElement.classList.remove("active-popover")) } From 771c05ff1866a32e05fd5926317372405202d640 Mon Sep 17 00:00:00 2001 From: ARYAN TECHIE <76107940+Aryan-Techie@users.noreply.github.com> Date: Tue, 22 Apr 2025 22:52:43 +0530 Subject: [PATCH 09/27] fix: dynamically detect current branch for quartz sync push (#1930) --- quartz/cli/handlers.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quartz/cli/handlers.js b/quartz/cli/handlers.js index c41bafc..0cb371b 100644 --- a/quartz/cli/handlers.js +++ b/quartz/cli/handlers.js @@ -589,7 +589,8 @@ export async function handleSync(argv) { await popContentFolder(contentFolder) if (argv.push) { console.log("Pushing your changes") - const res = spawnSync("git", ["push", "-uf", ORIGIN_NAME, QUARTZ_SOURCE_BRANCH], { + const currentBranch = execSync("git rev-parse --abbrev-ref HEAD").toString().trim() + const res = spawnSync("git", ["push", "-uf", ORIGIN_NAME, currentBranch], { stdio: "inherit", }) if (res.status !== 0) { From 2a9290b3dfedb718dbd5fc7da09775eb803f9764 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Tue, 22 Apr 2025 11:18:50 -0700 Subject: [PATCH 10/27] fix(transclude): blockref detection --- quartz/components/renderPage.tsx | 2 +- quartz/plugins/transformers/ofm.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/quartz/components/renderPage.tsx b/quartz/components/renderPage.tsx index 19324f5..e43189d 100644 --- a/quartz/components/renderPage.tsx +++ b/quartz/components/renderPage.tsx @@ -75,7 +75,7 @@ function renderTranscludes( const classNames = (node.properties?.className ?? []) as string[] if (classNames.includes("transclude")) { const inner = node.children[0] as Element - const transcludeTarget = inner.properties["data-slug"] as FullSlug + const transcludeTarget = (inner.properties["data-slug"] ?? slug) as FullSlug const page = componentData.allFiles.find((f) => f.slug === transcludeTarget) if (!page) { return diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts index 5c2f4b2..dada7d4 100644 --- a/quartz/plugins/transformers/ofm.ts +++ b/quartz/plugins/transformers/ofm.ts @@ -191,7 +191,8 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin> const [rawFp, rawHeader, rawAlias]: (string | undefined)[] = capture const [fp, anchor] = splitAnchor(`${rawFp ?? ""}${rawHeader ?? ""}`) - const displayAnchor = anchor ? `#${anchor.trim().replace(/^#+/, "")}` : "" + const blockRef = Boolean(rawHeader?.startsWith("#^")) ? "^" : "" + const displayAnchor = anchor ? `#${blockRef}${anchor.trim().replace(/^#+/, "")}` : "" const displayAlias = rawAlias ?? rawHeader?.replace("#", "|") ?? "" const embedDisplay = value.startsWith("!") ? "!" : "" @@ -221,7 +222,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin> let [rawFp, rawHeader, rawAlias] = capture const fp = rawFp?.trim() ?? "" const anchor = rawHeader?.trim() ?? "" - const alias = rawAlias?.slice(1).trim() + const alias = rawAlias?.slice(1).trim() ?? "" // embed cases if (value.startsWith("!")) { From cdebd05dc92135229306ebf261fb62437581c7e9 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Wed, 23 Apr 2025 09:30:25 -0700 Subject: [PATCH 11/27] fix(wikilinks): dont default empty alias --- quartz/plugins/transformers/ofm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts index dada7d4..983fd73 100644 --- a/quartz/plugins/transformers/ofm.ts +++ b/quartz/plugins/transformers/ofm.ts @@ -222,7 +222,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin> let [rawFp, rawHeader, rawAlias] = capture const fp = rawFp?.trim() ?? "" const anchor = rawHeader?.trim() ?? "" - const alias = rawAlias?.slice(1).trim() ?? "" + const alias: string | undefined = rawAlias?.slice(1).trim() // embed cases if (value.startsWith("!")) { From 7d49dff0747f69e96ab83a98b97ece96d4268b36 Mon Sep 17 00:00:00 2001 From: anthops <32993852+anthops@users.noreply.github.com> Date: Thu, 24 Apr 2025 02:02:52 +0930 Subject: [PATCH 12/27] fix: prefer webgl for devices with webgpu and no float32-blendable feature flag #1899 (#1933) Co-authored-by: Tony <32993852+0xREDACTED@users.noreply.github.com> --- package-lock.json | 7 ++++--- package.json | 1 + quartz/components/scripts/graph.inline.ts | 12 +++++++++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index e185949..227e756 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@myriaddreamin/rehype-typst": "^0.5.4", "@napi-rs/simple-git": "0.1.19", "@tweenjs/tween.js": "^25.0.0", + "@webgpu/types": "^0.1.60", "ansi-truncate": "^1.2.0", "async-mutex": "^0.5.0", "chalk": "^5.4.1", @@ -2001,9 +2002,9 @@ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" }, "node_modules/@webgpu/types": { - "version": "0.1.44", - "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.44.tgz", - "integrity": "sha512-JDpYJN5E/asw84LTYhKyvPpxGnD+bAKPtpW9Ilurf7cZpxaTbxkQcGwOd7jgB9BPBrTYQ+32ufo4HiuomTjHNQ==", + "version": "0.1.60", + "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.60.tgz", + "integrity": "sha512-8B/tdfRFKdrnejqmvq95ogp8tf52oZ51p3f4QD5m5Paey/qlX4Rhhy5Y8tgFMi7Ms70HzcMMw3EQjH/jdhTwlA==", "license": "BSD-3-Clause" }, "node_modules/@xmldom/xmldom": { diff --git a/package.json b/package.json index 0378c53..ddcb5f2 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "@myriaddreamin/rehype-typst": "^0.5.4", "@napi-rs/simple-git": "0.1.19", "@tweenjs/tween.js": "^25.0.0", + "@webgpu/types": "^0.1.60", "ansi-truncate": "^1.2.0", "async-mutex": "^0.5.0", "chalk": "^5.4.1", diff --git a/quartz/components/scripts/graph.inline.ts b/quartz/components/scripts/graph.inline.ts index a669b05..87e2958 100644 --- a/quartz/components/scripts/graph.inline.ts +++ b/quartz/components/scripts/graph.inline.ts @@ -68,6 +68,15 @@ type TweenNode = { stop: () => void } +async function determineGraphicsAPI(): Promise<"webgpu" | "webgl"> { + const adapter = await navigator.gpu?.requestAdapter().catch(() => null) + if (!adapter) { + return "webgl" + } + // Devices with WebGPU but no float32-blendable feature fail to render the graph + return adapter.features.has("float32-blendable") ? "webgpu" : "webgl" +} + async function renderGraph(graph: HTMLElement, fullSlug: FullSlug) { const slug = simplifySlug(fullSlug) const visited = getVisited() @@ -349,6 +358,7 @@ async function renderGraph(graph: HTMLElement, fullSlug: FullSlug) { tweens.forEach((tween) => tween.stop()) tweens.clear() + const pixiPreference = await determineGraphicsAPI() const app = new Application() await app.init({ width, @@ -357,7 +367,7 @@ async function renderGraph(graph: HTMLElement, fullSlug: FullSlug) { autoStart: false, autoDensity: true, backgroundAlpha: 0, - preference: "webgpu", + preference: pixiPreference, resolution: window.devicePixelRatio, eventMode: "static", }) From 78e13bcb40af99210c0c3c80becd9e2a5858a8fa Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Sat, 26 Apr 2025 11:04:23 -0700 Subject: [PATCH 13/27] chore: add ci to preview all prs (#1947) * add ci to preview all prs * only on this repo * fmt --- .github/workflows/preview.yaml | 46 ++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/preview.yaml diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml new file mode 100644 index 0000000..80a8a41 --- /dev/null +++ b/.github/workflows/preview.yaml @@ -0,0 +1,46 @@ +name: Build Preview Deployment + +on: + pull_request: + types: [opened, synchronize] + workflow_dispatch: + +jobs: + build-preview: + if: ${{ github.repository == 'jackyzha0/quartz' }} + runs-on: ubuntu-latest + name: Build Preview + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Cache dependencies + uses: actions/cache@v4 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - run: npm ci + + - name: Check types and style + run: npm run check + + - name: Build Quartz + run: npx quartz build -d docs -v + + - name: Publish to Cloudflare Pages + uses: AdrianGonz97/refined-cf-pages-action@v1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + githubToken: ${{ secrets.GITHUB_TOKEN }} + projectName: quartz + directory: public From 4bd714b7be4a5d891ab187a94e64e537cb43809e Mon Sep 17 00:00:00 2001 From: Stephen Tse Date: Sat, 26 Apr 2025 11:05:51 -0700 Subject: [PATCH 14/27] fix(callout): Grid-based callout collapsible animation (#1944) * Fixed broken nested callout maxHeight calculation * Implemented grid-based callout collapsible --- quartz/components/scripts/callout.inline.ts | 29 ++++----------- quartz/plugins/transformers/ofm.ts | 39 +++++++++++++-------- quartz/styles/callouts.scss | 14 ++++++-- 3 files changed, 42 insertions(+), 40 deletions(-) diff --git a/quartz/components/scripts/callout.inline.ts b/quartz/components/scripts/callout.inline.ts index 3b7e16d..242ce51 100644 --- a/quartz/components/scripts/callout.inline.ts +++ b/quartz/components/scripts/callout.inline.ts @@ -1,25 +1,10 @@ function toggleCallout(this: HTMLElement) { const outerBlock = this.parentElement! outerBlock.classList.toggle("is-collapsed") + const content = outerBlock.getElementsByClassName("callout-content")[0] as HTMLElement + if (!content) return const collapsed = outerBlock.classList.contains("is-collapsed") - const height = collapsed ? this.scrollHeight : outerBlock.scrollHeight - outerBlock.style.maxHeight = height + "px" - - // walk and adjust height of all parents - let current = outerBlock - let parent = outerBlock.parentElement - while (parent) { - if (!parent.classList.contains("callout")) { - return - } - - const collapsed = parent.classList.contains("is-collapsed") - const height = collapsed ? parent.scrollHeight : parent.scrollHeight + current.scrollHeight - parent.style.maxHeight = height + "px" - - current = parent - parent = parent.parentElement - } + content.style.gridTemplateRows = collapsed ? "0fr" : "1fr" } function setupCallout() { @@ -27,15 +12,15 @@ function setupCallout() { `callout is-collapsible`, ) as HTMLCollectionOf for (const div of collapsible) { - const title = div.firstElementChild - if (!title) continue + const title = div.getElementsByClassName("callout-title")[0] as HTMLElement + const content = div.getElementsByClassName("callout-content")[0] as HTMLElement + if (!title || !content) continue title.addEventListener("click", toggleCallout) window.addCleanup(() => title.removeEventListener("click", toggleCallout)) const collapsed = div.classList.contains("is-collapsed") - const height = collapsed ? title.scrollHeight : div.scrollHeight - div.style.maxHeight = height + "px" + content.style.gridTemplateRows = collapsed ? "0fr" : "1fr" } } diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts index 983fd73..e958027 100644 --- a/quartz/plugins/transformers/ofm.ts +++ b/quartz/plugins/transformers/ofm.ts @@ -464,6 +464,30 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin> }) } + // For the rest of the MD callout elements other than the title, wrap them with + // two nested HTML
s (use some hacked mdhast component to achieve this) of + // class `callout-content` and `callout-content-inner` respectively for + // grid-based collapsible animation. + if (calloutContent.length > 0) { + node.children = [ + node.children[0], + { + data: { hProperties: { className: ["callout-content"] }, hName: "div" }, + type: "blockquote", + children: [ + { + data: { + hProperties: { className: ["callout-content-inner"] }, + hName: "div", + }, + type: "blockquote", + children: [...calloutContent], + }, + ], + }, + ] + } + // replace first line of blockquote with title and rest of the paragraph text node.children.splice(0, 1, ...blockquoteContent) @@ -485,21 +509,6 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin> "data-callout-metadata": calloutMetaData, }, } - - // Add callout-content class to callout body if it has one. - if (calloutContent.length > 0) { - const contentData: BlockContent | DefinitionContent = { - data: { - hProperties: { - className: "callout-content", - }, - hName: "div", - }, - type: "blockquote", - children: [...calloutContent], - } - node.children = [node.children[0], contentData] - } } }) } diff --git a/quartz/styles/callouts.scss b/quartz/styles/callouts.scss index d6f65aa..02921ae 100644 --- a/quartz/styles/callouts.scss +++ b/quartz/styles/callouts.scss @@ -7,11 +7,19 @@ border-radius: 5px; padding: 0 1rem; overflow-y: hidden; - transition: max-height 0.3s ease; box-sizing: border-box; - & > .callout-content > :first-child { - margin-top: 0; + & > .callout-content { + display: grid; + transition: grid-template-rows 0.3s ease; + + & > .callout-content-inner { + overflow: hidden; + + & > :first-child { + margin-top: 0; + } + } } --callout-icon-note: url('data:image/svg+xml; utf8, '); From 9e58857746b74ef3e122139f7db09509435bebc8 Mon Sep 17 00:00:00 2001 From: dralagen Date: Sat, 26 Apr 2025 20:06:59 +0200 Subject: [PATCH 15/27] feat(favicon): add plugin to expose favicon from icon.png (#1942) * feat(favicon): add plugin to expose favicon from icon.png * chore(favicon): clean up formatting and remove unnecessary line breaks --- quartz.config.ts | 1 + quartz/plugins/emitters/favicon.ts | 16 ++++++++++++++++ quartz/plugins/emitters/index.ts | 1 + 3 files changed, 18 insertions(+) create mode 100644 quartz/plugins/emitters/favicon.ts diff --git a/quartz.config.ts b/quartz.config.ts index efe9648..b3db3d6 100644 --- a/quartz.config.ts +++ b/quartz.config.ts @@ -86,6 +86,7 @@ const config: QuartzConfig = { }), Plugin.Assets(), Plugin.Static(), + Plugin.Favicon(), Plugin.NotFoundPage(), // Comment out CustomOgImages to speed up build time Plugin.CustomOgImages(), diff --git a/quartz/plugins/emitters/favicon.ts b/quartz/plugins/emitters/favicon.ts new file mode 100644 index 0000000..c58322c --- /dev/null +++ b/quartz/plugins/emitters/favicon.ts @@ -0,0 +1,16 @@ +import sharp from "sharp" +import { joinSegments, QUARTZ, FilePath } from "../../util/path" +import { QuartzEmitterPlugin } from "../types" + +export const Favicon: QuartzEmitterPlugin = () => ({ + name: "Favicon", + async *emit({ argv }) { + const iconPath = joinSegments(QUARTZ, "static", "icon.png") + const dest = joinSegments(argv.output, "favicon.ico") as FilePath + + await sharp(iconPath).resize(48, 48).toFormat("png").toFile(dest) + + yield dest + }, + async *partialEmit() {}, +}) diff --git a/quartz/plugins/emitters/index.ts b/quartz/plugins/emitters/index.ts index 842ffb0..d2de2ed 100644 --- a/quartz/plugins/emitters/index.ts +++ b/quartz/plugins/emitters/index.ts @@ -5,6 +5,7 @@ export { ContentIndex as ContentIndex } from "./contentIndex" export { AliasRedirects } from "./aliases" export { Assets } from "./assets" export { Static } from "./static" +export { Favicon } from "./favicon" export { ComponentResources } from "./componentResources" export { NotFoundPage } from "./404" export { CNAME } from "./cname" From 2acdec323fe37c4d3675ada7d14832fe9d90954b Mon Sep 17 00:00:00 2001 From: Stephen Tse Date: Sat, 26 Apr 2025 11:13:56 -0700 Subject: [PATCH 16/27] fix(explorer): Prevent html from being scrollable when mobile explorer is open (#1895) * Fixed html page being scrollable when mobile explorer is open * Prettier code * Addressed comment --- quartz/components/scripts/explorer.inline.ts | 22 +++++++++++++++++++- quartz/components/styles/explorer.scss | 20 +++--------------- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/quartz/components/scripts/explorer.inline.ts b/quartz/components/scripts/explorer.inline.ts index b431c53..9c83411 100644 --- a/quartz/components/scripts/explorer.inline.ts +++ b/quartz/components/scripts/explorer.inline.ts @@ -23,11 +23,18 @@ let currentExplorerState: Array function toggleExplorer(this: HTMLElement) { const nearestExplorer = this.closest(".explorer") as HTMLElement if (!nearestExplorer) return - nearestExplorer.classList.toggle("collapsed") + const explorerCollapsed = nearestExplorer.classList.toggle("collapsed") nearestExplorer.setAttribute( "aria-expanded", nearestExplorer.getAttribute("aria-expanded") === "true" ? "false" : "true", ) + + if (!explorerCollapsed) { + // Stop from being scrollable when mobile explorer is open + document.documentElement.classList.add("mobile-no-scroll") + } else { + document.documentElement.classList.remove("mobile-no-scroll") + } } function toggleFolder(evt: MouseEvent) { @@ -270,12 +277,25 @@ document.addEventListener("nav", async (e: CustomEventMap["nav"]) => { if (mobileExplorer.checkVisibility()) { explorer.classList.add("collapsed") explorer.setAttribute("aria-expanded", "false") + + // Allow to be scrollable when mobile explorer is collapsed + document.documentElement.classList.remove("mobile-no-scroll") } mobileExplorer.classList.remove("hide-until-loaded") } }) +window.addEventListener("resize", function () { + // Desktop explorer opens by default, and it stays open when the window is resized + // to mobile screen size. Applies `no-scroll` to in this edge case. + const explorer = document.querySelector(".explorer") + if (explorer && !explorer.classList.contains("collapsed")) { + document.documentElement.classList.add("mobile-no-scroll") + return + } +}) + function setFolderState(folderElement: HTMLElement, collapsed: boolean) { return collapsed ? folderElement.classList.remove("open") : folderElement.classList.add("open") } diff --git a/quartz/components/styles/explorer.scss b/quartz/components/styles/explorer.scss index 55c4372..002b086 100644 --- a/quartz/components/styles/explorer.scss +++ b/quartz/components/styles/explorer.scss @@ -263,22 +263,8 @@ li:has(> .folder-outer:not(.open)) > .folder-container > svg { } } -.no-scroll { - opacity: 0; - overflow: hidden; -} - -html:has(.no-scroll) { - overflow: hidden; -} - -@media all and not ($mobile) { - .no-scroll { - opacity: 1 !important; - overflow: auto !important; - } - - html:has(.no-scroll) { - overflow: auto !important; +.mobile-no-scroll { + @media all and ($mobile) { + overflow: hidden; } } From 00e860d8e687d2cd77f425b7ba77b3b591458127 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Mon, 28 Apr 2025 13:19:29 -0700 Subject: [PATCH 17/27] ci: fix fork preview --- .../{preview.yaml => build-preview.yaml} | 11 ++---- .github/workflows/deploy-preview.yaml | 37 +++++++++++++++++++ 2 files changed, 41 insertions(+), 7 deletions(-) rename .github/workflows/{preview.yaml => build-preview.yaml} (72%) create mode 100644 .github/workflows/deploy-preview.yaml diff --git a/.github/workflows/preview.yaml b/.github/workflows/build-preview.yaml similarity index 72% rename from .github/workflows/preview.yaml rename to .github/workflows/build-preview.yaml index 80a8a41..9a4455d 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/build-preview.yaml @@ -36,11 +36,8 @@ jobs: - name: Build Quartz run: npx quartz build -d docs -v - - name: Publish to Cloudflare Pages - uses: AdrianGonz97/refined-cf-pages-action@v1 + - name: Upload build artifact + uses: actions/upload-artifact@v4 with: - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} - accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - githubToken: ${{ secrets.GITHUB_TOKEN }} - projectName: quartz - directory: public + name: preview-build + path: public diff --git a/.github/workflows/deploy-preview.yaml b/.github/workflows/deploy-preview.yaml new file mode 100644 index 0000000..20a9ac3 --- /dev/null +++ b/.github/workflows/deploy-preview.yaml @@ -0,0 +1,37 @@ +name: Upload Preview Deployment +on: + workflow_run: + workflows: ["Build Preview Deployment"] + types: + - completed + +permissions: + actions: read + deployments: write + contents: read + pull-requests: write + +jobs: + deploy-preview: + if: ${{ github.repository == 'jackyzha0/quartz' && github.event.workflow_run.conclusion == 'success' }} + runs-on: ubuntu-latest + name: Deploy Preview to Cloudflare Pages + steps: + - name: Download build artifact + uses: actions/download-artifact@v4 + id: preview-build-artifact + with: + name: preview-build + path: build + github-token: ${{ secrets.GITHUB_TOKEN }} + run-id: ${{ github.event.workflow_run.id }} + + - name: Deploy to Cloudflare Pages + uses: AdrianGonz97/refined-cf-pages-action@v1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + githubToken: ${{ secrets.GITHUB_TOKEN }} + projectName: YOUR_PROJECT_NAME + deploymentName: Preview + directory: ${{ steps.preview-build-artifact.outputs.download-path }} From 32d3fc0ce8945c7d9aace2235a0f6f9663895b58 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Mon, 28 Apr 2025 14:35:51 -0700 Subject: [PATCH 18/27] chore(ci): fix proj name --- .github/workflows/deploy-preview.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-preview.yaml b/.github/workflows/deploy-preview.yaml index 20a9ac3..3a1432a 100644 --- a/.github/workflows/deploy-preview.yaml +++ b/.github/workflows/deploy-preview.yaml @@ -32,6 +32,6 @@ jobs: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} githubToken: ${{ secrets.GITHUB_TOKEN }} - projectName: YOUR_PROJECT_NAME - deploymentName: Preview + projectName: quartz + deploymentName: Branch Preview directory: ${{ steps.preview-build-artifact.outputs.download-path }} From 4d07ac93b44f0c751009ff1dda8323ee3b4c9900 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 14:41:04 -0700 Subject: [PATCH 19/27] chore(deps-dev): bump the production-dependencies group with 2 updates (#1952) Bumps the production-dependencies group with 2 updates: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [esbuild](https://github.com/evanw/esbuild). Updates `@types/node` from 22.14.1 to 22.15.3 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `esbuild` from 0.25.2 to 0.25.3 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.25.2...v0.25.3) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 22.15.3 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: esbuild dependency-version: 0.25.3 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 | 216 +++++++++++++++++++++++----------------------- package.json | 4 +- 2 files changed, 110 insertions(+), 110 deletions(-) diff --git a/package-lock.json b/package-lock.json index 227e756..0c9943f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -81,12 +81,12 @@ "@types/d3": "^7.4.3", "@types/hast": "^3.0.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^22.14.1", + "@types/node": "^22.15.3", "@types/pretty-time": "^1.1.5", "@types/source-map-support": "^0.5.10", "@types/ws": "^8.18.1", "@types/yargs": "^17.0.33", - "esbuild": "^0.25.2", + "esbuild": "^0.25.3", "prettier": "^3.5.3", "tsx": "^4.19.3", "typescript": "^5.8.3" @@ -210,9 +210,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.2.tgz", - "integrity": "sha512-wCIboOL2yXZym2cgm6mlA742s9QeJ8DjGVaL39dLN4rRwrOgOyYSnOaFPhKZGLb2ngj4EyfAFjsNJwPXZvseag==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.3.tgz", + "integrity": "sha512-W8bFfPA8DowP8l//sxjJLSLkD8iEjMc7cBVyP+u4cEv9sM7mdUCkgsj+t0n/BWPFtv7WWCN5Yzj0N6FJNUUqBQ==", "cpu": [ "ppc64" ], @@ -226,9 +226,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.2.tgz", - "integrity": "sha512-NQhH7jFstVY5x8CKbcfa166GoV0EFkaPkCKBQkdPJFvo5u+nGXLEH/ooniLb3QI8Fk58YAx7nsPLozUWfCBOJA==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.3.tgz", + "integrity": "sha512-PuwVXbnP87Tcff5I9ngV0lmiSu40xw1At6i3GsU77U7cjDDB4s0X2cyFuBiDa1SBk9DnvWwnGvVaGBqoFWPb7A==", "cpu": [ "arm" ], @@ -242,9 +242,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.2.tgz", - "integrity": "sha512-5ZAX5xOmTligeBaeNEPnPaeEuah53Id2tX4c2CVP3JaROTH+j4fnfHCkr1PjXMd78hMst+TlkfKcW/DlTq0i4w==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.3.tgz", + "integrity": "sha512-XelR6MzjlZuBM4f5z2IQHK6LkK34Cvv6Rj2EntER3lwCBFdg6h2lKbtRjpTTsdEjD/WSe1q8UyPBXP1x3i/wYQ==", "cpu": [ "arm64" ], @@ -258,9 +258,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.2.tgz", - "integrity": "sha512-Ffcx+nnma8Sge4jzddPHCZVRvIfQ0kMsUsCMcJRHkGJ1cDmhe4SsrYIjLUKn1xpHZybmOqCWwB0zQvsjdEHtkg==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.3.tgz", + "integrity": "sha512-ogtTpYHT/g1GWS/zKM0cc/tIebFjm1F9Aw1boQ2Y0eUQ+J89d0jFY//s9ei9jVIlkYi8AfOjiixcLJSGNSOAdQ==", "cpu": [ "x64" ], @@ -274,9 +274,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.2.tgz", - "integrity": "sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.3.tgz", + "integrity": "sha512-eESK5yfPNTqpAmDfFWNsOhmIOaQA59tAcF/EfYvo5/QWQCzXn5iUSOnqt3ra3UdzBv073ykTtmeLJZGt3HhA+w==", "cpu": [ "arm64" ], @@ -290,9 +290,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.2.tgz", - "integrity": "sha512-5eRPrTX7wFyuWe8FqEFPG2cU0+butQQVNcT4sVipqjLYQjjh8a8+vUTfgBKM88ObB85ahsnTwF7PSIt6PG+QkA==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.3.tgz", + "integrity": "sha512-Kd8glo7sIZtwOLcPbW0yLpKmBNWMANZhrC1r6K++uDR2zyzb6AeOYtI6udbtabmQpFaxJ8uduXMAo1gs5ozz8A==", "cpu": [ "x64" ], @@ -306,9 +306,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.2.tgz", - "integrity": "sha512-mLwm4vXKiQ2UTSX4+ImyiPdiHjiZhIaE9QvC7sw0tZ6HoNMjYAqQpGyui5VRIi5sGd+uWq940gdCbY3VLvsO1w==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.3.tgz", + "integrity": "sha512-EJiyS70BYybOBpJth3M0KLOus0n+RRMKTYzhYhFeMwp7e/RaajXvP+BWlmEXNk6uk+KAu46j/kaQzr6au+JcIw==", "cpu": [ "arm64" ], @@ -322,9 +322,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.2.tgz", - "integrity": "sha512-6qyyn6TjayJSwGpm8J9QYYGQcRgc90nmfdUb0O7pp1s4lTY+9D0H9O02v5JqGApUyiHOtkz6+1hZNvNtEhbwRQ==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.3.tgz", + "integrity": "sha512-Q+wSjaLpGxYf7zC0kL0nDlhsfuFkoN+EXrx2KSB33RhinWzejOd6AvgmP5JbkgXKmjhmpfgKZq24pneodYqE8Q==", "cpu": [ "x64" ], @@ -338,9 +338,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.2.tgz", - "integrity": "sha512-UHBRgJcmjJv5oeQF8EpTRZs/1knq6loLxTsjc3nxO9eXAPDLcWW55flrMVc97qFPbmZP31ta1AZVUKQzKTzb0g==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.3.tgz", + "integrity": "sha512-dUOVmAUzuHy2ZOKIHIKHCm58HKzFqd+puLaS424h6I85GlSDRZIA5ycBixb3mFgM0Jdh+ZOSB6KptX30DD8YOQ==", "cpu": [ "arm" ], @@ -354,9 +354,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.2.tgz", - "integrity": "sha512-gq/sjLsOyMT19I8obBISvhoYiZIAaGF8JpeXu1u8yPv8BE5HlWYobmlsfijFIZ9hIVGYkbdFhEqC0NvM4kNO0g==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.3.tgz", + "integrity": "sha512-xCUgnNYhRD5bb1C1nqrDV1PfkwgbswTTBRbAd8aH5PhYzikdf/ddtsYyMXFfGSsb/6t6QaPSzxtbfAZr9uox4A==", "cpu": [ "arm64" ], @@ -370,9 +370,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.2.tgz", - "integrity": "sha512-bBYCv9obgW2cBP+2ZWfjYTU+f5cxRoGGQ5SeDbYdFCAZpYWrfjjfYwvUpP8MlKbP0nwZ5gyOU/0aUzZ5HWPuvQ==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.3.tgz", + "integrity": "sha512-yplPOpczHOO4jTYKmuYuANI3WhvIPSVANGcNUeMlxH4twz/TeXuzEP41tGKNGWJjuMhotpGabeFYGAOU2ummBw==", "cpu": [ "ia32" ], @@ -386,9 +386,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.2.tgz", - "integrity": "sha512-SHNGiKtvnU2dBlM5D8CXRFdd+6etgZ9dXfaPCeJtz+37PIUlixvlIhI23L5khKXs3DIzAn9V8v+qb1TRKrgT5w==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.3.tgz", + "integrity": "sha512-P4BLP5/fjyihmXCELRGrLd793q/lBtKMQl8ARGpDxgzgIKJDRJ/u4r1A/HgpBpKpKZelGct2PGI4T+axcedf6g==", "cpu": [ "loong64" ], @@ -402,9 +402,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.2.tgz", - "integrity": "sha512-hDDRlzE6rPeoj+5fsADqdUZl1OzqDYow4TB4Y/3PlKBD0ph1e6uPHzIQcv2Z65u2K0kpeByIyAjCmjn1hJgG0Q==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.3.tgz", + "integrity": "sha512-eRAOV2ODpu6P5divMEMa26RRqb2yUoYsuQQOuFUexUoQndm4MdpXXDBbUoKIc0iPa4aCO7gIhtnYomkn2x+bag==", "cpu": [ "mips64el" ], @@ -418,9 +418,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.2.tgz", - "integrity": "sha512-tsHu2RRSWzipmUi9UBDEzc0nLc4HtpZEI5Ba+Omms5456x5WaNuiG3u7xh5AO6sipnJ9r4cRWQB2tUjPyIkc6g==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.3.tgz", + "integrity": "sha512-ZC4jV2p7VbzTlnl8nZKLcBkfzIf4Yad1SJM4ZMKYnJqZFD4rTI+pBG65u8ev4jk3/MPwY9DvGn50wi3uhdaghg==", "cpu": [ "ppc64" ], @@ -434,9 +434,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.2.tgz", - "integrity": "sha512-k4LtpgV7NJQOml/10uPU0s4SAXGnowi5qBSjaLWMojNCUICNu7TshqHLAEbkBdAszL5TabfvQ48kK84hyFzjnw==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.3.tgz", + "integrity": "sha512-LDDODcFzNtECTrUUbVCs6j9/bDVqy7DDRsuIXJg6so+mFksgwG7ZVnTruYi5V+z3eE5y+BJZw7VvUadkbfg7QA==", "cpu": [ "riscv64" ], @@ -450,9 +450,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.2.tgz", - "integrity": "sha512-GRa4IshOdvKY7M/rDpRR3gkiTNp34M0eLTaC1a08gNrh4u488aPhuZOCpkF6+2wl3zAN7L7XIpOFBhnaE3/Q8Q==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.3.tgz", + "integrity": "sha512-s+w/NOY2k0yC2p9SLen+ymflgcpRkvwwa02fqmAwhBRI3SC12uiS10edHHXlVWwfAagYSY5UpmT/zISXPMW3tQ==", "cpu": [ "s390x" ], @@ -466,9 +466,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.2.tgz", - "integrity": "sha512-QInHERlqpTTZ4FRB0fROQWXcYRD64lAoiegezDunLpalZMjcUcld3YzZmVJ2H/Cp0wJRZ8Xtjtj0cEHhYc/uUg==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.3.tgz", + "integrity": "sha512-nQHDz4pXjSDC6UfOE1Fw9Q8d6GCAd9KdvMZpfVGWSJztYCarRgSDfOVBY5xwhQXseiyxapkiSJi/5/ja8mRFFA==", "cpu": [ "x64" ], @@ -482,9 +482,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.2.tgz", - "integrity": "sha512-talAIBoY5M8vHc6EeI2WW9d/CkiO9MQJ0IOWX8hrLhxGbro/vBXJvaQXefW2cP0z0nQVTdQ/eNyGFV1GSKrxfw==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.3.tgz", + "integrity": "sha512-1QaLtOWq0mzK6tzzp0jRN3eccmN3hezey7mhLnzC6oNlJoUJz4nym5ZD7mDnS/LZQgkrhEbEiTn515lPeLpgWA==", "cpu": [ "arm64" ], @@ -498,9 +498,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.2.tgz", - "integrity": "sha512-voZT9Z+tpOxrvfKFyfDYPc4DO4rk06qamv1a/fkuzHpiVBMOhpjK+vBmWM8J1eiB3OLSMFYNaOaBNLXGChf5tg==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.3.tgz", + "integrity": "sha512-i5Hm68HXHdgv8wkrt+10Bc50zM0/eonPb/a/OFVfB6Qvpiirco5gBA5bz7S2SHuU+Y4LWn/zehzNX14Sp4r27g==", "cpu": [ "x64" ], @@ -514,9 +514,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.2.tgz", - "integrity": "sha512-dcXYOC6NXOqcykeDlwId9kB6OkPUxOEqU+rkrYVqJbK2hagWOMrsTGsMr8+rW02M+d5Op5NNlgMmjzecaRf7Tg==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.3.tgz", + "integrity": "sha512-zGAVApJEYTbOC6H/3QBr2mq3upG/LBEXr85/pTtKiv2IXcgKV0RT0QA/hSXZqSvLEpXeIxah7LczB4lkiYhTAQ==", "cpu": [ "arm64" ], @@ -530,9 +530,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.2.tgz", - "integrity": "sha512-t/TkWwahkH0Tsgoq1Ju7QfgGhArkGLkF1uYz8nQS/PPFlXbP5YgRpqQR3ARRiC2iXoLTWFxc6DJMSK10dVXluw==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.3.tgz", + "integrity": "sha512-fpqctI45NnCIDKBH5AXQBsD0NDPbEFczK98hk/aa6HJxbl+UtLkJV2+Bvy5hLSLk3LHmqt0NTkKNso1A9y1a4w==", "cpu": [ "x64" ], @@ -546,9 +546,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.2.tgz", - "integrity": "sha512-cfZH1co2+imVdWCjd+D1gf9NjkchVhhdpgb1q5y6Hcv9TP6Zi9ZG/beI3ig8TvwT9lH9dlxLq5MQBBgwuj4xvA==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.3.tgz", + "integrity": "sha512-ROJhm7d8bk9dMCUZjkS8fgzsPAZEjtRJqCAmVgB0gMrvG7hfmPmz9k1rwO4jSiblFjYmNvbECL9uhaPzONMfgA==", "cpu": [ "x64" ], @@ -562,9 +562,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.2.tgz", - "integrity": "sha512-7Loyjh+D/Nx/sOTzV8vfbB3GJuHdOQyrOryFdZvPHLf42Tk9ivBU5Aedi7iyX+x6rbn2Mh68T4qq1SDqJBQO5Q==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.3.tgz", + "integrity": "sha512-YWcow8peiHpNBiIXHwaswPnAXLsLVygFwCB3A7Bh5jRkIBFWHGmNQ48AlX4xDvQNoMZlPYzjVOQDYEzWCqufMQ==", "cpu": [ "arm64" ], @@ -578,9 +578,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.2.tgz", - "integrity": "sha512-WRJgsz9un0nqZJ4MfhabxaD9Ft8KioqU3JMinOTvobbX6MOSUigSBlogP8QB3uxpJDsFS6yN+3FDBdqE5lg9kg==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.3.tgz", + "integrity": "sha512-qspTZOIGoXVS4DpNqUYUs9UxVb04khS1Degaw/MnfMe7goQ3lTfQ13Vw4qY/Nj0979BGvMRpAYbs/BAxEvU8ew==", "cpu": [ "ia32" ], @@ -594,9 +594,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.2.tgz", - "integrity": "sha512-kM3HKb16VIXZyIeVrM1ygYmZBKybX8N4p754bw390wGO3Tf2j4L2/WYL+4suWujpgf6GBYs3jv7TyUivdd05JA==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.3.tgz", + "integrity": "sha512-ICgUR+kPimx0vvRzf+N/7L7tVSQeE3BYY+NhHRHXS1kBuPO7z2+7ea2HbhDyZdTephgvNvKrlDDKUexuCVBVvg==", "cpu": [ "x64" ], @@ -1942,9 +1942,9 @@ } }, "node_modules/@types/node": { - "version": "22.14.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.14.1.tgz", - "integrity": "sha512-u0HuPQwe/dHrItgHHpmw3N2fYCR6x4ivMNbPHRkBVP4CvN+kiRrKHWk3i8tXiO/joPwXLMYvF9TTF0eqgHIuOw==", + "version": "22.15.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.3.tgz", + "integrity": "sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw==", "dev": true, "license": "MIT", "dependencies": { @@ -2942,9 +2942,9 @@ } }, "node_modules/esbuild": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.2.tgz", - "integrity": "sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.3.tgz", + "integrity": "sha512-qKA6Pvai73+M2FtftpNKRxJ78GIjmFXFxd/1DVBqGo/qNhLSfv+G12n9pNoWdytJC8U00TrViOwpjT0zgqQS8Q==", "hasInstallScript": true, "license": "MIT", "bin": { @@ -2954,31 +2954,31 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.2", - "@esbuild/android-arm": "0.25.2", - "@esbuild/android-arm64": "0.25.2", - "@esbuild/android-x64": "0.25.2", - "@esbuild/darwin-arm64": "0.25.2", - "@esbuild/darwin-x64": "0.25.2", - "@esbuild/freebsd-arm64": "0.25.2", - "@esbuild/freebsd-x64": "0.25.2", - "@esbuild/linux-arm": "0.25.2", - "@esbuild/linux-arm64": "0.25.2", - "@esbuild/linux-ia32": "0.25.2", - "@esbuild/linux-loong64": "0.25.2", - "@esbuild/linux-mips64el": "0.25.2", - "@esbuild/linux-ppc64": "0.25.2", - "@esbuild/linux-riscv64": "0.25.2", - "@esbuild/linux-s390x": "0.25.2", - "@esbuild/linux-x64": "0.25.2", - "@esbuild/netbsd-arm64": "0.25.2", - "@esbuild/netbsd-x64": "0.25.2", - "@esbuild/openbsd-arm64": "0.25.2", - "@esbuild/openbsd-x64": "0.25.2", - "@esbuild/sunos-x64": "0.25.2", - "@esbuild/win32-arm64": "0.25.2", - "@esbuild/win32-ia32": "0.25.2", - "@esbuild/win32-x64": "0.25.2" + "@esbuild/aix-ppc64": "0.25.3", + "@esbuild/android-arm": "0.25.3", + "@esbuild/android-arm64": "0.25.3", + "@esbuild/android-x64": "0.25.3", + "@esbuild/darwin-arm64": "0.25.3", + "@esbuild/darwin-x64": "0.25.3", + "@esbuild/freebsd-arm64": "0.25.3", + "@esbuild/freebsd-x64": "0.25.3", + "@esbuild/linux-arm": "0.25.3", + "@esbuild/linux-arm64": "0.25.3", + "@esbuild/linux-ia32": "0.25.3", + "@esbuild/linux-loong64": "0.25.3", + "@esbuild/linux-mips64el": "0.25.3", + "@esbuild/linux-ppc64": "0.25.3", + "@esbuild/linux-riscv64": "0.25.3", + "@esbuild/linux-s390x": "0.25.3", + "@esbuild/linux-x64": "0.25.3", + "@esbuild/netbsd-arm64": "0.25.3", + "@esbuild/netbsd-x64": "0.25.3", + "@esbuild/openbsd-arm64": "0.25.3", + "@esbuild/openbsd-x64": "0.25.3", + "@esbuild/sunos-x64": "0.25.3", + "@esbuild/win32-arm64": "0.25.3", + "@esbuild/win32-ia32": "0.25.3", + "@esbuild/win32-x64": "0.25.3" } }, "node_modules/esbuild-sass-plugin": { diff --git a/package.json b/package.json index ddcb5f2..b137cc7 100644 --- a/package.json +++ b/package.json @@ -104,12 +104,12 @@ "@types/d3": "^7.4.3", "@types/hast": "^3.0.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^22.14.1", + "@types/node": "^22.15.3", "@types/pretty-time": "^1.1.5", "@types/source-map-support": "^0.5.10", "@types/ws": "^8.18.1", "@types/yargs": "^17.0.33", - "esbuild": "^0.25.2", + "esbuild": "^0.25.3", "prettier": "^3.5.3", "tsx": "^4.19.3", "typescript": "^5.8.3" From 8d5b13ee03533f72954037608001d5d8b3029d0f Mon Sep 17 00:00:00 2001 From: Stephen Tse Date: Mon, 28 Apr 2025 14:58:06 -0700 Subject: [PATCH 20/27] fix(fonts): Fixed page title fonts not downloadable to local (#1898) * Fixed url parser regex not working for Google Fonts subset API * Prettier no --- quartz/util/theme.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/quartz/util/theme.ts b/quartz/util/theme.ts index 4a06425..ff4453b 100644 --- a/quartz/util/theme.ts +++ b/quartz/util/theme.ts @@ -107,6 +107,13 @@ export interface GoogleFontFile { extension: string } +const fontMimeMap: Record = { + truetype: "ttf", + woff: "woff", + woff2: "woff2", + opentype: "otf", +} + export async function processGoogleFonts( stylesheet: string, baseUrl: string, @@ -114,14 +121,16 @@ export async function processGoogleFonts( processedStylesheet: string fontFiles: GoogleFontFile[] }> { - const fontSourceRegex = /url\((https:\/\/fonts.gstatic.com\/s\/[^)]+\.(woff2|ttf))\)/g + const fontSourceRegex = + /url\((https:\/\/fonts.gstatic.com\/.+(?:\/|(?:kit=))(.+?)[.&].+?)\)\sformat\('(\w+?)'\);/g const fontFiles: GoogleFontFile[] = [] let processedStylesheet = stylesheet let match while ((match = fontSourceRegex.exec(stylesheet)) !== null) { const url = match[1] - const [filename, extension] = url.split("/").pop()!.split(".") + const filename = match[2] + const extension = fontMimeMap[match[3].toLowerCase()] const staticUrl = `https://${baseUrl}/static/fonts/${filename}.${extension}` processedStylesheet = processedStylesheet.replace(url, staticUrl) From 6ba9c7c02aa75e58849f334514719e31be1cf522 Mon Sep 17 00:00:00 2001 From: dralagen Date: Tue, 29 Apr 2025 07:00:28 +0200 Subject: [PATCH 21/27] doc(favicon): add documentation of favicon plugin (#1948) * doc(favicon): add documentation of favicon plugin * doc(favicon): add missing link to configuration page * fix(favicon): build on public folder don't created --- docs/plugins/Favicon.md | 19 +++++++++++++++++++ quartz/plugins/emitters/favicon.ts | 14 ++++++++++---- 2 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 docs/plugins/Favicon.md diff --git a/docs/plugins/Favicon.md b/docs/plugins/Favicon.md new file mode 100644 index 0000000..a6d4d4e --- /dev/null +++ b/docs/plugins/Favicon.md @@ -0,0 +1,19 @@ +--- +title: Favicon +tags: + - plugin/emitter +--- + +This plugin emits a `favicon.ico` into the `public` folder. It creates the favicon from `icon.png` located in the `quartz/static` folder. +The plugin resizes `icon.png` to 48x48px to make it as small as possible. + +> [!note] +> For information on how to add, remove or configure plugins, see the [[configuration#Plugins|Configuration]] page. + +This plugin has no configuration options. + +## API + +- Category: Emitter +- Function name: `Plugin.Favicon()`. +- Source: [`quartz/plugins/emitters/favicon.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/emitters/favicon.ts). diff --git a/quartz/plugins/emitters/favicon.ts b/quartz/plugins/emitters/favicon.ts index c58322c..b05f930 100644 --- a/quartz/plugins/emitters/favicon.ts +++ b/quartz/plugins/emitters/favicon.ts @@ -1,16 +1,22 @@ import sharp from "sharp" -import { joinSegments, QUARTZ, FilePath } from "../../util/path" +import { joinSegments, QUARTZ, FullSlug } from "../../util/path" import { QuartzEmitterPlugin } from "../types" +import { write } from "./helpers" +import { BuildCtx } from "../../util/ctx" export const Favicon: QuartzEmitterPlugin = () => ({ name: "Favicon", async *emit({ argv }) { const iconPath = joinSegments(QUARTZ, "static", "icon.png") - const dest = joinSegments(argv.output, "favicon.ico") as FilePath - await sharp(iconPath).resize(48, 48).toFormat("png").toFile(dest) + const faviconContent = sharp(iconPath).resize(48, 48).toFormat("png") - yield dest + yield write({ + ctx: { argv } as BuildCtx, + slug: "favicon" as FullSlug, + ext: ".ico", + content: faviconContent, + }) }, async *partialEmit() {}, }) From dc2c4dca0845aa9666a7c7d7eb56265df252f82f Mon Sep 17 00:00:00 2001 From: badcode Date: Tue, 29 Apr 2025 19:55:15 +0300 Subject: [PATCH 22/27] docs: add fix for 'remote end hung up unexpectedly' error during initial sync (#1939) --- docs/setting up your GitHub repository.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/setting up your GitHub repository.md b/docs/setting up your GitHub repository.md index 43a556d..2a753e8 100644 --- a/docs/setting up your GitHub repository.md +++ b/docs/setting up your GitHub repository.md @@ -34,6 +34,13 @@ npx quartz sync --no-pull > [!warning]- `fatal: --[no-]autostash option is only valid with --rebase` > You may have an outdated version of `git`. Updating `git` should fix this issue. +> [!warning]- `fatal: The remote end hung up unexpectedly` +> It might be due to Git's default buffer size. You can fix it by increasing the buffer with this command: +> +> ```bash +> git config http.postBuffer 524288000 +> ``` + In future updates, you can simply run `npx quartz sync` every time you want to push updates to your repository. > [!hint] Flags and options From adf442036b244dfafea6287bf69c22f4eb133b79 Mon Sep 17 00:00:00 2001 From: anthops <32993852+anthops@users.noreply.github.com> Date: Thu, 1 May 2025 02:19:41 +0930 Subject: [PATCH 23/27] fix(graph): provide proper workaround for pixijs webgpu issue #1899 (#1949) --- quartz/components/scripts/graph.inline.ts | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/quartz/components/scripts/graph.inline.ts b/quartz/components/scripts/graph.inline.ts index 87e2958..9c8ec60 100644 --- a/quartz/components/scripts/graph.inline.ts +++ b/quartz/components/scripts/graph.inline.ts @@ -68,13 +68,28 @@ type TweenNode = { stop: () => void } +// workaround for pixijs webgpu issue: https://github.com/pixijs/pixijs/issues/11389 async function determineGraphicsAPI(): Promise<"webgpu" | "webgl"> { const adapter = await navigator.gpu?.requestAdapter().catch(() => null) - if (!adapter) { + const device = adapter && (await adapter.requestDevice().catch(() => null)) + if (!device) { return "webgl" } - // Devices with WebGPU but no float32-blendable feature fail to render the graph - return adapter.features.has("float32-blendable") ? "webgpu" : "webgl" + + const canvas = document.createElement("canvas") + const gl = + (canvas.getContext("webgl2") as WebGL2RenderingContext | null) ?? + (canvas.getContext("webgl") as WebGLRenderingContext | null) + + // we have to return webgl so pixijs automatically falls back to canvas + if (!gl) { + return "webgl" + } + + const webglMaxTextures = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS) + const webgpuMaxTextures = device.limits.maxSampledTexturesPerShaderStage + + return webglMaxTextures === webgpuMaxTextures ? "webgpu" : "webgl" } async function renderGraph(graph: HTMLElement, fullSlug: FullSlug) { From 59d4b4edddedbc44181f8b81e5dd4acf07358866 Mon Sep 17 00:00:00 2001 From: Dan <96779452+cromelex@users.noreply.github.com> Date: Wed, 7 May 2025 20:44:30 +0100 Subject: [PATCH 24/27] fix(analytics): Umami tracking pageviews properly Update componentResources.ts to fix umami SPA tracking (#1967) Update componentResources.ts to fix umami analytics when SPA is enabled in Quartz --- quartz/plugins/emitters/componentResources.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/quartz/plugins/emitters/componentResources.ts b/quartz/plugins/emitters/componentResources.ts index 92794ef..1bb2938 100644 --- a/quartz/plugins/emitters/componentResources.ts +++ b/quartz/plugins/emitters/componentResources.ts @@ -128,14 +128,8 @@ function addGlobalPageResources(ctx: BuildCtx, componentResources: ComponentReso const umamiScript = document.createElement("script"); umamiScript.src = "${cfg.analytics.host ?? "https://analytics.umami.is"}/script.js"; umamiScript.setAttribute("data-website-id", "${cfg.analytics.websiteId}"); - umamiScript.setAttribute("data-auto-track", "false"); + umamiScript.setAttribute("data-auto-track", "true"); umamiScript.defer = true; - umamiScript.onload = () => { - umami.track(); - document.addEventListener("nav", () => { - umami.track(); - }); - }; document.head.appendChild(umamiScript); `) From 0b348a053241d31245e5aa7176f47b2ae4719dfd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 May 2025 12:46:23 -0700 Subject: [PATCH 25/27] chore(deps): bump the production-dependencies group with 7 updates (#1964) Bumps the production-dependencies group with 7 updates: | Package | From | To | | --- | --- | --- | | [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom) | `1.6.13` | `1.7.0` | | @myriaddreamin/rehype-typst | `0.5.4` | `0.6.0` | | [pixi.js](https://github.com/pixijs/pixijs) | `8.9.1` | `8.9.2` | | [pretty-bytes](https://github.com/sindresorhus/pretty-bytes) | `6.1.1` | `7.0.0` | | [ws](https://github.com/websockets/ws) | `8.18.1` | `8.18.2` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `22.15.3` | `22.15.7` | | [tsx](https://github.com/privatenumber/tsx) | `4.19.3` | `4.19.4` | Updates `@floating-ui/dom` from 1.6.13 to 1.7.0 - [Release notes](https://github.com/floating-ui/floating-ui/releases) - [Changelog](https://github.com/floating-ui/floating-ui/blob/master/packages/dom/CHANGELOG.md) - [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/dom@1.7.0/packages/dom) Updates `@myriaddreamin/rehype-typst` from 0.5.4 to 0.6.0 Updates `pixi.js` from 8.9.1 to 8.9.2 - [Release notes](https://github.com/pixijs/pixijs/releases) - [Commits](https://github.com/pixijs/pixijs/compare/v8.9.1...v8.9.2) Updates `pretty-bytes` from 6.1.1 to 7.0.0 - [Release notes](https://github.com/sindresorhus/pretty-bytes/releases) - [Commits](https://github.com/sindresorhus/pretty-bytes/compare/v6.1.1...v7.0.0) Updates `ws` from 8.18.1 to 8.18.2 - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/8.18.1...8.18.2) Updates `@types/node` from 22.15.3 to 22.15.7 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `tsx` from 4.19.3 to 4.19.4 - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.19.3...v4.19.4) --- updated-dependencies: - dependency-name: "@floating-ui/dom" dependency-version: 1.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: "@myriaddreamin/rehype-typst" dependency-version: 0.6.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: pixi.js dependency-version: 8.9.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: pretty-bytes dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: production-dependencies - dependency-name: ws dependency-version: 8.18.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: "@types/node" dependency-version: 22.15.7 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: tsx dependency-version: 4.19.4 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 | 183 +++++++++++++++++++++++++--------------------- package.json | 14 ++-- 2 files changed, 107 insertions(+), 90 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0c9943f..53c3bb4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,8 +10,8 @@ "license": "MIT", "dependencies": { "@clack/prompts": "^0.10.1", - "@floating-ui/dom": "^1.6.13", - "@myriaddreamin/rehype-typst": "^0.5.4", + "@floating-ui/dom": "^1.7.0", + "@myriaddreamin/rehype-typst": "^0.6.0", "@napi-rs/simple-git": "0.1.19", "@tweenjs/tween.js": "^25.0.0", "@webgpu/types": "^0.1.60", @@ -37,10 +37,10 @@ "mdast-util-to-string": "^4.0.0", "micromorph": "^0.4.5", "minimatch": "^10.0.1", - "pixi.js": "^8.9.1", + "pixi.js": "^8.9.2", "preact": "^10.26.5", "preact-render-to-string": "^6.5.13", - "pretty-bytes": "^6.1.1", + "pretty-bytes": "^7.0.0", "pretty-time": "^1.1.0", "reading-time": "^1.5.0", "rehype-autolink-headings": "^7.1.0", @@ -71,7 +71,7 @@ "unist-util-visit": "^5.0.0", "vfile": "^6.0.3", "workerpool": "^9.2.0", - "ws": "^8.18.1", + "ws": "^8.18.2", "yargs": "^17.7.2" }, "bin": { @@ -81,14 +81,14 @@ "@types/d3": "^7.4.3", "@types/hast": "^3.0.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^22.15.3", + "@types/node": "^22.15.7", "@types/pretty-time": "^1.1.5", "@types/source-map-support": "^0.5.10", "@types/ws": "^8.18.1", "@types/yargs": "^17.0.33", "esbuild": "^0.25.3", "prettier": "^3.5.3", - "tsx": "^4.19.3", + "tsx": "^4.19.4", "typescript": "^5.8.3" }, "engines": { @@ -610,26 +610,29 @@ } }, "node_modules/@floating-ui/core": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.0.tgz", - "integrity": "sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.0.tgz", + "integrity": "sha512-FRdBLykrPPA6P76GGGqlex/e7fbe0F1ykgxHYNXQsH/iTEtjMj/f9bpY5oQqbjt5VgZvgz/uKXbGuROijh3VLA==", + "license": "MIT", "dependencies": { - "@floating-ui/utils": "^0.2.1" + "@floating-ui/utils": "^0.2.9" } }, "node_modules/@floating-ui/dom": { - "version": "1.6.13", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.13.tgz", - "integrity": "sha512-umqzocjDgNRGTuO7Q8CU32dkHkECqI8ZdMZ5Swb6QAM0t5rnlrN3lGo1hdpscRd3WS8T6DKYK4ephgIH9iRh3w==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.0.tgz", + "integrity": "sha512-lGTor4VlXcesUMh1cupTUTDoCxMb0V6bm3CnxHzQcw8Eaf1jQbgQX4i02fYgT0vJ82tb5MZ4CZk1LRGkktJCzg==", + "license": "MIT", "dependencies": { - "@floating-ui/core": "^1.6.0", + "@floating-ui/core": "^1.7.0", "@floating-ui/utils": "^0.2.9" } }, "node_modules/@floating-ui/utils": { "version": "0.2.9", "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.9.tgz", - "integrity": "sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==" + "integrity": "sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==", + "license": "MIT" }, "node_modules/@img/sharp-darwin-arm64": { "version": "0.34.1", @@ -1025,11 +1028,12 @@ } }, "node_modules/@myriaddreamin/rehype-typst": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@myriaddreamin/rehype-typst/-/rehype-typst-0.5.4.tgz", - "integrity": "sha512-6NJ0Ddom+X1jTTO1qlwB7ArLuZBg18m+fTqd3HWpkxAUhHAoemd2oF3ATwBIM0uF9gzG9d523D4o7b+jXCaBUQ==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@myriaddreamin/rehype-typst/-/rehype-typst-0.6.0.tgz", + "integrity": "sha512-WQpr2j7OYtyc2Q1WOqi1wzYrBaeuAWT1Cn1Ki6VPsKoWH7O86/+zKOqltdgMpYdkav1uXYs3RfO5Ir8h0WkZyQ==", + "license": "MIT", "dependencies": { - "@myriaddreamin/typst-ts-node-compiler": "^0.5.4", + "@myriaddreamin/typst-ts-node-compiler": "^0.6.0", "@types/hast": "^3.0.0", "@types/katex": "^0.16.0", "hast-util-from-html-isomorphic": "^2.0.0", @@ -1040,33 +1044,35 @@ } }, "node_modules/@myriaddreamin/typst-ts-node-compiler": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler/-/typst-ts-node-compiler-0.5.4.tgz", - "integrity": "sha512-WAOUjOD+S2S3X/2X33PxDYn0XJ4ydqboxluIdFWU8yOlzn3K8CwoRN/GAbMA13vJTbZQMzjX3VmhMavFWeRtVA==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler/-/typst-ts-node-compiler-0.6.0.tgz", + "integrity": "sha512-C40MzRKZ8pDWzrS7VOtTypGyFaHTuZFFx3o/uQ6ryS2GqZkK3vGox4lIpR7ct11UHiAjQNR3LFQ5WjQ7P3niBQ==", + "license": "Apache-2.0", "engines": { "node": ">= 10" }, "optionalDependencies": { - "@myriaddreamin/typst-ts-node-compiler-android-arm-eabi": "0.5.4", - "@myriaddreamin/typst-ts-node-compiler-android-arm64": "0.5.4", - "@myriaddreamin/typst-ts-node-compiler-darwin-arm64": "0.5.4", - "@myriaddreamin/typst-ts-node-compiler-darwin-x64": "0.5.4", - "@myriaddreamin/typst-ts-node-compiler-linux-arm-gnueabihf": "0.5.4", - "@myriaddreamin/typst-ts-node-compiler-linux-arm64-gnu": "0.5.4", - "@myriaddreamin/typst-ts-node-compiler-linux-arm64-musl": "0.5.4", - "@myriaddreamin/typst-ts-node-compiler-linux-x64-gnu": "0.5.4", - "@myriaddreamin/typst-ts-node-compiler-linux-x64-musl": "0.5.4", - "@myriaddreamin/typst-ts-node-compiler-win32-arm64-msvc": "0.5.4", - "@myriaddreamin/typst-ts-node-compiler-win32-x64-msvc": "0.5.4" + "@myriaddreamin/typst-ts-node-compiler-android-arm-eabi": "0.6.0", + "@myriaddreamin/typst-ts-node-compiler-android-arm64": "0.6.0", + "@myriaddreamin/typst-ts-node-compiler-darwin-arm64": "0.6.0", + "@myriaddreamin/typst-ts-node-compiler-darwin-x64": "0.6.0", + "@myriaddreamin/typst-ts-node-compiler-linux-arm-gnueabihf": "0.6.0", + "@myriaddreamin/typst-ts-node-compiler-linux-arm64-gnu": "0.6.0", + "@myriaddreamin/typst-ts-node-compiler-linux-arm64-musl": "0.6.0", + "@myriaddreamin/typst-ts-node-compiler-linux-x64-gnu": "0.6.0", + "@myriaddreamin/typst-ts-node-compiler-linux-x64-musl": "0.6.0", + "@myriaddreamin/typst-ts-node-compiler-win32-arm64-msvc": "0.6.0", + "@myriaddreamin/typst-ts-node-compiler-win32-x64-msvc": "0.6.0" } }, "node_modules/@myriaddreamin/typst-ts-node-compiler-android-arm-eabi": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-android-arm-eabi/-/typst-ts-node-compiler-android-arm-eabi-0.5.4.tgz", - "integrity": "sha512-jptHQK/GN7RCDI4FkGKrec3x3YKFogIw1kpMFYYscoOEntEF4MGJs2FM3vR3bLXGSAR54WlPI6dXPKCYuzVSOg==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-android-arm-eabi/-/typst-ts-node-compiler-android-arm-eabi-0.6.0.tgz", + "integrity": "sha512-Gfrf9Fky5iYtutGWYwqRC4gvllK1p1q6YELCbycI47NCFptONI++3dfub4PixWRn9m8NrmaNFIBQSyLHWsvbLw==", "cpu": [ "arm" ], + "license": "Apache-2.0", "optional": true, "os": [ "android" @@ -1076,12 +1082,13 @@ } }, "node_modules/@myriaddreamin/typst-ts-node-compiler-android-arm64": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-android-arm64/-/typst-ts-node-compiler-android-arm64-0.5.4.tgz", - "integrity": "sha512-xOt+07nYDu3KiOWPnl62es+rThKYRdbOWQPY4hcFqqC5VRTfZZXUBRKdsG+W8qu0gJ513VLmW9HVlkv2PHTW0Q==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-android-arm64/-/typst-ts-node-compiler-android-arm64-0.6.0.tgz", + "integrity": "sha512-EzO6W4xELC6at30hSkkOp5BveszwCmTWceu0PMh6lPxeQF1vnjxUK60MLFfJ40zb1TOXsj4l2pbdBoGqLznC1g==", "cpu": [ "arm64" ], + "license": "Apache-2.0", "optional": true, "os": [ "android" @@ -1091,12 +1098,13 @@ } }, "node_modules/@myriaddreamin/typst-ts-node-compiler-darwin-arm64": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-darwin-arm64/-/typst-ts-node-compiler-darwin-arm64-0.5.4.tgz", - "integrity": "sha512-mtuIjL4KptMhy+rJY0pUv8s8kzFFYKFDyhDQIndsi7P9jYtIUkjJqhg3rXmMUcbVJEEFlaUJ+I+wFQbDuddSlg==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-darwin-arm64/-/typst-ts-node-compiler-darwin-arm64-0.6.0.tgz", + "integrity": "sha512-8tR1GqFr+q4rNZm8z0230eF7eRCVCSaUefDw1+Qw8EnDPIvwEP8bT0/u2YqHmxthfVfs1msV8hDpRKVeBa6E3g==", "cpu": [ "arm64" ], + "license": "Apache-2.0", "optional": true, "os": [ "darwin" @@ -1106,12 +1114,13 @@ } }, "node_modules/@myriaddreamin/typst-ts-node-compiler-darwin-x64": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-darwin-x64/-/typst-ts-node-compiler-darwin-x64-0.5.4.tgz", - "integrity": "sha512-rP8ghx3+vCE0vVat6POYNEkXsjXQn1iyy3pPfLTFtSgQRoJoPJJnDB+tkToCiTZQwvo9aFyrY0LOyH8mpm+BYQ==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-darwin-x64/-/typst-ts-node-compiler-darwin-x64-0.6.0.tgz", + "integrity": "sha512-eytv5ifNvhux9naqEb+4pu1Z4ghQBWiybP4lT/aB44I9H5xjmtYQxiKwNBz54am6RLiMcyLpw/xFdeB13bsdWA==", "cpu": [ "x64" ], + "license": "Apache-2.0", "optional": true, "os": [ "darwin" @@ -1121,12 +1130,13 @@ } }, "node_modules/@myriaddreamin/typst-ts-node-compiler-linux-arm-gnueabihf": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-linux-arm-gnueabihf/-/typst-ts-node-compiler-linux-arm-gnueabihf-0.5.4.tgz", - "integrity": "sha512-boM8bVPRL/Ekff51urc3HiY2oKVdL2x36MnHgurAown3iK4OMa0JPDGkxpnuRKbDQEZDXQB1xljVGLaAqqecCg==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-linux-arm-gnueabihf/-/typst-ts-node-compiler-linux-arm-gnueabihf-0.6.0.tgz", + "integrity": "sha512-b20do+PmbsYq07QlTW8uLU3MaoAm6DSCx1IrCEAlUpNH+/29x51Rvyq5JeRrYVOtkR6BxPzyhCM79r5jOkewbQ==", "cpu": [ "arm" ], + "license": "Apache-2.0", "optional": true, "os": [ "linux" @@ -1136,12 +1146,13 @@ } }, "node_modules/@myriaddreamin/typst-ts-node-compiler-linux-arm64-gnu": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-linux-arm64-gnu/-/typst-ts-node-compiler-linux-arm64-gnu-0.5.4.tgz", - "integrity": "sha512-DIYH2WXyzeh+0sicGXICm8E/0P5ZAmbCIcGt9sgqXNe2YI/JjXoRDLLm1xN0Y5HD3fiCb/pRTRoeXFpp0u/Fjg==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-linux-arm64-gnu/-/typst-ts-node-compiler-linux-arm64-gnu-0.6.0.tgz", + "integrity": "sha512-AM92MVfEbISYvIA8NwPl2l78nOZIh5er5qQ/NZw2kx4YgTKgklJINEPHXm/aAk7PcpX7G10P45D/xGd5KpX9HQ==", "cpu": [ "arm64" ], + "license": "Apache-2.0", "optional": true, "os": [ "linux" @@ -1151,12 +1162,13 @@ } }, "node_modules/@myriaddreamin/typst-ts-node-compiler-linux-arm64-musl": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-linux-arm64-musl/-/typst-ts-node-compiler-linux-arm64-musl-0.5.4.tgz", - "integrity": "sha512-KNjhfEgPaVaN+0hJ97UKY72jtpMFTA4dnP4iEoB6VX2dunVrbTJbCpjG8Sfml4HJYt0H4gYKsa4LqQzgqFJ6eQ==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-linux-arm64-musl/-/typst-ts-node-compiler-linux-arm64-musl-0.6.0.tgz", + "integrity": "sha512-nSokVjKQR0ZH7Jub53q7he89+m72RSbL97exSedkB4OdZAi9tAxGFIgceGJuN5AC+DiNtMmqsPwlJiERUjgPhQ==", "cpu": [ "arm64" ], + "license": "Apache-2.0", "optional": true, "os": [ "linux" @@ -1166,12 +1178,13 @@ } }, "node_modules/@myriaddreamin/typst-ts-node-compiler-linux-x64-gnu": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-linux-x64-gnu/-/typst-ts-node-compiler-linux-x64-gnu-0.5.4.tgz", - "integrity": "sha512-iqYx3UFrrN0E8bg+NuvTptP2FndJNtt7tlU6Dsh6vjaay5IaBLIAtn9Yf9dPzsqWzHE3nwTq0yjoLfLEtY4a3w==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-linux-x64-gnu/-/typst-ts-node-compiler-linux-x64-gnu-0.6.0.tgz", + "integrity": "sha512-3Y2ORiYuCTzQkiHSCHWiGuzTBbNvHTB2lCr3DDsZdvTZ2LZMifPwwICN26X3tlnt6GyC3o/ejZBcMnfNqYbdCw==", "cpu": [ "x64" ], + "license": "Apache-2.0", "optional": true, "os": [ "linux" @@ -1181,12 +1194,13 @@ } }, "node_modules/@myriaddreamin/typst-ts-node-compiler-linux-x64-musl": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-linux-x64-musl/-/typst-ts-node-compiler-linux-x64-musl-0.5.4.tgz", - "integrity": "sha512-ROleNG0SD50+FoYJQA/9sai0FzNMh94ZAUVbSJFz474olJHSYQ8xqdIiGlpFA6XXPG6TKBedzbDUVYVXWFI+NQ==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-linux-x64-musl/-/typst-ts-node-compiler-linux-x64-musl-0.6.0.tgz", + "integrity": "sha512-b+kTb4vI0sFTkPtIAUE+UqjhZ4kTiAkh4F/2QKnFitAsURlLcRwTcMc9NJm6SXwW1OM0nPj1IGTfUOFpqLOIPQ==", "cpu": [ "x64" ], + "license": "Apache-2.0", "optional": true, "os": [ "linux" @@ -1196,12 +1210,13 @@ } }, "node_modules/@myriaddreamin/typst-ts-node-compiler-win32-arm64-msvc": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-win32-arm64-msvc/-/typst-ts-node-compiler-win32-arm64-msvc-0.5.4.tgz", - "integrity": "sha512-Ihh40WW2cB0TUUMfJEOoH5MzQXmPSZc0OcAWMHj8A5Rr4pNNAr1gcJTeB6UHazoRQ8uQG5hg3CqCFydAIbXKfQ==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-win32-arm64-msvc/-/typst-ts-node-compiler-win32-arm64-msvc-0.6.0.tgz", + "integrity": "sha512-04omIPrXSsRKu4XDhj1WZ9uMjdcFcejBGzyOEV351HVDqg5kxgDB32iG3oLySLrzEcbi9WwI5Si46WrW0wh4mA==", "cpu": [ "arm64" ], + "license": "Apache-2.0", "optional": true, "os": [ "win32" @@ -1211,12 +1226,13 @@ } }, "node_modules/@myriaddreamin/typst-ts-node-compiler-win32-x64-msvc": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-win32-x64-msvc/-/typst-ts-node-compiler-win32-x64-msvc-0.5.4.tgz", - "integrity": "sha512-umEuUW6mn68JTueWr4LHsIUN8Bxs1aGyJdHVMy4br1g7MPqkoR0e8rVreTNulKaDx1+4lFdceWa1Uu7Yu0g9Ag==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-win32-x64-msvc/-/typst-ts-node-compiler-win32-x64-msvc-0.6.0.tgz", + "integrity": "sha512-w5UEmXSZ+Eg7Y04EzjgqeHUo7P8bNz9S1c4CUfLrbfZvbTmYNjA0WeqZJ3+tV03BSVxiPiVhrfo95sLqKISNrg==", "cpu": [ "x64" ], + "license": "Apache-2.0", "optional": true, "os": [ "win32" @@ -1942,9 +1958,9 @@ } }, "node_modules/@types/node": { - "version": "22.15.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.3.tgz", - "integrity": "sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw==", + "version": "22.15.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.7.tgz", + "integrity": "sha512-3hieEH05p8cnASknk8cYV71K2Vqmn4Nv8gjvRc5N3XbMlBS4wPwsmsw5bcHw6ISL36vVFuAhElcQCf7Ir4bR0w==", "dev": true, "license": "MIT", "dependencies": { @@ -5521,9 +5537,9 @@ } }, "node_modules/pixi.js": { - "version": "8.9.1", - "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-8.9.1.tgz", - "integrity": "sha512-2vF5Yu9WC/83ly2tCGkjb+ZGnrr+vlKtZezmD0AmJEQoYZO5nL94806l+PVcJBKW6qrF0YHtbh0ubb6CB7/8Rg==", + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-8.9.2.tgz", + "integrity": "sha512-oLFBkOOA/O6OpT5T8o05AxgZB9x9yWNzEQ+WTNZZFoCvfU2GdT4sFTjpVFuHQzgZPmAm/1IFhKdNiXVnlL8PRw==", "license": "MIT", "dependencies": { "@pixi/colord": "^2.9.6", @@ -5579,11 +5595,12 @@ } }, "node_modules/pretty-bytes": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-6.1.1.tgz", - "integrity": "sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-7.0.0.tgz", + "integrity": "sha512-U5otLYPR3L0SVjHGrkEUx5mf7MxV2ceXeE7VwWPk+hyzC5drNohsOGNPDZqxCqyX1lkbEN4kl1LiI8QFd7r0ZA==", + "license": "MIT", "engines": { - "node": "^14.13.1 || >=16.0.0" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -7009,9 +7026,9 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tsx": { - "version": "4.19.3", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.3.tgz", - "integrity": "sha512-4H8vUNGNjQ4V2EOoGw005+c+dGuPSnhpPBPHBtsZdGZBk/iJb4kguGlPWaZTZ3q5nMtFOEsY0nRDlh9PJyd6SQ==", + "version": "4.19.4", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.4.tgz", + "integrity": "sha512-gK5GVzDkJK1SI1zwHf32Mqxf2tSJkNx+eYcNly5+nHvWqXUJYUkWBQtKauoESz3ymezAI++ZwT855x5p5eop+Q==", "dev": true, "license": "MIT", "dependencies": { @@ -7422,9 +7439,9 @@ } }, "node_modules/ws": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz", - "integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==", + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz", + "integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==", "license": "MIT", "engines": { "node": ">=10.0.0" diff --git a/package.json b/package.json index b137cc7..0ed675f 100644 --- a/package.json +++ b/package.json @@ -36,8 +36,8 @@ }, "dependencies": { "@clack/prompts": "^0.10.1", - "@floating-ui/dom": "^1.6.13", - "@myriaddreamin/rehype-typst": "^0.5.4", + "@floating-ui/dom": "^1.7.0", + "@myriaddreamin/rehype-typst": "^0.6.0", "@napi-rs/simple-git": "0.1.19", "@tweenjs/tween.js": "^25.0.0", "@webgpu/types": "^0.1.60", @@ -63,10 +63,10 @@ "mdast-util-to-string": "^4.0.0", "micromorph": "^0.4.5", "minimatch": "^10.0.1", - "pixi.js": "^8.9.1", + "pixi.js": "^8.9.2", "preact": "^10.26.5", "preact-render-to-string": "^6.5.13", - "pretty-bytes": "^6.1.1", + "pretty-bytes": "^7.0.0", "pretty-time": "^1.1.0", "reading-time": "^1.5.0", "rehype-autolink-headings": "^7.1.0", @@ -97,21 +97,21 @@ "unist-util-visit": "^5.0.0", "vfile": "^6.0.3", "workerpool": "^9.2.0", - "ws": "^8.18.1", + "ws": "^8.18.2", "yargs": "^17.7.2" }, "devDependencies": { "@types/d3": "^7.4.3", "@types/hast": "^3.0.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^22.15.3", + "@types/node": "^22.15.7", "@types/pretty-time": "^1.1.5", "@types/source-map-support": "^0.5.10", "@types/ws": "^8.18.1", "@types/yargs": "^17.0.33", "esbuild": "^0.25.3", "prettier": "^3.5.3", - "tsx": "^4.19.3", + "tsx": "^4.19.4", "typescript": "^5.8.3" } } From c33f96e572d7fd4e15d24f9f527fc9f39aebbaa7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 May 2025 12:46:39 -0700 Subject: [PATCH 26/27] chore(deps): bump sigstore/cosign-installer in the ci-dependencies group (#1953) Bumps the ci-dependencies group with 1 update: [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer). Updates `sigstore/cosign-installer` from 3.8.1 to 3.8.2 - [Release notes](https://github.com/sigstore/cosign-installer/releases) - [Commits](https://github.com/sigstore/cosign-installer/compare/v3.8.1...v3.8.2) --- updated-dependencies: - dependency-name: sigstore/cosign-installer dependency-version: 3.8.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: ci-dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker-build-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-push.yaml b/.github/workflows/docker-build-push.yaml index af79ead..ee7efa7 100644 --- a/.github/workflows/docker-build-push.yaml +++ b/.github/workflows/docker-build-push.yaml @@ -37,7 +37,7 @@ jobs: network=host - name: Install cosign if: github.event_name != 'pull_request' - uses: sigstore/cosign-installer@v3.8.1 + uses: sigstore/cosign-installer@v3.8.2 - name: Login to GitHub Container Registry uses: docker/login-action@v3 if: github.event_name != 'pull_request' From e98d97a271857efe14e6f15d8971d452b2d1a2d5 Mon Sep 17 00:00:00 2001 From: Felix Nie Date: Thu, 8 May 2025 03:56:18 +0800 Subject: [PATCH 27/27] feat(i18n): readermode translations and icon (#1961) * fix(readermode): Translations and a new icon for ReaderMode * Formatted * Replaced icon --- quartz/components/ReaderMode.tsx | 22 ++++++++++++++-------- quartz/components/styles/readermode.scss | 1 + quartz/i18n/locales/ar-SA.ts | 3 +++ quartz/i18n/locales/ca-ES.ts | 3 +++ quartz/i18n/locales/cs-CZ.ts | 3 +++ quartz/i18n/locales/de-DE.ts | 7 +++++-- quartz/i18n/locales/definition.ts | 3 +++ quartz/i18n/locales/en-GB.ts | 3 +++ quartz/i18n/locales/en-US.ts | 3 +++ quartz/i18n/locales/es-ES.ts | 3 +++ quartz/i18n/locales/fa-IR.ts | 3 +++ quartz/i18n/locales/fi-FI.ts | 3 +++ quartz/i18n/locales/fr-FR.ts | 3 +++ quartz/i18n/locales/hu-HU.ts | 3 +++ quartz/i18n/locales/it-IT.ts | 3 +++ quartz/i18n/locales/ja-JP.ts | 3 +++ quartz/i18n/locales/ko-KR.ts | 3 +++ quartz/i18n/locales/lt-LT.ts | 3 +++ quartz/i18n/locales/nb-NO.ts | 3 +++ quartz/i18n/locales/nl-NL.ts | 3 +++ quartz/i18n/locales/pl-PL.ts | 3 +++ quartz/i18n/locales/pt-BR.ts | 3 +++ quartz/i18n/locales/ro-RO.ts | 3 +++ quartz/i18n/locales/ru-RU.ts | 3 +++ quartz/i18n/locales/th-TH.ts | 3 +++ quartz/i18n/locales/tr-TR.ts | 3 +++ quartz/i18n/locales/uk-UA.ts | 3 +++ quartz/i18n/locales/vi-VN.ts | 3 +++ quartz/i18n/locales/zh-CN.ts | 3 +++ quartz/i18n/locales/zh-TW.ts | 3 +++ 30 files changed, 101 insertions(+), 10 deletions(-) diff --git a/quartz/components/ReaderMode.tsx b/quartz/components/ReaderMode.tsx index dac4053..4b3165e 100644 --- a/quartz/components/ReaderMode.tsx +++ b/quartz/components/ReaderMode.tsx @@ -2,25 +2,31 @@ import readerModeScript from "./scripts/readermode.inline" import styles from "./styles/readermode.scss" import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types" +import { i18n } from "../i18n" import { classNames } from "../util/lang" -const ReaderMode: QuartzComponent = ({ displayClass }: QuartzComponentProps) => { +const ReaderMode: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => { return ( ) diff --git a/quartz/components/styles/readermode.scss b/quartz/components/styles/readermode.scss index 7d5de77..79332c3 100644 --- a/quartz/components/styles/readermode.scss +++ b/quartz/components/styles/readermode.scss @@ -15,6 +15,7 @@ width: 20px; height: 20px; top: calc(50% - 10px); + fill: var(--darkgray); stroke: var(--darkgray); transition: opacity 0.1s ease; } diff --git a/quartz/i18n/locales/ar-SA.ts b/quartz/i18n/locales/ar-SA.ts index 8463e2f..a1979de 100644 --- a/quartz/i18n/locales/ar-SA.ts +++ b/quartz/i18n/locales/ar-SA.ts @@ -32,6 +32,9 @@ export default { explorer: { title: "المستعرض", }, + readerMode: { + title: "وضع القارئ", + }, footer: { createdWith: "أُنشئ باستخدام", }, diff --git a/quartz/i18n/locales/ca-ES.ts b/quartz/i18n/locales/ca-ES.ts index aadbd41..1483d9c 100644 --- a/quartz/i18n/locales/ca-ES.ts +++ b/quartz/i18n/locales/ca-ES.ts @@ -29,6 +29,9 @@ export default { lightMode: "Mode clar", darkMode: "Mode fosc", }, + readerMode: { + title: "Mode lector", + }, explorer: { title: "Explorador", }, diff --git a/quartz/i18n/locales/cs-CZ.ts b/quartz/i18n/locales/cs-CZ.ts index bf089d1..87f1996 100644 --- a/quartz/i18n/locales/cs-CZ.ts +++ b/quartz/i18n/locales/cs-CZ.ts @@ -29,6 +29,9 @@ export default { lightMode: "Světlý režim", darkMode: "Tmavý režim", }, + readerMode: { + title: "Režim čtečky", + }, explorer: { title: "Procházet", }, diff --git a/quartz/i18n/locales/de-DE.ts b/quartz/i18n/locales/de-DE.ts index 023d4be..85a7353 100644 --- a/quartz/i18n/locales/de-DE.ts +++ b/quartz/i18n/locales/de-DE.ts @@ -26,8 +26,11 @@ export default { noBacklinksFound: "Keine Backlinks gefunden", }, themeToggle: { - lightMode: "Light Mode", - darkMode: "Dark Mode", + lightMode: "Heller Modus", + darkMode: "Dunkler Modus", + }, + readerMode: { + title: "Lesemodus", }, explorer: { title: "Explorer", diff --git a/quartz/i18n/locales/definition.ts b/quartz/i18n/locales/definition.ts index 25a8cd7..ee1649a 100644 --- a/quartz/i18n/locales/definition.ts +++ b/quartz/i18n/locales/definition.ts @@ -31,6 +31,9 @@ export interface Translation { lightMode: string darkMode: string } + readerMode: { + title: string + } explorer: { title: string } diff --git a/quartz/i18n/locales/en-GB.ts b/quartz/i18n/locales/en-GB.ts index 5388b03..80e52bf 100644 --- a/quartz/i18n/locales/en-GB.ts +++ b/quartz/i18n/locales/en-GB.ts @@ -29,6 +29,9 @@ export default { lightMode: "Light mode", darkMode: "Dark mode", }, + readerMode: { + title: "Reader mode", + }, explorer: { title: "Explorer", }, diff --git a/quartz/i18n/locales/en-US.ts b/quartz/i18n/locales/en-US.ts index 22cf31e..e1111e9 100644 --- a/quartz/i18n/locales/en-US.ts +++ b/quartz/i18n/locales/en-US.ts @@ -29,6 +29,9 @@ export default { lightMode: "Light mode", darkMode: "Dark mode", }, + readerMode: { + title: "Reader mode", + }, explorer: { title: "Explorer", }, diff --git a/quartz/i18n/locales/es-ES.ts b/quartz/i18n/locales/es-ES.ts index c4a57aa..b7e425e 100644 --- a/quartz/i18n/locales/es-ES.ts +++ b/quartz/i18n/locales/es-ES.ts @@ -29,6 +29,9 @@ export default { lightMode: "Modo claro", darkMode: "Modo oscuro", }, + readerMode: { + title: "Modo lector", + }, explorer: { title: "Explorador", }, diff --git a/quartz/i18n/locales/fa-IR.ts b/quartz/i18n/locales/fa-IR.ts index 5bfef5a..0300174 100644 --- a/quartz/i18n/locales/fa-IR.ts +++ b/quartz/i18n/locales/fa-IR.ts @@ -29,6 +29,9 @@ export default { lightMode: "حالت روشن", darkMode: "حالت تاریک", }, + readerMode: { + title: "حالت خواندن", + }, explorer: { title: "مطالب", }, diff --git a/quartz/i18n/locales/fi-FI.ts b/quartz/i18n/locales/fi-FI.ts index f173afa..19e102a 100644 --- a/quartz/i18n/locales/fi-FI.ts +++ b/quartz/i18n/locales/fi-FI.ts @@ -29,6 +29,9 @@ export default { lightMode: "Vaalea tila", darkMode: "Tumma tila", }, + readerMode: { + title: "Lukijatila", + }, explorer: { title: "Selain", }, diff --git a/quartz/i18n/locales/fr-FR.ts b/quartz/i18n/locales/fr-FR.ts index ef43fa8..f6df309 100644 --- a/quartz/i18n/locales/fr-FR.ts +++ b/quartz/i18n/locales/fr-FR.ts @@ -29,6 +29,9 @@ export default { lightMode: "Mode clair", darkMode: "Mode sombre", }, + readerMode: { + title: "Mode lecture", + }, explorer: { title: "Explorateur", }, diff --git a/quartz/i18n/locales/hu-HU.ts b/quartz/i18n/locales/hu-HU.ts index 066b777..2a4f077 100644 --- a/quartz/i18n/locales/hu-HU.ts +++ b/quartz/i18n/locales/hu-HU.ts @@ -29,6 +29,9 @@ export default { lightMode: "Világos mód", darkMode: "Sötét mód", }, + readerMode: { + title: "Olvasó mód", + }, explorer: { title: "Fájlböngésző", }, diff --git a/quartz/i18n/locales/it-IT.ts b/quartz/i18n/locales/it-IT.ts index c8c5973..be25bb6 100644 --- a/quartz/i18n/locales/it-IT.ts +++ b/quartz/i18n/locales/it-IT.ts @@ -29,6 +29,9 @@ export default { lightMode: "Tema chiaro", darkMode: "Tema scuro", }, + readerMode: { + title: "Modalità lettura", + }, explorer: { title: "Esplora", }, diff --git a/quartz/i18n/locales/ja-JP.ts b/quartz/i18n/locales/ja-JP.ts index 9581b5e..3c30124 100644 --- a/quartz/i18n/locales/ja-JP.ts +++ b/quartz/i18n/locales/ja-JP.ts @@ -29,6 +29,9 @@ export default { lightMode: "ライトモード", darkMode: "ダークモード", }, + readerMode: { + title: "リーダーモード", + }, explorer: { title: "エクスプローラー", }, diff --git a/quartz/i18n/locales/ko-KR.ts b/quartz/i18n/locales/ko-KR.ts index 9be08d9..1bca096 100644 --- a/quartz/i18n/locales/ko-KR.ts +++ b/quartz/i18n/locales/ko-KR.ts @@ -29,6 +29,9 @@ export default { lightMode: "라이트 모드", darkMode: "다크 모드", }, + readerMode: { + title: "리더 모드", + }, explorer: { title: "탐색기", }, diff --git a/quartz/i18n/locales/lt-LT.ts b/quartz/i18n/locales/lt-LT.ts index d48e593..690960c 100644 --- a/quartz/i18n/locales/lt-LT.ts +++ b/quartz/i18n/locales/lt-LT.ts @@ -29,6 +29,9 @@ export default { lightMode: "Šviesus Režimas", darkMode: "Tamsus Režimas", }, + readerMode: { + title: "Modalità lettore", + }, explorer: { title: "Naršyklė", }, diff --git a/quartz/i18n/locales/nb-NO.ts b/quartz/i18n/locales/nb-NO.ts index 5823b19..0e41522 100644 --- a/quartz/i18n/locales/nb-NO.ts +++ b/quartz/i18n/locales/nb-NO.ts @@ -29,6 +29,9 @@ export default { lightMode: "Lys modus", darkMode: "Mørk modus", }, + readerMode: { + title: "Læsemodus", + }, explorer: { title: "Utforsker", }, diff --git a/quartz/i18n/locales/nl-NL.ts b/quartz/i18n/locales/nl-NL.ts index ccbafa7..8ab3b07 100644 --- a/quartz/i18n/locales/nl-NL.ts +++ b/quartz/i18n/locales/nl-NL.ts @@ -29,6 +29,9 @@ export default { lightMode: "Lichte modus", darkMode: "Donkere modus", }, + readerMode: { + title: "Leesmodus", + }, explorer: { title: "Verkenner", }, diff --git a/quartz/i18n/locales/pl-PL.ts b/quartz/i18n/locales/pl-PL.ts index 7fa0cd4..11033e3 100644 --- a/quartz/i18n/locales/pl-PL.ts +++ b/quartz/i18n/locales/pl-PL.ts @@ -29,6 +29,9 @@ export default { lightMode: "Trzyb jasny", darkMode: "Tryb ciemny", }, + readerMode: { + title: "Tryb czytania", + }, explorer: { title: "Przeglądaj", }, diff --git a/quartz/i18n/locales/pt-BR.ts b/quartz/i18n/locales/pt-BR.ts index c7b6bfb..e431d8e 100644 --- a/quartz/i18n/locales/pt-BR.ts +++ b/quartz/i18n/locales/pt-BR.ts @@ -29,6 +29,9 @@ export default { lightMode: "Tema claro", darkMode: "Tema escuro", }, + readerMode: { + title: "Modo leitor", + }, explorer: { title: "Explorador", }, diff --git a/quartz/i18n/locales/ro-RO.ts b/quartz/i18n/locales/ro-RO.ts index 2de1c8c..007d901 100644 --- a/quartz/i18n/locales/ro-RO.ts +++ b/quartz/i18n/locales/ro-RO.ts @@ -29,6 +29,9 @@ export default { lightMode: "Modul luminos", darkMode: "Modul întunecat", }, + readerMode: { + title: "Modul de citire", + }, explorer: { title: "Explorator", }, diff --git a/quartz/i18n/locales/ru-RU.ts b/quartz/i18n/locales/ru-RU.ts index 18e0817..5534d14 100644 --- a/quartz/i18n/locales/ru-RU.ts +++ b/quartz/i18n/locales/ru-RU.ts @@ -29,6 +29,9 @@ export default { lightMode: "Светлый режим", darkMode: "Тёмный режим", }, + readerMode: { + title: "Режим чтения", + }, explorer: { title: "Проводник", }, diff --git a/quartz/i18n/locales/th-TH.ts b/quartz/i18n/locales/th-TH.ts index 4ea8486..0730131 100644 --- a/quartz/i18n/locales/th-TH.ts +++ b/quartz/i18n/locales/th-TH.ts @@ -29,6 +29,9 @@ export default { lightMode: "โหมดสว่าง", darkMode: "โหมดมืด", }, + readerMode: { + title: "โหมดอ่าน", + }, explorer: { title: "รายการหน้า", }, diff --git a/quartz/i18n/locales/tr-TR.ts b/quartz/i18n/locales/tr-TR.ts index a3805d1..9c2d6d4 100644 --- a/quartz/i18n/locales/tr-TR.ts +++ b/quartz/i18n/locales/tr-TR.ts @@ -29,6 +29,9 @@ export default { lightMode: "Açık mod", darkMode: "Koyu mod", }, + readerMode: { + title: "Okuma modu", + }, explorer: { title: "Gezgin", }, diff --git a/quartz/i18n/locales/uk-UA.ts b/quartz/i18n/locales/uk-UA.ts index 469de4f..ac2a248 100644 --- a/quartz/i18n/locales/uk-UA.ts +++ b/quartz/i18n/locales/uk-UA.ts @@ -29,6 +29,9 @@ export default { lightMode: "Світлий режим", darkMode: "Темний режим", }, + readerMode: { + title: "Режим читання", + }, explorer: { title: "Провідник", }, diff --git a/quartz/i18n/locales/vi-VN.ts b/quartz/i18n/locales/vi-VN.ts index 39a8fbc..26a58a5 100644 --- a/quartz/i18n/locales/vi-VN.ts +++ b/quartz/i18n/locales/vi-VN.ts @@ -29,6 +29,9 @@ export default { lightMode: "Sáng", darkMode: "Tối", }, + readerMode: { + title: "Chế độ đọc", + }, explorer: { title: "Trong bài này", }, diff --git a/quartz/i18n/locales/zh-CN.ts b/quartz/i18n/locales/zh-CN.ts index b710db5..09951bb 100644 --- a/quartz/i18n/locales/zh-CN.ts +++ b/quartz/i18n/locales/zh-CN.ts @@ -29,6 +29,9 @@ export default { lightMode: "亮色模式", darkMode: "暗色模式", }, + readerMode: { + title: "阅读模式", + }, explorer: { title: "探索", }, diff --git a/quartz/i18n/locales/zh-TW.ts b/quartz/i18n/locales/zh-TW.ts index f0db0bf..4e784c0 100644 --- a/quartz/i18n/locales/zh-TW.ts +++ b/quartz/i18n/locales/zh-TW.ts @@ -29,6 +29,9 @@ export default { lightMode: "亮色模式", darkMode: "暗色模式", }, + readerMode: { + title: "閱讀模式", + }, explorer: { title: "探索", },