@cueplusplus/ui 0.2.0 → 0.5.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 +2250 -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 +1 -1
- package/dist/brand/cue-mark.d.ts +1 -1
- package/dist/brand/cue-mark.js +1 -1
- package/dist/chat/index.d.ts +2 -2
- package/dist/chat/message-list.d.ts +6 -0
- package/dist/chat/message-list.js +35 -0
- package/dist/chrome/_edge-scroller.js +12 -1
- package/dist/chrome/_tabs-scroll.d.ts +1 -1
- package/dist/chrome/_tabs-scroll.js +1 -1
- package/dist/chrome/app-shell.d.ts +52 -2
- package/dist/chrome/app-shell.js +80 -8
- package/dist/chrome/index.d.ts +2 -2
- package/dist/configurator/_export.js +3 -2
- package/dist/configurator/_overrides.d.ts +1 -1
- package/dist/configurator/_overrides.js +18 -6
- package/dist/configurator/token-editor.js +4 -1
- package/dist/date/_segments.js +37 -2
- 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 +121 -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 +107 -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/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 +9 -7
- package/dist/index.js +3 -2
- package/dist/instruments/index.d.ts +2 -2
- package/dist/instruments/index.js +2 -2
- package/dist/instruments/table.d.ts +14 -1
- package/dist/instruments/table.js +20 -1
- package/dist/instruments/two-step-button.js +25 -6
- package/dist/layout/sidebar.d.ts +19 -1
- package/dist/layout/sidebar.js +19 -1
- package/dist/primitives/button.js +11 -1
- package/dist/primitives/chip.d.ts +34 -8
- package/dist/primitives/chip.js +97 -11
- package/dist/styles.css +11 -1
- package/dist/system/agent-skin.d.ts +27 -0
- package/dist/system/agent-skin.js +20 -0
- package/dist/system/index.d.ts +3 -3
- package/dist/system/portal.d.ts +5 -3
- package/dist/system/portal.js +36 -8
- package/dist/system/prepaint.d.ts +20 -2
- package/dist/system/prepaint.js +39 -33
- package/dist/system/theme-provider.d.ts +13 -2
- package/dist/system/theme-provider.js +107 -26
- package/dist/system/use-density.d.ts +9 -0
- package/dist/system/use-density.js +9 -0
- package/dist/system/use-isomorphic-layout-effect.js +19 -1
- package/dist/theming/_presets.d.ts +1 -1
- package/dist/theming/_presets.js +124 -8
- package/dist/theming/contrast.d.ts +16 -4
- package/dist/theming/contrast.js +33 -6
- package/dist/theming/create-theme.d.ts +8 -4
- package/dist/theming/create-theme.js +56 -20
- package/dist/theming/serialize.d.ts +11 -2
- package/dist/theming/serialize.js +87 -9
- package/manifest/components/accordion.json +154 -0
- package/manifest/components/activity-graph.json +88 -0
- package/manifest/components/agent-card.json +120 -0
- package/manifest/components/agent-handoff.json +87 -0
- package/manifest/components/agent-mode-badge.json +84 -0
- package/manifest/components/agent-pile.json +116 -0
- package/manifest/components/agent-plan.json +67 -0
- package/manifest/components/agent-status.json +73 -0
- package/manifest/components/agent-surface.json +78 -0
- package/manifest/components/alert-dialog.json +190 -0
- package/manifest/components/animated-number.json +67 -0
- package/manifest/components/app-bar.json +244 -0
- package/manifest/components/app-shell.json +383 -0
- package/manifest/components/app-window-frame.json +102 -0
- package/manifest/components/approval-card.json +106 -0
- package/manifest/components/artifact-card.json +81 -0
- package/manifest/components/ask-box.json +209 -0
- package/manifest/components/audience-icon.json +52 -0
- package/manifest/components/autocomplete.json +197 -0
- package/manifest/components/avatar-group.json +72 -0
- package/manifest/components/avatar.json +95 -0
- package/manifest/components/background-inbox.json +71 -0
- package/manifest/components/branch-picker.json +124 -0
- package/manifest/components/breadcrumb.json +74 -0
- package/manifest/components/button-group.json +74 -0
- package/manifest/components/button.json +126 -0
- package/manifest/components/calendar.json +65 -0
- package/manifest/components/canvas-split-body.json +62 -0
- package/manifest/components/canvas-split-document.json +54 -0
- package/manifest/components/canvas-split-header.json +83 -0
- package/manifest/components/canvas-split-line.json +62 -0
- package/manifest/components/canvas-split-message.json +62 -0
- package/manifest/components/canvas-split-thread.json +54 -0
- package/manifest/components/canvas-split.json +60 -0
- package/manifest/components/card.json +140 -0
- package/manifest/components/carousel.json +200 -0
- package/manifest/components/catalogue-icon.json +52 -0
- package/manifest/components/channel-beta-icon.json +52 -0
- package/manifest/components/channel-matrix.json +173 -0
- package/manifest/components/channel-released-icon.json +52 -0
- package/manifest/components/chart-container.json +111 -0
- package/manifest/components/chart-ramp.json +72 -0
- package/manifest/components/chart-swatch.json +65 -0
- package/manifest/components/chart-tooltip-content.json +114 -0
- package/manifest/components/chart.json +93 -0
- package/manifest/components/chat-empty-state.json +55 -0
- package/manifest/components/chat-panel-assistant-message.json +51 -0
- package/manifest/components/chat-panel-composer.json +66 -0
- package/manifest/components/chat-panel-messages.json +51 -0
- package/manifest/components/chat-panel-typing.json +51 -0
- package/manifest/components/chat-panel-user-message.json +51 -0
- package/manifest/components/chat-panel.json +57 -0
- package/manifest/components/checkbox-group.json +68 -0
- package/manifest/components/checkbox.json +93 -0
- package/manifest/components/checkpoint-history.json +80 -0
- package/manifest/components/chip.json +144 -0
- package/manifest/components/clamp.json +102 -0
- package/manifest/components/cli-tool-icon.json +52 -0
- package/manifest/components/code-diff.json +87 -0
- package/manifest/components/code-runner.json +97 -0
- package/manifest/components/collapsible.json +120 -0
- package/manifest/components/color-area.json +59 -0
- package/manifest/components/color-field.json +79 -0
- package/manifest/components/color-picker.json +175 -0
- package/manifest/components/color-slider.json +75 -0
- package/manifest/components/color-swatch.json +68 -0
- package/manifest/components/colors-section.json +66 -0
- package/manifest/components/combobox.json +198 -0
- package/manifest/components/command-palette.json +177 -0
- package/manifest/components/compaction-row.json +100 -0
- package/manifest/components/comparison-card.json +83 -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 +75 -0
- package/manifest/components/composer-attachments.json +60 -0
- package/manifest/components/composer-bar.json +73 -0
- package/manifest/components/composer-command-item.json +79 -0
- package/manifest/components/composer-context.json +67 -0
- package/manifest/components/composer-input.json +73 -0
- package/manifest/components/composer-menu-item.json +72 -0
- package/manifest/components/composer-menu.json +79 -0
- package/manifest/components/composer-model-item.json +75 -0
- package/manifest/components/composer-model-trigger.json +75 -0
- package/manifest/components/composer-person-item.json +79 -0
- package/manifest/components/composer-send.json +80 -0
- package/manifest/components/composer-toolbar.json +65 -0
- package/manifest/components/composer-voice-button.json +68 -0
- package/manifest/components/composer-voice.json +75 -0
- package/manifest/components/composer.json +176 -0
- package/manifest/components/computer-use.json +84 -0
- package/manifest/components/confidence-marker.json +74 -0
- package/manifest/components/connection-state.json +84 -0
- package/manifest/components/container.json +60 -0
- package/manifest/components/context-breakdown.json +65 -0
- package/manifest/components/context-menu.json +121 -0
- package/manifest/components/context-usage.json +85 -0
- package/manifest/components/conversation-search.json +92 -0
- package/manifest/components/copy-button.json +93 -0
- package/manifest/components/cost-meter.json +74 -0
- package/manifest/components/cue-logotype.json +96 -0
- package/manifest/components/cue-mark.json +97 -0
- package/manifest/components/cue-portal-frame.json +55 -0
- package/manifest/components/data-table-pagination.json +83 -0
- package/manifest/components/data-table-toolbar.json +104 -0
- package/manifest/components/date-field.json +80 -0
- package/manifest/components/date-picker.json +191 -0
- package/manifest/components/date-range-picker.json +191 -0
- package/manifest/components/day-separator.json +58 -0
- package/manifest/components/delegation-card.json +144 -0
- package/manifest/components/density.json +58 -0
- package/manifest/components/description-list.json +84 -0
- package/manifest/components/diagram.json +100 -0
- package/manifest/components/dialog.json +198 -0
- package/manifest/components/disclosure.json +109 -0
- package/manifest/components/dmx-bar.json +94 -0
- package/manifest/components/dmx-strip.json +101 -0
- package/manifest/components/document-reference.json +90 -0
- package/manifest/components/draft-restore.json +82 -0
- package/manifest/components/drawer.json +179 -0
- package/manifest/components/dropdown-menu.json +229 -0
- package/manifest/components/edit-message.json +105 -0
- package/manifest/components/elements-command-palette.json +100 -0
- package/manifest/components/elements-composer.json +71 -0
- package/manifest/components/elements-data-table.json +68 -0
- package/manifest/components/elements-timeline.json +69 -0
- package/manifest/components/elicitation-form.json +103 -0
- package/manifest/components/empty-state-composer.json +64 -0
- package/manifest/components/empty-state-greeting.json +49 -0
- package/manifest/components/empty-state-suggestion.json +57 -0
- package/manifest/components/empty-state-suggestions.json +49 -0
- package/manifest/components/empty-state.json +90 -0
- package/manifest/components/end-of-turn-summary.json +77 -0
- package/manifest/components/env-var-input.json +150 -0
- package/manifest/components/error-state.json +80 -0
- package/manifest/components/export-dialog.json +84 -0
- package/manifest/components/eyebrow.json +56 -0
- package/manifest/components/feedback-dialog.json +107 -0
- package/manifest/components/field-description.json +63 -0
- package/manifest/components/field-error.json +77 -0
- package/manifest/components/field-label.json +63 -0
- package/manifest/components/field.json +79 -0
- package/manifest/components/file-tree.json +83 -0
- package/manifest/components/file-upload.json +159 -0
- package/manifest/components/flow-background.json +50 -0
- package/manifest/components/flow-controls.json +50 -0
- package/manifest/components/flow-graph.json +75 -0
- package/manifest/components/folder-icon.json +52 -0
- package/manifest/components/footer.json +112 -0
- package/manifest/components/frac.json +59 -0
- package/manifest/components/generation-loader.json +64 -0
- package/manifest/components/generative-ui.json +93 -0
- package/manifest/components/grid.json +81 -0
- package/manifest/components/group-bar.json +102 -0
- package/manifest/components/guardrail-notice.json +91 -0
- package/manifest/components/hover-card.json +151 -0
- package/manifest/components/icon-button.json +88 -0
- package/manifest/components/image-generation.json +67 -0
- package/manifest/components/info-tip.json +98 -0
- package/manifest/components/inline-citation.json +77 -0
- package/manifest/components/input-group.json +91 -0
- package/manifest/components/input.json +89 -0
- package/manifest/components/item.json +129 -0
- package/manifest/components/job-progress.json +96 -0
- package/manifest/components/kbd.json +52 -0
- package/manifest/components/launcher-bubble.json +105 -0
- package/manifest/components/link.json +81 -0
- package/manifest/components/live-region-announcer.json +79 -0
- package/manifest/components/log-viewer.json +139 -0
- package/manifest/components/map-answer.json +83 -0
- package/manifest/components/markdown-text.json +94 -0
- package/manifest/components/math-block.json +74 -0
- package/manifest/components/mcp-server-icon.json +52 -0
- package/manifest/components/mcp-server-panel.json +87 -0
- package/manifest/components/memory-chips.json +65 -0
- package/manifest/components/menubar.json +157 -0
- package/manifest/components/message-actions.json +99 -0
- package/manifest/components/message-attachments.json +63 -0
- package/manifest/components/message-branches.json +71 -0
- package/manifest/components/message-list.json +100 -0
- package/manifest/components/message-pair.json +86 -0
- package/manifest/components/message-queue.json +74 -0
- package/manifest/components/message-timing.json +62 -0
- package/manifest/components/message.json +116 -0
- package/manifest/components/meter.json +114 -0
- package/manifest/components/mobile-composer.json +126 -0
- package/manifest/components/model-picker.json +76 -0
- package/manifest/components/multi-select.json +190 -0
- package/manifest/components/musical-time-input.json +113 -0
- package/manifest/components/navigation-menu.json +226 -0
- package/manifest/components/node-card.json +109 -0
- package/manifest/components/node-handle.json +69 -0
- package/manifest/components/number-field.json +107 -0
- package/manifest/components/number-ticker.json +61 -0
- package/manifest/components/onboarding.json +84 -0
- package/manifest/components/otp-field.json +128 -0
- package/manifest/components/page-shell.json +96 -0
- package/manifest/components/pagination.json +92 -0
- package/manifest/components/panel-header.json +77 -0
- package/manifest/components/panel.json +71 -0
- package/manifest/components/password-input.json +119 -0
- package/manifest/components/permission-grant.json +92 -0
- package/manifest/components/permission-scopes.json +139 -0
- package/manifest/components/piano-keyboard.json +120 -0
- package/manifest/components/plussie.json +111 -0
- package/manifest/components/popover.json +193 -0
- package/manifest/components/preset-section.json +73 -0
- package/manifest/components/progress.json +95 -0
- package/manifest/components/prompt-library.json +99 -0
- package/manifest/components/queue-dock.json +110 -0
- package/manifest/components/quota-banner.json +94 -0
- package/manifest/components/quote-reply.json +105 -0
- package/manifest/components/radio-group.json +73 -0
- package/manifest/components/radio.json +80 -0
- package/manifest/components/rating.json +141 -0
- package/manifest/components/read-aloud.json +111 -0
- package/manifest/components/reasoning-effort.json +81 -0
- package/manifest/components/reasoning-panel.json +108 -0
- package/manifest/components/recommendation-card.json +107 -0
- package/manifest/components/regenerate-menu.json +89 -0
- package/manifest/components/replay-player.json +102 -0
- package/manifest/components/research-report.json +76 -0
- package/manifest/components/resizable.json +88 -0
- package/manifest/components/retrieval-chunks.json +84 -0
- package/manifest/components/revert-dock.json +150 -0
- package/manifest/components/reviewable-diff.json +93 -0
- package/manifest/components/risk-badge.json +74 -0
- package/manifest/components/row.json +109 -0
- package/manifest/components/schedule-card.json +101 -0
- package/manifest/components/score-breakdown.json +91 -0
- package/manifest/components/scroll-anchor.json +72 -0
- package/manifest/components/scroll-area.json +91 -0
- package/manifest/components/scrollable-tabs-list.json +83 -0
- package/manifest/components/scrub-input.json +200 -0
- package/manifest/components/seam-cell.json +75 -0
- package/manifest/components/seam-grid.json +75 -0
- package/manifest/components/seam-list.json +56 -0
- package/manifest/components/search-input.json +134 -0
- package/manifest/components/section-header.json +112 -0
- package/manifest/components/segmented-control.json +138 -0
- package/manifest/components/select.json +194 -0
- package/manifest/components/separator.json +53 -0
- package/manifest/components/settings-panel.json +118 -0
- package/manifest/components/shape-section.json +66 -0
- package/manifest/components/shared-conversation.json +89 -0
- package/manifest/components/sheet.json +186 -0
- package/manifest/components/shimmer-label.json +59 -0
- package/manifest/components/sidebar.json +198 -0
- package/manifest/components/signal-edge.json +56 -0
- package/manifest/components/skeleton.json +46 -0
- package/manifest/components/skill-icon.json +52 -0
- package/manifest/components/slider.json +89 -0
- package/manifest/components/sources.json +83 -0
- package/manifest/components/sparkline.json +76 -0
- package/manifest/components/speaker-identity.json +61 -0
- package/manifest/components/spec-sheet.json +80 -0
- package/manifest/components/spectrum-visualizer.json +115 -0
- package/manifest/components/spinner.json +61 -0
- package/manifest/components/stack-icon.json +52 -0
- package/manifest/components/stack.json +96 -0
- package/manifest/components/stacks-matrix-icon.json +52 -0
- package/manifest/components/stat.json +87 -0
- package/manifest/components/status-bar.json +58 -0
- package/manifest/components/status-dot.json +78 -0
- package/manifest/components/stepper.json +89 -0
- package/manifest/components/stopped-run.json +81 -0
- package/manifest/components/streaming-text.json +71 -0
- package/manifest/components/sub.json +44 -0
- package/manifest/components/subagent-list.json +88 -0
- package/manifest/components/suggestions.json +84 -0
- package/manifest/components/sup.json +44 -0
- package/manifest/components/swap-label.json +71 -0
- package/manifest/components/switch.json +87 -0
- package/manifest/components/table-scroll-region.json +69 -0
- package/manifest/components/table.json +155 -0
- package/manifest/components/tabs.json +145 -0
- package/manifest/components/tags-input.json +190 -0
- package/manifest/components/tail-status.json +109 -0
- package/manifest/components/terminal-block.json +91 -0
- package/manifest/components/terminal-frame.json +119 -0
- package/manifest/components/textarea.json +76 -0
- package/manifest/components/theme-configurator.json +124 -0
- package/manifest/components/theme-provider.json +134 -0
- package/manifest/components/thinking-indicator.json +63 -0
- package/manifest/components/thread-list.json +76 -0
- package/manifest/components/thread-search.json +90 -0
- package/manifest/components/threshold-rail.json +160 -0
- package/manifest/components/time-boundary.json +62 -0
- package/manifest/components/time-field.json +80 -0
- package/manifest/components/timeline-ruler.json +139 -0
- package/manifest/components/timeline.json +115 -0
- package/manifest/components/title-bar.json +82 -0
- package/manifest/components/toast.json +130 -0
- package/manifest/components/todo-list.json +69 -0
- package/manifest/components/toggle-group.json +106 -0
- package/manifest/components/toggle.json +109 -0
- package/manifest/components/token-editor.json +90 -0
- package/manifest/components/tool-call-card.json +200 -0
- package/manifest/components/tool-call.json +119 -0
- package/manifest/components/tool-error.json +114 -0
- package/manifest/components/tool-group.json +83 -0
- package/manifest/components/tool-timeline.json +119 -0
- package/manifest/components/toolbar.json +163 -0
- package/manifest/components/tooltip.json +164 -0
- package/manifest/components/trace-waterfall.json +74 -0
- package/manifest/components/tree-visibility-toggle.json +84 -0
- package/manifest/components/tree.json +140 -0
- package/manifest/components/turn-footer.json +105 -0
- package/manifest/components/two-step-button.json +113 -0
- package/manifest/components/typing-indicator.json +53 -0
- package/manifest/components/universe-grid.json +127 -0
- package/manifest/components/unread-divider.json +55 -0
- package/manifest/components/usage-chart.json +124 -0
- package/manifest/components/verdict-row.json +91 -0
- package/manifest/components/voice-conversation.json +109 -0
- package/manifest/components/web-preview.json +87 -0
- package/manifest/components/web-search.json +92 -0
- package/manifest/components/work-collapse.json +102 -0
- package/manifest/manifest.json +4779 -0
- package/manifest/tokens.json +159 -0
- package/package.json +54 -5
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/agent-plan.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* A checklist the agent works through, with progress you can glance.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* import { AgentPlan } from "@cueplusplus/ui/elements";
|
|
8
|
+
*
|
|
9
|
+
* <AgentPlan
|
|
10
|
+
* steps={["Read the file", "Draft the fix", "Run tests"]}
|
|
11
|
+
* activeIndex={1}
|
|
12
|
+
* />
|
|
13
|
+
*/
|
|
14
|
+
declare function AgentPlan({ steps, activeIndex, className, ...props }: Omit<ComponentProps<"div">, "children" | "steps" | "activeIndex"> & {
|
|
15
|
+
/** Checklist items the agent works through in order. */
|
|
16
|
+
steps: readonly string[];
|
|
17
|
+
/**
|
|
18
|
+
* Index of the step currently running. Values past the end mark every step done, and
|
|
19
|
+
* values before the start mark none.
|
|
20
|
+
*/
|
|
21
|
+
activeIndex: number;
|
|
22
|
+
}): import("react").JSX.Element;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { AgentPlan };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { mono } from "./surfaces.js";
|
|
4
|
+
import { pct, progressOf } from "./range.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { CheckIcon, Loader2Icon } from "lucide-react";
|
|
7
|
+
//#region src/elements/agent-plan.tsx
|
|
8
|
+
/**
|
|
9
|
+
* A checklist the agent works through, with progress you can glance.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* import { AgentPlan } from "@cueplusplus/ui/elements";
|
|
13
|
+
*
|
|
14
|
+
* <AgentPlan
|
|
15
|
+
* steps={["Read the file", "Draft the fix", "Run tests"]}
|
|
16
|
+
* activeIndex={1}
|
|
17
|
+
* />
|
|
18
|
+
*/
|
|
19
|
+
function AgentPlan({ steps, activeIndex, className, ...props }) {
|
|
20
|
+
const total = steps.length;
|
|
21
|
+
const completed = progressOf(activeIndex, total);
|
|
22
|
+
const allDone = completed >= total;
|
|
23
|
+
const progress = pct(completed, total);
|
|
24
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
25
|
+
"data-slot": "agent-plan",
|
|
26
|
+
className: cn("flex w-full max-w-sm flex-col gap-3", className),
|
|
27
|
+
...props,
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ jsxs("div", {
|
|
30
|
+
className: "flex items-center justify-between",
|
|
31
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
32
|
+
className: "text-(length:--cue-text-body) font-medium",
|
|
33
|
+
children: "Plan"
|
|
34
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
35
|
+
className: cn(mono, "text-fg-subtle tabular-nums"),
|
|
36
|
+
children: [
|
|
37
|
+
completed,
|
|
38
|
+
" of ",
|
|
39
|
+
total
|
|
40
|
+
]
|
|
41
|
+
})]
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ jsx("div", {
|
|
44
|
+
className: "bg-surface-2 h-[3px] w-full overflow-hidden rounded-full",
|
|
45
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
46
|
+
className: "bg-accent block h-full rounded-full transition-[width] duration-500",
|
|
47
|
+
style: { width: `${progress}%` }
|
|
48
|
+
})
|
|
49
|
+
}),
|
|
50
|
+
/* @__PURE__ */ jsx("ul", {
|
|
51
|
+
className: "flex flex-col gap-2.5",
|
|
52
|
+
children: steps.map((step, i) => {
|
|
53
|
+
const done = allDone || i < completed;
|
|
54
|
+
const active = !allDone && i === completed;
|
|
55
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
56
|
+
className: "flex items-center gap-2.5 text-(length:--cue-text-body)",
|
|
57
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
58
|
+
className: "flex size-4 shrink-0 items-center justify-center",
|
|
59
|
+
children: done ? /* @__PURE__ */ jsx(CheckIcon, { className: "text-fg-subtle size-3.5" }) : active ? /* @__PURE__ */ jsx(Loader2Icon, { className: "text-fg size-3.5 animate-spin motion-reduce:animate-none" }) : /* @__PURE__ */ jsx("span", {
|
|
60
|
+
"aria-hidden": true,
|
|
61
|
+
className: "bg-surface-3 size-1.5 rounded-full"
|
|
62
|
+
})
|
|
63
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
64
|
+
className: cn(done && "text-fg-subtle", active && "text-fg", !done && !active && "text-fg-subtle"),
|
|
65
|
+
children: step
|
|
66
|
+
})]
|
|
67
|
+
}, step);
|
|
68
|
+
})
|
|
69
|
+
})
|
|
70
|
+
]
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
export { AgentPlan };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/agent-status.d.ts
|
|
3
|
+
/** What the agent is doing: `working`, `waiting` on the user, or `done`. */
|
|
4
|
+
type AgentState = "working" | "waiting" | "done";
|
|
5
|
+
/** One step of an agent's run, for a surface that lists them rather than showing the last. */
|
|
6
|
+
interface StatusStep {
|
|
7
|
+
/** The step's own state, drawn as its glyph. */
|
|
8
|
+
state: AgentState;
|
|
9
|
+
/** What the step says. */
|
|
10
|
+
label: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* One pill that always answers: what is it doing, and for how long.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* import { AgentStatus } from "@cueplusplus/ui/elements";
|
|
17
|
+
*
|
|
18
|
+
* <AgentStatus state="working" label="Editing composer.tsx" elapsed="8s" />
|
|
19
|
+
*/
|
|
20
|
+
declare function AgentStatus({ state, label, elapsed, className, ...props }: Omit<ComponentProps<"div">, "children" | "state" | "label" | "elapsed"> & {
|
|
21
|
+
/** Visual mode of the pill: working, waiting, or done with a check. */
|
|
22
|
+
state: AgentState;
|
|
23
|
+
/** Short status line describing what the agent is doing. */
|
|
24
|
+
label: string;
|
|
25
|
+
/** Elapsed time shown in mono when provided. */
|
|
26
|
+
elapsed?: string;
|
|
27
|
+
}): import("react").JSX.Element;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { AgentState, AgentStatus, StatusStep };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { ghostButton, paper } from "./surfaces.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { CheckIcon, PauseIcon, RotateCcwIcon } from "lucide-react";
|
|
6
|
+
//#region src/elements/agent-status.tsx
|
|
7
|
+
/**
|
|
8
|
+
* One pill that always answers: what is it doing, and for how long.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* import { AgentStatus } from "@cueplusplus/ui/elements";
|
|
12
|
+
*
|
|
13
|
+
* <AgentStatus state="working" label="Editing composer.tsx" elapsed="8s" />
|
|
14
|
+
*/
|
|
15
|
+
function AgentStatus({ state, label, elapsed, className, ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
17
|
+
"data-slot": "agent-status",
|
|
18
|
+
className: cn(paper, "flex items-center gap-2.5 rounded-full py-1.5 ps-3.5 pe-1.5", className),
|
|
19
|
+
...props,
|
|
20
|
+
children: [
|
|
21
|
+
state === "done" ? /* @__PURE__ */ jsx(CheckIcon, {
|
|
22
|
+
"aria-hidden": true,
|
|
23
|
+
className: "size-3 shrink-0 text-ok"
|
|
24
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
25
|
+
"aria-hidden": true,
|
|
26
|
+
className: cn("size-1.5 shrink-0 rounded-full motion-reduce:animate-none", state === "working" ? "animate-pulse bg-stream" : "bg-surface-3 animate-pulse")
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ jsx("span", {
|
|
29
|
+
className: "cue-elements-fade-in cue-elements-blur-in-2 cue-elements-animate-in max-w-44 truncate text-(length:--cue-text-ui) duration-300 motion-reduce:animate-none",
|
|
30
|
+
children: label
|
|
31
|
+
}, label),
|
|
32
|
+
elapsed !== void 0 && state !== "done" && /* @__PURE__ */ jsx("span", {
|
|
33
|
+
className: cn("font-mono text-(length:--cue-text-label) tracking-tight", "text-fg-subtle tabular-nums"),
|
|
34
|
+
children: elapsed
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ jsx("button", {
|
|
37
|
+
type: "button",
|
|
38
|
+
"aria-label": state === "done" ? "Run again" : "Pause agent",
|
|
39
|
+
className: cn(ghostButton, "size-6"),
|
|
40
|
+
children: state === "done" ? /* @__PURE__ */ jsx(RotateCcwIcon, { className: "size-3" }) : /* @__PURE__ */ jsx(PauseIcon, { className: "size-3" })
|
|
41
|
+
})
|
|
42
|
+
]
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { AgentStatus };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { AgentFidelity, AgentSkin } from "../system/agent-skin.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
//#region src/elements/agent-surface.d.ts
|
|
5
|
+
interface AgentSurfaceProps extends Omit<React.ComponentPropsWithoutRef<"div">, "children"> {
|
|
6
|
+
/**
|
|
7
|
+
* Which value-set paints the subtree: `cue` (the default) or `aui`, which
|
|
8
|
+
* installs assistant-ui's own inks, grounds and hues.
|
|
9
|
+
*/
|
|
10
|
+
skin?: AgentSkin;
|
|
11
|
+
/**
|
|
12
|
+
* How much a supersede island re-points: `cue-metrics` (the default, colour
|
|
13
|
+
* only) or `upstream`, which also pins assistant-ui's radii, literal type
|
|
14
|
+
* sizes and spacing so the density ladder stops at the island edge.
|
|
15
|
+
*/
|
|
16
|
+
fidelity?: AgentFidelity;
|
|
17
|
+
/**
|
|
18
|
+
* Replace the rendered element (Base UI render prop). Accepts an element —
|
|
19
|
+
* `render={<section />}` — or a function returning one.
|
|
20
|
+
*/
|
|
21
|
+
render?: useRender.RenderProp;
|
|
22
|
+
/** The subtree that paints with this island's values. */
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The supersede island: one subtree, painted by a different set of values.
|
|
27
|
+
*
|
|
28
|
+
* Renders a plain `<div data-slot="agent-surface" data-cue-skin="…"
|
|
29
|
+
* data-cue-fidelity="…">` and publishes the same pair on React context. The attributes do the work —
|
|
30
|
+
* `@cueplusplus/ui/elements.css` re-declares, under them, the `--cue-*` tokens
|
|
31
|
+
* the whole elements family reads, and custom properties inherit, so every
|
|
32
|
+
* element inside repaints with no prop threading and no branch in any
|
|
33
|
+
* component. The context exists for the one place that cannot see the DOM: an
|
|
34
|
+
* overlay portaled to `<body>` from inside the island, which
|
|
35
|
+
* {@link useCuePortalProps} stamps from the same values.
|
|
36
|
+
*
|
|
37
|
+
* Two things this is not. It is not a theme — `data-theme`, `data-mode` and
|
|
38
|
+
* `data-density` are untouched, and a light app keeps a light island. And it is
|
|
39
|
+
* not needed for cue mode: the elements were rewritten onto cue's tokens by the
|
|
40
|
+
* vendoring codemod, so `skin="cue"` is what they already do. Reach for this to
|
|
41
|
+
* show an element the way assistant-ui drew it, or to hand a chat panel back to
|
|
42
|
+
* upstream's design language inside a console that is otherwise cue's.
|
|
43
|
+
*
|
|
44
|
+
* What an `aui` island re-points is this family's own vocabulary rather than the
|
|
45
|
+
* whole token contract: `--cue-busy`, `--cue-info`, `--cue-selection`,
|
|
46
|
+
* `--cue-focus`, `--cue-scrim` and every derived `*-soft` / `*-border` stay on
|
|
47
|
+
* the console's theme. Nothing in the elements group reads them, so the island
|
|
48
|
+
* is complete for what it is for — but a *cue* component placed inside one (a
|
|
49
|
+
* `Chip tone="busy"`, a `Toast`) paints half in each palette, and the
|
|
50
|
+
* derivations cannot be made to follow at all: they are `color-mix()` values
|
|
51
|
+
* resolved on the theme block and inherited as answers. `elements.css` carries
|
|
52
|
+
* the full accounting beside the values themselves.
|
|
53
|
+
*
|
|
54
|
+
* `elements.css` is a consumer import: `@import "@cueplusplus/ui/elements.css";`
|
|
55
|
+
* after the main stylesheet. Without it a `skin="aui"` island simply stays in
|
|
56
|
+
* cue's palette.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* <AgentSurface skin="aui" fidelity="upstream">
|
|
60
|
+
* <ToolCall label="Searched" activeLabel="Searching" query="composer" … />
|
|
61
|
+
* </AgentSurface>
|
|
62
|
+
*/
|
|
63
|
+
declare const AgentSurface: React.ForwardRefExoticComponent<AgentSurfaceProps & React.RefAttributes<HTMLDivElement>>;
|
|
64
|
+
//#endregion
|
|
65
|
+
export { AgentSurface, AgentSurfaceProps };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { AgentSkinContext } from "../system/agent-skin.js";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
+
//#region src/elements/agent-surface.tsx
|
|
7
|
+
/**
|
|
8
|
+
* The supersede island: one subtree, painted by a different set of values.
|
|
9
|
+
*
|
|
10
|
+
* Renders a plain `<div data-slot="agent-surface" data-cue-skin="…"
|
|
11
|
+
* data-cue-fidelity="…">` and publishes the same pair on React context. The attributes do the work —
|
|
12
|
+
* `@cueplusplus/ui/elements.css` re-declares, under them, the `--cue-*` tokens
|
|
13
|
+
* the whole elements family reads, and custom properties inherit, so every
|
|
14
|
+
* element inside repaints with no prop threading and no branch in any
|
|
15
|
+
* component. The context exists for the one place that cannot see the DOM: an
|
|
16
|
+
* overlay portaled to `<body>` from inside the island, which
|
|
17
|
+
* {@link useCuePortalProps} stamps from the same values.
|
|
18
|
+
*
|
|
19
|
+
* Two things this is not. It is not a theme — `data-theme`, `data-mode` and
|
|
20
|
+
* `data-density` are untouched, and a light app keeps a light island. And it is
|
|
21
|
+
* not needed for cue mode: the elements were rewritten onto cue's tokens by the
|
|
22
|
+
* vendoring codemod, so `skin="cue"` is what they already do. Reach for this to
|
|
23
|
+
* show an element the way assistant-ui drew it, or to hand a chat panel back to
|
|
24
|
+
* upstream's design language inside a console that is otherwise cue's.
|
|
25
|
+
*
|
|
26
|
+
* What an `aui` island re-points is this family's own vocabulary rather than the
|
|
27
|
+
* whole token contract: `--cue-busy`, `--cue-info`, `--cue-selection`,
|
|
28
|
+
* `--cue-focus`, `--cue-scrim` and every derived `*-soft` / `*-border` stay on
|
|
29
|
+
* the console's theme. Nothing in the elements group reads them, so the island
|
|
30
|
+
* is complete for what it is for — but a *cue* component placed inside one (a
|
|
31
|
+
* `Chip tone="busy"`, a `Toast`) paints half in each palette, and the
|
|
32
|
+
* derivations cannot be made to follow at all: they are `color-mix()` values
|
|
33
|
+
* resolved on the theme block and inherited as answers. `elements.css` carries
|
|
34
|
+
* the full accounting beside the values themselves.
|
|
35
|
+
*
|
|
36
|
+
* `elements.css` is a consumer import: `@import "@cueplusplus/ui/elements.css";`
|
|
37
|
+
* after the main stylesheet. Without it a `skin="aui"` island simply stays in
|
|
38
|
+
* cue's palette.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* <AgentSurface skin="aui" fidelity="upstream">
|
|
42
|
+
* <ToolCall label="Searched" activeLabel="Searching" query="composer" … />
|
|
43
|
+
* </AgentSurface>
|
|
44
|
+
*/
|
|
45
|
+
const AgentSurface = React.forwardRef(function AgentSurface({ skin = "cue", fidelity = "cue-metrics", render, children, ...elementProps }, ref) {
|
|
46
|
+
const island = React.useMemo(() => ({
|
|
47
|
+
skin,
|
|
48
|
+
fidelity
|
|
49
|
+
}), [skin, fidelity]);
|
|
50
|
+
const element = useRender({
|
|
51
|
+
render,
|
|
52
|
+
ref,
|
|
53
|
+
defaultTagName: "div",
|
|
54
|
+
props: {
|
|
55
|
+
...elementProps,
|
|
56
|
+
"data-slot": "agent-surface",
|
|
57
|
+
"data-cue-skin": skin,
|
|
58
|
+
"data-cue-fidelity": fidelity,
|
|
59
|
+
children
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
return /* @__PURE__ */ jsx(AgentSkinContext.Provider, {
|
|
63
|
+
value: island,
|
|
64
|
+
children: element
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
//#endregion
|
|
68
|
+
export { AgentSurface };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
//#region src/elements/animated-number.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* A count in the shape a status line writes it: `842`, `1.2k`, `3.4M`.
|
|
5
|
+
*
|
|
6
|
+
* The reference's own rule — `value < 1000 ? value : (value / 1000).toFixed(1)
|
|
7
|
+
* + "k"` — with two extensions it needs to survive real data: a million rung,
|
|
8
|
+
* because a context window is now measured in them, and a sign, because a
|
|
9
|
+
* delta is a number too. One decimal at every rung above the first, so the
|
|
10
|
+
* width of the string stops changing once it is short.
|
|
11
|
+
*
|
|
12
|
+
* Anything that is not a finite number is `0`: this formats a caller's
|
|
13
|
+
* arithmetic, and a division that has not happened yet is a real state.
|
|
14
|
+
*
|
|
15
|
+
* @param value The number to write.
|
|
16
|
+
* @returns The compact form, without a unit — `tokens` is the caller's word.
|
|
17
|
+
* @example
|
|
18
|
+
* formatCompactNumber(842); // "842"
|
|
19
|
+
* formatCompactNumber(1240); // "1.2k"
|
|
20
|
+
* formatCompactNumber(3_400_000); // "3.4M"
|
|
21
|
+
*/
|
|
22
|
+
declare function formatCompactNumber(value: number): string;
|
|
23
|
+
interface AnimatedNumberProps extends Omit<React.ComponentPropsWithoutRef<"span">, "children"> {
|
|
24
|
+
/**
|
|
25
|
+
* The number to show. Every change eases from whatever is on screen to this,
|
|
26
|
+
* including a change that arrives mid-tween — which is the case a live
|
|
27
|
+
* counter is actually made of.
|
|
28
|
+
*
|
|
29
|
+
* A non-finite value paints `0` rather than the word `NaN`: these arrive from
|
|
30
|
+
* a caller's arithmetic over a stream that may not have started.
|
|
31
|
+
*/
|
|
32
|
+
value: number;
|
|
33
|
+
/**
|
|
34
|
+
* How long one tween lasts, in milliseconds. Defaults to `400` — long enough
|
|
35
|
+
* to read as counting, short enough that a counter updated every second is
|
|
36
|
+
* never behind the run it is describing. `0` steps.
|
|
37
|
+
*/
|
|
38
|
+
duration?: number;
|
|
39
|
+
/**
|
|
40
|
+
* How to write the number. Defaults to grouped digits in `en-US`
|
|
41
|
+
* (`1,240`), which is deterministic across a server render and a client one;
|
|
42
|
+
* {@link formatCompactNumber} is the other one this family uses (`1.2k`).
|
|
43
|
+
*
|
|
44
|
+
* Called on every frame, so keep it cheap.
|
|
45
|
+
*/
|
|
46
|
+
format?: (value: number) => string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* A number that counts to its new value instead of jumping to it.
|
|
50
|
+
*
|
|
51
|
+
* The smallest element in the canon and the one that touches the most rows: a
|
|
52
|
+
* token count, a cost, a duration, a file tally. Two rules, both from the same
|
|
53
|
+
* teardown. Tween, because a value that steps reads as a new fact while a value
|
|
54
|
+
* that counts reads as the same fact moving — and a transcript's numbers are
|
|
55
|
+
* almost always the second thing. And `tabular-nums`, because a proportional
|
|
56
|
+
* `1` is narrower than a `0`, so a stepping counter nudges everything to its
|
|
57
|
+
* right on every update.
|
|
58
|
+
*
|
|
59
|
+
* It holds the only state in the canon, and it is a tween rather than a fact:
|
|
60
|
+
* `value` is still a prop, every tween ends exactly on it, and a replay that
|
|
61
|
+
* sets the prop paints the same number at every frame it rests on.
|
|
62
|
+
*
|
|
63
|
+
* **Reduced motion is answered by arriving, not by stopping.** A reader who has
|
|
64
|
+
* asked for stillness gets the value immediately and no frames are ever
|
|
65
|
+
* scheduled — the number is information, and the animation was only ever how it
|
|
66
|
+
* got there.
|
|
67
|
+
*
|
|
68
|
+
* While a tween is in flight the digits on screen are `aria-hidden` and the
|
|
69
|
+
* settled value is carried beside them for a screen reader, so an assistive
|
|
70
|
+
* technology reads the number the run actually reported rather than whichever
|
|
71
|
+
* frame it happened to land on. Once the tween ends there is one node again and
|
|
72
|
+
* nothing is duplicated.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* import { AnimatedNumber } from "@cueplusplus/ui/elements";
|
|
76
|
+
*
|
|
77
|
+
* <AnimatedNumber value={tokens} />
|
|
78
|
+
* @example
|
|
79
|
+
* // The reference's own readout: compact, inline, in the status line.
|
|
80
|
+
* <span className="text-fg-muted">
|
|
81
|
+
* · <AnimatedNumber value={tokens} format={formatCompactNumber} /> tokens
|
|
82
|
+
* </span>
|
|
83
|
+
*/
|
|
84
|
+
declare const AnimatedNumber: React.ForwardRefExoticComponent<AnimatedNumberProps & React.RefAttributes<HTMLSpanElement>>;
|
|
85
|
+
//#endregion
|
|
86
|
+
export { AnimatedNumber, AnimatedNumberProps, formatCompactNumber };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { usePrefersReducedMotion } from "../instruments/_motion.js";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/elements/animated-number.tsx
|
|
7
|
+
/**
|
|
8
|
+
* A count in the shape a status line writes it: `842`, `1.2k`, `3.4M`.
|
|
9
|
+
*
|
|
10
|
+
* The reference's own rule — `value < 1000 ? value : (value / 1000).toFixed(1)
|
|
11
|
+
* + "k"` — with two extensions it needs to survive real data: a million rung,
|
|
12
|
+
* because a context window is now measured in them, and a sign, because a
|
|
13
|
+
* delta is a number too. One decimal at every rung above the first, so the
|
|
14
|
+
* width of the string stops changing once it is short.
|
|
15
|
+
*
|
|
16
|
+
* Anything that is not a finite number is `0`: this formats a caller's
|
|
17
|
+
* arithmetic, and a division that has not happened yet is a real state.
|
|
18
|
+
*
|
|
19
|
+
* @param value The number to write.
|
|
20
|
+
* @returns The compact form, without a unit — `tokens` is the caller's word.
|
|
21
|
+
* @example
|
|
22
|
+
* formatCompactNumber(842); // "842"
|
|
23
|
+
* formatCompactNumber(1240); // "1.2k"
|
|
24
|
+
* formatCompactNumber(3_400_000); // "3.4M"
|
|
25
|
+
*/
|
|
26
|
+
function formatCompactNumber(value) {
|
|
27
|
+
if (!Number.isFinite(value)) return "0";
|
|
28
|
+
const sign = value < 0 ? "-" : "";
|
|
29
|
+
const size = Math.abs(value);
|
|
30
|
+
if (size < 1e3) return `${sign}${Math.round(size)}`;
|
|
31
|
+
if (size < 1e6) return `${sign}${(size / 1e3).toFixed(1)}k`;
|
|
32
|
+
return `${sign}${(size / 1e6).toFixed(1)}M`;
|
|
33
|
+
}
|
|
34
|
+
/** Grouped digits, in a fixed locale so a server and a client agree. */
|
|
35
|
+
const GROUPED = (value) => value.toLocaleString("en-US");
|
|
36
|
+
/**
|
|
37
|
+
* A number that counts to its new value instead of jumping to it.
|
|
38
|
+
*
|
|
39
|
+
* The smallest element in the canon and the one that touches the most rows: a
|
|
40
|
+
* token count, a cost, a duration, a file tally. Two rules, both from the same
|
|
41
|
+
* teardown. Tween, because a value that steps reads as a new fact while a value
|
|
42
|
+
* that counts reads as the same fact moving — and a transcript's numbers are
|
|
43
|
+
* almost always the second thing. And `tabular-nums`, because a proportional
|
|
44
|
+
* `1` is narrower than a `0`, so a stepping counter nudges everything to its
|
|
45
|
+
* right on every update.
|
|
46
|
+
*
|
|
47
|
+
* It holds the only state in the canon, and it is a tween rather than a fact:
|
|
48
|
+
* `value` is still a prop, every tween ends exactly on it, and a replay that
|
|
49
|
+
* sets the prop paints the same number at every frame it rests on.
|
|
50
|
+
*
|
|
51
|
+
* **Reduced motion is answered by arriving, not by stopping.** A reader who has
|
|
52
|
+
* asked for stillness gets the value immediately and no frames are ever
|
|
53
|
+
* scheduled — the number is information, and the animation was only ever how it
|
|
54
|
+
* got there.
|
|
55
|
+
*
|
|
56
|
+
* While a tween is in flight the digits on screen are `aria-hidden` and the
|
|
57
|
+
* settled value is carried beside them for a screen reader, so an assistive
|
|
58
|
+
* technology reads the number the run actually reported rather than whichever
|
|
59
|
+
* frame it happened to land on. Once the tween ends there is one node again and
|
|
60
|
+
* nothing is duplicated.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* import { AnimatedNumber } from "@cueplusplus/ui/elements";
|
|
64
|
+
*
|
|
65
|
+
* <AnimatedNumber value={tokens} />
|
|
66
|
+
* @example
|
|
67
|
+
* // The reference's own readout: compact, inline, in the status line.
|
|
68
|
+
* <span className="text-fg-muted">
|
|
69
|
+
* · <AnimatedNumber value={tokens} format={formatCompactNumber} /> tokens
|
|
70
|
+
* </span>
|
|
71
|
+
*/
|
|
72
|
+
const AnimatedNumber = React.forwardRef(function AnimatedNumber({ value, duration = 400, format = GROUPED, className, ...elementProps }, ref) {
|
|
73
|
+
const target = Number.isFinite(value) ? value : 0;
|
|
74
|
+
const reduced = usePrefersReducedMotion();
|
|
75
|
+
const [shown, setShown] = React.useState(target);
|
|
76
|
+
const painted = React.useRef(target);
|
|
77
|
+
React.useEffect(() => {
|
|
78
|
+
const from = painted.current;
|
|
79
|
+
if (from === target) return;
|
|
80
|
+
if (reduced || duration <= 0 || typeof requestAnimationFrame !== "function") {
|
|
81
|
+
painted.current = target;
|
|
82
|
+
setShown(target);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
let origin = -1;
|
|
86
|
+
let frameId = requestAnimationFrame(function tick(at) {
|
|
87
|
+
if (origin < 0) origin = at;
|
|
88
|
+
const through = Math.min(1, (at - origin) / duration);
|
|
89
|
+
const next = through >= 1 ? target : Math.floor(from + (target - from) * through);
|
|
90
|
+
painted.current = next;
|
|
91
|
+
setShown(next);
|
|
92
|
+
if (through >= 1) return;
|
|
93
|
+
frameId = requestAnimationFrame(tick);
|
|
94
|
+
});
|
|
95
|
+
return () => cancelAnimationFrame(frameId);
|
|
96
|
+
}, [
|
|
97
|
+
duration,
|
|
98
|
+
reduced,
|
|
99
|
+
target
|
|
100
|
+
]);
|
|
101
|
+
const tweening = shown !== target;
|
|
102
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
103
|
+
ref,
|
|
104
|
+
"data-slot": "animated-number",
|
|
105
|
+
"data-tweening": String(tweening),
|
|
106
|
+
className: cn("tabular-nums", className),
|
|
107
|
+
...elementProps,
|
|
108
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
109
|
+
"aria-hidden": tweening || void 0,
|
|
110
|
+
children: format(shown)
|
|
111
|
+
}), tweening ? /* @__PURE__ */ jsx("span", {
|
|
112
|
+
className: "sr-only",
|
|
113
|
+
children: format(target)
|
|
114
|
+
}) : null]
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
//#endregion
|
|
118
|
+
export { AnimatedNumber, formatCompactNumber };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/approval-card.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Where an approval has got to: `request` while it waits on the user, then `running`,
|
|
5
|
+
* `done` or `denied`.
|
|
6
|
+
*/
|
|
7
|
+
type ApprovalState = "request" | "running" | "done" | "denied";
|
|
8
|
+
/**
|
|
9
|
+
* Human in the loop: the agent asks before it runs anything with side effects.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* import { ApprovalCard } from "@cueplusplus/ui/elements";
|
|
13
|
+
*
|
|
14
|
+
* <ApprovalCard
|
|
15
|
+
* state="request"
|
|
16
|
+
* command="pnpm db:migrate"
|
|
17
|
+
* title="Run migration"
|
|
18
|
+
* subtitle="Needs your approval"
|
|
19
|
+
* onAllowOnce={() => approve()}
|
|
20
|
+
* onDeny={() => deny()}
|
|
21
|
+
* />
|
|
22
|
+
*/
|
|
23
|
+
declare function ApprovalCard({ state, command, title, subtitle, onAllowOnce, onAlwaysAllow, onDeny, className, ...props }: Omit<ComponentProps<"div">, "children" | "state" | "command" | "title" | "subtitle" | "onAllowOnce" | "onAlwaysAllow" | "onDeny"> & {
|
|
24
|
+
/** Lifecycle of the card: request with actions, running spinner, done check, or denied. */
|
|
25
|
+
state: ApprovalState;
|
|
26
|
+
/** Command shown in the mono field the agent wants to run. */
|
|
27
|
+
command: string;
|
|
28
|
+
/** Headline naming the action that needs approval. */
|
|
29
|
+
title: string;
|
|
30
|
+
/** Supporting line under the title explaining the request. */
|
|
31
|
+
subtitle: string;
|
|
32
|
+
/** Called when the user clicks Allow once. */
|
|
33
|
+
onAllowOnce?: () => void;
|
|
34
|
+
/** Called when the user clicks Always allow. */
|
|
35
|
+
onAlwaysAllow?: () => void;
|
|
36
|
+
/** Called when the user clicks Deny. */
|
|
37
|
+
onDeny?: () => void;
|
|
38
|
+
}): import("react").JSX.Element;
|
|
39
|
+
//#endregion
|
|
40
|
+
export { ApprovalCard, ApprovalState };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { field, inkButton, paper } from "./surfaces.js";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { CheckIcon, Loader2Icon, TerminalIcon, XIcon } from "lucide-react";
|
|
6
|
+
//#region src/elements/approval-card.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Human in the loop: the agent asks before it runs anything with side effects.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* import { ApprovalCard } from "@cueplusplus/ui/elements";
|
|
12
|
+
*
|
|
13
|
+
* <ApprovalCard
|
|
14
|
+
* state="request"
|
|
15
|
+
* command="pnpm db:migrate"
|
|
16
|
+
* title="Run migration"
|
|
17
|
+
* subtitle="Needs your approval"
|
|
18
|
+
* onAllowOnce={() => approve()}
|
|
19
|
+
* onDeny={() => deny()}
|
|
20
|
+
* />
|
|
21
|
+
*/
|
|
22
|
+
function ApprovalCard({ state, command, title, subtitle, onAllowOnce, onAlwaysAllow, onDeny, className, ...props }) {
|
|
23
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
24
|
+
"data-slot": "approval-card",
|
|
25
|
+
className: cn(paper, "flex w-full max-w-sm flex-col gap-3.5 rounded-(--radius-overlay) p-4", className),
|
|
26
|
+
...props,
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ jsxs("div", {
|
|
29
|
+
className: "flex items-center gap-3",
|
|
30
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
31
|
+
className: "bg-surface-1 text-fg-muted flex size-9 shrink-0 items-center justify-center rounded-(--radius-surface)",
|
|
32
|
+
children: /* @__PURE__ */ jsx(TerminalIcon, { className: "size-4" })
|
|
33
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
34
|
+
className: "flex flex-col",
|
|
35
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
36
|
+
className: "text-(length:--cue-text-body) font-medium",
|
|
37
|
+
children: title
|
|
38
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
39
|
+
className: "text-fg-muted text-(length:--cue-text-ui)",
|
|
40
|
+
children: subtitle
|
|
41
|
+
})]
|
|
42
|
+
})]
|
|
43
|
+
}),
|
|
44
|
+
/* @__PURE__ */ jsx("div", {
|
|
45
|
+
className: cn(field, "text-fg-muted rounded-(--radius-surface) px-3.5 py-2.5 font-mono text-(length:--cue-text-ui)"),
|
|
46
|
+
children: command
|
|
47
|
+
}),
|
|
48
|
+
/* @__PURE__ */ jsx("div", {
|
|
49
|
+
className: "flex h-8 items-center justify-end gap-2",
|
|
50
|
+
children: state === "request" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
51
|
+
/* @__PURE__ */ jsx("button", {
|
|
52
|
+
type: "button",
|
|
53
|
+
onClick: onDeny,
|
|
54
|
+
className: "text-fg-muted hover:bg-surface-2 hover:text-fg h-8 rounded-full px-3.5 text-(length:--cue-text-ui) font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96]",
|
|
55
|
+
children: "Deny"
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ jsx("button", {
|
|
58
|
+
type: "button",
|
|
59
|
+
onClick: onAlwaysAllow,
|
|
60
|
+
className: "text-fg-muted hover:bg-surface-2 hover:text-fg h-8 rounded-full px-3.5 text-(length:--cue-text-ui) font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96]",
|
|
61
|
+
children: "Always allow"
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ jsx("button", {
|
|
64
|
+
type: "button",
|
|
65
|
+
onClick: onAllowOnce,
|
|
66
|
+
className: cn(inkButton, "flex h-8 items-center rounded-full px-3.5 text-(length:--cue-text-ui) font-medium"),
|
|
67
|
+
children: "Allow once"
|
|
68
|
+
})
|
|
69
|
+
] }) : /* @__PURE__ */ jsx("div", {
|
|
70
|
+
className: "cue-elements-fade-in cue-elements-animate-in text-fg-muted flex items-center gap-2 text-(length:--cue-text-ui) duration-300",
|
|
71
|
+
children: state === "running" ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Loader2Icon, { className: "text-fg-muted size-3.5 animate-spin" }), "Approved, running"] }) : state === "denied" ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(XIcon, { className: "text-fg-muted size-3.5" }), "Denied"] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5 text-ok" }), "Finished with exit 0"] })
|
|
72
|
+
}, state)
|
|
73
|
+
})
|
|
74
|
+
]
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
//#endregion
|
|
78
|
+
export { ApprovalCard };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/artifact-card.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* A generated document as a tangible object, written live and versioned.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* import { ArtifactCard } from "@cueplusplus/ui/elements";
|
|
8
|
+
*
|
|
9
|
+
* <ArtifactCard
|
|
10
|
+
* title="Draft persistence RFC"
|
|
11
|
+
* meta="Document · v3 · just now"
|
|
12
|
+
* generating={isWriting}
|
|
13
|
+
* words={wordCount}
|
|
14
|
+
* />
|
|
15
|
+
*/
|
|
16
|
+
declare function ArtifactCard({ title, meta, generating, words, className, ...props }: Omit<ComponentProps<"div">, "children" | "title" | "meta" | "generating" | "words"> & {
|
|
17
|
+
/** Name of the generated artifact. */
|
|
18
|
+
title: string;
|
|
19
|
+
/**
|
|
20
|
+
* Resting meta line shown once generation finishes, for example kind, version, and
|
|
21
|
+
* recency.
|
|
22
|
+
*/
|
|
23
|
+
meta: string;
|
|
24
|
+
/** While true the icon pulses and the meta line shows a live word count with a shimmer. */
|
|
25
|
+
generating?: boolean;
|
|
26
|
+
/** Live word count shown while generating. */
|
|
27
|
+
words?: number;
|
|
28
|
+
}): import("react").JSX.Element;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { ArtifactCard };
|