@dungle-scrubs/admin-ui-soft 0.0.0-stage → 0.1.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/GUIDE.md +110 -0
- package/LICENSE +21 -0
- package/README.md +36 -2
- package/THIRD-PARTY-NOTICES.md +25 -0
- package/UPSTREAM-VENDORED-CHANGES.md +317 -0
- package/VENDORED-CHANGES.md +60 -0
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/ai/compositions/agent-console/agent-console.d.ts +109 -0
- package/dist/ai/compositions/agent-console/agent-console.js +644 -0
- package/dist/ai/compositions/attention-feed/attention-feed.d.ts +127 -0
- package/dist/ai/compositions/attention-feed/attention-feed.js +626 -0
- package/dist/ai/compositions/conversation-browser/conversation-browser.d.ts +126 -0
- package/dist/ai/compositions/conversation-browser/conversation-browser.js +364 -0
- package/dist/ai/compositions/redaction-marker/redaction-marker.d.ts +42 -0
- package/dist/ai/compositions/redaction-marker/redaction-marker.js +202 -0
- package/dist/ai/compositions/run-inspector/json-view.js +164 -0
- package/dist/ai/compositions/run-inspector/run-inspector.d.ts +66 -0
- package/dist/ai/compositions/run-inspector/run-inspector.js +703 -0
- package/dist/ai/compositions/run-inspector/run-model.js +155 -0
- package/dist/ai/compositions/tool-approval/json-args.js +54 -0
- package/dist/ai/compositions/tool-approval/tool-approval.d.ts +57 -0
- package/dist/ai/compositions/tool-approval/tool-approval.js +331 -0
- package/dist/ai/compositions/tool-call-row/tool-call-row.js +74 -0
- package/dist/ai/compositions/transcript-viewer/to-thread-messages.js +65 -0
- package/dist/ai/compositions/transcript-viewer/transcript-viewer.d.ts +63 -0
- package/dist/ai/compositions/transcript-viewer/transcript-viewer.js +471 -0
- package/dist/ai/compositions/usage-meter/usage-format.js +107 -0
- package/dist/ai/compositions/usage-meter/usage-meter.d.ts +32 -0
- package/dist/ai/compositions/usage-meter/usage-meter.js +258 -0
- package/dist/ai/testing/mock-clock.d.ts +31 -0
- package/dist/ai/testing/mock-clock.js +66 -0
- package/dist/ai/testing/mock-reply.d.ts +70 -0
- package/dist/ai/testing/mock-reply.js +100 -0
- package/dist/ai/testing/mock-runtime.d.ts +86 -0
- package/dist/ai/testing/mock-runtime.js +384 -0
- package/dist/ai/types.d.ts +323 -0
- package/dist/ai.css +1088 -0
- package/dist/ai.d.ts +160 -0
- package/dist/ai.js +158 -0
- package/dist/components/assistant-ui/elements/activity-graph.d.ts +14 -0
- package/dist/components/assistant-ui/elements/activity-graph.js +69 -0
- package/dist/components/assistant-ui/elements/agent-card.d.ts +21 -0
- package/dist/components/assistant-ui/elements/agent-card.js +75 -0
- package/dist/components/assistant-ui/elements/agent-handoff.d.ts +13 -0
- package/dist/components/assistant-ui/elements/agent-handoff.js +47 -0
- package/dist/components/assistant-ui/elements/agent-plan.d.ts +16 -0
- package/dist/components/assistant-ui/elements/agent-plan.js +93 -0
- package/dist/components/assistant-ui/elements/agent-status.aui.d.ts +24 -0
- package/dist/components/assistant-ui/elements/agent-status.aui.js +161 -0
- package/dist/components/assistant-ui/elements/agent-status.d.ts +17 -0
- package/dist/components/assistant-ui/elements/agent-status.js +47 -0
- package/dist/components/assistant-ui/elements/approval-card.d.ts +31 -0
- package/dist/components/assistant-ui/elements/approval-card.js +99 -0
- package/dist/components/assistant-ui/elements/artifact-card.d.ts +12 -0
- package/dist/components/assistant-ui/elements/artifact-card.js +47 -0
- package/dist/components/assistant-ui/elements/assistant-modal.aui.d.ts +7 -0
- package/dist/components/assistant-ui/elements/assistant-modal.aui.js +276 -0
- package/dist/components/assistant-ui/elements/assistant-sidebar.aui.d.ts +7 -0
- package/dist/components/assistant-ui/elements/assistant-sidebar.aui.js +18 -0
- package/dist/components/assistant-ui/elements/attachment.aui.d.ts +9 -0
- package/dist/components/assistant-ui/elements/attachment.aui.js +143 -0
- package/dist/components/assistant-ui/elements/background-inbox.d.ts +18 -0
- package/dist/components/assistant-ui/elements/background-inbox.js +65 -0
- package/dist/components/assistant-ui/elements/canvas-split.d.ts +25 -0
- package/dist/components/assistant-ui/elements/canvas-split.js +106 -0
- package/dist/components/assistant-ui/elements/chart.d.ts +19 -0
- package/dist/components/assistant-ui/elements/chart.js +105 -0
- package/dist/components/assistant-ui/elements/chat-panel.d.ts +15 -0
- package/dist/components/assistant-ui/elements/chat-panel.js +82 -0
- package/dist/components/assistant-ui/elements/checkpoint-history.d.ts +17 -0
- package/dist/components/assistant-ui/elements/checkpoint-history.js +60 -0
- package/dist/components/assistant-ui/elements/code-diff.d.ts +18 -0
- package/dist/components/assistant-ui/elements/code-diff.js +89 -0
- package/dist/components/assistant-ui/elements/code-runner.d.ts +15 -0
- package/dist/components/assistant-ui/elements/code-runner.js +108 -0
- package/dist/components/assistant-ui/elements/command-palette.d.ts +20 -0
- package/dist/components/assistant-ui/elements/command-palette.js +129 -0
- package/dist/components/assistant-ui/elements/comparison-card.d.ts +18 -0
- package/dist/components/assistant-ui/elements/comparison-card.js +58 -0
- package/dist/components/assistant-ui/elements/composer-trigger-popover.aui.d.ts +51 -0
- package/dist/components/assistant-ui/elements/composer-trigger-popover.aui.js +104 -0
- package/dist/components/assistant-ui/elements/composer.d.ts +91 -0
- package/dist/components/assistant-ui/elements/composer.js +416 -0
- package/dist/components/assistant-ui/elements/computer-use.d.ts +19 -0
- package/dist/components/assistant-ui/elements/computer-use.js +84 -0
- package/dist/components/assistant-ui/elements/confidence-marker.d.ts +20 -0
- package/dist/components/assistant-ui/elements/confidence-marker.js +58 -0
- package/dist/components/assistant-ui/elements/connection-state.d.ts +13 -0
- package/dist/components/assistant-ui/elements/connection-state.js +59 -0
- package/dist/components/assistant-ui/elements/context-breakdown.d.ts +15 -0
- package/dist/components/assistant-ui/elements/context-breakdown.js +91 -0
- package/dist/components/assistant-ui/elements/context-display.aui.d.ts +25 -0
- package/dist/components/assistant-ui/elements/context-display.aui.js +26 -0
- package/dist/components/assistant-ui/elements/context-display.d.ts +43 -0
- package/dist/components/assistant-ui/elements/context-display.js +300 -0
- package/dist/components/assistant-ui/elements/conversation-map.aui.d.ts +9 -0
- package/dist/components/assistant-ui/elements/conversation-map.aui.js +177 -0
- package/dist/components/assistant-ui/elements/conversation-map.d.ts +19 -0
- package/dist/components/assistant-ui/elements/conversation-map.js +84 -0
- package/dist/components/assistant-ui/elements/conversation-search.d.ts +20 -0
- package/dist/components/assistant-ui/elements/conversation-search.js +75 -0
- package/dist/components/assistant-ui/elements/cost-meter.d.ts +19 -0
- package/dist/components/assistant-ui/elements/cost-meter.js +76 -0
- package/dist/components/assistant-ui/elements/data-table.d.ts +72 -0
- package/dist/components/assistant-ui/elements/data-table.js +368 -0
- package/dist/components/assistant-ui/elements/day-separator.d.ts +16 -0
- package/dist/components/assistant-ui/elements/day-separator.js +44 -0
- package/dist/components/assistant-ui/elements/diagram.d.ts +15 -0
- package/dist/components/assistant-ui/elements/diagram.js +65 -0
- package/dist/components/assistant-ui/elements/directive-text.aui.d.ts +11 -0
- package/dist/components/assistant-ui/elements/directive-text.aui.js +18 -0
- package/dist/components/assistant-ui/elements/directive-text.d.ts +32 -0
- package/dist/components/assistant-ui/elements/directive-text.js +35 -0
- package/dist/components/assistant-ui/elements/document-reference.d.ts +17 -0
- package/dist/components/assistant-ui/elements/document-reference.js +62 -0
- package/dist/components/assistant-ui/elements/draft-restore.d.ts +12 -0
- package/dist/components/assistant-ui/elements/draft-restore.js +43 -0
- package/dist/components/assistant-ui/elements/edit-message.d.ts +15 -0
- package/dist/components/assistant-ui/elements/edit-message.js +63 -0
- package/dist/components/assistant-ui/elements/elicitation-form.d.ts +23 -0
- package/dist/components/assistant-ui/elements/elicitation-form.js +112 -0
- package/dist/components/assistant-ui/elements/empty-state.d.ts +16 -0
- package/dist/components/assistant-ui/elements/empty-state.js +71 -0
- package/dist/components/assistant-ui/elements/error-state.d.ts +13 -0
- package/dist/components/assistant-ui/elements/error-state.js +52 -0
- package/dist/components/assistant-ui/elements/feedback-dialog.d.ts +15 -0
- package/dist/components/assistant-ui/elements/feedback-dialog.js +77 -0
- package/dist/components/assistant-ui/elements/file-tree.d.ts +20 -0
- package/dist/components/assistant-ui/elements/file-tree.js +74 -0
- package/dist/components/assistant-ui/elements/file.d.ts +52 -0
- package/dist/components/assistant-ui/elements/file.js +222 -0
- package/dist/components/assistant-ui/elements/flow-graph.d.ts +23 -0
- package/dist/components/assistant-ui/elements/flow-graph.js +72 -0
- package/dist/components/assistant-ui/elements/follow-up-suggestions.aui.d.ts +7 -0
- package/dist/components/assistant-ui/elements/follow-up-suggestions.aui.js +30 -0
- package/dist/components/assistant-ui/elements/generative-ui.d.ts +8 -0
- package/dist/components/assistant-ui/elements/generative-ui.js +27 -0
- package/dist/components/assistant-ui/elements/geo-map.d.ts +29 -0
- package/dist/components/assistant-ui/elements/geo-map.js +190 -0
- package/dist/components/assistant-ui/elements/guardrail-notice.d.ts +15 -0
- package/dist/components/assistant-ui/elements/guardrail-notice.js +59 -0
- package/dist/components/assistant-ui/elements/heat-graph.d.ts +9 -0
- package/dist/components/assistant-ui/elements/heat-graph.js +90 -0
- package/dist/components/assistant-ui/elements/image-gallery.d.ts +22 -0
- package/dist/components/assistant-ui/elements/image-gallery.js +192 -0
- package/dist/components/assistant-ui/elements/image-generation.d.ts +11 -0
- package/dist/components/assistant-ui/elements/image-generation.js +64 -0
- package/dist/components/assistant-ui/elements/image.d.ts +59 -0
- package/dist/components/assistant-ui/elements/image.js +416 -0
- package/dist/components/assistant-ui/elements/inline-citation.d.ts +23 -0
- package/dist/components/assistant-ui/elements/inline-citation.js +90 -0
- package/dist/components/assistant-ui/elements/job-progress.d.ts +25 -0
- package/dist/components/assistant-ui/elements/job-progress.js +102 -0
- package/dist/components/assistant-ui/elements/launcher-bubble.d.ts +15 -0
- package/dist/components/assistant-ui/elements/launcher-bubble.js +71 -0
- package/dist/components/assistant-ui/elements/link-preview.d.ts +17 -0
- package/dist/components/assistant-ui/elements/link-preview.js +77 -0
- package/dist/components/assistant-ui/elements/loading-state.d.ts +13 -0
- package/dist/components/assistant-ui/elements/loading-state.js +33 -0
- package/dist/components/assistant-ui/elements/logos.d.ts +10 -0
- package/dist/components/assistant-ui/elements/logos.js +63 -0
- package/dist/components/assistant-ui/elements/map-answer.d.ts +19 -0
- package/dist/components/assistant-ui/elements/map-answer.js +120 -0
- package/dist/components/assistant-ui/elements/markdown-text.d.ts +11 -0
- package/dist/components/assistant-ui/elements/markdown-text.js +152 -0
- package/dist/components/assistant-ui/elements/math-block.d.ts +25 -0
- package/dist/components/assistant-ui/elements/math-block.js +60 -0
- package/dist/components/assistant-ui/elements/mcp-config.aui.d.ts +28 -0
- package/dist/components/assistant-ui/elements/mcp-config.aui.js +380 -0
- package/dist/components/assistant-ui/elements/mcp-server-panel.d.ts +20 -0
- package/dist/components/assistant-ui/elements/mcp-server-panel.js +114 -0
- package/dist/components/assistant-ui/elements/media-player.d.ts +21 -0
- package/dist/components/assistant-ui/elements/media-player.js +302 -0
- package/dist/components/assistant-ui/elements/memory-chips.d.ts +16 -0
- package/dist/components/assistant-ui/elements/memory-chips.js +44 -0
- package/dist/components/assistant-ui/elements/mermaid-diagram.aui.d.ts +14 -0
- package/dist/components/assistant-ui/elements/mermaid-diagram.aui.js +43 -0
- package/dist/components/assistant-ui/elements/mermaid-diagram.d.ts +20 -0
- package/dist/components/assistant-ui/elements/mermaid-diagram.js +258 -0
- package/dist/components/assistant-ui/elements/message-actions.d.ts +17 -0
- package/dist/components/assistant-ui/elements/message-actions.js +57 -0
- package/dist/components/assistant-ui/elements/message-attachment.d.ts +18 -0
- package/dist/components/assistant-ui/elements/message-attachment.js +58 -0
- package/dist/components/assistant-ui/elements/message-branches.d.ts +12 -0
- package/dist/components/assistant-ui/elements/message-branches.js +55 -0
- package/dist/components/assistant-ui/elements/message-pair.d.ts +16 -0
- package/dist/components/assistant-ui/elements/message-pair.js +63 -0
- package/dist/components/assistant-ui/elements/message-queue.d.ts +15 -0
- package/dist/components/assistant-ui/elements/message-queue.js +70 -0
- package/dist/components/assistant-ui/elements/message-timing.aui.d.ts +30 -0
- package/dist/components/assistant-ui/elements/message-timing.aui.js +98 -0
- package/dist/components/assistant-ui/elements/message-timing.d.ts +14 -0
- package/dist/components/assistant-ui/elements/message-timing.js +26 -0
- package/dist/components/assistant-ui/elements/mobile-composer.d.ts +18 -0
- package/dist/components/assistant-ui/elements/mobile-composer.js +76 -0
- package/dist/components/assistant-ui/elements/model-picker.d.ts +19 -0
- package/dist/components/assistant-ui/elements/model-picker.js +68 -0
- package/dist/components/assistant-ui/elements/model-selector.aui.d.ts +23 -0
- package/dist/components/assistant-ui/elements/model-selector.aui.js +79 -0
- package/dist/components/assistant-ui/elements/model-selector.d.ts +130 -0
- package/dist/components/assistant-ui/elements/model-selector.js +399 -0
- package/dist/components/assistant-ui/elements/number-ticker.d.ts +10 -0
- package/dist/components/assistant-ui/elements/number-ticker.js +41 -0
- package/dist/components/assistant-ui/elements/onboarding.d.ts +17 -0
- package/dist/components/assistant-ui/elements/onboarding.js +69 -0
- package/dist/components/assistant-ui/elements/option-list.d.ts +39 -0
- package/dist/components/assistant-ui/elements/option-list.js +176 -0
- package/dist/components/assistant-ui/elements/permission-grant.d.ts +14 -0
- package/dist/components/assistant-ui/elements/permission-grant.js +84 -0
- package/dist/components/assistant-ui/elements/prompt-library.d.ts +20 -0
- package/dist/components/assistant-ui/elements/prompt-library.js +121 -0
- package/dist/components/assistant-ui/elements/question-flow.d.ts +24 -0
- package/dist/components/assistant-ui/elements/question-flow.js +180 -0
- package/dist/components/assistant-ui/elements/quota-banner.d.ts +14 -0
- package/dist/components/assistant-ui/elements/quota-banner.js +68 -0
- package/dist/components/assistant-ui/elements/quote-reply.d.ts +20 -0
- package/dist/components/assistant-ui/elements/quote-reply.js +66 -0
- package/dist/components/assistant-ui/elements/quote.aui.d.ts +61 -0
- package/dist/components/assistant-ui/elements/quote.aui.js +170 -0
- package/dist/components/assistant-ui/elements/read-aloud.d.ts +16 -0
- package/dist/components/assistant-ui/elements/read-aloud.js +66 -0
- package/dist/components/assistant-ui/elements/reasoning-effort.d.ts +17 -0
- package/dist/components/assistant-ui/elements/reasoning-effort.js +67 -0
- package/dist/components/assistant-ui/elements/reasoning-panel.d.ts +20 -0
- package/dist/components/assistant-ui/elements/reasoning-panel.js +60 -0
- package/dist/components/assistant-ui/elements/reasoning.aui.d.ts +24 -0
- package/dist/components/assistant-ui/elements/reasoning.aui.js +70 -0
- package/dist/components/assistant-ui/elements/reasoning.d.ts +38 -0
- package/dist/components/assistant-ui/elements/reasoning.js +194 -0
- package/dist/components/assistant-ui/elements/recommendation-card.d.ts +16 -0
- package/dist/components/assistant-ui/elements/recommendation-card.js +65 -0
- package/dist/components/assistant-ui/elements/regenerate-menu.d.ts +18 -0
- package/dist/components/assistant-ui/elements/regenerate-menu.js +46 -0
- package/dist/components/assistant-ui/elements/research-report.d.ts +19 -0
- package/dist/components/assistant-ui/elements/research-report.js +63 -0
- package/dist/components/assistant-ui/elements/retrieval-chunks.d.ts +19 -0
- package/dist/components/assistant-ui/elements/retrieval-chunks.js +86 -0
- package/dist/components/assistant-ui/elements/reviewable-diff.d.ts +21 -0
- package/dist/components/assistant-ui/elements/reviewable-diff.js +104 -0
- package/dist/components/assistant-ui/elements/schedule-card.d.ts +19 -0
- package/dist/components/assistant-ui/elements/schedule-card.js +80 -0
- package/dist/components/assistant-ui/elements/score-breakdown.d.ts +19 -0
- package/dist/components/assistant-ui/elements/score-breakdown.js +107 -0
- package/dist/components/assistant-ui/elements/scroll-anchor.d.ts +15 -0
- package/dist/components/assistant-ui/elements/scroll-anchor.js +104 -0
- package/dist/components/assistant-ui/elements/settings-panel.d.ts +23 -0
- package/dist/components/assistant-ui/elements/settings-panel.js +108 -0
- package/dist/components/assistant-ui/elements/shared-conversation.d.ts +18 -0
- package/dist/components/assistant-ui/elements/shared-conversation.js +56 -0
- package/dist/components/assistant-ui/elements/shiki-highlighter.aui.d.ts +29 -0
- package/dist/components/assistant-ui/elements/shiki-highlighter.aui.js +31 -0
- package/dist/components/assistant-ui/elements/shiki-highlighter.d.ts +26 -0
- package/dist/components/assistant-ui/elements/shiki-highlighter.js +49 -0
- package/dist/components/assistant-ui/elements/sources.aui.d.ts +24 -0
- package/dist/components/assistant-ui/elements/sources.aui.js +121 -0
- package/dist/components/assistant-ui/elements/sources.d.ts +21 -0
- package/dist/components/assistant-ui/elements/sources.js +109 -0
- package/dist/components/assistant-ui/elements/speaker-identity.d.ts +17 -0
- package/dist/components/assistant-ui/elements/speaker-identity.js +45 -0
- package/dist/components/assistant-ui/elements/spec-sheet.d.ts +17 -0
- package/dist/components/assistant-ui/elements/spec-sheet.js +39 -0
- package/dist/components/assistant-ui/elements/stopped-run.d.ts +12 -0
- package/dist/components/assistant-ui/elements/stopped-run.js +44 -0
- package/dist/components/assistant-ui/elements/streaming-text.d.ts +15 -0
- package/dist/components/assistant-ui/elements/streaming-text.js +45 -0
- package/dist/components/assistant-ui/elements/subagent-list.d.ts +17 -0
- package/dist/components/assistant-ui/elements/subagent-list.js +74 -0
- package/dist/components/assistant-ui/elements/suggestions.d.ts +14 -0
- package/dist/components/assistant-ui/elements/suggestions.js +25 -0
- package/dist/components/assistant-ui/elements/surfaces.d.ts +42 -0
- package/dist/components/assistant-ui/elements/surfaces.js +87 -0
- package/dist/components/assistant-ui/elements/syntax-highlighter.d.ts +7 -0
- package/dist/components/assistant-ui/elements/syntax-highlighter.js +41 -0
- package/dist/components/assistant-ui/elements/task-card.aui.d.ts +24 -0
- package/dist/components/assistant-ui/elements/task-card.aui.js +136 -0
- package/dist/components/assistant-ui/elements/task-card.d.ts +22 -0
- package/dist/components/assistant-ui/elements/task-card.js +104 -0
- package/dist/components/assistant-ui/elements/terminal-block.d.ts +27 -0
- package/dist/components/assistant-ui/elements/terminal-block.js +266 -0
- package/dist/components/assistant-ui/elements/thinking-indicator.d.ts +10 -0
- package/dist/components/assistant-ui/elements/thinking-indicator.js +30 -0
- package/dist/components/assistant-ui/elements/thread-list.aui.d.ts +39 -0
- package/dist/components/assistant-ui/elements/thread-list.aui.js +331 -0
- package/dist/components/assistant-ui/elements/thread-list.d.ts +19 -0
- package/dist/components/assistant-ui/elements/thread-list.js +72 -0
- package/dist/components/assistant-ui/elements/thread-search.d.ts +20 -0
- package/dist/components/assistant-ui/elements/thread-search.js +94 -0
- package/dist/components/assistant-ui/elements/thread.aui.d.ts +36 -0
- package/dist/components/assistant-ui/elements/thread.aui.js +625 -0
- package/dist/components/assistant-ui/elements/threadlist-sidebar.aui.d.ts +19 -0
- package/dist/components/assistant-ui/elements/threadlist-sidebar.aui.js +75 -0
- package/dist/components/assistant-ui/elements/timeline.d.ts +18 -0
- package/dist/components/assistant-ui/elements/timeline.js +40 -0
- package/dist/components/assistant-ui/elements/todo-list.d.ts +21 -0
- package/dist/components/assistant-ui/elements/todo-list.js +100 -0
- package/dist/components/assistant-ui/elements/tool-call.d.ts +17 -0
- package/dist/components/assistant-ui/elements/tool-call.js +70 -0
- package/dist/components/assistant-ui/elements/tool-error.d.ts +16 -0
- package/dist/components/assistant-ui/elements/tool-error.js +62 -0
- package/dist/components/assistant-ui/elements/tool-fallback.aui.d.ts +44 -0
- package/dist/components/assistant-ui/elements/tool-fallback.aui.js +542 -0
- package/dist/components/assistant-ui/elements/tool-group.aui.d.ts +37 -0
- package/dist/components/assistant-ui/elements/tool-group.aui.js +104 -0
- package/dist/components/assistant-ui/elements/tool-group.d.ts +20 -0
- package/dist/components/assistant-ui/elements/tool-group.js +71 -0
- package/dist/components/assistant-ui/elements/tool-timeline.d.ts +44 -0
- package/dist/components/assistant-ui/elements/tool-timeline.js +109 -0
- package/dist/components/assistant-ui/elements/tooltip-icon-button.d.ts +12 -0
- package/dist/components/assistant-ui/elements/tooltip-icon-button.js +30 -0
- package/dist/components/assistant-ui/elements/trace-waterfall.d.ts +33 -0
- package/dist/components/assistant-ui/elements/trace-waterfall.js +102 -0
- package/dist/components/assistant-ui/elements/typing-indicator.d.ts +9 -0
- package/dist/components/assistant-ui/elements/typing-indicator.js +45 -0
- package/dist/components/assistant-ui/elements/voice-conversation.aui.d.ts +11 -0
- package/dist/components/assistant-ui/elements/voice-conversation.aui.js +54 -0
- package/dist/components/assistant-ui/elements/voice-conversation.d.ts +21 -0
- package/dist/components/assistant-ui/elements/voice-conversation.js +110 -0
- package/dist/components/assistant-ui/elements/voice.aui.d.ts +22 -0
- package/dist/components/assistant-ui/elements/voice.aui.js +100 -0
- package/dist/components/assistant-ui/elements/voice.d.ts +15 -0
- package/dist/components/assistant-ui/elements/voice.js +400 -0
- package/dist/components/assistant-ui/elements/web-preview.d.ts +18 -0
- package/dist/components/assistant-ui/elements/web-preview.js +61 -0
- package/dist/components/assistant-ui/elements/web-search.d.ts +17 -0
- package/dist/components/assistant-ui/elements/web-search.js +54 -0
- package/dist/components/assistant-ui/utils/href.d.ts +13 -0
- package/dist/components/assistant-ui/utils/href.js +39 -0
- package/dist/components/assistant-ui/utils/range.d.ts +22 -0
- package/dist/components/assistant-ui/utils/range.js +48 -0
- package/dist/components/assistant-ui/utils/task.d.ts +14 -0
- package/dist/components/assistant-ui/utils/task.js +75 -0
- package/dist/components/icons/github.js +13 -0
- package/dist/components/theme-provider.d.ts +16 -0
- package/dist/components/theme-provider.js +116 -0
- package/dist/components/ui/accordion.d.ts +8 -0
- package/dist/components/ui/accordion.js +53 -0
- package/dist/components/ui/alert-dialog.d.ts +20 -0
- package/dist/components/ui/alert-dialog.js +93 -0
- package/dist/components/ui/alert.d.ts +12 -0
- package/dist/components/ui/alert.js +42 -0
- package/dist/components/ui/aspect-ratio.d.ts +6 -0
- package/dist/components/ui/aspect-ratio.js +13 -0
- package/dist/components/ui/attachment.d.ts +25 -0
- package/dist/components/ui/attachment.js +103 -0
- package/dist/components/ui/avatar.d.ts +13 -0
- package/dist/components/ui/avatar.js +50 -0
- package/dist/components/ui/badge.d.ts +14 -0
- package/dist/components/ui/badge.js +30 -0
- package/dist/components/ui/breadcrumb.d.ts +12 -0
- package/dist/components/ui/breadcrumb.js +71 -0
- package/dist/components/ui/bubble.d.ts +18 -0
- package/dist/components/ui/bubble.js +72 -0
- package/dist/components/ui/button-group.d.ts +12 -0
- package/dist/components/ui/button-group.js +41 -0
- package/dist/components/ui/button.d.ts +19 -0
- package/dist/components/ui/button.js +71 -0
- package/dist/components/ui/calendar.d.ts +12 -0
- package/dist/components/ui/calendar.js +108 -0
- package/dist/components/ui/card.d.ts +13 -0
- package/dist/components/ui/card.js +55 -0
- package/dist/components/ui/carousel.d.ts +30 -0
- package/dist/components/ui/carousel.js +131 -0
- package/dist/components/ui/chart.d.ts +46 -0
- package/dist/components/ui/chart.js +148 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.js +20 -0
- package/dist/components/ui/collapsible.d.ts +7 -0
- package/dist/components/ui/collapsible.js +23 -0
- package/dist/components/ui/combobox.d.ts +26 -0
- package/dist/components/ui/combobox.js +161 -0
- package/dist/components/ui/command.d.ts +21 -0
- package/dist/components/ui/command.js +87 -0
- package/dist/components/ui/context-menu.d.ts +31 -0
- package/dist/components/ui/context-menu.js +132 -0
- package/dist/components/ui/dialog.d.ts +19 -0
- package/dist/components/ui/dialog.js +91 -0
- package/dist/components/ui/diff-viewer.d.ts +100 -0
- package/dist/components/ui/diff-viewer.js +461 -0
- package/dist/components/ui/direction.d.ts +2 -0
- package/dist/components/ui/direction.js +2 -0
- package/dist/components/ui/dot-matrix.d.ts +150 -0
- package/dist/components/ui/dot-matrix.js +248 -0
- package/dist/components/ui/drawer.d.ts +18 -0
- package/dist/components/ui/drawer.js +123 -0
- package/dist/components/ui/dropdown-menu.d.ts +31 -0
- package/dist/components/ui/dropdown-menu.js +136 -0
- package/dist/components/ui/empty.d.ts +13 -0
- package/dist/components/ui/empty.js +59 -0
- package/dist/components/ui/field.d.ts +26 -0
- package/dist/components/ui/field.js +109 -0
- package/dist/components/ui/hover-card.d.ts +7 -0
- package/dist/components/ui/hover-card.js +36 -0
- package/dist/components/ui/input-group.d.ts +20 -0
- package/dist/components/ui/input-group.js +77 -0
- package/dist/components/ui/input-otp.d.ts +13 -0
- package/dist/components/ui/input-otp.js +46 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/input.js +14 -0
- package/dist/components/ui/item.d.ts +24 -0
- package/dist/components/ui/item.js +120 -0
- package/dist/components/ui/kbd.d.ts +5 -0
- package/dist/components/ui/kbd.js +19 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/label.js +12 -0
- package/dist/components/ui/marker.d.ts +12 -0
- package/dist/components/ui/marker.js +42 -0
- package/dist/components/ui/menubar.d.ts +31 -0
- package/dist/components/ui/menubar.js +135 -0
- package/dist/components/ui/message-scroller.d.ts +12 -0
- package/dist/components/ui/message-scroller.js +59 -0
- package/dist/components/ui/message.d.ts +12 -0
- package/dist/components/ui/message.js +48 -0
- package/dist/components/ui/native-select.d.ts +10 -0
- package/dist/components/ui/native-select.js +37 -0
- package/dist/components/ui/navigation-menu.d.ts +13 -0
- package/dist/components/ui/navigation-menu.js +82 -0
- package/dist/components/ui/number-roll.d.ts +21 -0
- package/dist/components/ui/number-roll.js +269 -0
- package/dist/components/ui/pagination.d.ts +19 -0
- package/dist/components/ui/pagination.js +79 -0
- package/dist/components/ui/popover.d.ts +11 -0
- package/dist/components/ui/popover.js +54 -0
- package/dist/components/ui/progress.d.ts +9 -0
- package/dist/components/ui/progress.js +44 -0
- package/dist/components/ui/questionnaire.d.ts +21 -0
- package/dist/components/ui/questionnaire.js +169 -0
- package/dist/components/ui/radio-group.d.ts +7 -0
- package/dist/components/ui/radio-group.js +26 -0
- package/dist/components/ui/resizable.d.ts +9 -0
- package/dist/components/ui/resizable.js +28 -0
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area.js +35 -0
- package/dist/components/ui/select.d.ts +17 -0
- package/dist/components/ui/select.js +96 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.js +14 -0
- package/dist/components/ui/sheet.d.ts +16 -0
- package/dist/components/ui/sheet.js +87 -0
- package/dist/components/ui/sidebar.d.ts +65 -0
- package/dist/components/ui/sidebar.js +386 -0
- package/dist/components/ui/skeleton.d.ts +4 -0
- package/dist/components/ui/skeleton.js +12 -0
- package/dist/components/ui/slider.d.ts +5 -0
- package/dist/components/ui/slider.js +33 -0
- package/dist/components/ui/spinner.d.ts +4 -0
- package/dist/components/ui/spinner.js +15 -0
- package/dist/components/ui/switch.d.ts +7 -0
- package/dist/components/ui/switch.js +19 -0
- package/dist/components/ui/table.d.ts +12 -0
- package/dist/components/ui/table.js +65 -0
- package/dist/components/ui/tabs.d.ts +12 -0
- package/dist/components/ui/tabs.js +45 -0
- package/dist/components/ui/textarea.d.ts +5 -0
- package/dist/components/ui/textarea.js +12 -0
- package/dist/components/ui/toast.d.ts +18 -0
- package/dist/components/ui/toast.js +121 -0
- package/dist/components/ui/toggle-group.d.ts +13 -0
- package/dist/components/ui/toggle-group.js +51 -0
- package/dist/components/ui/toggle.d.ts +10 -0
- package/dist/components/ui/toggle.js +35 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.js +43 -0
- package/dist/compositions/app-rail/app-rail.d.ts +19 -0
- package/dist/compositions/app-rail/app-rail.js +58 -0
- package/dist/compositions/app-shell/app-shell.d.ts +56 -0
- package/dist/compositions/app-shell/app-shell.js +143 -0
- package/dist/compositions/app-shell/theme-toggle.d.ts +10 -0
- package/dist/compositions/app-shell/theme-toggle.js +65 -0
- package/dist/compositions/confirm-action/confirm-action.d.ts +48 -0
- package/dist/compositions/confirm-action/confirm-action.js +48 -0
- package/dist/compositions/data-table/data-table-state.d.ts +23 -0
- package/dist/compositions/data-table/data-table-state.js +46 -0
- package/dist/compositions/data-table/data-table.d.ts +185 -0
- package/dist/compositions/data-table/data-table.js +615 -0
- package/dist/compositions/date-range-picker/date-range-options.d.ts +28 -0
- package/dist/compositions/date-range-picker/date-range-options.js +61 -0
- package/dist/compositions/date-range-picker/date-range-picker.d.ts +55 -0
- package/dist/compositions/date-range-picker/date-range-picker.js +409 -0
- package/dist/compositions/decision-queue/decision-queue.d.ts +114 -0
- package/dist/compositions/decision-queue/decision-queue.js +478 -0
- package/dist/compositions/event-feed/event-feed.d.ts +59 -0
- package/dist/compositions/event-feed/event-feed.js +105 -0
- package/dist/compositions/feedback.d.ts +20 -0
- package/dist/compositions/feedback.js +49 -0
- package/dist/compositions/fields.d.ts +64 -0
- package/dist/compositions/fields.js +293 -0
- package/dist/compositions/form-kit/form-context.d.ts +10 -0
- package/dist/compositions/form-kit/form-context.js +12 -0
- package/dist/compositions/form-kit/form-fields.d.ts +95 -0
- package/dist/compositions/form-kit/form-fields.js +233 -0
- package/dist/compositions/form-kit/form-kit.d.ts +128 -0
- package/dist/compositions/form-kit/form-kit.js +119 -0
- package/dist/compositions/inspector/inspector.d.ts +53 -0
- package/dist/compositions/inspector/inspector.js +80 -0
- package/dist/compositions/layout.d.ts +36 -0
- package/dist/compositions/layout.js +86 -0
- package/dist/compositions/state-blocks/state-blocks.d.ts +42 -0
- package/dist/compositions/state-blocks/state-blocks.js +81 -0
- package/dist/compositions/status-panel/status-panel.d.ts +94 -0
- package/dist/compositions/status-panel/status-panel.js +189 -0
- package/dist/fonts/InterVariable.woff2 +0 -0
- package/dist/fonts/inter.css +15 -0
- package/dist/hooks/use-attachment-src.js +35 -0
- package/dist/hooks/use-copy-to-clipboard.js +34 -0
- package/dist/hooks/use-mobile.d.ts +3 -0
- package/dist/hooks/use-mobile.js +18 -0
- package/dist/index.d.ts +102 -0
- package/dist/index.js +102 -0
- package/dist/lib/context-level.js +7 -0
- package/dist/lib/elapsed.js +61 -0
- package/dist/lib/iso-date.js +30 -0
- package/dist/lib/motion-loop.js +41 -0
- package/dist/lib/pointer.js +14 -0
- package/dist/lib/status-tone.d.ts +7 -0
- package/dist/lib/status-tone.js +55 -0
- package/dist/lib/triage-keys.js +229 -0
- package/dist/lib/utils.js +2 -0
- package/dist/motion/alert-toast/alert-toast.d.ts +51 -0
- package/dist/motion/alert-toast/alert-toast.js +226 -0
- package/dist/motion/branch-menu/branch-menu.d.ts +47 -0
- package/dist/motion/branch-menu/branch-menu.js +287 -0
- package/dist/motion/check-item/check-item.d.ts +24 -0
- package/dist/motion/check-item/check-item.js +110 -0
- package/dist/motion/dial/dial.d.ts +39 -0
- package/dist/motion/dial/dial.js +290 -0
- package/dist/motion/dictation-button/dictation-button.d.ts +45 -0
- package/dist/motion/dictation-button/dictation-button.js +232 -0
- package/dist/motion/hold-button/hold-button.d.ts +37 -0
- package/dist/motion/hold-button/hold-button.js +192 -0
- package/dist/motion/masonry-grid/masonry-grid.d.ts +42 -0
- package/dist/motion/masonry-grid/masonry-grid.js +145 -0
- package/dist/motion/prompt-composer/prompt-composer.d.ts +90 -0
- package/dist/motion/prompt-composer/prompt-composer.js +374 -0
- package/dist/motion/scrub-select/scrub-select.d.ts +33 -0
- package/dist/motion/scrub-select/scrub-select.js +346 -0
- package/dist/motion/spotlight-grid/spotlight-grid.d.ts +40 -0
- package/dist/motion/spotlight-grid/spotlight-grid.js +171 -0
- package/dist/motion/star-rating/star-rating.d.ts +32 -0
- package/dist/motion/star-rating/star-rating.js +191 -0
- package/dist/motion/status-glyph/status-glyph.d.ts +28 -0
- package/dist/motion/status-glyph/status-glyph.js +171 -0
- package/dist/motion/stepper/stepper.d.ts +56 -0
- package/dist/motion/stepper/stepper.js +211 -0
- package/dist/motion/swipe-row/swipe-row.d.ts +52 -0
- package/dist/motion/swipe-row/swipe-row.js +208 -0
- package/dist/motion/thinking-trace/thinking-trace.d.ts +32 -0
- package/dist/motion/thinking-trace/thinking-trace.js +186 -0
- package/dist/motion/tool-call-chip/tool-call-chip.d.ts +36 -0
- package/dist/motion/tool-call-chip/tool-call-chip.js +135 -0
- package/dist/motion/working-indicator/working-indicator.d.ts +38 -0
- package/dist/motion/working-indicator/working-indicator.js +171 -0
- package/dist/styles.css +828 -0
- package/dist/tokens.css +230 -0
- package/licenses/Inter-OFL.txt +92 -0
- package/licenses/assistant-ui-MIT.txt +21 -0
- package/licenses/shadcn-MIT.md +21 -0
- package/package.json +131 -3
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { Kbd, KbdGroup } from "../components/ui/kbd.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { cn } from "cn";
|
|
5
|
+
import { useLatest } from "ahooks";
|
|
6
|
+
//#region src/lib/triage-keys.tsx
|
|
7
|
+
/** Marks an element as a triage target; its value is the target's key. */
|
|
8
|
+
const TRIAGE_TARGET_ATTRIBUTE = "data-queue-target";
|
|
9
|
+
/** Whether keys pressed in `target` belong to a text field rather than the triage list. */
|
|
10
|
+
function isEditableTarget(target) {
|
|
11
|
+
if (target instanceof HTMLElement && target.isContentEditable) return true;
|
|
12
|
+
return target.closest("input, textarea, select, [contenteditable]:not([contenteditable='false'])") !== null;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Widgets that own their arrow and letter keys. A step key pressed with
|
|
16
|
+
* focus inside one of them belongs to the widget, not the page, so the
|
|
17
|
+
* page-level entry into a triage list leaves it alone.
|
|
18
|
+
*/
|
|
19
|
+
const KEY_OWNING_WIDGETS = "[role=dialog], [role=alertdialog], [role=menu], [role=menubar], [role=listbox], [role=combobox], [role=tree], [role=grid], [role=tablist], [role=radiogroup], [role=slider], [role=spinbutton]";
|
|
20
|
+
/** How a key reads in a hint or a key chip. */
|
|
21
|
+
function triageKeyLabel(key) {
|
|
22
|
+
switch (key) {
|
|
23
|
+
case "ArrowDown": return "↓";
|
|
24
|
+
case "ArrowUp": return "↑";
|
|
25
|
+
case " ": return "Space";
|
|
26
|
+
default: return key;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The keys that still navigate, paired by direction: a keymap that takes `j`
|
|
31
|
+
* or `k` for an action leaves just the arrow for that direction.
|
|
32
|
+
*/
|
|
33
|
+
function triageNavigation(keymap) {
|
|
34
|
+
return [{
|
|
35
|
+
label: "next",
|
|
36
|
+
keys: [keymap?.j === void 0 ? "j" : null, "ArrowDown"]
|
|
37
|
+
}, {
|
|
38
|
+
label: "previous",
|
|
39
|
+
keys: [keymap?.k === void 0 ? "k" : null, "ArrowUp"]
|
|
40
|
+
}].map(({ label, keys }) => ({
|
|
41
|
+
label,
|
|
42
|
+
keys: keys.filter((key) => key !== null)
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
/** The keys mapped to each action, in keymap order, for actions that exist. */
|
|
46
|
+
function triageShortcuts(keymap, hasAction) {
|
|
47
|
+
const shortcuts = /* @__PURE__ */ new Map();
|
|
48
|
+
for (const [key, action] of Object.entries(keymap ?? {})) {
|
|
49
|
+
if (!hasAction(action)) continue;
|
|
50
|
+
shortcuts.set(action, [...shortcuts.get(action) ?? [], key]);
|
|
51
|
+
}
|
|
52
|
+
return shortcuts;
|
|
53
|
+
}
|
|
54
|
+
/** The key as a word, for the copy assistive tech reads. */
|
|
55
|
+
const spokenKeyLabel = (key) => key === " " ? "Space" : key;
|
|
56
|
+
/** The hint line as one sentence, for the copy assistive tech reads. */
|
|
57
|
+
function spokenHints(keymap, hints) {
|
|
58
|
+
return `Keyboard: ${[...triageNavigation(keymap).map(({ label, keys }) => `${keys.map(spokenKeyLabel).join(" or ")} ${label}`), ...hints.map((hint) => `${spokenKeyLabel(hint.key)} ${hint.label}`)].join(", ")}.`;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The key hints line: navigation keys paired by direction, then each hint in
|
|
62
|
+
* order. The visual line is hidden where there is no keyboard (a touch
|
|
63
|
+
* screen, a narrow list, an empty one), but the `id` it is known by - the
|
|
64
|
+
* list's `aria-describedby` target - lands on a visually hidden copy that is
|
|
65
|
+
* always rendered, so assistive tech always gets the description: an element
|
|
66
|
+
* with `display: none` describes nothing.
|
|
67
|
+
*/
|
|
68
|
+
function TriageKeyHints({ keymap, hints, className, id, hidden, ...props }) {
|
|
69
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("p", {
|
|
70
|
+
id,
|
|
71
|
+
className: "sr-only",
|
|
72
|
+
children: spokenHints(keymap, hints)
|
|
73
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
74
|
+
"aria-hidden": "true",
|
|
75
|
+
hidden,
|
|
76
|
+
className: cn("flex flex-wrap items-center gap-x-3 gap-y-1 text-muted-foreground pointer-coarse:hidden", className),
|
|
77
|
+
...props,
|
|
78
|
+
children: [triageNavigation(keymap).map(({ label, keys }) => /* @__PURE__ */ jsxs("span", {
|
|
79
|
+
className: "inline-flex items-center gap-1",
|
|
80
|
+
children: [/* @__PURE__ */ jsx(KbdGroup, { children: keys.map((key, index) => /* @__PURE__ */ jsxs(React.Fragment, { children: [index > 0 ? /* @__PURE__ */ jsx("span", {
|
|
81
|
+
"aria-hidden": "true",
|
|
82
|
+
children: "/"
|
|
83
|
+
}) : null, /* @__PURE__ */ jsx(Kbd, { children: triageKeyLabel(key) })] }, key)) }), label]
|
|
84
|
+
}, label)), hints.map((hint) => /* @__PURE__ */ jsxs("span", {
|
|
85
|
+
className: "inline-flex items-center gap-1",
|
|
86
|
+
children: [/* @__PURE__ */ jsx(Kbd, { children: triageKeyLabel(hint.key) }), hint.label]
|
|
87
|
+
}, hint.key))]
|
|
88
|
+
})] });
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* The key chip inside an action button. Hidden on touch screens; `className`
|
|
92
|
+
* hides it in other places too, such as a narrow list.
|
|
93
|
+
*/
|
|
94
|
+
function TriageKbd({ shortcut, className }) {
|
|
95
|
+
return /* @__PURE__ */ jsx(Kbd, {
|
|
96
|
+
"aria-hidden": "true",
|
|
97
|
+
className: cn("ml-0.5 h-4 min-w-4 border border-current/25 bg-transparent text-current pointer-coarse:hidden", className),
|
|
98
|
+
children: triageKeyLabel(shortcut)
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The shared triage key handling. Spread `handlers` on the list's container
|
|
103
|
+
* (and attach `containerRef`), give each target `registerTarget(key)` as its
|
|
104
|
+
* ref and `{ [TRIAGE_TARGET_ATTRIBUTE]: key }`, and render `announcement` in a
|
|
105
|
+
* polite live region. Handled keys never reach window listeners, such as the
|
|
106
|
+
* ThemeProvider's bare `d` dark-mode toggle. Keys are ignored while focus is
|
|
107
|
+
* in a text field and while a modifier is held.
|
|
108
|
+
*
|
|
109
|
+
* A step key also enters the list from the page, through a window listener:
|
|
110
|
+
* `j`/`k` (when the keymap leaves them free) or an arrow pressed with focus
|
|
111
|
+
* anywhere outside the list moves the cursor to the target it is already on,
|
|
112
|
+
* without stepping past it. Action keys never enter - a decision always
|
|
113
|
+
* needs a focused target - and neither do arrows pressed on a focused
|
|
114
|
+
* control (they keep their native behaviour), keys in a text field or in a
|
|
115
|
+
* widget that owns them (a dialog, a menu), or any key while a modal is open
|
|
116
|
+
* or the list is empty; there the key keeps its native behaviour too.
|
|
117
|
+
*/
|
|
118
|
+
function useTriageKeyboard(options) {
|
|
119
|
+
const { keymap, hasAction, activeKey, modalOpen = false, onAction, onStep, onOtherKey, onFocusTarget } = options;
|
|
120
|
+
const containerRef = React.useRef(null);
|
|
121
|
+
const targetElements = React.useRef(/* @__PURE__ */ new Map());
|
|
122
|
+
const lastFocused = React.useRef(null);
|
|
123
|
+
const [announcement, setAnnouncement] = React.useState("");
|
|
124
|
+
const [cursorVisible, setCursorVisible] = React.useState(false);
|
|
125
|
+
const latest = useLatest({
|
|
126
|
+
keymap,
|
|
127
|
+
activeKey,
|
|
128
|
+
modalOpen,
|
|
129
|
+
onStep
|
|
130
|
+
});
|
|
131
|
+
const registerTarget = React.useCallback((key) => (element) => {
|
|
132
|
+
if (element) targetElements.current.set(key, element);
|
|
133
|
+
else targetElements.current.delete(key);
|
|
134
|
+
}, []);
|
|
135
|
+
const targetElement = React.useCallback((key) => targetElements.current.get(key), []);
|
|
136
|
+
const targetKeyOf = React.useCallback((element) => element?.closest(`[data-queue-target]`)?.getAttribute("data-queue-target") ?? null, []);
|
|
137
|
+
/**
|
|
138
|
+
* Whether focus fell to the page because the element that had it inside
|
|
139
|
+
* the list left the DOM (its row was decided away), so the list should
|
|
140
|
+
* carry focus to the cursor's new target.
|
|
141
|
+
*/
|
|
142
|
+
const focusLost = React.useCallback(() => {
|
|
143
|
+
const focused = document.activeElement;
|
|
144
|
+
return (!focused || focused === document.body) && lastFocused.current !== null && !lastFocused.current.isConnected;
|
|
145
|
+
}, []);
|
|
146
|
+
const consume = (event) => {
|
|
147
|
+
event.preventDefault();
|
|
148
|
+
event.stopPropagation();
|
|
149
|
+
};
|
|
150
|
+
const onKeyDown = (event) => {
|
|
151
|
+
const element = event.target;
|
|
152
|
+
const modified = event.metaKey || event.ctrlKey || event.altKey;
|
|
153
|
+
if (!containerRef.current?.contains(element)) {
|
|
154
|
+
if (modalOpen && !modified && event.key !== "Escape" && event.key !== "Tab" && keymap?.[event.key] !== void 0) event.stopPropagation();
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
if (event.defaultPrevented || modified || isEditableTarget(element)) return;
|
|
158
|
+
if (modalOpen) return;
|
|
159
|
+
const mapped = keymap?.[event.key];
|
|
160
|
+
if (mapped !== void 0 && hasAction(mapped)) {
|
|
161
|
+
consume(event);
|
|
162
|
+
setCursorVisible(true);
|
|
163
|
+
const key = targetKeyOf(element) ?? activeKey;
|
|
164
|
+
if (!event.repeat && key !== null) onAction(mapped, key);
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
const step = event.key === "ArrowDown" || event.key === "j" ? 1 : event.key === "ArrowUp" || event.key === "k" ? -1 : 0;
|
|
168
|
+
if (step !== 0) {
|
|
169
|
+
consume(event);
|
|
170
|
+
setCursorVisible(true);
|
|
171
|
+
onStep(targetKeyOf(element) ?? activeKey, step);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
if (onOtherKey?.(event, element)) consume(event);
|
|
175
|
+
};
|
|
176
|
+
const onFocus = (event) => {
|
|
177
|
+
const container = containerRef.current;
|
|
178
|
+
if (!container?.contains(event.target)) return;
|
|
179
|
+
lastFocused.current = event.target;
|
|
180
|
+
setCursorVisible(event.target.matches(":focus-visible"));
|
|
181
|
+
const key = targetKeyOf(event.target);
|
|
182
|
+
if (key !== null) {
|
|
183
|
+
const previous = event.relatedTarget;
|
|
184
|
+
onFocusTarget(key, !(previous instanceof Node && container.contains(previous)));
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
const onBlur = (event) => {
|
|
188
|
+
const next = event.relatedTarget;
|
|
189
|
+
if (next && containerRef.current?.contains(next)) return;
|
|
190
|
+
setAnnouncement("");
|
|
191
|
+
setCursorVisible(false);
|
|
192
|
+
if (next) lastFocused.current = null;
|
|
193
|
+
};
|
|
194
|
+
React.useEffect(() => {
|
|
195
|
+
const onPageKeyDown = (event) => {
|
|
196
|
+
const { keymap, activeKey, modalOpen, onStep } = latest.current;
|
|
197
|
+
const container = containerRef.current;
|
|
198
|
+
const target = event.target;
|
|
199
|
+
if (!container?.isConnected || targetElements.current.size === 0 || modalOpen || event.defaultPrevented || event.metaKey || event.ctrlKey || event.altKey || event.shiftKey || event.isComposing || event.keyCode === 229 || !(target instanceof Element) || container.contains(target) || isEditableTarget(target) || target.closest(KEY_OWNING_WIDGETS) !== null) return;
|
|
200
|
+
const arrows = event.key === "ArrowDown" || event.key === "ArrowUp";
|
|
201
|
+
const letters = (event.key === "j" || event.key === "k") && keymap?.[event.key] === void 0;
|
|
202
|
+
if (!arrows && !letters) return;
|
|
203
|
+
if (arrows && target !== document.body && target !== document.documentElement) return;
|
|
204
|
+
event.preventDefault();
|
|
205
|
+
event.stopPropagation();
|
|
206
|
+
setCursorVisible(true);
|
|
207
|
+
onStep(activeKey, 0);
|
|
208
|
+
};
|
|
209
|
+
window.addEventListener("keydown", onPageKeyDown);
|
|
210
|
+
return () => window.removeEventListener("keydown", onPageKeyDown);
|
|
211
|
+
}, [latest]);
|
|
212
|
+
return {
|
|
213
|
+
containerRef,
|
|
214
|
+
registerTarget,
|
|
215
|
+
targetElement,
|
|
216
|
+
targetKeyOf,
|
|
217
|
+
focusLost,
|
|
218
|
+
cursorVisible,
|
|
219
|
+
announcement,
|
|
220
|
+
announce: setAnnouncement,
|
|
221
|
+
handlers: {
|
|
222
|
+
onKeyDown,
|
|
223
|
+
onFocus,
|
|
224
|
+
onBlur
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
//#endregion
|
|
229
|
+
export { TRIAGE_TARGET_ATTRIBUTE, TriageKbd, TriageKeyHints, isEditableTarget, triageKeyLabel, triageNavigation, triageShortcuts, useTriageKeyboard };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
//#region src/motion/alert-toast/alert-toast.d.ts
|
|
3
|
+
export type AlertToastTone = "default" | "success" | "info" | "warning" | "error";
|
|
4
|
+
/** Why the toast asked to close. */
|
|
5
|
+
export type AlertToastCloseReason = "timeout" | "swipe" | "escape" | "close" | "action";
|
|
6
|
+
export type AlertToastSide = "top" | "bottom";
|
|
7
|
+
export interface AlertToastAction {
|
|
8
|
+
label: string;
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
}
|
|
11
|
+
export interface AlertToastProps {
|
|
12
|
+
/** Whether the alert shows (controlled). */
|
|
13
|
+
open: boolean;
|
|
14
|
+
/** The alert asked to close; set `open` to false here. */
|
|
15
|
+
onOpenChange: (open: boolean, reason: AlertToastCloseReason) => void;
|
|
16
|
+
title: React.ReactNode;
|
|
17
|
+
description?: React.ReactNode;
|
|
18
|
+
/** Sets the icon and the timeout bar's colour. */
|
|
19
|
+
tone?: AlertToastTone;
|
|
20
|
+
/** One action button. Pressing it runs `onClick`, then closes the alert. */
|
|
21
|
+
action?: AlertToastAction;
|
|
22
|
+
/**
|
|
23
|
+
* Milliseconds before the alert closes itself. The timeout bar shows what is
|
|
24
|
+
* left, and the countdown pauses while the alert is hovered or focused and
|
|
25
|
+
* while the document is hidden. `0` keeps the alert until it is dismissed.
|
|
26
|
+
* Default 6000.
|
|
27
|
+
*/
|
|
28
|
+
duration?: number;
|
|
29
|
+
/** `high` announces the alert assertively. Default `low`. */
|
|
30
|
+
priority?: "low" | "high";
|
|
31
|
+
/**
|
|
32
|
+
* Screen edge. Default `top`, so alerts never cover the app's `Toaster`
|
|
33
|
+
* stack at the bottom. A top alert swipes away up or right, a bottom one
|
|
34
|
+
* down or right.
|
|
35
|
+
*/
|
|
36
|
+
side?: AlertToastSide;
|
|
37
|
+
className?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A single controlled alert for proactive, agent-raised news. It renders
|
|
41
|
+
* through admin-ui's toast primitives (`components/ui/toast`) in its own
|
|
42
|
+
* viewport, alongside the app's `Toaster`, never in place of it.
|
|
43
|
+
*
|
|
44
|
+
* Swipe or flick it away, press Escape while it has focus, or use its close
|
|
45
|
+
* button. A timeout bar burns down while it waits; the countdown pauses while
|
|
46
|
+
* the alert is hovered or focused and while the document is hidden.
|
|
47
|
+
*
|
|
48
|
+
* Behavior reference: reactbits swipe-toast.
|
|
49
|
+
*/
|
|
50
|
+
export declare function AlertToast({ open, onOpenChange, title, description, tone, action, duration, priority, side, className }: AlertToastProps): React.JSX.Element;
|
|
51
|
+
//#endregion
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { Button } from "../../components/ui/button.js";
|
|
2
|
+
import { Toast, ToastAction, ToastContent, ToastDescription, ToastPortal, ToastProvider, ToastTitle, ToastViewport, createToastManager, useToastManager } from "../../components/ui/toast.js";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { cn } from "cn";
|
|
6
|
+
import { CircleCheckIcon, InfoIcon, OctagonXIcon, TriangleAlertIcon, XIcon } from "lucide-react";
|
|
7
|
+
import { useDocumentVisibility, useLatest } from "ahooks";
|
|
8
|
+
import { animate, motion, useMotionValue, useReducedMotionConfig } from "motion/react";
|
|
9
|
+
//#region src/motion/alert-toast/alert-toast.tsx
|
|
10
|
+
const toneIcon = {
|
|
11
|
+
default: null,
|
|
12
|
+
success: /* @__PURE__ */ jsx(CircleCheckIcon, { "aria-hidden": "true" }),
|
|
13
|
+
info: /* @__PURE__ */ jsx(InfoIcon, { "aria-hidden": "true" }),
|
|
14
|
+
warning: /* @__PURE__ */ jsx(TriangleAlertIcon, { "aria-hidden": "true" }),
|
|
15
|
+
error: /* @__PURE__ */ jsx(OctagonXIcon, {
|
|
16
|
+
"aria-hidden": "true",
|
|
17
|
+
className: "text-destructive"
|
|
18
|
+
})
|
|
19
|
+
};
|
|
20
|
+
const fuseTone = {
|
|
21
|
+
default: "bg-primary",
|
|
22
|
+
success: "bg-chart-2",
|
|
23
|
+
info: "bg-muted-foreground",
|
|
24
|
+
warning: "bg-chart-4 dark:bg-chart-3",
|
|
25
|
+
error: "bg-destructive"
|
|
26
|
+
};
|
|
27
|
+
const topToast = "top-0 bottom-auto origin-top data-starting-style:[transform:translateY(-150%)] [&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(-150%)] after:top-auto after:bottom-full";
|
|
28
|
+
const topViewport = "top-4 bottom-auto";
|
|
29
|
+
/**
|
|
30
|
+
* A single controlled alert for proactive, agent-raised news. It renders
|
|
31
|
+
* through admin-ui's toast primitives (`components/ui/toast`) in its own
|
|
32
|
+
* viewport, alongside the app's `Toaster`, never in place of it.
|
|
33
|
+
*
|
|
34
|
+
* Swipe or flick it away, press Escape while it has focus, or use its close
|
|
35
|
+
* button. A timeout bar burns down while it waits; the countdown pauses while
|
|
36
|
+
* the alert is hovered or focused and while the document is hidden.
|
|
37
|
+
*
|
|
38
|
+
* Behavior reference: reactbits swipe-toast.
|
|
39
|
+
*/
|
|
40
|
+
function AlertToast({ open, onOpenChange, title, description, tone = "default", action, duration = 6e3, priority = "low", side = "top", className }) {
|
|
41
|
+
const [manager] = React.useState(() => createToastManager());
|
|
42
|
+
const idRef = React.useRef(null);
|
|
43
|
+
const reasonRef = React.useRef(null);
|
|
44
|
+
const onOpenChangeRef = useLatest(onOpenChange);
|
|
45
|
+
const tag = React.useCallback((reason) => {
|
|
46
|
+
reasonRef.current = reason;
|
|
47
|
+
}, []);
|
|
48
|
+
const close = React.useCallback((reason) => {
|
|
49
|
+
reasonRef.current = reason;
|
|
50
|
+
if (idRef.current) manager.close(idRef.current);
|
|
51
|
+
}, [manager]);
|
|
52
|
+
const data = {
|
|
53
|
+
tone,
|
|
54
|
+
action
|
|
55
|
+
};
|
|
56
|
+
const contentRef = useLatest({
|
|
57
|
+
title,
|
|
58
|
+
description,
|
|
59
|
+
priority,
|
|
60
|
+
data
|
|
61
|
+
});
|
|
62
|
+
React.useEffect(() => {
|
|
63
|
+
if (open && !idRef.current) {
|
|
64
|
+
reasonRef.current = null;
|
|
65
|
+
idRef.current = manager.add({
|
|
66
|
+
...contentRef.current,
|
|
67
|
+
timeout: 0,
|
|
68
|
+
onClose: () => {
|
|
69
|
+
if (idRef.current === null) return;
|
|
70
|
+
idRef.current = null;
|
|
71
|
+
const reason = reasonRef.current ?? "swipe";
|
|
72
|
+
reasonRef.current = null;
|
|
73
|
+
onOpenChangeRef.current(false, reason);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
} else if (!open && idRef.current) {
|
|
77
|
+
const id = idRef.current;
|
|
78
|
+
idRef.current = null;
|
|
79
|
+
manager.close(id);
|
|
80
|
+
}
|
|
81
|
+
}, [
|
|
82
|
+
open,
|
|
83
|
+
manager,
|
|
84
|
+
contentRef,
|
|
85
|
+
onOpenChangeRef
|
|
86
|
+
]);
|
|
87
|
+
React.useEffect(() => {
|
|
88
|
+
if (idRef.current) manager.update(idRef.current, {
|
|
89
|
+
title,
|
|
90
|
+
description,
|
|
91
|
+
priority,
|
|
92
|
+
data
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
React.useEffect(() => () => {
|
|
96
|
+
if (idRef.current) manager.close(idRef.current);
|
|
97
|
+
}, [manager]);
|
|
98
|
+
return /* @__PURE__ */ jsx(ToastProvider, {
|
|
99
|
+
toastManager: manager,
|
|
100
|
+
timeout: 0,
|
|
101
|
+
children: /* @__PURE__ */ jsx(ToastPortal, { children: /* @__PURE__ */ jsx(ToastViewport, {
|
|
102
|
+
"data-slot": "alert-toast-viewport",
|
|
103
|
+
"aria-label": "Alerts",
|
|
104
|
+
className: cn(side === "top" && topViewport),
|
|
105
|
+
children: /* @__PURE__ */ jsx(AlertToastList, {
|
|
106
|
+
duration,
|
|
107
|
+
side,
|
|
108
|
+
className,
|
|
109
|
+
onClose: close,
|
|
110
|
+
onTag: tag
|
|
111
|
+
})
|
|
112
|
+
}) })
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
function AlertToastList({ duration, side, className, onClose, onTag }) {
|
|
116
|
+
const { toasts } = useToastManager();
|
|
117
|
+
return toasts.map((item) => /* @__PURE__ */ jsx(AlertToastItem, {
|
|
118
|
+
item,
|
|
119
|
+
duration,
|
|
120
|
+
side,
|
|
121
|
+
className,
|
|
122
|
+
onClose,
|
|
123
|
+
onTag
|
|
124
|
+
}, item.id));
|
|
125
|
+
}
|
|
126
|
+
function AlertToastItem({ item, duration, side, className, onClose, onTag }) {
|
|
127
|
+
const reduced = useReducedMotionConfig() ?? false;
|
|
128
|
+
const visibility = useDocumentVisibility();
|
|
129
|
+
const [hovered, setHovered] = React.useState(false);
|
|
130
|
+
const [focused, setFocused] = React.useState(false);
|
|
131
|
+
const [pressed, setPressed] = React.useState(false);
|
|
132
|
+
const progress = useMotionValue(1);
|
|
133
|
+
const controlsRef = React.useRef(null);
|
|
134
|
+
const onCloseRef = useLatest(onClose);
|
|
135
|
+
const onTagRef = useLatest(onTag);
|
|
136
|
+
const tone = item.data?.tone ?? "default";
|
|
137
|
+
const action = item.data?.action;
|
|
138
|
+
const closing = item.transitionStatus === "ending";
|
|
139
|
+
const timed = duration > 0 && Number.isFinite(duration);
|
|
140
|
+
const paused = hovered || focused || pressed || visibility === "hidden";
|
|
141
|
+
React.useEffect(() => {
|
|
142
|
+
if (!timed) return;
|
|
143
|
+
progress.set(1);
|
|
144
|
+
const controls = animate(progress, 0, {
|
|
145
|
+
duration: duration / 1e3,
|
|
146
|
+
ease: "linear",
|
|
147
|
+
onComplete: () => onCloseRef.current("timeout")
|
|
148
|
+
});
|
|
149
|
+
controlsRef.current = controls;
|
|
150
|
+
return () => {
|
|
151
|
+
controls.stop();
|
|
152
|
+
controlsRef.current = null;
|
|
153
|
+
};
|
|
154
|
+
}, [
|
|
155
|
+
timed,
|
|
156
|
+
duration,
|
|
157
|
+
progress,
|
|
158
|
+
onCloseRef
|
|
159
|
+
]);
|
|
160
|
+
React.useEffect(() => {
|
|
161
|
+
const controls = controlsRef.current;
|
|
162
|
+
if (!controls || closing) return;
|
|
163
|
+
if (paused) controls.pause();
|
|
164
|
+
else controls.play();
|
|
165
|
+
}, [paused, closing]);
|
|
166
|
+
return /* @__PURE__ */ jsx(Toast, {
|
|
167
|
+
toast: item,
|
|
168
|
+
swipeDirection: side === "top" ? ["up", "right"] : ["down", "right"],
|
|
169
|
+
"data-slot": "alert-toast",
|
|
170
|
+
"data-tone": tone,
|
|
171
|
+
"data-paused": timed && paused ? "" : void 0,
|
|
172
|
+
"data-reduced-motion": reduced ? "" : void 0,
|
|
173
|
+
onPointerEnter: () => setHovered(true),
|
|
174
|
+
onPointerLeave: () => setHovered(false),
|
|
175
|
+
onPointerDown: () => setPressed(true),
|
|
176
|
+
onPointerUp: () => setPressed(false),
|
|
177
|
+
onPointerCancel: () => setPressed(false),
|
|
178
|
+
onFocus: () => setFocused(true),
|
|
179
|
+
onBlur: (event) => {
|
|
180
|
+
const next = event.relatedTarget;
|
|
181
|
+
if (!(next instanceof Node && event.currentTarget.contains(next))) setFocused(false);
|
|
182
|
+
},
|
|
183
|
+
onKeyDownCapture: (event) => {
|
|
184
|
+
if (event.key === "Escape") onTagRef.current("escape");
|
|
185
|
+
},
|
|
186
|
+
className: cn(side === "top" && topToast, reduced && "[transition:opacity_150ms] data-starting-style:opacity-0", className),
|
|
187
|
+
children: /* @__PURE__ */ jsxs(ToastContent, {
|
|
188
|
+
className: "relative items-start rounded-[calc(var(--radius-md)-1px)]",
|
|
189
|
+
children: [
|
|
190
|
+
toneIcon[tone] ? /* @__PURE__ */ jsx("span", {
|
|
191
|
+
"data-slot": "alert-toast-icon",
|
|
192
|
+
className: "mt-0.5 shrink-0 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
193
|
+
children: toneIcon[tone]
|
|
194
|
+
}) : null,
|
|
195
|
+
/* @__PURE__ */ jsxs("div", {
|
|
196
|
+
className: "flex min-w-0 flex-1 flex-col gap-1",
|
|
197
|
+
children: [/* @__PURE__ */ jsx(ToastTitle, {}), /* @__PURE__ */ jsx(ToastDescription, {})]
|
|
198
|
+
}),
|
|
199
|
+
action ? /* @__PURE__ */ jsx(ToastAction, {
|
|
200
|
+
onClick: () => {
|
|
201
|
+
action.onClick();
|
|
202
|
+
onCloseRef.current("action");
|
|
203
|
+
},
|
|
204
|
+
children: action.label
|
|
205
|
+
}) : null,
|
|
206
|
+
/* @__PURE__ */ jsx(Button, {
|
|
207
|
+
variant: "ghost",
|
|
208
|
+
size: "icon-sm",
|
|
209
|
+
"aria-label": "Dismiss",
|
|
210
|
+
"data-slot": "alert-toast-close",
|
|
211
|
+
onClick: () => onCloseRef.current("close"),
|
|
212
|
+
className: "relative shrink-0 text-muted-foreground after:absolute after:-inset-2 after:content-[''] hover:text-foreground",
|
|
213
|
+
children: /* @__PURE__ */ jsx(XIcon, { "aria-hidden": "true" })
|
|
214
|
+
}),
|
|
215
|
+
timed ? /* @__PURE__ */ jsx(motion.span, {
|
|
216
|
+
"aria-hidden": "true",
|
|
217
|
+
"data-slot": "alert-toast-fuse",
|
|
218
|
+
style: { scaleX: progress },
|
|
219
|
+
className: cn("pointer-events-none absolute inset-x-0 bottom-0 h-0.5 origin-left", fuseTone[tone])
|
|
220
|
+
}) : null
|
|
221
|
+
]
|
|
222
|
+
})
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
//#endregion
|
|
226
|
+
export { AlertToast };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
//#region src/motion/branch-menu/branch-menu.d.ts
|
|
3
|
+
export interface BranchMenuItem {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
/** A lucide icon. */
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
/** A leaf with `href` renders a link; other leaves render buttons. */
|
|
9
|
+
href?: string;
|
|
10
|
+
/** Nested items make this item a section that expands and collapses. */
|
|
11
|
+
children?: readonly BranchMenuItem[];
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface BranchMenuProps {
|
|
15
|
+
items: readonly BranchMenuItem[];
|
|
16
|
+
/** Accessible name of the navigation landmark. */
|
|
17
|
+
label: string;
|
|
18
|
+
/** Ids of the expanded sections (controlled). */
|
|
19
|
+
expanded?: readonly string[];
|
|
20
|
+
/** Ids of the sections that start expanded (uncontrolled). Defaults to the active item's ancestors. */
|
|
21
|
+
defaultExpanded?: readonly string[];
|
|
22
|
+
onExpandedChange?: (expanded: string[]) => void;
|
|
23
|
+
/** Id of the current leaf (controlled). */
|
|
24
|
+
active?: string | null;
|
|
25
|
+
/** Id of the leaf that starts current (uncontrolled). */
|
|
26
|
+
defaultActive?: string | null;
|
|
27
|
+
/** A leaf was chosen. It fires on every activation, even of the current leaf. */
|
|
28
|
+
onActiveChange?: (id: string, item: BranchMenuItem) => void;
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Expandable navigation sections joined by drawn branch lines. The branch to
|
|
33
|
+
* the current item is drawn in the foreground colour, and a marker slides to
|
|
34
|
+
* the section that holds it.
|
|
35
|
+
*
|
|
36
|
+
* Pattern: a `nav` landmark with disclosure buttons (the APG "Disclosure
|
|
37
|
+
* Navigation Menu"), not a `tree`. Its items navigate rather than select, so
|
|
38
|
+
* they stay native links and buttons that every screen reader announces in
|
|
39
|
+
* browse mode, and Tab reaches each one. The arrow keys add tree-style
|
|
40
|
+
* movement on top: Up and Down move between visible items, Right expands a
|
|
41
|
+
* section or enters it, Left collapses it or returns to its parent, and Home
|
|
42
|
+
* and End jump to the ends. A collapsed section's items are `inert`.
|
|
43
|
+
*
|
|
44
|
+
* Behavior reference: reactbits branched-menu.
|
|
45
|
+
*/
|
|
46
|
+
export declare function BranchMenu(props: BranchMenuProps): React.JSX.Element;
|
|
47
|
+
//#endregion
|