@brett_lamy/ui 2.0.0 → 3.0.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 +4 -4
- package/dist/components/adaptive-pane.d.ts.map +1 -1
- package/dist/components/adaptive-pane.js +30 -0
- package/dist/components/animated-height.d.ts.map +1 -1
- package/dist/components/animated-height.js +82 -0
- package/dist/{templates → components}/artifact-chat-container.d.ts +12 -5
- package/dist/components/artifact-chat-container.d.ts.map +1 -0
- package/dist/components/artifact-chat-container.js +200 -0
- package/dist/components/avatar.js +26 -0
- package/dist/components/badge.js +24 -0
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +46 -0
- package/dist/components/card.js +56 -0
- package/dist/components/celebrate.d.ts.map +1 -1
- package/dist/components/celebrate.js +142 -0
- package/dist/components/chat-column.d.ts.map +1 -0
- package/dist/components/chat-column.js +26 -0
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox.js +55 -0
- package/dist/components/combobox.d.ts +1 -1
- package/dist/components/combobox.d.ts.map +1 -1
- package/dist/components/combobox.js +65 -0
- package/dist/components/command-menu.d.ts.map +1 -1
- package/dist/components/command-menu.js +906 -0
- package/dist/components/composer/annotator.d.ts.map +1 -0
- package/dist/components/composer/annotator.js +17 -0
- package/dist/components/composer/composer-files.d.ts.map +1 -0
- package/dist/components/composer/composer-files.js +91 -0
- package/dist/components/{workbench/wb-popover.d.ts → composer/composer-popover.d.ts} +1 -1
- package/dist/components/composer/composer-popover.d.ts.map +1 -0
- package/dist/components/composer/composer-popover.js +29 -0
- package/dist/components/{workbench → composer}/composer.d.ts +3 -3
- package/dist/components/composer/composer.d.ts.map +1 -0
- package/dist/components/composer/composer.js +1633 -0
- package/dist/components/{workbench/chat.d.ts → conversation.d.ts} +2 -2
- package/dist/components/conversation.d.ts.map +1 -0
- package/dist/components/conversation.js +357 -0
- package/dist/components/credenza.d.ts.map +1 -1
- package/dist/components/credenza.js +294 -0
- package/dist/components/dialog.d.ts +2 -2
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/dialog.js +125 -0
- package/dist/components/disclosure.d.ts.map +1 -1
- package/dist/components/disclosure.js +59 -0
- package/dist/components/dropdown-menu.d.ts +1 -1
- package/dist/components/dropdown-menu.d.ts.map +1 -1
- package/dist/components/dropdown-menu.js +114 -0
- package/dist/components/edge-drawer.js +73 -0
- package/dist/components/edit-bar.d.ts.map +1 -1
- package/dist/components/edit-bar.js +33 -0
- package/dist/components/{chat/floating-chat.d.ts → floating-chat.d.ts} +8 -4
- package/dist/components/floating-chat.d.ts.map +1 -0
- package/dist/components/floating-chat.js +288 -0
- package/dist/components/{chat/floating-sheet.d.ts → floating-sheet.d.ts} +5 -5
- package/dist/components/floating-sheet.d.ts.map +1 -0
- package/dist/components/floating-sheet.js +252 -0
- package/dist/components/form.d.ts.map +1 -1
- package/dist/components/form.js +32 -0
- package/dist/{lib/workbench/icons.d.ts → components/icon-button.d.ts} +5 -5
- package/dist/components/icon-button.d.ts.map +1 -0
- package/dist/components/icon-button.js +31 -0
- package/dist/components/icon-swap.d.ts.map +1 -1
- package/dist/components/icon-swap.js +80 -0
- package/dist/components/index-bar.d.ts +14 -1
- package/dist/components/index-bar.d.ts.map +1 -1
- package/dist/components/index-bar.js +249 -0
- package/dist/components/input.d.ts.map +1 -1
- package/dist/components/input.js +30 -0
- package/dist/components/kbd.d.ts.map +1 -1
- package/dist/components/kbd.js +21 -0
- package/dist/components/label.d.ts.map +1 -1
- package/dist/components/label.js +22 -0
- package/dist/components/list-box.d.ts +1 -3
- package/dist/components/list-box.d.ts.map +1 -1
- package/dist/components/list-box.js +104 -0
- package/dist/components/list.d.ts.map +1 -1
- package/dist/components/list.js +491 -0
- package/dist/components/markdown-editor.d.ts.map +1 -1
- package/dist/components/markdown-editor.js +300 -0
- package/dist/components/{workbench/markdown.d.ts → markdown-view.d.ts} +1 -1
- package/dist/components/markdown-view.d.ts.map +1 -0
- package/dist/components/markdown-view.js +129 -0
- package/dist/components/measure-h.d.ts.map +1 -1
- package/dist/components/measure-h.js +20 -0
- package/dist/components/message-scroller.d.ts.map +1 -0
- package/dist/components/message-scroller.js +247 -0
- package/dist/components/morph.d.ts.map +1 -1
- package/dist/components/morph.js +89 -0
- package/dist/components/navigation-stack.d.ts +14 -0
- package/dist/components/navigation-stack.d.ts.map +1 -1
- package/dist/components/navigation-stack.js +506 -0
- package/dist/components/now-playing-bars.js +38 -0
- package/dist/components/number-morph.d.ts.map +1 -1
- package/dist/components/number-morph.js +123 -0
- package/dist/components/pencilkit/constants.d.ts.map +1 -0
- package/dist/components/pencilkit/constants.js +63 -0
- package/dist/components/pencilkit/pencil-canvas.d.ts +1 -1
- package/dist/components/pencilkit/pencil-canvas.d.ts.map +1 -1
- package/dist/components/pencilkit/pencil-canvas.js +105 -0
- package/dist/components/pencilkit/pencil-toolbar.d.ts +2 -2
- package/dist/components/pencilkit/pencil-toolbar.d.ts.map +1 -1
- package/dist/components/pencilkit/pencil-toolbar.js +186 -0
- package/dist/components/pencilkit/pencilkit-annotator.d.ts +1 -1
- package/dist/components/pencilkit/pencilkit-annotator.d.ts.map +1 -1
- package/dist/components/pencilkit/pencilkit-annotator.js +44 -0
- package/dist/components/pencilkit/stroke-path.d.ts +1 -1
- package/dist/components/pencilkit/stroke-path.d.ts.map +1 -1
- package/dist/components/pencilkit/stroke-path.js +44 -0
- package/dist/components/pencilkit/use-pencil-history.d.ts +2 -2
- package/dist/components/pencilkit/use-pencil-history.d.ts.map +1 -1
- package/dist/components/pencilkit/use-pencil-history.js +25 -0
- package/dist/components/plain-button.d.ts +10 -0
- package/dist/components/plain-button.d.ts.map +1 -0
- package/dist/components/plain-button.js +23 -0
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.d.ts.map +1 -1
- package/dist/components/popover.js +36 -0
- package/dist/components/progress-ring.d.ts.map +1 -1
- package/dist/components/progress-ring.js +195 -0
- package/dist/components/progress-stepper.d.ts.map +1 -0
- package/dist/components/progress-stepper.js +62 -0
- package/dist/components/progress.d.ts.map +1 -1
- package/dist/components/progress.js +54 -0
- package/dist/components/qr-svg.d.ts.map +1 -1
- package/dist/components/qr-svg.js +74 -0
- package/dist/components/radio-group.d.ts +1 -1
- package/dist/components/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group.js +41 -0
- package/dist/components/replay-preview.d.ts +4 -0
- package/dist/components/replay-preview.d.ts.map +1 -0
- package/dist/components/replay-preview.js +3 -0
- package/dist/components/scroll-area.js +23 -0
- package/dist/components/search-field.d.ts.map +1 -1
- package/dist/components/search-field.js +44 -0
- package/dist/components/segmented.d.ts +1 -1
- package/dist/components/segmented.d.ts.map +1 -1
- package/dist/components/segmented.js +32 -0
- package/dist/components/select.d.ts +1 -1
- package/dist/components/select.d.ts.map +1 -1
- package/dist/components/select.js +93 -0
- package/dist/components/separator.d.ts.map +1 -1
- package/dist/components/separator.js +40 -0
- package/dist/components/sheet.d.ts.map +1 -1
- package/dist/components/sheet.js +55 -0
- package/dist/components/side-drawer.d.ts +10 -1
- package/dist/components/side-drawer.d.ts.map +1 -1
- package/dist/components/side-drawer.js +247 -0
- package/dist/components/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar.js +282 -0
- package/dist/components/skeleton.js +48 -0
- package/dist/components/slider.d.ts +1 -1
- package/dist/components/slider.d.ts.map +1 -1
- package/dist/components/slider.js +98 -0
- package/dist/components/snap-sheet.d.ts.map +1 -0
- package/dist/components/snap-sheet.js +100 -0
- package/dist/components/spinner.js +35 -0
- package/dist/components/split-view.d.ts.map +1 -1
- package/dist/components/split-view.js +1060 -0
- package/dist/components/switch.d.ts.map +1 -1
- package/dist/components/switch.js +27 -0
- package/dist/components/syntax-highlighting.d.ts.map +1 -1
- package/dist/components/syntax-highlighting.js +293 -0
- package/dist/components/tab-bar.js +28 -0
- package/dist/components/tab-view.d.ts +1 -1
- package/dist/components/tab-view.d.ts.map +1 -1
- package/dist/components/tab-view.js +307 -0
- package/dist/components/tabs.d.ts +1 -1
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/tabs.js +86 -0
- package/dist/components/text-field.d.ts.map +1 -1
- package/dist/components/text-field.js +29 -0
- package/dist/components/text-morph.d.ts.map +1 -1
- package/dist/components/text-morph.js +131 -0
- package/dist/components/textarea.d.ts.map +1 -1
- package/dist/components/textarea.js +30 -0
- package/dist/components/toast.d.ts +0 -2
- package/dist/components/toast.d.ts.map +1 -1
- package/dist/components/toast.js +302 -0
- package/dist/components/toggle-group.d.ts +1 -1
- package/dist/components/toggle-group.d.ts.map +1 -1
- package/dist/components/toggle-group.js +48 -0
- package/dist/components/toggle.d.ts +1 -1
- package/dist/components/toggle.d.ts.map +1 -1
- package/dist/components/toggle.js +42 -0
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip.js +42 -0
- package/dist/{lib/workbench/theme.d.ts → components/workbench-theme.d.ts} +2 -2
- package/dist/components/workbench-theme.d.ts.map +1 -0
- package/dist/components/workbench-theme.js +34 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +24 -47
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +91 -20350
- package/dist/lib/container.d.ts.map +1 -1
- package/dist/lib/container.js +49 -0
- package/dist/lib/icon-shapes/chat.js +13 -0
- package/dist/lib/icon-shapes/pencilkit.js +20 -0
- package/dist/lib/icon-shapes/workbench.js +47 -0
- package/dist/lib/icon.d.ts +1 -1
- package/dist/lib/icon.d.ts.map +1 -1
- package/dist/lib/icon.js +1774 -0
- package/dist/lib/motion.d.ts +16 -0
- package/dist/lib/motion.d.ts.map +1 -1
- package/dist/lib/motion.js +104 -0
- package/dist/lib/{chat/persistent-host.d.ts → persistent-host.d.ts} +1 -1
- package/dist/lib/persistent-host.d.ts.map +1 -0
- package/dist/lib/persistent-host.js +41 -0
- package/dist/lib/primitives.js +8 -0
- package/dist/lib/qr.js +552 -0
- package/dist/lib/row-label.d.ts.map +1 -1
- package/dist/lib/row-label.js +10 -0
- package/dist/lib/sheet-drag.d.ts +1 -1
- package/dist/lib/sheet-drag.d.ts.map +1 -1
- package/dist/lib/sheet-drag.js +128 -0
- package/dist/lib/syntax.js +204 -0
- package/dist/lib/theme.d.ts +33 -8
- package/dist/lib/theme.d.ts.map +1 -1
- package/dist/lib/theme.js +138 -0
- package/dist/lib/tokens.generated.d.ts +16 -0
- package/dist/lib/tokens.generated.d.ts.map +1 -0
- package/dist/lib/tokens.generated.js +22 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +18 -0
- package/dist/theme.css +0 -60
- package/package.json +4 -7
- package/dist/components/adaptive-pane.stories.d.ts +0 -7
- package/dist/components/adaptive-pane.stories.d.ts.map +0 -1
- package/dist/components/avatar.stories.d.ts +0 -9
- package/dist/components/avatar.stories.d.ts.map +0 -1
- package/dist/components/badge.stories.d.ts +0 -9
- package/dist/components/badge.stories.d.ts.map +0 -1
- package/dist/components/button.stories.d.ts +0 -11
- package/dist/components/button.stories.d.ts.map +0 -1
- package/dist/components/card.stories.d.ts +0 -9
- package/dist/components/card.stories.d.ts.map +0 -1
- package/dist/components/chat/chat-column.d.ts.map +0 -1
- package/dist/components/chat/chat-column.stories.d.ts +0 -9
- package/dist/components/chat/chat-column.stories.d.ts.map +0 -1
- package/dist/components/chat/floating-chat.d.ts.map +0 -1
- package/dist/components/chat/floating-chat.stories.d.ts +0 -17
- package/dist/components/chat/floating-chat.stories.d.ts.map +0 -1
- package/dist/components/chat/floating-sheet.d.ts.map +0 -1
- package/dist/components/chat/floating-sheet.stories.d.ts +0 -22
- package/dist/components/chat/floating-sheet.stories.d.ts.map +0 -1
- package/dist/components/chat/progress-stepper.d.ts.map +0 -1
- package/dist/components/checkbox.stories.d.ts +0 -11
- package/dist/components/checkbox.stories.d.ts.map +0 -1
- package/dist/components/combobox.stories.d.ts +0 -10
- package/dist/components/combobox.stories.d.ts.map +0 -1
- package/dist/components/command-menu.stories.d.ts +0 -17
- package/dist/components/command-menu.stories.d.ts.map +0 -1
- package/dist/components/credenza.stories.d.ts +0 -8
- package/dist/components/credenza.stories.d.ts.map +0 -1
- package/dist/components/dialog.stories.d.ts +0 -12
- package/dist/components/dialog.stories.d.ts.map +0 -1
- package/dist/components/disclosure.stories.d.ts +0 -10
- package/dist/components/disclosure.stories.d.ts.map +0 -1
- package/dist/components/dropdown-menu.stories.d.ts +0 -11
- package/dist/components/dropdown-menu.stories.d.ts.map +0 -1
- package/dist/components/edge-drawer.stories.d.ts +0 -8
- package/dist/components/edge-drawer.stories.d.ts.map +0 -1
- package/dist/components/edit-bar.stories.d.ts +0 -10
- package/dist/components/edit-bar.stories.d.ts.map +0 -1
- package/dist/components/form.stories.d.ts +0 -9
- package/dist/components/form.stories.d.ts.map +0 -1
- package/dist/components/haptic-indicator.d.ts +0 -11
- package/dist/components/haptic-indicator.d.ts.map +0 -1
- package/dist/components/haptic-indicator.stories.d.ts +0 -8
- package/dist/components/haptic-indicator.stories.d.ts.map +0 -1
- package/dist/components/index-bar.stories.d.ts +0 -12
- package/dist/components/index-bar.stories.d.ts.map +0 -1
- package/dist/components/input.stories.d.ts +0 -10
- package/dist/components/input.stories.d.ts.map +0 -1
- package/dist/components/kbd.stories.d.ts +0 -9
- package/dist/components/kbd.stories.d.ts.map +0 -1
- package/dist/components/label.stories.d.ts +0 -8
- package/dist/components/label.stories.d.ts.map +0 -1
- package/dist/components/list-box.stories.d.ts +0 -9
- package/dist/components/list-box.stories.d.ts.map +0 -1
- package/dist/components/list-row.stories.d.ts +0 -24
- package/dist/components/list-row.stories.d.ts.map +0 -1
- package/dist/components/list.stories.d.ts +0 -27
- package/dist/components/list.stories.d.ts.map +0 -1
- package/dist/components/markdown-editor.stories.d.ts +0 -17
- package/dist/components/markdown-editor.stories.d.ts.map +0 -1
- package/dist/components/morph.stories.d.ts +0 -14
- package/dist/components/morph.stories.d.ts.map +0 -1
- package/dist/components/motion.stories.d.ts +0 -15
- package/dist/components/motion.stories.d.ts.map +0 -1
- package/dist/components/navigation-stack.stories.d.ts +0 -31
- package/dist/components/navigation-stack.stories.d.ts.map +0 -1
- package/dist/components/now-playing-bars.stories.d.ts +0 -12
- package/dist/components/now-playing-bars.stories.d.ts.map +0 -1
- package/dist/components/pencilkit/pencil-canvas.stories.d.ts +0 -18
- package/dist/components/pencilkit/pencil-canvas.stories.d.ts.map +0 -1
- package/dist/components/pencilkit/pencil-toolbar.stories.d.ts +0 -10
- package/dist/components/pencilkit/pencil-toolbar.stories.d.ts.map +0 -1
- package/dist/components/popover.stories.d.ts +0 -9
- package/dist/components/popover.stories.d.ts.map +0 -1
- package/dist/components/progress-ring.stories.d.ts +0 -15
- package/dist/components/progress-ring.stories.d.ts.map +0 -1
- package/dist/components/progress.stories.d.ts +0 -10
- package/dist/components/progress.stories.d.ts.map +0 -1
- package/dist/components/qr-svg.stories.d.ts +0 -16
- package/dist/components/qr-svg.stories.d.ts.map +0 -1
- package/dist/components/radio-group.stories.d.ts +0 -10
- package/dist/components/radio-group.stories.d.ts.map +0 -1
- package/dist/components/scroll-area.stories.d.ts +0 -8
- package/dist/components/scroll-area.stories.d.ts.map +0 -1
- package/dist/components/search-field.stories.d.ts +0 -10
- package/dist/components/search-field.stories.d.ts.map +0 -1
- package/dist/components/segmented.stories.d.ts +0 -8
- package/dist/components/segmented.stories.d.ts.map +0 -1
- package/dist/components/select.stories.d.ts +0 -12
- package/dist/components/select.stories.d.ts.map +0 -1
- package/dist/components/separator.stories.d.ts +0 -9
- package/dist/components/separator.stories.d.ts.map +0 -1
- package/dist/components/sheet.stories.d.ts +0 -12
- package/dist/components/sheet.stories.d.ts.map +0 -1
- package/dist/components/side-drawer.stories.d.ts +0 -8
- package/dist/components/side-drawer.stories.d.ts.map +0 -1
- package/dist/components/sidebar.stories.d.ts +0 -10
- package/dist/components/sidebar.stories.d.ts.map +0 -1
- package/dist/components/skeleton.stories.d.ts +0 -11
- package/dist/components/skeleton.stories.d.ts.map +0 -1
- package/dist/components/slider.stories.d.ts +0 -12
- package/dist/components/slider.stories.d.ts.map +0 -1
- package/dist/components/spinner.stories.d.ts +0 -9
- package/dist/components/spinner.stories.d.ts.map +0 -1
- package/dist/components/split-view.stories.d.ts +0 -58
- package/dist/components/split-view.stories.d.ts.map +0 -1
- package/dist/components/switch.stories.d.ts +0 -9
- package/dist/components/switch.stories.d.ts.map +0 -1
- package/dist/components/syntax-highlighting.stories.d.ts +0 -18
- package/dist/components/syntax-highlighting.stories.d.ts.map +0 -1
- package/dist/components/tab-bar.stories.d.ts +0 -8
- package/dist/components/tab-bar.stories.d.ts.map +0 -1
- package/dist/components/tab-view.stories.d.ts +0 -37
- package/dist/components/tab-view.stories.d.ts.map +0 -1
- package/dist/components/tabs.stories.d.ts +0 -9
- package/dist/components/tabs.stories.d.ts.map +0 -1
- package/dist/components/text-field.stories.d.ts +0 -9
- package/dist/components/text-field.stories.d.ts.map +0 -1
- package/dist/components/toast.stories.d.ts +0 -13
- package/dist/components/toast.stories.d.ts.map +0 -1
- package/dist/components/toggle-group.stories.d.ts +0 -10
- package/dist/components/toggle-group.stories.d.ts.map +0 -1
- package/dist/components/toggle.stories.d.ts +0 -9
- package/dist/components/toggle.stories.d.ts.map +0 -1
- package/dist/components/tooltip.stories.d.ts +0 -11
- package/dist/components/tooltip.stories.d.ts.map +0 -1
- package/dist/components/workbench/annotator.d.ts.map +0 -1
- package/dist/components/workbench/chat.d.ts.map +0 -1
- package/dist/components/workbench/chat.stories.d.ts +0 -13
- package/dist/components/workbench/chat.stories.d.ts.map +0 -1
- package/dist/components/workbench/composer-files.d.ts.map +0 -1
- package/dist/components/workbench/composer.d.ts.map +0 -1
- package/dist/components/workbench/composer.stories.d.ts +0 -35
- package/dist/components/workbench/composer.stories.d.ts.map +0 -1
- package/dist/components/workbench/fixtures.d.ts +0 -38
- package/dist/components/workbench/fixtures.d.ts.map +0 -1
- package/dist/components/workbench/markdown.d.ts.map +0 -1
- package/dist/components/workbench/message-scroller.d.ts.map +0 -1
- package/dist/components/workbench/message-scroller.stories.d.ts +0 -9
- package/dist/components/workbench/message-scroller.stories.d.ts.map +0 -1
- package/dist/components/workbench/model-picker.d.ts +0 -29
- package/dist/components/workbench/model-picker.d.ts.map +0 -1
- package/dist/components/workbench/models.d.ts +0 -32
- package/dist/components/workbench/models.d.ts.map +0 -1
- package/dist/components/workbench/snap-sheet.d.ts.map +0 -1
- package/dist/components/workbench/snap-sheet.stories.d.ts +0 -8
- package/dist/components/workbench/snap-sheet.stories.d.ts.map +0 -1
- package/dist/components/workbench/surfaces.d.ts +0 -67
- package/dist/components/workbench/surfaces.d.ts.map +0 -1
- package/dist/components/workbench/surfaces.stories.d.ts +0 -15
- package/dist/components/workbench/surfaces.stories.d.ts.map +0 -1
- package/dist/components/workbench/terminal.d.ts +0 -51
- package/dist/components/workbench/terminal.d.ts.map +0 -1
- package/dist/components/workbench/terminal.stories.d.ts +0 -8
- package/dist/components/workbench/terminal.stories.d.ts.map +0 -1
- package/dist/components/workbench/wb-popover.d.ts.map +0 -1
- package/dist/components/workbench/workbench-composer.d.ts +0 -26
- package/dist/components/workbench/workbench-composer.d.ts.map +0 -1
- package/dist/demos/delivery/delivery-tracking-demo.d.ts +0 -41
- package/dist/demos/delivery/delivery-tracking-demo.d.ts.map +0 -1
- package/dist/demos/delivery/delivery-tracking-demo.stories.d.ts +0 -13
- package/dist/demos/delivery/delivery-tracking-demo.stories.d.ts.map +0 -1
- package/dist/demos/haptics-playground.d.ts +0 -18
- package/dist/demos/haptics-playground.d.ts.map +0 -1
- package/dist/demos/haptics-playground.stories.d.ts +0 -8
- package/dist/demos/haptics-playground.stories.d.ts.map +0 -1
- package/dist/demos/map-chat/geo.d.ts +0 -46
- package/dist/demos/map-chat/geo.d.ts.map +0 -1
- package/dist/demos/map-chat/map-agent.d.ts +0 -48
- package/dist/demos/map-chat/map-agent.d.ts.map +0 -1
- package/dist/demos/map-chat/map-chat-demo.d.ts +0 -19
- package/dist/demos/map-chat/map-chat-demo.d.ts.map +0 -1
- package/dist/demos/map-chat/map-chat-demo.stories.d.ts +0 -16
- package/dist/demos/map-chat/map-chat-demo.stories.d.ts.map +0 -1
- package/dist/demos/map-chat/map-icons.d.ts +0 -44
- package/dist/demos/map-chat/map-icons.d.ts.map +0 -1
- package/dist/demos/map-chat/places.d.ts +0 -29
- package/dist/demos/map-chat/places.d.ts.map +0 -1
- package/dist/demos/map-chat/tile-map.d.ts +0 -108
- package/dist/demos/map-chat/tile-map.d.ts.map +0 -1
- package/dist/demos/pencilkit/demo-strokes.d.ts +0 -4
- package/dist/demos/pencilkit/demo-strokes.d.ts.map +0 -1
- package/dist/demos/pencilkit/pencilkit-demo.d.ts +0 -17
- package/dist/demos/pencilkit/pencilkit-demo.d.ts.map +0 -1
- package/dist/demos/pencilkit/pencilkit-demo.stories.d.ts +0 -11
- package/dist/demos/pencilkit/pencilkit-demo.stories.d.ts.map +0 -1
- package/dist/demos/sidebar-demo.d.ts +0 -6
- package/dist/demos/sidebar-demo.d.ts.map +0 -1
- package/dist/demos/split-view-demos.d.ts +0 -50
- package/dist/demos/split-view-demos.d.ts.map +0 -1
- package/dist/lib/chat/chat-shell-context.d.ts +0 -20
- package/dist/lib/chat/chat-shell-context.d.ts.map +0 -1
- package/dist/lib/chat/persistent-host.d.ts.map +0 -1
- package/dist/lib/haptics.d.ts +0 -27
- package/dist/lib/haptics.d.ts.map +0 -1
- package/dist/lib/icon.stories.d.ts +0 -15
- package/dist/lib/icon.stories.d.ts.map +0 -1
- package/dist/lib/pencilkit/constants.d.ts.map +0 -1
- package/dist/lib/workbench/haptics.d.ts +0 -3
- package/dist/lib/workbench/haptics.d.ts.map +0 -1
- package/dist/lib/workbench/icons.d.ts.map +0 -1
- package/dist/lib/workbench/motion.d.ts +0 -19
- package/dist/lib/workbench/motion.d.ts.map +0 -1
- package/dist/lib/workbench/press.d.ts +0 -10
- package/dist/lib/workbench/press.d.ts.map +0 -1
- package/dist/lib/workbench/theme.d.ts.map +0 -1
- package/dist/lib/workbench/util.d.ts +0 -8
- package/dist/lib/workbench/util.d.ts.map +0 -1
- package/dist/stories/frame.d.ts +0 -16
- package/dist/stories/frame.d.ts.map +0 -1
- package/dist/stories/primitive-frame.d.ts +0 -20
- package/dist/stories/primitive-frame.d.ts.map +0 -1
- package/dist/templates/artifact-chat-container.d.ts.map +0 -1
- package/dist/templates/artifact-chat-container.stories.d.ts +0 -24
- package/dist/templates/artifact-chat-container.stories.d.ts.map +0 -1
- package/dist/templates/chat-shell.d.ts +0 -87
- package/dist/templates/chat-shell.d.ts.map +0 -1
- package/dist/templates/workbench-shell.d.ts +0 -177
- package/dist/templates/workbench-shell.d.ts.map +0 -1
- package/dist/templates/workbench-shell.stories.d.ts +0 -17
- package/dist/templates/workbench-shell.stories.d.ts.map +0 -1
- /package/dist/components/{chat/chat-column.d.ts → chat-column.d.ts} +0 -0
- /package/dist/components/{workbench → composer}/annotator.d.ts +0 -0
- /package/dist/components/{workbench → composer}/composer-files.d.ts +0 -0
- /package/dist/components/{workbench/message-scroller.d.ts → message-scroller.d.ts} +0 -0
- /package/dist/{lib → components}/pencilkit/constants.d.ts +0 -0
- /package/dist/components/{chat/progress-stepper.d.ts → progress-stepper.d.ts} +0 -0
- /package/dist/components/{workbench/snap-sheet.d.ts → snap-sheet.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IconName } from '
|
|
1
|
+
import { IconName } from '../lib/icon';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
type Div = {
|
|
4
4
|
className?: string;
|
|
@@ -96,4 +96,4 @@ export interface SettledBannerProps {
|
|
|
96
96
|
/** Above the composer of a settled thread; sending (or Un-settle) moves it back to Active. */
|
|
97
97
|
export declare function SettledBanner({ onUnsettle, title, description, className, style, }: SettledBannerProps): import("react/jsx-runtime").JSX.Element;
|
|
98
98
|
export {};
|
|
99
|
-
//# sourceMappingURL=
|
|
99
|
+
//# sourceMappingURL=conversation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/components/conversation.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e, pressable as t } from "../lib/utils.js";
|
|
3
|
+
import { prefersReducedMotion as n, springs as r } from "../lib/motion.js";
|
|
4
|
+
import { Icon as i } from "../lib/icon.js";
|
|
5
|
+
import { PlainButton as a } from "./plain-button.js";
|
|
6
|
+
import { MarkdownView as o } from "./markdown-view.js";
|
|
7
|
+
import { MessageScroller as s } from "./message-scroller.js";
|
|
8
|
+
import { AnimatePresence as c, animate as l, motion as u } from "framer-motion";
|
|
9
|
+
import * as d from "react";
|
|
10
|
+
import { useState as f } from "react";
|
|
11
|
+
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
12
|
+
//#region src/components/conversation.tsx
|
|
13
|
+
var g = d.createContext({ empty: !1 });
|
|
14
|
+
function _({ empty: t = !1, className: n, style: r, children: i }) {
|
|
15
|
+
return /* @__PURE__ */ m(g.Provider, {
|
|
16
|
+
value: { empty: t },
|
|
17
|
+
children: /* @__PURE__ */ m("div", {
|
|
18
|
+
"data-slot": "conversation",
|
|
19
|
+
"data-empty": t || void 0,
|
|
20
|
+
className: e("relative flex min-h-0 flex-1 flex-col", t && "wb-scroll overflow-y-auto px-5 py-7", n),
|
|
21
|
+
style: r,
|
|
22
|
+
children: i
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function v({ className: t, children: n }) {
|
|
27
|
+
let { empty: i } = d.useContext(g);
|
|
28
|
+
return /* @__PURE__ */ m("div", {
|
|
29
|
+
"data-slot": "conversation-empty",
|
|
30
|
+
className: e("relative flex min-h-0 flex-col justify-end", i ? "flex-1" : "flex-none"),
|
|
31
|
+
children: /* @__PURE__ */ m(c, {
|
|
32
|
+
mode: "popLayout",
|
|
33
|
+
initial: !1,
|
|
34
|
+
children: i ? /* @__PURE__ */ m(u.div, {
|
|
35
|
+
className: e("mx-auto w-full max-w-[620px]", t),
|
|
36
|
+
initial: {
|
|
37
|
+
opacity: 0,
|
|
38
|
+
y: -12
|
|
39
|
+
},
|
|
40
|
+
animate: {
|
|
41
|
+
opacity: 1,
|
|
42
|
+
y: 0
|
|
43
|
+
},
|
|
44
|
+
exit: {
|
|
45
|
+
opacity: 0,
|
|
46
|
+
y: -24,
|
|
47
|
+
scale: .97,
|
|
48
|
+
filter: "blur(4px)"
|
|
49
|
+
},
|
|
50
|
+
transition: r.smooth,
|
|
51
|
+
children: n
|
|
52
|
+
}, "empty") : null
|
|
53
|
+
})
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function y({ title: t, description: n, icon: r, className: a }) {
|
|
57
|
+
return /* @__PURE__ */ h("div", {
|
|
58
|
+
"data-slot": "conversation-greeting",
|
|
59
|
+
className: e("mb-[18px] text-center", a),
|
|
60
|
+
children: [
|
|
61
|
+
r ?? /* @__PURE__ */ m("span", {
|
|
62
|
+
className: e("bg-[linear-gradient(135deg,var(--primary),#5E5CE6)]", "inline-grid size-10 place-items-center rounded-[11px]"),
|
|
63
|
+
children: /* @__PURE__ */ m(i, {
|
|
64
|
+
name: "asterisk",
|
|
65
|
+
size: 21,
|
|
66
|
+
sw: 2.1,
|
|
67
|
+
className: "text-white"
|
|
68
|
+
})
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ m("div", {
|
|
71
|
+
className: "mt-3 text-[21px] font-bold tracking-[-.3px]",
|
|
72
|
+
children: t
|
|
73
|
+
}),
|
|
74
|
+
n == null ? null : /* @__PURE__ */ m("div", {
|
|
75
|
+
className: "mt-1 text-[13.5px] text-muted-foreground",
|
|
76
|
+
children: n
|
|
77
|
+
})
|
|
78
|
+
]
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function b({ threadKey: t, streaming: n, peek: r, children: i }) {
|
|
82
|
+
let { empty: a } = d.useContext(g), o = [];
|
|
83
|
+
return d.Children.forEach(i, (e) => {
|
|
84
|
+
if (!d.isValidElement(e)) return;
|
|
85
|
+
let t = e.props;
|
|
86
|
+
o.push({
|
|
87
|
+
id: String(e.key),
|
|
88
|
+
anchor: t.anchor ?? e.type === w,
|
|
89
|
+
node: e
|
|
90
|
+
});
|
|
91
|
+
}), /* @__PURE__ */ m("div", {
|
|
92
|
+
"data-slot": "conversation-messages",
|
|
93
|
+
className: e("relative flex min-h-0 flex-col", a ? "flex-none" : "flex-1"),
|
|
94
|
+
children: /* @__PURE__ */ m(c, {
|
|
95
|
+
mode: "popLayout",
|
|
96
|
+
initial: !1,
|
|
97
|
+
children: a ? null : /* @__PURE__ */ m(u.div, {
|
|
98
|
+
className: "flex min-h-0 flex-1 flex-col",
|
|
99
|
+
initial: { opacity: 0 },
|
|
100
|
+
animate: { opacity: 1 },
|
|
101
|
+
transition: { duration: .2 },
|
|
102
|
+
children: /* @__PURE__ */ m(s, {
|
|
103
|
+
items: o,
|
|
104
|
+
streaming: n,
|
|
105
|
+
threadKey: t,
|
|
106
|
+
peek: r
|
|
107
|
+
})
|
|
108
|
+
}, "thread")
|
|
109
|
+
})
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function x({ className: t, style: i, children: a }) {
|
|
113
|
+
let { empty: o } = d.useContext(g), s = d.useRef(null), c = d.useRef(null), u = d.useRef(o);
|
|
114
|
+
return u.current !== o && !c.current && s.current && (c.current = s.current.getBoundingClientRect()), d.useLayoutEffect(() => {
|
|
115
|
+
u.current = o;
|
|
116
|
+
let e = c.current;
|
|
117
|
+
c.current = null;
|
|
118
|
+
let t = s.current;
|
|
119
|
+
if (!e || !t || n()) return;
|
|
120
|
+
let i = t.getBoundingClientRect();
|
|
121
|
+
l(t, {
|
|
122
|
+
x: [e.left - i.left, 0],
|
|
123
|
+
y: [e.top - i.top, 0],
|
|
124
|
+
width: [e.width, i.width]
|
|
125
|
+
}, {
|
|
126
|
+
...r.smooth,
|
|
127
|
+
onComplete: () => (t.style.width = "", t.style.transform = "")
|
|
128
|
+
});
|
|
129
|
+
}, [o]), /* @__PURE__ */ m("div", {
|
|
130
|
+
ref: s,
|
|
131
|
+
"data-slot": "conversation-composer",
|
|
132
|
+
className: e("mx-auto box-border w-full shrink-0", o ? "max-w-[620px]" : "max-w-[780px] px-[22px] pt-2 pb-3.5", t),
|
|
133
|
+
style: i,
|
|
134
|
+
children: a
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function S({ className: t, children: n }) {
|
|
138
|
+
let { empty: i } = d.useContext(g);
|
|
139
|
+
return /* @__PURE__ */ m("div", {
|
|
140
|
+
"data-slot": "conversation-suggestions",
|
|
141
|
+
className: e("relative min-h-0", i ? "flex-1" : "flex-none"),
|
|
142
|
+
children: /* @__PURE__ */ m(c, {
|
|
143
|
+
mode: "popLayout",
|
|
144
|
+
initial: !1,
|
|
145
|
+
children: i ? /* @__PURE__ */ m(u.div, {
|
|
146
|
+
className: e("mx-auto mt-3.5 flex w-full max-w-[620px] flex-wrap justify-center gap-[7px]", t),
|
|
147
|
+
initial: {
|
|
148
|
+
opacity: 0,
|
|
149
|
+
y: 8
|
|
150
|
+
},
|
|
151
|
+
animate: {
|
|
152
|
+
opacity: 1,
|
|
153
|
+
y: 0
|
|
154
|
+
},
|
|
155
|
+
exit: {
|
|
156
|
+
opacity: 0,
|
|
157
|
+
y: 12
|
|
158
|
+
},
|
|
159
|
+
transition: r.snappy,
|
|
160
|
+
children: n
|
|
161
|
+
}, "suggestions") : null
|
|
162
|
+
})
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
function C({ onPress: n, className: r, children: i }) {
|
|
166
|
+
return /* @__PURE__ */ m(a, {
|
|
167
|
+
"data-slot": "suggestion",
|
|
168
|
+
className: e(t, "cursor-pointer rounded-[99px] border border-border bg-transparent px-[13px] py-1.5 text-[12.5px] text-muted-foreground hover:bg-secondary!", r),
|
|
169
|
+
onPress: () => {
|
|
170
|
+
n?.();
|
|
171
|
+
},
|
|
172
|
+
children: i
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
function w({ images: t, className: n, children: r }) {
|
|
176
|
+
return /* @__PURE__ */ m("div", {
|
|
177
|
+
"data-slot": "user-message",
|
|
178
|
+
className: e("my-2.5 flex justify-end", n),
|
|
179
|
+
children: /* @__PURE__ */ h("div", {
|
|
180
|
+
className: "grid max-w-[78%] justify-items-end gap-1.5",
|
|
181
|
+
children: [t && t.length ? /* @__PURE__ */ m("div", {
|
|
182
|
+
className: "flex flex-wrap justify-end gap-1.5",
|
|
183
|
+
children: t.map((e, t) => /* @__PURE__ */ m("img", {
|
|
184
|
+
src: e,
|
|
185
|
+
alt: "attachment",
|
|
186
|
+
className: "h-[110px] max-w-[210px] rounded-xl border border-border object-cover"
|
|
187
|
+
}, t))
|
|
188
|
+
}) : null, r != null && r !== "" ? /* @__PURE__ */ m("div", {
|
|
189
|
+
className: "rounded-[14px_14px_4px_14px] bg-secondary-strong px-[13px] py-[9px] text-detail leading-[1.5] whitespace-pre-wrap",
|
|
190
|
+
children: r
|
|
191
|
+
}) : null]
|
|
192
|
+
})
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
function T({ className: t, children: n }) {
|
|
196
|
+
return /* @__PURE__ */ m("div", {
|
|
197
|
+
"data-slot": "assistant-message",
|
|
198
|
+
className: e("mt-1 mb-3.5", t),
|
|
199
|
+
children: n
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
var E = [
|
|
203
|
+
"animate-[wbPulse_1s_0s_infinite]",
|
|
204
|
+
"animate-[wbPulse_1s_0.18s_infinite]",
|
|
205
|
+
"animate-[wbPulse_1s_0.36s_infinite]"
|
|
206
|
+
];
|
|
207
|
+
function D({ className: t }) {
|
|
208
|
+
return /* @__PURE__ */ m("div", {
|
|
209
|
+
"data-slot": "typing-indicator",
|
|
210
|
+
role: "status",
|
|
211
|
+
"aria-label": "Thinking",
|
|
212
|
+
className: e("flex gap-[5px] py-1.5", t),
|
|
213
|
+
children: E.map((t, n) => /* @__PURE__ */ m("span", { className: e("size-1.5 rounded-[50%] bg-tertiary-foreground motion-reduce:animate-none", t) }, n))
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
function O({ markdown: e = "", streaming: t }) {
|
|
217
|
+
return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(o, {
|
|
218
|
+
markdown: e,
|
|
219
|
+
streaming: t
|
|
220
|
+
}), t && !e ? /* @__PURE__ */ m(D, {}) : null] });
|
|
221
|
+
}
|
|
222
|
+
function k({ summary: n, defaultOpen: o = !1, children: s, className: l }) {
|
|
223
|
+
let [p, g] = f(o), _ = d.Children.count(s) > 0, v = "flex items-center gap-[5px] text-caption text-tertiary-foreground", y = /* @__PURE__ */ m(u.span, {
|
|
224
|
+
className: "grid",
|
|
225
|
+
animate: { rotate: p ? 90 : 0 },
|
|
226
|
+
transition: r.snappy,
|
|
227
|
+
children: /* @__PURE__ */ m(i, {
|
|
228
|
+
name: "chevron-right-wide",
|
|
229
|
+
size: 11,
|
|
230
|
+
sw: 2.4
|
|
231
|
+
})
|
|
232
|
+
});
|
|
233
|
+
return /* @__PURE__ */ h("div", {
|
|
234
|
+
"data-slot": "work-log",
|
|
235
|
+
"data-open": p || void 0,
|
|
236
|
+
className: e("mt-0.5 mb-1.5", l),
|
|
237
|
+
children: [_ ? /* @__PURE__ */ h(a, {
|
|
238
|
+
"aria-expanded": p,
|
|
239
|
+
className: e(v, t, "cursor-pointer border-0 bg-transparent p-0 leading-[inherit]"),
|
|
240
|
+
onPress: () => {
|
|
241
|
+
g(!p);
|
|
242
|
+
},
|
|
243
|
+
children: [
|
|
244
|
+
/* @__PURE__ */ m(i, {
|
|
245
|
+
name: "clock-dial",
|
|
246
|
+
size: 12.5,
|
|
247
|
+
sw: 2
|
|
248
|
+
}),
|
|
249
|
+
n,
|
|
250
|
+
y
|
|
251
|
+
]
|
|
252
|
+
}) : /* @__PURE__ */ h("div", {
|
|
253
|
+
className: v,
|
|
254
|
+
children: [
|
|
255
|
+
/* @__PURE__ */ m(i, {
|
|
256
|
+
name: "clock-dial",
|
|
257
|
+
size: 12.5,
|
|
258
|
+
sw: 2
|
|
259
|
+
}),
|
|
260
|
+
n,
|
|
261
|
+
/* @__PURE__ */ m(i, {
|
|
262
|
+
name: "chevron-right-wide",
|
|
263
|
+
size: 11,
|
|
264
|
+
sw: 2.4
|
|
265
|
+
})
|
|
266
|
+
]
|
|
267
|
+
}), /* @__PURE__ */ m(c, {
|
|
268
|
+
initial: !1,
|
|
269
|
+
children: p && _ ? /* @__PURE__ */ m(u.div, {
|
|
270
|
+
initial: {
|
|
271
|
+
height: 0,
|
|
272
|
+
opacity: 0
|
|
273
|
+
},
|
|
274
|
+
animate: {
|
|
275
|
+
height: "auto",
|
|
276
|
+
opacity: 1
|
|
277
|
+
},
|
|
278
|
+
exit: {
|
|
279
|
+
height: 0,
|
|
280
|
+
opacity: 0
|
|
281
|
+
},
|
|
282
|
+
transition: r.smooth,
|
|
283
|
+
className: "overflow-hidden",
|
|
284
|
+
children: /* @__PURE__ */ m("div", {
|
|
285
|
+
className: "mt-1.5 mb-1 ml-[5px] grid gap-1.5 border-l border-border pl-3",
|
|
286
|
+
children: s
|
|
287
|
+
})
|
|
288
|
+
}, "calls") : null
|
|
289
|
+
})]
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
function A({ icon: t = "checkmark", title: n, detail: r, code: a, status: o = "done", className: s }) {
|
|
293
|
+
return /* @__PURE__ */ h("div", {
|
|
294
|
+
"data-slot": "tool-call",
|
|
295
|
+
"data-status": o,
|
|
296
|
+
className: e("grid gap-1 text-[12.5px] text-muted-foreground", s),
|
|
297
|
+
children: [/* @__PURE__ */ h("div", {
|
|
298
|
+
className: "flex min-w-0 items-center gap-2",
|
|
299
|
+
children: [
|
|
300
|
+
o === "running" ? /* @__PURE__ */ m("span", {
|
|
301
|
+
className: "grid size-[13px] shrink-0 place-items-center",
|
|
302
|
+
children: /* @__PURE__ */ m("span", { className: "size-[7px] animate-[wbPulse_1.2s_infinite] rounded-full bg-primary motion-reduce:animate-none" })
|
|
303
|
+
}) : /* @__PURE__ */ m(i, {
|
|
304
|
+
name: o === "error" ? "xmark-large" : t,
|
|
305
|
+
size: 13,
|
|
306
|
+
sw: 2,
|
|
307
|
+
className: o === "error" ? "text-destructive" : "text-tertiary-foreground"
|
|
308
|
+
}),
|
|
309
|
+
/* @__PURE__ */ m("span", {
|
|
310
|
+
className: "min-w-0 truncate",
|
|
311
|
+
children: n
|
|
312
|
+
}),
|
|
313
|
+
r == null ? null : /* @__PURE__ */ m("span", {
|
|
314
|
+
className: "min-w-0 truncate text-[11.5px] text-tertiary-foreground",
|
|
315
|
+
children: r
|
|
316
|
+
})
|
|
317
|
+
]
|
|
318
|
+
}), a ? /* @__PURE__ */ m("pre", {
|
|
319
|
+
className: "wb-scroll m-0 overflow-x-auto rounded-lg bg-muted px-2.5 py-2 font-mono text-[11.5px] leading-[1.55] text-muted-foreground",
|
|
320
|
+
children: a
|
|
321
|
+
}) : null]
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
function j({ onUnsettle: n, title: r = "This thread is settled", description: o = "Sending a message moves it back to Active in the sidebar.", className: s, style: c }) {
|
|
325
|
+
return /* @__PURE__ */ h("div", {
|
|
326
|
+
"data-slot": "settled-banner",
|
|
327
|
+
className: e("mb-2.5 flex items-center gap-[11px] rounded-xl border border-border bg-card px-3 py-2.5", s),
|
|
328
|
+
style: c,
|
|
329
|
+
children: [
|
|
330
|
+
/* @__PURE__ */ m(i, {
|
|
331
|
+
name: "checkmark-circle",
|
|
332
|
+
size: 20,
|
|
333
|
+
sw: 1.8,
|
|
334
|
+
className: "text-success"
|
|
335
|
+
}),
|
|
336
|
+
/* @__PURE__ */ h("div", {
|
|
337
|
+
className: "min-w-0 flex-1",
|
|
338
|
+
children: [/* @__PURE__ */ m("div", {
|
|
339
|
+
className: "text-footnote font-[650]",
|
|
340
|
+
children: r
|
|
341
|
+
}), /* @__PURE__ */ m("div", {
|
|
342
|
+
className: "mt-px text-caption text-muted-foreground",
|
|
343
|
+
children: o
|
|
344
|
+
})]
|
|
345
|
+
}),
|
|
346
|
+
/* @__PURE__ */ m(a, {
|
|
347
|
+
className: e(t, "shrink-0 cursor-pointer rounded-lg border border-border bg-transparent px-3 py-1.5 text-[12.5px] font-semibold text-foreground hover:bg-secondary!"),
|
|
348
|
+
onPress: () => {
|
|
349
|
+
n();
|
|
350
|
+
},
|
|
351
|
+
children: "Un-settle"
|
|
352
|
+
})
|
|
353
|
+
]
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
//#endregion
|
|
357
|
+
export { T as AssistantMessage, _ as Conversation, x as ConversationComposer, v as ConversationEmpty, y as ConversationGreeting, b as ConversationMessages, S as ConversationSuggestions, D as ConversationTyping, O as MessageMarkdown, j as SettledBanner, C as Suggestion, A as ToolCall, w as UserMessage, k as WorkLog };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credenza.d.ts","sourceRoot":"","sources":["../../src/components/credenza.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"credenza.d.ts","sourceRoot":"","sources":["../../src/components/credenza.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsC,KAAK,aAAa,EAA4C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIzI,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,mFAAmF;AACnF,eAAO,MAAM,gBAAgB;;8EAW5B,CAAC;AAoBF,MAAM,WAAW,aAAc,SAAQ,YAAY,CAAC,OAAO,gBAAgB,CAAC;IAC1E,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2FAA2F;IAC3F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,aAAa,2CA4I3H"}
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { fades as t, springs as n, useMotion as r } from "../lib/motion.js";
|
|
4
|
+
import { Icon as i } from "../lib/icon.js";
|
|
5
|
+
import { MeasureH as a } from "./measure-h.js";
|
|
6
|
+
import { useEffect as o, useId as s, useRef as c, useState as l } from "react";
|
|
7
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
8
|
+
import { Button as f } from "react-aria-components";
|
|
9
|
+
import { cva as p } from "class-variance-authority";
|
|
10
|
+
//#region src/components/credenza.tsx
|
|
11
|
+
var m = p("z-401 box-border overflow-hidden bg-card text-foreground shadow-[0_24px_80px_--alpha(black/34%),0_0_0_1px_var(--border)] outline-none", {
|
|
12
|
+
variants: { compact: {
|
|
13
|
+
true: "absolute inset-x-2.5 bottom-2.5 touch-none rounded-[28px]",
|
|
14
|
+
false: "absolute top-1/2 left-1/2 w-[400px] max-w-[calc(100%-44px)] rounded-[24px]"
|
|
15
|
+
} },
|
|
16
|
+
defaultVariants: { compact: !1 }
|
|
17
|
+
}), h = "a[href],button:not([disabled]),input:not([disabled]):not([type=\"hidden\"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"]),[contenteditable=\"true\"]", g = [];
|
|
18
|
+
function _(e) {
|
|
19
|
+
return [...e.querySelectorAll(h)].filter((e) => e.getClientRects().length > 0 && !e.closest("[inert],[aria-hidden=\"true\"]"));
|
|
20
|
+
}
|
|
21
|
+
function v({ open: p, onClose: h, onBack: v, canBack: y, view: b, title: x, compact: S, children: C, className: w, style: T }) {
|
|
22
|
+
let E = r(), [D, O] = l(null), k = E.useReducedMotion(), A = c([String(b)]), j = c({
|
|
23
|
+
view: String(b),
|
|
24
|
+
dir: 0
|
|
25
|
+
});
|
|
26
|
+
if (j.current.view !== String(b)) {
|
|
27
|
+
let e = String(b), t = A.current.indexOf(e);
|
|
28
|
+
t >= 0 ? (A.current = A.current.slice(0, t + 1), j.current = {
|
|
29
|
+
view: e,
|
|
30
|
+
dir: -1
|
|
31
|
+
}) : (A.current = [...A.current, e], j.current = {
|
|
32
|
+
view: e,
|
|
33
|
+
dir: 1
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
let M = k ? 0 : j.current.dir, N = c(h);
|
|
37
|
+
N.current = h;
|
|
38
|
+
let P = c(null), F = s(), I = c(!p);
|
|
39
|
+
o(() => {
|
|
40
|
+
if (!p) {
|
|
41
|
+
I.current = !0;
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
let e = {};
|
|
45
|
+
g.push(e);
|
|
46
|
+
let t = () => g[g.length - 1] === e, n = document.activeElement, r = () => P.current?.parentElement ?? null, i = (e) => !(e instanceof Node) || e === document.body || e === document.documentElement || e === document, a = (e) => e instanceof Node && !!P.current?.contains(e), o = () => {
|
|
47
|
+
let e = P.current;
|
|
48
|
+
e && (e.querySelector("[data-autofocus]") ?? e).focus({ preventScroll: !0 });
|
|
49
|
+
}, s = new MutationObserver(() => {
|
|
50
|
+
t() && i(document.activeElement) && P.current?.isConnected && o();
|
|
51
|
+
}), c = !1, l = requestAnimationFrame(() => {
|
|
52
|
+
c = I.current || !!(n && r()?.contains(n)), c && o(), c && P.current && s.observe(P.current, {
|
|
53
|
+
childList: !0,
|
|
54
|
+
subtree: !0
|
|
55
|
+
});
|
|
56
|
+
}), u = (e) => {
|
|
57
|
+
t() && !a(e.target) && e.target instanceof Node && r()?.contains(e.target) && o();
|
|
58
|
+
}, d = (e) => {
|
|
59
|
+
!t() || e.defaultPrevented || a(e.target) || !(i(e.target) || e.target instanceof Node && r()?.contains(e.target)) || (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), N.current()) : e.key === "Tab" && (e.preventDefault(), o()));
|
|
60
|
+
};
|
|
61
|
+
return document.addEventListener("focusin", u), window.addEventListener("keydown", d), () => {
|
|
62
|
+
cancelAnimationFrame(l), s.disconnect(), g.splice(g.indexOf(e), 1), document.removeEventListener("focusin", u), window.removeEventListener("keydown", d);
|
|
63
|
+
let t = document.activeElement;
|
|
64
|
+
n?.isConnected && !a(n) && (i(t) || a(t)) && n.focus({ preventScroll: !0 });
|
|
65
|
+
};
|
|
66
|
+
}, [p]);
|
|
67
|
+
let L = {
|
|
68
|
+
ref: P,
|
|
69
|
+
role: "dialog",
|
|
70
|
+
"aria-modal": !0,
|
|
71
|
+
"aria-labelledby": F,
|
|
72
|
+
tabIndex: -1,
|
|
73
|
+
onKeyDown: (e) => {
|
|
74
|
+
if (e.defaultPrevented) return;
|
|
75
|
+
if (e.key === "Escape") {
|
|
76
|
+
e.preventDefault(), e.stopPropagation(), N.current();
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (e.key !== "Tab") return;
|
|
80
|
+
let t = _(e.currentTarget);
|
|
81
|
+
if (!t.length) {
|
|
82
|
+
e.preventDefault();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
let n = t[0], r = t[t.length - 1], i = document.activeElement;
|
|
86
|
+
e.shiftKey && (i === n || i === e.currentTarget) ? (e.preventDefault(), r.focus()) : !e.shiftKey && i === r && (e.preventDefault(), n.focus());
|
|
87
|
+
}
|
|
88
|
+
}, R = (e, t, n) => /* @__PURE__ */ u(f, {
|
|
89
|
+
onPress: t,
|
|
90
|
+
"aria-label": n,
|
|
91
|
+
className: "bl-btn grid size-[30px] shrink-0 cursor-pointer place-items-center rounded-full border-0 bg-secondary p-0 text-muted-foreground",
|
|
92
|
+
children: /* @__PURE__ */ u(i, {
|
|
93
|
+
name: e,
|
|
94
|
+
size: 15,
|
|
95
|
+
sw: 2.6
|
|
96
|
+
})
|
|
97
|
+
}), z = E.motion, B = E.AnimatePresence, V = k ? { duration: 0 } : n.tray, H = /* @__PURE__ */ d("div", {
|
|
98
|
+
className: "relative z-2 flex items-center gap-2.5 px-[14px] pt-[14px] pb-1.5",
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ u(B, {
|
|
101
|
+
initial: !1,
|
|
102
|
+
children: y ? /* @__PURE__ */ u(z.div, {
|
|
103
|
+
initial: {
|
|
104
|
+
opacity: 0,
|
|
105
|
+
scale: .4,
|
|
106
|
+
width: 0,
|
|
107
|
+
marginRight: -10
|
|
108
|
+
},
|
|
109
|
+
animate: {
|
|
110
|
+
opacity: 1,
|
|
111
|
+
scale: 1,
|
|
112
|
+
width: 30,
|
|
113
|
+
marginRight: 0
|
|
114
|
+
},
|
|
115
|
+
exit: {
|
|
116
|
+
opacity: 0,
|
|
117
|
+
scale: .4,
|
|
118
|
+
width: 0,
|
|
119
|
+
marginRight: -10,
|
|
120
|
+
transition: {
|
|
121
|
+
...n.snappy,
|
|
122
|
+
opacity: t.out
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
transition: {
|
|
126
|
+
default: n.snappy,
|
|
127
|
+
opacity: t.in
|
|
128
|
+
},
|
|
129
|
+
className: "grid shrink-0 place-items-center overflow-hidden",
|
|
130
|
+
children: R("chevL", v, "Back")
|
|
131
|
+
}, "bk") : null
|
|
132
|
+
}),
|
|
133
|
+
/* @__PURE__ */ u("div", {
|
|
134
|
+
id: F,
|
|
135
|
+
className: "relative h-[26px] min-w-0 flex-1",
|
|
136
|
+
children: /* @__PURE__ */ u(B, {
|
|
137
|
+
initial: !1,
|
|
138
|
+
custom: M,
|
|
139
|
+
children: /* @__PURE__ */ u(z.div, {
|
|
140
|
+
custom: M,
|
|
141
|
+
variants: {
|
|
142
|
+
enter: (e) => ({
|
|
143
|
+
opacity: 0,
|
|
144
|
+
x: e * 18,
|
|
145
|
+
filter: "blur(3px)"
|
|
146
|
+
}),
|
|
147
|
+
center: {
|
|
148
|
+
opacity: 1,
|
|
149
|
+
x: 0,
|
|
150
|
+
filter: "blur(0px)"
|
|
151
|
+
},
|
|
152
|
+
exit: (e) => ({
|
|
153
|
+
opacity: 0,
|
|
154
|
+
x: e * -18,
|
|
155
|
+
filter: "blur(3px)",
|
|
156
|
+
transition: {
|
|
157
|
+
...t.out,
|
|
158
|
+
x: n.snappy
|
|
159
|
+
}
|
|
160
|
+
})
|
|
161
|
+
},
|
|
162
|
+
initial: "enter",
|
|
163
|
+
animate: "center",
|
|
164
|
+
exit: "exit",
|
|
165
|
+
transition: {
|
|
166
|
+
default: t.in,
|
|
167
|
+
x: n.snappy
|
|
168
|
+
},
|
|
169
|
+
className: "absolute top-0 left-0 text-[18px] leading-[26px] font-bold tracking-[-.2px] whitespace-nowrap",
|
|
170
|
+
children: x
|
|
171
|
+
}, String(x))
|
|
172
|
+
})
|
|
173
|
+
}),
|
|
174
|
+
R("x", h, "Close")
|
|
175
|
+
]
|
|
176
|
+
}), U = /* @__PURE__ */ u(z.div, {
|
|
177
|
+
initial: !1,
|
|
178
|
+
animate: D == null ? {} : { height: D },
|
|
179
|
+
transition: V,
|
|
180
|
+
className: "relative overflow-hidden",
|
|
181
|
+
children: /* @__PURE__ */ u(B, {
|
|
182
|
+
initial: !1,
|
|
183
|
+
mode: "popLayout",
|
|
184
|
+
custom: M,
|
|
185
|
+
children: /* @__PURE__ */ u(z.div, {
|
|
186
|
+
custom: M,
|
|
187
|
+
variants: {
|
|
188
|
+
enter: (e) => ({
|
|
189
|
+
opacity: 0,
|
|
190
|
+
x: e * 40,
|
|
191
|
+
scale: e ? 1 : .97,
|
|
192
|
+
filter: "blur(6px)"
|
|
193
|
+
}),
|
|
194
|
+
center: {
|
|
195
|
+
opacity: 1,
|
|
196
|
+
x: 0,
|
|
197
|
+
scale: 1,
|
|
198
|
+
filter: "blur(0px)"
|
|
199
|
+
},
|
|
200
|
+
exit: (e) => ({
|
|
201
|
+
opacity: 0,
|
|
202
|
+
x: e * -40,
|
|
203
|
+
scale: e ? 1 : .97,
|
|
204
|
+
filter: "blur(6px)",
|
|
205
|
+
transition: {
|
|
206
|
+
...t.out,
|
|
207
|
+
x: n.smooth
|
|
208
|
+
}
|
|
209
|
+
})
|
|
210
|
+
},
|
|
211
|
+
initial: "enter",
|
|
212
|
+
animate: "center",
|
|
213
|
+
exit: "exit",
|
|
214
|
+
transition: {
|
|
215
|
+
default: t.in,
|
|
216
|
+
x: n.smooth,
|
|
217
|
+
scale: n.smooth
|
|
218
|
+
},
|
|
219
|
+
className: "w-full",
|
|
220
|
+
children: /* @__PURE__ */ u(a, {
|
|
221
|
+
onH: O,
|
|
222
|
+
children: C
|
|
223
|
+
})
|
|
224
|
+
}, String(b))
|
|
225
|
+
})
|
|
226
|
+
});
|
|
227
|
+
return /* @__PURE__ */ d(B, { children: [p ? /* @__PURE__ */ u(z.div, {
|
|
228
|
+
onClick: h,
|
|
229
|
+
initial: { opacity: 0 },
|
|
230
|
+
animate: { opacity: 1 },
|
|
231
|
+
exit: {
|
|
232
|
+
opacity: 0,
|
|
233
|
+
transition: { duration: .24 }
|
|
234
|
+
},
|
|
235
|
+
transition: t.in,
|
|
236
|
+
className: "absolute inset-0 z-400 bg-overlay"
|
|
237
|
+
}, "scrim") : null, p ? S ? /* @__PURE__ */ d(z.div, {
|
|
238
|
+
"data-slot": "credenza",
|
|
239
|
+
...L,
|
|
240
|
+
className: e(m({ compact: !0 }), w),
|
|
241
|
+
initial: { y: "112%" },
|
|
242
|
+
animate: { y: "0%" },
|
|
243
|
+
exit: { y: "118%" },
|
|
244
|
+
transition: V,
|
|
245
|
+
drag: "y",
|
|
246
|
+
dragConstraints: {
|
|
247
|
+
top: 0,
|
|
248
|
+
bottom: 0
|
|
249
|
+
},
|
|
250
|
+
dragElastic: {
|
|
251
|
+
top: .02,
|
|
252
|
+
bottom: .55
|
|
253
|
+
},
|
|
254
|
+
onDragEnd: (e, t) => {
|
|
255
|
+
(t.offset.y > 120 || t.velocity.y > 500) && N.current();
|
|
256
|
+
},
|
|
257
|
+
style: T,
|
|
258
|
+
children: [
|
|
259
|
+
/* @__PURE__ */ u("div", {
|
|
260
|
+
"aria-hidden": "true",
|
|
261
|
+
className: "absolute top-[7px] left-1/2 z-3 h-[5px] w-[38px] -translate-x-1/2 rounded-[3px] bg-secondary-strong"
|
|
262
|
+
}),
|
|
263
|
+
H,
|
|
264
|
+
U
|
|
265
|
+
]
|
|
266
|
+
}, "tray") : /* @__PURE__ */ d(z.div, {
|
|
267
|
+
"data-slot": "credenza",
|
|
268
|
+
...L,
|
|
269
|
+
className: e(m({ compact: !1 }), w),
|
|
270
|
+
initial: {
|
|
271
|
+
x: "-50%",
|
|
272
|
+
y: "-45%",
|
|
273
|
+
opacity: 0,
|
|
274
|
+
scale: .95
|
|
275
|
+
},
|
|
276
|
+
animate: {
|
|
277
|
+
x: "-50%",
|
|
278
|
+
y: "-50%",
|
|
279
|
+
opacity: 1,
|
|
280
|
+
scale: 1
|
|
281
|
+
},
|
|
282
|
+
exit: {
|
|
283
|
+
x: "-50%",
|
|
284
|
+
y: "-48%",
|
|
285
|
+
opacity: 0,
|
|
286
|
+
scale: .97
|
|
287
|
+
},
|
|
288
|
+
transition: V,
|
|
289
|
+
style: T,
|
|
290
|
+
children: [H, U]
|
|
291
|
+
}, "dlg") : null] });
|
|
292
|
+
}
|
|
293
|
+
//#endregion
|
|
294
|
+
export { v as Credenza, m as credenzaVariants };
|
|
@@ -29,12 +29,12 @@ export interface DialogFooterProps extends ComponentProps<'div'> {
|
|
|
29
29
|
}
|
|
30
30
|
export declare function DialogFooter({ className, orientation, ...props }: DialogFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
31
31
|
export declare const dialogActionVariants: (props?: ({
|
|
32
|
-
variant?: "destructive" | "
|
|
32
|
+
variant?: "destructive" | "default" | "cancel" | null | undefined;
|
|
33
33
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
34
34
|
export interface DialogActionProps extends AriaButtonProps, VariantProps<typeof dialogActionVariants> {
|
|
35
35
|
}
|
|
36
36
|
/** iOS alert button. Closes the dialog by default (react-aria's `close` slot); pass `slot={null}` to keep it open. */
|
|
37
|
-
export declare function DialogAction({ className, variant,
|
|
37
|
+
export declare function DialogAction({ className, variant, slot, ...props }: DialogActionProps): import("react/jsx-runtime").JSX.Element;
|
|
38
38
|
/** Round × button pinned to the top-right corner (default / lg dialogs and sheets). */
|
|
39
39
|
export declare function DialogClose({ className, ...props }: AriaButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
40
40
|
//# sourceMappingURL=dialog.d.ts.map
|