@miragon/mcp-toolkit-ui 2.6.0 → 2.7.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 -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.map +1 -1
- package/dist/app/builder/CanvasRow.js +12 -14
- 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 +6 -5
- package/dist/app/builder/CatalogueSheet.js.map +1 -1
- 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.js +3 -3
- package/dist/app/builder/LayoutSurface.js.map +1 -1
- package/dist/app/builder/PipelineStrip.d.ts +3 -1
- package/dist/app/builder/PipelineStrip.d.ts.map +1 -1
- package/dist/app/builder/PipelineStrip.js +11 -6
- package/dist/app/builder/PipelineStrip.js.map +1 -1
- package/dist/app/builder/SaveDialog.d.ts.map +1 -1
- package/dist/app/builder/SaveDialog.js +2 -2
- package/dist/app/builder/SaveDialog.js.map +1 -1
- package/dist/app/builder/Toolbar.d.ts +3 -1
- package/dist/app/builder/Toolbar.d.ts.map +1 -1
- package/dist/app/builder/Toolbar.js +9 -3
- package/dist/app/builder/Toolbar.js.map +1 -1
- package/dist/app/builder/Workspace.js +2 -2
- package/dist/app/builder/Workspace.js.map +1 -1
- package/dist/app/builder/builder-model.d.ts +3 -2
- package/dist/app/builder/builder-model.d.ts.map +1 -1
- package/dist/app/builder/builder-model.js +5 -4
- 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/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 +1 -0
- package/dist/app/builder/use-builder-catalogue.d.ts.map +1 -1
- package/dist/app/builder/use-builder-catalogue.js +6 -0
- package/dist/app/builder/use-builder-catalogue.js.map +1 -1
- 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 +1 -1
- package/dist/app/index.d.ts.map +1 -1
- package/dist/app/index.js.map +1 -1
- package/dist/app/layout-builder.d.ts +7 -2
- package/dist/app/layout-builder.d.ts.map +1 -1
- package/dist/app/layout-builder.js +17 -5
- package/dist/app/layout-builder.js.map +1 -1
- package/dist/app/mcp-app-view-chrome.d.ts +94 -20
- package/dist/app/mcp-app-view-chrome.d.ts.map +1 -1
- package/dist/app/mcp-app-view-chrome.js +109 -40
- package/dist/app/mcp-app-view-chrome.js.map +1 -1
- package/dist/app/mcp-app-view-states.d.ts +15 -0
- package/dist/app/mcp-app-view-states.d.ts.map +1 -0
- package/dist/app/mcp-app-view-states.js +34 -0
- package/dist/app/mcp-app-view-states.js.map +1 -0
- package/dist/app/mcp-app-view.d.ts +40 -5
- package/dist/app/mcp-app-view.d.ts.map +1 -1
- package/dist/app/mcp-app-view.js +174 -128
- package/dist/app/mcp-app-view.js.map +1 -1
- package/dist/app/mcp-toolkit-app.d.ts +2 -1
- package/dist/app/mcp-toolkit-app.d.ts.map +1 -1
- package/dist/app/mcp-toolkit-app.js +25 -3
- package/dist/app/mcp-toolkit-app.js.map +1 -1
- package/dist/app/use-view-lifecycle.d.ts +38 -0
- package/dist/app/use-view-lifecycle.d.ts.map +1 -0
- package/dist/app/use-view-lifecycle.js +79 -0
- package/dist/app/use-view-lifecycle.js.map +1 -0
- package/dist/app/view-lifecycle.d.ts +109 -0
- package/dist/app/view-lifecycle.d.ts.map +1 -0
- package/dist/app/view-lifecycle.js +120 -0
- package/dist/app/view-lifecycle.js.map +1 -0
- package/dist/app/widget-props-sheet.d.ts +3 -9
- package/dist/app/widget-props-sheet.d.ts.map +1 -1
- package/dist/app/widget-props-sheet.js +6 -13
- 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.map +1 -1
- package/dist/components/DrillButton.js +2 -1
- 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 +17 -0
- package/dist/components/EmptyState.js.map +1 -0
- package/dist/components/ErrorState.d.ts +50 -0
- package/dist/components/ErrorState.d.ts.map +1 -0
- package/dist/components/ErrorState.js +60 -0
- package/dist/components/ErrorState.js.map +1 -0
- package/dist/components/FilterBar.d.ts +1 -1
- package/dist/components/FilterBar.d.ts.map +1 -1
- package/dist/components/FilterBar.js +7 -4
- 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 +10 -3
- package/dist/components/KpiGrid.d.ts.map +1 -1
- package/dist/components/KpiGrid.js +31 -9
- package/dist/components/KpiGrid.js.map +1 -1
- package/dist/components/ListFooter.d.ts +3 -2
- package/dist/components/ListFooter.d.ts.map +1 -1
- package/dist/components/ListFooter.js +14 -4
- package/dist/components/ListFooter.js.map +1 -1
- package/dist/components/Pills.d.ts +10 -6
- package/dist/components/Pills.d.ts.map +1 -1
- package/dist/components/Pills.js +12 -6
- package/dist/components/Pills.js.map +1 -1
- package/dist/components/Toast.d.ts +37 -0
- package/dist/components/Toast.d.ts.map +1 -0
- package/dist/components/Toast.js +91 -0
- package/dist/components/Toast.js.map +1 -0
- package/dist/components/WidgetHeader.js +1 -1
- package/dist/hooks/use-tool-result-recovery.d.ts +23 -1
- package/dist/hooks/use-tool-result-recovery.d.ts.map +1 -1
- package/dist/hooks/use-tool-result-recovery.js +21 -7
- package/dist/hooks/use-tool-result-recovery.js.map +1 -1
- package/dist/hooks/use-view-data.d.ts +6 -0
- package/dist/hooks/use-view-data.d.ts.map +1 -1
- package/dist/hooks/use-view-data.js +6 -1
- package/dist/hooks/use-view-data.js.map +1 -1
- package/dist/index.d.ts +12 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -4
- package/dist/index.js.map +1 -1
- 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/toast-model.d.ts +46 -0
- package/dist/lib/toast-model.d.ts.map +1 -0
- package/dist/lib/toast-model.js +36 -0
- package/dist/lib/toast-model.js.map +1 -0
- package/dist/lib/tone-utils.d.ts +43 -9
- package/dist/lib/tone-utils.d.ts.map +1 -1
- package/dist/lib/tone-utils.js +36 -7
- package/dist/lib/tone-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 +223 -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 +151 -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 +150 -0
- package/dist/locale/messages-en.js.map +1 -0
- package/dist/locale/toolkit-messages.d.ts +39 -0
- package/dist/locale/toolkit-messages.d.ts.map +1 -0
- package/dist/locale/toolkit-messages.js +50 -0
- package/dist/locale/toolkit-messages.js.map +1 -0
- package/dist/primitives/alert.d.ts.map +1 -1
- package/dist/primitives/alert.js +4 -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 +14 -6
- package/dist/primitives/badge.js.map +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 +14 -7
- 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 +5 -2
- 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 +12 -6
- 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/render-cases.d.ts.map +1 -1
- package/dist/render-cases.js +20 -2
- package/dist/render-cases.js.map +1 -1
- 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 +196 -39
- package/dist/theme/create-theme.d.ts.map +1 -1
- package/dist/theme/create-theme.js +189 -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 +9 -4
- package/src/app/builder/BuilderBanners.tsx +26 -13
- package/src/app/builder/CanvasRow.tsx +22 -21
- package/src/app/builder/CatalogueSheet.tsx +16 -14
- package/src/app/builder/EmptyHint.tsx +16 -11
- package/src/app/builder/LayoutSurface.tsx +7 -7
- package/src/app/builder/PipelineStrip.tsx +26 -17
- package/src/app/builder/SaveDialog.tsx +11 -12
- package/src/app/builder/Toolbar.tsx +19 -7
- package/src/app/builder/Workspace.tsx +5 -3
- 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 +5 -4
- package/src/app/builder/labels.ts +15 -121
- package/src/app/builder/status-chip.tsx +8 -4
- package/src/app/builder/use-builder-catalogue.ts +6 -0
- package/src/app/builder/use-save-dashboard.ts +5 -0
- package/src/app/index.ts +8 -1
- package/src/app/layout-builder.tsx +23 -3
- package/src/app/mcp-app-view-chrome.test.tsx +347 -14
- package/src/app/mcp-app-view-chrome.tsx +278 -100
- package/src/app/mcp-app-view-states.tsx +100 -0
- package/src/app/mcp-app-view.test.tsx +258 -0
- package/src/app/mcp-app-view.tsx +292 -185
- package/src/app/mcp-toolkit-app.tsx +31 -7
- package/src/app/use-view-lifecycle.ts +116 -0
- package/src/app/view-lifecycle.test.ts +227 -0
- package/src/app/view-lifecycle.ts +174 -0
- package/src/app/widget-props-sheet.tsx +13 -26
- package/src/app/widget-renderer.render.test.tsx +131 -0
- package/src/app/widget-renderer.tsx +136 -38
- package/src/components/DrillButton.tsx +2 -1
- package/src/components/EmptyState.tsx +81 -0
- package/src/components/ErrorState.tsx +182 -0
- package/src/components/FilterBar.tsx +9 -6
- package/src/components/GroupCard.tsx +3 -2
- package/src/components/KpiGrid.tsx +75 -44
- package/src/components/ListFooter.tsx +17 -6
- package/src/components/Pills.tsx +20 -11
- package/src/components/Toast.tsx +188 -0
- package/src/components/WidgetHeader.tsx +1 -1
- package/src/components/feedback-states.test.tsx +225 -0
- package/src/components/tone-figures.test.tsx +54 -0
- package/src/fonts.css +19 -0
- package/src/globals.css +9 -165
- package/src/hooks/use-tool-result-recovery.test.ts +25 -1
- package/src/hooks/use-tool-result-recovery.ts +34 -6
- package/src/hooks/use-view-data.test.tsx +60 -0
- package/src/hooks/use-view-data.ts +12 -1
- package/src/i18n-coverage.test.tsx +323 -0
- package/src/index.ts +57 -5
- 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/toast-model.test.ts +68 -0
- package/src/lib/toast-model.ts +63 -0
- package/src/lib/tone-utils.test.ts +47 -14
- package/src/lib/tone-utils.ts +61 -13
- package/src/locale/index.ts +13 -1
- package/src/locale/locale-provider.test.tsx +87 -0
- package/src/locale/locale-provider.tsx +90 -3
- package/src/locale/message-types.ts +221 -0
- package/src/locale/messages-de.ts +159 -0
- package/src/locale/messages-en.ts +157 -0
- package/src/locale/toolkit-messages.test.ts +216 -0
- package/src/locale/toolkit-messages.ts +82 -0
- package/src/no-hardcoded-copy.test.ts +432 -0
- package/src/primitives/alert.tsx +4 -2
- package/src/primitives/badge.tsx +14 -7
- package/src/primitives/button.tsx +13 -8
- package/src/primitives/card.tsx +4 -4
- package/src/primitives/dialog.tsx +32 -7
- package/src/primitives/input.tsx +5 -3
- package/src/primitives/scroll-area.tsx +1 -1
- package/src/primitives/select.tsx +6 -3
- package/src/primitives/sheet.tsx +26 -6
- package/src/primitives/skeleton.tsx +1 -1
- package/src/primitives/switch.tsx +4 -2
- package/src/primitives/tabs.tsx +9 -6
- package/src/render-cases.tsx +45 -1
- package/src/render-scan.ts +75 -0
- package/src/theme/cd-tokens.generated.css +48 -0
- package/src/theme/cd-tokens.test.ts +107 -0
- package/src/theme/cd-tokens.ts +67 -0
- package/src/theme/create-theme.test.ts +243 -5
- package/src/theme/create-theme.ts +313 -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 +568 -0
- package/src/theme/theme-provider.test.tsx +82 -0
- package/src/theme/theme-provider.tsx +60 -24
- package/src/theme.css +314 -0
- package/ui-catalog.json +344 -17
package/ui-catalog.json
CHANGED
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"props": [
|
|
47
47
|
{
|
|
48
48
|
"name": "variant",
|
|
49
|
-
"type": "\"default\" | \"secondary\" | \"destructive\" | \"outline\" | \"ghost\" | \"link\"",
|
|
49
|
+
"type": "\"default\" | \"secondary\" | \"destructive\" | \"success\" | \"warning\" | \"info\" | \"outline\" | \"ghost\" | \"link\"",
|
|
50
50
|
"required": false,
|
|
51
|
-
"description": "Visual style. Default 'default'."
|
|
51
|
+
"description": "Visual style. Default 'default'. destructive/success/warning/info follow the tone model: tint + foreground text, rim in the tone (TONE_SOFT + TONE_BORDER)."
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
"name": "className",
|
|
@@ -411,7 +411,7 @@
|
|
|
411
411
|
"description": "Group header shown above the strip when boxed: { label, badge? }."
|
|
412
412
|
}
|
|
413
413
|
],
|
|
414
|
-
"whenToUse": "Show a row of headline metrics in a widget (replaces the old single-metric KPICard). Pre-format values for locale/currency.
|
|
414
|
+
"whenToUse": "Show a row of headline metrics in a widget (replaces the old single-metric KPICard). Pre-format values for locale/currency. A cell tone (e.g. 'danger') shows as a status dot next to its label — figures stay in the foreground colour; set onClick to make a metric a drill target."
|
|
415
415
|
},
|
|
416
416
|
{
|
|
417
417
|
"name": "LivePill",
|
|
@@ -424,7 +424,7 @@
|
|
|
424
424
|
"name": "tone",
|
|
425
425
|
"type": "ToneVariant",
|
|
426
426
|
"required": false,
|
|
427
|
-
"description": "Status tone driving the dot
|
|
427
|
+
"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
428
|
},
|
|
429
429
|
{
|
|
430
430
|
"name": "children",
|
|
@@ -446,7 +446,7 @@
|
|
|
446
446
|
"name": "tone",
|
|
447
447
|
"type": "ToneVariant",
|
|
448
448
|
"required": false,
|
|
449
|
-
"description": "Status tone driving the tint. Default 'neutral'."
|
|
449
|
+
"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. Default 'neutral'."
|
|
450
450
|
},
|
|
451
451
|
{
|
|
452
452
|
"name": "children",
|
|
@@ -680,10 +680,10 @@
|
|
|
680
680
|
"name": "noun",
|
|
681
681
|
"type": "string",
|
|
682
682
|
"required": false,
|
|
683
|
-
"description": "Plural noun for the count, e.g. 'instances'. Default 'rows
|
|
683
|
+
"description": "Plural noun for the count, e.g. 'instances'. Default: the locale's word for rows."
|
|
684
684
|
}
|
|
685
685
|
],
|
|
686
|
-
"whenToUse": "Footer for a paginated list: an honest 'Showing X of Y' total + an explicit 'Load more' (not infinite scroll)."
|
|
686
|
+
"whenToUse": "Footer for a paginated list: an honest 'Showing X of Y' total + an explicit 'Load more' (not infinite scroll). Text and number format follow the active locale."
|
|
687
687
|
},
|
|
688
688
|
{
|
|
689
689
|
"name": "Tone tokens",
|
|
@@ -691,9 +691,156 @@
|
|
|
691
691
|
"importPath": "@miragon/mcp-toolkit-ui",
|
|
692
692
|
"kind": "object",
|
|
693
693
|
"group": "composed",
|
|
694
|
-
"parts": ["TONE_SOFT", "TONE_DOT", "TONE_TEXT"],
|
|
694
|
+
"parts": ["TONE_SOFT", "TONE_DOT", "TONE_TEXT", "TONE_BORDER", "TONE_ICON"],
|
|
695
695
|
"props": [],
|
|
696
|
-
"whenToUse": "Record<ToneVariant, string> maps from a status tone ('neutral'|'info'|'success'|'warning'|'danger') to Tailwind class strings (
|
|
696
|
+
"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; never put TONE_TEXT/-ink on a tint) and the TEXT colour for a tone's words on a plain surface (TONE_TEXT = the tone's -ink role). 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, Badge, WidgetHeader) consume these internally."
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
"name": "ToastProvider",
|
|
700
|
+
"export": "ToastProvider",
|
|
701
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
702
|
+
"kind": "component",
|
|
703
|
+
"group": "feedback",
|
|
704
|
+
"props": [
|
|
705
|
+
{
|
|
706
|
+
"name": "children",
|
|
707
|
+
"type": "ReactNode",
|
|
708
|
+
"required": true,
|
|
709
|
+
"description": "Subtree that raises toasts via useToast."
|
|
710
|
+
}
|
|
711
|
+
],
|
|
712
|
+
"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 (role=status, aria-live=polite), 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)."
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
"name": "useToast",
|
|
716
|
+
"export": "useToast",
|
|
717
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
718
|
+
"kind": "hook",
|
|
719
|
+
"group": "feedback",
|
|
720
|
+
"props": [],
|
|
721
|
+
"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."
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
"name": "EmptyState",
|
|
725
|
+
"export": "EmptyState",
|
|
726
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
727
|
+
"kind": "component",
|
|
728
|
+
"group": "feedback",
|
|
729
|
+
"props": [
|
|
730
|
+
{
|
|
731
|
+
"name": "title",
|
|
732
|
+
"type": "ReactNode",
|
|
733
|
+
"required": true,
|
|
734
|
+
"description": "What is empty, in plain words."
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
"name": "description",
|
|
738
|
+
"type": "ReactNode",
|
|
739
|
+
"required": false,
|
|
740
|
+
"description": "One help line: why it is empty or what to do next."
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
"name": "icon",
|
|
744
|
+
"type": "ReactNode",
|
|
745
|
+
"required": false,
|
|
746
|
+
"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."
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
"name": "tone",
|
|
750
|
+
"type": "'neutral' | 'success'",
|
|
751
|
+
"required": false,
|
|
752
|
+
"description": "Icon colour; 'success' for an 'all done' state. Default 'neutral'."
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
"name": "action",
|
|
756
|
+
"type": "ReactNode",
|
|
757
|
+
"required": false,
|
|
758
|
+
"description": "The primary next step (a Button)."
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
"name": "secondaryAction",
|
|
762
|
+
"type": "ReactNode",
|
|
763
|
+
"required": false,
|
|
764
|
+
"description": "An optional second, quieter step (at most two actions)."
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
"name": "titleAs",
|
|
768
|
+
"type": "'h2' | 'h3' | 'h4' | 'p'",
|
|
769
|
+
"required": false,
|
|
770
|
+
"description": "Title element. Default 'h3'."
|
|
771
|
+
}
|
|
772
|
+
],
|
|
773
|
+
"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'."
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
"name": "ErrorState",
|
|
777
|
+
"export": "ErrorState",
|
|
778
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
779
|
+
"kind": "component",
|
|
780
|
+
"group": "feedback",
|
|
781
|
+
"props": [
|
|
782
|
+
{
|
|
783
|
+
"name": "title",
|
|
784
|
+
"type": "ReactNode",
|
|
785
|
+
"required": true,
|
|
786
|
+
"description": "What happened, in plain words."
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
"name": "description",
|
|
790
|
+
"type": "ReactNode",
|
|
791
|
+
"required": false,
|
|
792
|
+
"description": "What you can do next (or the human reason)."
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
"name": "details",
|
|
796
|
+
"type": "ReactNode",
|
|
797
|
+
"required": false,
|
|
798
|
+
"description": "The raw technical reason, shown collapsed under a 'Details' disclosure."
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
"name": "onRetry",
|
|
802
|
+
"type": "() => void",
|
|
803
|
+
"required": false,
|
|
804
|
+
"description": "Renders a retry button (label from the locale) when set."
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
"name": "actions",
|
|
808
|
+
"type": "ReactNode",
|
|
809
|
+
"required": false,
|
|
810
|
+
"description": "Further actions after the retry button."
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
"name": "tone",
|
|
814
|
+
"type": "'danger' | 'warning' | 'info'",
|
|
815
|
+
"required": false,
|
|
816
|
+
"description": "Default 'danger'."
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
"name": "variant",
|
|
820
|
+
"type": "'block' | 'inline'",
|
|
821
|
+
"required": false,
|
|
822
|
+
"description": "'block' replaces a view or widget body; 'inline' is an alert above content that still renders. Default 'block'."
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
"name": "role",
|
|
826
|
+
"type": "'alert' | 'status' | 'none'",
|
|
827
|
+
"required": false,
|
|
828
|
+
"description": "Live-region role. Default 'alert'."
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
"name": "icon",
|
|
832
|
+
"type": "LucideIcon",
|
|
833
|
+
"required": false,
|
|
834
|
+
"description": "Replace the tone's default Lucide icon."
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
"name": "titleAs",
|
|
838
|
+
"type": "'h2' | 'h3' | 'h4' | 'p'",
|
|
839
|
+
"required": false,
|
|
840
|
+
"description": "Title element. Default 'h2' (block) / 'p' (inline)."
|
|
841
|
+
}
|
|
842
|
+
],
|
|
843
|
+
"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
844
|
},
|
|
698
845
|
{
|
|
699
846
|
"name": "useDebouncedValue",
|
|
@@ -845,7 +992,7 @@
|
|
|
845
992
|
"description": "Whether the required id/key is present; fetch is disabled until ready and only when no initialData."
|
|
846
993
|
}
|
|
847
994
|
],
|
|
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 }."
|
|
995
|
+
"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 }; pass refetch as the error state's retry (<ErrorState onRetry={refetch} />)."
|
|
849
996
|
},
|
|
850
997
|
{
|
|
851
998
|
"name": "useIsMobile",
|
|
@@ -1097,16 +1244,16 @@
|
|
|
1097
1244
|
"name": "tokens",
|
|
1098
1245
|
"type": "ThemeTokens",
|
|
1099
1246
|
"required": true,
|
|
1100
|
-
"description": "
|
|
1247
|
+
"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
1248
|
},
|
|
1102
1249
|
{
|
|
1103
1250
|
"name": "opts",
|
|
1104
1251
|
"type": "{ dark?: ThemeTokens }",
|
|
1105
1252
|
"required": false,
|
|
1106
|
-
"description": "Dark-mode token overrides
|
|
1253
|
+
"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
1254
|
}
|
|
1108
1255
|
],
|
|
1109
|
-
"whenToUse": "Define a white-label theme
|
|
1256
|
+
"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
1257
|
},
|
|
1111
1258
|
{
|
|
1112
1259
|
"name": "ThemeProvider",
|
|
@@ -1119,7 +1266,7 @@
|
|
|
1119
1266
|
"name": "theme",
|
|
1120
1267
|
"type": "ThemeDefinition",
|
|
1121
1268
|
"required": false,
|
|
1122
|
-
"description": "The theme from createTheme
|
|
1269
|
+
"description": "The theme from createTheme to apply. Omit to manage only the light/dark mode against the toolkit defaults (the Miragon theme)."
|
|
1123
1270
|
},
|
|
1124
1271
|
{
|
|
1125
1272
|
"name": "mode",
|
|
@@ -1146,7 +1293,7 @@
|
|
|
1146
1293
|
"description": "Subtree that inherits the theme's CSS variables and dark class."
|
|
1147
1294
|
}
|
|
1148
1295
|
],
|
|
1149
|
-
"whenToUse": "Wrap a widget (or a whole app) to apply a ThemeDefinition
|
|
1296
|
+
"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
1297
|
},
|
|
1151
1298
|
{
|
|
1152
1299
|
"name": "useTheme",
|
|
@@ -1164,7 +1311,119 @@
|
|
|
1164
1311
|
"kind": "object",
|
|
1165
1312
|
"group": "theming",
|
|
1166
1313
|
"props": [],
|
|
1167
|
-
"whenToUse": "Ready-made white-label themes
|
|
1314
|
+
"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."
|
|
1315
|
+
},
|
|
1316
|
+
{
|
|
1317
|
+
"name": "resolveThemeVars",
|
|
1318
|
+
"export": "resolveThemeVars",
|
|
1319
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1320
|
+
"kind": "function",
|
|
1321
|
+
"group": "theming",
|
|
1322
|
+
"props": [
|
|
1323
|
+
{
|
|
1324
|
+
"name": "theme",
|
|
1325
|
+
"type": "ThemeDefinition | null | undefined",
|
|
1326
|
+
"required": true,
|
|
1327
|
+
"description": "The theme; null/undefined yields {}."
|
|
1328
|
+
},
|
|
1329
|
+
{
|
|
1330
|
+
"name": "mode",
|
|
1331
|
+
"type": "\"light\" | \"dark\"",
|
|
1332
|
+
"required": true,
|
|
1333
|
+
"description": "The resolved mode of the scope."
|
|
1334
|
+
}
|
|
1335
|
+
],
|
|
1336
|
+
"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."
|
|
1337
|
+
},
|
|
1338
|
+
{
|
|
1339
|
+
"name": "ROLE_TOKENS",
|
|
1340
|
+
"export": "ROLE_TOKENS",
|
|
1341
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1342
|
+
"kind": "object",
|
|
1343
|
+
"group": "theming",
|
|
1344
|
+
"props": [],
|
|
1345
|
+
"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."
|
|
1346
|
+
},
|
|
1347
|
+
{
|
|
1348
|
+
"name": "usePortalContainer",
|
|
1349
|
+
"export": "usePortalContainer",
|
|
1350
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1351
|
+
"kind": "hook",
|
|
1352
|
+
"group": "theming",
|
|
1353
|
+
"props": [],
|
|
1354
|
+
"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."
|
|
1355
|
+
},
|
|
1356
|
+
{
|
|
1357
|
+
"name": "CD_TOKENS",
|
|
1358
|
+
"export": "CD_TOKENS",
|
|
1359
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1360
|
+
"kind": "object",
|
|
1361
|
+
"group": "theming",
|
|
1362
|
+
"parts": ["CD_TOKENS", "CD_TOKENS_VERSION"],
|
|
1363
|
+
"props": [],
|
|
1364
|
+
"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."
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
"name": "fontFaces",
|
|
1368
|
+
"export": "fontFaces",
|
|
1369
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1370
|
+
"kind": "function",
|
|
1371
|
+
"group": "theming",
|
|
1372
|
+
"parts": ["fontFaces", "GEIST_FONT_FILES"],
|
|
1373
|
+
"props": [
|
|
1374
|
+
{
|
|
1375
|
+
"name": "baseUrl",
|
|
1376
|
+
"type": "string",
|
|
1377
|
+
"required": true,
|
|
1378
|
+
"description": "Where the woff2 files (GEIST_FONT_FILES) are served from."
|
|
1379
|
+
},
|
|
1380
|
+
{
|
|
1381
|
+
"name": "files",
|
|
1382
|
+
"type": "{ sans?: string; mono?: string }",
|
|
1383
|
+
"required": false,
|
|
1384
|
+
"description": "File-name overrides."
|
|
1385
|
+
},
|
|
1386
|
+
{
|
|
1387
|
+
"name": "display",
|
|
1388
|
+
"type": "\"auto\" | \"block\" | \"swap\" | \"fallback\" | \"optional\"",
|
|
1389
|
+
"required": false,
|
|
1390
|
+
"description": "Default 'swap'."
|
|
1391
|
+
}
|
|
1392
|
+
],
|
|
1393
|
+
"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."
|
|
1394
|
+
},
|
|
1395
|
+
{
|
|
1396
|
+
"name": "adoptHostFontVariables",
|
|
1397
|
+
"export": "adoptHostFontVariables",
|
|
1398
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1399
|
+
"kind": "function",
|
|
1400
|
+
"group": "theming",
|
|
1401
|
+
"parts": ["adoptHostFontVariables", "HOST_FONT_VARIABLES"],
|
|
1402
|
+
"props": [
|
|
1403
|
+
{
|
|
1404
|
+
"name": "style",
|
|
1405
|
+
"type": "InlineStyleTarget",
|
|
1406
|
+
"required": true,
|
|
1407
|
+
"description": "The inline style the host variables were applied to, normally document.documentElement.style."
|
|
1408
|
+
},
|
|
1409
|
+
{
|
|
1410
|
+
"name": "hostVariables",
|
|
1411
|
+
"type": "Record<string, string | undefined> | null | undefined",
|
|
1412
|
+
"required": true,
|
|
1413
|
+
"description": "The host's SEP-1865 style variables (hostContext.styles.variables)."
|
|
1414
|
+
}
|
|
1415
|
+
],
|
|
1416
|
+
"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."
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
"name": "FOCUS_RING",
|
|
1420
|
+
"export": "FOCUS_RING",
|
|
1421
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1422
|
+
"kind": "object",
|
|
1423
|
+
"group": "widget-authoring",
|
|
1424
|
+
"parts": ["FOCUS_RING", "FOCUS_RING_INSET"],
|
|
1425
|
+
"props": [],
|
|
1426
|
+
"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)."
|
|
1168
1427
|
},
|
|
1169
1428
|
{
|
|
1170
1429
|
"name": "LocaleProvider",
|
|
@@ -1185,6 +1444,12 @@
|
|
|
1185
1444
|
"required": false,
|
|
1186
1445
|
"description": "A translator from createTranslator(catalogs) (@miragon/mcp-toolkit-core). Omit to provide the locale only (useTranslate echoes keys)."
|
|
1187
1446
|
},
|
|
1447
|
+
{
|
|
1448
|
+
"name": "toolkitMessages",
|
|
1449
|
+
"type": "ToolkitMessagesOverride",
|
|
1450
|
+
"required": false,
|
|
1451
|
+
"description": "Override individual toolkit strings per catalog section (e.g. { listFooter: { loadMore: 'Show more' } }). Omitted entries keep the shipped en/de catalog of locale."
|
|
1452
|
+
},
|
|
1188
1453
|
{
|
|
1189
1454
|
"name": "children",
|
|
1190
1455
|
"type": "ReactNode",
|
|
@@ -1192,7 +1457,7 @@
|
|
|
1192
1457
|
"description": "Subtree whose widgets read the locale via useLocale/useTranslate."
|
|
1193
1458
|
}
|
|
1194
1459
|
],
|
|
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."
|
|
1460
|
+
"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
1461
|
},
|
|
1197
1462
|
{
|
|
1198
1463
|
"name": "useLocale",
|
|
@@ -1212,6 +1477,68 @@
|
|
|
1212
1477
|
"props": [],
|
|
1213
1478
|
"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
1479
|
},
|
|
1480
|
+
{
|
|
1481
|
+
"name": "useToolkitMessages",
|
|
1482
|
+
"export": "useToolkitMessages",
|
|
1483
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1484
|
+
"kind": "hook",
|
|
1485
|
+
"group": "i18n",
|
|
1486
|
+
"props": [],
|
|
1487
|
+
"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)."
|
|
1488
|
+
},
|
|
1489
|
+
{
|
|
1490
|
+
"name": "TOOLKIT_MESSAGES",
|
|
1491
|
+
"export": "TOOLKIT_MESSAGES",
|
|
1492
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1493
|
+
"kind": "object",
|
|
1494
|
+
"group": "i18n",
|
|
1495
|
+
"props": [],
|
|
1496
|
+
"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."
|
|
1497
|
+
},
|
|
1498
|
+
{
|
|
1499
|
+
"name": "resolveToolkitMessages",
|
|
1500
|
+
"export": "resolveToolkitMessages",
|
|
1501
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1502
|
+
"kind": "function",
|
|
1503
|
+
"group": "i18n",
|
|
1504
|
+
"props": [
|
|
1505
|
+
{
|
|
1506
|
+
"name": "locale",
|
|
1507
|
+
"type": "string | undefined",
|
|
1508
|
+
"required": true,
|
|
1509
|
+
"description": "Any BCP 47 tag; its primary language picks the catalog (en fallback)."
|
|
1510
|
+
},
|
|
1511
|
+
{
|
|
1512
|
+
"name": "override",
|
|
1513
|
+
"type": "ToolkitMessagesOverride",
|
|
1514
|
+
"required": false,
|
|
1515
|
+
"description": "Per-section partial override merged over the catalog."
|
|
1516
|
+
}
|
|
1517
|
+
],
|
|
1518
|
+
"whenToUse": "Resolve the toolkit catalog outside React (the pure function behind LocaleProvider/useToolkitMessages)."
|
|
1519
|
+
},
|
|
1520
|
+
{
|
|
1521
|
+
"name": "formatCount",
|
|
1522
|
+
"export": "formatCount",
|
|
1523
|
+
"importPath": "@miragon/mcp-toolkit-ui",
|
|
1524
|
+
"kind": "function",
|
|
1525
|
+
"group": "i18n",
|
|
1526
|
+
"props": [
|
|
1527
|
+
{
|
|
1528
|
+
"name": "value",
|
|
1529
|
+
"type": "number",
|
|
1530
|
+
"required": true,
|
|
1531
|
+
"description": "The count."
|
|
1532
|
+
},
|
|
1533
|
+
{
|
|
1534
|
+
"name": "locale",
|
|
1535
|
+
"type": "string | undefined",
|
|
1536
|
+
"required": true,
|
|
1537
|
+
"description": "The app locale (from useLocale), not the browser's."
|
|
1538
|
+
}
|
|
1539
|
+
],
|
|
1540
|
+
"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."
|
|
1541
|
+
},
|
|
1215
1542
|
{
|
|
1216
1543
|
"name": "McpToolkitApp",
|
|
1217
1544
|
"export": "McpToolkitApp",
|