feat(prose): configurable heading anchors and copy button (f419731)#287
Merged
Conversation
Syncs upstream nuxt/ui commit f419731 (#6735). - prose/H1-H4.vue: add `anchor?: boolean` prop taking precedence over the deprecated `mdc.headings.anchorLinks` config fallback. - prose/Pre.vue: add `copy?: boolean | Omit<ButtonProps, LinkPropsKeys>` prop (default true); gate the copy button behind v-if and allow customization via v-bind. Renamed the useClipboard `copy` binding to `copyToClipboard` to avoid a dupe-key collision with the new prop. - types/theme.ts: add a `prose` namespace to ThemeDefaults so <Theme :props> can set per-element prose defaults (dropped upstream's codeTree — absent). - useComponentProps.spec.ts: drop `prose` from NonProxyComponents to keep the drift catcher balanced. - docs: document the anchor prop (headers-and-text.md, with a B24Theme example) and the copy prop (code.md). - Chat.vue N/A (b24ui has no Chat component). Backward-compatible defaults → no snapshot churn. Suite: 5557 passed / 6 skipped. Ledger: cursor -> f419731; previous entry f546b2c reconciled to PR #286. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JS8ypVfQSFzYVZzkTHhURb
IgorShevchik
added a commit
that referenced
this pull request
Jul 20, 2026
Syncs upstream nuxt/ui commit ada1580 (chore(release): v4.10.0). Pure release commit — bumps package.json 4.9.0->4.10.0 and regenerates CHANGELOG.md, with no source/component/theme changes. NOT APPLICABLE: b24ui is an independently-versioned fork (currently 2.9.0) with its own CHANGELOG. No-op — cursor advanced only. Ledger: cursor -> ada1580; previous entry f419731 reconciled to PR #287. Claude-Session: https://claude.ai/code/session_01JS8ypVfQSFzYVZzkTHhURb Co-authored-by: Shevchik Igor <noreply@anthropic.com>
IgorShevchik
added a commit
that referenced
this pull request
Jul 20, 2026
Syncs upstream nuxt/ui commit e931bdf. Docs-content refinement of headers-and-text.md (on top of b24ui's post-#287 state): - hash-icon copy "H2 and H3" -> "H2, H3 and H4" - consolidate the two ::note blocks (anchor-links + toc config) into one merged note whose nuxt.config.ts example combines renderer.anchorLinks and build.markdown.toc, linking both generation docs. Docs-content only. Suite: 5565 passed / 6 skipped. Ledger: cursor -> e931bdf; previous entry 2a172ef reconciled to PR #291. Claude-Session: https://claude.ai/code/session_01JS8ypVfQSFzYVZzkTHhURb Co-authored-by: Shevchik Igor <noreply@anthropic.com>
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.
Syncs upstream nuxt/ui commit
f419731— feat(prose): configurable heading anchors and copy button (#6735).b24ui port
prose/H1.vue–H4.vue— addanchor?: booleanand rewritegeneratetoprops.id && (props.anchor ?? (typeof anchorLinks === 'boolean' ? anchorLinks : anchorLinks?.hN) ?? false), giving the prop precedence over the now-deprecatedmdc.headings.anchorLinksfallback.prose/Pre.vue— addcopy?: boolean | Omit<ButtonProps, LinkPropsKeys>(defaulttrue); gate the copyB24Buttonbehindv-if="props.copy"withv-bindcustomization. Renamed theuseClipboardcopybinding tocopyToClipboardto avoid avue/no-dupe-keyscollision with the new prop.types/theme.ts— add aprosenamespace toThemeDefaultsso<Theme :props>can set per-element prose defaults. Dropped upstream'scodeTreeentry (b24ui has no CodeTree).useComponentProps.spec.ts— removeprosefromNonProxyComponents, keeping the type-level drift catcher balanced (prosenow lives in bothExpectedandThemeDefaults).headers-and-text.mddocuments theanchorprop with aB24Theme :propsexample;code.mddocuments thecopyprop.Chat.vue— N/A (b24ui has no Chat component, so the upstream Theme-based anchor-disable hunk is skipped).Tests
Prop additions with backward-compatible defaults (anchor resolves to the same off-state in the test env; copy defaults
true→ button still renders) → no snapshot churn. TheuseComponentPropsdrift catcher stays green. Suite 5557 passed / 6 skipped.Verify (
CI=true)dev:prepare·lint·typecheck·test·build— all green.Ledger: cursor advanced to
f419731; previous entryf546b2creconciled to PR #286.🤖 Generated with Claude Code
Generated by Claude Code