@runtypelabs/persona 4.14.0 → 4.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/README.md +4 -4
  2. package/dist/animations/glyph-cycle.d.cts +1 -1
  3. package/dist/animations/glyph-cycle.d.ts +1 -1
  4. package/dist/animations/{types-DveIaNx6.d.cts → types-BpWGm7_6.d.cts} +17 -0
  5. package/dist/animations/{types-DveIaNx6.d.ts → types-BpWGm7_6.d.ts} +17 -0
  6. package/dist/animations/wipe.d.cts +1 -1
  7. package/dist/animations/wipe.d.ts +1 -1
  8. package/dist/chunk-QJ4LV2KW.js +1 -0
  9. package/dist/codegen.cjs +12 -11
  10. package/dist/codegen.js +14 -13
  11. package/dist/{context-mentions-ONG7A7M6.js → context-mentions-BTSTIBFC.js} +1 -1
  12. package/dist/context-mentions.cjs +11 -8
  13. package/dist/context-mentions.d.cts +520 -21
  14. package/dist/context-mentions.d.ts +520 -21
  15. package/dist/context-mentions.js +11 -8
  16. package/dist/index.cjs +69 -68
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +595 -46
  19. package/dist/index.d.ts +595 -46
  20. package/dist/index.global.js +60 -57
  21. package/dist/index.global.js.map +1 -1
  22. package/dist/index.js +69 -68
  23. package/dist/index.js.map +1 -1
  24. package/dist/launcher.global.js +5 -2
  25. package/dist/launcher.global.js.map +1 -1
  26. package/dist/smart-dom-reader.d.cts +520 -21
  27. package/dist/smart-dom-reader.d.ts +520 -21
  28. package/dist/testing.cjs +3 -3
  29. package/dist/testing.d.cts +7 -0
  30. package/dist/testing.d.ts +7 -0
  31. package/dist/testing.js +3 -3
  32. package/dist/theme-editor-preview.cjs +67 -67
  33. package/dist/theme-editor-preview.d.cts +534 -22
  34. package/dist/theme-editor-preview.d.ts +534 -22
  35. package/dist/theme-editor-preview.js +57 -57
  36. package/dist/theme-editor.cjs +10 -10
  37. package/dist/theme-editor.d.cts +521 -23
  38. package/dist/theme-editor.d.ts +521 -23
  39. package/dist/theme-editor.js +10 -10
  40. package/dist/theme-reference.cjs +1 -1
  41. package/dist/theme-reference.d.cts +104 -3
  42. package/dist/theme-reference.d.ts +104 -3
  43. package/dist/theme-reference.js +1 -1
  44. package/dist/widget.css +1 -1
  45. package/package.json +1 -1
  46. package/src/ask-user-question-tool.ts +10 -7
  47. package/src/components/artifact-pane.test.ts +27 -0
  48. package/src/components/artifact-pane.ts +7 -3
  49. package/src/components/artifact-preview.ts +1 -1
  50. package/src/components/composer-parts.test.ts +103 -4
  51. package/src/components/composer-parts.ts +53 -15
  52. package/src/components/header-builder.ts +27 -2
  53. package/src/components/header-layouts.test.ts +56 -0
  54. package/src/components/header-layouts.ts +29 -9
  55. package/src/components/launcher-surface.test.ts +403 -0
  56. package/src/components/launcher.ts +297 -2
  57. package/src/components/messages.ts +5 -2
  58. package/src/components/panel.ts +92 -71
  59. package/src/components/pill-composer-builder.test.ts +18 -0
  60. package/src/components/suggestions.test.ts +273 -0
  61. package/src/components/suggestions.ts +528 -86
  62. package/src/components/welcome.test.ts +121 -0
  63. package/src/components/welcome.ts +305 -0
  64. package/src/components/widget-view.test.ts +5 -3
  65. package/src/components/widget-view.ts +18 -7
  66. package/src/defaults.ts +7 -5
  67. package/src/generated/runtype-openapi-contract.ts +17 -0
  68. package/src/index-core.ts +29 -2
  69. package/src/launcher-global.ts +11 -8
  70. package/src/plugins/types.ts +136 -3
  71. package/src/presets.ts +3 -3
  72. package/src/session.ts +10 -8
  73. package/src/styles/widget-styles.test.ts +382 -0
  74. package/src/styles/widget.css +778 -4
  75. package/src/suggest-replies-tool.test.ts +233 -2
  76. package/src/suggest-replies-tool.ts +115 -39
  77. package/src/testing/mock-stream.test.ts +19 -0
  78. package/src/testing/mock-stream.ts +20 -0
  79. package/src/theme-editor/preview-utils.test.ts +34 -0
  80. package/src/theme-editor/preview-utils.ts +77 -2
  81. package/src/theme-editor/sections.test.ts +33 -0
  82. package/src/theme-editor/sections.ts +83 -6
  83. package/src/theme-reference.ts +34 -5
  84. package/src/types/theme.ts +72 -3
  85. package/src/types.ts +312 -18
  86. package/src/ui.body-top-slot.test.ts +95 -0
  87. package/src/ui.content-width.test.ts +91 -0
  88. package/src/ui.detached-panel.test.ts +1 -1
  89. package/src/ui.docked.test.ts +7 -4
  90. package/src/ui.launcher-teaser.test.ts +162 -0
  91. package/src/ui.rebuild-composer.test.ts +491 -0
  92. package/src/ui.render-welcome.test.ts +505 -0
  93. package/src/ui.scroll-additive.test.ts +91 -21
  94. package/src/ui.scroll.test.ts +302 -14
  95. package/src/ui.suggest-replies.test.ts +1112 -1
  96. package/src/ui.ts +1008 -149
  97. package/src/ui.welcome.test.ts +504 -0
  98. package/src/utils/artifact-file.test.ts +1 -1
  99. package/src/utils/artifact-gate.test.ts +27 -0
  100. package/src/utils/artifact-gate.ts +9 -0
  101. package/src/utils/attachment-manager.test.ts +37 -0
  102. package/src/utils/attachment-manager.ts +15 -0
  103. package/src/utils/auto-follow.test.ts +23 -0
  104. package/src/utils/auto-follow.ts +11 -1
  105. package/src/utils/code-generators.test.ts +40 -0
  106. package/src/utils/code-generators.ts +22 -0
  107. package/src/utils/config-merge.test.ts +24 -0
  108. package/src/utils/config-merge.ts +2 -0
  109. package/src/utils/content-width.test.ts +37 -0
  110. package/src/utils/content-width.ts +17 -0
  111. package/src/utils/icons.test.ts +26 -0
  112. package/src/utils/icons.ts +8 -0
  113. package/src/utils/plugin-storage.test.ts +94 -0
  114. package/src/utils/plugin-storage.ts +98 -0
  115. package/src/utils/theme.test.ts +216 -0
  116. package/src/utils/tokens.ts +113 -3
  117. package/src/welcome.test.ts +213 -0
  118. package/src/welcome.ts +130 -0
  119. package/dist/chunk-MMUPR2JW.js +0 -1
