@kumix/ui 0.3.10 → 0.3.12
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 +25 -25
- package/dist/components/agents/agent-activity/activity-row.d.ts +1 -2
- package/dist/components/agents/agent-activity/activity-row.d.ts.map +1 -1
- package/dist/components/agents/agent-activity/activity-row.js +1 -1
- package/dist/components/agents/agent-activity/index.d.ts +2 -2
- package/dist/components/agents/agent-activity/index.d.ts.map +1 -1
- package/dist/components/agents/agent-activity/index.js +1 -1
- package/dist/components/agents/agent-code.d.ts +8 -9
- package/dist/components/agents/agent-code.d.ts.map +1 -1
- package/dist/components/agents/agent-code.js +1 -1
- package/dist/components/agents/agent-disclosure.d.ts +2 -3
- package/dist/components/agents/agent-disclosure.d.ts.map +1 -1
- package/dist/components/agents/ai-sidebar.d.ts +8 -9
- package/dist/components/agents/ai-sidebar.d.ts.map +1 -1
- package/dist/components/agents/ai-sidebar.js +1 -1
- package/dist/components/agents/approval-card/index.d.ts +2 -2
- package/dist/components/agents/approval-card/index.d.ts.map +1 -1
- package/dist/components/agents/approval-card/index.js +1 -1
- package/dist/components/agents/chat-app.d.ts +2 -3
- package/dist/components/agents/chat-app.d.ts.map +1 -1
- package/dist/components/agents/citations.d.ts +10 -11
- package/dist/components/agents/citations.d.ts.map +1 -1
- package/dist/components/agents/citations.js +1 -1
- package/dist/components/agents/code-block.d.ts +3 -4
- package/dist/components/agents/code-block.d.ts.map +1 -1
- package/dist/components/agents/code-block.js +1 -1
- package/dist/components/agents/file-diff.d.ts +5 -6
- package/dist/components/agents/file-diff.d.ts.map +1 -1
- package/dist/components/agents/file-diff.js +1 -1
- package/dist/components/agents/image-generation.d.ts +3 -4
- package/dist/components/agents/image-generation.d.ts.map +1 -1
- package/dist/components/agents/image-generation.js +1 -1
- package/dist/components/agents/loading-states/agent-progress.d.ts +2 -3
- package/dist/components/agents/loading-states/agent-progress.d.ts.map +1 -1
- package/dist/components/agents/loading-states/reasoning-text.d.ts +3 -4
- package/dist/components/agents/loading-states/reasoning-text.d.ts.map +1 -1
- package/dist/components/agents/loading-states/thinking-shimmer.d.ts +2 -3
- package/dist/components/agents/loading-states/thinking-shimmer.d.ts.map +1 -1
- package/dist/components/agents/message-bubble.d.ts +10 -11
- package/dist/components/agents/message-bubble.d.ts.map +1 -1
- package/dist/components/agents/message-bubble.js +1 -1
- package/dist/components/agents/message-context.d.ts +2 -3
- package/dist/components/agents/message-context.d.ts.map +1 -1
- package/dist/components/agents/message-scroller.d.ts +2 -3
- package/dist/components/agents/message-scroller.d.ts.map +1 -1
- package/dist/components/agents/message.d.ts +18 -18
- package/dist/components/agents/message.d.ts.map +1 -1
- package/dist/components/agents/prompt-input.d.ts +4 -5
- package/dist/components/agents/prompt-input.d.ts.map +1 -1
- package/dist/components/agents/prompt-input.js +1 -1
- package/dist/components/agents/streaming-response.d.ts +4 -5
- package/dist/components/agents/streaming-response.d.ts.map +1 -1
- package/dist/components/agents/streaming-response.js +1 -1
- package/dist/components/agents/todo-list.d.ts +4 -5
- package/dist/components/agents/todo-list.d.ts.map +1 -1
- package/dist/components/agents/todo-list.js +1 -1
- package/dist/components/agents/tool-approval.d.ts +6 -7
- package/dist/components/agents/tool-approval.d.ts.map +1 -1
- package/dist/components/agents/tool-approval.js +1 -1
- package/dist/components/agents/tool-result.d.ts +6 -7
- package/dist/components/agents/tool-result.d.ts.map +1 -1
- package/dist/components/agents/tool-result.js +1 -1
- package/dist/components/custom/confirm-dialog.d.ts +2 -3
- package/dist/components/custom/confirm-dialog.d.ts.map +1 -1
- package/dist/components/custom/confirm-dialog.js +1 -1
- package/dist/components/custom/toast.d.ts +6 -7
- package/dist/components/custom/toast.d.ts.map +1 -1
- package/dist/components/motion/action-swap-blur.d.ts +7 -7
- package/dist/components/motion/action-swap-blur.d.ts.map +1 -1
- package/dist/components/motion/action-swap-cascade.d.ts +7 -7
- package/dist/components/motion/action-swap-cascade.d.ts.map +1 -1
- package/dist/components/motion/action-swap-roll.d.ts +7 -7
- package/dist/components/motion/action-swap-roll.d.ts.map +1 -1
- package/dist/components/motion/action-swap.d.ts +10 -11
- package/dist/components/motion/action-swap.d.ts.map +1 -1
- package/dist/components/motion/adaptive-stepper.d.ts +31 -0
- package/dist/components/motion/adaptive-stepper.d.ts.map +1 -0
- package/dist/components/motion/adaptive-stepper.js +302 -0
- package/dist/components/motion/adaptive-stepper.js.map +1 -0
- package/dist/components/motion/animated-badge.d.ts +4 -5
- package/dist/components/motion/animated-badge.d.ts.map +1 -1
- package/dist/components/motion/animated-badge.js +1 -1
- package/dist/components/motion/animated-number.d.ts +2 -3
- package/dist/components/motion/animated-number.d.ts.map +1 -1
- package/dist/components/motion/animated-sidebar.d.ts +28 -29
- package/dist/components/motion/animated-sidebar.d.ts.map +1 -1
- package/dist/components/motion/animated-sidebar.js +1 -1
- package/dist/components/motion/animated-toast-stack.d.ts +10 -11
- package/dist/components/motion/animated-toast-stack.d.ts.map +1 -1
- package/dist/components/motion/animated-toast-stack.js +1 -1
- package/dist/components/motion/attachment-upload.d.ts +7 -8
- package/dist/components/motion/attachment-upload.d.ts.map +1 -1
- package/dist/components/motion/attachment-upload.js +1 -1
- package/dist/components/motion/availability-scheduler/copy-menu.d.ts +1 -2
- package/dist/components/motion/availability-scheduler/copy-menu.d.ts.map +1 -1
- package/dist/components/motion/availability-scheduler/copy-menu.js +1 -1
- package/dist/components/motion/availability-scheduler/day-row.d.ts +1 -2
- package/dist/components/motion/availability-scheduler/day-row.d.ts.map +1 -1
- package/dist/components/motion/availability-scheduler/day-row.js +2 -2
- package/dist/components/motion/availability-scheduler/icon-button.d.ts +1 -2
- package/dist/components/motion/availability-scheduler/icon-button.d.ts.map +1 -1
- package/dist/components/motion/availability-scheduler/index.d.ts +3 -3
- package/dist/components/motion/availability-scheduler/index.d.ts.map +1 -1
- package/dist/components/motion/availability-scheduler/index.js +1 -1
- package/dist/components/motion/availability-scheduler/time-select.d.ts +1 -2
- package/dist/components/motion/availability-scheduler/time-select.d.ts.map +1 -1
- package/dist/components/motion/bloom-menu.d.ts +2 -3
- package/dist/components/motion/bloom-menu.d.ts.map +1 -1
- package/dist/components/motion/bloom-menu.js +1 -1
- package/dist/components/motion/bottom-sheet.d.ts +2 -3
- package/dist/components/motion/bottom-sheet.d.ts.map +1 -1
- package/dist/components/motion/bounce-sidebar.d.ts +3 -4
- package/dist/components/motion/bounce-sidebar.d.ts.map +1 -1
- package/dist/components/motion/bouncy-accordion.d.ts +4 -5
- package/dist/components/motion/bouncy-accordion.d.ts.map +1 -1
- package/dist/components/motion/bouncy-accordion.js +1 -1
- package/dist/components/motion/button/base.d.ts +6 -7
- package/dist/components/motion/button/base.d.ts.map +1 -1
- package/dist/components/motion/button/magnetic.d.ts +2 -3
- package/dist/components/motion/button/magnetic.d.ts.map +1 -1
- package/dist/components/motion/button/metallic.d.ts +2 -3
- package/dist/components/motion/button/metallic.d.ts.map +1 -1
- package/dist/components/motion/button/stateful.d.ts +3 -4
- package/dist/components/motion/button/stateful.d.ts.map +1 -1
- package/dist/components/motion/button/stateful.js +1 -1
- package/dist/components/motion/center-morph-modal.d.ts +8 -9
- package/dist/components/motion/center-morph-modal.d.ts.map +1 -1
- package/dist/components/motion/center-morph-modal.js +1 -1
- package/dist/components/motion/checkbox.d.ts +2 -3
- package/dist/components/motion/checkbox.d.ts.map +1 -1
- package/dist/components/motion/chromatic-text-reveal.d.ts +2 -3
- package/dist/components/motion/chromatic-text-reveal.d.ts.map +1 -1
- package/dist/components/motion/combobox/content.d.ts +2 -3
- package/dist/components/motion/combobox/content.d.ts.map +1 -1
- package/dist/components/motion/combobox/content.js +1 -1
- package/dist/components/motion/combobox/context.d.ts +9 -10
- package/dist/components/motion/combobox/context.d.ts.map +1 -1
- package/dist/components/motion/combobox/context.js +216 -1
- package/dist/components/motion/combobox/context.js.map +1 -0
- package/dist/components/motion/combobox/list.d.ts +12 -13
- package/dist/components/motion/combobox/list.d.ts.map +1 -1
- package/dist/components/motion/combobox/list.js +2 -2
- package/dist/components/motion/combobox/trigger.d.ts +6 -7
- package/dist/components/motion/combobox/trigger.d.ts.map +1 -1
- package/dist/components/motion/combobox/trigger.js +2 -2
- package/dist/components/motion/combobox.js +1 -1
- package/dist/components/motion/command-palette.d.ts +3 -4
- package/dist/components/motion/command-palette.d.ts.map +1 -1
- package/dist/components/motion/command-palette.js +1 -1
- package/dist/components/motion/context-menu.d.ts +20 -21
- package/dist/components/motion/context-menu.d.ts.map +1 -1
- package/dist/components/motion/context-menu.js +1 -1
- package/dist/components/motion/cylinder-carousel.d.ts +2 -3
- package/dist/components/motion/cylinder-carousel.d.ts.map +1 -1
- package/dist/components/motion/dock.d.ts +5 -6
- package/dist/components/motion/dock.d.ts.map +1 -1
- package/dist/components/motion/drawer.d.ts +2 -3
- package/dist/components/motion/drawer.d.ts.map +1 -1
- package/dist/components/motion/dynamic-island.d.ts +4 -5
- package/dist/components/motion/dynamic-island.d.ts.map +1 -1
- package/dist/components/motion/expandable-action-bar.d.ts +6 -7
- package/dist/components/motion/expandable-action-bar.d.ts.map +1 -1
- package/dist/components/motion/expandable-control.d.ts +4 -5
- package/dist/components/motion/expandable-control.d.ts.map +1 -1
- package/dist/components/motion/expandable-tabs.d.ts +4 -5
- package/dist/components/motion/expandable-tabs.d.ts.map +1 -1
- package/dist/components/motion/expanding-arrow-button.d.ts +2 -3
- package/dist/components/motion/expanding-arrow-button.d.ts.map +1 -1
- package/dist/components/motion/feedback-widget.d.ts +3 -4
- package/dist/components/motion/feedback-widget.d.ts.map +1 -1
- package/dist/components/motion/feedback-widget.js +1 -1
- package/dist/components/motion/file-tree.d.ts +7 -8
- package/dist/components/motion/file-tree.d.ts.map +1 -1
- package/dist/components/motion/file-tree.js +1 -1
- package/dist/components/motion/file-upload.d.ts +7 -8
- package/dist/components/motion/file-upload.d.ts.map +1 -1
- package/dist/components/motion/file-upload.js +1 -1
- package/dist/components/motion/hold-action-button.d.ts +2 -3
- package/dist/components/motion/hold-action-button.d.ts.map +1 -1
- package/dist/components/motion/infinite-masonry.d.ts +3 -4
- package/dist/components/motion/infinite-masonry.d.ts.map +1 -1
- package/dist/components/motion/infinite-masonry.js +1 -1
- package/dist/components/motion/input.d.ts +5 -4
- package/dist/components/motion/input.d.ts.map +1 -1
- package/dist/components/motion/input.js +28 -25
- package/dist/components/motion/input.js.map +1 -1
- package/dist/components/motion/liquid.d.ts +29 -0
- package/dist/components/motion/liquid.d.ts.map +1 -0
- package/dist/components/motion/liquid.js +248 -0
- package/dist/components/motion/liquid.js.map +1 -0
- package/dist/components/motion/loader.d.ts +3 -4
- package/dist/components/motion/loader.d.ts.map +1 -1
- package/dist/components/motion/magnetic.d.ts +2 -3
- package/dist/components/motion/magnetic.d.ts.map +1 -1
- package/dist/components/motion/marquee.d.ts +2 -3
- package/dist/components/motion/marquee.d.ts.map +1 -1
- package/dist/components/motion/morphing-modal.d.ts +2 -3
- package/dist/components/motion/morphing-modal.d.ts.map +1 -1
- package/dist/components/motion/morphing-search.d.ts +3 -4
- package/dist/components/motion/morphing-search.d.ts.map +1 -1
- package/dist/components/motion/morphing-search.js +1 -1
- package/dist/components/motion/morphing-tabs.d.ts +4 -5
- package/dist/components/motion/morphing-tabs.d.ts.map +1 -1
- package/dist/components/motion/morphing-tabs.js +1 -1
- package/dist/components/motion/multi-select/content.d.ts +15 -0
- package/dist/components/motion/multi-select/content.d.ts.map +1 -0
- package/dist/components/motion/multi-select/content.js +91 -0
- package/dist/components/motion/multi-select/content.js.map +1 -0
- package/dist/components/motion/multi-select/context.d.ts +63 -0
- package/dist/components/motion/multi-select/context.d.ts.map +1 -0
- package/dist/{context-BizvUNZv.js → components/motion/multi-select/context.js} +44 -114
- package/dist/components/motion/multi-select/context.js.map +1 -0
- package/dist/components/motion/multi-select/index.d.ts +5 -0
- package/dist/components/motion/multi-select/index.js +6 -0
- package/dist/components/motion/multi-select/list.d.ts +39 -0
- package/dist/components/motion/multi-select/list.d.ts.map +1 -0
- package/dist/components/motion/multi-select/list.js +144 -0
- package/dist/components/motion/multi-select/list.js.map +1 -0
- package/dist/components/motion/multi-select/trigger.d.ts +21 -0
- package/dist/components/motion/multi-select/trigger.d.ts.map +1 -0
- package/dist/components/motion/multi-select/trigger.js +185 -0
- package/dist/components/motion/multi-select/trigger.js.map +1 -0
- package/dist/components/motion/not-found/glitch.d.ts +1 -2
- package/dist/components/motion/not-found/glitch.d.ts.map +1 -1
- package/dist/components/motion/not-found/magnetic.d.ts +1 -2
- package/dist/components/motion/not-found/magnetic.d.ts.map +1 -1
- package/dist/components/motion/not-found/shared.d.ts +4 -5
- package/dist/components/motion/not-found/shared.d.ts.map +1 -1
- package/dist/components/motion/not-found/spotlight.d.ts +1 -2
- package/dist/components/motion/not-found/spotlight.d.ts.map +1 -1
- package/dist/components/motion/not-found/stacked.d.ts +1 -2
- package/dist/components/motion/not-found/stacked.d.ts.map +1 -1
- package/dist/components/motion/not-found/terminal.d.ts +1 -2
- package/dist/components/motion/not-found/terminal.d.ts.map +1 -1
- package/dist/components/motion/notification-stack.d.ts +4 -5
- package/dist/components/motion/notification-stack.d.ts.map +1 -1
- package/dist/components/motion/notification-stack.js +1 -1
- package/dist/components/motion/number-ticker.d.ts +2 -3
- package/dist/components/motion/number-ticker.d.ts.map +1 -1
- package/dist/components/motion/otp-input.d.ts +3 -4
- package/dist/components/motion/otp-input.d.ts.map +1 -1
- package/dist/components/motion/overflow-actions.d.ts +5 -6
- package/dist/components/motion/overflow-actions.d.ts.map +1 -1
- package/dist/components/motion/overflow-actions.js +1 -1
- package/dist/components/motion/parallax.d.ts +2 -3
- package/dist/components/motion/parallax.d.ts.map +1 -1
- package/dist/components/motion/popover-morph.d.ts +6 -7
- package/dist/components/motion/popover-morph.d.ts.map +1 -1
- package/dist/components/motion/popover.d.ts +6 -7
- package/dist/components/motion/popover.d.ts.map +1 -1
- package/dist/components/motion/preview-rail.d.ts +3 -4
- package/dist/components/motion/preview-rail.d.ts.map +1 -1
- package/dist/components/motion/project-folder.d.ts +3 -4
- package/dist/components/motion/project-folder.d.ts.map +1 -1
- package/dist/components/motion/project-folder.js +1 -1
- package/dist/components/motion/pull-to-refresh.d.ts +3 -4
- package/dist/components/motion/pull-to-refresh.d.ts.map +1 -1
- package/dist/components/motion/radio.d.ts +4 -5
- package/dist/components/motion/radio.d.ts.map +1 -1
- package/dist/components/motion/range-slider-bubble.d.ts +2 -3
- package/dist/components/motion/range-slider-bubble.d.ts.map +1 -1
- package/dist/components/motion/range-slider-fluid.d.ts +2 -3
- package/dist/components/motion/range-slider-fluid.d.ts.map +1 -1
- package/dist/components/motion/range-slider-ruler.d.ts +2 -3
- package/dist/components/motion/range-slider-ruler.d.ts.map +1 -1
- package/dist/components/motion/range-slider-wave.d.ts +2 -3
- package/dist/components/motion/range-slider-wave.d.ts.map +1 -1
- package/dist/components/motion/range-slider.d.ts +2 -3
- package/dist/components/motion/range-slider.d.ts.map +1 -1
- package/dist/components/motion/scroll-progress.d.ts +4 -5
- package/dist/components/motion/scroll-progress.d.ts.map +1 -1
- package/dist/components/motion/scroll-reveal.d.ts +2 -3
- package/dist/components/motion/scroll-reveal.d.ts.map +1 -1
- package/dist/components/motion/scroll-to.d.ts +2 -3
- package/dist/components/motion/scroll-to.d.ts.map +1 -1
- package/dist/components/motion/select-morph.d.ts +10 -11
- package/dist/components/motion/select-morph.d.ts.map +1 -1
- package/dist/components/motion/select-morph.js +1 -1
- package/dist/components/motion/select.d.ts +10 -11
- package/dist/components/motion/select.d.ts.map +1 -1
- package/dist/components/motion/select.js +1 -1
- package/dist/components/motion/shader-background.d.ts +4 -5
- package/dist/components/motion/shader-background.d.ts.map +1 -1
- package/dist/components/motion/shared-layout-bg.d.ts +2 -3
- package/dist/components/motion/shared-layout-bg.d.ts.map +1 -1
- package/dist/components/motion/signup-form.d.ts +7 -8
- package/dist/components/motion/signup-form.d.ts.map +1 -1
- package/dist/components/motion/signup-form.js +7 -3
- package/dist/components/motion/signup-form.js.map +1 -1
- package/dist/components/motion/slide-action-button.d.ts +2 -3
- package/dist/components/motion/slide-action-button.d.ts.map +1 -1
- package/dist/components/motion/smooth-scroll.d.ts +6 -7
- package/dist/components/motion/smooth-scroll.d.ts.map +1 -1
- package/dist/components/motion/swipeable-list.d.ts +8 -9
- package/dist/components/motion/swipeable-list.d.ts.map +1 -1
- package/dist/components/motion/switch.d.ts +2 -3
- package/dist/components/motion/switch.d.ts.map +1 -1
- package/dist/components/motion/table/editable-cell.d.ts +1 -2
- package/dist/components/motion/table/editable-cell.d.ts.map +1 -1
- package/dist/components/motion/table/index.d.ts +2 -2
- package/dist/components/motion/table/index.d.ts.map +1 -1
- package/dist/components/motion/table/index.js.map +1 -1
- package/dist/components/motion/table/row-handle.d.ts +1 -2
- package/dist/components/motion/table/row-handle.d.ts.map +1 -1
- package/dist/components/motion/table/row-handle.js +1 -1
- package/dist/components/motion/table/skeleton-rows.d.ts +1 -2
- package/dist/components/motion/table/skeleton-rows.d.ts.map +1 -1
- package/dist/components/motion/table/table-header.d.ts +2 -3
- package/dist/components/motion/table/table-header.d.ts.map +1 -1
- package/dist/components/motion/table/table-header.js +1 -1
- package/dist/components/motion/table/table-menu.d.ts +2 -3
- package/dist/components/motion/table/table-menu.d.ts.map +1 -1
- package/dist/components/motion/tabs.d.ts +4 -5
- package/dist/components/motion/tabs.d.ts.map +1 -1
- package/dist/components/motion/text-cascade.d.ts +2 -3
- package/dist/components/motion/text-cascade.d.ts.map +1 -1
- package/dist/components/motion/text-reveal.d.ts +2 -3
- package/dist/components/motion/text-reveal.d.ts.map +1 -1
- package/dist/components/motion/text-scramble.d.ts +2 -3
- package/dist/components/motion/text-scramble.d.ts.map +1 -1
- package/dist/components/motion/text-shimmer.d.ts +2 -3
- package/dist/components/motion/text-shimmer.d.ts.map +1 -1
- package/dist/components/motion/theme-toggle.d.ts +5 -6
- package/dist/components/motion/theme-toggle.d.ts.map +1 -1
- package/dist/components/motion/theme-toggle.js +1 -1
- package/dist/components/motion/tilt-card.d.ts +2 -3
- package/dist/components/motion/tilt-card.d.ts.map +1 -1
- package/dist/components/motion/tooltip.d.ts +2 -3
- package/dist/components/motion/tooltip.d.ts.map +1 -1
- package/dist/components/motion/wheel-picker.d.ts +3 -4
- package/dist/components/motion/wheel-picker.d.ts.map +1 -1
- package/dist/components/reui/alert.d.ts +1 -1
- package/dist/components/reui/alert.js +1 -1
- package/dist/components/reui/autocomplete.d.ts +3 -3
- package/dist/components/reui/autocomplete.d.ts.map +1 -1
- package/dist/components/reui/autocomplete.js +1 -1
- package/dist/components/reui/badge.d.ts +2 -2
- package/dist/components/reui/cascader/cascader-async.d.ts +8 -9
- package/dist/components/reui/cascader/cascader-async.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-async.js.map +1 -1
- package/dist/components/reui/cascader/cascader-columns.d.ts +3 -3
- package/dist/components/reui/cascader/cascader-columns.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-columns.js +1 -1
- package/dist/components/reui/cascader/cascader-context.d.ts +13 -13
- package/dist/components/reui/cascader/cascader-context.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-footer.d.ts +8 -8
- package/dist/components/reui/cascader/cascader-footer.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-footer.js +1 -1
- package/dist/components/reui/cascader/cascader-i18n.d.ts +3 -4
- package/dist/components/reui/cascader/cascader-i18n.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-item.d.ts +9 -9
- package/dist/components/reui/cascader/cascader-item.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-item.js +1 -1
- package/dist/components/reui/cascader/cascader-lib.d.ts +38 -39
- package/dist/components/reui/cascader/cascader-lib.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-nav.d.ts +6 -6
- package/dist/components/reui/cascader/cascader-nav.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-nav.js +1 -1
- package/dist/components/reui/cascader/cascader-virtual.d.ts +6 -6
- package/dist/components/reui/cascader/cascader-virtual.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-virtual.js.map +1 -1
- package/dist/components/reui/cascader/cascader.d.ts +19 -19
- package/dist/components/reui/cascader/cascader.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader.js +1 -1
- package/dist/components/reui/cascader/cascader.js.map +1 -1
- package/dist/components/reui/code-block/code-block-highlight.d.ts +32 -33
- package/dist/components/reui/code-block/code-block-highlight.d.ts.map +1 -1
- package/dist/components/reui/code-block/code-block.d.ts +7 -7
- package/dist/components/reui/code-block/code-block.d.ts.map +1 -1
- package/dist/components/reui/code-block/code-block.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-cell-selection.d.ts +117 -0
- package/dist/components/reui/data-grid/data-grid-cell-selection.d.ts.map +1 -0
- package/dist/components/reui/data-grid/data-grid-cell-selection.js +1554 -0
- package/dist/components/reui/data-grid/data-grid-cell-selection.js.map +1 -0
- package/dist/components/reui/data-grid/data-grid-column-filter.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-filter.js +7 -5
- package/dist/components/reui/data-grid/data-grid-column-filter.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-header.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-header.js +19 -13
- package/dist/components/reui/data-grid/data-grid-column-header.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-visibility.js +3 -2
- package/dist/components/reui/data-grid/data-grid-column-visibility.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-i18n.d.ts +2 -0
- package/dist/components/reui/data-grid/data-grid-i18n.js +53 -0
- package/dist/components/reui/data-grid/data-grid-i18n.js.map +1 -0
- package/dist/components/reui/data-grid/data-grid-pagination.js +15 -9
- package/dist/components/reui/data-grid/data-grid-pagination.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-scroll-area.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-scroll-area.js +3 -3
- package/dist/components/reui/data-grid/data-grid-scroll-area.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js +7 -5
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd.js +3 -3
- package/dist/components/reui/data-grid/data-grid-table-dnd.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts +17 -1
- package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-virtual.js +146 -50
- package/dist/components/reui/data-grid/data-grid-table-virtual.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table.d.ts +23 -4
- package/dist/components/reui/data-grid/data-grid-table.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table.js +215 -68
- package/dist/components/reui/data-grid/data-grid-table.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid.d.ts +288 -18
- package/dist/components/reui/data-grid/data-grid.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid.js +150 -15
- package/dist/components/reui/data-grid/data-grid.js.map +1 -1
- package/dist/components/reui/date-selector.d.ts +11 -12
- package/dist/components/reui/date-selector.d.ts.map +1 -1
- package/dist/components/reui/date-selector.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-event.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-month-view.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-nav.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar.d.ts.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar.js.map +1 -1
- package/dist/components/reui/filters/filters-advanced.d.ts +6 -7
- package/dist/components/reui/filters/filters-advanced.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-advanced.js +1 -1
- package/dist/components/reui/filters/filters-advanced.js.map +1 -1
- package/dist/components/reui/filters/filters-builder.d.ts +5 -5
- package/dist/components/reui/filters/filters-builder.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-builder.js +2 -2
- package/dist/components/reui/filters/filters-chip.d.ts +10 -11
- package/dist/components/reui/filters/filters-chip.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-chip.js +1 -1
- package/dist/components/reui/filters/filters-chip.js.map +1 -1
- package/dist/components/reui/filters/filters-context.d.ts +30 -30
- package/dist/components/reui/filters/filters-context.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-date.d.ts +13 -14
- package/dist/components/reui/filters/filters-date.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-dnd.d.ts +15 -16
- package/dist/components/reui/filters/filters-dnd.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-editors.d.ts +14 -14
- package/dist/components/reui/filters/filters-editors.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-editors.js +2 -2
- package/dist/components/reui/filters/filters-i18n.d.ts +4 -5
- package/dist/components/reui/filters/filters-i18n.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-lib.d.ts +34 -35
- package/dist/components/reui/filters/filters-lib.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-operators.d.ts +13 -14
- package/dist/components/reui/filters/filters-operators.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-query.d.ts +29 -30
- package/dist/components/reui/filters/filters-query.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-types.d.ts +31 -32
- package/dist/components/reui/filters/filters-types.d.ts.map +1 -1
- package/dist/components/reui/filters/filters.d.ts +5 -5
- package/dist/components/reui/filters/filters.d.ts.map +1 -1
- package/dist/components/reui/filters/filters.js +1 -1
- package/dist/components/reui/filters/filters.js.map +1 -1
- package/dist/components/reui/frame.d.ts +1 -1
- package/dist/components/reui/frame.js +1 -1
- package/dist/components/reui/gantt/gantt-bar.js +1 -1
- package/dist/components/reui/gantt/gantt-nav.js +1 -1
- package/dist/components/reui/gantt/gantt-view.js +1 -1
- package/dist/components/reui/gantt/gantt.d.ts.map +1 -1
- package/dist/components/reui/gantt/gantt.js.map +1 -1
- package/dist/components/reui/icon-tile.d.ts +2 -2
- package/dist/components/reui/kanban.d.ts +11 -11
- package/dist/components/reui/kanban.d.ts.map +1 -1
- package/dist/components/reui/number-field.d.ts +3 -3
- package/dist/components/reui/number-field.js +1 -1
- package/dist/components/reui/phone-input.js +1 -1
- package/dist/components/reui/rating.d.ts +1 -1
- package/dist/components/reui/rating.js +1 -1
- package/dist/components/reui/scrollspy.d.ts +1 -2
- package/dist/components/reui/scrollspy.d.ts.map +1 -1
- package/dist/components/reui/sortable.d.ts +6 -6
- package/dist/components/reui/sortable.d.ts.map +1 -1
- package/dist/components/reui/tree.js +1 -1
- package/dist/components/ui/accordion.js +1 -1
- package/dist/components/ui/alert-dialog.js +1 -1
- package/dist/components/ui/alert.js +1 -1
- package/dist/components/ui/attachment.d.ts +1 -1
- package/dist/components/ui/attachment.js +1 -1
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/breadcrumb.js +1 -1
- package/dist/components/ui/bubble.d.ts +1 -1
- package/dist/components/ui/bubble.js +1 -1
- package/dist/components/ui/button-group.js +1 -1
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/calendar.js +1 -1
- package/dist/components/ui/carousel.js +1 -1
- package/dist/components/ui/chart.d.ts +2 -2
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +1 -1
- package/dist/components/ui/combobox.js +1 -1
- package/dist/components/ui/command.js +1 -1
- package/dist/components/ui/context-menu.js +1 -1
- package/dist/components/ui/dialog.js +1 -1
- package/dist/components/ui/dropdown-menu.js +1 -1
- package/dist/components/ui/empty.js +1 -1
- package/dist/components/ui/field.js +1 -1
- package/dist/components/ui/input-group.d.ts +1 -1
- package/dist/components/ui/input-group.js +1 -1
- package/dist/components/ui/input-otp.js +1 -1
- package/dist/components/ui/item.d.ts +2 -2
- package/dist/components/ui/item.js +1 -1
- package/dist/components/ui/marker.js +1 -1
- package/dist/components/ui/menubar.js +1 -1
- package/dist/components/ui/message-scroller.js +2 -2
- package/dist/components/ui/message-scroller.js.map +1 -1
- package/dist/components/ui/native-select.js +1 -1
- package/dist/components/ui/navigation-menu.js +1 -1
- package/dist/components/ui/pagination.js +1 -1
- package/dist/components/ui/questionnaire.js +1 -1
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/sheet.js +1 -1
- package/dist/components/ui/sidebar.d.ts +2 -2
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/spinner.js +1 -1
- package/dist/components/ui/tabs.js +1 -1
- package/dist/components/ui/toast.js +1 -1
- package/dist/components/ui/toggle.d.ts +2 -2
- package/dist/components/ui/toggle.js +1 -1
- package/dist/{copy-menu-C5GaT4Z-.js → copy-menu-TIKvPaAZ.js} +2 -2
- package/dist/{copy-menu-C5GaT4Z-.js.map → copy-menu-TIKvPaAZ.js.map} +1 -1
- package/dist/data-grid-i18n-TQR2PZlU.d.ts +54 -0
- package/dist/data-grid-i18n-TQR2PZlU.d.ts.map +1 -0
- package/dist/hooks/use-body-classes.d.ts +1 -2
- package/dist/hooks/use-body-classes.d.ts.map +1 -1
- package/dist/hooks/use-copy-to-clipboard.d.ts +1 -2
- package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -1
- package/dist/hooks/use-dismiss.d.ts +3 -4
- package/dist/hooks/use-dismiss.d.ts.map +1 -1
- package/dist/hooks/use-favicon.d.ts +1 -2
- package/dist/hooks/use-favicon.d.ts.map +1 -1
- package/dist/hooks/use-file-upload.d.ts +7 -8
- package/dist/hooks/use-file-upload.d.ts.map +1 -1
- package/dist/hooks/use-hover-capable.d.ts +1 -2
- package/dist/hooks/use-hover-capable.d.ts.map +1 -1
- package/dist/hooks/use-hover-gesture.d.ts +2 -3
- package/dist/hooks/use-hover-gesture.d.ts.map +1 -1
- package/dist/hooks/use-hydrated.d.ts +1 -2
- package/dist/hooks/use-hydrated.d.ts.map +1 -1
- package/dist/hooks/use-intersection-observer.d.ts +1 -2
- package/dist/hooks/use-intersection-observer.d.ts.map +1 -1
- package/dist/hooks/use-is-mac.d.ts +1 -2
- package/dist/hooks/use-is-mac.d.ts.map +1 -1
- package/dist/hooks/use-media-query.d.ts +1 -2
- package/dist/hooks/use-media-query.d.ts.map +1 -1
- package/dist/hooks/use-meta-color.d.ts +1 -2
- package/dist/hooks/use-meta-color.d.ts.map +1 -1
- package/dist/hooks/use-mobile.d.ts +1 -2
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/hooks/use-mutation-observer.d.ts +1 -2
- package/dist/hooks/use-mutation-observer.d.ts.map +1 -1
- package/dist/hooks/use-on-open.d.ts +1 -2
- package/dist/hooks/use-on-open.d.ts.map +1 -1
- package/dist/hooks/use-row-cursor.d.ts +1 -2
- package/dist/hooks/use-row-cursor.d.ts.map +1 -1
- package/dist/hooks/use-scroll-position.d.ts +1 -2
- package/dist/hooks/use-scroll-position.d.ts.map +1 -1
- package/dist/hooks/use-slider-input.d.ts +1 -2
- package/dist/hooks/use-slider-input.d.ts.map +1 -1
- package/dist/hooks/use-slider.d.ts +3 -4
- package/dist/hooks/use-slider.d.ts.map +1 -1
- package/dist/hooks/use-tap-gesture.d.ts +3 -4
- package/dist/hooks/use-tap-gesture.d.ts.map +1 -1
- package/dist/hooks/use-touch-capable.d.ts +1 -2
- package/dist/hooks/use-touch-capable.d.ts.map +1 -1
- package/dist/hooks/use-viewport.d.ts +1 -2
- package/dist/hooks/use-viewport.d.ts.map +1 -1
- package/dist/lib/ease.d.ts +10 -11
- package/dist/lib/ease.d.ts.map +1 -1
- package/dist/lib/favicon.d.ts +1 -2
- package/dist/lib/favicon.d.ts.map +1 -1
- package/dist/lib/text-shimmer.d.ts +3 -4
- package/dist/lib/text-shimmer.d.ts.map +1 -1
- package/dist/lib/tick-sound.d.ts +1 -2
- package/dist/lib/tick-sound.d.ts.map +1 -1
- package/dist/lib/touch.d.ts +6 -7
- package/dist/lib/touch.d.ts.map +1 -1
- package/dist/use-active-option-CmX6Z-4S.js +86 -0
- package/dist/use-active-option-CmX6Z-4S.js.map +1 -0
- package/package.json +6 -6
- package/dist/context-BizvUNZv.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
//#region src/components/motion/tabs.d.ts
|
|
3
3
|
type Variant = "pill" | "underline" | "segment";
|
|
4
|
-
declare function Tabs({ defaultValue, value, onValueChange, variant, children, className }: {
|
|
4
|
+
export declare function Tabs({ defaultValue, value, onValueChange, variant, children, className }: {
|
|
5
5
|
defaultValue?: string;
|
|
6
6
|
value?: string;
|
|
7
7
|
onValueChange?: (v: string) => void;
|
|
@@ -9,21 +9,20 @@ declare function Tabs({ defaultValue, value, onValueChange, variant, children, c
|
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
className?: string;
|
|
11
11
|
}): import("react").JSX.Element;
|
|
12
|
-
declare function TabsList({ children, className }: {
|
|
12
|
+
export declare function TabsList({ children, className }: {
|
|
13
13
|
children: ReactNode;
|
|
14
14
|
className?: string;
|
|
15
15
|
}): import("react").JSX.Element;
|
|
16
|
-
declare function TabsTrigger({ value, children, className, indicatorClassName }: {
|
|
16
|
+
export declare function TabsTrigger({ value, children, className, indicatorClassName }: {
|
|
17
17
|
value: string;
|
|
18
18
|
children: ReactNode;
|
|
19
19
|
className?: string;
|
|
20
20
|
indicatorClassName?: string;
|
|
21
21
|
}): import("react").JSX.Element;
|
|
22
|
-
declare function TabsContent({ value, children, className }: {
|
|
22
|
+
export declare function TabsContent({ value, children, className }: {
|
|
23
23
|
value: string;
|
|
24
24
|
children: ReactNode;
|
|
25
25
|
className?: string;
|
|
26
26
|
}): import("react").JSX.Element;
|
|
27
27
|
//#endregion
|
|
28
|
-
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
29
28
|
//# sourceMappingURL=tabs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.d.ts","names":[],"sources":["../../../src/components/motion/tabs.tsx"],"mappings":";;KAgBK;
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","names":[],"sources":["../../../src/components/motion/tabs.tsx"],"mappings":";;KAgBK;wBA0BW,OACd,cACA,OACA,eACA,SACA,UACA;EAEA;EACA;EACA,iBAAiB;EACjB,UAAU;EACV,UAAU;EACV;oBACD,IAAA;wBAsCe,WAAW,UAAU;EAAe,UAAU;EAAW;oBAAoB,IAAA;wBAS7E,cACd,OACA,UACA,WACA;EAEA;EACA,UAAU;EACV;EACA;oBACD,IAAA;wBA4De,cACd,OACA,UACA;EAEA;EACA,UAAU;EACV;oBACD,IAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/components/motion/text-cascade.d.ts
|
|
2
|
-
interface TextCascadeProps {
|
|
2
|
+
export interface TextCascadeProps {
|
|
3
3
|
/** Current text. Changing it cascades the letters to the new value. */
|
|
4
4
|
text: string;
|
|
5
5
|
className?: string;
|
|
@@ -9,7 +9,6 @@ interface TextCascadeProps {
|
|
|
9
9
|
* as the new ones land, left to right. Same motion as the action-swap
|
|
10
10
|
* cascade variant, with a text-first API.
|
|
11
11
|
*/
|
|
12
|
-
declare function TextCascade({ text, className }: TextCascadeProps): import("react").JSX.Element;
|
|
12
|
+
export declare function TextCascade({ text, className }: TextCascadeProps): import("react").JSX.Element;
|
|
13
13
|
//#endregion
|
|
14
|
-
export { TextCascade, TextCascadeProps };
|
|
15
14
|
//# sourceMappingURL=text-cascade.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-cascade.d.ts","names":[],"sources":["../../../src/components/motion/text-cascade.tsx"],"mappings":";
|
|
1
|
+
{"version":3,"file":"text-cascade.d.ts","names":[],"sources":["../../../src/components/motion/text-cascade.tsx"],"mappings":";iBAIiB;;EAEf;EACA;;;;;;;wBAQc,cAAc,MAAM,aAAa,mCAAgB,IAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ElementType, ReactNode } from "react";
|
|
2
2
|
//#region src/components/motion/text-reveal.d.ts
|
|
3
3
|
type SplitMode = "word" | "char";
|
|
4
|
-
interface TextRevealProps {
|
|
4
|
+
export interface TextRevealProps {
|
|
5
5
|
text: string | string[];
|
|
6
6
|
as?: ElementType;
|
|
7
7
|
className?: string;
|
|
@@ -19,7 +19,6 @@ interface TextRevealProps {
|
|
|
19
19
|
whileInView?: boolean;
|
|
20
20
|
children?: ReactNode;
|
|
21
21
|
}
|
|
22
|
-
declare function TextReveal({ text, as: Comp, className, split, stagger, delay, blur, yOffset, spring, once, whileInView, children }: TextRevealProps): import("react").JSX.Element;
|
|
22
|
+
export declare function TextReveal({ text, as: Comp, className, split, stagger, delay, blur, yOffset, spring, once, whileInView, children }: TextRevealProps): import("react").JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
|
-
export { TextReveal, TextRevealProps };
|
|
25
24
|
//# sourceMappingURL=text-reveal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-reveal.d.ts","names":[],"sources":["../../../src/components/motion/text-reveal.tsx"],"mappings":";;KAQK;
|
|
1
|
+
{"version":3,"file":"text-reveal.d.ts","names":[],"sources":["../../../src/components/motion/text-reveal.tsx"],"mappings":";;KAQK;iBAEY;EACf;EACA,KAAK;EACL;EACA,QAAQ;EACR;EACA;EACA;EACA;EACA;IAAW;IAAoB;IAAkB;;EACjD;EACA;EACA,WAAW;;wBAsBG,aACd,MACA,IAAI,MACJ,WACA,OACA,SACA,OACA,MACA,SACA,QACA,MACA,aACA,YACC,kCAAe,IAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CSSProperties } from "react";
|
|
2
2
|
//#region src/components/motion/text-scramble.d.ts
|
|
3
|
-
interface TextScrambleProps {
|
|
3
|
+
export interface TextScrambleProps {
|
|
4
4
|
/** Final text revealed by the scramble animation. */
|
|
5
5
|
text: string;
|
|
6
6
|
/** Maximum animation duration in milliseconds. */
|
|
@@ -11,7 +11,6 @@ interface TextScrambleProps {
|
|
|
11
11
|
style?: CSSProperties;
|
|
12
12
|
}
|
|
13
13
|
/** Character scramble that resolves to `text` and respects reduced motion. */
|
|
14
|
-
declare function TextScramble({ text, duration, glyphs, className, style }: TextScrambleProps): import("react").JSX.Element;
|
|
14
|
+
export declare function TextScramble({ text, duration, glyphs, className, style }: TextScrambleProps): import("react").JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
|
-
export { TextScramble, TextScrambleProps };
|
|
17
16
|
//# sourceMappingURL=text-scramble.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-scramble.d.ts","names":[],"sources":["../../../src/components/motion/text-scramble.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"text-scramble.d.ts","names":[],"sources":["../../../src/components/motion/text-scramble.tsx"],"mappings":";;iBASiB;;EAEf;;EAEA;;EAEA;EACA;EACA,QAAQ;;;wBAIM,eACd,MACA,UACA,QACA,WACA,SACC,oCAAiB,IAAA"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { ElementType, ReactNode } from "react";
|
|
2
2
|
//#region src/components/motion/text-shimmer.d.ts
|
|
3
|
-
interface TextShimmerProps {
|
|
3
|
+
export interface TextShimmerProps {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
as?: ElementType;
|
|
6
6
|
duration?: number;
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
|
-
declare function TextShimmer({ children, as: Comp, duration, className }: TextShimmerProps): import("react").JSX.Element;
|
|
9
|
+
export declare function TextShimmer({ children, as: Comp, duration, className }: TextShimmerProps): import("react").JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { TextShimmer, TextShimmerProps };
|
|
12
11
|
//# sourceMappingURL=text-shimmer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-shimmer.d.ts","names":[],"sources":["../../../src/components/motion/text-shimmer.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"text-shimmer.d.ts","names":[],"sources":["../../../src/components/motion/text-shimmer.tsx"],"mappings":";;iBAWiB;EACf,UAAU;EACV,KAAK;EACL;EACA;;wBAGc,cACd,UACA,IAAI,MACJ,UACA,aACC,mCAAgB,IAAA"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from "react";
|
|
2
2
|
//#region src/components/motion/theme-toggle.d.ts
|
|
3
|
-
type ThemeVariant = "rectangle" | "circle" | "circle-blur" | "blinds";
|
|
4
|
-
type RectStart = "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center" | "bottom-up";
|
|
5
|
-
interface ThemeToggleProps extends Omit<ComponentPropsWithoutRef<"button">, "children" | "onClick"> {
|
|
3
|
+
export type ThemeVariant = "rectangle" | "circle" | "circle-blur" | "blinds";
|
|
4
|
+
export type RectStart = "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center" | "bottom-up";
|
|
5
|
+
export interface ThemeToggleProps extends Omit<ComponentPropsWithoutRef<"button">, "children" | "onClick"> {
|
|
6
6
|
/** Animation variant. Default: "rectangle". */
|
|
7
7
|
variant?: ThemeVariant;
|
|
8
8
|
/** Origin direction for the reveal. Default: "bottom-up". */
|
|
9
9
|
start?: RectStart;
|
|
10
10
|
iconClassName?: string;
|
|
11
11
|
}
|
|
12
|
-
declare function useThemeToggle({ variant, start }?: {
|
|
12
|
+
export declare function useThemeToggle({ variant, start }?: {
|
|
13
13
|
variant?: ThemeVariant;
|
|
14
14
|
start?: RectStart;
|
|
15
15
|
}): {
|
|
@@ -17,7 +17,6 @@ declare function useThemeToggle({ variant, start }?: {
|
|
|
17
17
|
mounted: boolean;
|
|
18
18
|
toggle: () => void;
|
|
19
19
|
};
|
|
20
|
-
declare function ThemeToggle({ variant, start, className, iconClassName, ...rest }: ThemeToggleProps): import("react").JSX.Element;
|
|
20
|
+
export declare function ThemeToggle({ variant, start, className, iconClassName, ...rest }: ThemeToggleProps): import("react").JSX.Element;
|
|
21
21
|
//#endregion
|
|
22
|
-
export { RectStart, ThemeToggle, ThemeToggleProps, ThemeVariant, useThemeToggle };
|
|
23
22
|
//# sourceMappingURL=theme-toggle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-toggle.d.ts","names":[],"sources":["../../../src/components/motion/theme-toggle.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"theme-toggle.d.ts","names":[],"sources":["../../../src/components/motion/theme-toggle.tsx"],"mappings":";;YAWY;YAEA;iBAQK,yBACP,KAAK;;EAEb,UAAU;;EAEV,QAAQ;EACR;;wBAiGc,iBACd,SACA;EAEA,UAAU;EACV,QAAQ;;;;;;wBAkDM,cACd,SACA,OACA,WACA,kBACG,QACF,mCAAgB,IAAA"}
|
|
@@ -4,9 +4,9 @@ import { ActionSwapIcon } from "./action-swap.js";
|
|
|
4
4
|
import { useEffect, useState } from "react";
|
|
5
5
|
import { cn } from "@kumix/utils";
|
|
6
6
|
import { useTheme } from "next-themes";
|
|
7
|
+
import { Moon, Sun } from "lucide-react";
|
|
7
8
|
import { jsx } from "react/jsx-runtime";
|
|
8
9
|
import { useReducedMotion } from "motion/react";
|
|
9
|
-
import { Moon, Sun } from "lucide-react";
|
|
10
10
|
//#region src/components/motion/theme-toggle.tsx
|
|
11
11
|
const VT_STYLE_ID = "beui-theme-toggle-vt";
|
|
12
12
|
const VT_CSS = `
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
//#region src/components/motion/tilt-card.d.ts
|
|
3
|
-
interface TiltCardProps {
|
|
3
|
+
export interface TiltCardProps {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
max?: number;
|
|
6
6
|
glare?: boolean;
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
|
-
declare function TiltCard({ children, max, glare, className }: TiltCardProps): import("react").JSX.Element;
|
|
9
|
+
export declare function TiltCard({ children, max, glare, className }: TiltCardProps): import("react").JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { TiltCard, TiltCardProps };
|
|
12
11
|
//# sourceMappingURL=tilt-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tilt-card.d.ts","names":[],"sources":["../../../src/components/motion/tilt-card.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"tilt-card.d.ts","names":[],"sources":["../../../src/components/motion/tilt-card.tsx"],"mappings":";;iBAeiB;EACf,UAAU;EACV;EACA;EACA;;wBAGc,WAAW,UAAU,KAAU,OAAc,aAAa,gCAAa,IAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from "react";
|
|
2
2
|
//#region src/components/motion/tooltip.d.ts
|
|
3
3
|
type Side = "top" | "right" | "bottom" | "left";
|
|
4
|
-
interface TooltipProps {
|
|
4
|
+
export interface TooltipProps {
|
|
5
5
|
content: ReactNode;
|
|
6
6
|
children: ReactElement;
|
|
7
7
|
side?: Side;
|
|
@@ -11,7 +11,6 @@ interface TooltipProps {
|
|
|
11
11
|
/** Classes for the outer wrapper span. Use to fix baseline / fill parent. */
|
|
12
12
|
wrapperClassName?: string;
|
|
13
13
|
}
|
|
14
|
-
declare function Tooltip({ content, children, side, delay, className, wrapperClassName }: TooltipProps): import("react").JSX.Element;
|
|
14
|
+
export declare function Tooltip({ content, children, side, delay, className, wrapperClassName }: TooltipProps): import("react").JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
|
-
export { Tooltip, TooltipProps };
|
|
17
16
|
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","names":[],"sources":["../../../src/components/motion/tooltip.tsx"],"mappings":";;KAwBK;
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","names":[],"sources":["../../../src/components/motion/tooltip.tsx"],"mappings":";;KAwBK;iBAEY;EACf,SAAS;EACT,UAAU;EACV,OAAO;;EAEP;EACA;;EAEA;;wBA6Ec,UACd,SACA,UACA,MACA,OACA,WACA,oBACC,+BAAY,IAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
//#region src/components/motion/wheel-picker.d.ts
|
|
2
|
-
type WheelPickerOption = string | {
|
|
2
|
+
export type WheelPickerOption = string | {
|
|
3
3
|
label: string;
|
|
4
4
|
value: string;
|
|
5
5
|
};
|
|
6
|
-
interface WheelPickerProps {
|
|
6
|
+
export interface WheelPickerProps {
|
|
7
7
|
options: WheelPickerOption[];
|
|
8
8
|
value?: string;
|
|
9
9
|
defaultValue?: string;
|
|
@@ -18,7 +18,6 @@ interface WheelPickerProps {
|
|
|
18
18
|
className?: string;
|
|
19
19
|
"aria-label"?: string;
|
|
20
20
|
}
|
|
21
|
-
declare function WheelPicker({ options, value, defaultValue, onValueChange, visibleCount, itemHeight, disabled, sound, className, "aria-label": ariaLabel }: WheelPickerProps): import("react").JSX.Element;
|
|
21
|
+
export declare function WheelPicker({ options, value, defaultValue, onValueChange, visibleCount, itemHeight, disabled, sound, className, "aria-label": ariaLabel }: WheelPickerProps): import("react").JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
|
-
export { WheelPicker, WheelPickerOption, WheelPickerProps };
|
|
24
23
|
//# sourceMappingURL=wheel-picker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wheel-picker.d.ts","names":[],"sources":["../../../src/components/motion/wheel-picker.tsx"],"mappings":";
|
|
1
|
+
{"version":3,"file":"wheel-picker.d.ts","names":[],"sources":["../../../src/components/motion/wheel-picker.tsx"],"mappings":";YAiBY;EAA+B;EAAe;;iBAEzC;EACf,SAAS;EACT;EACA;EACA,iBAAiB;;EAEjB;;EAEA;EACA;;EAEA;EACA;EACA;;wBA2Bc,cACd,SACA,OACA,cACA,eACA,cACA,YACA,UACA,OACA,yBACc,aACb,mCAAgB,IAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from "class-variance-authority";
|
|
2
2
|
//#region src/components/reui/alert.d.ts
|
|
3
3
|
declare const alertVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "
|
|
4
|
+
variant?: "default" | "destructive" | "success" | "info" | "warning" | "invert" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): import("react").JSX.Element;
|
|
7
7
|
declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "@kumix/utils";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { cva } from "class-variance-authority";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/reui/alert.tsx
|
|
6
6
|
const alertVariants = cva([
|
|
7
7
|
"relative grid w-full grid-cols-[0_1fr] items-center gap-y-0.5 border text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*3)_1fr] [&>svg:not([class*=size-])]:size-4",
|
|
@@ -2,7 +2,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import { Autocomplete as Autocomplete$1 } from "@base-ui/react/autocomplete";
|
|
3
3
|
//#region src/components/reui/autocomplete.d.ts
|
|
4
4
|
declare const inputVariants: (props?: ({
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "sm" | "default" | "lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
declare const Autocomplete: typeof Autocomplete$1.Root;
|
|
8
8
|
declare function AutocompleteValue({ ...props }: Autocomplete$1.Value.Props): import("react").JSX.Element;
|
|
@@ -22,7 +22,7 @@ declare function AutocompleteList({ className, scrollAreaClassName, ...props }:
|
|
|
22
22
|
declare function AutocompleteCollection({ ...props }: React.ComponentProps<typeof Autocomplete$1.Collection>): import("react").JSX.Element;
|
|
23
23
|
declare function AutocompleteRow({ className, ...props }: React.ComponentProps<typeof Autocomplete$1.Row>): import("react").JSX.Element;
|
|
24
24
|
declare function AutocompleteItem({ className, ...props }: React.ComponentProps<typeof Autocomplete$1.Item>): import("react").JSX.Element;
|
|
25
|
-
interface AutocompleteContentProps extends React.ComponentProps<typeof Autocomplete$1.Popup> {
|
|
25
|
+
export interface AutocompleteContentProps extends React.ComponentProps<typeof Autocomplete$1.Popup> {
|
|
26
26
|
align?: Autocomplete$1.Positioner.Props["align"];
|
|
27
27
|
sideOffset?: Autocomplete$1.Positioner.Props["sideOffset"];
|
|
28
28
|
alignOffset?: Autocomplete$1.Positioner.Props["alignOffset"];
|
|
@@ -39,5 +39,5 @@ declare function AutocompleteTrigger({ className, ...props }: React.ComponentPro
|
|
|
39
39
|
declare function AutocompleteArrow({ ...props }: React.ComponentProps<typeof Autocomplete$1.Arrow>): import("react").JSX.Element;
|
|
40
40
|
declare function AutocompleteSeparator({ className, ...props }: React.ComponentProps<typeof Autocomplete$1.Separator>): import("react").JSX.Element;
|
|
41
41
|
//#endregion
|
|
42
|
-
export { Autocomplete, AutocompleteArrow, AutocompleteBackdrop, AutocompleteClear, AutocompleteCollection, AutocompleteContent,
|
|
42
|
+
export { Autocomplete, AutocompleteArrow, AutocompleteBackdrop, AutocompleteClear, AutocompleteCollection, AutocompleteContent, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteInput, AutocompleteItem, AutocompleteList, AutocompletePortal, AutocompletePositioner, AutocompleteRow, AutocompleteSeparator, AutocompleteStatus, AutocompleteTrigger, AutocompleteValue };
|
|
43
43
|
//# sourceMappingURL=autocomplete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete.d.ts","names":[],"sources":["../../../src/components/reui/autocomplete.tsx"],"mappings":";;;cASM,gBAAa;;6CAelB;cAEK,qBAAY,eAAA;iBAET,uBAAuB,SAAS,eAAsB,MAAM,wBAAK,IAAA;iBAIjE,oBACP,WACA,MACA,WACA,gBACG,SACF,KAAK,eAAsB,MAAM,iBAClC,oBAAoB;EAClB;EACA;oBACD,IAAA;iBAeM,qBAAqB,cAAc,SAAS,eAAsB,OAAO,wBAAK,IAAA;iBAU9E,wBAAwB,SAAS,eAAsB,OAAO,wBAAK,IAAA;iBAInE,0BAA0B,SAAS,eAAsB,SAAS,wBAAK,IAAA;iBAIvE,yBAAyB,cAAc,SAAS,eAAsB,WAAW,wBAAK,IAAA;iBAUtF,mBACP,WACA,wBACG,SACF,eAAsB,KAAK;EAC5B;EACA;EACA;oBACD,IAAA;iBAoBQ,4BACJ,SACF,MAAM,sBAAsB,eAAsB,8BAAW,IAAA;iBAIvD,kBACP,cACG,SACF,MAAM,sBAAsB,eAAsB,uBAAI,IAAA;iBAUhD,mBACP,cACG,SACF,MAAM,sBAAsB,eAAsB,wBAAK,IAAA;
|
|
1
|
+
{"version":3,"file":"autocomplete.d.ts","names":[],"sources":["../../../src/components/reui/autocomplete.tsx"],"mappings":";;;cASM,gBAAa;;6CAelB;cAEK,qBAAY,eAAA;iBAET,uBAAuB,SAAS,eAAsB,MAAM,wBAAK,IAAA;iBAIjE,oBACP,WACA,MACA,WACA,gBACG,SACF,KAAK,eAAsB,MAAM,iBAClC,oBAAoB;EAClB;EACA;oBACD,IAAA;iBAeM,qBAAqB,cAAc,SAAS,eAAsB,OAAO,wBAAK,IAAA;iBAU9E,wBAAwB,SAAS,eAAsB,OAAO,wBAAK,IAAA;iBAInE,0BAA0B,SAAS,eAAsB,SAAS,wBAAK,IAAA;iBAIvE,yBAAyB,cAAc,SAAS,eAAsB,WAAW,wBAAK,IAAA;iBAUtF,mBACP,WACA,wBACG,SACF,eAAsB,KAAK;EAC5B;EACA;EACA;oBACD,IAAA;iBAoBQ,4BACJ,SACF,MAAM,sBAAsB,eAAsB,8BAAW,IAAA;iBAIvD,kBACP,cACG,SACF,MAAM,sBAAsB,eAAsB,uBAAI,IAAA;iBAUhD,mBACP,cACG,SACF,MAAM,sBAAsB,eAAsB,wBAAK,IAAA;iBAgBzC,iCACP,MAAM,sBAAsB,eAAsB;EAC1D,QAAQ,eAAsB,WAAW;EACzC,aAAa,eAAsB,WAAW;EAC9C,cAAc,eAAsB,WAAW;EAC/C,OAAO,eAAsB,WAAW;EACxC,SAAS,eAAsB,WAAW;EAC1C;;iBAGO,sBACP,WACA,UACA,cACA,OACA,YACA,aACA,MACA,WACG,SACF,2CAAwB,IAAA;iBA4BlB,uBAAuB,SAAS,MAAM,sBAAsB,eAAsB,yBAAM,IAAA;iBAIxF,yBACP,cACG,SACF,MAAM,sBAAsB,eAAsB,8BAAW,IAAA;iBAUvD,oBACP,cACG,SACF,MAAM,sBAAsB,eAAsB,yBAAM,IAAA;iBAalD,oBACP,cACG,SACF,MAAM,sBAAsB,eAAsB,yBAAM,IAAA;iBAelD,sBACP,cACG,SACF,MAAM,sBAAsB,eAAsB,2BAAQ,IAAA;iBAepD,uBAAuB,SAAS,MAAM,sBAAsB,eAAsB,yBAAM,IAAA;iBAIxF,wBACP,cACG,SACF,MAAM,sBAAsB,eAAsB,6BAAU,IAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { ScrollArea } from "../ui/scroll-area.js";
|
|
3
3
|
import { cn } from "@kumix/utils";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { ChevronsUpDownIcon, XIcon } from "lucide-react";
|
|
6
5
|
import { cva } from "class-variance-authority";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { Autocomplete as Autocomplete$1 } from "@base-ui/react/autocomplete";
|
|
8
8
|
//#region src/components/reui/autocomplete.tsx
|
|
9
9
|
const inputVariants = cva("flex w-full rounded-lg border border-input bg-transparent text-foreground text-sm outline-none transition-colors placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [[readonly]]:cursor-not-allowed [[readonly]]:bg-muted/80", {
|
|
@@ -2,8 +2,8 @@ import { VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
3
3
|
//#region src/components/reui/badge.d.ts
|
|
4
4
|
declare const badgeVariants: (props?: ({
|
|
5
|
-
variant?: "
|
|
6
|
-
size?: "
|
|
5
|
+
variant?: "outline" | "default" | "destructive" | "secondary" | "success" | "info" | "warning" | "invert" | "focus" | "primary-light" | "warning-light" | "success-light" | "info-light" | "destructive-light" | "invert-light" | "focus-light" | "primary-outline" | "warning-outline" | "success-outline" | "info-outline" | "destructive-outline" | "invert-outline" | "focus-outline" | null | undefined;
|
|
6
|
+
size?: "xs" | "sm" | "default" | "lg" | "xl" | null | undefined;
|
|
7
7
|
radius?: "default" | "full" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
9
|
interface BadgeProps extends useRender.ComponentProps<"span"> {
|
|
@@ -9,19 +9,19 @@ import { c as CascaderLoadContext, d as CascaderLoadState, h as CascaderSearchCo
|
|
|
9
9
|
* `error` and no children means empty for real.
|
|
10
10
|
*/
|
|
11
11
|
/** Fetches one level. `node` is `null` for the root level. */
|
|
12
|
-
type CascaderGetChildren<T = unknown> = (node: CascaderNode<T> | null, context: CascaderLoadContext) => CascaderNode<T>[] | CascaderLoadResult<T> | Promise<CascaderNode<T>[] | CascaderLoadResult<T>>;
|
|
12
|
+
export type CascaderGetChildren<T = unknown> = (node: CascaderNode<T> | null, context: CascaderLoadContext) => CascaderNode<T>[] | CascaderLoadResult<T> | Promise<CascaderNode<T>[] | CascaderLoadResult<T>>;
|
|
13
13
|
/** Server-side search, replacing the local index scan while the query is set. */
|
|
14
|
-
type CascaderOnSearch<T = unknown> = (query: string, context: CascaderSearchContext) => CascaderNode<T>[] | CascaderLoadResult<T> | Promise<CascaderNode<T>[] | CascaderLoadResult<T>>;
|
|
14
|
+
export type CascaderOnSearch<T = unknown> = (query: string, context: CascaderSearchContext) => CascaderNode<T>[] | CascaderLoadResult<T> | Promise<CascaderNode<T>[] | CascaderLoadResult<T>>;
|
|
15
15
|
/** Resolves a selected value to its ancestor chain, root first, node last. */
|
|
16
|
-
type CascaderResolveValue<T = unknown> = (value: string, context: CascaderLoadContext) => CascaderNode<T>[] | Promise<CascaderNode<T>[]>;
|
|
17
|
-
interface CascaderLoaderStore<T = unknown> {
|
|
16
|
+
export type CascaderResolveValue<T = unknown> = (value: string, context: CascaderLoadContext) => CascaderNode<T>[] | Promise<CascaderNode<T>[]>;
|
|
17
|
+
export interface CascaderLoaderStore<T = unknown> {
|
|
18
18
|
/** Keyed by LEVEL: a parent's value, or `CASCADER_ROOT_KEY` for the root. */
|
|
19
19
|
pages: Map<string, CascaderNode<T>[]>;
|
|
20
20
|
states: Map<string, CascaderLoadState>;
|
|
21
21
|
/** Keyed by node value: search hits and resolved selections, level-less. */
|
|
22
22
|
detached: Map<string, CascaderNode<T>>;
|
|
23
23
|
}
|
|
24
|
-
interface UseCascaderLoaderOptions<T = unknown> {
|
|
24
|
+
export interface UseCascaderLoaderOptions<T = unknown> {
|
|
25
25
|
/** The index built from `items`, before any pages are merged in. */
|
|
26
26
|
base: CascaderIndex<T>;
|
|
27
27
|
getChildren?: CascaderGetChildren<T>;
|
|
@@ -48,7 +48,7 @@ interface UseCascaderLoaderOptions<T = unknown> {
|
|
|
48
48
|
/** Current selection, for `resolveValue`. */
|
|
49
49
|
values: string[];
|
|
50
50
|
}
|
|
51
|
-
interface CascaderLoader<T = unknown> {
|
|
51
|
+
export interface CascaderLoader<T = unknown> {
|
|
52
52
|
/** Whether a `getChildren` loader is configured at all. */
|
|
53
53
|
active: boolean;
|
|
54
54
|
store: CascaderLoaderStore<T>;
|
|
@@ -82,9 +82,8 @@ interface CascaderLoader<T = unknown> {
|
|
|
82
82
|
* The loader. A SIBLING of the `buildCascaderIndex` memo, never inside it: the
|
|
83
83
|
* build stays pure in `items`, the merge pure in that build plus this store.
|
|
84
84
|
*/
|
|
85
|
-
declare function useCascaderLoader<T = unknown>({ base, getChildren, onSearch, resolveValue, searchDebounce, loadKey, prefetch, onLoadError, enabled, query, levels, path, values }: UseCascaderLoaderOptions<T>): CascaderLoader<T>;
|
|
85
|
+
export declare function useCascaderLoader<T = unknown>({ base, getChildren, onSearch, resolveValue, searchDebounce, loadKey, prefetch, onLoadError, enabled, query, levels, path, values }: UseCascaderLoaderOptions<T>): CascaderLoader<T>;
|
|
86
86
|
/** One level's load state, `null` when never fetched. Omit for the root. */
|
|
87
|
-
declare function useCascaderLoadState(parent?: string | null): CascaderLoadState | null;
|
|
87
|
+
export declare function useCascaderLoadState(parent?: string | null): CascaderLoadState | null;
|
|
88
88
|
//#endregion
|
|
89
|
-
export { CascaderGetChildren, CascaderLoader, CascaderLoaderStore, CascaderOnSearch, CascaderResolveValue, UseCascaderLoaderOptions, useCascaderLoadState, useCascaderLoader };
|
|
90
89
|
//# sourceMappingURL=cascader-async.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cascader-async.d.ts","names":[],"sources":["../../../../src/components/reui/cascader/cascader-async.tsx"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"cascader-async.d.ts","names":[],"sources":["../../../../src/components/reui/cascader/cascader-async.tsx"],"mappings":";;;;;;;;;;;YA8BY,oBAAoB,gBAC9B,MAAM,aAAa,WACnB,SAAS,wBACN,aAAa,OAAO,mBAAmB,KAAK,QAAQ,aAAa,OAAO,mBAAmB;;YAGpF,iBAAiB,gBAC3B,eACA,SAAS,0BACN,aAAa,OAAO,mBAAmB,KAAK,QAAQ,aAAa,OAAO,mBAAmB;;YAGpF,qBAAqB,gBAC/B,eACA,SAAS,wBACN,aAAa,OAAO,QAAQ,aAAa;iBAE7B,oBAAoB;;EAEnC,OAAO,YAAY,aAAa;EAChC,QAAQ,YAAY;;EAEpB,UAAU,YAAY,aAAa;;iBAGpB,yBAAyB;;EAExC,MAAM,cAAc;EACpB,cAAc,oBAAoB;EAClC,WAAW,iBAAiB;EAC5B,eAAe,qBAAqB;;EAEpC;;EAEA;;EAEA;;EAEA,eAAe,gBAAgB;IAAW;IAAuB;;;EAEjE;EACA;;EAEA;;EAEA;;EAEA;;iBAGe,eAAe;;EAE9B;EACA,OAAO,oBAAoB;EAC3B,QAAQ,oBAAoB;;;;;EAK5B,eAAe,aAAa;EAC5B,aAAa;;;;;;;EAOb,cAAc,mBAAmB,QAAQ;;EAEzC,WAAW;;EAEX,aAAa;;EAEb,eAAe,MAAM,aAAa;;;;;EAKlC,kBAAkB;;;;;;wBA4JJ,kBAAkB,eAChC,MACA,aACA,UACA,cACA,gBACA,SACA,UACA,aACA,SACA,OACA,QACA,MACA,UACC,yBAAyB,KAAK,eAAe;;wBAwhBhC,qBAAqB,yBAAyB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cascader-async.js","names":["React"],"sources":["../../../../src/components/reui/cascader/cascader-async.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport { useCascaderState } from \"./cascader-context\";\nimport { CASCADER_ROOT_KEY, isCascaderMoreNode } from \"./cascader-lib\";\nimport type {\n CascaderIndex,\n CascaderLoadContext,\n CascaderLoadReason,\n CascaderLoadResult,\n CascaderLoadState,\n CascaderNode,\n CascaderSearchContext,\n} from \"./cascader-types\";\n\n/**\n * Async data for the cascader. Loaded pages live in their own store and are\n * MERGED onto the index built from `items`, never folded into that build:\n * `items` changes identity on any parent re-render, and folding would discard\n * every level the user drilled into. Map membership is the load discriminator:\n * no `states` entry means never fetched, while an entry with no `loading`, no\n * `error` and no children means empty for real.\n */\n\n/* -------------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------------- */\n\n/** Fetches one level. `node` is `null` for the root level. */\nexport type CascaderGetChildren<T = unknown> = (\n node: CascaderNode<T> | null,\n context: CascaderLoadContext,\n) => CascaderNode<T>[] | CascaderLoadResult<T> | Promise<CascaderNode<T>[] | CascaderLoadResult<T>>;\n\n/** Server-side search, replacing the local index scan while the query is set. */\nexport type CascaderOnSearch<T = unknown> = (\n query: string,\n context: CascaderSearchContext,\n) => CascaderNode<T>[] | CascaderLoadResult<T> | Promise<CascaderNode<T>[] | CascaderLoadResult<T>>;\n\n/** Resolves a selected value to its ancestor chain, root first, node last. */\nexport type CascaderResolveValue<T = unknown> = (\n value: string,\n context: CascaderLoadContext,\n) => CascaderNode<T>[] | Promise<CascaderNode<T>[]>;\n\nexport interface CascaderLoaderStore<T = unknown> {\n /** Keyed by LEVEL: a parent's value, or `CASCADER_ROOT_KEY` for the root. */\n pages: Map<string, CascaderNode<T>[]>;\n states: Map<string, CascaderLoadState>;\n /** Keyed by node value: search hits and resolved selections, level-less. */\n detached: Map<string, CascaderNode<T>>;\n}\n\nexport interface UseCascaderLoaderOptions<T = unknown> {\n /** The index built from `items`, before any pages are merged in. */\n base: CascaderIndex<T>;\n getChildren?: CascaderGetChildren<T>;\n onSearch?: CascaderOnSearch<T>;\n resolveValue?: CascaderResolveValue<T>;\n /** Milliseconds of quiet before `onSearch` fires. */\n searchDebounce?: number;\n /** Changing this drops every cached page, state and detached node. */\n loadKey?: unknown;\n /** Speculatively fetch a branch's children when it is highlighted. */\n prefetch?: boolean;\n /** Called when a request fails. Never for an aborted or superseded one. */\n onLoadError?: (error: unknown, context: { parent: string | null; reason: string }) => void;\n /** Whether the panel is live: the popup is open, or the cascader is inline. */\n enabled: boolean;\n query: string;\n /** Level keys that are currently on screen. Root is `CASCADER_ROOT_KEY`. */\n levels: string[];\n /** The navigation path, handed to `onSearch` as its scope. */\n path: string[];\n /** Current selection, for `resolveValue`. */\n values: string[];\n}\n\nexport interface CascaderLoader<T = unknown> {\n /** Whether a `getChildren` loader is configured at all. */\n active: boolean;\n store: CascaderLoaderStore<T>;\n states: ReadonlyMap<string, CascaderLoadState>;\n /**\n * Async search hits, `null` when no `onSearch` is running. EMPTY while the\n * first request is in flight, so the level behind is not shown as the answer.\n */\n searchResults: CascaderNode<T>[] | null;\n searchState: CascaderLoadState | null;\n /**\n * Fetches a level's FIRST page. No-ops on a `states` entry (in flight,\n * loaded or failed) or when `items` fills the level; pages are never\n * consulted, so a `resolveValue` chain still fetches. The level effect fires\n * only for on-screen levels, so a branch merely PRESSED is asked for by hand.\n */\n ensureLevel: (parentKey: string, reason: CascaderLoadReason) => void;\n /** Fetches the next page of a level. No-ops unless one is available. */\n loadMore: (parentKey: string) => void;\n /** Refires a failed level. No-ops unless that level is in an error state. */\n retryLevel: (parentKey: string) => void;\n /** Schedules a speculative fetch. Safe to call on every highlight move. */\n prefetchNode: (node: CascaderNode<T> | null | undefined) => void;\n /**\n * Evicts ONE level: aborts its request, drops its `states`/`pages` entries\n * and paging latch, so the level effect refetches it. `null` = root level.\n */\n invalidateLevel: (value: string | null) => void;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Constants */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Highlight dwell before `prefetch` fetches: long enough that holding ArrowDown\n * does not fire a request per row, short enough to beat the ArrowRight press.\n */\nconst PREFETCH_DELAY = 150;\n\n/** Request keys for the two non-level requests. Never collide with a value. */\nconst SEARCH_KEY = \"\\u0000search\";\nconst RESOLVE_PREFIX = \"\\u0000resolve:\";\n\nconst NO_STATE: CascaderLoadState = {\n loading: false,\n error: false,\n hasMore: false,\n};\n\n/** Stable empty result, so an idle search never churns the state context. */\nconst NO_RESULTS: CascaderNode<never>[] = [];\n\nfunction createStore<T>(): CascaderLoaderStore<T> {\n return { pages: new Map(), states: new Map(), detached: new Map() };\n}\n\nfunction sameLoadState(a: CascaderLoadState, b: CascaderLoadState): boolean {\n return (\n a.loading === b.loading &&\n a.error === b.error &&\n a.hasMore === b.hasMore &&\n a.cursor === b.cursor\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Store transitions */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Copy-on-write, and a NO-OP when nothing changed: the merged index is memoised\n * on store identity, so a fresh object for an unchanged state would rebuild it.\n */\nfunction withLoadState<T>(\n store: CascaderLoaderStore<T>,\n key: string,\n update: (state: CascaderLoadState) => CascaderLoadState,\n): CascaderLoaderStore<T> {\n const current = store.states.get(key) ?? NO_STATE;\n const next = update(current);\n if (store.states.has(key) && sameLoadState(current, next)) return store;\n const states = new Map(store.states);\n states.set(key, next);\n return { pages: store.pages, states, detached: store.detached };\n}\n\nfunction withPage<T>(\n store: CascaderLoaderStore<T>,\n key: string,\n items: readonly CascaderNode<T>[],\n options: { append: boolean; hasMore: boolean; cursor?: string },\n): CascaderLoaderStore<T> {\n // A fresh level REPLACES its page so a `resolveValue` stub can be superseded.\n const previous = options.append ? (store.pages.get(key) ?? []) : [];\n const seen = new Set(previous.map((node) => node.value));\n const merged = previous.slice();\n for (const item of items) {\n if (seen.has(item.value)) continue;\n seen.add(item.value);\n merged.push(item);\n }\n\n const pages = new Map(store.pages);\n pages.set(key, merged);\n const states = new Map(store.states);\n states.set(key, {\n loading: false,\n error: false,\n hasMore: options.hasMore,\n cursor: options.cursor,\n });\n return { pages, states, detached: store.detached };\n}\n\nfunction withDetached<T>(\n store: CascaderLoaderStore<T>,\n items: readonly CascaderNode<T>[],\n): CascaderLoaderStore<T> {\n let detached: Map<string, CascaderNode<T>> | null = null;\n for (const item of items) {\n if (store.detached.get(item.value) === item) continue;\n detached = detached ?? new Map(store.detached);\n detached.set(item.value, item);\n }\n if (!detached) return store;\n return { pages: store.pages, states: store.states, detached };\n}\n\n/**\n * Places a resolved ancestor chain into `pages`, root first. Writes no\n * `states`, so those levels still read as unloaded and a drill-in still fetches\n * for real. Mirrored into `detached` so the trigger keeps its label.\n */\nfunction withChain<T>(\n store: CascaderLoaderStore<T>,\n chain: readonly CascaderNode<T>[],\n): CascaderLoaderStore<T> {\n if (chain.length === 0) return store;\n const pages = new Map(store.pages);\n const detached = new Map(store.detached);\n let parentKey = CASCADER_ROOT_KEY;\n\n for (const node of chain) {\n const bucket = pages.get(parentKey);\n if (!bucket) {\n pages.set(parentKey, [node]);\n } else if (!bucket.some((entry) => entry.value === node.value)) {\n pages.set(parentKey, [...bucket, node]);\n }\n detached.set(node.value, node);\n parentKey = node.value;\n }\n\n return { pages, states: store.states, detached };\n}\n\n/* -------------------------------------------------------------------------- */\n/* Hook */\n/* -------------------------------------------------------------------------- */\n\ninterface CascaderLoaderLatest<T> {\n base: CascaderIndex<T>;\n store: CascaderLoaderStore<T>;\n getChildren?: CascaderGetChildren<T>;\n onSearch?: CascaderOnSearch<T>;\n resolveValue?: CascaderResolveValue<T>;\n onLoadError?: (error: unknown, context: { parent: string | null; reason: string }) => void;\n prefetch: boolean;\n path: string[];\n}\n\ninterface CascaderSearchSlice<T> {\n query: string;\n results: CascaderNode<T>[];\n loading: boolean;\n error: boolean;\n}\n\n/**\n * The loader. A SIBLING of the `buildCascaderIndex` memo, never inside it: the\n * build stays pure in `items`, the merge pure in that build plus this store.\n */\nexport function useCascaderLoader<T = unknown>({\n base,\n getChildren,\n onSearch,\n resolveValue,\n searchDebounce = 250,\n loadKey,\n prefetch = false,\n onLoadError,\n enabled,\n query,\n levels,\n path,\n values,\n}: UseCascaderLoaderOptions<T>): CascaderLoader<T> {\n const [store, setStore] = React.useState<CascaderLoaderStore<T>>(createStore);\n const [search, setSearch] = React.useState<CascaderSearchSlice<T> | null>(null);\n\n /**\n * Latest callbacks, WRITTEN IN AN EFFECT: `getChildren` is inline in most\n * consumers, so closing over it would refire every in-flight request per\n * re-render. The ref is what keeps the request machinery `[]`-dep. Declared\n * FIRST, since effects run in declaration order, so the level effect below\n * already sees the current commit.\n */\n const latest = React.useRef<CascaderLoaderLatest<T>>({\n base,\n store,\n getChildren,\n onSearch,\n resolveValue,\n onLoadError,\n prefetch,\n path,\n });\n\n React.useEffect(() => {\n latest.current = {\n base,\n store,\n getChildren,\n onSearch,\n resolveValue,\n onLoadError,\n prefetch,\n path,\n };\n });\n\n /** One AbortController PER KEY: columns mode runs several levels at once. */\n const controllers = React.useRef(new Map<string, AbortController>());\n /** Monotonic per key. The stale guard for out-of-order responses. */\n const requestIds = React.useRef(new Map<string, number>());\n /** In-flight `(level, cursor)` signatures, so a duplicate ask is free. */\n const inflight = React.useRef(new Map<string, string>());\n /**\n * The `(child count, cursor)` signature at the last paging fire, per level.\n * Guards what `hasMore` cannot: a page of zero new items while the server\n * still says `hasMore`. Cursor is IN the signature because an all-duplicates\n * page advances it while the count stands still - real progress, which a\n * count-only latch would brick forever.\n */\n const moreLatch = React.useRef(new Map<string, string>());\n /** Values `resolveValue` has already been asked about, so it asks once. */\n const attempted = React.useRef(new Set<string>());\n /** Every node the loader has seen, so a level key can name its own node. */\n const known = React.useRef(new Map<string, CascaderNode<T>>());\n const timers = React.useRef<{\n prefetch: ReturnType<typeof setTimeout> | null;\n }>({ prefetch: null });\n /** Bumped by a `loadKey` change, so responses from before it are dropped. */\n const epoch = React.useRef(0);\n\n const remember = React.useCallback((nodes: readonly CascaderNode<T>[]) => {\n const map = known.current;\n const walk = (list: readonly CascaderNode<T>[]) => {\n for (const node of list) {\n map.set(node.value, node);\n if (node.children?.length) walk(node.children);\n }\n };\n walk(nodes);\n }, []);\n\n const abortKey = React.useCallback((key: string) => {\n const controller = controllers.current.get(key);\n if (!controller) return;\n controllers.current.delete(key);\n inflight.current.delete(key);\n controller.abort();\n }, []);\n\n /* ------------------------------- level load ------------------------------ */\n\n const runLoad = React.useCallback(\n (key: string, reason: CascaderLoadReason, cursor: string | undefined, append: boolean) => {\n const { getChildren: loader, base: currentBase } = latest.current;\n if (!loader) return;\n\n const signature = `${append ? \"1\" : \"0\"}:${cursor ?? \"\"}`;\n if (inflight.current.get(key) === signature) return;\n\n abortKey(key);\n const controller = new AbortController();\n controllers.current.set(key, controller);\n inflight.current.set(key, signature);\n\n const requestId = (requestIds.current.get(key) ?? 0) + 1;\n requestIds.current.set(key, requestId);\n const startEpoch = epoch.current;\n\n const node =\n key === CASCADER_ROOT_KEY\n ? null\n : (currentBase.byValue.get(key) ?? known.current.get(key) ?? null);\n\n setStore((prev) =>\n withLoadState(prev, key, (state) => ({\n ...state,\n loading: true,\n error: false,\n })),\n );\n\n const settle = () => {\n if (inflight.current.get(key) === signature) inflight.current.delete(key);\n if (controllers.current.get(key) === controller) {\n controllers.current.delete(key);\n }\n };\n\n const stale = () =>\n controller.signal.aborted ||\n startEpoch !== epoch.current ||\n requestId !== requestIds.current.get(key);\n\n // `Promise.resolve().then(...)`, not a direct call: it normalises a\n // SYNCHRONOUS throw into a rejection instead of taking the render down.\n Promise.resolve()\n .then(() => loader(node, { signal: controller.signal, cursor, reason }))\n .then((result) => {\n settle();\n if (stale()) return;\n const items = Array.isArray(result) ? result : result.items;\n const nextCursor = Array.isArray(result) ? undefined : result.nextCursor;\n const hasMore = Array.isArray(result) ? false : (result.hasMore ?? nextCursor != null);\n\n if (!append) moreLatch.current.delete(key);\n remember(items);\n setStore((prev) => withPage(prev, key, items, { append, hasMore, cursor: nextCursor }));\n })\n .catch((error: unknown) => {\n settle();\n if (stale()) return;\n setStore((prev) =>\n withLoadState(prev, key, (state) => ({\n ...state,\n loading: false,\n error: true,\n })),\n );\n // Behind the stale guard: an abort is navigation, not a failure.\n latest.current.onLoadError?.(error, {\n parent: key === CASCADER_ROOT_KEY ? null : key,\n reason,\n });\n });\n },\n [abortKey, remember],\n );\n\n const ensureLevel = React.useCallback(\n (key: string, reason: CascaderLoadReason) => {\n const { getChildren: loader, store: current, base: index } = latest.current;\n if (!loader) return;\n if (current.states.has(key)) return;\n // A level `items` already fills is not the loader's business: that is how\n // a static root plus `getChildren` for the branches works with no flag.\n if (index.childrenOf.has(key)) return;\n runLoad(key, reason, undefined, false);\n },\n [runLoad],\n );\n\n const loadMore = React.useCallback(\n (key: string) => {\n const { getChildren: loader, store: current } = latest.current;\n if (!loader) return;\n const state = current.states.get(key);\n if (!state || state.loading || !state.hasMore) return;\n\n const loaded = current.pages.get(key)?.length ?? 0;\n const signature = `${loaded}:${state.cursor ?? \"\"}`;\n if (moreLatch.current.get(key) === signature) return;\n moreLatch.current.set(key, signature);\n\n runLoad(key, \"more\", state.cursor, true);\n },\n [runLoad],\n );\n\n const retryLevel = React.useCallback(\n (key: string) => {\n const { getChildren: loader, store: current } = latest.current;\n if (!loader) return;\n const state = current.states.get(key);\n if (!state?.error) return;\n\n const loaded = current.pages.get(key)?.length ?? 0;\n // A retry must be able to re-fire the page the latch just blocked.\n moreLatch.current.delete(key);\n runLoad(key, \"retry\", loaded > 0 ? state.cursor : undefined, loaded > 0);\n },\n [runLoad],\n );\n\n /**\n * `detached` is deliberately untouched: chains and search hits belong to no\n * level, and the trigger needs their labels while the new page is in flight.\n */\n const invalidateLevel = React.useCallback(\n (value: string | null) => {\n const key = value ?? CASCADER_ROOT_KEY;\n abortKey(key);\n // Bump the id too: a response past its signal check must still be stale.\n requestIds.current.set(key, (requestIds.current.get(key) ?? 0) + 1);\n moreLatch.current.delete(key);\n setStore((prev) => {\n if (!prev.states.has(key) && !prev.pages.has(key)) return prev;\n const states = new Map(prev.states);\n states.delete(key);\n const pages = new Map(prev.pages);\n pages.delete(key);\n return { pages, states, detached: prev.detached };\n });\n },\n [abortKey],\n );\n\n const prefetchNode = React.useCallback(\n (node: CascaderNode<T> | null | undefined) => {\n const { prefetch: on, getChildren: loader, store: current } = latest.current;\n if (!on || !loader || !node) return;\n if (isCascaderMoreNode(node)) return;\n if (!node.hasChildren) return;\n if (current.states.has(node.value)) return;\n\n const holder = timers.current;\n if (holder.prefetch) clearTimeout(holder.prefetch);\n // A TIMEOUT, not a direct call: `onItemHighlighted` fires from a layout\n // effect, where a synchronous setState is a render-phase cascade.\n holder.prefetch = setTimeout(() => {\n holder.prefetch = null;\n ensureLevel(node.value, \"prefetch\");\n }, PREFETCH_DELAY);\n },\n [ensureLevel],\n );\n\n /* --------------------------------- search -------------------------------- */\n\n const runSearch = React.useCallback(\n (text: string) => {\n const { onSearch: searcher, path: currentPath } = latest.current;\n if (!searcher) return;\n\n abortKey(SEARCH_KEY);\n const controller = new AbortController();\n controllers.current.set(SEARCH_KEY, controller);\n const requestId = (requestIds.current.get(SEARCH_KEY) ?? 0) + 1;\n requestIds.current.set(SEARCH_KEY, requestId);\n const startEpoch = epoch.current;\n\n setSearch((prev) => ({\n query: text,\n results: prev?.results ?? [],\n loading: true,\n error: false,\n }));\n\n const settle = () => {\n if (controllers.current.get(SEARCH_KEY) === controller) {\n controllers.current.delete(SEARCH_KEY);\n }\n };\n const stale = () =>\n controller.signal.aborted ||\n startEpoch !== epoch.current ||\n requestId !== requestIds.current.get(SEARCH_KEY);\n\n Promise.resolve()\n .then(() => searcher(text, { signal: controller.signal, path: currentPath }))\n .then((result) => {\n settle();\n if (stale()) return;\n const items = Array.isArray(result) ? result : result.items;\n remember(items);\n // Search hits go to `detached`, never a level: a hit lives anywhere in\n // the tree, and filing it under the open level would misplace it.\n setStore((prev) => withDetached(prev, items));\n setSearch({\n query: text,\n results: items,\n loading: false,\n error: false,\n });\n })\n .catch((error: unknown) => {\n settle();\n if (stale()) return;\n setSearch((prev) => ({\n query: text,\n results: prev?.results ?? [],\n loading: false,\n error: true,\n }));\n latest.current.onLoadError?.(error, {\n parent: null,\n reason: \"search\",\n });\n });\n },\n [abortKey, remember],\n );\n\n /* --------------------------------- resolve ------------------------------- */\n\n const runResolve = React.useCallback(\n (value: string) => {\n const { resolveValue: resolver } = latest.current;\n if (!resolver) return;\n\n const key = `${RESOLVE_PREFIX}${value}`;\n abortKey(key);\n const controller = new AbortController();\n controllers.current.set(key, controller);\n const startEpoch = epoch.current;\n\n const settle = () => {\n if (controllers.current.get(key) === controller) {\n controllers.current.delete(key);\n }\n };\n\n Promise.resolve()\n .then(() => resolver(value, { signal: controller.signal, reason: \"resolve\" }))\n .then((chain) => {\n settle();\n if (controller.signal.aborted || startEpoch !== epoch.current) return;\n if (!chain?.length) return;\n remember(chain);\n setStore((prev) => withChain(prev, chain));\n })\n .catch((error: unknown) => {\n settle();\n // Un-attempt on failure: `attempted` is written BEFORE the call, so\n // without this a resolver that failed once could never be retried.\n attempted.current.delete(value);\n if (controller.signal.aborted || startEpoch !== epoch.current) return;\n latest.current.onLoadError?.(error, {\n parent: null,\n reason: \"resolve\",\n });\n });\n },\n [abortKey, remember],\n );\n\n /* --------------------------------- resets -------------------------------- */\n\n const cancelAll = React.useCallback(() => {\n const keys = Array.from(controllers.current.keys());\n for (const controller of controllers.current.values()) controller.abort();\n controllers.current.clear();\n inflight.current.clear();\n\n const holder = timers.current;\n if (holder.prefetch) {\n clearTimeout(holder.prefetch);\n holder.prefetch = null;\n }\n if (keys.length === 0) return;\n\n setStore((prev) => {\n let states: Map<string, CascaderLoadState> | null = null;\n for (const key of keys) {\n const state = prev.states.get(key);\n if (!state?.loading) continue;\n states = states ?? new Map(prev.states);\n if ((prev.pages.get(key)?.length ?? 0) > 0) {\n states.set(key, { ...state, loading: false });\n } else {\n // No entry AT ALL: membership is what says \"loaded\", so a stranded\n // `loading: true` would read as loaded-and-empty forever.\n states.delete(key);\n }\n }\n return states ? { ...prev, states } : prev;\n });\n setSearch((prev) => (prev?.loading ? { ...prev, loading: false } : prev));\n }, []);\n\n // A `loadKey` change drops everything. Declared BEFORE the level effect, so\n // a reset always lands before the levels are asked for again.\n const loadKeyRef = React.useRef<{ key: unknown } | null>(null);\n React.useEffect(() => {\n const previous = loadKeyRef.current;\n loadKeyRef.current = { key: loadKey };\n if (!previous || Object.is(previous.key, loadKey)) return;\n\n epoch.current += 1;\n for (const controller of controllers.current.values()) controller.abort();\n controllers.current.clear();\n inflight.current.clear();\n // `requestIds` is deliberately NOT cleared: the ids are stale-response\n // guards, not cache. Reusing an aborted predecessor's id would leave only\n // the epoch bump and the abort to reject the old response; monotonic per\n // key keeps all three guards independent. The unmount cleanup clears them.\n moreLatch.current.clear();\n attempted.current.clear();\n known.current.clear();\n\n const holder = timers.current;\n if (holder.prefetch) {\n clearTimeout(holder.prefetch);\n holder.prefetch = null;\n }\n\n setStore(createStore);\n setSearch(null);\n }, [loadKey]);\n\n // Closing the popup aborts every request but does NOT drop the cache:\n // reopening onto an already-loaded level is the point of keeping it.\n React.useEffect(() => {\n if (enabled) return;\n if (controllers.current.size === 0) return;\n cancelAll();\n }, [enabled, cancelAll]);\n\n React.useEffect(() => {\n const active = controllers.current;\n const holder = timers.current;\n const pending = inflight.current;\n const ids = requestIds.current;\n return () => {\n for (const controller of active.values()) controller.abort();\n active.clear();\n // Cleared WITH the controllers, for StrictMode's dev remount: a stale\n // inflight signature would make `runLoad` skip the refetch forever. The\n // aborted promises are stale-guarded, so emptying the ids is safe.\n pending.clear();\n ids.clear();\n if (holder.prefetch) clearTimeout(holder.prefetch);\n };\n }, []);\n\n /* ------------------------------- the effects ----------------------------- */\n\n const hasLoader = typeof getChildren === \"function\";\n const hasSearch = typeof onSearch === \"function\";\n const hasResolve = typeof resolveValue === \"function\";\n const trimmed = query.trim();\n\n // THE load trigger: one declarative effect on the levels on screen, not a\n // call from `pushLevel`/`navigate`, which a controlled `path` never touches.\n React.useEffect(() => {\n if (!enabled || !hasLoader) return;\n for (const key of levels) ensureLevel(key, \"level\");\n // `levels` enters through `levelsKey`; `store` re-runs after a load lands.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [enabled, hasLoader, ensureLevel, levels]);\n\n React.useEffect(() => {\n if (!hasSearch) return undefined;\n if (!enabled || !trimmed) {\n abortKey(SEARCH_KEY);\n setSearch((prev) => (prev === null ? prev : null));\n return undefined;\n }\n const timer = setTimeout(() => runSearch(trimmed), searchDebounce);\n return () => {\n clearTimeout(timer);\n abortKey(SEARCH_KEY);\n };\n }, [hasSearch, enabled, trimmed, searchDebounce, abortKey, runSearch]);\n\n React.useEffect(() => {\n if (!enabled || !hasResolve) return;\n for (const value of values) {\n if (!value) continue;\n if (attempted.current.has(value)) continue;\n if (base.byValue.has(value) || known.current.has(value)) continue;\n attempted.current.add(value);\n runResolve(value);\n }\n // `values` is depended on through `valuesKey`.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [enabled, hasResolve, base, runResolve, values]);\n\n /* -------------------------------- the value ------------------------------ */\n\n const searchResults = React.useMemo(() => {\n if (!hasSearch || !trimmed) return null;\n if (!search || search.query !== trimmed) {\n return NO_RESULTS as CascaderNode<T>[];\n }\n return search.results;\n }, [hasSearch, trimmed, search]);\n\n const searchState = React.useMemo<CascaderLoadState | null>(() => {\n if (!hasSearch || !trimmed) return null;\n const settled = search?.query === trimmed;\n return {\n loading: !settled || !!search?.loading,\n error: settled && !!search?.error,\n hasMore: false,\n };\n }, [hasSearch, trimmed, search]);\n\n return React.useMemo(\n () => ({\n active: hasLoader,\n store,\n states: store.states,\n searchResults,\n searchState,\n ensureLevel,\n loadMore,\n retryLevel,\n invalidateLevel,\n prefetchNode,\n }),\n [\n hasLoader,\n store,\n searchResults,\n searchState,\n ensureLevel,\n loadMore,\n retryLevel,\n invalidateLevel,\n prefetchNode,\n ],\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Consumers */\n/* -------------------------------------------------------------------------- */\n\n/** One level's load state, `null` when never fetched. Omit for the root. */\nexport function useCascaderLoadState(parent?: string | null): CascaderLoadState | null {\n const { loadStates } = useCascaderState();\n return loadStates.get(parent ?? CASCADER_ROOT_KEY) ?? null;\n}\n"],"mappings":";;;;;;;;;AAuHA,MAAM,iBAAiB;;AAGvB,MAAM,aAAa;AACnB,MAAM,iBAAiB;AAEvB,MAAM,WAA8B;CAClC,SAAS;CACT,OAAO;CACP,SAAS;AACX;;AAGA,MAAM,aAAoC,CAAC;AAE3C,SAAS,cAAyC;CAChD,OAAO;EAAE,uBAAO,IAAI,IAAI;EAAG,wBAAQ,IAAI,IAAI;EAAG,0BAAU,IAAI,IAAI;CAAE;AACpE;AAEA,SAAS,cAAc,GAAsB,GAA+B;CAC1E,OACE,EAAE,YAAY,EAAE,WAChB,EAAE,UAAU,EAAE,SACd,EAAE,YAAY,EAAE,WAChB,EAAE,WAAW,EAAE;AAEnB;;;;;AA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EACA;EACA;CACF,IACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CACF;AACF;;AAOA,SAAgB,qBAAqB,QAAkD;CACrF,MAAM,EAAE,eAAe,iBAAiB;CACxC,OAAO,WAAW,IAAI,UAAA,QAA2B,KAAK;AACxD"}
|
|
1
|
+
{"version":3,"file":"cascader-async.js","names":["React"],"sources":["../../../../src/components/reui/cascader/cascader-async.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport { useCascaderState } from \"./cascader-context\";\nimport { CASCADER_ROOT_KEY, isCascaderMoreNode } from \"./cascader-lib\";\nimport type {\n CascaderIndex,\n CascaderLoadContext,\n CascaderLoadReason,\n CascaderLoadResult,\n CascaderLoadState,\n CascaderNode,\n CascaderSearchContext,\n} from \"./cascader-types\";\n\n/**\n * Async data for the cascader. Loaded pages live in their own store and are\n * MERGED onto the index built from `items`, never folded into that build:\n * `items` changes identity on any parent re-render, and folding would discard\n * every level the user drilled into. Map membership is the load discriminator:\n * no `states` entry means never fetched, while an entry with no `loading`, no\n * `error` and no children means empty for real.\n */\n\n/* -------------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------------- */\n\n/** Fetches one level. `node` is `null` for the root level. */\nexport type CascaderGetChildren<T = unknown> = (\n node: CascaderNode<T> | null,\n context: CascaderLoadContext,\n) => CascaderNode<T>[] | CascaderLoadResult<T> | Promise<CascaderNode<T>[] | CascaderLoadResult<T>>;\n\n/** Server-side search, replacing the local index scan while the query is set. */\nexport type CascaderOnSearch<T = unknown> = (\n query: string,\n context: CascaderSearchContext,\n) => CascaderNode<T>[] | CascaderLoadResult<T> | Promise<CascaderNode<T>[] | CascaderLoadResult<T>>;\n\n/** Resolves a selected value to its ancestor chain, root first, node last. */\nexport type CascaderResolveValue<T = unknown> = (\n value: string,\n context: CascaderLoadContext,\n) => CascaderNode<T>[] | Promise<CascaderNode<T>[]>;\n\nexport interface CascaderLoaderStore<T = unknown> {\n /** Keyed by LEVEL: a parent's value, or `CASCADER_ROOT_KEY` for the root. */\n pages: Map<string, CascaderNode<T>[]>;\n states: Map<string, CascaderLoadState>;\n /** Keyed by node value: search hits and resolved selections, level-less. */\n detached: Map<string, CascaderNode<T>>;\n}\n\nexport interface UseCascaderLoaderOptions<T = unknown> {\n /** The index built from `items`, before any pages are merged in. */\n base: CascaderIndex<T>;\n getChildren?: CascaderGetChildren<T>;\n onSearch?: CascaderOnSearch<T>;\n resolveValue?: CascaderResolveValue<T>;\n /** Milliseconds of quiet before `onSearch` fires. */\n searchDebounce?: number;\n /** Changing this drops every cached page, state and detached node. */\n loadKey?: unknown;\n /** Speculatively fetch a branch's children when it is highlighted. */\n prefetch?: boolean;\n /** Called when a request fails. Never for an aborted or superseded one. */\n onLoadError?: (error: unknown, context: { parent: string | null; reason: string }) => void;\n /** Whether the panel is live: the popup is open, or the cascader is inline. */\n enabled: boolean;\n query: string;\n /** Level keys that are currently on screen. Root is `CASCADER_ROOT_KEY`. */\n levels: string[];\n /** The navigation path, handed to `onSearch` as its scope. */\n path: string[];\n /** Current selection, for `resolveValue`. */\n values: string[];\n}\n\nexport interface CascaderLoader<T = unknown> {\n /** Whether a `getChildren` loader is configured at all. */\n active: boolean;\n store: CascaderLoaderStore<T>;\n states: ReadonlyMap<string, CascaderLoadState>;\n /**\n * Async search hits, `null` when no `onSearch` is running. EMPTY while the\n * first request is in flight, so the level behind is not shown as the answer.\n */\n searchResults: CascaderNode<T>[] | null;\n searchState: CascaderLoadState | null;\n /**\n * Fetches a level's FIRST page. No-ops on a `states` entry (in flight,\n * loaded or failed) or when `items` fills the level; pages are never\n * consulted, so a `resolveValue` chain still fetches. The level effect fires\n * only for on-screen levels, so a branch merely PRESSED is asked for by hand.\n */\n ensureLevel: (parentKey: string, reason: CascaderLoadReason) => void;\n /** Fetches the next page of a level. No-ops unless one is available. */\n loadMore: (parentKey: string) => void;\n /** Refires a failed level. No-ops unless that level is in an error state. */\n retryLevel: (parentKey: string) => void;\n /** Schedules a speculative fetch. Safe to call on every highlight move. */\n prefetchNode: (node: CascaderNode<T> | null | undefined) => void;\n /**\n * Evicts ONE level: aborts its request, drops its `states`/`pages` entries\n * and paging latch, so the level effect refetches it. `null` = root level.\n */\n invalidateLevel: (value: string | null) => void;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Constants */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Highlight dwell before `prefetch` fetches: long enough that holding ArrowDown\n * does not fire a request per row, short enough to beat the ArrowRight press.\n */\nconst PREFETCH_DELAY = 150;\n\n/** Request keys for the two non-level requests. Never collide with a value. */\nconst SEARCH_KEY = \"\\u0000search\";\nconst RESOLVE_PREFIX = \"\\u0000resolve:\";\n\nconst NO_STATE: CascaderLoadState = {\n loading: false,\n error: false,\n hasMore: false,\n};\n\n/** Stable empty result, so an idle search never churns the state context. */\nconst NO_RESULTS: CascaderNode<never>[] = [];\n\nfunction createStore<T>(): CascaderLoaderStore<T> {\n return { pages: new Map(), states: new Map(), detached: new Map() };\n}\n\nfunction sameLoadState(a: CascaderLoadState, b: CascaderLoadState): boolean {\n return (\n a.loading === b.loading &&\n a.error === b.error &&\n a.hasMore === b.hasMore &&\n a.cursor === b.cursor\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Store transitions */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Copy-on-write, and a NO-OP when nothing changed: the merged index is memoised\n * on store identity, so a fresh object for an unchanged state would rebuild it.\n */\nfunction withLoadState<T>(\n store: CascaderLoaderStore<T>,\n key: string,\n update: (state: CascaderLoadState) => CascaderLoadState,\n): CascaderLoaderStore<T> {\n const current = store.states.get(key) ?? NO_STATE;\n const next = update(current);\n if (store.states.has(key) && sameLoadState(current, next)) return store;\n const states = new Map(store.states);\n states.set(key, next);\n return { pages: store.pages, states, detached: store.detached };\n}\n\nfunction withPage<T>(\n store: CascaderLoaderStore<T>,\n key: string,\n items: readonly CascaderNode<T>[],\n options: { append: boolean; hasMore: boolean; cursor?: string },\n): CascaderLoaderStore<T> {\n // A fresh level REPLACES its page so a `resolveValue` stub can be superseded.\n const previous = options.append ? (store.pages.get(key) ?? []) : [];\n const seen = new Set(previous.map((node) => node.value));\n const merged = previous.slice();\n for (const item of items) {\n if (seen.has(item.value)) continue;\n seen.add(item.value);\n merged.push(item);\n }\n\n const pages = new Map(store.pages);\n pages.set(key, merged);\n const states = new Map(store.states);\n states.set(key, {\n loading: false,\n error: false,\n hasMore: options.hasMore,\n cursor: options.cursor,\n });\n return { pages, states, detached: store.detached };\n}\n\nfunction withDetached<T>(\n store: CascaderLoaderStore<T>,\n items: readonly CascaderNode<T>[],\n): CascaderLoaderStore<T> {\n let detached: Map<string, CascaderNode<T>> | null = null;\n for (const item of items) {\n if (store.detached.get(item.value) === item) continue;\n detached = detached ?? new Map(store.detached);\n detached.set(item.value, item);\n }\n if (!detached) return store;\n return { pages: store.pages, states: store.states, detached };\n}\n\n/**\n * Places a resolved ancestor chain into `pages`, root first. Writes no\n * `states`, so those levels still read as unloaded and a drill-in still fetches\n * for real. Mirrored into `detached` so the trigger keeps its label.\n */\nfunction withChain<T>(\n store: CascaderLoaderStore<T>,\n chain: readonly CascaderNode<T>[],\n): CascaderLoaderStore<T> {\n if (chain.length === 0) return store;\n const pages = new Map(store.pages);\n const detached = new Map(store.detached);\n let parentKey = CASCADER_ROOT_KEY;\n\n for (const node of chain) {\n const bucket = pages.get(parentKey);\n if (!bucket) {\n pages.set(parentKey, [node]);\n } else if (!bucket.some((entry) => entry.value === node.value)) {\n pages.set(parentKey, [...bucket, node]);\n }\n detached.set(node.value, node);\n parentKey = node.value;\n }\n\n return { pages, states: store.states, detached };\n}\n\n/* -------------------------------------------------------------------------- */\n/* Hook */\n/* -------------------------------------------------------------------------- */\n\ninterface CascaderLoaderLatest<T> {\n base: CascaderIndex<T>;\n store: CascaderLoaderStore<T>;\n getChildren?: CascaderGetChildren<T>;\n onSearch?: CascaderOnSearch<T>;\n resolveValue?: CascaderResolveValue<T>;\n onLoadError?: (error: unknown, context: { parent: string | null; reason: string }) => void;\n prefetch: boolean;\n path: string[];\n}\n\ninterface CascaderSearchSlice<T> {\n query: string;\n results: CascaderNode<T>[];\n loading: boolean;\n error: boolean;\n}\n\n/**\n * The loader. A SIBLING of the `buildCascaderIndex` memo, never inside it: the\n * build stays pure in `items`, the merge pure in that build plus this store.\n */\nexport function useCascaderLoader<T = unknown>({\n base,\n getChildren,\n onSearch,\n resolveValue,\n searchDebounce = 250,\n loadKey,\n prefetch = false,\n onLoadError,\n enabled,\n query,\n levels,\n path,\n values,\n}: UseCascaderLoaderOptions<T>): CascaderLoader<T> {\n const [store, setStore] = React.useState<CascaderLoaderStore<T>>(createStore);\n const [search, setSearch] = React.useState<CascaderSearchSlice<T> | null>(null);\n\n /**\n * Latest callbacks, WRITTEN IN AN EFFECT: `getChildren` is inline in most\n * consumers, so closing over it would refire every in-flight request per\n * re-render. The ref is what keeps the request machinery `[]`-dep. Declared\n * FIRST, since effects run in declaration order, so the level effect below\n * already sees the current commit.\n */\n const latest = React.useRef<CascaderLoaderLatest<T>>({\n base,\n store,\n getChildren,\n onSearch,\n resolveValue,\n onLoadError,\n prefetch,\n path,\n });\n\n React.useEffect(() => {\n latest.current = {\n base,\n store,\n getChildren,\n onSearch,\n resolveValue,\n onLoadError,\n prefetch,\n path,\n };\n });\n\n /** One AbortController PER KEY: columns mode runs several levels at once. */\n const controllers = React.useRef(new Map<string, AbortController>());\n /** Monotonic per key. The stale guard for out-of-order responses. */\n const requestIds = React.useRef(new Map<string, number>());\n /** In-flight `(level, cursor)` signatures, so a duplicate ask is free. */\n const inflight = React.useRef(new Map<string, string>());\n /**\n * The `(child count, cursor)` signature at the last paging fire, per level.\n * Guards what `hasMore` cannot: a page of zero new items while the server\n * still says `hasMore`. Cursor is IN the signature because an all-duplicates\n * page advances it while the count stands still - real progress, which a\n * count-only latch would brick forever.\n */\n const moreLatch = React.useRef(new Map<string, string>());\n /** Values `resolveValue` has already been asked about, so it asks once. */\n const attempted = React.useRef(new Set<string>());\n /** Every node the loader has seen, so a level key can name its own node. */\n const known = React.useRef(new Map<string, CascaderNode<T>>());\n const timers = React.useRef<{\n prefetch: ReturnType<typeof setTimeout> | null;\n }>({ prefetch: null });\n /** Bumped by a `loadKey` change, so responses from before it are dropped. */\n const epoch = React.useRef(0);\n\n const remember = React.useCallback((nodes: readonly CascaderNode<T>[]) => {\n const map = known.current;\n const walk = (list: readonly CascaderNode<T>[]) => {\n for (const node of list) {\n map.set(node.value, node);\n if (node.children?.length) walk(node.children);\n }\n };\n walk(nodes);\n }, []);\n\n const abortKey = React.useCallback((key: string) => {\n const controller = controllers.current.get(key);\n if (!controller) return;\n controllers.current.delete(key);\n inflight.current.delete(key);\n controller.abort();\n }, []);\n\n /* ------------------------------- level load ------------------------------ */\n\n const runLoad = React.useCallback(\n (key: string, reason: CascaderLoadReason, cursor: string | undefined, append: boolean) => {\n const { getChildren: loader, base: currentBase } = latest.current;\n if (!loader) return;\n\n const signature = `${append ? \"1\" : \"0\"}:${cursor ?? \"\"}`;\n if (inflight.current.get(key) === signature) return;\n\n abortKey(key);\n const controller = new AbortController();\n controllers.current.set(key, controller);\n inflight.current.set(key, signature);\n\n const requestId = (requestIds.current.get(key) ?? 0) + 1;\n requestIds.current.set(key, requestId);\n const startEpoch = epoch.current;\n\n const node =\n key === CASCADER_ROOT_KEY\n ? null\n : (currentBase.byValue.get(key) ?? known.current.get(key) ?? null);\n\n setStore((prev) =>\n withLoadState(prev, key, (state) => ({\n ...state,\n loading: true,\n error: false,\n })),\n );\n\n const settle = () => {\n if (inflight.current.get(key) === signature) inflight.current.delete(key);\n if (controllers.current.get(key) === controller) {\n controllers.current.delete(key);\n }\n };\n\n const stale = () =>\n controller.signal.aborted ||\n startEpoch !== epoch.current ||\n requestId !== requestIds.current.get(key);\n\n // `Promise.resolve().then(...)`, not a direct call: it normalises a\n // SYNCHRONOUS throw into a rejection instead of taking the render down.\n Promise.resolve()\n .then(() => loader(node, { signal: controller.signal, cursor, reason }))\n .then((result) => {\n settle();\n if (stale()) return;\n const items = Array.isArray(result) ? result : result.items;\n const nextCursor = Array.isArray(result) ? undefined : result.nextCursor;\n const hasMore = Array.isArray(result) ? false : (result.hasMore ?? nextCursor != null);\n\n if (!append) moreLatch.current.delete(key);\n remember(items);\n setStore((prev) => withPage(prev, key, items, { append, hasMore, cursor: nextCursor }));\n })\n .catch((error: unknown) => {\n settle();\n if (stale()) return;\n setStore((prev) =>\n withLoadState(prev, key, (state) => ({\n ...state,\n loading: false,\n error: true,\n })),\n );\n // Behind the stale guard: an abort is navigation, not a failure.\n latest.current.onLoadError?.(error, {\n parent: key === CASCADER_ROOT_KEY ? null : key,\n reason,\n });\n });\n },\n [abortKey, remember],\n );\n\n const ensureLevel = React.useCallback(\n (key: string, reason: CascaderLoadReason) => {\n const { getChildren: loader, store: current, base: index } = latest.current;\n if (!loader) return;\n if (current.states.has(key)) return;\n // A level `items` already fills is not the loader's business: that is how\n // a static root plus `getChildren` for the branches works with no flag.\n if (index.childrenOf.has(key)) return;\n runLoad(key, reason, undefined, false);\n },\n [runLoad],\n );\n\n const loadMore = React.useCallback(\n (key: string) => {\n const { getChildren: loader, store: current } = latest.current;\n if (!loader) return;\n const state = current.states.get(key);\n if (!state || state.loading || !state.hasMore) return;\n\n const loaded = current.pages.get(key)?.length ?? 0;\n const signature = `${loaded}:${state.cursor ?? \"\"}`;\n if (moreLatch.current.get(key) === signature) return;\n moreLatch.current.set(key, signature);\n\n runLoad(key, \"more\", state.cursor, true);\n },\n [runLoad],\n );\n\n const retryLevel = React.useCallback(\n (key: string) => {\n const { getChildren: loader, store: current } = latest.current;\n if (!loader) return;\n const state = current.states.get(key);\n if (!state?.error) return;\n\n const loaded = current.pages.get(key)?.length ?? 0;\n // A retry must be able to re-fire the page the latch just blocked.\n moreLatch.current.delete(key);\n runLoad(key, \"retry\", loaded > 0 ? state.cursor : undefined, loaded > 0);\n },\n [runLoad],\n );\n\n /**\n * `detached` is deliberately untouched: chains and search hits belong to no\n * level, and the trigger needs their labels while the new page is in flight.\n */\n const invalidateLevel = React.useCallback(\n (value: string | null) => {\n const key = value ?? CASCADER_ROOT_KEY;\n abortKey(key);\n // Bump the id too: a response past its signal check must still be stale.\n requestIds.current.set(key, (requestIds.current.get(key) ?? 0) + 1);\n moreLatch.current.delete(key);\n setStore((prev) => {\n if (!prev.states.has(key) && !prev.pages.has(key)) return prev;\n const states = new Map(prev.states);\n states.delete(key);\n const pages = new Map(prev.pages);\n pages.delete(key);\n return { pages, states, detached: prev.detached };\n });\n },\n [abortKey],\n );\n\n const prefetchNode = React.useCallback(\n (node: CascaderNode<T> | null | undefined) => {\n const { prefetch: on, getChildren: loader, store: current } = latest.current;\n if (!on || !loader || !node) return;\n if (isCascaderMoreNode(node)) return;\n if (!node.hasChildren) return;\n if (current.states.has(node.value)) return;\n\n const holder = timers.current;\n if (holder.prefetch) clearTimeout(holder.prefetch);\n // A TIMEOUT, not a direct call: `onItemHighlighted` fires from a layout\n // effect, where a synchronous setState is a render-phase cascade.\n holder.prefetch = setTimeout(() => {\n holder.prefetch = null;\n ensureLevel(node.value, \"prefetch\");\n }, PREFETCH_DELAY);\n },\n [ensureLevel],\n );\n\n /* --------------------------------- search -------------------------------- */\n\n const runSearch = React.useCallback(\n (text: string) => {\n const { onSearch: searcher, path: currentPath } = latest.current;\n if (!searcher) return;\n\n abortKey(SEARCH_KEY);\n const controller = new AbortController();\n controllers.current.set(SEARCH_KEY, controller);\n const requestId = (requestIds.current.get(SEARCH_KEY) ?? 0) + 1;\n requestIds.current.set(SEARCH_KEY, requestId);\n const startEpoch = epoch.current;\n\n setSearch((prev) => ({\n query: text,\n results: prev?.results ?? [],\n loading: true,\n error: false,\n }));\n\n const settle = () => {\n if (controllers.current.get(SEARCH_KEY) === controller) {\n controllers.current.delete(SEARCH_KEY);\n }\n };\n const stale = () =>\n controller.signal.aborted ||\n startEpoch !== epoch.current ||\n requestId !== requestIds.current.get(SEARCH_KEY);\n\n Promise.resolve()\n .then(() => searcher(text, { signal: controller.signal, path: currentPath }))\n .then((result) => {\n settle();\n if (stale()) return;\n const items = Array.isArray(result) ? result : result.items;\n remember(items);\n // Search hits go to `detached`, never a level: a hit lives anywhere in\n // the tree, and filing it under the open level would misplace it.\n setStore((prev) => withDetached(prev, items));\n setSearch({\n query: text,\n results: items,\n loading: false,\n error: false,\n });\n })\n .catch((error: unknown) => {\n settle();\n if (stale()) return;\n setSearch((prev) => ({\n query: text,\n results: prev?.results ?? [],\n loading: false,\n error: true,\n }));\n latest.current.onLoadError?.(error, {\n parent: null,\n reason: \"search\",\n });\n });\n },\n [abortKey, remember],\n );\n\n /* --------------------------------- resolve ------------------------------- */\n\n const runResolve = React.useCallback(\n (value: string) => {\n const { resolveValue: resolver } = latest.current;\n if (!resolver) return;\n\n const key = `${RESOLVE_PREFIX}${value}`;\n abortKey(key);\n const controller = new AbortController();\n controllers.current.set(key, controller);\n const startEpoch = epoch.current;\n\n const settle = () => {\n if (controllers.current.get(key) === controller) {\n controllers.current.delete(key);\n }\n };\n\n Promise.resolve()\n .then(() => resolver(value, { signal: controller.signal, reason: \"resolve\" }))\n .then((chain) => {\n settle();\n if (controller.signal.aborted || startEpoch !== epoch.current) return;\n if (!chain?.length) return;\n remember(chain);\n setStore((prev) => withChain(prev, chain));\n })\n .catch((error: unknown) => {\n settle();\n // Un-attempt on failure: `attempted` is written BEFORE the call, so\n // without this a resolver that failed once could never be retried.\n attempted.current.delete(value);\n if (controller.signal.aborted || startEpoch !== epoch.current) return;\n latest.current.onLoadError?.(error, {\n parent: null,\n reason: \"resolve\",\n });\n });\n },\n [abortKey, remember],\n );\n\n /* --------------------------------- resets -------------------------------- */\n\n const cancelAll = React.useCallback(() => {\n const keys = Array.from(controllers.current.keys());\n for (const controller of controllers.current.values()) controller.abort();\n controllers.current.clear();\n inflight.current.clear();\n\n const holder = timers.current;\n if (holder.prefetch) {\n clearTimeout(holder.prefetch);\n holder.prefetch = null;\n }\n if (keys.length === 0) return;\n\n setStore((prev) => {\n let states: Map<string, CascaderLoadState> | null = null;\n for (const key of keys) {\n const state = prev.states.get(key);\n if (!state?.loading) continue;\n states = states ?? new Map(prev.states);\n if ((prev.pages.get(key)?.length ?? 0) > 0) {\n states.set(key, { ...state, loading: false });\n } else {\n // No entry AT ALL: membership is what says \"loaded\", so a stranded\n // `loading: true` would read as loaded-and-empty forever.\n states.delete(key);\n }\n }\n return states ? { ...prev, states } : prev;\n });\n setSearch((prev) => (prev?.loading ? { ...prev, loading: false } : prev));\n }, []);\n\n // A `loadKey` change drops everything. Declared BEFORE the level effect, so\n // a reset always lands before the levels are asked for again.\n const loadKeyRef = React.useRef<{ key: unknown } | null>(null);\n React.useEffect(() => {\n const previous = loadKeyRef.current;\n loadKeyRef.current = { key: loadKey };\n if (!previous || Object.is(previous.key, loadKey)) return;\n\n epoch.current += 1;\n for (const controller of controllers.current.values()) controller.abort();\n controllers.current.clear();\n inflight.current.clear();\n // `requestIds` is deliberately NOT cleared: the ids are stale-response\n // guards, not cache. Reusing an aborted predecessor's id would leave only\n // the epoch bump and the abort to reject the old response; monotonic per\n // key keeps all three guards independent. The unmount cleanup clears them.\n moreLatch.current.clear();\n attempted.current.clear();\n known.current.clear();\n\n const holder = timers.current;\n if (holder.prefetch) {\n clearTimeout(holder.prefetch);\n holder.prefetch = null;\n }\n\n setStore(createStore);\n setSearch(null);\n }, [loadKey]);\n\n // Closing the popup aborts every request but does NOT drop the cache:\n // reopening onto an already-loaded level is the point of keeping it.\n React.useEffect(() => {\n if (enabled) return;\n if (controllers.current.size === 0) return;\n cancelAll();\n }, [enabled, cancelAll]);\n\n React.useEffect(() => {\n const active = controllers.current;\n const holder = timers.current;\n const pending = inflight.current;\n const ids = requestIds.current;\n return () => {\n for (const controller of active.values()) controller.abort();\n active.clear();\n // Cleared WITH the controllers, for StrictMode's dev remount: a stale\n // inflight signature would make `runLoad` skip the refetch forever. The\n // aborted promises are stale-guarded, so emptying the ids is safe.\n pending.clear();\n ids.clear();\n if (holder.prefetch) clearTimeout(holder.prefetch);\n };\n }, []);\n\n /* ------------------------------- the effects ----------------------------- */\n\n const hasLoader = typeof getChildren === \"function\";\n const hasSearch = typeof onSearch === \"function\";\n const hasResolve = typeof resolveValue === \"function\";\n const trimmed = query.trim();\n\n // THE load trigger: one declarative effect on the levels on screen, not a\n // call from `pushLevel`/`navigate`, which a controlled `path` never touches.\n React.useEffect(() => {\n if (!enabled || !hasLoader) return;\n for (const key of levels) ensureLevel(key, \"level\");\n // `levels` enters through `levelsKey`; `store` re-runs after a load lands.\n }, [enabled, hasLoader, ensureLevel, levels]);\n\n React.useEffect(() => {\n if (!hasSearch) return undefined;\n if (!enabled || !trimmed) {\n abortKey(SEARCH_KEY);\n setSearch((prev) => (prev === null ? prev : null));\n return undefined;\n }\n const timer = setTimeout(() => runSearch(trimmed), searchDebounce);\n return () => {\n clearTimeout(timer);\n abortKey(SEARCH_KEY);\n };\n }, [hasSearch, enabled, trimmed, searchDebounce, abortKey, runSearch]);\n\n React.useEffect(() => {\n if (!enabled || !hasResolve) return;\n for (const value of values) {\n if (!value) continue;\n if (attempted.current.has(value)) continue;\n if (base.byValue.has(value) || known.current.has(value)) continue;\n attempted.current.add(value);\n runResolve(value);\n }\n // `values` is depended on through `valuesKey`.\n }, [enabled, hasResolve, base, runResolve, values]);\n\n /* -------------------------------- the value ------------------------------ */\n\n const searchResults = React.useMemo(() => {\n if (!hasSearch || !trimmed) return null;\n if (!search || search.query !== trimmed) {\n return NO_RESULTS as CascaderNode<T>[];\n }\n return search.results;\n }, [hasSearch, trimmed, search]);\n\n const searchState = React.useMemo<CascaderLoadState | null>(() => {\n if (!hasSearch || !trimmed) return null;\n const settled = search?.query === trimmed;\n return {\n loading: !settled || !!search?.loading,\n error: settled && !!search?.error,\n hasMore: false,\n };\n }, [hasSearch, trimmed, search]);\n\n return React.useMemo(\n () => ({\n active: hasLoader,\n store,\n states: store.states,\n searchResults,\n searchState,\n ensureLevel,\n loadMore,\n retryLevel,\n invalidateLevel,\n prefetchNode,\n }),\n [\n hasLoader,\n store,\n searchResults,\n searchState,\n ensureLevel,\n loadMore,\n retryLevel,\n invalidateLevel,\n prefetchNode,\n ],\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Consumers */\n/* -------------------------------------------------------------------------- */\n\n/** One level's load state, `null` when never fetched. Omit for the root. */\nexport function useCascaderLoadState(parent?: string | null): CascaderLoadState | null {\n const { loadStates } = useCascaderState();\n return loadStates.get(parent ?? CASCADER_ROOT_KEY) ?? null;\n}\n"],"mappings":";;;;;;;;;AAuHA,MAAM,iBAAiB;;AAGvB,MAAM,aAAa;AACnB,MAAM,iBAAiB;AAEvB,MAAM,WAA8B;CAClC,SAAS;CACT,OAAO;CACP,SAAS;AACX;;AAGA,MAAM,aAAoC,CAAC;AAE3C,SAAS,cAAyC;CAChD,OAAO;EAAE,uBAAO,IAAI,IAAI;EAAG,wBAAQ,IAAI,IAAI;EAAG,0BAAU,IAAI,IAAI;CAAE;AACpE;AAEA,SAAS,cAAc,GAAsB,GAA+B;CAC1E,OACE,EAAE,YAAY,EAAE,WAChB,EAAE,UAAU,EAAE,SACd,EAAE,YAAY,EAAE,WAChB,EAAE,WAAW,EAAE;AAEnB;;;;;AAUA,SAAS,cACP,OACA,KACA,QACwB;CACxB,MAAM,UAAU,MAAM,OAAO,IAAI,GAAG,KAAK;CACzC,MAAM,OAAO,OAAO,OAAO;CAC3B,IAAI,MAAM,OAAO,IAAI,GAAG,KAAK,cAAc,SAAS,IAAI,GAAG,OAAO;CAClE,MAAM,SAAS,IAAI,IAAI,MAAM,MAAM;CACnC,OAAO,IAAI,KAAK,IAAI;CACpB,OAAO;EAAE,OAAO,MAAM;EAAO;EAAQ,UAAU,MAAM;CAAS;AAChE;AAEA,SAAS,SACP,OACA,KACA,OACA,SACwB;CAExB,MAAM,WAAW,QAAQ,SAAU,MAAM,MAAM,IAAI,GAAG,KAAK,CAAC,IAAK,CAAC;CAClE,MAAM,OAAO,IAAI,IAAI,SAAS,KAA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