docs(readme): align API blocks to <details> pattern with Types group#7
Merged
Conversation
Reshape the API section to match the Coroboros canonical per-method block format (uri-style). SparklineOptions, SparklineError, and SparklineErrorCode now live in a `### Types` group as `<details><summary><code>Name</code></summary>` blocks. The per-option table moves into SparklineOptions; the `sparkline()` block carries only `values` and `options?` referencing the type. The `sparkline(values, options?)` function moves to `<details><summary><code>...</code></summary>`. Summary carries the signature only — Returns / Throws / Examples / Notes sit below the parameter table. The Notes block links to `bench/baseline.md` for SVG-render timings. Other tweaks: - `### Examples` renamed `### Gallery` (the rendered SVG embeds are visual references; code examples live inside the function `<details>`). - `### Errors` keeps the codes table only; the SparklineError class documentation moves into Types. Pure docs. No source change; SparklineOptions and SparklineError are already exported from src/index.ts.
Aligns sparkline with uri / clone / location-timezone on pnpm 11.1.3. The pnpm 10.33.0 pin originated alongside the OIDC-blocked exception documented in OPTIM_PLAYBOOK, but the OIDC binding break is independent of the pnpm version — the token-bootstrap CI shape stays as-is, and the reusable workflow's token branch already uses npm CLI for publish (coroboros/ci#19) so pnpm 11.x auto-OIDC behavior on publish is moot. Unblocks CI: the new `package-lock=false` line in coroboros/ci's recommended NPM_CONFIG_FILE (2026-05-20) is interpreted by pnpm 10 as "disable pnpm-lock.yaml entirely", colliding with the workflow's `pnpm install --frozen-lockfile`. pnpm 11 scopes that line to npm's lockfile only, so install works as expected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Align the API section with the Coroboros canonical per-method block format (uri-style):
### Typesgroup leads## API.SparklineOptions,SparklineError,SparklineErrorCodeeach get a<details><summary><code>Name</code></summary>block. The per-option table moves intoSparklineOptions; thesparkline()block carries onlyvaluesandoptions?referencing the type.sparkline(values, options?)moves to<details>. Signature in<summary>(no types) — Parameters / Returns / Throws / Notes / Examples sit below. Notes linksbench/baseline.mdfor SVG-render timings.### Examplesrenamed### Gallery(those are rendered SVG embeds; code examples live inside the function<details>).### Errorskeeps only the codes table — theSparklineErrorclass doc moves to Types.Pure docs. No source, no behavior change.
SparklineOptionsandSparklineErrorwere already exported fromsrc/index.ts.Part of a Coroboros-wide doc alignment so
uri/clone/sparkline/location-timezoneuse the same per-method block shape.Test plan
[SparklineOptions](#types),[SparklineError](#types),[sparkline](#api),[Errors](#errors)all navigate.<details>blocks fold and unfold on the GitHub renderer and the npm page.bench/baseline.mdrelative link renders correctly.