@asanchez-sa/abby 0.0.0-stage → 0.1.1
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 +245 -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 +337 -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 +687 -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,15 @@
|
|
|
1
|
+
import { VariantProps } from "../../utilities/cn/index.js";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
import { Toggle as Toggle$1, ToggleGroup as ToggleGroup$1, ToggleIcon as ToggleIcon$1, createToggleController, createToggleGroupController } from "@ui-sdk/react/toggle";
|
|
4
|
+
declare const toggleVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "outline" | null | undefined;
|
|
6
|
+
size?: "default" | "lg" | "sm" | "xs" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
type ToggleProps = ComponentProps<typeof Toggle$1> & VariantProps<typeof toggleVariants>;
|
|
9
|
+
/** A toggle with only an icon needs an `aria-label`. */
|
|
10
|
+
declare function Toggle({ variant, size, className, ...props }: ToggleProps): import("react").JSX.Element;
|
|
11
|
+
declare function ToggleIcon({ className, ...props }: ComponentProps<typeof ToggleIcon$1>): import("react").JSX.Element;
|
|
12
|
+
type ToggleGroupProps<T extends string = string> = Parameters<typeof ToggleGroup$1<T>>[0];
|
|
13
|
+
/** Name it with `aria-label`, and give each toggle a `value`. */
|
|
14
|
+
declare function ToggleGroup<T extends string = string>({ className, ...props }: ToggleGroupProps<T>): import("react").JSX.Element;
|
|
15
|
+
export { Toggle, ToggleGroup, type ToggleGroupProps, ToggleIcon, type ToggleProps, createToggleController, createToggleGroupController, toggleVariants };
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cnState, cva } from "../../utilities/cn/index.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Toggle as Toggle$1, ToggleGroup as ToggleGroup$1, ToggleIcon as ToggleIcon$1, createToggleController, createToggleGroupController } from "@ui-sdk/react/toggle";
|
|
6
|
+
// src/components/toggle/toggle.tsx
|
|
7
|
+
const toggleVariants = cva("inline-flex items-center justify-center gap-1.5 rounded-full text-sm font-medium whitespace-nowrap text-foreground select-none press hover:bg-accent focus-ring data-disabled:pointer-events-none data-disabled:opacity-50 data-[orientation=vertical]:justify-start data-pressed:bg-primary data-pressed:text-primary-foreground data-pressed:hover:bg-primary/85 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "bg-transparent",
|
|
11
|
+
outline: "border border-input bg-background data-pressed:border-primary"
|
|
12
|
+
},
|
|
13
|
+
size: {
|
|
14
|
+
xs: "h-6 min-w-6 gap-1 px-1 text-xs",
|
|
15
|
+
sm: "h-7 min-w-7 px-2.5 has-[>svg:only-child]:px-1.5",
|
|
16
|
+
default: "h-9 min-w-9 px-3 has-[>svg:only-child]:px-2.5",
|
|
17
|
+
lg: "h-11 min-w-11 px-3.5 text-base"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
variant: "default",
|
|
22
|
+
size: "default"
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
/** A toggle with only an icon needs an `aria-label`. */
|
|
26
|
+
function Toggle(t0) {
|
|
27
|
+
const $ = c(14);
|
|
28
|
+
let className;
|
|
29
|
+
let props;
|
|
30
|
+
let size;
|
|
31
|
+
let variant;
|
|
32
|
+
if ($[0] !== t0) {
|
|
33
|
+
({variant, size, className, ...props} = t0);
|
|
34
|
+
$[0] = t0;
|
|
35
|
+
$[1] = className;
|
|
36
|
+
$[2] = props;
|
|
37
|
+
$[3] = size;
|
|
38
|
+
$[4] = variant;
|
|
39
|
+
} else {
|
|
40
|
+
className = $[1];
|
|
41
|
+
props = $[2];
|
|
42
|
+
size = $[3];
|
|
43
|
+
variant = $[4];
|
|
44
|
+
}
|
|
45
|
+
const t1 = variant ?? "default";
|
|
46
|
+
const t2 = size ?? "default";
|
|
47
|
+
let t3;
|
|
48
|
+
if ($[5] !== className || $[6] !== size || $[7] !== variant) {
|
|
49
|
+
t3 = cnState(toggleVariants({
|
|
50
|
+
variant,
|
|
51
|
+
size
|
|
52
|
+
}), className);
|
|
53
|
+
$[5] = className;
|
|
54
|
+
$[6] = size;
|
|
55
|
+
$[7] = variant;
|
|
56
|
+
$[8] = t3;
|
|
57
|
+
} else t3 = $[8];
|
|
58
|
+
let t4;
|
|
59
|
+
if ($[9] !== props || $[10] !== t1 || $[11] !== t2 || $[12] !== t3) {
|
|
60
|
+
t4 = /* @__PURE__ */ jsx(Toggle$1, {
|
|
61
|
+
"data-variant": t1,
|
|
62
|
+
"data-size": t2,
|
|
63
|
+
className: t3,
|
|
64
|
+
...props
|
|
65
|
+
});
|
|
66
|
+
$[9] = props;
|
|
67
|
+
$[10] = t1;
|
|
68
|
+
$[11] = t2;
|
|
69
|
+
$[12] = t3;
|
|
70
|
+
$[13] = t4;
|
|
71
|
+
} else t4 = $[13];
|
|
72
|
+
return t4;
|
|
73
|
+
}
|
|
74
|
+
function ToggleIcon(t0) {
|
|
75
|
+
const $ = c(8);
|
|
76
|
+
let className;
|
|
77
|
+
let props;
|
|
78
|
+
if ($[0] !== t0) {
|
|
79
|
+
({className, ...props} = t0);
|
|
80
|
+
$[0] = t0;
|
|
81
|
+
$[1] = className;
|
|
82
|
+
$[2] = props;
|
|
83
|
+
} else {
|
|
84
|
+
className = $[1];
|
|
85
|
+
props = $[2];
|
|
86
|
+
}
|
|
87
|
+
let t1;
|
|
88
|
+
if ($[3] !== className) {
|
|
89
|
+
t1 = cnState("inline-flex shrink-0 items-center justify-center", className);
|
|
90
|
+
$[3] = className;
|
|
91
|
+
$[4] = t1;
|
|
92
|
+
} else t1 = $[4];
|
|
93
|
+
let t2;
|
|
94
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
95
|
+
t2 = /* @__PURE__ */ jsx(ToggleIcon$1, {
|
|
96
|
+
className: t1,
|
|
97
|
+
...props
|
|
98
|
+
});
|
|
99
|
+
$[5] = props;
|
|
100
|
+
$[6] = t1;
|
|
101
|
+
$[7] = t2;
|
|
102
|
+
} else t2 = $[7];
|
|
103
|
+
return t2;
|
|
104
|
+
}
|
|
105
|
+
/** Name it with `aria-label`, and give each toggle a `value`. */
|
|
106
|
+
function ToggleGroup(t0) {
|
|
107
|
+
const $ = c(8);
|
|
108
|
+
let className;
|
|
109
|
+
let props;
|
|
110
|
+
if ($[0] !== t0) {
|
|
111
|
+
({className, ...props} = t0);
|
|
112
|
+
$[0] = t0;
|
|
113
|
+
$[1] = className;
|
|
114
|
+
$[2] = props;
|
|
115
|
+
} else {
|
|
116
|
+
className = $[1];
|
|
117
|
+
props = $[2];
|
|
118
|
+
}
|
|
119
|
+
let t1;
|
|
120
|
+
if ($[3] !== className) {
|
|
121
|
+
t1 = cnState("flex w-fit items-center gap-1 data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch", className);
|
|
122
|
+
$[3] = className;
|
|
123
|
+
$[4] = t1;
|
|
124
|
+
} else t1 = $[4];
|
|
125
|
+
let t2;
|
|
126
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
127
|
+
t2 = /* @__PURE__ */ jsx(ToggleGroup$1, {
|
|
128
|
+
className: t1,
|
|
129
|
+
...props
|
|
130
|
+
});
|
|
131
|
+
$[5] = props;
|
|
132
|
+
$[6] = t1;
|
|
133
|
+
$[7] = t2;
|
|
134
|
+
} else t2 = $[7];
|
|
135
|
+
return t2;
|
|
136
|
+
}
|
|
137
|
+
export { Toggle, ToggleGroup, ToggleIcon, createToggleController, createToggleGroupController, toggleVariants };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { TokenInputEditor as TokenInputEditor$1, TokenInputProps, TokenInputToken as TokenInputToken$1, TokenInputTokenRemove as TokenInputTokenRemove$1, createTokenInputController, defaultCodec, fromText, toLabel, toText } from "@ui-sdk/react/token-input";
|
|
3
|
+
declare function TokenInput(props: TokenInputProps): import("react").JSX.Element;
|
|
4
|
+
declare function TokenInputEditor({ className, ...props }: ComponentProps<typeof TokenInputEditor$1>): import("react").JSX.Element;
|
|
5
|
+
declare function TokenInputToken({ className, ...props }: ComponentProps<typeof TokenInputToken$1>): import("react").JSX.Element;
|
|
6
|
+
declare function TokenInputTokenRemove({ className, ...props }: ComponentProps<typeof TokenInputTokenRemove$1>): import("react").JSX.Element;
|
|
7
|
+
export { TokenInput, TokenInputEditor, type TokenInputProps, TokenInputToken, TokenInputTokenRemove, createTokenInputController, defaultCodec, fromText, toLabel, toText };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cnState } from "../../utilities/cn/index.js";
|
|
3
|
+
import { inputClasses } from "../input/input.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { TokenInput as TokenInput$1, TokenInputEditor as TokenInputEditor$1, TokenInputToken as TokenInputToken$1, TokenInputTokenRemove as TokenInputTokenRemove$1, createTokenInputController, defaultCodec, fromText, toLabel, toText } from "@ui-sdk/react/token-input";
|
|
7
|
+
// src/components/token-input/token-input.tsx
|
|
8
|
+
const tokenClasses = "rounded-full border border-border bg-secondary px-2 text-sm font-medium text-secondary-foreground";
|
|
9
|
+
const hostClasses = "[&_[data-slot=token-input-host]:not(:has([data-slot=token-input-token]))]:rounded-full [&_[data-slot=token-input-host]:not(:has([data-slot=token-input-token]))]:border [&_[data-slot=token-input-host]:not(:has([data-slot=token-input-token]))]:border-border [&_[data-slot=token-input-host]:not(:has([data-slot=token-input-token]))]:bg-secondary [&_[data-slot=token-input-host]:not(:has([data-slot=token-input-token]))]:px-2 [&_[data-slot=token-input-host]:not(:has([data-slot=token-input-token]))]:py-0.5 [&_[data-slot=token-input-host]:not(:has([data-slot=token-input-token]))]:font-medium [&_[data-slot=token-input-host]:not(:has([data-slot=token-input-token]))]:text-secondary-foreground";
|
|
10
|
+
function TokenInput(props) {
|
|
11
|
+
const $ = c(2);
|
|
12
|
+
let t0;
|
|
13
|
+
if ($[0] !== props) {
|
|
14
|
+
t0 = /* @__PURE__ */ jsx(TokenInput$1, { ...props });
|
|
15
|
+
$[0] = props;
|
|
16
|
+
$[1] = t0;
|
|
17
|
+
} else t0 = $[1];
|
|
18
|
+
return t0;
|
|
19
|
+
}
|
|
20
|
+
function TokenInputEditor(t0) {
|
|
21
|
+
const $ = c(8);
|
|
22
|
+
let className;
|
|
23
|
+
let props;
|
|
24
|
+
if ($[0] !== t0) {
|
|
25
|
+
({className, ...props} = t0);
|
|
26
|
+
$[0] = t0;
|
|
27
|
+
$[1] = className;
|
|
28
|
+
$[2] = props;
|
|
29
|
+
} else {
|
|
30
|
+
className = $[1];
|
|
31
|
+
props = $[2];
|
|
32
|
+
}
|
|
33
|
+
let t1;
|
|
34
|
+
if ($[3] !== className) {
|
|
35
|
+
t1 = cnState([
|
|
36
|
+
inputClasses,
|
|
37
|
+
hostClasses,
|
|
38
|
+
"h-auto min-h-9 rounded-[calc(--spacing(4.5))] py-1.5 leading-5.5 wrap-break-word whitespace-pre-wrap data-empty:before:pointer-events-none data-empty:before:text-muted-foreground data-empty:before:content-[attr(aria-placeholder)]"
|
|
39
|
+
], className);
|
|
40
|
+
$[3] = className;
|
|
41
|
+
$[4] = t1;
|
|
42
|
+
} else t1 = $[4];
|
|
43
|
+
let t2;
|
|
44
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
45
|
+
t2 = /* @__PURE__ */ jsx(TokenInputEditor$1, {
|
|
46
|
+
className: t1,
|
|
47
|
+
...props
|
|
48
|
+
});
|
|
49
|
+
$[5] = props;
|
|
50
|
+
$[6] = t1;
|
|
51
|
+
$[7] = t2;
|
|
52
|
+
} else t2 = $[7];
|
|
53
|
+
return t2;
|
|
54
|
+
}
|
|
55
|
+
function TokenInputToken(t0) {
|
|
56
|
+
const $ = c(8);
|
|
57
|
+
let className;
|
|
58
|
+
let props;
|
|
59
|
+
if ($[0] !== t0) {
|
|
60
|
+
({className, ...props} = t0);
|
|
61
|
+
$[0] = t0;
|
|
62
|
+
$[1] = className;
|
|
63
|
+
$[2] = props;
|
|
64
|
+
} else {
|
|
65
|
+
className = $[1];
|
|
66
|
+
props = $[2];
|
|
67
|
+
}
|
|
68
|
+
let t1;
|
|
69
|
+
if ($[3] !== className) {
|
|
70
|
+
t1 = cnState([tokenClasses, "inline-flex items-center gap-1 align-baseline leading-5 data-pending:cursor-progress data-pending:border-dashed data-pending:border-input data-pending:bg-transparent data-selected:bg-primary data-selected:text-primary-foreground data-unresolved:border-dashed data-unresolved:border-destructive"], className);
|
|
71
|
+
$[3] = className;
|
|
72
|
+
$[4] = t1;
|
|
73
|
+
} else t1 = $[4];
|
|
74
|
+
let t2;
|
|
75
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
76
|
+
t2 = /* @__PURE__ */ jsx(TokenInputToken$1, {
|
|
77
|
+
className: t1,
|
|
78
|
+
...props
|
|
79
|
+
});
|
|
80
|
+
$[5] = props;
|
|
81
|
+
$[6] = t1;
|
|
82
|
+
$[7] = t2;
|
|
83
|
+
} else t2 = $[7];
|
|
84
|
+
return t2;
|
|
85
|
+
}
|
|
86
|
+
function TokenInputTokenRemove(t0) {
|
|
87
|
+
const $ = c(8);
|
|
88
|
+
let className;
|
|
89
|
+
let props;
|
|
90
|
+
if ($[0] !== t0) {
|
|
91
|
+
({className, ...props} = t0);
|
|
92
|
+
$[0] = t0;
|
|
93
|
+
$[1] = className;
|
|
94
|
+
$[2] = props;
|
|
95
|
+
} else {
|
|
96
|
+
className = $[1];
|
|
97
|
+
props = $[2];
|
|
98
|
+
}
|
|
99
|
+
let t1;
|
|
100
|
+
if ($[3] !== className) {
|
|
101
|
+
t1 = cnState("-me-1 inline-flex size-4 cursor-pointer items-center justify-center rounded-full hover:bg-foreground/10 data-disabled:pointer-events-none data-readonly:pointer-events-none [&_svg]:size-3", className);
|
|
102
|
+
$[3] = className;
|
|
103
|
+
$[4] = t1;
|
|
104
|
+
} else t1 = $[4];
|
|
105
|
+
let t2;
|
|
106
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
107
|
+
t2 = /* @__PURE__ */ jsx(TokenInputTokenRemove$1, {
|
|
108
|
+
className: t1,
|
|
109
|
+
...props
|
|
110
|
+
});
|
|
111
|
+
$[5] = props;
|
|
112
|
+
$[6] = t1;
|
|
113
|
+
$[7] = t2;
|
|
114
|
+
} else t2 = $[7];
|
|
115
|
+
return t2;
|
|
116
|
+
}
|
|
117
|
+
export { TokenInput, TokenInputEditor, TokenInputToken, TokenInputTokenRemove, createTokenInputController, defaultCodec, fromText, toLabel, toText };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { CodeBlockProps } from "../code-block/code-block.js";
|
|
2
|
+
import { TraceCollapsibleContent, TraceCollapsibleProps, TraceCollapsibleTrigger, TraceLineProps } from "../trace/trace.js";
|
|
3
|
+
import { ComponentProps, ReactNode } from "react";
|
|
4
|
+
/** Where a tool call is. The names are the AI SDK's, so a tool part's `state` fits as it comes. */
|
|
5
|
+
type ToolState = "input-streaming" | "input-available" | "approval-requested" | "approval-responded" | "output-available" | "output-error" | "output-denied";
|
|
6
|
+
/** The status of the Trace line that shows a call in `state`. */
|
|
7
|
+
declare function getToolStatus(state: ToolState): TraceLineProps["status"];
|
|
8
|
+
type ToolProps = Omit<TraceCollapsibleProps, "className" | "children"> & {
|
|
9
|
+
/**
|
|
10
|
+
* Set it to `false` while the call has nothing to show: with nothing to
|
|
11
|
+
* open, the line is plain text instead of a button, and `ToolContent` draws nothing.
|
|
12
|
+
*/
|
|
13
|
+
collapsible?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* One tool call: a `ToolHeader` and a `ToolContent`. It takes Collapsible's
|
|
19
|
+
* props. Put several in one `Trace` to space them as a list.
|
|
20
|
+
*/
|
|
21
|
+
declare function Tool({ collapsible, className, children, ...props }: ToolProps): import("react").JSX.Element;
|
|
22
|
+
type ToolHeaderProps = Omit<ComponentProps<typeof TraceCollapsibleTrigger>, "title" | "type"> & {
|
|
23
|
+
/** The call's state. It sets the line's status and the verb of its title. */
|
|
24
|
+
state: ToolState;
|
|
25
|
+
/** The tool part's type, like `tool-runCommand` or `dynamic-tool`. The tool's name is read from it. */
|
|
26
|
+
type?: string;
|
|
27
|
+
/** The tool's name, for a `dynamic-tool` part. */
|
|
28
|
+
toolName?: string;
|
|
29
|
+
/** What the title names instead of the tool, like the command it ran: "Ran node --version". */
|
|
30
|
+
title?: string;
|
|
31
|
+
/** Replaces the wrench icon. */
|
|
32
|
+
icon?: ReactNode;
|
|
33
|
+
/** The whole title, from the state and the name. Pass it to translate the line. */
|
|
34
|
+
getTitle?: (state: ToolState, name: string) => ReactNode;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* The line: "Running …" while the input streams or waits for its output, then
|
|
38
|
+
* "Ran …", "Failed to run …" or "Denied …". Children replace the icon and the
|
|
39
|
+
* title, inside the `TraceLine`. Outside a `Tool`, or in one that is not
|
|
40
|
+
* `collapsible`, it is a plain line, which a link or another trigger can wrap.
|
|
41
|
+
*/
|
|
42
|
+
declare function ToolHeader({ state, type, toolName, title, icon, getTitle, children, ...props }: ToolHeaderProps): import("react").JSX.Element;
|
|
43
|
+
type ToolContentProps = ComponentProps<typeof TraceCollapsibleContent>;
|
|
44
|
+
/** What opens under the line: a `ToolInput`, a `ToolOutput`, or anything else. */
|
|
45
|
+
declare function ToolContent({ className, ...props }: ToolContentProps): import("react").JSX.Element | null;
|
|
46
|
+
type ToolInputProps = Omit<CodeBlockProps, "children"> & {
|
|
47
|
+
/** The call's input. A string shows as it is, anything else as JSON. */
|
|
48
|
+
input: unknown;
|
|
49
|
+
/** The accessible name of the code. Make it unique when a page shows several, like "Parameters of runCommand". */
|
|
50
|
+
label?: string;
|
|
51
|
+
};
|
|
52
|
+
/** The call's input in a small code block. */
|
|
53
|
+
declare function ToolInput({ input, label, size, ...props }: ToolInputProps): import("react").JSX.Element;
|
|
54
|
+
type ToolOutputProps = Omit<CodeBlockProps, "children"> & {
|
|
55
|
+
/** The call's output. A string shows as it is, a React element is rendered, anything else shows as JSON. */
|
|
56
|
+
output?: unknown;
|
|
57
|
+
/** Why the call failed. It shows instead of the output, in a destructive block. */
|
|
58
|
+
errorText?: string;
|
|
59
|
+
/** The accessible name of the output. Make it unique when a page shows several, like "Output of node --version". */
|
|
60
|
+
label?: string;
|
|
61
|
+
/** The accessible name of the error, when `errorText` shows. `label` by default, or "Error" with no label. */
|
|
62
|
+
errorLabel?: string;
|
|
63
|
+
};
|
|
64
|
+
/** The call's output in a small code block, or its error when it failed. It draws nothing with neither. */
|
|
65
|
+
declare function ToolOutput({ output, errorText, label, errorLabel, size, variant, className, ...props }: ToolOutputProps): import("react").JSX.Element | null;
|
|
66
|
+
export { Tool, ToolContent, type ToolContentProps, ToolHeader, type ToolHeaderProps, ToolInput, type ToolInputProps, ToolOutput, type ToolOutputProps, type ToolProps, type ToolState, getToolStatus };
|