@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
@@ -0,0 +1,66 @@
1
+ /**
2
+ * GraphRenderer (v6.0.0) — generic node-link visualization powered by
3
+ * `@antv/g6 ^5` (peer-optional). Same lazy-load pattern as
4
+ * `ChartJSRenderer` and `MapRenderer` : the heavy lib is dynamically
5
+ * imported only on first mount, and apps that don't install the peer
6
+ * see an informative fallback instead of a crash.
7
+ *
8
+ * Spec : `@seed-ship/mcp-ui-spec@5.0.4` exports `GraphComponentParamsSchema`,
9
+ * `GraphNode`, `GraphEdge`, `GraphLayoutName`, `GraphLayout`,
10
+ * `GraphComponentParams` — the shape consumed here. Domain semantics
11
+ * (`weight` etc.) are opaque to this renderer ; consumers decide what
12
+ * the values mean.
13
+ *
14
+ * Copy + export : the renderer ships with `<ExpandableWrapper>` (default
15
+ * copy = JSON of `{nodes, edges}`) plus a 3-format export menu — **PNG**
16
+ * (visual snapshot via the underlying canvas/SVG), **Mermaid** (markdown
17
+ * / GitHub-renderable `flowchart` syntax), **JSON** (raw reimportable
18
+ * data). All three are computed lazily on click.
19
+ */
20
+ import { Component } from 'solid-js';
21
+ import type { UIComponent } from "../types.cjs";
22
+ import type { GraphComponentParams } from '@seed-ship/mcp-ui-spec';
23
+ /**
24
+ * Whether the `@antv/g6` peer dependency is installed and importable.
25
+ * Resolves to `true` when the lib is available, `false` otherwise.
26
+ *
27
+ * Mirrors `isChartJSAvailable()` from `ChartJSRenderer`.
28
+ */
29
+ export declare function isG6Available(): Promise<boolean>;
30
+ /**
31
+ * Build the G6 v5 `Graph` constructor config from the component params.
32
+ *
33
+ * Pure (no DOM/lib side effects beyond reading `container`), so it can be
34
+ * unit-tested directly without a jsdom render — this is the contract the
35
+ * 2026-05-30 audit (P0.2) wants locked.
36
+ *
37
+ * ⚠️ G6 v5's `renderer` is a factory `(layer) => IRenderer`, NOT a string
38
+ * (that was the v4 contract). Passing the string `'canvas'` / `'svg'` makes
39
+ * G6 throw `renderer is not a function` — and because the default path used
40
+ * to pass the string `'canvas'`, EVERY graph crashed, not just svg. So we
41
+ * **omit `renderer` entirely**: G6 then uses its built-in canvas renderer
42
+ * (documented default `() => new CanvasRenderer()`).
43
+ *
44
+ * `rendererPref: 'svg'` is reserved but NOT wired yet — a real G6 v5 SVG
45
+ * renderer needs the `@antv/g-svg` factory (a transitive dep of `@antv/g6`,
46
+ * not statically resolvable at build time). Until that's wired behind proper
47
+ * optional-peer resolution, svg degrades to the canvas default with a
48
+ * one-time warning. It must NEVER inject a string `renderer`.
49
+ */
50
+ export declare function buildGraphConfig(p: GraphComponentParams, container?: HTMLElement, tokens?: Record<string, string | undefined>): Record<string, unknown>;
51
+ /**
52
+ * Convert the graph data to Mermaid `flowchart` syntax. The edge label
53
+ * carries the optional `weight` prefix when present (e.g. `|3| label`).
54
+ */
55
+ declare function toMermaid(params: GraphComponentParams): string;
56
+ declare function toJSON(params: GraphComponentParams): string;
57
+ export interface GraphRendererProps {
58
+ component: UIComponent;
59
+ /**
60
+ * Forwarded to the underlying `<ExpandableWrapper>` (v6.3.1).
61
+ * @see ExpandableWrapperProps.toolbarVariant
62
+ */
63
+ toolbarVariant?: 'hover' | 'always-visible';
64
+ }
65
+ export declare const GraphRenderer: Component<GraphRendererProps>;
66
+ export { toMermaid as graphToMermaid, toJSON as graphToJSON };
@@ -18,7 +18,7 @@
18
18
  * data). All three are computed lazily on click.
