diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..6313b56c --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 189648d9..7f1576df 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,10 +1,9 @@ --- name: Bug report about: Something about Quartz isn't working the way you expect -title: '' +title: "" labels: bug -assignees: '' - +assignees: "" --- **Describe the bug** @@ -12,6 +11,7 @@ A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' @@ -24,9 +24,10 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] + +- Device: [e.g. iPhone6] +- OS: [e.g. iOS] +- Browser [e.g. chrome, safari] **Additional context** Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 2c9c226d..e766b49b 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,10 +1,9 @@ --- name: Feature request about: Suggest an idea or improvement for Quartz -title: '' +title: "" labels: enhancement -assignees: '' - +assignees: "" --- **Is your feature request related to a problem? Please describe.** diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..90abf679 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,44 @@ +name: Build and Test + +on: + push: + branches: + - v4 + +jobs: + build-and-test: + if: ${{ github.repository == 'jackyzha0/quartz' }} + strategy: + matrix: + os: [windows-latest, macos-latest, ubuntu-latest] + runs-on: ${{ matrix.os }} + permissions: + contents: write + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Cache dependencies + uses: actions/cache@v3 + 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: Test + run: npm test + + - name: Ensure Quartz builds + run: npx quartz build diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml deleted file mode 100644 index fc4668e1..00000000 --- a/.github/workflows/deploy.yaml +++ /dev/null @@ -1,85 +0,0 @@ -# Sample workflow for building and deploying a Hugo site to GitHub Pages -name: Deploy Hugo site to Pages - -on: - # Runs on pushes targeting the default branch - push: - branches: ["hugo"] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. -concurrency: - group: "pages" - cancel-in-progress: false - -# Default to bash -defaults: - run: - shell: bash - -jobs: - # Build job - build: - runs-on: ubuntu-latest - env: - HUGO_VERSION: 0.117.0 - steps: - - name: Make .GitInfo compatible with CJK characters - run: git config --global core.quotepath false - - name: Install Hugo CLI - run: | - wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ - && sudo dpkg -i ${{ runner.temp }}/hugo.deb - # - name: Install Dart Sass - # run: sudo snap install dart-sass - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: recursive - fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod - - name: Setup Pages - id: pages - uses: actions/configure-pages@v3 - # - name: Install Node.js dependencies - # run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" - - name: Build Link Index - uses: jackyzha0/hugo-obsidian@v2.20 - with: - index: true - input: content - output: assets/indices - root: . - - name: Build with Hugo - env: - # For maximum backward compatibility with Hugo modules - HUGO_ENVIRONMENT: production - HUGO_ENV: production - run: | - hugo \ - --minify \ - --baseURL "${{ steps.pages.outputs.base_url }}/" - - name: Upload artifact - uses: actions/upload-pages-artifact@v2 - with: - path: ./public - - # Deployment job - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 diff --git a/.github/workflows/docker-publish.yaml b/.github/workflows/docker-publish.yaml deleted file mode 100644 index efc2bd4a..00000000 --- a/.github/workflows/docker-publish.yaml +++ /dev/null @@ -1,42 +0,0 @@ -name: Create and publish a Docker image - -on: - push: - branches: ['hugo'] - -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - -jobs: - build-and-push-image: - if: github.repository == 'jackyzha0/quartz' - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Log in to the Container registry - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - - name: Build and push Docker image - uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc - with: - context: . - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/.gitignore b/.gitignore index 59cf294a..fd96fec9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,9 @@ .DS_Store +.gitignore +node_modules public -resources -.idea -assets/indices/linkIndex.json -assets/indices/contentIndex.json -linkmap +prof +tsconfig.tsbuildinfo +.obsidian +.quartz-cache +private/ diff --git a/.hugo_build.lock b/.hugo_build.lock deleted file mode 100644 index e69de29b..00000000 diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000..b6f27f13 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +engine-strict=true diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..3c0687a5 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +public +node_modules +.quartz-cache diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index c624fd59..887a2c44 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -20,28 +20,28 @@ If you see someone who is making an extra effort to ensure our community is welc The following behaviors are expected and requested of all community members: - * Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community. - * Exercise consideration and respect in your speech and actions. - * Attempt collaboration before conflict. - * Refrain from demeaning, discriminatory, or harassing behavior and speech. - * Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential. - * Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations. +- Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community. +- Exercise consideration and respect in your speech and actions. +- Attempt collaboration before conflict. +- Refrain from demeaning, discriminatory, or harassing behavior and speech. +- Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential. +- Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations. ## 4. Unacceptable Behavior The following behaviors are considered harassment and are unacceptable within our community: - * Violence, threats of violence or violent language directed against another person. - * Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language. - * Posting or displaying sexually explicit or violent material. - * Posting or threatening to post other people's personally identifying information ("doxing"). - * Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability. - * Inappropriate photography or recording. - * Inappropriate physical contact. You should have someone's consent before touching them. - * Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances. - * Deliberate intimidation, stalking or following (online or in person). - * Advocating for, or encouraging, any of the above behavior. - * Sustained disruption of community events, including talks and presentations. +- Violence, threats of violence or violent language directed against another person. +- Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language. +- Posting or displaying sexually explicit or violent material. +- Posting or threatening to post other people's personally identifying information ("doxing"). +- Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability. +- Inappropriate photography or recording. +- Inappropriate physical contact. You should have someone's consent before touching them. +- Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances. +- Deliberate intimidation, stalking or following (online or in person). +- Advocating for, or encouraging, any of the above behavior. +- Sustained disruption of community events, including talks and presentations. ## 5. Weapons Policy @@ -59,14 +59,11 @@ If a community member engages in unacceptable behavior, the community organizers If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. j.zhao2k19@gmail.com. - - Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress. ## 8. Addressing Grievances -If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify @jackyzha0 with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies. - +If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify @jackyzha0 with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies. ## 9. Scope @@ -80,7 +77,7 @@ j.zhao2k19@gmail.com ## 11. License and attribution -The Citizen Code of Conduct is distributed by [Stumptown Syndicate](http://stumptownsyndicate.org) under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/). +The Citizen Code of Conduct is distributed by [Stumptown Syndicate](http://stumptownsyndicate.org) under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/). Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy). diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 94904ce0..00000000 --- a/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM alpine:3.16 - -RUN apk add --no-cache go hugo git make perl -RUN git config --global --add safe.directory '/quartz' -RUN go install github.com/jackyzha0/hugo-obsidian@latest -ENV PATH="/root/go/bin:$PATH" -RUN git clone https://github.com/jackyzha0/quartz.git /quartz - -WORKDIR /quartz - -CMD ["make", "serve"] diff --git a/Makefile b/Makefile deleted file mode 100644 index bbd3be7a..00000000 --- a/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -.DEFAULT_GOAL := serve - -help: ## Show all Makefile targets - @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' - -update: ## Update Quartz to the latest version on Github - go install github.com/jackyzha0/hugo-obsidian@latest - @git remote show upstream || (echo "remote 'upstream' not present, setting 'upstream'" && git remote add upstream https://github.com/jackyzha0/quartz.git) - git fetch upstream - git log --oneline --decorate --graph ..upstream/hugo - git checkout -p upstream/hugo -- layouts .github Makefile assets/js assets/styles/base.scss assets/styles/darkmode.scss config.toml data - -update-force: ## Forcefully pull all changes and don't ask to patch - go install github.com/jackyzha0/hugo-obsidian@latest - @git remote show upstream || (echo "remote 'upstream' not present, setting 'upstream'" && git remote add upstream https://github.com/jackyzha0/quartz.git) - git fetch upstream - git checkout upstream/hugo -- layouts .github Makefile assets/js assets/styles/base.scss assets/styles/darkmode.scss config.toml data - -serve: ## Serve Quartz locally - hugo-obsidian -input=content -output=assets/indices -index -root=. - hugo server --enableGitInfo --minify --bind=$(or $(HUGO_BIND),0.0.0.0) --baseURL=$(or $(HUGO_BASEURL),http://localhost) --port=$(or $(HUGO_PORT),1313) --appendPort=$(or $(HUGO_APPENDPORT),true) --liveReloadPort=$(or $(HUGO_LIVERELOADPORT),-1) - -docker: ## Serve locally using Docker - docker run -it --volume=$(shell pwd):/quartz -p 1313:1313 ghcr.io/jackyzha0/quartz:hugo diff --git a/README.md b/README.md index 037d7b80..1122981a 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,21 @@ -# https://garden.matsuuratomoya.com - ---- - -Host your second brain and [digital garden](https://jzhao.xyz/posts/networked-thought) for free. Quartz features - -1. Extremely fast natural-language search -2. Customizable and hackable design based on Hugo -3. Automatically generated backlinks, link previews, and local graph -4. Built-in CJK + Latex Support and Admonition-style callouts -5. Support for both Markdown Links and Wikilinks - -Check out some of the [amazing gardens that community members](https://quartz.jzhao.xyz/notes/showcase/) have published with Quartz! +# https://garden.matsuuratomoya.com w/ Quartz v4 > “[One] who works with the door open gets all kinds of interruptions, but [they] also occasionally gets clues as to what the world is and what might be important.” — Richard Hamming -🔗 Get Started: https://quartz.jzhao.xyz/ +Quartz is a set of tools that helps you publish your [digital garden](https://jzhao.xyz/posts/networked-thought) and notes as a website for free. +Quartz v4 features a from-the-ground rewrite focusing on end-user extensibility and ease-of-use. -![Quartz Example Screenshot](./screenshot.png)*Quartz Example Screenshot* +**If you are looking for Quartz v3, you can find it on the [`hugo` branch](https://github.com/jackyzha0/quartz/tree/hugo).** + +🔗 Read the documentation and get started: https://four.quartz.jzhao.xyz/ [Join the Discord Community](https://discord.gg/cRFFHYye7t) + +## Sponsors + +

+ + + +

diff --git a/assets/indices/.gitkeep b/assets/indices/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/assets/js/callouts.js b/assets/js/callouts.js deleted file mode 100644 index 080bbb48..00000000 --- a/assets/js/callouts.js +++ /dev/null @@ -1,6 +0,0 @@ -const addCollapsibleCallouts = () => { - const collapsibleCallouts = document.querySelectorAll("blockquote.callout-collapsible"); - collapsibleCallouts.forEach(el => el.addEventListener('click', event => { - event.currentTarget.classList.toggle("callout-collapsed"); - })); -} diff --git a/assets/js/clipboard.js b/assets/js/clipboard.js deleted file mode 100644 index 10e02c68..00000000 --- a/assets/js/clipboard.js +++ /dev/null @@ -1,45 +0,0 @@ -const svgCopy = - ''; -const svgCheck = - ''; - - -const addCopyButtons = () => { - let els = document.getElementsByClassName("highlight"); - // for each highlight - for (let i = 0; i < els.length; i++) { - try { - if (els[i].getElementsByClassName("clipboard-button").length) continue; - - // find pre > code inside els[i] - let codeBlocks = els[i].getElementsByTagName("code"); - - // line numbers are inside first code block - let lastCodeBlock = codeBlocks[codeBlocks.length - 1]; - const button = document.createElement("button"); - button.className = "clipboard-button"; - button.type = "button"; - button.innerHTML = svgCopy; - button.ariaLabel = "opy the shown code"; - // remove every second newline from lastCodeBlock.innerText - button.addEventListener("click", () => { - navigator.clipboard.writeText(lastCodeBlock.innerText.replace(/\n\n/g, "\n")).then( - () => { - button.blur(); - button.innerHTML = svgCheck; - setTimeout(() => { - button.innerHTML = svgCopy - button.style.borderColor = "" - }, 2000); - }, - (error) => (button.innerHTML = "Error") - ); - }); - // find chroma inside els[i] - let chroma = els[i].getElementsByClassName("chroma")[0]; - els[i].insertBefore(button, chroma); - } catch(error) { - console.debug(error); - } - } -} diff --git a/assets/js/code-title.js b/assets/js/code-title.js deleted file mode 100644 index 325e16d5..00000000 --- a/assets/js/code-title.js +++ /dev/null @@ -1,17 +0,0 @@ - -function addTitleToCodeBlocks() { - const els = document.getElementsByClassName("highlight"); - for (let i = 0; i < els.length; i++) { - try { - if (els[i].title.length) { - let div = document.createElement("div"); - if (els[i].getElementsByClassName("code-title").length) continue; - div.textContent = els[i].title; - div.classList.add("code-title") - els[i].insertBefore(div, els[i].firstChild); - } - } catch (error) { - console.debug(error); - } - } -} diff --git a/assets/js/darkmode.js b/assets/js/darkmode.js deleted file mode 100644 index 8168d77e..00000000 --- a/assets/js/darkmode.js +++ /dev/null @@ -1,37 +0,0 @@ -const userPref = window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark' -const currentTheme = localStorage.getItem('theme') ?? userPref -const syntaxTheme = document.querySelector("#theme-link"); - - -{{ $darkSyntax := resources.Get "styles/_dark_syntax.scss" | resources.ToCSS (dict "outputStyle" "compressed") | resources.Fingerprint "md5" | resources.Minify }} -{{ $lightSyntax := resources.Get "styles/_light_syntax.scss" | resources.ToCSS (dict "outputStyle" "compressed") | resources.Fingerprint "md5" | resources.Minify }} - -if (currentTheme) { - document.documentElement.setAttribute('saved-theme', currentTheme); - syntaxTheme.href = currentTheme === 'dark' ? '{{ $darkSyntax.Permalink }}' : '{{ $lightSyntax.Permalink }}'; -} - -const switchTheme = (e) => { - if (e.target.checked) { - document.documentElement.setAttribute('saved-theme', 'dark'); - localStorage.setItem('theme', 'dark'); - syntaxTheme.href = '{{ $darkSyntax.Permalink }}'; - } - else { - document.documentElement.setAttribute('saved-theme', 'light') - localStorage.setItem('theme', 'light') - syntaxTheme.href = '{{ $lightSyntax.Permalink }}'; - } -} - -window.addEventListener('DOMContentLoaded', () => { - // Darkmode toggle - const toggleSwitch = document.querySelector('#darkmode-toggle') - - // listen for toggle - toggleSwitch.addEventListener('change', switchTheme, false) - - if (currentTheme === 'dark') { - toggleSwitch.checked = true - } -}) diff --git a/assets/js/full-text-search.js b/assets/js/full-text-search.js deleted file mode 100644 index 709a3b36..00000000 --- a/assets/js/full-text-search.js +++ /dev/null @@ -1,61 +0,0 @@ -; (async function() { - const encoder = (str) => str.toLowerCase().split(/([^a-z]|[^\x00-\x7F])/) - const contentIndex = new FlexSearch.Document({ - cache: true, - charset: "latin:extra", - optimize: true, - index: [ - { - field: "content", - tokenize: "reverse", - encode: encoder, - }, - { - field: "title", - tokenize: "forward", - encode: encoder, - }, - ], - }) - - const { content } = await fetchData - for (const [key, value] of Object.entries(content)) { - contentIndex.add({ - id: key, - title: value.title, - content: removeMarkdown(value.content), - }) - } - - const formatForDisplay = (id) => ({ - id, - url: id, - title: content[id].title, - content: content[id].content, - }) - - registerHandlers((e) => { - const term = e.target.value - const searchResults = contentIndex.search(term, [ - { - field: "content", - limit: 10, - }, - { - field: "title", - limit: 5, - }, - ]) - const getByField = (field) => { - const results = searchResults.filter((x) => x.field === field) - if (results.length === 0) { - return [] - } else { - return [...results[0].result] - } - } - const allIds = new Set([...getByField("title"), ...getByField("content")]) - const finalResults = [...allIds].map(formatForDisplay) - displayResults(term, finalResults, true) - }) -})() diff --git a/assets/js/graph.js b/assets/js/graph.js deleted file mode 100644 index 7fea2963..00000000 --- a/assets/js/graph.js +++ /dev/null @@ -1,284 +0,0 @@ -async function drawGraph(baseUrl, isHome, pathColors, graphConfig) { - - let { - depth, - enableDrag, - enableLegend, - enableZoom, - opacityScale, - scale, - repelForce, - fontSize } = graphConfig; - - const container = document.getElementById("graph-container") - const { index, links, content } = await fetchData - - // Use .pathname to remove hashes / searchParams / text fragments - const cleanUrl = window.location.origin + window.location.pathname - - const curPage = cleanUrl.replace(/\/$/g, "").replace(baseUrl, "") - - const parseIdsFromLinks = (links) => [ - ...new Set(links.flatMap((link) => [link.source, link.target])), - ] - - // Links is mutated by d3. We want to use links later on, so we make a copy and pass that one to d3 - // Note: shallow cloning does not work because it copies over references from the original array - const copyLinks = JSON.parse(JSON.stringify(links)) - - const neighbours = new Set() - const wl = [curPage || "/", "__SENTINEL"] - if (depth >= 0) { - while (depth >= 0 && wl.length > 0) { - // compute neighbours - const cur = wl.shift() - if (cur === "__SENTINEL") { - depth-- - wl.push("__SENTINEL") - } else { - neighbours.add(cur) - const outgoing = index.links[cur] || [] - const incoming = index.backlinks[cur] || [] - wl.push(...outgoing.map((l) => l.target), ...incoming.map((l) => l.source)) - } - } - } else { - parseIdsFromLinks(copyLinks).forEach((id) => neighbours.add(id)) - } - - const data = { - nodes: [...neighbours].map((id) => ({ id })), - links: copyLinks.filter((l) => neighbours.has(l.source) && neighbours.has(l.target)), - } - - const color = (d) => { - if (d.id === curPage || (d.id === "/" && curPage === "")) { - return "var(--g-node-active)" - } - - for (const pathColor of pathColors) { - const path = Object.keys(pathColor)[0] - const colour = pathColor[path] - if (d.id.startsWith(path)) { - return colour - } - } - - return "var(--g-node)" - } - - const drag = (simulation) => { - function dragstarted(event, d) { - if (!event.active) simulation.alphaTarget(1).restart() - d.fx = d.x - d.fy = d.y - } - - function dragged(event, d) { - d.fx = event.x - d.fy = event.y - } - - function dragended(event, d) { - if (!event.active) simulation.alphaTarget(0) - d.fx = null - d.fy = null - } - - const noop = () => { } - return d3 - .drag() - .on("start", enableDrag ? dragstarted : noop) - .on("drag", enableDrag ? dragged : noop) - .on("end", enableDrag ? dragended : noop) - } - - const height = Math.max(container.offsetHeight, isHome ? 500 : 250) - const width = container.offsetWidth - - const simulation = d3 - .forceSimulation(data.nodes) - .force("charge", d3.forceManyBody().strength(-100 * repelForce)) - .force( - "link", - d3 - .forceLink(data.links) - .id((d) => d.id) - .distance(40), - ) - .force("center", d3.forceCenter()) - - const svg = d3 - .select("#graph-container") - .append("svg") - .attr("width", width) - .attr("height", height) - .attr('viewBox', [-width / 2 / scale, -height / 2 / scale, width / scale, height / scale]) - - if (enableLegend) { - const legend = [{ Current: "var(--g-node-active)" }, { Note: "var(--g-node)" }, ...pathColors] - legend.forEach((legendEntry, i) => { - const key = Object.keys(legendEntry)[0] - const colour = legendEntry[key] - svg - .append("circle") - .attr("cx", -width / 2 + 20) - .attr("cy", height / 2 - 30 * (i + 1)) - .attr("r", 6) - .style("fill", colour) - svg - .append("text") - .attr("x", -width / 2 + 40) - .attr("y", height / 2 - 30 * (i + 1)) - .text(key) - .style("font-size", "15px") - .attr("alignment-baseline", "middle") - }) - } - - // draw links between nodes - const link = svg - .append("g") - .selectAll("line") - .data(data.links) - .join("line") - .attr("class", "link") - .attr("stroke", "var(--g-link)") - .attr("stroke-width", 2) - .attr("data-source", (d) => d.source.id) - .attr("data-target", (d) => d.target.id) - - // svg groups - const graphNode = svg.append("g").selectAll("g").data(data.nodes).enter().append("g") - - // calculate radius - const nodeRadius = (d) => { - const numOut = index.links[d.id]?.length || 0 - const numIn = index.backlinks[d.id]?.length || 0 - return 2 + Math.sqrt(numOut + numIn) - } - - // draw individual nodes - const node = graphNode - .append("circle") - .attr("class", "node") - .attr("id", (d) => d.id) - .attr("r", nodeRadius) - .attr("fill", color) - .style("cursor", "pointer") - .on("click", (_, d) => { - // SPA navigation - const targ = `${baseUrl}${decodeURI(d.id).replace(/\s+/g, "-")}/` - window.Million.navigate(new URL(targ), ".singlePage") - plausible("Link Click", { - props: { - href: targ, - broken: false, - internal: true, - graph: true, - } - }) - }) - .on("mouseover", function (_, d) { - d3.selectAll(".node").transition().duration(100).attr("fill", "var(--g-node-inactive)") - - const neighbours = parseIdsFromLinks([ - ...(index.links[d.id] || []), - ...(index.backlinks[d.id] || []), - ]) - const neighbourNodes = d3.selectAll(".node").filter((d) => neighbours.includes(d.id)) - const currentId = d.id - window.Million.prefetch(new URL(`${baseUrl}${decodeURI(d.id).replace(/\s+/g, "-")}/`)) - const linkNodes = d3 - .selectAll(".link") - .filter((d) => d.source.id === currentId || d.target.id === currentId) - - // highlight neighbour nodes - neighbourNodes.transition().duration(200).attr("fill", color) - - // highlight links - linkNodes.transition().duration(200).attr("stroke", "var(--g-link-active)") - - const bigFont = fontSize * 1.5 - - // show text for self - d3.select(this.parentNode) - .raise() - .select("text") - .transition() - .duration(200) - .attr('opacityOld', d3.select(this.parentNode).select('text').style("opacity")) - .style('opacity', 1) - .style('font-size', bigFont + 'em') - .attr('dy', d => nodeRadius(d) + 20 + 'px') // radius is in px - }) - .on("mouseleave", function (_, d) { - d3.selectAll(".node").transition().duration(200).attr("fill", color) - - const currentId = d.id - const linkNodes = d3 - .selectAll(".link") - .filter((d) => d.source.id === currentId || d.target.id === currentId) - - linkNodes.transition().duration(200).attr("stroke", "var(--g-link)") - - d3.select(this.parentNode) - .select("text") - .transition() - .duration(200) - .style('opacity', d3.select(this.parentNode).select('text').attr("opacityOld")) - .style('font-size', fontSize + 'em') - .attr('dy', d => nodeRadius(d) + 8 + 'px') // radius is in px - }) - .call(drag(simulation)) - - // draw labels - const labels = graphNode - .append("text") - .attr("dx", 0) - .attr("dy", (d) => nodeRadius(d) + 8 + "px") - .attr("text-anchor", "middle") - .text((d) => { - const str = content[d.id]?.title || - decodeURI(d.id.charAt(1).toUpperCase() + d.id.slice(2)) - .replace("-", " "); - return str.slice(0, 30) + (str.length > 30 ? "..." : "") - }) - .style('opacity', (opacityScale - 1) / 3.75) - .style("pointer-events", "none") - .style('font-size', fontSize + 'em') - .raise() - .call(drag(simulation)) - - // set panning - - if (enableZoom) { - svg.call( - d3 - .zoom() - .extent([ - [0, 0], - [width, height], - ]) - .scaleExtent([0.25, 4]) - .on("zoom", ({ transform }) => { - link.attr("transform", transform) - node.attr("transform", transform) - const scale = transform.k * opacityScale; - const scaledOpacity = Math.max((scale - 1) / 3.75, 0) - labels.attr("transform", transform).style("opacity", scaledOpacity) - }), - ) - } - - // progress the simulation - simulation.on("tick", () => { - link - .attr("x1", (d) => d.source.x) - .attr("y1", (d) => d.source.y) - .attr("x2", (d) => d.target.x) - .attr("y2", (d) => d.target.y) - node.attr("cx", (d) => d.x).attr("cy", (d) => d.y) - labels.attr("x", (d) => d.x).attr("y", (d) => d.y) - }) -} diff --git a/assets/js/popover.js b/assets/js/popover.js deleted file mode 100644 index 101d1c0c..00000000 --- a/assets/js/popover.js +++ /dev/null @@ -1,79 +0,0 @@ -function htmlToElement(html) { - const template = document.createElement("template") - html = html.trim() - template.innerHTML = html - return template.content.firstChild -} - -function initPopover(baseURL, useContextualBacklinks) { - const basePath = baseURL.replace(window.location.origin, "") - fetchData.then(({ content }) => { - const links = [...document.getElementsByClassName("internal-link")] - links - .filter(li => li.dataset.src || (li.dataset.idx && useContextualBacklinks)) - .forEach(li => { - let el - if (li.dataset.ctx) { - const linkDest = content[li.dataset.src] - const popoverElement = `
-

${linkDest.title}

-

${highlight(removeMarkdown(linkDest.content), li.dataset.ctx)}...

-

${new Date(linkDest.lastmodified).toLocaleDateString()}

-
` - el = htmlToElement(popoverElement) - } else { - const linkDest = content[li.dataset.src.replace(/\/$/g, "").replace(basePath, "")] - if (linkDest) { - let splitLink = li.href.split("#") - let cleanedContent = removeMarkdown(linkDest.content) - if (splitLink.length > 1) { - let headingName = decodeURIComponent(splitLink[1]).replace(/\-/g, " ") - let headingIndex = cleanedContent.toLowerCase().indexOf("" + headingName + "") - cleanedContent = cleanedContent.substring(headingIndex, cleanedContent.length) - } - const popoverElement = `
-

${linkDest.title}

-

${cleanedContent.split(" ", 20).join(" ")}...

-

${new Date(linkDest.lastmodified).toLocaleDateString()}

-
` - el = htmlToElement(popoverElement) - } - } - - if (el) { - li.appendChild(el) - if (LATEX_ENABLED) { - renderMathInElement(el, { - delimiters: [ - { left: '$$', right: '$$', display: false }, - { left: '$', right: '$', display: false }, - ], - throwOnError: false - }) - } - - li.addEventListener("mouseover", () => { - // fix tooltip positioning - window.FloatingUIDOM.computePosition(li, el, { - middleware: [window.FloatingUIDOM.offset(10), window.FloatingUIDOM.inline(), window.FloatingUIDOM.shift()], - }).then(({ x, y }) => { - Object.assign(el.style, { - left: `${x}px`, - top: `${y}px`, - }) - }) - - el.classList.add("visible") - plausible("Popover Hover", { - props: { - href: li.dataset.src - } - }) - }) - li.addEventListener("mouseout", () => { - el.classList.remove("visible") - }) - } - }) - }) -} diff --git a/assets/js/router.js b/assets/js/router.js deleted file mode 100644 index c29ab773..00000000 --- a/assets/js/router.js +++ /dev/null @@ -1,25 +0,0 @@ -import { - apply, - navigate, - prefetch, - router, -} from "https://unpkg.com/million@1.11.5/dist/router.mjs" - -export const attachSPARouting = (init, rerender) => { - // Attach SPA functions to the global Million namespace - window.Million = { - apply, - navigate, - prefetch, - router, - } - - const render = () => requestAnimationFrame(rerender) - window.addEventListener("DOMContentLoaded", () => { - apply((doc) => init(doc)) - init() - router(".singlePage") - render() - }) - window.addEventListener("million:navigate", render) -} diff --git a/assets/js/semantic-search.js b/assets/js/semantic-search.js deleted file mode 100644 index fca2851e..00000000 --- a/assets/js/semantic-search.js +++ /dev/null @@ -1,54 +0,0 @@ -// Note: Currently, we use the REST API for Operand because of some unpkg/webpack issues. -// In the future, we'd like to use the SDK (https://github.com/operandinc/typescript-sdk). -// If someone knows how to do this w/o breaking the Operand typescript-sdk for npm users, -// please let Morgan (@morgallant) and/or (@_jzhao) know! <3 - -const apiKey = "{{$.Site.Data.config.search.operandApiKey}}" -const indexId = "{{$.Site.Data.config.search.operandIndexId}}" - -function parseSearchResults(searchResults) { - return searchResults.matches.map((m) => ({ - content: m.content, - title: searchResults.objects[m.objectId].properties.properties._title.text, - url: searchResults.objects[m.objectId].properties.properties._url.text, - })) -} - -async function searchContents(query) { - const result = await fetch("https://api.operand.ai/operand.v1.ObjectService/SearchWithin", { - method: "POST", - headers: { - "Content-Type": "application/json", - Authorization: `${apiKey}`, - "Operand-Index-ID": `${indexId}`, - }, - body: JSON.stringify({ - query: query, - limit: 10, - }), - }) - if (result.ok) { - return parseSearchResults(await result.json()) - } else { - console.error(result) - } -} - -function debounce(func, timeout = 200) { - let timer - return (...args) => { - clearTimeout(timer) - timer = setTimeout(() => { - func.apply(this, args) - }, timeout) - } -} - -registerHandlers( - debounce((e) => { - let term = e.target.value - if (term !== "") { - searchContents(term).then((results) => displayResults(term, results)) - } - }), -) diff --git a/assets/js/util.js b/assets/js/util.js deleted file mode 100644 index bd434c73..00000000 --- a/assets/js/util.js +++ /dev/null @@ -1,226 +0,0 @@ -// code from https://github.com/danestves/markdown-to-text -const removeMarkdown = ( - markdown, - options = { - listUnicodeChar: false, - stripListLeaders: true, - gfm: true, - useImgAltText: false, - preserveLinks: false, - }, -) => { - let output = markdown || "" - output = output.replace(/^(-\s*?|\*\s*?|_\s*?){3,}\s*$/gm, "") - - try { - if (options.stripListLeaders) { - if (options.listUnicodeChar) - output = output.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm, options.listUnicodeChar + " $1") - else output = output.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm, "$1") - } - if (options.gfm) { - output = output - .replace(/\n={2,}/g, "\n") - .replace(/~{3}.*\n/g, "") - .replace(/~~/g, "") - .replace(/`{3}.*\n/g, "") - } - if (options.preserveLinks) { - output = output.replace(/\[(.*?)\][\[\(](.*?)[\]\)]/g, "$1 ($2)") - } - output = output - .replace(/<[^>]*>/g, "") - .replace(/^[=\-]{2,}\s*$/g, "") - .replace(/\[\^.+?\](\: .*?$)?/g, "") - .replace(/(#{1,6})\s+(.+)\1?/g, "$2") - .replace(/\s{0,2}\[.*?\]: .*?$/g, "") - .replace(/\!\[(.*?)\][\[\(].*?[\]\)]/g, options.useImgAltText ? "$1" : "") - .replace(/\[(.*?)\][\[\(].*?[\]\)]/g, "$1") - .replace(/!?\[\[\S[^\[\]\|]*(?:\|([^\[\]]*))?\S\]\]/g, "$1") - .replace(/^\s{0,3}>\s?/g, "") - .replace(/(^|\n)\s{0,3}>\s?/g, "\n\n") - .replace(/^\s{1,2}\[(.*?)\]: (\S+)( ".*?")?\s*$/g, "") - .replace(/([\*_]{1,3})(\S.*?\S?)\1/g, "$2") - .replace(/([\*_]{1,3})(\S.*?\S?)\1/g, "$2") - .replace(/(`{3,})(.*?)\1/gm, "$2") - .replace(/`(.+?)`/g, "$1") - .replace(/\n{2,}/g, "\n\n") - .replace(/\[![a-zA-Z]+\][-\+]? /g, "") - } catch (e) { - console.error(e) - return markdown - } - return output -} - -const highlight = (content, term) => { - const highlightWindow = 20 - // try to find direct match first - const directMatchIdx = content.indexOf(term) - if (directMatchIdx !== -1) { - const h = highlightWindow - const before = content.substring(0, directMatchIdx).split(" ").slice(-h) - const after = content - .substring(directMatchIdx + term.length, content.length - 2) - .split(" ") - .slice(0, h) - return ( - (before.length === h ? `...${before.join(" ")}` : before.join(" ")) + - `${term}` + - after.join(" ") - ) - } - - const tokenizedTerm = term.split(/\s+/).filter((t) => t !== "") - const splitText = content.split(/\s+/).filter((t) => t !== "") - const includesCheck = (token) => - tokenizedTerm.some((term) => token.toLowerCase().startsWith(term.toLowerCase())) - - const occurrencesIndices = splitText.map(includesCheck) - - // calculate best index - let bestSum = 0 - let bestIndex = 0 - for (let i = 0; i < Math.max(occurrencesIndices.length - highlightWindow, 0); i++) { - const window = occurrencesIndices.slice(i, i + highlightWindow) - const windowSum = window.reduce((total, cur) => total + cur, 0) - if (windowSum >= bestSum) { - bestSum = windowSum - bestIndex = i - } - } - - const startIndex = Math.max(bestIndex - highlightWindow, 0) - const endIndex = Math.min(startIndex + 2 * highlightWindow, splitText.length) - const mappedText = splitText - .slice(startIndex, endIndex) - .map((token) => { - if (includesCheck(token)) { - return `${token}` - } - return token - }) - .join(" ") - .replaceAll(' ', " ") - return `${startIndex === 0 ? "" : "..."}${mappedText}${endIndex === splitText.length ? "" : "..." - }` -} - -// Common utilities for search -const resultToHTML = ({ url, title, content }) => { - return `` -} - -const redir = (id, term) => { - const shouldTrim = PRODUCTION && SEARCH_ENABLED - const baseURLPrefix = shouldTrim ? "" : BASE_URL.replace(/\/$/g, "") - const urlString = `${baseURLPrefix}${id}#:~:text=${encodeURIComponent(term)}` - window.Million.navigate( - new URL(urlString), - ".singlePage", - ) - closeSearch() - plausible("Search", { - props: { - term - } - }) -} - -function openSearch() { - const source = document.getElementById("search-bar") - const results = document.getElementById("results-container") - const searchContainer = document.getElementById("search-container") - if (searchContainer.style.display === "none" || searchContainer.style.display === "") { - source.value = "" - results.innerHTML = "" - searchContainer.style.display = "block" - source.focus() - } else { - searchContainer.style.display = "none" - } -} - -function closeSearch() { - const searchContainer = document.getElementById("search-container") - searchContainer.style.display = "none" -} - -const registerHandlers = (onInputFn) => { - const source = document.getElementById("search-bar") - const searchContainer = document.getElementById("search-container") - let term - source.addEventListener("keyup", (e) => { - if (e.key === "Enter") { - const anchor = document.getElementsByClassName("result-card")[0] - redir(anchor.id, term) - } - }) - source.addEventListener("input", onInputFn) - document.addEventListener("keydown", (event) => { - if (event.key === "k" && (event.ctrlKey || event.metaKey)) { - event.preventDefault() - openSearch() - } - if (event.key === "Escape") { - event.preventDefault() - closeSearch() - } - }) - - const searchButton = document.getElementById("search-icon") - searchButton.addEventListener("click", (_) => { - openSearch() - }) - searchButton.addEventListener("keydown", (_) => { - openSearch() - }) - searchContainer.addEventListener("click", (_) => { - closeSearch() - }) - document.getElementById("search-space").addEventListener("click", (evt) => { - evt.stopPropagation() - }) -} - -const displayResults = (term, finalResults, extractHighlight = false) => { - const results = document.getElementById("results-container") - if (finalResults.length === 0) { - results.innerHTML = `` - } else { - results.innerHTML = finalResults - .map((result) => { - if (extractHighlight) { - return resultToHTML({ - url: result.url, - title: highlight(result.title, term), - content: highlight(removeMarkdown(result.content), term) - }) - } else { - return resultToHTML(result) - } - } - ) - .join("\n") - if (LATEX_ENABLED) { - renderMathInElement(results, { - delimiters: [ - { left: '$$', right: '$$', display: false }, - { left: '$', right: '$', display: false }, - ], - throwOnError: false - }) - } - - const anchors = [...document.getElementsByClassName("result-card")] - anchors.forEach((anchor) => { - anchor.onclick = () => redir(anchor.id, term) - }) - } -} diff --git a/assets/styles/_callouts.scss b/assets/styles/_callouts.scss deleted file mode 100644 index e1650fc8..00000000 --- a/assets/styles/_callouts.scss +++ /dev/null @@ -1,174 +0,0 @@ -:root { - --callout-summary: #00b0ff; - --callout-summary-accent: #7fd7ff; - --callout-bug: #f50057; - --callout-bug-accent: #ff7aa9; - --callout-danger: #ff1744; - --callout-danger-accent: #ff8aa1; - --callout-example: #7c4dff; - --callout-example-accent: #bda5ff; - --callout-fail: #ff5252; - --callout-fail-accent: #ffa8a8; - --callout-info: #00b8d4; - --callout-info-accent: #69ebff; - --callout-note: #448aff; - --callout-note-accent: #a1c4ff; - --callout-question: #64dd17; - --callout-question-accent: #b0f286; - --callout-quote: #9e9e9e; - --callout-quote-accent: #cecece; - --callout-done: #00c853; - --callout-done-accent: #63ffa4; - --callout-important: #00bfa5; - --callout-important-accent: #5fffe9; - --callout-warning: #ff9100; - --callout-warning-accent: #ffc87f; -} - -[saved-theme=dark] { - --callout-summary: #00b0ff !important; - --callout-summary-accent: #00587f !important; - --callout-bug: #f50057 !important; - --callout-bug-accent: #7a002b !important; - --callout-danger: #ff1744 !important; - --callout-danger-accent: #8b001a !important; - --callout-example: #7c4dff !important; - --callout-example-accent: #2b00a6 !important; - --callout-fail: #ff5252 !important; - --callout-fail-accent: #a80000 !important; - --callout-info: #00b8d4 !important; - --callout-info-accent: #005c6a !important; - --callout-note: #448aff !important; - --callout-note-accent: #003ca1 !important; - --callout-question: #64dd17 !important; - --callout-question-accent: #006429 !important; - --callout-quote: #9e9e9e !important; - --callout-quote-accent: #4f4f4f !important; - --callout-done: #00c853 !important; - --callout-done-accent: #006429 !important; - --callout-important: #00bfa5 !important; - --callout-important-accent: #005f52 !important; - --callout-warning: #ff9100 !important; - --callout-warning-accent: #7f4800 !important; -} - -blockquote.callout-collapsible { - cursor: pointer; - - &.callout-collapsible::after { - content: '-'; - right: 6px; - font-weight: bolder; - font-family: Courier New, Courier, monospace; - } -} - -blockquote.callout-collapsed { - & > p { border-bottom-right-radius: 5px !important; } - padding-bottom: 0 !important; - &::after { - content: '+' !important; - } - & > *:not(:first-child) { - display: none !important; - } -} - -blockquote[class*="-callout"] { - margin-right: 0; - border-radius: 5px; - position: relative; - padding-left: 0 !important; - padding-bottom: 0.25em; - color: var(--dark); - background-color: var(--lightgray); - border-left: 6px solid var(--primary) !important; - & > p { - border-top-right-radius: 5px; - padding: 0.5em 1em; - margin: 0; - color: var(--gray); - &:first-child { - font-weight: 600; - color: var(--dark); - padding: 0.4em 30px; - } - } -} - -blockquote[class*="-callout"] > p:first-child::after, blockquote.callout-collapsible::after { - display: inline-block; - height: 18px; - width: 18px; - position: absolute; - top: 0.4em; - margin: 0.2em 0.4em; -} - -blockquote[class*="-callout"] > p:first-child { - font-weight: bold; - padding: 0.4em 35px; - - &::after { - left: 0; - } -} - -blockquote[class*="-callout"] > p:empty { - padding: 1.2em 35px; -} - -$summary: summary, abstract, tldr; -$bug: bug; -$danger: danger, error; -$example: example; -$fail: fail, failure, missing; -$info: info, todo; -$note: note; -$question: question, help, faq; -$quote: quote, cite; -$done: done, success, check; -$important: important, tip, hint; -$warning: warning, caution, attention; -$types: $summary, $bug, $danger, $example, $fail, $info, $note, $question, $quote, $done, $important, $warning; -$svgs: (); -$svgs: map-merge($svgs, ($summary: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='book' class='svg-inline--callout-fa fa-book fa-w-14' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='currentColor' d='M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z'%3E%3C/path%3E%3C/svg%3E"))); -$svgs: map-merge($svgs, ($bug: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='bug' class='svg-inline--callout-fa fa-bug fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='currentColor' d='M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z'%3E%3C/path%3E%3C/svg%3E"))); -$svgs: map-merge($svgs, ($danger: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='bolt' class='svg-inline--callout-fa fa-bolt fa-w-10' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath fill='currentColor' d='M296 160H180.6l42.6-129.8C227.2 15 215.7 0 200 0H56C44 0 33.8 8.9 32.2 20.8l-32 240C-1.7 275.2 9.5 288 24 288h118.7L96.6 482.5c-3.6 15.2 8 29.5 23.3 29.5 8.4 0 16.4-4.4 20.8-12l176-304c9.3-15.9-2.2-36-20.7-36z'%3E%3C/path%3E%3C/svg%3E"))); -$svgs: map-merge($svgs, ($example: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='list-ol' class='svg-inline--callout-fa fa-list-ol fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='currentColor' d='M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z'%3E%3C/path%3E%3C/svg%3E"))); -$svgs: map-merge($svgs, ($fail: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='times-circle' class='svg-inline--callout-fa fa-times-circle fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='currentColor' d='M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z'%3E%3C/path%3E%3C/svg%3E"))); -$svgs: map-merge($svgs, ($info: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='info-circle' class='svg-inline--callout-fa fa-info-circle fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='currentColor' d='M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z'%3E%3C/path%3E%3C/svg%3E"))); -$svgs: map-merge($svgs, ($note: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='pencil-alt' class='svg-inline--callout-fa fa-pencil-alt fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='currentColor' d='M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z'%3E%3C/path%3E%3C/svg%3E"))); -$svgs: map-merge($svgs, ($question: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='question-circle' class='svg-inline--callout-fa fa-question-circle fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='currentColor' d='M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z'%3E%3C/path%3E%3C/svg%3E"))); -$svgs: map-merge($svgs, ($quote: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='quote-right' class='svg-inline--callout-fa fa-quote-right fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='currentColor' d='M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z'%3E%3C/path%3E%3C/svg%3E"))); -$svgs: map-merge($svgs, ($done: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='check-circle' class='svg-inline--callout-fa fa-check-circle fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='currentColor' d='M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z'%3E%3C/path%3E%3C/svg%3E"))); -$svgs: map-merge($svgs, ($important: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='fire' class='svg-inline--callout-fa fa-fire fa-w-12' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath fill='currentColor' d='M216 23.86c0-23.8-30.65-32.77-44.15-13.04C48 191.85 224 200 224 288c0 35.63-29.11 64.46-64.85 63.99-35.17-.45-63.15-29.77-63.15-64.94v-85.51c0-21.7-26.47-32.23-41.43-16.5C27.8 213.16 0 261.33 0 320c0 105.87 86.13 192 192 192s192-86.13 192-192c0-170.29-168-193-168-296.14z'%3E%3C/path%3E%3C/svg%3E"))); -$svgs: map-merge($svgs, ($warning: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='exclamation-triangle' class='svg-inline--callout-fa fa-exclamation-triangle fa-w-18' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath fill='currentColor' d='M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z'%3E%3C/path%3E%3C/svg%3E"))); - -@function getstr($l) { - $v: nth($l, 1); - @return $v; -} - -@each $type in $types { - @each $s in $type { - blockquote.#{$s}-callout { - border-left: 6px solid var(--callout-#{getstr($type)}) !important; - & > p:first-child { - background-color: var(--callout-#{getstr($type)}-accent) !important; - &::after { - content: ''; - -webkit-mask: map-get($svgs, $type); - mask: map-get($svgs, $type); - background-color: var(--callout-#{getstr($type)}) !important; - -webkit-mask-size: contain; - mask-size: contain; - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - -webkit-mask-position: center; - mask-position: center; - } - } - } - } -} diff --git a/assets/styles/_dark_syntax.scss b/assets/styles/_dark_syntax.scss deleted file mode 100644 index 9d2019a8..00000000 --- a/assets/styles/_dark_syntax.scss +++ /dev/null @@ -1,85 +0,0 @@ -/* Background */ .bg { color: #f8f8f2; background-color: #282a36; } -/* PreWrapper */ .chroma { color: #f8f8f2; background-color: #282a36; } -/* Other */ .chroma .x { } -/* Error */ .chroma .err { } -/* CodeLine */ .chroma .cl { } -/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } -/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; } -/* LineHighlight */ .chroma .hl { background-color: #ffffcc } -/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } -/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } -/* Line */ .chroma .line { display: flex; } -/* Keyword */ .chroma .k { color: #ff79c6 } -/* KeywordConstant */ .chroma .kc { color: #ff79c6 } -/* KeywordDeclaration */ .chroma .kd { color: #8be9fd; font-style: italic } -/* KeywordNamespace */ .chroma .kn { color: #ff79c6 } -/* KeywordPseudo */ .chroma .kp { color: #ff79c6 } -/* KeywordReserved */ .chroma .kr { color: #ff79c6 } -/* KeywordType */ .chroma .kt { color: #8be9fd } -/* Name */ .chroma .n { } -/* NameAttribute */ .chroma .na { color: #50fa7b } -/* NameBuiltin */ .chroma .nb { color: #8be9fd; font-style: italic } -/* NameBuiltinPseudo */ .chroma .bp { } -/* NameClass */ .chroma .nc { color: #50fa7b } -/* NameConstant */ .chroma .no { } -/* NameDecorator */ .chroma .nd { } -/* NameEntity */ .chroma .ni { } -/* NameException */ .chroma .ne { } -/* NameFunction */ .chroma .nf { color: #50fa7b } -/* NameFunctionMagic */ .chroma .fm { } -/* NameLabel */ .chroma .nl { color: #8be9fd; font-style: italic } -/* NameNamespace */ .chroma .nn { } -/* NameOther */ .chroma .nx { } -/* NameProperty */ .chroma .py { } -/* NameTag */ .chroma .nt { color: #ff79c6 } -/* NameVariable */ .chroma .nv { color: #8be9fd; font-style: italic } -/* NameVariableClass */ .chroma .vc { color: #8be9fd; font-style: italic } -/* NameVariableGlobal */ .chroma .vg { color: #8be9fd; font-style: italic } -/* NameVariableInstance */ .chroma .vi { color: #8be9fd; font-style: italic } -/* NameVariableMagic */ .chroma .vm { } -/* Literal */ .chroma .l { } -/* LiteralDate */ .chroma .ld { } -/* LiteralString */ .chroma .s { color: #f1fa8c } -/* LiteralStringAffix */ .chroma .sa { color: #f1fa8c } -/* LiteralStringBacktick */ .chroma .sb { color: #f1fa8c } -/* LiteralStringChar */ .chroma .sc { color: #f1fa8c } -/* LiteralStringDelimiter */ .chroma .dl { color: #f1fa8c } -/* LiteralStringDoc */ .chroma .sd { color: #f1fa8c } -/* LiteralStringDouble */ .chroma .s2 { color: #f1fa8c } -/* LiteralStringEscape */ .chroma .se { color: #f1fa8c } -/* LiteralStringHeredoc */ .chroma .sh { color: #f1fa8c } -/* LiteralStringInterpol */ .chroma .si { color: #f1fa8c } -/* LiteralStringOther */ .chroma .sx { color: #f1fa8c } -/* LiteralStringRegex */ .chroma .sr { color: #f1fa8c } -/* LiteralStringSingle */ .chroma .s1 { color: #f1fa8c } -/* LiteralStringSymbol */ .chroma .ss { color: #f1fa8c } -/* LiteralNumber */ .chroma .m { color: #bd93f9 } -/* LiteralNumberBin */ .chroma .mb { color: #bd93f9 } -/* LiteralNumberFloat */ .chroma .mf { color: #bd93f9 } -/* LiteralNumberHex */ .chroma .mh { color: #bd93f9 } -/* LiteralNumberInteger */ .chroma .mi { color: #bd93f9 } -/* LiteralNumberIntegerLong */ .chroma .il { color: #bd93f9 } -/* LiteralNumberOct */ .chroma .mo { color: #bd93f9 } -/* Operator */ .chroma .o { color: #ff79c6 } -/* OperatorWord */ .chroma .ow { color: #ff79c6 } -/* Punctuation */ .chroma .p { } -/* Comment */ .chroma .c { color: #6272a4 } -/* CommentHashbang */ .chroma .ch { color: #6272a4 } -/* CommentMultiline */ .chroma .cm { color: #6272a4 } -/* CommentSingle */ .chroma .c1 { color: #6272a4 } -/* CommentSpecial */ .chroma .cs { color: #6272a4 } -/* CommentPreproc */ .chroma .cp { color: #ff79c6 } -/* CommentPreprocFile */ .chroma .cpf { color: #ff79c6 } -/* Generic */ .chroma .g { } -/* GenericDeleted */ .chroma .gd { color: #ff5555 } -/* GenericEmph */ .chroma .ge { text-decoration: underline } -/* GenericError */ .chroma .gr { } -/* GenericHeading */ .chroma .gh { font-weight: bold } -/* GenericInserted */ .chroma .gi { color: #50fa7b; font-weight: bold } -/* GenericOutput */ .chroma .go { color: #44475a } -/* GenericPrompt */ .chroma .gp { } -/* GenericStrong */ .chroma .gs { } -/* GenericSubheading */ .chroma .gu { font-weight: bold } -/* GenericTraceback */ .chroma .gt { } -/* GenericUnderline */ .chroma .gl { text-decoration: underline } -/* TextWhitespace */ .chroma .w { } diff --git a/assets/styles/_light_syntax.scss b/assets/styles/_light_syntax.scss deleted file mode 100644 index d0f452e0..00000000 --- a/assets/styles/_light_syntax.scss +++ /dev/null @@ -1,85 +0,0 @@ -/* Background */ .bg { color: #272822; background-color: #fafafa; } -/* PreWrapper */ .chroma { color: #272822; background-color: #fafafa; } -/* Other */ .chroma .x { } -/* Error */ .chroma .err { } -/* CodeLine */ .chroma .cl { } -/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } -/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; } -/* LineHighlight */ .chroma .hl { background-color: #ffffcc } -/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } -/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } -/* Line */ .chroma .line { display: flex; } -/* Keyword */ .chroma .k { color: #00a8c8 } -/* KeywordConstant */ .chroma .kc { color: #00a8c8 } -/* KeywordDeclaration */ .chroma .kd { color: #00a8c8 } -/* KeywordNamespace */ .chroma .kn { color: #f92672 } -/* KeywordPseudo */ .chroma .kp { color: #00a8c8 } -/* KeywordReserved */ .chroma .kr { color: #00a8c8 } -/* KeywordType */ .chroma .kt { color: #00a8c8 } -/* Name */ .chroma .n { color: #111111 } -/* NameAttribute */ .chroma .na { color: #75af00 } -/* NameBuiltin */ .chroma .nb { color: #111111 } -/* NameBuiltinPseudo */ .chroma .bp { color: #111111 } -/* NameClass */ .chroma .nc { color: #75af00 } -/* NameConstant */ .chroma .no { color: #00a8c8 } -/* NameDecorator */ .chroma .nd { color: #75af00 } -/* NameEntity */ .chroma .ni { color: #111111 } -/* NameException */ .chroma .ne { color: #75af00 } -/* NameFunction */ .chroma .nf { color: #75af00 } -/* NameFunctionMagic */ .chroma .fm { color: #111111 } -/* NameLabel */ .chroma .nl { color: #111111 } -/* NameNamespace */ .chroma .nn { color: #111111 } -/* NameOther */ .chroma .nx { color: #75af00 } -/* NameProperty */ .chroma .py { color: #111111 } -/* NameTag */ .chroma .nt { color: #f92672 } -/* NameVariable */ .chroma .nv { color: #111111 } -/* NameVariableClass */ .chroma .vc { color: #111111 } -/* NameVariableGlobal */ .chroma .vg { color: #111111 } -/* NameVariableInstance */ .chroma .vi { color: #111111 } -/* NameVariableMagic */ .chroma .vm { color: #111111 } -/* Literal */ .chroma .l { color: #ae81ff } -/* LiteralDate */ .chroma .ld { color: #d88200 } -/* LiteralString */ .chroma .s { color: #d88200 } -/* LiteralStringAffix */ .chroma .sa { color: #d88200 } -/* LiteralStringBacktick */ .chroma .sb { color: #d88200 } -/* LiteralStringChar */ .chroma .sc { color: #d88200 } -/* LiteralStringDelimiter */ .chroma .dl { color: #d88200 } -/* LiteralStringDoc */ .chroma .sd { color: #d88200 } -/* LiteralStringDouble */ .chroma .s2 { color: #d88200 } -/* LiteralStringEscape */ .chroma .se { color: #8045ff } -/* LiteralStringHeredoc */ .chroma .sh { color: #d88200 } -/* LiteralStringInterpol */ .chroma .si { color: #d88200 } -/* LiteralStringOther */ .chroma .sx { color: #d88200 } -/* LiteralStringRegex */ .chroma .sr { color: #d88200 } -/* LiteralStringSingle */ .chroma .s1 { color: #d88200 } -/* LiteralStringSymbol */ .chroma .ss { color: #d88200 } -/* LiteralNumber */ .chroma .m { color: #ae81ff } -/* LiteralNumberBin */ .chroma .mb { color: #ae81ff } -/* LiteralNumberFloat */ .chroma .mf { color: #ae81ff } -/* LiteralNumberHex */ .chroma .mh { color: #ae81ff } -/* LiteralNumberInteger */ .chroma .mi { color: #ae81ff } -/* LiteralNumberIntegerLong */ .chroma .il { color: #ae81ff } -/* LiteralNumberOct */ .chroma .mo { color: #ae81ff } -/* Operator */ .chroma .o { color: #f92672 } -/* OperatorWord */ .chroma .ow { color: #f92672 } -/* Punctuation */ .chroma .p { color: #111111 } -/* Comment */ .chroma .c { color: #75715e } -/* CommentHashbang */ .chroma .ch { color: #75715e } -/* CommentMultiline */ .chroma .cm { color: #75715e } -/* CommentSingle */ .chroma .c1 { color: #75715e } -/* CommentSpecial */ .chroma .cs { color: #75715e } -/* CommentPreproc */ .chroma .cp { color: #75715e } -/* CommentPreprocFile */ .chroma .cpf { color: #75715e } -/* Generic */ .chroma .g { } -/* GenericDeleted */ .chroma .gd { } -/* GenericEmph */ .chroma .ge { font-style: italic } -/* GenericError */ .chroma .gr { } -/* GenericHeading */ .chroma .gh { } -/* GenericInserted */ .chroma .gi { } -/* GenericOutput */ .chroma .go { } -/* GenericPrompt */ .chroma .gp { } -/* GenericStrong */ .chroma .gs { font-weight: bold } -/* GenericSubheading */ .chroma .gu { } -/* GenericTraceback */ .chroma .gt { } -/* GenericUnderline */ .chroma .gl { } -/* TextWhitespace */ .chroma .w { } diff --git a/assets/styles/base.scss b/assets/styles/base.scss deleted file mode 100644 index fae7a4dc..00000000 --- a/assets/styles/base.scss +++ /dev/null @@ -1,625 +0,0 @@ -// Replace this with your own font imports! -@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;700&family=Inter:wght@400;600;700&family=Source+Sans+Pro:wght@400;600&display=swap'); -:root { - --font-body: "Source Sans Pro", sans-serif; - --font-header: "Inter", sans-serif; - --font-mono: "Fira Code", monospace; -} - -// typography -html { - scroll-behavior: smooth; - &:lang(ar) { - & p, & h1, & h2, & h3, article, header { - direction: rtl; - text-align: right; - } - } - & footer > p { - text-align: center !important; - } -} - -.singlePage { - padding: 4em 30vw; - margin: 0 auto; - max-width: 1000px; - @media all and (max-width: 1200px) { - padding: 25px 5vw; - } -} - - -body { - margin: 0; - height: 100vh; - width: 100vw; - max-width: 100%; - box-sizing: border-box; - background-color: var(--light); -} - -h1, h2, h3, h4, h5, h6, thead { - font-family: var(--font-header); - color: var(--dark); - font-weight: revert; - margin: 2rem 0 0; - padding: 2rem auto 1rem; - - &:hover > .hanchor { - color: var(--secondary); - } -} - -.hanchor { - font-family: var(--font-header); - opacity: 0.8; - transition: color 0.3s ease; - color: var(--dark); -} - -p, ul, text, a, tr, td, li, ol, ul { - font-family: var(--font-body); - color: var(--gray); - fill: var(--gray); - font-weight: revert; - margin: revert; - padding: revert; -} - -tbody, li, p { - line-height: 1.5em; -} - -.mainTOC { - border-radius: 5px; - padding: 0.75em 0; - - & details { - & summary { - cursor: zoom-in; - font-family: var(--font-header); - color: var(--dark); - font-weight: 700; - } - - &[open] summary { - cursor: zoom-out; - } - } -} - -#TableOfContents > ol { - counter-reset: section; - margin-left: 0; - padding-left: 1.5em; - & > li { - counter-increment: section; - & > ol { - counter-reset: subsection; - & > li { - counter-increment: subsection; - &::marker { - content: counter(section) "." counter(subsection) " "; - } - } - } - } - - & > li::marker { - content: counter(section) " "; - } - - & > li::marker, & > li > ol > li::marker { - font-family: var(--font-body); - font-weight: 700; - } -} - -table { - border: 1px solid var(--outlinegray); - width: 100%; - padding: 1.5em; - border-collapse: collapse; -} - -td, th { - padding: 0.2em 1em; - border: 1px solid var(--outlinegray); -} - -img { - max-width: 100%; - border-radius: 3px; - margin: 1em 0; -} - -p > img + em { - display: block; - transform: translateY(-1em); -} - -sup { - line-height: 0 -} - -blockquote { - margin-left: 0; - border-left: 3px solid var(--secondary); - padding-left: 1em; - transition: border-color 0.2s ease; -} - -.footnotes p { - margin: 0.5em 0; -} - -.pagination { - list-style: none; - padding-left: 0; - display: flex; - margin-top: 2em; - gap: 1.5em; - justify-content: center; - - .disabled { - opacity: 0.2; - } - - & > li { - text-align: center; - display: inline-block; - - & a { - background-color: transparent !important; - } - - & a[href$="#"], &.active a { - opacity: 0.2; - } - } -} - -article { - & > h1 { - margin-top: 2em; - font-size: 2em; - } - - & > .meta { - margin: 0 0 1em 0; - opacity: 0.7; - } - - & a { - font-weight: 600; - - &.internal-link { - text-decoration: none; - background-color: transparentize(#8f9fa9, 0.85); - padding: 0 0.1em; - margin: auto -0.1em; - border-radius: 3px; - - &.broken { - opacity: 0.5; - background-color: transparent; - } - } - } - - & p { - overflow-wrap: anywhere; - } -} - -.tags { - list-style: none; - padding-left: 0; - - & .meta { - margin: 1.5em 0; - & > h1 { - margin: 0; - } - & > p { - margin: 0; - } - } - - & > li { - display: inline-block; - margin: 0.4em 0.2em; - } - - & > li > a { - border-radius: 8px; - border: var(--outlinegray) 1px solid; - padding: 0.2em 0.5em; - &::before { - content: "#"; - margin-right: 0.3em; - color: var(--outlinegray); - } - } -} - -.backlinks a { - font-weight: 600; - font-size: 0.9rem; -} - -sup > a { - text-decoration: none; - padding: 0 0.1em 0 0.2em; -} - -#page-title { - margin: 0; - & > a { - font-family: var(--font-header); - } -} - -a { - font-size: 1em; - font-weight: 700; - text-decoration: none; - transition: all 0.2s ease; - color: var(--secondary); - &:hover { - color: var(--tertiary) !important; - } -} - -pre { - font-family: var(--font-mono); - padding: 0.75em; - border-radius: 3px; - overflow-x: scroll; -} - -code { - font-family: var(--font-mono); - font-size: 0.85em; - padding: 0.15em 0.3em; - border-radius: 5px; - background: var(--lightgray); -} - -@keyframes fadeIn { - 0% {opacity:0;} - 100% {opacity:1;} -} - -footer { - margin-top: 4em; - text-align: center; - & ul { - padding-left: 0; - } -} - -hr { - width: 100%; - margin: 2em auto; - height: 1px; - border: none; - background-color: var(--outlinegray); -} - -.page-end { - display: flex; - flex-direction: row; - gap: 2em; - - @media all and (max-width: 780px) { - flex-direction: column; - } - - & > * { - flex: 1 0 0; - } - - & > .backlinks-container { - & > ul { - list-style: none; - padding: 0; - margin: 0; - - & > li { - margin: 0.5em 0; - padding: 0.25em 1em; - border: var(--outlinegray) 1px solid; - border-radius: 5px - } - } - } - - & #graph-container { - border: var(--outlinegray) 1px solid; - border-radius: 5px; - box-sizing: border-box; - min-height: 250px; - margin: 0.5em 0; - - & > svg { - margin-bottom: -5px; - - } - } -} - -.centered { - margin-top: 30vh; -} - -.spacer { - flex: 1 1 auto; -} - -header { - display: flex; - flex-direction: row; - align-items: center; - margin: 1em 0 2em; - - & > h1 { - font-size: 2em; - } - - & > nav { - @media all and (max-width: 600px) { - display: none; - } - } - - #search-icon { - background-color: var(--lightgray); - border-radius: 4px; - height: 2em; - display: flex; - align-items: center; - cursor: pointer; - & > p { - display: inline; - padding: 0 1.5em 0 2em; - } - } - - & svg { - cursor: pointer; - width: 18px; - min-width: 18px; - margin: 0 0.5em; - - &:hover .search-path { - stroke: var(--tertiary); - } - - .search-path { - stroke: var(--gray); - stroke-width: 2px; - transition: stroke 0.5s ease; - } - } -} - -#search-container { - position: fixed; - z-index: 9999; - left: 0; - top: 0; - width: 100vw; - height: 100%; - overflow: scroll; - display: none; - backdrop-filter: blur(4px); - -webkit-backdrop-filter: blur(4px); - - & > div { - width: 50%; - margin-top: 15vh; - margin-left: auto; - margin-right: auto; - - @media all and (max-width: 1200px) { - width: 90%; - } - - & > * { - width: 100%; - border-radius: 4px; - background: var(--light); - box-shadow: 0 14px 50px rgba(27, 33, 48, 0.12), 0 10px 30px rgba(27, 33, 48, 0.16); - margin-bottom: 2em; - } - - & > input { - box-sizing: border-box; - padding: 0.5em 1em; - font-family: var(--font-body); - color: var(--dark); - font-size: 1.1em; - border: 1px solid var(--outlinegray); - - &:focus { - outline: none; - } - } - - & > #results-container { - & .result-card { - padding: 1em; - cursor: pointer; - transition: background 0.2s ease; - border: 1px solid var(--outlinegray); - border-bottom: none; - width: 100%; - - // normalize button props - font-family: inherit; - font-size: 100%; - line-height: 1.15; - margin: 0; - overflow: visible; - text-transform: none; - text-align: left; - background: var(--light); - outline: none; - - &:hover, &:focus { - background: rgba(180, 180, 180, 0.15); - } - - &:first-of-type { - border-top-left-radius: 5px; - border-top-right-radius: 5px; - } - - &:last-of-type { - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; - border-bottom: 1px solid var(--outlinegray); - } - - & > h3, & > p { - margin: 0; - } - } - } - } -} - -.search-highlight { - background-color: #afbfc966; - padding: 0.05em 0.2em; - border-radius: 3px; -} - -.section-ul { - list-style: none; - margin-top: 2em; - padding-left: 0; - -} - -.section-li { - margin-bottom: 1em; - - & > .section { - display: flex; - align-items: center; - - @media all and (max-width: 600px) { - & .tags { - display: none; - } - } - - & h3 > a { - font-weight: 700; - margin: 0; - } - - & p { - margin: 0; - padding-right: 1em; - flex-basis: 6em; - } - } - - & h3 { - opacity: 1; - font-weight: 700; - margin: 0; - } - - & .meta { - opacity: 0.6; - } -} - -@keyframes dropin { - 0% { - display: none; - opacity: 0; - visibility: hidden; - } - 1% { - display: inline-block; - opacity: 0; - } - 100% { - opacity: 1; - visibility: visible; - } -} - -.popover { - z-index: 999; - position: absolute; - width: 20rem; - display: none; - background-color: var(--light); - padding: 1rem; - margin: 1rem; - border: 1px solid var(--outlinegray); - border-radius: 5px; - pointer-events: none; - transition: opacity 0.2s ease, transform 0.2s ease; - user-select: none; - overflow-wrap: anywhere; - box-shadow: 6px 6px 36px 0 rgba(0,0,0,0.25); - - @media all and (max-width: 600px) { - display: none !important; - } - - &.visible { - opacity: 1; - visibility: visible; - display: inline-block; - animation: dropin 0.2s ease; - } - - & > h3 { - font-size: 1rem; - margin: 0.25rem 0; - } - - & .meta { - margin-top: 0.25rem; - opacity: 0.5; - font-family: var(--font-mono); - font-size: 0.8rem; - } - - & > p { - margin: 0; - padding: 0.5rem 0; - } - - & > p, & > a { - font-size: 1rem; - font-weight: 400; - user-select: none; - } -} - -#contact_buttons ul { - list-style-type: none; - - li { - display: inline-block; - } - - li a { - padding: 0 1em; - } -} - -mark { - background-color: var(--highlighted); - color: var(--gray); -} diff --git a/assets/styles/code-title.scss b/assets/styles/code-title.scss deleted file mode 100644 index b384743b..00000000 --- a/assets/styles/code-title.scss +++ /dev/null @@ -1,20 +0,0 @@ -.code-title { - color: var(--primary) ; - font-family: var(--font-mono); - width: max-content; - overflow-x: auto; - display: inline-block; - vertical-align: middle; - font-weight: normal; - line-height: 1em; - position: relative; - padding: 0.5em 0.6em 0.6em; // + 1.2 em - max-width: calc(100% - 1.2em); // (-1.2 em) fits article width exactly - margin-bottom: -0.2em; - z-index: -1; - border-top-left-radius: 0.3em; - border-top-right-radius: 0.3em; - font-size: 0.9em; - background-color: var(--lightgray); - filter: hue-rotate(-30deg) contrast(1.0) opacity(0.8); -} \ No newline at end of file diff --git a/assets/styles/custom.scss b/assets/styles/custom.scss deleted file mode 100644 index 4fe5549a..00000000 --- a/assets/styles/custom.scss +++ /dev/null @@ -1,31 +0,0 @@ -// Add your own CSS here! - -:root { - --light: #d7eff7; - --dark: #284b63; - --secondary: #207e8f; - --tertiary: #84a59d; - --visited: #afbfc9; - --primary: #FA8F2D; - --gray: #4e4e4e; - --lightgray: #f0f0f0; - --outlinegray: #dadada; - --million-progress-bar-color: var(--secondary); - --highlighted: #f5dfaf88; -} - -[saved-theme="dark"] { - --light: #1e1e21 !important; - --dark: #fbfffe !important; - --secondary: #6b879a !important; - --visited: #4a575e !important; - --tertiary: #84a59d !important; - --primary: #f58382 !important; - --gray: #d4d4d4 !important; - --lightgray: #292633 !important; - --outlinegray: #343434 !important; - --highlighted: #574010; -} - - - diff --git a/assets/styles/syntax.scss b/assets/styles/syntax.scss deleted file mode 100644 index 6267f5cf..00000000 --- a/assets/styles/syntax.scss +++ /dev/null @@ -1,66 +0,0 @@ -// Overrides -/* Background */ -.chroma { - overflow: hidden !important; - background-color: var(--lightgray) !important; -} - -/* LineTable */ -.chroma .lntable { - width: auto !important; - overflow: auto !important; - display: block !important; -} - -/* LineHighlight */ -.chroma .hl { - display: block !important; - width: 100% !important; -} - -/* LineNumbersTable */ -.chroma .lnt { - margin-right: 0.0em !important; - padding: 0 0.0em 0 0.0em !important; -} - -/* LineNumbers */ -.chroma .ln { - margin-right: 0.0em !important; - padding: 0 0.0em 0 0.0em !important; -} - -/* GenericDeleted */ -.chroma .gd { - color: #8b080b !important; -} - -/* GenericInserted */ -.chroma .gi { - font-weight: bold !important; -} - -.lntd:first-of-type > .chroma { - padding-right: 0 !important; -} - -.chroma code { - font-family: var(--font-mono) !important; - font-size: 0.85em !important; - line-height: 2em !important; - background: none !important; - padding: 0 !important; -} - -.chroma { - border-radius: 3px !important; - margin: 0 !important; -} - -pre.chroma { - -moz-tab-size:4;-o-tab-size:4;tab-size:4; -} - -.katex { - font-size: 1.1em !important; -} diff --git a/config.toml b/config.toml deleted file mode 100644 index 33861c73..00000000 --- a/config.toml +++ /dev/null @@ -1,31 +0,0 @@ -title = "Matsuura Tomoya Research Note" -baseURL = "https://garden.matsuuratomoya.com" -languageCode = "ja" -relativeURLs = false -disablePathToLower = true -ignoreFiles = [ - "/content/templates/*", - "/content/private/*", -] -summaryLength = 20 -paginate = 10 -enableGitInfo = true - -[markup] - [markup.tableOfContents] - endLevel = 3 - ordered = true - startLevel = 2 - [markup.highlight] - noClasses = false - anchorLineNos = false - codeFences = true - guessSyntax = true - hl_Lines = "" - lineAnchors = "" - lineNoStart = 1 - lineNos = true - lineNumbersInTable = true - style = "dracula" - [markup.goldmark.renderer] - unsafe = true diff --git a/content/_index.md b/content/index.md similarity index 100% rename from content/_index.md rename to content/index.md diff --git a/content/private/private-note.md b/content/private/private-note.md deleted file mode 100644 index 6930c102..00000000 --- a/content/private/private-note.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Private Stuff" ---- - -This page doesn't get published! \ No newline at end of file diff --git a/content/templates/post.md b/content/templates/post.md deleted file mode 100644 index 5ee6ec83..00000000 --- a/content/templates/post.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: "{{title}}" -tags: ---- diff --git a/data/config.yaml b/data/config.yaml deleted file mode 100644 index 0df2f7bc..00000000 --- a/data/config.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: Tomoya Matsuura -enableToc: true -openToc: false -enableLinkPreview: true -enableLatex: true -enableCodeBlockTitle: true -enableCodeBlockCopy: true -enableCallouts: true -enableSPA: true -enableFooter: true -enableContextualBacklinks: true -enableRecentNotes: false -enableGitHubEdit: true -enableMermaid: true -GitHubLink: https://github.com/tomoyanonymous/quartz-research-note/tree/hugo/content -search: - enableSemanticSearch: false - operandApiKey: "REPLACE-WITH-YOUR-OPERAND-API-KEY" - operandIndexId: "REPLACE-WITH-YOUR-OPERAND-INDEX-ID" -description: - 松浦知也の研究ノートです. -page_title: - "Matsuura Tomoya Research Note" -links: - - link_name: Top - link: https://matsuuratomoya.com - - link_name: Mastodon - link: https://social.matsuuratomoya.com/@tomoya - - link_name: Twitter - link: https://twitter.com/tomoya_nonymous - - link_name: GitHub - link: https://github.com/tomoyanonymous diff --git a/data/graphConfig.yaml b/data/graphConfig.yaml deleted file mode 100644 index 356d1f3f..00000000 --- a/data/graphConfig.yaml +++ /dev/null @@ -1,37 +0,0 @@ -# if true, a Global Graph will be shown on home page with full width, no backlink. -# A different set of Local Graphs will be shown on sub pages. -# if false, Local Graph will be default on every page as usual -enableGlobalGraph: true - -### Local Graph ### - -localGraph: - enableLegend: false - enableDrag: true - enableZoom: true - depth: 2 # set to -1 to show full graph - scale: 1.2 - repelForce: 2 - centerForce: 1 - linkDistance: 1 - fontSize: 0.6 - opacityScale: 3 - -### Global Graph ### - -globalGraph: - enableLegend: false - enableDrag: true - enableZoom: true - depth: -1 # set to -1 to show full graph - scale: 1.4 - repelForce: 1 - centerForce: 1 - linkDistance: 1 - fontSize: 0.5 - opacityScale: 3 - -### For all graphs ### - -paths: - - /moc: "#4388cc" diff --git a/globals.d.ts b/globals.d.ts new file mode 100644 index 00000000..4473d59e --- /dev/null +++ b/globals.d.ts @@ -0,0 +1,12 @@ +export declare global { + interface Document { + addEventListener( + type: K, + listener: (this: Document, ev: CustomEventMap[K]) => void, + ): void + dispatchEvent(ev: CustomEventMap[K]): void + } + interface Window { + spaNavigate(url: URL, isBack: boolean = false) + } +} diff --git a/i18n/ar.toml b/i18n/ar.toml deleted file mode 100644 index 631c0715..00000000 --- a/i18n/ar.toml +++ /dev/null @@ -1,65 +0,0 @@ -[404_message] -other = "يبدو أنك ضللت الطريق. هذه الصفحة غير موجودة (أو قد تكون خاصة)." - -[404_back] -other = "↳ العودة للرئيسية." - -[all_posts] -other = "كل منشورات {{.Title}}" - -[last_updated] -other = "آخر تعديل" - -[notes_count] -other = "ملاحظات بهذه التسمية" - -[first_10] -other = "(تعرض أول 10 نتائج فقط)" - -[tag] -other = "التسمية" - -[backlinks] -other = "الروابط الخلفية" - -[no_backlinks] -other = "لا توجد روابط خلفية" - -[home] -other = "الرئيسية" - -[light_mode] -other = "السمة الفاتحة" - -[dark_mode] -other = "السمة الداكنة" - -[edit_source] -other = "تعديل المصدر" - -[interactive_graph] -other = "المخطط التفاعلي" - -[search] -other = "البحث" - -[search_icon] -other = "أيقونة البحث" - -[icon_search] -other = "أيقونة فتح نافذة البحث" - -[recent_notes] -other = "الملاحظات اﻷخيرة" - -[first_3_notes] -other = "أول 3 {{ .notes }}" - -[search_for_something] -other = "ابحث عن شيء ما..." - -[toc] -other = "الفهرس" - -[copyright] -other = "صُمم بواسطة {{ .name }} باستخدام كوارتز، {{ .year }} ©" diff --git a/i18n/bn.toml b/i18n/bn.toml deleted file mode 100644 index 2d3acfb2..00000000 --- a/i18n/bn.toml +++ /dev/null @@ -1,65 +0,0 @@ -[404_message] -other = "এই পাতাটি নেই (অথবা ব্যক্তিগত)" - -[404_back] -other = "↳ হোম পেজে ফিরে যাই" - -[all_posts] -other = "সকল {{.Title}}" - -[last_updated] -other = "সর্বশেষ পরিবর্তিত" - -[notes_count] -other = "সংখ্যক এই ট্যাগের" - -[first_10] -other = "প্রথম ১০ টি ফলাফল" - -[tag] -other = "ট্যাগ" - -[backlinks] -other = "পিছন পাতা" - -[no_backlinks] -other = "পিছনে কোন পাতা নেই" - -[home] -other = "হোম" - -[light_mode] -other = "আলোকিত" - -[dark_mode] -other = "অন্ধকার" - -[edit_source] -other = "সম্পাদন করুন" - -[interactive_graph] -other = "জ্ঞানকোষের গ্রাফ" - -[search] -other = "খুঁজুন" - -[search_icon] -other = "খোঁজার আইকন" - -[icon_search] -other = "জ্ঞানকোষ" - -[recent_notes] -other = "সাম্প্রতিক" - -[first_3_notes] -other = "প্রথম ৩ {{ .notes }}" - -[search_for_something] -other = "খুঁজুন..." - -[toc] -other = "সূচিপত্র" - -[copyright] -other = "{{ .name }} কর্তৃক Quartz ব্যবহার করে তৈরিকৃত © {{ .year }}" \ No newline at end of file diff --git a/i18n/de.toml b/i18n/de.toml deleted file mode 100644 index 266bfd71..00000000 --- a/i18n/de.toml +++ /dev/null @@ -1,65 +0,0 @@ -[404_message] -other = "Hey! Hast du dich verirrt? Diese Seite existiert leider nicht (oder ist privat)." - -[404_back] -other = "↳ Zurück zur Startseite." - -[all_posts] -other = "Alle {{.Title}}" - -[last_updated] -other = "Zuletzt aktualisiert" - -[notes_count] -other = "Beiträge mit diesem Tag" - -[first_10] -other = "Zeige die ersten 10 Ergebnisse" - -[tag] -other = "Tag" - -[backlinks] -other = "Backlinks" - -[no_backlinks] -other = "Keine Backlinks gefunden" - -[home] -other = "Home" - -[light_mode] -other = "Light Mode" - -[dark_mode] -other = "Dark Mode" - -[edit_source] -other = "Quelldatei bearbeiten" - -[interactive_graph] -other = "Interaktiver Graph" - -[search] -other = "Suche" - -[search_icon] -other = "Suchsymbol" - -[icon_search] -other = "Symbol, um die Suche zu öffnen" - -[recent_notes] -other = "Neuste Beiträge" - -[first_3_notes] -other = "Die ersten 3 {{ .notes }}" - -[search_for_something] -other = "Suche nach etwas ..." - -[toc] -other = "Inhaltsverzeichnis" - -[copyright] -other = "Made by {{ .name }} using Quartz, © {{ .year }}" diff --git a/i18n/en.toml b/i18n/en.toml deleted file mode 100644 index b9ce33e6..00000000 --- a/i18n/en.toml +++ /dev/null @@ -1,65 +0,0 @@ -[404_message] -other = "Hey! You look a little lost. This page doesn't exist (or may be private)." - -[404_back] -other = "↳ Let's get you home." - -[all_posts] -other = "All {{.Title}}" - -[last_updated] -other = "Last updated" - -[notes_count] -other = "notes with this tag" - -[first_10] -other = "showing first 10 results" - -[tag] -other = "Tag" - -[backlinks] -other = "Backlinks" - -[no_backlinks] -other = "No backlinks found" - -[home] -other = "Home" - -[light_mode] -other = "Light Mode" - -[dark_mode] -other = "Dark Mode" - -[edit_source] -other = "Edit Source" - -[interactive_graph] -other = "Interactive Graph" - -[search] -other = "Search" - -[search_icon] -other = "Search Icon" - -[icon_search] -other = "Icon to open search" - -[recent_notes] -other = "Recent Notes" - -[first_3_notes] -other = "first 3 {{ .notes }}" - -[search_for_something] -other = "Search for something..." - -[toc] -other = "Table of Contents" - -[copyright] -other = "Made by {{ .name }} using Quartz, © {{ .year }}" diff --git a/i18n/es.toml b/i18n/es.toml deleted file mode 100644 index 2effa237..00000000 --- a/i18n/es.toml +++ /dev/null @@ -1,65 +0,0 @@ -[404_message] -other = "Hey! Te ves un poco perdido. Esta página no existe (o puede que sea privada)." - -[404_back] -other = "↳ Vamos a llevarte de regreso a casa." - -[all_posts] -other = "Todos {{.Title}}" - -[last_updated] -other = "Actualizado por última vez" - -[notes_count] -other = "notas con esta etiqueta" - -[first_10] -other = "mostrando los primeros 10 resultados" - -[tag] -other = "Etiqueta" - -[backlinks] -other = "Backlinks" - -[no_backlinks] -other = "No se encontraron backlinks" - -[home] -other = "Casa" - -[light_mode] -other = "Modo Claro" - -[dark_mode] -other = "Modo Oscuro" - -[edit_source] -other = "Editar Fuente" - -[interactive_graph] -other = "Gráfico Interactivo" - -[search] -other = "Búsqueda" - -[search_icon] -other = "Ícono de Búsqueda" - -[icon_search] -other = "Ícono para abrir la búsqueda" - -[recent_notes] -other = "Notas Recientes" - -[first_3_notes] -other = "primeras 3 {{ .notes }}" - -[search_for_something] -other = "Buscar algo..." - -[toc] -other = "Tabla de Contenido" - -[copyright] -other = "Hecho por {{ .name }} usando Quartz, © {{ .year }}" diff --git a/i18n/fr.toml b/i18n/fr.toml deleted file mode 100644 index f406881d..00000000 --- a/i18n/fr.toml +++ /dev/null @@ -1,65 +0,0 @@ -[404_message] -other = "Hey ! Vous semblez perdu‧e. Cette page n'existe pas (ou est privée)." - -[404_back] -other = "↳ Clique ici pour retourner sur la page d'accueil" - -[all_posts] -other = "Tout {{.Title}}" - -[last_updated] -other = "Dernière modification" - -[notes_count] -other = "notes avec ce tag" - -[first_10] -other = "les 10 premiers résultats" - -[tag] -other = "Tag" - -[backlinks] -other = "Backlinks" - -[no_backlinks] -other = "Pas de backlinks trouvés" - -[home] -other = "Accueil" - -[light_mode] -other = "Mode Clair" - -[dark_mode] -other = "Mode Sombre" - -[edit_source] -other = "Modifier la source" - -[interactive_graph] -other = "Graphique interactif" - -[search] -other = "Rechercher" - -[search_icon] -other = "l'icône de recherche" - -[icon_search] -other = "L'icône pour ouvrir la recherche" - -[recent_notes] -other = "Notes récentes" - -[first_3_notes] -other = "les 3 premières {{ .notes }}" - -[search_for_something] -other = "Rechercher quelque-chose..." - -[toc] -other = "Table des matières" - -[copyright] -other = "Fait par {{ .name }} en utilisant Quartz, © {{ .year }}" diff --git a/i18n/it.toml b/i18n/it.toml deleted file mode 100644 index f5817b45..00000000 --- a/i18n/it.toml +++ /dev/null @@ -1,65 +0,0 @@ -[404_message] -other = "Hey, ti sei perso? Questa pagina non esiste (o è privata)" - -[404_back] -other = "↳ Torna alla home." - -[all_posts] -other = "Tutti {{.Title}}" - -[last_updated] -other = "Ultima modifica" - -[notes_count] -other = "note con questo tag" - -[first_10] -other = "mostrando i primi 10 risultati" - -[tag] -other = "Tag" - -[backlinks] -other = "Backlinks" - -[no_backlinks] -other = "Nessun Backlink trovato" - -[home] -other = "Home" - -[light_mode] -other = "Modalità Chiara" - -[dark_mode] -other = "Modalità Scura" - -[edit_source] -other = "Modifica Sorgente" - -[interactive_graph] -other = "Grafico Interattivo" - -[search] -other = "Cerca" - -[search_icon] -other = "Icona di ricerca" - -[icon_search] -other = "Icona per aprire la ricerca" - -[recent_notes] -other = "Note Recenti" - -[first_3_notes] -other = "prime 3 {{ .notes }}" - -[search_for_something] -other = "Cerca qualcosa..." - -[toc] -other = "Indice" - -[copyright] -other = "Realizzato da {{ .name }} con Quartz, © {{ .year }}" diff --git a/i18n/no.toml b/i18n/no.toml deleted file mode 100644 index 79e700ff..00000000 --- a/i18n/no.toml +++ /dev/null @@ -1,65 +0,0 @@ -[404_message] -other = "Hei! Ser ut til at du har gått deg vill. Denne siden finnes ikke (eller den kan være privat)." - -[404_back] -other = "↳ La oss få deg hjem." - -[all_posts] -other = "Alle {{.Title}}" - -[last_updated] -other = "Sist oppdatert" - -[notes_count] -other = "notater med denne taggen" - -[first_10] -other = "viser første 10 resultatene" - -[tag] -other = "Tag" - -[backlinks] -other = "Tilbakekoblinger" - -[no_backlinks] -other = "Ingen tilbakekoblinger funnet" - -[home] -other = "Hjem" - -[light_mode] -other = "Lys Modus" - -[dark_mode] -other = "Mørk Modus" - -[edit_source] -other = "Rediger Kilde" - -[interactive_graph] -other = "Interaktiv Graf" - -[search] -other = "Søk" - -[search_icon] -other = "Søkeikon" - -[icon_search] -other = "Ikon for å åpne søk" - -[recent_notes] -other = "Nylige notater" - -[first_3_notes] -other = "første 3 {{ .notes }}" - -[search_for_something] -other = "Søk etter noe..." - -[toc] -other = "Innholdsfortegnelse" - -[copyright] -other = "Opprettet av {{ .name }} ved hjelp av Quartz, © {{ .year }}" diff --git a/i18n/tr.toml b/i18n/tr.toml deleted file mode 100644 index 0515128b..00000000 --- a/i18n/tr.toml +++ /dev/null @@ -1,65 +0,0 @@ -[404_message] -other = "Hey! Biraz kaybolmuş görünüyorsun. Bu sayfa mevcut değil (veya özel olabilir)." - -[404_back] -other = "↳ Seni eve götürelim." - -[all_posts] -other = "Hepsi {{.Title}}" - -[last_updated] -other = "Son güncelleme" - -[notes_count] -other = "Bu etikete sahip notlar" - -[first_10] -other = "İlk 10 sonuç gösteriliyor" - -[tag] -other = "Etiket" - -[backlinks] -other = "Geri bağlantılar" - -[no_backlinks] -other = "Geri bağlantı bulunamadı" - -[home] -other = "Ev" - -[light_mode] -other = "Aydınlık Modu" - -[dark_mode] -other = "Karanlık Modu" - -[edit_source] -other = "Kaynağı Düzenle" - -[interactive_graph] -other = "Etkileşimli Grafik" - -[search] -other = "Ara" - -[search_icon] -other = "Arama Simgesi" - -[icon_search] -other = "Aramayı açmak için simge tıklayın" - -[recent_notes] -other = "Son Notlar" - -[first_3_notes] -other = "İlk Üç {{ .notes }}" - -[search_for_something] -other = "Bir şey ara..." - -[toc] -other = "İçindekiler" - -[copyright] -other = "{{ .name }} tarafından Quartz kullanılarak yapılmıştır, © {{ .year }}" diff --git a/i18n/uk.toml b/i18n/uk.toml deleted file mode 100644 index f84f5ce0..00000000 --- a/i18n/uk.toml +++ /dev/null @@ -1,65 +0,0 @@ -[404_message] -other = "Хей! Виглядаєте здивовано. Цієї сторінки не існує (або вона приватна)." - -[404_back] -other = "↳ Повернемося додому." - -[all_posts] -other = "Всі {{.Title}}" - -[last_updated] -other = "Оновлено" - -[notes_count] -other = "нонаток з цим тегом" - -[first_10] -other = "показано 10 перших результатів" - -[tag] -other = "Тег" - -[backlinks] -other = "Зворотнє посилання" - -[no_backlinks] -other = "Зворотних посилань не знайдено" - -[home] -other = "Дім" - -[light_mode] -other = "Світлий Режим" - -[dark_mode] -other = "Темний Режим" - -[edit_source] -other = "Редагувати Джерело" - -[interactive_graph] -other = "Інтерактивний граф" - -[search] -other = "Пошук" - -[search_icon] -other = "Іконка Пошуку" - -[icon_search] -other = "Іконка для відкриття пошуку" - -[recent_notes] -other = "Нещодавні Нотатки" - -[first_3_notes] -other = "перші 3 {{ .notes }}" - -[search_for_something] -other = "Знайти щось..." - -[toc] -other = "Зміст" - -[copyright] -other = "Створено {{ .name }} з використанням Quartz, © {{ .year }}" diff --git a/i18n/zh-cn.toml b/i18n/zh-cn.toml deleted file mode 100644 index ca8c1b1e..00000000 --- a/i18n/zh-cn.toml +++ /dev/null @@ -1,65 +0,0 @@ -[404_message] -other = "喔哦...... 你是不是迷路了呀..... (⌯' '⌯ ) 这个页面并不存在(也许它还未被发布)。" - -[404_back] -other = "↳ 回到主页" - -[all_posts] -other = "所有 {{.Title}}" - -[last_updated] -other = "最后更新于" - -[notes_count] -other = "带有此标签的笔记" - -[first_10] -other = "正在展示前10个结果" - -[tag] -other = "标签" - -[backlinks] -other = "反向链接" - -[no_backlinks] -other = "没有找到反向链接" - -[home] -other = "主页" - -[light_mode] -other = "明亮模式" - -[dark_mode] -other = "黑暗模式" - -[edit_source] -other = "编辑源码" - -[interactive_graph] -other = "互动图" - -[search] -other = "搜索" - -[search_icon] -other = "搜索图标" - -[icon_search] -other = "打开搜索图标" - -[recent_notes] -other = "近期笔记" - -[first_3_notes] -other = "前3个 {{ .notes }}" - -[search_for_something] -other = "进行搜索......" - -[toc] -other = "目录" - -[copyright] -other = "由 {{ .name }} 用 Quartz 创造, © {{ .year }}" diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 00000000..aec536d2 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,11 @@ +declare module "*.scss" { + const content: string + export = content +} + +// dom custom event +interface CustomEventMap { + nav: CustomEvent<{ url: FullSlug }> +} + +declare const fetchData: Promise diff --git a/layouts/404.html b/layouts/404.html deleted file mode 100644 index 5607e634..00000000 --- a/layouts/404.html +++ /dev/null @@ -1,15 +0,0 @@ - - -{{ partial "head.html" . }} - - -
- {{partial "darkmode.html" .}} -
-

404.

-

{{ i18n "404_message" }}

- {{ i18n "404_back" }} -
-
- - diff --git a/layouts/_default/_markup/render-codeblock-mermaid.html b/layouts/_default/_markup/render-codeblock-mermaid.html deleted file mode 100644 index 59641551..00000000 --- a/layouts/_default/_markup/render-codeblock-mermaid.html +++ /dev/null @@ -1,4 +0,0 @@ -
- {{- .Inner | safeHTML }} -
-{{ .Page.Store.Set "hasMermaid" true }} diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html deleted file mode 100644 index dbcf732f..00000000 --- a/layouts/_default/_markup/render-image.html +++ /dev/null @@ -1,9 +0,0 @@ -{{$src := .Destination | safeURL }} -{{$width := index (split .Text "|") 1 | default "auto" }} -{{$external := strings.HasPrefix $src "http" }} -{{- if $external -}} -{{ .Text }} -{{- else -}} -{{$fixedUrl := (cond (hasPrefix $src "/") $src (print "/" $src)) | urlize}} -{{ .Text }} -{{- end -}} diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html deleted file mode 100644 index be36d2e9..00000000 --- a/layouts/_default/_markup/render-link.html +++ /dev/null @@ -1,16 +0,0 @@ -{{$dashedurl := replace .Destination "%20" "-" }} -{{$external := strings.HasPrefix $dashedurl "http" }} -{{- if $external -}} -{{ .Text | safeHTML }} -{{- else -}} -{{$trimmed := strings.TrimSuffix ".md" (.Destination | safeURL)}} -{{$spacedurl := replace $trimmed "%20" " " }} -{{$fixedUrl := (cond (hasPrefix $spacedurl "/") $spacedurl (print "/" $spacedurl)) | urlize}} -{{$nonexistent := eq (.Page.GetPage $spacedurl).RelPermalink ""}} -{{$rooted := default $spacedurl ((.Page.GetPage $spacedurl).RelPermalink) }} -{{- .Text | safeHTML -}} - -{{- end -}} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html deleted file mode 100644 index 8754b1f2..00000000 --- a/layouts/_default/baseof.html +++ /dev/null @@ -1,10 +0,0 @@ - - -{{ block "head" . }} -{{ end }} - - -{{ block "main" . }} -{{ end }} - - \ No newline at end of file diff --git a/layouts/_default/section.html b/layouts/_default/section.html deleted file mode 100644 index f88b85fc..00000000 --- a/layouts/_default/section.html +++ /dev/null @@ -1,21 +0,0 @@ - - -{{ partial "head.html" . }} - - -{{partial "search.html" .}} -
- - {{partial "header.html" .}} -
-

{{ i18n "all_posts" . }}

- {{with .Params.description}} -

{{.}}

- {{end}} - {{partial "page-list.html" .Paginator.Pages.ByLastmod.Reverse }} - {{ template "_internal/pagination.html" .}} -
- {{partial "contact.html" .}} -
- - diff --git a/layouts/_default/single.html b/layouts/_default/single.html deleted file mode 100644 index 36beb83a..00000000 --- a/layouts/_default/single.html +++ /dev/null @@ -1,34 +0,0 @@ - - -{{ partial "head.html" . }} - - -{{partial "search.html" .}} -
- - {{partial "header.html" .}} - - {{partial "footer.html" .}} -
- - diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html deleted file mode 100644 index 01ec325a..00000000 --- a/layouts/_default/taxonomy.html +++ /dev/null @@ -1,30 +0,0 @@ - - -{{ partial "head.html" . }} - - -{{partial "search.html" .}} -
- - {{partial "header.html" .}} -
-

{{ i18n "all_posts" . }}

- {{with .Params.description}} -

{{.}}

- {{end}} -
- {{ range .Site.Taxonomies.tags.ByCount }} -
-

{{ .Page.Title | humanize }}

-

{{ .Count }} {{ i18n "notes_count" }} {{if gt .Count 10}}({{ i18n "first_10"}}){{end}}

-
- {{ with ($.Site.GetPage (printf "/tags/%s" .Page.Title)) }} - {{partial "page-list.html" (first 10 .Pages.ByLastmod.Reverse)}} - {{ end }} - {{ end }} -
-
- {{partial "contact.html" .}} -
- - diff --git a/layouts/_default/term.html b/layouts/_default/term.html deleted file mode 100644 index 6bda201b..00000000 --- a/layouts/_default/term.html +++ /dev/null @@ -1,21 +0,0 @@ - - -{{ partial "head.html" . }} - - -{{partial "search.html" .}} -
- - {{partial "header.html" .}} -
-

{{ i18n "tag" }}: {{ .Title }}

- {{with .Params.description}} -

{{.}}

- {{end}} - {{partial "page-list.html" .Paginator.Pages}} - {{ template "_internal/pagination.html" . }} -
- {{partial "contact.html" .}} -
- - diff --git a/layouts/index.html b/layouts/index.html deleted file mode 100644 index c7871e9f..00000000 --- a/layouts/index.html +++ /dev/null @@ -1,20 +0,0 @@ - - -{{ partial "head.html" . }} - - -{{partial "search.html" .}} -
- - {{partial "header.html" .}} -
- {{partial "toc.html" .}} - {{partial "textprocessing.html" . }} - {{if $.Site.Data.config.enableRecentNotes}} - {{partial "recent.html" . }} - {{end}} -
- {{partial "footerIndex.html" .}} -
- - diff --git a/layouts/partials/backlinks.html b/layouts/partials/backlinks.html deleted file mode 100644 index ae6ea1a8..00000000 --- a/layouts/partials/backlinks.html +++ /dev/null @@ -1,30 +0,0 @@ -

{{ i18n "backlinks" }}

- diff --git a/layouts/partials/contact.html b/layouts/partials/contact.html deleted file mode 100644 index 3de7d2c6..00000000 --- a/layouts/partials/contact.html +++ /dev/null @@ -1,19 +0,0 @@ - -{{ $config := cond (eq $.Site.Language.Lang "en") "config" (printf "config.%s" $.Site.Language.Lang) }} -{{ $data := index $.Site.Data $config }} - -
-
- {{ $name := $data.name | default $.Site.Data.config.name }} - {{ $year := dateFormat "2006" now }} -

{{ i18n "copyright" (dict "name" $name "year" $year) | safeHTML}}

- -
-
diff --git a/layouts/partials/darkmode.html b/layouts/partials/darkmode.html deleted file mode 100644 index a708f13a..00000000 --- a/layouts/partials/darkmode.html +++ /dev/null @@ -1,15 +0,0 @@ -
- - - -
\ No newline at end of file diff --git a/layouts/partials/date-fmt.html b/layouts/partials/date-fmt.html deleted file mode 100644 index 6104226e..00000000 --- a/layouts/partials/date-fmt.html +++ /dev/null @@ -1,7 +0,0 @@ -{{if .Date}} -{{.Date.Format "Jan 2, 2006"}} -{{else if .Lastmod}} -{{.Lastmod.Format "Jan 2, 2006"}} -{{else}} -Unknown -{{end}} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html deleted file mode 100644 index cab44cb9..00000000 --- a/layouts/partials/footer.html +++ /dev/null @@ -1,16 +0,0 @@ - - -
- -{{if $.Site.Data.config.enableFooter}} - -{{end}} - -{{partial "contact.html" .}} diff --git a/layouts/partials/footerIndex.html b/layouts/partials/footerIndex.html deleted file mode 100644 index 5b73fa45..00000000 --- a/layouts/partials/footerIndex.html +++ /dev/null @@ -1,24 +0,0 @@ -{{if $.Site.Data.config.enableFooter}} - {{if $.Site.Data.graphConfig.enableGlobalGraph}} - - {{else}} -
- - {{end}} -{{end}} - -{{partial "contact.html" .}} diff --git a/layouts/partials/github.html b/layouts/partials/github.html deleted file mode 100644 index 836dc79c..00000000 --- a/layouts/partials/github.html +++ /dev/null @@ -1,3 +0,0 @@ -{{if $.Site.Data.config.enableGitHubEdit}} -{{ i18n "edit_source" }} -{{end}} diff --git a/layouts/partials/graph.html b/layouts/partials/graph.html deleted file mode 100644 index 3e25c657..00000000 --- a/layouts/partials/graph.html +++ /dev/null @@ -1,18 +0,0 @@ - -

{{ i18n "interactive_graph" }}

-
- -{{ $js := resources.Get "js/graph.js" | resources.Fingerprint "md5" }} - diff --git a/layouts/partials/head.html b/layouts/partials/head.html deleted file mode 100644 index 14d7ab4c..00000000 --- a/layouts/partials/head.html +++ /dev/null @@ -1,252 +0,0 @@ - -{{ $config := cond (eq $.Site.Language.Lang "en") "config" (printf "config.%s" $.Site.Language.Lang) }} -{{ $data := index $.Site.Data $config }} - - - - - - - - - - - - - - - - {{ range $data.links }} - {{ if strings.Contains .link "twitter.com" }} - {{ $twitter_handle := index (split .link "/") (sub (len (split .link "/")) 1) }} - - {{ end }} - {{ end }} - - - {{ if .Title }}{{ .Title }}{{ else }}{{ $data.page_title | default $.Site.Data.config.page_title }}{{ - end }} - - - - - {{ $favicon := $data.favicon | default $.Site.Data.config.favicon | default (slice (dict "rel" "shortcut icon" "type" "image/png" "href" "icon.png")) }} - {{ $type := (printf "%T" $favicon) }} - {{ if eq $type "string" }} - {{ $favicon | safeHTML }} - {{ else }} - {{ range $favicon }} - - {{- end }} - {{ end }} - - - {{$sass := resources.Match "styles/[!_]*.scss" }} - {{$css := slice }} - {{range $sass}} - {{$scss := . | resources.ToCSS (dict "outputStyle" "compressed") }} - {{$css = $css | append $scss}} - {{end}} - {{if $data.enableCallouts | default $.Site.Data.config.enableCallouts}} - {{$scss := resources.Get "styles/_callouts.scss" | resources.ToCSS (dict "outputStyle" "compressed") }} - {{$css = $css | append $scss}} - {{end}} - {{$finalCss := $css | resources.Concat "styles.css" | resources.Fingerprint "md5" | resources.Minify }} - - - {{$lightSyntax := resources.Get "styles/_light_syntax.scss" | resources.ToCSS (dict "outputStyle" "compressed") | resources.Fingerprint "md5" | resources.Minify }} - - - - {{$scripts := (slice "js/darkmode.js" "js/util.js")}} - {{range $scripts}} - {{$scriptname := .}} - {{ $s := resources.Get $scriptname | resources.ExecuteAsTemplate $scriptname . | resources.Fingerprint "md5" | resources.Minify }} - - {{end}} - {{partial "katex.html" .}} - - {{partial "mermaid.html" .}} - - - - {{ $popover := resources.Get "js/popover.js" | resources.Fingerprint "md5" | - resources.Minify }} - - - - {{ if $data.enableCodeBlockTitle | default $.Site.Data.config.enableCallouts }} - {{ $codeTitle := resources.Get "js/code-title.js" | resources.Fingerprint "md5" | resources.Minify }} - - {{end}} - - {{ if $data.enableCodeBlockCopy | default $.Site.Data.config.enableCodeBlockCopy }} - {{ $clipboard := resources.Get "js/clipboard.js" | resources.Fingerprint "md5" | resources.Minify }} - - {{ end }} - - {{ if $data.enableCallouts | default $.Site.Data.config.enableCallouts }} - {{ $callouts := resources.Get "js/callouts.js" | resources.Fingerprint "md5" | resources.Minify }} - - {{ end }} - - - {{$linkIndex := resources.Get "indices/linkIndex.json" | resources.Fingerprint - "md5" | resources.Minify | }} {{$contentIndex := resources.Get - "indices/contentIndex.json" | resources.Fingerprint "md5" | resources.Minify - }} - - {{if $data.enableSPA | default $.Site.Data.config.enableSPA}} - {{ $router := resources.Get "js/router.js" | resources.Fingerprint "md5" | - resources.Minify }} - - {{else}} - - {{end}} - {{ $trimmedURL := trim (index (split .Site.BaseURL "://") 1) "/" }} - - - diff --git a/layouts/partials/header.html b/layouts/partials/header.html deleted file mode 100644 index 1925a0cc..00000000 --- a/layouts/partials/header.html +++ /dev/null @@ -1,11 +0,0 @@ -
- {{ $config := cond (eq $.Site.Language.Lang "en") "config" (printf "config.%s" $.Site.Language.Lang) }} -

{{ ( index $.Site.Data $config ).page_title | default $.Site.Data.config.page_title }}

-
-
-

{{ i18n "search" }}

- {{ i18n "search_icon" }}{{ i18n "icon_search" }} -
- {{partial "darkmode.html" .}} -
- diff --git a/layouts/partials/katex.html b/layouts/partials/katex.html deleted file mode 100644 index 8a2f40b4..00000000 --- a/layouts/partials/katex.html +++ /dev/null @@ -1,14 +0,0 @@ -{{if $.Site.Data.config.enableLatex}} - - - - -{{end}} \ No newline at end of file diff --git a/layouts/partials/mermaid.html b/layouts/partials/mermaid.html deleted file mode 100644 index 09d348b5..00000000 --- a/layouts/partials/mermaid.html +++ /dev/null @@ -1,8 +0,0 @@ -{{if $.Site.Data.config.enableMermaid}} - {{ if .Page.Store.Get "hasMermaid" }} - - {{ end }} -{{ end }} diff --git a/layouts/partials/page-list.html b/layouts/partials/page-list.html deleted file mode 100644 index 1d2a4771..00000000 --- a/layouts/partials/page-list.html +++ /dev/null @@ -1,20 +0,0 @@ - diff --git a/layouts/partials/recent.html b/layouts/partials/recent.html deleted file mode 100644 index aadf97db..00000000 --- a/layouts/partials/recent.html +++ /dev/null @@ -1,12 +0,0 @@ -
-

{{ i18n "recent_notes" }}

- - {{$notes := .Site.RegularPages.ByLastmod.Reverse}} - {{partial "page-list.html" (first 3 $notes)}} -
- diff --git a/layouts/partials/search.html b/layouts/partials/search.html deleted file mode 100644 index b5692e18..00000000 --- a/layouts/partials/search.html +++ /dev/null @@ -1,18 +0,0 @@ -
-
- -
-
-
-
-{{if $.Site.Data.config.search.enableSemanticSearch}} -{{ $js := resources.Get "js/semantic-search.js" | resources.ExecuteAsTemplate "js/semantic-search.js" . | resources.Fingerprint "md5" | resources.Minify }} - -{{else}} - -{{ $js := resources.Get "js/full-text-search.js" | resources.Fingerprint "md5" | resources.Minify }} - -{{end}} - diff --git a/layouts/partials/textprocessing.html b/layouts/partials/textprocessing.html deleted file mode 100644 index c918247b..00000000 --- a/layouts/partials/textprocessing.html +++ /dev/null @@ -1,162 +0,0 @@ -{{ $content := .Content }} -{{ $raw := .RawContent }} -{{ $page := .Page }} - -{{/* Escape slashes for Latex to fix line breaks */}} -{{$latex := findRE "(?:\\${2}([^\\$]+)\\${2})|(?:\\$([^\\$]*)\\$)" $content}} -{{range $latex}} - {{$fixed := replaceRE "\\\\(?: +|\\n)" "\\\\ " .}} - {{$content = replace $content . $fixed}} -{{end}} - -{{/* Wikilinks */}} -{{$wikilinks := $content | findRE "!?\\[\\[\\S[^\\[\\]\\|]*(?:\\|[^\\[\\]]*)?\\S\\]\\]" }} -{{$codefences := $raw | findRE "\\x60[^\\x60\\n]+\\x60"}} -{{$codeblocks := $raw | findRE "\\x60{3}[^\\x60]+\\x60{3}"}} -{{$code := union $codefences $codeblocks}} - -{{range $wikilinks}} - {{$cur := .}} - {{$incode := false}} - {{range $code}} - {{if (in . $cur)}} - {{$incode = true}} - {{end}} - {{end}} - - {{if not $incode}} - - - {{$inner := . | strings.TrimPrefix "!" | strings.TrimPrefix "[[" | strings.TrimSuffix "]]" }} - - {{$split := split $inner "|"}} - - {{$path := index $split 0}} - - {{$reference := split $path "#"}} - - {{$title := index $reference 0}} - - - {{$display := default $title (index $split 1)}} - - {{$display := index (last 1 (split $display "/")) 0}} - - - {{$searchtitle := $title }} - {{$curpage := $page.GetPage $searchtitle }} - - {{ if (eq $curpage.String "nopPage") }} - {{$searchtitle = (add $title ".md") }} - {{$curpage = $page.GetPage $searchtitle }} - {{ end }} - - {{ if (eq $curpage.String "nopPage") }} - {{$searchtitle = (replace $searchtitle "&" "&") }} - {{$searchtitle = (replace $searchtitle """ "\"") }} - {{$searchtitle = (replace $searchtitle "”" "\"") }} - {{$searchtitle = (replace $searchtitle "“" "\"") }} - {{$searchtitle = (replace $searchtitle "’" "'") }} - {{$searchtitle = (replace $searchtitle "‘" "'") }} - {{$curpage = $page.GetPage $searchtitle }} - {{ end }} - {{$relpath := relURL $path}} - - - {{if not (eq $curpage.String "nopPage") }} - {{$block := default "" (index $reference 1)}} - {{$block = strings.TrimRight "/" (cond (eq $block "") $block (printf "#%s" $block)) | urlize | lower}} - {{$href := strings.TrimRight "/" $curpage.RelPermalink}} - {{$link := printf "%s" $href $block $href $display}} - {{$content = replace $content . $link}} - - {{else if fileExists $relpath}} - {{$splitpath := split $relpath "/"}} - {{$dirname := first (sub (len $splitpath) 1) $splitpath | path.Join | urlize}} - {{$basename := index (last 1 $splitpath) 0}} - {{$href := printf "/%s/%s" $dirname $basename}} - - {{if (hasPrefix . "!")}} - {{ $embed_ext := lower (path.Ext $href) }} - - {{if in ".png .jpg .jpeg .gif .bmp .svg" $embed_ext }} - {{$width := default "auto" (index $split 1) }} - {{$link := printf "" $href $width}} - {{$content = replace $content . $link}} - - {{else if in ".mp4 .webm .ogv .mov .mkv" $embed_ext}} - {{$link := printf "" $href}} - {{$content = replace $content . $link}} - - {{else if in ".mp3 .webm .wav .m4a .ogg .3gp .flac" $embed_ext}} - {{$link := printf "" $href}} - {{$content = replace $content . $link}} - - {{else if in ".pdf" $embed_ext }} - {{$src_link := printf "[source]" $href}} - {{$iframe_link := printf "" $href}} - {{$link := printf "%s
%s" $src_link $iframe_link}} - {{$content = replace $content . $link}} - - {{else}} - {{$link := printf "%s" $href $href}} - {{$content = replace $content . $link}} - {{end}} - {{else}} - {{$link := printf "%s" $href $display}} - {{$content = replace $content . $link}} - {{end}} - - {{else}} - {{$link := printf "%s" $display}} - {{$content = replace $content . $link}} - {{end}} - - {{end}} -{{end}} - -{{/* Add jumpable anchors */}} -{{ $content = $content | replaceRE "()(.+)()" `${1}# ${3}${4}` }} - -{{/* Callouts */}} -{{if $.Site.Data.config.enableCallouts}} - {{ $content = $content | replaceRE "
" "
" }} - {{ $blockquoteclasses := findRE `\[!.+\]` $content }} - {{ $blockquoteclasses1 := findRE "(.|\n)*?
" $content }} - {{ $blockquotetags := findRE `blockquote class=callout` $content }} - {{ $counter := 0 }} - {{ $counter1 := 0 }} - {{ $finder := index $blockquoteclasses1 $counter }} - {{range $blockquotetags}} - {{ $finder = index $blockquoteclasses1 $counter }} - {{ if (in $finder "[!") }} - {{ $inner := index $blockquoteclasses $counter1 }} - {{ if (in $finder "]-") }} - {{ $inner = $inner | replaceRE `\[!([a-zA-Z]+)\]` `callout-collapsible callout-collapsed ${1}`}} - {{ else if (in $finder "]+") }} - {{ $inner = $inner | replaceRE `\[!([a-zA-Z]+)\]` `callout-collapsible ${1}`}} - {{ else}} - {{ $inner = $inner | replaceRE `\[!([a-zA-Z]+)\]` `${1}` }} - {{ end }} - {{ $inner = printf "blockquote class=\"%s-callout\"" $inner | lower}} - {{ $content = replace $content . $inner 1}} - {{ $counter1 = add $counter1 1 }} - {{ else }} - {{ $inner := print "blockquote" }} - {{ $content = replace $content . $inner 1}} - {{ end }} - {{ $counter = add $counter 1 }} - {{end}} - {{ $content = $content | replaceRE `\[![a-zA-Z]+\][-\+]?` "" }} - {{ $content = $content | replaceRE "blockquote class=callout" "blockquote" }} - {{ $content = $content | replaceRE `(?s)(
.*?)
(.*?<\/blockquote)` `${1}

${2}` }} -{{end}} - -{{/* Make ==text== into text */}} -{{$mark := findRE "==([^=\n]+)==" $content}} -{{range $mark}} - {{$fixed := printf "%s" (replace . "==" "")}} - {{$content = replace $content . $fixed}} -{{end}} - -{{ $content | safeHTML }} diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html deleted file mode 100644 index bd0cb541..00000000 --- a/layouts/partials/toc.html +++ /dev/null @@ -1,9 +0,0 @@ -{{ $hasHeaders := gt (len (findRE "(.|\n)*?" .Content)) 0 }} -{{ if (or (and (not $.Site.Data.config.enableToc) .Params.enableToc) (and $.Site.Data.config.enableToc (ne .Params.enableToc false) $hasHeaders)) }} -

-{{end}} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..fa661da4 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6162 @@ +{ + "name": "@jackyzha0/quartz", + "version": "4.0.8", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@jackyzha0/quartz", + "version": "4.0.8", + "license": "MIT", + "dependencies": { + "@clack/prompts": "^0.6.3", + "@floating-ui/dom": "^1.4.0", + "@napi-rs/simple-git": "^0.1.8", + "async-mutex": "^0.4.0", + "chalk": "^4.1.2", + "chokidar": "^3.5.3", + "cli-spinner": "^0.2.10", + "d3": "^7.8.5", + "esbuild-sass-plugin": "^2.9.0", + "flexsearch": "0.7.21", + "github-slugger": "^2.0.0", + "globby": "^13.1.4", + "gray-matter": "^4.0.3", + "hast-util-to-html": "^8.0.4", + "hast-util-to-jsx-runtime": "^1.2.0", + "hast-util-to-string": "^2.0.0", + "is-absolute-url": "^4.0.1", + "js-yaml": "^4.1.0", + "lightningcss": "^1.21.5", + "mdast-util-find-and-replace": "^2.2.2", + "mdast-util-to-hast": "^12.3.0", + "mdast-util-to-string": "^3.2.0", + "micromorph": "^0.4.5", + "plausible-tracker": "^0.3.8", + "preact": "^10.14.1", + "preact-render-to-string": "^6.0.3", + "pretty-bytes": "^6.1.0", + "pretty-time": "^1.1.0", + "reading-time": "^1.5.0", + "rehype-autolink-headings": "^6.1.1", + "rehype-katex": "^6.0.3", + "rehype-mathjax": "^4.0.3", + "rehype-pretty-code": "^0.10.0", + "rehype-raw": "^6.1.1", + "rehype-slug": "^5.1.0", + "remark": "^14.0.2", + "remark-frontmatter": "^4.0.1", + "remark-gfm": "^3.0.1", + "remark-math": "^5.1.1", + "remark-parse": "^10.0.1", + "remark-rehype": "^10.1.0", + "remark-smartypants": "^2.0.0", + "rimraf": "^5.0.1", + "serve-handler": "^6.1.5", + "source-map-support": "^0.5.21", + "to-vfile": "^7.2.4", + "unified": "^10.1.2", + "unist-util-visit": "^4.1.2", + "vfile": "^5.3.7", + "workerpool": "^6.4.0", + "ws": "^8.13.0", + "yargs": "^17.7.2" + }, + "bin": { + "quartz": "quartz/bootstrap-cli.mjs" + }, + "devDependencies": { + "@types/cli-spinner": "^0.2.1", + "@types/d3": "^7.4.0", + "@types/flexsearch": "^0.7.3", + "@types/hast": "^2.3.4", + "@types/js-yaml": "^4.0.5", + "@types/node": "^20.1.2", + "@types/pretty-time": "^1.1.2", + "@types/source-map-support": "^0.5.6", + "@types/workerpool": "^6.4.0", + "@types/ws": "^8.5.5", + "@types/yargs": "^17.0.24", + "esbuild": "^0.18.11", + "prettier": "^3.0.0", + "tsx": "^3.12.7", + "typescript": "^5.0.4" + }, + "engines": { + "node": ">=18.14" + } + }, + "node_modules/@clack/core": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@clack/core/-/core-0.3.2.tgz", + "integrity": "sha512-FZnsNynwGDIDktx6PEZK1EuCkFpY4ldEX6VYvfl0dqeoLPb9Jpw1xoUXaVcGR8ExmYNm1w2vdGdJkEUYD/2pqg==", + "dependencies": { + "picocolors": "^1.0.0", + "sisteransi": "^1.0.5" + } + }, + "node_modules/@clack/prompts": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@clack/prompts/-/prompts-0.6.3.tgz", + "integrity": "sha512-AM+kFmAHawpUQv2q9+mcB6jLKxXGjgu/r2EQjEwujgpCdzrST6BJqYw00GRn56/L/Izw5U7ImoLmy00X/r80Pw==", + "bundleDependencies": [ + "is-unicode-supported" + ], + "dependencies": { + "@clack/core": "^0.3.2", + "is-unicode-supported": "*", + "picocolors": "^1.0.0", + "sisteransi": "^1.0.5" + } + }, + "node_modules/@clack/prompts/node_modules/is-unicode-supported": { + "version": "1.3.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@esbuild-kit/cjs-loader": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@esbuild-kit/cjs-loader/-/cjs-loader-2.4.2.tgz", + "integrity": "sha512-BDXFbYOJzT/NBEtp71cvsrGPwGAMGRB/349rwKuoxNSiKjPraNNnlK6MIIabViCjqZugu6j+xeMDlEkWdHHJSg==", + "dev": true, + "dependencies": { + "@esbuild-kit/core-utils": "^3.0.0", + "get-tsconfig": "^4.4.0" + } + }, + "node_modules/@esbuild-kit/core-utils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@esbuild-kit/core-utils/-/core-utils-3.1.0.tgz", + "integrity": "sha512-Uuk8RpCg/7fdHSceR1M6XbSZFSuMrxcePFuGgyvsBn+u339dk5OeL4jv2EojwTN2st/unJGsVm4qHWjWNmJ/tw==", + "dev": true, + "dependencies": { + "esbuild": "~0.17.6", + "source-map-support": "^0.5.21" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-arm": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", + "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-arm64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", + "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", + "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/darwin-arm64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", + "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/darwin-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", + "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/freebsd-arm64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", + "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/freebsd-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", + "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-arm": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", + "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-arm64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", + "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-ia32": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", + "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-loong64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", + "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-mips64el": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", + "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-ppc64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", + "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-riscv64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", + "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-s390x": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", + "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", + "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/netbsd-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", + "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/openbsd-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", + "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/sunos-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", + "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-arm64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", + "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-ia32": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", + "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", + "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/esbuild": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", + "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.17.19", + "@esbuild/android-arm64": "0.17.19", + "@esbuild/android-x64": "0.17.19", + "@esbuild/darwin-arm64": "0.17.19", + "@esbuild/darwin-x64": "0.17.19", + "@esbuild/freebsd-arm64": "0.17.19", + "@esbuild/freebsd-x64": "0.17.19", + "@esbuild/linux-arm": "0.17.19", + "@esbuild/linux-arm64": "0.17.19", + "@esbuild/linux-ia32": "0.17.19", + "@esbuild/linux-loong64": "0.17.19", + "@esbuild/linux-mips64el": "0.17.19", + "@esbuild/linux-ppc64": "0.17.19", + "@esbuild/linux-riscv64": "0.17.19", + "@esbuild/linux-s390x": "0.17.19", + "@esbuild/linux-x64": "0.17.19", + "@esbuild/netbsd-x64": "0.17.19", + "@esbuild/openbsd-x64": "0.17.19", + "@esbuild/sunos-x64": "0.17.19", + "@esbuild/win32-arm64": "0.17.19", + "@esbuild/win32-ia32": "0.17.19", + "@esbuild/win32-x64": "0.17.19" + } + }, + "node_modules/@esbuild-kit/esm-loader": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/@esbuild-kit/esm-loader/-/esm-loader-2.5.5.tgz", + "integrity": "sha512-Qwfvj/qoPbClxCRNuac1Du01r9gvNOT+pMYtJDapfB1eoGN1YlJ1BixLyL9WVENRx5RXgNLdfYdx/CuswlGhMw==", + "dev": true, + "dependencies": { + "@esbuild-kit/core-utils": "^3.0.0", + "get-tsconfig": "^4.4.0" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.11.tgz", + "integrity": "sha512-q4qlUf5ucwbUJZXF5tEQ8LF7y0Nk4P58hOsGk3ucY0oCwgQqAnqXVbUuahCddVHfrxmpyewRpiTHwVHIETYu7Q==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.11.tgz", + "integrity": "sha512-snieiq75Z1z5LJX9cduSAjUr7vEI1OdlzFPMw0HH5YI7qQHDd3qs+WZoMrWYDsfRJSq36lIA6mfZBkvL46KoIw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.11.tgz", + "integrity": "sha512-iPuoxQEV34+hTF6FT7om+Qwziv1U519lEOvekXO9zaMMlT9+XneAhKL32DW3H7okrCOBQ44BMihE8dclbZtTuw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.11.tgz", + "integrity": "sha512-Gm0QkI3k402OpfMKyQEEMG0RuW2LQsSmI6OeO4El2ojJMoF5NLYb3qMIjvbG/lbMeLOGiW6ooU8xqc+S0fgz2w==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.11.tgz", + "integrity": "sha512-N15Vzy0YNHu6cfyDOjiyfJlRJCB/ngKOAvoBf1qybG3eOq0SL2Lutzz9N7DYUbb7Q23XtHPn6lMDF6uWbGv9Fw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.11.tgz", + "integrity": "sha512-atEyuq6a3omEY5qAh5jIORWk8MzFnCpSTUruBgeyN9jZq1K/QI9uke0ATi3MHu4L8c59CnIi4+1jDKMuqmR71A==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.11.tgz", + "integrity": "sha512-XtuPrEfBj/YYYnAAB7KcorzzpGTvOr/dTtXPGesRfmflqhA4LMF0Gh/n5+a9JBzPuJ+CGk17CA++Hmr1F/gI0Q==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.11.tgz", + "integrity": "sha512-Idipz+Taso/toi2ETugShXjQ3S59b6m62KmLHkJlSq/cBejixmIydqrtM2XTvNCywFl3VC7SreSf6NV0i6sRyg==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.11.tgz", + "integrity": "sha512-c6Vh2WS9VFKxKZ2TvJdA7gdy0n6eSy+yunBvv4aqNCEhSWVor1TU43wNRp2YLO9Vng2G+W94aRz+ILDSwAiYog==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.11.tgz", + "integrity": "sha512-S3hkIF6KUqRh9n1Q0dSyYcWmcVa9Cg+mSoZEfFuzoYXXsk6196qndrM+ZiHNwpZKi3XOXpShZZ+9dfN5ykqjjw==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.11.tgz", + "integrity": "sha512-MRESANOoObQINBA+RMZW+Z0TJWpibtE7cPFnahzyQHDCA9X9LOmGh68MVimZlM9J8n5Ia8lU773te6O3ILW8kw==", + "cpu": [ + "loong64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.11.tgz", + "integrity": "sha512-qVyPIZrXNMOLYegtD1u8EBccCrBVshxMrn5MkuFc3mEVsw7CCQHaqZ4jm9hbn4gWY95XFnb7i4SsT3eflxZsUg==", + "cpu": [ + "mips64el" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.11.tgz", + "integrity": "sha512-T3yd8vJXfPirZaUOoA9D2ZjxZX4Gr3QuC3GztBJA6PklLotc/7sXTOuuRkhE9W/5JvJP/K9b99ayPNAD+R+4qQ==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.11.tgz", + "integrity": "sha512-evUoRPWiwuFk++snjH9e2cAjF5VVSTj+Dnf+rkO/Q20tRqv+644279TZlPK8nUGunjPAtQRCj1jQkDAvL6rm2w==", + "cpu": [ + "riscv64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.11.tgz", + "integrity": "sha512-/SlRJ15XR6i93gRWquRxYCfhTeC5PdqEapKoLbX63PLCmAkXZHY2uQm2l9bN0oPHBsOw2IswRZctMYS0MijFcg==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.11.tgz", + "integrity": "sha512-xcncej+wF16WEmIwPtCHi0qmx1FweBqgsRtEL1mSHLFR6/mb3GEZfLQnx+pUDfRDEM4DQF8dpXIW7eDOZl1IbA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.11.tgz", + "integrity": "sha512-aSjMHj/F7BuS1CptSXNg6S3M4F3bLp5wfFPIJM+Km2NfIVfFKhdmfHF9frhiCLIGVzDziggqWll0B+9AUbud/Q==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.11.tgz", + "integrity": "sha512-tNBq+6XIBZtht0xJGv7IBB5XaSyvYPCm1PxJ33zLQONdZoLVM0bgGqUrXnJyiEguD9LU4AHiu+GCXy/Hm9LsdQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.11.tgz", + "integrity": "sha512-kxfbDOrH4dHuAAOhr7D7EqaYf+W45LsAOOhAet99EyuxxQmjbk8M9N4ezHcEiCYPaiW8Dj3K26Z2V17Gt6p3ng==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.11.tgz", + "integrity": "sha512-Sh0dDRyk1Xi348idbal7lZyfSkjhJsdFeuC13zqdipsvMetlGiFQNdO+Yfp6f6B4FbyQm7qsk16yaZk25LChzg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.11.tgz", + "integrity": "sha512-o9JUIKF1j0rqJTFbIoF4bXj6rvrTZYOrfRcGyL0Vm5uJ/j5CkBD/51tpdxe9lXEDouhRgdr/BYzUrDOvrWwJpg==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.11.tgz", + "integrity": "sha512-rQI4cjLHd2hGsM1LqgDI7oOCYbQ6IBOVsX9ejuRMSze0GqXUG2ekwiKkiBU1pRGSeCqFFHxTrcEydB2Hyoz9CA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@floating-ui/core": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.3.1.tgz", + "integrity": "sha512-Bu+AMaXNjrpjh41znzHqaz3r2Nr8hHuHZT6V2LBKMhyMl0FgKA62PNYbqnfgmzOhoWZj70Zecisbo4H1rotP5g==" + }, + "node_modules/@floating-ui/dom": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.4.3.tgz", + "integrity": "sha512-nB/68NyaQlcdY22L+Fgd1HERQ7UGv7XFN+tPxwrEfQL4nKtAP/jIZnZtpUlXbtV+VEGHh6W/63Gy2C5biWI3sA==", + "dependencies": { + "@floating-ui/core": "^1.3.1" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@napi-rs/simple-git": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git/-/simple-git-0.1.8.tgz", + "integrity": "sha512-BvOMdkkofTz6lEE35itJ/laUokPhr/5ToMGlOH25YnhLD2yN1KpRAT4blW9tT8281/1aZjW3xyi73bs//IrDKA==", + "engines": { + "node": ">= 10" + }, + "optionalDependencies": { + "@napi-rs/simple-git-android-arm-eabi": "0.1.8", + "@napi-rs/simple-git-android-arm64": "0.1.8", + "@napi-rs/simple-git-darwin-arm64": "0.1.8", + "@napi-rs/simple-git-darwin-x64": "0.1.8", + "@napi-rs/simple-git-linux-arm-gnueabihf": "0.1.8", + "@napi-rs/simple-git-linux-arm64-gnu": "0.1.8", + "@napi-rs/simple-git-linux-arm64-musl": "0.1.8", + "@napi-rs/simple-git-linux-x64-gnu": "0.1.8", + "@napi-rs/simple-git-linux-x64-musl": "0.1.8", + "@napi-rs/simple-git-win32-arm64-msvc": "0.1.8", + "@napi-rs/simple-git-win32-x64-msvc": "0.1.8" + } + }, + "node_modules/@napi-rs/simple-git-android-arm-eabi": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-android-arm-eabi/-/simple-git-android-arm-eabi-0.1.8.tgz", + "integrity": "sha512-JJCejHBB1G6O8nxjQLT4quWCcvLpC3oRdJJ9G3MFYSCoYS8i1bWCWeU+K7Br+xT+D6s1t9q8kNJAwJv9Ygpi0g==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/simple-git-android-arm64": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-android-arm64/-/simple-git-android-arm64-0.1.8.tgz", + "integrity": "sha512-mraHzwWBw3tdRetNOS5KnFSjvdAbNBnjFLA8I4PwTCPJj3Q4txrigcPp2d59cJ0TC51xpnPXnZjYdNwwSI9g6g==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/simple-git-darwin-arm64": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-darwin-arm64/-/simple-git-darwin-arm64-0.1.8.tgz", + "integrity": "sha512-ufy/36eI/j4UskEuvqSH7uXtp3oXeLDmjQCfKJz3u5Vx98KmOMKrqAm2H81AB2WOtCo5mqS6PbBeUXR8BJX8lQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/simple-git-darwin-x64": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-darwin-x64/-/simple-git-darwin-x64-0.1.8.tgz", + "integrity": "sha512-Vb21U+v3tPJNl+8JtIHHT8HGe6WZ8o1Tq3f6p+Jx9Cz71zEbcIiB9FCEMY1knS/jwQEOuhhlI9Qk7d4HY+rprA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/simple-git-linux-arm-gnueabihf": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm-gnueabihf/-/simple-git-linux-arm-gnueabihf-0.1.8.tgz", + "integrity": "sha512-6BPTJ7CzpSm2t54mRLVaUr3S7ORJfVJoCk2rQ8v8oDg0XAMKvmQQxOsAgqKBo9gYNHJnqrOx3AEuEgvB586BuQ==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/simple-git-linux-arm64-gnu": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm64-gnu/-/simple-git-linux-arm64-gnu-0.1.8.tgz", + "integrity": "sha512-qfESqUCAA/XoQpRXHptSQ8gIFnETCQt1zY9VOkplx6tgYk9PCeaX4B1Xuzrh3eZamSCMJFn+1YB9Ut8NwyGgAA==", + "cpu": [ + "arm64" + ], + "hasInstallScript": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/simple-git-linux-arm64-musl": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm64-musl/-/simple-git-linux-arm64-musl-0.1.8.tgz", + "integrity": "sha512-G80BQPpaRmQpn8dJGHp4I2/YVhWDUNJwcCrJAtAdbKFDCMyCHJBln2ERL/+IEUlIAT05zK/c1Z5WEprvXEdXow==", + "cpu": [ + "arm64" + ], + "hasInstallScript": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/simple-git-linux-x64-gnu": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-x64-gnu/-/simple-git-linux-x64-gnu-0.1.8.tgz", + "integrity": "sha512-NI6o1sZYEf6vPtNWJAm9w8BxJt+LlSFW0liSjYe3lc3e4dhMfV240f0ALeqlwdIldRPaDFwZSJX5/QbS7nMzhw==", + "cpu": [ + "x64" + ], + "hasInstallScript": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/simple-git-linux-x64-musl": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-x64-musl/-/simple-git-linux-x64-musl-0.1.8.tgz", + "integrity": "sha512-wljGAEOW41er45VTiU8kXJmO480pQKzsgRCvPlJJSCaEVBbmo6XXbFIXnZy1a2J3Zyy2IOsRB4PVkUZaNuPkZQ==", + "cpu": [ + "x64" + ], + "hasInstallScript": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/simple-git-win32-arm64-msvc": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-win32-arm64-msvc/-/simple-git-win32-arm64-msvc-0.1.8.tgz", + "integrity": "sha512-QuV4QILyKPfbWHoQKrhXqjiCClx0SxbCTVogkR89BwivekqJMd9UlMxZdoCmwLWutRx4z9KmzQqokvYI5QeepA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@napi-rs/simple-git-win32-x64-msvc": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-win32-x64-msvc/-/simple-git-win32-x64-msvc-0.1.8.tgz", + "integrity": "sha512-UzNS4JtjhZhZ5hRLq7BIUq+4JOwt1ThIKv11CsF1ag2l99f0123XvfEpjczKTaa94nHtjXYc2Mv9TjccBqYOew==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "engines": { + "node": ">= 10" + } + }, + "node_modules/@types/cli-spinner": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@types/cli-spinner/-/cli-spinner-0.2.1.tgz", + "integrity": "sha512-bsdlZy3LThi9QbsK0GXm5s/e3F6HAJi1tMsIanm9trtoStSlV3gzir9JpfOK40gERMNIVevDTpG5NzSGnYs3QA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/d3": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@types/d3/-/d3-7.4.0.tgz", + "integrity": "sha512-jIfNVK0ZlxcuRDKtRS/SypEyOQ6UHaFQBKv032X45VvxSJ6Yi5G9behy9h6tNTHTDGh5Vq+KbmBjUWLgY4meCA==", + "dev": true, + "dependencies": { + "@types/d3-array": "*", + "@types/d3-axis": "*", + "@types/d3-brush": "*", + "@types/d3-chord": "*", + "@types/d3-color": "*", + "@types/d3-contour": "*", + "@types/d3-delaunay": "*", + "@types/d3-dispatch": "*", + "@types/d3-drag": "*", + "@types/d3-dsv": "*", + "@types/d3-ease": "*", + "@types/d3-fetch": "*", + "@types/d3-force": "*", + "@types/d3-format": "*", + "@types/d3-geo": "*", + "@types/d3-hierarchy": "*", + "@types/d3-interpolate": "*", + "@types/d3-path": "*", + "@types/d3-polygon": "*", + "@types/d3-quadtree": "*", + "@types/d3-random": "*", + "@types/d3-scale": "*", + "@types/d3-scale-chromatic": "*", + "@types/d3-selection": "*", + "@types/d3-shape": "*", + "@types/d3-time": "*", + "@types/d3-time-format": "*", + "@types/d3-timer": "*", + "@types/d3-transition": "*", + "@types/d3-zoom": "*" + } + }, + "node_modules/@types/d3-array": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.0.5.tgz", + "integrity": "sha512-Qk7fpJ6qFp+26VeQ47WY0mkwXaiq8+76RJcncDEfMc2ocRzXLO67bLFRNI4OX1aGBoPzsM5Y2T+/m1pldOgD+A==", + "dev": true + }, + "node_modules/@types/d3-axis": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-axis/-/d3-axis-3.0.2.tgz", + "integrity": "sha512-uGC7DBh0TZrU/LY43Fd8Qr+2ja1FKmH07q2FoZFHo1eYl8aj87GhfVoY1saJVJiq24rp1+wpI6BvQJMKgQm8oA==", + "dev": true, + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-brush": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-brush/-/d3-brush-3.0.2.tgz", + "integrity": "sha512-2TEm8KzUG3N7z0TrSKPmbxByBx54M+S9lHoP2J55QuLU0VSQ9mE96EJSAOVNEqd1bbynMjeTS9VHmz8/bSw8rA==", + "dev": true, + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-chord": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-chord/-/d3-chord-3.0.2.tgz", + "integrity": "sha512-abT/iLHD3sGZwqMTX1TYCMEulr+wBd0SzyOQnjYNLp7sngdOHYtNkMRI5v3w5thoN+BWtlHVDx2Osvq6fxhZWw==", + "dev": true + }, + "node_modules/@types/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-HKuicPHJuvPgCD+np6Se9MQvS6OCbJmOjGvylzMJRlDwUXjKTTXs6Pwgk79O09Vj/ho3u1ofXnhFOaEWWPrlwA==", + "dev": true + }, + "node_modules/@types/d3-contour": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-contour/-/d3-contour-3.0.2.tgz", + "integrity": "sha512-k6/bGDoAGJZnZWaKzeB+9glgXCYGvh6YlluxzBREiVo8f/X2vpTEdgPy9DN7Z2i42PZOZ4JDhVdlTSTSkLDPlQ==", + "dev": true, + "dependencies": { + "@types/d3-array": "*", + "@types/geojson": "*" + } + }, + "node_modules/@types/d3-delaunay": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-delaunay/-/d3-delaunay-6.0.1.tgz", + "integrity": "sha512-tLxQ2sfT0p6sxdG75c6f/ekqxjyYR0+LwPrsO1mbC9YDBzPJhs2HbJJRrn8Ez1DBoHRo2yx7YEATI+8V1nGMnQ==", + "dev": true + }, + "node_modules/@types/d3-dispatch": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-dispatch/-/d3-dispatch-3.0.2.tgz", + "integrity": "sha512-rxN6sHUXEZYCKV05MEh4z4WpPSqIw+aP7n9ZN6WYAAvZoEAghEK1WeVZMZcHRBwyaKflU43PCUAJNjFxCzPDjg==", + "dev": true + }, + "node_modules/@types/d3-drag": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-drag/-/d3-drag-3.0.2.tgz", + "integrity": "sha512-qmODKEDvyKWVHcWWCOVcuVcOwikLVsyc4q4EBJMREsoQnR2Qoc2cZQUyFUPgO9q4S3qdSqJKBsuefv+h0Qy+tw==", + "dev": true, + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-dsv": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-dsv/-/d3-dsv-3.0.1.tgz", + "integrity": "sha512-76pBHCMTvPLt44wFOieouXcGXWOF0AJCceUvaFkxSZEu4VDUdv93JfpMa6VGNFs01FHfuP4a5Ou68eRG1KBfTw==", + "dev": true + }, + "node_modules/@types/d3-ease": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.0.tgz", + "integrity": "sha512-aMo4eaAOijJjA6uU+GIeW018dvy9+oH5Y2VPPzjjfxevvGQ/oRDs+tfYC9b50Q4BygRR8yE2QCLsrT0WtAVseA==", + "dev": true + }, + "node_modules/@types/d3-fetch": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-fetch/-/d3-fetch-3.0.2.tgz", + "integrity": "sha512-gllwYWozWfbep16N9fByNBDTkJW/SyhH6SGRlXloR7WdtAaBui4plTP+gbUgiEot7vGw/ZZop1yDZlgXXSuzjA==", + "dev": true, + "dependencies": { + "@types/d3-dsv": "*" + } + }, + "node_modules/@types/d3-force": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-force/-/d3-force-3.0.4.tgz", + "integrity": "sha512-q7xbVLrWcXvSBBEoadowIUJ7sRpS1yvgMWnzHJggFy5cUZBq2HZL5k/pBSm0GdYWS1vs5/EDwMjSKF55PDY4Aw==", + "dev": true + }, + "node_modules/@types/d3-format": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-format/-/d3-format-3.0.1.tgz", + "integrity": "sha512-5KY70ifCCzorkLuIkDe0Z9YTf9RR2CjBX1iaJG+rgM/cPP+sO+q9YdQ9WdhQcgPj1EQiJ2/0+yUkkziTG6Lubg==", + "dev": true + }, + "node_modules/@types/d3-geo": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-3.0.3.tgz", + "integrity": "sha512-bK9uZJS3vuDCNeeXQ4z3u0E7OeJZXjUgzFdSOtNtMCJCLvDtWDwfpRVWlyt3y8EvRzI0ccOu9xlMVirawolSCw==", + "dev": true, + "dependencies": { + "@types/geojson": "*" + } + }, + "node_modules/@types/d3-hierarchy": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@types/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz", + "integrity": "sha512-9hjRTVoZjRFR6xo8igAJyNXQyPX6Aq++Nhb5ebrUF414dv4jr2MitM2fWiOY475wa3Za7TOS2Gh9fmqEhLTt0A==", + "dev": true + }, + "node_modules/@types/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-jx5leotSeac3jr0RePOH1KdR9rISG91QIE4Q2PYTu4OymLTZfA3SrnURSLzKH48HmXVUru50b8nje4E79oQSQw==", + "dev": true, + "dependencies": { + "@types/d3-color": "*" + } + }, + "node_modules/@types/d3-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.0.0.tgz", + "integrity": "sha512-0g/A+mZXgFkQxN3HniRDbXMN79K3CdTpLsevj+PXiTcb2hVyvkZUBg37StmgCQkaD84cUJ4uaDAWq7UJOQy2Tg==", + "dev": true + }, + "node_modules/@types/d3-polygon": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/d3-polygon/-/d3-polygon-3.0.0.tgz", + "integrity": "sha512-D49z4DyzTKXM0sGKVqiTDTYr+DHg/uxsiWDAkNrwXYuiZVd9o9wXZIo+YsHkifOiyBkmSWlEngHCQme54/hnHw==", + "dev": true + }, + "node_modules/@types/d3-quadtree": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-quadtree/-/d3-quadtree-3.0.2.tgz", + "integrity": "sha512-QNcK8Jguvc8lU+4OfeNx+qnVy7c0VrDJ+CCVFS9srBo2GL9Y18CnIxBdTF3v38flrGy5s1YggcoAiu6s4fLQIw==", + "dev": true + }, + "node_modules/@types/d3-random": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-random/-/d3-random-3.0.1.tgz", + "integrity": "sha512-IIE6YTekGczpLYo/HehAy3JGF1ty7+usI97LqraNa8IiDur+L44d0VOjAvFQWJVdZOJHukUJw+ZdZBlgeUsHOQ==", + "dev": true + }, + "node_modules/@types/d3-scale": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.3.tgz", + "integrity": "sha512-PATBiMCpvHJSMtZAMEhc2WyL+hnzarKzI6wAHYjhsonjWJYGq5BXTzQjv4l8m2jO183/4wZ90rKvSeT7o72xNQ==", + "dev": true, + "dependencies": { + "@types/d3-time": "*" + } + }, + "node_modules/@types/d3-scale-chromatic": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.0.0.tgz", + "integrity": "sha512-dsoJGEIShosKVRBZB0Vo3C8nqSDqVGujJU6tPznsBJxNJNwMF8utmS83nvCBKQYPpjCzaaHcrf66iTRpZosLPw==", + "dev": true + }, + "node_modules/@types/d3-selection": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.5.tgz", + "integrity": "sha512-xCB0z3Hi8eFIqyja3vW8iV01+OHGYR2di/+e+AiOcXIOrY82lcvWW8Ke1DYE/EUVMsBl4Db9RppSBS3X1U6J0w==", + "dev": true + }, + "node_modules/@types/d3-shape": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.1.tgz", + "integrity": "sha512-6Uh86YFF7LGg4PQkuO2oG6EMBRLuW9cbavUW46zkIO5kuS2PfTqo2o9SkgtQzguBHbLgNnU90UNsITpsX1My+A==", + "dev": true, + "dependencies": { + "@types/d3-path": "*" + } + }, + "node_modules/@types/d3-time": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.0.tgz", + "integrity": "sha512-sZLCdHvBUcNby1cB6Fd3ZBrABbjz3v1Vm90nysCQ6Vt7vd6e/h9Lt7SiJUoEX0l4Dzc7P5llKyhqSi1ycSf1Hg==", + "dev": true + }, + "node_modules/@types/d3-time-format": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-4.0.0.tgz", + "integrity": "sha512-yjfBUe6DJBsDin2BMIulhSHmr5qNR5Pxs17+oW4DoVPyVIXZ+m6bs7j1UVKP08Emv6jRmYrYqxYzO63mQxy1rw==", + "dev": true + }, + "node_modules/@types/d3-timer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.0.tgz", + "integrity": "sha512-HNB/9GHqu7Fo8AQiugyJbv6ZxYz58wef0esl4Mv828w1ZKpAshw/uFWVDUcIB9KKFeFKoxS3cHY07FFgtTRZ1g==", + "dev": true + }, + "node_modules/@types/d3-transition": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-transition/-/d3-transition-3.0.3.tgz", + "integrity": "sha512-/S90Od8Id1wgQNvIA8iFv9jRhCiZcGhPd2qX0bKF/PS+y0W5CrXKgIiELd2CvG1mlQrWK/qlYh3VxicqG1ZvgA==", + "dev": true, + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-zoom": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-3.0.3.tgz", + "integrity": "sha512-OWk1yYIIWcZ07+igN6BeoG6rqhnJ/pYe+R1qWFM2DtW49zsoSjgb9G5xB0ZXA8hh2jAzey1XuRmMSoXdKw8MDA==", + "dev": true, + "dependencies": { + "@types/d3-interpolate": "*", + "@types/d3-selection": "*" + } + }, + "node_modules/@types/debug": { + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.8.tgz", + "integrity": "sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ==", + "dependencies": { + "@types/ms": "*" + } + }, + "node_modules/@types/flexsearch": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/@types/flexsearch/-/flexsearch-0.7.3.tgz", + "integrity": "sha512-HXwADeHEP4exXkCIwy2n1+i0f1ilP1ETQOH5KDOugjkTFZPntWo0Gr8stZOaebkxsdx+k0X/K6obU/+it07ocg==", + "dev": true + }, + "node_modules/@types/geojson": { + "version": "7946.0.10", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.10.tgz", + "integrity": "sha512-Nmh0K3iWQJzniTuPRcJn5hxXkfB1T1pgB89SBig5PlJQU5yocazeu4jATJlaA0GYFKWMqDdvYemoSnF2pXgLVA==", + "dev": true + }, + "node_modules/@types/hast": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.5.tgz", + "integrity": "sha512-SvQi0L/lNpThgPoleH53cdjB3y9zpLlVjRbqB3rH8hx1jiRSBGAhyjV3H+URFjNVRqt2EdYNrbZE5IsGlNfpRg==", + "dependencies": { + "@types/unist": "^2" + } + }, + "node_modules/@types/js-yaml": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.5.tgz", + "integrity": "sha512-FhpRzf927MNQdRZP0J5DLIdTXhjLYzeUTmLAu69mnVksLH9CJY3IuSeEgbKUki7GQZm0WqDkGzyxju2EZGD2wA==", + "dev": true + }, + "node_modules/@types/katex": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@types/katex/-/katex-0.14.0.tgz", + "integrity": "sha512-+2FW2CcT0K3P+JMR8YG846bmDwplKUTsWgT2ENwdQ1UdVfRk3GQrh6Mi4sTopy30gI8Uau5CEqHTDZ6YvWIUPA==" + }, + "node_modules/@types/mathjax": { + "version": "0.0.37", + "resolved": "https://registry.npmjs.org/@types/mathjax/-/mathjax-0.0.37.tgz", + "integrity": "sha512-y0WSZBtBNQwcYipTU/BhgeFu1EZNlFvUNCmkMXV9kBQZq7/o5z82dNVyH3yy2Xv5zzeNeQoHSL4Xm06+EQiH+g==" + }, + "node_modules/@types/mdast": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.11.tgz", + "integrity": "sha512-Y/uImid8aAwrEA24/1tcRZwpxX3pIFTSilcNDKSPn+Y2iDywSEachzRuvgAYYLR3wpGXAsMbv5lvKLDZLeYPAw==", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/ms": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==" + }, + "node_modules/@types/nlcst": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/nlcst/-/nlcst-1.0.0.tgz", + "integrity": "sha512-3TGCfOcy8R8mMQ4CNSNOe3PG66HttvjcLzCoOpvXvDtfWOTi+uT/rxeOKm/qEwbM4SNe1O/PjdiBK2YcTjU4OQ==", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/node": { + "version": "20.3.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.3.tgz", + "integrity": "sha512-wheIYdr4NYML61AjC8MKj/2jrR/kDQri/CIpVoZwldwhnIrD/j9jIU5bJ8yBKuB2VhpFV7Ab6G2XkBjv9r9Zzw==", + "dev": true + }, + "node_modules/@types/parse5": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-6.0.3.tgz", + "integrity": "sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==" + }, + "node_modules/@types/pretty-time": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@types/pretty-time/-/pretty-time-1.1.2.tgz", + "integrity": "sha512-4i+Y+O5H80Rh01lY/3Z0hB/UWc4R64ReE83joEpVsIG3iQWpYx66k6pQh1amJNZquKtJQyu/RcfkTtvL0KwssA==", + "dev": true + }, + "node_modules/@types/source-map-support": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/@types/source-map-support/-/source-map-support-0.5.6.tgz", + "integrity": "sha512-b2nJ9YyXmkhGaa2b8VLM0kJ04xxwNyijcq12/kDoomCt43qbHBeK2SLNJ9iJmETaAj+bKUT05PQUu3Q66GvLhQ==", + "dev": true, + "dependencies": { + "source-map": "^0.6.0" + } + }, + "node_modules/@types/unist": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", + "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==" + }, + "node_modules/@types/workerpool": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@types/workerpool/-/workerpool-6.4.0.tgz", + "integrity": "sha512-SIF2/169pDsLKeM8GQGHkOFifGalDbZgiBSaLUnnlVSRsAOenkAvQ6h4uhV2W+PZZczS+8LQxACwNkSykdT91A==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/ws": { + "version": "8.5.5", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.5.tgz", + "integrity": "sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/yargs": { + "version": "17.0.24", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz", + "integrity": "sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", + "dev": true + }, + "node_modules/abab": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", + "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==" + }, + "node_modules/acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-globals": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-7.0.1.tgz", + "integrity": "sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==", + "dependencies": { + "acorn": "^8.1.0", + "acorn-walk": "^8.0.2" + } + }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-sequence-parser": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz", + "integrity": "sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==", + "peer": true + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/array-iterate": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/array-iterate/-/array-iterate-2.0.1.tgz", + "integrity": "sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/async-mutex": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.4.0.tgz", + "integrity": "sha512-eJFZ1YhRR8UN8eBLoNzcDPcy/jqjsg6I1AP+KvWQX80BqOSW1oJPJXDylPUEeMr2ZQvHgnQ//Lp6f3RQ1zI7HA==", + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/bail": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz", + "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "node_modules/bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/ccount": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", + "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/character-entities": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", + "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-html4": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", + "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/cli-spinner": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/cli-spinner/-/cli-spinner-0.2.10.tgz", + "integrity": "sha512-U0sSQ+JJvSLi1pAYuJykwiA8Dsr15uHEy85iCJ6A+0DjVxivr3d+N2Wjvodeg89uP5K6TswFkKBfAD7B3YSn/Q==", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/comma-separated-tokens": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", + "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "engines": { + "node": ">= 10" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cssom": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", + "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==" + }, + "node_modules/cssstyle": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", + "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", + "dependencies": { + "cssom": "~0.3.6" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cssstyle/node_modules/cssom": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==" + }, + "node_modules/d3": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/d3/-/d3-7.8.5.tgz", + "integrity": "sha512-JgoahDG51ncUfJu6wX/1vWQEqOflgXyl4MaHqlcSruTez7yhaRKR9i8VjjcQGeS2en/jnFivXuaIMnseMMt0XA==", + "dependencies": { + "d3-array": "3", + "d3-axis": "3", + "d3-brush": "3", + "d3-chord": "3", + "d3-color": "3", + "d3-contour": "4", + "d3-delaunay": "6", + "d3-dispatch": "3", + "d3-drag": "3", + "d3-dsv": "3", + "d3-ease": "3", + "d3-fetch": "3", + "d3-force": "3", + "d3-format": "3", + "d3-geo": "3", + "d3-hierarchy": "3", + "d3-interpolate": "3", + "d3-path": "3", + "d3-polygon": "3", + "d3-quadtree": "3", + "d3-random": "3", + "d3-scale": "4", + "d3-scale-chromatic": "3", + "d3-selection": "3", + "d3-shape": "3", + "d3-time": "3", + "d3-time-format": "4", + "d3-timer": "3", + "d3-transition": "3", + "d3-zoom": "3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-array": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", + "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", + "dependencies": { + "internmap": "1 - 2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-axis": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-3.0.0.tgz", + "integrity": "sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-brush": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-3.0.0.tgz", + "integrity": "sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-drag": "2 - 3", + "d3-interpolate": "1 - 3", + "d3-selection": "3", + "d3-transition": "3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-chord": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-3.0.1.tgz", + "integrity": "sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==", + "dependencies": { + "d3-path": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-contour": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-4.0.2.tgz", + "integrity": "sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==", + "dependencies": { + "d3-array": "^3.2.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-delaunay": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.4.tgz", + "integrity": "sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==", + "dependencies": { + "delaunator": "5" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-dispatch": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.1.tgz", + "integrity": "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-drag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-3.0.0.tgz", + "integrity": "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-selection": "3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-dsv": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-3.0.1.tgz", + "integrity": "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==", + "dependencies": { + "commander": "7", + "iconv-lite": "0.6", + "rw": "1" + }, + "bin": { + "csv2json": "bin/dsv2json.js", + "csv2tsv": "bin/dsv2dsv.js", + "dsv2dsv": "bin/dsv2dsv.js", + "dsv2json": "bin/dsv2json.js", + "json2csv": "bin/json2dsv.js", + "json2dsv": "bin/json2dsv.js", + "json2tsv": "bin/json2dsv.js", + "tsv2csv": "bin/dsv2dsv.js", + "tsv2json": "bin/dsv2json.js" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-ease": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", + "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-fetch": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-3.0.1.tgz", + "integrity": "sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==", + "dependencies": { + "d3-dsv": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-force": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-3.0.0.tgz", + "integrity": "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-quadtree": "1 - 3", + "d3-timer": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-format": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.0.tgz", + "integrity": "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-geo": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.0.tgz", + "integrity": "sha512-JEo5HxXDdDYXCaWdwLRt79y7giK8SbhZJbFWXqbRTolCHFI5jRqteLzCsq51NKbUoX0PjBVSohxrx+NoOUujYA==", + "dependencies": { + "d3-array": "2.5.0 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-hierarchy": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz", + "integrity": "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", + "dependencies": { + "d3-color": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", + "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-polygon": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-3.0.1.tgz", + "integrity": "sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-quadtree": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-3.0.1.tgz", + "integrity": "sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-random": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-3.0.1.tgz", + "integrity": "sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-scale": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", + "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", + "dependencies": { + "d3-array": "2.10.0 - 3", + "d3-format": "1 - 3", + "d3-interpolate": "1.2.0 - 3", + "d3-time": "2.1.1 - 3", + "d3-time-format": "2 - 4" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-scale-chromatic": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-3.0.0.tgz", + "integrity": "sha512-Lx9thtxAKrO2Pq6OO2Ua474opeziKr279P/TKZsMAhYyNDD3EnCffdbgeSYN5O7m2ByQsxtuP2CSDczNUIZ22g==", + "dependencies": { + "d3-color": "1 - 3", + "d3-interpolate": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-selection": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz", + "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-shape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", + "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", + "dependencies": { + "d3-path": "^3.1.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", + "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", + "dependencies": { + "d3-array": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time-format": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", + "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", + "dependencies": { + "d3-time": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-timer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", + "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-transition": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-3.0.1.tgz", + "integrity": "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==", + "dependencies": { + "d3-color": "1 - 3", + "d3-dispatch": "1 - 3", + "d3-ease": "1 - 3", + "d3-interpolate": "1 - 3", + "d3-timer": "1 - 3" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "d3-selection": "2 - 3" + } + }, + "node_modules/d3-zoom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-3.0.0.tgz", + "integrity": "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-drag": "2 - 3", + "d3-interpolate": "1 - 3", + "d3-selection": "2 - 3", + "d3-transition": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/data-urls": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz", + "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==", + "dependencies": { + "abab": "^2.0.6", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^11.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decimal.js": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" + }, + "node_modules/decode-named-character-reference": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz", + "integrity": "sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==", + "dependencies": { + "character-entities": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/delaunator": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-5.0.0.tgz", + "integrity": "sha512-AyLvtyJdbv/U1GkiS6gUUzclRoAY4Gs75qkMygJJhU75LW4DNuSF2RMzpxs9jw9Oz1BobHjTdkG3zdP55VxAqw==", + "dependencies": { + "robust-predicates": "^3.0.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/diff": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/domexception": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", + "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", + "dependencies": { + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/esbuild": { + "version": "0.18.11", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.11.tgz", + "integrity": "sha512-i8u6mQF0JKJUlGR3OdFLKldJQMMs8OqM9Cc3UCi9XXziJ9WERM5bfkHaEAy0YAvPRMgqSW55W7xYn84XtEFTtA==", + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.18.11", + "@esbuild/android-arm64": "0.18.11", + "@esbuild/android-x64": "0.18.11", + "@esbuild/darwin-arm64": "0.18.11", + "@esbuild/darwin-x64": "0.18.11", + "@esbuild/freebsd-arm64": "0.18.11", + "@esbuild/freebsd-x64": "0.18.11", + "@esbuild/linux-arm": "0.18.11", + "@esbuild/linux-arm64": "0.18.11", + "@esbuild/linux-ia32": "0.18.11", + "@esbuild/linux-loong64": "0.18.11", + "@esbuild/linux-mips64el": "0.18.11", + "@esbuild/linux-ppc64": "0.18.11", + "@esbuild/linux-riscv64": "0.18.11", + "@esbuild/linux-s390x": "0.18.11", + "@esbuild/linux-x64": "0.18.11", + "@esbuild/netbsd-x64": "0.18.11", + "@esbuild/openbsd-x64": "0.18.11", + "@esbuild/sunos-x64": "0.18.11", + "@esbuild/win32-arm64": "0.18.11", + "@esbuild/win32-ia32": "0.18.11", + "@esbuild/win32-x64": "0.18.11" + } + }, + "node_modules/esbuild-sass-plugin": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/esbuild-sass-plugin/-/esbuild-sass-plugin-2.10.0.tgz", + "integrity": "sha512-STv849QGT8g77RRFmroSt4VBVKjv+dypKcO4aWz8IP4G5JbRH0KC0+B8ODuzlUNu9R5MbkGcev/62RDP/JcZ2Q==", + "dependencies": { + "resolve": "^1.22.2", + "sass": "^1.63.0" + }, + "peerDependencies": { + "esbuild": "^0.18.0" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/esm": { + "version": "3.2.25", + "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", + "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-glob": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.0.tgz", + "integrity": "sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-url-parser": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", + "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", + "dependencies": { + "punycode": "^1.3.2" + } + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fault": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fault/-/fault-2.0.1.tgz", + "integrity": "sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ==", + "dependencies": { + "format": "^0.2.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flexsearch": { + "version": "0.7.21", + "resolved": "https://registry.npmjs.org/flexsearch/-/flexsearch-0.7.21.tgz", + "integrity": "sha512-W7cHV7Hrwjid6lWmy0IhsWDFQboWSng25U3VVywpHOTJnnAZNPScog67G+cVpeX9f7yDD21ih0WDrMMT+JoaYg==" + }, + "node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/format": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz", + "integrity": "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==", + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-tsconfig": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.6.2.tgz", + "integrity": "sha512-E5XrT4CbbXcXWy+1jChlZmrmCwd5KGx502kDCXJJ7y898TtWW9FwoG5HfOLVRKmlmDGkWN2HM9Ho+/Y8F0sJDg==", + "dev": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/github-slugger": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-2.0.0.tgz", + "integrity": "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==" + }, + "node_modules/glob": { + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.1.tgz", + "integrity": "sha512-9BKYcEeIs7QwlCYs+Y3GBvqAMISufUS0i2ELd11zpZjxI5V9iyRj0HgzB5/cLf2NY4vcYBTYzJ7GIui7j/4DOw==", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.0.3", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2", + "path-scurry": "^1.10.0" + }, + "bin": { + "glob": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globby": { + "version": "13.2.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.1.tgz", + "integrity": "sha512-DPCBxctI7dN4EeIqjW2KGqgdcUMbrhJ9AzON+PlxCtvppWhubTLD4+a0GFxiym14ZvacUydTPjLPc2DlKz7EIg==", + "dependencies": { + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.11", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gray-matter": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz", + "integrity": "sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==", + "dependencies": { + "js-yaml": "^3.13.1", + "kind-of": "^6.0.2", + "section-matter": "^1.0.0", + "strip-bom-string": "^1.0.0" + }, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/gray-matter/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/gray-matter/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/hash-obj": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/hash-obj/-/hash-obj-4.0.0.tgz", + "integrity": "sha512-FwO1BUVWkyHasWDW4S8o0ssQXjvyghLV2rfVhnN36b2bbcj45eGiuzdn9XOvOpjV3TKQD7Gm2BWNXdE9V4KKYg==", + "dependencies": { + "is-obj": "^3.0.0", + "sort-keys": "^5.0.0", + "type-fest": "^1.0.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/hast-util-from-dom": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/hast-util-from-dom/-/hast-util-from-dom-4.2.0.tgz", + "integrity": "sha512-t1RJW/OpJbCAJQeKi3Qrj1cAOLA0+av/iPFori112+0X7R3wng+jxLA+kXec8K4szqPRGI8vPxbbpEYvvpwaeQ==", + "dependencies": { + "hastscript": "^7.0.0", + "web-namespaces": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-from-html": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/hast-util-from-html/-/hast-util-from-html-1.0.2.tgz", + "integrity": "sha512-LhrTA2gfCbLOGJq2u/asp4kwuG0y6NhWTXiPKP+n0qNukKy7hc10whqqCFfyvIA1Q5U5d0sp9HhNim9gglEH4A==", + "dependencies": { + "@types/hast": "^2.0.0", + "hast-util-from-parse5": "^7.0.0", + "parse5": "^7.0.0", + "vfile": "^5.0.0", + "vfile-message": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-from-html-isomorphic": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/hast-util-from-html-isomorphic/-/hast-util-from-html-isomorphic-1.0.0.tgz", + "integrity": "sha512-Yu480AKeOEN/+l5LA674a+7BmIvtDj24GvOt7MtQWuhzUwlaaRWdEPXAh3Qm5vhuthpAipFb2vTetKXWOjmTvw==", + "dependencies": { + "@types/hast": "^2.0.0", + "hast-util-from-dom": "^4.0.0", + "hast-util-from-html": "^1.0.0", + "unist-util-remove-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-from-parse5": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-7.1.2.tgz", + "integrity": "sha512-Nz7FfPBuljzsN3tCQ4kCBKqdNhQE2l0Tn+X1ubgKBPRoiDIu1mL08Cfw4k7q71+Duyaw7DXDN+VTAp4Vh3oCOw==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/unist": "^2.0.0", + "hastscript": "^7.0.0", + "property-information": "^6.0.0", + "vfile": "^5.0.0", + "vfile-location": "^4.0.0", + "web-namespaces": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-has-property": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hast-util-has-property/-/hast-util-has-property-2.0.1.tgz", + "integrity": "sha512-X2+RwZIMTMKpXUzlotatPzWj8bspCymtXH3cfG3iQKV+wPF53Vgaqxi/eLqGck0wKq1kS9nvoB1wchbCPEL8sg==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-heading-rank": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/hast-util-heading-rank/-/hast-util-heading-rank-2.1.1.tgz", + "integrity": "sha512-iAuRp+ESgJoRFJbSyaqsfvJDY6zzmFoEnL1gtz1+U8gKtGGj1p0CVlysuUAUjq95qlZESHINLThwJzNGmgGZxA==", + "dependencies": { + "@types/hast": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-is-element": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-2.1.3.tgz", + "integrity": "sha512-O1bKah6mhgEq2WtVMk+Ta5K7pPMqsBBlmzysLdcwKVrqzZQ0CHqUPiIVspNhAG1rvxpvJjtGee17XfauZYKqVA==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-parse-selector": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-3.1.1.tgz", + "integrity": "sha512-jdlwBjEexy1oGz0aJ2f4GKMaVKkA9jwjr4MjAAI22E5fM/TXVZHuS5OpONtdeIkRKqAaryQ2E9xNQxijoThSZA==", + "dependencies": { + "@types/hast": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-raw": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-7.2.3.tgz", + "integrity": "sha512-RujVQfVsOrxzPOPSzZFiwofMArbQke6DJjnFfceiEbFh7S05CbPt0cYN+A5YeD3pso0JQk6O1aHBnx9+Pm2uqg==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/parse5": "^6.0.0", + "hast-util-from-parse5": "^7.0.0", + "hast-util-to-parse5": "^7.0.0", + "html-void-elements": "^2.0.0", + "parse5": "^6.0.0", + "unist-util-position": "^4.0.0", + "unist-util-visit": "^4.0.0", + "vfile": "^5.0.0", + "web-namespaces": "^2.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-raw/node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" + }, + "node_modules/hast-util-to-html": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-8.0.4.tgz", + "integrity": "sha512-4tpQTUOr9BMjtYyNlt0P50mH7xj0Ks2xpo8M943Vykljf99HW6EzulIoJP1N3eKOSScEHzyzi9dm7/cn0RfGwA==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/unist": "^2.0.0", + "ccount": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-raw": "^7.0.0", + "hast-util-whitespace": "^2.0.0", + "html-void-elements": "^2.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "stringify-entities": "^4.0.0", + "zwitch": "^2.0.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-jsx-runtime": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-1.2.0.tgz", + "integrity": "sha512-Y4FB8Dx2k6zJZrwbexkVm6YVRA8Sho2tTwacjDSr/x5c0wioOpc1VIoLyGUSb8+8xkAnQPAtHbdMvzA6bl0F1w==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/unist": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-whitespace": "^2.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "style-to-object": "^0.4.1", + "unist-util-position": "^4.0.0", + "vfile-message": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-parse5": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-7.1.0.tgz", + "integrity": "sha512-YNRgAJkH2Jky5ySkIqFXTQiaqcAtJyVE+D5lkN6CdtOqrnkLfGYYrEcKuHOJZlp+MwjSwuD3fZuawI+sic/RBw==", + "dependencies": { + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "web-namespaces": "^2.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hast-util-to-string/-/hast-util-to-string-2.0.0.tgz", + "integrity": "sha512-02AQ3vLhuH3FisaMM+i/9sm4OXGSq1UhOOCpTLLQtHdL3tZt7qil69r8M8iDkZYyC0HCFylcYoP+8IO7ddta1A==", + "dependencies": { + "@types/hast": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-text": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/hast-util-to-text/-/hast-util-to-text-3.1.2.tgz", + "integrity": "sha512-tcllLfp23dJJ+ju5wCCZHVpzsQQ43+moJbqVX3jNWPB7z/KFC4FyZD6R7y94cHL6MQ33YtMZL8Z0aIXXI4XFTw==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/unist": "^2.0.0", + "hast-util-is-element": "^2.0.0", + "unist-util-find-after": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-whitespace": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-2.0.1.tgz", + "integrity": "sha512-nAxA0v8+vXSBDt3AnRUNjyRIQ0rD+ntpbAp4LnPkumc5M9yUbSMa4XDU9Q6etY4f1Wp4bNgvc1yjiZtsTTrSng==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hastscript": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-7.2.0.tgz", + "integrity": "sha512-TtYPq24IldU8iKoJQqvZOuhi5CyCQRAbvDOX0x1eW6rsHSxa/1i2CCiptNTotGHJ3VoHRGmqiv6/D3q113ikkw==", + "dependencies": { + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-parse-selector": "^3.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/html-encoding-sniffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", + "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", + "dependencies": { + "whatwg-encoding": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/html-void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-2.0.1.tgz", + "integrity": "sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/immutable": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.0.tgz", + "integrity": "sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg==" + }, + "node_modules/inline-style-parser": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz", + "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==" + }, + "node_modules/internmap": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", + "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", + "engines": { + "node": ">=12" + } + }, + "node_modules/is-absolute-url": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-4.0.1.tgz", + "integrity": "sha512-/51/TKE88Lmm7Gc4/8btclNXWS+g50wXhYJq8HWIBAGUBnoAdRu1aXeh364t/O7wXDAcTJDP8PNuNKWUDWie+A==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "engines": { + "node": ">=4" + } + }, + "node_modules/is-core-module": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", + "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-obj": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-3.0.0.tgz", + "integrity": "sha512-IlsXEHOjtKhpN8r/tRFj2nDyTmHvcfNeu/nrRIcXE17ROeatXchkojffa1SpdqW4cr/Fj6QkEf/Gn4zf6KKvEQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-plain-obj": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", + "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "node_modules/jackspeak": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.2.1.tgz", + "integrity": "sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsdom": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.3.tgz", + "integrity": "sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==", + "dependencies": { + "abab": "^2.0.6", + "acorn": "^8.8.1", + "acorn-globals": "^7.0.0", + "cssom": "^0.5.0", + "cssstyle": "^2.3.0", + "data-urls": "^3.0.2", + "decimal.js": "^10.4.2", + "domexception": "^4.0.0", + "escodegen": "^2.0.0", + "form-data": "^4.0.0", + "html-encoding-sniffer": "^3.0.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.1", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.2", + "parse5": "^7.1.1", + "saxes": "^6.0.0", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.1.2", + "w3c-xmlserializer": "^4.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^2.0.0", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^11.0.0", + "ws": "^8.11.0", + "xml-name-validator": "^4.0.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "canvas": "^2.5.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, + "node_modules/jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "peer": true + }, + "node_modules/katex": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.8.tgz", + "integrity": "sha512-ftuDnJbcbOckGY11OO+zg3OofESlbR5DRl2cmN8HeWeeFIV7wTXvAOx8kEjZjobhA+9wh2fbKeO6cdcA9Mnovg==", + "funding": [ + "https://opencollective.com/katex", + "https://github.com/sponsors/katex" + ], + "dependencies": { + "commander": "^8.3.0" + }, + "bin": { + "katex": "cli.js" + } + }, + "node_modules/katex/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "engines": { + "node": ">= 12" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/lightningcss": { + "version": "1.21.5", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.21.5.tgz", + "integrity": "sha512-/pEUPeih2EwIx9n4T82aOG6CInN83tl/mWlw6B5gWLf36UplQi1L+5p3FUHsdt4fXVfOkkh9KIaM3owoq7ss8A==", + "dependencies": { + "detect-libc": "^1.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-darwin-arm64": "1.21.5", + "lightningcss-darwin-x64": "1.21.5", + "lightningcss-linux-arm-gnueabihf": "1.21.5", + "lightningcss-linux-arm64-gnu": "1.21.5", + "lightningcss-linux-arm64-musl": "1.21.5", + "lightningcss-linux-x64-gnu": "1.21.5", + "lightningcss-linux-x64-musl": "1.21.5", + "lightningcss-win32-x64-msvc": "1.21.5" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.21.5", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.21.5.tgz", + "integrity": "sha512-z05hyLX85WY0UfhkFUOrWEFqD69lpVAmgl3aDzMKlIZJGygbhbegqb4PV8qfUrKKNBauut/qVNPKZglhTaDDxA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.21.5", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.21.5.tgz", + "integrity": "sha512-MSJhmej/U9MrdPxDk7+FWhO8+UqVoZUHG4VvKT5RQ4RJtqtANTiWiI97LvoVNMtdMnHaKs1Pkji6wHUFxjJsHQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.21.5", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.21.5.tgz", + "integrity": "sha512-xN6+5/JsMrbZHL1lPl+MiNJ3Xza12ueBKPepiyDCFQzlhFRTj7D0LG+cfNTzPBTO8KcYQynLpl1iBB8LGp3Xtw==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.21.5", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.21.5.tgz", + "integrity": "sha512-KfzFNhC4XTbmG3ma/xcTs/IhCwieW89XALIusKmnV0N618ZDXEB0XjWOYQRCXeK9mfqPdbTBpurEHV/XZtkniQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.21.5", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.21.5.tgz", + "integrity": "sha512-bc0GytQO5Mn9QM6szaZ+31fQHNdidgpM1sSCwzPItz8hg3wOvKl8039rU0veMJV3ZgC9z0ypNRceLrSHeRHmXw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.21.5", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.21.5.tgz", + "integrity": "sha512-JwMbgypPQgc2kW2av3OwzZ8cbrEuIiDiXPJdXRE6aVxu67yHauJawQLqJKTGUhiAhy6iLDG8Wg0a3/ziL+m+Kw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.21.5", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.21.5.tgz", + "integrity": "sha512-Ib8b6IQ/OR/VrPU6YBgy4T3QnuHY7DUa95O+nz+cwrTkMSN6fuHcTcIaz4t8TJ6HI5pl3uxUOZjmtls2pyQWow==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.21.5", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.21.5.tgz", + "integrity": "sha512-A8cSi8lUpBeVmoF+DqqW7cd0FemDbCuKr490IXdjyeI+KL8adpSKUs8tcqO0OXPh1EoDqK7JNkD/dELmd4Iz5g==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/longest-streak": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz", + "integrity": "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/lru-cache": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.0.tgz", + "integrity": "sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==", + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/markdown-table": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.3.tgz", + "integrity": "sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/mathjax-full": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/mathjax-full/-/mathjax-full-3.2.2.tgz", + "integrity": "sha512-+LfG9Fik+OuI8SLwsiR02IVdjcnRCy5MufYLi0C3TdMT56L/pjB0alMVGgoWJF8pN9Rc7FESycZB9BMNWIid5w==", + "dependencies": { + "esm": "^3.2.25", + "mhchemparser": "^4.1.0", + "mj-context-menu": "^0.6.1", + "speech-rule-engine": "^4.0.6" + } + }, + "node_modules/mdast-util-definitions": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-5.1.2.tgz", + "integrity": "sha512-8SVPMuHqlPME/z3gqVwWY4zVXn8lqKv/pAhC57FuJ40ImXyBpmO5ukh98zB2v7Blql2FiHjHv9LVztSIqjY+MA==", + "dependencies": { + "@types/mdast": "^3.0.0", + "@types/unist": "^2.0.0", + "unist-util-visit": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-find-and-replace": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-2.2.2.tgz", + "integrity": "sha512-MTtdFRz/eMDHXzeK6W3dO7mXUlF82Gom4y0oOgvHhh/HXZAGvIQDUvQ0SuUx+j2tv44b8xTHOm8K/9OoRFnXKw==", + "dependencies": { + "@types/mdast": "^3.0.0", + "escape-string-regexp": "^5.0.0", + "unist-util-is": "^5.0.0", + "unist-util-visit-parents": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-from-markdown": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.1.tgz", + "integrity": "sha512-4xTO/M8c82qBcnQc1tgpNtubGUW/Y1tBQ1B0i5CtSoelOLKFYlElIr3bvgREYYO5iRqbMY1YuqZng0GVOI8Qww==", + "dependencies": { + "@types/mdast": "^3.0.0", + "@types/unist": "^2.0.0", + "decode-named-character-reference": "^1.0.0", + "mdast-util-to-string": "^3.1.0", + "micromark": "^3.0.0", + "micromark-util-decode-numeric-character-reference": "^1.0.0", + "micromark-util-decode-string": "^1.0.0", + "micromark-util-normalize-identifier": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "unist-util-stringify-position": "^3.0.0", + "uvu": "^0.5.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-frontmatter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-frontmatter/-/mdast-util-frontmatter-1.0.1.tgz", + "integrity": "sha512-JjA2OjxRqAa8wEG8hloD0uTU0kdn8kbtOWpPP94NBkfAlbxn4S8gCGf/9DwFtEeGPXrDcNXdiDjVaRdUFqYokw==", + "dependencies": { + "@types/mdast": "^3.0.0", + "mdast-util-to-markdown": "^1.3.0", + "micromark-extension-frontmatter": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-2.0.2.tgz", + "integrity": "sha512-qvZ608nBppZ4icQlhQQIAdc6S3Ffj9RGmzwUKUWuEICFnd1LVkN3EktF7ZHAgfcEdvZB5owU9tQgt99e2TlLjg==", + "dependencies": { + "mdast-util-from-markdown": "^1.0.0", + "mdast-util-gfm-autolink-literal": "^1.0.0", + "mdast-util-gfm-footnote": "^1.0.0", + "mdast-util-gfm-strikethrough": "^1.0.0", + "mdast-util-gfm-table": "^1.0.0", + "mdast-util-gfm-task-list-item": "^1.0.0", + "mdast-util-to-markdown": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-autolink-literal": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-1.0.3.tgz", + "integrity": "sha512-My8KJ57FYEy2W2LyNom4n3E7hKTuQk/0SES0u16tjA9Z3oFkF4RrC/hPAPgjlSpezsOvI8ObcXcElo92wn5IGA==", + "dependencies": { + "@types/mdast": "^3.0.0", + "ccount": "^2.0.0", + "mdast-util-find-and-replace": "^2.0.0", + "micromark-util-character": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-footnote": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-1.0.2.tgz", + "integrity": "sha512-56D19KOGbE00uKVj3sgIykpwKL179QsVFwx/DCW0u/0+URsryacI4MAdNJl0dh+u2PSsD9FtxPFbHCzJ78qJFQ==", + "dependencies": { + "@types/mdast": "^3.0.0", + "mdast-util-to-markdown": "^1.3.0", + "micromark-util-normalize-identifier": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-strikethrough": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-1.0.3.tgz", + "integrity": "sha512-DAPhYzTYrRcXdMjUtUjKvW9z/FNAMTdU0ORyMcbmkwYNbKocDpdk+PX1L1dQgOID/+vVs1uBQ7ElrBQfZ0cuiQ==", + "dependencies": { + "@types/mdast": "^3.0.0", + "mdast-util-to-markdown": "^1.3.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-table": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-1.0.7.tgz", + "integrity": "sha512-jjcpmNnQvrmN5Vx7y7lEc2iIOEytYv7rTvu+MeyAsSHTASGCCRA79Igg2uKssgOs1i1po8s3plW0sTu1wkkLGg==", + "dependencies": { + "@types/mdast": "^3.0.0", + "markdown-table": "^3.0.0", + "mdast-util-from-markdown": "^1.0.0", + "mdast-util-to-markdown": "^1.3.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-task-list-item": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-1.0.2.tgz", + "integrity": "sha512-PFTA1gzfp1B1UaiJVyhJZA1rm0+Tzn690frc/L8vNX1Jop4STZgOE6bxUhnzdVSB+vm2GU1tIsuQcA9bxTQpMQ==", + "dependencies": { + "@types/mdast": "^3.0.0", + "mdast-util-to-markdown": "^1.3.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-math": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/mdast-util-math/-/mdast-util-math-2.0.2.tgz", + "integrity": "sha512-8gmkKVp9v6+Tgjtq6SYx9kGPpTf6FVYRa53/DLh479aldR9AyP48qeVOgNZ5X7QUK7nOy4yw7vg6mbiGcs9jWQ==", + "dependencies": { + "@types/mdast": "^3.0.0", + "longest-streak": "^3.0.0", + "mdast-util-to-markdown": "^1.3.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-phrasing": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-3.0.1.tgz", + "integrity": "sha512-WmI1gTXUBJo4/ZmSk79Wcb2HcjPJBzM1nlI/OUWA8yk2X9ik3ffNbBGsU+09BFmXaL1IBb9fiuvq6/KMiNycSg==", + "dependencies": { + "@types/mdast": "^3.0.0", + "unist-util-is": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-hast": { + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-12.3.0.tgz", + "integrity": "sha512-pits93r8PhnIoU4Vy9bjW39M2jJ6/tdHyja9rrot9uujkN7UTU9SDnE6WNJz/IGyQk3XHX6yNNtrBH6cQzm8Hw==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/mdast": "^3.0.0", + "mdast-util-definitions": "^5.0.0", + "micromark-util-sanitize-uri": "^1.1.0", + "trim-lines": "^3.0.0", + "unist-util-generated": "^2.0.0", + "unist-util-position": "^4.0.0", + "unist-util-visit": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-markdown": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-1.5.0.tgz", + "integrity": "sha512-bbv7TPv/WC49thZPg3jXuqzuvI45IL2EVAr/KxF0BSdHsU0ceFHOmwQn6evxAh1GaoK/6GQ1wp4R4oW2+LFL/A==", + "dependencies": { + "@types/mdast": "^3.0.0", + "@types/unist": "^2.0.0", + "longest-streak": "^3.0.0", + "mdast-util-phrasing": "^3.0.0", + "mdast-util-to-string": "^3.0.0", + "micromark-util-decode-string": "^1.0.0", + "unist-util-visit": "^4.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-3.2.0.tgz", + "integrity": "sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg==", + "dependencies": { + "@types/mdast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/mhchemparser": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/mhchemparser/-/mhchemparser-4.2.1.tgz", + "integrity": "sha512-kYmyrCirqJf3zZ9t/0wGgRZ4/ZJw//VwaRVGA75C4nhE60vtnIzhl9J9ndkX/h6hxSN7pjg/cE0VxbnNM+bnDQ==" + }, + "node_modules/micromark": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-3.2.0.tgz", + "integrity": "sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "@types/debug": "^4.0.0", + "debug": "^4.0.0", + "decode-named-character-reference": "^1.0.0", + "micromark-core-commonmark": "^1.0.1", + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-chunked": "^1.0.0", + "micromark-util-combine-extensions": "^1.0.0", + "micromark-util-decode-numeric-character-reference": "^1.0.0", + "micromark-util-encode": "^1.0.0", + "micromark-util-normalize-identifier": "^1.0.0", + "micromark-util-resolve-all": "^1.0.0", + "micromark-util-sanitize-uri": "^1.0.0", + "micromark-util-subtokenize": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.1", + "uvu": "^0.5.0" + } + }, + "node_modules/micromark-core-commonmark": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-1.1.0.tgz", + "integrity": "sha512-BgHO1aRbolh2hcrzL2d1La37V0Aoz73ymF8rAcKnohLy93titmv62E0gP8Hrx9PKcKrqCZ1BbLGbP3bEhoXYlw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "micromark-factory-destination": "^1.0.0", + "micromark-factory-label": "^1.0.0", + "micromark-factory-space": "^1.0.0", + "micromark-factory-title": "^1.0.0", + "micromark-factory-whitespace": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-chunked": "^1.0.0", + "micromark-util-classify-character": "^1.0.0", + "micromark-util-html-tag-name": "^1.0.0", + "micromark-util-normalize-identifier": "^1.0.0", + "micromark-util-resolve-all": "^1.0.0", + "micromark-util-subtokenize": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.1", + "uvu": "^0.5.0" + } + }, + "node_modules/micromark-extension-frontmatter": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/micromark-extension-frontmatter/-/micromark-extension-frontmatter-1.1.1.tgz", + "integrity": "sha512-m2UH9a7n3W8VAH9JO9y01APpPKmNNNs71P0RbknEmYSaZU5Ghogv38BYO94AI5Xw6OYfxZRdHZZ2nYjs/Z+SZQ==", + "dependencies": { + "fault": "^2.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-2.0.3.tgz", + "integrity": "sha512-vb9OoHqrhCmbRidQv/2+Bc6pkP0FrtlhurxZofvOEy5o8RtuuvTq+RQ1Vw5ZDNrVraQZu3HixESqbG+0iKk/MQ==", + "dependencies": { + "micromark-extension-gfm-autolink-literal": "^1.0.0", + "micromark-extension-gfm-footnote": "^1.0.0", + "micromark-extension-gfm-strikethrough": "^1.0.0", + "micromark-extension-gfm-table": "^1.0.0", + "micromark-extension-gfm-tagfilter": "^1.0.0", + "micromark-extension-gfm-task-list-item": "^1.0.0", + "micromark-util-combine-extensions": "^1.0.0", + "micromark-util-types": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-autolink-literal": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-1.0.5.tgz", + "integrity": "sha512-z3wJSLrDf8kRDOh2qBtoTRD53vJ+CWIyo7uyZuxf/JAbNJjiHsOpG1y5wxk8drtv3ETAHutCu6N3thkOOgueWg==", + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-sanitize-uri": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-footnote": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-1.1.2.tgz", + "integrity": "sha512-Yxn7z7SxgyGWRNa4wzf8AhYYWNrwl5q1Z8ii+CSTTIqVkmGZF1CElX2JI8g5yGoM3GAman9/PVCUFUSJ0kB/8Q==", + "dependencies": { + "micromark-core-commonmark": "^1.0.0", + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-normalize-identifier": "^1.0.0", + "micromark-util-sanitize-uri": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-strikethrough": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-1.0.7.tgz", + "integrity": "sha512-sX0FawVE1o3abGk3vRjOH50L5TTLr3b5XMqnP9YDRb34M0v5OoZhG+OHFz1OffZ9dlwgpTBKaT4XW/AsUVnSDw==", + "dependencies": { + "micromark-util-chunked": "^1.0.0", + "micromark-util-classify-character": "^1.0.0", + "micromark-util-resolve-all": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-table": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-1.0.7.tgz", + "integrity": "sha512-3ZORTHtcSnMQEKtAOsBQ9/oHp9096pI/UvdPtN7ehKvrmZZ2+bbWhi0ln+I9drmwXMt5boocn6OlwQzNXeVeqw==", + "dependencies": { + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-tagfilter": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-1.0.2.tgz", + "integrity": "sha512-5XWB9GbAUSHTn8VPU8/1DBXMuKYT5uOgEjJb8gN3mW0PNW5OPHpSdojoqf+iq1xo7vWzw/P8bAHY0n6ijpXF7g==", + "dependencies": { + "micromark-util-types": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-task-list-item": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-1.0.5.tgz", + "integrity": "sha512-RMFXl2uQ0pNQy6Lun2YBYT9g9INXtWJULgbt01D/x8/6yJ2qpKyzdZD3pi6UIkzF++Da49xAelVKUeUMqd5eIQ==", + "dependencies": { + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-math": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/micromark-extension-math/-/micromark-extension-math-2.1.2.tgz", + "integrity": "sha512-es0CcOV89VNS9wFmyn+wyFTKweXGW4CEvdaAca6SWRWPyYCbBisnjaHLjWO4Nszuiud84jCpkHsqAJoa768Pvg==", + "dependencies": { + "@types/katex": "^0.16.0", + "katex": "^0.16.0", + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-math/node_modules/@types/katex": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@types/katex/-/katex-0.16.0.tgz", + "integrity": "sha512-hz+S3nV6Mym5xPbT9fnO8dDhBFQguMYpY0Ipxv06JMi1ORgnEM4M1ymWDUhUNer3ElLmT583opRo4RzxKmh9jw==" + }, + "node_modules/micromark-factory-destination": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-1.1.0.tgz", + "integrity": "sha512-XaNDROBgx9SgSChd69pjiGKbV+nfHGDPVYFs5dOoDd7ZnMAE+Cuu91BCpsY8RT2NP9vo/B8pds2VQNCLiu0zhg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-factory-label": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-1.1.0.tgz", + "integrity": "sha512-OLtyez4vZo/1NjxGhcpDSbHQ+m0IIGnT8BoPamh+7jVlzLJBH98zzuCoUeMxvM6WsNeh8wx8cKvqLiPHEACn0w==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + } + }, + "node_modules/micromark-factory-space": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-1.1.0.tgz", + "integrity": "sha512-cRzEj7c0OL4Mw2v6nwzttyOZe8XY/Z8G0rzmWQZTBi/jjwyw/U4uqKtUORXQrR5bAZZnbTI/feRV/R7hc4jQYQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-factory-title": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-1.1.0.tgz", + "integrity": "sha512-J7n9R3vMmgjDOCY8NPw55jiyaQnH5kBdV2/UXCtZIpnHH3P6nHUKaH7XXEYuWwx/xUJcawa8plLBEjMPU24HzQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-factory-whitespace": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-1.1.0.tgz", + "integrity": "sha512-v2WlmiymVSp5oMg+1Q0N1Lxmt6pMhIHD457whWM7/GUlEks1hI9xj5w3zbc4uuMKXGisksZk8DzP2UyGbGqNsQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-util-character": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-1.2.0.tgz", + "integrity": "sha512-lXraTwcX3yH/vMDaFWCQJP1uIszLVebzUa3ZHdrgxr7KEU/9mL4mVgCpGbyhvNLNlauROiNUq7WN5u7ndbY6xg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-util-chunked": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-1.1.0.tgz", + "integrity": "sha512-Ye01HXpkZPNcV6FiyoW2fGZDUw4Yc7vT0E9Sad83+bEDiCJ1uXu0S3mr8WLpsz3HaG3x2q0HM6CTuPdcZcluFQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/micromark-util-classify-character": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-1.1.0.tgz", + "integrity": "sha512-SL0wLxtKSnklKSUplok1WQFoGhUdWYKggKUiqhX+Swala+BtptGCu5iPRc+xvzJ4PXE/hwM3FNXsfEVgoZsWbw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-util-combine-extensions": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-1.1.0.tgz", + "integrity": "sha512-Q20sp4mfNf9yEqDL50WwuWZHUrCO4fEyeDCnMGmG5Pr0Cz15Uo7KBs6jq+dq0EgX4DPwwrh9m0X+zPV1ypFvUA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-chunked": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-util-decode-numeric-character-reference": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.1.0.tgz", + "integrity": "sha512-m9V0ExGv0jB1OT21mrWcuf4QhP46pH1KkfWy9ZEezqHKAxkj4mPCy3nIH1rkbdMlChLHX531eOrymlwyZIf2iw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/micromark-util-decode-string": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-1.1.0.tgz", + "integrity": "sha512-YphLGCK8gM1tG1bd54azwyrQRjCFcmgj2S2GoJDNnh4vYtnL38JS8M4gpxzOPNyHdNEpheyWXCTnnTDY3N+NVQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-decode-numeric-character-reference": "^1.0.0", + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/micromark-util-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-1.1.0.tgz", + "integrity": "sha512-EuEzTWSTAj9PA5GOAs992GzNh2dGQO52UvAbtSOMvXTxv3Criqb6IOzJUBCmEqrrXSblJIJBbFFv6zPxpreiJw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/micromark-util-html-tag-name": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.2.0.tgz", + "integrity": "sha512-VTQzcuQgFUD7yYztuQFKXT49KghjtETQ+Wv/zUjGSGBioZnkA4P1XXZPT1FHeJA6RwRXSF47yvJ1tsJdoxwO+Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/micromark-util-normalize-identifier": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.1.0.tgz", + "integrity": "sha512-N+w5vhqrBihhjdpM8+5Xsxy71QWqGn7HYNUvch71iV2PM7+E3uWGox1Qp90loa1ephtCxG2ftRV/Conitc6P2Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/micromark-util-resolve-all": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-1.1.0.tgz", + "integrity": "sha512-b/G6BTMSg+bX+xVCshPTPyAu2tmA0E4X98NSR7eIbeC6ycCqCeE7wjfDIgzEbkzdEVJXRtOG4FbEm/uGbCRouA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-util-sanitize-uri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.2.0.tgz", + "integrity": "sha512-QO4GXv0XZfWey4pYFndLUKEAktKkG5kZTdUNaTAkzbuJxn2tNBOr+QtxR2XpWaMhbImT2dPzyLrPXLlPhph34A==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-encode": "^1.0.0", + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/micromark-util-subtokenize": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-1.1.0.tgz", + "integrity": "sha512-kUQHyzRoxvZO2PuLzMt2P/dwVsTiivCK8icYTeR+3WgbuPqfHgPPy7nFKbeqRivBvn/3N3GBiNC+JRTMSxEC7A==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-chunked": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + } + }, + "node_modules/micromark-util-symbol": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-1.1.0.tgz", + "integrity": "sha512-uEjpEYY6KMs1g7QfJ2eX1SQEV+ZT4rUD3UcF6l57acZvLNK7PBZL+ty82Z1qhK1/yXIY4bdx04FKMgR0g4IAag==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/micromark-util-types": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-1.1.0.tgz", + "integrity": "sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromorph": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/micromorph/-/micromorph-0.4.5.tgz", + "integrity": "sha512-Erasr0xiDvDeEhh7B/k7RFTwwfaAX10D7BMorNpokkwDh6XsRLYWDPaWF1m5JQeMSkGdqlEtQ8s68NcdDWuGgw==" + }, + "node_modules/mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "dependencies": { + "mime-db": "~1.33.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.2.tgz", + "integrity": "sha512-PZOT9g5v2ojiTL7r1xF6plNHLtOeTpSlDI007As2NlA2aYBMfVom17yqa6QzhmDP8QOhn7LjHTg7DFCVSSa6yg==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-6.0.2.tgz", + "integrity": "sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mj-context-menu": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/mj-context-menu/-/mj-context-menu-0.6.1.tgz", + "integrity": "sha512-7NO5s6n10TIV96d4g2uDpG7ZDpIhMh0QNfGdJw/W47JswFcosz457wqz/b5sAKvl12sxINGFCn80NZHKwxQEXA==" + }, + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/nlcst-to-string": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/nlcst-to-string/-/nlcst-to-string-3.1.1.tgz", + "integrity": "sha512-63mVyqaqt0cmn2VcI2aH6kxe1rLAmSROqHMA0i4qqg1tidkfExgpb0FGMikMCn86mw5dFtBtEANfmSSK7TjNHw==", + "dependencies": { + "@types/nlcst": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nwsapi": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", + "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==" + }, + "node_modules/parse-latin": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/parse-latin/-/parse-latin-5.0.1.tgz", + "integrity": "sha512-b/K8ExXaWC9t34kKeDV8kGXBkXZ1HCSAZRYE7HR14eA1GlXX5L8iWhs8USJNhQU9q5ci413jCKF0gOyovvyRBg==", + "dependencies": { + "nlcst-to-string": "^3.0.0", + "unist-util-modify-children": "^3.0.0", + "unist-util-visit-children": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/parse-numeric-range": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/parse-numeric-range/-/parse-numeric-range-1.3.0.tgz", + "integrity": "sha512-twN+njEipszzlMJd4ONUYgSfZPDxgHhT9Ahed5uTigpQn90FggW4SA/AIPq/6a149fTbE9qBEcSwE3FAEp6wQQ==" + }, + "node_modules/parse5": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "dependencies": { + "entities": "^4.4.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==" + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/path-scurry": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.0.tgz", + "integrity": "sha512-tZFEaRQbMLjwrsmidsGJ6wDMv0iazJWk6SfIKnY4Xru8auXgmJkOBa5DUbYFcFD2Rzk2+KDlIiF0GVXNCbgC7g==", + "dependencies": { + "lru-cache": "^9.1.1 || ^10.0.0", + "minipass": "^5.0.0 || ^6.0.2" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-to-regexp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", + "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==" + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/plausible-tracker": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/plausible-tracker/-/plausible-tracker-0.3.8.tgz", + "integrity": "sha512-lmOWYQ7s9KOUJ1R+YTOR3HrjdbxIS2Z4de0P/Jx2dQPteznJl2eX3tXxKClpvbfyGP59B5bbhW8ftN59HbbFSg==", + "engines": { + "node": ">=10" + } + }, + "node_modules/preact": { + "version": "10.15.1", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.15.1.tgz", + "integrity": "sha512-qs2ansoQEwzNiV5eAcRT1p1EC/dmEzaATVDJNiB3g2sRDWdA7b7MurXdJjB2+/WQktGWZwxvDrnuRFbWuIr64g==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + } + }, + "node_modules/preact-render-to-string": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-6.1.0.tgz", + "integrity": "sha512-/AsKU4Q4R8r4aKwwNQrkQQNUVEDmTeZr6IwesDffobFRPcTk4dSQrfo1VOcXjtlcUss6QYEe7JShUGbQIhaw+A==", + "dependencies": { + "pretty-format": "^3.8.0" + }, + "peerDependencies": { + "preact": ">=10" + } + }, + "node_modules/prettier": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.0.tgz", + "integrity": "sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/pretty-bytes": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-6.1.0.tgz", + "integrity": "sha512-Rk753HI8f4uivXi4ZCIYdhmG1V+WKzvRMg/X+M42a6t7D07RcmopXJMDNk6N++7Bl75URRGsb40ruvg7Hcp2wQ==", + "engines": { + "node": "^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pretty-format": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-3.8.0.tgz", + "integrity": "sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew==" + }, + "node_modules/pretty-time": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pretty-time/-/pretty-time-1.1.0.tgz", + "integrity": "sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/property-information": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.2.0.tgz", + "integrity": "sha512-kma4U7AFCTwpqq5twzC1YVIDXSqg6qQK6JN0smOw8fgRy1OkMi0CYSzFmsy6dnqSenamAtj0CyXMUJ1Mf6oROg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" + }, + "node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==" + }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/reading-time": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/reading-time/-/reading-time-1.5.0.tgz", + "integrity": "sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg==" + }, + "node_modules/rehype-autolink-headings": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/rehype-autolink-headings/-/rehype-autolink-headings-6.1.1.tgz", + "integrity": "sha512-NMYzZIsHM3sA14nC5rAFuUPIOfg+DFmf9EY1YMhaNlB7+3kK/ZlE6kqPfuxr1tsJ1XWkTrMtMoyHosU70d35mA==", + "dependencies": { + "@types/hast": "^2.0.0", + "extend": "^3.0.0", + "hast-util-has-property": "^2.0.0", + "hast-util-heading-rank": "^2.0.0", + "hast-util-is-element": "^2.0.0", + "unified": "^10.0.0", + "unist-util-visit": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/rehype-katex": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/rehype-katex/-/rehype-katex-6.0.3.tgz", + "integrity": "sha512-ByZlRwRUcWegNbF70CVRm2h/7xy7jQ3R9LaY4VVSvjnoVWwWVhNL60DiZsBpC5tSzYQOCvDbzncIpIjPZWodZA==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/katex": "^0.14.0", + "hast-util-from-html-isomorphic": "^1.0.0", + "hast-util-to-text": "^3.1.0", + "katex": "^0.16.0", + "unist-util-visit": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/rehype-mathjax": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/rehype-mathjax/-/rehype-mathjax-4.0.3.tgz", + "integrity": "sha512-QIwWH9U+r54nMQklVkT1qluxhKyzdPWz9dFwgel3BrseQsWZafRTDTUj8VR8/14nFuRIV2ChuCMz4zpACPoYvg==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/mathjax": "^0.0.37", + "hast-util-from-dom": "^4.0.0", + "hast-util-to-text": "^3.1.0", + "jsdom": "^20.0.0", + "mathjax-full": "^3.0.0", + "unified": "^10.0.0", + "unist-util-visit": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/rehype-pretty-code": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/rehype-pretty-code/-/rehype-pretty-code-0.10.0.tgz", + "integrity": "sha512-qCD071Y+vUxEy9yyrATPk2+W9q7qCbzZgtc9suZhu75bmRQvOlBhJt4d3WvqSMTamkKoFkvqtCjyAk+ggH+aXQ==", + "dependencies": { + "@types/hast": "^2.0.0", + "hash-obj": "^4.0.0", + "parse-numeric-range": "^1.3.0" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "shiki": "0.x" + } + }, + "node_modules/rehype-raw": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/rehype-raw/-/rehype-raw-6.1.1.tgz", + "integrity": "sha512-d6AKtisSRtDRX4aSPsJGTfnzrX2ZkHQLE5kiUuGOeEoLpbEulFF4hj0mLPbsa+7vmguDKOVVEQdHKDSwoaIDsQ==", + "dependencies": { + "@types/hast": "^2.0.0", + "hast-util-raw": "^7.2.0", + "unified": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/rehype-slug": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/rehype-slug/-/rehype-slug-5.1.0.tgz", + "integrity": "sha512-Gf91dJoXneiorNEnn+Phx97CO7oRMrpi+6r155tTxzGuLtm+QrI4cTwCa9e1rtePdL4i9tSO58PeSS6HWfgsiw==", + "dependencies": { + "@types/hast": "^2.0.0", + "github-slugger": "^2.0.0", + "hast-util-has-property": "^2.0.0", + "hast-util-heading-rank": "^2.0.0", + "hast-util-to-string": "^2.0.0", + "unified": "^10.0.0", + "unist-util-visit": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/remark/-/remark-14.0.3.tgz", + "integrity": "sha512-bfmJW1dmR2LvaMJuAnE88pZP9DktIFYXazkTfOIKZzi3Knk9lT0roItIA24ydOucI3bV/g/tXBA6hzqq3FV9Ew==", + "dependencies": { + "@types/mdast": "^3.0.0", + "remark-parse": "^10.0.0", + "remark-stringify": "^10.0.0", + "unified": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-frontmatter": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-4.0.1.tgz", + "integrity": "sha512-38fJrB0KnmD3E33a5jZC/5+gGAC2WKNiPw1/fdXJvijBlhA7RCsvJklrYJakS0HedninvaCYW8lQGf9C918GfA==", + "dependencies": { + "@types/mdast": "^3.0.0", + "mdast-util-frontmatter": "^1.0.0", + "micromark-extension-frontmatter": "^1.0.0", + "unified": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-gfm": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-3.0.1.tgz", + "integrity": "sha512-lEFDoi2PICJyNrACFOfDD3JlLkuSbOa5Wd8EPt06HUdptv8Gn0bxYTdbU/XXQ3swAPkEaGxxPN9cbnMHvVu1Ig==", + "dependencies": { + "@types/mdast": "^3.0.0", + "mdast-util-gfm": "^2.0.0", + "micromark-extension-gfm": "^2.0.0", + "unified": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-math": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/remark-math/-/remark-math-5.1.1.tgz", + "integrity": "sha512-cE5T2R/xLVtfFI4cCePtiRn+e6jKMtFDR3P8V3qpv8wpKjwvHoBA4eJzvX+nVrnlNy0911bdGmuspCSwetfYHw==", + "dependencies": { + "@types/mdast": "^3.0.0", + "mdast-util-math": "^2.0.0", + "micromark-extension-math": "^2.0.0", + "unified": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-parse": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-10.0.2.tgz", + "integrity": "sha512-3ydxgHa/ZQzG8LvC7jTXccARYDcRld3VfcgIIFs7bI6vbRSxJJmzgLEIIoYKyrfhaY+ujuWaf/PJiMZXoiCXgw==", + "dependencies": { + "@types/mdast": "^3.0.0", + "mdast-util-from-markdown": "^1.0.0", + "unified": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-rehype": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-10.1.0.tgz", + "integrity": "sha512-EFmR5zppdBp0WQeDVZ/b66CWJipB2q2VLNFMabzDSGR66Z2fQii83G5gTBbgGEnEEA0QRussvrFHxk1HWGJskw==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/mdast": "^3.0.0", + "mdast-util-to-hast": "^12.1.0", + "unified": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-smartypants": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-smartypants/-/remark-smartypants-2.0.0.tgz", + "integrity": "sha512-Rc0VDmr/yhnMQIz8n2ACYXlfw/P/XZev884QU1I5u+5DgJls32o97Vc1RbK3pfumLsJomS2yy8eT4Fxj/2MDVA==", + "dependencies": { + "retext": "^8.1.0", + "retext-smartypants": "^5.1.0", + "unist-util-visit": "^4.1.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/remark-stringify": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-10.0.3.tgz", + "integrity": "sha512-koyOzCMYoUHudypbj4XpnAKFbkddRMYZHwghnxd7ue5210WzGw6kOBwauJTRUMq16jsovXx8dYNvSSWP89kZ3A==", + "dependencies": { + "@types/mdast": "^3.0.0", + "mdast-util-to-markdown": "^1.0.0", + "unified": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" + }, + "node_modules/resolve": { + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", + "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "dependencies": { + "is-core-module": "^2.11.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/retext": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/retext/-/retext-8.1.0.tgz", + "integrity": "sha512-N9/Kq7YTn6ZpzfiGW45WfEGJqFf1IM1q8OsRa1CGzIebCJBNCANDRmOrholiDRGKo/We7ofKR4SEvcGAWEMD3Q==", + "dependencies": { + "@types/nlcst": "^1.0.0", + "retext-latin": "^3.0.0", + "retext-stringify": "^3.0.0", + "unified": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/retext-latin": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/retext-latin/-/retext-latin-3.1.0.tgz", + "integrity": "sha512-5MrD1tuebzO8ppsja5eEu+ZbBeUNCjoEarn70tkXOS7Bdsdf6tNahsv2bY0Z8VooFF6cw7/6S+d3yI/TMlMVVQ==", + "dependencies": { + "@types/nlcst": "^1.0.0", + "parse-latin": "^5.0.0", + "unherit": "^3.0.0", + "unified": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/retext-smartypants": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/retext-smartypants/-/retext-smartypants-5.2.0.tgz", + "integrity": "sha512-Do8oM+SsjrbzT2UNIKgheP0hgUQTDDQYyZaIY3kfq0pdFzoPk+ZClYJ+OERNXveog4xf1pZL4PfRxNoVL7a/jw==", + "dependencies": { + "@types/nlcst": "^1.0.0", + "nlcst-to-string": "^3.0.0", + "unified": "^10.0.0", + "unist-util-visit": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/retext-stringify": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/retext-stringify/-/retext-stringify-3.1.0.tgz", + "integrity": "sha512-767TLOaoXFXyOnjx/EggXlb37ZD2u4P1n0GJqVdpipqACsQP+20W+BNpMYrlJkq7hxffnFk+jc6mAK9qrbuB8w==", + "dependencies": { + "@types/nlcst": "^1.0.0", + "nlcst-to-string": "^3.0.0", + "unified": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.1.tgz", + "integrity": "sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==", + "dependencies": { + "glob": "^10.2.5" + }, + "bin": { + "rimraf": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/robust-predicates": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz", + "integrity": "sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==" + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rw": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", + "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==" + }, + "node_modules/sade": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", + "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", + "dependencies": { + "mri": "^1.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/sass": { + "version": "1.63.6", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.63.6.tgz", + "integrity": "sha512-MJuxGMHzaOW7ipp+1KdELtqKbfAWbH7OLIdoSMnVe3EXPMTmxTmlaZDCTsgIpPCs3w99lLo9/zDKkOrJuT5byw==", + "dependencies": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/saxes": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", + "dependencies": { + "xmlchars": "^2.2.0" + }, + "engines": { + "node": ">=v12.22.7" + } + }, + "node_modules/section-matter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", + "integrity": "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==", + "dependencies": { + "extend-shallow": "^2.0.1", + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/serve-handler": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.5.tgz", + "integrity": "sha512-ijPFle6Hwe8zfmBxJdE+5fta53fdIY0lHISJvuikXB3VYFafRjMRpOffSPvCYsbKyBA7pvy9oYr/BT1O3EArlg==", + "dependencies": { + "bytes": "3.0.0", + "content-disposition": "0.5.2", + "fast-url-parser": "1.1.3", + "mime-types": "2.1.18", + "minimatch": "3.1.2", + "path-is-inside": "1.0.2", + "path-to-regexp": "2.2.1", + "range-parser": "1.2.0" + } + }, + "node_modules/serve-handler/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/serve-handler/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "engines": { + "node": ">=8" + } + }, + "node_modules/shiki": { + "version": "0.14.3", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.3.tgz", + "integrity": "sha512-U3S/a+b0KS+UkTyMjoNojvTgrBHjgp7L6ovhFVZsXmBGnVdQ4K4U9oK0z63w538S91ATngv1vXigHCSWOwnr+g==", + "peer": true, + "dependencies": { + "ansi-sequence-parser": "^1.1.0", + "jsonc-parser": "^3.2.0", + "vscode-oniguruma": "^1.7.0", + "vscode-textmate": "^8.0.0" + } + }, + "node_modules/signal-exit": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.0.2.tgz", + "integrity": "sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" + }, + "node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/sort-keys": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-5.0.0.tgz", + "integrity": "sha512-Pdz01AvCAottHTPQGzndktFNdbRA75BgOfeT1hH+AMnJFv8lynkPi42rfeEhpx1saTEI3YNMWxfqu0sFD1G8pw==", + "dependencies": { + "is-plain-obj": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/space-separated-tokens": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", + "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/speech-rule-engine": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/speech-rule-engine/-/speech-rule-engine-4.0.7.tgz", + "integrity": "sha512-sJrL3/wHzNwJRLBdf6CjJWIlxC04iYKkyXvYSVsWVOiC2DSkHmxsqOhEeMsBA9XK+CHuNcsdkbFDnoUfAsmp9g==", + "dependencies": { + "commander": "9.2.0", + "wicked-good-xpath": "1.3.0", + "xmldom-sre": "0.1.31" + }, + "bin": { + "sre": "bin/sre" + } + }, + "node_modules/speech-rule-engine/node_modules/commander": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.2.0.tgz", + "integrity": "sha512-e2i4wANQiSXgnrBlIatyHtP1odfUp0BbV5Y5nEGbxtIrStkEOAAzCUirvLBNXHLr7kwLvJl6V+4V3XV9x7Wd9w==", + "engines": { + "node": "^12.20.0 || >=14" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/stringify-entities": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.3.tgz", + "integrity": "sha512-BP9nNHMhhfcMbiuQKCqMjhDP5yBCAxsPu4pHFFzJ6Alo9dZgY4VLDPutXqIjpRiMoKdp7Av85Gr73Q5uH9k7+g==", + "dependencies": { + "character-entities-html4": "^2.0.0", + "character-entities-legacy": "^3.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", + "integrity": "sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/style-to-object": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.4.1.tgz", + "integrity": "sha512-HFpbb5gr2ypci7Qw+IOhnP2zOU7e77b+rzM+wTzXzfi1PrtBCX0E7Pk4wL4iTLnhzZ+JgEGAhX81ebTg/aYjQw==", + "dependencies": { + "inline-style-parser": "0.1.1" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/to-vfile": { + "version": "7.2.4", + "resolved": "https://registry.npmjs.org/to-vfile/-/to-vfile-7.2.4.tgz", + "integrity": "sha512-2eQ+rJ2qGbyw3senPI0qjuM7aut8IYXK6AEoOWb+fJx/mQYzviTckm1wDjq91QYHAPBTYzmdJXxMFA6Mk14mdw==", + "dependencies": { + "is-buffer": "^2.0.0", + "vfile": "^5.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/tough-cookie": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tough-cookie/node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/tr46": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", + "dependencies": { + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/tr46/node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/trim-lines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", + "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/trough": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/trough/-/trough-2.1.0.tgz", + "integrity": "sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/tsx": { + "version": "3.12.7", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-3.12.7.tgz", + "integrity": "sha512-C2Ip+jPmqKd1GWVQDvz/Eyc6QJbGfE7NrR3fx5BpEHMZsEHoIxHL1j+lKdGobr8ovEyqeNkPLSKp6SCSOt7gmw==", + "dev": true, + "dependencies": { + "@esbuild-kit/cjs-loader": "^2.4.2", + "@esbuild-kit/core-utils": "^3.0.0", + "@esbuild-kit/esm-loader": "^2.5.5" + }, + "bin": { + "tsx": "dist/cli.js" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/type-fest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", + "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/unherit": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/unherit/-/unherit-3.0.1.tgz", + "integrity": "sha512-akOOQ/Yln8a2sgcLj4U0Jmx0R5jpIg2IUyRrWOzmEbjBtGzBdHtSeFKgoEcoH4KYIG/Pb8GQ/BwtYm0GCq1Sqg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/unified": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", + "integrity": "sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==", + "dependencies": { + "@types/unist": "^2.0.0", + "bail": "^2.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-find-after": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/unist-util-find-after/-/unist-util-find-after-4.0.1.tgz", + "integrity": "sha512-QO/PuPMm2ERxC6vFXEPtmAutOopy5PknD+Oq64gGwxKtk4xwo9Z97t9Av1obPmGU0IyTa6EKYUfTrK2QJS3Ozw==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-generated": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-2.0.1.tgz", + "integrity": "sha512-qF72kLmPxAw0oN2fwpWIqbXAVyEqUzDHMsbtPvOudIlUzXYFIeQIuxXQCRCFh22B7cixvU0MG7m3MW8FTq/S+A==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-is": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", + "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-modify-children": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/unist-util-modify-children/-/unist-util-modify-children-3.1.1.tgz", + "integrity": "sha512-yXi4Lm+TG5VG+qvokP6tpnk+r1EPwyYL04JWDxLvgvPV40jANh7nm3udk65OOWquvbMDe+PL9+LmkxDpTv/7BA==", + "dependencies": { + "@types/unist": "^2.0.0", + "array-iterate": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-position": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-4.0.4.tgz", + "integrity": "sha512-kUBE91efOWfIVBo8xzh/uZQ7p9ffYRtUbMRZBNFYwf0RK8koUMx6dGUfwylLOKmaT2cs4wSW96QoYUSXAyEtpg==", + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-remove-position": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-4.0.2.tgz", + "integrity": "sha512-TkBb0HABNmxzAcfLf4qsIbFbaPDvMO6wa3b3j4VcEzFVaw1LBKwnW4/sRJ/atSLSzoIg41JWEdnE7N6DIhGDGQ==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-visit": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", + "integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0", + "unist-util-visit-parents": "^5.1.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit-children": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-children/-/unist-util-visit-children-2.0.2.tgz", + "integrity": "sha512-+LWpMFqyUwLGpsQxpumsQ9o9DG2VGLFrpz+rpVXYIEdPy57GSy5HioC0g3bg/8WP9oCLlapQtklOzQ8uLS496Q==", + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit-parents": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, + "node_modules/uvu": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/uvu/-/uvu-0.5.6.tgz", + "integrity": "sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==", + "dependencies": { + "dequal": "^2.0.0", + "diff": "^5.0.0", + "kleur": "^4.0.3", + "sade": "^1.7.3" + }, + "bin": { + "uvu": "bin.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/vfile": { + "version": "5.3.7", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", + "integrity": "sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==", + "dependencies": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^3.0.0", + "vfile-message": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-location": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-4.1.0.tgz", + "integrity": "sha512-YF23YMyASIIJXpktBa4vIGLJ5Gs88UB/XePgqPmTa7cDA+JeO3yclbpheQYCHjVHBn/yePzrXuygIL+xbvRYHw==", + "dependencies": { + "@types/unist": "^2.0.0", + "vfile": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.4.tgz", + "integrity": "sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vscode-oniguruma": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", + "peer": true + }, + "node_modules/vscode-textmate": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", + "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", + "peer": true + }, + "node_modules/w3c-xmlserializer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", + "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", + "dependencies": { + "xml-name-validator": "^4.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/web-namespaces": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz", + "integrity": "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-encoding": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", + "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-mimetype": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-url": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "dependencies": { + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wicked-good-xpath": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/wicked-good-xpath/-/wicked-good-xpath-1.3.0.tgz", + "integrity": "sha512-Gd9+TUn5nXdwj/hFsPVx5cuHHiF5Bwuc30jZ4+ronF1qHK5O7HD0sgmXWSEgwKquT3ClLoKPVbO6qGwVwLzvAw==" + }, + "node_modules/workerpool": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.4.0.tgz", + "integrity": "sha512-i3KR1mQMNwY2wx20ozq2EjISGtQWDIfV56We+yGJ5yDs8jTwQiLLaqHlkBHITlCuJnYlVRmXegxFxZg7gqI++A==" + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ws": { + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", + "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xml-name-validator": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", + "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", + "engines": { + "node": ">=12" + } + }, + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" + }, + "node_modules/xmldom-sre": { + "version": "0.1.31", + "resolved": "https://registry.npmjs.org/xmldom-sre/-/xmldom-sre-0.1.31.tgz", + "integrity": "sha512-f9s+fUkX04BxQf+7mMWAp5zk61pciie+fFLC9hX9UVvCeJQfNHRHXpeo5MPcR0EUf57PYLdt+ZO4f3Ipk2oZUw==", + "engines": { + "node": ">=0.1" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/zwitch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", + "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..7fb51275 --- /dev/null +++ b/package.json @@ -0,0 +1,105 @@ +{ + "name": "@jackyzha0/quartz", + "description": "🌱 publish your digital garden and notes as a website", + "private": true, + "version": "4.0.8", + "type": "module", + "author": "jackyzha0 ", + "license": "MIT", + "homepage": "https://quartz.jzhao.xyz", + "repository": { + "type": "git", + "url": "https://github.com/jackyzha0/quartz.git" + }, + "scripts": { + "check": "tsc --noEmit && npx prettier . --check", + "format": "npx prettier . --write", + "test": "tsx ./quartz/util/path.test.ts", + "profile": "0x -D prof ./quartz/bootstrap-cli.mjs build --concurrency=1" + }, + "engines": { + "node": ">=18.14" + }, + "keywords": [ + "site generator", + "ssg", + "digital-garden", + "markdown", + "blog", + "quartz" + ], + "bin": { + "quartz": "./quartz/bootstrap-cli.mjs" + }, + "dependencies": { + "@clack/prompts": "^0.6.3", + "@floating-ui/dom": "^1.4.0", + "@napi-rs/simple-git": "^0.1.8", + "async-mutex": "^0.4.0", + "chalk": "^4.1.2", + "chokidar": "^3.5.3", + "cli-spinner": "^0.2.10", + "d3": "^7.8.5", + "esbuild-sass-plugin": "^2.9.0", + "flexsearch": "0.7.21", + "github-slugger": "^2.0.0", + "globby": "^13.1.4", + "gray-matter": "^4.0.3", + "hast-util-to-html": "^8.0.4", + "hast-util-to-jsx-runtime": "^1.2.0", + "hast-util-to-string": "^2.0.0", + "is-absolute-url": "^4.0.1", + "js-yaml": "^4.1.0", + "lightningcss": "^1.21.5", + "mdast-util-find-and-replace": "^2.2.2", + "mdast-util-to-hast": "^12.3.0", + "mdast-util-to-string": "^3.2.0", + "micromorph": "^0.4.5", + "plausible-tracker": "^0.3.8", + "preact": "^10.14.1", + "preact-render-to-string": "^6.0.3", + "pretty-bytes": "^6.1.0", + "pretty-time": "^1.1.0", + "reading-time": "^1.5.0", + "rehype-autolink-headings": "^6.1.1", + "rehype-katex": "^6.0.3", + "rehype-mathjax": "^4.0.3", + "rehype-pretty-code": "^0.10.0", + "rehype-raw": "^6.1.1", + "rehype-slug": "^5.1.0", + "remark": "^14.0.2", + "remark-frontmatter": "^4.0.1", + "remark-gfm": "^3.0.1", + "remark-math": "^5.1.1", + "remark-parse": "^10.0.1", + "remark-rehype": "^10.1.0", + "remark-smartypants": "^2.0.0", + "rimraf": "^5.0.1", + "serve-handler": "^6.1.5", + "source-map-support": "^0.5.21", + "to-vfile": "^7.2.4", + "unified": "^10.1.2", + "unist-util-visit": "^4.1.2", + "vfile": "^5.3.7", + "workerpool": "^6.4.0", + "ws": "^8.13.0", + "yargs": "^17.7.2" + }, + "devDependencies": { + "@types/cli-spinner": "^0.2.1", + "@types/d3": "^7.4.0", + "@types/flexsearch": "^0.7.3", + "@types/hast": "^2.3.4", + "@types/js-yaml": "^4.0.5", + "@types/node": "^20.1.2", + "@types/pretty-time": "^1.1.2", + "@types/source-map-support": "^0.5.6", + "@types/workerpool": "^6.4.0", + "@types/ws": "^8.5.5", + "@types/yargs": "^17.0.24", + "esbuild": "^0.18.11", + "prettier": "^3.0.0", + "tsx": "^3.12.7", + "typescript": "^5.0.4" + } +} diff --git a/quartz.config.ts b/quartz.config.ts new file mode 100644 index 00000000..826e668a --- /dev/null +++ b/quartz.config.ts @@ -0,0 +1,75 @@ +import { QuartzConfig } from "./quartz/cfg" +import * as Plugin from "./quartz/plugins" + +const config: QuartzConfig = { + configuration: { + pageTitle: "Matsuura Tomoya Research Note", + enableSPA: true, + enablePopovers: true, + analytics: { + provider: "plausible", + }, + baseUrl: "garden.matsuuratomoya.com", + ignorePatterns: ["private", "templates"], + theme: { + typography: { + header: "Schibsted Grotesk", + body: "Source Sans Pro", + code: "IBM Plex Mono", + }, + colors: { + lightMode: { + light: "#faf8f8", + lightgray: "#e5e5e5", + gray: "#b8b8b8", + darkgray: "#4e4e4e", + dark: "#2b2b2b", + secondary: "#284b63", + tertiary: "#84a59d", + highlight: "rgba(143, 159, 169, 0.15)", + }, + darkMode: { + light: "#161618", + lightgray: "#393639", + gray: "#646464", + darkgray: "#d4d4d4", + dark: "#ebebec", + secondary: "#7b97aa", + tertiary: "#84a59d", + highlight: "rgba(143, 159, 169, 0.15)", + }, + }, + }, + }, + plugins: { + transformers: [ + Plugin.FrontMatter(), + Plugin.TableOfContents(), + Plugin.CreatedModifiedDate({ + priority: ["frontmatter", "filesystem"], // you can add 'git' here for last modified from Git but this makes the build slower + }), + Plugin.SyntaxHighlighting(), + Plugin.ObsidianFlavoredMarkdown({ enableInHtmlEmbed: false }), + Plugin.GitHubFlavoredMarkdown(), + Plugin.CrawlLinks({ markdownLinkResolution: "shortest" }), + Plugin.Latex({ renderEngine: "katex" }), + Plugin.Description(), + ], + filters: [Plugin.RemoveDrafts()], + emitters: [ + Plugin.AliasRedirects(), + Plugin.ComponentResources({ fontOrigin: "googleFonts" }), + Plugin.ContentPage(), + Plugin.FolderPage(), + Plugin.TagPage(), + Plugin.ContentIndex({ + enableSiteMap: true, + enableRSS: true, + }), + Plugin.Assets(), + Plugin.Static(), + ], + }, +} + +export default config diff --git a/quartz.layout.ts b/quartz.layout.ts new file mode 100644 index 00000000..6b593321 --- /dev/null +++ b/quartz.layout.ts @@ -0,0 +1,41 @@ +import { PageLayout, SharedLayout } from "./quartz/cfg" +import * as Component from "./quartz/components" + +// components shared across all pages +export const sharedPageComponents: SharedLayout = { + head: Component.Head(), + header: [], + footer: Component.Footer({ + links: { + "Top": "https://matsuuratomoya.com", + "Mastodon": "https://social.matsuuratomoya.com/@tomoya", + "Twitter": "https://twitter.com/tomoya_nonymous", + "GitHub": "https://github.com/tomoyanonymous", + }, + }), +} + +// components for pages that display a single page (e.g. a single note) +export const defaultContentPageLayout: PageLayout = { + beforeBody: [Component.ArticleTitle(), Component.ContentMeta(), Component.TagList()], + left: [ + Component.PageTitle(), + Component.MobileOnly(Component.Spacer()), + Component.Search(), + Component.Darkmode(), + Component.DesktopOnly(Component.TableOfContents()), + ], + right: [Component.Graph(), Component.Backlinks()], +} + +// components for pages that display lists of pages (e.g. tags or folders) +export const defaultListPageLayout: PageLayout = { + beforeBody: [Component.ArticleTitle()], + left: [ + Component.PageTitle(), + Component.MobileOnly(Component.Spacer()), + Component.Search(), + Component.Darkmode(), + ], + right: [], +} diff --git a/quartz/bootstrap-cli.mjs b/quartz/bootstrap-cli.mjs new file mode 100755 index 00000000..616f2ef7 --- /dev/null +++ b/quartz/bootstrap-cli.mjs @@ -0,0 +1,540 @@ +#!/usr/bin/env node +import { promises, readFileSync } from "fs" +import yargs from "yargs" +import path from "path" +import { hideBin } from "yargs/helpers" +import esbuild from "esbuild" +import chalk from "chalk" +import { sassPlugin } from "esbuild-sass-plugin" +import fs from "fs" +import { intro, isCancel, outro, select, text } from "@clack/prompts" +import { rimraf } from "rimraf" +import chokidar from "chokidar" +import prettyBytes from "pretty-bytes" +import { execSync, spawnSync } from "child_process" +import http from "http" +import serveHandler from "serve-handler" +import { WebSocketServer } from "ws" +import { randomUUID } from "crypto" +import { Mutex } from "async-mutex" + +const ORIGIN_NAME = "origin" +const UPSTREAM_NAME = "upstream" +const QUARTZ_SOURCE_BRANCH = "v4" +const cwd = process.cwd() +const cacheDir = path.join(cwd, ".quartz-cache") +const cacheFile = "./.quartz-cache/transpiled-build.mjs" +const fp = "./quartz/build.ts" +const { version } = JSON.parse(readFileSync("./package.json").toString()) +const contentCacheFolder = path.join(cacheDir, "content-cache") + +const CommonArgv = { + directory: { + string: true, + alias: ["d"], + default: "content", + describe: "directory to look for content files", + }, + verbose: { + boolean: true, + alias: ["v"], + default: false, + describe: "print out extra logging information", + }, +} + +const SyncArgv = { + ...CommonArgv, + commit: { + boolean: true, + default: true, + describe: "create a git commit for your unsaved changes", + }, + push: { + boolean: true, + default: true, + describe: "push updates to your Quartz fork", + }, + pull: { + boolean: true, + default: true, + describe: "pull updates from your Quartz fork", + }, +} + +const BuildArgv = { + ...CommonArgv, + output: { + string: true, + alias: ["o"], + default: "public", + describe: "output folder for files", + }, + serve: { + boolean: true, + default: false, + describe: "run a local server to live-preview your Quartz", + }, + baseDir: { + string: true, + default: "", + describe: "base path to serve your local server on", + }, + port: { + number: true, + default: 8080, + describe: "port to serve Quartz on", + }, + bundleInfo: { + boolean: true, + default: false, + describe: "show detailed bundle information", + }, + concurrency: { + number: true, + describe: "how many threads to use to parse notes", + }, +} + +function escapePath(fp) { + return fp + .replace(/\\ /g, " ") // unescape spaces + .replace(/^".*"$/, "$1") + .replace(/^'.*"$/, "$1") + .trim() +} + +function exitIfCancel(val) { + if (isCancel(val)) { + outro(chalk.red("Exiting")) + process.exit(0) + } else { + return val + } +} + +async function stashContentFolder(contentFolder) { + await fs.promises.rm(contentCacheFolder, { force: true, recursive: true }) + await fs.promises.cp(contentFolder, contentCacheFolder, { + force: true, + recursive: true, + verbatimSymlinks: true, + preserveTimestamps: true, + }) + await fs.promises.rm(contentFolder, { force: true, recursive: true }) +} + +async function popContentFolder(contentFolder) { + await fs.promises.rm(contentFolder, { force: true, recursive: true }) + await fs.promises.cp(contentCacheFolder, contentFolder, { + force: true, + recursive: true, + verbatimSymlinks: true, + preserveTimestamps: true, + }) + await fs.promises.rm(contentCacheFolder, { force: true, recursive: true }) +} + +function gitPull(origin, branch) { + const flags = ["--no-rebase", "--autostash", "-s", "recursive", "-X", "ours", "--no-edit"] + const out = spawnSync("git", ["pull", ...flags, origin, branch], { stdio: "inherit" }) + if (out.stderr) { + throw new Error(`Error while pulling updates: ${out.stderr}`) + } +} + +yargs(hideBin(process.argv)) + .scriptName("quartz") + .version(version) + .usage("$0 [args]") + .command("create", "Initialize Quartz", CommonArgv, async (argv) => { + console.log() + intro(chalk.bgGreen.black(` Quartz v${version} `)) + const contentFolder = path.join(cwd, argv.directory) + const setupStrategy = exitIfCancel( + await select({ + message: `Choose how to initialize the content in \`${contentFolder}\``, + options: [ + { value: "new", label: "Empty Quartz" }, + { value: "copy", label: "Copy an existing folder", hint: "overwrites `content`" }, + { + value: "symlink", + label: "Symlink an existing folder", + hint: "don't select this unless you know what you are doing!", + }, + { value: "keep", label: "Keep the existing files" }, + ], + }), + ) + + async function rmContentFolder() { + const contentStat = await fs.promises.lstat(contentFolder) + if (contentStat.isSymbolicLink()) { + await fs.promises.unlink(contentFolder) + } else { + await rimraf(contentFolder) + } + } + + if (setupStrategy === "copy" || setupStrategy === "symlink") { + const originalFolder = escapePath( + exitIfCancel( + await text({ + message: "Enter the full path to existing content folder", + placeholder: + "On most terminal emulators, you can drag and drop a folder into the window and it will paste the full path", + validate(fp) { + const fullPath = escapePath(fp) + if (!fs.existsSync(fullPath)) { + return "The given path doesn't exist" + } else if (!fs.lstatSync(fullPath).isDirectory()) { + return "The given path is not a folder" + } + }, + }), + ), + ) + + await rmContentFolder() + if (setupStrategy === "copy") { + await fs.promises.cp(originalFolder, contentFolder, { + recursive: true, + preserveTimestamps: true, + }) + } else if (setupStrategy === "symlink") { + await fs.promises.symlink(originalFolder, contentFolder, "dir") + } + } else if (setupStrategy === "new") { + await rmContentFolder() + await fs.promises.mkdir(contentFolder) + await fs.promises.writeFile( + path.join(contentFolder, "index.md"), + `--- +title: Welcome to Quartz +--- + +This is a blank Quartz installation. +See the [documentation](https://quartz.jzhao.xyz) for how to get started. +`, + ) + } + + // get a prefered link resolution strategy + const linkResolutionStrategy = exitIfCancel( + await select({ + message: `Choose how Quartz should resolve links in your content. You can change this later in \`quartz.config.ts\`.`, + options: [ + { + value: "absolute", + label: "Treat links as absolute path", + hint: "for content made for Quartz 3 and Hugo", + }, + { + value: "shortest", + label: "Treat links as shortest path", + hint: "for most Obsidian vaults", + }, + { + value: "relative", + label: "Treat links as relative paths", + hint: "for just normal Markdown files", + }, + ], + }), + ) + + // now, do config changes + const configFilePath = path.join(cwd, "quartz.config.ts") + let configContent = await fs.promises.readFile(configFilePath, { encoding: "utf-8" }) + configContent = configContent.replace( + /markdownLinkResolution: '(.+)'/, + `markdownLinkResolution: '${linkResolutionStrategy}'`, + ) + await fs.promises.writeFile(configFilePath, configContent) + + outro(`You're all set! Not sure what to do next? Try: + • Customizing Quartz a bit more by editing \`quartz.config.ts\` + • Running \`npx quartz build --serve\` to preview your Quartz locally + • Hosting your Quartz online (see: https://quartz.jzhao.xyz/setup/hosting) +`) + }) + .command("update", "Get the latest Quartz updates", CommonArgv, async (argv) => { + const contentFolder = path.join(cwd, argv.directory) + console.log(chalk.bgGreen.black(`\n Quartz v${version} \n`)) + console.log("Backing up your content") + execSync( + `git remote show upstream || git remote add upstream https://github.com/jackyzha0/quartz.git`, + ) + await stashContentFolder(contentFolder) + console.log( + "Pulling updates... you may need to resolve some `git` conflicts if you've made changes to components or plugins.", + ) + gitPull(UPSTREAM_NAME, QUARTZ_SOURCE_BRANCH) + await popContentFolder(contentFolder) + console.log("Ensuring dependencies are up to date") + spawnSync("npm", ["i"], { stdio: "inherit" }) + console.log(chalk.green("Done!")) + }) + .command( + "restore", + "Try to restore your content folder from the cache", + CommonArgv, + async (argv) => { + const contentFolder = path.join(cwd, argv.directory) + await popContentFolder(contentFolder) + }, + ) + .command("sync", "Sync your Quartz to and from GitHub.", SyncArgv, async (argv) => { + const contentFolder = path.join(cwd, argv.directory) + console.log(chalk.bgGreen.black(`\n Quartz v${version} \n`)) + console.log("Backing up your content") + + if (argv.commit) { + const contentStat = await fs.promises.lstat(contentFolder) + if (contentStat.isSymbolicLink()) { + const linkTarg = await fs.promises.readlink(contentFolder) + console.log(chalk.yellow("Detected symlink, trying to dereference before committing")) + + // stash symlink file + await stashContentFolder(contentFolder) + + // follow symlink and copy content + await fs.promises.cp(linkTarg, contentFolder, { + recursive: true, + preserveTimestamps: true, + }) + } + + const currentTimestamp = new Date().toLocaleString("en-US", { + dateStyle: "medium", + timeStyle: "short", + }) + spawnSync("git", ["add", "."], { stdio: "inherit" }) + spawnSync("git", ["commit", "-m", `Quartz sync: ${currentTimestamp}`], { stdio: "inherit" }) + + if (contentStat.isSymbolicLink()) { + // put symlink back + await popContentFolder(contentFolder) + } + } + + await stashContentFolder(contentFolder) + + if (argv.pull) { + console.log( + "Pulling updates from your repository. You may need to resolve some `git` conflicts if you've made changes to components or plugins.", + ) + gitPull(ORIGIN_NAME, QUARTZ_SOURCE_BRANCH) + } + + await popContentFolder(contentFolder) + if (argv.push) { + console.log("Pushing your changes") + spawnSync("git", ["push", "-f", ORIGIN_NAME, QUARTZ_SOURCE_BRANCH], { stdio: "inherit" }) + } + + console.log(chalk.green("Done!")) + }) + .command("build", "Build Quartz into a bundle of static HTML files", BuildArgv, async (argv) => { + console.log(chalk.bgGreen.black(`\n Quartz v${version} \n`)) + const ctx = await esbuild.context({ + entryPoints: [fp], + outfile: path.join("quartz", cacheFile), + bundle: true, + keepNames: true, + minifyWhitespace: true, + minifySyntax: true, + platform: "node", + format: "esm", + jsx: "automatic", + jsxImportSource: "preact", + packages: "external", + metafile: true, + sourcemap: true, + sourcesContent: false, + plugins: [ + sassPlugin({ + type: "css-text", + cssImports: true, + }), + { + name: "inline-script-loader", + setup(build) { + build.onLoad({ filter: /\.inline\.(ts|js)$/ }, async (args) => { + let text = await promises.readFile(args.path, "utf8") + + // remove default exports that we manually inserted + text = text.replace("export default", "") + text = text.replace("export", "") + + const sourcefile = path.relative(path.resolve("."), args.path) + const resolveDir = path.dirname(sourcefile) + const transpiled = await esbuild.build({ + stdin: { + contents: text, + loader: "ts", + resolveDir, + sourcefile, + }, + write: false, + bundle: true, + platform: "browser", + format: "esm", + }) + const rawMod = transpiled.outputFiles[0].text + return { + contents: rawMod, + loader: "text", + } + }) + }, + }, + ], + }) + + const buildMutex = new Mutex() + const timeoutIds = new Set() + const build = async (clientRefresh) => { + await buildMutex.acquire() + const result = await ctx.rebuild().catch((err) => { + console.error(`${chalk.red("Couldn't parse Quartz configuration:")} ${fp}`) + console.log(`Reason: ${chalk.grey(err)}`) + process.exit(1) + }) + + if (argv.bundleInfo) { + const outputFileName = "quartz/.quartz-cache/transpiled-build.mjs" + const meta = result.metafile.outputs[outputFileName] + console.log( + `Successfully transpiled ${Object.keys(meta.inputs).length} files (${prettyBytes( + meta.bytes, + )})`, + ) + console.log(await esbuild.analyzeMetafile(result.metafile, { color: true })) + } + + // bypass module cache + // https://github.com/nodejs/modules/issues/307 + const { default: buildQuartz } = await import(cacheFile + `?update=${randomUUID()}`) + await buildQuartz(argv, clientRefresh) + clientRefresh() + buildMutex.release() + } + + const rebuild = (clientRefresh) => { + timeoutIds.forEach((id) => clearTimeout(id)) + timeoutIds.clear() + timeoutIds.add(setTimeout(() => build(clientRefresh), 250)) + } + + if (argv.serve) { + const connections = [] + const clientRefresh = () => connections.forEach((conn) => conn.send("rebuild")) + + if (argv.baseDir !== "" && !argv.baseDir.startsWith("/")) { + argv.baseDir = "/" + argv.baseDir + } + + await build(clientRefresh) + const server = http.createServer(async (req, res) => { + if (argv.baseDir && !req.url?.startsWith(argv.baseDir)) { + console.log( + chalk.red( + `[404] ${req.url} (warning: link outside of site, this is likely a Quartz bug)`, + ), + ) + res.writeHead(404) + res.end() + return + } + + // strip baseDir prefix + req.url = req.url?.slice(argv.baseDir.length) + + const serve = async () => { + await serveHandler(req, res, { + public: argv.output, + directoryListing: false, + }) + const status = res.statusCode + const statusString = + status >= 200 && status < 300 ? chalk.green(`[${status}]`) : chalk.red(`[${status}]`) + console.log(statusString + chalk.grey(` ${argv.baseDir}${req.url}`)) + } + + const redirect = (newFp) => { + newFp = argv.baseDir + newFp + res.writeHead(302, { + Location: newFp, + }) + console.log(chalk.yellow("[302]") + chalk.grey(` ${argv.baseDir}${req.url} -> ${newFp}`)) + res.end() + } + + let fp = req.url?.split("?")[0] ?? "/" + + // handle redirects + if (fp.endsWith("/")) { + // /trailing/ + // does /trailing/index.html exist? if so, serve it + const indexFp = path.posix.join(fp, "index.html") + if (fs.existsSync(path.posix.join(argv.output, indexFp))) { + req.url = fp + return serve() + } + + // does /trailing.html exist? if so, redirect to /trailing + let base = fp.slice(0, -1) + if (path.extname(base) === "") { + base += ".html" + } + if (fs.existsSync(path.posix.join(argv.output, base))) { + return redirect(fp.slice(0, -1)) + } + } else { + // /regular + // does /regular.html exist? if so, serve it + let base = fp + if (path.extname(base) === "") { + base += ".html" + } + if (fs.existsSync(path.posix.join(argv.output, base))) { + req.url = fp + return serve() + } + + // does /regular/index.html exist? if so, redirect to /regular/ + let indexFp = path.posix.join(fp, "index.html") + if (fs.existsSync(path.posix.join(argv.output, indexFp))) { + return redirect(fp + "/") + } + } + + return serve() + }) + server.listen(argv.port) + const wss = new WebSocketServer({ port: 3001 }) + wss.on("connection", (ws) => connections.push(ws)) + console.log( + chalk.cyan( + `Started a Quartz server listening at http://localhost:${argv.port}${argv.baseDir}`, + ), + ) + console.log("hint: exit with ctrl+c") + chokidar + .watch(["**/*.ts", "**/*.tsx", "**/*.scss", "package.json"], { + ignoreInitial: true, + }) + .on("all", async () => { + console.log(chalk.yellow("Detected a source code change, doing a hard rebuild...")) + rebuild(clientRefresh) + }) + } else { + await build(() => {}) + ctx.dispose() + } + }) + .showHelpOnFail(false) + .help() + .strict() + .demandCommand().argv diff --git a/quartz/bootstrap-worker.mjs b/quartz/bootstrap-worker.mjs new file mode 100644 index 00000000..b08689c3 --- /dev/null +++ b/quartz/bootstrap-worker.mjs @@ -0,0 +1,7 @@ +#!/usr/bin/env node +import workerpool from "workerpool" +const cacheFile = "./.quartz-cache/transpiled-worker.mjs" +const { parseFiles } = await import(cacheFile) +workerpool.worker({ + parseFiles, +}) diff --git a/quartz/build.ts b/quartz/build.ts new file mode 100644 index 00000000..78437f8a --- /dev/null +++ b/quartz/build.ts @@ -0,0 +1,172 @@ +import sourceMapSupport from "source-map-support" +sourceMapSupport.install(options) +import path from "path" +import { PerfTimer } from "./util/perf" +import { rimraf } from "rimraf" +import { isGitIgnored } from "globby" +import chalk from "chalk" +import { parseMarkdown } from "./processors/parse" +import { filterContent } from "./processors/filter" +import { emitContent } from "./processors/emit" +import cfg from "../quartz.config" +import { FilePath, joinSegments, slugifyFilePath } from "./util/path" +import chokidar from "chokidar" +import { ProcessedContent } from "./plugins/vfile" +import { Argv, BuildCtx } from "./util/ctx" +import { glob, toPosixPath } from "./util/glob" +import { trace } from "./util/trace" +import { options } from "./util/sourcemap" +import { Mutex } from "async-mutex" + +async function buildQuartz(argv: Argv, clientRefresh: () => void) { + const ctx: BuildCtx = { + argv, + cfg, + allSlugs: [], + } + + const perf = new PerfTimer() + const output = argv.output + + const pluginCount = Object.values(cfg.plugins).flat().length + const pluginNames = (key: "transformers" | "filters" | "emitters") => + cfg.plugins[key].map((plugin) => plugin.name) + if (argv.verbose) { + console.log(`Loaded ${pluginCount} plugins`) + console.log(` Transformers: ${pluginNames("transformers").join(", ")}`) + console.log(` Filters: ${pluginNames("filters").join(", ")}`) + console.log(` Emitters: ${pluginNames("emitters").join(", ")}`) + } + + perf.addEvent("clean") + await rimraf(output) + console.log(`Cleaned output directory \`${output}\` in ${perf.timeSince("clean")}`) + + perf.addEvent("glob") + const allFiles = await glob("**/*.*", argv.directory, cfg.configuration.ignorePatterns) + const fps = allFiles.filter((fp) => fp.endsWith(".md")) + console.log( + `Found ${fps.length} input files from \`${argv.directory}\` in ${perf.timeSince("glob")}`, + ) + + const filePaths = fps.map((fp) => joinSegments(argv.directory, fp) as FilePath) + ctx.allSlugs = allFiles.map((fp) => slugifyFilePath(fp as FilePath)) + + const parsedFiles = await parseMarkdown(ctx, filePaths) + const filteredContent = filterContent(ctx, parsedFiles) + await emitContent(ctx, filteredContent) + console.log(chalk.green(`Done processing ${fps.length} files in ${perf.timeSince()}`)) + + if (argv.serve) { + return startServing(ctx, parsedFiles, clientRefresh) + } +} + +// setup watcher for rebuilds +async function startServing( + ctx: BuildCtx, + initialContent: ProcessedContent[], + clientRefresh: () => void, +) { + const { argv } = ctx + + const ignored = await isGitIgnored() + const contentMap = new Map() + for (const content of initialContent) { + const [_tree, vfile] = content + contentMap.set(vfile.data.filePath!, content) + } + + const initialSlugs = ctx.allSlugs + const buildMutex = new Mutex() + const timeoutIds: Set> = new Set() + const toRebuild: Set = new Set() + const toRemove: Set = new Set() + const trackedAssets: Set = new Set() + async function rebuild(fp: string, action: "add" | "change" | "delete") { + // don't do anything for gitignored files + if (ignored(fp)) { + return + } + + // dont bother rebuilding for non-content files, just track and refresh + fp = toPosixPath(fp) + const filePath = joinSegments(argv.directory, fp) as FilePath + if (path.extname(fp) !== ".md") { + if (action === "add" || action === "change") { + trackedAssets.add(filePath) + } else if (action === "delete") { + trackedAssets.delete(filePath) + } + clientRefresh() + return + } + + if (action === "add" || action === "change") { + toRebuild.add(filePath) + } else if (action === "delete") { + toRemove.add(filePath) + } + + timeoutIds.forEach((id) => clearTimeout(id)) + + // debounce rebuilds every 250ms + timeoutIds.add( + setTimeout(async () => { + await buildMutex.acquire() + const perf = new PerfTimer() + console.log(chalk.yellow("Detected change, rebuilding...")) + try { + const filesToRebuild = [...toRebuild].filter((fp) => !toRemove.has(fp)) + + const trackedSlugs = [...new Set([...contentMap.keys(), ...toRebuild, ...trackedAssets])] + .filter((fp) => !toRemove.has(fp)) + .map((fp) => slugifyFilePath(path.posix.relative(argv.directory, fp) as FilePath)) + + ctx.allSlugs = [...new Set([...initialSlugs, ...trackedSlugs])] + const parsedContent = await parseMarkdown(ctx, filesToRebuild) + for (const content of parsedContent) { + const [_tree, vfile] = content + contentMap.set(vfile.data.filePath!, content) + } + + for (const fp of toRemove) { + contentMap.delete(fp) + } + + await rimraf(argv.output) + const parsedFiles = [...contentMap.values()] + const filteredContent = filterContent(ctx, parsedFiles) + await emitContent(ctx, filteredContent) + console.log(chalk.green(`Done rebuilding in ${perf.timeSince()}`)) + } catch { + console.log(chalk.yellow(`Rebuild failed. Waiting on a change to fix the error...`)) + } + + clientRefresh() + toRebuild.clear() + toRemove.clear() + buildMutex.release() + }, 250), + ) + } + + const watcher = chokidar.watch(".", { + persistent: true, + cwd: argv.directory, + ignoreInitial: true, + }) + + watcher + .on("add", (fp) => rebuild(fp, "add")) + .on("change", (fp) => rebuild(fp, "change")) + .on("unlink", (fp) => rebuild(fp, "delete")) +} + +export default async (argv: Argv, clientRefresh: () => void) => { + try { + return await buildQuartz(argv, clientRefresh) + } catch (err) { + trace("\nExiting Quartz due to a fatal error", err as Error) + } +} diff --git a/quartz/cfg.ts b/quartz/cfg.ts new file mode 100644 index 00000000..e3fee360 --- /dev/null +++ b/quartz/cfg.ts @@ -0,0 +1,48 @@ +import { QuartzComponent } from "./components/types" +import { PluginTypes } from "./plugins/types" +import { Theme } from "./util/theme" + +export type Analytics = + | null + | { + provider: "plausible" + } + | { + provider: "google" + tagId: string + } + +export interface GlobalConfiguration { + pageTitle: string + /** Whether to enable single-page-app style rendering. this prevents flashes of unstyled content and improves smoothness of Quartz */ + enableSPA: boolean + /** Whether to display Wikipedia-style popovers when hovering over links */ + enablePopovers: boolean + /** Analytics mode */ + analytics: Analytics + /** Glob patterns to not search */ + ignorePatterns: string[] + /** Base URL to use for CNAME files, sitemaps, and RSS feeds that require an absolute URL. + * Quartz will avoid using this as much as possible and use relative URLs most of the time + */ + baseUrl?: string + theme: Theme +} + +export interface QuartzConfig { + configuration: GlobalConfiguration + plugins: PluginTypes +} + +export interface FullPageLayout { + head: QuartzComponent + header: QuartzComponent[] + beforeBody: QuartzComponent[] + pageBody: QuartzComponent + left: QuartzComponent[] + right: QuartzComponent[] + footer: QuartzComponent +} + +export type PageLayout = Pick +export type SharedLayout = Pick diff --git a/quartz/components/ArticleTitle.tsx b/quartz/components/ArticleTitle.tsx new file mode 100644 index 00000000..b8d58c6b --- /dev/null +++ b/quartz/components/ArticleTitle.tsx @@ -0,0 +1,17 @@ +import { QuartzComponentConstructor, QuartzComponentProps } from "./types" + +function ArticleTitle({ fileData }: QuartzComponentProps) { + const title = fileData.frontmatter?.title + if (title) { + return

{title}

+ } else { + return null + } +} +ArticleTitle.css = ` +.article-title { + margin: 2rem 0 0 0; +} +` + +export default (() => ArticleTitle) satisfies QuartzComponentConstructor diff --git a/quartz/components/Backlinks.tsx b/quartz/components/Backlinks.tsx new file mode 100644 index 00000000..e88966b1 --- /dev/null +++ b/quartz/components/Backlinks.tsx @@ -0,0 +1,29 @@ +import { QuartzComponentConstructor, QuartzComponentProps } from "./types" +import style from "./styles/backlinks.scss" +import { resolveRelative, simplifySlug } from "../util/path" + +function Backlinks({ fileData, allFiles }: QuartzComponentProps) { + const slug = simplifySlug(fileData.slug!) + const backlinkFiles = allFiles.filter((file) => file.links?.includes(slug)) + return ( + + ) +} + +Backlinks.css = style +export default (() => Backlinks) satisfies QuartzComponentConstructor diff --git a/quartz/components/Body.tsx b/quartz/components/Body.tsx new file mode 100644 index 00000000..fbb85729 --- /dev/null +++ b/quartz/components/Body.tsx @@ -0,0 +1,13 @@ +// @ts-ignore +import clipboardScript from "./scripts/clipboard.inline" +import clipboardStyle from "./styles/clipboard.scss" +import { QuartzComponentConstructor, QuartzComponentProps } from "./types" + +function Body({ children }: QuartzComponentProps) { + return
{children}
+} + +Body.afterDOMLoaded = clipboardScript +Body.css = clipboardStyle + +export default (() => Body) satisfies QuartzComponentConstructor diff --git a/quartz/components/ContentMeta.tsx b/quartz/components/ContentMeta.tsx new file mode 100644 index 00000000..715c0f46 --- /dev/null +++ b/quartz/components/ContentMeta.tsx @@ -0,0 +1,29 @@ +import { formatDate } from "./Date" +import { QuartzComponentConstructor, QuartzComponentProps } from "./types" +import readingTime from "reading-time" + +export default (() => { + function ContentMetadata({ fileData }: QuartzComponentProps) { + const text = fileData.text + if (text) { + const segments: string[] = [] + const { text: timeTaken, words: _words } = readingTime(text) + if (fileData.dates?.modified) { + segments.push(formatDate(fileData.dates.modified)) + } + + segments.push(timeTaken) + return + } else { + return null + } + } + + ContentMetadata.css = ` + .content-meta { + margin-top: 0; + color: var(--gray); + } + ` + return ContentMetadata +}) satisfies QuartzComponentConstructor diff --git a/quartz/components/Darkmode.tsx b/quartz/components/Darkmode.tsx new file mode 100644 index 00000000..afbf2bd9 --- /dev/null +++ b/quartz/components/Darkmode.tsx @@ -0,0 +1,51 @@ +// @ts-ignore: this is safe, we don't want to actually make darkmode.inline.ts a module as +// modules are automatically deferred and we don't want that to happen for critical beforeDOMLoads +// see: https://v8.dev/features/modules#defer +import darkmodeScript from "./scripts/darkmode.inline" +import styles from "./styles/darkmode.scss" +import { QuartzComponentConstructor } from "./types" + +function Darkmode() { + return ( +
+ + + +
+ ) +} + +Darkmode.beforeDOMLoaded = darkmodeScript +Darkmode.css = styles + +export default (() => Darkmode) satisfies QuartzComponentConstructor diff --git a/quartz/components/Date.tsx b/quartz/components/Date.tsx new file mode 100644 index 00000000..f4b284af --- /dev/null +++ b/quartz/components/Date.tsx @@ -0,0 +1,15 @@ +interface Props { + date: Date +} + +export function formatDate(d: Date): string { + return d.toLocaleDateString("en-US", { + year: "numeric", + month: "short", + day: "2-digit", + }) +} + +export function Date({ date }: Props) { + return <>{formatDate(date)} +} diff --git a/quartz/components/DesktopOnly.tsx b/quartz/components/DesktopOnly.tsx new file mode 100644 index 00000000..a11f23fa --- /dev/null +++ b/quartz/components/DesktopOnly.tsx @@ -0,0 +1,18 @@ +import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types" + +export default ((component?: QuartzComponent) => { + if (component) { + const Component = component + function DesktopOnly(props: QuartzComponentProps) { + return + } + + DesktopOnly.displayName = component.displayName + DesktopOnly.afterDOMLoaded = component?.afterDOMLoaded + DesktopOnly.beforeDOMLoaded = component?.beforeDOMLoaded + DesktopOnly.css = component?.css + return DesktopOnly + } else { + return () => <> + } +}) satisfies QuartzComponentConstructor diff --git a/quartz/components/Footer.tsx b/quartz/components/Footer.tsx new file mode 100644 index 00000000..f33617e4 --- /dev/null +++ b/quartz/components/Footer.tsx @@ -0,0 +1,32 @@ +import { QuartzComponentConstructor } from "./types" +import style from "./styles/footer.scss" +import { version } from "../../package.json" + +interface Options { + links: Record +} + +export default ((opts?: Options) => { + function Footer() { + const year = new Date().getFullYear() + const links = opts?.links ?? [] + return ( +
+
+

+ Created with Quartz v{version}, © {year} +

+
    + {Object.entries(links).map(([text, link]) => ( +
  • + {text} +
  • + ))} +
+
+ ) + } + + Footer.css = style + return Footer +}) satisfies QuartzComponentConstructor diff --git a/quartz/components/Graph.tsx b/quartz/components/Graph.tsx new file mode 100644 index 00000000..d8ec6e55 --- /dev/null +++ b/quartz/components/Graph.tsx @@ -0,0 +1,94 @@ +import { QuartzComponentConstructor } from "./types" +// @ts-ignore +import script from "./scripts/graph.inline" +import style from "./styles/graph.scss" + +export interface D3Config { + drag: boolean + zoom: boolean + depth: number + scale: number + repelForce: number + centerForce: number + linkDistance: number + fontSize: number + opacityScale: number +} + +interface GraphOptions { + localGraph: Partial | undefined + globalGraph: Partial | undefined +} + +const defaultOptions: GraphOptions = { + localGraph: { + drag: true, + zoom: true, + depth: 1, + scale: 1.1, + repelForce: 0.5, + centerForce: 0.3, + linkDistance: 30, + fontSize: 0.6, + opacityScale: 1, + }, + globalGraph: { + drag: true, + zoom: true, + depth: -1, + scale: 0.9, + repelForce: 0.5, + centerForce: 0.3, + linkDistance: 30, + fontSize: 0.6, + opacityScale: 1, + }, +} + +export default ((opts?: GraphOptions) => { + function Graph() { + const localGraph = { ...opts?.localGraph, ...defaultOptions.localGraph } + const globalGraph = { ...opts?.globalGraph, ...defaultOptions.globalGraph } + return ( +
+

Graph View

+
+
+ + + +
+
+
+
+
+ ) + } + + Graph.css = style + Graph.afterDOMLoaded = script + + return Graph +}) satisfies QuartzComponentConstructor diff --git a/quartz/components/Head.tsx b/quartz/components/Head.tsx new file mode 100644 index 00000000..67f0c024 --- /dev/null +++ b/quartz/components/Head.tsx @@ -0,0 +1,40 @@ +import { joinSegments, pathToRoot } from "../util/path" +import { JSResourceToScriptElement } from "../util/resources" +import { QuartzComponentConstructor, QuartzComponentProps } from "./types" + +export default (() => { + function Head({ cfg, fileData, externalResources }: QuartzComponentProps) { + const title = fileData.frontmatter?.title ?? "Untitled" + const description = fileData.description?.trim() ?? "No description provided" + const { css, js } = externalResources + const baseDir = pathToRoot(fileData.slug!) + const iconPath = joinSegments(baseDir, "static/icon.png") + const ogImagePath = `https://${cfg.baseUrl}/static/og-image.png` + + return ( + + {title} + + + + + {cfg.baseUrl && } + + + + + + + + {css.map((href) => ( + + ))} + {js + .filter((resource) => resource.loadTime === "beforeDOMReady") + .map((res) => JSResourceToScriptElement(res, true))} + + ) + } + + return Head +}) satisfies QuartzComponentConstructor diff --git a/quartz/components/Header.tsx b/quartz/components/Header.tsx new file mode 100644 index 00000000..5281f729 --- /dev/null +++ b/quartz/components/Header.tsx @@ -0,0 +1,22 @@ +import { QuartzComponentConstructor, QuartzComponentProps } from "./types" + +function Header({ children }: QuartzComponentProps) { + return children.length > 0 ?
{children}
: null +} + +Header.css = ` +header { + display: flex; + flex-direction: row; + align-items: center; + margin: 2rem 0; + gap: 1.5rem; +} + +header h1 { + margin: 0; + flex: auto; +} +` + +export default (() => Header) satisfies QuartzComponentConstructor diff --git a/quartz/components/MobileOnly.tsx b/quartz/components/MobileOnly.tsx new file mode 100644 index 00000000..5a190957 --- /dev/null +++ b/quartz/components/MobileOnly.tsx @@ -0,0 +1,18 @@ +import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types" + +export default ((component?: QuartzComponent) => { + if (component) { + const Component = component + function MobileOnly(props: QuartzComponentProps) { + return + } + + MobileOnly.displayName = component.displayName + MobileOnly.afterDOMLoaded = component?.afterDOMLoaded + MobileOnly.beforeDOMLoaded = component?.beforeDOMLoaded + MobileOnly.css = component?.css + return MobileOnly + } else { + return () => <> + } +}) satisfies QuartzComponentConstructor diff --git a/quartz/components/PageList.tsx b/quartz/components/PageList.tsx new file mode 100644 index 00000000..c55b5347 --- /dev/null +++ b/quartz/components/PageList.tsx @@ -0,0 +1,82 @@ +import { FullSlug, resolveRelative } from "../util/path" +import { QuartzPluginData } from "../plugins/vfile" +import { Date } from "./Date" +import { QuartzComponentProps } from "./types" + +export function byDateAndAlphabetical(f1: QuartzPluginData, f2: QuartzPluginData): number { + if (f1.dates && f2.dates) { + // sort descending by last modified + return f2.dates.modified.getTime() - f1.dates.modified.getTime() + } else if (f1.dates && !f2.dates) { + // prioritize files with dates + return -1 + } else if (!f1.dates && f2.dates) { + return 1 + } + + // otherwise, sort lexographically by title + const f1Title = f1.frontmatter?.title.toLowerCase() ?? "" + const f2Title = f2.frontmatter?.title.toLowerCase() ?? "" + return f1Title.localeCompare(f2Title) +} + +type Props = { + limit?: number +} & QuartzComponentProps + +export function PageList({ fileData, allFiles, limit }: Props) { + let list = allFiles.sort(byDateAndAlphabetical) + if (limit) { + list = list.slice(0, limit) + } + + return ( +
    + {list.map((page) => { + const title = page.frontmatter?.title + const tags = page.frontmatter?.tags ?? [] + + return ( +
  • +
    + {page.dates && ( +

    + +

    + )} + + +
    +
  • + ) + })} +
+ ) +} + +PageList.css = ` +.section h3 { + margin: 0; +} + +.section > .tags { + margin: 0; +} +` diff --git a/quartz/components/PageTitle.tsx b/quartz/components/PageTitle.tsx new file mode 100644 index 00000000..c327547b --- /dev/null +++ b/quartz/components/PageTitle.tsx @@ -0,0 +1,20 @@ +import { pathToRoot } from "../util/path" +import { QuartzComponentConstructor, QuartzComponentProps } from "./types" + +function PageTitle({ fileData, cfg }: QuartzComponentProps) { + const title = cfg?.pageTitle ?? "Untitled Quartz" + const baseDir = pathToRoot(fileData.slug!) + return ( +

+ {title} +

+ ) +} + +PageTitle.css = ` +.page-title { + margin: 0; +} +` + +export default (() => PageTitle) satisfies QuartzComponentConstructor diff --git a/quartz/components/RecentNotes.tsx b/quartz/components/RecentNotes.tsx new file mode 100644 index 00000000..2b61b39c --- /dev/null +++ b/quartz/components/RecentNotes.tsx @@ -0,0 +1,81 @@ +import { QuartzComponentConstructor, QuartzComponentProps } from "./types" +import { FullSlug, SimpleSlug, resolveRelative } from "../util/path" +import { QuartzPluginData } from "../plugins/vfile" +import { byDateAndAlphabetical } from "./PageList" +import style from "./styles/recentNotes.scss" +import { Date } from "./Date" + +interface Options { + title: string + limit: number + linkToMore: SimpleSlug | false + filter: (f: QuartzPluginData) => boolean + sort: (f1: QuartzPluginData, f2: QuartzPluginData) => number +} + +const defaultOptions: Options = { + title: "Recent Notes", + limit: 3, + linkToMore: false, + filter: () => true, + sort: byDateAndAlphabetical, +} + +export default ((userOpts?: Partial) => { + const opts = { ...defaultOptions, ...userOpts } + function RecentNotes(props: QuartzComponentProps) { + const { allFiles, fileData, displayClass } = props + const pages = allFiles.filter(opts.filter).sort(opts.sort) + const remaining = Math.max(0, pages.length - opts.limit) + return ( +
+

{opts.title}

+
    + {pages.slice(0, opts.limit).map((page) => { + const title = page.frontmatter?.title + const tags = page.frontmatter?.tags ?? [] + + return ( +
  • +
    + + {page.dates && ( +

    + +

    + )} + +
    +
  • + ) + })} +
+ {opts.linkToMore && remaining > 0 && ( +

+ See {remaining} more → +

+ )} +
+ ) + } + + RecentNotes.css = style + return RecentNotes +}) satisfies QuartzComponentConstructor diff --git a/quartz/components/Search.tsx b/quartz/components/Search.tsx new file mode 100644 index 00000000..bd9aa694 --- /dev/null +++ b/quartz/components/Search.tsx @@ -0,0 +1,49 @@ +import { QuartzComponentConstructor } from "./types" +import style from "./styles/search.scss" +// @ts-ignore +import script from "./scripts/search.inline" + +export default (() => { + function Search() { + return ( + + ) + } + + Search.afterDOMLoaded = script + Search.css = style + + return Search +}) satisfies QuartzComponentConstructor diff --git a/quartz/components/Spacer.tsx b/quartz/components/Spacer.tsx new file mode 100644 index 00000000..b9d5bb6c --- /dev/null +++ b/quartz/components/Spacer.tsx @@ -0,0 +1,8 @@ +import { QuartzComponentConstructor, QuartzComponentProps } from "./types" + +function Spacer({ displayClass }: QuartzComponentProps) { + const className = displayClass ? `spacer ${displayClass}` : "spacer" + return
+} + +export default (() => Spacer) satisfies QuartzComponentConstructor diff --git a/quartz/components/TableOfContents.tsx b/quartz/components/TableOfContents.tsx new file mode 100644 index 00000000..46045659 --- /dev/null +++ b/quartz/components/TableOfContents.tsx @@ -0,0 +1,84 @@ +import { QuartzComponentConstructor, QuartzComponentProps } from "./types" +import legacyStyle from "./styles/legacyToc.scss" +import modernStyle from "./styles/toc.scss" + +// @ts-ignore +import script from "./scripts/toc.inline" + +interface Options { + layout: "modern" | "legacy" +} + +const defaultOptions: Options = { + layout: "modern", +} + +function TableOfContents({ fileData, displayClass }: QuartzComponentProps) { + if (!fileData.toc) { + return null + } + + return ( +
+ +
+ +
+
+ ) +} +TableOfContents.css = modernStyle +TableOfContents.afterDOMLoaded = script + +function LegacyTableOfContents({ fileData }: QuartzComponentProps) { + if (!fileData.toc) { + return null + } + + return ( +
+ +

Table of Contents

+
+ +
+ ) +} +LegacyTableOfContents.css = legacyStyle + +export default ((opts?: Partial) => { + const layout = opts?.layout ?? defaultOptions.layout + return layout === "modern" ? TableOfContents : LegacyTableOfContents +}) satisfies QuartzComponentConstructor diff --git a/quartz/components/TagList.tsx b/quartz/components/TagList.tsx new file mode 100644 index 00000000..639f68c6 --- /dev/null +++ b/quartz/components/TagList.tsx @@ -0,0 +1,51 @@ +import { pathToRoot, slugTag } from "../util/path" +import { QuartzComponentConstructor, QuartzComponentProps } from "./types" + +function TagList({ fileData }: QuartzComponentProps) { + const tags = fileData.frontmatter?.tags + const baseDir = pathToRoot(fileData.slug!) + if (tags && tags.length > 0) { + return ( +
    + {tags.map((tag) => { + const display = `#${tag}` + const linkDest = baseDir + `/tags/${slugTag(tag)}` + return ( +
  • + + {display} + +
  • + ) + })} +
+ ) + } else { + return null + } +} + +TagList.css = ` +.tags { + list-style: none; + display: flex; + padding-left: 0; + gap: 0.4rem; + margin: 1rem 0; +} + +.tags > li { + display: inline-block; + white-space: nowrap; + margin: 0; + overflow-wrap: normal; +} + +a.tag-link { + border-radius: 8px; + background-color: var(--highlight); + padding: 0.2rem 0.5rem; +} +` + +export default (() => TagList) satisfies QuartzComponentConstructor diff --git a/quartz/components/index.ts b/quartz/components/index.ts new file mode 100644 index 00000000..a83f078b --- /dev/null +++ b/quartz/components/index.ts @@ -0,0 +1,39 @@ +import ArticleTitle from "./ArticleTitle" +import Content from "./pages/Content" +import TagContent from "./pages/TagContent" +import FolderContent from "./pages/FolderContent" +import Darkmode from "./Darkmode" +import Head from "./Head" +import PageTitle from "./PageTitle" +import ContentMeta from "./ContentMeta" +import Spacer from "./Spacer" +import TableOfContents from "./TableOfContents" +import TagList from "./TagList" +import Graph from "./Graph" +import Backlinks from "./Backlinks" +import Search from "./Search" +import Footer from "./Footer" +import DesktopOnly from "./DesktopOnly" +import MobileOnly from "./MobileOnly" +import RecentNotes from "./RecentNotes" + +export { + ArticleTitle, + Content, + TagContent, + FolderContent, + Darkmode, + Head, + PageTitle, + ContentMeta, + Spacer, + TableOfContents, + TagList, + Graph, + Backlinks, + Search, + Footer, + DesktopOnly, + MobileOnly, + RecentNotes, +} diff --git a/quartz/components/pages/Content.tsx b/quartz/components/pages/Content.tsx new file mode 100644 index 00000000..7490a7ea --- /dev/null +++ b/quartz/components/pages/Content.tsx @@ -0,0 +1,11 @@ +import { QuartzComponentConstructor, QuartzComponentProps } from "../types" +import { Fragment, jsx, jsxs } from "preact/jsx-runtime" +import { toJsxRuntime } from "hast-util-to-jsx-runtime" + +function Content({ tree }: QuartzComponentProps) { + // @ts-ignore (preact makes it angry) + const content = toJsxRuntime(tree, { Fragment, jsx, jsxs, elementAttributeNameCase: "html" }) + return
{content}
+} + +export default (() => Content) satisfies QuartzComponentConstructor diff --git a/quartz/components/pages/FolderContent.tsx b/quartz/components/pages/FolderContent.tsx new file mode 100644 index 00000000..6c5fd7d2 --- /dev/null +++ b/quartz/components/pages/FolderContent.tsx @@ -0,0 +1,46 @@ +import { QuartzComponentConstructor, QuartzComponentProps } from "../types" +import { Fragment, jsx, jsxs } from "preact/jsx-runtime" +import { toJsxRuntime } from "hast-util-to-jsx-runtime" +import path from "path" + +import style from "../styles/listPage.scss" +import { PageList } from "../PageList" +import { _stripSlashes, simplifySlug } from "../../util/path" +import { Root } from "hast" + +function FolderContent(props: QuartzComponentProps) { + const { tree, fileData, allFiles } = props + const folderSlug = _stripSlashes(simplifySlug(fileData.slug!)) + const allPagesInFolder = allFiles.filter((file) => { + const fileSlug = _stripSlashes(simplifySlug(file.slug!)) + const prefixed = fileSlug.startsWith(folderSlug) && fileSlug !== folderSlug + const folderParts = folderSlug.split(path.posix.sep) + const fileParts = fileSlug.split(path.posix.sep) + const isDirectChild = fileParts.length === folderParts.length + 1 + return prefixed && isDirectChild + }) + + const listProps = { + ...props, + allFiles: allPagesInFolder, + } + + const content = + (tree as Root).children.length === 0 + ? fileData.description + : // @ts-ignore + toJsxRuntime(tree, { Fragment, jsx, jsxs, elementAttributeNameCase: "html" }) + + return ( +
+
{content}
+

{allPagesInFolder.length} items under this folder.

+
+ +
+
+ ) +} + +FolderContent.css = style + PageList.css +export default (() => FolderContent) satisfies QuartzComponentConstructor diff --git a/quartz/components/pages/TagContent.tsx b/quartz/components/pages/TagContent.tsx new file mode 100644 index 00000000..73ee465c --- /dev/null +++ b/quartz/components/pages/TagContent.tsx @@ -0,0 +1,91 @@ +import { QuartzComponentConstructor, QuartzComponentProps } from "../types" +import { Fragment, jsx, jsxs } from "preact/jsx-runtime" +import { toJsxRuntime } from "hast-util-to-jsx-runtime" +import style from "../styles/listPage.scss" +import { PageList } from "../PageList" +import { FullSlug, getAllSegmentPrefixes, simplifySlug } from "../../util/path" +import { QuartzPluginData } from "../../plugins/vfile" +import { Root } from "hast" + +const numPages = 10 +function TagContent(props: QuartzComponentProps) { + const { tree, fileData, allFiles } = props + const slug = fileData.slug + + if (!(slug?.startsWith("tags/") || slug === "tags")) { + throw new Error(`Component "TagContent" tried to render a non-tag page: ${slug}`) + } + + const tag = simplifySlug(slug.slice("tags/".length) as FullSlug) + const allPagesWithTag = (tag: string) => + allFiles.filter((file) => + (file.frontmatter?.tags ?? []).flatMap(getAllSegmentPrefixes).includes(tag), + ) + + const content = + (tree as Root).children.length === 0 + ? fileData.description + : // @ts-ignore + toJsxRuntime(tree, { Fragment, jsx, jsxs, elementAttributeNameCase: "html" }) + + if (tag === "") { + const tags = [...new Set(allFiles.flatMap((data) => data.frontmatter?.tags ?? []))] + const tagItemMap: Map = new Map() + for (const tag of tags) { + tagItemMap.set(tag, allPagesWithTag(tag)) + } + + return ( +
+
{content}
+

Found {tags.length} total tags.

+
+ {tags.map((tag) => { + const pages = tagItemMap.get(tag)! + const listProps = { + ...props, + allFiles: pages, + } + + const contentPage = allFiles.filter((file) => file.slug === `tags/${tag}`)[0] + const content = contentPage?.description + return ( +
+

+ + #{tag} + +

+ {content &&

{content}

} +

+ {pages.length} items with this tag.{" "} + {pages.length > numPages && `Showing first ${numPages}.`} +

+ +
+ ) + })} +
+
+ ) + } else { + const pages = allPagesWithTag(tag) + const listProps = { + ...props, + allFiles: pages, + } + + return ( +
+
{content}
+

{pages.length} items with this tag.

+
+ +
+
+ ) + } +} + +TagContent.css = style + PageList.css +export default (() => TagContent) satisfies QuartzComponentConstructor diff --git a/quartz/components/renderPage.tsx b/quartz/components/renderPage.tsx new file mode 100644 index 00000000..eb1291f4 --- /dev/null +++ b/quartz/components/renderPage.tsx @@ -0,0 +1,117 @@ +import { render } from "preact-render-to-string" +import { QuartzComponent, QuartzComponentProps } from "./types" +import HeaderConstructor from "./Header" +import BodyConstructor from "./Body" +import { JSResourceToScriptElement, StaticResources } from "../util/resources" +import { FullSlug, joinSegments, pathToRoot } from "../util/path" + +interface RenderComponents { + head: QuartzComponent + header: QuartzComponent[] + beforeBody: QuartzComponent[] + pageBody: QuartzComponent + left: QuartzComponent[] + right: QuartzComponent[] + footer: QuartzComponent +} + +export function pageResources(slug: FullSlug, staticResources: StaticResources): StaticResources { + const baseDir = pathToRoot(slug) + + const contentIndexPath = joinSegments(baseDir, "static/contentIndex.json") + const contentIndexScript = `const fetchData = fetch(\`${contentIndexPath}\`).then(data => data.json())` + + return { + css: [joinSegments(baseDir, "index.css"), ...staticResources.css], + js: [ + { + src: joinSegments(baseDir, "prescript.js"), + loadTime: "beforeDOMReady", + contentType: "external", + }, + { + loadTime: "beforeDOMReady", + contentType: "inline", + spaPreserve: true, + script: contentIndexScript, + }, + ...staticResources.js, + { + src: joinSegments(baseDir, "postscript.js"), + loadTime: "afterDOMReady", + moduleType: "module", + contentType: "external", + }, + ], + } +} + +export function renderPage( + slug: FullSlug, + componentData: QuartzComponentProps, + components: RenderComponents, + pageResources: StaticResources, +): string { + const { + head: Head, + header, + beforeBody, + pageBody: Content, + left, + right, + footer: Footer, + } = components + const Header = HeaderConstructor() + const Body = BodyConstructor() + + const LeftComponent = ( + + ) + + const RightComponent = ( + + ) + + const doc = ( + + + +
+ + {LeftComponent} +
+ + +
+ {RightComponent} + +
+
+ + {pageResources.js + .filter((resource) => resource.loadTime === "afterDOMReady") + .map((res) => JSResourceToScriptElement(res))} + + ) + + return "\n" + render(doc) +} diff --git a/quartz/components/scripts/callout.inline.ts b/quartz/components/scripts/callout.inline.ts new file mode 100644 index 00000000..d8cf5180 --- /dev/null +++ b/quartz/components/scripts/callout.inline.ts @@ -0,0 +1,44 @@ +function toggleCallout(this: HTMLElement) { + const outerBlock = this.parentElement! + outerBlock.classList.toggle(`is-collapsed`) + 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 + } +} + +function setupCallout() { + const collapsible = document.getElementsByClassName( + `callout is-collapsible`, + ) as HTMLCollectionOf + for (const div of collapsible) { + const title = div.firstElementChild + + if (title) { + title.removeEventListener(`click`, toggleCallout) + title.addEventListener(`click`, toggleCallout) + + const collapsed = div.classList.contains(`is-collapsed`) + const height = collapsed ? title.scrollHeight : div.scrollHeight + div.style.maxHeight = height + `px` + } + } +} + +document.addEventListener(`nav`, setupCallout) +window.addEventListener(`resize`, setupCallout) diff --git a/quartz/components/scripts/clipboard.inline.ts b/quartz/components/scripts/clipboard.inline.ts new file mode 100644 index 00000000..c604c9bc --- /dev/null +++ b/quartz/components/scripts/clipboard.inline.ts @@ -0,0 +1,33 @@ +const svgCopy = + '' +const svgCheck = + '' + +document.addEventListener("nav", () => { + const els = document.getElementsByTagName("pre") + for (let i = 0; i < els.length; i++) { + const codeBlock = els[i].getElementsByTagName("code")[0] + if (codeBlock) { + const source = codeBlock.innerText.replace(/\n\n/g, "\n") + const button = document.createElement("button") + button.className = "clipboard-button" + button.type = "button" + button.innerHTML = svgCopy + button.ariaLabel = "Copy source" + button.addEventListener("click", () => { + navigator.clipboard.writeText(source).then( + () => { + button.blur() + button.innerHTML = svgCheck + setTimeout(() => { + button.innerHTML = svgCopy + button.style.borderColor = "" + }, 2000) + }, + (error) => console.error(error), + ) + }) + els[i].prepend(button) + } + } +}) diff --git a/quartz/components/scripts/darkmode.inline.ts b/quartz/components/scripts/darkmode.inline.ts new file mode 100644 index 00000000..e16f4f84 --- /dev/null +++ b/quartz/components/scripts/darkmode.inline.ts @@ -0,0 +1,23 @@ +const userPref = window.matchMedia("(prefers-color-scheme: light)").matches ? "light" : "dark" +const currentTheme = localStorage.getItem("theme") ?? userPref +document.documentElement.setAttribute("saved-theme", currentTheme) + +document.addEventListener("nav", () => { + const switchTheme = (e: any) => { + if (e.target.checked) { + document.documentElement.setAttribute("saved-theme", "dark") + localStorage.setItem("theme", "dark") + } else { + document.documentElement.setAttribute("saved-theme", "light") + localStorage.setItem("theme", "light") + } + } + + // Darkmode toggle + const toggleSwitch = document.querySelector("#darkmode-toggle") as HTMLInputElement + toggleSwitch.removeEventListener("change", switchTheme) + toggleSwitch.addEventListener("change", switchTheme) + if (currentTheme === "dark") { + toggleSwitch.checked = true + } +}) diff --git a/quartz/components/scripts/graph.inline.ts b/quartz/components/scripts/graph.inline.ts new file mode 100644 index 00000000..e589217f --- /dev/null +++ b/quartz/components/scripts/graph.inline.ts @@ -0,0 +1,307 @@ +import type { ContentDetails } from "../../plugins/emitters/contentIndex" +import * as d3 from "d3" +import { registerEscapeHandler, removeAllChildren } from "./util" +import { FullSlug, SimpleSlug, getFullSlug, resolveRelative, simplifySlug } from "../../util/path" + +type NodeData = { + id: SimpleSlug + text: string + tags: string[] +} & d3.SimulationNodeDatum + +type LinkData = { + source: SimpleSlug + target: SimpleSlug +} + +const localStorageKey = "graph-visited" +function getVisited(): Set { + return new Set(JSON.parse(localStorage.getItem(localStorageKey) ?? "[]")) +} + +function addToVisited(slug: SimpleSlug) { + const visited = getVisited() + visited.add(slug) + localStorage.setItem(localStorageKey, JSON.stringify([...visited])) +} + +async function renderGraph(container: string, fullSlug: FullSlug) { + const slug = simplifySlug(fullSlug) + const visited = getVisited() + const graph = document.getElementById(container) + if (!graph) return + removeAllChildren(graph) + + let { + drag: enableDrag, + zoom: enableZoom, + depth, + scale, + repelForce, + centerForce, + linkDistance, + fontSize, + opacityScale, + } = JSON.parse(graph.dataset["cfg"]!) + + const data = await fetchData + + const links: LinkData[] = [] + for (const [src, details] of Object.entries(data)) { + const source = simplifySlug(src as FullSlug) + const outgoing = details.links ?? [] + for (const dest of outgoing) { + if (dest in data) { + links.push({ source, target: dest }) + } + } + } + + const neighbourhood = new Set() + const wl: (SimpleSlug | "__SENTINEL")[] = [slug, "__SENTINEL"] + if (depth >= 0) { + while (depth >= 0 && wl.length > 0) { + // compute neighbours + const cur = wl.shift()! + if (cur === "__SENTINEL") { + depth-- + wl.push("__SENTINEL") + } else { + neighbourhood.add(cur) + const outgoing = links.filter((l) => l.source === cur) + const incoming = links.filter((l) => l.target === cur) + wl.push(...outgoing.map((l) => l.target), ...incoming.map((l) => l.source)) + } + } + } else { + Object.keys(data).forEach((id) => neighbourhood.add(simplifySlug(id as FullSlug))) + } + + const graphData: { nodes: NodeData[]; links: LinkData[] } = { + nodes: [...neighbourhood].map((url) => ({ + id: url, + text: data[url]?.title ?? url, + tags: data[url]?.tags ?? [], + })), + links: links.filter((l) => neighbourhood.has(l.source) && neighbourhood.has(l.target)), + } + + const simulation: d3.Simulation = d3 + .forceSimulation(graphData.nodes) + .force("charge", d3.forceManyBody().strength(-100 * repelForce)) + .force( + "link", + d3 + .forceLink(graphData.links) + .id((d: any) => d.id) + .distance(linkDistance), + ) + .force("center", d3.forceCenter().strength(centerForce)) + + const height = Math.max(graph.offsetHeight, 250) + const width = graph.offsetWidth + + const svg = d3 + .select("#" + container) + .append("svg") + .attr("width", width) + .attr("height", height) + .attr("viewBox", [-width / 2 / scale, -height / 2 / scale, width / scale, height / scale]) + + // draw links between nodes + const link = svg + .append("g") + .selectAll("line") + .data(graphData.links) + .join("line") + .attr("class", "link") + .attr("stroke", "var(--lightgray)") + .attr("stroke-width", 1) + + // svg groups + const graphNode = svg.append("g").selectAll("g").data(graphData.nodes).enter().append("g") + + // calculate color + const color = (d: NodeData) => { + const isCurrent = d.id === slug + if (isCurrent) { + return "var(--secondary)" + } else if (visited.has(d.id)) { + return "var(--tertiary)" + } else { + return "var(--gray)" + } + } + + const drag = (simulation: d3.Simulation) => { + function dragstarted(event: any, d: NodeData) { + if (!event.active) simulation.alphaTarget(1).restart() + d.fx = d.x + d.fy = d.y + } + + function dragged(event: any, d: NodeData) { + d.fx = event.x + d.fy = event.y + } + + function dragended(event: any, d: NodeData) { + if (!event.active) simulation.alphaTarget(0) + d.fx = null + d.fy = null + } + + const noop = () => {} + return d3 + .drag() + .on("start", enableDrag ? dragstarted : noop) + .on("drag", enableDrag ? dragged : noop) + .on("end", enableDrag ? dragended : noop) + } + + function nodeRadius(d: NodeData) { + const numLinks = links.filter((l: any) => l.source.id === d.id || l.target.id === d.id).length + return 2 + Math.sqrt(numLinks) + } + + // draw individual nodes + const node = graphNode + .append("circle") + .attr("class", "node") + .attr("id", (d) => d.id) + .attr("r", nodeRadius) + .attr("fill", color) + .style("cursor", "pointer") + .on("click", (_, d) => { + const targ = resolveRelative(fullSlug, d.id) + window.spaNavigate(new URL(targ, window.location.toString())) + }) + .on("mouseover", function (_, d) { + const neighbours: SimpleSlug[] = data[fullSlug].links ?? [] + const neighbourNodes = d3 + .selectAll(".node") + .filter((d) => neighbours.includes(d.id)) + const currentId = d.id + const linkNodes = d3 + .selectAll(".link") + .filter((d: any) => d.source.id === currentId || d.target.id === currentId) + + // highlight neighbour nodes + neighbourNodes.transition().duration(200).attr("fill", color) + + // highlight links + linkNodes.transition().duration(200).attr("stroke", "var(--gray)").attr("stroke-width", 1) + + const bigFont = fontSize * 1.5 + + // show text for self + const parent = this.parentNode as HTMLElement + d3.select(parent) + .raise() + .select("text") + .transition() + .duration(200) + .attr("opacityOld", d3.select(parent).select("text").style("opacity")) + .style("opacity", 1) + .style("font-size", bigFont + "em") + }) + .on("mouseleave", function (_, d) { + const currentId = d.id + const linkNodes = d3 + .selectAll(".link") + .filter((d: any) => d.source.id === currentId || d.target.id === currentId) + + linkNodes.transition().duration(200).attr("stroke", "var(--lightgray)") + + const parent = this.parentNode as HTMLElement + d3.select(parent) + .select("text") + .transition() + .duration(200) + .style("opacity", d3.select(parent).select("text").attr("opacityOld")) + .style("font-size", fontSize + "em") + }) + // @ts-ignore + .call(drag(simulation)) + + // draw labels + const labels = graphNode + .append("text") + .attr("dx", 0) + .attr("dy", (d) => -nodeRadius(d) + "px") + .attr("text-anchor", "middle") + .text( + (d) => data[d.id]?.title || (d.id.charAt(1).toUpperCase() + d.id.slice(2)).replace("-", " "), + ) + .style("opacity", (opacityScale - 1) / 3.75) + .style("pointer-events", "none") + .style("font-size", fontSize + "em") + .raise() + // @ts-ignore + .call(drag(simulation)) + + // set panning + if (enableZoom) { + svg.call( + d3 + .zoom() + .extent([ + [0, 0], + [width, height], + ]) + .scaleExtent([0.25, 4]) + .on("zoom", ({ transform }) => { + link.attr("transform", transform) + node.attr("transform", transform) + const scale = transform.k * opacityScale + const scaledOpacity = Math.max((scale - 1) / 3.75, 0) + labels.attr("transform", transform).style("opacity", scaledOpacity) + }), + ) + } + + // progress the simulation + simulation.on("tick", () => { + link + .attr("x1", (d: any) => d.source.x) + .attr("y1", (d: any) => d.source.y) + .attr("x2", (d: any) => d.target.x) + .attr("y2", (d: any) => d.target.y) + node.attr("cx", (d: any) => d.x).attr("cy", (d: any) => d.y) + labels.attr("x", (d: any) => d.x).attr("y", (d: any) => d.y) + }) +} + +function renderGlobalGraph() { + const slug = getFullSlug(window) + const container = document.getElementById("global-graph-outer") + const sidebar = container?.closest(".sidebar") as HTMLElement + container?.classList.add("active") + if (sidebar) { + sidebar.style.zIndex = "1" + } + + renderGraph("global-graph-container", slug) + + function hideGlobalGraph() { + container?.classList.remove("active") + const graph = document.getElementById("global-graph-container") + if (sidebar) { + sidebar.style.zIndex = "unset" + } + if (!graph) return + removeAllChildren(graph) + } + + registerEscapeHandler(container, hideGlobalGraph) +} + +document.addEventListener("nav", async (e: unknown) => { + const slug = (e as CustomEventMap["nav"]).detail.url + addToVisited(slug) + await renderGraph("graph-container", slug) + + const containerIcon = document.getElementById("global-graph-icon") + containerIcon?.removeEventListener("click", renderGlobalGraph) + containerIcon?.addEventListener("click", renderGlobalGraph) +}) diff --git a/quartz/components/scripts/plausible.inline.ts b/quartz/components/scripts/plausible.inline.ts new file mode 100644 index 00000000..704f5d5f --- /dev/null +++ b/quartz/components/scripts/plausible.inline.ts @@ -0,0 +1,3 @@ +import Plausible from "plausible-tracker" +const { trackPageview } = Plausible() +document.addEventListener("nav", () => trackPageview()) diff --git a/quartz/components/scripts/popover.inline.ts b/quartz/components/scripts/popover.inline.ts new file mode 100644 index 00000000..ed3c925c --- /dev/null +++ b/quartz/components/scripts/popover.inline.ts @@ -0,0 +1,83 @@ +import { computePosition, flip, inline, shift } from "@floating-ui/dom" + +// from micromorph/src/utils.ts +// https://github.com/natemoo-re/micromorph/blob/main/src/utils.ts#L5 +export function normalizeRelativeURLs(el: Element | Document, base: string | URL) { + const update = (el: Element, attr: string, base: string | URL) => { + el.setAttribute(attr, new URL(el.getAttribute(attr)!, base).pathname) + } + + el.querySelectorAll('[href^="./"], [href^="../"]').forEach((item) => update(item, "href", base)) + + el.querySelectorAll('[src^="./"], [src^="../"]').forEach((item) => update(item, "src", base)) +} + +const p = new DOMParser() +async function mouseEnterHandler( + this: HTMLLinkElement, + { clientX, clientY }: { clientX: number; clientY: number }, +) { + const link = this + async function setPosition(popoverElement: HTMLElement) { + const { x, y } = await computePosition(link, popoverElement, { + middleware: [inline({ x: clientX, y: clientY }), shift(), flip()], + }) + Object.assign(popoverElement.style, { + left: `${x}px`, + top: `${y}px`, + }) + } + + // dont refetch if there's already a popover + if ([...link.children].some((child) => child.classList.contains("popover"))) { + return setPosition(link.lastChild as HTMLElement) + } + + const thisUrl = new URL(document.location.href) + thisUrl.hash = "" + thisUrl.search = "" + const targetUrl = new URL(link.href) + const hash = targetUrl.hash + targetUrl.hash = "" + targetUrl.search = "" + // prevent hover of the same page + if (thisUrl.toString() === targetUrl.toString()) return + + const contents = await fetch(`${targetUrl}`) + .then((res) => res.text()) + .catch((err) => { + console.error(err) + }) + + if (!contents) return + const html = p.parseFromString(contents, "text/html") + normalizeRelativeURLs(html, targetUrl) + const elts = [...html.getElementsByClassName("popover-hint")] + if (elts.length === 0) return + + const popoverElement = document.createElement("div") + popoverElement.classList.add("popover") + const popoverInner = document.createElement("div") + popoverInner.classList.add("popover-inner") + popoverElement.appendChild(popoverInner) + elts.forEach((elt) => popoverInner.appendChild(elt)) + + setPosition(popoverElement) + link.appendChild(popoverElement) + + if (hash !== "") { + const heading = popoverInner.querySelector(hash) as HTMLElement | null + if (heading) { + // leave ~12px of buffer when scrolling to a heading + popoverInner.scroll({ top: heading.offsetTop - 12, behavior: "instant" }) + } + } +} + +document.addEventListener("nav", () => { + const links = [...document.getElementsByClassName("internal")] as HTMLLinkElement[] + for (const link of links) { + link.removeEventListener("mouseenter", mouseEnterHandler) + link.addEventListener("mouseenter", mouseEnterHandler) + } +}) diff --git a/quartz/components/scripts/search.inline.ts b/quartz/components/scripts/search.inline.ts new file mode 100644 index 00000000..038566cb --- /dev/null +++ b/quartz/components/scripts/search.inline.ts @@ -0,0 +1,205 @@ +import { Document } from "flexsearch" +import { ContentDetails } from "../../plugins/emitters/contentIndex" +import { registerEscapeHandler, removeAllChildren } from "./util" +import { FullSlug, getFullSlug, resolveRelative, simplifySlug } from "../../util/path" + +interface Item { + id: number + slug: FullSlug + title: string + content: string +} + +let index: Document | undefined = undefined + +const contextWindowWords = 30 +const numSearchResults = 5 +function highlight(searchTerm: string, text: string, trim?: boolean) { + // try to highlight longest tokens first + const tokenizedTerms = searchTerm + .split(/\s+/) + .filter((t) => t !== "") + .sort((a, b) => b.length - a.length) + let tokenizedText = text.split(/\s+/).filter((t) => t !== "") + + let startIndex = 0 + let endIndex = tokenizedText.length - 1 + if (trim) { + const includesCheck = (tok: string) => + tokenizedTerms.some((term) => tok.toLowerCase().startsWith(term.toLowerCase())) + const occurencesIndices = tokenizedText.map(includesCheck) + + let bestSum = 0 + let bestIndex = 0 + for (let i = 0; i < Math.max(tokenizedText.length - contextWindowWords, 0); i++) { + const window = occurencesIndices.slice(i, i + contextWindowWords) + const windowSum = window.reduce((total, cur) => total + (cur ? 1 : 0), 0) + if (windowSum >= bestSum) { + bestSum = windowSum + bestIndex = i + } + } + + startIndex = Math.max(bestIndex - contextWindowWords, 0) + endIndex = Math.min(startIndex + 2 * contextWindowWords, tokenizedText.length - 1) + tokenizedText = tokenizedText.slice(startIndex, endIndex) + } + + const slice = tokenizedText + .map((tok) => { + // see if this tok is prefixed by any search terms + for (const searchTok of tokenizedTerms) { + if (tok.toLowerCase().includes(searchTok.toLowerCase())) { + const regex = new RegExp(searchTok.toLowerCase(), "gi") + return tok.replace(regex, `$&`) + } + } + return tok + }) + .join(" ") + + return `${startIndex === 0 ? "" : "..."}${slice}${ + endIndex === tokenizedText.length - 1 ? "" : "..." + }` +} + +const encoder = (str: string) => str.toLowerCase().split(/([^a-z]|[^\x00-\x7F])/) +document.addEventListener("nav", async (e: unknown) => { + const currentSlug = (e as CustomEventMap["nav"]).detail.url + + const data = await fetchData + const container = document.getElementById("search-container") + const sidebar = container?.closest(".sidebar") as HTMLElement + const searchIcon = document.getElementById("search-icon") + const searchBar = document.getElementById("search-bar") as HTMLInputElement | null + const results = document.getElementById("results-container") + const idDataMap = Object.keys(data) as FullSlug[] + + function hideSearch() { + container?.classList.remove("active") + if (searchBar) { + searchBar.value = "" // clear the input when we dismiss the search + } + if (sidebar) { + sidebar.style.zIndex = "unset" + } + if (results) { + removeAllChildren(results) + } + } + + function showSearch() { + if (sidebar) { + sidebar.style.zIndex = "1" + } + container?.classList.add("active") + searchBar?.focus() + } + + function shortcutHandler(e: HTMLElementEventMap["keydown"]) { + if (e.key === "k" && (e.ctrlKey || e.metaKey)) { + e.preventDefault() + const searchBarOpen = container?.classList.contains("active") + searchBarOpen ? hideSearch() : showSearch() + } else if (e.key === "Enter") { + const anchor = document.getElementsByClassName("result-card")[0] as HTMLInputElement | null + if (anchor) { + anchor.click() + } + } + } + + const formatForDisplay = (term: string, id: number) => { + const slug = idDataMap[id] + return { + id, + slug, + title: highlight(term, data[slug].title ?? ""), + content: highlight(term, data[slug].content ?? "", true), + } + } + + const resultToHTML = ({ slug, title, content }: Item) => { + const button = document.createElement("button") + button.classList.add("result-card") + button.id = slug + button.innerHTML = `

${title}

${content}

` + button.addEventListener("click", () => { + const targ = resolveRelative(currentSlug, slug) + window.spaNavigate(new URL(targ, window.location.toString())) + }) + return button + } + + function displayResults(finalResults: Item[]) { + if (!results) return + + removeAllChildren(results) + if (finalResults.length === 0) { + results.innerHTML = `` + } else { + results.append(...finalResults.map(resultToHTML)) + } + } + + async function onType(e: HTMLElementEventMap["input"]) { + const term = (e.target as HTMLInputElement).value + const searchResults = (await index?.searchAsync(term, numSearchResults)) ?? [] + const getByField = (field: string): number[] => { + const results = searchResults.filter((x) => x.field === field) + return results.length === 0 ? [] : ([...results[0].result] as number[]) + } + + // order titles ahead of content + const allIds: Set = new Set([...getByField("title"), ...getByField("content")]) + const finalResults = [...allIds].map((id) => formatForDisplay(term, id)) + displayResults(finalResults) + } + + document.removeEventListener("keydown", shortcutHandler) + document.addEventListener("keydown", shortcutHandler) + searchIcon?.removeEventListener("click", showSearch) + searchIcon?.addEventListener("click", showSearch) + searchBar?.removeEventListener("input", onType) + searchBar?.addEventListener("input", onType) + + // setup index if it hasn't been already + if (!index) { + index = new Document({ + cache: true, + charset: "latin:extra", + optimize: true, + encode: encoder, + document: { + id: "id", + index: [ + { + field: "title", + tokenize: "reverse", + }, + { + field: "content", + tokenize: "reverse", + }, + ], + }, + }) + + let id = 0 + for (const [slug, fileData] of Object.entries(data)) { + await index.addAsync(id, { + id, + slug: slug as FullSlug, + title: fileData.title, + content: fileData.content, + }) + id++ + } + } + + // register handlers + registerEscapeHandler(container, hideSearch) +}) diff --git a/quartz/components/scripts/spa.inline.ts b/quartz/components/scripts/spa.inline.ts new file mode 100644 index 00000000..6f9399ea --- /dev/null +++ b/quartz/components/scripts/spa.inline.ts @@ -0,0 +1,153 @@ +import micromorph from "micromorph" +import { FullSlug, RelativeURL, getFullSlug } from "../../util/path" + +// adapted from `micromorph` +// https://github.com/natemoo-re/micromorph + +const NODE_TYPE_ELEMENT = 1 +let announcer = document.createElement("route-announcer") +const isElement = (target: EventTarget | null): target is Element => + (target as Node)?.nodeType === NODE_TYPE_ELEMENT +const isLocalUrl = (href: string) => { + try { + const url = new URL(href) + if (window.location.origin === url.origin) { + return true + } + } catch (e) {} + return false +} + +const getOpts = ({ target }: Event): { url: URL; scroll?: boolean } | undefined => { + if (!isElement(target)) return + const a = target.closest("a") + if (!a) return + if ("routerIgnore" in a.dataset) return + const { href } = a + if (!isLocalUrl(href)) return + return { url: new URL(href), scroll: "routerNoscroll" in a.dataset ? false : undefined } +} + +function notifyNav(url: FullSlug) { + const event: CustomEventMap["nav"] = new CustomEvent("nav", { detail: { url } }) + document.dispatchEvent(event) +} + +let p: DOMParser +async function navigate(url: URL, isBack: boolean = false) { + p = p || new DOMParser() + const contents = await fetch(`${url}`) + .then((res) => res.text()) + .catch(() => { + window.location.assign(url) + }) + + if (!contents) return + + const html = p.parseFromString(contents, "text/html") + let title = html.querySelector("title")?.textContent + if (title) { + document.title = title + } else { + const h1 = document.querySelector("h1") + title = h1?.innerText ?? h1?.textContent ?? url.pathname + } + if (announcer.textContent !== title) { + announcer.textContent = title + } + announcer.dataset.persist = "" + html.body.appendChild(announcer) + + // morph body + micromorph(document.body, html.body) + + // scroll into place and add history + if (!isBack) { + if (url.hash) { + const el = document.getElementById(url.hash.substring(1)) + el?.scrollIntoView() + } else { + window.scrollTo({ top: 0 }) + } + } + + // now, patch head + const elementsToRemove = document.head.querySelectorAll(":not([spa-preserve])") + elementsToRemove.forEach((el) => el.remove()) + const elementsToAdd = html.head.querySelectorAll(":not([spa-preserve])") + elementsToAdd.forEach((el) => document.head.appendChild(el)) + + // delay setting the url until now + // at this point everything is loaded so changing the url should resolve to the correct addresses + history.pushState({}, "", url) + notifyNav(getFullSlug(window)) + delete announcer.dataset.persist +} + +window.spaNavigate = navigate + +function createRouter() { + if (typeof window !== "undefined") { + window.addEventListener("click", async (event) => { + const { url } = getOpts(event) ?? {} + if (!url) return + event.preventDefault() + try { + navigate(url, false) + } catch (e) { + window.location.assign(url) + } + }) + + window.addEventListener("popstate", (event) => { + const { url } = getOpts(event) ?? {} + if (window.location.hash && window.location.pathname === url?.pathname) return + try { + navigate(new URL(window.location.toString()), true) + } catch (e) { + window.location.reload() + } + return + }) + } + + return new (class Router { + go(pathname: RelativeURL) { + const url = new URL(pathname, window.location.toString()) + return navigate(url, false) + } + + back() { + return window.history.back() + } + + forward() { + return window.history.forward() + } + })() +} + +createRouter() +notifyNav(getFullSlug(window)) + +if (!customElements.get("route-announcer")) { + const attrs = { + "aria-live": "assertive", + "aria-atomic": "true", + style: + "position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px", + } + customElements.define( + "route-announcer", + class RouteAnnouncer extends HTMLElement { + constructor() { + super() + } + connectedCallback() { + for (const [key, value] of Object.entries(attrs)) { + this.setAttribute(key, value) + } + } + }, + ) +} diff --git a/quartz/components/scripts/toc.inline.ts b/quartz/components/scripts/toc.inline.ts new file mode 100644 index 00000000..f33d8f50 --- /dev/null +++ b/quartz/components/scripts/toc.inline.ts @@ -0,0 +1,42 @@ +const bufferPx = 150 +const observer = new IntersectionObserver((entries) => { + for (const entry of entries) { + const slug = entry.target.id + const tocEntryElement = document.querySelector(`a[data-for="${slug}"]`) + const windowHeight = entry.rootBounds?.height + if (windowHeight && tocEntryElement) { + if (entry.boundingClientRect.y < windowHeight) { + tocEntryElement.classList.add("in-view") + } else { + tocEntryElement.classList.remove("in-view") + } + } + } +}) + +function toggleToc(this: HTMLElement) { + this.classList.toggle("collapsed") + const content = this.nextElementSibling as HTMLElement + content.classList.toggle("collapsed") + content.style.maxHeight = content.style.maxHeight === "0px" ? content.scrollHeight + "px" : "0px" +} + +function setupToc() { + const toc = document.getElementById("toc") + if (toc) { + const content = toc.nextElementSibling as HTMLElement + content.style.maxHeight = content.scrollHeight + "px" + toc.removeEventListener("click", toggleToc) + toc.addEventListener("click", toggleToc) + } +} + +window.addEventListener("resize", setupToc) +document.addEventListener("nav", () => { + setupToc() + + // update toc entry highlighting + observer.disconnect() + const headers = document.querySelectorAll("h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]") + headers.forEach((header) => observer.observe(header)) +}) diff --git a/quartz/components/scripts/util.ts b/quartz/components/scripts/util.ts new file mode 100644 index 00000000..5fcabadc --- /dev/null +++ b/quartz/components/scripts/util.ts @@ -0,0 +1,25 @@ +export function registerEscapeHandler(outsideContainer: HTMLElement | null, cb: () => void) { + if (!outsideContainer) return + function click(this: HTMLElement, e: HTMLElementEventMap["click"]) { + if (e.target !== this) return + e.preventDefault() + cb() + } + + function esc(e: HTMLElementEventMap["keydown"]) { + if (!e.key.startsWith("Esc")) return + e.preventDefault() + cb() + } + + outsideContainer?.removeEventListener("click", click) + outsideContainer?.addEventListener("click", click) + document.removeEventListener("keydown", esc) + document.addEventListener("keydown", esc) +} + +export function removeAllChildren(node: HTMLElement) { + while (node.firstChild) { + node.removeChild(node.firstChild) + } +} diff --git a/quartz/components/styles/backlinks.scss b/quartz/components/styles/backlinks.scss new file mode 100644 index 00000000..04302f22 --- /dev/null +++ b/quartz/components/styles/backlinks.scss @@ -0,0 +1,20 @@ +.backlinks { + position: relative; + + & > h3 { + font-size: 1rem; + margin: 0; + } + + & > ul { + list-style: none; + padding: 0; + margin: 0.5rem 0; + + & > li { + & > a { + background-color: transparent; + } + } + } +} diff --git a/assets/styles/clipboard.scss b/quartz/components/styles/clipboard.scss similarity index 51% rename from assets/styles/clipboard.scss rename to quartz/components/styles/clipboard.scss index 7989e248..1702a7bb 100644 --- a/assets/styles/clipboard.scss +++ b/quartz/components/styles/clipboard.scss @@ -3,45 +3,35 @@ display: flex; float: right; right: 0; - padding: 0.69em; - margin: 0.5em; - color: var(--outlinegray); + padding: 0.4rem; + margin: -0.2rem 0.3rem; + color: var(--gray); border-color: var(--dark); - background-color: var(--lightgray); - filter: contrast(1.1); - border: 2px solid; - border-radius: 6px; - font-size: 0.8em; + background-color: var(--light); + border: 1px solid; + border-radius: 5px; z-index: 1; opacity: 0; - transition: 0.12s; - + transition: 0.2s; + & > svg { fill: var(--light); filter: contrast(0.3); } - + &:hover { cursor: pointer; - border-color: var(--primary); - - & > svg { - fill: var(--primary); - } + border-color: var(--secondary); } - + &:focus { outline: 0; } } -.highlight { - position: relative; - +pre { &:hover > .clipboard-button { opacity: 1; transition: 0.2s; } } - - diff --git a/assets/styles/darkmode.scss b/quartz/components/styles/darkmode.scss similarity index 65% rename from assets/styles/darkmode.scss rename to quartz/components/styles/darkmode.scss index 61967d79..10cbc72a 100644 --- a/assets/styles/darkmode.scss +++ b/quartz/components/styles/darkmode.scss @@ -1,12 +1,8 @@ .darkmode { - float: right; - padding: 1em; - min-width: 30px; position: relative; - - @media all and (max-width: 450px) { - padding: 1em; - } + width: 20px; + height: 20px; + margin: 0 10px; & > .toggle { display: none; @@ -14,18 +10,18 @@ } & svg { + cursor: pointer; opacity: 0; position: absolute; width: 20px; height: 20px; top: calc(50% - 10px); - margin: 0 7px; - fill: var(--gray); + fill: var(--darkgray); transition: opacity 0.1s ease; } } -.toggle:checked ~ label { +:root[saved-theme="dark"] .toggle ~ label { & > #dayIcon { opacity: 0; } @@ -34,11 +30,11 @@ } } -.toggle:not(:checked) ~ label { +:root .toggle ~ label { & > #dayIcon { opacity: 1; } & > #nightIcon { opacity: 0; } -} \ No newline at end of file +} diff --git a/quartz/components/styles/footer.scss b/quartz/components/styles/footer.scss new file mode 100644 index 00000000..9c8dbf8c --- /dev/null +++ b/quartz/components/styles/footer.scss @@ -0,0 +1,15 @@ +footer { + text-align: left; + margin-bottom: 4rem; + opacity: 0.7; + + & ul { + list-style: none; + margin: 0; + padding: 0; + display: flex; + flex-direction: row; + gap: 1rem; + margin-top: -1rem; + } +} diff --git a/quartz/components/styles/graph.scss b/quartz/components/styles/graph.scss new file mode 100644 index 00000000..3deaa1fe --- /dev/null +++ b/quartz/components/styles/graph.scss @@ -0,0 +1,70 @@ +@use "../../styles/variables.scss" as *; + +.graph { + & > h3 { + font-size: 1rem; + margin: 0; + } + + & > .graph-outer { + border-radius: 5px; + border: 1px solid var(--lightgray); + box-sizing: border-box; + height: 250px; + margin: 0.5em 0; + position: relative; + overflow: hidden; + + & > #global-graph-icon { + color: var(--dark); + opacity: 0.5; + width: 18px; + height: 18px; + position: absolute; + padding: 0.2rem; + margin: 0.3rem; + top: 0; + right: 0; + border-radius: 4px; + background-color: transparent; + transition: background-color 0.5s ease; + cursor: pointer; + &:hover { + background-color: var(--lightgray); + } + } + } + + & > #global-graph-outer { + position: fixed; + z-index: 9999; + left: 0; + top: 0; + width: 100vw; + height: 100%; + backdrop-filter: blur(4px); + display: none; + overflow: hidden; + + &.active { + display: inline-block; + } + + & > #global-graph-container { + border: 1px solid var(--lightgray); + background-color: var(--light); + border-radius: 5px; + box-sizing: border-box; + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + height: 60vh; + width: 50vw; + + @media all and (max-width: $fullPageWidth) { + width: 90%; + } + } + } +} diff --git a/quartz/components/styles/legacyToc.scss b/quartz/components/styles/legacyToc.scss new file mode 100644 index 00000000..7a98f343 --- /dev/null +++ b/quartz/components/styles/legacyToc.scss @@ -0,0 +1,27 @@ +details#toc { + & summary { + cursor: pointer; + + &::marker { + color: var(--dark); + } + + & > * { + padding-left: 0.25rem; + display: inline-block; + margin: 0; + } + } + + & ul { + list-style: none; + margin: 0.5rem 1.25rem; + padding: 0; + } + + @for $i from 1 through 6 { + & .depth-#{$i} { + padding-left: calc(1rem * #{$i}); + } + } +} diff --git a/quartz/components/styles/listPage.scss b/quartz/components/styles/listPage.scss new file mode 100644 index 00000000..7105a1e8 --- /dev/null +++ b/quartz/components/styles/listPage.scss @@ -0,0 +1,45 @@ +@use "../../styles/variables.scss" as *; + +ul.section-ul { + list-style: none; + margin-top: 2em; + padding-left: 0; +} + +li.section-li { + margin-bottom: 1em; + + & > .section { + display: grid; + grid-template-columns: 6em 3fr 1fr; + + @media all and (max-width: $mobileBreakpoint) { + & > .tags { + display: none; + } + } + + & > .tags { + justify-self: end; + margin-left: 1rem; + } + + & > .desc > h3 > a { + background-color: transparent; + } + + & > .meta { + margin: 0; + flex-basis: 6em; + opacity: 0.6; + } + } +} + +// modifications in popover context +.popover .section { + grid-template-columns: 6em 1fr !important; + & > .tags { + display: none; + } +} diff --git a/quartz/components/styles/popover.scss b/quartz/components/styles/popover.scss new file mode 100644 index 00000000..21e6b722 --- /dev/null +++ b/quartz/components/styles/popover.scss @@ -0,0 +1,59 @@ +@use "../../styles/variables.scss" as *; + +@keyframes dropin { + 0% { + opacity: 0; + visibility: hidden; + } + 1% { + opacity: 0; + } + 100% { + opacity: 1; + visibility: visible; + } +} + +.popover { + z-index: 999; + position: absolute; + overflow: visible; + padding: 1rem; + + & > .popover-inner { + position: relative; + width: 30rem; + max-height: 20rem; + padding: 0 1rem 1rem 1rem; + font-weight: initial; + line-height: normal; + font-size: initial; + font-family: var(--bodyFont); + border: 1px solid var(--lightgray); + background-color: var(--light); + border-radius: 5px; + box-shadow: 6px 6px 36px 0 rgba(0, 0, 0, 0.25); + overflow: auto; + } + + h1 { + font-size: 1.5rem; + } + + visibility: hidden; + opacity: 0; + transition: + opacity 0.3s ease, + visibility 0.3s ease; + + @media all and (max-width: $mobileBreakpoint) { + display: none !important; + } +} + +a:hover .popover, +.popover:hover { + animation: dropin 0.3s ease; + animation-fill-mode: forwards; + animation-delay: 0.2s; +} diff --git a/quartz/components/styles/recentNotes.scss b/quartz/components/styles/recentNotes.scss new file mode 100644 index 00000000..72676719 --- /dev/null +++ b/quartz/components/styles/recentNotes.scss @@ -0,0 +1,24 @@ +.recent-notes { + & > h3 { + margin: 0.5rem 0 0 0; + font-size: 1rem; + } + + & > ul.recent-ul { + list-style: none; + margin-top: 1rem; + padding-left: 0; + + & > li { + margin: 1rem 0; + .section > .desc > h3 > a { + background-color: transparent; + } + + .section > .meta { + margin: 0 0 0.5rem 0; + opacity: 0.6; + } + } + } +} diff --git a/quartz/components/styles/search.scss b/quartz/components/styles/search.scss new file mode 100644 index 00000000..4d5ad95c --- /dev/null +++ b/quartz/components/styles/search.scss @@ -0,0 +1,140 @@ +@use "../../styles/variables.scss" as *; + +.search { + min-width: fit-content; + max-width: 14rem; + flex-grow: 0.3; + + & > #search-icon { + background-color: var(--lightgray); + border-radius: 4px; + height: 2rem; + display: flex; + align-items: center; + cursor: pointer; + white-space: nowrap; + + & > div { + flex-grow: 1; + } + + & > p { + display: inline; + padding: 0 1rem; + } + + & svg { + cursor: pointer; + width: 18px; + min-width: 18px; + margin: 0 0.5rem; + + .search-path { + stroke: var(--darkgray); + stroke-width: 2px; + transition: stroke 0.5s ease; + } + } + } + + & > #search-container { + position: fixed; + contain: layout; + z-index: 999; + left: 0; + top: 0; + width: 100vw; + height: 100vh; + overflow-y: auto; + display: none; + backdrop-filter: blur(4px); + + &.active { + display: inline-block; + } + + & > #search-space { + width: 50%; + margin-top: 15vh; + margin-left: auto; + margin-right: auto; + + @media all and (max-width: $fullPageWidth) { + width: 90%; + } + + & > * { + width: 100%; + border-radius: 5px; + background: var(--light); + box-shadow: + 0 14px 50px rgba(27, 33, 48, 0.12), + 0 10px 30px rgba(27, 33, 48, 0.16); + margin-bottom: 2em; + } + + & > input { + box-sizing: border-box; + padding: 0.5em 1em; + font-family: var(--bodyFont); + color: var(--dark); + font-size: 1.1em; + border: 1px solid var(--lightgray); + + &:focus { + outline: none; + } + } + + & > #results-container { + & .result-card { + padding: 1em; + cursor: pointer; + transition: background 0.2s ease; + border: 1px solid var(--lightgray); + border-bottom: none; + width: 100%; + + // normalize button props + font-family: inherit; + font-size: 100%; + line-height: 1.15; + margin: 0; + text-transform: none; + text-align: left; + background: var(--light); + outline: none; + + & .highlight { + color: var(--secondary); + font-weight: 700; + } + + &:hover, + &:focus { + background: var(--lightgray); + } + + &:first-of-type { + border-top-left-radius: 5px; + border-top-right-radius: 5px; + } + + &:last-of-type { + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; + border-bottom: 1px solid var(--lightgray); + } + + & > h3 { + margin: 0; + } + + & > p { + margin-bottom: 0; + } + } + } + } + } +} diff --git a/quartz/components/styles/toc.scss b/quartz/components/styles/toc.scss new file mode 100644 index 00000000..3fac4432 --- /dev/null +++ b/quartz/components/styles/toc.scss @@ -0,0 +1,59 @@ +button#toc { + background-color: transparent; + border: none; + text-align: left; + cursor: pointer; + padding: 0; + color: var(--dark); + display: flex; + align-items: center; + + & h3 { + font-size: 1rem; + display: inline-block; + margin: 0; + } + + & .fold { + margin-left: 0.5rem; + transition: transform 0.3s ease; + opacity: 0.8; + } + + &.collapsed .fold { + transform: rotateZ(-90deg); + } +} + +#toc-content { + list-style: none; + overflow: hidden; + max-height: none; + transition: max-height 0.5s ease; + + &.collapsed > .overflow::after { + opacity: 0; + } + + & ul { + list-style: none; + margin: 0.5rem 0; + padding: 0; + & > li > a { + color: var(--dark); + opacity: 0.35; + transition: + 0.5s ease opacity, + 0.3s ease color; + &.in-view { + opacity: 0.75; + } + } + } + + @for $i from 0 through 6 { + & .depth-#{$i} { + padding-left: calc(1rem * #{$i}); + } + } +} diff --git a/quartz/components/types.ts b/quartz/components/types.ts new file mode 100644 index 00000000..fd9574f5 --- /dev/null +++ b/quartz/components/types.ts @@ -0,0 +1,27 @@ +import { ComponentType, JSX } from "preact" +import { StaticResources } from "../util/resources" +import { QuartzPluginData } from "../plugins/vfile" +import { GlobalConfiguration } from "../cfg" +import { Node } from "hast" + +export type QuartzComponentProps = { + externalResources: StaticResources + fileData: QuartzPluginData + cfg: GlobalConfiguration + children: (QuartzComponent | JSX.Element)[] + tree: Node + allFiles: QuartzPluginData[] + displayClass?: "mobile-only" | "desktop-only" +} & JSX.IntrinsicAttributes & { + [key: string]: any + } + +export type QuartzComponent = ComponentType & { + css?: string + beforeDOMLoaded?: string + afterDOMLoaded?: string +} + +export type QuartzComponentConstructor = ( + opts: Options, +) => QuartzComponent diff --git a/quartz/plugins/emitters/aliases.ts b/quartz/plugins/emitters/aliases.ts new file mode 100644 index 00000000..c7294a34 --- /dev/null +++ b/quartz/plugins/emitters/aliases.ts @@ -0,0 +1,47 @@ +import { FilePath, FullSlug, resolveRelative, simplifySlug } from "../../util/path" +import { QuartzEmitterPlugin } from "../types" +import path from "path" + +export const AliasRedirects: QuartzEmitterPlugin = () => ({ + name: "AliasRedirects", + getQuartzComponents() { + return [] + }, + async emit({ argv }, content, _resources, emit): Promise { + const fps: FilePath[] = [] + + for (const [_tree, file] of content) { + const ogSlug = simplifySlug(file.data.slug!) + const dir = path.posix.relative(argv.directory, file.dirname ?? argv.directory) + + let aliases: FullSlug[] = file.data.frontmatter?.aliases ?? file.data.frontmatter?.alias ?? [] + if (typeof aliases === "string") { + aliases = [aliases] + } + + for (const alias of aliases) { + const slug = path.posix.join(dir, alias) as FullSlug + const redirUrl = resolveRelative(slug, file.data.slug!) + const fp = await emit({ + content: ` + + + + ${ogSlug} + + + + + + + `, + slug, + ext: ".html", + }) + + fps.push(fp) + } + } + return fps + }, +}) diff --git a/quartz/plugins/emitters/assets.ts b/quartz/plugins/emitters/assets.ts new file mode 100644 index 00000000..edc22d9e --- /dev/null +++ b/quartz/plugins/emitters/assets.ts @@ -0,0 +1,33 @@ +import { FilePath, joinSegments, slugifyFilePath } from "../../util/path" +import { QuartzEmitterPlugin } from "../types" +import path from "path" +import fs from "fs" +import { glob } from "../../util/glob" + +export const Assets: QuartzEmitterPlugin = () => { + return { + name: "Assets", + getQuartzComponents() { + return [] + }, + async emit({ argv, cfg }, _content, _resources, _emit): Promise { + // glob all non MD/MDX/HTML files in content folder and copy it over + const assetsPath = argv.output + const fps = await glob("**", argv.directory, ["**/*.md", ...cfg.configuration.ignorePatterns]) + const res: FilePath[] = [] + for (const fp of fps) { + const ext = path.extname(fp) + const src = joinSegments(argv.directory, fp) as FilePath + const name = (slugifyFilePath(fp as FilePath, true) + ext) as FilePath + + const dest = joinSegments(assetsPath, name) as FilePath + const dir = path.dirname(dest) as FilePath + await fs.promises.mkdir(dir, { recursive: true }) // ensure dir exists + await fs.promises.copyFile(src, dest) + res.push(dest) + } + + return res + }, + } +} diff --git a/quartz/plugins/emitters/componentResources.ts b/quartz/plugins/emitters/componentResources.ts new file mode 100644 index 00000000..a62bc382 --- /dev/null +++ b/quartz/plugins/emitters/componentResources.ts @@ -0,0 +1,187 @@ +import { FilePath, FullSlug } from "../../util/path" +import { QuartzEmitterPlugin } from "../types" + +// @ts-ignore +import spaRouterScript from "../../components/scripts/spa.inline" +// @ts-ignore +import plausibleScript from "../../components/scripts/plausible.inline" +// @ts-ignore +import popoverScript from "../../components/scripts/popover.inline" +import styles from "../../styles/base.scss" +import popoverStyle from "../../components/styles/popover.scss" +import { BuildCtx } from "../../util/ctx" +import { StaticResources } from "../../util/resources" +import { QuartzComponent } from "../../components/types" +import { googleFontHref, joinStyles } from "../../util/theme" +import { Features, transform } from "lightningcss" + +type ComponentResources = { + css: string[] + beforeDOMLoaded: string[] + afterDOMLoaded: string[] +} + +function getComponentResources(ctx: BuildCtx): ComponentResources { + const allComponents: Set = new Set() + for (const emitter of ctx.cfg.plugins.emitters) { + const components = emitter.getQuartzComponents(ctx) + for (const component of components) { + allComponents.add(component) + } + } + + const componentResources = { + css: new Set(), + beforeDOMLoaded: new Set(), + afterDOMLoaded: new Set(), + } + + for (const component of allComponents) { + const { css, beforeDOMLoaded, afterDOMLoaded } = component + if (css) { + componentResources.css.add(css) + } + if (beforeDOMLoaded) { + componentResources.beforeDOMLoaded.add(beforeDOMLoaded) + } + if (afterDOMLoaded) { + componentResources.afterDOMLoaded.add(afterDOMLoaded) + } + } + + return { + css: [...componentResources.css], + beforeDOMLoaded: [...componentResources.beforeDOMLoaded], + afterDOMLoaded: [...componentResources.afterDOMLoaded], + } +} + +function joinScripts(scripts: string[]): string { + // wrap with iife to prevent scope collision + return scripts.map((script) => `(function () {${script}})();`).join("\n") +} + +function addGlobalPageResources( + ctx: BuildCtx, + staticResources: StaticResources, + componentResources: ComponentResources, +) { + const cfg = ctx.cfg.configuration + const reloadScript = ctx.argv.serve + + // popovers + if (cfg.enablePopovers) { + componentResources.afterDOMLoaded.push(popoverScript) + componentResources.css.push(popoverStyle) + } + + if (cfg.analytics?.provider === "google") { + const tagId = cfg.analytics.tagId + staticResources.js.push({ + src: `https://www.googletagmanager.com/gtag/js?id=${tagId}`, + contentType: "external", + loadTime: "afterDOMReady", + }) + componentResources.afterDOMLoaded.push(` + window.dataLayer = window.dataLayer || []; + function gtag() { dataLayer.push(arguments); } + gtag(\`js\`, new Date()); + gtag(\`config\`, \`${tagId}\`, { send_page_view: false }); + + document.addEventListener(\`nav\`, () => { + gtag(\`event\`, \`page_view\`, { + page_title: document.title, + page_location: location.href, + }); + });`) + } else if (cfg.analytics?.provider === "plausible") { + componentResources.afterDOMLoaded.push(plausibleScript) + } + + if (cfg.enableSPA) { + componentResources.afterDOMLoaded.push(spaRouterScript) + } else { + componentResources.afterDOMLoaded.push(` + window.spaNavigate = (url, _) => window.location.assign(url) + const event = new CustomEvent("nav", { detail: { url: document.body.dataset.slug } }) + document.dispatchEvent(event)`) + } + + if (reloadScript) { + staticResources.js.push({ + loadTime: "afterDOMReady", + contentType: "inline", + script: ` + const socket = new WebSocket('ws://localhost:3001') + socket.addEventListener('message', () => document.location.reload()) + `, + }) + } +} + +interface Options { + fontOrigin: "googleFonts" | "local" +} + +const defaultOptions: Options = { + fontOrigin: "googleFonts", +} + +export const ComponentResources: QuartzEmitterPlugin = (opts?: Partial) => { + const { fontOrigin } = { ...defaultOptions, ...opts } + return { + name: "ComponentResources", + getQuartzComponents() { + return [] + }, + async emit(ctx, _content, resources, emit): Promise { + // component specific scripts and styles + const componentResources = getComponentResources(ctx) + // important that this goes *after* component scripts + // as the "nav" event gets triggered here and we should make sure + // that everyone else had the chance to register a listener for it + + if (fontOrigin === "googleFonts") { + resources.css.push(googleFontHref(ctx.cfg.configuration.theme)) + } else if (fontOrigin === "local") { + // let the user do it themselves in css + } + + addGlobalPageResources(ctx, resources, componentResources) + + const stylesheet = joinStyles(ctx.cfg.configuration.theme, styles, ...componentResources.css) + const prescript = joinScripts(componentResources.beforeDOMLoaded) + const postscript = joinScripts(componentResources.afterDOMLoaded) + const fps = await Promise.all([ + emit({ + slug: "index" as FullSlug, + ext: ".css", + content: transform({ + filename: "index.css", + code: Buffer.from(stylesheet), + minify: true, + targets: { + safari: (15 << 16) | (6 << 8), // 15.6 + ios_saf: (15 << 16) | (6 << 8), // 15.6 + edge: 115 << 16, + firefox: 102 << 16, + chrome: 109 << 16, + }, + include: Features.MediaQueries, + }).code.toString(), + }), + emit({ + slug: "prescript" as FullSlug, + ext: ".js", + content: prescript, + }), + emit({ + slug: "postscript" as FullSlug, + ext: ".js", + content: postscript, + }), + ]) + return fps + }, + } +} diff --git a/quartz/plugins/emitters/contentIndex.ts b/quartz/plugins/emitters/contentIndex.ts new file mode 100644 index 00000000..f4bf6db0 --- /dev/null +++ b/quartz/plugins/emitters/contentIndex.ts @@ -0,0 +1,134 @@ +import { GlobalConfiguration } from "../../cfg" +import { FilePath, FullSlug, SimpleSlug, simplifySlug } from "../../util/path" +import { QuartzEmitterPlugin } from "../types" +import path from "path" + +export type ContentIndex = Map +export type ContentDetails = { + title: string + links: SimpleSlug[] + tags: string[] + content: string + date?: Date + description?: string +} + +interface Options { + enableSiteMap: boolean + enableRSS: boolean + includeEmptyFiles: boolean +} + +const defaultOptions: Options = { + enableSiteMap: true, + enableRSS: true, + includeEmptyFiles: false, +} + +function generateSiteMap(cfg: GlobalConfiguration, idx: ContentIndex): string { + const base = cfg.baseUrl ?? "" + const createURLEntry = (slug: SimpleSlug, content: ContentDetails): string => ` + https://${base}/${slug} + ${content.date?.toISOString()} + ` + const urls = Array.from(idx) + .map(([slug, content]) => createURLEntry(simplifySlug(slug), content)) + .join("") + return `${urls}` +} + +function generateRSSFeed(cfg: GlobalConfiguration, idx: ContentIndex): string { + const base = cfg.baseUrl ?? "" + const root = `https://${base}` + + const createURLEntry = (slug: SimpleSlug, content: ContentDetails): string => ` + ${content.title} + ${root}/${slug} + ${root}/${slug} + ${content.description} + ${content.date?.toUTCString()} + ` + + const items = Array.from(idx) + .map(([slug, content]) => createURLEntry(simplifySlug(slug), content)) + .join("") + return ` + + ${cfg.pageTitle} + ${root} + Recent content on ${cfg.pageTitle} + Quartz -- quartz.jzhao.xyz + + + ${items} + ` +} + +export const ContentIndex: QuartzEmitterPlugin> = (opts) => { + opts = { ...defaultOptions, ...opts } + return { + name: "ContentIndex", + async emit(ctx, content, _resources, emit) { + const cfg = ctx.cfg.configuration + const emitted: FilePath[] = [] + const linkIndex: ContentIndex = new Map() + for (const [_tree, file] of content) { + const slug = file.data.slug! + const date = file.data.dates?.modified ?? new Date() + if (opts?.includeEmptyFiles || (file.data.text && file.data.text !== "")) { + linkIndex.set(slug, { + title: file.data.frontmatter?.title!, + links: file.data.links ?? [], + tags: file.data.frontmatter?.tags ?? [], + content: file.data.text ?? "", + date: date, + description: file.data.description ?? "", + }) + } + } + + if (opts?.enableSiteMap) { + emitted.push( + await emit({ + content: generateSiteMap(cfg, linkIndex), + slug: "sitemap" as FullSlug, + ext: ".xml", + }), + ) + } + + if (opts?.enableRSS) { + emitted.push( + await emit({ + content: generateRSSFeed(cfg, linkIndex), + slug: "index" as FullSlug, + ext: ".xml", + }), + ) + } + + const fp = path.join("static", "contentIndex") as FullSlug + const simplifiedIndex = Object.fromEntries( + Array.from(linkIndex).map(([slug, content]) => { + // remove description and from content index as nothing downstream + // actually uses it. we only keep it in the index as we need it + // for the RSS feed + delete content.description + delete content.date + return [slug, content] + }), + ) + + emitted.push( + await emit({ + content: JSON.stringify(simplifiedIndex), + slug: fp, + ext: ".json", + }), + ) + + return emitted + }, + getQuartzComponents: () => [], + } +} diff --git a/quartz/plugins/emitters/contentPage.tsx b/quartz/plugins/emitters/contentPage.tsx new file mode 100644 index 00000000..0e510db8 --- /dev/null +++ b/quartz/plugins/emitters/contentPage.tsx @@ -0,0 +1,56 @@ +import { QuartzEmitterPlugin } from "../types" +import { QuartzComponentProps } from "../../components/types" +import HeaderConstructor from "../../components/Header" +import BodyConstructor from "../../components/Body" +import { pageResources, renderPage } from "../../components/renderPage" +import { FullPageLayout } from "../../cfg" +import { FilePath } from "../../util/path" +import { defaultContentPageLayout, sharedPageComponents } from "../../../quartz.layout" +import { Content } from "../../components" + +export const ContentPage: QuartzEmitterPlugin> = (userOpts) => { + const opts: FullPageLayout = { + ...sharedPageComponents, + ...defaultContentPageLayout, + pageBody: Content(), + ...userOpts, + } + + const { head: Head, header, beforeBody, pageBody, left, right, footer: Footer } = opts + const Header = HeaderConstructor() + const Body = BodyConstructor() + + return { + name: "ContentPage", + getQuartzComponents() { + return [Head, Header, Body, ...header, ...beforeBody, pageBody, ...left, ...right, Footer] + }, + async emit(ctx, content, resources, emit): Promise { + const cfg = ctx.cfg.configuration + const fps: FilePath[] = [] + const allFiles = content.map((c) => c[1].data) + for (const [tree, file] of content) { + const slug = file.data.slug! + const externalResources = pageResources(slug, resources) + const componentData: QuartzComponentProps = { + fileData: file.data, + externalResources, + cfg, + children: [], + tree, + allFiles, + } + + const content = renderPage(slug, componentData, opts, externalResources) + const fp = await emit({ + content, + slug, + ext: ".html", + }) + + fps.push(fp) + } + return fps + }, + } +} diff --git a/quartz/plugins/emitters/folderPage.tsx b/quartz/plugins/emitters/folderPage.tsx new file mode 100644 index 00000000..8d62f7bb --- /dev/null +++ b/quartz/plugins/emitters/folderPage.tsx @@ -0,0 +1,95 @@ +import { QuartzEmitterPlugin } from "../types" +import { QuartzComponentProps } from "../../components/types" +import HeaderConstructor from "../../components/Header" +import BodyConstructor from "../../components/Body" +import { pageResources, renderPage } from "../../components/renderPage" +import { ProcessedContent, defaultProcessedContent } from "../vfile" +import { FullPageLayout } from "../../cfg" +import path from "path" +import { + FilePath, + FullSlug, + SimpleSlug, + _stripSlashes, + joinSegments, + simplifySlug, +} from "../../util/path" +import { defaultListPageLayout, sharedPageComponents } from "../../../quartz.layout" +import { FolderContent } from "../../components" + +export const FolderPage: QuartzEmitterPlugin = (userOpts) => { + const opts: FullPageLayout = { + ...sharedPageComponents, + ...defaultListPageLayout, + pageBody: FolderContent(), + ...userOpts, + } + + const { head: Head, header, beforeBody, pageBody, left, right, footer: Footer } = opts + const Header = HeaderConstructor() + const Body = BodyConstructor() + + return { + name: "FolderPage", + getQuartzComponents() { + return [Head, Header, Body, ...header, ...beforeBody, pageBody, ...left, ...right, Footer] + }, + async emit(ctx, content, resources, emit): Promise { + const fps: FilePath[] = [] + const allFiles = content.map((c) => c[1].data) + const cfg = ctx.cfg.configuration + + const folders: Set = new Set( + allFiles.flatMap((data) => { + const slug = data.slug + const folderName = path.dirname(slug ?? "") as SimpleSlug + if (slug && folderName !== "." && folderName !== "tags") { + return [folderName] + } + return [] + }), + ) + + const folderDescriptions: Record = Object.fromEntries( + [...folders].map((folder) => [ + folder, + defaultProcessedContent({ + slug: joinSegments(folder, "index") as FullSlug, + frontmatter: { title: `Folder: ${folder}`, tags: [] }, + }), + ]), + ) + + for (const [tree, file] of content) { + const slug = _stripSlashes(simplifySlug(file.data.slug!)) as SimpleSlug + if (folders.has(slug)) { + folderDescriptions[slug] = [tree, file] + } + } + + for (const folder of folders) { + const slug = joinSegments(folder, "index") as FullSlug + const externalResources = pageResources(slug, resources) + const [tree, file] = folderDescriptions[folder] + const componentData: QuartzComponentProps = { + fileData: file.data, + externalResources, + cfg, + children: [], + tree, + allFiles, + } + + const content = renderPage(slug, componentData, opts, externalResources) + const fp = await emit({ + content, + slug, + ext: ".html", + }) + + fps.push(fp) + } + return fps + }, + } +} diff --git a/quartz/plugins/emitters/index.ts b/quartz/plugins/emitters/index.ts new file mode 100644 index 00000000..da95d490 --- /dev/null +++ b/quartz/plugins/emitters/index.ts @@ -0,0 +1,8 @@ +export { ContentPage } from "./contentPage" +export { TagPage } from "./tagPage" +export { FolderPage } from "./folderPage" +export { ContentIndex } from "./contentIndex" +export { AliasRedirects } from "./aliases" +export { Assets } from "./assets" +export { Static } from "./static" +export { ComponentResources } from "./componentResources" diff --git a/quartz/plugins/emitters/static.ts b/quartz/plugins/emitters/static.ts new file mode 100644 index 00000000..6f5d19d4 --- /dev/null +++ b/quartz/plugins/emitters/static.ts @@ -0,0 +1,17 @@ +import { FilePath, QUARTZ, joinSegments } from "../../util/path" +import { QuartzEmitterPlugin } from "../types" +import fs from "fs" +import { glob } from "../../util/glob" + +export const Static: QuartzEmitterPlugin = () => ({ + name: "Static", + getQuartzComponents() { + return [] + }, + async emit({ argv, cfg }, _content, _resources, _emit): Promise { + const staticPath = joinSegments(QUARTZ, "static") + const fps = await glob("**", staticPath, cfg.configuration.ignorePatterns) + await fs.promises.cp(staticPath, joinSegments(argv.output, "static"), { recursive: true }) + return fps.map((fp) => joinSegments(argv.output, "static", fp)) as FilePath[] + }, +}) diff --git a/quartz/plugins/emitters/tagPage.tsx b/quartz/plugins/emitters/tagPage.tsx new file mode 100644 index 00000000..54ad934f --- /dev/null +++ b/quartz/plugins/emitters/tagPage.tsx @@ -0,0 +1,88 @@ +import { QuartzEmitterPlugin } from "../types" +import { QuartzComponentProps } from "../../components/types" +import HeaderConstructor from "../../components/Header" +import BodyConstructor from "../../components/Body" +import { pageResources, renderPage } from "../../components/renderPage" +import { ProcessedContent, defaultProcessedContent } from "../vfile" +import { FullPageLayout } from "../../cfg" +import { FilePath, FullSlug, getAllSegmentPrefixes, joinSegments } from "../../util/path" +import { defaultListPageLayout, sharedPageComponents } from "../../../quartz.layout" +import { TagContent } from "../../components" + +export const TagPage: QuartzEmitterPlugin = (userOpts) => { + const opts: FullPageLayout = { + ...sharedPageComponents, + ...defaultListPageLayout, + pageBody: TagContent(), + ...userOpts, + } + + const { head: Head, header, beforeBody, pageBody, left, right, footer: Footer } = opts + const Header = HeaderConstructor() + const Body = BodyConstructor() + + return { + name: "TagPage", + getQuartzComponents() { + return [Head, Header, Body, ...header, ...beforeBody, pageBody, ...left, ...right, Footer] + }, + async emit(ctx, content, resources, emit): Promise { + const fps: FilePath[] = [] + const allFiles = content.map((c) => c[1].data) + const cfg = ctx.cfg.configuration + + const tags: Set = new Set( + allFiles.flatMap((data) => data.frontmatter?.tags ?? []).flatMap(getAllSegmentPrefixes), + ) + // add base tag + tags.add("index") + + const tagDescriptions: Record = Object.fromEntries( + [...tags].map((tag) => { + const title = tag === "" ? "Tag Index" : `Tag: #${tag}` + return [ + tag, + defaultProcessedContent({ + slug: joinSegments("tags", tag) as FullSlug, + frontmatter: { title, tags: [] }, + }), + ] + }), + ) + + for (const [tree, file] of content) { + const slug = file.data.slug! + if (slug.startsWith("tags/")) { + const tag = slug.slice("tags/".length) + if (tags.has(tag)) { + tagDescriptions[tag] = [tree, file] + } + } + } + + for (const tag of tags) { + const slug = joinSegments("tags", tag) as FullSlug + const externalResources = pageResources(slug, resources) + const [tree, file] = tagDescriptions[tag] + const componentData: QuartzComponentProps = { + fileData: file.data, + externalResources, + cfg, + children: [], + tree, + allFiles, + } + + const content = renderPage(slug, componentData, opts, externalResources) + const fp = await emit({ + content, + slug: file.data.slug!, + ext: ".html", + }) + + fps.push(fp) + } + return fps + }, + } +} diff --git a/quartz/plugins/filters/draft.ts b/quartz/plugins/filters/draft.ts new file mode 100644 index 00000000..65e2d6b6 --- /dev/null +++ b/quartz/plugins/filters/draft.ts @@ -0,0 +1,9 @@ +import { QuartzFilterPlugin } from "../types" + +export const RemoveDrafts: QuartzFilterPlugin<{}> = () => ({ + name: "RemoveDrafts", + shouldPublish(_ctx, [_tree, vfile]) { + const draftFlag: boolean = vfile.data?.frontmatter?.draft ?? false + return !draftFlag + }, +}) diff --git a/quartz/plugins/filters/explicit.ts b/quartz/plugins/filters/explicit.ts new file mode 100644 index 00000000..30f0b37f --- /dev/null +++ b/quartz/plugins/filters/explicit.ts @@ -0,0 +1,9 @@ +import { QuartzFilterPlugin } from "../types" + +export const ExplicitPublish: QuartzFilterPlugin = () => ({ + name: "ExplicitPublish", + shouldPublish(_ctx, [_tree, vfile]) { + const publishFlag: boolean = vfile.data?.frontmatter?.publish ?? false + return publishFlag + }, +}) diff --git a/quartz/plugins/filters/index.ts b/quartz/plugins/filters/index.ts new file mode 100644 index 00000000..d9371434 --- /dev/null +++ b/quartz/plugins/filters/index.ts @@ -0,0 +1,2 @@ +export { RemoveDrafts } from "./draft" +export { ExplicitPublish } from "./explicit" diff --git a/quartz/plugins/index.ts b/quartz/plugins/index.ts new file mode 100644 index 00000000..9753d2ea --- /dev/null +++ b/quartz/plugins/index.ts @@ -0,0 +1,34 @@ +import { StaticResources } from "../util/resources" +import { FilePath, FullSlug } from "../util/path" +import { BuildCtx } from "../util/ctx" + +export function getStaticResourcesFromPlugins(ctx: BuildCtx) { + const staticResources: StaticResources = { + css: [], + js: [], + } + + for (const transformer of ctx.cfg.plugins.transformers) { + const res = transformer.externalResources ? transformer.externalResources(ctx) : {} + if (res?.js) { + staticResources.js.push(...res.js) + } + if (res?.css) { + staticResources.css.push(...res.css) + } + } + + return staticResources +} + +export * from "./transformers" +export * from "./filters" +export * from "./emitters" + +declare module "vfile" { + // inserted in processors.ts + interface DataMap { + slug: FullSlug + filePath: FilePath + } +} diff --git a/quartz/plugins/transformers/description.ts b/quartz/plugins/transformers/description.ts new file mode 100644 index 00000000..08af5c78 --- /dev/null +++ b/quartz/plugins/transformers/description.ts @@ -0,0 +1,59 @@ +import { Root as HTMLRoot } from "hast" +import { toString } from "hast-util-to-string" +import { QuartzTransformerPlugin } from "../types" + +export interface Options { + descriptionLength: number +} + +const defaultOptions: Options = { + descriptionLength: 150, +} + +const escapeHTML = (unsafe: string) => { + return unsafe + .replaceAll("&", "&") + .replaceAll("<", "<") + .replaceAll(">", ">") + .replaceAll('"', """) + .replaceAll("'", "'") +} + +export const Description: QuartzTransformerPlugin | undefined> = (userOpts) => { + const opts = { ...defaultOptions, ...userOpts } + return { + name: "Description", + htmlPlugins() { + return [ + () => { + return async (tree: HTMLRoot, file) => { + const frontMatterDescription = file.data.frontmatter?.description + const text = escapeHTML(toString(tree)) + + const desc = frontMatterDescription ?? text + const sentences = desc.replace(/\s+/g, " ").split(".") + let finalDesc = "" + let sentenceIdx = 0 + const len = opts.descriptionLength + while (finalDesc.length < len) { + const sentence = sentences[sentenceIdx] + if (!sentence) break + finalDesc += sentence + "." + sentenceIdx++ + } + + file.data.description = finalDesc + file.data.text = text + } + }, + ] + }, + } +} + +declare module "vfile" { + interface DataMap { + description: string + text: string + } +} diff --git a/quartz/plugins/transformers/frontmatter.ts b/quartz/plugins/transformers/frontmatter.ts new file mode 100644 index 00000000..5b067f63 --- /dev/null +++ b/quartz/plugins/transformers/frontmatter.ts @@ -0,0 +1,66 @@ +import matter from "gray-matter" +import remarkFrontmatter from "remark-frontmatter" +import { QuartzTransformerPlugin } from "../types" +import yaml from "js-yaml" +import { slugTag } from "../../util/path" + +export interface Options { + delims: string | string[] +} + +const defaultOptions: Options = { + delims: "---", +} + +export const FrontMatter: QuartzTransformerPlugin | undefined> = (userOpts) => { + const opts = { ...defaultOptions, ...userOpts } + return { + name: "FrontMatter", + markdownPlugins() { + return [ + remarkFrontmatter, + () => { + return (_, file) => { + const { data } = matter(file.value, { + ...opts, + engines: { + yaml: (s) => yaml.load(s, { schema: yaml.JSON_SCHEMA }) as object, + }, + }) + + // tag is an alias for tags + if (data.tag) { + data.tags = data.tag + } + + if (data.tags && !Array.isArray(data.tags)) { + data.tags = data.tags + .toString() + .split(",") + .map((tag: string) => tag.trim()) + } + + // slug them all!! + data.tags = data.tags?.map((tag: string) => slugTag(tag)) ?? [] + + // fill in frontmatter + file.data.frontmatter = { + title: file.stem ?? "Untitled", + tags: [], + ...data, + } + } + }, + ] + }, + } +} + +declare module "vfile" { + interface DataMap { + frontmatter: { [key: string]: any } & { + title: string + tags: string[] + } + } +} diff --git a/quartz/plugins/transformers/gfm.ts b/quartz/plugins/transformers/gfm.ts new file mode 100644 index 00000000..62624aac --- /dev/null +++ b/quartz/plugins/transformers/gfm.ts @@ -0,0 +1,46 @@ +import remarkGfm from "remark-gfm" +import smartypants from "remark-smartypants" +import { QuartzTransformerPlugin } from "../types" +import rehypeSlug from "rehype-slug" +import rehypeAutolinkHeadings from "rehype-autolink-headings" + +export interface Options { + enableSmartyPants: boolean + linkHeadings: boolean +} + +const defaultOptions: Options = { + enableSmartyPants: true, + linkHeadings: true, +} + +export const GitHubFlavoredMarkdown: QuartzTransformerPlugin | undefined> = ( + userOpts, +) => { + const opts = { ...defaultOptions, ...userOpts } + return { + name: "GitHubFlavoredMarkdown", + markdownPlugins() { + return opts.enableSmartyPants ? [remarkGfm, smartypants] : [remarkGfm] + }, + htmlPlugins() { + if (opts.linkHeadings) { + return [ + rehypeSlug, + [ + rehypeAutolinkHeadings, + { + behavior: "append", + content: { + type: "text", + value: " §", + }, + }, + ], + ] + } else { + return [] + } + }, + } +} diff --git a/quartz/plugins/transformers/index.ts b/quartz/plugins/transformers/index.ts new file mode 100644 index 00000000..8013ab7c --- /dev/null +++ b/quartz/plugins/transformers/index.ts @@ -0,0 +1,9 @@ +export { FrontMatter } from "./frontmatter" +export { GitHubFlavoredMarkdown } from "./gfm" +export { CreatedModifiedDate } from "./lastmod" +export { Latex } from "./latex" +export { Description } from "./description" +export { CrawlLinks } from "./links" +export { ObsidianFlavoredMarkdown } from "./ofm" +export { SyntaxHighlighting } from "./syntax" +export { TableOfContents } from "./toc" diff --git a/quartz/plugins/transformers/lastmod.ts b/quartz/plugins/transformers/lastmod.ts new file mode 100644 index 00000000..507b5852 --- /dev/null +++ b/quartz/plugins/transformers/lastmod.ts @@ -0,0 +1,71 @@ +import fs from "fs" +import path from "path" +import { Repository } from "@napi-rs/simple-git" +import { QuartzTransformerPlugin } from "../types" + +export interface Options { + priority: ("frontmatter" | "git" | "filesystem")[] +} + +const defaultOptions: Options = { + priority: ["frontmatter", "git", "filesystem"], +} + +type MaybeDate = undefined | string | number +export const CreatedModifiedDate: QuartzTransformerPlugin | undefined> = ( + userOpts, +) => { + const opts = { ...defaultOptions, ...userOpts } + return { + name: "CreatedModifiedDate", + markdownPlugins() { + return [ + () => { + let repo: Repository | undefined = undefined + return async (_tree, file) => { + let created: MaybeDate = undefined + let modified: MaybeDate = undefined + let published: MaybeDate = undefined + + const fp = path.posix.join(file.cwd, file.data.filePath as string) + for (const source of opts.priority) { + if (source === "filesystem") { + const st = await fs.promises.stat(fp) + created ||= st.birthtimeMs + modified ||= st.mtimeMs + } else if (source === "frontmatter" && file.data.frontmatter) { + created ||= file.data.frontmatter.date + modified ||= file.data.frontmatter.lastmod + modified ||= file.data.frontmatter.updated + modified ||= file.data.frontmatter["last-modified"] + published ||= file.data.frontmatter.publishDate + } else if (source === "git") { + if (!repo) { + repo = new Repository(file.cwd) + } + + modified ||= await repo.getFileLatestModifiedDateAsync(file.data.filePath!) + } + } + + file.data.dates = { + created: created ? new Date(created) : new Date(), + modified: modified ? new Date(modified) : new Date(), + published: published ? new Date(published) : new Date(), + } + } + }, + ] + }, + } +} + +declare module "vfile" { + interface DataMap { + dates: { + created: Date + modified: Date + published: Date + } + } +} diff --git a/quartz/plugins/transformers/latex.ts b/quartz/plugins/transformers/latex.ts new file mode 100644 index 00000000..5c6f7678 --- /dev/null +++ b/quartz/plugins/transformers/latex.ts @@ -0,0 +1,45 @@ +import remarkMath from "remark-math" +import rehypeKatex from "rehype-katex" +import rehypeMathjax from "rehype-mathjax/svg.js" +import { QuartzTransformerPlugin } from "../types" + +interface Options { + renderEngine: "katex" | "mathjax" +} + +export const Latex: QuartzTransformerPlugin = (opts?: Options) => { + const engine = opts?.renderEngine ?? "katex" + return { + name: "Latex", + markdownPlugins() { + return [remarkMath] + }, + htmlPlugins() { + if (engine === "katex") { + return [[rehypeKatex, { output: "html" }]] + } else { + return [rehypeMathjax] + } + }, + externalResources() { + if (engine === "katex") { + return { + css: [ + // base css + "https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.css", + ], + js: [ + { + // fix copy behaviour: https://github.com/KaTeX/KaTeX/blob/main/contrib/copy-tex/README.md + src: "https://cdn.jsdelivr.net/npm/katex@0.16.7/dist/contrib/copy-tex.min.js", + loadTime: "afterDOMReady", + contentType: "external", + }, + ], + } + } else { + return {} + } + }, + } +} diff --git a/quartz/plugins/transformers/links.ts b/quartz/plugins/transformers/links.ts new file mode 100644 index 00000000..d9c9c7c6 --- /dev/null +++ b/quartz/plugins/transformers/links.ts @@ -0,0 +1,111 @@ +import { QuartzTransformerPlugin } from "../types" +import { + FullSlug, + RelativeURL, + SimpleSlug, + TransformOptions, + _stripSlashes, + joinSegments, + simplifySlug, + splitAnchor, + transformLink, +} from "../../util/path" +import path from "path" +import { visit } from "unist-util-visit" +import isAbsoluteUrl from "is-absolute-url" + +interface Options { + /** How to resolve Markdown paths */ + markdownLinkResolution: TransformOptions["strategy"] + /** Strips folders from a link so that it looks nice */ + prettyLinks: boolean +} + +const defaultOptions: Options = { + markdownLinkResolution: "absolute", + prettyLinks: true, +} + +export const CrawlLinks: QuartzTransformerPlugin | undefined> = (userOpts) => { + const opts = { ...defaultOptions, ...userOpts } + return { + name: "LinkProcessing", + htmlPlugins(ctx) { + return [ + () => { + return (tree, file) => { + const curSlug = simplifySlug(file.data.slug!) + const outgoing: Set = new Set() + + const transformOptions: TransformOptions = { + strategy: opts.markdownLinkResolution, + allSlugs: ctx.allSlugs, + } + + visit(tree, "element", (node, _index, _parent) => { + // rewrite all links + if ( + node.tagName === "a" && + node.properties && + typeof node.properties.href === "string" + ) { + let dest = node.properties.href as RelativeURL + node.properties.className ??= [] + node.properties.className.push(isAbsoluteUrl(dest) ? "external" : "internal") + + // don't process external links or intra-document anchors + if (!(isAbsoluteUrl(dest) || dest.startsWith("#"))) { + dest = node.properties.href = transformLink( + file.data.slug!, + dest, + transformOptions, + ) + const url = new URL(dest, `https://base.com/${curSlug}`) + const canonicalDest = url.pathname + const [destCanonical, _destAnchor] = splitAnchor(canonicalDest) + const simple = simplifySlug(destCanonical as FullSlug) + outgoing.add(simple) + } + + // rewrite link internals if prettylinks is on + if ( + opts.prettyLinks && + node.children.length === 1 && + node.children[0].type === "text" && + !node.children[0].value.startsWith("#") + ) { + node.children[0].value = path.basename(node.children[0].value) + } + } + + // transform all other resources that may use links + if ( + ["img", "video", "audio", "iframe"].includes(node.tagName) && + node.properties && + typeof node.properties.src === "string" + ) { + if (!isAbsoluteUrl(node.properties.src)) { + let dest = node.properties.src as RelativeURL + dest = node.properties.src = transformLink( + file.data.slug!, + dest, + transformOptions, + ) + node.properties.src = dest + } + } + }) + + file.data.links = [...outgoing] + } + }, + ] + }, + } +} + +declare module "vfile" { + interface DataMap { + links: SimpleSlug[] + } +} diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts new file mode 100644 index 00000000..b66ba850 --- /dev/null +++ b/quartz/plugins/transformers/ofm.ts @@ -0,0 +1,451 @@ +import { PluggableList } from "unified" +import { QuartzTransformerPlugin } from "../types" +import { Root, HTML, BlockContent, DefinitionContent, Code, Paragraph } from "mdast" +import { Replace, findAndReplace as mdastFindReplace } from "mdast-util-find-and-replace" +import { slug as slugAnchor } from "github-slugger" +import rehypeRaw from "rehype-raw" +import { visit } from "unist-util-visit" +import path from "path" +import { JSResource } from "../../util/resources" +// @ts-ignore +import calloutScript from "../../components/scripts/callout.inline.ts" +import { FilePath, pathToRoot, slugTag, slugifyFilePath } from "../../util/path" +import { toHast } from "mdast-util-to-hast" +import { toHtml } from "hast-util-to-html" +import { PhrasingContent } from "mdast-util-find-and-replace/lib" + +export interface Options { + comments: boolean + highlight: boolean + wikilinks: boolean + callouts: boolean + mermaid: boolean + parseTags: boolean + enableInHtmlEmbed: boolean +} + +const defaultOptions: Options = { + comments: true, + highlight: true, + wikilinks: true, + callouts: true, + mermaid: true, + parseTags: true, + enableInHtmlEmbed: false, +} + +const icons = { + infoIcon: ``, + pencilIcon: ``, + clipboardListIcon: ``, + checkCircleIcon: ``, + flameIcon: ``, + checkIcon: ``, + helpCircleIcon: ``, + alertTriangleIcon: ``, + xIcon: ``, + zapIcon: ``, + bugIcon: ``, + listIcon: ``, + quoteIcon: ``, +} + +const callouts = { + note: icons.pencilIcon, + abstract: icons.clipboardListIcon, + info: icons.infoIcon, + todo: icons.checkCircleIcon, + tip: icons.flameIcon, + success: icons.checkIcon, + question: icons.helpCircleIcon, + warning: icons.alertTriangleIcon, + failure: icons.xIcon, + danger: icons.zapIcon, + bug: icons.bugIcon, + example: icons.listIcon, + quote: icons.quoteIcon, +} + +const calloutMapping: Record = { + note: "note", + abstract: "abstract", + info: "info", + todo: "todo", + tip: "tip", + hint: "tip", + important: "tip", + success: "success", + check: "success", + done: "success", + question: "question", + help: "question", + faq: "question", + warning: "warning", + attention: "warning", + caution: "warning", + failure: "failure", + missing: "failure", + fail: "failure", + danger: "danger", + error: "danger", + bug: "bug", + example: "example", + quote: "quote", + cite: "quote", +} + +function canonicalizeCallout(calloutName: string): keyof typeof callouts { + let callout = calloutName.toLowerCase() as keyof typeof calloutMapping + return calloutMapping[callout] ?? calloutName +} + +const capitalize = (s: string): string => { + return s.substring(0, 1).toUpperCase() + s.substring(1) +} + +// !? -> optional embedding +// \[\[ -> open brace +// ([^\[\]\|\#]+) -> one or more non-special characters ([,],|, or #) (name) +// (#[^\[\]\|\#]+)? -> # then one or more non-special characters (heading link) +// (|[^\[\]\|\#]+)? -> | then one or more non-special characters (alias) +const wikilinkRegex = new RegExp(/!?\[\[([^\[\]\|\#]+)?(#[^\[\]\|\#]+)?(\|[^\[\]\|\#]+)?\]\]/, "g") +const highlightRegex = new RegExp(/==(.+)==/, "g") +const commentRegex = new RegExp(/%%(.+)%%/, "g") +// from https://github.com/escwxyz/remark-obsidian-callout/blob/main/src/index.ts +const calloutRegex = new RegExp(/^\[\!(\w+)\]([+-]?)/) +const calloutLineRegex = new RegExp(/^> *\[\!\w+\][+-]?.*$/, "gm") +// (?:^| ) -> non-capturing group, tag should start be separated by a space or be the start of the line +// #(\w+) -> tag itself is # followed by a string of alpha-numeric characters +const tagRegex = new RegExp(/(?:^| )#([\w-_\/]+)/, "g") + +export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin | undefined> = ( + userOpts, +) => { + const opts = { ...defaultOptions, ...userOpts } + + const mdastToHtml = (ast: PhrasingContent | Paragraph) => { + const hast = toHast(ast, { allowDangerousHtml: true })! + return toHtml(hast, { allowDangerousHtml: true }) + } + const findAndReplace = opts.enableInHtmlEmbed + ? (tree: Root, regex: RegExp, replace?: Replace | null | undefined) => { + if (replace) { + visit(tree, "html", (node: HTML) => { + if (typeof replace === "string") { + node.value = node.value.replace(regex, replace) + } else { + node.value = node.value.replaceAll(regex, (substring: string, ...args) => { + const replaceValue = replace(substring, ...args) + if (typeof replaceValue === "string") { + return replaceValue + } else if (Array.isArray(replaceValue)) { + return replaceValue.map(mdastToHtml).join("") + } else if (typeof replaceValue === "object" && replaceValue !== null) { + return mdastToHtml(replaceValue) + } else { + return substring + } + }) + } + }) + } + + mdastFindReplace(tree, regex, replace) + } + : mdastFindReplace + + return { + name: "ObsidianFlavoredMarkdown", + textTransform(_ctx, src) { + // pre-transform blockquotes + if (opts.callouts) { + src = src.toString() + src = src.replaceAll(calloutLineRegex, (value) => { + // force newline after title of callout + return value + "\n> " + }) + } + + // pre-transform wikilinks (fix anchors to things that may contain illegal syntax e.g. codeblocks, latex) + if (opts.wikilinks) { + src = src.toString() + src = src.replaceAll(wikilinkRegex, (value, ...capture) => { + const [rawFp, rawHeader, rawAlias] = capture + const fp = rawFp ?? "" + const anchor = rawHeader?.trim().slice(1) + const displayAnchor = anchor ? `#${slugAnchor(anchor)}` : "" + const displayAlias = rawAlias ?? rawHeader?.replace("#", "|") ?? "" + const embedDisplay = value.startsWith("!") ? "!" : "" + return `${embedDisplay}[[${fp}${displayAnchor}${displayAlias}]]` + }) + } + + return src + }, + markdownPlugins() { + const plugins: PluggableList = [] + if (opts.wikilinks) { + plugins.push(() => { + return (tree: Root, _file) => { + findAndReplace(tree, wikilinkRegex, (value: string, ...capture: string[]) => { + let [rawFp, rawHeader, rawAlias] = capture + const fp = rawFp?.trim() ?? "" + const anchor = rawHeader?.trim() ?? "" + const alias = rawAlias?.slice(1).trim() + + // embed cases + if (value.startsWith("!")) { + const ext: string = path.extname(fp).toLowerCase() + const url = slugifyFilePath(fp as FilePath) + if ([".png", ".jpg", ".jpeg", ".gif", ".bmp", ".svg"].includes(ext)) { + const dims = alias ?? "" + let [width, height] = dims.split("x", 2) + width ||= "auto" + height ||= "auto" + return { + type: "image", + url, + data: { + hProperties: { + width, + height, + }, + }, + } + } else if ([".mp4", ".webm", ".ogv", ".mov", ".mkv"].includes(ext)) { + return { + type: "html", + value: ``, + } + } else if ( + [".mp3", ".webm", ".wav", ".m4a", ".ogg", ".3gp", ".flac"].includes(ext) + ) { + return { + type: "html", + value: ``, + } + } else if ([".pdf"].includes(ext)) { + return { + type: "html", + value: ``, + } + } else if (ext === "") { + // TODO: note embed + } + // otherwise, fall through to regular link + } + + // internal link + const url = fp + anchor + return { + type: "link", + url, + children: [ + { + type: "text", + value: alias ?? fp, + }, + ], + } + }) + } + }) + } + + if (opts.highlight) { + plugins.push(() => { + return (tree: Root, _file) => { + findAndReplace(tree, highlightRegex, (_value: string, ...capture: string[]) => { + const [inner] = capture + return { + type: "html", + value: `${inner}`, + } + }) + } + }) + } + + if (opts.comments) { + plugins.push(() => { + return (tree: Root, _file) => { + findAndReplace(tree, commentRegex, (_value: string, ..._capture: string[]) => { + return { + type: "text", + value: "", + } + }) + } + }) + } + + if (opts.callouts) { + plugins.push(() => { + return (tree: Root, _file) => { + visit(tree, "blockquote", (node) => { + if (node.children.length === 0) { + return + } + + // find first line + const firstChild = node.children[0] + if (firstChild.type !== "paragraph" || firstChild.children[0]?.type !== "text") { + return + } + + const text = firstChild.children[0].value + const restChildren = firstChild.children.slice(1) + const [firstLine, ...remainingLines] = text.split("\n") + const remainingText = remainingLines.join("\n") + + const match = firstLine.match(calloutRegex) + if (match && match.input) { + const [calloutDirective, typeString, collapseChar] = match + const calloutType = canonicalizeCallout( + typeString.toLowerCase() as keyof typeof calloutMapping, + ) + const collapse = collapseChar === "+" || collapseChar === "-" + const defaultState = collapseChar === "-" ? "collapsed" : "expanded" + const titleContent = + match.input.slice(calloutDirective.length).trim() || capitalize(calloutType) + const titleNode: Paragraph = { + type: "paragraph", + children: [{ type: "text", value: titleContent + " " }, ...restChildren], + } + const title = mdastToHtml(titleNode) + + const toggleIcon = ` + + ` + + const titleHtml: HTML = { + type: "html", + value: `
+
${callouts[calloutType]}
+
${title}
+ ${collapse ? toggleIcon : ""} +
`, + } + + const blockquoteContent: (BlockContent | DefinitionContent)[] = [titleHtml] + if (remainingText.length > 0) { + blockquoteContent.push({ + type: "paragraph", + children: [ + { + type: "text", + value: remainingText, + }, + ], + }) + } + + // replace first line of blockquote with title and rest of the paragraph text + node.children.splice(0, 1, ...blockquoteContent) + + // add properties to base blockquote + node.data = { + hProperties: { + ...(node.data?.hProperties ?? {}), + className: `callout ${collapse ? "is-collapsible" : ""} ${ + defaultState === "collapsed" ? "is-collapsed" : "" + }`, + "data-callout": calloutType, + "data-callout-fold": collapse, + }, + } + } + }) + } + }) + } + + if (opts.mermaid) { + plugins.push(() => { + return (tree: Root, _file) => { + visit(tree, "code", (node: Code) => { + if (node.lang === "mermaid") { + node.data = { + hProperties: { + className: ["mermaid"], + }, + } + } + }) + } + }) + } + + if (opts.parseTags) { + plugins.push(() => { + return (tree: Root, file) => { + const base = pathToRoot(file.data.slug!) + findAndReplace(tree, tagRegex, (value: string, tag: string) => { + if (file.data.frontmatter) { + file.data.frontmatter.tags.push(tag) + } + + return { + type: "link", + url: base + `/tags/${slugTag(tag)}`, + data: { + hProperties: { + className: ["tag-link"], + }, + }, + children: [ + { + type: "text", + value, + }, + ], + } + }) + } + }) + } + + return plugins + }, + htmlPlugins() { + return [rehypeRaw] + }, + externalResources() { + const js: JSResource[] = [] + + if (opts.callouts) { + js.push({ + script: calloutScript, + loadTime: "afterDOMReady", + contentType: "inline", + }) + } + + if (opts.mermaid) { + js.push({ + script: ` + import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs'; + const darkMode = document.documentElement.getAttribute('saved-theme') === 'dark' + mermaid.initialize({ + startOnLoad: false, + securityLevel: 'loose', + theme: darkMode ? 'dark' : 'default' + }); + document.addEventListener('nav', async () => { + await mermaid.run({ + querySelector: '.mermaid' + }) + }); + `, + loadTime: "afterDOMReady", + moduleType: "module", + contentType: "inline", + }) + } + + return { js } + }, + } +} diff --git a/quartz/plugins/transformers/syntax.ts b/quartz/plugins/transformers/syntax.ts new file mode 100644 index 00000000..17668174 --- /dev/null +++ b/quartz/plugins/transformers/syntax.ts @@ -0,0 +1,16 @@ +import { QuartzTransformerPlugin } from "../types" +import rehypePrettyCode, { Options as CodeOptions } from "rehype-pretty-code" + +export const SyntaxHighlighting: QuartzTransformerPlugin = () => ({ + name: "SyntaxHighlighting", + htmlPlugins() { + return [ + [ + rehypePrettyCode, + { + theme: "css-variables", + } satisfies Partial, + ], + ] + }, +}) diff --git a/quartz/plugins/transformers/toc.ts b/quartz/plugins/transformers/toc.ts new file mode 100644 index 00000000..87031a9d --- /dev/null +++ b/quartz/plugins/transformers/toc.ts @@ -0,0 +1,69 @@ +import { QuartzTransformerPlugin } from "../types" +import { Root } from "mdast" +import { visit } from "unist-util-visit" +import { toString } from "mdast-util-to-string" +import { slug as slugAnchor } from "github-slugger" + +export interface Options { + maxDepth: 1 | 2 | 3 | 4 | 5 | 6 + minEntries: 1 + showByDefault: boolean +} + +const defaultOptions: Options = { + maxDepth: 3, + minEntries: 1, + showByDefault: true, +} + +interface TocEntry { + depth: number + text: string + slug: string // this is just the anchor (#some-slug), not the canonical slug +} + +export const TableOfContents: QuartzTransformerPlugin | undefined> = ( + userOpts, +) => { + const opts = { ...defaultOptions, ...userOpts } + return { + name: "TableOfContents", + markdownPlugins() { + return [ + () => { + return async (tree: Root, file) => { + const display = file.data.frontmatter?.enableToc ?? opts.showByDefault + if (display) { + const toc: TocEntry[] = [] + let highestDepth: number = opts.maxDepth + visit(tree, "heading", (node) => { + if (node.depth <= opts.maxDepth) { + const text = toString(node) + highestDepth = Math.min(highestDepth, node.depth) + toc.push({ + depth: node.depth, + text, + slug: slugAnchor(text), + }) + } + }) + + if (toc.length > opts.minEntries) { + file.data.toc = toc.map((entry) => ({ + ...entry, + depth: entry.depth - highestDepth, + })) + } + } + } + }, + ] + }, + } +} + +declare module "vfile" { + interface DataMap { + toc: TocEntry[] + } +} diff --git a/quartz/plugins/types.ts b/quartz/plugins/types.ts new file mode 100644 index 00000000..eaeb12ae --- /dev/null +++ b/quartz/plugins/types.ts @@ -0,0 +1,54 @@ +import { PluggableList } from "unified" +import { StaticResources } from "../util/resources" +import { ProcessedContent } from "./vfile" +import { QuartzComponent } from "../components/types" +import { FilePath, FullSlug } from "../util/path" +import { BuildCtx } from "../util/ctx" + +export interface PluginTypes { + transformers: QuartzTransformerPluginInstance[] + filters: QuartzFilterPluginInstance[] + emitters: QuartzEmitterPluginInstance[] +} + +type OptionType = object | undefined +export type QuartzTransformerPlugin = ( + opts?: Options, +) => QuartzTransformerPluginInstance +export type QuartzTransformerPluginInstance = { + name: string + textTransform?: (ctx: BuildCtx, src: string | Buffer) => string | Buffer + markdownPlugins?: (ctx: BuildCtx) => PluggableList + htmlPlugins?: (ctx: BuildCtx) => PluggableList + externalResources?: (ctx: BuildCtx) => Partial +} + +export type QuartzFilterPlugin = ( + opts?: Options, +) => QuartzFilterPluginInstance +export type QuartzFilterPluginInstance = { + name: string + shouldPublish(ctx: BuildCtx, content: ProcessedContent): boolean +} + +export type QuartzEmitterPlugin = ( + opts?: Options, +) => QuartzEmitterPluginInstance +export type QuartzEmitterPluginInstance = { + name: string + emit( + ctx: BuildCtx, + content: ProcessedContent[], + resources: StaticResources, + emitCallback: EmitCallback, + ): Promise + getQuartzComponents(ctx: BuildCtx): QuartzComponent[] +} + +export interface EmitOptions { + slug: FullSlug + ext: `.${string}` | "" + content: string +} + +export type EmitCallback = (data: EmitOptions) => Promise diff --git a/quartz/plugins/vfile.ts b/quartz/plugins/vfile.ts new file mode 100644 index 00000000..068981af --- /dev/null +++ b/quartz/plugins/vfile.ts @@ -0,0 +1,12 @@ +import { Node, Parent } from "hast" +import { Data, VFile } from "vfile" + +export type QuartzPluginData = Data +export type ProcessedContent = [Node, VFile] + +export function defaultProcessedContent(vfileData: Partial): ProcessedContent { + const root: Parent = { type: "root", children: [] } + const vfile = new VFile("") + vfile.data = vfileData + return [root, vfile] +} diff --git a/quartz/processors/emit.ts b/quartz/processors/emit.ts new file mode 100644 index 00000000..3b357aa9 --- /dev/null +++ b/quartz/processors/emit.ts @@ -0,0 +1,44 @@ +import path from "path" +import fs from "fs" +import { PerfTimer } from "../util/perf" +import { getStaticResourcesFromPlugins } from "../plugins" +import { EmitCallback } from "../plugins/types" +import { ProcessedContent } from "../plugins/vfile" +import { FilePath, joinSegments } from "../util/path" +import { QuartzLogger } from "../util/log" +import { trace } from "../util/trace" +import { BuildCtx } from "../util/ctx" + +export async function emitContent(ctx: BuildCtx, content: ProcessedContent[]) { + const { argv, cfg } = ctx + const perf = new PerfTimer() + const log = new QuartzLogger(ctx.argv.verbose) + + log.start(`Emitting output files`) + const emit: EmitCallback = async ({ slug, ext, content }) => { + const pathToPage = joinSegments(argv.output, slug + ext) as FilePath + const dir = path.dirname(pathToPage) + await fs.promises.mkdir(dir, { recursive: true }) + await fs.promises.writeFile(pathToPage, content) + return pathToPage + } + + let emittedFiles = 0 + const staticResources = getStaticResourcesFromPlugins(ctx) + for (const emitter of cfg.plugins.emitters) { + try { + const emitted = await emitter.emit(ctx, content, staticResources, emit) + emittedFiles += emitted.length + + if (ctx.argv.verbose) { + for (const file of emitted) { + console.log(`[emit:${emitter.name}] ${file}`) + } + } + } catch (err) { + trace(`Failed to emit from plugin \`${emitter.name}\``, err as Error) + } + } + + log.end(`Emitted ${emittedFiles} files to \`${argv.output}\` in ${perf.timeSince()}`) +} diff --git a/quartz/processors/filter.ts b/quartz/processors/filter.ts new file mode 100644 index 00000000..b269fb31 --- /dev/null +++ b/quartz/processors/filter.ts @@ -0,0 +1,24 @@ +import { BuildCtx } from "../util/ctx" +import { PerfTimer } from "../util/perf" +import { ProcessedContent } from "../plugins/vfile" + +export function filterContent(ctx: BuildCtx, content: ProcessedContent[]): ProcessedContent[] { + const { cfg, argv } = ctx + const perf = new PerfTimer() + const initialLength = content.length + for (const plugin of cfg.plugins.filters) { + const updatedContent = content.filter((item) => plugin.shouldPublish(ctx, item)) + + if (argv.verbose) { + const diff = content.filter((x) => !updatedContent.includes(x)) + for (const file of diff) { + console.log(`[filter:${plugin.name}] ${file[1].data.slug}`) + } + } + + content = updatedContent + } + + console.log(`Filtered out ${initialLength - content.length} files in ${perf.timeSince()}`) + return content +} diff --git a/quartz/processors/parse.ts b/quartz/processors/parse.ts new file mode 100644 index 00000000..29f92fc4 --- /dev/null +++ b/quartz/processors/parse.ts @@ -0,0 +1,161 @@ +import esbuild from "esbuild" +import remarkParse from "remark-parse" +import remarkRehype from "remark-rehype" +import { Processor, unified } from "unified" +import { Root as MDRoot } from "remark-parse/lib" +import { Root as HTMLRoot } from "hast" +import { ProcessedContent } from "../plugins/vfile" +import { PerfTimer } from "../util/perf" +import { read } from "to-vfile" +import { FilePath, QUARTZ, slugifyFilePath } from "../util/path" +import path from "path" +import workerpool, { Promise as WorkerPromise } from "workerpool" +import { QuartzLogger } from "../util/log" +import { trace } from "../util/trace" +import { BuildCtx } from "../util/ctx" + +export type QuartzProcessor = Processor +export function createProcessor(ctx: BuildCtx): QuartzProcessor { + const transformers = ctx.cfg.plugins.transformers + + // base Markdown -> MD AST + let processor = unified().use(remarkParse) + + // MD AST -> MD AST transforms + for (const plugin of transformers.filter((p) => p.markdownPlugins)) { + processor = processor.use(plugin.markdownPlugins!(ctx)) + } + + // MD AST -> HTML AST + processor = processor.use(remarkRehype, { allowDangerousHtml: true }) + + // HTML AST -> HTML AST transforms + for (const plugin of transformers.filter((p) => p.htmlPlugins)) { + processor = processor.use(plugin.htmlPlugins!(ctx)) + } + + return processor +} + +function* chunks(arr: T[], n: number) { + for (let i = 0; i < arr.length; i += n) { + yield arr.slice(i, i + n) + } +} + +async function transpileWorkerScript() { + // transpile worker script + const cacheFile = "./.quartz-cache/transpiled-worker.mjs" + const fp = "./quartz/worker.ts" + return esbuild.build({ + entryPoints: [fp], + outfile: path.join(QUARTZ, cacheFile), + bundle: true, + keepNames: true, + platform: "node", + format: "esm", + packages: "external", + sourcemap: true, + sourcesContent: false, + plugins: [ + { + name: "css-and-scripts-as-text", + setup(build) { + build.onLoad({ filter: /\.scss$/ }, (_) => ({ + contents: "", + loader: "text", + })) + build.onLoad({ filter: /\.inline\.(ts|js)$/ }, (_) => ({ + contents: "", + loader: "text", + })) + }, + }, + ], + }) +} + +export function createFileParser(ctx: BuildCtx, fps: FilePath[]) { + const { argv, cfg } = ctx + return async (processor: QuartzProcessor) => { + const res: ProcessedContent[] = [] + for (const fp of fps) { + try { + const perf = new PerfTimer() + const file = await read(fp) + + // strip leading and trailing whitespace + file.value = file.value.toString().trim() + + // Text -> Text transforms + for (const plugin of cfg.plugins.transformers.filter((p) => p.textTransform)) { + file.value = plugin.textTransform!(ctx, file.value) + } + + // base data properties that plugins may use + file.data.slug = slugifyFilePath(path.posix.relative(argv.directory, file.path) as FilePath) + file.data.filePath = fp + + const ast = processor.parse(file) + const newAst = await processor.run(ast, file) + res.push([newAst, file]) + + if (argv.verbose) { + console.log(`[process] ${fp} -> ${file.data.slug} (${perf.timeSince()})`) + } + } catch (err) { + trace(`\nFailed to process \`${fp}\``, err as Error) + } + } + + return res + } +} + +const clamp = (num: number, min: number, max: number) => + Math.min(Math.max(Math.round(num), min), max) +export async function parseMarkdown(ctx: BuildCtx, fps: FilePath[]): Promise { + const { argv } = ctx + const perf = new PerfTimer() + const log = new QuartzLogger(argv.verbose) + + // rough heuristics: 128 gives enough time for v8 to JIT and optimize parsing code paths + const CHUNK_SIZE = 128 + const concurrency = ctx.argv.concurrency ?? clamp(fps.length / CHUNK_SIZE, 1, 4) + + let res: ProcessedContent[] = [] + log.start(`Parsing input files using ${concurrency} threads`) + if (concurrency === 1) { + try { + const processor = createProcessor(ctx) + const parse = createFileParser(ctx, fps) + res = await parse(processor) + } catch (error) { + log.end() + throw error + } + } else { + await transpileWorkerScript() + const pool = workerpool.pool("./quartz/bootstrap-worker.mjs", { + minWorkers: "max", + maxWorkers: concurrency, + workerType: "thread", + }) + + const childPromises: WorkerPromise[] = [] + for (const chunk of chunks(fps, CHUNK_SIZE)) { + childPromises.push(pool.exec("parseFiles", [argv, chunk, ctx.allSlugs])) + } + + const results: ProcessedContent[][] = await WorkerPromise.all(childPromises).catch((err) => { + const errString = err.toString().slice("Error:".length) + console.error(errString) + process.exit(1) + }) + res = results.flat() + await pool.terminate() + } + + log.end(`Parsed ${res.length} Markdown files in ${perf.timeSince()}`) + return res +} diff --git a/static/icon.png b/quartz/static/icon.png similarity index 100% rename from static/icon.png rename to quartz/static/icon.png diff --git a/quartz/static/og-image.png b/quartz/static/og-image.png new file mode 100644 index 00000000..f1321455 Binary files /dev/null and b/quartz/static/og-image.png differ diff --git a/quartz/styles/base.scss b/quartz/styles/base.scss new file mode 100644 index 00000000..16a0de3a --- /dev/null +++ b/quartz/styles/base.scss @@ -0,0 +1,467 @@ +@use "./custom.scss"; +@use "./syntax.scss"; +@use "./callouts.scss"; +@use "./variables.scss" as *; + +html { + scroll-behavior: smooth; + -webkit-text-size-adjust: none; + text-size-adjust: none; + overflow-x: hidden; + width: 100vw; +} + +body, +section { + margin: 0; + max-width: 100%; + box-sizing: border-box; + background-color: var(--light); + font-family: var(--bodyFont); + color: var(--darkgray); +} + +.text-highlight { + background-color: #fff23688; + padding: 0 0.1rem; + border-radius: 5px; +} + +p, +ul, +text, +a, +tr, +td, +li, +ol, +ul, +.katex, +.math { + color: var(--darkgray); + fill: var(--darkgray); + overflow-wrap: anywhere; + hyphens: auto; +} + +.math { + &.math-display { + text-align: center; + } +} + +a { + font-weight: 600; + text-decoration: none; + transition: color 0.2s ease; + color: var(--secondary); + + &:hover { + color: var(--tertiary) !important; + } + + &.internal { + text-decoration: none; + background-color: var(--highlight); + padding: 0 0.1rem; + border-radius: 5px; + } +} + +.desktop-only { + display: initial; + @media all and (max-width: $fullPageWidth) { + display: none; + } +} + +.mobile-only { + display: none; + @media all and (max-width: $fullPageWidth) { + display: initial; + } +} + +.page { + @media all and (max-width: $fullPageWidth) { + margin: 0 auto; + padding: 0 1rem; + max-width: $pageWidth; + } + + & article { + & > h1 { + font-size: 2rem; + } + + & li:has(> input[type="checkbox"]) { + list-style-type: none; + padding-left: 0; + } + + & li:has(> input[type="checkbox"]:checked) { + text-decoration: line-through; + text-decoration-color: var(--gray); + color: var(--gray); + } + + & li > * { + margin-top: 0; + margin-bottom: 0; + } + + p > strong { + color: var(--dark); + } + } + + & > #quartz-body { + width: 100%; + display: flex; + @media all and (max-width: $fullPageWidth) { + flex-direction: column; + } + + & .sidebar { + flex: 1; + display: flex; + flex-direction: column; + gap: 2rem; + top: 0; + width: $sidePanelWidth; + margin-top: $topSpacing; + box-sizing: border-box; + padding: 0 4rem; + position: fixed; + @media all and (max-width: $fullPageWidth) { + position: initial; + flex-direction: row; + padding: 0; + width: initial; + margin-top: 2rem; + } + } + + & .sidebar.left { + left: calc(calc(100vw - $pageWidth) / 2 - $sidePanelWidth); + @media all and (max-width: $fullPageWidth) { + gap: 0; + align-items: center; + } + } + + & .sidebar.right { + right: calc(calc(100vw - $pageWidth) / 2 - $sidePanelWidth); + & > * { + @media all and (max-width: $fullPageWidth) { + flex: 1; + } + } + } + } + + & .page-header { + width: $pageWidth; + margin: $topSpacing auto 0 auto; + @media all and (max-width: $fullPageWidth) { + width: initial; + margin-top: 2rem; + } + } + + & .center, + & footer { + margin-left: auto; + margin-right: auto; + width: $pageWidth; + @media all and (max-width: $fullPageWidth) { + width: initial; + margin-left: 0; + margin-right: 0; + } + } +} + +.footnotes { + margin-top: 2rem; + border-top: 1px solid var(--lightgray); +} + +input[type="checkbox"] { + transform: translateY(2px); + color: var(--secondary); + border: 1px solid var(--lightgray); + border-radius: 3px; + background-color: var(--light); + position: relative; + margin-inline-end: 0.2rem; + margin-inline-start: -1.4rem; + appearance: none; + width: 16px; + height: 16px; + + &:checked { + border-color: var(--secondary); + background-color: var(--secondary); + + &::after { + content: ""; + position: absolute; + left: 4px; + top: 1px; + width: 4px; + height: 8px; + display: block; + border: solid var(--light); + border-width: 0 2px 2px 0; + transform: rotate(45deg); + } + } +} + +blockquote { + margin: 1rem 0; + border-left: 3px solid var(--secondary); + padding-left: 1rem; + transition: border-color 0.2s ease; +} + +h1, +h2, +h3, +h4, +h5, +h6, +thead { + font-family: var(--headerFont); + color: var(--dark); + font-weight: revert; + margin-bottom: 0; + + article > & > a { + color: var(--dark); + &.internal { + background-color: transparent; + } + } +} + +h1, +h2, +h3, +h4, +h5, +h6 { + &[id] > a[href^="#"] { + margin: 0 0.5rem; + opacity: 0; + transition: opacity 0.2s ease; + transform: translateY(-0.1rem); + display: inline-block; + font-family: var(--codeFont); + user-select: none; + } + + &[id]:hover > a { + opacity: 1; + } +} + +// typography improvements +h1 { + font-size: 1.75rem; + margin-top: 2.25rem; + margin-bottom: 1rem; +} + +h2 { + font-size: 1.4rem; + margin-top: 1.9rem; + margin-bottom: 1rem; +} + +h3 { + font-size: 1.12rem; + margin-top: 1.62rem; + margin-bottom: 1rem; +} + +h4, +h5, +h6 { + font-size: 1rem; + margin-top: 1.5rem; + margin-bottom: 1rem; +} + +div[data-rehype-pretty-code-fragment] { + line-height: 1.6rem; + position: relative; + + & > div[data-rehype-pretty-code-title] { + font-family: var(--codeFont); + font-size: 0.9rem; + padding: 0.1rem 0.5rem; + border: 1px solid var(--lightgray); + width: max-content; + border-radius: 5px; + margin-bottom: -0.5rem; + color: var(--darkgray); + } + + & > pre { + padding: 0.5rem 0; + } +} + +pre { + font-family: var(--codeFont); + padding: 0.5rem; + border-radius: 5px; + overflow-x: auto; + border: 1px solid var(--lightgray); + + &:has(> code.mermaid) { + border: none; + } + + & > code { + background: none; + padding: 0; + font-size: 0.85rem; + counter-reset: line; + counter-increment: line 0; + display: grid; + + & [data-highlighted-chars] { + background-color: var(--highlight); + border-radius: 5px; + } + + & > [data-line] { + padding: 0 0.25rem; + box-sizing: border-box; + border-left: 3px solid transparent; + + &[data-highlighted-line] { + background-color: var(--highlight); + border-left: 3px solid var(--secondary); + } + + &::before { + content: counter(line); + counter-increment: line; + width: 1rem; + margin-right: 1rem; + display: inline-block; + text-align: right; + color: rgba(115, 138, 148, 0.6); + } + } + + &[data-line-numbers-max-digits="2"] > [data-line]::before { + width: 2rem; + } + + &[data-line-numbers-max-digits="3"] > [data-line]::before { + width: 3rem; + } + } +} + +code { + font-size: 0.9em; + color: var(--dark); + font-family: var(--codeFont); + border-radius: 5px; + padding: 0.1rem 0.2rem; + background: var(--lightgray); +} + +tbody, +li, +p { + line-height: 1.6rem; +} + +table { + margin: 1rem; + padding: 1.5rem; + border-collapse: collapse; + & > * { + line-height: 2rem; + } +} + +th { + text-align: left; + padding: 0.4rem 1rem; + border-bottom: 2px solid var(--gray); +} + +td { + padding: 0.2rem 1rem; +} + +tr { + border-bottom: 1px solid var(--lightgray); + &:last-child { + border-bottom: none; + } +} + +img { + max-width: 100%; + border-radius: 5px; + margin: 1rem 0; +} + +p > img + em { + display: block; + transform: translateY(-1rem); +} + +hr { + width: 100%; + margin: 2rem auto; + height: 1px; + border: none; + background-color: var(--lightgray); +} + +audio, +video { + width: 100%; + border-radius: 5px; +} + +.spacer { + flex: 1 1 auto; +} + +ul.overflow, +ol.overflow { + height: 300px; + overflow-y: auto; + + // clearfix + content: ""; + clear: both; + + & > li:last-of-type { + margin-bottom: 50px; + } + + &:after { + pointer-events: none; + content: ""; + width: 100%; + height: 50px; + position: absolute; + left: 0; + bottom: 0; + opacity: 1; + transition: opacity 0.3s ease; + background: linear-gradient(transparent 0px, var(--light)); + } +} diff --git a/quartz/styles/callouts.scss b/quartz/styles/callouts.scss new file mode 100644 index 00000000..ad991658 --- /dev/null +++ b/quartz/styles/callouts.scss @@ -0,0 +1,110 @@ +@use "sass:color"; + +.callout { + border: 1px solid var(--border); + background-color: var(--bg); + border-radius: 5px; + padding: 0 1rem; + overflow-y: hidden; + transition: max-height 0.3s ease; + box-sizing: border-box; + + & > *:nth-child(2) { + margin-top: 0; + } + + &[data-callout="note"] { + --color: #448aff; + --border: #448aff44; + --bg: #448aff10; + } + + &[data-callout="abstract"] { + --color: #00b0ff; + --border: #00b0ff44; + --bg: #00b0ff10; + } + + &[data-callout="info"], + &[data-callout="todo"] { + --color: #00b8d4; + --border: #00b8d444; + --bg: #00b8d410; + } + + &[data-callout="tip"] { + --color: #00bfa5; + --border: #00bfa544; + --bg: #00bfa510; + } + + &[data-callout="success"] { + --color: #09ad7a; + --border: #09ad7144; + --bg: #09ad7110; + } + + &[data-callout="question"] { + --color: #dba642; + --border: #dba64244; + --bg: #dba64210; + } + + &[data-callout="warning"] { + --color: #db8942; + --border: #db894244; + --bg: #db894210; + } + + &[data-callout="failure"], + &[data-callout="danger"], + &[data-callout="bug"] { + --color: #db4242; + --border: #db424244; + --bg: #db424210; + } + + &[data-callout="example"] { + --color: #7a43b5; + --border: #7a43b544; + --bg: #7a43b510; + } + + &[data-callout="quote"] { + --color: var(--secondary); + --border: var(--lightgray); + } + + &.is-collapsed > .callout-title > .fold { + transform: rotateZ(-90deg); + } +} + +.callout-title { + display: flex; + align-items: center; + gap: 5px; + padding: 1rem 0; + color: var(--color); + + & .fold { + margin-left: 0.5rem; + transition: transform 0.3s ease; + opacity: 0.8; + cursor: pointer; + } + + & > .callout-title-inner > p { + color: var(--color); + margin: 0; + } +} + +.callout-icon { + width: 18px; + height: 18px; +} + +.callout-title-inner { + font-weight: 700; +} diff --git a/quartz/styles/custom.scss b/quartz/styles/custom.scss new file mode 100644 index 00000000..85b6ebe6 --- /dev/null +++ b/quartz/styles/custom.scss @@ -0,0 +1,13 @@ +:root { + --light: #d7eff7; + --dark: #284b63; + --secondary: #207e8f; + --tertiary: #84a59d; + --visited: #afbfc9; + --primary: #FA8F2D; + --gray: #4e4e4e; + --lightgray: #f0f0f0; + --outlinegray: #dadada; + --million-progress-bar-color: var(--secondary); + --highlighted: #f5dfaf88; + } \ No newline at end of file diff --git a/quartz/styles/syntax.scss b/quartz/styles/syntax.scss new file mode 100644 index 00000000..623ee6f4 --- /dev/null +++ b/quartz/styles/syntax.scss @@ -0,0 +1,29 @@ +// npx convert-sh-theme https://raw.githubusercontent.com/shikijs/shiki/main/packages/shiki/themes/github-light.json +:root { + --shiki-color-text: #24292e; + --shiki-color-background: #f8f8f8; + --shiki-token-constant: #005cc5; + --shiki-token-string: #032f62; + --shiki-token-comment: #6a737d; + --shiki-token-keyword: #d73a49; + --shiki-token-parameter: #24292e; + --shiki-token-function: #24292e; + --shiki-token-string-expression: #22863a; + --shiki-token-punctuation: #24292e; + --shiki-token-link: #24292e; +} + +// npx convert-sh-theme https://raw.githubusercontent.com/shikijs/shiki/main/packages/shiki/themes/github-dark.json +[saved-theme="dark"] { + --shiki-color-text: #e1e4e8 !important; + --shiki-color-background: #24292e !important; + --shiki-token-constant: #79b8ff !important; + --shiki-token-string: #9ecbff !important; + --shiki-token-comment: #6a737d !important; + --shiki-token-keyword: #f97583 !important; + --shiki-token-parameter: #e1e4e8 !important; + --shiki-token-function: #e1e4e8 !important; + --shiki-token-string-expression: #85e89d !important; + --shiki-token-punctuation: #e1e4e8 !important; + --shiki-token-link: #e1e4e8 !important; +} diff --git a/quartz/styles/variables.scss b/quartz/styles/variables.scss new file mode 100644 index 00000000..f0505e4d --- /dev/null +++ b/quartz/styles/variables.scss @@ -0,0 +1,6 @@ +$pageWidth: 750px; +$mobileBreakpoint: 600px; +$tabletBreakpoint: 1200px; +$sidePanelWidth: 400px; +$topSpacing: 6rem; +$fullPageWidth: $pageWidth + 2 * $sidePanelWidth; diff --git a/quartz/util/ctx.ts b/quartz/util/ctx.ts new file mode 100644 index 00000000..d3033919 --- /dev/null +++ b/quartz/util/ctx.ts @@ -0,0 +1,17 @@ +import { QuartzConfig } from "../cfg" +import { FullSlug } from "./path" + +export interface Argv { + directory: string + verbose: boolean + output: string + serve: boolean + port: number + concurrency?: number +} + +export interface BuildCtx { + argv: Argv + cfg: QuartzConfig + allSlugs: FullSlug[] +} diff --git a/quartz/util/glob.ts b/quartz/util/glob.ts new file mode 100644 index 00000000..7a711600 --- /dev/null +++ b/quartz/util/glob.ts @@ -0,0 +1,22 @@ +import path from "path" +import { FilePath } from "./path" +import { globby } from "globby" + +export function toPosixPath(fp: string): string { + return fp.split(path.sep).join("/") +} + +export async function glob( + pattern: string, + cwd: string, + ignorePatterns: string[], +): Promise { + const fps = ( + await globby(pattern, { + cwd, + ignore: ignorePatterns, + gitignore: true, + }) + ).map(toPosixPath) + return fps as FilePath[] +} diff --git a/quartz/util/log.ts b/quartz/util/log.ts new file mode 100644 index 00000000..773945c9 --- /dev/null +++ b/quartz/util/log.ts @@ -0,0 +1,28 @@ +import { Spinner } from "cli-spinner" + +export class QuartzLogger { + verbose: boolean + spinner: Spinner | undefined + constructor(verbose: boolean) { + this.verbose = verbose + } + + start(text: string) { + if (this.verbose) { + console.log(text) + } else { + this.spinner = new Spinner(`%s ${text}`) + this.spinner.setSpinnerString(18) + this.spinner.start() + } + } + + end(text?: string) { + if (!this.verbose) { + this.spinner!.stop(true) + } + if (text) { + console.log(text) + } + } +} diff --git a/quartz/util/path.test.ts b/quartz/util/path.test.ts new file mode 100644 index 00000000..8bbb58dc --- /dev/null +++ b/quartz/util/path.test.ts @@ -0,0 +1,278 @@ +import test, { describe } from "node:test" +import * as path from "./path" +import assert from "node:assert" +import { FullSlug, TransformOptions } from "./path" + +describe("typeguards", () => { + test("isSimpleSlug", () => { + assert(path.isSimpleSlug("")) + assert(path.isSimpleSlug("abc")) + assert(path.isSimpleSlug("abc/")) + assert(path.isSimpleSlug("notindex")) + assert(path.isSimpleSlug("notindex/def")) + + assert(!path.isSimpleSlug("//")) + assert(!path.isSimpleSlug("index")) + assert(!path.isSimpleSlug("https://example.com")) + assert(!path.isSimpleSlug("/abc")) + assert(!path.isSimpleSlug("abc/index")) + assert(!path.isSimpleSlug("abc#anchor")) + assert(!path.isSimpleSlug("abc?query=1")) + assert(!path.isSimpleSlug("index.md")) + assert(!path.isSimpleSlug("index.html")) + }) + + test("isRelativeURL", () => { + assert(path.isRelativeURL(".")) + assert(path.isRelativeURL("..")) + assert(path.isRelativeURL("./abc/def")) + assert(path.isRelativeURL("./abc/def#an-anchor")) + assert(path.isRelativeURL("./abc/def?query=1#an-anchor")) + assert(path.isRelativeURL("../abc/def")) + assert(path.isRelativeURL("./abc/def.pdf")) + + assert(!path.isRelativeURL("abc")) + assert(!path.isRelativeURL("/abc/def")) + assert(!path.isRelativeURL("")) + assert(!path.isRelativeURL("./abc/def.html")) + assert(!path.isRelativeURL("./abc/def.md")) + }) + + test("isFullSlug", () => { + assert(path.isFullSlug("index")) + assert(path.isFullSlug("abc/def")) + assert(path.isFullSlug("html.energy")) + assert(path.isFullSlug("test.pdf")) + + assert(!path.isFullSlug(".")) + assert(!path.isFullSlug("./abc/def")) + assert(!path.isFullSlug("../abc/def")) + assert(!path.isFullSlug("abc/def#anchor")) + assert(!path.isFullSlug("abc/def?query=1")) + assert(!path.isFullSlug("note with spaces")) + }) + + test("isFilePath", () => { + assert(path.isFilePath("content/index.md")) + assert(path.isFilePath("content/test.png")) + assert(!path.isFilePath("../test.pdf")) + assert(!path.isFilePath("content/test")) + assert(!path.isFilePath("./content/test")) + }) +}) + +describe("transforms", () => { + function asserts( + pairs: [string, string][], + transform: (inp: Inp) => Out, + checkPre: (x: any) => x is Inp, + checkPost: (x: any) => x is Out, + ) { + for (const [inp, expected] of pairs) { + assert(checkPre(inp), `${inp} wasn't the expected input type`) + const actual = transform(inp) + assert.strictEqual( + actual, + expected, + `after transforming ${inp}, '${actual}' was not '${expected}'`, + ) + assert(checkPost(actual), `${actual} wasn't the expected output type`) + } + } + + test("simplifySlug", () => { + asserts( + [ + ["index", ""], + ["abc", "abc"], + ["abc/index", "abc/"], + ["abc/def", "abc/def"], + ], + path.simplifySlug, + path.isFullSlug, + path.isSimpleSlug, + ) + }) + + test("slugifyFilePath", () => { + asserts( + [ + ["content/index.md", "content/index"], + ["content/index.html", "content/index"], + ["content/_index.md", "content/index"], + ["/content/index.md", "content/index"], + ["content/cool.png", "content/cool.png"], + ["index.md", "index"], + ["test.mp4", "test.mp4"], + ["note with spaces.md", "note-with-spaces"], + ], + path.slugifyFilePath, + path.isFilePath, + path.isFullSlug, + ) + }) + + test("transformInternalLink", () => { + asserts( + [ + ["", "."], + [".", "."], + ["./", "./"], + ["./index", "./"], + ["./index#abc", "./#abc"], + ["./index.html", "./"], + ["./index.md", "./"], + ["./index.css", "./index.css"], + ["content", "./content"], + ["content/test.md", "./content/test"], + ["content/test.pdf", "./content/test.pdf"], + ["./content/test.md", "./content/test"], + ["../content/test.md", "../content/test"], + ["tags/", "./tags/"], + ["/tags/", "./tags/"], + ["content/with spaces", "./content/with-spaces"], + ["content/with spaces/index", "./content/with-spaces/"], + ["content/with spaces#and Anchor!", "./content/with-spaces#and-anchor"], + ], + path.transformInternalLink, + (_x: string): _x is string => true, + path.isRelativeURL, + ) + }) + + test("pathToRoot", () => { + asserts( + [ + ["index", "."], + ["abc", "."], + ["abc/def", ".."], + ["abc/def/ghi", "../.."], + ["abc/def/index", "../.."], + ], + path.pathToRoot, + path.isFullSlug, + path.isRelativeURL, + ) + }) +}) + +describe("link strategies", () => { + const allSlugs = [ + "a/b/c", + "a/b/d", + "a/b/index", + "e/f", + "e/g/h", + "index", + "a/test.png", + ] as FullSlug[] + + describe("absolute", () => { + const opts: TransformOptions = { + strategy: "absolute", + allSlugs, + } + + test("from a/b/c", () => { + const cur = "a/b/c" as FullSlug + assert.strictEqual(path.transformLink(cur, "a/b/d", opts), "../../a/b/d") + assert.strictEqual(path.transformLink(cur, "a/b/index", opts), "../../a/b/") + assert.strictEqual(path.transformLink(cur, "e/f", opts), "../../e/f") + assert.strictEqual(path.transformLink(cur, "e/g/h", opts), "../../e/g/h") + assert.strictEqual(path.transformLink(cur, "index", opts), "../../") + assert.strictEqual(path.transformLink(cur, "index.png", opts), "../../index.png") + assert.strictEqual(path.transformLink(cur, "index#abc", opts), "../../#abc") + assert.strictEqual(path.transformLink(cur, "tag/test", opts), "../../tag/test") + assert.strictEqual(path.transformLink(cur, "a/b/c#test", opts), "../../a/b/c#test") + assert.strictEqual(path.transformLink(cur, "a/test.png", opts), "../../a/test.png") + }) + + test("from a/b/index", () => { + const cur = "a/b/index" as FullSlug + assert.strictEqual(path.transformLink(cur, "a/b/d", opts), "../../a/b/d") + assert.strictEqual(path.transformLink(cur, "a/b", opts), "../../a/b") + assert.strictEqual(path.transformLink(cur, "index", opts), "../../") + }) + + test("from index", () => { + const cur = "index" as FullSlug + assert.strictEqual(path.transformLink(cur, "index", opts), "./") + assert.strictEqual(path.transformLink(cur, "a/b/c", opts), "./a/b/c") + assert.strictEqual(path.transformLink(cur, "a/b/index", opts), "./a/b/") + }) + }) + + describe("shortest", () => { + const opts: TransformOptions = { + strategy: "shortest", + allSlugs, + } + + test("from a/b/c", () => { + const cur = "a/b/c" as FullSlug + assert.strictEqual(path.transformLink(cur, "d", opts), "../../a/b/d") + assert.strictEqual(path.transformLink(cur, "h", opts), "../../e/g/h") + assert.strictEqual(path.transformLink(cur, "a/b/index", opts), "../../a/b/") + assert.strictEqual(path.transformLink(cur, "a/b/index.png", opts), "../../a/b/index.png") + assert.strictEqual(path.transformLink(cur, "a/b/index#abc", opts), "../../a/b/#abc") + assert.strictEqual(path.transformLink(cur, "index", opts), "../../") + assert.strictEqual(path.transformLink(cur, "index.png", opts), "../../index.png") + assert.strictEqual(path.transformLink(cur, "test.png", opts), "../../a/test.png") + assert.strictEqual(path.transformLink(cur, "index#abc", opts), "../../#abc") + }) + + test("from a/b/index", () => { + const cur = "a/b/index" as FullSlug + assert.strictEqual(path.transformLink(cur, "d", opts), "../../a/b/d") + assert.strictEqual(path.transformLink(cur, "h", opts), "../../e/g/h") + assert.strictEqual(path.transformLink(cur, "a/b/index", opts), "../../a/b/") + assert.strictEqual(path.transformLink(cur, "index", opts), "../../") + }) + + test("from index", () => { + const cur = "index" as FullSlug + assert.strictEqual(path.transformLink(cur, "d", opts), "./a/b/d") + assert.strictEqual(path.transformLink(cur, "h", opts), "./e/g/h") + assert.strictEqual(path.transformLink(cur, "a/b/index", opts), "./a/b/") + assert.strictEqual(path.transformLink(cur, "index", opts), "./") + }) + }) + + describe("relative", () => { + const opts: TransformOptions = { + strategy: "relative", + allSlugs, + } + + test("from a/b/c", () => { + const cur = "a/b/c" as FullSlug + assert.strictEqual(path.transformLink(cur, "d", opts), "./d") + assert.strictEqual(path.transformLink(cur, "index", opts), "./") + assert.strictEqual(path.transformLink(cur, "../../../index", opts), "../../../") + assert.strictEqual(path.transformLink(cur, "../../../index.png", opts), "../../../index.png") + assert.strictEqual(path.transformLink(cur, "../../../index#abc", opts), "../../../#abc") + assert.strictEqual(path.transformLink(cur, "../../../", opts), "../../../") + assert.strictEqual( + path.transformLink(cur, "../../../a/test.png", opts), + "../../../a/test.png", + ) + assert.strictEqual(path.transformLink(cur, "../../../e/g/h", opts), "../../../e/g/h") + assert.strictEqual(path.transformLink(cur, "../../../e/g/h", opts), "../../../e/g/h") + assert.strictEqual(path.transformLink(cur, "../../../e/g/h#abc", opts), "../../../e/g/h#abc") + }) + + test("from a/b/index", () => { + const cur = "a/b/index" as FullSlug + assert.strictEqual(path.transformLink(cur, "../../index", opts), "../../") + assert.strictEqual(path.transformLink(cur, "../../", opts), "../../") + assert.strictEqual(path.transformLink(cur, "../../e/g/h", opts), "../../e/g/h") + assert.strictEqual(path.transformLink(cur, "c", opts), "./c") + }) + + test("from index", () => { + const cur = "index" as FullSlug + assert.strictEqual(path.transformLink(cur, "e/g/h", opts), "./e/g/h") + assert.strictEqual(path.transformLink(cur, "a/b/index", opts), "./a/b/") + }) + }) +}) diff --git a/quartz/util/path.ts b/quartz/util/path.ts new file mode 100644 index 00000000..d14b827d --- /dev/null +++ b/quartz/util/path.ts @@ -0,0 +1,231 @@ +import { slug } from "github-slugger" +// this file must be isomorphic so it can't use node libs (e.g. path) + +export const QUARTZ = "quartz" + +/// Utility type to simulate nominal types in TypeScript +type SlugLike = string & { __brand: T } + +/** Cannot be relative and must have a file extension. */ +export type FilePath = SlugLike<"filepath"> +export function isFilePath(s: string): s is FilePath { + const validStart = !s.startsWith(".") + return validStart && _hasFileExtension(s) +} + +/** Cannot be relative and may not have leading or trailing slashes. It can have `index` as it's last segment. Use this wherever possible is it's the most 'general' interpretation of a slug. */ +export type FullSlug = SlugLike<"full"> +export function isFullSlug(s: string): s is FullSlug { + const validStart = !(s.startsWith(".") || s.startsWith("/")) + const validEnding = !s.endsWith("/") + return validStart && validEnding && !_containsForbiddenCharacters(s) +} + +/** Shouldn't be a relative path and shouldn't have `/index` as an ending or a file extension. It _can_ however have a trailing slash to indicate a folder path. */ +export type SimpleSlug = SlugLike<"simple"> +export function isSimpleSlug(s: string): s is SimpleSlug { + const validStart = !(s.startsWith(".") || s.startsWith("/")) + const validEnding = !(s.endsWith("/index") || s === "index") + return validStart && !_containsForbiddenCharacters(s) && validEnding && !_hasFileExtension(s) +} + +/** Can be found on `href`s but can also be constructed for client-side navigation (e.g. search and graph) */ +export type RelativeURL = SlugLike<"relative"> +export function isRelativeURL(s: string): s is RelativeURL { + const validStart = /^\.{1,2}/.test(s) + const validEnding = !(s.endsWith("/index") || s === "index") + return validStart && validEnding && ![".md", ".html"].includes(_getFileExtension(s) ?? "") +} + +export function getFullSlug(window: Window): FullSlug { + const res = window.document.body.dataset.slug! as FullSlug + return res +} + +export function slugifyFilePath(fp: FilePath, excludeExt?: boolean): FullSlug { + fp = _stripSlashes(fp) as FilePath + let ext = _getFileExtension(fp) + const withoutFileExt = fp.replace(new RegExp(ext + "$"), "") + if (excludeExt || [".md", ".html", undefined].includes(ext)) { + ext = "" + } + + let slug = withoutFileExt + .split("/") + .map((segment) => segment.replace(/\s/g, "-")) // slugify all segments + .join("/") // always use / as sep + .replace(/\/$/, "") // remove trailing slash + + // treat _index as index + if (_endsWith(slug, "_index")) { + slug = slug.replace(/_index$/, "index") + } + + return (slug + ext) as FullSlug +} + +export function simplifySlug(fp: FullSlug): SimpleSlug { + return _stripSlashes(_trimSuffix(fp, "index"), true) as SimpleSlug +} + +export function transformInternalLink(link: string): RelativeURL { + let [fplike, anchor] = splitAnchor(decodeURI(link)) + + const folderPath = _isFolderPath(fplike) + let segments = fplike.split("/").filter((x) => x.length > 0) + let prefix = segments.filter(_isRelativeSegment).join("/") + let fp = segments.filter((seg) => !_isRelativeSegment(seg) && seg !== "").join("/") + + // manually add ext here as we want to not strip 'index' if it has an extension + const simpleSlug = simplifySlug(slugifyFilePath(fp as FilePath)) + const joined = joinSegments(_stripSlashes(prefix), _stripSlashes(simpleSlug)) + const trail = folderPath ? "/" : "" + const res = (_addRelativeToStart(joined) + trail + anchor) as RelativeURL + return res +} + +// resolve /a/b/c to ../.. +export function pathToRoot(slug: FullSlug): RelativeURL { + let rootPath = slug + .split("/") + .filter((x) => x !== "") + .slice(0, -1) + .map((_) => "..") + .join("/") + + if (rootPath.length === 0) { + rootPath = "." + } + + return rootPath as RelativeURL +} + +export function resolveRelative(current: FullSlug, target: FullSlug | SimpleSlug): RelativeURL { + const res = joinSegments(pathToRoot(current), simplifySlug(target as FullSlug)) as RelativeURL + return res +} + +export function splitAnchor(link: string): [string, string] { + let [fp, anchor] = link.split("#", 2) + anchor = anchor === undefined ? "" : "#" + slugAnchor(anchor) + return [fp, anchor] +} + +export function slugAnchor(anchor: string) { + return slug(anchor) +} + +export function slugTag(tag: string) { + return tag + .split("/") + .map((tagSegment) => slug(tagSegment)) + .join("/") +} + +export function joinSegments(...args: string[]): string { + return args.filter((segment) => segment !== "").join("/") +} + +export function getAllSegmentPrefixes(tags: string): string[] { + const segments = tags.split("/") + const results: string[] = [] + for (let i = 0; i < segments.length; i++) { + results.push(segments.slice(0, i + 1).join("/")) + } + return results +} + +export interface TransformOptions { + strategy: "absolute" | "relative" | "shortest" + allSlugs: FullSlug[] +} + +export function transformLink(src: FullSlug, target: string, opts: TransformOptions): RelativeURL { + let targetSlug = transformInternalLink(target) + + if (opts.strategy === "relative") { + return targetSlug as RelativeURL + } else { + const folderTail = _isFolderPath(targetSlug) ? "/" : "" + const canonicalSlug = _stripSlashes(targetSlug.slice(".".length)) + let [targetCanonical, targetAnchor] = splitAnchor(canonicalSlug) + + if (opts.strategy === "shortest") { + // if the file name is unique, then it's just the filename + const matchingFileNames = opts.allSlugs.filter((slug) => { + const parts = slug.split("/") + const fileName = parts.at(-1) + return targetCanonical === fileName + }) + + // only match, just use it + if (matchingFileNames.length === 1) { + const targetSlug = matchingFileNames[0] + return (resolveRelative(src, targetSlug) + targetAnchor) as RelativeURL + } + } + + // if it's not unique, then it's the absolute path from the vault root + return (joinSegments(pathToRoot(src), canonicalSlug) + folderTail) as RelativeURL + } +} + +function _isFolderPath(fplike: string): boolean { + return ( + fplike.endsWith("/") || + _endsWith(fplike, "index") || + _endsWith(fplike, "index.md") || + _endsWith(fplike, "index.html") + ) +} + +function _endsWith(s: string, suffix: string): boolean { + return s === suffix || s.endsWith("/" + suffix) +} + +function _trimSuffix(s: string, suffix: string): string { + if (_endsWith(s, suffix)) { + s = s.slice(0, -suffix.length) + } + return s +} + +function _containsForbiddenCharacters(s: string): boolean { + return s.includes(" ") || s.includes("#") || s.includes("?") +} + +function _hasFileExtension(s: string): boolean { + return _getFileExtension(s) !== undefined +} + +function _getFileExtension(s: string): string | undefined { + return s.match(/\.[A-Za-z0-9]+$/)?.[0] +} + +function _isRelativeSegment(s: string): boolean { + return /^\.{0,2}$/.test(s) +} + +export function _stripSlashes(s: string, onlyStripPrefix?: boolean): string { + if (s.startsWith("/")) { + s = s.substring(1) + } + + if (!onlyStripPrefix && s.endsWith("/")) { + s = s.slice(0, -1) + } + + return s +} + +function _addRelativeToStart(s: string): string { + if (s === "") { + s = "." + } + + if (!s.startsWith(".")) { + s = joinSegments(".", s) + } + + return s +} diff --git a/quartz/util/perf.ts b/quartz/util/perf.ts new file mode 100644 index 00000000..ba34ddb6 --- /dev/null +++ b/quartz/util/perf.ts @@ -0,0 +1,19 @@ +import chalk from "chalk" +import pretty from "pretty-time" + +export class PerfTimer { + evts: { [key: string]: [number, number] } + + constructor() { + this.evts = {} + this.addEvent("start") + } + + addEvent(evtName: string) { + this.evts[evtName] = process.hrtime() + } + + timeSince(evtName?: string): string { + return chalk.yellow(pretty(process.hrtime(this.evts[evtName ?? "start"]))) + } +} diff --git a/quartz/util/resources.tsx b/quartz/util/resources.tsx new file mode 100644 index 00000000..a185733e --- /dev/null +++ b/quartz/util/resources.tsx @@ -0,0 +1,39 @@ +import { randomUUID } from "crypto" +import { JSX } from "preact/jsx-runtime" + +export type JSResource = { + loadTime: "beforeDOMReady" | "afterDOMReady" + moduleType?: "module" + spaPreserve?: boolean +} & ( + | { + src: string + contentType: "external" + } + | { + script: string + contentType: "inline" + } +) + +export function JSResourceToScriptElement(resource: JSResource, preserve?: boolean): JSX.Element { + const scriptType = resource.moduleType ?? "application/javascript" + const spaPreserve = preserve ?? resource.spaPreserve + if (resource.contentType === "external") { + return ( + + ) + } +} + +export interface StaticResources { + css: string[] + js: JSResource[] +} diff --git a/quartz/util/sourcemap.ts b/quartz/util/sourcemap.ts new file mode 100644 index 00000000..d3b9cf73 --- /dev/null +++ b/quartz/util/sourcemap.ts @@ -0,0 +1,18 @@ +import fs from "fs" +import sourceMapSupport from "source-map-support" +import { fileURLToPath } from "url" + +export const options: sourceMapSupport.Options = { + // source map hack to get around query param + // import cache busting + retrieveSourceMap(source) { + if (source.includes(".quartz-cache")) { + let realSource = fileURLToPath(source.split("?", 2)[0] + ".map") + return { + map: fs.readFileSync(realSource, "utf8"), + } + } else { + return null + } + }, +} diff --git a/quartz/util/theme.ts b/quartz/util/theme.ts new file mode 100644 index 00000000..47951c4f --- /dev/null +++ b/quartz/util/theme.ts @@ -0,0 +1,63 @@ +export interface ColorScheme { + light: string + lightgray: string + gray: string + darkgray: string + dark: string + secondary: string + tertiary: string + highlight: string +} + +export interface Theme { + typography: { + header: string + body: string + code: string + } + colors: { + lightMode: ColorScheme + darkMode: ColorScheme + } +} + +const DEFAULT_SANS_SERIF = + '-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif' +const DEFAULT_MONO = "ui-monospace, SFMono-Regular, SF Mono, Menlo, monospace" + +export function googleFontHref(theme: Theme) { + const { code, header, body } = theme.typography + return `https://fonts.googleapis.com/css2?family=${code}&family=${header}:wght@400;700&family=${body}:ital,wght@0,400;0,600;1,400;1,600&display=swap` +} + +export function joinStyles(theme: Theme, ...stylesheet: string[]) { + return ` +${stylesheet.join("\n\n")} + +:root { + --light: ${theme.colors.lightMode.light}; + --lightgray: ${theme.colors.lightMode.lightgray}; + --gray: ${theme.colors.lightMode.gray}; + --darkgray: ${theme.colors.lightMode.darkgray}; + --dark: ${theme.colors.lightMode.dark}; + --secondary: ${theme.colors.lightMode.secondary}; + --tertiary: ${theme.colors.lightMode.tertiary}; + --highlight: ${theme.colors.lightMode.highlight}; + + --headerFont: "${theme.typography.header}", ${DEFAULT_SANS_SERIF}; + --bodyFont: "${theme.typography.body}", ${DEFAULT_SANS_SERIF}; + --codeFont: "${theme.typography.code}", ${DEFAULT_MONO}; +} + +:root[saved-theme="dark"] { + --light: ${theme.colors.darkMode.light}; + --lightgray: ${theme.colors.darkMode.lightgray}; + --gray: ${theme.colors.darkMode.gray}; + --darkgray: ${theme.colors.darkMode.darkgray}; + --dark: ${theme.colors.darkMode.dark}; + --secondary: ${theme.colors.darkMode.secondary}; + --tertiary: ${theme.colors.darkMode.tertiary}; + --highlight: ${theme.colors.darkMode.highlight}; +} +` +} diff --git a/quartz/util/trace.ts b/quartz/util/trace.ts new file mode 100644 index 00000000..c7f3cc33 --- /dev/null +++ b/quartz/util/trace.ts @@ -0,0 +1,47 @@ +import chalk from "chalk" +import process from "process" +import { isMainThread } from "workerpool" + +const rootFile = /.*at file:/ +export function trace(msg: string, err: Error) { + const stack = err.stack + + const lines: string[] = [] + + lines.push("") + lines.push( + "\n" + + chalk.bgRed.black.bold(" ERROR ") + + "\n" + + chalk.red(` ${msg}`) + + (err.message.length > 0 ? `: ${err.message}` : ""), + ) + + if (!stack) { + return + } + + let reachedEndOfLegibleTrace = false + for (const line of stack.split("\n").slice(1)) { + if (reachedEndOfLegibleTrace) { + break + } + + if (!line.includes("node_modules")) { + lines.push(` ${line}`) + if (rootFile.test(line)) { + reachedEndOfLegibleTrace = true + } + } + } + + const traceMsg = lines.join("\n") + if (!isMainThread) { + // gather lines and throw + throw new Error(traceMsg) + } else { + // print and exit + console.error(traceMsg) + process.exit(1) + } +} diff --git a/quartz/worker.ts b/quartz/worker.ts new file mode 100644 index 00000000..b92bdac9 --- /dev/null +++ b/quartz/worker.ts @@ -0,0 +1,19 @@ +import sourceMapSupport from "source-map-support" +sourceMapSupport.install(options) +import cfg from "../quartz.config" +import { Argv, BuildCtx } from "./util/ctx" +import { FilePath, FullSlug } from "./util/path" +import { createFileParser, createProcessor } from "./processors/parse" +import { options } from "./util/sourcemap" + +// only called from worker thread +export async function parseFiles(argv: Argv, fps: FilePath[], allSlugs: FullSlug[]) { + const ctx: BuildCtx = { + cfg, + argv, + allSlugs, + } + const processor = createProcessor(ctx) + const parse = createFileParser(ctx, fps) + return parse(processor) +} diff --git a/screenshot.png b/screenshot.png deleted file mode 100644 index 404774cc..00000000 Binary files a/screenshot.png and /dev/null differ diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..784ab231 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "lib": ["esnext", "DOM", "DOM.Iterable"], + "experimentalDecorators": true, + "module": "esnext", + "target": "esnext", + "moduleResolution": "node", + "strict": true, + "incremental": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, + "jsx": "react-jsx", + "jsxImportSource": "preact" + }, + "include": ["**/*.ts", "**/*.tsx", "./package.json"], + "exclude": ["build/**/*.d.ts"] +}