@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,94 @@
1
+ /**
2
+ * DraggableGridItem Component
3
+ * Wrapper for grid items that enables drag-and-drop reordering and resizing
4
+ *
5
+ * Sprint Drag-Drop Feature
6
+ */
7
+ import { Component, JSX } from 'solid-js';
8
+ import type { GridPosition, ResizeConstraints } from "../types.cjs";
9
+ /**
10
+ * Props for DraggableGridItem
11
+ */
12
+ export interface DraggableGridItemProps {
13
+ /**
14
+ * Component ID
15
+ */
16
+ id: string;
17
+ /**
18
+ * Grid position
19
+ */
20
+ position: GridPosition;
21
+ /**
22
+ * Whether dragging is enabled
23
+ */
24
+ draggable?: boolean;
25
+ /**
26
+ * Whether resizing is enabled
27
+ */
28
+ resizable?: boolean;
29
+ /**
30
+ * Resize constraints
31
+ */
32
+ constraints?: ResizeConstraints;
33
+ /**
34
+ * Whether this item is currently being dragged
35
+ */
36
+ isDragging?: boolean;
37
+ /**
38
+ * Whether this item is a drop target
39
+ */
40
+ isDropTarget?: boolean;
41
+ /**
42
+ * Preview position during resize
43
+ */
44
+ previewPosition?: GridPosition | null;
45
+ /**
46
+ * Drag props from useDragDrop
47
+ */
48
+ dragProps?: {
49
+ draggable: boolean;
50
+ onDragStart: (e: DragEvent) => void;
51
+ onDragOver: (e: DragEvent) => void;
52
+ onDragEnter: (e: DragEvent) => void;
53
+ onDragLeave: (e: DragEvent) => void;
54
+ onDrop: (e: DragEvent) => void;
55
+ onDragEnd: (e: DragEvent) => void;
56
+ };
57
+ /**
58
+ * Callback when resize starts
59
+ */
60
+ onResizeStart?: (edge: 'left' | 'right' | 'top' | 'bottom', event: PointerEvent) => void;
61
+ /**
62
+ * Callback for resize preview
63
+ */
64
+ onResizePreview?: (position: GridPosition) => void;
65
+ /**
66
+ * Callback when resize completes
67
+ */
68
+ onResize?: (position: GridPosition) => void;
69
+ /**
70
+ * Whether resize is in progress
71
+ */
72
+ isResizing?: boolean;
73
+ /**
74
+ * Show grid overlay during drag/resize
75
+ */
76
+ showGridOverlay?: boolean;
77
+ /**
78
+ * Custom CSS class
79
+ */
80
+ class?: string;
81
+ /**
82
+ * Custom styles
83
+ */
84
+ style?: JSX.CSSProperties;
85
+ /**
86
+ * Children to render
87
+ */
88
+ children?: JSX.Element;
89
+ }
90
+ /**
91
+ * DraggableGridItem Component
92
+ */
93
+ export declare const DraggableGridItem: Component<DraggableGridItemProps>;
94
+ export default DraggableGridItem;
@@ -5,7 +5,7 @@
5
5
  * Sprint Drag-Drop Feature
6
6
  */
7
7
  import { Component, JSX } from 'solid-js';
8
- import type { GridPosition, ResizeConstraints } from '../types';
8
+ import type { GridPosition, ResizeConstraints } from "../types.js";
9
9
  /**
10
10
  * Props for DraggableGridItem
11
11
  */
