@seed-ship/mcp-ui-solid 6.19.1 → 6.21.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 (282) hide show
  1. package/CHANGELOG.md +663 -0
  2. package/README.md +911 -4
  3. package/dist/adapters/connector.cjs +15 -4
  4. package/dist/adapters/connector.cjs.map +1 -1
  5. package/dist/adapters/connector.d.ts +38 -0
  6. package/dist/adapters/connector.d.ts.map +1 -1
  7. package/dist/adapters/connector.js +15 -4
  8. package/dist/adapters/connector.js.map +1 -1
  9. package/dist/adapters/index.d.ts +4 -3
  10. package/dist/adapters/index.d.ts.map +1 -1
  11. package/dist/adapters/macro-run.cjs +25 -13
  12. package/dist/adapters/macro-run.cjs.map +1 -1
  13. package/dist/adapters/macro-run.d.ts +37 -2
  14. package/dist/adapters/macro-run.d.ts.map +1 -1
  15. package/dist/adapters/macro-run.js +25 -13
  16. package/dist/adapters/macro-run.js.map +1 -1
  17. package/dist/adapters.cjs +2 -0
  18. package/dist/adapters.cjs.map +1 -1
  19. package/dist/adapters.js +4 -2
  20. package/dist/components/ActionGroupRenderer.cjs +3 -1
  21. package/dist/components/ActionGroupRenderer.cjs.map +1 -1
  22. package/dist/components/ActionGroupRenderer.d.ts.map +1 -1
  23. package/dist/components/ActionGroupRenderer.js +3 -1
  24. package/dist/components/ActionGroupRenderer.js.map +1 -1
  25. package/dist/components/AgentCard.cjs +11 -8
  26. package/dist/components/AgentCard.cjs.map +1 -1
  27. package/dist/components/AgentCard.d.ts.map +1 -1
  28. package/dist/components/AgentCard.js +11 -8
  29. package/dist/components/AgentCard.js.map +1 -1
  30. package/dist/components/AgentHandoff.cjs +6 -1
  31. package/dist/components/AgentHandoff.cjs.map +1 -1
  32. package/dist/components/AgentHandoff.d.ts.map +1 -1
  33. package/dist/components/AgentHandoff.js +6 -1
  34. package/dist/components/AgentHandoff.js.map +1 -1
  35. package/dist/components/ArtifactRenderer.cjs +25 -6
  36. package/dist/components/ArtifactRenderer.cjs.map +1 -1
  37. package/dist/components/ArtifactRenderer.d.ts.map +1 -1
  38. package/dist/components/ArtifactRenderer.js +25 -6
  39. package/dist/components/ArtifactRenderer.js.map +1 -1
  40. package/dist/components/AutocompleteDropdown.cjs +30 -24
  41. package/dist/components/AutocompleteDropdown.cjs.map +1 -1
  42. package/dist/components/AutocompleteDropdown.d.ts.map +1 -1
  43. package/dist/components/AutocompleteDropdown.js +30 -24
  44. package/dist/components/AutocompleteDropdown.js.map +1 -1
  45. package/dist/components/AutocompleteFormField.cjs +3 -1
  46. package/dist/components/AutocompleteFormField.cjs.map +1 -1
  47. package/dist/components/AutocompleteFormField.d.ts.map +1 -1
  48. package/dist/components/AutocompleteFormField.js +4 -2
  49. package/dist/components/AutocompleteFormField.js.map +1 -1
  50. package/dist/components/BriefingDiff.cjs +45 -39
  51. package/dist/components/BriefingDiff.cjs.map +1 -1
  52. package/dist/components/BriefingDiff.d.ts.map +1 -1
  53. package/dist/components/BriefingDiff.js +45 -39
  54. package/dist/components/BriefingDiff.js.map +1 -1
  55. package/dist/components/CarouselRenderer.cjs +8 -2
  56. package/dist/components/CarouselRenderer.cjs.map +1 -1
  57. package/dist/components/CarouselRenderer.d.ts.map +1 -1
  58. package/dist/components/CarouselRenderer.js +8 -2
  59. package/dist/components/CarouselRenderer.js.map +1 -1
  60. package/dist/components/ChartJSRenderer.cjs +60 -36
  61. package/dist/components/ChartJSRenderer.cjs.map +1 -1
  62. package/dist/components/ChartJSRenderer.d.ts.map +1 -1
  63. package/dist/components/ChartJSRenderer.js +61 -37
  64. package/dist/components/ChartJSRenderer.js.map +1 -1
  65. package/dist/components/ChatPrompt.cjs +15 -9
  66. package/dist/components/ChatPrompt.cjs.map +1 -1
  67. package/dist/components/ChatPrompt.d.ts.map +1 -1
  68. package/dist/components/ChatPrompt.js +15 -9
  69. package/dist/components/ChatPrompt.js.map +1 -1
  70. package/dist/components/CodeBlockRenderer.cjs +34 -16
  71. package/dist/components/CodeBlockRenderer.cjs.map +1 -1
  72. package/dist/components/CodeBlockRenderer.d.ts.map +1 -1
  73. package/dist/components/CodeBlockRenderer.js +34 -16
  74. package/dist/components/CodeBlockRenderer.js.map +1 -1
  75. package/dist/components/DataPreviewSection.cjs +91 -44
  76. package/dist/components/DataPreviewSection.cjs.map +1 -1
  77. package/dist/components/DataPreviewSection.d.ts.map +1 -1
  78. package/dist/components/DataPreviewSection.js +92 -45
  79. package/dist/components/DataPreviewSection.js.map +1 -1
  80. package/dist/components/DegradedFallback.cjs +20 -16
  81. package/dist/components/DegradedFallback.cjs.map +1 -1
  82. package/dist/components/DegradedFallback.d.ts.map +1 -1
  83. package/dist/components/DegradedFallback.js +20 -16
  84. package/dist/components/DegradedFallback.js.map +1 -1
  85. package/dist/components/FooterRenderer.cjs +21 -17
  86. package/dist/components/FooterRenderer.cjs.map +1 -1
  87. package/dist/components/FooterRenderer.d.ts.map +1 -1
  88. package/dist/components/FooterRenderer.js +21 -17
  89. package/dist/components/FooterRenderer.js.map +1 -1
  90. package/dist/components/FormFieldRenderer.cjs +116 -93
  91. package/dist/components/FormFieldRenderer.cjs.map +1 -1
  92. package/dist/components/FormFieldRenderer.d.ts.map +1 -1
  93. package/dist/components/FormFieldRenderer.js +116 -93
  94. package/dist/components/FormFieldRenderer.js.map +1 -1
  95. package/dist/components/FormRenderer.cjs +55 -31
  96. package/dist/components/FormRenderer.cjs.map +1 -1
  97. package/dist/components/FormRenderer.d.ts.map +1 -1
  98. package/dist/components/FormRenderer.js +55 -31
  99. package/dist/components/FormRenderer.js.map +1 -1
  100. package/dist/components/GenerativeUIErrorBoundary.cjs +20 -15
  101. package/dist/components/GenerativeUIErrorBoundary.cjs.map +1 -1
  102. package/dist/components/GenerativeUIErrorBoundary.d.ts.map +1 -1
  103. package/dist/components/GenerativeUIErrorBoundary.js +20 -15
  104. package/dist/components/GenerativeUIErrorBoundary.js.map +1 -1
  105. package/dist/components/GraphRenderer.cjs +56 -33
  106. package/dist/components/GraphRenderer.cjs.map +1 -1
  107. package/dist/components/GraphRenderer.d.ts.map +1 -1
  108. package/dist/components/GraphRenderer.js +56 -33
  109. package/dist/components/GraphRenderer.js.map +1 -1
  110. package/dist/components/IframeFallbackLink.cjs +37 -0
  111. package/dist/components/IframeFallbackLink.cjs.map +1 -0
  112. package/dist/components/IframeFallbackLink.d.ts +23 -0
  113. package/dist/components/IframeFallbackLink.d.ts.map +1 -0
  114. package/dist/components/IframeFallbackLink.js +37 -0
  115. package/dist/components/IframeFallbackLink.js.map +1 -0
  116. package/dist/components/ImageGalleryRenderer.cjs +13 -4
  117. package/dist/components/ImageGalleryRenderer.cjs.map +1 -1
  118. package/dist/components/ImageGalleryRenderer.d.ts.map +1 -1
  119. package/dist/components/ImageGalleryRenderer.js +13 -4
  120. package/dist/components/ImageGalleryRenderer.js.map +1 -1
  121. package/dist/components/LightboxOverlay.cjs +16 -8
  122. package/dist/components/LightboxOverlay.cjs.map +1 -1
  123. package/dist/components/LightboxOverlay.d.ts.map +1 -1
  124. package/dist/components/LightboxOverlay.js +17 -9
  125. package/dist/components/LightboxOverlay.js.map +1 -1
  126. package/dist/components/MapRenderer.cjs +59 -29
  127. package/dist/components/MapRenderer.cjs.map +1 -1
  128. package/dist/components/MapRenderer.d.ts +10 -2
  129. package/dist/components/MapRenderer.d.ts.map +1 -1
  130. package/dist/components/MapRenderer.js +60 -30
  131. package/dist/components/MapRenderer.js.map +1 -1
  132. package/dist/components/ModalRenderer.cjs +4 -1
  133. package/dist/components/ModalRenderer.cjs.map +1 -1
  134. package/dist/components/ModalRenderer.d.ts.map +1 -1
  135. package/dist/components/ModalRenderer.js +5 -2
  136. package/dist/components/ModalRenderer.js.map +1 -1
  137. package/dist/components/ScratchpadPanel.cjs +578 -535
  138. package/dist/components/ScratchpadPanel.cjs.map +1 -1
  139. package/dist/components/ScratchpadPanel.d.ts.map +1 -1
  140. package/dist/components/ScratchpadPanel.js +578 -535
  141. package/dist/components/ScratchpadPanel.js.map +1 -1
  142. package/dist/components/StreamingUIRenderer.cjs +92 -28
  143. package/dist/components/StreamingUIRenderer.cjs.map +1 -1
  144. package/dist/components/StreamingUIRenderer.d.ts.map +1 -1
  145. package/dist/components/StreamingUIRenderer.js +92 -28
  146. package/dist/components/StreamingUIRenderer.js.map +1 -1
  147. package/dist/components/UIResourceRenderer.cjs +481 -365
  148. package/dist/components/UIResourceRenderer.cjs.map +1 -1
  149. package/dist/components/UIResourceRenderer.d.ts +21 -0
  150. package/dist/components/UIResourceRenderer.d.ts.map +1 -1
  151. package/dist/components/UIResourceRenderer.js +484 -368
  152. package/dist/components/UIResourceRenderer.js.map +1 -1
  153. package/dist/components/VerifiedText.cjs +39 -20
  154. package/dist/components/VerifiedText.cjs.map +1 -1
  155. package/dist/components/VerifiedText.d.ts +2 -1
  156. package/dist/components/VerifiedText.d.ts.map +1 -1
  157. package/dist/components/VerifiedText.js +39 -20
  158. package/dist/components/VerifiedText.js.map +1 -1
  159. package/dist/components/VideoRenderer.cjs +51 -20
  160. package/dist/components/VideoRenderer.cjs.map +1 -1
  161. package/dist/components/VideoRenderer.d.ts.map +1 -1
  162. package/dist/components/VideoRenderer.js +51 -20
  163. package/dist/components/VideoRenderer.js.map +1 -1
  164. package/dist/components/chart-data-table.cjs +38 -17
  165. package/dist/components/chart-data-table.cjs.map +1 -1
  166. package/dist/components/chart-data-table.d.ts +30 -1
  167. package/dist/components/chart-data-table.d.ts.map +1 -1
  168. package/dist/components/chart-data-table.js +38 -17
  169. package/dist/components/chart-data-table.js.map +1 -1
  170. package/dist/context/MCPActionContext.cjs +3 -1
  171. package/dist/context/MCPActionContext.cjs.map +1 -1
  172. package/dist/context/MCPActionContext.d.ts.map +1 -1
  173. package/dist/context/MCPActionContext.js +3 -1
  174. package/dist/context/MCPActionContext.js.map +1 -1
  175. package/dist/context/MCPUIConfigContext.cjs +29 -0
  176. package/dist/context/MCPUIConfigContext.cjs.map +1 -0
  177. package/dist/context/MCPUIConfigContext.d.ts +124 -0
  178. package/dist/context/MCPUIConfigContext.d.ts.map +1 -0
  179. package/dist/context/MCPUIConfigContext.js +29 -0
  180. package/dist/context/MCPUIConfigContext.js.map +1 -0
  181. package/dist/context/MCPUIStringsContext.cjs +287 -2
  182. package/dist/context/MCPUIStringsContext.cjs.map +1 -1
  183. package/dist/context/MCPUIStringsContext.d.ts +607 -3
  184. package/dist/context/MCPUIStringsContext.d.ts.map +1 -1
  185. package/dist/context/MCPUIStringsContext.js +287 -2
  186. package/dist/context/MCPUIStringsContext.js.map +1 -1
  187. package/dist/hooks/index.d.ts +2 -2
  188. package/dist/hooks/index.d.ts.map +1 -1
  189. package/dist/hooks/useStreamingUI.cjs +28 -10
  190. package/dist/hooks/useStreamingUI.cjs.map +1 -1
  191. package/dist/hooks/useStreamingUI.d.ts +37 -0
  192. package/dist/hooks/useStreamingUI.d.ts.map +1 -1
  193. package/dist/hooks/useStreamingUI.js +28 -10
  194. package/dist/hooks/useStreamingUI.js.map +1 -1
  195. package/dist/hooks.cjs +1 -0
  196. package/dist/hooks.cjs.map +1 -1
  197. package/dist/hooks.js +2 -1
  198. package/dist/index.cjs +29 -8
  199. package/dist/index.cjs.map +1 -1
  200. package/dist/index.d.cts +12 -4
  201. package/dist/index.d.ts +12 -4
  202. package/dist/index.d.ts.map +1 -1
  203. package/dist/index.js +24 -3
  204. package/dist/index.js.map +1 -1
  205. package/dist/services/index.d.ts +1 -1
  206. package/dist/services/index.d.ts.map +1 -1
  207. package/dist/services/validation.cjs +52 -26
  208. package/dist/services/validation.cjs.map +1 -1
  209. package/dist/services/validation.d.ts +67 -2
  210. package/dist/services/validation.d.ts.map +1 -1
  211. package/dist/services/validation.js +52 -26
  212. package/dist/services/validation.js.map +1 -1
  213. package/dist/utils/degraded-projections.cjs +37 -12
  214. package/dist/utils/degraded-projections.cjs.map +1 -1
  215. package/dist/utils/degraded-projections.d.ts +39 -3
  216. package/dist/utils/degraded-projections.d.ts.map +1 -1
  217. package/dist/utils/degraded-projections.js +37 -12
  218. package/dist/utils/degraded-projections.js.map +1 -1
  219. package/dist/utils/format-string.cjs +10 -0
  220. package/dist/utils/format-string.cjs.map +1 -0
  221. package/dist/utils/format-string.d.ts +26 -0
  222. package/dist/utils/format-string.d.ts.map +1 -0
  223. package/dist/utils/format-string.js +10 -0
  224. package/dist/utils/format-string.js.map +1 -0
  225. package/dist/utils/iframe-coep.cjs +30 -0
  226. package/dist/utils/iframe-coep.cjs.map +1 -0
  227. package/dist/utils/iframe-coep.d.ts +46 -0
  228. package/dist/utils/iframe-coep.d.ts.map +1 -0
  229. package/dist/utils/iframe-coep.js +30 -0
  230. package/dist/utils/iframe-coep.js.map +1 -0
  231. package/dist/validation.cjs +5 -0
  232. package/dist/validation.cjs.map +1 -1
  233. package/dist/validation.d.cts +2 -1
  234. package/dist/validation.d.ts +2 -1
  235. package/dist/validation.d.ts.map +1 -1
  236. package/dist/validation.js +6 -1
  237. package/package.json +1 -1
  238. package/src/adapters/connector.ts +58 -4
  239. package/src/adapters/index.ts +12 -2
  240. package/src/adapters/macro-run.ts +71 -11
  241. package/src/components/ActionGroupRenderer.tsx +3 -1
  242. package/src/components/AgentCard.tsx +27 -9
  243. package/src/components/AgentHandoff.tsx +4 -1
  244. package/src/components/ArtifactRenderer.tsx +17 -5
  245. package/src/components/AutocompleteDropdown.tsx +8 -6
  246. package/src/components/AutocompleteFormField.tsx +5 -1
  247. package/src/components/BriefingDiff.tsx +11 -3
  248. package/src/components/CarouselRenderer.tsx +4 -2
  249. package/src/components/ChartJSRenderer.tsx +18 -9
  250. package/src/components/ChatPrompt.tsx +13 -8
  251. package/src/components/CodeBlockRenderer.tsx +12 -10
  252. package/src/components/DataPreviewSection.tsx +92 -26
  253. package/src/components/DegradedFallback.tsx +4 -2
  254. package/src/components/FooterRenderer.tsx +3 -1
  255. package/src/components/FormFieldRenderer.tsx +34 -19
  256. package/src/components/FormRenderer.tsx +38 -10
  257. package/src/components/GenerativeUIErrorBoundary.tsx +8 -3
  258. package/src/components/GraphRenderer.tsx +31 -16
  259. package/src/components/IframeFallbackLink.tsx +57 -0
  260. package/src/components/ImageGalleryRenderer.tsx +8 -4
  261. package/src/components/LightboxOverlay.tsx +6 -4
  262. package/src/components/MapRenderer.tsx +57 -20
  263. package/src/components/ModalRenderer.tsx +3 -1
  264. package/src/components/ScratchpadPanel.tsx +95 -44
  265. package/src/components/StreamingUIRenderer.tsx +41 -11
  266. package/src/components/UIResourceRenderer.tsx +176 -67
  267. package/src/components/VerifiedText.tsx +19 -9
  268. package/src/components/VideoRenderer.tsx +26 -4
  269. package/src/components/chart-data-table.ts +68 -14
  270. package/src/context/MCPActionContext.tsx +4 -1
  271. package/src/context/MCPUIConfigContext.tsx +151 -0
  272. package/src/context/MCPUIStringsContext.tsx +1014 -1
  273. package/src/hooks/index.ts +2 -1
  274. package/src/hooks/useStreamingUI.ts +64 -10
  275. package/src/index.ts +38 -0
  276. package/src/services/index.ts +1 -0
  277. package/src/services/validation.ts +131 -32
  278. package/src/solid-jsx-attrs.d.ts +24 -0
  279. package/src/utils/degraded-projections.ts +75 -12
  280. package/src/utils/format-string.ts +33 -0
  281. package/src/utils/iframe-coep.ts +74 -0
  282. package/src/validation.ts +9 -0