19
19
  */
20
20
  import { Component } from 'solid-js';
21
- import type { UIComponent } from '../types';
21
+ import type { UIComponent } from "../types.js";
22
22
  import type { GraphComponentParams } from '@seed-ship/mcp-ui-spec';
23
23
  /**
24
24
  * Whether the `@antv/g6` peer dependency is installed and importable.
@@ -64,4 +64,3 @@ export interface GraphRendererProps {
64
64
  }
65
65
  export declare const GraphRenderer: Component<GraphRendererProps>;
66
66
  export { toMermaid as graphToMermaid, toJSON as graphToJSON };
67
- //# sourceMappingURL=GraphRenderer.d.ts.map
@@ -0,0 +1,49 @@
1
+ /**
2
+ * GridRenderer - CSS Grid layout component for nested layouts
3
+ * Phase 5.0: Quick Wins - Enables template builder layouts
4
+ * Updated: Uses RenderContext to avoid circular dependencies
5
+ */
6
+ import { Component } from 'solid-js';
7
+ import type { UIComponent } from "../types.cjs";
8
+ /**
9
+ * Parameters for GridRenderer component
10
+ */
11
+ export interface GridComponentParams {
12
+ /**
13
+ * Number of columns (default: 12)
14
+ */
15
+ columns?: number;
16
+ /**
17
+ * Gap between grid items (default: '1rem')
18
+ */
19
+ gap?: string;
20
+ /**
21
+ * Minimum row height (optional)
22
+ */
23
+ minRowHeight?: string;
24
+ /**
25
+ * CSS Grid template areas for named regions
26
+ * Example: [['header', 'header'], ['sidebar', 'main'], ['footer', 'footer']]
27
+ */
28
+ areas?: string[][];
29
+ /**
30
+ * Child components to render within the grid
31
+ */
32
+ children: UIComponent[];
33
+ }
34
+ export interface GridRendererProps {
35
+ /**
36
+ * Grid component with params
37
+ */
38
+ component: UIComponent;
39
+ /**
40
+ * Error callback
41
+ */
42
+ onError?: (error: any) => void;
43
+ }
44
+ /**
45
+ * GridRenderer Component
46
+ * Renders a CSS Grid container with nested UIComponents
47
+ */
48
+ export declare const GridRenderer: Component<GridRendererProps>;
49
+ export default GridRenderer;
@@ -4,7 +4,7 @@
4
4
  * Updated: Uses RenderContext to avoid circular dependencies
5
5
  */
6
6
  import { Component } from 'solid-js';
7
- import type { UIComponent } from '../types';
7
+ import type { UIComponent } from "../types.js";
8
8
  /**
9
9
  * Parameters for GridRenderer component
10
10
  */
