@ai-matrx/rich-content 0.2.4 → 0.2.7
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 +25 -0
- package/dist/code-block/CodeBlock.d.ts +44 -0
- package/dist/code-block/CodeBlock.js +449 -0
- package/dist/code-block/CodeBlockHeader.d.ts +63 -0
- package/dist/code-block/CodeBlockHeader.js +472 -0
- package/dist/code-block/CodeEditorLoading.d.ts +3 -0
- package/dist/code-block/CodeEditorLoading.js +34 -0
- package/dist/code-block/LanguageDisplay.d.ts +28 -0
- package/dist/code-block/LanguageDisplay.js +279 -0
- package/dist/code-block/SmallCodeEditor.d.ts +30 -0
- package/dist/code-block/SmallCodeEditor.js +22 -0
- package/dist/code-block/StickyButtons.d.ts +35 -0
- package/dist/code-block/StickyButtons.js +88 -0
- package/dist/code-block/highlight/ShikiCodeView.d.ts +26 -0
- package/dist/code-block/highlight/ShikiCodeView.js +134 -0
- package/dist/code-block/highlight/shiki-highlighter.d.ts +14 -0
- package/dist/code-block/highlight/shiki-highlighter.js +126 -0
- package/dist/code-block/highlight/useHighlightedLines.d.ts +18 -0
- package/dist/code-block/highlight/useHighlightedLines.js +142 -0
- package/dist/code-block/sticky-inset.d.ts +6 -0
- package/dist/code-block/sticky-inset.js +10 -0
- package/dist/display/block-interaction.d.ts +33 -0
- package/dist/display/block-interaction.js +13 -0
- package/dist/display/blocks/ChatCollapsibleWrapper.d.ts +13 -0
- package/dist/display/blocks/ChatCollapsibleWrapper.js +56 -0
- package/dist/display/blocks/buildMediaSource.d.ts +25 -0
- package/dist/display/blocks/buildMediaSource.js +43 -0
- package/dist/display/blocks/canvas-adaptive.d.ts +118 -0
- package/dist/display/blocks/canvas-adaptive.js +127 -0
- package/dist/display/blocks/canvas-fit.d.ts +24 -0
- package/dist/display/blocks/canvas-fit.js +19 -0
- package/dist/display/blocks/chart/ChartBlock.d.ts +8 -0
- package/dist/display/blocks/chart/ChartBlock.js +125 -0
- package/dist/display/blocks/chart/ChartCanvas.d.ts +18 -0
- package/dist/display/blocks/chart/ChartCanvas.js +159 -0
- package/dist/display/blocks/chart/TableChart.d.ts +25 -0
- package/dist/display/blocks/chart/TableChart.js +97 -0
- package/dist/display/blocks/chart/chart-spec.d.ts +39 -0
- package/dist/display/blocks/chart/chart-spec.js +128 -0
- package/dist/display/blocks/chart/labels.d.ts +20 -0
- package/dist/display/blocks/chart/labels.js +7 -0
- package/dist/display/blocks/chart/table-chart.d.ts +37 -0
- package/dist/display/blocks/chart/table-chart.js +231 -0
- package/dist/display/blocks/common/BlockHeaderWrapper.d.ts +56 -0
- package/dist/display/blocks/common/BlockHeaderWrapper.js +310 -0
- package/dist/display/blocks/common/ContentBlockWrapper.d.ts +40 -0
- package/dist/display/blocks/common/ContentBlockWrapper.js +214 -0
- package/dist/display/blocks/common/SandboxedHtml.d.ts +27 -0
- package/dist/display/blocks/common/SandboxedHtml.js +26 -0
- package/dist/display/blocks/diagram/DiagramLoadingVisualization.d.ts +6 -0
- package/dist/display/blocks/diagram/DiagramLoadingVisualization.js +190 -0
- package/dist/display/blocks/diagram/InteractiveDiagramBlock.d.ts +51 -0
- package/dist/display/blocks/diagram/InteractiveDiagramBlock.js +2415 -0
- package/dist/display/blocks/diagram/diagram-printer.d.ts +16 -0
- package/dist/display/blocks/diagram/diagram-printer.js +294 -0
- package/dist/display/blocks/diagram/diagram-visual-defaults.d.ts +116 -0
- package/dist/display/blocks/diagram/diagram-visual-defaults.js +400 -0
- package/dist/display/blocks/diagram/layout-utils.d.ts +90 -0
- package/dist/display/blocks/diagram/layout-utils.js +347 -0
- package/dist/display/blocks/diagram/parseDiagramJSON.d.ts +105 -0
- package/dist/display/blocks/diagram/parseDiagramJSON.js +296 -0
- package/dist/display/blocks/diagram/presentation-direction.d.ts +29 -0
- package/dist/display/blocks/diagram/presentation-direction.js +19 -0
- package/dist/display/blocks/diagram/ui-utils.d.ts +1 -0
- package/dist/display/blocks/diagram/ui-utils.js +18 -0
- package/dist/display/blocks/diff/DiffBlock.d.ts +10 -0
- package/dist/display/blocks/diff/DiffBlock.js +119 -0
- package/dist/display/blocks/diff/DiffCanvas.d.ts +15 -0
- package/dist/display/blocks/diff/DiffCanvas.js +20 -0
- package/dist/display/blocks/generic/GenericStructuredBlock.d.ts +24 -0
- package/dist/display/blocks/generic/GenericStructuredBlock.js +53 -0
- package/dist/display/blocks/generic/StructuredValueTabs.d.ts +21 -0
- package/dist/display/blocks/generic/StructuredValueTabs.js +124 -0
- package/dist/display/blocks/generic/tile-actions-slot.d.ts +39 -0
- package/dist/display/blocks/generic/tile-actions-slot.js +33 -0
- package/dist/display/blocks/images/ImageBlock.d.ts +8 -0
- package/dist/display/blocks/images/ImageBlock.js +265 -0
- package/dist/display/blocks/json/JsonBlock.d.ts +34 -0
- package/dist/display/blocks/json/JsonBlock.js +562 -0
- package/dist/display/blocks/json/JsonTableView.d.ts +10 -0
- package/dist/display/blocks/json/JsonTableView.js +173 -0
- package/dist/display/blocks/json/json-compact-stringify.d.ts +25 -0
- package/dist/display/blocks/json/json-compact-stringify.js +52 -0
- package/dist/display/blocks/json/json-tabular-utils.d.ts +65 -0
- package/dist/display/blocks/json/json-tabular-utils.js +121 -0
- package/dist/display/blocks/links/LinkComponent.d.ts +6 -0
- package/dist/display/blocks/links/LinkComponent.js +373 -0
- package/dist/display/blocks/links/LinkComponentWithFetch.d.ts +1 -0
- package/dist/display/blocks/links/LinkComponentWithFetch.js +0 -0
- package/dist/display/blocks/markdown/MarkdownKindBlock.d.ts +48 -0
- package/dist/display/blocks/markdown/MarkdownKindBlock.js +52 -0
- package/dist/display/blocks/markdown-preview/MarkdownPreviewBlock.d.ts +17 -0
- package/dist/display/blocks/markdown-preview/MarkdownPreviewBlock.js +70 -0
- package/dist/display/blocks/mermaid/MermaidBlock.d.ts +19 -0
- package/dist/display/blocks/mermaid/MermaidBlock.js +386 -0
- package/dist/display/blocks/search-replace/SearchReplaceBlock.d.ts +50 -0
- package/dist/display/blocks/search-replace/SearchReplaceBlock.js +71 -0
- package/dist/display/blocks/svg/SvgBlock.d.ts +8 -0
- package/dist/display/blocks/svg/SvgBlock.js +126 -0
- package/dist/display/blocks/table/StreamingTableRenderer.d.ts +53 -0
- package/dist/display/blocks/table/StreamingTableRenderer.js +907 -0
- package/dist/display/blocks/table/TableRenderPathDiagnostic.d.ts +21 -0
- package/dist/display/blocks/table/TableRenderPathDiagnostic.js +79 -0
- package/dist/display/blocks/thinking-reasoning/ConsolidatedReasoningVisualization.d.ts +14 -0
- package/dist/display/blocks/thinking-reasoning/ConsolidatedReasoningVisualization.js +15 -0
- package/dist/display/blocks/thinking-reasoning/ReasoningVisualization.d.ts +13 -0
- package/dist/display/blocks/thinking-reasoning/ReasoningVisualization.js +19 -0
- package/dist/display/blocks/thinking-reasoning/ThinkingTrace.d.ts +30 -0
- package/dist/display/blocks/thinking-reasoning/ThinkingTrace.js +75 -0
- package/dist/display/blocks/thinking-reasoning/ThinkingTraceMarkdown.d.ts +13 -0
- package/dist/display/blocks/thinking-reasoning/ThinkingTraceMarkdown.js +48 -0
- package/dist/display/blocks/thinking-reasoning/ThinkingVisualization.d.ts +12 -0
- package/dist/display/blocks/thinking-reasoning/ThinkingVisualization.js +19 -0
- package/dist/display/blocks/toml/TomlBlock.d.ts +7 -0
- package/dist/display/blocks/toml/TomlBlock.js +167 -0
- package/dist/display/blocks/tree/TreeBlock.d.ts +7 -0
- package/dist/display/blocks/tree/TreeBlock.js +163 -0
- package/dist/display/blocks/xml/XmlBlock.d.ts +23 -0
- package/dist/display/blocks/xml/XmlBlock.js +197 -0
- package/dist/display/blocks/xml/readXmlTag.d.ts +1 -0
- package/dist/display/blocks/xml/readXmlTag.js +1 -0
- package/dist/display/blocks/xml/xml-tokenize.d.ts +13 -0
- package/dist/display/blocks/xml/xml-tokenize.js +169 -0
- package/dist/display/blocks/yaml/YamlBlock.d.ts +7 -0
- package/dist/display/blocks/yaml/YamlBlock.js +191 -0
- package/dist/display/chat-markdown/BasicMarkdownContent.d.ts +29 -0
- package/dist/display/chat-markdown/BasicMarkdownContent.js +122 -0
- package/dist/display/chat-markdown/BlockRenderingContext.d.ts +23 -0
- package/dist/display/chat-markdown/BlockRenderingContext.js +17 -0
- package/dist/display/chat-markdown/ConfigurableMarkdownContent.d.ts +172 -0
- package/dist/display/chat-markdown/ConfigurableMarkdownContent.js +649 -0
- package/dist/display/chat-markdown/InlineCodeSnippet.d.ts +19 -0
- package/dist/display/chat-markdown/InlineCodeSnippet.js +146 -0
- package/dist/display/chat-markdown/InlineCodeSnippetKindGate.d.ts +11 -0
- package/dist/display/chat-markdown/InlineCodeSnippetKindGate.js +9 -0
- package/dist/display/chat-markdown/KindTextGate.d.ts +31 -0
- package/dist/display/chat-markdown/KindTextGate.js +60 -0
- package/dist/display/chat-markdown/QuestionnaireLoadingVisualization.d.ts +6 -0
- package/dist/display/chat-markdown/QuestionnaireLoadingVisualization.js +92 -0
- package/dist/display/chat-markdown/block-registry/BlockComponentRegistry.d.ts +72 -0
- package/dist/display/chat-markdown/block-registry/BlockComponentRegistry.js +94 -0
- package/dist/display/chat-markdown/block-registry/BlockRenderer.d.ts +126 -0
- package/dist/display/chat-markdown/block-registry/BlockRenderer.js +473 -0
- package/dist/display/chat-markdown/block-registry/block-dispatch.d.ts +410 -0
- package/dist/display/chat-markdown/block-registry/block-dispatch.js +495 -0
- package/dist/display/chat-markdown/block-registry/json-parse-utils.d.ts +13 -0
- package/dist/display/chat-markdown/block-registry/json-parse-utils.js +236 -0
- package/dist/display/chat-markdown/constants.d.ts +14 -0
- package/dist/display/chat-markdown/constants.js +317 -0
- package/dist/display/chat-markdown/diff-blocks/DiffCollapsible.d.ts +31 -0
- package/dist/display/chat-markdown/diff-blocks/DiffCollapsible.js +62 -0
- package/dist/display/chat-markdown/diff-blocks/DiffLoadingIndicator.d.ts +12 -0
- package/dist/display/chat-markdown/diff-blocks/DiffLoadingIndicator.js +18 -0
- package/dist/display/chat-markdown/diff-blocks/StreamingDiffBlock.d.ts +22 -0
- package/dist/display/chat-markdown/diff-blocks/StreamingDiffBlock.js +130 -0
- package/dist/display/chat-markdown/diff-blocks/diff-style-registry.d.ts +21 -0
- package/dist/display/chat-markdown/diff-blocks/diff-style-registry.js +91 -0
- package/dist/display/chat-markdown/diff-blocks/renderers/SearchReplaceDiffRenderer.d.ts +26 -0
- package/dist/display/chat-markdown/diff-blocks/renderers/SearchReplaceDiffRenderer.js +186 -0
- package/dist/display/chat-markdown/diff-blocks/types.d.ts +56 -0
- package/dist/display/chat-markdown/diff-blocks/types.js +0 -0
- package/dist/display/chat-markdown/internal-handlers/BlockFallback.d.ts +20 -0
- package/dist/display/chat-markdown/internal-handlers/BlockFallback.js +83 -0
- package/dist/display/chat-markdown/internal-handlers/InlineStatusIndicator.d.ts +4 -0
- package/dist/display/chat-markdown/internal-handlers/InlineStatusIndicator.js +16 -0
- package/dist/display/chat-markdown/internal-handlers/MarkdownErrorBoundary.d.ts +17 -0
- package/dist/display/chat-markdown/internal-handlers/MarkdownErrorBoundary.js +40 -0
- package/dist/display/chat-markdown/internal-handlers/PlainTextFallback.d.ts +8 -0
- package/dist/display/chat-markdown/internal-handlers/PlainTextFallback.js +91 -0
- package/dist/display/chat-markdown/internal-handlers/SafeBlockRenderer.d.ts +20 -0
- package/dist/display/chat-markdown/internal-handlers/SafeBlockRenderer.js +72 -0
- package/dist/display/chat-markdown/kind-source-view.d.ts +14 -0
- package/dist/display/chat-markdown/kind-source-view.js +14 -0
- package/dist/display/chat-markdown/matrx-variables/MatrxVariableInline.d.ts +28 -0
- package/dist/display/chat-markdown/matrx-variables/MatrxVariableInline.js +65 -0
- package/dist/display/chat-markdown/progressive-mount.d.ts +18 -0
- package/dist/display/chat-markdown/progressive-mount.js +90 -0
- package/dist/display/chat-markdown/render-block-to-content-block.d.ts +31 -0
- package/dist/display/chat-markdown/render-block-to-content-block.js +32 -0
- package/dist/display/chat-markdown/settle-stream-blocks.d.ts +50 -0
- package/dist/display/chat-markdown/settle-stream-blocks.js +26 -0
- package/dist/display/chat-markdown/stable-blocks.d.ts +15 -0
- package/dist/display/chat-markdown/stable-blocks.js +54 -0
- package/dist/display/chat-markdown/types.d.ts +11 -0
- package/dist/display/chat-markdown/types.js +26 -0
- package/dist/display/specimen/SpecimenContext.d.ts +26 -0
- package/dist/display/specimen/SpecimenContext.js +64 -0
- package/dist/display/tables/MarkdownTable.d.ts +23 -0
- package/dist/display/tables/MarkdownTable.js +769 -0
- package/dist/display/tables/MarkdownTableScrollArea.d.ts +12 -0
- package/dist/display/tables/MarkdownTableScrollArea.js +92 -0
- package/dist/display/tables/SendToGoogleSheetButton.d.ts +19 -0
- package/dist/display/tables/SendToGoogleSheetButton.js +93 -0
- package/dist/display/tables/SendToWorkbookButton.d.ts +24 -0
- package/dist/display/tables/SendToWorkbookButton.js +93 -0
- package/dist/display/tables/TableSaveToMenu.d.ts +16 -0
- package/dist/display/tables/TableSaveToMenu.js +98 -0
- package/dist/display/tables/TableWithSeparatedControls.d.ts +22 -0
- package/dist/display/tables/TableWithSeparatedControls.js +574 -0
- package/dist/display/tables/ViewTableModal.d.ts +14 -0
- package/dist/display/tables/ViewTableModal.js +67 -0
- package/dist/display/tables/editing/ColumnActionsMenu.d.ts +16 -0
- package/dist/display/tables/editing/ColumnActionsMenu.js +80 -0
- package/dist/display/tables/editing/RowActionsMenu.d.ts +16 -0
- package/dist/display/tables/editing/RowActionsMenu.js +80 -0
- package/dist/display/tables/editing/TableEditToolbar.d.ts +15 -0
- package/dist/display/tables/editing/TableEditToolbar.js +63 -0
- package/dist/display/tables/editing/tableMutations.d.ts +50 -0
- package/dist/display/tables/editing/tableMutations.js +148 -0
- package/dist/display/tables/editing/useDoubleClickEdit.d.ts +43 -0
- package/dist/display/tables/editing/useDoubleClickEdit.js +51 -0
- package/dist/display/tables/editing/useTableUndo.d.ts +25 -0
- package/dist/display/tables/editing/useTableUndo.js +17 -0
- package/dist/display/tables/table-action-row.d.ts +8 -0
- package/dist/display/tables/table-action-row.js +31 -0
- package/dist/display/tables/table-viewer.d.ts +13 -0
- package/dist/display/tables/table-viewer.js +18 -0
- package/dist/host/ErrorActions.d.ts +1 -1
- package/dist/host/ErrorNotice.d.ts +10 -0
- package/dist/host/ErrorNotice.js +19 -0
- package/dist/host/app-bindings.d.ts +155 -0
- package/dist/host/app-bindings.js +160 -0
- package/dist/host/diagnostics.d.ts +2 -2
- package/dist/host/diagnostics.js +2 -1
- package/dist/host/tables.d.ts +1 -6
- package/dist/host/types.d.ts +14 -7
- package/dist/levels/RichContent.d.ts +3 -0
- package/dist/levels/RichContent.js +102 -0
- package/dist/levels/RichContentInline.d.ts +28 -0
- package/dist/levels/RichContentInline.js +61 -0
- package/dist/levels/RichContentPreview.d.ts +12 -0
- package/dist/levels/RichContentPreview.js +39 -0
- package/dist/levels/RichContentStandardImpl.d.ts +12 -0
- package/dist/levels/RichContentStandardImpl.js +27 -0
- package/dist/levels/RichContentStaticProse.d.ts +46 -0
- package/dist/levels/RichContentStaticProse.js +100 -0
- package/dist/levels/depth.d.ts +18 -0
- package/dist/levels/depth.js +32 -0
- package/dist/levels/prose/inline-level-elements.d.ts +19 -0
- package/dist/levels/prose/inline-level-elements.js +103 -0
- package/dist/levels/prose/prose-block-elements.d.ts +25 -0
- package/dist/levels/prose/prose-block-elements.js +313 -0
- package/dist/levels/prose/prose-inline-elements.d.ts +13 -0
- package/dist/levels/prose/prose-inline-elements.js +143 -0
- package/dist/levels/prose/prose-prepare.d.ts +50 -0
- package/dist/levels/prose/prose-prepare.js +246 -0
- package/dist/levels/prose/remote-image-policy.d.ts +34 -0
- package/dist/levels/prose/remote-image-policy.js +153 -0
- package/dist/levels/prose/variant-root.d.ts +9 -0
- package/dist/levels/prose/variant-root.js +34 -0
- package/dist/levels/rich-content-types.d.ts +93 -0
- package/dist/levels/rich-content-types.js +4 -0
- package/dist/levels/server/DelimiterViolationReport.d.ts +7 -0
- package/dist/levels/server/DelimiterViolationReport.js +24 -0
- package/dist/levels/server/RichContentServer.d.ts +27 -0
- package/dist/levels/server/RichContentServer.js +97 -0
- package/dist/levels/standard/NestedRichContent.d.ts +7 -0
- package/dist/levels/standard/NestedRichContent.js +70 -0
- package/dist/levels/standard/StandardBlocks.d.ts +13 -0
- package/dist/levels/standard/StandardBlocks.js +239 -0
- package/dist/levels/standard/StandardKindRegion.d.ts +14 -0
- package/dist/levels/standard/StandardKindRegion.js +69 -0
- package/dist/levels/standard/standard-kind-region.d.ts +19 -0
- package/dist/levels/standard/standard-kind-region.js +21 -0
- package/dist/levels/standard/static-standard.d.ts +23 -0
- package/dist/levels/standard/static-standard.js +187 -0
- package/dist/levels/standard/stream-holdback.d.ts +2 -0
- package/dist/levels/standard/stream-holdback.js +77 -0
- package/dist/mermaid/MermaidFullscreen.d.ts +17 -0
- package/dist/mermaid/MermaidFullscreen.js +71 -0
- package/dist/mermaid/MermaidRenderer.d.ts +20 -0
- package/dist/mermaid/MermaidRenderer.js +267 -0
- package/dist/mermaid/MermaidView.d.ts +27 -0
- package/dist/mermaid/MermaidView.js +68 -0
- package/dist/mermaid/MermaidViewport.d.ts +75 -0
- package/dist/mermaid/MermaidViewport.js +286 -0
- package/dist/mermaid/adapters/er.d.ts +10 -0
- package/dist/mermaid/adapters/er.js +205 -0
- package/dist/mermaid/adapters/flowchart.d.ts +17 -0
- package/dist/mermaid/adapters/flowchart.js +634 -0
- package/dist/mermaid/adapters/journey.d.ts +9 -0
- package/dist/mermaid/adapters/journey.js +207 -0
- package/dist/mermaid/adapters/mindmap.d.ts +12 -0
- package/dist/mermaid/adapters/mindmap.js +252 -0
- package/dist/mermaid/adapters/pie.d.ts +7 -0
- package/dist/mermaid/adapters/pie.js +172 -0
- package/dist/mermaid/adapters/quadrant.d.ts +8 -0
- package/dist/mermaid/adapters/quadrant.js +231 -0
- package/dist/mermaid/adapters/register.d.ts +7 -0
- package/dist/mermaid/adapters/register.js +19 -0
- package/dist/mermaid/adapters/sequence.d.ts +8 -0
- package/dist/mermaid/adapters/sequence.js +251 -0
- package/dist/mermaid/adapters/state.d.ts +12 -0
- package/dist/mermaid/adapters/state.js +245 -0
- package/dist/mermaid/adapters/timeline.d.ts +8 -0
- package/dist/mermaid/adapters/timeline.js +245 -0
- package/dist/mermaid/catalog.d.ts +33 -0
- package/dist/mermaid/catalog.js +202 -0
- package/dist/mermaid/diagram-type.d.ts +39 -0
- package/dist/mermaid/diagram-type.js +89 -0
- package/dist/mermaid/export.d.ts +21 -0
- package/dist/mermaid/export.js +112 -0
- package/dist/mermaid/extract-fence.d.ts +15 -0
- package/dist/mermaid/extract-fence.js +22 -0
- package/dist/mermaid/lazy-draw.d.ts +40 -0
- package/dist/mermaid/lazy-draw.js +168 -0
- package/dist/mermaid/model/adapter.d.ts +28 -0
- package/dist/mermaid/model/adapter.js +16 -0
- package/dist/mermaid/model/ops.d.ts +282 -0
- package/dist/mermaid/model/ops.js +9 -0
- package/dist/mermaid/model/round-trip.d.ts +22 -0
- package/dist/mermaid/model/round-trip.js +45 -0
- package/dist/mermaid/model/types.d.ts +271 -0
- package/dist/mermaid/model/types.js +0 -0
- package/dist/mermaid/print-render.d.ts +9 -0
- package/dist/mermaid/print-render.js +39 -0
- package/dist/mermaid/runtime.d.ts +25 -0
- package/dist/mermaid/runtime.js +183 -0
- package/dist/mermaid/sanitize.d.ts +46 -0
- package/dist/mermaid/sanitize.js +234 -0
- package/dist/mermaid/types.d.ts +43 -0
- package/dist/mermaid/types.js +21 -0
- package/dist/mermaid/view/ViewModePane.d.ts +24 -0
- package/dist/mermaid/view/ViewModePane.js +9 -0
- package/dist/utils/client-lazy.d.ts +1 -1
- package/dist/utils/client-lazy.js +4 -1
- package/dist/utils/lifted/DiffView.d.ts +10 -0
- package/dist/utils/lifted/DiffView.js +26 -0
- package/dist/utils/lifted/IconButton.d.ts +24 -0
- package/dist/utils/lifted/IconButton.js +43 -0
- package/dist/utils/lifted/MatrxMiniLoader.d.ts +1 -0
- package/dist/utils/lifted/MatrxMiniLoader.js +8 -0
- package/dist/utils/lifted/ShimmerText.d.ts +5 -0
- package/dist/utils/lifted/ShimmerText.js +21 -0
- package/dist/utils/lifted/SuspenseLoader.d.ts +16 -0
- package/dist/utils/lifted/SuspenseLoader.js +42 -0
- package/dist/utils/lifted/Tooltip.d.ts +20 -0
- package/dist/utils/lifted/Tooltip.js +52 -0
- package/dist/utils/lifted/artifactId.d.ts +34 -0
- package/dist/utils/lifted/artifactId.js +15 -0
- package/dist/utils/lifted/canvasContent.d.ts +63 -0
- package/dist/utils/lifted/canvasContent.js +98 -0
- package/dist/utils/lifted/captureReactError.d.ts +24 -0
- package/dist/utils/lifted/captureReactError.js +28 -0
- package/dist/utils/lifted/chunk-load-recovery.d.ts +25 -0
- package/dist/utils/lifted/chunk-load-recovery.js +36 -0
- package/dist/utils/lifted/code-editor-agent-types.d.ts +6 -0
- package/dist/utils/lifted/code-editor-agent-types.js +0 -0
- package/dist/utils/lifted/code-editor-agents.d.ts +39 -0
- package/dist/utils/lifted/code-editor-agents.js +52 -0
- package/dist/utils/lifted/code-language-extension.d.ts +1 -0
- package/dist/utils/lifted/code-language-extension.js +60 -0
- package/dist/utils/lifted/custom-icons.d.ts +16 -0
- package/dist/utils/lifted/custom-icons.js +47 -0
- package/dist/utils/lifted/durability.d.ts +16 -0
- package/dist/utils/lifted/durability.js +45 -0
- package/dist/utils/lifted/errors.d.ts +30 -0
- package/dist/utils/lifted/errors.js +29 -0
- package/dist/utils/lifted/html-document.d.ts +1 -0
- package/dist/utils/lifted/html-document.js +12 -0
- package/dist/utils/lifted/languageOptions.d.ts +9 -0
- package/dist/utils/lifted/languageOptions.js +52 -0
- package/dist/utils/lifted/languages.d.ts +34 -0
- package/dist/utils/lifted/languages.js +175 -0
- package/dist/utils/lifted/loading-spinner.d.ts +18 -0
- package/dist/utils/lifted/loading-spinner.js +200 -0
- package/dist/utils/lifted/media-refs.d.ts +13 -0
- package/dist/utils/lifted/media-refs.js +27 -0
- package/dist/utils/lifted/scroll-root.d.ts +1 -0
- package/dist/utils/lifted/scroll-root.js +25 -0
- package/dist/utils/lifted/syntax-themes.d.ts +32 -0
- package/dist/utils/lifted/syntax-themes.js +100 -0
- package/dist/utils/lifted/url-utm.d.ts +24 -0
- package/dist/utils/lifted/url-utm.js +66 -0
- package/dist/utils/lifted/use-is-mounted.d.ts +24 -0
- package/dist/utils/lifted/use-is-mounted.js +21 -0
- package/dist/utils/lifted/useToastManager.d.ts +1 -0
- package/dist/utils/lifted/useToastManager.js +7 -0
- package/dist/utils/report-kind-at-raw-renderer.d.ts +19 -0
- package/dist/utils/report-kind-at-raw-renderer.js +32 -0
- package/package.json +48 -10
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* block-dispatch — the declarative render-block dispatch registry.
|
|
3
|
+
*
|
|
4
|
+
* Replaces BlockRenderer's historical ~40-case switch with one data-driven
|
|
5
|
+
* table keyed by block type and organized BY CROSSWALK CLASSIFICATION
|
|
6
|
+
* (scripts/shape/content-vocab-crosswalk.json — the classification authority;
|
|
7
|
+
* regenerate-check via `pnpm check:shapes:crosswalk`):
|
|
8
|
+
*
|
|
9
|
+
* - protocol → control tags, lifecycle/ack events, editor plumbing
|
|
10
|
+
* - scalar_generic → text / code / tables / media primitives
|
|
11
|
+
* - shape → structured content (registered kinds + shape candidates)
|
|
12
|
+
* - intentionally_opaque → the explicit unknown-data renderer
|
|
13
|
+
*
|
|
14
|
+
* EXHAUSTIVENESS is enforced twice:
|
|
15
|
+
* 1. Compile time — each classification table `satisfies
|
|
16
|
+
* Record<XBlockType, BlockRenderFn>`, and the classification unions are
|
|
17
|
+
* asserted (via `AssertNever`) to exactly cover the GENERATED vocabulary
|
|
18
|
+
* (TypedRenderBlock ∪ ServerOnlyBlockType ∪ ClientOnlyBlockType) plus the
|
|
19
|
+
* documented FE-synthesized extras. A new generated block type fails the
|
|
20
|
+
* build here until it is classified and registered.
|
|
21
|
+
* 2. Runtime — `reportUnregisteredBlockType` SCREAMS (console.error +
|
|
22
|
+
* structured captureError) for any block type with no registration. There
|
|
23
|
+
* is no silent default hiding an unregistered renderable.
|
|
24
|
+
*
|
|
25
|
+
* ROUTING ORDER (owned by BlockRenderer, the component):
|
|
26
|
+
* 1. Kind route (shape classification, first-class): `applyIrKindRoute` —
|
|
27
|
+
* a resolved `metadata.__ir` envelope routes through the kind registry
|
|
28
|
+
* (`resolveComponent(kind, "web", "output")` / legacy bridge) BEFORE any
|
|
29
|
+
* type-keyed dispatch. See features/content-ir/react/kind-route.ts.
|
|
30
|
+
* 2. Pending-structured skeleton (unresolved streaming JSON region).
|
|
31
|
+
* 3. Unified artifact renderer (resolveArtifactDef + hasArtifactRenderer) —
|
|
32
|
+
* the single shared path for materializable standalone blocks.
|
|
33
|
+
* 4. This table.
|
|
34
|
+
*
|
|
35
|
+
* Every entry preserves its legacy switch-case body byte-for-byte (props,
|
|
36
|
+
* guards, comments). This file is ROUTING ONLY — no behavior changes.
|
|
37
|
+
*
|
|
38
|
+
* CODE-SPLITTING: all heavy components stay lazy exactly as before — the
|
|
39
|
+
* table references the same lazily-wrapped `BlockComponents` members the
|
|
40
|
+
* switch did (see BlockComponentRegistry.tsx); nothing new is imported
|
|
41
|
+
* statically that wasn't already static in BlockRenderer.
|
|
42
|
+
*/
|
|
43
|
+
import type { AnswerEditRemarkMeta } from "../../block-interaction.js";
|
|
44
|
+
import React from "react";
|
|
45
|
+
import type { TypedRenderBlock, ServerOnlyBlockType, ServerProtocolRenderBlock, ServerScalarGenericRenderBlock, ServerShapeRenderBlock, ServerOpaqueRenderBlock } from "@ai-matrx/agents/generated/stream-events";
|
|
46
|
+
import type { ClientOnlyBlockType } from "../../markdown-classification/processors/utils/client-blocks.js";
|
|
47
|
+
import { DB_KIND_COMPONENT_KEY, GENERIC_STRUCTURED_COMPONENT_KEY } from "../../../kinds/react/kind-route.js";
|
|
48
|
+
/**
|
|
49
|
+
* Flat render block interface used by BlockRenderer + this dispatch table.
|
|
50
|
+
*
|
|
51
|
+
* This is intentionally NOT a discriminated union. Using a discriminated union
|
|
52
|
+
* (like TypedRenderBlock) causes TypeScript to narrow `block` to `never` for
|
|
53
|
+
* any registration whose type string isn't in the union — making shared entry
|
|
54
|
+
* functions unusable.
|
|
55
|
+
*
|
|
56
|
+
* All fields are the union of what any block registration can access. Specific
|
|
57
|
+
* typed data for server-processed blocks arrives via `serverData` (the Python
|
|
58
|
+
* `data` field).
|
|
59
|
+
*
|
|
60
|
+
* The `type` string covers ALL blocks: Python-typed (TypedRenderBlock["type"]),
|
|
61
|
+
* client-splitter types (ClientOnlyBlockType), FE-synthesized data-event
|
|
62
|
+
* wrappers (ServerOnlyBlockType), and the open `string` fallback for anything
|
|
63
|
+
* Python adds before TypeScript types catch up.
|
|
64
|
+
*/
|
|
65
|
+
export interface RenderBlock {
|
|
66
|
+
type: TypedRenderBlock["type"] | ClientOnlyBlockType | ServerOnlyBlockType | string;
|
|
67
|
+
content: string;
|
|
68
|
+
/** Python's `data` field — typed by the server, accessed via serverData in the renderer. */
|
|
69
|
+
serverData?: Record<string, unknown>;
|
|
70
|
+
/** For code blocks: the language identifier (e.g. "typescript", "json"). */
|
|
71
|
+
language?: string;
|
|
72
|
+
/** For image/video blocks parsed from markdown: the media URL. */
|
|
73
|
+
src?: string;
|
|
74
|
+
/** For image/video blocks parsed from markdown: the alt text. */
|
|
75
|
+
alt?: string;
|
|
76
|
+
/** Block-specific metadata from the splitter or server. */
|
|
77
|
+
metadata?: Record<string, unknown>;
|
|
78
|
+
/** True when this block was emitted mid-stream (status: "streaming") — content is incomplete. */
|
|
79
|
+
isStreamingBlock?: boolean;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Everything a registration may read. Assembled once per block by
|
|
83
|
+
* BlockRenderer (which owns the hooks — registrations are pure render
|
|
84
|
+
* functions and MUST NOT call hooks).
|
|
85
|
+
*/
|
|
86
|
+
export interface BlockDispatchContext {
|
|
87
|
+
block: RenderBlock;
|
|
88
|
+
index: number;
|
|
89
|
+
isStreamActive?: boolean;
|
|
90
|
+
conversationId?: string;
|
|
91
|
+
/** TRANSCRIPT KEY — always present; UI keys, anchors, canvas dedupe, local state. Never a DB key. */
|
|
92
|
+
messageId?: string;
|
|
93
|
+
/** DATABASE identity — undefined until the answer has a durable row. The only id for DB reads/writes. */
|
|
94
|
+
durableMessageId?: string;
|
|
95
|
+
taskId?: string;
|
|
96
|
+
requestId?: string;
|
|
97
|
+
isLastReasoningBlock?: boolean;
|
|
98
|
+
/** Per-conversation display flags (instanceUIState) — resolved by the component. */
|
|
99
|
+
hideReasoning: boolean;
|
|
100
|
+
hideToolResults: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* May this reader see the machinery (`useMachineFramesVisible`)? A model's
|
|
103
|
+
* thinking narrates its own tool calls ("retry add_rules using the correct
|
|
104
|
+
* section keys", walk 24), so it is a machine frame like a tool card.
|
|
105
|
+
* Undefined = a builder surface, unchanged.
|
|
106
|
+
*/
|
|
107
|
+
machineFramesVisible?: boolean;
|
|
108
|
+
/** Generic handler: replaces `original` substring with `replacement` in the full content string. */
|
|
109
|
+
replaceBlockContent: (original: string, replacement: string, remark?: AnswerEditRemarkMeta) => void;
|
|
110
|
+
/** The shared BasicMarkdownContent renderer, pre-wired with edit/diagnostic props. */
|
|
111
|
+
renderBasicMarkdown: (content: string) => React.ReactElement;
|
|
112
|
+
/** Bound agent's declared output schema; absent/loading deliberately fails closed. */
|
|
113
|
+
outputSchema?: unknown | null;
|
|
114
|
+
}
|
|
115
|
+
export type BlockRenderFn = (ctx: BlockDispatchContext) => React.ReactElement | null;
|
|
116
|
+
/** Language for ``` fences with no info string (plain text / notes / prose). */
|
|
117
|
+
export declare const DEFAULT_UNLABELED_FENCE_LANGUAGE = "markdown";
|
|
118
|
+
/**
|
|
119
|
+
* Best-effort MIME type for an audio URL parsed from a markdown link, derived
|
|
120
|
+
* from its file extension (query string ignored). Lets the audio player emit a
|
|
121
|
+
* correct `<source type>`; returns undefined for unknown extensions, which the
|
|
122
|
+
* player handles gracefully.
|
|
123
|
+
*/
|
|
124
|
+
export declare function audioMimeFromUrl(url: string): string | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* Returns true when a block should show its loading skeleton instead of
|
|
127
|
+
* attempting to parse incomplete content.
|
|
128
|
+
*
|
|
129
|
+
* A block is considered "still loading" when either:
|
|
130
|
+
* - It was emitted mid-stream (status === "streaming") — content is definitely
|
|
131
|
+
* incomplete because the accumulator hasn't seen the closing fence/tag yet.
|
|
132
|
+
* - The splitter/server explicitly marked it isComplete: false AND the
|
|
133
|
+
* brace count shows the JSON is still open.
|
|
134
|
+
*/
|
|
135
|
+
export declare function isBlockLoading(block: {
|
|
136
|
+
isStreamingBlock?: boolean;
|
|
137
|
+
metadata?: Record<string, unknown>;
|
|
138
|
+
content: string;
|
|
139
|
+
}): boolean;
|
|
140
|
+
/**
|
|
141
|
+
* FE-synthesized block types with NO generated-union membership:
|
|
142
|
+
* - `media_block` — synthesized by process-stream.ts from the `media_block`
|
|
143
|
+
* data event (document/youtube kinds). The crosswalk declares it through
|
|
144
|
+
* `frontend:synthesized_render_block` and classifies it scalar_generic,
|
|
145
|
+
* matching its audio_output/image_output/video_output siblings.
|
|
146
|
+
* - `generic_structured` — produced ONLY by `applyIrKindRoute`'s R6 generic
|
|
147
|
+
* fallback (a KNOWN shape nothing render-trusted claims); never emitted
|
|
148
|
+
* upstream, so it has no vocabulary row. Shape-classified by construction.
|
|
149
|
+
* - `flow_step_result` / `collection_result` / `file_operation_result` /
|
|
150
|
+
* `value_result` — the four RUNTIME RESULT family renderers (GAP 6,
|
|
151
|
+
* 2026-08-23). 61 workflow/tool kinds that reached the reader only through
|
|
152
|
+
* the `generic_structured` floor now resolve to one of these by a
|
|
153
|
+
* `kind_component` row per kind, on exactly the `web_analysis_item` model:
|
|
154
|
+
* one shared reader question per family, the platform's value renderer
|
|
155
|
+
* underneath. Reached ONLY via applyIrKindRoute's resolver-only path.
|
|
156
|
+
* - `google_workspace_result` / `google_marketing_result` — the two GOOGLE
|
|
157
|
+
* tool-result renderers. One union kind per tool (fifteen Workspace actions,
|
|
158
|
+
* six marketing reads), so one component each, reached through that kind's
|
|
159
|
+
* `kind_component` row on the resolver-only path. Never emitted upstream.
|
|
160
|
+
* - `platform_record` — the ONE renderer for the `platform_record` kind, the
|
|
161
|
+
* shape `data.read_record` ("Read a Record", matrx-graph) answers with: one
|
|
162
|
+
* platform row of ANY registered entity type, read as the run's operator.
|
|
163
|
+
* One Record shape for every type by ruling, so one component: the row's
|
|
164
|
+
* identity and its door lead, `hidden_fields` are named, and the columns go
|
|
165
|
+
* to the platform's value viewer. Reached ONLY via applyIrKindRoute's
|
|
166
|
+
* resolver-only path, from that kind's `kind_component` row; never emitted
|
|
167
|
+
* upstream, so it has no vocabulary row. Shape-classified by construction.
|
|
168
|
+
* - `seo_ruling_*` — the fourteen keyword RULING SESSION kinds (seven
|
|
169
|
+
* collections + their seven item kinds): what the SEO keyword Ruling Session
|
|
170
|
+
* agents are told, built by `features/marketing/seo/value-system/workbench/
|
|
171
|
+
* session/trial.ts`. One compact component per kind (blocks/seo-ruling-kinds/),
|
|
172
|
+
* each collection delegating its rows to the item kind's component. Reached
|
|
173
|
+
* ONLY via applyIrKindRoute's resolver-only path, from each kind's
|
|
174
|
+
* `kind_component` row; never emitted upstream. Shape-classified by construction.
|
|
175
|
+
* - `web_analysis_item` — the ONE renderer for the `web_analysis_item`
|
|
176
|
+
* kind family (the 83 registered `web_*_v1` site-audit checks, which share
|
|
177
|
+
* one verified shape). Produced ONLY by `applyIrKindRoute`'s resolver-only
|
|
178
|
+
* path, from a `content_ir.kind_component` row per kind; never emitted
|
|
179
|
+
* upstream, so it has no vocabulary row. Shape-classified by construction.
|
|
180
|
+
* - `markdown_stream` — the registered renderer for the `markdown` kind
|
|
181
|
+
* (`{ text }`), which hands the text to MarkdownStream: the two-path render
|
|
182
|
+
* law ("declared kind component, or streaming markdown") collapsed into one
|
|
183
|
+
* by making the second path a kind. Produced ONLY by `applyIrKindRoute`'s
|
|
184
|
+
* resolver-only path, from that kind's `content_ir.kind_component` row;
|
|
185
|
+
* never emitted upstream, so it has no vocabulary row. Shape-classified by
|
|
186
|
+
* construction.
|
|
187
|
+
* - `db_kind_component` — produced ONLY by `applyIrKindRoute`'s db-override
|
|
188
|
+
* flip (an ACTIVE `content_ir.kind_component` row with `source='db'` won
|
|
189
|
+
* the resolution); never emitted upstream. Shape-classified by
|
|
190
|
+
* construction.
|
|
191
|
+
* - `video_prompt_options` — produced ONLY by `applyIrKindRoute`'s
|
|
192
|
+
* compiled-bridge flip for the registered `video_prompt_options` kind
|
|
193
|
+
* (`__kind` JSON arrival only — no tag/fence surface); never emitted
|
|
194
|
+
* upstream. Shape-classified by construction.
|
|
195
|
+
* - `keyword_research` / `keyword_classification_batch` — produced ONLY by
|
|
196
|
+
* `applyIrKindRoute`'s compiled-bridge flips for the registered
|
|
197
|
+
* `keyword_relationship_research` / `keyword_classification_batch_v1`
|
|
198
|
+
* kinds (`__kind` JSON arrival only — no tag/fence surface); never
|
|
199
|
+
* emitted upstream. Shape-classified by construction. STREAMING bridges:
|
|
200
|
+
* serverData exists (and grows) mid-stream, so the components render
|
|
201
|
+
* item-by-item live.
|
|
202
|
+
* - `page_brief` — produced ONLY by `applyIrKindRoute`'s compiled-bridge flip
|
|
203
|
+
* for the registered `page_brief` kind (`__kind` JSON arrival only — no
|
|
204
|
+
* tag/fence surface); never emitted upstream. Shape-classified by
|
|
205
|
+
* construction. STREAMING bridge, same contract as the keyword pair.
|
|
206
|
+
* - `media_chapters` — produced ONLY by `applyIrKindRoute`'s compiled-bridge
|
|
207
|
+
* flip for the registered `media_chapters` kind (`__kind` JSON arrival
|
|
208
|
+
* only — no tag/fence surface); never emitted upstream. STREAMING bridge:
|
|
209
|
+
* `chapters` is an array of a child kind, so rows appear one at a time.
|
|
210
|
+
* - `generated_image_set` / `generated_video_set` / `generated_audio` /
|
|
211
|
+
* `podcast_episode` — the media workflow-I/O deliverables, produced ONLY by
|
|
212
|
+
* `applyIrKindRoute`'s compiled-bridge flips for those registered kinds
|
|
213
|
+
* (`__kind` JSON arrival only — no tag/fence surface); never emitted
|
|
214
|
+
* upstream. STREAMING bridges: the set kinds carry a child-kind array, so
|
|
215
|
+
* each image/clip appears as its object closes. Media renders through
|
|
216
|
+
* `<InlineMediaRef>` inside the components (never a raw src) — see the
|
|
217
|
+
* media-durability law.
|
|
218
|
+
* - `memory_aid` / `memory_hint` — produced ONLY by `applyIrKindRoute`'s
|
|
219
|
+
* compiled-bridge flips for those registered kinds (`__kind` JSON arrival
|
|
220
|
+
* only — no tag/fence surface); never emitted upstream. STREAMING bridges:
|
|
221
|
+
* `mnemonics` / `analogies` / `loci` are arrays of child kinds, so aids
|
|
222
|
+
* appear one at a time; the hint shows a writing row until `aid` parses.
|
|
223
|
+
* - `masterwork_checkup_finding` — produced ONLY by `applyIrKindRoute`'s
|
|
224
|
+
* compiled-bridge flip for the registered `masterwork_checkup_finding`
|
|
225
|
+
* kind (`__kind` JSON arrival only — no tag/fence surface); never emitted
|
|
226
|
+
* upstream. Shape-classified by construction. COMPLETE bridge: aidream
|
|
227
|
+
* gates a whole finding before it reaches the wire, so findings stream,
|
|
228
|
+
* fields within one do not. Carries the Approve/Improve/Reject/Edit verbs
|
|
229
|
+
* through the `checkup_decision` surface write target when the page it
|
|
230
|
+
* landed on offers it.
|
|
231
|
+
* - `refusal` — the honest "not yet": the desk declined to produce until its
|
|
232
|
+
* frame holds, and named every missing fact with how to get it. Produced
|
|
233
|
+
* ONLY by `applyIrKindRoute`'s compiled-bridge flip; a COMPLETE bridge (a
|
|
234
|
+
* half-written refusal is not a position). It is a RESULT — never routed to
|
|
235
|
+
* an error surface, a toast, or nothing.
|
|
236
|
+
* - `case_disclosure` / `unfolding_ruling` — the UNFOLDING-CASE kinds,
|
|
237
|
+
* produced ONLY by `applyIrKindRoute`'s compiled-bridge flips (`__kind`
|
|
238
|
+
* JSON arrival only — no tag/fence surface); never emitted upstream.
|
|
239
|
+
* COMPLETE bridges: the case oracle emits a whole disclosure (its ledger is
|
|
240
|
+
* cumulative, so the latest one IS the whole path) and the desk emits a
|
|
241
|
+
* whole ruling — there is no half-written one on the wire.
|
|
242
|
+
* - `agent_result` — produced ONLY by `applyIrKindRoute`'s compiled-bridge
|
|
243
|
+
* flip for the registered `agent_result` kind (`__kind` JSON arrival only —
|
|
244
|
+
* no tag/fence surface); never emitted upstream. COMPLETE bridge: an
|
|
245
|
+
* agent-run envelope is the settled record of a finished run, so there is
|
|
246
|
+
* no half-written one. The bridge hands the component what the agent
|
|
247
|
+
* PRODUCED plus the run's numbers — never `messages`, which is why the
|
|
248
|
+
* envelope's verbatim prompt cannot reach a reader through this path.
|
|
249
|
+
* - `node_outcome` / `run_result` — the RUNTIME WRAPPER kinds, produced ONLY
|
|
250
|
+
* by `applyIrKindRoute`'s compiled-bridge flips (`__kind` JSON arrival only
|
|
251
|
+
* — no tag/fence surface); never emitted upstream. COMPLETE bridges: a
|
|
252
|
+
* wrapper describes SETTLED work (a node that finished, a run that
|
|
253
|
+
* terminated), so there is no half-written one. Their components render
|
|
254
|
+
* PROVENANCE ONLY and hand the nested `output` back to this same registry —
|
|
255
|
+
* see common-docs RUNTIME_WRAPPER_WIRE.md §5.
|
|
256
|
+
* - `episode_title_options` — produced ONLY by `applyIrKindRoute`'s
|
|
257
|
+
* compiled-bridge flip for the registered `episode_title_options` kind
|
|
258
|
+
* (`__kind` JSON arrival only — no tag/fence surface); never emitted
|
|
259
|
+
* upstream. Shape-classified by construction. STREAMING bridge; the cards
|
|
260
|
+
* apply the picked title through the `episode_title` surface write target
|
|
261
|
+
* when the page they landed on offers it.
|
|
262
|
+
* - `seo_package` — produced ONLY by `applyIrKindRoute`'s compiled-bridge flip
|
|
263
|
+
* for the registered `seo_package` kind (`__kind` JSON arrival only — no
|
|
264
|
+
* tag/fence surface); never emitted upstream. STREAMING bridge: the title
|
|
265
|
+
* lands with its character budget already measured, and `faq` is an array
|
|
266
|
+
* of a child kind, so questions appear one at a time.
|
|
267
|
+
* - `plan_page_research` / `plan_page_outline` / `plan_page_draft` /
|
|
268
|
+
* `plan_page_review` / `cms_page_build` — the Website Factory's per-page
|
|
269
|
+
* pipeline steps, produced ONLY by `applyIrKindRoute`'s compiled-bridge
|
|
270
|
+
* flips for those registered kinds (`__kind` JSON arrival only — no
|
|
271
|
+
* tag/fence surface); never emitted upstream. STREAMING bridges: each
|
|
272
|
+
* carries at least one child-kind array (sections / issues / sources /
|
|
273
|
+
* planned links), so rows appear one at a time.
|
|
274
|
+
* - `ingested_sources` / `study_notes` — the Study Pack run surface's two
|
|
275
|
+
* opening readouts, produced ONLY by `applyIrKindRoute`'s compiled-bridge
|
|
276
|
+
* flips for those registered kinds (`__kind` JSON arrival only — no
|
|
277
|
+
* tag/fence surface); never emitted upstream. STREAMING bridges: chunks and
|
|
278
|
+
* sections are child-kind arrays, so sources and sections appear one at a
|
|
279
|
+
* time.
|
|
280
|
+
* - `lesson_scripts` / `study_pack` — study_pack_v2: the spoken lessons and
|
|
281
|
+
* the composed pack, produced ONLY by `applyIrKindRoute`'s compiled-bridge
|
|
282
|
+
* flips for `lesson_script_set` / `study_pack_set` (`__kind` JSON arrival
|
|
283
|
+
* only — no tag/fence surface); never emitted upstream. STREAMING bridges:
|
|
284
|
+
* lesson sections appear one at a time, and the pack renders whichever
|
|
285
|
+
* member artifacts have arrived (StudyPackBlock DELEGATES each member back
|
|
286
|
+
* to its own kind's component — never a second flashcards/quiz/notes view).
|
|
287
|
+
* - `web_search_results` + its item kinds (`web_result`, `news_result`,
|
|
288
|
+
* `video_result`, `faq_item`, `discussion_result`, `local_place`,
|
|
289
|
+
* `entity_card`, `ai_answer`) + the primitives (`rating`, `opening_hours`,
|
|
290
|
+
* `postal_address`, `geo_coordinates`) — the merged provider-agnostic
|
|
291
|
+
* search kind family (Search Kinds Pilot), produced ONLY by
|
|
292
|
+
* `applyIrKindRoute`'s compiled-bridge flips (`__kind` JSON arrival only —
|
|
293
|
+
* no tag/fence surface); never emitted upstream. STREAMING bridges: the
|
|
294
|
+
* collection carries child-kind arrays, so results appear as their
|
|
295
|
+
* objects close; the collection component delegates every nested instance
|
|
296
|
+
* to its kind's canonical component (db overrides included).
|
|
297
|
+
* - `seo_rank_serp_landscape` + `serp_placement` + `seo_rank_reading` +
|
|
298
|
+
* `seo_rank_target` + `seo_rank_portfolio` + `seo_rank_target_removal` +
|
|
299
|
+
* the primitive `provider_run_receipt` — the rank / SERP-landscape family
|
|
300
|
+
* (Rank Kinds Run), produced ONLY by `applyIrKindRoute`'s compiled-bridge
|
|
301
|
+
* flips (`__kind` JSON arrival only — no tag/fence surface). A CONVERGENCE
|
|
302
|
+
* family: `serp_placement.result` is a union over the SHIPPED search item
|
|
303
|
+
* kinds above, and its component delegates straight through the search
|
|
304
|
+
* family's seam rather than re-drawing any of them.
|
|
305
|
+
* - `source_ref` + `retrieved_chunk` + `rag_search_result` +
|
|
306
|
+
* `rag_cross_doc_search_result` + `rag_synthesize_result` — the RAG
|
|
307
|
+
* retrieval + citation family (RAG Kinds Run), produced ONLY by
|
|
308
|
+
* `applyIrKindRoute`'s compiled-bridge flips (`__kind` JSON arrival only —
|
|
309
|
+
* no tag/fence surface). `source_ref` is a SYSTEM-WIDE primitive, not a RAG
|
|
310
|
+
* kind: it is the platform's cited-source shape and renders in two postures
|
|
311
|
+
* from ONE component (a standalone card, and the shared `CitationChip`
|
|
312
|
+
* inline). `retrieved_chunk` adapts to `RagHitView` and renders the
|
|
313
|
+
* canonical `RagHitCard` rather than drawing a fourth hit card.
|
|
314
|
+
* - `data_table` — the tabular PRIMITIVE (Table Kinds Run), produced ONLY by
|
|
315
|
+
* `applyIrKindRoute`'s compiled-bridge flips (`__kind` JSON arrival only —
|
|
316
|
+
* no tag/fence surface). A SQL result, a user data-table lookup, a parsed
|
|
317
|
+
* CSV and a table lifted out of a PDF are ONE rows-and-columns shape that
|
|
318
|
+
* was wearing five names; everything returning rows nests this rather than
|
|
319
|
+
* minting its own. Its component makes the two facts those five producers
|
|
320
|
+
* hid impossible to miss: an UNDECLARED column type (never a synonym for
|
|
321
|
+
* "string") and a SILENT truncation.
|
|
322
|
+
*/
|
|
323
|
+
export type FeSynthesizedBlockType = "directive_receipt" | "decision_questions" | "speech_script" | "input_remarks" | "media_block" | "video_prompt_options" | "map_topic_proposal" | "pr_play_menu" | "news_monitor_kind" | "decision_answers" | "list_change_proposal" | "keyword_research" | "keyword_classification_batch" | "keyword_serp_intent_analysis" | "seo_keyword_research_result" | "page_brief" | "media_chapters" | "generated_image_set" | "generated_video_set" | "generated_audio" | "podcast_episode" | "media_asset" | "memory_aid" | "memory_hint" | "episode_title_options" | "masterwork_checkup_finding" | "masterwork_result" | "serial_observation_timeline" | "case_disclosure" | "unfolding_ruling" | "refusal" | "agent_result" | "node_outcome" | "run_result" | "seo_package" | "plan_page_research" | "plan_page_outline" | "plan_page_draft" | "plan_page_review" | "cms_page_build" | "cms_html_page_result" | "ingested_sources" | "study_notes" | "lesson_scripts" | "study_pack" | "scraped_page" | "scraper_batch_result" | "scraper_crawl_result" | "page_link" | "link_buckets" | "page_image" | "page_video" | "page_audio" | "page_heading" | "page_section" | "page_list" | "page_block" | "code_block" | "redirect_hop" | "content_fingerprint" | "page_metadata" | "page_removal" | "page_cleaning_report" | "web_search_results" | "web_result" | "news_result" | "video_result" | "faq_item" | "discussion_result" | "local_place" | "entity_card" | "ai_answer" | "rating" | "opening_hours" | "postal_address" | "geo_coordinates" | "seo_rank_serp_landscape" | "serp_placement" | "seo_rank_reading" | "seo_rank_target" | "seo_rank_portfolio" | "seo_rank_target_removal" | "provider_run_receipt" | "intake_photo_grouping" | "item_vision_extraction" | "lot_detection" | "product_research" | "value_assessment" | "asset_grading" | "media_list_ranking_result" | "media_candidate_verdict" | "enrichment_verification" | "pricing_proposal" | "listing_draft" | "review_verdict" | "publish_preflight" | "lulu_print_cost_calculation" | "lulu_shipping_options" | "lulu_cover_dimensions" | "lulu_print_job" | "lulu_print_product_matches" | "data_table" | "source_ref" | "retrieved_chunk" | "rag_search_result" | "rag_cross_doc_search_result" | "rag_synthesize_result" | "web_analysis_item" | "flow_step_result" | "collection_result" | "file_operation_result" | "value_result" | "google_workspace_result" | "google_marketing_result" | "platform_record" | "relation" | "pick_list" | "seo_ruling_keyword" | "seo_ruling_example" | "seo_ruling_dimension" | "seo_ruling_matcher_hit" | "seo_ruling_correction" | "seo_ruling_confirmation" | "seo_ruling_matcher" | "seo_ruling_keyword_set" | "seo_ruling_example_set" | "seo_ruling_dimension_catalog" | "seo_ruling_matcher_hit_set" | "seo_ruling_correction_set" | "seo_ruling_confirmation_set" | "seo_ruling_matcher_set" | "agent_factory_contract" | "agent_factory_tool_choice" | "agent_factory_instructions" | "agent_factory_proof_review" | "agent_factory_build" | "markdown_stream" | typeof GENERIC_STRUCTURED_COMPONENT_KEY | typeof DB_KIND_COMPONENT_KEY;
|
|
324
|
+
/**
|
|
325
|
+
* Detector-owned protocol tokens (crosswalk rows sourced ONLY from the
|
|
326
|
+
* splitter/accumulator ATTR_XML_TAGS tables — no TS render-block union
|
|
327
|
+
* membership): the editor pill round-trip plumbing + audio citations.
|
|
328
|
+
*/
|
|
329
|
+
export type DetectorProtocolBlockType = "editor_error" | "editor_code_snippet" | "audiocite";
|
|
330
|
+
/** Crosswalk classification: protocol — control plumbing, never Shapes. */
|
|
331
|
+
export type ProtocolBlockType = ServerProtocolRenderBlock["type"] | "directive_receipt" | "thinking" | "reasoning" | "consolidated_reasoning" | "decision" | "artifact" | "info" | "task" | "database" | "private" | "plan" | "event" | "tool" | "matrx" | "matrx_file" | "schema_proposal" | DetectorProtocolBlockType;
|
|
332
|
+
/** Crosswalk classification: scalar_generic — text/code/table/media primitives. */
|
|
333
|
+
export type ScalarGenericBlockType = ServerScalarGenericRenderBlock["type"] | "text" | "code" | "table" | "image" | "video" | "tree" | "accent-divider" | "heavy-divider" | "audio" | "youtube" | "svg" | "media_block";
|
|
334
|
+
/** Crosswalk classification: shape — structured content (kinds + candidates). */
|
|
335
|
+
export type ShapeBlockType = ServerShapeRenderBlock["type"] | "decision_questions" | "speech_script" | "input_remarks" | "flashcards" | "quiz" | "presentation" | "cooking_recipe" | "timeline" | "progress_tracker" | "comparison_table" | "troubleshooting" | "resources" | "decision_tree" | "research" | "diagram" | "mermaid" | "math_problem" | "questionnaire" | "tasks" | "transcript" | "structured_info" | "item_presentation" | "video_prompt_options" | "map_topic_proposal" | "pr_play_menu" | "news_monitor_kind" | "decision_answers" | "list_change_proposal" | "keyword_research" | "keyword_classification_batch" | "keyword_serp_intent_analysis" | "seo_keyword_research_result" | "page_brief" | "media_chapters" | "generated_image_set" | "generated_video_set" | "generated_audio" | "podcast_episode" | "media_asset" | "memory_aid" | "memory_hint" | "episode_title_options" | "masterwork_checkup_finding" | "masterwork_result" | "serial_observation_timeline" | "case_disclosure" | "unfolding_ruling" | "refusal" | "agent_result" | "node_outcome" | "run_result" | "seo_package" | "plan_page_research" | "plan_page_outline" | "plan_page_draft" | "plan_page_review" | "cms_page_build" | "cms_html_page_result" | "ingested_sources" | "study_notes" | "lesson_scripts" | "study_pack" | "scraped_page" | "scraper_batch_result" | "scraper_crawl_result" | "page_link" | "link_buckets" | "page_image" | "page_video" | "page_audio" | "page_heading" | "page_section" | "page_list" | "page_block" | "code_block" | "redirect_hop" | "content_fingerprint" | "page_metadata" | "page_removal" | "page_cleaning_report" | "web_search_results" | "web_result" | "news_result" | "video_result" | "faq_item" | "discussion_result" | "local_place" | "entity_card" | "ai_answer" | "rating" | "opening_hours" | "postal_address" | "geo_coordinates" | "seo_rank_serp_landscape" | "serp_placement" | "seo_rank_reading" | "seo_rank_target" | "seo_rank_portfolio" | "seo_rank_target_removal" | "provider_run_receipt" | "intake_photo_grouping" | "item_vision_extraction" | "lot_detection" | "product_research" | "value_assessment" | "asset_grading" | "media_list_ranking_result" | "media_candidate_verdict" | "enrichment_verification" | "pricing_proposal" | "listing_draft" | "review_verdict" | "publish_preflight" | "lulu_print_cost_calculation" | "lulu_shipping_options" | "lulu_cover_dimensions" | "lulu_print_job" | "lulu_print_product_matches" | "data_table" | "source_ref" | "retrieved_chunk" | "rag_search_result" | "rag_cross_doc_search_result" | "rag_synthesize_result" | "chart" | "map" | "stats" | "diff" | "web_analysis_item" | "flow_step_result" | "collection_result" | "file_operation_result" | "value_result" | "google_workspace_result" | "google_marketing_result" | "platform_record" | "relation" | "pick_list" | "seo_ruling_keyword" | "seo_ruling_example" | "seo_ruling_dimension" | "seo_ruling_matcher_hit" | "seo_ruling_correction" | "seo_ruling_confirmation" | "seo_ruling_matcher" | "seo_ruling_keyword_set" | "seo_ruling_example_set" | "seo_ruling_dimension_catalog" | "seo_ruling_matcher_hit_set" | "seo_ruling_correction_set" | "seo_ruling_confirmation_set" | "seo_ruling_matcher_set" | "agent_factory_contract" | "agent_factory_tool_choice" | "agent_factory_instructions" | "agent_factory_proof_review" | "agent_factory_build" | "markdown_stream" | typeof GENERIC_STRUCTURED_COMPONENT_KEY | typeof DB_KIND_COMPONENT_KEY;
|
|
336
|
+
/** Crosswalk classification: intentionally_opaque — deliberately untyped. */
|
|
337
|
+
export type OpaqueBlockType = ServerOpaqueRenderBlock["type"];
|
|
338
|
+
export type KnownBlockType = ProtocolBlockType | ScalarGenericBlockType | ShapeBlockType | OpaqueBlockType;
|
|
339
|
+
/**
|
|
340
|
+
* SCREAM: a block type reached the renderer with no dispatch registration.
|
|
341
|
+
* This is a real defect (a new server/splitter type outran the generated
|
|
342
|
+
* unions, or a registration was deleted) — the block still renders as basic
|
|
343
|
+
* markdown so no content is hidden, but the miss is captured loudly
|
|
344
|
+
* (console.error once per type per session + structured captureError, which
|
|
345
|
+
* dedupes repeats). Mirrors the reportMediaDurabilityViolation posture:
|
|
346
|
+
* recover, but never silently.
|
|
347
|
+
*/
|
|
348
|
+
export declare function reportUnregisteredBlockType(type: string, meta: {
|
|
349
|
+
conversationId?: string;
|
|
350
|
+
messageId?: string;
|
|
351
|
+
requestId?: string;
|
|
352
|
+
}): void;
|
|
353
|
+
declare function renderReasoningEntry(ctx: BlockDispatchContext): React.JSX.Element | null;
|
|
354
|
+
export declare const BLOCK_DISPATCH: {
|
|
355
|
+
thinking: typeof renderReasoningEntry;
|
|
356
|
+
reasoning: typeof renderReasoningEntry;
|
|
357
|
+
consolidated_reasoning: (ctx: BlockDispatchContext) => React.JSX.Element | null;
|
|
358
|
+
info: BlockRenderFn;
|
|
359
|
+
task: BlockRenderFn;
|
|
360
|
+
database: BlockRenderFn;
|
|
361
|
+
private: BlockRenderFn;
|
|
362
|
+
plan: BlockRenderFn;
|
|
363
|
+
event: BlockRenderFn;
|
|
364
|
+
tool: (ctx: BlockDispatchContext) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
|
|
365
|
+
search_replace: ({ block, index, isStreamActive }: BlockDispatchContext) => React.JSX.Element;
|
|
366
|
+
text: BlockRenderFn;
|
|
367
|
+
code: (ctx: BlockDispatchContext) => React.JSX.Element | null;
|
|
368
|
+
table: (ctx: BlockDispatchContext) => React.JSX.Element;
|
|
369
|
+
image: (ctx: BlockDispatchContext) => React.JSX.Element | null;
|
|
370
|
+
tree: ({ block, index }: BlockDispatchContext) => React.JSX.Element;
|
|
371
|
+
"accent-divider": ({ index }: BlockDispatchContext) => React.JSX.Element;
|
|
372
|
+
"heavy-divider": ({ index }: BlockDispatchContext) => React.JSX.Element;
|
|
373
|
+
svg: BlockRenderFn;
|
|
374
|
+
flashcards: BlockRenderFn;
|
|
375
|
+
quiz: BlockRenderFn;
|
|
376
|
+
presentation: BlockRenderFn;
|
|
377
|
+
cooking_recipe: BlockRenderFn;
|
|
378
|
+
timeline: BlockRenderFn;
|
|
379
|
+
progress_tracker: BlockRenderFn;
|
|
380
|
+
comparison_table: BlockRenderFn;
|
|
381
|
+
troubleshooting: BlockRenderFn;
|
|
382
|
+
resources: BlockRenderFn;
|
|
383
|
+
decision_tree: BlockRenderFn;
|
|
384
|
+
research: BlockRenderFn;
|
|
385
|
+
diagram: BlockRenderFn;
|
|
386
|
+
mermaid: BlockRenderFn;
|
|
387
|
+
math_problem: BlockRenderFn;
|
|
388
|
+
questionnaire: BlockRenderFn;
|
|
389
|
+
tasks: BlockRenderFn;
|
|
390
|
+
chart: BlockRenderFn;
|
|
391
|
+
map: BlockRenderFn;
|
|
392
|
+
stats: BlockRenderFn;
|
|
393
|
+
diff: BlockRenderFn;
|
|
394
|
+
generic_structured: ({ block, index }: BlockDispatchContext) => React.JSX.Element;
|
|
395
|
+
markdown_stream: ({ block, index, isStreamActive }: BlockDispatchContext) => React.JSX.Element;
|
|
396
|
+
};
|
|
397
|
+
/** Per-classification membership — exported for the dispatch tests. */
|
|
398
|
+
export declare const BLOCK_DISPATCH_CLASSIFICATION: {
|
|
399
|
+
readonly protocol: string[];
|
|
400
|
+
readonly scalar_generic: string[];
|
|
401
|
+
readonly shape: string[];
|
|
402
|
+
readonly intentionally_opaque: string[];
|
|
403
|
+
};
|
|
404
|
+
export declare function registerBlockDispatch(entries: Record<string, BlockRenderFn | undefined>): void;
|
|
405
|
+
/**
|
|
406
|
+
* Resolve a block type's registration, or null when unregistered (the caller
|
|
407
|
+
* MUST then call `reportUnregisteredBlockType` — never a silent default).
|
|
408
|
+
*/
|
|
409
|
+
export declare function resolveBlockDispatch(type: string): BlockRenderFn | null;
|
|
410
|
+
export {};
|