@@ -72,6 +72,20 @@ export interface MCPUIStrings {
72
72
  // ── Generic chrome ────────────────────────────────────────
73
73
  /** Label of the streaming retry button. */
74
74
  retry: string
75
+ /** Label of a generic inline "confirm" button (scratchpad filter editor). */
76
+ ok?: string
77
+ /** Label of a generic "cancel" button (scratchpad, chat prompt). */
78
+ cancel?: string
79
+ /** Label of a generic "confirm" button (chat prompt). */
80
+ confirm?: string
81
+ /** Label of a generic "submit" button (chat prompt, form renderers). */
82
+ submit?: string
83
+ /** `aria-label` of a generic "dismiss" button (chat prompt). */
84
+ dismiss?: string
85
+ /** Affirmative value label (streaming metadata, scratchpad feedback). */
86
+ yes?: string
87
+ /** Negative value label (scratchpad feedback). */
88
+ no?: string
75
89
 
76
90
  // ── Chart data access ─────────────────────────────────────
77
91
  /** Label of the native chart view button. */
@@ -98,6 +112,693 @@ export interface MCPUIStrings {
98
112
  // ── Grid layout ────────────────────────────────────────────
99
113
  /** Fallback `aria-label` for a grid region without a title. */
100
114
  gridRegion?: string
115
+
116
+ // ── AutocompleteDropdown ───────────────────────────────────
117
+ /** `aria-label` of the suggestions listbox. */
118
+ autocompleteSuggestions?: string
119
+ /** Fallback loading message of the suggestions listbox. */
120
+ autocompleteLoading?: string
121
+ /** Fallback empty state of the suggestions listbox. */
122
+ autocompleteEmpty?: string
123
+
124
+ // ── CarouselRenderer ───────────────────────────────────────
125
+ /** Toolbar title of the carousel's expandable wrapper. */
126
+ carouselTitle?: string
127
+ /** `copyLabel` of the carousel's copy button (title + `aria-label`). */
128
+ carouselCopy?: string
129
+
130
+ // ── MapRenderer ────────────────────────────────────────────
131
+ /** Toolbar title of the map's expandable wrapper. */
132
+ mapTitle?: string
133
+ /** `copyLabel` of the map's copy button (title + `aria-label`). */
134
+ mapCopy?: string
135
+
136
+ // ── ChartJSRenderer export ─────────────────────────────────
137
+ /** `title` of the chart PNG export button. */
138
+ chartDownloadPng?: string
139
+ /** `aria-label` of the chart PNG export button. */
140
+ chartDownloadPngAria?: string
141
+ /** `copyLabel` of the chart's copy button (title + `aria-label`). */
142
+ chartCopy?: string
143
+ /** Overlay shown while the chart library and data are loading. */
144
+ chartLoading?: string
145
+
146
+ // ── CodeBlockRenderer toolbar ──────────────────────────────
147
+ /** `placeholder` of the in-code search input. */
148
+ codeSearchPlaceholder?: string
149
+ /** `aria-label` of the in-code search input. */
150
+ codeSearchAria?: string
151
+ /** `aria-label` of the code download button. */
152
+ codeDownloadAria?: string
153
+ /** `title` of the code download button. */
154
+ codeDownload?: string
155
+ /** `aria-label` of the word-wrap toggle. */
156
+ codeToggleWordWrap?: string
157
+ /** `aria-label` and `title` of the code copy button. */
158
+ codeCopy?: string
159
+ /** Heading and toolbar title of a code block with no filename or language. */
160
+ codeTitle?: string
161
+ /** `title` of the word-wrap toggle while word wrap is OFF. */
162
+ codeWordWrapEnable?: string
163
+ /** `title` of the word-wrap toggle while word wrap is ON. */
164
+ codeWordWrapDisable?: string
165
+
166
+ // ── DataPreviewSection ─────────────────────────────────────
167
+ /** `title` of the CSV export button. Template — `{count}` = row count. */
168
+ exportCsvRows?: string
169
+ /** `title` of the JSON export button. Template — `{count}` = row count. */
170
+ exportJsonRows?: string
171
+ /**
172
+ * `title` of a sortable column header (data preview and tables).
173
+ * Template — `{column}` = the column label.
174
+ */
175
+ sortBy?: string
176
+
177
+ // ── Form fields (chips, tags, filters) ─────────────────────
178
+ /**
179
+ * `aria-label` of a chip/tag/filter removal button.
180
+ * Template — `{name}` = the item being removed.
181
+ */
182
+ removeItem?: string
183
+ /** `placeholder` of the multi-select options filter input. */
184
+ filterPlaceholder?: string
185
+ /** Badge shown next to a field whose type the renderer does not support. */
186
+ fieldNotSupported?: string
187
+ /** Empty state of the multi-select / autocomplete option list. */
188
+ fieldNoMatches?: string
189
+ /** Fallback help text of a `fieldset` field with none. */
190
+ fieldGroupContainer?: string
191
+ /** Fallback `placeholder` of the multi-select trigger. */
192
+ fieldSelectPlaceholder?: string
193
+ /** Fallback `placeholder` of the tags input. */
194
+ fieldTagsPlaceholder?: string
195
+
196
+ // ── ScratchpadPanel ────────────────────────────────────────
197
+ /** `aria-label` of the scratchpad close button. */
198
+ scratchpadClose?: string
199
+ /** Heading of the filter preview block. */
200
+ scratchpadPreview?: string
201
+ /** Empty state of the filter preview block. */
202
+ scratchpadNoResults?: string
203
+ /** Label of the "refine the filters" button in the empty preview. */
204
+ scratchpadModifyFilters?: string
205
+ /** Empty state of the active-filter chip row. */
206
+ scratchpadNoFilters?: string
207
+ /** Label of the collapsed embedded form's "edit" button. */
208
+ scratchpadEdit?: string
209
+ /** Label of the free-text feedback "send" button. */
210
+ scratchpadSend?: string
211
+ /** Label of the debug toggle while the raw SSE payload is hidden. */
212
+ scratchpadShowRaw?: string
213
+ /** Label of the debug toggle while the raw SSE payload is shown. */
214
+ scratchpadHideRaw?: string
215
+ /** Fallback `placeholder` of the free-text feedback input. */
216
+ scratchpadCommentPlaceholder?: string
217
+ /** Fallback message of an error section with none. */
218
+ scratchpadError?: string
219
+ /** Fallback name of a source card with none. */
220
+ scratchpadSource?: string
221
+
222
+ // ── GraphRenderer ──────────────────────────────────────────
223
+ /** `title` and `aria-label` of the graph export menu trigger. */
224
+ graphExport?: string
225
+ /** `copyLabel` of the graph's copy button (title + `aria-label`). */
226
+ graphCopy?: string
227
+ /** Toolbar title of the graph's expandable wrapper when untitled. */
228
+ graphTitle?: string
229
+ /**
230
+ * Visible label of the graph export menu trigger button.
231
+ * @since 6.20.0
232
+ */
233
+ graphExportMenu?: string
234
+ /** Label of the "download PNG" item in the graph export menu. */
235
+ graphDownloadPng?: string
236
+ /** Hint under the "download PNG" item. */
237
+ graphDownloadPngHint?: string
238
+ /** Label of the "download Mermaid" item in the graph export menu. */
239
+ graphDownloadMermaid?: string
240
+ /** Hint under the "download Mermaid" item. */
241
+ graphDownloadMermaidHint?: string
242
+ /** Label of the "download JSON" item in the graph export menu. */
243
+ graphDownloadJson?: string
244
+ /** Hint under the "download JSON" item. */
245
+ graphDownloadJsonHint?: string
246
+
247
+ // ── ImageGalleryRenderer ───────────────────────────────────
248
+ /** `copyLabel` of the gallery's copy button (title + `aria-label`). */
249
+ galleryCopy?: string
250
+ /** Toolbar title of the gallery's expandable wrapper when untitled. */
251
+ galleryTitle?: string
252
+
253
+ // ── VideoRenderer ──────────────────────────────────────────
254
+ /** `copyLabel` of the video's copy button (title + `aria-label`). */
255
+ videoCopy?: string
256
+ /** Toolbar title and iframe `title` of an untitled video. */
257
+ videoTitle?: string
258
+
259
+ // ── FormFieldRenderer — prefill source badges ──────────────
260
+ /** `title` of the `detected` prefill-source badge. */
261
+ sourceDetected?: string
262
+ /** `title` of the `inferred` prefill-source badge. */
263
+ sourceInferred?: string
264
+ /** `title` of the `user` prefill-source badge. */
265
+ sourcePrevious?: string
266
+
267
+ // ── LightboxOverlay ────────────────────────────────────────
268
+ /** `aria-label` of the lightbox dialog. */
269
+ lightboxLabel?: string
270
+ /** `aria-label` of the lightbox close button. */
271
+ lightboxClose?: string
272
+ /** `aria-label` of the lightbox "previous image" button. */
273
+ lightboxPrevious?: string
274
+ /** `aria-label` of the lightbox "next image" button. */
275
+ lightboxNext?: string
276
+
277
+ // ── ModalRenderer ──────────────────────────────────────────
278
+ /** `aria-label` of the modal close button. */
279
+ modalClose?: string
280
+
281
+ // ── UIResourceRenderer — copy buttons ──────────────────────
282
+ /** Default `title`/`aria-label` of the generic copy button. */
283
+ copy?: string
284
+ /** `title` of the metric card copy button. */
285
+ copyMetric?: string
286
+ /** `title` of the text card copy button. */
287
+ copyText?: string
288
+ /** `title` of the error card copy button. */
289
+ copyErrorDetails?: string
290
+
291
+ // ── UIResourceRenderer — table chrome ──────────────────────
292
+ /** Toolbar title of the table's expandable wrapper when untitled. */
293
+ tableTitle?: string
294
+ /** `title`/`copyLabel` of the table CSV copy button. */
295
+ tableCopyCsv?: string
296
+ /** `title` and `aria-label` of the table export menu trigger. */
297
+ tableExport?: string
298
+ /** `aria-label` of the table search reset button. */
299
+ tableClearSearch?: string
300
+ /** Fallback `aria-label` of the table scroll region when untitled. */
301
+ tableAriaLabel?: string
302
+ /**
303
+ * `placeholder` of the table search input. The payload's
304
+ * `params.searchPlaceholder` still wins when set.
305
+ */
306
+ tableSearchPlaceholder?: string
307
+ /** Label of the "copy as TSV" item in the export menu. */
308
+ tableCopyTsv?: string
309
+ /** Label of the "download CSV" item in the export menu. */
310
+ tableDownloadCsv?: string
311
+ /** Label of the "download JSON" item in the export menu. */
312
+ tableDownloadJson?: string
313
+ /** Suffix rendered after the pagination page-size selector. */
314
+ perPageSuffix?: string
315
+
316
+ // ── UIResourceRenderer — media and links ───────────────────
317
+ /** Fallback `alt` text of an image without one. */
318
+ imageAlt?: string
319
+ /**
320
+ * `aria-label` of the image zoom link.
321
+ * Template — `{alt}` = the image's alternative text.
322
+ */
323
+ imageViewFullSize?: string
324
+ /** Fallback `title` of an iframe without one. */
325
+ iframeTitle?: string
326
+ /**
327
+ * Label of the "open in a new tab" link rendered under an embed
328
+ * (`IframeRenderer`, `VideoRenderer`). A COEP-blocked iframe fires no
329
+ * observable event, so this link is the only way out of a blank frame.
330
+ * @since 6.21.0
331
+ */
332
+ iframeOpenInNewTab?: string
333
+ /** Fallback label of a link component without one. */
334
+ linkLabel?: string
335
+ /**
336
+ * `aria-label` of a link component.
337
+ * Template — `{label}` and `{description}`.
338
+ */
339
+ linkOpensInNewTab?: string
340
+
341
+ // ── UIResourceRenderer — misc chrome ───────────────────────
342
+ /** `aria-label` of the inline component-validation warning chip. */
343
+ validationWarning?: string
344
+ /** Fallback heading of an HTML resource without a title or URI. */
345
+ resourceTitle?: string
346
+ /** Heading of the chart renderer's error overlay. */
347
+ chartError?: string
348
+ /** Heading of the blocking component-validation error card. */
349
+ validationError?: string
350
+ /** Fallback detail of a validation error carrying no message. */
351
+ validationUnknownError?: string
352
+ /** Fallback message inside the error card's copyable text. */
353
+ errorUnknown?: string
354
+ /** Fallback tool name in the error card heading. */
355
+ errorUnknownToolName?: string
356
+ /** Fallback body of an error card carrying no message. */
357
+ errorToolExecution?: string
358
+
359
+ // ── VerifiedText ───────────────────────────────────────────
360
+ /** `title` of a segment verified against the source data. */
361
+ verifiedTitle?: string
362
+ /** `aria-label` of the verified marker glyph. */
363
+ verifiedAria?: string
364
+ /** `aria-label` of the unverified marker glyph. */
365
+ unverifiedAria?: string
366
+ /** `title` of an unverified number with no closest source match. */
367
+ verifiedNotFound?: string
368
+ /**
369
+ * `title` of an unverified number that has a closest source match.
370
+ * Template — `{closest}` = the nearest source number, `{pct}` = the
371
+ * relative distance in percent.
372
+ */
373
+ verifiedNotFoundClosest?: string
374
+ /** Placeholder rendered in `strip` mode in place of the number. */
375
+ verifiedStripLabel?: string
376
+ /**
377
+ * Confidence summary of a validated answer.
378
+ * Template — `{pct}` = the confidence as a whole percentage.
379
+ */
380
+ verifiedConfidence?: string
381
+ /**
382
+ * Count of unverified numbers next to the confidence summary.
383
+ * Template — `{count}` = how many numbers failed verification.
384
+ */
385
+ verifiedUnverifiedCount?: string
386
+
387
+ // ── ChatPrompt ─────────────────────────────────────────────
388
+ /** Placeholder shown while the form's live preview is loading. */
389
+ promptLoadingPreview?: string
390
+ /** Submitted label of a confirmed `confirm` prompt (no `confirmLabel`). */
391
+ promptConfirmed?: string
392
+ /** Submitted label of a cancelled `confirm` prompt (no `cancelLabel`). */
393
+ promptCancelled?: string
394
+ /** Submitted label of a `form` prompt whose fields are all empty. */
395
+ promptFormSubmitted?: string
396
+
397
+ // ── FormRenderer ───────────────────────────────────────────
398
+ /** Fallback error when the submit action fails without a message. */
399
+ formSubmissionFailed?: string
400
+ /**
401
+ * Auto-submit countdown notice.
402
+ * Template — `{label}` = the submit label, `{seconds}` = seconds left.
403
+ */
404
+ formSubmitCountdown?: string
405
+
406
+ // ── ActionGroupRenderer ────────────────────────────────────
407
+ /** Fallback `aria-label` of an action group without one. */
408
+ actionGroupLabel?: string
409
+
410
+ // ── ArtifactRenderer ───────────────────────────────────────
411
+ /** Fallback description of an artifact card without one. */
412
+ artifactDescription?: string
413
+
414
+ // ── DegradedFallback ───────────────────────────────────────
415
+ /** Fallback caption of the degraded-renderer notice. */
416
+ degradedCaption?: string
417
+
418
+ // ── StreamingUIRenderer — metadata panel ───────────────────
419
+ /** Label of the provider cell. */
420
+ metaProvider?: string
421
+ /** Label of the model cell. */
422
+ metaModel?: string
423
+ /** Label of the execution-time cell. */
424
+ metaExecutionTime?: string
425
+ /** Label of the cost cell. */
426
+ metaCost?: string
427
+ /** Label of the time-to-first-byte cell. */
428
+ metaTtfb?: string
429
+ /** Label of the cache-hit cell. */
430
+ metaCached?: string
431
+
432
+ // ── 6.20.0 — generic chrome ─────────────────
433
+ /** Label of a generic "download" link (artifact card). */
434
+ download?: string
435
+ /** Placeholder shown in place of a value the renderer could not determine. */
436
+ unknown?: string
437
+
438
+ // ── UIResourceRenderer — table citation chips ─────────────
439
+ /**
440
+ * Visible placeholder kept in a table cell for a citation marker that no
441
+ * `citationMap` resolves (empty map only — see `transformCellCitations`).
442
+ * Template — `{id}` = the marker number.
443
+ *
444
+ * The former literal was French (`[réf. {id}]`).
445
+ */
446
+ citationUnresolved?: string
447
+
448
+ // ── UIResourceRenderer — error / fallback chrome ──────────
449
+ /**
450
+ * Inline (`errorMode: 'inline-warn'`) validation chip text.
451
+ * Template — `{type}` = the component type.
452
+ */
453
+ invalidComponent?: string
454
+ /**
455
+ * Heading of the tool-error card.
456
+ * Template — `{tool}` = the tool name (`errorUnknownToolName` when absent).
457
+ */
458
+ toolErrorTitle?: string
459
+ /**
460
+ * Error-type line of the tool-error card.
461
+ * Template — `{type}` = the error type.
462
+ */
463
+ errorTypeLabel?: string
464
+ /** Heading above the tool-error suggestion list. */
465
+ errorSuggestions?: string
466
+ /** Message shown in place of a chart whose payload has no `data.datasets`. */
467
+ chartInvalidData?: string
468
+ /** Prefix of the unsupported-component notice (the type follows in a `<code>`). */
469
+ unsupportedComponentType?: string
470
+
471
+ // ── DataPreviewSection — pagination ───────────────────────
472
+ /** Visible label of the previous-page button (glyph stays decorative). */
473
+ previewPrev?: string
474
+ /** Visible label of the next-page button (glyph stays decorative). */
475
+ previewNext?: string
476
+ /**
477
+ * Page indicator between the two buttons.
478
+ * Template — `{page}` = the 1-based page, `{total}` = the page count.
479
+ */
480
+ previewPageIndicator?: string
481
+
482
+ // ── FormFieldRenderer ─────────────────────────────────────
483
+ /** Inline notice while an entity reference is being resolved. */
484
+ fieldResolving?: string
485
+
486
+ // ── FormRenderer / ScratchpadPanel — prefill summary ──────
487
+ /**
488
+ * Prefill summary for a single pre-filled field.
489
+ * Template — `{count}` = always 1, `{total}` = the field count.
490
+ *
491
+ * The former literal was French (`{count} champ pré-rempli sur {total}`).
492
+ */
493
+ formPrefilledOne?: string
494
+ /**
495
+ * Prefill summary for several pre-filled fields.
496
+ * Template — `{count}` = how many, `{total}` = the field count.
497
+ *
498
+ * The former literal was French (`{count} champs pré-remplis sur {total}`).
499
+ */
500
+ formPrefilledMany?: string
501
+ /** Busy label of the submit button while the form is submitting. */
502
+ formSubmitting?: string
503
+ /** Label of the form's reset button. */
504
+ formReset?: string
505
+
506
+ // ── GenerativeUIErrorBoundary — default fallback ──────────
507
+ /** Heading of the default error-boundary fallback card. */
508
+ errorBoundaryTitle?: string
509
+ /**
510
+ * Metadata line of the fallback card.
511
+ * Template — `{type}` = the component type, `{id}` = its truncated id.
512
+ * Both fall back to `unknown`.
513
+ */
514
+ errorBoundaryMeta?: string
515
+ /** Label of the fallback card's retry button. */
516
+ errorBoundaryRetry?: string
517
+
518
+ // ── ScratchpadPanel (continued) ───────────────────────────
519
+ /** Label of the `waiting_human` search button. */
520
+ scratchpadSearch?: string
521
+ /** Label of the "advance to the next step" button in the steps view. */
522
+ scratchpadNextStep?: string
523
+ /** Label preceding the interrogation plan summary. */
524
+ scratchpadPlan?: string
525
+ /** Label of the "modify this prompt" button of a prompt section. */
526
+ scratchpadModify?: string
527
+ /** Label of the "show details" toggle of an error section. */
528
+ scratchpadDetails?: string
529
+ /** Unit suffix after an action section's item count. */
530
+ scratchpadItems?: string
531
+
532
+ // ── VideoRenderer ─────────────────────────────────────────
533
+ /** Fallback text of a `<video>` element the browser cannot play. */
534
+ videoUnsupported?: string
535
+
536
+ // ── DataPreviewSection (page info) ────────────────────────
537
+ /** Paginated row range. Template — `{start}`, `{end}`, `{total}`. */
538
+ previewShowingRange?: string
539
+ /** Unpaginated row count, singular. Template — `{count}`. */
540
+ previewRowsOne?: string
541
+ /** Unpaginated row count, plural. Template — `{count}`. */
542
+ previewRowsMany?: string
543
+ /**
544
+ * Suffix appended when the payload declares more rows than were sent.
545
+ * Template — `{total}`. Keeps its leading space.
546
+ */
547
+ previewTotalSuffix?: string
548
+
549
+ // ── ScratchpadPanel status badge ──────────────────────────
550
+ /** Status badge — the run is still loading. */
551
+ statusLoading?: string
552
+ /** Status badge — an action is available to the user. */
553
+ statusActionAvailable?: string
554
+ /** Status badge — the run is waiting for a human answer. */
555
+ statusYourTurn?: string
556
+ /** Status badge — the run is processing. */
557
+ statusProcessing?: string
558
+ /** Status badge — the run finished. (The error badge reuses `scratchpadError`.) */
559
+ statusComplete?: string
560
+
561
+ // ── AgentCard status ──────────────────────────────────────
562
+ /** Agent badge — idle. */
563
+ agentStatusIdle?: string
564
+ /** Agent badge — running. */
565
+ agentStatusRunning?: string
566
+ /** Agent badge — waiting. */
567
+ agentStatusWaiting?: string
568
+ /** Agent badge — done. */
569
+ agentStatusDone?: string
570
+ /** Agent badge — errored. */
571
+ agentStatusError?: string
572
+
573
+ // ── AgentHandoff ──────────────────────────────────────────
574
+ /**
575
+ * Fallback summary of a handoff that carries only an item count.
576
+ * Template — `{count}`. `content.summary` still wins.
577
+ */
578
+ handoffItems?: string
579
+
580
+ // ── DegradedFallback (fallback ladder) ────────────────────
581
+ /** Truncation notice under the degraded table. Template — `{count}`. */
582
+ degradedMoreRows?: string
583
+ /** Caption of the chart's degraded table. */
584
+ chartDegradedCaption?: string
585
+ /** Notice above the chart's degraded table. Template — `{error}`. */
586
+ chartRenderFailed?: string
587
+ /** Caption of the degraded table shown when chart.js is missing. */
588
+ chartQuickchartCaption?: string
589
+ /** Caption of the graph's degraded table. */
590
+ graphDegradedCaption?: string
591
+ /** Notice above the graph's degraded table. Template — `{error}`. */
592
+ graphRenderFailed?: string
593
+ /** Fallback reason when the G6 render throws without a message. */
594
+ graphRenderError?: string
595
+ /** Fallback reason when the Chart.js render throws without a message. */
596
+ chartRenderError?: string
597
+ /** Error shown when the PNG export is unavailable in the active renderer. */
598
+ graphPngUnsupported?: string
599
+ /** Error shown when the PNG export throws without a message. */
600
+ graphPngExportFailed?: string
601
+ /** Error shown when the Leaflet bundle fails to load. */
602
+ mapLibraryUnavailable?: string
603
+ /** Caption of the map's degraded coordinate table. */
604
+ mapDegradedCaption?: string
605
+ /** Notice above the map's degraded table. Template — `{error}`. */
606
+ mapRenderFailed?: string
607
+ /** Fallback reason when the Leaflet render throws without a message. */
608
+ mapRenderError?: string
609
+
610
+ // ── Degraded / accessible table headers ───────────────────
611
+ /** Column header of the map projection — feature type. */
612
+ degradedColType?: string
613
+ /** Column header of the map projection — latitude. */
614
+ degradedColLat?: string
615
+ /** Column header of the map projection — longitude. */
616
+ degradedColLng?: string
617
+ /** Column header of the map projection — property summary. */
618
+ degradedColInfo?: string
619
+ /** `Type` cell of a marker row in the map projection (6.20.0). */
620
+ degradedMarker?: string
621
+ /** `Type` cell of a GeoJSON feature without a geometry type (6.20.0). */
622
+ degradedFeature?: string
623
+ /** Column header of the graph projection — edge source. */
624
+ degradedColSource?: string
625
+ /** Column header of the graph projection — edge target. */
626
+ degradedColTarget?: string
627
+ /** Column header of the graph projection — node id. */
628
+ degradedColNode?: string
629
+ /** Column header of the graph / chart projections — label. */
630
+ degradedColLabel?: string
631
+ /** Fallback name of a dataset without a label. Template — `{n}`. */
632
+ degradedSeries?: string
633
+ /** Column header of the chart data table — series name. */
634
+ chartTableSeries?: string
635
+ /** Column header of the chart data table — point index. */
636
+ chartTablePoint?: string
637
+
638
+ // ── AutocompleteDropdown / AutocompleteFormField ──────────
639
+ /** Hint prose between the arrow keys and the Enter key cap. */
640
+ autocompleteHintNavigate?: string
641
+ /** Hint prose between the Enter and Esc key caps. */
642
+ autocompleteHintSelect?: string
643
+ /** Hint prose after the Esc key cap. */
644
+ autocompleteHintDismiss?: string
645
+ /** Ghost-text hint of the completion field. */
646
+ autocompleteTabToAccept?: string
647
+
648
+ // ── FormFieldRenderer (entity picker) ─────────────────────
649
+ /** Placeholder of a multi-value entity picker that already has values. */
650
+ fieldAddMorePlaceholder?: string
651
+
652
+ // ── ImageGalleryRenderer ──────────────────────────────────
653
+ /** Accessible name of a gallery thumbnail. Template — `{index}`. */
654
+ galleryViewImage?: string
655
+ /** `alt` of a gallery image without one. Template — `{index}`. */
656
+ galleryImageAlt?: string
657
+ /** Noun substituted into `imageViewFullSize` when the image has no `alt`. */
658
+ imageAltFallback?: string
659
+
660
+ // ── Chart image fallback (quickchart) ─────────────────────
661
+ /** `alt` / `aria-label` of the chart image when the payload has no title. */
662
+ chartVisualizationAlt?: string
663
+ /** `alt` / `aria-label` of the chart image with a title. Template — `{title}`. */
664
+ chartWithTitleAlt?: string
665
+ /** Error shown when the chart image fails to load. */
666
+ chartLoadFailed?: string
667
+
668
+ // ── Table pagination (continued) ──────────────────────────
669
+ /** Page-size option that disables pagination. */
670
+ paginationAllRows?: string
671
+
672
+ // ── Form validation messages ──────────────────────────────
673
+ /** Template — `{field}`. */
674
+ fieldRequired?: string
675
+ /** Template — `{field}`. */
676
+ fieldMustBeChecked?: string
677
+ /** Template — `{min}`. */
678
+ fieldMinLength?: string
679
+ /** Template — `{max}`. */
680
+ fieldMaxLength?: string
681
+ /** Value does not match the field's `pattern`. */
682
+ fieldInvalidPattern?: string
683
+ /** Value is not a valid email address. */
684
+ fieldInvalidEmail?: string
685
+ /** Value is not a number. */
686
+ fieldInvalidNumber?: string
687
+ /** Template — `{min}`. */
688
+ fieldMinValue?: string
689
+ /** Template — `{max}`. */
690
+ fieldMaxValue?: string
691
+ /** Template — `{min}`. */
692
+ fieldMinDate?: string
693
+ /** Template — `{max}`. */
694
+ fieldMaxDate?: string
695
+ /** Value is not one of the field's options. */
696
+ fieldInvalidOption?: string
697
+ /**
698
+ * Value does not match the field's `valueFormat`. Template — `{format}`.
699
+ * `field.valueFormatHint` still wins.
700
+ */
701
+ fieldInvalidFormat?: string
702
+
703
+ // ── Locale (6.20.0) ───────────────────────────
704
+ /**
705
+ * BCP-47 tag used for number / date formatting and string collation in
706
+ * library chrome and table cells (`toLocaleString`, `localeCompare`).
707
+ * Default `'en-US'`. Former behaviour: a hardcoded `'fr-FR'` / `'fr'` in
708
+ * table sorting, DataPreviewSection cells and map popups, and the
709
+ * runtime's implicit locale elsewhere (non-deterministic across SSR and
710
+ * hydration).
711
+ */
712
+ locale?: string
713
+
714
+ // ── BriefingDiff ──────────────────────────────────────────
715
+ /** Stats summary — added entries. Template — `{count}`. */
716
+ briefingAdded?: string
717
+ /** Stats summary — removed entries. Template — `{count}`. */
718
+ briefingRemoved?: string
719
+ /** Stats summary — changed entries. Template — `{count}`. */
720
+ briefingChanged?: string
721
+
722
+ // ── FooterRenderer ────────────────────────────────────────
723
+ /** Number of sources in the footer. Template — `{count}`. */
724
+ footerSources?: string
725
+
726
+ // ── FormFieldRenderer (6.20.0) ────────────────────────
727
+ /** Warning under a field whose `type` is unknown. Template — `{type}`. */
728
+ fieldUnknownType?: string
729
+ /** Trigger text of a multiselect with selections. Template — `{count}`. */
730
+ fieldSelectedCount?: string
731
+
732
+ // ── ScratchpadPanel (6.20.0) ──────────────────────────
733
+ /** Error code line of the error state. Template — `{code}`. */
734
+ scratchpadErrorCode?: string
735
+ /** Row count of a data-source section. Template — `{count}`. */
736
+ scratchpadResultCount?: string
737
+
738
+ // ── UIResourceRenderer table (6.20.0) ─────────────────
739
+ /** Suffix of the table title while rows are virtualized. Template — `{count}`. */
740
+ tableVirtualizedRows?: string
741
+ /** Search result count, singular. Template — `{count}`, `{total}`. */
742
+ tableSearchResultsOne?: string
743
+ /** Search result count, plural. Template — `{count}`, `{total}`. */
744
+ tableSearchResultsMany?: string
745
+ /** Server-side pagination range. Template — `{start}`, `{end}`, `{total}`. */
746
+ tableServerPageRange?: string
747
+
748
+ // ── UIResourceRenderer tool-error card (6.20.0) ───────
749
+ /**
750
+ * Text put on the clipboard by the error card's Copy button.
751
+ * Template — `{tool}`, `{message}`.
752
+ */
753
+ errorCopyText?: string
754
+ /** Tool name substituted into `errorCopyText` when the error has none. */
755
+ errorUnknownTool?: string
756
+
757
+ // ── StreamingUIRenderer / useStreamingUI (6.20.0) ─────
758
+ /** Progress message before the stream starts. */
759
+ streamInitializing?: string
760
+ /** Progress message while connecting. */
761
+ streamConnecting?: string
762
+ /** Progress message while a component streams in. Template — `{type}`. */
763
+ streamLoadingComponent?: string
764
+ /** Progress message once the stream completed. */
765
+ streamDashboardLoaded?: string
766
+ /** Progress message after a stream error. Template — `{message}`. */
767
+ streamErrorProgress?: string
768
+ /** Error title when the stream connection fails. */
769
+ streamConnectionFailed?: string
770
+ /** Error message when the server answers with a non-OK status and no message. */
771
+ streamRequestFailed?: string
772
+ /** Error message when the server answers without a body. */
773
+ streamEmptyResponse?: string
774
+ /** Error message when streaming is started during SSR. */
775
+ streamServerSide?: string
776
+ /** Error message when the failure carries no message. */
777
+ streamUnknownError?: string
778
+
779
+ // ── Degraded and unavailable states shown to end users (6.20.0) ──
780
+ /** StreamingUIRenderer error heading when streaming was started during SSR (the hook keeps the machine code `'ssr'`). */
781
+ streamServerSideTitle?: string
782
+ /** GraphRenderer heading when the `@antv/g6` peer is missing (the install hint below it stays English, policy P3). */
783
+ graphUnavailable?: string
784
+ /** MapRenderer banner when the PMTiles overlay fails to load or render. */
785
+ mapPmtilesUnavailable?: string
786
+ /** MapRenderer sentence appended to the PMTiles banner. */
787
+ mapBaseMapStillShown?: string
788
+ /** Chart error when `renderer: 'native'` is forced and chart.js is missing. */
789
+ chartJsUnavailable?: string
790
+ /** DegradedFallback message when chart.js is missing and the quickchart fallback is not allowed. */
791
+ chartIframeUnavailable?: string
792
+ /** DataPreviewSection fallback when the section content is not `{ columns, rows }`. */
793
+ previewInvalidContent?: string
794
+ /** Tooltip of the default citation chip button. Template — `{label}` (file name and page). */
795
+ citationViewSource?: string
796
+ /** ArtifactRenderer file size below 1 KB. Template — `{size}`. */
797
+ sizeBytes?: string
798
+ /** ArtifactRenderer file size in kilobytes. Template — `{size}`. */
799
+ sizeKilobytes?: string
800
+ /** ArtifactRenderer file size in megabytes. Template — `{size}`. */
801
+ sizeMegabytes?: string
101
802
  }
102
803
 
103
804
  /**
@@ -114,6 +815,13 @@ export const DEFAULT_MCPUI_STRINGS: Required<MCPUIStrings> = {
114
815
  feedbackPositiveAck: 'Thanks!',
115
816
  feedbackNegativeAck: "Noted — we'll improve",
116
817
  retry: 'Retry',
818
+ ok: 'OK',
819
+ cancel: 'Cancel',
820
+ confirm: 'Confirm',
821
+ submit: 'Submit',
822
+ dismiss: 'Dismiss',
823
+ yes: 'Yes',
824
+ no: 'No',
117
825
  chartView: 'Chart',
118
826
  chartDataView: 'Data',
119
827
  chartViewSelector: 'Chart or data view',
@@ -124,8 +832,281 @@ export const DEFAULT_MCPUI_STRINGS: Required<MCPUIStrings> = {
124
832
  paginationNext: 'Next page',
125
833
  paginationPageSize: 'Rows per page',
126
834
  gridRegion: 'Layout grid',
835
+ autocompleteSuggestions: 'Suggestions',
836
+ autocompleteLoading: 'Loading...',
837
+ autocompleteEmpty: 'No suggestions found',
838
+ carouselTitle: 'Carousel',
839
+ carouselCopy: 'Copy items (JSON)',
840
+ mapTitle: 'Map',
841
+ mapCopy: 'Copy markers as GeoJSON',
842
+ chartDownloadPng: 'Download PNG',
843
+ chartDownloadPngAria: 'Download chart as PNG',
844
+ chartCopy: 'Copy chart data (JSON)',
845
+ chartLoading: 'Loading chart...',
846
+ codeSearchPlaceholder: 'Search\u2026',
847
+ codeSearchAria: 'Search in code',
848
+ codeDownloadAria: 'Download code as file',
849
+ codeDownload: 'Download code',
850
+ codeToggleWordWrap: 'Toggle word wrap',
851
+ codeCopy: 'Copy code',
852
+ codeTitle: 'Code',
853
+ codeWordWrapEnable: 'Enable word wrap',
854
+ codeWordWrapDisable: 'Disable word wrap',
855
+ exportCsvRows: 'Export CSV ({count} rows)',
856
+ exportJsonRows: 'Export JSON ({count} rows)',
857
+ sortBy: 'Sort by {column}',
858
+ removeItem: 'Remove {name}',
859
+ filterPlaceholder: 'Filter...',
860
+ fieldNotSupported: 'Not supported',
861
+ fieldNoMatches: 'No matches',
862
+ fieldGroupContainer: 'Group container',
863
+ fieldSelectPlaceholder: 'Select...',
864
+ fieldTagsPlaceholder: 'Type and press Enter...',
865
+ scratchpadClose: 'Close',
866
+ scratchpadPreview: 'Preview',
867
+ scratchpadNoResults: 'No results for these filters',
868
+ scratchpadModifyFilters: 'Modify filters',
869
+ scratchpadNoFilters: 'No filters',
870
+ // Former literal was French ('Modifier') — the library ships English
871
+ // defaults, so this one changed on purpose.
872
+ scratchpadEdit: 'Edit',
873
+ scratchpadSend: 'Send',
874
+ scratchpadShowRaw: 'Show raw SSE payload',
875
+ scratchpadHideRaw: 'Hide raw SSE payload',
876
+ scratchpadCommentPlaceholder: 'Add a comment...',
877
+ scratchpadError: 'Error',
878
+ scratchpadSource: 'Source',
879
+ graphExport: 'Export graph',
880
+ graphCopy: 'Copy graph (JSON)',
881
+ graphTitle: 'Graph',
882
+ graphExportMenu: 'Export \u25BE',
883
+ graphDownloadPng: 'Download PNG',
884
+ graphDownloadPngHint: 'visual snapshot',
885
+ graphDownloadMermaid: 'Download Mermaid',
886
+ graphDownloadMermaidHint: 'markdown / GitHub',
887
+ graphDownloadJson: 'Download JSON',
888
+ graphDownloadJsonHint: 'raw data',
889
+ galleryCopy: 'Copy image URLs',
890
+ galleryTitle: 'Gallery',
891
+ videoCopy: 'Copy video URL',
892
+ videoTitle: 'Video',
893
+ sourceDetected: 'Detected from message',
894
+ sourceInferred: 'Inferred from context',
895
+ sourcePrevious: 'Previously provided',
896
+ lightboxLabel: 'Image lightbox',
897
+ lightboxClose: 'Close lightbox',
898
+ lightboxPrevious: 'Previous image',
899
+ lightboxNext: 'Next image',
900
+ modalClose: 'Close modal',
901
+ copy: 'Copy',
902
+ copyMetric: 'Copy metric',
903
+ copyText: 'Copy text',
904
+ copyErrorDetails: 'Copy error details',
905
+ tableTitle: 'Table',
906
+ tableCopyCsv: 'Copy table (CSV)',
907
+ tableExport: 'Export table',
908
+ tableClearSearch: 'Clear search',
909
+ tableAriaLabel: 'Data table',
910
+ // Former literal was French ('Rechercher dans le tableau...') — the
911
+ // library ships English defaults, so this one changed on purpose.
912
+ tableSearchPlaceholder: 'Search the table...',
913
+ tableCopyTsv: 'Copy TSV',
914
+ tableDownloadCsv: 'Download CSV',
915
+ tableDownloadJson: 'Download JSON',
916
+ perPageSuffix: '/ page',
917
+ imageAlt: 'Image',
918
+ imageViewFullSize: 'View full size: {alt}',
919
+ iframeTitle: 'Embedded content',
920
+ linkLabel: 'Link',
921
+ linkOpensInNewTab: '{label}: {description} (opens in new tab)',
922
+ validationWarning: 'Component validation warning',
923
+ resourceTitle: 'Resource',
924
+ chartError: 'Chart Error',
925
+ validationError: 'Validation Error',
926
+ validationUnknownError: 'Unknown validation error',
927
+ errorUnknown: 'Unknown error',
928
+ errorUnknownToolName: 'Unknown',
929
+ errorToolExecution: 'An error occurred during tool execution',
930
+ verifiedTitle: 'Verified against source data',
931
+ verifiedAria: 'verified',
932
+ unverifiedAria: 'unverified',
933
+ verifiedNotFound: 'Not found in source data',
934
+ verifiedNotFoundClosest: 'Not found in source data. Closest: {closest} ({pct}% off)',
935
+ // Former literal was French ('[non v\u00E9rifi\u00E9]') — see above.
936
+ verifiedStripLabel: '[unverified]',
937
+ verifiedConfidence: '{pct}% verified',
938
+ verifiedUnverifiedCount: '({count} unverified)',
939
+ promptLoadingPreview: 'Loading preview...',
940
+ promptConfirmed: 'Confirmed',
941
+ promptCancelled: 'Cancelled',
942
+ promptFormSubmitted: 'Form submitted',
943
+ formSubmissionFailed: 'Submission failed',
944
+ formSubmitCountdown: '{label} in {seconds}s...',
945
+ actionGroupLabel: 'Action group',
946
+ artifactDescription: 'Generated artifact',
947
+ degradedCaption: 'Showing the underlying data \u2014 the interactive view is unavailable.',
948
+ metaProvider: 'Provider',
949
+ metaModel: 'Model',
950
+ metaExecutionTime: 'Execution Time',
951
+ metaCost: 'Cost',
952
+ metaTtfb: 'TTFB',
953
+ metaCached: 'Cached',
954
+ download: 'Download',
955
+ unknown: 'unknown',
956
+ // Former literal was French ('[r\u00E9f. {id}]') — see above.
957
+ citationUnresolved: '[ref. {id}]',
958
+ invalidComponent: 'Invalid {type}',
959
+ toolErrorTitle: 'Tool Error: {tool}',
960
+ errorTypeLabel: 'Type: {type}',
961
+ errorSuggestions: 'Suggestions:',
962
+ chartInvalidData: 'Invalid chart data: missing data.datasets',
963
+ unsupportedComponentType: 'Unsupported component type:',
964
+ previewPrev: 'Prev',
965
+ previewNext: 'Next',
966
+ previewPageIndicator: 'Page {page} / {total}',
967
+ fieldResolving: 'Resolving...',
968
+ // Former literals were French ('{count} champ(s) pr\u00E9-rempli(s) sur {total}').
969
+ formPrefilledOne: '{count} field pre-filled out of {total}',
970
+ formPrefilledMany: '{count} fields pre-filled out of {total}',
971
+ formSubmitting: 'Submitting...',
972
+ formReset: 'Reset',
973
+ errorBoundaryTitle: 'Component Failed to Render',
974
+ errorBoundaryMeta: 'Type: {type} | ID: {id}...',
975
+ errorBoundaryRetry: 'Retry Rendering',
976
+ scratchpadSearch: 'Search',
977
+ scratchpadNextStep: 'Next',
978
+ scratchpadPlan: 'Plan:',
979
+ scratchpadModify: 'Modify',
980
+ scratchpadDetails: 'Details',
981
+ scratchpadItems: 'items',
982
+ videoUnsupported: 'Your browser does not support the video tag.',
983
+ previewShowingRange: 'Showing {start}–{end} of {total}',
984
+ previewRowsOne: '{count} row',
985
+ previewRowsMany: '{count} rows',
986
+ previewTotalSuffix: ' ({total} total)',
987
+ statusLoading: 'Loading...',
988
+ statusActionAvailable: 'Action available',
989
+ statusYourTurn: 'Your turn',
990
+ statusProcessing: 'Processing...',
991
+ statusComplete: 'Complete',
992
+ agentStatusIdle: 'Idle',
993
+ agentStatusRunning: 'Running',
994
+ agentStatusWaiting: 'Waiting',
995
+ agentStatusDone: 'Done',
996
+ agentStatusError: 'Error',
997
+ handoffItems: '{count} items',
998
+ degradedMoreRows: '+{count} more rows not shown.',
999
+ chartDegradedCaption:
1000
+ 'Showing the chart data as a table — the interactive chart is unavailable.',
1001
+ chartRenderFailed: 'Chart rendering failed: {error}',
1002
+ chartQuickchartCaption: 'Showing the chart data as a table.',
1003
+ graphDegradedCaption:
1004
+ 'Showing the graph data as a table — the interactive view is unavailable.',
1005
+ graphRenderFailed: 'Graph rendering failed: {error}',
1006
+ graphRenderError: 'Failed to render graph',
1007
+ chartRenderError: 'Chart rendering failed',
1008
+ graphPngUnsupported: 'PNG export not supported in current renderer mode',
1009
+ graphPngExportFailed: 'PNG export failed',
1010
+ mapLibraryUnavailable: 'Map library could not be loaded.',
1011
+ mapDegradedCaption:
1012
+ 'Showing the map data as a coordinate table — the interactive map is unavailable.',
1013
+ mapRenderFailed: 'Map rendering failed: {error}',
1014
+ mapRenderError: 'Failed to render map',
1015
+ degradedColType: 'Type',
1016
+ degradedColLat: 'Lat',
1017
+ degradedColLng: 'Lng',
1018
+ degradedColInfo: 'Info',
1019
+ degradedColSource: 'Source',
1020
+ degradedColTarget: 'Target',
1021
+ degradedColNode: 'Node',
1022
+ degradedColLabel: 'Label',
1023
+ degradedSeries: 'Series {n}',
1024
+ chartTableSeries: 'Series',
1025
+ chartTablePoint: 'Point',
1026
+ autocompleteHintNavigate: ' to navigate, ',
1027
+ autocompleteHintSelect: ' to select, ',
1028
+ autocompleteHintDismiss: ' to dismiss',
1029
+ autocompleteTabToAccept: 'Tab to accept',
1030
+ fieldAddMorePlaceholder: 'Add more...',
1031
+ galleryViewImage: 'View image {index}',
1032
+ galleryImageAlt: 'Image {index}',
1033
+ imageAltFallback: 'image',
1034
+ chartVisualizationAlt: 'Chart visualization',
1035
+ chartWithTitleAlt: 'Chart: {title}',
1036
+ chartLoadFailed: 'Failed to load chart',
1037
+ paginationAllRows: 'All',
1038
+ fieldRequired: '{field} is required',
1039
+ fieldMustBeChecked: '{field} must be checked',
1040
+ fieldMinLength: 'Minimum {min} characters required',
1041
+ fieldMaxLength: 'Maximum {max} characters allowed',
1042
+ fieldInvalidPattern: 'Invalid format',
1043
+ fieldInvalidEmail: 'Invalid email address',
1044
+ fieldInvalidNumber: 'Must be a valid number',
1045
+ fieldMinValue: 'Minimum value is {min}',
1046
+ fieldMaxValue: 'Maximum value is {max}',
1047
+ fieldMinDate: 'Date must be after {min}',
1048
+ fieldMaxDate: 'Date must be before {max}',
1049
+ fieldInvalidOption: 'Please select a valid option',
1050
+ fieldInvalidFormat: 'Invalid format (expected: {format})',
1051
+
1052
+ // ── 6.20.0 ─────────────────────────────────────
1053
+ // DEFAULT CHANGE: formatting / collation used 'fr-FR' / 'fr' (or the
1054
+ // runtime's implicit locale) — now one explicit, overridable tag.
1055
+ locale: 'en-US',
1056
+ briefingAdded: '+{count} added',
1057
+ briefingRemoved: '{count} removed',
1058
+ briefingChanged: '{count} changed',
1059
+ footerSources: '{count} sources',
1060
+ degradedMarker: 'marker',
1061
+ degradedFeature: 'feature',
1062
+ fieldUnknownType: 'Unknown field type: {type}',
1063
+ fieldSelectedCount: '{count} selected',
1064
+ scratchpadErrorCode: 'Code: {code}',
1065
+ scratchpadResultCount: '{count} results',
1066
+ tableVirtualizedRows: '(virtualized: {count} rows)',
1067
+ tableSearchResultsOne: '{count} result on {total}',
1068
+ tableSearchResultsMany: '{count} results on {total}',
1069
+ tableServerPageRange: 'Showing {start} - {end} of {total}',
1070
+ errorCopyText: 'Error in {tool}: {message}',
1071
+ errorUnknownTool: 'unknown tool',
1072
+ streamInitializing: 'Initializing...',
1073
+ streamConnecting: 'Connecting to server...',
1074
+ streamLoadingComponent: 'Loading {type} component...',
1075
+ streamDashboardLoaded: 'Dashboard loaded',
1076
+ streamErrorProgress: 'Error: {message}',
1077
+ streamConnectionFailed: 'Stream connection failed',
1078
+ streamRequestFailed: 'Stream request failed',
1079
+ streamEmptyResponse: 'Response body is null',
1080
+ streamServerSide: 'Streaming UI cannot start on server-side',
1081
+ streamUnknownError: 'Unknown error',
1082
+ streamServerSideTitle: 'Streaming unavailable',
1083
+ graphUnavailable: 'Graph rendering unavailable',
1084
+ mapPmtilesUnavailable:
1085
+ 'PMTiles layer unavailable \u2014 the optional "protomaps-leaflet" peer dependency failed to load or render.',
1086
+ mapBaseMapStillShown: 'The base map is still shown.',
1087
+ chartJsUnavailable: 'Chart.js is not available. Install chart.js peer dependency.',
1088
+ chartIframeUnavailable:
1089
+ 'Interactive chart unavailable \u2014 install the chart.js peer dependency, or set allowQuickchartFallback to use the external quickchart.io renderer.',
1090
+ previewInvalidContent: '[DataPreviewSection] Invalid content format',
1091
+ citationViewSource: 'View source - {label}',
1092
+ sizeBytes: '{size} B',
1093
+ sizeKilobytes: '{size} KB',
1094
+ sizeMegabytes: '{size} MB',
1095
+
1096
+ // ── 6.21.0 — iframe COEP fallback ──────────────────────────
1097
+ iframeOpenInNewTab: 'Open in a new tab',
127
1098
  }
128
1099
 
1100
+ /**
1101
+ * Substitutes `{name}` placeholders in a chrome string template.
1102
+ *
1103
+ * Lives in `../utils/format-string` — a runtime-free module — so the pure
1104
+ * adapters under `src/adapters` can interpolate their own templates without
1105
+ * importing `solid-js`. Re-exported here (and from the root barrel) so every
1106
+ * existing import path keeps working.
1107
+ */
1108
+ export { formatMCPUIString } from '../utils/format-string'
1109
+
129
1110
  export const MCPUIStringsContext = createContext<MCPUIStrings>(DEFAULT_MCPUI_STRINGS)
130
1111
 
131
1112
  /**
@@ -133,8 +1114,40 @@ export const MCPUIStringsContext = createContext<MCPUIStrings>(DEFAULT_MCPUI_STR
133
1114
  * `<MCPUIStringsProvider>` is mounted above — every renderer works
134
1115
  * standalone with English chrome.
135
1116
  */
1117
+ const resolvedLocales = new Map<string, string>()
1118
+
1119
+ /**
1120
+ * Returns `locale` in canonical BCP-47 form, or `DEFAULT_MCPUI_STRINGS.locale`
1121
+ * (`'en-US'`) when it is missing or not a valid tag. Renderers pass the result
1122
+ * straight to `Intl` / `toLocaleString` / `localeCompare`, which throw a
1123
+ * `RangeError` on an invalid tag such as `'not_a_locale'`.
1124
+ *
1125
+ * @since v6.20.0
1126
+ */
1127
+ export function resolveMCPUILocale(locale: unknown): string {
1128
+ const fallback = DEFAULT_MCPUI_STRINGS.locale
1129
+ if (typeof locale !== 'string' || locale.trim() === '') return fallback
1130
+ const cached = resolvedLocales.get(locale)
1131
+ if (cached) return cached
1132
+ let resolved = fallback
1133
+ try {
1134
+ const [canonical] = Intl.getCanonicalLocales(locale)
1135
+ if (canonical) resolved = canonical
1136
+ } catch {
1137
+ resolved = fallback
1138
+ }
1139
+ if (resolvedLocales.size < 64) resolvedLocales.set(locale, resolved)
1140
+ return resolved
1141
+ }
1142
+
136
1143
  export function useMCPUIStrings(): Required<MCPUIStrings> {
137
- return mergeProps(DEFAULT_MCPUI_STRINGS, useContext(MCPUIStringsContext))
1144
+ const context = useContext(MCPUIStringsContext)
1145
+ // The last source wins: `locale` is always a valid tag, whatever the provider passed.
1146
+ return mergeProps(DEFAULT_MCPUI_STRINGS, context, {
1147
+ get locale() {
1148
+ return resolveMCPUILocale(context?.locale)
1149
+ },
1150
+ })
138
1151
  }
139
1152
 
140
1153
  export interface MCPUIStringsProviderProps {