@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,82 @@
|
|
|
1
|
+
import { Button } from "../button/button.js";
|
|
2
|
+
import { Trace, TraceCollapsibleContent, TraceCollapsibleProps, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLineProps, TraceTitle } from "../trace/trace.js";
|
|
3
|
+
import { ComponentProps, ReactNode } from "react";
|
|
4
|
+
/** A part of a queued message: its text, or a file it carries. */
|
|
5
|
+
type QueueMessagePart = {
|
|
6
|
+
type: string;
|
|
7
|
+
text?: string;
|
|
8
|
+
url?: string;
|
|
9
|
+
filename?: string;
|
|
10
|
+
mediaType?: string;
|
|
11
|
+
};
|
|
12
|
+
/** A message the person sent while the agent was busy. */
|
|
13
|
+
type QueueMessage = {
|
|
14
|
+
id: string;
|
|
15
|
+
parts: QueueMessagePart[];
|
|
16
|
+
};
|
|
17
|
+
type QueueItemStatus = "pending" | "in_progress" | "completed";
|
|
18
|
+
/** A todo as the agent writes it. */
|
|
19
|
+
type QueueTodo = {
|
|
20
|
+
id: string;
|
|
21
|
+
title: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
status?: QueueItemStatus;
|
|
24
|
+
};
|
|
25
|
+
type QueueProps = ComponentProps<typeof Trace> & {
|
|
26
|
+
/** Whether the agent is still working: the item in progress shimmers only while it is. */
|
|
27
|
+
isStreaming?: boolean;
|
|
28
|
+
};
|
|
29
|
+
/** The queue: one or more `QueueSection`s. */
|
|
30
|
+
declare function Queue({ isStreaming, ...props }: QueueProps): import("react").JSX.Element;
|
|
31
|
+
type QueueSectionProps = TraceCollapsibleProps;
|
|
32
|
+
/** A group of items that opens and closes, open at first. It takes Collapsible's props. */
|
|
33
|
+
declare function QueueSection({ defaultOpen, ...props }: QueueSectionProps): import("react").JSX.Element;
|
|
34
|
+
type QueueSectionTriggerProps = ComponentProps<typeof TraceCollapsibleTrigger>;
|
|
35
|
+
/** The button that opens the section, around a `QueueSectionLabel`. */
|
|
36
|
+
declare function QueueSectionTrigger(props: QueueSectionTriggerProps): import("react").JSX.Element;
|
|
37
|
+
type QueueSectionLabelProps = Omit<TraceLineProps, "children"> & {
|
|
38
|
+
/** How many items the section has, drawn before the label. */
|
|
39
|
+
count?: number;
|
|
40
|
+
/** What the section holds, like "to do". */
|
|
41
|
+
label: ReactNode;
|
|
42
|
+
icon?: ReactNode;
|
|
43
|
+
};
|
|
44
|
+
/** The section's line: an icon, a count and a label, like "2 to do". */
|
|
45
|
+
declare function QueueSectionLabel({ count, label, icon, ...props }: QueueSectionLabelProps): import("react").JSX.Element;
|
|
46
|
+
type QueueSectionContentProps = ComponentProps<typeof TraceCollapsibleContent>;
|
|
47
|
+
/** What the section opens into: a `QueueList`, or the details of an item. */
|
|
48
|
+
declare function QueueSectionContent(props: QueueSectionContentProps): import("react").JSX.Element;
|
|
49
|
+
/** The section's items. */
|
|
50
|
+
declare function QueueList(props: ComponentProps<typeof Trace>): import("react").JSX.Element;
|
|
51
|
+
type QueueItemProps = Omit<TraceLineProps, "status"> & {
|
|
52
|
+
/** Where the item is. One `in_progress` shimmers and is announced while the queue streams. */
|
|
53
|
+
status?: QueueItemStatus;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* One item: a `QueueItemIndicator`, a `QueueItemContent` and optionally a
|
|
57
|
+
* `QueueItemDescription` and `QueueItemActions`. An item with details goes in a
|
|
58
|
+
* `QueueSectionTrigger` of its own, with the details in a `QueueSectionContent`.
|
|
59
|
+
*/
|
|
60
|
+
declare function QueueItem({ status, ...props }: QueueItemProps): import("react").JSX.Element;
|
|
61
|
+
type QueueItemIndicatorProps = ComponentProps<typeof TraceIcon> & {
|
|
62
|
+
/** Draws the check. It defaults to whether the item's status is `completed`. */
|
|
63
|
+
completed?: boolean;
|
|
64
|
+
};
|
|
65
|
+
/** The item's mark: a circle, a dot while in progress and a check once completed. Children replace it. */
|
|
66
|
+
declare function QueueItemIndicator({ completed, children, ...props }: QueueItemIndicatorProps): import("react").JSX.Element;
|
|
67
|
+
/** The item's text. */
|
|
68
|
+
declare function QueueItemContent(props: ComponentProps<typeof TraceTitle>): import("react").JSX.Element;
|
|
69
|
+
/** A short note after the item's text, like a time or a count. */
|
|
70
|
+
declare function QueueItemDescription(props: ComponentProps<typeof TraceDescription>): import("react").JSX.Element;
|
|
71
|
+
/** The item's buttons, after its text. Only in an item that isn't inside a trigger. */
|
|
72
|
+
declare function QueueItemActions({ className, ...props }: ComponentProps<"span">): import("react").JSX.Element;
|
|
73
|
+
type QueueItemActionProps = Omit<ComponentProps<typeof Button>, "variant" | "size">;
|
|
74
|
+
/** A small icon button on an item, like remove or send now. Give it an `aria-label` that names the item. */
|
|
75
|
+
declare function QueueItemAction(props: QueueItemActionProps): import("react").JSX.Element;
|
|
76
|
+
/** The files of a queued message, on a row under its item. */
|
|
77
|
+
declare function QueueItemAttachment({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
78
|
+
/** An attached image, as a thumbnail. Its `alt` is empty by default: name the file next to it, or pass one. */
|
|
79
|
+
declare function QueueItemImage({ className, alt, ...props }: ComponentProps<"img">): import("react").JSX.Element;
|
|
80
|
+
/** An attached file: a clip and its name, cut short when it is long. */
|
|
81
|
+
declare function QueueItemFile({ className, children, ...props }: ComponentProps<"span">): import("react").JSX.Element;
|
|
82
|
+
export { Queue, QueueItem, QueueItemAction, type QueueItemActionProps, QueueItemActions, QueueItemAttachment, QueueItemContent, QueueItemDescription, QueueItemFile, QueueItemImage, QueueItemIndicator, type QueueItemIndicatorProps, type QueueItemProps, type QueueItemStatus, QueueList, type QueueMessage, type QueueMessagePart, type QueueProps, QueueSection, QueueSectionContent, type QueueSectionContentProps, QueueSectionLabel, type QueueSectionLabelProps, type QueueSectionProps, QueueSectionTrigger, type QueueSectionTriggerProps, type QueueTodo };
|
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../utilities/cn/index.js";
|
|
3
|
+
import { Button } from "../button/button.js";
|
|
4
|
+
import { Icon } from "../icon/icon.js";
|
|
5
|
+
import { Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle } from "../trace/trace.js";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
7
|
+
import { createContext, useContext } from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { Attachment01Icon, CheckmarkCircle02Icon, CircleDotIcon, CircleIcon } from "@hugeicons/core-free-icons";
|
|
10
|
+
// src/components/queue/queue.tsx
|
|
11
|
+
const QueueContext = createContext(false);
|
|
12
|
+
const QueueItemContext = createContext({
|
|
13
|
+
status: "pending",
|
|
14
|
+
running: false
|
|
15
|
+
});
|
|
16
|
+
/** The queue: one or more `QueueSection`s. */
|
|
17
|
+
function Queue(t0) {
|
|
18
|
+
const $ = c(8);
|
|
19
|
+
let props;
|
|
20
|
+
let t1;
|
|
21
|
+
if ($[0] !== t0) {
|
|
22
|
+
({isStreaming: t1, ...props} = t0);
|
|
23
|
+
$[0] = t0;
|
|
24
|
+
$[1] = props;
|
|
25
|
+
$[2] = t1;
|
|
26
|
+
} else {
|
|
27
|
+
props = $[1];
|
|
28
|
+
t1 = $[2];
|
|
29
|
+
}
|
|
30
|
+
const isStreaming = t1 === void 0 ? false : t1;
|
|
31
|
+
let t2;
|
|
32
|
+
if ($[3] !== props) {
|
|
33
|
+
t2 = /* @__PURE__ */ jsx(Trace, {
|
|
34
|
+
"data-slot": "queue",
|
|
35
|
+
...props
|
|
36
|
+
});
|
|
37
|
+
$[3] = props;
|
|
38
|
+
$[4] = t2;
|
|
39
|
+
} else t2 = $[4];
|
|
40
|
+
let t3;
|
|
41
|
+
if ($[5] !== isStreaming || $[6] !== t2) {
|
|
42
|
+
t3 = /* @__PURE__ */ jsx(QueueContext.Provider, {
|
|
43
|
+
value: isStreaming,
|
|
44
|
+
children: t2
|
|
45
|
+
});
|
|
46
|
+
$[5] = isStreaming;
|
|
47
|
+
$[6] = t2;
|
|
48
|
+
$[7] = t3;
|
|
49
|
+
} else t3 = $[7];
|
|
50
|
+
return t3;
|
|
51
|
+
}
|
|
52
|
+
/** A group of items that opens and closes, open at first. It takes Collapsible's props. */
|
|
53
|
+
function QueueSection(t0) {
|
|
54
|
+
const $ = c(6);
|
|
55
|
+
let props;
|
|
56
|
+
let t1;
|
|
57
|
+
if ($[0] !== t0) {
|
|
58
|
+
({defaultOpen: t1, ...props} = t0);
|
|
59
|
+
$[0] = t0;
|
|
60
|
+
$[1] = props;
|
|
61
|
+
$[2] = t1;
|
|
62
|
+
} else {
|
|
63
|
+
props = $[1];
|
|
64
|
+
t1 = $[2];
|
|
65
|
+
}
|
|
66
|
+
const defaultOpen = t1 === void 0 ? true : t1;
|
|
67
|
+
let t2;
|
|
68
|
+
if ($[3] !== defaultOpen || $[4] !== props) {
|
|
69
|
+
t2 = /* @__PURE__ */ jsx(TraceCollapsible, {
|
|
70
|
+
"data-slot": "queue-section",
|
|
71
|
+
defaultOpen,
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
$[3] = defaultOpen;
|
|
75
|
+
$[4] = props;
|
|
76
|
+
$[5] = t2;
|
|
77
|
+
} else t2 = $[5];
|
|
78
|
+
return t2;
|
|
79
|
+
}
|
|
80
|
+
/** The button that opens the section, around a `QueueSectionLabel`. */
|
|
81
|
+
function QueueSectionTrigger(props) {
|
|
82
|
+
const $ = c(2);
|
|
83
|
+
let t0;
|
|
84
|
+
if ($[0] !== props) {
|
|
85
|
+
t0 = /* @__PURE__ */ jsx(TraceCollapsibleTrigger, {
|
|
86
|
+
"data-slot": "queue-section-trigger",
|
|
87
|
+
...props
|
|
88
|
+
});
|
|
89
|
+
$[0] = props;
|
|
90
|
+
$[1] = t0;
|
|
91
|
+
} else t0 = $[1];
|
|
92
|
+
return t0;
|
|
93
|
+
}
|
|
94
|
+
/** The section's line: an icon, a count and a label, like "2 to do". */
|
|
95
|
+
function QueueSectionLabel(t0) {
|
|
96
|
+
const $ = c(14);
|
|
97
|
+
let count;
|
|
98
|
+
let icon;
|
|
99
|
+
let label;
|
|
100
|
+
let props;
|
|
101
|
+
if ($[0] !== t0) {
|
|
102
|
+
({count, label, icon, ...props} = t0);
|
|
103
|
+
$[0] = t0;
|
|
104
|
+
$[1] = count;
|
|
105
|
+
$[2] = icon;
|
|
106
|
+
$[3] = label;
|
|
107
|
+
$[4] = props;
|
|
108
|
+
} else {
|
|
109
|
+
count = $[1];
|
|
110
|
+
icon = $[2];
|
|
111
|
+
label = $[3];
|
|
112
|
+
props = $[4];
|
|
113
|
+
}
|
|
114
|
+
let t1;
|
|
115
|
+
if ($[5] !== icon) {
|
|
116
|
+
t1 = icon && /* @__PURE__ */ jsx(TraceIcon, { children: icon });
|
|
117
|
+
$[5] = icon;
|
|
118
|
+
$[6] = t1;
|
|
119
|
+
} else t1 = $[6];
|
|
120
|
+
let t2;
|
|
121
|
+
if ($[7] !== count || $[8] !== label) {
|
|
122
|
+
t2 = /* @__PURE__ */ jsxs(TraceTitle, { children: [
|
|
123
|
+
count,
|
|
124
|
+
" ",
|
|
125
|
+
label
|
|
126
|
+
] });
|
|
127
|
+
$[7] = count;
|
|
128
|
+
$[8] = label;
|
|
129
|
+
$[9] = t2;
|
|
130
|
+
} else t2 = $[9];
|
|
131
|
+
let t3;
|
|
132
|
+
if ($[10] !== props || $[11] !== t1 || $[12] !== t2) {
|
|
133
|
+
t3 = /* @__PURE__ */ jsxs(TraceLine, {
|
|
134
|
+
...props,
|
|
135
|
+
children: [t1, t2]
|
|
136
|
+
});
|
|
137
|
+
$[10] = props;
|
|
138
|
+
$[11] = t1;
|
|
139
|
+
$[12] = t2;
|
|
140
|
+
$[13] = t3;
|
|
141
|
+
} else t3 = $[13];
|
|
142
|
+
return t3;
|
|
143
|
+
}
|
|
144
|
+
/** What the section opens into: a `QueueList`, or the details of an item. */
|
|
145
|
+
function QueueSectionContent(props) {
|
|
146
|
+
const $ = c(2);
|
|
147
|
+
let t0;
|
|
148
|
+
if ($[0] !== props) {
|
|
149
|
+
t0 = /* @__PURE__ */ jsx(TraceCollapsibleContent, {
|
|
150
|
+
"data-slot": "queue-section-content",
|
|
151
|
+
...props
|
|
152
|
+
});
|
|
153
|
+
$[0] = props;
|
|
154
|
+
$[1] = t0;
|
|
155
|
+
} else t0 = $[1];
|
|
156
|
+
return t0;
|
|
157
|
+
}
|
|
158
|
+
/** The section's items. */
|
|
159
|
+
function QueueList(props) {
|
|
160
|
+
const $ = c(2);
|
|
161
|
+
let t0;
|
|
162
|
+
if ($[0] !== props) {
|
|
163
|
+
t0 = /* @__PURE__ */ jsx(Trace, {
|
|
164
|
+
"data-slot": "queue-list",
|
|
165
|
+
...props
|
|
166
|
+
});
|
|
167
|
+
$[0] = props;
|
|
168
|
+
$[1] = t0;
|
|
169
|
+
} else t0 = $[1];
|
|
170
|
+
return t0;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* One item: a `QueueItemIndicator`, a `QueueItemContent` and optionally a
|
|
174
|
+
* `QueueItemDescription` and `QueueItemActions`. An item with details goes in a
|
|
175
|
+
* `QueueSectionTrigger` of its own, with the details in a `QueueSectionContent`.
|
|
176
|
+
*/
|
|
177
|
+
function QueueItem(t0) {
|
|
178
|
+
const $ = c(12);
|
|
179
|
+
let props;
|
|
180
|
+
let t1;
|
|
181
|
+
if ($[0] !== t0) {
|
|
182
|
+
({status: t1, ...props} = t0);
|
|
183
|
+
$[0] = t0;
|
|
184
|
+
$[1] = props;
|
|
185
|
+
$[2] = t1;
|
|
186
|
+
} else {
|
|
187
|
+
props = $[1];
|
|
188
|
+
t1 = $[2];
|
|
189
|
+
}
|
|
190
|
+
const status = t1 === void 0 ? "pending" : t1;
|
|
191
|
+
const running = useContext(QueueContext) && status === "in_progress";
|
|
192
|
+
let t2;
|
|
193
|
+
if ($[3] !== running || $[4] !== status) {
|
|
194
|
+
t2 = {
|
|
195
|
+
status,
|
|
196
|
+
running
|
|
197
|
+
};
|
|
198
|
+
$[3] = running;
|
|
199
|
+
$[4] = status;
|
|
200
|
+
$[5] = t2;
|
|
201
|
+
} else t2 = $[5];
|
|
202
|
+
const t3 = running ? "running" : void 0;
|
|
203
|
+
let t4;
|
|
204
|
+
if ($[6] !== props || $[7] !== t3) {
|
|
205
|
+
t4 = /* @__PURE__ */ jsx(TraceLine, {
|
|
206
|
+
status: t3,
|
|
207
|
+
...props
|
|
208
|
+
});
|
|
209
|
+
$[6] = props;
|
|
210
|
+
$[7] = t3;
|
|
211
|
+
$[8] = t4;
|
|
212
|
+
} else t4 = $[8];
|
|
213
|
+
let t5;
|
|
214
|
+
if ($[9] !== t2 || $[10] !== t4) {
|
|
215
|
+
t5 = /* @__PURE__ */ jsx(QueueItemContext.Provider, {
|
|
216
|
+
value: t2,
|
|
217
|
+
children: t4
|
|
218
|
+
});
|
|
219
|
+
$[9] = t2;
|
|
220
|
+
$[10] = t4;
|
|
221
|
+
$[11] = t5;
|
|
222
|
+
} else t5 = $[11];
|
|
223
|
+
return t5;
|
|
224
|
+
}
|
|
225
|
+
/** The item's mark: a circle, a dot while in progress and a check once completed. Children replace it. */
|
|
226
|
+
function QueueItemIndicator(t0) {
|
|
227
|
+
const $ = c(11);
|
|
228
|
+
let children;
|
|
229
|
+
let completed;
|
|
230
|
+
let props;
|
|
231
|
+
if ($[0] !== t0) {
|
|
232
|
+
({completed, children, ...props} = t0);
|
|
233
|
+
$[0] = t0;
|
|
234
|
+
$[1] = children;
|
|
235
|
+
$[2] = completed;
|
|
236
|
+
$[3] = props;
|
|
237
|
+
} else {
|
|
238
|
+
children = $[1];
|
|
239
|
+
completed = $[2];
|
|
240
|
+
props = $[3];
|
|
241
|
+
}
|
|
242
|
+
const { status } = useContext(QueueItemContext);
|
|
243
|
+
const done = completed ?? status === "completed";
|
|
244
|
+
let t1;
|
|
245
|
+
if ($[4] !== children || $[5] !== done || $[6] !== status) {
|
|
246
|
+
t1 = children ?? /* @__PURE__ */ jsx(Icon, { icon: done ? CheckmarkCircle02Icon : status === "in_progress" ? CircleDotIcon : CircleIcon });
|
|
247
|
+
$[4] = children;
|
|
248
|
+
$[5] = done;
|
|
249
|
+
$[6] = status;
|
|
250
|
+
$[7] = t1;
|
|
251
|
+
} else t1 = $[7];
|
|
252
|
+
let t2;
|
|
253
|
+
if ($[8] !== props || $[9] !== t1) {
|
|
254
|
+
t2 = /* @__PURE__ */ jsx(TraceIcon, {
|
|
255
|
+
...props,
|
|
256
|
+
children: t1
|
|
257
|
+
});
|
|
258
|
+
$[8] = props;
|
|
259
|
+
$[9] = t1;
|
|
260
|
+
$[10] = t2;
|
|
261
|
+
} else t2 = $[10];
|
|
262
|
+
return t2;
|
|
263
|
+
}
|
|
264
|
+
/** The item's text. */
|
|
265
|
+
function QueueItemContent(props) {
|
|
266
|
+
const $ = c(3);
|
|
267
|
+
const { running } = useContext(QueueItemContext);
|
|
268
|
+
const t0 = running ? "status" : void 0;
|
|
269
|
+
let t1;
|
|
270
|
+
if ($[0] !== props || $[1] !== t0) {
|
|
271
|
+
t1 = /* @__PURE__ */ jsx(TraceTitle, {
|
|
272
|
+
role: t0,
|
|
273
|
+
...props
|
|
274
|
+
});
|
|
275
|
+
$[0] = props;
|
|
276
|
+
$[1] = t0;
|
|
277
|
+
$[2] = t1;
|
|
278
|
+
} else t1 = $[2];
|
|
279
|
+
return t1;
|
|
280
|
+
}
|
|
281
|
+
/** A short note after the item's text, like a time or a count. */
|
|
282
|
+
function QueueItemDescription(props) {
|
|
283
|
+
const $ = c(2);
|
|
284
|
+
let t0;
|
|
285
|
+
if ($[0] !== props) {
|
|
286
|
+
t0 = /* @__PURE__ */ jsx(TraceDescription, { ...props });
|
|
287
|
+
$[0] = props;
|
|
288
|
+
$[1] = t0;
|
|
289
|
+
} else t0 = $[1];
|
|
290
|
+
return t0;
|
|
291
|
+
}
|
|
292
|
+
/** The item's buttons, after its text. Only in an item that isn't inside a trigger. */
|
|
293
|
+
function QueueItemActions(t0) {
|
|
294
|
+
const $ = c(8);
|
|
295
|
+
let className;
|
|
296
|
+
let props;
|
|
297
|
+
if ($[0] !== t0) {
|
|
298
|
+
({className, ...props} = t0);
|
|
299
|
+
$[0] = t0;
|
|
300
|
+
$[1] = className;
|
|
301
|
+
$[2] = props;
|
|
302
|
+
} else {
|
|
303
|
+
className = $[1];
|
|
304
|
+
props = $[2];
|
|
305
|
+
}
|
|
306
|
+
let t1;
|
|
307
|
+
if ($[3] !== className) {
|
|
308
|
+
t1 = cn("-my-0.5 flex shrink-0 items-center gap-1", className);
|
|
309
|
+
$[3] = className;
|
|
310
|
+
$[4] = t1;
|
|
311
|
+
} else t1 = $[4];
|
|
312
|
+
let t2;
|
|
313
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
314
|
+
t2 = /* @__PURE__ */ jsx("span", {
|
|
315
|
+
"data-slot": "queue-item-actions",
|
|
316
|
+
className: t1,
|
|
317
|
+
...props
|
|
318
|
+
});
|
|
319
|
+
$[5] = props;
|
|
320
|
+
$[6] = t1;
|
|
321
|
+
$[7] = t2;
|
|
322
|
+
} else t2 = $[7];
|
|
323
|
+
return t2;
|
|
324
|
+
}
|
|
325
|
+
/** A small icon button on an item, like remove or send now. Give it an `aria-label` that names the item. */
|
|
326
|
+
function QueueItemAction(props) {
|
|
327
|
+
const $ = c(2);
|
|
328
|
+
let t0;
|
|
329
|
+
if ($[0] !== props) {
|
|
330
|
+
t0 = /* @__PURE__ */ jsx(Button, {
|
|
331
|
+
"data-slot": "queue-item-action",
|
|
332
|
+
type: "button",
|
|
333
|
+
variant: "ghost",
|
|
334
|
+
size: "icon-xs",
|
|
335
|
+
...props
|
|
336
|
+
});
|
|
337
|
+
$[0] = props;
|
|
338
|
+
$[1] = t0;
|
|
339
|
+
} else t0 = $[1];
|
|
340
|
+
return t0;
|
|
341
|
+
}
|
|
342
|
+
/** The files of a queued message, on a row under its item. */
|
|
343
|
+
function QueueItemAttachment(t0) {
|
|
344
|
+
const $ = c(8);
|
|
345
|
+
let className;
|
|
346
|
+
let props;
|
|
347
|
+
if ($[0] !== t0) {
|
|
348
|
+
({className, ...props} = t0);
|
|
349
|
+
$[0] = t0;
|
|
350
|
+
$[1] = className;
|
|
351
|
+
$[2] = props;
|
|
352
|
+
} else {
|
|
353
|
+
className = $[1];
|
|
354
|
+
props = $[2];
|
|
355
|
+
}
|
|
356
|
+
let t1;
|
|
357
|
+
if ($[3] !== className) {
|
|
358
|
+
t1 = cn("flex flex-wrap gap-2 ps-6", className);
|
|
359
|
+
$[3] = className;
|
|
360
|
+
$[4] = t1;
|
|
361
|
+
} else t1 = $[4];
|
|
362
|
+
let t2;
|
|
363
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
364
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
365
|
+
"data-slot": "queue-item-attachment",
|
|
366
|
+
className: t1,
|
|
367
|
+
...props
|
|
368
|
+
});
|
|
369
|
+
$[5] = props;
|
|
370
|
+
$[6] = t1;
|
|
371
|
+
$[7] = t2;
|
|
372
|
+
} else t2 = $[7];
|
|
373
|
+
return t2;
|
|
374
|
+
}
|
|
375
|
+
/** An attached image, as a thumbnail. Its `alt` is empty by default: name the file next to it, or pass one. */
|
|
376
|
+
function QueueItemImage(t0) {
|
|
377
|
+
const $ = c(10);
|
|
378
|
+
let className;
|
|
379
|
+
let props;
|
|
380
|
+
let t1;
|
|
381
|
+
if ($[0] !== t0) {
|
|
382
|
+
({className, alt: t1, ...props} = t0);
|
|
383
|
+
$[0] = t0;
|
|
384
|
+
$[1] = className;
|
|
385
|
+
$[2] = props;
|
|
386
|
+
$[3] = t1;
|
|
387
|
+
} else {
|
|
388
|
+
className = $[1];
|
|
389
|
+
props = $[2];
|
|
390
|
+
t1 = $[3];
|
|
391
|
+
}
|
|
392
|
+
const alt = t1 === void 0 ? "" : t1;
|
|
393
|
+
let t2;
|
|
394
|
+
if ($[4] !== className) {
|
|
395
|
+
t2 = cn("size-8 rounded-sm border object-cover", className);
|
|
396
|
+
$[4] = className;
|
|
397
|
+
$[5] = t2;
|
|
398
|
+
} else t2 = $[5];
|
|
399
|
+
let t3;
|
|
400
|
+
if ($[6] !== alt || $[7] !== props || $[8] !== t2) {
|
|
401
|
+
t3 = /* @__PURE__ */ jsx("img", {
|
|
402
|
+
"data-slot": "queue-item-image",
|
|
403
|
+
alt,
|
|
404
|
+
width: 32,
|
|
405
|
+
height: 32,
|
|
406
|
+
className: t2,
|
|
407
|
+
...props
|
|
408
|
+
});
|
|
409
|
+
$[6] = alt;
|
|
410
|
+
$[7] = props;
|
|
411
|
+
$[8] = t2;
|
|
412
|
+
$[9] = t3;
|
|
413
|
+
} else t3 = $[9];
|
|
414
|
+
return t3;
|
|
415
|
+
}
|
|
416
|
+
/** An attached file: a clip and its name, cut short when it is long. */
|
|
417
|
+
function QueueItemFile(t0) {
|
|
418
|
+
const $ = c(13);
|
|
419
|
+
let children;
|
|
420
|
+
let className;
|
|
421
|
+
let props;
|
|
422
|
+
if ($[0] !== t0) {
|
|
423
|
+
({className, children, ...props} = t0);
|
|
424
|
+
$[0] = t0;
|
|
425
|
+
$[1] = children;
|
|
426
|
+
$[2] = className;
|
|
427
|
+
$[3] = props;
|
|
428
|
+
} else {
|
|
429
|
+
children = $[1];
|
|
430
|
+
className = $[2];
|
|
431
|
+
props = $[3];
|
|
432
|
+
}
|
|
433
|
+
let t1;
|
|
434
|
+
if ($[4] !== className) {
|
|
435
|
+
t1 = cn("flex items-center gap-1 rounded-sm border bg-muted px-2 py-1 text-xs text-foreground", className);
|
|
436
|
+
$[4] = className;
|
|
437
|
+
$[5] = t1;
|
|
438
|
+
} else t1 = $[5];
|
|
439
|
+
let t2;
|
|
440
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
441
|
+
t2 = /* @__PURE__ */ jsx(Icon, {
|
|
442
|
+
icon: Attachment01Icon,
|
|
443
|
+
className: "size-3"
|
|
444
|
+
});
|
|
445
|
+
$[6] = t2;
|
|
446
|
+
} else t2 = $[6];
|
|
447
|
+
let t3;
|
|
448
|
+
if ($[7] !== children) {
|
|
449
|
+
t3 = /* @__PURE__ */ jsx("span", {
|
|
450
|
+
className: "max-w-25 truncate",
|
|
451
|
+
children
|
|
452
|
+
});
|
|
453
|
+
$[7] = children;
|
|
454
|
+
$[8] = t3;
|
|
455
|
+
} else t3 = $[8];
|
|
456
|
+
let t4;
|
|
457
|
+
if ($[9] !== props || $[10] !== t1 || $[11] !== t3) {
|
|
458
|
+
t4 = /* @__PURE__ */ jsxs("span", {
|
|
459
|
+
"data-slot": "queue-item-file",
|
|
460
|
+
className: t1,
|
|
461
|
+
...props,
|
|
462
|
+
children: [t2, t3]
|
|
463
|
+
});
|
|
464
|
+
$[9] = props;
|
|
465
|
+
$[10] = t1;
|
|
466
|
+
$[11] = t3;
|
|
467
|
+
$[12] = t4;
|
|
468
|
+
} else t4 = $[12];
|
|
469
|
+
return t4;
|
|
470
|
+
}
|
|
471
|
+
export { Queue, QueueItem, QueueItemAction, QueueItemActions, QueueItemAttachment, QueueItemContent, QueueItemDescription, QueueItemFile, QueueItemImage, QueueItemIndicator, QueueList, QueueSection, QueueSectionContent, QueueSectionLabel, QueueSectionTrigger };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { Radio as Radio$1, RadioGroup as RadioGroup$1, RadioIndicator as RadioIndicator$1, createRadioGroupController } from "@ui-sdk/react/radio";
|
|
3
|
+
declare function RadioGroup<T extends string = string>({ className, ...props }: ComponentProps<typeof RadioGroup$1<T>>): import("react").JSX.Element;
|
|
4
|
+
declare function Radio({ className, ...props }: ComponentProps<typeof Radio$1>): import("react").JSX.Element;
|
|
5
|
+
/** The dot inside the checked radio. */
|
|
6
|
+
declare function RadioIndicator({ className, ...props }: ComponentProps<typeof RadioIndicator$1>): import("react").JSX.Element;
|
|
7
|
+
export { Radio, RadioGroup, RadioIndicator, createRadioGroupController };
|
|
@@ -0,0 +1,101 @@
|
|
|
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 { Radio as Radio$1, RadioGroup as RadioGroup$1, RadioIndicator as RadioIndicator$1, createRadioGroupController } from "@ui-sdk/react/radio";
|
|
6
|
+
// src/components/radio/radio.tsx
|
|
7
|
+
function RadioGroup(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("grid w-full gap-3", className);
|
|
23
|
+
$[3] = className;
|
|
24
|
+
$[4] = t1;
|
|
25
|
+
} else t1 = $[4];
|
|
26
|
+
let t2;
|
|
27
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
28
|
+
t2 = /* @__PURE__ */ jsx(RadioGroup$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 Radio(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("peer relative flex aspect-square size-4 shrink-0 items-center justify-center rounded-full border border-muted-foreground/40 transition-colors focus-ring after:absolute after:-inset-x-3 after:-inset-y-2 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-checked:border-brand data-checked:bg-brand data-checked:text-brand-foreground data-disabled:cursor-not-allowed data-disabled:opacity-50 dark:bg-input/30 dark:data-checked:bg-brand", className);
|
|
54
|
+
$[3] = className;
|
|
55
|
+
$[4] = t1;
|
|
56
|
+
} else t1 = $[4];
|
|
57
|
+
let t2;
|
|
58
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
59
|
+
t2 = /* @__PURE__ */ jsx(Radio$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
|
+
/** The dot inside the checked radio. */
|
|
70
|
+
function RadioIndicator(t0) {
|
|
71
|
+
const $ = c(8);
|
|
72
|
+
let className;
|
|
73
|
+
let props;
|
|
74
|
+
if ($[0] !== t0) {
|
|
75
|
+
({className, ...props} = t0);
|
|
76
|
+
$[0] = t0;
|
|
77
|
+
$[1] = className;
|
|
78
|
+
$[2] = props;
|
|
79
|
+
} else {
|
|
80
|
+
className = $[1];
|
|
81
|
+
props = $[2];
|
|
82
|
+
}
|
|
83
|
+
let t1;
|
|
84
|
+
if ($[3] !== className) {
|
|
85
|
+
t1 = cnState("size-2 rounded-full bg-brand-foreground", className);
|
|
86
|
+
$[3] = className;
|
|
87
|
+
$[4] = t1;
|
|
88
|
+
} else t1 = $[4];
|
|
89
|
+
let t2;
|
|
90
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
91
|
+
t2 = /* @__PURE__ */ jsx(RadioIndicator$1, {
|
|
92
|
+
className: t1,
|
|
93
|
+
...props
|
|
94
|
+
});
|
|
95
|
+
$[5] = props;
|
|
96
|
+
$[6] = t1;
|
|
97
|
+
$[7] = t2;
|
|
98
|
+
} else t2 = $[7];
|
|
99
|
+
return t2;
|
|
100
|
+
}
|
|
101
|
+
export { Radio, RadioGroup, RadioIndicator, createRadioGroupController };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { Rating as Rating$1, RatingItem as RatingItem$1, createRatingController } from "@ui-sdk/react/rating";
|
|
3
|
+
declare function Rating({ className, ...props }: ComponentProps<typeof Rating$1>): import("react").JSX.Element;
|
|
4
|
+
/**
|
|
5
|
+
* One star. Put the icon inside, `<Icon icon={StarIcon} />`: it is drawn as
|
|
6
|
+
* an outline, and again filled on top, cut at `--rating-fill`, so half stars
|
|
7
|
+
* and averages like 4.2 show.
|
|
8
|
+
*/
|
|
9
|
+
declare function RatingItem({ className, children, ...props }: ComponentProps<typeof RatingItem$1>): import("react").JSX.Element;
|
|
10
|
+
export { Rating, RatingItem, createRatingController };
|