@@ -1 +1 @@
1
- "use strict";var t=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var u=(o,e)=>{for(var a in e)t(o,a,{get:e[a],enumerable:!0})},g=(o,e,a,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of d(e))!l.call(o,r)&&r!==a&&t(o,r,{get:()=>e[r],enumerable:!(s=p(e,r))||s.enumerable});return o};var m=o=>g(t({},"__esModule",{value:!0}),o);var f={};u(f,{THEME_EXAMPLES:()=>c,THEME_TOKEN_DOCS:()=>i,getThemeReference:()=>b});module.exports=m(f);var n={colors:{primary:{50:"#ffffff",100:"#f5f5f5",200:"#d4d4d4",300:"#a3a3a3",400:"#737373",500:"#171717",600:"#0f0f0f",700:"#0a0a0a",800:"#050505",900:"#030303",950:"#000000"},secondary:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},accent:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},success:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},warning:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},error:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},info:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"}},spacing:{0:"0px",1:"0.25rem",2:"0.5rem",3:"0.75rem",4:"1rem",5:"1.25rem",6:"1.5rem",8:"2rem",10:"2.5rem",12:"3rem",16:"4rem",20:"5rem",24:"6rem",32:"8rem",40:"10rem",48:"12rem",56:"14rem",64:"16rem"},typography:{fontFamily:{sans:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',serif:'Georgia, Cambria, "Times New Roman", Times, serif',mono:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem"},fontWeight:{normal:"400",medium:"500",semibold:"600",bold:"700"},lineHeight:{tight:"1.25",normal:"1.5",relaxed:"1.625"}},shadows:{none:"none",sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)"},borders:{none:"none",sm:"1px solid",md:"2px solid",lg:"4px solid"},radius:{none:"0px",sm:"0.125rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem",full:"9999px"}};var i={overview:"Persona uses a three-layer design token system: palette \u2192 semantic \u2192 components. Most themes only need palette.colors overrides: semantic and component layers auto-derive from palette values. Config also accepts non-theme appearance options (launcher, sendButton, toolCall, etc.).",layers:{palette:{description:"Primitive design tokens. Override specific shades to change the entire widget feel.",colors:{description:"7 color scales, each with shades 50 (lightest) to 950 (darkest). Override only the shades you need.",scales:{gray:"Neutrals: backgrounds, text, borders. Key shades: 50 (lightest bg), 100 (secondary bg), 200 (borders), 500 (muted text), 900 (primary text).",primary:"Brand color: buttons, links, interactive elements. Key shades: 500 (default), 600 (hover).",accent:"Secondary highlight. Key shades: 500 (default), 600 (hover).",secondary:"Tertiary color scale.",success:"Positive feedback (default: green).",warning:"Caution feedback (default: yellow).",error:"Error/danger feedback (default: red)."}},radius:{description:"Border radius scale. Add custom keys like launcher, button.",defaults:{none:"0px",sm:"0.125rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem",full:"9999px"}},typography:{fontFamily:"Three stacks: sans (system-ui), serif (Georgia), mono (ui-monospace). Override individual stack values.",fontSize:"Scale: xs (0.75rem), sm (0.875rem), base (1rem), lg (1.125rem), xl (1.25rem), 2xl (1.5rem), 3xl (1.875rem), 4xl (2.25rem).",fontWeight:"normal (400), medium (500), semibold (600), bold (700).",lineHeight:"tight (1.25), normal (1.5), relaxed (1.625)."},shadows:"Scale: none, sm, md, lg, xl, 2xl. Values are CSS box-shadow strings.",borders:"Scale: none, sm (1px solid), md (2px solid), lg (4px solid).",spacing:"Scale: 0 (0px), 1 (0.25rem), 2 (0.5rem), 3 (0.75rem), 4 (1rem), 5 (1.25rem), 6 (1.5rem), 8 (2rem), 10 (2.5rem), 12 (3rem), 16-64."},semantic:{description:'Design intent tokens. Auto-derived from palette by default. Override to redirect token resolution. Values are token reference strings like "palette.colors.primary.500".',colors:{primary:"palette.colors.primary.500: Primary brand color.",secondary:"palette.colors.gray.500: Secondary color.",accent:"palette.colors.primary.600: Accent/interactive color.",surface:"palette.colors.gray.50: Panel/card backgrounds.",background:"palette.colors.gray.50: Page background.",container:"palette.colors.gray.100: Container backgrounds.",text:"palette.colors.gray.900: Primary text.",textMuted:"palette.colors.gray.500: Muted/secondary text.",textInverse:"palette.colors.gray.50: Text on dark backgrounds.",border:"palette.colors.gray.200: Default border color.",divider:"palette.colors.gray.200: Divider lines.",interactive:{default:"palette.colors.primary.500",hover:"palette.colors.primary.600",focus:"palette.colors.primary.700",active:"palette.colors.primary.800",disabled:"palette.colors.gray.300"},feedback:{success:"palette.colors.success.500",warning:"palette.colors.warning.500",error:"palette.colors.error.500",info:"palette.colors.primary.500"}},spacing:"xs (0.25rem), sm (0.5rem), md (1rem), lg (1.5rem), xl (2rem), 2xl (2.5rem).",typography:"fontFamily, fontSize, fontWeight, lineHeight: reference palette typography tokens."},components:{description:"UI element tokens. Rarely needed for basic theming. Override for fine-grained control. All values are token references or raw CSS strings.",button:{description:"Three variants: primary, secondary, ghost.",properties:"background, foreground, borderRadius, padding."},input:{description:"Message input field.",properties:"background, placeholder, borderRadius, padding, focus.border, focus.ring."},launcher:{description:"Floating launcher button.",properties:"size (60px), iconSize (28px), borderRadius, shadow."},panel:{description:"Chat panel container.",properties:'width, maxWidth (440px), height (600px), maxHeight, borderRadius, shadow, inset (16px, gap around a detached panel), canvasBackground (transparent, fills the region behind a detached panel in docked and inline embed modes; a no-op in sidebar mode, where the gap stays click-through and the host page shows through like floating). inset and canvasBackground apply only when launcher.detachedPanel is true or artifacts.layout.paneAppearance is "detached".'},header:{description:"Chat panel header.",properties:"background, border, borderRadius, padding, iconBackground, iconForeground, titleForeground, subtitleForeground, actionIconForeground, shadow, borderBottom."},message:{description:"Chat message bubbles.",user:"background, text, borderRadius, shadow.",assistant:"background, text, borderRadius, border (optional), shadow (optional)."},markdown:{description:"Markdown rendering in messages and artifact pane.",properties:"inlineCode (background, foreground), link.foreground, prose.fontFamily, heading.h1/h2 (fontSize, fontWeight)."},voice:"recording (indicator, background, border), processing (icon, background), speaking (icon).",approval:"requested (background, border, text, shadow), approve (background, foreground), deny (background, foreground).",attachment:"image (background, border).",scrollToBottom:"Floating scroll-to-bottom affordance shared by transcript and event stream: background, foreground, border, size, borderRadius, shadow, padding, gap, fontSize, iconSize.",toolBubble:"shadow: tool call row box-shadow.",reasoningBubble:"shadow: reasoning/thinking row box-shadow.",composer:"shadow: message input form box-shadow.",artifact:"toolbar (icon styling, copy menu), tab (background, active states), pane (background, toolbarBackground)."}},colorScheme:'"dark" merges darkTheme overrides on top of theme. "auto" detects system preference or <html class="dark">. "light" is default. colorScheme does NOT auto-invert colors: provide dark palette and semantic overrides yourself.',plugins:{description:"Plugins transform theme tokens before resolution. Use with createTheme().",available:{brandPlugin:'Auto-generates full color scales from a single brand hex: brandPlugin({ colors: { primary: "#7c3aed" } }).',accessibilityPlugin:"Enhanced focus indicators and disabled states.",highContrastPlugin:"Increased contrast for visual accessibility.",reducedMotionPlugin:"Disables all animations (sets transitions to 0ms).",animationsPlugin:"Adds transition and easing tokens."},usage:'createTheme(themeOverrides, { plugins: [brandPlugin({ colors: { primary: "#7c3aed" } })] })'},widgetConfig:{description:'Non-theme config options on the widget config object that affect appearance. These are siblings of "theme" in the config, not nested inside it.',launcher:{description:"Floating launcher button and panel positioning.",properties:{enabled:"Show/hide the launcher button.",title:"Header title text.",subtitle:"Header subtitle text.",position:'"bottom-right" | "bottom-left" | "top-right" | "top-left".',width:"Chat panel width (CSS value).",fullHeight:"Fill full height of container.",mountMode:'"floating" | "docked".',agentIconText:"Emoji/text for agent icon.",border:"Border style for launcher button.",shadow:"Box shadow for launcher button.",collapsedMaxWidth:"Max-width for launcher pill when panel closed."}},sendButton:{description:"Send button appearance.",properties:"backgroundColor, textColor, borderWidth, borderColor, paddingX, paddingY, iconText, iconName, size."},closeButton:{description:"Close button (on launcher config).",properties:"closeButtonSize, closeButtonColor, closeButtonBackgroundColor, closeButtonBorderWidth, closeButtonBorderColor, closeButtonBorderRadius."},clearChat:{description:"Clear chat button (on launcher.clearChat config).",properties:"enabled, iconColor, backgroundColor, borderWidth, borderColor, borderRadius, size."},scrollToBottom:{description:"Shared transcript + event-stream jump-to-latest affordance.",properties:'features.scrollToBottom.enabled, features.scrollToBottom.iconName, features.scrollToBottom.label (empty string renders icon-only). Defaults: enabled=true, iconName="arrow-down", label="".'},toolCall:{description:"Tool call display styling, text templates, loading animations, and rendering hooks. Text templates support placeholders ({toolName}, {duration}) and inline formatting (~dim~, *italic*, **bold**). renderCollapsedSummary receives elapsed (static string) and createElapsedElement() (live-updating span) in its context.",properties:"shadow, backgroundColor, borderColor, borderWidth, borderRadius, headerBackgroundColor, headerTextColor, headerPaddingX, headerPaddingY, contentBackgroundColor, contentTextColor, contentPaddingX, contentPaddingY, codeBlockBackgroundColor, codeBlockBorderColor, codeBlockTextColor, toggleTextColor, labelTextColor, activeTextTemplate, completeTextTemplate, loadingAnimationColor, loadingAnimationSecondaryColor, loadingAnimationDuration, renderCollapsedSummary, renderCollapsedPreview, renderGroupedSummary."},reasoning:{description:"Reasoning/thinking row rendering hooks, text templates, and loading animations. Text templates support {duration} placeholder and inline formatting (~dim~, *italic*, **bold**). renderCollapsedSummary receives elapsed (static string) and createElapsedElement() (live-updating span) in its context.",properties:"renderCollapsedSummary, renderCollapsedPreview, activeTextTemplate, completeTextTemplate, loadingAnimationColor, loadingAnimationSecondaryColor, loadingAnimationDuration."},approval:{description:`Tool approval card styling and behavior. Neutral surface card; the primary action anchors to the brand --persona-primary token. Set to false to disable. Set enableAlwaysAllow: true to add the split "Always allow / Allow once" control (needs a backend to persist the policy via onDecision's remember).`,properties:'enableAlwaysAllow, detailsDisplay ("collapsed" | "expanded" | "hidden"), showDetailsLabel, hideDetailsLabel, backgroundColor, borderColor, titleColor, descriptionColor, reasonColor, reasonLabel, approveButtonColor, approveButtonTextColor, denyButtonColor, denyButtonTextColor, parameterBackgroundColor, parameterTextColor, approveLabel, denyLabel, formatDescription. (title no longer renders in the default card; use formatDescription to customize the summary.)'},copy:{description:"Widget text content.",properties:"showWelcomeCard (boolean), welcomeTitle, welcomeSubtitle, inputPlaceholder, sendButtonLabel."},voiceRecognition:{description:"Voice input configuration.",properties:"enabled, pauseDuration, iconColor, backgroundColor."},textToSpeech:{description:"Text-to-speech for assistant messages.",properties:'enabled, provider ("browser" | "runtype"), browserFallback, voice, rate, pitch.'},suggestionChips:"string[]: Suggested prompts shown to the user.",messageActions:{description:"Message action buttons (copy, upvote, downvote).",properties:'enabled, showCopy, showUpvote, showDownvote, visibility ("hover" | "always"), align ("left" | "center" | "right"), layout ("pill-inside" | "row-inside").'},attachments:{description:"File attachment configuration.",properties:"enabled, allowedTypes (string[]), maxFileSize (bytes), maxFiles, buttonIconName, buttonTooltipText."},markdown:{description:"Markdown rendering configuration.",properties:"options (gfm, breaks, headerIds, headerPrefix, pedantic, mangle, silent), disableDefaultStyles."},layout:{description:"Layout configuration.",showHeader:"boolean: show/hide the header section entirely.",showFooter:"boolean: show/hide the footer/composer section entirely.",contentMaxWidth:'CSS width value for centering content (e.g. "720px", "90ch").',header:'"default" | "minimal". Options: showIcon, showTitle, showSubtitle, showCloseButton, showClearChat.',messages:'"bubble" | "flat" | "minimal". Options: groupConsecutive, avatar (show, position, userAvatar, assistantAvatar), timestamp (show, position).'},statusIndicator:{description:"Status text shown below the composer.",properties:{visible:"Show/hide the status indicator.",align:'"left" | "center" | "right": text alignment (default: "right").',idleText:'Text shown when idle (default: "Online").',idleLink:"URL to open when idle text is clicked (wraps text in a link).",connectingText:'Text shown while connecting (default: "Connecting\u2026").',connectedText:'Text shown while streaming (default: "Streaming\u2026").',errorText:'Text shown on error (default: "Offline").'}},features:{description:"Feature flags.",properties:"showReasoning (AI thinking steps), showToolCalls (tool invocations), toolCallDisplay (collapsedMode, activePreview, activeMinHeight, previewMaxLines, grouped, groupedMode, expandable, loadingAnimation), reasoningDisplay (activePreview, activeMinHeight, previewMaxLines, expandable, loadingAnimation), artifacts (sidebar config)."}}},c={darkIndigo:{description:"Dark mode with indigo accent: override grays for dark backgrounds and semantic tokens for inverted text/surface",theme:{palette:{colors:{primary:{500:"#6366f1",600:"#4f46e5"},gray:{50:"#f1f5f9",100:"#1e293b",200:"#334155",500:"#94a3b8",900:"#0f172a",950:"#020617"}}},semantic:{colors:{surface:"palette.colors.gray.900",background:"palette.colors.gray.900",container:"palette.colors.gray.100",text:"palette.colors.gray.50",textMuted:"palette.colors.gray.500",textInverse:"palette.colors.gray.900",border:"palette.colors.gray.200"}}}},warmVintage:{description:"Warm sepia tones with serif font and subtle radius",theme:{palette:{colors:{primary:{500:"#b45309",600:"#92400e"},gray:{50:"#fef3c7",100:"#fef9c3",200:"#d6d3d1",500:"#78716c",900:"#44403c"}},radius:{sm:"0.125rem",md:"0.25rem",lg:"0.375rem"},typography:{fontFamily:{sans:'Georgia, Cambria, "Times New Roman", Times, serif'}}}}},neonCyberpunk:{description:"Neon on dark with monospace font: full semantic override for dark background",theme:{palette:{colors:{primary:{500:"#f0abfc",600:"#e879f9"},accent:{500:"#22d3ee",600:"#06b6d4"},gray:{50:"#f0abfc",100:"#1e0a3c",200:"#3b0764",500:"#c084fc",900:"#0c0a1a",950:"#050412"}},radius:{sm:"0",md:"0.25rem",lg:"0.375rem"},typography:{fontFamily:{sans:"ui-monospace, SFMono-Regular, Menlo, monospace"}}},semantic:{colors:{surface:"palette.colors.gray.900",background:"palette.colors.gray.950",container:"palette.colors.gray.100",text:"palette.colors.gray.50",textMuted:"palette.colors.gray.500",border:"palette.colors.gray.200"}}}},cleanRounded:{description:"Clean light theme with large radius and panel styling",theme:{palette:{radius:{sm:"6px",md:"8px",lg:"12px",launcher:"50px",button:"8px"}},components:{panel:{borderRadius:"16px",shadow:"palette.shadows.2xl"}}}}};function b(){return{tokenDocs:i,defaultColorPalette:n.colors,defaultRadius:n.radius,examples:c,sdkPresets:["shop","minimal","fullscreen"]}}0&&(module.exports={THEME_EXAMPLES,THEME_TOKEN_DOCS,getThemeReference});
1
+ "use strict";var t=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var g=(o,e)=>{for(var a in e)t(o,a,{get:e[a],enumerable:!0})},u=(o,e,a,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of d(e))!l.call(o,r)&&r!==a&&t(o,r,{get:()=>e[r],enumerable:!(s=p(e,r))||s.enumerable});return o};var m=o=>u(t({},"__esModule",{value:!0}),o);var f={};g(f,{THEME_EXAMPLES:()=>c,THEME_TOKEN_DOCS:()=>i,getThemeReference:()=>b});module.exports=m(f);var n={colors:{primary:{50:"#ffffff",100:"#f5f5f5",200:"#d4d4d4",300:"#a3a3a3",400:"#737373",500:"#171717",600:"#0f0f0f",700:"#0a0a0a",800:"#050505",900:"#030303",950:"#000000"},secondary:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},accent:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},success:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},warning:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},error:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},info:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"}},spacing:{0:"0px",1:"0.25rem",2:"0.5rem",3:"0.75rem",4:"1rem",5:"1.25rem",6:"1.5rem",8:"2rem",10:"2.5rem",12:"3rem",16:"4rem",20:"5rem",24:"6rem",32:"8rem",40:"10rem",48:"12rem",56:"14rem",64:"16rem"},typography:{fontFamily:{sans:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',serif:'Georgia, Cambria, "Times New Roman", Times, serif',mono:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem"},fontWeight:{normal:"400",medium:"500",semibold:"600",bold:"700"},lineHeight:{tight:"1.25",normal:"1.5",relaxed:"1.625"}},shadows:{none:"none",sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)"},borders:{none:"none",sm:"1px solid",md:"2px solid",lg:"4px solid"},radius:{none:"0px",sm:"0.125rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem",full:"9999px"}};var i={overview:"Persona uses a three-layer design token system: palette \u2192 semantic \u2192 components. Most themes only need palette.colors overrides: semantic and component layers auto-derive from palette values. Config also accepts non-theme appearance options (launcher, sendButton, toolCall, etc.).",layers:{palette:{description:"Primitive design tokens. Override specific shades to change the entire widget feel.",colors:{description:"7 color scales, each with shades 50 (lightest) to 950 (darkest). Override only the shades you need.",scales:{gray:"Neutrals: backgrounds, text, borders. Key shades: 50 (lightest bg), 100 (secondary bg), 200 (borders), 500 (muted text), 900 (primary text).",primary:"Brand color: buttons, links, interactive elements. Key shades: 500 (default), 600 (hover).",accent:"Secondary highlight. Key shades: 500 (default), 600 (hover).",secondary:"Tertiary color scale.",success:"Positive feedback (default: green).",warning:"Caution feedback (default: yellow).",error:"Error/danger feedback (default: red)."}},radius:{description:"Border radius scale. Add custom keys like launcher, button.",defaults:{none:"0px",sm:"0.125rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem",full:"9999px"}},typography:{fontFamily:"Three stacks: sans (system-ui), serif (Georgia), mono (ui-monospace). Override individual stack values.",fontSize:"Scale: xs (0.75rem), sm (0.875rem), base (1rem), lg (1.125rem), xl (1.25rem), 2xl (1.5rem), 3xl (1.875rem), 4xl (2.25rem).",fontWeight:"normal (400), medium (500), semibold (600), bold (700).",lineHeight:"tight (1.25), normal (1.5), relaxed (1.625)."},shadows:"Scale: none, sm, md, lg, xl, 2xl. Values are CSS box-shadow strings.",borders:"Scale: none, sm (1px solid), md (2px solid), lg (4px solid).",spacing:"Scale: 0 (0px), 1 (0.25rem), 2 (0.5rem), 3 (0.75rem), 4 (1rem), 5 (1.25rem), 6 (1.5rem), 8 (2rem), 10 (2.5rem), 12 (3rem), 16-64."},semantic:{description:'Design intent tokens. Auto-derived from palette by default. Override to redirect token resolution. Values are token reference strings like "palette.colors.primary.500".',colors:{primary:"palette.colors.primary.500: Primary brand color.",secondary:"palette.colors.gray.500: Secondary color.",accent:"palette.colors.primary.600: Accent/interactive color.",surface:"palette.colors.gray.50: Panel/card backgrounds.",background:"palette.colors.gray.50: Page background.",container:"palette.colors.gray.100: Container backgrounds.",text:"palette.colors.gray.900: Primary text.",textMuted:"palette.colors.gray.500: Muted/secondary text.",textInverse:"palette.colors.gray.50: Text on dark backgrounds.",border:"palette.colors.gray.200: Default border color.",divider:"palette.colors.gray.200: Divider lines.",interactive:{default:"palette.colors.primary.500",hover:"palette.colors.primary.600",focus:"palette.colors.primary.700",active:"palette.colors.primary.800",disabled:"palette.colors.gray.300"},feedback:{success:"palette.colors.success.500",warning:"palette.colors.warning.500",error:"palette.colors.error.500",info:"palette.colors.primary.500"}},spacing:"xs (0.25rem), sm (0.5rem), md (1rem), lg (1.5rem), xl (2rem), 2xl (2.5rem).",typography:"fontFamily, fontSize, fontWeight, lineHeight: reference palette typography tokens."},components:{description:"UI element tokens. Rarely needed for basic theming. Override for fine-grained control. All values are token references or raw CSS strings.",button:{description:"Three variants: primary, secondary, ghost.",properties:"background, foreground, borderRadius, padding."},input:{description:"Message input field.",properties:"background, placeholder, borderRadius, padding, focus.border, focus.ring."},launcher:{description:"Floating launcher button.",properties:"size (60px), iconSize (28px), borderRadius, shadow."},panel:{description:"Chat panel container.",properties:'width, maxWidth (440px), height (600px), maxHeight, borderRadius, shadow, inset (16px, gap around a detached panel), canvasBackground (transparent, fills the region behind a detached panel in docked and inline embed modes; a no-op in sidebar mode, where the gap stays click-through and the host page shows through like floating). inset and canvasBackground apply only when launcher.detachedPanel is true or artifacts.layout.paneAppearance is "detached".'},header:{description:"Chat panel header.",properties:"background, border, borderRadius, padding, iconBackground, iconForeground, actionIconForeground, shadow, borderBottom, title and subtitle (each fontFamily, fontSize, fontWeight, lineHeight, letterSpacing, color).",legacy:"titleForeground and subtitleForeground are legacy aliases of header.title.color and header.subtitle.color. Both still work; the title/subtitle color wins when both are set."},message:{description:"Chat message bubbles.",user:"background, text, borderRadius, shadow.",assistant:"background, text, borderRadius, border (optional), shadow (optional)."},markdown:{description:"Markdown rendering in messages and artifact pane.",properties:"inlineCode (background, foreground), link.foreground, prose.fontFamily, heading.h1/h2 (fontSize, fontWeight), codeBlock (background, borderColor, textColor, borderRadius: follows palette.radius.md), table (headerBackground, borderColor), hr.color, blockquote (borderColor, background, textColor)."},introCard:{description:"Welcome surface above the message list. Flat by default (transparent, no shadow).",properties:"background, borderRadius, padding, shadow, border (full CSS shorthand, default none), title and subtitle (each fontFamily, fontSize, fontWeight, lineHeight, letterSpacing, color)."},suggestion:{description:"Starter prompt and follow-up suggestion chrome. Three variants: chip, card, list.",properties:"background, foreground, border, borderRadius, padding, shadow, gap (icon to copy inside one item), itemGap (space between items, default 8px), minHeight, fontSize, lineHeight, iconSize, hoverBackground, hoverForeground, hoverBorder, pressedBackground, focusRing, disabledOpacity."},voice:"recording (indicator, background, border), processing (icon, background), speaking (icon).",approval:"requested (background, border, text, shadow), approve (background, foreground), deny (background, foreground).",attachment:"image (background, border).",scrollToBottom:"Floating scroll-to-bottom affordance shared by transcript and event stream: background, foreground, border, size, borderRadius, shadow, padding, gap, fontSize, iconSize.",toolBubble:"shadow: tool call row box-shadow.",scrollbar:"Shared scrollbar appearance for every scroller: thumb (default semantic.colors.border), track (default transparent).",reasoningBubble:"shadow: reasoning/thinking row box-shadow.",composer:"Message input form: shadow (box-shadow), borderColor, padding (form inset), gap (textarea row to actions row), fontSize and lineHeight (textarea type).",artifact:"toolbar (icon styling, copy menu), tab (background, active states), pane (background, toolbarBackground)."}},colorScheme:'"dark" merges darkTheme overrides on top of theme. "auto" detects system preference or <html class="dark">. "light" is default. colorScheme does NOT auto-invert colors: provide dark palette and semantic overrides yourself.',plugins:{description:"Plugins transform theme tokens before resolution. Use with createTheme().",available:{brandPlugin:'Auto-generates full color scales from a single brand hex: brandPlugin({ colors: { primary: "#7c3aed" } }).',accessibilityPlugin:"Enhanced focus indicators and disabled states.",highContrastPlugin:"Increased contrast for visual accessibility.",reducedMotionPlugin:"Disables all animations (sets transitions to 0ms).",animationsPlugin:"Adds transition and easing tokens."},usage:'createTheme(themeOverrides, { plugins: [brandPlugin({ colors: { primary: "#7c3aed" } })] })'},widgetConfig:{description:'Non-theme config options on the widget config object that affect appearance. These are siblings of "theme" in the config, not nested inside it.',launcher:{description:"Floating launcher button and panel positioning.",properties:{enabled:"Show/hide the launcher button.",title:"Header title text.",subtitle:"Header subtitle text.",position:'"bottom-right" | "bottom-left" | "top-right" | "top-left".',width:"Chat panel width (CSS value).",fullHeight:"Fill full height of container.",mountMode:'"floating" | "docked".',agentIconText:"Emoji/text for agent icon.",border:"Border style for launcher button.",shadow:"Box shadow for launcher button.",collapsedMaxWidth:"Max-width for launcher pill when panel closed."}},sendButton:{description:"Send button appearance.",properties:"backgroundColor, textColor, borderWidth, borderColor, paddingX, paddingY, iconText, iconName, size."},closeButton:{description:"Close button (on launcher config).",properties:"closeButtonSize, closeButtonColor, closeButtonBackgroundColor, closeButtonBorderWidth, closeButtonBorderColor, closeButtonBorderRadius."},clearChat:{description:"Clear chat button (on launcher.clearChat config).",properties:"enabled, iconColor, backgroundColor, borderWidth, borderColor, borderRadius, size."},scrollToBottom:{description:"Shared transcript + event-stream jump-to-latest affordance.",properties:'features.scrollToBottom.enabled, features.scrollToBottom.iconName, features.scrollToBottom.label (empty string renders icon-only). Defaults: enabled=true, iconName="arrow-down", label="".'},toolCall:{description:"Tool call display styling, text templates, loading animations, and rendering hooks. Text templates support placeholders ({toolName}, {duration}) and inline formatting (~dim~, *italic*, **bold**). renderCollapsedSummary receives elapsed (static string) and createElapsedElement() (live-updating span) in its context.",properties:"shadow, backgroundColor, borderColor, borderWidth, borderRadius, headerBackgroundColor, headerTextColor, headerPaddingX, headerPaddingY, contentBackgroundColor, contentTextColor, contentPaddingX, contentPaddingY, codeBlockBackgroundColor, codeBlockBorderColor, codeBlockTextColor, toggleTextColor, labelTextColor, activeTextTemplate, completeTextTemplate, loadingAnimationColor, loadingAnimationSecondaryColor, loadingAnimationDuration, renderCollapsedSummary, renderCollapsedPreview, renderGroupedSummary."},reasoning:{description:"Reasoning/thinking row rendering hooks, text templates, and loading animations. Text templates support {duration} placeholder and inline formatting (~dim~, *italic*, **bold**). renderCollapsedSummary receives elapsed (static string) and createElapsedElement() (live-updating span) in its context.",properties:"renderCollapsedSummary, renderCollapsedPreview, activeTextTemplate, completeTextTemplate, loadingAnimationColor, loadingAnimationSecondaryColor, loadingAnimationDuration."},approval:{description:`Tool approval card styling and behavior. Neutral surface card; the primary action anchors to the brand --persona-primary token. Set to false to disable. Set enableAlwaysAllow: true to add the split "Always allow / Allow once" control (needs a backend to persist the policy via onDecision's remember).`,properties:'enableAlwaysAllow, detailsDisplay ("collapsed" | "expanded" | "hidden"), showDetailsLabel, hideDetailsLabel, backgroundColor, borderColor, titleColor, descriptionColor, reasonColor, reasonLabel, approveButtonColor, approveButtonTextColor, denyButtonColor, denyButtonTextColor, parameterBackgroundColor, parameterTextColor, approveLabel, denyLabel, formatDescription. (title no longer renders in the default card; use formatDescription to customize the summary.)'},copy:{description:"Widget text content.",properties:"inputPlaceholder, sendButtonLabel, stopButtonLabel. (showWelcomeCard, welcomeTitle, welcomeSubtitle are deprecated aliases of the welcome namespace.)"},voiceRecognition:{description:"Voice input configuration.",properties:"enabled, pauseDuration, iconColor, backgroundColor."},textToSpeech:{description:"Text-to-speech for assistant messages.",properties:'enabled, provider ("browser" | "runtype"), browserFallback, voice, rate, pitch.'},suggestions:{description:"Rich starter and follow-up suggestion surfaces. Strings remain valid item shorthand.",properties:'starters.items, starters.variant ("card" | "chip" | "list"), starters.placement ("auto" | "welcome" | "composer"), starters.behavior ("send" | "fill"), starters.overflow ("scroll" | "wrap"), starters.maxItems, followUps.enabled, followUps.expose, followUps.variant, followUps.placement ("auto" | "after-message" | "composer"), followUps.behavior, followUps.overflow ("scroll" | "wrap"), followUps.maxItems.'},welcome:{description:"First-open welcome surface. Supersedes copy.welcomeTitle / welcomeSubtitle / showWelcomeCard.",properties:'title, subtitle, icon ({ type: "lucide", name } | { type: "image", url, alt } | { type: "text", text } | function), variant ("card" | "hero" | "none"), dismiss ("never" | "on-first-message"), message (display-only greeting bubble, ignored under "hero").'},suggestionChips:"Deprecated string[] shorthand for starter prompts. Prefer suggestions.starters.items.",messageActions:{description:"Message action buttons (copy, upvote, downvote).",properties:'enabled, showCopy, showUpvote, showDownvote, visibility ("hover" | "always"), align ("left" | "center" | "right"), layout ("pill-inside" | "row-inside").'},attachments:{description:"File attachment configuration.",properties:"enabled, allowedTypes (string[]), maxFileSize (bytes), maxFiles, buttonIconName, buttonTooltipText."},markdown:{description:"Markdown rendering configuration.",properties:"options (gfm, breaks, headerIds, headerPrefix, pedantic, mangle, silent), disableDefaultStyles."},layout:{description:"Layout configuration.",showHeader:"boolean: show/hide the header section entirely.",showFooter:"boolean: show/hide the footer/composer section entirely.",contentMaxWidth:'CSS width value for centering content (e.g. "720px", "90ch").',header:'"default" | "minimal". Options: showIcon, showTitle, showSubtitle, showCloseButton, showClearChat.',messages:'"bubble" | "flat" | "minimal". Options: groupConsecutive, avatar (show, position, userAvatar, assistantAvatar), timestamp (show, position).'},statusIndicator:{description:"Status text shown below the composer.",properties:{visible:"Show/hide the status indicator.",align:'"left" | "center" | "right": text alignment (default: "right").',idleText:'Text shown when idle (default: "Online").',idleLink:"URL to open when idle text is clicked (wraps text in a link).",connectingText:'Text shown while connecting (default: "Connecting\u2026").',connectedText:'Text shown while streaming (default: "Streaming\u2026").',errorText:'Text shown on error (default: "Offline").'}},features:{description:"Feature flags.",properties:"showReasoning (AI thinking steps), showToolCalls (tool invocations), toolCallDisplay (collapsedMode, activePreview, activeMinHeight, previewMaxLines, grouped, groupedMode, expandable, loadingAnimation), reasoningDisplay (activePreview, activeMinHeight, previewMaxLines, expandable, loadingAnimation), artifacts (sidebar config)."}}},c={darkIndigo:{description:"Dark mode with indigo accent: override grays for dark backgrounds and semantic tokens for inverted text/surface",theme:{palette:{colors:{primary:{500:"#6366f1",600:"#4f46e5"},gray:{50:"#f1f5f9",100:"#1e293b",200:"#334155",500:"#94a3b8",900:"#0f172a",950:"#020617"}}},semantic:{colors:{surface:"palette.colors.gray.900",background:"palette.colors.gray.900",container:"palette.colors.gray.100",text:"palette.colors.gray.50",textMuted:"palette.colors.gray.500",textInverse:"palette.colors.gray.900",border:"palette.colors.gray.200"}}}},warmVintage:{description:"Warm sepia tones with serif font and subtle radius",theme:{palette:{colors:{primary:{500:"#b45309",600:"#92400e"},gray:{50:"#fef3c7",100:"#fef9c3",200:"#d6d3d1",500:"#78716c",900:"#44403c"}},radius:{sm:"0.125rem",md:"0.25rem",lg:"0.375rem"},typography:{fontFamily:{sans:'Georgia, Cambria, "Times New Roman", Times, serif'}}}}},neonCyberpunk:{description:"Neon on dark with monospace font: full semantic override for dark background",theme:{palette:{colors:{primary:{500:"#f0abfc",600:"#e879f9"},accent:{500:"#22d3ee",600:"#06b6d4"},gray:{50:"#f0abfc",100:"#1e0a3c",200:"#3b0764",500:"#c084fc",900:"#0c0a1a",950:"#050412"}},radius:{sm:"0",md:"0.25rem",lg:"0.375rem"},typography:{fontFamily:{sans:"ui-monospace, SFMono-Regular, Menlo, monospace"}}},semantic:{colors:{surface:"palette.colors.gray.900",background:"palette.colors.gray.950",container:"palette.colors.gray.100",text:"palette.colors.gray.50",textMuted:"palette.colors.gray.500",border:"palette.colors.gray.200"}}}},cleanRounded:{description:"Clean light theme with large radius and panel styling",theme:{palette:{radius:{sm:"6px",md:"8px",lg:"12px",launcher:"50px",button:"8px"}},components:{panel:{borderRadius:"16px",shadow:"palette.shadows.2xl"}}}}};function b(){return{tokenDocs:i,defaultColorPalette:n.colors,defaultRadius:n.radius,examples:c,sdkPresets:["shop","minimal","fullscreen"]}}0&&(module.exports={THEME_EXAMPLES,THEME_TOKEN_DOCS,getThemeReference});
@@ -184,6 +184,15 @@ interface PanelTokens extends ComponentTokenSet {
184
184
  /** Background of the region revealed behind a detached panel. */
185
185
  canvasBackground?: string;
186
186
  }
