@cueplusplus/ui 0.13.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 +4028 -0
- package/LICENSE +21 -0
- package/NOTICE.md +34 -0
- package/README.md +237 -0
- package/dist/agent-runtime/_glyphs.js +43 -0
- package/dist/agent-runtime/branch-picker.d.ts +45 -0
- package/dist/agent-runtime/branch-picker.js +87 -0
- package/dist/agent-runtime/index.d.ts +4 -0
- package/dist/agent-runtime/index.js +4 -0
- package/dist/agent-runtime/tool-call-card.d.ts +69 -0
- package/dist/agent-runtime/tool-call-card.js +187 -0
- package/dist/agent-runtime/use-agent-thread.d.ts +164 -0
- package/dist/agent-runtime/use-agent-thread.js +251 -0
- package/dist/brand/_chassis.d.ts +54 -0
- package/dist/brand/_chassis.js +81 -0
- package/dist/brand/_geometry.js +41 -0
- package/dist/brand/cue-logotype.d.ts +29 -0
- package/dist/brand/cue-logotype.js +60 -0
- package/dist/brand/cue-mark.d.ts +30 -0
- package/dist/brand/cue-mark.js +61 -0
- package/dist/brand/index.d.ts +5 -0
- package/dist/brand/plussie.d.ts +67 -0
- package/dist/brand/plussie.js +125 -0
- package/dist/charts/_token.js +39 -0
- package/dist/charts/container.d.ts +58 -0
- package/dist/charts/container.js +77 -0
- package/dist/charts/index.d.ts +5 -0
- package/dist/charts/index.js +5 -0
- package/dist/charts/ramps.d.ts +140 -0
- package/dist/charts/ramps.js +615 -0
- package/dist/charts/theme.d.ts +112 -0
- package/dist/charts/theme.js +165 -0
- package/dist/charts/tones.d.ts +111 -0
- package/dist/charts/tones.js +127 -0
- package/dist/chat/_glyphs.js +55 -0
- package/dist/chat/agent-color.d.ts +84 -0
- package/dist/chat/agent-color.js +101 -0
- package/dist/chat/agent-pile.d.ts +55 -0
- package/dist/chat/agent-pile.js +121 -0
- package/dist/chat/ask-box.d.ts +88 -0
- package/dist/chat/ask-box.js +341 -0
- package/dist/chat/composer.d.ts +66 -0
- package/dist/chat/composer.js +144 -0
- package/dist/chat/delegation-card.d.ts +60 -0
- package/dist/chat/delegation-card.js +129 -0
- package/dist/chat/index.d.ts +8 -0
- package/dist/chat/index.js +8 -0
- package/dist/chat/message-list.d.ts +45 -0
- package/dist/chat/message-list.js +141 -0
- package/dist/chat/message.d.ts +47 -0
- package/dist/chat/message.js +108 -0
- package/dist/chrome/_band.js +54 -0
- package/dist/chrome/_drag.js +59 -0
- package/dist/chrome/_edge-scroller.d.ts +45 -0
- package/dist/chrome/_edge-scroller.js +149 -0
- package/dist/chrome/_glyphs.js +119 -0
- package/dist/chrome/_status-bar-item.js +85 -0
- package/dist/chrome/_status-bar.d.ts +15 -0
- package/dist/chrome/_status-bar.js +171 -0
- package/dist/chrome/_tabs-scroll.d.ts +67 -0
- package/dist/chrome/_tabs-scroll.js +73 -0
- package/dist/chrome/_tree.d.ts +75 -0
- package/dist/chrome/_tree.js +49 -0
- package/dist/chrome/app-bar.d.ts +103 -0
- package/dist/chrome/app-bar.js +175 -0
- package/dist/chrome/app-shell.d.ts +243 -0
- package/dist/chrome/app-shell.js +266 -0
- package/dist/chrome/band.d.ts +106 -0
- package/dist/chrome/band.js +97 -0
- package/dist/chrome/empty-state.d.ts +37 -0
- package/dist/chrome/empty-state.js +57 -0
- package/dist/chrome/eyebrow.d.ts +29 -0
- package/dist/chrome/eyebrow.js +36 -0
- package/dist/chrome/footer.d.ts +88 -0
- package/dist/chrome/footer.js +83 -0
- package/dist/chrome/index.d.ts +24 -0
- package/dist/chrome/index.js +22 -0
- package/dist/chrome/inspector.d.ts +61 -0
- package/dist/chrome/inspector.js +121 -0
- package/dist/chrome/navigation-menu.d.ts +80 -0
- package/dist/chrome/navigation-menu.js +121 -0
- package/dist/chrome/page-shell.d.ts +38 -0
- package/dist/chrome/page-shell.js +76 -0
- package/dist/chrome/panel.d.ts +55 -0
- package/dist/chrome/panel.js +67 -0
- package/dist/chrome/row.d.ts +82 -0
- package/dist/chrome/row.js +106 -0
- package/dist/chrome/scroll-area.d.ts +39 -0
- package/dist/chrome/scroll-area.js +70 -0
- package/dist/chrome/section-header.d.ts +42 -0
- package/dist/chrome/section-header.js +79 -0
- package/dist/chrome/segmented-control.d.ts +77 -0
- package/dist/chrome/segmented-control.js +95 -0
- package/dist/chrome/status-bar.d.ts +129 -0
- package/dist/chrome/status-bar.js +120 -0
- package/dist/chrome/tabs.d.ts +80 -0
- package/dist/chrome/tabs.js +132 -0
- package/dist/chrome/title-bar.d.ts +47 -0
- package/dist/chrome/title-bar.js +43 -0
- package/dist/chrome/toolbar.d.ts +68 -0
- package/dist/chrome/toolbar.js +83 -0
- package/dist/chrome/tree.d.ts +98 -0
- package/dist/chrome/tree.js +248 -0
- package/dist/color/_checker.js +14 -0
- package/dist/color/_convert.d.ts +52 -0
- package/dist/color/_convert.js +66 -0
- package/dist/color/_glyphs.js +28 -0
- package/dist/color/_thumb.js +15 -0
- package/dist/color/_value.js +28 -0
- package/dist/color/color-area.d.ts +27 -0
- package/dist/color/color-area.js +40 -0
- package/dist/color/color-field.d.ts +32 -0
- package/dist/color/color-field.js +43 -0
- package/dist/color/color-picker.d.ts +71 -0
- package/dist/color/color-picker.js +178 -0
- package/dist/color/color-slider.d.ts +31 -0
- package/dist/color/color-slider.js +51 -0
- package/dist/color/color-swatch.d.ts +32 -0
- package/dist/color/color-swatch.js +44 -0
- package/dist/color/index.d.ts +7 -0
- package/dist/color/index.js +7 -0
- package/dist/configurator/_export.d.ts +78 -0
- package/dist/configurator/_export.js +302 -0
- package/dist/configurator/_glyphs.js +92 -0
- package/dist/configurator/_overrides.d.ts +266 -0
- package/dist/configurator/_overrides.js +541 -0
- package/dist/configurator/configurator.d.ts +71 -0
- package/dist/configurator/configurator.js +284 -0
- package/dist/configurator/export-dialog.d.ts +30 -0
- package/dist/configurator/export-dialog.js +121 -0
- package/dist/configurator/index.d.ts +8 -0
- package/dist/configurator/index.js +8 -0
- package/dist/configurator/panel-sections.d.ts +86 -0
- package/dist/configurator/panel-sections.js +352 -0
- package/dist/configurator/token-editor.d.ts +74 -0
- package/dist/configurator/token-editor.js +152 -0
- package/dist/configurator/use-zoom.d.ts +87 -0
- package/dist/configurator/use-zoom.js +113 -0
- package/dist/date/_glyphs.js +34 -0
- package/dist/date/_segments.js +101 -0
- package/dist/date/_trigger.js +31 -0
- package/dist/date/calendar.d.ts +25 -0
- package/dist/date/calendar.js +125 -0
- package/dist/date/date-field.d.ts +34 -0
- package/dist/date/date-field.js +41 -0
- package/dist/date/date-picker.d.ts +69 -0
- package/dist/date/date-picker.js +89 -0
- package/dist/date/date-range-picker.d.ts +65 -0
- package/dist/date/date-range-picker.js +92 -0
- package/dist/date/index.d.ts +6 -0
- package/dist/date/index.js +6 -0
- package/dist/date/time-field.d.ts +29 -0
- package/dist/date/time-field.js +36 -0
- package/dist/dmx/_ramp.d.ts +77 -0
- package/dist/dmx/_ramp.js +169 -0
- package/dist/dmx/_readout.js +53 -0
- package/dist/dmx/_universe.d.ts +105 -0
- package/dist/dmx/_universe.js +112 -0
- package/dist/dmx/channel-matrix.d.ts +81 -0
- package/dist/dmx/channel-matrix.js +285 -0
- package/dist/dmx/dmx-bar.d.ts +50 -0
- package/dist/dmx/dmx-bar.js +107 -0
- package/dist/dmx/dmx-strip.d.ts +41 -0
- package/dist/dmx/dmx-strip.js +196 -0
- package/dist/dmx/index.d.ts +7 -0
- package/dist/dmx/index.js +7 -0
- package/dist/dmx/universe-grid.d.ts +61 -0
- package/dist/dmx/universe-grid.js +182 -0
- package/dist/elements/activity-graph.d.ts +40 -0
- package/dist/elements/activity-graph.js +81 -0
- package/dist/elements/agent-card.d.ts +49 -0
- package/dist/elements/agent-card.js +91 -0
- package/dist/elements/agent-handoff.d.ts +24 -0
- package/dist/elements/agent-handoff.js +53 -0
- package/dist/elements/agent-mode-badge.d.ts +72 -0
- package/dist/elements/agent-mode-badge.js +110 -0
- package/dist/elements/agent-plan.d.ts +24 -0
- package/dist/elements/agent-plan.js +74 -0
- package/dist/elements/agent-status.d.ts +29 -0
- package/dist/elements/agent-status.js +46 -0
- package/dist/elements/agent-surface.d.ts +65 -0
- package/dist/elements/agent-surface.js +68 -0
- package/dist/elements/animated-number.d.ts +86 -0
- package/dist/elements/animated-number.js +118 -0
- package/dist/elements/approval-card.d.ts +40 -0
- package/dist/elements/approval-card.js +78 -0
- package/dist/elements/artifact-card.d.ts +30 -0
- package/dist/elements/artifact-card.js +58 -0
- package/dist/elements/background-inbox.d.ts +39 -0
- package/dist/elements/background-inbox.js +60 -0
- package/dist/elements/canvas-split.d.ts +77 -0
- package/dist/elements/canvas-split.js +138 -0
- package/dist/elements/chart.d.ts +41 -0
- package/dist/elements/chart.js +117 -0
- package/dist/elements/chat-panel.d.ts +46 -0
- package/dist/elements/chat-panel.js +104 -0
- package/dist/elements/checkpoint-history.d.ts +31 -0
- package/dist/elements/checkpoint-history.js +65 -0
- package/dist/elements/clamp.d.ts +90 -0
- package/dist/elements/clamp.js +109 -0
- package/dist/elements/code-diff.d.ts +42 -0
- package/dist/elements/code-diff.js +69 -0
- package/dist/elements/code-runner.d.ts +38 -0
- package/dist/elements/code-runner.js +84 -0
- package/dist/elements/command-palette.d.ts +48 -0
- package/dist/elements/command-palette.js +129 -0
- package/dist/elements/compaction-row.d.ts +63 -0
- package/dist/elements/compaction-row.js +110 -0
- package/dist/elements/comparison-card.d.ts +47 -0
- package/dist/elements/comparison-card.js +69 -0
- package/dist/elements/composer.d.ts +274 -0
- package/dist/elements/composer.js +505 -0
- package/dist/elements/computer-use.d.ts +40 -0
- package/dist/elements/computer-use.js +92 -0
- package/dist/elements/confidence-marker.d.ts +39 -0
- package/dist/elements/confidence-marker.js +64 -0
- package/dist/elements/connection-state.d.ts +29 -0
- package/dist/elements/connection-state.js +66 -0
- package/dist/elements/context-breakdown.d.ts +30 -0
- package/dist/elements/context-breakdown.js +86 -0
- package/dist/elements/context-usage.d.ts +99 -0
- package/dist/elements/context-usage.js +225 -0
- package/dist/elements/conversation-search.d.ts +48 -0
- package/dist/elements/conversation-search.js +88 -0
- package/dist/elements/cost-meter.d.ts +33 -0
- package/dist/elements/cost-meter.js +75 -0
- package/dist/elements/data-table.d.ts +31 -0
- package/dist/elements/data-table.js +67 -0
- package/dist/elements/day-separator.d.ts +34 -0
- package/dist/elements/day-separator.js +50 -0
- package/dist/elements/diagram.d.ts +34 -0
- package/dist/elements/diagram.js +75 -0
- package/dist/elements/document-reference.d.ts +37 -0
- package/dist/elements/document-reference.js +66 -0
- package/dist/elements/draft-restore.d.ts +27 -0
- package/dist/elements/draft-restore.js +54 -0
- package/dist/elements/edit-message.d.ts +36 -0
- package/dist/elements/edit-message.js +77 -0
- package/dist/elements/elements.css +459 -0
- package/dist/elements/elicitation-form.d.ts +48 -0
- package/dist/elements/elicitation-form.js +106 -0
- package/dist/elements/empty-state.d.ts +52 -0
- package/dist/elements/empty-state.js +98 -0
- package/dist/elements/end-of-turn-summary.d.ts +60 -0
- package/dist/elements/end-of-turn-summary.js +75 -0
- package/dist/elements/error-state.d.ts +29 -0
- package/dist/elements/error-state.js +55 -0
- package/dist/elements/feedback-dialog.d.ts +36 -0
- package/dist/elements/feedback-dialog.js +81 -0
- package/dist/elements/file-tree.d.ts +45 -0
- package/dist/elements/file-tree.js +84 -0
- package/dist/elements/flow-graph.d.ts +45 -0
- package/dist/elements/flow-graph.js +78 -0
- package/dist/elements/generative/chart.js +200 -0
- package/dist/elements/generative/faults.js +111 -0
- package/dist/elements/generative/icons.d.ts +41 -0
- package/dist/elements/generative/icons.js +190 -0
- package/dist/elements/generative/intrinsics.js +483 -0
- package/dist/elements/generative/spec.d.ts +110 -0
- package/dist/elements/generative/spec.js +366 -0
- package/dist/elements/generative.css +1145 -0
- package/dist/elements/generative.d.ts +144 -0
- package/dist/elements/generative.js +126 -0
- package/dist/elements/guardrail-notice.d.ts +29 -0
- package/dist/elements/guardrail-notice.js +63 -0
- package/dist/elements/image-generation.d.ts +18 -0
- package/dist/elements/image-generation.js +64 -0
- package/dist/elements/index.d.ts +116 -0
- package/dist/elements/index.js +115 -0
- package/dist/elements/inline-citation.d.ts +43 -0
- package/dist/elements/inline-citation.js +93 -0
- package/dist/elements/job-progress.d.ts +49 -0
- package/dist/elements/job-progress.js +74 -0
- package/dist/elements/launcher-bubble.d.ts +34 -0
- package/dist/elements/launcher-bubble.js +72 -0
- package/dist/elements/live-region-announcer.d.ts +130 -0
- package/dist/elements/live-region-announcer.js +230 -0
- package/dist/elements/loading-state.d.ts +27 -0
- package/dist/elements/loading-state.js +36 -0
- package/dist/elements/map-answer.d.ts +38 -0
- package/dist/elements/map-answer.js +93 -0
- package/dist/elements/markdown.d.ts +131 -0
- package/dist/elements/markdown.js +528 -0
- package/dist/elements/math-block.d.ts +51 -0
- package/dist/elements/math-block.js +70 -0
- package/dist/elements/mcp-server-panel.d.ts +41 -0
- package/dist/elements/mcp-server-panel.js +115 -0
- package/dist/elements/memory-chips.d.ts +30 -0
- package/dist/elements/memory-chips.js +43 -0
- package/dist/elements/message-actions.d.ts +38 -0
- package/dist/elements/message-actions.js +71 -0
- package/dist/elements/message-attachment.d.ts +48 -0
- package/dist/elements/message-attachment.js +63 -0
- package/dist/elements/message-branches.d.ts +25 -0
- package/dist/elements/message-branches.js +65 -0
- package/dist/elements/message-pair.d.ts +33 -0
- package/dist/elements/message-pair.js +65 -0
- package/dist/elements/message-queue.d.ts +31 -0
- package/dist/elements/message-queue.js +80 -0
- package/dist/elements/message-timing.d.ts +33 -0
- package/dist/elements/message-timing.js +37 -0
- package/dist/elements/mobile-composer.d.ts +44 -0
- package/dist/elements/mobile-composer.js +88 -0
- package/dist/elements/model-picker.d.ts +38 -0
- package/dist/elements/model-picker.js +69 -0
- package/dist/elements/number-ticker.d.ts +18 -0
- package/dist/elements/number-ticker.js +47 -0
- package/dist/elements/onboarding.d.ts +30 -0
- package/dist/elements/onboarding.js +75 -0
- package/dist/elements/permission-grant.d.ts +35 -0
- package/dist/elements/permission-grant.js +86 -0
- package/dist/elements/permission-scopes.d.ts +215 -0
- package/dist/elements/permission-scopes.js +249 -0
- package/dist/elements/prompt-library.d.ts +43 -0
- package/dist/elements/prompt-library.js +117 -0
- package/dist/elements/queue-dock.d.ts +101 -0
- package/dist/elements/queue-dock.js +132 -0
- package/dist/elements/quota-banner.d.ts +26 -0
- package/dist/elements/quota-banner.js +66 -0
- package/dist/elements/quote-reply.d.ts +44 -0
- package/dist/elements/quote-reply.js +79 -0
- package/dist/elements/range.d.ts +29 -0
- package/dist/elements/range.js +45 -0
- package/dist/elements/read-aloud.d.ts +45 -0
- package/dist/elements/read-aloud.js +75 -0
- package/dist/elements/reasoning-effort.d.ts +36 -0
- package/dist/elements/reasoning-effort.js +67 -0
- package/dist/elements/reasoning-panel.d.ts +46 -0
- package/dist/elements/reasoning-panel.js +75 -0
- package/dist/elements/recommendation-card.d.ts +45 -0
- package/dist/elements/recommendation-card.js +83 -0
- package/dist/elements/regenerate-menu.d.ts +45 -0
- package/dist/elements/regenerate-menu.js +51 -0
- package/dist/elements/replay.d.ts +217 -0
- package/dist/elements/replay.js +498 -0
- package/dist/elements/research-report.d.ts +38 -0
- package/dist/elements/research-report.js +69 -0
- package/dist/elements/retrieval-chunks.d.ts +43 -0
- package/dist/elements/retrieval-chunks.js +81 -0
- package/dist/elements/revert-dock.d.ts +159 -0
- package/dist/elements/revert-dock.js +327 -0
- package/dist/elements/reviewable-diff.d.ts +45 -0
- package/dist/elements/reviewable-diff.js +110 -0
- package/dist/elements/risk-badge.d.ts +52 -0
- package/dist/elements/risk-badge.js +91 -0
- package/dist/elements/schedule-card.d.ts +42 -0
- package/dist/elements/schedule-card.js +90 -0
- package/dist/elements/score-breakdown.d.ts +47 -0
- package/dist/elements/score-breakdown.js +82 -0
- package/dist/elements/scroll-anchor.d.ts +32 -0
- package/dist/elements/scroll-anchor.js +123 -0
- package/dist/elements/settings-panel.d.ts +52 -0
- package/dist/elements/settings-panel.js +107 -0
- package/dist/elements/shared-conversation.d.ts +39 -0
- package/dist/elements/shared-conversation.js +68 -0
- package/dist/elements/sources.d.ts +33 -0
- package/dist/elements/sources.js +61 -0
- package/dist/elements/speaker-identity.d.ts +32 -0
- package/dist/elements/speaker-identity.js +51 -0
- package/dist/elements/spec-sheet.d.ts +31 -0
- package/dist/elements/spec-sheet.js +45 -0
- package/dist/elements/stopped-run.d.ts +22 -0
- package/dist/elements/stopped-run.js +50 -0
- package/dist/elements/streaming-text.d.ts +31 -0
- package/dist/elements/streaming-text.js +45 -0
- package/dist/elements/subagent-list.d.ts +37 -0
- package/dist/elements/subagent-list.js +79 -0
- package/dist/elements/suggestions.d.ts +30 -0
- package/dist/elements/suggestions.js +36 -0
- package/dist/elements/surfaces.d.ts +85 -0
- package/dist/elements/surfaces.js +108 -0
- package/dist/elements/tail-status.d.ts +131 -0
- package/dist/elements/tail-status.js +94 -0
- package/dist/elements/terminal-block.d.ts +29 -0
- package/dist/elements/terminal-block.js +54 -0
- package/dist/elements/thinking-indicator.d.ts +18 -0
- package/dist/elements/thinking-indicator.js +36 -0
- package/dist/elements/thread-list.d.ts +35 -0
- package/dist/elements/thread-list.js +68 -0
- package/dist/elements/thread-search.d.ts +42 -0
- package/dist/elements/thread-search.js +99 -0
- package/dist/elements/timeline.d.ts +37 -0
- package/dist/elements/timeline.js +46 -0
- package/dist/elements/todo-list.d.ts +42 -0
- package/dist/elements/todo-list.js +59 -0
- package/dist/elements/tool-call.d.ts +41 -0
- package/dist/elements/tool-call.js +85 -0
- package/dist/elements/tool-error.d.ts +39 -0
- package/dist/elements/tool-error.js +76 -0
- package/dist/elements/tool-group.d.ts +45 -0
- package/dist/elements/tool-group.js +71 -0
- package/dist/elements/tool-timeline.d.ts +65 -0
- package/dist/elements/tool-timeline.js +88 -0
- package/dist/elements/trace-waterfall.d.ts +37 -0
- package/dist/elements/trace-waterfall.js +69 -0
- package/dist/elements/transcript-rules.d.ts +67 -0
- package/dist/elements/transcript-rules.js +95 -0
- package/dist/elements/turn-footer.d.ts +74 -0
- package/dist/elements/turn-footer.js +101 -0
- package/dist/elements/typing-indicator.d.ts +16 -0
- package/dist/elements/typing-indicator.js +51 -0
- package/dist/elements/verdict-row.d.ts +89 -0
- package/dist/elements/verdict-row.js +150 -0
- package/dist/elements/vocabulary.d.ts +612 -0
- package/dist/elements/vocabulary.js +611 -0
- package/dist/elements/voice-conversation.d.ts +49 -0
- package/dist/elements/voice-conversation.js +123 -0
- package/dist/elements/web-preview.d.ts +32 -0
- package/dist/elements/web-preview.js +66 -0
- package/dist/elements/web-search.d.ts +37 -0
- package/dist/elements/web-search.js +66 -0
- package/dist/elements/work-collapse.d.ts +103 -0
- package/dist/elements/work-collapse.js +131 -0
- package/dist/flow/_frame.d.ts +52 -0
- package/dist/flow/_frame.js +38 -0
- package/dist/flow/controls.d.ts +41 -0
- package/dist/flow/controls.js +53 -0
- package/dist/flow/flow.css +121 -0
- package/dist/flow/handles.d.ts +40 -0
- package/dist/flow/handles.js +61 -0
- package/dist/flow/index.d.ts +7 -0
- package/dist/flow/index.js +7 -0
- package/dist/flow/node-card.d.ts +71 -0
- package/dist/flow/node-card.js +102 -0
- package/dist/flow/signal-edge.d.ts +60 -0
- package/dist/flow/signal-edge.js +108 -0
- package/dist/flow/use-flow-theme.d.ts +69 -0
- package/dist/flow/use-flow-theme.js +109 -0
- package/dist/forms/_chassis.d.ts +164 -0
- package/dist/forms/_chassis.js +159 -0
- package/dist/forms/_glyphs.js +143 -0
- package/dist/forms/_listbox.js +55 -0
- package/dist/forms/autocomplete.d.ts +61 -0
- package/dist/forms/autocomplete.js +88 -0
- package/dist/forms/button-group.d.ts +47 -0
- package/dist/forms/button-group.js +52 -0
- package/dist/forms/checkbox.d.ts +51 -0
- package/dist/forms/checkbox.js +98 -0
- package/dist/forms/combobox.d.ts +73 -0
- package/dist/forms/combobox.js +108 -0
- package/dist/forms/env-var-input.d.ts +74 -0
- package/dist/forms/env-var-input.js +116 -0
- package/dist/forms/field.d.ts +89 -0
- package/dist/forms/field.js +102 -0
- package/dist/forms/file-upload.d.ts +113 -0
- package/dist/forms/file-upload.js +232 -0
- package/dist/forms/index.d.ts +26 -0
- package/dist/forms/index.js +26 -0
- package/dist/forms/input-group.d.ts +36 -0
- package/dist/forms/input-group.js +59 -0
- package/dist/forms/input.d.ts +45 -0
- package/dist/forms/input.js +36 -0
- package/dist/forms/multi-select.d.ts +62 -0
- package/dist/forms/multi-select.js +107 -0
- package/dist/forms/number-field.d.ts +39 -0
- package/dist/forms/number-field.js +65 -0
- package/dist/forms/otp-field.d.ts +54 -0
- package/dist/forms/otp-field.js +59 -0
- package/dist/forms/password-input.d.ts +46 -0
- package/dist/forms/password-input.js +62 -0
- package/dist/forms/radio-group.d.ts +50 -0
- package/dist/forms/radio-group.js +64 -0
- package/dist/forms/rating.d.ts +69 -0
- package/dist/forms/rating.js +103 -0
- package/dist/forms/scrub-input.d.ts +81 -0
- package/dist/forms/scrub-input.js +249 -0
- package/dist/forms/search-input.d.ts +54 -0
- package/dist/forms/search-input.js +112 -0
- package/dist/forms/select.d.ts +75 -0
- package/dist/forms/select.js +91 -0
- package/dist/forms/slider.d.ts +44 -0
- package/dist/forms/slider.js +65 -0
- package/dist/forms/switch.d.ts +36 -0
- package/dist/forms/switch.js +71 -0
- package/dist/forms/tags-input.d.ts +69 -0
- package/dist/forms/tags-input.js +148 -0
- package/dist/forms/textarea.d.ts +39 -0
- package/dist/forms/textarea.js +37 -0
- package/dist/forms/toggle-group.d.ts +41 -0
- package/dist/forms/toggle-group.js +56 -0
- package/dist/forms/toggle.d.ts +47 -0
- package/dist/forms/toggle.js +100 -0
- package/dist/icons/containers.d.ts +89 -0
- package/dist/icons/containers.js +295 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/index.d.ts +138 -0
- package/dist/index.js +124 -0
- package/dist/instruments/_ansi.js +116 -0
- package/dist/instruments/_data-row.d.ts +68 -0
- package/dist/instruments/_data-row.js +139 -0
- package/dist/instruments/_glyphs.js +90 -0
- package/dist/instruments/_ledger-disclosure.js +103 -0
- package/dist/instruments/_ledger.d.ts +21 -0
- package/dist/instruments/_ledger.js +5 -0
- package/dist/instruments/_motion.js +56 -0
- package/dist/instruments/_rem.js +21 -0
- package/dist/instruments/app-window-frame.d.ts +48 -0
- package/dist/instruments/app-window-frame.js +76 -0
- package/dist/instruments/code-block.d.ts +35 -0
- package/dist/instruments/code-block.js +173 -0
- package/dist/instruments/copy-button.d.ts +41 -0
- package/dist/instruments/copy-button.js +112 -0
- package/dist/instruments/data-row.d.ts +94 -0
- package/dist/instruments/data-row.js +151 -0
- package/dist/instruments/data-table.d.ts +168 -0
- package/dist/instruments/data-table.js +212 -0
- package/dist/instruments/data-tree.d.ts +126 -0
- package/dist/instruments/data-tree.js +303 -0
- package/dist/instruments/group-bar.d.ts +63 -0
- package/dist/instruments/group-bar.js +122 -0
- package/dist/instruments/index.d.ts +18 -0
- package/dist/instruments/index.js +18 -0
- package/dist/instruments/ledger.d.ts +204 -0
- package/dist/instruments/ledger.js +204 -0
- package/dist/instruments/log-viewer.d.ts +74 -0
- package/dist/instruments/log-viewer.js +215 -0
- package/dist/instruments/meter.d.ts +81 -0
- package/dist/instruments/meter.js +96 -0
- package/dist/instruments/progress.d.ts +61 -0
- package/dist/instruments/progress.js +79 -0
- package/dist/instruments/seam-grid.d.ts +66 -0
- package/dist/instruments/seam-grid.js +78 -0
- package/dist/instruments/sparkline.d.ts +39 -0
- package/dist/instruments/sparkline.js +85 -0
- package/dist/instruments/stat.d.ts +35 -0
- package/dist/instruments/stat.js +59 -0
- package/dist/instruments/table.d.ts +170 -0
- package/dist/instruments/table.js +237 -0
- package/dist/instruments/terminal-frame.d.ts +89 -0
- package/dist/instruments/terminal-frame.js +256 -0
- package/dist/instruments/two-step-button.d.ts +47 -0
- package/dist/instruments/two-step-button.js +166 -0
- package/dist/instruments/usage-chart.d.ts +55 -0
- package/dist/instruments/usage-chart.js +235 -0
- package/dist/layout/_collapse.js +46 -0
- package/dist/layout/_glyphs.js +45 -0
- package/dist/layout/_ground.d.ts +22 -0
- package/dist/layout/_ground.js +9 -0
- package/dist/layout/accordion.d.ts +52 -0
- package/dist/layout/accordion.js +81 -0
- package/dist/layout/bento.d.ts +144 -0
- package/dist/layout/bento.js +266 -0
- package/dist/layout/breadcrumb.d.ts +35 -0
- package/dist/layout/breadcrumb.js +67 -0
- package/dist/layout/card.d.ts +51 -0
- package/dist/layout/card.js +76 -0
- package/dist/layout/carousel.d.ts +96 -0
- package/dist/layout/carousel.js +211 -0
- package/dist/layout/collapsible.d.ts +74 -0
- package/dist/layout/collapsible.js +126 -0
- package/dist/layout/container.d.ts +27 -0
- package/dist/layout/container.js +43 -0
- package/dist/layout/description-list.d.ts +24 -0
- package/dist/layout/description-list.js +37 -0
- package/dist/layout/frames.d.ts +70 -0
- package/dist/layout/frames.js +298 -0
- package/dist/layout/grid.d.ts +40 -0
- package/dist/layout/grid.js +48 -0
- package/dist/layout/index.d.ts +19 -0
- package/dist/layout/index.js +18 -0
- package/dist/layout/item.d.ts +65 -0
- package/dist/layout/item.js +100 -0
- package/dist/layout/link.d.ts +48 -0
- package/dist/layout/link.js +63 -0
- package/dist/layout/pagination.d.ts +54 -0
- package/dist/layout/pagination.js +121 -0
- package/dist/layout/preview.d.ts +177 -0
- package/dist/layout/preview.js +628 -0
- package/dist/layout/resizable.d.ts +38 -0
- package/dist/layout/resizable.js +68 -0
- package/dist/layout/sidebar.d.ts +105 -0
- package/dist/layout/sidebar.js +158 -0
- package/dist/layout/stack.d.ts +46 -0
- package/dist/layout/stack.js +62 -0
- package/dist/layout/stepper.d.ts +49 -0
- package/dist/layout/stepper.js +81 -0
- package/dist/layout/timeline.d.ts +43 -0
- package/dist/layout/timeline.js +63 -0
- package/dist/lib/aria-class.js +24 -0
- package/dist/lib/cn.js +18 -0
- package/dist/lib/compose.js +38 -0
- package/dist/lib/cva.d.ts +18 -0
- package/dist/lib/cva.js +65 -0
- package/dist/midi/_notes.d.ts +101 -0
- package/dist/midi/_notes.js +183 -0
- package/dist/midi/_ruler.d.ts +100 -0
- package/dist/midi/_ruler.js +105 -0
- package/dist/midi/_time.d.ts +107 -0
- package/dist/midi/_time.js +130 -0
- package/dist/midi/index.d.ts +9 -0
- package/dist/midi/index.js +9 -0
- package/dist/midi/musical-time-input.d.ts +48 -0
- package/dist/midi/musical-time-input.js +154 -0
- package/dist/midi/piano-keyboard.d.ts +50 -0
- package/dist/midi/piano-keyboard.js +197 -0
- package/dist/midi/spectrum-visualizer.d.ts +65 -0
- package/dist/midi/spectrum-visualizer.js +213 -0
- package/dist/midi/threshold-rail.d.ts +72 -0
- package/dist/midi/threshold-rail.js +214 -0
- package/dist/midi/timeline-ruler.d.ts +83 -0
- package/dist/midi/timeline-ruler.js +152 -0
- package/dist/overlays/_debounce.js +34 -0
- package/dist/overlays/_glyphs.js +59 -0
- package/dist/overlays/_surface.d.ts +70 -0
- package/dist/overlays/_surface.js +70 -0
- package/dist/overlays/_wheel.js +42 -0
- package/dist/overlays/alert-dialog.d.ts +67 -0
- package/dist/overlays/alert-dialog.js +117 -0
- package/dist/overlays/command-palette.d.ts +93 -0
- package/dist/overlays/command-palette.js +193 -0
- package/dist/overlays/context-menu.d.ts +64 -0
- package/dist/overlays/context-menu.js +78 -0
- package/dist/overlays/dialog.d.ts +72 -0
- package/dist/overlays/dialog.js +124 -0
- package/dist/overlays/drawer.d.ts +75 -0
- package/dist/overlays/drawer.js +151 -0
- package/dist/overlays/dropdown-menu.d.ts +79 -0
- package/dist/overlays/dropdown-menu.js +156 -0
- package/dist/overlays/hover-card.d.ts +58 -0
- package/dist/overlays/hover-card.js +91 -0
- package/dist/overlays/index.d.ts +15 -0
- package/dist/overlays/index.js +15 -0
- package/dist/overlays/info-tip.d.ts +41 -0
- package/dist/overlays/info-tip.js +45 -0
- package/dist/overlays/menubar.d.ts +72 -0
- package/dist/overlays/menubar.js +100 -0
- package/dist/overlays/popover.d.ts +66 -0
- package/dist/overlays/popover.js +114 -0
- package/dist/overlays/sheet.d.ts +78 -0
- package/dist/overlays/sheet.js +131 -0
- package/dist/overlays/toast.d.ts +106 -0
- package/dist/overlays/toast.js +146 -0
- package/dist/overlays/tooltip.d.ts +57 -0
- package/dist/overlays/tooltip.js +95 -0
- package/dist/primitives/avatar.d.ts +51 -0
- package/dist/primitives/avatar.js +93 -0
- package/dist/primitives/button.d.ts +58 -0
- package/dist/primitives/button.js +104 -0
- package/dist/primitives/chip.d.ts +73 -0
- package/dist/primitives/chip.js +238 -0
- package/dist/primitives/icon-button.d.ts +41 -0
- package/dist/primitives/icon-button.js +59 -0
- package/dist/primitives/index.d.ts +10 -0
- package/dist/primitives/index.js +10 -0
- package/dist/primitives/kbd.d.ts +17 -0
- package/dist/primitives/kbd.js +24 -0
- package/dist/primitives/separator.d.ts +25 -0
- package/dist/primitives/separator.js +30 -0
- package/dist/primitives/skeleton.d.ts +20 -0
- package/dist/primitives/skeleton.js +27 -0
- package/dist/primitives/spinner.d.ts +26 -0
- package/dist/primitives/spinner.js +31 -0
- package/dist/primitives/status-dot.d.ts +51 -0
- package/dist/primitives/status-dot.js +57 -0
- package/dist/styles.css +97 -0
- package/dist/system/agent-skin.d.ts +27 -0
- package/dist/system/agent-skin.js +20 -0
- package/dist/system/density.d.ts +73 -0
- package/dist/system/density.js +111 -0
- package/dist/system/index.d.ts +12 -0
- package/dist/system/index.js +10 -0
- package/dist/system/overrides.d.ts +80 -0
- package/dist/system/overrides.js +277 -0
- package/dist/system/portal.d.ts +56 -0
- package/dist/system/portal.js +193 -0
- package/dist/system/prepaint.d.ts +134 -0
- package/dist/system/prepaint.js +120 -0
- package/dist/system/theme-provider.d.ts +290 -0
- package/dist/system/theme-provider.js +543 -0
- package/dist/system/theme-registry.d.ts +53 -0
- package/dist/system/theme-registry.js +66 -0
- package/dist/system/use-density.d.ts +50 -0
- package/dist/system/use-density.js +232 -0
- package/dist/system/use-isomorphic-layout-effect.js +33 -0
- package/dist/system/use-theme.d.ts +30 -0
- package/dist/system/use-theme.js +36 -0
- package/dist/system/vocabulary.d.ts +16 -0
- package/dist/system/vocabulary.js +125 -0
- package/dist/theming/contrast.d.ts +2 -0
- package/dist/theming/contrast.js +2 -0
- package/dist/theming/create-theme.d.ts +195 -0
- package/dist/theming/create-theme.js +524 -0
- package/dist/theming/index.d.ts +4 -0
- package/dist/theming/index.js +4 -0
- package/dist/theming/serialize.d.ts +167 -0
- package/dist/theming/serialize.js +241 -0
- package/manifest/components/accordion.json +173 -0
- package/manifest/components/activity-graph.json +104 -0
- package/manifest/components/agent-card.json +150 -0
- package/manifest/components/agent-handoff.json +104 -0
- package/manifest/components/agent-mode-badge.json +102 -0
- package/manifest/components/agent-pile.json +147 -0
- package/manifest/components/agent-plan.json +74 -0
- package/manifest/components/agent-status.json +87 -0
- package/manifest/components/agent-surface.json +93 -0
- package/manifest/components/alert-dialog.json +215 -0
- package/manifest/components/animated-number.json +75 -0
- package/manifest/components/app-bar.json +297 -0
- package/manifest/components/app-shell.json +526 -0
- package/manifest/components/app-window-frame.json +124 -0
- package/manifest/components/approval-card.json +136 -0
- package/manifest/components/artifact-card.json +93 -0
- package/manifest/components/ask-box.json +288 -0
- package/manifest/components/audience-icon.json +46 -0
- package/manifest/components/autocomplete.json +262 -0
- package/manifest/components/avatar-group.json +83 -0
- package/manifest/components/avatar.json +113 -0
- package/manifest/components/background-inbox.json +79 -0
- package/manifest/components/band.json +104 -0
- package/manifest/components/bento.json +306 -0
- package/manifest/components/branch-picker.json +146 -0
- package/manifest/components/breadcrumb.json +85 -0
- package/manifest/components/button-group.json +91 -0
- package/manifest/components/button.json +163 -0
- package/manifest/components/calendar.json +65 -0
- package/manifest/components/canvas-split-body.json +66 -0
- package/manifest/components/canvas-split-document.json +55 -0
- package/manifest/components/canvas-split-header.json +97 -0
- package/manifest/components/canvas-split-line.json +66 -0
- package/manifest/components/canvas-split-message.json +70 -0
- package/manifest/components/canvas-split-thread.json +55 -0
- package/manifest/components/canvas-split.json +61 -0
- package/manifest/components/card.json +152 -0
- package/manifest/components/carousel.json +242 -0
- package/manifest/components/catalogue-icon.json +46 -0
- package/manifest/components/channel-beta-icon.json +46 -0
- package/manifest/components/channel-matrix.json +239 -0
- package/manifest/components/channel-released-icon.json +46 -0
- package/manifest/components/chart-container.json +127 -0
- package/manifest/components/chart-ramp.json +82 -0
- package/manifest/components/chart-swatch.json +72 -0
- package/manifest/components/chart-tooltip-content.json +140 -0
- package/manifest/components/chart.json +117 -0
- package/manifest/components/chat-empty-state.json +55 -0
- package/manifest/components/chat-panel-assistant-message.json +52 -0
- package/manifest/components/chat-panel-composer.json +74 -0
- package/manifest/components/chat-panel-messages.json +52 -0
- package/manifest/components/chat-panel-typing.json +52 -0
- package/manifest/components/chat-panel-user-message.json +52 -0
- package/manifest/components/chat-panel.json +58 -0
- package/manifest/components/checkbox-group.json +70 -0
- package/manifest/components/checkbox.json +106 -0
- package/manifest/components/checkpoint-history.json +91 -0
- package/manifest/components/chip.json +174 -0
- package/manifest/components/clamp.json +125 -0
- package/manifest/components/cli-tool-icon.json +46 -0
- package/manifest/components/code-block.json +107 -0
- package/manifest/components/code-diff.json +104 -0
- package/manifest/components/code-runner.json +124 -0
- package/manifest/components/collapsible.json +133 -0
- package/manifest/components/color-area.json +62 -0
- package/manifest/components/color-field.json +91 -0
- package/manifest/components/color-picker.json +235 -0
- package/manifest/components/color-slider.json +84 -0
- package/manifest/components/color-swatch.json +79 -0
- package/manifest/components/colors-section.json +70 -0
- package/manifest/components/combobox.json +265 -0
- package/manifest/components/command-palette.json +222 -0
- package/manifest/components/compaction-row.json +128 -0
- package/manifest/components/comparison-card.json +98 -0
- package/manifest/components/composer-actions.json +65 -0
- package/manifest/components/composer-attach-button.json +65 -0
- package/manifest/components/composer-attachment-chip.json +83 -0
- package/manifest/components/composer-attachments.json +60 -0
- package/manifest/components/composer-bar.json +76 -0
- package/manifest/components/composer-command-item.json +85 -0
- package/manifest/components/composer-context.json +71 -0
- package/manifest/components/composer-input.json +77 -0
- package/manifest/components/composer-menu-item.json +75 -0
- package/manifest/components/composer-menu.json +89 -0
- package/manifest/components/composer-model-item.json +82 -0
- package/manifest/components/composer-model-trigger.json +81 -0
- package/manifest/components/composer-person-item.json +86 -0
- package/manifest/components/composer-send.json +86 -0
- package/manifest/components/composer-toolbar.json +65 -0
- package/manifest/components/composer-voice-button.json +71 -0
- package/manifest/components/composer-voice.json +81 -0
- package/manifest/components/composer.json +238 -0
- package/manifest/components/computer-use.json +98 -0
- package/manifest/components/confidence-marker.json +86 -0
- package/manifest/components/connection-state.json +103 -0
- package/manifest/components/container.json +75 -0
- package/manifest/components/context-breakdown.json +72 -0
- package/manifest/components/context-menu.json +134 -0
- package/manifest/components/context-usage.json +98 -0
- package/manifest/components/conversation-search.json +111 -0
- package/manifest/components/copy-button.json +118 -0
- package/manifest/components/cost-meter.json +84 -0
- package/manifest/components/cue-logotype.json +110 -0
- package/manifest/components/cue-mark.json +111 -0
- package/manifest/components/cue-portal-frame.json +65 -0
- package/manifest/components/data-row.json +222 -0
- package/manifest/components/data-table-pagination.json +97 -0
- package/manifest/components/data-table-toolbar.json +127 -0
- package/manifest/components/data-tree.json +185 -0
- package/manifest/components/date-field.json +93 -0
- package/manifest/components/date-picker.json +255 -0
- package/manifest/components/date-range-picker.json +255 -0
- package/manifest/components/day-separator.json +63 -0
- package/manifest/components/delegation-card.json +196 -0
- package/manifest/components/density.json +93 -0
- package/manifest/components/description-list.json +91 -0
- package/manifest/components/diagram.json +126 -0
- package/manifest/components/dialog.json +222 -0
- package/manifest/components/disclosure.json +134 -0
- package/manifest/components/dmx-bar.json +107 -0
- package/manifest/components/dmx-strip.json +117 -0
- package/manifest/components/document-reference.json +108 -0
- package/manifest/components/draft-restore.json +96 -0
- package/manifest/components/drawer.json +204 -0
- package/manifest/components/dropdown-menu.json +275 -0
- package/manifest/components/edit-message.json +131 -0
- package/manifest/components/elements-command-palette.json +122 -0
- package/manifest/components/elements-composer.json +71 -0
- package/manifest/components/elements-data-table.json +75 -0
- package/manifest/components/elements-timeline.json +77 -0
- package/manifest/components/elicitation-form.json +130 -0
- package/manifest/components/empty-state-composer.json +71 -0
- package/manifest/components/empty-state-greeting.json +49 -0
- package/manifest/components/empty-state-suggestion.json +60 -0
- package/manifest/components/empty-state-suggestions.json +49 -0
- package/manifest/components/empty-state.json +111 -0
- package/manifest/components/end-of-turn-summary.json +89 -0
- package/manifest/components/env-var-input.json +194 -0
- package/manifest/components/error-state.json +93 -0
- package/manifest/components/export-dialog.json +101 -0
- package/manifest/components/eyebrow.json +59 -0
- package/manifest/components/feedback-dialog.json +133 -0
- package/manifest/components/field-description.json +66 -0
- package/manifest/components/field-error.json +87 -0
- package/manifest/components/field-label.json +66 -0
- package/manifest/components/field.json +82 -0
- package/manifest/components/file-tree.json +96 -0
- package/manifest/components/file-upload.json +204 -0
- package/manifest/components/flow-background.json +50 -0
- package/manifest/components/flow-controls.json +50 -0
- package/manifest/components/flow-graph.json +86 -0
- package/manifest/components/folder-icon.json +46 -0
- package/manifest/components/footer.json +133 -0
- package/manifest/components/frac.json +68 -0
- package/manifest/components/frames.json +210 -0
- package/manifest/components/generation-loader.json +78 -0
- package/manifest/components/generative-ui.json +125 -0
- package/manifest/components/grid.json +132 -0
- package/manifest/components/group-bar.json +122 -0
- package/manifest/components/guardrail-notice.json +109 -0
- package/manifest/components/hover-card.json +189 -0
- package/manifest/components/icon-button.json +106 -0
- package/manifest/components/image-generation.json +73 -0
- package/manifest/components/info-tip.json +133 -0
- package/manifest/components/inline-citation.json +90 -0
- package/manifest/components/input-group.json +112 -0
- package/manifest/components/input.json +121 -0
- package/manifest/components/inspector.json +199 -0
- package/manifest/components/item.json +163 -0
- package/manifest/components/job-progress.json +116 -0
- package/manifest/components/kbd.json +52 -0
- package/manifest/components/launcher-bubble.json +130 -0
- package/manifest/components/ledger.json +330 -0
- package/manifest/components/link.json +94 -0
- package/manifest/components/live-region-announcer.json +95 -0
- package/manifest/components/log-viewer.json +172 -0
- package/manifest/components/map-answer.json +97 -0
- package/manifest/components/markdown-text.json +126 -0
- package/manifest/components/math-block.json +84 -0
- package/manifest/components/mcp-server-icon.json +46 -0
- package/manifest/components/mcp-server-panel.json +102 -0
- package/manifest/components/memory-chips.json +73 -0
- package/manifest/components/menubar.json +184 -0
- package/manifest/components/message-actions.json +125 -0
- package/manifest/components/message-attachments.json +71 -0
- package/manifest/components/message-branches.json +83 -0
- package/manifest/components/message-list.json +121 -0
- package/manifest/components/message-pair.json +107 -0
- package/manifest/components/message-queue.json +85 -0
- package/manifest/components/message-timing.json +69 -0
- package/manifest/components/message.json +149 -0
- package/manifest/components/meter.json +150 -0
- package/manifest/components/mobile-composer.json +163 -0
- package/manifest/components/model-picker.json +87 -0
- package/manifest/components/multi-select.json +255 -0
- package/manifest/components/musical-time-input.json +141 -0
- package/manifest/components/navigation-menu.json +269 -0
- package/manifest/components/node-card.json +144 -0
- package/manifest/components/node-handle.json +84 -0
- package/manifest/components/number-field.json +131 -0
- package/manifest/components/number-ticker.json +67 -0
- package/manifest/components/onboarding.json +100 -0
- package/manifest/components/otp-field.json +163 -0
- package/manifest/components/page-shell.json +129 -0
- package/manifest/components/pagination.json +108 -0
- package/manifest/components/panel-header.json +89 -0
- package/manifest/components/panel.json +71 -0
- package/manifest/components/password-input.json +171 -0
- package/manifest/components/permission-grant.json +115 -0
- package/manifest/components/permission-scopes.json +184 -0
- package/manifest/components/piano-keyboard.json +149 -0
- package/manifest/components/plussie.json +140 -0
- package/manifest/components/popover.json +231 -0
- package/manifest/components/preset-section.json +80 -0
- package/manifest/components/preview.json +294 -0
- package/manifest/components/progress.json +114 -0
- package/manifest/components/prompt-library.json +122 -0
- package/manifest/components/queue-dock.json +139 -0
- package/manifest/components/quota-banner.json +113 -0
- package/manifest/components/quote-reply.json +129 -0
- package/manifest/components/radio-group.json +83 -0
- package/manifest/components/radio.json +94 -0
- package/manifest/components/rating.json +188 -0
- package/manifest/components/read-aloud.json +139 -0
- package/manifest/components/reasoning-effort.json +95 -0
- package/manifest/components/reasoning-panel.json +135 -0
- package/manifest/components/recommendation-card.json +133 -0
- package/manifest/components/regenerate-menu.json +107 -0
- package/manifest/components/replay-player.json +124 -0
- package/manifest/components/research-report.json +87 -0
- package/manifest/components/resizable.json +91 -0
- package/manifest/components/retrieval-chunks.json +98 -0
- package/manifest/components/revert-dock.json +197 -0
- package/manifest/components/reviewable-diff.json +113 -0
- package/manifest/components/risk-badge.json +89 -0
- package/manifest/components/row.json +122 -0
- package/manifest/components/schedule-card.json +121 -0
- package/manifest/components/score-breakdown.json +108 -0
- package/manifest/components/scroll-anchor.json +84 -0
- package/manifest/components/scroll-area.json +114 -0
- package/manifest/components/scrollable-tabs-list.json +91 -0
- package/manifest/components/scrub-input.json +268 -0
- package/manifest/components/seam-cell.json +91 -0
- package/manifest/components/seam-grid.json +84 -0
- package/manifest/components/seam-list.json +56 -0
- package/manifest/components/search-input.json +195 -0
- package/manifest/components/section-header.json +140 -0
- package/manifest/components/segmented-control.json +178 -0
- package/manifest/components/select.json +253 -0
- package/manifest/components/separator.json +56 -0
- package/manifest/components/settings-panel.json +152 -0
- package/manifest/components/shape-section.json +70 -0
- package/manifest/components/shared-conversation.json +107 -0
- package/manifest/components/sheet.json +210 -0
- package/manifest/components/shimmer-label.json +61 -0
- package/manifest/components/sidebar.json +245 -0
- package/manifest/components/signal-edge.json +56 -0
- package/manifest/components/skeleton.json +46 -0
- package/manifest/components/skill-icon.json +46 -0
- package/manifest/components/slider.json +106 -0
- package/manifest/components/sources.json +97 -0
- package/manifest/components/sparkline.json +89 -0
- package/manifest/components/speaker-identity.json +66 -0
- package/manifest/components/spec-sheet.json +93 -0
- package/manifest/components/spectrum-visualizer.json +147 -0
- package/manifest/components/spinner.json +71 -0
- package/manifest/components/stack-icon.json +46 -0
- package/manifest/components/stack.json +143 -0
- package/manifest/components/stacks-matrix-icon.json +46 -0
- package/manifest/components/stat.json +111 -0
- package/manifest/components/status-bar.json +233 -0
- package/manifest/components/status-dot.json +97 -0
- package/manifest/components/stepper.json +107 -0
- package/manifest/components/stopped-run.json +97 -0
- package/manifest/components/streaming-text.json +82 -0
- package/manifest/components/sub.json +45 -0
- package/manifest/components/subagent-list.json +106 -0
- package/manifest/components/suggestions.json +106 -0
- package/manifest/components/sup.json +45 -0
- package/manifest/components/swap-label.json +86 -0
- package/manifest/components/switch.json +102 -0
- package/manifest/components/table-scroll-region.json +78 -0
- package/manifest/components/table.json +306 -0
- package/manifest/components/tabs.json +156 -0
- package/manifest/components/tags-input.json +255 -0
- package/manifest/components/tail-status.json +138 -0
- package/manifest/components/terminal-block.json +111 -0
- package/manifest/components/terminal-frame.json +146 -0
- package/manifest/components/textarea.json +104 -0
- package/manifest/components/theme-configurator.json +158 -0
- package/manifest/components/theme-provider.json +228 -0
- package/manifest/components/thinking-indicator.json +69 -0
- package/manifest/components/thread-list.json +87 -0
- package/manifest/components/thread-search.json +108 -0
- package/manifest/components/threshold-rail.json +223 -0
- package/manifest/components/time-boundary.json +68 -0
- package/manifest/components/time-field.json +93 -0
- package/manifest/components/timeline-ruler.json +178 -0
- package/manifest/components/timeline.json +131 -0
- package/manifest/components/title-bar.json +97 -0
- package/manifest/components/toast.json +140 -0
- package/manifest/components/todo-list.json +76 -0
- package/manifest/components/toggle-group.json +134 -0
- package/manifest/components/toggle.json +140 -0
- package/manifest/components/token-editor.json +106 -0
- package/manifest/components/tool-call-card.json +268 -0
- package/manifest/components/tool-call.json +147 -0
- package/manifest/components/tool-error.json +141 -0
- package/manifest/components/tool-group.json +97 -0
- package/manifest/components/tool-timeline.json +147 -0
- package/manifest/components/toolbar.json +192 -0
- package/manifest/components/tooltip.json +199 -0
- package/manifest/components/trace-waterfall.json +84 -0
- package/manifest/components/tree-visibility-toggle.json +99 -0
- package/manifest/components/tree.json +182 -0
- package/manifest/components/turn-footer.json +133 -0
- package/manifest/components/two-step-button.json +150 -0
- package/manifest/components/typing-indicator.json +60 -0
- package/manifest/components/universe-grid.json +155 -0
- package/manifest/components/unread-divider.json +58 -0
- package/manifest/components/usage-chart.json +162 -0
- package/manifest/components/verdict-row.json +106 -0
- package/manifest/components/voice-conversation.json +141 -0
- package/manifest/components/web-preview.json +105 -0
- package/manifest/components/web-search.json +108 -0
- package/manifest/components/work-collapse.json +125 -0
- package/manifest/fixtures.json +776 -0
- package/manifest/manifest.json +5037 -0
- package/manifest/tokens.json +288 -0
- package/package.json +278 -0
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { codeScroll, codeSurface, field, mono } from "./surfaces.js";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import Markdown from "react-markdown";
|
|
7
|
+
import rehypeSanitize from "rehype-sanitize";
|
|
8
|
+
//#region src/elements/markdown.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Every element this surface will ever render, written out rather than
|
|
11
|
+
* inherited.
|
|
12
|
+
*
|
|
13
|
+
* `hast-util-sanitize` ships a `defaultSchema` and every markdown renderer in
|
|
14
|
+
* the ecosystem spreads it. This one does not, on purpose: a spread schema
|
|
15
|
+
* means the set of tags cue vouches for is whatever a transitive dependency
|
|
16
|
+
* decided this week, and "what does this component render" stops being a
|
|
17
|
+
* question the source can answer. The list below *is* the documented subset —
|
|
18
|
+
* `MarkdownText`'s JSDoc quotes it, and a test asserts nothing outside it
|
|
19
|
+
* survives.
|
|
20
|
+
*
|
|
21
|
+
* Deliberately absent, and each for a reason: `input` (GFM task lists would
|
|
22
|
+
* put a control inside a transcript), `table` and friends (no GFM plugin is
|
|
23
|
+
* enabled, so the parser never produces them), `svg`/`math` (an untrusted
|
|
24
|
+
* vector is a script host in several browsers' history), `details`/`summary`
|
|
25
|
+
* (disclosure is a component, not a token stream), and every sectioning or
|
|
26
|
+
* embedding tag — `iframe`, `object`, `embed`, `script`, `style`, `form`.
|
|
27
|
+
*/
|
|
28
|
+
const ALLOWED_TAGS = [
|
|
29
|
+
"a",
|
|
30
|
+
"blockquote",
|
|
31
|
+
"br",
|
|
32
|
+
"code",
|
|
33
|
+
"del",
|
|
34
|
+
"em",
|
|
35
|
+
"h1",
|
|
36
|
+
"h2",
|
|
37
|
+
"h3",
|
|
38
|
+
"h4",
|
|
39
|
+
"h5",
|
|
40
|
+
"h6",
|
|
41
|
+
"hr",
|
|
42
|
+
"img",
|
|
43
|
+
"li",
|
|
44
|
+
"ol",
|
|
45
|
+
"p",
|
|
46
|
+
"pre",
|
|
47
|
+
"strong",
|
|
48
|
+
"ul"
|
|
49
|
+
];
|
|
50
|
+
/**
|
|
51
|
+
* The protocols a URL attribute may carry, on both `href` and `src`.
|
|
52
|
+
*
|
|
53
|
+
* Three, and no more. `javascript:` and `vbscript:` are the classic markdown
|
|
54
|
+
* injection; `data:` is the modern one — a `data:text/html` document inherits
|
|
55
|
+
* the embedding origin in enough places to be worth refusing outright rather
|
|
56
|
+
* than allow-listing image media types; `blob:` and `file:` reach the host's
|
|
57
|
+
* own storage. React's default markdown pipeline also permits `irc:`, `ircs:`
|
|
58
|
+
* and `xmpp:`, which hand an arbitrary string to an OS protocol handler. None
|
|
59
|
+
* of the three has ever been what an agent transcript needed.
|
|
60
|
+
*/
|
|
61
|
+
const ALLOWED_PROTOCOLS = [
|
|
62
|
+
"http",
|
|
63
|
+
"https",
|
|
64
|
+
"mailto"
|
|
65
|
+
];
|
|
66
|
+
/**
|
|
67
|
+
* The allow-list, as `rehype-sanitize` wants it.
|
|
68
|
+
*
|
|
69
|
+
* Attributes are enumerated per tag rather than globally: an element that is
|
|
70
|
+
* not listed here gets *no* attributes at all, which is what makes an event
|
|
71
|
+
* handler unreachable by construction instead of by deny-list. `code` may
|
|
72
|
+
* carry a `className`, and only one matching `language-…`, because that is how
|
|
73
|
+
* a fenced block's info string reaches {@link MarkdownTextProps.renderCodeBlock}.
|
|
74
|
+
*/
|
|
75
|
+
const SCHEMA = {
|
|
76
|
+
tagNames: [...ALLOWED_TAGS],
|
|
77
|
+
attributes: {
|
|
78
|
+
a: ["href", "title"],
|
|
79
|
+
img: [
|
|
80
|
+
"src",
|
|
81
|
+
"alt",
|
|
82
|
+
"title"
|
|
83
|
+
],
|
|
84
|
+
code: [["className", /^language-[\w+#.-]+$/]],
|
|
85
|
+
ol: ["start"],
|
|
86
|
+
"*": []
|
|
87
|
+
},
|
|
88
|
+
protocols: {
|
|
89
|
+
href: [...ALLOWED_PROTOCOLS],
|
|
90
|
+
src: [...ALLOWED_PROTOCOLS]
|
|
91
|
+
},
|
|
92
|
+
clobber: [
|
|
93
|
+
"ariaDescribedBy",
|
|
94
|
+
"ariaLabelledBy",
|
|
95
|
+
"id",
|
|
96
|
+
"name"
|
|
97
|
+
],
|
|
98
|
+
clobberPrefix: "cue-md-",
|
|
99
|
+
allowComments: false,
|
|
100
|
+
allowDoctypes: false,
|
|
101
|
+
strip: [
|
|
102
|
+
"script",
|
|
103
|
+
"style",
|
|
104
|
+
"iframe",
|
|
105
|
+
"object",
|
|
106
|
+
"embed",
|
|
107
|
+
"form"
|
|
108
|
+
]
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* The URL gate, applied after the schema has already checked the protocol.
|
|
112
|
+
*
|
|
113
|
+
* Two passes over the same value rather than one, because they fail
|
|
114
|
+
* differently: the schema drops the whole attribute when a protocol is not on
|
|
115
|
+
* the list, while this runs on what is left and answers with a value rather
|
|
116
|
+
* than a decision, so a relative href (`./run/42`) survives and a scheme-less
|
|
117
|
+
* `//evil.example` does not.
|
|
118
|
+
*/
|
|
119
|
+
function safeUrl(value) {
|
|
120
|
+
const url = value.trim();
|
|
121
|
+
if (url.startsWith("//")) return "";
|
|
122
|
+
const colon = url.indexOf(":");
|
|
123
|
+
const slash = url.indexOf("/");
|
|
124
|
+
const question = url.indexOf("?");
|
|
125
|
+
const hash = url.indexOf("#");
|
|
126
|
+
if (colon === -1 || slash !== -1 && colon > slash || question !== -1 && colon > question || hash !== -1 && colon > hash) return url;
|
|
127
|
+
return ALLOWED_PROTOCOLS.includes(url.slice(0, colon).toLowerCase()) ? url : "";
|
|
128
|
+
}
|
|
129
|
+
/** A fence line: three or more backticks or tildes, indented at most three. */
|
|
130
|
+
const FENCE = /^ {0,3}(`{3,}|~{3,})/;
|
|
131
|
+
/** Whether a character can sit next to a delimiter run without closing a word. */
|
|
132
|
+
function isBoundary(char) {
|
|
133
|
+
return char === "" || /[\s!-/:-@[-`{-~]/.test(char);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Where the last block of `source` begins: after the final blank line that is
|
|
137
|
+
* not inside a fence.
|
|
138
|
+
*
|
|
139
|
+
* Sealing is confined to that block. Everything above it has already been
|
|
140
|
+
* followed by a blank line, which means the parser has settled it and nothing
|
|
141
|
+
* a later token brings can change how it renders.
|
|
142
|
+
*/
|
|
143
|
+
function lastBlock(source) {
|
|
144
|
+
const lines = source.split("\n");
|
|
145
|
+
let openFence = null;
|
|
146
|
+
let start = 0;
|
|
147
|
+
let offset = 0;
|
|
148
|
+
for (const line of lines) {
|
|
149
|
+
const fence = FENCE.exec(line)?.[1];
|
|
150
|
+
if (openFence === null) {
|
|
151
|
+
if (fence !== void 0) openFence = fence;
|
|
152
|
+
else if (line.trim() === "") start = offset + line.length + 1;
|
|
153
|
+
} else if (fence !== void 0 && line.trim().startsWith(openFence)) openFence = null;
|
|
154
|
+
offset += line.length + 1;
|
|
155
|
+
}
|
|
156
|
+
return {
|
|
157
|
+
start: Math.min(start, source.length),
|
|
158
|
+
openFence
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Hide the markdown token the model is still typing.
|
|
163
|
+
*
|
|
164
|
+
* Streaming markdown is not malformed markdown — CommonMark has an answer for
|
|
165
|
+
* every truncation, and that answer is the problem. `**bo` is a paragraph
|
|
166
|
+
* containing two literal asterisks; three frames later it is bold text and the
|
|
167
|
+
* asterisks are gone. The visible result is punctuation flickering through
|
|
168
|
+
* every emphasis, link and code span as it arrives, and a reflow behind it.
|
|
169
|
+
*
|
|
170
|
+
* So the trailing *syntax* of an unfinished construct is removed while the
|
|
171
|
+
* words it wraps are kept: text appears at the moment the model writes it and
|
|
172
|
+
* only its formatting is deferred to the closing token. Six rules, and the list
|
|
173
|
+
* is exhaustive because everything else in CommonMark either settles on the
|
|
174
|
+
* line it starts on (headings, rules, list markers) or renders the same
|
|
175
|
+
* truncated as finished (block quotes, paragraphs).
|
|
176
|
+
*
|
|
177
|
+
* 1. An unterminated fenced block is closed with a fence matching the one that
|
|
178
|
+
* opened it, and a lone backtick or two on its last line — the closing fence
|
|
179
|
+
* mid-keystroke — is dropped rather than shown as code.
|
|
180
|
+
* 2. An odd inline-code run has its opener dropped.
|
|
181
|
+
* 3. `[label`, `[label]` and `[label](http` lose their brackets and their
|
|
182
|
+
* half-written destination, keeping `label`.
|
|
183
|
+
* 4. `<`, `<h`, `<https://ex` — a partial autolink loses its `<`.
|
|
184
|
+
* 5. An unmatched `*`, `_`, `**`, `__`, `~~` opener is dropped — only where it
|
|
185
|
+
* sits on a word boundary, so `snake_case` and `2 * 3` are left alone.
|
|
186
|
+
* 6. A delimiter run the stream *ends* on is dropped unless it exactly closed
|
|
187
|
+
* an open one, which is what makes the first frame of a bold run — a single
|
|
188
|
+
* `*` with nothing after it — invisible rather than literal.
|
|
189
|
+
*
|
|
190
|
+
* None of this is a second parser and none of it can widen what renders: every
|
|
191
|
+
* rule only ever *deletes* characters before the source reaches the pipeline in
|
|
192
|
+
* {@link MarkdownText}, so a sealed stream is sanitized by exactly the same
|
|
193
|
+
* three gates as a settled document.
|
|
194
|
+
*/
|
|
195
|
+
function sealStream(source) {
|
|
196
|
+
const { start, openFence } = lastBlock(source);
|
|
197
|
+
if (openFence !== null) {
|
|
198
|
+
const cut = source.lastIndexOf("\n");
|
|
199
|
+
const body = new RegExp(`^ {0,3}[${openFence[0]}]{1,2}$`).test(source.slice(cut + 1)) && cut !== -1 ? source.slice(0, cut + 1) : source;
|
|
200
|
+
return `${body}${body.endsWith("\n") ? "" : "\n"}${openFence}`;
|
|
201
|
+
}
|
|
202
|
+
const head = source.slice(0, start);
|
|
203
|
+
const tail = source.slice(start);
|
|
204
|
+
const erase = /* @__PURE__ */ new Set();
|
|
205
|
+
/** Indices of `[` (or of the `!` of `![`) with no `]` yet. */
|
|
206
|
+
const brackets = [];
|
|
207
|
+
/** Open emphasis runs, innermost last. */
|
|
208
|
+
const emphasis = [];
|
|
209
|
+
let code = null;
|
|
210
|
+
let autolink = null;
|
|
211
|
+
const eraseRun = (index, length) => {
|
|
212
|
+
for (let at = index; at < index + length; at += 1) erase.add(at);
|
|
213
|
+
};
|
|
214
|
+
let at = 0;
|
|
215
|
+
while (at < tail.length) {
|
|
216
|
+
const char = tail[at];
|
|
217
|
+
if (char === "\\") {
|
|
218
|
+
at += 2;
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
221
|
+
if (char === "`") {
|
|
222
|
+
let end = at;
|
|
223
|
+
while (tail[end] === "`") end += 1;
|
|
224
|
+
const length = end - at;
|
|
225
|
+
if (code === null) code = {
|
|
226
|
+
index: at,
|
|
227
|
+
length
|
|
228
|
+
};
|
|
229
|
+
else if (code.length === length) code = null;
|
|
230
|
+
at = end;
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
if (code !== null) {
|
|
234
|
+
at += 1;
|
|
235
|
+
continue;
|
|
236
|
+
}
|
|
237
|
+
if (char === "<") {
|
|
238
|
+
autolink = /^<[^\s<>]*$/.test(tail.slice(at)) ? at : null;
|
|
239
|
+
at += 1;
|
|
240
|
+
continue;
|
|
241
|
+
}
|
|
242
|
+
if (char === ">") {
|
|
243
|
+
autolink = null;
|
|
244
|
+
at += 1;
|
|
245
|
+
continue;
|
|
246
|
+
}
|
|
247
|
+
if (char === "[") {
|
|
248
|
+
brackets.push(tail[at - 1] === "!" ? at - 1 : at);
|
|
249
|
+
at += 1;
|
|
250
|
+
continue;
|
|
251
|
+
}
|
|
252
|
+
if (char === "]") {
|
|
253
|
+
const open = brackets.pop();
|
|
254
|
+
if (open === void 0) {
|
|
255
|
+
at += 1;
|
|
256
|
+
continue;
|
|
257
|
+
}
|
|
258
|
+
if (tail[at + 1] !== "(") {
|
|
259
|
+
if (at === tail.length - 1) {
|
|
260
|
+
eraseRun(open, tail[open] === "!" ? 2 : 1);
|
|
261
|
+
erase.add(at);
|
|
262
|
+
}
|
|
263
|
+
at += 1;
|
|
264
|
+
continue;
|
|
265
|
+
}
|
|
266
|
+
const close = tail.indexOf(")", at + 2);
|
|
267
|
+
if (close === -1) {
|
|
268
|
+
eraseRun(open, tail[open] === "!" ? 2 : 1);
|
|
269
|
+
eraseRun(at, tail.length - at);
|
|
270
|
+
at = tail.length;
|
|
271
|
+
continue;
|
|
272
|
+
}
|
|
273
|
+
at = close + 1;
|
|
274
|
+
continue;
|
|
275
|
+
}
|
|
276
|
+
if (char === "*" || char === "_" || char === "~") {
|
|
277
|
+
let end = at;
|
|
278
|
+
while (tail[end] === char) end += 1;
|
|
279
|
+
const length = end - at;
|
|
280
|
+
const before = at === 0 ? "" : tail[at - 1];
|
|
281
|
+
const after = tail[end] ?? "";
|
|
282
|
+
const opens = isBoundary(before) && after !== "" && !/\s/.test(after);
|
|
283
|
+
const closes = before !== "" && !/\s/.test(before);
|
|
284
|
+
const last = emphasis[emphasis.length - 1];
|
|
285
|
+
if (closes && last !== void 0 && last.char === char && last.length === length) emphasis.pop();
|
|
286
|
+
else if (opens) emphasis.push({
|
|
287
|
+
char,
|
|
288
|
+
index: at,
|
|
289
|
+
length
|
|
290
|
+
});
|
|
291
|
+
else if (end === tail.length) eraseRun(at, length);
|
|
292
|
+
at = end;
|
|
293
|
+
continue;
|
|
294
|
+
}
|
|
295
|
+
at += 1;
|
|
296
|
+
}
|
|
297
|
+
if (code !== null) eraseRun(code.index, code.length);
|
|
298
|
+
if (autolink !== null) erase.add(autolink);
|
|
299
|
+
for (const open of brackets) eraseRun(open, tail[open] === "!" ? 2 : 1);
|
|
300
|
+
for (const open of emphasis) eraseRun(open.index, open.length);
|
|
301
|
+
if (erase.size === 0) return source;
|
|
302
|
+
let sealed = "";
|
|
303
|
+
for (let index = 0; index < tail.length; index += 1) if (!erase.has(index)) sealed += tail[index];
|
|
304
|
+
return head + sealed;
|
|
305
|
+
}
|
|
306
|
+
/** The text and info string of a fenced block, read off its hast node. */
|
|
307
|
+
function readCodeBlock(node) {
|
|
308
|
+
const code = node?.children?.find((child) => child.tagName === "code");
|
|
309
|
+
const text = (code?.children ?? []).filter((child) => child.type === "text").map((child) => child.value ?? "").join("");
|
|
310
|
+
const classes = code?.properties?.["className"];
|
|
311
|
+
return {
|
|
312
|
+
language: (Array.isArray(classes) ? classes : []).map(String).find((name) => name.startsWith("language-"))?.slice(9),
|
|
313
|
+
code: text
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Model output, rendered.
|
|
318
|
+
*
|
|
319
|
+
* The one component in this library that turns a string into markup, and the
|
|
320
|
+
* only one that has to be argued for rather than described. Everywhere else —
|
|
321
|
+
* `Message`, `AskBox`, every element in this group — text is text: a string
|
|
322
|
+
* arrives from a model and is placed in the DOM as characters, because a
|
|
323
|
+
* component that quietly parsed it would put every consumer of this library one
|
|
324
|
+
* prompt away from an injection. This one parses, so it states in full what it
|
|
325
|
+
* will and will not do with what it is given.
|
|
326
|
+
*
|
|
327
|
+
* **Threat model.** The input is hostile. Assume the string was written by a
|
|
328
|
+
* model that was told to write it by a web page it fetched, a file it read, or
|
|
329
|
+
* a tool result it did not verify — the practical shape of prompt injection is
|
|
330
|
+
* not "the model turned evil", it is "the model faithfully relayed an
|
|
331
|
+
* attacker's bytes". Three things follow.
|
|
332
|
+
*
|
|
333
|
+
* - **No raw HTML, ever, and not by filtering it.** Markup in the source has no
|
|
334
|
+
* path to the DOM, and the first reason is an absence rather than a setting.
|
|
335
|
+
* `react-markdown` hands `remark-rehype` its own `allowDangerousHtml: true`
|
|
336
|
+
* and spreads it *over* whatever `remarkRehypeOptions` says, so the option
|
|
337
|
+
* cannot be turned off from here and `<img onerror=…>` does become a `raw`
|
|
338
|
+
* node. A `raw` node is a span of source text rather than an element, and the
|
|
339
|
+
* one thing that turns it into markup is `rehype-raw`. Nothing in this package
|
|
340
|
+
* depends on that plugin, and a test asserts it never will — so the string has
|
|
341
|
+
* no parser to reach. `rehype-sanitize` then drops the `raw` type outright,
|
|
342
|
+
* and react-markdown's own `skipHtml` removes whatever is left. Three gates,
|
|
343
|
+
* none of which is a deny-list of dangerous tags. A `<script>`, an
|
|
344
|
+
* `<iframe>`, an `<svg>` and an `onclick=` are all the same non-event: there
|
|
345
|
+
* is nothing in the tree for them to be.
|
|
346
|
+
* - **Attributes are enumerated, not filtered.** An element that is not in the
|
|
347
|
+
* schema renders nothing; an element that is renders only the attributes
|
|
348
|
+
* named beside it — `href`/`title` on a link, `src`/`alt`/`title` on an
|
|
349
|
+
* image, `language-…` on a `code`. No element in the subset accepts `id`,
|
|
350
|
+
* `style`, `srcset`, `formaction` or any `on*` handler, so none of them has
|
|
351
|
+
* an attribute to arrive on.
|
|
352
|
+
* - **URLs are allow-listed twice.** `http`, `https` and `mailto` on both
|
|
353
|
+
* `href` and `src`; a relative URL stays relative; everything else — a
|
|
354
|
+
* `javascript:` link, a `data:text/html` image, `vbscript:`, `blob:`,
|
|
355
|
+
* `file:`, `//host` — loses the attribute and leaves an inert element
|
|
356
|
+
* behind. Every link also carries `rel="noopener noreferrer nofollow"`,
|
|
357
|
+
* which is not a prop: reverse tabnabbing, referrer leakage of a private
|
|
358
|
+
* console URL, and SEO laundering through a transcript are all things a
|
|
359
|
+
* caller should not be able to turn off by accident.
|
|
360
|
+
*
|
|
361
|
+
* **The subset.** Paragraphs, ATX and setext headings, bullet and ordered
|
|
362
|
+
* lists, block quotes, thematic breaks, fenced and indented code, inline code,
|
|
363
|
+
* emphasis, strong, strikethrough, links, images, and hard breaks. No GFM
|
|
364
|
+
* plugin is enabled, so no tables, task lists, footnotes or autolink literals —
|
|
365
|
+
* an explicit `<https://…>` autolink still works. Fenced blocks are plain text
|
|
366
|
+
* unless {@link MarkdownTextProps.renderCodeBlock} is given.
|
|
367
|
+
*
|
|
368
|
+
* **Streaming.** Pass `streaming` while the turn is arriving and the token the
|
|
369
|
+
* model is halfway through typing is hidden rather than rendered as
|
|
370
|
+
* punctuation: no asterisks flickering through every bold run, no half-written
|
|
371
|
+
* URL, no fence that opens a code block one frame and closes it the next. The
|
|
372
|
+
* words appear as they arrive; only their formatting waits for the closing
|
|
373
|
+
* token.
|
|
374
|
+
*
|
|
375
|
+
* `react-markdown` and `rehype-sanitize` are optional peers of this subpath
|
|
376
|
+
* alone, which is why this component is not re-exported from
|
|
377
|
+
* `@cueplusplus/ui/elements`: a console that renders a transcript without
|
|
378
|
+
* markdown should install neither.
|
|
379
|
+
*
|
|
380
|
+
* @example
|
|
381
|
+
* <Message agent="researcher">
|
|
382
|
+
* <MarkdownText>{turn.text}</MarkdownText>
|
|
383
|
+
* </Message>
|
|
384
|
+
* @example
|
|
385
|
+
* <MarkdownText streaming={turn.status === "running"}>{turn.text}</MarkdownText>
|
|
386
|
+
* @example
|
|
387
|
+
* <MarkdownText renderCodeBlock={({ language, code }) => <Highlight lang={language} code={code} />}>
|
|
388
|
+
* {answer}
|
|
389
|
+
* </MarkdownText>
|
|
390
|
+
*/
|
|
391
|
+
const MarkdownText = React.forwardRef(function MarkdownText({ className, children, streaming = false, target = "_blank", headingLevel = 2, renderCodeBlock, ...elementProps }, ref) {
|
|
392
|
+
const source = streaming ? sealStream(children) : children;
|
|
393
|
+
const components = React.useMemo(() => markdownComponents({
|
|
394
|
+
target,
|
|
395
|
+
headingLevel,
|
|
396
|
+
renderCodeBlock
|
|
397
|
+
}), [
|
|
398
|
+
target,
|
|
399
|
+
headingLevel,
|
|
400
|
+
renderCodeBlock
|
|
401
|
+
]);
|
|
402
|
+
return /* @__PURE__ */ jsx("div", {
|
|
403
|
+
ref,
|
|
404
|
+
"data-slot": "markdown-text",
|
|
405
|
+
"data-streaming": streaming ? "" : void 0,
|
|
406
|
+
className: cn("flex min-w-0 flex-col gap-(--cue-space-3) text-(length:--cue-text-body) leading-(--cue-leading-ui) break-words whitespace-normal", className),
|
|
407
|
+
...elementProps,
|
|
408
|
+
children: /* @__PURE__ */ jsx(Markdown, {
|
|
409
|
+
components,
|
|
410
|
+
rehypePlugins: [[rehypeSanitize, SCHEMA]],
|
|
411
|
+
skipHtml: true,
|
|
412
|
+
urlTransform: safeUrl,
|
|
413
|
+
children: source
|
|
414
|
+
})
|
|
415
|
+
});
|
|
416
|
+
});
|
|
417
|
+
/** The tag → component map, rebuilt only when one of the three props changes. */
|
|
418
|
+
function markdownComponents(options) {
|
|
419
|
+
const { target, headingLevel, renderCodeBlock } = options;
|
|
420
|
+
const heading = (depth) => {
|
|
421
|
+
return `h${Math.min(headingLevel + depth - 1, 6)}`;
|
|
422
|
+
};
|
|
423
|
+
const HEADING_CLASS = [
|
|
424
|
+
"text-(length:--cue-text-title) font-medium",
|
|
425
|
+
"text-(length:--cue-text-emphasis) font-medium",
|
|
426
|
+
"text-(length:--cue-text-body) font-medium",
|
|
427
|
+
"text-(length:--cue-text-ui) font-medium",
|
|
428
|
+
"text-(length:--cue-text-ui) font-medium",
|
|
429
|
+
"text-(length:--cue-text-label) font-medium tracking-wide uppercase"
|
|
430
|
+
];
|
|
431
|
+
const Heading = (depth) => function MarkdownHeading({ children }) {
|
|
432
|
+
return React.createElement(heading(depth), {
|
|
433
|
+
"data-slot": "markdown-heading",
|
|
434
|
+
className: cn("m-0 text-fg", HEADING_CLASS[depth - 1])
|
|
435
|
+
}, children);
|
|
436
|
+
};
|
|
437
|
+
return {
|
|
438
|
+
h1: Heading(1),
|
|
439
|
+
h2: Heading(2),
|
|
440
|
+
h3: Heading(3),
|
|
441
|
+
h4: Heading(4),
|
|
442
|
+
h5: Heading(5),
|
|
443
|
+
h6: Heading(6),
|
|
444
|
+
p: ({ children }) => /* @__PURE__ */ jsx("p", {
|
|
445
|
+
"data-slot": "markdown-paragraph",
|
|
446
|
+
className: "m-0 text-fg",
|
|
447
|
+
children
|
|
448
|
+
}),
|
|
449
|
+
a: ({ children, href, title }) => /* @__PURE__ */ jsx("a", {
|
|
450
|
+
"data-slot": "markdown-link",
|
|
451
|
+
href: href === "" ? void 0 : href,
|
|
452
|
+
title,
|
|
453
|
+
target,
|
|
454
|
+
rel: "noopener noreferrer nofollow",
|
|
455
|
+
className: "text-accent underline underline-offset-2 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-solid focus-visible:outline-accent",
|
|
456
|
+
children
|
|
457
|
+
}),
|
|
458
|
+
strong: ({ children }) => /* @__PURE__ */ jsx("strong", {
|
|
459
|
+
"data-slot": "markdown-strong",
|
|
460
|
+
className: "font-medium text-fg",
|
|
461
|
+
children
|
|
462
|
+
}),
|
|
463
|
+
em: ({ children }) => /* @__PURE__ */ jsx("em", {
|
|
464
|
+
"data-slot": "markdown-emphasis",
|
|
465
|
+
className: "italic",
|
|
466
|
+
children
|
|
467
|
+
}),
|
|
468
|
+
del: ({ children }) => /* @__PURE__ */ jsx("del", {
|
|
469
|
+
"data-slot": "markdown-strike",
|
|
470
|
+
className: "text-fg-muted line-through",
|
|
471
|
+
children
|
|
472
|
+
}),
|
|
473
|
+
ul: ({ children }) => /* @__PURE__ */ jsx("ul", {
|
|
474
|
+
"data-slot": "markdown-list",
|
|
475
|
+
className: "m-0 flex list-disc flex-col gap-(--cue-space-1) ps-(--cue-space-5)",
|
|
476
|
+
children
|
|
477
|
+
}),
|
|
478
|
+
ol: ({ children, start }) => /* @__PURE__ */ jsx("ol", {
|
|
479
|
+
"data-slot": "markdown-list",
|
|
480
|
+
start,
|
|
481
|
+
className: "m-0 flex list-decimal flex-col gap-(--cue-space-1) ps-(--cue-space-5)",
|
|
482
|
+
children
|
|
483
|
+
}),
|
|
484
|
+
li: ({ children }) => /* @__PURE__ */ jsx("li", {
|
|
485
|
+
"data-slot": "markdown-item",
|
|
486
|
+
className: "marker:text-fg-subtle",
|
|
487
|
+
children
|
|
488
|
+
}),
|
|
489
|
+
blockquote: ({ children }) => /* @__PURE__ */ jsx("blockquote", {
|
|
490
|
+
"data-slot": "markdown-quote",
|
|
491
|
+
className: "m-0 flex flex-col gap-(--cue-space-2) border-s-2 border-border ps-(--cue-space-3) text-fg-muted",
|
|
492
|
+
children
|
|
493
|
+
}),
|
|
494
|
+
hr: () => /* @__PURE__ */ jsx("hr", {
|
|
495
|
+
"data-slot": "markdown-rule",
|
|
496
|
+
className: "my-(--cue-space-1) border-t border-border"
|
|
497
|
+
}),
|
|
498
|
+
img: ({ src, alt, title }) => /* @__PURE__ */ jsx("img", {
|
|
499
|
+
"data-slot": "markdown-image",
|
|
500
|
+
src: src === "" ? void 0 : src,
|
|
501
|
+
alt: alt ?? "",
|
|
502
|
+
title,
|
|
503
|
+
loading: "lazy",
|
|
504
|
+
decoding: "async",
|
|
505
|
+
referrerPolicy: "no-referrer",
|
|
506
|
+
className: "max-w-full rounded-(--radius-control) border border-border"
|
|
507
|
+
}),
|
|
508
|
+
code: ({ children, className: codeClass }) => /* @__PURE__ */ jsx("code", {
|
|
509
|
+
"data-slot": "markdown-code",
|
|
510
|
+
className: cn(mono, "rounded-(--radius-control) [pre_&]:rounded-none [pre_&]:bg-transparent [pre_&]:px-0 [pre_&]:py-0", field, "px-[0.35em] py-[0.1em]", codeClass),
|
|
511
|
+
children
|
|
512
|
+
}),
|
|
513
|
+
pre: ({ children, node }) => {
|
|
514
|
+
const block = readCodeBlock(node);
|
|
515
|
+
return /* @__PURE__ */ jsx("pre", {
|
|
516
|
+
"data-slot": "markdown-code-block",
|
|
517
|
+
"data-language": block.language,
|
|
518
|
+
className: cn("m-0 rounded-(--radius-control) border border-border p-(--cue-space-3)", field, codeScroll),
|
|
519
|
+
children: renderCodeBlock === void 0 ? children : /* @__PURE__ */ jsx("span", {
|
|
520
|
+
className: codeSurface,
|
|
521
|
+
children: renderCodeBlock(block)
|
|
522
|
+
})
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
//#endregion
|
|
528
|
+
export { MarkdownText };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/math-block.d.ts
|
|
3
|
+
/** One line of the working: the expression, and what was done to reach it. */
|
|
4
|
+
interface MathStep {
|
|
5
|
+
/** The maths itself, as nodes — text, `Frac`, `Sup`, `Sub`. Set in serif italic. */
|
|
6
|
+
expression: React.ReactNode;
|
|
7
|
+
/** What justifies the step, in mono beneath it. Omit for a line that needs no gloss. */
|
|
8
|
+
note?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Rendered expressions with the working shown, one step at a time.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* import { MathBlock, Frac, Sup } from "@cueplusplus/ui/elements";
|
|
15
|
+
*
|
|
16
|
+
* <MathBlock label="derivation" steps={steps} visibleSteps={2} />
|
|
17
|
+
*/
|
|
18
|
+
declare function MathBlock({ label, steps, visibleSteps, className, ...props }: Omit<ComponentProps<"div">, "children" | "label" | "steps" | "visibleSteps"> & {
|
|
19
|
+
/** Optional eyebrow above the working. */
|
|
20
|
+
label?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Each step is a node, so you compose expressions from the exported Frac, Sup, and
|
|
23
|
+
* Sub helpers rather than passing a string to parse.
|
|
24
|
+
*/
|
|
25
|
+
steps: readonly MathStep[];
|
|
26
|
+
/** How much of the derivation has been shown. */
|
|
27
|
+
visibleSteps: number;
|
|
28
|
+
}): import("react").JSX.Element;
|
|
29
|
+
/**
|
|
30
|
+
* A fraction inside an expression — numerator, rule, denominator — set inline and
|
|
31
|
+
* aligned to the middle.
|
|
32
|
+
*/
|
|
33
|
+
declare function Frac({ over, under }: {
|
|
34
|
+
/** Numerator. */
|
|
35
|
+
over: React.ReactNode;
|
|
36
|
+
/** Denominator. */
|
|
37
|
+
under: React.ReactNode;
|
|
38
|
+
}): import("react").JSX.Element;
|
|
39
|
+
/**
|
|
40
|
+
* A superscript inside an expression: an exponent or an index, set upright inside the
|
|
41
|
+
* italic.
|
|
42
|
+
*/
|
|
43
|
+
declare function Sup({ children }: {
|
|
44
|
+
children: React.ReactNode;
|
|
45
|
+
}): import("react").JSX.Element;
|
|
46
|
+
/** A subscript inside an expression: a bound or a label, set upright inside the italic. */
|
|
47
|
+
declare function Sub({ children }: {
|
|
48
|
+
children: React.ReactNode;
|
|
49
|
+
}): import("react").JSX.Element;
|
|
50
|
+
//#endregion
|
|
51
|
+
export { Frac, MathBlock, MathStep, Sub, Sup };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { paper } from "./surfaces.js";
|
|
4
|
+
import { take } from "./range.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/elements/math-block.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Rendered expressions with the working shown, one step at a time.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* import { MathBlock, Frac, Sup } from "@cueplusplus/ui/elements";
|
|
12
|
+
*
|
|
13
|
+
* <MathBlock label="derivation" steps={steps} visibleSteps={2} />
|
|
14
|
+
*/
|
|
15
|
+
function MathBlock({ label, steps, visibleSteps, className, ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
17
|
+
"data-slot": "math-block",
|
|
18
|
+
className: cn(paper, "flex w-full max-w-sm flex-col gap-2.5 rounded-(--radius-overlay) p-4", className),
|
|
19
|
+
...props,
|
|
20
|
+
children: [label && /* @__PURE__ */ jsx("span", {
|
|
21
|
+
className: cn("font-mono text-(length:--cue-text-label) tracking-tight", "text-fg-subtle"),
|
|
22
|
+
children: label
|
|
23
|
+
}), take(steps, visibleSteps).map((step, i) => /* @__PURE__ */ jsxs("div", {
|
|
24
|
+
className: "cue-elements-fade-in cue-elements-slide-in-from-bottom-1 cue-elements-animate-in cue-elements-fill-mode-both flex flex-col gap-1 duration-300",
|
|
25
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
26
|
+
className: "text-fg overflow-x-auto py-1 text-center font-serif text-(length:--cue-text-emphasis) leading-(--cue-leading-ui) italic",
|
|
27
|
+
children: step.expression
|
|
28
|
+
}), step.note && /* @__PURE__ */ jsx("span", {
|
|
29
|
+
className: cn("font-mono text-(length:--cue-text-label) tracking-tight", "text-fg-subtle text-center"),
|
|
30
|
+
children: step.note
|
|
31
|
+
})]
|
|
32
|
+
}, i))]
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A fraction inside an expression — numerator, rule, denominator — set inline and
|
|
37
|
+
* aligned to the middle.
|
|
38
|
+
*/
|
|
39
|
+
function Frac({ over, under }) {
|
|
40
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
41
|
+
"data-slot": "frac",
|
|
42
|
+
className: "inline-flex flex-col items-center align-middle text-[0.85em] leading-tight",
|
|
43
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
44
|
+
className: "px-1",
|
|
45
|
+
children: over
|
|
46
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
47
|
+
className: "border-border-strong w-full border-t px-1",
|
|
48
|
+
children: under
|
|
49
|
+
})]
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* A superscript inside an expression: an exponent or an index, set upright inside the
|
|
54
|
+
* italic.
|
|
55
|
+
*/
|
|
56
|
+
function Sup({ children }) {
|
|
57
|
+
return /* @__PURE__ */ jsx("sup", {
|
|
58
|
+
className: "text-[0.65em] not-italic",
|
|
59
|
+
children
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/** A subscript inside an expression: a bound or a label, set upright inside the italic. */
|
|
63
|
+
function Sub({ children }) {
|
|
64
|
+
return /* @__PURE__ */ jsx("sub", {
|
|
65
|
+
className: "text-[0.65em] not-italic",
|
|
66
|
+
children
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
//#endregion
|
|
70
|
+
export { Frac, MathBlock, Sub, Sup };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/mcp-server-panel.d.ts
|
|
3
|
+
type McpServerStatus = "connected" | "connecting" | "needs-auth" | "failed";
|
|
4
|
+
interface McpServer {
|
|
5
|
+
/** Stable identity, reported back by onToggle and onAuthorize. */
|
|
6
|
+
id: string;
|
|
7
|
+
/** Server name as configured. */
|
|
8
|
+
name: string;
|
|
9
|
+
/** How the server is reached: stdio, sse, streamable-http. */
|
|
10
|
+
transport: string;
|
|
11
|
+
/** Drives the status dot and, for needs-auth, surfaces the authorize action. */
|
|
12
|
+
status: McpServerStatus;
|
|
13
|
+
/** Tool names the server contributed, counted collapsed and listed expanded. */
|
|
14
|
+
tools: readonly string[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Which servers are connected, what each one brought, and which is still waiting on
|
|
18
|
+
* you.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* import { McpServerPanel } from "@cueplusplus/ui/elements";
|
|
22
|
+
*
|
|
23
|
+
* <McpServerPanel
|
|
24
|
+
* servers={servers}
|
|
25
|
+
* expandedId={expandedId}
|
|
26
|
+
* onToggle={setExpandedId}
|
|
27
|
+
* onAuthorize={startOAuth}
|
|
28
|
+
* />
|
|
29
|
+
*/
|
|
30
|
+
declare function McpServerPanel({ servers, expandedId, onToggle, onAuthorize, className, ...props }: Omit<ComponentProps<"div">, "children" | "servers" | "expandedId" | "onToggle" | "onAuthorize"> & {
|
|
31
|
+
/** Every configured server, connected or not. The header counts how many are live. */
|
|
32
|
+
servers: readonly McpServer[];
|
|
33
|
+
/** Which server is open. Only one expands at a time; omit for an all-collapsed list. */
|
|
34
|
+
expandedId?: string;
|
|
35
|
+
/** Called when a server row is expanded or collapsed. */
|
|
36
|
+
onToggle?: (id: string) => void;
|
|
37
|
+
/** Called from the Authorize button, shown only while a server needs auth. */
|
|
38
|
+
onAuthorize?: (id: string) => void;
|
|
39
|
+
}): import("react").JSX.Element;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { McpServer, McpServerPanel, McpServerStatus };
|