@xihan-ui/vue 1.1.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4534 -6
- package/README.md +2 -2
- package/dist/backgrounds.d.ts +16 -16
- package/dist/backgrounds.d.ts.map +1 -1
- package/dist/backgrounds.js +14 -14
- package/dist/backgrounds.js.map +1 -1
- package/dist/behavior.d.ts +19 -16
- package/dist/behavior.d.ts.map +1 -1
- package/dist/behavior.js +63 -21
- package/dist/behavior.js.map +1 -1
- package/dist/components/accordion/accordion.d.ts +18 -23
- package/dist/components/accordion/accordion.d.ts.map +1 -1
- package/dist/components/accordion/accordion.js +21 -31
- package/dist/components/accordion/accordion.js.map +1 -1
- package/dist/components/accordion/context.js.map +1 -1
- package/dist/components/accordion/use-accordion.d.ts +2 -2
- package/dist/components/accordion/use-accordion.d.ts.map +1 -1
- package/dist/components/accordion/use-accordion.js +1 -1
- package/dist/components/accordion/use-accordion.js.map +1 -1
- package/dist/components/affix/affix.d.ts +6 -16
- package/dist/components/affix/affix.d.ts.map +1 -1
- package/dist/components/affix/affix.js +6 -15
- package/dist/components/affix/affix.js.map +1 -1
- package/dist/components/affix/context.d.ts.map +1 -1
- package/dist/components/affix/context.js.map +1 -1
- package/dist/components/affix/use-affix.d.ts +3 -3
- package/dist/components/affix/use-affix.d.ts.map +1 -1
- package/dist/components/affix/use-affix.js +1 -1
- package/dist/components/affix/use-affix.js.map +1 -1
- package/dist/components/alert/alert.d.ts +9 -3
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/alert/alert.js +18 -4
- package/dist/components/alert/alert.js.map +1 -1
- package/dist/components/alert/context.js.map +1 -1
- package/dist/components/alert/use-alert.js +1 -1
- package/dist/components/alert/use-alert.js.map +1 -1
- package/dist/components/anchor/anchor.d.ts +17 -37
- package/dist/components/anchor/anchor.d.ts.map +1 -1
- package/dist/components/anchor/anchor.js +22 -43
- package/dist/components/anchor/anchor.js.map +1 -1
- package/dist/components/anchor/context.js.map +1 -1
- package/dist/components/anchor/use-anchor.d.ts +2 -2
- package/dist/components/anchor/use-anchor.d.ts.map +1 -1
- package/dist/components/anchor/use-anchor.js.map +1 -1
- package/dist/components/approval/approval.d.ts +237 -0
- package/dist/components/approval/approval.d.ts.map +1 -0
- package/dist/components/approval/approval.js +196 -0
- package/dist/components/approval/approval.js.map +1 -0
- package/dist/components/approval/context.d.ts +7 -0
- package/dist/components/approval/context.d.ts.map +1 -0
- package/dist/components/approval/context.js +15 -0
- package/dist/components/approval/context.js.map +1 -0
- package/dist/components/approval/use-approval.d.ts +16 -0
- package/dist/components/approval/use-approval.d.ts.map +1 -0
- package/dist/components/approval/use-approval.js +18 -0
- package/dist/components/approval/use-approval.js.map +1 -0
- package/dist/components/avatar/avatar.d.ts +8 -12
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/avatar.js +4 -12
- package/dist/components/avatar/avatar.js.map +1 -1
- package/dist/components/avatar/context.js.map +1 -1
- package/dist/components/avatar/use-avatar.d.ts +1 -1
- package/dist/components/avatar/use-avatar.d.ts.map +1 -1
- package/dist/components/avatar/use-avatar.js.map +1 -1
- package/dist/components/avatar-group/avatar-group.d.ts +4 -11
- package/dist/components/avatar-group/avatar-group.d.ts.map +1 -1
- package/dist/components/avatar-group/avatar-group.js +6 -12
- package/dist/components/avatar-group/avatar-group.js.map +1 -1
- package/dist/components/avatar-group/context.d.ts.map +1 -1
- package/dist/components/avatar-group/context.js.map +1 -1
- package/dist/components/back-top/back-top.d.ts +14 -27
- package/dist/components/back-top/back-top.d.ts.map +1 -1
- package/dist/components/back-top/back-top.js +11 -28
- package/dist/components/back-top/back-top.js.map +1 -1
- package/dist/components/back-top/context.d.ts.map +1 -1
- package/dist/components/back-top/context.js.map +1 -1
- package/dist/components/back-top/use-back-top.d.ts +3 -3
- package/dist/components/back-top/use-back-top.d.ts.map +1 -1
- package/dist/components/back-top/use-back-top.js +3 -3
- package/dist/components/back-top/use-back-top.js.map +1 -1
- package/dist/components/badge/badge.d.ts +23 -41
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/badge.js +13 -22
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/components/badge/context.js.map +1 -1
- package/dist/components/bar-code/bar-code.d.ts +89 -0
- package/dist/components/bar-code/bar-code.d.ts.map +1 -0
- package/dist/components/bar-code/bar-code.js +70 -0
- package/dist/components/bar-code/bar-code.js.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +37 -25
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +56 -22
- package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/breadcrumb/context.js.map +1 -1
- package/dist/components/breadcrumb/use-breadcrumb.d.ts +4 -2
- package/dist/components/breadcrumb/use-breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/use-breadcrumb.js +7 -2
- package/dist/components/breadcrumb/use-breadcrumb.js.map +1 -1
- package/dist/components/button-group/button-group.d.ts +28 -13
- package/dist/components/button-group/button-group.d.ts.map +1 -1
- package/dist/components/button-group/button-group.js +44 -12
- package/dist/components/button-group/button-group.js.map +1 -1
- package/dist/components/button-group/context.js +15 -0
- package/dist/components/button-group/context.js.map +1 -0
- package/dist/components/button.d.ts +12 -1
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +20 -9
- package/dist/components/button.js.map +1 -1
- package/dist/components/{calendar/calendar.d.ts → calendar-picker/calendar-picker.d.ts} +69 -114
- package/dist/components/calendar-picker/calendar-picker.d.ts.map +1 -0
- package/dist/components/calendar-picker/calendar-picker.js +257 -0
- package/dist/components/calendar-picker/calendar-picker.js.map +1 -0
- package/dist/components/calendar-picker/context.js +24 -0
- package/dist/components/calendar-picker/context.js.map +1 -0
- package/dist/components/calendar-picker/use-calendar-picker.d.ts +15 -0
- package/dist/components/calendar-picker/use-calendar-picker.d.ts.map +1 -0
- package/dist/components/calendar-picker/use-calendar-picker.js +28 -0
- package/dist/components/calendar-picker/use-calendar-picker.js.map +1 -0
- package/dist/components/calendar-range-picker/calendar-range-picker.d.ts +305 -0
- package/dist/components/calendar-range-picker/calendar-range-picker.d.ts.map +1 -0
- package/dist/components/calendar-range-picker/calendar-range-picker.js +259 -0
- package/dist/components/calendar-range-picker/calendar-range-picker.js.map +1 -0
- package/dist/components/calendar-range-picker/context.js +24 -0
- package/dist/components/calendar-range-picker/context.js.map +1 -0
- package/dist/components/calendar-range-picker/use-calendar-range-picker.d.ts +16 -0
- package/dist/components/calendar-range-picker/use-calendar-range-picker.d.ts.map +1 -0
- package/dist/components/calendar-range-picker/use-calendar-range-picker.js +29 -0
- package/dist/components/calendar-range-picker/use-calendar-range-picker.js.map +1 -0
- package/dist/components/card/card.d.ts +6 -29
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/card/card.js +7 -25
- package/dist/components/card/card.js.map +1 -1
- package/dist/components/card/context.d.ts.map +1 -1
- package/dist/components/card/context.js.map +1 -1
- package/dist/components/carousel/carousel.d.ts +17 -31
- package/dist/components/carousel/carousel.d.ts.map +1 -1
- package/dist/components/carousel/carousel.js +28 -40
- package/dist/components/carousel/carousel.js.map +1 -1
- package/dist/components/carousel/context.js.map +1 -1
- package/dist/components/carousel/use-carousel.d.ts.map +1 -1
- package/dist/components/carousel/use-carousel.js.map +1 -1
- package/dist/components/cascader/cascader.d.ts +76 -53
- package/dist/components/cascader/cascader.d.ts.map +1 -1
- package/dist/components/cascader/cascader.js +153 -70
- package/dist/components/cascader/cascader.js.map +1 -1
- package/dist/components/cascader/context.js +19 -1
- package/dist/components/cascader/context.js.map +1 -1
- package/dist/components/cascader/use-cascader.d.ts +4 -4
- package/dist/components/cascader/use-cascader.d.ts.map +1 -1
- package/dist/components/cascader/use-cascader.js +3 -3
- package/dist/components/cascader/use-cascader.js.map +1 -1
- package/dist/components/checkbox/checkbox.d.ts +37 -19
- package/dist/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox/checkbox.js +33 -14
- package/dist/components/checkbox/checkbox.js.map +1 -1
- package/dist/components/checkbox/use-checkbox.d.ts.map +1 -1
- package/dist/components/checkbox/use-checkbox.js.map +1 -1
- package/dist/components/checkbox-group/checkbox-group.d.ts +39 -30
- package/dist/components/checkbox-group/checkbox-group.d.ts.map +1 -1
- package/dist/components/checkbox-group/checkbox-group.js +25 -34
- package/dist/components/checkbox-group/checkbox-group.js.map +1 -1
- package/dist/components/checkbox-group/context.js.map +1 -1
- package/dist/components/checkbox-group/use-checkbox-group.d.ts +1 -1
- package/dist/components/checkbox-group/use-checkbox-group.d.ts.map +1 -1
- package/dist/components/checkbox-group/use-checkbox-group.js +1 -1
- package/dist/components/checkbox-group/use-checkbox-group.js.map +1 -1
- package/dist/components/clipboard/clipboard.d.ts +43 -11
- package/dist/components/clipboard/clipboard.d.ts.map +1 -1
- package/dist/components/clipboard/clipboard.js +23 -12
- package/dist/components/clipboard/clipboard.js.map +1 -1
- package/dist/components/clipboard/context.js.map +1 -1
- package/dist/components/clipboard/use-clipboard.d.ts.map +1 -1
- package/dist/components/clipboard/use-clipboard.js.map +1 -1
- package/dist/components/code-view/code-view.d.ts +154 -0
- package/dist/components/code-view/code-view.d.ts.map +1 -0
- package/dist/components/code-view/code-view.js +179 -0
- package/dist/components/code-view/code-view.js.map +1 -0
- package/dist/components/code-view/context.js +15 -0
- package/dist/components/code-view/context.js.map +1 -0
- package/dist/components/code-view/use-code-view.d.ts +18 -0
- package/dist/components/code-view/use-code-view.d.ts.map +1 -0
- package/dist/components/code-view/use-code-view.js +24 -0
- package/dist/components/code-view/use-code-view.js.map +1 -0
- package/dist/components/collapsible/collapsible.d.ts +23 -7
- package/dist/components/collapsible/collapsible.d.ts.map +1 -1
- package/dist/components/collapsible/collapsible.js +26 -10
- package/dist/components/collapsible/collapsible.js.map +1 -1
- package/dist/components/collapsible/context.js.map +1 -1
- package/dist/components/collapsible/use-collapsible.d.ts +1 -1
- package/dist/components/collapsible/use-collapsible.d.ts.map +1 -1
- package/dist/components/collapsible/use-collapsible.js +1 -1
- package/dist/components/collapsible/use-collapsible.js.map +1 -1
- package/dist/components/color-field/color-field.d.ts +151 -0
- package/dist/components/color-field/color-field.d.ts.map +1 -0
- package/dist/components/color-field/color-field.js +122 -0
- package/dist/components/color-field/color-field.js.map +1 -0
- package/dist/components/color-field/context.d.ts +7 -0
- package/dist/components/color-field/context.d.ts.map +1 -0
- package/dist/components/color-field/context.js +15 -0
- package/dist/components/color-field/context.js.map +1 -0
- package/dist/components/color-field/use-color-field.d.ts +10 -0
- package/dist/components/color-field/use-color-field.d.ts.map +1 -0
- package/dist/components/color-field/use-color-field.js +16 -0
- package/dist/components/color-field/use-color-field.js.map +1 -0
- package/dist/components/color-picker/color-picker.d.ts +55 -88
- package/dist/components/color-picker/color-picker.d.ts.map +1 -1
- package/dist/components/color-picker/color-picker.js +80 -100
- package/dist/components/color-picker/color-picker.js.map +1 -1
- package/dist/components/color-picker/context.js +1 -10
- package/dist/components/color-picker/context.js.map +1 -1
- package/dist/components/color-picker/use-color-picker.d.ts +15 -8
- package/dist/components/color-picker/use-color-picker.d.ts.map +1 -1
- package/dist/components/color-picker/use-color-picker.js +52 -18
- package/dist/components/color-picker/use-color-picker.js.map +1 -1
- package/dist/components/color-slider/color-slider.d.ts +142 -0
- package/dist/components/color-slider/color-slider.d.ts.map +1 -0
- package/dist/components/color-slider/color-slider.js +118 -0
- package/dist/components/color-slider/color-slider.js.map +1 -0
- package/dist/components/color-slider/context.d.ts +7 -0
- package/dist/components/color-slider/context.d.ts.map +1 -0
- package/dist/components/color-slider/context.js +15 -0
- package/dist/components/color-slider/context.js.map +1 -0
- package/dist/components/color-slider/use-color-slider.d.ts +14 -0
- package/dist/components/color-slider/use-color-slider.d.ts.map +1 -0
- package/dist/components/color-slider/use-color-slider.js +30 -0
- package/dist/components/color-slider/use-color-slider.js.map +1 -0
- package/dist/components/color-swatch/color-swatch.d.ts +34 -0
- package/dist/components/color-swatch/color-swatch.d.ts.map +1 -0
- package/dist/components/color-swatch/color-swatch.js +29 -0
- package/dist/components/color-swatch/color-swatch.js.map +1 -0
- package/dist/components/color-swatch-picker/color-swatch-picker.d.ts +154 -0
- package/dist/components/color-swatch-picker/color-swatch-picker.d.ts.map +1 -0
- package/dist/components/color-swatch-picker/color-swatch-picker.js +130 -0
- package/dist/components/color-swatch-picker/color-swatch-picker.js.map +1 -0
- package/dist/components/color-swatch-picker/context.d.ts +7 -0
- package/dist/components/color-swatch-picker/context.d.ts.map +1 -0
- package/dist/components/color-swatch-picker/context.js +15 -0
- package/dist/components/color-swatch-picker/context.js.map +1 -0
- package/dist/components/color-swatch-picker/use-color-swatch-picker.d.ts +13 -0
- package/dist/components/color-swatch-picker/use-color-swatch-picker.d.ts.map +1 -0
- package/dist/components/color-swatch-picker/use-color-swatch-picker.js +21 -0
- package/dist/components/color-swatch-picker/use-color-swatch-picker.js.map +1 -0
- package/dist/components/combobox/combobox.d.ts +75 -75
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/combobox.js +77 -89
- package/dist/components/combobox/combobox.js.map +1 -1
- package/dist/components/combobox/context.js +1 -1
- package/dist/components/combobox/context.js.map +1 -1
- package/dist/components/combobox/use-combobox.d.ts +6 -6
- package/dist/components/combobox/use-combobox.d.ts.map +1 -1
- package/dist/components/combobox/use-combobox.js +3 -3
- package/dist/components/combobox/use-combobox.js.map +1 -1
- package/dist/components/command/command.d.ts +264 -0
- package/dist/components/command/command.d.ts.map +1 -0
- package/dist/components/command/command.js +276 -0
- package/dist/components/command/command.js.map +1 -0
- package/dist/components/command/context.js +33 -0
- package/dist/components/command/context.js.map +1 -0
- package/dist/components/command/use-command.d.ts +20 -0
- package/dist/components/command/use-command.d.ts.map +1 -0
- package/dist/components/command/use-command.js +88 -0
- package/dist/components/command/use-command.js.map +1 -0
- package/dist/components/context-menu/context-menu.d.ts +34 -65
- package/dist/components/context-menu/context-menu.d.ts.map +1 -1
- package/dist/components/context-menu/context-menu.js +72 -107
- package/dist/components/context-menu/context-menu.js.map +1 -1
- package/dist/components/context-menu/context.d.ts +2 -10
- package/dist/components/context-menu/context.d.ts.map +1 -1
- package/dist/components/context-menu/context.js +1 -10
- package/dist/components/context-menu/context.js.map +1 -1
- package/dist/components/context-menu/use-context-menu.d.ts +6 -4
- package/dist/components/context-menu/use-context-menu.d.ts.map +1 -1
- package/dist/components/context-menu/use-context-menu.js +21 -10
- package/dist/components/context-menu/use-context-menu.js.map +1 -1
- package/dist/components/date-field/context.js.map +1 -1
- package/dist/components/date-field/date-field.d.ts +34 -59
- package/dist/components/date-field/date-field.d.ts.map +1 -1
- package/dist/components/date-field/date-field.js +27 -62
- package/dist/components/date-field/date-field.js.map +1 -1
- package/dist/components/date-field/use-date-field.d.ts.map +1 -1
- package/dist/components/date-field/use-date-field.js +1 -1
- package/dist/components/date-field/use-date-field.js.map +1 -1
- package/dist/components/date-picker/context.js +2 -11
- package/dist/components/date-picker/context.js.map +1 -1
- package/dist/components/date-picker/date-picker.d.ts +108 -205
- package/dist/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.js +170 -203
- package/dist/components/date-picker/date-picker.js.map +1 -1
- package/dist/components/date-picker/use-date-picker.d.ts +7 -4
- package/dist/components/date-picker/use-date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/use-date-picker.js +83 -30
- package/dist/components/date-picker/use-date-picker.js.map +1 -1
- package/dist/components/date-range-picker/context.js +42 -0
- package/dist/components/date-range-picker/context.js.map +1 -0
- package/dist/components/date-range-picker/date-range-picker.d.ts +530 -0
- package/dist/components/date-range-picker/date-range-picker.d.ts.map +1 -0
- package/dist/components/date-range-picker/date-range-picker.js +510 -0
- package/dist/components/date-range-picker/date-range-picker.js.map +1 -0
- package/dist/components/date-range-picker/use-date-range-picker.d.ts +23 -0
- package/dist/components/date-range-picker/use-date-range-picker.d.ts.map +1 -0
- package/dist/components/date-range-picker/use-date-range-picker.js +126 -0
- package/dist/components/date-range-picker/use-date-range-picker.js.map +1 -0
- package/dist/components/descriptions/context.d.ts.map +1 -1
- package/dist/components/descriptions/context.js.map +1 -1
- package/dist/components/descriptions/descriptions.d.ts +23 -21
- package/dist/components/descriptions/descriptions.d.ts.map +1 -1
- package/dist/components/descriptions/descriptions.js +18 -24
- package/dist/components/descriptions/descriptions.js.map +1 -1
- package/dist/components/dialog/context.js.map +1 -1
- package/dist/components/dialog/dialog.d.ts +39 -17
- package/dist/components/dialog/dialog.d.ts.map +1 -1
- package/dist/components/dialog/dialog.js +60 -30
- package/dist/components/dialog/dialog.js.map +1 -1
- package/dist/components/dialog/use-dialog.d.ts +3 -3
- package/dist/components/dialog/use-dialog.d.ts.map +1 -1
- package/dist/components/dialog/use-dialog.js +15 -10
- package/dist/components/dialog/use-dialog.js.map +1 -1
- package/dist/components/diff-view/context.d.ts +7 -0
- package/dist/components/diff-view/context.d.ts.map +1 -0
- package/dist/components/diff-view/context.js +15 -0
- package/dist/components/diff-view/context.js.map +1 -0
- package/dist/components/diff-view/diff-view.d.ts +123 -0
- package/dist/components/diff-view/diff-view.d.ts.map +1 -0
- package/dist/components/diff-view/diff-view.js +177 -0
- package/dist/components/diff-view/diff-view.js.map +1 -0
- package/dist/components/diff-view/use-diff-view.d.ts +11 -0
- package/dist/components/diff-view/use-diff-view.d.ts.map +1 -0
- package/dist/components/diff-view/use-diff-view.js +18 -0
- package/dist/components/diff-view/use-diff-view.js.map +1 -0
- package/dist/components/download-trigger/download-trigger.d.ts +29 -13
- package/dist/components/download-trigger/download-trigger.d.ts.map +1 -1
- package/dist/components/download-trigger/download-trigger.js +16 -20
- package/dist/components/download-trigger/download-trigger.js.map +1 -1
- package/dist/components/download-trigger/use-download-trigger.d.ts.map +1 -1
- package/dist/components/download-trigger/use-download-trigger.js.map +1 -1
- package/dist/components/drawer/context.js.map +1 -1
- package/dist/components/drawer/drawer.d.ts +33 -31
- package/dist/components/drawer/drawer.d.ts.map +1 -1
- package/dist/components/drawer/drawer.js +51 -38
- package/dist/components/drawer/drawer.js.map +1 -1
- package/dist/components/drawer/use-drawer.d.ts +3 -3
- package/dist/components/drawer/use-drawer.d.ts.map +1 -1
- package/dist/components/drawer/use-drawer.js +15 -10
- package/dist/components/drawer/use-drawer.js.map +1 -1
- package/dist/components/editable/context.js.map +1 -1
- package/dist/components/editable/editable.d.ts +43 -30
- package/dist/components/editable/editable.d.ts.map +1 -1
- package/dist/components/editable/editable.js +20 -35
- package/dist/components/editable/editable.js.map +1 -1
- package/dist/components/editable/use-editable.d.ts +4 -4
- package/dist/components/editable/use-editable.d.ts.map +1 -1
- package/dist/components/editable/use-editable.js +1 -1
- package/dist/components/editable/use-editable.js.map +1 -1
- package/dist/components/empty-state/context.js.map +1 -1
- package/dist/components/empty-state/empty-state.d.ts +21 -12
- package/dist/components/empty-state/empty-state.d.ts.map +1 -1
- package/dist/components/empty-state/empty-state.js +16 -13
- package/dist/components/empty-state/empty-state.js.map +1 -1
- package/dist/components/empty-state/use-empty-state.js.map +1 -1
- package/dist/components/field/context.d.ts.map +1 -1
- package/dist/components/field/context.js.map +1 -1
- package/dist/components/field/field.d.ts +7 -10
- package/dist/components/field/field.d.ts.map +1 -1
- package/dist/components/field/field.js +17 -38
- package/dist/components/field/field.js.map +1 -1
- package/dist/components/field/use-field-control.d.ts +21 -21
- package/dist/components/field/use-field-control.d.ts.map +1 -1
- package/dist/components/field/use-field-control.js +21 -21
- package/dist/components/field/use-field-control.js.map +1 -1
- package/dist/components/field/use-field.d.ts.map +1 -1
- package/dist/components/field/use-field.js +1 -1
- package/dist/components/field/use-field.js.map +1 -1
- package/dist/components/field-array/context.d.ts +15 -0
- package/dist/components/field-array/context.d.ts.map +1 -0
- package/dist/components/field-array/context.js +24 -0
- package/dist/components/field-array/context.js.map +1 -0
- package/dist/components/{dynamic-input/dynamic-input.d.ts → field-array/field-array.d.ts} +56 -40
- package/dist/components/field-array/field-array.d.ts.map +1 -0
- package/dist/components/field-array/field-array.js +134 -0
- package/dist/components/field-array/field-array.js.map +1 -0
- package/dist/components/field-array/use-field-array.d.ts +12 -0
- package/dist/components/field-array/use-field-array.d.ts.map +1 -0
- package/dist/components/field-array/use-field-array.js +22 -0
- package/dist/components/field-array/use-field-array.js.map +1 -0
- package/dist/components/fieldset/context.d.ts.map +1 -1
- package/dist/components/fieldset/context.js.map +1 -1
- package/dist/components/fieldset/fieldset.d.ts +10 -5
- package/dist/components/fieldset/fieldset.d.ts.map +1 -1
- package/dist/components/fieldset/fieldset.js +21 -8
- package/dist/components/fieldset/fieldset.js.map +1 -1
- package/dist/components/fieldset/use-fieldset.d.ts.map +1 -1
- package/dist/components/fieldset/use-fieldset.js +1 -1
- package/dist/components/fieldset/use-fieldset.js.map +1 -1
- package/dist/components/file-upload/context.js.map +1 -1
- package/dist/components/file-upload/file-upload.d.ts +27 -55
- package/dist/components/file-upload/file-upload.d.ts.map +1 -1
- package/dist/components/file-upload/file-upload.js +41 -66
- package/dist/components/file-upload/file-upload.js.map +1 -1
- package/dist/components/file-upload/use-file-upload.d.ts.map +1 -1
- package/dist/components/file-upload/use-file-upload.js +1 -1
- package/dist/components/file-upload/use-file-upload.js.map +1 -1
- package/dist/components/flex/context.d.ts +11 -0
- package/dist/components/flex/context.d.ts.map +1 -0
- package/dist/components/flex/context.js +15 -0
- package/dist/components/flex/context.js.map +1 -0
- package/dist/components/flex/flex.d.ts +16 -25
- package/dist/components/flex/flex.d.ts.map +1 -1
- package/dist/components/flex/flex.js +60 -23
- package/dist/components/flex/flex.js.map +1 -1
- package/dist/components/float-button/context.d.ts.map +1 -1
- package/dist/components/float-button/context.js.map +1 -1
- package/dist/components/float-button/float-button.d.ts +29 -25
- package/dist/components/float-button/float-button.d.ts.map +1 -1
- package/dist/components/float-button/float-button.js +14 -23
- package/dist/components/float-button/float-button.js.map +1 -1
- package/dist/components/float-button/use-float-button.d.ts +6 -6
- package/dist/components/float-button/use-float-button.d.ts.map +1 -1
- package/dist/components/float-button/use-float-button.js +23 -8
- package/dist/components/float-button/use-float-button.js.map +1 -1
- package/dist/components/floating-panel/context.d.ts.map +1 -1
- package/dist/components/floating-panel/context.js.map +1 -1
- package/dist/components/floating-panel/floating-panel.d.ts +45 -62
- package/dist/components/floating-panel/floating-panel.d.ts.map +1 -1
- package/dist/components/floating-panel/floating-panel.js +42 -60
- package/dist/components/floating-panel/floating-panel.js.map +1 -1
- package/dist/components/floating-panel/use-floating-panel.d.ts +9 -5
- package/dist/components/floating-panel/use-floating-panel.d.ts.map +1 -1
- package/dist/components/floating-panel/use-floating-panel.js +18 -2
- package/dist/components/floating-panel/use-floating-panel.js.map +1 -1
- package/dist/components/form/context.js +1 -1
- package/dist/components/form/context.js.map +1 -1
- package/dist/components/form/form.d.ts +36 -51
- package/dist/components/form/form.d.ts.map +1 -1
- package/dist/components/form/form.js +43 -65
- package/dist/components/form/form.js.map +1 -1
- package/dist/components/form/use-form-control.js +49 -0
- package/dist/components/form/use-form-control.js.map +1 -0
- package/dist/components/form/use-form.d.ts +6 -5
- package/dist/components/form/use-form.d.ts.map +1 -1
- package/dist/components/form/use-form.js +1 -1
- package/dist/components/form/use-form.js.map +1 -1
- package/dist/components/gradient-text/gradient-text.d.ts +8 -11
- package/dist/components/gradient-text/gradient-text.d.ts.map +1 -1
- package/dist/components/gradient-text/gradient-text.js +4 -12
- package/dist/components/gradient-text/gradient-text.js.map +1 -1
- package/dist/components/grid/context.d.ts.map +1 -1
- package/dist/components/grid/context.js.map +1 -1
- package/dist/components/grid/grid.d.ts +43 -36
- package/dist/components/grid/grid.d.ts.map +1 -1
- package/dist/components/grid/grid.js +31 -55
- package/dist/components/grid/grid.js.map +1 -1
- package/dist/components/heatmap/context.d.ts.map +1 -1
- package/dist/components/heatmap/context.js +3 -3
- package/dist/components/heatmap/context.js.map +1 -1
- package/dist/components/heatmap/heatmap.d.ts +32 -97
- package/dist/components/heatmap/heatmap.d.ts.map +1 -1
- package/dist/components/heatmap/heatmap.js +51 -122
- package/dist/components/heatmap/heatmap.js.map +1 -1
- package/dist/components/heatmap/use-heatmap.d.ts +2 -2
- package/dist/components/heatmap/use-heatmap.d.ts.map +1 -1
- package/dist/components/heatmap/use-heatmap.js.map +1 -1
- package/dist/components/highlight/highlight.d.ts +10 -9
- package/dist/components/highlight/highlight.d.ts.map +1 -1
- package/dist/components/highlight/highlight.js +9 -13
- package/dist/components/highlight/highlight.js.map +1 -1
- package/dist/components/hover-card/context.js.map +1 -1
- package/dist/components/hover-card/hover-card.d.ts +22 -24
- package/dist/components/hover-card/hover-card.d.ts.map +1 -1
- package/dist/components/hover-card/hover-card.js +53 -35
- package/dist/components/hover-card/hover-card.js.map +1 -1
- package/dist/components/hover-card/use-hover-card.d.ts +7 -3
- package/dist/components/hover-card/use-hover-card.d.ts.map +1 -1
- package/dist/components/hover-card/use-hover-card.js +9 -3
- package/dist/components/hover-card/use-hover-card.js.map +1 -1
- package/dist/components/icon/icon.d.ts +21 -25
- package/dist/components/icon/icon.d.ts.map +1 -1
- package/dist/components/icon/icon.js +13 -26
- package/dist/components/icon/icon.js.map +1 -1
- package/dist/components/icon/use-icon.d.ts.map +1 -1
- package/dist/components/icon/use-icon.js.map +1 -1
- package/dist/components/icon-wrapper/icon-wrapper.d.ts +2 -12
- package/dist/components/icon-wrapper/icon-wrapper.d.ts.map +1 -1
- package/dist/components/icon-wrapper/icon-wrapper.js +3 -12
- package/dist/components/icon-wrapper/icon-wrapper.js.map +1 -1
- package/dist/components/image/context.js.map +1 -1
- package/dist/components/image/image.d.ts +7 -14
- package/dist/components/image/image.d.ts.map +1 -1
- package/dist/components/image/image.js +13 -14
- package/dist/components/image/image.js.map +1 -1
- package/dist/components/image/use-image.d.ts +1 -1
- package/dist/components/image/use-image.d.ts.map +1 -1
- package/dist/components/image/use-image.js.map +1 -1
- package/dist/components/image-cropper/context.d.ts.map +1 -1
- package/dist/components/image-cropper/context.js.map +1 -1
- package/dist/components/image-cropper/image-cropper.d.ts +57 -44
- package/dist/components/image-cropper/image-cropper.d.ts.map +1 -1
- package/dist/components/image-cropper/image-cropper.js +49 -58
- package/dist/components/image-cropper/image-cropper.js.map +1 -1
- package/dist/components/image-cropper/use-image-cropper.d.ts +3 -3
- package/dist/components/image-cropper/use-image-cropper.d.ts.map +1 -1
- package/dist/components/image-cropper/use-image-cropper.js.map +1 -1
- package/dist/components/image-viewer/context.d.ts.map +1 -1
- package/dist/components/image-viewer/context.js.map +1 -1
- package/dist/components/image-viewer/image-viewer.d.ts +25 -29
- package/dist/components/image-viewer/image-viewer.d.ts.map +1 -1
- package/dist/components/image-viewer/image-viewer.js +24 -37
- package/dist/components/image-viewer/image-viewer.js.map +1 -1
- package/dist/components/image-viewer/use-image-viewer.d.ts +2 -2
- package/dist/components/image-viewer/use-image-viewer.d.ts.map +1 -1
- package/dist/components/image-viewer/use-image-viewer.js +13 -8
- package/dist/components/image-viewer/use-image-viewer.js.map +1 -1
- package/dist/components/infinite-scroll/context.d.ts.map +1 -1
- package/dist/components/infinite-scroll/context.js.map +1 -1
- package/dist/components/infinite-scroll/infinite-scroll.d.ts +14 -12
- package/dist/components/infinite-scroll/infinite-scroll.d.ts.map +1 -1
- package/dist/components/infinite-scroll/infinite-scroll.js +18 -12
- package/dist/components/infinite-scroll/infinite-scroll.js.map +1 -1
- package/dist/components/infinite-scroll/use-infinite-scroll.d.ts +3 -3
- package/dist/components/infinite-scroll/use-infinite-scroll.d.ts.map +1 -1
- package/dist/components/infinite-scroll/use-infinite-scroll.js +1 -1
- package/dist/components/infinite-scroll/use-infinite-scroll.js.map +1 -1
- package/dist/components/input-group/context.d.ts +11 -0
- package/dist/components/input-group/context.d.ts.map +1 -0
- package/dist/components/input-group/context.js +15 -0
- package/dist/components/input-group/context.js.map +1 -0
- package/dist/components/input-group/input-group.d.ts +22 -0
- package/dist/components/input-group/input-group.d.ts.map +1 -0
- package/dist/components/input-group/input-group.js +29 -0
- package/dist/components/input-group/input-group.js.map +1 -0
- package/dist/components/json-viewer/json-viewer.d.ts +16 -33
- package/dist/components/json-viewer/json-viewer.d.ts.map +1 -1
- package/dist/components/json-viewer/json-viewer.js +22 -70
- package/dist/components/json-viewer/json-viewer.js.map +1 -1
- package/dist/components/json-viewer/use-json-viewer.d.ts +3 -3
- package/dist/components/json-viewer/use-json-viewer.d.ts.map +1 -1
- package/dist/components/json-viewer/use-json-viewer.js +2 -2
- package/dist/components/json-viewer/use-json-viewer.js.map +1 -1
- package/dist/components/kbd/kbd.d.ts +76 -0
- package/dist/components/kbd/kbd.d.ts.map +1 -0
- package/dist/components/kbd/kbd.js +68 -0
- package/dist/components/kbd/kbd.js.map +1 -0
- package/dist/components/kbd/use-kbd-platform.js +15 -0
- package/dist/components/kbd/use-kbd-platform.js.map +1 -0
- package/dist/components/layout/context.d.ts.map +1 -1
- package/dist/components/layout/context.js.map +1 -1
- package/dist/components/layout/layout.d.ts +23 -15
- package/dist/components/layout/layout.d.ts.map +1 -1
- package/dist/components/layout/layout.js +19 -17
- package/dist/components/layout/layout.js.map +1 -1
- package/dist/components/layout/use-layout.d.ts +1 -1
- package/dist/components/layout/use-layout.d.ts.map +1 -1
- package/dist/components/layout/use-layout.js +11 -4
- package/dist/components/layout/use-layout.js.map +1 -1
- package/dist/components/list/context.d.ts.map +1 -1
- package/dist/components/list/context.js.map +1 -1
- package/dist/components/list/list.d.ts +11 -11
- package/dist/components/list/list.d.ts.map +1 -1
- package/dist/components/list/list.js +5 -8
- package/dist/components/list/list.js.map +1 -1
- package/dist/components/listbox/context.js +1 -1
- package/dist/components/listbox/context.js.map +1 -1
- package/dist/components/listbox/listbox.d.ts +55 -31
- package/dist/components/listbox/listbox.d.ts.map +1 -1
- package/dist/components/listbox/listbox.js +66 -37
- package/dist/components/listbox/listbox.js.map +1 -1
- package/dist/components/listbox/use-listbox.d.ts +2 -2
- package/dist/components/listbox/use-listbox.d.ts.map +1 -1
- package/dist/components/listbox/use-listbox.js +1 -1
- package/dist/components/listbox/use-listbox.js.map +1 -1
- package/dist/components/loading-bar/context.js.map +1 -1
- package/dist/components/loading-bar/loading-bar.d.ts +6 -36
- package/dist/components/loading-bar/loading-bar.d.ts.map +1 -1
- package/dist/components/loading-bar/loading-bar.js +16 -37
- package/dist/components/loading-bar/loading-bar.js.map +1 -1
- package/dist/components/loading-bar/use-loading-bar.d.ts.map +1 -1
- package/dist/components/loading-bar/use-loading-bar.js.map +1 -1
- package/dist/components/log/context.d.ts.map +1 -1
- package/dist/components/log/context.js.map +1 -1
- package/dist/components/log/log.d.ts +28 -13
- package/dist/components/log/log.d.ts.map +1 -1
- package/dist/components/log/log.js +21 -10
- package/dist/components/log/log.js.map +1 -1
- package/dist/components/log/use-log.d.ts +3 -6
- package/dist/components/log/use-log.d.ts.map +1 -1
- package/dist/components/log/use-log.js +4 -7
- package/dist/components/log/use-log.js.map +1 -1
- package/dist/components/markdown-stream/context.d.ts +7 -0
- package/dist/components/markdown-stream/context.d.ts.map +1 -0
- package/dist/components/markdown-stream/context.js +15 -0
- package/dist/components/markdown-stream/context.js.map +1 -0
- package/dist/components/markdown-stream/markdown-stream.d.ts +70 -0
- package/dist/components/markdown-stream/markdown-stream.d.ts.map +1 -0
- package/dist/components/markdown-stream/markdown-stream.js +90 -0
- package/dist/components/markdown-stream/markdown-stream.js.map +1 -0
- package/dist/components/markdown-stream/use-markdown-stream.d.ts +10 -0
- package/dist/components/markdown-stream/use-markdown-stream.d.ts.map +1 -0
- package/dist/components/markdown-stream/use-markdown-stream.js +11 -0
- package/dist/components/markdown-stream/use-markdown-stream.js.map +1 -0
- package/dist/components/marquee/context.d.ts.map +1 -1
- package/dist/components/marquee/context.js.map +1 -1
- package/dist/components/marquee/marquee.d.ts +8 -11
- package/dist/components/marquee/marquee.d.ts.map +1 -1
- package/dist/components/marquee/marquee.js +8 -13
- package/dist/components/marquee/marquee.js.map +1 -1
- package/dist/components/masonry/masonry.d.ts +0 -6
- package/dist/components/masonry/masonry.d.ts.map +1 -1
- package/dist/components/masonry/masonry.js +26 -39
- package/dist/components/masonry/masonry.js.map +1 -1
- package/dist/components/matrix-code/context.d.ts +11 -0
- package/dist/components/matrix-code/context.d.ts.map +1 -0
- package/dist/components/matrix-code/context.js +15 -0
- package/dist/components/matrix-code/context.js.map +1 -0
- package/dist/components/matrix-code/matrix-code.d.ts +101 -0
- package/dist/components/matrix-code/matrix-code.d.ts.map +1 -0
- package/dist/components/matrix-code/matrix-code.js +93 -0
- package/dist/components/matrix-code/matrix-code.js.map +1 -0
- package/dist/components/mention/context.d.ts +1 -1
- package/dist/components/mention/context.d.ts.map +1 -1
- package/dist/components/mention/context.js.map +1 -1
- package/dist/components/mention/mention.d.ts +70 -63
- package/dist/components/mention/mention.d.ts.map +1 -1
- package/dist/components/mention/mention.js +75 -67
- package/dist/components/mention/mention.js.map +1 -1
- package/dist/components/mention/use-mention.d.ts +6 -6
- package/dist/components/mention/use-mention.d.ts.map +1 -1
- package/dist/components/mention/use-mention.js +3 -3
- package/dist/components/mention/use-mention.js.map +1 -1
- package/dist/components/menu/context.d.ts +3 -11
- package/dist/components/menu/context.d.ts.map +1 -1
- package/dist/components/menu/context.js +10 -10
- package/dist/components/menu/context.js.map +1 -1
- package/dist/components/menu/menu.d.ts +70 -72
- package/dist/components/menu/menu.d.ts.map +1 -1
- package/dist/components/menu/menu.js +104 -104
- package/dist/components/menu/menu.js.map +1 -1
- package/dist/components/menu/use-menu.d.ts +7 -4
- package/dist/components/menu/use-menu.d.ts.map +1 -1
- package/dist/components/menu/use-menu.js +36 -14
- package/dist/components/menu/use-menu.js.map +1 -1
- package/dist/components/menubar/context.d.ts +4 -10
- package/dist/components/menubar/context.d.ts.map +1 -1
- package/dist/components/menubar/context.js +2 -11
- package/dist/components/menubar/context.js.map +1 -1
- package/dist/components/menubar/menubar.d.ts +39 -69
- package/dist/components/menubar/menubar.d.ts.map +1 -1
- package/dist/components/menubar/menubar.js +157 -116
- package/dist/components/menubar/menubar.js.map +1 -1
- package/dist/components/menubar/use-menubar.d.ts +6 -4
- package/dist/components/menubar/use-menubar.d.ts.map +1 -1
- package/dist/components/menubar/use-menubar.js +28 -9
- package/dist/components/menubar/use-menubar.js.map +1 -1
- package/dist/components/message-feed/context.d.ts +19 -0
- package/dist/components/message-feed/context.d.ts.map +1 -0
- package/dist/components/message-feed/context.js +24 -0
- package/dist/components/message-feed/context.js.map +1 -0
- package/dist/components/message-feed/message-feed.d.ts +110 -0
- package/dist/components/message-feed/message-feed.d.ts.map +1 -0
- package/dist/components/message-feed/message-feed.js +148 -0
- package/dist/components/message-feed/message-feed.js.map +1 -0
- package/dist/components/message-feed/use-message-feed.d.ts +20 -0
- package/dist/components/message-feed/use-message-feed.d.ts.map +1 -0
- package/dist/components/{thread/use-thread.js → message-feed/use-message-feed.js} +13 -9
- package/dist/components/message-feed/use-message-feed.js.map +1 -0
- package/dist/components/navigation-menu/context.js.map +1 -1
- package/dist/components/navigation-menu/navigation-menu.d.ts +36 -33
- package/dist/components/navigation-menu/navigation-menu.d.ts.map +1 -1
- package/dist/components/navigation-menu/navigation-menu.js +75 -49
- package/dist/components/navigation-menu/navigation-menu.js.map +1 -1
- package/dist/components/navigation-menu/use-navigation-menu.d.ts +4 -2
- package/dist/components/navigation-menu/use-navigation-menu.d.ts.map +1 -1
- package/dist/components/navigation-menu/use-navigation-menu.js +5 -4
- package/dist/components/navigation-menu/use-navigation-menu.js.map +1 -1
- package/dist/components/notification/context.d.ts +1 -1
- package/dist/components/notification/context.d.ts.map +1 -1
- package/dist/components/notification/context.js.map +1 -1
- package/dist/components/notification/notification.d.ts +35 -57
- package/dist/components/notification/notification.d.ts.map +1 -1
- package/dist/components/notification/notification.js +32 -64
- package/dist/components/notification/notification.js.map +1 -1
- package/dist/components/notification/use-notification.d.ts +3 -3
- package/dist/components/notification/use-notification.d.ts.map +1 -1
- package/dist/components/notification/use-notification.js +3 -3
- package/dist/components/notification/use-notification.js.map +1 -1
- package/dist/components/number-animation/number-animation.d.ts +8 -35
- package/dist/components/number-animation/number-animation.d.ts.map +1 -1
- package/dist/components/number-animation/number-animation.js +15 -42
- package/dist/components/number-animation/number-animation.js.map +1 -1
- package/dist/components/number-field/context.js.map +1 -1
- package/dist/components/number-field/number-field.d.ts +39 -51
- package/dist/components/number-field/number-field.d.ts.map +1 -1
- package/dist/components/number-field/number-field.js +41 -56
- package/dist/components/number-field/number-field.js.map +1 -1
- package/dist/components/number-field/use-number-field.d.ts.map +1 -1
- package/dist/components/number-field/use-number-field.js.map +1 -1
- package/dist/components/page-header/context.d.ts.map +1 -1
- package/dist/components/page-header/context.js.map +1 -1
- package/dist/components/page-header/page-header.d.ts +43 -14
- package/dist/components/page-header/page-header.d.ts.map +1 -1
- package/dist/components/page-header/page-header.js +36 -14
- package/dist/components/page-header/page-header.js.map +1 -1
- package/dist/components/pagination/context.js.map +1 -1
- package/dist/components/pagination/pagination.d.ts +72 -45
- package/dist/components/pagination/pagination.d.ts.map +1 -1
- package/dist/components/pagination/pagination.js +98 -62
- package/dist/components/pagination/pagination.js.map +1 -1
- package/dist/components/pagination/use-pagination.d.ts +9 -3
- package/dist/components/pagination/use-pagination.d.ts.map +1 -1
- package/dist/components/pagination/use-pagination.js +41 -10
- package/dist/components/pagination/use-pagination.js.map +1 -1
- package/dist/components/password-input/context.d.ts.map +1 -1
- package/dist/components/password-input/context.js.map +1 -1
- package/dist/components/password-input/password-input.d.ts +24 -41
- package/dist/components/password-input/password-input.d.ts.map +1 -1
- package/dist/components/password-input/password-input.js +34 -51
- package/dist/components/password-input/password-input.js.map +1 -1
- package/dist/components/password-input/use-password-input.d.ts +1 -1
- package/dist/components/password-input/use-password-input.d.ts.map +1 -1
- package/dist/components/password-input/use-password-input.js +1 -1
- package/dist/components/password-input/use-password-input.js.map +1 -1
- package/dist/components/pin-input/context.js.map +1 -1
- package/dist/components/pin-input/pin-input.d.ts +43 -38
- package/dist/components/pin-input/pin-input.d.ts.map +1 -1
- package/dist/components/pin-input/pin-input.js +39 -41
- package/dist/components/pin-input/pin-input.js.map +1 -1
- package/dist/components/pin-input/use-pin-input.d.ts.map +1 -1
- package/dist/components/pin-input/use-pin-input.js +1 -1
- package/dist/components/pin-input/use-pin-input.js.map +1 -1
- package/dist/components/popconfirm/context.d.ts.map +1 -1
- package/dist/components/popconfirm/context.js.map +1 -1
- package/dist/components/popconfirm/popconfirm.d.ts +30 -27
- package/dist/components/popconfirm/popconfirm.d.ts.map +1 -1
- package/dist/components/popconfirm/popconfirm.js +42 -30
- package/dist/components/popconfirm/popconfirm.js.map +1 -1
- package/dist/components/popconfirm/use-popconfirm.d.ts +3 -3
- package/dist/components/popconfirm/use-popconfirm.d.ts.map +1 -1
- package/dist/components/popconfirm/use-popconfirm.js +15 -7
- package/dist/components/popconfirm/use-popconfirm.js.map +1 -1
- package/dist/components/popover/context.js.map +1 -1
- package/dist/components/popover/popover.d.ts +23 -17
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/popover/popover.js +28 -26
- package/dist/components/popover/popover.js.map +1 -1
- package/dist/components/popover/use-popover.d.ts +3 -3
- package/dist/components/popover/use-popover.d.ts.map +1 -1
- package/dist/components/popover/use-popover.js +3 -3
- package/dist/components/popover/use-popover.js.map +1 -1
- package/dist/components/progress/progress.d.ts +8 -17
- package/dist/components/progress/progress.d.ts.map +1 -1
- package/dist/components/progress/progress.js +7 -21
- package/dist/components/progress/progress.js.map +1 -1
- package/dist/components/prompt-input/context.d.ts +7 -0
- package/dist/components/prompt-input/context.d.ts.map +1 -0
- package/dist/components/prompt-input/context.js +15 -0
- package/dist/components/prompt-input/context.js.map +1 -0
- package/dist/components/prompt-input/prompt-input.d.ts +104 -0
- package/dist/components/prompt-input/prompt-input.d.ts.map +1 -0
- package/dist/components/prompt-input/prompt-input.js +80 -0
- package/dist/components/prompt-input/prompt-input.js.map +1 -0
- package/dist/components/prompt-input/use-prompt-input.d.ts +16 -0
- package/dist/components/prompt-input/use-prompt-input.d.ts.map +1 -0
- package/dist/components/prompt-input/use-prompt-input.js +18 -0
- package/dist/components/prompt-input/use-prompt-input.js.map +1 -0
- package/dist/components/question-flow/context.d.ts +7 -0
- package/dist/components/question-flow/context.d.ts.map +1 -0
- package/dist/components/question-flow/context.js +15 -0
- package/dist/components/question-flow/context.js.map +1 -0
- package/dist/components/question-flow/question-flow.d.ts +313 -0
- package/dist/components/question-flow/question-flow.d.ts.map +1 -0
- package/dist/components/question-flow/question-flow.js +281 -0
- package/dist/components/question-flow/question-flow.js.map +1 -0
- package/dist/components/question-flow/use-question-flow.d.ts +20 -0
- package/dist/components/question-flow/use-question-flow.d.ts.map +1 -0
- package/dist/components/question-flow/use-question-flow.js +24 -0
- package/dist/components/question-flow/use-question-flow.js.map +1 -0
- package/dist/components/radio-group/context.js.map +1 -1
- package/dist/components/radio-group/radio-group.d.ts +33 -36
- package/dist/components/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group/radio-group.js +22 -36
- package/dist/components/radio-group/radio-group.js.map +1 -1
- package/dist/components/radio-group/use-radio-group.d.ts +2 -2
- package/dist/components/radio-group/use-radio-group.d.ts.map +1 -1
- package/dist/components/radio-group/use-radio-group.js +1 -1
- package/dist/components/radio-group/use-radio-group.js.map +1 -1
- package/dist/components/rating/context.js.map +1 -1
- package/dist/components/rating/rating.d.ts +36 -30
- package/dist/components/rating/rating.d.ts.map +1 -1
- package/dist/components/rating/rating.js +25 -27
- package/dist/components/rating/rating.js.map +1 -1
- package/dist/components/rating/use-rating.d.ts +2 -2
- package/dist/components/rating/use-rating.d.ts.map +1 -1
- package/dist/components/rating/use-rating.js +1 -1
- package/dist/components/rating/use-rating.js.map +1 -1
- package/dist/components/reasoning/context.d.ts +7 -0
- package/dist/components/reasoning/context.d.ts.map +1 -0
- package/dist/components/reasoning/context.js +15 -0
- package/dist/components/reasoning/context.js.map +1 -0
- package/dist/components/reasoning/reasoning.d.ts +112 -0
- package/dist/components/reasoning/reasoning.d.ts.map +1 -0
- package/dist/components/reasoning/reasoning.js +142 -0
- package/dist/components/reasoning/reasoning.js.map +1 -0
- package/dist/components/reasoning/use-reasoning.d.ts +14 -0
- package/dist/components/reasoning/use-reasoning.d.ts.map +1 -0
- package/dist/components/reasoning/use-reasoning.js +33 -0
- package/dist/components/reasoning/use-reasoning.js.map +1 -0
- package/dist/components/resizable/context.d.ts.map +1 -1
- package/dist/components/resizable/context.js.map +1 -1
- package/dist/components/resizable/resizable.d.ts +19 -58
- package/dist/components/resizable/resizable.d.ts.map +1 -1
- package/dist/components/resizable/resizable.js +22 -61
- package/dist/components/resizable/resizable.js.map +1 -1
- package/dist/components/resizable/use-resizable.d.ts +3 -3
- package/dist/components/resizable/use-resizable.d.ts.map +1 -1
- package/dist/components/resizable/use-resizable.js +4 -4
- package/dist/components/resizable/use-resizable.js.map +1 -1
- package/dist/components/scroll-area/context.js.map +1 -1
- package/dist/components/scroll-area/scroll-area.d.ts +15 -24
- package/dist/components/scroll-area/scroll-area.d.ts.map +1 -1
- package/dist/components/scroll-area/scroll-area.js +10 -24
- package/dist/components/scroll-area/scroll-area.js.map +1 -1
- package/dist/components/scroll-area/use-scroll-area.d.ts +5 -5
- package/dist/components/scroll-area/use-scroll-area.d.ts.map +1 -1
- package/dist/components/scroll-area/use-scroll-area.js +2 -2
- package/dist/components/scroll-area/use-scroll-area.js.map +1 -1
- package/dist/components/scrollbar/context.d.ts.map +1 -1
- package/dist/components/scrollbar/context.js.map +1 -1
- package/dist/components/scrollbar/scrollbar.d.ts +24 -46
- package/dist/components/scrollbar/scrollbar.d.ts.map +1 -1
- package/dist/components/scrollbar/scrollbar.js +19 -47
- package/dist/components/scrollbar/scrollbar.js.map +1 -1
- package/dist/components/scrollbar/use-scrollbar.d.ts +5 -5
- package/dist/components/scrollbar/use-scrollbar.d.ts.map +1 -1
- package/dist/components/scrollbar/use-scrollbar.js +3 -3
- package/dist/components/scrollbar/use-scrollbar.js.map +1 -1
- package/dist/components/segmented/context.d.ts +1 -1
- package/dist/components/segmented/context.d.ts.map +1 -1
- package/dist/components/segmented/context.js.map +1 -1
- package/dist/components/segmented/segmented.d.ts +4 -28
- package/dist/components/segmented/segmented.d.ts.map +1 -1
- package/dist/components/segmented/segmented.js +15 -38
- package/dist/components/segmented/segmented.js.map +1 -1
- package/dist/components/segmented/use-segmented.d.ts +3 -3
- package/dist/components/segmented/use-segmented.d.ts.map +1 -1
- package/dist/components/segmented/use-segmented.js.map +1 -1
- package/dist/components/select/context.js +10 -1
- package/dist/components/select/context.js.map +1 -1
- package/dist/components/select/select.d.ts +83 -59
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/select/select.js +149 -87
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/select/use-select.d.ts +8 -4
- package/dist/components/select/use-select.d.ts.map +1 -1
- package/dist/components/select/use-select.js +8 -4
- package/dist/components/select/use-select.js.map +1 -1
- package/dist/components/separator/context.js +15 -0
- package/dist/components/separator/context.js.map +1 -0
- package/dist/components/separator/separator.d.ts +90 -11
- package/dist/components/separator/separator.d.ts.map +1 -1
- package/dist/components/separator/separator.js +60 -17
- package/dist/components/separator/separator.js.map +1 -1
- package/dist/components/side-nav/context.d.ts.map +1 -1
- package/dist/components/side-nav/context.js.map +1 -1
- package/dist/components/side-nav/side-nav.d.ts +32 -30
- package/dist/components/side-nav/side-nav.d.ts.map +1 -1
- package/dist/components/side-nav/side-nav.js +49 -36
- package/dist/components/side-nav/side-nav.js.map +1 -1
- package/dist/components/side-nav/use-side-nav.d.ts +5 -3
- package/dist/components/side-nav/use-side-nav.d.ts.map +1 -1
- package/dist/components/side-nav/use-side-nav.js +9 -12
- package/dist/components/side-nav/use-side-nav.js.map +1 -1
- package/dist/components/signature-pad/context.d.ts.map +1 -1
- package/dist/components/signature-pad/context.js.map +1 -1
- package/dist/components/signature-pad/signature-pad.d.ts +2 -11
- package/dist/components/signature-pad/signature-pad.d.ts.map +1 -1
- package/dist/components/signature-pad/signature-pad.js +9 -17
- package/dist/components/signature-pad/signature-pad.js.map +1 -1
- package/dist/components/signature-pad/use-signature-pad.d.ts +2 -2
- package/dist/components/signature-pad/use-signature-pad.d.ts.map +1 -1
- package/dist/components/signature-pad/use-signature-pad.js +1 -1
- package/dist/components/signature-pad/use-signature-pad.js.map +1 -1
- package/dist/components/skeleton/context.js.map +1 -1
- package/dist/components/skeleton/skeleton.d.ts +20 -21
- package/dist/components/skeleton/skeleton.d.ts.map +1 -1
- package/dist/components/skeleton/skeleton.js +9 -14
- package/dist/components/skeleton/skeleton.js.map +1 -1
- package/dist/components/skeleton/use-skeleton.js.map +1 -1
- package/dist/components/slider/context.js.map +1 -1
- package/dist/components/slider/slider.d.ts +32 -53
- package/dist/components/slider/slider.d.ts.map +1 -1
- package/dist/components/slider/slider.js +41 -67
- package/dist/components/slider/slider.js.map +1 -1
- package/dist/components/slider/use-slider.d.ts +2 -2
- package/dist/components/slider/use-slider.d.ts.map +1 -1
- package/dist/components/slider/use-slider.js +1 -1
- package/dist/components/slider/use-slider.js.map +1 -1
- package/dist/components/sortable/context.d.ts.map +1 -1
- package/dist/components/sortable/context.js.map +1 -1
- package/dist/components/sortable/sortable.d.ts +22 -26
- package/dist/components/sortable/sortable.d.ts.map +1 -1
- package/dist/components/sortable/sortable.js +26 -26
- package/dist/components/sortable/sortable.js.map +1 -1
- package/dist/components/sortable/use-sortable.d.ts +2 -2
- package/dist/components/sortable/use-sortable.d.ts.map +1 -1
- package/dist/components/sortable/use-sortable.js +1 -1
- package/dist/components/sortable/use-sortable.js.map +1 -1
- package/dist/components/spinner/context.js.map +1 -1
- package/dist/components/spinner/spinner.d.ts +12 -19
- package/dist/components/spinner/spinner.d.ts.map +1 -1
- package/dist/components/spinner/spinner.js +7 -18
- package/dist/components/spinner/spinner.js.map +1 -1
- package/dist/components/spinner/use-spinner.js.map +1 -1
- package/dist/components/splitter/context.js.map +1 -1
- package/dist/components/splitter/splitter.d.ts +8 -23
- package/dist/components/splitter/splitter.d.ts.map +1 -1
- package/dist/components/splitter/splitter.js +14 -36
- package/dist/components/splitter/splitter.js.map +1 -1
- package/dist/components/splitter/use-splitter.d.ts +2 -2
- package/dist/components/splitter/use-splitter.d.ts.map +1 -1
- package/dist/components/splitter/use-splitter.js +1 -1
- package/dist/components/splitter/use-splitter.js.map +1 -1
- package/dist/components/statistic/context.d.ts.map +1 -1
- package/dist/components/statistic/context.js.map +1 -1
- package/dist/components/statistic/statistic.d.ts +13 -10
- package/dist/components/statistic/statistic.d.ts.map +1 -1
- package/dist/components/statistic/statistic.js +11 -9
- package/dist/components/statistic/statistic.js.map +1 -1
- package/dist/components/steps/context.js.map +1 -1
- package/dist/components/steps/steps.d.ts +45 -33
- package/dist/components/steps/steps.d.ts.map +1 -1
- package/dist/components/steps/steps.js +21 -33
- package/dist/components/steps/steps.js.map +1 -1
- package/dist/components/steps/use-steps.d.ts +3 -3
- package/dist/components/steps/use-steps.d.ts.map +1 -1
- package/dist/components/steps/use-steps.js +3 -3
- package/dist/components/steps/use-steps.js.map +1 -1
- package/dist/components/switch/switch.d.ts +36 -18
- package/dist/components/switch/switch.d.ts.map +1 -1
- package/dist/components/switch/switch.js +34 -15
- package/dist/components/switch/switch.js.map +1 -1
- package/dist/components/switch/use-switch.d.ts.map +1 -1
- package/dist/components/switch/use-switch.js.map +1 -1
- package/dist/components/table/context.js +5 -1
- package/dist/components/table/context.js.map +1 -1
- package/dist/components/table/table.d.ts +91 -96
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +167 -147
- package/dist/components/table/table.js.map +1 -1
- package/dist/components/table/use-table.d.ts +3 -3
- package/dist/components/table/use-table.d.ts.map +1 -1
- package/dist/components/table/use-table.js +3 -3
- package/dist/components/table/use-table.js.map +1 -1
- package/dist/components/tabs/context.js.map +1 -1
- package/dist/components/tabs/tabs.d.ts +35 -39
- package/dist/components/tabs/tabs.d.ts.map +1 -1
- package/dist/components/tabs/tabs.js +69 -53
- package/dist/components/tabs/tabs.js.map +1 -1
- package/dist/components/tabs/use-tabs.d.ts +6 -4
- package/dist/components/tabs/use-tabs.d.ts.map +1 -1
- package/dist/components/tabs/use-tabs.js +11 -6
- package/dist/components/tabs/use-tabs.js.map +1 -1
- package/dist/components/tag/context.d.ts.map +1 -1
- package/dist/components/tag/context.js.map +1 -1
- package/dist/components/tag/tag.d.ts +13 -4
- package/dist/components/tag/tag.d.ts.map +1 -1
- package/dist/components/tag/tag.js +17 -8
- package/dist/components/tag/tag.js.map +1 -1
- package/dist/components/tag/use-tag.d.ts.map +1 -1
- package/dist/components/tag/use-tag.js.map +1 -1
- package/dist/components/tag-group/context.d.ts +13 -0
- package/dist/components/tag-group/context.d.ts.map +1 -0
- package/dist/components/tag-group/context.js +24 -0
- package/dist/components/tag-group/context.js.map +1 -0
- package/dist/components/tag-group/tag-group.d.ts +190 -0
- package/dist/components/tag-group/tag-group.d.ts.map +1 -0
- package/dist/components/tag-group/tag-group.js +180 -0
- package/dist/components/tag-group/tag-group.js.map +1 -0
- package/dist/components/tag-group/use-tag-group.d.ts +13 -0
- package/dist/components/tag-group/use-tag-group.d.ts.map +1 -0
- package/dist/components/tag-group/use-tag-group.js +22 -0
- package/dist/components/tag-group/use-tag-group.js.map +1 -0
- package/dist/components/tags-input/context.js.map +1 -1
- package/dist/components/tags-input/tags-input.d.ts +50 -48
- package/dist/components/tags-input/tags-input.d.ts.map +1 -1
- package/dist/components/tags-input/tags-input.js +49 -52
- package/dist/components/tags-input/tags-input.js.map +1 -1
- package/dist/components/tags-input/use-tags-input.d.ts +2 -2
- package/dist/components/tags-input/use-tags-input.d.ts.map +1 -1
- package/dist/components/tags-input/use-tags-input.js +1 -1
- package/dist/components/tags-input/use-tags-input.js.map +1 -1
- package/dist/components/text-field/context.js.map +1 -1
- package/dist/components/text-field/text-field.d.ts +52 -41
- package/dist/components/text-field/text-field.d.ts.map +1 -1
- package/dist/components/text-field/text-field.js +71 -49
- package/dist/components/text-field/text-field.js.map +1 -1
- package/dist/components/text-field/use-text-field.d.ts.map +1 -1
- package/dist/components/text-field/use-text-field.js.map +1 -1
- package/dist/components/time-field/context.js.map +1 -1
- package/dist/components/time-field/time-field.d.ts +29 -44
- package/dist/components/time-field/time-field.d.ts.map +1 -1
- package/dist/components/time-field/time-field.js +23 -49
- package/dist/components/time-field/time-field.js.map +1 -1
- package/dist/components/time-field/use-time-field.d.ts.map +1 -1
- package/dist/components/time-field/use-time-field.js +1 -1
- package/dist/components/time-field/use-time-field.js.map +1 -1
- package/dist/components/time-picker/context.js.map +1 -1
- package/dist/components/time-picker/time-picker.d.ts +63 -72
- package/dist/components/time-picker/time-picker.d.ts.map +1 -1
- package/dist/components/time-picker/time-picker.js +87 -83
- package/dist/components/time-picker/time-picker.js.map +1 -1
- package/dist/components/time-picker/use-time-picker.d.ts +2 -2
- package/dist/components/time-picker/use-time-picker.d.ts.map +1 -1
- package/dist/components/time-picker/use-time-picker.js +3 -3
- package/dist/components/time-picker/use-time-picker.js.map +1 -1
- package/dist/components/time-range-picker/context.js +33 -0
- package/dist/components/time-range-picker/context.js.map +1 -0
- package/dist/components/time-range-picker/time-range-picker.d.ts +353 -0
- package/dist/components/time-range-picker/time-range-picker.d.ts.map +1 -0
- package/dist/components/time-range-picker/time-range-picker.js +357 -0
- package/dist/components/time-range-picker/time-range-picker.js.map +1 -0
- package/dist/components/time-range-picker/use-time-range-picker.d.ts +18 -0
- package/dist/components/time-range-picker/use-time-range-picker.d.ts.map +1 -0
- package/dist/components/time-range-picker/use-time-range-picker.js +63 -0
- package/dist/components/time-range-picker/use-time-range-picker.js.map +1 -0
- package/dist/components/timeline/context.d.ts.map +1 -1
- package/dist/components/timeline/context.js.map +1 -1
- package/dist/components/timeline/timeline.d.ts +10 -21
- package/dist/components/timeline/timeline.d.ts.map +1 -1
- package/dist/components/timeline/timeline.js +15 -20
- package/dist/components/timeline/timeline.js.map +1 -1
- package/dist/components/timer/context.d.ts.map +1 -1
- package/dist/components/timer/context.js.map +1 -1
- package/dist/components/timer/timer.d.ts +38 -20
- package/dist/components/timer/timer.d.ts.map +1 -1
- package/dist/components/timer/timer.js +22 -27
- package/dist/components/timer/timer.js.map +1 -1
- package/dist/components/timer/use-timer.d.ts +2 -2
- package/dist/components/timer/use-timer.d.ts.map +1 -1
- package/dist/components/timer/use-timer.js.map +1 -1
- package/dist/components/timestamp/timestamp.d.ts +47 -0
- package/dist/components/timestamp/timestamp.d.ts.map +1 -0
- package/dist/components/timestamp/timestamp.js +48 -0
- package/dist/components/timestamp/timestamp.js.map +1 -0
- package/dist/components/toast/context.js.map +1 -1
- package/dist/components/toast/toast.d.ts +42 -24
- package/dist/components/toast/toast.d.ts.map +1 -1
- package/dist/components/toast/toast.js +47 -27
- package/dist/components/toast/toast.js.map +1 -1
- package/dist/components/toast/use-toast.d.ts.map +1 -1
- package/dist/components/toast/use-toast.js.map +1 -1
- package/dist/components/toggle/toggle.d.ts +7 -1
- package/dist/components/toggle/toggle.d.ts.map +1 -1
- package/dist/components/toggle/toggle.js +3 -1
- package/dist/components/toggle/toggle.js.map +1 -1
- package/dist/components/toggle/use-toggle.d.ts.map +1 -1
- package/dist/components/toggle/use-toggle.js.map +1 -1
- package/dist/components/toggle-group/context.js.map +1 -1
- package/dist/components/toggle-group/toggle-group.d.ts +41 -19
- package/dist/components/toggle-group/toggle-group.d.ts.map +1 -1
- package/dist/components/toggle-group/toggle-group.js +62 -27
- package/dist/components/toggle-group/toggle-group.js.map +1 -1
- package/dist/components/toggle-group/use-toggle-group.d.ts +2 -2
- package/dist/components/toggle-group/use-toggle-group.d.ts.map +1 -1
- package/dist/components/toggle-group/use-toggle-group.js.map +1 -1
- package/dist/components/tool-call/context.d.ts +7 -0
- package/dist/components/tool-call/context.d.ts.map +1 -0
- package/dist/components/tool-call/context.js +15 -0
- package/dist/components/tool-call/context.js.map +1 -0
- package/dist/components/tool-call/tool-call.d.ts +130 -0
- package/dist/components/tool-call/tool-call.d.ts.map +1 -0
- package/dist/components/tool-call/tool-call.js +179 -0
- package/dist/components/tool-call/tool-call.js.map +1 -0
- package/dist/components/tool-call/use-tool-call.d.ts +14 -0
- package/dist/components/tool-call/use-tool-call.d.ts.map +1 -0
- package/dist/components/tool-call/use-tool-call.js +33 -0
- package/dist/components/tool-call/use-tool-call.js.map +1 -0
- package/dist/components/toolbar/context.js.map +1 -1
- package/dist/components/toolbar/toolbar.d.ts +10 -13
- package/dist/components/toolbar/toolbar.d.ts.map +1 -1
- package/dist/components/toolbar/toolbar.js +5 -13
- package/dist/components/toolbar/toolbar.js.map +1 -1
- package/dist/components/toolbar/use-toolbar.d.ts +2 -2
- package/dist/components/toolbar/use-toolbar.d.ts.map +1 -1
- package/dist/components/toolbar/use-toolbar.js.map +1 -1
- package/dist/components/tooltip/context.js.map +1 -1
- package/dist/components/tooltip/tooltip.d.ts +23 -23
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.js +26 -33
- package/dist/components/tooltip/tooltip.js.map +1 -1
- package/dist/components/tooltip/use-tooltip.d.ts +4 -4
- package/dist/components/tooltip/use-tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/use-tooltip.js +3 -3
- package/dist/components/tooltip/use-tooltip.js.map +1 -1
- package/dist/components/tour/context.js.map +1 -1
- package/dist/components/tour/tour.d.ts +45 -33
- package/dist/components/tour/tour.d.ts.map +1 -1
- package/dist/components/tour/tour.js +52 -42
- package/dist/components/tour/tour.js.map +1 -1
- package/dist/components/tour/use-tour.d.ts +6 -5
- package/dist/components/tour/use-tour.d.ts.map +1 -1
- package/dist/components/tour/use-tour.js +8 -5
- package/dist/components/tour/use-tour.js.map +1 -1
- package/dist/components/transfer/context.js +10 -1
- package/dist/components/transfer/context.js.map +1 -1
- package/dist/components/transfer/transfer.d.ts +85 -27
- package/dist/components/transfer/transfer.d.ts.map +1 -1
- package/dist/components/transfer/transfer.js +89 -32
- package/dist/components/transfer/transfer.js.map +1 -1
- package/dist/components/transfer/use-transfer.d.ts +2 -2
- package/dist/components/transfer/use-transfer.d.ts.map +1 -1
- package/dist/components/transfer/use-transfer.js +1 -1
- package/dist/components/transfer/use-transfer.js.map +1 -1
- package/dist/components/tree/context.js.map +1 -1
- package/dist/components/tree/tree.d.ts +35 -57
- package/dist/components/tree/tree.d.ts.map +1 -1
- package/dist/components/tree/tree.js +41 -58
- package/dist/components/tree/tree.js.map +1 -1
- package/dist/components/tree/use-tree.d.ts +3 -3
- package/dist/components/tree/use-tree.d.ts.map +1 -1
- package/dist/components/tree/use-tree.js +3 -3
- package/dist/components/tree/use-tree.js.map +1 -1
- package/dist/components/tree-select/context.js +10 -1
- package/dist/components/tree-select/context.js.map +1 -1
- package/dist/components/tree-select/tree-select.d.ts +91 -69
- package/dist/components/tree-select/tree-select.d.ts.map +1 -1
- package/dist/components/tree-select/tree-select.js +214 -86
- package/dist/components/tree-select/tree-select.js.map +1 -1
- package/dist/components/tree-select/use-tree-select.d.ts +5 -5
- package/dist/components/tree-select/use-tree-select.d.ts.map +1 -1
- package/dist/components/tree-select/use-tree-select.js +3 -3
- package/dist/components/tree-select/use-tree-select.js.map +1 -1
- package/dist/components/truncate/truncate.d.ts +55 -0
- package/dist/components/truncate/truncate.d.ts.map +1 -0
- package/dist/components/truncate/truncate.js +51 -0
- package/dist/components/truncate/truncate.js.map +1 -0
- package/dist/components/truncate/use-truncate.d.ts +17 -0
- package/dist/components/truncate/use-truncate.d.ts.map +1 -0
- package/dist/components/truncate/use-truncate.js +23 -0
- package/dist/components/truncate/use-truncate.js.map +1 -0
- package/dist/components/typography/context.d.ts.map +1 -1
- package/dist/components/typography/context.js.map +1 -1
- package/dist/components/typography/typography.d.ts +46 -22
- package/dist/components/typography/typography.d.ts.map +1 -1
- package/dist/components/typography/typography.js +32 -23
- package/dist/components/typography/typography.js.map +1 -1
- package/dist/components/virtualizer/context.js.map +1 -1
- package/dist/components/virtualizer/use-virtualizer.d.ts +4 -4
- package/dist/components/virtualizer/use-virtualizer.d.ts.map +1 -1
- package/dist/components/virtualizer/use-virtualizer.js +3 -3
- package/dist/components/virtualizer/use-virtualizer.js.map +1 -1
- package/dist/components/virtualizer/virtualizer.d.ts +8 -35
- package/dist/components/virtualizer/virtualizer.d.ts.map +1 -1
- package/dist/components/virtualizer/virtualizer.js +13 -40
- package/dist/components/virtualizer/virtualizer.js.map +1 -1
- package/dist/components/watermark/context.d.ts.map +1 -1
- package/dist/components/watermark/context.js.map +1 -1
- package/dist/components/watermark/watermark.d.ts +24 -21
- package/dist/components/watermark/watermark.d.ts.map +1 -1
- package/dist/components/watermark/watermark.js +11 -23
- package/dist/components/watermark/watermark.js.map +1 -1
- package/dist/config/config.d.ts +18 -11
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +43 -24
- package/dist/config/config.js.map +1 -1
- package/dist/index.d.ts +133 -97
- package/dist/index.js +131 -95
- package/dist/package.js +1 -1
- package/dist/runtime/as-child.js +43 -26
- package/dist/runtime/as-child.js.map +1 -1
- package/dist/runtime/attach-form-reset.js +5 -5
- package/dist/runtime/attach-form-reset.js.map +1 -1
- package/dist/runtime/config-defaults.js +2 -2
- package/dist/runtime/config-defaults.js.map +1 -1
- package/dist/runtime/create-vue-runtime.d.ts +14 -3
- package/dist/runtime/create-vue-runtime.d.ts.map +1 -1
- package/dist/runtime/create-vue-runtime.js +3 -2
- package/dist/runtime/create-vue-runtime.js.map +1 -1
- package/dist/runtime/merge-props.js +31 -0
- package/dist/runtime/merge-props.js.map +1 -0
- package/dist/runtime/normalize-props.d.ts +1 -1
- package/dist/runtime/normalize-props.d.ts.map +1 -1
- package/dist/runtime/normalize-props.js +1 -1
- package/dist/runtime/normalize-props.js.map +1 -1
- package/dist/runtime/payload.d.ts +2 -2
- package/dist/runtime/payload.d.ts.map +1 -1
- package/dist/runtime/portal.js +65 -0
- package/dist/runtime/portal.js.map +1 -0
- package/dist/runtime/slot-content.js +28 -6
- package/dist/runtime/slot-content.js.map +1 -1
- package/dist/runtime/use-machine.d.ts +8 -4
- package/dist/runtime/use-machine.d.ts.map +1 -1
- package/dist/runtime/use-machine.js +4 -5
- package/dist/runtime/use-machine.js.map +1 -1
- package/dist/runtime/use-overlay-exit.js +50 -24
- package/dist/runtime/use-overlay-exit.js.map +1 -1
- package/dist/runtime/use-scrollbars.js +7 -6
- package/dist/runtime/use-scrollbars.js.map +1 -1
- package/dist/runtime/vue-id.d.ts +1 -1
- package/dist/runtime/vue-id.d.ts.map +1 -1
- package/dist/runtime/vue-id.js.map +1 -1
- package/dist/services/dialog-service.d.ts +34 -23
- package/dist/services/dialog-service.d.ts.map +1 -1
- package/dist/services/dialog-service.js +64 -117
- package/dist/services/dialog-service.js.map +1 -1
- package/dist/services/glyph.js +1 -109
- package/dist/services/glyph.js.map +1 -1
- package/dist/services/loading-bar-service.d.ts +12 -13
- package/dist/services/loading-bar-service.d.ts.map +1 -1
- package/dist/services/loading-bar-service.js +20 -33
- package/dist/services/loading-bar-service.js.map +1 -1
- package/dist/services/mount-host.js +8 -8
- package/dist/services/mount-host.js.map +1 -1
- package/dist/services/notification-service.d.ts +26 -14
- package/dist/services/notification-service.d.ts.map +1 -1
- package/dist/services/notification-service.js +49 -33
- package/dist/services/notification-service.js.map +1 -1
- package/dist/services/service-config.js.map +1 -1
- package/dist/services/toast-service.d.ts +42 -25
- package/dist/services/toast-service.d.ts.map +1 -1
- package/dist/services/toast-service.js +120 -100
- package/dist/services/toast-service.js.map +1 -1
- package/dist/sound.d.ts +17 -38
- package/dist/sound.d.ts.map +1 -1
- package/dist/sound.js +28 -148
- package/dist/sound.js.map +1 -1
- package/package.json +21 -19
- package/dist/components/calendar/calendar.d.ts.map +0 -1
- package/dist/components/calendar/calendar.js +0 -300
- package/dist/components/calendar/calendar.js.map +0 -1
- package/dist/components/calendar/context.js +0 -24
- package/dist/components/calendar/context.js.map +0 -1
- package/dist/components/calendar/use-calendar.d.ts +0 -14
- package/dist/components/calendar/use-calendar.d.ts.map +0 -1
- package/dist/components/calendar/use-calendar.js +0 -26
- package/dist/components/calendar/use-calendar.js.map +0 -1
- package/dist/components/code-block/code-block.d.ts +0 -62
- package/dist/components/code-block/code-block.d.ts.map +0 -1
- package/dist/components/code-block/code-block.js +0 -52
- package/dist/components/code-block/code-block.js.map +0 -1
- package/dist/components/composer/composer.d.ts +0 -82
- package/dist/components/composer/composer.d.ts.map +0 -1
- package/dist/components/composer/composer.js +0 -77
- package/dist/components/composer/composer.js.map +0 -1
- package/dist/components/composer/context.js +0 -15
- package/dist/components/composer/context.js.map +0 -1
- package/dist/components/composer/use-composer.d.ts +0 -16
- package/dist/components/composer/use-composer.d.ts.map +0 -1
- package/dist/components/composer/use-composer.js +0 -18
- package/dist/components/composer/use-composer.js.map +0 -1
- package/dist/components/countdown/countdown.d.ts +0 -73
- package/dist/components/countdown/countdown.d.ts.map +0 -1
- package/dist/components/countdown/countdown.js +0 -62
- package/dist/components/countdown/countdown.js.map +0 -1
- package/dist/components/dynamic-input/context.d.ts +0 -15
- package/dist/components/dynamic-input/context.d.ts.map +0 -1
- package/dist/components/dynamic-input/context.js +0 -24
- package/dist/components/dynamic-input/context.js.map +0 -1
- package/dist/components/dynamic-input/dynamic-input.d.ts.map +0 -1
- package/dist/components/dynamic-input/dynamic-input.js +0 -128
- package/dist/components/dynamic-input/dynamic-input.js.map +0 -1
- package/dist/components/dynamic-input/use-dynamic-input.d.ts +0 -12
- package/dist/components/dynamic-input/use-dynamic-input.d.ts.map +0 -1
- package/dist/components/dynamic-input/use-dynamic-input.js +0 -21
- package/dist/components/dynamic-input/use-dynamic-input.js.map +0 -1
- package/dist/components/ellipsis/ellipsis.d.ts +0 -58
- package/dist/components/ellipsis/ellipsis.d.ts.map +0 -1
- package/dist/components/ellipsis/ellipsis.js +0 -54
- package/dist/components/ellipsis/ellipsis.js.map +0 -1
- package/dist/components/ellipsis/use-ellipsis.d.ts +0 -17
- package/dist/components/ellipsis/use-ellipsis.d.ts.map +0 -1
- package/dist/components/ellipsis/use-ellipsis.js +0 -23
- package/dist/components/ellipsis/use-ellipsis.js.map +0 -1
- package/dist/components/hotkeys/hotkeys.d.ts +0 -89
- package/dist/components/hotkeys/hotkeys.d.ts.map +0 -1
- package/dist/components/hotkeys/hotkeys.js +0 -83
- package/dist/components/hotkeys/hotkeys.js.map +0 -1
- package/dist/components/hotkeys/use-hotkeys.d.ts +0 -31
- package/dist/components/hotkeys/use-hotkeys.d.ts.map +0 -1
- package/dist/components/hotkeys/use-hotkeys.js +0 -60
- package/dist/components/hotkeys/use-hotkeys.js.map +0 -1
- package/dist/components/popselect/context.d.ts +0 -15
- package/dist/components/popselect/context.d.ts.map +0 -1
- package/dist/components/popselect/context.js +0 -24
- package/dist/components/popselect/context.js.map +0 -1
- package/dist/components/popselect/popselect.d.ts +0 -227
- package/dist/components/popselect/popselect.d.ts.map +0 -1
- package/dist/components/popselect/popselect.js +0 -243
- package/dist/components/popselect/popselect.js.map +0 -1
- package/dist/components/popselect/use-popselect.d.ts +0 -48
- package/dist/components/popselect/use-popselect.d.ts.map +0 -1
- package/dist/components/popselect/use-popselect.js +0 -89
- package/dist/components/popselect/use-popselect.js.map +0 -1
- package/dist/components/qr-code/context.d.ts +0 -11
- package/dist/components/qr-code/context.d.ts.map +0 -1
- package/dist/components/qr-code/context.js +0 -15
- package/dist/components/qr-code/context.js.map +0 -1
- package/dist/components/qr-code/qr-code.d.ts +0 -92
- package/dist/components/qr-code/qr-code.d.ts.map +0 -1
- package/dist/components/qr-code/qr-code.js +0 -100
- package/dist/components/qr-code/qr-code.js.map +0 -1
- package/dist/components/result/context.d.ts +0 -11
- package/dist/components/result/context.d.ts.map +0 -1
- package/dist/components/result/context.js +0 -15
- package/dist/components/result/context.js.map +0 -1
- package/dist/components/result/result.d.ts +0 -43
- package/dist/components/result/result.d.ts.map +0 -1
- package/dist/components/result/result.js +0 -58
- package/dist/components/result/result.js.map +0 -1
- package/dist/components/space/context.d.ts +0 -10
- package/dist/components/space/context.d.ts.map +0 -1
- package/dist/components/space/context.js +0 -15
- package/dist/components/space/context.js.map +0 -1
- package/dist/components/space/space.d.ts +0 -75
- package/dist/components/space/space.d.ts.map +0 -1
- package/dist/components/space/space.js +0 -91
- package/dist/components/space/space.js.map +0 -1
- package/dist/components/thread/context.d.ts +0 -7
- package/dist/components/thread/context.d.ts.map +0 -1
- package/dist/components/thread/context.js +0 -15
- package/dist/components/thread/context.js.map +0 -1
- package/dist/components/thread/thread.d.ts +0 -61
- package/dist/components/thread/thread.d.ts.map +0 -1
- package/dist/components/thread/thread.js +0 -74
- package/dist/components/thread/thread.js.map +0 -1
- package/dist/components/thread/use-thread.d.ts +0 -14
- package/dist/components/thread/use-thread.d.ts.map +0 -1
- package/dist/components/thread/use-thread.js.map +0 -1
- package/dist/components/time/time.d.ts +0 -63
- package/dist/components/time/time.d.ts.map +0 -1
- package/dist/components/time/time.js +0 -63
- package/dist/components/time/time.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# @xihan-ui/vue
|
|
2
2
|
|
|
3
|
-
Vue 3 适配器:
|
|
3
|
+
Vue 3 适配器:134 个组件的 Vue 形态,外加对应的 composables。行为全部来自 `@xihan-ui/headless`,这一层只负责把它接到 Vue 的响应式与渲染上。
|
|
4
4
|
|
|
5
5
|
**谁会装它**:在 Vue 里用这套组件的人装它。样式另装 `@xihan-ui/styles`,或者自己写。
|
|
6
6
|
|
|
7
7
|
## 用法
|
|
8
8
|
|
|
9
9
|
```ts
|
|
10
|
-
import { XhButton,
|
|
10
|
+
import { XhButton, XhDialogContent, XhDialogRoot, XhDialogTrigger } from '@xihan-ui/vue'
|
|
11
11
|
import '@xihan-ui/styles'
|
|
12
12
|
```
|
|
13
13
|
|
package/dist/backgrounds.d.ts
CHANGED
|
@@ -17,8 +17,8 @@ interface UseBackgroundOptions {
|
|
|
17
17
|
interface UseBackgroundReturn {
|
|
18
18
|
readonly surface: ShallowRef<BackgroundSurface | null>;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
21
|
-
* 渲染器会在元素进出 DOM 时把元素或 null
|
|
20
|
+
* 挂载点。直接作为模板 ref 使用:`<div :ref="visual.attach">`,
|
|
21
|
+
* 渲染器会在元素进出 DOM 时把元素或 null 传入。
|
|
22
22
|
*/
|
|
23
23
|
attach: (element: Element | null) => void;
|
|
24
24
|
setEffect: (effect: BackgroundEffect | string) => void;
|
|
@@ -29,16 +29,16 @@ interface UseBackgroundReturn {
|
|
|
29
29
|
destroy: () => void;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* 建立一张受 Vue 生命周期管理的视觉画面。
|
|
33
33
|
*
|
|
34
|
-
*
|
|
35
|
-
* 不经过响应式与调度队列,因此不受 flush
|
|
36
|
-
* 组件卸载时自动销毁;在 setup
|
|
34
|
+
* 使用函数式 ref 而不是监听一个模板 ref:元素由渲染器直接交付,
|
|
35
|
+
* 不经过响应式与调度队列,因此不受 flush 时序影响,元素更换后也一定能收到。
|
|
36
|
+
* 组件卸载时自动销毁;在 setup 之外调用则需自行调用 destroy。
|
|
37
37
|
*/
|
|
38
38
|
declare function useBackground(options: UseBackgroundOptions): UseBackgroundReturn;
|
|
39
39
|
/**
|
|
40
|
-
* `<XhBackground
|
|
41
|
-
* 画布铺满根元素且 pointer-events: none
|
|
40
|
+
* `<XhBackground>`:独立视觉组件。默认插槽的内容浮在效果之上;
|
|
41
|
+
* 画布铺满根元素且 pointer-events: none,不会遮挡插槽中的交互。
|
|
42
42
|
*/
|
|
43
43
|
declare const XhBackground: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
44
44
|
effect: {
|
|
@@ -53,12 +53,12 @@ declare const XhBackground: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
53
53
|
type: PropType<BackgroundQuality>;
|
|
54
54
|
default: undefined;
|
|
55
55
|
};
|
|
56
|
-
/**
|
|
56
|
+
/** 数据驱动点云。效果的粒子通道为 cloud 模式时才有意义。 */
|
|
57
57
|
cloud: {
|
|
58
58
|
type: PropType<PointCloud | null>;
|
|
59
59
|
default: null;
|
|
60
60
|
};
|
|
61
|
-
/**
|
|
61
|
+
/** 更换点云时的形变时长(秒)。 */
|
|
62
62
|
morphDuration: {
|
|
63
63
|
type: NumberConstructor;
|
|
64
64
|
default: undefined;
|
|
@@ -79,7 +79,7 @@ declare const XhBackground: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
79
79
|
type: BooleanConstructor;
|
|
80
80
|
default: boolean;
|
|
81
81
|
};
|
|
82
|
-
/**
|
|
82
|
+
/** 渲染为哪个标签。 */
|
|
83
83
|
as: {
|
|
84
84
|
type: StringConstructor;
|
|
85
85
|
default: string;
|
|
@@ -99,12 +99,12 @@ declare const XhBackground: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
99
99
|
type: PropType<BackgroundQuality>;
|
|
100
100
|
default: undefined;
|
|
101
101
|
};
|
|
102
|
-
/**
|
|
102
|
+
/** 数据驱动点云。效果的粒子通道为 cloud 模式时才有意义。 */
|
|
103
103
|
cloud: {
|
|
104
104
|
type: PropType<PointCloud | null>;
|
|
105
105
|
default: null;
|
|
106
106
|
};
|
|
107
|
-
/**
|
|
107
|
+
/** 更换点云时的形变时长(秒)。 */
|
|
108
108
|
morphDuration: {
|
|
109
109
|
type: NumberConstructor;
|
|
110
110
|
default: undefined;
|
|
@@ -125,7 +125,7 @@ declare const XhBackground: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
125
125
|
type: BooleanConstructor;
|
|
126
126
|
default: boolean;
|
|
127
127
|
};
|
|
128
|
-
/**
|
|
128
|
+
/** 渲染为哪个标签。 */
|
|
129
129
|
as: {
|
|
130
130
|
type: StringConstructor;
|
|
131
131
|
default: string;
|
|
@@ -143,9 +143,9 @@ declare const XhBackground: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
143
143
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
144
144
|
type BackgroundDirectiveValue = BackgroundEffect | string | UseBackgroundOptions;
|
|
145
145
|
/**
|
|
146
|
-
* `v-background
|
|
146
|
+
* `v-background`:为任意元素铺设一层视觉背景。
|
|
147
147
|
*
|
|
148
|
-
* 用在组件上时,Vue
|
|
148
|
+
* 用在组件上时,Vue 会把指令落到该组件的单一根元素上,因此为现成组件添加背景不需要修改组件:
|
|
149
149
|
*
|
|
150
150
|
* ```vue
|
|
151
151
|
* <XhButton v-background="fluidEffect">提交</XhButton>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backgrounds.d.ts","names":[],"sources":["../src/backgrounds.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"backgrounds.d.ts","names":[],"sources":["../src/backgrounds.ts"],"mappings":";;;UAiCiB;EACf,QAAQ;EACR,SAAS,eAAe;EACxB,UAAU;;EAEV;;EAEA;;EAEA;;EAEA;;UAGe;WACN,SAAS,WAAW;;;;;EAK7B,SAAS,SAAS;EAClB,YAAY,QAAQ;EACpB,YAAY,OAAO,eAAe;EAClC,WAAW,OAAO,YAAY,UAAU;EACxC;EACA;EACA;;;;;;;;;iBAUc,cAAc,SAAS,uBAAuB;;;;;cAwCjD,4BAAY,8BAAA;;IAGe,MAAA,SAAS;;;;IACnB,MAAA,SAAS,eAAe;;;;IACvB,MAAA,SAAS;;;;;IAEX,MAAA,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAJE,MAAA,SAAS;;;;IACnB,MAAA,SAAS,eAAe;;;;IACvB,MAAA,SAAS;;;;;IAEX,MAAA,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAuFpC;KAEU,2BAA2B,4BAA4B;;;;;;;;;;;cAoBtD,aAAa,UAAU,aAAa"}
|
package/dist/backgrounds.js
CHANGED
|
@@ -2,11 +2,11 @@ import { defineComponent, getCurrentScope, h, onScopeDispose, shallowRef } from
|
|
|
2
2
|
import { createBackgroundSurface } from "@xihan-ui/backgrounds";
|
|
3
3
|
//#region src/backgrounds.ts
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* 建立一张受 Vue 生命周期管理的视觉画面。
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
* 不经过响应式与调度队列,因此不受 flush
|
|
9
|
-
* 组件卸载时自动销毁;在 setup
|
|
7
|
+
* 使用函数式 ref 而不是监听一个模板 ref:元素由渲染器直接交付,
|
|
8
|
+
* 不经过响应式与调度队列,因此不受 flush 时序影响,元素更换后也一定能收到。
|
|
9
|
+
* 组件卸载时自动销毁;在 setup 之外调用则需自行调用 destroy。
|
|
10
10
|
*/
|
|
11
11
|
function useBackground(options) {
|
|
12
12
|
const surface = shallowRef(null);
|
|
@@ -36,8 +36,8 @@ function useBackground(options) {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
|
-
* `<XhBackground
|
|
40
|
-
* 画布铺满根元素且 pointer-events: none
|
|
39
|
+
* `<XhBackground>`:独立视觉组件。默认插槽的内容浮在效果之上;
|
|
40
|
+
* 画布铺满根元素且 pointer-events: none,不会遮挡插槽中的交互。
|
|
41
41
|
*/
|
|
42
42
|
const XhBackground = defineComponent({
|
|
43
43
|
name: "XhBackground",
|
|
@@ -54,12 +54,12 @@ const XhBackground = defineComponent({
|
|
|
54
54
|
type: String,
|
|
55
55
|
default: void 0
|
|
56
56
|
},
|
|
57
|
-
/**
|
|
57
|
+
/** 数据驱动点云。效果的粒子通道为 cloud 模式时才有意义。 */
|
|
58
58
|
cloud: {
|
|
59
59
|
type: Object,
|
|
60
60
|
default: null
|
|
61
61
|
},
|
|
62
|
-
/**
|
|
62
|
+
/** 更换点云时的形变时长(秒)。 */
|
|
63
63
|
morphDuration: {
|
|
64
64
|
type: Number,
|
|
65
65
|
default: void 0
|
|
@@ -80,7 +80,7 @@ const XhBackground = defineComponent({
|
|
|
80
80
|
type: Boolean,
|
|
81
81
|
default: true
|
|
82
82
|
},
|
|
83
|
-
/**
|
|
83
|
+
/** 渲染为哪个标签。 */
|
|
84
84
|
as: {
|
|
85
85
|
type: String,
|
|
86
86
|
default: "div"
|
|
@@ -101,9 +101,9 @@ const XhBackground = defineComponent({
|
|
|
101
101
|
let appliedCloud = null;
|
|
102
102
|
let appliedAutoplay = props.autoplay;
|
|
103
103
|
/**
|
|
104
|
-
* 把当前 props
|
|
105
|
-
* 渲染函数一定会随 props
|
|
106
|
-
*
|
|
104
|
+
* 把当前 props 推送到画面上。在渲染函数中调用而不是挂 watcher:
|
|
105
|
+
* 渲染函数一定会随 props 变化重新运行,且这里读到的参数值同时建立了依赖追踪,
|
|
106
|
+
* 调用方就地修改参数对象中的某一项也能收到。
|
|
107
107
|
*/
|
|
108
108
|
function sync() {
|
|
109
109
|
const surface = api.surface.value;
|
|
@@ -151,9 +151,9 @@ function toOptions(value) {
|
|
|
151
151
|
}
|
|
152
152
|
const mounted = /* @__PURE__ */ new WeakMap();
|
|
153
153
|
/**
|
|
154
|
-
* `v-background
|
|
154
|
+
* `v-background`:为任意元素铺设一层视觉背景。
|
|
155
155
|
*
|
|
156
|
-
* 用在组件上时,Vue
|
|
156
|
+
* 用在组件上时,Vue 会把指令落到该组件的单一根元素上,因此为现成组件添加背景不需要修改组件:
|
|
157
157
|
*
|
|
158
158
|
* ```vue
|
|
159
159
|
* <XhButton v-background="fluidEffect">提交</XhButton>
|
package/dist/backgrounds.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backgrounds.js","names":[],"sources":["../src/backgrounds.ts"],"sourcesContent":["// @xihan-ui/vue/backgrounds —— 视觉层的 Vue 适配。\n//\n// 与主入口分开:@xihan-ui/backgrounds 是可选 peer,不用视觉效果的应用不会因为装了本包\n// 而多出一个 WebGL 引擎。用之前先装 @xihan-ui/backgrounds。\n//\n// 三种用法,从轻到重:\n// v-background 给任意元素或组件的根元素铺一层背景,一个字都不用改组件\n// XhBackground 独立的视觉组件,插槽内容浮在效果之上\n// useBackground 自己拿画面实例,接自定义调度或调参面板\n\nimport type {\n BackgroundEffect,\n BackgroundQuality,\n BackgroundSurface,\n MorphOptions,\n ParamValue,\n PointCloud,\n} from '@xihan-ui/backgrounds'\nimport type { Directive, PropType, ShallowRef, VNodeRef } from 'vue'\nimport { createBackgroundSurface } from '@xihan-ui/backgrounds'\nimport {\n defineComponent,\n getCurrentScope,\n h,\n onScopeDispose,\n shallowRef,\n} from 'vue'\n\nexport interface UseBackgroundOptions {\n effect: BackgroundEffect | string\n params?: Record<string, ParamValue>\n quality?: BackgroundQuality\n /** 自动绑定指针事件,默认 true。 */\n pointer?: boolean\n /** 创建后立即播放,默认 true。 */\n autoplay?: boolean\n /** 系统开启减弱动态效果时冻结时间轴,默认 true。 */\n respectReducedMotion?: boolean\n /** 滚出视口时暂停绘制,默认 true。 */\n pauseOffscreen?: boolean\n}\n\nexport interface UseBackgroundReturn {\n readonly surface: ShallowRef<BackgroundSurface | null>\n /**\n * 挂载点。直接当模板 ref 用:`<div :ref=\"visual.attach\">`,\n * 渲染器会在元素进出 DOM 时把元素或 null 交进来。\n */\n attach: (element: Element | null) => void\n setEffect: (effect: BackgroundEffect | string) => void\n setParams: (patch: Record<string, ParamValue>) => void\n setCloud: (cloud: PointCloud, options?: MorphOptions) => void\n play: () => void\n pause: () => void\n destroy: () => void\n}\n\n/**\n * 建一张受 Vue 生命周期管理的视觉画面。\n *\n * 用**函数式 ref** 而不是监听一个模板 ref:元素由渲染器直接交到手上,\n * 不经过响应式与调度队列,因此不受 flush 时序影响,元素换了也一定收得到。\n * 组件卸载时自动销毁;在 setup 之外调用则需自己调 destroy。\n */\nexport function useBackground(options: UseBackgroundOptions): UseBackgroundReturn {\n const surface = shallowRef<BackgroundSurface | null>(null)\n // 元素没换就不动画面:函数式 ref 每次 patch 都会被再调一遍,\n // 不挡住的话每渲染一帧就销毁重建一次,画面永远停在创建时那份参数上\n let attached: HTMLElement | null = null\n\n function attach(element: Element | null): void {\n const el = element instanceof HTMLElement ? element : null\n if (el === attached)\n return\n attached = el\n surface.value?.destroy()\n surface.value = el === null ? null : createBackgroundSurface(el, options)\n }\n\n function destroy(): void {\n attached = null\n surface.value?.destroy()\n surface.value = null\n }\n\n if (getCurrentScope())\n onScopeDispose(destroy)\n\n return {\n surface,\n attach,\n setEffect: (effect): void => surface.value?.setEffect(effect),\n setParams: (patch): void => surface.value?.setParams(patch),\n setCloud: (cloud, morph): void => surface.value?.setCloud(cloud, morph),\n play: (): void => surface.value?.play(),\n pause: (): void => surface.value?.pause(),\n destroy,\n }\n}\n\n/**\n * `<XhBackground>` —— 独立视觉组件。默认插槽的内容浮在效果之上;\n * 画布铺满根元素且 pointer-events: none,不会挡住插槽里的交互。\n */\nexport const XhBackground = defineComponent({\n name: 'XhBackground',\n props: {\n effect: { type: [Object, String] as PropType<BackgroundEffect | string>, required: true },\n params: { type: Object as PropType<Record<string, ParamValue>>, default: undefined },\n quality: { type: String as PropType<BackgroundQuality>, default: undefined },\n /** 数据驱动点云。效果的粒子通道是 cloud 模式时才有意义。 */\n cloud: { type: Object as PropType<PointCloud | null>, default: null },\n /** 换点云时的形变时长(秒)。 */\n morphDuration: { type: Number, default: undefined },\n pointer: { type: Boolean, default: true },\n autoplay: { type: Boolean, default: true },\n respectReducedMotion: { type: Boolean, default: true },\n pauseOffscreen: { type: Boolean, default: true },\n /** 渲染成什么标签。 */\n as: { type: String, default: 'div' },\n },\n setup(props, { slots, expose }) {\n const api = useBackground({\n effect: props.effect,\n params: props.params,\n quality: props.quality,\n pointer: props.pointer,\n autoplay: props.autoplay,\n respectReducedMotion: props.respectReducedMotion,\n pauseOffscreen: props.pauseOffscreen,\n })\n\n let appliedEffect: BackgroundEffect | string | undefined\n let appliedQuality: BackgroundQuality | undefined\n let appliedCloud: PointCloud | null = null\n let appliedAutoplay = props.autoplay\n\n /**\n * 把当前 props 推到画面上。在渲染函数里调用而不是挂 watcher:\n * 渲染函数一定会随 props 变化重跑,且这里读到的参数值同时建立了依赖追踪,\n * 调用方原地改参数对象里的某一项也收得到。\n */\n function sync(): void {\n const surface = api.surface.value\n if (surface === null)\n return\n if (props.effect !== appliedEffect) {\n surface.setEffect(props.effect)\n appliedEffect = props.effect\n }\n if (props.quality !== undefined && props.quality !== appliedQuality) {\n surface.setQuality(props.quality)\n appliedQuality = props.quality\n }\n if (props.params !== undefined)\n surface.setParams(props.params)\n if (props.cloud && props.cloud !== appliedCloud) {\n // 第一份点云直接就位,之后的换形态才走过渡\n surface.setCloud(props.cloud, { duration: appliedCloud === null ? 0 : props.morphDuration })\n appliedCloud = props.cloud\n }\n if (props.autoplay !== appliedAutoplay) {\n if (props.autoplay)\n surface.play()\n else surface.pause()\n appliedAutoplay = props.autoplay\n }\n }\n\n // 签名照 VNodeRef 的函数式 ref 写:渲染器在元素进出 DOM 时把元素或 null 交进来。\n // 同一个元素会被反复交进来,attach 对此幂等;只有真换了画面才重置记账。\n const mount: VNodeRef = (element): void => {\n const previous = api.surface.value\n api.attach(element instanceof HTMLElement ? element : null)\n const current = api.surface.value\n if (current === previous || current === null)\n return\n appliedEffect = props.effect\n appliedQuality = props.quality\n appliedCloud = null\n appliedAutoplay = props.autoplay\n sync()\n }\n\n expose(api)\n\n return () => {\n sync()\n return h(\n props.as,\n // 不发 data-scope:这个宿主不归任何皮肤管,几何全在 features/backgrounds 的内联样式里,\n // 指令用法(v-background 挂在作者自己的元素上)更是连这层壳都没有。\n // 发了 scope 而没有对应皮肤,开发模式的皮肤在场探测会给出一条永远修不掉的警告\n { ref: mount },\n slots.default?.(),\n )\n }\n },\n})\n\nexport type BackgroundDirectiveValue = BackgroundEffect | string | UseBackgroundOptions\n\nfunction toOptions(value: BackgroundDirectiveValue): UseBackgroundOptions {\n if (typeof value === 'string')\n return { effect: value }\n return 'effect' in value ? value : { effect: value }\n}\n\nconst mounted = new WeakMap<HTMLElement, { surface: BackgroundSurface, effect: BackgroundEffect | string }>()\n\n/**\n * `v-background` —— 给任意元素铺一层视觉背景。\n *\n * 用在组件上时,Vue 会把指令落到该组件的单一根元素上,所以给现成组件加背景不需要改组件:\n *\n * ```vue\n * <XhButton v-background=\"fluidEffect\">提交</XhButton>\n * <div v-background=\"{ effect: 'aurora', params: { speed: 1.6 } }\" />\n * ```\n */\nexport const vBackground: Directive<HTMLElement, BackgroundDirectiveValue> = {\n mounted(el, binding) {\n const options = toOptions(binding.value)\n mounted.set(el, { surface: createBackgroundSurface(el, options), effect: options.effect })\n },\n updated(el, binding) {\n const entry = mounted.get(el)\n if (entry === undefined)\n return\n const options = toOptions(binding.value)\n if (options.effect !== entry.effect) {\n entry.surface.setEffect(options.effect)\n entry.effect = options.effect\n }\n if (options.params !== undefined)\n entry.surface.setParams(options.params)\n },\n unmounted(el) {\n mounted.get(el)?.surface.destroy()\n mounted.delete(el)\n },\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"backgrounds.js","names":[],"sources":["../src/backgrounds.ts"],"sourcesContent":["/*\n * Copyright (c) 2021-Present XiHanFun and contributors.\n * Licensed under the MIT License. See LICENSE in the project root for license information.\n */\n\n// @xihan-ui/vue/backgrounds —— 视觉层的 Vue 适配。\n//\n// 与主入口分开:@xihan-ui/backgrounds 是可选 peer,不用视觉效果的应用不会因为装了本包\n// 而多出一个 WebGL 引擎。用之前先装 @xihan-ui/backgrounds。\n//\n// 三种用法,从轻到重:\n// v-background 给任意元素或组件的根元素铺一层背景,一个字都不用改组件\n// XhBackground 独立的视觉组件,插槽内容浮在效果之上\n// useBackground 自己拿画面实例,接自定义调度或调参面板\n\nimport type {\n BackgroundEffect,\n BackgroundQuality,\n BackgroundSurface,\n MorphOptions,\n ParamValue,\n PointCloud,\n} from '@xihan-ui/backgrounds'\nimport type { Directive, PropType, ShallowRef, VNodeRef } from 'vue'\nimport { createBackgroundSurface } from '@xihan-ui/backgrounds'\nimport {\n defineComponent,\n getCurrentScope,\n h,\n onScopeDispose,\n shallowRef,\n} from 'vue'\n\nexport interface UseBackgroundOptions {\n effect: BackgroundEffect | string\n params?: Record<string, ParamValue>\n quality?: BackgroundQuality\n /** 自动绑定指针事件,默认 true。 */\n pointer?: boolean\n /** 创建后立即播放,默认 true。 */\n autoplay?: boolean\n /** 系统开启减弱动态效果时冻结时间轴,默认 true。 */\n respectReducedMotion?: boolean\n /** 滚出视口时暂停绘制,默认 true。 */\n pauseOffscreen?: boolean\n}\n\nexport interface UseBackgroundReturn {\n readonly surface: ShallowRef<BackgroundSurface | null>\n /**\n * 挂载点。直接作为模板 ref 使用:`<div :ref=\"visual.attach\">`,\n * 渲染器会在元素进出 DOM 时把元素或 null 传入。\n */\n attach: (element: Element | null) => void\n setEffect: (effect: BackgroundEffect | string) => void\n setParams: (patch: Record<string, ParamValue>) => void\n setCloud: (cloud: PointCloud, options?: MorphOptions) => void\n play: () => void\n pause: () => void\n destroy: () => void\n}\n\n/**\n * 建立一张受 Vue 生命周期管理的视觉画面。\n *\n * 使用函数式 ref 而不是监听一个模板 ref:元素由渲染器直接交付,\n * 不经过响应式与调度队列,因此不受 flush 时序影响,元素更换后也一定能收到。\n * 组件卸载时自动销毁;在 setup 之外调用则需自行调用 destroy。\n */\nexport function useBackground(options: UseBackgroundOptions): UseBackgroundReturn {\n const surface = shallowRef<BackgroundSurface | null>(null)\n // 元素没换就不动画面:函数式 ref 每次 patch 都会被再调一遍,\n // 不挡住的话每渲染一帧就销毁重建一次,画面永远停在创建时那份参数上\n let attached: HTMLElement | null = null\n\n function attach(element: Element | null): void {\n const el = element instanceof HTMLElement ? element : null\n if (el === attached)\n return\n attached = el\n surface.value?.destroy()\n surface.value = el === null ? null : createBackgroundSurface(el, options)\n }\n\n function destroy(): void {\n attached = null\n surface.value?.destroy()\n surface.value = null\n }\n\n if (getCurrentScope())\n onScopeDispose(destroy)\n\n return {\n surface,\n attach,\n setEffect: (effect): void => surface.value?.setEffect(effect),\n setParams: (patch): void => surface.value?.setParams(patch),\n setCloud: (cloud, morph): void => surface.value?.setCloud(cloud, morph),\n play: (): void => surface.value?.play(),\n pause: (): void => surface.value?.pause(),\n destroy,\n }\n}\n\n/**\n * `<XhBackground>`:独立视觉组件。默认插槽的内容浮在效果之上;\n * 画布铺满根元素且 pointer-events: none,不会遮挡插槽中的交互。\n */\nexport const XhBackground = defineComponent({\n name: 'XhBackground',\n props: {\n effect: { type: [Object, String] as PropType<BackgroundEffect | string>, required: true },\n params: { type: Object as PropType<Record<string, ParamValue>>, default: undefined },\n quality: { type: String as PropType<BackgroundQuality>, default: undefined },\n /** 数据驱动点云。效果的粒子通道为 cloud 模式时才有意义。 */\n cloud: { type: Object as PropType<PointCloud | null>, default: null },\n /** 更换点云时的形变时长(秒)。 */\n morphDuration: { type: Number, default: undefined },\n pointer: { type: Boolean, default: true },\n autoplay: { type: Boolean, default: true },\n respectReducedMotion: { type: Boolean, default: true },\n pauseOffscreen: { type: Boolean, default: true },\n /** 渲染为哪个标签。 */\n as: { type: String, default: 'div' },\n },\n setup(props, { slots, expose }) {\n const api = useBackground({\n effect: props.effect,\n params: props.params,\n quality: props.quality,\n pointer: props.pointer,\n autoplay: props.autoplay,\n respectReducedMotion: props.respectReducedMotion,\n pauseOffscreen: props.pauseOffscreen,\n })\n\n let appliedEffect: BackgroundEffect | string | undefined\n let appliedQuality: BackgroundQuality | undefined\n let appliedCloud: PointCloud | null = null\n let appliedAutoplay = props.autoplay\n\n /**\n * 把当前 props 推送到画面上。在渲染函数中调用而不是挂 watcher:\n * 渲染函数一定会随 props 变化重新运行,且这里读到的参数值同时建立了依赖追踪,\n * 调用方就地修改参数对象中的某一项也能收到。\n */\n function sync(): void {\n const surface = api.surface.value\n if (surface === null)\n return\n if (props.effect !== appliedEffect) {\n surface.setEffect(props.effect)\n appliedEffect = props.effect\n }\n if (props.quality !== undefined && props.quality !== appliedQuality) {\n surface.setQuality(props.quality)\n appliedQuality = props.quality\n }\n if (props.params !== undefined)\n surface.setParams(props.params)\n if (props.cloud && props.cloud !== appliedCloud) {\n // 第一份点云直接就位,之后的换形态才走过渡\n surface.setCloud(props.cloud, { duration: appliedCloud === null ? 0 : props.morphDuration })\n appliedCloud = props.cloud\n }\n if (props.autoplay !== appliedAutoplay) {\n if (props.autoplay)\n surface.play()\n else surface.pause()\n appliedAutoplay = props.autoplay\n }\n }\n\n // 签名照 VNodeRef 的函数式 ref 写:渲染器在元素进出 DOM 时把元素或 null 交进来。\n // 同一个元素会被反复交进来,attach 对此幂等;只有真换了画面才重置记账。\n const mount: VNodeRef = (element): void => {\n const previous = api.surface.value\n api.attach(element instanceof HTMLElement ? element : null)\n const current = api.surface.value\n if (current === previous || current === null)\n return\n appliedEffect = props.effect\n appliedQuality = props.quality\n appliedCloud = null\n appliedAutoplay = props.autoplay\n sync()\n }\n\n expose(api)\n\n return () => {\n sync()\n return h(\n props.as,\n // 不发 data-scope:这个宿主不归任何皮肤管,几何全在 features/backgrounds 的内联样式里,\n // 指令用法(v-background 挂在作者自己的元素上)更是连这层壳都没有。\n // 发了 scope 而没有对应皮肤,开发模式的皮肤在场探测会给出一条永远修不掉的警告\n { ref: mount },\n slots.default?.(),\n )\n }\n },\n})\n\nexport type BackgroundDirectiveValue = BackgroundEffect | string | UseBackgroundOptions\n\nfunction toOptions(value: BackgroundDirectiveValue): UseBackgroundOptions {\n if (typeof value === 'string')\n return { effect: value }\n return 'effect' in value ? value : { effect: value }\n}\n\nconst mounted = new WeakMap<HTMLElement, { surface: BackgroundSurface, effect: BackgroundEffect | string }>()\n\n/**\n * `v-background`:为任意元素铺设一层视觉背景。\n *\n * 用在组件上时,Vue 会把指令落到该组件的单一根元素上,因此为现成组件添加背景不需要修改组件:\n *\n * ```vue\n * <XhButton v-background=\"fluidEffect\">提交</XhButton>\n * <div v-background=\"{ effect: 'aurora', params: { speed: 1.6 } }\" />\n * ```\n */\nexport const vBackground: Directive<HTMLElement, BackgroundDirectiveValue> = {\n mounted(el, binding) {\n const options = toOptions(binding.value)\n mounted.set(el, { surface: createBackgroundSurface(el, options), effect: options.effect })\n },\n updated(el, binding) {\n const entry = mounted.get(el)\n if (entry === undefined)\n return\n const options = toOptions(binding.value)\n if (options.effect !== entry.effect) {\n entry.surface.setEffect(options.effect)\n entry.effect = options.effect\n }\n if (options.params !== undefined)\n entry.surface.setParams(options.params)\n },\n unmounted(el) {\n mounted.get(el)?.surface.destroy()\n mounted.delete(el)\n },\n}\n"],"mappings":"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"}
|
package/dist/behavior.d.ts
CHANGED
|
@@ -1,38 +1,41 @@
|
|
|
1
1
|
import { MaybeRefOrGetter, Ref } from "vue";
|
|
2
|
-
import { RuntimeConfig } from "@xihan-ui/
|
|
3
|
-
import { HoverIntentOptions, ScrollMetrics, ScrollTrackerOptions, StickToBottomOptions, StickToBottomState, Typeahead, TypeaheadOptions } from "@xihan-ui/behavior";
|
|
2
|
+
import { HoverIntentOptions, RuntimeConfig, ScrollMetrics, ScrollTrackerOptions, StickToBottomOptions, StickToBottomState, Typeahead, TypeaheadOptions } from "@xihan-ui/core";
|
|
4
3
|
//#region src/behavior.d.ts
|
|
5
4
|
/**
|
|
6
|
-
*
|
|
5
|
+
* 按需加解滚动锁。锁是引用计数的,多处同时加锁不会互相干扰。
|
|
7
6
|
*
|
|
8
|
-
*
|
|
9
|
-
* (body
|
|
7
|
+
* 锁定哪个元素由 `config.scrollRoot()` 决定;宿主把滚动移入内容容器
|
|
8
|
+
* (body 自身不滚动)时必须在配置中注入,否则锁定的是不滚动的元素。
|
|
10
9
|
*/
|
|
11
10
|
declare function useScrollLock(active: MaybeRefOrGetter<boolean>, config: MaybeRefOrGetter<RuntimeConfig>): void;
|
|
12
11
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* 悬停意图:进入触发器停留足够时长才报告展开,离开时按安全三角判断是否正朝浮层移动。
|
|
13
|
+
* 用于自建的悬停浮层,省去斜向划向子菜单时中途关闭这类手写延时。
|
|
15
14
|
*/
|
|
16
|
-
|
|
17
|
-
/**
|
|
15
|
+
interface UseHoverIntentOptions extends Omit<HoverIntentOptions, 'trigger'> {
|
|
16
|
+
/** 当前悬停宿主;模板 ref 尚未就位或节点暂时不渲染时返回 null。 */
|
|
17
|
+
getTriggerEl: () => HTMLElement | null;
|
|
18
|
+
}
|
|
19
|
+
declare function useHoverIntent(options: MaybeRefOrGetter<UseHoverIntentOptions>): void;
|
|
20
|
+
/** 观察滚动容器的位置与尺寸,值变化时才回调。返回最近一次测得的值。 */
|
|
18
21
|
declare function useScrollTracker(options: ScrollTrackerOptions): Ref<ScrollMetrics | null>;
|
|
19
22
|
interface StickToBottom {
|
|
20
23
|
/** 当前贴底状态,随原语的回调更新。 */
|
|
21
24
|
state: Ref<StickToBottomState | null>;
|
|
22
|
-
/**
|
|
25
|
+
/** 滚动到底部并恢复粘附,默认 'smooth',reducedMotion 为真时强制 'instant'。 */
|
|
23
26
|
scrollToBottom: (behavior?: 'smooth' | 'instant') => void;
|
|
24
|
-
/** 重新读取 scrollEl / contentEl
|
|
27
|
+
/** 重新读取 scrollEl / contentEl,节点变化时解绑重绑。 */
|
|
25
28
|
retarget: () => void;
|
|
26
29
|
}
|
|
27
30
|
/**
|
|
28
|
-
*
|
|
31
|
+
* 内容增长时保持粘底,用户向上滚动后即停止跟随。
|
|
29
32
|
*
|
|
30
|
-
* 两个 getter
|
|
31
|
-
* 而 setup 阶段模板 ref
|
|
33
|
+
* 两个 getter 中读取的是 ref 时自动重绑:原语在建立时就绑定一次,
|
|
34
|
+
* 而 setup 阶段模板 ref 仍为 null,不重绑等于未挂载。
|
|
32
35
|
*/
|
|
33
36
|
declare function useStickToBottom(options: StickToBottomOptions): StickToBottom;
|
|
34
|
-
/**
|
|
37
|
+
/** 连续输入字母跳转到匹配项的缓冲,超时自动清空。 */
|
|
35
38
|
declare function useTypeahead(options?: TypeaheadOptions): Typeahead;
|
|
36
39
|
//#endregion
|
|
37
|
-
export { StickToBottom, useHoverIntent, useScrollLock, useScrollTracker, useStickToBottom, useTypeahead };
|
|
40
|
+
export { StickToBottom, UseHoverIntentOptions, useHoverIntent, useScrollLock, useScrollTracker, useStickToBottom, useTypeahead };
|
|
38
41
|
//# sourceMappingURL=behavior.d.ts.map
|
package/dist/behavior.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"behavior.d.ts","names":[],"sources":["../src/behavior.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"behavior.d.ts","names":[],"sources":["../src/behavior.ts"],"mappings":";;;;;;;;;iBAwCgB,cACd,QAAQ,2BACR,QAAQ,iBAAiB;;;;;UAgCV,8BAA8B,KAAK;;EAElD,oBAAoB;;iBAGN,eAAe,SAAS,iBAAiB;;iBA8CzC,iBAAiB,SAAS,uBAAuB,IAAI;UAapD;;EAEf,OAAO,IAAI;;EAEX,iBAAiB;;EAEjB;;;;;;;;iBASc,iBAAiB,SAAS,uBAAuB;;iBAejD,aAAa,UAAS,mBAAwB"}
|
package/dist/behavior.js
CHANGED
|
@@ -1,32 +1,74 @@
|
|
|
1
|
-
import { onScopeDispose, ref, toValue, watch } from "vue";
|
|
2
|
-
import { acquireScrollLock, createScrollTracker, createStickToBottom, createTypeahead, trackHoverIntent } from "@xihan-ui/
|
|
1
|
+
import { onMounted, onScopeDispose, ref, toValue, watch } from "vue";
|
|
2
|
+
import { acquireScrollLock, createScrollTracker, createStickToBottom, createTypeahead, trackHoverIntent } from "@xihan-ui/core";
|
|
3
3
|
//#region src/behavior.ts
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* 按需加解滚动锁。锁是引用计数的,多处同时加锁不会互相干扰。
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
* (body
|
|
7
|
+
* 锁定哪个元素由 `config.scrollRoot()` 决定;宿主把滚动移入内容容器
|
|
8
|
+
* (body 自身不滚动)时必须在配置中注入,否则锁定的是不滚动的元素。
|
|
9
9
|
*/
|
|
10
10
|
function useScrollLock(active, config) {
|
|
11
11
|
let handle = null;
|
|
12
|
+
let stopWatching = null;
|
|
12
13
|
const release = () => {
|
|
13
|
-
handle
|
|
14
|
+
const current = handle;
|
|
14
15
|
handle = null;
|
|
16
|
+
current?.dispose();
|
|
15
17
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
onMounted(() => {
|
|
19
|
+
stopWatching = watch(() => toValue(active), (on) => {
|
|
20
|
+
if (on && !handle) handle = acquireScrollLock({ config: toValue(config) });
|
|
21
|
+
else if (!on) release();
|
|
22
|
+
}, {
|
|
23
|
+
immediate: true,
|
|
24
|
+
flush: "post"
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
onScopeDispose(() => {
|
|
28
|
+
stopWatching?.();
|
|
29
|
+
stopWatching = null;
|
|
30
|
+
release();
|
|
31
|
+
});
|
|
21
32
|
}
|
|
22
|
-
/**
|
|
23
|
-
* 悬停意图:进触发器停够时长才报开,离开时按安全三角判断是不是正朝浮层去。
|
|
24
|
-
* 用于自建的悬停浮层,省掉「斜着划向子菜单半路就关了」那类手写延时。
|
|
25
|
-
*/
|
|
26
33
|
function useHoverIntent(options) {
|
|
27
|
-
|
|
34
|
+
const readOptions = () => toValue(options);
|
|
35
|
+
let stopTracking = null;
|
|
36
|
+
let stopWatching = null;
|
|
37
|
+
const release = () => {
|
|
38
|
+
stopTracking?.();
|
|
39
|
+
stopTracking = null;
|
|
40
|
+
};
|
|
41
|
+
onMounted(() => {
|
|
42
|
+
stopWatching = watch([
|
|
43
|
+
() => readOptions().getTriggerEl(),
|
|
44
|
+
() => readOptions().openDelay,
|
|
45
|
+
() => readOptions().closeDelay,
|
|
46
|
+
() => readOptions().buffer
|
|
47
|
+
], ([trigger]) => {
|
|
48
|
+
release();
|
|
49
|
+
if (trigger === null) return;
|
|
50
|
+
const current = readOptions();
|
|
51
|
+
stopTracking = trackHoverIntent({
|
|
52
|
+
trigger,
|
|
53
|
+
getContentEl: () => readOptions().getContentEl(),
|
|
54
|
+
openDelay: current.openDelay,
|
|
55
|
+
closeDelay: current.closeDelay,
|
|
56
|
+
buffer: current.buffer,
|
|
57
|
+
onOpenIntent: () => readOptions().onOpenIntent(),
|
|
58
|
+
onCloseIntent: () => readOptions().onCloseIntent()
|
|
59
|
+
});
|
|
60
|
+
}, {
|
|
61
|
+
immediate: true,
|
|
62
|
+
flush: "post"
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
onScopeDispose(() => {
|
|
66
|
+
stopWatching?.();
|
|
67
|
+
stopWatching = null;
|
|
68
|
+
release();
|
|
69
|
+
});
|
|
28
70
|
}
|
|
29
|
-
/**
|
|
71
|
+
/** 观察滚动容器的位置与尺寸,值变化时才回调。返回最近一次测得的值。 */
|
|
30
72
|
function useScrollTracker(options) {
|
|
31
73
|
const metrics = ref(null);
|
|
32
74
|
const handle = createScrollTracker({
|
|
@@ -40,10 +82,10 @@ function useScrollTracker(options) {
|
|
|
40
82
|
return metrics;
|
|
41
83
|
}
|
|
42
84
|
/**
|
|
43
|
-
*
|
|
85
|
+
* 内容增长时保持粘底,用户向上滚动后即停止跟随。
|
|
44
86
|
*
|
|
45
|
-
* 两个 getter
|
|
46
|
-
* 而 setup 阶段模板 ref
|
|
87
|
+
* 两个 getter 中读取的是 ref 时自动重绑:原语在建立时就绑定一次,
|
|
88
|
+
* 而 setup 阶段模板 ref 仍为 null,不重绑等于未挂载。
|
|
47
89
|
*/
|
|
48
90
|
function useStickToBottom(options) {
|
|
49
91
|
const state = ref(null);
|
|
@@ -62,7 +104,7 @@ function useStickToBottom(options) {
|
|
|
62
104
|
retarget: handle.retarget
|
|
63
105
|
};
|
|
64
106
|
}
|
|
65
|
-
/**
|
|
107
|
+
/** 连续输入字母跳转到匹配项的缓冲,超时自动清空。 */
|
|
66
108
|
function useTypeahead(options = {}) {
|
|
67
109
|
const typeahead = createTypeahead(options);
|
|
68
110
|
onScopeDispose(() => typeahead.clear());
|
package/dist/behavior.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"behavior.js","names":[],"sources":["../src/behavior.ts"],"sourcesContent":["// @xihan-ui/vue/behavior —— 行为原语的 Vue 包装。\n//\n// @xihan-ui/
|
|
1
|
+
{"version":3,"file":"behavior.js","names":[],"sources":["../src/behavior.ts"],"sourcesContent":["/*\n * Copyright (c) 2021-Present XiHanFun and contributors.\n * Licensed under the MIT License. See LICENSE in the project root for license information.\n */\n\n// @xihan-ui/vue/behavior —— 行为原语的 Vue 包装。\n//\n// @xihan-ui/core 里的原语都是框架无关的:收一份配置与 DOM 输入,返回一个要自己\n// 释放的句柄。Vue 包装把建立、节点换代与释放对齐到组件生命周期,不改原语语义。\n//\n// 与主入口分开:自建浮层才用得上这一层,不用的应用不必把它压进主入口的体积。\n// 需要层栈仪式的那几个(消解层、焦点域、背景失活)不在这里——\n// 它们要按顺序接四五个东西,接错的表现是「点子菜单父层跟着关」这种不报错的怪症,\n// 那种场景请直接用库里现成的浮层组件。\nimport type {\n HoverIntentOptions as CoreHoverIntentOptions,\n RuntimeConfig,\n ScrollMetrics,\n ScrollTrackerOptions,\n StickToBottomOptions,\n StickToBottomState,\n Typeahead,\n TypeaheadOptions,\n} from '@xihan-ui/core'\nimport type { MaybeRefOrGetter, Ref } from 'vue'\nimport {\n acquireScrollLock,\n createScrollTracker,\n createStickToBottom,\n createTypeahead,\n trackHoverIntent,\n} from '@xihan-ui/core'\nimport { onMounted, onScopeDispose, ref, toValue, watch } from 'vue'\n\n/**\n * 按需加解滚动锁。锁是引用计数的,多处同时加锁不会互相干扰。\n *\n * 锁定哪个元素由 `config.scrollRoot()` 决定;宿主把滚动移入内容容器\n * (body 自身不滚动)时必须在配置中注入,否则锁定的是不滚动的元素。\n */\nexport function useScrollLock(\n active: MaybeRefOrGetter<boolean>,\n config: MaybeRefOrGetter<RuntimeConfig>,\n): void {\n let handle: { dispose: () => void } | null = null\n let stopWatching: (() => void) | null = null\n const release = (): void => {\n const current = handle\n handle = null\n current?.dispose()\n }\n onMounted(() => {\n stopWatching = watch(\n () => toValue(active),\n (on) => {\n if (on && !handle)\n handle = acquireScrollLock({ config: toValue(config) })\n else if (!on)\n release()\n },\n { immediate: true, flush: 'post' },\n )\n })\n onScopeDispose(() => {\n stopWatching?.()\n stopWatching = null\n release()\n })\n}\n\n/**\n * 悬停意图:进入触发器停留足够时长才报告展开,离开时按安全三角判断是否正朝浮层移动。\n * 用于自建的悬停浮层,省去斜向划向子菜单时中途关闭这类手写延时。\n */\nexport interface UseHoverIntentOptions extends Omit<CoreHoverIntentOptions, 'trigger'> {\n /** 当前悬停宿主;模板 ref 尚未就位或节点暂时不渲染时返回 null。 */\n getTriggerEl: () => HTMLElement | null\n}\n\nexport function useHoverIntent(options: MaybeRefOrGetter<UseHoverIntentOptions>): void {\n const readOptions = (): UseHoverIntentOptions => toValue(options)\n let stopTracking: (() => void) | null = null\n let stopWatching: (() => void) | null = null\n\n const release = (): void => {\n stopTracking?.()\n stopTracking = null\n }\n\n onMounted(() => {\n stopWatching = watch(\n [\n () => readOptions().getTriggerEl(),\n () => readOptions().openDelay,\n () => readOptions().closeDelay,\n () => readOptions().buffer,\n ],\n ([trigger]) => {\n release()\n // null 是 Vue 模板节点尚未在场的明确生命周期状态;节点出现后本 watcher 会建立绑定。\n if (trigger === null)\n return\n const current = readOptions()\n stopTracking = trackHoverIntent({\n trigger,\n getContentEl: () => readOptions().getContentEl(),\n openDelay: current.openDelay,\n closeDelay: current.closeDelay,\n buffer: current.buffer,\n onOpenIntent: () => readOptions().onOpenIntent(),\n onCloseIntent: () => readOptions().onCloseIntent(),\n })\n },\n { immediate: true, flush: 'post' },\n )\n })\n\n onScopeDispose(() => {\n stopWatching?.()\n stopWatching = null\n release()\n })\n}\n\n/** 观察滚动容器的位置与尺寸,值变化时才回调。返回最近一次测得的值。 */\nexport function useScrollTracker(options: ScrollTrackerOptions): Ref<ScrollMetrics | null> {\n const metrics = ref<ScrollMetrics | null>(null)\n const handle = createScrollTracker({\n ...options,\n onChange: (next) => {\n metrics.value = next\n options.onChange?.(next)\n },\n })\n onScopeDispose(() => handle.dispose())\n return metrics\n}\n\nexport interface StickToBottom {\n /** 当前贴底状态,随原语的回调更新。 */\n state: Ref<StickToBottomState | null>\n /** 滚动到底部并恢复粘附,默认 'smooth',reducedMotion 为真时强制 'instant'。 */\n scrollToBottom: (behavior?: 'smooth' | 'instant') => void\n /** 重新读取 scrollEl / contentEl,节点变化时解绑重绑。 */\n retarget: () => void\n}\n\n/**\n * 内容增长时保持粘底,用户向上滚动后即停止跟随。\n *\n * 两个 getter 中读取的是 ref 时自动重绑:原语在建立时就绑定一次,\n * 而 setup 阶段模板 ref 仍为 null,不重绑等于未挂载。\n */\nexport function useStickToBottom(options: StickToBottomOptions): StickToBottom {\n const state = ref<StickToBottomState | null>(null)\n const handle = createStickToBottom({\n ...options,\n onChange: (next) => {\n state.value = next\n options.onChange?.(next)\n },\n })\n watch([() => options.scrollEl(), () => options.contentEl()], () => handle.retarget())\n onScopeDispose(() => handle.dispose())\n return { state, scrollToBottom: handle.scrollToBottom, retarget: handle.retarget }\n}\n\n/** 连续输入字母跳转到匹配项的缓冲,超时自动清空。 */\nexport function useTypeahead(options: TypeaheadOptions = {}): Typeahead {\n const typeahead = createTypeahead(options)\n onScopeDispose(() => typeahead.clear())\n return typeahead\n}\n"],"mappings":";;;;;;;;;AAwCA,SAAgB,cACd,QACA,QACM;CACN,IAAI,SAAyC;CAC7C,IAAI,eAAoC;CACxC,MAAM,gBAAsB;EAC1B,MAAM,UAAU;EAChB,SAAS;EACT,SAAS,QAAQ;CACnB;CACA,gBAAgB;EACd,eAAe,YACP,QAAQ,MAAM,IACnB,OAAO;GACN,IAAI,MAAM,CAAC,QACT,SAAS,kBAAkB,EAAE,QAAQ,QAAQ,MAAM,EAAE,CAAC;QACnD,IAAI,CAAC,IACR,QAAQ;EACZ,GACA;GAAE,WAAW;GAAM,OAAO;EAAO,CACnC;CACF,CAAC;CACD,qBAAqB;EACnB,eAAe;EACf,eAAe;EACf,QAAQ;CACV,CAAC;AACH;AAWA,SAAgB,eAAe,SAAwD;CACrF,MAAM,oBAA2C,QAAQ,OAAO;CAChE,IAAI,eAAoC;CACxC,IAAI,eAAoC;CAExC,MAAM,gBAAsB;EAC1B,eAAe;EACf,eAAe;CACjB;CAEA,gBAAgB;EACd,eAAe,MACb;SACQ,YAAY,CAAC,CAAC,aAAa;SAC3B,YAAY,CAAC,CAAC;SACd,YAAY,CAAC,CAAC;SACd,YAAY,CAAC,CAAC;EACtB,IACC,CAAC,aAAa;GACb,QAAQ;GAER,IAAI,YAAY,MACd;GACF,MAAM,UAAU,YAAY;GAC5B,eAAe,iBAAiB;IAC9B;IACA,oBAAoB,YAAY,CAAC,CAAC,aAAa;IAC/C,WAAW,QAAQ;IACnB,YAAY,QAAQ;IACpB,QAAQ,QAAQ;IAChB,oBAAoB,YAAY,CAAC,CAAC,aAAa;IAC/C,qBAAqB,YAAY,CAAC,CAAC,cAAc;GACnD,CAAC;EACH,GACA;GAAE,WAAW;GAAM,OAAO;EAAO,CACnC;CACF,CAAC;CAED,qBAAqB;EACnB,eAAe;EACf,eAAe;EACf,QAAQ;CACV,CAAC;AACH;;AAGA,SAAgB,iBAAiB,SAA0D;CACzF,MAAM,UAAU,IAA0B,IAAI;CAC9C,MAAM,SAAS,oBAAoB;EACjC,GAAG;EACH,WAAW,SAAS;GAClB,QAAQ,QAAQ;GAChB,QAAQ,WAAW,IAAI;EACzB;CACF,CAAC;CACD,qBAAqB,OAAO,QAAQ,CAAC;CACrC,OAAO;AACT;;;;;;;AAiBA,SAAgB,iBAAiB,SAA8C;CAC7E,MAAM,QAAQ,IAA+B,IAAI;CACjD,MAAM,SAAS,oBAAoB;EACjC,GAAG;EACH,WAAW,SAAS;GAClB,MAAM,QAAQ;GACd,QAAQ,WAAW,IAAI;EACzB;CACF,CAAC;CACD,MAAM,OAAO,QAAQ,SAAS,SAAS,QAAQ,UAAU,CAAC,SAAS,OAAO,SAAS,CAAC;CACpF,qBAAqB,OAAO,QAAQ,CAAC;CACrC,OAAO;EAAE;EAAO,gBAAgB,OAAO;EAAgB,UAAU,OAAO;CAAS;AACnF;;AAGA,SAAgB,aAAa,UAA4B,CAAC,GAAc;CACtE,MAAM,YAAY,gBAAgB,OAAO;CACzC,qBAAqB,UAAU,MAAM,CAAC;CACtC,OAAO;AACT"}
|
|
@@ -1,39 +1,37 @@
|
|
|
1
1
|
import { PayloadOf } from "../../runtime/payload.js";
|
|
2
2
|
import { PropType, VNode } from "vue";
|
|
3
|
+
import { ControlVariant, Direction, Orientation, Size, Tone } from "@xihan-ui/core";
|
|
3
4
|
import { AccordionNode, AccordionSchema } from "@xihan-ui/headless";
|
|
4
|
-
import { Direction, Orientation, Size, Tone } from "@xihan-ui/kernel";
|
|
5
5
|
//#region src/components/accordion/accordion.d.ts
|
|
6
6
|
type AccordionProps = AccordionSchema['props'];
|
|
7
7
|
declare const XhAccordionRoot: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
8
|
collection: {
|
|
9
9
|
type: PropType<AccordionNode[]>;
|
|
10
|
-
default: undefined;
|
|
11
10
|
};
|
|
12
11
|
value: {
|
|
13
12
|
type: PropType<string[]>;
|
|
14
|
-
default: undefined;
|
|
15
13
|
};
|
|
16
14
|
defaultValue: {
|
|
17
15
|
type: PropType<string[]>;
|
|
18
|
-
default: undefined;
|
|
19
16
|
};
|
|
20
17
|
multiple: BooleanConstructor;
|
|
21
18
|
collapsible: BooleanConstructor;
|
|
19
|
+
loop: BooleanConstructor;
|
|
20
|
+
disabled: BooleanConstructor;
|
|
21
|
+
variant: {
|
|
22
|
+
type: PropType<ControlVariant>;
|
|
23
|
+
};
|
|
22
24
|
orientation: {
|
|
23
25
|
type: PropType<Orientation>;
|
|
24
|
-
default: undefined;
|
|
25
26
|
};
|
|
26
27
|
dir: {
|
|
27
28
|
type: PropType<Direction>;
|
|
28
|
-
default: undefined;
|
|
29
29
|
};
|
|
30
30
|
tone: {
|
|
31
31
|
type: PropType<Tone>;
|
|
32
|
-
default: undefined;
|
|
33
32
|
};
|
|
34
33
|
size: {
|
|
35
34
|
type: PropType<Size>;
|
|
36
|
-
default: undefined;
|
|
37
35
|
};
|
|
38
36
|
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
39
37
|
[key: string]: any;
|
|
@@ -43,47 +41,40 @@ declare const XhAccordionRoot: import("vue").DefineComponent<import("vue").Extra
|
|
|
43
41
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
44
42
|
collection: {
|
|
45
43
|
type: PropType<AccordionNode[]>;
|
|
46
|
-
default: undefined;
|
|
47
44
|
};
|
|
48
45
|
value: {
|
|
49
46
|
type: PropType<string[]>;
|
|
50
|
-
default: undefined;
|
|
51
47
|
};
|
|
52
48
|
defaultValue: {
|
|
53
49
|
type: PropType<string[]>;
|
|
54
|
-
default: undefined;
|
|
55
50
|
};
|
|
56
51
|
multiple: BooleanConstructor;
|
|
57
52
|
collapsible: BooleanConstructor;
|
|
53
|
+
loop: BooleanConstructor;
|
|
54
|
+
disabled: BooleanConstructor;
|
|
55
|
+
variant: {
|
|
56
|
+
type: PropType<ControlVariant>;
|
|
57
|
+
};
|
|
58
58
|
orientation: {
|
|
59
59
|
type: PropType<Orientation>;
|
|
60
|
-
default: undefined;
|
|
61
60
|
};
|
|
62
61
|
dir: {
|
|
63
62
|
type: PropType<Direction>;
|
|
64
|
-
default: undefined;
|
|
65
63
|
};
|
|
66
64
|
tone: {
|
|
67
65
|
type: PropType<Tone>;
|
|
68
|
-
default: undefined;
|
|
69
66
|
};
|
|
70
67
|
size: {
|
|
71
68
|
type: PropType<Size>;
|
|
72
|
-
default: undefined;
|
|
73
69
|
};
|
|
74
70
|
}>> & Readonly<{
|
|
75
71
|
"onValue-change"?: ((_details: import("@xihan-ui/headless").AccordionValueChangeDetails) => any) | undefined;
|
|
76
72
|
"onUpdate:value"?: ((_value: string[]) => any) | undefined;
|
|
77
73
|
}>, {
|
|
78
|
-
value: string[];
|
|
79
74
|
multiple: boolean;
|
|
80
75
|
collapsible: boolean;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
orientation: Orientation;
|
|
84
|
-
dir: Direction;
|
|
85
|
-
tone: Tone;
|
|
86
|
-
size: Size;
|
|
76
|
+
loop: boolean;
|
|
77
|
+
disabled: boolean;
|
|
87
78
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
88
79
|
declare const XhAccordionItem: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
89
80
|
value: {
|
|
@@ -108,6 +99,10 @@ declare const XhAccordionItem: import("vue").DefineComponent<import("vue").Extra
|
|
|
108
99
|
}>> & Readonly<{}>, {
|
|
109
100
|
disabled: boolean;
|
|
110
101
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
102
|
+
/** 条目之间的分隔线,纯视觉;不渲染它时条目直接相邻 */
|
|
103
|
+
declare const XhAccordionItemSeparator: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
104
|
+
[key: string]: any;
|
|
105
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
111
106
|
declare const XhAccordionHeader: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
112
107
|
[key: string]: any;
|
|
113
108
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -121,5 +116,5 @@ declare const XhAccordionIndicator: import("vue").DefineComponent<{}, () => VNod
|
|
|
121
116
|
[key: string]: any;
|
|
122
117
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
123
118
|
//#endregion
|
|
124
|
-
export { XhAccordionContent, XhAccordionHeader, XhAccordionIndicator, XhAccordionItem, XhAccordionRoot, XhAccordionTrigger };
|
|
119
|
+
export { XhAccordionContent, XhAccordionHeader, XhAccordionIndicator, XhAccordionItem, XhAccordionItemSeparator, XhAccordionRoot, XhAccordionTrigger };
|
|
125
120
|
//# sourceMappingURL=accordion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.d.ts","names":[],"sources":["../../../src/components/accordion/accordion.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","names":[],"sources":["../../../src/components/accordion/accordion.ts"],"mappings":";;;;;KAgBK,iBAAiB;cAET,+BAAe,8BAAA;;IAGK,MAAA,SAAS;;;IACd,MAAA;;;IACO,MAAA;;;;;;;IAKJ,MAAA,SAAS;;;IACL,MAAA,SAAS;;;IAEjB,MAAA,SAAS;;;IACR,MAAA,SAAS;;;IACT,MAAA,SAAS;;;;;EAIN,iBAAA,UAAA,UAAU;EACZ,iBAAA,QAAA,UAAU;;;IAjBN,MAAA,SAAS;;;IACd,MAAA;;;IACO,MAAA;;;;;;;IAKJ,MAAA,SAAS;;;IACL,MAAA,SAAS;;;IAEjB,MAAA,SAAS;;;IACR,MAAA,SAAS;;;IACT,MAAA,SAAS;;;;;;;;;;qCAwBnC;cAEW,+BAAe,8BAAA;;;;;;;;;;;;;;;;;;;;;;qCAgB1B;;cAGW,wCAAwB,0BAAA,oBAAA,4BAAA;;8BAMnC,qCAAA,iDAAA,aAAA,eAAA,oDAAA;cAGW,iCAAiB,0BAAA,oBAAA,4BAAA;;8BAO5B,qCAAA,iDAAA,aAAA,eAAA,oDAAA;cAEW,kCAAkB,0BAAA,oBAAA,4BAAA;;8BAO7B,qCAAA,iDAAA,aAAA,eAAA,oDAAA;cAEW,kCAAkB,0BAAA,oBAAA,4BAAA;;8BAoB7B,qCAAA,iDAAA,aAAA,eAAA,oDAAA;cAEW,oCAAoB,0BAAA,oBAAA,4BAAA;;8BAO/B,qCAAA,iDAAA,aAAA,eAAA,oDAAA"}
|