From bfa91b536009b9362a946cc356d795ca71639b42 Mon Sep 17 00:00:00 2001 From: Jeremi Joslin Date: Wed, 4 Nov 2026 13:08:53 +0700 Subject: [PATCH] feat: render shared OpenAPI references within specification sites Signed-off-by: Jeremi Joslin --- .github/workflows/check.yml | 22 + README.md | 54 +- action.yml | 51 + adapters/framework.mjs | 53 +- astro.config.mjs | 2 + docs/building-block-integration.md | 88 + examples/building-block/README.md | 5 + examples/building-block/api-references.yml | 5 + examples/building-block/api/entry.schema.json | 10 + examples/building-block/api/openapi.yaml | 31 + examples/building-block/authors.yml | 4 + examples/building-block/metadata.yml | 12 + .../building-block/resources/api-example.md | 1 + examples/building-block/resources/guide.md | 3 + examples/building-block/toc.yml | 4 + package-lock.json | 2393 ++++++++++++++++- package.json | 2 + scripts/api-references.mjs | 221 ++ scripts/check-built.mjs | 23 + src/components/ReferenceContent.astro | 75 + src/components/ReferenceTitle.astro | 10 + src/styles/govstack.css | 39 + tests/action.test.mjs | 75 + tests/api-reference-page.test.mjs | 74 + tests/api-references.test.mjs | 667 +++++ tests/check-built.test.mjs | 35 + tests/framework.test.mjs | 28 +- 27 files changed, 3896 insertions(+), 91 deletions(-) create mode 100644 .github/workflows/check.yml create mode 100644 action.yml create mode 100644 docs/building-block-integration.md create mode 100644 examples/building-block/README.md create mode 100644 examples/building-block/api-references.yml create mode 100644 examples/building-block/api/entry.schema.json create mode 100644 examples/building-block/api/openapi.yaml create mode 100644 examples/building-block/authors.yml create mode 100644 examples/building-block/metadata.yml create mode 100644 examples/building-block/resources/api-example.md create mode 100644 examples/building-block/resources/guide.md create mode 100644 examples/building-block/toc.yml create mode 100644 scripts/api-references.mjs create mode 100644 src/components/ReferenceContent.astro create mode 100644 src/components/ReferenceTitle.astro create mode 100644 tests/action.test.mjs create mode 100644 tests/api-reference-page.test.mjs create mode 100644 tests/api-references.test.mjs diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..21fe0ac --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,22 @@ +name: Check the shared specification site +on: + pull_request: + push: + branches: [main] + workflow_dispatch: +permissions: + contents: read +jobs: + example: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + persist-credentials: false + - name: Verify the generic Building Block example + uses: ./ + with: + source: examples/building-block + output: ${{ runner.temp }}/building-block-site + base: /building-block/ + unofficial: 'true' diff --git a/README.md b/README.md index b43d2e4..300cbe6 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,45 @@ Every profile requires an explicit source, either `--source` or the `DOCS_SOURCE_ROOT` environment variable. There is no default, so a build cannot silently pick up a different or dirty checkout. +## OpenAPI references + +Framework sources can opt into Scalar references with `api-references.yml`: + +```yaml +references: + - id: consultation + page: resources/api-reference.md + contract: api/openapi.yaml + role: normative + - id: birth-registration + page: resources/api-examples/birth-registration.md + contract: api/examples/birth-registration.openapi.yaml + role: example +``` + +Each `page` identifies a Markdown page in the source navigation. On these pages, +the renderer replaces the prose with native Scalar, a short role label, download +links, and closed technical metadata. There is no iframe or repeated introductory +response. Examples stay inside the owning contract. A missing local dependency +fails the build. An optional `operationId` and successful `response` pair can +validate a published response example; `example` selects a named example for +that pair. These selection fields are not needed to render a contract. + +`role` is explicit: `normative` labels a draft transport contract, while `example` +labels an illustrative binding that adds no conformance requirements. Both the +navigation and reference page retain that distinction. Response values remain +illustrative even on a normative contract page. + +Scalar 1.76.4 and bundled contracts are served locally, including project-subpath +deployments. Contract references must resolve inside the source repository; +remote references and escaping symlinks are rejected. Source contract bytes stay +unchanged and every dependency contributes to the source digest. API execution, +AI chat, and telemetry are disabled; references follow the site's theme. +Sources without this configuration retain their existing pages and navigation. +Operation-level `x-*` metadata is collected for every Building Block, without +requiring Digital Registries extensions. Built-output checks verify the native +host, role label, collapsed metadata, and bundled contract digest. + ## Local use Use Node 24.11 or later. From this directory: @@ -86,13 +125,20 @@ skipped, with the reason printed, unless these variables are set: `GOVSTACK_SITE_RENDERER`. - Framework-format specifications call the CLI directly with `--profile framework --source `. +- The template's `specification-site/` directory is a thin framework wrapper + that can be copied into a Building Block. It checks source-format and native + Scalar compatibility before running the shared renderer. +- [`action.yml`](action.yml) provides a build-only composite GitHub Action. + See [Building Block integration](docs/building-block-integration.md) for local + setup, pinned CI consumption, and activation prerequisites. ## Not yet -The repository is published at -, but there are no tagged -releases and no version pinning yet. Until tags exist, consumers point -`GOVSTACK_SITE_RENDERER` at a local checkout of this repository. +The repository is available at +. Consumers can pin a +published full commit; tagged releases are not required. The native Scalar +integration and composite action must be published before hosted consumers can +select them. A local checkout works through `GOVSTACK_SITE_RENDERER` meanwhile. ## Ownership and generated files diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..57656d9 --- /dev/null +++ b/action.yml @@ -0,0 +1,51 @@ +name: GovStack specification site +description: Build and verify a specification with the shared renderer and native OpenAPI references. +inputs: + source: + description: Specification source directory, absolute or relative to the caller workspace. + required: true + output: + description: Static output directory, separate from the source and renderer. + required: true + profile: + description: Source adapter, framework or api-guide. + default: framework + base: + description: Site URL prefix, including leading and trailing slashes. + default: / + unofficial: + description: Keep unofficial preview notices unless explicitly set to false. + default: 'true' + source-url: + description: Optional GitHub source URL for the api-guide adapter. + default: '' +runs: + using: composite + steps: + - name: Set up Node + uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7 + with: + node-version: '24' + - name: Install the shared renderer + shell: bash + working-directory: ${{ github.action_path }} + run: | + #!/usr/bin/env bash + set -euo pipefail + npm ci --ignore-scripts --no-audit --no-fund + - name: Build and verify the specification site + id: build + shell: bash + working-directory: ${{ github.workspace }} + env: + GOVSTACK_RENDERER_ROOT: ${{ github.action_path }} + DOCS_PROFILE: ${{ inputs.profile }} + DOCS_SOURCE_ROOT: ${{ inputs.source }} + DOCS_DIST_DIR: ${{ inputs.output }} + DOCS_BASE: ${{ inputs.base }} + DOCS_UNOFFICIAL: ${{ inputs.unofficial == 'false' && '0' || '1' }} + DOCS_SOURCE_URL: ${{ inputs.source-url }} + run: | + #!/usr/bin/env bash + set -euo pipefail + node "$GOVSTACK_RENDERER_ROOT/scripts/site.mjs" check diff --git a/adapters/framework.mjs b/adapters/framework.mjs index f1f71d0..92e63be 100644 --- a/adapters/framework.mjs +++ b/adapters/framework.mjs @@ -13,7 +13,7 @@ import { import path from 'node:path'; import { promisify } from 'node:util'; -import GithubSlugger from 'github-slugger'; +import GithubSlugger, { slug } from 'github-slugger'; import remarkFrontmatter from 'remark-frontmatter'; import remarkGfm from 'remark-gfm'; import remarkParse from 'remark-parse'; @@ -23,6 +23,7 @@ import YAML from 'yaml'; import { robotsContent } from '../scripts/publication.mjs'; import { isPublishableSupportPath } from '../scripts/support-paths.mjs'; +import { apiReferenceMarkup, apiReferenceSidebar, prepareApiReferences } from '../scripts/api-references.mjs'; const execFileAsync = promisify(execFile); const parser = unified().use(remarkParse).use(remarkGfm).use(remarkFrontmatter, ['yaml']); @@ -48,7 +49,7 @@ export function routeFor(source) { : source.slice(0, -'.md'.length); return route .split('/') - .map((segment) => segment.replaceAll('.', '')) + .map((segment) => slug(segment)) .join('/'); } @@ -621,11 +622,12 @@ ${authorRows} // Redirect and download index pages keep the bare noindex unless the build is unofficial. const supportRobots = (unofficial) => (unofficial ? robotsContent(true) : 'noindex'); -function generatedFrontmatter({ title, description, pagefind }, unofficial) { +function generatedFrontmatter({ title, description, pagefind, apiReference }, unofficial) { return `---\n${YAML.stringify({ title, description, ...(pagefind === false ? { pagefind: false } : {}), + ...(apiReference ? { tableOfContents: false, prev: false, next: false } : {}), head: [{ tag: 'meta', attrs: { name: 'robots', content: robotsContent(unofficial) } }], })}---\n\n`; } @@ -678,7 +680,7 @@ function transformBody({ page, pageRoutes, pageAnchors, base, metadata, authors, ? frontmatter.description.trim() : sourceName === 'README.md' ? metadata.abstract - : `${title} in the Digital Registries specification.`; + : `${title} in the ${metadata.name} specification.`; return `${generatedFrontmatter({ title, description, pagefind: isArchive ? false : undefined }, unofficial)}${body}`; } @@ -906,7 +908,7 @@ async function writeSupportDirectoryIndexes( await mkdir(path.dirname(output), { recursive: true }); await writeFile( output, - `${htmlEscape(directory)} downloads

${htmlEscape(directory)} downloads

Source support files for the local Digital Registries preview.

    ${links.join('')}
\n`, + `${htmlEscape(directory)} downloads

${htmlEscape(directory)} downloads

Source support files for the specification preview.

    ${links.join('')}
