feat(genesis): extract GnDocsCallout admonition primitive#593
Draft
johnleider wants to merge 2 commits into
Draft
feat(genesis): extract GnDocsCallout admonition primitive#593johnleider wants to merge 2 commits into
johnleider wants to merge 2 commits into
Conversation
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.
Contributor
|
✅ Changeset found — this change will be included in the next release. Thanks! |
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.
Description
The first item on the genesis docs-primitives Phase 2 roadmap: extract the callout admonition into a reusable
@paper/genesiscomponent.GnDocsCalloutis 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/docsDocsCalloutnow delegates the five standard types toGnDocsCallout, injectingAppIconinto theiconslot 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-10iscolor-mix(in srgb, var(--v0-success), transparent 90%)— the same mathGnDocsCalloutuses.Verification
pnpm --filter @paper/genesis typecheck— cleanvue-tscoverapps/docs— 0 errorsGnDocsCalloutwith 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.