An open source design system that's fully customizable and agent ready
TypeScript
docs(deslop): batch 0 - replace em dashes with grammatical punctuation (#2652)
Joey486049ebd999
diff --git a/packages/cli/README.md b/packages/cli/README.mdindex f59e8c47d2..6b8b993001 100644--- a/packages/cli/README.md+++ b/packages/cli/README.md@@ -1,6 +1,6 @@# @xds/cli-The CLI is the primary interface for working with the design system — for humans and machines alike. It provides component documentation, design tokens, page templates, theming tools, and upgrade codemods, all accessible via terminal commands, a typed JSON API, or programmatic imports. AI agents and build tools use the same API that powers the CLI, enabling end-to-end frontend development loops.+The CLI is the primary interface for working with the design system, for humans and machines alike. It provides component documentation, design tokens, page templates, theming tools, and upgrade codemods, all accessible via terminal commands, a typed JSON API, or programmatic imports. AI agents and build tools use the same API that powers the CLI, enabling end-to-end frontend development loops.```bashnpx xds --help@@ -11,7 +11,7 @@ npx xds docs migrationnpx xds template --list```-### Finding things — `xds search`+### Finding things: `xds search`When you don't know whether what you need is a component, a hook, a docs topic,or a template, search across all of them at once. Results are ranked by@@ -43,16 +43,16 @@ Results for "button" (20):Options:-- `--type <component|hook|doc|template>` — restrict to a single domain-- `--limit <n>` — cap the number of results (default 20)-- `--detail` — include the import path and the match reason/score-- `--json` — typed `{ type: 'search', data: { query, results } }` envelope+- `--type <component|hook|doc|template>`: restrict to a single domain+- `--limit <n>`: cap the number of results (default 20)+- `--detail`: include the import path and the match reason/score+- `--json`: typed `{ type: 'search', data: { query, results } }` envelope## Commands| Command | Description || ------------- | --------------------------------------------------------------------------------------- |-| `init` | Initialize the design system in your project — installs packages, sets up theming, adds AI agent docs |+| `init` | Initialize the design system in your project: installs packages, sets up theming, adds AI agent docs || `component` | List components or print detailed docs, props, usage examples, and source || `search` | Find components, hooks, docs, and templates in one ranked, cross-domain result set || `docs` | Print reference documentation (tokens, theme, color, typography, spacing, etc.) |@@ -69,11 +69,11 @@ Options:These flags work with any command:-- `--json` — Output as typed JSON envelope: `{ type, data }` (errors: `{ error, code, suggestions? }`)-- `--detail <level>` — Detail level for list views, increasing in size: `brief` (names only, default for `--list`) < `compact` (names + 1-line descriptions) < `full` (full docs per entry). Single-item views default to `full`.-- `--zh` — Output docs in Chinese Simplified-- `--dense` — Compressed format (token-efficient, useful for AI agents)-- `--lang <locale>` — Language/format shorthand (`en`, `zh`, `dense`)+- `--json`: Output as typed JSON envelope: `{ type, data }` (errors: `{ error, code, suggestions? }`)+- `--detail <level>`: Detail level for list views, increasing in size: `brief` (names only, default for `--list`) < `compact` (names + 1-line descriptions) < `full` (full docs per entry). Single-item views default to `full`.+- `--zh`: Output docs in Chinese Simplified+- `--dense`: Compressed format (token-efficient, useful for AI agents)+- `--lang <locale>`: Language/format shorthand (`en`, `zh`, `dense`)## JSON API@@ -93,7 +93,7 @@ Errors:}```-The `code` field is a **stable, machine-readable identifier**. Branch on it —+The `code` field is a **stable, machine-readable identifier**. Branch on it,never on the human-readable `error` string, which changes freely as we improvewording. Every error envelope carries a `code` (falling back to `ERR_UNKNOWN`when no more specific code applies). The same `code` is exposed on thrown@@ -166,7 +166,7 @@ if (isError(result)) {## Capability manifest (agent discovery)Agents don't have to scrape `--help` to learn the CLI. A single call returns a-**self-describing manifest** — every command, its arguments, flags (with types,+**self-describing manifest**: every command, its arguments, flags (with types,choices, and defaults), whether it supports `--json`, and the response `type`discriminators each command can emit. Think of it as an OpenAPI spec for the CLI.@@ -210,7 +210,7 @@ Shape:The manifest is **derived from Commander metadata** (commands, arguments, options)so it can't drift from the real command definitions. The two facts Commander-doesn't track — `--json` support and emitted response types — are layered on from+doesn't track (`--json` support and emitted response types) are layered on fromthe `JSON_SUPPORTED` allowlist and a small declarative `RESPONSE_TYPES` map in`src/lib/manifest.mjs`, guarded by a drift test (`manifest.test.mjs`) so adding acommand without describing it fails CI.@@ -254,7 +254,7 @@ try {}```-The CLI command handlers are thin wrappers around these functions — they parse args, call the API, then format the output (JSON or text). This guarantees that `@xds/cli/api` and `xds --json` always return identical data.+The CLI command handlers are thin wrappers around these functions: they parse args, call the API, then format the output (JSON or text). This guarantees that `@xds/cli/api` and `xds --json` always return identical data.### Consumer utilities@@ -326,8 +326,8 @@ Every response has a `type` string that uniquely identifies it:`xds doctor` runs a series of health checks against your project andenvironment and reports `PASS` / `WARN` / `FAIL` for each, with an actionable-fix for anything that isn't passing. It's read-only — it never installs or-mutates anything — so it's safe to run anywhere, including CI.+fix for anything that isn't passing. It's read-only; it never installs or+mutates anything, so it's safe to run anywhere, including CI.```$ xds doctordiff --git a/packages/cli/docs/color.doc.mjs b/packages/cli/docs/color.doc.mjsindex 812c78974c..345e1f7050 100644--- a/packages/cli/docs/color.doc.mjs+++ b/packages/cli/docs/color.doc.mjs@@ -17,7 +17,7 @@ export const docs = {content: [{type: 'prose',- text: 'Colors are semantic — tokens describe purpose, not appearance. Every color adapts automatically between light and dark modes via CSS light-dark(). Themes override the resolved values, so your code never references raw hex colors.',+ text: 'Colors are semantic: tokens describe purpose, not appearance. Every color adapts automatically between light and dark modes via CSS light-dark(). Themes override the resolved values, so your code never references raw hex colors.',},],},@@ -77,7 +77,7 @@ const styles = stylex.create({type: 'list',style: 'dont',items: [- "Hardcode hex values — they won't adapt to dark mode or custom themes.",+ "Hardcode hex values, since they won't adapt to dark mode or custom themes.",'Mix accent colors with status colors in the same context.','Use --color-on-accent on non-accent backgrounds.',],diff --git a/packages/cli/docs/elevation.doc.mjs b/packages/cli/docs/elevation.doc.mjsindex eb5afc2c2d..7166220d7b 100644--- a/packages/cli/docs/elevation.doc.mjs+++ b/packages/cli/docs/elevation.doc.mjs@@ -69,7 +69,7 @@ const styles = stylex.create({style: 'do',items: ['Match elevation to interaction context: low for tooltips, med for dropdowns, high for dialogs.',- 'Use inset shadows for input focus/selection states — they compose better than outlines.',+ 'Use inset shadows for input focus/selection states; they compose better than outlines.',],},{@@ -77,7 +77,7 @@ const styles = stylex.create({style: 'dont',items: ['Stack multiple elevation levels on the same element.',- 'Use elevation shadows for decorative borders — use --color-border tokens instead.',+ 'Use elevation shadows for decorative borders. Use --color-border tokens instead.',],},],diff --git a/packages/cli/docs/icons.doc.mjs b/packages/cli/docs/icons.doc.mjsindex 9488d7a0e3..e5022a154f 100644--- a/packages/cli/docs/icons.doc.mjs+++ b/packages/cli/docs/icons.doc.mjs@@ -1,7 +1,7 @@// Copyright (c) Meta Platforms, Inc. and affiliates./**- * @file Icons reference doc — semantic icon names available in XDS+ * @file Icons reference doc: semantic icon names available in XDS*//** @type {import('../../core/src/docs-types').ReferenceDoc} */@@ -19,7 +19,7 @@ export const docs = {content: [{type: 'prose',- text: 'Components that accept an icon prop use XDSIconType \u2014 either a semantic name string or a direct SVG component. The semantic names below are resolved through the global icon registry.',+ text: 'Components that accept an icon prop use XDSIconType: either a semantic name string or a direct SVG component. The semantic names below are resolved through the global icon registry.',},{type: 'table',@@ -61,7 +61,7 @@ export const docs = {content: [{type: 'prose',- text: 'For icons not in the semantic list, pass an SVG component directly. Any ComponentType<SVGProps<SVGSVGElement>> works \u2014 XDSIcon applies size and color styling automatically.',+ text: 'For icons not in the semantic list, pass an SVG component directly. Any ComponentType<SVGProps<SVGSVGElement>> works; XDSIcon applies size and color styling automatically.',},{type: 'code',diff --git a/packages/cli/docs/illustrations.doc.mjs b/packages/cli/docs/illustrations.doc.mjsindex 569001e211..dc507065dd 100644--- a/packages/cli/docs/illustrations.doc.mjs+++ b/packages/cli/docs/illustrations.doc.mjs@@ -39,7 +39,7 @@ export const docs = {items: ['Keep illustrations consistent in style across the product.','Use simple, flat illustrations that work in both light and dark mode.',- 'Size illustrations proportionally to the container — typically 120\u2013240px.',+ 'Size illustrations proportionally to the container, typically 120\u2013240px.','Center illustrations with supporting text below.',],},diff --git a/packages/cli/docs/motion.doc.mjs b/packages/cli/docs/motion.doc.mjsindex c386671c4b..8177a6c469 100644--- a/packages/cli/docs/motion.doc.mjs+++ b/packages/cli/docs/motion.doc.mjs@@ -57,7 +57,7 @@ export const docs = {content: [{type: 'prose',- text: 'Some parts of the interface benefit from animation. Panels, dialogs, and collapsible sections are disorienting when they appear instantly — animation gives the eye something to follow. Toasts and notifications need just enough entrance to be noticed without startling. State changes like a switch flipping or a selection highlighting feel more intentional with a brief transition.',+ text: 'Some parts of the interface benefit from animation. Panels, dialogs, and collapsible sections are disorienting when they appear instantly, so animation gives the eye something to follow. Toasts and notifications need just enough entrance to be noticed without startling. State changes like a switch flipping or a selection highlighting feel more intentional with a brief transition.',},{type: 'prose',@@ -71,7 +71,7 @@ export const docs = {content: [{type: 'prose',- text: 'Table row hovers. List item highlights. Anything the user does dozens of times per minute. Adding perceptible duration to these interactions makes the interface feel like it’s catching up to the cursor. Keep these fast enough that the user never notices a delay.',+ text: 'Table row hovers. List item highlights. Anything the user does dozens of times per minute. Adding perceptible duration to these interactions makes the interface feel like it\'s catching up to the cursor. Keep these fast enough that the user never notices a delay.',},{type: 'prose',@@ -87,10 +87,10 @@ export const docs = {type: 'list',style: 'unordered',items: [- 'Not everything needs an animated exit. Elements the user is moving away from — tooltips, hover cards, dropdown menus — can disappear instantly. The user has already shifted their attention. Animate the exit only when it helps orient the user, like a panel closing or a dialog dismissing to reveal what’s underneath.',+ 'Not everything needs an animated exit. Elements the user is moving away from, such as tooltips, hover cards, and dropdown menus, can disappear instantly. The user has already shifted their attention. Animate the exit only when it helps orient the user, like a panel closing or a dialog dismissing to reveal what\'s underneath.','When you do animate exit, match the entrance. A panel that slides in from the right should slide back out to the right.','Direction should match the action. Navigating deeper into content should feel like moving forward. Going back should feel like returning. This keeps the user oriented in the structure of the application.',- 'Contextual UI should feel connected to its trigger. A dropdown should expand from the button that opened it. A popover should appear near the element it describes. This doesn’t apply to global UI like command palettes or toasts, which have their own fixed positions.',+ 'Contextual UI should feel connected to its trigger. A dropdown should expand from the button that opened it. A popover should appear near the element it describes. This doesn\'t apply to global UI like command palettes or toasts, which have their own fixed positions.',],},],@@ -101,7 +101,7 @@ export const docs = {content: [{type: 'prose',- text: 'Some users experience motion sensitivity — animation that feels polished to one person can cause discomfort for another. Components should honor the operating system’s reduced motion setting. When it’s enabled, replace animations with instant state changes.',+ text: 'Some users experience motion sensitivity; animation that feels polished to one person can cause discomfort for another. Components should honor the operating system\'s reduced motion setting. When it\'s enabled, replace animations with instant state changes.',},],},@@ -138,7 +138,7 @@ const styles = stylex.create({type: 'list',style: 'do',items: [- 'Animate transitions that involve spatial change — panels opening, content expanding, elements entering the screen.',+ 'Animate transitions that involve spatial change: panels opening, content expanding, elements entering the screen.','Use fast tokens for small, frequent interactions. Use medium tokens for larger transitions that rearrange the layout.','Honor reduced motion preferences at the OS level.',],@@ -147,9 +147,9 @@ const styles = stylex.create({type: 'list',style: 'dont',items: [- 'Let hover states or high-frequency interactions feel like they’re lagging behind the user.',- 'Let animation delay when a user can interact with new content. The transition should complete before — or not block — the next action.',- 'Move elements in ways that contradict where they came from or where they’re going.',+ 'Let hover states or high-frequency interactions feel like they\'re lagging behind the user.',+ 'Let animation delay when a user can interact with new content. The transition should complete before (or not block) the next action.',+ 'Move elements in ways that contradict where they came from or where they\'re going.',],},],diff --git a/packages/cli/docs/principles.doc.mjs b/packages/cli/docs/principles.doc.mjsindex 9246272141..38b56ec239 100644--- a/packages/cli/docs/principles.doc.mjs+++ b/packages/cli/docs/principles.doc.mjs@@ -22,10 +22,10 @@ export const docs = {type: 'list',style: 'unordered',items: [- 'Components over primitives — use components for everything they cover before reaching for raw HTML',- 'Semantic tokens over hardcoded values — colors, spacing, and radii are named by purpose, not appearance',- 'Theme-agnostic code — your app code never references specific colors or measurements, so themes and dark mode work automatically',- 'Open internals — every primitive is exported and composable, so you can build on top of it without fighting it',+ 'Components over primitives: use components for everything they cover before reaching for raw HTML',+ 'Semantic tokens over hardcoded values: colors, spacing, and radii are named by purpose, not appearance',+ 'Theme-agnostic code: your app code never references specific colors or measurements, so themes and dark mode work automatically',+ 'Open internals: every primitive is exported and composable, so you can build on top of it without fighting it',],},],@@ -39,7 +39,7 @@ export const docs = {style: 'ordered',items: ['Use components for everything they cover',- 'StyleX or Tailwind for custom styling — both are first-class (see \`npx xds docs styling\`)',+ 'StyleX or Tailwind for custom styling; both are first-class (see \`npx xds docs styling\`)','Semantic tokens, not hardcoded values (see \`npx xds docs tokens\`)','CSS custom properties for colors, not hex values','Form inputs are controlled (value + onChange)',@@ -54,7 +54,7 @@ export const docs = {content: [{type: 'prose',- text: 'The design system supports multiple styling approaches. Every component accepts an \`xstyle\` prop for StyleX style overrides via \`stylex.create()\`. For layout and wrapper styling outside of components, use StyleX or Tailwind utilities — both resolve to the same design tokens.',+ text: 'The design system supports multiple styling approaches. Every component accepts an \`xstyle\` prop for StyleX style overrides via \`stylex.create()\`. For layout and wrapper styling outside of components, use StyleX or Tailwind utilities; both resolve to the same design tokens.',},{type: 'prose',diff --git a/packages/cli/docs/shape.doc.mjs b/packages/cli/docs/shape.doc.mjsindex 16fd3c6a31..5d2b841915 100644--- a/packages/cli/docs/shape.doc.mjs+++ b/packages/cli/docs/shape.doc.mjs@@ -7,7 +7,7 @@ export const docs = {title: 'Shape',category: 'foundations',description:- 'Border radius tokens for consistent component rounding — from sharp corners to full pills.',+ 'Border radius tokens for consistent component rounding, from sharp corners to full pills.',tokenCategory: 'radius',sections: [@@ -17,7 +17,7 @@ export const docs = {content: [{type: 'prose',- text: 'The radius scale uses a semantic naming system: inner → element → container → page. Each level is designed for a specific context. Themes can multiply the entire scale via a radius multiplier, with --radius-none and --radius-full as fixed anchors.',+ text: 'The radius scale uses a semantic naming system: inner → element → container → page. Each level fits a specific context. Themes can multiply the entire scale via a radius multiplier, with --radius-none and --radius-full as fixed anchors.',},],},@@ -38,7 +38,7 @@ export const docs = {content: [{type: 'prose',- text: 'When a rounded container has padding, inner elements need a smaller radius to appear concentric. Components like Card handle this automatically — the inner radius is computed as max(0, outerRadius - padding).',+ text: 'When a rounded container has padding, inner elements need a smaller radius to appear concentric. Components like Card handle this automatically; the inner radius is computed as max(0, outerRadius - padding).',},{type: 'code',@@ -66,8 +66,8 @@ export const docs = {type: 'list',style: 'dont',items: [- "Use --radius-page for small elements — it's designed for page-level containers.",- "Hardcode radius values — they won't scale with theme radius multipliers.",+ "Use --radius-page for small elements; it's meant for page-level containers.",+ "Hardcode radius values; they won't scale with theme radius multipliers.",],},],diff --git a/packages/cli/docs/spacing.doc.mjs b/packages/cli/docs/spacing.doc.mjsindex aebbee2265..2a021bef2d 100644--- a/packages/cli/docs/spacing.doc.mjs+++ b/packages/cli/docs/spacing.doc.mjs@@ -7,7 +7,7 @@ export const docs = {title: 'Spacing',category: 'foundations',description:- 'Spacing scale tokens for padding, gap, and margin — the rhythmic foundation of design system layouts.',+ 'Spacing scale tokens for padding, gap, and margin: the rhythmic foundation of design system layouts.',tokenCategory: 'spacing',sections: [@@ -67,7 +67,7 @@ const styles = stylex.create({type: 'list',style: 'do',items: [- 'Use component gap props when available — they handle automatic spacing compensation.',+ 'Use component gap props when available; they handle automatic spacing compensation.',"Stick to the scale for consistency. If a value isn't on the scale, reconsider the design.",'Use smaller steps (0.5–2) for tight internal spacing and larger steps (4–8) for section gaps.',],diff --git a/packages/cli/docs/styling.doc.mjs b/packages/cli/docs/styling.doc.mjsindex d22c2cfbeb..a1359d90cd 100644--- a/packages/cli/docs/styling.doc.mjs+++ b/packages/cli/docs/styling.doc.mjs@@ -40,7 +40,7 @@ export const docs = {content: [{type: 'prose',- text: 'Every component accepts an xstyle prop for style customization. It accepts StyleX styles created via stylex.create() — not inline objects, not class name strings. StyleX styles are compiled at build time for optimal deduplication and dead-code elimination.',+ text: 'Every component accepts an xstyle prop for style customization. It accepts StyleX styles created via stylex.create(), not inline objects or class name strings. StyleX styles are compiled at build time for optimal deduplication and dead-code elimination.',},{type: 'code',@@ -91,12 +91,12 @@ const overrides = stylex.create({content: [{type: 'prose',- text: 'The design system ships a Tailwind v4 theme bridge that maps all design tokens to Tailwind utility classes. Import it once and use Tailwind classes backed by design tokens — colors, spacing, radius, shadows, and typography all resolve to the active theme.',+ text: 'The design system ships a Tailwind v4 theme bridge that maps all design tokens to Tailwind utility classes. Import it once and use Tailwind classes backed by design tokens: colors, spacing, radius, shadows, and typography all resolve to the active theme.',},{type: 'code',lang: 'css',- label: 'globals.css — import the bridge',+ label: 'globals.css: import the bridge',code: `@import "tailwindcss";@import "@xds/core/tailwind-theme.css" layer(theme);`,},@@ -134,7 +134,7 @@ const overrides = stylex.create({},{type: 'prose',- text: 'For layout and wrapper styling, Tailwind utilities on className work well. For component-specific overrides (padding, colors, borders), prefer xstyle — it integrates with StyleX deduplication and the component\'s internal style pipeline.',+ text: 'For layout and wrapper styling, Tailwind utilities on className work well. For component-specific overrides (padding, colors, borders), prefer xstyle; it integrates with StyleX deduplication and the component\'s internal style pipeline.',},],},@@ -168,7 +168,7 @@ const overrides = stylex.create({},{type: 'prose',- text: 'A few HTML attributes are intentionally omitted from the base type (contentEditable, dangerouslySetInnerHTML). children is not in the base type either — components that accept children declare it explicitly, so slot-based components don\'t silently drop JSX children.',+ text: 'A few HTML attributes are intentionally omitted from the base type (contentEditable, dangerouslySetInnerHTML). children is not in the base type either; components that accept children declare it explicitly, so slot-based components don\'t silently drop JSX children.',},],},@@ -178,7 +178,7 @@ const overrides = stylex.create({content: [{type: 'prose',- text: 'Complex components are composed from smaller components. Each sub-component accepts its own xstyle, className, and rest props. You style the parts individually — there\'s no single "drill into sub-part" prop.',+ text: 'Complex components are composed from smaller components. Each sub-component accepts its own xstyle, className, and rest props. You style the parts individually; there\'s no single "drill into sub-part" prop.',},{type: 'code',@@ -293,7 +293,7 @@ const styles = stylex.create({},{type: 'prose',- text: 'Both approaches work — var() strings or typed imports from tokens.stylex. The typed imports give autocomplete and catch typos at build time.',+ text: 'Both approaches work: var() strings or typed imports from tokens.stylex. The typed imports give autocomplete and catch typos at build time.',},{type: 'prose',@@ -313,7 +313,7 @@ const styles = stylex.create({'Hardcoded colors (#fff, rgb(...)). Use var(--color-*) tokens or Tailwind semantic classes (text-primary, bg-surface).','Hardcoded spacing (16px, 1rem). Use var(--spacing-*) tokens or Tailwind spacing utilities (p-4, gap-3).','Wrapping a component in a <div> just to add margin. Use xstyle with stylex.create on the component.',- 'Using !important. If styles aren\'t applying, check specificity — xstyle is merged last.',+ 'Using !important. If styles aren\'t applying, check specificity; xstyle is merged last.',],},],diff --git a/packages/cli/docs/theme.doc.mjs b/packages/cli/docs/theme.doc.mjsindex ca6d972704..90484422e6 100644--- a/packages/cli/docs/theme.doc.mjs+++ b/packages/cli/docs/theme.doc.mjs@@ -47,7 +47,7 @@ function App() {},{type: 'prose',- text: 'The default import uses runtime style injection — works everywhere, no build step. The `/built` import skips injection and relies on the pre-compiled CSS file for better performance and SSR support.',+ text: 'The default import uses runtime style injection, which works everywhere with no build step. The `/built` import skips injection and relies on the pre-compiled CSS file for better performance and SSR support.',},],},@@ -78,7 +78,7 @@ function App() {},{type: 'prose',- text: 'All theme packages export from two subpaths:\n- `@xds/theme-{name}` — source theme (runtime injection)\n- `@xds/theme-{name}/built` — pre-built theme (pair with `theme.css`)',+ text: 'All theme packages export from two subpaths:\n- `@xds/theme-{name}`: source theme (runtime injection)\n- `@xds/theme-{name}/built`: pre-built theme (pair with `theme.css`)',},],},@@ -108,7 +108,7 @@ function App() {content: [{type: 'prose',- text: 'Use the CLI wizard (recommended) or create manually with defineTheme. Only override tokens that differ from defaults — omitted tokens use the design system defaults.',+ text: 'Use the CLI wizard (recommended) or create manually with defineTheme. Only override tokens that differ from defaults; omitted tokens use the design system defaults.',},{type: 'code',@@ -189,7 +189,7 @@ const myTheme = defineTheme({content: [{type: 'prose',- text: '`extends` lets you derive a new theme from an existing one — inheriting its tokens, component overrides, icons, and fonts. Only specify what you want to change; everything else carries over from the base theme.',+ text: '`extends` lets you derive a new theme from an existing one, inheriting its tokens, component overrides, icons, and fonts. Only specify what you want to change; everything else carries over from the base theme.',},{type: 'code',@@ -213,8 +213,8 @@ const brandTheme = defineTheme({headers: ['Field', 'Merge behavior'],rows: [['tokens', 'Base tokens are copied first, then child tokens override on top.'],- ['components', 'Deep-merged — child component rules override matching keys from the base.'],- ['icons', 'Shallow-merged — child icons override matching names from the base.'],+ ['components', 'Deep-merged: child component rules override matching keys from the base.'],+ ['icons', 'Shallow-merged: child icons override matching names from the base.'],['fonts', 'Base fonts included first, then child fonts appended.'],['typography, motion, radius, color', 'Child config replaces base entirely (these are scale inputs, not additive).'],],@@ -253,13 +253,13 @@ const brandTheme = defineTheme({},{type: 'prose',- text: 'Run `npx xds component <Name>` to see a component’s theming targets, public CSS variables, and which standard CSS properties are supported.',+ text: 'Run `npx xds component <Name>` to see a component\'s theming targets, public CSS variables, and which standard CSS properties are supported.',},{type: 'list',style: 'do',items: [- 'Write standard CSS properties (borderRadius, padding) — the pipeline expands them into internal vars.',+ 'Write standard CSS properties (borderRadius, padding); the pipeline expands them into internal vars.','Set public CSS vars directly when no standard property equivalent exists.',],},@@ -267,7 +267,7 @@ const brandTheme = defineTheme({type: 'list',style: 'dont',items: [- 'Set private CSS vars (prefixed --_) directly — use standard CSS properties instead. `xds theme build` will error.',+ 'Set private CSS vars (prefixed --_) directly. Use standard CSS properties instead. `xds theme build` will error.',],},],@@ -278,7 +278,7 @@ const brandTheme = defineTheme({content: [{type: 'prose',- text: 'Themes can add new prop values to any component. Any `prop:value` key where the value isn’t a built-in gets treated as a new variant. Use `xds theme build` to generate TypeScript augmentations for type safety.',+ text: 'Themes can add new prop values to any component. Any `prop:value` key where the value isn\'t a built-in gets treated as a new variant. Use `xds theme build` to generate TypeScript augmentations for type safety.',},{type: 'code',@@ -317,7 +317,7 @@ const brandTheme = defineTheme({},{type: 'prose',- text: 'Custom variants only work when the theme that defines them is active. The component’s variant map is extended via module augmentation — no changes to the component source needed.',+ text: 'Custom variants only work when the theme that defines them is active. The component\'s variant map is extended via module augmentation, with no changes to the component source needed.',},],},@@ -357,13 +357,13 @@ const brandTheme = defineTheme({],['ocean.variants.d.ts',- '(Optional) Module augmentations for custom component prop values found in the theme’s component overrides',+ '(Optional) Module augmentations for custom component prop values found in the theme\'s component overrides',],],},{type: 'prose',- text: 'The `__built: true` flag tells XDSTheme to skip runtime `<style>` injection — the CSS file handles it.',+ text: 'The `__built: true` flag tells XDSTheme to skip runtime `<style>` injection; the CSS file handles it.',},{type: 'code',@@ -408,12 +408,12 @@ import './themes/ocean.css';['Component overrides','Injected client-only',- 'In static CSS — present during SSR',+ 'In static CSS: present during SSR',],['SSR safe','Tokens yes, component overrides flash on hydration',- 'Fully SSR safe — no flash',+ 'Fully SSR safe: no flash',],['Best for',@@ -435,8 +435,8 @@ import './themes/ocean.css';type: 'list',style: 'dont',items: [- 'Use runtime themes in production SSR apps — component overrides will flash on hydration.',- 'Import /built without the CSS file — component overrides won’t apply.',+ 'Use runtime themes in production SSR apps; component overrides will flash on hydration.',+ 'Import /built without the CSS file; component overrides won\'t apply.',],},],diff --git a/packages/core/src/AlertDialog/AlertDialog.doc.mjs b/packages/core/src/AlertDialog/AlertDialog.doc.mjsindex 298bdbcd0b..a41b4d19c0 100644--- a/packages/core/src/AlertDialog/AlertDialog.doc.mjs+++ b/packages/core/src/AlertDialog/AlertDialog.doc.mjs@@ -21,11 +21,11 @@ export const docs = {],usage: {description:- 'AlertDialog asks the user to confirm a destructive or irreversible action before it happens. Use it for things like deleting content, revoking access, or discarding unsaved changes.\n\nFor cases where you want to show an alert without managing open state, use the `useXDSImperativeAlertDialog` hook — call `alert.show(options)` and render `alert.element` in your tree.',+ 'AlertDialog asks the user to confirm a destructive or irreversible action before it happens. Use it for things like deleting content, revoking access, or discarding unsaved changes.\n\nFor cases where you want to show an alert without managing open state, use the `useXDSImperativeAlertDialog` hook: call `alert.show(options)` and render `alert.element` in your tree.',bestPractices: [- {guidance: true, description: 'Make the action button label specific — "Delete project" is better than "OK" or "Confirm".'},+ {guidance: true, description: 'Make the action button label specific: "Delete project" is better than "OK" or "Confirm".'},{guidance: true, description: 'Describe what will happen in the description so the user knows the consequences before confirming.'},- {guidance: false, description: 'Use AlertDialog for non-destructive actions — use a standard Dialog instead.'},+ {guidance: false, description: 'Use AlertDialog for non-destructive actions; use a standard Dialog instead.'},],},playground: {@@ -67,7 +67,7 @@ export const docs = {{name: 'show', type: '(options: AlertDialogOptions) => void', description: 'Show the alert dialog with the given options. Options are the same as XDSAlertDialog props minus isOpen/onOpenChange.'},{name: 'hide', type: '() => void', description: 'Hide the alert dialog.'},{name: 'isOpen', type: 'boolean', description: 'Whether the dialog is currently open.'},- {name: 'element', type: 'ReactNode', description: 'The dialog element — render this in your JSX tree.'},+ {name: 'element', type: 'ReactNode', description: 'The dialog element; render this in your JSX tree.'},],},],@@ -78,11 +78,11 @@ export const docsDense = {description: 'Confirms destructive/irreversible action before it happens (delete, revoke access, discard unsaved changes).',usage: {description:- 'AlertDialog confirms destructive/irreversible action (delete, revoke access, discard changes). To show w/o managing open state, use useXDSImperativeAlertDialog hook — call alert.show(options) + render alert.element in tree.',+ 'AlertDialog confirms destructive/irreversible action (delete, revoke access, discard changes). To show w/o managing open state, use useXDSImperativeAlertDialog hook: call alert.show(options) + render alert.element in tree.',bestPractices: [- {guidance: true, description: 'Make action button label specific — "Delete project" > "OK"/"Confirm".'},+ {guidance: true, description: 'Make action button label specific: "Delete project" > "OK"/"Confirm".'},{guidance: true, description: 'Describe consequences in description so user knows outcome before confirming.'},- {guidance: false, description: 'Use AlertDialog for non-destructive actions — use standard Dialog instead.'},+ {guidance: false, description: 'Use AlertDialog for non-destructive actions; use standard Dialog instead.'},],},components: [@@ -110,7 +110,7 @@ export const docsDense = {show: 'show dialog w/ options; same as XDSAlertDialog props minus isOpen/onOpenChange',hide: 'hide dialog',isOpen: 'dialog currently open?',- element: 'dialog element — render in JSX tree',+ element: 'dialog element; render in JSX tree',},},],diff --git a/packages/core/src/AppShell/AppShell.doc.mjs b/packages/core/src/AppShell/AppShell.doc.mjsindex b2e9684840..f2d6f505fa 100644--- a/packages/core/src/AppShell/AppShell.doc.mjs+++ b/packages/core/src/AppShell/AppShell.doc.mjs@@ -10,12 +10,12 @@ export const docs = {keywords: ["appshell","layout","scaffold","sidebar","sidenav","topnav","header","navigation","dashboard","shell","page","frame"],usage: {description:- 'The outermost layout for an application. Provides slots for top navigation, side navigation, banners, and main content. Use it as the root wrapper for every page — it handles responsive collapse, skip-to-content, and mobile navigation automatically.',+ 'The outermost layout for an application. Provides slots for top navigation, side navigation, banners, and main content. Use it as the root wrapper for every page. It handles responsive collapse, skip-to-content, and mobile navigation automatically.',bestPractices: [- {guidance: true, description: 'Choose the right height — use "fill" for dashboards with internal scrolling and "auto" for pages that grow with content.'},- {guidance: true, description: 'Set `contentPadding` based on content type — 4 for forms and settings, 0 for tables and dashboards.'},- {guidance: false, description: "Nest one AppShell inside another — it's the outermost layout frame."},- {guidance: false, description: 'Use for sub-page layouts — use Layout for content areas within AppShell.'},+ {guidance: true, description: 'Choose the right height: use "fill" for dashboards with internal scrolling and "auto" for pages that grow with content.'},+ {guidance: true, description: 'Set `contentPadding` based on content type: 4 for forms and settings, 0 for tables and dashboards.'},+ {guidance: false, description: "Nest one AppShell inside another; it's the outermost layout frame."},+ {guidance: false, description: 'Use for sub-page layouts; use Layout for content areas within AppShell.'},],},props: [@@ -92,7 +92,7 @@ export const docs = {name: 'xstyle',type: 'StyleXStyles',description:- 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value — not an inline style object like style={{}}.',+ 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value, not an inline style object like style={{}}.',},],playground: {@@ -137,12 +137,12 @@ export const docsZh = {displayName: 'App Shell',usage: {description:- 'The outermost layout for an application. Provides slots for top navigation, side navigation, banners, and main content. Use it as the root wrapper for every page — it handles responsive collapse, skip-to-content, and mobile navigation automatically.',+ 'The outermost layout for an application. Provides slots for top navigation, side navigation, banners, and main content. Use it as the root wrapper for every page. It handles responsive collapse, skip-to-content, and mobile navigation automatically.',bestPractices: [- {guidance: true, description: 'Choose the right height — use "fill" for dashboards with internal scrolling and "auto" for pages that grow with content.'},- {guidance: true, description: 'Set `contentPadding` based on content type — 4 for forms and settings, 0 for tables and dashboards.'},- {guidance: false, description: "Nest one AppShell inside another — it's the outermost layout frame."},- {guidance: false, description: 'Use for sub-page layouts — use Layout for content areas within AppShell.'},+ {guidance: true, description: 'Choose the right height: use "fill" for dashboards with internal scrolling and "auto" for pages that grow with content.'},+ {guidance: true, description: 'Set `contentPadding` based on content type: 4 for forms and settings, 0 for tables and dashboards.'},+ {guidance: false, description: "Nest one AppShell inside another; it's the outermost layout frame."},+ {guidance: false, description: 'Use for sub-page layouts; use Layout for content areas within AppShell.'},],},props: [@@ -209,12 +209,12 @@ export const docsDense = {'app-level layout shell w/ header, side nav, main content; composes XDSLayout internally, replaces XDSPage+XDSPageLayout',usage: {description:- 'The outermost layout for an application. Provides slots for top navigation, side navigation, banners, and main content. Use it as the root wrapper for every page — it handles responsive collapse, skip-to-content, and mobile navigation automatically.',+ 'The outermost layout for an application. Provides slots for top navigation, side navigation, banners, and main content. Use it as the root wrapper for every page. It handles responsive collapse, skip-to-content, and mobile navigation automatically.',bestPractices: [- {guidance: true, description: 'Choose the right height — use "fill" for dashboards with internal scrolling and "auto" for pages that grow with content.'},- {guidance: true, description: 'Set `contentPadding` based on content type — 4 for forms and settings, 0 for tables and dashboards.'},- {guidance: false, description: "Nest one AppShell inside another — it's the outermost layout frame."},- {guidance: false, description: 'Use for sub-page layouts — use Layout for content areas within AppShell.'},+ {guidance: true, description: 'Choose the right height: use "fill" for dashboards with internal scrolling and "auto" for pages that grow with content.'},+ {guidance: true, description: 'Set `contentPadding` based on content type: 4 for forms and settings, 0 for tables and dashboards.'},+ {guidance: false, description: "Nest one AppShell inside another; it's the outermost layout frame."},+ {guidance: false, description: 'Use for sub-page layouts; use Layout for content areas within AppShell.'},],},propDescriptions: {diff --git a/packages/core/src/AspectRatio/AspectRatio.doc.mjs b/packages/core/src/AspectRatio/AspectRatio.doc.mjsindex 6bc2c22c5e..9c2d0ecad9 100644--- a/packages/core/src/AspectRatio/AspectRatio.doc.mjs+++ b/packages/core/src/AspectRatio/AspectRatio.doc.mjs@@ -13,9 +13,8 @@ export const docs = {bestPractices: [{guidance: true, description: 'Express the ratio as a fraction like `16/9` or `4/3` for readability.'},{guidance: true, description: 'Use for media that needs consistent proportions across screen sizes.'},- {guidance: true, description: 'Use `shape="ellipse"` for circular/oval media like avatars; combine with `ratio={1}` for a perfect circle.'},- {guidance: false, description: 'Use for general layout containers — use standard layout components instead.'},- {guidance: false, description: 'Nest AspectRatio containers — one level is sufficient.'},+ {guidance: false, description: 'Use for general layout containers; use standard layout components instead.'},+ {guidance: false, description: 'Nest AspectRatio containers; one level is sufficient.'},],},props: [@@ -25,12 +24,6 @@ export const docs = {description: 'Aspect ratio as width/height (e.g. 16/9, 1).',required: true,},- {- name: 'shape',- type: "'rectangle' | 'ellipse'",- description: 'Container shape. Both respect the `ratio`. `ellipse` clips to an oval (a circle when `ratio={1}`).',- default: "'rectangle'",- },{name: 'children',type: 'ReactNode',@@ -41,35 +34,18 @@ export const docs = {name: 'xstyle',type: 'StyleXStyles',description:- 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value — not an inline style object like style={{}}.',+ 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value, not an inline style object like style={{}}.',},],playground: {defaults: {ratio: 16 / 9,- shape: 'rectangle',- // Fixed height + auto width lets the CSS `aspect-ratio` drive the box- // width as the ratio knob changes (the component's base width is 100%,- // which is why the preview was full-width regardless of the ratio).- style: {- height: 300,- width: 'auto',- backgroundColor: 'var(--color-background-blue)',- },- children: {- __element: 'XDSCenter',- props: {height: '100%'},- children: {- __element: 'XDSText',- props: {color: 'primary'},- children: 'Aspect Ratio',- },- },+ children: {__element: 'XDSCenter', props: {height: '100%'}, children: {__element: 'XDSText', props: {color: 'secondary'}, children: '16:9'}},},},theming: {targets: [- {className: 'xds-aspect-ratio', visualProps: ['shape']},+ {className: 'xds-aspect-ratio'},],},};@@ -84,14 +60,12 @@ export const docsZh = {bestPractices: [{guidance: true, description: 'Express the ratio as a fraction like `16/9` or `4/3` for readability.'},{guidance: true, description: 'Use for media that needs consistent proportions across screen sizes.'},- {guidance: true, description: 'Use `shape="ellipse"` for circular/oval media like avatars; combine with `ratio={1}` for a perfect circle.'},- {guidance: false, description: 'Use for general layout containers — use standard layout components instead.'},- {guidance: false, description: 'Nest AspectRatio containers — one level is sufficient.'},+ {guidance: false, description: 'Use for general layout containers; use standard layout components instead.'},+ {guidance: false, description: 'Nest AspectRatio containers; one level is sufficient.'},],},props: [{name: 'ratio', type: 'number', description: '宽高比,以宽/高表示(例如 16/9、1)。', required: true},- {name: 'shape', type: "'rectangle' | 'ellipse'", description: '容器形状,二者均遵循 `ratio`。`ellipse` 裁剪为椭圆(当 `ratio={1}` 时为圆形)。', default: "'rectangle'"},{name: 'children', type: 'ReactNode', description: '通过绝对定位填充容器的内容。', required: true},{name: 'xstyle',@@ -102,7 +76,7 @@ export const docsZh = {],theming: {targets: [- {className: 'xds-aspect-ratio', visualProps: ['shape']},+ {className: 'xds-aspect-ratio'},],},};@@ -116,14 +90,12 @@ export const docsDense = {bestPractices: [{guidance: true, description: 'Express the ratio as a fraction like `16/9` or `4/3` for readability.'},{guidance: true, description: 'Use for media that needs consistent proportions across screen sizes.'},- {guidance: true, description: 'Use `shape="ellipse"` for circular/oval media like avatars; combine with `ratio={1}` for a perfect circle.'},- {guidance: false, description: 'Use for general layout containers — use standard layout components instead.'},- {guidance: false, description: 'Nest AspectRatio containers — one level is sufficient.'},+ {guidance: false, description: 'Use for general layout containers; use standard layout components instead.'},+ {guidance: false, description: 'Nest AspectRatio containers; one level is sufficient.'},],},propDescriptions: {ratio: 'width/height ratio (e.g. 16/9, 1)',- shape: "container shape: 'rectangle' (default) or 'ellipse'; both respect ratio",children: 'content positioned absolutely to fill container',xstyle: 'StyleX layout customization via stylex.create()',},diff --git a/packages/core/src/Avatar/Avatar.doc.mjs b/packages/core/src/Avatar/Avatar.doc.mjsindex 69f388efeb..e00e96486a 100644--- a/packages/core/src/Avatar/Avatar.doc.mjs+++ b/packages/core/src/Avatar/Avatar.doc.mjs@@ -13,10 +13,10 @@ export const docs = {'Avatar represents a person or team with a profile photo, initials, or a default icon. Use it in comment headers, contact lists, chat messages, user cards, and anywhere you need to identify someone visually.',bestPractices: [{guidance: true, description: 'Always pass a name so the avatar can show initials if the photo fails to load, and so screen readers can announce who it represents.'},- {guidance: true, description: 'Pick a size that matches the context — tiny or xsmall for inline mentions, small or medium for lists and cards, large for profile headers.'},+ {guidance: true, description: 'Pick a size that matches the context: tiny or xsmall for inline mentions, small or medium for lists and cards, large for profile headers.'},{guidance: true, description: 'Add a status dot when knowing someone\'s availability matters, like in chat or team views.'},- {guidance: false, description: 'Use Avatar for logos, product images, or anything that isn\'t a person or team — use an image or icon instead.'},- {guidance: false, description: 'Force a square or custom shape — avatars are always circular to stay consistent across the system.'},+ {guidance: false, description: 'Use Avatar for logos, product images, or anything that isn\'t a person or team. Use an image or icon instead.'},+ {guidance: false, description: 'Force a square or custom shape. Avatars are always circular to stay consistent across the system.'},],anatomy: [{name: 'Photo', required: false, description: 'The profile image, loaded from the src URL. Shown when available.'},@@ -111,8 +111,8 @@ export const docsZh = {bestPractices: [{guidance: true, description: 'Always provide a name prop so the component can generate meaningful initials and alt text when the image fails to load.'},{guidance: true, description: 'Use the status slot with XDSAvatarStatusDot to indicate online presence or availability when relevant to the context.'},- {guidance: false, description: 'Use Avatar for decorative images or logos that aren\'t representing a person or entity — use an image or icon component instead.'},- {guidance: false, description: 'Override the circular shape — Avatars are always round to maintain visual consistency across the system.'},+ {guidance: false, description: 'Use Avatar for decorative images or logos that aren\'t representing a person or entity. Use an image or icon component instead.'},+ {guidance: false, description: 'Override the circular shape. Avatars are always round to maintain visual consistency across the system.'},],},theming: {@@ -167,10 +167,10 @@ export const docsDense = {'Avatar represents a person or team with a profile photo, initials, or a default icon. Falls back automatically. Use in comment headers, contact lists, chat, user cards.',bestPractices: [{guidance: true, description: 'Always pass a name for initials fallback and screen reader alt text.'},- {guidance: true, description: 'Match size to context — tiny/xsmall inline, small/medium in lists, large for profiles.'},+ {guidance: true, description: 'Match size to context: tiny/xsmall inline, small/medium in lists, large for profiles.'},{guidance: true, description: 'Add a status dot in chat or team views where availability matters.'},- {guidance: false, description: 'Use for logos or product images — use an image or icon instead.'},- {guidance: false, description: 'Force a square or custom shape — avatars are always circular.'},+ {guidance: false, description: 'Use for logos or product images. Use an image or icon instead.'},+ {guidance: false, description: 'Force a square or custom shape. Avatars are always circular.'},],},components: [diff --git a/packages/core/src/AvatarGroup/AvatarGroup.doc.mjs b/packages/core/src/AvatarGroup/AvatarGroup.doc.mjsindex 55ad1d52e7..4d088e100c 100644--- a/packages/core/src/AvatarGroup/AvatarGroup.doc.mjs+++ b/packages/core/src/AvatarGroup/AvatarGroup.doc.mjs@@ -9,12 +9,12 @@ export const docs = {keywords: ['avatar', 'group', 'facepile', 'stack', 'overlap', 'participants', 'assignees', 'members', 'team'],usage: {description:- 'AvatarGroup displays multiple avatars in an overlapping row with an optional overflow indicator. Uses a compositional API — pass XDSAvatar children directly so each avatar can carry its own props (status dots, click handlers, etc.).',+ 'AvatarGroup displays multiple avatars in an overlapping row with an optional overflow indicator. Uses a compositional API: pass XDSAvatar children directly so each avatar can carry its own props (status dots, click handlers, etc.).',bestPractices: [- {guidance: true, description: 'Set max to limit visible avatars when the list is long — 3-5 is typical.'},+ {guidance: true, description: 'Set max to limit visible avatars when the list is long; 3-5 is typical.'},{guidance: true, description: 'Use XDSAvatarGroupOverflow for custom overflow content like a popover trigger or "add member" button.'},{guidance: true, description: 'Pass status dots, click handlers, or tooltips directly on each XDSAvatar child.'},- {guidance: false, description: "Don't nest AvatarGroups — use a single group with all avatars."},+ {guidance: false, description: "Don't nest AvatarGroups; use a single group with all avatars."},],anatomy: [{name: 'Avatar children', required: true, description: 'XDSAvatar elements that form the overlapping row. Each can have its own props.'},@@ -55,12 +55,12 @@ export const docs = {export const docsZh = {usage: {description:- 'AvatarGroup 以重叠排列方式显示多个头像,并可选择显示溢出指示器。使用组合式 API — 直接传入 XDSAvatar 子元素,每个头像可携带自己的属性。',+ 'AvatarGroup 以重叠排列方式显示多个头像,并可选择显示溢出指示器。使用组合式 API:直接传入 XDSAvatar 子元素,每个头像可携带自己的属性。',bestPractices: [- {guidance: true, description: '当列表较长时设置 max 来限制可见头像数量 — 通常 3-5 个为佳。'},+ {guidance: true, description: '当列表较长时设置 max 来限制可见头像数量,通常 3-5 个为佳。'},{guidance: true, description: '使用 XDSAvatarGroupOverflow 自定义溢出内容,如弹出触发器或"添加成员"按钮。'},{guidance: true, description: '直接在每个 XDSAvatar 子元素上传递状态点、点击处理器或工具提示。'},- {guidance: false, description: '不要嵌套 AvatarGroup — 使用单个组包含所有头像。'},+ {guidance: false, description: '不要嵌套 AvatarGroup,使用单个组包含所有头像。'},],},components: [@@ -94,7 +94,7 @@ export const docsDense = {description: 'compositional overlapping avatar row w/ +N overflow or custom slot',usage: {description:- 'Stacked avatar display with overlapping layout. Compositional API — XDSAvatar children with per-avatar props (status dots, clicks). Optional XDSAvatarGroupOverflow slot for custom overflow.',+ 'Stacked avatar display with overlapping layout. Compositional API: XDSAvatar children with per-avatar props (status dots, clicks). Optional XDSAvatarGroupOverflow slot for custom overflow.',bestPractices: [{guidance: true, description: 'Set max to limit visible avatars (3-5 typical).'},{guidance: true, description: 'Use XDSAvatarGroupOverflow for custom overflow (popover, add button).'},diff --git a/packages/core/src/Badge/Badge.doc.mjs b/packages/core/src/Badge/Badge.doc.mjsindex 149f2fd6a4..172ddaecda 100644--- a/packages/core/src/Badge/Badge.doc.mjs+++ b/packages/core/src/Badge/Badge.doc.mjs@@ -40,18 +40,18 @@ export const docs = {},usage: {description:- 'Badge highlights a status or category at a glance. Use it sparingly — only when a value represents a distinct state (Active, Failed) or a grouping tag (Engineering, Design). Most metadata (dates, durations, counts, descriptions) should be plain description text, not badges.',+ 'Badge highlights a status or category at a glance. Use it sparingly: only when a value represents a distinct state (Active, Failed) or a grouping tag (Engineering, Design). Most metadata (dates, durations, counts, descriptions) should be plain description text, not badges.',bestPractices: [- {guidance: true, description: 'Every status badge steals attention. Only badge states where the user needs to notice or act — errors, warnings, items requiring follow-up. If no action is needed, plain text is fine.'},- {guidance: true, description: 'Use success, warning, and error variants only for system status that demands attention — "Failed", "Degraded", "Action Required". These have bold solid backgrounds designed to stand out.'},- {guidance: true, description: 'Use color variants (blue, purple, teal, etc.) for category tags that group or classify items — team names, content types, priority levels.'},+ {guidance: true, description: 'Every status badge steals attention. Only badge states where the user needs to notice or act: errors, warnings, items requiring follow-up. If no action is needed, plain text is fine.'},+ {guidance: true, description: 'Use success, warning, and error variants only for system status that demands attention: "Failed", "Degraded", "Action Required". These have bold solid backgrounds designed to stand out.'},+ {guidance: true, description: 'Use color variants (blue, purple, teal, etc.) for category tags that group or classify items: team names, content types, priority levels.'},{guidance: true, description: 'Keep labels to one or two words. If you need more detail, put it in surrounding text instead of the badge.'},{guidance: true, description: 'Add an icon when it helps identify the badge type quickly, but always include a text label alongside it.'},- {guidance: false, description: 'Apply a "success" badge to every healthy/active/normal item. If all rows show green "Active" badges, none stand out — the badge adds noise, not information. Show only the states that need user attention (errors, warnings, pending actions).'},- {guidance: false, description: 'Use badges for metadata. Durations ("6h window"), counts ("12 trigger types"), dates, and descriptions are not statuses or categories — use description text (XDSText with type="supporting") instead.'},+ {guidance: false, description: 'Apply a "success" badge to every healthy/active/normal item. If all rows show green "Active" badges, none stand out; the badge adds noise, not information. Show only the states that need user attention (errors, warnings, pending actions).'},+ {guidance: false, description: 'Use badges for metadata. Durations ("6h window"), counts ("12 trigger types"), dates, and descriptions are not statuses or categories; use description text (XDSText with type="supporting") instead.'},{guidance: false, description: 'Use semantic status variants (success, warning, error, info) for categories or informational content. These are visually loud and should only indicate system state.'},- {guidance: false, description: 'Repeat the same badge in every row of a table or list. If the same value appears in most rows, it\'s not adding information — use plain text for common states and reserve badges for the exceptional ones.'},- {guidance: false, description: 'Make badges clickable — they are read-only indicators. Use a button or link if the user needs to take action.'},+ {guidance: false, description: 'Repeat the same badge in every row of a table or list. If the same value appears in most rows, it\'s not adding information; use plain text for common states and reserve badges for the exceptional ones.'},+ {guidance: false, description: 'Make badges clickable; they are read-only indicators. Use a button or link if the user needs to take action.'},],anatomy: [{name: 'Icon', required: false, description: 'An optional leading icon that helps identify the badge type at a glance.'},@@ -66,18 +66,18 @@ export const docsZh = {displayName: 'Badge',usage: {description:- 'Badge highlights a status or category at a glance. Use it sparingly — only when a value represents a distinct state (Active, Failed) or a grouping tag (Engineering, Design). Most metadata (dates, durations, counts, descriptions) should be plain description text, not badges.',+ 'Badge highlights a status or category at a glance. Use it sparingly: only when a value represents a distinct state (Active, Failed) or a grouping tag (Engineering, Design). Most metadata (dates, durations, counts, descriptions) should be plain description text, not badges.',bestPractices: [- {guidance: true, description: 'Every status badge steals attention. Only badge states where the user needs to notice or act — errors, warnings, items requiring follow-up. If no action is needed, plain text is fine.'},- {guidance: true, description: 'Use success, warning, and error variants only for system status that demands attention — "Failed", "Degraded", "Action Required". These have bold solid backgrounds designed to stand out.'},- {guidance: true, description: 'Use color variants (blue, purple, teal, etc.) for category tags that group or classify items — team names, content types, priority levels.'},+ {guidance: true, description: 'Every status badge steals attention. Only badge states where the user needs to notice or act: errors, warnings, items requiring follow-up. If no action is needed, plain text is fine.'},+ {guidance: true, description: 'Use success, warning, and error variants only for system status that demands attention: "Failed", "Degraded", "Action Required". These have bold solid backgrounds designed to stand out.'},+ {guidance: true, description: 'Use color variants (blue, purple, teal, etc.) for category tags that group or classify items: team names, content types, priority levels.'},{guidance: true, description: 'Keep labels to one or two words. If you need more detail, put it in surrounding text instead of the badge.'},{guidance: true, description: 'Add an icon when it helps identify the badge type quickly, but always include a text label alongside it.'},- {guidance: false, description: 'Apply a "success" badge to every healthy/active/normal item. If all rows show green "Active" badges, none stand out — the badge adds noise, not information. Show only the states that need user attention (errors, warnings, pending actions).'},- {guidance: false, description: 'Use badges for metadata. Durations ("6h window"), counts ("12 trigger types"), dates, and descriptions are not statuses or categories — use description text (XDSText with type="supporting") instead.'},+ {guidance: false, description: 'Apply a "success" badge to every healthy/active/normal item. If all rows show green "Active" badges, none stand out; the badge adds noise, not information. Show only the states that need user attention (errors, warnings, pending actions).'},+ {guidance: false, description: 'Use badges for metadata. Durations ("6h window"), counts ("12 trigger types"), dates, and descriptions are not statuses or categories; use description text (XDSText with type="supporting") instead.'},{guidance: false, description: 'Use semantic status variants (success, warning, error, info) for categories or informational content. These are visually loud and should only indicate system state.'},- {guidance: false, description: 'Repeat the same badge in every row of a table or list. If the same value appears in most rows, it\'s not adding information — use plain text for common states and reserve badges for the exceptional ones.'},- {guidance: false, description: 'Make badges clickable — they are read-only indicators. Use a button or link if the user needs to take action.'},+ {guidance: false, description: 'Repeat the same badge in every row of a table or list. If the same value appears in most rows, it\'s not adding information; use plain text for common states and reserve badges for the exceptional ones.'},+ {guidance: false, description: 'Make badges clickable; they are read-only indicators. Use a button or link if the user needs to take action.'},],anatomy: [{name: 'Icon', required: false, description: 'An optional leading icon that helps identify the badge type at a glance.'},@@ -109,21 +109,21 @@ export const docsZh = {/** @type {import('../docs-types').TranslationDoc} */export const docsDense = {- description: 'highlights a status or category tag — NOT for general metadata',+ description: 'highlights a status or category tag, NOT for general metadata',usage: {description:- 'Badge is for status (Active, Failed) and category tags (Engineering, Design). It is NOT for metadata like dates, durations, counts, or descriptions — use description text (XDSText type="supporting") for those.',+ 'Badge is for status (Active, Failed) and category tags (Engineering, Design). It is NOT for metadata like dates, durations, counts, or descriptions; use description text (XDSText type="supporting") for those.',bestPractices: [{guidance: true, description: 'Every badge steals attention. Only badge states where the user needs to act. If no follow-up is needed, use plain text.'},- {guidance: true, description: 'Use success/warning/error ONLY for system status requiring attention (Failed, Degraded, Action Required). These are visually loud — solid colored backgrounds.'},- {guidance: true, description: 'Use color variants (blue, purple, teal) for category tags that classify items — team names, content types, priority levels.'},+ {guidance: true, description: 'Use success/warning/error ONLY for system status requiring attention (Failed, Degraded, Action Required). These are visually loud: solid colored backgrounds.'},+ {guidance: true, description: 'Use color variants (blue, purple, teal) for category tags that classify items: team names, content types, priority levels.'},{guidance: true, description: 'Keep labels to one or two words. If more detail is needed, put it in surrounding text instead of the badge.'},{guidance: true, description: 'Add an icon when it helps identify the badge type quickly, but always include a text label alongside it.'},- {guidance: false, description: 'Apply "success" badges to every healthy/normal item. If most rows are green "Active", none stand out. Skip the badge for the default state — only highlight exceptions that need attention.'},+ {guidance: false, description: 'Apply "success" badges to every healthy/normal item. If most rows are green "Active", none stand out. Skip the badge for the default state; only highlight exceptions that need attention.'},{guidance: false, description: 'Use badges for metadata. Durations, counts, dates, descriptions → use XDSText with type="supporting" instead.'},{guidance: false, description: 'Use status variants for non-status info. "6h window", "12 types", category names are NOT statuses.'},{guidance: false, description: 'Repeat loud badges in every row. Common/default states should be plain text; reserve badges for the exceptional.'},- {guidance: false, description: 'Make badges clickable — they are read-only. Use a button or link for actions.'},+ {guidance: false, description: 'Make badges clickable; they are read-only. Use a button or link for actions.'},],anatomy: [{name: 'Icon', required: false, description: 'Optional leading icon.'},diff --git a/packages/core/src/Banner/Banner.doc.mjs b/packages/core/src/Banner/Banner.doc.mjsindex 9fc2f2dc24..2ab0d80c72 100644--- a/packages/core/src/Banner/Banner.doc.mjs+++ b/packages/core/src/Banner/Banner.doc.mjs@@ -14,9 +14,9 @@ export const docs = {{guidance: true, description: 'Pick a status that matches the message: info for updates, warning for caution, error for problems, success for confirmations.'},{guidance: true, description: 'Use the card container inside page content and the section container for full-width messages that span the entire page.'},{guidance: true, description: 'Make info and success banners dismissable. Keep error banners visible until the user fixes the issue.'},- {guidance: true, description: 'Keep titles short and scannable — "Payment failed" not "There was a problem processing your most recent payment."'},- {guidance: false, description: 'Use Banner for short-lived messages that disappear on their own — use Toast instead.'},- {guidance: false, description: 'Stack multiple banners with the same status — combine related messages into one banner.'},+ {guidance: true, description: 'Keep titles short and scannable: "Payment failed" not "There was a problem processing your most recent payment."'},+ {guidance: false, description: 'Use Banner for short-lived messages that disappear on their own; use Toast instead.'},+ {guidance: false, description: 'Stack multiple banners with the same status; combine related messages into one banner.'},],anatomy: [{name: 'Icon', required: true, description: 'Automatically set based on the status (info, warning, error, success).'},@@ -91,7 +91,7 @@ export const docs = {name: 'xstyle',type: 'StyleXStyles',description:- 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value — not an inline style object like style={{}}.',+ 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value, not an inline style object like style={{}}.',},],@@ -127,9 +127,9 @@ export const docsZh = {{guidance: true, description: 'Pick a status that matches the message: info for updates, warning for caution, error for problems, success for confirmations.'},{guidance: true, description: 'Use the card container inside page content and the section container for full-width messages that span the entire page.'},{guidance: true, description: 'Make info and success banners dismissable. Keep error banners visible until the user fixes the issue.'},- {guidance: true, description: 'Keep titles short and scannable — "Payment failed" not "There was a problem processing your most recent payment."'},- {guidance: false, description: 'Use Banner for short-lived messages that disappear on their own — use Toast instead.'},- {guidance: false, description: 'Stack multiple banners with the same status — combine related messages into one banner.'},+ {guidance: true, description: 'Keep titles short and scannable: "Payment failed" not "There was a problem processing your most recent payment."'},+ {guidance: false, description: 'Use Banner for short-lived messages that disappear on their own; use Toast instead.'},+ {guidance: false, description: 'Stack multiple banners with the same status; combine related messages into one banner.'},],anatomy: [{name: 'Icon', required: true, description: 'Automatically set based on the status (info, warning, error, success).'},@@ -192,9 +192,9 @@ export const docsDense = {{guidance: true, description: 'Match status to message: info for updates, warning for caution, error for problems, success for confirmations.'},{guidance: true, description: 'Card container for inline content, section container for full-width page-level messages.'},{guidance: true, description: 'Make info/success dismissable. Keep error banners until the issue is fixed.'},- {guidance: true, description: 'Keep titles short — "Payment failed" not "There was a problem processing your payment."'},- {guidance: false, description: 'Use for auto-dismissing messages — use Toast instead.'},- {guidance: false, description: 'Stack multiple banners of the same status — combine into one.'},+ {guidance: true, description: 'Keep titles short: "Payment failed" not "There was a problem processing your payment."'},+ {guidance: false, description: 'Use for auto-dismissing messages; use Toast instead.'},+ {guidance: false, description: 'Stack multiple banners of the same status; combine into one.'},],anatomy: [{name: 'Icon', required: true, description: 'Set automatically from status.'},diff --git a/packages/core/src/Chat/Chat.doc.mjs b/packages/core/src/Chat/Chat.doc.mjsindex 82b979d205..96586cf89e 100644--- a/packages/core/src/Chat/Chat.doc.mjs+++ b/packages/core/src/Chat/Chat.doc.mjs@@ -44,21 +44,21 @@ export const docs = {displayName: 'Chat Message List',description: 'Presentational message container with density context and infinite scroll support. Provides role="log" with aria-live="polite" for accessibility. A flex spacer pushes messages to the bottom when the list isn\'t full.',props: [- {name: 'children', type: 'ReactNode', description: 'Message elements — typically XDSChatMessage or XDSChatSystemMessage.', required: true},+ {name: 'children', type: 'ReactNode', description: 'Message elements, typically XDSChatMessage or XDSChatSystemMessage.', required: true},{name: 'emptyState', type: 'ReactNode', description: 'Content shown when the list has no messages.',slotElements: [{__element: 'XDSEmptyState', props: {title: 'No items', description: 'Nothing to show.'}}],},- {name: 'scrollToTopAction', type: '() => Promise<void>', description: 'Async action fired when user scrolls to top. Use for loading older messages. Wrapped in useTransition — shows a spinner at the top while pending.'},- {name: 'density', type: "'compact' | 'balanced' | 'spacious'", description: 'Visual density — flows to child messages via context.', default: "'balanced'"},+ {name: 'scrollToTopAction', type: '() => Promise<void>', description: 'Async action fired when user scrolls to top. Use for loading older messages. Wrapped in useTransition; shows a spinner at the top while pending.'},+ {name: 'density', type: "'compact' | 'balanced' | 'spacious'", description: 'Visual density; flows to child messages via context.', default: "'balanced'"},{name: 'gap', type: 'SpacingStep', description: 'Gap between top-level message rows. Defaults to the selected density; override for LLM event streams or independent rows that need different spacing from density.'},],},{name: 'XDSChatMessage',displayName: 'Chat Message',- description: 'Sender context wrapper — handles avatar, name, metadata, and alignment based on sender role.',+ description: 'Sender context wrapper that handles avatar, name, metadata, and alignment based on sender role.',props: [- {name: 'sender', type: "'user' | 'assistant' | 'system'", description: 'Who sent this message — controls alignment and layout.', required: true},+ {name: 'sender', type: "'user' | 'assistant' | 'system'", description: 'Who sent this message; controls alignment and layout.', required: true},{name: 'children', type: 'ReactNode', description: 'Free-form content: bubbles, asset lists, tool calls, images.', required: true},{name: 'avatar', type: 'ReactNode', description: 'Avatar element rendered beside the message. Typically XDSAvatar.',slotElements: [{__element: 'XDSAvatar', props: {name: 'User', size: 'sm'}}],@@ -74,9 +74,9 @@ export const docs = {name: 'XDSChatMessageBubble',isHiddenFromOverview: true,displayName: 'Chat Message Bubble',- description: 'Styled content container — the chat “bubble.” Reads sender from parent XDSChatMessage context to auto-style the background. Use filled for standard messages and ghost when content needs alignment without a visible boundary. Supports name/metadata slots aligned with bubble padding, and multi-bubble grouping via the group prop for consecutive messages from the same sender.',+ description: 'Styled content container, the chat "bubble." Reads sender from parent XDSChatMessage context to auto-style the background. Use filled for standard messages and ghost when content needs alignment without a visible boundary. Supports name/metadata slots aligned with bubble padding, and multi-bubble grouping via the group prop for consecutive messages from the same sender.',props: [- {name: 'children', type: 'ReactNode', description: 'Bubble content — text, XDSMarkdown, or any ReactNode.', required: true},+ {name: 'children', type: 'ReactNode', description: 'Bubble content: text, XDSMarkdown, or any ReactNode.', required: true},{name: 'variant', type: "'filled' | 'ghost'", description: "Visual variant. 'filled' renders sender-colored background (default). 'ghost' renders transparent background but keeps padding for alignment.", default: "'filled'"},{name: 'name', type: 'ReactNode', description: "Sender name rendered above the bubble, aligned with bubble text padding. Use on the first bubble in a message. If the first content is raw (no bubble), use XDSChatMessage's `name` prop instead."},{name: 'metadata', type: 'ReactNode', description: "Metadata content rendered below the bubble, aligned with bubble text padding. Use on the last bubble in a message. If the last content is raw (no bubble), use XDSChatMessage's `metadata` prop instead.",@@ -90,10 +90,10 @@ export const docs = {displayName: 'Chat Message Metadata',description: 'Composable metadata row for chat messages. Renders timestamp, footer content, and delivery status in a single row. Direction reverses for user sender. Renders nothing if all props are empty.',props: [- {name: 'timestamp', type: 'ReactNode', description: 'Timestamp content — a string or XDSTimestamp component.',+ {name: 'timestamp', type: 'ReactNode', description: 'Timestamp content: a string or XDSTimestamp component.',slotElements: [{__element: 'XDSText', props: {type: 'body'}, children: 'Just now'}],},- {name: 'footer', type: 'ReactNode', description: 'Footer content — model info, reaction buttons, copy button.',+ {name: 'footer', type: 'ReactNode', description: 'Footer content: model info, reaction buttons, copy button.',slotElements: [{__element: 'XDSText', props: {type: 'body'}, children: 'Footer content'}],},{name: 'status', type: "'sending' | 'sent' | 'delivered' | 'read' | 'error'", description: 'Message delivery status. Shows icon + label.'},@@ -102,10 +102,10 @@ export const docs = {{name: 'XDSChatSystemMessage',displayName: 'Chat System Message',- description: 'Centered system message for non-sender content like date separators, membership changes, and status notices. It is not a chat bubble — it has no avatar, no alignment, and no sender context. Use the divider variant for temporal breaks and default for inline status updates.',+ description: 'Centered system message for non-sender content like date separators, membership changes, and status notices. It is not a chat bubble; it has no avatar, no alignment, and no sender context. Use the divider variant for temporal breaks and default for inline status updates.',props: [- {name: 'children', type: 'ReactNode', description: 'System message content — a short, factual string like a date, a join/leave notice, or a status change.', required: true},- {name: 'variant', type: "'default' | 'divider'", description: "Visual variant. 'default' renders centered text. 'divider' adds horizontal lines on each side via XDSDivider — use for date separators and section breaks.", default: "'default'"},+ {name: 'children', type: 'ReactNode', description: 'System message content: a short, factual string like a date, a join/leave notice, or a status change.', required: true},+ {name: 'variant', type: "'default' | 'divider'", description: "Visual variant. 'default' renders centered text. 'divider' adds horizontal lines on each side via XDSDivider. Use for date separators and section breaks.", default: "'default'"},{name: 'icon', type: 'ReactNode', description: 'Leading icon that reinforces the message type. Wrap in XDSIcon for consistent sizing. Use for membership changes, encryption notices, or AI activity.',slotElements: [{__element: 'XDSIcon', props: {icon: 'check', size: 'sm'}}],},@@ -124,7 +124,7 @@ export const docs = {{name: 'placeholder', type: 'string', description: 'Placeholder text shown when the input is empty.', default: "'Type a message\u2026'"},{name: 'isDisabled', type: 'boolean', description: 'Disables the composer.', default: 'false'},{name: 'density', type: "'compact' | 'balanced' | 'spacious'", description: 'Visual density.', default: "'balanced'"},- {name: 'drawer', type: 'ReactNode', description: 'Slot: collapsible drawer above the input — attachments, context chips, etc. Use XDSChatComposerDrawer.',+ {name: 'drawer', type: 'ReactNode', description: 'Slot: collapsible drawer above the input for attachments, context chips, etc. Use XDSChatComposerDrawer.',slotElements: [{__element: 'XDSText', props: {type: 'body'}, children: 'Drawer content'}],},{name: 'headerActions', type: 'ReactNode', description: 'Slot: left-aligned header actions (attach, mention buttons). Use icon-only size="sm" buttons.',@@ -155,7 +155,7 @@ export const docs = {displayName: 'Chat Composer Input',description: 'Rich text input for the chat composer. Supports trigger menus (type @ or / to open a typeahead), inline tokens rendered as badges, message history recall with ArrowUp/Down, paste/drop file handling, and a 16px touch-device font-size floor to prevent iOS input zoom. Pass it to XDSChatComposer\'s input slot when you need more than a plain textarea.',props: [- {name: 'handleRef', type: 'React.Ref<XDSChatComposerInputHandle>', description: 'Imperative handle for programmatic control — insertToken, insertText, focus, and getValue.'},+ {name: 'handleRef', type: 'React.Ref<XDSChatComposerInputHandle>', description: 'Imperative handle for programmatic control: insertToken, insertText, focus, and getValue.'},{name: 'value', type: 'string', description: 'Controlled input value. Pair with onChange for two-way binding.'},{name: 'onChange', type: '(value: string) => void', description: 'Called when the input value changes. The serialized string includes token placeholders.'},{name: 'placeholder', type: 'string', description: 'Placeholder text shown when the input is empty.', default: "'Type a message\u2026'"},@@ -174,9 +174,9 @@ export const docs = {name: 'XDSChatComposerDrawer',isHiddenFromOverview: true,displayName: 'Chat Composer Drawer',- description: 'Collapsible drawer panel that sits above the chat input inside XDSChatComposer. Pass it to the composer\'s `drawer` slot to show attachments, context chips, or any supplementary content. When `count` is provided the drawer gains a collapse toggle — collapsed state shows a badge and label, expanded state shows all children.',+ description: 'Collapsible drawer panel that sits above the chat input inside XDSChatComposer. Pass it to the composer\'s `drawer` slot to show attachments, context chips, or any supplementary content. When `count` is provided the drawer gains a collapse toggle: collapsed state shows a badge and label, expanded state shows all children.',props: [- {name: 'children', type: 'ReactNode', description: 'Content to render inside the drawer — tokens, chips, previews, or any React elements.', required: true},+ {name: 'children', type: 'ReactNode', description: 'Content to render inside the drawer: tokens, chips, previews, or any React elements.', required: true},{name: 'count', type: 'number', description: 'Total item count shown in the collapsed badge. When provided, the drawer gains a collapse/expand toggle.'},{name: 'label', type: 'string', description: 'Label shown next to the count in collapsed state.', default: "'Items'"},{name: 'isCollapsed', type: 'boolean', description: 'Controlled collapsed state. Use with `onCollapsedChange` for external control.'},@@ -188,7 +188,7 @@ export const docs = {name: 'XDSChatSendButton',isHiddenFromOverview: true,displayName: 'Chat Send Button',- description: 'Circular send/stop toggle button for the chat composer. Place it inside XDSChatComposer where it reads context automatically — no wiring needed. When streaming starts, the button switches from a primary send icon to a secondary stop icon. Override any context value via props for standalone or custom usage.',+ description: 'Circular send/stop toggle button for the chat composer. Place it inside XDSChatComposer where it reads context automatically; no wiring needed. When streaming starts, the button switches from a primary send icon to a secondary stop icon. Override any context value via props for standalone or custom usage.',props: [{name: 'isStopShown', type: 'boolean', description: 'Whether the stop button is shown. Defaults to context value.'},{name: 'isDisabled', type: 'boolean', description: 'Whether the send button is disabled. Defaults to !canSend from context.'},@@ -201,7 +201,7 @@ export const docs = {slotElements: [{__element: 'XDSIcon', props: {icon: 'check', size: 'sm'}}],},{name: 'size', type: "'sm' | 'md'", description: 'Button size.', default: "'md'"},- {name: 'xstyle', type: 'StyleXStyles', description: 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value — not an inline style object like style={{}}.'},+ {name: 'xstyle', type: 'StyleXStyles', description: 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value, not an inline style object like style={{}}.'},],},{@@ -220,10 +220,10 @@ export const docs = {name: 'XDSChatTokenizedText',isHiddenFromOverview: true,displayName: 'Chat Tokenized Text',- description: 'Renders a text string with token patterns replaced by inline XDSBadge components. Wrap any message body inside XDSChatMessageBubble to turn raw @mentions, #tags, or /commands into styled badges. When no tokens match or none are provided, the text renders as-is — so you can use ChatTokenizedText unconditionally on every message.',+ description: 'Renders a text string with token patterns replaced by inline XDSBadge components. Wrap any message body inside XDSChatMessageBubble to turn raw @mentions, #tags, or /commands into styled badges. When no tokens match or none are provided, the text renders as-is, so you can use ChatTokenizedText unconditionally on every message.',props: [{name: 'children', type: 'string', description: 'The plain text message containing serialized token values. Patterns matching a token\'s value are replaced with badge components inline.', required: true},- {name: 'tokens', type: 'XDSChatComposerToken[]', description: 'Token definitions — same type returned by trigger onSelect. Each token has a value (the string to match), label (display text), and optional variant and icon. Uses the same type as the composer input, so token definitions work for both input and display.'},+ {name: 'tokens', type: 'XDSChatComposerToken[]', description: 'Token definitions: same type returned by trigger onSelect. Each token has a value (the string to match), label (display text), and optional variant and icon. Uses the same type as the composer input, so token definitions work for both input and display.'},],},{@@ -240,19 +240,19 @@ export const docs = {description: 'XDSChatMessageList is the scrollable container for chat messages. It renders children in a flex column with role="log" for accessibility, provides density context to child messages, and supports infinite scroll for loading older messages. Use it inside XDSChatLayout for full-page chat with auto-scroll and composer docking, or standalone for embedded message panels.',bestPractices: [{ guidance: true, description: 'Compose messages using MessageList > Message > Bubble for consistent sender-aware styling and density.' },- { guidance: true, description: 'Set the density prop to control spacing globally — compact for sidebars, balanced for most views, spacious for long-form reading. Individual messages can override.' },+ { guidance: true, description: 'Set the density prop to control spacing globally: compact for sidebars, balanced for most views, spacious for long-form reading. Individual messages can override.' },{ guidance: true, description: 'Use gap when top-level rows are independent (for example, LLM tool events or streamed blocks) and list spacing needs to be tuned separately from density.' },- { guidance: true, description: 'Use the group prop on bubbles (first, middle, last) when a single sender sends multiple consecutive messages — it tightens corner radius to visually connect them.' },+ { guidance: true, description: 'Use the group prop on bubbles (first, middle, last) when a single sender sends multiple consecutive messages; it tightens corner radius to visually connect them.' },{ guidance: true, description: 'Use XDSChatSystemMessage with variant="divider" for date separators and default for inline status notices like joins, leaves, or topic changes.' },{ guidance: true, description: 'Put name on the first bubble and metadata on the last bubble in a message so they align with the bubble\'s inline padding.' },{ guidance: true, description: 'Provide an emptyState prop so new users see a clear prompt to start a conversation instead of a blank screen.' },{ guidance: true, description: 'Use the ghost bubble variant for AI-style responses that show rich content like code blocks or markdown without a visible boundary.' },- { guidance: false, description: 'Don\'t use XDSChatSystemMessage for sender content — it has no avatar, alignment, or bubble. Use XDSChatMessage with a sender role instead.' },- { guidance: false, description: 'Don\'t put long or multi-line content in a system message — keep it to a single short sentence. If you need more, use a bubble or a card.' },- { guidance: false, description: 'Don\'t nest XDSChatMessage inside another XDSChatMessage — each message is a standalone article element with its own sender context.' },- { guidance: false, description: 'Don\'t apply a fixed height directly on the message list — wrap it in a sized container and let the list fill with flex: 1.' },- { guidance: false, description: 'Don\'t mix filled and ghost bubble variants within the same sender\'s messages — pick one style per side and use it consistently.' },- { guidance: false, description: 'Don\'t place metadata or names on both the bubble and the message wrapper — pick one based on whether the content has a bubble boundary.' },+ { guidance: false, description: 'Don\'t use XDSChatSystemMessage for sender content; it has no avatar, alignment, or bubble. Use XDSChatMessage with a sender role instead.' },+ { guidance: false, description: 'Don\'t put long or multi-line content in a system message; keep it to a single short sentence. If you need more, use a bubble or a card.' },+ { guidance: false, description: 'Don\'t nest XDSChatMessage inside another XDSChatMessage; each message is a standalone article element with its own sender context.' },+ { guidance: false, description: 'Don\'t apply a fixed height directly on the message list; wrap it in a sized container and let the list fill with flex: 1.' },+ { guidance: false, description: 'Don\'t mix filled and ghost bubble variants within the same sender\'s messages; pick one style per side and use it consistently.' },+ { guidance: false, description: 'Don\'t place metadata or names on both the bubble and the message wrapper; pick one based on whether the content has a bubble boundary.' },],anatomy: [{ name: 'Message area', required: true, description: 'Scrollable region for messages. Renders children (typically XDSChatMessageList) in a flex column that pushes content to the bottom when the list is short.' },@@ -262,7 +262,7 @@ export const docs = {{ name: 'Empty state', required: false, description: 'Centered placeholder shown when no messages exist. Use XDSEmptyState for a consistent look.' },{ name: 'Avatar', required: false, description: 'A sender avatar rendered beside the message. Typically XDSAvatar with size="small". Hidden for system messages.' },{ name: 'Name', required: false, description: 'Sender name above the message body. Place on the bubble when using bubbles, or on the message wrapper for raw content.' },- { name: 'Content', required: true, description: 'The message body — one or more XDSChatMessageBubble elements, or any free-form ReactNode like images or tool calls.' },+ { name: 'Content', required: true, description: 'The message body: one or more XDSChatMessageBubble elements, or any free-form ReactNode like images or tool calls.' },{ name: 'Metadata', required: false, description: 'Timestamp, delivery status, and footer actions below the message. Place on the last bubble or on the message wrapper.' },],},@@ -279,8 +279,8 @@ const chatLayoutComponent = {{ guidance: true, description: 'Pass XDSChatMessageList as children and XDSChatComposer as the composer prop for a complete chat interface.' },{ guidance: true, description: 'Provide an emptyState so new conversations show a prompt instead of a blank screen.' },{ guidance: true, description: 'Use scrollRef when the chat is embedded in a page where a parent element handles scrolling.' },- { guidance: false, description: 'Don\'t apply a fixed height on the layout — let it fill its container with flex: 1.' },- { guidance: false, description: 'Don\'t render multiple ChatLayout instances in the same scroll container — each expects to own its scroll context.' },+ { guidance: false, description: 'Don\'t apply a fixed height on the layout; let it fill its container with flex: 1.' },+ { guidance: false, description: 'Don\'t render multiple ChatLayout instances in the same scroll container; each expects to own its scroll context.' },],anatomy: [{ name: 'Message area', required: true, description: 'Scrollable region for messages. Renders children (typically XDSChatMessageList) in a flex column that pushes content to the bottom when the list is short.' },@@ -291,8 +291,8 @@ const chatLayoutComponent = {],},props: [- {name: 'children', type: 'ReactNode', description: 'Message content — typically XDSChatMessageList. Flows naturally in the page and scrolls with the container.', required: true},- {name: 'composer', type: 'ReactNode', description: 'Composer element — typically XDSChatComposer. Fixed to the bottom with a frosted glass dock.', required: true,+ {name: 'children', type: 'ReactNode', description: 'Message content, typically XDSChatMessageList. Flows naturally in the page and scrolls with the container.', required: true},+ {name: 'composer', type: 'ReactNode', description: 'Composer element, typically XDSChatComposer. Fixed to the bottom with a frosted glass dock.', required: true,slotElements: [{__element: 'XDSTextInput', props: {label: 'Input', placeholder: 'Type here...'}}],},{name: 'emptyState', type: 'ReactNode', description: 'Content shown when children is empty. Centered vertically in the message area.',@@ -308,11 +308,11 @@ const chatLayoutScrollButtonComponent = {name: 'XDSChatLayoutScrollButton',isHiddenFromOverview: true,displayName: 'Chat Layout Scroll Button',- description: 'Floating scroll-to-bottom button that appears when the user scrolls away from the latest messages. It fades in as a compact icon button and expands to show a label when new messages arrive. XDSChatLayout renders this by default — pass a custom element to the scrollButton prop to override, or null to hide it entirely.',+ description: 'Floating scroll-to-bottom button that appears when the user scrolls away from the latest messages. It fades in as a compact icon button and expands to show a label when new messages arrive. XDSChatLayout renders this by default; pass a custom element to the scrollButton prop to override, or null to hide it entirely.',props: [{name: 'isVisible', type: 'boolean', description: 'Whether the button is visible. Bind to a scroll-position check so the button only appears when the user has scrolled up.', required: true},{name: 'label', type: 'string', description: 'Optional label that expands the button (e.g. "New messages"). Use to signal unread content below the fold.'},- {name: 'onClick', type: '() => void', description: 'Click handler — typically scrolls to bottom and dismisses the new message indicator.', required: true},+ {name: 'onClick', type: '() => void', description: 'Click handler; typically scrolls to bottom and dismisses the new message indicator.', required: true},],};docs.components.push(chatLayoutScrollButtonComponent);@@ -323,18 +323,18 @@ export const docsZh = {description: 'XDSChatMessageList 是聊天消息的可滚动容器。它以 flex 列的形式渲染子元素,使用 role="log" 确保无障碍性,通过上下文向子消息提供密度设置,并支持无限滚动以加载更早的消息。在 XDSChatLayout 内使用它可获得全页聊天体验(自动滚动和编辑器停靠),也可独立用于嵌入式消息面板。',bestPractices: [{ guidance: true, description: '使用 MessageList > Message > Bubble 组合来获得一致的发送者感知样式和密度。' },- { guidance: true, description: '设置 density 属性来全局控制间距 — compact 用于侧边栏,balanced 用于大多数视图,spacious 用于长篇阅读。' },+ { guidance: true, description: '设置 density 属性来全局控制间距:compact 用于侧边栏,balanced 用于大多数视图,spacious 用于长篇阅读。' },{ guidance: true, description: '当同一发送者发送多条连续消息时,使用气泡的 group 属性(first、middle、last)来视觉上连接相关消息。' },{ guidance: true, description: '使用 XDSChatSystemMessage 的 variant="divider" 作为日期分隔线,使用 default 作为内联状态通知。' },{ guidance: true, description: '将 name 放在第一个气泡上,metadata 放在最后一个气泡上,使其与气泡的内边距对齐。' },{ guidance: true, description: '提供 emptyState 属性,让新用户看到开始对话的提示,而不是空白屏幕。' },{ guidance: true, description: '使用 ghost 气泡变体显示代码块或 Markdown 等富内容,无需可见边界。' },- { guidance: false, description: '不要将 XDSChatSystemMessage 用于发送者内容 — 它没有头像、对齐或气泡。请使用带有发送者角色的 XDSChatMessage。' },- { guidance: false, description: '不要在系统消息中放置冗长或多行内容 — 保持一句简短的话。如需更多内容,请使用气泡或卡片。' },- { guidance: false, description: '不要将 XDSChatMessage 嵌套在另一个 XDSChatMessage 内 — 每条消息都是独立的 article 元素。' },- { guidance: false, description: '不要直接在消息列表上应用固定高度 — 将其包裹在有尺寸的容器中,让列表以 flex: 1 填充。' },- { guidance: false, description: '不要在同一发送者的消息中混用 filled 和 ghost 气泡变体 — 每一侧选择一种样式并保持一致。' },- { guidance: false, description: '不要同时在气泡和消息包装器上放置 metadata 或 name — 根据内容是否有气泡边界来选择。' },+ { guidance: false, description: '不要将 XDSChatSystemMessage 用于发送者内容,它没有头像、对齐或气泡。请使用带有发送者角色的 XDSChatMessage。' },+ { guidance: false, description: '不要在系统消息中放置冗长或多行内容,保持一句简短的话。如需更多内容,请使用气泡或卡片。' },+ { guidance: false, description: '不要将 XDSChatMessage 嵌套在另一个 XDSChatMessage 内,每条消息都是独立的 article 元素。' },+ { guidance: false, description: '不要直接在消息列表上应用固定高度,将其包裹在有尺寸的容器中,让列表以 flex: 1 填充。' },+ { guidance: false, description: '不要在同一发送者的消息中混用 filled 和 ghost 气泡变体,每一侧选择一种样式并保持一致。' },+ { guidance: false, description: '不要同时在气泡和消息包装器上放置 metadata 或 name,根据内容是否有气泡边界来选择。' },],anatomy: [{ name: 'Message area', required: true, description: 'Scrollable region for messages. Renders children (typically XDSChatMessageList) in a flex column that pushes content to the bottom when the list is short.' },@@ -388,13 +388,13 @@ export const docsZh = {name: 'XDSChatMessageMetadata',displayName: 'Chat Message Metadata',description: '可组合的消息元数据行。渲染时间戳、页脚内容和发送状态。用户消息方向反转。',- propDescriptions: {timestamp: '时间戳内容 — 字符串或 XDSTimestamp 组件。', footer: '页脚内容 — 模型信息、反应按钮、复制按钮。', status: '消息发送状态。显示图标和标签。'},+ propDescriptions: {timestamp: '时间戳内容:字符串或 XDSTimestamp 组件。', footer: '页脚内容:模型信息、反应按钮、复制按钮。', status: '消息发送状态。显示图标和标签。'},},{name: 'XDSChatSystemMessage',displayName: 'Chat System Message',description: '居中的系统消息,用于日期分隔、成员变更和状态通知等非发送者内容。没有头像、对齐或气泡。使用 divider 变体做时间分隔,default 做内联状态更新。',- propDescriptions: {children: '系统消息内容 — 简短的事实性文本,如日期、加入/离开通知或状态变更。', variant: "视觉变体。'default' 渲染居中文本。'divider' 通过 XDSDivider 在两侧添加水平线 — 用于日期分隔和段落分隔。", icon: '增强消息类型辨识度的前置图标。使用 XDSIcon 包裹以获得一致的尺寸。'},+ propDescriptions: {children: '系统消息内容:简短的事实性文本,如日期、加入/离开通知或状态变更。', variant: "视觉变体。'default' 渲染居中文本。'divider' 通过 XDSDivider 在两侧添加水平线,用于日期分隔和段落分隔。", icon: '增强消息类型辨识度的前置图标。使用 XDSIcon 包裹以获得一致的尺寸。'},},{name: 'XDSChatComposer',@@ -409,7 +409,7 @@ export const docsZh = {placeholder: '输入为空时显示的占位文本。',isDisabled: '禁用编写器。',density: '视觉密度。',- drawer: '插槽:输入上方的可折叠抽屉——附件、上下文标签等。使用 XDSChatComposerDrawer。',+ drawer: '插槽:输入上方的可折叠抽屉,用于附件、上下文标签等。使用 XDSChatComposerDrawer。',headerActions: '插槽:标题左侧操作按钮(附件、提及按钮)。使用仅图标 size="sm" 按钮。',headerContext: '插槽:标题右侧上下文信息(上下文窗口使用情况、XDSProgressBar、辅助文本)。',input: '插槽:自定义输入元素。替换默认文本区域。使用 XDSChatComposerInput 实现触发菜单。',@@ -427,7 +427,7 @@ export const docsZh = {description:'聊天编写器的富文本输入。支持触发菜单(输入 @ 或 / 打开 typeahead)、内联标记徽章、ArrowUp/Down 消息历史回溯、粘贴/拖放文件处理,并在触控设备上将字体大小保持至少 16px 以避免 iOS 输入缩放。当需要普通文本区域以外的功能时,传入 XDSChatComposer 的 input 插槽。',propDescriptions: {- handleRef: '命令式句柄,用于编程式控制 — insertToken、insertText、focus 和 getValue。',+ handleRef: '命令式句柄,用于编程式控制:insertToken、insertText、focus 和 getValue。',value: '受控输入值。与 onChange 配对实现双向绑定。',onChange: '输入值变更时调用。序列化字符串包含标记占位符。',placeholder: '输入为空时显示的占位文本。',@@ -447,7 +447,7 @@ export const docsZh = {isHiddenFromOverview: true,displayName: 'Chat Composer Drawer',description: '位于聊天输入上方的可折叠抽屉面板。传入 XDSChatComposer 的 `drawer` 插槽,用于显示附件、上下文标签或预览内容。提供 `count` 时启用折叠切换。',- propDescriptions: {children: '抽屉内渲染的内容——标记、标签、预览或任何 React 元素。', count: '折叠徽章中显示的总数。提供时,抽屉获得折叠/展开切换。', label: '折叠状态下显示在数量旁边的标签。', isCollapsed: '受控折叠状态。与 onCollapsedChange 一起使用。', defaultIsCollapsed: '非受控模式的初始折叠状态。', onCollapsedChange: '用户切换抽屉时触发的回调。'},+ propDescriptions: {children: '抽屉内渲染的内容:标记、标签、预览或任何 React 元素。', count: '折叠徽章中显示的总数。提供时,抽屉获得折叠/展开切换。', label: '折叠状态下显示在数量旁边的标签。', isCollapsed: '受控折叠状态。与 onCollapsedChange 一起使用。', defaultIsCollapsed: '非受控模式的初始折叠状态。', onCollapsedChange: '用户切换抽屉时触发的回调。'},},{name: 'XDSChatSendButton',@@ -486,7 +486,7 @@ export const docsZh = {displayName: 'Chat Tokenized Text',description:'渲染带有标记模式的文本,将匹配的模式替换为内联 XDSBadge 组件。在 XDSChatMessageBubble 内使用,将 @提及、#标签或 /命令显示为样式化徽章。未提供标记时以纯文本渲染,因此可以无条件使用。',- propDescriptions: {children: '包含序列化标记值的纯文本消息。匹配标记值的模式将被替换为内联徽章组件。', tokens: '标记定义 — 与触发器 onSelect 返回的类型相同。每个包含 value(匹配字符串)、label(显示文本)以及可选的 variant 和 icon。'},+ propDescriptions: {children: '包含序列化标记值的纯文本消息。匹配标记值的模式将被替换为内联徽章组件。', tokens: '标记定义:与触发器 onSelect 返回的类型相同。每个包含 value(匹配字符串)、label(显示文本)以及可选的 variant 和 icon。'},},{name: 'XDSChatComposerTokenElement',@@ -500,8 +500,8 @@ export const docsZh = {displayName: 'Chat Layout',description: '完整聊天界面的布局外壳。消息在页面中自然流动,编写器固定在底部,带有毛玻璃效果。通过容器宽度自动适配密度。',propDescriptions: {- children: '消息内容 — 通常是 XDSChatMessageList。在页面中自然流动。',- composer: '编写器元素 — 通常是 XDSChatComposer。固定在底部,带有毛玻璃底座。',+ children: '消息内容:通常是 XDSChatMessageList。在页面中自然流动。',+ composer: '编写器元素:通常是 XDSChatComposer。固定在底部,带有毛玻璃底座。',emptyState: '子元素为空时显示的内容。',scrollButton: '编写器上方的滚动到底部按钮。默认使用 XDSChatLayoutScrollButton。传入 null 隐藏。',scrollRef: '外部滚动容器引用。提供时,自动滚动和滚动到底部将目标指向此元素。',@@ -512,7 +512,7 @@ export const docsZh = {isHiddenFromOverview: true,displayName: 'Chat Layout Scroll Button',description: '可组合的滚动到底部按钮。可见时淡入,提供标签时展开。',- propDescriptions: {isVisible: '按钮是否可见。', label: '可选标签 — 展开按钮(如"新消息")。', onClick: '点击处理器。'},+ propDescriptions: {isVisible: '按钮是否可见。', label: '可选标签:展开按钮(如"新消息")。', onClick: '点击处理器。'},},],};@@ -524,19 +524,19 @@ export const docsDense = {description: 'XDSChatMessageList: scrollable msg container w/ role="log", density context, infinite scroll. Use inside XDSChatLayout for full-page chat or standalone for embedded panels.',bestPractices: [{ guidance: true, description: 'MessageList > Message > Bubble for sender-aware styling.' },- { guidance: true, description: 'Density prop controls global spacing — compact for sidebars, balanced default, spacious for reading.' },+ { guidance: true, description: 'Density prop controls global spacing: compact for sidebars, balanced default, spacious for reading.' },{ guidance: true, description: 'gap tunes top-level row spacing separately from density for independent LLM/tool-event rows.' },- { guidance: true, description: 'Group prop on bubbles (first/middle/last) for consecutive same-sender messages — tightens corner radius.' },+ { guidance: true, description: 'Group prop on bubbles (first/middle/last) for consecutive same-sender messages; tightens corner radius.' },{ guidance: true, description: 'SystemMessage: divider variant for date breaks, default for status notices.' },- { guidance: true, description: 'Name on first bubble, metadata on last — aligns with bubble inline padding.' },+ { guidance: true, description: 'Name on first bubble, metadata on last; aligns with bubble inline padding.' },{ guidance: true, description: 'Provide emptyState so new users see a prompt, not a blank screen.' },{ guidance: true, description: 'Ghost bubble variant for rich AI content like code/markdown without visible boundary.' },- { guidance: false, description: 'SystemMessage for sender content — no avatar/alignment/bubble. Use ChatMessage instead.' },- { guidance: false, description: 'Long/multi-line system messages — keep to a single short sentence.' },- { guidance: false, description: 'Nesting XDSChatMessage inside another — each is a standalone article.' },- { guidance: false, description: 'Fixed height on message list directly — wrap in a sized container, let flex: 1 fill.' },- { guidance: false, description: 'Mix filled and ghost variants in same sender\'s messages — pick one style per side.' },- { guidance: false, description: 'Metadata/names on both bubble and wrapper — pick one.' },+ { guidance: false, description: 'SystemMessage for sender content: no avatar/alignment/bubble. Use ChatMessage instead.' },+ { guidance: false, description: 'Long/multi-line system messages: keep to a single short sentence.' },+ { guidance: false, description: 'Nesting XDSChatMessage inside another: each is a standalone article.' },+ { guidance: false, description: 'Fixed height on message list directly: wrap in a sized container, let flex: 1 fill.' },+ { guidance: false, description: 'Mix filled and ghost variants in same sender\'s messages: pick one style per side.' },+ { guidance: false, description: 'Metadata/names on both bubble and wrapper: pick one.' },],},components: [@@ -614,7 +614,7 @@ export const docsDense = {placeholder: 'placeholder when empty',isDisabled: 'disabled; use during streaming or unmet prereqs',density: 'visual density',- drawer: 'slot: collapsible drawer above input — attachments, context chips, etc.; use XDSChatComposerDrawer',+ drawer: 'slot: collapsible drawer above input for attachments, context chips, etc.; use XDSChatComposerDrawer',headerActions: 'slot: left header actions (attach, mention); icon-only sm buttons',headerContext: 'slot: right header context info (window usage, XDSProgressBar, text)',input: 'slot: custom input; replaces default textarea; use XDSChatComposerInput for triggers',@@ -652,7 +652,7 @@ export const docsDense = {displayName: 'Chat Composer Drawer',description: 'collapsible drawer above chat input; pass to composer `drawer` slot for attachments, context chips, previews. `count` enables collapse toggle',propDescriptions: {- children: 'drawer content — tokens, chips, previews, any React elements',+ children: 'drawer content: tokens, chips, previews, any React elements',count: 'total count for collapsed badge; enables collapse/expand toggle',label: 'collapsed label next to count badge',isCollapsed: 'controlled collapsed state',@@ -723,7 +723,7 @@ export const docsDense = {displayName: 'Chat Layout Scroll Button',description: 'floating scroll-to-bottom btn; fades in when scrolled up, expands w/ label for new msgs. Default in XDSChatLayout; override via scrollButton prop.',propDescriptions: {- isVisible: 'btn visibility — bind to scroll-position check',+ isVisible: 'btn visibility; bind to scroll-position check',label: 'optional label; expands btn (e.g. "New messages")',onClick: 'click handler',},diff --git a/packages/core/src/Chat/ChatToolCalls.doc.mjs b/packages/core/src/Chat/ChatToolCalls.doc.mjsindex 9c649bde02..ab9952084e 100644--- a/packages/core/src/Chat/ChatToolCalls.doc.mjs+++ b/packages/core/src/Chat/ChatToolCalls.doc.mjs@@ -12,21 +12,21 @@ export const docs = {usage: {description:- 'ChatToolCalls displays tool or function call invocations from an LLM response. Pass an array of calls and the component handles the rest — a single call renders inline, while multiple calls collapse into a summary with the latest call visible at the surface. Use it anywhere an AI agent shows what actions it took.',+ 'ChatToolCalls displays tool or function call invocations from an LLM response. Pass an array of calls and the component handles the rest: a single call renders inline, while multiple calls collapse into a summary with the latest call visible at the surface. Use it anywhere an AI agent shows what actions it took.',bestPractices: [- {guidance: true, description: 'Include a target string on every call so the user can see what the tool acted on — a file path, a shell command, or a search query.'},+ {guidance: true, description: 'Include a target string on every call so the user can see what the tool acted on: a file path, a shell command, or a search query.'},{guidance: true, description: 'Show a duration on completed calls so users can judge which tools are slow and understand why a response took time.'},- {guidance: true, description: 'Provide resultDetail with a code block for calls that produce output — diffs for edits, terminal output for shell commands — so users can inspect results inline.'},+ {guidance: true, description: 'Provide resultDetail with a code block for calls that produce output (diffs for edits, terminal output for shell commands) so users can inspect results inline.'},{guidance: true, description: 'Set a unique key on each call item when streaming so React can animate additions without re-mounting completed rows.'},- {guidance: false, description: "Don't omit the status field — without it the call defaults to complete, which is misleading for calls that are still running or have failed."},- {guidance: false, description: "Don't display tool calls outside a chat message context — they are designed to sit inside an assistant message, not as standalone UI."},- {guidance: false, description: "Don't use custom wrappers around individual calls — the component handles single vs. grouped layout automatically based on the array length."},+ {guidance: false, description: "Don't omit the status field. Without it the call defaults to complete, which is misleading for calls that are still running or have failed."},+ {guidance: false, description: "Don't display tool calls outside a chat message context; they are designed to sit inside an assistant message, not as standalone UI."},+ {guidance: false, description: "Don't use custom wrappers around individual calls; the component handles single vs. grouped layout automatically based on the array length."},],anatomy: [{name: 'Status icon', required: true, description: 'A colored circle with a check, cross, or spinner indicating whether the call is pending, running, complete, or errored.'},- {name: 'Tool name', required: true, description: 'The function or tool name displayed in monospace — bash, edit, read, web_search, etc.'},+ {name: 'Tool name', required: true, description: 'The function or tool name displayed in monospace: bash, edit, read, web_search, etc.'},{name: 'Node badge', required: false, description: 'A neutral pill badge showing which sandbox or environment ran the tool, like cli:remote-server or workspace.'},- {name: 'Target label', required: false, description: 'The target of the action — a file path, command, or search query — shown after the tool name.'},+ {name: 'Target label', required: false, description: 'The target of the action (a file path, command, or search query) shown after the tool name.'},{name: 'Diff stats', required: false, description: 'Green additions and red deletions counts for edit operations, displayed inline after the target.'},{name: 'Duration', required: false, description: 'Execution time shown on the trailing edge for completed calls.'},{name: 'Group header', required: false, description: 'A wrench icon with a call count, shown when multiple calls are present. Clicking toggles between the summary and the full list.'},@@ -68,7 +68,7 @@ export const docs = {name: 'xstyle',type: 'StyleXStyles',description:- 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value — not an inline style object like style={{}}.',+ 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value, not an inline style object like style={{}}.',},],};@@ -77,15 +77,15 @@ export const docs = {export const docsZh = {usage: {description:- 'ChatToolCalls displays tool or function call invocations from an LLM response. Pass an array of calls and the component handles the rest — a single call renders inline, while multiple calls collapse into a summary with the latest call visible at the surface. Use it anywhere an AI agent shows what actions it took.',+ 'ChatToolCalls displays tool or function call invocations from an LLM response. Pass an array of calls and the component handles the rest: a single call renders inline, while multiple calls collapse into a summary with the latest call visible at the surface. Use it anywhere an AI agent shows what actions it took.',bestPractices: [- {guidance: true, description: 'Include a target string on every call so the user can see what the tool acted on — a file path, a shell command, or a search query.'},+ {guidance: true, description: 'Include a target string on every call so the user can see what the tool acted on: a file path, a shell command, or a search query.'},{guidance: true, description: 'Show a duration on completed calls so users can judge which tools are slow and understand why a response took time.'},- {guidance: true, description: 'Provide resultDetail with a code block for calls that produce output — diffs for edits, terminal output for shell commands — so users can inspect results inline.'},+ {guidance: true, description: 'Provide resultDetail with a code block for calls that produce output (diffs for edits, terminal output for shell commands) so users can inspect results inline.'},{guidance: true, description: 'Set a unique key on each call item when streaming so React can animate additions without re-mounting completed rows.'},- {guidance: false, description: "Don't omit the status field — without it the call defaults to complete, which is misleading for calls that are still running or have failed."},- {guidance: false, description: "Don't display tool calls outside a chat message context — they are designed to sit inside an assistant message, not as standalone UI."},- {guidance: false, description: "Don't use custom wrappers around individual calls — the component handles single vs. grouped layout automatically based on the array length."},+ {guidance: false, description: "Don't omit the status field. Without it the call defaults to complete, which is misleading for calls that are still running or have failed."},+ {guidance: false, description: "Don't display tool calls outside a chat message context; they are designed to sit inside an assistant message, not as standalone UI."},+ {guidance: false, description: "Don't use custom wrappers around individual calls; the component handles single vs. grouped layout automatically based on the array length."},],},propDescriptions: {@@ -104,13 +104,13 @@ export const docsDense = {description:'Displays tool or function call invocations from an LLM response. Single call renders inline; multiple calls collapse into a summary. Use inside assistant messages.',bestPractices: [- {guidance: true, description: 'Include target on every call — file path, command, or search query.'},+ {guidance: true, description: 'Include target on every call: file path, command, or search query.'},{guidance: true, description: 'Show duration on completed calls so users understand timing.'},{guidance: true, description: 'Provide resultDetail with code blocks for calls that produce output.'},{guidance: true, description: 'Set unique key on each call item when streaming for stable animations.'},- {guidance: false, description: "Don't omit status — defaults to complete, misleading for running/failed calls."},- {guidance: false, description: "Don't display outside chat message context — designed for assistant messages."},- {guidance: false, description: "Don't wrap individual calls — component handles single vs. grouped layout automatically."},+ {guidance: false, description: "Don't omit status; defaults to complete, misleading for running/failed calls."},+ {guidance: false, description: "Don't display outside chat message context; designed for assistant messages."},+ {guidance: false, description: "Don't wrap individual calls; component handles single vs. grouped layout automatically."},],},propDescriptions: {diff --git a/packages/core/src/CheckboxList/CheckboxList.doc.mjs b/packages/core/src/CheckboxList/CheckboxList.doc.mjsindex 9cde5fc902..3f6b887670 100644--- a/packages/core/src/CheckboxList/CheckboxList.doc.mjs+++ b/packages/core/src/CheckboxList/CheckboxList.doc.mjs@@ -145,13 +145,13 @@ export const docs = {},],usage: {- description: 'CheckboxList shows a small group of checkboxes so users can turn several options on or off at once. Place it in settings pages, filter panels, or forms where every choice should be visible without scrolling. For a single standalone checkbox — like "I agree to the terms" — use CheckboxInput instead. If only one option can be picked, use RadioList. If the list is long enough to need searching or scrolling, use MultiSelector instead.',+ description: 'CheckboxList shows a small group of checkboxes so users can turn several options on or off at once. Place it in settings pages, filter panels, or forms where every choice should be visible without scrolling. For a single standalone checkbox (like "I agree to the terms"), use CheckboxInput instead. If only one option can be picked, use RadioList. If the list is long enough to need searching or scrolling, use MultiSelector instead.',bestPractices: [- { guidance: true, description: 'Keep the list short — three to seven options is the sweet spot. Beyond that, switch to MultiSelector which adds search and scrolling.' },- { guidance: true, description: 'Turn on dividers (hasDividers) when items have helper text underneath — without them the labels and descriptions blur together.' },- { guidance: true, description: 'Write a group label that says what the choices represent — "Export formats" tells users more than "Options".' },- { guidance: false, description: 'Show a CheckboxList when the user can only pick one thing — that is what RadioList is for.' },- { guidance: false, description: 'Put buttons or links inside the trailing slot (endContent) — the whole row is already tappable, so a nested button creates two competing click targets.' },+ { guidance: true, description: 'Keep the list short: three to seven options is the sweet spot. Beyond that, switch to MultiSelector which adds search and scrolling.' },+ { guidance: true, description: 'Turn on dividers (hasDividers) when items have helper text underneath; without them the labels and descriptions blur together.' },+ { guidance: true, description: 'Write a group label that says what the choices represent: "Export formats" tells users more than "Options".' },+ { guidance: false, description: 'Show a CheckboxList when the user can only pick one thing; that is what RadioList is for.' },+ { guidance: false, description: 'Put buttons or links inside the trailing slot (endContent); the whole row is already tappable, so a nested button creates two competing click targets.' },],},};@@ -161,13 +161,13 @@ export const docsZh = {name: 'CheckboxList',displayName: 'Checkbox List',usage: {- description: 'CheckboxList shows a small group of checkboxes so users can turn several options on or off at once. Place it in settings pages, filter panels, or forms where every choice should be visible without scrolling. For a single standalone checkbox — like "I agree to the terms" — use CheckboxInput instead. If only one option can be picked, use RadioList. If the list is long enough to need searching or scrolling, use MultiSelector instead.',+ description: 'CheckboxList shows a small group of checkboxes so users can turn several options on or off at once. Place it in settings pages, filter panels, or forms where every choice should be visible without scrolling. For a single standalone checkbox (like "I agree to the terms"), use CheckboxInput instead. If only one option can be picked, use RadioList. If the list is long enough to need searching or scrolling, use MultiSelector instead.',bestPractices: [- { guidance: true, description: 'Keep the list short — three to seven options is the sweet spot. Beyond that, switch to MultiSelector which adds search and scrolling.' },- { guidance: true, description: 'Turn on dividers (hasDividers) when items have helper text underneath — without them the labels and descriptions blur together.' },- { guidance: true, description: 'Write a group label that says what the choices represent — "Export formats" tells users more than "Options".' },- { guidance: false, description: 'Show a CheckboxList when the user can only pick one thing — that is what RadioList is for.' },- { guidance: false, description: 'Put buttons or links inside the trailing slot (endContent) — the whole row is already tappable, so a nested button creates two competing click targets.' },+ { guidance: true, description: 'Keep the list short: three to seven options is the sweet spot. Beyond that, switch to MultiSelector which adds search and scrolling.' },+ { guidance: true, description: 'Turn on dividers (hasDividers) when items have helper text underneath; without them the labels and descriptions blur together.' },+ { guidance: true, description: 'Write a group label that says what the choices represent: "Export formats" tells users more than "Options".' },+ { guidance: false, description: 'Show a CheckboxList when the user can only pick one thing; that is what RadioList is for.' },+ { guidance: false, description: 'Put buttons or links inside the trailing slot (endContent); the whole row is already tappable, so a nested button creates two competing click targets.' },],},components: [@@ -215,13 +215,13 @@ export const docsDense = {description:'Checkbox group component for multi-value selection. Collection mode (parent state) + standalone mode (per-item state).',usage: {- description: 'CheckboxList shows a small group of checkboxes so users can turn several options on or off at once. Place it in settings pages, filter panels, or forms where every choice should be visible without scrolling. For a single standalone checkbox — like "I agree to the terms" — use CheckboxInput instead. If only one option can be picked, use RadioList. If the list is long enough to need searching or scrolling, use MultiSelector instead.',+ description: 'CheckboxList shows a small group of checkboxes so users can turn several options on or off at once. Place it in settings pages, filter panels, or forms where every choice should be visible without scrolling. For a single standalone checkbox (like "I agree to the terms"), use CheckboxInput instead. If only one option can be picked, use RadioList. If the list is long enough to need searching or scrolling, use MultiSelector instead.',bestPractices: [- { guidance: true, description: 'Keep the list short — three to seven options is the sweet spot. Beyond that, switch to MultiSelector which adds search and scrolling.' },- { guidance: true, description: 'Turn on dividers (hasDividers) when items have helper text underneath — without them the labels and descriptions blur together.' },- { guidance: true, description: 'Write a group label that says what the choices represent — "Export formats" tells users more than "Options".' },- { guidance: false, description: 'Show a CheckboxList when the user can only pick one thing — that is what RadioList is for.' },- { guidance: false, description: 'Put buttons or links inside the trailing slot (endContent) — the whole row is already tappable, so a nested button creates two competing click targets.' },+ { guidance: true, description: 'Keep the list short: three to seven options is the sweet spot. Beyond that, switch to MultiSelector which adds search and scrolling.' },+ { guidance: true, description: 'Turn on dividers (hasDividers) when items have helper text underneath; without them the labels and descriptions blur together.' },+ { guidance: true, description: 'Write a group label that says what the choices represent: "Export formats" tells users more than "Options".' },+ { guidance: false, description: 'Show a CheckboxList when the user can only pick one thing; that is what RadioList is for.' },+ { guidance: false, description: 'Put buttons or links inside the trailing slot (endContent); the whole row is already tappable, so a nested button creates two competing click targets.' },],},components: [diff --git a/packages/core/src/FormLayout/FormLayout.doc.mjs b/packages/core/src/FormLayout/FormLayout.doc.mjsindex 35c6f2e384..b33ad3e5d5 100644--- a/packages/core/src/FormLayout/FormLayout.doc.mjs+++ b/packages/core/src/FormLayout/FormLayout.doc.mjs@@ -26,7 +26,7 @@ export const docs = {name: 'xstyle',type: 'StyleXStyles',description:- 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value — not an inline style object like style={{}}.',+ 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value, not an inline style object like style={{}}.',},],theming: {@@ -35,14 +35,14 @@ export const docs = {],},usage: {- description: 'A layout container that arranges form fields with consistent spacing and direction. FormLayout handles where fields go — not state or submission. Wrap it in a <form> for that. Supports vertical (default), horizontal, and horizontal-labels directions, and can be nested to mix them.',+ description: 'A layout container that arranges form fields with consistent spacing and direction. FormLayout handles where fields go, not state or submission. Wrap it in a <form> for that. Supports vertical (default), horizontal, and horizontal-labels directions, and can be nested to mix them.',bestPractices: [- { guidance: true, description: 'Stack fields vertically for most forms — it\'s the easiest to scan top to bottom.' },+ { guidance: true, description: 'Stack fields vertically for most forms. It\'s the easiest to scan top to bottom.' },{ guidance: true, description: 'Nest a horizontal FormLayout inside a vertical one when fields naturally pair up, like First Name + Last Name or City + State + ZIP.' },{ guidance: true, description: 'Use horizontal-labels for settings pages where labels sit beside their inputs.' },- { guidance: false, description: 'Use FormLayout for form state or submission — it\'s just layout. Wrap it in a <form> for that.' },- { guidance: false, description: 'Put unrelated fields side by side in a horizontal layout — save it for fields that belong together.' },- { guidance: false, description: 'Nest horizontal-labels inside another FormLayout — it uses CSS Grid and needs to be the outermost container.' },+ { guidance: false, description: 'Use FormLayout for form state or submission. It\'s just layout. Wrap it in a <form> for that.' },+ { guidance: false, description: 'Put unrelated fields side by side in a horizontal layout. Save it for fields that belong together.' },+ { guidance: false, description: 'Nest horizontal-labels inside another FormLayout. It uses CSS Grid and needs to be the outermost container.' },],anatomy: [{name: 'Form title', required: false, description: 'Heading that describes the purpose of the form.'},@@ -83,14 +83,14 @@ export const docsZh = {],},usage: {- description: 'A layout container that arranges form fields with consistent spacing and direction. FormLayout handles where fields go — not state or submission. Wrap it in a <form> for that. Supports vertical (default), horizontal, and horizontal-labels directions, and can be nested to mix them.',+ description: 'A layout container that arranges form fields with consistent spacing and direction. FormLayout handles where fields go, not state or submission. Wrap it in a <form> for that. Supports vertical (default), horizontal, and horizontal-labels directions, and can be nested to mix them.',bestPractices: [- { guidance: true, description: 'Stack fields vertically for most forms — it\'s the easiest to scan top to bottom.' },+ { guidance: true, description: 'Stack fields vertically for most forms. It\'s the easiest to scan top to bottom.' },{ guidance: true, description: 'Nest a horizontal FormLayout inside a vertical one when fields naturally pair up, like First Name + Last Name or City + State + ZIP.' },{ guidance: true, description: 'Use horizontal-labels for settings pages where labels sit beside their inputs.' },- { guidance: false, description: 'Use FormLayout for form state or submission — it\'s just layout. Wrap it in a <form> for that.' },- { guidance: false, description: 'Put unrelated fields side by side in a horizontal layout — save it for fields that belong together.' },- { guidance: false, description: 'Nest horizontal-labels inside another FormLayout — it uses CSS Grid and needs to be the outermost container.' },+ { guidance: false, description: 'Use FormLayout for form state or submission. It\'s just layout. Wrap it in a <form> for that.' },+ { guidance: false, description: 'Put unrelated fields side by side in a horizontal layout. Save it for fields that belong together.' },+ { guidance: false, description: 'Nest horizontal-labels inside another FormLayout. It uses CSS Grid and needs to be the outermost container.' },],anatomy: [{name: 'Form title', required: false, description: 'Heading that describes the purpose of the form.'},@@ -105,14 +105,14 @@ export const docsDense = {description:'Layout container for form fields w/ consistent spacing + direction.',usage: {- description: 'A layout container that arranges form fields with consistent spacing and direction. FormLayout handles where fields go — not state or submission. Wrap it in a <form> for that. Supports vertical (default), horizontal, and horizontal-labels directions, and can be nested to mix them.',+ description: 'A layout container that arranges form fields with consistent spacing and direction. FormLayout handles where fields go, not state or submission. Wrap it in a <form> for that. Supports vertical (default), horizontal, and horizontal-labels directions, and can be nested to mix them.',bestPractices: [- { guidance: true, description: 'Stack fields vertically for most forms — it\'s the easiest to scan top to bottom.' },+ { guidance: true, description: 'Stack fields vertically for most forms. It\'s the easiest to scan top to bottom.' },{ guidance: true, description: 'Nest a horizontal FormLayout inside a vertical one when fields naturally pair up, like First Name + Last Name or City + State + ZIP.' },{ guidance: true, description: 'Use horizontal-labels for settings pages where labels sit beside their inputs.' },- { guidance: false, description: 'Use FormLayout for form state or submission — it\'s just layout. Wrap it in a <form> for that.' },- { guidance: false, description: 'Put unrelated fields side by side in a horizontal layout — save it for fields that belong together.' },- { guidance: false, description: 'Nest horizontal-labels inside another FormLayout — it uses CSS Grid and needs to be the outermost container.' },+ { guidance: false, description: 'Use FormLayout for form state or submission. It\'s just layout. Wrap it in a <form> for that.' },+ { guidance: false, description: 'Put unrelated fields side by side in a horizontal layout. Save it for fields that belong together.' },+ { guidance: false, description: 'Nest horizontal-labels inside another FormLayout. It uses CSS Grid and needs to be the outermost container.' },],anatomy: [{name: 'Form title', required: false, description: 'Heading that describes the purpose of the form.'},diff --git a/packages/core/src/Kbd/Kbd.doc.mjs b/packages/core/src/Kbd/Kbd.doc.mjsindex 11c9805054..2a2b707117 100644--- a/packages/core/src/Kbd/Kbd.doc.mjs+++ b/packages/core/src/Kbd/Kbd.doc.mjs@@ -19,19 +19,19 @@ export const docs = {name: 'xstyle',type: 'StyleXStyles',description:- 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value — not an inline style object like style={{}}.',+ 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value, not an inline style object like style={{}}.',},{name: 'className',type: 'string',description:- 'CSS class name for the root element. Prefer xstyle for styling — className is provided for integration with non-StyleX systems.',+ 'CSS class name for the root element. Prefer xstyle for styling; className is provided for integration with non-StyleX systems.',},{name: 'style',type: 'CSSProperties',description:- 'Inline styles for the root element. Prefer xstyle for styling — inline styles bypass StyleX optimization.',+ 'Inline styles for the root element. Prefer xstyle for styling; inline styles bypass StyleX optimization.',},],theming: {@@ -40,9 +40,9 @@ export const docs = {usage: {description: 'Renders a keyboard shortcut as styled key badges. Use Kbd in tooltips, menus, and help text to show key combinations.',bestPractices: [- { guidance: true, description: 'Place shortcuts near the action they trigger — in a tooltip, menu item, or inline instruction.' },- { guidance: true, description: 'Use mod instead of ctrl or cmd — it automatically adapts to the user\'s platform.' },- { guidance: false, description: 'Use Kbd as the only way to discover an action — shortcuts should supplement visible controls, not replace them.' },+ { guidance: true, description: 'Place shortcuts near the action they trigger: in a tooltip, menu item, or inline instruction.' },+ { guidance: true, description: 'Use mod instead of ctrl or cmd; it automatically adapts to the user\'s platform.' },+ { guidance: false, description: 'Use Kbd as the only way to discover an action; shortcuts should supplement visible controls, not replace them.' },],},};@@ -63,19 +63,19 @@ export const docsZh = {name: 'xstyle',type: 'StyleXStyles',description:- '用于布局自定义的 StyleX 样式(边距、定位、尺寸)。必须是 stylex.create() 的值 — 这不能是 style={{}} 这样的内联样式对象。',+ '用于布局自定义的 StyleX 样式(边距、定位、尺寸)。必须是 stylex.create() 的值,这不能是 style={{}} 这样的内联样式对象。',},{name: 'className',type: 'string',description:- '根元素的 CSS 类名。建议优先使用 xstyle 进行样式设置 — className 用于与非 StyleX 系统的集成。',+ '根元素的 CSS 类名。建议优先使用 xstyle 进行样式设置,className 用于与非 StyleX 系统的集成。',},{name: 'style',type: 'CSSProperties',description:- '根元素的内联样式。建议优先使用 xstyle 进行样式设置 — 内联样式会绕过 StyleX 优化。',+ '根元素的内联样式。建议优先使用 xstyle 进行样式设置,内联样式会绕过 StyleX 优化。',},],theming: {@@ -84,9 +84,9 @@ export const docsZh = {usage: {description: 'Renders a keyboard shortcut as styled key badges. Use Kbd in tooltips, menus, and help text to show key combinations.',bestPractices: [- { guidance: true, description: 'Place shortcuts near the action they trigger — in a tooltip, menu item, or inline instruction.' },- { guidance: true, description: 'Use mod instead of ctrl or cmd — it automatically adapts to the user\'s platform.' },- { guidance: false, description: 'Use Kbd as the only way to discover an action — shortcuts should supplement visible controls, not replace them.' },+ { guidance: true, description: 'Place shortcuts near the action they trigger: in a tooltip, menu item, or inline instruction.' },+ { guidance: true, description: 'Use mod instead of ctrl or cmd; it automatically adapts to the user\'s platform.' },+ { guidance: false, description: 'Use Kbd as the only way to discover an action; shortcuts should supplement visible controls, not replace them.' },],},};@@ -98,9 +98,9 @@ export const docsDense = {usage: {description: 'Renders a keyboard shortcut as styled key badges. Use Kbd in tooltips, menus, and help text to show key combinations.',bestPractices: [- { guidance: true, description: 'Place shortcuts near the action they trigger — in a tooltip, menu item, or inline instruction.' },- { guidance: true, description: 'Use mod instead of ctrl or cmd — it automatically adapts to the user\'s platform.' },- { guidance: false, description: 'Use Kbd as the only way to discover an action — shortcuts should supplement visible controls, not replace them.' },+ { guidance: true, description: 'Place shortcuts near the action they trigger: in a tooltip, menu item, or inline instruction.' },+ { guidance: true, description: 'Use mod instead of ctrl or cmd; it automatically adapts to the user\'s platform.' },+ { guidance: false, description: 'Use Kbd as the only way to discover an action; shortcuts should supplement visible controls, not replace them.' },],},propDescriptions: {diff --git a/packages/core/src/Markdown/Markdown.doc.mjs b/packages/core/src/Markdown/Markdown.doc.mjsindex 87ac98085d..15da669ca3 100644--- a/packages/core/src/Markdown/Markdown.doc.mjs+++ b/packages/core/src/Markdown/Markdown.doc.mjs@@ -41,7 +41,7 @@ export const docs = {name: 'isStreaming',type: 'boolean',description:- 'Enables streaming mode — uses incremental parsing and a smooth fade-in animation for chunk-by-chunk text delivery.',+ 'Enables streaming mode; it uses incremental parsing and a smooth fade-in animation for chunk-by-chunk text delivery.',default: 'false',},{@@ -86,19 +86,19 @@ export const docs = {name: 'xstyle',type: 'StyleXStyles',description:- 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value — not an inline style object like style={{}}.',+ 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value, not an inline style object like style={{}}.',},{name: 'className',type: 'string',description:- 'CSS class name for the root element. Prefer xstyle for styling — className is provided for integration with non-StyleX systems.',+ 'CSS class name for the root element. Prefer xstyle for styling; className is provided for integration with non-StyleX systems.',},{name: 'style',type: 'CSSProperties',description:- 'Inline styles for the root element. Prefer xstyle for styling — inline styles bypass StyleX optimization.',+ 'Inline styles for the root element. Prefer xstyle for styling; inline styles bypass StyleX optimization.',},{name: 'data-testid',@@ -118,12 +118,12 @@ export const docs = {},usage: {description:- 'Renders a markdown string as XDS-styled components. Use Markdown for user-generated content, AI responses, and documentation — it handles headings, lists, tables, code blocks, and citations with consistent styling.',+ 'Renders a markdown string as XDS-styled components. Use Markdown for user-generated content, AI responses, and documentation; it handles headings, lists, tables, code blocks, and citations with consistent styling.',bestPractices: [- { guidance: true, description: 'Set headingLevelStart to match the page hierarchy — e.g. start at 3 if the markdown sits inside an h2 section.' },+ { guidance: true, description: 'Set headingLevelStart to match the page hierarchy, e.g. start at 3 if the markdown sits inside an h2 section.' },{ guidance: true, description: 'Use contentWidth to keep prose at a readable line length in wide layouts.' },{ guidance: true, description: 'Use inlinePlugins for custom shorthand patterns like issue refs, diff refs, and mentions instead of preprocessing the markdown string.' },- { guidance: false, description: 'Use Markdown for hand-authored layouts — use XDSText and XDSHeading directly when you control the content.' },+ { guidance: false, description: 'Use Markdown for hand-authored layouts; use XDSText and XDSHeading directly when you control the content.' },],},examples: [@@ -178,7 +178,7 @@ export const docsZh = {name: 'isStreaming',type: 'boolean',description:- '启用流式模式 — 使用增量解析和淡入动画处理分块文本。',+ '启用流式模式,使用增量解析和淡入动画处理分块文本。',default: 'false',},{@@ -227,12 +227,12 @@ export const docsZh = {{name: 'className',type: 'string',- description: '根元素的 CSS 类名。建议使用 xstyle — className 适用于非 StyleX 系统集成。',+ description: '根元素的 CSS 类名。建议使用 xstyle,className 适用于非 StyleX 系统集成。',},{name: 'style',type: 'CSSProperties',- description: '根元素的内联样式。建议使用 xstyle — 内联样式会绕过 StyleX 优化。',+ description: '根元素的内联样式。建议使用 xstyle,内联样式会绕过 StyleX 优化。',},{name: 'data-testid',@@ -247,12 +247,12 @@ export const docsZh = {},usage: {description:- 'Renders a markdown string as XDS-styled components. Use Markdown for user-generated content, AI responses, and documentation — it handles headings, lists, tables, code blocks, and citations with consistent styling.',+ 'Renders a markdown string as XDS-styled components. Use Markdown for user-generated content, AI responses, and documentation; it handles headings, lists, tables, code blocks, and citations with consistent styling.',bestPractices: [- { guidance: true, description: 'Set headingLevelStart to match the page hierarchy — e.g. start at 3 if the markdown sits inside an h2 section.' },+ { guidance: true, description: 'Set headingLevelStart to match the page hierarchy, e.g. start at 3 if the markdown sits inside an h2 section.' },{ guidance: true, description: 'Use contentWidth to keep prose at a readable line length in wide layouts.' },{ guidance: true, description: 'Use inlinePlugins for custom shorthand patterns like issue refs, diff refs, and mentions instead of preprocessing the markdown string.' },- { guidance: false, description: 'Use Markdown for hand-authored layouts — use XDSText and XDSHeading directly when you control the content.' },+ { guidance: false, description: 'Use Markdown for hand-authored layouts; use XDSText and XDSHeading directly when you control the content.' },],},};@@ -262,12 +262,12 @@ export const docsDense = {'Renders markdown string as XDS-styled components. Use for user-generated content, AI responses, docs. Headings, lists, tables, code, citations w/ consistent styling.',usage: {description:- 'Renders a markdown string as XDS-styled components. Use Markdown for user-generated content, AI responses, and documentation — it handles headings, lists, tables, code blocks, and citations with consistent styling.',+ 'Renders a markdown string as XDS-styled components. Use Markdown for user-generated content, AI responses, and documentation; it handles headings, lists, tables, code blocks, and citations with consistent styling.',bestPractices: [- { guidance: true, description: 'Set headingLevelStart to match the page hierarchy — e.g. start at 3 if the markdown sits inside an h2 section.' },+ { guidance: true, description: 'Set headingLevelStart to match the page hierarchy, e.g. start at 3 if the markdown sits inside an h2 section.' },{ guidance: true, description: 'Use contentWidth to keep prose at a readable line length in wide layouts.' },{ guidance: true, description: 'Use inlinePlugins for custom shorthand patterns (issue refs, diff refs, mentions) instead of preprocessing the markdown string.' },- { guidance: false, description: 'Use Markdown for hand-authored layouts — use XDSText and XDSHeading directly when you control the content.' },+ { guidance: false, description: 'Use Markdown for hand-authored layouts; use XDSText and XDSHeading directly when you control the content.' },],},propDescriptions: {diff --git a/packages/core/src/Table/Table.doc.mjs b/packages/core/src/Table/Table.doc.mjsindex bf57896df2..3562478d1a 100644--- a/packages/core/src/Table/Table.doc.mjs+++ b/packages/core/src/Table/Table.doc.mjs@@ -46,7 +46,7 @@ export const docs = {name: 'columns',type: 'XDSTableColumn<T>[]',description:- 'Column definitions — each column has {key, header, width?, align?, renderCell?}. The `header` field sets the column heading text. If omitted, columns are auto-generated from data object keys.',+ 'Column definitions: each column has {key, header, width?, align?, renderCell?}. The `header` field sets the column heading text. If omitted, columns are auto-generated from data object keys.',},{name: 'idKey',@@ -89,13 +89,13 @@ export const docs = {name: 'children',type: 'ReactNode',description:- 'Children mode — render XDSTableRow/XDSTableCell directly instead of using data-driven rendering.',+ 'Children mode: render XDSTableRow/XDSTableCell directly instead of using data-driven rendering.',},{name: 'xstyle',type: 'StyleXStyles',description:- 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value — not an inline style object like style={{}}.',+ 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value, not an inline style object like style={{}}.',},], },{@@ -269,9 +269,9 @@ export const docs = {{ guidance: true, description: 'Use density and divider variants to match the information density and scanning needs of your data.' },{ guidance: true, description: 'Compose rich cell content with XDS components like XDSBadge, XDSStatusDot, and XDSAvatar via renderCell.' },{ guidance: true, description: 'Set explicit width on every column using proportional() or pixel(). proportional(1) gives equal flex distribution with a 120px minimum that prevents columns from collapsing on narrow viewports. Omitting width skips the minimum.' },- { guidance: false, description: 'Use a table for data without consistent columns — use a list or card layout for heterogeneous content.' },- { guidance: false, description: 'Enable every plugin at once — add only the features your use case requires to keep the interface focused.' },- { guidance: false, description: 'Omit width on text-heavy columns — without an explicit proportional() width they have no minimum and can squish to near-zero on mobile.' },+ { guidance: false, description: 'Use a table for data without consistent columns. Use a list or card layout for heterogeneous content.' },+ { guidance: false, description: 'Enable every plugin at once. Add only the features your use case requires to keep the interface focused.' },+ { guidance: false, description: 'Omit width on text-heavy columns; without an explicit proportional() width they have no minimum and can squish to near-zero on mobile.' },],anatomy: [{name: 'Column Header', required: true, description: 'Displays titles, sorting controls, and bulk selection.'},@@ -313,7 +313,7 @@ export const docsZh = {name: 'columns',type: 'XDSTableColumn<T>[]',description:- '列定义 — 每列含 {key, header, width?, align?, renderCell?}。header 设置列标题文本。省略时自动从数据键生成。',+ '列定义:每列含 {key, header, width?, align?, renderCell?}。header 设置列标题文本。省略时自动从数据键生成。',},{name: 'idKey',@@ -356,7 +356,7 @@ export const docsZh = {name: 'children',type: 'ReactNode',description:- '子元素模式 — 直接渲染 XDSTableRow/XDSTableCell,而非使用数据驱动渲染。',+ '子元素模式:直接渲染 XDSTableRow/XDSTableCell,而非使用数据驱动渲染。',},{name: 'xstyle',@@ -581,7 +581,7 @@ export const docsZh = {{name: 'filters',type: 'XDSTableFilterState',- description: '当前筛选状态——列键到筛选值的映射。',+ description: '当前筛选状态:列键到筛选值的映射。',required: true,},{@@ -619,8 +619,8 @@ export const docsZh = {bestPractices: [{ guidance: true, description: 'Use density and divider variants to match the information density and scanning needs of your data.' },{ guidance: true, description: 'Compose rich cell content with XDS components like XDSBadge, XDSStatusDot, and XDSAvatar via renderCell.' },- { guidance: false, description: 'Use a table for data without consistent columns — use a list or card layout for heterogeneous content.' },- { guidance: false, description: 'Enable every plugin at once — add only the features your use case requires to keep the interface focused.' },+ { guidance: false, description: 'Use a table for data without consistent columns. Use a list or card layout for heterogeneous content.' },+ { guidance: false, description: 'Enable every plugin at once. Add only the features your use case requires to keep the interface focused.' },],anatomy: [{name: 'Column Header', required: true, description: 'Displays titles, sorting controls, and bulk selection.'},@@ -643,9 +643,9 @@ export const docsDense = {{ guidance: true, description: 'Use density and divider variants to match the information density and scanning needs of your data.' },{ guidance: true, description: 'Compose rich cell content with XDS components like XDSBadge, XDSStatusDot, and XDSAvatar via renderCell.' },{ guidance: true, description: 'Set explicit width on every column via proportional() or pixel(). proportional(1) = equal flex w/ 120px min preventing collapse on narrow viewports. Omitting width skips the minimum.' },- { guidance: false, description: 'Use a table for data without consistent columns — use a list or card layout for heterogeneous content.' },- { guidance: false, description: 'Enable every plugin at once — add only the features your use case requires to keep the interface focused.' },- { guidance: false, description: 'Omit width on text-heavy columns — w/o explicit proportional() width they have no minimum and can squish to near-zero on mobile.' },+ { guidance: false, description: 'Use a table for data without consistent columns. Use a list or card layout for heterogeneous content.' },+ { guidance: false, description: 'Enable every plugin at once. Add only the features your use case requires to keep the interface focused.' },+ { guidance: false, description: 'Omit width on text-heavy columns; w/o explicit proportional() width they have no minimum and can squish to near-zero on mobile.' },],anatomy: [{name: 'Column Header', required: true, description: 'Displays titles, sorting controls, and bulk selection.'},@@ -718,14 +718,14 @@ export const docsDense = {{name: 'useXDSTableSelectionState',displayName: 'useXDSTableSelectionState',- description: 'State companion for useXDSTableSelection. Handles disabled/selectable row filtering for select-all automatically — disabled rows frozen (state preserved across select-all/deselect-all), non-selectable rows excluded.',+ description: 'State companion for useXDSTableSelection. Handles disabled/selectable row filtering for select-all automatically: disabled rows frozen (state preserved across select-all/deselect-all), non-selectable rows excluded.',propDescriptions: {data: 'Full data array rendered in table. **(required)**',- idKey: 'Key extractor — property name or fn returning unique string ID. **(required)**',+ idKey: 'Key extractor: property name or fn returning unique string ID. **(required)**',selectedKeys: 'Controlled set of selected item IDs. **(required)**',setSelectedKeys: 'Setter for controlled selected keys. **(required)**',getIsItemSelectable: 'Returns whether row shows checkbox; non-selectable rows excluded from select-all. Defaults to () => true.',- getIsItemEnabled: 'Returns whether row checkbox is interactive; disabled rows frozen — select-all preserves their state. Defaults to () => true.',+ getIsItemEnabled: 'Returns whether row checkbox is interactive. Disabled rows frozen; select-all preserves their state. Defaults to () => true.',},},{@@ -767,7 +767,7 @@ export const docsDense = {name: 'useXDSTableFiltering',isHiddenFromOverview: true,displayName: 'useXDSTableFiltering',- description: 'Table filtering plugin — inline column filters (popover/inline). Pairs w/ useXDSTableFilterState.',+ description: 'Table filtering plugin: inline column filters (popover/inline). Pairs w/ useXDSTableFilterState.',propDescriptions: {filters: 'Current filter state map (columnKey → value).',onFilterChange: 'Called on filter change. null clears.',diff --git a/packages/core/src/TextArea/TextArea.doc.mjs b/packages/core/src/TextArea/TextArea.doc.mjsindex a7accab5c5..7653adaea9 100644--- a/packages/core/src/TextArea/TextArea.doc.mjs+++ b/packages/core/src/TextArea/TextArea.doc.mjs@@ -18,7 +18,7 @@ export const docs = {name: 'label',type: 'string',description:- 'Label text for the textarea — always rendered for accessibility.',+ 'Label text for the textarea. Always rendered for accessibility.',required: true,},{@@ -92,7 +92,7 @@ export const docs = {name: 'maxLength',type: 'number',description:- 'Maximum number of characters allowed. When set, a character counter (current/max) is displayed below the textarea. Does not enforce the limit natively — the counter shows error styling when exceeded.',+ 'Maximum number of characters allowed. When set, a character counter (current/max) is displayed below the textarea. Does not enforce the limit natively; the counter shows error styling when exceeded.',},{name: 'status',@@ -155,7 +155,7 @@ export const docs = {name: 'xstyle',type: 'StyleXStyles',description:- 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value — not an inline style object like style={{}}.',+ 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value, not an inline style object like style={{}}.',},],theming: {@@ -168,12 +168,12 @@ export const docs = {'TextArea is a multi-line text input for collecting longer-form content like comments, descriptions, or messages. Use it when the expected input spans multiple lines. For shorter, single-line values, use TextInput.',bestPractices: [{ guidance: true, description: 'Provide a visible label so users know what to enter. If the label must be hidden, set isLabelHidden with a descriptive label for screen readers.' },- { guidance: true, description: 'Set maxLength with a character counter when there is a defined limit — it helps users stay within bounds before they submit.' },- { guidance: true, description: 'Use the status prop to surface validation feedback inline — show success when input is valid, warning for soft limits, and error for hard failures.' },- { guidance: true, description: 'Add a description or placeholder to clarify expected content, like "Describe the issue in detail" — but never rely on placeholder alone as the only label.' },- { guidance: false, description: 'Avoid using TextArea for short, single-line values like names or emails — use TextInput instead.' },- { guidance: false, description: 'Don\'t rely solely on placeholder text to communicate the purpose of the field — placeholders disappear on focus and are not accessible labels.' },- { guidance: false, description: 'Don\'t show a status message without also setting the status type — the colored border and icon are what draw the user\'s attention to the message.' },+ { guidance: true, description: 'Set maxLength with a character counter when there is a defined limit; it helps users stay within bounds before they submit.' },+ { guidance: true, description: 'Use the status prop to surface validation feedback inline: show success when input is valid, warning for soft limits, and error for hard failures.' },+ { guidance: true, description: 'Add a description or placeholder to clarify expected content, like "Describe the issue in detail," but never rely on placeholder alone as the only label.' },+ { guidance: false, description: 'Avoid using TextArea for short, single-line values like names or emails; use TextInput instead.' },+ { guidance: false, description: 'Don\'t rely solely on placeholder text to communicate the purpose of the field; placeholders disappear on focus and are not accessible labels.' },+ { guidance: false, description: 'Don\'t show a status message without also setting the status type; the colored border and icon are what draw the user\'s attention to the message.' },],},};@@ -191,7 +191,7 @@ export const docsZh = {{name: 'label',type: 'string',- description: '文本域的标签文本 — 始终渲染以确保无障碍性。',+ description: '文本域的标签文本:始终渲染以确保无障碍性。',required: true,},{@@ -259,7 +259,7 @@ export const docsZh = {{name: 'maxLength',type: 'number',- description: '允许的最大字符数。设置后,在文本域下方显示字符计数器(当前/最大)。不原生强制限制——超出时计数器显示错误样式。',+ description: '允许的最大字符数。设置后,在文本域下方显示字符计数器(当前/最大)。不原生强制限制:超出时计数器显示错误样式。',},{name: 'status',@@ -330,12 +330,12 @@ export const docsZh = {'TextArea is a multi-line text input for collecting longer-form content like comments, descriptions, or messages. Use it when the expected input spans multiple lines. For shorter, single-line values, use TextInput.',bestPractices: [{ guidance: true, description: 'Provide a visible label so users know what to enter. If the label must be hidden, set isLabelHidden with a descriptive label for screen readers.' },- { guidance: true, description: 'Set maxLength with a character counter when there is a defined limit — it helps users stay within bounds before they submit.' },- { guidance: true, description: 'Use the status prop to surface validation feedback inline — show success when input is valid, warning for soft limits, and error for hard failures.' },- { guidance: true, description: 'Add a description or placeholder to clarify expected content, like "Describe the issue in detail" — but never rely on placeholder alone as the only label.' },- { guidance: false, description: 'Avoid using TextArea for short, single-line values like names or emails — use TextInput instead.' },- { guidance: false, description: 'Don\'t rely solely on placeholder text to communicate the purpose of the field — placeholders disappear on focus and are not accessible labels.' },- { guidance: false, description: 'Don\'t show a status message without also setting the status type — the colored border and icon are what draw the user\'s attention to the message.' },+ { guidance: true, description: 'Set maxLength with a character counter when there is a defined limit; it helps users stay within bounds before they submit.' },+ { guidance: true, description: 'Use the status prop to surface validation feedback inline: show success when input is valid, warning for soft limits, and error for hard failures.' },+ { guidance: true, description: 'Add a description or placeholder to clarify expected content, like "Describe the issue in detail," but never rely on placeholder alone as the only label.' },+ { guidance: false, description: 'Avoid using TextArea for short, single-line values like names or emails; use TextInput instead.' },+ { guidance: false, description: 'Don\'t rely solely on placeholder text to communicate the purpose of the field; placeholders disappear on focus and are not accessible labels.' },+ { guidance: false, description: 'Don\'t show a status message without also setting the status type; the colored border and icon are what draw the user\'s attention to the message.' },],},};@@ -349,11 +349,11 @@ export const docsDense = {bestPractices: [{ guidance: true, description: 'Visible label or isLabelHidden with descriptive label for screen readers.' },{ guidance: true, description: 'Set maxLength for character counter when a limit exists.' },- { guidance: true, description: 'Use status prop for inline validation — success, warning, error.' },- { guidance: true, description: 'Add description or placeholder for context — never placeholder alone as label.' },- { guidance: false, description: 'Avoid TextArea for single-line values — use TextInput.' },- { guidance: false, description: 'Don\'t use placeholder as only label — disappears on focus, not accessible.' },- { guidance: false, description: 'Don\'t show status message without status type — border and icon draw attention.' },+ { guidance: true, description: 'Use status prop for inline validation: success, warning, error.' },+ { guidance: true, description: 'Add description or placeholder for context; never placeholder alone as label.' },+ { guidance: false, description: 'Avoid TextArea for single-line values; use TextInput.' },+ { guidance: false, description: 'Don\'t use placeholder as only label; disappears on focus, not accessible.' },+ { guidance: false, description: 'Don\'t show status message without status type; border and icon draw attention.' },],},propDescriptions: {diff --git a/packages/core/src/Toast/Toast.doc.mjs b/packages/core/src/Toast/Toast.doc.mjsindex 81467e220e..020b26d6a6 100644--- a/packages/core/src/Toast/Toast.doc.mjs+++ b/packages/core/src/Toast/Toast.doc.mjs@@ -68,15 +68,15 @@ export const docs = {usage: {description:- 'Toast shows a brief, non-blocking notification to confirm an action or present temporary information. Use it for scenarios where the user needs feedback but not a decision, such as saving, deleting, or changing a status.\n\nFor production use, prefer the `useXDSToast()` hook — it handles positioning, stacking, auto-dismiss, and deduplication via `XDSToastViewport`. The `XDSToast` component renders the visual toast element inline and is useful for previews, documentation, and static showcases where the viewport lifecycle is not needed.',+ 'Toast shows a brief, non-blocking notification to confirm an action or present temporary information. Use it for scenarios where the user needs feedback but not a decision, such as saving, deleting, or changing a status.\n\nFor production use, prefer the `useXDSToast()` hook; it handles positioning, stacking, auto-dismiss, and deduplication via `XDSToastViewport`. The `XDSToast` component renders the visual toast element inline and is useful for previews, documentation, and static showcases where the viewport lifecycle is not needed.',bestPractices: [- {guidance: true, description: 'Keep messages short - only a few words that tell the user what happened, like "Changes saved" or "Message sent".'},+ {guidance: true, description: 'Keep messages short: only a few words that tell the user what happened, like "Changes saved" or "Message sent".'},{guidance: true, description: 'Add an undo action in the endContent slot for reversible operations like deleting an item, so the user can recover without navigating away.'},{guidance: true, description: 'Use uniqueID to deduplicate toasts that fire from repeated actions, like clicking a save button multiple times.'},- {guidance: true, description: 'Use error type for failures that need attention but not immediate action — it persists until dismissed so the user won\'t miss it.'},- {guidance: false, description: 'Don\'t use a toast for critical errors that block the user — use Banner for persistent, in-context messaging that requires acknowledgment.'},- {guidance: false, description: 'Don\'t put long or multi-line content in a toast — it disappears after 5 seconds and the user may not finish reading.'},- {guidance: false, description: 'Don\'t show form validation errors as toasts — use inline field validation so the user can see exactly which field needs fixing.'},+ {guidance: true, description: 'Use error type for failures that need attention but not immediate action; it persists until dismissed so the user won\'t miss it.'},+ {guidance: false, description: 'Don\'t use a toast for critical errors that block the user. Use Banner for persistent, in-context messaging that requires acknowledgment.'},+ {guidance: false, description: 'Don\'t put long or multi-line content in a toast; it disappears after 5 seconds and the user may not finish reading.'},+ {guidance: false, description: 'Don\'t show form validation errors as toasts. Use inline field validation so the user can see exactly which field needs fixing.'},],anatomy: [{name: 'Body', required: true, description: 'The primary message text describing what happened or what the user should know.'},@@ -106,15 +106,15 @@ export const docsZh = {},usage: {description:- 'Toast 显示简短的非阻塞通知,用于确认操作或呈现临时信息。适用于用户需要反馈但不需要做决定的场景,如保存、删除或状态变更。\n\n生产环境中推荐使用 `useXDSToast()` hook——它通过 `XDSToastViewport` 处理定位、堆叠、自动关闭和去重。`XDSToast` 组件以内联方式渲染 toast 视觉元素,适用于预览、文档和静态展示。',+ 'Toast 显示简短的非阻塞通知,用于确认操作或呈现临时信息。适用于用户需要反馈但不需要做决定的场景,如保存、删除或状态变更。\n\n生产环境中推荐使用 `useXDSToast()` hook,它通过 `XDSToastViewport` 处理定位、堆叠、自动关闭和去重。`XDSToast` 组件以内联方式渲染 toast 视觉元素,适用于预览、文档和静态展示。',bestPractices: [- {guidance: true, description: '保持消息简短——只需几个词告诉用户发生了什么,如"更改已保存"或"消息已发送"。'},+ {guidance: true, description: '保持消息简短,只需几个词告诉用户发生了什么,如"更改已保存"或"消息已发送"。'},{guidance: true, description: '在 endContent 插槽中添加撤销操作,用于可逆操作如删除项目,让用户无需导航即可恢复。'},{guidance: true, description: '使用 uniqueID 去重重复操作触发的 toast,如多次点击保存按钮。'},- {guidance: true, description: '对需要关注但不需要立即操作的错误使用 error 类型——它会持续显示直到关闭。'},- {guidance: false, description: '不要对阻塞用户的严重错误使用 toast——使用 Banner 进行持久的上下文消息传递。'},- {guidance: false, description: '不要在 toast 中放置长内容或多行内容——它会在5秒后消失,用户可能来不及阅读。'},- {guidance: false, description: '不要将表单验证错误显示为 toast——使用内联字段验证让用户看到具体哪个字段需要修复。'},+ {guidance: true, description: '对需要关注但不需要立即操作的错误使用 error 类型,它会持续显示直到关闭。'},+ {guidance: false, description: '不要对阻塞用户的严重错误使用 toast,使用 Banner 进行持久的上下文消息传递。'},+ {guidance: false, description: '不要在 toast 中放置长内容或多行内容,它会在5秒后消失,用户可能来不及阅读。'},+ {guidance: false, description: '不要将表单验证错误显示为 toast,使用内联字段验证让用户看到具体哪个字段需要修复。'},],anatomy: [{name: '正文', required: true, description: '描述发生了什么或用户应该知道什么的主要消息文本。'},@@ -130,15 +130,15 @@ export const docsDense = {'toast notification w/ auto-dismiss, stacking, dedup, smooth animations; XDSMediaTheme inverted surface',usage: {description:- 'Brief non-blocking notification for action confirmations and temporary info. Use where user needs feedback not decisions — saves, deletes, status changes. useXDSToast() hook for production (positioning, stacking, auto-dismiss, dedup via XDSToastViewport). XDSToast renders inline for previews/docs/static showcases.',+ 'Brief non-blocking notification for action confirmations and temporary info. Use where user needs feedback not decisions: saves, deletes, status changes. useXDSToast() hook for production (positioning, stacking, auto-dismiss, dedup via XDSToastViewport). XDSToast renders inline for previews/docs/static showcases.',bestPractices: [- {guidance: true, description: 'Short messages — a few words: "Changes saved", "Message sent".'},+ {guidance: true, description: 'Short messages, a few words: "Changes saved", "Message sent".'},{guidance: true, description: 'Undo action in endContent for reversible ops like deletes.'},{guidance: true, description: 'uniqueID to dedup repeated action toasts.'},- {guidance: true, description: 'Error type for failures needing attention — persists until dismissed.'},- {guidance: false, description: 'Don\'t use for critical blocking errors — use Banner for persistent in-context messaging.'},- {guidance: false, description: 'Don\'t put long/multi-line content — disappears in 5s, user may not finish reading.'},- {guidance: false, description: 'Don\'t show form validation errors — use inline field validation instead.'},+ {guidance: true, description: 'Error type for failures needing attention; persists until dismissed.'},+ {guidance: false, description: 'Don\'t use for critical blocking errors. Use Banner for persistent in-context messaging.'},+ {guidance: false, description: 'Don\'t put long/multi-line content; disappears in 5s, user may not finish reading.'},+ {guidance: false, description: 'Don\'t show form validation errors. Use inline field validation instead.'},],},propDescriptions: {diff --git a/packages/core/src/Toolbar/Toolbar.doc.mjs b/packages/core/src/Toolbar/Toolbar.doc.mjsindex 92d70e5a5d..c762b3c87c 100644--- a/packages/core/src/Toolbar/Toolbar.doc.mjs+++ b/packages/core/src/Toolbar/Toolbar.doc.mjs@@ -82,15 +82,15 @@ export const docs = {],usage: {description:- 'Toolbar is a horizontal bar with left, center, and right areas. Use it for contextual actions within a content area — above a table, inside a card, or in a panel — not as a page-level header. Set the size once on the toolbar and all buttons, inputs, and tabs inside it match automatically.',+ 'Toolbar is a horizontal bar with left, center, and right areas. Use it for contextual actions within a content area (above a table, inside a card, or in a panel), not as a page-level header. Set the size once on the toolbar and all buttons, inputs, and tabs inside it match automatically.',bestPractices: [{guidance: true, description: 'Put secondary actions like "Back" on the left, and primary actions like "Save" on the right.'},- {guidance: true, description: 'Make temporary toolbars like bulk selection visually distinct so users can tell they\'re contextual — for example, with a background color or border.'},- {guidance: true, description: 'Visually separate the toolbar from the content below it — with a divider, a background variant, or both.'},- {guidance: true, description: 'Use Toolbar as a card header when the header has interactive actions like filter or add — it gives you slot layout, keyboard navigation, and size cascading. If the header is just a title with no actions, a LayoutHeader or Section is enough.'},- {guidance: false, description: 'Put too many actions in one toolbar — move less common items into a MoreMenu.'},- {guidance: false, description: 'Set size on individual child buttons — set it once on the toolbar and it cascades automatically.'},- {guidance: false, description: 'Use Toolbar for app-wide navigation like main menu links or sign out — use TopNav or LayoutHeader for that.'},+ {guidance: true, description: 'Make temporary toolbars like bulk selection visually distinct so users can tell they\'re contextual, for example with a background color or border.'},+ {guidance: true, description: 'Visually separate the toolbar from the content below it, with a divider, a background variant, or both.'},+ {guidance: true, description: 'Use Toolbar as a card header when the header has interactive actions like filter or add; it gives you slot layout, keyboard navigation, and size cascading. If the header is just a title with no actions, a LayoutHeader or Section is enough.'},+ {guidance: false, description: 'Put too many actions in one toolbar; move less common items into a MoreMenu.'},+ {guidance: false, description: 'Set size on individual child buttons; set it once on the toolbar and it cascades automatically.'},+ {guidance: false, description: 'Use Toolbar for app-wide navigation like main menu links or sign out; use TopNav or LayoutHeader for that.'},],},};@@ -117,15 +117,15 @@ export const docsZh = {],usage: {description:- 'Toolbar is a horizontal bar with left, center, and right areas. Use it for contextual actions within a content area — above a table, inside a card, or in a panel — not as a page-level header. Set the size once on the toolbar and all buttons, inputs, and tabs inside it match automatically.',+ 'Toolbar is a horizontal bar with left, center, and right areas. Use it for contextual actions within a content area (above a table, inside a card, or in a panel), not as a page-level header. Set the size once on the toolbar and all buttons, inputs, and tabs inside it match automatically.',bestPractices: [{guidance: true, description: 'Put secondary actions like "Back" on the left, and primary actions like "Save" on the right.'},- {guidance: true, description: 'Make temporary toolbars like bulk selection visually distinct so users can tell they\'re contextual — for example, with a background color or border.'},- {guidance: true, description: 'Visually separate the toolbar from the content below it — with a divider, a background variant, or both.'},- {guidance: true, description: 'Use Toolbar as a card header when the header has interactive actions like filter or add — it gives you slot layout, keyboard navigation, and size cascading. If the header is just a title with no actions, a LayoutHeader or Section is enough.'},- {guidance: false, description: 'Put too many actions in one toolbar — move less common items into a MoreMenu.'},- {guidance: false, description: 'Set size on individual child buttons — set it once on the toolbar and it cascades automatically.'},- {guidance: false, description: 'Use Toolbar for app-wide navigation like main menu links or sign out — use TopNav or LayoutHeader for that.'},+ {guidance: true, description: 'Make temporary toolbars like bulk selection visually distinct so users can tell they\'re contextual, for example with a background color or border.'},+ {guidance: true, description: 'Visually separate the toolbar from the content below it, with a divider, a background variant, or both.'},+ {guidance: true, description: 'Use Toolbar as a card header when the header has interactive actions like filter or add; it gives you slot layout, keyboard navigation, and size cascading. If the header is just a title with no actions, a LayoutHeader or Section is enough.'},+ {guidance: false, description: 'Put too many actions in one toolbar; move less common items into a MoreMenu.'},+ {guidance: false, description: 'Set size on individual child buttons; set it once on the toolbar and it cascades automatically.'},+ {guidance: false, description: 'Use Toolbar for app-wide navigation like main menu links or sign out; use TopNav or LayoutHeader for that.'},],},};@@ -135,15 +135,15 @@ export const docsDense = {description: 'Horizontal bar w/ left, center, right areas. For contextual actions in content, not page headers. Size cascades to children.',usage: {description:- 'Horizontal bar w/ left, optional center, right. For contextual actions within content (tables, cards, panels) — not page-level headers. Size cascades to children.',+ 'Horizontal bar w/ left, optional center, right. For contextual actions within content (tables, cards, panels), not page-level headers. Size cascades to children.',bestPractices: [{guidance: true, description: 'Secondary actions (Back) left, primary actions (Save) right.'},- {guidance: true, description: 'Make temporary toolbars (bulk selection) visually distinct — e.g. background color or border.'},- {guidance: true, description: 'Separate toolbar from content — divider, background variant, or both.'},+ {guidance: true, description: 'Make temporary toolbars (bulk selection) visually distinct, e.g. background color or border.'},+ {guidance: true, description: 'Separate toolbar from content: divider, background variant, or both.'},{guidance: true, description: 'Use Toolbar as card header when it has actions (filter, add). Just a title? Use LayoutHeader/Section.'},- {guidance: false, description: 'Overload with actions — use MoreMenu for overflow.'},- {guidance: false, description: 'Set size on child buttons — set once on toolbar, it cascades.'},- {guidance: false, description: 'Use for app-wide nav (menu links, sign out) — use TopNav/LayoutHeader.'},+ {guidance: false, description: 'Overload with actions; use MoreMenu for overflow.'},+ {guidance: false, description: 'Set size on child buttons; set once on toolbar, it cascades.'},+ {guidance: false, description: 'Use for app-wide nav (menu links, sign out); use TopNav/LayoutHeader.'},],},components: [diff --git a/packages/core/src/TopNav/TopNav.doc.mjs b/packages/core/src/TopNav/TopNav.doc.mjsindex 7ad6aee0a9..90c97a204d 100644--- a/packages/core/src/TopNav/TopNav.doc.mjs+++ b/packages/core/src/TopNav/TopNav.doc.mjs@@ -35,14 +35,14 @@ export const docs = {name: 'heading',type: 'ReactNode',description:- 'Heading slot content (logo, brand) — positioned at the left edge of the nav bar.',+ 'Heading slot content (logo, brand), positioned at the left edge of the nav bar.',slotElements: [{__element: 'XDSText', props: {type: 'body', weight: 'bold'}, children: 'Heading'}],},{name: 'startContent',type: 'ReactNode',description:- 'Start content slot for navigation items or breadcrumbs — positioned after the heading, left-aligned.',+ 'Start content slot for navigation items or breadcrumbs, positioned after the heading, left-aligned.',slotElements: [{__element: 'XDSIcon', props: {icon: 'check', size: 'sm'}}],},{@@ -56,14 +56,14 @@ export const docs = {name: 'centerContent',type: 'ReactNode',description:- 'Center content slot (tabs, search bar, primary navigation) — when provided, switches the layout to a three-column CSS grid for true horizontal centering.',+ 'Center content slot (tabs, search bar, primary navigation). When provided, switches the layout to a three-column CSS grid for true horizontal centering.',slotElements: [{__element: 'XDSText', props: {type: 'body', weight: 'bold'}, children: 'Center'}],},{name: 'endContent',type: 'ReactNode',description:- 'End content slot for search, icons, or user profile — positioned at the right edge.',+ 'End content slot for search, icons, or user profile, positioned at the right edge.',slotElements: [{__element: 'XDSIcon', props: {icon: 'chevronDown', size: 'sm'}},{__element: 'XDSBadge', props: {label: '3'}},@@ -79,7 +79,7 @@ export const docs = {name: 'xstyle',type: 'StyleXStyles',description:- 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value — not an inline style object like style={{}}.',+ 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value, not an inline style object like style={{}}.',},], },{@@ -111,7 +111,7 @@ export const docs = {name: 'href',type: 'string',description:- 'Deprecated — use headingHref instead. URL to navigate to when clicked.',+ 'Deprecated: use headingHref instead. URL to navigate to when clicked.',},{name: 'superheading',@@ -170,7 +170,7 @@ export const docs = {isHiddenFromOverview: true,displayName: 'Top Nav Item',description:- 'Navigation link item for use in XDSTopNav startContent — renders as an anchor with hover and selected states.',+ 'Navigation link item for use in XDSTopNav startContent; renders as an anchor with hover and selected states.',props: [{name: 'label',@@ -275,13 +275,13 @@ export const docs = {{name: 'items',type: 'ReactNode',- description: 'Menu items slot — typically XDSTopNavMegaMenuItem components, but accepts any ReactNode.',+ description: 'Menu items slot: typically XDSTopNavMegaMenuItem components, but accepts any ReactNode.',slotElements: [{__element: 'XDSTopNavItem', props: {label: 'Item', href: '#'}}],},{name: 'featured',type: 'ReactNode',- description: 'Featured content slot — rendered in the right panel on desktop, below items in the mobile drawer.',+ description: 'Featured content slot: rendered in the right panel on desktop, below items in the mobile drawer.',slotElements: [{__element: 'XDSCard', props: {padding: 4}, children: 'Featured content'}],},{@@ -399,8 +399,8 @@ export const docs = {bestPractices: [{guidance: true, description: 'Include a product logo and name in the heading slot to clearly identify the application.'},{guidance: true, description: 'Limit primary navigation items to 5 or fewer for quick scanning and minimal cognitive load.'},- {guidance: false, description: 'Avoid using TopNav to filter page content — use Tabs or filter controls instead.'},- {guidance: false, description: 'Avoid deeply nested navigation hierarchies — keep menus to one level of depth.'},+ {guidance: false, description: 'Avoid using TopNav to filter page content; use Tabs or filter controls instead.'},+ {guidance: false, description: 'Avoid deeply nested navigation hierarchies; keep menus to one level of depth.'},],anatomy: [{name: 'Product icon and name', required: true, description: 'Identifies the product in the navigation bar.'},@@ -436,13 +436,13 @@ export const docsZh = {name: 'heading',type: 'ReactNode',description:- '标题插槽内容(标志、品牌)— 位于导航栏的左边缘。',+ '标题插槽内容(标志、品牌),位于导航栏的左边缘。',},{name: 'startContent',type: 'ReactNode',description:- '起始内容插槽,用于导航项或面包屑 — 位于标题之后,左对齐。',+ '起始内容插槽,用于导航项或面包屑,位于标题之后,左对齐。',},{name: 'children',@@ -454,13 +454,13 @@ export const docsZh = {name: 'centerContent',type: 'ReactNode',description:- '居中内容插槽(标签页、搜索栏、主导航)— 提供时,布局切换为三列 CSS grid 以实现真正的水平居中。',+ '居中内容插槽(标签页、搜索栏、主导航)。提供时,布局切换为三列 CSS grid 以实现真正的水平居中。',},{name: 'endContent',type: 'ReactNode',description:- '末尾内容插槽,用于搜索、图标或用户头像 — 位于右边缘。',+ '末尾内容插槽,用于搜索、图标或用户头像,位于右边缘。',},{name: 'label',@@ -472,7 +472,7 @@ export const docsZh = {name: 'xstyle',type: 'StyleXStyles',description:- '用于布局自定义的 StyleX 样式(外边距、定位、尺寸)。必须是 stylex.create() 的值 — 不能是内联样式对象如 style={{}}。',+ '用于布局自定义的 StyleX 样式(外边距、定位、尺寸)。必须是 stylex.create() 的值,不能是内联样式对象如 style={{}}。',},],},@@ -504,7 +504,7 @@ export const docsZh = {name: 'href',type: 'string',description:- '已弃用 — 请使用 headingHref。点击时导航到的 URL。',+ '已弃用:请使用 headingHref。点击时导航到的 URL。',},{name: 'superheading',@@ -561,7 +561,7 @@ export const docsZh = {isHiddenFromOverview: true,displayName: 'Top Nav Item',description:- '用于 XDSTopNav startContent 的导航链接项 — 渲染为具有悬停和选中状态的锚点。',+ '用于 XDSTopNav startContent 的导航链接项,渲染为具有悬停和选中状态的锚点。',props: [{name: 'label',@@ -658,12 +658,12 @@ export const docsZh = {{name: 'items',type: 'ReactNode',- description: '菜单项插槽 — 通常为 XDSTopNavMegaMenuItem 组件,但接受任何 ReactNode。',+ description: '菜单项插槽:通常为 XDSTopNavMegaMenuItem 组件,但接受任何 ReactNode。',},{name: 'featured',type: 'ReactNode',- description: '特色内容插槽 — 桌面端显示在右侧面板,移动抽屉中显示在项目下方。',+ description: '特色内容插槽:桌面端显示在右侧面板,移动抽屉中显示在项目下方。',},{name: 'delay',@@ -779,8 +779,8 @@ export const docsZh = {bestPractices: [{guidance: true, description: 'Include a product logo and name in the heading slot to clearly identify the application.'},{guidance: true, description: 'Limit primary navigation items to 5 or fewer for quick scanning and minimal cognitive load.'},- {guidance: false, description: 'Avoid using TopNav to filter page content — use Tabs or filter controls instead.'},- {guidance: false, description: 'Avoid deeply nested navigation hierarchies — keep menus to one level of depth.'},+ {guidance: false, description: 'Avoid using TopNav to filter page content; use Tabs or filter controls instead.'},+ {guidance: false, description: 'Avoid deeply nested navigation hierarchies; keep menus to one level of depth.'},],anatomy: [{name: 'Product icon and name', required: true, description: 'Identifies the product in the navigation bar.'},@@ -800,8 +800,8 @@ export const docsDense = {bestPractices: [{guidance: true, description: 'Include a product logo and name in the heading slot to clearly identify the application.'},{guidance: true, description: 'Limit primary navigation items to 5 or fewer for quick scanning and minimal cognitive load.'},- {guidance: false, description: 'Avoid using TopNav to filter page content — use Tabs or filter controls instead.'},- {guidance: false, description: 'Avoid deeply nested navigation hierarchies — keep menus to one level of depth.'},+ {guidance: false, description: 'Avoid using TopNav to filter page content; use Tabs or filter controls instead.'},+ {guidance: false, description: 'Avoid deeply nested navigation hierarchies; keep menus to one level of depth.'},],anatomy: [{name: 'Product icon and name', required: true, description: 'Identifies the product in the navigation bar.'},@@ -834,7 +834,7 @@ export const docsDense = {logo: 'Logo before heading text. Image, XDSNavIcon, or ReactNode.',heading: 'Product/app name.',headingHref: 'Link for heading (product home). Only href + no menu → whole heading is link.',- href: 'Deprecated — use headingHref.',+ href: 'Deprecated: use headingHref.',superheading: 'Text above heading (suite name). Smaller secondary style.',superheadingHref: 'Link for superheading. Independent inline link when menu present.',subheading: 'Text below heading (account context). Smaller secondary style.',@@ -877,8 +877,8 @@ export const docsDense = {description: 'Nav item w/ full-width mega menu panel on hover. Slots API w/ items+featured ReactNode props. Mobile drawer inline collapsible.',propDescriptions: {label: 'Trigger button visible label.',- items: 'Menu items slot — typically XDSTopNavMegaMenuItem, accepts any ReactNode.',- featured: 'Featured content slot — right panel desktop, below items in drawer.',+ items: 'Menu items slot: typically XDSTopNavMegaMenuItem, accepts any ReactNode.',+ featured: 'Featured content slot: right panel desktop, below items in drawer.',delay: 'Show delay ms on hover.',hideDelay: 'Hide delay ms after mouse leaves.',onOpenChange: 'Fired on open/close. For coordinating wrapper styles.',diff --git a/packages/lab/src/CircularProgress/CircularProgress.doc.mjs b/packages/lab/src/CircularProgress/CircularProgress.doc.mjsindex aa953cb927..767e0ac4fd 100644--- a/packages/lab/src/CircularProgress/CircularProgress.doc.mjs+++ b/packages/lab/src/CircularProgress/CircularProgress.doc.mjs@@ -34,7 +34,7 @@ export const docs = {{name: 'children',type: 'ReactNode',- description: 'Content displayed in the center of the ring — percentage, icon, or custom content.',+ description: 'Content displayed in the center of the ring: percentage, icon, or custom content.',},{name: 'size',@@ -67,10 +67,10 @@ export const docs = {'A circular progress indicator that shows completion as a ring or arc. Use it for upload progress, score displays, dashboard gauges, or compact progress where horizontal space is limited. Complements XDSProgressBar for radial layouts.',bestPractices: [{ guidance: true, description: 'Pass a value for determinate progress; omit value for an indeterminate spinner.' },- { guidance: true, description: 'Provide center content (children) to give context — a percentage, icon, or short label.' },- { guidance: true, description: 'Always provide a label, even though it is visually hidden by default — screen readers need it.' },- { guidance: false, description: 'Use circular progress for long text labels — use XDSProgressBar instead, which has more room for label and value display.' },- { guidance: false, description: 'Stack multiple circular progress indicators for the same operation — use one with a value label.' },+ { guidance: true, description: 'Provide center content (children) to give context: a percentage, icon, or short label.' },+ { guidance: true, description: 'Always provide a label, even though it is visually hidden by default; screen readers need it.' },+ { guidance: false, description: 'Use circular progress for long text labels; use XDSProgressBar instead, which has more room for label and value display.' },+ { guidance: false, description: 'Stack multiple circular progress indicators for the same operation; use one with a value label.' },],},};@@ -106,7 +106,7 @@ export const docsZh = {{name: 'children',type: 'ReactNode',- description: '在环形中心显示的内容 — 百分比、图标或自定义内容。',+ description: '在环形中心显示的内容:百分比、图标或自定义内容。',},{name: 'size',@@ -138,10 +138,10 @@ export const docsZh = {'A circular progress indicator that shows completion as a ring or arc. Use it for upload progress, score displays, dashboard gauges, or compact progress where horizontal space is limited. Complements XDSProgressBar for radial layouts.',bestPractices: [{ guidance: true, description: 'Pass a value for determinate progress; omit value for an indeterminate spinner.' },- { guidance: true, description: 'Provide center content (children) to give context — a percentage, icon, or short label.' },- { guidance: true, description: 'Always provide a label, even though it is visually hidden by default — screen readers need it.' },- { guidance: false, description: 'Use circular progress for long text labels — use XDSProgressBar instead, which has more room for label and value display.' },- { guidance: false, description: 'Stack multiple circular progress indicators for the same operation — use one with a value label.' },+ { guidance: true, description: 'Provide center content (children) to give context: a percentage, icon, or short label.' },+ { guidance: true, description: 'Always provide a label, even though it is visually hidden by default; screen readers need it.' },+ { guidance: false, description: 'Use circular progress for long text labels; use XDSProgressBar instead, which has more room for label and value display.' },+ { guidance: false, description: 'Stack multiple circular progress indicators for the same operation; use one with a value label.' },],},};@@ -155,10 +155,10 @@ export const docsDense = {'A circular progress indicator that shows completion as a ring or arc. Use it for upload progress, score displays, dashboard gauges, or compact progress where horizontal space is limited. Complements XDSProgressBar for radial layouts.',bestPractices: [{ guidance: true, description: 'Pass a value for determinate progress; omit value for an indeterminate spinner.' },- { guidance: true, description: 'Provide center content (children) to give context — a percentage, icon, or short label.' },- { guidance: true, description: 'Always provide a label, even though it is visually hidden by default — screen readers need it.' },- { guidance: false, description: 'Use circular progress for long text labels — use XDSProgressBar instead, which has more room for label and value display.' },- { guidance: false, description: 'Stack multiple circular progress indicators for the same operation — use one with a value label.' },+ { guidance: true, description: 'Provide center content (children) to give context: a percentage, icon, or short label.' },+ { guidance: true, description: 'Always provide a label, even though it is visually hidden by default; screen readers need it.' },+ { guidance: false, description: 'Use circular progress for long text labels; use XDSProgressBar instead, which has more room for label and value display.' },+ { guidance: false, description: 'Stack multiple circular progress indicators for the same operation; use one with a value label.' },],},propDescriptions: {@@ -166,7 +166,7 @@ export const docsDense = {max: 'Maximum value.',label: 'Accessible label for screen readers (required).',isLabelHidden: 'Visually hide label (remains accessible). Defaults to true.',- children: 'Center content — percentage, icon, or custom.',+ children: 'Center content: percentage, icon, or custom.',size: 'Ring diameter (32px, 48px, 64px).',variant: 'Semantic color variant for the fill.',xstyle: 'StyleX styles for layout customization. Must be stylex.create() value.',