\n`, ); indexes.push(`${directory}/index.html`); } @@ -1016,12 +1018,33 @@ export async function generateSite({ sourceRoot, siteRoot, base = '/', unofficia const pageAnchors = new Map(loaded.map((page) => [page.sourceName, page.anchors])); const referencedSupportPaths = collectReferencedSupportPaths(loaded); assertReferencedSupportPathsAllowed(referencedSupportPaths); - const sidebar = sidebarFromToc(toc, pagesBySource, ordered); + const supportFiles = await copySupportFiles( + absoluteSourceRoot, + absoluteSiteRoot, + pageSources, + snapshots, + referencedSupportPaths, + ); + const apiReferences = await prepareApiReferences({ + sourceRoot: absoluteSourceRoot, + siteRoot: absoluteSiteRoot, + base: normalizedBase, + unofficial, + snapshots, + reservedPaths: supportFiles, + }); + for (const reference of apiReferences.references) { + const page = pagesBySource.get(reference.page); + if (!page) throw new Error(`api-references.yml: page is not in the source navigation: ${reference.page}`); + reference.title = page.title; + reference.route = page.route; + } + const sidebar = apiReferenceSidebar(sidebarFromToc(toc, pagesBySource, ordered), apiReferences.references, pagesBySource); await pruneFormerGeneratedPages(absoluteSiteRoot, loaded); for (const page of loaded) { - const output = transformBody({ + let output = transformBody({ page, pageRoutes, pageAnchors, @@ -1030,19 +1053,18 @@ export async function generateSite({ sourceRoot, siteRoot, base = '/', unofficia authors, unofficial, }); + const reference = apiReferences.references.find((item) => item.page === page.sourceName); + if (reference) { + output = generatedFrontmatter({ title: page.title, description: page.frontmatter.description, apiReference: true }, unofficial) + + page.headings.map((heading) => ``).join('\n') + + '\n' + apiReferenceMarkup(reference); + } const relative = page.route ? `${page.route}.md` : 'index.md'; const destination = path.join(absoluteSiteRoot, 'src/content/docs', relative); await mkdir(path.dirname(destination), { recursive: true }); await writeFile(destination, output); } - const supportFiles = await copySupportFiles( - absoluteSourceRoot, - absoluteSiteRoot, - pageSources, - snapshots, - referencedSupportPaths, - ); const supportIndexes = await writeSupportDirectoryIndexes( absoluteSourceRoot, absoluteSiteRoot, @@ -1063,7 +1085,8 @@ export async function generateSite({ sourceRoot, siteRoot, base = '/', unofficia sourceDigest: sourceDigest(snapshots), requirementCount, sidebar, - supportFiles, + supportFiles: [...supportFiles, ...apiReferences.supportFiles], + apiReferences: apiReferences.references, supportIndexes, redirects, warnings: [...new Set(warnings)], diff --git a/astro.config.mjs b/astro.config.mjs index 1116287..c912bf9 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -32,6 +32,8 @@ export default defineConfig({ ThemeProvider: './src/components/GuideThemeProvider.astro', Banner: './src/components/PublicationBanner.astro', Footer: './src/components/PublicationFooter.astro', + MarkdownContent: './src/components/ReferenceContent.astro', + PageTitle: './src/components/ReferenceTitle.astro', }, head: [ { tag: 'meta', attrs: { name: 'robots', content: robotsContent(publication.unofficial) } }, diff --git a/docs/building-block-integration.md b/docs/building-block-integration.md new file mode 100644 index 0000000..1ec7935 --- /dev/null +++ b/docs/building-block-integration.md @@ -0,0 +1,88 @@ +# Building Block site integration + +The shared renderer owns Scalar, its pinned dependencies, presentation, and +build checks. Each Building Block owns its Markdown, OpenAPI contracts, and +root `api-references.yml`. Existing GitBook publications are separate consumers; +adding this file does not modify their renderer or migrate their source layout. + +## Local setup + +Use Node 24.11 or later. Install this renderer with `npm ci --ignore-scripts`. +For a framework-format Building Block, run: + +```sh +npm run check -- --profile framework --source /absolute/path/to/building-block --base /building-block/ --unofficial --output /absolute/path/to/preview +``` + +The source needs root `metadata.yml`, `authors.yml`, `toc.yml`, and Markdown. +The template's `specification-site/` wrapper supplies the same commands from a +Building Block repository, using an absolute `GOVSTACK_SITE_RENDERER` checkout. +It deliberately rejects an older renderer when API references are configured. + +[`examples/building-block`](../examples/building-block/) is a runnable, +illustrative source fixture. It has no Digital Registries dependency: + +```sh +npm run check -- --profile framework --source examples/building-block --base /building-block/ --unofficial --output /absolute/path/to/example-preview +``` + +## Declare API pages + +Create a short Markdown page containing its title and list it in `toc.yml`. +Add an entry to root `api-references.yml` with `id`, `page`, `contract`, and +`role`. Set `role: normative` for the draft contract and `role: example` for an +illustrative binding. Keep those on separate pages. Do not add a requirement +just to make a contract visible. + +The page opens on operations, with its role and downloads visible and technical +metadata collapsed. The full source contract remains available to download. +Local `$ref` dependencies are bundled; remote and escaping references fail the +build. Do not copy bundled JSON or Scalar assets into the source repository. + +OpenAPI references are optional. AsyncAPI and protocol-standard surfaces keep +their existing documentation; this renderer does not convert them to OpenAPI. + +## CI + +After publishing a renderer revision containing `action.yml` and native Scalar, +check it out at an immutable full commit and use the local composite action: + +```yaml +- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + path: specification + persist-credentials: false +- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + repository: jeremi/govstack-specification-site + ref: ${{ vars.GOVSTACK_SITE_RENDERER_REF }} + path: renderer + persist-credentials: false +- uses: ./renderer + with: + source: specification + output: ${{ runner.temp }}/site + base: /building-block/ + unofficial: 'true' +``` + +Set `GOVSTACK_SITE_RENDERER_REF` to the published full commit. Validate that it +is a 40-character hexadecimal commit before checkout, and reject a renderer +without `action.yml`, `scripts/api-references.mjs`, and +`src/components/ReferenceContent.astro`. Digital Registries' preview workflow +includes those checks. A repository or organisation variable lets consumers +share a deliberately selected revision; it must not contain a branch name. + +The action installs Node and renderer dependencies, runs tests, checks Astro, +builds, checks output, and tests an isolated HTTP preview. It has no deployment +step or Pages permissions. An existing publication workflow can upload its +checked output and retain its own approval and deployment policy. + +## Activation status + +Local integration and hosted activation are distinct. Changing source config +does not upgrade a previously pinned renderer. Publish the reviewed renderer +change first, set the consumer's immutable revision, then run its site check. +Only after that succeeds should its existing publication process deploy it. +The template remains `noApi: true`; its config example stays inactive until an +adopting Building Block supplies its own contracts and framework source. diff --git a/examples/building-block/README.md b/examples/building-block/README.md new file mode 100644 index 0000000..db80b62 --- /dev/null +++ b/examples/building-block/README.md @@ -0,0 +1,5 @@ +# Example Building Block + +This small fixture demonstrates a framework-format site with a native +[illustrative API reference](resources/api-example.md). It is not a Building +Block specification or a conformance target. diff --git a/examples/building-block/api-references.yml b/examples/building-block/api-references.yml new file mode 100644 index 0000000..800082b --- /dev/null +++ b/examples/building-block/api-references.yml @@ -0,0 +1,5 @@ +references: + - id: entries + page: resources/api-example.md + contract: api/openapi.yaml + role: example diff --git a/examples/building-block/api/entry.schema.json b/examples/building-block/api/entry.schema.json new file mode 100644 index 0000000..fc989dd --- /dev/null +++ b/examples/building-block/api/entry.schema.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "additionalProperties": false, + "required": ["entryId", "label"], + "properties": { + "entryId": { "type": "string" }, + "label": { "type": "string" } + } +} diff --git a/examples/building-block/api/openapi.yaml b/examples/building-block/api/openapi.yaml new file mode 100644 index 0000000..267b290 --- /dev/null +++ b/examples/building-block/api/openapi.yaml @@ -0,0 +1,31 @@ +openapi: 3.1.2 +info: + title: Entries API illustration + version: 0.0.0-example +servers: + - url: https://api.example.invalid +paths: + /v1/entries/{entryId}: + get: + tags: [Entries] + operationId: retrieveEntry + summary: Retrieve one entry + security: [] + x-example-block: + purpose: Demonstrate block-specific technical metadata. + parameters: + - name: entryId + in: path + required: true + schema: + type: string + responses: + '200': + description: One illustrative entry. + content: + application/json: + schema: + $ref: './entry.schema.json' + example: + entryId: example_1 + label: Example entry diff --git a/examples/building-block/authors.yml b/examples/building-block/authors.yml new file mode 100644 index 0000000..4a29e83 --- /dev/null +++ b/examples/building-block/authors.yml @@ -0,0 +1,4 @@ +authors: + - name: Example author + roles: [Author] + urn: example:person:author diff --git a/examples/building-block/metadata.yml b/examples/building-block/metadata.yml new file mode 100644 index 0000000..dedfce1 --- /dev/null +++ b/examples/building-block/metadata.yml @@ -0,0 +1,12 @@ +name: Example Building Block +abstract: An illustrative source fixture for the shared specification renderer. +url: https://example.invalid/building-block/ +repository: https://example.invalid/building-block +urn: example:spec:building-block +owner_group: example:authors +capabilities: [] +extensions: [] +versions: + - version: 0.0.0-example + short_description: Renderer illustration, not a specification release. + latest: true diff --git a/examples/building-block/resources/api-example.md b/examples/building-block/resources/api-example.md new file mode 100644 index 0000000..25ca8d3 --- /dev/null +++ b/examples/building-block/resources/api-example.md @@ -0,0 +1 @@ +# Entries API example diff --git a/examples/building-block/resources/guide.md b/examples/building-block/resources/guide.md new file mode 100644 index 0000000..6136b8c --- /dev/null +++ b/examples/building-block/resources/guide.md @@ -0,0 +1,3 @@ +# Example guide + +The [API illustration](api-example.md) shows one possible deployment contract. diff --git a/examples/building-block/toc.yml b/examples/building-block/toc.yml new file mode 100644 index 0000000..890fa6a --- /dev/null +++ b/examples/building-block/toc.yml @@ -0,0 +1,4 @@ +toc: + resources: + - guide.md + - api-example.md diff --git a/package-lock.json b/package-lock.json index fe3eefd..4b6d15f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,12 +11,14 @@ "@astrojs/markdown-remark": "7.3.3", "@astrojs/starlight": "0.42.6", "@fontsource/inter": "5.3.0", + "@scalar/api-reference": "1.76.4", "astro": "7.4.1", "astro-mermaid": "2.1.0", "mermaid": "11.17.2" }, "devDependencies": { "@astrojs/check": "0.9.11", + "@redocly/cli": "2.73.0", "github-slugger": "2.0.0", "parse5": "8.0.1", "proper-lockfile": "4.1.2", @@ -33,6 +35,80 @@ "node": ">=24.11.0" } }, + "node_modules/@ai-sdk/gateway": { + "version": "4.0.115", + "resolved": "https://registry.npmjs.org/@ai-sdk/gateway/-/gateway-4.0.115.tgz", + "integrity": "sha512-Xn+gDWM4Ti2FzYmxhlZtjEuGBGZlOYaQMpwcVRSN4c9qCMUszD5F5TAbkxgLV/tHKeMfEX+WEuTCl6Kkj2r73A==", + "license": "Apache-2.0", + "dependencies": { + "@ai-sdk/provider": "4.0.28", + "@ai-sdk/provider-utils": "5.0.61", + "@vercel/oidc": "3.2.0" + }, + "engines": { + "node": ">=22" + }, + "peerDependencies": { + "zod": "^3.25.76 || ^4.1.8" + } + }, + "node_modules/@ai-sdk/provider": { + "version": "4.0.28", + "resolved": "https://registry.npmjs.org/@ai-sdk/provider/-/provider-4.0.28.tgz", + "integrity": "sha512-6ThcmkJQXSMlBrf6mirIjUUS04Q5/kApbYTOzd5lZfYXLa1XPpnDLxP/G96/DKc00fDIUOW9S2ls0mSzb0+l9w==", + "license": "Apache-2.0", + "dependencies": { + "json-schema": "^0.4.0" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@ai-sdk/provider-utils": { + "version": "5.0.61", + "resolved": "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-5.0.61.tgz", + "integrity": "sha512-Y+Z3539UXw0ctFDNepTtG23VqBQHr2A6yI2qUxvQcg75DJYgJoD2F9U2Vp5OgQjX7lxto1BLgFtKuOhzrr52vQ==", + "license": "Apache-2.0", + "dependencies": { + "@ai-sdk/provider": "4.0.28", + "@standard-schema/spec": "^1.1.0", + "@workflow/serde": "4.1.0", + "eventsource-parser": "^3.0.8", + "undici": "^7.29.0" + }, + "engines": { + "node": ">=22" + }, + "peerDependencies": { + "zod": "^3.25.76 || ^4.1.8" + } + }, + "node_modules/@ai-sdk/provider-utils/node_modules/undici": { + "version": "7.30.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.30.1.tgz", + "integrity": "sha512-03KrMbjIFDWQR5RNPrSw3bd1r12JpyFQl9/yxjUbJtqkjmllqC5lFjZh6ujeuJCKr8EOQvRW872Oy/az+nLYxg==", + "license": "MIT", + "engines": { + "node": ">=20.18.1" + } + }, + "node_modules/@ai-sdk/vue": { + "version": "4.0.142", + "resolved": "https://registry.npmjs.org/@ai-sdk/vue/-/vue-4.0.142.tgz", + "integrity": "sha512-YwenE45AIdtph5Yl90gRps1+i3DVsR8C3jHP3HPEsBL18c62pzB4s0XeWN2MJ6xSGlcSQgH7E8fY1h8qMx35Qw==", + "license": "Apache-2.0", + "dependencies": { + "@ai-sdk/provider-utils": "5.0.61", + "ai": "7.0.142", + "swrv": "^1.2.0" + }, + "engines": { + "node": ">=22" + }, + "peerDependencies": { + "vue": "^3.3.4" + } + }, "node_modules/@antfu/install-pkg": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-2.1.0.tgz", @@ -797,6 +873,167 @@ "node": ">= 20.12.0" } }, + "node_modules/@codemirror/autocomplete": { + "version": "6.20.4", + "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.20.4.tgz", + "integrity": "sha512-yF8RhOf2SXlg00+qtupzLhrglcas61boqaONiNcbPIebHCpJocpqTBA6dyrtUrQO47hqyTdeob/3XnYilT7TaQ==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@codemirror/commands": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.11.1.tgz", + "integrity": "sha512-O/4hG3SC1YwcmQ0d2UVNDs+AsaNWd1iHVxbTeEBuqH+6bExAiPK3iS/BvpY6rZGURALv4ZD3sIgcCmRvw3ehBg==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.7.0", + "@codemirror/view": "^6.27.0", + "@lezer/common": "^1.1.0" + } + }, + "node_modules/@codemirror/lang-css": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@codemirror/lang-css/-/lang-css-6.3.1.tgz", + "integrity": "sha512-kr5fwBGiGtmz6l0LSJIbno9QrifNMUusivHbnA1H6Dmqy4HZFte3UAICix1VuKo0lMPKQr2rqB+0BkKi/S3Ejg==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.0.2", + "@lezer/css": "^1.1.7" + } + }, + "node_modules/@codemirror/lang-html": { + "version": "6.4.12", + "resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-6.4.12.tgz", + "integrity": "sha512-pw2ReWKUqSkbvh76RAT4NYxiogRu+PWkR2ukAwO9uOgrm8uipkzjtKKtNpyeAQwHOqxEeSvAXZ6vr3AfyB9y/w==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/lang-css": "^6.0.0", + "@codemirror/lang-javascript": "^6.0.0", + "@codemirror/language": "^6.4.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/common": "^1.0.0", + "@lezer/css": "^1.1.0", + "@lezer/html": "^1.3.12" + } + }, + "node_modules/@codemirror/lang-javascript": { + "version": "6.2.5", + "resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-6.2.5.tgz", + "integrity": "sha512-zD4e5mS+50htS7F+TYjBPsiIFGanfVqg4HyUz6WNFikgOPf2BgKlx+TQedI1w6n/IqRBVBbBWmGFdLB/7uxO4A==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.6.0", + "@codemirror/lint": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/common": "^1.0.0", + "@lezer/javascript": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-json": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@codemirror/lang-json/-/lang-json-6.0.2.tgz", + "integrity": "sha512-x2OtO+AvwEHrEwR0FyyPtfDUiloG3rnVTSZV1W8UteaLL8/MajQd8DpvUb2YVzC+/T18aSDv0H9mu+xw0EStoQ==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@lezer/json": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-xml": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@codemirror/lang-xml/-/lang-xml-6.1.0.tgz", + "integrity": "sha512-3z0blhicHLfwi2UgkZYRPioSgVTo9PV5GP5ducFH6FaHy0IAJRg+ixj5gTR1gnT/glAIC8xv4w2VL1LoZfs+Jg==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.4.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "@lezer/common": "^1.0.0", + "@lezer/xml": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-yaml": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@codemirror/lang-yaml/-/lang-yaml-6.1.3.tgz", + "integrity": "sha512-AZ8DJBuXGVHybpBQhmZtgew5//4hv3tdkXnr3vDmOUMJRuB6vn/uuwtmTOTlqEaQFg3hQSVeA90NmvIQyUV6FQ==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.2.0", + "@lezer/lr": "^1.0.0", + "@lezer/yaml": "^1.0.0" + } + }, + "node_modules/@codemirror/language": { + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.13.1.tgz", + "integrity": "sha512-zfvU2r3TyylQLMj/te+5CnQ0rSqZi8B1oTCBbQkagcLW4Xc6imab6qN+pEJhsuNOLaJqiRyBXp9UhWA1DhVvDw==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/streamparser": "^6.0.0", + "@codemirror/view": "^6.23.0", + "@lezer/common": "^1.5.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0", + "style-mod": "^4.0.0" + } + }, + "node_modules/@codemirror/lint": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.9.7.tgz", + "integrity": "sha512-28/+iWLYxKxsvGYhSYL7zaCZqLz5+FFFDq9tVsvGv9kv8RY4fFAchJ5WX9M3YrrRlTIsECjsXPqeNgnSmNP2dg==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.42.0", + "crelt": "^1.0.5" + } + }, + "node_modules/@codemirror/state": { + "version": "6.7.6", + "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.7.6.tgz", + "integrity": "sha512-kAz+AncRtKuIknedxT1bq4XwXv4UowhbkHU1myPrtVb/jZtImWuV5BXzv5vK6i3kYACsdiZiQKFQQ5Mq7elW8w==", + "license": "MIT", + "dependencies": { + "@marijn/find-cluster-break": "^1.0.0" + } + }, + "node_modules/@codemirror/streamparser": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@codemirror/streamparser/-/streamparser-6.0.0.tgz", + "integrity": "sha512-JTFPF6xrfjt0mnfGPgzcLiMwYmvIyNaoizp8BYzv8FE8KrT6GBGDZ190rtt+O7Wke3gG/MFHyiY9YGNeimof4w==", + "license": "MIT" + }, + "node_modules/@codemirror/view": { + "version": "6.43.15", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.43.15.tgz", + "integrity": "sha512-HHsfpqFeHyXLs983pSRe38Xajs0vFWZQ2BuX0m7Ki8w3jZ5iD8cuR3lBz2/5/X53Dhf32SBHKh6rtSTB6tKeGw==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.7.0", + "crelt": "^1.0.6", + "style-mod": "^4.1.0", + "w3c-keyname": "^2.2.4" + } + }, "node_modules/@ctrl/tinycolor": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-4.2.2.tgz", @@ -944,6 +1181,44 @@ "@expressive-code/core": "^0.44.3" } }, + "node_modules/@floating-ui/core": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.8.0.tgz", + "integrity": "sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ==", + "license": "MIT", + "dependencies": { + "@floating-ui/utils": "^0.2.12" + } + }, + "node_modules/@floating-ui/dom": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.8.0.tgz", + "integrity": "sha512-yXSrzeHZBTZadLOlfyhCkJHNeLJnHRnRInwdZ40L7ZiaAtrBwoYlsDrX3v5zB1Utk7CLfzcOVnVVWoXEky7Ceg==", + "license": "MIT", + "dependencies": { + "@floating-ui/core": "^1.8.0", + "@floating-ui/utils": "^0.2.12" + } + }, + "node_modules/@floating-ui/utils": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.12.tgz", + "integrity": "sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww==", + "license": "MIT" + }, + "node_modules/@floating-ui/vue": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@floating-ui/vue/-/vue-2.0.1.tgz", + "integrity": "sha512-043dyEKD9TDSfz080YH2vobubgg+NIo/9Fw4RAl7sEMpD8Am1DNrrSTl/GpMBjyGHoD/FbJY2QLawY+HSQsEIA==", + "license": "MIT", + "dependencies": { + "@floating-ui/dom": "^1.8.0", + "@floating-ui/utils": "^0.2.12" + }, + "peerDependencies": { + "vue": ">=3.3.0" + } + }, "node_modules/@fontsource/inter": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/@fontsource/inter/-/inter-5.3.0.tgz", @@ -953,6 +1228,33 @@ "url": "https://github.com/sponsors/ayuhito" } }, + "node_modules/@headlessui/tailwindcss": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@headlessui/tailwindcss/-/tailwindcss-0.2.2.tgz", + "integrity": "sha512-xNe42KjdyA4kfUKLLPGzME9zkH7Q3rOZ5huFihWNWOQFxnItxPB3/67yBI8/qBfY8nwBRx5GHn4VprsoluVMGw==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "tailwindcss": "^3.0 || ^4.0" + } + }, + "node_modules/@headlessui/vue": { + "version": "1.7.23", + "resolved": "https://registry.npmjs.org/@headlessui/vue/-/vue-1.7.23.tgz", + "integrity": "sha512-JzdCNqurrtuu0YW6QaDtR2PIYCKPUWq28csDyMvN4zmGccmE7lz40Is6hc3LA4HFeCI7sekZ/PQMTNmn9I/4Wg==", + "license": "MIT", + "dependencies": { + "@tanstack/vue-virtual": "^3.0.0-beta.60" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "vue": "^3.2.0" + } + }, "node_modules/@iconify/types": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz", @@ -1519,12 +1821,165 @@ "url": "https://opencollective.com/libvips" } }, + "node_modules/@internationalized/date": { + "version": "3.12.4", + "resolved": "https://registry.npmjs.org/@internationalized/date/-/date-3.12.4.tgz", + "integrity": "sha512-M1dEn4c1U1HsSlaVR8upZtSqvXrTkHDfv18H01uCSJyjVLDxnBR38v/fMxecmlwXKR4i9HeZcmgQAPE6A+aGJQ==", + "license": "Apache-2.0", + "dependencies": { + "@swc/helpers": "^0.5.0" + } + }, + "node_modules/@internationalized/number": { + "version": "3.6.9", + "resolved": "https://registry.npmjs.org/@internationalized/number/-/number-3.6.9.tgz", + "integrity": "sha512-GgWy2caO/+hV9sT/oCTWGHvbjmJMPT9kkXzoKRLnkEq7adghhR7UprhvY9sXrKfrp3NcDfhF6QQHXR1KfQbB8g==", + "license": "Apache-2.0", + "dependencies": { + "@swc/helpers": "^0.5.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", "license": "MIT" }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@lezer/common": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.5.5.tgz", + "integrity": "sha512-Pw7PVCndruF1pb3ebCxpSVpkMHSDjwRCLcTRw+RizUKco5QbWylwq2g4lnG/RYN7yTTQDXE9F77MwtkAyphrjg==", + "license": "MIT" + }, + "node_modules/@lezer/css": { + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/@lezer/css/-/css-1.3.9.tgz", + "integrity": "sha512-ZmzgvTOBdJWGIsY/ItAfN7UW8DV802oZG+jeG6E508SwEzz5YhuAajptpWPICvIyqYAD2+VjMdOS40GgGkyEOQ==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.3.0" + } + }, + "node_modules/@lezer/highlight": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.5.tgz", + "integrity": "sha512-O1GMVKgtf5YspFaRzpmqkVgMtIk2HG9uMAbH6wdAIdNh3TVzCsch/+cRi+6l2//UGDKe6NB9BW3cvuR5ezMQ0w==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.3.0" + } + }, + "node_modules/@lezer/html": { + "version": "1.3.13", + "resolved": "https://registry.npmjs.org/@lezer/html/-/html-1.3.13.tgz", + "integrity": "sha512-oI7n6NJml729m7pjm9lvLvmXbdoMoi2f+1pwSDJkl9d68zGr7a9Btz8NdHTGQZtW2DA25ybeuv/SyDb9D5tseg==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/javascript": { + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.5.6.tgz", + "integrity": "sha512-sEvOqpl4vJQca0NugSQK02vQPbc5KrvoojnYGoqqFgFO0MtcYhwGiHKVEB+LuXYJnfyXo4QPA8ztbrEa4Fw5NA==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.1.3", + "@lezer/lr": "^1.3.0" + } + }, + "node_modules/@lezer/json": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@lezer/json/-/json-1.0.3.tgz", + "integrity": "sha512-BP9KzdF9Y35PDpv04r0VeSTKDeox5vVr3efE7eBbx3r4s3oNLfunchejZhjArmeieBH+nVOpgIiBJpEAv8ilqQ==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/lr": { + "version": "1.4.12", + "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.12.tgz", + "integrity": "sha512-On9HU4oMMiHPMkQDgoTnGahjgG5n/MkN38CgG77sMraKLL+3JBbeQNi1FcCXV9QRqwF9/BUXP3caHyJC1fBOTQ==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@lezer/xml": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@lezer/xml/-/xml-1.0.6.tgz", + "integrity": "sha512-CdDwirL0OEaStFue/66ZmFSeppuL6Dwjlk8qk153mSQwiSH/Dlri4GNymrNWnUmPl2Um7QfV1FO9KFUyX3Twww==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/yaml": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@lezer/yaml/-/yaml-1.0.4.tgz", + "integrity": "sha512-2lrrHqxalACEbxIbsjhqGpSW8kWpUKuY6RHgnSAFZa6qK62wvnPxA8hGOwOoDbwHcOFs5M4o27mjGu+P7TvBmw==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.4.0" + } + }, + "node_modules/@marijn/find-cluster-break": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@marijn/find-cluster-break/-/find-cluster-break-1.0.4.tgz", + "integrity": "sha512-Wy0V7+SGUjnF9/TkiM1hKVDPj7jKXduPNboMVtHTA8dySMURWqfg/JZ9E2Sq8JgSJmkl7k7Qe9FLeMSrSraWmQ==", + "license": "MIT" + }, "node_modules/@mdx-js/mdx": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-3.1.1.tgz", @@ -1713,6 +2168,38 @@ "win32" ] }, + "node_modules/@phosphor-icons/core": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@phosphor-icons/core/-/core-2.1.1.tgz", + "integrity": "sha512-v4ARvrip4qBCImOE5rmPUylOEK4iiED9ZyKjcvzuezqMaiRASCHKcRIuvvxL/twvLpkfnEODCOJp5dM4eZilxQ==", + "license": "MIT" + }, + "node_modules/@redocly/cli": { + "version": "2.73.0", + "resolved": "https://registry.npmjs.org/@redocly/cli/-/cli-2.73.0.tgz", + "integrity": "sha512-ujoeS+01JhFZuTkRqENl0J2Cr/4kXDVt5l2BC3Id3kzSGhsVS8AUsItWmkF+tMue5naQDcNU03XfV/gcMtttRQ==", + "dev": true, + "license": "MIT", + "bin": { + "openapi": "bin/cli.js", + "redocly": "bin/cli.js" + }, + "engines": { + "node": ">=22.12.0 || >=20.19.0 <21.0.0", + "npm": ">=10" + } + }, + "node_modules/@replit/codemirror-css-color-picker": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@replit/codemirror-css-color-picker/-/codemirror-css-color-picker-6.3.0.tgz", + "integrity": "sha512-19biDANghUm7Fz7L1SNMIhK48tagaWuCOHj4oPPxc7hxPGkTVY2lU/jVZ8tsbTKQPVG7BO2CBDzs7CBwb20t4A==", + "license": "MIT", + "peerDependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0" + } + }, "node_modules/@rolldown/binding-android-arm-eabi": { "version": "1.2.15", "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.15.tgz", @@ -1977,55 +2464,642 @@ "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", "license": "MIT" }, - "node_modules/@shikijs/core": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-4.5.0.tgz", - "integrity": "sha512-6CIgwq+bt2JZ3OSjb/nBkkwEf/CfpHcbam+Mg5Pllco7HAGRQ2/EFhZrrJtbyNTgKwknfVS+llsXGygiDGwJWw==", - "license": "MIT", - "dependencies": { - "@shikijs/primitive": "4.5.0", - "@shikijs/types": "4.5.0", - "@shikijs/vscode-textmate": "^10.0.2", - "@types/hast": "^3.0.5", - "hast-util-to-html": "^9.0.5" + "node_modules/@scalar/agent-chat": { + "version": "0.12.49", + "resolved": "https://registry.npmjs.org/@scalar/agent-chat/-/agent-chat-0.12.49.tgz", + "integrity": "sha512-ol4VbQSCAfRPsHitueK8G6pj0YRhTXqLqVY5ADn9WTKW7F0UVgjfq8HU8gg0Q6R43fBdmk74eVfI7DojAdBbxg==", + "license": "MIT", + "dependencies": { + "@ai-sdk/vue": "4.0.142", + "@scalar/api-client": "3.23.6", + "@scalar/components": "0.33.1", + "@scalar/helpers": "0.16.4", + "@scalar/icons": "0.7.8", + "@scalar/json-magic": "0.17.0", + "@scalar/openapi-types": "0.9.8", + "@scalar/schemas": "0.16.0", + "@scalar/themes": "0.20.0", + "@scalar/types": "0.26.0", + "@scalar/use-toasts": "0.10.6", + "@scalar/validation": "0.6.7", + "@scalar/workspace-store": "0.69.3", + "@vueuse/core": "15.0.0", + "ai": "7.0.142", + "js-base64": "^3.9.4", + "neverpanic": "0.0.8", + "truncate-json": "3.0.1", + "vue": "^3.5.44" }, "engines": { - "node": ">=20" + "node": ">=22" } }, - "node_modules/@shikijs/engine-javascript": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-4.5.0.tgz", - "integrity": "sha512-Ed6UdEj84LyYkwnxM5CvSMWAD+id9ExTYri0/+x41U9zrgNifPSS9lZm0JqBP0VfYI8yr8tY5nbNq9+p9R0kFA==", - "license": "MIT", - "dependencies": { - "@shikijs/types": "4.5.0", - "@shikijs/vscode-textmate": "^10.0.2", - "oniguruma-to-es": "^4.3.6" + "node_modules/@scalar/api-client": { + "version": "3.23.6", + "resolved": "https://registry.npmjs.org/@scalar/api-client/-/api-client-3.23.6.tgz", + "integrity": "sha512-VmMAB9kuY2D7v4E1IQnbo2IsHzSmof0vawfloRlribxlvKcRr5zCmtaRMxfvScuhiiutBE7fZ9nZn+88owWprQ==", + "license": "MIT", + "dependencies": { + "@headlessui/tailwindcss": "^0.2.2", + "@headlessui/vue": "1.7.23", + "@scalar/blocks": "0.6.3", + "@scalar/components": "0.33.1", + "@scalar/helpers": "0.16.4", + "@scalar/icons": "0.7.8", + "@scalar/localization": "0.2.9", + "@scalar/oas-utils": "0.20.18", + "@scalar/openapi-types": "0.9.8", + "@scalar/sidebar": "0.12.6", + "@scalar/snippetz": "0.10.14", + "@scalar/themes": "0.20.0", + "@scalar/typebox": "^0.1.3", + "@scalar/types": "0.26.0", + "@scalar/use-codemirror": "0.14.16", + "@scalar/use-hooks": "0.4.22", + "@scalar/use-toasts": "0.10.6", + "@scalar/workspace-store": "0.69.3", + "@vueuse/core": "15.0.0", + "@vueuse/integrations": "15.0.0", + "focus-trap": "^8.2.3", + "fuse.js": "^7.5.0", + "js-base64": "^3.9.4", + "jsonc-parser": "3.3.1", + "nanoid": "^5.1.16", + "pretty-ms": "^10.0.0", + "radix-vue": "^1.9.17", + "set-cookie-parser": "3.1.3", + "vue": "^3.5.44", + "yaml": "^2.9.1", + "zod": "^4.6.7" }, "engines": { - "node": ">=20" + "node": ">=22" } }, - "node_modules/@shikijs/engine-oniguruma": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-4.5.0.tgz", - "integrity": "sha512-dKVmbJecVdB9recl8a/CU4jdpNXyjJQrIcesIkpS70s5HS02ohpnCSpMUbotPnEUzbAcLQ+S4hwZYbkBBiTcJw==", + "node_modules/@scalar/api-client/node_modules/nanoid": { + "version": "5.1.16", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.16.tgz", + "integrity": "sha512-kVrnsrJqMR8+oLJnGEmSWw9BivK5mt7H3FZatVRjrc5wGqFYuBxX1yG7+A7Gi5AefkX6t/oCkizcQgpu0cY1dQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "license": "MIT", - "dependencies": { - "@shikijs/types": "4.5.0", - "@shikijs/vscode-textmate": "^10.0.2" + "bin": { + "nanoid": "bin/nanoid.js" + }, + "engines": { + "node": "^18 || >=20" + } + }, + "node_modules/@scalar/api-reference": { + "version": "1.76.4", + "resolved": "https://registry.npmjs.org/@scalar/api-reference/-/api-reference-1.76.4.tgz", + "integrity": "sha512-bHSVv494yuNTcBzmfZR3eYhckOTiu3L6IJmvM2kdKzBVmWqm+JhEHbYc7ydsv7FBSs3vTW9sCz00La2dFgWxVg==", + "license": "MIT", + "dependencies": { + "@headlessui/vue": "1.7.23", + "@scalar/agent-chat": "0.12.49", + "@scalar/api-client": "3.23.6", + "@scalar/asyncapi-to-markdown": "0.2.5", + "@scalar/blocks": "0.6.3", + "@scalar/code-highlight": "0.4.11", + "@scalar/components": "0.33.1", + "@scalar/helpers": "0.16.4", + "@scalar/icons": "0.7.8", + "@scalar/localization": "0.2.9", + "@scalar/oas-utils": "0.20.18", + "@scalar/openapi-to-markdown": "1.7.3", + "@scalar/schemas": "0.16.0", + "@scalar/sidebar": "0.12.6", + "@scalar/snippetz": "0.10.14", + "@scalar/themes": "0.20.0", + "@scalar/types": "0.26.0", + "@scalar/use-hooks": "0.4.22", + "@scalar/use-toasts": "0.10.6", + "@scalar/validation": "0.6.7", + "@scalar/workspace-store": "0.69.3", + "@unhead/vue": "^3.4.3", + "@vueuse/core": "15.0.0", + "fuse.js": "^7.5.0", + "microdiff": "1.5.0", + "nanoid": "^5.1.16", + "vue": "^3.5.44", + "yaml": "^2.9.1" }, "engines": { - "node": ">=20" + "node": ">=22" } }, - "node_modules/@shikijs/langs": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-4.5.0.tgz", - "integrity": "sha512-wwBTqwduXSz0X4v9Qa2EWeFaYJEw1clCncWjoRNQRbVDu3SPRTRWucnouYapKj3b8Q+sk/41Vbc4B5c8nuYzLA==", + "node_modules/@scalar/api-reference/node_modules/nanoid": { + "version": "5.1.16", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.16.tgz", + "integrity": "sha512-kVrnsrJqMR8+oLJnGEmSWw9BivK5mt7H3FZatVRjrc5wGqFYuBxX1yG7+A7Gi5AefkX6t/oCkizcQgpu0cY1dQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "license": "MIT", - "dependencies": { + "bin": { + "nanoid": "bin/nanoid.js" + }, + "engines": { + "node": "^18 || >=20" + } + }, + "node_modules/@scalar/asyncapi-to-markdown": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@scalar/asyncapi-to-markdown/-/asyncapi-to-markdown-0.2.5.tgz", + "integrity": "sha512-0t/r4ZtVsuUQhQjsRwaZH1cxBtwsPnTDjQjDAQ6CeA1mneBMwHG0ApexbcV4Hw4C+50romhXFF89jRYUdOvp4g==", + "license": "MIT", + "dependencies": { + "@scalar/asyncapi-upgrader": "0.1.18", + "@scalar/helpers": "0.16.4", + "@scalar/json-magic": "0.17.0", + "@scalar/openapi-to-markdown": "1.7.3", + "@scalar/types": "0.26.0", + "@scalar/workspace-store": "0.69.3", + "remark-gfm": "^4.0.1", + "remark-stringify": "^11.0.0", + "unified": "^11.0.5" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@scalar/asyncapi-upgrader": { + "version": "0.1.18", + "resolved": "https://registry.npmjs.org/@scalar/asyncapi-upgrader/-/asyncapi-upgrader-0.1.18.tgz", + "integrity": "sha512-jr+BW2c9mM2LNb6WP2xmi1lRopOg35E71AyNwPiMIbue+yoZp+K2q2vgCjCiltKF0sKJMFjdujyLWgBDWsb1nw==", + "license": "MIT", + "dependencies": { + "@scalar/helpers": "0.16.4" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@scalar/blocks": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@scalar/blocks/-/blocks-0.6.3.tgz", + "integrity": "sha512-pnpOK6lgNx1WFDA9Ed1Y+Sa+YqDZOv3SWZqY9e95FxyAABcv1mM9Kh/cK5SLT422/dLMvyl7Qp3aa+FTGlmefg==", + "license": "MIT", + "dependencies": { + "@scalar/components": "0.33.1", + "@scalar/helpers": "0.16.4", + "@scalar/icons": "0.7.8", + "@scalar/localization": "0.2.9", + "@scalar/snippetz": "0.10.14", + "@scalar/themes": "0.20.0", + "@scalar/types": "0.26.0", + "@scalar/use-hooks": "0.4.22", + "@scalar/workspace-store": "0.69.3", + "@types/har-format": "^1.2.16", + "@vueuse/core": "15.0.0", + "js-base64": "^3.9.4", + "vue": "^3.5.44" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@scalar/code-highlight": { + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/@scalar/code-highlight/-/code-highlight-0.4.11.tgz", + "integrity": "sha512-wqlAgMW35CEXYmBTA2NakvM7a0y69hHIdMduMZEsA8Ftkc4mci3PThUgXC7YrL2nFL57PGW97Lxh2BoNgdv35Q==", + "license": "MIT", + "dependencies": { + "hast-util-to-text": "^4.0.2", + "highlight.js": "^11.12.0", + "lowlight": "^3.3.0", + "rehype-external-links": "^3.0.0", + "rehype-format": "^5.0.1", + "rehype-parse": "^9.0.1", + "rehype-raw": "^7.0.0", + "rehype-sanitize": "^6.0.0", + "rehype-stringify": "^10.0.1", + "remark-gfm": "^4.0.1", + "remark-parse": "^11.0.0", + "remark-rehype": "^11.1.2", + "remark-stringify": "^11.0.0", + "unified": "^11.0.5", + "unist-util-visit": "^5.1.0" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@scalar/components": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@scalar/components/-/components-0.33.1.tgz", + "integrity": "sha512-tNhtJx1sfX44qPMnC1hgudbIuUuHDhvRW5DgB9s5iWtIIJVKA0TsdjpL65itz9Cz0reDx7eGdA7lEyr+MngDvw==", + "license": "MIT", + "dependencies": { + "@floating-ui/utils": "0.2.12", + "@floating-ui/vue": "2.0.1", + "@headlessui/tailwindcss": "^0.2.2", + "@headlessui/vue": "1.7.23", + "@scalar/code-highlight": "0.4.11", + "@scalar/helpers": "0.16.4", + "@scalar/highlight": "0.6.0", + "@scalar/icons": "0.7.8", + "@scalar/themes": "0.20.0", + "@scalar/use-hooks": "0.4.22", + "@vueuse/core": "15.0.0", + "cva": "1.0.0-beta.4", + "radix-vue": "^1.9.17", + "vue": "^3.5.44", + "vue-component-type-helpers": "^3.3.13" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@scalar/helpers": { + "version": "0.16.4", + "resolved": "https://registry.npmjs.org/@scalar/helpers/-/helpers-0.16.4.tgz", + "integrity": "sha512-9eILWzUcAkHEuYMMvijpSIy69t+Vkq+NudLB/7lgARFTWqXfQpIxW1L3VH7ogKyRie5+E4CNZ3PSvlw6IIfLGw==", + "license": "MIT", + "engines": { + "node": ">=22" + } + }, + "node_modules/@scalar/highlight": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@scalar/highlight/-/highlight-0.6.0.tgz", + "integrity": "sha512-Vb57bGAn5emtHBQa6QPjSq2Z2Xo2Z3cGS6diV/BmYWn0kzDKqFK1B4SFfFNJNhJLsm798kdI1iJz697lXnMhRA==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.5" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@scalar/icons": { + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/@scalar/icons/-/icons-0.7.8.tgz", + "integrity": "sha512-/Jee+6lk3I3GCkL4FW7IPjC1+WvAkAsZ4yGkq0tXHbZzJ1BWMzRud/BZuK1eCHQ+un5CDTy26UzJcM5tCMn63w==", + "license": "MIT", + "dependencies": { + "@phosphor-icons/core": "^2.1.1", + "@types/node": "^24.19.2", + "chalk": "^6.0.1", + "vue": "^3.5.44" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@scalar/json-magic": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@scalar/json-magic/-/json-magic-0.17.0.tgz", + "integrity": "sha512-YmJAO9NoGCcU/vx7P4Dy9DGv+Vntp+ny3Fh99slHOOh/IZxvbdK5hWeZdzQ3x+ezab9XJNscFoX8H/P6W+H8lA==", + "license": "MIT", + "dependencies": { + "@scalar/helpers": "0.16.4", + "pathe": "^2.0.3", + "undici": "8.12.3", + "yaml": "^2.9.1" + }, + "engines": { + "node": ">=22.19.0" + } + }, + "node_modules/@scalar/localization": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/@scalar/localization/-/localization-0.2.9.tgz", + "integrity": "sha512-aSdpoWWSH0EJ75LJ5zMNmh8HGMlnKEDdpylHRbr1VTMycxNuZZ0TCUSINu0EjOSFB+n883+pkx5cXllIAHU1MQ==", + "license": "MIT", + "dependencies": { + "@scalar/helpers": "0.16.4", + "type-fest": "^5.10.0", + "vue": "^3.5.44" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@scalar/oas-utils": { + "version": "0.20.18", + "resolved": "https://registry.npmjs.org/@scalar/oas-utils/-/oas-utils-0.20.18.tgz", + "integrity": "sha512-O4nOkkTrbnWSyTf2T2WRDKoOQbNJ55H9rjY0V06sS/P/XNdo5QoJ/GraqcgWhiVD1jDWZ3MnzjUcAi6v8pxUaQ==", + "license": "MIT", + "dependencies": { + "@scalar/helpers": "0.16.4", + "@scalar/themes": "0.20.0", + "@scalar/types": "0.26.0", + "@scalar/workspace-store": "0.69.3", + "flatted": "^3.4.4", + "vue": "^3.5.44", + "yaml": "^2.9.1" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@scalar/openapi-to-markdown": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/@scalar/openapi-to-markdown/-/openapi-to-markdown-1.7.3.tgz", + "integrity": "sha512-9vUFVo5g2YSD7Y8ZQhvxnVnQX/KGAiNwl+37xQvZeEcPr0gNrWyauQL9XK2G6UlHh69/rhV3AmYjTLqhVw8CvA==", + "license": "MIT", + "dependencies": { + "@scalar/code-highlight": "0.4.11", + "@scalar/helpers": "0.16.4", + "@scalar/json-magic": "0.17.0", + "@scalar/openapi-upgrader": "0.4.6", + "@scalar/workspace-store": "0.69.3", + "rehype-parse": "^9.0.1", + "rehype-remark": "^10.0.1", + "rehype-sanitize": "^6.0.0", + "remark-gfm": "^4.0.1", + "remark-parse": "^11.0.0", + "remark-stringify": "^11.0.0", + "unified": "^11.0.5" + }, + "engines": { + "node": ">=22.19.0" + } + }, + "node_modules/@scalar/openapi-types": { + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@scalar/openapi-types/-/openapi-types-0.9.8.tgz", + "integrity": "sha512-pGcpkZObsGBC7nRKYte+6gstoe0C4hp7B2UWQYjg5To1wE68s3OHVvin+muL3tn3ZAoahXeJAkn1+aEcMi802w==", + "license": "MIT", + "engines": { + "node": ">=22" + } + }, + "node_modules/@scalar/openapi-upgrader": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/@scalar/openapi-upgrader/-/openapi-upgrader-0.4.6.tgz", + "integrity": "sha512-wkTbowGZAlDA5AhCAnBVft6y3veoE17P+okH/zrwM/BZWBSzPghGpa4BPTCg3+IzRmRP/8ZeaYO7LfxCDAEmcA==", + "license": "MIT", + "dependencies": { + "@scalar/helpers": "0.16.4", + "@scalar/openapi-types": "0.9.8" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@scalar/schemas": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@scalar/schemas/-/schemas-0.16.0.tgz", + "integrity": "sha512-SHhRIH/9x86mRmJcyMgnMMWxDNzRtuyb93anz5zfWV2XuV7gZ1Br6E5Ll2Ygoc3HoKjOQkSdSVs11oKQxjvKMw==", + "license": "MIT", + "dependencies": { + "@scalar/helpers": "0.16.4", + "@scalar/types": "0.26.0", + "@scalar/validation": "0.6.7" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@scalar/sidebar": { + "version": "0.12.6", + "resolved": "https://registry.npmjs.org/@scalar/sidebar/-/sidebar-0.12.6.tgz", + "integrity": "sha512-05lHQuJv18P4ctDW3xd2p1EqrgKhdufi6FBCX9K+TlDexOY5bYv+QvZvOgEnGseUEVWii6jGxixC6sQkxFwl7A==", + "license": "MIT", + "dependencies": { + "@scalar/components": "0.33.1", + "@scalar/helpers": "0.16.4", + "@scalar/icons": "0.7.8", + "@scalar/themes": "0.20.0", + "@scalar/use-hooks": "0.4.22", + "@scalar/workspace-store": "0.69.3", + "vue": "^3.5.44" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@scalar/snippetz": { + "version": "0.10.14", + "resolved": "https://registry.npmjs.org/@scalar/snippetz/-/snippetz-0.10.14.tgz", + "integrity": "sha512-/1O75DNxK8fB6r8QdvlHsek6bMynhnCe88IY33qxHXbHfo3gQruD+HztJvqOV8IQYGAnjf33rnnz4aeSnfUABg==", + "license": "MIT", + "dependencies": { + "@scalar/helpers": "0.16.4", + "@scalar/types": "0.26.0", + "js-base64": "^3.9.4" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@scalar/themes": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@scalar/themes/-/themes-0.20.0.tgz", + "integrity": "sha512-lYyZjcP6bThgtc3TtNeTiceOdDhlPNfodMi5lFCAxMNQxOcceJXi+f1WeLuePWcD15uG/ApgMLu/F7hTj+8kFQ==", + "license": "MIT", + "dependencies": { + "nanoid": "^5.1.16" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@scalar/themes/node_modules/nanoid": { + "version": "5.1.16", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.16.tgz", + "integrity": "sha512-kVrnsrJqMR8+oLJnGEmSWw9BivK5mt7H3FZatVRjrc5wGqFYuBxX1yG7+A7Gi5AefkX6t/oCkizcQgpu0cY1dQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.js" + }, + "engines": { + "node": "^18 || >=20" + } + }, + "node_modules/@scalar/typebox": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@scalar/typebox/-/typebox-0.1.3.tgz", + "integrity": "sha512-lU055AUccECZMIfGA0z/C1StYmboAYIPJLDFBzOO81yXBi35Pxdq+I4fWX6iUZ8qcoHneiLGk9jAUM1rA93iEg==", + "license": "MIT" + }, + "node_modules/@scalar/types": { + "version": "0.26.0", + "resolved": "https://registry.npmjs.org/@scalar/types/-/types-0.26.0.tgz", + "integrity": "sha512-T78Dj1Q+W0E1RsMyPoydfR+L+p9IUIkntBCRYlWaRibM98jAxABRYGQoU/qDHX0PR1IAFdE+d7ZqslypZbJzcg==", + "license": "MIT", + "dependencies": { + "@scalar/helpers": "0.16.4", + "nanoid": "^5.1.16", + "type-fest": "^5.10.0", + "zod": "^4.6.7" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@scalar/types/node_modules/nanoid": { + "version": "5.1.16", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.16.tgz", + "integrity": "sha512-kVrnsrJqMR8+oLJnGEmSWw9BivK5mt7H3FZatVRjrc5wGqFYuBxX1yG7+A7Gi5AefkX6t/oCkizcQgpu0cY1dQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.js" + }, + "engines": { + "node": "^18 || >=20" + } + }, + "node_modules/@scalar/use-codemirror": { + "version": "0.14.16", + "resolved": "https://registry.npmjs.org/@scalar/use-codemirror/-/use-codemirror-0.14.16.tgz", + "integrity": "sha512-3s8IzFEMReB28kP0Keq1yNu84F2tUTpHoXwfSY4Nb3xpiBaMJfbj1p5w2fFvXQgCCtdf3nBUPbRLTxgAebWXaA==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.20.3", + "@codemirror/commands": "^6.11.1", + "@codemirror/lang-css": "^6.3.1", + "@codemirror/lang-html": "^6.4.12", + "@codemirror/lang-json": "^6.0.2", + "@codemirror/lang-xml": "^6.1.0", + "@codemirror/lang-yaml": "^6.1.3", + "@codemirror/language": "^6.13.1", + "@codemirror/lint": "^6.9.7", + "@codemirror/state": "^6.7.6", + "@codemirror/view": "^6.43.14", + "@lezer/highlight": "^1.2.5", + "@replit/codemirror-css-color-picker": "^6.3.0", + "vue": "^3.5.44" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@scalar/use-hooks": { + "version": "0.4.22", + "resolved": "https://registry.npmjs.org/@scalar/use-hooks/-/use-hooks-0.4.22.tgz", + "integrity": "sha512-+XQ8WwUGCzBTLGycgNue/0sIOSA8n/RSlu3XC1wUX6UB69j3kD4qeI9I60i1uFW7OL1CtaLq66BIe84uMnJAng==", + "license": "MIT", + "dependencies": { + "@scalar/helpers": "0.16.4", + "@scalar/use-toasts": "0.10.6", + "@scalar/validation": "0.6.7", + "@vueuse/core": "15.0.0", + "cva": "1.0.0-beta.4", + "tailwind-merge": "3.7.0", + "vue": "^3.5.44" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@scalar/use-toasts": { + "version": "0.10.6", + "resolved": "https://registry.npmjs.org/@scalar/use-toasts/-/use-toasts-0.10.6.tgz", + "integrity": "sha512-rs0DkbWpKhy8WPjU6LDOan5RI+iUaj7j/Rdkui2+FXB0LB789OfWsj3VeD/vlPLrk7L5Du67AOLLKVqwIp2nJA==", + "license": "MIT", + "dependencies": { + "vue": "^3.5.44", + "vue-sonner": "^2.0.9" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@scalar/validation": { + "version": "0.6.7", + "resolved": "https://registry.npmjs.org/@scalar/validation/-/validation-0.6.7.tgz", + "integrity": "sha512-xvmeYb0LOg9B598oVA/1fs9MvnMdtWjQYG3v2Wgftewizr7tQjsdDYT1TQahlDzqRG+r+ml6zlSkPrFiCE5jHQ==", + "license": "MIT", + "engines": { + "node": ">=20" + } + }, + "node_modules/@scalar/workspace-store": { + "version": "0.69.3", + "resolved": "https://registry.npmjs.org/@scalar/workspace-store/-/workspace-store-0.69.3.tgz", + "integrity": "sha512-DNdnN0oxbFZkVb/rCC3G65pQkX/gtiuwlboUCe5VfvfcTtP7ebn2jS4MkzefK6ZGu7fHi+1Zw1srOSIiAOHrbQ==", + "license": "MIT", + "dependencies": { + "@scalar/asyncapi-upgrader": "0.1.18", + "@scalar/helpers": "0.16.4", + "@scalar/json-magic": "0.17.0", + "@scalar/openapi-upgrader": "0.4.6", + "@scalar/schemas": "0.16.0", + "@scalar/snippetz": "0.10.14", + "@scalar/typebox": "0.1.3", + "@scalar/types": "0.26.0", + "@scalar/validation": "0.6.7", + "js-base64": "^3.9.4", + "type-fest": "^5.10.0", + "vue": "^3.5.44", + "yaml": "^2.9.1" + }, + "engines": { + "node": ">=22.19.0" + } + }, + "node_modules/@shikijs/core": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-4.5.0.tgz", + "integrity": "sha512-6CIgwq+bt2JZ3OSjb/nBkkwEf/CfpHcbam+Mg5Pllco7HAGRQ2/EFhZrrJtbyNTgKwknfVS+llsXGygiDGwJWw==", + "license": "MIT", + "dependencies": { + "@shikijs/primitive": "4.5.0", + "@shikijs/types": "4.5.0", + "@shikijs/vscode-textmate": "^10.0.2", + "@types/hast": "^3.0.5", + "hast-util-to-html": "^9.0.5" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@shikijs/engine-javascript": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-4.5.0.tgz", + "integrity": "sha512-Ed6UdEj84LyYkwnxM5CvSMWAD+id9ExTYri0/+x41U9zrgNifPSS9lZm0JqBP0VfYI8yr8tY5nbNq9+p9R0kFA==", + "license": "MIT", + "dependencies": { + "@shikijs/types": "4.5.0", + "@shikijs/vscode-textmate": "^10.0.2", + "oniguruma-to-es": "^4.3.6" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@shikijs/engine-oniguruma": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-4.5.0.tgz", + "integrity": "sha512-dKVmbJecVdB9recl8a/CU4jdpNXyjJQrIcesIkpS70s5HS02ohpnCSpMUbotPnEUzbAcLQ+S4hwZYbkBBiTcJw==", + "license": "MIT", + "dependencies": { + "@shikijs/types": "4.5.0", + "@shikijs/vscode-textmate": "^10.0.2" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@shikijs/langs": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-4.5.0.tgz", + "integrity": "sha512-wwBTqwduXSz0X4v9Qa2EWeFaYJEw1clCncWjoRNQRbVDu3SPRTRWucnouYapKj3b8Q+sk/41Vbc4B5c8nuYzLA==", + "license": "MIT", + "dependencies": { "@shikijs/types": "4.5.0" }, "engines": { @@ -2077,6 +3151,44 @@ "integrity": "sha512-cVBuhDQjBZaNMTwBquYfPydrUP+E3hE6oYGasx8h6ZrODIM7/r+gxLDXdd66oszbrggZHEntdE6j+5gYIVyMWQ==", "license": "MIT" }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "license": "MIT" + }, + "node_modules/@swc/helpers": { + "version": "0.5.24", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.24.tgz", + "integrity": "sha512-6tcXo4kA8HgGO7AVmawB57RYi/piBPYVHVcO6dXjX+SZw8GoHmi262sp4v2Ha2kNP9Cx84qei27yT+fjS1lxgg==", + "license": "Apache-2.0" + }, + "node_modules/@tanstack/virtual-core": { + "version": "3.19.11", + "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.19.11.tgz", + "integrity": "sha512-/5iHb0RHBvj8Di59FDs4ESNm45jls33aZAi4zccVXZjc/6ZvwQP6nzEYeT6weXjTf9E6/vrp2JhYWRyO+ZP13A==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, + "node_modules/@tanstack/vue-virtual": { + "version": "3.13.52", + "resolved": "https://registry.npmjs.org/@tanstack/vue-virtual/-/vue-virtual-3.13.52.tgz", + "integrity": "sha512-qTwG7HNr5o+FPd/u+T05N73A8howtkB9FgQI71VcBzx6J2KsYzlVugRz/0ji17kl26D8SAdKux1Wmk3yhTI1Kw==", + "license": "MIT", + "dependencies": { + "@tanstack/virtual-core": "3.19.11" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "vue": "^2.7.0 || ^3.0.0" + } + }, "node_modules/@tybys/wasm-util": { "version": "0.10.4", "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.4.tgz", @@ -2370,6 +3482,12 @@ "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==", "license": "MIT" }, + "node_modules/@types/har-format": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@types/har-format/-/har-format-1.2.16.tgz", + "integrity": "sha512-fluxdy7ryD3MV6h8pTfTYpy/xQzCFC7m89nOH9y94cNqJ1mDIDPut7MnRHI3F6qRmh/cT2fUjG1MLdCNb4hE9A==", + "license": "MIT" + }, "node_modules/@types/hast": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.5.tgz", @@ -2446,12 +3564,97 @@ "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", "license": "MIT" }, + "node_modules/@types/web-bluetooth": { + "version": "0.0.21", + "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.21.tgz", + "integrity": "sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==", + "license": "MIT" + }, "node_modules/@ungap/structured-clone": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.4.0.tgz", "integrity": "sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==", "license": "ISC" }, + "node_modules/@unhead/bundler": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/@unhead/bundler/-/bundler-3.4.3.tgz", + "integrity": "sha512-noUTzazRB4fMgO/nluoirrZJXngNbNb3sQzIslA805tKkwakRv2fib4Xe4EdiTuNB7V5XmpUFvfQkKRdBQ9qAA==", + "license": "MIT", + "dependencies": { + "magic-string": "^1.3.1", + "oxc-walker": "^1.1.1", + "unplugin": "^3.3.0" + }, + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + }, + "peerDependencies": { + "@unhead/cli": "^3.4.3", + "@vitejs/devtools-kit": "^0.7.6", + "esbuild": ">=0.17.0", + "lightningcss": ">=1.20.0", + "oxc-parser": ">=0.98.0", + "rolldown": ">=1.0.0", + "unhead": "^3.4.3", + "vite": ">=6.4.2", + "webpack": ">=5.0.0" + }, + "peerDependenciesMeta": { + "@unhead/cli": { + "optional": true + }, + "@vitejs/devtools-kit": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "oxc-parser": { + "optional": true + }, + "rolldown": { + "optional": true + }, + "vite": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, + "node_modules/@unhead/vue": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/@unhead/vue/-/vue-3.4.3.tgz", + "integrity": "sha512-Wrmk62oC/V1EcBSKRDuy77kVaBtBXXsj6b+vEEWvmfo9AQfpLlc2b6vvvSj9WnXr8VY1ksKHj49Ejo8J/wLSOA==", + "license": "MIT", + "dependencies": { + "@unhead/bundler": "3.4.3", + "hookable": "^6.1.1", + "unhead": "3.4.3", + "unplugin": "^3.3.0" + }, + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + }, + "peerDependencies": { + "vite": ">=6.4.2", + "vue": ">=3.5.18", + "webpack": ">=5.0.0" + }, + "peerDependenciesMeta": { + "vite": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, "node_modules/@upsetjs/venn.js": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@upsetjs/venn.js/-/venn.js-2.0.0.tgz", @@ -2462,6 +3665,15 @@ "d3-transition": "^3.0.1" } }, + "node_modules/@vercel/oidc": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@vercel/oidc/-/oidc-3.2.0.tgz", + "integrity": "sha512-UycprH3T6n3jH0k44NHMa7pnFHGu/N05MjojYr+Mc6I7obkoLIJujSWwin1pCvdy/eOxrI/l3uDLQsmcrOb4ug==", + "license": "Apache-2.0", + "engines": { + "node": ">= 20" + } + }, "node_modules/@volar/kit": { "version": "2.4.30", "resolved": "https://registry.npmjs.org/@volar/kit/-/kit-2.4.30.tgz", @@ -2578,19 +3790,272 @@ "vscode-uri": "^3.0.8" } }, - "node_modules/@vscode/emmet-helper/node_modules/jsonc-parser": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.3.1.tgz", - "integrity": "sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@vscode/l10n": { - "version": "0.0.18", - "resolved": "https://registry.npmjs.org/@vscode/l10n/-/l10n-0.0.18.tgz", - "integrity": "sha512-KYSIHVmslkaCDyw013pphY+d7x1qV8IZupYfeIfzNA+nsaWHbn5uPuQRvdRFsa9zFzGeudPuoGoZ1Op4jrJXIQ==", - "dev": true, - "license": "MIT" + "node_modules/@vscode/emmet-helper/node_modules/jsonc-parser": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.3.1.tgz", + "integrity": "sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@vscode/l10n": { + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/@vscode/l10n/-/l10n-0.0.18.tgz", + "integrity": "sha512-KYSIHVmslkaCDyw013pphY+d7x1qV8IZupYfeIfzNA+nsaWHbn5uPuQRvdRFsa9zFzGeudPuoGoZ1Op4jrJXIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@vue/compiler-core": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.44.tgz", + "integrity": "sha512-k34nCytbK8PQ1gR2mGROYOw6Pnv/mumqIdrZ3x2tbyXZDWm7ViKGLTfdB+DRrWqEQsLgGJvn0WN9jBif5zCTLQ==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.9", + "@vue/shared": "3.5.44", + "entities": "^7.0.1", + "estree-walker": "^2.0.2", + "source-map-js": "^1.2.2" + } + }, + "node_modules/@vue/compiler-core/node_modules/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/@vue/compiler-core/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "license": "MIT" + }, + "node_modules/@vue/compiler-dom": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.44.tgz", + "integrity": "sha512-W5AoBFWdw1lQAKiHowkfgFKFab82oSRT6sGsPfw/q1GRjsy/ZJFLHGhJyBRIFN9APLTUduDH9U2JAiPOIyKuYg==", + "license": "MIT", + "dependencies": { + "@vue/compiler-core": "3.5.44", + "@vue/shared": "3.5.44" + } + }, + "node_modules/@vue/compiler-sfc": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.44.tgz", + "integrity": "sha512-dzHmQ4jXTpdr5FjIQUeykVakN/uzqFbUo9/C5ikBFg3a3PeM6uRxeczx1ZbXBML0/zJstEh3ygYipzR5Z7b2Pw==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.9", + "@vue/compiler-core": "3.5.44", + "@vue/compiler-dom": "3.5.44", + "@vue/compiler-ssr": "3.5.44", + "@vue/shared": "3.5.44", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.21", + "postcss": "^8.5.29", + "source-map-js": "^1.2.2" + } + }, + "node_modules/@vue/compiler-sfc/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "license": "MIT" + }, + "node_modules/@vue/compiler-sfc/node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.44.tgz", + "integrity": "sha512-xr5gb1JVHlfXJwSlRz1FeP6uxoazdzHuMTVLE7up+4Vrqxk219CvxLPxD9NXBt47yvZW7+p4DXfyp4O1fkByIA==", + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.44", + "@vue/shared": "3.5.44" + } + }, + "node_modules/@vue/reactivity": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.44.tgz", + "integrity": "sha512-u+QJdKeBBEADkPdevsL+6E12QlYVfBD8Zcw5qjDQKtamI6l14KyqazJMobhCKelhWN5zpyKUiEDoTyHE93cqWw==", + "license": "MIT", + "dependencies": { + "@vue/shared": "3.5.44" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.44.tgz", + "integrity": "sha512-uEa/ndwjhrrhnOfb2p+sZy6zeoamJOISqaLSJGk/8R6nABT1ZldpzcJoPzKj+zHVomVBPcmQYyC2r4LtvDV6CQ==", + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.44", + "@vue/shared": "3.5.44" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.44.tgz", + "integrity": "sha512-3fc4ARcXVhVBaJ3ujWiNZJARD6pkyRcwG+ZYhMzjKtKUp7MAY0HLwr7r3Smep3Li6ZaWT6ewdmx8XqdaD5oNZg==", + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.44", + "@vue/runtime-core": "3.5.44", + "@vue/shared": "3.5.44", + "csstype": "^3.2.3" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.44.tgz", + "integrity": "sha512-R4S1UoH4h5Frrauv8Z5XE5TxV9oBiUSgWIC4TyVK1FK+RocRnOLwFA5Xcmo2011RlgJp+AbZCnw6afrhlgRuUQ==", + "license": "MIT", + "dependencies": { + "@vue/compiler-ssr": "3.5.44", + "@vue/runtime-dom": "3.5.44", + "@vue/shared": "3.5.44" + } + }, + "node_modules/@vue/shared": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.44.tgz", + "integrity": "sha512-H82XLH0DjmSOdbEwO15x3QTo1f5PWEtv237eLpYKc0mqLu+B8hnq16lFWmuBmNurkeiG3wr+oM1FhOll/YVFRg==", + "license": "MIT" + }, + "node_modules/@vueuse/core": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-15.0.0.tgz", + "integrity": "sha512-Zv67h5mrk7YHDJsRObx+DXaCBz6RKBUpxqLesJ+3xZNPG6yuQs7ja7kg3veFrrouYLWAqydQ7CwGEbLVxB43Ng==", + "license": "MIT", + "dependencies": { + "@types/web-bluetooth": "^0.0.21", + "@vueuse/metadata": "15.0.0", + "@vueuse/shared": "15.0.0" + }, + "engines": { + "node": ">=22" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "vue": "^3.5.0" + } + }, + "node_modules/@vueuse/integrations": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-15.0.0.tgz", + "integrity": "sha512-uWC1608pEocJPeRk1IqrEA3uYHhAGTJNibcMAdxgdK2Sy2Hypc6b+VdNO9KekCxyPc4VXK8SKDp8vsXefR/ZFg==", + "license": "MIT", + "dependencies": { + "@vueuse/core": "15.0.0", + "@vueuse/shared": "15.0.0" + }, + "engines": { + "node": ">=22" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "async-validator": "^4", + "axios": "^1", + "change-case": "^5", + "drauu": "^1 || ^0.4", + "focus-trap": "^7 || ^8", + "fuse.js": "^7", + "idb-keyval": "^6", + "jwt-decode": "^4", + "nprogress": "^0.2", + "qrcode": "^1.5", + "sortablejs": "^1", + "universal-cookie": "^7 || ^8", + "vue": "^3.5.0" + }, + "peerDependenciesMeta": { + "async-validator": { + "optional": true + }, + "axios": { + "optional": true + }, + "change-case": { + "optional": true + }, + "drauu": { + "optional": true + }, + "focus-trap": { + "optional": true + }, + "fuse.js": { + "optional": true + }, + "idb-keyval": { + "optional": true + }, + "jwt-decode": { + "optional": true + }, + "nprogress": { + "optional": true + }, + "qrcode": { + "optional": true + }, + "sortablejs": { + "optional": true + }, + "universal-cookie": { + "optional": true + } + } + }, + "node_modules/@vueuse/metadata": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-15.0.0.tgz", + "integrity": "sha512-sfWE5LADAKJ0KnjtGliMdSN8Ij/L7uP6rXIZlgPloAI4zvvefbw6H5Lt7KJA6RqQOYgVqWF5Guj50HHMIzygBg==", + "license": "MIT", + "engines": { + "node": ">=22" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/shared": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-15.0.0.tgz", + "integrity": "sha512-vbNXhGrbV53xPOMSyOzMHQRvhMgZf7oNDw2RChUetVxwTIEkInQ1joZ9JbT0G3z2n2AJNjvmCWeM9ySYrnvogA==", + "license": "MIT", + "engines": { + "node": ">=22" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "vue": "^3.5.0" + } + }, + "node_modules/@workflow/serde": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@workflow/serde/-/serde-4.1.0.tgz", + "integrity": "sha512-pav4F2BoirECWR7Nf1TKt+2eETcBj7jj4cBefQ8VXQCA6NPkaKeLfj/zMgi+3zYV5ZIBT4GuUiphsj0/b9hPQQ==", + "license": "Apache-2.0" }, "node_modules/acorn": { "version": "8.19.0", @@ -2613,6 +4078,23 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/ai": { + "version": "7.0.142", + "resolved": "https://registry.npmjs.org/ai/-/ai-7.0.142.tgz", + "integrity": "sha512-Tifni6/6nNhCu4GnFEeYYR7CGmJ3Yhm44SGxYrOupqP2aaZwmGGiiB5Zx4hiauJR0AWimcXULejDT+Qsj+SHOQ==", + "license": "Apache-2.0", + "dependencies": { + "@ai-sdk/gateway": "4.0.115", + "@ai-sdk/provider": "4.0.28", + "@ai-sdk/provider-utils": "5.0.61" + }, + "engines": { + "node": ">=22" + }, + "peerDependencies": { + "zod": "^3.25.76 || ^4.1.8" + } + }, "node_modules/ajv": { "version": "8.20.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", @@ -2730,6 +4212,18 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "license": "Python-2.0" }, + "node_modules/aria-hidden": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.6.tgz", + "integrity": "sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/aria-query": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", @@ -2959,6 +4453,18 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/chalk": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-6.0.1.tgz", + "integrity": "sha512-/Ce6KNm3vIbWdMlNna6RVIZ/ICQxnJxCicet5LBKK9ZffBkqzDw0xh9EiKSljdRtiIQ1S1z4YgcscUUGzNCWrA==", + "license": "MIT", + "engines": { + "node": ">=22" + }, + "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", @@ -3137,6 +4643,12 @@ "layout-base": "^1.0.0" } }, + "node_modules/crelt": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.7.tgz", + "integrity": "sha512-aK6BbWfhf4U/wCcLHKPJl/xa6VkVstRaPywWtMKGwuOLc/wZTyQYuoxgvZnNsBvv7Kg3YTBQYYBCggcviQczuA==", + "license": "MIT" + }, "node_modules/crossws": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/crossws/-/crossws-0.3.5.tgz", @@ -3248,6 +4760,32 @@ "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==", "license": "CC0-1.0" }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "license": "MIT" + }, + "node_modules/cva": { + "version": "1.0.0-beta.4", + "resolved": "https://registry.npmjs.org/cva/-/cva-1.0.0-beta.4.tgz", + "integrity": "sha512-F/JS9hScapq4DBVQXcK85l9U91M6ePeXoBMSp7vypzShoefUBxjQTo3g3935PUHgQd+IW77DjbPRIxugy4/GCQ==", + "license": "Apache-2.0", + "dependencies": { + "clsx": "^2.1.1" + }, + "funding": { + "url": "https://polar.sh/cva" + }, + "peerDependencies": { + "typescript": ">= 4.5.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/cytoscape": { "version": "3.34.4", "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.34.4.tgz", @@ -4153,6 +5691,15 @@ "integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==", "license": "MIT" }, + "node_modules/eventsource-parser": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.1.1.tgz", + "integrity": "sha512-EKN1vKAMcZ8MlYMpaNuxN6R9yakzH6uajHcHVTqWJzvu5pWw9DyhbP35HH8MVBQ+dZjAfDxk+A8NiR9KWaXiyQ==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/expressive-code": { "version": "0.44.3", "resolved": "https://registry.npmjs.org/expressive-code/-/expressive-code-0.44.3.tgz", @@ -4175,7 +5722,6 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, "license": "MIT" }, "node_modules/fast-string-truncated-width": { @@ -4259,6 +5805,12 @@ } } }, + "node_modules/flatted": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz", + "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==", + "license": "ISC" + }, "node_modules/flattie": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/flattie/-/flattie-1.1.1.tgz", @@ -4274,6 +5826,15 @@ "integrity": "sha512-mJbcILTPybAR1jdOwt/lVv8N2cffeJFFP+gVbSAwLEx1ujXH27RpPd8Rokec/KX9c76UYIB6Co+H4lQzxPnJfA==", "license": "MIT" }, + "node_modules/focus-trap": { + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-8.2.4.tgz", + "integrity": "sha512-oy6dj7WZYgMbbpoOA29K5W++473F1zEzdI1oJgPb6x7yWT36YaWedUe6i6YPWEt5quSh0pRMohVyHLWXUxtdxg==", + "license": "MIT", + "dependencies": { + "tabbable": "^6.5.0" + } + }, "node_modules/fontace": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/fontace/-/fontace-0.4.1.tgz", @@ -4318,6 +5879,19 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/fuse.js": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/fuse.js/-/fuse.js-7.5.0.tgz", + "integrity": "sha512-sQtrEfA+ez/3G0cCZecF70oqpCRttCexYUG4mUrtWL49ULUzUyxokt5kyqwtKzj1270RaKih+hcP3qLcumccow==", + "license": "Apache-2.0", + "engines": { + "node": ">=10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/krisk" + } + }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -4369,6 +5943,15 @@ "dev": true, "license": "ISC" }, + "node_modules/guess-json-indent": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/guess-json-indent/-/guess-json-indent-3.0.1.tgz", + "integrity": "sha512-LWZ3Vr8BG7DHE3TzPYFqkhjNRw4vYgFSsv2nfMuHklAlOfiy54/EwiDQuQfFVLxENCVv20wpbjfTayooQHrEhQ==", + "license": "MIT", + "engines": { + "node": ">=18.18.0" + } + }, "node_modules/h3": { "version": "1.15.11", "resolved": "https://registry.npmjs.org/h3/-/h3-1.15.11.tgz", @@ -4622,6 +6205,21 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, + "node_modules/hast-util-sanitize": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/hast-util-sanitize/-/hast-util-sanitize-5.0.2.tgz", + "integrity": "sha512-3yTWghByc50aGS7JlGhk61SPenfE/p1oaFeNwkOOyrscaOkMGrcW9+Cy/QAIOBpZxP1yqDIzFMR0+Np0i0+usg==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@ungap/structured-clone": "^1.0.0", + "unist-util-position": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/hast-util-select": { "version": "6.0.4", "resolved": "https://registry.npmjs.org/hast-util-select/-/hast-util-select-6.0.4.tgz", @@ -4727,6 +6325,32 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/hast-util-to-mdast": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/hast-util-to-mdast/-/hast-util-to-mdast-10.1.2.tgz", + "integrity": "sha512-FiCRI7NmOvM4y+f5w32jPRzcxDIz+PUqDwEqn1A+1q2cdp3B8Gx7aVrXORdOKjMNDQsD1ogOr896+0jJHW1EFQ==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@ungap/structured-clone": "^1.0.0", + "hast-util-phrasing": "^3.0.0", + "hast-util-to-html": "^9.0.0", + "hast-util-to-text": "^4.0.0", + "hast-util-whitespace": "^3.0.0", + "mdast-util-phrasing": "^4.0.0", + "mdast-util-to-hast": "^13.0.0", + "mdast-util-to-string": "^4.0.0", + "rehype-minify-whitespace": "^6.0.0", + "trim-trailing-lines": "^2.0.0", + "unist-util-position": "^5.0.0", + "unist-util-visit": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/hast-util-to-parse5": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-8.0.1.tgz", @@ -4802,6 +6426,21 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/highlight.js": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.12.0.tgz", + "integrity": "sha512-nbfWpyRMcMrPMmDwJB+dhX/eiaPKtc2RB+0QZskqJ3WjRA/FDS0e9hZrx8EC/lbEv8gXy98FcDbNa/dspAaJMg==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/hookable": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/hookable/-/hookable-6.1.2.tgz", + "integrity": "sha512-+abwxtiEA52GCVIsQqut3S/uKTbUwYIp4Pe/vv+6py5XiXBCqMZHg6pA6Y5qhgLSEys0/cYuPbO0z1QFj5ZCmg==", + "license": "MIT" + }, "node_modules/html-escaper": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-3.0.3.tgz", @@ -4908,6 +6547,18 @@ "url": "https://github.com/sponsors/brc-dd" } }, + "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==", + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-alphabetical": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz", @@ -4979,6 +6630,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/js-base64": { + "version": "3.9.6", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.9.6.tgz", + "integrity": "sha512-LjkzbLtU6Lx6fjXMYGEACEB7rdtqZtxkBe9aS1ZpDNUyWgUivw3yBEIhQ37OVygJYRt+C+9e9fVT8PpFzH2Hww==", + "license": "BSD-3-Clause" + }, "node_modules/js-yaml": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz", @@ -5001,6 +6658,12 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "license": "(AFL-2.1 OR BSD-3-Clause)" + }, "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -5346,6 +7009,30 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/lowlight": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-3.3.0.tgz", + "integrity": "sha512-0JNhgFoPvP6U6lE/UdVsSq99tn6DhjjpAj5MxG49ewd2mOBVtwWYIT8ClyABhq198aXXODMU6Ox8DrGy/CpTZQ==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "devlop": "^1.0.0", + "highlight.js": "~11.11.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/lowlight/node_modules/highlight.js": { + "version": "11.11.2", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.11.2.tgz", + "integrity": "sha512-oaXMACAU0kzOMXBjWpNcX+vlwSBCIAiZ9BHa7gA15NOTtT2L/l8OSZDuqS2XppOhZBPJ7hm4o8ep2kyuip2uEQ==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/lru-cache": { "version": "11.5.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.3.tgz", @@ -5790,6 +7477,12 @@ "uuid": "^11.1.0 || ^12 || ^13 || ^14.0.0" } }, + "node_modules/microdiff": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/microdiff/-/microdiff-1.5.0.tgz", + "integrity": "sha512-Drq+/THMvDdzRYrK0oxJmOKiC24ayUV8ahrt8l3oRK51PWt6gdtrIGrlIH3pT/lFh1z93FbAcidtsHcWbnRz8Q==", + "license": "MIT" + }, "node_modules/micromark": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.3.tgz", @@ -6613,6 +8306,12 @@ "node": ">= 10" } }, + "node_modules/neverpanic": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/neverpanic/-/neverpanic-0.0.8.tgz", + "integrity": "sha512-vVdkelrLxaow/fdWDumzNBO+jwm6X8bxeLJc34THtpj70u0C5QBkcV6CRCu2X726km7XD45N0A3QtYCla4RvKw==", + "license": "MIT" + }, "node_modules/nlcst-to-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/nlcst-to-string/-/nlcst-to-string-4.0.0.tgz", @@ -6700,6 +8399,28 @@ "regex-recursion": "^6.0.2" } }, + "node_modules/oxc-walker": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/oxc-walker/-/oxc-walker-1.1.1.tgz", + "integrity": "sha512-Hwd7dq28zu/Er99+bpWp16CGwFrhyalJh0W3JOB7XpPvgWo3MqMi2ksWGKuzzA9zt50mJ2pIUwR5lpAdZ9ACNQ==", + "license": "MIT", + "peerDependencies": { + "@oxc-project/types": ">=0.98.0", + "oxc-parser": ">=0.98.0", + "rolldown": ">=1.0.0" + }, + "peerDependenciesMeta": { + "@oxc-project/types": { + "optional": true + }, + "oxc-parser": { + "optional": true + }, + "rolldown": { + "optional": true + } + } + }, "node_modules/p-limit": { "version": "7.3.3", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-7.3.3.tgz", @@ -6849,6 +8570,12 @@ "integrity": "sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w==", "license": "MIT" }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "license": "MIT" + }, "node_modules/piccolore": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/piccolore/-/piccolore-0.1.3.tgz", @@ -6971,6 +8698,18 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/pretty-ms": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-10.0.0.tgz", + "integrity": "sha512-6BWuxY2dCNgT45VnGzZcfNy7WeLqXiZqhhy4aHThTE6KI56R2ZBw9HQ7spPFKYchDizvJbPxTEknIpmW4FSmQA==", + "license": "MIT", + "engines": { + "node": ">=22" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/prismjs": { "version": "1.30.0", "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz", @@ -6985,30 +8724,201 @@ "resolved": "https://registry.npmjs.org/process-ancestry/-/process-ancestry-0.1.0.tgz", "integrity": "sha512-tGqJW/UnclpYASFcM6Xh8D8l/BMtaQ9+CSG0vlJSJTcdMM4lDRv4c6H0Pdcsfted+bVczdYSfk2fdukg2gQkZg==", "license": "MIT", - "engines": { - "node": ">=18.0.0" + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/proper-lockfile": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", + "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "retry": "^0.12.0", + "signal-exit": "^3.0.2" + } + }, + "node_modules/property-information": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.2.0.tgz", + "integrity": "sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/radix-vue": { + "version": "1.9.17", + "resolved": "https://registry.npmjs.org/radix-vue/-/radix-vue-1.9.17.tgz", + "integrity": "sha512-mVCu7I2vXt1L2IUYHTt0sZMz7s1K2ZtqKeTIxG3yC5mMFfLBG4FtE1FDeRMpDd+Hhg/ybi9+iXmAP1ISREndoQ==", + "license": "MIT", + "dependencies": { + "@floating-ui/dom": "^1.6.7", + "@floating-ui/vue": "^1.1.0", + "@internationalized/date": "^3.5.4", + "@internationalized/number": "^3.5.3", + "@tanstack/vue-virtual": "^3.8.1", + "@vueuse/core": "^10.11.0", + "@vueuse/shared": "^10.11.0", + "aria-hidden": "^1.2.4", + "defu": "^6.1.4", + "fast-deep-equal": "^3.1.3", + "nanoid": "^5.0.7" + }, + "peerDependencies": { + "vue": ">= 3.2.0" + } + }, + "node_modules/radix-vue/node_modules/@floating-ui/vue": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/@floating-ui/vue/-/vue-1.1.11.tgz", + "integrity": "sha512-HzHKCNVxnGS35r9fCHBc3+uCnjw9IWIlCPL683cGgM9Kgj2BiAl8x1mS7vtvP6F9S/e/q4O6MApwSHj8hNLGfw==", + "license": "MIT", + "dependencies": { + "@floating-ui/dom": "^1.7.6", + "@floating-ui/utils": "^0.2.11", + "vue-demi": ">=0.13.0" + } + }, + "node_modules/radix-vue/node_modules/@floating-ui/vue/node_modules/vue-demi": { + "version": "0.14.10", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.10.tgz", + "integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==", + "hasInstallScript": true, + "license": "MIT", + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/radix-vue/node_modules/@types/web-bluetooth": { + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz", + "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==", + "license": "MIT" + }, + "node_modules/radix-vue/node_modules/@vueuse/core": { + "version": "10.11.1", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.11.1.tgz", + "integrity": "sha512-guoy26JQktXPcz+0n3GukWIy/JDNKti9v6VEMu6kV2sYBsWuGiTU8OWdg+ADfUbHg3/3DlqySDe7JmdHrktiww==", + "license": "MIT", + "dependencies": { + "@types/web-bluetooth": "^0.0.20", + "@vueuse/metadata": "10.11.1", + "@vueuse/shared": "10.11.1", + "vue-demi": ">=0.14.8" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/radix-vue/node_modules/@vueuse/core/node_modules/vue-demi": { + "version": "0.14.10", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.10.tgz", + "integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==", + "hasInstallScript": true, + "license": "MIT", + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/radix-vue/node_modules/@vueuse/metadata": { + "version": "10.11.1", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.11.1.tgz", + "integrity": "sha512-IGa5FXd003Ug1qAZmyE8wF3sJ81xGLSqTqtQ6jaVfkeZ4i5kS2mwQF61yhVqojRnenVew5PldLyRgvdl4YYuSw==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/antfu" } }, - "node_modules/proper-lockfile": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", - "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", - "dev": true, + "node_modules/radix-vue/node_modules/@vueuse/shared": { + "version": "10.11.1", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.11.1.tgz", + "integrity": "sha512-LHpC8711VFZlDaYUXEBbFBCQ7GS3dVU9mjOhhMhXP6txTV4EhYQg/KGnQuvt/sPAtoUKq7VVUnL6mVtFoL42sA==", "license": "MIT", "dependencies": { - "graceful-fs": "^4.2.4", - "retry": "^0.12.0", - "signal-exit": "^3.0.2" + "vue-demi": ">=0.14.8" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" } }, - "node_modules/property-information": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.2.0.tgz", - "integrity": "sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg==", + "node_modules/radix-vue/node_modules/@vueuse/shared/node_modules/vue-demi": { + "version": "0.14.10", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.10.tgz", + "integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==", + "hasInstallScript": true, "license": "MIT", + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/radix-vue/node_modules/nanoid": { + "version": "5.1.16", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.16.tgz", + "integrity": "sha512-kVrnsrJqMR8+oLJnGEmSWw9BivK5mt7H3FZatVRjrc5wGqFYuBxX1yG7+A7Gi5AefkX6t/oCkizcQgpu0cY1dQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.js" + }, + "engines": { + "node": "^18 || >=20" } }, "node_modules/radix3": { @@ -7130,6 +9040,67 @@ "expressive-code": "^0.44.3" } }, + "node_modules/rehype-external-links": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rehype-external-links/-/rehype-external-links-3.0.0.tgz", + "integrity": "sha512-yp+e5N9V3C6bwBeAC4n796kc86M4gJCdlVhiMTxIrJG5UHDMh+PJANf9heqORJbt1nrCbDwIlAZKjANIaVBbvw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@ungap/structured-clone": "^1.0.0", + "hast-util-is-element": "^3.0.0", + "is-absolute-url": "^4.0.0", + "space-separated-tokens": "^2.0.0", + "unist-util-visit": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/rehype-format": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/rehype-format/-/rehype-format-5.0.1.tgz", + "integrity": "sha512-zvmVru9uB0josBVpr946OR8ui7nJEdzZobwLOOqHb/OOD88W0Vk2SqLwoVOj0fM6IPCCO6TaV9CvQvJMWwukFQ==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "hast-util-format": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/rehype-minify-whitespace": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/rehype-minify-whitespace/-/rehype-minify-whitespace-6.0.2.tgz", + "integrity": "sha512-Zk0pyQ06A3Lyxhe9vGtOtzz3Z0+qZ5+7icZ/PL/2x1SHPbKao5oB/g/rlc6BCTajqBb33JcOe71Ye1oFsuYbnw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "hast-util-minify-whitespace": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/rehype-parse": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/rehype-parse/-/rehype-parse-9.0.1.tgz", + "integrity": "sha512-ksCzCD0Fgfh7trPDxr2rSylbwq9iYDkSn8TCDmEJ49ljEUBxDVCzCHv7QNzZOfODanX4+bWQ4WZqLCRWYLfhag==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "hast-util-from-html": "^2.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/rehype-raw": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/rehype-raw/-/rehype-raw-7.0.0.tgz", @@ -7160,6 +9131,37 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/rehype-remark": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/rehype-remark/-/rehype-remark-10.0.1.tgz", + "integrity": "sha512-EmDndlb5NVwXGfUa4c9GPK+lXeItTilLhE6ADSaQuHr4JUlKw9MidzGzx4HpqZrNCt6vnHmEifXQiiA+CEnjYQ==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "hast-util-to-mdast": "^10.0.0", + "unified": "^11.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/rehype-sanitize": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/rehype-sanitize/-/rehype-sanitize-6.0.0.tgz", + "integrity": "sha512-CsnhKNsyI8Tub6L4sm5ZFsme4puGfc6pYylvXo1AeqaGbjOYyzNv3qZPwvs0oMJ39eryyeOdmxwUIo94IpEhqg==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "hast-util-sanitize": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/rehype-stringify": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/rehype-stringify/-/rehype-stringify-10.0.1.tgz", @@ -7508,6 +9510,12 @@ "node": ">=10" } }, + "node_modules/set-cookie-parser": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-3.1.3.tgz", + "integrity": "sha512-xletSdAI5efyVJjsatBbzDkXl3M/Zmad3xfnQe7ZXuBB0yNwW7C2WFsNGjdRNfZunmNHQuX79xs/ACMTLCdcew==", + "license": "MIT" + }, "node_modules/sharp": { "version": "0.35.5", "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.35.5.tgz", @@ -7661,6 +9669,24 @@ "integrity": "sha512-cEmp9QeXXRmjj/rVp9oyiqcvyocWab/HaoN4+bwFeZ7QzykJD6L3yD4v12K1x0tHpqRqVpJevN3gW7kyM39Bqg==", "license": "MIT" }, + "node_modules/string-byte-length": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/string-byte-length/-/string-byte-length-3.0.1.tgz", + "integrity": "sha512-yJ8vP0HMwZ54CcA8S8mKoXbkezpZHANFtmafFo8lGxZThCQcAwRHjdFabuSLgOzxj9OFJcmssmiAvmcOK4O2Hw==", + "license": "MIT", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/string-byte-slice": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/string-byte-slice/-/string-byte-slice-3.0.1.tgz", + "integrity": "sha512-GWv2K4lYyd2+AhmKH3BV+OVx62xDX+99rSLfKpaqFiQU7uOMaUY1tDjdrRD4gsrCr9lTyjMgjna7tZcCOw+Smg==", + "license": "MIT", + "engines": { + "node": ">=18.18.0" + } + }, "node_modules/string-width": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.3.0.tgz", @@ -7708,6 +9734,12 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, + "node_modules/style-mod": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.4.tgz", + "integrity": "sha512-XXWIQt633/EpAFx8aZDOTjBzrCaGmhvEQlQo6MVPfa2OzO2cWo+4hV9h+6UkHYlXGfy+ODXKUdP7Pthmcu5ATw==", + "license": "MIT" + }, "node_modules/style-to-js": { "version": "1.1.21", "resolved": "https://registry.npmjs.org/style-to-js/-/style-to-js-1.1.21.tgz", @@ -7766,6 +9798,56 @@ "node": ">=16" } }, + "node_modules/swrv": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/swrv/-/swrv-1.3.0.tgz", + "integrity": "sha512-6uyQ79QemgpJzdwVNkxZdypTmKC80uHdjSZGAGo0HnizL2AzQJUZXQFR3KZq8yru32IC7HngiBA7o2FtL/Lozw==", + "license": "Apache-2.0", + "peerDependencies": { + "@vue/test-utils": ">=2.0.0", + "vue": "^3.2.0" + }, + "peerDependenciesMeta": { + "@vue/test-utils": { + "optional": true + } + } + }, + "node_modules/tabbable": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.5.1.tgz", + "integrity": "sha512-dMCuwDUY6Noz3zVKLefBC4wq+aJV20yc7vWmM7uTNGwtQSFF5kX7OUIUsxuVajz/bdt5Xqdah3/0NLjth+cM5A==", + "license": "MIT" + }, + "node_modules/tagged-tag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tagged-tag/-/tagged-tag-1.0.0.tgz", + "integrity": "sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==", + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tailwind-merge": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.7.0.tgz", + "integrity": "sha512-XPPUyAc+cvspz3lHTcR/QgPfW2A0lv/xQNIjX3HGhLR+Nq2lHaLq5MtTesHn8GUr3W3DguT2KT5x3NVgRtYwmA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/dcastil" + } + }, + "node_modules/tailwindcss": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.4.tgz", + "integrity": "sha512-PCJZTFFdG+sL3gvnP1Do9o6GbkvH2q0p04xSs3f7cSvmAeK+sttG+/7ncK1fdRwKFfC7n+wDDJaOMBSefkI9ow==", + "license": "MIT", + "peer": true + }, "node_modules/tiny-inflate": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz", @@ -7822,6 +9904,16 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/trim-trailing-lines": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-2.1.0.tgz", + "integrity": "sha512-5UR5Biq4VlVOtzqkm2AZlgvSlDJtME46uV0br0gENbwN4l5+mMKT4b9gJKqWtuL2zAIqajGJGuvbCbcAJUZqBg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/trough": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz", @@ -7832,6 +9924,20 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/truncate-json": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/truncate-json/-/truncate-json-3.0.1.tgz", + "integrity": "sha512-QVsbr1WhGLq2F0oDyYbqtOXcf3gcnL8C9H5EX8bBwAr8ZWvWGJzukpPrDrWgJMrNtgDbo74BIjI4kJu3q2xQWw==", + "license": "MIT", + "dependencies": { + "guess-json-indent": "^3.0.1", + "string-byte-length": "^3.0.1", + "string-byte-slice": "^3.0.1" + }, + "engines": { + "node": ">=18.18.0" + } + }, "node_modules/ts-dedent": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.3.0.tgz", @@ -7845,9 +9951,23 @@ "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "devOptional": true, "license": "0BSD" }, + "node_modules/type-fest": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-5.10.0.tgz", + "integrity": "sha512-NoSdpq/WEiAg5sjmBkmV/hfxv6HJH4NqPNrqjtSO5CwRmpsDfaf4begxW34KdJykH/l1yHtwBWQkCRdoXO8mPA==", + "license": "(MIT OR CC0-1.0)", + "dependencies": { + "tagged-tag": "^1.0.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/typesafe-path": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/typesafe-path/-/typesafe-path-0.2.2.tgz", @@ -7912,6 +10032,27 @@ "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==", "license": "MIT" }, + "node_modules/unhead": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/unhead/-/unhead-3.4.3.tgz", + "integrity": "sha512-0FZI/qCCyIey14CKlGMFpiQumWSatlthJy7Xvro7H3nmi/V2owkcCXG03k0GXDc2/TV1K6bvrbAwhzTRe5Nhdw==", + "license": "MIT", + "dependencies": { + "hookable": "^6.1.1", + "unplugin": "^3.3.0" + }, + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + }, + "peerDependencies": { + "vite": ">=6.4.2" + }, + "peerDependenciesMeta": { + "vite": { + "optional": true + } + } + }, "node_modules/unified": { "version": "11.0.5", "resolved": "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz", @@ -8065,6 +10206,65 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/unplugin": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-3.7.0.tgz", + "integrity": "sha512-GrM2uq3DQo3hvLU2FjeYhooJ8BY9N6j1Fbzgx7Pta3VVJevsD3VP4dPjZkZOS0mLvN8w9zzr9OlP+31bSMyuLw==", + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "@rolldown/pluginutils": "^1.0.1", + "picomatch": "^4.0.7", + "webpack-virtual-modules": "^0.6.2" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "@farmfe/core": "*", + "@rsbuild/core": "*", + "@rspack/core": "*", + "bun-types-no-globals": "*", + "esbuild": "*", + "rolldown": "*", + "rollup": "*", + "unloader": "*", + "vite": "*", + "webpack": "*" + }, + "peerDependenciesMeta": { + "@farmfe/core": { + "optional": true + }, + "@rsbuild/core": { + "optional": true + }, + "@rspack/core": { + "optional": true + }, + "bun-types-no-globals": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "rolldown": { + "optional": true + }, + "rollup": { + "optional": true + }, + "unloader": { + "optional": true + }, + "vite": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, "node_modules/unstorage": { "version": "1.17.6", "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.17.6.tgz", @@ -8625,6 +10825,61 @@ "dev": true, "license": "MIT" }, + "node_modules/vue": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.44.tgz", + "integrity": "sha512-dvvmaOCG7lAMkJTPqPwWeGMsPS6DIsFsfZDUgBp9V6mHf9b3+/wyVwYR4Es+WV6uJC0FKRxp81Obcq0ZwUcGFQ==", + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.44", + "@vue/compiler-sfc": "3.5.44", + "@vue/runtime-dom": "3.5.44", + "@vue/server-renderer": "3.5.44", + "@vue/shared": "3.5.44" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/vue-component-type-helpers": { + "version": "3.3.14", + "resolved": "https://registry.npmjs.org/vue-component-type-helpers/-/vue-component-type-helpers-3.3.14.tgz", + "integrity": "sha512-Pq3+OnbCiPCHk0R7KSZrx+j/XXaUn2kSQ1epxq60w8CPbByLjC1EJgV51n4WY851sTXUVzsNMuitywdkdVyKjA==", + "license": "MIT" + }, + "node_modules/vue-sonner": { + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/vue-sonner/-/vue-sonner-2.0.9.tgz", + "integrity": "sha512-i6BokNlNDL93fpzNxN/LZSn6D6MzlO+i3qXt6iVZne3x1k7R46d5HlFB4P8tYydhgqOrRbIZEsnRd3kG7qGXyw==", + "license": "MIT", + "peerDependencies": { + "@nuxt/kit": "^4.0.3", + "@nuxt/schema": "^4.0.3", + "nuxt": "^4.0.3" + }, + "peerDependenciesMeta": { + "@nuxt/kit": { + "optional": true + }, + "@nuxt/schema": { + "optional": true + }, + "nuxt": { + "optional": true + } + } + }, + "node_modules/w3c-keyname": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz", + "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==", + "license": "MIT" + }, "node_modules/web-namespaces": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz", @@ -8635,6 +10890,12 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/webpack-virtual-modules": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz", + "integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==", + "license": "MIT" + }, "node_modules/wrap-ansi": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", diff --git a/package.json b/package.json index 6d78167..c43cf5d 100644 --- a/package.json +++ b/package.json @@ -20,12 +20,14 @@ "@astrojs/markdown-remark": "7.3.3", "@astrojs/starlight": "0.42.6", "@fontsource/inter": "5.3.0", + "@scalar/api-reference": "1.76.4", "astro": "7.4.1", "astro-mermaid": "2.1.0", "mermaid": "11.17.2" }, "devDependencies": { "@astrojs/check": "0.9.11", + "@redocly/cli": "2.73.0", "github-slugger": "2.0.0", "parse5": "8.0.1", "proper-lockfile": "4.1.2", diff --git a/scripts/api-references.mjs b/scripts/api-references.mjs new file mode 100644 index 0000000..ab4bed2 --- /dev/null +++ b/scripts/api-references.mjs @@ -0,0 +1,221 @@ +import { createHash } from 'node:crypto'; +import { execFile } from 'node:child_process'; +import { copyFile, mkdir, readFile, realpath, writeFile } from 'node:fs/promises'; +import path from 'node:path'; +import { promisify } from 'node:util'; +import YAML from 'yaml'; + +import { siteRoot as rendererRoot } from './publication.mjs'; +import { isPublishableSupportPath } from './support-paths.mjs'; + +const execFileAsync = promisify(execFile); +const METHODS = new Set(['get', 'post', 'put', 'patch', 'delete', 'head', 'options', 'trace']); +const CONFIG_KEYS = new Set(['id', 'page', 'contract', 'role', 'operationId', 'response', 'example']); +const html = (value) => String(value).replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>').replaceAll('"', '"').replaceAll("'", '''); +const urlFor = (base, relative) => `${base.replace(/\/+$/, '')}/${relative}`; + +function relativePath(value, label) { + if (typeof value !== 'string' || !value || path.posix.isAbsolute(value) || /[\\?#:]/.test(value) || value.split('/').some((part) => !part || part === '.' || part === '..')) { + throw new Error(`Invalid ${label} path: ${String(value)}`); + } + if (!isPublishableSupportPath(value)) throw new Error(`${label} is not a publishable source path: ${value}`); + return value; +} + +function validateReferences(config) { + if (!config || !Array.isArray(config.references) || Object.keys(config).some((key) => key !== 'references')) { + throw new Error('api-references.yml requires a references list'); + } + const ids = new Set(); + const pages = new Set(); + return config.references.map((reference) => { + if (!reference || typeof reference !== 'object' || Object.keys(reference).some((key) => !CONFIG_KEYS.has(key))) throw new Error('Unknown API reference configuration member'); + if (!/^[a-z][a-z0-9-]*$/.test(reference.id ?? '')) throw new Error('API reference id must be a lowercase identifier'); + if (ids.has(reference.id)) throw new Error(`Duplicate API reference id: ${reference.id}`); + ids.add(reference.id); + relativePath(reference.page, 'page'); + if (!reference.page.endsWith('.md')) throw new Error('API reference page must be Markdown'); + if (pages.has(reference.page)) throw new Error(`Duplicate API reference page: ${reference.page}`); + pages.add(reference.page); + relativePath(reference.contract, 'contract'); + if (!['normative', 'example'].includes(reference.role)) throw new Error(`Unknown API reference role: ${reference.role}`); + const hasOperationId = reference.operationId !== undefined; + const hasResponse = reference.response !== undefined; + if (hasOperationId && (typeof reference.operationId !== 'string' || !reference.operationId.trim() || reference.operationId === 'undefined')) throw new Error('API reference operationId must be nonempty'); + if (hasResponse && (typeof reference.response !== 'string' || !/^2\d\d$/.test(reference.response))) throw new Error('API reference response must identify a successful HTTP status'); + if (reference.example !== undefined && (typeof reference.example !== 'string' || !reference.example)) throw new Error('Named response example must be nonempty'); + if (hasOperationId !== hasResponse) throw new Error(`API reference ${hasOperationId ? 'response' : 'operationId'} is required when selecting a response example`); + if (reference.example !== undefined && !hasOperationId) throw new Error('Named response example requires operationId and response'); + return { ...reference, label: reference.role === 'normative' ? 'Normative contract (draft)' : 'Illustrative example' }; + }); +} + +async function loadDependencies(sourceRoot, relative, snapshots, documents) { + relativePath(relative, 'contract dependency'); + const source = path.join(sourceRoot, relative); + const resolved = await realpath(source); + if (!resolved.startsWith(`${sourceRoot}${path.sep}`)) throw new Error(`Contract dependency symlink escapes the source: ${relative}`); + const actualRelative = path.relative(sourceRoot, resolved).split(path.sep).join('/'); + relativePath(actualRelative, 'resolved contract dependency'); + if (documents.has(relative)) return; + const bytes = await readFile(source); + const document = YAML.parse(bytes.toString('utf8')); + snapshots.set(relative, bytes); + documents.set(relative, document); + const dependencies = new Set(); + function visit(value) { + if (!value || typeof value !== 'object') return; + for (const key of ['$ref', '$dynamicRef']) { + if (value[key] === undefined) continue; + if (typeof value[key] !== 'string') throw new Error(`${relative}: invalid ${key}`); + const target = decodeURIComponent(value[key].split('#')[0]); + if (!target) continue; + if (path.posix.isAbsolute(target) || target.startsWith('\\')) throw new Error(`${relative}: absolute references outside source-relative resolution are not permitted: ${value[key]}`); + if (/^[A-Za-z][A-Za-z0-9+.-]*:/.test(target) || target.startsWith('//')) throw new Error(`${relative}: remote references are not permitted: ${value[key]}`); + dependencies.add(path.posix.normalize(path.posix.join(path.posix.dirname(relative), target))); + } + for (const child of Object.values(value)) visit(child); + } + visit(document); + for (const dependency of dependencies) await loadDependencies(sourceRoot, dependency, snapshots, documents); +} + +function resolved(document, value, seen = new Set()) { + if (!value?.$ref) return value; + if (!value.$ref.startsWith('#/')) throw new Error(`Unbundled reference: ${value.$ref}`); + if (seen.has(value.$ref)) throw new Error(`Cyclic reference while selecting response example: ${value.$ref}`); + seen.add(value.$ref); + let target = document; + for (const part of value.$ref.slice(2).split('/')) target = target?.[decodeURIComponent(part).replaceAll('~1', '/').replaceAll('~0', '~')]; + if (target === undefined) throw new Error(`Missing bundled reference: ${value.$ref}`); + const result = resolved(document, target, seen); + return { ...result, ...Object.fromEntries(Object.entries(value).filter(([key]) => key !== '$ref')) }; +} + +function schemaExample(document, schema) { + const value = resolved(document, schema); + if (!value || typeof value !== 'object') return undefined; + if (value.example !== undefined) return value.example; + if (Array.isArray(value.examples) && value.examples.length) return value.examples[0]; + for (const branch of value.allOf ?? []) { + const example = schemaExample(document, branch); + if (example !== undefined) return example; + } + return undefined; +} + +function contractOperations(document) { + return Object.entries(document.paths ?? {}).flatMap(([route, pathItem]) => { + const item = resolved(document, pathItem); + return Object.entries(item).filter(([method]) => METHODS.has(method)).map(([method, operation]) => ({ method, path: route, ...resolved(document, operation) })); + }); +} + +function selectedExample(document, operations, reference) { + const matches = operations.filter((operation) => operation.operationId === reference.operationId); + if (matches.length !== 1) throw new Error(`${reference.id}: expected one operationId ${reference.operationId}`); + const operation = matches[0]; + const response = resolved(document, operation.responses?.[reference.response]); + const media = response?.content?.['application/json']; + if (!media) throw new Error(`${reference.id}: selected response has no application/json representation`); + let value; + if (reference.example !== undefined) { + const example = resolved(document, media.examples?.[reference.example]); + if (example?.value === undefined) throw new Error(`${reference.id}: unknown named response example ${reference.example}`); + value = example.value; + } else if (media.example !== undefined) value = media.example; + else if (media.examples && Object.keys(media.examples).length) value = resolved(document, Object.values(media.examples)[0])?.value; + else value = schemaExample(document, media.schema); + if (value === undefined) throw new Error(`${reference.id}: no published example for response ${reference.response}; add one to the owning contract`); + return { value, operationId: operation.operationId, method: operation.method, path: operation.path, status: reference.response }; +} + +/** Compile opt-in, source-owned reference declarations without modifying their contracts. */ +export async function prepareApiReferences({ sourceRoot, siteRoot, base = '/', snapshots = new Map(), reservedPaths = [] }) { + let configBytes; + try { configBytes = await readFile(path.join(sourceRoot, 'api-references.yml')); } + catch (error) { if (error.code === 'ENOENT') return { references: [], supportFiles: [] }; throw error; } + const references = validateReferences(YAML.parse(configBytes.toString('utf8'))); + snapshots.set('api-references.yml', configBytes); + if (!references.length) return { references: [], supportFiles: [] }; + const scriptPath = 'api-reference/scalar-1.76.4.js'; + const outputs = [scriptPath, ...references.map((reference) => `api-reference/${reference.id}.json`)]; + for (const output of outputs) { + if (reservedPaths.some((reserved) => reserved === output || output.startsWith(`${reserved}/`) || reserved.startsWith(`${output}/`))) { + throw new Error(`Generated API reference output collides with source support file: ${output}`); + } + } + const source = await realpath(sourceRoot); + const documents = new Map(); + for (const reference of references) await loadDependencies(source, reference.contract, snapshots, documents); + const publicRoot = path.join(siteRoot, 'public'); + const outputRoot = path.join(publicRoot, 'api-reference'); + await mkdir(outputRoot, { recursive: true }); + const bundlerConfig = path.join(siteRoot, 'api-reference-bundler.yml'); + await writeFile(bundlerConfig, 'extends: []\n'); + const scriptUrl = urlFor(base, scriptPath); + await copyFile(path.join(rendererRoot, 'node_modules/@scalar/api-reference/dist/browser/standalone.js'), path.join(publicRoot, scriptPath)); + const supportFiles = [scriptPath]; + for (const reference of references) { + const relative = `api-reference/${reference.id}.json`; + const output = path.join(publicRoot, relative); + try { + await execFileAsync(process.execPath, [path.join(rendererRoot, 'node_modules/@redocly/cli/bin/cli.js'), 'bundle', path.join(source, reference.contract), '--config', bundlerConfig, '--output', output, '--ext', 'json'], { cwd: rendererRoot, maxBuffer: 4 * 1024 * 1024 }); + } catch (error) { + throw new Error(`${reference.id}: OpenAPI bundling failed: ${String(error.stderr ?? error.message).slice(0, 2000)}`); + } + const bytes = await readFile(output); + const document = JSON.parse(bytes); + const operations = contractOperations(document); + reference.contractUrl = urlFor(base, relative); + reference.sourceUrl = urlFor(base, reference.contract); + reference.scriptUrl = scriptUrl; + reference.bundleSha256 = createHash('sha256').update(bytes).digest('hex'); + if (reference.operationId !== undefined) { + reference.example = selectedExample(document, operations, reference); + } + reference.metadata = { + openapi: document.openapi, + operations: operations.map((operation) => ({ + method: operation.method, + path: operation.path, + operationId: operation.operationId, + ...Object.fromEntries( + Object.entries(operation).filter(([key]) => key.startsWith('x-')), + ), + })), + }; + supportFiles.push(relative); + } + return { references, supportFiles }; +} + +/** Native reference host; response examples remain in the owning OpenAPI contract. */ +export function apiReferenceMarkup(reference) { + const label = reference.role === 'normative' ? 'Normative contract (draft)' : 'Illustrative example'; + const scope = reference.role === 'normative' ? 'Draft transport contract; example values are illustrative.' : 'This example does not add requirements to the normative contract.'; + return `
+
${html(label)}${reference.sourceUrl ? `Source OpenAPI ยท ` : ''}Download OpenAPI
+ +
+ +
\n`; +} + +export function apiReferenceSidebar(sidebar, references, pagesBySource) { + if (!references.length) return sidebar; + const sources = new Set(references.map((reference) => reference.page)); + function retain(items) { + return items.flatMap((item) => { + if (item.items) { const children = retain(item.items); return children.length ? [{ ...item, items: children }] : []; } + return [...sources].some((source) => pagesBySource.get(source)?.route === item.slug) ? [] : [item]; + }); + } + const navigation = retain(sidebar); + const groups = ['normative', 'example'].flatMap((role) => { + const items = references.filter((reference) => reference.role === role).map((reference) => ({ label: pagesBySource.get(reference.page).title, slug: pagesBySource.get(reference.page).route })); + return items.length ? [{ label: role === 'normative' ? 'Normative draft' : 'Illustrative examples', items }] : []; + }); + navigation.splice(Math.min(3, navigation.length), 0, { label: 'API reference', items: groups }); + return navigation; +} diff --git a/scripts/check-built.mjs b/scripts/check-built.mjs index 71401ba..07bcca7 100644 --- a/scripts/check-built.mjs +++ b/scripts/check-built.mjs @@ -1,3 +1,4 @@ +import { createHash } from 'node:crypto'; import { readFile, readdir, stat } from 'node:fs/promises'; import path from 'node:path'; @@ -153,6 +154,28 @@ export async function checkBuilt({ distDir, manifest, base = '/' }) { continue; } const nodes = elements(parse(await readFile(file, 'utf8'))); + const reference = manifest.apiReferences?.find((item) => item.route === page.route); + if (reference) { + const hosts = nodes.filter((node) => attribute(node, 'data-scalar-reference') !== undefined); + if (hosts.length !== 1) errors.push(`${page.source}: expected one native Scalar host`); + else { + if (attribute(hosts[0], 'data-contract-url') !== reference.contractUrl) + errors.push(`${page.source}: Scalar contract URL differs from the declared reference`); + if (attribute(hosts[0], 'data-script-url') !== reference.scriptUrl) + errors.push(`${page.source}: Scalar script URL differs from the declared reference`); + } + if (!nodes.some((node) => attribute(node, 'data-api-reference-role') === reference.role)) + errors.push(`${page.source}: missing declared API reference role`); + const metadata = nodes.find((node) => node.tagName === 'details' && hasClass(node, 'api-technical-metadata')); + if (!metadata || attribute(metadata, 'open') !== undefined) + errors.push(`${page.source}: technical metadata must be present and collapsed`); + const prefix = basePath(base); + const relativeContract = reference.contractUrl?.startsWith(prefix) ? outputPath(reference.contractUrl.slice(prefix.length)) : undefined; + const contractFile = relativeContract && inside(distDir, relativeContract); + if (!contractFile || !(await isFile(contractFile))) errors.push(`${page.source}: missing local API reference bundle`); + else if (createHash('sha256').update(await readFile(contractFile)).digest('hex') !== reference.bundleSha256) + errors.push(`${page.source}: API reference bundle digest differs from the generated manifest`); + } const ids = nodes.map((node) => attribute(node, 'id')).filter(Boolean); const names = new Set(ids); if (names.size !== ids.length) diff --git a/src/components/ReferenceContent.astro b/src/components/ReferenceContent.astro new file mode 100644 index 0000000..c639f2e --- /dev/null +++ b/src/components/ReferenceContent.astro @@ -0,0 +1,75 @@ +--- +import MarkdownContent from '@astrojs/starlight/components/MarkdownContent.astro'; +import { readPublication } from '../../scripts/publication.mjs'; + +const publication = readPublication(); +const route = Astro.locals.starlightRoute.entry.id; +const isReference = publication.apiReferences?.some((reference: { route: string }) => reference.route === route); +--- + +{isReference ?
: } + + diff --git a/src/components/ReferenceTitle.astro b/src/components/ReferenceTitle.astro new file mode 100644 index 0000000..aa2e8ee --- /dev/null +++ b/src/components/ReferenceTitle.astro @@ -0,0 +1,10 @@ +--- +import PageTitle from '@astrojs/starlight/components/PageTitle.astro'; +import { readPublication } from '../../scripts/publication.mjs'; + +const publication = readPublication(); +const route = Astro.locals.starlightRoute.entry.id; +const isReference = publication.apiReferences?.some((reference: { route: string }) => reference.route === route); +--- + +{isReference ?
: } diff --git a/src/styles/govstack.css b/src/styles/govstack.css index f2b73f6..e0e1708 100644 --- a/src/styles/govstack.css +++ b/src/styles/govstack.css @@ -42,6 +42,31 @@ } body { font-family: var(--sl-font); } + +/* API pages share the site shell, with Scalar outside the Markdown prose styles. */ +.api-reference-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; } +.api-reference-badge { + display: inline-block; + margin: 0; + padding: 0.25rem 0.65rem; + border: 1px solid var(--sl-color-accent); + border-radius: 0.3rem; + color: var(--sl-color-accent-high); + font-size: 0.75rem; + font-weight: 650; +} +.api-technical-metadata pre { overflow-x: auto; padding: 1rem; border: 1px solid var(--sl-color-gray-5); border-radius: 0.4rem; background: var(--sl-color-gray-6); font-size: 0.8125rem; line-height: 1.6; } +.api-technical-metadata { margin: 0.75rem 0 0; } +.api-technical-metadata summary { cursor: pointer; font-size: 0.875rem; font-weight: 600; } +.api-reference-links { font-size: 0.8125rem; } +body:has(.native-reference-content) { --sl-content-width: 100%; } +body:has(.native-reference-content) .main-pane { min-width: 0; } +body:has(.native-reference-content) .content-panel:has(.api-reference-title) { padding-bottom: 0; } +body:has(.native-reference-content) .content-panel:has(.native-reference-content) { border-top: 0; } +.native-reference-content { min-width: 0; } +[data-scalar-reference] { --scalar-font: var(--sl-font); --scalar-font-code: var(--sl-font-mono); } +/* Scalar 1.76 uses this stable introduction-entry suffix. The source stays in the download. */ +.native-reference-content .api-reference-native [data-scalar-reference] [id$='/description/introduction'] { display: none; } header.header { background: var(--sl-color-bg); border-bottom: 1px solid var(--sl-color-gray-5); @@ -102,6 +127,20 @@ header.header { text-transform: uppercase; } .sidebar-content summary .caret { width: 0.8rem; color: var(--sl-color-gray-3); } +.sidebar-content details details { + margin-top: 0.5rem; + margin-inline-start: 0.5rem; + padding-inline-start: 0.5rem; + border-inline-start: 1px solid var(--sl-color-gray-5); +} +.sidebar-content details details > summary .large { + color: var(--sl-color-gray-2); + font-size: 0.75rem; + font-weight: 500; + letter-spacing: normal; + text-transform: none; +} +.sidebar-content details details > ul { padding-inline-start: 0.5rem; } .draft-banner { display: flex; diff --git a/tests/action.test.mjs b/tests/action.test.mjs new file mode 100644 index 0000000..ac268a9 --- /dev/null +++ b/tests/action.test.mjs @@ -0,0 +1,75 @@ +import assert from 'node:assert/strict'; +import { execFile } from 'node:child_process'; +import { mkdir, mkdtemp, readFile, realpath, rm, writeFile } from 'node:fs/promises'; +import os from 'node:os'; +import path from 'node:path'; +import { promisify } from 'node:util'; +import test from 'node:test'; +import YAML from 'yaml'; +import { generateSite } from '../adapters/framework.mjs'; + +const exec = promisify(execFile); +const actionPath = new URL('../action.yml', import.meta.url); + +test('shared build action installs the pinned toolchain without deployment or install scripts', async () => { + const action = YAML.parse(await readFile(actionPath, 'utf8')); + assert.equal(action.runs.using, 'composite'); + assert.equal(action.inputs.profile.default, 'framework'); + assert.equal(action.inputs.unofficial.default, 'true'); + assert.equal(action.inputs.source.required, true); + assert.equal(action.inputs.output.required, true); + const setup = action.runs.steps.find((step) => step.uses); + assert.match(setup.uses, /^actions\/setup-node@[a-f0-9]{40}$/); + assert.equal(setup.with['node-version'], '24'); + assert.ok(action.runs.steps.some((step) => /npm ci --ignore-scripts/.test(step.run ?? ''))); + assert.doesNotMatch(JSON.stringify(action), /deploy-pages|pages: write|id-token: write|persist-credentials/); +}); + +test('shared action passes consumer paths and options as data, independent of renderer directory', async (t) => { + const action = YAML.parse(await readFile(actionPath, 'utf8')); + const step = action.runs.steps.find((step) => step.id === 'build'); + const scratch = await mkdtemp(path.join(os.tmpdir(), 'govstack-action-')); + t.after(() => rm(scratch, { recursive: true })); + const renderer = path.join(scratch, 'renderer with spaces'); + const workspace = path.join(scratch, 'consumer'); + await mkdir(path.join(renderer, 'scripts'), { recursive: true }); + await mkdir(workspace); + await writeFile(path.join(renderer, 'scripts/site.mjs'), ` + const keys = ['DOCS_PROFILE', 'DOCS_SOURCE_ROOT', 'DOCS_DIST_DIR', 'DOCS_BASE', 'DOCS_UNOFFICIAL', 'DOCS_SOURCE_URL']; + console.log(JSON.stringify({ args: process.argv.slice(2), options: Object.fromEntries(keys.map(key => [key, process.env[key]])), cwd: process.cwd() })); + `); + const env = { + ...process.env, + GOVSTACK_RENDERER_ROOT: renderer, + DOCS_PROFILE: 'framework', + DOCS_SOURCE_ROOT: path.join(workspace, 'specification'), + DOCS_DIST_DIR: path.join(scratch, 'output with spaces'), + DOCS_BASE: '/building-block/', + DOCS_UNOFFICIAL: '1', + DOCS_SOURCE_URL: '', + }; + const { stdout } = await exec('bash', ['-c', step.run], { cwd: workspace, env }); + const result = JSON.parse(stdout); + assert.deepEqual(result.args, ['check']); + assert.equal(result.cwd, await realpath(workspace)); + for (const key of Object.keys(result.options)) assert.equal(result.options[key], env[key]); + assert.match(step.env.GOVSTACK_RENDERER_ROOT, /github\.action_path/); + assert.match(step.env.DOCS_SOURCE_ROOT, /inputs\.source/); + assert.match(step.env.DOCS_DIST_DIR, /inputs\.output/); + assert.match(step.env.DOCS_BASE, /inputs\.base/); +}); + +test('the reusable example builds a generic API page from a minimal declaration', async (t) => { + const scratch = await mkdtemp(path.join(os.tmpdir(), 'govstack-adoption-')); + t.after(() => rm(scratch, { recursive: true })); + const manifest = await generateSite({ sourceRoot: path.resolve(import.meta.dirname, '../examples/building-block'), siteRoot: scratch, base: '/example/' }); + assert.equal(manifest.apiReferences.length, 1); + assert.equal(manifest.apiReferences[0].role, 'example'); + assert.ok(manifest.apiReferences[0].metadata.operations[0]['x-example-block']); + const page = await readFile(path.join(scratch, 'src/content/docs/resources/api-example.md'), 'utf8'); + assert.match(page, /data-scalar-reference/); + assert.doesNotMatch(page, /Digital Registries/); + const guide = await readFile(path.join(scratch, 'src/content/docs/resources/guide.md'), 'utf8'); + assert.match(guide, /Example guide in the Example Building Block specification/); + assert.doesNotMatch(guide, /Digital Registries/); +}); diff --git a/tests/api-reference-page.test.mjs b/tests/api-reference-page.test.mjs new file mode 100644 index 0000000..b0c2a96 --- /dev/null +++ b/tests/api-reference-page.test.mjs @@ -0,0 +1,74 @@ +import assert from 'node:assert/strict'; +import test from 'node:test'; +import { mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises'; +import os from 'node:os'; +import path from 'node:path'; +import { apiReferenceMarkup, prepareApiReferences } from '../scripts/api-references.mjs'; + +test('native reference opens on the contract without a repeated introduction or response', () => { + const reference = { + id: 'birth', title: 'Birth registration', role: 'example', + contract: 'api/birth.yaml', contractUrl: '/registries/api-reference/birth.json', + scriptUrl: '/registries/api-reference/scalar.js', + example: { operationId: 'retrieveBirthRegistration', status: '200', value: { recordId: 'birth_19', data: { name: '' } } }, + metadata: [{ operationId: 'retrieveBirthRegistration', method: 'GET', path: '/records/{recordId}', context: { capability: '' } }], + }; + const html = apiReferenceMarkup(reference); + assert.match(html, /Illustrative example/); + assert.match(html, /does not add requirements/i); + assert.doesNotMatch(html, /birth_19|api-response-example|api-reference-intro/); + assert.match(html, /<img/); + assert.doesNotMatch(html, /]*>/); + assert.doesNotMatch(html, /]*\sopen(?:\s|>)/); + assert.doesNotMatch(html, / { + const html = apiReferenceMarkup({ + id: 'payments', + role: 'normative', + contractUrl: '/payments/api-reference/payments.json', + scriptUrl: '/payments/api-reference/scalar.js', + metadata: { + openapi: '3.1.2', + operations: [{ + method: 'post', + path: '/transfers', + operationId: undefined, + 'x-payments': { capability: 'transfer' }, + }], + }, + }); + + assert.match(html, /data-scalar-reference/); + assert.match(html, /\/payments\/api-reference\/payments\.json/); + assert.match(html, /"x-payments"/); + assert.doesNotMatch(html, /api-response-example|operation selection/i); +}); + +test('absolute contract refs cannot use an in-source decoy to read outside the source', async (t) => { + const root = await mkdtemp(path.join(os.tmpdir(), 'api-reference-absolute-')); + t.after(() => rm(root, { recursive: true })); + const sourceRoot = path.join(root, 'source'); + const outside = path.join(root, 'outside.json'); + const decoy = path.join(sourceRoot, path.posix.join('api', outside)); + await mkdir(path.dirname(decoy), { recursive: true }); + await writeFile(outside, JSON.stringify({ type: 'object', example: { escaped: true } })); + await writeFile(decoy, JSON.stringify({ type: 'object', example: { escaped: false } })); + await writeFile(path.join(sourceRoot, 'api-references.yml'), `references:\n - id: sample\n page: sample.md\n contract: api/openapi.yaml\n role: example\n operationId: retrieve\n response: '200'\n`); + const contract = { + openapi: '3.1.2', info: { title: 'Fixture', version: '1' }, + paths: { '/records': { get: { operationId: 'retrieve', responses: { '200': { + description: 'Fixture', content: { 'application/json': { schema: { $ref: outside } } }, + } } } } }, + }; + for (const ref of [outside, encodeURIComponent(outside)]) { + contract.paths['/records'].get.responses['200'].content['application/json'].schema.$ref = ref; + await writeFile(path.join(sourceRoot, 'api/openapi.yaml'), JSON.stringify(contract)); + await assert.rejects(prepareApiReferences({ sourceRoot, siteRoot: path.join(root, 'site') }), /absolute|outside|escape/i); + } +}); diff --git a/tests/api-references.test.mjs b/tests/api-references.test.mjs new file mode 100644 index 0000000..8d6c4c2 --- /dev/null +++ b/tests/api-references.test.mjs @@ -0,0 +1,667 @@ +import assert from 'node:assert/strict'; +import { execFile } from 'node:child_process'; +import { access, mkdtemp, mkdir, readFile, readdir, rm, symlink, writeFile } from 'node:fs/promises'; +import os from 'node:os'; +import path from 'node:path'; +import { promisify } from 'node:util'; +import test from 'node:test'; + +import { generateSite } from '../adapters/framework.mjs'; +import { apiReferenceMarkup, prepareApiReferences } from '../scripts/api-references.mjs'; + +const execFileAsync = promisify(execFile); + +async function write(root, relativePath, contents) { + const target = path.join(root, relativePath); + await mkdir(path.dirname(target), { recursive: true }); + await writeFile(target, contents); +} + +const contract = `openapi: 3.1.2 +info: + title: Registry fixture + version: 1.0.0 +paths: + /v1/records/{recordId}: + get: + operationId: retrieveRecord + summary: Retrieve a record + x-govstack-digital-registries: + capability: retrieve + purpose: + required: true + allowedPurposes: [benefit-eligibility] + responses: + '200': + description: The actual published record response. + content: + application/json: + schema: + $ref: './common/record.schema.json#/$defs/Record' + examples: + published: + summary: Published 200 response + value: + recordId: record_19 + data: + status: ACTIVE + /v1/records/search: + post: + operationId: searchRecords + summary: Search records + responses: + '200': + description: A published search page. + content: + application/json: + schema: + type: object + required: [items] + properties: + items: + type: array + items: + $ref: './common/record.schema.json#/$defs/Record' + example: + items: + - recordId: record_20 + data: + status: PENDING +`; + +const commonSchema = `{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$defs": { + "Record": { + "type": "object", + "description": "The normative record envelope remains unchanged.", + "required": ["recordId", "data"], + "properties": { + "recordId": { "type": "string", "minLength": 1 }, + "data": { + "type": "object", + "additionalProperties": true, + "properties": { "status": { "type": "string" } } + } + }, + "x-source-metadata": { "authority": "fixture" } + } + } +} +`; + +const genericContract = `openapi: 3.1.2 +info: + title: Another building block fixture + version: 2.0.0 +servers: + - url: /another-block/v2 +security: + - bearerAuth: [] +paths: + /widgets: + get: + summary: List widgets + x-another-block: + capability: list-widgets + audience: institutions + x-other: false + responses: + '200': + description: Widget list + content: + application/json: + schema: + $ref: './widget.schema.json' +components: + securitySchemes: + bearerAuth: + type: http + scheme: bearer +`; + +const genericSchema = `{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "type": "object", + "required": ["id"], + "properties": { "id": { "type": "string" } } + } +} +`; + +function config(references = [ + { + id: 'record-retrieve', + page: 'core.md', + contract: 'api/openapi.yaml', + role: 'normative', + operationId: 'retrieveRecord', + response: '200', + example: 'published', + }, + { + id: 'record-search', + page: 'examples/search.md', + contract: 'api/openapi.yaml', + role: 'example', + operationId: 'searchRecords', + response: '200', + }, +]) { + const lines = ['references:']; + for (const reference of references) { + lines.push(` - id: ${reference.id}`); + lines.push(` page: ${reference.page}`); + lines.push(` contract: ${reference.contract}`); + lines.push(` role: ${reference.role}`); + if (reference.operationId !== undefined) lines.push(` operationId: ${reference.operationId}`); + if (reference.response !== undefined) lines.push(` response: '${reference.response}'`); + if (reference.example) lines.push(` example: ${reference.example}`); + if (reference.futureOption !== undefined) lines.push(` futureOption: ${reference.futureOption}`); + } + return `${lines.join('\n')}\n`; +} + +async function fixture(t, references) { + const root = await mkdtemp(path.join(os.tmpdir(), 'govstack-api-references-')); + t.after(() => rm(root, { recursive: true })); + const sourceRoot = path.join(root, 'source'); + const siteRoot = path.join(root, 'site'); + await write(sourceRoot, 'api-references.yml', config(references)); + await write(sourceRoot, 'api/openapi.yaml', contract); + await write(sourceRoot, 'api/common/record.schema.json', commonSchema); + return { root, sourceRoot, siteRoot }; +} + +async function sourceBytes(sourceRoot) { + return new Map( + await Promise.all( + ['api-references.yml', 'api/openapi.yaml', 'api/common/record.schema.json'].map( + async (relative) => [relative, await readFile(path.join(sourceRoot, relative))], + ), + ), + ); +} + +async function assertSourceUnchanged(sourceRoot, before) { + for (const [relative, bytes] of before) { + assert.equal( + (await readFile(path.join(sourceRoot, relative))).compare(bytes), + 0, + `${relative} authoring bytes changed`, + ); + } +} + +test('absent configuration is a no-op', async (t) => { + const root = await mkdtemp(path.join(os.tmpdir(), 'govstack-api-references-absent-')); + t.after(() => rm(root, { recursive: true })); + const sourceRoot = path.join(root, 'source'); + const siteRoot = path.join(root, 'site'); + await mkdir(sourceRoot); + await write(siteRoot, 'keep.txt', 'unchanged'); + const snapshots = new Map([['existing', Buffer.from('snapshot')]]); + + assert.deepEqual( + await prepareApiReferences({ sourceRoot, siteRoot, snapshots }), + { references: [], supportFiles: [] }, + ); + assert.equal(await readFile(path.join(siteRoot, 'keep.txt'), 'utf8'), 'unchanged'); + assert.deepEqual([...snapshots], [['existing', Buffer.from('snapshot')]]); + assert.deepEqual(await readdir(siteRoot), ['keep.txt']); +}); + +test('prepares labelled references from exact published 200 examples', async (t) => { + const { sourceRoot, siteRoot } = await fixture(t); + const before = await sourceBytes(sourceRoot); + const snapshots = new Map(); + + const { references, supportFiles } = await prepareApiReferences({ + sourceRoot, + siteRoot, + base: '/standards/digital-registries/', + snapshots, + }); + + assert.equal(references.length, 2); + assert.equal(references[0].role, 'normative'); + assert.match(references[0].label, /normative/i); + assert.equal(references[1].role, 'example'); + assert.match(references[1].label, /example/i); + assert.equal( + references[0].contractUrl, + '/standards/digital-registries/api-reference/record-retrieve.json', + ); + assert.deepEqual(references[0].example.value, { + recordId: 'record_19', + data: { status: 'ACTIVE' }, + }); + assert.deepEqual(references[1].example.value, { + items: [{ recordId: 'record_20', data: { status: 'PENDING' } }], + }); + assert.deepEqual( + references[0].metadata.operations.map(({ method, path: operationPath, operationId }) => ({ + method, + path: operationPath, + operationId, + })), + [ + { method: 'get', path: '/v1/records/{recordId}', operationId: 'retrieveRecord' }, + { method: 'post', path: '/v1/records/search', operationId: 'searchRecords' }, + ], + ); + assert.ok(supportFiles.some((file) => /(^|\/)scalar[^/]*\.js$/.test(file)), 'local Scalar asset'); + assert.ok(supportFiles.includes('api-reference/record-retrieve.json')); + assert.ok(supportFiles.includes('api-reference/record-search.json')); + assert.equal(supportFiles.some((file) => file.endsWith('.html')), false); + assert.equal(references[0].viewerUrl, undefined); + assert.equal(references[1].viewerUrl, undefined); + for (const relative of ['api-references.yml', 'api/openapi.yaml', 'api/common/record.schema.json']) { + assert.ok(snapshots.has(relative), `${relative} must contribute to source snapshots`); + } + await assertSourceUnchanged(sourceRoot, before); +}); + +test('prepares a generic OpenAPI reference without an operation selection or examples', async (t) => { + const root = await mkdtemp(path.join(os.tmpdir(), 'govstack-api-references-generic-')); + t.after(() => rm(root, { recursive: true })); + const sourceRoot = path.join(root, 'source'); + const siteRoot = path.join(root, 'site'); + await write(sourceRoot, 'api-references.yml', config([{ + id: 'another-block', + page: 'reference.md', + contract: 'api/openapi.yaml', + role: 'normative', + }])); + await write(sourceRoot, 'api/openapi.yaml', genericContract); + await write(sourceRoot, 'api/widget.schema.json', genericSchema); + const sourcePaths = ['api-references.yml', 'api/openapi.yaml', 'api/widget.schema.json']; + const before = new Map(await Promise.all(sourcePaths.map(async (relative) => [ + relative, + await readFile(path.join(sourceRoot, relative)), + ]))); + + const { references } = await prepareApiReferences({ + sourceRoot, + siteRoot, + base: '/standards/another-block/', + }); + const output = JSON.parse( + await readFile(path.join(siteRoot, 'public/api-reference/another-block.json'), 'utf8'), + ); + + assert.equal(references[0].contractUrl, '/standards/another-block/api-reference/another-block.json'); + assert.equal(references[0].example, undefined); + assert.deepEqual(references[0].metadata.operations, [{ + method: 'get', + path: '/widgets', + operationId: undefined, + 'x-another-block': { capability: 'list-widgets', audience: 'institutions' }, + 'x-other': false, + }]); + assert.deepEqual(output.servers, [{ url: '/another-block/v2' }]); + assert.deepEqual(output.security, [{ bearerAuth: [] }]); + assert.deepEqual(output.components.securitySchemes.bearerAuth, { + type: 'http', + scheme: 'bearer', + }); + assert.ok( + output.paths['/widgets'].get.responses['200'].content['application/json'].schema.$ref + .startsWith('#/'), + 'the bundled external schema remains an internal reference', + ); + for (const [relative, bytes] of before) { + assert.equal( + (await readFile(path.join(sourceRoot, relative))).compare(bytes), + 0, + `${relative} authoring bytes changed`, + ); + } +}); + +test('bundles only internal refs while preserving examples, extensions and schema claims', async (t) => { + const { sourceRoot, siteRoot } = await fixture(t); + const before = await sourceBytes(sourceRoot); + const { references } = await prepareApiReferences({ sourceRoot, siteRoot }); + const output = JSON.parse( + await readFile(path.join(siteRoot, 'public/api-reference/record-retrieve.json'), 'utf8'), + ); + const refs = []; + const visit = (value) => { + if (!value || typeof value !== 'object') return; + if ('$ref' in value) refs.push(value.$ref); + for (const child of Object.values(value)) visit(child); + }; + visit(output); + + assert.ok(refs.length > 0); + assert.ok(refs.every((value) => value.startsWith('#/')), refs.join('\n')); + assert.deepEqual( + output.paths['/v1/records/{recordId}'].get.responses['200'].content['application/json'] + .examples.published, + { + summary: 'Published 200 response', + value: { recordId: 'record_19', data: { status: 'ACTIVE' } }, + }, + ); + assert.deepEqual( + output.paths['/v1/records/{recordId}'].get['x-govstack-digital-registries'], + { + capability: 'retrieve', + purpose: { required: true, allowedPurposes: ['benefit-eligibility'] }, + }, + ); + const bundledRecord = Object.values(output.components.schemas).find( + (schema) => schema.description === 'The normative record envelope remains unchanged.', + ); + assert.equal(bundledRecord.properties.recordId.minLength, 1); + assert.deepEqual(bundledRecord['x-source-metadata'], { authority: 'fixture' }); + assert.equal(references[0].example.value.recordId, 'record_19'); + await assertSourceUnchanged(sourceRoot, before); +}); + +test('rejects reserved output collisions before overwriting source support files', async (t) => { + const cases = [ + 'api-reference/record-retrieve.json', + 'api-reference/scalar-1.76.4.js', + 'api-reference/record-retrieve.json/owned.txt', + ]; + for (const reserved of cases) { + await t.test(reserved, async (t) => { + const { sourceRoot, siteRoot } = await fixture(t); + const sentinel = 'source-owned support file'; + await write(siteRoot, `public/${reserved}`, sentinel); + + await assert.rejects( + prepareApiReferences({ sourceRoot, siteRoot, reservedPaths: [reserved] }), + /generated API reference output collides with source support file/i, + ); + assert.equal(await readFile(path.join(siteRoot, 'public', reserved), 'utf8'), sentinel); + await assert.rejects(access(path.join(siteRoot, 'api-reference-bundler.yml'))); + if (reserved !== 'api-reference/scalar-1.76.4.js') { + await assert.rejects( + access(path.join(siteRoot, 'public/api-reference/scalar-1.76.4.js')), + ); + } + }); + } +}); + +test('markup uses an empty native Scalar host with links and closed metadata only', async (t) => { + const { sourceRoot, siteRoot } = await fixture(t); + const { references } = await prepareApiReferences({ + sourceRoot, + siteRoot, + base: '/preview/', + }); + const markup = apiReferenceMarkup(references[0]); + + assert.match(markup, /Normative/i); + assert.match(markup, /)/i); + assert.doesNotMatch(markup, /]*\sopen(?:\s|>)/i); + assert.match(markup, /retrieveRecord/); + assert.match(markup, /Source OpenAPI/i); + assert.match(markup, /Download OpenAPI/i); + assert.match(markup, /]*\bdata-scalar-reference(?:=(?:""|''))?[^>]*>\s*<\/div>/i); + assert.match(markup, /data-contract-url="\/preview\/api-reference\/record-retrieve\.json"/); + assert.match(markup, /data-script-url="\/preview\/api-reference\/scalar[^/"']*\.js"/); + assert.doesNotMatch(markup, / { + for (const [base, expected] of [ + ['/', '/api-reference/record-retrieve.json'], + ['/nested/site/', '/nested/site/api-reference/record-retrieve.json'], + ]) { + const { sourceRoot, siteRoot } = await fixture(t); + const { references } = await prepareApiReferences({ sourceRoot, siteRoot, base }); + assert.equal(references[0].contractUrl, expected); + const markup = apiReferenceMarkup(references[0]); + assert.match(markup, new RegExp(`data-contract-url="${expected.replaceAll('/', '\\/')}"`)); + assert.match( + markup, + new RegExp(`data-script-url="${base === '/' ? '' : base.slice(0, -1).replaceAll('/', '\\/')}\\/api-reference\\/scalar[^"']*\\.js"`), + ); + } +}); + +test('rejects incomplete selections, unknown operations and unknown named examples', async (t) => { + const cases = [ + ['response without operationId', { operationId: undefined }, /operationId/i], + ['operationId without response', { response: undefined }, /response/i], + ['example without a selection', { operationId: undefined, response: undefined }, /example|operationId|response/i], + ['unknown operationId', { operationId: 'doesNotExist' }, /doesNotExist|operation/i], + ['unknown response status', { response: '201' }, /selected response|201|representation/i], + ['unsuccessful response status', { response: '400' }, /successful.*status/i], + ['unknown named example', { example: 'invented' }, /invented|example/i], + ]; + for (const [name, overrides, expected] of cases) { + await t.test(name, async (t) => { + const reference = { + id: 'record-retrieve', + page: 'core.md', + contract: 'api/openapi.yaml', + role: 'normative', + operationId: 'retrieveRecord', + response: '200', + example: 'published', + ...overrides, + }; + const { sourceRoot, siteRoot } = await fixture(t, [reference]); + await assert.rejects(prepareApiReferences({ sourceRoot, siteRoot }), expected); + }); + } +}); + +test('rejects ambiguous identifiers and unsafe or future configuration', async (t) => { + const original = { + id: 'record-retrieve', + page: 'core.md', + contract: 'api/openapi.yaml', + role: 'normative', + operationId: 'retrieveRecord', + response: '200', + example: 'published', + }; + const cases = [ + ['duplicate id', [original, { ...original, page: 'other.md' }], /duplicate.*id/i], + ['duplicate page', [original, { ...original, id: 'other' }], /duplicate.*page/i], + ['unknown role', [{ ...original, role: 'future-role' }], /role/i], + ['contract traversal', [{ ...original, contract: '../outside.yaml' }], /contract|path|travers/i], + ['page traversal', [{ ...original, page: '../outside.md' }], /page|path|travers/i], + ['unknown configuration', [{ ...original, futureOption: true }], /unknown.*configuration/i], + ]; + for (const [name, references, expected] of cases) { + await t.test(name, async (t) => { + const { sourceRoot, siteRoot } = await fixture(t, references); + await assert.rejects(prepareApiReferences({ sourceRoot, siteRoot }), expected); + }); + } +}); + +test('rejects source escapes and remote refs before attempting a fetch', async (t) => { + await t.test('outside-source symlink', async (t) => { + const { root, sourceRoot, siteRoot } = await fixture(t); + const outside = path.join(root, 'outside.yaml'); + await writeFile(outside, contract); + await rm(path.join(sourceRoot, 'api/openapi.yaml')); + await symlink(outside, path.join(sourceRoot, 'api/openapi.yaml')); + await assert.rejects( + prepareApiReferences({ sourceRoot, siteRoot }), + /symlink|outside|escape|source/i, + ); + }); + + await t.test('HTTP ref', async (t) => { + const { sourceRoot, siteRoot } = await fixture(t); + const remoteContract = contract.replace( + './common/record.schema.json#/$defs/Record', + 'https://schemas.example.invalid/record.json#/$defs/Record', + ); + await writeFile(path.join(sourceRoot, 'api/openapi.yaml'), remoteContract); + let fetches = 0; + const originalFetch = globalThis.fetch; + globalThis.fetch = async () => { + fetches += 1; + throw new Error('network access attempted'); + }; + t.after(() => { + globalThis.fetch = originalFetch; + }); + + await assert.rejects( + prepareApiReferences({ sourceRoot, siteRoot }), + /remote|http|network|ref/i, + ); + assert.equal(fetches, 0); + await assert.rejects(access(path.join(siteRoot, 'public/api-reference/record-retrieve.json'))); + }); +}); + +test('framework opt-in classifies API pages without changing source or generic navigation', async (t) => { + const root = await mkdtemp(path.join(os.tmpdir(), 'govstack-api-reference-framework-')); + t.after(() => rm(root, { recursive: true })); + const sourceRoot = path.join(root, 'source'); + const siteRoot = path.join(root, 'site'); + const references = [ + { + id: 'record-retrieve', + page: 'contracts/core.md', + contract: 'api/openapi.yaml', + role: 'normative', + operationId: 'retrieveRecord', + response: '200', + example: 'published', + }, + { + id: 'record-search', + page: 'examples/search.md', + contract: 'api/openapi.yaml', + role: 'example', + operationId: 'searchRecords', + response: '200', + }, + ]; + await write(sourceRoot, 'toc.yml', `toc: + contracts: + - core.md + examples: + - search.md + resources: + - guide.md +`); + await write(sourceRoot, 'metadata.yml', `name: Registry fixture +abstract: A renderer integration fixture. +url: https://example.invalid/registries/ +repository: https://github.com/example/registries +urn: govstack:spec:bb:registries +owner_group: govstack:wg:registries +capabilities: [] +extensions: [] +versions: + - version: 1.0.0-draft + release_date: + short_description: Fixture draft. + latest: true +`); + await write(sourceRoot, 'authors.yml', `authors: + - name: Example Author + roles: [Author] + urn: govstack:person:example +`); + await write(sourceRoot, 'README.md', '# Registry fixture\n\nGeneric introduction.\n'); + await write(sourceRoot, 'contracts/core.md', '# Core contract\n\nNormative source prose.\n'); + await write(sourceRoot, 'examples/search.md', '# Search example\n\nIllustrative source prose.\n'); + await write(sourceRoot, 'resources/guide.md', '# Reader guide\n\nGeneric guidance.\n'); + await write(sourceRoot, 'api-references.yml', config(references)); + await write(sourceRoot, 'api/openapi.yaml', contract); + await write(sourceRoot, 'api/common/record.schema.json', commonSchema); + await execFileAsync('git', ['init', '-q', sourceRoot]); + await execFileAsync('git', ['-C', sourceRoot, 'add', '.']); + await execFileAsync('git', [ + '-C', sourceRoot, + '-c', 'user.name=Fixture', + '-c', 'user.email=fixture@example.invalid', + 'commit', '-qm', 'fixture', + ]); + + const authoringPaths = [ + 'toc.yml', + 'metadata.yml', + 'authors.yml', + 'README.md', + 'contracts/core.md', + 'examples/search.md', + 'resources/guide.md', + 'api-references.yml', + 'api/openapi.yaml', + 'api/common/record.schema.json', + ]; + const before = new Map( + await Promise.all( + authoringPaths.map(async (relative) => [relative, await readFile(path.join(sourceRoot, relative))]), + ), + ); + const manifest = await generateSite({ + sourceRoot, + siteRoot, + base: '/standards/registries/', + unofficial: true, + }); + + const apiGroup = manifest.sidebar.find((entry) => entry.label === 'API reference'); + assert.deepEqual(apiGroup.items.map(({ label }) => label), [ + 'Normative draft', + 'Illustrative examples', + ]); + assert.deepEqual(apiGroup.items[0].items, [{ label: 'Core contract', slug: 'contracts/core' }]); + assert.deepEqual(apiGroup.items[1].items, [{ label: 'Search example', slug: 'examples/search' }]); + assert.ok( + manifest.sidebar.some( + (entry) => entry.label === 'Resources' + && entry.items.some((item) => item.slug === 'resources/guide'), + ), + 'generic navigation remains present', + ); + assert.equal(manifest.apiReferences.length, 2); + const corePage = await readFile( + path.join(siteRoot, 'src/content/docs/contracts/core.md'), + 'utf8', + ); + const guidePage = await readFile( + path.join(siteRoot, 'src/content/docs/resources/guide.md'), + 'utf8', + ); + assert.match(corePage, /data-api-reference-role="normative"/); + assert.match(corePage, /^tableOfContents: false$/m); + assert.match(corePage, /^prev: false$/m); + assert.match(corePage, /^next: false$/m); + assert.match(corePage, /<\/a>/); + assert.match(corePage, /data-scalar-reference/); + assert.match( + corePage, + /data-contract-url="\/standards\/registries\/api-reference\/record-retrieve\.json"/, + ); + assert.match(corePage, /data-script-url="\/standards\/registries\/api-reference\/scalar[^"']*\.js"/); + assert.doesNotMatch(corePage, /Normative source prose/); + assert.doesNotMatch(corePage, / file.endsWith('.html')), false); + await assert.rejects(access(path.join(siteRoot, 'public/api-reference/record-retrieve.html'))); + for (const [relative, bytes] of before) { + assert.equal( + (await readFile(path.join(sourceRoot, relative))).compare(bytes), + 0, + `${relative} changed during framework generation`, + ); + } +}); diff --git a/tests/check-built.test.mjs b/tests/check-built.test.mjs index 1e15c61..e5dcdcf 100644 --- a/tests/check-built.test.mjs +++ b/tests/check-built.test.mjs @@ -1,4 +1,5 @@ import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; import { mkdir, mkdtemp, readFile, rm, symlink, writeFile } from 'node:fs/promises'; import { tmpdir } from 'node:os'; import path from 'node:path'; @@ -90,6 +91,40 @@ test('checks declared pages, anchors, support output, base paths, and Pagefind', assert.equal(result.links, 4); }); +test('API reference verification requires a native host, closed metadata and the exact bundled contract', async (t) => { + const options = await builtFixture(t, { base: '/building-block/' }); + const contract = '{"openapi":"3.1.2"}\n'; + const reference = { + route: 'chapter', role: 'normative', contractUrl: '/building-block/api-reference/sample.json', + scriptUrl: '/building-block/api-reference/scalar.js', + bundleSha256: createHash('sha256').update(contract).digest('hex'), + }; + options.manifest.apiReferences = [reference]; + options.manifest.supportFiles.push('api-reference/sample.json', 'api-reference/scalar.js'); + await write(options.distDir, 'api-reference/sample.json', contract); + await write(options.distDir, 'api-reference/scalar.js', '// fixture Scalar'); + const file = path.join(options.distDir, 'chapter/index.html'); + const original = await readFile(file, 'utf8'); + const markup = `
`; + const page = original.replace('', `${markup}`); + await writeFile(file, page); + assert.deepEqual((await checkBuilt(options)).errors, []); + for (const [label, changed, expected] of [ + ['missing host', original, /native Scalar host/i], + ['wrong contract', page.replace('data-contract-url="/building-block/', 'data-contract-url="/wrong/'), /contract URL/i], + ['expanded metadata', page.replace('
{ + await writeFile(file, changed); + assert.match((await checkBuilt(options)).errors.join('\n'), expected); + }); + } + await writeFile(file, page); + await write(options.distDir, 'api-reference/sample.json', '{"changed":true}'); + assert.match((await checkBuilt(options)).errors.join('\n'), /bundle.*digest|digest.*bundle/i); +}); + test('rejects hidden operational files even when the support manifest declares them', async (t) => { const options = await builtFixture(t); await write(options.distDir, 'examples/.env', 'INERT_FIXTURE=example'); diff --git a/tests/framework.test.mjs b/tests/framework.test.mjs index 76108bb..deab765 100644 --- a/tests/framework.test.mjs +++ b/tests/framework.test.mjs @@ -5,6 +5,7 @@ import os from 'node:os'; import path from 'node:path'; import { promisify } from 'node:util'; import test from 'node:test'; +import YAML from 'yaml'; import { generateSite, routeFor } from '../adapters/framework.mjs'; import { isPublishableSupportPath } from '../scripts/support-paths.mjs'; @@ -161,6 +162,8 @@ test('routeFor creates Starlight routes for home, nested READMEs, and ordinary p assert.equal(routeFor('resources/README.md'), 'resources'); assert.equal(routeFor('requirements/service.md'), 'requirements/service'); assert.equal(routeFor('resources/migration-from-3.0.md'), 'resources/migration-from-30'); + assert.equal(routeFor('api/examples/publicschema/PROVENANCE.md'), 'api/examples/publicschema/provenance'); + assert.equal(routeFor('resources/API Guide.md'), 'resources/api-guide'); }); test('support path policy allows public compatibility paths and rejects hidden config', () => { @@ -440,7 +443,7 @@ test('generator rejects a referenced directory symlink to hidden operational con ); }); -test('canonical source integration renders all 39 requirements without changing source state', async (t) => { +test('canonical source integration renders its requirements without changing source state', async (t) => { if (!canonicalSourceRoot) return t.skip('GOVSTACK_FRAMEWORK_SOURCE_ROOT is not set'); const siteRoot = await mkdtemp(path.join(os.tmpdir(), 'registries-canonical-site-')); const [beforeRevision, beforeStatus] = await Promise.all([ @@ -457,8 +460,18 @@ test('canonical source integration renders all 39 requirements without changing const manifest = await generateSite({ sourceRoot: canonicalSourceRoot, siteRoot, base: '/' }); - assert.equal(manifest.requirementCount, 39); - assert.equal(manifest.pages.length, 34); + const sourceRows = await Promise.all(manifest.pages.map(async (page) => { + const source = await readFile(path.join(canonicalSourceRoot, page.source), 'utf8'); + const frontmatter = /^---\r?\n([\s\S]*?)\r?\n---/.exec(source); + return frontmatter ? YAML.parse(frontmatter[1])?.requirements ?? [] : []; + })); + const expectedRequirements = sourceRows.reduce((total, rows) => total + rows.length, 0); + assert.ok(expectedRequirements > 0); + assert.equal(manifest.requirementCount, expectedRequirements); + const toc = YAML.parse(await readFile(path.join(canonicalSourceRoot, 'toc.yml'), 'utf8')).toc; + for (const [section, entries] of Object.entries(toc)) { + for (const entry of entries) assert.ok(manifest.pages.some((page) => page.source === `${section}/${entry}`)); + } assert.equal(manifest.sourceRevision, beforeRevision.stdout.trim()); assert.equal(manifest.sourceDirty, beforeStatus.stdout.trim() !== ''); assert.equal(manifest.pages.some((page) => page.route === 'requirements/registry-services'), true); @@ -466,9 +479,12 @@ test('canonical source integration renders all 39 requirements without changing path.join(siteRoot, 'src/content/docs/requirements/registry-services.md'), 'utf8', ); - assert.equal((requirements.match(/
Unnumbered draft/g) ?? []).length, 35); + const servicesSource = await readFile(path.join(canonicalSourceRoot, 'requirements/registry-services.md'), 'utf8'); + const servicesRows = YAML.parse(/^---\r?\n([\s\S]*?)\r?\n---/.exec(servicesSource)[1]).requirements; + const unnumbered = servicesRows.filter((row) => row.id == null || row.id === '').length; + assert.equal((requirements.match(/
Unnumbered draft/g) ?? []).length, unnumbered); assert.match(requirements, /Any of/); assert.match(requirements, /Minimum selections/);