@miragon/mcp-toolkit-ui 2.6.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 +14 -5
- 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.d.ts +7 -2
- package/dist/app/builder/BuilderBanners.d.ts.map +1 -1
- package/dist/app/builder/BuilderBanners.js +8 -3
- 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 +29 -17
- 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 +14 -6
- 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/EmptyHint.d.ts +4 -0
- package/dist/app/builder/EmptyHint.d.ts.map +1 -1
- package/dist/app/builder/EmptyHint.js +6 -1
- package/dist/app/builder/EmptyHint.js.map +1 -1
- 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 +5 -2
- package/dist/app/builder/PipelineStrip.d.ts.map +1 -1
- package/dist/app/builder/PipelineStrip.js +33 -15
- 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 +9 -3
- package/dist/app/builder/SaveDialog.js.map +1 -1
- package/dist/app/builder/Toolbar.d.ts +14 -4
- package/dist/app/builder/Toolbar.d.ts.map +1 -1
- package/dist/app/builder/Toolbar.js +24 -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 +146 -3
- package/dist/app/builder/builder-model.d.ts.map +1 -1
- package/dist/app/builder/builder-model.js +196 -5
- package/dist/app/builder/builder-model.js.map +1 -1
- package/dist/app/builder/labels.d.ts +13 -62
- package/dist/app/builder/labels.d.ts.map +1 -1
- package/dist/app/builder/labels.js +9 -58
- package/dist/app/builder/labels.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/status-chip.d.ts.map +1 -1
- package/dist/app/builder/status-chip.js +3 -2
- package/dist/app/builder/status-chip.js.map +1 -1
- package/dist/app/builder/use-builder-catalogue.d.ts +5 -1
- package/dist/app/builder/use-builder-catalogue.d.ts.map +1 -1
- package/dist/app/builder/use-builder-catalogue.js +50 -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/builder/use-save-dashboard.d.ts +3 -1
- package/dist/app/builder/use-save-dashboard.d.ts.map +1 -1
- package/dist/app/builder/use-save-dashboard.js +3 -1
- package/dist/app/builder/use-save-dashboard.js.map +1 -1
- 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 +18 -25
- package/dist/app/layout-builder.d.ts.map +1 -1
- package/dist/app/layout-builder.js +84 -78
- package/dist/app/layout-builder.js.map +1 -1
- package/dist/app/mcp-app-view-chrome.d.ts +103 -20
- package/dist/app/mcp-app-view-chrome.d.ts.map +1 -1
- package/dist/app/mcp-app-view-chrome.js +125 -40
- package/dist/app/mcp-app-view-chrome.js.map +1 -1
- package/dist/app/mcp-app-view-states.d.ts +23 -0
- package/dist/app/mcp-app-view-states.d.ts.map +1 -0
- package/dist/app/mcp-app-view-states.js +55 -0
- package/dist/app/mcp-app-view-states.js.map +1 -0
- package/dist/app/mcp-app-view.d.ts +72 -5
- package/dist/app/mcp-app-view.d.ts.map +1 -1
- package/dist/app/mcp-app-view.js +241 -141
- package/dist/app/mcp-app-view.js.map +1 -1
- package/dist/app/mcp-toolkit-app.d.ts +8 -2
- package/dist/app/mcp-toolkit-app.d.ts.map +1 -1
- package/dist/app/mcp-toolkit-app.js +33 -4
- 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 +42 -0
- package/dist/app/use-view-lifecycle.d.ts.map +1 -0
- package/dist/app/use-view-lifecycle.js +81 -0
- package/dist/app/use-view-lifecycle.js.map +1 -0
- package/dist/app/view-lifecycle.d.ts +185 -0
- package/dist/app/view-lifecycle.d.ts.map +1 -0
- package/dist/app/view-lifecycle.js +207 -0
- package/dist/app/view-lifecycle.js.map +1 -0
- 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 +6 -10
- package/dist/app/widget-props-sheet.d.ts.map +1 -1
- package/dist/app/widget-props-sheet.js +25 -20
- package/dist/app/widget-props-sheet.js.map +1 -1
- package/dist/app/widget-renderer.d.ts +41 -1
- package/dist/app/widget-renderer.d.ts.map +1 -1
- package/dist/app/widget-renderer.js +82 -31
- 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 +9 -6
- package/dist/components/DrillButton.js.map +1 -1
- package/dist/components/EmptyState.d.ts +33 -0
- package/dist/components/EmptyState.d.ts.map +1 -0
- package/dist/components/EmptyState.js +19 -0
- package/dist/components/EmptyState.js.map +1 -0
- package/dist/components/ErrorState.d.ts +53 -0
- package/dist/components/ErrorState.d.ts.map +1 -0
- package/dist/components/ErrorState.js +77 -0
- package/dist/components/ErrorState.js.map +1 -0
- package/dist/components/FilterBar.d.ts +16 -5
- package/dist/components/FilterBar.d.ts.map +1 -1
- package/dist/components/FilterBar.js +13 -5
- package/dist/components/FilterBar.js.map +1 -1
- package/dist/components/GroupCard.d.ts.map +1 -1
- package/dist/components/GroupCard.js +2 -1
- package/dist/components/GroupCard.js.map +1 -1
- package/dist/components/KpiGrid.d.ts +70 -18
- package/dist/components/KpiGrid.d.ts.map +1 -1
- package/dist/components/KpiGrid.js +112 -23
- package/dist/components/KpiGrid.js.map +1 -1
- package/dist/components/ListFooter.d.ts +32 -4
- package/dist/components/ListFooter.d.ts.map +1 -1
- package/dist/components/ListFooter.js +35 -6
- 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 +36 -12
- package/dist/components/Pills.d.ts.map +1 -1
- package/dist/components/Pills.js +29 -8
- 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 +43 -0
- package/dist/components/Toast.d.ts.map +1 -0
- package/dist/components/Toast.js +106 -0
- package/dist/components/Toast.js.map +1 -0
- 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 +61 -44
- package/dist/hooks/use-tool-result-recovery.d.ts.map +1 -1
- package/dist/hooks/use-tool-result-recovery.js +62 -110
- package/dist/hooks/use-tool-result-recovery.js.map +1 -1
- package/dist/hooks/use-view-data.d.ts +55 -7
- package/dist/hooks/use-view-data.d.ts.map +1 -1
- package/dist/hooks/use-view-data.js +81 -11
- 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 +27 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +29 -7
- 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/focus-ring.d.ts +18 -0
- package/dist/lib/focus-ring.d.ts.map +1 -0
- package/dist/lib/focus-ring.js +18 -0
- package/dist/lib/focus-ring.js.map +1 -0
- package/dist/lib/icon-stroke.d.ts +12 -0
- package/dist/lib/icon-stroke.d.ts.map +1 -0
- package/dist/lib/icon-stroke.js +12 -0
- package/dist/lib/icon-stroke.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 +86 -0
- package/dist/lib/toast-model.d.ts.map +1 -0
- package/dist/lib/toast-model.js +102 -0
- package/dist/lib/toast-model.js.map +1 -0
- package/dist/lib/tone-utils.d.ts +95 -9
- package/dist/lib/tone-utils.d.ts.map +1 -1
- package/dist/lib/tone-utils.js +100 -9
- 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 +3 -1
- package/dist/locale/index.d.ts.map +1 -1
- package/dist/locale/index.js +2 -1
- package/dist/locale/index.js.map +1 -1
- package/dist/locale/locale-provider.d.ts +42 -1
- package/dist/locale/locale-provider.d.ts.map +1 -1
- package/dist/locale/locale-provider.js +44 -3
- package/dist/locale/locale-provider.js.map +1 -1
- package/dist/locale/message-types.d.ts +336 -0
- package/dist/locale/message-types.d.ts.map +1 -0
- package/dist/locale/message-types.js +7 -0
- package/dist/locale/message-types.js.map +1 -0
- package/dist/locale/messages-de.d.ts +9 -0
- package/dist/locale/messages-de.d.ts.map +1 -0
- package/dist/locale/messages-de.js +185 -0
- package/dist/locale/messages-de.js.map +1 -0
- package/dist/locale/messages-en.d.ts +8 -0
- package/dist/locale/messages-en.d.ts.map +1 -0
- package/dist/locale/messages-en.js +184 -0
- package/dist/locale/messages-en.js.map +1 -0
- package/dist/locale/toolkit-messages.d.ts +57 -0
- package/dist/locale/toolkit-messages.d.ts.map +1 -0
- package/dist/locale/toolkit-messages.js +103 -0
- package/dist/locale/toolkit-messages.js.map +1 -0
- package/dist/primitives/alert.d.ts +1 -1
- package/dist/primitives/alert.d.ts.map +1 -1
- package/dist/primitives/alert.js +6 -2
- 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 +19 -6
- package/dist/primitives/badge.js.map +1 -1
- package/dist/primitives/button.d.ts +1 -1
- package/dist/primitives/button.d.ts.map +1 -1
- package/dist/primitives/button.js +12 -8
- package/dist/primitives/button.js.map +1 -1
- package/dist/primitives/card.js +4 -4
- package/dist/primitives/card.js.map +1 -1
- package/dist/primitives/dialog.d.ts +7 -3
- package/dist/primitives/dialog.d.ts.map +1 -1
- package/dist/primitives/dialog.js +22 -8
- package/dist/primitives/dialog.js.map +1 -1
- package/dist/primitives/input.d.ts.map +1 -1
- package/dist/primitives/input.js +4 -1
- package/dist/primitives/input.js.map +1 -1
- package/dist/primitives/scroll-area.js +1 -1
- package/dist/primitives/scroll-area.js.map +1 -1
- package/dist/primitives/select.d.ts.map +1 -1
- package/dist/primitives/select.js +6 -3
- package/dist/primitives/select.js.map +1 -1
- package/dist/primitives/sheet.d.ts +3 -1
- package/dist/primitives/sheet.d.ts.map +1 -1
- package/dist/primitives/sheet.js +17 -7
- package/dist/primitives/sheet.js.map +1 -1
- package/dist/primitives/skeleton.js +1 -1
- package/dist/primitives/skeleton.js.map +1 -1
- package/dist/primitives/switch.d.ts.map +1 -1
- package/dist/primitives/switch.js +2 -1
- package/dist/primitives/switch.js.map +1 -1
- package/dist/primitives/tabs.d.ts.map +1 -1
- package/dist/primitives/tabs.js +5 -3
- package/dist/primitives/tabs.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 +48 -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/render-scan.d.ts +25 -0
- package/dist/render-scan.d.ts.map +1 -0
- package/dist/render-scan.js +66 -0
- package/dist/render-scan.js.map +1 -0
- package/dist/theme/cd-tokens.d.ts +66 -0
- package/dist/theme/cd-tokens.d.ts.map +1 -0
- package/dist/theme/cd-tokens.js +64 -0
- package/dist/theme/cd-tokens.js.map +1 -0
- package/dist/theme/create-theme.d.ts +214 -39
- package/dist/theme/create-theme.d.ts.map +1 -1
- package/dist/theme/create-theme.js +204 -13
- package/dist/theme/create-theme.js.map +1 -1
- package/dist/theme/fonts.d.ts +38 -0
- package/dist/theme/fonts.d.ts.map +1 -0
- package/dist/theme/fonts.js +56 -0
- package/dist/theme/fonts.js.map +1 -0
- package/dist/theme/host-fonts.d.ts +39 -0
- package/dist/theme/host-fonts.d.ts.map +1 -0
- package/dist/theme/host-fonts.js +44 -0
- package/dist/theme/host-fonts.js.map +1 -0
- package/dist/theme/index.d.ts +8 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +5 -1
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/portal-container.d.ts +16 -0
- package/dist/theme/portal-container.d.ts.map +1 -0
- package/dist/theme/portal-container.js +19 -0
- package/dist/theme/portal-container.js.map +1 -0
- package/dist/theme/presets.d.ts +24 -9
- package/dist/theme/presets.d.ts.map +1 -1
- package/dist/theme/presets.js +44 -11
- package/dist/theme/presets.js.map +1 -1
- package/dist/theme/theme-provider.d.ts +27 -9
- package/dist/theme/theme-provider.d.ts.map +1 -1
- package/dist/theme/theme-provider.js +42 -20
- package/dist/theme/theme-provider.js.map +1 -1
- package/package.json +11 -5
- package/src/app/adapt-data-widget.tsx +2 -42
- package/src/app/builder/BuilderBanners.tsx +26 -13
- package/src/app/builder/CanvasRow.tsx +79 -32
- package/src/app/builder/CatalogueSheet.tsx +58 -35
- package/src/app/builder/CellPropsSheet.tsx +17 -2
- package/src/app/builder/DiscardDialog.tsx +59 -0
- package/src/app/builder/EmptyHint.tsx +16 -11
- package/src/app/builder/LayoutSurface.tsx +207 -67
- package/src/app/builder/PipelineStrip.tsx +265 -156
- package/src/app/builder/SaveDialog.tsx +25 -14
- package/src/app/builder/Toolbar.tsx +154 -57
- package/src/app/builder/Workspace.tsx +226 -56
- package/src/app/builder/builder-feedback.test.tsx +75 -0
- package/src/app/builder/builder-model.test.ts +5 -0
- package/src/app/builder/builder-model.ts +346 -6
- 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/labels.ts +15 -121
- package/src/app/builder/reveal.ts +10 -0
- package/src/app/builder/status-chip.tsx +8 -4
- package/src/app/builder/use-builder-catalogue.ts +62 -19
- package/src/app/builder/use-builder-session.ts +68 -0
- package/src/app/builder/use-display-resolver.ts +24 -0
- package/src/app/builder/use-save-dashboard.ts +5 -0
- package/src/app/index.ts +20 -3
- package/src/app/layout-builder.tsx +193 -186
- package/src/app/mcp-app-view-chrome.test.tsx +487 -14
- package/src/app/mcp-app-view-chrome.tsx +328 -100
- package/src/app/mcp-app-view-states.tsx +140 -0
- package/src/app/mcp-app-view.effects.test.tsx +292 -0
- package/src/app/mcp-app-view.test.tsx +478 -0
- package/src/app/mcp-app-view.tsx +447 -190
- package/src/app/mcp-toolkit-app.test.tsx +40 -0
- package/src/app/mcp-toolkit-app.tsx +39 -8
- 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 +122 -0
- package/src/app/view-lifecycle.test.ts +443 -0
- package/src/app/view-lifecycle.ts +334 -0
- 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 +67 -39
- package/src/app/widget-renderer.render.test.tsx +131 -0
- package/src/app/widget-renderer.tsx +136 -38
- package/src/components/DrillButton.tsx +24 -10
- package/src/components/EmptyState.tsx +83 -0
- package/src/components/ErrorState.tsx +204 -0
- package/src/components/FilterBar.test.tsx +82 -0
- package/src/components/FilterBar.tsx +56 -27
- package/src/components/GroupCard.tsx +3 -2
- package/src/components/KpiGrid.test.tsx +279 -0
- package/src/components/KpiGrid.tsx +329 -91
- package/src/components/ListFooter.test.tsx +116 -0
- package/src/components/ListFooter.tsx +110 -12
- 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 +78 -16
- package/src/components/SectionHeading.tsx +9 -3
- package/src/components/Toast.tsx +206 -0
- package/src/components/WidgetHeader.test.tsx +78 -0
- package/src/components/WidgetHeader.tsx +63 -16
- package/src/components/feedback-states.test.tsx +314 -0
- package/src/components/tone-figures.test.tsx +58 -0
- package/src/fonts.css +19 -0
- package/src/globals.css +9 -165
- 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 +28 -5
- package/src/hooks/use-tool-result-recovery.ts +101 -131
- package/src/hooks/use-view-data.test.tsx +169 -0
- package/src/hooks/use-view-data.ts +131 -10
- package/src/hooks/use-view-tool-query.ts +25 -19
- package/src/i18n-coverage.test.tsx +425 -0
- package/src/index.ts +102 -13
- package/src/lib/focus-return.test.ts +288 -0
- package/src/lib/focus-return.ts +96 -0
- package/src/lib/focus-ring.ts +20 -0
- package/src/lib/icon-stroke.test.ts +59 -0
- package/src/lib/icon-stroke.ts +13 -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 +233 -0
- package/src/lib/toast-model.ts +165 -0
- package/src/lib/tone-utils.test.ts +125 -16
- package/src/lib/tone-utils.ts +144 -15
- 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 +14 -1
- package/src/locale/locale-provider.test.tsx +87 -0
- package/src/locale/locale-provider.tsx +90 -3
- package/src/locale/message-types.ts +337 -0
- package/src/locale/messages-de.ts +198 -0
- package/src/locale/messages-en.ts +196 -0
- package/src/locale/toolkit-messages.test.ts +349 -0
- package/src/locale/toolkit-messages.ts +143 -0
- package/src/no-hardcoded-copy.test.ts +432 -0
- package/src/primitives/alert.tsx +7 -2
- package/src/primitives/badge.tsx +19 -7
- package/src/primitives/button.tsx +13 -8
- package/src/primitives/card.tsx +4 -4
- package/src/primitives/dialog.tsx +42 -8
- package/src/primitives/input.tsx +5 -3
- package/src/primitives/scroll-area.tsx +1 -1
- package/src/primitives/select.tsx +7 -4
- package/src/primitives/sheet.tsx +33 -6
- package/src/primitives/skeleton.tsx +1 -1
- package/src/primitives/switch.tsx +4 -2
- package/src/primitives/tabs.tsx +9 -6
- 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 +82 -6
- package/src/render-effects.tsx +96 -0
- package/src/render-scan.ts +75 -0
- package/src/theme/cd-tokens.generated.css +48 -0
- package/src/theme/cd-tokens.test.ts +109 -0
- package/src/theme/cd-tokens.ts +67 -0
- package/src/theme/create-theme.test.ts +253 -5
- package/src/theme/create-theme.ts +341 -41
- package/src/theme/fonts.test.ts +85 -0
- package/src/theme/fonts.ts +72 -0
- package/src/theme/host-fonts.test.ts +135 -0
- package/src/theme/host-fonts.ts +52 -0
- package/src/theme/index.ts +15 -1
- package/src/theme/portal-container.ts +20 -0
- package/src/theme/presets.ts +44 -11
- package/src/theme/theme-css.test.ts +619 -0
- package/src/theme/theme-provider.test.tsx +82 -0
- package/src/theme/theme-provider.tsx +60 -24
- package/src/theme.css +344 -0
- package/ui-catalog.json +783 -49
package/ui-catalog.json
CHANGED
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"props": [
|
|
47
47
|
{
|
|
48
48
|
"name": "variant",
|
|
49
|
-
"type": "\"default\" | \"secondary\" | \"
|
|
49
|
+
"type": "\"default\" | \"secondary\" | \"danger\" | \"success\" | \"warning\" | \"info\" | \"outline\" | \"ghost\" | \"link\" | \"destructive\"",
|
|
50
50
|
"required": false,
|
|
51
|
-
"description": "Visual style. Default 'default'."
|
|
51
|
+
"description": "Visual style. Default 'default'. danger/success/warning/info follow the tone model: tint + foreground text, rim in the tone (TONE_SOFT + TONE_BORDER). 'destructive' is the deprecated name of 'danger'."
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
"name": "className",
|
|
@@ -285,9 +285,9 @@
|
|
|
285
285
|
"props": [
|
|
286
286
|
{
|
|
287
287
|
"name": "variant",
|
|
288
|
-
"type": "\"default\" | \"destructive\"",
|
|
288
|
+
"type": "\"default\" | \"danger\" | \"destructive\"",
|
|
289
289
|
"required": false,
|
|
290
|
-
"description": "Visual style."
|
|
290
|
+
"description": "Visual style. 'danger': tint, rim and icon in the danger colour, foreground text. 'destructive' is its deprecated name. For a failed fetch prefer ErrorState (title, next step, Details, retry)."
|
|
291
291
|
}
|
|
292
292
|
],
|
|
293
293
|
"whenToUse": "Inline notice or error message inside a widget body."
|
|
@@ -396,7 +396,13 @@
|
|
|
396
396
|
"name": "cells",
|
|
397
397
|
"type": "KpiCell[]",
|
|
398
398
|
"required": true,
|
|
399
|
-
"description": "Metric cells
|
|
399
|
+
"description": "Metric cells: { label, value, fraction?, trend?, trendDirection?: 'up'|'down'|'flat', trendTone?, tone?, onClick?, actionHint? }. Flows 1–6 columns (4+ fall back to 2 in narrow frames). A cell with onClick is a button named by its visible label and value; actionHint ('Opens the incidents dashboard') becomes its aria-describedby. ariaLabel is deprecated (it hides the visible label from voice control, WCAG 2.5.3)."
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"name": "variant",
|
|
403
|
+
"type": "'strip' | 'soft'",
|
|
404
|
+
"required": false,
|
|
405
|
+
"description": "'strip' (default): one bordered strip, tone as a dot next to the label. 'soft': a card per cell in its tone's tint and edge (boxed/header don't apply)."
|
|
400
406
|
},
|
|
401
407
|
{
|
|
402
408
|
"name": "boxed",
|
|
@@ -408,10 +414,56 @@
|
|
|
408
414
|
"name": "header",
|
|
409
415
|
"type": "KpiGridHeader",
|
|
410
416
|
"required": false,
|
|
411
|
-
"description": "Group header
|
|
417
|
+
"description": "Group header above the strip: { label, badge? } (13 px semibold, normal case)."
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"name": "ariaLabel",
|
|
421
|
+
"type": "string",
|
|
422
|
+
"required": false,
|
|
423
|
+
"description": "Names the group of metrics (role=group); omit when a heading right above names it."
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
"name": "className",
|
|
427
|
+
"type": "string",
|
|
428
|
+
"required": false,
|
|
429
|
+
"description": "Merged onto the root element."
|
|
430
|
+
}
|
|
431
|
+
],
|
|
432
|
+
"whenToUse": "Show a row of headline metrics in a widget (replaces the old single-metric KPICard). Pre-format values for locale/currency. Figures stay in the foreground at the page-title size; a cell tone shows as a dot next to its label, a trend as a Lucide direction icon (or a dot with trendTone) next to neutral words. Set onClick + actionHint to make a metric a drill target. Pair with KpiGridSkeleton while loading."
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"name": "KpiGridSkeleton",
|
|
436
|
+
"export": "KpiGridSkeleton",
|
|
437
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
438
|
+
"kind": "component",
|
|
439
|
+
"group": "composed",
|
|
440
|
+
"props": [
|
|
441
|
+
{
|
|
442
|
+
"name": "cells",
|
|
443
|
+
"type": "number",
|
|
444
|
+
"required": true,
|
|
445
|
+
"description": "How many cells the loaded grid will have."
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"name": "variant",
|
|
449
|
+
"type": "'strip' | 'soft'",
|
|
450
|
+
"required": false,
|
|
451
|
+
"description": "The loaded grid's variant. Default 'strip'."
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
"name": "boxed",
|
|
455
|
+
"type": "boolean",
|
|
456
|
+
"required": false,
|
|
457
|
+
"description": "The loaded grid's boxed. Default false."
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
"name": "className",
|
|
461
|
+
"type": "string",
|
|
462
|
+
"required": false,
|
|
463
|
+
"description": "Merged onto the root element."
|
|
412
464
|
}
|
|
413
465
|
],
|
|
414
|
-
"whenToUse": "
|
|
466
|
+
"whenToUse": "Loading placeholder with KpiGrid's geometry (same wrapper, grid and cell padding), so the layout doesn't jump when the data arrives. Marked aria-busy."
|
|
415
467
|
},
|
|
416
468
|
{
|
|
417
469
|
"name": "LivePill",
|
|
@@ -422,15 +474,21 @@
|
|
|
422
474
|
"props": [
|
|
423
475
|
{
|
|
424
476
|
"name": "tone",
|
|
425
|
-
"type": "
|
|
477
|
+
"type": "ToneName",
|
|
426
478
|
"required": false,
|
|
427
|
-
"description": "Status tone driving the dot
|
|
479
|
+
"description": "Status tone driving the dot, tint and border ('neutral'|'info'|'success'|'warning'|'danger'): tint + foreground text, rim in the tone (TONE_SOFT + TONE_BORDER). Default 'info'."
|
|
428
480
|
},
|
|
429
481
|
{
|
|
430
482
|
"name": "children",
|
|
431
483
|
"type": "ReactNode",
|
|
432
484
|
"required": false,
|
|
433
485
|
"description": "Pill label. Defaults to 'Live'."
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
"name": "className",
|
|
489
|
+
"type": "string",
|
|
490
|
+
"required": false,
|
|
491
|
+
"description": "Merged onto the root element."
|
|
434
492
|
}
|
|
435
493
|
],
|
|
436
494
|
"whenToUse": "Signal live/real-time data in a widget header — a tinted pill with a pulsing dot."
|
|
@@ -444,19 +502,53 @@
|
|
|
444
502
|
"props": [
|
|
445
503
|
{
|
|
446
504
|
"name": "tone",
|
|
447
|
-
"type": "
|
|
505
|
+
"type": "ToneName",
|
|
448
506
|
"required": false,
|
|
449
|
-
"description": "Status tone driving the tint. Default 'neutral'."
|
|
507
|
+
"description": "Status tone driving the tint and border: tint + foreground text, rim in the tone (TONE_SOFT + TONE_BORDER); the number never takes a tone colour, also on the neutral tint. Default 'neutral'."
|
|
450
508
|
},
|
|
451
509
|
{
|
|
452
510
|
"name": "children",
|
|
453
511
|
"type": "ReactNode",
|
|
454
512
|
"required": true,
|
|
455
513
|
"description": "The count/value (rendered with tabular numbers)."
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
"name": "className",
|
|
517
|
+
"type": "string",
|
|
518
|
+
"required": false,
|
|
519
|
+
"description": "Merged onto the root element."
|
|
456
520
|
}
|
|
457
521
|
],
|
|
458
522
|
"whenToUse": "Right-aligned count indicator on a list/group row (e.g. a per-group item count)."
|
|
459
523
|
},
|
|
524
|
+
{
|
|
525
|
+
"name": "StatusBadge",
|
|
526
|
+
"export": "StatusBadge",
|
|
527
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
528
|
+
"kind": "component",
|
|
529
|
+
"group": "composed",
|
|
530
|
+
"props": [
|
|
531
|
+
{
|
|
532
|
+
"name": "children",
|
|
533
|
+
"type": "string | number | ReactElement | (string | number | ReactElement)[]",
|
|
534
|
+
"required": true,
|
|
535
|
+
"description": "The state in words ('Suspended', '3 open incidents'). Required: colour is never the only signal."
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
"name": "tone",
|
|
539
|
+
"type": "ToneName",
|
|
540
|
+
"required": true,
|
|
541
|
+
"description": "The state's tone: tint, edge and a static dot ('danger'|'warning'|'success'|'info'|'neutral'; retired names map through resolveTone)."
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
"name": "className",
|
|
545
|
+
"type": "string",
|
|
546
|
+
"required": false,
|
|
547
|
+
"description": "Merged onto the root element."
|
|
548
|
+
}
|
|
549
|
+
],
|
|
550
|
+
"whenToUse": "Say a state in words, marked in its tone: a detail-page header (WidgetHeader badge) or a table cell. Foreground text on the tint, never coloured words. For live data use LivePill, for a count CountPill."
|
|
551
|
+
},
|
|
460
552
|
{
|
|
461
553
|
"name": "SectionHeading",
|
|
462
554
|
"export": "SectionHeading",
|
|
@@ -499,16 +591,28 @@
|
|
|
499
591
|
"description": "The widget title."
|
|
500
592
|
},
|
|
501
593
|
{
|
|
502
|
-
"name": "
|
|
594
|
+
"name": "as",
|
|
595
|
+
"type": "'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'",
|
|
596
|
+
"required": false,
|
|
597
|
+
"description": "Heading element. Default 'h1'. Pick the level that keeps one outline per view: below a toolbar title (an h2) use 'h3'. The size follows `size`, not the level."
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
"name": "size",
|
|
601
|
+
"type": "'default' | 'detail'",
|
|
602
|
+
"required": false,
|
|
603
|
+
"description": "'default': page title (28 px / 700); 'detail': compact detail-page title (21 px / 600)."
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
"name": "badge",
|
|
503
607
|
"type": "ReactNode",
|
|
504
608
|
"required": false,
|
|
505
|
-
"description": "
|
|
609
|
+
"description": "Above the title: a StatusBadge that says the state in words."
|
|
506
610
|
},
|
|
507
611
|
{
|
|
508
|
-
"name": "
|
|
509
|
-
"type": "
|
|
612
|
+
"name": "titleSuffix",
|
|
613
|
+
"type": "ReactNode",
|
|
510
614
|
"required": false,
|
|
511
|
-
"description": "
|
|
615
|
+
"description": "Inline after the title inside the heading (e.g. a version chip)."
|
|
512
616
|
},
|
|
513
617
|
{
|
|
514
618
|
"name": "sub",
|
|
@@ -521,9 +625,27 @@
|
|
|
521
625
|
"type": "ReactNode",
|
|
522
626
|
"required": false,
|
|
523
627
|
"description": "Right-aligned actions slot (buttons, drill controls)."
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
"name": "icon",
|
|
631
|
+
"type": "ReactNode",
|
|
632
|
+
"required": false,
|
|
633
|
+
"description": "Deprecated: the icon tile above the title is the anti-slop U2 pattern; use badge. Still rendered (aria-hidden)."
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
"name": "iconTone",
|
|
637
|
+
"type": "ToneName",
|
|
638
|
+
"required": false,
|
|
639
|
+
"description": "Deprecated: tone of the icon tile."
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
"name": "className",
|
|
643
|
+
"type": "string",
|
|
644
|
+
"required": false,
|
|
645
|
+
"description": "Merged onto the root element."
|
|
524
646
|
}
|
|
525
647
|
],
|
|
526
|
-
"whenToUse": "Anchor the top of a
|
|
648
|
+
"whenToUse": "Anchor the top of a widget surface: optional state badge, the title at a configurable heading level, a meta row and an actions slot. Use once per widget; with McpAppView's toolbar title shown, set titleMode='hide' or as='h3' so the view keeps one title and one outline."
|
|
527
649
|
},
|
|
528
650
|
{
|
|
529
651
|
"name": "GroupCard",
|
|
@@ -582,7 +704,7 @@
|
|
|
582
704
|
"name": "chips",
|
|
583
705
|
"type": "FilterChip[]",
|
|
584
706
|
"required": true,
|
|
585
|
-
"description": "
|
|
707
|
+
"description": "Toggle chips: { id, label, count?, active? }. Each is a button with aria-pressed; an active chip is the info tint and edge around foreground text."
|
|
586
708
|
},
|
|
587
709
|
{
|
|
588
710
|
"name": "onChipToggle",
|
|
@@ -595,9 +717,27 @@
|
|
|
595
717
|
"type": "string",
|
|
596
718
|
"required": false,
|
|
597
719
|
"description": "Placeholder for the search input. Default 'Filter…'."
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
"name": "searchAriaLabel",
|
|
723
|
+
"type": "string",
|
|
724
|
+
"required": false,
|
|
725
|
+
"description": "Accessible name of the search input. Default: the locale's 'Filter' (a placeholder is no label)."
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"name": "chipsAriaLabel",
|
|
729
|
+
"type": "string",
|
|
730
|
+
"required": false,
|
|
731
|
+
"description": "Names the chip group (role=group). Default: the locale's 'Filters'."
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
"name": "className",
|
|
735
|
+
"type": "string",
|
|
736
|
+
"required": false,
|
|
737
|
+
"description": "Merged onto the root element."
|
|
598
738
|
}
|
|
599
739
|
],
|
|
600
|
-
"whenToUse": "Filter a list/table of widget items with a search box +
|
|
740
|
+
"whenToUse": "Filter a list/table of widget items with a labelled search box + a row of toggle chips (aria-pressed). Pair with useDebouncedValue so a server-side filter only re-queries once typing pauses."
|
|
601
741
|
},
|
|
602
742
|
{
|
|
603
743
|
"name": "DrillButton",
|
|
@@ -622,7 +762,7 @@
|
|
|
622
762
|
"name": "icon",
|
|
623
763
|
"type": "ReactNode",
|
|
624
764
|
"required": false,
|
|
625
|
-
"description": "Optional leading glyph; the trailing
|
|
765
|
+
"description": "Optional leading Lucide icon (decorative, never a typed glyph); the trailing Lucide arrow is always rendered."
|
|
626
766
|
},
|
|
627
767
|
{
|
|
628
768
|
"name": "size",
|
|
@@ -634,7 +774,7 @@
|
|
|
634
774
|
"name": "ariaLabel",
|
|
635
775
|
"type": "string",
|
|
636
776
|
"required": false,
|
|
637
|
-
"description": "Accessible label when the visible text is terse."
|
|
777
|
+
"description": "Accessible label when the visible text is terse; keep the visible text in it (WCAG 2.5.3)."
|
|
638
778
|
}
|
|
639
779
|
],
|
|
640
780
|
"whenToUse": "The single neutral in-widget navigation control (drill into a detail/sub-view). Use it for every drill so they read identically and stay visually quieter than primary/agentic actions."
|
|
@@ -680,10 +820,74 @@
|
|
|
680
820
|
"name": "noun",
|
|
681
821
|
"type": "string",
|
|
682
822
|
"required": false,
|
|
683
|
-
"description": "Plural noun for the count, e.g. 'instances'. Default 'rows
|
|
823
|
+
"description": "Plural noun for the count, e.g. 'instances'. Default: the locale's word for rows."
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
"name": "refreshing",
|
|
827
|
+
"type": "boolean",
|
|
828
|
+
"required": false,
|
|
829
|
+
"description": "A first page is in flight while these rows stay on screen: the status line adds a visible 'Updating…'."
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
"name": "stale",
|
|
833
|
+
"type": "boolean",
|
|
834
|
+
"required": false,
|
|
835
|
+
"description": "The rows on screen are the previous result: count and Load more hide, so the old count never reads as the new search's answer."
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
"name": "labels",
|
|
839
|
+
"type": "Partial<ListFooterMessages>",
|
|
840
|
+
"required": false,
|
|
841
|
+
"description": "Override strings of the active catalog's listFooter section."
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
"name": "announce",
|
|
845
|
+
"type": "boolean",
|
|
846
|
+
"required": false,
|
|
847
|
+
"description": "Make the count line a polite live region (role=status). Default true; false only where the caller announces the count in a live region of its own."
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
"name": "className",
|
|
851
|
+
"type": "string",
|
|
852
|
+
"required": false,
|
|
853
|
+
"description": "Merged onto the root element."
|
|
854
|
+
}
|
|
855
|
+
],
|
|
856
|
+
"whenToUse": "Footer for a paginated list: an honest 'Showing X of Y' total + an explicit 'Load more' (not infinite scroll). The count is a polite live region (role=status), so the new total is announced after Load more or a filter change. At zero rows it shows nothing but keeps the region mounted (visually hidden) with 'No entries', so a search that finds nothing is announced too. Text and number format follow the active locale. For a paged query with failures use PagedListFooter."
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
"name": "PagedListFooter",
|
|
860
|
+
"export": "PagedListFooter",
|
|
861
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
862
|
+
"kind": "component",
|
|
863
|
+
"group": "composed",
|
|
864
|
+
"props": [
|
|
865
|
+
{
|
|
866
|
+
"name": "paged",
|
|
867
|
+
"type": "PagedListState",
|
|
868
|
+
"required": true,
|
|
869
|
+
"description": "{ items, total, hasMore, loadMore, loadingMore?, refreshing?, stale?, firstPage?, error?, retry?, loadMoreError? } — a paged-query hook's result passes as is."
|
|
870
|
+
},
|
|
871
|
+
{
|
|
872
|
+
"name": "noun",
|
|
873
|
+
"type": "string",
|
|
874
|
+
"required": false,
|
|
875
|
+
"description": "Plural noun for the count. Default: the locale's word for rows."
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
"name": "labels",
|
|
879
|
+
"type": "Partial<ListFooterMessages>",
|
|
880
|
+
"required": false,
|
|
881
|
+
"description": "Override strings of the active catalog's listFooter section."
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
"name": "retryLabel",
|
|
885
|
+
"type": "string",
|
|
886
|
+
"required": false,
|
|
887
|
+
"description": "Retry button label of both error lines. Default: the locale's 'Try again'."
|
|
684
888
|
}
|
|
685
889
|
],
|
|
686
|
-
"whenToUse": "
|
|
890
|
+
"whenToUse": "The tail of a paged list: a failed first page over the previous rows (warning alert, retry re-runs page 0) and a failed load-more (danger alert, retry fetches the next offset) stay apart, each with the raw reason under Details; then the ListFooter with 'Updating…' while page 0 is in flight and no count while the rows are stale."
|
|
687
891
|
},
|
|
688
892
|
{
|
|
689
893
|
"name": "Tone tokens",
|
|
@@ -691,9 +895,187 @@
|
|
|
691
895
|
"importPath": "@miragon/mcp-toolkit-ui",
|
|
692
896
|
"kind": "object",
|
|
693
897
|
"group": "composed",
|
|
694
|
-
"parts": [
|
|
898
|
+
"parts": [
|
|
899
|
+
"TONE_SOFT",
|
|
900
|
+
"TONE_TINT",
|
|
901
|
+
"TONE_DOT",
|
|
902
|
+
"TONE_INK",
|
|
903
|
+
"TONE_TEXT",
|
|
904
|
+
"TONE_BORDER",
|
|
905
|
+
"TONE_ICON"
|
|
906
|
+
],
|
|
907
|
+
"props": [],
|
|
908
|
+
"whenToUse": "Record<ToneVariant, string> maps from a status tone ('neutral'|'info'|'success'|'warning'|'danger') to Tailwind class strings, three roles per tone (Miragon CI): the colour for fills, dots, borders and icons (TONE_DOT, TONE_BORDER, TONE_ICON), the tint (TONE_SOFT = tint + foreground text, rim in the tone via TONE_BORDER; TONE_TINT = the tint alone; never put TONE_INK on a tint) and the TEXT colour for a tone's words on a plain surface (TONE_INK = the tone's -ink role; TONE_TEXT is its deprecated name). Status is never text in its own colour: success and warning ink is the foreground, so show the tone as a dot, icon or border next to the text; figures (counts, KPI values) stay in the foreground. TONE_ICON is for SVG icons only. Use to colour a custom element by status without a tone === 'x' ? ... ternary; the tone-aware components (KpiGrid, LivePill, CountPill, StatusBadge, Badge) consume these internally."
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
"name": "Tone vocabulary",
|
|
912
|
+
"export": "resolveTone",
|
|
913
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
914
|
+
"kind": "function",
|
|
915
|
+
"group": "composed",
|
|
916
|
+
"parts": ["resolveTone", "isToneVariant", "TONE_VARIANTS", "TONE_ALIASES"],
|
|
917
|
+
"props": [
|
|
918
|
+
{
|
|
919
|
+
"name": "name",
|
|
920
|
+
"type": "unknown",
|
|
921
|
+
"required": true,
|
|
922
|
+
"description": "A tone name, possibly from data: a ToneVariant or a retired alias ('critical', 'error', 'destructive', 'warn', 'ok', …)."
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
"name": "fallback",
|
|
926
|
+
"type": "ToneVariant",
|
|
927
|
+
"required": false,
|
|
928
|
+
"description": "The tone for anything unknown. Default 'neutral'."
|
|
929
|
+
}
|
|
930
|
+
],
|
|
931
|
+
"whenToUse": "ONE tone vocabulary: success | warning | danger | info | neutral (TONE_VARIANTS). resolveTone maps a retired or foreign name onto it (critical/error/destructive → danger; one red, one amber) and anything unknown onto the fallback, so a tone that arrives as data never renders colourless; isToneVariant is the type guard. The props typed ToneName resolve it this way (KpiCell tone/trendTone, LivePill, StatusBadge, CountPill, WidgetHeader iconTone). Toast, ErrorState and EmptyState keep their own tone subset in the types; an untyped name still resolves at runtime and anything outside the subset gets their default. Badge/Alert variants are cva keys: pass a resolved tone."
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
"name": "ToastProvider",
|
|
935
|
+
"export": "ToastProvider",
|
|
936
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
937
|
+
"kind": "component",
|
|
938
|
+
"group": "feedback",
|
|
939
|
+
"props": [
|
|
940
|
+
{
|
|
941
|
+
"name": "children",
|
|
942
|
+
"type": "ReactNode",
|
|
943
|
+
"required": true,
|
|
944
|
+
"description": "Subtree that raises toasts via useToast."
|
|
945
|
+
}
|
|
946
|
+
],
|
|
947
|
+
"whenToUse": "Provide toasts to a subtree and render their stack: bottom centre, status colour as left edge + icon next to plain text, ONE persistent live region (aria-live=polite, fixed attributes: no role or name, so the first toast is announced; tests find it by data-slot=toast-viewport), toast text at 16 px, auto-dismiss after 2.8 s (errors 5 s), held while hovered or focused. Idempotent when nested. McpAppView mounts one, so widgets inside a view only call useToast. Toast icons follow the LucideProvider around the outermost ToastProvider (stroke 2.5 inside McpAppView)."
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
"name": "useToast",
|
|
951
|
+
"export": "useToast",
|
|
952
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
953
|
+
"kind": "hook",
|
|
954
|
+
"group": "feedback",
|
|
695
955
|
"props": [],
|
|
696
|
-
"whenToUse": "
|
|
956
|
+
"whenToUse": "Raise feedback after a user action instead of logging to the console: useToast().show({ tone: 'success' | 'warning' | 'danger' | 'info', title, description?, duration? }) returns an id; dismiss(id) removes it early. Name the object in the title ('Job retried.'); the description says what to do next. Both come from your catalog: never put a raw error (e.message) in a toast, log it or show it under an ErrorState's Details. Outside a ToastProvider it is a safe no-op."
|
|
957
|
+
},
|
|
958
|
+
{
|
|
959
|
+
"name": "EmptyState",
|
|
960
|
+
"export": "EmptyState",
|
|
961
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
962
|
+
"kind": "component",
|
|
963
|
+
"group": "feedback",
|
|
964
|
+
"props": [
|
|
965
|
+
{
|
|
966
|
+
"name": "title",
|
|
967
|
+
"type": "ReactNode",
|
|
968
|
+
"required": true,
|
|
969
|
+
"description": "What is empty, in plain words."
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
"name": "description",
|
|
973
|
+
"type": "ReactNode",
|
|
974
|
+
"required": false,
|
|
975
|
+
"description": "One help line: why it is empty or what to do next."
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
"name": "icon",
|
|
979
|
+
"type": "ReactNode",
|
|
980
|
+
"required": false,
|
|
981
|
+
"description": "Decorative icon or brand mark (aria-hidden): a Lucide icon for the situation (24 px), or a logo; an SVG with its own size-* class keeps that size."
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
"name": "tone",
|
|
985
|
+
"type": "'neutral' | 'success'",
|
|
986
|
+
"required": false,
|
|
987
|
+
"description": "Icon colour; 'success' for an 'all done' state. Default 'neutral'."
|
|
988
|
+
},
|
|
989
|
+
{
|
|
990
|
+
"name": "action",
|
|
991
|
+
"type": "ReactNode",
|
|
992
|
+
"required": false,
|
|
993
|
+
"description": "The primary next step (a Button)."
|
|
994
|
+
},
|
|
995
|
+
{
|
|
996
|
+
"name": "secondaryAction",
|
|
997
|
+
"type": "ReactNode",
|
|
998
|
+
"required": false,
|
|
999
|
+
"description": "An optional second, quieter step (at most two actions)."
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
"name": "titleAs",
|
|
1003
|
+
"type": "'h2' | 'h3' | 'h4' | 'p'",
|
|
1004
|
+
"required": false,
|
|
1005
|
+
"description": "Title element. Default 'h3'."
|
|
1006
|
+
}
|
|
1007
|
+
],
|
|
1008
|
+
"whenToUse": "The one empty-state pattern for a list, table or view with nothing to show: icon or mark, a 600-weight title, one help line, up to two actions. Static (no live region). Use instead of a grey one-liner; for 'all done' pass <CircleCheck /> with tone 'success'."
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
"name": "ErrorState",
|
|
1012
|
+
"export": "ErrorState",
|
|
1013
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1014
|
+
"kind": "component",
|
|
1015
|
+
"group": "feedback",
|
|
1016
|
+
"props": [
|
|
1017
|
+
{
|
|
1018
|
+
"name": "title",
|
|
1019
|
+
"type": "ReactNode",
|
|
1020
|
+
"required": true,
|
|
1021
|
+
"description": "What happened, in plain words."
|
|
1022
|
+
},
|
|
1023
|
+
{
|
|
1024
|
+
"name": "description",
|
|
1025
|
+
"type": "ReactNode",
|
|
1026
|
+
"required": false,
|
|
1027
|
+
"description": "What you can do next (or the human reason)."
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
"name": "details",
|
|
1031
|
+
"type": "ReactNode",
|
|
1032
|
+
"required": false,
|
|
1033
|
+
"description": "The raw technical reason, shown collapsed under a 'Details' disclosure."
|
|
1034
|
+
},
|
|
1035
|
+
{
|
|
1036
|
+
"name": "onRetry",
|
|
1037
|
+
"type": "() => void",
|
|
1038
|
+
"required": false,
|
|
1039
|
+
"description": "Renders a retry button (label from the locale) when set."
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
"name": "actions",
|
|
1043
|
+
"type": "ReactNode",
|
|
1044
|
+
"required": false,
|
|
1045
|
+
"description": "Further actions after the retry button."
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
"name": "tone",
|
|
1049
|
+
"type": "'danger' | 'warning' | 'info'",
|
|
1050
|
+
"required": false,
|
|
1051
|
+
"description": "Default 'danger'."
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
"name": "variant",
|
|
1055
|
+
"type": "'block' | 'inline'",
|
|
1056
|
+
"required": false,
|
|
1057
|
+
"description": "'block' replaces a view or widget body; 'inline' is an alert above content that still renders. Default 'block'."
|
|
1058
|
+
},
|
|
1059
|
+
{
|
|
1060
|
+
"name": "role",
|
|
1061
|
+
"type": "'alert' | 'status' | 'none'",
|
|
1062
|
+
"required": false,
|
|
1063
|
+
"description": "Live-region role. Default 'alert'."
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
"name": "icon",
|
|
1067
|
+
"type": "LucideIcon",
|
|
1068
|
+
"required": false,
|
|
1069
|
+
"description": "Replace the tone's default Lucide icon."
|
|
1070
|
+
},
|
|
1071
|
+
{
|
|
1072
|
+
"name": "titleAs",
|
|
1073
|
+
"type": "'h2' | 'h3' | 'h4' | 'p'",
|
|
1074
|
+
"required": false,
|
|
1075
|
+
"description": "Title element. Default 'h2' (block) / 'p' (inline)."
|
|
1076
|
+
}
|
|
1077
|
+
],
|
|
1078
|
+
"whenToUse": "The one error pattern: icon, a title that says what happened, a line that says what you can do, the raw error under 'Details', and a retry. Never print a raw exception as the only text, never leave a failed fetch on an endless skeleton."
|
|
697
1079
|
},
|
|
698
1080
|
{
|
|
699
1081
|
"name": "useDebouncedValue",
|
|
@@ -726,9 +1108,9 @@
|
|
|
726
1108
|
"props": [
|
|
727
1109
|
{
|
|
728
1110
|
"name": "queryKey",
|
|
729
|
-
"type": "unknown[]",
|
|
1111
|
+
"type": "readonly unknown[]",
|
|
730
1112
|
"required": true,
|
|
731
|
-
"description": "Cache key.
|
|
1113
|
+
"description": "Cache key prefix. The effective key is [...queryKey, args] (toolQueryKey): different args get separate entries. Two tools must not share a key and args (the hook warns when they do), unless AppQueryProvider / McpAppView toolNameInQueryKey puts the tool name into the key ([...queryKey, toolName, args])."
|
|
732
1114
|
},
|
|
733
1115
|
{
|
|
734
1116
|
"name": "toolName",
|
|
@@ -744,12 +1126,12 @@
|
|
|
744
1126
|
},
|
|
745
1127
|
{
|
|
746
1128
|
"name": "opts",
|
|
747
|
-
"type": "
|
|
1129
|
+
"type": "UseToolQueryOptions<TData, TSelected>",
|
|
748
1130
|
"required": false,
|
|
749
|
-
"description": "
|
|
1131
|
+
"description": "TanStack query options (retry, retryDelay, staleTime, placeholderData / keepPreviousData, initialData + initialDataUpdatedAt, enabled, select, gcTime, …) — everything but queryKey/queryFn. retry defaults to the client's; retry: shouldRetryToolCall stops retrying a tool's own isError answer."
|
|
750
1132
|
}
|
|
751
1133
|
],
|
|
752
|
-
"whenToUse": "Self-fetch arbitrary data from a tool inside a cockpit-embedded widget. Result is decoded with parseToolResult (structured-first). Returns a TanStack UseQueryResult."
|
|
1134
|
+
"whenToUse": "Self-fetch arbitrary data from a tool inside a cockpit-embedded widget. Result is decoded with parseToolResult (structured-first). Returns a TanStack UseQueryResult (data, error, refetch, failureCount, failureReason, isFetching, isPlaceholderData, …). The tool goes through AppQueryProvider's callTool, else the nearest HostBridgeProvider; with neither the query fails with a 'no tool transport' error instead of idling, and fetches once a transport arrives. Keep a list on screen while a new search loads: { placeholderData: keepPreviousData }."
|
|
753
1135
|
},
|
|
754
1136
|
{
|
|
755
1137
|
"name": "useToolMutation",
|
|
@@ -766,12 +1148,105 @@
|
|
|
766
1148
|
},
|
|
767
1149
|
{
|
|
768
1150
|
"name": "opts",
|
|
769
|
-
"type": "
|
|
1151
|
+
"type": "UseToolMutationOptions<TData>",
|
|
1152
|
+
"required": false,
|
|
1153
|
+
"description": "TanStack mutation options (onSuccess, onError, onSettled, retry, meta, mutationKey, …) plus invalidateKeys: query-key prefixes to invalidate after each successful call (active queries refetch, inactive ones turn stale)."
|
|
1154
|
+
}
|
|
1155
|
+
],
|
|
1156
|
+
"whenToUse": "Run a write/action tool (e.g. retry-incident) and invalidate dependent queries. Returns a TanStack UseMutationResult; call .mutate(args, { onSuccess, onError, onSettled }). Unlike TanStack's own mutate, the per-call callbacks fire for EVERY call while the widget is mounted, so two quick calls each get their confirmation."
|
|
1157
|
+
},
|
|
1158
|
+
{
|
|
1159
|
+
"name": "toolQueryKey",
|
|
1160
|
+
"export": "toolQueryKey",
|
|
1161
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1162
|
+
"kind": "function",
|
|
1163
|
+
"group": "data-hooks",
|
|
1164
|
+
"props": [
|
|
1165
|
+
{
|
|
1166
|
+
"name": "queryKey",
|
|
1167
|
+
"type": "readonly unknown[]",
|
|
1168
|
+
"required": true,
|
|
1169
|
+
"description": "The caller's key prefix."
|
|
1170
|
+
},
|
|
1171
|
+
{
|
|
1172
|
+
"name": "toolName",
|
|
1173
|
+
"type": "string",
|
|
1174
|
+
"required": true,
|
|
1175
|
+
"description": "The tool the query calls."
|
|
1176
|
+
},
|
|
1177
|
+
{
|
|
1178
|
+
"name": "args",
|
|
1179
|
+
"type": "object",
|
|
1180
|
+
"required": true,
|
|
1181
|
+
"description": "The tool arguments."
|
|
1182
|
+
},
|
|
1183
|
+
{
|
|
1184
|
+
"name": "toolNameInKey",
|
|
1185
|
+
"type": "boolean",
|
|
770
1186
|
"required": false,
|
|
771
|
-
"description": "
|
|
1187
|
+
"description": "Put the tool name between the key and the args ([...queryKey, toolName, args]). Default false (the 2.x key); the default from the next major."
|
|
1188
|
+
}
|
|
1189
|
+
],
|
|
1190
|
+
"whenToUse": "Build the exact cache key useToolQuery / useViewToolQuery / useViewData use for getQueryData, setQueryData or cancelQueries with exact: true, never by hand. Pass toolNameInKey when the provider sets toolNameInQueryKey, or use useToolQueryKey, which reads it. Prefix invalidation needs only your queryKey."
|
|
1191
|
+
},
|
|
1192
|
+
{
|
|
1193
|
+
"name": "useToolQueryKey",
|
|
1194
|
+
"export": "useToolQueryKey",
|
|
1195
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1196
|
+
"kind": "hook",
|
|
1197
|
+
"group": "data-hooks",
|
|
1198
|
+
"props": [
|
|
1199
|
+
{
|
|
1200
|
+
"name": "queryKey",
|
|
1201
|
+
"type": "readonly unknown[]",
|
|
1202
|
+
"required": true,
|
|
1203
|
+
"description": "The caller's key prefix, as passed to useToolQuery."
|
|
1204
|
+
},
|
|
1205
|
+
{
|
|
1206
|
+
"name": "toolName",
|
|
1207
|
+
"type": "string",
|
|
1208
|
+
"required": true,
|
|
1209
|
+
"description": "The tool the query calls."
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
"name": "args",
|
|
1213
|
+
"type": "object",
|
|
1214
|
+
"required": true,
|
|
1215
|
+
"description": "The tool arguments."
|
|
772
1216
|
}
|
|
773
1217
|
],
|
|
774
|
-
"whenToUse": "
|
|
1218
|
+
"whenToUse": "The exact cache key the data hooks use for this tool and args under the nearest AppQueryProvider (toolQueryKey with its toolNameInQueryKey setting), for getQueryData, setQueryData or cancelQueries with exact: true, e.g. for an optimistic update in a mutation's onMutate. Stays right when the next major puts the tool name into every key."
|
|
1219
|
+
},
|
|
1220
|
+
{
|
|
1221
|
+
"name": "shouldRetryToolCall",
|
|
1222
|
+
"export": "shouldRetryToolCall",
|
|
1223
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1224
|
+
"kind": "function",
|
|
1225
|
+
"group": "data-hooks",
|
|
1226
|
+
"props": [
|
|
1227
|
+
{
|
|
1228
|
+
"name": "failureCount",
|
|
1229
|
+
"type": "number",
|
|
1230
|
+
"required": true,
|
|
1231
|
+
"description": "Failed attempts so far."
|
|
1232
|
+
},
|
|
1233
|
+
{
|
|
1234
|
+
"name": "error",
|
|
1235
|
+
"type": "unknown",
|
|
1236
|
+
"required": true,
|
|
1237
|
+
"description": "The last failure."
|
|
1238
|
+
}
|
|
1239
|
+
],
|
|
1240
|
+
"whenToUse": "An opt-in retry policy for tool queries: no retry for a tool's own isError answer (isToolError) or a missing transport, up to 3 retries for a failed transport, so a deterministic tool error shows at once instead of after ~7 s. Pass retry: shouldRetryToolCall to a hook, or set it as the client's default. The hooks keep the client's retry by default."
|
|
1241
|
+
},
|
|
1242
|
+
{
|
|
1243
|
+
"name": "keepPreviousData",
|
|
1244
|
+
"export": "keepPreviousData",
|
|
1245
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1246
|
+
"kind": "function",
|
|
1247
|
+
"group": "data-hooks",
|
|
1248
|
+
"props": [],
|
|
1249
|
+
"whenToUse": "TanStack's placeholder helper, re-exported so no direct @tanstack/react-query import is needed: { placeholderData: keepPreviousData } keeps the previous args' answer on screen (isPlaceholderData: true) while a changed search or filter loads — a list never unmounts mid-typing."
|
|
775
1250
|
},
|
|
776
1251
|
{
|
|
777
1252
|
"name": "useViewToolQuery",
|
|
@@ -784,7 +1259,7 @@
|
|
|
784
1259
|
"name": "queryKey",
|
|
785
1260
|
"type": "unknown[]",
|
|
786
1261
|
"required": true,
|
|
787
|
-
"description": "Cache key;
|
|
1262
|
+
"description": "Cache key prefix; the effective key is [...queryKey, args] (sibling widgets with equal args dedupe)."
|
|
788
1263
|
},
|
|
789
1264
|
{
|
|
790
1265
|
"name": "toolName",
|
|
@@ -800,9 +1275,9 @@
|
|
|
800
1275
|
},
|
|
801
1276
|
{
|
|
802
1277
|
"name": "opts",
|
|
803
|
-
"type": "
|
|
1278
|
+
"type": "UseViewToolQueryOptions<T>",
|
|
804
1279
|
"required": false,
|
|
805
|
-
"description": "
|
|
1280
|
+
"description": "TanStack query options (retry, retryDelay, staleTime, placeholderData / keepPreviousData, initialData + initialDataUpdatedAt, enabled, select, gcTime, …) — everything but queryKey/queryFn, as useToolQuery."
|
|
806
1281
|
}
|
|
807
1282
|
],
|
|
808
1283
|
"whenToUse": "Self-fetch from a *_show_* widget tool. Unwraps the McpAppView view envelope via parseViewToolResult (single-step → flat data, multi-step → keyed by step id) — the envelope-aware sibling of useToolQuery."
|
|
@@ -818,7 +1293,7 @@
|
|
|
818
1293
|
"name": "initialData",
|
|
819
1294
|
"type": "T | null | undefined",
|
|
820
1295
|
"required": true,
|
|
821
|
-
"description": "Host-pushed data (e.g. from adaptDataWidget). Returned verbatim
|
|
1296
|
+
"description": "Host-pushed data (e.g. from adaptDataWidget). Returned verbatim by default; with initialDataMode 'seed' it becomes the feed query's cached answer."
|
|
822
1297
|
},
|
|
823
1298
|
{
|
|
824
1299
|
"name": "key",
|
|
@@ -842,10 +1317,16 @@
|
|
|
842
1317
|
"name": "ready",
|
|
843
1318
|
"type": "boolean",
|
|
844
1319
|
"required": true,
|
|
845
|
-
"description": "Whether the required id/key is present;
|
|
1320
|
+
"description": "Whether the required id/key is present; the feed stays off until ready (and, by default, while initialData is present)."
|
|
1321
|
+
},
|
|
1322
|
+
{
|
|
1323
|
+
"name": "options",
|
|
1324
|
+
"type": "UseViewDataOptions<T>",
|
|
1325
|
+
"required": false,
|
|
1326
|
+
"description": "TanStack query options (retry, retryDelay, staleTime, placeholderData / keepPreviousData, initialDataUpdatedAt, enabled, gcTime, …) — everything but queryKey/queryFn; enabled (a boolean or a function of the query) is an extra gate next to ready, and a closed gate is not loading. initialDataMode: 'static' (default) or 'seed' — seed keeps the feed live over host data, so a write's invalidation, a refetch or a retry re-reads it."
|
|
846
1327
|
}
|
|
847
1328
|
],
|
|
848
|
-
"whenToUse": "The dual-mode seam: write ONE widget that renders host-pushed data when handed it (standalone *_show_* widget) AND self-fetches when embedded in a cockpit. Returns { data, loading, error }."
|
|
1329
|
+
"whenToUse": "The dual-mode seam: write ONE widget that renders host-pushed data when handed it (standalone *_show_* widget) AND self-fetches when embedded in a cockpit. Returns { data, loading, error, refetch, failureCount, failureReason, isFetching, isPlaceholderData }; pass refetch as the error state's retry (<ErrorState onRetry={refetch} />). Pass { initialDataMode: 'seed' } when a standalone view must stay live after writes, { placeholderData: keepPreviousData } to keep rows on screen while new args load."
|
|
849
1330
|
},
|
|
850
1331
|
{
|
|
851
1332
|
"name": "useIsMobile",
|
|
@@ -1010,12 +1491,28 @@
|
|
|
1010
1491
|
{
|
|
1011
1492
|
"name": "children",
|
|
1012
1493
|
"type": "ReactNode",
|
|
1013
|
-
"required":
|
|
1014
|
-
"description": "The widget subtree the description belongs to."
|
|
1494
|
+
"required": false,
|
|
1495
|
+
"description": "The widget subtree the description belongs to (nested below it). Omit it to report one line where it renders."
|
|
1015
1496
|
}
|
|
1016
1497
|
],
|
|
1017
1498
|
"whenToUse": "Report model context from a widget that self-fetches (cockpit views) — the host-portable replacement for mcp-use/react's ModelContext. Inside an mcp-use view it renders the native aggregating ModelContext; in every other mount (widget playground, ChatGPT, standalone) it routes through the HostBridge's setModelContext. NEVER import ModelContext from mcp-use/react in a widget: it throws outside a bootstrapView mount."
|
|
1018
1499
|
},
|
|
1500
|
+
{
|
|
1501
|
+
"name": "useHostModelContext",
|
|
1502
|
+
"export": "useHostModelContext",
|
|
1503
|
+
"importPath": "@miragon/mcp-toolkit-ui/app",
|
|
1504
|
+
"kind": "hook",
|
|
1505
|
+
"group": "widget-authoring",
|
|
1506
|
+
"props": [
|
|
1507
|
+
{
|
|
1508
|
+
"name": "content",
|
|
1509
|
+
"type": "string | null | undefined",
|
|
1510
|
+
"required": true,
|
|
1511
|
+
"description": "One line for the model; blank or null reports nothing."
|
|
1512
|
+
}
|
|
1513
|
+
],
|
|
1514
|
+
"whenToUse": "Report one line of model context from a component with nothing to wrap (a selection, a filter, an error the user sees) for as long as it is mounted. Inside an mcp-use view the line joins the view's one model-context tree with every HostModelContext and leaves it on unmount; elsewhere it goes through the HostBridge's setModelContext."
|
|
1515
|
+
},
|
|
1019
1516
|
{
|
|
1020
1517
|
"name": "DescribeForModel",
|
|
1021
1518
|
"export": "DescribeForModel",
|
|
@@ -1054,6 +1551,44 @@
|
|
|
1054
1551
|
],
|
|
1055
1552
|
"whenToUse": "Decode a raw callTool result to its data payload. Structured-first: isError → throw, then structuredContent, then JSON-decoded text, then raw. useToolQuery decodes through this for you."
|
|
1056
1553
|
},
|
|
1554
|
+
{
|
|
1555
|
+
"name": "ToolResultError",
|
|
1556
|
+
"export": "ToolResultError",
|
|
1557
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1558
|
+
"kind": "function",
|
|
1559
|
+
"group": "widget-authoring",
|
|
1560
|
+
"props": [
|
|
1561
|
+
{
|
|
1562
|
+
"name": "message",
|
|
1563
|
+
"type": "string",
|
|
1564
|
+
"required": true,
|
|
1565
|
+
"description": "The tool's first text block."
|
|
1566
|
+
},
|
|
1567
|
+
{
|
|
1568
|
+
"name": "result",
|
|
1569
|
+
"type": "unknown",
|
|
1570
|
+
"required": true,
|
|
1571
|
+
"description": "The isError result as the tool returned it."
|
|
1572
|
+
}
|
|
1573
|
+
],
|
|
1574
|
+
"whenToUse": "The Error class parseToolResult throws for an isError result — a deterministic answer of the tool (validation error, engine 404), not a transport failure. The query hooks retry it like any failure by default (the client's retry); pass retry: shouldRetryToolCall to stop that. Check with isToolError (also matches mcp-use's ToolError)."
|
|
1575
|
+
},
|
|
1576
|
+
{
|
|
1577
|
+
"name": "isToolError",
|
|
1578
|
+
"export": "isToolError",
|
|
1579
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1580
|
+
"kind": "function",
|
|
1581
|
+
"group": "widget-authoring",
|
|
1582
|
+
"props": [
|
|
1583
|
+
{
|
|
1584
|
+
"name": "error",
|
|
1585
|
+
"type": "unknown",
|
|
1586
|
+
"required": true,
|
|
1587
|
+
"description": "Anything a tool call rejected with."
|
|
1588
|
+
}
|
|
1589
|
+
],
|
|
1590
|
+
"whenToUse": "Tell a tool's own isError answer (ToolResultError, or mcp-use's ToolError inside a view) from a transport failure — e.g. in a custom retry policy or to word an error state."
|
|
1591
|
+
},
|
|
1057
1592
|
{
|
|
1058
1593
|
"name": "parseViewToolResult",
|
|
1059
1594
|
"export": "parseViewToolResult",
|
|
@@ -1097,16 +1632,16 @@
|
|
|
1097
1632
|
"name": "tokens",
|
|
1098
1633
|
"type": "ThemeTokens",
|
|
1099
1634
|
"required": true,
|
|
1100
|
-
"description": "
|
|
1635
|
+
"description": "Brand tokens (all optional), one field per role of the role-token contract (ROLE_TOKENS): primary, primaryForeground, primaryHover, link, focus, ring, background, foreground, card, popover, muted, mutedForeground, secondary, accent, border, input, destructive, success/warning/danger/info with *Soft and *Ink, radiusSm/Md/Lg/Pill, shadow1-3, scrim, motionFast/Base/Slow, ease, fontSans, fontMono, plus the legacy accentForeground, cardForeground, radius, fontHeading. Colors are any CSS color string."
|
|
1101
1636
|
},
|
|
1102
1637
|
{
|
|
1103
1638
|
"name": "opts",
|
|
1104
1639
|
"type": "{ dark?: ThemeTokens }",
|
|
1105
1640
|
"required": false,
|
|
1106
|
-
"description": "Dark-mode token overrides
|
|
1641
|
+
"description": "Dark-mode token overrides. In dark mode a theme scope gets the toolkit's dark defaults, the theme's mode-invariant light tokens (brand button colour, radii, fonts) and these — never the other light values."
|
|
1107
1642
|
}
|
|
1108
1643
|
],
|
|
1109
|
-
"whenToUse": "Define a white-label theme
|
|
1644
|
+
"whenToUse": "Define a white-label theme for a customer brand. The toolkit's default IS the Miragon theme (no theme needed for it). Maps the fields onto the role CSS variables (--primary, --link, --focus, ...) and returns a serializable ThemeDefinition { vars, darkVars?, toStyle() }. Apply it with ThemeProvider so every primitive re-skins; override roles only, never --cd-* tokens or component classes."
|
|
1110
1645
|
},
|
|
1111
1646
|
{
|
|
1112
1647
|
"name": "ThemeProvider",
|
|
@@ -1119,7 +1654,7 @@
|
|
|
1119
1654
|
"name": "theme",
|
|
1120
1655
|
"type": "ThemeDefinition",
|
|
1121
1656
|
"required": false,
|
|
1122
|
-
"description": "The theme from createTheme
|
|
1657
|
+
"description": "The theme from createTheme to apply. Omit to manage only the light/dark mode against the toolkit defaults (the Miragon theme)."
|
|
1123
1658
|
},
|
|
1124
1659
|
{
|
|
1125
1660
|
"name": "mode",
|
|
@@ -1146,7 +1681,7 @@
|
|
|
1146
1681
|
"description": "Subtree that inherits the theme's CSS variables and dark class."
|
|
1147
1682
|
}
|
|
1148
1683
|
],
|
|
1149
|
-
"whenToUse": "Wrap a widget (or a whole app) to apply a ThemeDefinition
|
|
1684
|
+
"whenToUse": "Wrap a widget (or a whole app) to apply a ThemeDefinition and/or a light/dark mode to a scope. Light mode applies the theme's vars, dark mode the toolkit's dark roles plus the theme's dark and mode-invariant tokens (resolveThemeVars). A light scope stays light inside a dark document. Dialogs, Sheets and Select menus opened inside portal into the scope, so they keep its theme and mode. React + DOM only — no host required."
|
|
1150
1685
|
},
|
|
1151
1686
|
{
|
|
1152
1687
|
"name": "useTheme",
|
|
@@ -1164,7 +1699,129 @@
|
|
|
1164
1699
|
"kind": "object",
|
|
1165
1700
|
"group": "theming",
|
|
1166
1701
|
"props": [],
|
|
1167
|
-
"whenToUse": "Ready-made white-label themes
|
|
1702
|
+
"whenToUse": "Ready-made white-label themes — a demonstration of createTheme and a fork-able starting point (themePresets.emerald). themePresets.miragon and .violet are deprecated: the Miragon theme is the toolkit's default, use no theme for it. Pass a preset to ThemeProvider's theme prop."
|
|
1703
|
+
},
|
|
1704
|
+
{
|
|
1705
|
+
"name": "resolveThemeVars",
|
|
1706
|
+
"export": "resolveThemeVars",
|
|
1707
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1708
|
+
"kind": "function",
|
|
1709
|
+
"group": "theming",
|
|
1710
|
+
"props": [
|
|
1711
|
+
{
|
|
1712
|
+
"name": "theme",
|
|
1713
|
+
"type": "ThemeDefinition | null | undefined",
|
|
1714
|
+
"required": true,
|
|
1715
|
+
"description": "The theme; null/undefined yields {}."
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
"name": "mode",
|
|
1719
|
+
"type": "\"light\" | \"dark\"",
|
|
1720
|
+
"required": true,
|
|
1721
|
+
"description": "The resolved mode of the scope."
|
|
1722
|
+
}
|
|
1723
|
+
],
|
|
1724
|
+
"whenToUse": "The CSS variables a ThemeDefinition applies at its scope in a mode — what ThemeProvider puts on its wrapper. Use it to theme an element without ThemeProvider (spread it into style), e.g. resolveThemeVars(theme, host.theme ?? 'light'). A legacy base radius also derives the sm/md/lg steps."
|
|
1725
|
+
},
|
|
1726
|
+
{
|
|
1727
|
+
"name": "ROLE_TOKENS",
|
|
1728
|
+
"export": "ROLE_TOKENS",
|
|
1729
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1730
|
+
"kind": "object",
|
|
1731
|
+
"group": "theming",
|
|
1732
|
+
"props": [],
|
|
1733
|
+
"whenToUse": "The role-token contract as a readonly list of CSS variable names (--background … --font-mono). Components style through these roles only; a brand overrides only these. Use it to check a brand stylesheet or a host token map covers / stays within the contract."
|
|
1734
|
+
},
|
|
1735
|
+
{
|
|
1736
|
+
"name": "usePortalContainer",
|
|
1737
|
+
"export": "usePortalContainer",
|
|
1738
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1739
|
+
"kind": "hook",
|
|
1740
|
+
"group": "theming",
|
|
1741
|
+
"props": [],
|
|
1742
|
+
"whenToUse": "The portal node of the nearest ThemeProvider (or null). Pass it as `container` to a portal of your own so overlays keep the scope's theme and light/dark mode; the toolkit's Dialog, Sheet and Select already do."
|
|
1743
|
+
},
|
|
1744
|
+
{
|
|
1745
|
+
"name": "CD_TOKENS",
|
|
1746
|
+
"export": "CD_TOKENS",
|
|
1747
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1748
|
+
"kind": "object",
|
|
1749
|
+
"group": "theming",
|
|
1750
|
+
"parts": ["CD_TOKENS", "CD_TOKENS_VERSION"],
|
|
1751
|
+
"props": [],
|
|
1752
|
+
"whenToUse": "The Miragon corporate-design tokens (--cd-*) as plain TypeScript, keys without the prefix (CD_TOKENS.blau, CD_TOKENS['danger-soft']). For code that cannot read CSS variables — SVG/canvas renderers, chart marks, server-side images. Drift-tested against the vendored CSS. UI components style through the role tokens, never through these constants."
|
|
1753
|
+
},
|
|
1754
|
+
{
|
|
1755
|
+
"name": "fontFaces",
|
|
1756
|
+
"export": "fontFaces",
|
|
1757
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1758
|
+
"kind": "function",
|
|
1759
|
+
"group": "theming",
|
|
1760
|
+
"parts": ["fontFaces", "GEIST_FONT_FILES"],
|
|
1761
|
+
"props": [
|
|
1762
|
+
{
|
|
1763
|
+
"name": "baseUrl",
|
|
1764
|
+
"type": "string",
|
|
1765
|
+
"required": true,
|
|
1766
|
+
"description": "Where the woff2 files (GEIST_FONT_FILES) are served from."
|
|
1767
|
+
},
|
|
1768
|
+
{
|
|
1769
|
+
"name": "files",
|
|
1770
|
+
"type": "{ sans?: string; mono?: string }",
|
|
1771
|
+
"required": false,
|
|
1772
|
+
"description": "File-name overrides."
|
|
1773
|
+
},
|
|
1774
|
+
{
|
|
1775
|
+
"name": "display",
|
|
1776
|
+
"type": "\"auto\" | \"block\" | \"swap\" | \"fallback\" | \"optional\"",
|
|
1777
|
+
"required": false,
|
|
1778
|
+
"description": "Default 'swap'."
|
|
1779
|
+
}
|
|
1780
|
+
],
|
|
1781
|
+
"whenToUse": "Opt-in Geist delivery by URL: returns the @font-face rules for Geist and Geist Mono (latin, variable weight) served from baseUrl. Inject into the view document, e.g. <style>{fontFaces({ baseUrl })}</style>, and allow that origin in the view CSP. Alternative: import @miragon/mcp-toolkit-ui/fonts.css (bundled). The font tokens name Geist first, so either path works; without either the host's font (see adoptHostFontVariables) or the system stack renders."
|
|
1782
|
+
},
|
|
1783
|
+
{
|
|
1784
|
+
"name": "adoptHostFontVariables",
|
|
1785
|
+
"export": "adoptHostFontVariables",
|
|
1786
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1787
|
+
"kind": "function",
|
|
1788
|
+
"group": "theming",
|
|
1789
|
+
"parts": ["adoptHostFontVariables", "HOST_FONT_VARIABLES"],
|
|
1790
|
+
"props": [
|
|
1791
|
+
{
|
|
1792
|
+
"name": "style",
|
|
1793
|
+
"type": "InlineStyleTarget",
|
|
1794
|
+
"required": true,
|
|
1795
|
+
"description": "The inline style the host variables were applied to, normally document.documentElement.style."
|
|
1796
|
+
},
|
|
1797
|
+
{
|
|
1798
|
+
"name": "hostVariables",
|
|
1799
|
+
"type": "Record<string, string | undefined> | null | undefined",
|
|
1800
|
+
"required": true,
|
|
1801
|
+
"description": "The host's SEP-1865 style variables (hostContext.styles.variables)."
|
|
1802
|
+
}
|
|
1803
|
+
],
|
|
1804
|
+
"whenToUse": "Keeps Geist first when a host sends its font. SEP-1865 hosts send --font-sans/--font-mono, the same names as the toolkit's font roles, and would replace the Geist-first stacks whole; this moves them to --host-font-sans/--host-font-mono, the fallback slot right after Geist. McpToolkitApp already calls it; call it yourself only in an app with its own host-document layer, right after applying the host's style variables."
|
|
1805
|
+
},
|
|
1806
|
+
{
|
|
1807
|
+
"name": "FOCUS_RING",
|
|
1808
|
+
"export": "FOCUS_RING",
|
|
1809
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1810
|
+
"kind": "object",
|
|
1811
|
+
"group": "widget-authoring",
|
|
1812
|
+
"parts": ["FOCUS_RING", "FOCUS_RING_INSET"],
|
|
1813
|
+
"props": [],
|
|
1814
|
+
"whenToUse": "The kit's opaque focus ring as a class string (2px ring in --focus with an offset; FOCUS_RING_INSET draws it inside, for cells flush with a container edge). Spread it into a custom control's className so keyboard focus reads the same everywhere (3:1 or more in both modes)."
|
|
1815
|
+
},
|
|
1816
|
+
{
|
|
1817
|
+
"name": "Type scale",
|
|
1818
|
+
"export": "TYPE_SCALE",
|
|
1819
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1820
|
+
"kind": "object",
|
|
1821
|
+
"group": "widget-authoring",
|
|
1822
|
+
"parts": ["TYPE_SCALE", "TYPE_STEPS", "TYPE_FLOOR_PX", "MICRO_LABEL"],
|
|
1823
|
+
"props": [],
|
|
1824
|
+
"whenToUse": "The CI type scale as role tokens and utilities: text-title (28/700, page title), text-section (21/600), text-body (16/400/1.6, running text incl. state and toast descriptions), text-dense (14, dense tables and controls such as inputs, chips, count pills and the inline alert box; never running text), text-small (13, the floor: captions, hints, meta rows). Nothing renders below 13 px: no text-xs, no text-[10px]; a former 10–11 px uppercase caption is MICRO_LABEL (13 px semibold, normal case). Combine with the kit's cn (plain tailwind-merge drops text-small next to a text colour). Brands resize via --text-* (ThemeTokens textTitle … textSmall)."
|
|
1168
1825
|
},
|
|
1169
1826
|
{
|
|
1170
1827
|
"name": "LocaleProvider",
|
|
@@ -1185,6 +1842,12 @@
|
|
|
1185
1842
|
"required": false,
|
|
1186
1843
|
"description": "A translator from createTranslator(catalogs) (@miragon/mcp-toolkit-core). Omit to provide the locale only (useTranslate echoes keys)."
|
|
1187
1844
|
},
|
|
1845
|
+
{
|
|
1846
|
+
"name": "toolkitMessages",
|
|
1847
|
+
"type": "ToolkitMessagesOverride",
|
|
1848
|
+
"required": false,
|
|
1849
|
+
"description": "Override individual toolkit strings per catalog section (e.g. { listFooter: { loadMore: 'Show more' } }). Omitted entries keep the shipped en/de catalog of locale."
|
|
1850
|
+
},
|
|
1188
1851
|
{
|
|
1189
1852
|
"name": "children",
|
|
1190
1853
|
"type": "ReactNode",
|
|
@@ -1192,7 +1855,7 @@
|
|
|
1192
1855
|
"description": "Subtree whose widgets read the locale via useLocale/useTranslate."
|
|
1193
1856
|
}
|
|
1194
1857
|
],
|
|
1195
|
-
"whenToUse": "Wrap a widget (or a whole app) to provide the active locale + an optional translator. Widgets read it with useLocale/useTranslate. Pure React (no host required), mirroring ThemeProvider — pairs with createTranslator from @miragon/mcp-toolkit-core."
|
|
1858
|
+
"whenToUse": "Wrap a widget (or a whole app) to provide the active locale + an optional translator. Widgets read it with useLocale/useTranslate. Pure React (no host required), mirroring ThemeProvider — pairs with createTranslator from @miragon/mcp-toolkit-core. The toolkit's own components read their strings from it too (en/de, English otherwise), so passing the locale localizes the whole toolkit chrome."
|
|
1196
1859
|
},
|
|
1197
1860
|
{
|
|
1198
1861
|
"name": "useLocale",
|
|
@@ -1212,6 +1875,68 @@
|
|
|
1212
1875
|
"props": [],
|
|
1213
1876
|
"whenToUse": "Get a locale-bound translate (key, params?) => string from the nearest LocaleProvider. Outside a provider it echoes the key, so a missing wrapper degrades gracefully instead of crashing."
|
|
1214
1877
|
},
|
|
1878
|
+
{
|
|
1879
|
+
"name": "useToolkitMessages",
|
|
1880
|
+
"export": "useToolkitMessages",
|
|
1881
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1882
|
+
"kind": "hook",
|
|
1883
|
+
"group": "i18n",
|
|
1884
|
+
"props": [],
|
|
1885
|
+
"whenToUse": "Read the toolkit's own UI strings (common, view, listFooter, filterBar, pills, renderer, builder, propsSheet) for the nearest LocaleProvider's locale: the shipped en/de catalog, English for any other locale, with the provider's toolkitMessages override applied. Reuse them in a widget for consistent chrome copy (e.g. common.retry)."
|
|
1886
|
+
},
|
|
1887
|
+
{
|
|
1888
|
+
"name": "TOOLKIT_MESSAGES",
|
|
1889
|
+
"export": "TOOLKIT_MESSAGES",
|
|
1890
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1891
|
+
"kind": "object",
|
|
1892
|
+
"group": "i18n",
|
|
1893
|
+
"props": [],
|
|
1894
|
+
"whenToUse": "The shipped toolkit catalogs keyed by locale ({ en, de }), typed as ToolkitMessages. Use it to build a LocaleProvider toolkitMessages override or to assert in a consumer test that no toolkit default leaks into a localized bundle."
|
|
1895
|
+
},
|
|
1896
|
+
{
|
|
1897
|
+
"name": "resolveToolkitMessages",
|
|
1898
|
+
"export": "resolveToolkitMessages",
|
|
1899
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1900
|
+
"kind": "function",
|
|
1901
|
+
"group": "i18n",
|
|
1902
|
+
"props": [
|
|
1903
|
+
{
|
|
1904
|
+
"name": "locale",
|
|
1905
|
+
"type": "string | undefined",
|
|
1906
|
+
"required": true,
|
|
1907
|
+
"description": "Any BCP 47 tag; its primary language picks the catalog (en fallback)."
|
|
1908
|
+
},
|
|
1909
|
+
{
|
|
1910
|
+
"name": "override",
|
|
1911
|
+
"type": "ToolkitMessagesOverride",
|
|
1912
|
+
"required": false,
|
|
1913
|
+
"description": "Per-section partial override merged over the catalog."
|
|
1914
|
+
}
|
|
1915
|
+
],
|
|
1916
|
+
"whenToUse": "Resolve the toolkit catalog outside React (the pure function behind LocaleProvider/useToolkitMessages)."
|
|
1917
|
+
},
|
|
1918
|
+
{
|
|
1919
|
+
"name": "formatCount",
|
|
1920
|
+
"export": "formatCount",
|
|
1921
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1922
|
+
"kind": "function",
|
|
1923
|
+
"group": "i18n",
|
|
1924
|
+
"props": [
|
|
1925
|
+
{
|
|
1926
|
+
"name": "value",
|
|
1927
|
+
"type": "number",
|
|
1928
|
+
"required": true,
|
|
1929
|
+
"description": "The count."
|
|
1930
|
+
},
|
|
1931
|
+
{
|
|
1932
|
+
"name": "locale",
|
|
1933
|
+
"type": "string | undefined",
|
|
1934
|
+
"required": true,
|
|
1935
|
+
"description": "The app locale (from useLocale), not the browser's."
|
|
1936
|
+
}
|
|
1937
|
+
],
|
|
1938
|
+
"whenToUse": "Format a count with the app locale's grouping (1,234 / 1.234); an invalid tag falls back to English instead of throwing in render."
|
|
1939
|
+
},
|
|
1215
1940
|
{
|
|
1216
1941
|
"name": "McpToolkitApp",
|
|
1217
1942
|
"export": "McpToolkitApp",
|
|
@@ -1256,6 +1981,15 @@
|
|
|
1256
1981
|
],
|
|
1257
1982
|
"whenToUse": "The bundle entry point since mcp-use 2.x: mounts McpToolkitApp via bootstrapView (ext-apps handshake, error boundary, auto-resize). Call it once in main.tsx instead of createRoot().render()."
|
|
1258
1983
|
},
|
|
1984
|
+
{
|
|
1985
|
+
"name": "installToolResultObserver",
|
|
1986
|
+
"export": "installToolResultObserver",
|
|
1987
|
+
"importPath": "@miragon/mcp-toolkit-ui/app",
|
|
1988
|
+
"kind": "function",
|
|
1989
|
+
"group": "app-shell",
|
|
1990
|
+
"props": [],
|
|
1991
|
+
"whenToUse": "Only for a custom shell under its own bootstrapView: call it before bootstrapView so McpAppView can tell a stripped tool result (claude.ai) from a slow tool and never re-runs a call the host is still answering. mountMcpToolkitApp and the bundle's first evaluation install it already; idempotent, null outside a framed browser document."
|
|
1992
|
+
},
|
|
1259
1993
|
{
|
|
1260
1994
|
"name": "WidgetFixtureHost",
|
|
1261
1995
|
"export": "WidgetFixtureHost",
|
|
@@ -1291,7 +2025,7 @@
|
|
|
1291
2025
|
"name": "globals",
|
|
1292
2026
|
"type": "Record<string, unknown>",
|
|
1293
2027
|
"required": false,
|
|
1294
|
-
"description": "Host
|
|
2028
|
+
"description": "Host context: theme (reported on the HostBridge) and locale (the toolkit's own strings and number format, as under McpAppView). Other keys are accepted for compatibility."
|
|
1295
2029
|
},
|
|
1296
2030
|
{
|
|
1297
2031
|
"name": "onModelContext",
|