@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.
- package/README.md +7 -4
- package/dist/app/adapt-data-widget.d.ts +1 -22
- package/dist/app/adapt-data-widget.d.ts.map +1 -1
- package/dist/app/adapt-data-widget.js +1 -35
- package/dist/app/adapt-data-widget.js.map +1 -1
- package/dist/app/builder/BuilderBanners.js +1 -1
- package/dist/app/builder/BuilderBanners.js.map +1 -1
- package/dist/app/builder/CanvasRow.d.ts +4 -2
- package/dist/app/builder/CanvasRow.d.ts.map +1 -1
- package/dist/app/builder/CanvasRow.js +21 -7
- package/dist/app/builder/CanvasRow.js.map +1 -1
- package/dist/app/builder/CatalogueSheet.d.ts.map +1 -1
- package/dist/app/builder/CatalogueSheet.js +11 -4
- package/dist/app/builder/CatalogueSheet.js.map +1 -1
- package/dist/app/builder/CellPropsSheet.d.ts +7 -3
- package/dist/app/builder/CellPropsSheet.d.ts.map +1 -1
- package/dist/app/builder/CellPropsSheet.js +10 -3
- package/dist/app/builder/CellPropsSheet.js.map +1 -1
- package/dist/app/builder/DiscardDialog.d.ts +18 -0
- package/dist/app/builder/DiscardDialog.d.ts.map +1 -0
- package/dist/app/builder/DiscardDialog.js +18 -0
- package/dist/app/builder/DiscardDialog.js.map +1 -0
- package/dist/app/builder/LayoutSurface.d.ts +33 -9
- package/dist/app/builder/LayoutSurface.d.ts.map +1 -1
- package/dist/app/builder/LayoutSurface.js +74 -23
- package/dist/app/builder/LayoutSurface.js.map +1 -1
- package/dist/app/builder/PipelineStrip.d.ts +2 -1
- package/dist/app/builder/PipelineStrip.d.ts.map +1 -1
- package/dist/app/builder/PipelineStrip.js +26 -13
- package/dist/app/builder/PipelineStrip.js.map +1 -1
- package/dist/app/builder/SaveDialog.d.ts +9 -1
- package/dist/app/builder/SaveDialog.d.ts.map +1 -1
- package/dist/app/builder/SaveDialog.js +8 -2
- package/dist/app/builder/SaveDialog.js.map +1 -1
- package/dist/app/builder/Toolbar.d.ts +12 -4
- package/dist/app/builder/Toolbar.d.ts.map +1 -1
- package/dist/app/builder/Toolbar.js +18 -7
- package/dist/app/builder/Toolbar.js.map +1 -1
- package/dist/app/builder/Workspace.d.ts +23 -3
- package/dist/app/builder/Workspace.d.ts.map +1 -1
- package/dist/app/builder/Workspace.js +58 -8
- package/dist/app/builder/Workspace.js.map +1 -1
- package/dist/app/builder/builder-model.d.ts +143 -1
- package/dist/app/builder/builder-model.d.ts.map +1 -1
- package/dist/app/builder/builder-model.js +191 -1
- package/dist/app/builder/builder-model.js.map +1 -1
- package/dist/app/builder/reveal.d.ts +10 -0
- package/dist/app/builder/reveal.d.ts.map +1 -0
- package/dist/app/builder/reveal.js +10 -0
- package/dist/app/builder/reveal.js.map +1 -0
- package/dist/app/builder/use-builder-catalogue.d.ts +4 -1
- package/dist/app/builder/use-builder-catalogue.d.ts.map +1 -1
- package/dist/app/builder/use-builder-catalogue.js +44 -17
- package/dist/app/builder/use-builder-catalogue.js.map +1 -1
- package/dist/app/builder/use-builder-session.d.ts +30 -0
- package/dist/app/builder/use-builder-session.d.ts.map +1 -0
- package/dist/app/builder/use-builder-session.js +58 -0
- package/dist/app/builder/use-builder-session.js.map +1 -0
- package/dist/app/builder/use-display-resolver.d.ts +17 -0
- package/dist/app/builder/use-display-resolver.d.ts.map +1 -0
- package/dist/app/builder/use-display-resolver.js +16 -0
- package/dist/app/builder/use-display-resolver.js.map +1 -0
- package/dist/app/index.d.ts +8 -3
- package/dist/app/index.d.ts.map +1 -1
- package/dist/app/index.js +8 -2
- package/dist/app/index.js.map +1 -1
- package/dist/app/layout-builder.d.ts +13 -25
- package/dist/app/layout-builder.d.ts.map +1 -1
- package/dist/app/layout-builder.js +75 -81
- package/dist/app/layout-builder.js.map +1 -1
- package/dist/app/mcp-app-view-chrome.d.ts +12 -3
- package/dist/app/mcp-app-view-chrome.d.ts.map +1 -1
- package/dist/app/mcp-app-view-chrome.js +21 -5
- package/dist/app/mcp-app-view-chrome.js.map +1 -1
- package/dist/app/mcp-app-view-states.d.ts +11 -3
- package/dist/app/mcp-app-view-states.d.ts.map +1 -1
- package/dist/app/mcp-app-view-states.js +29 -8
- package/dist/app/mcp-app-view-states.js.map +1 -1
- package/dist/app/mcp-app-view.d.ts +33 -1
- package/dist/app/mcp-app-view.d.ts.map +1 -1
- package/dist/app/mcp-app-view.js +181 -127
- package/dist/app/mcp-app-view.js.map +1 -1
- package/dist/app/mcp-toolkit-app.d.ts +6 -1
- package/dist/app/mcp-toolkit-app.d.ts.map +1 -1
- package/dist/app/mcp-toolkit-app.js +8 -1
- package/dist/app/mcp-toolkit-app.js.map +1 -1
- package/dist/app/mcp-use-host-bridge.d.ts +15 -6
- package/dist/app/mcp-use-host-bridge.d.ts.map +1 -1
- package/dist/app/mcp-use-host-bridge.js +51 -22
- package/dist/app/mcp-use-host-bridge.js.map +1 -1
- package/dist/app/model-context.d.ts +71 -0
- package/dist/app/model-context.d.ts.map +1 -0
- package/dist/app/model-context.js +101 -0
- package/dist/app/model-context.js.map +1 -0
- package/dist/app/use-build-mode-focus.d.ts +33 -0
- package/dist/app/use-build-mode-focus.d.ts.map +1 -0
- package/dist/app/use-build-mode-focus.js +59 -0
- package/dist/app/use-build-mode-focus.js.map +1 -0
- package/dist/app/use-view-actions.d.ts +31 -0
- package/dist/app/use-view-actions.d.ts.map +1 -0
- package/dist/app/use-view-actions.js +81 -0
- package/dist/app/use-view-actions.js.map +1 -0
- package/dist/app/use-view-lifecycle.d.ts +4 -0
- package/dist/app/use-view-lifecycle.d.ts.map +1 -1
- package/dist/app/use-view-lifecycle.js +2 -0
- package/dist/app/use-view-lifecycle.js.map +1 -1
- package/dist/app/view-lifecycle.d.ts +80 -4
- package/dist/app/view-lifecycle.d.ts.map +1 -1
- package/dist/app/view-lifecycle.js +90 -3
- package/dist/app/view-lifecycle.js.map +1 -1
- package/dist/app/widget-fixture.d.ts +10 -3
- package/dist/app/widget-fixture.d.ts.map +1 -1
- package/dist/app/widget-fixture.js +21 -8
- package/dist/app/widget-fixture.js.map +1 -1
- package/dist/app/widget-props-sheet.d.ts +3 -1
- package/dist/app/widget-props-sheet.d.ts.map +1 -1
- package/dist/app/widget-props-sheet.js +22 -10
- package/dist/app/widget-props-sheet.js.map +1 -1
- package/dist/app/widget-renderer.js +1 -1
- package/dist/app/widget-renderer.js.map +1 -1
- package/dist/components/DrillButton.d.ts +9 -6
- package/dist/components/DrillButton.d.ts.map +1 -1
- package/dist/components/DrillButton.js +8 -6
- package/dist/components/DrillButton.js.map +1 -1
- package/dist/components/EmptyState.d.ts.map +1 -1
- package/dist/components/EmptyState.js +4 -2
- package/dist/components/EmptyState.js.map +1 -1
- package/dist/components/ErrorState.d.ts +5 -2
- package/dist/components/ErrorState.d.ts.map +1 -1
- package/dist/components/ErrorState.js +25 -8
- package/dist/components/ErrorState.js.map +1 -1
- package/dist/components/FilterBar.d.ts +15 -4
- package/dist/components/FilterBar.d.ts.map +1 -1
- package/dist/components/FilterBar.js +11 -6
- package/dist/components/FilterBar.js.map +1 -1
- package/dist/components/KpiGrid.d.ts +66 -21
- package/dist/components/KpiGrid.d.ts.map +1 -1
- package/dist/components/KpiGrid.js +101 -34
- package/dist/components/KpiGrid.js.map +1 -1
- package/dist/components/ListFooter.d.ts +31 -4
- package/dist/components/ListFooter.d.ts.map +1 -1
- package/dist/components/ListFooter.js +30 -11
- package/dist/components/ListFooter.js.map +1 -1
- package/dist/components/PagedListFooter.d.ts +57 -0
- package/dist/components/PagedListFooter.d.ts.map +1 -0
- package/dist/components/PagedListFooter.js +27 -0
- package/dist/components/PagedListFooter.js.map +1 -0
- package/dist/components/Pills.d.ts +27 -7
- package/dist/components/Pills.d.ts.map +1 -1
- package/dist/components/Pills.js +21 -6
- package/dist/components/Pills.js.map +1 -1
- package/dist/components/SectionHeading.d.ts +3 -1
- package/dist/components/SectionHeading.d.ts.map +1 -1
- package/dist/components/SectionHeading.js +6 -2
- package/dist/components/SectionHeading.js.map +1 -1
- package/dist/components/Toast.d.ts +9 -3
- package/dist/components/Toast.d.ts.map +1 -1
- package/dist/components/Toast.js +31 -16
- package/dist/components/Toast.js.map +1 -1
- package/dist/components/WidgetHeader.d.ts +34 -10
- package/dist/components/WidgetHeader.d.ts.map +1 -1
- package/dist/components/WidgetHeader.js +11 -6
- package/dist/components/WidgetHeader.js.map +1 -1
- package/dist/hooks/index.d.ts +4 -4
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/tool-result-recovery-model.d.ts +155 -0
- package/dist/hooks/tool-result-recovery-model.d.ts.map +1 -0
- package/dist/hooks/tool-result-recovery-model.js +273 -0
- package/dist/hooks/tool-result-recovery-model.js.map +1 -0
- package/dist/hooks/use-tool-query.d.ts +56 -14
- package/dist/hooks/use-tool-query.d.ts.map +1 -1
- package/dist/hooks/use-tool-query.js +102 -25
- package/dist/hooks/use-tool-query.js.map +1 -1
- package/dist/hooks/use-tool-result-recovery.d.ts +47 -52
- package/dist/hooks/use-tool-result-recovery.d.ts.map +1 -1
- package/dist/hooks/use-tool-result-recovery.js +58 -120
- package/dist/hooks/use-tool-result-recovery.js.map +1 -1
- package/dist/hooks/use-view-data.d.ts +52 -10
- package/dist/hooks/use-view-data.d.ts.map +1 -1
- package/dist/hooks/use-view-data.js +81 -16
- package/dist/hooks/use-view-data.js.map +1 -1
- package/dist/hooks/use-view-tool-query.d.ts +12 -7
- package/dist/hooks/use-view-tool-query.d.ts.map +1 -1
- package/dist/hooks/use-view-tool-query.js +15 -14
- package/dist/hooks/use-view-tool-query.js.map +1 -1
- package/dist/index.d.ts +17 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -6
- package/dist/index.js.map +1 -1
- package/dist/lib/focus-return.d.ts +61 -0
- package/dist/lib/focus-return.d.ts.map +1 -0
- package/dist/lib/focus-return.js +46 -0
- package/dist/lib/focus-return.js.map +1 -0
- package/dist/lib/parse-tool-result.d.ts +23 -1
- package/dist/lib/parse-tool-result.d.ts.map +1 -1
- package/dist/lib/parse-tool-result.js +38 -2
- package/dist/lib/parse-tool-result.js.map +1 -1
- package/dist/lib/toast-model.d.ts +41 -1
- package/dist/lib/toast-model.d.ts.map +1 -1
- package/dist/lib/toast-model.js +67 -1
- package/dist/lib/toast-model.js.map +1 -1
- package/dist/lib/tone-utils.d.ts +58 -6
- package/dist/lib/tone-utils.d.ts.map +1 -1
- package/dist/lib/tone-utils.js +66 -4
- package/dist/lib/tone-utils.js.map +1 -1
- package/dist/lib/tool-query.d.ts +107 -0
- package/dist/lib/tool-query.d.ts.map +1 -0
- package/dist/lib/tool-query.js +182 -0
- package/dist/lib/tool-query.js.map +1 -0
- package/dist/lib/tool-result-observer.d.ts +108 -0
- package/dist/lib/tool-result-observer.d.ts.map +1 -0
- package/dist/lib/tool-result-observer.js +158 -0
- package/dist/lib/tool-result-observer.js.map +1 -0
- package/dist/lib/typography.d.ts +37 -0
- package/dist/lib/typography.d.ts.map +1 -0
- package/dist/lib/typography.js +41 -0
- package/dist/lib/typography.js.map +1 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +11 -1
- package/dist/lib/utils.js.map +1 -1
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/index.d.ts.map +1 -1
- package/dist/locale/message-types.d.ts +117 -4
- package/dist/locale/message-types.d.ts.map +1 -1
- package/dist/locale/messages-de.d.ts.map +1 -1
- package/dist/locale/messages-de.js +44 -10
- package/dist/locale/messages-de.js.map +1 -1
- package/dist/locale/messages-en.d.ts.map +1 -1
- package/dist/locale/messages-en.js +44 -10
- package/dist/locale/messages-en.js.map +1 -1
- package/dist/locale/toolkit-messages.d.ts +19 -1
- package/dist/locale/toolkit-messages.d.ts.map +1 -1
- package/dist/locale/toolkit-messages.js +54 -1
- package/dist/locale/toolkit-messages.js.map +1 -1
- package/dist/primitives/alert.d.ts +1 -1
- package/dist/primitives/alert.d.ts.map +1 -1
- package/dist/primitives/alert.js +2 -0
- package/dist/primitives/alert.js.map +1 -1
- package/dist/primitives/badge.d.ts +1 -1
- package/dist/primitives/badge.d.ts.map +1 -1
- package/dist/primitives/badge.js +9 -4
- package/dist/primitives/badge.js.map +1 -1
- package/dist/primitives/button.d.ts +1 -1
- package/dist/primitives/button.js +1 -1
- package/dist/primitives/button.js.map +1 -1
- package/dist/primitives/dialog.d.ts +1 -1
- package/dist/primitives/dialog.d.ts.map +1 -1
- package/dist/primitives/dialog.js +10 -3
- package/dist/primitives/dialog.js.map +1 -1
- package/dist/primitives/select.js +1 -1
- package/dist/primitives/select.js.map +1 -1
- package/dist/primitives/sheet.d.ts +1 -1
- package/dist/primitives/sheet.d.ts.map +1 -1
- package/dist/primitives/sheet.js +6 -2
- package/dist/primitives/sheet.js.map +1 -1
- package/dist/providers/query-provider.d.ts +32 -1
- package/dist/providers/query-provider.d.ts.map +1 -1
- package/dist/providers/query-provider.js +53 -4
- package/dist/providers/query-provider.js.map +1 -1
- package/dist/render-cases-primitives.js +1 -1
- package/dist/render-cases-primitives.js.map +1 -1
- package/dist/render-cases.d.ts.map +1 -1
- package/dist/render-cases.js +30 -6
- package/dist/render-cases.js.map +1 -1
- package/dist/render-effects.d.ts +42 -0
- package/dist/render-effects.d.ts.map +1 -0
- package/dist/render-effects.js +81 -0
- package/dist/render-effects.js.map +1 -0
- package/dist/theme/create-theme.d.ts +19 -1
- package/dist/theme/create-theme.d.ts.map +1 -1
- package/dist/theme/create-theme.js +15 -0
- package/dist/theme/create-theme.js.map +1 -1
- package/package.json +5 -4
- package/src/app/adapt-data-widget.tsx +2 -42
- package/src/app/builder/BuilderBanners.tsx +1 -1
- package/src/app/builder/CanvasRow.tsx +63 -17
- package/src/app/builder/CatalogueSheet.tsx +50 -29
- package/src/app/builder/CellPropsSheet.tsx +17 -2
- package/src/app/builder/DiscardDialog.tsx +59 -0
- package/src/app/builder/LayoutSurface.tsx +206 -66
- package/src/app/builder/PipelineStrip.tsx +253 -153
- package/src/app/builder/SaveDialog.tsx +14 -2
- package/src/app/builder/Toolbar.tsx +144 -59
- package/src/app/builder/Workspace.tsx +226 -58
- package/src/app/builder/builder-model.ts +341 -2
- package/src/app/builder/builder-model.ux.test.ts +456 -0
- package/src/app/builder/builder-ux.test.tsx +844 -0
- package/src/app/builder/reveal.ts +10 -0
- package/src/app/builder/use-builder-catalogue.ts +56 -19
- package/src/app/builder/use-builder-session.ts +68 -0
- package/src/app/builder/use-display-resolver.ts +24 -0
- package/src/app/index.ts +12 -2
- package/src/app/layout-builder.tsx +178 -191
- package/src/app/mcp-app-view-chrome.test.tsx +141 -1
- package/src/app/mcp-app-view-chrome.tsx +56 -6
- package/src/app/mcp-app-view-states.tsx +51 -11
- package/src/app/mcp-app-view.effects.test.tsx +292 -0
- package/src/app/mcp-app-view.test.tsx +222 -2
- package/src/app/mcp-app-view.tsx +267 -117
- package/src/app/mcp-toolkit-app.test.tsx +40 -0
- package/src/app/mcp-toolkit-app.tsx +8 -1
- package/src/app/mcp-use-host-bridge.test.tsx +180 -0
- package/src/app/mcp-use-host-bridge.tsx +67 -24
- package/src/app/model-context.test.tsx +116 -0
- package/src/app/model-context.tsx +125 -0
- package/src/app/use-build-mode-focus.ts +62 -0
- package/src/app/use-view-actions.ts +89 -0
- package/src/app/use-view-lifecycle.ts +6 -0
- package/src/app/view-lifecycle.test.ts +216 -0
- package/src/app/view-lifecycle.ts +165 -5
- package/src/app/widget-fixture.effects.test.tsx +51 -0
- package/src/app/widget-fixture.render.test.tsx +81 -0
- package/src/app/widget-fixture.tsx +34 -11
- package/src/app/widget-props-sheet.tsx +57 -16
- package/src/app/widget-renderer.tsx +1 -1
- package/src/components/DrillButton.tsx +23 -10
- package/src/components/EmptyState.tsx +6 -4
- package/src/components/ErrorState.tsx +31 -9
- package/src/components/FilterBar.test.tsx +82 -0
- package/src/components/FilterBar.tsx +52 -26
- package/src/components/KpiGrid.test.tsx +279 -0
- package/src/components/KpiGrid.tsx +297 -90
- package/src/components/ListFooter.test.tsx +116 -0
- package/src/components/ListFooter.tsx +102 -15
- package/src/components/PagedListFooter.test.tsx +140 -0
- package/src/components/PagedListFooter.tsx +107 -0
- package/src/components/Pills.test.tsx +77 -0
- package/src/components/Pills.tsx +63 -10
- package/src/components/SectionHeading.tsx +9 -3
- package/src/components/Toast.tsx +37 -19
- package/src/components/WidgetHeader.test.tsx +78 -0
- package/src/components/WidgetHeader.tsx +63 -16
- package/src/components/feedback-states.test.tsx +98 -9
- package/src/components/tone-figures.test.tsx +8 -4
- package/src/hooks/index.ts +6 -3
- package/src/hooks/tool-result-recovery-model.test.ts +744 -0
- package/src/hooks/tool-result-recovery-model.ts +418 -0
- package/src/hooks/use-tool-query.effects.test.tsx +205 -0
- package/src/hooks/use-tool-query.ts +156 -33
- package/src/hooks/use-tool-result-recovery.effects.test.tsx +141 -0
- package/src/hooks/use-tool-result-recovery.test.ts +3 -4
- package/src/hooks/use-tool-result-recovery.ts +84 -142
- package/src/hooks/use-view-data.test.tsx +118 -9
- package/src/hooks/use-view-data.ts +128 -18
- package/src/hooks/use-view-tool-query.ts +25 -19
- package/src/i18n-coverage.test.tsx +104 -2
- package/src/index.ts +48 -11
- package/src/lib/focus-return.test.ts +288 -0
- package/src/lib/focus-return.ts +96 -0
- package/src/lib/parse-tool-result.test.ts +46 -1
- package/src/lib/parse-tool-result.ts +40 -2
- package/src/lib/toast-model.test.ts +166 -1
- package/src/lib/toast-model.ts +104 -2
- package/src/lib/tone-utils.test.ts +86 -10
- package/src/lib/tone-utils.ts +89 -8
- package/src/lib/tool-query.test.ts +569 -0
- package/src/lib/tool-query.ts +253 -0
- package/src/lib/tool-result-observer.test.ts +296 -0
- package/src/lib/tool-result-observer.ts +211 -0
- package/src/lib/typography.test.ts +45 -0
- package/src/lib/typography.ts +47 -0
- package/src/lib/utils.ts +12 -1
- package/src/locale/index.ts +1 -0
- package/src/locale/message-types.ts +118 -2
- package/src/locale/messages-de.ts +49 -10
- package/src/locale/messages-en.ts +49 -10
- package/src/locale/toolkit-messages.test.ts +133 -0
- package/src/locale/toolkit-messages.ts +63 -2
- package/src/primitives/alert.tsx +3 -0
- package/src/primitives/badge.tsx +9 -4
- package/src/primitives/button.tsx +1 -1
- package/src/primitives/dialog.tsx +10 -1
- package/src/primitives/select.tsx +1 -1
- package/src/primitives/sheet.tsx +7 -0
- package/src/providers/query-provider.test.tsx +154 -0
- package/src/providers/query-provider.tsx +66 -5
- package/src/render-cases-primitives.tsx +1 -1
- package/src/render-cases.tsx +38 -6
- package/src/render-effects.tsx +96 -0
- package/src/theme/cd-tokens.test.ts +3 -1
- package/src/theme/create-theme.test.ts +10 -0
- package/src/theme/create-theme.ts +28 -0
- package/src/theme/theme-css.test.ts +51 -0
- package/src/theme.css +31 -1
- 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 {
|
|
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))
|
package/src/locale/index.ts
CHANGED
|
@@ -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
|
-
/**
|
|
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:
|
|
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: "
|
|
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:
|
|
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
|
|
80
|
-
statusRefreshing: "Wird
|
|
117
|
+
statusPending: "Wird gleich aktualisiert…",
|
|
118
|
+
statusRefreshing: "Wird aktualisiert…",
|
|
81
119
|
paletteHeader: "Elemente",
|
|
82
|
-
|
|
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
|
|
123
|
-
renameTitle: "
|
|
124
|
-
autoApplies: "Änderungen
|
|
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) =>
|