@@ -47,4 +47,3 @@ export interface GridRendererProps {
47
47
  */
48
48
  export declare const GridRenderer: Component<GridRendererProps>;
49
49
  export default GridRenderer;
50
- //# sourceMappingURL=GridRenderer.d.ts.map
@@ -0,0 +1,22 @@
1
+ /**
2
+ * IframeFallbackLink — the way out of a silently blocked embed.
3
+ *
4
+ * @since v6.21.0
5
+ *
6
+ * An iframe refused by `Cross-Origin-Embedder-Policy` fires no event the
7
+ * parent page can observe (`onerror` does not fire for a rejected
8
+ * cross-origin document), so the user is left with a blank frame and no
9
+ * explanation. This link, rendered under the frame, always works.
10
+ *
11
+ * Visibility follows `MCPUIConfig.iframeFallbackLink`; `'auto'` (the default)
12
+ * shows it only on a cross-origin-isolated page. The URL goes through
13
+ * `safeUrl` — an unsafe one renders nothing at all.
14
+ */
15
+ import { type JSX } from 'solid-js';
16
+ export interface IframeFallbackLinkProps {
17
+ /** The embedded URL. Bound to `href` only when `safeUrl` accepts it. */
18
+ url: string;
19
+ /** Extra classes on the wrapping `<div>`. */
20
+ class?: string;
21
+ }
22
+ export declare function IframeFallbackLink(props: IframeFallbackLinkProps): JSX.Element;
@@ -20,4 +20,3 @@ export interface IframeFallbackLinkProps {
20
20
  class?: string;
21
21
  }
22
22
  export declare function IframeFallbackLink(props: IframeFallbackLinkProps): JSX.Element;
23
- //# sourceMappingURL=IframeFallbackLink.d.ts.map
@@ -0,0 +1,22 @@
1
+ /**
2
+ * ImageGalleryRenderer - Gallery view for multiple images
3
+ * Sprint 5: Media Components
4
+ */
5
+ import { Component } from 'solid-js';
6
+ import type { UIComponent, ImageGalleryParams } from "../types.cjs";
7
+ export interface ImageGalleryRendererProps {
8
+ /**
9
+ * UIComponent containing gallery params
10
+ */
11
+ component?: UIComponent;
12
+ /**
13
+ * Direct gallery params (alternative to component)
14
+ */
15
+ params?: ImageGalleryParams;
16
+ /**
17
+ * Forwarded to the underlying `<ExpandableWrapper>` (v6.3.1).
18
+ * @see ExpandableWrapperProps.toolbarVariant
19
+ */
20
+ toolbarVariant?: 'hover' | 'always-visible';
21
+ }
22
+ export declare const ImageGalleryRenderer: Component<ImageGalleryRendererProps>;
@@ -3,7 +3,7 @@
3
3
  * Sprint 5: Media Components
4
4
  */
5
5
  import { Component } from 'solid-js';
6
- import type { UIComponent, ImageGalleryParams } from '../types';
6
+ import type { UIComponent, ImageGalleryParams } from "../types.js";
7
7
  export interface ImageGalleryRendererProps {
8
8
  /**
9
9
  * UIComponent containing gallery params
@@ -20,4 +20,3 @@ export interface ImageGalleryRendererProps {
20
20
  toolbarVariant?: 'hover' | 'always-visible';
21
21
  }
22
22
  export declare const ImageGalleryRenderer: Component<ImageGalleryRendererProps>;
23
- //# sourceMappingURL=ImageGalleryRenderer.d.ts.map
@@ -0,0 +1,31 @@
1
+ /**
2
+ * LightboxOverlay - Fullscreen image viewer
3
+ * Sprint 5: Media Components
4
+ *
5
+ * v6.22.0 — zoom & pan. The overlay is a fullscreen `<Portal>`: it OWNS the
6
+ * viewport, nothing scrolls behind it (the effect below locks `body`), so
7
+ * hijacking the wheel here is legitimate in a way it would not be for a
8
+ * component sitting inline in a chat feed. Zoom is therefore always on in the
9
+ * lightbox and needs no host opt-in.
10
+ */
11
+ import { Component } from 'solid-js';
12
+ import type { GalleryImage } from "../types.cjs";
13
+ export interface LightboxOverlayProps {
14
+ /**
15
+ * Array of images to navigate through
16
+ */
17
+ images: GalleryImage[];
18
+ /**
19
+ * Currently selected image index (null when closed)
20
+ */
21
+ selectedIndex: number | null;
22
+ /**
23
+ * Callback when lightbox should close
24
+ */
25
+ onClose: () => void;
26
+ /**
27
+ * Callback when navigating to a different image
28
+ */
29
+ onNavigate: (index: number) => void;
30
+ }
31
+ export declare const LightboxOverlay: Component<LightboxOverlayProps>;
@@ -9,7 +9,7 @@
9
9
  * lightbox and needs no host opt-in.
10
10
  */
11
11
  import { Component } from 'solid-js';
12
- import type { GalleryImage } from '../types';
12
+ import type { GalleryImage } from "../types.js";
13
13
  export interface LightboxOverlayProps {
14
14
  /**
15
15
  * Array of images to navigate through
@@ -29,4 +29,3 @@ export interface LightboxOverlayProps {
29
29
  onNavigate: (index: number) => void;
30
30
  }
31
31
  export declare const LightboxOverlay: Component<LightboxOverlayProps>;
32
- //# sourceMappingURL=LightboxOverlay.d.ts.map
@@ -0,0 +1,77 @@
1
+ /**
2
+ * MapRenderer - Interactive map Component
3
+ * Sprint 6: Markers + clustering
4
+ * v3.1.0: GeoJSON, choropleth, popups, multi-layer, PMTiles
5
+ */
6
+ import { Component } from 'solid-js';
7
+ import type { UIComponent, MapComponentParams, MapGeoJSONStyle, MapPopupConfig } from "../types.cjs";
8
+ export interface MapRendererProps {
9
+ /**
10
+ * UIComponent containing map params
11
+ */
12
+ component?: UIComponent;
13
+ /**
14
+ * Direct map params
15
+ */
16
+ params?: MapComponentParams;
17
+ /**
18
+ * Forwarded to the underlying `<ExpandableWrapper>` (v6.3.1).
19
+ * @see ExpandableWrapperProps.toolbarVariant
20
+ */
21
+ toolbarVariant?: 'hover' | 'always-visible';
22
+ /**
23
+ * Trust marker / popup content as raw HTML (v6.10.0, audit P1.2).
24
+ *
25
+ * Leaflet renders bound tooltip/popup strings as HTML, so `marker.tooltip`,
26
+ * `marker.popup` and a GeoJSON `popup.template` are XSS vectors when the
27
+ * payload is untrusted (the default for an LLM/connector-driven public
28
+ * package). **Default `false`** → those are escaped as plain text, and
29
+ * `popup.template` is ignored in favour of the safe auto-generated popup.
30
+ *
31
+ * This is a **host-level** trust decision, deliberately NOT a payload field
32
+ * (a malicious payload could just set its own flag). The
33
+ * `<UIResourceRenderer>` path never sets it, so payload-driven maps are
34
+ * always text-safe. A host rendering `<MapRenderer>` directly with trusted
35
+ * data may set `allowHtmlPopups` to restore rich HTML popups. The
36
+ * auto-generated popup (`titleField` / `fields`) is safe-by-construction
37
+ * and unaffected either way.
38
+ */
39
+ allowHtmlPopups?: boolean;
40
+ }
41
+ /**
42
+ * Build popup HTML from a feature's properties using popup config.
43
+ *
44
+ * `allowHtml` (audit P1.2) gates the raw-HTML `popup.template`: it is honored
45
+ * only when the host trusts the payload. On the default (untrusted) path the
46
+ * template is ignored and we fall through to the auto-generated popup, whose
47
+ * structure is renderer-authored and whose values are always escaped — safe
48
+ * by construction. Even in the trusted path, substituted `{{prop}}` values
49
+ * are escaped (they are data, not markup).
50
+ */
51
+ export declare function buildPopupContent(feature: any, popup: MapPopupConfig | undefined, allowHtml?: boolean,
52
+ /** BCP-47 tag for numeric values (`MCPUIStrings.locale`). Was `'fr-FR'` before 6.20.0. */
53
+ locale?: string): string | null;
54
+ /**
55
+ * Resolve a marker's tooltip/popup string for binding (audit P1.2). Leaflet
56
+ * renders bound strings as HTML; `marker.tooltip` / `marker.popup` come from
57
+ * the (untrusted) payload, so they are escaped to plain text unless the host
58
+ * has opted into raw HTML via `allowHtmlPopups`. Pure + exported for tests.
59
+ */
60
+ export declare function popupSafeText(value: string | undefined, allowHtml?: boolean): string | undefined;
61
+ /** Bind a marker's tooltip + popup, escaping by default (see popupSafeText). */
62
+ export declare function bindMarkerContent(m: any, marker: {
63
+ tooltip?: string;
64
+ popup?: string;
65
+ }, allowHtml: boolean): void;
66
+ /**
67
+ * Add a GeoJSON layer to the map with style and popup support.
68
+ * Returns the layer for bounds calculation.
69
+ */
70
+ export declare function addGeoJSONLayer(mapInst: any, leaflet: any, geojson: unknown, style?: MapGeoJSONStyle, popup?: MapPopupConfig, allowHtml?: boolean,
71
+ /**
72
+ * BCP-47 tag forwarded to {@link buildPopupContent}, or a getter. With a
73
+ * getter, each popup is bound to a function Leaflet evaluates when the popup
74
+ * opens, so it follows locale changes without rebuilding the layer.
75
+ */
76
+ locale?: string | (() => string)): any;
77
+ export declare const MapRenderer: Component<MapRendererProps>;
@@ -4,7 +4,7 @@
4
4
  * v3.1.0: GeoJSON, choropleth, popups, multi-layer, PMTiles
5
5
  */
6
6
  import { Component } from 'solid-js';
7
- import type { UIComponent, MapComponentParams, MapGeoJSONStyle, MapPopupConfig } from '../types';
7
+ import type { UIComponent, MapComponentParams, MapGeoJSONStyle, MapPopupConfig } from "../types.js";
8
8
  export interface MapRendererProps {
9
9
  /**
10
10
  * UIComponent containing map params
@@ -75,4 +75,3 @@ export declare function addGeoJSONLayer(mapInst: any, leaflet: any, geojson: unk
75
75
  */
76
76
  locale?: string | (() => string)): any;
77
77
  export declare const MapRenderer: Component<MapRendererProps>;
78
- //# sourceMappingURL=MapRenderer.d.ts.map
@@ -0,0 +1,26 @@
1
+ /**
2
+ * The visible and accessible marks of a missing value (v6.24.0).
3
+ *
4
+ * A table cell with no value has always shown `-`. On its own that glyph says
5
+ * nothing to a screen reader (it is read as "dash", or skipped) and it is easy
6
+ * to take for a zero or a minus sign. These two components give it a meaning:
7
+ *
8
+ * - {@link MissingValueMark} — the cell content: the `-` hidden from
9
+ * assistive technology, followed by `strings.missingValue` hidden from
10
+ * sight. Visually-hidden through an inline style rather than Tailwind's
11
+ * `sr-only`, so the text cannot leak on a host whose Tailwind build does
12
+ * not scan this package.
13
+ * - {@link MissingValueLegend} — one line under a table or data view that
14
+ * contains a missing value, so the convention never has to be guessed.
15
+ *
16
+ * Both are SSR-safe: no browser API, and the same markup on server and client.
17
+ */
18
+ import type { Component, JSX } from 'solid-js';
19
+ /** The classic visually-hidden recipe: in the accessibility tree, out of sight. */
20
+ export declare const VISUALLY_HIDDEN_STYLE: JSX.CSSProperties;
21
+ /** Content of a cell whose value is missing. */
22
+ export declare const MissingValueMark: Component;
23
+ /** The legend line explaining the missing-value glyph. */
24
+ export declare const MissingValueLegend: Component<{
25
+ class?: string;
26
+ }>;
@@ -24,4 +24,3 @@ export declare const MissingValueMark: Component;
24
24
  export declare const MissingValueLegend: Component<{
25
25
  class?: string;
26
26
  }>;
27
- //# sourceMappingURL=MissingValue.d.ts.map
@@ -0,0 +1,66 @@
1
+ /**
2
+ * ModalRenderer - Dialog overlay component
3
+ * Sprint 3: UX Improvements
4
+ */
5
+ import { Component, JSX } from 'solid-js';
6
+ import type { UIComponent, ModalComponentParams } from "../types.cjs";
7
+ export interface ModalRendererProps {
8
+ /**
9
+ * UIComponent with modal params (for declarative use)
10
+ */
11
+ component?: UIComponent;
12
+ /**
13
+ * Direct modal params (alternative to component)
14
+ */
15
+ params?: ModalComponentParams;
16
+ /**
17
+ * External open state control
18
+ */
19
+ isOpen?: boolean;
20
+ /**
21
+ * Callback when modal is closed
22
+ */
23
+ onClose?: () => void;
24
+ /**
25
+ * Modal content (preferred for programmatic use)
26
+ */
27
+ children?: JSX.Element;
28
+ }
29
+ /**
30
+ * Modal/Dialog overlay component with Portal rendering
31
+ *
32
+ * @example Programmatic usage
33
+ * ```tsx
34
+ * function MyComponent() {
35
+ * const { isOpen, open, close } = useModal()
36
+ *
37
+ * return (
38
+ * <>
39
+ * <button onClick={open}>Open Modal</button>
40
+ * <ModalRenderer
41
+ * isOpen={isOpen()}
42
+ * onClose={close}
43
+ * params={{ title: 'My Modal', size: 'md' }}
44
+ * >
45
+ * <p>Modal content here</p>
46
+ * </ModalRenderer>
47
+ * </>
48
+ * )
49
+ * }
50
+ * ```
51
+ *
52
+ * @example Declarative usage
53
+ * ```tsx
54
+ * const modalComponent: UIComponent = {
55
+ * id: 'details-modal',
56
+ * type: 'modal',
57
+ * position: { colStart: 1, colSpan: 12 },
58
+ * params: {
59
+ * title: 'User Details',
60
+ * size: 'lg',
61
+ * },
62
+ * }
63
+ * <ModalRenderer component={modalComponent} isOpen={true} onClose={close} />
64
+ * ```
65
+ */
66
+ export declare const ModalRenderer: Component<ModalRendererProps>;
@@ -3,7 +3,7 @@
3
3
  * Sprint 3: UX Improvements
4
4
  */
5
5
  import { Component, JSX } from 'solid-js';
6
- import type { UIComponent, ModalComponentParams } from '../types';
6
+ import type { UIComponent, ModalComponentParams } from "../types.js";
7
7
  export interface ModalRendererProps {
8
8
  /**
9
9
  * UIComponent with modal params (for declarative use)
@@ -64,4 +64,3 @@ export interface ModalRendererProps {
64
64
  * ```
65
65
  */
66
66
  export declare const ModalRenderer: Component<ModalRendererProps>;
67
- //# sourceMappingURL=ModalRenderer.d.ts.map
@@ -0,0 +1,55 @@
1
+ /**
2
+ * PortalDropdownMenu (v6.4.0) — generic dropdown that mounts via
3
+ * `<Portal>` on `document.body` instead of an in-tree `position: absolute`
4
+ * sibling. Eliminates two pain points around the legacy in-tree pattern :
5
+ *
6
+ * 1. **`overflow: hidden` clipping** — when the trigger lives inside a
7
+ * chat bubble or a card with `overflow: hidden`, an absolutely
8
+ * positioned menu sibling gets clipped at the ancestor's boundary.
9
+ * Mounting on `document.body` escapes the clip stack entirely.
10
+ * 2. **`z-index` wars** — chat surfaces stack composer / message rails
11
+ * above the message list, and ancestor `z-index` creates a new
12
+ * stacking context that captures the in-tree menu. A portal is a
13
+ * sibling of the document, so a single `z-index: 9999` wins.
14
+ *
15
+ * The menu is positioned with `position: fixed` from the trigger's
16
+ * `getBoundingClientRect()`. We re-measure on `scroll` (capture phase, so
17
+ * nested scrollables also fire) and `resize` to keep the menu pinned
18
+ * while the user interacts with surrounding chrome.
19
+ *
20
+ * Close affordances : click outside, Escape, programmatic via `onClose`.
21
+ */
22
+ import { Component, JSX } from 'solid-js';
23
+ export interface PortalDropdownMenuProps {
24
+ /**
25
+ * Whether the menu is currently open. Controlled by the parent.
26
+ */
27
+ open: boolean;
28
+ /**
29
+ * Called when the menu wants to close (outside click / Escape / item
30
+ * click — it's the parent's job to actually flip `open` to false).
31
+ */
32
+ onClose: () => void;
33
+ /**
34
+ * Trigger element used as the positioning anchor. The menu's right
35
+ * edge is aligned to the trigger's right edge, top to its bottom + 4px.
36
+ */
37
+ trigger: HTMLElement | undefined;
38
+ /**
39
+ * Menu width in pixels. Used to compute the left coordinate so the menu's
40
+ * right edge aligns with the trigger's right edge. Default : `144` (the
41
+ * legacy table menu width — `w-36`).
42
+ */
43
+ width?: number;
44
+ /**
45
+ * Menu content. Wrapped in the rounded / shadowed container — keep
46
+ * children minimal (just the items).
47
+ */
48
+ children: JSX.Element;
49
+ /**
50
+ * Optional additional class names for the menu container, appended after
51
+ * the default Tailwind classes. Useful to override width or padding.
52
+ */
53
+ class?: string;
54
+ }
55
+ export declare const PortalDropdownMenu: Component<PortalDropdownMenuProps>;
@@ -53,4 +53,3 @@ export interface PortalDropdownMenuProps {
53
53
  class?: string;
54
54
  }
55
55
  export declare const PortalDropdownMenu: Component<PortalDropdownMenuProps>;
56
- //# sourceMappingURL=PortalDropdownMenu.d.ts.map
@@ -0,0 +1,112 @@
1
+ /**
2
+ * PresentationFeedback — feedback on how a connector result was *presented*.
3
+ *
4
+ * @experimental
5
+ * @since v6.6.0 (R3 / D9 of ROADMAP-opendata-macro-mcpui)
6
+ *
7
+ * ## A separate axis from `FeedbackInline`
8
+ *
9
+ * MCP-UI has two distinct feedback widgets, kept separate on purpose
10
+ * (cf. R3) :
11
+ *
12
+ * - **`FeedbackInline`** — was the *answer* good? (response quality)
13
+ * - **`PresentationFeedback`** (this) — was the answer *shown well*?
14
+ * (layout / readability)
15
+ *
16
+ * They are separate components, separate exports, separate payloads — so
17
+ * the two axes never collapse into one in the UX or in the logs.
18
+ *
19
+ * ## Stateless — host owns persistence and re-render
20
+ *
21
+ * On submit the component calls `onSubmit(feedback)` with a
22
+ * `ConnectorRenderFeedback` payload and flips to its acknowledgement state.
23
+ * It does NOT persist anything and does NOT re-render the result itself
24
+ * (cf. D1 : adapter pure + host-owned state). The host persists the
25
+ * feedback and, if it wants to "close the loop", re-runs its adapter with
26
+ * the corrected `preferredLayout`.
27
+ *
28
+ * Submission is best-effort : a rejected `onSubmit` promise is swallowed,
29
+ * the UI still flips.
30
+ *
31
+ * ## Localization
32
+ *
33
+ * All labels ship in English and are overridable via the `labels` prop
34
+ * (partial). This component carries its own label bag rather than routing
35
+ * through `MCPUIStringsProvider` — its label set is large and specific to
36
+ * this one widget.
37
+ *
38
+ * @example
39
+ * ```tsx
40
+ * <PresentationFeedback
41
+ * connectorId="datagouv"
42
+ * toolName="datagouv.search"
43
+ * queryHash={result.queryHash}
44
+ * layoutType="table"
45
+ * preferredLayoutOptions={['table', 'bar', 'map']}
46
+ * onSubmit={(fb) => fetch('/api/render-feedback', {
47
+ * method: 'POST', body: JSON.stringify(fb),
48
+ * })}
49
+ * />
50
+ * ```
51
+ */
52
+ import { Component } from 'solid-js';
53
+ import type { ConnectorRenderFeedback, ConnectorPreferredLayout } from '@seed-ship/mcp-ui-spec';
54
+ export interface PresentationFeedbackLabels {
55
+ /** Resting-state question. */
56
+ prompt: string;
57
+ /** Positive verdict button. */
58
+ readable: string;
59
+ /** Negative verdict button — opens the detail step. */
60
+ notReadable: string;
61
+ /** Heading of the detail step. */
62
+ problemsPrompt: string;
63
+ /** Per-problem chip labels. */
64
+ problemTooRaw: string;
65
+ problemWrongColumns: string;
66
+ problemWrongChart: string;
67
+ problemMissingContext: string;
68
+ problemWrongUnit: string;
69
+ problemBadGrouping: string;
70
+ problemMissingDatasetContext: string;
71
+ /** Heading of the optional layout picker. */
72
+ preferLayoutPrompt: string;
73
+ /** Free-text comment placeholder. */
74
+ commentPlaceholder: string;
75
+ /** Submit button of the detail step. */
76
+ submit: string;
77
+ /** Acknowledgement shown after submission. */
78
+ ack: string;
79
+ }
80
+ /** English defaults. Override via the `labels` prop for other locales. */
81
+ export declare const DEFAULT_PRESENTATION_FEEDBACK_LABELS: PresentationFeedbackLabels;
82
+ export interface PresentationFeedbackProps {
83
+ /** Connector whose result is being rated. */
84
+ connectorId: string;
85
+ /** Tool that produced the result. */
86
+ toolName: string;
87
+ /** Stable key tying feedback to a `ConnectorDynamicResultV1.queryHash`. */
88
+ queryHash?: string;
89
+ /** What is being rated (e.g. `'primary'`). Passed through to the payload. */
90
+ renderKind?: string;
91
+ /** The layout type currently shown (e.g. `'table'`). Passed through. */
92
+ layoutType?: string;
93
+ /**
94
+ * Called once on submit with the assembled `ConnectorRenderFeedback`.
95
+ * Persistence + any re-render are the host's responsibility.
96
+ */
97
+ onSubmit: (feedback: ConnectorRenderFeedback) => void | Promise<void>;
98
+ /**
99
+ * Layout alternatives offered in the detail step. Omit (or pass an empty
100
+ * array) to hide the layout picker entirely.
101
+ */
102
+ preferredLayoutOptions?: ConnectorPreferredLayout[];
103
+ /** Partial label override (English defaults otherwise). */
104
+ labels?: Partial<PresentationFeedbackLabels>;
105
+ /** Extra Tailwind classes on the container. */
106
+ class?: string;
107
+ }
108
+ /**
109
+ * @experimental
110
+ * Presentation-quality feedback widget (readable / not-readable + detail).
111
+ */
112
+ export declare const PresentationFeedback: Component<PresentationFeedbackProps>;
@@ -110,4 +110,3 @@ export interface PresentationFeedbackProps {
110
110
  * Presentation-quality feedback widget (readable / not-readable + detail).
111
111
  */
112
112
  export declare const PresentationFeedback: Component<PresentationFeedbackProps>;
113
- //# sourceMappingURL=PresentationFeedback.d.ts.map