187
+ /** Per-element text styling shared by themable text surfaces. */
188
+ interface TextStyleTokens {
189
+ fontFamily?: string;
190
+ fontSize?: string;
191
+ fontWeight?: string;
192
+ lineHeight?: string;
193
+ letterSpacing?: string;
194
+ color?: TokenReference<'color'>;
195
+ }
187
196
  interface HeaderTokens extends ComponentTokenSet {
188
197
  background: TokenReference<'color'>;
189
198
  border: TokenReference<'color'>;
@@ -192,10 +201,14 @@ interface HeaderTokens extends ComponentTokenSet {
192
201
  iconBackground: TokenReference<'color'>;
193
202
  /** Foreground (glyph stroke or emoji text) on the header avatar tile. */
194
203
  iconForeground: TokenReference<'color'>;
195
- /** Header title line (next to the icon, or minimal layout title). */
204
+ /** Legacy alias of `title.color`; `title.color` wins when both are set. */
196
205
  titleForeground: TokenReference<'color'>;
197
- /** Header subtitle line under the title. */
206
+ /** Legacy alias of `subtitle.color`; `subtitle.color` wins when both are set. */
198
207
  subtitleForeground: TokenReference<'color'>;
208
+ /** Header title typography (next to the icon, or minimal layout title). */
209
+ title?: TextStyleTokens;
210
+ /** Header subtitle typography, for the line under the title. */
211
+ subtitle?: TextStyleTokens;
199
212
  /** Default color for clear / close icon buttons when launcher overrides are unset. */
200
213
  actionIconForeground: TokenReference<'color'>;
201
214
  /** Box-shadow on the header (e.g., a fade shadow to replace the default border). */
@@ -225,7 +238,7 @@ interface MessageTokens {
225
238
  }
226
239
  /**
227
240
  * Welcome / intro card rendered above the message list when no messages exist.
228
- * Set `copy.showWelcomeCard: false` to hide it; use `layout.slots["body-top"]`
241
+ * Set `welcome.variant: "none"` to hide it; use `layout.slots["body-top"]`
229
242
  * to replace it wholesale.
230
243
  */
231
244
  interface IntroCardTokens extends ComponentTokenSet {
@@ -234,6 +247,12 @@ interface IntroCardTokens extends ComponentTokenSet {
234
247
  padding?: TokenReference<'spacing'>;
235
248
  /** Box-shadow on the intro card (token ref or raw CSS, e.g. `none`). */
236
249
  shadow?: string;
250
+ /** Full border shorthand on the intro card (raw CSS, e.g. `"1px solid rgba(0,0,0,0.1)"`). @default "none" */
251
+ border?: string;
252
+ /** Welcome title typography. */
253
+ title?: TextStyleTokens;
254
+ /** Welcome subtitle typography. */
255
+ subtitle?: TextStyleTokens;
237
256
  }
238
257
  /** Collapsible widget chrome (tool bubbles, reasoning bubbles, approval bubbles). */
239
258
  interface CollapsibleWidgetTokens {
@@ -276,6 +295,8 @@ interface MarkdownTokens {
276
295
  background?: TokenReference<'color'>;
277
296
  borderColor?: TokenReference<'color'>;
278
297
  textColor?: TokenReference<'color'>;
298
+ /** Corner radius; follows `palette.radius.md` by default so square-corner themes get square code blocks. */
299
+ borderRadius?: TokenReference<'radius'>;
279
300
  };
280
301
  /** Table styling. */
281
302
  table?: {
@@ -333,10 +354,27 @@ interface ToolBubbleTokens {
333
354
  interface ReasoningBubbleTokens {
334
355
  shadow: string;
335
356
  }
357
+ /** Scrollbar appearance shared by every scroller in the widget. */
358
+ interface ScrollbarTokens {
359
+ /** Thumb color. @default semantic.colors.border */
360
+ thumb?: TokenReference<'color'>;
361
+ /** Track color. @default "transparent" */
362
+ track?: TokenReference<'color'>;
363
+ }
336
364
  /** Composer (message input) chrome. */
337
365
  interface ComposerChromeTokens {
338
366
  /** Box-shadow on the composer form (raw CSS, e.g. `none`). */
339
367
  shadow: string;
368
+ /** Border color of the composer form. @default semantic.colors.border */
369
+ borderColor?: TokenReference<'color'>;
370
+ /** Inner padding of the composer form (raw CSS shorthand). @default "0.75rem 1rem" */
371
+ padding?: string;
372
+ /** Gap between the textarea row and the actions row. @default "0.5rem" */
373
+ gap?: string;
374
+ /** Composer textarea font-size. @default "0.875rem" */
375
+ fontSize?: string;
376
+ /** Composer textarea line-height. @default "1.25rem" */
377
+ lineHeight?: string;
340
378
  }
341
379
  /** Artifact toolbar chrome. */
342
380
  interface ArtifactToolbarTokens {
@@ -486,6 +524,29 @@ interface ScrollToBottomTokens extends ComponentTokenSet {
486
524
  fontSize?: string;
487
525
  iconSize?: string;
488
526
  }
527
+ /** Visual tokens shared by one suggestion presentation variant. */
528
+ interface SuggestionVariantTokens extends ComponentTokenSet {
529
+ /** Space inside one item, between its icon and its copy. */
530
+ gap?: string;
531
+ /** Space between suggestion items in the container. */
532
+ itemGap?: string;
533
+ minHeight?: string;
534
+ fontSize?: string;
535
+ lineHeight?: string;
536
+ iconSize?: string;
537
+ hoverBackground?: TokenReference<'color'>;
538
+ hoverForeground?: TokenReference<'color'>;
539
+ hoverBorder?: TokenReference<'color'>;
540
+ pressedBackground?: TokenReference<'color'>;
541
+ focusRing?: TokenReference<'color'>;
542
+ disabledOpacity?: string;
543
+ }
544
+ /** Starter and follow-up suggestion chrome. */
545
+ interface SuggestionTokens {
546
+ chip: SuggestionVariantTokens;
547
+ card: SuggestionVariantTokens;
548
+ list: SuggestionVariantTokens;
549
+ }
489
550
  /** Toggle group chrome (used by createToggleGroup). */
490
551
  interface ToggleGroupTokens {
491
552
  /** Gap between toggle buttons. Default: 0 (connected). */
@@ -510,12 +571,16 @@ interface ComponentTokens {
510
571
  toolBubble: ToolBubbleTokens;
511
572
  reasoningBubble: ReasoningBubbleTokens;
512
573
  composer: ComposerChromeTokens;
574
+ /** Scrollbar appearance for every scroller in the widget. */
575
+ scrollbar?: ScrollbarTokens;
513
576
  /** Icon button styling tokens. */
514
577
  iconButton?: IconButtonTokens;
515
578
  /** Label button styling tokens. */
516
579
  labelButton?: LabelButtonTokens;
517
580
  /** Scroll-to-bottom indicator styling tokens. */
518
581
  scrollToBottom?: ScrollToBottomTokens;
582
+ /** Starter prompt and follow-up suggestion styling tokens. */
583
+ suggestion?: SuggestionTokens;
519
584
  /** Toggle group styling tokens. */
520
585
  toggleGroup?: ToggleGroupTokens;
521
586
  /** Artifact toolbar, tab strip, and pane chrome. */
@@ -655,6 +720,7 @@ declare const THEME_TOKEN_DOCS: {
655
720
  header: {
656
721
  description: string;
657
722
  properties: string;
723
+ legacy: string;
658
724
  };
659
725
  message: {
660
726
  description: string;
@@ -665,11 +731,20 @@ declare const THEME_TOKEN_DOCS: {
665
731
  description: string;
666
732
  properties: string;
667
733
  };
734
+ introCard: {
735
+ description: string;
736
+ properties: string;
737
+ };
738
+ suggestion: {
739
+ description: string;
740
+ properties: string;
741
+ };
668
742
  voice: string;
669
743
  approval: string;
670
744
  attachment: string;
671
745
  scrollToBottom: string;
672
746
  toolBubble: string;
747
+ scrollbar: string;
673
748
  reasoningBubble: string;
674
749
  composer: string;
675
750
  artifact: string;
@@ -745,6 +820,14 @@ declare const THEME_TOKEN_DOCS: {
745
820
  description: string;
746
821
  properties: string;
747
822
  };
823
+ suggestions: {
824
+ description: string;
825
+ properties: string;
826
+ };
827
+ welcome: {
828
+ description: string;
829
+ properties: string;
830
+ };
748
831
  suggestionChips: string;
749
832
  messageActions: {
750
833
  description: string;
@@ -888,6 +971,7 @@ declare function getThemeReference(): {
888
971
  header: {
889
972
  description: string;
890
973
  properties: string;
974
+ legacy: string;
891
975
  };
892
976
  message: {
893
977
  description: string;
@@ -898,11 +982,20 @@ declare function getThemeReference(): {
898
982
  description: string;
899
983
  properties: string;
900
984
  };
985
+ introCard: {
986
+ description: string;
987
+ properties: string;
988
+ };
989
+ suggestion: {
990
+ description: string;
991
+ properties: string;
992
+ };
901
993
  voice: string;
902
994
  approval: string;
903
995
  attachment: string;
904
996
  scrollToBottom: string;
905
997
  toolBubble: string;
998
+ scrollbar: string;
906
999
  reasoningBubble: string;
907
1000
  composer: string;
908
1001
  artifact: string;
@@ -978,6 +1071,14 @@ declare function getThemeReference(): {
978
1071
  description: string;
979
1072
  properties: string;
980
1073
  };
1074
+ suggestions: {
1075
+ description: string;
1076
+ properties: string;
1077
+ };
1078
+ welcome: {
1079
+ description: string;
1080
+ properties: string;
1081
+ };
981
1082
  suggestionChips: string;
982
1083
  messageActions: {
983
1084
  description: string;
@@ -184,6 +184,15 @@ interface PanelTokens extends ComponentTokenSet {
184
184
  /** Background of the region revealed behind a detached panel. */
185
185
  canvasBackground?: string;
186
186
  }
187
+ /** Per-element text styling shared by themable text surfaces. */
188
+ interface TextStyleTokens {
189
+ fontFamily?: string;
190
+ fontSize?: string;
191
+ fontWeight?: string;
192
+ lineHeight?: string;
193
+ letterSpacing?: string;
194
+ color?: TokenReference<'color'>;
195
+ }
187
196
  interface HeaderTokens extends ComponentTokenSet {
188
197
  background: TokenReference<'color'>;
189
198
  border: TokenReference<'color'>;
@@ -192,10 +201,14 @@ interface HeaderTokens extends ComponentTokenSet {
192
201
  iconBackground: TokenReference<'color'>;
193
202
  /** Foreground (glyph stroke or emoji text) on the header avatar tile. */
194
203
  iconForeground: TokenReference<'color'>;
195
- /** Header title line (next to the icon, or minimal layout title). */
204
+ /** Legacy alias of `title.color`; `title.color` wins when both are set. */
196
205
  titleForeground: TokenReference<'color'>;
197
- /** Header subtitle line under the title. */
206
+ /** Legacy alias of `subtitle.color`; `subtitle.color` wins when both are set. */
198
207
  subtitleForeground: TokenReference<'color'>;
208
+ /** Header title typography (next to the icon, or minimal layout title). */
209
+ title?: TextStyleTokens;
210
+ /** Header subtitle typography, for the line under the title. */
211
+ subtitle?: TextStyleTokens;
199
212
  /** Default color for clear / close icon buttons when launcher overrides are unset. */
200
213
  actionIconForeground: TokenReference<'color'>;
201
214
  /** Box-shadow on the header (e.g., a fade shadow to replace the default border). */
@@ -225,7 +238,7 @@ interface MessageTokens {
225
238
  }
226
239
  /**
227
240
  * Welcome / intro card rendered above the message list when no messages exist.
228
- * Set `copy.showWelcomeCard: false` to hide it; use `layout.slots["body-top"]`
241
+ * Set `welcome.variant: "none"` to hide it; use `layout.slots["body-top"]`
229
242
  * to replace it wholesale.
230
243
  */
231
244
  interface IntroCardTokens extends ComponentTokenSet {
@@ -234,6 +247,12 @@ interface IntroCardTokens extends ComponentTokenSet {
234
247
  padding?: TokenReference<'spacing'>;
235
248
  /** Box-shadow on the intro card (token ref or raw CSS, e.g. `none`). */
236
249
  shadow?: string;
250
+ /** Full border shorthand on the intro card (raw CSS, e.g. `"1px solid rgba(0,0,0,0.1)"`). @default "none" */
251
+ border?: string;
252
+ /** Welcome title typography. */
253
+ title?: TextStyleTokens;
254
+ /** Welcome subtitle typography. */
255
+ subtitle?: TextStyleTokens;
237
256
  }
238
257
  /** Collapsible widget chrome (tool bubbles, reasoning bubbles, approval bubbles). */
239
258
  interface CollapsibleWidgetTokens {
@@ -276,6 +295,8 @@ interface MarkdownTokens {
276
295
  background?: TokenReference<'color'>;
277
296
  borderColor?: TokenReference<'color'>;
278
297
  textColor?: TokenReference<'color'>;
298
+ /** Corner radius; follows `palette.radius.md` by default so square-corner themes get square code blocks. */
299
+ borderRadius?: TokenReference<'radius'>;
279
300
  };
280
301
  /** Table styling. */
281
302
  table?: {
@@ -333,10 +354,27 @@ interface ToolBubbleTokens {
333
354
  interface ReasoningBubbleTokens {
334
355
  shadow: string;
335
356
  }
357
+ /** Scrollbar appearance shared by every scroller in the widget. */
358
+ interface ScrollbarTokens {
359
+ /** Thumb color. @default semantic.colors.border */
360
+ thumb?: TokenReference<'color'>;
361
+ /** Track color. @default "transparent" */
362
+ track?: TokenReference<'color'>;
363
+ }
336
364
  /** Composer (message input) chrome. */
337
365
  interface ComposerChromeTokens {
338
366
  /** Box-shadow on the composer form (raw CSS, e.g. `none`). */
339
367
  shadow: string;
368
+ /** Border color of the composer form. @default semantic.colors.border */
369
+ borderColor?: TokenReference<'color'>;
370
+ /** Inner padding of the composer form (raw CSS shorthand). @default "0.75rem 1rem" */
371
+ padding?: string;
372
+ /** Gap between the textarea row and the actions row. @default "0.5rem" */
373
+ gap?: string;
374
+ /** Composer textarea font-size. @default "0.875rem" */
375
+ fontSize?: string;
376
+ /** Composer textarea line-height. @default "1.25rem" */
377
+ lineHeight?: string;
340
378
  }
341
379
  /** Artifact toolbar chrome. */
342
380
  interface ArtifactToolbarTokens {
@@ -486,6 +524,29 @@ interface ScrollToBottomTokens extends ComponentTokenSet {
486
524
  fontSize?: string;
487
525
  iconSize?: string;
488
526
  }
527
+ /** Visual tokens shared by one suggestion presentation variant. */
528
+ interface SuggestionVariantTokens extends ComponentTokenSet {
529
+ /** Space inside one item, between its icon and its copy. */
530
+ gap?: string;
531
+ /** Space between suggestion items in the container. */
532
+ itemGap?: string;
533
+ minHeight?: string;
534
+ fontSize?: string;
535
+ lineHeight?: string;
536
+ iconSize?: string;
537
+ hoverBackground?: TokenReference<'color'>;
538
+ hoverForeground?: TokenReference<'color'>;
539
+ hoverBorder?: TokenReference<'color'>;
540
+ pressedBackground?: TokenReference<'color'>;
541
+ focusRing?: TokenReference<'color'>;
542
+ disabledOpacity?: string;
543
+ }
544
+ /** Starter and follow-up suggestion chrome. */
545
+ interface SuggestionTokens {
546
+ chip: SuggestionVariantTokens;
547
+ card: SuggestionVariantTokens;
548
+ list: SuggestionVariantTokens;
549
+ }
489
550
  /** Toggle group chrome (used by createToggleGroup). */
490
551
  interface ToggleGroupTokens {
491
552
  /** Gap between toggle buttons. Default: 0 (connected). */
@@ -510,12 +571,16 @@ interface ComponentTokens {
510
571
  toolBubble: ToolBubbleTokens;
511
572
  reasoningBubble: ReasoningBubbleTokens;
512
573
  composer: ComposerChromeTokens;
574
+ /** Scrollbar appearance for every scroller in the widget. */
575
+ scrollbar?: ScrollbarTokens;
513
576
  /** Icon button styling tokens. */
514
577
  iconButton?: IconButtonTokens;
515
578
  /** Label button styling tokens. */
516
579
  labelButton?: LabelButtonTokens;
517
580
  /** Scroll-to-bottom indicator styling tokens. */
518
581
  scrollToBottom?: ScrollToBottomTokens;
582
+ /** Starter prompt and follow-up suggestion styling tokens. */
583
+ suggestion?: SuggestionTokens;
519
584
  /** Toggle group styling tokens. */
520
585
  toggleGroup?: ToggleGroupTokens;
521
586
  /** Artifact toolbar, tab strip, and pane chrome. */
@@ -655,6 +720,7 @@ declare const THEME_TOKEN_DOCS: {
655
720
  header: {
656
721
  description: string;
657
722
  properties: string;
723
+ legacy: string;
658
724
  };
659
725
  message: {
660
726
  description: string;
@@ -665,11 +731,20 @@ declare const THEME_TOKEN_DOCS: {
665
731
  description: string;
666
732
  properties: string;
667
733
  };
734
+ introCard: {
735
+ description: string;
736
+ properties: string;
737
+ };
738
+ suggestion: {
739
+ description: string;
740
+ properties: string;
741
+ };
668
742
  voice: string;
669
743
  approval: string;
670
744
  attachment: string;
671
745
  scrollToBottom: string;
672
746
  toolBubble: string;
747
+ scrollbar: string;
673
748
  reasoningBubble: string;
674
749
  composer: string;
675
750
  artifact: string;
@@ -745,6 +820,14 @@ declare const THEME_TOKEN_DOCS: {
745
820
  description: string;
746
821
  properties: string;
747
822
  };
823
+ suggestions: {
824
+ description: string;
825
+ properties: string;
826
+ };
827
+ welcome: {
828
+ description: string;
829
+ properties: string;
830
+ };
748
831
  suggestionChips: string;
749
832
  messageActions: {
750
833
  description: string;
@@ -888,6 +971,7 @@ declare function getThemeReference(): {
888
971
  header: {
889
972
  description: string;
890
973
  properties: string;
974
+ legacy: string;
891
975
  };
892
976
  message: {
893
977
  description: string;
@@ -898,11 +982,20 @@ declare function getThemeReference(): {
898
982
  description: string;
899
983
  properties: string;
900
984
  };
985
+ introCard: {
986
+ description: string;
987
+ properties: string;
988
+ };
989
+ suggestion: {
990
+ description: string;
991
+ properties: string;
992
+ };
901
993
  voice: string;
902
994
  approval: string;
903
995
  attachment: string;
904
996
  scrollToBottom: string;
905
997
  toolBubble: string;
998
+ scrollbar: string;
906
999
  reasoningBubble: string;
907
1000
  composer: string;
908
1001
  artifact: string;
@@ -978,6 +1071,14 @@ declare function getThemeReference(): {
978
1071
  description: string;
979
1072
  properties: string;
980
1073
  };
1074
+ suggestions: {
1075
+ description: string;
1076
+ properties: string;
1077
+ };
1078
+ welcome: {
1079
+ description: string;
1080
+ properties: string;
1081
+ };
981
1082
  suggestionChips: string;
982
1083
  messageActions: {
983
1084
  description: string;