@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.
- package/CHANGELOG.md +22 -0
- package/README.md +14 -0
- package/dist/adapters/connector.cjs +3 -3
- package/dist/adapters/connector.cjs.map +1 -1
- package/dist/adapters/connector.d.cts +108 -0
- package/dist/adapters/connector.d.ts +1 -2
- package/dist/adapters/connector.js +3 -3
- package/dist/adapters/connector.js.map +1 -1
- package/dist/adapters/index.d.cts +21 -0
- package/dist/adapters/index.d.ts +6 -7
- package/dist/adapters/macro-run.d.cts +99 -0
- package/dist/adapters/macro-run.d.ts +1 -2
- package/dist/adapters/presentation.d.cts +1 -2
- package/dist/adapters/presentation.d.ts +1 -2
- package/dist/adapters.d.cts +1 -1
- package/dist/adapters.d.ts +1 -1
- package/dist/components/ActionGroupRenderer.d.cts +38 -0
- package/dist/components/ActionGroupRenderer.d.ts +1 -2
- package/dist/components/ActionRenderer.d.cts +9 -0
- package/dist/components/ActionRenderer.d.ts +0 -1
- package/dist/components/AgentCard.d.cts +19 -0
- package/dist/components/AgentCard.d.ts +1 -2
- package/dist/components/AgentHandoff.d.cts +11 -0
- package/dist/components/AgentHandoff.d.ts +1 -2
- package/dist/components/ArtifactRenderer.d.cts +11 -0
- package/dist/components/ArtifactRenderer.d.ts +0 -1
- package/dist/components/AutocompleteDropdown.d.cts +70 -0
- package/dist/components/AutocompleteDropdown.d.ts +1 -2
- package/dist/components/AutocompleteFormField.d.cts +51 -0
- package/dist/components/AutocompleteFormField.d.ts +1 -2
- package/dist/components/BriefingDiff.d.cts +11 -0
- package/dist/components/BriefingDiff.d.ts +1 -2
- package/dist/components/CarouselRenderer.d.cts +12 -0
- package/dist/components/CarouselRenderer.d.ts +1 -2
- package/dist/components/ChartJSRenderer.d.cts +62 -0
- package/dist/components/ChartJSRenderer.d.ts +1 -2
- package/dist/components/ChatPrompt.d.cts +69 -0
- package/dist/components/ChatPrompt.d.ts +1 -2
- package/dist/components/CodeBlockRenderer.d.cts +23 -0
- package/dist/components/CodeBlockRenderer.d.ts +1 -2
- package/dist/components/ComponentToolbar.d.cts +46 -0
- package/dist/components/ComponentToolbar.d.ts +0 -1
- package/dist/components/DataPreviewSection.d.cts +11 -0
- package/dist/components/DataPreviewSection.d.ts +1 -2
- package/dist/components/DegradedFallback.d.cts +43 -0
- package/dist/components/DegradedFallback.d.ts +0 -1
- package/dist/components/DraggableGridItem.d.cts +94 -0
- package/dist/components/DraggableGridItem.d.ts +1 -2
- package/dist/components/EditableLayoutContext.d.cts +4 -0
- package/dist/components/EditableLayoutContext.d.ts +0 -1
- package/dist/components/EditableUIResourceRenderer.d.cts +42 -0
- package/dist/components/EditableUIResourceRenderer.d.ts +1 -2
- package/dist/components/ElicitationForm.d.cts +67 -0
- package/dist/components/ElicitationForm.d.ts +1 -2
- package/dist/components/ExpandableWrapper.d.cts +49 -0
- package/dist/components/ExpandableWrapper.d.ts +0 -1
- package/dist/components/FeedbackInline.d.cts +70 -0
- package/dist/components/FeedbackInline.d.ts +0 -1
- package/dist/components/FooterRenderer.d.cts +15 -0
- package/dist/components/FooterRenderer.d.ts +0 -1
- package/dist/components/FormFieldRenderer.d.cts +19 -0
- package/dist/components/FormFieldRenderer.d.ts +1 -2
- package/dist/components/FormRenderer.d.cts +14 -0
- package/dist/components/FormRenderer.d.ts +1 -2
- package/dist/components/GenerativeUIErrorBoundary.d.cts +58 -0
- package/dist/components/GenerativeUIErrorBoundary.d.ts +1 -2
- package/dist/components/GenerativeUIErrorBoundary.default.d.cts +1 -0
- package/dist/components/GenerativeUIErrorBoundary.default.d.ts +1 -2
- package/dist/components/GhostText.d.cts +112 -0
- package/dist/components/GhostText.d.ts +0 -1
- package/dist/components/GraphRenderer.d.cts +66 -0
- package/dist/components/GraphRenderer.d.ts +1 -2
- package/dist/components/GridRenderer.d.cts +49 -0
- package/dist/components/GridRenderer.d.ts +1 -2
- package/dist/components/IframeFallbackLink.d.cts +22 -0
- package/dist/components/IframeFallbackLink.d.ts +0 -1
- package/dist/components/ImageGalleryRenderer.d.cts +22 -0
- package/dist/components/ImageGalleryRenderer.d.ts +1 -2
- package/dist/components/LightboxOverlay.d.cts +31 -0
- package/dist/components/LightboxOverlay.d.ts +1 -2
- package/dist/components/MapRenderer.d.cts +77 -0
- package/dist/components/MapRenderer.d.ts +1 -2
- package/dist/components/MissingValue.d.cts +26 -0
- package/dist/components/MissingValue.d.ts +0 -1
- package/dist/components/ModalRenderer.d.cts +66 -0
- package/dist/components/ModalRenderer.d.ts +1 -2
- package/dist/components/PortalDropdownMenu.d.cts +55 -0
- package/dist/components/PortalDropdownMenu.d.ts +0 -1
- package/dist/components/PresentationFeedback.d.cts +112 -0
- package/dist/components/PresentationFeedback.d.ts +0 -1
- package/dist/components/RenderContext.d.cts +41 -0
- package/dist/components/RenderContext.d.ts +1 -2
- package/dist/components/ResizeHandle.d.cts +49 -0
- package/dist/components/ResizeHandle.d.ts +0 -1
- package/dist/components/SafeHtml.d.cts +45 -0
- package/dist/components/SafeHtml.d.ts +0 -1
- package/dist/components/ScratchpadPanel.d.cts +34 -0
- package/dist/components/ScratchpadPanel.d.ts +1 -2
- package/dist/components/SplitStepper.d.cts +11 -0
- package/dist/components/SplitStepper.d.ts +1 -2
- package/dist/components/StreamingUIRenderer.d.cts +58 -0
- package/dist/components/StreamingUIRenderer.d.ts +3 -4
- package/dist/components/UIResourceRenderer.d.cts +181 -0
- package/dist/components/UIResourceRenderer.d.ts +3 -4
- package/dist/components/UIResourceRenderer.default.d.cts +1 -0
- package/dist/components/UIResourceRenderer.default.d.ts +1 -2
- package/dist/components/VerifiedText.d.cts +22 -0
- package/dist/components/VerifiedText.d.ts +1 -2
- package/dist/components/VideoRenderer.d.cts +41 -0
- package/dist/components/VideoRenderer.d.ts +1 -2
- package/dist/components/chart-data-table.d.cts +68 -0
- package/dist/components/chart-data-table.d.ts +0 -1
- package/dist/components/chart-missing-plugin.d.cts +128 -0
- package/dist/components/chart-missing-plugin.d.ts +1 -2
- package/dist/components/index.d.cts +62 -0
- package/dist/components/index.d.ts +57 -58
- package/dist/components.d.cts +2 -2
- package/dist/components.d.ts +2 -2
- package/dist/context/AutocompleteContext.d.cts +76 -0
- package/dist/context/AutocompleteContext.d.ts +1 -2
- package/dist/context/MCPActionContext.d.cts +169 -0
- package/dist/context/MCPActionContext.d.ts +0 -1
- package/dist/context/MCPUIConfigContext.d.cts +201 -0
- package/dist/context/MCPUIConfigContext.d.ts +1 -2
- package/dist/context/MCPUIMathContext.d.cts +17 -0
- package/dist/context/MCPUIMathContext.d.ts +0 -1
- package/dist/context/MCPUIStringsContext.d.cts +802 -0
- package/dist/context/MCPUIStringsContext.d.ts +1 -2
- package/dist/context/MCPUITelemetryContext.d.cts +35 -0
- package/dist/context/MCPUITelemetryContext.d.ts +1 -2
- package/dist/context/index.d.cts +7 -0
- package/dist/context/index.d.ts +2 -3
- package/dist/hooks/createResponsiveGrid.d.cts +5 -0
- package/dist/hooks/createResponsiveGrid.d.ts +0 -1
- package/dist/hooks/index.d.cts +25 -0
- package/dist/hooks/index.d.ts +20 -21
- package/dist/hooks/useAction.d.cts +164 -0
- package/dist/hooks/useAction.d.ts +2 -3
- package/dist/hooks/useAutocomplete.d.cts +118 -0
- package/dist/hooks/useAutocomplete.d.ts +1 -2
- package/dist/hooks/useChatBus.d.cts +55 -0
- package/dist/hooks/useChatBus.d.ts +1 -2
- package/dist/hooks/useConditionalField.d.cts +34 -0
- package/dist/hooks/useConditionalField.d.ts +1 -2
- package/dist/hooks/useDataValidator.d.cts +41 -0
- package/dist/hooks/useDataValidator.d.ts +1 -2
- package/dist/hooks/useDragDrop.d.cts +99 -0
- package/dist/hooks/useDragDrop.d.ts +1 -2
- package/dist/hooks/useFormPersistence.d.cts +80 -0
- package/dist/hooks/useFormPersistence.d.ts +0 -1
- package/dist/hooks/useModal.d.cts +106 -0
- package/dist/hooks/useModal.d.ts +0 -1
- package/dist/hooks/useResize.d.cts +86 -0
- package/dist/hooks/useResize.d.ts +1 -2
- package/dist/hooks/useStreamingUI.d.cts +117 -0
- package/dist/hooks/useStreamingUI.d.ts +1 -2
- package/dist/hooks.d.cts +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/index.d.cts +91 -92
- package/dist/index.d.ts +91 -92
- package/dist/plugins/duckdb.d.cts +1 -2
- package/dist/plugins/duckdb.d.ts +1 -2
- package/dist/plugins/groq.d.cts +12 -0
- package/dist/plugins/groq.d.ts +1 -2
- package/dist/plugins/index.d.cts +9 -0
- package/dist/plugins/index.d.ts +3 -4
- package/dist/plugins/katex.d.cts +1 -2
- package/dist/plugins/katex.d.ts +1 -2
- package/dist/plugins/rest.d.cts +12 -0
- package/dist/plugins/rest.d.ts +1 -2
- package/dist/plugins/supabase.d.cts +12 -0
- package/dist/plugins/supabase.d.ts +1 -2
- package/dist/services/chat-bus.d.cts +100 -0
- package/dist/services/chat-bus.d.ts +1 -2
- package/dist/services/chat-prompt-controller.d.cts +92 -0
- package/dist/services/chat-prompt-controller.d.ts +1 -2
- package/dist/services/component-registry.d.cts +119 -0
- package/dist/services/component-registry.d.ts +1 -2
- package/dist/services/data-validator.d.cts +27 -0
- package/dist/services/data-validator.d.ts +1 -2
- package/dist/services/index.d.cts +9 -0
- package/dist/services/index.d.ts +4 -5
- package/dist/services/telemetry.d.cts +86 -0
- package/dist/services/telemetry.d.ts +1 -2
- package/dist/services/validation.d.cts +169 -0
- package/dist/services/validation.d.ts +1 -2
- package/dist/stores/scratchpad-store.d.cts +109 -0
- package/dist/stores/scratchpad-store.d.ts +1 -2
- package/dist/stores/server-capabilities-store.d.cts +171 -0
- package/dist/stores/server-capabilities-store.d.ts +0 -1
- package/dist/test-setup.d.cts +5 -0
- package/dist/test-setup.d.ts +0 -1
- package/dist/testing/index.d.cts +34 -0
- package/dist/testing/index.d.ts +1 -2
- package/dist/types/chat-bus.d.cts +783 -0
- package/dist/types/chat-bus.d.ts +4 -5
- package/dist/types/index.d.cts +1616 -0
- package/dist/types/index.d.ts +0 -1
- package/dist/types-export.d.cts +1 -2
- package/dist/types-export.d.ts +1 -2
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utils/degraded-projections.d.cts +119 -0
- package/dist/utils/degraded-projections.d.ts +0 -1
- package/dist/utils/duplicate-mount-registry.d.cts +83 -0
- package/dist/utils/duplicate-mount-registry.d.ts +0 -1
- package/dist/utils/escape-html.d.cts +12 -0
- package/dist/utils/escape-html.d.ts +0 -1
- package/dist/utils/format-string.d.cts +25 -0
- package/dist/utils/format-string.d.ts +0 -1
- package/dist/utils/iframe-coep.d.cts +53 -0
- package/dist/utils/iframe-coep.d.ts +1 -2
- package/dist/utils/logger.d.cts +57 -0
- package/dist/utils/logger.d.ts +0 -1
- package/dist/utils/math-markdown.d.cts +15 -0
- package/dist/utils/math-markdown.d.ts +1 -2
- package/dist/utils/missing-value.d.cts +78 -0
- package/dist/utils/missing-value.d.ts +0 -1
- package/dist/utils/pan-zoom.d.cts +234 -0
- package/dist/utils/pan-zoom.d.ts +0 -1
- package/dist/utils/perf.d.cts +18 -0
- package/dist/utils/perf.d.ts +0 -1
- package/dist/utils/safe-url.d.cts +33 -0
- package/dist/utils/safe-url.d.ts +0 -1
- package/dist/utils/sanitize-html.d.cts +142 -0
- package/dist/utils/sanitize-html.d.ts +0 -1
- package/dist/utils/stable-key.d.cts +32 -0
- package/dist/utils/stable-key.d.ts +0 -1
- package/dist/utils/theme.d.cts +10 -0
- package/dist/utils/theme.d.ts +0 -1
- package/dist/validation.d.cts +3 -4
- package/dist/validation.d.ts +3 -4
- package/docs/SECURITY-DEPENDENCIES.md +129 -1
- package/docs/ZOD4-STABLE-MIGRATION-2026-10-26.md +181 -0
- package/package.json +8 -7
- package/src/adapters/connector.ts +3 -3
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RenderContext - Provides component rendering without circular dependencies
|
|
3
|
+
*
|
|
4
|
+
* This context breaks the circular dependency between:
|
|
5
|
+
* - UIResourceRenderer → CarouselRenderer/GridRenderer
|
|
6
|
+
* - CarouselRenderer/GridRenderer → UIResourceRenderer
|
|
7
|
+
*
|
|
8
|
+
* By providing the render function via context, child components can render
|
|
9
|
+
* nested components without importing UIResourceRenderer directly.
|
|
10
|
+
*/
|
|
11
|
+
import { JSX } from 'solid-js';
|
|
12
|
+
import type { UIComponent, RendererError } from "../types.cjs";
|
|
13
|
+
/**
|
|
14
|
+
* Render function type that renders a UIComponent
|
|
15
|
+
*/
|
|
16
|
+
export type RenderComponentFn = (component: UIComponent, onError?: (error: RendererError) => void) => JSX.Element;
|
|
17
|
+
/**
|
|
18
|
+
* Context value for component rendering
|
|
19
|
+
*/
|
|
20
|
+
export interface RenderContextValue {
|
|
21
|
+
/**
|
|
22
|
+
* Renders a single UIComponent
|
|
23
|
+
*/
|
|
24
|
+
renderComponent: RenderComponentFn;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Context for providing component rendering capability
|
|
28
|
+
*/
|
|
29
|
+
export declare const RenderContext: import("solid-js").Context<RenderContextValue>;
|
|
30
|
+
/**
|
|
31
|
+
* Hook to access the render context
|
|
32
|
+
* Used by CarouselRenderer and GridRenderer to render nested components
|
|
33
|
+
*/
|
|
34
|
+
export declare function useRenderContext(): RenderContextValue;
|
|
35
|
+
/**
|
|
36
|
+
* Provider component for render context
|
|
37
|
+
*/
|
|
38
|
+
export declare function RenderProvider(props: {
|
|
39
|
+
renderComponent: RenderComponentFn;
|
|
40
|
+
children: JSX.Element;
|
|
41
|
+
}): JSX.Element;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* nested components without importing UIResourceRenderer directly.
|
|
10
10
|
*/
|
|
11
11
|
import { JSX } from 'solid-js';
|
|
12
|
-
import type { UIComponent, RendererError } from
|
|
12
|
+
import type { UIComponent, RendererError } from "../types.js";
|
|
13
13
|
/**
|
|
14
14
|
* Render function type that renders a UIComponent
|
|
15
15
|
*/
|
|
@@ -39,4 +39,3 @@ export declare function RenderProvider(props: {
|
|
|
39
39
|
renderComponent: RenderComponentFn;
|
|
40
40
|
children: JSX.Element;
|
|
41
41
|
}): JSX.Element;
|
|
42
|
-
//# sourceMappingURL=RenderContext.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ResizeHandle Component
|
|
3
|
+
* Visual handle for resizing grid components
|
|
4
|
+
*
|
|
5
|
+
* Sprint Drag-Drop Feature
|
|
6
|
+
*/
|
|
7
|
+
import { Component } from 'solid-js';
|
|
8
|
+
/**
|
|
9
|
+
* Resize edge types
|
|
10
|
+
*/
|
|
11
|
+
export type ResizeEdge = 'left' | 'right' | 'top' | 'bottom';
|
|
12
|
+
/**
|
|
13
|
+
* Props for ResizeHandle
|
|
14
|
+
*/
|
|
15
|
+
export interface ResizeHandleProps {
|
|
16
|
+
/**
|
|
17
|
+
* Which edge this handle is on
|
|
18
|
+
*/
|
|
19
|
+
edge: ResizeEdge;
|
|
20
|
+
/**
|
|
21
|
+
* Callback when resize starts
|
|
22
|
+
*/
|
|
23
|
+
onResizeStart?: (edge: ResizeEdge, event: PointerEvent) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Whether the handle is disabled
|
|
26
|
+
*/
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Whether resize is active
|
|
30
|
+
*/
|
|
31
|
+
isActive?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Custom class
|
|
34
|
+
*/
|
|
35
|
+
class?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Handle size in pixels
|
|
38
|
+
*/
|
|
39
|
+
size?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Hit area size in pixels (larger than visible size for easier grabbing)
|
|
42
|
+
*/
|
|
43
|
+
hitAreaSize?: number;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* ResizeHandle Component
|
|
47
|
+
*/
|
|
48
|
+
export declare const ResizeHandle: Component<ResizeHandleProps>;
|
|
49
|
+
export default ResizeHandle;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `<SafeHtml>` — the only place in this package that binds a string to
|
|
3
|
+
* `innerHTML`.
|
|
4
|
+
*
|
|
5
|
+
* Two jobs:
|
|
6
|
+
*
|
|
7
|
+
* 1. Render the (already sanitized — see `sanitizeHtml`) markup through the
|
|
8
|
+
* `innerHTML` prop, so SSR still emits content and client renders/updates
|
|
9
|
+
* stay reactive.
|
|
10
|
+
* 2. Repair the hydration hole. `solid-js/web`'s `setProperty(node,
|
|
11
|
+
* 'innerHTML', v)` returns early while hydrating, so the server-rendered
|
|
12
|
+
* content (escaped plain text, per the SSR contract — block structure is
|
|
13
|
+
* lost until this fix-up runs) would otherwise stay in the DOM forever.
|
|
14
|
+
* `onMount` runs client-side only, after hydration, and re-applies
|
|
15
|
+
* `html()` when the live DOM disagrees with it.
|
|
16
|
+
*
|
|
17
|
+
* Every sink carrying untrusted markup goes through this component: `text`
|
|
18
|
+
* component content, table cells and `ui://` rawHtml resources. One sink is
|
|
19
|
+
* deliberately outside it — `CodeBlockRenderer` binds highlight.js output (or
|
|
20
|
+
* `escapeHtml(code)` when highlight.js is missing or throws) straight into its
|
|
21
|
+
* own `<code innerHTML>`, a string that is markup-safe by construction and
|
|
22
|
+
* never passes through `sanitizeHtml`.
|
|
23
|
+
*
|
|
24
|
+
* @see ../utils/sanitize-html
|
|
25
|
+
* @see ./CodeBlockRenderer for the one innerHTML sink outside this component
|
|
26
|
+
*/
|
|
27
|
+
import { type JSX } from 'solid-js';
|
|
28
|
+
export interface SafeHtmlProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
29
|
+
/**
|
|
30
|
+
* Accessor returning **already sanitized** HTML. Kept as an accessor (not a
|
|
31
|
+
* plain string) so the value stays reactive through `splitProps`.
|
|
32
|
+
*/
|
|
33
|
+
html: () => string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Apply `html` to `el` when the live DOM content differs.
|
|
37
|
+
*
|
|
38
|
+
* Exported for tests: the hydration path it exists for cannot be reproduced in
|
|
39
|
+
* jsdom, so the fix-up is unit-tested directly against a "stale" element.
|
|
40
|
+
*
|
|
41
|
+
* @returns `true` when the DOM was patched.
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
export declare function _applySafeHtml(el: HTMLElement | undefined, html: string): boolean;
|
|
45
|
+
export declare function SafeHtml(props: SafeHtmlProps): JSX.Element;
|
|
@@ -43,4 +43,3 @@ export interface SafeHtmlProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
|
43
43
|
*/
|
|
44
44
|
export declare function _applySafeHtml(el: HTMLElement | undefined, html: string): boolean;
|
|
45
45
|
export declare function SafeHtml(props: SafeHtmlProps): JSX.Element;
|
|
46
|
-
//# sourceMappingURL=SafeHtml.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ScratchpadPanel v3 — Full HITL/AITL workspace
|
|
3
|
+
* v2.9.0: Interactive filters, form sections, stepper, preview auto-refresh
|
|
4
|
+
*
|
|
5
|
+
* @experimental
|
|
6
|
+
*/
|
|
7
|
+
import { Component } from 'solid-js';
|
|
8
|
+
import type { ScratchpadState } from "../types/chat-bus.cjs";
|
|
9
|
+
export interface ScratchpadPanelProps {
|
|
10
|
+
state: ScratchpadState;
|
|
11
|
+
onFilterChange?: (filters: Record<string, string | string[]>) => void;
|
|
12
|
+
onAction?: (action: string, data?: unknown) => void;
|
|
13
|
+
onSectionEdit?: (sectionId: string, content: unknown) => void;
|
|
14
|
+
/** Dedicated callback for form submissions (cleaner than onAction) */
|
|
15
|
+
onSubmit?: (sectionId: string, values: Record<string, unknown>) => void;
|
|
16
|
+
/** Called when user clicks retry on error state */
|
|
17
|
+
onRetry?: () => void;
|
|
18
|
+
onClose?: () => void;
|
|
19
|
+
/** When true, action buttons show loading spinner and stay open until next server update */
|
|
20
|
+
asyncAction?: boolean;
|
|
21
|
+
/** When true (set by server), scratchpad stays visible during stream */
|
|
22
|
+
pinned?: boolean;
|
|
23
|
+
/** Log events/actions to console */
|
|
24
|
+
debug?: boolean;
|
|
25
|
+
/** Show mini debug overlay */
|
|
26
|
+
debugOverlay?: boolean;
|
|
27
|
+
/** Show collapsible debug trace panel under forms */
|
|
28
|
+
debugTrace?: boolean;
|
|
29
|
+
closable?: boolean;
|
|
30
|
+
autoCloseDelay?: number;
|
|
31
|
+
collapsible?: boolean;
|
|
32
|
+
maxHeight?: string;
|
|
33
|
+
}
|
|
34
|
+
export declare const ScratchpadPanel: Component<ScratchpadPanelProps>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @experimental
|
|
6
6
|
*/
|
|
7
7
|
import { Component } from 'solid-js';
|
|
8
|
-
import type { ScratchpadState } from
|
|
8
|
+
import type { ScratchpadState } from "../types/chat-bus.js";
|
|
9
9
|
export interface ScratchpadPanelProps {
|
|
10
10
|
state: ScratchpadState;
|
|
11
11
|
onFilterChange?: (filters: Record<string, string | string[]>) => void;
|
|
@@ -32,4 +32,3 @@ export interface ScratchpadPanelProps {
|
|
|
32
32
|
maxHeight?: string;
|
|
33
33
|
}
|
|
34
34
|
export declare const ScratchpadPanel: Component<ScratchpadPanelProps>;
|
|
35
|
-
//# sourceMappingURL=ScratchpadPanel.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SplitStepper — parallel agent steppers side by side
|
|
3
|
+
* v4.1.0: AITL sprint — 2-3 columns, synthesis row at bottom
|
|
4
|
+
*
|
|
5
|
+
* @experimental
|
|
6
|
+
*/
|
|
7
|
+
import type { SplitStepperContent } from "../types/chat-bus.cjs";
|
|
8
|
+
export interface SplitStepperProps {
|
|
9
|
+
content: SplitStepperContent;
|
|
10
|
+
}
|
|
11
|
+
export declare function SplitStepper(props: SplitStepperProps): import("solid-js").JSX.Element;
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @experimental
|
|
6
6
|
*/
|
|
7
|
-
import type { SplitStepperContent } from
|
|
7
|
+
import type { SplitStepperContent } from "../types/chat-bus.js";
|
|
8
8
|
export interface SplitStepperProps {
|
|
9
9
|
content: SplitStepperContent;
|
|
10
10
|
}
|
|
11
11
|
export declare function SplitStepper(props: SplitStepperProps): import("solid-js").JSX.Element;
|
|
12
|
-
//# sourceMappingURL=SplitStepper.d.ts.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StreamingUIRenderer Component
|
|
3
|
+
*
|
|
4
|
+
* Renders streaming dashboard components with skeleton states and progress
|
|
5
|
+
* indicators. Uses the `useStreamingUI` hook for SSE connection and state.
|
|
6
|
+
*
|
|
7
|
+
* ## Rendering parity (v6.6.0 — closes Gap 1 of ROADMAP-opendata-macro-mcpui)
|
|
8
|
+
*
|
|
9
|
+
* Each component received over SSE is delegated to the real
|
|
10
|
+
* `<UIResourceRenderer>`. Streamed `table` / `chart` / `map` / `action-group`
|
|
11
|
+
* therefore render with the SAME fidelity as a static layout — no more
|
|
12
|
+
* simplified "type + title" placeholder. Validation, telemetry, the error
|
|
13
|
+
* boundary and `errorMode` all come from `<UIResourceRenderer>`, so the two
|
|
14
|
+
* paths cannot drift.
|
|
15
|
+
*
|
|
16
|
+
* Delegation is a one-way value import (`UIResourceRenderer` never imports
|
|
17
|
+
* this file — no cycle). The streamed component's `position` is normalized
|
|
18
|
+
* to full-width before delegation : this component owns the 12-column grid,
|
|
19
|
+
* `<UIResourceRenderer>` only owns the component's own rendering.
|
|
20
|
+
*
|
|
21
|
+
* Features:
|
|
22
|
+
* - Skeleton loading states while components stream
|
|
23
|
+
* - Progress bar and status messages
|
|
24
|
+
* - Smooth component animations on arrival
|
|
25
|
+
* - Error handling with retry capability
|
|
26
|
+
* - Responsive 12-column grid layout
|
|
27
|
+
*
|
|
28
|
+
* Usage:
|
|
29
|
+
* ```tsx
|
|
30
|
+
* <StreamingUIRenderer
|
|
31
|
+
* query="Show me revenue trends"
|
|
32
|
+
* spaceIds={['uuid1', 'uuid2']}
|
|
33
|
+
* onComplete={(metadata) => console.log('Done!', metadata)}
|
|
34
|
+
* />
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
import { type UseStreamingUIOptions } from "../hooks/useStreamingUI.cjs";
|
|
38
|
+
import type { RendererError } from "../types.cjs";
|
|
39
|
+
import { type ValidationErrorMode } from "./UIResourceRenderer.cjs";
|
|
40
|
+
export interface StreamingUIRendererProps extends UseStreamingUIOptions {
|
|
41
|
+
class?: string;
|
|
42
|
+
showProgress?: boolean;
|
|
43
|
+
showMetadata?: boolean;
|
|
44
|
+
onRenderError?: (error: RendererError) => void;
|
|
45
|
+
/**
|
|
46
|
+
* How to react when a streamed component fails `validateComponent()`
|
|
47
|
+
* (v5.4.0). Defaults to `'block'` (full red error card — pre-v5.4.0
|
|
48
|
+
* behavior). Forwarded to the delegated `<UIResourceRenderer>`.
|
|
49
|
+
*/
|
|
50
|
+
errorMode?: ValidationErrorMode;
|
|
51
|
+
/**
|
|
52
|
+
* Visibility behavior of the inline expand button on streamed components
|
|
53
|
+
* wrapped in `<ExpandableWrapper>` (v6.6.0 — parity with the static
|
|
54
|
+
* `<UIResourceRenderer toolbarVariant>` prop). Forwarded as-is.
|
|
55
|
+
*/
|
|
56
|
+
toolbarVariant?: 'hover' | 'always-visible';
|
|
57
|
+
}
|
|
58
|
+
export declare function StreamingUIRenderer(props: StreamingUIRendererProps): import("solid-js").JSX.Element;
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
* />
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
import { type UseStreamingUIOptions } from
|
|
38
|
-
import type { RendererError } from
|
|
39
|
-
import { type ValidationErrorMode } from
|
|
37
|
+
import { type UseStreamingUIOptions } from "../hooks/useStreamingUI.js";
|
|
38
|
+
import type { RendererError } from "../types.js";
|
|
39
|
+
import { type ValidationErrorMode } from "./UIResourceRenderer.js";
|
|
40
40
|
export interface StreamingUIRendererProps extends UseStreamingUIOptions {
|
|
41
41
|
class?: string;
|
|
42
42
|
showProgress?: boolean;
|
|
@@ -56,4 +56,3 @@ export interface StreamingUIRendererProps extends UseStreamingUIOptions {
|
|
|
56
56
|
toolbarVariant?: 'hover' | 'always-visible';
|
|
57
57
|
}
|
|
58
58
|
export declare function StreamingUIRenderer(props: StreamingUIRendererProps): import("solid-js").JSX.Element;
|
|
59
|
-
//# sourceMappingURL=StreamingUIRenderer.d.ts.map
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI Resource Renderer Component
|
|
3
|
+
* Phase 0: Foundation with iframe sandbox and composite grid support
|
|
4
|
+
*/
|
|
5
|
+
import { Component } from 'solid-js';
|
|
6
|
+
import type { UIComponent, UILayout, RendererError } from "../types.cjs";
|
|
7
|
+
import { type DuplicateMountInfo } from "../utils/duplicate-mount-registry.cjs";
|
|
8
|
+
/**
|
|
9
|
+
* How `<UIResourceRenderer>` reacts when `validateComponent()` rejects a
|
|
10
|
+
* component (v5.4.0).
|
|
11
|
+
*
|
|
12
|
+
* - `'block'` : full-slot red error card (default — backward compatible)
|
|
13
|
+
* - `'inline-warn'` : compact yellow chip in the slot, tooltip carries the
|
|
14
|
+
* error message — keeps the surrounding layout clean
|
|
15
|
+
* (e.g. inside a chat message)
|
|
16
|
+
* - `'silent'` : render nothing in the slot; `onError` still fires so the
|
|
17
|
+
* consumer can log/alert
|
|
18
|
+
*
|
|
19
|
+
* Runtime errors caught by `<GenerativeUIErrorBoundary>` are NOT affected by
|
|
20
|
+
* this prop — they always show the boundary's fallback UI.
|
|
21
|
+
*/
|
|
22
|
+
export type ValidationErrorMode = 'block' | 'inline-warn' | 'silent';
|
|
23
|
+
import { type MathRenderer } from "../context/MCPUIMathContext.cjs";
|
|
24
|
+
/**
|
|
25
|
+
* Props for UIResourceRenderer
|
|
26
|
+
*/
|
|
27
|
+
export interface UIResourceRendererProps {
|
|
28
|
+
/**
|
|
29
|
+
* Single component or full layout to render
|
|
30
|
+
*/
|
|
31
|
+
content: UIComponent | UILayout;
|
|
32
|
+
/**
|
|
33
|
+
* Lazy loading (default: true)
|
|
34
|
+
*/
|
|
35
|
+
lazyLoad?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Error callback
|
|
38
|
+
*/
|
|
39
|
+
onError?: (error: RendererError) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Custom CSS class
|
|
42
|
+
*/
|
|
43
|
+
class?: string;
|
|
44
|
+
/**
|
|
45
|
+
* How to react when a component fails `validateComponent()` (v5.4.0).
|
|
46
|
+
* Defaults to `'block'` (replaces the slot with a red error card —
|
|
47
|
+
* the pre-v5.4.0 behavior).
|
|
48
|
+
*
|
|
49
|
+
* @see ValidationErrorMode
|
|
50
|
+
*/
|
|
51
|
+
errorMode?: ValidationErrorMode;
|
|
52
|
+
/**
|
|
53
|
+
* Visibility behavior of the inline expand button shipped by every
|
|
54
|
+
* renderer wrapped in `<ExpandableWrapper>` (v6.3.1 — closes axe 4 of
|
|
55
|
+
* the deposium handoff).
|
|
56
|
+
* - `'hover'` (default) : button fades in on hover. Backwards-compatible.
|
|
57
|
+
* - `'always-visible'` : button visible at rest. Use this on chat
|
|
58
|
+
* surfaces / touch surfaces where the hover affordance is hidden.
|
|
59
|
+
*
|
|
60
|
+
* Forwarded to all internal renderers : table, chart (Chart.js path),
|
|
61
|
+
* graph, map, video, carousel, image-gallery, code.
|
|
62
|
+
*/
|
|
63
|
+
toolbarVariant?: 'hover' | 'always-visible';
|
|
64
|
+
/**
|
|
65
|
+
* Allow the chart renderer to fall back to the **quickchart.io** image API
|
|
66
|
+
* when the native `chart.js` peer is unavailable (v6.14.0, audit P1.7).
|
|
67
|
+
*
|
|
68
|
+
* The quickchart fallback sends the **entire chart config** (labels + data)
|
|
69
|
+
* to an external service inside an image URL — an implicit network call that
|
|
70
|
+
* can leak potentially sensitive data and behaves differently offline. For a
|
|
71
|
+
* public, LLM/connector-driven package the safe default is **off**: when
|
|
72
|
+
* Chart.js is missing (or `renderer: 'iframe'` is requested) the chart
|
|
73
|
+
* **degrades to a local data table** and emits a `render:error` telemetry
|
|
74
|
+
* signal instead of silently calling out.
|
|
75
|
+
*
|
|
76
|
+
* This is a **host-level** trust decision, deliberately NOT a payload field
|
|
77
|
+
* (a payload could otherwise opt itself in). Set it to `true` only when the
|
|
78
|
+
* data is non-sensitive and an external image render is acceptable.
|
|
79
|
+
*
|
|
80
|
+
* @default false
|
|
81
|
+
*/
|
|
82
|
+
allowQuickchartFallback?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Per-instance hook fired when this renderer mounts a content key that
|
|
85
|
+
* is already mounted elsewhere in the document (v6.5.0 — closes Demande 2
|
|
86
|
+
* of `BRIEF-MCPUI-2026-05-10.md`).
|
|
87
|
+
*
|
|
88
|
+
* The key comes from `getUiResourceStableKey(content)` — `content.id` if
|
|
89
|
+
* provided, else a content hash. The reporter fires every time the
|
|
90
|
+
* concurrent mount count crosses 2+ ; consumers decide what to do
|
|
91
|
+
* (`console.warn`, telemetry beacon, debug overlay, …). The renderer
|
|
92
|
+
* never deduplicates visually on its own.
|
|
93
|
+
*/
|
|
94
|
+
onMountDuplicate?: (info: DuplicateMountInfo) => void;
|
|
95
|
+
/**
|
|
96
|
+
* When `true`, log duplicate mounts to `console.warn` from this instance
|
|
97
|
+
* even when the global `isDebugEnabled()` flag is off. Use to opt-in to
|
|
98
|
+
* console noise on a single suspect surface without flipping the global
|
|
99
|
+
* debug switch (v6.5.0).
|
|
100
|
+
*/
|
|
101
|
+
debugDuplicateMounts?: boolean;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Wrap matches of `query` in `<mark>` tags within an HTML string.
|
|
105
|
+
* Case-insensitive. v6.19.0 — DOM-based.
|
|
106
|
+
*
|
|
107
|
+
* The previous implementation tokenized the markup with a regex, which put
|
|
108
|
+
* `<mark>` *inside* HTML entities and attribute text: searching `amp` in a
|
|
109
|
+
* cell containing `&` spliced a tag through the entity and corrupted it.
|
|
110
|
+
* Parsing into a detached `<template>` and walking only text nodes makes both
|
|
111
|
+
* classes of corruption impossible — attribute values are never visited, and
|
|
112
|
+
* an entity is a single character by the time the walker sees it.
|
|
113
|
+
*
|
|
114
|
+
* The input is always post-sanitize markup (see `sanitize-html`), and a
|
|
115
|
+
* `<template>`'s content is an inert document fragment, so parsing here
|
|
116
|
+
* neither runs script nor fetches anything.
|
|
117
|
+
*
|
|
118
|
+
* No-DOM environments (SSR) return the html unchanged.
|
|
119
|
+
*/
|
|
120
|
+
export declare function highlightQuery(html: string, query: string): string;
|
|
121
|
+
/**
|
|
122
|
+
* Citation context — opt-in input to `renderCellValue` (v5.7.0).
|
|
123
|
+
*
|
|
124
|
+
* When passed, `[N]`, `Citation [N]`, `[CITATION N]` and `[📄 CITATION N]`
|
|
125
|
+
* markers in the cell text are normalized then replaced with chip HTML.
|
|
126
|
+
* Chips carry `data-citation-page`, `data-citation-doc`, and
|
|
127
|
+
* `data-citation-verified` attributes (already in the DOMPurify whitelist
|
|
128
|
+
* since v5.6.0) so a host's `target.closest('[data-citation-page]')`
|
|
129
|
+
* delegated click handler routes the click to the source-doc panel.
|
|
130
|
+
*
|
|
131
|
+
* See `mcp-ui-solid/docs/briefs/BRIEF-citations-in-table-cells.md`.
|
|
132
|
+
*/
|
|
133
|
+
export interface CitationCtx {
|
|
134
|
+
/**
|
|
135
|
+
* `Record<id, mapping>` keyed by the citation marker number (string-keyed
|
|
136
|
+
* because JSON serialization always produces strings; the runtime call
|
|
137
|
+
* sites accept either number or string ids and normalize internally).
|
|
138
|
+
*/
|
|
139
|
+
map: Record<string | number, {
|
|
140
|
+
page: number | string;
|
|
141
|
+
file?: string;
|
|
142
|
+
file_id?: number | string;
|
|
143
|
+
}>;
|
|
144
|
+
/**
|
|
145
|
+
* Optional override returning sanitized chip HTML for one marker. Wins
|
|
146
|
+
* over the default `defaultCitationChip` shape. Function inputs are
|
|
147
|
+
* intentionally `any`-loose so consumers can swap shapes (e.g. web
|
|
148
|
+
* citations vs doc citations) without subtyping the entry shape here.
|
|
149
|
+
*/
|
|
150
|
+
render?: (id: number, mapping: {
|
|
151
|
+
page: number | string;
|
|
152
|
+
file?: string;
|
|
153
|
+
file_id?: number | string;
|
|
154
|
+
} | undefined) => string;
|
|
155
|
+
/**
|
|
156
|
+
* Template for the visible placeholder kept when `map` is EMPTY and a
|
|
157
|
+
* marker therefore resolves to nothing — `{id}` is the marker number.
|
|
158
|
+
*
|
|
159
|
+
* Optional: `transformCellCitations` falls back to
|
|
160
|
+
* `DEFAULT_MCPUI_STRINGS.citationUnresolved` (`'[ref. {id}]'`). The
|
|
161
|
+
* renderers populate it from `strings.citationUnresolved`, so a host with a
|
|
162
|
+
* `<MCPUIStringsProvider>` gets its own wording; a direct
|
|
163
|
+
* `renderCellValue(value, ctx)` call may pass it explicitly.
|
|
164
|
+
*
|
|
165
|
+
* @since v6.20.0 — the hardcoded placeholder used to be French.
|
|
166
|
+
*/
|
|
167
|
+
unresolvedLabel?: string;
|
|
168
|
+
/**
|
|
169
|
+
* Tooltip template of the default citation chip button — `{label}` is the
|
|
170
|
+
* file name and page. Falls back to `DEFAULT_MCPUI_STRINGS.citationViewSource`;
|
|
171
|
+
* the renderers populate it from `strings.citationViewSource`.
|
|
172
|
+
*
|
|
173
|
+
* @since v6.20.0
|
|
174
|
+
*/
|
|
175
|
+
viewSourceLabel?: string;
|
|
176
|
+
}
|
|
177
|
+
export declare function renderCellValue(value: any, citationCtx?: CitationCtx, mathRenderer?: MathRenderer): string;
|
|
178
|
+
/**
|
|
179
|
+
* Main UIResourceRenderer component
|
|
180
|
+
*/
|
|
181
|
+
export declare const UIResourceRenderer: Component<UIResourceRendererProps>;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Phase 0: Foundation with iframe sandbox and composite grid support
|
|
4
4
|
*/
|
|
5
5
|
import { Component } from 'solid-js';
|
|
6
|
-
import type { UIComponent, UILayout, RendererError } from
|
|
7
|
-
import { type DuplicateMountInfo } from
|
|
6
|
+
import type { UIComponent, UILayout, RendererError } from "../types.js";
|
|
7
|
+
import { type DuplicateMountInfo } from "../utils/duplicate-mount-registry.js";
|
|
8
8
|
/**
|
|
9
9
|
* How `<UIResourceRenderer>` reacts when `validateComponent()` rejects a
|
|
10
10
|
* component (v5.4.0).
|
|
@@ -20,7 +20,7 @@ import { type DuplicateMountInfo } from '../utils/duplicate-mount-registry';
|
|
|
20
20
|
* this prop — they always show the boundary's fallback UI.
|
|
21
21
|
*/
|
|
22
22
|
export type ValidationErrorMode = 'block' | 'inline-warn' | 'silent';
|
|
23
|
-
import { type MathRenderer } from
|
|
23
|
+
import { type MathRenderer } from "../context/MCPUIMathContext.js";
|
|
24
24
|
/**
|
|
25
25
|
* Props for UIResourceRenderer
|
|
26
26
|
*/
|
|
@@ -179,4 +179,3 @@ export declare function renderCellValue(value: any, citationCtx?: CitationCtx, m
|
|
|
179
179
|
* Main UIResourceRenderer component
|
|
180
180
|
*/
|
|
181
181
|
export declare const UIResourceRenderer: Component<UIResourceRendererProps>;
|
|
182
|
-
//# sourceMappingURL=UIResourceRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { UIResourceRenderer as default } from "./UIResourceRenderer.cjs";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { UIResourceRenderer as default } from
|
|
2
|
-
//# sourceMappingURL=UIResourceRenderer.default.d.ts.map
|
|
1
|
+
export { UIResourceRenderer as default } from "./UIResourceRenderer.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VerifiedText — renders LLM text with inline verification badges
|
|
3
|
+
* v3.1.0: Highlights verified vs hallucinated numbers
|
|
4
|
+
*
|
|
5
|
+
* @experimental
|
|
6
|
+
*
|
|
7
|
+
* Modes:
|
|
8
|
+
* - highlight: ✅/⚠️ badges next to numbers (default)
|
|
9
|
+
* - strip: replaces hallucinated numbers with the `verifiedStripLabel`
|
|
10
|
+
* chrome string ('[unverified]' by default)
|
|
11
|
+
* - annotate: tooltip on hover with closest source number
|
|
12
|
+
*/
|
|
13
|
+
import type { DataValidation, HallucinatedNumber } from "../types/chat-bus.cjs";
|
|
14
|
+
export interface VerifiedTextProps {
|
|
15
|
+
text: string;
|
|
16
|
+
validation: DataValidation;
|
|
17
|
+
/** Display mode (default: 'highlight') */
|
|
18
|
+
mode?: 'highlight' | 'strip' | 'annotate';
|
|
19
|
+
/** Callback when a hallucinated number is clicked */
|
|
20
|
+
onHallucinationClick?: (item: HallucinatedNumber) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare function VerifiedText(props: VerifiedTextProps): import("solid-js").JSX.Element;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* chrome string ('[unverified]' by default)
|
|
11
11
|
* - annotate: tooltip on hover with closest source number
|
|
12
12
|
*/
|
|
13
|
-
import type { DataValidation, HallucinatedNumber } from
|
|
13
|
+
import type { DataValidation, HallucinatedNumber } from "../types/chat-bus.js";
|
|
14
14
|
export interface VerifiedTextProps {
|
|
15
15
|
text: string;
|
|
16
16
|
validation: DataValidation;
|
|
@@ -20,4 +20,3 @@ export interface VerifiedTextProps {
|
|
|
20
20
|
onHallucinationClick?: (item: HallucinatedNumber) => void;
|
|
21
21
|
}
|
|
22
22
|
export declare function VerifiedText(props: VerifiedTextProps): import("solid-js").JSX.Element;
|
|
23
|
-
//# sourceMappingURL=VerifiedText.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VideoRenderer - Video embed component
|
|
3
|
+
* Sprint 5: Media Components
|
|
4
|
+
*
|
|
5
|
+
* Supports YouTube, Vimeo, and direct video files
|
|
6
|
+
*/
|
|
7
|
+
import { Component } from 'solid-js';
|
|
8
|
+
import type { UIComponent, VideoComponentParams } from "../types.cjs";
|
|
9
|
+
export interface VideoRendererProps {
|
|
10
|
+
/**
|
|
11
|
+
* UIComponent containing video params
|
|
12
|
+
*/
|
|
13
|
+
component?: UIComponent;
|
|
14
|
+
/**
|
|
15
|
+
* Direct video params (alternative to component)
|
|
16
|
+
*/
|
|
17
|
+
params?: VideoComponentParams;
|
|
18
|
+
/**
|
|
19
|
+
* Error callback
|
|
20
|
+
*/
|
|
21
|
+
onError?: (error: Error) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Forwarded to the underlying `<ExpandableWrapper>` (v6.3.1).
|
|
24
|
+
* @see ExpandableWrapperProps.toolbarVariant
|
|
25
|
+
*/
|
|
26
|
+
toolbarVariant?: 'hover' | 'always-visible';
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Video provider type
|
|
30
|
+
*/
|
|
31
|
+
type VideoProvider = 'youtube' | 'vimeo' | 'direct';
|
|
32
|
+
export declare const VideoRenderer: Component<VideoRendererProps>;
|
|
33
|
+
/**
|
|
34
|
+
* Check if a URL is from a supported video provider
|
|
35
|
+
*/
|
|
36
|
+
export declare function isSupportedVideoUrl(url: string): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Get video provider from URL
|
|
39
|
+
*/
|
|
40
|
+
export declare function getVideoProvider(url: string): VideoProvider;
|
|
41
|
+
export {};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Supports YouTube, Vimeo, and direct video files
|
|
6
6
|
*/
|
|
7
7
|
import { Component } from 'solid-js';
|
|
8
|
-
import type { UIComponent, VideoComponentParams } from
|
|
8
|
+
import type { UIComponent, VideoComponentParams } from "../types.js";
|
|
9
9
|
export interface VideoRendererProps {
|
|
10
10
|
/**
|
|
11
11
|
* UIComponent containing video params
|
|
@@ -39,4 +39,3 @@ export declare function isSupportedVideoUrl(url: string): boolean;
|
|
|
39
39
|
*/
|
|
40
40
|
export declare function getVideoProvider(url: string): VideoProvider;
|
|
41
41
|
export {};
|
|
42
|
-
//# sourceMappingURL=VideoRenderer.d.ts.map
|