@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
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e, pressable as t } from "../lib/utils.js";
|
|
3
|
+
import { prefersReducedMotion as n, springs as r } from "../lib/motion.js";
|
|
4
|
+
import { Icon as i } from "../lib/icon.js";
|
|
5
|
+
import { PlainButton as a } from "./plain-button.js";
|
|
6
|
+
import { AnimatePresence as o, animate as s, motion as c } from "framer-motion";
|
|
7
|
+
import { useEffect as l, useLayoutEffect as u, useRef as d, useState as f } from "react";
|
|
8
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
9
|
+
//#region src/components/message-scroller.tsx
|
|
10
|
+
function h({ items: h, streaming: g, threadKey: _, peek: v, className: y, style: b }) {
|
|
11
|
+
let x = v ?? 52, S = d(null), C = d(null), w = d(null), T = d({
|
|
12
|
+
follow: !0,
|
|
13
|
+
prog: 0,
|
|
14
|
+
ids: "",
|
|
15
|
+
thread: void 0
|
|
16
|
+
}), [E, D] = f(!1), [O, k] = f(!1), A = d(O);
|
|
17
|
+
A.current = O;
|
|
18
|
+
let j = d({
|
|
19
|
+
body: null,
|
|
20
|
+
mo: null
|
|
21
|
+
});
|
|
22
|
+
l(() => {
|
|
23
|
+
let e = S.current?.closest("[data-slot=\"composer-bump-content\"]") ?? null, t = j.current;
|
|
24
|
+
if (e === t.body) return;
|
|
25
|
+
if (t.mo?.disconnect(), t.body = e, t.mo = null, !e || typeof MutationObserver > "u") {
|
|
26
|
+
k(!1);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
let n = () => k(e.hasAttribute("data-peeking"));
|
|
30
|
+
n(), t.mo = new MutationObserver(n), t.mo.observe(e, {
|
|
31
|
+
attributes: !0,
|
|
32
|
+
attributeFilter: ["data-peeking"]
|
|
33
|
+
});
|
|
34
|
+
}), l(() => () => j.current.mo?.disconnect(), []);
|
|
35
|
+
let M = d({
|
|
36
|
+
thread: void 0,
|
|
37
|
+
ids: /* @__PURE__ */ new Set()
|
|
38
|
+
});
|
|
39
|
+
M.current.thread !== _ && (M.current = {
|
|
40
|
+
thread: _,
|
|
41
|
+
ids: new Set(h.map((e) => e.id))
|
|
42
|
+
}), l(() => {
|
|
43
|
+
for (let e of h) M.current.ids.add(e.id);
|
|
44
|
+
}, [h]);
|
|
45
|
+
let N = d(null), P = (e) => {
|
|
46
|
+
let t = S.current;
|
|
47
|
+
if (t) {
|
|
48
|
+
if (N.current?.stop(), n()) {
|
|
49
|
+
t.scrollTop = e;
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
N.current = s(t.scrollTop, e, {
|
|
53
|
+
...r.smooth,
|
|
54
|
+
restDelta: .5,
|
|
55
|
+
onUpdate: (e) => {
|
|
56
|
+
t.scrollTop = e;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}, F = (e) => e.scrollHeight - e.scrollTop - e.clientHeight, I = (e) => {
|
|
61
|
+
T.current.prog = performance.now() + e;
|
|
62
|
+
}, L = () => {
|
|
63
|
+
let e = S.current, t = C.current, n = w.current;
|
|
64
|
+
if (!e || !t || !n) return;
|
|
65
|
+
let r = 0, i = t.querySelectorAll("[data-anchor=\"1\"]"), a = i[i.length - 1];
|
|
66
|
+
if (a && !A.current) {
|
|
67
|
+
let i = t.scrollHeight - n.offsetHeight - a.offsetTop;
|
|
68
|
+
r = Math.max(0, e.clientHeight - x - i);
|
|
69
|
+
}
|
|
70
|
+
Math.abs((parseFloat(n.style.height) || 0) - r) > 1 && (n.style.height = r + "px");
|
|
71
|
+
}, R = (e) => {
|
|
72
|
+
let t = S.current;
|
|
73
|
+
t && (T.current.follow = !0, I(e ? 800 : 90), e ? P(t.scrollHeight - t.clientHeight) : t.scrollTop = t.scrollHeight);
|
|
74
|
+
}, z = (e, t) => {
|
|
75
|
+
let n = S.current;
|
|
76
|
+
if (!n) return !1;
|
|
77
|
+
let r = n.querySelector("[data-mid=\"" + CSS.escape(e) + "\"]");
|
|
78
|
+
if (!r) return !1;
|
|
79
|
+
I(t ? 800 : 90);
|
|
80
|
+
let i = Math.max(0, r.offsetTop - x);
|
|
81
|
+
return t ? P(i) : n.scrollTop = i, !0;
|
|
82
|
+
};
|
|
83
|
+
u(() => {
|
|
84
|
+
let e = T.current, t = h.map((e) => e.id).join(","), n = e.ids;
|
|
85
|
+
if (e.ids = t, L(), e.thread !== _) {
|
|
86
|
+
e.thread = _, requestAnimationFrame(() => {
|
|
87
|
+
L();
|
|
88
|
+
let t = h.filter((e) => e.anchor);
|
|
89
|
+
t.length && z(t[t.length - 1].id, !1) || R(!1);
|
|
90
|
+
let n = S.current;
|
|
91
|
+
n && (e.follow = F(n) < 40, D(F(n) > 160));
|
|
92
|
+
});
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
if (n && t !== n) {
|
|
96
|
+
let e = n.split(","), t = h.filter((t) => !e.includes(t.id)).filter((e) => e.anchor).pop();
|
|
97
|
+
t && requestAnimationFrame(() => {
|
|
98
|
+
L(), A.current ? R(!0) : z(t.id, !0), T.current.follow = !0;
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}, [h, _]), l(() => {
|
|
102
|
+
let e = S.current, t = C.current;
|
|
103
|
+
if (!e || !t || typeof ResizeObserver > "u") return;
|
|
104
|
+
let n = new ResizeObserver(() => {
|
|
105
|
+
L();
|
|
106
|
+
let t = T.current;
|
|
107
|
+
t.follow && performance.now() > t.prog && F(e) > 2 && (e.scrollTop = e.scrollHeight), D(F(e) > 160);
|
|
108
|
+
});
|
|
109
|
+
return n.observe(t), n.observe(e), () => n.disconnect();
|
|
110
|
+
}, []);
|
|
111
|
+
let B = d(O);
|
|
112
|
+
u(() => {
|
|
113
|
+
if (B.current === O) return;
|
|
114
|
+
if (B.current = O, L(), O) {
|
|
115
|
+
R(!1);
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
let e = h.filter((e) => e.anchor);
|
|
119
|
+
e.length && z(e[e.length - 1].id, !1) || R(!1);
|
|
120
|
+
}, [O]);
|
|
121
|
+
let V = () => {
|
|
122
|
+
N.current?.stop();
|
|
123
|
+
let e = S.current;
|
|
124
|
+
e && F(e) > 40 && (T.current.follow = !1);
|
|
125
|
+
}, H = () => {
|
|
126
|
+
let e = S.current;
|
|
127
|
+
e && (F(e) < 40 && performance.now() > T.current.prog && (T.current.follow = !0), D(F(e) > 160));
|
|
128
|
+
}, U = E || g && !T.current.follow;
|
|
129
|
+
return /* @__PURE__ */ m("div", {
|
|
130
|
+
"data-slot": "message-scroller",
|
|
131
|
+
className: e("relative min-h-0 flex-1", y),
|
|
132
|
+
style: b,
|
|
133
|
+
children: [/* @__PURE__ */ p("div", {
|
|
134
|
+
ref: S,
|
|
135
|
+
"data-resting": O || void 0,
|
|
136
|
+
className: "wb-scroll absolute inset-0 flex flex-col overflow-y-auto overscroll-contain outline-none",
|
|
137
|
+
role: "region",
|
|
138
|
+
"aria-label": "Messages",
|
|
139
|
+
tabIndex: 0,
|
|
140
|
+
onScroll: H,
|
|
141
|
+
onWheel: (e) => {
|
|
142
|
+
e.deltaY < 0 && V();
|
|
143
|
+
},
|
|
144
|
+
onTouchMove: V,
|
|
145
|
+
onKeyDown: (e) => {
|
|
146
|
+
(e.key === "ArrowUp" || e.key === "PageUp" || e.key === "Home") && V();
|
|
147
|
+
},
|
|
148
|
+
children: /* @__PURE__ */ m("div", {
|
|
149
|
+
ref: C,
|
|
150
|
+
role: "log",
|
|
151
|
+
"aria-relevant": "additions",
|
|
152
|
+
"aria-busy": !!g,
|
|
153
|
+
className: e("mx-auto box-border w-full max-w-[780px] shrink-0 px-[22px] pt-4 pb-1", O && "mt-auto"),
|
|
154
|
+
children: [h.map((e) => {
|
|
155
|
+
let t = !M.current.ids.has(e.id);
|
|
156
|
+
return /* @__PURE__ */ p("div", {
|
|
157
|
+
"data-mid": e.id,
|
|
158
|
+
"data-anchor": e.anchor ? "1" : void 0,
|
|
159
|
+
className: "[contain-intrinsic-size:auto_48px] [content-visibility:auto]",
|
|
160
|
+
children: /* @__PURE__ */ p(c.div, {
|
|
161
|
+
initial: t ? {
|
|
162
|
+
opacity: 0,
|
|
163
|
+
y: e.anchor ? 18 : 10,
|
|
164
|
+
scale: e.anchor ? .98 : 1
|
|
165
|
+
} : !1,
|
|
166
|
+
animate: {
|
|
167
|
+
opacity: 1,
|
|
168
|
+
y: 0,
|
|
169
|
+
scale: 1
|
|
170
|
+
},
|
|
171
|
+
transition: {
|
|
172
|
+
...r.smooth,
|
|
173
|
+
opacity: { duration: .22 }
|
|
174
|
+
},
|
|
175
|
+
className: e.anchor ? "origin-bottom-right" : "origin-top-left",
|
|
176
|
+
children: e.node
|
|
177
|
+
})
|
|
178
|
+
}, e.id);
|
|
179
|
+
}), /* @__PURE__ */ p("div", {
|
|
180
|
+
ref: w,
|
|
181
|
+
"aria-hidden": "true"
|
|
182
|
+
})]
|
|
183
|
+
})
|
|
184
|
+
}), /* @__PURE__ */ p(o, {
|
|
185
|
+
initial: !1,
|
|
186
|
+
children: U ? /* @__PURE__ */ p(c.div, {
|
|
187
|
+
className: "absolute bottom-3 left-1/2 z-2",
|
|
188
|
+
initial: {
|
|
189
|
+
opacity: 0,
|
|
190
|
+
y: 14,
|
|
191
|
+
scale: .85,
|
|
192
|
+
x: "-50%"
|
|
193
|
+
},
|
|
194
|
+
animate: {
|
|
195
|
+
opacity: 1,
|
|
196
|
+
y: 0,
|
|
197
|
+
scale: 1,
|
|
198
|
+
x: "-50%"
|
|
199
|
+
},
|
|
200
|
+
exit: {
|
|
201
|
+
opacity: 0,
|
|
202
|
+
y: 10,
|
|
203
|
+
scale: .9,
|
|
204
|
+
x: "-50%"
|
|
205
|
+
},
|
|
206
|
+
transition: r.snappy,
|
|
207
|
+
children: /* @__PURE__ */ m(a, {
|
|
208
|
+
"data-slot": "message-scroller-jump",
|
|
209
|
+
className: e(t, "flex cursor-pointer items-center overflow-hidden rounded-[99px] border border-border bg-card p-[7px] text-[12.5px] font-semibold text-foreground shadow-[0_4px_16px_black] shadow-black/8 dark:shadow-black/35"),
|
|
210
|
+
onPress: () => {
|
|
211
|
+
R(!0);
|
|
212
|
+
},
|
|
213
|
+
"aria-label": "Jump to latest",
|
|
214
|
+
children: [/* @__PURE__ */ p(o, {
|
|
215
|
+
initial: !1,
|
|
216
|
+
children: g ? /* @__PURE__ */ m(c.span, {
|
|
217
|
+
className: "flex items-center gap-[7px] overflow-hidden whitespace-nowrap",
|
|
218
|
+
initial: {
|
|
219
|
+
width: 0,
|
|
220
|
+
opacity: 0
|
|
221
|
+
},
|
|
222
|
+
animate: {
|
|
223
|
+
width: "auto",
|
|
224
|
+
opacity: 1
|
|
225
|
+
},
|
|
226
|
+
exit: {
|
|
227
|
+
width: 0,
|
|
228
|
+
opacity: 0
|
|
229
|
+
},
|
|
230
|
+
transition: r.snappy,
|
|
231
|
+
children: [/* @__PURE__ */ p("span", { className: "ml-1.5 size-[7px] shrink-0 animate-[wbPulse_1.1s_infinite] rounded-[50%] bg-primary motion-reduce:animate-none" }), /* @__PURE__ */ p("span", {
|
|
232
|
+
className: "pr-[7px]",
|
|
233
|
+
children: "Streaming"
|
|
234
|
+
})]
|
|
235
|
+
}, "streaming") : null
|
|
236
|
+
}), /* @__PURE__ */ p(i, {
|
|
237
|
+
name: "chevron-down-wide",
|
|
238
|
+
size: 15,
|
|
239
|
+
sw: 2.2
|
|
240
|
+
})]
|
|
241
|
+
})
|
|
242
|
+
}, "jump") : null
|
|
243
|
+
})]
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
//#endregion
|
|
247
|
+
export { h as MessageScroller };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"morph.d.ts","sourceRoot":"","sources":["../../src/components/morph.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"morph.d.ts","sourceRoot":"","sources":["../../src/components/morph.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,aAAa,EAAE,KAAK,UAAU,EAA0C,KAAK,SAAS,EAC5F,MAAM,OAAO,CAAC;AACf,OAAO,EACgG,KAAK,UAAU,EACrH,MAAM,eAAe,CAAC;AACvB,OAAO,EAAW,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAwBxD,MAAM,WAAW,e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AM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,+EAA+E;AAC/E,eAAO,MAAM,KAAK,oGAqDhB,CAAC;AAEH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;mEAE+D;IAC/D,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC;CAC/C;AAOD;0GAC0G;AAC1G,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,IAAa,EAAE,EAAE,kBAAkB,2CAG5E;AAED,6FAA6F;AAC7F,wBAAgB,kBAAkB,IAAI,UAAU,CAI/C"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { springs as t } from "../lib/motion.js";
|
|
4
|
+
import { AnimatePresence as n, LayoutGroup as r, MotionConfig as i, motion as a, useDragControls as o, useReducedMotion as s } from "framer-motion";
|
|
5
|
+
import { Children as c, createContext as l, forwardRef as u, isValidElement as d, useContext as f, useMemo as p, useRef as m } from "react";
|
|
6
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/morph.tsx
|
|
8
|
+
var g = l(null), _ = 0;
|
|
9
|
+
function v({ id: e, spring: n = "smooth", transition: a, children: o }) {
|
|
10
|
+
let c = !!s(), l = m(null);
|
|
11
|
+
l.current ??= `bl-morph-${++_}`;
|
|
12
|
+
let u = c ? { duration: 0 } : a ?? t[n], d = p(() => ({
|
|
13
|
+
transition: u,
|
|
14
|
+
reduced: c
|
|
15
|
+
}), [u, c]);
|
|
16
|
+
return /* @__PURE__ */ h(g.Provider, {
|
|
17
|
+
value: d,
|
|
18
|
+
children: /* @__PURE__ */ h(r, {
|
|
19
|
+
id: e ?? l.current,
|
|
20
|
+
children: /* @__PURE__ */ h(i, {
|
|
21
|
+
transition: u,
|
|
22
|
+
children: o
|
|
23
|
+
})
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
var y = u(function({ id: n, radius: r, as: i = "div", dragToDismiss: c, onDismiss: l, dismissDistance: u = 120, layout: d = !0, fade: p = !1, className: m, style: _, children: v, ...y }, b) {
|
|
28
|
+
let x = f(g), S = s(), C = x?.reduced ?? !!S, w = x?.transition ?? (C ? { duration: 0 } : t.smooth), T = a[i], E = c && !C, D = o(), O = (e, t) => {
|
|
29
|
+
(t.offset.y > u || t.velocity.y > 650) && l?.();
|
|
30
|
+
}, k = y.onPointerDown, A = (e) => {
|
|
31
|
+
k?.(e);
|
|
32
|
+
let t = e.target;
|
|
33
|
+
e.defaultPrevented || t?.closest("[data-no-drag],input,textarea,select,[role=slider]") || D.start(e);
|
|
34
|
+
};
|
|
35
|
+
return /* @__PURE__ */ h(T, {
|
|
36
|
+
ref: b,
|
|
37
|
+
"data-slot": "morph",
|
|
38
|
+
"data-morph-id": n,
|
|
39
|
+
layoutId: n,
|
|
40
|
+
layout: d,
|
|
41
|
+
transition: {
|
|
42
|
+
...w,
|
|
43
|
+
opacity: C ? { duration: .12 } : { duration: .18 }
|
|
44
|
+
},
|
|
45
|
+
...p ? {
|
|
46
|
+
initial: { opacity: 0 },
|
|
47
|
+
animate: { opacity: 1 },
|
|
48
|
+
exit: { opacity: 0 }
|
|
49
|
+
} : null,
|
|
50
|
+
className: e(E && "touch-pan-x", m),
|
|
51
|
+
style: {
|
|
52
|
+
...r == null ? null : { borderRadius: r },
|
|
53
|
+
..._
|
|
54
|
+
},
|
|
55
|
+
...E ? {
|
|
56
|
+
drag: "y",
|
|
57
|
+
dragDirectionLock: !0,
|
|
58
|
+
dragConstraints: {
|
|
59
|
+
top: 0,
|
|
60
|
+
bottom: 0
|
|
61
|
+
},
|
|
62
|
+
dragElastic: {
|
|
63
|
+
top: .08,
|
|
64
|
+
bottom: .9
|
|
65
|
+
},
|
|
66
|
+
dragSnapToOrigin: !0,
|
|
67
|
+
dragListener: !1,
|
|
68
|
+
dragControls: D,
|
|
69
|
+
onDragEnd: O
|
|
70
|
+
} : null,
|
|
71
|
+
...y,
|
|
72
|
+
...E ? { onPointerDown: A } : null,
|
|
73
|
+
children: v
|
|
74
|
+
});
|
|
75
|
+
}), b = /* @__PURE__ */ new Set([Symbol.for("react.forward_ref"), Symbol.for("react.memo")]), x = (e) => d(e) && (typeof e.type == "string" || e.type === y || b.has(e.type.$$typeof));
|
|
76
|
+
function S({ children: e, mode: t = "auto" }) {
|
|
77
|
+
let r = t === "auto" ? c.toArray(e).every(x) ? "popLayout" : "sync" : t;
|
|
78
|
+
return /* @__PURE__ */ h(n, {
|
|
79
|
+
initial: !1,
|
|
80
|
+
mode: r,
|
|
81
|
+
children: e
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function C() {
|
|
85
|
+
let e = f(g), n = s();
|
|
86
|
+
return e?.transition ?? (n ? { duration: 0 } : t.smooth);
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
export { y as Morph, v as MorphGroup, S as MorphPresence, C as useMorphTransition };
|
|
@@ -49,6 +49,20 @@ export interface ScreenWrapProps {
|
|
|
49
49
|
/** Shown on the root screen only (depth 0). */
|
|
50
50
|
rootBack?: NavigationStackRootBack | null;
|
|
51
51
|
}
|
|
52
|
+
/** How NavigationStack pushes and pops, shared with anything that should feel like one (SideDrawer's compact push):
|
|
53
|
+
* where the leaving/entering screen waits, where the one underneath parallaxes to and how far it dims, and the
|
|
54
|
+
* edge swipe's zone, commit distance (fraction of the width) and flick velocity (px/ms). The motion itself is the
|
|
55
|
+
* `smooth` spring (the `tray` spring when a swipe is released). */
|
|
56
|
+
export declare const navigationPush: {
|
|
57
|
+
readonly off: "103%";
|
|
58
|
+
readonly under: "-28%";
|
|
59
|
+
readonly underPct: -28;
|
|
60
|
+
readonly dim: 0.12;
|
|
61
|
+
readonly edge: 36;
|
|
62
|
+
readonly commit: 0.32;
|
|
63
|
+
readonly flick: 0.55;
|
|
64
|
+
readonly settleMs: 580;
|
|
65
|
+
};
|
|
52
66
|
export declare function ScreenWrap({ sc, depth, top, ghost, entering, nav, backTitle: prevTitle, reg, defIns, z, rootBack: rootBackProp }: ScreenWrapProps): import("react/jsx-runtime").JSX.Element;
|
|
53
67
|
export interface NavigationStackProps {
|
|
54
68
|
screens: Screen[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-stack.d.ts","sourceRoot":"","sources":["../../src/components/navigation-stack.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"navigation-stack.d.ts","sourceRoot":"","sources":["../../src/components/navigation-stack.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,aAAa,EAAE,KAAK,SAAS,EACnC,MAAM,OAAO,CAAC;AAUf,qDAAqD;AACrD,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9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