@brett_lamy/ui 2.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -5
- package/dist/components/adaptive-pane.d.ts.map +1 -1
- package/dist/components/adaptive-pane.js +30 -0
- package/dist/components/animated-height.d.ts.map +1 -1
- package/dist/components/animated-height.js +82 -0
- package/dist/{templates → components}/artifact-chat-container.d.ts +12 -5
- package/dist/components/artifact-chat-container.d.ts.map +1 -0
- package/dist/components/artifact-chat-container.js +200 -0
- package/dist/components/avatar.js +26 -0
- package/dist/components/badge.js +24 -0
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +46 -0
- package/dist/components/card.js +56 -0
- package/dist/components/celebrate.d.ts.map +1 -1
- package/dist/components/celebrate.js +142 -0
- package/dist/components/chat-column.d.ts.map +1 -0
- package/dist/components/chat-column.js +26 -0
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox.js +55 -0
- package/dist/components/combobox.d.ts +1 -1
- package/dist/components/combobox.d.ts.map +1 -1
- package/dist/components/combobox.js +65 -0
- package/dist/components/command-menu.d.ts.map +1 -1
- package/dist/components/command-menu.js +906 -0
- package/dist/components/composer/annotator.d.ts.map +1 -0
- package/dist/components/composer/annotator.js +17 -0
- package/dist/components/composer/composer-files.d.ts.map +1 -0
- package/dist/components/composer/composer-files.js +91 -0
- package/dist/components/{workbench/wb-popover.d.ts → composer/composer-popover.d.ts} +1 -1
- package/dist/components/composer/composer-popover.d.ts.map +1 -0
- package/dist/components/composer/composer-popover.js +29 -0
- package/dist/components/{workbench → composer}/composer.d.ts +3 -3
- package/dist/components/composer/composer.d.ts.map +1 -0
- package/dist/components/composer/composer.js +1633 -0
- package/dist/components/{workbench/chat.d.ts → conversation.d.ts} +2 -2
- package/dist/components/conversation.d.ts.map +1 -0
- package/dist/components/conversation.js +357 -0
- package/dist/components/credenza.d.ts.map +1 -1
- package/dist/components/credenza.js +294 -0
- package/dist/components/dialog.d.ts +2 -2
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/dialog.js +125 -0
- package/dist/components/disclosure.d.ts.map +1 -1
- package/dist/components/disclosure.js +59 -0
- package/dist/components/dropdown-menu.d.ts +1 -1
- package/dist/components/dropdown-menu.d.ts.map +1 -1
- package/dist/components/dropdown-menu.js +114 -0
- package/dist/components/edge-drawer.js +73 -0
- package/dist/components/edit-bar.d.ts.map +1 -1
- package/dist/components/edit-bar.js +33 -0
- package/dist/components/{chat/floating-chat.d.ts → floating-chat.d.ts} +8 -4
- package/dist/components/floating-chat.d.ts.map +1 -0
- package/dist/components/floating-chat.js +288 -0
- package/dist/components/{chat/floating-sheet.d.ts → floating-sheet.d.ts} +5 -5
- package/dist/components/floating-sheet.d.ts.map +1 -0
- package/dist/components/floating-sheet.js +252 -0
- package/dist/components/form.d.ts.map +1 -1
- package/dist/components/form.js +32 -0
- package/dist/{lib/workbench/icons.d.ts → components/icon-button.d.ts} +5 -5
- package/dist/components/icon-button.d.ts.map +1 -0
- package/dist/components/icon-button.js +31 -0
- package/dist/components/icon-swap.d.ts.map +1 -1
- package/dist/components/icon-swap.js +80 -0
- package/dist/components/index-bar.d.ts +14 -1
- package/dist/components/index-bar.d.ts.map +1 -1
- package/dist/components/index-bar.js +249 -0
- package/dist/components/input.d.ts.map +1 -1
- package/dist/components/input.js +30 -0
- package/dist/components/kbd.d.ts.map +1 -1
- package/dist/components/kbd.js +21 -0
- package/dist/components/label.d.ts.map +1 -1
- package/dist/components/label.js +22 -0
- package/dist/components/list-box.d.ts +1 -3
- package/dist/components/list-box.d.ts.map +1 -1
- package/dist/components/list-box.js +104 -0
- package/dist/components/list.d.ts.map +1 -1
- package/dist/components/list.js +491 -0
- package/dist/components/markdown-editor.d.ts.map +1 -1
- package/dist/components/markdown-editor.js +322 -0
- package/dist/components/{workbench/markdown.d.ts → markdown-view.d.ts} +1 -1
- package/dist/components/markdown-view.d.ts.map +1 -0
- package/dist/components/markdown-view.js +129 -0
- package/dist/components/measure-h.d.ts.map +1 -1
- package/dist/components/measure-h.js +20 -0
- package/dist/components/message-scroller.d.ts.map +1 -0
- package/dist/components/message-scroller.js +247 -0
- package/dist/components/morph.d.ts.map +1 -1
- package/dist/components/morph.js +89 -0
- package/dist/components/navigation-stack.d.ts +14 -0
- package/dist/components/navigation-stack.d.ts.map +1 -1
- package/dist/components/navigation-stack.js +506 -0
- package/dist/components/now-playing-bars.js +38 -0
- package/dist/components/number-morph.d.ts.map +1 -1
- package/dist/components/number-morph.js +123 -0
- package/dist/components/pencilkit/constants.d.ts.map +1 -0
- package/dist/components/pencilkit/constants.js +63 -0
- package/dist/components/pencilkit/pencil-canvas.d.ts +1 -1
- package/dist/components/pencilkit/pencil-canvas.d.ts.map +1 -1
- package/dist/components/pencilkit/pencil-canvas.js +105 -0
- package/dist/components/pencilkit/pencil-toolbar.d.ts +2 -2
- package/dist/components/pencilkit/pencil-toolbar.d.ts.map +1 -1
- package/dist/components/pencilkit/pencil-toolbar.js +186 -0
- package/dist/components/pencilkit/pencilkit-annotator.d.ts +1 -1
- package/dist/components/pencilkit/pencilkit-annotator.d.ts.map +1 -1
- package/dist/components/pencilkit/pencilkit-annotator.js +44 -0
- package/dist/components/pencilkit/stroke-path.d.ts +1 -1
- package/dist/components/pencilkit/stroke-path.d.ts.map +1 -1
- package/dist/components/pencilkit/stroke-path.js +44 -0
- package/dist/components/pencilkit/use-pencil-history.d.ts +2 -2
- package/dist/components/pencilkit/use-pencil-history.d.ts.map +1 -1
- package/dist/components/pencilkit/use-pencil-history.js +25 -0
- package/dist/components/plain-button.d.ts +10 -0
- package/dist/components/plain-button.d.ts.map +1 -0
- package/dist/components/plain-button.js +23 -0
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.d.ts.map +1 -1
- package/dist/components/popover.js +36 -0
- package/dist/components/progress-ring.d.ts.map +1 -1
- package/dist/components/progress-ring.js +195 -0
- package/dist/components/progress-stepper.d.ts.map +1 -0
- package/dist/components/progress-stepper.js +62 -0
- package/dist/components/progress.d.ts.map +1 -1
- package/dist/components/progress.js +54 -0
- package/dist/components/qr-svg.d.ts.map +1 -1
- package/dist/components/qr-svg.js +74 -0
- package/dist/components/radio-group.d.ts +1 -1
- package/dist/components/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group.js +41 -0
- package/dist/components/replay-preview.d.ts +4 -0
- package/dist/components/replay-preview.d.ts.map +1 -0
- package/dist/components/replay-preview.js +3 -0
- package/dist/components/scroll-area.js +23 -0
- package/dist/components/search-field.d.ts.map +1 -1
- package/dist/components/search-field.js +44 -0
- package/dist/components/segmented.d.ts +1 -1
- package/dist/components/segmented.d.ts.map +1 -1
- package/dist/components/segmented.js +32 -0
- package/dist/components/select.d.ts +1 -1
- package/dist/components/select.d.ts.map +1 -1
- package/dist/components/select.js +93 -0
- package/dist/components/separator.d.ts.map +1 -1
- package/dist/components/separator.js +40 -0
- package/dist/components/sheet.d.ts.map +1 -1
- package/dist/components/sheet.js +55 -0
- package/dist/components/side-drawer.d.ts +10 -1
- package/dist/components/side-drawer.d.ts.map +1 -1
- package/dist/components/side-drawer.js +247 -0
- package/dist/components/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar.js +282 -0
- package/dist/components/skeleton.js +48 -0
- package/dist/components/slider.d.ts +1 -1
- package/dist/components/slider.d.ts.map +1 -1
- package/dist/components/slider.js +98 -0
- package/dist/components/snap-sheet.d.ts.map +1 -0
- package/dist/components/snap-sheet.js +100 -0
- package/dist/components/spinner.js +35 -0
- package/dist/components/split-view.d.ts.map +1 -1
- package/dist/components/split-view.js +1060 -0
- package/dist/components/switch.d.ts.map +1 -1
- package/dist/components/switch.js +27 -0
- package/dist/components/syntax-highlighting.d.ts.map +1 -1
- package/dist/components/syntax-highlighting.js +293 -0
- package/dist/components/tab-bar.js +28 -0
- package/dist/components/tab-view.d.ts +1 -1
- package/dist/components/tab-view.d.ts.map +1 -1
- package/dist/components/tab-view.js +307 -0
- package/dist/components/tabs.d.ts +1 -1
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/tabs.js +86 -0
- package/dist/components/text-field.d.ts.map +1 -1
- package/dist/components/text-field.js +29 -0
- package/dist/components/text-morph.d.ts.map +1 -1
- package/dist/components/text-morph.js +131 -0
- package/dist/components/textarea.d.ts.map +1 -1
- package/dist/components/textarea.js +30 -0
- package/dist/components/toast.d.ts +0 -2
- package/dist/components/toast.d.ts.map +1 -1
- package/dist/components/toast.js +302 -0
- package/dist/components/toggle-group.d.ts +1 -1
- package/dist/components/toggle-group.d.ts.map +1 -1
- package/dist/components/toggle-group.js +48 -0
- package/dist/components/toggle.d.ts +1 -1
- package/dist/components/toggle.d.ts.map +1 -1
- package/dist/components/toggle.js +42 -0
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip.js +42 -0
- package/dist/{lib/workbench/theme.d.ts → components/workbench-theme.d.ts} +2 -2
- package/dist/components/workbench-theme.d.ts.map +1 -0
- package/dist/components/workbench-theme.js +34 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +29 -47
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +94 -20350
- package/dist/lib/append-stream.d.ts +43 -0
- package/dist/lib/append-stream.d.ts.map +1 -0
- package/dist/lib/append-stream.js +128 -0
- package/dist/lib/container.d.ts.map +1 -1
- package/dist/lib/container.js +49 -0
- package/dist/lib/durable-streams.d.ts +102 -0
- package/dist/lib/durable-streams.d.ts.map +1 -0
- package/dist/lib/durable-streams.js +280 -0
- package/dist/lib/icon-shapes/chat.js +13 -0
- package/dist/lib/icon-shapes/pencilkit.js +20 -0
- package/dist/lib/icon-shapes/workbench.js +47 -0
- package/dist/lib/icon.d.ts +1 -1
- package/dist/lib/icon.d.ts.map +1 -1
- package/dist/lib/icon.js +1774 -0
- package/dist/lib/motion.d.ts +16 -0
- package/dist/lib/motion.d.ts.map +1 -1
- package/dist/lib/motion.js +104 -0
- package/dist/lib/{chat/persistent-host.d.ts → persistent-host.d.ts} +1 -1
- package/dist/lib/persistent-host.d.ts.map +1 -0
- package/dist/lib/persistent-host.js +41 -0
- package/dist/lib/primitives.js +8 -0
- package/dist/lib/qr.js +552 -0
- package/dist/lib/row-label.d.ts.map +1 -1
- package/dist/lib/row-label.js +10 -0
- package/dist/lib/session-recorder.d.ts +87 -0
- package/dist/lib/session-recorder.d.ts.map +1 -0
- package/dist/lib/session-recorder.js +257 -0
- package/dist/lib/sheet-drag.d.ts +1 -1
- package/dist/lib/sheet-drag.d.ts.map +1 -1
- package/dist/lib/sheet-drag.js +128 -0
- package/dist/lib/syntax.js +204 -0
- package/dist/lib/theme.d.ts +33 -8
- package/dist/lib/theme.d.ts.map +1 -1
- package/dist/lib/theme.js +138 -0
- package/dist/lib/tokens.generated.d.ts +16 -0
- package/dist/lib/tokens.generated.d.ts.map +1 -0
- package/dist/lib/tokens.generated.js +22 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +18 -0
- package/dist/theme.css +0 -60
- package/package.json +5 -7
- package/dist/components/adaptive-pane.stories.d.ts +0 -7
- package/dist/components/adaptive-pane.stories.d.ts.map +0 -1
- package/dist/components/avatar.stories.d.ts +0 -9
- package/dist/components/avatar.stories.d.ts.map +0 -1
- package/dist/components/badge.stories.d.ts +0 -9
- package/dist/components/badge.stories.d.ts.map +0 -1
- package/dist/components/button.stories.d.ts +0 -11
- package/dist/components/button.stories.d.ts.map +0 -1
- package/dist/components/card.stories.d.ts +0 -9
- package/dist/components/card.stories.d.ts.map +0 -1
- package/dist/components/chat/chat-column.d.ts.map +0 -1
- package/dist/components/chat/chat-column.stories.d.ts +0 -9
- package/dist/components/chat/chat-column.stories.d.ts.map +0 -1
- package/dist/components/chat/floating-chat.d.ts.map +0 -1
- package/dist/components/chat/floating-chat.stories.d.ts +0 -17
- package/dist/components/chat/floating-chat.stories.d.ts.map +0 -1
- package/dist/components/chat/floating-sheet.d.ts.map +0 -1
- package/dist/components/chat/floating-sheet.stories.d.ts +0 -22
- package/dist/components/chat/floating-sheet.stories.d.ts.map +0 -1
- package/dist/components/chat/progress-stepper.d.ts.map +0 -1
- package/dist/components/checkbox.stories.d.ts +0 -11
- package/dist/components/checkbox.stories.d.ts.map +0 -1
- package/dist/components/combobox.stories.d.ts +0 -10
- package/dist/components/combobox.stories.d.ts.map +0 -1
- package/dist/components/command-menu.stories.d.ts +0 -17
- package/dist/components/command-menu.stories.d.ts.map +0 -1
- package/dist/components/credenza.stories.d.ts +0 -8
- package/dist/components/credenza.stories.d.ts.map +0 -1
- package/dist/components/dialog.stories.d.ts +0 -12
- package/dist/components/dialog.stories.d.ts.map +0 -1
- package/dist/components/disclosure.stories.d.ts +0 -10
- package/dist/components/disclosure.stories.d.ts.map +0 -1
- package/dist/components/dropdown-menu.stories.d.ts +0 -11
- package/dist/components/dropdown-menu.stories.d.ts.map +0 -1
- package/dist/components/edge-drawer.stories.d.ts +0 -8
- package/dist/components/edge-drawer.stories.d.ts.map +0 -1
- package/dist/components/edit-bar.stories.d.ts +0 -10
- package/dist/components/edit-bar.stories.d.ts.map +0 -1
- package/dist/components/form.stories.d.ts +0 -9
- package/dist/components/form.stories.d.ts.map +0 -1
- package/dist/components/haptic-indicator.d.ts +0 -11
- package/dist/components/haptic-indicator.d.ts.map +0 -1
- package/dist/components/haptic-indicator.stories.d.ts +0 -8
- package/dist/components/haptic-indicator.stories.d.ts.map +0 -1
- package/dist/components/index-bar.stories.d.ts +0 -12
- package/dist/components/index-bar.stories.d.ts.map +0 -1
- package/dist/components/input.stories.d.ts +0 -10
- package/dist/components/input.stories.d.ts.map +0 -1
- package/dist/components/kbd.stories.d.ts +0 -9
- package/dist/components/kbd.stories.d.ts.map +0 -1
- package/dist/components/label.stories.d.ts +0 -8
- package/dist/components/label.stories.d.ts.map +0 -1
- package/dist/components/list-box.stories.d.ts +0 -9
- package/dist/components/list-box.stories.d.ts.map +0 -1
- package/dist/components/list-row.stories.d.ts +0 -24
- package/dist/components/list-row.stories.d.ts.map +0 -1
- package/dist/components/list.stories.d.ts +0 -27
- package/dist/components/list.stories.d.ts.map +0 -1
- package/dist/components/markdown-editor.stories.d.ts +0 -17
- package/dist/components/markdown-editor.stories.d.ts.map +0 -1
- package/dist/components/morph.stories.d.ts +0 -14
- package/dist/components/morph.stories.d.ts.map +0 -1
- package/dist/components/motion.stories.d.ts +0 -15
- package/dist/components/motion.stories.d.ts.map +0 -1
- package/dist/components/navigation-stack.stories.d.ts +0 -31
- package/dist/components/navigation-stack.stories.d.ts.map +0 -1
- package/dist/components/now-playing-bars.stories.d.ts +0 -12
- package/dist/components/now-playing-bars.stories.d.ts.map +0 -1
- package/dist/components/pencilkit/pencil-canvas.stories.d.ts +0 -18
- package/dist/components/pencilkit/pencil-canvas.stories.d.ts.map +0 -1
- package/dist/components/pencilkit/pencil-toolbar.stories.d.ts +0 -10
- package/dist/components/pencilkit/pencil-toolbar.stories.d.ts.map +0 -1
- package/dist/components/popover.stories.d.ts +0 -9
- package/dist/components/popover.stories.d.ts.map +0 -1
- package/dist/components/progress-ring.stories.d.ts +0 -15
- package/dist/components/progress-ring.stories.d.ts.map +0 -1
- package/dist/components/progress.stories.d.ts +0 -10
- package/dist/components/progress.stories.d.ts.map +0 -1
- package/dist/components/qr-svg.stories.d.ts +0 -16
- package/dist/components/qr-svg.stories.d.ts.map +0 -1
- package/dist/components/radio-group.stories.d.ts +0 -10
- package/dist/components/radio-group.stories.d.ts.map +0 -1
- package/dist/components/scroll-area.stories.d.ts +0 -8
- package/dist/components/scroll-area.stories.d.ts.map +0 -1
- package/dist/components/search-field.stories.d.ts +0 -10
- package/dist/components/search-field.stories.d.ts.map +0 -1
- package/dist/components/segmented.stories.d.ts +0 -8
- package/dist/components/segmented.stories.d.ts.map +0 -1
- package/dist/components/select.stories.d.ts +0 -12
- package/dist/components/select.stories.d.ts.map +0 -1
- package/dist/components/separator.stories.d.ts +0 -9
- package/dist/components/separator.stories.d.ts.map +0 -1
- package/dist/components/sheet.stories.d.ts +0 -12
- package/dist/components/sheet.stories.d.ts.map +0 -1
- package/dist/components/side-drawer.stories.d.ts +0 -8
- package/dist/components/side-drawer.stories.d.ts.map +0 -1
- package/dist/components/sidebar.stories.d.ts +0 -10
- package/dist/components/sidebar.stories.d.ts.map +0 -1
- package/dist/components/skeleton.stories.d.ts +0 -11
- package/dist/components/skeleton.stories.d.ts.map +0 -1
- package/dist/components/slider.stories.d.ts +0 -12
- package/dist/components/slider.stories.d.ts.map +0 -1
- package/dist/components/spinner.stories.d.ts +0 -9
- package/dist/components/spinner.stories.d.ts.map +0 -1
- package/dist/components/split-view.stories.d.ts +0 -58
- package/dist/components/split-view.stories.d.ts.map +0 -1
- package/dist/components/switch.stories.d.ts +0 -9
- package/dist/components/switch.stories.d.ts.map +0 -1
- package/dist/components/syntax-highlighting.stories.d.ts +0 -18
- package/dist/components/syntax-highlighting.stories.d.ts.map +0 -1
- package/dist/components/tab-bar.stories.d.ts +0 -8
- package/dist/components/tab-bar.stories.d.ts.map +0 -1
- package/dist/components/tab-view.stories.d.ts +0 -37
- package/dist/components/tab-view.stories.d.ts.map +0 -1
- package/dist/components/tabs.stories.d.ts +0 -9
- package/dist/components/tabs.stories.d.ts.map +0 -1
- package/dist/components/text-field.stories.d.ts +0 -9
- package/dist/components/text-field.stories.d.ts.map +0 -1
- package/dist/components/toast.stories.d.ts +0 -13
- package/dist/components/toast.stories.d.ts.map +0 -1
- package/dist/components/toggle-group.stories.d.ts +0 -10
- package/dist/components/toggle-group.stories.d.ts.map +0 -1
- package/dist/components/toggle.stories.d.ts +0 -9
- package/dist/components/toggle.stories.d.ts.map +0 -1
- package/dist/components/tooltip.stories.d.ts +0 -11
- package/dist/components/tooltip.stories.d.ts.map +0 -1
- package/dist/components/workbench/annotator.d.ts.map +0 -1
- package/dist/components/workbench/chat.d.ts.map +0 -1
- package/dist/components/workbench/chat.stories.d.ts +0 -13
- package/dist/components/workbench/chat.stories.d.ts.map +0 -1
- package/dist/components/workbench/composer-files.d.ts.map +0 -1
- package/dist/components/workbench/composer.d.ts.map +0 -1
- package/dist/components/workbench/composer.stories.d.ts +0 -35
- package/dist/components/workbench/composer.stories.d.ts.map +0 -1
- package/dist/components/workbench/fixtures.d.ts +0 -38
- package/dist/components/workbench/fixtures.d.ts.map +0 -1
- package/dist/components/workbench/markdown.d.ts.map +0 -1
- package/dist/components/workbench/message-scroller.d.ts.map +0 -1
- package/dist/components/workbench/message-scroller.stories.d.ts +0 -9
- package/dist/components/workbench/message-scroller.stories.d.ts.map +0 -1
- package/dist/components/workbench/model-picker.d.ts +0 -29
- package/dist/components/workbench/model-picker.d.ts.map +0 -1
- package/dist/components/workbench/models.d.ts +0 -32
- package/dist/components/workbench/models.d.ts.map +0 -1
- package/dist/components/workbench/snap-sheet.d.ts.map +0 -1
- package/dist/components/workbench/snap-sheet.stories.d.ts +0 -8
- package/dist/components/workbench/snap-sheet.stories.d.ts.map +0 -1
- package/dist/components/workbench/surfaces.d.ts +0 -67
- package/dist/components/workbench/surfaces.d.ts.map +0 -1
- package/dist/components/workbench/surfaces.stories.d.ts +0 -15
- package/dist/components/workbench/surfaces.stories.d.ts.map +0 -1
- package/dist/components/workbench/terminal.d.ts +0 -51
- package/dist/components/workbench/terminal.d.ts.map +0 -1
- package/dist/components/workbench/terminal.stories.d.ts +0 -8
- package/dist/components/workbench/terminal.stories.d.ts.map +0 -1
- package/dist/components/workbench/wb-popover.d.ts.map +0 -1
- package/dist/components/workbench/workbench-composer.d.ts +0 -26
- package/dist/components/workbench/workbench-composer.d.ts.map +0 -1
- package/dist/demos/delivery/delivery-tracking-demo.d.ts +0 -41
- package/dist/demos/delivery/delivery-tracking-demo.d.ts.map +0 -1
- package/dist/demos/delivery/delivery-tracking-demo.stories.d.ts +0 -13
- package/dist/demos/delivery/delivery-tracking-demo.stories.d.ts.map +0 -1
- package/dist/demos/haptics-playground.d.ts +0 -18
- package/dist/demos/haptics-playground.d.ts.map +0 -1
- package/dist/demos/haptics-playground.stories.d.ts +0 -8
- package/dist/demos/haptics-playground.stories.d.ts.map +0 -1
- package/dist/demos/map-chat/geo.d.ts +0 -46
- package/dist/demos/map-chat/geo.d.ts.map +0 -1
- package/dist/demos/map-chat/map-agent.d.ts +0 -48
- package/dist/demos/map-chat/map-agent.d.ts.map +0 -1
- package/dist/demos/map-chat/map-chat-demo.d.ts +0 -19
- package/dist/demos/map-chat/map-chat-demo.d.ts.map +0 -1
- package/dist/demos/map-chat/map-chat-demo.stories.d.ts +0 -16
- package/dist/demos/map-chat/map-chat-demo.stories.d.ts.map +0 -1
- package/dist/demos/map-chat/map-icons.d.ts +0 -44
- package/dist/demos/map-chat/map-icons.d.ts.map +0 -1
- package/dist/demos/map-chat/places.d.ts +0 -29
- package/dist/demos/map-chat/places.d.ts.map +0 -1
- package/dist/demos/map-chat/tile-map.d.ts +0 -108
- package/dist/demos/map-chat/tile-map.d.ts.map +0 -1
- package/dist/demos/pencilkit/demo-strokes.d.ts +0 -4
- package/dist/demos/pencilkit/demo-strokes.d.ts.map +0 -1
- package/dist/demos/pencilkit/pencilkit-demo.d.ts +0 -17
- package/dist/demos/pencilkit/pencilkit-demo.d.ts.map +0 -1
- package/dist/demos/pencilkit/pencilkit-demo.stories.d.ts +0 -11
- package/dist/demos/pencilkit/pencilkit-demo.stories.d.ts.map +0 -1
- package/dist/demos/sidebar-demo.d.ts +0 -6
- package/dist/demos/sidebar-demo.d.ts.map +0 -1
- package/dist/demos/split-view-demos.d.ts +0 -50
- package/dist/demos/split-view-demos.d.ts.map +0 -1
- package/dist/lib/chat/chat-shell-context.d.ts +0 -20
- package/dist/lib/chat/chat-shell-context.d.ts.map +0 -1
- package/dist/lib/chat/persistent-host.d.ts.map +0 -1
- package/dist/lib/haptics.d.ts +0 -27
- package/dist/lib/haptics.d.ts.map +0 -1
- package/dist/lib/icon.stories.d.ts +0 -15
- package/dist/lib/icon.stories.d.ts.map +0 -1
- package/dist/lib/pencilkit/constants.d.ts.map +0 -1
- package/dist/lib/workbench/haptics.d.ts +0 -3
- package/dist/lib/workbench/haptics.d.ts.map +0 -1
- package/dist/lib/workbench/icons.d.ts.map +0 -1
- package/dist/lib/workbench/motion.d.ts +0 -19
- package/dist/lib/workbench/motion.d.ts.map +0 -1
- package/dist/lib/workbench/press.d.ts +0 -10
- package/dist/lib/workbench/press.d.ts.map +0 -1
- package/dist/lib/workbench/theme.d.ts.map +0 -1
- package/dist/lib/workbench/util.d.ts +0 -8
- package/dist/lib/workbench/util.d.ts.map +0 -1
- package/dist/stories/frame.d.ts +0 -16
- package/dist/stories/frame.d.ts.map +0 -1
- package/dist/stories/primitive-frame.d.ts +0 -20
- package/dist/stories/primitive-frame.d.ts.map +0 -1
- package/dist/templates/artifact-chat-container.d.ts.map +0 -1
- package/dist/templates/artifact-chat-container.stories.d.ts +0 -24
- package/dist/templates/artifact-chat-container.stories.d.ts.map +0 -1
- package/dist/templates/chat-shell.d.ts +0 -87
- package/dist/templates/chat-shell.d.ts.map +0 -1
- package/dist/templates/workbench-shell.d.ts +0 -177
- package/dist/templates/workbench-shell.d.ts.map +0 -1
- package/dist/templates/workbench-shell.stories.d.ts +0 -17
- package/dist/templates/workbench-shell.stories.d.ts.map +0 -1
- /package/dist/components/{chat/chat-column.d.ts → chat-column.d.ts} +0 -0
- /package/dist/components/{workbench → composer}/annotator.d.ts +0 -0
- /package/dist/components/{workbench → composer}/composer-files.d.ts +0 -0
- /package/dist/components/{workbench/message-scroller.d.ts → message-scroller.d.ts} +0 -0
- /package/dist/{lib → components}/pencilkit/constants.d.ts +0 -0
- /package/dist/components/{chat/progress-stepper.d.ts → progress-stepper.d.ts} +0 -0
- /package/dist/components/{workbench/snap-sheet.d.ts → snap-sheet.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
# @brett_lamy/ui
|
|
2
2
|
|
|
3
|
-
Touch-first React components inspired by UIKit container patterns. Colors come from your shadcn theme (CSS variables); the iOS look ships as an optional theme. The
|
|
3
|
+
Touch-first React components inspired by UIKit container patterns, built on react-aria-components and Tailwind v4. Colors, radius and font come from your shadcn theme (CSS variables); the iOS look ships as an optional theme. The library has lists, navigation, adaptive split views, drawers, sheets, a reusable jump rail, the Composer (a Markdown prompt box), PencilKit drawing and the message scroller. Product-specific compositions (an IDE workbench, a team-chat shell, a map chat, …) are **blocks**, installed from the shadcn registry rather than this package.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
|
+
Two ways, from the same source files. The docs explain both: [Installation](https://blamy.github.io/ui/#/installation) and [Optimization](https://blamy.github.io/ui/#/optimization).
|
|
8
|
+
|
|
9
|
+
- **shadcn registry (recommended for products).** `npx shadcn add https://blamy.github.io/ui/r/split-view.json` copies the source of one component and what it imports into your app (`components/ui/…`, `lib/…`), so you own the files and only ship what you use.
|
|
10
|
+
- **npm.** One dependency with everything in it:
|
|
11
|
+
|
|
7
12
|
```sh
|
|
8
13
|
npm i @brett_lamy/ui
|
|
9
14
|
```
|
|
10
15
|
|
|
11
|
-
Import the stylesheet once — and, for the iOS palette, the bl-theme (it sets shadcn's CSS variables; leave it out to use your own shadcn theme). `BLProvider` picks light/dark and a tint for a subtree:
|
|
16
|
+
Import the stylesheet once — and, for the iOS palette, the bl-theme (it sets shadcn's CSS variables; leave it out to use your own shadcn theme). `BLProvider` picks light/dark and a tint for a subtree, and `ThemeScope` scopes any set of variables to a subtree:
|
|
12
17
|
|
|
13
18
|
```css
|
|
14
19
|
@import '@brett_lamy/ui/styles.css';
|
|
@@ -27,7 +32,9 @@ export function App() {
|
|
|
27
32
|
}
|
|
28
33
|
```
|
|
29
34
|
|
|
30
|
-
|
|
35
|
+
The package is ESM with one output module per source module (`sideEffects` is limited to CSS), so bundlers drop what you don't import; component modules start with `'use client'` for Next.js.
|
|
36
|
+
|
|
37
|
+
React 18 and 19 are supported peer dependencies.
|
|
31
38
|
|
|
32
39
|
## IndexBar
|
|
33
40
|
|
|
@@ -63,12 +70,12 @@ If `items` is omitted or empty, the component retains its A-Z form:
|
|
|
63
70
|
|
|
64
71
|
- Containers: `NavigationStack`, `SplitView`, `Credenza`, `SideDrawer`, `EdgeDrawer`, `AdaptivePane`, `Sidebar`
|
|
65
72
|
- Lists and navigation: `List`, `List.Section`, `List.Row`, `IndexBar`, `TabBar`, `TabView`, `EditBar`
|
|
66
|
-
- Inputs and feedback: `SearchField`, `Switch`, `Segmented`,
|
|
73
|
+
- Inputs and feedback: `SearchField`, `Switch`, `Segmented`, plus shadcn-style primitives (`Button`, `Dialog`, `Sheet`, `Select`, `ComboBox`, `Tabs`, …)
|
|
67
74
|
- Motion: `springs`, `springCss`, `TextMorph`, `NumberMorph`, `AnimatedHeight`, `ContentSwap`, `Celebrate`
|
|
68
75
|
- Foundations: `BLProvider`, `ThemeScope`, `AppearanceProvider`, `Icon`, `Avatar`, `Spinner`
|
|
69
76
|
- Team chat: `ChatShell` and its regions (`ChatShellNav`, `ChatShellSidebar`, `ChatShellMain`, `ChatShellHeader`, `ChatShellAside`, `ChatShellPanel`…), `FloatingSheet`, `FloatingChat`, `ChatColumn`, `ArtifactChatContainer` (the Discord parts — channels, messages, threads, members — live in the `discord-clone` registry block)
|
|
70
77
|
- Workbench: `WorkbenchShell` and its parts (`WorkbenchSidebar`, `WorkbenchMain`, `WorkbenchHeader`, `WorkbenchDock`, `WorkbenchPanel`, `WorkbenchTabBar`, …), conversation parts (`Conversation`, `UserMessage`, `AssistantMessage`, `WorkLog`, `ToolCall`, …), `TerminalHeader` / `TerminalBody`, surfaces (`SurfacePicker`, `SurfaceBrowser`, `SurfaceFiles`, `SurfaceDiff`, `SurfaceAgents`), `Composer` and its parts, `ModelPicker`, `MessageScroller`, `SnapSheet`, `MarkdownView`
|
|
71
|
-
- Demo apps: `MapChatDemo`, `DeliveryTrackingDemo`, `SidebarDemo
|
|
78
|
+
- Demo apps: `MapChatDemo`, `DeliveryTrackingDemo`, `SidebarDemo` (full apps — Discord, T3 Code, GitHub — are registry blocks)
|
|
72
79
|
|
|
73
80
|
Every component exports its props type from the package root. See the Storybook catalog for interaction and responsive examples.
|
|
74
81
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adaptive-pane.d.ts","sourceRoot":"","sources":["../../src/components/adaptive-pane.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"adaptive-pane.d.ts","sourceRoot":"","sources":["../../src/components/adaptive-pane.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAO/E,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAExE,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC;IAChF,IAAI,EAAE,gBAAgB,CAAC;IACvB,oDAAoD;IACpD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,sEAAsE;IACtE,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,IAAY,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,IAAa,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,EAAE,iBAAiB,kDAahJ"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { EdgeDrawer as e } from "./edge-drawer.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/adaptive-pane.tsx
|
|
4
|
+
function n({ mode: n, open: r = !1, columnWidth: i, drawerWidth: a, columnStyle: o, side: s = "left", children: c, ...l }) {
|
|
5
|
+
return n === "hidden" ? null : n === "cover" ? /* @__PURE__ */ t("div", {
|
|
6
|
+
"data-slot": "adaptive-pane",
|
|
7
|
+
"data-mode": "cover",
|
|
8
|
+
className: "absolute inset-0",
|
|
9
|
+
style: { zIndex: l.zIndex },
|
|
10
|
+
children: c
|
|
11
|
+
}) : n === "drawer" ? /* @__PURE__ */ t(e, {
|
|
12
|
+
...l,
|
|
13
|
+
side: s,
|
|
14
|
+
open: r,
|
|
15
|
+
width: a,
|
|
16
|
+
children: c
|
|
17
|
+
}) : /* @__PURE__ */ t("div", {
|
|
18
|
+
"data-slot": "adaptive-pane",
|
|
19
|
+
"data-mode": "column",
|
|
20
|
+
"data-side": s,
|
|
21
|
+
className: "min-h-0 shrink-0",
|
|
22
|
+
style: {
|
|
23
|
+
width: i,
|
|
24
|
+
...o
|
|
25
|
+
},
|
|
26
|
+
children: c
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { n as AdaptivePane };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animated-height.d.ts","sourceRoot":"","sources":["../../src/components/animated-height.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"animated-height.d.ts","sourceRoot":"","sources":["../../src/components/animated-height.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqC,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9F,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAS/D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,qDAAqD;IACrD,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,MAAe,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,mBAAmB,2CAoBlG;AAED,MAAM,WAAW,gBAAgB;IAC/B,wDAAwD;IACxD,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,0GAA0G;IAC1G,SAAS,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACvB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,wBAAgB,WAAW,CAAC,EAAE,EAAE,EAAE,SAAa,EAAE,QAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,gBAAgB,2CA0B7G"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { fades as t, springs as n } from "../lib/motion.js";
|
|
4
|
+
import { AnimatePresence as r, motion as i, useReducedMotion as a } from "framer-motion";
|
|
5
|
+
import { useLayoutEffect as o, useRef as s, useState as c } from "react";
|
|
6
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/animated-height.tsx
|
|
8
|
+
function u({ children: t, spring: r = "tray", className: u, style: d }) {
|
|
9
|
+
let f = s(null), [p, m] = c("auto"), h = a();
|
|
10
|
+
return o(() => {
|
|
11
|
+
let e = f.current;
|
|
12
|
+
if (!e) return;
|
|
13
|
+
let t = () => m(e.offsetHeight);
|
|
14
|
+
if (t(), typeof ResizeObserver > "u") return;
|
|
15
|
+
let n = new ResizeObserver(t);
|
|
16
|
+
return n.observe(e), () => n.disconnect();
|
|
17
|
+
}, []), /* @__PURE__ */ l(i.div, {
|
|
18
|
+
"data-slot": "animated-height",
|
|
19
|
+
className: e("overflow-hidden", u),
|
|
20
|
+
style: d,
|
|
21
|
+
initial: !1,
|
|
22
|
+
animate: { height: p },
|
|
23
|
+
transition: h ? { duration: 0 } : n[r],
|
|
24
|
+
children: /* @__PURE__ */ l("div", {
|
|
25
|
+
ref: f,
|
|
26
|
+
className: "flow-root",
|
|
27
|
+
children: t
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function d({ id: o, direction: s = 0, distance: c = 36, children: u, className: d, style: f }) {
|
|
32
|
+
let p = a(), m = (e, t) => p ? { opacity: 0 } : e ? {
|
|
33
|
+
opacity: 0,
|
|
34
|
+
x: t * e * c,
|
|
35
|
+
filter: "blur(4px)"
|
|
36
|
+
} : {
|
|
37
|
+
opacity: 0,
|
|
38
|
+
scale: .96,
|
|
39
|
+
filter: "blur(4px)"
|
|
40
|
+
};
|
|
41
|
+
return /* @__PURE__ */ l("div", {
|
|
42
|
+
"data-slot": "content-swap",
|
|
43
|
+
className: e("relative", d),
|
|
44
|
+
style: f,
|
|
45
|
+
children: /* @__PURE__ */ l(r, {
|
|
46
|
+
initial: !1,
|
|
47
|
+
mode: "popLayout",
|
|
48
|
+
custom: s,
|
|
49
|
+
children: /* @__PURE__ */ l(i.div, {
|
|
50
|
+
custom: s,
|
|
51
|
+
variants: {
|
|
52
|
+
enter: (e) => m(e, 1),
|
|
53
|
+
center: {
|
|
54
|
+
opacity: 1,
|
|
55
|
+
x: 0,
|
|
56
|
+
scale: 1,
|
|
57
|
+
filter: "blur(0px)"
|
|
58
|
+
},
|
|
59
|
+
exit: (e) => ({
|
|
60
|
+
...m(e, -1),
|
|
61
|
+
transition: p ? { duration: .1 } : {
|
|
62
|
+
...t.out,
|
|
63
|
+
x: n.smooth
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
},
|
|
67
|
+
initial: "enter",
|
|
68
|
+
animate: "center",
|
|
69
|
+
exit: "exit",
|
|
70
|
+
transition: p ? { duration: .12 } : {
|
|
71
|
+
x: n.smooth,
|
|
72
|
+
scale: n.smooth,
|
|
73
|
+
default: t.in
|
|
74
|
+
},
|
|
75
|
+
className: "w-full",
|
|
76
|
+
children: u
|
|
77
|
+
}, o)
|
|
78
|
+
})
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
export { u as AnimatedHeight, d as ContentSwap };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import { FloatingChatFabPosition, FloatingChatProps } from '
|
|
2
|
+
import { FloatingChatFabPosition, FloatingChatProps } from './floating-chat';
|
|
3
3
|
export type ArtifactChatLayout = 'split' | 'floating';
|
|
4
4
|
export interface ArtifactChatContainerContextValue {
|
|
5
5
|
width: number;
|
|
@@ -18,6 +18,7 @@ export type ArtifactChatContainerSlotChildren = ReactNode;
|
|
|
18
18
|
ck-artifact-chat stays as a hook for hosts. */
|
|
19
19
|
export declare const artifactChatContainerVariants: (props?: ({
|
|
20
20
|
layout?: "split" | "floating" | null | undefined;
|
|
21
|
+
chatSide?: "left" | "right" | null | undefined;
|
|
21
22
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
22
23
|
export type ArtifactChatFabPosition = FloatingChatFabPosition;
|
|
23
24
|
export interface ArtifactChatContainerProps {
|
|
@@ -31,6 +32,8 @@ export interface ArtifactChatContainerProps {
|
|
|
31
32
|
breakpoint?: number;
|
|
32
33
|
/** Width of the docked chat column. */
|
|
33
34
|
chatWidth?: number | string;
|
|
35
|
+
/** Which edge the docked chat column sits on. Default `left`; `right` for an assistant beside an app's page. */
|
|
36
|
+
chatSide?: 'left' | 'right';
|
|
34
37
|
/** Controlled state for the floating full-chat drawer. */
|
|
35
38
|
chatOpen?: boolean;
|
|
36
39
|
defaultChatOpen?: boolean;
|
|
@@ -44,6 +47,10 @@ export interface ArtifactChatContainerProps {
|
|
|
44
47
|
hideOnScroll?: boolean;
|
|
45
48
|
/** Resting position after the floating chat is dragged down into its FAB. */
|
|
46
49
|
fabPosition?: ArtifactChatFabPosition;
|
|
50
|
+
/** Controlled fold of the floating chat into its FAB (dragging below rest folds it; the FAB unfolds it). */
|
|
51
|
+
minimized?: boolean;
|
|
52
|
+
defaultMinimized?: boolean;
|
|
53
|
+
onMinimizedChange?: (minimized: boolean) => void;
|
|
47
54
|
/** Transcript height that stays visible above the floating composer while the chat is closed. */
|
|
48
55
|
peek?: number;
|
|
49
56
|
/** Floating surface style: glass over the content, or an opaque card. */
|
|
@@ -57,11 +64,11 @@ export interface ArtifactChatContainerProps {
|
|
|
57
64
|
className?: string;
|
|
58
65
|
style?: CSSProperties;
|
|
59
66
|
}
|
|
60
|
-
export declare function ArtifactChatContainer({ layout: requestedLayout, breakpoint, chatWidth, chatOpen: controlledChatOpen, defaultChatOpen, onChatOpenChange, working, workingLabel, onAdd, hideOnScroll, fabPosition, peek, appearance, tone: toneProp, children, className, style, }: ArtifactChatContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
export declare function ArtifactChatContainer({ layout: requestedLayout, breakpoint, chatWidth, chatSide, chatOpen: controlledChatOpen, defaultChatOpen, onChatOpenChange, working, workingLabel, onAdd, hideOnScroll, fabPosition, minimized, defaultMinimized, onMinimizedChange, peek, appearance, tone: toneProp, children, className, style, }: ArtifactChatContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
61
68
|
export declare namespace ArtifactChatContainer {
|
|
62
|
-
var Chat: import("
|
|
63
|
-
var Composer: import("
|
|
64
|
-
var Content: import("
|
|
69
|
+
var Chat: import("@/lib/container").SlotComponent;
|
|
70
|
+
var Composer: import("@/lib/container").SlotComponent;
|
|
71
|
+
var Content: import("@/lib/container").SlotComponent;
|
|
65
72
|
var Context: import("react").Context<ArtifactChatContainerContextValue | null>;
|
|
66
73
|
var useContainer: typeof useArtifactChatContainer;
|
|
67
74
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifact-chat-container.d.ts","sourceRoot":"","sources":["../../src/components/artifact-chat-container.tsx"],"names":[],"mappings":"AACA,OAAO,EAQL,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAQf,OAAO,EAAiC,KAAK,uBAAuB,EAAE,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAKpI,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,UAAU,CAAC;AAEtD,MAAM,WAAW,iCAAiC;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,MAAM,EAAE,kBAAkB,CAAC;IAC3B,+CAA+C;IAC/C,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C;AAID,wBAAgB,wBAAwB,IAAI,iCAAiC,CAM5E;AAED,MAAM,MAAM,iCAAiC,GAAG,SAAS,CAAC;AAK1D;kDACkD;AAClD,eAAO,MAAM,6BAA6B;;;8EAgBzC,CAAC;AACF,MAAM,MAAM,uBAAuB,GAAG,uBAAuB,CAAC;AAE9D,MAAM,WAAW,0BAA0B;IACzC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,kBAAkB,CAAC;IACrC,8FAA8F;IAC9F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,gHAAgH;IAChH,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,sEAAsE;IACtE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,8DAA8D;IAC9D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,6EAA6E;IAC7E,WAAW,CAAC,EAAE,uBAAuB,CAAC;IACtC,4GAA4G;IAC5G,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,iGAAiG;IACjG,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,UAAU,CAAC,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAC7C;;;OAGG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAID,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EAAE,eAAwB,EAChC,UAAgB,EAChB,SAAe,EACf,QAAiB,EACjB,QAAQ,EAAE,kBAAkB,EAC5B,eAAuB,EACvB,gBAAgB,EAChB,OAAe,EACf,YAAyB,EACzB,KAAK,EACL,YAAmB,EACnB,WAA6B,EAC7B,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,IAAQ,EACR,UAAU,EACV,IAAI,EAAE,QAAQ,EACd,QAAQ,EACR,SAAS,EACT,KAAK,GACN,EAAE,0BAA0B,2CA4L5B;yBAlNe,qBAAqB"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { springs as t } from "../lib/motion.js";
|
|
4
|
+
import { useAppearance as n } from "../lib/theme.js";
|
|
5
|
+
import { collectSlots as r, defineSlot as i, useContainerWidth as a } from "../lib/container.js";
|
|
6
|
+
import { sheetToneProps as ee } from "./floating-sheet.js";
|
|
7
|
+
import { ChatHostContext as te, ComposerPortal as ne, createOutletStore as re, useAttachHost as o, usePersistentHost as s } from "../lib/persistent-host.js";
|
|
8
|
+
import { FloatingChat as ie, glassScopeProps as ae } from "./floating-chat.js";
|
|
9
|
+
import { ChatColumn as c, ChatColumnComposer as oe, ChatColumnTranscript as se } from "./chat-column.js";
|
|
10
|
+
import { AnimatePresence as l, animate as u, motion as ce } from "framer-motion";
|
|
11
|
+
import { createContext as d, useContext as f, useEffect as le, useLayoutEffect as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
12
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
13
|
+
import { cva as y } from "class-variance-authority";
|
|
14
|
+
import { createPortal as ue } from "react-dom";
|
|
15
|
+
//#region src/components/artifact-chat-container.tsx
|
|
16
|
+
var b = d(null);
|
|
17
|
+
function x() {
|
|
18
|
+
let e = f(b);
|
|
19
|
+
if (!e) throw Error("useArtifactChatContainer must be used within <ArtifactChatContainer>");
|
|
20
|
+
return e;
|
|
21
|
+
}
|
|
22
|
+
var de = "ck-artifact-chat__content min-h-0 min-w-0 overflow-auto bg-background", S = y("ck-artifact-chat relative isolate h-full w-full min-h-0 min-w-0 overflow-hidden bg-background text-foreground [font-family:var(--bl-font,-apple-system,BlinkMacSystemFont,\"SF_Pro_Text\",sans-serif)]", {
|
|
23
|
+
variants: {
|
|
24
|
+
layout: {
|
|
25
|
+
split: "grid",
|
|
26
|
+
floating: "block"
|
|
27
|
+
},
|
|
28
|
+
chatSide: {
|
|
29
|
+
left: "",
|
|
30
|
+
right: ""
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
compoundVariants: [{
|
|
34
|
+
layout: "split",
|
|
35
|
+
chatSide: "left",
|
|
36
|
+
class: "grid-cols-[minmax(0,var(--ck-artifact-chat-width,400px))_minmax(0,1fr)]"
|
|
37
|
+
}, {
|
|
38
|
+
layout: "split",
|
|
39
|
+
chatSide: "right",
|
|
40
|
+
class: "grid-cols-[minmax(0,1fr)_minmax(0,var(--ck-artifact-chat-width,400px))]"
|
|
41
|
+
}],
|
|
42
|
+
defaultVariants: {
|
|
43
|
+
layout: "split",
|
|
44
|
+
chatSide: "left"
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
function C({ layout: i = "auto", breakpoint: d = 760, chatWidth: f = 400, chatSide: y = "left", chatOpen: x, defaultChatOpen: C = !1, onChatOpenChange: fe, working: w = !1, workingLabel: pe = "Working…", onAdd: me, hideOnScroll: he = !0, fabPosition: ge = "bottom-center", minimized: _e, defaultMinimized: ve, onMinimizedChange: ye, peek: be = 0, appearance: xe, tone: T, children: E, className: D, style: O }) {
|
|
48
|
+
let [k, A] = a(), j = n(), M = T ?? j ?? "auto", N = ee(M), P = ae(M), F = h(null), [Se, Ce] = g(C), [I, L] = g(!w), R = i === "auto" ? A < d ? "floating" : "split" : i, z = R === "floating", B = y === "right", V = B ? 1 : -1, H = x ?? Se, U = (e) => {
|
|
49
|
+
x ?? Ce(e), fe?.(e);
|
|
50
|
+
};
|
|
51
|
+
le(() => {
|
|
52
|
+
L(!w);
|
|
53
|
+
}, [w]);
|
|
54
|
+
let W = r(E), G = s("artifact-chat-composer"), K = s("artifact-chat-transcript"), q = m(re, []), [J, Y] = g(null), [we, X] = g(null), Te = m(() => ({
|
|
55
|
+
outlet: q,
|
|
56
|
+
composerDock: Y,
|
|
57
|
+
chatDock: X
|
|
58
|
+
}), [q]);
|
|
59
|
+
o(G, J), o(K, we);
|
|
60
|
+
let Z = h(null), Q = h(null), $ = h(z), [Ee, De] = g(!1);
|
|
61
|
+
if ($.current !== z && !Q.current && typeof window < "u") {
|
|
62
|
+
let e = G?.querySelector("[data-slot=\"composer\"]");
|
|
63
|
+
Q.current = {
|
|
64
|
+
layout: z,
|
|
65
|
+
composer: e?.isConnected ? e.getBoundingClientRect() : null,
|
|
66
|
+
content: Z.current?.getBoundingClientRect() ?? null
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
p(() => {
|
|
70
|
+
$.current !== z && De(!0), $.current = z;
|
|
71
|
+
let e = Q.current;
|
|
72
|
+
if (!e || e.layout !== z || !J?.isConnected || G?.parentNode !== J || (Q.current = null, typeof matchMedia < "u" && matchMedia("(prefers-reduced-motion: reduce)").matches)) return;
|
|
73
|
+
let n = G?.querySelector("[data-slot=\"composer\"]");
|
|
74
|
+
if (e.composer && n) {
|
|
75
|
+
let r = n.getBoundingClientRect(), i = e.composer;
|
|
76
|
+
n.style.width = `${i.width}px`;
|
|
77
|
+
let a = n.getBoundingClientRect();
|
|
78
|
+
u(n, {
|
|
79
|
+
x: [i.left - a.left, 0],
|
|
80
|
+
y: [i.top - a.top, 0],
|
|
81
|
+
width: [i.width, r.width]
|
|
82
|
+
}, {
|
|
83
|
+
...t.smooth,
|
|
84
|
+
onComplete: () => {
|
|
85
|
+
n.style.width = "", n.style.transform = "";
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
let r = Z.current;
|
|
90
|
+
if (e.content && r) {
|
|
91
|
+
let n = r.getBoundingClientRect(), i = e.content, a = `inset(${Math.max(0, i.top - n.top)}px ${Math.max(0, n.right - i.right)}px ${Math.max(0, n.bottom - i.bottom)}px ${Math.max(0, i.left - n.left)}px)`;
|
|
92
|
+
a !== "inset(0px 0px 0px 0px)" && u(r, { clipPath: [a, "inset(0px 0px 0px 0px)"] }, {
|
|
93
|
+
...t.smooth,
|
|
94
|
+
onComplete: () => r.style.clipPath = ""
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}, [z, J]);
|
|
98
|
+
let Oe = {
|
|
99
|
+
width: A,
|
|
100
|
+
layout: R,
|
|
101
|
+
compact: z,
|
|
102
|
+
chatOpen: H,
|
|
103
|
+
setChatOpen: U,
|
|
104
|
+
composing: I,
|
|
105
|
+
setComposing: L
|
|
106
|
+
};
|
|
107
|
+
return /* @__PURE__ */ _(b.Provider, {
|
|
108
|
+
value: Oe,
|
|
109
|
+
children: /* @__PURE__ */ v("div", {
|
|
110
|
+
ref: k,
|
|
111
|
+
"data-slot": "artifact-chat-container",
|
|
112
|
+
"data-layout": z ? "compact" : "split",
|
|
113
|
+
"data-tone": M === "auto" ? void 0 : M,
|
|
114
|
+
"data-theme-scope": N["data-theme-scope"],
|
|
115
|
+
"data-chat-side": y,
|
|
116
|
+
className: e(S({
|
|
117
|
+
layout: R,
|
|
118
|
+
chatSide: y
|
|
119
|
+
}), N.className, D),
|
|
120
|
+
style: {
|
|
121
|
+
"--ck-artifact-chat-width": typeof f == "number" ? `${f}px` : f,
|
|
122
|
+
...O
|
|
123
|
+
},
|
|
124
|
+
children: [
|
|
125
|
+
/* @__PURE__ */ _(l, {
|
|
126
|
+
mode: "popLayout",
|
|
127
|
+
initial: !1,
|
|
128
|
+
children: z ? null : /* @__PURE__ */ _(ce.div, {
|
|
129
|
+
"data-slot": "artifact-chat-column",
|
|
130
|
+
className: e("z-2 flex min-h-0 min-w-0", B && "col-start-2 row-start-1"),
|
|
131
|
+
initial: Ee ? {
|
|
132
|
+
x: 32 * V,
|
|
133
|
+
opacity: 0
|
|
134
|
+
} : !1,
|
|
135
|
+
animate: {
|
|
136
|
+
x: 0,
|
|
137
|
+
opacity: 1
|
|
138
|
+
},
|
|
139
|
+
exit: {
|
|
140
|
+
x: 48 * V,
|
|
141
|
+
opacity: 0
|
|
142
|
+
},
|
|
143
|
+
transition: t.smooth,
|
|
144
|
+
children: /* @__PURE__ */ v(c, {
|
|
145
|
+
className: e("flex-1", B && "border-r-0 border-l"),
|
|
146
|
+
children: [/* @__PURE__ */ _(se, { children: /* @__PURE__ */ _("div", {
|
|
147
|
+
ref: X,
|
|
148
|
+
"data-slot": "artifact-chat-transcript-dock",
|
|
149
|
+
className: "flex h-full min-h-0 min-w-0 flex-col"
|
|
150
|
+
}) }), /* @__PURE__ */ _(oe, { children: /* @__PURE__ */ _("div", {
|
|
151
|
+
ref: Y,
|
|
152
|
+
"data-slot": "artifact-chat-composer-dock",
|
|
153
|
+
"data-theme-scope": P["data-theme-scope"],
|
|
154
|
+
className: e("min-w-0", P.className)
|
|
155
|
+
}) })]
|
|
156
|
+
})
|
|
157
|
+
}, "column")
|
|
158
|
+
}),
|
|
159
|
+
/* @__PURE__ */ _("main", {
|
|
160
|
+
ref: (e) => {
|
|
161
|
+
F.current = e, Z.current = e;
|
|
162
|
+
},
|
|
163
|
+
"data-slot": "artifact-chat-content",
|
|
164
|
+
className: e(de, z ? "absolute inset-0 pb-0" : e("relative", B && "col-start-1 row-start-1")),
|
|
165
|
+
children: W.content
|
|
166
|
+
}),
|
|
167
|
+
z ? /* @__PURE__ */ _(te.Provider, {
|
|
168
|
+
value: Te,
|
|
169
|
+
children: /* @__PURE__ */ _(ie, {
|
|
170
|
+
open: H,
|
|
171
|
+
onOpenChange: U,
|
|
172
|
+
working: w,
|
|
173
|
+
workingLabel: pe,
|
|
174
|
+
onAdd: me,
|
|
175
|
+
composing: I,
|
|
176
|
+
onComposingChange: L,
|
|
177
|
+
hideOnScroll: he,
|
|
178
|
+
scrollRef: F,
|
|
179
|
+
fabPosition: ge,
|
|
180
|
+
minimized: _e,
|
|
181
|
+
defaultMinimized: ve,
|
|
182
|
+
onMinimizedChange: ye,
|
|
183
|
+
peek: be,
|
|
184
|
+
appearance: xe,
|
|
185
|
+
tone: M
|
|
186
|
+
})
|
|
187
|
+
}) : null,
|
|
188
|
+
/* @__PURE__ */ _(ne, {
|
|
189
|
+
store: q,
|
|
190
|
+
host: G,
|
|
191
|
+
children: W.composer
|
|
192
|
+
}),
|
|
193
|
+
K ? ue(W.chat, K) : null
|
|
194
|
+
]
|
|
195
|
+
})
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
C.Chat = i("chat"), C.Composer = i("composer"), C.Content = i("content"), C.Context = b, C.useContainer = x;
|
|
199
|
+
//#endregion
|
|
200
|
+
export { C as ArtifactChatContainer, S as artifactChatContainerVariants, x as useArtifactChatContainer };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { cn as e } from "../lib/utils.js";
|
|
2
|
+
import { jsxs as t } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/avatar.tsx
|
|
4
|
+
var n = (e) => {
|
|
5
|
+
let t = 0;
|
|
6
|
+
for (let n of e) t = (t * 31 + n.charCodeAt(0)) % 360;
|
|
7
|
+
return t;
|
|
8
|
+
};
|
|
9
|
+
function r({ c: r, size: i, className: a, style: o }) {
|
|
10
|
+
i ||= 40;
|
|
11
|
+
let s = n(r.f + r.l);
|
|
12
|
+
return /* @__PURE__ */ t("span", {
|
|
13
|
+
"data-slot": "avatar",
|
|
14
|
+
className: e("grid shrink-0 place-items-center rounded-full font-semibold tracking-[.5px] text-white select-none", a),
|
|
15
|
+
style: {
|
|
16
|
+
width: i,
|
|
17
|
+
height: i,
|
|
18
|
+
fontSize: i * .38,
|
|
19
|
+
background: `linear-gradient(180deg, hsl(${s} 62% 64%), hsl(${s} 55% 47%))`,
|
|
20
|
+
...o
|
|
21
|
+
},
|
|
22
|
+
children: [r.f[0], r.l[0]]
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { r as Avatar };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { cn as e } from "../lib/utils.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { cva as n } from "class-variance-authority";
|
|
4
|
+
//#region src/components/badge.tsx
|
|
5
|
+
var r = n("box-border inline-flex h-[22px] shrink-0 items-center justify-center gap-1 rounded-full px-2 text-caption leading-none font-semibold whitespace-nowrap [&>svg]:size-3", {
|
|
6
|
+
variants: { variant: {
|
|
7
|
+
default: "bg-primary text-primary-foreground",
|
|
8
|
+
secondary: "bg-secondary text-secondary-foreground",
|
|
9
|
+
tinted: "bg-primary/15 text-primary",
|
|
10
|
+
outline: "text-foreground shadow-hairline",
|
|
11
|
+
destructive: "bg-destructive text-white",
|
|
12
|
+
success: "bg-success text-white"
|
|
13
|
+
} },
|
|
14
|
+
defaultVariants: { variant: "default" }
|
|
15
|
+
});
|
|
16
|
+
function i({ className: n, variant: i, ...a }) {
|
|
17
|
+
return /* @__PURE__ */ t("span", {
|
|
18
|
+
"data-slot": "badge",
|
|
19
|
+
className: e(r({ variant: i }), n),
|
|
20
|
+
...a
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { i as Badge, r as badgeVariants };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAwB,KAAK,WAAW,IAAI,eAAe,EAAsB,MAAM,uBAAuB,CAAC;AACtH,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAUlE,eAAO,MAAM,cAAc;;;8EAsB1B,CAAC;AAEF,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC;IACvG,6FAA6F;IAC7F,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,MAAM,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,2CAU1F"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { TextMorph as t } from "./text-morph.js";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { Button as r, composeRenderProps as i } from "react-aria-components";
|
|
6
|
+
import { cva as a } from "class-variance-authority";
|
|
7
|
+
//#region src/components/button.tsx
|
|
8
|
+
var o = a("bl-btn box-border inline-flex cursor-pointer items-center justify-center gap-2 border-0 [font-family:inherit] whitespace-nowrap outline-none transition-[scale,background-color,opacity] duration-spring-snappy ease-spring-snappy data-pressed:not-aria-expanded:scale-[.97] motion-reduce:transition-none data-focus-visible:ring-2 data-focus-visible:ring-ring data-focus-visible:ring-offset-2 data-disabled:cursor-default data-disabled:opacity-40", {
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-primary text-primary-foreground",
|
|
12
|
+
secondary: "bg-secondary text-secondary-foreground",
|
|
13
|
+
ghost: "bg-transparent text-foreground data-hovered:bg-accent",
|
|
14
|
+
destructive: "bg-destructive text-white",
|
|
15
|
+
link: "bg-transparent p-0 text-primary"
|
|
16
|
+
},
|
|
17
|
+
size: {
|
|
18
|
+
default: "h-9 rounded-ctl px-4 text-subhead font-semibold",
|
|
19
|
+
sm: "h-8 rounded-lg px-3 text-footnote font-semibold",
|
|
20
|
+
lg: "h-11 rounded-xl px-5 text-callout font-semibold",
|
|
21
|
+
pill: "w-full rounded-card px-3 py-[13px] text-callout font-semibold",
|
|
22
|
+
icon: "size-9 rounded-full p-0"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
variant: "default",
|
|
27
|
+
size: "default"
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
function s({ className: a, variant: s, size: c, title: l, children: u, ...d }) {
|
|
31
|
+
return /* @__PURE__ */ n(r, {
|
|
32
|
+
"data-slot": "button",
|
|
33
|
+
className: i(a, (t) => e(o({
|
|
34
|
+
variant: s,
|
|
35
|
+
size: c
|
|
36
|
+
}), t)),
|
|
37
|
+
...d,
|
|
38
|
+
children: typeof u == "string" ? /* @__PURE__ */ n(t, { children: u }) : u,
|
|
39
|
+
...l ? { render: (e) => /* @__PURE__ */ n("button", {
|
|
40
|
+
...e,
|
|
41
|
+
title: l
|
|
42
|
+
}) } : {}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { s as Button, o as buttonVariants };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { cn as e } from "../lib/utils.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { cva as n } from "class-variance-authority";
|
|
4
|
+
//#region src/components/card.tsx
|
|
5
|
+
var r = n("flex flex-col overflow-hidden rounded-card text-card-foreground", {
|
|
6
|
+
variants: { variant: {
|
|
7
|
+
default: "bg-card",
|
|
8
|
+
elevated: "bg-card shadow-[0_6px_24px_--alpha(black/10%),0_0_0_.5px_var(--border)]",
|
|
9
|
+
outline: "bg-transparent shadow-hairline"
|
|
10
|
+
} },
|
|
11
|
+
defaultVariants: { variant: "default" }
|
|
12
|
+
});
|
|
13
|
+
function i({ className: n, variant: i, ...a }) {
|
|
14
|
+
return /* @__PURE__ */ t("div", {
|
|
15
|
+
"data-slot": "card",
|
|
16
|
+
className: e(r({ variant: i }), n),
|
|
17
|
+
...a
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function a({ className: n, ...r }) {
|
|
21
|
+
return /* @__PURE__ */ t("div", {
|
|
22
|
+
"data-slot": "card-header",
|
|
23
|
+
className: e("flex flex-col gap-1 px-4 pt-4 pb-1", n),
|
|
24
|
+
...r
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function o({ className: n, ...r }) {
|
|
28
|
+
return /* @__PURE__ */ t("h3", {
|
|
29
|
+
"data-slot": "card-title",
|
|
30
|
+
className: e("m-0 text-body leading-[22px] font-semibold tracking-[-.2px] text-foreground", n),
|
|
31
|
+
...r
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function s({ className: n, ...r }) {
|
|
35
|
+
return /* @__PURE__ */ t("p", {
|
|
36
|
+
"data-slot": "card-description",
|
|
37
|
+
className: e("m-0 text-footnote leading-[18px] text-muted-foreground", n),
|
|
38
|
+
...r
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function c({ className: n, ...r }) {
|
|
42
|
+
return /* @__PURE__ */ t("div", {
|
|
43
|
+
"data-slot": "card-content",
|
|
44
|
+
className: e("px-4 py-3 text-subhead leading-[20px]", n),
|
|
45
|
+
...r
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function l({ className: n, ...r }) {
|
|
49
|
+
return /* @__PURE__ */ t("div", {
|
|
50
|
+
"data-slot": "card-footer",
|
|
51
|
+
className: e("flex items-center gap-2 px-4 pt-1 pb-4", n),
|
|
52
|
+
...r
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { i as Card, c as CardContent, s as CardDescription, l as CardFooter, a as CardHeader, o as CardTitle, r as cardVariants };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"celebrate.d.ts","sourceRoot":"","sources":["../../src/components/celebrate.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"celebrate.d.ts","sourceRoot":"","sources":["../../src/components/celebrate.tsx"],"names":[],"mappings":"AACA,OAAO,EAA+B,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAmCxE,MAAM,WAAW,cAAc;IAC7B,6EAA6E;IAC7E,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;IACxC,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,KAAU,EAAE,MAAY,EAAE,MAAgB,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,cAAc,2CA6C/G"}
|