Skip to content

feat(genesis): extract GnDocsCallout admonition primitive - #593

Draft
johnleider wants to merge 2 commits into
devfrom
worktree-genesis-callout
Draft

feat(genesis): extract GnDocsCallout admonition primitive#593
johnleider wants to merge 2 commits into
devfrom
worktree-genesis-callout

Conversation

@johnleider

@johnleider johnleider commented Jul 15, 2026

Copy link
Copy Markdown
Member

Description

The first item on the genesis docs-primitives Phase 2 roadmap: extract the callout admonition into a reusable @paper/genesis component.

GnDocsCallout is a headless admonition shell for the five standard types — tip / note / warning / caution / important. It consumes v0 severity tokens (--v0-success / --v0-info / --v0-warning / --v0-error / --v0-accent) via the cascade with standalone hex fallbacks, matching the genesis theme-inheritance convention (no genesis token namespace). Icon and title are slot-overridable, each with an inline-SVG / label default so zero-config works.

Consumer wiring

apps/docs DocsCallout now delegates the five standard types to GnDocsCallout, injecting AppIcon into the icon slot to preserve the exact docs appearance. The docs-only interactive types (askai / discord / tour) and the random-tip pool stay local — per the genesis non-goals, "Ask / open-in actions are a docs-site concern."

Scope boundary

The extractable core is the presentational shell; the interactive behaviors (routing, ask AI, tip pool) remain in the docs app. Colors are provably identical to the previous UnoCSS classes: uno maps success → var(--v0-success) and the old .bg-success-10 is color-mix(in srgb, var(--v0-success), transparent 90%) — the same math GnDocsCallout uses.

Verification

  • pnpm --filter @paper/genesis typecheck — clean
  • vue-tsc over apps/docs — 0 errors
  • In-browser (docs dev server): all 5 types render via GnDocsCallout with correct per-type severity colors, icons, and titles; 0 legacy callout elements remain; interactive Ask AI / tour types still render correctly through the retained local branch.

Adds the docs-primitives Phase 2 #1: a headless admonition shell
(tip/note/warning/caution/important) that consumes v0 severity tokens
via the cascade with standalone fallbacks, following the genesis
theme-inheritance convention. Icon and title are slot-overridable with
inline-SVG defaults.

Wires the first consumer: apps/docs DocsCallout now delegates the five
standard types to GnDocsCallout, injecting AppIcon into the icon slot.
The docs-only interactive types (askai/discord/tour) and the random-tip
pool stay local, per the genesis non-goals.
@johnleider johnleider added this to the v1.1.0 milestone Jul 15, 2026
@johnleider johnleider added paper Paper layer (unstyled component bridge) T: feature labels Jul 15, 2026
@johnleider johnleider self-assigned this Jul 15, 2026
@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Changeset found — this change will be included in the next release. Thanks!

@johnleider
johnleider changed the base branch from master to dev July 23, 2026 14:18
johnleider added a commit that referenced this pull request Jul 28, 2026
Follow-up corrections to the contract text:

- DESIGN_SYSTEMS.md no longer claims Genesis "declares no class" — the SPEC
  now declares `Class: kit`. The `<style scoped>` deviation note is accurate
  (9 of 10 components) and is kept.
- Document `--v0-on-background` in the consumed-token table. It is the only
  bare `var()` in Genesis (GnDotGrid's `color` default), so an unaliased host
  renders no grid at all; the Token bridge list now names it too.
- Rewrap the GnActionButton paragraph — the previous wrap put `+ Button.Icon`
  at line start, which CommonMark parses as a bullet marker and split the
  sentence into a stray list item.
- Add GnDocsExample's `toggle-icon` slot to the icon-strategy table.
- #593 and #463 are open against packages/genesis, not apps/docs.
- Qualify "no Genesis-specific stylesheet" as no *theme* stylesheet; the build
  still emits dist/style.css for published consumers.
johnleider added a commit that referenced this pull request Jul 30, 2026
* docs(genesis): lock Emerald docs path decisions into SPEC

Sync Genesis SPEC with the shipped surface (theme override, playground/bin
toolbar hooks, GnActionButton/GnDotGrid/GnPeek), mark Phase 2 items as
rewrites-not-extractions with a no-virtual:* acceptance rule, add Phase 3
DS-specific docs primitives, and record the kit interop token bridge in
DESIGN_SYSTEMS.md so Emerald (and later DSs) publish --v0-* aliases for
Genesis chrome.

* docs(genesis): correct token, slot and issue-reference drift in SPEC

Follow-up corrections to the contract text:

- DESIGN_SYSTEMS.md no longer claims Genesis "declares no class" — the SPEC
  now declares `Class: kit`. The `<style scoped>` deviation note is accurate
  (9 of 10 components) and is kept.
- Document `--v0-on-background` in the consumed-token table. It is the only
  bare `var()` in Genesis (GnDotGrid's `color` default), so an unaliased host
  renders no grid at all; the Token bridge list now names it too.
- Rewrap the GnActionButton paragraph — the previous wrap put `+ Button.Icon`
  at line start, which CommonMark parses as a bullet marker and split the
  sentence into a stray list item.
- Add GnDocsExample's `toggle-icon` slot to the icon-strategy table.
- #593 and #463 are open against packages/genesis, not apps/docs.
- Qualify "no Genesis-specific stylesheet" as no *theme* stylesheet; the build
  still emits dist/style.css for published consumers.
@johnleider johnleider removed this from the v1.1.0 milestone Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

paper Paper layer (unstyled component bridge) T: feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant