@brett_lamy/ui 1.1.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 +37 -23
- 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 +17 -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 +210 -0
- package/dist/components/command-menu.d.ts.map +1 -0
- 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} +3 -5
- 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 +11 -11
- 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} +3 -3
- package/dist/components/conversation.d.ts.map +1 -0
- package/dist/components/conversation.js +357 -0
- package/dist/components/credenza.d.ts +7 -2
- 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.d.ts +14 -2
- package/dist/components/edge-drawer.d.ts.map +1 -1
- 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} +26 -3
- 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} +24 -4
- 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/components/icon-button.d.ts +19 -0
- 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 +15 -1
- 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 +6 -3
- package/dist/components/morph.d.ts.map +1 -1
- package/dist/components/morph.js +89 -0
- package/dist/components/navigation-stack.d.ts +27 -2
- 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/{lib → components}/pencilkit/constants.d.ts +8 -8
- 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 +8 -6
- 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 +34 -15
- 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 +2 -2
- 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 +16 -2
- 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 +10 -4
- package/dist/components/slider.d.ts.map +1 -1
- package/dist/components/slider.js +98 -0
- package/dist/components/snap-sheet.d.ts +13 -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 +34 -5
- package/dist/components/split-view.d.ts.map +1 -1
- package/dist/components/split-view.js +1060 -0
- package/dist/components/switch.d.ts +1 -1
- 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 +8 -7
- 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 +8 -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} +4 -5
- 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 +37 -80
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +91 -20192
- package/dist/lib/container.d.ts.map +1 -1
- package/dist/lib/container.js +49 -0
- package/dist/lib/icon-shapes/chat.d.ts +32 -0
- package/dist/lib/icon-shapes/chat.d.ts.map +1 -0
- package/dist/lib/icon-shapes/chat.js +13 -0
- package/dist/lib/icon-shapes/pencilkit.d.ts +49 -0
- package/dist/lib/icon-shapes/pencilkit.d.ts.map +1 -0
- package/dist/lib/icon-shapes/pencilkit.js +20 -0
- package/dist/lib/icon-shapes/workbench.d.ts +199 -0
- package/dist/lib/icon-shapes/workbench.d.ts.map +1 -0
- package/dist/lib/icon-shapes/workbench.js +47 -0
- package/dist/lib/icon.d.ts +352 -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.d.ts +1 -1
- package/dist/lib/primitives.d.ts.map +1 -1
- package/dist/lib/primitives.js +8 -0
- package/dist/lib/qr.js +552 -0
- package/dist/lib/row-label.d.ts +9 -0
- package/dist/lib/row-label.d.ts.map +1 -0
- package/dist/lib/row-label.js +10 -0
- package/dist/lib/sheet-drag.d.ts +22 -7
- 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 +61 -5
- 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 +265 -0
- package/package.json +8 -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 -9
- 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/channel-list.d.ts +0 -35
- package/dist/components/chat/channel-list.d.ts.map +0 -1
- package/dist/components/chat/channel-list.stories.d.ts +0 -13
- package/dist/components/chat/channel-list.stories.d.ts.map +0 -1
- package/dist/components/chat/chat-avatar.d.ts +0 -13
- package/dist/components/chat/chat-avatar.d.ts.map +0 -1
- package/dist/components/chat/chat-avatar.stories.d.ts +0 -9
- package/dist/components/chat/chat-avatar.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 -7
- package/dist/components/chat/chat-column.stories.d.ts.map +0 -1
- package/dist/components/chat/chat-composer.d.ts +0 -22
- package/dist/components/chat/chat-composer.d.ts.map +0 -1
- package/dist/components/chat/chat-composer.stories.d.ts +0 -16
- package/dist/components/chat/chat-composer.stories.d.ts.map +0 -1
- package/dist/components/chat/chat.fixtures.d.ts +0 -29
- package/dist/components/chat/chat.fixtures.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/member-list.d.ts +0 -21
- package/dist/components/chat/member-list.d.ts.map +0 -1
- package/dist/components/chat/message-list.d.ts +0 -34
- package/dist/components/chat/message-list.d.ts.map +0 -1
- package/dist/components/chat/message.d.ts +0 -47
- package/dist/components/chat/message.d.ts.map +0 -1
- package/dist/components/chat/message.stories.d.ts +0 -30
- package/dist/components/chat/message.stories.d.ts.map +0 -1
- package/dist/components/chat/progress-stepper.d.ts.map +0 -1
- package/dist/components/chat/rich-text.d.ts +0 -8
- package/dist/components/chat/rich-text.d.ts.map +0 -1
- package/dist/components/chat/rich-text.stories.d.ts +0 -9
- package/dist/components/chat/rich-text.stories.d.ts.map +0 -1
- package/dist/components/chat/server-header.d.ts +0 -10
- package/dist/components/chat/server-header.d.ts.map +0 -1
- package/dist/components/chat/thread-preview.d.ts +0 -25
- package/dist/components/chat/thread-preview.d.ts.map +0 -1
- package/dist/components/chat/thread-preview.stories.d.ts +0 -18
- package/dist/components/chat/thread-preview.stories.d.ts.map +0 -1
- package/dist/components/chat/user-panel.d.ts +0 -16
- package/dist/components/chat/user-panel.d.ts.map +0 -1
- package/dist/components/chat/workspace-rail.d.ts +0 -56
- package/dist/components/chat/workspace-rail.d.ts.map +0 -1
- package/dist/components/chat/workspace-rail.stories.d.ts +0 -12
- package/dist/components/chat/workspace-rail.stories.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/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 -21
- 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/pencilkit/pk-icon.d.ts +0 -8
- package/dist/components/pencilkit/pk-icon.d.ts.map +0 -1
- package/dist/components/pill-button.d.ts +0 -11
- package/dist/components/pill-button.d.ts.map +0 -1
- package/dist/components/pill-button.stories.d.ts +0 -9
- package/dist/components/pill-button.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 -51
- 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 -28
- 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 +0 -12
- 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 -43
- 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/thread-sidebar.d.ts +0 -100
- package/dist/components/workbench/thread-sidebar.d.ts.map +0 -1
- package/dist/components/workbench/thread-sidebar.stories.d.ts +0 -9
- package/dist/components/workbench/thread-sidebar.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 -72
- 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 -15
- 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 -9
- 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-icon.d.ts +0 -24
- package/dist/lib/chat/chat-icon.d.ts.map +0 -1
- package/dist/lib/chat/chat-shell-context.d.ts +0 -19
- package/dist/lib/chat/chat-shell-context.d.ts.map +0 -1
- package/dist/lib/chat/chat-tokens.d.ts +0 -72
- package/dist/lib/chat/chat-tokens.d.ts.map +0 -1
- package/dist/lib/chat/chat-users.d.ts +0 -18
- package/dist/lib/chat/chat-users.d.ts.map +0 -1
- package/dist/lib/chat/kvib.d.ts +0 -3
- package/dist/lib/chat/kvib.d.ts.map +0 -1
- package/dist/lib/chat/persistent-host.d.ts.map +0 -1
- package/dist/lib/chat/title-ref.d.ts +0 -3
- package/dist/lib/chat/title-ref.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 +0 -29
- package/dist/lib/workbench/icons.d.ts.map +0 -1
- package/dist/lib/workbench/motion.d.ts +0 -83
- 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 -6
- 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 -86
- package/dist/templates/chat-shell.d.ts.map +0 -1
- package/dist/templates/chat-shell.stories.d.ts +0 -22
- package/dist/templates/chat-shell.stories.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/components/{chat/progress-stepper.d.ts → progress-stepper.d.ts} +0 -0
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
/** The sliding panel: its edge, and (while open) the lifted shadow. Closed, it waits just past its edge. */
|
|
4
|
+
export declare const edgeDrawerVariants: (props?: ({
|
|
5
|
+
side?: "left" | "right" | null | undefined;
|
|
6
|
+
open?: boolean | null | undefined;
|
|
7
|
+
lifted?: boolean | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
export interface EdgeDrawerProps extends Pick<VariantProps<typeof edgeDrawerVariants>, 'side'> {
|
|
3
10
|
side?: 'left' | 'right';
|
|
4
11
|
open: boolean;
|
|
5
12
|
onClose?: () => void;
|
|
@@ -7,11 +14,16 @@ export interface EdgeDrawerProps {
|
|
|
7
14
|
maxWidth?: number | string;
|
|
8
15
|
/** z-index of the scrim; the panel sits one above it */
|
|
9
16
|
zIndex?: number;
|
|
17
|
+
/** Classes for the scrim (default `bg-black/45`; e.g. `bg-overlay`, `bg-transparent`). */
|
|
18
|
+
scrimClassName?: string;
|
|
19
|
+
/** Any CSS background for the scrim — a runtime override of `scrimClassName`'s color. */
|
|
10
20
|
scrim?: string;
|
|
21
|
+
/** Any CSS box-shadow for the open panel, replacing the default lift (`none` for flat). Or pass `shadow-*`
|
|
22
|
+
* utilities in `className`. */
|
|
11
23
|
shadow?: string;
|
|
12
24
|
children?: ReactNode;
|
|
13
25
|
className?: string;
|
|
14
26
|
style?: CSSProperties;
|
|
15
27
|
}
|
|
16
|
-
export declare function EdgeDrawer({ side, open, onClose, width, maxWidth, zIndex, scrim, shadow, children, className, style, }: EdgeDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function EdgeDrawer({ side, open, onClose, width, maxWidth, zIndex, scrimClassName, scrim, shadow, children, className, style, }: EdgeDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
17
29
|
//# sourceMappingURL=edge-drawer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edge-drawer.d.ts","sourceRoot":"","sources":["../../src/components/edge-drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"edge-drawer.d.ts","sourceRoot":"","sources":["../../src/components/edge-drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAOlE,4GAA4G;AAC5G,eAAO,MAAM,kBAAkB;;;;8EAgB9B,CAAC;AAEF,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5F,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0FAA0F;IAC1F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yFAAyF;IACzF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;oCACgC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAID,wBAAgB,UAAU,CAAC,EACzB,IAAa,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAW,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EACzF,QAAQ,EAAE,SAAS,EAAE,KAAK,GAC3B,EAAE,eAAe,2CAuCjB"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { cn as e } from "../lib/utils.js";
|
|
2
|
+
import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
3
|
+
import { cva as i } from "class-variance-authority";
|
|
4
|
+
//#region src/components/edge-drawer.tsx
|
|
5
|
+
var a = i("absolute inset-y-0 z-(--edge-drawer-z) transition-[translate,box-shadow] duration-spring-tray ease-spring-tray motion-reduce:transition-none", {
|
|
6
|
+
variants: {
|
|
7
|
+
side: {
|
|
8
|
+
left: "left-0",
|
|
9
|
+
right: "right-0"
|
|
10
|
+
},
|
|
11
|
+
open: {
|
|
12
|
+
true: "",
|
|
13
|
+
false: ""
|
|
14
|
+
},
|
|
15
|
+
lifted: {
|
|
16
|
+
true: "",
|
|
17
|
+
false: ""
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
compoundVariants: [
|
|
21
|
+
{
|
|
22
|
+
open: !0,
|
|
23
|
+
lifted: !0,
|
|
24
|
+
class: "shadow-[0_0_44px_black] shadow-black/50"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
side: "left",
|
|
28
|
+
open: !1,
|
|
29
|
+
class: "-translate-x-[103%]"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
side: "right",
|
|
33
|
+
open: !1,
|
|
34
|
+
class: "translate-x-[103%]"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
defaultVariants: {
|
|
38
|
+
side: "left",
|
|
39
|
+
open: !1,
|
|
40
|
+
lifted: !0
|
|
41
|
+
}
|
|
42
|
+
}), o = (e) => typeof e == "number" ? e + "px" : e;
|
|
43
|
+
function s({ side: i = "left", open: s, onClose: c, width: l, maxWidth: u, zIndex: d = 30, scrimClassName: f, scrim: p, shadow: m, children: h, className: g, style: _ }) {
|
|
44
|
+
return /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n("div", {
|
|
45
|
+
"data-slot": "edge-drawer-scrim",
|
|
46
|
+
onClick: c,
|
|
47
|
+
className: e("absolute inset-0 z-(--edge-drawer-z) bg-black/45 transition-opacity duration-spring-smooth ease-spring-smooth", s ? "pointer-events-auto opacity-100" : "pointer-events-none opacity-0", f, p != null && "bg-(--edge-drawer-scrim)"),
|
|
48
|
+
style: {
|
|
49
|
+
"--edge-drawer-z": d,
|
|
50
|
+
...p == null ? null : { "--edge-drawer-scrim": p }
|
|
51
|
+
}
|
|
52
|
+
}), /* @__PURE__ */ n("div", {
|
|
53
|
+
"data-slot": "edge-drawer",
|
|
54
|
+
"data-side": i,
|
|
55
|
+
"data-open": s,
|
|
56
|
+
"aria-hidden": !s,
|
|
57
|
+
className: e(a({
|
|
58
|
+
side: i,
|
|
59
|
+
open: s,
|
|
60
|
+
lifted: m == null
|
|
61
|
+
}), l != null && "w-(--edge-drawer-w)", u != null && "max-w-(--edge-drawer-max-w)", m != null && s && "[box-shadow:var(--edge-drawer-shadow)]", g),
|
|
62
|
+
style: {
|
|
63
|
+
"--edge-drawer-z": d + 1,
|
|
64
|
+
...l == null ? null : { "--edge-drawer-w": o(l) },
|
|
65
|
+
...u == null ? null : { "--edge-drawer-max-w": o(u) },
|
|
66
|
+
...m == null ? null : { "--edge-drawer-shadow": m },
|
|
67
|
+
..._
|
|
68
|
+
},
|
|
69
|
+
children: h
|
|
70
|
+
})] });
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
export { s as EdgeDrawer, a as edgeDrawerVariants };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit-bar.d.ts","sourceRoot":"","sources":["../../src/components/edit-bar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"edit-bar.d.ts","sourceRoot":"","sources":["../../src/components/edit-bar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAI3C,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAID,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,YAAY,2CAazF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
import { Button as r } from "react-aria-components";
|
|
5
|
+
//#region src/components/edit-bar.tsx
|
|
6
|
+
var i = "bl-btn cursor-pointer border-0 bg-transparent px-1 py-2 [font-family:inherit] text-[16.5px] data-disabled:opacity-35";
|
|
7
|
+
function a({ count: a, allFav: o, onFav: s, onDelete: c, className: l, style: u }) {
|
|
8
|
+
return /* @__PURE__ */ n("div", {
|
|
9
|
+
"data-slot": "edit-bar",
|
|
10
|
+
className: e("absolute inset-x-0 bottom-0 z-130 box-border flex h-[62px] items-center [border-top:1px_solid_var(--border)] bg-bar px-4 pt-0 pb-1 backdrop-blur-[20px] backdrop-saturate-[1.7]", l),
|
|
11
|
+
style: u,
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ t(r, {
|
|
14
|
+
className: e(i, "text-primary"),
|
|
15
|
+
isDisabled: !a,
|
|
16
|
+
onPress: s,
|
|
17
|
+
children: o ? "Unfavorite" : "Favorite"
|
|
18
|
+
}),
|
|
19
|
+
/* @__PURE__ */ t("span", {
|
|
20
|
+
className: "flex-1 text-center text-footnote text-muted-foreground",
|
|
21
|
+
children: a ? a + " selected" : "Select items"
|
|
22
|
+
}),
|
|
23
|
+
/* @__PURE__ */ t(r, {
|
|
24
|
+
className: e(i, "text-destructive"),
|
|
25
|
+
isDisabled: !a,
|
|
26
|
+
onPress: c,
|
|
27
|
+
children: "Delete"
|
|
28
|
+
})
|
|
29
|
+
]
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { a as EditBar };
|
|
@@ -34,6 +34,10 @@ export interface FloatingChatProps {
|
|
|
34
34
|
scrollRef?: RefObject<HTMLElement | null>;
|
|
35
35
|
/** Resting position after the chat is dragged down into its FAB. */
|
|
36
36
|
fabPosition?: FloatingChatFabPosition;
|
|
37
|
+
/** Controlled fold into the FAB (dragging below rest folds it; the FAB unfolds it). */
|
|
38
|
+
minimized?: boolean;
|
|
39
|
+
defaultMinimized?: boolean;
|
|
40
|
+
onMinimizedChange?: (minimized: boolean) => void;
|
|
37
41
|
/** Inset of the floating composer from the host edges. */
|
|
38
42
|
gutter?: number;
|
|
39
43
|
/**
|
|
@@ -54,6 +58,25 @@ export interface FloatingChatProps {
|
|
|
54
58
|
className?: string;
|
|
55
59
|
style?: CSSProperties;
|
|
56
60
|
}
|
|
61
|
+
/** The layer. --ck-sheet-surface / --ck-sheet-line are the RGB triplets the glass mixes its alphas into (dark glass
|
|
62
|
+
unless the tone is light). ck-floating-chat keeps the host's palette for the transcript (styles.css). */
|
|
63
|
+
export declare const floatingChatVariants: (props?: ({
|
|
64
|
+
tone?: "auto" | "dark" | "light" | null | undefined;
|
|
65
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
66
|
+
/** The transcript's bump on top of the composer: glass that firms up as it grows, or an opaque card. */
|
|
67
|
+
export declare const floatingChatBumpVariants: (props?: ({
|
|
68
|
+
appearance?: "sheet" | "glass" | null | undefined;
|
|
69
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
70
|
+
/** The FAB the chat folds into: glazed or opaque, resting at one of eight spots. */
|
|
71
|
+
export declare const floatingChatFabVariants: (props?: ({
|
|
72
|
+
appearance?: "sheet" | "glass" | null | undefined;
|
|
73
|
+
position?: "top-left" | "top-center" | "top-right" | "center-left" | "center-right" | "bottom-left" | "bottom-center" | "bottom-right" | null | undefined;
|
|
74
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
75
|
+
/** The embedded Workbench Composer's theme scope: the bl-theme's `glass` (dark unless the chat's tone is light). */
|
|
76
|
+
export declare function glassScopeProps(tone: FloatingSheetTone): {
|
|
77
|
+
'data-theme-scope': "glass";
|
|
78
|
+
className: string;
|
|
79
|
+
};
|
|
57
80
|
/**
|
|
58
81
|
* The floating chat: the host's Workbench `Composer` floats over any positioned host, and the transcript
|
|
59
82
|
* hangs off a draggable top bump of that composer (added through a `ComposerOutlet`, so the composer itself
|
|
@@ -61,10 +84,10 @@ export interface FloatingChatProps {
|
|
|
61
84
|
* over a scrim; release snaps open or closed; Escape or the scrim closes it. Drag it down past rest to fold
|
|
62
85
|
* everything into a FAB.
|
|
63
86
|
*/
|
|
64
|
-
export declare function FloatingChat({ open: controlledOpen, defaultOpen, onOpenChange, working, workingLabel, onAdd, composing: controlledComposing, onComposingChange, hideOnScroll, scrollRef, fabPosition, gutter, peek, appearance, tone: toneProp, label, children, className, style, }: FloatingChatProps): import("react/jsx-runtime").JSX.Element;
|
|
87
|
+
export declare function FloatingChat({ open: controlledOpen, defaultOpen, onOpenChange, working, workingLabel, onAdd, composing: controlledComposing, onComposingChange, hideOnScroll, scrollRef, fabPosition, minimized: controlledMinimized, defaultMinimized, onMinimizedChange, gutter, peek, appearance, tone: toneProp, label, children, className, style, }: FloatingChatProps): import("react/jsx-runtime").JSX.Element;
|
|
65
88
|
export declare namespace FloatingChat {
|
|
66
|
-
var Chat: import("
|
|
67
|
-
var Composer: import("
|
|
89
|
+
var Chat: import("@/lib/container").SlotComponent;
|
|
90
|
+
var Composer: import("@/lib/container").SlotComponent;
|
|
68
91
|
var Context: import("react").Context<FloatingChatContextValue | null>;
|
|
69
92
|
var useFloatingChat: typeof import("./floating-chat").useFloatingChat;
|
|
70
93
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floating-chat.d.ts","sourceRoot":"","sources":["../../src/components/floating-chat.tsx"],"names":[],"mappings":"AACA,OAAO,EAQL,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AASf,OAAO,EAAkB,KAAK,uBAAuB,EAAE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springCss as t } from "../lib/motion.js";
|
|
4
|
+
import { Icon as n } from "../lib/icon.js";
|
|
5
|
+
import { themeScopeClass as r, useAppearance as i, useChromeHidden as a } from "../lib/theme.js";
|
|
6
|
+
import { collectSlots as ee, defineSlot as o } from "../lib/container.js";
|
|
7
|
+
import { ComposerBump as te, ComposerBumpContent as ne, ComposerBumpHandle as re, ComposerFab as ie, ComposerOutlet as ae } from "./composer/composer.js";
|
|
8
|
+
import { sheetToneProps as oe } from "./floating-sheet.js";
|
|
9
|
+
import { ChatHostContext as se } from "../lib/persistent-host.js";
|
|
10
|
+
import { createContext as s, useCallback as ce, useContext as c, useEffect as l, useLayoutEffect as u, useRef as d, useState as f } from "react";
|
|
11
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
12
|
+
import { Button as le } from "react-aria-components";
|
|
13
|
+
import { cva as h } from "class-variance-authority";
|
|
14
|
+
//#region src/components/floating-chat.tsx
|
|
15
|
+
var g = s(null);
|
|
16
|
+
function _() {
|
|
17
|
+
let e = c(g);
|
|
18
|
+
if (!e) throw Error("useFloatingChat must be used within <FloatingChat>");
|
|
19
|
+
return e;
|
|
20
|
+
}
|
|
21
|
+
var v = h("ck-floating-chat pointer-events-none absolute inset-0 z-40 text-foreground [font-family:var(--bl-font,-apple-system,BlinkMacSystemFont,\"SF_Pro_Text\",sans-serif)]", {
|
|
22
|
+
variants: { tone: {
|
|
23
|
+
auto: "[--ck-sheet-line:255,255,255] [--ck-sheet-surface:18,18,22]",
|
|
24
|
+
dark: "[--ck-sheet-line:255,255,255] [--ck-sheet-surface:18,18,22]",
|
|
25
|
+
light: "[--ck-sheet-line:0,0,0] [--ck-sheet-surface:250,250,252]"
|
|
26
|
+
} },
|
|
27
|
+
defaultVariants: { tone: "auto" }
|
|
28
|
+
}), y = h("ck-floating-chat__bump", {
|
|
29
|
+
variants: { appearance: {
|
|
30
|
+
glass: "border-[color:rgba(var(--ck-sheet-line),.14)] bg-[color:rgba(var(--ck-sheet-surface),calc(.5_+_.4_*_var(--bump-progress,0)))] [box-shadow:inset_0_1px_0_color-mix(in_srgb,var(--color-white)_12%,transparent)] backdrop-blur-[16px]",
|
|
31
|
+
sheet: "border-[color:rgba(var(--ck-sheet-line),.1)] bg-(--ck-host-card)"
|
|
32
|
+
} },
|
|
33
|
+
defaultVariants: { appearance: "glass" }
|
|
34
|
+
}), b = h("absolute border-[color:rgba(var(--ck-sheet-line),.14)] text-foreground", {
|
|
35
|
+
variants: {
|
|
36
|
+
appearance: {
|
|
37
|
+
glass: "bg-[color:rgba(var(--ck-sheet-surface),.62)]",
|
|
38
|
+
sheet: "bg-card"
|
|
39
|
+
},
|
|
40
|
+
position: {
|
|
41
|
+
"top-left": "top-(--ck-chat-gutter) left-(--ck-chat-gutter)",
|
|
42
|
+
"top-center": "top-(--ck-chat-gutter) left-1/2 -translate-x-1/2",
|
|
43
|
+
"top-right": "top-(--ck-chat-gutter) right-(--ck-chat-gutter)",
|
|
44
|
+
"center-left": "top-1/2 left-(--ck-chat-gutter) -translate-y-1/2",
|
|
45
|
+
"center-right": "top-1/2 right-(--ck-chat-gutter) -translate-y-1/2",
|
|
46
|
+
"bottom-left": "bottom-(--ck-chat-gutter) left-(--ck-chat-gutter)",
|
|
47
|
+
"bottom-center": "bottom-[max(var(--ck-chat-gutter),20px)] left-1/2 -translate-x-1/2",
|
|
48
|
+
"bottom-right": "bottom-(--ck-chat-gutter) right-(--ck-chat-gutter)"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
defaultVariants: {
|
|
52
|
+
appearance: "glass",
|
|
53
|
+
position: "bottom-center"
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
function x(e) {
|
|
57
|
+
return {
|
|
58
|
+
"data-theme-scope": "glass",
|
|
59
|
+
className: r(e === "light" ? "light" : "dark")
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function ue(e, t) {
|
|
63
|
+
let n = a(), [r, i] = f(!1);
|
|
64
|
+
return l(() => {
|
|
65
|
+
let n = t?.current;
|
|
66
|
+
if (!n || !e) {
|
|
67
|
+
i(!1);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
let r = n.scrollTop, a = () => {
|
|
71
|
+
let e = n.scrollTop, t = e - r;
|
|
72
|
+
r = e, e < 4 ? i(!1) : t > 3 ? i(!0) : t < -3 && i(!1);
|
|
73
|
+
};
|
|
74
|
+
return n.addEventListener("scroll", a, { passive: !0 }), () => n.removeEventListener("scroll", a);
|
|
75
|
+
}, [t, e]), e && (n || r);
|
|
76
|
+
}
|
|
77
|
+
function S({ open: r, defaultOpen: a = !1, onOpenChange: o, working: s = !1, workingLabel: h = "Working…", onAdd: _, composing: S, onComposingChange: de, hideOnScroll: fe = !0, scrollRef: pe, fabPosition: C = "bottom-center", minimized: w, defaultMinimized: me = !1, onMinimizedChange: he, gutter: T = 16, peek: ge = 0, appearance: E = "glass", tone: _e, label: ve = "Full chat", children: ye, className: be, style: xe }) {
|
|
78
|
+
let Se = i(), D = _e ?? Se ?? "auto", O = oe(D), k = x(D), A = d(null), [Ce, we] = f(a), [Te, j] = f(!s), [Ee, De] = f(me), [M, Oe] = f({
|
|
79
|
+
progress: 0,
|
|
80
|
+
reveal: 0,
|
|
81
|
+
minimize: 0,
|
|
82
|
+
dragging: !1,
|
|
83
|
+
settling: !1
|
|
84
|
+
}), N = c(se), P = r ?? Ce, F = S ?? Te, I = w ?? Ee, L = (e) => {
|
|
85
|
+
r ?? we(e), o?.(e);
|
|
86
|
+
}, R = (e) => {
|
|
87
|
+
S ?? j(e), de?.(e);
|
|
88
|
+
}, z = (e) => {
|
|
89
|
+
w ?? De(e), he?.(e);
|
|
90
|
+
};
|
|
91
|
+
l(() => {
|
|
92
|
+
S ?? j(!s);
|
|
93
|
+
}, [s]), l(() => {
|
|
94
|
+
P && I && z(!1);
|
|
95
|
+
}, [P]);
|
|
96
|
+
let B = ee(ye), V = s && !F, H = M.reveal > 0, U = ue(fe, pe) && !H, W = E === "glass", G = e("ck-floating-chat__composer", W ? "[&_[data-slot=composer-card]]:backdrop-blur-[16px]" : "[--card:var(--ck-host-card)]"), K = M.minimize, q = () => {
|
|
97
|
+
R(!0), _?.();
|
|
98
|
+
}, J = d(V);
|
|
99
|
+
J.current = V;
|
|
100
|
+
let Y = d(h);
|
|
101
|
+
Y.current = h;
|
|
102
|
+
let X = d(q);
|
|
103
|
+
X.current = q;
|
|
104
|
+
let Z = ce((t) => V ? /* @__PURE__ */ m("div", {
|
|
105
|
+
"data-slot": "floating-chat-card",
|
|
106
|
+
className: "relative z-1 min-w-0",
|
|
107
|
+
children: [/* @__PURE__ */ m(le, {
|
|
108
|
+
"data-slot": "floating-chat-working",
|
|
109
|
+
className: e("box-border flex min-h-row w-full animate-[ck-in_var(--duration-spring-smooth)_var(--ease-spring-smooth)_both] cursor-pointer items-center gap-[10px] rounded-[15px] border border-border bg-card px-[15px] py-1.5 text-left [font:inherit] text-foreground shadow-[0_6px_24px_black] shadow-black/7 dark:shadow-black/28 outline-none motion-reduce:animate-none data-focus-visible:ring-2 data-focus-visible:ring-primary/60", W && "backdrop-blur-[16px]"),
|
|
110
|
+
onPress: () => X.current(),
|
|
111
|
+
children: [
|
|
112
|
+
/* @__PURE__ */ p("span", {
|
|
113
|
+
className: "grid animate-[ck-floating-working_1.8s_ease-in-out_infinite] place-items-center text-muted-foreground motion-reduce:animate-none",
|
|
114
|
+
"aria-hidden": "true",
|
|
115
|
+
children: /* @__PURE__ */ p(n, {
|
|
116
|
+
name: "sparkle",
|
|
117
|
+
size: 18,
|
|
118
|
+
sw: 1.9
|
|
119
|
+
})
|
|
120
|
+
}),
|
|
121
|
+
/* @__PURE__ */ p("span", {
|
|
122
|
+
className: "min-w-0 flex-1 truncate text-subhead font-[560] text-muted-foreground",
|
|
123
|
+
children: Y.current
|
|
124
|
+
}),
|
|
125
|
+
/* @__PURE__ */ p(n, {
|
|
126
|
+
name: "plus",
|
|
127
|
+
size: 20,
|
|
128
|
+
sw: 1.9
|
|
129
|
+
}),
|
|
130
|
+
/* @__PURE__ */ p("span", {
|
|
131
|
+
className: "sr-only",
|
|
132
|
+
children: "Add something new"
|
|
133
|
+
})
|
|
134
|
+
]
|
|
135
|
+
}), /* @__PURE__ */ p("div", {
|
|
136
|
+
"data-inactive": "",
|
|
137
|
+
"aria-hidden": !0,
|
|
138
|
+
inert: !0,
|
|
139
|
+
className: "pointer-events-none invisible absolute inset-x-0 bottom-0",
|
|
140
|
+
children: t
|
|
141
|
+
})]
|
|
142
|
+
}) : t, [
|
|
143
|
+
V,
|
|
144
|
+
h,
|
|
145
|
+
W
|
|
146
|
+
]), Q = /* @__PURE__ */ m(te, {
|
|
147
|
+
side: "top",
|
|
148
|
+
draggable: !0,
|
|
149
|
+
open: P,
|
|
150
|
+
onOpenChange: (e) => {
|
|
151
|
+
e && J.current && (R(!0), _?.()), L(e);
|
|
152
|
+
},
|
|
153
|
+
peek: ge,
|
|
154
|
+
bounds: A,
|
|
155
|
+
boundsInset: T,
|
|
156
|
+
minimizable: !0,
|
|
157
|
+
minimized: I,
|
|
158
|
+
onMinimizedChange: z,
|
|
159
|
+
onProgressChange: Oe,
|
|
160
|
+
"data-slot": "floating-chat-bump",
|
|
161
|
+
className: y({ appearance: E }),
|
|
162
|
+
children: [/* @__PURE__ */ p(ne, {
|
|
163
|
+
label: ve,
|
|
164
|
+
children: N ? /* @__PURE__ */ p("div", {
|
|
165
|
+
ref: N.chatDock,
|
|
166
|
+
"data-slot": "floating-chat-transcript",
|
|
167
|
+
className: "ck-floating-chat__transcript flex h-full min-h-0 min-w-0 flex-col"
|
|
168
|
+
}) : /* @__PURE__ */ p("div", {
|
|
169
|
+
"data-slot": "floating-chat-transcript",
|
|
170
|
+
className: "ck-floating-chat__transcript contents",
|
|
171
|
+
children: B.chat
|
|
172
|
+
})
|
|
173
|
+
}), /* @__PURE__ */ p(re, {
|
|
174
|
+
label: P ? "Collapse chat" : "Expand chat",
|
|
175
|
+
className: "pt-px [&>[data-bump-grip]]:top-px"
|
|
176
|
+
})]
|
|
177
|
+
});
|
|
178
|
+
u(() => {
|
|
179
|
+
N?.outlet.set({
|
|
180
|
+
parts: Q,
|
|
181
|
+
renderCard: Z,
|
|
182
|
+
className: G
|
|
183
|
+
});
|
|
184
|
+
}), u(() => () => N?.outlet.set(null), [N]);
|
|
185
|
+
let $ = M.dragging || M.settling, ke = C.endsWith("left") ? "bottom left" : C.endsWith("right") ? "bottom right" : "bottom center", Ae = {
|
|
186
|
+
open: P,
|
|
187
|
+
setOpen: L,
|
|
188
|
+
progress: M.progress,
|
|
189
|
+
composing: F,
|
|
190
|
+
setComposing: R,
|
|
191
|
+
minimized: I,
|
|
192
|
+
setMinimized: z
|
|
193
|
+
};
|
|
194
|
+
return /* @__PURE__ */ p(g.Provider, {
|
|
195
|
+
value: Ae,
|
|
196
|
+
children: /* @__PURE__ */ m("div", {
|
|
197
|
+
ref: A,
|
|
198
|
+
"data-slot": "floating-chat",
|
|
199
|
+
"data-appearance": E,
|
|
200
|
+
"data-tone": D === "auto" ? void 0 : D,
|
|
201
|
+
"data-theme-scope": O["data-theme-scope"],
|
|
202
|
+
"data-open": P || void 0,
|
|
203
|
+
"data-expanded": H || void 0,
|
|
204
|
+
"data-dragging": M.dragging || void 0,
|
|
205
|
+
"data-minimized": I || void 0,
|
|
206
|
+
"data-hidden": U || void 0,
|
|
207
|
+
className: e(v({ tone: D }), O.className, be),
|
|
208
|
+
style: {
|
|
209
|
+
"--ck-chat-gutter": `${T}px`,
|
|
210
|
+
"--ck-chat-fold": K,
|
|
211
|
+
...xe
|
|
212
|
+
},
|
|
213
|
+
children: [
|
|
214
|
+
P || M.progress > 0 ? /* @__PURE__ */ p("button", {
|
|
215
|
+
type: "button",
|
|
216
|
+
"aria-label": "Close",
|
|
217
|
+
"aria-hidden": !P,
|
|
218
|
+
tabIndex: P ? 0 : -1,
|
|
219
|
+
"data-slot": "floating-chat-scrim",
|
|
220
|
+
className: e("absolute inset-0 z-0 block border-0 bg-black p-0 motion-reduce:[transition:none]", P ? "pointer-events-auto" : "pointer-events-none"),
|
|
221
|
+
style: {
|
|
222
|
+
opacity: .16 * M.progress,
|
|
223
|
+
transition: $ ? "none" : t("opacity", "smooth")
|
|
224
|
+
},
|
|
225
|
+
onClick: () => L(!1)
|
|
226
|
+
}) : null,
|
|
227
|
+
/* @__PURE__ */ p("div", {
|
|
228
|
+
"data-slot": "floating-chat-dock",
|
|
229
|
+
className: e("ck-floating-chat__dock absolute inset-x-(--ck-chat-gutter) bottom-(--ck-chat-gutter) z-2 min-w-0 motion-reduce:[transition:none]!", I || U ? "pointer-events-none" : "pointer-events-auto", U ? "translate-y-[calc(100%_+_44px)] opacity-0" : ""),
|
|
230
|
+
style: {
|
|
231
|
+
transformOrigin: ke,
|
|
232
|
+
transition: $ ? "none" : t(["transform", "opacity"], "smooth"),
|
|
233
|
+
...U ? null : {
|
|
234
|
+
opacity: Math.max(0, 1 - K * 1.4),
|
|
235
|
+
transform: K ? `translateY(${K * 10}px) scale(${1 - K * .72}, ${1 - K * .5})` : void 0
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"aria-hidden": I || void 0,
|
|
239
|
+
inert: I || void 0,
|
|
240
|
+
children: N ? /* @__PURE__ */ p("div", {
|
|
241
|
+
ref: N.composerDock,
|
|
242
|
+
"data-slot": "floating-chat-composer",
|
|
243
|
+
"data-theme-scope": k["data-theme-scope"],
|
|
244
|
+
className: e("min-w-0", k.className)
|
|
245
|
+
}) : /* @__PURE__ */ p("div", {
|
|
246
|
+
"data-slot": "floating-chat-composer",
|
|
247
|
+
"data-theme-scope": k["data-theme-scope"],
|
|
248
|
+
className: e("min-w-0", k.className),
|
|
249
|
+
children: /* @__PURE__ */ p(ae, {
|
|
250
|
+
parts: Q,
|
|
251
|
+
renderCard: Z,
|
|
252
|
+
className: G,
|
|
253
|
+
children: B.composer
|
|
254
|
+
})
|
|
255
|
+
})
|
|
256
|
+
}),
|
|
257
|
+
/* @__PURE__ */ p(ie, {
|
|
258
|
+
"data-slot": "floating-chat-fab",
|
|
259
|
+
"aria-label": "Open chat",
|
|
260
|
+
className: e(b({
|
|
261
|
+
appearance: E,
|
|
262
|
+
position: C
|
|
263
|
+
}), I ? "pointer-events-auto" : "pointer-events-none"),
|
|
264
|
+
style: {
|
|
265
|
+
opacity: K,
|
|
266
|
+
scale: .6 + .4 * K,
|
|
267
|
+
transition: $ ? "none" : t(["opacity", "scale"], "snappy"),
|
|
268
|
+
...W ? {
|
|
269
|
+
backdropFilter: "blur(16px)",
|
|
270
|
+
WebkitBackdropFilter: "blur(16px)"
|
|
271
|
+
} : null
|
|
272
|
+
},
|
|
273
|
+
onPress: () => {
|
|
274
|
+
L(!1), z(!1);
|
|
275
|
+
},
|
|
276
|
+
children: /* @__PURE__ */ p(n, {
|
|
277
|
+
name: "sparkle",
|
|
278
|
+
size: 22,
|
|
279
|
+
sw: 1.9
|
|
280
|
+
})
|
|
281
|
+
})
|
|
282
|
+
]
|
|
283
|
+
})
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
S.Chat = o("chat"), S.Composer = o("composer"), S.Context = g, S.useFloatingChat = _;
|
|
287
|
+
//#endregion
|
|
288
|
+
export { S as FloatingChat, y as floatingChatBumpVariants, b as floatingChatFabVariants, v as floatingChatVariants, x as glassScopeProps, _ as useFloatingChat };
|
|
@@ -2,7 +2,8 @@ import { CSSProperties, ReactNode, RefObject } from 'react';
|
|
|
2
2
|
export type FloatingSheetFabPosition = 'top-left' | 'top-center' | 'top-right' | 'center-left' | 'center-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
3
3
|
/** Translucent glass over dark content, or an opaque card like a system sheet. */
|
|
4
4
|
export type FloatingSheetAppearance = 'glass' | 'sheet';
|
|
5
|
-
/** Colour scheme of the surface
|
|
5
|
+
/** Colour scheme of the surface: `dark` / `light` put the bl-theme's `sheet` scope on it in that appearance (the
|
|
6
|
+
host's background and accent stay); `auto` inherits the host's theme. */
|
|
6
7
|
export type FloatingSheetTone = 'auto' | 'dark' | 'light';
|
|
7
8
|
export interface FloatingSheetContextValue {
|
|
8
9
|
/** Whether the sheet has grown to its full height. */
|
|
@@ -17,6 +18,25 @@ export interface FloatingSheetContextValue {
|
|
|
17
18
|
setMinimized: (minimized: boolean) => void;
|
|
18
19
|
}
|
|
19
20
|
export declare function useFloatingSheet(): FloatingSheetContextValue;
|
|
21
|
+
/** The surface: translucent glass (a highlight gradient over the tone's surface colour) or an opaque system sheet
|
|
22
|
+
(card colour, no glass highlights, a soft shadow that deepens as it grows) — resting, hidden by scrolling, or
|
|
23
|
+
folded into its FAB at one of eight spots (bottom-center keeps 20px from the host edge even when docked). */
|
|
24
|
+
export declare const floatingSheetSurfaceVariants: (props?: ({
|
|
25
|
+
appearance?: "sheet" | "glass" | null | undefined;
|
|
26
|
+
placement?: "hidden" | "resting" | "top-left" | "top-center" | "top-right" | "center-left" | "center-right" | "bottom-left" | "bottom-center" | "bottom-right" | null | undefined;
|
|
27
|
+
hidden?: boolean | null | undefined;
|
|
28
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
29
|
+
/** The layer. --ck-sheet-surface / --ck-sheet-line are the RGB triplets the glass mixes its alphas into: dark glass
|
|
30
|
+
unless the tone is light. ck-floating-sheet keys the body / peek-mask rules in styles.css. */
|
|
31
|
+
export declare const floatingSheetVariants: (props?: ({
|
|
32
|
+
tone?: "auto" | "dark" | "light" | null | undefined;
|
|
33
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
34
|
+
/** The theme-scope props for a floating chat surface's tone: the bl-theme's `sheet` scope in that appearance, or
|
|
35
|
+
nothing for `auto` (the host's theme carries through). */
|
|
36
|
+
export declare function sheetToneProps(tone: FloatingSheetTone): {
|
|
37
|
+
'data-theme-scope'?: 'sheet';
|
|
38
|
+
className?: string;
|
|
39
|
+
};
|
|
20
40
|
export interface FloatingSheetProps {
|
|
21
41
|
/** Controlled state for the fully grown sheet. */
|
|
22
42
|
open?: boolean;
|
|
@@ -74,9 +94,9 @@ export interface FloatingSheetProps {
|
|
|
74
94
|
*/
|
|
75
95
|
export declare function FloatingSheet({ open: controlledOpen, defaultOpen, onOpenChange, peek: requestedPeek, gutter, radius, appearance, tone: toneProp, bodyAlign, detents, minimizable, fabPosition, fabIcon, hideOnScroll, scrollRef, scrim, label, children, className, style, }: FloatingSheetProps): import("react/jsx-runtime").JSX.Element;
|
|
76
96
|
export declare namespace FloatingSheet {
|
|
77
|
-
var Body: import("
|
|
78
|
-
var Foot: import("
|
|
79
|
-
var Fab: import("
|
|
97
|
+
var Body: import("@/lib/container").SlotComponent;
|
|
98
|
+
var Foot: import("@/lib/container").SlotComponent;
|
|
99
|
+
var Fab: import("@/lib/container").SlotComponent;
|
|
80
100
|
var Context: import("react").Context<FloatingSheetContextValue | null>;
|
|
81
101
|
var useFloatingSheet: typeof import("./floating-sheet").useFloatingSheet;
|
|
82
102
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floating-sheet.d.ts","sourceRoot":"","sources":["../../src/components/floating-sheet.tsx"],"names":[],"mappings":"AACA,OAAO,EAOL,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AASf,MAAM,MAAM,wBAAwB,GAChC,UAAU,GACV,YAAY,GACZ,WAAW,GACX,aAAa,GACb,cAAc,GACd,aAAa,GACb,eAAe,GACf,cAAc,CAAC;AAEnB,kFAAkF;AAClF,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,OAAO,CAAC;AACxD;4EAC4E;AAC5E,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE1D,MAAM,WAAW,yBAAyB;IACxC,sDAAsD;IACtD,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC,qEAAqE;IACrE,QAAQ,EAAE,MAAM,CAAC;IACjB,2CAA2C;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