@cognite/aura 0.3.5 → 1.46105.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 +264 -0
- package/DESIGN.md +638 -281
- package/LICENSE +21 -0
- package/README.md +21 -13
- package/dist/colors-deprecated.css +587 -0
- package/dist/colors.css +803 -830
- package/dist/components/index.d.ts +63 -57
- package/dist/components/index.js +62 -59
- package/dist/components/index.js.map +1 -0
- package/dist/components/ui/core/accordion/accordion.d.ts +19 -18
- package/dist/components/ui/core/accordion/accordion.js +99 -78
- package/dist/components/ui/core/accordion/accordion.js.map +1 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar-motion.d.ts +8 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar-motion.js +125 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar-motion.js.map +1 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar.d.ts +31 -31
- package/dist/components/ui/core/action-toolbar/action-toolbar.js +156 -106
- package/dist/components/ui/core/action-toolbar/action-toolbar.js.map +1 -0
- package/dist/components/ui/core/alert/alert.d.ts +25 -25
- package/dist/components/ui/core/alert/alert.js +181 -152
- package/dist/components/ui/core/alert/alert.js.map +1 -0
- package/dist/components/ui/core/avatar/avatar.d.ts +10 -9
- package/dist/components/ui/core/avatar/avatar.js +75 -65
- package/dist/components/ui/core/avatar/avatar.js.map +1 -0
- package/dist/components/ui/core/badge/badge.d.ts +13 -12
- package/dist/components/ui/core/badge/badge.js +88 -72
- package/dist/components/ui/core/badge/badge.js.map +1 -0
- package/dist/components/ui/core/banner/banner.d.ts +18 -18
- package/dist/components/ui/core/banner/banner.js +179 -142
- package/dist/components/ui/core/banner/banner.js.map +1 -0
- package/dist/components/ui/core/breadcrumb/breadcrumb.d.ts +12 -12
- package/dist/components/ui/core/breadcrumb/breadcrumb.js +139 -104
- package/dist/components/ui/core/breadcrumb/breadcrumb.js.map +1 -0
- package/dist/components/ui/core/button/button.d.ts +7 -7
- package/dist/components/ui/core/button/button.gallery.d.ts +2 -0
- package/dist/components/ui/core/button/button.gallery.js +76 -0
- package/dist/components/ui/core/button/button.gallery.js.map +1 -0
- package/dist/components/ui/core/button/button.js +57 -47
- package/dist/components/ui/core/button/button.js.map +1 -0
- package/dist/components/ui/core/button-group/button-group.d.ts +9 -9
- package/dist/components/ui/core/button-group/button-group.js +50 -40
- package/dist/components/ui/core/button-group/button-group.js.map +1 -0
- package/dist/components/ui/core/calendar/calendar-header.d.ts +7 -7
- package/dist/components/ui/core/calendar/calendar-header.js +102 -63
- package/dist/components/ui/core/calendar/calendar-header.js.map +1 -0
- package/dist/components/ui/core/calendar/calendar-utils.d.ts +30 -30
- package/dist/components/ui/core/calendar/calendar-utils.js +116 -39
- package/dist/components/ui/core/calendar/calendar-utils.js.map +1 -0
- package/dist/components/ui/core/calendar/calendar.d.ts +10 -10
- package/dist/components/ui/core/calendar/calendar.js +95 -66
- package/dist/components/ui/core/calendar/calendar.js.map +1 -0
- package/dist/components/ui/core/calendar/constants.js +3 -0
- package/dist/components/ui/core/calendar/constants.js.map +1 -0
- package/dist/components/ui/core/card/card.d.ts +20 -20
- package/dist/components/ui/core/card/card.js +133 -104
- package/dist/components/ui/core/card/card.js.map +1 -0
- package/dist/components/ui/core/chart/chart.d.ts +55 -53
- package/dist/components/ui/core/chart/chart.js +196 -116
- package/dist/components/ui/core/chart/chart.js.map +1 -0
- package/dist/components/ui/core/chart/index.d.ts +2 -2
- package/dist/components/ui/core/chart/index.js +3 -2
- package/dist/components/ui/core/chart/index.js.map +1 -0
- package/dist/components/ui/core/checkbox/checkbox.d.ts +9 -9
- package/dist/components/ui/core/checkbox/checkbox.js +88 -68
- package/dist/components/ui/core/checkbox/checkbox.js.map +1 -0
- package/dist/components/ui/core/checkbox/checkbox.metadata.d.ts +1 -1
- package/dist/components/ui/core/checkbox/checkbox.metadata.js +6 -7
- package/dist/components/ui/core/checkbox/checkbox.metadata.js.map +1 -0
- package/dist/components/ui/core/code-block/code-block.d.ts +19 -19
- package/dist/components/ui/core/code-block/code-block.js +259 -175
- package/dist/components/ui/core/code-block/code-block.js.map +1 -0
- package/dist/components/ui/core/collapsible/collapsible.d.ts +5 -5
- package/dist/components/ui/core/collapsible/collapsible.js +36 -30
- package/dist/components/ui/core/collapsible/collapsible.js.map +1 -0
- package/dist/components/ui/core/combobox/combobox.d.ts +13 -13
- package/dist/components/ui/core/combobox/combobox.js +89 -40
- package/dist/components/ui/core/combobox/combobox.js.map +1 -0
- package/dist/components/ui/core/command/command.d.ts +20 -18
- package/dist/components/ui/core/command/command.js +137 -85
- package/dist/components/ui/core/command/command.js.map +1 -0
- package/dist/components/ui/core/conversation/conversation.d.ts +14 -0
- package/dist/components/ui/core/conversation/conversation.js +51 -0
- package/dist/components/ui/core/conversation/conversation.js.map +1 -0
- package/dist/components/ui/core/count/count.d.ts +8 -6
- package/dist/components/ui/core/count/count.js +51 -21
- package/dist/components/ui/core/count/count.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-cell.d.ts +7 -7
- package/dist/components/ui/core/data-grid/data-grid-cell.js +22 -22
- package/dist/components/ui/core/data-grid/data-grid-cell.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-clauses.d.ts +14 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-clauses.js +36 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-clauses.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-panel.d.ts +41 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-panel.js +273 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-panel.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-footer.d.ts +6 -0
- package/dist/components/ui/core/data-grid/data-grid-footer.js +34 -0
- package/dist/components/ui/core/data-grid/data-grid-footer.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-header-row.d.ts +10 -10
- package/dist/components/ui/core/data-grid/data-grid-header-row.js +69 -55
- package/dist/components/ui/core/data-grid/data-grid-header-row.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-header.d.ts +11 -0
- package/dist/components/ui/core/data-grid/data-grid-header.js +67 -0
- package/dist/components/ui/core/data-grid/data-grid-header.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-row.d.ts +15 -15
- package/dist/components/ui/core/data-grid/data-grid-row.js +104 -76
- package/dist/components/ui/core/data-grid/data-grid-row.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid.d.ts +85 -35
- package/dist/components/ui/core/data-grid/data-grid.fixtures.d.ts +7 -7
- package/dist/components/ui/core/data-grid/data-grid.fixtures.js +139 -0
- package/dist/components/ui/core/data-grid/data-grid.fixtures.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid.js +402 -132
- package/dist/components/ui/core/data-grid/data-grid.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid.utils.d.ts +3 -3
- package/dist/components/ui/core/data-grid/data-grid.utils.js +44 -33
- package/dist/components/ui/core/data-grid/data-grid.utils.js.map +1 -0
- package/dist/components/ui/core/data-grid/index.d.ts +4 -1
- package/dist/components/ui/core/data-grid/index.js +5 -2
- package/dist/components/ui/core/data-grid/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.d.ts +11 -13
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +85 -61
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/index.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/date-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/types.d.ts +14 -14
- package/dist/components/ui/core/date-time-pickers/date-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +51 -36
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.d.ts +11 -13
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js +89 -64
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/index.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/date-range-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/types.d.ts +20 -20
- package/dist/components/ui/core/date-time-pickers/date-range-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.d.ts +4 -4
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js +95 -60
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/date-time-picker.d.ts +15 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/date-time-picker.js +120 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/date-time-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/index.d.ts +3 -1
- package/dist/components/ui/core/date-time-pickers/date-time-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/types.d.ts +25 -32
- package/dist/components/ui/core/date-time-pickers/date-time-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/use-date-time-picker.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/date-time-picker/use-date-time-picker.js +78 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/use-date-time-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.d.ts +13 -15
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js +165 -119
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.d.ts +37 -37
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js +163 -104
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/index.d.ts +17 -12
- package/dist/components/ui/core/date-time-pickers/index.js +10 -6
- package/dist/components/ui/core/date-time-pickers/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.d.ts +5 -5
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js +52 -42
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/constants.d.ts +6 -1
- package/dist/components/ui/core/date-time-pickers/shared/constants.js +23 -0
- package/dist/components/ui/core/date-time-pickers/shared/constants.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.d.ts +16 -15
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js +87 -64
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.d.ts +10 -9
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js +89 -38
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.d.ts +5 -5
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js +34 -23
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.d.ts +23 -23
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js +95 -52
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.d.ts +5 -5
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js +22 -18
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.d.ts +19 -19
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js +41 -24
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.d.ts +13 -13
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js +33 -24
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.d.ts +5 -5
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js +9 -4
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.d.ts +13 -9
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js +22 -17
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/index.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.d.ts +13 -13
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.js +49 -40
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.d.ts +7 -7
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js +41 -34
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/index.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/time-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.d.ts +12 -14
- package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.js +99 -79
- package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/types.d.ts +20 -20
- package/dist/components/ui/core/date-time-pickers/time-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.js +63 -41
- package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/index.d.ts +3 -1
- package/dist/components/ui/core/date-time-pickers/time-range-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/time-range-picker.d.ts +14 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/time-range-picker.js +115 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/time-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/types.d.ts +30 -36
- package/dist/components/ui/core/date-time-pickers/time-range-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/use-time-range-picker.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/time-range-picker/use-time-range-picker.js +145 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/use-time-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-input.d.ts +56 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-input.js +67 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-input.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.d.ts +18 -18
- package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.js +42 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/format-utils.d.ts +31 -29
- package/dist/components/ui/core/date-time-pickers/utils/format-utils.js +56 -0
- package/dist/components/ui/core/date-time-pickers/utils/format-utils.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/segment-utils.d.ts +21 -21
- package/dist/components/ui/core/date-time-pickers/utils/segment-utils.js +170 -0
- package/dist/components/ui/core/date-time-pickers/utils/segment-utils.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.d.ts +28 -28
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +88 -7
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-validation.d.ts +17 -17
- package/dist/components/ui/core/date-time-pickers/utils/time-validation.js +43 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-validation.js.map +1 -0
- package/dist/components/ui/core/dialog/dialog.d.ts +12 -9
- package/dist/components/ui/core/dialog/dialog.js +90 -82
- package/dist/components/ui/core/dialog/dialog.js.map +1 -0
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +22 -19
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +204 -149
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js.map +1 -0
- package/dist/components/ui/core/empty-state/empty-state.context.d.ts +4 -4
- package/dist/components/ui/core/empty-state/empty-state.context.js +8 -5
- package/dist/components/ui/core/empty-state/empty-state.context.js.map +1 -0
- package/dist/components/ui/core/empty-state/empty-state.d.ts +14 -14
- package/dist/components/ui/core/empty-state/empty-state.js +96 -82
- package/dist/components/ui/core/empty-state/empty-state.js.map +1 -0
- package/dist/components/ui/core/helper-text/helper-text.d.ts +7 -7
- package/dist/components/ui/core/helper-text/helper-text.js +55 -36
- package/dist/components/ui/core/helper-text/helper-text.js.map +1 -0
- package/dist/components/ui/core/hover-card/hover-card.d.ts +7 -6
- package/dist/components/ui/core/hover-card/hover-card.js +56 -52
- package/dist/components/ui/core/hover-card/hover-card.js.map +1 -0
- package/dist/components/ui/core/inline-citation/inline-citation.d.ts +26 -25
- package/dist/components/ui/core/inline-citation/inline-citation.js +121 -97
- package/dist/components/ui/core/inline-citation/inline-citation.js.map +1 -0
- package/dist/components/ui/core/input/input.d.ts +2 -2
- package/dist/components/ui/core/input/input.js +15 -13
- package/dist/components/ui/core/input/input.js.map +1 -0
- package/dist/components/ui/core/input-group/input-group.d.ts +25 -14
- package/dist/components/ui/core/input-group/input-group.js +149 -76
- package/dist/components/ui/core/input-group/input-group.js.map +1 -0
- package/dist/components/ui/core/item/item.d.ts +20 -0
- package/dist/components/ui/core/item/item.js +93 -0
- package/dist/components/ui/core/item/item.js.map +1 -0
- package/dist/components/ui/core/kbd/kbd.d.ts +3 -3
- package/dist/components/ui/core/kbd/kbd.js +24 -20
- package/dist/components/ui/core/kbd/kbd.js.map +1 -0
- package/dist/components/ui/core/label/label.d.ts +3 -3
- package/dist/components/ui/core/label/label.js +33 -26
- package/dist/components/ui/core/label/label.js.map +1 -0
- package/dist/components/ui/core/loader/loader.d.ts +6 -6
- package/dist/components/ui/core/loader/loader.js +97 -80
- package/dist/components/ui/core/loader/loader.js.map +1 -0
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.d.ts +9 -9
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.js +19 -12
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.js.map +1 -0
- package/dist/components/ui/core/message/message-response-math-plugin.d.ts +3 -0
- package/dist/components/ui/core/message/message-response-math-plugin.js +6 -0
- package/dist/components/ui/core/message/message-response-math-plugin.js.map +1 -0
- package/dist/components/ui/core/message/message.d.ts +27 -23
- package/dist/components/ui/core/message/message.js +453 -316
- package/dist/components/ui/core/message/message.js.map +1 -0
- package/dist/components/ui/core/overflow-list/overflow-list.d.ts +21 -0
- package/dist/components/ui/core/overflow-list/overflow-list.js +197 -0
- package/dist/components/ui/core/overflow-list/overflow-list.js.map +1 -0
- package/dist/components/ui/core/overflow-list/overflow-list.utils.d.ts +37 -35
- package/dist/components/ui/core/overflow-list/overflow-list.utils.js +206 -0
- package/dist/components/ui/core/overflow-list/overflow-list.utils.js.map +1 -0
- package/dist/components/ui/core/pagination/pagination-size-context.d.ts +2 -2
- package/dist/components/ui/core/pagination/pagination-size-context.js +6 -5
- package/dist/components/ui/core/pagination/pagination-size-context.js.map +1 -0
- package/dist/components/ui/core/pagination/pagination-teleport.d.ts +9 -9
- package/dist/components/ui/core/pagination/pagination-teleport.js +127 -84
- package/dist/components/ui/core/pagination/pagination-teleport.js.map +1 -0
- package/dist/components/ui/core/pagination/pagination-teleport.utils.js +6 -6
- package/dist/components/ui/core/pagination/pagination-teleport.utils.js.map +1 -0
- package/dist/components/ui/core/pagination/pagination.d.ts +39 -39
- package/dist/components/ui/core/pagination/pagination.js +294 -234
- package/dist/components/ui/core/pagination/pagination.js.map +1 -0
- package/dist/components/ui/core/popover/popover.d.ts +12 -11
- package/dist/components/ui/core/popover/popover.js +104 -89
- package/dist/components/ui/core/popover/popover.js.map +1 -0
- package/dist/components/ui/core/progress/progress.d.ts +9 -8
- package/dist/components/ui/core/progress/progress.js +50 -35
- package/dist/components/ui/core/progress/progress.js.map +1 -0
- package/dist/components/ui/core/prompt-input/prompt-input.d.ts +27 -27
- package/dist/components/ui/core/prompt-input/prompt-input.js +342 -271
- package/dist/components/ui/core/prompt-input/prompt-input.js.map +1 -0
- package/dist/components/ui/core/radio-group/radio-group.d.ts +12 -12
- package/dist/components/ui/core/radio-group/radio-group.js +88 -58
- package/dist/components/ui/core/radio-group/radio-group.js.map +1 -0
- package/dist/components/ui/core/reasoning/reasoning.d.ts +7 -7
- package/dist/components/ui/core/reasoning/reasoning.js +68 -56
- package/dist/components/ui/core/reasoning/reasoning.js.map +1 -0
- package/dist/components/ui/core/scroll-area/scroll-area.d.ts +4 -4
- package/dist/components/ui/core/scroll-area/scroll-area.js +50 -40
- package/dist/components/ui/core/scroll-area/scroll-area.js.map +1 -0
- package/dist/components/ui/core/search/search.d.ts +8 -8
- package/dist/components/ui/core/search/search.js +122 -76
- package/dist/components/ui/core/search/search.js.map +1 -0
- package/dist/components/ui/core/segmented-control/segmented-control.d.ts +10 -10
- package/dist/components/ui/core/segmented-control/segmented-control.js +203 -149
- package/dist/components/ui/core/segmented-control/segmented-control.js.map +1 -0
- package/dist/components/ui/core/select/select.d.ts +27 -26
- package/dist/components/ui/core/select/select.js +213 -168
- package/dist/components/ui/core/select/select.js.map +1 -0
- package/dist/components/ui/core/separator/separator.d.ts +2 -2
- package/dist/components/ui/core/separator/separator.js +13 -13
- package/dist/components/ui/core/separator/separator.js.map +1 -0
- package/dist/components/ui/core/shimmer/shimmer.d.ts +8 -8
- package/dist/components/ui/core/shimmer/shimmer.js +64 -40
- package/dist/components/ui/core/shimmer/shimmer.js.map +1 -0
- package/dist/components/ui/core/skeleton/skeleton.d.ts +2 -2
- package/dist/components/ui/core/skeleton/skeleton.js +13 -13
- package/dist/components/ui/core/skeleton/skeleton.js.map +1 -0
- package/dist/components/ui/core/slider/slider.d.ts +7 -7
- package/dist/components/ui/core/slider/slider.js +51 -39
- package/dist/components/ui/core/slider/slider.js.map +1 -0
- package/dist/components/ui/core/sonner-toast/sonner-toast.d.ts +2 -2
- package/dist/components/ui/core/sonner-toast/sonner-toast.js +67 -54
- package/dist/components/ui/core/sonner-toast/sonner-toast.js.map +1 -0
- package/dist/components/ui/core/sources/sources.d.ts +12 -12
- package/dist/components/ui/core/sources/sources.js +87 -58
- package/dist/components/ui/core/sources/sources.js.map +1 -0
- package/dist/components/ui/core/switch/switch.d.ts +9 -9
- package/dist/components/ui/core/switch/switch.js +83 -61
- package/dist/components/ui/core/switch/switch.js.map +1 -0
- package/dist/components/ui/core/switch/switch.metadata.d.ts +1 -1
- package/dist/components/ui/core/switch/switch.metadata.js +8 -0
- package/dist/components/ui/core/switch/switch.metadata.js.map +1 -0
- package/dist/components/ui/core/tabs/tabs.d.ts +20 -18
- package/dist/components/ui/core/tabs/tabs.js +176 -147
- package/dist/components/ui/core/tabs/tabs.js.map +1 -0
- package/dist/components/ui/core/tabs/tabs.utils.d.ts +1 -1
- package/dist/components/ui/core/tabs/tabs.utils.js +10 -6
- package/dist/components/ui/core/tabs/tabs.utils.js.map +1 -0
- package/dist/components/ui/core/textarea/textarea.d.ts +2 -2
- package/dist/components/ui/core/textarea/textarea.js +13 -13
- package/dist/components/ui/core/textarea/textarea.js.map +1 -0
- package/dist/components/ui/core/toggle/toggle.d.ts +9 -9
- package/dist/components/ui/core/toggle/toggle.js +60 -54
- package/dist/components/ui/core/toggle/toggle.js.map +1 -0
- package/dist/components/ui/core/tool/tool.d.ts +18 -18
- package/dist/components/ui/core/tool/tool.js +167 -126
- package/dist/components/ui/core/tool/tool.js.map +1 -0
- package/dist/components/ui/core/toolbar/toolbar.d.ts +37 -0
- package/dist/components/ui/core/toolbar/toolbar.js +171 -0
- package/dist/components/ui/core/toolbar/toolbar.js.map +1 -0
- package/dist/components/ui/core/tooltip/tooltip.d.ts +8 -7
- package/dist/components/ui/core/tooltip/tooltip.js +53 -46
- package/dist/components/ui/core/tooltip/tooltip.js.map +1 -0
- package/dist/components/ui/core/topbar/topbar.d.ts +26 -26
- package/dist/components/ui/core/topbar/topbar.js +160 -105
- package/dist/components/ui/core/topbar/topbar.js.map +1 -0
- package/dist/components/ui/core/tree/tree.d.ts +20 -0
- package/dist/components/ui/core/tree/tree.js +100 -0
- package/dist/components/ui/core/tree/tree.js.map +1 -0
- package/dist/eslint/index.d.ts +5 -5
- package/dist/eslint/index.js +9 -5
- package/dist/eslint/index.js.map +1 -0
- package/dist/eslint/no-overriding-styles.d.ts +1 -1
- package/dist/eslint/no-overriding-styles.js +341 -201
- package/dist/eslint/no-overriding-styles.js.map +1 -0
- package/dist/icons/index.d.ts +1 -1
- package/dist/icons/index.js +2 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/ai/types.d.ts +43 -43
- package/dist/lib/ai/types.js +3 -0
- package/dist/lib/ai/types.js.map +1 -0
- package/dist/lib/decorative-variant-classes.d.ts +53 -0
- package/dist/lib/decorative-variant-classes.js +58 -0
- package/dist/lib/decorative-variant-classes.js.map +1 -0
- package/dist/lib/highlight-code.d.ts +11 -8
- package/dist/lib/highlight-code.js +58 -40
- package/dist/lib/highlight-code.js.map +1 -0
- package/dist/lib/portal-container-context.d.ts +1 -1
- package/dist/lib/portal-container-context.js +8 -8
- package/dist/lib/portal-container-context.js.map +1 -0
- package/dist/lib/shared-theme-from-url.d.ts +13 -0
- package/dist/lib/shared-theme-from-url.js +61 -0
- package/dist/lib/shared-theme-from-url.js.map +1 -0
- package/dist/lib/style-scope.d.ts +2 -2
- package/dist/lib/style-scope.js +6 -6
- package/dist/lib/style-scope.js.map +1 -0
- package/dist/lib/theme-share-url.d.ts +31 -0
- package/dist/lib/theme-share-url.js +116 -0
- package/dist/lib/theme-share-url.js.map +1 -0
- package/dist/lib/types.d.ts +39 -39
- package/dist/lib/types.js +3 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/use-controllable-state.d.ts +4 -7
- package/dist/lib/use-controllable-state.js +34 -21
- package/dist/lib/use-controllable-state.js.map +1 -0
- package/dist/lib/utils.d.ts +63 -34
- package/dist/lib/utils.js +134 -32
- package/dist/lib/utils.js.map +1 -0
- package/dist/styles.css +2 -1
- package/dist/styles.source.css +24 -12
- package/dist/utils/assign-ref.d.ts +3 -0
- package/dist/utils/assign-ref.js +13 -0
- package/dist/utils/assign-ref.js.map +1 -0
- package/package.json +46 -11
- package/src/components/ui/core/button/button.md +93 -0
|
@@ -1,318 +1,455 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useCallback, useContext, useEffect, useMemo, useState } from "react";
|
|
3
|
+
import { mermaid as mermaidPlugin } from "@streamdown/mermaid";
|
|
4
|
+
import { IconChevronLeft, IconChevronRight, IconPaperclip, IconX } from "@tabler/icons-react";
|
|
5
|
+
import { Streamdown } from "streamdown";
|
|
6
|
+
import { cn, getInitials } from "../../../../lib/utils.js";
|
|
7
|
+
import { Avatar, AvatarFallback, AvatarIcon, AvatarImage } from "../avatar/avatar.js";
|
|
8
|
+
import { Button } from "../button/button.js";
|
|
9
|
+
import { ButtonGroup, ButtonGroupText } from "../button-group/button-group.js";
|
|
10
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "../tooltip/tooltip.js";
|
|
11
|
+
import { MESSAGE_RESPONSE_DEFAULT_STREAMDOWN_CONTROLS } from "./message-response-default-streamdown-controls.js";
|
|
12
|
+
const Message = ({ className, isResponse = false, ...props })=>/*#__PURE__*/ _jsx("div", {
|
|
13
|
+
"data-slot": "message",
|
|
14
|
+
className: cn('group flex w-full items-start justify-start gap-3 mb-0 py-3', isResponse ? 'is-assistant items-start' : 'is-user flex-row-reverse', className),
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
const MessageContent = ({ children, className, ...props })=>/*#__PURE__*/ _jsx("div", {
|
|
18
|
+
"data-slot": "message-content",
|
|
19
|
+
className: cn('is-user:dark flex flex-col gap-4 rounded-md text-base leading-tight tracking-tightest', 'max-w-4/5', 'group-[.is-user]:overflow-hidden group-[.is-user]:bg-medium-background group-[.is-user]:p-2 group-[.is-user]:text-base-foreground', 'group-[.is-assistant]:text-base-foreground group-[.is-assistant]:pt-1', className),
|
|
20
|
+
...props,
|
|
21
|
+
children: children
|
|
22
|
+
});
|
|
23
|
+
const MessageAvatar = ({ avatarUrl, name, className, children, variant, sizes, ...props })=>{
|
|
24
|
+
const fallbackText = name ? getInitials(name) : 'ME';
|
|
25
|
+
return /*#__PURE__*/ _jsx(Avatar, {
|
|
26
|
+
"data-slot": "message-avatar",
|
|
27
|
+
className: cn('size-7 group-[.is-user]:mt-1', className),
|
|
28
|
+
variant: variant,
|
|
29
|
+
sizes: sizes,
|
|
30
|
+
...props,
|
|
31
|
+
children: children || /*#__PURE__*/ _jsxs(_Fragment, {
|
|
32
|
+
children: [
|
|
33
|
+
avatarUrl && /*#__PURE__*/ _jsx(AvatarImage, {
|
|
34
|
+
alt: name || '',
|
|
35
|
+
className: "mt-0 mb-0",
|
|
36
|
+
src: avatarUrl
|
|
37
|
+
}),
|
|
38
|
+
/*#__PURE__*/ _jsx(AvatarFallback, {
|
|
39
|
+
children: fallbackText
|
|
40
|
+
})
|
|
41
|
+
]
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
const MessageAvatarIcon = (props)=>/*#__PURE__*/ _jsx(AvatarIcon, {
|
|
46
|
+
"data-slot": "message-avatar-icon",
|
|
47
|
+
...props
|
|
48
|
+
});
|
|
49
|
+
const MessageActions = ({ className, children, ...props })=>/*#__PURE__*/ _jsx("div", {
|
|
50
|
+
"data-slot": "message-actions",
|
|
51
|
+
className: cn('flex items-center gap-2 pt-2', className),
|
|
52
|
+
...props,
|
|
53
|
+
children: children
|
|
54
|
+
});
|
|
55
|
+
const MessageAction = ({ tooltip, children, label, className, variant = 'ghost', size = 'sm', ...props })=>{
|
|
56
|
+
const button = /*#__PURE__*/ _jsxs(Button, {
|
|
57
|
+
"data-slot": "message-action",
|
|
58
|
+
className: cn('relative icon-sm text-muted-foreground hover:text-base-foreground', className),
|
|
59
|
+
size: size,
|
|
60
|
+
type: "button",
|
|
61
|
+
variant: variant,
|
|
62
|
+
...props,
|
|
63
|
+
children: [
|
|
64
|
+
children,
|
|
65
|
+
/*#__PURE__*/ _jsx("span", {
|
|
66
|
+
className: "sr-only",
|
|
67
|
+
children: label || tooltip
|
|
68
|
+
})
|
|
69
|
+
]
|
|
70
|
+
});
|
|
71
|
+
if (tooltip) {
|
|
72
|
+
return /*#__PURE__*/ _jsxs(Tooltip, {
|
|
73
|
+
children: [
|
|
74
|
+
/*#__PURE__*/ _jsx(TooltipTrigger, {
|
|
75
|
+
render: button
|
|
76
|
+
}),
|
|
77
|
+
/*#__PURE__*/ _jsx(TooltipContent, {
|
|
78
|
+
children: /*#__PURE__*/ _jsx("p", {
|
|
79
|
+
children: tooltip
|
|
80
|
+
})
|
|
81
|
+
})
|
|
82
|
+
]
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
return button;
|
|
86
|
+
};
|
|
87
|
+
const MessageBranchContext = /*#__PURE__*/ createContext(null);
|
|
88
|
+
const useMessageBranch = ()=>{
|
|
89
|
+
const context = useContext(MessageBranchContext);
|
|
90
|
+
if (!context) {
|
|
91
|
+
throw new Error('MessageBranch components must be used within MessageBranch');
|
|
92
|
+
}
|
|
93
|
+
return context;
|
|
94
|
+
};
|
|
95
|
+
const MessageBranch = ({ defaultBranch = 0, onBranchChange, className, ...props })=>{
|
|
96
|
+
const [currentBranch, setCurrentBranch] = useState(defaultBranch);
|
|
97
|
+
const [branches, setBranches] = useState([]);
|
|
98
|
+
const goToPrevious = useCallback(()=>{
|
|
99
|
+
setCurrentBranch((prev)=>{
|
|
100
|
+
const newBranch = prev > 0 ? prev - 1 : branches.length - 1;
|
|
101
|
+
onBranchChange?.(newBranch);
|
|
102
|
+
return newBranch;
|
|
103
|
+
});
|
|
104
|
+
}, [
|
|
105
|
+
branches.length,
|
|
106
|
+
onBranchChange
|
|
107
|
+
]);
|
|
108
|
+
const goToNext = useCallback(()=>{
|
|
109
|
+
setCurrentBranch((prev)=>{
|
|
110
|
+
const newBranch = prev < branches.length - 1 ? prev + 1 : 0;
|
|
111
|
+
onBranchChange?.(newBranch);
|
|
112
|
+
return newBranch;
|
|
113
|
+
});
|
|
114
|
+
}, [
|
|
115
|
+
branches.length,
|
|
116
|
+
onBranchChange
|
|
117
|
+
]);
|
|
118
|
+
const contextValue = useMemo(()=>({
|
|
119
|
+
currentBranch,
|
|
120
|
+
totalBranches: branches.length,
|
|
121
|
+
goToPrevious,
|
|
122
|
+
goToNext,
|
|
123
|
+
branches,
|
|
124
|
+
setBranches
|
|
125
|
+
}), [
|
|
126
|
+
currentBranch,
|
|
127
|
+
branches,
|
|
128
|
+
goToPrevious,
|
|
129
|
+
goToNext,
|
|
130
|
+
setBranches
|
|
131
|
+
]);
|
|
132
|
+
return /*#__PURE__*/ _jsx(MessageBranchContext.Provider, {
|
|
133
|
+
value: contextValue,
|
|
134
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
135
|
+
"data-slot": "message-branch",
|
|
136
|
+
className: cn('grid w-full gap-2 [&>div]:pb-0', className),
|
|
137
|
+
...props
|
|
138
|
+
})
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
const MessageBranchContent = ({ children, ...props })=>{
|
|
142
|
+
const { currentBranch, setBranches, branches } = useMessageBranch();
|
|
143
|
+
const childrenArray = useMemo(()=>Array.isArray(children) ? children : [
|
|
144
|
+
children
|
|
145
|
+
], [
|
|
146
|
+
children
|
|
147
|
+
]);
|
|
148
|
+
useEffect(()=>{
|
|
149
|
+
if (branches.length !== childrenArray.length) {
|
|
150
|
+
setBranches(childrenArray);
|
|
151
|
+
}
|
|
152
|
+
}, [
|
|
153
|
+
childrenArray,
|
|
154
|
+
branches,
|
|
155
|
+
setBranches
|
|
156
|
+
]);
|
|
157
|
+
return childrenArray.map((branch, index)=>/*#__PURE__*/ _jsx("div", {
|
|
158
|
+
"data-slot": "message-branch-content",
|
|
159
|
+
className: cn('grid gap-2 overflow-hidden [&>div]:pb-0', index === currentBranch ? 'block' : 'hidden'),
|
|
160
|
+
...props,
|
|
161
|
+
children: branch
|
|
162
|
+
}, branch.key));
|
|
163
|
+
};
|
|
164
|
+
const MessageBranchSelector = ({ ...props })=>{
|
|
165
|
+
const { totalBranches } = useMessageBranch();
|
|
166
|
+
if (totalBranches <= 1) {
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
return /*#__PURE__*/ _jsx(ButtonGroup, {
|
|
170
|
+
"data-slot": "message-branch-selector",
|
|
171
|
+
className: "[&>*:not(:first-child)]:rounded-l-md [&>*:not(:last-child)]:rounded-r-md",
|
|
172
|
+
orientation: "horizontal",
|
|
173
|
+
...props
|
|
174
|
+
});
|
|
175
|
+
};
|
|
176
|
+
const MessageBranchPrevious = ({ children, ...props })=>{
|
|
177
|
+
const { goToPrevious, totalBranches } = useMessageBranch();
|
|
178
|
+
return /*#__PURE__*/ _jsx(Button, {
|
|
179
|
+
"data-slot": "message-branch-previous",
|
|
180
|
+
"aria-label": "Previous branch",
|
|
181
|
+
disabled: totalBranches <= 1,
|
|
182
|
+
onClick: goToPrevious,
|
|
183
|
+
size: "icon-sm",
|
|
184
|
+
type: "button",
|
|
185
|
+
variant: "ghost",
|
|
186
|
+
...props,
|
|
187
|
+
children: children ?? /*#__PURE__*/ _jsx(IconChevronLeft, {
|
|
188
|
+
size: 14
|
|
189
|
+
})
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
const MessageBranchNext = ({ children, ...props })=>{
|
|
193
|
+
const { goToNext, totalBranches } = useMessageBranch();
|
|
194
|
+
return /*#__PURE__*/ _jsx(Button, {
|
|
195
|
+
"data-slot": "message-branch-next",
|
|
196
|
+
"aria-label": "Next branch",
|
|
197
|
+
disabled: totalBranches <= 1,
|
|
198
|
+
onClick: goToNext,
|
|
199
|
+
size: "icon-sm",
|
|
200
|
+
type: "button",
|
|
201
|
+
variant: "ghost",
|
|
202
|
+
...props,
|
|
203
|
+
children: children ?? /*#__PURE__*/ _jsx(IconChevronRight, {
|
|
204
|
+
size: 14
|
|
205
|
+
})
|
|
206
|
+
});
|
|
207
|
+
};
|
|
208
|
+
const MessageBranchPage = ({ className, ...props })=>{
|
|
209
|
+
const { currentBranch, totalBranches } = useMessageBranch();
|
|
210
|
+
return /*#__PURE__*/ _jsxs(ButtonGroupText, {
|
|
211
|
+
"data-slot": "message-branch-page",
|
|
212
|
+
className: cn('border-none bg-transparent text-muted-foreground shadow-none px-2', className),
|
|
213
|
+
...props,
|
|
214
|
+
children: [
|
|
215
|
+
currentBranch + 1,
|
|
216
|
+
"/",
|
|
217
|
+
totalBranches
|
|
218
|
+
]
|
|
219
|
+
});
|
|
220
|
+
};
|
|
221
|
+
const messageResponseComponents = {
|
|
222
|
+
h1: ({ children })=>/*#__PURE__*/ _jsx("h1", {
|
|
223
|
+
className: "mt-0 mb-2 scroll-m-20 text-xl font-medium tracking-tightest",
|
|
224
|
+
children: children
|
|
225
|
+
}),
|
|
226
|
+
h2: ({ children })=>/*#__PURE__*/ _jsx("h2", {
|
|
227
|
+
className: "mt-4 mb-1 scroll-m-20 text-lg font-medium tracking-tightest",
|
|
228
|
+
children: children
|
|
229
|
+
}),
|
|
230
|
+
h3: ({ children })=>/*#__PURE__*/ _jsx("h3", {
|
|
231
|
+
className: "mt-4 mb-1 scroll-m-20 text-base font-medium tracking-tighter",
|
|
232
|
+
children: children
|
|
233
|
+
}),
|
|
234
|
+
h4: ({ children })=>/*#__PURE__*/ _jsx("h4", {
|
|
235
|
+
className: "mt-2 mb-0 scroll-m-20 text-sm font-medium tracking-normal",
|
|
236
|
+
children: children
|
|
237
|
+
}),
|
|
238
|
+
h5: ({ children })=>/*#__PURE__*/ _jsx("h5", {
|
|
239
|
+
className: "mt-0 mb-0 scroll-m-20 text-xs font-medium tracking-tighter",
|
|
240
|
+
children: children
|
|
241
|
+
}),
|
|
242
|
+
h6: ({ children })=>/*#__PURE__*/ _jsx("h6", {
|
|
243
|
+
className: "mt-0 mb-0 scroll-m-20 text-2xs font-medium tracking-tighter",
|
|
244
|
+
children: children
|
|
245
|
+
}),
|
|
246
|
+
p: ({ children })=>/*#__PURE__*/ _jsx("p", {
|
|
247
|
+
className: "mt-2 mb-3 text-base font-normal leading-5 tracking-tightest",
|
|
248
|
+
children: children
|
|
249
|
+
}),
|
|
250
|
+
strong: ({ children })=>/*#__PURE__*/ _jsx("strong", {
|
|
251
|
+
className: "font-medium",
|
|
252
|
+
children: children
|
|
253
|
+
}),
|
|
254
|
+
em: ({ children })=>/*#__PURE__*/ _jsx("em", {
|
|
255
|
+
className: "italic",
|
|
256
|
+
children: children
|
|
257
|
+
}),
|
|
258
|
+
b: ({ children })=>/*#__PURE__*/ _jsx("b", {
|
|
259
|
+
className: "font-medium",
|
|
260
|
+
children: children
|
|
261
|
+
}),
|
|
262
|
+
i: ({ children })=>/*#__PURE__*/ _jsx("i", {
|
|
263
|
+
className: "italic",
|
|
264
|
+
children: children
|
|
265
|
+
}),
|
|
266
|
+
ul: ({ children })=>/*#__PURE__*/ _jsx("ul", {
|
|
267
|
+
className: "ml-8.25 mb-3 pt-2 pl-0 pb-0 list-disc text-base font-normal tracking-tightest",
|
|
268
|
+
children: children
|
|
269
|
+
}),
|
|
270
|
+
ol: ({ children })=>/*#__PURE__*/ _jsx("ol", {
|
|
271
|
+
className: "ml-8.25 mb-3 pt-2 pl-0 pb-0 list-decimal text-base font-normal tracking-tightest",
|
|
272
|
+
children: children
|
|
273
|
+
}),
|
|
274
|
+
li: ({ children })=>/*#__PURE__*/ _jsx("li", {
|
|
275
|
+
className: "py-0",
|
|
276
|
+
children: children
|
|
277
|
+
}),
|
|
278
|
+
blockquote: ({ children })=>/*#__PURE__*/ _jsx("blockquote", {
|
|
279
|
+
className: "my-3 pr-2 pl-2 border-l border-l-default text-sm text-muted-foreground font-normal tracking-tight not-italic",
|
|
280
|
+
children: children
|
|
281
|
+
}),
|
|
282
|
+
hr: ()=>/*#__PURE__*/ _jsx("hr", {
|
|
283
|
+
className: "my-4 border-default"
|
|
284
|
+
}),
|
|
285
|
+
a: ({ children, href, ...props })=>/*#__PURE__*/ _jsx("a", {
|
|
286
|
+
className: "text-link-foreground no-underline hover:underline underline-offset-4",
|
|
287
|
+
href: href,
|
|
288
|
+
...props,
|
|
289
|
+
children: children
|
|
290
|
+
}),
|
|
291
|
+
table: ({ children })=>/*#__PURE__*/ _jsx("div", {
|
|
292
|
+
className: "my-6 overflow-x-auto",
|
|
293
|
+
tabIndex: 0,
|
|
294
|
+
role: "group",
|
|
295
|
+
"aria-label": "Atlas AI Chat Table",
|
|
296
|
+
children: /*#__PURE__*/ _jsx("table", {
|
|
297
|
+
className: "w-full",
|
|
298
|
+
children: children
|
|
299
|
+
})
|
|
300
|
+
}),
|
|
301
|
+
thead: ({ children })=>/*#__PURE__*/ _jsx("thead", {
|
|
302
|
+
children: children
|
|
303
|
+
}),
|
|
304
|
+
tbody: ({ children })=>/*#__PURE__*/ _jsx("tbody", {
|
|
305
|
+
children: children
|
|
306
|
+
}),
|
|
307
|
+
tr: ({ children })=>/*#__PURE__*/ _jsx("tr", {
|
|
308
|
+
className: "m-0 border-t p-0 even:bg-muted-background",
|
|
309
|
+
children: children
|
|
310
|
+
}),
|
|
311
|
+
th: ({ children })=>/*#__PURE__*/ _jsx("th", {
|
|
312
|
+
className: "border px-4 py-2 text-left font-bold",
|
|
313
|
+
children: children
|
|
314
|
+
}),
|
|
315
|
+
td: ({ children })=>/*#__PURE__*/ _jsx("td", {
|
|
316
|
+
className: "border px-4 py-2 text-left",
|
|
317
|
+
children: children
|
|
318
|
+
})
|
|
319
|
+
};
|
|
320
|
+
const MessageResponseMarkdown = ({ className, components, plugins, controls, ...props })=>/*#__PURE__*/ _jsx(Streamdown, {
|
|
321
|
+
className: cn('size-full', // Blockquote paragraph overrides
|
|
322
|
+
'[&_blockquote_p]:text-sm', '[&_blockquote_p]:tracking-tight', // Inline code
|
|
323
|
+
'[&_code]:relative', '[&_code]:rounded', '[&_code]:bg-muted-background', '[&_code]:px-[0.3rem]', '[&_code]:py-[0.2rem]', '[&_code]:font-mono', '[&_code]:text-sm', '[&_code]:font-semibold', // Code blocks (Streamdown container)
|
|
324
|
+
'[&_div[data-streamdown="code-block"]]:my-4', '[&_div[data-streamdown="code-block"]]:w-full', '[&_div[data-streamdown="code-block"]]:overflow-hidden', '[&_div[data-streamdown="code-block"]]:rounded-xl', '[&_div[data-streamdown="code-block"]]:border', '[&_div[data-streamdown="code-block"]]:border-default', // Code block header
|
|
325
|
+
'[&_div[data-streamdown="code-block-header"]]:flex', '[&_div[data-streamdown="code-block-header"]]:items-center', '[&_div[data-streamdown="code-block-header"]]:justify-between', '[&_div[data-streamdown="code-block-header"]]:bg-muted-background/80', '[&_div[data-streamdown="code-block-header"]]:px-4', '[&_div[data-streamdown="code-block-header"]]:py-3', '[&_div[data-streamdown="code-block-header"]]:text-xs', '[&_div[data-streamdown="code-block-header"]]:text-muted-foreground', // Pre element inside code block
|
|
326
|
+
'[&_div[data-streamdown="code-block"]_pre]:m-0', '[&_div[data-streamdown="code-block"]_pre]:overflow-x-auto', '[&_div[data-streamdown="code-block"]_pre]:border-t', '[&_div[data-streamdown="code-block"]_pre]:border-default', '[&_div[data-streamdown="code-block"]_pre]:bg-card-background!', '[&_div[data-streamdown="code-block"]_pre]:p-4', '[&_div[data-streamdown="code-block"]_pre]:text-sm', '[&_div[data-streamdown="code-block"]_pre]:text-medium-foreground!', // Code element inside pre
|
|
327
|
+
'[&_div[data-streamdown="code-block"]_pre_code]:static', '[&_div[data-streamdown="code-block"]_pre_code]:rounded-none', '[&_div[data-streamdown="code-block"]_pre_code]:bg-transparent', '[&_div[data-streamdown="code-block"]_pre_code]:p-0', '[&_div[data-streamdown="code-block"]_pre_code]:font-mono', '[&_div[data-streamdown="code-block"]_pre_code]:text-sm', '[&_div[data-streamdown="code-block"]_pre_code]:font-normal', // Code block buttons
|
|
328
|
+
'[&_button[data-streamdown="code-block-copy-button"]]:cursor-pointer', '[&_button[data-streamdown="code-block-copy-button"]]:p-1', '[&_button[data-streamdown="code-block-copy-button"]]:text-muted-foreground', '[&_button[data-streamdown="code-block-copy-button"]]:transition-all', '[&_button[data-streamdown="code-block-copy-button"]]:hover:text-base-foreground', '[&_button[data-streamdown="code-block-download-button"]]:cursor-pointer', '[&_button[data-streamdown="code-block-download-button"]]:p-1', '[&_button[data-streamdown="code-block-download-button"]]:text-muted-foreground', '[&_button[data-streamdown="code-block-download-button"]]:transition-all', '[&_button[data-streamdown="code-block-download-button"]]:hover:text-base-foreground', // Regular pre blocks (not in Streamdown code blocks)
|
|
329
|
+
'[&_pre:not([data-streamdown])]:my-3', '[&_pre:not([data-streamdown])]:mx-0', '[&_pre:not([data-streamdown])]:overflow-x-auto', '[&_pre:not([data-streamdown])]:rounded-md', '[&_pre:not([data-streamdown])]:border', '[&_pre:not([data-streamdown])]:bg-card-background', '[&_pre:not([data-streamdown])]:p-4', '[&_pre:not([data-streamdown])]:text-medium-foreground', '[&_pre:not([data-streamdown])]:text-sm', '[&_pre:not([data-streamdown])_code]:static', '[&_pre:not([data-streamdown])_code]:rounded-none', '[&_pre:not([data-streamdown])_code]:bg-transparent', '[&_pre:not([data-streamdown])_code]:px-0', '[&_pre:not([data-streamdown])_code]:py-0', '[&_pre:not([data-streamdown])_code]:font-mono', '[&_pre:not([data-streamdown])_code]:text-sm', '[&_pre:not([data-streamdown])_code]:font-normal', // Mermaid diagram blocks
|
|
330
|
+
'[&_div[data-streamdown="mermaid-block"]]:bg-card-background', '[&_div[data-streamdown="mermaid-block"]]:text-base-foreground', '[&_div[data-streamdown="mermaid-block"]]:flex', '[&_div[data-streamdown="mermaid-block"]]:flex-col', '[&_div[data-streamdown="mermaid-block"]]:rounded-lg', '[&_div[data-streamdown="mermaid-block"]]:hover:bg-base-background-hover', '[&_div[data-streamdown="mermaid-block"]]:border-0', // Positioning context for the action strip (see below)
|
|
331
|
+
'[&_div[data-streamdown="mermaid-block"]]:relative', // Nested scroll + sticky + pointer-events breaks hit-testing on Mermaid Copy/Download
|
|
332
|
+
// (same class of issue as github.com/vercel/streamdown/issues/494). Force absolute strip.
|
|
333
|
+
'[&_div[data-streamdown="mermaid-block"]>div:has([data-streamdown="mermaid-block-actions"])]:!absolute', '[&_div[data-streamdown="mermaid-block"]>div:has([data-streamdown="mermaid-block-actions"])]:!top-2', '[&_div[data-streamdown="mermaid-block"]>div:has([data-streamdown="mermaid-block-actions"])]:!right-2', '[&_div[data-streamdown="mermaid-block"]>div:has([data-streamdown="mermaid-block-actions"])]:!z-10', '[&_div[data-streamdown="mermaid-block"]>div:has([data-streamdown="mermaid-block-actions"])]:!mt-0', '[&_div[data-streamdown="mermaid-block"]>div:has([data-streamdown="mermaid-block-actions"])]:!pointer-events-auto', // Ensure mermaid container is tall enough for the toolbar (pan/zoom + actions)
|
|
334
|
+
'[&_div[data-streamdown="mermaid-block"]_.relative.w-full]:!min-h-28', // KaTeX sizing (overflow rules live in styles.source.css)
|
|
335
|
+
'[&_.katex-display]:my-3', '[&_.katex]:text-[1em]', // First and last child margin resets
|
|
336
|
+
'[&>*:first-child]:mt-0', '[&>*:last-child]:mb-0', className),
|
|
337
|
+
components: {
|
|
338
|
+
...messageResponseComponents,
|
|
339
|
+
...components
|
|
340
|
+
},
|
|
341
|
+
controls: controls ?? MESSAGE_RESPONSE_DEFAULT_STREAMDOWN_CONTROLS,
|
|
342
|
+
plugins: {
|
|
343
|
+
...plugins,
|
|
344
|
+
mermaid: mermaidPlugin
|
|
345
|
+
},
|
|
346
|
+
...props
|
|
347
|
+
});
|
|
348
|
+
const MessageResponse = ({ id, role, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'data-testid': dataTestId, ...props })=>/*#__PURE__*/ _jsx("div", {
|
|
349
|
+
"data-slot": "message-response",
|
|
350
|
+
id: id,
|
|
351
|
+
role: role,
|
|
352
|
+
"aria-label": ariaLabel,
|
|
353
|
+
"aria-labelledby": ariaLabelledBy,
|
|
354
|
+
"aria-describedby": ariaDescribedBy,
|
|
355
|
+
"data-testid": dataTestId,
|
|
356
|
+
children: /*#__PURE__*/ _jsx(MessageResponseMarkdown, {
|
|
357
|
+
...props
|
|
358
|
+
})
|
|
359
|
+
});
|
|
360
|
+
function MessageAttachment({ data, className, onRemove, ...props }) {
|
|
361
|
+
const filename = data.filename || '';
|
|
362
|
+
const mediaType = data.mediaType?.startsWith('image/') && data.url ? 'image' : 'file';
|
|
363
|
+
const isImage = mediaType === 'image';
|
|
364
|
+
const attachmentLabel = filename || (isImage ? 'Image' : 'Attachment');
|
|
365
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
366
|
+
"data-slot": "message-attachment",
|
|
367
|
+
className: cn('group relative size-24 overflow-hidden rounded-lg', className),
|
|
368
|
+
...props,
|
|
369
|
+
children: isImage ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
370
|
+
children: [
|
|
371
|
+
/*#__PURE__*/ _jsx("img", {
|
|
372
|
+
alt: filename || 'attachment',
|
|
373
|
+
className: "size-full object-cover",
|
|
374
|
+
height: 100,
|
|
375
|
+
src: data.url,
|
|
376
|
+
width: 100
|
|
377
|
+
}),
|
|
378
|
+
onRemove && /*#__PURE__*/ _jsxs(Button, {
|
|
379
|
+
"aria-label": "Remove attachment",
|
|
380
|
+
className: "absolute top-2 right-2 size-6 rounded-full bg-card-background/80 p-0 opacity-0 backdrop-blur-sm transition-opacity hover:bg-card-background group-hover:opacity-100 [&>svg]:size-3",
|
|
381
|
+
onClick: (e)=>{
|
|
382
|
+
e.stopPropagation();
|
|
383
|
+
onRemove();
|
|
384
|
+
},
|
|
385
|
+
type: "button",
|
|
386
|
+
variant: "ghost",
|
|
387
|
+
children: [
|
|
388
|
+
/*#__PURE__*/ _jsx(IconX, {}),
|
|
389
|
+
/*#__PURE__*/ _jsx("span", {
|
|
390
|
+
className: "sr-only",
|
|
391
|
+
children: "Remove"
|
|
392
|
+
})
|
|
393
|
+
]
|
|
394
|
+
})
|
|
395
|
+
]
|
|
396
|
+
}) : /*#__PURE__*/ _jsxs(_Fragment, {
|
|
397
|
+
children: [
|
|
398
|
+
/*#__PURE__*/ _jsxs(Tooltip, {
|
|
399
|
+
children: [
|
|
400
|
+
/*#__PURE__*/ _jsx(TooltipTrigger, {
|
|
401
|
+
render: /*#__PURE__*/ _jsx("div", {
|
|
402
|
+
className: "flex size-full shrink-0 items-center justify-center rounded-lg bg-muted-background text-muted-foreground",
|
|
403
|
+
children: /*#__PURE__*/ _jsx(IconPaperclip, {
|
|
404
|
+
className: "size-4"
|
|
405
|
+
})
|
|
406
|
+
})
|
|
407
|
+
}),
|
|
408
|
+
/*#__PURE__*/ _jsx(TooltipContent, {
|
|
409
|
+
children: /*#__PURE__*/ _jsx("p", {
|
|
410
|
+
children: attachmentLabel
|
|
411
|
+
})
|
|
412
|
+
})
|
|
413
|
+
]
|
|
414
|
+
}),
|
|
415
|
+
onRemove && /*#__PURE__*/ _jsxs(Button, {
|
|
416
|
+
"aria-label": "Remove attachment",
|
|
417
|
+
className: "size-6 shrink-0 rounded-full p-0 opacity-0 transition-opacity hover:bg-base-background-hover group-hover:opacity-100 [&>svg]:size-3",
|
|
418
|
+
onClick: (e)=>{
|
|
419
|
+
e.stopPropagation();
|
|
420
|
+
onRemove();
|
|
421
|
+
},
|
|
422
|
+
type: "button",
|
|
423
|
+
variant: "ghost",
|
|
424
|
+
children: [
|
|
425
|
+
/*#__PURE__*/ _jsx(IconX, {}),
|
|
426
|
+
/*#__PURE__*/ _jsx("span", {
|
|
427
|
+
className: "sr-only",
|
|
428
|
+
children: "Remove"
|
|
429
|
+
})
|
|
430
|
+
]
|
|
431
|
+
})
|
|
432
|
+
]
|
|
433
|
+
})
|
|
434
|
+
});
|
|
302
435
|
}
|
|
303
|
-
function
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
436
|
+
function MessageAttachments({ children, className, ...props }) {
|
|
437
|
+
if (!children) {
|
|
438
|
+
return null;
|
|
439
|
+
}
|
|
440
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
441
|
+
"data-slot": "message-attachments",
|
|
442
|
+
className: cn('ml-auto flex w-fit flex-wrap items-start gap-2', className),
|
|
443
|
+
...props,
|
|
444
|
+
children: children
|
|
445
|
+
});
|
|
310
446
|
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
});
|
|
317
|
-
|
|
318
|
-
|
|
447
|
+
const MessageToolbar = ({ className, children, ...props })=>/*#__PURE__*/ _jsx("div", {
|
|
448
|
+
"data-slot": "message-toolbar",
|
|
449
|
+
className: cn('mt-4 flex w-full items-center justify-between gap-4', className),
|
|
450
|
+
...props,
|
|
451
|
+
children: children
|
|
452
|
+
});
|
|
453
|
+
export { Message, MessageAction, MessageActions, MessageAttachment, MessageAttachments, MessageAvatar, MessageAvatarIcon, MessageBranch, MessageBranchContent, MessageBranchNext, MessageBranchPage, MessageBranchPrevious, MessageBranchSelector, MessageContent, MessageResponse, MessageToolbar };
|
|
454
|
+
|
|
455
|
+
//# sourceMappingURL=message.js.map
|