@keboola/design 15.1.0 → 16.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/AGENTS.md +6 -5
- package/CHANGELOG.md +69 -0
- package/COMPONENT-API.md +62 -61
- package/dist/{AIKit-BR6jfsdI.js → AIKit-Cf5plya2.js} +328 -210
- package/dist/AIKit-Cf5plya2.js.map +1 -0
- package/dist/{Alert-Chz6KZ7e.js → Alert-DziS8n1H.js} +12 -19
- package/dist/{Alert-Chz6KZ7e.js.map → Alert-DziS8n1H.js.map} +1 -1
- package/dist/{AlertModal-DMsn62JJ.js → AlertModal-De04fFoy.js} +14 -24
- package/dist/{AlertModal-DMsn62JJ.js.map → AlertModal-De04fFoy.js.map} +1 -1
- package/dist/{AppShell-C8V1KRr_.js → AppShell-BUa3U7-e.js} +6 -9
- package/dist/{AppShell-C8V1KRr_.js.map → AppShell-BUa3U7-e.js.map} +1 -1
- package/dist/{AutoSaveTextarea-BbMhC5Aq.js → AutoSaveTextarea-CXHOQSun.js} +4 -5
- package/dist/{AutoSaveTextarea-BbMhC5Aq.js.map → AutoSaveTextarea-CXHOQSun.js.map} +1 -1
- package/dist/{Badge-CqlOE5A2.js → Badge-CFRhducL.js} +9 -14
- package/dist/{Badge-CqlOE5A2.js.map → Badge-CFRhducL.js.map} +1 -1
- package/dist/{BrandEditor-D61pzWRq.js → BrandEditor-hiLBX7az.js} +16 -23
- package/dist/{BrandEditor-D61pzWRq.js.map → BrandEditor-hiLBX7az.js.map} +1 -1
- package/dist/{BrandLogo-DkESE19K.js → BrandLogo-Dn7hhp2c.js} +4 -5
- package/dist/{BrandLogo-DkESE19K.js.map → BrandLogo-Dn7hhp2c.js.map} +1 -1
- package/dist/{Breadcrumb-DbqvDnYl.js → Breadcrumb-uGFEIjFF.js} +17 -28
- package/dist/{Breadcrumb-DbqvDnYl.js.map → Breadcrumb-uGFEIjFF.js.map} +1 -1
- package/dist/{Button-BNkyYU8u.js → Button-DbvGzEDb.js} +24 -20
- package/dist/Button-DbvGzEDb.js.map +1 -0
- package/dist/{Calendar-BnKi1kPu.js → Calendar-lJBTETbk.js} +752 -905
- package/dist/Calendar-lJBTETbk.js.map +1 -0
- package/dist/{Card-DxjGiqH8.js → Card-VIPfOVW5.js} +8 -14
- package/dist/{Card-DxjGiqH8.js.map → Card-VIPfOVW5.js.map} +1 -1
- package/dist/{Checkbox-CHDDJyAA.js → Checkbox-B2jLlyaO.js} +6 -8
- package/dist/{Checkbox-CHDDJyAA.js.map → Checkbox-B2jLlyaO.js.map} +1 -1
- package/dist/{Clipboard-DlwVZS1P.js → Clipboard-fAkDdpEu.js} +4 -5
- package/dist/{Clipboard-DlwVZS1P.js.map → Clipboard-fAkDdpEu.js.map} +1 -1
- package/dist/{ClipboardButton-B1Hr_n_Z.js → ClipboardButton-71Ugbl8c.js} +6 -8
- package/dist/{ClipboardButton-B1Hr_n_Z.js.map → ClipboardButton-71Ugbl8c.js.map} +1 -1
- package/dist/{CodeEditor-DVSPdfdo.js → CodeEditor-D_b-ZCng.js} +19 -31
- package/dist/{CodeEditor-DVSPdfdo.js.map → CodeEditor-D_b-ZCng.js.map} +1 -1
- package/dist/{Collapsible-DD4xTL75.js → Collapsible-zsXk4Vpp.js} +5 -8
- package/dist/{Collapsible-DD4xTL75.js.map → Collapsible-zsXk4Vpp.js.map} +1 -1
- package/dist/{ColorInput-B_eZIu39.js → ColorInput-Cjr1jkvy.js} +9 -12
- package/dist/{ColorInput-B_eZIu39.js.map → ColorInput-Cjr1jkvy.js.map} +1 -1
- package/dist/{ColorModeSwitch-BlrH8jAi.js → ColorModeSwitch-CuPYnJ2V.js} +5 -6
- package/dist/{ColorModeSwitch-BlrH8jAi.js.map → ColorModeSwitch-CuPYnJ2V.js.map} +1 -1
- package/dist/{Combobox-BLqX-Tdh.js → Combobox-DYjvYgl3.js} +37 -66
- package/dist/{Combobox-BLqX-Tdh.js.map → Combobox-DYjvYgl3.js.map} +1 -1
- package/dist/{Command-DhXmqFLT.js → Command-BcTb6GsR.js} +14 -24
- package/dist/{Command-DhXmqFLT.js.map → Command-BcTb6GsR.js.map} +1 -1
- package/dist/{CopyField-D0Pg4Z0R.js → CopyField-CnwAvQz9.js} +16 -28
- package/dist/{CopyField-D0Pg4Z0R.js.map → CopyField-CnwAvQz9.js.map} +1 -1
- package/dist/{DateInput-duinbI9_.js → DateInput-DJNX7Vdx.js} +8 -10
- package/dist/{DateInput-duinbI9_.js.map → DateInput-DJNX7Vdx.js.map} +1 -1
- package/dist/{DatePicker-Cg_aG_N4.js → DatePicker-CI59gF3S.js} +4 -5
- package/dist/{DatePicker-Cg_aG_N4.js.map → DatePicker-CI59gF3S.js.map} +1 -1
- package/dist/{DateRangeInput-BYVHf9zo.js → DateRangeInput-B3g8cyS0.js} +8 -10
- package/dist/{DateRangeInput-BYVHf9zo.js.map → DateRangeInput-B3g8cyS0.js.map} +1 -1
- package/dist/{DateRangePicker-m47cSV1r.js → DateRangePicker-48yOB2qV.js} +9 -10
- package/dist/{DateRangePicker-m47cSV1r.js.map → DateRangePicker-48yOB2qV.js.map} +1 -1
- package/dist/{DiffView-Dy4z-n-1.js → DiffView-DITZdVbh.js} +7 -12
- package/dist/{DiffView-Dy4z-n-1.js.map → DiffView-DITZdVbh.js.map} +1 -1
- package/dist/{DropdownMenu-Bum99mVf.js → DropdownMenu-Ba9atqDa.js} +20 -36
- package/dist/{DropdownMenu-Bum99mVf.js.map → DropdownMenu-Ba9atqDa.js.map} +1 -1
- package/dist/{FieldBox-BrxLkY9C.js → FieldBox-DdSdJ3ZN.js} +6 -10
- package/dist/{FieldBox-BrxLkY9C.js.map → FieldBox-DdSdJ3ZN.js.map} +1 -1
- package/dist/{FieldItem-BHUqgSO1.js → FieldItem-D7eCMfMB.js} +6 -8
- package/dist/{FieldItem-BHUqgSO1.js.map → FieldItem-D7eCMfMB.js.map} +1 -1
- package/dist/{FieldItem-CPN1xjN5.d.ts → FieldItem-fqm3CNR8.d.ts} +7 -6
- package/dist/{FileUpload-BYFONpEl.js → FileUpload-DskvxhAr.js} +25 -45
- package/dist/{FileUpload-BYFONpEl.js.map → FileUpload-DskvxhAr.js.map} +1 -1
- package/dist/{Form-Dqbt_tIs.js → Form-BUNW7nlt.js} +24 -38
- package/dist/{Form-Dqbt_tIs.js.map → Form-BUNW7nlt.js.map} +1 -1
- package/dist/{FormGroup-V5kIgQRN.js → FormGroup-QJB21LKp.js} +12 -20
- package/dist/{FormGroup-V5kIgQRN.js.map → FormGroup-QJB21LKp.js.map} +1 -1
- package/dist/{FullScreenModal-DAvvlGOz.js → FullScreenModal-RzY5XxiG.js} +8 -12
- package/dist/{FullScreenModal-DAvvlGOz.js.map → FullScreenModal-RzY5XxiG.js.map} +1 -1
- package/dist/{HoverCard-Cf9iYyaW.js → HoverCard-OGWKRXJ7.js} +4 -6
- package/dist/{HoverCard-Cf9iYyaW.js.map → HoverCard-OGWKRXJ7.js.map} +1 -1
- package/dist/{InlineEdit-D4P0SvCB.js → InlineEdit-CXL0ZslO.js} +7 -8
- package/dist/{InlineEdit-D4P0SvCB.js.map → InlineEdit-CXL0ZslO.js.map} +1 -1
- package/dist/{InputGroup-CZv_7QlM.js → InputGroup-BWeanEo7.js} +9 -15
- package/dist/{InputGroup-CZv_7QlM.js.map → InputGroup-BWeanEo7.js.map} +1 -1
- package/dist/{Kbd-CflKthfu.js → Kbd-BprYCICe.js} +8 -13
- package/dist/{Kbd-CflKthfu.js.map → Kbd-BprYCICe.js.map} +1 -1
- package/dist/{MarkedText-DlmlJO0u.js → MarkedText-BrganZ_V.js} +4 -6
- package/dist/{MarkedText-DlmlJO0u.js.map → MarkedText-BrganZ_V.js.map} +1 -1
- package/dist/{MermaidDiagram-2-EuNu1i.js → MermaidDiagram-E3azndPk.js} +9 -11
- package/dist/{MermaidDiagram-2-EuNu1i.js.map → MermaidDiagram-E3azndPk.js.map} +1 -1
- package/dist/{Modal-DwuvuiUx.js → Modal-Cf_kPEBW.js} +13 -21
- package/dist/{Modal-DwuvuiUx.js.map → Modal-Cf_kPEBW.js.map} +1 -1
- package/dist/{ModalTitle-RGWwIMU6.js → ModalTitle-7vgpfc6B.js} +5 -8
- package/dist/{ModalTitle-RGWwIMU6.js.map → ModalTitle-7vgpfc6B.js.map} +1 -1
- package/dist/{MultiActionButtonGroup-Dzig87s1.js → MultiActionButtonGroup-8WQwL4UQ.js} +6 -8
- package/dist/{MultiActionButtonGroup-Dzig87s1.js.map → MultiActionButtonGroup-8WQwL4UQ.js.map} +1 -1
- package/dist/{Navbar-DHUS7XiU.js → Navbar-CRjxVboE.js} +13 -22
- package/dist/{Navbar-DHUS7XiU.js.map → Navbar-CRjxVboE.js.map} +1 -1
- package/dist/{OtpInput-CY8yCaJk.js → OtpInput-C5plPzGU.js} +7 -11
- package/dist/{OtpInput-CY8yCaJk.js.map → OtpInput-C5plPzGU.js.map} +1 -1
- package/dist/{PageHeader-CL1A6jFM.js → PageHeader-DosMyar2.js} +6 -10
- package/dist/{PageHeader-CL1A6jFM.js.map → PageHeader-DosMyar2.js.map} +1 -1
- package/dist/{PageLayout-C9aXTpqV.js → PageLayout-LcvJccOW.js} +5 -8
- package/dist/{PageLayout-C9aXTpqV.js.map → PageLayout-LcvJccOW.js.map} +1 -1
- package/dist/{PageToolbar-LKP6PiP_.js → PageToolbar-By2HznxO.js} +8 -10
- package/dist/{PageToolbar-LKP6PiP_.js.map → PageToolbar-By2HznxO.js.map} +1 -1
- package/dist/{Pagination-D27x5KmH.js → Pagination-DrXTrvfD.js} +11 -18
- package/dist/{Pagination-D27x5KmH.js.map → Pagination-DrXTrvfD.js.map} +1 -1
- package/dist/{Popconfirm-p72DiagN.js → Popconfirm-BJuDOHdv.js} +46 -25
- package/dist/Popconfirm-BJuDOHdv.js.map +1 -0
- package/dist/{Popover-DnBw5Uay.js → Popover-DhOPlWgF.js} +4 -6
- package/dist/{Popover-DnBw5Uay.js.map → Popover-DhOPlWgF.js.map} +1 -1
- package/dist/{RadioGroup-B0TwHjBb.js → RadioGroup-B9oC8P15.js} +12 -18
- package/dist/{RadioGroup-B0TwHjBb.js.map → RadioGroup-B9oC8P15.js.map} +1 -1
- package/dist/{Resizable-D8zs0kcq.js → Resizable-Co-L3qg7.js} +4 -6
- package/dist/{Resizable-D8zs0kcq.js.map → Resizable-Co-L3qg7.js.map} +1 -1
- package/dist/{Search-vyZwGKMU.js → Search-OgaNjqQM.js} +26 -21
- package/dist/Search-OgaNjqQM.js.map +1 -0
- package/dist/{SearchInput-DyYXyw3u.js → SearchInput-eLS-uvOn.js} +18 -29
- package/dist/SearchInput-eLS-uvOn.js.map +1 -0
- package/dist/{SectionNav-6hcIpZLO.js → SectionNav-L81iJBo3.js} +11 -14
- package/dist/{SectionNav-6hcIpZLO.js.map → SectionNav-L81iJBo3.js.map} +1 -1
- package/dist/{Select-C6zKeip5.js → Select-DRdkdzBp.js} +28 -25
- package/dist/{Select-C6zKeip5.js.map → Select-DRdkdzBp.js.map} +1 -1
- package/dist/{Sheet-DKG20J7W.js → Sheet-DVb4XoJ5.js} +12 -19
- package/dist/{Sheet-DKG20J7W.js.map → Sheet-DVb4XoJ5.js.map} +1 -1
- package/dist/{Sidebar-BlYqasnX.js → Sidebar-DYvodJWN.js} +43 -75
- package/dist/{Sidebar-BlYqasnX.js.map → Sidebar-DYvodJWN.js.map} +1 -1
- package/dist/{Slider-DrcsM8_G.js → Slider-B9IskDxf.js} +8 -12
- package/dist/{Slider-DrcsM8_G.js.map → Slider-B9IskDxf.js.map} +1 -1
- package/dist/{Stepper-CQrUPVFL.js → Stepper-D7VspVEt.js} +11 -19
- package/dist/{Stepper-CQrUPVFL.js.map → Stepper-D7VspVEt.js.map} +1 -1
- package/dist/{Switch-DccpSpzC.js → Switch-DONWW7ju.js} +4 -6
- package/dist/{Switch-DccpSpzC.js.map → Switch-DONWW7ju.js.map} +1 -1
- package/dist/{Table-CilEvpMq.js → Table-BwgBm3hJ.js} +12 -21
- package/dist/{Table-CilEvpMq.js.map → Table-BwgBm3hJ.js.map} +1 -1
- package/dist/{Tabs-Ck4uWf8U.js → Tabs-DmJB4l_N.js} +9 -14
- package/dist/{Tabs-Ck4uWf8U.js.map → Tabs-DmJB4l_N.js.map} +1 -1
- package/dist/{TextInput-CR0_USaY.js → TextInput--1CfZybC.js} +8 -10
- package/dist/TextInput--1CfZybC.js.map +1 -0
- package/dist/{ThemeProvider-BTK7AL-T.js → ThemeProvider-BCHllN7d.js} +8 -13
- package/dist/{ThemeProvider-BTK7AL-T.js.map → ThemeProvider-BCHllN7d.js.map} +1 -1
- package/dist/{TimePicker-lk3NGqeK.js → TimePicker-CCV3SOw5.js} +4 -6
- package/dist/{TimePicker-lk3NGqeK.js.map → TimePicker-CCV3SOw5.js.map} +1 -1
- package/dist/{Timeline-DUXgByUE.js → Timeline-EMOpTLAT.js} +8 -13
- package/dist/{Timeline-DUXgByUE.js.map → Timeline-EMOpTLAT.js.map} +1 -1
- package/dist/{Toast-937n7n8i.js → Toast-BOTINeTX.js} +4 -6
- package/dist/{Toast-937n7n8i.js.map → Toast-BOTINeTX.js.map} +1 -1
- package/dist/{ToggleAllTooltip-DEjbWFoj.js → ToggleAllTooltip-BFmA6TXf.js} +4 -6
- package/dist/{ToggleAllTooltip-DEjbWFoj.js.map → ToggleAllTooltip-BFmA6TXf.js.map} +1 -1
- package/dist/{ToggleGroup-BOz1yyz6.js → ToggleGroup-DsDS7k70.js} +3 -4
- package/dist/{ToggleGroup-BOz1yyz6.js.map → ToggleGroup-DsDS7k70.js.map} +1 -1
- package/dist/{Workbench-CxgNCs3I.js → Workbench-4s0xP6XU.js} +18 -32
- package/dist/{Workbench-CxgNCs3I.js.map → Workbench-4s0xP6XU.js.map} +1 -1
- package/dist/{ZoomableSvg-CxXKanUR.js → ZoomableSvg-BRPGgaWJ.js} +8 -10
- package/dist/{ZoomableSvg-CxXKanUR.js.map → ZoomableSvg-BRPGgaWJ.js.map} +1 -1
- package/dist/charts.d.ts +0 -16
- package/dist/charts.js +10 -19
- package/dist/charts.js.map +1 -1
- package/dist/{classNames-DcGnTh2N.js → classNames-DkX30VJU.js} +2 -3
- package/dist/{classNames-DcGnTh2N.js.map → classNames-DkX30VJU.js.map} +1 -1
- package/dist/editors.d.ts +2 -16
- package/dist/editors.js +16 -26
- package/dist/editors.js.map +1 -1
- package/dist/{findLiteralMatches-DgGLzyG0.js → findLiteralMatches-BaLZTPtx.js} +2 -3
- package/dist/{findLiteralMatches-DgGLzyG0.js.map → findLiteralMatches-BaLZTPtx.js.map} +1 -1
- package/dist/flint.d.ts +0 -2
- package/dist/flint.js +10 -14
- package/dist/flint.js.map +1 -1
- package/dist/{highlightCode-D354tCXO.js → highlightCode-2spZP7ZA.js} +2 -3
- package/dist/{highlightCode-D354tCXO.js.map → highlightCode-2spZP7ZA.js.map} +1 -1
- package/dist/{icons-ZIeZXXS7.js → icons-DDR9dFSr.js} +21 -40
- package/dist/{icons-ZIeZXXS7.js.map → icons-DDR9dFSr.js.map} +1 -1
- package/dist/icons.d.ts +1 -1
- package/dist/icons.js +1 -2
- package/dist/{index-D-itZ3VP.d.ts → index-BljYaTWL.d.ts} +1 -39
- package/dist/index.d.ts +418 -1296
- package/dist/index.js +75 -74
- package/dist/internal/blocks/AIKit.js +1 -2
- package/dist/internal/blocks/AppShell.js +1 -2
- package/dist/internal/blocks/AuthLayout.js +3 -4
- package/dist/internal/blocks/AutoSaveTextarea.js +1 -2
- package/dist/internal/blocks/BrandEditor.js +1 -2
- package/dist/internal/blocks/ChartPanel.js +3 -4
- package/dist/internal/blocks/ChipEditor.js +6 -7
- package/dist/internal/blocks/ClipboardButton.js +1 -2
- package/dist/internal/blocks/ColorInput.js +1 -2
- package/dist/internal/blocks/ColorModeSwitch.js +1 -2
- package/dist/internal/blocks/Command.js +1 -2
- package/dist/internal/blocks/CopyField.js +1 -2
- package/dist/internal/blocks/DashboardHero.js +2 -3
- package/dist/internal/blocks/DateInput.js +1 -2
- package/dist/internal/blocks/DateRangeInput.js +1 -2
- package/dist/internal/blocks/DiagramShared/DiagramSkeleton.js +1 -2
- package/dist/internal/blocks/EmptyConfigurationActionCard.js +2 -3
- package/dist/internal/blocks/EmptyState.js +1 -2
- package/dist/internal/blocks/ErrorState.js +1 -2
- package/dist/internal/blocks/ExportMenu.js +5 -6
- package/dist/internal/blocks/FacebookButton.js +3 -4
- package/dist/internal/blocks/Form/connectors/ComboboxField.js +3 -4
- package/dist/internal/blocks/Form/connectors/MultiComboboxField.js +2 -3
- package/dist/internal/blocks/Form.js +3 -2
- package/dist/internal/blocks/FormGroup.js +1 -2
- package/dist/internal/blocks/GoogleButton.js +3 -4
- package/dist/internal/blocks/InlineEdit.js +1 -2
- package/dist/internal/blocks/MicrosoftButton.js +3 -4
- package/dist/internal/blocks/MultiActionButtonGroup.js +1 -2
- package/dist/internal/blocks/MultiCombobox.js +7 -8
- package/dist/internal/blocks/NumberInput.js +2 -3
- package/dist/internal/blocks/OtpInput.js +1 -2
- package/dist/internal/blocks/PageHeader.js +1 -2
- package/dist/internal/blocks/PageLayout.js +1 -2
- package/dist/internal/blocks/PageToolbar.js +1 -2
- package/dist/internal/blocks/PasswordInput.js +5 -6
- package/dist/internal/blocks/SearchInput.js +1 -2
- package/dist/internal/blocks/SearchInputWithNavigation.js +6 -7
- package/dist/internal/blocks/SectionNav.js +1 -2
- package/dist/internal/blocks/SplitButton.js +4 -5
- package/dist/internal/blocks/StatCard.js +4 -6
- package/dist/internal/blocks/StatCard.js.map +1 -1
- package/dist/internal/blocks/TextInput.js +1 -2
- package/dist/internal/blocks/Textarea.js +3 -4
- package/dist/internal/blocks/TimeInput.js +6 -7
- package/dist/internal/components/Alert.js +1 -2
- package/dist/internal/components/AlertModal.js +1 -2
- package/dist/internal/components/Avatar.js +3 -4
- package/dist/internal/components/Badge.js +1 -2
- package/dist/internal/components/BrandLogo.js +1 -2
- package/dist/internal/components/Breadcrumb.js +1 -2
- package/dist/internal/components/Button.js +1 -2
- package/dist/internal/components/ButtonGroup.js +2 -3
- package/dist/internal/components/Calendar.js +1 -2
- package/dist/internal/components/Card.js +1 -2
- package/dist/internal/components/Checkbox.js +1 -2
- package/dist/internal/components/Clipboard.js +1 -2
- package/dist/internal/components/Collapsible.js +1 -2
- package/dist/internal/components/CollapsiblePanel.js +5 -6
- package/dist/internal/components/Combobox.js +1 -2
- package/dist/internal/components/DatePicker.js +1 -2
- package/dist/internal/components/DateRangePicker.js +1 -2
- package/dist/internal/components/DiffView.js +1 -2
- package/dist/internal/components/DotsLoader.js +2 -3
- package/dist/internal/components/DropdownMenu.js +1 -2
- package/dist/internal/components/EmptySearchContent.js +1 -2
- package/dist/internal/components/FileUpload.js +1 -2
- package/dist/internal/components/FullScreenModal.js +1 -2
- package/dist/internal/components/HelpBlock.js +1 -2
- package/dist/internal/components/HoverCard.js +1 -2
- package/dist/internal/components/InputGroup.js +1 -2
- package/dist/internal/components/Kbd.js +1 -2
- package/dist/internal/components/Label.js +2 -3
- package/dist/internal/components/Link.js +2 -3
- package/dist/internal/components/MarkedText.js +1 -2
- package/dist/internal/components/MergeEditor/ConflictStatus/ConflictStatusIndicator.js +3 -4
- package/dist/internal/components/MergeEditor/PaneHeader.js +1 -2
- package/dist/internal/components/MergeEditor/constants.js +1 -2
- package/dist/internal/components/MergeEditor/useMergeDiff.js +1 -2
- package/dist/internal/components/Modal.js +1 -2
- package/dist/internal/components/Navbar.js +1 -2
- package/dist/internal/components/Pagination.js +1 -2
- package/dist/internal/components/PanelWithDetails.js +4 -5
- package/dist/internal/components/Popconfirm.js +1 -2
- package/dist/internal/components/Popover.js +1 -2
- package/dist/internal/components/Progress.js +2 -3
- package/dist/internal/components/RadioGroup.js +1 -2
- package/dist/internal/components/Resizable.js +1 -2
- package/dist/internal/components/ScrollArea.js +3 -5
- package/dist/internal/components/ScrollArea.js.map +1 -1
- package/dist/internal/components/Search.js +1 -2
- package/dist/internal/components/Select.js +1 -2
- package/dist/internal/components/Separator.js +2 -3
- package/dist/internal/components/Sheet.js +1 -2
- package/dist/internal/components/Sidebar.js +1 -2
- package/dist/internal/components/Skeleton/Skeleton.js +2 -3
- package/dist/internal/components/Skeleton/SkeletonList.js +2 -3
- package/dist/internal/components/Slider.js +1 -2
- package/dist/internal/components/SpotlightBackdrop.js +3 -5
- package/dist/internal/components/SpotlightBackdrop.js.map +1 -1
- package/dist/internal/components/Stepper.js +1 -2
- package/dist/internal/components/Switch.js +1 -2
- package/dist/internal/components/Table.js +1 -2
- package/dist/internal/components/Tabs.js +1 -2
- package/dist/internal/components/ThemeProvider.js +2 -2
- package/dist/internal/components/TimePicker.js +1 -2
- package/dist/internal/components/Timeline.js +1 -2
- package/dist/internal/components/Toast.js +2 -2
- package/dist/internal/components/Toggle.js +2 -3
- package/dist/internal/components/ToggleGroup.js +1 -2
- package/dist/internal/components/Tooltip.js +1 -2
- package/dist/internal/components/Truncated.js +3 -4
- package/dist/internal/components/Workbench.js +1 -2
- package/dist/internal/components/ZoomableSvg.js +1 -2
- package/dist/internal/hooks/useAltDigitHotkey.js +1 -2
- package/dist/internal/hooks/useAutosizeInput.js +1 -2
- package/dist/internal/hooks/useScrollbarPosition.js +2 -3
- package/dist/internal/hooks/useStableCallback.js +1 -2
- package/dist/internal/hooks/useTimeout.js +1 -2
- package/dist/internal/utils/accessibleName.js +1 -2
- package/dist/internal/utils/mergeRefs.js +1 -2
- package/dist/internal/utils.js +3 -3
- package/dist/markdown-editor.d.ts +0 -4
- package/dist/markdown-editor.js +30 -49
- package/dist/markdown-editor.js.map +1 -1
- package/dist/mermaid.d.ts +0 -2
- package/dist/mermaid.js +1 -2
- package/dist/rjsf.d.ts +0 -8
- package/dist/rjsf.js +47 -78
- package/dist/rjsf.js.map +1 -1
- package/dist/{rolldown-runtime-Bdc48AWt.js → rolldown-runtime-BrwM56v-.js} +2 -3
- package/dist/{styles-T8xwr0sR.js → styles-BXXXosW_.js} +2 -3
- package/dist/{styles-T8xwr0sR.js.map → styles-BXXXosW_.js.map} +1 -1
- package/dist/{styles-DxazJ8Mz.js → styles-nwtCRF7y.js} +2 -3
- package/dist/{styles-DxazJ8Mz.js.map → styles-nwtCRF7y.js.map} +1 -1
- package/dist/styles.css +1 -1
- package/dist/{svgCache-Dhmbe-7i.js → svgCache-BzvN_fgr.js} +2 -3
- package/dist/{svgCache-Dhmbe-7i.js.map → svgCache-BzvN_fgr.js.map} +1 -1
- package/dist/{svgTransforms-Hnvev3Vs.js → svgTransforms-BBxxO9T6.js} +4 -6
- package/dist/{svgTransforms-Hnvev3Vs.js.map → svgTransforms-BBxxO9T6.js.map} +1 -1
- package/dist/testing.d.ts +0 -2
- package/dist/testing.js +2 -3
- package/dist/{themeScopeContext-CEVXbYvZ.js → themeScopeContext-BZGPdyG8.js} +6 -11
- package/dist/{themeScopeContext-CEVXbYvZ.js.map → themeScopeContext-BZGPdyG8.js.map} +1 -1
- package/dist/{themeTokens-DCeb62ap.js → themeTokens-B60cQtAY.js} +4 -6
- package/dist/{themeTokens-DCeb62ap.js.map → themeTokens-B60cQtAY.js.map} +1 -1
- package/dist/{toast-Y3cTMBW8.js → toast-Dzj1EFOb.js} +10 -17
- package/dist/{toast-Y3cTMBW8.js.map → toast-Dzj1EFOb.js.map} +1 -1
- package/dist/{types-BPcAjMG0.d.ts → types-CsZuwfxc.d.ts} +1 -3
- package/dist/{useControllableState-CUYXMsfz.js → useControllableState-BCvUOC6G.js} +2 -3
- package/dist/{useControllableState-CUYXMsfz.js.map → useControllableState-BCvUOC6G.js.map} +1 -1
- package/dist/{useElement-D-RjrGa4.js → useElement-Dcoo9Jlr.js} +2 -3
- package/dist/{useElement-D-RjrGa4.js.map → useElement-Dcoo9Jlr.js.map} +1 -1
- package/dist/{useMergeDiff-CvowEXJ1.js → useMergeDiff-DFIATaTw.js} +3 -5
- package/dist/{useMergeDiff-CvowEXJ1.js.map → useMergeDiff-DFIATaTw.js.map} +1 -1
- package/dist/{utils-DwC9u0tM.js → utils-DjFceY3H.js} +18 -34
- package/dist/{utils-DwC9u0tM.js.map → utils-DjFceY3H.js.map} +1 -1
- package/dist/vega.d.ts +1 -5
- package/dist/vega.js +3 -4
- package/dist/{vegaTheme-ISwGXvof.js → vegaTheme-BcTNRmVS.js} +3 -4
- package/dist/{vegaTheme-ISwGXvof.js.map → vegaTheme-BcTNRmVS.js.map} +1 -1
- package/dist/{vegaTokens-DCkvpIVE.js → vegaTokens-DnCcy7JY.js} +3 -4
- package/dist/{vegaTokens-DCkvpIVE.js.map → vegaTokens-DnCcy7JY.js.map} +1 -1
- package/package.json +40 -40
- package/src/styles.css +70 -4
- package/src/theme.css +113 -11
- package/dist/AIKit-BR6jfsdI.js.map +0 -1
- package/dist/Button-BNkyYU8u.js.map +0 -1
- package/dist/Calendar-BnKi1kPu.js.map +0 -1
- package/dist/Popconfirm-p72DiagN.js.map +0 -1
- package/dist/Search-vyZwGKMU.js.map +0 -1
- package/dist/SearchInput-DyYXyw3u.js.map +0 -1
- package/dist/TextInput-CR0_USaY.js.map +0 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { cn } from "./classNames-
|
|
2
|
-
import { Tooltip, TooltipProvider, isMac } from "./utils-
|
|
3
|
-
import { AlertCircle, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, Ban, BarChart3, Bell, BookOpen, Bookmark, Box, Bug, Calendar, ChartBar, ChartPie, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Circle, CircleAlert, CircleCheck, CircleHelp, CirclePause, CirclePlay, CirclePlus, CircleStop, CircleX, Clock, Cloud, Cog, Copy, Database, Download, Ellipsis, ExternalLink, Eye, File, FilePen, FileText, Filter, Flag, Folder, Gauge, GitBranch, GitMerge, GitPullRequest, Globe, Hand, HardDrive, History, Hourglass, Info, Key, Layers, Lightbulb, LineChart, Link, List, ListChecks, Loader2, LoaderCircle, Lock, Mail, Maximize2, Minimize2, Minus, Package, Pause, Pencil, Pin, Play, Plus, Quote, RefreshCw, Rocket, RotateCcw, RotateCw, Save, Search, Send, Server, Settings, Shield, Sparkles, Star, Table, ThumbsDown, ThumbsUp, Trash2, TrendingDown, TrendingUp, TriangleAlert, Upload, User, Users, WandSparkles, Warehouse, Workflow, Wrench, X, XCircle, Zap } from "./icons-
|
|
4
|
-
import { Button } from "./Button-
|
|
1
|
+
import { cn } from "./classNames-DkX30VJU.js";
|
|
2
|
+
import { Tooltip, TooltipProvider, isMac } from "./utils-DjFceY3H.js";
|
|
3
|
+
import { AlertCircle, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, Ban, BarChart3, Bell, BookOpen, Bookmark, Box, Bug, Calendar, ChartBar, ChartPie, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Circle, CircleAlert, CircleCheck, CircleHelp, CirclePause, CirclePlay, CirclePlus, CircleStop, CircleX, Clock, Cloud, Cog, Copy, Database, Download, Ellipsis, ExternalLink, Eye, File, FilePen, FileText, Filter, Flag, Folder, Gauge, GitBranch, GitMerge, GitPullRequest, Globe, Hand, HardDrive, History, Hourglass, Info, Key, Layers, Lightbulb, LineChart, Link, List, ListChecks, Loader2, LoaderCircle, Lock, Mail, Maximize2, Minimize2, Minus, Package, Pause, Pencil, Pin, Play, Plus, Quote, RefreshCw, Rocket, RotateCcw, RotateCw, Save, Search, Send, Server, Settings, Shield, Sparkles, Star, Table, ThumbsDown, ThumbsUp, Trash2, TrendingDown, TrendingUp, TriangleAlert, Upload, User, Users, WandSparkles, Warehouse, Workflow, Wrench, X, XCircle, Zap } from "./icons-DDR9dFSr.js";
|
|
4
|
+
import { Button } from "./Button-DbvGzEDb.js";
|
|
5
5
|
import { ButtonGroup } from "./internal/components/ButtonGroup.js";
|
|
6
|
-
import { ClipboardButton } from "./ClipboardButton-
|
|
7
|
-
import { FullScreenModal, FullScreenModalBody, FullScreenModalHeader } from "./FullScreenModal-
|
|
6
|
+
import { ClipboardButton } from "./ClipboardButton-71Ugbl8c.js";
|
|
7
|
+
import { FullScreenModal, FullScreenModalBody, FullScreenModalHeader } from "./FullScreenModal-RzY5XxiG.js";
|
|
8
8
|
import { Truncated } from "./internal/components/Truncated.js";
|
|
9
9
|
import { useStableCallback } from "./internal/hooks/useStableCallback.js";
|
|
10
|
-
import { HoverCard } from "./HoverCard-
|
|
11
|
-
import { Command } from "./Command-
|
|
12
|
-
import { TextInput } from "./TextInput
|
|
13
|
-
import { Badge } from "./Badge-
|
|
10
|
+
import { HoverCard } from "./HoverCard-OGWKRXJ7.js";
|
|
11
|
+
import { Command } from "./Command-BcTb6GsR.js";
|
|
12
|
+
import { TextInput } from "./TextInput--1CfZybC.js";
|
|
13
|
+
import { Badge } from "./Badge-CFRhducL.js";
|
|
14
14
|
import { Textarea } from "./internal/blocks/Textarea.js";
|
|
15
|
-
import { Kbd, keys } from "./Kbd-
|
|
16
|
-
import { Collapsible } from "./Collapsible-
|
|
17
|
-
import { Alert } from "./Alert-
|
|
18
|
-
import { Table as Table$1, tableAriaSort } from "./Table-
|
|
15
|
+
import { Kbd, keys } from "./Kbd-BprYCICe.js";
|
|
16
|
+
import { Collapsible } from "./Collapsible-zsXk4Vpp.js";
|
|
17
|
+
import { Alert } from "./Alert-DziS8n1H.js";
|
|
18
|
+
import { Table as Table$1, tableAriaSort } from "./Table-BwgBm3hJ.js";
|
|
19
19
|
import { DiagramSkeleton } from "./internal/blocks/DiagramShared/DiagramSkeleton.js";
|
|
20
|
-
import { DiagramSource, makeResponsive } from "./svgTransforms-
|
|
21
|
-
import { ZoomableSvg, toSvgFileContent } from "./ZoomableSvg-
|
|
20
|
+
import { DiagramSource, makeResponsive } from "./svgTransforms-BBxxO9T6.js";
|
|
21
|
+
import { ZoomableSvg, toSvgFileContent } from "./ZoomableSvg-BRPGgaWJ.js";
|
|
22
22
|
import { Progress } from "./internal/components/Progress.js";
|
|
23
23
|
import { digitFromKeyCode, useAltDigitHotkey } from "./internal/hooks/useAltDigitHotkey.js";
|
|
24
24
|
import { createContext, isValidElement, use, useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
@@ -29,7 +29,7 @@ import TextareaAutosize from "react-textarea-autosize";
|
|
|
29
29
|
import ReactMarkdown from "react-markdown";
|
|
30
30
|
import remarkGfm from "remark-gfm";
|
|
31
31
|
import DOMPurify from "dompurify";
|
|
32
|
-
|
|
32
|
+
// src/blocks/AIKit/AnswerCommentInput.tsx
|
|
33
33
|
const MAX_COMMENT_LENGTH = 2e3;
|
|
34
34
|
/**
|
|
35
35
|
* One-line follow-up to a thumbs-down.
|
|
@@ -62,8 +62,7 @@ const AnswerCommentInput = ({ placeholder, onSubmit }) => {
|
|
|
62
62
|
className: "tw:w-64 tw:max-w-full tw:[&_input]:text-ellipsis"
|
|
63
63
|
});
|
|
64
64
|
};
|
|
65
|
-
|
|
66
|
-
//#region src/blocks/AIKit/AnswerActions.tsx
|
|
65
|
+
// src/blocks/AIKit/AnswerActions.tsx
|
|
67
66
|
const VOTE_BUTTONS = [{
|
|
68
67
|
vote: "up",
|
|
69
68
|
icon: /* @__PURE__ */ jsx(ThumbsUp, { className: "tw:size-4" })
|
|
@@ -75,6 +74,16 @@ const DEFAULT_LABELS = {
|
|
|
75
74
|
up: "Good answer",
|
|
76
75
|
down: "Bad answer"
|
|
77
76
|
};
|
|
77
|
+
const RECORDED_VOTE_CLASSES = {
|
|
78
|
+
tinted: {
|
|
79
|
+
up: "tw:bg-success/10 tw:text-success tw:hover:not-disabled:bg-success/20 tw:hover:not-disabled:text-success",
|
|
80
|
+
down: "tw:bg-destructive/10 tw:text-destructive tw:hover:not-disabled:bg-destructive/20 tw:hover:not-disabled:text-destructive"
|
|
81
|
+
},
|
|
82
|
+
quiet: {
|
|
83
|
+
up: "tw:text-primary tw:hover:not-disabled:text-primary",
|
|
84
|
+
down: "tw:text-primary tw:hover:not-disabled:text-primary"
|
|
85
|
+
}
|
|
86
|
+
};
|
|
78
87
|
/** Roomier for a panel; compact for a dense transcript. */
|
|
79
88
|
const SIZES = {
|
|
80
89
|
small: {
|
|
@@ -93,7 +102,7 @@ const SIZES = {
|
|
|
93
102
|
* - A vote can be changed but not withdrawn; pressing the pressed one re-sends it.
|
|
94
103
|
* - The caller owns the recorded vote and the write.
|
|
95
104
|
*/
|
|
96
|
-
const AnswerActions = ({ copyText, vote, onVote, onCopy, actions, extraActions = [], labels = DEFAULT_LABELS, confirmation, size = "small", layout = "inline", onDownComment, commentPlaceholder = "What was wrong? (optional)", onRegenerate, regenerateLabel = "Ask again" }) => {
|
|
105
|
+
const AnswerActions = ({ copyText, vote, onVote, onCopy, actions, extraActions = [], labels = DEFAULT_LABELS, confirmation, size = "small", layout = "inline", onDownComment, commentPlaceholder = "What was wrong? (optional)", onRegenerate, regenerateLabel = "Ask again", groupDivider = false, timestamp, voteStyle = "tinted" }) => {
|
|
97
106
|
const { button, gap } = SIZES[size];
|
|
98
107
|
const votes = VOTE_BUTTONS.map(({ vote: candidate, icon }) => {
|
|
99
108
|
const isRecorded = vote === candidate;
|
|
@@ -105,7 +114,7 @@ const AnswerActions = ({ copyText, vote, onVote, onCopy, actions, extraActions =
|
|
|
105
114
|
children: /* @__PURE__ */ jsx(Button, {
|
|
106
115
|
size: button,
|
|
107
116
|
variant: "invisible",
|
|
108
|
-
className: cn(isRecorded && candidate
|
|
117
|
+
className: cn(isRecorded && RECORDED_VOTE_CLASSES[voteStyle][candidate]),
|
|
109
118
|
"aria-label": label,
|
|
110
119
|
"aria-pressed": isRecorded,
|
|
111
120
|
onClick: () => onVote(candidate),
|
|
@@ -145,6 +154,22 @@ const AnswerActions = ({ copyText, vote, onVote, onCopy, actions, extraActions =
|
|
|
145
154
|
children: icon
|
|
146
155
|
})
|
|
147
156
|
}, id));
|
|
157
|
+
const time = timestamp ? /* @__PURE__ */ jsx(Tooltip, {
|
|
158
|
+
tooltip: timestamp,
|
|
159
|
+
placement: "top",
|
|
160
|
+
triggerAsChild: true,
|
|
161
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
162
|
+
size: button,
|
|
163
|
+
variant: "invisible",
|
|
164
|
+
"aria-label": timestamp,
|
|
165
|
+
className: "tw:cursor-default tw:text-muted-foreground",
|
|
166
|
+
children: /* @__PURE__ */ jsx(Clock, { className: "tw:size-3.5" })
|
|
167
|
+
})
|
|
168
|
+
}) : null;
|
|
169
|
+
const divider = groupDivider && (regenerate || actions) ? /* @__PURE__ */ jsx("span", {
|
|
170
|
+
"aria-hidden": true,
|
|
171
|
+
className: "tw:mx-1 tw:h-4 tw:w-px tw:bg-border"
|
|
172
|
+
}) : null;
|
|
148
173
|
const comment = onDownComment && vote === "down" ? /* @__PURE__ */ jsx(AnswerCommentInput, {
|
|
149
174
|
placeholder: commentPlaceholder,
|
|
150
175
|
onSubmit: onDownComment
|
|
@@ -169,7 +194,8 @@ const AnswerActions = ({ copyText, vote, onVote, onCopy, actions, extraActions =
|
|
|
169
194
|
actions,
|
|
170
195
|
regenerate,
|
|
171
196
|
copy,
|
|
172
|
-
extras
|
|
197
|
+
extras,
|
|
198
|
+
time
|
|
173
199
|
]
|
|
174
200
|
})
|
|
175
201
|
]
|
|
@@ -181,9 +207,11 @@ const AnswerActions = ({ copyText, vote, onVote, onCopy, actions, extraActions =
|
|
|
181
207
|
copy,
|
|
182
208
|
extras,
|
|
183
209
|
votes,
|
|
210
|
+
divider,
|
|
184
211
|
regenerate,
|
|
185
212
|
actions,
|
|
186
|
-
said
|
|
213
|
+
said,
|
|
214
|
+
time
|
|
187
215
|
]
|
|
188
216
|
});
|
|
189
217
|
if (!comment) return group;
|
|
@@ -192,8 +220,7 @@ const AnswerActions = ({ copyText, vote, onVote, onCopy, actions, extraActions =
|
|
|
192
220
|
children: [group, comment]
|
|
193
221
|
});
|
|
194
222
|
};
|
|
195
|
-
|
|
196
|
-
//#region src/blocks/AIKit/SourceChip.tsx
|
|
223
|
+
// src/blocks/AIKit/SourceChip.tsx
|
|
197
224
|
const STATE_CLASSES = {
|
|
198
225
|
verified: "tw:border-solid tw:border-success/30 tw:bg-success/10 tw:text-foreground",
|
|
199
226
|
unverified: "tw:border-dashed tw:border-warning/60 tw:bg-warning/10 tw:text-foreground",
|
|
@@ -212,8 +239,8 @@ const accessibleName = ({ kind, label, state = "neutral" }) => [[kind, label].fi
|
|
|
212
239
|
* - A plain left click goes to `onClick`; modified clicks keep the link's own behaviour.
|
|
213
240
|
*/
|
|
214
241
|
const SourceChip = (props) => {
|
|
215
|
-
const { label, state = "neutral", icon, href, external, onClick, title, className } = props;
|
|
216
|
-
const classes = cn("tailwindcss-preflight tw:inline-flex tw:h-6 tw:max-w-64 tw:min-w-0 tw:items-center tw:gap-1 tw:rounded-md tw:border tw:px-2 tw:text-xs tw:no-underline", STATE_CLASSES[state], (href || onClick) && "tw:cursor-pointer tw:hover:bg-hover tw:focus-visible:outline-none tw:focus-visible:ring-2 tw:focus-visible:ring-ring", className);
|
|
242
|
+
const { label, state = "neutral", verifiedStyle = "tinted", icon, href, external, onClick, title, className } = props;
|
|
243
|
+
const classes = cn("tailwindcss-preflight tw:inline-flex tw:h-6 tw:max-w-64 tw:min-w-0 tw:items-center tw:gap-1 tw:rounded-md tw:border tw:px-2 tw:text-xs tw:no-underline", STATE_CLASSES[state === "verified" && verifiedStyle === "quiet" ? "neutral" : state], (href || onClick) && "tw:cursor-pointer tw:hover:bg-hover tw:focus-visible:outline-none tw:focus-visible:ring-2 tw:focus-visible:ring-ring", className);
|
|
217
244
|
const content = /* @__PURE__ */ jsxs(Fragment$1, { children: [icon && /* @__PURE__ */ jsx("span", {
|
|
218
245
|
"aria-hidden": true,
|
|
219
246
|
className: "tw:inline-flex tw:shrink-0 tw:[&_svg]:size-3.5",
|
|
@@ -254,8 +281,7 @@ const SourceChip = (props) => {
|
|
|
254
281
|
children: content
|
|
255
282
|
});
|
|
256
283
|
};
|
|
257
|
-
|
|
258
|
-
//#region src/blocks/AIKit/AnswerSources.tsx
|
|
284
|
+
// src/blocks/AIKit/AnswerSources.tsx
|
|
259
285
|
const ANSWER_SOURCES_VISIBLE = 6;
|
|
260
286
|
/**
|
|
261
287
|
* The provenance row under an answer: where its figures came from.
|
|
@@ -264,7 +290,7 @@ const ANSWER_SOURCES_VISIBLE = 6;
|
|
|
264
290
|
* - Collapses past `visibleCount` behind a "+N more" toggle.
|
|
265
291
|
* - Empty `sources` states that none were declared, which is itself information.
|
|
266
292
|
*/
|
|
267
|
-
const AnswerSources = ({ sources, label = "Sources", emptyLabel = "none declared", visibleCount = 6, footnote, className }) => {
|
|
293
|
+
const AnswerSources = ({ sources, label = "Sources", emptyLabel = "none declared", visibleCount = 6, footnote, trailing, verifiedStyle, className }) => {
|
|
268
294
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
269
295
|
const isCollapsible = sources.length > visibleCount;
|
|
270
296
|
const shown = isCollapsible && !isExpanded ? sources.slice(0, visibleCount) : sources;
|
|
@@ -282,7 +308,10 @@ const AnswerSources = ({ sources, label = "Sources", emptyLabel = "none declared
|
|
|
282
308
|
className: "tw:text-muted-foreground",
|
|
283
309
|
children: emptyLabel
|
|
284
310
|
}),
|
|
285
|
-
shown.map(({ id, ...chip }) => /* @__PURE__ */ jsx(SourceChip, {
|
|
311
|
+
shown.map(({ id, ...chip }) => /* @__PURE__ */ jsx(SourceChip, {
|
|
312
|
+
verifiedStyle,
|
|
313
|
+
...chip
|
|
314
|
+
}, id)),
|
|
286
315
|
isCollapsible && /* @__PURE__ */ jsx("button", {
|
|
287
316
|
type: "button",
|
|
288
317
|
"aria-expanded": isExpanded,
|
|
@@ -301,13 +330,16 @@ const AnswerSources = ({ sources, label = "Sources", emptyLabel = "none declared
|
|
|
301
330
|
unverifiedCount,
|
|
302
331
|
" unverified"
|
|
303
332
|
]
|
|
333
|
+
}),
|
|
334
|
+
trailing && /* @__PURE__ */ jsx("span", {
|
|
335
|
+
className: "tw:inline-flex tw:shrink-0 tw:items-center tw:gap-1.5",
|
|
336
|
+
children: trailing
|
|
304
337
|
})
|
|
305
338
|
]
|
|
306
339
|
}), footnote]
|
|
307
340
|
});
|
|
308
341
|
};
|
|
309
|
-
|
|
310
|
-
//#region src/blocks/AIKit/CollapsibleBody.tsx
|
|
342
|
+
// src/blocks/AIKit/CollapsibleBody.tsx
|
|
311
343
|
const CollapsibleBody = ({ isExpanded, isClosing, onClosed, children }) => {
|
|
312
344
|
const handleTransitionEnd = (event) => {
|
|
313
345
|
if (event.target !== event.currentTarget) return;
|
|
@@ -323,8 +355,7 @@ const CollapsibleBody = ({ isExpanded, isClosing, onClosed, children }) => {
|
|
|
323
355
|
})
|
|
324
356
|
});
|
|
325
357
|
};
|
|
326
|
-
|
|
327
|
-
//#region src/blocks/AIKit/CollapsibleStepHeader.tsx
|
|
358
|
+
// src/blocks/AIKit/CollapsibleStepHeader.tsx
|
|
328
359
|
const variantClasses = {
|
|
329
360
|
success: "tw:text-muted-foreground tw:focus-visible:outline-ring tw:not-disabled:hover:text-foreground",
|
|
330
361
|
error: "tw:text-destructive tw:focus-visible:outline-destructive tw:not-disabled:hover:text-destructive",
|
|
@@ -343,14 +374,14 @@ const renderVariantIcon$1 = (variant) => {
|
|
|
343
374
|
if (variant === "error" || variant === "dismissed") return /* @__PURE__ */ jsx(XCircle, { className: iconClasses });
|
|
344
375
|
return /* @__PURE__ */ jsx(CircleCheck, { className: iconClasses });
|
|
345
376
|
};
|
|
346
|
-
const CollapsibleStepHeader = ({ isExpanded, onToggle, label, variant = "success" }) => {
|
|
377
|
+
const CollapsibleStepHeader = ({ isExpanded, onToggle, label, variant = "success", statusMark = true }) => {
|
|
347
378
|
return /* @__PURE__ */ jsxs("button", {
|
|
348
379
|
type: "button",
|
|
349
380
|
"aria-expanded": isExpanded,
|
|
350
381
|
onClick: onToggle,
|
|
351
382
|
"data-variant": variant,
|
|
352
383
|
className: cn("tw:flex tw:w-fit tw:items-center tw:gap-1.5 tw:text-left tw:text-xs tw:font-medium tw:transition-colors tw:focus-visible:outline tw:focus-visible:outline-2 tw:focus-visible:outline-offset-2 tw:disabled:opacity-40", variantClasses[variant]),
|
|
353
|
-
children: [renderVariantIcon$1(variant), /* @__PURE__ */ jsxs("span", {
|
|
384
|
+
children: [statusMark && renderVariantIcon$1(variant), /* @__PURE__ */ jsxs("span", {
|
|
354
385
|
className: "tw:min-w-0",
|
|
355
386
|
children: [
|
|
356
387
|
label,
|
|
@@ -366,34 +397,47 @@ const CollapsibleStepHeader = ({ isExpanded, onToggle, label, variant = "success
|
|
|
366
397
|
})]
|
|
367
398
|
});
|
|
368
399
|
};
|
|
369
|
-
|
|
370
|
-
//#region src/blocks/AIKit/hasMotion.ts
|
|
400
|
+
// src/blocks/AIKit/hasMotion.ts
|
|
371
401
|
const hasMotion = () => typeof window.matchMedia === "function" && !window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
372
|
-
|
|
373
|
-
//#region src/blocks/AIKit/InlineStepDetail.tsx
|
|
402
|
+
// src/blocks/AIKit/InlineStepDetail.tsx
|
|
374
403
|
const InlineStepDetail = ({ children }) => /* @__PURE__ */ jsx("div", {
|
|
375
404
|
className: "tw:ml-2.5 tw:whitespace-pre-wrap tw:border-l tw:border-border tw:pl-3 tw:text-xs tw:text-muted-foreground",
|
|
376
405
|
children
|
|
377
406
|
});
|
|
378
|
-
|
|
379
|
-
|
|
407
|
+
// src/blocks/AIKit/InlineStepLabel.tsx
|
|
408
|
+
const STATUS_WORD = {
|
|
409
|
+
processing: "running",
|
|
410
|
+
success: "finished",
|
|
411
|
+
error: "failed",
|
|
412
|
+
dismissed: "not run"
|
|
413
|
+
};
|
|
414
|
+
const isQuietOutcome = (variant) => variant === "error" || variant === "dismissed";
|
|
380
415
|
const renderVariantIcon = (variant) => {
|
|
381
416
|
if (variant === "processing") return /* @__PURE__ */ jsx(Loader2, { className: "tw:size-3.5 tw:animate-spin tw:text-muted-foreground" });
|
|
382
417
|
if (variant === "error") return /* @__PURE__ */ jsx(XCircle, { className: "tw:size-3.5 tw:text-destructive" });
|
|
383
418
|
if (variant === "dismissed") return /* @__PURE__ */ jsx(XCircle, { className: "tw:size-3.5 tw:text-muted-foreground/50" });
|
|
384
419
|
return /* @__PURE__ */ jsx(CircleCheck, { className: "tw:size-3.5 tw:text-muted-foreground/50" });
|
|
385
420
|
};
|
|
386
|
-
const InlineStepLabel = ({ variant, children, meta, detail, defaultExpanded = false }) => {
|
|
421
|
+
const InlineStepLabel = ({ variant, children, meta, detail, defaultExpanded = false, icon }) => {
|
|
387
422
|
const [isExpanded, setIsExpanded] = useState(defaultExpanded);
|
|
423
|
+
const mark = icon ? /* @__PURE__ */ jsx("span", {
|
|
424
|
+
"aria-hidden": true,
|
|
425
|
+
className: cn("tw:inline-flex tw:text-muted-foreground tw:[&_svg]:size-3.5", isQuietOutcome(variant) && "tw:opacity-50"),
|
|
426
|
+
children: icon
|
|
427
|
+
}) : renderVariantIcon(variant);
|
|
388
428
|
const row = /* @__PURE__ */ jsxs("div", {
|
|
389
429
|
className: "tw:flex tw:min-w-0 tw:items-center tw:gap-1",
|
|
390
430
|
children: [/* @__PURE__ */ jsx("div", {
|
|
391
431
|
className: "tw:relative tw:flex tw:size-5 tw:shrink-0 tw:items-center tw:justify-center tw:[background:var(--inline-step-surface,transparent)]",
|
|
392
|
-
children:
|
|
432
|
+
children: mark
|
|
393
433
|
}), /* @__PURE__ */ jsxs("div", {
|
|
394
|
-
className: "tw:flex tw:min-w-0 tw:flex-wrap tw:items-center tw:gap-x-1.5 tw:gap-y-1 tw:text-xs tw:font-medium tw:text-muted-foreground",
|
|
434
|
+
className: cn("tw:flex tw:min-w-0 tw:flex-wrap tw:items-center tw:gap-x-1.5 tw:gap-y-1 tw:text-xs tw:font-medium tw:text-muted-foreground", icon && isQuietOutcome(variant) && "tw:text-muted-foreground/70"),
|
|
395
435
|
children: [
|
|
396
436
|
children,
|
|
437
|
+
icon && /* @__PURE__ */ jsx("span", {
|
|
438
|
+
className: "tw:sr-only",
|
|
439
|
+
children: ` (${STATUS_WORD[variant]})`
|
|
440
|
+
}),
|
|
397
441
|
meta && /* @__PURE__ */ jsx("span", {
|
|
398
442
|
className: "tw:font-normal tw:text-muted-foreground",
|
|
399
443
|
children: meta
|
|
@@ -418,8 +462,7 @@ const InlineStepLabel = ({ variant, children, meta, detail, defaultExpanded = fa
|
|
|
418
462
|
})]
|
|
419
463
|
});
|
|
420
464
|
};
|
|
421
|
-
|
|
422
|
-
//#region src/blocks/AIKit/AnswerSummary.tsx
|
|
465
|
+
// src/blocks/AIKit/AnswerSummary.tsx
|
|
423
466
|
const SECTION_LABELS = {
|
|
424
467
|
success: "Answered questions",
|
|
425
468
|
dismissed: "Dismissed questions",
|
|
@@ -480,8 +523,7 @@ const AnswerSummary = ({ items, variant = "success", statusLabel = DEFAULT_STATU
|
|
|
480
523
|
})]
|
|
481
524
|
});
|
|
482
525
|
};
|
|
483
|
-
|
|
484
|
-
//#region src/blocks/AIKit/AttachmentChip.tsx
|
|
526
|
+
// src/blocks/AIKit/AttachmentChip.tsx
|
|
485
527
|
const Lead = ({ status, thumbnailUrl, lead }) => {
|
|
486
528
|
if (status === "uploading") return /* @__PURE__ */ jsx(LoaderCircle, {
|
|
487
529
|
"aria-hidden": true,
|
|
@@ -540,8 +582,7 @@ const AttachmentChip = ({ name, thumbnailUrl, lead, label, status, error, onRemo
|
|
|
540
582
|
children: chip
|
|
541
583
|
});
|
|
542
584
|
};
|
|
543
|
-
|
|
544
|
-
//#region src/blocks/AIKit/ChatInlineIcon.tsx
|
|
585
|
+
// src/blocks/AIKit/ChatInlineIcon.tsx
|
|
545
586
|
/** Every drawable name; read through `Object.hasOwn`, or `icon:constructor` hits `Object.prototype`. */
|
|
546
587
|
const ICON_REGISTRY = {
|
|
547
588
|
"book-open": BookOpen,
|
|
@@ -723,8 +764,7 @@ const ChatInlineIcon = ({ name }) => {
|
|
|
723
764
|
strokeWidth: 2.25
|
|
724
765
|
});
|
|
725
766
|
};
|
|
726
|
-
|
|
727
|
-
//#region src/blocks/AIKit/useCountdown.ts
|
|
767
|
+
// src/blocks/AIKit/useCountdown.ts
|
|
728
768
|
const TICK_MS = 1e3;
|
|
729
769
|
/** Whole seconds left of a countdown that starts at `seconds`; `undefined` when there is none. */
|
|
730
770
|
const useCountdown = (seconds) => {
|
|
@@ -746,8 +786,7 @@ const useCountdown = (seconds) => {
|
|
|
746
786
|
const elapsed = ticks.start === seconds ? ticks.elapsed : 0;
|
|
747
787
|
return Math.max(seconds - elapsed, 0);
|
|
748
788
|
};
|
|
749
|
-
|
|
750
|
-
//#region src/blocks/AIKit/ChatNotice.tsx
|
|
789
|
+
// src/blocks/AIKit/ChatNotice.tsx
|
|
751
790
|
const ALERT_VARIANT = {
|
|
752
791
|
error: "error",
|
|
753
792
|
warn: "warning",
|
|
@@ -761,12 +800,12 @@ const countdownLabel = (remaining) => remaining > 0 ? `Try again in ${remaining}
|
|
|
761
800
|
* - `details` stays collapsed so a stack trace never crowds the message.
|
|
762
801
|
* - `retryAfter` appends a live countdown; `action` is always rendered, so the host decides whether to gate it.
|
|
763
802
|
*/
|
|
764
|
-
const ChatNotice = ({ tone, children, action, details, retryAfter, className }) => {
|
|
803
|
+
const ChatNotice = ({ tone, children, action, details, retryAfter, bordered = true, className }) => {
|
|
765
804
|
const remaining = useCountdown(retryAfter);
|
|
766
805
|
return /* @__PURE__ */ jsx(Alert, {
|
|
767
806
|
variant: ALERT_VARIANT[tone],
|
|
768
807
|
role: "status",
|
|
769
|
-
className,
|
|
808
|
+
className: cn(!bordered && "tw:border-0!", className),
|
|
770
809
|
children: /* @__PURE__ */ jsxs("div", {
|
|
771
810
|
className: "tw:flex tw:flex-wrap tw:items-start tw:gap-x-3 tw:gap-y-2",
|
|
772
811
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -796,8 +835,7 @@ const ChatNotice = ({ tone, children, action, details, retryAfter, className })
|
|
|
796
835
|
})
|
|
797
836
|
});
|
|
798
837
|
};
|
|
799
|
-
|
|
800
|
-
//#region src/blocks/AIKit/ContextChip.tsx
|
|
838
|
+
// src/blocks/AIKit/ContextChip.tsx
|
|
801
839
|
const CONTEXT_CHIP_EXPANDABLE_LENGTH = 120;
|
|
802
840
|
/**
|
|
803
841
|
* A quote or reference attached to a message being composed.
|
|
@@ -857,8 +895,7 @@ const ContextChip = ({ label, excerpt = "", images = [], number, onRemove, class
|
|
|
857
895
|
]
|
|
858
896
|
});
|
|
859
897
|
};
|
|
860
|
-
|
|
861
|
-
//#region src/blocks/AIKit/FileDownloadChip.tsx
|
|
898
|
+
// src/blocks/AIKit/FileDownloadChip.tsx
|
|
862
899
|
/**
|
|
863
900
|
* A file the agent wrote, offered inside its own answer.
|
|
864
901
|
*
|
|
@@ -923,8 +960,7 @@ const FileDownloadChip = ({ fileName, filePath, size, isPending = false, onDownl
|
|
|
923
960
|
]
|
|
924
961
|
});
|
|
925
962
|
};
|
|
926
|
-
|
|
927
|
-
//#region src/blocks/AIKit/FileGalleryTile.tsx
|
|
963
|
+
// src/blocks/AIKit/FileGalleryTile.tsx
|
|
928
964
|
const VISIBLE_MARGIN = "200px";
|
|
929
965
|
/**
|
|
930
966
|
* One image in a `FileGallery`.
|
|
@@ -989,8 +1025,7 @@ const FileGalleryTile = ({ image, onOpen, onRetry, onVisible }) => {
|
|
|
989
1025
|
]
|
|
990
1026
|
});
|
|
991
1027
|
};
|
|
992
|
-
|
|
993
|
-
//#region src/blocks/AIKit/FileGallery.tsx
|
|
1028
|
+
// src/blocks/AIKit/FileGallery.tsx
|
|
994
1029
|
const DEFAULT_MAX_TILES = 12;
|
|
995
1030
|
/**
|
|
996
1031
|
* Image files the agent wrote, as a grid of thumbnails.
|
|
@@ -1024,8 +1059,7 @@ const FileGallery = ({ images, onOpen, onRetry, onImageVisible, maxTiles = DEFAU
|
|
|
1024
1059
|
})]
|
|
1025
1060
|
});
|
|
1026
1061
|
};
|
|
1027
|
-
|
|
1028
|
-
//#region src/blocks/AIKit/InlineStepGroup.tsx
|
|
1062
|
+
// src/blocks/AIKit/InlineStepGroup.tsx
|
|
1029
1063
|
/** The surface colour, as the custom property the step icons mask against. */
|
|
1030
1064
|
const surfaceStyle = (surface) => ({ "--inline-step-surface": surface });
|
|
1031
1065
|
/**
|
|
@@ -1036,7 +1070,7 @@ const surfaceStyle = (surface) => ({ "--inline-step-surface": surface });
|
|
|
1036
1070
|
* - Animates `grid-template-rows`; children stay mounted while closed.
|
|
1037
1071
|
* - `role="group"`, not a `region` landmark: dozens per transcript would drown real landmarks.
|
|
1038
1072
|
*/
|
|
1039
|
-
const InlineStepGroup = ({ label, variant = "success", isExpanded, onToggle, surface = "rgb(var(--background))", "aria-label": ariaLabel, "data-testid": testId, className, footer, children }) => /* @__PURE__ */ jsxs("section", {
|
|
1073
|
+
const InlineStepGroup = ({ label, variant = "success", statusMark = true, isExpanded, onToggle, surface = "rgb(var(--background))", "aria-label": ariaLabel, "data-testid": testId, className, footer, children }) => /* @__PURE__ */ jsxs("section", {
|
|
1040
1074
|
role: "group",
|
|
1041
1075
|
className: cn("tw:flex tw:flex-col", className),
|
|
1042
1076
|
"aria-label": ariaLabel,
|
|
@@ -1045,7 +1079,8 @@ const InlineStepGroup = ({ label, variant = "success", isExpanded, onToggle, sur
|
|
|
1045
1079
|
isExpanded,
|
|
1046
1080
|
onToggle,
|
|
1047
1081
|
label,
|
|
1048
|
-
variant
|
|
1082
|
+
variant,
|
|
1083
|
+
statusMark
|
|
1049
1084
|
}), /* @__PURE__ */ jsx("div", {
|
|
1050
1085
|
className: cn("tw:grid tw:transition-[grid-template-rows] tw:duration-200 tw:ease-out tw:motion-reduce:transition-none", isExpanded ? "tw:grid-rows-[1fr]" : "tw:grid-rows-[0fr]"),
|
|
1051
1086
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -1070,8 +1105,7 @@ const InlineStepGroup = ({ label, variant = "success", isExpanded, onToggle, sur
|
|
|
1070
1105
|
})
|
|
1071
1106
|
})]
|
|
1072
1107
|
});
|
|
1073
|
-
|
|
1074
|
-
//#region src/blocks/AIKit/JumpToLatest.tsx
|
|
1108
|
+
// src/blocks/AIKit/JumpToLatest.tsx
|
|
1075
1109
|
/**
|
|
1076
1110
|
* Scrolls a transcript back to its newest message.
|
|
1077
1111
|
*
|
|
@@ -1097,8 +1131,7 @@ const JumpToLatest = ({ visible, working = false, onClick, label, tooltip, class
|
|
|
1097
1131
|
children: button
|
|
1098
1132
|
});
|
|
1099
1133
|
};
|
|
1100
|
-
|
|
1101
|
-
//#region src/blocks/AIKit/DiagramBlock.tsx
|
|
1134
|
+
// src/blocks/AIKit/DiagramBlock.tsx
|
|
1102
1135
|
/**
|
|
1103
1136
|
* One diagram block: a skeleton while its chunk loads, the fence source plus a retry if it fails.
|
|
1104
1137
|
*
|
|
@@ -1144,8 +1177,7 @@ const DiagramBlock = ({ load, code, renderActions }) => {
|
|
|
1144
1177
|
})] });
|
|
1145
1178
|
return /* @__PURE__ */ jsx(DiagramSkeleton, {});
|
|
1146
1179
|
};
|
|
1147
|
-
|
|
1148
|
-
//#region src/blocks/AIKit/diagramChunk.ts
|
|
1180
|
+
// src/blocks/AIKit/diagramChunk.ts
|
|
1149
1181
|
/**
|
|
1150
1182
|
* An on-demand diagram chunk, shared between mounts and retryable.
|
|
1151
1183
|
*
|
|
@@ -1165,8 +1197,7 @@ const diagramChunk = (name, load) => {
|
|
|
1165
1197
|
return pending;
|
|
1166
1198
|
};
|
|
1167
1199
|
};
|
|
1168
|
-
|
|
1169
|
-
//#region src/blocks/AIKit/downloadSvgFile.ts
|
|
1200
|
+
// src/blocks/AIKit/downloadSvgFile.ts
|
|
1170
1201
|
/** How long the object URL outlives the click; the download has started by then. */
|
|
1171
1202
|
const REVOKE_DELAY_MS = 1e3;
|
|
1172
1203
|
/** Saves sanitized SVG markup as a standalone `.svg` file. */
|
|
@@ -1181,8 +1212,7 @@ const downloadSvgFile = (svg, filename = "diagram.svg") => {
|
|
|
1181
1212
|
anchor.remove();
|
|
1182
1213
|
setTimeout(() => URL.revokeObjectURL(url), REVOKE_DELAY_MS);
|
|
1183
1214
|
};
|
|
1184
|
-
|
|
1185
|
-
//#region src/blocks/AIKit/DiagramDownloadButton.tsx
|
|
1215
|
+
// src/blocks/AIKit/DiagramDownloadButton.tsx
|
|
1186
1216
|
/** A diagram toolbar action that saves the drawn diagram as an SVG file. */
|
|
1187
1217
|
const DiagramDownloadButton = ({ safeSvg }) => /* @__PURE__ */ jsx(Tooltip, {
|
|
1188
1218
|
tooltip: "Download SVG",
|
|
@@ -1196,8 +1226,7 @@ const DiagramDownloadButton = ({ safeSvg }) => /* @__PURE__ */ jsx(Tooltip, {
|
|
|
1196
1226
|
children: /* @__PURE__ */ jsx(Download, { className: "tw:size-4" })
|
|
1197
1227
|
})
|
|
1198
1228
|
});
|
|
1199
|
-
|
|
1200
|
-
//#region src/blocks/AIKit/highlightChunk.ts
|
|
1229
|
+
// src/blocks/AIKit/highlightChunk.ts
|
|
1201
1230
|
let pending = null;
|
|
1202
1231
|
/**
|
|
1203
1232
|
* The syntax highlighter, loaded on first use and shared between blocks.
|
|
@@ -1206,15 +1235,14 @@ let pending = null;
|
|
|
1206
1235
|
* - A failed import is logged and resolves `null`; the next block retries.
|
|
1207
1236
|
*/
|
|
1208
1237
|
const loadHighlighter = () => {
|
|
1209
|
-
pending ??= import("./highlightCode-
|
|
1238
|
+
pending ??= import("./highlightCode-2spZP7ZA.js").then((module) => module.highlightCode, (error) => {
|
|
1210
1239
|
console.error("[AIKit] failed to load the syntax highlighter chunk", error);
|
|
1211
1240
|
pending = null;
|
|
1212
1241
|
return null;
|
|
1213
1242
|
});
|
|
1214
1243
|
return pending;
|
|
1215
1244
|
};
|
|
1216
|
-
|
|
1217
|
-
//#region src/blocks/AIKit/HighlightedCode.tsx
|
|
1245
|
+
// src/blocks/AIKit/HighlightedCode.tsx
|
|
1218
1246
|
/**
|
|
1219
1247
|
* A fenced block's `<code>`, coloured once the highlighter chunk loads.
|
|
1220
1248
|
*
|
|
@@ -1245,8 +1273,7 @@ const HighlightedCode = ({ code, grammar, className, children }) => {
|
|
|
1245
1273
|
}, index) : token.text)
|
|
1246
1274
|
});
|
|
1247
1275
|
};
|
|
1248
|
-
|
|
1249
|
-
//#region src/blocks/AIKit/highlightLanguages.ts
|
|
1276
|
+
// src/blocks/AIKit/highlightLanguages.ts
|
|
1250
1277
|
/**
|
|
1251
1278
|
* Fence language → the grammar that highlights it.
|
|
1252
1279
|
*
|
|
@@ -1277,15 +1304,13 @@ const getHighlightGrammar = (language) => {
|
|
|
1277
1304
|
const key = language?.toLowerCase();
|
|
1278
1305
|
return key !== void 0 && Object.hasOwn(HIGHLIGHT_GRAMMARS, key) ? HIGHLIGHT_GRAMMARS[key] : void 0;
|
|
1279
1306
|
};
|
|
1280
|
-
|
|
1281
|
-
//#region src/blocks/AIKit/markdownOptions.ts
|
|
1307
|
+
// src/blocks/AIKit/markdownOptions.ts
|
|
1282
1308
|
const MarkdownOptionsContext = createContext({
|
|
1283
1309
|
highlight: false,
|
|
1284
1310
|
sortable: false,
|
|
1285
1311
|
renderDiagramActions: void 0
|
|
1286
1312
|
});
|
|
1287
|
-
|
|
1288
|
-
//#region src/blocks/AIKit/tableSort.ts
|
|
1313
|
+
// src/blocks/AIKit/tableSort.ts
|
|
1289
1314
|
/** Characters a number cell carries for the reader: grouping, currency, percent, sign, spaces. */
|
|
1290
1315
|
const NUMBER_NOISE = /[\s,_%$€£¥+]/g;
|
|
1291
1316
|
/** A trailing magnitude: `142k`, `1.2M`, `3B`. */
|
|
@@ -1346,14 +1371,12 @@ const getRowCellText = (row, column) => {
|
|
|
1346
1371
|
const cell = getRowCells(row)[column];
|
|
1347
1372
|
return cell ? getHastText(cell) : "";
|
|
1348
1373
|
};
|
|
1349
|
-
|
|
1350
|
-
//#region src/blocks/AIKit/tableSortContext.ts
|
|
1374
|
+
// src/blocks/AIKit/tableSortContext.ts
|
|
1351
1375
|
/** The sort of the table being rendered; `null` outside a sortable table. */
|
|
1352
1376
|
const TableSortContext = createContext(null);
|
|
1353
1377
|
/** The hast cells of the row being rendered; a cell finds its column by identity. */
|
|
1354
1378
|
const RowCellsContext = createContext([]);
|
|
1355
|
-
|
|
1356
|
-
//#region src/blocks/AIKit/TableSortProvider.tsx
|
|
1379
|
+
// src/blocks/AIKit/TableSortProvider.tsx
|
|
1357
1380
|
/** Holds one table's sort; the `Markdown` header, row and body renderers read it. */
|
|
1358
1381
|
const TableSortProvider = ({ children }) => {
|
|
1359
1382
|
const [sort, setSort] = useState(null);
|
|
@@ -1366,8 +1389,7 @@ const TableSortProvider = ({ children }) => {
|
|
|
1366
1389
|
children
|
|
1367
1390
|
});
|
|
1368
1391
|
};
|
|
1369
|
-
|
|
1370
|
-
//#region src/blocks/AIKit/MarkdownGrid.tsx
|
|
1392
|
+
// src/blocks/AIKit/MarkdownGrid.tsx
|
|
1371
1393
|
/** The `table` renderer; a sortable block gives each table its own sort. */
|
|
1372
1394
|
const MarkdownGrid = (props) => {
|
|
1373
1395
|
const { className, node: _node, ...rest } = props;
|
|
@@ -1382,8 +1404,7 @@ const MarkdownGrid = (props) => {
|
|
|
1382
1404
|
});
|
|
1383
1405
|
return sortable ? /* @__PURE__ */ jsx(TableSortProvider, { children: grid }) : grid;
|
|
1384
1406
|
};
|
|
1385
|
-
|
|
1386
|
-
//#region src/blocks/AIKit/MarkdownTableBody.tsx
|
|
1407
|
+
// src/blocks/AIKit/MarkdownTableBody.tsx
|
|
1387
1408
|
/**
|
|
1388
1409
|
* The body of an answer's table, in the order its sorted column puts the rows.
|
|
1389
1410
|
*
|
|
@@ -1404,8 +1425,7 @@ const MarkdownTableBody = (props) => {
|
|
|
1404
1425
|
children: order.map((index) => rows[index])
|
|
1405
1426
|
});
|
|
1406
1427
|
};
|
|
1407
|
-
|
|
1408
|
-
//#region src/blocks/AIKit/MarkdownTableHead.tsx
|
|
1428
|
+
// src/blocks/AIKit/MarkdownTableHead.tsx
|
|
1409
1429
|
/**
|
|
1410
1430
|
* A header cell in an answer's table; a sort control inside a sortable table.
|
|
1411
1431
|
*
|
|
@@ -1431,8 +1451,7 @@ const MarkdownTableHead = (props) => {
|
|
|
1431
1451
|
})
|
|
1432
1452
|
});
|
|
1433
1453
|
};
|
|
1434
|
-
|
|
1435
|
-
//#region src/blocks/AIKit/MarkdownTableRow.tsx
|
|
1454
|
+
// src/blocks/AIKit/MarkdownTableRow.tsx
|
|
1436
1455
|
/** A row in an answer's table; inside a sortable table its cells can find their column. */
|
|
1437
1456
|
const MarkdownTableRow = (props) => {
|
|
1438
1457
|
const { node, ...rest } = props;
|
|
@@ -1443,8 +1462,105 @@ const MarkdownTableRow = (props) => {
|
|
|
1443
1462
|
children: row
|
|
1444
1463
|
});
|
|
1445
1464
|
};
|
|
1446
|
-
|
|
1447
|
-
|
|
1465
|
+
// src/blocks/AIKit/remarkCitations.ts
|
|
1466
|
+
const CITATION_TAG = "citation-marker";
|
|
1467
|
+
const CITATION = /\[(\d+)\]/g;
|
|
1468
|
+
const OPAQUE = /* @__PURE__ */ new Set([
|
|
1469
|
+
"code",
|
|
1470
|
+
"inlineCode",
|
|
1471
|
+
"link",
|
|
1472
|
+
"linkReference",
|
|
1473
|
+
"definition"
|
|
1474
|
+
]);
|
|
1475
|
+
const split = (text) => {
|
|
1476
|
+
const parts = [];
|
|
1477
|
+
let last = 0;
|
|
1478
|
+
for (const match of text.matchAll(CITATION)) {
|
|
1479
|
+
if (match.index > last) parts.push({
|
|
1480
|
+
type: "text",
|
|
1481
|
+
value: text.slice(last, match.index)
|
|
1482
|
+
});
|
|
1483
|
+
parts.push({
|
|
1484
|
+
type: "citation",
|
|
1485
|
+
data: {
|
|
1486
|
+
hName: CITATION_TAG,
|
|
1487
|
+
hProperties: { id: match[1] ?? "" }
|
|
1488
|
+
}
|
|
1489
|
+
});
|
|
1490
|
+
last = match.index + match[0].length;
|
|
1491
|
+
}
|
|
1492
|
+
if (last < text.length) parts.push({
|
|
1493
|
+
type: "text",
|
|
1494
|
+
value: text.slice(last)
|
|
1495
|
+
});
|
|
1496
|
+
return parts;
|
|
1497
|
+
};
|
|
1498
|
+
const rewrite = (node) => {
|
|
1499
|
+
if (OPAQUE.has(node.type) || !node.children) return;
|
|
1500
|
+
node.children = node.children.flatMap((child) => {
|
|
1501
|
+
if (child.type === "text" && child.value !== void 0) return split(child.value);
|
|
1502
|
+
rewrite(child);
|
|
1503
|
+
return [child];
|
|
1504
|
+
});
|
|
1505
|
+
};
|
|
1506
|
+
/**
|
|
1507
|
+
* Turns `[n]` in running text into a `citation-marker` element carrying `id`.
|
|
1508
|
+
*
|
|
1509
|
+
* - Code, inline code and links are left alone.
|
|
1510
|
+
* - Draws nothing itself: `Markdown` maps the element to the host's `renderCitation`.
|
|
1511
|
+
*/
|
|
1512
|
+
const remarkCitations = () => (tree) => {
|
|
1513
|
+
rewrite(tree);
|
|
1514
|
+
};
|
|
1515
|
+
// src/blocks/AIKit/remarkStreamingCaret.ts
|
|
1516
|
+
const CARET_TAG = "streaming-caret";
|
|
1517
|
+
const caretNode = () => ({
|
|
1518
|
+
type: "streamingCaret",
|
|
1519
|
+
data: { hName: CARET_TAG }
|
|
1520
|
+
});
|
|
1521
|
+
const PHRASING_BLOCKS = /* @__PURE__ */ new Set([
|
|
1522
|
+
"paragraph",
|
|
1523
|
+
"heading",
|
|
1524
|
+
"tableCell"
|
|
1525
|
+
]);
|
|
1526
|
+
const CONTAINERS = /* @__PURE__ */ new Set([
|
|
1527
|
+
"list",
|
|
1528
|
+
"listItem",
|
|
1529
|
+
"blockquote",
|
|
1530
|
+
"table",
|
|
1531
|
+
"tableRow"
|
|
1532
|
+
]);
|
|
1533
|
+
const lastBlockOf = (node) => {
|
|
1534
|
+
const last = node.children?.at(-1);
|
|
1535
|
+
if (!last) return void 0;
|
|
1536
|
+
if (PHRASING_BLOCKS.has(last.type)) return last;
|
|
1537
|
+
if (CONTAINERS.has(last.type)) return lastBlockOf(last);
|
|
1538
|
+
};
|
|
1539
|
+
/**
|
|
1540
|
+
* Puts a `streaming-caret` element where the next words of a streamed answer land.
|
|
1541
|
+
*
|
|
1542
|
+
* - Inside the last paragraph, heading or table cell, descending through lists, quotes and tables.
|
|
1543
|
+
* - After the block when the answer ends in something else, e.g. a code fence.
|
|
1544
|
+
* - Draws nothing itself: `Markdown` maps the element to its caret.
|
|
1545
|
+
*/
|
|
1546
|
+
const remarkStreamingCaret = () => (tree) => {
|
|
1547
|
+
const target = lastBlockOf(tree) ?? tree;
|
|
1548
|
+
target.children = [...target.children ?? [], caretNode()];
|
|
1549
|
+
};
|
|
1550
|
+
// src/blocks/AIKit/StreamingCaret.tsx
|
|
1551
|
+
/** The mark at the end of a streamed answer; still under reduced motion. */
|
|
1552
|
+
const StreamingCaret = ({ moment, finishingLabel }) => /* @__PURE__ */ jsxs("span", {
|
|
1553
|
+
"data-streaming-caret": moment,
|
|
1554
|
+
className: "tw:whitespace-nowrap",
|
|
1555
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1556
|
+
"aria-hidden": true,
|
|
1557
|
+
className: cn("tw:ml-0.5 tw:inline-block tw:h-[1em] tw:w-0.5 tw:translate-y-[0.15em] tw:rounded-full tw:bg-foreground", moment === "writing" && "tw:animate-pulse tw:motion-reduce:animate-none")
|
|
1558
|
+
}), moment === "finishing" && /* @__PURE__ */ jsx("span", {
|
|
1559
|
+
className: "tw:ml-1.5 tw:text-sm tw:text-muted-foreground",
|
|
1560
|
+
children: finishingLabel
|
|
1561
|
+
})]
|
|
1562
|
+
});
|
|
1563
|
+
// src/blocks/AIKit/svgFence.ts
|
|
1448
1564
|
/** Fence languages whose body may be a single SVG document. */
|
|
1449
1565
|
const SVG_FENCE_LANGUAGES = [
|
|
1450
1566
|
"svg",
|
|
@@ -1528,8 +1644,7 @@ const svgFenceDocument = (language, body) => {
|
|
|
1528
1644
|
if (!SVG_ROOT.test(text.slice(at, at + 5))) return null;
|
|
1529
1645
|
return svgEndTagEnd(text, at) === text.length ? text.slice(at) : null;
|
|
1530
1646
|
};
|
|
1531
|
-
|
|
1532
|
-
//#region src/blocks/AIKit/scopeSvgReferences.ts
|
|
1647
|
+
// src/blocks/AIKit/scopeSvgReferences.ts
|
|
1533
1648
|
/** More cloned nodes than any honest chart needs; matplotlib's glyphs stay well under it. */
|
|
1534
1649
|
const MAX_CLONED_NODES = 2e4;
|
|
1535
1650
|
const LINK_ATTRIBUTES = ["href", "xlink:href"];
|
|
@@ -1626,8 +1741,7 @@ const scopeSvgReferences = (root) => {
|
|
|
1626
1741
|
}
|
|
1627
1742
|
}
|
|
1628
1743
|
};
|
|
1629
|
-
|
|
1630
|
-
//#region src/blocks/AIKit/filterSvgStyle.ts
|
|
1744
|
+
// src/blocks/AIKit/filterSvgStyle.ts
|
|
1631
1745
|
/** The CSS properties a fenced chart may set inline: nothing that loads a URL or leaves the box. */
|
|
1632
1746
|
const SAFE_PROPERTIES = /* @__PURE__ */ new Set([
|
|
1633
1747
|
"alignment-baseline",
|
|
@@ -1697,8 +1811,7 @@ const filterSvgStyle = (style) => style.split(";").flatMap((declaration) => {
|
|
|
1697
1811
|
const value = declaration.slice(colon + 1).trim();
|
|
1698
1812
|
return isSafeDeclaration(property, value) ? [`${property}: ${value}`] : [];
|
|
1699
1813
|
}).join("; ");
|
|
1700
|
-
|
|
1701
|
-
//#region src/blocks/AIKit/sanitizeSvgFence.ts
|
|
1814
|
+
// src/blocks/AIKit/sanitizeSvgFence.ts
|
|
1702
1815
|
/**
|
|
1703
1816
|
* Elements a fenced chart never keeps.
|
|
1704
1817
|
*
|
|
@@ -1752,12 +1865,10 @@ const sanitizeSvgFence = (svg) => {
|
|
|
1752
1865
|
scopeSvgReferences(template.content);
|
|
1753
1866
|
return template.innerHTML;
|
|
1754
1867
|
};
|
|
1755
|
-
|
|
1756
|
-
//#region src/blocks/AIKit/SvgFencesContext.ts
|
|
1868
|
+
// src/blocks/AIKit/SvgFencesContext.ts
|
|
1757
1869
|
/** Whether the `Markdown.Block` being rendered draws ```svg fences; off by default. */
|
|
1758
1870
|
const SvgFencesContext = createContext(false);
|
|
1759
|
-
|
|
1760
|
-
//#region src/blocks/AIKit/SvgFenceChart.tsx
|
|
1871
|
+
// src/blocks/AIKit/SvgFenceChart.tsx
|
|
1761
1872
|
/** A fenced SVG chart, sanitized and drawn responsive, in a block that opted in. */
|
|
1762
1873
|
const SvgFenceChart = ({ svg, source, children }) => {
|
|
1763
1874
|
const allowed = use(SvgFencesContext);
|
|
@@ -1770,25 +1881,28 @@ const SvgFenceChart = ({ svg, source, children }) => {
|
|
|
1770
1881
|
allowUse: true
|
|
1771
1882
|
});
|
|
1772
1883
|
};
|
|
1773
|
-
|
|
1774
|
-
* The fence languages `Markdown` draws instead of printing.
|
|
1775
|
-
*
|
|
1776
|
-
* - Streaming callers hold an open fence back as plain code, or every keystroke fetches the chunk.
|
|
1777
|
-
* - Frozen: it is shared across every app in the bundle.
|
|
1778
|
-
*/
|
|
1779
|
-
const DIAGRAM_LANGUAGES = Object.freeze([...[
|
|
1780
|
-
"mermaid",
|
|
1781
|
-
"flint",
|
|
1782
|
-
"flint-chart"
|
|
1783
|
-
]]);
|
|
1784
|
-
//#endregion
|
|
1785
|
-
//#region src/blocks/AIKit/Markdown.tsx
|
|
1884
|
+
// src/blocks/AIKit/Markdown.tsx
|
|
1786
1885
|
const loadMermaid = diagramChunk("MermaidDiagram", () => import("@keboola/design/mermaid").then((module) => module.MermaidDiagram));
|
|
1787
1886
|
const loadFlint = diagramChunk("FlintChart", () => import("@keboola/design/flint").then((module) => module.FlintChart));
|
|
1788
1887
|
const PROSE_CLASS = {
|
|
1789
1888
|
answer: "tw:prose tw:prose-answer tw:prose-code-chip tw:break-words",
|
|
1790
1889
|
chrome: "tw:prose tw:prose-sm tw:prose-code-chip tw:break-words"
|
|
1791
1890
|
};
|
|
1891
|
+
/**
|
|
1892
|
+
* How large an answer's headings run.
|
|
1893
|
+
*
|
|
1894
|
+
* - `default`: the prose scale.
|
|
1895
|
+
* - `compact`: answer-sized, so a heading in a chat bubble does not outweigh the reply around it.
|
|
1896
|
+
* - Utilities carry `!`: `tw:prose-answer` rules sit above any plain utility.
|
|
1897
|
+
*/
|
|
1898
|
+
const HEADING_CLASS = {
|
|
1899
|
+
default: void 0,
|
|
1900
|
+
compact: [
|
|
1901
|
+
"tw:[&_h1]:text-lg! tw:[&_h2]:text-base! tw:[&_h3]:text-[0.9375rem]! tw:[&_h4]:text-sm!",
|
|
1902
|
+
"tw:[&_:is(h1,h2,h3,h4)]:mt-4! tw:[&_:is(h1,h2,h3,h4)]:mb-1.5! tw:[&_:is(h1,h2,h3,h4)]:leading-snug!",
|
|
1903
|
+
"tw:[&_:is(h1,h2,h3,h4):first-child]:mt-0!"
|
|
1904
|
+
].join(" ")
|
|
1905
|
+
};
|
|
1792
1906
|
const getText = (node) => {
|
|
1793
1907
|
if (typeof node === "string") return node;
|
|
1794
1908
|
if (typeof node === "number") return String(node);
|
|
@@ -1928,9 +2042,10 @@ const baseComponents = {
|
|
|
1928
2042
|
* - `data-prose` is `MessageBubble`'s colour hook; Tailwind can't target `tw:prose` directly.
|
|
1929
2043
|
* - Spacing overrides need `!`: `tw:prose-answer` rules are `(0,2,1)`, above `[&_p]:mb-1`.
|
|
1930
2044
|
*/
|
|
1931
|
-
const MarkdownRoot = ({ children, className, rhythm = "answer" }) => /* @__PURE__ */ jsx("div", {
|
|
2045
|
+
const MarkdownRoot = ({ children, className, rhythm = "answer", headingScale = "default" }) => /* @__PURE__ */ jsx("div", {
|
|
1932
2046
|
"data-prose": true,
|
|
1933
|
-
|
|
2047
|
+
"data-heading-scale": headingScale,
|
|
2048
|
+
className: cn(PROSE_CLASS[rhythm], HEADING_CLASS[headingScale], className),
|
|
1934
2049
|
children
|
|
1935
2050
|
});
|
|
1936
2051
|
/** The diagram toolbar a block asks for: the caller's actions, then the built-in download. */
|
|
@@ -1939,7 +2054,7 @@ const composeDiagramActions = (diagramActions, diagramDownload) => {
|
|
|
1939
2054
|
return (safeSvg) => /* @__PURE__ */ jsxs(Fragment$1, { children: [diagramActions?.(safeSvg), /* @__PURE__ */ jsx(DiagramDownloadButton, { safeSvg })] });
|
|
1940
2055
|
};
|
|
1941
2056
|
/** One parsed piece of an answer, with no surface of its own; memoise at the call site. */
|
|
1942
|
-
const MarkdownBlock = ({ children, remarkPlugins, components: componentOverrides, highlight = false, sortable = false, diagramActions, diagramDownload = false, allowSvgFences = false }) => {
|
|
2057
|
+
const MarkdownBlock = ({ children, remarkPlugins, components: componentOverrides, highlight = false, sortable = false, diagramActions, diagramDownload = false, allowSvgFences = false, renderCitation, caret, finishingLabel = "Finishing…" }) => {
|
|
1943
2058
|
const options = useMemo(() => ({
|
|
1944
2059
|
highlight,
|
|
1945
2060
|
sortable,
|
|
@@ -1950,16 +2065,37 @@ const MarkdownBlock = ({ children, remarkPlugins, components: componentOverrides
|
|
|
1950
2065
|
diagramActions,
|
|
1951
2066
|
diagramDownload
|
|
1952
2067
|
]);
|
|
2068
|
+
const plugins = useMemo(() => [
|
|
2069
|
+
...baseRemarkPlugins,
|
|
2070
|
+
...renderCitation ? [remarkCitations] : [],
|
|
2071
|
+
...remarkPlugins ?? [],
|
|
2072
|
+
...caret ? [remarkStreamingCaret] : []
|
|
2073
|
+
], [
|
|
2074
|
+
renderCitation,
|
|
2075
|
+
remarkPlugins,
|
|
2076
|
+
caret
|
|
2077
|
+
]);
|
|
2078
|
+
const components = useMemo(() => ({
|
|
2079
|
+
...baseComponents,
|
|
2080
|
+
...renderCitation && { ["citation-marker"]: ({ id }) => renderCitation(id ?? "") },
|
|
2081
|
+
...caret && { ["streaming-caret"]: () => /* @__PURE__ */ jsx(StreamingCaret, {
|
|
2082
|
+
moment: caret,
|
|
2083
|
+
finishingLabel
|
|
2084
|
+
}) },
|
|
2085
|
+
...componentOverrides
|
|
2086
|
+
}), [
|
|
2087
|
+
renderCitation,
|
|
2088
|
+
componentOverrides,
|
|
2089
|
+
caret,
|
|
2090
|
+
finishingLabel
|
|
2091
|
+
]);
|
|
1953
2092
|
return /* @__PURE__ */ jsx(MarkdownOptionsContext, {
|
|
1954
2093
|
value: options,
|
|
1955
2094
|
children: /* @__PURE__ */ jsx(SvgFencesContext, {
|
|
1956
2095
|
value: allowSvgFences,
|
|
1957
2096
|
children: /* @__PURE__ */ jsx(ReactMarkdown, {
|
|
1958
|
-
remarkPlugins:
|
|
1959
|
-
components
|
|
1960
|
-
...baseComponents,
|
|
1961
|
-
...componentOverrides
|
|
1962
|
-
},
|
|
2097
|
+
remarkPlugins: plugins,
|
|
2098
|
+
components,
|
|
1963
2099
|
children
|
|
1964
2100
|
})
|
|
1965
2101
|
})
|
|
@@ -1970,16 +2106,17 @@ const MarkdownBlock = ({ children, remarkPlugins, components: componentOverrides
|
|
|
1970
2106
|
*
|
|
1971
2107
|
* - Needs a `TooltipProvider` at the app root (code copy button).
|
|
1972
2108
|
* - Pass `rhythm="chrome"` for content a model did not write.
|
|
2109
|
+
* - Pass `headingScale="compact"` for headings sized to a chat answer.
|
|
1973
2110
|
*/
|
|
1974
|
-
const Markdown = ({ className, rhythm, ...blockProps }) => /* @__PURE__ */ jsx(MarkdownRoot, {
|
|
2111
|
+
const Markdown = ({ className, rhythm, headingScale, ...blockProps }) => /* @__PURE__ */ jsx(MarkdownRoot, {
|
|
1975
2112
|
className,
|
|
1976
2113
|
rhythm,
|
|
2114
|
+
headingScale,
|
|
1977
2115
|
children: /* @__PURE__ */ jsx(MarkdownBlock, { ...blockProps })
|
|
1978
2116
|
});
|
|
1979
2117
|
Markdown.Root = MarkdownRoot;
|
|
1980
2118
|
Markdown.Block = MarkdownBlock;
|
|
1981
|
-
|
|
1982
|
-
//#region src/blocks/AIKit/MarkdownTable.tsx
|
|
2119
|
+
// src/blocks/AIKit/MarkdownTable.tsx
|
|
1983
2120
|
/** How much wider than its column a table has to be before the column is the wrong surface. */
|
|
1984
2121
|
const EXPAND_RATIO = 1.5;
|
|
1985
2122
|
/**
|
|
@@ -2058,8 +2195,7 @@ const MarkdownTable = ({ children, actions, onExpand, surface = "card", sortable
|
|
|
2058
2195
|
})]
|
|
2059
2196
|
});
|
|
2060
2197
|
};
|
|
2061
|
-
|
|
2062
|
-
//#region src/blocks/AIKit/CollapsedMessageBody.tsx
|
|
2198
|
+
// src/blocks/AIKit/CollapsedMessageBody.tsx
|
|
2063
2199
|
/**
|
|
2064
2200
|
* Clips tall content at `maxHeight` behind a fade, with a Show more / Show less toggle.
|
|
2065
2201
|
*
|
|
@@ -2100,8 +2236,7 @@ const CollapsedMessageBody = ({ maxHeight, fadeClassName, children }) => {
|
|
|
2100
2236
|
})]
|
|
2101
2237
|
});
|
|
2102
2238
|
};
|
|
2103
|
-
|
|
2104
|
-
//#region src/blocks/AIKit/MessageDeliveryStatus.tsx
|
|
2239
|
+
// src/blocks/AIKit/MessageDeliveryStatus.tsx
|
|
2105
2240
|
/**
|
|
2106
2241
|
* Where a sent message stands, until it is delivered.
|
|
2107
2242
|
*
|
|
@@ -2125,8 +2260,7 @@ const MessageDeliveryStatus = ({ status, onRetry }) => {
|
|
|
2125
2260
|
})]
|
|
2126
2261
|
});
|
|
2127
2262
|
};
|
|
2128
|
-
|
|
2129
|
-
//#region src/blocks/AIKit/MessageTimestamp.tsx
|
|
2263
|
+
// src/blocks/AIKit/MessageTimestamp.tsx
|
|
2130
2264
|
const TIME_FORMAT = {
|
|
2131
2265
|
hour: "2-digit",
|
|
2132
2266
|
minute: "2-digit"
|
|
@@ -2147,8 +2281,7 @@ const MessageTimestamp = ({ createdAt }) => {
|
|
|
2147
2281
|
children: date.toLocaleTimeString([], TIME_FORMAT)
|
|
2148
2282
|
});
|
|
2149
2283
|
};
|
|
2150
|
-
|
|
2151
|
-
//#region src/blocks/AIKit/MessageBubble.tsx
|
|
2284
|
+
// src/blocks/AIKit/MessageBubble.tsx
|
|
2152
2285
|
const containerClasses = cva([
|
|
2153
2286
|
"tw:flex",
|
|
2154
2287
|
"tw:max-w-full",
|
|
@@ -2202,7 +2335,7 @@ const contentClasses = cva([
|
|
|
2202
2335
|
} },
|
|
2203
2336
|
defaultVariants: { variant: "assistant" }
|
|
2204
2337
|
});
|
|
2205
|
-
const MessageBubble = ({ variant, children, actions, createdAt, timestamp = "tooltip", quote, status, onRetry, author, collapseAfterPx, avatar }) => {
|
|
2338
|
+
const MessageBubble = ({ variant, children, actions, createdAt, timestamp = "tooltip", quote, status, onRetry, author, collapseAfterPx, footer, avatar }) => {
|
|
2206
2339
|
const isTimestampVisible = timestamp === "visible" && createdAt !== void 0;
|
|
2207
2340
|
const isSending = variant === "user" && status === "sending";
|
|
2208
2341
|
const deliveryStatus = variant === "user" && status ? /* @__PURE__ */ jsx(MessageDeliveryStatus, {
|
|
@@ -2235,6 +2368,7 @@ const MessageBubble = ({ variant, children, actions, createdAt, timestamp = "too
|
|
|
2235
2368
|
children: quote
|
|
2236
2369
|
}), body]
|
|
2237
2370
|
}),
|
|
2371
|
+
footer,
|
|
2238
2372
|
hasActionsRow ? /* @__PURE__ */ jsxs("div", {
|
|
2239
2373
|
className: "tw:flex tw:items-center tw:gap-2",
|
|
2240
2374
|
children: [
|
|
@@ -2249,8 +2383,7 @@ const MessageBubble = ({ variant, children, actions, createdAt, timestamp = "too
|
|
|
2249
2383
|
]
|
|
2250
2384
|
});
|
|
2251
2385
|
};
|
|
2252
|
-
|
|
2253
|
-
//#region src/blocks/AIKit/ModeChip.tsx
|
|
2386
|
+
// src/blocks/AIKit/ModeChip.tsx
|
|
2254
2387
|
/**
|
|
2255
2388
|
* A removable pill naming a mode the composer is in.
|
|
2256
2389
|
*
|
|
@@ -2285,8 +2418,7 @@ const ModeChip = ({ children, visible = true, tooltip, removeLabel, color = "amb
|
|
|
2285
2418
|
})
|
|
2286
2419
|
});
|
|
2287
2420
|
};
|
|
2288
|
-
|
|
2289
|
-
//#region src/blocks/AIKit/PlanApproval.tsx
|
|
2421
|
+
// src/blocks/AIKit/PlanApproval.tsx
|
|
2290
2422
|
const defaultStepCountLabel = (count) => `${count} step${count === 1 ? "" : "s"}`;
|
|
2291
2423
|
const STATUS_PILL_COLOR = {
|
|
2292
2424
|
pending: "green",
|
|
@@ -2594,8 +2726,7 @@ const PlanApproval = ({ status, statusLabel, statusMessage, title, summary, step
|
|
|
2594
2726
|
]
|
|
2595
2727
|
})] });
|
|
2596
2728
|
};
|
|
2597
|
-
|
|
2598
|
-
//#region src/blocks/AIKit/PlanRewritingIndicator.tsx
|
|
2729
|
+
// src/blocks/AIKit/PlanRewritingIndicator.tsx
|
|
2599
2730
|
const PlanRewritingIndicator = ({ label = "Rewriting the plan..." }) => /* @__PURE__ */ jsxs("div", {
|
|
2600
2731
|
className: "tw:flex tw:items-center tw:gap-2",
|
|
2601
2732
|
role: "status",
|
|
@@ -2605,8 +2736,7 @@ const PlanRewritingIndicator = ({ label = "Rewriting the plan..." }) => /* @__PU
|
|
|
2605
2736
|
children: label
|
|
2606
2737
|
})]
|
|
2607
2738
|
});
|
|
2608
|
-
|
|
2609
|
-
//#region src/blocks/AIKit/constants.ts
|
|
2739
|
+
// src/blocks/AIKit/constants.ts
|
|
2610
2740
|
/**
|
|
2611
2741
|
* Names the container query `PromptInput`'s `inline` row reads to fold into the stacked layout.
|
|
2612
2742
|
*
|
|
@@ -2615,8 +2745,7 @@ const PlanRewritingIndicator = ({ label = "Rewriting the plan..." }) => /* @__PU
|
|
|
2615
2745
|
* never names it keeps the one-line row at every width.
|
|
2616
2746
|
*/
|
|
2617
2747
|
const PROMPT_INPUT_CONTAINER = "tw:@container/composer";
|
|
2618
|
-
|
|
2619
|
-
//#region src/blocks/AIKit/AnimatedHeight.tsx
|
|
2748
|
+
// src/blocks/AIKit/AnimatedHeight.tsx
|
|
2620
2749
|
/**
|
|
2621
2750
|
* A box whose height eases to whatever its content measures.
|
|
2622
2751
|
*
|
|
@@ -2657,8 +2786,7 @@ const AnimatedHeight = ({ children, className }) => {
|
|
|
2657
2786
|
})
|
|
2658
2787
|
});
|
|
2659
2788
|
};
|
|
2660
|
-
|
|
2661
|
-
//#region src/blocks/AIKit/PromptInputAction.tsx
|
|
2789
|
+
// src/blocks/AIKit/PromptInputAction.tsx
|
|
2662
2790
|
const PromptInputAction = ({ ref, onMouseDown, ...rest }) => {
|
|
2663
2791
|
const handleOnMouseDown = (event) => {
|
|
2664
2792
|
event.stopPropagation();
|
|
@@ -2670,8 +2798,7 @@ const PromptInputAction = ({ ref, onMouseDown, ...rest }) => {
|
|
|
2670
2798
|
onMouseDown: handleOnMouseDown
|
|
2671
2799
|
});
|
|
2672
2800
|
};
|
|
2673
|
-
|
|
2674
|
-
//#region src/blocks/AIKit/PromptInputCommands.tsx
|
|
2801
|
+
// src/blocks/AIKit/PromptInputCommands.tsx
|
|
2675
2802
|
/** What the menu needs above or below the composer before it will open on that side. */
|
|
2676
2803
|
const MENU_HEIGHT = 440;
|
|
2677
2804
|
/** As tall as the list ever gets, however much room there is. */
|
|
@@ -2834,8 +2961,7 @@ const PromptInputCommands = ({ items, open, onSelect, filterValue, tabPicks = fa
|
|
|
2834
2961
|
}), children]
|
|
2835
2962
|
});
|
|
2836
2963
|
};
|
|
2837
|
-
|
|
2838
|
-
//#region src/blocks/AIKit/PromptInputMenuTrigger.tsx
|
|
2964
|
+
// src/blocks/AIKit/PromptInputMenuTrigger.tsx
|
|
2839
2965
|
/**
|
|
2840
2966
|
* The composer's "add to message" button.
|
|
2841
2967
|
*
|
|
@@ -2855,18 +2981,18 @@ const PromptInputMenuTrigger = ({ open = false, large = false, className, ref, .
|
|
|
2855
2981
|
...props,
|
|
2856
2982
|
children: /* @__PURE__ */ jsx(Plus, { className: cn(large ? "tw:size-5" : "tw:size-4", "tw:transition-transform tw:duration-300 tw:ease-out tw:motion-reduce:transition-none", open && "tw:rotate-135") })
|
|
2857
2983
|
}) });
|
|
2858
|
-
|
|
2859
|
-
//#region src/blocks/AIKit/PromptInputSubmit.tsx
|
|
2984
|
+
// src/blocks/AIKit/PromptInputSubmit.tsx
|
|
2860
2985
|
const ARIA_LABEL_BY_STATUS = {
|
|
2861
2986
|
ready: "Send message",
|
|
2862
2987
|
streaming: "Stop",
|
|
2863
2988
|
interrupted: "Continue",
|
|
2864
2989
|
submitted: "Sending…"
|
|
2865
2990
|
};
|
|
2866
|
-
const PromptInputSubmit = ({ ref, disabled, status = "ready" }) => {
|
|
2991
|
+
const PromptInputSubmit = ({ ref, disabled, status = "ready", sendIcon = "plane" }) => {
|
|
2867
2992
|
const icon = (() => {
|
|
2868
2993
|
if (status === "streaming") return /* @__PURE__ */ jsx(CirclePause, { className: "tw:size-4" });
|
|
2869
2994
|
if (status === "interrupted") return /* @__PURE__ */ jsx(Play, { className: "tw:size-4" });
|
|
2995
|
+
if (sendIcon === "arrow-up") return /* @__PURE__ */ jsx(ArrowUp, { className: "tw:size-4" });
|
|
2870
2996
|
return /* @__PURE__ */ jsx(Send, { className: "tw:size-4 tw:translate-x-[-1px] tw:translate-y-[1px]" });
|
|
2871
2997
|
})();
|
|
2872
2998
|
const getTooltipText = () => {
|
|
@@ -2892,8 +3018,7 @@ const PromptInputSubmit = ({ ref, disabled, status = "ready" }) => {
|
|
|
2892
3018
|
children: getTooltipText()
|
|
2893
3019
|
})] });
|
|
2894
3020
|
};
|
|
2895
|
-
|
|
2896
|
-
//#region src/blocks/AIKit/usePromptHistory.ts
|
|
3021
|
+
// src/blocks/AIKit/usePromptHistory.ts
|
|
2897
3022
|
/** The prompts ↑ steps through: blanks dropped, a prompt sent twice in a row kept once. */
|
|
2898
3023
|
const toRecallStack = (history) => history.reduce((stack, prompt) => {
|
|
2899
3024
|
if (prompt.trim() && stack.at(-1) !== prompt) stack.push(prompt);
|
|
@@ -2954,8 +3079,7 @@ const usePromptHistory = ({ history, value, onRecall }) => {
|
|
|
2954
3079
|
stop
|
|
2955
3080
|
};
|
|
2956
3081
|
};
|
|
2957
|
-
|
|
2958
|
-
//#region src/blocks/AIKit/PromptInput.tsx
|
|
3082
|
+
// src/blocks/AIKit/PromptInput.tsx
|
|
2959
3083
|
const CMDK_HIJACKED_KEYS = /* @__PURE__ */ new Set([
|
|
2960
3084
|
"ArrowUp",
|
|
2961
3085
|
"ArrowDown",
|
|
@@ -3044,7 +3168,7 @@ const wrapperVariants = cva(null, {
|
|
|
3044
3168
|
inline: ""
|
|
3045
3169
|
} }
|
|
3046
3170
|
});
|
|
3047
|
-
const PromptInput = ({ onSend, onAbort, onContinue, prefix, variant, suffix, attachments, className, shellClassName, onFocusChange, disabled, disableSubmit, busy = false, blurOnEscape = false, onKeyDown, onPasteFiles, canSubmitEmpty = false, allowSendWhileBusy = false, canAbort = true, value = "", onValueChange, status = "ready", maxRows = 6, minRows, commands, commandsEmptyText = "No commands found", commandsLoading = false, slashTrigger = "value", commandsGroupAction, panel, mentions, onMentionSelect, mentionInsert, mentionsEmptyText = "Nothing to attach", mentionsGroupHeading, mentionsMultiple = false, history, autoFocus, textareaRef: publishedRef, ...textareaProps }) => {
|
|
3171
|
+
const PromptInput = ({ onSend, onAbort, onContinue, prefix, variant, suffix, attachments, className, shellClassName, onFocusChange, disabled, disableSubmit, busy = false, blurOnEscape = false, onKeyDown, onPasteFiles, canSubmitEmpty = false, allowSendWhileBusy = false, canAbort = true, value = "", onValueChange, status = "ready", sendIcon, maxRows = 6, minRows, commands, commandsEmptyText = "No commands found", commandsLoading = false, slashTrigger = "value", commandsGroupAction, panel, mentions, onMentionSelect, mentionInsert, mentionsEmptyText = "Nothing to attach", mentionsGroupHeading, mentionsMultiple = false, history, autoFocus, textareaRef: publishedRef, ...textareaProps }) => {
|
|
3048
3172
|
const defaultMinRows = variant === "inline" ? 1 : 2;
|
|
3049
3173
|
const canSendWhileBusy = allowSendWhileBusy && (status === "streaming" || status === "submitted") && !busy && !disabled && !disableSubmit && value.trim() !== "";
|
|
3050
3174
|
const showSeparateStop = allowSendWhileBusy && canAbort && (canSendWhileBusy || status === "submitted");
|
|
@@ -3287,7 +3411,8 @@ const PromptInput = ({ onSend, onAbort, onContinue, prefix, variant, suffix, att
|
|
|
3287
3411
|
})] }),
|
|
3288
3412
|
/* @__PURE__ */ jsx(PromptInputSubmit, {
|
|
3289
3413
|
disabled: isDisabled,
|
|
3290
|
-
status: canSendWhileBusy ? "ready" : status
|
|
3414
|
+
status: canSendWhileBusy ? "ready" : status,
|
|
3415
|
+
sendIcon
|
|
3291
3416
|
})
|
|
3292
3417
|
]
|
|
3293
3418
|
})
|
|
@@ -3311,8 +3436,7 @@ const PromptInput = ({ onSend, onAbort, onContinue, prefix, variant, suffix, att
|
|
|
3311
3436
|
};
|
|
3312
3437
|
PromptInput.Action = PromptInputAction;
|
|
3313
3438
|
PromptInput.MenuTrigger = PromptInputMenuTrigger;
|
|
3314
|
-
|
|
3315
|
-
//#region src/blocks/AIKit/Question.tsx
|
|
3439
|
+
// src/blocks/AIKit/Question.tsx
|
|
3316
3440
|
const isEditableTarget$1 = (target) => target instanceof HTMLElement && (target.isContentEditable || [
|
|
3317
3441
|
"INPUT",
|
|
3318
3442
|
"TEXTAREA",
|
|
@@ -3726,8 +3850,7 @@ const Question = ({ question, header, options, multiSelect = true, selectedOptio
|
|
|
3726
3850
|
]
|
|
3727
3851
|
});
|
|
3728
3852
|
};
|
|
3729
|
-
|
|
3730
|
-
//#region src/blocks/AIKit/QuestionBlock.tsx
|
|
3853
|
+
// src/blocks/AIKit/QuestionBlock.tsx
|
|
3731
3854
|
const QuestionBlock = ({ steps, showSkip = true, onSubmit, onClose, renderPreview, className }) => {
|
|
3732
3855
|
const [currentStep, setCurrentStep] = useState(1);
|
|
3733
3856
|
const [selections, setSelections] = useState({});
|
|
@@ -3770,8 +3893,18 @@ const QuestionBlock = ({ steps, showSkip = true, onSubmit, onClose, renderPrevie
|
|
|
3770
3893
|
className
|
|
3771
3894
|
}, currentStep);
|
|
3772
3895
|
};
|
|
3773
|
-
|
|
3774
|
-
|
|
3896
|
+
/**
|
|
3897
|
+
* The fence languages `Markdown` draws instead of printing.
|
|
3898
|
+
*
|
|
3899
|
+
* - Streaming callers hold an open fence back as plain code, or every keystroke fetches the chunk.
|
|
3900
|
+
* - Frozen: it is shared across every app in the bundle.
|
|
3901
|
+
*/
|
|
3902
|
+
const DIAGRAM_LANGUAGES = Object.freeze([...[
|
|
3903
|
+
"mermaid",
|
|
3904
|
+
"flint",
|
|
3905
|
+
"flint-chart"
|
|
3906
|
+
]]);
|
|
3907
|
+
// src/blocks/AIKit/streamingMarkdown.ts
|
|
3775
3908
|
/** A fence delimiter line: up to three spaces, then three or more backticks or tildes. */
|
|
3776
3909
|
const FENCE_LINE = /^ {0,3}(`{3,}|~{3,})/;
|
|
3777
3910
|
/** A list-item marker: a bullet or a `1.`/`1)` ordinal, then a space or the line end. */
|
|
@@ -3922,8 +4055,7 @@ const withholdOpenTail = (text, { diagram = false, tableHead = false } = {}) =>
|
|
|
3922
4055
|
if (visible === null) return text;
|
|
3923
4056
|
return tableHead ? withholdTableHead(visible) : visible;
|
|
3924
4057
|
};
|
|
3925
|
-
|
|
3926
|
-
//#region src/blocks/AIKit/SuggestedPrompt.tsx
|
|
4058
|
+
// src/blocks/AIKit/SuggestedPrompt.tsx
|
|
3927
4059
|
const SuggestedPrompt = ({ label, disabled, onClick, icon, description, trailing, "aria-label": ariaLabel, variant = "row", className }) => {
|
|
3928
4060
|
return /* @__PURE__ */ jsxs("button", {
|
|
3929
4061
|
type: "button",
|
|
@@ -3955,8 +4087,7 @@ const SuggestedPrompt = ({ label, disabled, onClick, icon, description, trailing
|
|
|
3955
4087
|
]
|
|
3956
4088
|
});
|
|
3957
4089
|
};
|
|
3958
|
-
|
|
3959
|
-
//#region src/blocks/AIKit/ThinkingIndicator.tsx
|
|
4090
|
+
// src/blocks/AIKit/ThinkingIndicator.tsx
|
|
3960
4091
|
/**
|
|
3961
4092
|
* The agent's turn is in flight and has nothing to show yet.
|
|
3962
4093
|
*
|
|
@@ -3980,8 +4111,7 @@ const ThinkingIndicator = ({ label = "Thinking..." }) => {
|
|
|
3980
4111
|
})]
|
|
3981
4112
|
});
|
|
3982
4113
|
};
|
|
3983
|
-
|
|
3984
|
-
//#region src/blocks/AIKit/ToolCall/ToolCallApprovalActions.tsx
|
|
4114
|
+
// src/blocks/AIKit/ToolCall/ToolCallApprovalActions.tsx
|
|
3985
4115
|
const ShortcutHint = ({ shortcutKey }) => /* @__PURE__ */ jsxs(Kbd.Group, {
|
|
3986
4116
|
separator: "+",
|
|
3987
4117
|
children: [shortcutKey === "mod-enter" && /* @__PURE__ */ jsx(Kbd, {
|
|
@@ -4037,8 +4167,7 @@ const ToolCallApprovalActions = ({ onApprove, onReject, extraAction, approveLabe
|
|
|
4037
4167
|
]
|
|
4038
4168
|
});
|
|
4039
4169
|
};
|
|
4040
|
-
|
|
4041
|
-
//#region src/blocks/AIKit/ToolCall/ToolCallApprovalNotice.tsx
|
|
4170
|
+
// src/blocks/AIKit/ToolCall/ToolCallApprovalNotice.tsx
|
|
4042
4171
|
const TONE = {
|
|
4043
4172
|
warning: {
|
|
4044
4173
|
icon: TriangleAlert,
|
|
@@ -4068,8 +4197,7 @@ const ToolCallApprovalNotice = ({ tone, content, icon }) => {
|
|
|
4068
4197
|
})]
|
|
4069
4198
|
});
|
|
4070
4199
|
};
|
|
4071
|
-
|
|
4072
|
-
//#region src/blocks/AIKit/ToolCall/ToolCallApprovalRecord.tsx
|
|
4200
|
+
// src/blocks/AIKit/ToolCall/ToolCallApprovalRecord.tsx
|
|
4073
4201
|
const ToolCallApprovalRecord = ({ status, label, subject, resolvedBy, resolvedAt, className }) => {
|
|
4074
4202
|
const isApproved = status === "approved";
|
|
4075
4203
|
const Icon = isApproved ? CircleCheck : CircleX;
|
|
@@ -4101,8 +4229,7 @@ const ToolCallApprovalRecord = ({ status, label, subject, resolvedBy, resolvedAt
|
|
|
4101
4229
|
})]
|
|
4102
4230
|
});
|
|
4103
4231
|
};
|
|
4104
|
-
|
|
4105
|
-
//#region src/blocks/AIKit/ToolCall/toolCallApprovalStatus.ts
|
|
4232
|
+
// src/blocks/AIKit/ToolCall/toolCallApprovalStatus.ts
|
|
4106
4233
|
const STATUS_BADGE = {
|
|
4107
4234
|
pending: {
|
|
4108
4235
|
label: "Needs approval",
|
|
@@ -4133,8 +4260,7 @@ const STATUS_BADGE = {
|
|
|
4133
4260
|
color: "gray"
|
|
4134
4261
|
}
|
|
4135
4262
|
};
|
|
4136
|
-
|
|
4137
|
-
//#region src/blocks/AIKit/ToolCall/useApprovalShortcut.ts
|
|
4263
|
+
// src/blocks/AIKit/ToolCall/useApprovalShortcut.ts
|
|
4138
4264
|
const isEditableTarget = (target) => target instanceof HTMLElement && (target.isContentEditable || target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.tagName === "SELECT");
|
|
4139
4265
|
const isModPressed = (event) => isMac ? event.metaKey : event.ctrlKey;
|
|
4140
4266
|
const matchesShortcut = (event, shortcutKey) => {
|
|
@@ -4165,8 +4291,7 @@ const useApprovalShortcut = ({ shortcutKey, isEnabled, onApprove }) => {
|
|
|
4165
4291
|
onApprove
|
|
4166
4292
|
]);
|
|
4167
4293
|
};
|
|
4168
|
-
|
|
4169
|
-
//#region src/blocks/AIKit/ToolCall/ToolCallApproval.tsx
|
|
4294
|
+
// src/blocks/AIKit/ToolCall/ToolCallApproval.tsx
|
|
4170
4295
|
/**
|
|
4171
4296
|
* Per-tool-call approve/reject frame — the granular sibling of `PlanApproval`.
|
|
4172
4297
|
*
|
|
@@ -4269,8 +4394,7 @@ const ToolCallApproval = ({ status, statusLabel, statusMessage, density = "card"
|
|
|
4269
4394
|
})]
|
|
4270
4395
|
});
|
|
4271
4396
|
};
|
|
4272
|
-
|
|
4273
|
-
//#region src/blocks/AIKit/ToolCall/ToolCallChip.tsx
|
|
4397
|
+
// src/blocks/AIKit/ToolCall/ToolCallChip.tsx
|
|
4274
4398
|
const chipClasses = cva(["tw:inline-flex tw:items-center tw:gap-1.5 tw:rounded-md tw:border tw:border-solid", "tw:border-border tw:bg-muted tw:px-2 tw:py-1 tw:text-xs tw:text-foreground"], {
|
|
4275
4399
|
variants: { interactive: {
|
|
4276
4400
|
true: "tw:cursor-pointer tw:focus-visible:outline-hidden tw:focus-visible:ring-2 tw:focus-visible:ring-ring tw:not-disabled:hover:bg-hover",
|
|
@@ -4315,8 +4439,7 @@ const ToolCallChip = ({ label, state, icon, trailing, onClick, className }) => {
|
|
|
4315
4439
|
children: content
|
|
4316
4440
|
});
|
|
4317
4441
|
};
|
|
4318
|
-
|
|
4319
|
-
//#region src/blocks/AIKit/ToolCallStatusHeader.tsx
|
|
4442
|
+
// src/blocks/AIKit/ToolCallStatusHeader.tsx
|
|
4320
4443
|
const headerVariants = cva("tw:flex tw:items-center tw:justify-between tw:gap-2 tw:px-2.5 tw:py-1.5", {
|
|
4321
4444
|
variants: { status: {
|
|
4322
4445
|
processing: "tw:border-b tw:border-border/60",
|
|
@@ -4372,8 +4495,7 @@ const ToolCallStatusHeader = ({ icon: IconComponent, iconSpin, status, text, nee
|
|
|
4372
4495
|
})]
|
|
4373
4496
|
});
|
|
4374
4497
|
};
|
|
4375
|
-
|
|
4376
|
-
//#region src/blocks/AIKit/usageStatsHelpers.ts
|
|
4498
|
+
// src/blocks/AIKit/usageStatsHelpers.ts
|
|
4377
4499
|
/**
|
|
4378
4500
|
* Clamp a percentage to 0–100 and normalize non-finite input to 0.
|
|
4379
4501
|
*
|
|
@@ -4395,8 +4517,7 @@ const formatPercentage = (value) => {
|
|
|
4395
4517
|
const rounded = Math.round(value);
|
|
4396
4518
|
return `${value < 100 ? Math.min(rounded, 99) : rounded}%`;
|
|
4397
4519
|
};
|
|
4398
|
-
|
|
4399
|
-
//#region src/blocks/AIKit/UsageBar.tsx
|
|
4520
|
+
// src/blocks/AIKit/UsageBar.tsx
|
|
4400
4521
|
/**
|
|
4401
4522
|
* One budget, as a labelled row over a bar.
|
|
4402
4523
|
*
|
|
@@ -4414,8 +4535,7 @@ const UsageBar = ({ value, label, variant, className, ...props }) => /* @__PURE_
|
|
|
4414
4535
|
value: clampPercentage(value)
|
|
4415
4536
|
})]
|
|
4416
4537
|
});
|
|
4417
|
-
|
|
4418
|
-
//#region src/blocks/AIKit/UsageStatsRing.tsx
|
|
4538
|
+
// src/blocks/AIKit/UsageStatsRing.tsx
|
|
4419
4539
|
const UsageStatsRing = ({ value, size = 16, strokeWidth = 2.5, className }) => {
|
|
4420
4540
|
const radius = Math.max(0, (size - strokeWidth) / 2 - 1);
|
|
4421
4541
|
const circumference = 2 * Math.PI * radius;
|
|
@@ -4446,8 +4566,7 @@ const UsageStatsRing = ({ value, size = 16, strokeWidth = 2.5, className }) => {
|
|
|
4446
4566
|
})]
|
|
4447
4567
|
});
|
|
4448
4568
|
};
|
|
4449
|
-
|
|
4450
|
-
//#region src/blocks/AIKit/UsageStats.tsx
|
|
4569
|
+
// src/blocks/AIKit/UsageStats.tsx
|
|
4451
4570
|
const UsageStats = ({ value, alert = false, children, className, ariaLabel, align = "end", side = "top", sideOffset = 8, open, onOpenChange }) => {
|
|
4452
4571
|
const hasAlert = Boolean(alert);
|
|
4453
4572
|
const isWarning = alert === "warning";
|
|
@@ -4474,7 +4593,6 @@ const UsageStats = ({ value, alert = false, children, className, ariaLabel, alig
|
|
|
4474
4593
|
})]
|
|
4475
4594
|
});
|
|
4476
4595
|
};
|
|
4477
|
-
|
|
4478
|
-
export { ANSWER_SOURCES_VISIBLE, AnswerActions, AnswerSources, AnswerSummary, AttachmentChip, CONTEXT_CHIP_EXPANDABLE_LENGTH, ChatInlineIcon, ChatNotice, CollapsibleStepHeader, ContextChip, DIAGRAM_LANGUAGES, FileDownloadChip, FileGallery, InlineStepDetail, InlineStepGroup, InlineStepLabel, JumpToLatest, Markdown, MarkdownTable, MessageBubble, ModeChip, PROMPT_INPUT_CONTAINER, PlanApproval, PlanRewritingIndicator, PromptInput, Question, QuestionBlock, SourceChip, SuggestedPrompt, ThinkingIndicator, ToolCallApproval, ToolCallChip, ToolCallStatusHeader, UsageBar, UsageStats, UsageStatsRing, clampPercentage, findMentionToken, findSlashToken, formatPercentage, getChatInlineIconName, splitSealedBlocks, withholdOpenTail };
|
|
4596
|
+
export { ANSWER_SOURCES_VISIBLE, AnswerActions, AnswerSources, AnswerSummary, AttachmentChip, CONTEXT_CHIP_EXPANDABLE_LENGTH, ChatInlineIcon, ChatNotice, CollapsibleStepHeader, ContextChip, FileDownloadChip, FileGallery, InlineStepDetail, InlineStepGroup, InlineStepLabel, JumpToLatest, Markdown, MarkdownTable, MessageBubble, ModeChip, PROMPT_INPUT_CONTAINER, PlanApproval, PlanRewritingIndicator, PromptInput, Question, QuestionBlock, SourceChip, SuggestedPrompt, ThinkingIndicator, ToolCallApproval, ToolCallChip, ToolCallStatusHeader, UsageBar, UsageStats, clampPercentage, findMentionToken, findSlashToken, formatPercentage, getChatInlineIconName, splitSealedBlocks, withholdOpenTail };
|
|
4479
4597
|
|
|
4480
|
-
//# sourceMappingURL=AIKit-
|
|
4598
|
+
//# sourceMappingURL=AIKit-Cf5plya2.js.map
|