@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,957 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { definePrimitive, direct, elements } from "../../core/ui-sdk.js";
|
|
3
|
+
import { core_exports } from "../../core/index.js";
|
|
4
|
+
import { cn, cnState } from "../../utilities/cn/index.js";
|
|
5
|
+
import { buttonVariants } from "../button/button.js";
|
|
6
|
+
import { Icon } from "../icon/icon.js";
|
|
7
|
+
import { c } from "react/compiler-runtime";
|
|
8
|
+
import { createContext, use, useId, useSyncExternalStore } from "react";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
import { ArrowDown02Icon } from "@hugeicons/core-free-icons";
|
|
11
|
+
// src/components/message-scroller/message-scroller.tsx
|
|
12
|
+
const EDGE = 2;
|
|
13
|
+
const DEFAULT_EDGE_THRESHOLD = 8;
|
|
14
|
+
const HOLD_MS = 300;
|
|
15
|
+
const HOLD_FRAMES = 4;
|
|
16
|
+
const DEFAULT_PEEK = 64;
|
|
17
|
+
const NO_IDS = [];
|
|
18
|
+
const scrollableAttrs = (state) => ({
|
|
19
|
+
"data-scrollable": state.start && state.end ? "both" : state.start ? "start" : state.end ? "end" : void 0,
|
|
20
|
+
"data-autoscrolling": state.autoscrolling ? "" : void 0
|
|
21
|
+
});
|
|
22
|
+
const sameIds = (a, b) => a.length === b.length && a.every((id, index) => id === b[index]);
|
|
23
|
+
/**
|
|
24
|
+
* Not exported: its inferred type names ui-sdk types that aren't public, so
|
|
25
|
+
* the declaration build can't describe it from another module.
|
|
26
|
+
*
|
|
27
|
+
* The transcript's scroll behavior: where it opens, following streamed
|
|
28
|
+
* output, anchoring a new turn near the top, holding the reader's place when
|
|
29
|
+
* history loads above, jumping to a row, and reporting what is on screen.
|
|
30
|
+
*/
|
|
31
|
+
const messageScroller = definePrimitive({
|
|
32
|
+
name: "message-scroller",
|
|
33
|
+
options: {
|
|
34
|
+
autoScroll: "boolean",
|
|
35
|
+
defaultScrollPosition: "string",
|
|
36
|
+
scrollEdgeThreshold: "number",
|
|
37
|
+
scrollMargin: "number",
|
|
38
|
+
scrollPreviousItemPeek: "number",
|
|
39
|
+
preserveScrollOnPrepend: "boolean"
|
|
40
|
+
},
|
|
41
|
+
live: ["currentAnchorId", "visibleMessageIds"],
|
|
42
|
+
state: (options) => ({
|
|
43
|
+
start: false,
|
|
44
|
+
end: false,
|
|
45
|
+
autoscrolling: false,
|
|
46
|
+
pending: (options.defaultScrollPosition ?? "end") !== "start",
|
|
47
|
+
currentAnchorId: null,
|
|
48
|
+
visibleMessageIds: NO_IDS
|
|
49
|
+
}),
|
|
50
|
+
api: (context) => {
|
|
51
|
+
const { store } = context;
|
|
52
|
+
let viewport;
|
|
53
|
+
let content;
|
|
54
|
+
let resizes;
|
|
55
|
+
let opened = false;
|
|
56
|
+
let stuck = false;
|
|
57
|
+
let gliding = false;
|
|
58
|
+
let glideTimer;
|
|
59
|
+
let hold;
|
|
60
|
+
let settle;
|
|
61
|
+
let holdTimer;
|
|
62
|
+
let knownTop = 0;
|
|
63
|
+
let knownHeight = 0;
|
|
64
|
+
let roomAnchor;
|
|
65
|
+
let queued;
|
|
66
|
+
const added = /* @__PURE__ */ new Set();
|
|
67
|
+
let ordered;
|
|
68
|
+
let flushing = false;
|
|
69
|
+
let trackers = 0;
|
|
70
|
+
let visibleObserver;
|
|
71
|
+
let bandObserver;
|
|
72
|
+
const visible = /* @__PURE__ */ new Set();
|
|
73
|
+
const items = () => ordered ??= elements(context, "item");
|
|
74
|
+
const margin = () => context.options().scrollMargin ?? 0;
|
|
75
|
+
const edge = () => context.options().scrollEdgeThreshold ?? DEFAULT_EDGE_THRESHOLD;
|
|
76
|
+
const peek = () => context.options().scrollPreviousItemPeek ?? DEFAULT_PEEK;
|
|
77
|
+
const behaviorOf = (behavior = "smooth") => behavior === "smooth" && viewport?.ownerDocument.defaultView?.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : behavior;
|
|
78
|
+
const topOf = (el, view) => el.getBoundingClientRect().top - view.getBoundingClientRect().top - view.clientTop + view.scrollTop;
|
|
79
|
+
const sync = () => {
|
|
80
|
+
if (!viewport) return;
|
|
81
|
+
knownTop = viewport.scrollTop;
|
|
82
|
+
knownHeight = viewport.scrollHeight;
|
|
83
|
+
const before = knownTop > edge();
|
|
84
|
+
const after = knownHeight - viewport.clientHeight - knownTop > edge();
|
|
85
|
+
const state = store.get();
|
|
86
|
+
if (state.start !== before || state.end !== after) {
|
|
87
|
+
store.set({
|
|
88
|
+
start: before,
|
|
89
|
+
end: after
|
|
90
|
+
});
|
|
91
|
+
if (trackers > 0) readAnchor();
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const endGlide = () => {
|
|
95
|
+
clearTimeout(glideTimer);
|
|
96
|
+
if (!gliding) return;
|
|
97
|
+
gliding = false;
|
|
98
|
+
store.set({ autoscrolling: false });
|
|
99
|
+
};
|
|
100
|
+
const endHold = () => {
|
|
101
|
+
clearTimeout(holdTimer);
|
|
102
|
+
if (hold && viewport) viewport.style.overflowAnchor = "";
|
|
103
|
+
hold = void 0;
|
|
104
|
+
settle = void 0;
|
|
105
|
+
};
|
|
106
|
+
const holdPlacement = (place) => {
|
|
107
|
+
endHold();
|
|
108
|
+
hold = place;
|
|
109
|
+
if (viewport) viewport.style.overflowAnchor = "none";
|
|
110
|
+
let frames = HOLD_FRAMES;
|
|
111
|
+
const view = viewport?.ownerDocument.defaultView;
|
|
112
|
+
const tick = () => {
|
|
113
|
+
if (hold !== place) return;
|
|
114
|
+
frames -= 1;
|
|
115
|
+
if (frames <= 0) endHold();
|
|
116
|
+
else view?.requestAnimationFrame(tick);
|
|
117
|
+
};
|
|
118
|
+
view?.requestAnimationFrame(tick);
|
|
119
|
+
holdTimer = setTimeout(endHold, HOLD_MS);
|
|
120
|
+
};
|
|
121
|
+
const atEnd = (view) => view.scrollHeight - view.clientHeight - view.scrollTop <= edge();
|
|
122
|
+
const toEnd = (behavior) => {
|
|
123
|
+
if (!viewport) return;
|
|
124
|
+
const top = viewport.scrollHeight - viewport.clientHeight;
|
|
125
|
+
if (behavior !== "smooth" || top - viewport.scrollTop <= EDGE) {
|
|
126
|
+
endGlide();
|
|
127
|
+
viewport.scrollTop = top;
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
gliding = true;
|
|
131
|
+
store.set({ autoscrolling: true });
|
|
132
|
+
viewport.scrollTo({
|
|
133
|
+
top,
|
|
134
|
+
behavior: "smooth"
|
|
135
|
+
});
|
|
136
|
+
clearTimeout(glideTimer);
|
|
137
|
+
glideTimer = setTimeout(endGlide, 1500);
|
|
138
|
+
};
|
|
139
|
+
const anchorTop = (anchor, view) => {
|
|
140
|
+
const list = items();
|
|
141
|
+
const previous = list[list.findIndex((item) => item.el === anchor) - 1]?.el;
|
|
142
|
+
const top = topOf(anchor, view) - margin();
|
|
143
|
+
if (!previous) return Math.max(0, top);
|
|
144
|
+
const previousBottom = topOf(previous, view) + previous.offsetHeight;
|
|
145
|
+
return Math.max(0, Math.min(top, previousBottom - peek()));
|
|
146
|
+
};
|
|
147
|
+
const fitRoom = () => {
|
|
148
|
+
if (!viewport || !content) return;
|
|
149
|
+
if (roomAnchor && !roomAnchor.isConnected) roomAnchor = void 0;
|
|
150
|
+
if (!roomAnchor) {
|
|
151
|
+
content.style.minHeight = "";
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
const height = anchorTop(roomAnchor, viewport) + viewport.clientHeight - topOf(content, viewport);
|
|
155
|
+
content.style.minHeight = `max(100%, ${Math.ceil(height)}px)`;
|
|
156
|
+
};
|
|
157
|
+
const anchorTo = (anchor) => {
|
|
158
|
+
if (!viewport) return;
|
|
159
|
+
roomAnchor = anchor;
|
|
160
|
+
fitRoom();
|
|
161
|
+
const top = anchorTop(anchor, viewport);
|
|
162
|
+
endHold();
|
|
163
|
+
if (viewport.scrollHeight - viewport.clientHeight - top <= EDGE) {
|
|
164
|
+
stuck = true;
|
|
165
|
+
toEnd(behaviorOf());
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
endGlide();
|
|
169
|
+
stuck = false;
|
|
170
|
+
viewport.scrollTo({
|
|
171
|
+
top,
|
|
172
|
+
behavior: behaviorOf()
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
const placeMessage = (target, options, behavior) => {
|
|
176
|
+
if (!viewport) return;
|
|
177
|
+
const space = options?.scrollMargin ?? margin();
|
|
178
|
+
const top = topOf(target, viewport);
|
|
179
|
+
const free = viewport.clientHeight - target.offsetHeight;
|
|
180
|
+
const align = options?.align ?? "start";
|
|
181
|
+
const offset = align === "start" ? space : align === "end" ? free - space : free / 2;
|
|
182
|
+
viewport.scrollTo({
|
|
183
|
+
top: Math.max(0, top - offset),
|
|
184
|
+
behavior
|
|
185
|
+
});
|
|
186
|
+
};
|
|
187
|
+
const find = (id) => items().find((item) => item.props.messageId === id)?.el;
|
|
188
|
+
const open = () => {
|
|
189
|
+
if (!viewport) return;
|
|
190
|
+
const view = viewport;
|
|
191
|
+
const target = queued;
|
|
192
|
+
queued = void 0;
|
|
193
|
+
const position = context.options().defaultScrollPosition ?? "end";
|
|
194
|
+
const place = () => {
|
|
195
|
+
const message = target && find(target.id);
|
|
196
|
+
if (message) {
|
|
197
|
+
placeMessage(message, target.options, "auto");
|
|
198
|
+
stuck = atEnd(view);
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
if (position === "start") {
|
|
202
|
+
view.scrollTop = 0;
|
|
203
|
+
stuck = atEnd(view);
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
const anchor = position === "last-anchor" ? items().findLast((item) => item.props.scrollAnchor)?.el : void 0;
|
|
207
|
+
if (anchor && view.scrollHeight - topOf(anchor, view) > view.clientHeight) {
|
|
208
|
+
view.scrollTop = anchorTop(anchor, view);
|
|
209
|
+
stuck = atEnd(view);
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
stuck = true;
|
|
213
|
+
view.scrollTop = view.scrollHeight;
|
|
214
|
+
};
|
|
215
|
+
place();
|
|
216
|
+
holdPlacement(place);
|
|
217
|
+
};
|
|
218
|
+
const flush = () => {
|
|
219
|
+
flushing = false;
|
|
220
|
+
if (!viewport) return;
|
|
221
|
+
const fresh = new Set(added);
|
|
222
|
+
added.clear();
|
|
223
|
+
if (!opened) {
|
|
224
|
+
if (items().length > 0 || viewport.scrollHeight > viewport.clientHeight) {
|
|
225
|
+
opened = true;
|
|
226
|
+
open();
|
|
227
|
+
}
|
|
228
|
+
if (store.get().pending) store.set({ pending: false });
|
|
229
|
+
sync();
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
if (roomAnchor && !roomAnchor.isConnected) fitRoom();
|
|
233
|
+
if (fresh.size > 0) {
|
|
234
|
+
endHold();
|
|
235
|
+
const list = items();
|
|
236
|
+
const firstKept = list.findIndex((item) => !fresh.has(item.el));
|
|
237
|
+
const lastKept = list.findLastIndex((item) => !fresh.has(item.el));
|
|
238
|
+
if (firstKept > 0 && (context.options().preserveScrollOnPrepend ?? true)) {
|
|
239
|
+
fitRoom();
|
|
240
|
+
const grown = viewport.scrollHeight - knownHeight;
|
|
241
|
+
if (grown > 0 && Math.abs(viewport.scrollTop - knownTop) < 1) viewport.scrollTop = knownTop + grown;
|
|
242
|
+
}
|
|
243
|
+
const anchor = list.slice(lastKept + 1).findLast((item) => fresh.has(item.el) && item.props.scrollAnchor);
|
|
244
|
+
if (anchor) anchorTo(anchor.el);
|
|
245
|
+
}
|
|
246
|
+
sync();
|
|
247
|
+
};
|
|
248
|
+
const schedule = () => {
|
|
249
|
+
if (flushing) return;
|
|
250
|
+
flushing = true;
|
|
251
|
+
queueMicrotask(flush);
|
|
252
|
+
};
|
|
253
|
+
const onScroll = () => {
|
|
254
|
+
if (!viewport) return;
|
|
255
|
+
const top = viewport.scrollTop;
|
|
256
|
+
if (atEnd(viewport)) {
|
|
257
|
+
stuck = true;
|
|
258
|
+
endGlide();
|
|
259
|
+
} else if (top < knownTop - .5) {
|
|
260
|
+
stuck = false;
|
|
261
|
+
endGlide();
|
|
262
|
+
}
|
|
263
|
+
sync();
|
|
264
|
+
};
|
|
265
|
+
const onScrollEnd = () => {
|
|
266
|
+
endGlide();
|
|
267
|
+
const arrived = settle;
|
|
268
|
+
settle = void 0;
|
|
269
|
+
arrived?.();
|
|
270
|
+
sync();
|
|
271
|
+
};
|
|
272
|
+
const onIntent = () => {
|
|
273
|
+
endGlide();
|
|
274
|
+
endHold();
|
|
275
|
+
};
|
|
276
|
+
const onResize = (entries) => {
|
|
277
|
+
if (!viewport) return;
|
|
278
|
+
if (!opened) {
|
|
279
|
+
schedule();
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
const resized = entries.some((entry) => entry.target === viewport);
|
|
283
|
+
if (resized) {
|
|
284
|
+
fitRoom();
|
|
285
|
+
if (trackers > 0) watchBand();
|
|
286
|
+
}
|
|
287
|
+
if (hold) hold();
|
|
288
|
+
else if (stuck && (resized || context.options().autoScroll)) toEnd(gliding ? "smooth" : "auto");
|
|
289
|
+
sync();
|
|
290
|
+
};
|
|
291
|
+
const messageIdOf = /* @__PURE__ */ new WeakMap();
|
|
292
|
+
const readAnchor = () => {
|
|
293
|
+
if (!viewport) return;
|
|
294
|
+
const anchors = items().filter((item) => item.props.scrollAnchor && item.props.messageId);
|
|
295
|
+
const line = viewport.getBoundingClientRect().top + viewport.clientTop + bandSize();
|
|
296
|
+
let low = 0;
|
|
297
|
+
let high = anchors.length - 1;
|
|
298
|
+
let found = -1;
|
|
299
|
+
while (low <= high) {
|
|
300
|
+
const middle = low + high >> 1;
|
|
301
|
+
if (anchors[middle].el.getBoundingClientRect().top <= line) {
|
|
302
|
+
found = middle;
|
|
303
|
+
low = middle + 1;
|
|
304
|
+
} else high = middle - 1;
|
|
305
|
+
}
|
|
306
|
+
if (!store.get().end) found = anchors.length - 1;
|
|
307
|
+
const currentAnchorId = anchors[found]?.props.messageId ?? null;
|
|
308
|
+
if (store.get().currentAnchorId !== currentAnchorId) store.set({ currentAnchorId });
|
|
309
|
+
};
|
|
310
|
+
const readVisible = () => {
|
|
311
|
+
const visibleMessageIds = items().filter((item) => visible.has(item.el) && item.props.messageId).map((item) => item.props.messageId);
|
|
312
|
+
if (!sameIds(store.get().visibleMessageIds, visibleMessageIds)) store.set({ visibleMessageIds });
|
|
313
|
+
readAnchor();
|
|
314
|
+
};
|
|
315
|
+
const bandSize = () => margin() + peek() + 8;
|
|
316
|
+
const observe = (el, props) => {
|
|
317
|
+
if (!props.messageId) return;
|
|
318
|
+
messageIdOf.set(el, props.messageId);
|
|
319
|
+
visibleObserver?.observe(el);
|
|
320
|
+
if (props.scrollAnchor) bandObserver?.observe(el);
|
|
321
|
+
};
|
|
322
|
+
const watchBand = () => {
|
|
323
|
+
bandObserver?.disconnect();
|
|
324
|
+
bandObserver = void 0;
|
|
325
|
+
if (!viewport) return;
|
|
326
|
+
const below = Math.max(0, viewport.clientHeight - bandSize());
|
|
327
|
+
bandObserver = new IntersectionObserver(readAnchor, {
|
|
328
|
+
root: viewport,
|
|
329
|
+
rootMargin: `0px 0px -${Math.floor(below)}px 0px`
|
|
330
|
+
});
|
|
331
|
+
for (const item of items()) if (item.props.scrollAnchor && item.props.messageId) bandObserver.observe(item.el);
|
|
332
|
+
};
|
|
333
|
+
const watch = () => {
|
|
334
|
+
if (!viewport || visibleObserver) return;
|
|
335
|
+
visibleObserver = new IntersectionObserver((entries) => {
|
|
336
|
+
for (const entry of entries) if (entry.isIntersecting) visible.add(entry.target);
|
|
337
|
+
else visible.delete(entry.target);
|
|
338
|
+
readVisible();
|
|
339
|
+
}, { root: viewport });
|
|
340
|
+
for (const item of items()) observe(item.el, item.props);
|
|
341
|
+
watchBand();
|
|
342
|
+
};
|
|
343
|
+
const unwatch = () => {
|
|
344
|
+
visibleObserver?.disconnect();
|
|
345
|
+
bandObserver?.disconnect();
|
|
346
|
+
visibleObserver = void 0;
|
|
347
|
+
bandObserver = void 0;
|
|
348
|
+
visible.clear();
|
|
349
|
+
};
|
|
350
|
+
context.onDestroy(() => {
|
|
351
|
+
endGlide();
|
|
352
|
+
endHold();
|
|
353
|
+
unwatch();
|
|
354
|
+
});
|
|
355
|
+
return {
|
|
356
|
+
/** Scrolls to the end of the transcript and takes up following again. False with no viewport. */
|
|
357
|
+
scrollToEnd: (options) => {
|
|
358
|
+
if (!viewport) return false;
|
|
359
|
+
endHold();
|
|
360
|
+
stuck = true;
|
|
361
|
+
toEnd(behaviorOf(options?.behavior));
|
|
362
|
+
return true;
|
|
363
|
+
},
|
|
364
|
+
/** Scrolls to the start of the transcript. False with no viewport. */
|
|
365
|
+
scrollToStart: (options) => {
|
|
366
|
+
if (!viewport) return false;
|
|
367
|
+
endHold();
|
|
368
|
+
endGlide();
|
|
369
|
+
stuck = false;
|
|
370
|
+
viewport.scrollTo({
|
|
371
|
+
top: 0,
|
|
372
|
+
behavior: behaviorOf(options?.behavior)
|
|
373
|
+
});
|
|
374
|
+
return true;
|
|
375
|
+
},
|
|
376
|
+
/**
|
|
377
|
+
* Scrolls to the row with this `messageId`. Returns false when no such
|
|
378
|
+
* row is mounted. Before any row exists the target is queued, and the
|
|
379
|
+
* transcript opens on it.
|
|
380
|
+
*/
|
|
381
|
+
scrollToMessage: (id, options) => {
|
|
382
|
+
if (!opened) {
|
|
383
|
+
queued = {
|
|
384
|
+
id,
|
|
385
|
+
options
|
|
386
|
+
};
|
|
387
|
+
return true;
|
|
388
|
+
}
|
|
389
|
+
const target = find(id);
|
|
390
|
+
if (!target || !viewport) return false;
|
|
391
|
+
endGlide();
|
|
392
|
+
stuck = false;
|
|
393
|
+
const behavior = behaviorOf(options?.behavior);
|
|
394
|
+
endHold();
|
|
395
|
+
placeMessage(target, options, behavior);
|
|
396
|
+
const place = () => placeMessage(target, options, "auto");
|
|
397
|
+
if (behavior === "smooth") settle = () => {
|
|
398
|
+
place();
|
|
399
|
+
holdPlacement(place);
|
|
400
|
+
};
|
|
401
|
+
else holdPlacement(place);
|
|
402
|
+
return true;
|
|
403
|
+
},
|
|
404
|
+
bindViewport: (el) => {
|
|
405
|
+
viewport = el;
|
|
406
|
+
const view = el.ownerDocument.defaultView;
|
|
407
|
+
resizes = view ? new view.ResizeObserver(onResize) : void 0;
|
|
408
|
+
resizes?.observe(el);
|
|
409
|
+
if (content) resizes?.observe(content);
|
|
410
|
+
el.addEventListener("scroll", onScroll, { passive: true });
|
|
411
|
+
el.addEventListener("scrollend", onScrollEnd);
|
|
412
|
+
const intents = [
|
|
413
|
+
"wheel",
|
|
414
|
+
"touchstart",
|
|
415
|
+
"pointerdown",
|
|
416
|
+
"keydown"
|
|
417
|
+
];
|
|
418
|
+
for (const type of intents) el.addEventListener(type, onIntent, { passive: true });
|
|
419
|
+
if (trackers > 0) watch();
|
|
420
|
+
schedule();
|
|
421
|
+
return () => {
|
|
422
|
+
el.removeEventListener("scroll", onScroll);
|
|
423
|
+
el.removeEventListener("scrollend", onScrollEnd);
|
|
424
|
+
for (const type of intents) el.removeEventListener(type, onIntent);
|
|
425
|
+
resizes?.disconnect();
|
|
426
|
+
resizes = void 0;
|
|
427
|
+
endGlide();
|
|
428
|
+
endHold();
|
|
429
|
+
unwatch();
|
|
430
|
+
viewport = void 0;
|
|
431
|
+
opened = false;
|
|
432
|
+
stuck = false;
|
|
433
|
+
roomAnchor = void 0;
|
|
434
|
+
};
|
|
435
|
+
},
|
|
436
|
+
bindContent: (el) => {
|
|
437
|
+
content = el;
|
|
438
|
+
resizes?.observe(el);
|
|
439
|
+
return () => {
|
|
440
|
+
resizes?.unobserve(el);
|
|
441
|
+
el.style.minHeight = "";
|
|
442
|
+
content = void 0;
|
|
443
|
+
};
|
|
444
|
+
},
|
|
445
|
+
bindItem: (el, props) => {
|
|
446
|
+
ordered = void 0;
|
|
447
|
+
added.add(el);
|
|
448
|
+
observe(el, props);
|
|
449
|
+
schedule();
|
|
450
|
+
return () => {
|
|
451
|
+
ordered = void 0;
|
|
452
|
+
added.delete(el);
|
|
453
|
+
visibleObserver?.unobserve(el);
|
|
454
|
+
bandObserver?.unobserve(el);
|
|
455
|
+
if (visible.delete(el)) readVisible();
|
|
456
|
+
schedule();
|
|
457
|
+
};
|
|
458
|
+
},
|
|
459
|
+
/** Moves focus to the viewport, for a scroll button that is about to go inert. */
|
|
460
|
+
focusViewport: () => {
|
|
461
|
+
viewport?.focus({ preventScroll: true });
|
|
462
|
+
},
|
|
463
|
+
/** Tracks what is on screen for as long as something listens. */
|
|
464
|
+
watchVisibility: (listener) => {
|
|
465
|
+
trackers += 1;
|
|
466
|
+
if (trackers === 1) watch();
|
|
467
|
+
const stop = store.subscribe(() => listener());
|
|
468
|
+
return () => {
|
|
469
|
+
stop();
|
|
470
|
+
trackers -= 1;
|
|
471
|
+
if (trackers === 0) unwatch();
|
|
472
|
+
};
|
|
473
|
+
},
|
|
474
|
+
/** Follows the state, for the hooks. */
|
|
475
|
+
subscribe: (listener) => {
|
|
476
|
+
return store.subscribe(() => listener());
|
|
477
|
+
}
|
|
478
|
+
};
|
|
479
|
+
},
|
|
480
|
+
slots: (slot) => ({
|
|
481
|
+
root: slot({
|
|
482
|
+
direct: direct(["data-scrollable", "data-autoscrolling"]),
|
|
483
|
+
attrs: (state) => scrollableAttrs(state)
|
|
484
|
+
}),
|
|
485
|
+
viewport: slot({
|
|
486
|
+
direct: direct([
|
|
487
|
+
"data-scrollable",
|
|
488
|
+
"data-autoscrolling",
|
|
489
|
+
"data-pending-scroll"
|
|
490
|
+
]),
|
|
491
|
+
attrs: (state) => ({
|
|
492
|
+
...scrollableAttrs(state),
|
|
493
|
+
"data-pending-scroll": state.pending ? "" : void 0
|
|
494
|
+
}),
|
|
495
|
+
bind: (el, part) => part.api.bindViewport(el)
|
|
496
|
+
}),
|
|
497
|
+
content: slot({ bind: (el, part) => part.api.bindContent(el) }),
|
|
498
|
+
item: slot({
|
|
499
|
+
props: {
|
|
500
|
+
id: "string",
|
|
501
|
+
messageId: "string",
|
|
502
|
+
scrollAnchor: "boolean"
|
|
503
|
+
},
|
|
504
|
+
attrs: (_state, part) => ({
|
|
505
|
+
"data-message-id": part.props.messageId,
|
|
506
|
+
"data-scroll-anchor": part.props.scrollAnchor ? "" : void 0
|
|
507
|
+
}),
|
|
508
|
+
bind: (el, part) => part.api.bindItem(el, part.props)
|
|
509
|
+
}),
|
|
510
|
+
button: slot({
|
|
511
|
+
props: {
|
|
512
|
+
id: "string",
|
|
513
|
+
direction: "string",
|
|
514
|
+
behavior: "string"
|
|
515
|
+
},
|
|
516
|
+
direct: direct([
|
|
517
|
+
"data-active",
|
|
518
|
+
"inert",
|
|
519
|
+
"tabindex"
|
|
520
|
+
]),
|
|
521
|
+
attrs: (state, part) => {
|
|
522
|
+
const active = part.props.direction === "start" ? state.start : state.end;
|
|
523
|
+
return {
|
|
524
|
+
type: "button",
|
|
525
|
+
"data-direction": part.props.direction ?? "end",
|
|
526
|
+
"data-active": String(active),
|
|
527
|
+
inert: active ? void 0 : "",
|
|
528
|
+
tabindex: active ? void 0 : "-1"
|
|
529
|
+
};
|
|
530
|
+
},
|
|
531
|
+
press: ({ api, props, el }) => {
|
|
532
|
+
if (el && el.ownerDocument.activeElement === el) api.focusViewport();
|
|
533
|
+
const options = { behavior: props.behavior };
|
|
534
|
+
if (props.direction === "start") api.scrollToStart(options);
|
|
535
|
+
else api.scrollToEnd(options);
|
|
536
|
+
}
|
|
537
|
+
})
|
|
538
|
+
}),
|
|
539
|
+
agent: { actions: [
|
|
540
|
+
"scrollToEnd",
|
|
541
|
+
"scrollToStart",
|
|
542
|
+
"scrollToMessage"
|
|
543
|
+
] }
|
|
544
|
+
});
|
|
545
|
+
const MessageScrollerHandle = createContext(null);
|
|
546
|
+
function useMessageScrollerHandle() {
|
|
547
|
+
const handle = use(MessageScrollerHandle);
|
|
548
|
+
if (!handle) throw new Error("MessageScroller parts must be used within a MessageScrollerProvider.");
|
|
549
|
+
return handle;
|
|
550
|
+
}
|
|
551
|
+
/**
|
|
552
|
+
* The headless root. It owns the scroll state and the behavior props, and
|
|
553
|
+
* renders no element: the parts and the hooks work anywhere inside it.
|
|
554
|
+
*/
|
|
555
|
+
function MessageScrollerProvider(t0) {
|
|
556
|
+
const $ = c(6);
|
|
557
|
+
let children;
|
|
558
|
+
let options;
|
|
559
|
+
if ($[0] !== t0) {
|
|
560
|
+
({children, ...options} = t0);
|
|
561
|
+
$[0] = t0;
|
|
562
|
+
$[1] = children;
|
|
563
|
+
$[2] = options;
|
|
564
|
+
} else {
|
|
565
|
+
children = $[1];
|
|
566
|
+
options = $[2];
|
|
567
|
+
}
|
|
568
|
+
const handle = (0, core_exports.usePrimitive)(messageScroller, options);
|
|
569
|
+
let t1;
|
|
570
|
+
if ($[3] !== children || $[4] !== handle) {
|
|
571
|
+
t1 = /* @__PURE__ */ jsx(MessageScrollerHandle, {
|
|
572
|
+
value: handle,
|
|
573
|
+
children
|
|
574
|
+
});
|
|
575
|
+
$[3] = children;
|
|
576
|
+
$[4] = handle;
|
|
577
|
+
$[5] = t1;
|
|
578
|
+
} else t1 = $[5];
|
|
579
|
+
return t1;
|
|
580
|
+
}
|
|
581
|
+
/** The frame around the viewport and its controls. It fills its parent, which sets the height. */
|
|
582
|
+
function MessageScroller(t0) {
|
|
583
|
+
const $ = c(11);
|
|
584
|
+
let className;
|
|
585
|
+
let props;
|
|
586
|
+
let t1;
|
|
587
|
+
if ($[0] !== t0) {
|
|
588
|
+
({label: t1, className, ...props} = t0);
|
|
589
|
+
$[0] = t0;
|
|
590
|
+
$[1] = className;
|
|
591
|
+
$[2] = props;
|
|
592
|
+
$[3] = t1;
|
|
593
|
+
} else {
|
|
594
|
+
className = $[1];
|
|
595
|
+
props = $[2];
|
|
596
|
+
t1 = $[3];
|
|
597
|
+
}
|
|
598
|
+
const label = t1 === void 0 ? "Conversation" : t1;
|
|
599
|
+
const t2 = useMessageScrollerHandle();
|
|
600
|
+
let t3;
|
|
601
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
602
|
+
t3 = {};
|
|
603
|
+
$[4] = t3;
|
|
604
|
+
} else t3 = $[4];
|
|
605
|
+
let t4;
|
|
606
|
+
if ($[5] !== className) {
|
|
607
|
+
t4 = cnState("group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden", className);
|
|
608
|
+
$[5] = className;
|
|
609
|
+
$[6] = t4;
|
|
610
|
+
} else t4 = $[6];
|
|
611
|
+
let t5;
|
|
612
|
+
if ($[7] !== label || $[8] !== props || $[9] !== t4) {
|
|
613
|
+
t5 = {
|
|
614
|
+
role: "group",
|
|
615
|
+
"aria-label": label,
|
|
616
|
+
className: t4,
|
|
617
|
+
...props
|
|
618
|
+
};
|
|
619
|
+
$[7] = label;
|
|
620
|
+
$[8] = props;
|
|
621
|
+
$[9] = t4;
|
|
622
|
+
$[10] = t5;
|
|
623
|
+
} else t5 = $[10];
|
|
624
|
+
return (0, core_exports.usePart)(t2, "root", t3, t5, "div");
|
|
625
|
+
}
|
|
626
|
+
/** The element that scrolls: a named region a keyboard can focus and scroll. */
|
|
627
|
+
function MessageScrollerViewport(t0) {
|
|
628
|
+
const $ = c(11);
|
|
629
|
+
let className;
|
|
630
|
+
let props;
|
|
631
|
+
let t1;
|
|
632
|
+
if ($[0] !== t0) {
|
|
633
|
+
({label: t1, className, ...props} = t0);
|
|
634
|
+
$[0] = t0;
|
|
635
|
+
$[1] = className;
|
|
636
|
+
$[2] = props;
|
|
637
|
+
$[3] = t1;
|
|
638
|
+
} else {
|
|
639
|
+
className = $[1];
|
|
640
|
+
props = $[2];
|
|
641
|
+
t1 = $[3];
|
|
642
|
+
}
|
|
643
|
+
const label = t1 === void 0 ? "Messages" : t1;
|
|
644
|
+
const t2 = useMessageScrollerHandle();
|
|
645
|
+
let t3;
|
|
646
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
647
|
+
t3 = {};
|
|
648
|
+
$[4] = t3;
|
|
649
|
+
} else t3 = $[4];
|
|
650
|
+
let t4;
|
|
651
|
+
if ($[5] !== className) {
|
|
652
|
+
t4 = cnState("size-full min-h-0 min-w-0 scroll-fade overflow-y-auto overscroll-contain contain-content focus-ring-inset [scrollbar-gutter:stable] [scrollbar-width:thin] data-autoscrolling:[scrollbar-color:transparent_transparent] data-pending-scroll:invisible", className);
|
|
653
|
+
$[5] = className;
|
|
654
|
+
$[6] = t4;
|
|
655
|
+
} else t4 = $[6];
|
|
656
|
+
let t5;
|
|
657
|
+
if ($[7] !== label || $[8] !== props || $[9] !== t4) {
|
|
658
|
+
t5 = {
|
|
659
|
+
role: "region",
|
|
660
|
+
"aria-label": label,
|
|
661
|
+
tabIndex: 0,
|
|
662
|
+
className: t4,
|
|
663
|
+
...props
|
|
664
|
+
};
|
|
665
|
+
$[7] = label;
|
|
666
|
+
$[8] = props;
|
|
667
|
+
$[9] = t4;
|
|
668
|
+
$[10] = t5;
|
|
669
|
+
} else t5 = $[10];
|
|
670
|
+
return (0, core_exports.usePart)(t2, "viewport", t3, t5, "div");
|
|
671
|
+
}
|
|
672
|
+
/** The transcript: a log whose new rows a screen reader announces. */
|
|
673
|
+
function MessageScrollerContent(t0) {
|
|
674
|
+
const $ = c(9);
|
|
675
|
+
let className;
|
|
676
|
+
let props;
|
|
677
|
+
if ($[0] !== t0) {
|
|
678
|
+
({className, ...props} = t0);
|
|
679
|
+
$[0] = t0;
|
|
680
|
+
$[1] = className;
|
|
681
|
+
$[2] = props;
|
|
682
|
+
} else {
|
|
683
|
+
className = $[1];
|
|
684
|
+
props = $[2];
|
|
685
|
+
}
|
|
686
|
+
const t1 = useMessageScrollerHandle();
|
|
687
|
+
let t2;
|
|
688
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
689
|
+
t2 = {};
|
|
690
|
+
$[3] = t2;
|
|
691
|
+
} else t2 = $[3];
|
|
692
|
+
let t3;
|
|
693
|
+
if ($[4] !== className) {
|
|
694
|
+
t3 = cnState("flex h-max min-h-full flex-col gap-6", className);
|
|
695
|
+
$[4] = className;
|
|
696
|
+
$[5] = t3;
|
|
697
|
+
} else t3 = $[5];
|
|
698
|
+
let t4;
|
|
699
|
+
if ($[6] !== props || $[7] !== t3) {
|
|
700
|
+
t4 = {
|
|
701
|
+
role: "log",
|
|
702
|
+
"aria-relevant": "additions",
|
|
703
|
+
className: t3,
|
|
704
|
+
...props
|
|
705
|
+
};
|
|
706
|
+
$[6] = props;
|
|
707
|
+
$[7] = t3;
|
|
708
|
+
$[8] = t4;
|
|
709
|
+
} else t4 = $[8];
|
|
710
|
+
return (0, core_exports.usePart)(t1, "content", t2, t4, "div");
|
|
711
|
+
}
|
|
712
|
+
/** One row of the transcript: a message, a marker, a typing indicator. */
|
|
713
|
+
function MessageScrollerItem(t0) {
|
|
714
|
+
const $ = c(14);
|
|
715
|
+
let className;
|
|
716
|
+
let messageId;
|
|
717
|
+
let props;
|
|
718
|
+
let t1;
|
|
719
|
+
if ($[0] !== t0) {
|
|
720
|
+
({messageId, scrollAnchor: t1, className, ...props} = t0);
|
|
721
|
+
$[0] = t0;
|
|
722
|
+
$[1] = className;
|
|
723
|
+
$[2] = messageId;
|
|
724
|
+
$[3] = props;
|
|
725
|
+
$[4] = t1;
|
|
726
|
+
} else {
|
|
727
|
+
className = $[1];
|
|
728
|
+
messageId = $[2];
|
|
729
|
+
props = $[3];
|
|
730
|
+
t1 = $[4];
|
|
731
|
+
}
|
|
732
|
+
const scrollAnchor = t1 === void 0 ? false : t1;
|
|
733
|
+
const key = useId();
|
|
734
|
+
const t2 = useMessageScrollerHandle();
|
|
735
|
+
let t3;
|
|
736
|
+
if ($[5] !== key || $[6] !== messageId || $[7] !== scrollAnchor) {
|
|
737
|
+
t3 = {
|
|
738
|
+
id: key,
|
|
739
|
+
messageId,
|
|
740
|
+
scrollAnchor
|
|
741
|
+
};
|
|
742
|
+
$[5] = key;
|
|
743
|
+
$[6] = messageId;
|
|
744
|
+
$[7] = scrollAnchor;
|
|
745
|
+
$[8] = t3;
|
|
746
|
+
} else t3 = $[8];
|
|
747
|
+
let t4;
|
|
748
|
+
if ($[9] !== className) {
|
|
749
|
+
t4 = cnState("min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]", className);
|
|
750
|
+
$[9] = className;
|
|
751
|
+
$[10] = t4;
|
|
752
|
+
} else t4 = $[10];
|
|
753
|
+
let t5;
|
|
754
|
+
if ($[11] !== props || $[12] !== t4) {
|
|
755
|
+
t5 = {
|
|
756
|
+
className: t4,
|
|
757
|
+
...props
|
|
758
|
+
};
|
|
759
|
+
$[11] = props;
|
|
760
|
+
$[12] = t4;
|
|
761
|
+
$[13] = t5;
|
|
762
|
+
} else t5 = $[13];
|
|
763
|
+
return (0, core_exports.usePart)(t2, "item", t3, t5, "div");
|
|
764
|
+
}
|
|
765
|
+
/**
|
|
766
|
+
* Scrolls to the start or the end of the transcript. It is hidden and inert
|
|
767
|
+
* until there is content in its direction.
|
|
768
|
+
*/
|
|
769
|
+
function MessageScrollerButton(t0) {
|
|
770
|
+
const $ = c(28);
|
|
771
|
+
let behavior;
|
|
772
|
+
let children;
|
|
773
|
+
let className;
|
|
774
|
+
let label;
|
|
775
|
+
let props;
|
|
776
|
+
let t1;
|
|
777
|
+
let t2;
|
|
778
|
+
let t3;
|
|
779
|
+
if ($[0] !== t0) {
|
|
780
|
+
({direction: t1, behavior, label, variant: t2, size: t3, className, children, ...props} = t0);
|
|
781
|
+
$[0] = t0;
|
|
782
|
+
$[1] = behavior;
|
|
783
|
+
$[2] = children;
|
|
784
|
+
$[3] = className;
|
|
785
|
+
$[4] = label;
|
|
786
|
+
$[5] = props;
|
|
787
|
+
$[6] = t1;
|
|
788
|
+
$[7] = t2;
|
|
789
|
+
$[8] = t3;
|
|
790
|
+
} else {
|
|
791
|
+
behavior = $[1];
|
|
792
|
+
children = $[2];
|
|
793
|
+
className = $[3];
|
|
794
|
+
label = $[4];
|
|
795
|
+
props = $[5];
|
|
796
|
+
t1 = $[6];
|
|
797
|
+
t2 = $[7];
|
|
798
|
+
t3 = $[8];
|
|
799
|
+
}
|
|
800
|
+
const direction = t1 === void 0 ? "end" : t1;
|
|
801
|
+
const variant = t2 === void 0 ? "secondary" : t2;
|
|
802
|
+
const size = t3 === void 0 ? "icon-sm" : t3;
|
|
803
|
+
const key = useId();
|
|
804
|
+
let t4;
|
|
805
|
+
if ($[9] !== size || $[10] !== variant) {
|
|
806
|
+
t4 = {
|
|
807
|
+
"data-variant": variant,
|
|
808
|
+
"data-size": size
|
|
809
|
+
};
|
|
810
|
+
$[9] = size;
|
|
811
|
+
$[10] = variant;
|
|
812
|
+
$[11] = t4;
|
|
813
|
+
} else t4 = $[11];
|
|
814
|
+
const look = t4;
|
|
815
|
+
const t5 = useMessageScrollerHandle();
|
|
816
|
+
let t6;
|
|
817
|
+
if ($[12] !== behavior || $[13] !== direction || $[14] !== key) {
|
|
818
|
+
t6 = {
|
|
819
|
+
id: key,
|
|
820
|
+
direction,
|
|
821
|
+
behavior
|
|
822
|
+
};
|
|
823
|
+
$[12] = behavior;
|
|
824
|
+
$[13] = direction;
|
|
825
|
+
$[14] = key;
|
|
826
|
+
$[15] = t6;
|
|
827
|
+
} else t6 = $[15];
|
|
828
|
+
const t7 = label ?? (direction === "end" ? "Scroll to end" : "Scroll to start");
|
|
829
|
+
let t8;
|
|
830
|
+
if ($[16] !== className || $[17] !== size || $[18] !== variant) {
|
|
831
|
+
t8 = cnState(cn(buttonVariants({
|
|
832
|
+
variant,
|
|
833
|
+
size
|
|
834
|
+
}), "absolute inset-s-1/2 -translate-x-1/2 border border-input bg-background text-foreground transition-[translate,scale,opacity] duration-popup ease-out hover:bg-muted hover:text-foreground motion-reduce:transition-none data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-quick data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180"), className);
|
|
835
|
+
$[16] = className;
|
|
836
|
+
$[17] = size;
|
|
837
|
+
$[18] = variant;
|
|
838
|
+
$[19] = t8;
|
|
839
|
+
} else t8 = $[19];
|
|
840
|
+
let t9;
|
|
841
|
+
if ($[20] !== children) {
|
|
842
|
+
t9 = children ?? /* @__PURE__ */ jsx(Icon, { icon: ArrowDown02Icon });
|
|
843
|
+
$[20] = children;
|
|
844
|
+
$[21] = t9;
|
|
845
|
+
} else t9 = $[21];
|
|
846
|
+
let t10;
|
|
847
|
+
if ($[22] !== look || $[23] !== props || $[24] !== t7 || $[25] !== t8 || $[26] !== t9) {
|
|
848
|
+
t10 = {
|
|
849
|
+
"aria-label": t7,
|
|
850
|
+
...look,
|
|
851
|
+
className: t8,
|
|
852
|
+
children: t9,
|
|
853
|
+
...props
|
|
854
|
+
};
|
|
855
|
+
$[22] = look;
|
|
856
|
+
$[23] = props;
|
|
857
|
+
$[24] = t7;
|
|
858
|
+
$[25] = t8;
|
|
859
|
+
$[26] = t9;
|
|
860
|
+
$[27] = t10;
|
|
861
|
+
} else t10 = $[27];
|
|
862
|
+
return (0, core_exports.usePart)(t5, "button", t6, t10, "button");
|
|
863
|
+
}
|
|
864
|
+
/** The scroll commands, for a control anywhere inside `MessageScrollerProvider`. */
|
|
865
|
+
function useMessageScroller() {
|
|
866
|
+
const $ = c(4);
|
|
867
|
+
const { api } = useMessageScrollerHandle();
|
|
868
|
+
let t0;
|
|
869
|
+
if ($[0] !== api.scrollToEnd || $[1] !== api.scrollToMessage || $[2] !== api.scrollToStart) {
|
|
870
|
+
t0 = {
|
|
871
|
+
scrollToMessage: api.scrollToMessage,
|
|
872
|
+
scrollToEnd: api.scrollToEnd,
|
|
873
|
+
scrollToStart: api.scrollToStart
|
|
874
|
+
};
|
|
875
|
+
$[0] = api.scrollToEnd;
|
|
876
|
+
$[1] = api.scrollToMessage;
|
|
877
|
+
$[2] = api.scrollToStart;
|
|
878
|
+
$[3] = t0;
|
|
879
|
+
} else t0 = $[3];
|
|
880
|
+
return t0;
|
|
881
|
+
}
|
|
882
|
+
/** Which edges the viewport can still scroll toward. It re-renders when one changes. */
|
|
883
|
+
function useMessageScrollerScrollable() {
|
|
884
|
+
const $ = c(7);
|
|
885
|
+
const { api, instance } = useMessageScrollerHandle();
|
|
886
|
+
let t0;
|
|
887
|
+
if ($[0] !== instance) {
|
|
888
|
+
t0 = () => instance.get().start;
|
|
889
|
+
$[0] = instance;
|
|
890
|
+
$[1] = t0;
|
|
891
|
+
} else t0 = $[1];
|
|
892
|
+
const start = useSyncExternalStore(api.subscribe, t0, _temp);
|
|
893
|
+
let t1;
|
|
894
|
+
if ($[2] !== instance) {
|
|
895
|
+
t1 = () => instance.get().end;
|
|
896
|
+
$[2] = instance;
|
|
897
|
+
$[3] = t1;
|
|
898
|
+
} else t1 = $[3];
|
|
899
|
+
const end = useSyncExternalStore(api.subscribe, t1, _temp2);
|
|
900
|
+
let t2;
|
|
901
|
+
if ($[4] !== end || $[5] !== start) {
|
|
902
|
+
t2 = {
|
|
903
|
+
start,
|
|
904
|
+
end
|
|
905
|
+
};
|
|
906
|
+
$[4] = end;
|
|
907
|
+
$[5] = start;
|
|
908
|
+
$[6] = t2;
|
|
909
|
+
} else t2 = $[6];
|
|
910
|
+
return t2;
|
|
911
|
+
}
|
|
912
|
+
function _temp2() {
|
|
913
|
+
return false;
|
|
914
|
+
}
|
|
915
|
+
function _temp() {
|
|
916
|
+
return false;
|
|
917
|
+
}
|
|
918
|
+
/**
|
|
919
|
+
* Where the reader is in the transcript. Tracking runs only while a component
|
|
920
|
+
* uses this hook, and only rows with a `messageId` take part.
|
|
921
|
+
*/
|
|
922
|
+
function useMessageScrollerVisibility() {
|
|
923
|
+
const $ = c(7);
|
|
924
|
+
const { api, instance } = useMessageScrollerHandle();
|
|
925
|
+
let t0;
|
|
926
|
+
if ($[0] !== instance) {
|
|
927
|
+
t0 = () => instance.get().currentAnchorId;
|
|
928
|
+
$[0] = instance;
|
|
929
|
+
$[1] = t0;
|
|
930
|
+
} else t0 = $[1];
|
|
931
|
+
const currentAnchorId = useSyncExternalStore(api.watchVisibility, t0, _temp3);
|
|
932
|
+
let t1;
|
|
933
|
+
if ($[2] !== instance) {
|
|
934
|
+
t1 = () => instance.get().visibleMessageIds;
|
|
935
|
+
$[2] = instance;
|
|
936
|
+
$[3] = t1;
|
|
937
|
+
} else t1 = $[3];
|
|
938
|
+
const visibleMessageIds = useSyncExternalStore(api.watchVisibility, t1, _temp4);
|
|
939
|
+
let t2;
|
|
940
|
+
if ($[4] !== currentAnchorId || $[5] !== visibleMessageIds) {
|
|
941
|
+
t2 = {
|
|
942
|
+
currentAnchorId,
|
|
943
|
+
visibleMessageIds
|
|
944
|
+
};
|
|
945
|
+
$[4] = currentAnchorId;
|
|
946
|
+
$[5] = visibleMessageIds;
|
|
947
|
+
$[6] = t2;
|
|
948
|
+
} else t2 = $[6];
|
|
949
|
+
return t2;
|
|
950
|
+
}
|
|
951
|
+
function _temp4() {
|
|
952
|
+
return NO_IDS;
|
|
953
|
+
}
|
|
954
|
+
function _temp3() {
|
|
955
|
+
return null;
|
|
956
|
+
}
|
|
957
|
+
export { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility };
|