@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,162 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cnState } from "../../utilities/cn/index.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Progress as Progress$1, ProgressIndicator as ProgressIndicator$1, ProgressLabel as ProgressLabel$1, ProgressTrack as ProgressTrack$1, ProgressValue as ProgressValue$1 } from "@ui-sdk/react/progress";
|
|
6
|
+
// src/components/progress/progress.tsx
|
|
7
|
+
function Progress(t0) {
|
|
8
|
+
const $ = c(8);
|
|
9
|
+
let className;
|
|
10
|
+
let props;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({className, ...props} = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = className;
|
|
15
|
+
$[2] = props;
|
|
16
|
+
} else {
|
|
17
|
+
className = $[1];
|
|
18
|
+
props = $[2];
|
|
19
|
+
}
|
|
20
|
+
let t1;
|
|
21
|
+
if ($[3] !== className) {
|
|
22
|
+
t1 = cnState("flex w-full min-w-48 flex-wrap gap-x-3 gap-y-2", className);
|
|
23
|
+
$[3] = className;
|
|
24
|
+
$[4] = t1;
|
|
25
|
+
} else t1 = $[4];
|
|
26
|
+
let t2;
|
|
27
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
28
|
+
t2 = /* @__PURE__ */ jsx(Progress$1, {
|
|
29
|
+
className: t1,
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
$[5] = props;
|
|
33
|
+
$[6] = t1;
|
|
34
|
+
$[7] = t2;
|
|
35
|
+
} else t2 = $[7];
|
|
36
|
+
return t2;
|
|
37
|
+
}
|
|
38
|
+
function ProgressLabel(t0) {
|
|
39
|
+
const $ = c(8);
|
|
40
|
+
let className;
|
|
41
|
+
let props;
|
|
42
|
+
if ($[0] !== t0) {
|
|
43
|
+
({className, ...props} = t0);
|
|
44
|
+
$[0] = t0;
|
|
45
|
+
$[1] = className;
|
|
46
|
+
$[2] = props;
|
|
47
|
+
} else {
|
|
48
|
+
className = $[1];
|
|
49
|
+
props = $[2];
|
|
50
|
+
}
|
|
51
|
+
let t1;
|
|
52
|
+
if ($[3] !== className) {
|
|
53
|
+
t1 = cnState("text-sm text-muted-foreground", className);
|
|
54
|
+
$[3] = className;
|
|
55
|
+
$[4] = t1;
|
|
56
|
+
} else t1 = $[4];
|
|
57
|
+
let t2;
|
|
58
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
59
|
+
t2 = /* @__PURE__ */ jsx(ProgressLabel$1, {
|
|
60
|
+
className: t1,
|
|
61
|
+
...props
|
|
62
|
+
});
|
|
63
|
+
$[5] = props;
|
|
64
|
+
$[6] = t1;
|
|
65
|
+
$[7] = t2;
|
|
66
|
+
} else t2 = $[7];
|
|
67
|
+
return t2;
|
|
68
|
+
}
|
|
69
|
+
function ProgressValue(t0) {
|
|
70
|
+
const $ = c(8);
|
|
71
|
+
let className;
|
|
72
|
+
let props;
|
|
73
|
+
if ($[0] !== t0) {
|
|
74
|
+
({className, ...props} = t0);
|
|
75
|
+
$[0] = t0;
|
|
76
|
+
$[1] = className;
|
|
77
|
+
$[2] = props;
|
|
78
|
+
} else {
|
|
79
|
+
className = $[1];
|
|
80
|
+
props = $[2];
|
|
81
|
+
}
|
|
82
|
+
let t1;
|
|
83
|
+
if ($[3] !== className) {
|
|
84
|
+
t1 = cnState("ms-auto text-sm text-subtle tabular-nums", className);
|
|
85
|
+
$[3] = className;
|
|
86
|
+
$[4] = t1;
|
|
87
|
+
} else t1 = $[4];
|
|
88
|
+
let t2;
|
|
89
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
90
|
+
t2 = /* @__PURE__ */ jsx(ProgressValue$1, {
|
|
91
|
+
className: t1,
|
|
92
|
+
...props
|
|
93
|
+
});
|
|
94
|
+
$[5] = props;
|
|
95
|
+
$[6] = t1;
|
|
96
|
+
$[7] = t2;
|
|
97
|
+
} else t2 = $[7];
|
|
98
|
+
return t2;
|
|
99
|
+
}
|
|
100
|
+
function ProgressTrack(t0) {
|
|
101
|
+
const $ = c(8);
|
|
102
|
+
let className;
|
|
103
|
+
let props;
|
|
104
|
+
if ($[0] !== t0) {
|
|
105
|
+
({className, ...props} = t0);
|
|
106
|
+
$[0] = t0;
|
|
107
|
+
$[1] = className;
|
|
108
|
+
$[2] = props;
|
|
109
|
+
} else {
|
|
110
|
+
className = $[1];
|
|
111
|
+
props = $[2];
|
|
112
|
+
}
|
|
113
|
+
let t1;
|
|
114
|
+
if ($[3] !== className) {
|
|
115
|
+
t1 = cnState("relative flex h-1 w-full items-center overflow-hidden rounded-full bg-muted", className);
|
|
116
|
+
$[3] = className;
|
|
117
|
+
$[4] = t1;
|
|
118
|
+
} else t1 = $[4];
|
|
119
|
+
let t2;
|
|
120
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
121
|
+
t2 = /* @__PURE__ */ jsx(ProgressTrack$1, {
|
|
122
|
+
className: t1,
|
|
123
|
+
...props
|
|
124
|
+
});
|
|
125
|
+
$[5] = props;
|
|
126
|
+
$[6] = t1;
|
|
127
|
+
$[7] = t2;
|
|
128
|
+
} else t2 = $[7];
|
|
129
|
+
return t2;
|
|
130
|
+
}
|
|
131
|
+
function ProgressIndicator(t0) {
|
|
132
|
+
const $ = c(8);
|
|
133
|
+
let className;
|
|
134
|
+
let props;
|
|
135
|
+
if ($[0] !== t0) {
|
|
136
|
+
({className, ...props} = t0);
|
|
137
|
+
$[0] = t0;
|
|
138
|
+
$[1] = className;
|
|
139
|
+
$[2] = props;
|
|
140
|
+
} else {
|
|
141
|
+
className = $[1];
|
|
142
|
+
props = $[2];
|
|
143
|
+
}
|
|
144
|
+
let t1;
|
|
145
|
+
if ($[3] !== className) {
|
|
146
|
+
t1 = cnState("h-full bg-brand transition-[width] duration-popup ease-out data-indeterminate:w-full data-indeterminate:animate-pulse motion-reduce:transition-none motion-reduce:data-indeterminate:animate-none", className);
|
|
147
|
+
$[3] = className;
|
|
148
|
+
$[4] = t1;
|
|
149
|
+
} else t1 = $[4];
|
|
150
|
+
let t2;
|
|
151
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
152
|
+
t2 = /* @__PURE__ */ jsx(ProgressIndicator$1, {
|
|
153
|
+
className: t1,
|
|
154
|
+
...props
|
|
155
|
+
});
|
|
156
|
+
$[5] = props;
|
|
157
|
+
$[6] = t1;
|
|
158
|
+
$[7] = t2;
|
|
159
|
+
} else t2 = $[7];
|
|
160
|
+
return t2;
|
|
161
|
+
}
|
|
162
|
+
export { Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue };
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { FileInput, FileInputItem, FileInputList, FileInputTriggerProps } from "../file-input/file-input.js";
|
|
2
|
+
import { InputGroupAddonProps, InputGroupButtonProps, InputGroupTextarea } from "../input-group/input-group.js";
|
|
3
|
+
import { MenuContentProps, MenuItem, MenuProps, MenuTriggerProps } from "../menu/menu.js";
|
|
4
|
+
import { ToggleProps } from "../toggle/toggle.js";
|
|
5
|
+
import { ComponentProps, FormEvent, ReactNode } from "react";
|
|
6
|
+
/** Where the conversation is: `submitted` and `streaming` are a run, which Send turns into Stop for. */
|
|
7
|
+
type PromptInputStatus = "ready" | "submitted" | "streaming" | "error";
|
|
8
|
+
/** What the form submits. */
|
|
9
|
+
type PromptInputMessage = {
|
|
10
|
+
/** The text, as typed. */
|
|
11
|
+
text: string;
|
|
12
|
+
files: File[];
|
|
13
|
+
};
|
|
14
|
+
type PromptInputContextValue = {
|
|
15
|
+
text: string;
|
|
16
|
+
setText: (text: string) => void;
|
|
17
|
+
files: File[];
|
|
18
|
+
setFiles: (files: File[]) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Runs files through the form's checks (`accept`, `maxFiles`, a name
|
|
21
|
+
* already attached…) and attaches the ones that pass, as a drop does.
|
|
22
|
+
*/
|
|
23
|
+
addFiles: (files: File[]) => void;
|
|
24
|
+
/** Opens the system's file picker. Call it from a press, or the browser refuses. */
|
|
25
|
+
openFileDialog: () => void;
|
|
26
|
+
status: PromptInputStatus;
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
/** Whether Enter and Send submit: there is text, no run is going, and the form isn't disabled. */
|
|
29
|
+
canSubmit: boolean;
|
|
30
|
+
};
|
|
31
|
+
/** The form's text, files and status. Call it inside a `PromptInput`. */
|
|
32
|
+
declare function usePromptInput(): PromptInputContextValue;
|
|
33
|
+
type FileInputProps = ComponentProps<typeof FileInput>;
|
|
34
|
+
type PromptInputProps = Omit<ComponentProps<"form">, "onSubmit" | "defaultValue"> & Pick<FileInputProps, "accept" | "maxFiles" | "maxSize" | "minSize" | "validate" | "onReject"> & {
|
|
35
|
+
/**
|
|
36
|
+
* Runs on Send or Enter, with the text and the files. The field empties
|
|
37
|
+
* after it returns; when it returns a promise, once that resolves, and a
|
|
38
|
+
* rejected one keeps what was typed.
|
|
39
|
+
*/
|
|
40
|
+
onSubmit?: (message: PromptInputMessage, event: FormEvent<HTMLFormElement>) => void | Promise<void>;
|
|
41
|
+
/** The text, to control it. */
|
|
42
|
+
value?: string;
|
|
43
|
+
/** The text at first, when uncontrolled. */
|
|
44
|
+
defaultValue?: string;
|
|
45
|
+
onValueChange?: (text: string) => void;
|
|
46
|
+
/** The attached files, to control them. */
|
|
47
|
+
files?: File[];
|
|
48
|
+
/** The files at first, when uncontrolled. */
|
|
49
|
+
defaultFiles?: File[];
|
|
50
|
+
onFilesChange?: (files: File[]) => void;
|
|
51
|
+
/**
|
|
52
|
+
* Where the conversation is. During a run (`submitted` or `streaming`)
|
|
53
|
+
* nothing is sent, and the next message can still be typed.
|
|
54
|
+
*/
|
|
55
|
+
status?: PromptInputStatus;
|
|
56
|
+
/** Disables the textarea, the attachments and the buttons. */
|
|
57
|
+
disabled?: boolean;
|
|
58
|
+
/** Holds more than one file. On by default. */
|
|
59
|
+
multiple?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* The name of the file input and of its attach button, to translate it.
|
|
62
|
+
* An agent finds the input by it even when the form has no button.
|
|
63
|
+
*/
|
|
64
|
+
filesLabel?: string;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* The form. It holds the text and the files, and submits both: empty or
|
|
68
|
+
* blank text sends nothing. Its children are the parts of the box, in the
|
|
69
|
+
* order they read: `PromptInputHeader`, `PromptInputTextarea` (or a
|
|
70
|
+
* `PromptInputRecorder` while recording), `PromptInputFooter`.
|
|
71
|
+
*/
|
|
72
|
+
declare function PromptInput({ onSubmit, value, defaultValue, onValueChange, files, defaultFiles, onFilesChange, status, filesLabel, disabled, multiple, accept, maxFiles, maxSize, minSize, validate, onReject, className, children, ...props }: PromptInputProps): import("react").JSX.Element;
|
|
73
|
+
type PromptInputTextareaProps = Omit<ComponentProps<typeof InputGroupTextarea>, "value" | "defaultValue">;
|
|
74
|
+
/**
|
|
75
|
+
* The message. Enter sends it, Shift+Enter adds a line, and Enter that
|
|
76
|
+
* confirms an input method's composition does neither; `submitShortcut`
|
|
77
|
+
* changes the keys. It grows with its text. Translate its name with `aria-label`.
|
|
78
|
+
*/
|
|
79
|
+
declare function PromptInputTextarea({ ref, onValueChange, className, "aria-label": ariaLabel, placeholder, submitShortcut, autoResize, rows, disabled, ...props }: PromptInputTextareaProps): import("react").JSX.Element;
|
|
80
|
+
type PromptInputHeaderProps = Omit<InputGroupAddonProps, "align">;
|
|
81
|
+
/**
|
|
82
|
+
* The row above the text. With no children it lists the attached files, and
|
|
83
|
+
* draws nothing while there are none.
|
|
84
|
+
*/
|
|
85
|
+
declare function PromptInputHeader({ children, ...props }: PromptInputHeaderProps): import("react").JSX.Element | null;
|
|
86
|
+
type PromptInputAttachmentsProps = ComponentProps<typeof FileInputList>;
|
|
87
|
+
/**
|
|
88
|
+
* The attached files, as a list with one Tab stop: arrows move between them,
|
|
89
|
+
* and Delete or Backspace removes the focused one. Its children render once
|
|
90
|
+
* for each file; with none, each file is a `PromptInputAttachment`.
|
|
91
|
+
*/
|
|
92
|
+
declare function PromptInputAttachments({ "aria-label": ariaLabel, className, children, ...props }: PromptInputAttachmentsProps): import("react").JSX.Element;
|
|
93
|
+
type PromptInputAttachmentProps = Omit<ComponentProps<typeof FileInputItem>, "children"> & {
|
|
94
|
+
/** The icon in the chip's media. */
|
|
95
|
+
icon?: ReactNode;
|
|
96
|
+
/** The remove button's name, to translate it. By default "Remove" and the file's name. */
|
|
97
|
+
removeLabel?: (file: File) => string;
|
|
98
|
+
};
|
|
99
|
+
/** One attached file: a small Attachment with its name and a button that removes it. */
|
|
100
|
+
declare function PromptInputAttachment({ icon, removeLabel, className, ...props }: PromptInputAttachmentProps): import("react").JSX.Element;
|
|
101
|
+
type PromptInputFooterProps = Omit<InputGroupAddonProps, "align">;
|
|
102
|
+
/**
|
|
103
|
+
* The row under the text: `PromptInputTools` at the start and at the end.
|
|
104
|
+
* Its controls are 28px, 10px from the box's edge and 4px apart, so a ghost
|
|
105
|
+
* button's icon lines up with the text above.
|
|
106
|
+
*/
|
|
107
|
+
declare function PromptInputFooter({ className, ...props }: PromptInputFooterProps): import("react").JSX.Element;
|
|
108
|
+
type PromptInputToolsProps = ComponentProps<"div">;
|
|
109
|
+
/** A group of controls in the footer: the action menu and the toggles, or the model, the microphone and Send. */
|
|
110
|
+
declare function PromptInputTools({ className, ...props }: PromptInputToolsProps): import("react").JSX.Element;
|
|
111
|
+
type PromptInputButtonProps = InputGroupButtonProps;
|
|
112
|
+
/**
|
|
113
|
+
* A button in the footer: a quiet pill with an icon and a label, or a round
|
|
114
|
+
* button with only an icon (`size="icon-sm"`, and an `aria-label`).
|
|
115
|
+
*/
|
|
116
|
+
declare function PromptInputButton({ variant, size, className, ...props }: PromptInputButtonProps): import("react").JSX.Element;
|
|
117
|
+
type PromptInputToggleProps = Omit<ToggleProps, "variant" | "size">;
|
|
118
|
+
/**
|
|
119
|
+
* An option that goes with the message, like "Web search": a pill with an
|
|
120
|
+
* icon and a label that is on or off. Off, it is an outline in the quiet
|
|
121
|
+
* gray; on, it takes a fill, a firmer edge and the text color, so the state
|
|
122
|
+
* reads by more than a tint.
|
|
123
|
+
*/
|
|
124
|
+
declare function PromptInputToggle({ className, ...props }: PromptInputToggleProps): import("react").JSX.Element;
|
|
125
|
+
/**
|
|
126
|
+
* The menu of things to add to the message, opened from the footer's plus
|
|
127
|
+
* button: upload a file, take a screenshot, connect a source. It takes Menu's props.
|
|
128
|
+
*/
|
|
129
|
+
declare function PromptInputActionMenu(props: MenuProps): import("react").JSX.Element;
|
|
130
|
+
type PromptInputActionMenuTriggerProps = Omit<MenuTriggerProps, "variant" | "size">;
|
|
131
|
+
/**
|
|
132
|
+
* The round plus button that opens the action menu. Its name is "Add
|
|
133
|
+
* context" by default, to translate with `aria-label`: not "Attach files",
|
|
134
|
+
* which is the file input's, nor a word an item's name holds whole, or an
|
|
135
|
+
* agent can't tell them apart.
|
|
136
|
+
*/
|
|
137
|
+
declare function PromptInputActionMenuTrigger({ "aria-label": ariaLabel, className, children, ...props }: PromptInputActionMenuTriggerProps): import("react").JSX.Element;
|
|
138
|
+
/** The popup of the action menu. It opens above the plus button, from its start. */
|
|
139
|
+
declare function PromptInputActionMenuContent({ side, align, className, ...props }: MenuContentProps): import("react").JSX.Element;
|
|
140
|
+
type PromptInputActionMenuItemProps = ComponentProps<typeof MenuItem>;
|
|
141
|
+
/** One action. Start it with an `Icon`, which takes the quiet gray. */
|
|
142
|
+
declare function PromptInputActionMenuItem({ className, ...props }: PromptInputActionMenuItemProps): import("react").JSX.Element;
|
|
143
|
+
type PromptInputActionAddAttachmentsProps = FileInputTriggerProps & {
|
|
144
|
+
/**
|
|
145
|
+
* The name. As a button it defaults to the form's `filesLabel` (set that
|
|
146
|
+
* one to translate both); as an item of the action menu, to "Upload file".
|
|
147
|
+
*/
|
|
148
|
+
label?: string;
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* The action that opens the file picker. Inside a `PromptInputActionMenu` it
|
|
152
|
+
* is one of its items, "Upload file" with a paperclip. Anywhere else it is a
|
|
153
|
+
* round plus button named by `label`, or by its children.
|
|
154
|
+
*/
|
|
155
|
+
declare function PromptInputActionAddAttachments({ label, variant, className, children, ...props }: PromptInputActionAddAttachmentsProps): import("react").JSX.Element;
|
|
156
|
+
type PromptInputActionAddScreenshotProps = Omit<PromptInputActionMenuItemProps, "onSelect"> & {
|
|
157
|
+
/** The item's name, to translate it. */
|
|
158
|
+
label?: string;
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* An item of the action menu that attaches a screenshot: the browser asks
|
|
162
|
+
* which screen, window or tab to share, and one frame of it is attached as a PNG.
|
|
163
|
+
*/
|
|
164
|
+
declare function PromptInputActionAddScreenshot({ label, disabled, children, ...props }: PromptInputActionAddScreenshotProps): import("react").JSX.Element;
|
|
165
|
+
type PromptInputSubmitProps = InputGroupButtonProps & {
|
|
166
|
+
/** Where the conversation is. By default, the form's `status`. */
|
|
167
|
+
status?: PromptInputStatus;
|
|
168
|
+
/** Runs when the button is pressed during a run. */
|
|
169
|
+
onStop?: () => void;
|
|
170
|
+
/** The button's name while it sends, to translate it. */
|
|
171
|
+
label?: string;
|
|
172
|
+
/** The button's name during a run, to translate it. */
|
|
173
|
+
stopLabel?: string;
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* Send, which is Stop during a run: one button for both, so focus stays on it
|
|
177
|
+
* when a run starts or ends. While there is nothing to send it is disabled
|
|
178
|
+
* and quiet, a gray circle; with text it takes the primary fill. Children
|
|
179
|
+
* replace its icon.
|
|
180
|
+
*/
|
|
181
|
+
declare function PromptInputSubmit({ status: ownStatus, onStop, label, stopLabel, variant, size, disabled, className, onClick, children, ...props }: PromptInputSubmitProps): import("react").JSX.Element;
|
|
182
|
+
type PromptInputSpeechButtonProps = Omit<ToggleProps, "variant" | "size">;
|
|
183
|
+
/**
|
|
184
|
+
* The microphone: a toggle that is pressed while a voice note records. It
|
|
185
|
+
* takes a fill and a ring 2px off its edge then, so the recording reads from
|
|
186
|
+
* across the screen. Translate its name with `aria-label`.
|
|
187
|
+
*/
|
|
188
|
+
declare function PromptInputSpeechButton({ "aria-label": ariaLabel, className, children, ...props }: PromptInputSpeechButtonProps): import("react").JSX.Element;
|
|
189
|
+
type PromptInputRecorderProps = ComponentProps<"div">;
|
|
190
|
+
/**
|
|
191
|
+
* The row that takes the textarea's place while a voice note records:
|
|
192
|
+
* `PromptInputRecorderCancel` at the start, then `PromptInputWaveform`,
|
|
193
|
+
* `PromptInputRecorderTime` and `PromptInputRecorderConfirm`. Render it
|
|
194
|
+
* instead of `PromptInputTextarea`; the text typed so far stays in the form.
|
|
195
|
+
*/
|
|
196
|
+
declare function PromptInputRecorder({ "aria-label": ariaLabel, className, ...props }: PromptInputRecorderProps): import("react").JSX.Element;
|
|
197
|
+
/** Stops the recording and throws it away. */
|
|
198
|
+
declare function PromptInputRecorderCancel({ "aria-label": ariaLabel, className, children, ...props }: InputGroupButtonProps): import("react").JSX.Element;
|
|
199
|
+
/** Stops the recording and keeps it: the row's main action. */
|
|
200
|
+
declare function PromptInputRecorderConfirm({ "aria-label": ariaLabel, className, children, ...props }: InputGroupButtonProps): import("react").JSX.Element;
|
|
201
|
+
type PromptInputWaveformProps = Omit<ComponentProps<"div">, "children"> & {
|
|
202
|
+
/**
|
|
203
|
+
* How loud each moment was, from 0 to 1, oldest first. The newest bar sits
|
|
204
|
+
* at the end, by the time, and the oldest drop off the start as more come.
|
|
205
|
+
*/
|
|
206
|
+
levels: readonly number[];
|
|
207
|
+
};
|
|
208
|
+
/**
|
|
209
|
+
* The recording's loudness as bars, 2px wide and 2px apart. It is drawn for
|
|
210
|
+
* the eye only: the time says the recording is going.
|
|
211
|
+
*/
|
|
212
|
+
declare function PromptInputWaveform({ levels, className, ...props }: PromptInputWaveformProps): import("react").JSX.Element;
|
|
213
|
+
type PromptInputRecorderTimeProps = Omit<ComponentProps<"span">, "children"> & {
|
|
214
|
+
/** How long it has been recording, in seconds. */
|
|
215
|
+
seconds: number;
|
|
216
|
+
};
|
|
217
|
+
/** How long the voice note has recorded, as `0:05`. */
|
|
218
|
+
declare function PromptInputRecorderTime({ seconds, className, ...props }: PromptInputRecorderTimeProps): import("react").JSX.Element;
|
|
219
|
+
type PromptInputRecorderOptions = {
|
|
220
|
+
/** How many levels to keep for `PromptInputWaveform`: the most it can show. 64 by default. */
|
|
221
|
+
bars?: number;
|
|
222
|
+
/** How often a level is taken, in milliseconds. 60 by default. */
|
|
223
|
+
interval?: number;
|
|
224
|
+
};
|
|
225
|
+
type PromptInputRecorderHandle = {
|
|
226
|
+
/** True from `start()` until `stop()` or `cancel()`, including while the browser asks for the microphone. */
|
|
227
|
+
recording: boolean;
|
|
228
|
+
/** The loudness, from 0 to 1, oldest first, for `PromptInputWaveform`. */
|
|
229
|
+
levels: number[];
|
|
230
|
+
/** How long it has recorded, in seconds, for `PromptInputRecorderTime`. */
|
|
231
|
+
seconds: number;
|
|
232
|
+
/** Why the last `start()` failed, like a refused microphone. */
|
|
233
|
+
error: Error | null;
|
|
234
|
+
/** Asks for the microphone and starts recording. Call it from a press. */
|
|
235
|
+
start: () => Promise<void>;
|
|
236
|
+
/** Stops and resolves with the recording as an audio file, or null when nothing was recorded. */
|
|
237
|
+
stop: () => Promise<File | null>;
|
|
238
|
+
/** Stops and throws the recording away. */
|
|
239
|
+
cancel: () => void;
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* Records a voice note from the microphone, with the levels and the time the
|
|
243
|
+
* recorder's parts draw. Nothing is asked of the browser until `start()`,
|
|
244
|
+
* and the microphone is released on `stop()`, `cancel()` or unmount.
|
|
245
|
+
*/
|
|
246
|
+
declare function usePromptInputRecorder({ bars, interval }?: PromptInputRecorderOptions): PromptInputRecorderHandle;
|
|
247
|
+
export { PromptInput, PromptInputActionAddAttachments, type PromptInputActionAddAttachmentsProps, PromptInputActionAddScreenshot, type PromptInputActionAddScreenshotProps, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuItem, type PromptInputActionMenuItemProps, PromptInputActionMenuTrigger, type PromptInputActionMenuTriggerProps, PromptInputAttachment, type PromptInputAttachmentProps, PromptInputAttachments, type PromptInputAttachmentsProps, PromptInputButton, type PromptInputButtonProps, type PromptInputContextValue, PromptInputFooter, type PromptInputFooterProps, PromptInputHeader, type PromptInputHeaderProps, type PromptInputMessage, type PromptInputProps, PromptInputRecorder, PromptInputRecorderCancel, PromptInputRecorderConfirm, type PromptInputRecorderHandle, type PromptInputRecorderOptions, type PromptInputRecorderProps, PromptInputRecorderTime, type PromptInputRecorderTimeProps, PromptInputSpeechButton, type PromptInputSpeechButtonProps, type PromptInputStatus, PromptInputSubmit, type PromptInputSubmitProps, PromptInputTextarea, type PromptInputTextareaProps, PromptInputToggle, type PromptInputToggleProps, PromptInputTools, type PromptInputToolsProps, PromptInputWaveform, type PromptInputWaveformProps, usePromptInput, usePromptInputRecorder };
|