@asanchez-sa/abby 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/README.md +217 -2
- package/dist/_virtual/_rolldown/runtime.js +26 -0
- package/dist/agents/approvals.d.ts +46 -0
- package/dist/agents/approvals.js +58 -0
- package/dist/agents/changes.d.ts +21 -0
- package/dist/agents/changes.js +21 -0
- package/dist/agents/hooks.d.ts +20 -0
- package/dist/agents/hooks.js +58 -0
- package/dist/agents/index.d.ts +11 -0
- package/dist/agents/index.js +9 -0
- package/dist/agents/run-tool.d.ts +44 -0
- package/dist/agents/run-tool.js +79 -0
- package/dist/agents/ui-sdk.d.ts +5 -0
- package/dist/agents/ui-sdk.js +3 -0
- package/dist/behaviors/canvas/index.d.ts +2 -0
- package/dist/behaviors/canvas/index.js +1 -0
- package/dist/behaviors/canvas/ui-sdk.d.ts +2 -0
- package/dist/behaviors/canvas/ui-sdk.js +1 -0
- package/dist/behaviors/drag-and-drop/index.d.ts +2 -0
- package/dist/behaviors/drag-and-drop/index.js +1 -0
- package/dist/behaviors/drag-and-drop/ui-sdk.d.ts +2 -0
- package/dist/behaviors/drag-and-drop/ui-sdk.js +1 -0
- package/dist/behaviors/dragging/index.d.ts +2 -0
- package/dist/behaviors/dragging/index.js +1 -0
- package/dist/behaviors/dragging/ui-sdk.d.ts +2 -0
- package/dist/behaviors/dragging/ui-sdk.js +1 -0
- package/dist/behaviors/focus/index.d.ts +2 -0
- package/dist/behaviors/focus/index.js +1 -0
- package/dist/behaviors/focus/ui-sdk.d.ts +2 -0
- package/dist/behaviors/focus/ui-sdk.js +1 -0
- package/dist/behaviors/lists/index.d.ts +3 -0
- package/dist/behaviors/lists/index.js +3 -0
- package/dist/behaviors/lists/ui-sdk.d.ts +3 -0
- package/dist/behaviors/lists/ui-sdk.js +3 -0
- package/dist/behaviors/popups/index.d.ts +3 -0
- package/dist/behaviors/popups/index.js +3 -0
- package/dist/behaviors/popups/ui-sdk.d.ts +3 -0
- package/dist/behaviors/popups/ui-sdk.js +3 -0
- package/dist/behaviors/preferences/index.d.ts +3 -0
- package/dist/behaviors/preferences/index.js +3 -0
- package/dist/behaviors/preferences/ui-sdk.d.ts +3 -0
- package/dist/behaviors/preferences/ui-sdk.js +3 -0
- package/dist/behaviors/selection/index.d.ts +3 -0
- package/dist/behaviors/selection/index.js +3 -0
- package/dist/behaviors/selection/indicator.d.ts +13 -0
- package/dist/behaviors/selection/indicator.js +20 -0
- package/dist/behaviors/selection/ui-sdk.d.ts +2 -0
- package/dist/behaviors/selection/ui-sdk.js +1 -0
- package/dist/behaviors/transitions/index.d.ts +3 -0
- package/dist/behaviors/transitions/index.js +3 -0
- package/dist/behaviors/transitions/ui-sdk.d.ts +3 -0
- package/dist/behaviors/transitions/ui-sdk.js +3 -0
- package/dist/behaviors/trees/index.d.ts +2 -0
- package/dist/behaviors/trees/index.js +1 -0
- package/dist/behaviors/trees/ui-sdk.d.ts +2 -0
- package/dist/behaviors/trees/ui-sdk.js +1 -0
- package/dist/components/accordion/accordion.d.ts +13 -0
- package/dist/components/accordion/accordion.js +165 -0
- package/dist/components/alert/alert.d.ts +13 -0
- package/dist/components/alert/alert.js +131 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +15 -0
- package/dist/components/alert-dialog/alert-dialog.js +257 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +7 -0
- package/dist/components/aspect-ratio/aspect-ratio.js +57 -0
- package/dist/components/attachment/attachment.d.ts +48 -0
- package/dist/components/attachment/attachment.js +372 -0
- package/dist/components/autocomplete/autocomplete.d.ts +32 -0
- package/dist/components/autocomplete/autocomplete.js +466 -0
- package/dist/components/avatar/avatar.d.ts +6 -0
- package/dist/components/avatar/avatar.js +100 -0
- package/dist/components/avatar-group/avatar-group.d.ts +9 -0
- package/dist/components/avatar-group/avatar-group.js +75 -0
- package/dist/components/badge/badge.d.ts +15 -0
- package/dist/components/badge/badge.js +31 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +24 -0
- package/dist/components/breadcrumb/breadcrumb.js +279 -0
- package/dist/components/bubble/bubble.d.ts +26 -0
- package/dist/components/bubble/bubble.js +173 -0
- package/dist/components/button/button.d.ts +18 -0
- package/dist/components/button/button.js +91 -0
- package/dist/components/button-group/button-group.d.ts +15 -0
- package/dist/components/button-group/button-group.js +71 -0
- package/dist/components/calendar/calendar.d.ts +29 -0
- package/dist/components/calendar/calendar.js +453 -0
- package/dist/components/card/card.d.ts +14 -0
- package/dist/components/card/card.js +213 -0
- package/dist/components/carousel/carousel.d.ts +16 -0
- package/dist/components/carousel/carousel.js +364 -0
- package/dist/components/chain-of-thought/chain-of-thought.d.ts +72 -0
- package/dist/components/chain-of-thought/chain-of-thought.js +491 -0
- package/dist/components/chat/chat.d.ts +48 -0
- package/dist/components/chat/chat.js +207 -0
- package/dist/components/checkbox/checkbox.d.ts +10 -0
- package/dist/components/checkbox/checkbox.js +118 -0
- package/dist/components/checkpoint/checkpoint.d.ts +24 -0
- package/dist/components/checkpoint/checkpoint.js +178 -0
- package/dist/components/choice-cards/choice-cards.d.ts +38 -0
- package/dist/components/choice-cards/choice-cards.js +255 -0
- package/dist/components/code-block/code-block.d.ts +58 -0
- package/dist/components/code-block/code-block.js +506 -0
- package/dist/components/code-block/highlighter.js +96 -0
- package/dist/components/code-block/use-highlighted-code.d.ts +11 -0
- package/dist/components/code-block/use-highlighted-code.js +54 -0
- package/dist/components/collapsible/collapsible.d.ts +10 -0
- package/dist/components/collapsible/collapsible.js +92 -0
- package/dist/components/color-picker/color-picker.d.ts +17 -0
- package/dist/components/color-picker/color-picker.js +395 -0
- package/dist/components/combobox/combobox.d.ts +54 -0
- package/dist/components/combobox/combobox.js +683 -0
- package/dist/components/command/command.d.ts +23 -0
- package/dist/components/command/command.js +373 -0
- package/dist/components/command-dock/command-dock.d.ts +118 -0
- package/dist/components/command-dock/command-dock.js +944 -0
- package/dist/components/confirmation/confirmation.d.ts +58 -0
- package/dist/components/confirmation/confirmation.js +181 -0
- package/dist/components/context/context.d.ts +82 -0
- package/dist/components/context/context.js +490 -0
- package/dist/components/date-input/date-input.d.ts +16 -0
- package/dist/components/date-input/date-input.js +89 -0
- package/dist/components/date-picker/date-picker.d.ts +28 -0
- package/dist/components/date-picker/date-picker.js +361 -0
- package/dist/components/dialog/dialog.d.ts +14 -0
- package/dist/components/dialog/dialog.js +261 -0
- package/dist/components/drawer/drawer.d.ts +16 -0
- package/dist/components/drawer/drawer.js +309 -0
- package/dist/components/empty/empty.d.ts +18 -0
- package/dist/components/empty/empty.js +192 -0
- package/dist/components/field/field.d.ts +15 -0
- package/dist/components/field/field.js +261 -0
- package/dist/components/file-input/file-input.d.ts +12 -0
- package/dist/components/file-input/file-input.js +216 -0
- package/dist/components/file-tree/file-tree.d.ts +45 -0
- package/dist/components/file-tree/file-tree.js +283 -0
- package/dist/components/hover-card/hover-card.d.ts +10 -0
- package/dist/components/hover-card/hover-card.js +118 -0
- package/dist/components/icon/icon.d.ts +14 -0
- package/dist/components/icon/icon.js +60 -0
- package/dist/components/image-cropper/image-cropper.d.ts +15 -0
- package/dist/components/image-cropper/image-cropper.js +334 -0
- package/dist/components/inline-citation/inline-citation.d.ts +46 -0
- package/dist/components/inline-citation/inline-citation.js +269 -0
- package/dist/components/input/input.d.ts +9 -0
- package/dist/components/input/input.js +43 -0
- package/dist/components/input-group/input-group.d.ts +42 -0
- package/dist/components/input-group/input-group.js +192 -0
- package/dist/components/item/item.d.ts +32 -0
- package/dist/components/item/item.js +394 -0
- package/dist/components/kbd/kbd.d.ts +9 -0
- package/dist/components/kbd/kbd.js +75 -0
- package/dist/components/label/label.d.ts +6 -0
- package/dist/components/label/label.js +40 -0
- package/dist/components/link/link.d.ts +21 -0
- package/dist/components/link/link.js +126 -0
- package/dist/components/listbox/listbox.d.ts +20 -0
- package/dist/components/listbox/listbox.js +199 -0
- package/dist/components/marker/marker.d.ts +11 -0
- package/dist/components/marker/marker.js +88 -0
- package/dist/components/menu/menu.d.ts +38 -0
- package/dist/components/menu/menu.js +553 -0
- package/dist/components/menubar/menubar.d.ts +9 -0
- package/dist/components/menubar/menubar.js +47 -0
- package/dist/components/message/message.d.ts +44 -0
- package/dist/components/message/message.js +328 -0
- package/dist/components/message-scroller/message-scroller.d.ts +111 -0
- package/dist/components/message-scroller/message-scroller.js +957 -0
- package/dist/components/meter/meter.d.ts +8 -0
- package/dist/components/meter/meter.js +162 -0
- package/dist/components/model-selector/model-selector.d.ts +155 -0
- package/dist/components/model-selector/model-selector.js +905 -0
- package/dist/components/native-select/native-select.d.ts +27 -0
- package/dist/components/native-select/native-select.js +226 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +29 -0
- package/dist/components/navigation-menu/navigation-menu.js +318 -0
- package/dist/components/not-label.js +9 -0
- package/dist/components/note-editor/blocks.d.ts +22 -0
- package/dist/components/note-editor/blocks.js +245 -0
- package/dist/components/note-editor/diff.d.ts +19 -0
- package/dist/components/note-editor/diff.js +64 -0
- package/dist/components/note-editor/editor.js +249 -0
- package/dist/components/note-editor/note-editor.d.ts +109 -0
- package/dist/components/note-editor/note-editor.js +954 -0
- package/dist/components/note-editor/parts/comments.d.ts +24 -0
- package/dist/components/note-editor/parts/comments.js +336 -0
- package/dist/components/note-editor/parts/header.d.ts +25 -0
- package/dist/components/note-editor/parts/header.js +263 -0
- package/dist/components/note-editor/parts/history.d.ts +56 -0
- package/dist/components/note-editor/parts/history.js +409 -0
- package/dist/components/note-editor/parts/presence.d.ts +31 -0
- package/dist/components/note-editor/parts/presence.js +140 -0
- package/dist/components/note-editor/parts/suggestions.d.ts +45 -0
- package/dist/components/note-editor/parts/suggestions.js +316 -0
- package/dist/components/note-editor/parts/toolbar.d.ts +38 -0
- package/dist/components/note-editor/parts/toolbar.js +683 -0
- package/dist/components/note-editor/people.d.ts +84 -0
- package/dist/components/note-editor/people.js +276 -0
- package/dist/components/note-editor/person.d.ts +11 -0
- package/dist/components/note-editor/person.js +15 -0
- package/dist/components/note-place/note-place.d.ts +42 -0
- package/dist/components/note-place/note-place.js +256 -0
- package/dist/components/note-status/note-status.d.ts +59 -0
- package/dist/components/note-status/note-status.js +380 -0
- package/dist/components/number-input/number-input.d.ts +12 -0
- package/dist/components/number-input/number-input.js +252 -0
- package/dist/components/otp-input/otp-input.d.ts +12 -0
- package/dist/components/otp-input/otp-input.js +136 -0
- package/dist/components/pagination/pagination.d.ts +23 -0
- package/dist/components/pagination/pagination.js +218 -0
- package/dist/components/password-input/password-input.d.ts +11 -0
- package/dist/components/password-input/password-input.js +117 -0
- package/dist/components/plan/plan.d.ts +51 -0
- package/dist/components/plan/plan.js +320 -0
- package/dist/components/popover/popover.d.ts +16 -0
- package/dist/components/popover/popover.js +268 -0
- package/dist/components/preferences/preferences.d.ts +5 -0
- package/dist/components/preferences/preferences.js +18 -0
- package/dist/components/progress/progress.d.ts +8 -0
- package/dist/components/progress/progress.js +162 -0
- package/dist/components/prompt-input/prompt-input.d.ts +247 -0
- package/dist/components/prompt-input/prompt-input.js +1367 -0
- package/dist/components/questionnaire/questionnaire.d.ts +174 -0
- package/dist/components/questionnaire/questionnaire.js +1628 -0
- package/dist/components/queue/queue.d.ts +82 -0
- package/dist/components/queue/queue.js +471 -0
- package/dist/components/radio/radio.d.ts +7 -0
- package/dist/components/radio/radio.js +101 -0
- package/dist/components/rating/rating.d.ts +10 -0
- package/dist/components/rating/rating.js +95 -0
- package/dist/components/reasoning/reasoning.d.ts +50 -0
- package/dist/components/reasoning/reasoning.js +233 -0
- package/dist/components/resizable/resizable.d.ts +6 -0
- package/dist/components/resizable/resizable.js +100 -0
- package/dist/components/scroll-area/scroll-area.d.ts +17 -0
- package/dist/components/scroll-area/scroll-area.js +211 -0
- package/dist/components/segmented-control/segmented-control.d.ts +16 -0
- package/dist/components/segmented-control/segmented-control.js +142 -0
- package/dist/components/select/select.d.ts +43 -0
- package/dist/components/select/select.js +577 -0
- package/dist/components/separator/separator.d.ts +4 -0
- package/dist/components/separator/separator.js +38 -0
- package/dist/components/sheet/sheet.d.ts +24 -0
- package/dist/components/sheet/sheet.js +330 -0
- package/dist/components/sidebar/sidebar.d.ts +138 -0
- package/dist/components/sidebar/sidebar.js +1374 -0
- package/dist/components/skeleton/skeleton.d.ts +4 -0
- package/dist/components/skeleton/skeleton.js +40 -0
- package/dist/components/slider/slider.d.ts +9 -0
- package/dist/components/slider/slider.js +193 -0
- package/dist/components/sources/sources.d.ts +35 -0
- package/dist/components/sources/sources.js +209 -0
- package/dist/components/spinner/spinner.d.ts +11 -0
- package/dist/components/spinner/spinner.js +59 -0
- package/dist/components/stack-trace/parse-stack-trace.d.ts +21 -0
- package/dist/components/stack-trace/parse-stack-trace.js +61 -0
- package/dist/components/stack-trace/stack-trace.d.ts +79 -0
- package/dist/components/stack-trace/stack-trace.js +434 -0
- package/dist/components/subagent/subagent.d.ts +71 -0
- package/dist/components/subagent/subagent.js +450 -0
- package/dist/components/suggestion/suggestion.d.ts +21 -0
- package/dist/components/suggestion/suggestion.js +130 -0
- package/dist/components/switch/switch.d.ts +6 -0
- package/dist/components/switch/switch.js +70 -0
- package/dist/components/table/table.d.ts +19 -0
- package/dist/components/table/table.js +284 -0
- package/dist/components/table-of-contents/spy.js +84 -0
- package/dist/components/table-of-contents/table-of-contents.d.ts +92 -0
- package/dist/components/table-of-contents/table-of-contents.js +787 -0
- package/dist/components/tabs/tabs.d.ts +25 -0
- package/dist/components/tabs/tabs.js +273 -0
- package/dist/components/task/task.d.ts +40 -0
- package/dist/components/task/task.js +262 -0
- package/dist/components/terminal/terminal.d.ts +82 -0
- package/dist/components/terminal/terminal.js +457 -0
- package/dist/components/test-results/test-results.d.ts +127 -0
- package/dist/components/test-results/test-results.js +687 -0
- package/dist/components/textarea/textarea.d.ts +8 -0
- package/dist/components/textarea/textarea.js +43 -0
- package/dist/components/time-input/time-input.d.ts +7 -0
- package/dist/components/time-input/time-input.js +82 -0
- package/dist/components/timeline/timeline.d.ts +19 -0
- package/dist/components/timeline/timeline.js +247 -0
- package/dist/components/toast/toast.d.ts +12 -0
- package/dist/components/toast/toast.js +285 -0
- package/dist/components/toggle/toggle.d.ts +15 -0
- package/dist/components/toggle/toggle.js +137 -0
- package/dist/components/token-input/token-input.d.ts +7 -0
- package/dist/components/token-input/token-input.js +117 -0
- package/dist/components/tool/tool.d.ts +66 -0
- package/dist/components/tool/tool.js +413 -0
- package/dist/components/toolbar/toolbar.d.ts +91 -0
- package/dist/components/toolbar/toolbar.js +655 -0
- package/dist/components/tooltip/tooltip.d.ts +8 -0
- package/dist/components/tooltip/tooltip.js +97 -0
- package/dist/components/trace/trace.d.ts +31 -0
- package/dist/components/trace/trace.js +309 -0
- package/dist/components/tree/tree.d.ts +13 -0
- package/dist/components/tree/tree.js +258 -0
- package/dist/components/trigger-menu/trigger-menu.d.ts +30 -0
- package/dist/components/trigger-menu/trigger-menu.js +352 -0
- package/dist/components/usage/usage.d.ts +132 -0
- package/dist/components/usage/usage.js +1368 -0
- package/dist/components/waterfall/waterfall.d.ts +20 -0
- package/dist/components/waterfall/waterfall.js +360 -0
- package/dist/components/week-strip/week-strip.d.ts +177 -0
- package/dist/components/week-strip/week-strip.js +1081 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.js +27 -0
- package/dist/core/ui-sdk.d.ts +3 -0
- package/dist/core/ui-sdk.js +3 -0
- package/dist/core/use-primitive-state.d.ts +14 -0
- package/dist/core/use-primitive-state.js +25 -0
- package/dist/styles/LICENSE-shadcn.md +21 -0
- package/dist/styles/color-scheme.css +32 -0
- package/dist/styles/components.css +303 -0
- package/dist/styles/index.css +41 -0
- package/dist/styles/tokens.css +474 -0
- package/dist/styles/typeset/shadcn.css +506 -0
- package/dist/styles/typeset.css +70 -0
- package/dist/styles/utilities.css +555 -0
- package/dist/tools/observe/index.d.ts +2 -0
- package/dist/tools/observe/index.js +3 -0
- package/dist/tools/observe/ui-sdk.d.ts +1 -0
- package/dist/tools/observe/ui-sdk.js +2 -0
- package/dist/tools/testing/check-agent.d.ts +28 -0
- package/dist/tools/testing/check-agent.js +42 -0
- package/dist/tools/testing/index.d.ts +4 -0
- package/dist/tools/testing/index.js +4 -0
- package/dist/tools/testing/ui-sdk.d.ts +1 -0
- package/dist/tools/testing/ui-sdk.js +2 -0
- package/dist/utilities/cn/index.d.ts +12 -0
- package/dist/utilities/cn/index.js +47 -0
- package/dist/utilities/color/index.d.ts +2 -0
- package/dist/utilities/color/index.js +3 -0
- package/dist/utilities/color/ui-sdk.d.ts +1 -0
- package/dist/utilities/color/ui-sdk.js +2 -0
- package/dist/utilities/date/index.d.ts +2 -0
- package/dist/utilities/date/index.js +6 -0
- package/dist/utilities/date/ui-sdk.d.ts +1 -0
- package/dist/utilities/date/ui-sdk.js +2 -0
- package/dist/utilities/image/index.d.ts +2 -0
- package/dist/utilities/image/index.js +3 -0
- package/dist/utilities/image/ui-sdk.d.ts +1 -0
- package/dist/utilities/image/ui-sdk.js +2 -0
- package/dist/utilities/mobile/index.d.ts +2 -0
- package/dist/utilities/mobile/index.js +1 -0
- package/dist/utilities/mobile/ui-sdk.d.ts +2 -0
- package/dist/utilities/mobile/ui-sdk.js +1 -0
- package/dist/utilities/number/index.d.ts +2 -0
- package/dist/utilities/number/index.js +3 -0
- package/dist/utilities/number/ui-sdk.d.ts +1 -0
- package/dist/utilities/number/ui-sdk.js +2 -0
- package/dist/utilities/platform/index.d.ts +3 -0
- package/dist/utilities/platform/index.js +14 -0
- package/dist/utilities/platform/ui-sdk.d.ts +3 -0
- package/dist/utilities/platform/ui-sdk.js +3 -0
- package/dist/utilities/storage/index.d.ts +2 -0
- package/dist/utilities/storage/index.js +1 -0
- package/dist/utilities/storage/ui-sdk.d.ts +2 -0
- package/dist/utilities/storage/ui-sdk.js +1 -0
- package/dist/utilities/text/index.d.ts +3 -0
- package/dist/utilities/text/index.js +3 -0
- package/dist/utilities/text/ui-sdk.d.ts +3 -0
- package/dist/utilities/text/ui-sdk.js +3 -0
- package/package.json +192 -4
- package/skills/agent-ready-ui/SKILL.md +229 -0
- package/skills/blocks/SKILL.md +262 -0
- package/skills/compose-screens/SKILL.md +354 -0
- package/skills/note-editor/SKILL.md +493 -0
- package/skills/note-status/SKILL.md +295 -0
- package/skills/setup/SKILL.md +136 -0
- package/skills/theming/SKILL.md +216 -0
- package/src/blocks/notes/adapters.ts +77 -0
- package/src/blocks/notes/data.ts +508 -0
- package/src/blocks/notes/notes-block.tsx +244 -0
- package/src/blocks/notes/parts/home.tsx +219 -0
- package/src/blocks/notes/parts/no-access.tsx +84 -0
- package/src/blocks/notes/parts/note-screen.tsx +412 -0
- package/src/blocks/notes/parts/notes-sidebar.tsx +277 -0
- package/src/blocks/notes/parts/panels.tsx +393 -0
- package/src/blocks/notes/parts/place.ts +15 -0
- package/src/blocks/notes/parts/review-dialog.tsx +159 -0
- package/src/blocks/notes/parts/share.tsx +172 -0
- package/src/blocks/notes/texts.ts +135 -0
- package/src/blocks/shell/adapters.ts +69 -0
- package/src/blocks/shell/data.ts +281 -0
- package/src/blocks/shell/parts/compose.tsx +292 -0
- package/src/blocks/shell/parts/home.tsx +203 -0
- package/src/blocks/shell/parts/marks.tsx +144 -0
- package/src/blocks/shell/parts/rail.tsx +166 -0
- package/src/blocks/shell/parts/rooms-column.tsx +326 -0
- package/src/blocks/shell/shell-block.tsx +210 -0
- package/src/blocks/shell/texts.ts +80 -0
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cnState } from "../../utilities/cn/index.js";
|
|
3
|
+
import { notLabel } from "../not-label.js";
|
|
4
|
+
import { inputClasses } from "../input/input.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Command as Command$1, CommandEmpty as CommandEmpty$1, CommandGroup as CommandGroup$1, CommandGroupLabel as CommandGroupLabel$1, CommandInput as CommandInput$1, CommandItem as CommandItem$1, CommandItemIcon as CommandItemIcon$1, CommandItemText as CommandItemText$1, CommandList as CommandList$1, CommandPage as CommandPage$1, CommandSeparator as CommandSeparator$1, CommandShortcut as CommandShortcut$1, CommandStatus as CommandStatus$1, createCommandController } from "@ui-sdk/react/command";
|
|
8
|
+
// src/components/command/command.tsx
|
|
9
|
+
function Command(t0) {
|
|
10
|
+
const $ = c(8);
|
|
11
|
+
let className;
|
|
12
|
+
let props;
|
|
13
|
+
if ($[0] !== t0) {
|
|
14
|
+
({className, ...props} = t0);
|
|
15
|
+
$[0] = t0;
|
|
16
|
+
$[1] = className;
|
|
17
|
+
$[2] = props;
|
|
18
|
+
} else {
|
|
19
|
+
className = $[1];
|
|
20
|
+
props = $[2];
|
|
21
|
+
}
|
|
22
|
+
let t1;
|
|
23
|
+
if ($[3] !== className) {
|
|
24
|
+
t1 = cnState("flex w-full flex-col gap-1 rounded-xl bg-popover p-1 text-sm text-popover-foreground", className);
|
|
25
|
+
$[3] = className;
|
|
26
|
+
$[4] = t1;
|
|
27
|
+
} else t1 = $[4];
|
|
28
|
+
let t2;
|
|
29
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
30
|
+
t2 = /* @__PURE__ */ jsx(Command$1, {
|
|
31
|
+
className: t1,
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
$[5] = props;
|
|
35
|
+
$[6] = t1;
|
|
36
|
+
$[7] = t2;
|
|
37
|
+
} else t2 = $[7];
|
|
38
|
+
return t2;
|
|
39
|
+
}
|
|
40
|
+
/** Looks like abby's `Input`. Name it with `aria-label`. */
|
|
41
|
+
function CommandInput(t0) {
|
|
42
|
+
const $ = c(8);
|
|
43
|
+
let className;
|
|
44
|
+
let props;
|
|
45
|
+
if ($[0] !== t0) {
|
|
46
|
+
({className, ...props} = t0);
|
|
47
|
+
$[0] = t0;
|
|
48
|
+
$[1] = className;
|
|
49
|
+
$[2] = props;
|
|
50
|
+
} else {
|
|
51
|
+
className = $[1];
|
|
52
|
+
props = $[2];
|
|
53
|
+
}
|
|
54
|
+
let t1;
|
|
55
|
+
if ($[3] !== className) {
|
|
56
|
+
t1 = cnState([inputClasses, "shrink-0"], className);
|
|
57
|
+
$[3] = className;
|
|
58
|
+
$[4] = t1;
|
|
59
|
+
} else t1 = $[4];
|
|
60
|
+
let t2;
|
|
61
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
62
|
+
t2 = /* @__PURE__ */ jsx(CommandInput$1, {
|
|
63
|
+
className: t1,
|
|
64
|
+
...props
|
|
65
|
+
});
|
|
66
|
+
$[5] = props;
|
|
67
|
+
$[6] = t1;
|
|
68
|
+
$[7] = t2;
|
|
69
|
+
} else t2 = $[7];
|
|
70
|
+
return t2;
|
|
71
|
+
}
|
|
72
|
+
function CommandStatus(t0) {
|
|
73
|
+
const $ = c(8);
|
|
74
|
+
let className;
|
|
75
|
+
let props;
|
|
76
|
+
if ($[0] !== t0) {
|
|
77
|
+
({className, ...props} = t0);
|
|
78
|
+
$[0] = t0;
|
|
79
|
+
$[1] = className;
|
|
80
|
+
$[2] = props;
|
|
81
|
+
} else {
|
|
82
|
+
className = $[1];
|
|
83
|
+
props = $[2];
|
|
84
|
+
}
|
|
85
|
+
let t1;
|
|
86
|
+
if ($[3] !== className) {
|
|
87
|
+
t1 = cnState("px-2 py-1.5 text-xs text-muted-foreground empty:hidden", className);
|
|
88
|
+
$[3] = className;
|
|
89
|
+
$[4] = t1;
|
|
90
|
+
} else t1 = $[4];
|
|
91
|
+
let t2;
|
|
92
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
93
|
+
t2 = /* @__PURE__ */ jsx(CommandStatus$1, {
|
|
94
|
+
className: t1,
|
|
95
|
+
...props
|
|
96
|
+
});
|
|
97
|
+
$[5] = props;
|
|
98
|
+
$[6] = t1;
|
|
99
|
+
$[7] = t2;
|
|
100
|
+
} else t2 = $[7];
|
|
101
|
+
return t2;
|
|
102
|
+
}
|
|
103
|
+
function CommandEmpty(t0) {
|
|
104
|
+
const $ = c(8);
|
|
105
|
+
let className;
|
|
106
|
+
let props;
|
|
107
|
+
if ($[0] !== t0) {
|
|
108
|
+
({className, ...props} = t0);
|
|
109
|
+
$[0] = t0;
|
|
110
|
+
$[1] = className;
|
|
111
|
+
$[2] = props;
|
|
112
|
+
} else {
|
|
113
|
+
className = $[1];
|
|
114
|
+
props = $[2];
|
|
115
|
+
}
|
|
116
|
+
let t1;
|
|
117
|
+
if ($[3] !== className) {
|
|
118
|
+
t1 = cnState("px-2 py-6 text-center text-sm text-muted-foreground empty:hidden", className);
|
|
119
|
+
$[3] = className;
|
|
120
|
+
$[4] = t1;
|
|
121
|
+
} else t1 = $[4];
|
|
122
|
+
let t2;
|
|
123
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
124
|
+
t2 = /* @__PURE__ */ jsx(CommandEmpty$1, {
|
|
125
|
+
className: t1,
|
|
126
|
+
...props
|
|
127
|
+
});
|
|
128
|
+
$[5] = props;
|
|
129
|
+
$[6] = t1;
|
|
130
|
+
$[7] = t2;
|
|
131
|
+
} else t2 = $[7];
|
|
132
|
+
return t2;
|
|
133
|
+
}
|
|
134
|
+
/** The command's `items`, as styled parts. */
|
|
135
|
+
function dataItems(items) {
|
|
136
|
+
return items.map((entry, index) => {
|
|
137
|
+
if (typeof entry !== "string" && "type" in entry) {
|
|
138
|
+
if (entry.type === "separator") return /* @__PURE__ */ jsx(CommandSeparator, {}, `separator-${index}`);
|
|
139
|
+
const group = entry;
|
|
140
|
+
return /* @__PURE__ */ jsxs(CommandGroup, { children: [group.label && /* @__PURE__ */ jsx(CommandGroupLabel, { children: group.label }), dataItems(group.items)] }, `group-${group.label ?? index}`);
|
|
141
|
+
}
|
|
142
|
+
const command = typeof entry === "string" ? {
|
|
143
|
+
value: entry,
|
|
144
|
+
label: entry
|
|
145
|
+
} : entry;
|
|
146
|
+
return /* @__PURE__ */ jsxs(CommandItem, {
|
|
147
|
+
value: command.value,
|
|
148
|
+
label: command.label,
|
|
149
|
+
keywords: command.keywords,
|
|
150
|
+
disabled: command.disabled,
|
|
151
|
+
shortcut: command.shortcut,
|
|
152
|
+
children: [/* @__PURE__ */ jsx(CommandItemText, {}), command.shortcut && /* @__PURE__ */ jsx(CommandShortcut, {})]
|
|
153
|
+
}, `item-${command.value}`);
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
/** What a list with no children shows: the command's `items` on the current page. */
|
|
157
|
+
const dataChildren = (state) => state.items.length > 0 ? dataItems(state.items) : null;
|
|
158
|
+
/** Without children it renders the command's `items`, ranked as the user types. */
|
|
159
|
+
function CommandList(t0) {
|
|
160
|
+
const $ = c(10);
|
|
161
|
+
let className;
|
|
162
|
+
let props;
|
|
163
|
+
let t1;
|
|
164
|
+
if ($[0] !== t0) {
|
|
165
|
+
({className, children: t1, ...props} = t0);
|
|
166
|
+
$[0] = t0;
|
|
167
|
+
$[1] = className;
|
|
168
|
+
$[2] = props;
|
|
169
|
+
$[3] = t1;
|
|
170
|
+
} else {
|
|
171
|
+
className = $[1];
|
|
172
|
+
props = $[2];
|
|
173
|
+
t1 = $[3];
|
|
174
|
+
}
|
|
175
|
+
const children = t1 === void 0 ? dataChildren : t1;
|
|
176
|
+
let t2;
|
|
177
|
+
if ($[4] !== className) {
|
|
178
|
+
t2 = cnState("no-scrollbar flex max-h-72 scroll-py-1 flex-col overflow-x-hidden overflow-y-auto outline-none", className);
|
|
179
|
+
$[4] = className;
|
|
180
|
+
$[5] = t2;
|
|
181
|
+
} else t2 = $[5];
|
|
182
|
+
let t3;
|
|
183
|
+
if ($[6] !== children || $[7] !== props || $[8] !== t2) {
|
|
184
|
+
t3 = /* @__PURE__ */ jsx(CommandList$1, {
|
|
185
|
+
className: t2,
|
|
186
|
+
...props,
|
|
187
|
+
children
|
|
188
|
+
});
|
|
189
|
+
$[6] = children;
|
|
190
|
+
$[7] = props;
|
|
191
|
+
$[8] = t2;
|
|
192
|
+
$[9] = t3;
|
|
193
|
+
} else t3 = $[9];
|
|
194
|
+
return t3;
|
|
195
|
+
}
|
|
196
|
+
function CommandPage(props) {
|
|
197
|
+
const $ = c(2);
|
|
198
|
+
let t0;
|
|
199
|
+
if ($[0] !== props) {
|
|
200
|
+
t0 = /* @__PURE__ */ jsx(CommandPage$1, { ...props });
|
|
201
|
+
$[0] = props;
|
|
202
|
+
$[1] = t0;
|
|
203
|
+
} else t0 = $[1];
|
|
204
|
+
return t0;
|
|
205
|
+
}
|
|
206
|
+
function CommandGroup(t0) {
|
|
207
|
+
const $ = c(8);
|
|
208
|
+
let className;
|
|
209
|
+
let props;
|
|
210
|
+
if ($[0] !== t0) {
|
|
211
|
+
({className, ...props} = t0);
|
|
212
|
+
$[0] = t0;
|
|
213
|
+
$[1] = className;
|
|
214
|
+
$[2] = props;
|
|
215
|
+
} else {
|
|
216
|
+
className = $[1];
|
|
217
|
+
props = $[2];
|
|
218
|
+
}
|
|
219
|
+
let t1;
|
|
220
|
+
if ($[3] !== className) {
|
|
221
|
+
t1 = cnState("flex shrink-0 flex-col", className);
|
|
222
|
+
$[3] = className;
|
|
223
|
+
$[4] = t1;
|
|
224
|
+
} else t1 = $[4];
|
|
225
|
+
let t2;
|
|
226
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
227
|
+
t2 = /* @__PURE__ */ jsx(CommandGroup$1, {
|
|
228
|
+
className: t1,
|
|
229
|
+
...props
|
|
230
|
+
});
|
|
231
|
+
$[5] = props;
|
|
232
|
+
$[6] = t1;
|
|
233
|
+
$[7] = t2;
|
|
234
|
+
} else t2 = $[7];
|
|
235
|
+
return t2;
|
|
236
|
+
}
|
|
237
|
+
function CommandGroupLabel(t0) {
|
|
238
|
+
const $ = c(8);
|
|
239
|
+
let className;
|
|
240
|
+
let props;
|
|
241
|
+
if ($[0] !== t0) {
|
|
242
|
+
({className, ...props} = t0);
|
|
243
|
+
$[0] = t0;
|
|
244
|
+
$[1] = className;
|
|
245
|
+
$[2] = props;
|
|
246
|
+
} else {
|
|
247
|
+
className = $[1];
|
|
248
|
+
props = $[2];
|
|
249
|
+
}
|
|
250
|
+
let t1;
|
|
251
|
+
if ($[3] !== className) {
|
|
252
|
+
t1 = cnState("px-2 py-1.5 text-xs font-medium text-muted-foreground", className);
|
|
253
|
+
$[3] = className;
|
|
254
|
+
$[4] = t1;
|
|
255
|
+
} else t1 = $[4];
|
|
256
|
+
let t2;
|
|
257
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
258
|
+
t2 = /* @__PURE__ */ jsx(CommandGroupLabel$1, {
|
|
259
|
+
className: t1,
|
|
260
|
+
...props
|
|
261
|
+
});
|
|
262
|
+
$[5] = props;
|
|
263
|
+
$[6] = t1;
|
|
264
|
+
$[7] = t2;
|
|
265
|
+
} else t2 = $[7];
|
|
266
|
+
return t2;
|
|
267
|
+
}
|
|
268
|
+
function CommandItem(t0) {
|
|
269
|
+
const $ = c(8);
|
|
270
|
+
let className;
|
|
271
|
+
let props;
|
|
272
|
+
if ($[0] !== t0) {
|
|
273
|
+
({className, ...props} = t0);
|
|
274
|
+
$[0] = t0;
|
|
275
|
+
$[1] = className;
|
|
276
|
+
$[2] = props;
|
|
277
|
+
} else {
|
|
278
|
+
className = $[1];
|
|
279
|
+
props = $[2];
|
|
280
|
+
}
|
|
281
|
+
let t1;
|
|
282
|
+
if ($[3] !== className) {
|
|
283
|
+
t1 = cnState(["list-row data-pending:cursor-progress [[data-slot=command]:has([data-slot=command-input]:focus-visible)_&]:data-highlighted:outline-[color:var(--focus-ring,var(--ring))]", "in-data-has-icons:not-data-has-icon:ps-8"], className);
|
|
284
|
+
$[3] = className;
|
|
285
|
+
$[4] = t1;
|
|
286
|
+
} else t1 = $[4];
|
|
287
|
+
let t2;
|
|
288
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
289
|
+
t2 = /* @__PURE__ */ jsx(CommandItem$1, {
|
|
290
|
+
className: t1,
|
|
291
|
+
...props
|
|
292
|
+
});
|
|
293
|
+
$[5] = props;
|
|
294
|
+
$[6] = t1;
|
|
295
|
+
$[7] = t2;
|
|
296
|
+
} else t2 = $[7];
|
|
297
|
+
return t2;
|
|
298
|
+
}
|
|
299
|
+
const CommandItemIcon = Object.assign(function CommandItemIcon({ className, ...props }) {
|
|
300
|
+
return /* @__PURE__ */ jsx(CommandItemIcon$1, {
|
|
301
|
+
className: cnState("flex size-4 shrink-0 items-center justify-center text-muted-foreground in-data-highlighted:text-accent-foreground", className),
|
|
302
|
+
...props
|
|
303
|
+
});
|
|
304
|
+
}, notLabel);
|
|
305
|
+
function CommandItemText(t0) {
|
|
306
|
+
const $ = c(8);
|
|
307
|
+
let className;
|
|
308
|
+
let props;
|
|
309
|
+
if ($[0] !== t0) {
|
|
310
|
+
({className, ...props} = t0);
|
|
311
|
+
$[0] = t0;
|
|
312
|
+
$[1] = className;
|
|
313
|
+
$[2] = props;
|
|
314
|
+
} else {
|
|
315
|
+
className = $[1];
|
|
316
|
+
props = $[2];
|
|
317
|
+
}
|
|
318
|
+
let t1;
|
|
319
|
+
if ($[3] !== className) {
|
|
320
|
+
t1 = cnState("min-w-0 truncate [&_mark]:bg-transparent [&_mark]:font-semibold [&_mark]:text-inherit", className);
|
|
321
|
+
$[3] = className;
|
|
322
|
+
$[4] = t1;
|
|
323
|
+
} else t1 = $[4];
|
|
324
|
+
let t2;
|
|
325
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
326
|
+
t2 = /* @__PURE__ */ jsx(CommandItemText$1, {
|
|
327
|
+
className: t1,
|
|
328
|
+
...props
|
|
329
|
+
});
|
|
330
|
+
$[5] = props;
|
|
331
|
+
$[6] = t1;
|
|
332
|
+
$[7] = t2;
|
|
333
|
+
} else t2 = $[7];
|
|
334
|
+
return t2;
|
|
335
|
+
}
|
|
336
|
+
const CommandShortcut = Object.assign(function CommandShortcut({ className, ...props }) {
|
|
337
|
+
return /* @__PURE__ */ jsx(CommandShortcut$1, {
|
|
338
|
+
className: cnState("ms-auto ps-2 text-xs tracking-widest whitespace-nowrap text-muted-foreground in-data-highlighted:text-accent-foreground", className),
|
|
339
|
+
...props
|
|
340
|
+
});
|
|
341
|
+
}, notLabel);
|
|
342
|
+
function CommandSeparator(t0) {
|
|
343
|
+
const $ = c(8);
|
|
344
|
+
let className;
|
|
345
|
+
let props;
|
|
346
|
+
if ($[0] !== t0) {
|
|
347
|
+
({className, ...props} = t0);
|
|
348
|
+
$[0] = t0;
|
|
349
|
+
$[1] = className;
|
|
350
|
+
$[2] = props;
|
|
351
|
+
} else {
|
|
352
|
+
className = $[1];
|
|
353
|
+
props = $[2];
|
|
354
|
+
}
|
|
355
|
+
let t1;
|
|
356
|
+
if ($[3] !== className) {
|
|
357
|
+
t1 = cnState("pointer-events-none -mx-1 my-1 h-px shrink-0 bg-border", className);
|
|
358
|
+
$[3] = className;
|
|
359
|
+
$[4] = t1;
|
|
360
|
+
} else t1 = $[4];
|
|
361
|
+
let t2;
|
|
362
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
363
|
+
t2 = /* @__PURE__ */ jsx(CommandSeparator$1, {
|
|
364
|
+
className: t1,
|
|
365
|
+
...props
|
|
366
|
+
});
|
|
367
|
+
$[5] = props;
|
|
368
|
+
$[6] = t1;
|
|
369
|
+
$[7] = t2;
|
|
370
|
+
} else t2 = $[7];
|
|
371
|
+
return t2;
|
|
372
|
+
}
|
|
373
|
+
export { Command, CommandEmpty, CommandGroup, CommandGroupLabel, CommandInput, CommandItem, CommandItemIcon, CommandItemText, CommandList, CommandPage, CommandSeparator, CommandShortcut, CommandStatus, createCommandController };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { ChangeDetails } from "../../core/ui-sdk.js";
|
|
2
|
+
import { index_d_exports } from "../../core/index.js";
|
|
3
|
+
import { ComponentProps, ReactNode } from "react";
|
|
4
|
+
import { Button } from "@ui-sdk/react/button";
|
|
5
|
+
import { Input } from "@ui-sdk/react/input";
|
|
6
|
+
type CommandDockOpenChangeReason = "trigger-press" | "escape-key" | "outside-press" | "imperative";
|
|
7
|
+
type CommandDockValueChangeReason = "input-change" | "clear-press" | "reset" | "imperative";
|
|
8
|
+
type CommandDockSubmitReason = "form-submit" | "imperative";
|
|
9
|
+
type CommandDockOptions = {
|
|
10
|
+
/** Whether the dock is open. Pass it to control the dock. */
|
|
11
|
+
open?: boolean;
|
|
12
|
+
/** Whether the dock starts open, when uncontrolled. */
|
|
13
|
+
defaultOpen?: boolean;
|
|
14
|
+
/** Runs when the dock wants to open or close. `details.cancel()` stops it. */
|
|
15
|
+
onOpenChange?: (open: boolean, details: ChangeDetails<CommandDockOpenChangeReason>) => void;
|
|
16
|
+
/** The text in the field. Pass it to control the field. */
|
|
17
|
+
value?: string;
|
|
18
|
+
/** The text the field starts with, when uncontrolled. */
|
|
19
|
+
defaultValue?: string;
|
|
20
|
+
/** Runs when the text wants to change. `details.cancel()` stops it. */
|
|
21
|
+
onValueChange?: (value: string, details: ChangeDetails<CommandDockValueChangeReason>) => void;
|
|
22
|
+
/** Runs with the trimmed text when it is sent. Never while empty or `busy`. */
|
|
23
|
+
onSubmit?: (value: string, details: ChangeDetails<CommandDockSubmitReason>) => void;
|
|
24
|
+
/** An answer is on its way: the text can't be sent again until it ends. */
|
|
25
|
+
busy?: boolean;
|
|
26
|
+
};
|
|
27
|
+
type CommandDockPartState = {
|
|
28
|
+
open: boolean;
|
|
29
|
+
busy: boolean;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* The dock's state and the methods that change it, for a component inside
|
|
33
|
+
* `CommandDock`. It re-renders when the state changes.
|
|
34
|
+
*/
|
|
35
|
+
declare function useCommandDock(): {
|
|
36
|
+
open: boolean;
|
|
37
|
+
value: string;
|
|
38
|
+
busy: boolean;
|
|
39
|
+
setOpen: (open: boolean) => boolean;
|
|
40
|
+
setValue: (value: string) => boolean;
|
|
41
|
+
submit: () => boolean;
|
|
42
|
+
};
|
|
43
|
+
type CommandDockProps = CommandDockOptions & Omit<index_d_exports.PartProps<"div", CommandDockPartState>, "onSubmit" | "defaultValue"> & {
|
|
44
|
+
/** How wide the dock is while closed, as a CSS length. `9rem` by default. */
|
|
45
|
+
closedWidth?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Names the dock for screen readers and agents. Set it in the page's
|
|
48
|
+
* language, with words the trigger's and the field's names don't hold.
|
|
49
|
+
*/
|
|
50
|
+
label?: string;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* The root. The trigger and the panel inside it are one surface: closed, a
|
|
54
|
+
* pill `closedWidth` wide; open, it widens in place and grows downward as
|
|
55
|
+
* rows arrive. Escape and a press outside close it, and what was typed and
|
|
56
|
+
* the rows are kept.
|
|
57
|
+
*/
|
|
58
|
+
declare function CommandDock({ open, defaultOpen, onOpenChange, value, defaultValue, onValueChange, onSubmit, busy, closedWidth, label, className, style, children, ...props }: CommandDockProps): import("react").JSX.Element | null;
|
|
59
|
+
type CommandDockTriggerProps = Omit<ComponentProps<typeof Button>, "children"> & {
|
|
60
|
+
children?: ReactNode;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* The closed form: a button with the app's label that opens the dock. It
|
|
64
|
+
* keeps its row while the dock is open, faded out and inert, so the surface
|
|
65
|
+
* is never shorter than one row.
|
|
66
|
+
*/
|
|
67
|
+
declare function CommandDockTrigger({ className, onClick, children, ...props }: CommandDockTriggerProps): import("react").JSX.Element;
|
|
68
|
+
/**
|
|
69
|
+
* The open form: the field, and the rows under it. It stays in the page
|
|
70
|
+
* while closed, folded away and inert, so closing can be seen and the text
|
|
71
|
+
* and the rows are still there when it opens again.
|
|
72
|
+
*/
|
|
73
|
+
declare function CommandDockPanel({ className, ...props }: index_d_exports.PartProps<"div", CommandDockPartState>): import("react").JSX.Element | null;
|
|
74
|
+
type CommandDockInputProps = Omit<ComponentProps<typeof Input>, "value" | "defaultValue" | "onValueChange" | "type"> & {
|
|
75
|
+
/** The send button's accessible name. Set it in the page's language. */
|
|
76
|
+
submitLabel?: string;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* The field, with a button that sends what is in it. Enter sends too. Name
|
|
80
|
+
* the field with `aria-label` in words the trigger's label doesn't hold: a
|
|
81
|
+
* placeholder isn't a name, and an agent finds each control by its own.
|
|
82
|
+
*/
|
|
83
|
+
declare function CommandDockInput({ className, submitLabel, "aria-label": ariaLabel, onKeyDown, ...props }: CommandDockInputProps): import("react").JSX.Element | null;
|
|
84
|
+
type CommandDockResultsProps = ComponentProps<"div"> & {
|
|
85
|
+
/** Names the list of rows. Set it in the page's language. */
|
|
86
|
+
label?: string;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Where the rows go. It takes no room until there is a row or the dock is
|
|
90
|
+
* busy, and folds away what it holds while the dock is closed. Rows are read
|
|
91
|
+
* out as they arrive, without cutting in on typing.
|
|
92
|
+
*/
|
|
93
|
+
declare function CommandDockResults({ label, className, children, ...props }: CommandDockResultsProps): import("react").JSX.Element | null;
|
|
94
|
+
type CommandDockRowProps = Omit<ComponentProps<"div">, "onSelect"> & {
|
|
95
|
+
/**
|
|
96
|
+
* Runs when the row is chosen, which makes the row a button. Its text is
|
|
97
|
+
* the button's name, so it has to say what choosing it does on its own.
|
|
98
|
+
*/
|
|
99
|
+
onSelect?: () => void;
|
|
100
|
+
/** Stops a row with `onSelect` from being chosen. */
|
|
101
|
+
disabled?: boolean;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* One row of the answer. A row added while the dock is on the page slides
|
|
105
|
+
* in, and rows added together enter one after another.
|
|
106
|
+
*/
|
|
107
|
+
declare function CommandDockRow({ onSelect, disabled, className, children, ...props }: CommandDockRowProps): import("react").JSX.Element | null;
|
|
108
|
+
/** What the row is. It takes the width the row has spare and is cut to one line. */
|
|
109
|
+
declare function CommandDockRowTitle({ className, ...props }: ComponentProps<"span">): import("react").JSX.Element;
|
|
110
|
+
/** Something short at the end of the row, quieter than its title. It keeps its width. */
|
|
111
|
+
declare function CommandDockRowMeta({ className, ...props }: ComponentProps<"span">): import("react").JSX.Element;
|
|
112
|
+
/**
|
|
113
|
+
* Three dots and a few words, for while an answer is on its way. It goes
|
|
114
|
+
* last in `CommandDockResults`, while the dock is `busy`. Children replace
|
|
115
|
+
* "Working".
|
|
116
|
+
*/
|
|
117
|
+
declare function CommandDockStatus({ className, children, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
118
|
+
export { CommandDock, CommandDockInput, type CommandDockInputProps, type CommandDockOpenChangeReason, CommandDockPanel, type CommandDockProps, CommandDockResults, type CommandDockResultsProps, CommandDockRow, CommandDockRowMeta, type CommandDockRowProps, CommandDockRowTitle, CommandDockStatus, type CommandDockSubmitReason, CommandDockTrigger, type CommandDockTriggerProps, type CommandDockValueChangeReason, useCommandDock };
|