Format {@link} tags with monospace display text
Add explicit backtick-wrapped display text to all `{@link}` tags for
monospace rendering in TypeDoc output. This improves readability by:
- Using monospace font for code references (types, methods, functions)
- Stripping module prefixes from display text (e.g., `app!App.connect`
displays as `App.connect`)
Updated files across the SDK including `App`, `AppBridge`,
`PostMessageTransport`, React hooks, server helpers, types, and
documentation.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
43c30a7665
commit
9dd995562a
1 changed files with 217 additions and 217 deletions
|
|
@ -12,8 +12,8 @@ import { McpUiStyles, McpUiTheme } from "./types";
|
|||
* @example Check current theme
|
||||
* {@includeCode ./styles.examples.ts#getDocumentTheme_checkCurrent}
|
||||
*
|
||||
* @see {@link applyDocumentTheme} to set the theme
|
||||
* @see {@link McpUiTheme} for the theme type
|
||||
* @see {@link applyDocumentTheme `applyDocumentTheme`} to set the theme
|
||||
* @see {@link McpUiTheme `McpUiTheme`} for the theme type
|
||||
*/
|
||||
export function getDocumentTheme(): McpUiTheme {
|
||||
const theme = document.documentElement.getAttribute("data-theme");
|
||||
|
|
@ -51,8 +51,8 @@ export function getDocumentTheme(): McpUiTheme {
|
|||
* }
|
||||
* ```
|
||||
*
|
||||
* @see {@link getDocumentTheme} to read the current theme
|
||||
* @see {@link McpUiTheme} for the theme type
|
||||
* @see {@link getDocumentTheme `getDocumentTheme`} to read the current theme
|
||||
* @see {@link McpUiTheme `McpUiTheme`} for the theme type
|
||||
*/
|
||||
export function applyDocumentTheme(theme: McpUiTheme): void {
|
||||
const root = document.documentElement;
|
||||
|
|
@ -63,7 +63,7 @@ export function applyDocumentTheme(theme: McpUiTheme): void {
|
|||
/**
|
||||
* Apply host style variables as CSS custom properties on an element.
|
||||
*
|
||||
* This function takes the `variables` object from {@link McpUiHostContext.styles} and sets
|
||||
* This function takes the `variables` object from {@link McpUiHostContext.styles `McpUiHostContext.styles`} and sets
|
||||
* each CSS variable on the specified root element (defaults to `document.documentElement`).
|
||||
* This allows apps to use the host's theming values via CSS variables like
|
||||
* `var(--color-background-primary)`.
|
||||
|
|
@ -90,8 +90,8 @@ export function applyDocumentTheme(theme: McpUiTheme): void {
|
|||
* }
|
||||
* ```
|
||||
*
|
||||
* @see {@link McpUiStyles} for the available CSS variables
|
||||
* @see {@link McpUiHostContext} for the full host context structure
|
||||
* @see {@link McpUiStyles `McpUiStyles`} for the available CSS variables
|
||||
* @see {@link McpUiHostContext `McpUiHostContext`} for the full host context structure
|
||||
*/
|
||||
export function applyHostStyleVariables(
|
||||
styles: McpUiStyles,
|
||||
|
|
@ -133,7 +133,7 @@ export function applyHostStyleVariables(
|
|||
* }
|
||||
* ```
|
||||
*
|
||||
* @see {@link McpUiHostContext} for the full host context structure
|
||||
* @see {@link McpUiHostContext `McpUiHostContext`} for the full host context structure
|
||||
*/
|
||||
export function applyHostFonts(fontCss: string): void {
|
||||
const styleId = "__mcp-host-fonts";
|
||||
|
|
|
|||
Loading…
Reference in a new issue