@miragon/mcp-toolkit-ui 2.7.0 → 2.8.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 (387) hide show
  1. package/README.md +7 -4
  2. package/dist/app/adapt-data-widget.d.ts +1 -22
  3. package/dist/app/adapt-data-widget.d.ts.map +1 -1
  4. package/dist/app/adapt-data-widget.js +1 -35
  5. package/dist/app/adapt-data-widget.js.map +1 -1
  6. package/dist/app/builder/BuilderBanners.js +1 -1
  7. package/dist/app/builder/BuilderBanners.js.map +1 -1
  8. package/dist/app/builder/CanvasRow.d.ts +4 -2
  9. package/dist/app/builder/CanvasRow.d.ts.map +1 -1
  10. package/dist/app/builder/CanvasRow.js +21 -7
  11. package/dist/app/builder/CanvasRow.js.map +1 -1
  12. package/dist/app/builder/CatalogueSheet.d.ts.map +1 -1
  13. package/dist/app/builder/CatalogueSheet.js +11 -4
  14. package/dist/app/builder/CatalogueSheet.js.map +1 -1
  15. package/dist/app/builder/CellPropsSheet.d.ts +7 -3
  16. package/dist/app/builder/CellPropsSheet.d.ts.map +1 -1
  17. package/dist/app/builder/CellPropsSheet.js +10 -3
  18. package/dist/app/builder/CellPropsSheet.js.map +1 -1
  19. package/dist/app/builder/DiscardDialog.d.ts +18 -0
  20. package/dist/app/builder/DiscardDialog.d.ts.map +1 -0
  21. package/dist/app/builder/DiscardDialog.js +18 -0
  22. package/dist/app/builder/DiscardDialog.js.map +1 -0
  23. package/dist/app/builder/LayoutSurface.d.ts +33 -9
  24. package/dist/app/builder/LayoutSurface.d.ts.map +1 -1
  25. package/dist/app/builder/LayoutSurface.js +74 -23
  26. package/dist/app/builder/LayoutSurface.js.map +1 -1
  27. package/dist/app/builder/PipelineStrip.d.ts +2 -1
  28. package/dist/app/builder/PipelineStrip.d.ts.map +1 -1
  29. package/dist/app/builder/PipelineStrip.js +26 -13
  30. package/dist/app/builder/PipelineStrip.js.map +1 -1
  31. package/dist/app/builder/SaveDialog.d.ts +9 -1
  32. package/dist/app/builder/SaveDialog.d.ts.map +1 -1
  33. package/dist/app/builder/SaveDialog.js +8 -2
  34. package/dist/app/builder/SaveDialog.js.map +1 -1
  35. package/dist/app/builder/Toolbar.d.ts +12 -4
  36. package/dist/app/builder/Toolbar.d.ts.map +1 -1
  37. package/dist/app/builder/Toolbar.js +18 -7
  38. package/dist/app/builder/Toolbar.js.map +1 -1
  39. package/dist/app/builder/Workspace.d.ts +23 -3
  40. package/dist/app/builder/Workspace.d.ts.map +1 -1
  41. package/dist/app/builder/Workspace.js +58 -8
  42. package/dist/app/builder/Workspace.js.map +1 -1
  43. package/dist/app/builder/builder-model.d.ts +143 -1
  44. package/dist/app/builder/builder-model.d.ts.map +1 -1
  45. package/dist/app/builder/builder-model.js +191 -1
  46. package/dist/app/builder/builder-model.js.map +1 -1
  47. package/dist/app/builder/reveal.d.ts +10 -0
  48. package/dist/app/builder/reveal.d.ts.map +1 -0
  49. package/dist/app/builder/reveal.js +10 -0
  50. package/dist/app/builder/reveal.js.map +1 -0
  51. package/dist/app/builder/use-builder-catalogue.d.ts +4 -1
  52. package/dist/app/builder/use-builder-catalogue.d.ts.map +1 -1
  53. package/dist/app/builder/use-builder-catalogue.js +44 -17
  54. package/dist/app/builder/use-builder-catalogue.js.map +1 -1
  55. package/dist/app/builder/use-builder-session.d.ts +30 -0
  56. package/dist/app/builder/use-builder-session.d.ts.map +1 -0
  57. package/dist/app/builder/use-builder-session.js +58 -0
  58. package/dist/app/builder/use-builder-session.js.map +1 -0
  59. package/dist/app/builder/use-display-resolver.d.ts +17 -0
  60. package/dist/app/builder/use-display-resolver.d.ts.map +1 -0
  61. package/dist/app/builder/use-display-resolver.js +16 -0
  62. package/dist/app/builder/use-display-resolver.js.map +1 -0
  63. package/dist/app/index.d.ts +8 -3
  64. package/dist/app/index.d.ts.map +1 -1
  65. package/dist/app/index.js +8 -2
  66. package/dist/app/index.js.map +1 -1
  67. package/dist/app/layout-builder.d.ts +13 -25
  68. package/dist/app/layout-builder.d.ts.map +1 -1
  69. package/dist/app/layout-builder.js +75 -81
  70. package/dist/app/layout-builder.js.map +1 -1
  71. package/dist/app/mcp-app-view-chrome.d.ts +12 -3
  72. package/dist/app/mcp-app-view-chrome.d.ts.map +1 -1
  73. package/dist/app/mcp-app-view-chrome.js +21 -5
  74. package/dist/app/mcp-app-view-chrome.js.map +1 -1
  75. package/dist/app/mcp-app-view-states.d.ts +11 -3
  76. package/dist/app/mcp-app-view-states.d.ts.map +1 -1
  77. package/dist/app/mcp-app-view-states.js +29 -8
  78. package/dist/app/mcp-app-view-states.js.map +1 -1
  79. package/dist/app/mcp-app-view.d.ts +33 -1
  80. package/dist/app/mcp-app-view.d.ts.map +1 -1
  81. package/dist/app/mcp-app-view.js +181 -127
  82. package/dist/app/mcp-app-view.js.map +1 -1
  83. package/dist/app/mcp-toolkit-app.d.ts +6 -1
  84. package/dist/app/mcp-toolkit-app.d.ts.map +1 -1
  85. package/dist/app/mcp-toolkit-app.js +8 -1
  86. package/dist/app/mcp-toolkit-app.js.map +1 -1
  87. package/dist/app/mcp-use-host-bridge.d.ts +15 -6
  88. package/dist/app/mcp-use-host-bridge.d.ts.map +1 -1
  89. package/dist/app/mcp-use-host-bridge.js +51 -22
  90. package/dist/app/mcp-use-host-bridge.js.map +1 -1
  91. package/dist/app/model-context.d.ts +71 -0
  92. package/dist/app/model-context.d.ts.map +1 -0
  93. package/dist/app/model-context.js +101 -0
  94. package/dist/app/model-context.js.map +1 -0
  95. package/dist/app/use-build-mode-focus.d.ts +33 -0
  96. package/dist/app/use-build-mode-focus.d.ts.map +1 -0
  97. package/dist/app/use-build-mode-focus.js +59 -0
  98. package/dist/app/use-build-mode-focus.js.map +1 -0
  99. package/dist/app/use-view-actions.d.ts +31 -0
  100. package/dist/app/use-view-actions.d.ts.map +1 -0
  101. package/dist/app/use-view-actions.js +81 -0
  102. package/dist/app/use-view-actions.js.map +1 -0
  103. package/dist/app/use-view-lifecycle.d.ts +4 -0
  104. package/dist/app/use-view-lifecycle.d.ts.map +1 -1
  105. package/dist/app/use-view-lifecycle.js +2 -0
  106. package/dist/app/use-view-lifecycle.js.map +1 -1
  107. package/dist/app/view-lifecycle.d.ts +80 -4
  108. package/dist/app/view-lifecycle.d.ts.map +1 -1
  109. package/dist/app/view-lifecycle.js +90 -3
  110. package/dist/app/view-lifecycle.js.map +1 -1
  111. package/dist/app/widget-fixture.d.ts +10 -3
  112. package/dist/app/widget-fixture.d.ts.map +1 -1
  113. package/dist/app/widget-fixture.js +21 -8
  114. package/dist/app/widget-fixture.js.map +1 -1
  115. package/dist/app/widget-props-sheet.d.ts +3 -1
  116. package/dist/app/widget-props-sheet.d.ts.map +1 -1
  117. package/dist/app/widget-props-sheet.js +22 -10
  118. package/dist/app/widget-props-sheet.js.map +1 -1
  119. package/dist/app/widget-renderer.js +1 -1
  120. package/dist/app/widget-renderer.js.map +1 -1
  121. package/dist/components/DrillButton.d.ts +9 -6
  122. package/dist/components/DrillButton.d.ts.map +1 -1
  123. package/dist/components/DrillButton.js +8 -6
  124. package/dist/components/DrillButton.js.map +1 -1
  125. package/dist/components/EmptyState.d.ts.map +1 -1
  126. package/dist/components/EmptyState.js +4 -2
  127. package/dist/components/EmptyState.js.map +1 -1
  128. package/dist/components/ErrorState.d.ts +5 -2
  129. package/dist/components/ErrorState.d.ts.map +1 -1
  130. package/dist/components/ErrorState.js +25 -8
  131. package/dist/components/ErrorState.js.map +1 -1
  132. package/dist/components/FilterBar.d.ts +15 -4
  133. package/dist/components/FilterBar.d.ts.map +1 -1
  134. package/dist/components/FilterBar.js +11 -6
  135. package/dist/components/FilterBar.js.map +1 -1
  136. package/dist/components/KpiGrid.d.ts +66 -21
  137. package/dist/components/KpiGrid.d.ts.map +1 -1
  138. package/dist/components/KpiGrid.js +101 -34
  139. package/dist/components/KpiGrid.js.map +1 -1
  140. package/dist/components/ListFooter.d.ts +31 -4
  141. package/dist/components/ListFooter.d.ts.map +1 -1
  142. package/dist/components/ListFooter.js +30 -11
  143. package/dist/components/ListFooter.js.map +1 -1
  144. package/dist/components/PagedListFooter.d.ts +57 -0
  145. package/dist/components/PagedListFooter.d.ts.map +1 -0
  146. package/dist/components/PagedListFooter.js +27 -0
  147. package/dist/components/PagedListFooter.js.map +1 -0
  148. package/dist/components/Pills.d.ts +27 -7
  149. package/dist/components/Pills.d.ts.map +1 -1
  150. package/dist/components/Pills.js +21 -6
  151. package/dist/components/Pills.js.map +1 -1
  152. package/dist/components/SectionHeading.d.ts +3 -1
  153. package/dist/components/SectionHeading.d.ts.map +1 -1
  154. package/dist/components/SectionHeading.js +6 -2
  155. package/dist/components/SectionHeading.js.map +1 -1
  156. package/dist/components/Toast.d.ts +9 -3
  157. package/dist/components/Toast.d.ts.map +1 -1
  158. package/dist/components/Toast.js +31 -16
  159. package/dist/components/Toast.js.map +1 -1
  160. package/dist/components/WidgetHeader.d.ts +34 -10
  161. package/dist/components/WidgetHeader.d.ts.map +1 -1
  162. package/dist/components/WidgetHeader.js +11 -6
  163. package/dist/components/WidgetHeader.js.map +1 -1
  164. package/dist/hooks/index.d.ts +4 -4
  165. package/dist/hooks/index.d.ts.map +1 -1
  166. package/dist/hooks/index.js +1 -1
  167. package/dist/hooks/index.js.map +1 -1
  168. package/dist/hooks/tool-result-recovery-model.d.ts +155 -0
  169. package/dist/hooks/tool-result-recovery-model.d.ts.map +1 -0
  170. package/dist/hooks/tool-result-recovery-model.js +273 -0
  171. package/dist/hooks/tool-result-recovery-model.js.map +1 -0
  172. package/dist/hooks/use-tool-query.d.ts +56 -14
  173. package/dist/hooks/use-tool-query.d.ts.map +1 -1
  174. package/dist/hooks/use-tool-query.js +102 -25
  175. package/dist/hooks/use-tool-query.js.map +1 -1
  176. package/dist/hooks/use-tool-result-recovery.d.ts +47 -52
  177. package/dist/hooks/use-tool-result-recovery.d.ts.map +1 -1
  178. package/dist/hooks/use-tool-result-recovery.js +58 -120
  179. package/dist/hooks/use-tool-result-recovery.js.map +1 -1
  180. package/dist/hooks/use-view-data.d.ts +52 -10
  181. package/dist/hooks/use-view-data.d.ts.map +1 -1
  182. package/dist/hooks/use-view-data.js +81 -16
  183. package/dist/hooks/use-view-data.js.map +1 -1
  184. package/dist/hooks/use-view-tool-query.d.ts +12 -7
  185. package/dist/hooks/use-view-tool-query.d.ts.map +1 -1
  186. package/dist/hooks/use-view-tool-query.js +15 -14
  187. package/dist/hooks/use-view-tool-query.js.map +1 -1
  188. package/dist/index.d.ts +17 -10
  189. package/dist/index.d.ts.map +1 -1
  190. package/dist/index.js +18 -6
  191. package/dist/index.js.map +1 -1
  192. package/dist/lib/focus-return.d.ts +61 -0
  193. package/dist/lib/focus-return.d.ts.map +1 -0
  194. package/dist/lib/focus-return.js +46 -0
  195. package/dist/lib/focus-return.js.map +1 -0
  196. package/dist/lib/parse-tool-result.d.ts +23 -1
  197. package/dist/lib/parse-tool-result.d.ts.map +1 -1
  198. package/dist/lib/parse-tool-result.js +38 -2
  199. package/dist/lib/parse-tool-result.js.map +1 -1
  200. package/dist/lib/toast-model.d.ts +41 -1
  201. package/dist/lib/toast-model.d.ts.map +1 -1
  202. package/dist/lib/toast-model.js +67 -1
  203. package/dist/lib/toast-model.js.map +1 -1
  204. package/dist/lib/tone-utils.d.ts +58 -6
  205. package/dist/lib/tone-utils.d.ts.map +1 -1
  206. package/dist/lib/tone-utils.js +66 -4
  207. package/dist/lib/tone-utils.js.map +1 -1
  208. package/dist/lib/tool-query.d.ts +107 -0
  209. package/dist/lib/tool-query.d.ts.map +1 -0
  210. package/dist/lib/tool-query.js +182 -0
  211. package/dist/lib/tool-query.js.map +1 -0
  212. package/dist/lib/tool-result-observer.d.ts +108 -0
  213. package/dist/lib/tool-result-observer.d.ts.map +1 -0
  214. package/dist/lib/tool-result-observer.js +158 -0
  215. package/dist/lib/tool-result-observer.js.map +1 -0
  216. package/dist/lib/typography.d.ts +37 -0
  217. package/dist/lib/typography.d.ts.map +1 -0
  218. package/dist/lib/typography.js +41 -0
  219. package/dist/lib/typography.js.map +1 -0
  220. package/dist/lib/utils.d.ts.map +1 -1
  221. package/dist/lib/utils.js +11 -1
  222. package/dist/lib/utils.js.map +1 -1
  223. package/dist/locale/index.d.ts +1 -1
  224. package/dist/locale/index.d.ts.map +1 -1
  225. package/dist/locale/message-types.d.ts +117 -4
  226. package/dist/locale/message-types.d.ts.map +1 -1
  227. package/dist/locale/messages-de.d.ts.map +1 -1
  228. package/dist/locale/messages-de.js +44 -10
  229. package/dist/locale/messages-de.js.map +1 -1
  230. package/dist/locale/messages-en.d.ts.map +1 -1
  231. package/dist/locale/messages-en.js +44 -10
  232. package/dist/locale/messages-en.js.map +1 -1
  233. package/dist/locale/toolkit-messages.d.ts +19 -1
  234. package/dist/locale/toolkit-messages.d.ts.map +1 -1
  235. package/dist/locale/toolkit-messages.js +54 -1
  236. package/dist/locale/toolkit-messages.js.map +1 -1
  237. package/dist/primitives/alert.d.ts +1 -1
  238. package/dist/primitives/alert.d.ts.map +1 -1
  239. package/dist/primitives/alert.js +2 -0
  240. package/dist/primitives/alert.js.map +1 -1
  241. package/dist/primitives/badge.d.ts +1 -1
  242. package/dist/primitives/badge.d.ts.map +1 -1
  243. package/dist/primitives/badge.js +9 -4
  244. package/dist/primitives/badge.js.map +1 -1
  245. package/dist/primitives/button.d.ts +1 -1
  246. package/dist/primitives/button.js +1 -1
  247. package/dist/primitives/button.js.map +1 -1
  248. package/dist/primitives/dialog.d.ts +1 -1
  249. package/dist/primitives/dialog.d.ts.map +1 -1
  250. package/dist/primitives/dialog.js +10 -3
  251. package/dist/primitives/dialog.js.map +1 -1
  252. package/dist/primitives/select.js +1 -1
  253. package/dist/primitives/select.js.map +1 -1
  254. package/dist/primitives/sheet.d.ts +1 -1
  255. package/dist/primitives/sheet.d.ts.map +1 -1
  256. package/dist/primitives/sheet.js +6 -2
  257. package/dist/primitives/sheet.js.map +1 -1
  258. package/dist/providers/query-provider.d.ts +32 -1
  259. package/dist/providers/query-provider.d.ts.map +1 -1
  260. package/dist/providers/query-provider.js +53 -4
  261. package/dist/providers/query-provider.js.map +1 -1
  262. package/dist/render-cases-primitives.js +1 -1
  263. package/dist/render-cases-primitives.js.map +1 -1
  264. package/dist/render-cases.d.ts.map +1 -1
  265. package/dist/render-cases.js +30 -6
  266. package/dist/render-cases.js.map +1 -1
  267. package/dist/render-effects.d.ts +42 -0
  268. package/dist/render-effects.d.ts.map +1 -0
  269. package/dist/render-effects.js +81 -0
  270. package/dist/render-effects.js.map +1 -0
  271. package/dist/theme/create-theme.d.ts +19 -1
  272. package/dist/theme/create-theme.d.ts.map +1 -1
  273. package/dist/theme/create-theme.js +15 -0
  274. package/dist/theme/create-theme.js.map +1 -1
  275. package/package.json +5 -4
  276. package/src/app/adapt-data-widget.tsx +2 -42
  277. package/src/app/builder/BuilderBanners.tsx +1 -1
  278. package/src/app/builder/CanvasRow.tsx +63 -17
  279. package/src/app/builder/CatalogueSheet.tsx +50 -29
  280. package/src/app/builder/CellPropsSheet.tsx +17 -2
  281. package/src/app/builder/DiscardDialog.tsx +59 -0
  282. package/src/app/builder/LayoutSurface.tsx +206 -66
  283. package/src/app/builder/PipelineStrip.tsx +253 -153
  284. package/src/app/builder/SaveDialog.tsx +14 -2
  285. package/src/app/builder/Toolbar.tsx +144 -59
  286. package/src/app/builder/Workspace.tsx +226 -58
  287. package/src/app/builder/builder-model.ts +341 -2
  288. package/src/app/builder/builder-model.ux.test.ts +456 -0
  289. package/src/app/builder/builder-ux.test.tsx +844 -0
  290. package/src/app/builder/reveal.ts +10 -0
  291. package/src/app/builder/use-builder-catalogue.ts +56 -19
  292. package/src/app/builder/use-builder-session.ts +68 -0
  293. package/src/app/builder/use-display-resolver.ts +24 -0
  294. package/src/app/index.ts +12 -2
  295. package/src/app/layout-builder.tsx +178 -191
  296. package/src/app/mcp-app-view-chrome.test.tsx +141 -1
  297. package/src/app/mcp-app-view-chrome.tsx +56 -6
  298. package/src/app/mcp-app-view-states.tsx +51 -11
  299. package/src/app/mcp-app-view.effects.test.tsx +292 -0
  300. package/src/app/mcp-app-view.test.tsx +222 -2
  301. package/src/app/mcp-app-view.tsx +267 -117
  302. package/src/app/mcp-toolkit-app.test.tsx +40 -0
  303. package/src/app/mcp-toolkit-app.tsx +8 -1
  304. package/src/app/mcp-use-host-bridge.test.tsx +180 -0
  305. package/src/app/mcp-use-host-bridge.tsx +67 -24
  306. package/src/app/model-context.test.tsx +116 -0
  307. package/src/app/model-context.tsx +125 -0
  308. package/src/app/use-build-mode-focus.ts +62 -0
  309. package/src/app/use-view-actions.ts +89 -0
  310. package/src/app/use-view-lifecycle.ts +6 -0
  311. package/src/app/view-lifecycle.test.ts +216 -0
  312. package/src/app/view-lifecycle.ts +165 -5
  313. package/src/app/widget-fixture.effects.test.tsx +51 -0
  314. package/src/app/widget-fixture.render.test.tsx +81 -0
  315. package/src/app/widget-fixture.tsx +34 -11
  316. package/src/app/widget-props-sheet.tsx +57 -16
  317. package/src/app/widget-renderer.tsx +1 -1
  318. package/src/components/DrillButton.tsx +23 -10
  319. package/src/components/EmptyState.tsx +6 -4
  320. package/src/components/ErrorState.tsx +31 -9
  321. package/src/components/FilterBar.test.tsx +82 -0
  322. package/src/components/FilterBar.tsx +52 -26
  323. package/src/components/KpiGrid.test.tsx +279 -0
  324. package/src/components/KpiGrid.tsx +297 -90
  325. package/src/components/ListFooter.test.tsx +116 -0
  326. package/src/components/ListFooter.tsx +102 -15
  327. package/src/components/PagedListFooter.test.tsx +140 -0
  328. package/src/components/PagedListFooter.tsx +107 -0
  329. package/src/components/Pills.test.tsx +77 -0
  330. package/src/components/Pills.tsx +63 -10
  331. package/src/components/SectionHeading.tsx +9 -3
  332. package/src/components/Toast.tsx +37 -19
  333. package/src/components/WidgetHeader.test.tsx +78 -0
  334. package/src/components/WidgetHeader.tsx +63 -16
  335. package/src/components/feedback-states.test.tsx +98 -9
  336. package/src/components/tone-figures.test.tsx +8 -4
  337. package/src/hooks/index.ts +6 -3
  338. package/src/hooks/tool-result-recovery-model.test.ts +744 -0
  339. package/src/hooks/tool-result-recovery-model.ts +418 -0
  340. package/src/hooks/use-tool-query.effects.test.tsx +205 -0
  341. package/src/hooks/use-tool-query.ts +156 -33
  342. package/src/hooks/use-tool-result-recovery.effects.test.tsx +141 -0
  343. package/src/hooks/use-tool-result-recovery.test.ts +3 -4
  344. package/src/hooks/use-tool-result-recovery.ts +84 -142
  345. package/src/hooks/use-view-data.test.tsx +118 -9
  346. package/src/hooks/use-view-data.ts +128 -18
  347. package/src/hooks/use-view-tool-query.ts +25 -19
  348. package/src/i18n-coverage.test.tsx +104 -2
  349. package/src/index.ts +48 -11
  350. package/src/lib/focus-return.test.ts +288 -0
  351. package/src/lib/focus-return.ts +96 -0
  352. package/src/lib/parse-tool-result.test.ts +46 -1
  353. package/src/lib/parse-tool-result.ts +40 -2
  354. package/src/lib/toast-model.test.ts +166 -1
  355. package/src/lib/toast-model.ts +104 -2
  356. package/src/lib/tone-utils.test.ts +86 -10
  357. package/src/lib/tone-utils.ts +89 -8
  358. package/src/lib/tool-query.test.ts +569 -0
  359. package/src/lib/tool-query.ts +253 -0
  360. package/src/lib/tool-result-observer.test.ts +296 -0
  361. package/src/lib/tool-result-observer.ts +211 -0
  362. package/src/lib/typography.test.ts +45 -0
  363. package/src/lib/typography.ts +47 -0
  364. package/src/lib/utils.ts +12 -1
  365. package/src/locale/index.ts +1 -0
  366. package/src/locale/message-types.ts +118 -2
  367. package/src/locale/messages-de.ts +49 -10
  368. package/src/locale/messages-en.ts +49 -10
  369. package/src/locale/toolkit-messages.test.ts +133 -0
  370. package/src/locale/toolkit-messages.ts +63 -2
  371. package/src/primitives/alert.tsx +3 -0
  372. package/src/primitives/badge.tsx +9 -4
  373. package/src/primitives/button.tsx +1 -1
  374. package/src/primitives/dialog.tsx +10 -1
  375. package/src/primitives/select.tsx +1 -1
  376. package/src/primitives/sheet.tsx +7 -0
  377. package/src/providers/query-provider.test.tsx +154 -0
  378. package/src/providers/query-provider.tsx +66 -5
  379. package/src/render-cases-primitives.tsx +1 -1
  380. package/src/render-cases.tsx +38 -6
  381. package/src/render-effects.tsx +96 -0
  382. package/src/theme/cd-tokens.test.ts +3 -1
  383. package/src/theme/create-theme.test.ts +10 -0
  384. package/src/theme/create-theme.ts +28 -0
  385. package/src/theme/theme-css.test.ts +51 -0
  386. package/src/theme.css +31 -1
  387. package/ui-catalog.json +448 -41
