Skip to content

docs(readme): align API blocks to <details> pattern with Types group#7

Merged
ob-aion merged 2 commits into
mainfrom
docs/api-format-alignment
May 20, 2026
Merged

docs(readme): align API blocks to <details> pattern with Types group#7
ob-aion merged 2 commits into
mainfrom
docs/api-format-alignment

Conversation

@ob-aion

@ob-aion ob-aion commented May 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Align the API section with the Coroboros canonical per-method block format (uri-style):

  • New ### Types group leads ## API. SparklineOptions, SparklineError, SparklineErrorCode each get a <details><summary><code>Name</code></summary> block. The per-option table moves into SparklineOptions; the sparkline() block carries only values and options? referencing the type.
  • sparkline(values, options?) moves to <details>. Signature in <summary> (no types) — Parameters / Returns / Throws / Notes / Examples sit below. Notes links bench/baseline.md for SVG-render timings.
  • ### Examples renamed ### Gallery (those are rendered SVG embeds; code examples live inside the function <details>).
  • ### Errors keeps only the codes table — the SparklineError class doc moves to Types.

Pure docs. No source, no behavior change. SparklineOptions and SparklineError were already exported from src/index.ts.

Part of a Coroboros-wide doc alignment so uri / clone / sparkline / location-timezone use the same per-method block shape.

Test plan

  • CI preflight green.
  • README anchors still resolve — [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.md relative link renders correctly.

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.

@ob-aion ob-aion left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

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.
@ob-aion ob-aion merged commit 17ef736 into main May 20, 2026
5 checks passed
@ob-aion ob-aion deleted the docs/api-format-alignment branch May 20, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant