@seed-ship/mcp-ui-solid 6.25.1 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +14 -0
  3. package/dist/adapters/connector.cjs +3 -3
  4. package/dist/adapters/connector.cjs.map +1 -1
  5. package/dist/adapters/connector.d.cts +108 -0
  6. package/dist/adapters/connector.d.ts +1 -2
  7. package/dist/adapters/connector.js +3 -3
  8. package/dist/adapters/connector.js.map +1 -1
  9. package/dist/adapters/index.d.cts +21 -0
  10. package/dist/adapters/index.d.ts +6 -7
  11. package/dist/adapters/macro-run.d.cts +99 -0
  12. package/dist/adapters/macro-run.d.ts +1 -2
  13. package/dist/adapters/presentation.d.cts +1 -2
  14. package/dist/adapters/presentation.d.ts +1 -2
  15. package/dist/adapters.d.cts +1 -1
  16. package/dist/adapters.d.ts +1 -1
  17. package/dist/components/ActionGroupRenderer.d.cts +38 -0
  18. package/dist/components/ActionGroupRenderer.d.ts +1 -2
  19. package/dist/components/ActionRenderer.d.cts +9 -0
  20. package/dist/components/ActionRenderer.d.ts +0 -1
  21. package/dist/components/AgentCard.d.cts +19 -0
  22. package/dist/components/AgentCard.d.ts +1 -2
  23. package/dist/components/AgentHandoff.d.cts +11 -0
  24. package/dist/components/AgentHandoff.d.ts +1 -2
  25. package/dist/components/ArtifactRenderer.d.cts +11 -0
  26. package/dist/components/ArtifactRenderer.d.ts +0 -1
  27. package/dist/components/AutocompleteDropdown.d.cts +70 -0
  28. package/dist/components/AutocompleteDropdown.d.ts +1 -2
  29. package/dist/components/AutocompleteFormField.d.cts +51 -0
  30. package/dist/components/AutocompleteFormField.d.ts +1 -2
  31. package/dist/components/BriefingDiff.d.cts +11 -0
  32. package/dist/components/BriefingDiff.d.ts +1 -2
  33. package/dist/components/CarouselRenderer.d.cts +12 -0
  34. package/dist/components/CarouselRenderer.d.ts +1 -2
  35. package/dist/components/ChartJSRenderer.d.cts +62 -0
  36. package/dist/components/ChartJSRenderer.d.ts +1 -2
  37. package/dist/components/ChatPrompt.d.cts +69 -0
  38. package/dist/components/ChatPrompt.d.ts +1 -2
  39. package/dist/components/CodeBlockRenderer.d.cts +23 -0
  40. package/dist/components/CodeBlockRenderer.d.ts +1 -2
  41. package/dist/components/ComponentToolbar.d.cts +46 -0
  42. package/dist/components/ComponentToolbar.d.ts +0 -1
  43. package/dist/components/DataPreviewSection.d.cts +11 -0
  44. package/dist/components/DataPreviewSection.d.ts +1 -2
  45. package/dist/components/DegradedFallback.d.cts +43 -0
  46. package/dist/components/DegradedFallback.d.ts +0 -1
  47. package/dist/components/DraggableGridItem.d.cts +94 -0
  48. package/dist/components/DraggableGridItem.d.ts +1 -2
  49. package/dist/components/EditableLayoutContext.d.cts +4 -0
  50. package/dist/components/EditableLayoutContext.d.ts +0 -1
  51. package/dist/components/EditableUIResourceRenderer.d.cts +42 -0
  52. package/dist/components/EditableUIResourceRenderer.d.ts +1 -2
  53. package/dist/components/ElicitationForm.d.cts +67 -0
  54. package/dist/components/ElicitationForm.d.ts +1 -2
  55. package/dist/components/ExpandableWrapper.d.cts +49 -0
  56. package/dist/components/ExpandableWrapper.d.ts +0 -1
  57. package/dist/components/FeedbackInline.d.cts +70 -0
  58. package/dist/components/FeedbackInline.d.ts +0 -1
  59. package/dist/components/FooterRenderer.d.cts +15 -0
  60. package/dist/components/FooterRenderer.d.ts +0 -1
  61. package/dist/components/FormFieldRenderer.d.cts +19 -0
  62. package/dist/components/FormFieldRenderer.d.ts +1 -2
  63. package/dist/components/FormRenderer.d.cts +14 -0
  64. package/dist/components/FormRenderer.d.ts +1 -2
  65. package/dist/components/GenerativeUIErrorBoundary.d.cts +58 -0
  66. package/dist/components/GenerativeUIErrorBoundary.d.ts +1 -2
  67. package/dist/components/GenerativeUIErrorBoundary.default.d.cts +1 -0
  68. package/dist/components/GenerativeUIErrorBoundary.default.d.ts +1 -2
  69. package/dist/components/GhostText.d.cts +112 -0
  70. package/dist/components/GhostText.d.ts +0 -1
  71. package/dist/components/GraphRenderer.d.cts +66 -0
  72. package/dist/components/GraphRenderer.d.ts +1 -2
  73. package/dist/components/GridRenderer.d.cts +49 -0
  74. package/dist/components/GridRenderer.d.ts +1 -2
  75. package/dist/components/IframeFallbackLink.d.cts +22 -0
  76. package/dist/components/IframeFallbackLink.d.ts +0 -1
  77. package/dist/components/ImageGalleryRenderer.d.cts +22 -0
  78. package/dist/components/ImageGalleryRenderer.d.ts +1 -2
  79. package/dist/components/LightboxOverlay.d.cts +31 -0
  80. package/dist/components/LightboxOverlay.d.ts +1 -2
  81. package/dist/components/MapRenderer.d.cts +77 -0
  82. package/dist/components/MapRenderer.d.ts +1 -2
  83. package/dist/components/MissingValue.d.cts +26 -0
  84. package/dist/components/MissingValue.d.ts +0 -1
  85. package/dist/components/ModalRenderer.d.cts +66 -0
  86. package/dist/components/ModalRenderer.d.ts +1 -2
  87. package/dist/components/PortalDropdownMenu.d.cts +55 -0
  88. package/dist/components/PortalDropdownMenu.d.ts +0 -1
  89. package/dist/components/PresentationFeedback.d.cts +112 -0
  90. package/dist/components/PresentationFeedback.d.ts +0 -1
  91. package/dist/components/RenderContext.d.cts +41 -0
  92. package/dist/components/RenderContext.d.ts +1 -2
  93. package/dist/components/ResizeHandle.d.cts +49 -0
  94. package/dist/components/ResizeHandle.d.ts +0 -1
  95. package/dist/components/SafeHtml.d.cts +45 -0
  96. package/dist/components/SafeHtml.d.ts +0 -1
  97. package/dist/components/ScratchpadPanel.d.cts +34 -0
  98. package/dist/components/ScratchpadPanel.d.ts +1 -2
  99. package/dist/components/SplitStepper.d.cts +11 -0
  100. package/dist/components/SplitStepper.d.ts +1 -2
  101. package/dist/components/StreamingUIRenderer.d.cts +58 -0
  102. package/dist/components/StreamingUIRenderer.d.ts +3 -4
  103. package/dist/components/UIResourceRenderer.d.cts +181 -0
  104. package/dist/components/UIResourceRenderer.d.ts +3 -4
  105. package/dist/components/UIResourceRenderer.default.d.cts +1 -0
  106. package/dist/components/UIResourceRenderer.default.d.ts +1 -2
  107. package/dist/components/VerifiedText.d.cts +22 -0
  108. package/dist/components/VerifiedText.d.ts +1 -2
  109. package/dist/components/VideoRenderer.d.cts +41 -0
  110. package/dist/components/VideoRenderer.d.ts +1 -2
  111. package/dist/components/chart-data-table.d.cts +68 -0
  112. package/dist/components/chart-data-table.d.ts +0 -1
  113. package/dist/components/chart-missing-plugin.d.cts +128 -0
  114. package/dist/components/chart-missing-plugin.d.ts +1 -2
  115. package/dist/components/index.d.cts +62 -0
  116. package/dist/components/index.d.ts +57 -58
  117. package/dist/components.d.cts +2 -2
  118. package/dist/components.d.ts +2 -2
  119. package/dist/context/AutocompleteContext.d.cts +76 -0
  120. package/dist/context/AutocompleteContext.d.ts +1 -2
  121. package/dist/context/MCPActionContext.d.cts +169 -0
  122. package/dist/context/MCPActionContext.d.ts +0 -1
  123. package/dist/context/MCPUIConfigContext.d.cts +201 -0
  124. package/dist/context/MCPUIConfigContext.d.ts +1 -2
  125. package/dist/context/MCPUIMathContext.d.cts +17 -0
  126. package/dist/context/MCPUIMathContext.d.ts +0 -1
  127. package/dist/context/MCPUIStringsContext.d.cts +802 -0
  128. package/dist/context/MCPUIStringsContext.d.ts +1 -2
  129. package/dist/context/MCPUITelemetryContext.d.cts +35 -0
  130. package/dist/context/MCPUITelemetryContext.d.ts +1 -2
  131. package/dist/context/index.d.cts +7 -0
  132. package/dist/context/index.d.ts +2 -3
  133. package/dist/hooks/createResponsiveGrid.d.cts +5 -0
  134. package/dist/hooks/createResponsiveGrid.d.ts +0 -1
  135. package/dist/hooks/index.d.cts +25 -0
  136. package/dist/hooks/index.d.ts +20 -21
  137. package/dist/hooks/useAction.d.cts +164 -0
  138. package/dist/hooks/useAction.d.ts +2 -3
  139. package/dist/hooks/useAutocomplete.d.cts +118 -0
  140. package/dist/hooks/useAutocomplete.d.ts +1 -2
  141. package/dist/hooks/useChatBus.d.cts +55 -0
  142. package/dist/hooks/useChatBus.d.ts +1 -2
  143. package/dist/hooks/useConditionalField.d.cts +34 -0
  144. package/dist/hooks/useConditionalField.d.ts +1 -2
  145. package/dist/hooks/useDataValidator.d.cts +41 -0
  146. package/dist/hooks/useDataValidator.d.ts +1 -2
  147. package/dist/hooks/useDragDrop.d.cts +99 -0
  148. package/dist/hooks/useDragDrop.d.ts +1 -2
  149. package/dist/hooks/useFormPersistence.d.cts +80 -0
  150. package/dist/hooks/useFormPersistence.d.ts +0 -1
  151. package/dist/hooks/useModal.d.cts +106 -0
  152. package/dist/hooks/useModal.d.ts +0 -1
  153. package/dist/hooks/useResize.d.cts +86 -0
  154. package/dist/hooks/useResize.d.ts +1 -2
  155. package/dist/hooks/useStreamingUI.d.cts +117 -0
  156. package/dist/hooks/useStreamingUI.d.ts +1 -2
  157. package/dist/hooks.d.cts +1 -1
  158. package/dist/hooks.d.ts +1 -1
  159. package/dist/index.d.cts +91 -92
  160. package/dist/index.d.ts +91 -92
  161. package/dist/plugins/duckdb.d.cts +1 -2
  162. package/dist/plugins/duckdb.d.ts +1 -2
  163. package/dist/plugins/groq.d.cts +12 -0
  164. package/dist/plugins/groq.d.ts +1 -2
  165. package/dist/plugins/index.d.cts +9 -0
  166. package/dist/plugins/index.d.ts +3 -4
  167. package/dist/plugins/katex.d.cts +1 -2
  168. package/dist/plugins/katex.d.ts +1 -2
  169. package/dist/plugins/rest.d.cts +12 -0
  170. package/dist/plugins/rest.d.ts +1 -2
  171. package/dist/plugins/supabase.d.cts +12 -0
  172. package/dist/plugins/supabase.d.ts +1 -2
  173. package/dist/services/chat-bus.d.cts +100 -0
  174. package/dist/services/chat-bus.d.ts +1 -2
  175. package/dist/services/chat-prompt-controller.d.cts +92 -0
  176. package/dist/services/chat-prompt-controller.d.ts +1 -2
  177. package/dist/services/component-registry.d.cts +119 -0
  178. package/dist/services/component-registry.d.ts +1 -2
  179. package/dist/services/data-validator.d.cts +27 -0
  180. package/dist/services/data-validator.d.ts +1 -2
  181. package/dist/services/index.d.cts +9 -0
  182. package/dist/services/index.d.ts +4 -5
  183. package/dist/services/telemetry.d.cts +86 -0
  184. package/dist/services/telemetry.d.ts +1 -2
  185. package/dist/services/validation.d.cts +169 -0
  186. package/dist/services/validation.d.ts +1 -2
  187. package/dist/stores/scratchpad-store.d.cts +109 -0
  188. package/dist/stores/scratchpad-store.d.ts +1 -2
  189. package/dist/stores/server-capabilities-store.d.cts +171 -0
  190. package/dist/stores/server-capabilities-store.d.ts +0 -1
  191. package/dist/test-setup.d.cts +5 -0
  192. package/dist/test-setup.d.ts +0 -1
  193. package/dist/testing/index.d.cts +34 -0
  194. package/dist/testing/index.d.ts +1 -2
  195. package/dist/types/chat-bus.d.cts +783 -0
  196. package/dist/types/chat-bus.d.ts +4 -5
  197. package/dist/types/index.d.cts +1616 -0
  198. package/dist/types/index.d.ts +0 -1
  199. package/dist/types-export.d.cts +1 -2
  200. package/dist/types-export.d.ts +1 -2
  201. package/dist/types.d.cts +1 -1
  202. package/dist/types.d.ts +1 -1
  203. package/dist/utils/degraded-projections.d.cts +119 -0
  204. package/dist/utils/degraded-projections.d.ts +0 -1
  205. package/dist/utils/duplicate-mount-registry.d.cts +83 -0
  206. package/dist/utils/duplicate-mount-registry.d.ts +0 -1
  207. package/dist/utils/escape-html.d.cts +12 -0
  208. package/dist/utils/escape-html.d.ts +0 -1
  209. package/dist/utils/format-string.d.cts +25 -0
  210. package/dist/utils/format-string.d.ts +0 -1
  211. package/dist/utils/iframe-coep.d.cts +53 -0
  212. package/dist/utils/iframe-coep.d.ts +1 -2
  213. package/dist/utils/logger.d.cts +57 -0
  214. package/dist/utils/logger.d.ts +0 -1
  215. package/dist/utils/math-markdown.d.cts +15 -0
  216. package/dist/utils/math-markdown.d.ts +1 -2
  217. package/dist/utils/missing-value.d.cts +78 -0
  218. package/dist/utils/missing-value.d.ts +0 -1
  219. package/dist/utils/pan-zoom.d.cts +234 -0
  220. package/dist/utils/pan-zoom.d.ts +0 -1
  221. package/dist/utils/perf.d.cts +18 -0
  222. package/dist/utils/perf.d.ts +0 -1
  223. package/dist/utils/safe-url.d.cts +33 -0
  224. package/dist/utils/safe-url.d.ts +0 -1
  225. package/dist/utils/sanitize-html.d.cts +142 -0
  226. package/dist/utils/sanitize-html.d.ts +0 -1
  227. package/dist/utils/stable-key.d.cts +32 -0
  228. package/dist/utils/stable-key.d.ts +0 -1
  229. package/dist/utils/theme.d.cts +10 -0
  230. package/dist/utils/theme.d.ts +0 -1
  231. package/dist/validation.d.cts +3 -4
  232. package/dist/validation.d.ts +3 -4
  233. package/docs/SECURITY-DEPENDENCIES.md +129 -1
  234. package/docs/ZOD4-STABLE-MIGRATION-2026-10-26.md +181 -0
  235. package/package.json +8 -7
  236. package/src/adapters/connector.ts +3 -3
@@ -1614,4 +1614,3 @@ export interface AutocompleteProviderConfig {
1614
1614
  */
1615
1615
  cacheEnabled?: boolean;
1616
1616
  }
1617
- //# sourceMappingURL=index.d.ts.map
@@ -9,5 +9,4 @@
9
9
  * import type { UILayout, RendererError } from '@seed-ship/mcp-ui-solid/types'
10
10
  * ```
11
11
  */
12
- export type { ComponentType, ChartType, GridPosition, ResourceLimits, ChartComponentParams, TableComponentParams, MetricComponentParams, TextComponentParams, ActionComponentParams, UIComponent, UILayout, ComponentRegistryEntry, ValidationResult, RendererErrorType, RendererError, StreamEventType, StreamEvent, } from './types/index';
13
- //# sourceMappingURL=types-export.d.ts.map
12
+ export type { ComponentType, ChartType, GridPosition, ResourceLimits, ChartComponentParams, TableComponentParams, MetricComponentParams, TextComponentParams, ActionComponentParams, UIComponent, UILayout, ComponentRegistryEntry, ValidationResult, RendererErrorType, RendererError, StreamEventType, StreamEvent, } from "./types/index.cjs";
@@ -9,5 +9,4 @@
9
9
  * import type { UILayout, RendererError } from '@seed-ship/mcp-ui-solid/types'
10
10
  * ```
11
11
  */
12
- export type { ComponentType, ChartType, GridPosition, ResourceLimits, ChartComponentParams, TableComponentParams, MetricComponentParams, TextComponentParams, ActionComponentParams, UIComponent, UILayout, ComponentRegistryEntry, ValidationResult, RendererErrorType, RendererError, StreamEventType, StreamEvent, } from './types/index';
13
- //# sourceMappingURL=types-export.d.ts.map
12
+ export type { ComponentType, ChartType, GridPosition, ResourceLimits, ChartComponentParams, TableComponentParams, MetricComponentParams, TextComponentParams, ActionComponentParams, UIComponent, UILayout, ComponentRegistryEntry, ValidationResult, RendererErrorType, RendererError, StreamEventType, StreamEvent, } from "./types/index.js";
package/dist/types.d.cts CHANGED
@@ -1 +1 @@
1
- export * from './types/index';
1
+ export * from "./types/index.cjs";
package/dist/types.d.ts CHANGED
@@ -1 +1 @@
1
- export * from './types/index';
1
+ export * from "./types/index.js";
@@ -0,0 +1,119 @@
1
+ /**
2
+ * Degraded-fallback projections (audit 2026-05-30, P2.5).
3
+ *
4
+ * Pure functions that turn a heavy renderer's params into a flat
5
+ * `{ columns, rows }` table for `<DegradedFallback>` — the middle rung of
6
+ * the fallback ladder shown when the native render (G6 / Leaflet / Chart.js)
7
+ * is unavailable or throws. No peer deps, no side effects, fully testable.
8
+ *
9
+ * These are best-effort views: they surface the underlying data so the user
10
+ * isn't left with a blank space, not faithful reproductions of the chart/
11
+ * map/graph.
12
+ */
13
+ /**
14
+ * Column headers and series names of the degraded tables.
15
+ *
16
+ * The projections are pure helpers with no access to `MCPUIStrings`, so the
17
+ * wording is injected: each function takes an optional trailing `labels`
18
+ * partial, and the renderers feed it from `useMCPUIStrings()`. Left out, the
19
+ * English defaults below apply — the pre-v6.20.0 behaviour.
20
+ *
21
+ * @since v6.20.0
22
+ */
23
+ export interface DegradedProjectionLabels {
24
+ /** Graph edge table — source column. */
25
+ source: string;
26
+ /** Graph edge table — target column. */
27
+ target: string;
28
+ /** Graph edge / node table — label column. */
29
+ label: string;
30
+ /** Graph node table — node id column. */
31
+ node: string;
32
+ /** Map table — feature type column. */
33
+ type: string;
34
+ /** Map table — latitude column. */
35
+ lat: string;
36
+ /** Map table — longitude column. */
37
+ lng: string;
38
+ /** Map table — property summary column. */
39
+ info: string;
40
+ /** Map table — `Type` cell of a marker row (v6.20.0, 6th pass). */
41
+ marker: string;
42
+ /** Map table — `Type` cell of a GeoJSON feature without a geometry type (v6.20.0). */
43
+ feature: string;
44
+ /** Chart table — fallback dataset name. Template — `{n}`. */
45
+ series: string;
46
+ /**
47
+ * Chart table — a dataset column header followed by the chart's `unit`.
48
+ * Template — `{label}`, `{unit}`. Only applied when the chart has a unit.
49
+ * Optional so that a complete labels table written for 6.20.0–6.23.0 still
50
+ * type-checks. @since v6.24.0
51
+ */
52
+ withUnit?: string;
53
+ }
54
+ /** English defaults for {@link DegradedProjectionLabels}. */
55
+ export declare const DEGRADED_PROJECTION_LABELS: Required<DegradedProjectionLabels>;
56
+ export interface DegradedTable {
57
+ columns: string[];
58
+ rows: Array<Array<string | number>>;
59
+ }
60
+ /** A degraded chart table: its cells, plus which of them are missing values. */
61
+ export interface DegradedChartTable extends DegradedTable {
62
+ /** Same shape as `rows`; `true` for a dataset entry that is missing. @since v6.24.0 */
63
+ missing: boolean[][];
64
+ }
65
+ /**
66
+ * Graph → edge table when edges exist (Source / Target / Label), else a
67
+ * node list (Node / Label). The graph renderer can therefore degrade to a
68
+ * readable relationship listing instead of a blank canvas.
69
+ */
70
+ export declare function graphToDegradedTable(params: {
71
+ nodes?: Array<{
72
+ id: string;
73
+ label?: string;
74
+ }>;
75
+ edges?: Array<{
76
+ source: string;
77
+ target: string;
78
+ label?: string;
79
+ weight?: number;
80
+ }>;
81
+ }, labels?: Partial<DegradedProjectionLabels>): DegradedTable;
82
+ /**
83
+ * Map → a coordinate table. Markers become Lat/Lng/Label rows; GeoJSON
84
+ * features become Type / Lat / Lng (+ a compact properties summary). So a
85
+ * map that can't paint still lists where its points are.
86
+ */
87
+ export declare function mapToDegradedTable(params: {
88
+ markers?: Array<{
89
+ position: [number, number] | {
90
+ lat: number;
91
+ lng: number;
92
+ };
93
+ tooltip?: string;
94
+ popup?: string;
95
+ }>;
96
+ geojson?: unknown;
97
+ }, labels?: Partial<DegradedProjectionLabels>): DegradedTable;
98
+ /**
99
+ * Chart → a series table: one row per label, one column per dataset. So a
100
+ * chart that can't draw still shows its numbers. Point/object data (scatter,
101
+ * bubble, time series) is stringified per cell.
102
+ *
103
+ * `missing` flags the cells whose dataset entry is a missing value (`null`
104
+ * or non-finite) so the table can mark them instead of showing an empty
105
+ * cell. A slot past the end of a shorter or empty dataset has no entry and is
106
+ * not flagged; a point object keeps its JSON text (where a `"y":null` reads
107
+ * as such) and is not flagged either. With a `unit`, dataset column headers
108
+ * become `labels.withUnit`.
109
+ */
110
+ export declare function chartToDegradedTable(params: {
111
+ unit?: string;
112
+ data?: {
113
+ labels?: Array<string | number>;
114
+ datasets?: Array<{
115
+ label?: string;
116
+ data?: unknown[];
117
+ }>;
118
+ };
119
+ }, labels?: Partial<DegradedProjectionLabels>): DegradedChartTable;
@@ -117,4 +117,3 @@ export declare function chartToDegradedTable(params: {
117
117
  }>;
118
118
  };
119
119
  }, labels?: Partial<DegradedProjectionLabels>): DegradedChartTable;
120
- //# sourceMappingURL=degraded-projections.d.ts.map
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Opt-in duplicate-mount registry (v6.5.0).
3
+ *
4
+ * Tracks how many times each `getUiResourceStableKey()` has been mounted
5
+ * concurrently across all `<UIResourceRenderer>` instances. When the same
6
+ * key is mounted more than once, registered reporters fire so consumers
7
+ * can detect double-render bugs in their parent framework.
8
+ *
9
+ * **Opt-in by design** : the registry is always populated (cheap), but
10
+ * notifications only fire when a consumer has wired one of the two opt-in
11
+ * paths :
12
+ * - module-level `setDuplicateMountReporter(fn)` (app-wide telemetry)
13
+ * - per-instance `<UIResourceRenderer onMountDuplicate={fn}>` prop
14
+ *
15
+ * **What this does NOT do** : visual deduplication. The renderer never
16
+ * hides or replaces a duplicate mount automatically — that would mask
17
+ * parent-framework bugs and could remove legitimate co-mounts (e.g. drawer
18
+ * + main panel showing the same card). Consumers who want dedup implement
19
+ * it on top of the reported events.
20
+ */
21
+ export interface DuplicateMountInfo {
22
+ /** Stable key from `getUiResourceStableKey(content)`. */
23
+ key: string;
24
+ /**
25
+ * Current concurrent mount count. The reporter fires whenever this
26
+ * crosses 2 (i.e. on the 2nd, 3rd, etc. mount of the same key while
27
+ * earlier mounts are still alive).
28
+ */
29
+ count: number;
30
+ /** `Date.now()` of the FIRST mount of this key (telemetry, not identity). */
31
+ firstMountedAt: number;
32
+ }
33
+ export type DuplicateMountReporter = (info: DuplicateMountInfo) => void;
34
+ /**
35
+ * Wire a module-level reporter for duplicate mount events. Pass `null` to
36
+ * unwire. Only one module reporter at a time (replaces any previous one).
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * import { setDuplicateMountReporter } from '@seed-ship/mcp-ui-solid'
41
+ *
42
+ * setDuplicateMountReporter(({ key, count }) => {
43
+ * telemetry.warn('mcp-ui.duplicate-mount', { key, count })
44
+ * })
45
+ * ```
46
+ */
47
+ export declare function setDuplicateMountReporter(reporter: DuplicateMountReporter | null): void;
48
+ /**
49
+ * Internal — read by `<UIResourceRenderer>` to dispatch on mount. Not part
50
+ * of the public API.
51
+ *
52
+ * @internal
53
+ */
54
+ export declare function getDuplicateMountReporter(): DuplicateMountReporter | null;
55
+ /**
56
+ * Internal — registers a mount for `key` and returns the resulting state.
57
+ * The caller decides whether to surface a notification based on `count > 1`.
58
+ *
59
+ * @internal
60
+ */
61
+ export declare function _registerMount(key: string): DuplicateMountInfo;
62
+ /**
63
+ * Internal — undoes a prior `_registerMount(key)`. Removes the entry when
64
+ * the count reaches zero so the registry never leaks across mount/unmount
65
+ * cycles of unique keys.
66
+ *
67
+ * @internal
68
+ */
69
+ export declare function _unregisterMount(key: string): void;
70
+ /**
71
+ * Internal — clears the registry and unwires any module reporter. Used by
72
+ * tests to ensure isolation between cases.
73
+ *
74
+ * @internal
75
+ */
76
+ export declare function _resetRegistry(): void;
77
+ /**
78
+ * Internal — read the current count for a key (0 if not mounted). Useful
79
+ * for tests and for consumers building their own debug overlays.
80
+ *
81
+ * @internal
82
+ */
83
+ export declare function _getMountCount(key: string): number;
@@ -81,4 +81,3 @@ export declare function _resetRegistry(): void;
81
81
  * @internal
82
82
  */
83
83
  export declare function _getMountCount(key: string): number;
84
- //# sourceMappingURL=duplicate-mount-registry.d.ts.map
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Canonical HTML-escaper for untrusted payload values bound into HTML-string
3
+ * contexts (Leaflet marker popups/tooltips, G6 node/edge tooltips).
4
+ *
5
+ * Escapes the five significant characters — `& < > " '` — so a value is safe
6
+ * in both text-node and quoted-attribute positions. Pure + exported for tests.
7
+ *
8
+ * Consolidated (audit 2026-05-30 hygiene pass) from two previously-divergent
9
+ * private copies: MapRenderer's escaped `& < > "` (it MISSED the single quote),
10
+ * GraphRenderer's escaped all five. This single source removes that divergence.
11
+ */
12
+ export declare function escapeHtml(str: string): string;
@@ -10,4 +10,3 @@
10
10
  * GraphRenderer's escaped all five. This single source removes that divergence.
11
11
  */
12
12
  export declare function escapeHtml(str: string): string;
13
- //# sourceMappingURL=escape-html.d.ts.map
@@ -0,0 +1,25 @@
1
+ /**
2
+ * `formatMCPUIString` — the chrome-string template helper, runtime-free.
3
+ *
4
+ * @since v6.20.0 (extracted from `MCPUIStringsContext` so the pure adapters
5
+ * under `src/adapters` can interpolate their own message templates without
6
+ * importing `solid-js`). `MCPUIStringsContext` re-exports it, so every
7
+ * existing import path — including the root barrel — keeps working.
8
+ *
9
+ * This module imports nothing. It must stay that way: `src/adapters/*` is
10
+ * published as a dedicated subpath that never pulls in the renderer.
11
+ */
12
+ /**
13
+ * Substitutes `{name}` placeholders in a chrome string template.
14
+ *
15
+ * Only the keys present in `vars` are replaced; an unknown placeholder is
16
+ * left verbatim so a mistyped or locale-specific template degrades to
17
+ * visible text rather than to `undefined`.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * formatMCPUIString('Sort by {column}', { column: 'Revenue' }) // 'Sort by Revenue'
22
+ * formatMCPUIString('Export CSV ({count} rows)', { count: 42 }) // 'Export CSV (42 rows)'
23
+ * ```
24
+ */
25
+ export declare function formatMCPUIString(template: string, vars: Record<string, string | number>): string;
@@ -23,4 +23,3 @@
23
23
  * ```
24
24
  */
25
25
  export declare function formatMCPUIString(template: string, vars: Record<string, string | number>): string;
26
- //# sourceMappingURL=format-string.d.ts.map
@@ -0,0 +1,53 @@
1
+ /**
2
+ * COEP helpers for the two iframes the library renders
3
+ * (`IframeRenderer` in `UIResourceRenderer.tsx`, and the YouTube / Vimeo
4
+ * embed in `VideoRenderer.tsx`).
5
+ *
6
+ * @since v6.21.0
7
+ *
8
+ * A host that serves `Cross-Origin-Embedder-Policy: credentialless` makes the
9
+ * browser refuse any cross-origin iframe whose own document sends no COEP
10
+ * header. The HTML attribute `credentialless` on the `<iframe>` lifts that,
11
+ * at the price of the embedded document losing access to the cookies and
12
+ * storage of its own origin — see `MCPUIConfigContext` for the policy.
13
+ */
14
+ import { type Accessor } from 'solid-js';
15
+ import type { MCPUIConfig } from "../context/MCPUIConfigContext.cjs";
16
+ /**
17
+ * Does this iframe get the boolean `credentialless` attribute?
18
+ *
19
+ * `'auto'` (the default) says yes only when the embed has nothing to lose:
20
+ * the host is not trusted AND the iframe already runs without cookies because
21
+ * its `sandbox` has no `allow-same-origin` (`sandboxedWithoutSameOrigin`).
22
+ * The video embed carries no sandbox, so in `'auto'` it keeps its provider
23
+ * cookies and a COEP host must opt in with `'always'`.
24
+ *
25
+ * An unparsable URL is not trusted, so it gets the attribute.
26
+ *
27
+ * Takes a RESOLVED config — `MCPUIConfig`, which is what `useMCPUIConfig()`
28
+ * and `DEFAULT_MCPUI_CONFIG` hand out, every key present. The authored view is
29
+ * `MCPUIConfigInput`, whose fields are optional so that a new key stays
30
+ * backward compatible; accepting one of those here would mean re-implementing
31
+ * the defaults next to their source, and silently drifting from them.
32
+ */
33
+ export declare function shouldSetCredentialless(url: string, config: MCPUIConfig, options: {
34
+ sandboxedWithoutSameOrigin: boolean;
35
+ }): boolean;
36
+ /**
37
+ * `window.crossOriginIsolated`, read **after mount** into a signal.
38
+ *
39
+ * Reading it during render would make the server emit markup the client
40
+ * cannot reproduce; the signal starts at `false` (the SSR value) and flips
41
+ * once mounted, so hydration always matches.
42
+ */
43
+ export declare function createCrossOriginIsolated(): Accessor<boolean>;
44
+ /**
45
+ * Does the "open in a new tab" link show under an embed?
46
+ *
47
+ * `'auto'` shows it only on a cross-origin-isolated page — exactly where COEP
48
+ * can block the frame, and where the blocking is silent (a refused
49
+ * cross-origin document fires no `error` event the parent can observe).
50
+ *
51
+ * Takes a resolved config, for the reason given on `shouldSetCredentialless`.
52
+ */
53
+ export declare function shouldShowIframeFallbackLink(config: MCPUIConfig, crossOriginIsolated: boolean): boolean;
@@ -12,7 +12,7 @@
12
12
  * storage of its own origin — see `MCPUIConfigContext` for the policy.
13
13
  */
14
14
  import { type Accessor } from 'solid-js';
15
- import type { MCPUIConfig } from '../context/MCPUIConfigContext';
15
+ import type { MCPUIConfig } from "../context/MCPUIConfigContext.js";
16
16
  /**
17
17
  * Does this iframe get the boolean `credentialless` attribute?
18
18
  *
@@ -51,4 +51,3 @@ export declare function createCrossOriginIsolated(): Accessor<boolean>;
51
51
  * Takes a resolved config, for the reason given on `shouldSetCredentialless`.
52
52
  */
53
53
  export declare function shouldShowIframeFallbackLink(config: MCPUIConfig, crossOriginIsolated: boolean): boolean;
54
- //# sourceMappingURL=iframe-coep.d.ts.map
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Simple internal logger utility
3
+ *
4
+ * Logging is enabled when EITHER:
5
+ * 1. `process.env.NODE_ENV !== 'production'` (dev build), OR
6
+ * 2. `process.env.MCP_UI_DEBUG === 'true'` (server-side opt-in for prod), OR
7
+ * 3. `globalThis.__MCP_UI_DEBUG__ === true` (browser-side runtime toggle), OR
8
+ * 4. `setDebugMode(true)` has been called from app code.
9
+ *
10
+ * `error` always logs regardless of mode.
11
+ *
12
+ * @see setDebugMode, isDebugEnabled — runtime controls (v5.4.0)
13
+ */
14
+ declare global {
15
+ var __MCP_UI_DEBUG__: boolean | undefined;
16
+ }
17
+ /**
18
+ * Programmatically enable/disable verbose logging at runtime.
19
+ *
20
+ * Pass `null` to clear the override and fall back to env-based detection.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * import { setDebugMode } from '@seed-ship/mcp-ui-solid'
25
+ * setDebugMode(true) // turn on verbose logs
26
+ * setDebugMode(false) // turn off (overrides NODE_ENV=development)
27
+ * setDebugMode(null) // restore env-based behavior
28
+ * ```
29
+ */
30
+ export declare function setDebugMode(enabled: boolean | null): void;
31
+ /**
32
+ * Whether verbose logging is currently active (env + override combined).
33
+ */
34
+ export declare function isDebugEnabled(): boolean;
35
+ export interface Logger {
36
+ info(message: string, context?: Record<string, unknown>): void;
37
+ warn(message: string, context?: Record<string, unknown>): void;
38
+ error(message: string, context?: Record<string, unknown>): void;
39
+ debug(message: string, context?: Record<string, unknown>): void;
40
+ }
41
+ /**
42
+ * Creates a feature-scoped logger
43
+ *
44
+ * @param feature - Feature name for log prefixing
45
+ * @returns Logger instance
46
+ *
47
+ * @example
48
+ * ```typescript
49
+ * const logger = createLogger('my-component')
50
+ * logger.info('Component mounted', { componentId: '123' })
51
+ * ```
52
+ */
53
+ export declare function createLogger(feature: string): Logger;
54
+ /**
55
+ * No-op logger for testing or when logging is disabled
56
+ */
57
+ export declare const noopLogger: Logger;
@@ -55,4 +55,3 @@ export declare function createLogger(feature: string): Logger;
55
55
  * No-op logger for testing or when logging is disabled
56
56
  */
57
57
  export declare const noopLogger: Logger;
58
- //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1,15 @@
1
+ import type { MathRenderer } from "../context/MCPUIMathContext.cjs";
2
+ export type MathMarkdownProfile = 'prose' | 'cellMarkdown';
3
+ export type MarkdownTextTransform = (escapedText: string) => string;
4
+ export declare const MATH_MARKDOWN_LIMITS: {
5
+ readonly sourceLength: 100000;
6
+ readonly expressionLength: 4096;
7
+ readonly expressionCount: 128;
8
+ };
9
+ /**
10
+ * Parse Markdown with isolated, bounded math support and sanitize the complete
11
+ * result for its final sink. The optional transform sees escaped ordinary text
12
+ * tokens only. Math, code, raw HTML and link destinations never pass through
13
+ * it, so citation syntax cannot corrupt TeX optional arguments or attributes.
14
+ */
15
+ export declare function parseMathMarkdown(source: string, renderer: MathRenderer, profile: MathMarkdownProfile, transformText?: MarkdownTextTransform): string;
@@ -1,4 +1,4 @@
1
- import type { MathRenderer } from '../context/MCPUIMathContext';
1
+ import type { MathRenderer } from "../context/MCPUIMathContext.js";
2
2
  export type MathMarkdownProfile = 'prose' | 'cellMarkdown';
3
3
  export type MarkdownTextTransform = (escapedText: string) => string;
4
4
  export declare const MATH_MARKDOWN_LIMITS: {
@@ -13,4 +13,3 @@ export declare const MATH_MARKDOWN_LIMITS: {
13
13
  * it, so citation syntax cannot corrupt TeX optional arguments or attributes.
14
14
  */
15
15
  export declare function parseMathMarkdown(source: string, renderer: MathRenderer, profile: MathMarkdownProfile, transformText?: MarkdownTextTransform): string;
16
- //# sourceMappingURL=math-markdown.d.ts.map
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Missing values — one definition shared by tables, chart data views,
3
+ * degraded projections, chart validation and the chart renderer.
4
+ *
5
+ * @since v6.24.0
6
+ *
7
+ * A missing value is a value the payload says EXISTS but was not observed:
8
+ * `null` in a chart dataset (or as a point's `y`), `null` / `undefined` in a
9
+ * table cell. It is not a zero, and it is not the absence of a row or of a
10
+ * label: every view keeps its slot and marks it.
11
+ *
12
+ * Runtime-free on purpose (no `solid-js`): the pure projections in
13
+ * `chart-data-table.ts` and `degraded-projections.ts`, and `validation.ts`
14
+ * (published as the `/validation` subpath), import it.
15
+ */
16
+ /** The glyph a table cell shows for a missing value — `renderCellValue`'s historical `-`. */
17
+ export declare const MISSING_VALUE_MARKER = "-";
18
+ /**
19
+ * Chart types that encode a value as a share of a whole (or, for polar area,
20
+ * as a wedge whose emptiness reads as zero). Chart.js parses a `null` share
21
+ * as `0`, so these types refuse missing values instead of drawing them.
22
+ */
23
+ export declare const PART_TO_WHOLE_CHART_TYPES: ReadonlySet<string>;
24
+ /**
25
+ * Whether a raw TABLE cell value is displayed as {@link MISSING_VALUE_MARKER}.
26
+ *
27
+ * Mirrors the rules `renderCellValue` applies before any formatting — `null`,
28
+ * `undefined`, and a string that is empty or the word `undefined` once the
29
+ * backend's `"X – undefined"` debris is stripped — plus the literal marker
30
+ * itself (whitespace around it aside, which a table cell does not render),
31
+ * since it looks identical on screen and so must read identically.
32
+ *
33
+ * Objects are never missing here: `renderCellValue` renders them (link,
34
+ * name, or escaped JSON).
35
+ */
36
+ export declare function isMissingCellValue(value: unknown): boolean;
37
+ /**
38
+ * Removes the `"Text – undefined"` / `"undefined – Text"` debris some
39
+ * backends concatenate. Shared with `renderCellValue` so both apply the very
40
+ * same cleanup.
41
+ */
42
+ export declare function stripUndefinedDebris(value: string): string;
43
+ /**
44
+ * Whether one CHART data entry is missing: `null` / `undefined`, a non-finite
45
+ * number (Chart.js parses those to `null` too), or a point whose `y` is.
46
+ */
47
+ export declare function isMissingChartValue(value: unknown): boolean;
48
+ /**
49
+ * What a chart's missing values amount to.
50
+ *
51
+ * Only ENTRIES count: an explicit `null` (or non-finite number, or a point
52
+ * whose `y` is one). A dataset with no entry at all (`data: []`) is not
53
+ * "missing" — it is how 6.23.0 and earlier payloads said "nothing yet", e.g.
54
+ * while streaming, and it keeps rendering exactly as it did then.
55
+ */
56
+ export interface ChartMissingSummary {
57
+ /** At least one entry of one dataset is missing. */
58
+ hasMissing: boolean;
59
+ /** Per dataset, in order: it has entries and every one of them is missing. */
60
+ fullyMissing: boolean[];
61
+ /**
62
+ * Per dataset, in order: at least one observed value AND at least one
63
+ * missing entry — the series a reader actually sees broken.
64
+ */
65
+ partiallyMissing: boolean[];
66
+ /** Something is missing and no dataset has a single observed value: nothing to plot. */
67
+ allMissing: boolean;
68
+ }
69
+ interface ChartDataLike {
70
+ data?: {
71
+ datasets?: Array<{
72
+ data?: unknown[];
73
+ } | null | undefined>;
74
+ };
75
+ }
76
+ /** Summarises the missing values of a chart payload. Never throws on a malformed payload. */
77
+ export declare function summarizeChartMissing(params: ChartDataLike | null | undefined): ChartMissingSummary;
78
+ export {};
@@ -76,4 +76,3 @@ interface ChartDataLike {
76
76
  /** Summarises the missing values of a chart payload. Never throws on a malformed payload. */
77
77
  export declare function summarizeChartMissing(params: ChartDataLike | null | undefined): ChartMissingSummary;
78
78
  export {};
79
- //# sourceMappingURL=missing-value.d.ts.map