@@ -92,4 +92,3 @@ export interface DraggableGridItemProps {
92
92
  */
93
93
  export declare const DraggableGridItem: Component<DraggableGridItemProps>;
94
94
  export default DraggableGridItem;
95
- //# sourceMappingURL=DraggableGridItem.d.ts.map
@@ -0,0 +1,4 @@
1
+ /** Private context: editor canvases must keep authored grid positions. */
2
+ import { type ParentComponent } from 'solid-js';
3
+ export declare const EditableLayoutProvider: ParentComponent;
4
+ export declare function useEditableLayoutPositions(): boolean;
@@ -2,4 +2,3 @@
2
2
  import { type ParentComponent } from 'solid-js';
3
3
  export declare const EditableLayoutProvider: ParentComponent;
4
4
  export declare function useEditableLayoutPositions(): boolean;
5
- //# sourceMappingURL=EditableLayoutContext.d.ts.map
@@ -0,0 +1,42 @@
1
+ /**
2
+ * EditableUIResourceRenderer Component
3
+ * Extends UIResourceRenderer with drag-and-drop reordering and resizing capabilities
4
+ *
5
+ * Sprint Drag-Drop Feature
6
+ */
7
+ import { Component } from 'solid-js';
8
+ import type { UILayout, RendererError, DragDropConfig } from "../types.cjs";
9
+ /**
10
+ * Props for EditableUIResourceRenderer
11
+ */
12
+ export interface EditableUIResourceRendererProps {
13
+ /**
14
+ * Layout to render (must be UILayout, not single component)
15
+ */
16
+ layout: UILayout;
17
+ /**
18
+ * Drag-drop configuration
19
+ */
20
+ dragDrop?: DragDropConfig;
21
+ /**
22
+ * Error callback
23
+ */
24
+ onError?: (error: RendererError) => void;
25
+ /**
26
+ * Callback when layout changes (reorder or resize)
27
+ */
28
+ onLayoutChange?: (layout: UILayout) => void;
29
+ /**
30
+ * Custom CSS class
31
+ */
32
+ class?: string;
33
+ /**
34
+ * Show grid overlay during editing
35
+ */
36
+ showGridOverlay?: boolean;
37
+ }
38
+ /**
39
+ * EditableUIResourceRenderer Component
40
+ */
41
+ export declare const EditableUIResourceRenderer: Component<EditableUIResourceRendererProps>;
42
+ export default EditableUIResourceRenderer;
@@ -5,7 +5,7 @@
5
5
  * Sprint Drag-Drop Feature
6
6
  */
7
7
  import { Component } from 'solid-js';
8
- import type { UILayout, RendererError, DragDropConfig } from '../types';
8
+ import type { UILayout, RendererError, DragDropConfig } from "../types.js";
9
9
  /**
10
10
  * Props for EditableUIResourceRenderer
11
11
  */
@@ -40,4 +40,3 @@ export interface EditableUIResourceRendererProps {
40
40
  */
41
41
  export declare const EditableUIResourceRenderer: Component<EditableUIResourceRendererProps>;
42
42
  export default EditableUIResourceRenderer;
43
- //# sourceMappingURL=EditableUIResourceRenderer.d.ts.map
@@ -0,0 +1,67 @@
1
+ /**
2
+ * ElicitationForm — schema-driven renderer for MCP `elicitation/create` requests
3
+ *
4
+ * @experimental
5
+ * @since v5.3.0
6
+ *
7
+ * Thin wrapper over `<ChatPrompt>` + `elicitationToPromptConfig()` that
8
+ * accepts a spec-shaped `ElicitationEvent` (MCP 2025-06-18) and exposes a
9
+ * spec-shaped `onAccept(content)` callback whose payload is ready to send
10
+ * back as the `accept` outcome of an `elicitation/create` reply.
11
+ *
12
+ * The mapping (boolean → confirm, single enum ≤4 → choice, else → form) is
13
+ * delegated to the `elicitationToPromptConfig` helper — same rules, same
14
+ * tests. This component owns the inverse mapping : extracting a spec-shaped
15
+ * `Record<string, unknown>` from the `ChatPromptResponse`.
16
+ *
17
+ * ## Outcome semantics (per MCP spec 2025-06-18)
18
+ *
19
+ * | User action | Callback fired | Payload |
20
+ * |---------------------------------------|--------------------|----------------------------------|
21
+ * | Submit form / pick choice / confirm | `onAccept(content)`| `{ [propName]: value, ... }` |
22
+ * | X icon / Cancel button | `onCancel()` *or* `onDecline()` if provided | none |
23
+ *
24
+ * mcp-ui's `<ChatPrompt>` does not natively distinguish "decline" (explicit
25
+ * refusal) from "cancel" (passive close). To surface a decline action,
26
+ * pass `dismissLabel="Decline"` and route the callback via `onDecline`.
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * bus.events.on('onElicitation', ({ elicitation }) => {
31
+ * render(() => (
32
+ * <ElicitationForm
33
+ * event={elicitation}
34
+ * onAccept={(content) => sendElicitationReply({ action: 'accept', content })}
35
+ * onCancel={() => sendElicitationReply({ action: 'cancel' })}
36
+ * />
37
+ * ), mountPoint)
38
+ * })
39
+ * ```
40
+ */
41
+ import { Component } from 'solid-js';
42
+ import type { ElicitationEvent } from "../types/chat-bus.cjs";
43
+ export interface ElicitationFormProps {
44
+ /** MCP `elicitation/create` request payload to render. */
45
+ event: ElicitationEvent;
46
+ /**
47
+ * Called when user submits a valid response. `content` is keyed by the
48
+ * elicitation `requestedSchema.properties` names — ready to send back as
49
+ * the `accept` outcome of an `elicitation/create` reply.
50
+ */
51
+ onAccept: (content: Record<string, unknown>) => void;
52
+ /** Called when user dismisses (X icon, confirm-cancel button). */
53
+ onCancel?: () => void;
54
+ /**
55
+ * Optional explicit decline action. When provided, takes precedence over
56
+ * `onCancel` on dismiss. Pair with `dismissLabel="Decline"` to surface as
57
+ * a decline action in the UI.
58
+ */
59
+ onDecline?: () => void;
60
+ /** Label on the dismiss button (default: X icon). */
61
+ dismissLabel?: string;
62
+ }
63
+ /**
64
+ * @experimental
65
+ * Schema-driven renderer for MCP `elicitation/create` requests.
66
+ */
67
+ export declare const ElicitationForm: Component<ElicitationFormProps>;
@@ -39,7 +39,7 @@
39
39
  * ```
40
40
  */
41
41
  import { Component } from 'solid-js';
42
- import type { ElicitationEvent } from '../types/chat-bus';
42
+ import type { ElicitationEvent } from "../types/chat-bus.js";
43
43
  export interface ElicitationFormProps {
44
44
  /** MCP `elicitation/create` request payload to render. */
45
45
  event: ElicitationEvent;
@@ -65,4 +65,3 @@ export interface ElicitationFormProps {
65
65
  * Schema-driven renderer for MCP `elicitation/create` requests.
66
66
  */
67
67
  export declare const ElicitationForm: Component<ElicitationFormProps>;
68
- //# sourceMappingURL=ElicitationForm.d.ts.map
@@ -0,0 +1,49 @@
1
+ /**
2
+ * ExpandableWrapper - Generic expand/fullscreen wrapper for components
3
+ * v2.2.0: Reusable wrapper that adds expand button + fullscreen modal
4
+ *
5
+ * Uses DOM reparenting to avoid rendering children twice — critical for
6
+ * imperative components like ChartJS that bind instances to DOM nodes.
7
+ */
8
+ import { Component, JSX, Accessor } from 'solid-js';
9
+ /** Hook for child components to read expanded state */
10
+ export declare const useExpanded: () => Accessor<boolean>;
11
+ export interface ExpandableWrapperProps {
12
+ /** Content to render inline (and in expanded view) */
13
+ children: JSX.Element;
14
+ /** Title shown in the expanded modal header */
15
+ title?: string;
16
+ /** Data string for copy-to-clipboard in expanded view */
17
+ copyData?: string;
18
+ /** Label for copy button tooltip */
19
+ copyLabel?: string;
20
+ /**
21
+ * Visibility behavior of the inline expand button (v6.3.0 — axe 4 deposium handoff).
22
+ * - `'hover'` (default) : opacity 0, fades to 0.7 on parent group hover.
23
+ * Backwards-compatible — pre-v6.3.0 behavior.
24
+ * - `'always-visible'` : opacity 0.6 permanent, 1 on hover. Use this when
25
+ * the inline button needs to be discoverable without hovering — esp.
26
+ * on touch surfaces and consumer themes where the hover-only pattern
27
+ * hides the affordance.
28
+ */
29
+ toolbarVariant?: 'hover' | 'always-visible';
30
+ /**
31
+ * Called with the expanded state on mount and whenever it changes (v6.19.0).
32
+ * Needed by renderers that render their own `<ExpandableWrapper>`: their
33
+ * `useExpanded()` call sits ABOVE the wrapper's context provider and would
34
+ * only ever see an outer wrapper.
35
+ */
36
+ onExpandedChange?: (expanded: boolean) => void;
37
+ }
38
+ /**
39
+ * Wraps any component with an expand button (top-right corner).
40
+ * Opens a fullscreen Portal modal. The children's DOM is physically
41
+ * reparented into the modal (not duplicated), so imperative bindings
42
+ * like Chart.js canvas refs stay intact.
43
+ *
44
+ * @example
45
+ * <ExpandableWrapper title="Sales Data" copyData={tsvData}>
46
+ * <TableRenderer ... />
47
+ * </ExpandableWrapper>
48
+ */
49
+ export declare const ExpandableWrapper: Component<ExpandableWrapperProps>;
@@ -47,4 +47,3 @@ export interface ExpandableWrapperProps {
47
47
  * </ExpandableWrapper>
48
48
  */
49
49
  export declare const ExpandableWrapper: Component<ExpandableWrapperProps>;
50
- //# sourceMappingURL=ExpandableWrapper.d.ts.map
@@ -0,0 +1,70 @@
1
+ /**
2
+ * FeedbackInline — per-message inline feedback (thumbs up/down)
3
+ *
4
+ * @experimental
5
+ * @since v5.2.0
6
+ *
7
+ * A small, non-blocking per-message feedback primitive. Sits next to an
8
+ * assistant message, captures a rating, calls back to the consumer for
9
+ * persistence. Best-effort by design — no retry UX, no revision UX.
10
+ *
11
+ * ## When to use vs other feedback primitives
12
+ *
13
+ * - **`FeedbackInline`** (this) → per-message thumb-up/down, non-blocking,
14
+ * many can coexist.
15
+ * - **`ChatPrompt` (type=choice)** → modal, one-at-a-time above the input,
16
+ * used when the agent needs a blocking answer.
17
+ * - **`ScratchpadPanel` feedback section** → structured feedback bound to a
18
+ * scratchpad turn, panel-side.
19
+ *
20
+ * ## Persistence is the consumer's job
21
+ *
22
+ * The component flips to "submitted" state *optimistically* on click and
23
+ * calls `onSubmit(rating, context)`. Network failures do not revert the UI —
24
+ * feedback is best-effort. If you need stricter semantics (offline retry,
25
+ * revision, ...) wrap this in your own component.
26
+ *
27
+ * @example
28
+ * ```tsx
29
+ * <FeedbackInline
30
+ * messageHash={msg.hash}
31
+ * context={{ intent: msg.intent, confidenceBand: msg.band }}
32
+ * onSubmit={(rating, ctx) =>
33
+ * fetch('/api/feedback', {
34
+ * method: 'POST',
35
+ * headers: { 'Content-Type': 'application/json' },
36
+ * body: JSON.stringify({ message_hash: msg.hash, rating, ...ctx }),
37
+ * })
38
+ * }
39
+ * />
40
+ * ```
41
+ */
42
+ import { Component } from 'solid-js';
43
+ export interface FeedbackInlineContext {
44
+ intent?: string;
45
+ confidenceBand?: string;
46
+ tags?: string[];
47
+ [key: string]: unknown;
48
+ }
49
+ export interface FeedbackInlineProps {
50
+ /** Stable identifier for the message being rated. */
51
+ messageHash?: string;
52
+ /**
53
+ * Called on click. Consumer is responsible for persistence (HTTP, store,
54
+ * localStorage). Return value ignored.
55
+ */
56
+ onSubmit: (rating: 'positive' | 'negative', context?: FeedbackInlineContext) => void | Promise<void>;
57
+ /** Extra context forwarded to `onSubmit`. */
58
+ context?: FeedbackInlineContext;
59
+ /** Ack text shown after positive rating. Defaults to `MCPUIStrings.feedbackPositiveAck` ('Thanks!' in EN). */
60
+ positiveAck?: string;
61
+ /** Ack text shown after negative rating. Defaults to `MCPUIStrings.feedbackNegativeAck`. */
62
+ negativeAck?: string;
63
+ /** Extra Tailwind classes on the container. */
64
+ class?: string;
65
+ }
66
+ /**
67
+ * @experimental
68
+ * Per-message inline feedback (thumbs up/down). Non-blocking.
69
+ */
70
+ export declare const FeedbackInline: Component<FeedbackInlineProps>;
@@ -68,4 +68,3 @@ export interface FeedbackInlineProps {
68
68
  * Per-message inline feedback (thumbs up/down). Non-blocking.
69
69
  */
70
70
  export declare const FeedbackInline: Component<FeedbackInlineProps>;
71
- //# sourceMappingURL=FeedbackInline.d.ts.map
@@ -0,0 +1,15 @@
1
+ import { Component } from 'solid-js';
2
+ export interface FooterComponentParams {
3
+ poweredBy?: string;
4
+ executionTime?: number;
5
+ model?: string;
6
+ sourceCount?: number;
7
+ customText?: string;
8
+ links?: {
9
+ label: string;
10
+ url: string;
11
+ }[];
12
+ }
13
+ export declare const FooterRenderer: Component<{
14
+ params: FooterComponentParams;
15
+ }>;
@@ -13,4 +13,3 @@ export interface FooterComponentParams {
13
13
  export declare const FooterRenderer: Component<{
14
14
  params: FooterComponentParams;
15
15
  }>;
16
- //# sourceMappingURL=FooterRenderer.d.ts.map
@@ -0,0 +1,19 @@
1
+ /**
2
+ * FormFieldRenderer - Individual form field component
3
+ * Sprint 1: Form Foundation
4
+ * Sprint 2: Conditional field visibility (showWhen)
5
+ */
6
+ import { Component, Accessor } from 'solid-js';
7
+ import type { FormFieldParams } from "../types.cjs";
8
+ export interface FormFieldRendererProps {
9
+ field: FormFieldParams;
10
+ value: any;
11
+ error?: string;
12
+ onChange: (value: any) => void;
13
+ disabled?: boolean;
14
+ /**
15
+ * Form data accessor for conditional field visibility
16
+ */
17
+ formData?: Accessor<Record<string, any>>;
18
+ }
19
+ export declare const FormFieldRenderer: Component<FormFieldRendererProps>;
@@ -4,7 +4,7 @@
4
4
  * Sprint 2: Conditional field visibility (showWhen)
5
5
  */
6
6
  import { Component, Accessor } from 'solid-js';
7
- import type { FormFieldParams } from '../types';
7
+ import type { FormFieldParams } from "../types.js";
8
8
  export interface FormFieldRendererProps {
9
9
  field: FormFieldParams;
10
10
  value: any;
@@ -17,4 +17,3 @@ export interface FormFieldRendererProps {
17
17
  formData?: Accessor<Record<string, any>>;
18
18
  }
19
19
  export declare const FormFieldRenderer: Component<FormFieldRendererProps>;
20
- //# sourceMappingURL=FormFieldRenderer.d.ts.map
@@ -0,0 +1,14 @@
1
+ /**
2
+ * FormRenderer - Main form component
3
+ * Sprint 1: Form Foundation
4
+ * Sprint 2: Conditional field visibility (showWhen)
5
+ * Sprint 4: Form state persistence
6
+ */
7
+ import { Component } from 'solid-js';
8
+ import type { UIComponent } from "../types.cjs";
9
+ export interface FormRendererProps {
10
+ component: UIComponent;
11
+ onSubmit?: (data: Record<string, any>) => void;
12
+ onError?: (errors: Record<string, string>) => void;
13
+ }
14
+ export declare const FormRenderer: Component<FormRendererProps>;
@@ -5,11 +5,10 @@
5
5
  * Sprint 4: Form state persistence
6
6
  */
7
7
  import { Component } from 'solid-js';
8
- import type { UIComponent } from '../types';
8
+ import type { UIComponent } from "../types.js";
9
9
  export interface FormRendererProps {
10
10
  component: UIComponent;
11
11
  onSubmit?: (data: Record<string, any>) => void;
12
12
  onError?: (errors: Record<string, string>) => void;
13
13
  }
14
14
  export declare const FormRenderer: Component<FormRendererProps>;
15
- //# sourceMappingURL=FormRenderer.d.ts.map
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Generative UI Error Boundary with Telemetry
3
+ * Phase 0: Error isolation + structured logging
4
+ *
5
+ * Features:
6
+ * - Component-level error isolation
7
+ * - Structured logging with context
8
+ * - Performance timing
9
+ * - Retry mechanism
10
+ * - User-friendly fallback UI
11
+ */
12
+ import { Component } from 'solid-js';
13
+ import type { RendererError } from "../types.cjs";
14
+ /**
15
+ * Props for GenerativeUIErrorBoundary
16
+ */
17
+ export interface GenerativeUIErrorBoundaryProps {
18
+ /**
19
+ * Component identifier for telemetry
20
+ */
21
+ componentId: string;
22
+ /**
23
+ * Component type for context
24
+ */
25
+ componentType: string;
26
+ /**
27
+ * Error callback
28
+ */
29
+ onError?: (error: RendererError) => void;
30
+ /**
31
+ * Allow retry on error
32
+ */
33
+ allowRetry?: boolean;
34
+ /**
35
+ * Child components to wrap
36
+ */
37
+ children: any;
38
+ /**
39
+ * Custom fallback UI (optional)
40
+ */
41
+ fallback?: (error: Error, retry?: () => void) => any;
42
+ }
43
+ /**
44
+ * Generative UI Error Boundary Component
45
+ */
46
+ export declare const GenerativeUIErrorBoundary: Component<GenerativeUIErrorBoundaryProps>;
47
+ /**
48
+ * Performance monitoring wrapper
49
+ * Logs render times for performance analysis
50
+ */
51
+ export declare function withPerformanceMonitoring<P extends {
52
+ componentId: string;
53
+ componentType: string;
54
+ }>(WrappedComponent: Component<P>): (props: P) => import("solid-js").JSX.Element;
55
+ /**
56
+ * Hook to track component lifecycle events
57
+ */
58
+ export declare function useComponentTelemetry(componentId: string, componentType: string): () => void;
@@ -10,7 +10,7 @@
10
10
  * - User-friendly fallback UI
11
11
  */
12
12
  import { Component } from 'solid-js';
13
- import type { RendererError } from '../types';
13
+ import type { RendererError } from "../types.js";
14
14
  /**
15
15
  * Props for GenerativeUIErrorBoundary
16
16
  */
@@ -56,4 +56,3 @@ export declare function withPerformanceMonitoring<P extends {
56
56
  * Hook to track component lifecycle events
57
57
  */
58
58
  export declare function useComponentTelemetry(componentId: string, componentType: string): () => void;
59
- //# sourceMappingURL=GenerativeUIErrorBoundary.d.ts.map
@@ -0,0 +1 @@
1
+ export { GenerativeUIErrorBoundary as default } from "./GenerativeUIErrorBoundary.cjs";
@@ -1,2 +1 @@
1
- export { GenerativeUIErrorBoundary as default } from './GenerativeUIErrorBoundary';
2
- //# sourceMappingURL=GenerativeUIErrorBoundary.default.d.ts.map
1
+ export { GenerativeUIErrorBoundary as default } from "./GenerativeUIErrorBoundary.js";
@@ -0,0 +1,112 @@
1
+ /**
2
+ * GhostText Component
3
+ * Displays LLM-style ghost text completion overlay
4
+ *
5
+ * Sprint Autocomplete Feature
6
+ */
7
+ import { Component, JSX } from 'solid-js';
8
+ /**
9
+ * Props for GhostText component
10
+ */
11
+ export interface GhostTextProps {
12
+ /**
13
+ * Current input value
14
+ */
15
+ inputValue: string;
16
+ /**
17
+ * Ghost text to show (the completion after input)
18
+ */
19
+ ghostText: string;
20
+ /**
21
+ * Whether ghost text is visible
22
+ */
23
+ visible?: boolean;
24
+ /**
25
+ * Custom class for the container
26
+ */
27
+ class?: string;
28
+ /**
29
+ * Custom class for the ghost text
30
+ */
31
+ ghostClass?: string;
32
+ /**
33
+ * Accept hint text (e.g., "Tab to accept")
34
+ */
35
+ hintText?: string;
36
+ /**
37
+ * Whether loading
38
+ */
39
+ isLoading?: boolean;
40
+ }
41
+ /**
42
+ * GhostText Component
43
+ * Overlays ghost text on an input field to show completion suggestions
44
+ */
45
+ export declare const GhostText: Component<GhostTextProps>;
46
+ /**
47
+ * Input wrapper that includes ghost text functionality
48
+ */
49
+ export interface GhostTextInputProps {
50
+ /**
51
+ * Current input value
52
+ */
53
+ value: string;
54
+ /**
55
+ * Ghost text to show
56
+ */
57
+ ghostText: string;
58
+ /**
59
+ * onChange handler
60
+ */
61
+ onInput?: (value: string) => void;
62
+ /**
63
+ * onKeyDown handler
64
+ */
65
+ onKeyDown?: (e: KeyboardEvent) => void;
66
+ /**
67
+ * Placeholder text
68
+ */
69
+ placeholder?: string;
70
+ /**
71
+ * Input type
72
+ */
73
+ type?: 'text' | 'email' | 'search';
74
+ /**
75
+ * Whether input is disabled
76
+ */
77
+ disabled?: boolean;
78
+ /**
79
+ * Input name
80
+ */
81
+ name?: string;
82
+ /**
83
+ * Input ID
84
+ */
85
+ id?: string;
86
+ /**
87
+ * Custom class for input
88
+ */
89
+ class?: string;
90
+ /**
91
+ * Accept hint
92
+ */
93
+ hintText?: string;
94
+ /**
95
+ * Whether loading
96
+ */
97
+ isLoading?: boolean;
98
+ /**
99
+ * Whether ghost text is visible
100
+ */
101
+ showGhost?: boolean;
102
+ /**
103
+ * Additional input attributes
104
+ */
105
+ inputProps?: JSX.InputHTMLAttributes<HTMLInputElement>;
106
+ }
107
+ /**
108
+ * GhostTextInput Component
109
+ * Input field with integrated ghost text overlay
110
+ */
111
+ export declare const GhostTextInput: Component<GhostTextInputProps>;
112
+ export default GhostText;
@@ -110,4 +110,3 @@ export interface GhostTextInputProps {
110
110
  */
111
111
  export declare const GhostTextInput: Component<GhostTextInputProps>;
112
112
  export default GhostText;
113
- //# sourceMappingURL=GhostText.d.ts.map