@brett_lamy/ui 0.0.1 → 1.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 +131 -13
- package/dist/components/adaptive-pane.d.ts +15 -0
- package/dist/components/adaptive-pane.d.ts.map +1 -0
- package/dist/components/adaptive-pane.stories.d.ts +7 -0
- package/dist/components/adaptive-pane.stories.d.ts.map +1 -0
- package/dist/components/animated-height.d.ts +23 -0
- package/dist/components/animated-height.d.ts.map +1 -0
- package/dist/components/avatar.d.ts +1 -1
- package/dist/components/avatar.stories.d.ts +1 -1
- package/dist/components/badge.d.ts +9 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.stories.d.ts +9 -0
- package/dist/components/badge.stories.d.ts.map +1 -0
- package/dist/components/button.d.ts +12 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.stories.d.ts +9 -0
- package/dist/components/button.stories.d.ts.map +1 -0
- package/dist/components/card.d.ts +14 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.stories.d.ts +9 -0
- package/dist/components/card.stories.d.ts.map +1 -0
- package/dist/components/celebrate.d.ts +14 -0
- package/dist/components/celebrate.d.ts.map +1 -0
- package/dist/components/chat/channel-list.d.ts +35 -0
- package/dist/components/chat/channel-list.d.ts.map +1 -0
- package/dist/components/chat/channel-list.stories.d.ts +14 -0
- package/dist/components/chat/channel-list.stories.d.ts.map +1 -0
- package/dist/components/chat/chat-avatar.d.ts +13 -0
- package/dist/components/chat/chat-avatar.d.ts.map +1 -0
- package/dist/components/chat/chat-avatar.stories.d.ts +10 -0
- package/dist/components/chat/chat-avatar.stories.d.ts.map +1 -0
- package/dist/components/chat/chat-column.d.ts +8 -0
- package/dist/components/chat/chat-column.d.ts.map +1 -0
- package/dist/components/chat/chat-column.stories.d.ts +8 -0
- package/dist/components/chat/chat-column.stories.d.ts.map +1 -0
- package/dist/components/chat/chat-composer.d.ts +22 -0
- package/dist/components/chat/chat-composer.d.ts.map +1 -0
- package/dist/components/chat/chat-composer.stories.d.ts +17 -0
- package/dist/components/chat/chat-composer.stories.d.ts.map +1 -0
- package/dist/components/chat/chat.fixtures.d.ts +29 -0
- package/dist/components/chat/chat.fixtures.d.ts.map +1 -0
- package/dist/components/chat/floating-chat.d.ts +71 -0
- package/dist/components/chat/floating-chat.d.ts.map +1 -0
- package/dist/components/chat/floating-chat.stories.d.ts +18 -0
- package/dist/components/chat/floating-chat.stories.d.ts.map +1 -0
- package/dist/components/chat/floating-sheet.d.ts +83 -0
- package/dist/components/chat/floating-sheet.d.ts.map +1 -0
- package/dist/components/chat/floating-sheet.stories.d.ts +23 -0
- package/dist/components/chat/floating-sheet.stories.d.ts.map +1 -0
- package/dist/components/chat/member-list.d.ts +21 -0
- package/dist/components/chat/member-list.d.ts.map +1 -0
- package/dist/components/chat/message-list.d.ts +34 -0
- package/dist/components/chat/message-list.d.ts.map +1 -0
- package/dist/components/chat/message.d.ts +47 -0
- package/dist/components/chat/message.d.ts.map +1 -0
- package/dist/components/chat/message.stories.d.ts +31 -0
- package/dist/components/chat/message.stories.d.ts.map +1 -0
- package/dist/components/chat/progress-stepper.d.ts +30 -0
- package/dist/components/chat/progress-stepper.d.ts.map +1 -0
- package/dist/components/chat/rich-text.d.ts +8 -0
- package/dist/components/chat/rich-text.d.ts.map +1 -0
- package/dist/components/chat/rich-text.stories.d.ts +10 -0
- package/dist/components/chat/rich-text.stories.d.ts.map +1 -0
- package/dist/components/chat/server-header.d.ts +10 -0
- package/dist/components/chat/server-header.d.ts.map +1 -0
- package/dist/components/chat/thread-preview.d.ts +25 -0
- package/dist/components/chat/thread-preview.d.ts.map +1 -0
- package/dist/components/chat/thread-preview.stories.d.ts +19 -0
- package/dist/components/chat/thread-preview.stories.d.ts.map +1 -0
- package/dist/components/chat/user-panel.d.ts +16 -0
- package/dist/components/chat/user-panel.d.ts.map +1 -0
- package/dist/components/chat/workspace-rail.d.ts +56 -0
- package/dist/components/chat/workspace-rail.d.ts.map +1 -0
- package/dist/components/chat/workspace-rail.stories.d.ts +13 -0
- package/dist/components/chat/workspace-rail.stories.d.ts.map +1 -0
- package/dist/components/checkbox.d.ts +13 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.stories.d.ts +11 -0
- package/dist/components/checkbox.stories.d.ts.map +1 -0
- package/dist/components/combobox.d.ts +20 -0
- package/dist/components/combobox.d.ts.map +1 -0
- package/dist/components/combobox.stories.d.ts +10 -0
- package/dist/components/combobox.stories.d.ts.map +1 -0
- package/dist/components/credenza.d.ts +1 -1
- package/dist/components/credenza.d.ts.map +1 -1
- package/dist/components/credenza.stories.d.ts +1 -1
- package/dist/components/dialog.d.ts +40 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.stories.d.ts +12 -0
- package/dist/components/dialog.stories.d.ts.map +1 -0
- package/dist/components/disclosure.d.ts +23 -0
- package/dist/components/disclosure.d.ts.map +1 -0
- package/dist/components/disclosure.stories.d.ts +10 -0
- package/dist/components/disclosure.stories.d.ts.map +1 -0
- package/dist/components/dropdown-menu.d.ts +33 -0
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.stories.d.ts +11 -0
- package/dist/components/dropdown-menu.stories.d.ts.map +1 -0
- package/dist/components/edge-drawer.d.ts +17 -0
- package/dist/components/edge-drawer.d.ts.map +1 -0
- package/dist/components/edge-drawer.stories.d.ts +8 -0
- package/dist/components/edge-drawer.stories.d.ts.map +1 -0
- package/dist/components/edit-bar.d.ts +1 -1
- package/dist/components/edit-bar.d.ts.map +1 -1
- package/dist/components/edit-bar.stories.d.ts +1 -1
- package/dist/components/form.d.ts +9 -0
- package/dist/components/form.d.ts.map +1 -0
- package/dist/components/form.stories.d.ts +9 -0
- package/dist/components/form.stories.d.ts.map +1 -0
- package/dist/components/haptic-indicator.d.ts +4 -2
- package/dist/components/haptic-indicator.d.ts.map +1 -1
- package/dist/components/haptic-indicator.stories.d.ts +1 -1
- package/dist/components/icon-swap.d.ts +27 -0
- package/dist/components/icon-swap.d.ts.map +1 -0
- package/dist/components/index-bar.d.ts +12 -2
- package/dist/components/index-bar.d.ts.map +1 -1
- package/dist/components/index-bar.stories.d.ts +5 -1
- package/dist/components/index-bar.stories.d.ts.map +1 -1
- package/dist/components/input.d.ts +9 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.stories.d.ts +10 -0
- package/dist/components/input.stories.d.ts.map +1 -0
- package/dist/components/kbd.d.ts +5 -0
- package/dist/components/kbd.d.ts.map +1 -0
- package/dist/components/kbd.stories.d.ts +9 -0
- package/dist/components/kbd.stories.d.ts.map +1 -0
- package/dist/components/label.d.ts +9 -0
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.stories.d.ts +8 -0
- package/dist/components/label.stories.d.ts.map +1 -0
- package/dist/components/list-box.d.ts +30 -0
- package/dist/components/list-box.d.ts.map +1 -0
- package/dist/components/list-box.stories.d.ts +9 -0
- package/dist/components/list-box.stories.d.ts.map +1 -0
- package/dist/components/list-row.stories.d.ts +1 -1
- package/dist/components/list.d.ts +1 -1
- package/dist/components/list.d.ts.map +1 -1
- package/dist/components/list.stories.d.ts +1 -1
- package/dist/components/markdown-editor.d.ts +97 -0
- package/dist/components/markdown-editor.d.ts.map +1 -0
- package/dist/components/markdown-editor.stories.d.ts +14 -0
- package/dist/components/markdown-editor.stories.d.ts.map +1 -0
- package/dist/components/measure-h.d.ts +1 -1
- package/dist/components/motion.stories.d.ts +15 -0
- package/dist/components/motion.stories.d.ts.map +1 -0
- package/dist/components/navigation-stack.d.ts +2 -2
- package/dist/components/navigation-stack.d.ts.map +1 -1
- package/dist/components/navigation-stack.stories.d.ts +1 -1
- package/dist/components/number-morph.d.ts +11 -0
- package/dist/components/number-morph.d.ts.map +1 -0
- package/dist/components/pencilkit/pencil-canvas.d.ts +24 -0
- package/dist/components/pencilkit/pencil-canvas.d.ts.map +1 -0
- package/dist/components/pencilkit/pencil-canvas.stories.d.ts +18 -0
- package/dist/components/pencilkit/pencil-canvas.stories.d.ts.map +1 -0
- package/dist/components/pencilkit/pencil-toolbar.d.ts +57 -0
- package/dist/components/pencilkit/pencil-toolbar.d.ts.map +1 -0
- package/dist/components/pencilkit/pencil-toolbar.stories.d.ts +10 -0
- package/dist/components/pencilkit/pencil-toolbar.stories.d.ts.map +1 -0
- package/dist/components/pencilkit/pencilkit-annotator.d.ts +8 -0
- package/dist/components/pencilkit/pencilkit-annotator.d.ts.map +1 -0
- package/dist/components/pencilkit/pk-icon.d.ts +8 -0
- package/dist/components/pencilkit/pk-icon.d.ts.map +1 -0
- package/dist/components/pencilkit/stroke-path.d.ts +11 -0
- package/dist/components/pencilkit/stroke-path.d.ts.map +1 -0
- package/dist/components/pencilkit/use-pencil-history.d.ts +15 -0
- package/dist/components/pencilkit/use-pencil-history.d.ts.map +1 -0
- package/dist/components/pill-button.d.ts +2 -2
- package/dist/components/pill-button.d.ts.map +1 -1
- package/dist/components/pill-button.stories.d.ts +1 -1
- package/dist/components/popover.d.ts +15 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.stories.d.ts +9 -0
- package/dist/components/popover.stories.d.ts.map +1 -0
- package/dist/components/progress.d.ts +16 -0
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.stories.d.ts +10 -0
- package/dist/components/progress.stories.d.ts.map +1 -0
- package/dist/components/qr-svg.d.ts +1 -1
- package/dist/components/qr-svg.stories.d.ts +1 -1
- package/dist/components/radio-group.d.ts +13 -0
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.stories.d.ts +10 -0
- package/dist/components/radio-group.stories.d.ts.map +1 -0
- package/dist/components/scroll-area.d.ts +9 -0
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.stories.d.ts +8 -0
- package/dist/components/scroll-area.stories.d.ts.map +1 -0
- package/dist/components/search-field.d.ts +2 -1
- package/dist/components/search-field.d.ts.map +1 -1
- package/dist/components/search-field.stories.d.ts +1 -1
- package/dist/components/segmented.d.ts +6 -2
- package/dist/components/segmented.d.ts.map +1 -1
- package/dist/components/segmented.stories.d.ts +1 -1
- package/dist/components/select.d.ts +26 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.stories.d.ts +12 -0
- package/dist/components/select.stories.d.ts.map +1 -0
- package/dist/components/separator.d.ts +10 -0
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.stories.d.ts +9 -0
- package/dist/components/separator.stories.d.ts.map +1 -0
- package/dist/components/sheet.d.ts +29 -0
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.stories.d.ts +12 -0
- package/dist/components/sheet.stories.d.ts.map +1 -0
- package/dist/components/side-drawer.d.ts +1 -1
- package/dist/components/side-drawer.d.ts.map +1 -1
- package/dist/components/side-drawer.stories.d.ts +1 -1
- package/dist/components/sidebar.d.ts +86 -0
- package/dist/components/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar.stories.d.ts +10 -0
- package/dist/components/sidebar.stories.d.ts.map +1 -0
- package/dist/components/skeleton.d.ts +9 -0
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.stories.d.ts +9 -0
- package/dist/components/skeleton.stories.d.ts.map +1 -0
- package/dist/components/slider.d.ts +13 -0
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.stories.d.ts +9 -0
- package/dist/components/slider.stories.d.ts.map +1 -0
- package/dist/components/spinner.d.ts +3 -1
- package/dist/components/spinner.d.ts.map +1 -1
- package/dist/components/spinner.stories.d.ts +1 -1
- package/dist/components/split-view.d.ts +129 -9
- package/dist/components/split-view.d.ts.map +1 -1
- package/dist/components/split-view.stories.d.ts +19 -3
- package/dist/components/split-view.stories.d.ts.map +1 -1
- package/dist/components/switch.d.ts +3 -2
- package/dist/components/switch.d.ts.map +1 -1
- package/dist/components/switch.stories.d.ts +1 -1
- package/dist/components/syntax-highlighting.d.ts +99 -0
- package/dist/components/syntax-highlighting.d.ts.map +1 -0
- package/dist/components/syntax-highlighting.stories.d.ts +18 -0
- package/dist/components/syntax-highlighting.stories.d.ts.map +1 -0
- package/dist/components/tab-bar.d.ts +3 -1
- package/dist/components/tab-bar.d.ts.map +1 -1
- package/dist/components/tab-bar.stories.d.ts +1 -1
- package/dist/components/tab-view.d.ts +93 -0
- package/dist/components/tab-view.d.ts.map +1 -0
- package/dist/components/tab-view.stories.d.ts +21 -0
- package/dist/components/tab-view.stories.d.ts.map +1 -0
- package/dist/components/tabs.d.ts +26 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.stories.d.ts +9 -0
- package/dist/components/tabs.stories.d.ts.map +1 -0
- package/dist/components/text-field.d.ts +9 -0
- package/dist/components/text-field.d.ts.map +1 -0
- package/dist/components/text-field.stories.d.ts +9 -0
- package/dist/components/text-field.stories.d.ts.map +1 -0
- package/dist/components/text-morph.d.ts +8 -0
- package/dist/components/text-morph.d.ts.map +1 -0
- package/dist/components/textarea.d.ts +9 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/toggle-group.d.ts +15 -0
- package/dist/components/toggle-group.d.ts.map +1 -0
- package/dist/components/toggle-group.stories.d.ts +10 -0
- package/dist/components/toggle-group.stories.d.ts.map +1 -0
- package/dist/components/toggle.d.ts +10 -0
- package/dist/components/toggle.d.ts.map +1 -0
- package/dist/components/toggle.stories.d.ts +9 -0
- package/dist/components/toggle.stories.d.ts.map +1 -0
- package/dist/components/tooltip.d.ts +10 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.stories.d.ts +11 -0
- package/dist/components/tooltip.stories.d.ts.map +1 -0
- package/dist/components/workbench/annotator.d.ts +22 -0
- package/dist/components/workbench/annotator.d.ts.map +1 -0
- package/dist/components/workbench/chat.d.ts +99 -0
- package/dist/components/workbench/chat.d.ts.map +1 -0
- package/dist/components/workbench/chat.stories.d.ts +14 -0
- package/dist/components/workbench/chat.stories.d.ts.map +1 -0
- package/dist/components/workbench/composer.d.ts +358 -0
- package/dist/components/workbench/composer.d.ts.map +1 -0
- package/dist/components/workbench/composer.stories.d.ts +29 -0
- package/dist/components/workbench/composer.stories.d.ts.map +1 -0
- package/dist/components/workbench/fixtures.d.ts +38 -0
- package/dist/components/workbench/fixtures.d.ts.map +1 -0
- package/dist/components/workbench/markdown.d.ts +27 -0
- package/dist/components/workbench/markdown.d.ts.map +1 -0
- package/dist/components/workbench/message-scroller.d.ts +16 -0
- package/dist/components/workbench/message-scroller.d.ts.map +1 -0
- package/dist/components/workbench/message-scroller.stories.d.ts +10 -0
- package/dist/components/workbench/message-scroller.stories.d.ts.map +1 -0
- package/dist/components/workbench/model-picker.d.ts +29 -0
- package/dist/components/workbench/model-picker.d.ts.map +1 -0
- package/dist/components/workbench/models.d.ts +32 -0
- package/dist/components/workbench/models.d.ts.map +1 -0
- package/dist/components/workbench/snap-sheet.d.ts +12 -0
- package/dist/components/workbench/snap-sheet.d.ts.map +1 -0
- package/dist/components/workbench/snap-sheet.stories.d.ts +9 -0
- package/dist/components/workbench/snap-sheet.stories.d.ts.map +1 -0
- package/dist/components/workbench/surfaces.d.ts +67 -0
- package/dist/components/workbench/surfaces.d.ts.map +1 -0
- package/dist/components/workbench/surfaces.stories.d.ts +16 -0
- package/dist/components/workbench/surfaces.stories.d.ts.map +1 -0
- package/dist/components/workbench/terminal.d.ts +43 -0
- package/dist/components/workbench/terminal.d.ts.map +1 -0
- package/dist/components/workbench/terminal.stories.d.ts +9 -0
- package/dist/components/workbench/terminal.stories.d.ts.map +1 -0
- package/dist/components/workbench/thread-sidebar.d.ts +100 -0
- package/dist/components/workbench/thread-sidebar.d.ts.map +1 -0
- package/dist/components/workbench/thread-sidebar.stories.d.ts +10 -0
- package/dist/components/workbench/thread-sidebar.stories.d.ts.map +1 -0
- package/dist/components/workbench/wb-popover.d.ts +11 -0
- package/dist/components/workbench/wb-popover.d.ts.map +1 -0
- package/dist/components/workbench/workbench-composer.d.ts +26 -0
- package/dist/components/workbench/workbench-composer.d.ts.map +1 -0
- package/dist/demos/delivery/delivery-tracking-demo.d.ts +40 -0
- package/dist/demos/delivery/delivery-tracking-demo.d.ts.map +1 -0
- package/dist/demos/delivery/delivery-tracking-demo.stories.d.ts +14 -0
- package/dist/demos/delivery/delivery-tracking-demo.stories.d.ts.map +1 -0
- package/dist/demos/haptics-playground.d.ts.map +1 -1
- package/dist/demos/haptics-playground.stories.d.ts +1 -1
- package/dist/demos/map-chat/geo.d.ts +46 -0
- package/dist/demos/map-chat/geo.d.ts.map +1 -0
- package/dist/demos/map-chat/map-agent.d.ts +48 -0
- package/dist/demos/map-chat/map-agent.d.ts.map +1 -0
- package/dist/demos/map-chat/map-chat-demo.d.ts +19 -0
- package/dist/demos/map-chat/map-chat-demo.d.ts.map +1 -0
- package/dist/demos/map-chat/map-chat-demo.stories.d.ts +17 -0
- package/dist/demos/map-chat/map-chat-demo.stories.d.ts.map +1 -0
- package/dist/demos/map-chat/map-icons.d.ts +44 -0
- package/dist/demos/map-chat/map-icons.d.ts.map +1 -0
- package/dist/demos/map-chat/places.d.ts +29 -0
- package/dist/demos/map-chat/places.d.ts.map +1 -0
- package/dist/demos/map-chat/tile-map.d.ts +72 -0
- package/dist/demos/map-chat/tile-map.d.ts.map +1 -0
- package/dist/demos/pencilkit/demo-strokes.d.ts +4 -0
- package/dist/demos/pencilkit/demo-strokes.d.ts.map +1 -0
- package/dist/demos/pencilkit/pencilkit-demo.d.ts +15 -0
- package/dist/demos/pencilkit/pencilkit-demo.d.ts.map +1 -0
- package/dist/demos/pencilkit/pencilkit-demo.stories.d.ts +11 -0
- package/dist/demos/pencilkit/pencilkit-demo.stories.d.ts.map +1 -0
- package/dist/demos/sidebar-demo.d.ts +9 -0
- package/dist/demos/sidebar-demo.d.ts.map +1 -0
- package/dist/demos/split-view-demos.d.ts +37 -0
- package/dist/demos/split-view-demos.d.ts.map +1 -0
- package/dist/index.css +2 -1
- package/dist/index.d.ts +156 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15390 -14736
- package/dist/lib/chat/chat-icon.d.ts +24 -0
- package/dist/lib/chat/chat-icon.d.ts.map +1 -0
- package/dist/lib/chat/chat-shell-context.d.ts +19 -0
- package/dist/lib/chat/chat-shell-context.d.ts.map +1 -0
- package/dist/lib/chat/chat-tokens.d.ts +72 -0
- package/dist/lib/chat/chat-tokens.d.ts.map +1 -0
- package/dist/lib/chat/chat-users.d.ts +18 -0
- package/dist/lib/chat/chat-users.d.ts.map +1 -0
- package/dist/lib/chat/kvib.d.ts +3 -0
- package/dist/lib/chat/kvib.d.ts.map +1 -0
- package/dist/lib/chat/persistent-host.d.ts +29 -0
- package/dist/lib/chat/persistent-host.d.ts.map +1 -0
- package/dist/lib/chat/title-ref.d.ts +3 -0
- package/dist/lib/chat/title-ref.d.ts.map +1 -0
- package/dist/lib/container.d.ts +14 -0
- package/dist/lib/container.d.ts.map +1 -0
- package/dist/lib/haptics.d.ts +0 -2
- package/dist/lib/haptics.d.ts.map +1 -1
- package/dist/lib/icon.d.ts +1 -1
- package/dist/lib/icon.d.ts.map +1 -1
- package/dist/lib/icon.stories.d.ts +1 -1
- package/dist/lib/motion.d.ts +74 -0
- package/dist/lib/motion.d.ts.map +1 -1
- package/dist/lib/pencilkit/constants.d.ts +33 -0
- package/dist/lib/pencilkit/constants.d.ts.map +1 -0
- package/dist/lib/primitives.d.ts +12 -0
- package/dist/lib/primitives.d.ts.map +1 -0
- package/dist/lib/sheet-drag.d.ts +38 -0
- package/dist/lib/sheet-drag.d.ts.map +1 -0
- package/dist/lib/syntax.d.ts +38 -0
- package/dist/lib/syntax.d.ts.map +1 -0
- package/dist/lib/theme.d.ts +15 -5
- package/dist/lib/theme.d.ts.map +1 -1
- package/dist/lib/utils.d.ts +2 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/workbench/haptics.d.ts +3 -0
- package/dist/lib/workbench/haptics.d.ts.map +1 -0
- package/dist/lib/workbench/icons.d.ts +29 -0
- package/dist/lib/workbench/icons.d.ts.map +1 -0
- package/dist/lib/workbench/motion.d.ts +83 -0
- package/dist/lib/workbench/motion.d.ts.map +1 -0
- package/dist/lib/workbench/press.d.ts +10 -0
- package/dist/lib/workbench/press.d.ts.map +1 -0
- package/dist/lib/workbench/theme.d.ts +16 -0
- package/dist/lib/workbench/theme.d.ts.map +1 -0
- package/dist/lib/workbench/util.d.ts +6 -0
- package/dist/lib/workbench/util.d.ts.map +1 -0
- package/dist/stories/frame.d.ts +1 -1
- package/dist/stories/primitive-frame.d.ts +20 -0
- package/dist/stories/primitive-frame.d.ts.map +1 -0
- package/dist/templates/artifact-chat-container.d.ts +63 -0
- package/dist/templates/artifact-chat-container.d.ts.map +1 -0
- package/dist/templates/artifact-chat-container.stories.d.ts +25 -0
- package/dist/templates/artifact-chat-container.stories.d.ts.map +1 -0
- package/dist/templates/chat-shell.d.ts +86 -0
- package/dist/templates/chat-shell.d.ts.map +1 -0
- package/dist/templates/chat-shell.stories.d.ts +23 -0
- package/dist/templates/chat-shell.stories.d.ts.map +1 -0
- package/dist/templates/workbench-shell.d.ts +177 -0
- package/dist/templates/workbench-shell.d.ts.map +1 -0
- package/dist/templates/workbench-shell.stories.d.ts +18 -0
- package/dist/templates/workbench-shell.stories.d.ts.map +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -0
- package/package.json +29 -8
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type TextAreaProps as AriaTextAreaProps } from 'react-aria-components';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
export declare const textareaVariants: (props?: ({
|
|
4
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface TextareaProps extends AriaTextAreaProps, VariantProps<typeof textareaVariants> {
|
|
7
|
+
}
|
|
8
|
+
export declare function Textarea({ className, size, ...props }: TextareaProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../src/components/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,aAAa,IAAI,iBAAiB,EAAsB,MAAM,uBAAuB,CAAC;AAC9H,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,eAAO,MAAM,gBAAgB;;8EAkB5B,CAAC;AAEF,MAAM,WAAW,aAAc,SAAQ,iBAAiB,EAAE,YAAY,CAAC,OAAO,gBAAgB,CAAC;CAAG;AAElG,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,2CAQpE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ToggleButtonGroupProps, type ToggleButtonProps } from 'react-aria-components';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { toggleVariants } from './toggle';
|
|
4
|
+
export declare const toggleGroupVariants: (props?: ({
|
|
5
|
+
variant?: "outline" | "default" | "filled" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
type ToggleGroupStyle = VariantProps<typeof toggleVariants>;
|
|
8
|
+
export interface ToggleGroupProps extends ToggleButtonGroupProps, ToggleGroupStyle {
|
|
9
|
+
}
|
|
10
|
+
export declare function ToggleGroup({ className, variant, size, onSelectionChange, ...props }: ToggleGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export interface ToggleGroupItemProps extends ToggleButtonProps, ToggleGroupStyle {
|
|
12
|
+
}
|
|
13
|
+
export declare function ToggleGroupItem({ className, variant, size, children, ...props }: ToggleGroupItemProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=toggle-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-group.d.ts","sourceRoot":"","sources":["../../src/components/toggle-group.tsx"],"names":[],"mappings":"AACA,OAAO,EACkC,KAAK,sBAAsB,EAAE,KAAK,iBAAiB,EAC3F,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAAU,cAAc,EAAE,MAAM,UAAU,CAAC;AAMlD,eAAO,MAAM,mBAAmB;;8EAU9B,CAAC;AAEH,KAAK,gBAAgB,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;AAG5D,MAAM,WAAW,gBAAiB,SAAQ,sBAAsB,EAAE,gBAAgB;CAAG;AAErF,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAYtG;AAED,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB,EAAE,gBAAgB;CAAG;AAEpF,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,2CAuBrG"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ToggleGroup } from './toggle-group';
|
|
3
|
+
declare const meta: Meta<typeof ToggleGroup>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ToggleGroup>;
|
|
6
|
+
export declare const Multiple: Story;
|
|
7
|
+
export declare const Single: Story;
|
|
8
|
+
export declare const Variants: Story;
|
|
9
|
+
export declare const Dark: Story;
|
|
10
|
+
//# sourceMappingURL=toggle-group.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-group.stories.d.ts","sourceRoot":"","sources":["../../src/components/toggle-group.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAmB,MAAM,gBAAgB,CAAC;AAG9D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAIlC,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;AA2C1C,eAAO,MAAM,QAAQ,EAAE,KAAsD,CAAC;AAC9E,eAAO,MAAM,MAAM,EAAE,KAAoD,CAAC;AAC1E,eAAO,MAAM,QAAQ,EAAE,KAA6B,CAAC;AACrD,eAAO,MAAM,IAAI,EAAE,KAAqF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ToggleButtonProps } from 'react-aria-components';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
export declare const toggleVariants: (props?: ({
|
|
4
|
+
variant?: "outline" | "default" | "filled" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export interface ToggleProps extends ToggleButtonProps, VariantProps<typeof toggleVariants> {
|
|
8
|
+
}
|
|
9
|
+
export declare function Toggle({ className, variant, size, onChange, ...props }: ToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=toggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../src/components/toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,iBAAiB,EAAsB,MAAM,uBAAuB,CAAC;AACjG,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,eAAO,MAAM,cAAc;;;8EAwB1B,CAAC;AAEF,MAAM,WAAW,WAAY,SAAQ,iBAAiB,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC;CAAG;AAE9F,wBAAgB,MAAM,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,2CASnF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Toggle } from './toggle';
|
|
3
|
+
declare const meta: Meta<typeof Toggle>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Toggle>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Variants: Story;
|
|
8
|
+
export declare const Dark: Story;
|
|
9
|
+
//# sourceMappingURL=toggle.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle.stories.d.ts","sourceRoot":"","sources":["../../src/components/toggle.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAS7B,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAC;AAErC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAqBjC,eAAO,MAAM,QAAQ,EAAE,KAA8B,CAAC;AACtD,eAAO,MAAM,IAAI,EAAE,KAAsF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type TooltipProps as AriaTooltipProps, type TooltipTriggerComponentProps } from 'react-aria-components';
|
|
3
|
+
export declare function TooltipTrigger({ delay, closeDelay, ...props }: TooltipTriggerComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export interface TooltipProps extends Omit<AriaTooltipProps, 'children'> {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
/** Draw the pointer toward the trigger (default true). */
|
|
7
|
+
arrow?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function Tooltip({ className, offset, arrow, children, ...props }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/components/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAEmB,KAAK,YAAY,IAAI,gBAAgB,EACvB,KAAK,4BAA4B,EAExE,MAAM,uBAAuB,CAAC;AAQ/B,wBAAgB,cAAc,CAAC,EAAE,KAAW,EAAE,UAAgB,EAAE,GAAG,KAAK,EAAE,EAAE,4BAA4B,2CAEvG;AAED,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC;IACtE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,0DAA0D;IAC1D,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,OAAO,CAAC,EAAE,SAAS,EAAE,MAAU,EAAE,KAAY,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,2CAuBhG"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Tooltip } from './tooltip';
|
|
3
|
+
declare const meta: Meta<typeof Tooltip>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Tooltip>;
|
|
6
|
+
export declare const Top: Story;
|
|
7
|
+
export declare const Bottom: Story;
|
|
8
|
+
export declare const End: Story;
|
|
9
|
+
export declare const Dark: Story;
|
|
10
|
+
export declare const HoverToOpen: Story;
|
|
11
|
+
//# sourceMappingURL=tooltip.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.stories.d.ts","sourceRoot":"","sources":["../../src/components/tooltip.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAkB,MAAM,WAAW,CAAC;AAKpD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAG9B,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC;AAatC,eAAO,MAAM,GAAG,EAAE,KAA2D,CAAC;AAC9E,eAAO,MAAM,MAAM,EAAE,KAA8E,CAAC;AACpG,eAAO,MAAM,GAAG,EAAE,KAA2E,CAAC;AAC9F,eAAO,MAAM,IAAI,EAAE,KAAgE,CAAC;AACpF,eAAO,MAAM,WAAW,EAAE,KAAwE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ComposerAnnotatorSurface {
|
|
3
|
+
/** The drawing surface, stretched over the image. Its first <svg> is flattened into the image on save. */
|
|
4
|
+
canvas: React.ReactNode;
|
|
5
|
+
/** Tools, in a bar under the image so they never cover it. */
|
|
6
|
+
toolbar?: React.ReactNode;
|
|
7
|
+
/** The lightbox's heading (default "Annotate — strokes flatten into the image on save"). */
|
|
8
|
+
title?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ComposerAnnotatorProps {
|
|
11
|
+
/** Lays the surface out in the lightbox: call it with the canvas and tools and return the result. */
|
|
12
|
+
children: (surface: ComposerAnnotatorSurface) => React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export type ComposerAnnotator = React.ComponentType<ComposerAnnotatorProps>;
|
|
15
|
+
/** Swaps the annotator for every Composer (and AnnotateLightbox) below it; `null` opts them out (plain preview). */
|
|
16
|
+
export declare function ComposerAnnotatorProvider({ annotator, children }: {
|
|
17
|
+
annotator: ComposerAnnotator | null;
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
/** The annotator in effect: the nearest ComposerAnnotatorProvider's, else `PencilKitAnnotator`; `null` if opted out. */
|
|
21
|
+
export declare function useComposerAnnotator(): ComposerAnnotator | null;
|
|
22
|
+
//# sourceMappingURL=annotator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annotator.d.ts","sourceRoot":"","sources":["../../../src/components/workbench/annotator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,MAAM,WAAW,wBAAwB;IACvC,0GAA0G;IAC1G,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,4FAA4F;IAC5F,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AACD,MAAM,WAAW,sBAAsB;IACrC,qGAAqG;IACrG,QAAQ,EAAE,CAAC,OAAO,EAAE,wBAAwB,KAAK,KAAK,CAAC,SAAS,CAAC;CAClE;AACD,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC;AAI5E,oHAAoH;AACpH,wBAAgB,yBAAyB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE;IAAE,SAAS,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CAErI;AAED,wHAAwH;AACxH,wBAAgB,oBAAoB,IAAI,iBAAiB,GAAG,IAAI,CAE/D"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type WIconName } from '../../lib/workbench/icons';
|
|
3
|
+
type Div = {
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export interface ConversationProps extends Div {
|
|
9
|
+
/** no thread yet: show the empty state */
|
|
10
|
+
empty?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function Conversation({ empty, className, style, children }: ConversationProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
/** Content above the composer while the conversation is empty; leaves upward when the thread starts. */
|
|
14
|
+
export declare function ConversationEmpty({ className, children }: Div): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export interface ConversationGreetingProps {
|
|
16
|
+
title: React.ReactNode;
|
|
17
|
+
description?: React.ReactNode;
|
|
18
|
+
/** replaces the tinted spark tile */
|
|
19
|
+
icon?: React.ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function ConversationGreeting({ title, description, icon, className }: ConversationGreetingProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export interface ConversationMessagesProps {
|
|
24
|
+
/** identifies the thread; switching it re-opens the scroller at the last anchor */
|
|
25
|
+
threadKey?: string | null;
|
|
26
|
+
streaming?: boolean;
|
|
27
|
+
/** px of the previous turn left peeking above a new anchor */
|
|
28
|
+
peek?: number;
|
|
29
|
+
/** keyed messages; `UserMessage`s anchor the scroll */
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
/** The thread's messages in a MessageScroller: new turns anchor near the top, replies grow below. */
|
|
33
|
+
export declare function ConversationMessages({ threadKey, streaming, peek, children }: ConversationMessagesProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
/** Docks the composer: centred while empty, at the bottom of the thread after. The same element in both
|
|
35
|
+
states, so it FLIPs from one place to the other. */
|
|
36
|
+
export declare function ConversationComposer({ className, style, children }: Div): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
/** Suggestion chips under the empty composer. */
|
|
38
|
+
export declare function ConversationSuggestions({ className, children }: Div): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare function Suggestion({ onPress, className, children }: {
|
|
40
|
+
onPress?: () => void;
|
|
41
|
+
className?: string;
|
|
42
|
+
children?: React.ReactNode;
|
|
43
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export interface UserMessageProps {
|
|
45
|
+
/** image attachments, shown above the bubble */
|
|
46
|
+
images?: string[];
|
|
47
|
+
/** anchors the scroller (default true) */
|
|
48
|
+
anchor?: boolean;
|
|
49
|
+
className?: string;
|
|
50
|
+
children?: React.ReactNode;
|
|
51
|
+
}
|
|
52
|
+
export declare function UserMessage({ images, className, children }: UserMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
export declare function AssistantMessage({ className, children }: {
|
|
54
|
+
anchor?: boolean;
|
|
55
|
+
className?: string;
|
|
56
|
+
children?: React.ReactNode;
|
|
57
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
export declare function ConversationTyping({ className }: {
|
|
59
|
+
className?: string;
|
|
60
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
/** The reply body: streaming markdown, and the typing dots until the first token. */
|
|
62
|
+
export declare function MessageMarkdown({ markdown, streaming }: {
|
|
63
|
+
markdown?: string;
|
|
64
|
+
streaming?: boolean;
|
|
65
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
export interface WorkLogProps {
|
|
67
|
+
/** the collapsed row, e.g. "Worked for 1m 4s" */
|
|
68
|
+
summary: React.ReactNode;
|
|
69
|
+
defaultOpen?: boolean;
|
|
70
|
+
/** ToolCall rows; with none the row is static */
|
|
71
|
+
children?: React.ReactNode;
|
|
72
|
+
className?: string;
|
|
73
|
+
}
|
|
74
|
+
/** "Worked for Ns" — expands (on a spring) into the tool calls behind the reply. */
|
|
75
|
+
export declare function WorkLog({ summary, defaultOpen, children, className }: WorkLogProps): import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
export interface ToolCallProps {
|
|
77
|
+
icon?: WIconName;
|
|
78
|
+
/** what the agent did */
|
|
79
|
+
title: React.ReactNode;
|
|
80
|
+
/** secondary text: a URL, a path, a count */
|
|
81
|
+
detail?: React.ReactNode;
|
|
82
|
+
/** a command or snippet, shown in a mono well */
|
|
83
|
+
code?: string;
|
|
84
|
+
status?: 'done' | 'running' | 'error';
|
|
85
|
+
className?: string;
|
|
86
|
+
}
|
|
87
|
+
/** One step in a WorkLog. */
|
|
88
|
+
export declare function ToolCall({ icon, title, detail, code, status, className }: ToolCallProps): import("react/jsx-runtime").JSX.Element;
|
|
89
|
+
export interface SettledBannerProps {
|
|
90
|
+
onUnsettle: () => void;
|
|
91
|
+
title?: React.ReactNode;
|
|
92
|
+
description?: React.ReactNode;
|
|
93
|
+
className?: string;
|
|
94
|
+
style?: React.CSSProperties;
|
|
95
|
+
}
|
|
96
|
+
/** Above the composer of a settled thread; sending (or Un-settle) moves it back to Active. */
|
|
97
|
+
export declare function SettledBanner({ onUnsettle, title, description, className, style, }: SettledBannerProps): import("react/jsx-runtime").JSX.Element;
|
|
98
|
+
export {};
|
|
99
|
+
//# sourceMappingURL=chat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../src/components/workbench/chat.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Conversation } from './chat';
|
|
3
|
+
import '../../styles.css';
|
|
4
|
+
declare const meta: Meta<typeof Conversation>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof Conversation>;
|
|
7
|
+
export declare const Thread: Story;
|
|
8
|
+
export declare const Settled: Story;
|
|
9
|
+
export declare const Empty: Story;
|
|
10
|
+
export declare const Streaming: Story;
|
|
11
|
+
export declare const BannerAndTrace: Story;
|
|
12
|
+
export declare const EmptyThreadStreaming: Story;
|
|
13
|
+
export declare const WorkLogOpen: Story;
|
|
14
|
+
//# sourceMappingURL=chat.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.stories.d.ts","sourceRoot":"","sources":["../../../src/components/workbench/chat.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,YAAY,EAab,MAAM,QAAQ,CAAC;AAIhB,OAAO,kBAAkB,CAAC;AAE1B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAInC,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AA6C3C,eAAO,MAAM,MAAM,EAAE,KAA2E,CAAC;AAOjG,eAAO,MAAM,OAAO,EAAE,KAAwD,CAAC;AAG/E,eAAO,MAAM,KAAK,EAAE,KAAqE,CAAC;AAG1F,eAAO,MAAM,SAAS,EAAE,KAkBvB,CAAC;AAGF,eAAO,MAAM,cAAc,EAAE,KAU5B,CAAC;AAGF,eAAO,MAAM,oBAAoB,EAAE,KAkBlC,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,KAYzB,CAAC"}
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type GitbookEditorProps } from '@brett_lamy/docstream-editor/editor';
|
|
3
|
+
import type { EditorAttachment } from '@brett_lamy/docstream-editor';
|
|
4
|
+
import '@brett_lamy/docstream-editor/styles.css';
|
|
5
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
6
|
+
import { type MenuItemProps } from 'react-aria-components';
|
|
7
|
+
import { type ButtonProps } from '../../lib/workbench/press';
|
|
8
|
+
import { type WIconName } from '../../lib/workbench/icons';
|
|
9
|
+
import { type ComposerAnnotator } from './annotator';
|
|
10
|
+
import { type SpringSheetDragState } from '../../lib/workbench/motion';
|
|
11
|
+
export type ComposerAttachment = EditorAttachment;
|
|
12
|
+
type ComposerEditor = NonNullable<Parameters<NonNullable<GitbookEditorProps['onEditorReady']>>[0]>;
|
|
13
|
+
export interface ComposerContextValue {
|
|
14
|
+
/** The draft as GitBook-flavored Markdown (attachment chips serialize as ``). */
|
|
15
|
+
value: string;
|
|
16
|
+
setValue: (markdown: string) => void;
|
|
17
|
+
attachments: ComposerAttachment[];
|
|
18
|
+
addAttachment: (attachment: ComposerAttachment) => void;
|
|
19
|
+
/** Drops an attachment and its chip in the editor. */
|
|
20
|
+
removeAttachment: (id: string) => void;
|
|
21
|
+
updateAttachment: (id: string, patch: Partial<ComposerAttachment>) => void;
|
|
22
|
+
/** Reads image files and adds them as attachments (with a chip at the caret when an input is mounted). */
|
|
23
|
+
attachFiles: (files: File[]) => void;
|
|
24
|
+
expanded: boolean;
|
|
25
|
+
setExpanded: (expanded: boolean) => void;
|
|
26
|
+
streaming: boolean;
|
|
27
|
+
/** Whether there is anything to send. */
|
|
28
|
+
canSend: boolean;
|
|
29
|
+
send: () => void;
|
|
30
|
+
stop: () => void;
|
|
31
|
+
/** Opens the annotator for an attachment (a plain preview when the annotator is opted out). */
|
|
32
|
+
annotate: (id: string) => void;
|
|
33
|
+
/** An annotator is in effect (PencilKit by default, the `annotator` prop, a ComposerAnnotatorProvider, or `annotateCanvas`). */
|
|
34
|
+
canAnnotate: boolean;
|
|
35
|
+
editor: ComposerEditor | null;
|
|
36
|
+
/** @internal ComposerInput registers its editor here. */
|
|
37
|
+
setEditor: (editor: ComposerEditor | null) => void;
|
|
38
|
+
/** The root element; bumps measure against it. */
|
|
39
|
+
rootRef: React.RefObject<HTMLDivElement | null>;
|
|
40
|
+
/** @internal set by a ComposerOutlet above the root. */
|
|
41
|
+
renderCard?: (card: React.ReactNode) => React.ReactNode;
|
|
42
|
+
/** How far the composer is collapsed: the full card, a single-row pill, or a FAB. */
|
|
43
|
+
collapsed: ComposerCollapse;
|
|
44
|
+
setCollapsed: (collapsed: ComposerCollapse) => void;
|
|
45
|
+
/** @internal where ComposerOptions move to while compact. */
|
|
46
|
+
optionsOutlet: HTMLElement | null;
|
|
47
|
+
/** @internal */
|
|
48
|
+
setOptionsOutlet: (el: HTMLElement | null) => void;
|
|
49
|
+
/** @internal the FAB the card folds into, when this composer can fold. */
|
|
50
|
+
fab: {
|
|
51
|
+
icon?: React.ReactNode;
|
|
52
|
+
restore: () => void;
|
|
53
|
+
} | null;
|
|
54
|
+
}
|
|
55
|
+
/** `none`: the full card · `compact`: one row, options in the bottom bump · `fab`: a floating button. */
|
|
56
|
+
export type ComposerCollapse = 'none' | 'compact' | 'fab';
|
|
57
|
+
export declare function useComposer(): ComposerContextValue;
|
|
58
|
+
export interface ComposerOutletProps {
|
|
59
|
+
/** Parts added to the Composer below this outlet, as if they were its first children (e.g. a top bump). */
|
|
60
|
+
parts?: React.ReactNode;
|
|
61
|
+
/** Wraps (or replaces) the Composer's card, e.g. to swap it for a status while an agent works. */
|
|
62
|
+
renderCard?: (card: React.ReactNode) => React.ReactNode;
|
|
63
|
+
/** Classes merged into the Composer root. */
|
|
64
|
+
className?: string;
|
|
65
|
+
children?: React.ReactNode;
|
|
66
|
+
}
|
|
67
|
+
/** Lets an ancestor contribute parts to the nearest Composer inside it. The Composer consumes it, so
|
|
68
|
+
Composers nested in those parts are unaffected. */
|
|
69
|
+
export declare function ComposerOutlet({ parts, renderCard, className, children }: ComposerOutletProps): import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
export interface ComposerProps {
|
|
71
|
+
/** Controlled draft Markdown. */
|
|
72
|
+
value?: string;
|
|
73
|
+
defaultValue?: string;
|
|
74
|
+
onValueChange?: (markdown: string) => void;
|
|
75
|
+
/** Controlled attachments (pasted/dropped/attached images). */
|
|
76
|
+
attachments?: ComposerAttachment[];
|
|
77
|
+
defaultAttachments?: ComposerAttachment[];
|
|
78
|
+
onAttachmentsChange?: (attachments: ComposerAttachment[]) => void;
|
|
79
|
+
/** Tall drafting mode. */
|
|
80
|
+
expanded?: boolean;
|
|
81
|
+
defaultExpanded?: boolean;
|
|
82
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
83
|
+
/** An agent is replying: send is held and ComposerSend becomes a stop control. */
|
|
84
|
+
streaming?: boolean;
|
|
85
|
+
onStop?: () => void;
|
|
86
|
+
/** Called with the trimmed Markdown (attachment chips as `attachment:` refs) and the attachments. */
|
|
87
|
+
onSubmit?: (markdown: string, attachments: ComposerAttachment[]) => void;
|
|
88
|
+
/**
|
|
89
|
+
* The image annotator the AnnotateLightbox runs when an attachment is pressed. Defaults to the nearest
|
|
90
|
+
* ComposerAnnotatorProvider's, else `PencilKitAnnotator`; `null` opts out (pressing an attachment then opens a
|
|
91
|
+
* plain preview).
|
|
92
|
+
*/
|
|
93
|
+
annotator?: ComposerAnnotator | null;
|
|
94
|
+
/** A fixed drawing surface for the AnnotateLightbox instead of an `annotator` (its first <svg> is flattened). */
|
|
95
|
+
annotateCanvas?: React.ReactNode;
|
|
96
|
+
/** Collapse state: the full card, a single-row `compact` pill, or a `fab`. */
|
|
97
|
+
collapsed?: ComposerCollapse;
|
|
98
|
+
defaultCollapsed?: ComposerCollapse;
|
|
99
|
+
onCollapsedChange?: (collapsed: ComposerCollapse) => void;
|
|
100
|
+
/**
|
|
101
|
+
* A scroller beside the composer (a chat transcript). Scrolling away from its anchor (up, away from the
|
|
102
|
+
* newest message, by default) collapses the composer to `compact`; with `collapseTo="fab"` a flick or a long
|
|
103
|
+
* scroll away folds it into a FAB — the card morphing into the button as one shape. Scrolling back near the
|
|
104
|
+
* anchor, or tapping the FAB, restores it. Never collapses while the composer has focus, an attachment, or the
|
|
105
|
+
* annotator open, and never folds a draft or a reply into the FAB.
|
|
106
|
+
*/
|
|
107
|
+
collapseOnScroll?: React.RefObject<HTMLElement | null>;
|
|
108
|
+
/** How far scrolling collapses the composer (default `compact`). */
|
|
109
|
+
collapseTo?: 'compact' | 'fab';
|
|
110
|
+
/**
|
|
111
|
+
* Which end of the scroller is "home". `bottom` (default, chats): the transcript rests at its newest
|
|
112
|
+
* message, scrolling up collapses and scrolling back down restores. `top` (documents): the reverse.
|
|
113
|
+
*/
|
|
114
|
+
collapseAnchor?: 'bottom' | 'top';
|
|
115
|
+
/** Where the FAB sits in the composer's box. */
|
|
116
|
+
fabPosition?: 'start' | 'center' | 'end';
|
|
117
|
+
/** The FAB's icon (defaults to a compose glyph). */
|
|
118
|
+
fabIcon?: React.ReactNode;
|
|
119
|
+
children?: React.ReactNode;
|
|
120
|
+
className?: string;
|
|
121
|
+
style?: React.CSSProperties;
|
|
122
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
123
|
+
}
|
|
124
|
+
export declare function Composer({ value: valueProp, defaultValue, onValueChange, attachments: attachmentsProp, defaultAttachments, onAttachmentsChange, expanded: expandedProp, defaultExpanded, onExpandedChange, streaming, onStop, onSubmit, annotator: annotatorProp, annotateCanvas, collapsed: collapsedProp, defaultCollapsed, onCollapsedChange, collapseOnScroll, collapseTo, collapseAnchor, fabPosition, fabIcon, children, className, style, ref, }: ComposerProps): import("react/jsx-runtime").JSX.Element;
|
|
125
|
+
export declare const composerFabVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
126
|
+
export interface ComposerFabProps extends Omit<ButtonProps, 'children'> {
|
|
127
|
+
className?: string;
|
|
128
|
+
style?: React.CSSProperties;
|
|
129
|
+
children?: React.ReactNode;
|
|
130
|
+
}
|
|
131
|
+
/** The folded composer: a round button (a Composer in `fab` mode renders one; FloatingChat reuses it). */
|
|
132
|
+
export declare function ComposerFab({ className, children, 'aria-label': ariaLabel, ...props }: ComposerFabProps): import("react/jsx-runtime").JSX.Element;
|
|
133
|
+
/**
|
|
134
|
+
* The option pills (model, effort, access…). They render in place — the footer — and, while the composer is
|
|
135
|
+
* `compact`, move into the `ComposerOptionsOutlet` (e.g. in the bottom bump). The same elements move (a stable
|
|
136
|
+
* portal host is re-attached), so menus keep their state.
|
|
137
|
+
*/
|
|
138
|
+
export declare function ComposerOptions({ children }: {
|
|
139
|
+
children?: React.ReactNode;
|
|
140
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
141
|
+
/** Where ComposerOptions go while the composer is compact (typically in the bottom bump), after a separator. */
|
|
142
|
+
export declare function ComposerOptionsOutlet({ className }: {
|
|
143
|
+
className?: string;
|
|
144
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
145
|
+
export declare const composerCardVariants: (props?: ({
|
|
146
|
+
size?: "default" | "lg" | null | undefined;
|
|
147
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
148
|
+
export interface ComposerCardProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof composerCardVariants> {
|
|
149
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
150
|
+
}
|
|
151
|
+
/** The bordered surface. Holds the input and its addons; an outlet may wrap it. */
|
|
152
|
+
export declare function ComposerCard({ size, className, ref, children, ...props }: ComposerCardProps): import("react/jsx-runtime").JSX.Element;
|
|
153
|
+
export declare const composerAddonVariants: (props?: ({
|
|
154
|
+
align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
|
|
155
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
156
|
+
export interface ComposerAddonProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof composerAddonVariants> {
|
|
157
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
158
|
+
}
|
|
159
|
+
/** A row above/below the input (`block-*`) or a column beside it (`inline-*`), like InputGroupAddon. */
|
|
160
|
+
export declare function ComposerAddon({ align, className, ref, ...props }: ComposerAddonProps): import("react/jsx-runtime").JSX.Element;
|
|
161
|
+
/** The footer row: `ComposerAddon align="block-end"` that wraps its controls. While the composer is compact it
|
|
162
|
+
becomes the inline-end column of the single row (its ComposerOptions move to the bump). */
|
|
163
|
+
export declare function ComposerFooter({ className, ...props }: Omit<ComposerAddonProps, 'align'>): import("react/jsx-runtime").JSX.Element;
|
|
164
|
+
/** Pushes the controls after it to the end of a row. */
|
|
165
|
+
export declare function ComposerSpacer({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
166
|
+
/** A thin vertical rule between footer pills. */
|
|
167
|
+
export declare function ComposerSeparator({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
168
|
+
/** Muted inline text with an optional leading icon (a bump's "Local checkout", a footer hint). */
|
|
169
|
+
export declare function ComposerText({ icon, className, children, ...props }: React.HTMLAttributes<HTMLSpanElement> & {
|
|
170
|
+
icon?: WIconName;
|
|
171
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
172
|
+
export declare const composerButtonVariants: (props?: ({
|
|
173
|
+
variant?: "primary" | "destructive" | "ghost" | "pill" | null | undefined;
|
|
174
|
+
size?: "round" | "icon" | "pill" | null | undefined;
|
|
175
|
+
tint?: boolean | null | undefined;
|
|
176
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
177
|
+
export interface ComposerButtonProps extends ButtonProps, VariantProps<typeof composerButtonVariants> {
|
|
178
|
+
className?: string;
|
|
179
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
180
|
+
}
|
|
181
|
+
/** A react-aria Button in the composer's styles: `ghost` icon button, option `pill`, `primary` / `destructive` circles. */
|
|
182
|
+
export declare function ComposerButton({ variant, size, tint, className, ...props }: ComposerButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
183
|
+
/** The pill face: optional icon, label, chevron. */
|
|
184
|
+
export declare function ComposerPillLabel({ icon, children }: {
|
|
185
|
+
icon?: React.ReactNode;
|
|
186
|
+
children?: React.ReactNode;
|
|
187
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
188
|
+
export interface ComposerSelectOption {
|
|
189
|
+
id: string;
|
|
190
|
+
label: string;
|
|
191
|
+
/** Text shown on the pill when selected (defaults to `label`). */
|
|
192
|
+
short?: string;
|
|
193
|
+
description?: string;
|
|
194
|
+
}
|
|
195
|
+
export interface ComposerSelectProps {
|
|
196
|
+
'aria-label': string;
|
|
197
|
+
options: ComposerSelectOption[];
|
|
198
|
+
value?: string;
|
|
199
|
+
defaultValue?: string;
|
|
200
|
+
onChange?: (id: string) => void;
|
|
201
|
+
/** Leading icon (WIcon name or node). */
|
|
202
|
+
icon?: WIconName | React.ReactNode;
|
|
203
|
+
tint?: boolean;
|
|
204
|
+
className?: string;
|
|
205
|
+
/** Popover min width. */
|
|
206
|
+
menuClassName?: string;
|
|
207
|
+
}
|
|
208
|
+
export declare const composerMenuItemVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
209
|
+
export declare function ComposerMenuItem({ className, children, ...props }: MenuItemProps & {
|
|
210
|
+
className?: string;
|
|
211
|
+
children?: React.ReactNode;
|
|
212
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
213
|
+
/** An option pill that opens a react-aria Menu of choices (effort, access, …). Ticks on selection. */
|
|
214
|
+
export declare function ComposerSelect({ 'aria-label': ariaLabel, options, value: valueProp, defaultValue, onChange, icon, tint, className, menuClassName, }: ComposerSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
215
|
+
export interface ComposerStopProps extends Omit<ComposerButtonProps, 'variant'> {
|
|
216
|
+
/** `ring`: a spinning progress ring with a stop square (Workbench); `solid`: a red circle (T3 Code). */
|
|
217
|
+
variant?: 'ring' | 'solid';
|
|
218
|
+
/** Render even when not streaming. */
|
|
219
|
+
forceMount?: boolean;
|
|
220
|
+
}
|
|
221
|
+
/** Stops the reply. Renders only while streaming; pops in and out beside its neighbours. */
|
|
222
|
+
export declare function ComposerStop({ variant, forceMount, className, ...props }: ComposerStopProps): import("react/jsx-runtime").JSX.Element;
|
|
223
|
+
export interface ComposerSendProps extends Omit<ComposerButtonProps, 'variant'> {
|
|
224
|
+
/** While streaming, become the stop control (default). `false` keeps the send circle (pair it with ComposerStop). */
|
|
225
|
+
morph?: boolean;
|
|
226
|
+
/** The stop control's look when morphing. */
|
|
227
|
+
stopVariant?: ComposerStopProps['variant'];
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* The send circle; disabled while there is nothing to send. While streaming it morphs into the stop control —
|
|
231
|
+
* the same button: the fill drains (ring) or turns red (solid) and the arrow turns into the stop square.
|
|
232
|
+
*/
|
|
233
|
+
export declare function ComposerSend({ morph, stopVariant, className, ...props }: ComposerSendProps): import("react/jsx-runtime").JSX.Element;
|
|
234
|
+
/** Paperclip → file picker → image attachments (inserted as chips at the caret). */
|
|
235
|
+
export declare function ComposerAttach({ className, accept, ...props }: Omit<ComposerButtonProps, 'variant'> & {
|
|
236
|
+
accept?: string;
|
|
237
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
238
|
+
/** Toggles the tall drafting mode. Sits in the card's top-right corner unless restyled. */
|
|
239
|
+
export declare function ComposerExpand({ className }: {
|
|
240
|
+
className?: string;
|
|
241
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
242
|
+
/**
|
|
243
|
+
* Thumbnails of the attachments: click to annotate, ✕ to remove (its chip goes too). A block-start addon.
|
|
244
|
+
* The strip opens and closes as a height morph, and thumbnails pop in and out while their neighbours slide.
|
|
245
|
+
*/
|
|
246
|
+
export declare function ComposerAttachments({ className, ...props }: Omit<ComposerAddonProps, 'align'>): import("react/jsx-runtime").JSX.Element;
|
|
247
|
+
export interface ComposerInputProps {
|
|
248
|
+
placeholder?: string;
|
|
249
|
+
autoFocus?: boolean;
|
|
250
|
+
/** How pasted/dropped images enter: attachment chips (default) or inline image blocks. */
|
|
251
|
+
imagePaste?: 'chip' | 'inline';
|
|
252
|
+
slashMenu?: boolean;
|
|
253
|
+
references?: GitbookEditorProps['references'];
|
|
254
|
+
className?: string;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* The Docstream WYSIWYG editor. Enter sends from a plain paragraph (lists, quotes, code keep their own Enter),
|
|
258
|
+
* ⌘/Ctrl+Enter always sends, Shift+Enter breaks the line; pasted Markdown becomes structure; pasted or dropped
|
|
259
|
+
* images become attachment chips (hover previews, click annotates).
|
|
260
|
+
*/
|
|
261
|
+
export declare function ComposerInput({ placeholder, autoFocus, imagePaste, slashMenu, references, className, }: ComposerInputProps): import("react/jsx-runtime").JSX.Element;
|
|
262
|
+
export declare const composerBumpVariants: (props?: ({
|
|
263
|
+
side?: "bottom" | "top" | null | undefined;
|
|
264
|
+
variant?: "attached" | "detached" | "flush" | null | undefined;
|
|
265
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
266
|
+
export interface ComposerBumpContextValue {
|
|
267
|
+
side: 'top' | 'bottom';
|
|
268
|
+
draggable: boolean;
|
|
269
|
+
open: boolean;
|
|
270
|
+
setOpen: (open: boolean) => void;
|
|
271
|
+
/** Current revealed body height (px). */
|
|
272
|
+
reveal: number;
|
|
273
|
+
/** 0 at rest (peek), 1 fully open. */
|
|
274
|
+
progress: number;
|
|
275
|
+
peek: number;
|
|
276
|
+
maxReveal: number;
|
|
277
|
+
dragging: boolean;
|
|
278
|
+
/** @internal */
|
|
279
|
+
handleProps: SpringSheetDragState['handlers'] | null;
|
|
280
|
+
/** @internal */
|
|
281
|
+
toggle: () => void;
|
|
282
|
+
/** @internal */
|
|
283
|
+
windowRef: React.RefObject<HTMLDivElement | null>;
|
|
284
|
+
contentId: string;
|
|
285
|
+
}
|
|
286
|
+
export declare function useComposerBump(): ComposerBumpContextValue;
|
|
287
|
+
export interface ComposerBumpProgress {
|
|
288
|
+
/** 0 at rest, 1 fully open. */
|
|
289
|
+
progress: number;
|
|
290
|
+
/** Revealed body height (px). */
|
|
291
|
+
reveal: number;
|
|
292
|
+
/** 0–1 fold towards a FAB while dragging below rest (minimizable bumps). */
|
|
293
|
+
minimize: number;
|
|
294
|
+
dragging: boolean;
|
|
295
|
+
/** The spring is carrying the bump to rest (hosts driving CSS from progress should not transition then). */
|
|
296
|
+
settling: boolean;
|
|
297
|
+
}
|
|
298
|
+
export interface ComposerBumpProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onDrag'>, VariantProps<typeof composerBumpVariants> {
|
|
299
|
+
side?: 'top' | 'bottom';
|
|
300
|
+
/** Horizontal inset from the card edges for `attached` bumps (px). */
|
|
301
|
+
inset?: number;
|
|
302
|
+
/** A top bump whose `ComposerBumpHandle` drags its `ComposerBumpContent` open, like a sheet. */
|
|
303
|
+
draggable?: boolean;
|
|
304
|
+
open?: boolean;
|
|
305
|
+
defaultOpen?: boolean;
|
|
306
|
+
onOpenChange?: (open: boolean) => void;
|
|
307
|
+
/** Body height kept visible while closed. */
|
|
308
|
+
peek?: number;
|
|
309
|
+
/** Body height when open, when there are no `bounds` to fill. */
|
|
310
|
+
maxReveal?: number;
|
|
311
|
+
/** Grow until the bump reaches this element's top edge (minus `boundsInset`). */
|
|
312
|
+
bounds?: React.RefObject<HTMLElement | null>;
|
|
313
|
+
boundsInset?: number;
|
|
314
|
+
/** Dragging below rest folds the host's surface into a FAB (reported through onProgressChange / onMinimizedChange). */
|
|
315
|
+
minimizable?: boolean;
|
|
316
|
+
minimized?: boolean;
|
|
317
|
+
onMinimizedChange?: (minimized: boolean) => void;
|
|
318
|
+
/** Fires as the bump moves, so a host can drive a scrim, a width, a FAB. */
|
|
319
|
+
onProgressChange?: (progress: ComposerBumpProgress) => void;
|
|
320
|
+
/** Escape closes an open draggable bump (default). */
|
|
321
|
+
closeOnEscape?: boolean;
|
|
322
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* A strip attached above (`side="top"`) or below the card. Bumps order themselves by side, so they can be
|
|
326
|
+
* placed anywhere among the Composer's children. With `draggable`, a top bump is a sheet: its handle pulls
|
|
327
|
+
* the content open one-to-one with the pointer and releases snap open or closed with a tick.
|
|
328
|
+
*/
|
|
329
|
+
export declare function ComposerBump({ side, variant, inset, draggable, open: openProp, defaultOpen, onOpenChange, peek: requestedPeek, maxReveal: maxRevealProp, bounds, boundsInset, minimizable, minimized, onMinimizedChange, onProgressChange, closeOnEscape, className, style, children, ref, ...props }: ComposerBumpProps): import("react/jsx-runtime").JSX.Element;
|
|
330
|
+
export interface ComposerBumpHandleProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
331
|
+
/** Show the grip bar above the row (draggable bumps; default true). */
|
|
332
|
+
grip?: boolean;
|
|
333
|
+
/** Accessible name of the open/close control. */
|
|
334
|
+
label?: string;
|
|
335
|
+
}
|
|
336
|
+
/** The bump's row. In a draggable bump it is the drag handle: pull up to open, tap the grip to toggle. */
|
|
337
|
+
export declare function ComposerBumpHandle({ grip, label, className, children, ...props }: ComposerBumpHandleProps): import("react/jsx-runtime").JSX.Element;
|
|
338
|
+
export interface ComposerBumpContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
339
|
+
/** Accessible name of the revealed region. */
|
|
340
|
+
label?: string;
|
|
341
|
+
}
|
|
342
|
+
/** The body a draggable bump reveals above its handle. Laid out at its full open height and pinned to the
|
|
343
|
+
handle, so it slides out without reflowing mid-drag. */
|
|
344
|
+
export declare function ComposerBumpContent({ label, className, children, ...props }: ComposerBumpContentProps): import("react/jsx-runtime").JSX.Element;
|
|
345
|
+
export interface AnnotateLightboxProps {
|
|
346
|
+
src: string;
|
|
347
|
+
onClose: () => void;
|
|
348
|
+
onSave: (dataUrl: string) => void;
|
|
349
|
+
/** A fixed drawing surface (its first <svg> is flattened), instead of an annotator. */
|
|
350
|
+
canvas?: React.ReactNode;
|
|
351
|
+
/** The annotator to run; defaults to the nearest ComposerAnnotatorProvider's, else PencilKit. `null` forces the preview. */
|
|
352
|
+
annotator?: ComposerAnnotator | null;
|
|
353
|
+
/** The element the image zooms out of on open and back into on close (a thumbnail); else it scales in. */
|
|
354
|
+
origin?: () => HTMLElement | null;
|
|
355
|
+
}
|
|
356
|
+
export declare function AnnotateLightbox({ src, onClose, onSave, canvas, annotator: annotatorProp, origin }: AnnotateLightboxProps): import("react/jsx-runtime").JSX.Element;
|
|
357
|
+
export {};
|
|
358
|
+
//# sourceMappingURL=composer.d.ts.map
|