@kumix/ui 0.6.0 → 0.8.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 +71 -48
- package/dist/animated-sidebar-CPdrqoGi.js +310 -0
- package/dist/animated-sidebar-CPdrqoGi.js.map +1 -0
- package/dist/animated-toast-stack-Cbdphi9x.d.ts +62 -0
- package/dist/animated-toast-stack-Cbdphi9x.d.ts.map +1 -0
- package/dist/animated-toast-stack-YcjQ2Uaw.js +568 -0
- package/dist/animated-toast-stack-YcjQ2Uaw.js.map +1 -0
- package/dist/components/agents/agent-activity/activity-row.d.ts +1 -1
- package/dist/components/agents/agent-activity/activity-row.d.ts.map +1 -1
- package/dist/components/agents/agent-activity/activity-row.js +31 -26
- package/dist/components/agents/agent-activity/activity-row.js.map +1 -1
- package/dist/components/agents/{agent-activity/index.d.ts → agent-activity.d.ts} +2 -2
- package/dist/components/agents/agent-activity.d.ts.map +1 -0
- package/dist/components/agents/{agent-activity/index.js → agent-activity.js} +13 -27
- package/dist/components/agents/agent-activity.js.map +1 -0
- package/dist/components/agents/agent-code.d.ts.map +1 -1
- package/dist/components/agents/agent-code.js +42 -16
- package/dist/components/agents/agent-code.js.map +1 -1
- package/dist/components/agents/agent-disclosure.d.ts +7 -2
- package/dist/components/agents/agent-disclosure.d.ts.map +1 -1
- package/dist/components/agents/agent-disclosure.js +15 -3
- package/dist/components/agents/agent-disclosure.js.map +1 -1
- package/dist/components/agents/ai-sidebar/marquee-label.d.ts +6 -0
- package/dist/components/agents/ai-sidebar/marquee-label.d.ts.map +1 -0
- package/dist/components/agents/ai-sidebar/marquee-label.js +55 -0
- package/dist/components/agents/ai-sidebar/marquee-label.js.map +1 -0
- package/dist/components/agents/ai-sidebar/resource-menu-action.d.ts +8 -0
- package/dist/components/agents/ai-sidebar/resource-menu-action.d.ts.map +1 -0
- package/dist/components/agents/ai-sidebar/resource-menu-action.js +20 -0
- package/dist/components/agents/ai-sidebar/resource-menu-action.js.map +1 -0
- package/dist/components/agents/ai-sidebar/resource-row.d.ts +32 -0
- package/dist/components/agents/ai-sidebar/resource-row.d.ts.map +1 -0
- package/dist/components/agents/ai-sidebar/resource-row.js +2 -0
- package/dist/components/agents/ai-sidebar.d.ts +2 -74
- package/dist/components/agents/ai-sidebar.d.ts.map +1 -1
- package/dist/components/agents/ai-sidebar.js +16 -332
- package/dist/components/agents/ai-sidebar.js.map +1 -1
- package/dist/components/agents/{approval-card/index.d.ts → approval-card.d.ts} +31 -1
- package/dist/components/agents/approval-card.d.ts.map +1 -0
- package/dist/components/agents/{approval-card/index.js → approval-card.js} +160 -80
- package/dist/components/agents/approval-card.js.map +1 -0
- package/dist/components/agents/chat-app.d.ts +1 -1
- package/dist/components/agents/chat-app.d.ts.map +1 -1
- package/dist/components/agents/chat-app.js +9 -6
- package/dist/components/agents/chat-app.js.map +1 -1
- package/dist/components/agents/citations.d.ts +24 -1
- package/dist/components/agents/citations.d.ts.map +1 -1
- package/dist/components/agents/citations.js +54 -9
- package/dist/components/agents/citations.js.map +1 -1
- package/dist/components/agents/clip-resize-frame.d.ts +31 -0
- package/dist/components/agents/clip-resize-frame.d.ts.map +1 -0
- package/dist/components/agents/clip-resize-frame.js +103 -0
- package/dist/components/agents/clip-resize-frame.js.map +1 -0
- package/dist/components/agents/code-block.d.ts +11 -0
- package/dist/components/agents/code-block.d.ts.map +1 -1
- package/dist/components/agents/code-block.js +34 -26
- package/dist/components/agents/code-block.js.map +1 -1
- package/dist/components/agents/context-meter.d.ts +53 -0
- package/dist/components/agents/context-meter.d.ts.map +1 -0
- package/dist/components/agents/context-meter.js +443 -0
- package/dist/components/agents/context-meter.js.map +1 -0
- package/dist/components/agents/file-diff.d.ts +17 -0
- package/dist/components/agents/file-diff.d.ts.map +1 -1
- package/dist/components/agents/file-diff.js +114 -82
- package/dist/components/agents/file-diff.js.map +1 -1
- package/dist/components/agents/icon-swap.d.ts +14 -0
- package/dist/components/agents/icon-swap.d.ts.map +1 -0
- package/dist/components/agents/icon-swap.js +41 -0
- package/dist/components/agents/icon-swap.js.map +1 -0
- package/dist/components/agents/image-generation.d.ts +10 -0
- package/dist/components/agents/image-generation.d.ts.map +1 -1
- package/dist/components/agents/image-generation.js +10 -6
- package/dist/components/agents/image-generation.js.map +1 -1
- package/dist/components/agents/loading-states/agent-progress.d.ts +1 -0
- package/dist/components/agents/loading-states/agent-progress.d.ts.map +1 -1
- package/dist/components/agents/loading-states/agent-progress.js.map +1 -1
- package/dist/components/agents/loading-states/reasoning-text.d.ts +1 -0
- package/dist/components/agents/loading-states/reasoning-text.d.ts.map +1 -1
- package/dist/components/agents/loading-states/reasoning-text.js +30 -7
- package/dist/components/agents/loading-states/reasoning-text.js.map +1 -1
- package/dist/components/agents/loading-states/thinking-shimmer.d.ts +1 -0
- package/dist/components/agents/loading-states/thinking-shimmer.d.ts.map +1 -1
- package/dist/components/agents/loading-states/thinking-shimmer.js.map +1 -1
- package/dist/components/agents/message-bubble.d.ts +10 -0
- package/dist/components/agents/message-bubble.d.ts.map +1 -1
- package/dist/components/agents/message-bubble.js +59 -39
- package/dist/components/agents/message-bubble.js.map +1 -1
- package/dist/components/agents/message-scroller.d.ts +10 -1
- package/dist/components/agents/message-scroller.d.ts.map +1 -1
- package/dist/components/agents/message-scroller.js +81 -16
- package/dist/components/agents/message-scroller.js.map +1 -1
- package/dist/components/agents/message.d.ts +3 -0
- package/dist/components/agents/message.d.ts.map +1 -1
- package/dist/components/agents/message.js +3 -3
- package/dist/components/agents/message.js.map +1 -1
- package/dist/components/agents/prompt-input.d.ts +41 -1
- package/dist/components/agents/prompt-input.d.ts.map +1 -1
- package/dist/components/agents/prompt-input.js +356 -93
- package/dist/components/agents/prompt-input.js.map +1 -1
- package/dist/components/agents/streaming-response.d.ts +12 -0
- package/dist/components/agents/streaming-response.d.ts.map +1 -1
- package/dist/components/agents/streaming-response.js +35 -28
- package/dist/components/agents/streaming-response.js.map +1 -1
- package/dist/components/agents/todo-list.d.ts +13 -0
- package/dist/components/agents/todo-list.d.ts.map +1 -1
- package/dist/components/agents/todo-list.js +114 -98
- package/dist/components/agents/todo-list.js.map +1 -1
- package/dist/components/agents/tool-approval.d.ts +18 -0
- package/dist/components/agents/tool-approval.d.ts.map +1 -1
- package/dist/components/agents/tool-approval.js +48 -22
- package/dist/components/agents/tool-approval.js.map +1 -1
- package/dist/components/agents/tool-result.d.ts +18 -0
- package/dist/components/agents/tool-result.d.ts.map +1 -1
- package/dist/components/agents/tool-result.js +48 -59
- package/dist/components/agents/tool-result.js.map +1 -1
- package/dist/components/agents/voice-note.d.ts +37 -0
- package/dist/components/agents/voice-note.d.ts.map +1 -0
- package/dist/components/agents/voice-note.js +326 -0
- package/dist/components/agents/voice-note.js.map +1 -0
- package/dist/components/charts/bar-chart/context.d.ts +15 -7
- package/dist/components/charts/bar-chart/context.d.ts.map +1 -1
- package/dist/components/charts/bar-chart/context.js +3 -1
- package/dist/components/charts/bar-chart/context.js.map +1 -1
- package/dist/components/charts/bar-chart/legend.d.ts +1 -0
- package/dist/components/charts/bar-chart/legend.d.ts.map +1 -1
- package/dist/components/charts/bar-chart/legend.js.map +1 -1
- package/dist/components/charts/bar-chart/plot.d.ts +2 -0
- package/dist/components/charts/bar-chart/plot.d.ts.map +1 -1
- package/dist/components/charts/bar-chart/plot.js +2 -2
- package/dist/components/charts/bar-chart/plot.js.map +1 -1
- package/dist/components/charts/bar-chart/tooltip.d.ts +2 -0
- package/dist/components/charts/bar-chart/tooltip.d.ts.map +1 -1
- package/dist/components/charts/bar-chart/tooltip.js +1 -1
- package/dist/components/charts/bar-chart/tooltip.js.map +1 -1
- package/dist/components/charts/bar-chart.d.ts +1 -1
- package/dist/components/charts/bump-chart/context.d.ts +1 -1
- package/dist/components/charts/bump-chart/context.js +1 -1
- package/dist/components/charts/bump-chart/legend.js +5 -5
- package/dist/components/charts/bump-chart/legend.js.map +1 -1
- package/dist/components/charts/bump-chart/plot.js +1 -1
- package/dist/components/charts/bump-chart/point.js +5 -5
- package/dist/components/charts/bump-chart/point.js.map +1 -1
- package/dist/components/charts/bump-chart/series.d.ts +1 -1
- package/dist/components/charts/bump-chart/series.js +2 -2
- package/dist/components/charts/bump-chart/series.js.map +1 -1
- package/dist/components/charts/bump-chart.d.ts +1 -1
- package/dist/components/charts/bump-chart.js +2 -2
- package/dist/components/charts/candlestick-chart/context.d.ts +14 -3
- package/dist/components/charts/candlestick-chart/context.d.ts.map +1 -1
- package/dist/components/charts/candlestick-chart/context.js.map +1 -1
- package/dist/components/charts/candlestick-chart/plot.js +2 -2
- package/dist/components/charts/candlestick-chart/plot.js.map +1 -1
- package/dist/components/charts/composition-chart/context.d.ts +1 -1
- package/dist/components/charts/composition-chart/legend.js +1 -1
- package/dist/components/charts/composition-chart/legend.js.map +1 -1
- package/dist/components/charts/composition-chart/plot.js +1 -1
- package/dist/components/charts/composition-chart.d.ts +1 -1
- package/dist/components/charts/donut-chart/center.d.ts +1 -1
- package/dist/components/charts/donut-chart/context.d.ts +6 -1
- package/dist/components/charts/donut-chart/context.d.ts.map +1 -1
- package/dist/components/charts/donut-chart/legend.d.ts +1 -1
- package/dist/components/charts/donut-chart.d.ts +1 -1
- package/dist/components/charts/funnel-chart.d.ts +8 -0
- package/dist/components/charts/funnel-chart.d.ts.map +1 -1
- package/dist/components/charts/funnel-chart.js +8 -8
- package/dist/components/charts/funnel-chart.js.map +1 -1
- package/dist/components/charts/heat-calendar/grid.js +2 -2
- package/dist/components/charts/heat-calendar/grid.js.map +1 -1
- package/dist/components/charts/heat-calendar/legend.js +1 -1
- package/dist/components/charts/heat-calendar/tooltip.d.ts +1 -1
- package/dist/components/charts/heat-calendar/tooltip.js +2 -2
- package/dist/components/charts/heat-calendar.d.ts +1 -1
- package/dist/components/charts/heat-calendar.js +1 -1
- package/dist/components/charts/line-chart/context.d.ts +12 -4
- package/dist/components/charts/line-chart/context.d.ts.map +1 -1
- package/dist/components/charts/line-chart/context.js +3 -1
- package/dist/components/charts/line-chart/context.js.map +1 -1
- package/dist/components/charts/line-chart/legend.d.ts +1 -0
- package/dist/components/charts/line-chart/legend.d.ts.map +1 -1
- package/dist/components/charts/line-chart/legend.js.map +1 -1
- package/dist/components/charts/line-chart/plot.d.ts +2 -0
- package/dist/components/charts/line-chart/plot.d.ts.map +1 -1
- package/dist/components/charts/line-chart/plot.js +3 -3
- package/dist/components/charts/line-chart/plot.js.map +1 -1
- package/dist/components/charts/line-chart/tooltip.d.ts +1 -0
- package/dist/components/charts/line-chart/tooltip.d.ts.map +1 -1
- package/dist/components/charts/line-chart/tooltip.js.map +1 -1
- package/dist/components/charts/line-chart.d.ts +1 -1
- package/dist/components/charts/liquidity-heatmap.d.ts +8 -0
- package/dist/components/charts/liquidity-heatmap.d.ts.map +1 -1
- package/dist/components/charts/liquidity-heatmap.js +4 -4
- package/dist/components/charts/liquidity-heatmap.js.map +1 -1
- package/dist/components/charts/order-book/depth-row.d.ts +1 -1
- package/dist/components/charts/order-book.d.ts +14 -2
- package/dist/components/charts/order-book.d.ts.map +1 -1
- package/dist/components/charts/order-book.js +6 -6
- package/dist/components/charts/order-book.js.map +1 -1
- package/dist/components/charts/price-target-fan/header.js +2 -2
- package/dist/components/charts/price-target-fan/header.js.map +1 -1
- package/dist/components/charts/price-target-fan/plot.js +1 -1
- package/dist/components/charts/price-target-fan/series.js +1 -1
- package/dist/components/charts/price-target-fan/tooltip.d.ts +1 -1
- package/dist/components/charts/price-target-fan/tooltip.js +3 -3
- package/dist/components/charts/price-target-fan/tooltip.js.map +1 -1
- package/dist/components/charts/price-target-fan.d.ts +1 -1
- package/dist/components/charts/price-target-fan.js +1 -1
- package/dist/components/charts/returns-calendar/grid.js +10 -7
- package/dist/components/charts/returns-calendar/grid.js.map +1 -1
- package/dist/components/charts/returns-calendar/tooltip.d.ts +1 -1
- package/dist/components/charts/returns-calendar/tooltip.js +2 -2
- package/dist/components/charts/returns-calendar/tooltip.js.map +1 -1
- package/dist/components/charts/returns-calendar.d.ts +1 -1
- package/dist/components/charts/returns-calendar.d.ts.map +1 -1
- package/dist/components/charts/returns-calendar.js +1 -1
- package/dist/components/charts/sankey-chart/context.d.ts +1 -1
- package/dist/components/charts/sankey-chart/context.js +1 -1
- package/dist/components/charts/sankey-chart/plot.d.ts.map +1 -1
- package/dist/components/charts/sankey-chart/plot.js +10 -32
- package/dist/components/charts/sankey-chart/plot.js.map +1 -1
- package/dist/components/charts/sankey-chart/tooltip.d.ts +3 -1
- package/dist/components/charts/sankey-chart/tooltip.d.ts.map +1 -1
- package/dist/components/charts/sankey-chart/tooltip.js +2 -2
- package/dist/components/charts/sankey-chart/tooltip.js.map +1 -1
- package/dist/components/charts/sankey-chart.d.ts +1 -1
- package/dist/components/charts/sankey-chart.js +1 -1
- package/dist/components/charts/sparkline.d.ts +4 -0
- package/dist/components/charts/sparkline.d.ts.map +1 -1
- package/dist/components/charts/sparkline.js +3 -3
- package/dist/components/charts/sparkline.js.map +1 -1
- package/dist/components/charts/status-bar/legend.d.ts +1 -0
- package/dist/components/charts/status-bar/legend.d.ts.map +1 -1
- package/dist/components/charts/status-bar/legend.js +1 -1
- package/dist/components/charts/status-bar/legend.js.map +1 -1
- package/dist/components/charts/status-bar/plot.d.ts +2 -0
- package/dist/components/charts/status-bar/plot.d.ts.map +1 -1
- package/dist/components/charts/status-bar/plot.js +1 -1
- package/dist/components/charts/status-bar/plot.js.map +1 -1
- package/dist/components/charts/status-bar/tooltip.d.ts +1 -1
- package/dist/components/charts/status-bar/tooltip.js +2 -2
- package/dist/components/charts/status-bar/tooltip.js.map +1 -1
- package/dist/components/charts/status-bar.d.ts +1 -1
- package/dist/components/charts/status-bar.js +1 -1
- package/dist/components/charts/treemap/legend.d.ts +2 -0
- package/dist/components/charts/treemap/legend.d.ts.map +1 -1
- package/dist/components/charts/treemap/legend.js +1 -1
- package/dist/components/charts/treemap/legend.js.map +1 -1
- package/dist/components/charts/treemap/plot.d.ts +2 -1
- package/dist/components/charts/treemap/plot.d.ts.map +1 -1
- package/dist/components/charts/treemap/plot.js +3 -16
- package/dist/components/charts/treemap/plot.js.map +1 -1
- package/dist/components/charts/treemap/tile.d.ts +1 -1
- package/dist/components/charts/treemap/tile.js +3 -3
- package/dist/components/charts/treemap/tile.js.map +1 -1
- package/dist/components/charts/treemap/tooltip.d.ts +3 -1
- package/dist/components/charts/treemap/tooltip.d.ts.map +1 -1
- package/dist/components/charts/treemap/tooltip.js +2 -2
- package/dist/components/charts/treemap/tooltip.js.map +1 -1
- package/dist/components/charts/treemap.d.ts +10 -4
- package/dist/components/charts/treemap.d.ts.map +1 -1
- package/dist/components/charts/treemap.js +1 -1
- package/dist/components/charts/volume-profile/plot.d.ts +2 -0
- package/dist/components/charts/volume-profile/plot.d.ts.map +1 -1
- package/dist/components/charts/volume-profile/plot.js +4 -4
- package/dist/components/charts/volume-profile/plot.js.map +1 -1
- package/dist/components/charts/volume-profile/summary.js +2 -2
- package/dist/components/charts/volume-profile/summary.js.map +1 -1
- package/dist/components/charts/volume-profile/tooltip.d.ts +1 -1
- package/dist/components/charts/volume-profile/tooltip.js +2 -2
- package/dist/components/charts/volume-profile/tooltip.js.map +1 -1
- package/dist/components/charts/volume-profile.d.ts +12 -3
- package/dist/components/charts/volume-profile.d.ts.map +1 -1
- package/dist/components/charts/volume-profile.js +2 -2
- package/dist/components/charts/volume-profile.js.map +1 -1
- package/dist/components/charts/xy/data-table.d.ts +1 -1
- package/dist/components/charts/xy/legend.d.ts +1 -1
- package/dist/components/custom/toast.d.ts +2 -1
- package/dist/components/custom/toast.d.ts.map +1 -1
- package/dist/components/custom/toast.js +1 -1
- package/dist/components/motion/action-swap.d.ts +19 -0
- package/dist/components/motion/action-swap.d.ts.map +1 -1
- package/dist/components/motion/action-swap.js.map +1 -1
- package/dist/components/motion/adaptive-stepper.d.ts +13 -0
- package/dist/components/motion/adaptive-stepper.d.ts.map +1 -1
- package/dist/components/motion/adaptive-stepper.js +2 -7
- package/dist/components/motion/adaptive-stepper.js.map +1 -1
- package/dist/components/motion/add-to-cart.d.ts +38 -0
- package/dist/components/motion/add-to-cart.d.ts.map +1 -0
- package/dist/components/motion/add-to-cart.js +228 -0
- package/dist/components/motion/add-to-cart.js.map +1 -0
- package/dist/components/motion/alert.d.ts +4 -0
- package/dist/components/motion/alert.d.ts.map +1 -1
- package/dist/components/motion/alert.js +2 -2
- package/dist/components/motion/alert.js.map +1 -1
- package/dist/components/motion/animated-badge.d.ts +6 -0
- package/dist/components/motion/animated-badge.d.ts.map +1 -1
- package/dist/components/motion/animated-badge.js +2 -2
- package/dist/components/motion/animated-badge.js.map +1 -1
- package/dist/components/motion/animated-number.d.ts +5 -0
- package/dist/components/motion/animated-number.d.ts.map +1 -1
- package/dist/components/motion/animated-number.js.map +1 -1
- package/dist/components/motion/animated-sidebar/menu-button.d.ts +2 -0
- package/dist/components/motion/animated-sidebar/menu-button.js +95 -0
- package/dist/components/motion/animated-sidebar/menu-button.js.map +1 -0
- package/dist/components/motion/animated-sidebar/menu-sub-button.d.ts +2 -0
- package/dist/components/motion/animated-sidebar/menu-sub-button.js +52 -0
- package/dist/components/motion/animated-sidebar/menu-sub-button.js.map +1 -0
- package/dist/components/motion/animated-sidebar/mobile-sidebar.d.ts +9 -0
- package/dist/components/motion/animated-sidebar/mobile-sidebar.d.ts.map +1 -0
- package/dist/components/motion/animated-sidebar/mobile-sidebar.js +73 -0
- package/dist/components/motion/animated-sidebar/mobile-sidebar.js.map +1 -0
- package/dist/components/motion/animated-sidebar.d.ts +17 -55
- package/dist/components/motion/animated-sidebar.d.ts.map +1 -1
- package/dist/components/motion/animated-sidebar.js +4 -628
- package/dist/components/motion/animated-toast-stack/toast-body.d.ts +19 -0
- package/dist/components/motion/animated-toast-stack/toast-body.d.ts.map +1 -0
- package/dist/components/motion/animated-toast-stack/toast-body.js +154 -0
- package/dist/components/motion/animated-toast-stack/toast-body.js.map +1 -0
- package/dist/components/motion/animated-toast-stack.d.ts +3 -69
- package/dist/components/motion/animated-toast-stack.js +1 -307
- package/dist/components/motion/arc-picker.js +1 -1
- package/dist/components/motion/arc-picker.js.map +1 -1
- package/dist/components/motion/aspect-ratio.d.ts +1 -0
- package/dist/components/motion/aspect-ratio.d.ts.map +1 -1
- package/dist/components/motion/aspect-ratio.js.map +1 -1
- package/dist/components/motion/attachment-upload/attachment-row.d.ts +20 -0
- package/dist/components/motion/attachment-upload/attachment-row.d.ts.map +1 -0
- package/dist/components/motion/attachment-upload/attachment-row.js +224 -0
- package/dist/components/motion/attachment-upload/attachment-row.js.map +1 -0
- package/dist/components/motion/attachment-upload/image-preview-dialog.d.ts +10 -0
- package/dist/components/motion/attachment-upload/image-preview-dialog.d.ts.map +1 -0
- package/dist/components/motion/attachment-upload/image-preview-dialog.js +84 -0
- package/dist/components/motion/attachment-upload/image-preview-dialog.js.map +1 -0
- package/dist/components/motion/attachment-upload/image-thumbnail.d.ts +10 -0
- package/dist/components/motion/attachment-upload/image-thumbnail.d.ts.map +1 -0
- package/dist/components/motion/attachment-upload/image-thumbnail.js +53 -0
- package/dist/components/motion/attachment-upload/image-thumbnail.js.map +1 -0
- package/dist/components/motion/attachment-upload/row-action.d.ts +11 -0
- package/dist/components/motion/attachment-upload/row-action.d.ts.map +1 -0
- package/dist/components/motion/attachment-upload/row-action.js +98 -0
- package/dist/components/motion/attachment-upload/row-action.js.map +1 -0
- package/dist/components/motion/attachment-upload.d.ts +22 -50
- package/dist/components/motion/attachment-upload.d.ts.map +1 -1
- package/dist/components/motion/attachment-upload.js +16 -492
- package/dist/components/motion/attachment-upload.js.map +1 -1
- package/dist/components/motion/availability-scheduler/copy-menu.js +1 -1
- package/dist/components/motion/availability-scheduler/day-row.js +2 -2
- package/dist/components/motion/availability-scheduler/day-row.js.map +1 -1
- package/dist/components/motion/availability-scheduler/icon-button.js +1 -1
- package/dist/components/motion/availability-scheduler/icon-button.js.map +1 -1
- package/dist/components/motion/{availability-scheduler/index.d.ts → availability-scheduler.d.ts} +7 -3
- package/dist/components/motion/availability-scheduler.d.ts.map +1 -0
- package/dist/components/motion/{availability-scheduler/index.js → availability-scheduler.js} +4 -4
- package/dist/components/motion/availability-scheduler.js.map +1 -0
- package/dist/components/motion/avatar-group.d.ts +10 -1
- package/dist/components/motion/avatar-group.d.ts.map +1 -1
- package/dist/components/motion/avatar-group.js +3 -3
- package/dist/components/motion/avatar-group.js.map +1 -1
- package/dist/components/motion/before-after-slider.d.ts +3 -0
- package/dist/components/motion/before-after-slider.d.ts.map +1 -1
- package/dist/components/motion/before-after-slider.js +2 -3
- package/dist/components/motion/before-after-slider.js.map +1 -1
- package/dist/components/motion/bloom-menu.d.ts +5 -0
- package/dist/components/motion/bloom-menu.d.ts.map +1 -1
- package/dist/components/motion/bloom-menu.js +10 -24
- package/dist/components/motion/bloom-menu.js.map +1 -1
- package/dist/components/motion/bookmark-button.d.ts +30 -0
- package/dist/components/motion/bookmark-button.d.ts.map +1 -0
- package/dist/components/motion/bookmark-button.js +107 -0
- package/dist/components/motion/bookmark-button.js.map +1 -0
- package/dist/components/motion/bookshelf.d.ts +7 -0
- package/dist/components/motion/bookshelf.d.ts.map +1 -1
- package/dist/components/motion/bookshelf.js +3 -3
- package/dist/components/motion/bookshelf.js.map +1 -1
- package/dist/components/motion/bottom-sheet.d.ts +6 -0
- package/dist/components/motion/bottom-sheet.d.ts.map +1 -1
- package/dist/components/motion/bottom-sheet.js +6 -30
- package/dist/components/motion/bottom-sheet.js.map +1 -1
- package/dist/components/motion/bounce-sidebar.d.ts +16 -0
- package/dist/components/motion/bounce-sidebar.d.ts.map +1 -1
- package/dist/components/motion/bounce-sidebar.js.map +1 -1
- package/dist/components/motion/bouncy-accordion.d.ts +20 -0
- package/dist/components/motion/bouncy-accordion.d.ts.map +1 -1
- package/dist/components/motion/bouncy-accordion.js +2 -2
- package/dist/components/motion/bouncy-accordion.js.map +1 -1
- package/dist/components/motion/breadcrumb.d.ts +2 -0
- package/dist/components/motion/breadcrumb.d.ts.map +1 -1
- package/dist/components/motion/breadcrumb.js +5 -6
- package/dist/components/motion/breadcrumb.js.map +1 -1
- package/dist/components/motion/button/base.d.ts +8 -0
- package/dist/components/motion/button/base.d.ts.map +1 -1
- package/dist/components/motion/button/base.js +15 -10
- package/dist/components/motion/button/base.js.map +1 -1
- package/dist/components/motion/button/metallic.d.ts.map +1 -1
- package/dist/components/motion/button/metallic.js +5 -4
- package/dist/components/motion/button/metallic.js.map +1 -1
- package/dist/components/motion/button/stateful.d.ts +5 -0
- package/dist/components/motion/button/stateful.d.ts.map +1 -1
- package/dist/components/motion/button/stateful.js +0 -1
- package/dist/components/motion/button/stateful.js.map +1 -1
- package/dist/components/motion/{button/index.d.ts → button.d.ts} +4 -4
- package/dist/components/motion/button.js +6 -0
- package/dist/components/motion/card-dealer.d.ts +2 -0
- package/dist/components/motion/card-dealer.d.ts.map +1 -1
- package/dist/components/motion/card-dealer.js +4 -4
- package/dist/components/motion/card-dealer.js.map +1 -1
- package/dist/components/motion/card-folder.d.ts +18 -0
- package/dist/components/motion/card-folder.d.ts.map +1 -1
- package/dist/components/motion/card-folder.js +9 -9
- package/dist/components/motion/card-folder.js.map +1 -1
- package/dist/components/motion/card.js +1 -1
- package/dist/components/motion/card.js.map +1 -1
- package/dist/components/motion/casino/game-parts.d.ts +1 -1
- package/dist/components/motion/casino/game-parts.js +5 -5
- package/dist/components/motion/casino/game-parts.js.map +1 -1
- package/dist/components/motion/center-morph-modal.d.ts +4 -0
- package/dist/components/motion/center-morph-modal.d.ts.map +1 -1
- package/dist/components/motion/center-morph-modal.js +64 -91
- package/dist/components/motion/center-morph-modal.js.map +1 -1
- package/dist/components/motion/checkbox.d.ts +8 -0
- package/dist/components/motion/checkbox.d.ts.map +1 -1
- package/dist/components/motion/checkbox.js.map +1 -1
- package/dist/components/motion/chromatic-text-reveal.js +3 -3
- package/dist/components/motion/chromatic-text-reveal.js.map +1 -1
- package/dist/components/motion/click-burst.d.ts +24 -0
- package/dist/components/motion/click-burst.d.ts.map +1 -0
- package/dist/components/motion/click-burst.js +133 -0
- package/dist/components/motion/click-burst.js.map +1 -0
- package/dist/components/motion/collapsible.d.ts +4 -0
- package/dist/components/motion/collapsible.d.ts.map +1 -1
- package/dist/components/motion/collapsible.js +1 -1
- package/dist/components/motion/collapsible.js.map +1 -1
- package/dist/components/motion/color-picker.d.ts +7 -21
- package/dist/components/motion/color-picker.d.ts.map +1 -1
- package/dist/components/motion/color-picker.js +7 -95
- package/dist/components/motion/color-picker.js.map +1 -1
- package/dist/components/motion/color-selector.d.ts +5 -0
- package/dist/components/motion/color-selector.d.ts.map +1 -1
- package/dist/components/motion/color-selector.js.map +1 -1
- package/dist/components/motion/combobox/content.d.ts +3 -10
- package/dist/components/motion/combobox/content.d.ts.map +1 -1
- package/dist/components/motion/combobox/content.js +14 -80
- package/dist/components/motion/combobox/content.js.map +1 -1
- package/dist/components/motion/combobox/context.d.ts +3 -2
- package/dist/components/motion/combobox/context.js +1 -1
- package/dist/components/motion/combobox/list.d.ts +12 -0
- package/dist/components/motion/combobox/list.d.ts.map +1 -1
- package/dist/components/motion/combobox/list.js +4 -4
- package/dist/components/motion/combobox/list.js.map +1 -1
- package/dist/components/motion/combobox/listbox-panel.d.ts +2 -0
- package/dist/components/motion/combobox/listbox-panel.js +99 -0
- package/dist/components/motion/combobox/listbox-panel.js.map +1 -0
- package/dist/components/motion/combobox/trigger.d.ts +5 -0
- package/dist/components/motion/combobox/trigger.d.ts.map +1 -1
- package/dist/components/motion/combobox/trigger.js +10 -4
- package/dist/components/motion/combobox/trigger.js.map +1 -1
- package/dist/components/motion/combobox.d.ts +1 -1
- package/dist/components/motion/combobox.js +1 -1
- package/dist/components/motion/command-palette.d.ts +29 -1
- package/dist/components/motion/command-palette.d.ts.map +1 -1
- package/dist/components/motion/command-palette.js +282 -124
- package/dist/components/motion/command-palette.js.map +1 -1
- package/dist/components/motion/confetti.d.ts +23 -0
- package/dist/components/motion/confetti.d.ts.map +1 -0
- package/dist/components/motion/confetti.js +154 -0
- package/dist/components/motion/confetti.js.map +1 -0
- package/dist/components/motion/context-menu.d.ts +25 -0
- package/dist/components/motion/context-menu.d.ts.map +1 -1
- package/dist/components/motion/context-menu.js +110 -112
- package/dist/components/motion/context-menu.js.map +1 -1
- package/dist/components/motion/copy-button.d.ts +27 -0
- package/dist/components/motion/copy-button.d.ts.map +1 -0
- package/dist/components/motion/copy-button.js +129 -0
- package/dist/components/motion/copy-button.js.map +1 -0
- package/dist/components/motion/crash/crash-balloon.d.ts +2 -2
- package/dist/components/motion/crash/crash-balloon.js +2 -2
- package/dist/components/motion/crash/crash-balloon.js.map +1 -1
- package/dist/components/motion/crash/crash-parts.d.ts +2 -2
- package/dist/components/motion/crash/crash-parts.js +1 -1
- package/dist/components/motion/crash/crash-tower.d.ts +2 -2
- package/dist/components/motion/crash/crash-tower.js +3 -3
- package/dist/components/motion/crash/crash-tower.js.map +1 -1
- package/dist/components/motion/crash.d.ts +2 -2
- package/dist/components/motion/crash.js +1 -1
- package/dist/components/motion/cylinder-carousel.d.ts +6 -3
- package/dist/components/motion/cylinder-carousel.d.ts.map +1 -1
- package/dist/components/motion/cylinder-carousel.js +1 -1
- package/dist/components/motion/cylinder-carousel.js.map +1 -1
- package/dist/components/motion/date-range-picker/calendar-choices.d.ts +18 -0
- package/dist/components/motion/date-range-picker/calendar-choices.d.ts.map +1 -0
- package/dist/components/motion/date-range-picker/calendar-choices.js +62 -0
- package/dist/components/motion/date-range-picker/calendar-choices.js.map +1 -0
- package/dist/components/motion/date-range-picker/calendar-presence.d.ts +5 -0
- package/dist/components/motion/date-range-picker/calendar-presence.d.ts.map +1 -0
- package/dist/components/motion/date-range-picker/calendar-presence.js +14 -0
- package/dist/components/motion/date-range-picker/calendar-presence.js.map +1 -0
- package/dist/components/motion/date-range-picker/calendar.d.ts +8 -0
- package/dist/components/motion/date-range-picker/calendar.d.ts.map +1 -0
- package/dist/components/motion/date-range-picker/calendar.js +46 -0
- package/dist/components/motion/date-range-picker/calendar.js.map +1 -0
- package/dist/components/motion/date-range-picker/clear.d.ts +4 -0
- package/dist/components/motion/date-range-picker/clear.d.ts.map +1 -0
- package/dist/components/motion/date-range-picker/clear.js +23 -0
- package/dist/components/motion/date-range-picker/clear.js.map +1 -0
- package/dist/components/motion/date-range-picker/content.d.ts +7 -0
- package/dist/components/motion/date-range-picker/content.d.ts.map +1 -0
- package/dist/components/motion/date-range-picker/content.js +36 -0
- package/dist/components/motion/date-range-picker/content.js.map +1 -0
- package/dist/components/motion/date-range-picker/dropdown.d.ts +12 -0
- package/dist/components/motion/date-range-picker/dropdown.d.ts.map +1 -0
- package/dist/components/motion/date-range-picker/dropdown.js +26 -0
- package/dist/components/motion/date-range-picker/dropdown.js.map +1 -0
- package/dist/components/motion/date-range-picker/footer.d.ts +4 -0
- package/dist/components/motion/date-range-picker/footer.d.ts.map +1 -0
- package/dist/components/motion/date-range-picker/footer.js +20 -0
- package/dist/components/motion/date-range-picker/footer.js.map +1 -0
- package/dist/components/motion/date-range-picker/grid.d.ts +4 -0
- package/dist/components/motion/date-range-picker/grid.d.ts.map +1 -0
- package/dist/components/motion/date-range-picker/grid.js +132 -0
- package/dist/components/motion/date-range-picker/grid.js.map +1 -0
- package/dist/components/motion/date-range-picker/header.d.ts +4 -0
- package/dist/components/motion/date-range-picker/header.d.ts.map +1 -0
- package/dist/components/motion/date-range-picker/header.js +85 -0
- package/dist/components/motion/date-range-picker/header.js.map +1 -0
- package/dist/components/motion/date-range-picker/preset.d.ts +10 -0
- package/dist/components/motion/date-range-picker/preset.d.ts.map +1 -0
- package/dist/components/motion/date-range-picker/preset.js +25 -0
- package/dist/components/motion/date-range-picker/preset.js.map +1 -0
- package/dist/components/motion/date-range-picker/presets.d.ts +4 -0
- package/dist/components/motion/date-range-picker/presets.d.ts.map +1 -0
- package/dist/components/motion/date-range-picker/presets.js +22 -0
- package/dist/components/motion/date-range-picker/presets.js.map +1 -0
- package/dist/components/motion/date-range-picker/root.d.ts +4 -0
- package/dist/components/motion/date-range-picker/root.d.ts.map +1 -0
- package/dist/components/motion/date-range-picker/root.js +3 -0
- package/dist/components/motion/date-range-picker/selection.d.ts +4 -0
- package/dist/components/motion/date-range-picker/selection.d.ts.map +1 -0
- package/dist/components/motion/date-range-picker/selection.js +17 -0
- package/dist/components/motion/date-range-picker/selection.js.map +1 -0
- package/dist/components/motion/date-range-picker/summary.d.ts +4 -0
- package/dist/components/motion/date-range-picker/summary.d.ts.map +1 -0
- package/dist/components/motion/date-range-picker/summary.js +40 -0
- package/dist/components/motion/date-range-picker/summary.js.map +1 -0
- package/dist/components/motion/date-range-picker/trigger.d.ts +7 -0
- package/dist/components/motion/date-range-picker/trigger.d.ts.map +1 -0
- package/dist/components/motion/date-range-picker/trigger.js +74 -0
- package/dist/components/motion/date-range-picker/trigger.js.map +1 -0
- package/dist/components/motion/date-range-picker.d.ts +16 -116
- package/dist/components/motion/date-range-picker.d.ts.map +1 -1
- package/dist/components/motion/date-range-picker.js +14 -922
- package/dist/components/motion/date-range-picker.js.map +1 -1
- package/dist/components/motion/delete-button.d.ts +31 -0
- package/dist/components/motion/delete-button.d.ts.map +1 -0
- package/dist/components/motion/delete-button.js +263 -0
- package/dist/components/motion/delete-button.js.map +1 -0
- package/dist/components/motion/digit-swap.d.ts +3 -0
- package/dist/components/motion/digit-swap.d.ts.map +1 -1
- package/dist/components/motion/digit-swap.js.map +1 -1
- package/dist/components/motion/dock.d.ts +4 -0
- package/dist/components/motion/dock.d.ts.map +1 -1
- package/dist/components/motion/dock.js +2 -2
- package/dist/components/motion/dock.js.map +1 -1
- package/dist/components/motion/download-button.d.ts +29 -0
- package/dist/components/motion/download-button.d.ts.map +1 -0
- package/dist/components/motion/download-button.js +305 -0
- package/dist/components/motion/download-button.js.map +1 -0
- package/dist/components/motion/drawer.d.ts +9 -1
- package/dist/components/motion/drawer.d.ts.map +1 -1
- package/dist/components/motion/drawer.js +65 -15
- package/dist/components/motion/drawer.js.map +1 -1
- package/dist/components/motion/dropdown-menu/item-base.d.ts +37 -0
- package/dist/components/motion/dropdown-menu/item-base.d.ts.map +1 -0
- package/dist/components/motion/dropdown-menu/item-base.js +78 -0
- package/dist/components/motion/dropdown-menu/item-base.js.map +1 -0
- package/dist/components/motion/dropdown-menu/menu-panel.d.ts +31 -0
- package/dist/components/motion/dropdown-menu/menu-panel.d.ts.map +1 -0
- package/dist/components/motion/dropdown-menu/menu-panel.js +201 -0
- package/dist/components/motion/dropdown-menu/menu-panel.js.map +1 -0
- package/dist/components/motion/dropdown-menu.d.ts +30 -18
- package/dist/components/motion/dropdown-menu.d.ts.map +1 -1
- package/dist/components/motion/dropdown-menu.js +113 -421
- package/dist/components/motion/dropdown-menu.js.map +1 -1
- package/dist/components/motion/dynamic-island.d.ts +2 -0
- package/dist/components/motion/dynamic-island.d.ts.map +1 -1
- package/dist/components/motion/dynamic-island.js.map +1 -1
- package/dist/components/motion/expandable-action-bar.d.ts +28 -0
- package/dist/components/motion/expandable-action-bar.d.ts.map +1 -1
- package/dist/components/motion/expandable-action-bar.js +5 -14
- package/dist/components/motion/expandable-action-bar.js.map +1 -1
- package/dist/components/motion/expandable-control.d.ts +14 -0
- package/dist/components/motion/expandable-control.d.ts.map +1 -1
- package/dist/components/motion/expandable-control.js +1 -1
- package/dist/components/motion/expandable-control.js.map +1 -1
- package/dist/components/motion/expandable-tabs.d.ts +16 -1
- package/dist/components/motion/expandable-tabs.d.ts.map +1 -1
- package/dist/components/motion/expandable-tabs.js +3 -15
- package/dist/components/motion/expandable-tabs.js.map +1 -1
- package/dist/components/motion/expanding-arrow-button.d.ts +2 -0
- package/dist/components/motion/expanding-arrow-button.d.ts.map +1 -1
- package/dist/components/motion/expanding-arrow-button.js +3 -3
- package/dist/components/motion/expanding-arrow-button.js.map +1 -1
- package/dist/components/motion/feedback-widget.d.ts +6 -0
- package/dist/components/motion/feedback-widget.d.ts.map +1 -1
- package/dist/components/motion/feedback-widget.js +13 -29
- package/dist/components/motion/feedback-widget.js.map +1 -1
- package/dist/components/motion/file-tree.d.ts +24 -0
- package/dist/components/motion/file-tree.d.ts.map +1 -1
- package/dist/components/motion/file-tree.js +4 -4
- package/dist/components/motion/file-tree.js.map +1 -1
- package/dist/components/motion/file-upload.d.ts +34 -0
- package/dist/components/motion/file-upload.d.ts.map +1 -1
- package/dist/components/motion/file-upload.js +26 -17
- package/dist/components/motion/file-upload.js.map +1 -1
- package/dist/components/motion/follow-button.d.ts +31 -0
- package/dist/components/motion/follow-button.d.ts.map +1 -0
- package/dist/components/motion/follow-button.js +184 -0
- package/dist/components/motion/follow-button.js.map +1 -0
- package/dist/components/motion/hold-action-button.d.ts +7 -0
- package/dist/components/motion/hold-action-button.d.ts.map +1 -1
- package/dist/components/motion/hold-action-button.js +1 -1
- package/dist/components/motion/hold-action-button.js.map +1 -1
- package/dist/components/motion/infinite-masonry.d.ts +22 -0
- package/dist/components/motion/infinite-masonry.d.ts.map +1 -1
- package/dist/components/motion/infinite-masonry.js.map +1 -1
- package/dist/components/motion/input.d.ts +17 -0
- package/dist/components/motion/input.d.ts.map +1 -1
- package/dist/components/motion/input.js +2 -1
- package/dist/components/motion/input.js.map +1 -1
- package/dist/components/motion/knockout-bracket.d.ts +11 -4
- package/dist/components/motion/knockout-bracket.d.ts.map +1 -1
- package/dist/components/motion/knockout-bracket.js +30 -21
- package/dist/components/motion/knockout-bracket.js.map +1 -1
- package/dist/components/motion/knockout-wheel.d.ts +9 -3
- package/dist/components/motion/knockout-wheel.d.ts.map +1 -1
- package/dist/components/motion/knockout-wheel.js +5 -5
- package/dist/components/motion/knockout-wheel.js.map +1 -1
- package/dist/components/motion/like-button.d.ts +26 -0
- package/dist/components/motion/like-button.d.ts.map +1 -0
- package/dist/components/motion/like-button.js +128 -0
- package/dist/components/motion/like-button.js.map +1 -0
- package/dist/components/motion/loader.d.ts +1 -0
- package/dist/components/motion/loader.d.ts.map +1 -1
- package/dist/components/motion/loader.js.map +1 -1
- package/dist/components/motion/lock-toggle.d.ts +29 -0
- package/dist/components/motion/lock-toggle.d.ts.map +1 -0
- package/dist/components/motion/lock-toggle.js +252 -0
- package/dist/components/motion/lock-toggle.js.map +1 -0
- package/dist/components/motion/marquee.d.ts +6 -0
- package/dist/components/motion/marquee.d.ts.map +1 -1
- package/dist/components/motion/marquee.js.map +1 -1
- package/dist/components/motion/menu/menu-item-highlight.d.ts +16 -0
- package/dist/components/motion/menu/menu-item-highlight.d.ts.map +1 -0
- package/dist/components/motion/menu/menu-item-highlight.js +20 -0
- package/dist/components/motion/menu/menu-item-highlight.js.map +1 -0
- package/dist/components/motion/message-status.d.ts +26 -0
- package/dist/components/motion/message-status.d.ts.map +1 -0
- package/dist/components/motion/message-status.js +198 -0
- package/dist/components/motion/message-status.js.map +1 -0
- package/dist/components/motion/mines.d.ts +2 -1
- package/dist/components/motion/mines.d.ts.map +1 -1
- package/dist/components/motion/mines.js +3 -3
- package/dist/components/motion/mines.js.map +1 -1
- package/dist/components/motion/morphing-lightbox.d.ts +16 -0
- package/dist/components/motion/morphing-lightbox.d.ts.map +1 -1
- package/dist/components/motion/morphing-lightbox.js +3 -3
- package/dist/components/motion/morphing-lightbox.js.map +1 -1
- package/dist/components/motion/morphing-modal.d.ts +2 -0
- package/dist/components/motion/morphing-modal.d.ts.map +1 -1
- package/dist/components/motion/morphing-modal.js +14 -13
- package/dist/components/motion/morphing-modal.js.map +1 -1
- package/dist/components/motion/morphing-search-chips.d.ts +12 -0
- package/dist/components/motion/morphing-search-chips.d.ts.map +1 -1
- package/dist/components/motion/morphing-search-chips.js +6 -16
- package/dist/components/motion/morphing-search-chips.js.map +1 -1
- package/dist/components/motion/morphing-search.d.ts +16 -0
- package/dist/components/motion/morphing-search.d.ts.map +1 -1
- package/dist/components/motion/morphing-search.js +9 -13
- package/dist/components/motion/morphing-search.js.map +1 -1
- package/dist/components/motion/morphing-tabs.d.ts +20 -0
- package/dist/components/motion/morphing-tabs.d.ts.map +1 -1
- package/dist/components/motion/morphing-tabs.js.map +1 -1
- package/dist/components/motion/multi-select/content.d.ts +3 -10
- package/dist/components/motion/multi-select/content.d.ts.map +1 -1
- package/dist/components/motion/multi-select/content.js +14 -80
- package/dist/components/motion/multi-select/content.js.map +1 -1
- package/dist/components/motion/multi-select/context.d.ts +2 -2
- package/dist/components/motion/multi-select/context.js +1 -1
- package/dist/components/motion/multi-select/list.d.ts +12 -0
- package/dist/components/motion/multi-select/list.d.ts.map +1 -1
- package/dist/components/motion/multi-select/list.js +5 -5
- package/dist/components/motion/multi-select/list.js.map +1 -1
- package/dist/components/motion/multi-select/trigger.d.ts +6 -0
- package/dist/components/motion/multi-select/trigger.d.ts.map +1 -1
- package/dist/components/motion/multi-select/trigger.js +5 -4
- package/dist/components/motion/multi-select/trigger.js.map +1 -1
- package/dist/components/motion/{multi-select/index.d.ts → multi-select.d.ts} +4 -4
- package/dist/components/motion/{multi-select/index.js → multi-select.js} +4 -4
- package/dist/components/motion/mute-toggle.d.ts +25 -0
- package/dist/components/motion/mute-toggle.d.ts.map +1 -0
- package/dist/components/motion/mute-toggle.js +221 -0
- package/dist/components/motion/mute-toggle.js.map +1 -0
- package/dist/components/motion/not-found/glitch.js +2 -2
- package/dist/components/motion/not-found/glitch.js.map +1 -1
- package/dist/components/motion/not-found/magnetic.js +2 -2
- package/dist/components/motion/not-found/magnetic.js.map +1 -1
- package/dist/components/motion/not-found/shared.d.ts +7 -0
- package/dist/components/motion/not-found/shared.d.ts.map +1 -1
- package/dist/components/motion/not-found/shared.js.map +1 -1
- package/dist/components/motion/not-found/spotlight.js +4 -4
- package/dist/components/motion/not-found/spotlight.js.map +1 -1
- package/dist/components/motion/not-found/stacked.js +2 -2
- package/dist/components/motion/not-found/stacked.js.map +1 -1
- package/dist/components/motion/not-found/terminal.d.ts.map +1 -1
- package/dist/components/motion/not-found/terminal.js +1 -1
- package/dist/components/motion/not-found/terminal.js.map +1 -1
- package/dist/components/motion/notification-bell.d.ts +29 -0
- package/dist/components/motion/notification-bell.d.ts.map +1 -0
- package/dist/components/motion/notification-bell.js +274 -0
- package/dist/components/motion/notification-bell.js.map +1 -0
- package/dist/components/motion/notification-stack.d.ts +23 -0
- package/dist/components/motion/notification-stack.d.ts.map +1 -1
- package/dist/components/motion/notification-stack.js.map +1 -1
- package/dist/components/motion/number-ticker.d.ts +6 -1
- package/dist/components/motion/number-ticker.d.ts.map +1 -1
- package/dist/components/motion/number-ticker.js.map +1 -1
- package/dist/components/motion/otp-input.d.ts +6 -0
- package/dist/components/motion/otp-input.d.ts.map +1 -1
- package/dist/components/motion/otp-input.js +3 -7
- package/dist/components/motion/otp-input.js.map +1 -1
- package/dist/components/motion/overflow-actions.d.ts +26 -0
- package/dist/components/motion/overflow-actions.d.ts.map +1 -1
- package/dist/components/motion/overflow-actions.js.map +1 -1
- package/dist/components/motion/pagination.d.ts +4 -0
- package/dist/components/motion/pagination.d.ts.map +1 -1
- package/dist/components/motion/pagination.js +2 -2
- package/dist/components/motion/pagination.js.map +1 -1
- package/dist/components/motion/parallax.d.ts +2 -0
- package/dist/components/motion/parallax.d.ts.map +1 -1
- package/dist/components/motion/parallax.js.map +1 -1
- package/dist/components/motion/plinko.d.ts +1 -0
- package/dist/components/motion/plinko.d.ts.map +1 -1
- package/dist/components/motion/plinko.js +2 -2
- package/dist/components/motion/plinko.js.map +1 -1
- package/dist/components/motion/poll-vote.d.ts +39 -0
- package/dist/components/motion/poll-vote.d.ts.map +1 -0
- package/dist/components/motion/poll-vote.js +209 -0
- package/dist/components/motion/poll-vote.js.map +1 -0
- package/dist/components/motion/popover-morph.d.ts +2 -50
- package/dist/components/motion/popover-morph.js +4 -24
- package/dist/components/motion/popover-morph.js.map +1 -1
- package/dist/components/motion/popover.d.ts +5 -2
- package/dist/components/motion/popover.d.ts.map +1 -1
- package/dist/components/motion/popover.js +151 -99
- package/dist/components/motion/popover.js.map +1 -1
- package/dist/components/motion/prediction-market-card.d.ts +15 -0
- package/dist/components/motion/prediction-market-card.d.ts.map +1 -1
- package/dist/components/motion/prediction-market-card.js +8 -8
- package/dist/components/motion/prediction-market-card.js.map +1 -1
- package/dist/components/motion/prediction-market.d.ts +34 -0
- package/dist/components/motion/prediction-market.d.ts.map +1 -1
- package/dist/components/motion/prediction-market.js +10 -10
- package/dist/components/motion/prediction-market.js.map +1 -1
- package/dist/components/motion/preview-rail.d.ts +23 -0
- package/dist/components/motion/preview-rail.d.ts.map +1 -1
- package/dist/components/motion/preview-rail.js.map +1 -1
- package/dist/components/motion/project-folder.d.ts +16 -0
- package/dist/components/motion/project-folder.d.ts.map +1 -1
- package/dist/components/motion/project-folder.js +10 -40
- package/dist/components/motion/project-folder.js.map +1 -1
- package/dist/components/motion/pull-to-refresh.d.ts +8 -0
- package/dist/components/motion/pull-to-refresh.d.ts.map +1 -1
- package/dist/components/motion/pull-to-refresh.js +1 -1
- package/dist/components/motion/pull-to-refresh.js.map +1 -1
- package/dist/components/motion/qr-code.d.ts +42 -0
- package/dist/components/motion/qr-code.d.ts.map +1 -0
- package/dist/components/motion/qr-code.js +443 -0
- package/dist/components/motion/qr-code.js.map +1 -0
- package/dist/components/motion/radio.d.ts +10 -0
- package/dist/components/motion/radio.d.ts.map +1 -1
- package/dist/components/motion/radio.js.map +1 -1
- package/dist/components/motion/range-slider-bubble.d.ts +1 -0
- package/dist/components/motion/range-slider-bubble.d.ts.map +1 -1
- package/dist/components/motion/range-slider-bubble.js +4 -4
- package/dist/components/motion/range-slider-bubble.js.map +1 -1
- package/dist/components/motion/range-slider-fluid.d.ts +1 -0
- package/dist/components/motion/range-slider-fluid.d.ts.map +1 -1
- package/dist/components/motion/range-slider-fluid.js +2 -2
- package/dist/components/motion/range-slider-fluid.js.map +1 -1
- package/dist/components/motion/range-slider-inline.d.ts +1 -0
- package/dist/components/motion/range-slider-inline.d.ts.map +1 -1
- package/dist/components/motion/range-slider-inline.js +1 -1
- package/dist/components/motion/range-slider-inline.js.map +1 -1
- package/dist/components/motion/range-slider-ruler.d.ts +1 -0
- package/dist/components/motion/range-slider-ruler.d.ts.map +1 -1
- package/dist/components/motion/range-slider-ruler.js +3 -3
- package/dist/components/motion/range-slider-ruler.js.map +1 -1
- package/dist/components/motion/range-slider-wave.d.ts +1 -0
- package/dist/components/motion/range-slider-wave.d.ts.map +1 -1
- package/dist/components/motion/range-slider-wave.js +3 -3
- package/dist/components/motion/range-slider-wave.js.map +1 -1
- package/dist/components/motion/range-slider.d.ts +1 -0
- package/dist/components/motion/range-slider.d.ts.map +1 -1
- package/dist/components/motion/range-slider.js +2 -2
- package/dist/components/motion/range-slider.js.map +1 -1
- package/dist/components/motion/reaction-picker.d.ts +50 -0
- package/dist/components/motion/reaction-picker.d.ts.map +1 -0
- package/dist/components/motion/reaction-picker.js +516 -0
- package/dist/components/motion/reaction-picker.js.map +1 -0
- package/dist/components/motion/refresh-button.d.ts +24 -0
- package/dist/components/motion/refresh-button.d.ts.map +1 -0
- package/dist/components/motion/refresh-button.js +267 -0
- package/dist/components/motion/refresh-button.js.map +1 -0
- package/dist/components/motion/scroll-progress.d.ts +2 -0
- package/dist/components/motion/scroll-progress.d.ts.map +1 -1
- package/dist/components/motion/scroll-progress.js +1 -1
- package/dist/components/motion/scroll-progress.js.map +1 -1
- package/dist/components/motion/scroll-reveal.d.ts +2 -0
- package/dist/components/motion/scroll-reveal.d.ts.map +1 -1
- package/dist/components/motion/scroll-reveal.js.map +1 -1
- package/dist/components/motion/scroll-to.d.ts +2 -1
- package/dist/components/motion/scroll-to.d.ts.map +1 -1
- package/dist/components/motion/scroll-to.js +1 -1
- package/dist/components/motion/scroll-to.js.map +1 -1
- package/dist/components/motion/select-morph.d.ts +16 -2
- package/dist/components/motion/select-morph.d.ts.map +1 -1
- package/dist/components/motion/select-morph.js +148 -85
- package/dist/components/motion/select-morph.js.map +1 -1
- package/dist/components/motion/select.d.ts +16 -2
- package/dist/components/motion/select.d.ts.map +1 -1
- package/dist/components/motion/select.js +150 -61
- package/dist/components/motion/select.js.map +1 -1
- package/dist/components/motion/send-button.d.ts +23 -0
- package/dist/components/motion/send-button.d.ts.map +1 -0
- package/dist/components/motion/send-button.js +273 -0
- package/dist/components/motion/send-button.js.map +1 -0
- package/dist/components/motion/share-button.d.ts +45 -0
- package/dist/components/motion/share-button.d.ts.map +1 -0
- package/dist/components/motion/share-button.js +324 -0
- package/dist/components/motion/share-button.js.map +1 -0
- package/dist/components/motion/signup-form.d.ts +24 -2
- package/dist/components/motion/signup-form.d.ts.map +1 -1
- package/dist/components/motion/signup-form.js +3 -3
- package/dist/components/motion/signup-form.js.map +1 -1
- package/dist/components/motion/slide-action-button.d.ts +6 -0
- package/dist/components/motion/slide-action-button.d.ts.map +1 -1
- package/dist/components/motion/slide-action-button.js.map +1 -1
- package/dist/components/motion/slide-game.d.ts +2 -1
- package/dist/components/motion/slide-game.d.ts.map +1 -1
- package/dist/components/motion/slide-game.js +9 -9
- package/dist/components/motion/slide-game.js.map +1 -1
- package/dist/components/motion/smooth-scroll.d.ts +3 -1
- package/dist/components/motion/smooth-scroll.d.ts.map +1 -1
- package/dist/components/motion/smooth-scroll.js.map +1 -1
- package/dist/components/motion/sortable-list.d.ts +8 -0
- package/dist/components/motion/sortable-list.d.ts.map +1 -1
- package/dist/components/motion/sortable-list.js +2 -2
- package/dist/components/motion/sortable-list.js.map +1 -1
- package/dist/components/motion/star-rating.d.ts +35 -0
- package/dist/components/motion/star-rating.d.ts.map +1 -0
- package/dist/components/motion/star-rating.js +253 -0
- package/dist/components/motion/star-rating.js.map +1 -0
- package/dist/components/motion/status-icon.d.ts +31 -0
- package/dist/components/motion/status-icon.d.ts.map +1 -0
- package/dist/components/motion/status-icon.js +259 -0
- package/dist/components/motion/status-icon.js.map +1 -0
- package/dist/components/motion/swap/controls.d.ts +1 -1
- package/dist/components/motion/swap/controls.d.ts.map +1 -1
- package/dist/components/motion/swap/controls.js +20 -20
- package/dist/components/motion/swap/controls.js.map +1 -1
- package/dist/components/motion/swap/field.d.ts +1 -1
- package/dist/components/motion/swap/field.js +8 -7
- package/dist/components/motion/swap/field.js.map +1 -1
- package/dist/components/motion/swap/quote-row.d.ts +1 -1
- package/dist/components/motion/swap/quote-row.js +1 -1
- package/dist/components/motion/swap/quote-row.js.map +1 -1
- package/dist/components/motion/swap/token-badges.d.ts +1 -1
- package/dist/components/motion/swap/token-badges.js +5 -6
- package/dist/components/motion/swap/token-badges.js.map +1 -1
- package/dist/components/motion/swap/token-picker.d.ts +1 -1
- package/dist/components/motion/swap/token-picker.d.ts.map +1 -1
- package/dist/components/motion/swap/token-picker.js +21 -18
- package/dist/components/motion/swap/token-picker.js.map +1 -1
- package/dist/components/motion/swap.d.ts +7 -2
- package/dist/components/motion/swap.d.ts.map +1 -1
- package/dist/components/motion/swap.js +1 -1
- package/dist/components/motion/swap.js.map +1 -1
- package/dist/components/motion/swipeable-list.d.ts +38 -0
- package/dist/components/motion/swipeable-list.d.ts.map +1 -1
- package/dist/components/motion/swipeable-list.js.map +1 -1
- package/dist/components/motion/switch.d.ts +9 -1
- package/dist/components/motion/switch.d.ts.map +1 -1
- package/dist/components/motion/switch.js +11 -2
- package/dist/components/motion/switch.js.map +1 -1
- package/dist/components/motion/table/skeleton-rows.d.ts +1 -1
- package/dist/components/motion/table/table-header.d.ts +1 -1
- package/dist/components/motion/table/table-menu.d.ts.map +1 -1
- package/dist/components/motion/table/table-menu.js +15 -15
- package/dist/components/motion/table/table-menu.js.map +1 -1
- package/dist/components/motion/{table/index.d.ts → table.d.ts} +3 -3
- package/dist/components/motion/table.d.ts.map +1 -0
- package/dist/components/motion/{table/index.js → table.js} +10 -10
- package/dist/components/motion/table.js.map +1 -0
- package/dist/components/motion/tabs.d.ts +16 -4
- package/dist/components/motion/tabs.d.ts.map +1 -1
- package/dist/components/motion/tabs.js +23 -10
- package/dist/components/motion/tabs.js.map +1 -1
- package/dist/components/motion/text-cascade.d.ts +2 -1
- package/dist/components/motion/text-cascade.d.ts.map +1 -1
- package/dist/components/motion/text-cascade.js +1 -1
- package/dist/components/motion/text-cascade.js.map +1 -1
- package/dist/components/motion/text-morph.d.ts +16 -0
- package/dist/components/motion/text-morph.d.ts.map +1 -0
- package/dist/components/motion/text-morph.js +239 -0
- package/dist/components/motion/text-morph.js.map +1 -0
- package/dist/components/motion/text-reveal.d.ts +11 -0
- package/dist/components/motion/text-reveal.d.ts.map +1 -1
- package/dist/components/motion/text-reveal.js +1 -1
- package/dist/components/motion/text-reveal.js.map +1 -1
- package/dist/components/motion/text-scramble.d.ts +2 -0
- package/dist/components/motion/text-scramble.d.ts.map +1 -1
- package/dist/components/motion/text-scramble.js.map +1 -1
- package/dist/components/motion/text-shimmer.d.ts +3 -0
- package/dist/components/motion/text-shimmer.d.ts.map +1 -1
- package/dist/components/motion/text-shimmer.js.map +1 -1
- package/dist/components/motion/theme-toggle.d.ts +3 -0
- package/dist/components/motion/theme-toggle.d.ts.map +1 -1
- package/dist/components/motion/theme-toggle.js +4 -3
- package/dist/components/motion/theme-toggle.js.map +1 -1
- package/dist/components/motion/tilt-card.d.ts +3 -0
- package/dist/components/motion/tilt-card.d.ts.map +1 -1
- package/dist/components/motion/tilt-card.js.map +1 -1
- package/dist/components/motion/timeline.d.ts +7 -0
- package/dist/components/motion/timeline.d.ts.map +1 -1
- package/dist/components/motion/timeline.js.map +1 -1
- package/dist/components/motion/tooltip/positioner.d.ts +1 -1
- package/dist/components/motion/tooltip/positioner.js +1 -1
- package/dist/components/motion/tooltip-surface.d.ts +6 -1
- package/dist/components/motion/tooltip-surface.d.ts.map +1 -1
- package/dist/components/motion/tooltip-surface.js +34 -24
- package/dist/components/motion/tooltip-surface.js.map +1 -1
- package/dist/components/motion/tooltip.d.ts +7 -1
- package/dist/components/motion/tooltip.d.ts.map +1 -1
- package/dist/components/motion/tooltip.js +1 -1
- package/dist/components/motion/upvote-button.d.ts +30 -0
- package/dist/components/motion/upvote-button.d.ts.map +1 -0
- package/dist/components/motion/upvote-button.js +144 -0
- package/dist/components/motion/upvote-button.js.map +1 -0
- package/dist/components/motion/wallet-card/account-avatar.d.ts +1 -1
- package/dist/components/motion/wallet-card/account-switcher.d.ts +2 -2
- package/dist/components/motion/wallet-card/account-switcher.js +7 -7
- package/dist/components/motion/wallet-card/account-switcher.js.map +1 -1
- package/dist/components/motion/wallet-card/balance-delta.js +1 -1
- package/dist/components/motion/wallet-card/balance-delta.js.map +1 -1
- package/dist/components/motion/wallet-card/copy-button.js +1 -1
- package/dist/components/motion/wallet-card/copy-button.js.map +1 -1
- package/dist/components/motion/wallet-card/search-bar.d.ts +1 -1
- package/dist/components/motion/wallet-card/search-bar.js +8 -8
- package/dist/components/motion/wallet-card/search-bar.js.map +1 -1
- package/dist/components/motion/{wallet-card/index.d.ts → wallet-card.d.ts} +4 -4
- package/dist/components/motion/wallet-card.d.ts.map +1 -0
- package/dist/components/motion/{wallet-card/index.js → wallet-card.js} +11 -11
- package/dist/components/motion/wallet-card.js.map +1 -0
- package/dist/components/motion/wave-reveal.d.ts +25 -0
- package/dist/components/motion/wave-reveal.d.ts.map +1 -0
- package/dist/components/motion/wave-reveal.js +630 -0
- package/dist/components/motion/wave-reveal.js.map +1 -0
- package/dist/components/motion/wheel-picker.d.ts +7 -0
- package/dist/components/motion/wheel-picker.d.ts.map +1 -1
- package/dist/components/motion/wheel-picker.js +12 -2
- package/dist/components/motion/wheel-picker.js.map +1 -1
- package/dist/components/reui/autocomplete.d.ts +1 -1
- package/dist/components/reui/badge.d.ts +2 -2
- package/dist/components/reui/color-picker.js +1 -1
- package/dist/components/reui/color-picker.js.map +1 -1
- package/dist/components/reui/file-type.d.ts +1 -1
- package/dist/components/reui/filters/filters-advanced.js.map +1 -1
- package/dist/components/reui/frame.d.ts +2 -2
- package/dist/components/reui/frame.js +1 -1
- package/dist/components/reui/frame.js.map +1 -1
- package/dist/components/reui/icon-tile.d.ts +2 -2
- package/dist/components/reui/number-field.d.ts +3 -3
- package/dist/components/reui/rating.d.ts +1 -1
- package/dist/components/ui/attachment.d.ts +3 -3
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/bubble.d.ts +1 -1
- package/dist/components/ui/button-group.d.ts +1 -1
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/calendar.js +1 -1
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/card.js +1 -1
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/combobox.js +2 -2
- package/dist/components/ui/combobox.js.map +1 -1
- package/dist/components/ui/field.d.ts +1 -1
- package/dist/components/ui/input-group.d.ts +2 -2
- package/dist/components/ui/item.d.ts +2 -2
- package/dist/components/ui/marker.d.ts +1 -1
- package/dist/components/ui/questionnaire.js +2 -2
- package/dist/components/ui/questionnaire.js.map +1 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/toggle-group.js +1 -1
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle.d.ts +1 -1
- package/dist/components/ui/trace.js +1 -1
- package/dist/components/ui/trace.js.map +1 -1
- package/dist/{constants-CggcOqef.js → constants-DfbfCDSg.js} +3 -6
- package/dist/constants-DfbfCDSg.js.map +1 -0
- package/dist/{context-BrGWrRwa.d.ts → context-4tt2I7Qm.d.ts} +14 -4
- package/dist/context-4tt2I7Qm.d.ts.map +1 -0
- package/dist/{context-DWHy9EUW.js → context-B3BNuwGu.js} +8 -25
- package/dist/context-B3BNuwGu.js.map +1 -0
- package/dist/{context-BEYROlTB.d.ts → context-BFNkGCGz.d.ts} +18 -14
- package/dist/context-BFNkGCGz.d.ts.map +1 -0
- package/dist/{context-r3QNWoPh.js → context-BG1Wzdnj.js} +6 -10
- package/dist/context-BG1Wzdnj.js.map +1 -0
- package/dist/{context-Dae38FV_.js → context-Bx-OaIL8.js} +5 -9
- package/dist/context-Bx-OaIL8.js.map +1 -0
- package/dist/context-C92iQeLO.js.map +1 -1
- package/dist/{context-CmexbpIK.js → context-C9LHO4MN.js} +12 -27
- package/dist/context-C9LHO4MN.js.map +1 -0
- package/dist/context-CHXHCbuu.js.map +1 -1
- package/dist/{context-C5DO1oe1.js → context-CIzAPhXA.js} +37 -99
- package/dist/context-CIzAPhXA.js.map +1 -0
- package/dist/{context-B5NItr9C.d.ts → context-CP3spicY.d.ts} +20 -15
- package/dist/context-CP3spicY.d.ts.map +1 -0
- package/dist/{context-CwSk1WZR.js → context-Cg1VelQJ.js} +9 -25
- package/dist/context-Cg1VelQJ.js.map +1 -0
- package/dist/{context-C1Z_5vew.d.ts → context-Cyjsttyl.d.ts} +15 -4
- package/dist/context-Cyjsttyl.d.ts.map +1 -0
- package/dist/{context-CgRa89Bq.d.ts → context-D7eAawR3.d.ts} +12 -7
- package/dist/context-D7eAawR3.d.ts.map +1 -0
- package/dist/{context-BpHX6J1T.js → context-DDoVOc0D.js} +8 -25
- package/dist/context-DDoVOc0D.js.map +1 -0
- package/dist/context-DR6jkfea.js +11 -0
- package/dist/context-DR6jkfea.js.map +1 -0
- package/dist/{context-BLjAwZ5V.js → context-DcJtX6ht.js} +18 -95
- package/dist/context-DcJtX6ht.js.map +1 -0
- package/dist/{context-Cr2SLhVi.js → context-Dg48xMuG.js} +3 -7
- package/dist/context-Dg48xMuG.js.map +1 -0
- package/dist/context-DnM-b9yO.js +23 -0
- package/dist/context-DnM-b9yO.js.map +1 -0
- package/dist/context-DtFeYksF.d.ts +28 -0
- package/dist/context-DtFeYksF.d.ts.map +1 -0
- package/dist/{context-C8M88I1F.js → context-cRAJSFxf.js} +4 -8
- package/dist/context-cRAJSFxf.js.map +1 -0
- package/dist/{copy-menu-BizTEv8v.js → copy-menu-Di77fZ9p.js} +6 -6
- package/dist/copy-menu-Di77fZ9p.js.map +1 -0
- package/dist/{crash-parts-Dg5WC8u4.js → crash-parts-BkrZ6iBE.js} +2 -2
- package/dist/crash-parts-BkrZ6iBE.js.map +1 -0
- package/dist/date-utils-DVDYcEA_.js +35 -0
- package/dist/date-utils-DVDYcEA_.js.map +1 -0
- package/dist/{ease-DnPhwGe6.d.ts → ease-D_-bhUDt.d.ts} +13 -6
- package/dist/ease-D_-bhUDt.d.ts.map +1 -0
- package/dist/formats-ColrL9Eg.js +58 -0
- package/dist/formats-ColrL9Eg.js.map +1 -0
- package/dist/{game-parts-hATtqY3s.d.ts → game-parts-B635BoSe.d.ts} +4 -4
- package/dist/{game-parts-hATtqY3s.d.ts.map → game-parts-B635BoSe.d.ts.map} +1 -1
- package/dist/hooks/use-controllable.d.ts +10 -0
- package/dist/hooks/use-controllable.d.ts.map +1 -0
- package/dist/hooks/use-controllable.js +39 -0
- package/dist/hooks/use-controllable.js.map +1 -0
- package/dist/hooks/use-copy.d.ts +16 -0
- package/dist/hooks/use-copy.d.ts.map +1 -0
- package/dist/hooks/use-copy.js +36 -0
- package/dist/hooks/use-copy.js.map +1 -0
- package/dist/hooks/use-dismiss.d.ts +25 -5
- package/dist/hooks/use-dismiss.d.ts.map +1 -1
- package/dist/hooks/use-dismiss.js +39 -24
- package/dist/hooks/use-dismiss.js.map +1 -1
- package/dist/hooks/use-focus-trap.d.ts +4 -3
- package/dist/hooks/use-focus-trap.d.ts.map +1 -1
- package/dist/hooks/use-focus-trap.js +25 -37
- package/dist/hooks/use-focus-trap.js.map +1 -1
- package/dist/hooks/use-highlighted-code.d.ts +1 -1
- package/dist/hooks/use-highlighted-code.d.ts.map +1 -1
- package/dist/hooks/use-hover-capable.d.ts +1 -1
- package/dist/hooks/use-hover-capable.js +1 -1
- package/dist/hooks/use-hover-capable.js.map +1 -1
- package/dist/hooks/use-hover-gesture.d.ts +5 -5
- package/dist/hooks/use-hover-gesture.js +5 -5
- package/dist/hooks/use-hover-gesture.js.map +1 -1
- package/dist/hooks/use-listbox.d.ts +1 -0
- package/dist/hooks/use-listbox.js +2 -1
- package/dist/hooks/use-listbox.js.map +1 -1
- package/dist/hooks/use-modal-scope.js +22 -26
- package/dist/hooks/use-modal-scope.js.map +1 -1
- package/dist/hooks/use-on-open.d.ts +3 -3
- package/dist/hooks/use-on-open.js +3 -3
- package/dist/hooks/use-on-open.js.map +1 -1
- package/dist/hooks/use-row-cursor.d.ts +2 -2
- package/dist/hooks/use-row-cursor.js +2 -2
- package/dist/hooks/use-row-cursor.js.map +1 -1
- package/dist/hooks/use-slider.d.ts +13 -3
- package/dist/hooks/use-slider.d.ts.map +1 -1
- package/dist/hooks/use-slider.js +23 -4
- package/dist/hooks/use-slider.js.map +1 -1
- package/dist/hooks/use-status-open.d.ts +26 -0
- package/dist/hooks/use-status-open.d.ts.map +1 -0
- package/dist/hooks/use-status-open.js +43 -0
- package/dist/hooks/use-status-open.js.map +1 -0
- package/dist/hooks/use-tap-gesture.d.ts +3 -3
- package/dist/hooks/use-tap-gesture.js +3 -3
- package/dist/hooks/use-tap-gesture.js.map +1 -1
- package/dist/lib/audio-context.d.ts +27 -1
- package/dist/lib/audio-context.d.ts.map +1 -1
- package/dist/lib/audio-context.js +61 -2
- package/dist/lib/audio-context.js.map +1 -1
- package/dist/lib/book-sounds.d.ts.map +1 -1
- package/dist/lib/book-sounds.js +8 -9
- package/dist/lib/book-sounds.js.map +1 -1
- package/dist/lib/color.d.ts +29 -0
- package/dist/lib/color.d.ts.map +1 -0
- package/dist/lib/color.js +93 -0
- package/dist/lib/color.js.map +1 -0
- package/dist/lib/command-search.d.ts +7 -1
- package/dist/lib/command-search.d.ts.map +1 -1
- package/dist/lib/command-search.js +42 -19
- package/dist/lib/command-search.js.map +1 -1
- package/dist/lib/ease.d.ts +2 -2
- package/dist/lib/ease.js +12 -5
- package/dist/lib/ease.js.map +1 -1
- package/dist/lib/focusable.d.ts +10 -0
- package/dist/lib/focusable.d.ts.map +1 -1
- package/dist/lib/focusable.js +31 -1
- package/dist/lib/focusable.js.map +1 -1
- package/dist/lib/game-sounds.d.ts.map +1 -1
- package/dist/lib/game-sounds.js +7 -14
- package/dist/lib/game-sounds.js.map +1 -1
- package/dist/lib/layers.d.ts +24 -0
- package/dist/lib/layers.d.ts.map +1 -0
- package/dist/lib/layers.js +47 -0
- package/dist/lib/layers.js.map +1 -0
- package/dist/lib/merge-refs.d.ts +6 -0
- package/dist/lib/merge-refs.d.ts.map +1 -0
- package/dist/lib/merge-refs.js +15 -0
- package/dist/lib/merge-refs.js.map +1 -0
- package/dist/lib/presence-gate.d.ts +2 -2
- package/dist/lib/presence-gate.js.map +1 -1
- package/dist/lib/scroll-lock.d.ts +13 -0
- package/dist/lib/scroll-lock.d.ts.map +1 -0
- package/dist/lib/scroll-lock.js +59 -0
- package/dist/lib/scroll-lock.js.map +1 -0
- package/dist/lib/sound.d.ts +30 -0
- package/dist/lib/sound.d.ts.map +1 -0
- package/dist/lib/sound.js +95 -0
- package/dist/lib/sound.js.map +1 -0
- package/dist/lib/sounds/bell.d.ts +4 -0
- package/dist/lib/sounds/bell.d.ts.map +1 -0
- package/dist/lib/sounds/bell.js +36 -0
- package/dist/lib/sounds/bell.js.map +1 -0
- package/dist/lib/sounds/bubble.d.ts +4 -0
- package/dist/lib/sounds/bubble.d.ts.map +1 -0
- package/dist/lib/sounds/bubble.js +27 -0
- package/dist/lib/sounds/bubble.js.map +1 -0
- package/dist/lib/sounds/burst.d.ts +4 -0
- package/dist/lib/sounds/burst.d.ts.map +1 -0
- package/dist/lib/sounds/burst.js +45 -0
- package/dist/lib/sounds/burst.js.map +1 -0
- package/dist/lib/sounds/buzz.d.ts +4 -0
- package/dist/lib/sounds/buzz.d.ts.map +1 -0
- package/dist/lib/sounds/buzz.js +26 -0
- package/dist/lib/sounds/buzz.js.map +1 -0
- package/dist/lib/sounds/camera.d.ts +4 -0
- package/dist/lib/sounds/camera.d.ts.map +1 -0
- package/dist/lib/sounds/camera.js +40 -0
- package/dist/lib/sounds/camera.js.map +1 -0
- package/dist/lib/sounds/check.d.ts +4 -0
- package/dist/lib/sounds/check.d.ts.map +1 -0
- package/dist/lib/sounds/check.js +40 -0
- package/dist/lib/sounds/check.js.map +1 -0
- package/dist/lib/sounds/chime.d.ts +4 -0
- package/dist/lib/sounds/chime.d.ts.map +1 -0
- package/dist/lib/sounds/chime.js +33 -0
- package/dist/lib/sounds/chime.js.map +1 -0
- package/dist/lib/sounds/close.d.ts +4 -0
- package/dist/lib/sounds/close.d.ts.map +1 -0
- package/dist/lib/sounds/close.js +36 -0
- package/dist/lib/sounds/close.js.map +1 -0
- package/dist/lib/sounds/coin.d.ts +4 -0
- package/dist/lib/sounds/coin.d.ts.map +1 -0
- package/dist/lib/sounds/coin.js +31 -0
- package/dist/lib/sounds/coin.js.map +1 -0
- package/dist/lib/sounds/collapse.d.ts +4 -0
- package/dist/lib/sounds/collapse.d.ts.map +1 -0
- package/dist/lib/sounds/collapse.js +41 -0
- package/dist/lib/sounds/collapse.js.map +1 -0
- package/dist/lib/sounds/connect.d.ts +4 -0
- package/dist/lib/sounds/connect.d.ts.map +1 -0
- package/dist/lib/sounds/connect.js +39 -0
- package/dist/lib/sounds/connect.js.map +1 -0
- package/dist/lib/sounds/copy.d.ts +4 -0
- package/dist/lib/sounds/copy.d.ts.map +1 -0
- package/dist/lib/sounds/copy.js +39 -0
- package/dist/lib/sounds/copy.js.map +1 -0
- package/dist/lib/sounds/delete.d.ts +4 -0
- package/dist/lib/sounds/delete.d.ts.map +1 -0
- package/dist/lib/sounds/delete.js +39 -0
- package/dist/lib/sounds/delete.js.map +1 -0
- package/dist/lib/sounds/disconnect.d.ts +4 -0
- package/dist/lib/sounds/disconnect.d.ts.map +1 -0
- package/dist/lib/sounds/disconnect.js +39 -0
- package/dist/lib/sounds/disconnect.js.map +1 -0
- package/dist/lib/sounds/dismiss.d.ts +4 -0
- package/dist/lib/sounds/dismiss.d.ts.map +1 -0
- package/dist/lib/sounds/dismiss.js +27 -0
- package/dist/lib/sounds/dismiss.js.map +1 -0
- package/dist/lib/sounds/dock.d.ts +4 -0
- package/dist/lib/sounds/dock.d.ts.map +1 -0
- package/dist/lib/sounds/dock.js +32 -0
- package/dist/lib/sounds/dock.js.map +1 -0
- package/dist/lib/sounds/drop.d.ts +4 -0
- package/dist/lib/sounds/drop.d.ts.map +1 -0
- package/dist/lib/sounds/drop.js +48 -0
- package/dist/lib/sounds/drop.js.map +1 -0
- package/dist/lib/sounds/engine.d.ts +142 -0
- package/dist/lib/sounds/engine.d.ts.map +1 -0
- package/dist/lib/sounds/engine.js +210 -0
- package/dist/lib/sounds/engine.js.map +1 -0
- package/dist/lib/sounds/error.d.ts +4 -0
- package/dist/lib/sounds/error.d.ts.map +1 -0
- package/dist/lib/sounds/error.js +51 -0
- package/dist/lib/sounds/error.js.map +1 -0
- package/dist/lib/sounds/expand.d.ts +4 -0
- package/dist/lib/sounds/expand.d.ts.map +1 -0
- package/dist/lib/sounds/expand.js +28 -0
- package/dist/lib/sounds/expand.js.map +1 -0
- package/dist/lib/sounds/heart.d.ts +4 -0
- package/dist/lib/sounds/heart.d.ts.map +1 -0
- package/dist/lib/sounds/heart.js +39 -0
- package/dist/lib/sounds/heart.js.map +1 -0
- package/dist/lib/sounds/lift.d.ts +4 -0
- package/dist/lib/sounds/lift.d.ts.map +1 -0
- package/dist/lib/sounds/lift.js +34 -0
- package/dist/lib/sounds/lift.js.map +1 -0
- package/dist/lib/sounds/lock.d.ts +4 -0
- package/dist/lib/sounds/lock.d.ts.map +1 -0
- package/dist/lib/sounds/lock.js +32 -0
- package/dist/lib/sounds/lock.js.map +1 -0
- package/dist/lib/sounds/navigate.d.ts +4 -0
- package/dist/lib/sounds/navigate.d.ts.map +1 -0
- package/dist/lib/sounds/navigate.js +36 -0
- package/dist/lib/sounds/navigate.js.map +1 -0
- package/dist/lib/sounds/notify.d.ts +4 -0
- package/dist/lib/sounds/notify.d.ts.map +1 -0
- package/dist/lib/sounds/notify.js +31 -0
- package/dist/lib/sounds/notify.js.map +1 -0
- package/dist/lib/sounds/open.d.ts +4 -0
- package/dist/lib/sounds/open.d.ts.map +1 -0
- package/dist/lib/sounds/open.js +36 -0
- package/dist/lib/sounds/open.js.map +1 -0
- package/dist/lib/sounds/ping.d.ts +4 -0
- package/dist/lib/sounds/ping.d.ts.map +1 -0
- package/dist/lib/sounds/ping.js +30 -0
- package/dist/lib/sounds/ping.js.map +1 -0
- package/dist/lib/sounds/pop.d.ts +4 -0
- package/dist/lib/sounds/pop.d.ts.map +1 -0
- package/dist/lib/sounds/pop.js +27 -0
- package/dist/lib/sounds/pop.js.map +1 -0
- package/dist/lib/sounds/press.d.ts +4 -0
- package/dist/lib/sounds/press.d.ts.map +1 -0
- package/dist/lib/sounds/press.js +40 -0
- package/dist/lib/sounds/press.js.map +1 -0
- package/dist/lib/sounds/receive.d.ts +4 -0
- package/dist/lib/sounds/receive.d.ts.map +1 -0
- package/dist/lib/sounds/receive.js +39 -0
- package/dist/lib/sounds/receive.js.map +1 -0
- package/dist/lib/sounds/refresh.d.ts +4 -0
- package/dist/lib/sounds/refresh.d.ts.map +1 -0
- package/dist/lib/sounds/refresh.js +34 -0
- package/dist/lib/sounds/refresh.js.map +1 -0
- package/dist/lib/sounds/reveal.d.ts +4 -0
- package/dist/lib/sounds/reveal.d.ts.map +1 -0
- package/dist/lib/sounds/reveal.js +34 -0
- package/dist/lib/sounds/reveal.js.map +1 -0
- package/dist/lib/sounds/select.d.ts +4 -0
- package/dist/lib/sounds/select.d.ts.map +1 -0
- package/dist/lib/sounds/select.js +32 -0
- package/dist/lib/sounds/select.js.map +1 -0
- package/dist/lib/sounds/send.d.ts +4 -0
- package/dist/lib/sounds/send.d.ts.map +1 -0
- package/dist/lib/sounds/send.js +35 -0
- package/dist/lib/sounds/send.js.map +1 -0
- package/dist/lib/sounds/shutter.d.ts +4 -0
- package/dist/lib/sounds/shutter.d.ts.map +1 -0
- package/dist/lib/sounds/shutter.js +40 -0
- package/dist/lib/sounds/shutter.js.map +1 -0
- package/dist/lib/sounds/snap.d.ts +4 -0
- package/dist/lib/sounds/snap.d.ts.map +1 -0
- package/dist/lib/sounds/snap.js +33 -0
- package/dist/lib/sounds/snap.js.map +1 -0
- package/dist/lib/sounds/star.d.ts +4 -0
- package/dist/lib/sounds/star.d.ts.map +1 -0
- package/dist/lib/sounds/star.js +38 -0
- package/dist/lib/sounds/star.js.map +1 -0
- package/dist/lib/sounds/success.d.ts +4 -0
- package/dist/lib/sounds/success.d.ts.map +1 -0
- package/dist/lib/sounds/success.js +39 -0
- package/dist/lib/sounds/success.js.map +1 -0
- package/dist/lib/sounds/swipe.d.ts +4 -0
- package/dist/lib/sounds/swipe.d.ts.map +1 -0
- package/dist/lib/sounds/swipe.js +29 -0
- package/dist/lib/sounds/swipe.js.map +1 -0
- package/dist/lib/sounds/switch.d.ts +4 -0
- package/dist/lib/sounds/switch.d.ts.map +1 -0
- package/dist/lib/sounds/switch.js +40 -0
- package/dist/lib/sounds/switch.js.map +1 -0
- package/dist/lib/sounds/tap.d.ts +4 -0
- package/dist/lib/sounds/tap.d.ts.map +1 -0
- package/dist/lib/sounds/tap.js +33 -0
- package/dist/lib/sounds/tap.js.map +1 -0
- package/dist/lib/sounds/tick.d.ts +4 -0
- package/dist/lib/sounds/tick.d.ts.map +1 -0
- package/dist/lib/sounds/tick.js +26 -0
- package/dist/lib/sounds/tick.js.map +1 -0
- package/dist/lib/sounds/timer.d.ts +4 -0
- package/dist/lib/sounds/timer.d.ts.map +1 -0
- package/dist/lib/sounds/timer.js +26 -0
- package/dist/lib/sounds/timer.js.map +1 -0
- package/dist/lib/sounds/toggle.d.ts +6 -0
- package/dist/lib/sounds/toggle.d.ts.map +1 -0
- package/dist/lib/sounds/toggle.js +79 -0
- package/dist/lib/sounds/toggle.js.map +1 -0
- package/dist/lib/sounds/trash.d.ts +4 -0
- package/dist/lib/sounds/trash.d.ts.map +1 -0
- package/dist/lib/sounds/trash.js +40 -0
- package/dist/lib/sounds/trash.js.map +1 -0
- package/dist/lib/sounds/type.d.ts +4 -0
- package/dist/lib/sounds/type.d.ts.map +1 -0
- package/dist/lib/sounds/type.js +35 -0
- package/dist/lib/sounds/type.js.map +1 -0
- package/dist/lib/sounds/unlock.d.ts +4 -0
- package/dist/lib/sounds/unlock.d.ts.map +1 -0
- package/dist/lib/sounds/unlock.js +41 -0
- package/dist/lib/sounds/unlock.js.map +1 -0
- package/dist/lib/sounds/warning.d.ts +4 -0
- package/dist/lib/sounds/warning.d.ts.map +1 -0
- package/dist/lib/sounds/warning.js +29 -0
- package/dist/lib/sounds/warning.js.map +1 -0
- package/dist/lib/sounds/whisper.d.ts +4 -0
- package/dist/lib/sounds/whisper.d.ts.map +1 -0
- package/dist/lib/sounds/whisper.js +27 -0
- package/dist/lib/sounds/whisper.js.map +1 -0
- package/dist/lib/text-shimmer.d.ts +6 -0
- package/dist/lib/text-shimmer.d.ts.map +1 -1
- package/dist/lib/text-shimmer.js +7 -1
- package/dist/lib/text-shimmer.js.map +1 -1
- package/dist/lib/tick-sound.d.ts.map +1 -1
- package/dist/lib/tick-sound.js +8 -11
- package/dist/lib/tick-sound.js.map +1 -1
- package/dist/lib/touch.d.ts +10 -10
- package/dist/lib/touch.js +10 -10
- package/dist/lib/touch.js.map +1 -1
- package/dist/listbox-panel-BX74YCzI.d.ts +31 -0
- package/dist/listbox-panel-BX74YCzI.d.ts.map +1 -0
- package/dist/menu-button-CbEYps6k.d.ts +29 -0
- package/dist/menu-button-CbEYps6k.d.ts.map +1 -0
- package/dist/menu-sub-button-NgS4JryG.d.ts +25 -0
- package/dist/menu-sub-button-NgS4JryG.d.ts.map +1 -0
- package/dist/messages-D0lxgjNm.d.ts +31 -0
- package/dist/messages-D0lxgjNm.d.ts.map +1 -0
- package/dist/{model-Cqi9KKo1.d.ts → model-CHHE1lHQ.d.ts} +5 -1
- package/dist/{model-Cqi9KKo1.d.ts.map → model-CHHE1lHQ.d.ts.map} +1 -1
- package/dist/{model-DP6FsG__.d.ts → model-D6sI_4m9.d.ts} +5 -1
- package/dist/model-D6sI_4m9.d.ts.map +1 -0
- package/dist/{model-B_LLKNOs.d.ts → model-DUQnYLRU.d.ts} +3 -1
- package/dist/model-DUQnYLRU.d.ts.map +1 -0
- package/dist/{model-Cbzktxjx.d.ts → model-Dafi-gx6.d.ts} +2 -1
- package/dist/model-Dafi-gx6.d.ts.map +1 -0
- package/dist/motion-1TeD2tw9.js +67 -0
- package/dist/motion-1TeD2tw9.js.map +1 -0
- package/dist/placement-BRE79jXm.d.ts +4 -0
- package/dist/placement-BRE79jXm.d.ts.map +1 -0
- package/dist/placement-Cg-Y5tLI.js +74 -0
- package/dist/placement-Cg-Y5tLI.js.map +1 -0
- package/dist/{plot-B2aPWHib.js → plot-CSTtMo6j.js} +3 -3
- package/dist/{plot-B2aPWHib.js.map → plot-CSTtMo6j.js.map} +1 -1
- package/dist/popover-morph-CWb4N9ux.d.ts +55 -0
- package/dist/popover-morph-CWb4N9ux.d.ts.map +1 -0
- package/dist/{positioner-DY1vB4rF.js → positioner-CFR4mJg6.js} +112 -4
- package/dist/positioner-CFR4mJg6.js.map +1 -0
- package/dist/resource-row-DByzjie0.js +290 -0
- package/dist/resource-row-DByzjie0.js.map +1 -0
- package/dist/root-C1n8-uIA.js +420 -0
- package/dist/root-C1n8-uIA.js.map +1 -0
- package/dist/{use-inspection-DWk6TdY9.js → scale-JwdKsMkj.js} +2 -55
- package/dist/scale-JwdKsMkj.js.map +1 -0
- package/dist/theme.css +98 -4
- package/dist/{tooltip-UI0lMGya.d.ts → tooltip-CoAbjn9I.d.ts} +9 -1
- package/dist/tooltip-CoAbjn9I.d.ts.map +1 -0
- package/dist/{tooltip-CJccRGy9.d.ts → tooltip-CwsBzl7m.d.ts} +12 -3
- package/dist/tooltip-CwsBzl7m.d.ts.map +1 -0
- package/dist/{tooltip-CMtIWcUY.d.ts → tooltip-DI79u-1V.d.ts} +11 -2
- package/dist/tooltip-DI79u-1V.d.ts.map +1 -0
- package/dist/{tooltip-jQICwV_k.d.ts → tooltip-DPci40hM.d.ts} +9 -1
- package/dist/tooltip-DPci40hM.d.ts.map +1 -0
- package/dist/{tooltip-DuPE_3Gi.d.ts → tooltip-TdY1OH4j.d.ts} +9 -2
- package/dist/tooltip-TdY1OH4j.d.ts.map +1 -0
- package/dist/{tooltip-BUkacvMl.js → tooltip-eecPhLtC.js} +106 -48
- package/dist/tooltip-eecPhLtC.js.map +1 -0
- package/dist/types-BhZ0FwDi.d.ts +33 -0
- package/dist/types-BhZ0FwDi.d.ts.map +1 -0
- package/dist/types-BnHpfLje.d.ts +111 -0
- package/dist/types-BnHpfLje.d.ts.map +1 -0
- package/dist/types-COoUai3R.d.ts +64 -0
- package/dist/types-COoUai3R.d.ts.map +1 -0
- package/dist/{types-DJ8z6gW8.d.ts → types-CbBZy33k.d.ts} +3 -1
- package/dist/{types-DJ8z6gW8.d.ts.map → types-CbBZy33k.d.ts.map} +1 -1
- package/dist/{types-C_v1N4fH.d.ts → types-ClKnPGuP.d.ts} +18 -4
- package/dist/types-ClKnPGuP.d.ts.map +1 -0
- package/dist/types-DPKILbI9.d.ts +37 -0
- package/dist/types-DPKILbI9.d.ts.map +1 -0
- package/dist/types-Dbiy485_.d.ts +114 -0
- package/dist/types-Dbiy485_.d.ts.map +1 -0
- package/dist/types-DtUnNprK.d.ts +53 -0
- package/dist/types-DtUnNprK.d.ts.map +1 -0
- package/dist/{use-crash-game-DiGujbfH.d.ts → use-crash-game-C6JPLvAH.d.ts} +5 -2
- package/dist/{use-crash-game-DiGujbfH.d.ts.map → use-crash-game-C6JPLvAH.d.ts.map} +1 -1
- package/dist/use-filtered-options-3TcVsHzV.js +167 -0
- package/dist/use-filtered-options-3TcVsHzV.js.map +1 -0
- package/dist/use-filtered-options-BbXqmJmZ.d.ts +14 -0
- package/dist/use-filtered-options-BbXqmJmZ.d.ts.map +1 -0
- package/dist/use-inspection-LoyxxJk8.js +31 -0
- package/dist/use-inspection-LoyxxJk8.js.map +1 -0
- package/dist/use-menu-navigation-B17_iK_B.js +57 -0
- package/dist/use-menu-navigation-B17_iK_B.js.map +1 -0
- package/dist/{use-position-B1lYvN8D.d.ts → use-position-ac-sSZRY.d.ts} +3 -1
- package/dist/use-position-ac-sSZRY.d.ts.map +1 -0
- package/dist/use-width-DZex74TT.js +45 -0
- package/dist/use-width-DZex74TT.js.map +1 -0
- package/dist/utils-f7_cAAwc.js +55 -0
- package/dist/utils-f7_cAAwc.js.map +1 -0
- package/package.json +23 -18
- package/dist/components/agents/agent-activity/index.d.ts.map +0 -1
- package/dist/components/agents/agent-activity/index.js.map +0 -1
- package/dist/components/agents/approval-card/index.d.ts.map +0 -1
- package/dist/components/agents/approval-card/index.js.map +0 -1
- package/dist/components/motion/animated-sidebar.js.map +0 -1
- package/dist/components/motion/animated-toast-stack.d.ts.map +0 -1
- package/dist/components/motion/animated-toast-stack.js.map +0 -1
- package/dist/components/motion/availability-scheduler/index.d.ts.map +0 -1
- package/dist/components/motion/availability-scheduler/index.js.map +0 -1
- package/dist/components/motion/button/index.js +0 -6
- package/dist/components/motion/popover-morph.d.ts.map +0 -1
- package/dist/components/motion/table/index.d.ts.map +0 -1
- package/dist/components/motion/table/index.js.map +0 -1
- package/dist/components/motion/wallet-card/index.d.ts.map +0 -1
- package/dist/components/motion/wallet-card/index.js.map +0 -1
- package/dist/constants-CggcOqef.js.map +0 -1
- package/dist/context-B5NItr9C.d.ts.map +0 -1
- package/dist/context-BEYROlTB.d.ts.map +0 -1
- package/dist/context-BLjAwZ5V.js.map +0 -1
- package/dist/context-BpHX6J1T.js.map +0 -1
- package/dist/context-BrGWrRwa.d.ts.map +0 -1
- package/dist/context-C1Z_5vew.d.ts.map +0 -1
- package/dist/context-C5DO1oe1.js.map +0 -1
- package/dist/context-C8M88I1F.js.map +0 -1
- package/dist/context-CgRa89Bq.d.ts.map +0 -1
- package/dist/context-CmexbpIK.js.map +0 -1
- package/dist/context-Cr2SLhVi.js.map +0 -1
- package/dist/context-CwSk1WZR.js.map +0 -1
- package/dist/context-DWHy9EUW.js.map +0 -1
- package/dist/context-Dae38FV_.js.map +0 -1
- package/dist/context-r3QNWoPh.js.map +0 -1
- package/dist/copy-menu-BizTEv8v.js.map +0 -1
- package/dist/crash-parts-Dg5WC8u4.js.map +0 -1
- package/dist/ease-DnPhwGe6.d.ts.map +0 -1
- package/dist/model-B_LLKNOs.d.ts.map +0 -1
- package/dist/model-Cbzktxjx.d.ts.map +0 -1
- package/dist/model-DP6FsG__.d.ts.map +0 -1
- package/dist/positioner-DY1vB4rF.js.map +0 -1
- package/dist/tooltip-BUkacvMl.js.map +0 -1
- package/dist/tooltip-CJccRGy9.d.ts.map +0 -1
- package/dist/tooltip-CMtIWcUY.d.ts.map +0 -1
- package/dist/tooltip-DuPE_3Gi.d.ts.map +0 -1
- package/dist/tooltip-UI0lMGya.d.ts.map +0 -1
- package/dist/tooltip-jQICwV_k.d.ts.map +0 -1
- package/dist/types-C1WFGMvf.d.ts +0 -34
- package/dist/types-C1WFGMvf.d.ts.map +0 -1
- package/dist/types-C_v1N4fH.d.ts.map +0 -1
- package/dist/types-DROZkngo.d.ts +0 -20
- package/dist/types-DROZkngo.d.ts.map +0 -1
- package/dist/use-active-option-DbxnIM2n.js +0 -85
- package/dist/use-active-option-DbxnIM2n.js.map +0 -1
- package/dist/use-inspection-DWk6TdY9.js.map +0 -1
- package/dist/use-position-B1lYvN8D.d.ts.map +0 -1
- package/dist/use-width-Dmy1eT1-.js +0 -23
- package/dist/use-width-Dmy1eT1-.js.map +0 -1
|
@@ -12,14 +12,14 @@ export interface HoverGesture {
|
|
|
12
12
|
/**
|
|
13
13
|
* Pairs a surface's enter with its leave, per pointer.
|
|
14
14
|
*
|
|
15
|
-
* `isHoveringPointer` answers the question the *enter* asks
|
|
16
|
-
* resting on the surface or pressing it
|
|
15
|
+
* `isHoveringPointer` answers the question the *enter* asks - is this pointer
|
|
16
|
+
* resting on the surface or pressing it - and both boundary cases go wrong if
|
|
17
17
|
* the leave is asked the same question again:
|
|
18
18
|
*
|
|
19
19
|
* - A pen with no hover never rests. It arrives in contact, taps, and the spec
|
|
20
20
|
* then requires its boundary events after `pointerup`, so the leave carries
|
|
21
21
|
* `buttons: 0` and reads as a mouse gliding off. Hover teardown then undid
|
|
22
|
-
* the tap
|
|
22
|
+
* the tap - the panel the pen had just opened closed under it.
|
|
23
23
|
* - A mouse pressed on the surface and dragged off leaves with `buttons: 1`.
|
|
24
24
|
* Skipping teardown there strands the surface open: the release happens
|
|
25
25
|
* outside, and no second leave ever comes.
|
|
@@ -27,8 +27,8 @@ export interface HoverGesture {
|
|
|
27
27
|
* So the state a hover holds is released by the pointer that took it, whatever
|
|
28
28
|
* the buttons say at the boundary, and a pointer that arrived in contact never
|
|
29
29
|
* took it in the first place. Contact is the exception tracked here, not
|
|
30
|
-
* hover: a leave from a pointer this surface never saw enter
|
|
31
|
-
* the cursor, say
|
|
30
|
+
* hover: a leave from a pointer this surface never saw enter - mounted under
|
|
31
|
+
* the cursor, say - still counts, since the alternative is state with no way
|
|
32
32
|
* out.
|
|
33
33
|
*/
|
|
34
34
|
export declare function useHoverGesture(): HoverGesture;
|
|
@@ -5,14 +5,14 @@ import { isHoveringPointer } from "../lib/touch.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* Pairs a surface's enter with its leave, per pointer.
|
|
7
7
|
*
|
|
8
|
-
* `isHoveringPointer` answers the question the *enter* asks
|
|
9
|
-
* resting on the surface or pressing it
|
|
8
|
+
* `isHoveringPointer` answers the question the *enter* asks - is this pointer
|
|
9
|
+
* resting on the surface or pressing it - and both boundary cases go wrong if
|
|
10
10
|
* the leave is asked the same question again:
|
|
11
11
|
*
|
|
12
12
|
* - A pen with no hover never rests. It arrives in contact, taps, and the spec
|
|
13
13
|
* then requires its boundary events after `pointerup`, so the leave carries
|
|
14
14
|
* `buttons: 0` and reads as a mouse gliding off. Hover teardown then undid
|
|
15
|
-
* the tap
|
|
15
|
+
* the tap - the panel the pen had just opened closed under it.
|
|
16
16
|
* - A mouse pressed on the surface and dragged off leaves with `buttons: 1`.
|
|
17
17
|
* Skipping teardown there strands the surface open: the release happens
|
|
18
18
|
* outside, and no second leave ever comes.
|
|
@@ -20,8 +20,8 @@ import { isHoveringPointer } from "../lib/touch.js";
|
|
|
20
20
|
* So the state a hover holds is released by the pointer that took it, whatever
|
|
21
21
|
* the buttons say at the boundary, and a pointer that arrived in contact never
|
|
22
22
|
* took it in the first place. Contact is the exception tracked here, not
|
|
23
|
-
* hover: a leave from a pointer this surface never saw enter
|
|
24
|
-
* the cursor, say
|
|
23
|
+
* hover: a leave from a pointer this surface never saw enter - mounted under
|
|
24
|
+
* the cursor, say - still counts, since the alternative is state with no way
|
|
25
25
|
* out.
|
|
26
26
|
*/
|
|
27
27
|
function useHoverGesture() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-hover-gesture.js","names":[],"sources":["../../src/hooks/use-hover-gesture.ts"],"sourcesContent":["\"use client\";\n\nimport { useMemo, useRef } from \"react\";\n\nimport { isHoveringPointer } from \"../lib/touch\";\n\ninterface BoundaryEvent {\n pointerId: number;\n pointerType: string;\n buttons: number;\n}\n\nexport interface HoverGesture {\n /** True when this enter starts a hover: the pointer arrived resting, not pressing. */\n enter: (event: BoundaryEvent) => boolean;\n /** True when this leave ends a hover that entered as one. */\n leave: (event: BoundaryEvent) => boolean;\n}\n\n/**\n * Pairs a surface's enter with its leave, per pointer.\n *\n * `isHoveringPointer` answers the question the *enter* asks
|
|
1
|
+
{"version":3,"file":"use-hover-gesture.js","names":[],"sources":["../../src/hooks/use-hover-gesture.ts"],"sourcesContent":["\"use client\";\n\nimport { useMemo, useRef } from \"react\";\n\nimport { isHoveringPointer } from \"../lib/touch\";\n\ninterface BoundaryEvent {\n pointerId: number;\n pointerType: string;\n buttons: number;\n}\n\nexport interface HoverGesture {\n /** True when this enter starts a hover: the pointer arrived resting, not pressing. */\n enter: (event: BoundaryEvent) => boolean;\n /** True when this leave ends a hover that entered as one. */\n leave: (event: BoundaryEvent) => boolean;\n}\n\n/**\n * Pairs a surface's enter with its leave, per pointer.\n *\n * `isHoveringPointer` answers the question the *enter* asks - is this pointer\n * resting on the surface or pressing it - and both boundary cases go wrong if\n * the leave is asked the same question again:\n *\n * - A pen with no hover never rests. It arrives in contact, taps, and the spec\n * then requires its boundary events after `pointerup`, so the leave carries\n * `buttons: 0` and reads as a mouse gliding off. Hover teardown then undid\n * the tap - the panel the pen had just opened closed under it.\n * - A mouse pressed on the surface and dragged off leaves with `buttons: 1`.\n * Skipping teardown there strands the surface open: the release happens\n * outside, and no second leave ever comes.\n *\n * So the state a hover holds is released by the pointer that took it, whatever\n * the buttons say at the boundary, and a pointer that arrived in contact never\n * took it in the first place. Contact is the exception tracked here, not\n * hover: a leave from a pointer this surface never saw enter - mounted under\n * the cursor, say - still counts, since the alternative is state with no way\n * out.\n */\nexport function useHoverGesture(): HoverGesture {\n const contact = useRef(new Set<number>());\n\n return useMemo(\n () => ({\n enter: (event) => {\n if (isHoveringPointer(event)) {\n contact.current.delete(event.pointerId);\n return true;\n }\n contact.current.add(event.pointerId);\n return false;\n },\n leave: (event) => {\n const arrivedInContact = contact.current.delete(event.pointerId);\n return !arrivedInContact && event.pointerType !== \"touch\";\n },\n }),\n [],\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,SAAgB,kBAAgC;CAC9C,MAAM,UAAU,uBAAO,IAAI,IAAY,CAAC;CAExC,OAAO,eACE;EACL,QAAQ,UAAU;GAChB,IAAI,kBAAkB,KAAK,GAAG;IAC5B,QAAQ,QAAQ,OAAO,MAAM,SAAS;IACtC,OAAO;GACT;GACA,QAAQ,QAAQ,IAAI,MAAM,SAAS;GACnC,OAAO;EACT;EACA,QAAQ,UAAU;GAEhB,OAAO,CADkB,QAAQ,QAAQ,OAAO,MAAM,SAC/B,KAAK,MAAM,gBAAgB;EACpD;CACF,IACA,CAAC,CACH;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-listbox.js","names":[],"sources":["../../src/hooks/use-listbox.ts"],"sourcesContent":["\"use client\";\n\nimport { type KeyboardEvent, type RefObject, useEffect, useMemo, useRef } from \"react\";\n\nimport { useOnOpen } from \"./use-on-open\";\nimport { useRowCursor } from \"./use-row-cursor\";\n\nexport interface ListboxRow {\n id: string;\n label: string;\n disabled?: boolean;\n}\n\n// How long typed characters keep building one typeahead query.\nconst TYPEAHEAD_MS = 500;\n\n/**\n * Keyboard model for a popup listbox whose options are focusable buttons.\n *\n * The active option is resolved during render through `useRowCursor`, so the\n * roving `tabIndex` and the next key press always agree with what is on\n * screen. Opening starts on the selected option, or the first enabled one.\n * Arrow keys, Home and End move between enabled options, and printable\n * characters jump to the next option whose label starts with what was typed.\n * DOM focus follows the active option while the list is open; each option\n * carries its id in `data-listbox-id` so the list can find it.\n */\nexport function useListbox({\n open,\n rows,\n selected,\n list,\n}: {\n open: boolean;\n rows: readonly ListboxRow[];\n selected: string | undefined;\n list: RefObject<HTMLElement | null>;\n}) {\n const enabled = useMemo(() => rows.filter((row) => !row.disabled), [rows]);\n const { activeIndex, moveTo, moveActive } = useRowCursor(enabled, \"\");\n useOnOpen(open, () =>\n moveTo(enabled.some((row) => row.id === selected) ? (selected ?? null) : null),\n );\n const activeId = enabled[activeIndex]?.id;\n const typed = useRef({ text: \"\", at: 0 });\n // A list rendered open does not take focus from the page on mount; focus\n // follows only once it has been opened, or once focus is already inside.\n const openedOnMount = useRef(open);\n useEffect(() => {\n if (!open) openedOnMount.current = false;\n }, [open]);\n\n useEffect(() => {\n if (!open || activeId === undefined) return;\n if (openedOnMount.current && !list.current?.contains(document.activeElement)) return;\n const option = Array.from(\n list.current?.querySelectorAll<HTMLElement>(\"[data-listbox-id]\") ?? [],\n ).find((element) => element.dataset.listboxId === activeId);\n option?.focus({ preventScroll: false });\n }, [open, activeId, list]);\n\n const onKeyDown = (event: KeyboardEvent) => {\n const { key } = event;\n if (key === \"ArrowDown\" || key === \"ArrowUp\") {\n event.preventDefault();\n moveActive(key === \"ArrowDown\" ? 1 : -1);\n } else if (key === \"Home\" || key === \"End\") {\n event.preventDefault();\n const row = key === \"Home\" ? enabled[0] : enabled[enabled.length - 1];\n if (row) moveTo(row.id);\n } else if (\n key.length === 1 &&\n key !== \" \" &&\n !event.ctrlKey &&\n !event.metaKey &&\n !event.altKey\n ) {\n const now = Date.now();\n const char = key.toLowerCase();\n const text = now - typed.current.at < TYPEAHEAD_MS ? typed.current.text + char : char;\n typed.current = { text, at: now };\n // A repeated single letter cycles through the options that start with it.\n const from = text.length === 1 ? activeIndex + 1 : activeIndex;\n for (let step = 0; step < enabled.length; step++) {\n const row = enabled[(from + step) % enabled.length];\n if (row.label.toLowerCase().startsWith(text)) {\n moveTo(row.id);\n break;\n }\n }\n }\n };\n\n return { activeId, onKeyDown };\n}\n"],"mappings":";;;;;AAcA,MAAM,eAAe;;;;;;;;;;;;AAarB,SAAgB,WAAW,EACzB,MACA,MACA,UACA,QAMC;CACD,MAAM,UAAU,cAAc,KAAK,QAAQ,QAAQ,CAAC,IAAI,QAAQ,GAAG,CAAC,IAAI,CAAC;CACzE,MAAM,EAAE,aAAa,QAAQ,eAAe,aAAa,SAAS,EAAE;CACpE,UAAU,YACR,OAAO,QAAQ,MAAM,QAAQ,IAAI,OAAO,QAAQ,IAAK,YAAY,OAAQ,IAAI,CAC/E;CACA,MAAM,WAAW,QAAQ,YAAY,EAAE;CACvC,MAAM,QAAQ,OAAO;EAAE,MAAM;EAAI,IAAI;CAAE,CAAC;CAGxC,MAAM,gBAAgB,OAAO,IAAI;CACjC,gBAAgB;EACd,IAAI,CAAC,MAAM,cAAc,UAAU;CACrC,GAAG,CAAC,IAAI,CAAC;CAET,gBAAgB;EACd,IAAI,CAAC,QAAQ,aAAa,KAAA,GAAW;EACrC,IAAI,cAAc,WAAW,CAAC,KAAK,SAAS,SAAS,SAAS,aAAa,GAAG;EAC/D,MAAM,KACnB,KAAK,SAAS,iBAA8B,mBAAmB,KAAK,CAAC,CACvE,CAAC,CAAC,MAAM,YAAY,QAAQ,QAAQ,cAAc,QAC7C,CAAC,EAAE,MAAM,EAAE,eAAe,MAAM,CAAC;CACxC,GAAG;EAAC;EAAM;EAAU;CAAI,CAAC;CAEzB,MAAM,aAAa,UAAyB;EAC1C,MAAM,EAAE,QAAQ;EAChB,IAAI,QAAQ,eAAe,QAAQ,WAAW;GAC5C,MAAM,eAAe;GACrB,WAAW,QAAQ,cAAc,IAAI,EAAE;EACzC,OAAO,IAAI,QAAQ,UAAU,QAAQ,OAAO;GAC1C,MAAM,eAAe;GACrB,MAAM,MAAM,QAAQ,SAAS,QAAQ,KAAK,QAAQ,QAAQ,SAAS;GACnE,IAAI,KAAK,OAAO,IAAI,EAAE;EACxB,OAAO,IACL,IAAI,WAAW,KACf,QAAQ,OACR,CAAC,MAAM,WACP,CAAC,MAAM,WACP,CAAC,MAAM,QACP;GACA,MAAM,MAAM,KAAK,IAAI;GACrB,MAAM,OAAO,IAAI,YAAY;GAC7B,MAAM,OAAO,MAAM,MAAM,QAAQ,KAAK,eAAe,MAAM,QAAQ,OAAO,OAAO;GACjF,MAAM,UAAU;IAAE;IAAM,IAAI;GAAI;GAEhC,MAAM,OAAO,KAAK,WAAW,IAAI,cAAc,IAAI;GACnD,KAAK,IAAI,OAAO,GAAG,OAAO,QAAQ,QAAQ,QAAQ;IAChD,MAAM,MAAM,SAAS,OAAO,QAAQ,QAAQ;IAC5C,IAAI,IAAI,MAAM,YAAY,CAAC,CAAC,WAAW,IAAI,GAAG;KAC5C,OAAO,IAAI,EAAE;KACb;IACF;GACF;EACF;CACF;
|
|
1
|
+
{"version":3,"file":"use-listbox.js","names":[],"sources":["../../src/hooks/use-listbox.ts"],"sourcesContent":["\"use client\";\n\nimport { type KeyboardEvent, type RefObject, useEffect, useMemo, useRef } from \"react\";\n\nimport { useOnOpen } from \"./use-on-open\";\nimport { useRowCursor } from \"./use-row-cursor\";\n\nexport interface ListboxRow {\n id: string;\n label: string;\n disabled?: boolean;\n}\n\n// How long typed characters keep building one typeahead query.\nconst TYPEAHEAD_MS = 500;\n\n/**\n * Keyboard model for a popup listbox whose options are focusable buttons.\n *\n * The active option is resolved during render through `useRowCursor`, so the\n * roving `tabIndex` and the next key press always agree with what is on\n * screen. Opening starts on the selected option, or the first enabled one.\n * Arrow keys, Home and End move between enabled options, and printable\n * characters jump to the next option whose label starts with what was typed.\n * DOM focus follows the active option while the list is open; each option\n * carries its id in `data-listbox-id` so the list can find it.\n */\nexport function useListbox({\n open,\n rows,\n selected,\n list,\n}: {\n open: boolean;\n rows: readonly ListboxRow[];\n selected: string | undefined;\n list: RefObject<HTMLElement | null>;\n}) {\n const enabled = useMemo(() => rows.filter((row) => !row.disabled), [rows]);\n const { activeIndex, moveTo, moveActive } = useRowCursor(enabled, \"\");\n useOnOpen(open, () =>\n moveTo(enabled.some((row) => row.id === selected) ? (selected ?? null) : null),\n );\n const activeId = enabled[activeIndex]?.id;\n const typed = useRef({ text: \"\", at: 0 });\n // A list rendered open does not take focus from the page on mount; focus\n // follows only once it has been opened, or once focus is already inside.\n const openedOnMount = useRef(open);\n useEffect(() => {\n if (!open) openedOnMount.current = false;\n }, [open]);\n\n useEffect(() => {\n if (!open || activeId === undefined) return;\n if (openedOnMount.current && !list.current?.contains(document.activeElement)) return;\n const option = Array.from(\n list.current?.querySelectorAll<HTMLElement>(\"[data-listbox-id]\") ?? [],\n ).find((element) => element.dataset.listboxId === activeId);\n option?.focus({ preventScroll: false });\n }, [open, activeId, list]);\n\n const onKeyDown = (event: KeyboardEvent) => {\n const { key } = event;\n if (key === \"ArrowDown\" || key === \"ArrowUp\") {\n event.preventDefault();\n moveActive(key === \"ArrowDown\" ? 1 : -1);\n } else if (key === \"Home\" || key === \"End\") {\n event.preventDefault();\n const row = key === \"Home\" ? enabled[0] : enabled[enabled.length - 1];\n if (row) moveTo(row.id);\n } else if (\n key.length === 1 &&\n key !== \" \" &&\n !event.ctrlKey &&\n !event.metaKey &&\n !event.altKey\n ) {\n const now = Date.now();\n const char = key.toLowerCase();\n const text = now - typed.current.at < TYPEAHEAD_MS ? typed.current.text + char : char;\n typed.current = { text, at: now };\n // A repeated single letter cycles through the options that start with it.\n const from = text.length === 1 ? activeIndex + 1 : activeIndex;\n for (let step = 0; step < enabled.length; step++) {\n const row = enabled[(from + step) % enabled.length];\n if (row.label.toLowerCase().startsWith(text)) {\n moveTo(row.id);\n break;\n }\n }\n }\n };\n\n // `moveTo` lets a pointer resting on an option make it the active one, so a\n // highlight drawn from `activeId` follows the mouse as well as the keys.\n return { activeId, onKeyDown, moveTo };\n}\n"],"mappings":";;;;;AAcA,MAAM,eAAe;;;;;;;;;;;;AAarB,SAAgB,WAAW,EACzB,MACA,MACA,UACA,QAMC;CACD,MAAM,UAAU,cAAc,KAAK,QAAQ,QAAQ,CAAC,IAAI,QAAQ,GAAG,CAAC,IAAI,CAAC;CACzE,MAAM,EAAE,aAAa,QAAQ,eAAe,aAAa,SAAS,EAAE;CACpE,UAAU,YACR,OAAO,QAAQ,MAAM,QAAQ,IAAI,OAAO,QAAQ,IAAK,YAAY,OAAQ,IAAI,CAC/E;CACA,MAAM,WAAW,QAAQ,YAAY,EAAE;CACvC,MAAM,QAAQ,OAAO;EAAE,MAAM;EAAI,IAAI;CAAE,CAAC;CAGxC,MAAM,gBAAgB,OAAO,IAAI;CACjC,gBAAgB;EACd,IAAI,CAAC,MAAM,cAAc,UAAU;CACrC,GAAG,CAAC,IAAI,CAAC;CAET,gBAAgB;EACd,IAAI,CAAC,QAAQ,aAAa,KAAA,GAAW;EACrC,IAAI,cAAc,WAAW,CAAC,KAAK,SAAS,SAAS,SAAS,aAAa,GAAG;EAC/D,MAAM,KACnB,KAAK,SAAS,iBAA8B,mBAAmB,KAAK,CAAC,CACvE,CAAC,CAAC,MAAM,YAAY,QAAQ,QAAQ,cAAc,QAC7C,CAAC,EAAE,MAAM,EAAE,eAAe,MAAM,CAAC;CACxC,GAAG;EAAC;EAAM;EAAU;CAAI,CAAC;CAEzB,MAAM,aAAa,UAAyB;EAC1C,MAAM,EAAE,QAAQ;EAChB,IAAI,QAAQ,eAAe,QAAQ,WAAW;GAC5C,MAAM,eAAe;GACrB,WAAW,QAAQ,cAAc,IAAI,EAAE;EACzC,OAAO,IAAI,QAAQ,UAAU,QAAQ,OAAO;GAC1C,MAAM,eAAe;GACrB,MAAM,MAAM,QAAQ,SAAS,QAAQ,KAAK,QAAQ,QAAQ,SAAS;GACnE,IAAI,KAAK,OAAO,IAAI,EAAE;EACxB,OAAO,IACL,IAAI,WAAW,KACf,QAAQ,OACR,CAAC,MAAM,WACP,CAAC,MAAM,WACP,CAAC,MAAM,QACP;GACA,MAAM,MAAM,KAAK,IAAI;GACrB,MAAM,OAAO,IAAI,YAAY;GAC7B,MAAM,OAAO,MAAM,MAAM,QAAQ,KAAK,eAAe,MAAM,QAAQ,OAAO,OAAO;GACjF,MAAM,UAAU;IAAE;IAAM,IAAI;GAAI;GAEhC,MAAM,OAAO,KAAK,WAAW,IAAI,cAAc,IAAI;GACnD,KAAK,IAAI,OAAO,GAAG,OAAO,QAAQ,QAAQ,QAAQ;IAChD,MAAM,MAAM,SAAS,OAAO,QAAQ,QAAQ;IAC5C,IAAI,IAAI,MAAM,YAAY,CAAC,CAAC,WAAW,IAAI,GAAG;KAC5C,OAAO,IAAI,EAAE;KACb;IACF;GACF;EACF;CACF;CAIA,OAAO;EAAE;EAAU;EAAW;CAAO;AACvC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useEffect, useLayoutEffect, useRef } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { cycleTab, focusFirstIn } from "../lib/focusable.js";
|
|
4
|
+
import { inLayerAbove, openLayer, ownsEscape, trapAbove } from "../lib/layers.js";
|
|
5
|
+
import { lockScroll } from "../lib/scroll-lock.js";
|
|
4
6
|
// src/hooks/use-modal-scope.ts
|
|
5
7
|
const inertOwners = /* @__PURE__ */ new Map();
|
|
6
|
-
let scrollOwners = 0;
|
|
7
|
-
let previousOverflow = "";
|
|
8
8
|
/** A portal root owns sibling inertness and scroll locking until its open state ends. */
|
|
9
9
|
function useModalScope(open, root, panel, onClose) {
|
|
10
10
|
const close = useRef(onClose);
|
|
@@ -24,43 +24,39 @@ function useModalScope(open, root, panel, onClose) {
|
|
|
24
24
|
inertOwners.set(element, owner);
|
|
25
25
|
element.inert = true;
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
|
|
27
|
+
const unlockScroll = lockScroll();
|
|
28
|
+
const layer = {
|
|
29
|
+
contains: (target) => Boolean(root.current?.contains(target)),
|
|
30
|
+
traps: true
|
|
31
|
+
};
|
|
32
|
+
const closeLayer = openLayer(layer);
|
|
33
|
+
focusFirstIn(panel.current);
|
|
34
34
|
const onFocus = (event) => {
|
|
35
|
-
|
|
35
|
+
const target = event.target;
|
|
36
|
+
if (!(target instanceof Node) || root.current?.inert) return;
|
|
37
|
+
if (panel.current?.contains(target)) return;
|
|
38
|
+
if (inLayerAbove(layer, target) || trapAbove(layer)) return;
|
|
39
|
+
focusFirstIn(panel.current);
|
|
36
40
|
};
|
|
37
41
|
const onKey = (event) => {
|
|
38
42
|
if (root.current?.inert) return;
|
|
39
43
|
if (event.key === "Escape") {
|
|
44
|
+
if (!ownsEscape(layer, event)) return;
|
|
40
45
|
event.preventDefault();
|
|
41
46
|
event.stopPropagation();
|
|
42
47
|
close.current();
|
|
48
|
+
return;
|
|
43
49
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const last = elements[elements.length - 1];
|
|
48
|
-
if (!first || !last) {
|
|
49
|
-
event.preventDefault();
|
|
50
|
-
panel.current?.focus();
|
|
51
|
-
} else if (event.shiftKey && document.activeElement === first) {
|
|
52
|
-
event.preventDefault();
|
|
53
|
-
last.focus();
|
|
54
|
-
} else if (!event.shiftKey && document.activeElement === last) {
|
|
55
|
-
event.preventDefault();
|
|
56
|
-
first.focus();
|
|
57
|
-
}
|
|
50
|
+
const active = document.activeElement;
|
|
51
|
+
if (event.defaultPrevented || active && inLayerAbove(layer, active)) return;
|
|
52
|
+
cycleTab(event, panel.current);
|
|
58
53
|
};
|
|
59
54
|
document.addEventListener("focusin", onFocus);
|
|
60
55
|
document.addEventListener("keydown", onKey);
|
|
61
56
|
return () => {
|
|
62
57
|
document.removeEventListener("focusin", onFocus);
|
|
63
58
|
document.removeEventListener("keydown", onKey);
|
|
59
|
+
closeLayer();
|
|
64
60
|
for (const element of siblings) {
|
|
65
61
|
const owner = inertOwners.get(element);
|
|
66
62
|
if (owner && --owner.count === 0) {
|
|
@@ -68,7 +64,7 @@ function useModalScope(open, root, panel, onClose) {
|
|
|
68
64
|
inertOwners.delete(element);
|
|
69
65
|
}
|
|
70
66
|
}
|
|
71
|
-
|
|
67
|
+
unlockScroll();
|
|
72
68
|
if (returnFocus?.isConnected && !returnFocus.closest("[inert]")) returnFocus.focus({ preventScroll: true });
|
|
73
69
|
};
|
|
74
70
|
}, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-modal-scope.js","names":[],"sources":["../../src/hooks/use-modal-scope.ts"],"sourcesContent":["\"use client\";\n\nimport { type RefObject, useEffect, useLayoutEffect, useRef } from \"react\";\n\nimport {
|
|
1
|
+
{"version":3,"file":"use-modal-scope.js","names":[],"sources":["../../src/hooks/use-modal-scope.ts"],"sourcesContent":["\"use client\";\n\nimport { type RefObject, useEffect, useLayoutEffect, useRef } from \"react\";\n\nimport { cycleTab, focusFirstIn } from \"../lib/focusable\";\nimport { inLayerAbove, type Layer, openLayer, ownsEscape, trapAbove } from \"../lib/layers\";\nimport { lockScroll } from \"../lib/scroll-lock\";\n\nconst inertOwners = new Map<HTMLElement, { count: number; previous: boolean }>();\n\n/** A portal root owns sibling inertness and scroll locking until its open state ends. */\nexport function useModalScope(\n open: boolean,\n root: RefObject<HTMLElement | null>,\n panel: RefObject<HTMLElement | null>,\n onClose: () => void,\n) {\n const close = useRef(onClose);\n useLayoutEffect(() => {\n close.current = onClose;\n });\n useEffect(() => {\n if (!open || !root.current || !panel.current) return;\n const returnFocus =\n document.activeElement instanceof HTMLElement ? document.activeElement : null;\n const siblings = Array.from(document.body.children).filter(\n (element): element is HTMLElement =>\n element instanceof HTMLElement && element !== root.current,\n );\n for (const element of siblings) {\n const owner = inertOwners.get(element) ?? {\n count: 0,\n previous: element.inert,\n };\n owner.count += 1;\n inertOwners.set(element, owner);\n element.inert = true;\n }\n const unlockScroll = lockScroll();\n const layer: Layer = {\n contains: (target) => Boolean(root.current?.contains(target)),\n traps: true,\n };\n const closeLayer = openLayer(layer);\n focusFirstIn(panel.current);\n const onFocus = (event: FocusEvent) => {\n const target = event.target;\n if (!(target instanceof Node) || root.current?.inert) return;\n if (panel.current?.contains(target)) return;\n if (inLayerAbove(layer, target) || trapAbove(layer)) return;\n focusFirstIn(panel.current);\n };\n const onKey = (event: KeyboardEvent) => {\n if (root.current?.inert) return;\n if (event.key === \"Escape\") {\n if (!ownsEscape(layer, event)) return;\n event.preventDefault();\n event.stopPropagation();\n close.current();\n return;\n }\n const active = document.activeElement;\n if (event.defaultPrevented || (active && inLayerAbove(layer, active))) return;\n cycleTab(event, panel.current);\n };\n document.addEventListener(\"focusin\", onFocus);\n document.addEventListener(\"keydown\", onKey);\n return () => {\n document.removeEventListener(\"focusin\", onFocus);\n document.removeEventListener(\"keydown\", onKey);\n closeLayer();\n for (const element of siblings) {\n const owner = inertOwners.get(element);\n if (owner && --owner.count === 0) {\n element.inert = owner.previous;\n inertOwners.delete(element);\n }\n }\n unlockScroll();\n if (returnFocus?.isConnected && !returnFocus.closest(\"[inert]\"))\n returnFocus.focus({ preventScroll: true });\n };\n }, [open, root, panel]);\n}\n"],"mappings":";;;;;;AAQA,MAAM,8BAAc,IAAI,IAAuD;;AAG/E,SAAgB,cACd,MACA,MACA,OACA,SACA;CACA,MAAM,QAAQ,OAAO,OAAO;CAC5B,sBAAsB;EACpB,MAAM,UAAU;CAClB,CAAC;CACD,gBAAgB;EACd,IAAI,CAAC,QAAQ,CAAC,KAAK,WAAW,CAAC,MAAM,SAAS;EAC9C,MAAM,cACJ,SAAS,yBAAyB,cAAc,SAAS,gBAAgB;EAC3E,MAAM,WAAW,MAAM,KAAK,SAAS,KAAK,QAAQ,CAAC,CAAC,QACjD,YACC,mBAAmB,eAAe,YAAY,KAAK,OACvD;EACA,KAAK,MAAM,WAAW,UAAU;GAC9B,MAAM,QAAQ,YAAY,IAAI,OAAO,KAAK;IACxC,OAAO;IACP,UAAU,QAAQ;GACpB;GACA,MAAM,SAAS;GACf,YAAY,IAAI,SAAS,KAAK;GAC9B,QAAQ,QAAQ;EAClB;EACA,MAAM,eAAe,WAAW;EAChC,MAAM,QAAe;GACnB,WAAW,WAAW,QAAQ,KAAK,SAAS,SAAS,MAAM,CAAC;GAC5D,OAAO;EACT;EACA,MAAM,aAAa,UAAU,KAAK;EAClC,aAAa,MAAM,OAAO;EAC1B,MAAM,WAAW,UAAsB;GACrC,MAAM,SAAS,MAAM;GACrB,IAAI,EAAE,kBAAkB,SAAS,KAAK,SAAS,OAAO;GACtD,IAAI,MAAM,SAAS,SAAS,MAAM,GAAG;GACrC,IAAI,aAAa,OAAO,MAAM,KAAK,UAAU,KAAK,GAAG;GACrD,aAAa,MAAM,OAAO;EAC5B;EACA,MAAM,SAAS,UAAyB;GACtC,IAAI,KAAK,SAAS,OAAO;GACzB,IAAI,MAAM,QAAQ,UAAU;IAC1B,IAAI,CAAC,WAAW,OAAO,KAAK,GAAG;IAC/B,MAAM,eAAe;IACrB,MAAM,gBAAgB;IACtB,MAAM,QAAQ;IACd;GACF;GACA,MAAM,SAAS,SAAS;GACxB,IAAI,MAAM,oBAAqB,UAAU,aAAa,OAAO,MAAM,GAAI;GACvE,SAAS,OAAO,MAAM,OAAO;EAC/B;EACA,SAAS,iBAAiB,WAAW,OAAO;EAC5C,SAAS,iBAAiB,WAAW,KAAK;EAC1C,aAAa;GACX,SAAS,oBAAoB,WAAW,OAAO;GAC/C,SAAS,oBAAoB,WAAW,KAAK;GAC7C,WAAW;GACX,KAAK,MAAM,WAAW,UAAU;IAC9B,MAAM,QAAQ,YAAY,IAAI,OAAO;IACrC,IAAI,SAAS,EAAE,MAAM,UAAU,GAAG;KAChC,QAAQ,QAAQ,MAAM;KACtB,YAAY,OAAO,OAAO;IAC5B;GACF;GACA,aAAa;GACb,IAAI,aAAa,eAAe,CAAC,YAAY,QAAQ,SAAS,GAC5D,YAAY,MAAM,EAAE,eAAe,KAAK,CAAC;EAC7C;CACF,GAAG;EAAC;EAAM;EAAM;CAAK,CAAC;AACxB"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Runs `start` during the render in which `open` becomes true.
|
|
3
3
|
*
|
|
4
|
-
* Opening a list starts a fresh session
|
|
5
|
-
* the top
|
|
4
|
+
* Opening a list starts a fresh session - an empty query, the highlight back at
|
|
5
|
+
* the top - and that is a resolution, not a side effect: a passive effect runs
|
|
6
6
|
* after the commit, so the new session would carry the last one's state for a
|
|
7
7
|
* window in which a key press can land.
|
|
8
8
|
*
|
|
9
9
|
* `start` may only set state belonging to the calling component. Anything that
|
|
10
|
-
* reaches outside it
|
|
10
|
+
* reaches outside it - a consumer's callback, a DOM write, moving focus - is a
|
|
11
11
|
* side effect, and React rejects a callback that sets another component's state
|
|
12
12
|
* during this one's render. Put those in an effect keyed to `open`.
|
|
13
13
|
*/
|
|
@@ -4,13 +4,13 @@ import { useState } from "react";
|
|
|
4
4
|
/**
|
|
5
5
|
* Runs `start` during the render in which `open` becomes true.
|
|
6
6
|
*
|
|
7
|
-
* Opening a list starts a fresh session
|
|
8
|
-
* the top
|
|
7
|
+
* Opening a list starts a fresh session - an empty query, the highlight back at
|
|
8
|
+
* the top - and that is a resolution, not a side effect: a passive effect runs
|
|
9
9
|
* after the commit, so the new session would carry the last one's state for a
|
|
10
10
|
* window in which a key press can land.
|
|
11
11
|
*
|
|
12
12
|
* `start` may only set state belonging to the calling component. Anything that
|
|
13
|
-
* reaches outside it
|
|
13
|
+
* reaches outside it - a consumer's callback, a DOM write, moving focus - is a
|
|
14
14
|
* side effect, and React rejects a callback that sets another component's state
|
|
15
15
|
* during this one's render. Put those in an effect keyed to `open`.
|
|
16
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-on-open.js","names":[],"sources":["../../src/hooks/use-on-open.ts"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\n\n/**\n * Runs `start` during the render in which `open` becomes true.\n *\n * Opening a list starts a fresh session
|
|
1
|
+
{"version":3,"file":"use-on-open.js","names":[],"sources":["../../src/hooks/use-on-open.ts"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\n\n/**\n * Runs `start` during the render in which `open` becomes true.\n *\n * Opening a list starts a fresh session - an empty query, the highlight back at\n * the top - and that is a resolution, not a side effect: a passive effect runs\n * after the commit, so the new session would carry the last one's state for a\n * window in which a key press can land.\n *\n * `start` may only set state belonging to the calling component. Anything that\n * reaches outside it - a consumer's callback, a DOM write, moving focus - is a\n * side effect, and React rejects a callback that sets another component's state\n * during this one's render. Put those in an effect keyed to `open`.\n */\nexport function useOnOpen(open: boolean, start: () => void) {\n const [wasOpen, setWasOpen] = useState(open);\n if (open !== wasOpen) {\n setWasOpen(open);\n if (open) start();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAiBA,SAAgB,UAAU,MAAe,OAAmB;CAC1D,MAAM,CAAC,SAAS,cAAc,SAAS,IAAI;CAC3C,IAAI,SAAS,SAAS;EACpB,WAAW,IAAI;EACf,IAAI,MAAM,MAAM;CAClB;AACF"}
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
* puts the highlight.
|
|
17
17
|
*
|
|
18
18
|
* Pass the query the list is filtered by. The cursor is stamped with it and
|
|
19
|
-
* dropped when it changes, so a caller cannot forget to clear it
|
|
19
|
+
* dropped when it changes, so a caller cannot forget to clear it - including a
|
|
20
20
|
* caller whose query arrives as a prop and so never runs its own handler. Rows
|
|
21
21
|
* that come back under a query that has moved on cannot revive it either.
|
|
22
22
|
* `moveTo(null)` is for deliberate resets, such as reopening the list.
|
|
23
23
|
*
|
|
24
24
|
* Both callbacks keep one identity for the life of the component, and read the
|
|
25
25
|
* rows and the query through a ref to do it. A caller will put them in an
|
|
26
|
-
* effect's dependencies
|
|
26
|
+
* effect's dependencies - the exhaustive-deps rule makes it - and a `moveTo`
|
|
27
27
|
* rebuilt on every keystroke would re-run that effect on every keystroke.
|
|
28
28
|
*/
|
|
29
29
|
export declare function useRowCursor(rows: readonly {
|
|
@@ -24,14 +24,14 @@ function indexOfCursor(rows, query, cursor) {
|
|
|
24
24
|
* puts the highlight.
|
|
25
25
|
*
|
|
26
26
|
* Pass the query the list is filtered by. The cursor is stamped with it and
|
|
27
|
-
* dropped when it changes, so a caller cannot forget to clear it
|
|
27
|
+
* dropped when it changes, so a caller cannot forget to clear it - including a
|
|
28
28
|
* caller whose query arrives as a prop and so never runs its own handler. Rows
|
|
29
29
|
* that come back under a query that has moved on cannot revive it either.
|
|
30
30
|
* `moveTo(null)` is for deliberate resets, such as reopening the list.
|
|
31
31
|
*
|
|
32
32
|
* Both callbacks keep one identity for the life of the component, and read the
|
|
33
33
|
* rows and the query through a ref to do it. A caller will put them in an
|
|
34
|
-
* effect's dependencies
|
|
34
|
+
* effect's dependencies - the exhaustive-deps rule makes it - and a `moveTo`
|
|
35
35
|
* rebuilt on every keystroke would re-run that effect on every keystroke.
|
|
36
36
|
*/
|
|
37
37
|
function useRowCursor(rows, query) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-row-cursor.js","names":[],"sources":["../../src/hooks/use-row-cursor.ts"],"sourcesContent":["\"use client\";\n\nimport { useCallback, useLayoutEffect, useRef, useState } from \"react\";\n\n/**\n * Where the keyboard or the pointer last moved to: the row's id, stamped with\n * the query it was placed under.\n */\ntype RowCursor = { id: string; query: string };\n\n/** The cursor's row, or -1 once the query has moved on or the row has left. */\nfunction indexOfCursor(rows: readonly { id: string }[], query: string, cursor: RowCursor | null) {\n if (cursor === null || cursor.query !== query) return -1;\n return rows.findIndex((row) => row.id === cursor.id);\n}\n\n/**\n * The highlighted row of a list whose rows can change under it.\n *\n * Which row is highlighted is resolved during render, never in a passive\n * effect: a passive effect runs after the commit, so a list that had just\n * changed would carry an `aria-activedescendant` naming a row that has left it,\n * and a key pressed in that window would commit the wrong row or nothing at\n * all.\n *\n * The cursor holds the row's id, not its position. A position alone cannot tell\n * a list that shrank from one that swapped its rows for a different set of the\n * same length, and the second case is the one that silently hands Enter to a\n * row the user never chose. A cursor whose row has left the list returns the\n * highlight to the first row rather than to the nearest surviving one: the row\n * the user aimed at is gone, and the first row is where a new query already\n * puts the highlight.\n *\n * Pass the query the list is filtered by. The cursor is stamped with it and\n * dropped when it changes, so a caller cannot forget to clear it
|
|
1
|
+
{"version":3,"file":"use-row-cursor.js","names":[],"sources":["../../src/hooks/use-row-cursor.ts"],"sourcesContent":["\"use client\";\n\nimport { useCallback, useLayoutEffect, useRef, useState } from \"react\";\n\n/**\n * Where the keyboard or the pointer last moved to: the row's id, stamped with\n * the query it was placed under.\n */\ntype RowCursor = { id: string; query: string };\n\n/** The cursor's row, or -1 once the query has moved on or the row has left. */\nfunction indexOfCursor(rows: readonly { id: string }[], query: string, cursor: RowCursor | null) {\n if (cursor === null || cursor.query !== query) return -1;\n return rows.findIndex((row) => row.id === cursor.id);\n}\n\n/**\n * The highlighted row of a list whose rows can change under it.\n *\n * Which row is highlighted is resolved during render, never in a passive\n * effect: a passive effect runs after the commit, so a list that had just\n * changed would carry an `aria-activedescendant` naming a row that has left it,\n * and a key pressed in that window would commit the wrong row or nothing at\n * all.\n *\n * The cursor holds the row's id, not its position. A position alone cannot tell\n * a list that shrank from one that swapped its rows for a different set of the\n * same length, and the second case is the one that silently hands Enter to a\n * row the user never chose. A cursor whose row has left the list returns the\n * highlight to the first row rather than to the nearest surviving one: the row\n * the user aimed at is gone, and the first row is where a new query already\n * puts the highlight.\n *\n * Pass the query the list is filtered by. The cursor is stamped with it and\n * dropped when it changes, so a caller cannot forget to clear it - including a\n * caller whose query arrives as a prop and so never runs its own handler. Rows\n * that come back under a query that has moved on cannot revive it either.\n * `moveTo(null)` is for deliberate resets, such as reopening the list.\n *\n * Both callbacks keep one identity for the life of the component, and read the\n * rows and the query through a ref to do it. A caller will put them in an\n * effect's dependencies - the exhaustive-deps rule makes it - and a `moveTo`\n * rebuilt on every keystroke would re-run that effect on every keystroke.\n */\nexport function useRowCursor(rows: readonly { id: string }[], query: string) {\n const [cursor, setCursor] = useState<RowCursor | null>(null);\n // Written after commit, not during render: a render React discards or has not\n // finished still runs the component body, and an event handler that read this\n // in that window would stamp the cursor with a query the committed tree does\n // not have.\n const latest = useRef({ rows, query });\n useLayoutEffect(() => {\n latest.current = { rows, query };\n });\n\n const cursorRow = indexOfCursor(rows, query, cursor);\n // Cleared rather than ignored: React re-runs this render with the cursor\n // already gone, so rows that come back cannot revive a highlight the user has\n // stopped aiming at.\n if (cursor !== null && cursorRow < 0) setCursor(null);\n\n const moveTo = useCallback(\n (id: string | null) => setCursor(id === null ? null : { id, query: latest.current.query }),\n [],\n );\n\n const moveActive = useCallback((direction: 1 | -1) => {\n const { rows: live, query: liveQuery } = latest.current;\n const last = live.length - 1;\n if (last < 0) return;\n // Steps from the row the cursor is really on, inside the update, so that\n // two keys landing in one batch move two rows rather than one.\n setCursor((current) => {\n const at = Math.max(indexOfCursor(live, liveQuery, current), 0);\n const next = Math.min(Math.max(at + direction, 0), last);\n return { id: live[next].id, query: liveQuery };\n });\n }, []);\n\n return { activeIndex: Math.max(cursorRow, 0), moveTo, moveActive };\n}\n"],"mappings":";;;;AAWA,SAAS,cAAc,MAAiC,OAAe,QAA0B;CAC/F,IAAI,WAAW,QAAQ,OAAO,UAAU,OAAO,OAAO;CACtD,OAAO,KAAK,WAAW,QAAQ,IAAI,OAAO,OAAO,EAAE;AACrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,SAAgB,aAAa,MAAiC,OAAe;CAC3E,MAAM,CAAC,QAAQ,aAAa,SAA2B,IAAI;CAK3D,MAAM,SAAS,OAAO;EAAE;EAAM;CAAM,CAAC;CACrC,sBAAsB;EACpB,OAAO,UAAU;GAAE;GAAM;EAAM;CACjC,CAAC;CAED,MAAM,YAAY,cAAc,MAAM,OAAO,MAAM;CAInD,IAAI,WAAW,QAAQ,YAAY,GAAG,UAAU,IAAI;CAEpD,MAAM,SAAS,aACZ,OAAsB,UAAU,OAAO,OAAO,OAAO;EAAE;EAAI,OAAO,OAAO,QAAQ;CAAM,CAAC,GACzF,CAAC,CACH;CAEA,MAAM,aAAa,aAAa,cAAsB;EACpD,MAAM,EAAE,MAAM,MAAM,OAAO,cAAc,OAAO;EAChD,MAAM,OAAO,KAAK,SAAS;EAC3B,IAAI,OAAO,GAAG;EAGd,WAAW,YAAY;GACrB,MAAM,KAAK,KAAK,IAAI,cAAc,MAAM,WAAW,OAAO,GAAG,CAAC;GAC9D,MAAM,OAAO,KAAK,IAAI,KAAK,IAAI,KAAK,WAAW,CAAC,GAAG,IAAI;GACvD,OAAO;IAAE,IAAI,KAAK,KAAK,CAAC;IAAI,OAAO;GAAU;EAC/C,CAAC;CACH,GAAG,CAAC,CAAC;CAEL,OAAO;EAAE,aAAa,KAAK,IAAI,WAAW,CAAC;EAAG;EAAQ;CAAW;AACnE"}
|
|
@@ -4,24 +4,34 @@ import { KeyboardEvent, PointerEvent } from "react";
|
|
|
4
4
|
* does not snap back onto the last whole step. */
|
|
5
5
|
export declare function snapSliderValue(next: number, min: number, max: number, step: number): number;
|
|
6
6
|
export interface SliderOptions {
|
|
7
|
+
/** The current value, for controlled use. */
|
|
7
8
|
value?: number;
|
|
9
|
+
/** The initial value when uncontrolled. Default: 0 */
|
|
8
10
|
defaultValue?: number;
|
|
11
|
+
/** Called with the snapped value whenever a drag or key press changes it. */
|
|
9
12
|
onValueChange?: (value: number) => void;
|
|
13
|
+
/** Lowest value on the track. Default: 0 */
|
|
10
14
|
min?: number;
|
|
15
|
+
/** Highest value on the track. Default: 100 */
|
|
11
16
|
max?: number;
|
|
17
|
+
/** Increment values snap to when dragging or using arrow keys. Default: 1 */
|
|
12
18
|
step?: number;
|
|
19
|
+
/** Ignores pointer and keyboard input. Default: false */
|
|
13
20
|
disabled?: boolean;
|
|
21
|
+
/** Accessible name for the slider handle. */
|
|
14
22
|
"aria-label"?: string;
|
|
15
|
-
/** Announced instead of the raw number
|
|
23
|
+
/** Announced instead of the raw number - pass one when the value carries a
|
|
16
24
|
* unit or a suffix ("72.5 kg", "35%"); a bare number needs no valueText. */
|
|
17
25
|
formatValueText?: (value: number) => string;
|
|
26
|
+
/** Play a tiny tick per step, higher toward the max. Off by default; a `SoundProvider` can mute it app-wide. */
|
|
27
|
+
sound?: boolean;
|
|
18
28
|
}
|
|
19
29
|
/**
|
|
20
30
|
* Shared value + input plumbing for slider designs: controlled/uncontrolled
|
|
21
31
|
* value, step snapping, pointer-capture drag along a track and arrow-key
|
|
22
32
|
* control. Visuals and motion live in the component; this only owns the number.
|
|
23
33
|
*/
|
|
24
|
-
export declare function useSlider({ value, defaultValue, onValueChange, min, max, step, disabled, "aria-label": ariaLabel, formatValueText }: SliderOptions): {
|
|
34
|
+
export declare function useSlider({ value, defaultValue, onValueChange, min, max, step, disabled, "aria-label": ariaLabel, formatValueText, sound }: SliderOptions): {
|
|
25
35
|
current: number;
|
|
26
36
|
percent: number;
|
|
27
37
|
dragging: boolean;
|
|
@@ -29,7 +39,7 @@ export declare function useSlider({ value, defaultValue, onValueChange, min, max
|
|
|
29
39
|
max: number;
|
|
30
40
|
step: number;
|
|
31
41
|
commit: (next: number) => void;
|
|
32
|
-
/** Pointer handlers for the track element
|
|
42
|
+
/** Pointer handlers for the track element - drag anywhere on it. */
|
|
33
43
|
trackProps: {
|
|
34
44
|
ref: import("react").RefObject<HTMLDivElement | null>;
|
|
35
45
|
onPointerDown: (event: PointerEvent<HTMLDivElement>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-slider.d.ts","names":[],"sources":["../../src/hooks/use-slider.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"use-slider.d.ts","names":[],"sources":["../../src/hooks/use-slider.ts"],"mappings":";;;;wBAoBgB,gBAAgB,cAAc,aAAa,aAAa;iBAavD;;EAEf;;EAEA;;EAEA,iBAAiB;;EAEjB;;EAEA;;EAEA;;EAEA;;EAEA;;;EAGA,mBAAmB;;EAEnB;;;;;;;wBAYc,YACd,OACA,cACA,eACA,KACA,KACA,MACA,wBACc,WACd,iBACA,SACC;;;;;;;EA2BQ,SAAA;;;;IA0BC,gBAAA,OAAA,aAAa;IAgBb,gBAAA,OAAA,aAAa;IAOa,cAAA,OAAA,aAAa;IAAb,kBAAA,OAAA,aAAa;IAAb,uBAAA,OAAA,aAAa;;;;IA+CjC,MAAA,MAAA;;;;;;;;;IAxCN,YAAA,OAAA,cAAc"}
|
package/dist/hooks/use-slider.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useCallback, useRef, useState } from "react";
|
|
2
|
+
import { useCallback, useLayoutEffect, useRef, useState } from "react";
|
|
3
|
+
import { useSound } from "../lib/sound.js";
|
|
4
|
+
import { tickSound } from "../lib/sounds/tick.js";
|
|
3
5
|
import { capturePointer, releasePointer } from "../lib/touch.js";
|
|
4
6
|
// src/hooks/use-slider.ts
|
|
5
7
|
const clamp = (v, lo, hi) => Math.min(hi, Math.max(lo, v));
|
|
@@ -15,12 +17,13 @@ function snapSliderValue(next, min, max, step) {
|
|
|
15
17
|
const snapped = lastWhole < max && Math.abs(next - max) <= Math.abs(next - toGrid) ? max : toGrid;
|
|
16
18
|
return Number(snapped.toFixed(6));
|
|
17
19
|
}
|
|
20
|
+
const TICK_GAP_MS = 35;
|
|
18
21
|
/**
|
|
19
22
|
* Shared value + input plumbing for slider designs: controlled/uncontrolled
|
|
20
23
|
* value, step snapping, pointer-capture drag along a track and arrow-key
|
|
21
24
|
* control. Visuals and motion live in the component; this only owns the number.
|
|
22
25
|
*/
|
|
23
|
-
function useSlider({ value, defaultValue = 0, onValueChange, min = 0, max = 100, step = 1, disabled = false, "aria-label": ariaLabel, formatValueText }) {
|
|
26
|
+
function useSlider({ value, defaultValue = 0, onValueChange, min = 0, max = 100, step = 1, disabled = false, "aria-label": ariaLabel, formatValueText, sound = false }) {
|
|
24
27
|
const trackRef = useRef(null);
|
|
25
28
|
const sliderEl = useRef(null);
|
|
26
29
|
const draggingRef = useRef(false);
|
|
@@ -32,8 +35,23 @@ function useSlider({ value, defaultValue = 0, onValueChange, min = 0, max = 100,
|
|
|
32
35
|
const stride = step > 0 ? step : 1;
|
|
33
36
|
const current = clamp(controlled ? value : internal, lo, hi);
|
|
34
37
|
const percent = hi > lo ? (current - lo) / (hi - lo) * 100 : 0;
|
|
38
|
+
const playTick = useSound(tickSound, { enabled: sound });
|
|
39
|
+
const tickRef = useRef({
|
|
40
|
+
value: current,
|
|
41
|
+
at: 0
|
|
42
|
+
});
|
|
43
|
+
useLayoutEffect(() => {
|
|
44
|
+
if (!draggingRef.current) tickRef.current.value = current;
|
|
45
|
+
});
|
|
35
46
|
const commit = useCallback((next) => {
|
|
36
47
|
const clean = snapSliderValue(next, lo, hi, stride);
|
|
48
|
+
const tick = tickRef.current;
|
|
49
|
+
const now = performance.now();
|
|
50
|
+
if (clean !== tick.value && now - tick.at >= TICK_GAP_MS) {
|
|
51
|
+
tick.value = clean;
|
|
52
|
+
tick.at = now;
|
|
53
|
+
playTick({ pitch: .85 + .35 * (hi > lo ? (clean - lo) / (hi - lo) : 0) });
|
|
54
|
+
}
|
|
37
55
|
if (!controlled) setInternal(clean);
|
|
38
56
|
onValueChange?.(clean);
|
|
39
57
|
}, [
|
|
@@ -41,7 +59,8 @@ function useSlider({ value, defaultValue = 0, onValueChange, min = 0, max = 100,
|
|
|
41
59
|
onValueChange,
|
|
42
60
|
lo,
|
|
43
61
|
hi,
|
|
44
|
-
stride
|
|
62
|
+
stride,
|
|
63
|
+
playTick
|
|
45
64
|
]);
|
|
46
65
|
const commitFromX = useCallback((clientX) => {
|
|
47
66
|
const rect = trackRef.current?.getBoundingClientRect();
|
|
@@ -102,7 +121,7 @@ function useSlider({ value, defaultValue = 0, onValueChange, min = 0, max = 100,
|
|
|
102
121
|
max: hi,
|
|
103
122
|
step: stride,
|
|
104
123
|
commit,
|
|
105
|
-
/** Pointer handlers for the track element
|
|
124
|
+
/** Pointer handlers for the track element - drag anywhere on it. */
|
|
106
125
|
trackProps: {
|
|
107
126
|
ref: trackRef,
|
|
108
127
|
onPointerDown,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-slider.js","names":[],"sources":["../../src/hooks/use-slider.ts"],"sourcesContent":["\"use client\";\n\nimport { type KeyboardEvent, type PointerEvent, useCallback, useRef, useState } from \"react\";\n\nimport { capturePointer, releasePointer } from \"../lib/touch\";\n\nconst clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));\n\n/** Nearest legal value on [min, max] for the given step. max counts as a\n * candidate when the step does not divide the range, so a pointer near the end\n * does not snap back onto the last whole step. */\nexport function snapSliderValue(next: number, min: number, max: number, step: number): number {\n // Neither case has a grid to walk. An empty range has exactly one legal\n // point, and a non-positive step only needs a clamp, which also keeps the\n // division below away from zero.\n if (!(max > min)) return min;\n if (!(step > 0)) return clamp(next, min, max);\n const whole = Math.floor(Number(((max - min) / step).toFixed(6)));\n const lastWhole = Number((min + whole * step).toFixed(6));\n const toGrid = clamp(Math.round((next - min) / step) * step + min, min, lastWhole);\n const snapped = lastWhole < max && Math.abs(next - max) <= Math.abs(next - toGrid) ? max : toGrid;\n return Number(snapped.toFixed(6));\n}\n\nexport interface SliderOptions {\n value?: number;\n defaultValue?: number;\n onValueChange?: (value: number) => void;\n min?: number;\n max?: number;\n step?: number;\n disabled?: boolean;\n \"aria-label\"?: string;\n /** Announced instead of the raw number — pass one when the value carries a\n * unit or a suffix (\"72.5 kg\", \"35%\"); a bare number needs no valueText. */\n formatValueText?: (value: number) => string;\n}\n\n/**\n * Shared value + input plumbing for slider designs: controlled/uncontrolled\n * value, step snapping, pointer-capture drag along a track and arrow-key\n * control. Visuals and motion live in the component; this only owns the number.\n */\nexport function useSlider({\n value,\n defaultValue = 0,\n onValueChange,\n min = 0,\n max = 100,\n step = 1,\n disabled = false,\n \"aria-label\": ariaLabel,\n formatValueText,\n}: SliderOptions) {\n const trackRef = useRef<HTMLDivElement>(null);\n const sliderEl = useRef<HTMLElement | null>(null);\n // The state drives visuals. Move reads this ref instead, so the first\n // pointermove after pointerdown does not have to wait on a re-render.\n const draggingRef = useRef(false);\n const [internal, setInternal] = useState(defaultValue);\n const [dragging, setDragging] = useState(false);\n const controlled = value !== undefined;\n // Collapse inverted or empty ranges and non-positive steps here, so that\n // percent, ticks and the keyboard maths never divide by zero or walk a\n // NaN grid.\n const lo = min;\n const hi = max > min ? max : min;\n const stride = step > 0 ? step : 1;\n const current = clamp(controlled ? value : internal, lo, hi);\n const percent = hi > lo ? ((current - lo) / (hi - lo)) * 100 : 0;\n\n const commit = useCallback(\n (next: number) => {\n const clean = snapSliderValue(next, lo, hi, stride);\n if (!controlled) setInternal(clean);\n onValueChange?.(clean);\n },\n [controlled, onValueChange, lo, hi, stride],\n );\n\n const commitFromX = useCallback(\n (clientX: number) => {\n const rect = trackRef.current?.getBoundingClientRect();\n if (!rect || rect.width === 0) return;\n const ratio = clamp((clientX - rect.left) / rect.width, 0, 1);\n commit(lo + ratio * (hi - lo));\n },\n [commit, lo, hi],\n );\n\n const onPointerDown = useCallback(\n (event: PointerEvent<HTMLDivElement>) => {\n if (disabled) return;\n // Start the drag first: capture is a convenience, and a browser that\n // refuses it — or a test DOM that has no pointer capture at all — must\n // not take the drag down with it.\n draggingRef.current = true;\n setDragging(true);\n capturePointer(event.currentTarget, event.pointerId);\n // A click on the track should land keyboard focus on the handle.\n sliderEl.current?.focus({ preventScroll: true });\n commitFromX(event.clientX);\n },\n [disabled, commitFromX],\n );\n\n const onPointerMove = useCallback(\n (event: PointerEvent<HTMLDivElement>) => {\n if (!draggingRef.current || disabled) return;\n commitFromX(event.clientX);\n },\n [disabled, commitFromX],\n );\n\n const endDrag = useCallback((event: PointerEvent<HTMLDivElement>) => {\n releasePointer(event.currentTarget, event.pointerId);\n draggingRef.current = false;\n setDragging(false);\n }, []);\n\n const onKeyDown = useCallback(\n (event: KeyboardEvent<HTMLElement>) => {\n if (disabled) return;\n const map: Record<string, number> = {\n ArrowRight: current + stride,\n ArrowUp: current + stride,\n ArrowLeft: current - stride,\n ArrowDown: current - stride,\n PageUp: current + stride * 10,\n PageDown: current - stride * 10,\n Home: lo,\n End: hi,\n };\n if (event.key in map) {\n event.preventDefault();\n commit(map[event.key]);\n }\n },\n [disabled, current, stride, lo, hi, commit],\n );\n\n return {\n current,\n percent,\n dragging,\n min: lo,\n max: hi,\n step: stride,\n commit,\n /** Pointer handlers for the track element — drag anywhere on it. */\n trackProps: {\n ref: trackRef,\n onPointerDown,\n onPointerMove,\n onPointerUp: endDrag,\n onPointerCancel: endDrag,\n onLostPointerCapture: endDrag,\n },\n /** ARIA + keyboard props for the focusable slider element. */\n sliderProps: {\n // Callback keeps the handle typed across button/div/motion hosts.\n ref: (node: HTMLElement | null) => {\n sliderEl.current = node;\n },\n role: \"slider\" as const,\n tabIndex: disabled ? -1 : 0,\n \"aria-label\": ariaLabel,\n \"aria-valuemin\": lo,\n \"aria-valuemax\": hi,\n \"aria-valuenow\": current,\n \"aria-valuetext\": formatValueText?.(current),\n \"aria-disabled\": disabled || undefined,\n onKeyDown,\n },\n };\n}\n"],"mappings":";;;;AAMA,MAAM,SAAS,GAAW,IAAY,OAAe,KAAK,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC;;;;AAKjF,SAAgB,gBAAgB,MAAc,KAAa,KAAa,MAAsB;CAI5F,IAAI,EAAE,MAAM,MAAM,OAAO;CACzB,IAAI,EAAE,OAAO,IAAI,OAAO,MAAM,MAAM,KAAK,GAAG;CAC5C,MAAM,QAAQ,KAAK,MAAM,SAAS,MAAM,OAAO,KAAA,CAAM,QAAQ,CAAC,CAAC,CAAC;CAChE,MAAM,YAAY,QAAQ,MAAM,QAAQ,KAAA,CAAM,QAAQ,CAAC,CAAC;CACxD,MAAM,SAAS,MAAM,KAAK,OAAO,OAAO,OAAO,IAAI,IAAI,OAAO,KAAK,KAAK,SAAS;CACjF,MAAM,UAAU,YAAY,OAAO,KAAK,IAAI,OAAO,GAAG,KAAK,KAAK,IAAI,OAAO,MAAM,IAAI,MAAM;CAC3F,OAAO,OAAO,QAAQ,QAAQ,CAAC,CAAC;AAClC;;;;;;AAqBA,SAAgB,UAAU,EACxB,OACA,eAAe,GACf,eACA,MAAM,GACN,MAAM,KACN,OAAO,GACP,WAAW,OACX,cAAc,WACd,mBACgB;CAChB,MAAM,WAAW,OAAuB,IAAI;CAC5C,MAAM,WAAW,OAA2B,IAAI;CAGhD,MAAM,cAAc,OAAO,KAAK;CAChC,MAAM,CAAC,UAAU,eAAe,SAAS,YAAY;CACrD,MAAM,CAAC,UAAU,eAAe,SAAS,KAAK;CAC9C,MAAM,aAAa,UAAU,KAAA;CAI7B,MAAM,KAAK;CACX,MAAM,KAAK,MAAM,MAAM,MAAM;CAC7B,MAAM,SAAS,OAAO,IAAI,OAAO;CACjC,MAAM,UAAU,MAAM,aAAa,QAAQ,UAAU,IAAI,EAAE;CAC3D,MAAM,UAAU,KAAK,MAAO,UAAU,OAAO,KAAK,MAAO,MAAM;CAE/D,MAAM,SAAS,aACZ,SAAiB;EAChB,MAAM,QAAQ,gBAAgB,MAAM,IAAI,IAAI,MAAM;EAClD,IAAI,CAAC,YAAY,YAAY,KAAK;EAClC,gBAAgB,KAAK;CACvB,GACA;EAAC;EAAY;EAAe;EAAI;EAAI;CAAM,CAC5C;CAEA,MAAM,cAAc,aACjB,YAAoB;EACnB,MAAM,OAAO,SAAS,SAAS,sBAAsB;EACrD,IAAI,CAAC,QAAQ,KAAK,UAAU,GAAG;EAC/B,MAAM,QAAQ,OAAO,UAAU,KAAK,QAAQ,KAAK,OAAO,GAAG,CAAC;EAC5D,OAAO,KAAK,SAAS,KAAK,GAAG;CAC/B,GACA;EAAC;EAAQ;EAAI;CAAE,CACjB;CAEA,MAAM,gBAAgB,aACnB,UAAwC;EACvC,IAAI,UAAU;EAId,YAAY,UAAU;EACtB,YAAY,IAAI;EAChB,eAAe,MAAM,eAAe,MAAM,SAAS;EAEnD,SAAS,SAAS,MAAM,EAAE,eAAe,KAAK,CAAC;EAC/C,YAAY,MAAM,OAAO;CAC3B,GACA,CAAC,UAAU,WAAW,CACxB;CAEA,MAAM,gBAAgB,aACnB,UAAwC;EACvC,IAAI,CAAC,YAAY,WAAW,UAAU;EACtC,YAAY,MAAM,OAAO;CAC3B,GACA,CAAC,UAAU,WAAW,CACxB;CAEA,MAAM,UAAU,aAAa,UAAwC;EACnE,eAAe,MAAM,eAAe,MAAM,SAAS;EACnD,YAAY,UAAU;EACtB,YAAY,KAAK;CACnB,GAAG,CAAC,CAAC;CAEL,MAAM,YAAY,aACf,UAAsC;EACrC,IAAI,UAAU;EACd,MAAM,MAA8B;GAClC,YAAY,UAAU;GACtB,SAAS,UAAU;GACnB,WAAW,UAAU;GACrB,WAAW,UAAU;GACrB,QAAQ,UAAU,SAAS;GAC3B,UAAU,UAAU,SAAS;GAC7B,MAAM;GACN,KAAK;EACP;EACA,IAAI,MAAM,OAAO,KAAK;GACpB,MAAM,eAAe;GACrB,OAAO,IAAI,MAAM,IAAI;EACvB;CACF,GACA;EAAC;EAAU;EAAS;EAAQ;EAAI;EAAI;CAAM,CAC5C;CAEA,OAAO;EACL;EACA;EACA;EACA,KAAK;EACL,KAAK;EACL,MAAM;EACN;;EAEA,YAAY;GACV,KAAK;GACL;GACA;GACA,aAAa;GACb,iBAAiB;GACjB,sBAAsB;EACxB;;EAEA,aAAa;GAEX,MAAM,SAA6B;IACjC,SAAS,UAAU;GACrB;GACA,MAAM;GACN,UAAU,WAAW,KAAK;GAC1B,cAAc;GACd,iBAAiB;GACjB,iBAAiB;GACjB,iBAAiB;GACjB,kBAAkB,kBAAkB,OAAO;GAC3C,iBAAiB,YAAY,KAAA;GAC7B;EACF;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"use-slider.js","names":[],"sources":["../../src/hooks/use-slider.ts"],"sourcesContent":["\"use client\";\n\nimport {\n type KeyboardEvent,\n type PointerEvent,\n useCallback,\n useLayoutEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport { useSound } from \"../lib/sound\";\nimport { tickSound } from \"../lib/sounds/tick\";\nimport { capturePointer, releasePointer } from \"../lib/touch\";\n\nconst clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));\n\n/** Nearest legal value on [min, max] for the given step. max counts as a\n * candidate when the step does not divide the range, so a pointer near the end\n * does not snap back onto the last whole step. */\nexport function snapSliderValue(next: number, min: number, max: number, step: number): number {\n // Neither case has a grid to walk. An empty range has exactly one legal\n // point, and a non-positive step only needs a clamp, which also keeps the\n // division below away from zero.\n if (!(max > min)) return min;\n if (!(step > 0)) return clamp(next, min, max);\n const whole = Math.floor(Number(((max - min) / step).toFixed(6)));\n const lastWhole = Number((min + whole * step).toFixed(6));\n const toGrid = clamp(Math.round((next - min) / step) * step + min, min, lastWhole);\n const snapped = lastWhole < max && Math.abs(next - max) <= Math.abs(next - toGrid) ? max : toGrid;\n return Number(snapped.toFixed(6));\n}\n\nexport interface SliderOptions {\n /** The current value, for controlled use. */\n value?: number;\n /** The initial value when uncontrolled. Default: 0 */\n defaultValue?: number;\n /** Called with the snapped value whenever a drag or key press changes it. */\n onValueChange?: (value: number) => void;\n /** Lowest value on the track. Default: 0 */\n min?: number;\n /** Highest value on the track. Default: 100 */\n max?: number;\n /** Increment values snap to when dragging or using arrow keys. Default: 1 */\n step?: number;\n /** Ignores pointer and keyboard input. Default: false */\n disabled?: boolean;\n /** Accessible name for the slider handle. */\n \"aria-label\"?: string;\n /** Announced instead of the raw number - pass one when the value carries a\n * unit or a suffix (\"72.5 kg\", \"35%\"); a bare number needs no valueText. */\n formatValueText?: (value: number) => string;\n /** Play a tiny tick per step, higher toward the max. Off by default; a `SoundProvider` can mute it app-wide. */\n sound?: boolean;\n}\n\n// A fast drag crosses many steps per frame; one tick per this many ms keeps\n// it a texture rather than a buzz.\nconst TICK_GAP_MS = 35;\n\n/**\n * Shared value + input plumbing for slider designs: controlled/uncontrolled\n * value, step snapping, pointer-capture drag along a track and arrow-key\n * control. Visuals and motion live in the component; this only owns the number.\n */\nexport function useSlider({\n value,\n defaultValue = 0,\n onValueChange,\n min = 0,\n max = 100,\n step = 1,\n disabled = false,\n \"aria-label\": ariaLabel,\n formatValueText,\n sound = false,\n}: SliderOptions) {\n const trackRef = useRef<HTMLDivElement>(null);\n const sliderEl = useRef<HTMLElement | null>(null);\n // The state drives visuals. Move reads this ref instead, so the first\n // pointermove after pointerdown does not have to wait on a re-render.\n const draggingRef = useRef(false);\n const [internal, setInternal] = useState(defaultValue);\n const [dragging, setDragging] = useState(false);\n const controlled = value !== undefined;\n // Collapse inverted or empty ranges and non-positive steps here, so that\n // percent, ticks and the keyboard maths never divide by zero or walk a\n // NaN grid.\n const lo = min;\n const hi = max > min ? max : min;\n const stride = step > 0 ? step : 1;\n const current = clamp(controlled ? value : internal, lo, hi);\n const percent = hi > lo ? ((current - lo) / (hi - lo)) * 100 : 0;\n\n const playTick = useSound(tickSound, { enabled: sound });\n // The value the last tick answered, and when, so a commit that lands on the\n // same step stays silent.\n const tickRef = useRef({ value: current, at: 0 });\n useLayoutEffect(() => {\n if (!draggingRef.current) tickRef.current.value = current;\n });\n\n const commit = useCallback(\n (next: number) => {\n const clean = snapSliderValue(next, lo, hi, stride);\n const tick = tickRef.current;\n const now = performance.now();\n if (clean !== tick.value && now - tick.at >= TICK_GAP_MS) {\n tick.value = clean;\n tick.at = now;\n playTick({ pitch: 0.85 + 0.35 * (hi > lo ? (clean - lo) / (hi - lo) : 0) });\n }\n if (!controlled) setInternal(clean);\n onValueChange?.(clean);\n },\n [controlled, onValueChange, lo, hi, stride, playTick],\n );\n\n const commitFromX = useCallback(\n (clientX: number) => {\n const rect = trackRef.current?.getBoundingClientRect();\n if (!rect || rect.width === 0) return;\n const ratio = clamp((clientX - rect.left) / rect.width, 0, 1);\n commit(lo + ratio * (hi - lo));\n },\n [commit, lo, hi],\n );\n\n const onPointerDown = useCallback(\n (event: PointerEvent<HTMLDivElement>) => {\n if (disabled) return;\n // Start the drag first: capture is a convenience, and a browser that\n // refuses it - or a test DOM that has no pointer capture at all - must\n // not take the drag down with it.\n draggingRef.current = true;\n setDragging(true);\n capturePointer(event.currentTarget, event.pointerId);\n // A click on the track should land keyboard focus on the handle.\n sliderEl.current?.focus({ preventScroll: true });\n commitFromX(event.clientX);\n },\n [disabled, commitFromX],\n );\n\n const onPointerMove = useCallback(\n (event: PointerEvent<HTMLDivElement>) => {\n if (!draggingRef.current || disabled) return;\n commitFromX(event.clientX);\n },\n [disabled, commitFromX],\n );\n\n const endDrag = useCallback((event: PointerEvent<HTMLDivElement>) => {\n releasePointer(event.currentTarget, event.pointerId);\n draggingRef.current = false;\n setDragging(false);\n }, []);\n\n const onKeyDown = useCallback(\n (event: KeyboardEvent<HTMLElement>) => {\n if (disabled) return;\n const map: Record<string, number> = {\n ArrowRight: current + stride,\n ArrowUp: current + stride,\n ArrowLeft: current - stride,\n ArrowDown: current - stride,\n PageUp: current + stride * 10,\n PageDown: current - stride * 10,\n Home: lo,\n End: hi,\n };\n if (event.key in map) {\n event.preventDefault();\n commit(map[event.key]);\n }\n },\n [disabled, current, stride, lo, hi, commit],\n );\n\n return {\n current,\n percent,\n dragging,\n min: lo,\n max: hi,\n step: stride,\n commit,\n /** Pointer handlers for the track element - drag anywhere on it. */\n trackProps: {\n ref: trackRef,\n onPointerDown,\n onPointerMove,\n onPointerUp: endDrag,\n onPointerCancel: endDrag,\n onLostPointerCapture: endDrag,\n },\n /** ARIA + keyboard props for the focusable slider element. */\n sliderProps: {\n // Callback keeps the handle typed across button/div/motion hosts.\n ref: (node: HTMLElement | null) => {\n sliderEl.current = node;\n },\n role: \"slider\" as const,\n tabIndex: disabled ? -1 : 0,\n \"aria-label\": ariaLabel,\n \"aria-valuemin\": lo,\n \"aria-valuemax\": hi,\n \"aria-valuenow\": current,\n \"aria-valuetext\": formatValueText?.(current),\n \"aria-disabled\": disabled || undefined,\n onKeyDown,\n },\n };\n}\n"],"mappings":";;;;;;AAeA,MAAM,SAAS,GAAW,IAAY,OAAe,KAAK,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC;;;;AAKjF,SAAgB,gBAAgB,MAAc,KAAa,KAAa,MAAsB;CAI5F,IAAI,EAAE,MAAM,MAAM,OAAO;CACzB,IAAI,EAAE,OAAO,IAAI,OAAO,MAAM,MAAM,KAAK,GAAG;CAC5C,MAAM,QAAQ,KAAK,MAAM,SAAS,MAAM,OAAO,KAAA,CAAM,QAAQ,CAAC,CAAC,CAAC;CAChE,MAAM,YAAY,QAAQ,MAAM,QAAQ,KAAA,CAAM,QAAQ,CAAC,CAAC;CACxD,MAAM,SAAS,MAAM,KAAK,OAAO,OAAO,OAAO,IAAI,IAAI,OAAO,KAAK,KAAK,SAAS;CACjF,MAAM,UAAU,YAAY,OAAO,KAAK,IAAI,OAAO,GAAG,KAAK,KAAK,IAAI,OAAO,MAAM,IAAI,MAAM;CAC3F,OAAO,OAAO,QAAQ,QAAQ,CAAC,CAAC;AAClC;AA4BA,MAAM,cAAc;;;;;;AAOpB,SAAgB,UAAU,EACxB,OACA,eAAe,GACf,eACA,MAAM,GACN,MAAM,KACN,OAAO,GACP,WAAW,OACX,cAAc,WACd,iBACA,QAAQ,SACQ;CAChB,MAAM,WAAW,OAAuB,IAAI;CAC5C,MAAM,WAAW,OAA2B,IAAI;CAGhD,MAAM,cAAc,OAAO,KAAK;CAChC,MAAM,CAAC,UAAU,eAAe,SAAS,YAAY;CACrD,MAAM,CAAC,UAAU,eAAe,SAAS,KAAK;CAC9C,MAAM,aAAa,UAAU,KAAA;CAI7B,MAAM,KAAK;CACX,MAAM,KAAK,MAAM,MAAM,MAAM;CAC7B,MAAM,SAAS,OAAO,IAAI,OAAO;CACjC,MAAM,UAAU,MAAM,aAAa,QAAQ,UAAU,IAAI,EAAE;CAC3D,MAAM,UAAU,KAAK,MAAO,UAAU,OAAO,KAAK,MAAO,MAAM;CAE/D,MAAM,WAAW,SAAS,WAAW,EAAE,SAAS,MAAM,CAAC;CAGvD,MAAM,UAAU,OAAO;EAAE,OAAO;EAAS,IAAI;CAAE,CAAC;CAChD,sBAAsB;EACpB,IAAI,CAAC,YAAY,SAAS,QAAQ,QAAQ,QAAQ;CACpD,CAAC;CAED,MAAM,SAAS,aACZ,SAAiB;EAChB,MAAM,QAAQ,gBAAgB,MAAM,IAAI,IAAI,MAAM;EAClD,MAAM,OAAO,QAAQ;EACrB,MAAM,MAAM,YAAY,IAAI;EAC5B,IAAI,UAAU,KAAK,SAAS,MAAM,KAAK,MAAM,aAAa;GACxD,KAAK,QAAQ;GACb,KAAK,KAAK;GACV,SAAS,EAAE,OAAO,MAAO,OAAQ,KAAK,MAAM,QAAQ,OAAO,KAAK,MAAM,GAAG,CAAC;EAC5E;EACA,IAAI,CAAC,YAAY,YAAY,KAAK;EAClC,gBAAgB,KAAK;CACvB,GACA;EAAC;EAAY;EAAe;EAAI;EAAI;EAAQ;CAAQ,CACtD;CAEA,MAAM,cAAc,aACjB,YAAoB;EACnB,MAAM,OAAO,SAAS,SAAS,sBAAsB;EACrD,IAAI,CAAC,QAAQ,KAAK,UAAU,GAAG;EAC/B,MAAM,QAAQ,OAAO,UAAU,KAAK,QAAQ,KAAK,OAAO,GAAG,CAAC;EAC5D,OAAO,KAAK,SAAS,KAAK,GAAG;CAC/B,GACA;EAAC;EAAQ;EAAI;CAAE,CACjB;CAEA,MAAM,gBAAgB,aACnB,UAAwC;EACvC,IAAI,UAAU;EAId,YAAY,UAAU;EACtB,YAAY,IAAI;EAChB,eAAe,MAAM,eAAe,MAAM,SAAS;EAEnD,SAAS,SAAS,MAAM,EAAE,eAAe,KAAK,CAAC;EAC/C,YAAY,MAAM,OAAO;CAC3B,GACA,CAAC,UAAU,WAAW,CACxB;CAEA,MAAM,gBAAgB,aACnB,UAAwC;EACvC,IAAI,CAAC,YAAY,WAAW,UAAU;EACtC,YAAY,MAAM,OAAO;CAC3B,GACA,CAAC,UAAU,WAAW,CACxB;CAEA,MAAM,UAAU,aAAa,UAAwC;EACnE,eAAe,MAAM,eAAe,MAAM,SAAS;EACnD,YAAY,UAAU;EACtB,YAAY,KAAK;CACnB,GAAG,CAAC,CAAC;CAEL,MAAM,YAAY,aACf,UAAsC;EACrC,IAAI,UAAU;EACd,MAAM,MAA8B;GAClC,YAAY,UAAU;GACtB,SAAS,UAAU;GACnB,WAAW,UAAU;GACrB,WAAW,UAAU;GACrB,QAAQ,UAAU,SAAS;GAC3B,UAAU,UAAU,SAAS;GAC7B,MAAM;GACN,KAAK;EACP;EACA,IAAI,MAAM,OAAO,KAAK;GACpB,MAAM,eAAe;GACrB,OAAO,IAAI,MAAM,IAAI;EACvB;CACF,GACA;EAAC;EAAU;EAAS;EAAQ;EAAI;EAAI;CAAM,CAC5C;CAEA,OAAO;EACL;EACA;EACA;EACA,KAAK;EACL,KAAK;EACL,MAAM;EACN;;EAEA,YAAY;GACV,KAAK;GACL;GACA;GACA,aAAa;GACb,iBAAiB;GACjB,sBAAsB;EACxB;;EAEA,aAAa;GAEX,MAAM,SAA6B;IACjC,SAAS,UAAU;GACrB;GACA,MAAM;GACN,UAAU,WAAW,KAAK;GAC1B,cAAc;GACd,iBAAiB;GACjB,iBAAiB;GACjB,iBAAiB;GACjB,kBAAkB,kBAAkB,OAAO;GAC3C,iBAAiB,YAAY,KAAA;GAC7B;EACF;CACF;AACF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Open state for a disclosure that opens or closes itself when a status
|
|
3
|
+
* changes: a tool result that opens while it runs, a todo list that folds
|
|
4
|
+
* when the work completes. Controlled through `open`, or uncontrolled from
|
|
5
|
+
* `defaultOpen`.
|
|
6
|
+
*
|
|
7
|
+
* `decide(previous, next)` runs in the render that first sees a new status
|
|
8
|
+
* and returns `true` to open, `false` to close, or `undefined` to leave it.
|
|
9
|
+
* An uncontrolled panel flips in that same render, so it never shows one
|
|
10
|
+
* commit in the old state. Telling the consumer through `onOpenChange` is a
|
|
11
|
+
* side effect, so it waits for the commit.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useStatusOpen<Status>({ status, initialStatus, decide, open, defaultOpen, onOpenChange }: {
|
|
14
|
+
status: Status;
|
|
15
|
+
/**
|
|
16
|
+
* The status to treat as already seen at mount. Defaults to `status`, so
|
|
17
|
+
* mounting is not a change; pass another value to let the first render
|
|
18
|
+
* count as one.
|
|
19
|
+
*/
|
|
20
|
+
initialStatus?: Status;
|
|
21
|
+
decide: (previous: Status, next: Status) => boolean | undefined;
|
|
22
|
+
open?: boolean;
|
|
23
|
+
defaultOpen: boolean;
|
|
24
|
+
onOpenChange?: (open: boolean) => void;
|
|
25
|
+
}): readonly [boolean, (next: boolean) => void];
|
|
26
|
+
//# sourceMappingURL=use-status-open.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-status-open.d.ts","names":[],"sources":["../../src/hooks/use-status-open.ts"],"mappings":";;;;;;;;;;;;wBAkBgB,cAAc,UAC5B,QACA,eACA,QACA,MACA,aACA;EAEA,QAAQ;;;;;;EAMR,gBAAgB;EAChB,SAAS,UAAU,QAAQ,MAAM;EACjC;EACA;EACA,gBAAgB;wBACjB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
3
|
+
import { useControllable } from "./use-controllable.js";
|
|
4
|
+
// src/hooks/use-status-open.ts
|
|
5
|
+
/**
|
|
6
|
+
* Open state for a disclosure that opens or closes itself when a status
|
|
7
|
+
* changes: a tool result that opens while it runs, a todo list that folds
|
|
8
|
+
* when the work completes. Controlled through `open`, or uncontrolled from
|
|
9
|
+
* `defaultOpen`.
|
|
10
|
+
*
|
|
11
|
+
* `decide(previous, next)` runs in the render that first sees a new status
|
|
12
|
+
* and returns `true` to open, `false` to close, or `undefined` to leave it.
|
|
13
|
+
* An uncontrolled panel flips in that same render, so it never shows one
|
|
14
|
+
* commit in the old state. Telling the consumer through `onOpenChange` is a
|
|
15
|
+
* side effect, so it waits for the commit.
|
|
16
|
+
*/
|
|
17
|
+
function useStatusOpen({ status, initialStatus = status, decide, open, defaultOpen, onOpenChange }) {
|
|
18
|
+
const [currentOpen, setOpen, setInternal] = useControllable(open, defaultOpen, onOpenChange);
|
|
19
|
+
const [seenStatus, setSeenStatus] = useState(initialStatus);
|
|
20
|
+
const [request, setRequest] = useState(null);
|
|
21
|
+
if (status !== seenStatus) {
|
|
22
|
+
setSeenStatus(status);
|
|
23
|
+
const wanted = decide(seenStatus, status);
|
|
24
|
+
if (wanted !== void 0) {
|
|
25
|
+
if (open === void 0) setInternal(wanted);
|
|
26
|
+
setRequest({
|
|
27
|
+
open: wanted,
|
|
28
|
+
from: currentOpen
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const notify = useRef(onOpenChange);
|
|
33
|
+
useLayoutEffect(() => {
|
|
34
|
+
notify.current = onOpenChange;
|
|
35
|
+
});
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
if (request && request.open !== request.from) notify.current?.(request.open);
|
|
38
|
+
}, [request]);
|
|
39
|
+
return [currentOpen, setOpen];
|
|
40
|
+
}
|
|
41
|
+
export { useStatusOpen };
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=use-status-open.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-status-open.js","names":[],"sources":["../../src/hooks/use-status-open.ts"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useLayoutEffect, useRef, useState } from \"react\";\n\nimport { useControllable } from \"./use-controllable\";\n\n/**\n * Open state for a disclosure that opens or closes itself when a status\n * changes: a tool result that opens while it runs, a todo list that folds\n * when the work completes. Controlled through `open`, or uncontrolled from\n * `defaultOpen`.\n *\n * `decide(previous, next)` runs in the render that first sees a new status\n * and returns `true` to open, `false` to close, or `undefined` to leave it.\n * An uncontrolled panel flips in that same render, so it never shows one\n * commit in the old state. Telling the consumer through `onOpenChange` is a\n * side effect, so it waits for the commit.\n */\nexport function useStatusOpen<Status>({\n status,\n initialStatus = status,\n decide,\n open,\n defaultOpen,\n onOpenChange,\n}: {\n status: Status;\n /**\n * The status to treat as already seen at mount. Defaults to `status`, so\n * mounting is not a change; pass another value to let the first render\n * count as one.\n */\n initialStatus?: Status;\n decide: (previous: Status, next: Status) => boolean | undefined;\n open?: boolean;\n defaultOpen: boolean;\n onOpenChange?: (open: boolean) => void;\n}) {\n const [currentOpen, setOpen, setInternal] = useControllable(open, defaultOpen, onOpenChange);\n const [seenStatus, setSeenStatus] = useState(initialStatus);\n const [request, setRequest] = useState<{ open: boolean; from: boolean } | null>(null);\n\n if (status !== seenStatus) {\n setSeenStatus(status);\n const wanted = decide(seenStatus, status);\n if (wanted !== undefined) {\n if (open === undefined) setInternal(wanted);\n setRequest({ open: wanted, from: currentOpen });\n }\n }\n\n const notify = useRef(onOpenChange);\n useLayoutEffect(() => {\n notify.current = onOpenChange;\n });\n useEffect(() => {\n if (request && request.open !== request.from) notify.current?.(request.open);\n }, [request]);\n\n return [currentOpen, setOpen] as const;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAkBA,SAAgB,cAAsB,EACpC,QACA,gBAAgB,QAChB,QACA,MACA,aACA,gBAaC;CACD,MAAM,CAAC,aAAa,SAAS,eAAe,gBAAgB,MAAM,aAAa,YAAY;CAC3F,MAAM,CAAC,YAAY,iBAAiB,SAAS,aAAa;CAC1D,MAAM,CAAC,SAAS,cAAc,SAAkD,IAAI;CAEpF,IAAI,WAAW,YAAY;EACzB,cAAc,MAAM;EACpB,MAAM,SAAS,OAAO,YAAY,MAAM;EACxC,IAAI,WAAW,KAAA,GAAW;GACxB,IAAI,SAAS,KAAA,GAAW,YAAY,MAAM;GAC1C,WAAW;IAAE,MAAM;IAAQ,MAAM;GAAY,CAAC;EAChD;CACF;CAEA,MAAM,SAAS,OAAO,YAAY;CAClC,sBAAsB;EACpB,OAAO,UAAU;CACnB,CAAC;CACD,gBAAgB;EACd,IAAI,WAAW,QAAQ,SAAS,QAAQ,MAAM,OAAO,UAAU,QAAQ,IAAI;CAC7E,GAAG,CAAC,OAAO,CAAC;CAEZ,OAAO,CAAC,aAAa,OAAO;AAC9B"}
|