@@ -0,0 +1,211 @@
1
+ /**
2
+ * A passive observer of the MCP Apps (SEP-1865) host → view lifecycle
3
+ * notifications, read straight off the postMessage channel the view runtime
4
+ * itself listens on (toolkit#176 K13, N21).
5
+ *
6
+ * mcp-use 2.x latches only a result WITH `structuredContent` (or an
7
+ * `isError`); a content-only result, which claude.ai and Claude Desktop send,
8
+ * leaves its status `"pending"` forever, and its tool input merges partial and
9
+ * complete arguments into one field. Watching the notifications themselves
10
+ * tells the three cases apart that the latch cannot:
11
+ *
12
+ * - the host delivered a STRIPPED result (re-run the tool now, with the
13
+ * complete arguments it was called with),
14
+ * - the host delivered a structured result (the latch follows; never re-run),
15
+ * - nothing arrived yet (a slow tool on a compliant host: keep waiting).
16
+ *
17
+ * The last case is only certain when the observer was listening before the
18
+ * host answered `ui/initialize` ({@link ToolObservation.sawHandshake}): hosts
19
+ * send the lifecycle notifications after the handshake, so an observer that
20
+ * saw it has seen everything sent so far. `mountMcpToolkitApp` installs it
21
+ * ahead of `bootstrapView` for exactly that reason.
22
+ *
23
+ * Read-only: it never sends, never answers and never stops a message.
24
+ */
25
+
26
+ /** What the host's `ui/notifications/tool-result` carried. */
27
+ export type ObservedToolResult = "none" | "structured" | "stripped" | "error"
28
+
29
+ /** Everything the observer learned about the rendering call so far. */
30
+ export interface ToolObservation {
31
+ /**
32
+ * The observer saw the host answer `ui/initialize`, so it was listening
33
+ * before any lifecycle notification could be sent: a result it has not
34
+ * seen has not been delivered yet.
35
+ */
36
+ sawHandshake: boolean
37
+ /**
38
+ * The arguments of the complete `ui/notifications/tool-input` — never a
39
+ * partial stream (`tool-input-partial` is ignored). `undefined` until it
40
+ * arrived.
41
+ */
42
+ completeInput: Record<string, unknown> | undefined
43
+ /** What the first `ui/notifications/tool-result` carried. */
44
+ result: ObservedToolResult
45
+ /** The host sent `ui/notifications/tool-cancelled`. */
46
+ cancelled: boolean
47
+ }
48
+
49
+ export const EMPTY_TOOL_OBSERVATION: ToolObservation = Object.freeze({
50
+ sawHandshake: false,
51
+ completeInput: undefined,
52
+ result: "none",
53
+ cancelled: false,
54
+ })
55
+
56
+ /** A host → view message the observer acts on. */
57
+ export type HostLifecycleMessage =
58
+ | { kind: "handshake" }
59
+ | { kind: "tool-input"; arguments: Record<string, unknown> }
60
+ | { kind: "tool-result"; result: Exclude<ObservedToolResult, "none"> }
61
+ | { kind: "tool-cancelled" }
62
+
63
+ function isRecord(value: unknown): value is Record<string, unknown> {
64
+ return typeof value === "object" && value !== null && !Array.isArray(value)
65
+ }
66
+
67
+ /**
68
+ * Classify a tool-result notification the way mcp-use 2.x's latch does: an
69
+ * `isError` result is an error, a result with `structuredContent` (even
70
+ * `null`) latches as ready, and anything else is the stripped, content-only
71
+ * result the latch ignores.
72
+ */
73
+ export function classifyToolResult(
74
+ params: Record<string, unknown>,
75
+ ): Exclude<ObservedToolResult, "none"> {
76
+ if (params.isError === true) return "error"
77
+ return params.structuredContent === undefined ? "stripped" : "structured"
78
+ }
79
+
80
+ /** The host's answer to `ui/initialize`: a response carrying its capabilities or protocol version. */
81
+ function isHandshakeResponse(message: Record<string, unknown>): boolean {
82
+ if (!("id" in message) || !isRecord(message.result)) return false
83
+ return (
84
+ isRecord(message.result.hostCapabilities) || typeof message.result.protocolVersion === "string"
85
+ )
86
+ }
87
+
88
+ /**
89
+ * Decode one postMessage payload into the lifecycle message it is, or `null`
90
+ * for anything else (other methods, requests, responses, foreign traffic).
91
+ */
92
+ export function classifyHostMessage(data: unknown): HostLifecycleMessage | null {
93
+ if (!isRecord(data) || data.jsonrpc !== "2.0") return null
94
+ if (typeof data.method !== "string") {
95
+ return isHandshakeResponse(data) ? { kind: "handshake" } : null
96
+ }
97
+ const params = isRecord(data.params) ? data.params : {}
98
+ switch (data.method) {
99
+ case "ui/notifications/tool-input":
100
+ return {
101
+ kind: "tool-input",
102
+ arguments: isRecord(params.arguments) ? params.arguments : {},
103
+ }
104
+ case "ui/notifications/tool-result":
105
+ return { kind: "tool-result", result: classifyToolResult(params) }
106
+ case "ui/notifications/tool-cancelled":
107
+ return { kind: "tool-cancelled" }
108
+ default:
109
+ return null
110
+ }
111
+ }
112
+
113
+ /**
114
+ * Fold one message into the observation. Like the mcp-use latch, the call
115
+ * settles once: after its result or cancellation, later inputs, results and
116
+ * cancellations change nothing.
117
+ */
118
+ export function reduceToolObservation(
119
+ state: ToolObservation,
120
+ message: HostLifecycleMessage,
121
+ ): ToolObservation {
122
+ if (message.kind === "handshake") {
123
+ return state.sawHandshake ? state : { ...state, sawHandshake: true }
124
+ }
125
+ if (state.result !== "none" || state.cancelled) return state
126
+ switch (message.kind) {
127
+ case "tool-input":
128
+ return { ...state, completeInput: message.arguments }
129
+ case "tool-result":
130
+ return { ...state, result: message.result }
131
+ case "tool-cancelled":
132
+ return { ...state, cancelled: true }
133
+ }
134
+ }
135
+
136
+ /** The `window` slice the observer listens on (any `EventTarget`, e.g. in tests). */
137
+ export interface MessageEventSource {
138
+ addEventListener(type: "message", listener: (event: Event) => void): void
139
+ removeEventListener(type: "message", listener: (event: Event) => void): void
140
+ }
141
+
142
+ /** A subscribable observation, shaped for `useSyncExternalStore`. */
143
+ export interface ToolResultObserver {
144
+ subscribe: (listener: () => void) => () => void
145
+ getSnapshot: () => ToolObservation
146
+ /** Stop listening; the last observation stays readable. */
147
+ dispose: () => void
148
+ }
149
+
150
+ /**
151
+ * Observe the lifecycle notifications arriving on `source`. `accept` filters
152
+ * the events (the view accepts only its host: `event.source === window.parent`,
153
+ * the same check the ext-apps transport makes).
154
+ */
155
+ export function createToolResultObserver(
156
+ source: MessageEventSource,
157
+ accept: (event: MessageEvent) => boolean = () => true,
158
+ ): ToolResultObserver {
159
+ let snapshot: ToolObservation = EMPTY_TOOL_OBSERVATION
160
+ const listeners = new Set<() => void>()
161
+ const onMessage = (received: Event) => {
162
+ // Only `message` events are subscribed: each one is a MessageEvent.
163
+ const event = received as MessageEvent
164
+ if (!accept(event)) return
165
+ const message = classifyHostMessage(event.data)
166
+ if (!message) return
167
+ const next = reduceToolObservation(snapshot, message)
168
+ if (next === snapshot) return
169
+ snapshot = next
170
+ for (const listener of [...listeners]) listener()
171
+ }
172
+ source.addEventListener("message", onMessage)
173
+ return {
174
+ subscribe: (listener) => {
175
+ listeners.add(listener)
176
+ return () => {
177
+ listeners.delete(listener)
178
+ }
179
+ },
180
+ getSnapshot: () => snapshot,
181
+ dispose: () => {
182
+ source.removeEventListener("message", onMessage)
183
+ },
184
+ }
185
+ }
186
+
187
+ let documentObserver: ToolResultObserver | null = null
188
+
189
+ /**
190
+ * The view document's observer: installed once and kept for the document's
191
+ * lifetime (one document renders one view). `null` outside a browser and in
192
+ * a top-level window, where no host frames the view.
193
+ *
194
+ * It must listen before the view runtime connects, so it sees the
195
+ * handshake. This module therefore installs it as the bundle evaluates
196
+ * (below), ahead of any `bootstrapView` call in the entry module, whatever
197
+ * the mount; `mountMcpToolkitApp` calls it again (idempotent). Installed any
198
+ * later, it still sees what arrives afterwards, and the recovery falls back
199
+ * to its grace timer for the rest.
200
+ */
201
+ export function installToolResultObserver(): ToolResultObserver | null {
202
+ if (documentObserver) return documentObserver
203
+ if (typeof window === "undefined" || window.parent === window) return null
204
+ const host = window.parent
205
+ documentObserver = createToolResultObserver(window, (event) => event.source === host)
206
+ return documentObserver
207
+ }
208
+
209
+ // Listen from the moment the view bundle evaluates (a passive listener; a
210
+ // no-op outside a framed browser document).
211
+ installToolResultObserver()
@@ -0,0 +1,45 @@
1
+ import { describe, expect, it } from "vitest"
2
+ import { MICRO_LABEL, TYPE_FLOOR_PX, TYPE_SCALE, TYPE_STEPS } from "./typography.js"
3
+ import { cn } from "./utils.js"
4
+
5
+ describe("the type scale (CI §4)", () => {
6
+ it("has five steps, each its own self-named utility", () => {
7
+ expect(TYPE_STEPS).toEqual(["title", "section", "body", "dense", "small"])
8
+ expect(TYPE_SCALE).toEqual({
9
+ title: "text-title",
10
+ section: "text-section",
11
+ body: "text-body",
12
+ dense: "text-dense",
13
+ small: "text-small",
14
+ })
15
+ })
16
+
17
+ it("puts the floor at the CI's smallest size and micro-labels on it, in normal case", () => {
18
+ expect(TYPE_FLOOR_PX).toBe(13)
19
+ expect(MICRO_LABEL).toBe("text-small font-semibold")
20
+ expect(MICRO_LABEL).not.toMatch(/uppercase|text-xs|text-\[/)
21
+ })
22
+ })
23
+
24
+ describe("cn knows the type scale (tailwind-merge would drop it as a colour)", () => {
25
+ it("keeps a scale size next to a text colour, in either order", () => {
26
+ for (const size of Object.values(TYPE_SCALE)) {
27
+ expect(cn(size, "text-muted-foreground")).toBe(`${size} text-muted-foreground`)
28
+ expect(cn("text-danger-ink", size)).toBe(`text-danger-ink ${size}`)
29
+ }
30
+ })
31
+
32
+ it("lets a later size win over an earlier one, scale or Tailwind", () => {
33
+ expect(cn("text-sm", "text-small")).toBe("text-small")
34
+ expect(cn("text-small", "text-xs")).toBe("text-xs")
35
+ expect(cn("text-dense", "text-title")).toBe("text-title")
36
+ expect(cn("md:text-sm", "md:text-dense")).toBe("md:text-dense")
37
+ })
38
+
39
+ it("keeps a leading set after the size (a size resets the line height before it)", () => {
40
+ expect(cn("text-small", "leading-4")).toBe("text-small leading-4")
41
+ expect(cn(MICRO_LABEL, "text-muted-foreground")).toBe(
42
+ "text-small font-semibold text-muted-foreground",
43
+ )
44
+ })
45
+ })
@@ -0,0 +1,47 @@
1
+ /**
2
+ * The type scale of the kit (modeler-tool-design §4, adapted for embedded
3
+ * widgets): five steps, each a role in `theme.css` (`--text-<step>` with its
4
+ * line height and weight) and a Tailwind utility of the same name.
5
+ *
6
+ * | Step | Utility | Size / weight / line height | Use |
7
+ * | --------- | -------------- | --------------------------- | ------------------------------------------ |
8
+ * | `title` | `text-title` | 28 px / 700 / 1.2 | page title (the CI h2; a widget has no h1 40 px) |
9
+ * | `section` | `text-section` | 21 px / 600 / 1.3 | section title (CI h3) |
10
+ * | `body` | `text-body` | 16 px / 400 / 1.6 | running text: state and toast descriptions |
11
+ * | `dense` | `text-dense` | 14 px / 400 / 1.5 | dense tables and controls (inputs, chips, count pills, the inline alert box): the documented product exception, never running text |
12
+ * | `small` | `text-small` | 13 px / 400 / 1.5 | captions, labels, hints, meta rows: the FLOOR |
13
+ *
14
+ * Nothing renders below 13 px — no `text-xs` (12 px), no `text-[10px]`
15
+ * micro-labels (`examples/test/design-system.test.ts` enforces it). A label
16
+ * that used to be a 10–11 px uppercase caption is {@link MICRO_LABEL}: 13 px,
17
+ * semibold, normal case.
18
+ *
19
+ * Combine the utilities through the kit's `cn`: plain tailwind-merge does not
20
+ * know these sizes and would drop `text-small` next to a text colour.
21
+ */
22
+
23
+ /** The five steps, smallest last. */
24
+ export const TYPE_STEPS = ["title", "section", "body", "dense", "small"] as const
25
+
26
+ /** One step of the type scale. */
27
+ export type TypeStep = (typeof TYPE_STEPS)[number]
28
+
29
+ /** The utility class per step (`TYPE_SCALE.small` → `"text-small"`). */
30
+ export const TYPE_SCALE: Readonly<Record<TypeStep, `text-${TypeStep}`>> = {
31
+ title: "text-title",
32
+ section: "text-section",
33
+ body: "text-body",
34
+ dense: "text-dense",
35
+ small: "text-small",
36
+ }
37
+
38
+ /** The smallest text the kit renders, in CSS px (CI §4 "klein"). */
39
+ export const TYPE_FLOOR_PX = 13
40
+
41
+ /**
42
+ * A caption above a value or a column: table heads, KPI labels, group
43
+ * labels. 13 px semibold in normal case — the CI floor, where these used to
44
+ * be 10–11 px uppercase. Typography only: add the colour
45
+ * (`text-muted-foreground`) at the call site.
46
+ */
47
+ export const MICRO_LABEL = "text-small font-semibold"
package/src/lib/utils.ts CHANGED
@@ -1,5 +1,16 @@
1
1
  import { type ClassValue, clsx } from "clsx"
2
- import { twMerge } from "tailwind-merge"
2
+ import { extendTailwindMerge } from "tailwind-merge"
3
+ import { TYPE_STEPS } from "./typography.js"
4
+
5
+ /**
6
+ * tailwind-merge that knows the kit's type scale. Out of the box it reads
7
+ * an unknown `text-small` as a text COLOUR and drops it next to
8
+ * `text-muted-foreground`; registered as font sizes, `text-small` conflicts
9
+ * only with other sizes (`text-sm`, `text-xs`), as it should.
10
+ */
11
+ const twMerge = extendTailwindMerge({
12
+ extend: { theme: { text: [...TYPE_STEPS] } },
13
+ })
3
14
 
4
15
  export function cn(...inputs: ClassValue[]) {
5
16
  return twMerge(clsx(inputs))
@@ -9,6 +9,7 @@ export { TOOLKIT_MESSAGES, formatCount, resolveToolkitMessages } from "./toolkit
9
9
  export type {
10
10
  BuilderMessages,
11
11
  CommonMessages,
12
+ FilterBarMessages,
12
13
  ListFooterMessages,
13
14
  PropsSheetMessages,
14
15
  RendererMessages,
@@ -14,8 +14,16 @@ export interface CommonMessages {
14
14
  details: string
15
15
  /** Accessible name of a toast's close button. */
16
16
  dismiss: string
17
- /** Accessible name of the toast region. */
17
+ /**
18
+ * @deprecated No longer rendered: the toast region is a plain live region
19
+ * with fixed attributes and takes no name. Kept so a catalog that sets it
20
+ * still type-checks.
21
+ */
18
22
  notifications: string
23
+ /** Title of a widget's error state when its data could not be loaded. */
24
+ loadFailed: string
25
+ /** The line under {@link CommonMessages.loadFailed}: what you can do (a retry follows). */
26
+ loadFailedHint: string
19
27
  }
20
28
 
21
29
  /** Strings of the `McpAppView` chrome (placeholder, error state, toolbar, step errors). */
@@ -47,6 +55,21 @@ export interface ViewMessages {
47
55
  errorHintNoRetry: string
48
56
  /** Retry button of the error state and of the step-error alert. */
49
57
  retry: string
58
+ /**
59
+ * Title of the notice shown instead of the view when the tool ran, the chat
60
+ * did not pass its result to the view, and the view must not run it again
61
+ * on its own (the recovery policy forbids it). Nothing failed.
62
+ */
63
+ blockedTitle: string
64
+ /** The line under {@link ViewMessages.blockedTitle} when the notice offers to load the view. */
65
+ blockedHint: string
66
+ /**
67
+ * The line under {@link ViewMessages.blockedTitle} when the tool writes, so
68
+ * the view offers no button that would run it again: what you can do instead.
69
+ */
70
+ blockedHintNoRetry: string
71
+ /** Button of that notice: loads the view by running the (non-writing) tool again. */
72
+ blockedRetry: string
50
73
  /** Summary of the error's technical-details disclosure. */
51
74
  errorDetails: string
52
75
  /** Title of the alert that lists the data steps that failed. */
@@ -61,6 +84,14 @@ export interface ViewMessages {
61
84
  fullscreenFailed: string
62
85
  /** Toast line under {@link ViewMessages.fullscreenFailed}: what you can do. */
63
86
  fullscreenFailedHint: string
87
+ /**
88
+ * The line under the toolbar title of a view that loaded its data again
89
+ * itself (the host did not pass the original result along, or the user
90
+ * retried or refreshed), with the time pre-formatted (`formatClockTime`, in
91
+ * the language of these words). It must carry its meaning in its own
92
+ * words: there is no tooltip, so touch and keyboard users read only this.
93
+ */
94
+ dataAsOf: (time: string) => string
64
95
  }
65
96
 
66
97
  /** Strings of `ListFooter`. */
@@ -71,6 +102,31 @@ export interface ListFooterMessages {
71
102
  defaultNoun: string
72
103
  loadMore: string
73
104
  loadingMore: string
105
+ /** Status while a new first page is in flight over the rows on screen. */
106
+ updating: string
107
+ /**
108
+ * Status at zero rows, for screen readers only (the caller's empty state is
109
+ * what you see): a search that finds nothing is announced like any count.
110
+ */
111
+ noResults: string
112
+ /** Title when a new first page failed and the previous rows stay on screen. */
113
+ refreshFailed: string
114
+ /** The line under {@link ListFooterMessages.refreshFailed}: what you see and can do. */
115
+ refreshFailedHint: string
116
+ /** Title when loading the next page failed. */
117
+ loadMoreFailed: string
118
+ /** The line under {@link ListFooterMessages.loadMoreFailed}: what you see and can do. */
119
+ loadMoreFailedHint: string
120
+ }
121
+
122
+ /** Strings of `FilterBar`. */
123
+ export interface FilterBarMessages {
124
+ /** Placeholder of the search input. */
125
+ searchPlaceholder: string
126
+ /** Accessible name of the search input (a placeholder is no label). */
127
+ searchLabel: string
128
+ /** Accessible name of the chip group. */
129
+ chipsLabel: string
74
130
  }
75
131
 
76
132
  /** Strings of the widget renderer's fallbacks. */
@@ -89,13 +145,70 @@ export interface BuilderMessages {
89
145
  builderBadge: string
90
146
  previewBadge: string
91
147
  catalogue: string
148
+ /** Toolbar button that opens the save dialog: saves the draft as a dashboard. */
92
149
  save: string
150
+ /**
151
+ * @deprecated Since 2.8 the builder's commit button is Apply
152
+ * ({@link BuilderMessages.apply}). An override of `done`, in the builder's
153
+ * `labels` or a `LocaleProvider`'s `toolkitMessages`, still labels it unless
154
+ * the same override sets `apply`.
155
+ */
93
156
  done: string
157
+ /** Primary action: show the edited view in place and leave the builder (saves nothing). */
158
+ apply: string
159
+ /** Tooltip of {@link BuilderMessages.apply}: what it does, and that it saves nothing. */
160
+ applyHint: string
161
+ /** Leave the builder without the edits: the view stays as it was before editing. */
162
+ discard: string
163
+ /** Tooltip of {@link BuilderMessages.discard}. */
164
+ discardHint: string
165
+ /**
166
+ * Tooltip of {@link BuilderMessages.discard} in a builder without a view to
167
+ * apply to (no `onExit`): Discard resets the draft in place.
168
+ */
169
+ discardHintStandalone: string
170
+ /** Tooltip of {@link BuilderMessages.save}: what a dashboard is for. */
171
+ saveHint: string
172
+ /**
173
+ * Marker next to the title while the draft has changes that would be lost:
174
+ * neither the view before editing nor a saved dashboard holds them.
175
+ */
176
+ unsavedChanges: string
177
+ /** Title of the confirmation before unsaved changes are discarded. */
178
+ discardDialogTitle: string
179
+ /** What discarding does to the view, when no saved dashboard holds the changes. */
180
+ discardDialogDescription: string
181
+ /** What discarding does to the view, when a saved dashboard holds the changes. */
182
+ discardDialogDescriptionSaved: string
183
+ /** Safe choice of the discard confirmation (it keeps the draft). */
184
+ keepEditing: string
185
+ /** Destructive choice of the discard confirmation. */
186
+ discardConfirm: string
187
+ /** Toggle that shows the technical parts: data sources, catalogue, ids. */
188
+ advanced: string
189
+ /** Tooltip of {@link BuilderMessages.advanced}: what it shows. */
190
+ advancedHint: string
191
+ /** Accessible name of a tab's rename button, with the tab's label. */
192
+ renameTabNamed: (label: string) => string
193
+ /** Accessible name of a tab's remove button, with the tab's label. */
194
+ removeTabNamed: (label: string) => string
195
+ /** Marks the row that receives the next element added from the list. */
196
+ rowTarget: string
197
+ /** Lead word of a step's output line ("provides …"), next to {@link BuilderMessages.catalogueNeedsKeys}. */
198
+ stepProvides: string
199
+ /** Accessible name of a key's value field, with the key name (or none yet). */
200
+ keyValueFor: (key: string) => string
94
201
  viewLayoutTab: string
95
202
  viewPipelineTab: string
96
203
  viewPreviewTab: string
97
204
  saveDialogTitle: string
205
+ /** What the save dialog does, and that Apply (not Save) changes the view. */
98
206
  saveDialogDescription: string
207
+ /**
208
+ * {@link BuilderMessages.saveDialogDescription} in a builder without a view
209
+ * to apply to (no `onExit`): no Apply to point to.
210
+ */
211
+ saveDialogDescriptionStandalone: string
99
212
  saveNameLabel: string
100
213
  saveDescriptionLabel: string
101
214
  saveConfirm: string
@@ -115,6 +228,9 @@ export interface BuilderMessages {
115
228
  statusPending: string
116
229
  statusRefreshing: string
117
230
  paletteHeader: string
231
+ /** Status line of the palette while the first catalogue answer is on its way. */
232
+ paletteLoading: string
233
+ /** The palette has no element (the catalogue answered with none). */
118
234
  paletteEmpty: string
119
235
  canvasEmpty: string
120
236
  canvasDropHint: string
@@ -213,7 +329,7 @@ export interface ToolkitMessages {
213
329
  common: CommonMessages
214
330
  view: ViewMessages
215
331
  listFooter: ListFooterMessages
216
- filterBar: { searchPlaceholder: string }
332
+ filterBar: FilterBarMessages
217
333
  pills: { live: string }
218
334
  renderer: RendererMessages
219
335
  builder: BuilderMessages
@@ -13,6 +13,8 @@ export const de: ToolkitMessages = {
13
13
  details: "Details",
14
14
  dismiss: "Hinweis schließen",
15
15
  notifications: "Hinweise",
16
+ loadFailed: "Der Inhalt konnte nicht geladen werden",
17
+ loadFailedHint: "Versuch es noch mal. Klappt es wieder nicht, frag im Chat nach.",
16
18
  },
17
19
  view: {
18
20
  loading: "Ansicht wird geladen…",
@@ -27,6 +29,11 @@ export const de: ToolkitMessages = {
27
29
  errorHint: "Versuch es noch mal. Klappt es wieder nicht, frag im Chat nach.",
28
30
  errorHintNoRetry: "Frag im Chat noch mal nach dieser Ansicht.",
29
31
  retry: "Erneut versuchen",
32
+ blockedTitle: "Der Chat hat das Ergebnis nicht an die Ansicht weitergegeben",
33
+ blockedHint: "Lade die Ansicht selbst oder frag im Chat nach dem aktuellen Stand.",
34
+ blockedHintNoRetry:
35
+ "Die Aktion ist schon gelaufen, deshalb startet die Ansicht sie nicht noch mal. Frag im Chat nach dem aktuellen Stand.",
36
+ blockedRetry: "Ansicht laden",
30
37
  errorDetails: "Details",
31
38
  stepErrorsTitle: "Ein Teil der Daten konnte nicht geladen werden",
32
39
  stepErrorsHint: "Versuch es noch mal, um die fehlenden Daten zu laden.",
@@ -34,14 +41,21 @@ export const de: ToolkitMessages = {
34
41
  refreshFailedHint: "Du siehst den zuletzt geladenen Stand. Versuch es gleich noch mal.",
35
42
  fullscreenFailed: "Die Darstellung ließ sich nicht umschalten.",
36
43
  fullscreenFailedHint: "Die Ansicht bleibt, wie sie ist. Versuch es gleich noch mal.",
44
+ dataAsOf: (time) => `Neu geladen um ${time} Uhr`,
37
45
  },
38
46
  listFooter: {
39
47
  showing: ({ shown, total, noun }) => `Zeigt ${shown} von ${total} ${noun}`.trimEnd(),
40
48
  defaultNoun: "Zeilen",
41
49
  loadMore: "Mehr laden",
42
50
  loadingMore: "Wird geladen…",
51
+ updating: "Wird aktualisiert…",
52
+ noResults: "Keine Einträge",
53
+ refreshFailed: "Die Liste konnte nicht aktualisiert werden",
54
+ refreshFailedHint: "Du siehst das vorherige Ergebnis. Versuch es gleich noch mal.",
55
+ loadMoreFailed: "Weitere Einträge konnten nicht geladen werden",
56
+ loadMoreFailedHint: "Die Einträge oben sind aktuell. Versuch es gleich noch mal.",
43
57
  },
44
- filterBar: { searchPlaceholder: "Filtern…" },
58
+ filterBar: { searchPlaceholder: "Filtern…", searchLabel: "Filtern", chipsLabel: "Filter" },
45
59
  pills: { live: "Live" },
46
60
  renderer: {
47
61
  widgetUnavailable: "Dieses Element ist in dieser Version nicht verfügbar.",
@@ -53,13 +67,37 @@ export const de: ToolkitMessages = {
53
67
  builderBadge: "Bearbeitung",
54
68
  previewBadge: "Vorschau",
55
69
  catalogue: "Katalog",
56
- save: "Speichern",
70
+ save: "Als Dashboard speichern",
57
71
  done: "Fertig",
72
+ apply: "Übernehmen",
73
+ applyHint: "Zeigt deine Änderungen in dieser Ansicht und speichert nichts.",
74
+ discard: "Verwerfen",
75
+ discardHint: "Beendet die Bearbeitung. Die Ansicht bleibt, wie sie war.",
76
+ discardHintStandalone: "Setzt deine Änderungen zurück.",
77
+ saveHint: "Speichert das Layout als Dashboard, das du später wieder öffnen kannst.",
78
+ unsavedChanges: "Ungespeicherte Änderungen",
79
+ discardDialogTitle: "Änderungen verwerfen?",
80
+ discardDialogDescription:
81
+ "Deine Änderungen an dieser Ansicht gehen verloren. Die Ansicht bleibt, wie sie vor dem Bearbeiten war.",
82
+ discardDialogDescriptionSaved:
83
+ "Die Ansicht springt auf den Stand vor dem Bearbeiten zurück. Dein gespeichertes Dashboard behält deine Änderungen.",
84
+ keepEditing: "Weiter bearbeiten",
85
+ discardConfirm: "Änderungen verwerfen",
86
+ advanced: "Erweitert",
87
+ advancedHint: "Zeigt Datenquellen, Katalog und technische IDs.",
88
+ renameTabNamed: (label) => `Tab „${label}“ umbenennen`,
89
+ removeTabNamed: (label) => `Tab „${label}“ entfernen`,
90
+ rowTarget: "Neue Elemente landen hier",
91
+ stepProvides: "liefert",
92
+ keyValueFor: (key) => (key ? `Wert von ${key}` : "Wert"),
58
93
  viewLayoutTab: "Layout",
59
94
  viewPipelineTab: "Datenquellen",
60
95
  viewPreviewTab: "Vorschau",
61
- saveDialogTitle: "Dashboard speichern",
62
- saveDialogDescription: "Speichert das Layout zusammen mit den Datenquellen, die es füllen.",
96
+ saveDialogTitle: "Als Dashboard speichern",
97
+ saveDialogDescription:
98
+ "Speichert das Layout mit seinen Datenquellen als Dashboard, das du später wieder öffnen kannst. Diese Ansicht änderst du mit „Übernehmen“.",
99
+ saveDialogDescriptionStandalone:
100
+ "Speichert das Layout mit seinen Datenquellen als Dashboard, das du später wieder öffnen kannst.",
63
101
  saveNameLabel: "Name",
64
102
  saveDescriptionLabel: "Beschreibung",
65
103
  saveConfirm: "Dashboard speichern",
@@ -76,10 +114,11 @@ export const de: ToolkitMessages = {
76
114
  emptyKeys: "Noch keine Schlüssel.",
77
115
  emptySteps: "Noch keine Schritte.",
78
116
  statusUpToDate: "Aktuell",
79
- statusPending: "Wird gleich übernommen…",
80
- statusRefreshing: "Wird übernommen…",
117
+ statusPending: "Wird gleich aktualisiert…",
118
+ statusRefreshing: "Wird aktualisiert…",
81
119
  paletteHeader: "Elemente",
82
- paletteEmpty: "Noch keine Elemente verfügbar. Füg einen Schlüssel oder einen Schritt hinzu.",
120
+ paletteLoading: "Elemente werden geladen…",
121
+ paletteEmpty: "Noch keine Elemente verfügbar. Elemente erscheinen, sobald ihre Daten da sind.",
83
122
  canvasEmpty: "Zieh ein Element hierher oder klick eins in der Liste an.",
84
123
  canvasDropHint: "Zum Hinzufügen loslassen",
85
124
  addRow: "Zeile hinzufügen",
@@ -119,9 +158,9 @@ export const de: ToolkitMessages = {
119
158
  saveNamePlaceholder: "Name des Dashboards",
120
159
  saveDescriptionPlaceholder: "Optional",
121
160
  saved: (name) => `Dashboard „${name}“ gespeichert.`,
122
- renameHint: "Doppelklick auf einen Tab benennt ihn um.",
123
- renameTitle: "Doppelklicken zum Umbenennen",
124
- autoApplies: "Änderungen gelten sofort",
161
+ renameHint: "Einen Tab benennst du mit F2, per Doppelklick oder über den Stift um.",
162
+ renameTitle: "F2 oder Doppelklick zum Umbenennen",
163
+ autoApplies: "Änderungen erscheinen sofort in der Vorschau",
125
164
  noMoreKeys: "Keine weiteren Schlüssel verfügbar.",
126
165
  parsedType: "Erkannter Typ",
127
166
  valueType: (code) =>