@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,207 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../utilities/cn/index.js";
|
|
3
|
+
import { Empty, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "../empty/empty.js";
|
|
4
|
+
import { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "../message-scroller/message-scroller.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
// src/components/chat/chat.tsx
|
|
8
|
+
/**
|
|
9
|
+
* The thread's frame. It follows the reply while the reader stays at the end
|
|
10
|
+
* (`autoScroll`, on by default) and takes Message Scroller's other options.
|
|
11
|
+
* It fills its parent, which sets the height; `label` names it.
|
|
12
|
+
*/
|
|
13
|
+
function Chat(t0) {
|
|
14
|
+
const $ = c(18);
|
|
15
|
+
let defaultScrollPosition;
|
|
16
|
+
let preserveScrollOnPrepend;
|
|
17
|
+
let props;
|
|
18
|
+
let scrollEdgeThreshold;
|
|
19
|
+
let scrollMargin;
|
|
20
|
+
let scrollPreviousItemPeek;
|
|
21
|
+
let t1;
|
|
22
|
+
if ($[0] !== t0) {
|
|
23
|
+
({autoScroll: t1, defaultScrollPosition, scrollEdgeThreshold, scrollMargin, scrollPreviousItemPeek, preserveScrollOnPrepend, ...props} = t0);
|
|
24
|
+
$[0] = t0;
|
|
25
|
+
$[1] = defaultScrollPosition;
|
|
26
|
+
$[2] = preserveScrollOnPrepend;
|
|
27
|
+
$[3] = props;
|
|
28
|
+
$[4] = scrollEdgeThreshold;
|
|
29
|
+
$[5] = scrollMargin;
|
|
30
|
+
$[6] = scrollPreviousItemPeek;
|
|
31
|
+
$[7] = t1;
|
|
32
|
+
} else {
|
|
33
|
+
defaultScrollPosition = $[1];
|
|
34
|
+
preserveScrollOnPrepend = $[2];
|
|
35
|
+
props = $[3];
|
|
36
|
+
scrollEdgeThreshold = $[4];
|
|
37
|
+
scrollMargin = $[5];
|
|
38
|
+
scrollPreviousItemPeek = $[6];
|
|
39
|
+
t1 = $[7];
|
|
40
|
+
}
|
|
41
|
+
const autoScroll = t1 === void 0 ? true : t1;
|
|
42
|
+
let t2;
|
|
43
|
+
if ($[8] !== props) {
|
|
44
|
+
t2 = /* @__PURE__ */ jsx(MessageScroller, { ...props });
|
|
45
|
+
$[8] = props;
|
|
46
|
+
$[9] = t2;
|
|
47
|
+
} else t2 = $[9];
|
|
48
|
+
let t3;
|
|
49
|
+
if ($[10] !== autoScroll || $[11] !== defaultScrollPosition || $[12] !== preserveScrollOnPrepend || $[13] !== scrollEdgeThreshold || $[14] !== scrollMargin || $[15] !== scrollPreviousItemPeek || $[16] !== t2) {
|
|
50
|
+
t3 = /* @__PURE__ */ jsx(MessageScrollerProvider, {
|
|
51
|
+
autoScroll,
|
|
52
|
+
defaultScrollPosition,
|
|
53
|
+
scrollEdgeThreshold,
|
|
54
|
+
scrollMargin,
|
|
55
|
+
scrollPreviousItemPeek,
|
|
56
|
+
preserveScrollOnPrepend,
|
|
57
|
+
children: t2
|
|
58
|
+
});
|
|
59
|
+
$[10] = autoScroll;
|
|
60
|
+
$[11] = defaultScrollPosition;
|
|
61
|
+
$[12] = preserveScrollOnPrepend;
|
|
62
|
+
$[13] = scrollEdgeThreshold;
|
|
63
|
+
$[14] = scrollMargin;
|
|
64
|
+
$[15] = scrollPreviousItemPeek;
|
|
65
|
+
$[16] = t2;
|
|
66
|
+
$[17] = t3;
|
|
67
|
+
} else t3 = $[17];
|
|
68
|
+
return t3;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* The messages: the region that scrolls and, inside it, the log that holds one
|
|
72
|
+
* `ChatItem` for each message. Set `aria-busy` on it while a reply streams.
|
|
73
|
+
*/
|
|
74
|
+
function ChatContent(t0) {
|
|
75
|
+
const $ = c(10);
|
|
76
|
+
let label;
|
|
77
|
+
let props;
|
|
78
|
+
let viewportClassName;
|
|
79
|
+
if ($[0] !== t0) {
|
|
80
|
+
({label, viewportClassName, ...props} = t0);
|
|
81
|
+
$[0] = t0;
|
|
82
|
+
$[1] = label;
|
|
83
|
+
$[2] = props;
|
|
84
|
+
$[3] = viewportClassName;
|
|
85
|
+
} else {
|
|
86
|
+
label = $[1];
|
|
87
|
+
props = $[2];
|
|
88
|
+
viewportClassName = $[3];
|
|
89
|
+
}
|
|
90
|
+
let t1;
|
|
91
|
+
if ($[4] !== props) {
|
|
92
|
+
t1 = /* @__PURE__ */ jsx(MessageScrollerContent, { ...props });
|
|
93
|
+
$[4] = props;
|
|
94
|
+
$[5] = t1;
|
|
95
|
+
} else t1 = $[5];
|
|
96
|
+
let t2;
|
|
97
|
+
if ($[6] !== label || $[7] !== t1 || $[8] !== viewportClassName) {
|
|
98
|
+
t2 = /* @__PURE__ */ jsx(MessageScrollerViewport, {
|
|
99
|
+
label,
|
|
100
|
+
className: viewportClassName,
|
|
101
|
+
children: t1
|
|
102
|
+
});
|
|
103
|
+
$[6] = label;
|
|
104
|
+
$[7] = t1;
|
|
105
|
+
$[8] = viewportClassName;
|
|
106
|
+
$[9] = t2;
|
|
107
|
+
} else t2 = $[9];
|
|
108
|
+
return t2;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* One row of the thread, around a message. Give it the message's `messageId`,
|
|
112
|
+
* and `scrollAnchor` on the person's messages, which start a turn.
|
|
113
|
+
*/
|
|
114
|
+
function ChatItem(props) {
|
|
115
|
+
const $ = c(2);
|
|
116
|
+
let t0;
|
|
117
|
+
if ($[0] !== props) {
|
|
118
|
+
t0 = /* @__PURE__ */ jsx(MessageScrollerItem, { ...props });
|
|
119
|
+
$[0] = props;
|
|
120
|
+
$[1] = t0;
|
|
121
|
+
} else t0 = $[1];
|
|
122
|
+
return t0;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* The button that goes back to the newest message. It shows only while there
|
|
126
|
+
* are messages below what the reader sees. Put it in `Chat`, after `ChatContent`.
|
|
127
|
+
*/
|
|
128
|
+
function ChatScrollButton(props) {
|
|
129
|
+
const $ = c(2);
|
|
130
|
+
let t0;
|
|
131
|
+
if ($[0] !== props) {
|
|
132
|
+
t0 = /* @__PURE__ */ jsx(MessageScrollerButton, { ...props });
|
|
133
|
+
$[0] = props;
|
|
134
|
+
$[1] = t0;
|
|
135
|
+
} else t0 = $[1];
|
|
136
|
+
return t0;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* What the thread shows before its first message, on abby's Empty. Render it
|
|
140
|
+
* in `Chat` in place of `ChatContent`, or inside `ChatContent`. Children
|
|
141
|
+
* replace the icon, the title and the description: compose Empty's parts there.
|
|
142
|
+
*/
|
|
143
|
+
function ChatEmptyState(t0) {
|
|
144
|
+
const $ = c(18);
|
|
145
|
+
let children;
|
|
146
|
+
let className;
|
|
147
|
+
let icon;
|
|
148
|
+
let props;
|
|
149
|
+
let t1;
|
|
150
|
+
let t2;
|
|
151
|
+
if ($[0] !== t0) {
|
|
152
|
+
({title: t1, description: t2, icon, className, children, ...props} = t0);
|
|
153
|
+
$[0] = t0;
|
|
154
|
+
$[1] = children;
|
|
155
|
+
$[2] = className;
|
|
156
|
+
$[3] = icon;
|
|
157
|
+
$[4] = props;
|
|
158
|
+
$[5] = t1;
|
|
159
|
+
$[6] = t2;
|
|
160
|
+
} else {
|
|
161
|
+
children = $[1];
|
|
162
|
+
className = $[2];
|
|
163
|
+
icon = $[3];
|
|
164
|
+
props = $[4];
|
|
165
|
+
t1 = $[5];
|
|
166
|
+
t2 = $[6];
|
|
167
|
+
}
|
|
168
|
+
const title = t1 === void 0 ? "No messages yet" : t1;
|
|
169
|
+
const description = t2 === void 0 ? "Start a conversation to see messages here" : t2;
|
|
170
|
+
let t3;
|
|
171
|
+
if ($[7] !== className) {
|
|
172
|
+
t3 = cn("size-full", className);
|
|
173
|
+
$[7] = className;
|
|
174
|
+
$[8] = t3;
|
|
175
|
+
} else t3 = $[8];
|
|
176
|
+
let t4;
|
|
177
|
+
if ($[9] !== children || $[10] !== description || $[11] !== icon || $[12] !== title) {
|
|
178
|
+
t4 = children ?? /* @__PURE__ */ jsxs(EmptyHeader, { children: [
|
|
179
|
+
icon && /* @__PURE__ */ jsx(EmptyMedia, {
|
|
180
|
+
variant: "icon",
|
|
181
|
+
children: icon
|
|
182
|
+
}),
|
|
183
|
+
/* @__PURE__ */ jsx(EmptyTitle, { children: title }),
|
|
184
|
+
description && /* @__PURE__ */ jsx(EmptyDescription, { children: description })
|
|
185
|
+
] });
|
|
186
|
+
$[9] = children;
|
|
187
|
+
$[10] = description;
|
|
188
|
+
$[11] = icon;
|
|
189
|
+
$[12] = title;
|
|
190
|
+
$[13] = t4;
|
|
191
|
+
} else t4 = $[13];
|
|
192
|
+
let t5;
|
|
193
|
+
if ($[14] !== props || $[15] !== t3 || $[16] !== t4) {
|
|
194
|
+
t5 = /* @__PURE__ */ jsx(Empty, {
|
|
195
|
+
"data-slot": "chat-empty-state",
|
|
196
|
+
className: t3,
|
|
197
|
+
...props,
|
|
198
|
+
children: t4
|
|
199
|
+
});
|
|
200
|
+
$[14] = props;
|
|
201
|
+
$[15] = t3;
|
|
202
|
+
$[16] = t4;
|
|
203
|
+
$[17] = t5;
|
|
204
|
+
} else t5 = $[17];
|
|
205
|
+
return t5;
|
|
206
|
+
}
|
|
207
|
+
export { Chat, ChatContent, ChatEmptyState, ChatItem, ChatScrollButton, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CheckboxIndicator as CheckboxIndicator$1, createCheckboxController, createCheckboxGroupController } from "@ui-sdk/react/checkbox";
|
|
3
|
+
declare function Checkbox({ className, ...props }: ComponentProps<typeof Checkbox$1>): import("react").JSX.Element;
|
|
4
|
+
/**
|
|
5
|
+
* The mark inside the checkbox. Without children it shows a check, or a dash
|
|
6
|
+
* while the checkbox is indeterminate.
|
|
7
|
+
*/
|
|
8
|
+
declare function CheckboxIndicator({ className, children, ...props }: ComponentProps<typeof CheckboxIndicator$1>): import("react").JSX.Element;
|
|
9
|
+
declare function CheckboxGroup<T extends string = string>({ className, ...props }: ComponentProps<typeof CheckboxGroup$1<T>>): import("react").JSX.Element;
|
|
10
|
+
export { Checkbox, CheckboxGroup, CheckboxIndicator, createCheckboxController, createCheckboxGroupController };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cnState } from "../../utilities/cn/index.js";
|
|
3
|
+
import { Icon } from "../icon/icon.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { MinusSignIcon, Tick02Icon } from "@hugeicons/core-free-icons";
|
|
7
|
+
import { Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CheckboxIndicator as CheckboxIndicator$1, createCheckboxController, createCheckboxGroupController } from "@ui-sdk/react/checkbox";
|
|
8
|
+
// src/components/checkbox/checkbox.tsx
|
|
9
|
+
function Checkbox(t0) {
|
|
10
|
+
const $ = c(8);
|
|
11
|
+
let className;
|
|
12
|
+
let props;
|
|
13
|
+
if ($[0] !== t0) {
|
|
14
|
+
({className, ...props} = t0);
|
|
15
|
+
$[0] = t0;
|
|
16
|
+
$[1] = className;
|
|
17
|
+
$[2] = props;
|
|
18
|
+
} else {
|
|
19
|
+
className = $[1];
|
|
20
|
+
props = $[2];
|
|
21
|
+
}
|
|
22
|
+
let t1;
|
|
23
|
+
if ($[3] !== className) {
|
|
24
|
+
t1 = cnState("peer relative flex size-4 shrink-0 items-center justify-center rounded-xs 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 data-indeterminate:border-brand data-indeterminate:bg-brand data-indeterminate:text-brand-foreground dark:bg-input/30 dark:data-checked:bg-brand dark:data-indeterminate:bg-brand", className);
|
|
25
|
+
$[3] = className;
|
|
26
|
+
$[4] = t1;
|
|
27
|
+
} else t1 = $[4];
|
|
28
|
+
let t2;
|
|
29
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
30
|
+
t2 = /* @__PURE__ */ jsx(Checkbox$1, {
|
|
31
|
+
className: t1,
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
$[5] = props;
|
|
35
|
+
$[6] = t1;
|
|
36
|
+
$[7] = t2;
|
|
37
|
+
} else t2 = $[7];
|
|
38
|
+
return t2;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The mark inside the checkbox. Without children it shows a check, or a dash
|
|
42
|
+
* while the checkbox is indeterminate.
|
|
43
|
+
*/
|
|
44
|
+
function CheckboxIndicator(t0) {
|
|
45
|
+
const $ = c(10);
|
|
46
|
+
let children;
|
|
47
|
+
let className;
|
|
48
|
+
let props;
|
|
49
|
+
if ($[0] !== t0) {
|
|
50
|
+
({className, children, ...props} = t0);
|
|
51
|
+
$[0] = t0;
|
|
52
|
+
$[1] = children;
|
|
53
|
+
$[2] = className;
|
|
54
|
+
$[3] = props;
|
|
55
|
+
} else {
|
|
56
|
+
children = $[1];
|
|
57
|
+
className = $[2];
|
|
58
|
+
props = $[3];
|
|
59
|
+
}
|
|
60
|
+
let t1;
|
|
61
|
+
if ($[4] !== className) {
|
|
62
|
+
t1 = cnState("grid place-content-center text-current [&>svg]:size-3.5", className);
|
|
63
|
+
$[4] = className;
|
|
64
|
+
$[5] = t1;
|
|
65
|
+
} else t1 = $[5];
|
|
66
|
+
const t2 = children ?? _temp;
|
|
67
|
+
let t3;
|
|
68
|
+
if ($[6] !== props || $[7] !== t1 || $[8] !== t2) {
|
|
69
|
+
t3 = /* @__PURE__ */ jsx(CheckboxIndicator$1, {
|
|
70
|
+
className: t1,
|
|
71
|
+
...props,
|
|
72
|
+
children: t2
|
|
73
|
+
});
|
|
74
|
+
$[6] = props;
|
|
75
|
+
$[7] = t1;
|
|
76
|
+
$[8] = t2;
|
|
77
|
+
$[9] = t3;
|
|
78
|
+
} else t3 = $[9];
|
|
79
|
+
return t3;
|
|
80
|
+
}
|
|
81
|
+
function _temp(state) {
|
|
82
|
+
return /* @__PURE__ */ jsx(Icon, {
|
|
83
|
+
icon: state.indeterminate ? MinusSignIcon : Tick02Icon,
|
|
84
|
+
strokeWidth: 3
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function CheckboxGroup(t0) {
|
|
88
|
+
const $ = c(8);
|
|
89
|
+
let className;
|
|
90
|
+
let props;
|
|
91
|
+
if ($[0] !== t0) {
|
|
92
|
+
({className, ...props} = t0);
|
|
93
|
+
$[0] = t0;
|
|
94
|
+
$[1] = className;
|
|
95
|
+
$[2] = props;
|
|
96
|
+
} else {
|
|
97
|
+
className = $[1];
|
|
98
|
+
props = $[2];
|
|
99
|
+
}
|
|
100
|
+
let t1;
|
|
101
|
+
if ($[3] !== className) {
|
|
102
|
+
t1 = cnState("grid w-full gap-3", className);
|
|
103
|
+
$[3] = className;
|
|
104
|
+
$[4] = t1;
|
|
105
|
+
} else t1 = $[4];
|
|
106
|
+
let t2;
|
|
107
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
108
|
+
t2 = /* @__PURE__ */ jsx(CheckboxGroup$1, {
|
|
109
|
+
className: t1,
|
|
110
|
+
...props
|
|
111
|
+
});
|
|
112
|
+
$[5] = props;
|
|
113
|
+
$[6] = t1;
|
|
114
|
+
$[7] = t2;
|
|
115
|
+
} else t2 = $[7];
|
|
116
|
+
return t2;
|
|
117
|
+
}
|
|
118
|
+
export { Checkbox, CheckboxGroup, CheckboxIndicator, createCheckboxController, createCheckboxGroupController };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ButtonProps } from "../button/button.js";
|
|
2
|
+
import { MarkerIcon, MarkerProps } from "../marker/marker.js";
|
|
3
|
+
import { ComponentProps, ReactNode } from "react";
|
|
4
|
+
type CheckpointProps = Omit<MarkerProps, "children"> & {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
};
|
|
7
|
+
/** A point in the conversation to return to: a marker between two turns that holds a label, an icon and the trigger. */
|
|
8
|
+
declare function Checkpoint({ variant, children, ...props }: CheckpointProps): import("react").JSX.Element;
|
|
9
|
+
type CheckpointIconProps = ComponentProps<typeof MarkerIcon>;
|
|
10
|
+
/** The checkpoint's icon, a bookmark unless it has children. It is decorative. */
|
|
11
|
+
declare function CheckpointIcon({ children, ...props }: CheckpointIconProps): import("react").JSX.Element;
|
|
12
|
+
type CheckpointTriggerProps = Omit<ButtonProps, "children"> & {
|
|
13
|
+
/** What a tooltip on the button says, like what restoring drops. */
|
|
14
|
+
tooltip?: ReactNode;
|
|
15
|
+
/** Replaces "Restore". */
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* The button that restores the conversation to the checkpoint. Name it for its
|
|
20
|
+
* checkpoint with `aria-label` ("Restore to Button renamed"), so two of them
|
|
21
|
+
* don't share a name.
|
|
22
|
+
*/
|
|
23
|
+
declare function CheckpointTrigger({ tooltip, variant, size, className, children, ...props }: CheckpointTriggerProps): import("react").JSX.Element;
|
|
24
|
+
export { Checkpoint, CheckpointIcon, type CheckpointIconProps, type CheckpointProps, CheckpointTrigger, type CheckpointTriggerProps };
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Button } from "../button/button.js";
|
|
3
|
+
import { Icon } from "../icon/icon.js";
|
|
4
|
+
import { Marker, MarkerContent, MarkerIcon } from "../marker/marker.js";
|
|
5
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "../tooltip/tooltip.js";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { Bookmark02Icon } from "@hugeicons/core-free-icons";
|
|
9
|
+
// src/components/checkpoint/checkpoint.tsx
|
|
10
|
+
/** A point in the conversation to return to: a marker between two turns that holds a label, an icon and the trigger. */
|
|
11
|
+
function Checkpoint(t0) {
|
|
12
|
+
const $ = c(10);
|
|
13
|
+
let children;
|
|
14
|
+
let props;
|
|
15
|
+
let t1;
|
|
16
|
+
if ($[0] !== t0) {
|
|
17
|
+
({variant: t1, children, ...props} = t0);
|
|
18
|
+
$[0] = t0;
|
|
19
|
+
$[1] = children;
|
|
20
|
+
$[2] = props;
|
|
21
|
+
$[3] = t1;
|
|
22
|
+
} else {
|
|
23
|
+
children = $[1];
|
|
24
|
+
props = $[2];
|
|
25
|
+
t1 = $[3];
|
|
26
|
+
}
|
|
27
|
+
const variant = t1 === void 0 ? "separator" : t1;
|
|
28
|
+
let t2;
|
|
29
|
+
if ($[4] !== children) {
|
|
30
|
+
t2 = /* @__PURE__ */ jsx(MarkerContent, {
|
|
31
|
+
className: "inline-flex items-center gap-2",
|
|
32
|
+
children
|
|
33
|
+
});
|
|
34
|
+
$[4] = children;
|
|
35
|
+
$[5] = t2;
|
|
36
|
+
} else t2 = $[5];
|
|
37
|
+
let t3;
|
|
38
|
+
if ($[6] !== props || $[7] !== t2 || $[8] !== variant) {
|
|
39
|
+
t3 = /* @__PURE__ */ jsx(Marker, {
|
|
40
|
+
variant,
|
|
41
|
+
...props,
|
|
42
|
+
children: t2
|
|
43
|
+
});
|
|
44
|
+
$[6] = props;
|
|
45
|
+
$[7] = t2;
|
|
46
|
+
$[8] = variant;
|
|
47
|
+
$[9] = t3;
|
|
48
|
+
} else t3 = $[9];
|
|
49
|
+
return t3;
|
|
50
|
+
}
|
|
51
|
+
/** The checkpoint's icon, a bookmark unless it has children. It is decorative. */
|
|
52
|
+
function CheckpointIcon(t0) {
|
|
53
|
+
const $ = c(8);
|
|
54
|
+
let children;
|
|
55
|
+
let props;
|
|
56
|
+
if ($[0] !== t0) {
|
|
57
|
+
({children, ...props} = t0);
|
|
58
|
+
$[0] = t0;
|
|
59
|
+
$[1] = children;
|
|
60
|
+
$[2] = props;
|
|
61
|
+
} else {
|
|
62
|
+
children = $[1];
|
|
63
|
+
props = $[2];
|
|
64
|
+
}
|
|
65
|
+
let t1;
|
|
66
|
+
if ($[3] !== children) {
|
|
67
|
+
t1 = children ?? /* @__PURE__ */ jsx(Icon, { icon: Bookmark02Icon });
|
|
68
|
+
$[3] = children;
|
|
69
|
+
$[4] = t1;
|
|
70
|
+
} else t1 = $[4];
|
|
71
|
+
let t2;
|
|
72
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
73
|
+
t2 = /* @__PURE__ */ jsx(MarkerIcon, {
|
|
74
|
+
...props,
|
|
75
|
+
children: t1
|
|
76
|
+
});
|
|
77
|
+
$[5] = props;
|
|
78
|
+
$[6] = t1;
|
|
79
|
+
$[7] = t2;
|
|
80
|
+
} else t2 = $[7];
|
|
81
|
+
return t2;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The button that restores the conversation to the checkpoint. Name it for its
|
|
85
|
+
* checkpoint with `aria-label` ("Restore to Button renamed"), so two of them
|
|
86
|
+
* don't share a name.
|
|
87
|
+
*/
|
|
88
|
+
function CheckpointTrigger(t0) {
|
|
89
|
+
const $ = c(26);
|
|
90
|
+
let className;
|
|
91
|
+
let props;
|
|
92
|
+
let t1;
|
|
93
|
+
let t2;
|
|
94
|
+
let t3;
|
|
95
|
+
let tooltip;
|
|
96
|
+
if ($[0] !== t0) {
|
|
97
|
+
({tooltip, variant: t1, size: t2, className, children: t3, ...props} = t0);
|
|
98
|
+
$[0] = t0;
|
|
99
|
+
$[1] = className;
|
|
100
|
+
$[2] = props;
|
|
101
|
+
$[3] = t1;
|
|
102
|
+
$[4] = t2;
|
|
103
|
+
$[5] = t3;
|
|
104
|
+
$[6] = tooltip;
|
|
105
|
+
} else {
|
|
106
|
+
className = $[1];
|
|
107
|
+
props = $[2];
|
|
108
|
+
t1 = $[3];
|
|
109
|
+
t2 = $[4];
|
|
110
|
+
t3 = $[5];
|
|
111
|
+
tooltip = $[6];
|
|
112
|
+
}
|
|
113
|
+
const variant = t1 === void 0 ? "outline" : t1;
|
|
114
|
+
const size = t2 === void 0 ? "xs" : t2;
|
|
115
|
+
const children = t3 === void 0 ? "Restore" : t3;
|
|
116
|
+
if (!tooltip) {
|
|
117
|
+
let t4;
|
|
118
|
+
if ($[7] !== children || $[8] !== className || $[9] !== props || $[10] !== size || $[11] !== variant) {
|
|
119
|
+
t4 = /* @__PURE__ */ jsx(Button, {
|
|
120
|
+
variant,
|
|
121
|
+
size,
|
|
122
|
+
className,
|
|
123
|
+
...props,
|
|
124
|
+
children
|
|
125
|
+
});
|
|
126
|
+
$[7] = children;
|
|
127
|
+
$[8] = className;
|
|
128
|
+
$[9] = props;
|
|
129
|
+
$[10] = size;
|
|
130
|
+
$[11] = variant;
|
|
131
|
+
$[12] = t4;
|
|
132
|
+
} else t4 = $[12];
|
|
133
|
+
return t4;
|
|
134
|
+
}
|
|
135
|
+
let t4;
|
|
136
|
+
if ($[13] !== className || $[14] !== props || $[15] !== size || $[16] !== variant) {
|
|
137
|
+
t4 = /* @__PURE__ */ jsx(Button, {
|
|
138
|
+
variant,
|
|
139
|
+
size,
|
|
140
|
+
className,
|
|
141
|
+
...props
|
|
142
|
+
});
|
|
143
|
+
$[13] = className;
|
|
144
|
+
$[14] = props;
|
|
145
|
+
$[15] = size;
|
|
146
|
+
$[16] = variant;
|
|
147
|
+
$[17] = t4;
|
|
148
|
+
} else t4 = $[17];
|
|
149
|
+
let t5;
|
|
150
|
+
if ($[18] !== children || $[19] !== t4) {
|
|
151
|
+
t5 = /* @__PURE__ */ jsx(TooltipTrigger, {
|
|
152
|
+
render: t4,
|
|
153
|
+
children
|
|
154
|
+
});
|
|
155
|
+
$[18] = children;
|
|
156
|
+
$[19] = t4;
|
|
157
|
+
$[20] = t5;
|
|
158
|
+
} else t5 = $[20];
|
|
159
|
+
let t6;
|
|
160
|
+
if ($[21] !== tooltip) {
|
|
161
|
+
t6 = /* @__PURE__ */ jsx(TooltipContent, {
|
|
162
|
+
side: "bottom",
|
|
163
|
+
align: "start",
|
|
164
|
+
children: tooltip
|
|
165
|
+
});
|
|
166
|
+
$[21] = tooltip;
|
|
167
|
+
$[22] = t6;
|
|
168
|
+
} else t6 = $[22];
|
|
169
|
+
let t7;
|
|
170
|
+
if ($[23] !== t5 || $[24] !== t6) {
|
|
171
|
+
t7 = /* @__PURE__ */ jsxs(Tooltip, { children: [t5, t6] });
|
|
172
|
+
$[23] = t5;
|
|
173
|
+
$[24] = t6;
|
|
174
|
+
$[25] = t7;
|
|
175
|
+
} else t7 = $[25];
|
|
176
|
+
return t7;
|
|
177
|
+
}
|
|
178
|
+
export { Checkpoint, CheckpointIcon, CheckpointTrigger };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { index_d_exports } from "../../core/index.js";
|
|
2
|
+
import { VariantProps } from "../../utilities/cn/index.js";
|
|
3
|
+
import { ComponentProps } from "react";
|
|
4
|
+
import { Radio, RadioGroup, createRadioGroupController } from "@ui-sdk/react/radio";
|
|
5
|
+
declare const choiceCardsVariants: (props?: ({
|
|
6
|
+
color?: "destructive" | "primary" | "success" | "warning" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
type ChoiceCardsColor = NonNullable<VariantProps<typeof choiceCardsVariants>["color"]>;
|
|
9
|
+
type ChoiceCardsProps<T extends string = string> = Parameters<typeof RadioGroup<T>>[0] & {
|
|
10
|
+
/** How many cards stand in a row. One per card, up to four, when left out. */
|
|
11
|
+
columns?: number;
|
|
12
|
+
/** The shape of every card's picture, as a CSS aspect ratio. */
|
|
13
|
+
aspect?: string;
|
|
14
|
+
/** The color of the outline and the check on the chosen card. */
|
|
15
|
+
color?: ChoiceCardsColor;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Two to six options that are easier to see than to name, one of them chosen.
|
|
19
|
+
* Name it with `aria-label`, or put it in a `Field` with a `FieldLabel`.
|
|
20
|
+
*/
|
|
21
|
+
declare function ChoiceCards<T extends string = string>({ columns, aspect, color, className, style, ...props }: ChoiceCardsProps<T>): import("react").JSX.Element;
|
|
22
|
+
/**
|
|
23
|
+
* One option: a `ChoiceCardsMedia`, a `ChoiceCardsLabel` and maybe a
|
|
24
|
+
* `ChoiceCardsDescription`. The label names the card and the description
|
|
25
|
+
* describes it.
|
|
26
|
+
*/
|
|
27
|
+
declare function ChoiceCardsItem({ className, children, ...props }: ComponentProps<typeof Radio>): import("react").JSX.Element;
|
|
28
|
+
/**
|
|
29
|
+
* The picture of the option: a drawing or an icon, centered in a frame at the
|
|
30
|
+
* group's `aspect`. What fills it fills it to the edge, and `render={<img />}`
|
|
31
|
+
* makes the frame the image. It grows a little on the chosen card.
|
|
32
|
+
*/
|
|
33
|
+
declare function ChoiceCardsMedia({ className, render, ...props }: index_d_exports.PartProps<"span">): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
34
|
+
/** The option's name, under its picture. It is what a screen reader and an agent call the card. */
|
|
35
|
+
declare function ChoiceCardsLabel({ className, render, ...props }: index_d_exports.PartProps<"span">): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
36
|
+
/** A line under the label: what the option costs or what it is for. */
|
|
37
|
+
declare function ChoiceCardsDescription({ className, ...props }: ComponentProps<"span">): import("react").JSX.Element;
|
|
38
|
+
export { ChoiceCards, type ChoiceCardsColor, ChoiceCardsDescription, ChoiceCardsItem, ChoiceCardsLabel, ChoiceCardsMedia, type ChoiceCardsProps, choiceCardsVariants, createRadioGroupController as createChoiceCardsController };
|