@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/components/sidebar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/components/sidebar.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { brandTile as e, cn as t } from "../lib/utils.js";
|
|
3
|
+
import { useContainerWidth as n } from "../lib/container.js";
|
|
4
|
+
import { EdgeDrawer as r } from "./edge-drawer.js";
|
|
5
|
+
import { createContext as i, useContext as a, useEffect as o, useState as s } from "react";
|
|
6
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
|
+
import { Button as u } from "react-aria-components";
|
|
8
|
+
//#region src/components/sidebar.tsx
|
|
9
|
+
var d = "0 0 44px rgba(0,0,0,.4)", f = "hover:bg-secondary!", p = {
|
|
10
|
+
search: "M10.5 4a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM20 20l-4.2-4.2",
|
|
11
|
+
plus: "M12 5v14M5 12h14",
|
|
12
|
+
home: "M4 11l8-7 8 7v9h-5v-6h-6v6H4z",
|
|
13
|
+
inbox: "M4 13l3-8h10l3 8v6H4zM4 13h5l1.5 2h3L15 13h5",
|
|
14
|
+
box: "M12 3l8 4.5v9L12 21l-8-4.5v-9zM12 12l8-4.5M12 12L4 7.5M12 12v9",
|
|
15
|
+
bolt: "M13 2L4 14h6l-1 8 9-12h-6z",
|
|
16
|
+
bell: "M6 9a6 6 0 0112 0c0 5 2 6 2 6H4s2-1 2-6M10 20a2 2 0 004 0",
|
|
17
|
+
cal: "M4 6h16v15H4zM4 10h16M8 3v4M16 3v4",
|
|
18
|
+
doc: "M7 3h7l4 4v14H7zM14 3v4h4",
|
|
19
|
+
user: "M12 12a4 4 0 100-8 4 4 0 000 8zM4 21c0-4 4-6 8-6s8 2 8 6",
|
|
20
|
+
code: "M8 7l-5 5 5 5M16 7l5 5-5 5",
|
|
21
|
+
globe: "M12 3a9 9 0 100 18 9 9 0 000-18zM3 12h18M12 3c-2.5 2.6-2.5 15.4 0 18c2.5-2.6 2.5-15.4 0-18"
|
|
22
|
+
}, m = p;
|
|
23
|
+
function h({ d: e, size: t = 16, sw: n = 1.9 }) {
|
|
24
|
+
return /* @__PURE__ */ c("svg", {
|
|
25
|
+
"data-slot": "icon",
|
|
26
|
+
width: t,
|
|
27
|
+
height: t,
|
|
28
|
+
viewBox: "0 0 24 24",
|
|
29
|
+
fill: "none",
|
|
30
|
+
stroke: "currentColor",
|
|
31
|
+
strokeWidth: n,
|
|
32
|
+
strokeLinecap: "round",
|
|
33
|
+
strokeLinejoin: "round",
|
|
34
|
+
children: /* @__PURE__ */ c("path", { d: e })
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
var g = i(null), _ = i(!1);
|
|
38
|
+
function v() {
|
|
39
|
+
let e = a(g);
|
|
40
|
+
if (!e) throw Error("Sidebar components must be rendered inside <SidebarProvider>");
|
|
41
|
+
return e;
|
|
42
|
+
}
|
|
43
|
+
function y({ defaultOpen: e = !0, breakpoint: r = 560, children: i, style: a, className: l }) {
|
|
44
|
+
let [u, d] = n(), [f, p] = s(e), m = d < r;
|
|
45
|
+
return o(() => {
|
|
46
|
+
p(!m && e);
|
|
47
|
+
}, [m]), /* @__PURE__ */ c(g.Provider, {
|
|
48
|
+
value: {
|
|
49
|
+
open: f,
|
|
50
|
+
setOpen: p,
|
|
51
|
+
toggle: () => {
|
|
52
|
+
p((e) => !e);
|
|
53
|
+
},
|
|
54
|
+
narrow: m
|
|
55
|
+
},
|
|
56
|
+
children: /* @__PURE__ */ c("div", {
|
|
57
|
+
ref: u,
|
|
58
|
+
"data-slot": "sidebar-provider",
|
|
59
|
+
className: t("relative flex h-full overflow-hidden bg-background font-sans", l),
|
|
60
|
+
style: a,
|
|
61
|
+
children: i
|
|
62
|
+
})
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function b({ variant: e = "docked", width: n = 228, railWidth: i = 52, children: a }) {
|
|
66
|
+
let o = v(), s = e === "overlay" || o.narrow, l = !s && e === "rail" && !o.open, u = /* @__PURE__ */ c(_.Provider, {
|
|
67
|
+
value: l,
|
|
68
|
+
children: /* @__PURE__ */ c("div", {
|
|
69
|
+
className: "flex h-full flex-col overflow-hidden",
|
|
70
|
+
children: a
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
if (s) return /* @__PURE__ */ c(r, {
|
|
74
|
+
side: "left",
|
|
75
|
+
open: o.open,
|
|
76
|
+
onClose: () => o.setOpen(!1),
|
|
77
|
+
width: n,
|
|
78
|
+
zIndex: 20,
|
|
79
|
+
shadow: d,
|
|
80
|
+
className: "border-r border-border bg-sidebar",
|
|
81
|
+
children: /* @__PURE__ */ c("div", {
|
|
82
|
+
"data-slot": "sidebar",
|
|
83
|
+
className: "h-full",
|
|
84
|
+
children: u
|
|
85
|
+
})
|
|
86
|
+
});
|
|
87
|
+
let f = l ? i : o.open ? n : 0, p = e === "float";
|
|
88
|
+
return /* @__PURE__ */ c("div", {
|
|
89
|
+
"data-slot": "sidebar",
|
|
90
|
+
className: t("box-border shrink-0 overflow-hidden transition-[width] duration-spring-smooth ease-spring-smooth", p ? "bg-transparent p-2.5" : "border-r border-border bg-sidebar p-0"),
|
|
91
|
+
style: { width: f },
|
|
92
|
+
children: /* @__PURE__ */ c("div", {
|
|
93
|
+
className: t("box-border h-full", p && "overflow-hidden rounded-card border border-border bg-sidebar font-sans"),
|
|
94
|
+
style: { width: (l ? i : n) - (p ? 20 : 0) },
|
|
95
|
+
children: u
|
|
96
|
+
})
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function x({ children: e }) {
|
|
100
|
+
return /* @__PURE__ */ c("div", {
|
|
101
|
+
"data-slot": "sidebar-header",
|
|
102
|
+
className: "shrink-0 px-2.5 pt-3 pb-1.5",
|
|
103
|
+
children: e
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function S({ children: e }) {
|
|
107
|
+
return /* @__PURE__ */ c("div", {
|
|
108
|
+
"data-slot": "sidebar-content",
|
|
109
|
+
className: "bl-scroll min-h-0 flex-1 overflow-x-hidden overflow-y-auto px-2 py-0",
|
|
110
|
+
children: e
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
function C({ children: e }) {
|
|
114
|
+
return /* @__PURE__ */ c("div", {
|
|
115
|
+
"data-slot": "sidebar-footer",
|
|
116
|
+
className: "shrink-0 border-t border-border p-2",
|
|
117
|
+
children: e
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
function w({ name: n, detail: r, initial: i }) {
|
|
121
|
+
let o = a(_);
|
|
122
|
+
return /* @__PURE__ */ l("div", {
|
|
123
|
+
"data-slot": "sidebar-workspace",
|
|
124
|
+
className: t("flex items-center gap-2 px-0.5 pt-0 pb-1", o ? "justify-center" : "justify-start"),
|
|
125
|
+
children: [/* @__PURE__ */ c("span", {
|
|
126
|
+
className: t(e, "grid size-[26px] shrink-0 place-items-center rounded-lg text-caption font-extrabold text-white"),
|
|
127
|
+
children: i || (n || "W")[0]
|
|
128
|
+
}), !o && /* @__PURE__ */ l("div", {
|
|
129
|
+
className: "min-w-0 leading-[1.15]",
|
|
130
|
+
children: [/* @__PURE__ */ c("div", {
|
|
131
|
+
className: "text-[12.5px] font-bold whitespace-nowrap text-foreground",
|
|
132
|
+
children: n
|
|
133
|
+
}), r && /* @__PURE__ */ c("div", {
|
|
134
|
+
className: "text-[10.5px] whitespace-nowrap text-tertiary-foreground",
|
|
135
|
+
children: r
|
|
136
|
+
})]
|
|
137
|
+
})]
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
function T({ placeholder: e = "Quick search", onPress: n }) {
|
|
141
|
+
return a(_) ? /* @__PURE__ */ c(u, {
|
|
142
|
+
"data-slot": "sidebar-search",
|
|
143
|
+
className: t(f, "grid w-full cursor-pointer place-items-center rounded-lg border-0 bg-transparent px-0 py-2 text-tertiary-foreground"),
|
|
144
|
+
render: (t) => /* @__PURE__ */ c("button", {
|
|
145
|
+
...t,
|
|
146
|
+
title: e
|
|
147
|
+
}),
|
|
148
|
+
onPress: n,
|
|
149
|
+
children: /* @__PURE__ */ c(h, {
|
|
150
|
+
d: m.search,
|
|
151
|
+
size: 14
|
|
152
|
+
})
|
|
153
|
+
}) : /* @__PURE__ */ l(u, {
|
|
154
|
+
"data-slot": "sidebar-search",
|
|
155
|
+
className: t(f, "mx-0 mt-0.5 mb-1 flex w-full cursor-pointer items-center gap-[7px] rounded-lg border-0 bg-secondary px-[9px] py-1.5 font-sans"),
|
|
156
|
+
onPress: n,
|
|
157
|
+
children: [
|
|
158
|
+
/* @__PURE__ */ c("span", {
|
|
159
|
+
className: "grid text-tertiary-foreground",
|
|
160
|
+
children: /* @__PURE__ */ c(h, {
|
|
161
|
+
d: m.search,
|
|
162
|
+
size: 13
|
|
163
|
+
})
|
|
164
|
+
}),
|
|
165
|
+
/* @__PURE__ */ c("span", {
|
|
166
|
+
className: "flex-1 text-left text-caption text-tertiary-foreground",
|
|
167
|
+
children: e
|
|
168
|
+
}),
|
|
169
|
+
/* @__PURE__ */ c("span", {
|
|
170
|
+
className: "rounded-sm border border-border px-1 py-0 font-mono text-[10px] text-tertiary-foreground",
|
|
171
|
+
children: "/"
|
|
172
|
+
})
|
|
173
|
+
]
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
function E({ title: e, children: t }) {
|
|
177
|
+
let n = a(_);
|
|
178
|
+
return /* @__PURE__ */ l("div", {
|
|
179
|
+
"data-slot": "sidebar-section",
|
|
180
|
+
children: [e ? n ? /* @__PURE__ */ c("div", { className: "mx-1.5 my-2 h-px bg-border" }) : /* @__PURE__ */ c("div", {
|
|
181
|
+
className: "px-[9px] pt-2.5 pb-1 text-[10px] font-bold tracking-[.6px] whitespace-nowrap text-tertiary-foreground uppercase",
|
|
182
|
+
children: e
|
|
183
|
+
}) : null, t]
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
function D({ icon: e, label: n, badge: r, active: i, tone: o, onPress: s }) {
|
|
187
|
+
let d = a(_), p = typeof e == "string" ? /* @__PURE__ */ c(h, {
|
|
188
|
+
d: m[e] || m.box,
|
|
189
|
+
size: 15,
|
|
190
|
+
sw: 1.8
|
|
191
|
+
}) : e;
|
|
192
|
+
return /* @__PURE__ */ l(u, {
|
|
193
|
+
"data-slot": "sidebar-item",
|
|
194
|
+
className: t(f, "mx-0 my-px flex w-full cursor-pointer items-center gap-[9px] rounded-lg border-0 text-left font-sans text-footnote", d ? "justify-center px-0 py-2" : "justify-start px-[9px] py-1.5", i ? "bg-secondary-strong" : "bg-transparent", !o && (i ? "text-foreground" : "text-muted-foreground"), o ? "font-semibold" : "font-normal"),
|
|
195
|
+
render: (e) => /* @__PURE__ */ c("button", {
|
|
196
|
+
...e,
|
|
197
|
+
title: n
|
|
198
|
+
}),
|
|
199
|
+
onPress: () => s?.(),
|
|
200
|
+
style: o ? { color: o } : void 0,
|
|
201
|
+
children: [
|
|
202
|
+
/* @__PURE__ */ c("span", {
|
|
203
|
+
className: "grid shrink-0",
|
|
204
|
+
children: p
|
|
205
|
+
}),
|
|
206
|
+
!d && /* @__PURE__ */ c("span", {
|
|
207
|
+
className: "flex-1 truncate",
|
|
208
|
+
children: n
|
|
209
|
+
}),
|
|
210
|
+
!d && r != null && /* @__PURE__ */ c("span", {
|
|
211
|
+
className: "rounded-md bg-primary/13 px-1.5 py-px font-mono text-[10.5px] text-primary",
|
|
212
|
+
children: r
|
|
213
|
+
})
|
|
214
|
+
]
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
b.Header = x, b.Content = S, b.Footer = C, b.Workspace = w, b.Search = T, b.Section = E, b.Item = D;
|
|
218
|
+
function O({ style: e, className: n }) {
|
|
219
|
+
let r = v();
|
|
220
|
+
return /* @__PURE__ */ c(u, {
|
|
221
|
+
"data-slot": "sidebar-trigger",
|
|
222
|
+
className: t("grid cursor-pointer place-items-center rounded-lg border-0 bg-transparent p-1.5 text-muted-foreground", n),
|
|
223
|
+
onPress: r.toggle,
|
|
224
|
+
"aria-label": "Toggle sidebar",
|
|
225
|
+
style: e,
|
|
226
|
+
children: /* @__PURE__ */ c("svg", {
|
|
227
|
+
width: "17",
|
|
228
|
+
height: "17",
|
|
229
|
+
viewBox: "0 0 24 24",
|
|
230
|
+
fill: "none",
|
|
231
|
+
stroke: "currentColor",
|
|
232
|
+
strokeWidth: "2",
|
|
233
|
+
strokeLinecap: "round",
|
|
234
|
+
children: /* @__PURE__ */ c("path", { d: "M4 6.5h16M4 12h16M4 17.5h16" })
|
|
235
|
+
})
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
function k({ children: e, style: n, className: r }) {
|
|
239
|
+
return /* @__PURE__ */ c("div", {
|
|
240
|
+
"data-slot": "sidebar-inset",
|
|
241
|
+
className: t("flex min-w-0 flex-1 flex-col overflow-hidden", r),
|
|
242
|
+
style: n,
|
|
243
|
+
children: e
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
function A({ variant: e = "docked" }) {
|
|
247
|
+
let [t, n] = s("Home"), r = (e, r, i) => /* @__PURE__ */ c(D, {
|
|
248
|
+
icon: e,
|
|
249
|
+
label: r,
|
|
250
|
+
badge: i,
|
|
251
|
+
active: t === r,
|
|
252
|
+
onPress: () => n(r)
|
|
253
|
+
}, r);
|
|
254
|
+
return /* @__PURE__ */ l(b, {
|
|
255
|
+
variant: e,
|
|
256
|
+
children: [/* @__PURE__ */ c(x, { children: /* @__PURE__ */ c(w, {
|
|
257
|
+
name: "Creamery Ops",
|
|
258
|
+
detail: "Production Workspace"
|
|
259
|
+
}) }), /* @__PURE__ */ l(S, { children: [
|
|
260
|
+
/* @__PURE__ */ c(T, {}),
|
|
261
|
+
/* @__PURE__ */ c(D, {
|
|
262
|
+
icon: "plus",
|
|
263
|
+
label: "New task",
|
|
264
|
+
tone: "var(--primary)"
|
|
265
|
+
}),
|
|
266
|
+
/* @__PURE__ */ c(E, {
|
|
267
|
+
title: "Workspace",
|
|
268
|
+
children: [
|
|
269
|
+
r("home", "Home"),
|
|
270
|
+
r("bolt", "Agent tasks", 4),
|
|
271
|
+
r("inbox", "Inbox")
|
|
272
|
+
]
|
|
273
|
+
}),
|
|
274
|
+
/* @__PURE__ */ c(E, {
|
|
275
|
+
title: "Objects",
|
|
276
|
+
children: [r("box", "Suppliers"), r("box", "Inventory")]
|
|
277
|
+
})
|
|
278
|
+
] })]
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
//#endregion
|
|
282
|
+
export { _ as SBCollapsedCtx, g as SBCtx, p as SIDEBAR_ICONS, b as Sidebar, S as SidebarContent, C as SidebarFooter, x as SidebarHeader, k as SidebarInset, D as SidebarItem, A as SidebarNav, y as SidebarProvider, T as SidebarSearch, E as SidebarSection, O as SidebarTrigger, w as SidebarWorkspace, v as useSidebar };
|
|
@@ -0,0 +1,48 @@
|
|
|
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/skeleton.tsx
|
|
5
|
+
var r = n("block bg-secondary-strong [background-image:linear-gradient(90deg,transparent_25%,color-mix(in_oklab,var(--card)_55%,transparent)_50%,transparent_75%)] [background-size:200%_100%] [background-position:150%_0] [background-repeat:no-repeat] animate-bl-shimmer motion-reduce:animate-none", {
|
|
6
|
+
variants: { shape: {
|
|
7
|
+
default: "rounded-ctl",
|
|
8
|
+
rounded: "rounded-ctl",
|
|
9
|
+
rect: "rounded-[3px]",
|
|
10
|
+
text: "h-3.5 rounded-full",
|
|
11
|
+
circle: "shrink-0 rounded-full"
|
|
12
|
+
} },
|
|
13
|
+
defaultVariants: { shape: "default" }
|
|
14
|
+
});
|
|
15
|
+
function i({ className: n, shape: i, width: a, height: o, style: s, ...c }) {
|
|
16
|
+
return /* @__PURE__ */ t("div", {
|
|
17
|
+
"data-slot": "skeleton",
|
|
18
|
+
"data-shape": i ?? "default",
|
|
19
|
+
"aria-hidden": "true",
|
|
20
|
+
className: e(r({ shape: i }), n),
|
|
21
|
+
style: a != null || o != null ? {
|
|
22
|
+
width: a,
|
|
23
|
+
height: o,
|
|
24
|
+
...s
|
|
25
|
+
} : s,
|
|
26
|
+
...c
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function a({ lines: n = 3, lastLineWidth: r = "60%", lineHeight: a, lineClassName: o, gap: s = 8, className: c, style: l, ...u }) {
|
|
30
|
+
return /* @__PURE__ */ t("div", {
|
|
31
|
+
"data-slot": "skeleton-text",
|
|
32
|
+
"aria-hidden": "true",
|
|
33
|
+
className: e("flex w-full flex-col", c),
|
|
34
|
+
style: {
|
|
35
|
+
gap: s,
|
|
36
|
+
...l
|
|
37
|
+
},
|
|
38
|
+
...u,
|
|
39
|
+
children: Array.from({ length: Math.max(1, n) }, (e, s) => /* @__PURE__ */ t(i, {
|
|
40
|
+
shape: "text",
|
|
41
|
+
className: o,
|
|
42
|
+
height: a,
|
|
43
|
+
width: s === n - 1 && n > 1 ? r : void 0
|
|
44
|
+
}, s))
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { i as Skeleton, a as SkeletonText, r as skeletonVariants };
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { SliderProps as AriaSliderProps, SliderThumbProps, SliderTrackProps } from 'react-aria-components';
|
|
3
|
-
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
/** Root layout plus the tone's track / fill colors (as --bl-slider-* knobs the track and thumb read). */
|
|
5
|
+
export declare const sliderVariants: (props?: ({
|
|
6
|
+
tone?: "default" | "onDark" | "onLight" | null | undefined;
|
|
7
|
+
size?: "default" | "sm" | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
export interface SliderProps<T extends number | number[]> extends AriaSliderProps<T>, VariantProps<typeof sliderVariants> {
|
|
4
10
|
label?: ReactNode;
|
|
5
11
|
/** Show the formatted value opposite the label. */
|
|
6
12
|
showValue?: boolean;
|
|
7
13
|
/** Color scheme of the track, fill and thumb. `default`: the tint on the fill color. `onDark`: translucent
|
|
8
14
|
white for media controls over artwork or dark glass (Music's scrubber and volume). `onLight`: translucent
|
|
9
15
|
black for light imagery. Fine-tune any of them with `trackColor` / `fillColor` / `thumbColor`. */
|
|
10
|
-
tone?: SliderTone;
|
|
16
|
+
tone?: SliderTone | null;
|
|
11
17
|
/** `default`: the 26px iOS thumb. `sm`: a 12px thumb on a 20px-tall hit area that grows while dragging (scrubbers). */
|
|
12
|
-
size?: 'default' | 'sm';
|
|
18
|
+
size?: 'default' | 'sm' | null;
|
|
13
19
|
/** Any CSS color for the unfilled track. */
|
|
14
20
|
trackColor?: string;
|
|
15
21
|
/** Any CSS color for the filled part. */
|
|
@@ -18,7 +24,7 @@ export interface SliderProps<T extends number | number[]> extends AriaSliderProp
|
|
|
18
24
|
thumbColor?: string;
|
|
19
25
|
}
|
|
20
26
|
export type SliderTone = 'default' | 'onDark' | 'onLight';
|
|
21
|
-
export declare function Slider<T extends number | number[]>({ className, label, showValue, children,
|
|
27
|
+
export declare function Slider<T extends number | number[]>({ className, label, showValue, children, minValue, maxValue, step, tone, size, trackColor, fillColor, thumbColor, style, ...props }: SliderProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
22
28
|
/** 28px hit area with the 4px track and tint fill inside; inset by half a thumb so the thumb never overhangs
|
|
23
29
|
(like a native range). Children are the thumbs. */
|
|
24
30
|
export declare function SliderTrack({ className, children, ...props }: SliderTrackProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../src/components/slider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../src/components/slider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAEiB,KAAK,WAAW,IAAI,eAAe,EAEzB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EAEtD,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAOlE,yGAAyG;AACzG,eAAO,MAAM,cAAc;;;8EAUzB,CAAC;AAEH,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAE,SAAQ,eAAe,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC;IACvH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,mDAAmD;IACnD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;yGAEqG;IACrG,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IACzB,uHAAuH;IACvH,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC;IAC/B,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE1D,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,EAAE,EAClD,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAY,EAAE,QAAc,EAAE,IAAQ,EAC7E,IAAgB,EAAE,IAAgB,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,KAAK,EACvF,EAAE,WAAW,CAAC,CAAC,CAAC,2CAoChB;AAED;sDACsD;AACtD,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CA0B9E;AAED,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAcpE"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { useRowLabel as t } from "../lib/row-label.js";
|
|
4
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { Label as a, Slider as o, SliderOutput as s, SliderThumb as c, SliderTrack as l, composeRenderProps as u } from "react-aria-components";
|
|
6
|
+
import { cva as d } from "class-variance-authority";
|
|
7
|
+
//#region src/components/slider.tsx
|
|
8
|
+
var f = d("group grid w-full grid-cols-[1fr_auto] items-center gap-x-3 gap-y-1 data-disabled:opacity-40", {
|
|
9
|
+
variants: {
|
|
10
|
+
tone: {
|
|
11
|
+
default: "",
|
|
12
|
+
onDark: "[--bl-slider-track:--alpha(white/22%)] [--bl-slider-fill:--alpha(white/88%)]",
|
|
13
|
+
onLight: "[--bl-slider-track:--alpha(black/14%)] [--bl-slider-fill:--alpha(black/72%)]"
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
default: "",
|
|
17
|
+
sm: ""
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
tone: "default",
|
|
22
|
+
size: "default"
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
function p({ className: c, label: l, showValue: d, children: p, minValue: g = 0, maxValue: _ = 100, step: v = 1, tone: y = "default", size: b = "default", trackColor: x, fillColor: S, thumbColor: C, style: w, ...T }) {
|
|
26
|
+
let E = t(T);
|
|
27
|
+
return /* @__PURE__ */ r(o, {
|
|
28
|
+
"data-slot": "slider",
|
|
29
|
+
"data-tone": y === "default" ? void 0 : y,
|
|
30
|
+
"data-size": b === "default" ? void 0 : b,
|
|
31
|
+
minValue: g,
|
|
32
|
+
maxValue: _,
|
|
33
|
+
step: v,
|
|
34
|
+
className: u(c, (t) => e(f({
|
|
35
|
+
tone: y,
|
|
36
|
+
size: b
|
|
37
|
+
}), t)),
|
|
38
|
+
style: u(w, (e) => {
|
|
39
|
+
let t = {
|
|
40
|
+
...x ? { "--bl-slider-track": x } : null,
|
|
41
|
+
...S ? { "--bl-slider-fill": S } : null,
|
|
42
|
+
...C ? { "--bl-slider-thumb": C } : null
|
|
43
|
+
};
|
|
44
|
+
return Object.keys(t).length ? {
|
|
45
|
+
...t,
|
|
46
|
+
...e
|
|
47
|
+
} : e;
|
|
48
|
+
}),
|
|
49
|
+
...T,
|
|
50
|
+
"aria-labelledby": l ? T["aria-labelledby"] : E,
|
|
51
|
+
children: u(p, (e, { state: t }) => e ?? /* @__PURE__ */ i(n, { children: [
|
|
52
|
+
l ? /* @__PURE__ */ r(a, {
|
|
53
|
+
className: "text-subhead font-medium text-foreground",
|
|
54
|
+
children: l
|
|
55
|
+
}) : null,
|
|
56
|
+
d ? /* @__PURE__ */ r(s, { className: "col-start-2 text-subhead text-muted-foreground tabular-nums" }) : null,
|
|
57
|
+
/* @__PURE__ */ r(m, {
|
|
58
|
+
className: "col-span-2",
|
|
59
|
+
children: t.values.map((e, t) => /* @__PURE__ */ r(h, { index: t }, t))
|
|
60
|
+
})
|
|
61
|
+
] }))
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function m({ className: t, children: a, ...o }) {
|
|
65
|
+
return /* @__PURE__ */ r(l, {
|
|
66
|
+
"data-slot": "slider-track",
|
|
67
|
+
className: u(t, (t) => e("relative mx-[13px] h-7 cursor-pointer group-data-[size=sm]:mx-[6px] group-data-[size=sm]:h-5 data-disabled:cursor-default", t)),
|
|
68
|
+
...o,
|
|
69
|
+
children: u(a, (e, { state: t }) => {
|
|
70
|
+
let a = t.values.length > 1, o = a ? t.getThumbPercent(0) : 0, s = t.getThumbPercent(a ? t.values.length - 1 : 0);
|
|
71
|
+
return /* @__PURE__ */ i(n, { children: [
|
|
72
|
+
/* @__PURE__ */ r("span", {
|
|
73
|
+
"aria-hidden": "true",
|
|
74
|
+
className: "absolute inset-x-0 top-1/2 h-1 -translate-y-1/2 rounded-full bg-[var(--bl-slider-track,var(--secondary-strong,var(--accent)))]"
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ r("span", {
|
|
77
|
+
"aria-hidden": "true",
|
|
78
|
+
"data-slot": "slider-range",
|
|
79
|
+
className: "absolute top-1/2 left-(--start) h-1 w-(--len) -translate-y-1/2 rounded-full bg-[var(--bl-slider-fill,var(--primary))]",
|
|
80
|
+
style: {
|
|
81
|
+
"--start": `${o * 100}%`,
|
|
82
|
+
"--len": `${(s - o) * 100}%`
|
|
83
|
+
}
|
|
84
|
+
}),
|
|
85
|
+
e
|
|
86
|
+
] });
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function h({ className: t, ...n }) {
|
|
91
|
+
return /* @__PURE__ */ r(c, {
|
|
92
|
+
"data-slot": "slider-thumb",
|
|
93
|
+
className: u(t, (t) => e("top-1/2 size-[26px] rounded-full bg-[var(--bl-slider-thumb,white)] shadow-[0_1px_4px_--alpha(black/28%),0_0_1px_--alpha(black/22%)] outline-none", "group-data-[size=sm]:size-3 group-data-[size=sm]:shadow-[0_0_0_.5px_--alpha(black/18%),0_1px_2px_--alpha(black/18%)] group-data-[size=sm]:data-dragging:scale-150", "transition-[scale,box-shadow] duration-spring-snappy ease-spring-snappy data-dragging:scale-110 motion-reduce:transition-none", "data-focus-visible:shadow-[0_1px_4px_--alpha(black/28%),0_0_0_4px_color-mix(in_oklab,var(--primary)_45%,transparent)]", t)),
|
|
94
|
+
...n
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
export { p as Slider, h as SliderThumb, m as SliderTrack, f as sliderVariants };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface SnapSheetProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
snaps?: number[];
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
/** Classes for the sheet surface (the panel), merged last — e.g. `bg-background` for a surface other than `bg-card`. */
|
|
8
|
+
className?: string;
|
|
9
|
+
/** Styles for the sheet surface (the panel). */
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
export declare function SnapSheet({ open, onClose, snaps: snapsProp, children, className, style }: SnapSheetProps): import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
//# sourceMappingURL=snap-sheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snap-sheet.d.ts","sourceRoot":"","sources":["../../src/components/snap-sheet.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,wHAAwH;IACxH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AACD,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,cAAc,kDA+GxG"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { prefersReducedMotion as t, springs as n } from "../lib/motion.js";
|
|
4
|
+
import { animate as r, motion as i, useMotionValue as a, useTransform as o } from "framer-motion";
|
|
5
|
+
import * as s from "react";
|
|
6
|
+
import { useEffect as c, useRef as l, useState as u } from "react";
|
|
7
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/snap-sheet.tsx
|
|
9
|
+
function p({ open: p, onClose: m, snaps: h, children: g, className: _, style: v }) {
|
|
10
|
+
let y = h || [.55, .94], b = Math.max(...y), [x, S] = u(!1), C = l(null), w = a(1e4), T = l(null), E = l({
|
|
11
|
+
drag: !1,
|
|
12
|
+
y0: 0,
|
|
13
|
+
ty0: 0,
|
|
14
|
+
samples: []
|
|
15
|
+
}), D = () => C.current ? C.current.offsetHeight : 700, O = (e) => D() * (b - y[e]), k = o(w, (e) => {
|
|
16
|
+
let t = D();
|
|
17
|
+
return Math.min(1, Math.max(0, (b - e / t) / b));
|
|
18
|
+
}), A = (e, i = 0, a) => {
|
|
19
|
+
if (T.current?.stop(), t()) {
|
|
20
|
+
w.set(e), a?.();
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
T.current = r(w, e, {
|
|
24
|
+
...n.tray,
|
|
25
|
+
velocity: i,
|
|
26
|
+
onComplete: a
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
if (c(() => {
|
|
30
|
+
p ? S(!0) : x && A(D() * b, 0, () => S(!1));
|
|
31
|
+
}, [p]), s.useLayoutEffect(() => {
|
|
32
|
+
!x || !p || (w.set(D() * b), A(O(0)));
|
|
33
|
+
}, [x]), c(() => () => T.current?.stop(), []), !p && !x) return null;
|
|
34
|
+
let j = (e) => {
|
|
35
|
+
T.current?.stop(), E.current = {
|
|
36
|
+
drag: !0,
|
|
37
|
+
y0: e.clientY,
|
|
38
|
+
ty0: w.get(),
|
|
39
|
+
samples: [{
|
|
40
|
+
t: e.timeStamp,
|
|
41
|
+
y: e.clientY
|
|
42
|
+
}]
|
|
43
|
+
}, e.currentTarget.setPointerCapture(e.pointerId);
|
|
44
|
+
}, M = (e) => {
|
|
45
|
+
let t = E.current;
|
|
46
|
+
if (!t.drag) return;
|
|
47
|
+
t.samples.push({
|
|
48
|
+
t: e.timeStamp,
|
|
49
|
+
y: e.clientY
|
|
50
|
+
}), t.samples.length > 6 && t.samples.shift();
|
|
51
|
+
let n = t.ty0 + (e.clientY - t.y0), r = O(y.indexOf(b));
|
|
52
|
+
n < r && (n = r - (r - n) ** .72), w.set(Math.max(0, n));
|
|
53
|
+
}, N = (e) => {
|
|
54
|
+
let t = E.current;
|
|
55
|
+
if (!t.drag) return;
|
|
56
|
+
t.drag = !1;
|
|
57
|
+
let n = t.samples.filter((t) => e.timeStamp - t.t < 90)[0] ?? t.samples[0], r = n ? (e.clientY - n.y) / Math.max(1, e.timeStamp - n.t) : 0, i = w.get() + r * 200, a = D(), o = -1, s = Infinity;
|
|
58
|
+
if (y.forEach((e, t) => {
|
|
59
|
+
let n = Math.abs(i - a * (b - e));
|
|
60
|
+
n < s && (s = n, o = t);
|
|
61
|
+
}), Math.abs(i - a * b) < s || i > a * (b - Math.min(...y)) + a * .12) {
|
|
62
|
+
A(a * b, r * 1e3), m();
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
A(O(o), r * 1e3);
|
|
66
|
+
};
|
|
67
|
+
return /* @__PURE__ */ f("div", {
|
|
68
|
+
ref: C,
|
|
69
|
+
"data-slot": "snap-sheet",
|
|
70
|
+
className: "absolute inset-0 z-70 overflow-hidden",
|
|
71
|
+
children: [/* @__PURE__ */ d(i.div, {
|
|
72
|
+
"data-slot": "snap-sheet-scrim",
|
|
73
|
+
onClick: m,
|
|
74
|
+
className: "absolute inset-0 bg-black/45",
|
|
75
|
+
style: { opacity: k }
|
|
76
|
+
}), /* @__PURE__ */ f(i.div, {
|
|
77
|
+
"data-slot": "snap-sheet-panel",
|
|
78
|
+
className: e("absolute right-0 bottom-0 left-0 flex h-(--sheet-h) touch-none flex-col rounded-t-2xl border-x border-t border-border bg-card shadow-[0_-12px_40px_black] shadow-black/8 dark:shadow-black/50", _),
|
|
79
|
+
style: {
|
|
80
|
+
...v,
|
|
81
|
+
y: w,
|
|
82
|
+
"--sheet-h": b * 100 + "%"
|
|
83
|
+
},
|
|
84
|
+
children: [/* @__PURE__ */ d("div", {
|
|
85
|
+
"data-slot": "snap-sheet-handle",
|
|
86
|
+
onPointerDown: j,
|
|
87
|
+
onPointerMove: M,
|
|
88
|
+
onPointerUp: N,
|
|
89
|
+
onPointerCancel: N,
|
|
90
|
+
className: "shrink-0 cursor-grab touch-none pt-2 pb-1",
|
|
91
|
+
children: /* @__PURE__ */ d("div", { className: "mx-auto h-[5px] w-[38px] rounded-[3px] bg-handle" })
|
|
92
|
+
}), /* @__PURE__ */ d("div", {
|
|
93
|
+
className: "flex min-h-0 flex-1 flex-col",
|
|
94
|
+
children: g
|
|
95
|
+
})]
|
|
96
|
+
})]
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
//#endregion
|
|
100
|
+
export { p as SnapSheet };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { cn as e } from "../lib/utils.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/spinner.tsx
|
|
4
|
+
function n({ spin: n, size: r = 22, className: i, style: a }) {
|
|
5
|
+
return /* @__PURE__ */ t("svg", {
|
|
6
|
+
"data-slot": "spinner",
|
|
7
|
+
className: e("block transition-[scale,opacity] duration-spring-snappy ease-spring-snappy starting:scale-50 starting:opacity-0 motion-reduce:transition-none", n && "animate-[blSpin_.75s_steps(8)_infinite]", i),
|
|
8
|
+
width: r,
|
|
9
|
+
height: r,
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
style: a,
|
|
12
|
+
"aria-hidden": "true",
|
|
13
|
+
children: [
|
|
14
|
+
0,
|
|
15
|
+
1,
|
|
16
|
+
2,
|
|
17
|
+
3,
|
|
18
|
+
4,
|
|
19
|
+
5,
|
|
20
|
+
6,
|
|
21
|
+
7
|
|
22
|
+
].map((e) => /* @__PURE__ */ t("rect", {
|
|
23
|
+
x: "11.1",
|
|
24
|
+
y: "2.8",
|
|
25
|
+
width: "1.8",
|
|
26
|
+
height: "5.2",
|
|
27
|
+
rx: "0.9",
|
|
28
|
+
fill: "currentColor",
|
|
29
|
+
opacity: (e + 1) / 8,
|
|
30
|
+
transform: `rotate(${e * 45} 12 12)`
|
|
31
|
+
}, e))
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { n as Spinner };
|