@brett_lamy/ui 2.0.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 +4 -4
- 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 +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.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 +24 -47
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +91 -20350
- package/dist/lib/container.d.ts.map +1 -1
- package/dist/lib/container.js +49 -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/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 +4 -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,491 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { springs as t } from "../lib/motion.js";
|
|
4
|
+
import { IC as n, Icon as r } from "../lib/icon.js";
|
|
5
|
+
import { BLStickyCtx as i, chromeOffset as a, useChromeHidden as o } from "../lib/theme.js";
|
|
6
|
+
import { RowLabelContext as s } from "../lib/row-label.js";
|
|
7
|
+
import { AnimatePresence as c, MotionConfig as l, Reorder as u, animate as d, motion as f, useDragControls as p, useMotionValue as m, useReducedMotion as h, useTransform as ee } from "framer-motion";
|
|
8
|
+
import { Children as g, createContext as te, isValidElement as ne, use as _, useEffect as v, useId as re, useLayoutEffect as y, useRef as b, useState as x } from "react";
|
|
9
|
+
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
10
|
+
import { cva as ie } from "class-variance-authority";
|
|
11
|
+
//#region src/components/list.tsx
|
|
12
|
+
function T({ children: t, inset: n, header: r, stickyTop: s, className: c, style: l }) {
|
|
13
|
+
let u = b(null), [d, f] = x(0), p = _(i), m = o();
|
|
14
|
+
y(() => {
|
|
15
|
+
let e = u.current;
|
|
16
|
+
if (!e) {
|
|
17
|
+
f(0);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
let t = () => f(e.offsetHeight);
|
|
21
|
+
if (t(), typeof ResizeObserver < "u") {
|
|
22
|
+
let n = new ResizeObserver(t);
|
|
23
|
+
return n.observe(e), () => n.disconnect();
|
|
24
|
+
}
|
|
25
|
+
}, [r]);
|
|
26
|
+
let h = s ?? p + (r ? d : 0);
|
|
27
|
+
return /* @__PURE__ */ C(i.Provider, {
|
|
28
|
+
value: h,
|
|
29
|
+
children: /* @__PURE__ */ w("div", {
|
|
30
|
+
"data-slot": "list",
|
|
31
|
+
className: e(n ? "px-4 py-0" : "p-0", c),
|
|
32
|
+
style: l,
|
|
33
|
+
children: [r ? /* @__PURE__ */ C("div", {
|
|
34
|
+
ref: u,
|
|
35
|
+
className: "sticky top-(--list-header-top) z-24 bg-sticky backdrop-blur-[10px] transition-[top] duration-spring-smooth ease-spring-smooth",
|
|
36
|
+
style: { "--list-header-top": a(p, m) + "px" },
|
|
37
|
+
children: r
|
|
38
|
+
}) : null, t]
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
var ae = te(null);
|
|
43
|
+
function E({ title: t, footer: n, children: r, sticky: s, innerRef: c, stickyTop: l, animate: u, onReorder: d, className: f, style: p }) {
|
|
44
|
+
let m = _(i), h = a(l ?? m, o()), ee = !!(u || d);
|
|
45
|
+
return /* @__PURE__ */ w("div", {
|
|
46
|
+
ref: c,
|
|
47
|
+
"data-slot": "list-section",
|
|
48
|
+
className: e(f),
|
|
49
|
+
style: p,
|
|
50
|
+
children: [
|
|
51
|
+
t == null ? null : s ? /* @__PURE__ */ C("div", {
|
|
52
|
+
className: "sticky top-(--list-section-top) z-20 bg-sticky px-4 py-[3px] text-[13.5px] font-semibold text-foreground backdrop-blur-[10px] transition-[top] duration-spring-smooth ease-spring-smooth",
|
|
53
|
+
style: { "--list-section-top": h + "px" },
|
|
54
|
+
children: t
|
|
55
|
+
}) : /* @__PURE__ */ C("div", {
|
|
56
|
+
className: "px-4 pt-1 pb-[7px] text-[12.5px] font-medium tracking-[.4px] text-muted-foreground uppercase",
|
|
57
|
+
children: t
|
|
58
|
+
}),
|
|
59
|
+
/* @__PURE__ */ C("div", {
|
|
60
|
+
className: e("overflow-hidden", s ? "rounded-none" : "rounded-panel"),
|
|
61
|
+
children: ee ? /* @__PURE__ */ C(D, {
|
|
62
|
+
onReorder: d,
|
|
63
|
+
children: r
|
|
64
|
+
}) : r
|
|
65
|
+
}),
|
|
66
|
+
n ? /* @__PURE__ */ C("div", {
|
|
67
|
+
className: "px-4 pt-[7px] pb-0 text-[12.8px] leading-[1.45] text-muted-foreground",
|
|
68
|
+
children: n
|
|
69
|
+
}) : null,
|
|
70
|
+
/* @__PURE__ */ C("div", { className: s ? "h-0" : "h-[22px]" })
|
|
71
|
+
]
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function D({ children: e, onReorder: t }) {
|
|
75
|
+
let n = g.toArray(e).filter(ne), r = n.map((e) => String(e.key)), [i, a] = x(null), o = i && i.length === r.length && i.every((e) => r.includes(e)) ? i : r, s = new Map(n.map((e) => [String(e.key), e])), d = h(), f = (e) => {
|
|
76
|
+
let n = r.indexOf(e), i = o.indexOf(e);
|
|
77
|
+
a(null), n >= 0 && i >= 0 && n !== i && t?.(n, i);
|
|
78
|
+
};
|
|
79
|
+
return /* @__PURE__ */ C(l, {
|
|
80
|
+
reducedMotion: "user",
|
|
81
|
+
children: /* @__PURE__ */ C(u.Group, {
|
|
82
|
+
as: "div",
|
|
83
|
+
axis: "y",
|
|
84
|
+
values: o,
|
|
85
|
+
onReorder: (e) => {
|
|
86
|
+
e.join() !== o.join() && a(e);
|
|
87
|
+
},
|
|
88
|
+
children: /* @__PURE__ */ C(c, {
|
|
89
|
+
initial: !1,
|
|
90
|
+
children: o.map((e, n) => /* @__PURE__ */ C(O, {
|
|
91
|
+
value: e,
|
|
92
|
+
index: n,
|
|
93
|
+
count: o.length,
|
|
94
|
+
reduced: !!d,
|
|
95
|
+
reorder: t ? {
|
|
96
|
+
drop: f,
|
|
97
|
+
move: (e) => {
|
|
98
|
+
let i = Math.max(0, Math.min(r.length - 1, e));
|
|
99
|
+
i !== n && t(n, i);
|
|
100
|
+
}
|
|
101
|
+
} : void 0,
|
|
102
|
+
children: s.get(e)
|
|
103
|
+
}, e))
|
|
104
|
+
})
|
|
105
|
+
})
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
function O({ value: n, index: r, count: i, reduced: a, reorder: o, children: s }) {
|
|
109
|
+
let c = p(), [l, d] = x(!1), f = {
|
|
110
|
+
index: r,
|
|
111
|
+
count: i,
|
|
112
|
+
dragging: l,
|
|
113
|
+
startDrag: o ? (e) => {
|
|
114
|
+
d(!0), c.start(e);
|
|
115
|
+
} : void 0,
|
|
116
|
+
move: o?.move
|
|
117
|
+
};
|
|
118
|
+
return /* @__PURE__ */ C(u.Item, {
|
|
119
|
+
as: "div",
|
|
120
|
+
value: n,
|
|
121
|
+
dragListener: !1,
|
|
122
|
+
dragControls: c,
|
|
123
|
+
className: e("relative shadow-[0_8px_24px_black] transition-shadow duration-spring-smooth ease-spring-smooth motion-reduce:transition-none", l ? "overflow-visible shadow-black/18" : "overflow-hidden shadow-transparent"),
|
|
124
|
+
initial: !a && {
|
|
125
|
+
height: 0,
|
|
126
|
+
opacity: 0
|
|
127
|
+
},
|
|
128
|
+
animate: {
|
|
129
|
+
height: "auto",
|
|
130
|
+
opacity: 1,
|
|
131
|
+
scale: l ? 1.02 : 1,
|
|
132
|
+
zIndex: l ? 5 : 0
|
|
133
|
+
},
|
|
134
|
+
exit: a ? {
|
|
135
|
+
opacity: 0,
|
|
136
|
+
transition: { duration: .1 }
|
|
137
|
+
} : {
|
|
138
|
+
height: 0,
|
|
139
|
+
opacity: 0
|
|
140
|
+
},
|
|
141
|
+
transition: a ? { duration: 0 } : {
|
|
142
|
+
...t.smooth,
|
|
143
|
+
opacity: { duration: .18 }
|
|
144
|
+
},
|
|
145
|
+
onDragEnd: () => {
|
|
146
|
+
d(!1), o?.drop(n);
|
|
147
|
+
},
|
|
148
|
+
children: /* @__PURE__ */ C(ae.Provider, {
|
|
149
|
+
value: f,
|
|
150
|
+
children: s
|
|
151
|
+
})
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
var k = /* @__PURE__ */ new Set(), A = ie([
|
|
155
|
+
"relative box-border flex min-h-row w-full touch-pan-y items-center gap-3 py-0 pl-4 text-left text-body leading-[normal] tracking-[normal] outline-none",
|
|
156
|
+
"focus-visible:[box-shadow:inset_0_0_0_2px_var(--primary)]",
|
|
157
|
+
"pr-[max(16px,calc(var(--bl-index-bar-inset,0px)+6px))]"
|
|
158
|
+
], {
|
|
159
|
+
variants: {
|
|
160
|
+
align: {
|
|
161
|
+
center: "",
|
|
162
|
+
top: "[&>[data-slot=list-row-leading]]:self-start [&>[data-slot=list-row-leading]]:pt-[7px]"
|
|
163
|
+
},
|
|
164
|
+
selected: {
|
|
165
|
+
true: "bg-accent",
|
|
166
|
+
false: "bg-card"
|
|
167
|
+
},
|
|
168
|
+
destructive: {
|
|
169
|
+
true: "text-destructive",
|
|
170
|
+
false: "text-foreground"
|
|
171
|
+
},
|
|
172
|
+
interactive: {
|
|
173
|
+
true: "cursor-pointer",
|
|
174
|
+
false: "cursor-default"
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
defaultVariants: {
|
|
178
|
+
align: "center",
|
|
179
|
+
selected: !1,
|
|
180
|
+
destructive: !1,
|
|
181
|
+
interactive: !1
|
|
182
|
+
}
|
|
183
|
+
}), oe = .55, j = (e) => e.icon ? 74 : 88, se = "button,input,select,textarea,a[href],label,[role=switch],[role=slider],[role=checkbox],[data-slot=slider]";
|
|
184
|
+
function ce({ icon: e }) {
|
|
185
|
+
return typeof e == "string" ? n[e] ? /* @__PURE__ */ C(r, {
|
|
186
|
+
name: e,
|
|
187
|
+
size: 20,
|
|
188
|
+
sw: 2.2
|
|
189
|
+
}) : null : /* @__PURE__ */ C(S, { children: e });
|
|
190
|
+
}
|
|
191
|
+
function M(n) {
|
|
192
|
+
let i = _(ae), a = !!h(), o = re(), c = o + "-t", l = o + "-s", u = o + "-h", p = m(0), [g, te] = x(null), [ne, y] = x(!1), [S, ie] = x(!1), [T, E] = x(null), D = b(null), O = b(null), M = b(null), N = b(null), P = b(null), F = b(null), I = b(() => void 0), L = b(!1), R = b(!1), z = [...n.onDelete ? [{
|
|
193
|
+
label: "Delete",
|
|
194
|
+
destructive: !0,
|
|
195
|
+
onAction: n.onDelete
|
|
196
|
+
}] : [], ...n.trailingActions || []], B = n.leadingActions || [], V = (e) => e === "leading" ? B : z, H = (e) => V(e).reduce((e, t) => e + j(t), 0), U = (e) => n.fullSwipe === void 0 || n.fullSwipe === !0 || n.fullSwipe === e, W = !n.edit && (B.length > 0 || z.length > 0);
|
|
197
|
+
v(() => p.on("change", (e) => {
|
|
198
|
+
let t = e > .5 ? "leading" : e < -.5 ? "trailing" : null;
|
|
199
|
+
te((e) => e === t ? e : t);
|
|
200
|
+
}), [p]);
|
|
201
|
+
let G = (e, n = 0) => (F.current?.stop(), F.current = d(p, e, a ? { duration: 0 } : {
|
|
202
|
+
...t.snappy,
|
|
203
|
+
velocity: n
|
|
204
|
+
}), F.current), K = () => {
|
|
205
|
+
y(!1), G(0);
|
|
206
|
+
};
|
|
207
|
+
v(() => {
|
|
208
|
+
I.current = () => {
|
|
209
|
+
p.get() !== 0 && K();
|
|
210
|
+
};
|
|
211
|
+
let e = () => I.current();
|
|
212
|
+
return k.add(e), () => {
|
|
213
|
+
k.delete(e);
|
|
214
|
+
};
|
|
215
|
+
}), v(() => {
|
|
216
|
+
n.onPress || (O.current = D.current);
|
|
217
|
+
});
|
|
218
|
+
let le = () => k.forEach((e) => {
|
|
219
|
+
e !== I.current && e();
|
|
220
|
+
}), q = (e, t) => {
|
|
221
|
+
let n = D.current ? D.current.offsetWidth : 320;
|
|
222
|
+
t.destructive ? (y(!0), G(e === "trailing" ? -n : n), E(N.current ? N.current.offsetHeight : null), requestAnimationFrame(() => requestAnimationFrame(() => ie(!0))), setTimeout(() => t.onAction(), a ? 0 : 460)) : (t.onAction(), y(!1), G(0), O.current?.focus({ preventScroll: !0 }));
|
|
223
|
+
}, ue = (e) => {
|
|
224
|
+
!W || e.button || n.isEdge && n.isEdge(e.clientX) || e.target.closest("[data-row-control],[data-row-action],[data-row-grip]") || (F.current?.stop(), P.current = {
|
|
225
|
+
x0: e.clientX,
|
|
226
|
+
y0: e.clientY,
|
|
227
|
+
base: p.get(),
|
|
228
|
+
on: !1,
|
|
229
|
+
fired: !1
|
|
230
|
+
});
|
|
231
|
+
}, de = (e) => {
|
|
232
|
+
let t = P.current;
|
|
233
|
+
if (!t || !D.current) return;
|
|
234
|
+
let n = e.clientX - t.x0, r = e.clientY - t.y0;
|
|
235
|
+
if (!t.on) {
|
|
236
|
+
if (Math.abs(n) > 10 && Math.abs(n) > Math.abs(r) * 1.4) {
|
|
237
|
+
t.on = !0, le(), D.current.dataset.swiping = "";
|
|
238
|
+
try {
|
|
239
|
+
D.current.setPointerCapture(e.pointerId);
|
|
240
|
+
} catch {}
|
|
241
|
+
} else if (Math.abs(r) > 12) {
|
|
242
|
+
P.current = null;
|
|
243
|
+
return;
|
|
244
|
+
} else return;
|
|
245
|
+
}
|
|
246
|
+
let i = D.current.offsetWidth, a = t.base + n, o = a > 0 ? "leading" : a < 0 ? "trailing" : null;
|
|
247
|
+
if (o && !V(o).length && (a = 0), o && V(o).length) {
|
|
248
|
+
let e = H(o), n = Math.abs(a), r = Math.sign(a), s = U(o) ? Math.min(n, i * .92) : n <= e ? n : e + (n - e) * .25;
|
|
249
|
+
a = r * s;
|
|
250
|
+
let c = U(o) && s > i * oe;
|
|
251
|
+
t.fired = c, y(c);
|
|
252
|
+
}
|
|
253
|
+
p.set(a);
|
|
254
|
+
}, fe = () => {
|
|
255
|
+
let e = P.current;
|
|
256
|
+
if (P.current = null, !e || !e.on || !D.current) return;
|
|
257
|
+
delete D.current.dataset.swiping, L.current = !0, setTimeout(() => {
|
|
258
|
+
L.current = !1;
|
|
259
|
+
}, 0);
|
|
260
|
+
let t = D.current.offsetWidth, n = p.get(), r = p.getVelocity(), i = n > 0 ? "leading" : n < 0 ? "trailing" : null;
|
|
261
|
+
if (!i || !V(i).length) {
|
|
262
|
+
K();
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
let a = n + r * .12, o = i === "leading" ? 1 : -1, s = a * o;
|
|
266
|
+
if (U(i) && e.fired && Math.abs(n) > t * oe) {
|
|
267
|
+
q(i, V(i)[0]);
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
y(!1), s > H(i) / 2 ? G(o * H(i), r) : G(0, r);
|
|
271
|
+
}, pe = (e) => V(e).length ? (le(), y(!1), G((e === "leading" ? 1 : -1) * H(e)), R.current = !0, !0) : !1, me = (e) => {
|
|
272
|
+
if (W) {
|
|
273
|
+
if (e.key === "ArrowRight" && pe("trailing")) e.preventDefault();
|
|
274
|
+
else if (e.key === "ArrowLeft" && pe("leading")) e.preventDefault();
|
|
275
|
+
else if (e.key === "Escape" && p.get() !== 0) K(), e.stopPropagation();
|
|
276
|
+
else if ((e.key === "Delete" || e.key === "Backspace") && e.target === e.currentTarget) {
|
|
277
|
+
let t = z.find((e) => e.destructive);
|
|
278
|
+
t && (e.preventDefault(), q("trailing", t));
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}, he = (e) => {
|
|
282
|
+
e.key === "Escape" && (e.stopPropagation(), K(), O.current?.focus({ preventScroll: !0 }));
|
|
283
|
+
}, ge = (e) => {
|
|
284
|
+
if (L.current) {
|
|
285
|
+
e.stopPropagation(), e.preventDefault();
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
p.get() !== 0 && !e.target.closest("[data-row-action]") && (e.stopPropagation(), e.preventDefault(), K());
|
|
289
|
+
}, _e = (e) => {
|
|
290
|
+
n.onPress || n.labelToggles === !1 || e.target.closest(se) || D.current?.querySelector("[data-row-control] input[type=checkbox], [data-row-control] [role=switch]")?.click();
|
|
291
|
+
};
|
|
292
|
+
v(() => {
|
|
293
|
+
!g || !R.current || (R.current = !1, M.current?.querySelector("button")?.focus({ preventScroll: !0 }));
|
|
294
|
+
}, [g]);
|
|
295
|
+
let ve = ee(p, (e) => Math.abs(e)), ye = n.edit !== void 0 && n.edit !== null, J = n.accessory != null && n.accessory !== "chevron" && n.accessory !== "check" ? n.accessory : null, Y = !!n.onPress, X = n.children != null && n.children !== !1, be = !X && n.title != null, xe = [...B, ...z], Z = Y || W && xe.length > 0, Q = W ? `Actions: ${xe.map((e) => e.label).join(", ")}. ${[z.length && "Right arrow", B.length && "left arrow"].filter(Boolean).join(" or ")} to reveal.` : null, $ = g ? V(g).map((e, t) => ({
|
|
296
|
+
a: e,
|
|
297
|
+
i: t
|
|
298
|
+
})) : [];
|
|
299
|
+
return g === "trailing" && $.reverse(), /* @__PURE__ */ w("div", {
|
|
300
|
+
"data-slot": "list-row",
|
|
301
|
+
ref: N,
|
|
302
|
+
className: e("relative overflow-hidden transition-[height,opacity] duration-spring-tray ease-spring-tray motion-reduce:transition-none", S ? "h-0 opacity-0" : e("opacity-100", T != null && "h-(--list-row-h)"), n.className),
|
|
303
|
+
style: T == null ? n.style : {
|
|
304
|
+
"--list-row-h": T + "px",
|
|
305
|
+
...n.style
|
|
306
|
+
},
|
|
307
|
+
children: [g && $.length ? /* @__PURE__ */ C(f.div, {
|
|
308
|
+
ref: M,
|
|
309
|
+
"data-slot": "list-row-actions",
|
|
310
|
+
onKeyDown: he,
|
|
311
|
+
className: e("absolute inset-y-0 flex overflow-hidden", g === "leading" ? "left-0" : "right-0"),
|
|
312
|
+
style: { width: ve },
|
|
313
|
+
children: $.map(({ a: t, i: n }) => /* @__PURE__ */ C("button", {
|
|
314
|
+
type: "button",
|
|
315
|
+
"data-row-action": !0,
|
|
316
|
+
tabIndex: 0,
|
|
317
|
+
onClick: (e) => {
|
|
318
|
+
e.stopPropagation(), q(g, t);
|
|
319
|
+
},
|
|
320
|
+
"aria-label": t.label,
|
|
321
|
+
className: e("bl-btn relative flex min-w-0 shrink basis-0 cursor-pointer overflow-hidden border-0 p-0 [font-family:inherit] text-white outline-none focus-visible:[box-shadow:inset_0_0_0_2px_white]", "grow-(--action-grow) bg-(--action-bg) transition-[flex-grow] duration-spring-snappy ease-spring-snappy motion-reduce:transition-none", g === "leading" ? "justify-end" : "justify-start"),
|
|
322
|
+
style: {
|
|
323
|
+
"--action-bg": t.tint || (t.destructive ? "var(--destructive)" : "var(--primary)"),
|
|
324
|
+
"--action-grow": ne ? +(n === 0) : j(t),
|
|
325
|
+
"--action-w": j(t) + "px"
|
|
326
|
+
},
|
|
327
|
+
children: /* @__PURE__ */ w("span", {
|
|
328
|
+
className: "flex h-full w-(--action-w) shrink-0 flex-col items-center justify-center gap-[3px] px-2",
|
|
329
|
+
children: [t.icon ? /* @__PURE__ */ C(ce, { icon: t.icon }) : null, /* @__PURE__ */ C("span", {
|
|
330
|
+
className: e("truncate font-semibold", t.icon ? "text-caption" : "text-subhead"),
|
|
331
|
+
children: t.label
|
|
332
|
+
})]
|
|
333
|
+
})
|
|
334
|
+
}, t.label + n))
|
|
335
|
+
}) : null, /* @__PURE__ */ w(f.div, {
|
|
336
|
+
ref: D,
|
|
337
|
+
"data-slot": "list-row-content",
|
|
338
|
+
"data-tkrow": !Y && Z ? "" : void 0,
|
|
339
|
+
tabIndex: !Y && Z ? 0 : void 0,
|
|
340
|
+
role: !Y && Z ? "group" : void 0,
|
|
341
|
+
"aria-labelledby": !Y && Z ? c : void 0,
|
|
342
|
+
"aria-describedby": !Y && Q ? u : void 0,
|
|
343
|
+
"aria-keyshortcuts": !Y && Q ? "ArrowRight ArrowLeft Delete" : void 0,
|
|
344
|
+
onKeyDown: Y ? void 0 : me,
|
|
345
|
+
onPointerDown: ue,
|
|
346
|
+
onPointerMove: de,
|
|
347
|
+
onPointerUp: fe,
|
|
348
|
+
onPointerCancel: fe,
|
|
349
|
+
onClickCapture: ge,
|
|
350
|
+
onClick: _e,
|
|
351
|
+
"aria-current": !Y && Z && n.selected ? "true" : void 0,
|
|
352
|
+
className: e(A({
|
|
353
|
+
align: n.align,
|
|
354
|
+
selected: !!n.selected,
|
|
355
|
+
destructive: !!n.destructive,
|
|
356
|
+
interactive: Y || W || !!J && n.labelToggles !== !1
|
|
357
|
+
}), n.contentClassName),
|
|
358
|
+
style: { x: p },
|
|
359
|
+
children: [
|
|
360
|
+
Y ? /* @__PURE__ */ C("button", {
|
|
361
|
+
ref: (e) => {
|
|
362
|
+
O.current = e;
|
|
363
|
+
},
|
|
364
|
+
"data-tkrow": !0,
|
|
365
|
+
type: "button",
|
|
366
|
+
role: n.rowRole,
|
|
367
|
+
"aria-selected": n.rowRole ? n.selected || n.checked || !1 : void 0,
|
|
368
|
+
"aria-current": !n.rowRole && n.selected ? "true" : void 0,
|
|
369
|
+
"aria-labelledby": n.subtitle ? `${c} ${l}` : c,
|
|
370
|
+
"aria-describedby": Q ? u : void 0,
|
|
371
|
+
"aria-keyshortcuts": Q ? "ArrowRight ArrowLeft Delete" : void 0,
|
|
372
|
+
onKeyDown: me,
|
|
373
|
+
onClick: () => n.onPress && n.onPress(),
|
|
374
|
+
className: "bl-btn bl-hl absolute inset-0 cursor-pointer border-0 bg-transparent p-0 outline-none focus-visible:[box-shadow:inset_0_0_0_2px_var(--primary)]"
|
|
375
|
+
}) : null,
|
|
376
|
+
ye ? /* @__PURE__ */ C("span", {
|
|
377
|
+
"aria-hidden": "true",
|
|
378
|
+
className: e("pointer-events-none relative flex shrink-0 items-center overflow-hidden transition-[width,opacity,margin-right] duration-spring-snappy ease-spring-snappy motion-reduce:transition-none", n.edit ? "mr-0 w-[30px] opacity-100" : "-mr-3 w-0 opacity-0"),
|
|
379
|
+
children: /* @__PURE__ */ C("span", {
|
|
380
|
+
className: e("box-border grid size-[22px] shrink-0 place-items-center rounded-[50%] transition-[background-color,scale] duration-spring-snappy ease-spring-bouncy", n.checked ? "border-none bg-primary" : "[border:1.6px_solid_var(--tertiary-foreground,color-mix(in_oklab,var(--muted-foreground)_60%,transparent))] bg-transparent"),
|
|
381
|
+
children: n.checked ? /* @__PURE__ */ C(r, {
|
|
382
|
+
name: "check",
|
|
383
|
+
size: 13,
|
|
384
|
+
sw: 3,
|
|
385
|
+
className: "text-primary-foreground transition-[scale,opacity] duration-spring-snappy ease-spring-bouncy starting:scale-50 starting:opacity-0"
|
|
386
|
+
}) : null
|
|
387
|
+
})
|
|
388
|
+
}) : null,
|
|
389
|
+
n.leading ? /* @__PURE__ */ C("span", {
|
|
390
|
+
"data-slot": "list-row-leading",
|
|
391
|
+
className: "pointer-events-none relative flex shrink-0 items-center",
|
|
392
|
+
children: n.leading
|
|
393
|
+
}) : null,
|
|
394
|
+
/* @__PURE__ */ w("div", {
|
|
395
|
+
"data-slot": "list-row-body",
|
|
396
|
+
className: e("pointer-events-none relative flex min-h-row min-w-0 flex-1 items-center gap-2.5 px-0", X ? "py-3" : "py-[7px]", n.divider !== !1 && "[box-shadow:inset_0_-1px_0_var(--border)]", n.center ? "justify-center" : "justify-start"),
|
|
397
|
+
children: [/* @__PURE__ */ w(s, {
|
|
398
|
+
value: be ? c : void 0,
|
|
399
|
+
children: [
|
|
400
|
+
X ? /* @__PURE__ */ C("div", {
|
|
401
|
+
"data-row-control": "",
|
|
402
|
+
"data-slot": "list-row-control",
|
|
403
|
+
className: "pointer-events-auto min-w-0 flex-1",
|
|
404
|
+
children: n.children
|
|
405
|
+
}) : /* @__PURE__ */ w("div", {
|
|
406
|
+
className: e("min-w-0", n.center ? "flex-none" : "flex-1"),
|
|
407
|
+
children: [/* @__PURE__ */ C("div", {
|
|
408
|
+
id: c,
|
|
409
|
+
className: "truncate leading-[1.3]",
|
|
410
|
+
children: n.title
|
|
411
|
+
}), n.subtitle ? /* @__PURE__ */ C("div", {
|
|
412
|
+
id: l,
|
|
413
|
+
className: "mt-px truncate text-footnote text-muted-foreground",
|
|
414
|
+
children: n.subtitle
|
|
415
|
+
}) : null]
|
|
416
|
+
}),
|
|
417
|
+
n.trailing ? /* @__PURE__ */ C("span", {
|
|
418
|
+
"data-row-control": "",
|
|
419
|
+
className: "flex shrink-0 items-center",
|
|
420
|
+
children: n.trailing
|
|
421
|
+
}) : null,
|
|
422
|
+
n.accessory === "chevron" ? /* @__PURE__ */ C(r, {
|
|
423
|
+
name: "chev",
|
|
424
|
+
size: 15,
|
|
425
|
+
sw: 2.6,
|
|
426
|
+
className: "text-tertiary-foreground"
|
|
427
|
+
}) : n.accessory === "check" ? /* @__PURE__ */ C("span", {
|
|
428
|
+
className: "w-[22px] shrink-0",
|
|
429
|
+
children: n.checked ? /* @__PURE__ */ C(r, {
|
|
430
|
+
name: "check",
|
|
431
|
+
size: 20,
|
|
432
|
+
sw: 2.4,
|
|
433
|
+
className: "text-primary"
|
|
434
|
+
}) : null
|
|
435
|
+
}) : J ? /* @__PURE__ */ C("span", {
|
|
436
|
+
"data-row-control": "",
|
|
437
|
+
className: "pointer-events-auto flex min-w-0 shrink-0 items-center",
|
|
438
|
+
children: J
|
|
439
|
+
}) : null
|
|
440
|
+
]
|
|
441
|
+
}), i?.startDrag ? /* @__PURE__ */ w("button", {
|
|
442
|
+
type: "button",
|
|
443
|
+
"data-row-grip": !0,
|
|
444
|
+
"aria-label": `Reorder ${typeof n.title == "string" ? n.title : "row"}`,
|
|
445
|
+
"aria-describedby": o + "-g",
|
|
446
|
+
onPointerDown: (e) => {
|
|
447
|
+
e.preventDefault(), e.stopPropagation(), i.startDrag(e);
|
|
448
|
+
},
|
|
449
|
+
onKeyDown: (e) => {
|
|
450
|
+
(e.key === "ArrowUp" || e.key === "ArrowDown") && (e.preventDefault(), e.stopPropagation(), i.move?.(i.index + (e.key === "ArrowUp" ? -1 : 1)));
|
|
451
|
+
},
|
|
452
|
+
className: e("bl-btn pointer-events-auto -mr-2 grid h-[44px] w-[40px] shrink-0 cursor-grab touch-none place-items-center rounded-lg border-0 bg-transparent p-0 text-tertiary-foreground outline-none focus-visible:[box-shadow:inset_0_0_0_2px_var(--primary)]", i.dragging && "cursor-grabbing"),
|
|
453
|
+
children: [/* @__PURE__ */ C("svg", {
|
|
454
|
+
width: "20",
|
|
455
|
+
height: "14",
|
|
456
|
+
viewBox: "0 0 20 14",
|
|
457
|
+
"aria-hidden": "true",
|
|
458
|
+
children: /* @__PURE__ */ C("path", {
|
|
459
|
+
d: "M2 2h16M2 7h16M2 12h16",
|
|
460
|
+
stroke: "currentColor",
|
|
461
|
+
strokeWidth: "1.8",
|
|
462
|
+
strokeLinecap: "round"
|
|
463
|
+
})
|
|
464
|
+
}), /* @__PURE__ */ w("span", {
|
|
465
|
+
id: o + "-g",
|
|
466
|
+
className: "sr-only",
|
|
467
|
+
children: [
|
|
468
|
+
"Drag, or press up and down arrows, to move. Position ",
|
|
469
|
+
i.index + 1,
|
|
470
|
+
" of ",
|
|
471
|
+
i.count,
|
|
472
|
+
"."
|
|
473
|
+
]
|
|
474
|
+
})]
|
|
475
|
+
}) : null]
|
|
476
|
+
}),
|
|
477
|
+
Q ? /* @__PURE__ */ C("span", {
|
|
478
|
+
id: u,
|
|
479
|
+
className: "sr-only",
|
|
480
|
+
children: Q
|
|
481
|
+
}) : null
|
|
482
|
+
]
|
|
483
|
+
})]
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
var N = Object.assign(T, {
|
|
487
|
+
Section: E,
|
|
488
|
+
Row: M
|
|
489
|
+
});
|
|
490
|
+
//#endregion
|
|
491
|
+
export { N as List, M as ListRow, E as ListSection, A as listRowVariants };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-editor.d.ts","sourceRoot":"","sources":["../../src/components/markdown-editor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"markdown-editor.d.ts","sourceRoot":"","sources":["../../src/components/markdown-editor.tsx"],"names":[],"mappings":"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"}
|