@womp/kookie-ui 0.8.1 → 0.9.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/AUTHORS +4 -0
- package/components.css +168 -0
- package/dist/cjs/components/chatbar.d.ts +52 -1
- package/dist/cjs/components/chatbar.d.ts.map +1 -1
- package/dist/cjs/components/chatbar.js +2 -2
- package/dist/cjs/components/chatbar.js.map +4 -4
- package/dist/cjs/components/index.d.ts +2 -0
- package/dist/cjs/components/index.d.ts.map +1 -1
- package/dist/cjs/components/index.js +5 -5
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/components/message-scroller.d.ts +86 -0
- package/dist/cjs/components/message-scroller.d.ts.map +1 -0
- package/dist/cjs/components/message-scroller.js +5 -0
- package/dist/cjs/components/message-scroller.js.map +7 -0
- package/dist/cjs/components/notice.d.ts +67 -0
- package/dist/cjs/components/notice.d.ts.map +1 -0
- package/dist/cjs/components/notice.js +5 -0
- package/dist/cjs/components/notice.js.map +7 -0
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/{chunk-WGWUEU4K.js → chunk-2I7QRVJ5.js} +2 -2
- package/dist/esm/{chunk-EHBAK3LQ.js → chunk-43A5GUSI.js} +2 -2
- package/dist/esm/{chunk-FEAOFF77.js → chunk-47LMOIW3.js} +2 -2
- package/dist/esm/chunk-4JQZUQY7.js +2 -0
- package/dist/esm/{chunk-O4CSXNST.js → chunk-4ME6O27S.js} +2 -2
- package/dist/esm/{chunk-OEEF6KJG.js → chunk-4XGGX2V2.js} +2 -2
- package/dist/esm/{chunk-26I257HE.js → chunk-4XKK32M4.js} +2 -2
- package/dist/esm/{chunk-MM5IHQFM.js → chunk-4YFJWXL2.js} +2 -2
- package/dist/esm/{chunk-5TAHT6VC.js → chunk-5WRCK4R7.js} +2 -2
- package/dist/esm/{chunk-POG3YABW.js → chunk-65GAANJD.js} +2 -2
- package/dist/esm/{chunk-UBSLEGQZ.js → chunk-6FLLFCBU.js} +2 -2
- package/dist/esm/{chunk-KV4SZP3F.js → chunk-73QGEY2I.js} +2 -2
- package/dist/esm/{chunk-WQCB7KSH.js → chunk-7FC7HF76.js} +2 -2
- package/dist/esm/{chunk-UNWPH3SO.js → chunk-7RQNB63F.js} +2 -2
- package/dist/esm/{chunk-CRBOJ7N7.js → chunk-7UHKEJ7Q.js} +2 -2
- package/dist/esm/{chunk-OJSOX3AX.js → chunk-ABSKRHVM.js} +2 -2
- package/dist/esm/{chunk-7FKKGUHK.js → chunk-AGSSWWFI.js} +2 -2
- package/dist/esm/{chunk-W2LD2YE6.js → chunk-ALWNS44Q.js} +2 -2
- package/dist/esm/{chunk-Z7AZNMNX.js → chunk-BW5CO4PZ.js} +2 -2
- package/dist/esm/{chunk-KEEPKI2X.js → chunk-CDG5WH4U.js} +2 -2
- package/dist/esm/{chunk-IK3MQHA5.js → chunk-CIYF56YS.js} +2 -2
- package/dist/esm/{chunk-JDEBKA56.js → chunk-CKMMUHKE.js} +2 -2
- package/dist/esm/{chunk-TLGXIWAS.js → chunk-CRTH5LNU.js} +2 -2
- package/dist/esm/{chunk-NTNMJX5M.js → chunk-CSKZZOI2.js} +2 -2
- package/dist/esm/{chunk-4WU2WKUJ.js → chunk-CTA5ODAO.js} +2 -2
- package/dist/esm/{chunk-PDUHBDFC.js → chunk-DSJY5RI3.js} +2 -2
- package/dist/esm/{chunk-JDWCQ2XP.js → chunk-E67CIG6A.js} +2 -2
- package/dist/esm/{chunk-WIDJYVZF.js → chunk-EPTYNVCU.js} +2 -2
- package/dist/esm/{chunk-HMSSFU6I.js → chunk-ERY5TH2M.js} +2 -2
- package/dist/esm/{chunk-LJCUPAOI.js → chunk-FG7XM7KJ.js} +2 -2
- package/dist/esm/{chunk-ZJ33QP5N.js → chunk-FHOCUZDR.js} +2 -2
- package/dist/esm/{chunk-2Q7BJ7YG.js → chunk-GLERJXVS.js} +2 -2
- package/dist/esm/{chunk-PYXMGEO7.js → chunk-GO7OHBHW.js} +2 -2
- package/dist/esm/{chunk-OQU2SKLN.js → chunk-HF5WY5YE.js} +2 -2
- package/dist/esm/{chunk-25X75TI7.js → chunk-HJU4I34X.js} +2 -2
- package/dist/esm/{chunk-CBNTPHYK.js → chunk-IHK3H2OM.js} +2 -2
- package/dist/esm/{chunk-C5RVO3C3.js → chunk-JDGJSNWT.js} +2 -2
- package/dist/esm/chunk-JKS2YXMS.js +1 -0
- package/dist/esm/{chunk-PBFSBHBS.js → chunk-JUY7CBSL.js} +2 -2
- package/dist/esm/{chunk-F3AXE27Q.js → chunk-K3UAS7RW.js} +2 -2
- package/dist/esm/{chunk-FB3PD4Z3.js → chunk-KFR3CK24.js} +2 -2
- package/dist/esm/{chunk-AIHQ3MVK.js → chunk-KJUDZCYK.js} +2 -2
- package/dist/esm/{chunk-JRFZ535T.js → chunk-KMPE7TJ6.js} +2 -2
- package/dist/esm/{chunk-5M7STAH3.js → chunk-KZWNGWIM.js} +2 -2
- package/dist/esm/{chunk-H4GR4262.js → chunk-LXWPEDPZ.js} +2 -2
- package/dist/esm/chunk-MCQCG6AS.js +2 -0
- package/dist/esm/{chunk-JQW4XYBS.js → chunk-MEO7MJMQ.js} +2 -2
- package/dist/esm/{chunk-QJVAS7AK.js → chunk-MS5J4MF6.js} +2 -2
- package/dist/esm/{chunk-44JZYS7A.js → chunk-MWIIGYAJ.js} +2 -2
- package/dist/esm/{chunk-MBCQA7UZ.js → chunk-N4GTDLRD.js} +2 -2
- package/dist/esm/{chunk-NV3P2CKH.js → chunk-NIM7DIVH.js} +2 -2
- package/dist/esm/{chunk-ZW26J2SA.js → chunk-OGXZHAQL.js} +2 -2
- package/dist/esm/{chunk-WJBOOAIO.js → chunk-OLAWVEAI.js} +2 -2
- package/dist/esm/{chunk-JQSZF3E2.js → chunk-OMGZG52I.js} +2 -2
- package/dist/esm/{chunk-HBIF43PT.js → chunk-PHC3QBV3.js} +2 -2
- package/dist/esm/{chunk-OTKQN2KY.js → chunk-PZ7OYATT.js} +2 -2
- package/dist/esm/{chunk-P27KV2LS.js → chunk-QWVU2TW4.js} +2 -2
- package/dist/esm/chunk-RJP5QUXO.js +2 -0
- package/dist/esm/chunk-RJP5QUXO.js.map +7 -0
- package/dist/esm/{chunk-6J6YX2VX.js → chunk-RNTCHVFI.js} +2 -2
- package/dist/esm/{chunk-IDUVJJYG.js → chunk-S5C5YRBS.js} +2 -2
- package/dist/esm/{chunk-RY67WG3O.js → chunk-T4OR62DQ.js} +2 -2
- package/dist/esm/{chunk-AO32NT75.js → chunk-UBOOUDS4.js} +2 -2
- package/dist/esm/{chunk-DCIQHXAR.js → chunk-VHECAEUP.js} +2 -2
- package/dist/esm/{chunk-QEGEUD4D.js → chunk-VNH7BJOA.js} +2 -2
- package/dist/esm/{chunk-GGSJXOKR.js → chunk-VR7ZAFYN.js} +2 -2
- package/dist/esm/{chunk-ODCVOXEV.js → chunk-VX6ARMWP.js} +2 -2
- package/dist/esm/{chunk-G4YKBAZT.js → chunk-VZSQATP6.js} +2 -2
- package/dist/esm/chunk-W4WWN3RC.js +2 -0
- package/dist/esm/chunk-W4WWN3RC.js.map +7 -0
- package/dist/esm/{chunk-YVSM2LGS.js → chunk-WGYUWEQV.js} +2 -2
- package/dist/esm/{chunk-7NYODT3Z.js → chunk-WHFJ4JUN.js} +2 -2
- package/dist/esm/{chunk-YG66IRW4.js → chunk-X3JM2565.js} +2 -2
- package/dist/esm/chunk-XI5YXUCK.js +2 -0
- package/dist/esm/{chunk-NQXRWBQM.js → chunk-Y5RCH23Z.js} +2 -2
- package/dist/esm/{chunk-WZFVTC7P.js → chunk-YBSRX63K.js} +2 -2
- package/dist/esm/{chunk-VUNNS3ZU.js → chunk-YQRSAP46.js} +2 -2
- package/dist/esm/chunk-YTD3AJAU.js +2 -0
- package/dist/esm/chunk-YTD3AJAU.js.map +7 -0
- package/dist/esm/{chunk-GDAKJS64.js → chunk-YWENWZOU.js} +2 -2
- package/dist/esm/{chunk-7PMMYHZV.js → chunk-ZOY43B55.js} +2 -2
- package/dist/esm/{chunk-VTIL55SR.js → chunk-ZZLZGHZQ.js} +2 -2
- package/dist/esm/components/_internal/base-button.js +1 -1
- package/dist/esm/components/_internal/base-menu.utils.js +1 -1
- package/dist/esm/components/_internal/menu-context.js +1 -1
- package/dist/esm/components/accordion.js +1 -1
- package/dist/esm/components/alert-dialog.js +1 -1
- package/dist/esm/components/avatar.js +1 -1
- package/dist/esm/components/badge.js +1 -1
- package/dist/esm/components/blockquote.js +1 -1
- package/dist/esm/components/blockquote.props.js +1 -1
- package/dist/esm/components/box.js +1 -1
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/callout.js +1 -1
- package/dist/esm/components/card.js +1 -1
- package/dist/esm/components/chatbar.d.ts +52 -1
- package/dist/esm/components/chatbar.d.ts.map +1 -1
- package/dist/esm/components/chatbar.js +1 -1
- package/dist/esm/components/checkbox-cards.js +1 -1
- package/dist/esm/components/checkbox-group.js +1 -1
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/code.js +1 -1
- package/dist/esm/components/code.props.js +1 -1
- package/dist/esm/components/combobox.js +1 -1
- package/dist/esm/components/container.js +1 -1
- package/dist/esm/components/context-menu.js +1 -1
- package/dist/esm/components/data-list.js +1 -1
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dropdown-menu.js +1 -1
- package/dist/esm/components/em.js +1 -1
- package/dist/esm/components/em.props.js +1 -1
- package/dist/esm/components/flex.js +1 -1
- package/dist/esm/components/grid.js +1 -1
- package/dist/esm/components/heading.js +1 -1
- package/dist/esm/components/heading.props.js +1 -1
- package/dist/esm/components/hover-card.js +1 -1
- package/dist/esm/components/icon-button.js +1 -1
- package/dist/esm/components/image.js +1 -1
- package/dist/esm/components/index.d.ts +2 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/inset.js +1 -1
- package/dist/esm/components/kbd.js +1 -1
- package/dist/esm/components/link.js +1 -1
- package/dist/esm/components/link.props.js +1 -1
- package/dist/esm/components/message-scroller.d.ts +86 -0
- package/dist/esm/components/message-scroller.d.ts.map +1 -0
- package/dist/esm/components/message-scroller.js +2 -0
- package/dist/esm/components/message-scroller.js.map +7 -0
- package/dist/esm/components/navbar.js +1 -1
- package/dist/esm/components/notice.d.ts +67 -0
- package/dist/esm/components/notice.d.ts.map +1 -0
- package/dist/esm/components/notice.js +2 -0
- package/dist/esm/components/notice.js.map +7 -0
- package/dist/esm/components/popover.js +1 -1
- package/dist/esm/components/progress.js +1 -1
- package/dist/esm/components/quote.js +1 -1
- package/dist/esm/components/quote.props.js +1 -1
- package/dist/esm/components/radio-cards.js +1 -1
- package/dist/esm/components/radio-group.js +1 -1
- package/dist/esm/components/radio.js +1 -1
- package/dist/esm/components/schemas/index.js +1 -1
- package/dist/esm/components/scroll-area.js +1 -1
- package/dist/esm/components/section.js +1 -1
- package/dist/esm/components/segmented-control.js +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/separator.js +1 -1
- package/dist/esm/components/sheet.js +1 -1
- package/dist/esm/components/sidebar.js +1 -1
- package/dist/esm/components/skeleton.js +1 -1
- package/dist/esm/components/slider.js +1 -1
- package/dist/esm/components/spinner.js +1 -1
- package/dist/esm/components/strong.js +1 -1
- package/dist/esm/components/strong.props.js +1 -1
- package/dist/esm/components/switch.js +1 -1
- package/dist/esm/components/tab-nav.js +1 -1
- package/dist/esm/components/table.js +1 -1
- package/dist/esm/components/tabs.js +1 -1
- package/dist/esm/components/text-area.js +1 -1
- package/dist/esm/components/text-field.js +1 -1
- package/dist/esm/components/text.js +1 -1
- package/dist/esm/components/text.props.js +1 -1
- package/dist/esm/components/theme-panel.js +1 -1
- package/dist/esm/components/toggle-button.js +1 -1
- package/dist/esm/components/toggle-icon-button.js +1 -1
- package/dist/esm/components/toolbar.js +1 -1
- package/dist/esm/components/tooltip.js +1 -1
- package/dist/esm/components/user-card.js +1 -1
- package/dist/esm/components/virtual-menu.js +1 -1
- package/dist/esm/helpers/extract-props.js +1 -1
- package/dist/esm/helpers/get-margin-styles.js +1 -1
- package/dist/esm/helpers/get-responsive-styles.js +1 -1
- package/dist/esm/helpers/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/props/index.js +1 -1
- package/package.json +2 -1
- package/src/components/chatbar.css +24 -0
- package/src/components/chatbar.tsx +102 -15
- package/src/components/index.css +2 -0
- package/src/components/index.tsx +7 -0
- package/src/components/message-scroller.css +54 -0
- package/src/components/message-scroller.tsx +165 -0
- package/src/components/notice.css +91 -0
- package/src/components/notice.tsx +151 -0
- package/styles.css +168 -0
- package/dist/esm/chunk-3PTSRBVY.js +0 -2
- package/dist/esm/chunk-3PTSRBVY.js.map +0 -7
- package/dist/esm/chunk-GM7KMQDI.js +0 -2
- package/dist/esm/chunk-QDW5ZG5E.js +0 -1
- package/dist/esm/chunk-QEL55MLF.js +0 -2
- package/dist/esm/chunk-XDDKT4NF.js +0 -2
- /package/dist/esm/{chunk-WGWUEU4K.js.map → chunk-2I7QRVJ5.js.map} +0 -0
- /package/dist/esm/{chunk-EHBAK3LQ.js.map → chunk-43A5GUSI.js.map} +0 -0
- /package/dist/esm/{chunk-FEAOFF77.js.map → chunk-47LMOIW3.js.map} +0 -0
- /package/dist/esm/{chunk-GM7KMQDI.js.map → chunk-4JQZUQY7.js.map} +0 -0
- /package/dist/esm/{chunk-O4CSXNST.js.map → chunk-4ME6O27S.js.map} +0 -0
- /package/dist/esm/{chunk-OEEF6KJG.js.map → chunk-4XGGX2V2.js.map} +0 -0
- /package/dist/esm/{chunk-26I257HE.js.map → chunk-4XKK32M4.js.map} +0 -0
- /package/dist/esm/{chunk-MM5IHQFM.js.map → chunk-4YFJWXL2.js.map} +0 -0
- /package/dist/esm/{chunk-5TAHT6VC.js.map → chunk-5WRCK4R7.js.map} +0 -0
- /package/dist/esm/{chunk-POG3YABW.js.map → chunk-65GAANJD.js.map} +0 -0
- /package/dist/esm/{chunk-UBSLEGQZ.js.map → chunk-6FLLFCBU.js.map} +0 -0
- /package/dist/esm/{chunk-KV4SZP3F.js.map → chunk-73QGEY2I.js.map} +0 -0
- /package/dist/esm/{chunk-WQCB7KSH.js.map → chunk-7FC7HF76.js.map} +0 -0
- /package/dist/esm/{chunk-UNWPH3SO.js.map → chunk-7RQNB63F.js.map} +0 -0
- /package/dist/esm/{chunk-CRBOJ7N7.js.map → chunk-7UHKEJ7Q.js.map} +0 -0
- /package/dist/esm/{chunk-OJSOX3AX.js.map → chunk-ABSKRHVM.js.map} +0 -0
- /package/dist/esm/{chunk-7FKKGUHK.js.map → chunk-AGSSWWFI.js.map} +0 -0
- /package/dist/esm/{chunk-W2LD2YE6.js.map → chunk-ALWNS44Q.js.map} +0 -0
- /package/dist/esm/{chunk-Z7AZNMNX.js.map → chunk-BW5CO4PZ.js.map} +0 -0
- /package/dist/esm/{chunk-KEEPKI2X.js.map → chunk-CDG5WH4U.js.map} +0 -0
- /package/dist/esm/{chunk-IK3MQHA5.js.map → chunk-CIYF56YS.js.map} +0 -0
- /package/dist/esm/{chunk-JDEBKA56.js.map → chunk-CKMMUHKE.js.map} +0 -0
- /package/dist/esm/{chunk-TLGXIWAS.js.map → chunk-CRTH5LNU.js.map} +0 -0
- /package/dist/esm/{chunk-NTNMJX5M.js.map → chunk-CSKZZOI2.js.map} +0 -0
- /package/dist/esm/{chunk-4WU2WKUJ.js.map → chunk-CTA5ODAO.js.map} +0 -0
- /package/dist/esm/{chunk-PDUHBDFC.js.map → chunk-DSJY5RI3.js.map} +0 -0
- /package/dist/esm/{chunk-JDWCQ2XP.js.map → chunk-E67CIG6A.js.map} +0 -0
- /package/dist/esm/{chunk-WIDJYVZF.js.map → chunk-EPTYNVCU.js.map} +0 -0
- /package/dist/esm/{chunk-HMSSFU6I.js.map → chunk-ERY5TH2M.js.map} +0 -0
- /package/dist/esm/{chunk-LJCUPAOI.js.map → chunk-FG7XM7KJ.js.map} +0 -0
- /package/dist/esm/{chunk-ZJ33QP5N.js.map → chunk-FHOCUZDR.js.map} +0 -0
- /package/dist/esm/{chunk-2Q7BJ7YG.js.map → chunk-GLERJXVS.js.map} +0 -0
- /package/dist/esm/{chunk-PYXMGEO7.js.map → chunk-GO7OHBHW.js.map} +0 -0
- /package/dist/esm/{chunk-OQU2SKLN.js.map → chunk-HF5WY5YE.js.map} +0 -0
- /package/dist/esm/{chunk-25X75TI7.js.map → chunk-HJU4I34X.js.map} +0 -0
- /package/dist/esm/{chunk-CBNTPHYK.js.map → chunk-IHK3H2OM.js.map} +0 -0
- /package/dist/esm/{chunk-C5RVO3C3.js.map → chunk-JDGJSNWT.js.map} +0 -0
- /package/dist/esm/{chunk-QDW5ZG5E.js.map → chunk-JKS2YXMS.js.map} +0 -0
- /package/dist/esm/{chunk-PBFSBHBS.js.map → chunk-JUY7CBSL.js.map} +0 -0
- /package/dist/esm/{chunk-F3AXE27Q.js.map → chunk-K3UAS7RW.js.map} +0 -0
- /package/dist/esm/{chunk-FB3PD4Z3.js.map → chunk-KFR3CK24.js.map} +0 -0
- /package/dist/esm/{chunk-AIHQ3MVK.js.map → chunk-KJUDZCYK.js.map} +0 -0
- /package/dist/esm/{chunk-JRFZ535T.js.map → chunk-KMPE7TJ6.js.map} +0 -0
- /package/dist/esm/{chunk-5M7STAH3.js.map → chunk-KZWNGWIM.js.map} +0 -0
- /package/dist/esm/{chunk-H4GR4262.js.map → chunk-LXWPEDPZ.js.map} +0 -0
- /package/dist/esm/{chunk-QEL55MLF.js.map → chunk-MCQCG6AS.js.map} +0 -0
- /package/dist/esm/{chunk-JQW4XYBS.js.map → chunk-MEO7MJMQ.js.map} +0 -0
- /package/dist/esm/{chunk-QJVAS7AK.js.map → chunk-MS5J4MF6.js.map} +0 -0
- /package/dist/esm/{chunk-44JZYS7A.js.map → chunk-MWIIGYAJ.js.map} +0 -0
- /package/dist/esm/{chunk-MBCQA7UZ.js.map → chunk-N4GTDLRD.js.map} +0 -0
- /package/dist/esm/{chunk-NV3P2CKH.js.map → chunk-NIM7DIVH.js.map} +0 -0
- /package/dist/esm/{chunk-ZW26J2SA.js.map → chunk-OGXZHAQL.js.map} +0 -0
- /package/dist/esm/{chunk-WJBOOAIO.js.map → chunk-OLAWVEAI.js.map} +0 -0
- /package/dist/esm/{chunk-JQSZF3E2.js.map → chunk-OMGZG52I.js.map} +0 -0
- /package/dist/esm/{chunk-HBIF43PT.js.map → chunk-PHC3QBV3.js.map} +0 -0
- /package/dist/esm/{chunk-OTKQN2KY.js.map → chunk-PZ7OYATT.js.map} +0 -0
- /package/dist/esm/{chunk-P27KV2LS.js.map → chunk-QWVU2TW4.js.map} +0 -0
- /package/dist/esm/{chunk-6J6YX2VX.js.map → chunk-RNTCHVFI.js.map} +0 -0
- /package/dist/esm/{chunk-IDUVJJYG.js.map → chunk-S5C5YRBS.js.map} +0 -0
- /package/dist/esm/{chunk-RY67WG3O.js.map → chunk-T4OR62DQ.js.map} +0 -0
- /package/dist/esm/{chunk-AO32NT75.js.map → chunk-UBOOUDS4.js.map} +0 -0
- /package/dist/esm/{chunk-DCIQHXAR.js.map → chunk-VHECAEUP.js.map} +0 -0
- /package/dist/esm/{chunk-QEGEUD4D.js.map → chunk-VNH7BJOA.js.map} +0 -0
- /package/dist/esm/{chunk-GGSJXOKR.js.map → chunk-VR7ZAFYN.js.map} +0 -0
- /package/dist/esm/{chunk-ODCVOXEV.js.map → chunk-VX6ARMWP.js.map} +0 -0
- /package/dist/esm/{chunk-G4YKBAZT.js.map → chunk-VZSQATP6.js.map} +0 -0
- /package/dist/esm/{chunk-YVSM2LGS.js.map → chunk-WGYUWEQV.js.map} +0 -0
- /package/dist/esm/{chunk-7NYODT3Z.js.map → chunk-WHFJ4JUN.js.map} +0 -0
- /package/dist/esm/{chunk-YG66IRW4.js.map → chunk-X3JM2565.js.map} +0 -0
- /package/dist/esm/{chunk-XDDKT4NF.js.map → chunk-XI5YXUCK.js.map} +0 -0
- /package/dist/esm/{chunk-NQXRWBQM.js.map → chunk-Y5RCH23Z.js.map} +0 -0
- /package/dist/esm/{chunk-WZFVTC7P.js.map → chunk-YBSRX63K.js.map} +0 -0
- /package/dist/esm/{chunk-VUNNS3ZU.js.map → chunk-YQRSAP46.js.map} +0 -0
- /package/dist/esm/{chunk-GDAKJS64.js.map → chunk-YWENWZOU.js.map} +0 -0
- /package/dist/esm/{chunk-7PMMYHZV.js.map → chunk-ZOY43B55.js.map} +0 -0
- /package/dist/esm/{chunk-VTIL55SR.js.map → chunk-ZZLZGHZQ.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as x}from"./chunk-2CMM7MEL.js";import{a as q}from"./chunk-GGSJXOKR.js";import{a as j,b as O,c as _,e as k,f as U}from"./chunk-HBIF43PT.js";import{a as F,b as K,c as $}from"./chunk-7NYODT3Z.js";import{a as V}from"./chunk-4WU2WKUJ.js";import{d as W}from"./chunk-IX5HIHVI.js";import{a as B}from"./chunk-JRFZ535T.js";import{b as G}from"./chunk-SEY4NA45.js";import{b as L}from"./chunk-FWB47YCH.js";import{a as E}from"./chunk-JDWCQ2XP.js";import{a as H}from"./chunk-UBSLEGQZ.js";import{a as le}from"./chunk-OS3FCYZY.js";var fe={};le(fe,{Content:()=>Y,Footer:()=>ee,Group:()=>ce,GroupContent:()=>ue,GroupLabel:()=>de,Header:()=>Z,Menu:()=>re,MenuButton:()=>oe,MenuItem:()=>ae,MenuSub:()=>ne,MenuSubContent:()=>ie,MenuSubTrigger:()=>se,Root:()=>Q,Search:()=>pe,Separator:()=>te});import*as e from"react";import d from"classnames";import*as S from"@radix-ui/react-accordion";var J=e.createContext(null);function g(){return e.useContext(J)}var Q=e.forwardRef((t,a)=>{let o=G(),{size:r=x.size.default,variant:s=x.variant.default,menuVariant:c=x.menuVariant.default,layout:u=x.layout.default,presentation:l,panelBackground:R,color:i}=t,{className:p,children:m,...v}=H(t,x),{asChild:T,panelBackground:M,presentation:C,...P}=v,h=i||o.accentColor,n=l==="thin"?"rail":l==="expanded"?"panel":u||"panel",f=typeof r=="object"?r.initial||"2":r,y=e.useMemo(()=>({size:f,menuVariant:c,presentation:l,color:h}),[f,c,l,h]);return e.createElement("div",{...P,ref:a,"data-accent-color":h,className:d("rt-SidebarRoot",p)},e.createElement(J.Provider,{value:y},e.createElement("div",{className:d("rt-SidebarContainer",`rt-variant-${s}`,`rt-r-size-${f}`,`rt-menu-variant-${c}`,n&&`rt-layout-${n}`),"data-accent-color":h,"data-panel-background":R,"data-presentation":l,"data-layout":n},m)))});Q.displayName="Sidebar.Root";var Y=e.forwardRef(({className:t,children:a,role:o="navigation","aria-label":r="Main navigation",id:s,...c},u)=>{let l=g(),R=l?.size??"2",i=l?.menuVariant??"soft";return e.createElement(V,{type:"hover"},e.createElement("div",{...c,ref:u,id:s,role:o,"aria-label":r,className:d("rt-BaseMenuContent","rt-SidebarContent",`rt-r-size-${R}`,`rt-menu-variant-${i}`,t)},e.createElement("div",{className:"rt-BaseMenuViewport"},a)))});Y.displayName="Sidebar.Content";var Z=e.forwardRef(({className:t,asContainer:a=!0,...o},r)=>{let s=g(),c=s?.size??"2",u=s?.menuVariant??"soft";return e.createElement("div",{...o,ref:r,className:d("rt-SidebarHeader",`rt-r-size-${c}`,`rt-menu-variant-${u}`,{"rt-SidebarHeader--container":a},t)})});Z.displayName="Sidebar.Header";var ee=e.forwardRef(({className:t,asContainer:a=!0,...o},r)=>{let s=g(),c=s?.size??"2",u=s?.menuVariant??"soft";return e.createElement("div",{...o,ref:r,className:d("rt-SidebarFooter",`rt-r-size-${c}`,`rt-menu-variant-${u}`,{"rt-SidebarFooter--container":a},t)})});ee.displayName="Sidebar.Footer";var te=e.forwardRef(({className:t,...a},o)=>e.createElement(q,{...a,ref:o,className:d("rt-SidebarSeparator",t)}));te.displayName="Sidebar.Separator";var re=e.forwardRef(({className:t,...a},o)=>e.createElement("ul",{...a,ref:o,className:d("rt-SidebarMenu",t)}));re.displayName="Sidebar.Menu";var ae=e.forwardRef(({className:t,...a},o)=>e.createElement("li",{...a,ref:o,className:d("rt-SidebarMenuItem",t)}));ae.displayName="Sidebar.MenuItem";function me(t){let a=[],o=[];return e.Children.forEach(t,r=>{if(typeof r=="string"||typeof r=="number")o.push(e.createElement("span",{key:o.length,className:"rt-SidebarMenuLabel"},r));else if(e.isValidElement(r)){let s=r;s.type==="svg"||s.props&&s.props.icon||typeof s.type=="function"&&(s.type.displayName?.includes("Icon")||s.type.name?.includes("Icon"))?a.push(r):o.push(r)}else r&&o.push(r)}),{icons:a,labels:o}}function A(t){if(typeof t=="string"||typeof t=="number")return e.createElement("span",{className:"rt-SidebarMenuLabel"},t);if(Array.isArray(t))return t.map((a,o)=>e.createElement(e.Fragment,{key:o},A(a)));if(e.isValidElement(t)){let a=t,o=a.props&&a.props.className||"";if(typeof a.type=="string"&&o.split(" ").includes("rt-SidebarMenuLabel"))return a;let s=A(a.props?.children);return e.cloneElement(a,{...a.props},s)}return t}var oe=e.forwardRef(({asChild:t=!1,isActive:a=!1,shortcut:o,badge:r,className:s,children:c,onKeyDown:u,...l},R)=>{let i=g(),p=i?.size??"2",m=i?.presentation==="thin",v=t?L:"button",T=e.useCallback(n=>{if(n.key==="ArrowDown"||n.key==="ArrowUp"){let f=n.currentTarget.closest(".rt-SidebarContent, .rt-SidebarSearchPopover"),y=f?Array.from(f.querySelectorAll(".rt-SidebarMenuButton")).filter(N=>N.offsetParent!==null):[],b=y.indexOf(n.currentTarget),D=y[b+(n.key==="ArrowDown"?1:-1)];b!==-1&&D&&(n.preventDefault(),D.focus())}u?.(n)},[u]),M=e.useMemo(()=>A(c),[c]),{icons:C,labels:P}=e.useMemo(()=>m?me(c):{icons:[],labels:[]},[m,c]),h=e.useMemo(()=>{if(!t)return null;try{let n=e.Children.only(M),f=n.props?.children,y=e.createElement(e.Fragment,null,f,r&&e.createElement("div",{className:"rt-SidebarMenuBadge"},typeof r=="string"?e.createElement(B,{size:p,variant:"soft"},r):e.createElement(B,{size:r.size||p,variant:r.variant||"soft",color:r.color,radius:r.radius},r.content)),o&&e.createElement("div",{className:"rt-BaseMenuShortcut rt-SidebarMenuShortcut"},e.createElement(E,{size:p},o)));return e.cloneElement(n,{...n.props},y)}catch{return M}},[t,M,r,o,p]);return e.createElement(v,{...l,ref:R,"aria-current":a?"page":void 0,className:d("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton",s),"data-active":a||void 0,onKeyDown:T},t?h:m&&C.length>0?e.createElement(e.Fragment,null,e.createElement("span",{className:"rt-SidebarMenuIconWrapper"},C),P.map((n,f)=>e.createElement(e.Fragment,{key:f},typeof n=="string"||typeof n=="number"?e.createElement("span",{className:"rt-SidebarMenuLabel"},n):n))):e.createElement(e.Fragment,null,M,r&&e.createElement("div",{className:"rt-SidebarMenuBadge"},typeof r=="string"?e.createElement(B,{size:p,variant:"soft"},r):e.createElement(B,{size:r.size||p,variant:r.variant||"soft",color:r.color,radius:r.radius},r.content)),o&&e.createElement("div",{className:"rt-BaseMenuShortcut rt-SidebarMenuShortcut"},e.createElement(E,{size:p},o))))});oe.displayName="Sidebar.MenuButton";var I=e.createContext("accordion"),ne=e.forwardRef(({defaultOpen:t=!1,children:a,...o},r)=>(g()?.presentation==="thin"?"dropdown":"accordion")==="dropdown"?e.createElement("div",{...o,ref:r},e.createElement(j,null,e.createElement(I.Provider,{value:"dropdown"},a))):e.createElement("div",{...o,ref:r},e.createElement(I.Provider,{value:"accordion"},e.createElement(S.Root,{type:"single",collapsible:!0,defaultValue:t?"item":void 0},e.createElement(S.Item,{value:"item"},a)))));ne.displayName="Sidebar.MenuSub";var se=e.forwardRef(({asChild:t=!1,className:a,children:o,...r},s)=>e.useContext(I)==="dropdown"?e.createElement(O,null,e.createElement("button",{...r,ref:s,type:"button","aria-haspopup":"menu",className:d("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton","rt-SidebarMenuSubTrigger",a)},o)):e.createElement(S.Header,{asChild:!0},e.createElement("div",null,e.createElement(S.Trigger,{...r,ref:s,asChild:t,className:d("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton","rt-SidebarMenuSubTrigger",a)},t?o:e.createElement(e.Fragment,null,o,e.createElement(W,{className:d("rt-BaseMenuSubTriggerIcon","rt-SidebarMenuSubTriggerIcon")}))))));se.displayName="Sidebar.MenuSubTrigger";var ie=e.forwardRef(({className:t,children:a,...o},r)=>{let s=g();if(e.useContext(I)==="dropdown"){let u=i=>{if(Array.isArray(i))return i.map((p,m)=>e.createElement(e.Fragment,{key:m},u(p)));if(e.isValidElement(i)){if(i.type?.displayName==="Sidebar.MenuButton")return i.props?.children;let m=i.props?.children;if(m!==void 0)return e.cloneElement(i,{...i.props,children:u(m)})}return i},l=e.Children.map(a,(i,p)=>{if(e.isValidElement(i)&&i.type?.displayName==="Sidebar.MenuItem"){let m=i.props?.children,v=u(m);return e.createElement(k,{key:p,asChild:!0},v)}return e.createElement(k,{key:p,asChild:!0},u(i))}),R=s?.size==="3"?"2":s?.size;return e.createElement(_,{size:R,variant:s?.menuVariant,className:d(t)},e.createElement(U,null,l))}return e.createElement(S.Content,{...o,ref:r,className:d("rt-SidebarMenuSubContent",t)},e.createElement("div",{className:"rt-SidebarMenuSubList"},a))});ie.displayName="Sidebar.MenuSubContent";var ce=e.forwardRef(({className:t,...a},o)=>e.createElement("div",{...a,ref:o,className:d("rt-BaseMenuGroup","rt-SidebarGroup",t)}));ce.displayName="Sidebar.Group";var de=e.forwardRef(({asChild:t=!1,className:a,...o},r)=>e.createElement(t?L:"div",{...o,ref:r,className:d("rt-BaseMenuLabel","rt-SidebarGroupLabel",a)}));de.displayName="Sidebar.GroupLabel";var ue=e.forwardRef(({className:t,...a},o)=>e.createElement("div",{...a,ref:o,className:d("rt-SidebarGroupContent",t)}));ue.displayName="Sidebar.GroupContent";var z=({className:t})=>e.createElement("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},e.createElement("circle",{cx:"11",cy:"11",r:"8"}),e.createElement("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})),X=({className:t})=>e.createElement("svg",{className:t,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},e.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),pe=e.forwardRef(({value:t,onValueChange:a,placeholder:o="Search...",children:r,className:s,...c},u)=>{let R=g()?.presentation==="thin",i=e.useRef(null),p=e.useRef(null),v=`${e.useId()}-results`,T=e.useRef(t);T.current=t;let M=e.useRef(a);M.current=a;let C=o.replace(/\.+$/,""),P=e.useCallback(n=>{n.key==="Escape"&&T.current&&(n.preventDefault(),n.stopPropagation(),M.current(""),i.current?.focus())},[]),h=e.useCallback(n=>{let f=p.current;if(!f)return;let y=f.querySelector('[role="group"]');if(!y)return;let b=Array.from(y.querySelectorAll("a, button"));if(b.length===0)return;let D=document.activeElement,N=D===i.current,w=b.indexOf(D);if(n.key.length===1&&!n.ctrlKey&&!n.metaKey&&!n.altKey&&!N&&w!==-1){i.current?.focus();return}switch(n.key){case"ArrowDown":{n.preventDefault(),N||w===-1?b[0]?.focus():w<b.length-1&&b[w+1]?.focus();break}case"ArrowUp":{n.preventDefault(),w<=0?i.current?.focus():b[w-1]?.focus();break}case"Home":{N||(n.preventDefault(),b[0]?.focus());break}case"End":{N||(n.preventDefault(),b[b.length-1]?.focus());break}}},[]);return R?e.createElement("div",{...c,ref:u,className:d("rt-SidebarSearch","rt-SidebarSearch--thin",s)},e.createElement(F,null,e.createElement(K,null,e.createElement("button",{type:"button",className:d("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton","rt-SidebarSearchTrigger"),"aria-label":C},e.createElement("span",{className:"rt-SidebarMenuIconWrapper"},e.createElement(z,null)),e.createElement("span",{className:"rt-SidebarMenuLabel"},"Search"))),e.createElement($,{side:"right",align:"start",size:"2",width:"280px","aria-label":C},e.createElement("div",{ref:p,className:"rt-SidebarSearchPopover",role:"search",onKeyDown:h},e.createElement("div",{className:"rt-SidebarSearchInputWrapper"},e.createElement(z,{className:"rt-SidebarSearchIcon"}),e.createElement("input",{ref:i,type:"search",className:"rt-SidebarSearchInput",value:t,onChange:n=>a(n.target.value),onKeyDown:P,placeholder:o,"aria-label":C,"aria-controls":r?v:void 0,autoFocus:!0}),t&&e.createElement("button",{type:"button",className:"rt-reset rt-SidebarSearchClear",onClick:()=>{a(""),i.current?.focus()},"aria-label":"Clear search"},e.createElement(X,null))),r&&e.createElement("div",{id:v,role:"group","aria-label":"Search results"},r))))):e.createElement("div",{...c,ref:u,className:d("rt-SidebarSearch","rt-SidebarSearch--expanded",s),role:"search"},e.createElement("div",{className:"rt-SidebarSearchInputWrapper"},e.createElement(z,{className:"rt-SidebarSearchIcon"}),e.createElement("input",{ref:i,type:"search",className:"rt-SidebarSearchInput",value:t,onChange:n=>a(n.target.value),onKeyDown:P,placeholder:o,"aria-label":C}),t&&e.createElement("button",{type:"button",className:"rt-reset rt-SidebarSearchClear",onClick:()=>{a(""),i.current?.focus()},"aria-label":"Clear search"},e.createElement(X,null))))});pe.displayName="Sidebar.Search";export{Q as a,Y as b,Z as c,ee as d,te as e,re as f,ae as g,oe as h,ne as i,se as j,ie as k,ce as l,de as m,ue as n,pe as o,fe as p};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as x}from"./chunk-2CMM7MEL.js";import{a as q}from"./chunk-VR7ZAFYN.js";import{a as j,b as O,c as _,e as k,f as U}from"./chunk-PHC3QBV3.js";import{a as F,b as K,c as $}from"./chunk-WHFJ4JUN.js";import{a as V}from"./chunk-CTA5ODAO.js";import{d as W}from"./chunk-IX5HIHVI.js";import{a as B}from"./chunk-KMPE7TJ6.js";import{b as G}from"./chunk-SEY4NA45.js";import{b as L}from"./chunk-FWB47YCH.js";import{a as E}from"./chunk-E67CIG6A.js";import{a as H}from"./chunk-6FLLFCBU.js";import{a as le}from"./chunk-OS3FCYZY.js";var fe={};le(fe,{Content:()=>Y,Footer:()=>ee,Group:()=>ce,GroupContent:()=>ue,GroupLabel:()=>de,Header:()=>Z,Menu:()=>re,MenuButton:()=>oe,MenuItem:()=>ae,MenuSub:()=>ne,MenuSubContent:()=>ie,MenuSubTrigger:()=>se,Root:()=>Q,Search:()=>pe,Separator:()=>te});import*as e from"react";import d from"classnames";import*as S from"@radix-ui/react-accordion";var J=e.createContext(null);function g(){return e.useContext(J)}var Q=e.forwardRef((t,a)=>{let o=G(),{size:r=x.size.default,variant:s=x.variant.default,menuVariant:c=x.menuVariant.default,layout:u=x.layout.default,presentation:l,panelBackground:R,color:i}=t,{className:p,children:m,...v}=H(t,x),{asChild:T,panelBackground:M,presentation:C,...P}=v,h=i||o.accentColor,n=l==="thin"?"rail":l==="expanded"?"panel":u||"panel",f=typeof r=="object"?r.initial||"2":r,y=e.useMemo(()=>({size:f,menuVariant:c,presentation:l,color:h}),[f,c,l,h]);return e.createElement("div",{...P,ref:a,"data-accent-color":h,className:d("rt-SidebarRoot",p)},e.createElement(J.Provider,{value:y},e.createElement("div",{className:d("rt-SidebarContainer",`rt-variant-${s}`,`rt-r-size-${f}`,`rt-menu-variant-${c}`,n&&`rt-layout-${n}`),"data-accent-color":h,"data-panel-background":R,"data-presentation":l,"data-layout":n},m)))});Q.displayName="Sidebar.Root";var Y=e.forwardRef(({className:t,children:a,role:o="navigation","aria-label":r="Main navigation",id:s,...c},u)=>{let l=g(),R=l?.size??"2",i=l?.menuVariant??"soft";return e.createElement(V,{type:"hover"},e.createElement("div",{...c,ref:u,id:s,role:o,"aria-label":r,className:d("rt-BaseMenuContent","rt-SidebarContent",`rt-r-size-${R}`,`rt-menu-variant-${i}`,t)},e.createElement("div",{className:"rt-BaseMenuViewport"},a)))});Y.displayName="Sidebar.Content";var Z=e.forwardRef(({className:t,asContainer:a=!0,...o},r)=>{let s=g(),c=s?.size??"2",u=s?.menuVariant??"soft";return e.createElement("div",{...o,ref:r,className:d("rt-SidebarHeader",`rt-r-size-${c}`,`rt-menu-variant-${u}`,{"rt-SidebarHeader--container":a},t)})});Z.displayName="Sidebar.Header";var ee=e.forwardRef(({className:t,asContainer:a=!0,...o},r)=>{let s=g(),c=s?.size??"2",u=s?.menuVariant??"soft";return e.createElement("div",{...o,ref:r,className:d("rt-SidebarFooter",`rt-r-size-${c}`,`rt-menu-variant-${u}`,{"rt-SidebarFooter--container":a},t)})});ee.displayName="Sidebar.Footer";var te=e.forwardRef(({className:t,...a},o)=>e.createElement(q,{...a,ref:o,className:d("rt-SidebarSeparator",t)}));te.displayName="Sidebar.Separator";var re=e.forwardRef(({className:t,...a},o)=>e.createElement("ul",{...a,ref:o,className:d("rt-SidebarMenu",t)}));re.displayName="Sidebar.Menu";var ae=e.forwardRef(({className:t,...a},o)=>e.createElement("li",{...a,ref:o,className:d("rt-SidebarMenuItem",t)}));ae.displayName="Sidebar.MenuItem";function me(t){let a=[],o=[];return e.Children.forEach(t,r=>{if(typeof r=="string"||typeof r=="number")o.push(e.createElement("span",{key:o.length,className:"rt-SidebarMenuLabel"},r));else if(e.isValidElement(r)){let s=r;s.type==="svg"||s.props&&s.props.icon||typeof s.type=="function"&&(s.type.displayName?.includes("Icon")||s.type.name?.includes("Icon"))?a.push(r):o.push(r)}else r&&o.push(r)}),{icons:a,labels:o}}function A(t){if(typeof t=="string"||typeof t=="number")return e.createElement("span",{className:"rt-SidebarMenuLabel"},t);if(Array.isArray(t))return t.map((a,o)=>e.createElement(e.Fragment,{key:o},A(a)));if(e.isValidElement(t)){let a=t,o=a.props&&a.props.className||"";if(typeof a.type=="string"&&o.split(" ").includes("rt-SidebarMenuLabel"))return a;let s=A(a.props?.children);return e.cloneElement(a,{...a.props},s)}return t}var oe=e.forwardRef(({asChild:t=!1,isActive:a=!1,shortcut:o,badge:r,className:s,children:c,onKeyDown:u,...l},R)=>{let i=g(),p=i?.size??"2",m=i?.presentation==="thin",v=t?L:"button",T=e.useCallback(n=>{if(n.key==="ArrowDown"||n.key==="ArrowUp"){let f=n.currentTarget.closest(".rt-SidebarContent, .rt-SidebarSearchPopover"),y=f?Array.from(f.querySelectorAll(".rt-SidebarMenuButton")).filter(N=>N.offsetParent!==null):[],b=y.indexOf(n.currentTarget),D=y[b+(n.key==="ArrowDown"?1:-1)];b!==-1&&D&&(n.preventDefault(),D.focus())}u?.(n)},[u]),M=e.useMemo(()=>A(c),[c]),{icons:C,labels:P}=e.useMemo(()=>m?me(c):{icons:[],labels:[]},[m,c]),h=e.useMemo(()=>{if(!t)return null;try{let n=e.Children.only(M),f=n.props?.children,y=e.createElement(e.Fragment,null,f,r&&e.createElement("div",{className:"rt-SidebarMenuBadge"},typeof r=="string"?e.createElement(B,{size:p,variant:"soft"},r):e.createElement(B,{size:r.size||p,variant:r.variant||"soft",color:r.color,radius:r.radius},r.content)),o&&e.createElement("div",{className:"rt-BaseMenuShortcut rt-SidebarMenuShortcut"},e.createElement(E,{size:p},o)));return e.cloneElement(n,{...n.props},y)}catch{return M}},[t,M,r,o,p]);return e.createElement(v,{...l,ref:R,"aria-current":a?"page":void 0,className:d("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton",s),"data-active":a||void 0,onKeyDown:T},t?h:m&&C.length>0?e.createElement(e.Fragment,null,e.createElement("span",{className:"rt-SidebarMenuIconWrapper"},C),P.map((n,f)=>e.createElement(e.Fragment,{key:f},typeof n=="string"||typeof n=="number"?e.createElement("span",{className:"rt-SidebarMenuLabel"},n):n))):e.createElement(e.Fragment,null,M,r&&e.createElement("div",{className:"rt-SidebarMenuBadge"},typeof r=="string"?e.createElement(B,{size:p,variant:"soft"},r):e.createElement(B,{size:r.size||p,variant:r.variant||"soft",color:r.color,radius:r.radius},r.content)),o&&e.createElement("div",{className:"rt-BaseMenuShortcut rt-SidebarMenuShortcut"},e.createElement(E,{size:p},o))))});oe.displayName="Sidebar.MenuButton";var I=e.createContext("accordion"),ne=e.forwardRef(({defaultOpen:t=!1,children:a,...o},r)=>(g()?.presentation==="thin"?"dropdown":"accordion")==="dropdown"?e.createElement("div",{...o,ref:r},e.createElement(j,null,e.createElement(I.Provider,{value:"dropdown"},a))):e.createElement("div",{...o,ref:r},e.createElement(I.Provider,{value:"accordion"},e.createElement(S.Root,{type:"single",collapsible:!0,defaultValue:t?"item":void 0},e.createElement(S.Item,{value:"item"},a)))));ne.displayName="Sidebar.MenuSub";var se=e.forwardRef(({asChild:t=!1,className:a,children:o,...r},s)=>e.useContext(I)==="dropdown"?e.createElement(O,null,e.createElement("button",{...r,ref:s,type:"button","aria-haspopup":"menu",className:d("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton","rt-SidebarMenuSubTrigger",a)},o)):e.createElement(S.Header,{asChild:!0},e.createElement("div",null,e.createElement(S.Trigger,{...r,ref:s,asChild:t,className:d("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton","rt-SidebarMenuSubTrigger",a)},t?o:e.createElement(e.Fragment,null,o,e.createElement(W,{className:d("rt-BaseMenuSubTriggerIcon","rt-SidebarMenuSubTriggerIcon")}))))));se.displayName="Sidebar.MenuSubTrigger";var ie=e.forwardRef(({className:t,children:a,...o},r)=>{let s=g();if(e.useContext(I)==="dropdown"){let u=i=>{if(Array.isArray(i))return i.map((p,m)=>e.createElement(e.Fragment,{key:m},u(p)));if(e.isValidElement(i)){if(i.type?.displayName==="Sidebar.MenuButton")return i.props?.children;let m=i.props?.children;if(m!==void 0)return e.cloneElement(i,{...i.props,children:u(m)})}return i},l=e.Children.map(a,(i,p)=>{if(e.isValidElement(i)&&i.type?.displayName==="Sidebar.MenuItem"){let m=i.props?.children,v=u(m);return e.createElement(k,{key:p,asChild:!0},v)}return e.createElement(k,{key:p,asChild:!0},u(i))}),R=s?.size==="3"?"2":s?.size;return e.createElement(_,{size:R,variant:s?.menuVariant,className:d(t)},e.createElement(U,null,l))}return e.createElement(S.Content,{...o,ref:r,className:d("rt-SidebarMenuSubContent",t)},e.createElement("div",{className:"rt-SidebarMenuSubList"},a))});ie.displayName="Sidebar.MenuSubContent";var ce=e.forwardRef(({className:t,...a},o)=>e.createElement("div",{...a,ref:o,className:d("rt-BaseMenuGroup","rt-SidebarGroup",t)}));ce.displayName="Sidebar.Group";var de=e.forwardRef(({asChild:t=!1,className:a,...o},r)=>e.createElement(t?L:"div",{...o,ref:r,className:d("rt-BaseMenuLabel","rt-SidebarGroupLabel",a)}));de.displayName="Sidebar.GroupLabel";var ue=e.forwardRef(({className:t,...a},o)=>e.createElement("div",{...a,ref:o,className:d("rt-SidebarGroupContent",t)}));ue.displayName="Sidebar.GroupContent";var z=({className:t})=>e.createElement("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},e.createElement("circle",{cx:"11",cy:"11",r:"8"}),e.createElement("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})),X=({className:t})=>e.createElement("svg",{className:t,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},e.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),pe=e.forwardRef(({value:t,onValueChange:a,placeholder:o="Search...",children:r,className:s,...c},u)=>{let R=g()?.presentation==="thin",i=e.useRef(null),p=e.useRef(null),v=`${e.useId()}-results`,T=e.useRef(t);T.current=t;let M=e.useRef(a);M.current=a;let C=o.replace(/\.+$/,""),P=e.useCallback(n=>{n.key==="Escape"&&T.current&&(n.preventDefault(),n.stopPropagation(),M.current(""),i.current?.focus())},[]),h=e.useCallback(n=>{let f=p.current;if(!f)return;let y=f.querySelector('[role="group"]');if(!y)return;let b=Array.from(y.querySelectorAll("a, button"));if(b.length===0)return;let D=document.activeElement,N=D===i.current,w=b.indexOf(D);if(n.key.length===1&&!n.ctrlKey&&!n.metaKey&&!n.altKey&&!N&&w!==-1){i.current?.focus();return}switch(n.key){case"ArrowDown":{n.preventDefault(),N||w===-1?b[0]?.focus():w<b.length-1&&b[w+1]?.focus();break}case"ArrowUp":{n.preventDefault(),w<=0?i.current?.focus():b[w-1]?.focus();break}case"Home":{N||(n.preventDefault(),b[0]?.focus());break}case"End":{N||(n.preventDefault(),b[b.length-1]?.focus());break}}},[]);return R?e.createElement("div",{...c,ref:u,className:d("rt-SidebarSearch","rt-SidebarSearch--thin",s)},e.createElement(F,null,e.createElement(K,null,e.createElement("button",{type:"button",className:d("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton","rt-SidebarSearchTrigger"),"aria-label":C},e.createElement("span",{className:"rt-SidebarMenuIconWrapper"},e.createElement(z,null)),e.createElement("span",{className:"rt-SidebarMenuLabel"},"Search"))),e.createElement($,{side:"right",align:"start",size:"2",width:"280px","aria-label":C},e.createElement("div",{ref:p,className:"rt-SidebarSearchPopover",role:"search",onKeyDown:h},e.createElement("div",{className:"rt-SidebarSearchInputWrapper"},e.createElement(z,{className:"rt-SidebarSearchIcon"}),e.createElement("input",{ref:i,type:"search",className:"rt-SidebarSearchInput",value:t,onChange:n=>a(n.target.value),onKeyDown:P,placeholder:o,"aria-label":C,"aria-controls":r?v:void 0,autoFocus:!0}),t&&e.createElement("button",{type:"button",className:"rt-reset rt-SidebarSearchClear",onClick:()=>{a(""),i.current?.focus()},"aria-label":"Clear search"},e.createElement(X,null))),r&&e.createElement("div",{id:v,role:"group","aria-label":"Search results"},r))))):e.createElement("div",{...c,ref:u,className:d("rt-SidebarSearch","rt-SidebarSearch--expanded",s),role:"search"},e.createElement("div",{className:"rt-SidebarSearchInputWrapper"},e.createElement(z,{className:"rt-SidebarSearchIcon"}),e.createElement("input",{ref:i,type:"search",className:"rt-SidebarSearchInput",value:t,onChange:n=>a(n.target.value),onKeyDown:P,placeholder:o,"aria-label":C}),t&&e.createElement("button",{type:"button",className:"rt-reset rt-SidebarSearchClear",onClick:()=>{a(""),i.current?.focus()},"aria-label":"Clear search"},e.createElement(X,null))))});pe.displayName="Sidebar.Search";export{Q as a,Y as b,Z as c,ee as d,te as e,re as f,ae as g,oe as h,ne as i,se as j,ie as k,ce as l,de as m,ue as n,pe as o,fe as p};
|
|
2
|
+
//# sourceMappingURL=chunk-YQRSAP46.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as rt}from"./chunk-RJP5QUXO.js";import{a as je}from"./chunk-4XGGX2V2.js";import{a as nt}from"./chunk-CTA5ODAO.js";import{g as tt,j as at}from"./chunk-IX5HIHVI.js";import{a as me}from"./chunk-5WRCK4R7.js";import{a as et}from"./chunk-HF5WY5YE.js";import{a as de}from"./chunk-FHOCUZDR.js";import{a as Be}from"./chunk-AGAQC4HH.js";import{b as U}from"./chunk-FWB47YCH.js";import{a as Ot}from"./chunk-OS3FCYZY.js";var $t={};Ot($t,{AttachTrigger:()=>ft,Attachment:()=>Ue,AttachmentsRow:()=>ht,InlineEnd:()=>pt,InlineStart:()=>mt,Root:()=>ut,Row:()=>bt,RowEnd:()=>Ct,RowStart:()=>Rt,Send:()=>gt,Textarea:()=>dt});import*as e from"react";import L from"classnames";import{LazyMotion as Ft,MotionConfig as Ht,domAnimation as zt,m as he}from"motion/react";import{useComposedRefs as it}from"radix-ui/internal";import{useDropzone as It}from"react-dropzone";var Ve=typeof window<"u"?e.useLayoutEffect:e.useEffect;function ot(n,s){let{placeholder:r}=n;if(!r){s();return}n.placeholder="";try{s()}finally{n.placeholder=r}}var fe={layout:{type:"spring",visualDuration:.15,bounce:.1}},ct=e.createContext(null),$e=e.createContext(""),K=()=>{let n=e.useContext(ct);if(!n)throw new Error("Chatbar context not found. Wrap parts in <Chatbar.Root>.");return n},pe=n=>Array.isArray(n)?n:typeof n=="string"?n.split(",").map(s=>s.trim()).filter(Boolean):[],Dt=(n,s)=>{if(s.length===0)return!0;let r=n.type.toLowerCase(),d=n.name.toLowerCase();for(let f of s){let i=f.toLowerCase();if(i.includes("/")){let[b,c]=i.split("/"),[C,p]=r.split("/");if(b==="*"||b===C&&(c==="*"||c===p))return!0}else if(i.startsWith(".")&&d.endsWith(i))return!0}return!1},Bt=/\.(png|jpe?g|gif|webp|bmp|svg|avif)$/i,lt=(n,s)=>(s||"").toLowerCase().startsWith("image/")||Bt.test(n),We=n=>n.trim().length>0,st=(n,s)=>`${n} ${s}${n===1?"":"s"}`,jt=0,Vt=()=>`chatbar-attachment-${Date.now()}-${++jt}`,ut=e.forwardRef((n,s)=>{let{className:r,style:d,children:f,value:i,defaultValue:b="",onValueChange:c,open:C,defaultOpen:p=!1,onOpenChange:S,expandOn:A="both",minLines:h=3,maxLines:B=6,sendMode:H="whenDirty",disabled:l,readOnly:g,onSubmit:k,size:P="2",variant:E,color:M,radius:z,panelBackground:v,material:N,width:j,maxWidth:re,attachments:y,defaultAttachments:I,onAttachmentsChange:_,accept:be,multiple:F=!0,maxAttachments:G,maxFileSize:q,paste:D=!0,pasteAccept:O,clearOnSubmit:Y=!0,onAttachmentReject:Ee,dropzone:oe=!0,apiRef:Te,onBlurCapture:Re,notices:Ce,context:ge,...Le}=n,t=N||v,R=i!=null,[w,se]=e.useState(b),V=R?i:w,X=C!=null,[ke,ie]=e.useState(p),Q=X?C:ke,Z="attachments"in n,[Ke,vt]=e.useState(()=>I??[]),ce=e.useMemo(()=>Z?y??[]:Ke,[Z,y,Ke]),[_e,yt]=e.useState({text:"",id:0}),le=e.useCallback(a=>yt(o=>({text:a,id:o.id+1})),[]),Ge=e.useRef(null),xt=it(s,Ge),Me=e.useRef(null),Ne=e.useRef(null),ue=e.useRef(!1),ve=e.useRef(!1),ye=e.useRef(void 0),Oe=e.useRef(null),qe=pe(be).join(","),Fe=pe(O).join(","),He=e.useMemo(()=>pe(qe),[qe]),Pt=e.useMemo(()=>Fe?pe(Fe):He,[Fe,He]),Ye={value:V,attachments:ce,accepts:He,pasteAccepts:Pt,multiple:F,maxAttachments:G,maxFileSize:q,disabled:l,readOnly:g,expandOn:A,isValueControlled:R,isOpenControlled:X,isAttachmentsControlled:Z,onValueChange:c,onOpenChange:S,onAttachmentsChange:_,onAttachmentReject:Ee,onSubmit:k},x=e.useRef(Ye);x.current=Ye;let ze=e.useRef(null),W=e.useCallback(()=>ze.current??x.current.attachments,[]),ee=e.useCallback(a=>{x.current.isOpenControlled||ie(a),x.current.onOpenChange?.(a)},[]),xe=e.useCallback(a=>{x.current.isValueControlled||se(a),x.current.onValueChange?.(a)},[]),te=e.useCallback(a=>{ze.current=a,queueMicrotask(()=>{ze.current=null}),x.current.isAttachmentsControlled||vt(a),x.current.onAttachmentsChange?.(a)},[]),Pe=e.useRef(new Set),ae=e.useCallback((a,o,u=x.current.multiple)=>{let m=x.current;if(m.disabled||m.readOnly||a.length===0)return 0;let $=W(),J=[],ne=[],Mt=typeof m.maxAttachments=="number"?Math.max(m.maxAttachments-$.length,0):1/0,Nt=u?1/0:1;for(let T of a){if(J.length>=Mt||J.length>=Nt){ne.push({file:T,reason:"count"});continue}if(typeof m.maxFileSize=="number"&&T.size>m.maxFileSize){ne.push({file:T,reason:"size"});continue}if(!Dt(T,o)){ne.push({file:T,reason:"type"});continue}let De=lt(T.name,T.type)?URL.createObjectURL(T):void 0;De&&Pe.current.add(De),J.push({id:Vt(),name:T.name,size:T.size,type:T.type,file:T,url:De,status:"idle"})}let Se=[];return J.length>0&&(te($.concat(J)),m.expandOn!=="none"&&ee(!0),Se.push(`${st(J.length,"file")} attached.`)),ne.length>0&&(m.onAttachmentReject?.(ne),Se.push(`${st(ne.length,"file")} could not be attached.`)),Se.length>0&&le(Se.join(" ")),J.length},[W,te,ee,le]),Ae=e.useCallback(a=>ae(a,x.current.accepts),[ae]),Xe=e.useCallback(a=>ae(a,x.current.pasteAccepts),[ae]),Je=e.useCallback(a=>{let o=W(),u=o.find(m=>m.id===a);u&&(te(o.filter(m=>m.id!==a)),le(`Removed ${u.name}.`))},[W,te,le]),Qe=e.useCallback(a=>{let o=x.current;if(o.disabled||o.readOnly)return!1;let u=W();if(!We(o.value)&&u.length===0)return!1;let m={value:o.value,attachments:u};if(a&&o.onSubmit)for(let $ of u)$.url&&Pe.current.delete($.url);return o.onSubmit?.(m),a&&(xe(""),te([])),!0},[W,xe,te]);e.useEffect(()=>{let a=Pe.current;if(a.size===0)return;let o=new Set(ce.map(u=>u.url));for(let u of Array.from(a))o.has(u)||(URL.revokeObjectURL(u),a.delete(u))},[ce]),e.useEffect(()=>{let a=Pe.current;return()=>{if(!x.current.isAttachmentsControlled){for(let o of Array.from(a))URL.revokeObjectURL(o);a.clear()}}},[]);let we=e.useCallback(a=>{let o=x.current,u=Ne.current;if(clearTimeout(ye.current),ve.current=!1,!u||o.disabled||o.readOnly)return;let m=a?.accept!=null?pe(a.accept):o.accepts,$=a?.multiple??o.multiple;Oe.current={patterns:m,multiple:$},u.accept=m.join(","),u.multiple=$,ue.current=!0,u.click(),setTimeout(()=>{document.hasFocus()&&(ue.current=!1)},1e3)},[]),Ze=e.useCallback(()=>{ve.current=!0,clearTimeout(ye.current),ye.current=setTimeout(()=>{ve.current=!1},800)},[]);e.useEffect(()=>()=>clearTimeout(ye.current),[]),e.useEffect(()=>{let a=Ne.current,o=()=>{ue.current=!1};return window.addEventListener("focus",o),a?.addEventListener("cancel",o),()=>{window.removeEventListener("focus",o),a?.removeEventListener("cancel",o)}},[]);let At=e.useCallback(a=>{let o=a.currentTarget,u=Array.from(o.files??[]),m=Oe.current;ae(u,m?.patterns??x.current.accepts,m?.multiple),ue.current=!1,Oe.current=null,o.value=""},[ae]),wt=e.useCallback(a=>{Re?.(a);let o=x.current,u=Ge.current;if(!u||o.expandOn==="none")return;let m=a.relatedTarget;m&&u.contains(m)||ue.current||ve.current||!We(o.value)&&W().length===0&&ee(!1)},[Re,ee,W]),St=e.useCallback(a=>{Ae(a)},[Ae]),{getRootProps:Et,isDragActive:Tt}=It({onDrop:St,onDragEnter:()=>le(""),noClick:!0,noKeyboard:!0,noPaste:!0,disabled:!oe||l||g}),Ie=oe&&Tt;e.useImperativeHandle(Te,()=>({focusTextarea:()=>Me.current?.focus({preventScroll:!0}),openFilePicker:()=>we()}),[we]);let Lt=e.useCallback(a=>{if(l||a.pointerType==="mouse"&&a.button!==0)return;let o=a.target;o instanceof Element&&o.closest('button, [role="button"], a[href], input, textarea, select, [contenteditable], [tabindex]:not([tabindex="-1"])')||(a.preventDefault(),Me.current?.focus({preventScroll:!0}))},[l]),kt=e.useMemo(()=>({open:Q,setOpen:ee,setValue:xe,size:P,expandOn:A,minLines:h,maxLines:B,sendMode:H,disabled:l,readOnly:g,paste:D,clearOnSubmit:Y,multiple:F,textareaRef:Me,attachments:ce,removeAttachment:Je,submit:Qe,appendFiles:Ae,appendFilesFromPaste:Xe,openFilePicker:we,beginFilePickerPress:Ze}),[Q,ee,xe,P,A,h,B,H,l,g,D,Y,F,ce,Je,Qe,Ae,Xe,we,Ze]);return e.createElement(ct.Provider,{value:kt},e.createElement($e.Provider,{value:V},e.createElement(Ft,{features:zt},e.createElement(Ht,{reducedMotion:"user"},e.createElement("div",{...Le,ref:xt,className:L("rt-ChatbarRoot",`rt-r-size-${P}`,r),style:{position:"relative",width:j,maxWidth:re,...d},"data-state":Q?"open":"closed","data-disabled":l?"":void 0,"data-readonly":g?"":void 0,"data-drop-active":Ie?"":void 0,"data-accent-color":M,"data-radius":z,"data-panel-background":t,"data-material":t,onBlurCapture:wt},e.createElement("input",{ref:Ne,type:"file",tabIndex:-1,"aria-hidden":!0,style:{display:"none"},onChange:At}),Ce?e.createElement("div",{className:"rt-ChatbarNotices"},e.createElement(rt.Provider,{value:P},Ce)):null,e.createElement("div",{...oe?Et():{},style:{width:"100%",flex:"1 1 auto",minHeight:0},onPointerDown:Lt},e.createElement(he.div,{className:L("rt-ChatbarBox",`rt-variant-${E??"surface"}`),style:{position:"relative"},"data-accent-color":M,"data-radius":z,"data-panel-background":t,"data-material":t,layout:!0,transition:fe},e.createElement(he.div,{className:"rt-ChatbarGrid",layout:"position",transition:fe},f),Ie&&e.createElement("div",{className:"rt-ChatbarDropOverlay","aria-hidden":!0},e.createElement("div",{className:"rt-ChatbarDropContent"},e.createElement(me,{emphasis:"medium",size:P,weight:"medium"},"Drop files here to attach"))))),ge?e.createElement(me,{as:"div",size:P==="3"?"2":"1",emphasis:"medium",className:"rt-ChatbarContext"},ge):null,e.createElement(Be,{role:"status","aria-live":"polite"},Ie?"Drop files here to attach.":e.createElement("span",{key:_e.id},_e.text)))))))});ut.displayName="Chatbar.Root";var dt=e.forwardRef((n,s)=>{let{className:r,style:d,asChild:f,onFocus:i,onChange:b,onPaste:c,onKeyDown:C,onCompositionStart:p,onCompositionEnd:S,submitOnEnter:A=!1,...h}=n,B=K(),H=e.useContext($e),{open:l,minLines:g,maxLines:k,expandOn:P,disabled:E,readOnly:M,setOpen:z,setValue:v,textareaRef:N,paste:j,appendFilesFromPaste:re,size:y,submit:I,clearOnSubmit:_}=B,be=it(s,N),F=e.useRef(0),G=e.useRef(0),q=e.useRef(!1),D=e.useRef({open:l,minLines:g,maxLines:k});Ve(()=>{D.current={open:l,minLines:g,maxLines:k}},[l,g,k]);let O=e.useCallback(()=>{let t=N.current;if(!t)return;let R=window.getComputedStyle(t);F.current=parseFloat(R.lineHeight)||20,G.current=(parseFloat(R.paddingTop)||0)+(parseFloat(R.paddingBottom)||0)},[N]),Y=e.useCallback((t,R)=>{let{minLines:w,maxLines:se}=D.current,V=F.current,X=G.current,ke=Math.ceil((R?w:1)*V)+X,ie=Math.ceil((R?se:1)*V)+X,Q=Math.max(t.scrollHeight,ke);t.style.height=`${Math.min(Q,ie)}px`;let Z=Q>ie;t.style.overflowY=Z?"auto":"hidden",t.style.maxHeight=Z?`${ie}px`:"none"},[]);Ve(()=>{O()},[O,y]),Ve(()=>{let t=N.current;t&&(F.current===0&&O(),ot(t,()=>{t.style.height="auto";let R=l;if(!l&&(P==="overflow"||P==="both")){let w=Math.ceil(F.current)+G.current;t.scrollHeight>w+1&&(R=!0,z(!0))}Y(t,R)}))},[H,l,P,g,k,y,z,N,O,Y]),e.useEffect(()=>{let t=N.current;if(!t||typeof ResizeObserver>"u")return;let R=-1,w=new ResizeObserver(se=>{let V=se[0]?.contentRect.width??0;if(V===R)return;let X=R===-1;R=V,!X&&(O(),ot(t,()=>{t.style.height="auto",Y(t,D.current.open)}))});return w.observe(t),()=>w.disconnect()},[N,O,Y]),e.useEffect(()=>{},[]);let Ee=e.useCallback(t=>{i?.(t),!(E||M)&&(P==="focus"||P==="both")&&!l&&z(!0)},[E,M,P,l,z,i]),oe=e.useCallback(t=>{v(t.currentTarget.value),b?.(t)},[v,b]),Te=e.useCallback(t=>{if(c?.(t),t.defaultPrevented||!j||E||M)return;let R=Array.from(t.clipboardData?.items??[]).filter(w=>w.kind==="file").map(w=>w.getAsFile()).filter(w=>!!w);R.length!==0&&re(R)>0&&t.preventDefault()},[j,E,M,c,re]),Re=e.useCallback(t=>{q.current=!0,p?.(t)},[p]),Ce=e.useCallback(t=>{q.current=!1,S?.(t)},[S]),ge=e.useCallback(t=>{C?.(t),!(t.defaultPrevented||!A)&&(t.key!=="Enter"||t.shiftKey||t.altKey||t.ctrlKey||t.metaKey||q.current||t.nativeEvent.isComposing||t.nativeEvent.keyCode===229||(t.preventDefault(),I(_)))},[A,C,I,_]),Le=f?U:"textarea";return e.createElement(he.div,{className:L("rt-ChatbarField","rt-ChatbarTextarea",r),layout:"position",transition:fe},e.createElement(Le,{...h,ref:be,className:"rt-ChatbarInput",value:H,onChange:oe,onFocus:Ee,onPaste:Te,onKeyDown:ge,onCompositionStart:Re,onCompositionEnd:Ce,disabled:E,readOnly:M,rows:l?g:1,spellCheck:h.spellCheck??!0,autoCorrect:h.autoCorrect??"on",style:d}))});dt.displayName="Chatbar.Textarea";var mt=e.forwardRef((n,s)=>{let{children:r,asChild:d,className:f,...i}=n;return K().open?null:e.createElement(d?U:"div",{...i,ref:s,className:L("rt-ChatbarInlineStart",f)},r)});mt.displayName="Chatbar.InlineStart";var pt=e.forwardRef((n,s)=>{let{children:r,asChild:d,className:f,...i}=n;return K().open?null:e.createElement(d?U:"div",{...i,ref:s,className:L("rt-ChatbarInlineEnd",f)},r)});pt.displayName="Chatbar.InlineEnd";var ht=e.forwardRef((n,s)=>{let{asChild:r,forceMount:d,renderAttachment:f,className:i,...b}=n,c=K();if(c.attachments.length===0&&!d)return null;let C=r?U:"div";return e.createElement(he.div,{layout:"position",transition:fe},e.createElement(C,{...b,ref:s,className:L("rt-ChatbarAttachmentsRow",i),role:"list","aria-label":b["aria-label"]??"Attachments"},e.createElement(nt,{className:"rt-ChatbarScrollArea",scrollbars:"horizontal",size:"1"},e.createElement(de,{align:"center",gap:"2",minWidth:"fit-content"},c.attachments.map(p=>e.createElement(Ue,{key:p.id,attachment:p,asChild:!!f},f?.(p)))))))});ht.displayName="Chatbar.AttachmentsRow";var Wt={uploading:"uploading",error:"failed to upload"},Ue=e.forwardRef((n,s)=>{let{attachment:r,asChild:d,className:f,children:i,...b}=n,c=K(),C=d?U:"div",p=!!r.url&<(r.name,r.type),S=`${Math.ceil(r.size/1024)} KB`,A=r.status?Wt[r.status]:void 0,h=c.disabled||c.readOnly,B=H=>{let l=H.currentTarget.closest('[role="listitem"]'),g=l?.parentElement?Array.from(l.parentElement.children):[],k=l?g.indexOf(l):-1,E=(g[k+1]??g[k-1])?.querySelector(".rt-ChatbarAttachmentRemove");E?E.focus():c.textareaRef.current?.focus({preventScroll:!0}),c.removeAttachment(r.id)};return e.createElement(C,{...b,ref:s,className:L("rt-ChatbarAttachment",f),role:"listitem","data-kind":p?"image":"file","data-status":r.status,title:r.name},i??e.createElement(de,{align:"center",gap:"2",pr:p?void 0:"6"},e.createElement("div",{className:"rt-ChatbarAttachmentPreview","aria-hidden":!0},p?e.createElement("img",{className:"rt-ChatbarAttachmentImage",src:r.url,alt:""}):e.createElement(at,null)),p?e.createElement(Be,null,r.name,", ",S,A?`, ${A}`:""):e.createElement(de,{direction:"column",gap:"0",minWidth:"0"},e.createElement(me,{size:c.size,weight:"medium",truncate:!0},r.name),e.createElement(me,{size:"1",color:r.status==="error"?"red":void 0,emphasis:r.status==="error"?void 0:"medium"},S,A?` \xB7 ${A}`:"")),!h&&e.createElement(je,{className:"rt-ChatbarAttachmentRemove","aria-label":`Remove ${r.name}`,size:"1",variant:"classic",color:"gray",onClick:B},e.createElement(tt,null))))});Ue.displayName="Chatbar.Attachment";var ft=e.forwardRef((n,s)=>{let{asChild:r,accept:d,multiple:f,disabled:i,onPointerDown:b,onClick:c,...C}=n,p=K(),S=i||p.disabled||p.readOnly;return e.createElement(r?U:"button",{...C,ref:s,className:L("rt-ChatbarAttachTrigger",C.className),type:C.type??"button","aria-label":C["aria-label"]??"Add attachments",disabled:S,onPointerDown:h=>{b?.(h),!S&&!h.defaultPrevented&&p.beginFilePickerPress()},onClick:h=>{c?.(h),!(S||h.defaultPrevented)&&p.openFilePicker({accept:d,multiple:f})}})});ft.displayName="Chatbar.AttachTrigger";var bt=e.forwardRef((n,s)=>{let{asChild:r,children:d,className:f,...i}=n;if(!K().open)return null;let c=r?U:"div";return e.createElement(he.div,{layout:"position",transition:fe},e.createElement(c,{...i,ref:s,className:L("rt-ChatbarRow",f)},e.createElement(de,{align:"center",justify:"between",width:"100%"},d)))});bt.displayName="Chatbar.Row";var Rt=e.forwardRef((n,s)=>{let{className:r,...d}=n;return e.createElement("div",{...d,ref:s,className:L("rt-ChatbarRowStart",r)})});Rt.displayName="Chatbar.RowStart";var Ct=e.forwardRef((n,s)=>{let{className:r,...d}=n;return e.createElement("div",{...d,ref:s,className:L("rt-ChatbarRowEnd",r)})});Ct.displayName="Chatbar.RowEnd";var gt=e.forwardRef((n,s)=>{let{asChild:r,clearOnSend:d,disabled:f,children:i,style:b,className:c,size:C,variant:p,tabIndex:S,onClick:A,status:h="ready",onStop:B,onRetry:H,stopLabel:l="Stop",retryLabel:g="Retry",stopIcon:k,retryIcon:P,"aria-label":E,"aria-labelledby":M,...z}=n,v=K(),N=e.useContext($e),j=We(N)||v.attachments.length>0,y=j?"send":h==="submitted"||h==="streaming"?"stop":h==="error"?"retry":"send";if(v.sendMode==="never"&&y==="send")return null;let I=y!=="send"||v.sendMode==="always"||j,_=y==="send"?f||v.disabled||v.readOnly||!j:f||v.disabled,F=y==="stop"?{"aria-label":l}:y==="retry"?{"aria-label":g}:M?{"aria-labelledby":M}:{"aria-label":E??"Send"},G=D=>{if(A?.(D),D.defaultPrevented||_)return;if(y==="stop"){B?.();return}if(y==="retry"){H?.();return}let O=d??v.clearOnSubmit;v.submit(O)&&O&&v.textareaRef.current?.focus({preventScroll:!0})},q=y==="stop"?k??(h==="submitted"?e.createElement(et,{size:v.size}):e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0},e.createElement("rect",{x:"7",y:"7",width:"10",height:"10",rx:"2"}))):y==="retry"?P??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),e.createElement("path",{d:"M3 3v5h5"})):i??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e.createElement("path",{d:"M5 12h14"}),e.createElement("path",{d:"m12 5 7 7-7 7"}));return e.createElement(je,{...z,ref:s,size:C??v.size,variant:p??(v.open||y!=="send"?"solid":"ghost"),disabled:_,className:L("rt-ChatbarSend",c),style:{opacity:I?1:0,pointerEvents:I?void 0:"none",...b},"aria-hidden":I?void 0:!0,tabIndex:I?S:-1,asChild:r,onClick:G,"data-status":h,"data-mode":y,...F},q)});gt.displayName="Chatbar.Send";export{ut as a,dt as b,mt as c,pt as d,ht as e,Ue as f,ft as g,bt as h,Rt as i,Ct as j,gt as k,$t as l};
|
|
2
|
+
//# sourceMappingURL=chunk-YTD3AJAU.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/chatbar.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { LazyMotion, MotionConfig, domAnimation, m } from 'motion/react';\nimport { useComposedRefs } from 'radix-ui/internal';\nimport { useDropzone } from 'react-dropzone';\n\nimport { IconButton, type IconButtonProps } from './icon-button.js';\nimport { CloseIcon, FileTextIcon } from './icons.js';\nimport { Flex } from './flex.js';\nimport { ScrollArea } from './scroll-area.js';\nimport { Slot } from './slot.js';\nimport { NoticeSizeContext } from './notice.js';\nimport { Spinner } from './spinner.js';\nimport { Text } from './text.js';\nimport { VisuallyHidden } from './visually-hidden.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { accentColors } from '../props/color.prop.js';\nimport type { radii } from '../props/radius.prop.js';\n\n// Avoid SSR warnings by using an isomorphic layout effect\nconst useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\n\n/**\n * Runs `measure` with the placeholder taken out of layout, so a height read\n * reflects the value alone.\n *\n * A textarea with an empty value lays its placeholder out as real text, so\n * `scrollHeight` reports the placeholder wrapped at whatever width the field\n * has at that instant. That sizes an empty bar to the suggestion showing in it\n * rather than to `minLines`, and when the read lands before the field has its\n * final width -- a panel still animating open, a flex parent whose basis is 0\n * -- it wraps that text at a fraction of the real width and opens the bar at\n * `maxLines`. The first keystroke takes the placeholder out of layout and the\n * height snaps back, which is what made the bug look intermittent rather than\n * simply wrong.\n *\n * The reset to 'auto' and the `scrollHeight` read sit in different functions\n * here, so the whole measurement window is wrapped rather than a single read.\n * Costs one extra style recalc on a path that is already forcing a reflow.\n */\nfunction withoutPlaceholder(el: HTMLTextAreaElement, measure: () => void): void {\n const { placeholder } = el;\n if (!placeholder) {\n measure();\n return;\n }\n el.placeholder = '';\n try {\n measure();\n } finally {\n el.placeholder = placeholder;\n }\n}\n\n// Shared layout spring; hoisted so every motion node receives the same object\nconst LAYOUT_TRANSITION = { layout: { type: 'spring', visualDuration: 0.15, bounce: 0.1 } } as const;\n\ntype ExpandOn = 'none' | 'focus' | 'overflow' | 'both';\ntype SendMode = 'always' | 'whenDirty' | 'never';\n\n// Attachments\n/** Status flag for attachment lifecycle. */\ntype AttachmentStatus = 'idle' | 'uploading' | 'error' | 'done';\n/**\n * Attachment data model used by Chatbar.\n * - `file` exposes the original File object for uploads and processing.\n * - `url` is an object URL used for image previews. Chatbar revokes it when the\n * attachment is removed; once an attachment is handed to `onSubmit`, the\n * consumer owns the URL and is responsible for revoking it.\n */\ninterface ChatbarAttachment {\n id: string;\n name: string;\n size: number;\n type: string;\n /** Original File object for uploads and processing */\n file: File;\n url?: string;\n status?: AttachmentStatus;\n progress?: number;\n meta?: Record<string, unknown>;\n}\n\ntype ChatbarRejectReason = 'type' | 'size' | 'count';\ninterface ChatbarAttachmentRejection {\n file: File;\n reason: ChatbarRejectReason;\n}\n\ninterface ChatbarSubmitPayload {\n value: string;\n attachments: ChatbarAttachment[];\n}\n\ninterface FilePickerOptions {\n accept?: string | string[];\n multiple?: boolean;\n}\n\ninterface ChatbarContextValue {\n open: boolean;\n setOpen(next: boolean): void;\n\n setValue(next: string): void;\n\n size: '1' | '2' | '3';\n expandOn: ExpandOn;\n minLines: number;\n maxLines: number;\n sendMode: SendMode;\n disabled?: boolean;\n readOnly?: boolean;\n paste: boolean;\n clearOnSubmit: boolean;\n multiple: boolean;\n\n textareaRef: React.RefObject<HTMLTextAreaElement | null>;\n\n attachments: ChatbarAttachment[];\n removeAttachment(id: string): void;\n\n /** Validates and submits; returns false when there was nothing to submit */\n submit(clear: boolean): boolean;\n appendFiles(files: File[]): number;\n appendFilesFromPaste(files: File[]): number;\n openFilePicker(options?: FilePickerOptions): void;\n /** Guards blur-collapse between pointerdown on a picker trigger and its click */\n beginFilePickerPress(): void;\n}\n\nconst ChatbarContext = React.createContext<ChatbarContextValue | null>(null);\n// Value lives in its own context so keystrokes only re-render parts that read it\nconst ChatbarValueContext = React.createContext<string>('');\n\nconst useChatbarContext = () => {\n const ctx = React.useContext(ChatbarContext);\n if (!ctx) throw new Error('Chatbar context not found. Wrap parts in <Chatbar.Root>.');\n return ctx;\n};\n\nconst toArray = (val: string | string[] | undefined) =>\n Array.isArray(val) ? val : typeof val === 'string' ? val.split(',').map((s) => s.trim()).filter(Boolean) : [];\n\nconst matchesAccept = (file: File, patterns: string[]) => {\n if (patterns.length === 0) return true;\n const mime = file.type.toLowerCase();\n const name = file.name.toLowerCase();\n for (const patRaw of patterns) {\n const pat = patRaw.toLowerCase();\n if (pat.includes('/')) {\n const [type, subtype] = pat.split('/');\n const [fmType, fmSubtype] = mime.split('/');\n if (type === '*' || (type === fmType && (subtype === '*' || subtype === fmSubtype))) return true;\n } else if (pat.startsWith('.')) {\n if (name.endsWith(pat)) return true;\n }\n }\n return false;\n};\n\nconst IMAGE_EXT_RE = /\\.(png|jpe?g|gif|webp|bmp|svg|avif)$/i;\nconst isImageLike = (name: string, type: string) => (type || '').toLowerCase().startsWith('image/') || IMAGE_EXT_RE.test(name);\n\nconst hasText = (value: string) => value.trim().length > 0;\n\nconst plural = (n: number, word: string) => `${n} ${word}${n === 1 ? '' : 's'}`;\n\nlet attachmentCounter = 0;\nconst createAttachmentId = () => `chatbar-attachment-${Date.now()}-${++attachmentCounter}`;\n\n/**\n * Chatbar container and state provider.\n *\n * Value & Open\n * - Supports controlled/uncontrolled `value` and `open`.\n *\n * Attachments\n * - Controlled/uncontrolled attachments with client-side filtering.\n * - Filters by `accept`/`pasteAccept`, `multiple`, `maxAttachments`, and `maxFileSize`.\n * - Rejections are reported via `onAttachmentReject`.\n *\n * Submit\n * - `onSubmit({ value, attachments })` emits both message and attachments.\n * - Submitting requires text or at least one attachment.\n * - `clearOnSubmit` clears message and attachments by default.\n */\ninterface ChatbarRootBaseProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n\n /** When the chatbar expands on its own. `none` leaves open state entirely to the consumer. */\n expandOn?: ExpandOn;\n\n /** Minimum visible lines when expanded (default: 3). The compact state is always one line. */\n minLines?: number;\n /** Maximum number of lines before scrolling (default: 6) */\n maxLines?: number;\n\n /** Controls Send button visibility only. Enter-to-submit is controlled by `Textarea submitOnEnter`. */\n sendMode?: SendMode;\n\n /** Disables text input, submission and every way of adding attachments */\n disabled?: boolean;\n /** Prevents editing, submission and adding attachments */\n readOnly?: boolean;\n\n /** Combined submit payload */\n onSubmit?: (payload: ChatbarSubmitPayload) => void;\n\n size?: '1' | '2' | '3';\n variant?: 'surface' | 'outline' | 'classic' | 'ghost' | 'soft';\n /** Accent color for the control (matches TextArea) */\n color?: (typeof accentColors)[number];\n /** Optional radius override (matches TextArea) */\n radius?: (typeof radii)[number];\n /** Panel/material translucency flags (matches TextArea) */\n panelBackground?: 'solid' | 'translucent';\n material?: 'solid' | 'translucent';\n\n width?: React.CSSProperties['width'];\n maxWidth?: React.CSSProperties['maxWidth'];\n\n // Attachments API\n attachments?: ChatbarAttachment[];\n defaultAttachments?: ChatbarAttachment[];\n onAttachmentsChange?: (attachments: ChatbarAttachment[]) => void;\n accept?: string | string[];\n /** Allow more than one file per pick, paste or drop */\n multiple?: boolean;\n maxAttachments?: number;\n maxFileSize?: number;\n paste?: boolean;\n /** Accepted types for pasted files. Replaces `accept` for paste when set. */\n pasteAccept?: string | string[];\n /** Clear message and attachments after submit */\n clearOnSubmit?: boolean;\n onAttachmentReject?: (rejections: ChatbarAttachmentRejection[]) => void;\n\n /**\n * Enables drag-and-drop file uploads when true.\n *\n * When enabled:\n * - Files can be dropped anywhere on the chatbar\n * - Same validation rules apply (accept, multiple, maxFileSize, maxAttachments)\n * - Visual feedback shows during drag operations\n * - Rejected files trigger onAttachmentReject\n *\n * @default true\n */\n dropzone?: boolean;\n\n /**\n * Optional API ref to control Chatbar imperatively without relying on DOM refs.\n * Provides methods to focus the textarea and open the file picker.\n */\n apiRef?: React.Ref<ChatbarApi>;\n\n /**\n * Messages that need an answer before the next message, such as `Notice` and `Confirmation`.\n * They stack in a column above the chatbar, in the order given, so put the one the next\n * message answers last, nearest the text. They sit outside the box: a button in a notice never\n * submits the message, and pressing one never collapses the chatbar.\n */\n notices?: React.ReactNode;\n /**\n * Short facts that stay true about the conversation, such as the model or the context left.\n * They sit below the chatbar, inset from its sides.\n */\n context?: React.ReactNode;\n}\n\ntype RootElement = React.ElementRef<'div'>;\n/** Imperative API for Chatbar.Root */\nexport interface ChatbarApi {\n /** Focus the textarea input */\n focusTextarea: () => void;\n /** Open the file picker dialog (respects accept/multiple). No-op when disabled or read-only. */\n openFilePicker: () => void;\n}\n/**\n * Chatbar container and state provider.\n *\n * Behavior\n * - Supports controlled and uncontrolled `value` and `open` states via props.\n * - Provides context to subcomponents like `Textarea`, `Row`, and `Send`.\n * - Exposes `data-state`, `data-disabled`, and `data-readonly` attributes for styling.\n *\n * Attachments\n * - Paste-to-attach: when `paste` is enabled, pasting files adds attachments.\n * - Additions and rejections are announced through a polite live region.\n *\n * Dropzone\n * - When `dropzone` is true, enables drag-and-drop file uploads.\n * - Visual feedback via `data-drop-active` attribute during drag operations.\n *\n * Accessibility\n * - Consumers should label the `Textarea` via `aria-label`/`aria-labelledby`.\n */\ninterface RootProps extends ComponentPropsWithout<'div', RemovedProps | 'onSubmit' | 'color'>, ChatbarRootBaseProps {}\n\nconst Root = React.forwardRef<RootElement, RootProps>((props, forwardedRef) => {\n const {\n className,\n style,\n children,\n value: valueProp,\n defaultValue = '',\n onValueChange,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n expandOn = 'both',\n minLines = 3,\n maxLines = 6,\n sendMode = 'whenDirty',\n disabled,\n readOnly,\n onSubmit,\n size = '2',\n variant,\n color,\n radius,\n panelBackground,\n material,\n width,\n maxWidth,\n attachments: attachmentsProp,\n defaultAttachments,\n onAttachmentsChange,\n accept,\n multiple = true,\n maxAttachments,\n maxFileSize,\n paste = true,\n pasteAccept,\n clearOnSubmit = true,\n onAttachmentReject,\n dropzone = true,\n apiRef,\n onBlurCapture,\n notices,\n context,\n ...divProps\n } = props;\n const effectiveMaterial = material || panelBackground;\n\n const isValueControlled = valueProp != null;\n const [valueUncontrolled, setValueUncontrolled] = React.useState<string>(defaultValue);\n const value = isValueControlled ? valueProp : valueUncontrolled;\n\n const isOpenControlled = openProp != null;\n const [openUncontrolled, setOpenUncontrolled] = React.useState<boolean>(defaultOpen);\n const open = isOpenControlled ? openProp : openUncontrolled;\n\n // Treat `attachments` as controlled if the prop is provided, even if its value is `undefined`.\n // This avoids switching between controlled and uncontrolled when a consumer sets\n // `attachments={undefined}` to clear attachments. In that case we normalize to an empty array.\n const isAttachmentsControlled = 'attachments' in props;\n const [attachmentsUncontrolled, setAttachmentsUncontrolled] = React.useState<ChatbarAttachment[]>(() => defaultAttachments ?? []);\n const attachments = React.useMemo(\n () => (isAttachmentsControlled ? (attachmentsProp ?? []) : attachmentsUncontrolled),\n [isAttachmentsControlled, attachmentsProp, attachmentsUncontrolled],\n );\n\n // `id` changes on every announcement so identical messages still update the live region\n const [announcement, setAnnouncementState] = React.useState({ text: '', id: 0 });\n const announce = React.useCallback((text: string) => setAnnouncementState((prev) => ({ text, id: prev.id + 1 })), []);\n\n const rootRef = React.useRef<HTMLDivElement>(null);\n const composedRootRef = useComposedRefs(forwardedRef, rootRef);\n const textareaRef = React.useRef<HTMLTextAreaElement>(null);\n const fileInputRef = React.useRef<HTMLInputElement>(null);\n\n // Blur-collapse guards: `pickerOpenRef` is true while the native dialog is open,\n // `pressGuardRef` covers the gap between pointerdown on a trigger and its click\n // (Safari blurs the textarea before the click fires).\n const pickerOpenRef = React.useRef(false);\n const pressGuardRef = React.useRef(false);\n const pressGuardTimerRef = React.useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n const pickerRef = React.useRef<{ patterns: string[]; multiple: boolean } | null>(null);\n\n const acceptKey = toArray(accept).join(',');\n const pasteAcceptKey = toArray(pasteAccept).join(',');\n const accepts = React.useMemo(() => toArray(acceptKey), [acceptKey]);\n const pasteAccepts = React.useMemo(() => (pasteAcceptKey ? toArray(pasteAcceptKey) : accepts), [pasteAcceptKey, accepts]);\n\n // Latest props/state for stable callbacks. Synced during render (not in an effect) so\n // child layout effects that call setOpen/setValue see this render's handlers.\n const snapshot = {\n value,\n attachments,\n accepts,\n pasteAccepts,\n multiple,\n maxAttachments,\n maxFileSize,\n disabled,\n readOnly,\n expandOn,\n isValueControlled,\n isOpenControlled,\n isAttachmentsControlled,\n onValueChange,\n onOpenChange,\n onAttachmentsChange,\n onAttachmentReject,\n onSubmit,\n };\n const latest = React.useRef(snapshot);\n // eslint-disable-next-line react-hooks/refs -- read only in callbacks/effects; see comment above\n latest.current = snapshot;\n\n // Attachments set during the current event, before Root re-renders. Cleared at the end\n // of the task so a controlled parent that rejects the change is not overridden.\n const pendingAttachmentsRef = React.useRef<ChatbarAttachment[] | null>(null);\n const getAttachments = React.useCallback(() => pendingAttachmentsRef.current ?? latest.current.attachments, []);\n\n const setOpen = React.useCallback((next: boolean) => {\n if (!latest.current.isOpenControlled) setOpenUncontrolled(next);\n latest.current.onOpenChange?.(next);\n }, []);\n\n const setValue = React.useCallback((next: string) => {\n if (!latest.current.isValueControlled) setValueUncontrolled(next);\n latest.current.onValueChange?.(next);\n }, []);\n\n const setAttachments = React.useCallback((next: ChatbarAttachment[]) => {\n // Back-to-back updates in one event must see each other\n pendingAttachmentsRef.current = next;\n queueMicrotask(() => {\n pendingAttachmentsRef.current = null;\n });\n if (!latest.current.isAttachmentsControlled) setAttachmentsUncontrolled(next);\n latest.current.onAttachmentsChange?.(next);\n }, []);\n\n // Object URLs Chatbar created and still owns\n const ownedUrlsRef = React.useRef<Set<string>>(new Set());\n\n const addFiles = React.useCallback(\n (files: File[], patterns: string[], multiple: boolean = latest.current.multiple): number => {\n const cfg = latest.current;\n if (cfg.disabled || cfg.readOnly || files.length === 0) return 0;\n\n const current = getAttachments();\n const next: ChatbarAttachment[] = [];\n const rejected: ChatbarAttachmentRejection[] = [];\n const remainingSlots = typeof cfg.maxAttachments === 'number' ? Math.max(cfg.maxAttachments - current.length, 0) : Infinity;\n const perActionLimit = multiple ? Infinity : 1;\n\n for (const file of files) {\n if (next.length >= remainingSlots || next.length >= perActionLimit) {\n rejected.push({ file, reason: 'count' });\n continue;\n }\n if (typeof cfg.maxFileSize === 'number' && file.size > cfg.maxFileSize) {\n rejected.push({ file, reason: 'size' });\n continue;\n }\n if (!matchesAccept(file, patterns)) {\n rejected.push({ file, reason: 'type' });\n continue;\n }\n const url = isImageLike(file.name, file.type) ? URL.createObjectURL(file) : undefined;\n if (url) ownedUrlsRef.current.add(url);\n next.push({ id: createAttachmentId(), name: file.name, size: file.size, type: file.type, file, url, status: 'idle' });\n }\n\n const messages: string[] = [];\n if (next.length > 0) {\n setAttachments(current.concat(next));\n if (cfg.expandOn !== 'none') setOpen(true);\n messages.push(`${plural(next.length, 'file')} attached.`);\n }\n if (rejected.length > 0) {\n cfg.onAttachmentReject?.(rejected);\n messages.push(`${plural(rejected.length, 'file')} could not be attached.`);\n }\n if (messages.length > 0) announce(messages.join(' '));\n return next.length;\n },\n [getAttachments, setAttachments, setOpen, announce],\n );\n\n const appendFiles = React.useCallback((files: File[]) => addFiles(files, latest.current.accepts), [addFiles]);\n const appendFilesFromPaste = React.useCallback((files: File[]) => addFiles(files, latest.current.pasteAccepts), [addFiles]);\n\n const removeAttachment = React.useCallback(\n (id: string) => {\n const current = getAttachments();\n const removed = current.find((a) => a.id === id);\n if (!removed) return;\n setAttachments(current.filter((a) => a.id !== id));\n announce(`Removed ${removed.name}.`);\n },\n [getAttachments, setAttachments, announce],\n );\n\n const submit = React.useCallback(\n (clear: boolean) => {\n const cfg = latest.current;\n if (cfg.disabled || cfg.readOnly) return false;\n const current = getAttachments();\n if (!hasText(cfg.value) && current.length === 0) return false;\n const payload = { value: cfg.value, attachments: current };\n // Hand preview URLs to the consumer only when they leave the chatbar; URLs still\n // rendered here stay owned so removing them later revokes them\n if (clear && cfg.onSubmit) {\n for (const att of current) if (att.url) ownedUrlsRef.current.delete(att.url);\n }\n cfg.onSubmit?.(payload);\n if (clear) {\n setValue('');\n setAttachments([]);\n }\n return true;\n },\n [getAttachments, setValue, setAttachments],\n );\n\n // Revoke owned object URLs that are no longer referenced by current attachments\n React.useEffect(() => {\n const owned = ownedUrlsRef.current;\n if (owned.size === 0) return;\n const current = new Set(attachments.map((a) => a.url));\n for (const url of Array.from(owned)) {\n if (!current.has(url)) {\n URL.revokeObjectURL(url);\n owned.delete(url);\n }\n }\n }, [attachments]);\n\n // On unmount, revoke URLs only when Chatbar owns the attachment list;\n // controlled attachments may still be rendered by the parent.\n React.useEffect(() => {\n const owned = ownedUrlsRef.current;\n return () => {\n if (latest.current.isAttachmentsControlled) return;\n for (const url of Array.from(owned)) URL.revokeObjectURL(url);\n owned.clear();\n };\n }, []);\n\n const openFilePicker = React.useCallback((options?: FilePickerOptions) => {\n const cfg = latest.current;\n const input = fileInputRef.current;\n // The picker guard takes over from the press guard\n clearTimeout(pressGuardTimerRef.current);\n pressGuardRef.current = false;\n if (!input || cfg.disabled || cfg.readOnly) return;\n const patterns = options?.accept != null ? toArray(options.accept) : cfg.accepts;\n const multiple = options?.multiple ?? cfg.multiple;\n pickerRef.current = { patterns, multiple };\n input.accept = patterns.join(',');\n input.multiple = multiple;\n pickerOpenRef.current = true;\n input.click();\n // Browsers block the dialog outside a user gesture; if the window kept focus,\n // no dialog opened and no focus/cancel/change event will clear the guard\n setTimeout(() => {\n if (document.hasFocus()) pickerOpenRef.current = false;\n }, 1000);\n }, []);\n\n const beginFilePickerPress = React.useCallback(() => {\n // On touch (notably iOS), the compatibility mousedown, blur and click arrive in later\n // tasks than pointerup, so hold the guard until the click or a timeout\n pressGuardRef.current = true;\n clearTimeout(pressGuardTimerRef.current);\n pressGuardTimerRef.current = setTimeout(() => {\n pressGuardRef.current = false;\n }, 800);\n }, []);\n\n React.useEffect(() => () => clearTimeout(pressGuardTimerRef.current), []);\n\n // Clear the picker guard when the dialog closes, whichever way it closes\n React.useEffect(() => {\n const input = fileInputRef.current;\n const reset = () => {\n pickerOpenRef.current = false;\n };\n window.addEventListener('focus', reset);\n input?.addEventListener('cancel', reset);\n return () => {\n window.removeEventListener('focus', reset);\n input?.removeEventListener('cancel', reset);\n };\n }, []);\n\n const handleFileInputChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const input = event.currentTarget;\n const files = Array.from(input.files ?? []);\n const picker = pickerRef.current;\n addFiles(files, picker?.patterns ?? latest.current.accepts, picker?.multiple);\n pickerOpenRef.current = false;\n pickerRef.current = null;\n // Reset so selecting the same file again still fires change\n input.value = '';\n },\n [addFiles],\n );\n\n const handleBlurCapture = React.useCallback(\n (event: React.FocusEvent<HTMLDivElement>) => {\n onBlurCapture?.(event);\n const cfg = latest.current;\n const rootEl = rootRef.current;\n if (!rootEl || cfg.expandOn === 'none') return;\n const nextTarget = event.relatedTarget as Node | null;\n if (nextTarget && rootEl.contains(nextTarget)) return;\n if (pickerOpenRef.current || pressGuardRef.current) return;\n if (!hasText(cfg.value) && getAttachments().length === 0) setOpen(false);\n },\n [onBlurCapture, setOpen, getAttachments],\n );\n\n const handleDrop = React.useCallback((files: File[]) => {\n appendFiles(files);\n }, [appendFiles]);\n\n // Validation happens in addFiles so drop, paste and picker share one rule set\n const { getRootProps, isDragActive } = useDropzone({\n onDrop: handleDrop,\n // Drop any earlier message so it is not re-announced when the drag hint goes away\n onDragEnter: () => announce(''),\n noClick: true,\n noKeyboard: true,\n // Textarea handles paste itself; letting the dropzone see it attaches twice\n noPaste: true,\n disabled: !dropzone || disabled || readOnly,\n });\n const dragActive = dropzone && isDragActive;\n\n React.useImperativeHandle(\n apiRef,\n () => ({\n focusTextarea: () => textareaRef.current?.focus({ preventScroll: true }),\n openFilePicker: () => openFilePicker(),\n }),\n [openFilePicker],\n );\n\n // Click-to-focus: focus textarea when clicking non-interactive areas inside the container\n const handleContainerPointerDown = React.useCallback(\n (event: React.PointerEvent) => {\n if (disabled) return;\n if (event.pointerType === 'mouse' && event.button !== 0) return;\n const target = event.target;\n if (target instanceof Element && target.closest('button, [role=\"button\"], a[href], input, textarea, select, [contenteditable], [tabindex]:not([tabindex=\"-1\"])')) return;\n event.preventDefault();\n textareaRef.current?.focus({ preventScroll: true });\n },\n [disabled],\n );\n\n const contextValue = React.useMemo<ChatbarContextValue>(\n () => ({\n open,\n setOpen,\n setValue,\n size,\n expandOn,\n minLines,\n maxLines,\n sendMode,\n disabled,\n readOnly,\n paste,\n clearOnSubmit,\n multiple,\n textareaRef,\n attachments,\n removeAttachment,\n submit,\n appendFiles,\n appendFilesFromPaste,\n openFilePicker,\n beginFilePickerPress,\n }),\n [\n open, setOpen, setValue, size, expandOn, minLines, maxLines, sendMode, disabled, readOnly, paste,\n clearOnSubmit, multiple, attachments, removeAttachment, submit, appendFiles, appendFilesFromPaste,\n openFilePicker, beginFilePickerPress,\n ],\n );\n\n return (\n <ChatbarContext.Provider value={contextValue}>\n <ChatbarValueContext.Provider value={value}>\n <LazyMotion features={domAnimation}>\n <MotionConfig reducedMotion=\"user\">\n <div\n {...divProps}\n ref={composedRootRef}\n className={classNames('rt-ChatbarRoot', `rt-r-size-${size}`, className)}\n style={{ position: 'relative', width, maxWidth, ...style }}\n data-state={open ? 'open' : 'closed'}\n data-disabled={disabled ? '' : undefined}\n data-readonly={readOnly ? '' : undefined}\n data-drop-active={dragActive ? '' : undefined}\n data-accent-color={color}\n data-radius={radius}\n data-panel-background={effectiveMaterial}\n data-material={effectiveMaterial}\n onBlurCapture={handleBlurCapture}\n >\n <input\n ref={fileInputRef}\n type=\"file\"\n tabIndex={-1}\n aria-hidden\n style={{ display: 'none' }}\n onChange={handleFileInputChange}\n />\n {notices ? (\n <div className=\"rt-ChatbarNotices\">\n <NoticeSizeContext.Provider value={size}>{notices}</NoticeSizeContext.Provider>\n </div>\n ) : null}\n <div {...(dropzone ? getRootProps() : {})} style={{ width: '100%', flex: '1 1 auto', minHeight: 0 }} onPointerDown={handleContainerPointerDown}>\n <m.div\n className={classNames('rt-ChatbarBox', `rt-variant-${variant ?? 'surface'}`)}\n style={{ position: 'relative' }}\n data-accent-color={color}\n data-radius={radius}\n data-panel-background={effectiveMaterial}\n data-material={effectiveMaterial}\n layout\n transition={LAYOUT_TRANSITION}\n >\n <m.div className=\"rt-ChatbarGrid\" layout=\"position\" transition={LAYOUT_TRANSITION}>\n {children}\n </m.div>\n {dragActive && (\n <div className=\"rt-ChatbarDropOverlay\" aria-hidden>\n <div className=\"rt-ChatbarDropContent\">\n <Text emphasis=\"medium\" size={size} weight=\"medium\">\n Drop files here to attach\n </Text>\n </div>\n </div>\n )}\n </m.div>\n </div>\n {context ? (\n <Text as=\"div\" size={size === '3' ? '2' : '1'} emphasis=\"medium\" className=\"rt-ChatbarContext\">\n {context}\n </Text>\n ) : null}\n <VisuallyHidden role=\"status\" aria-live=\"polite\">\n {dragActive ? 'Drop files here to attach.' : <span key={announcement.id}>{announcement.text}</span>}\n </VisuallyHidden>\n </div>\n </MotionConfig>\n </LazyMotion>\n </ChatbarValueContext.Provider>\n </ChatbarContext.Provider>\n );\n});\nRoot.displayName = 'Chatbar.Root';\n\n/**\n * Multi-line text input for Chatbar.\n * - Uses onChange to control value and avoid duplicate updates.\n * - Auto-resizes between minLines and maxLines.\n * - Expands on focus/overflow per `expandOn`.\n * - Paste-to-attach: when `paste` is enabled on Root, pasting files adds attachments.\n * - Provide `aria-label` or `aria-labelledby` for an accessible name.\n */\ninterface TextareaProps extends Omit<React.ComponentPropsWithoutRef<'textarea'>, 'size' | 'rows' | 'value' | 'defaultValue'> {\n asChild?: boolean;\n /**\n * When true, pressing Enter submits (Shift+Enter inserts a newline).\n * Works with every `sendMode`. Defaults to false.\n */\n submitOnEnter?: boolean;\n}\n\n/**\n * Chatbar multi-line text input.\n *\n * Behavior\n * - Controls the Chatbar value via React onChange.\n * - Auto-resizes between minLines and maxLines in a single layout effect, which\n * also opens the Chatbar when content overflows the compact height and\n * `expandOn` is `overflow` or `both`.\n * - Consumer handlers run first; calling `preventDefault` in `onKeyDown` or\n * `onPaste` skips the built-in submit or attach behavior.\n *\n * Accessibility\n * - Consumers should provide labeling via aria-label or aria-labelledby\n * on this component, as no implicit label is rendered.\n */\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>((props, forwardedRef) => {\n const {\n className,\n style,\n asChild,\n onFocus,\n onChange,\n onPaste,\n onKeyDown,\n onCompositionStart,\n onCompositionEnd,\n submitOnEnter = false,\n ...textareaProps\n } = props;\n const ctx = useChatbarContext();\n const value = React.useContext(ChatbarValueContext);\n const { open, minLines, maxLines, expandOn, disabled, readOnly, setOpen, setValue, textareaRef, paste, appendFilesFromPaste, size, submit, clearOnSubmit } = ctx;\n const composedRef = useComposedRefs(forwardedRef, textareaRef);\n\n // Cached metrics to avoid repeated getComputedStyle calls\n const lineHeightRef = React.useRef(0);\n const paddingRef = React.useRef(0);\n const composingRef = React.useRef(false);\n\n const sizingRef = React.useRef({ open, minLines, maxLines });\n // Declared before the sizing effect so it runs first in the same commit\n useIsomorphicLayoutEffect(() => {\n sizingRef.current = { open, minLines, maxLines };\n }, [open, minLines, maxLines]);\n\n const recomputeMetrics = React.useCallback(() => {\n const el = textareaRef.current;\n if (!el) return;\n const computedStyle = window.getComputedStyle(el);\n lineHeightRef.current = parseFloat(computedStyle.lineHeight) || 20;\n paddingRef.current = (parseFloat(computedStyle.paddingTop) || 0) + (parseFloat(computedStyle.paddingBottom) || 0);\n }, [textareaRef]);\n\n // Sizes `el` for the given open state; caller must have set height to 'auto' first\n const applyHeight = React.useCallback((el: HTMLTextAreaElement, isOpen: boolean) => {\n const { minLines: min, maxLines: max } = sizingRef.current;\n const lineHeight = lineHeightRef.current;\n const padding = paddingRef.current;\n const minHeight = Math.ceil((isOpen ? min : 1) * lineHeight) + padding;\n const maxHeight = Math.ceil((isOpen ? max : 1) * lineHeight) + padding;\n const contentHeight = Math.max(el.scrollHeight, minHeight);\n el.style.height = `${Math.min(contentHeight, maxHeight)}px`;\n const overflowing = contentHeight > maxHeight;\n el.style.overflowY = overflowing ? 'auto' : 'hidden';\n el.style.maxHeight = overflowing ? `${maxHeight}px` : 'none';\n }, []);\n\n // Typography depends on size\n useIsomorphicLayoutEffect(() => {\n recomputeMetrics();\n }, [recomputeMetrics, size]);\n\n // Single place for sizing and overflow auto-open: one height reset, one scrollHeight read\n useIsomorphicLayoutEffect(() => {\n const el = textareaRef.current;\n if (!el) return;\n if (lineHeightRef.current === 0) recomputeMetrics();\n withoutPlaceholder(el, () => {\n el.style.height = 'auto';\n let isOpen = open;\n if (!open && (expandOn === 'overflow' || expandOn === 'both')) {\n const compactHeight = Math.ceil(lineHeightRef.current) + paddingRef.current;\n if (el.scrollHeight > compactHeight + 1) {\n isOpen = true;\n setOpen(true);\n }\n }\n applyHeight(el, isOpen);\n });\n }, [value, open, expandOn, minLines, maxLines, size, setOpen, textareaRef, recomputeMetrics, applyHeight]);\n\n // Width changes re-wrap text; re-measure only when the width actually changes\n React.useEffect(() => {\n const el = textareaRef.current;\n if (!el || typeof ResizeObserver === 'undefined') return;\n let prevWidth = -1;\n const ro = new ResizeObserver((entries) => {\n const width = entries[0]?.contentRect.width ?? 0;\n if (width === prevWidth) return;\n const first = prevWidth === -1;\n prevWidth = width;\n if (first) return;\n recomputeMetrics();\n withoutPlaceholder(el, () => {\n el.style.height = 'auto';\n applyHeight(el, sizingRef.current.open);\n });\n });\n ro.observe(el);\n return () => ro.disconnect();\n }, [textareaRef, recomputeMetrics, applyHeight]);\n\n // Dev-only warning if no accessible name is provided\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n const hasLabel = textareaProps['aria-label'] != null || textareaProps['aria-labelledby'] != null;\n if (!hasLabel) {\n console.warn('[Chatbar.Textarea] Provide aria-label or aria-labelledby to ensure the control has an accessible name.');\n }\n // warn only on mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const handleFocus = React.useCallback<React.FocusEventHandler<HTMLTextAreaElement>>(\n (event) => {\n onFocus?.(event);\n if (disabled || readOnly) return;\n if ((expandOn === 'focus' || expandOn === 'both') && !open) setOpen(true);\n },\n [disabled, readOnly, expandOn, open, setOpen, onFocus],\n );\n\n const handleChange = React.useCallback<React.ChangeEventHandler<HTMLTextAreaElement>>(\n (event) => {\n setValue(event.currentTarget.value);\n onChange?.(event);\n },\n [setValue, onChange],\n );\n\n const handlePaste = React.useCallback<React.ClipboardEventHandler<HTMLTextAreaElement>>(\n (event) => {\n onPaste?.(event);\n if (event.defaultPrevented || !paste || disabled || readOnly) return;\n const files = Array.from(event.clipboardData?.items ?? [])\n .filter((item) => item.kind === 'file')\n .map((item) => item.getAsFile())\n .filter((f): f is File => !!f);\n if (files.length === 0) return;\n // Suppress the filename/text representation only when a file was actually attached\n if (appendFilesFromPaste(files) > 0) event.preventDefault();\n },\n [paste, disabled, readOnly, onPaste, appendFilesFromPaste],\n );\n\n const handleCompositionStart = React.useCallback<React.CompositionEventHandler<HTMLTextAreaElement>>(\n (event) => {\n composingRef.current = true;\n onCompositionStart?.(event);\n },\n [onCompositionStart],\n );\n\n const handleCompositionEnd = React.useCallback<React.CompositionEventHandler<HTMLTextAreaElement>>(\n (event) => {\n composingRef.current = false;\n onCompositionEnd?.(event);\n },\n [onCompositionEnd],\n );\n\n const handleKeyDown = React.useCallback<React.KeyboardEventHandler<HTMLTextAreaElement>>(\n (event) => {\n onKeyDown?.(event);\n if (event.defaultPrevented || !submitOnEnter) return;\n if (event.key !== 'Enter' || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;\n // Safari fires the IME-confirming Enter after compositionend with keyCode 229\n if (composingRef.current || event.nativeEvent.isComposing || event.nativeEvent.keyCode === 229) return;\n // Plain Enter never inserts a newline when submitOnEnter is on, even with nothing to send\n event.preventDefault();\n submit(clearOnSubmit);\n },\n [submitOnEnter, onKeyDown, submit, clearOnSubmit],\n );\n\n const Comp = asChild ? Slot : 'textarea';\n return (\n <m.div className={classNames('rt-ChatbarField', 'rt-ChatbarTextarea', className)} layout=\"position\" transition={LAYOUT_TRANSITION}>\n <Comp\n {...textareaProps}\n ref={composedRef}\n className=\"rt-ChatbarInput\"\n value={value}\n onChange={handleChange}\n onFocus={handleFocus}\n onPaste={handlePaste}\n onKeyDown={handleKeyDown}\n onCompositionStart={handleCompositionStart}\n onCompositionEnd={handleCompositionEnd}\n disabled={disabled}\n readOnly={readOnly}\n rows={open ? minLines : 1}\n spellCheck={textareaProps.spellCheck ?? true}\n autoCorrect={textareaProps.autoCorrect ?? 'on'}\n style={style}\n />\n </m.div>\n );\n});\nTextarea.displayName = 'Chatbar.Textarea';\n\ninterface InlineSlotProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {\n asChild?: boolean;\n children?: React.ReactNode;\n}\n\nconst InlineStart = React.forwardRef<HTMLDivElement, InlineSlotProps>((props, forwardedRef) => {\n const { children, asChild, className, ...divProps } = props;\n const ctx = useChatbarContext();\n if (ctx.open) return null;\n const Comp = asChild ? Slot : 'div';\n return (\n <Comp {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarInlineStart', className)}>\n {children}\n </Comp>\n );\n});\nInlineStart.displayName = 'Chatbar.InlineStart';\n\nconst InlineEnd = React.forwardRef<HTMLDivElement, InlineSlotProps>((props, forwardedRef) => {\n const { children, asChild, className, ...divProps } = props;\n const ctx = useChatbarContext();\n if (ctx.open) return null;\n const Comp = asChild ? Slot : 'div';\n return (\n <Comp {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarInlineEnd', className)}>\n {children}\n </Comp>\n );\n});\nInlineEnd.displayName = 'Chatbar.InlineEnd';\n\n/**\n * Renders a horizontally scrollable list of attachments above the inline row.\n * Hidden when empty unless `forceMount`. Override per-item with `renderAttachment`.\n */\ninterface AttachmentsRowProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {\n asChild?: boolean;\n forceMount?: boolean;\n /** If provided, custom-render a tile; otherwise default tile is used */\n renderAttachment?: (attachment: ChatbarAttachment) => React.ReactNode;\n}\n\nconst AttachmentsRow = React.forwardRef<HTMLDivElement, AttachmentsRowProps>((props, forwardedRef) => {\n const { asChild, forceMount, renderAttachment, className, ...divProps } = props;\n const ctx = useChatbarContext();\n if (ctx.attachments.length === 0 && !forceMount) return null;\n const Comp = asChild ? Slot : 'div';\n return (\n <m.div layout=\"position\" transition={LAYOUT_TRANSITION}>\n <Comp {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarAttachmentsRow', className)} role=\"list\" aria-label={divProps['aria-label'] ?? 'Attachments'}>\n <ScrollArea className=\"rt-ChatbarScrollArea\" scrollbars=\"horizontal\" size=\"1\">\n <Flex align=\"center\" gap=\"2\" minWidth=\"fit-content\">\n {ctx.attachments.map((att) => (\n <Attachment key={att.id} attachment={att} asChild={!!renderAttachment}>\n {renderAttachment?.(att)}\n </Attachment>\n ))}\n </Flex>\n </ScrollArea>\n </Comp>\n </m.div>\n );\n});\nAttachmentsRow.displayName = 'Chatbar.AttachmentsRow';\n\n/** Default tile renderer for a single attachment. */\ninterface AttachmentProps extends React.ComponentPropsWithoutRef<'div'> {\n attachment: ChatbarAttachment;\n asChild?: boolean;\n}\n\nconst STATUS_LABEL: Partial<Record<AttachmentStatus, string>> = { uploading: 'uploading', error: 'failed to upload' };\n\nconst Attachment = React.forwardRef<HTMLDivElement, AttachmentProps>((props, forwardedRef) => {\n const { attachment, asChild, className, children, ...divProps } = props;\n const ctx = useChatbarContext();\n const Comp = asChild ? Slot : 'div';\n const isImage = !!attachment.url && isImageLike(attachment.name, attachment.type);\n const sizeLabel = `${Math.ceil(attachment.size / 1024)} KB`;\n const statusLabel = attachment.status ? STATUS_LABEL[attachment.status] : undefined;\n const locked = ctx.disabled || ctx.readOnly;\n\n const handleRemove = (event: React.MouseEvent<HTMLButtonElement>) => {\n // Move focus before the tile unmounts so keyboard users are not dropped to <body>\n const tile = event.currentTarget.closest('[role=\"listitem\"]');\n const tiles = tile?.parentElement ? Array.from(tile.parentElement.children) : [];\n const index = tile ? tiles.indexOf(tile) : -1;\n const neighbour = tiles[index + 1] ?? tiles[index - 1];\n const nextButton = neighbour?.querySelector<HTMLButtonElement>('.rt-ChatbarAttachmentRemove');\n if (nextButton) nextButton.focus();\n else ctx.textareaRef.current?.focus({ preventScroll: true });\n ctx.removeAttachment(attachment.id);\n };\n\n return (\n <Comp\n {...divProps}\n ref={forwardedRef}\n className={classNames('rt-ChatbarAttachment', className)}\n role=\"listitem\"\n data-kind={isImage ? 'image' : 'file'}\n data-status={attachment.status}\n title={attachment.name}\n >\n {children ?? (\n <Flex align=\"center\" gap=\"2\" pr={!isImage ? '6' : undefined}>\n <div className=\"rt-ChatbarAttachmentPreview\" aria-hidden>\n {isImage ? <img className=\"rt-ChatbarAttachmentImage\" src={attachment.url} alt=\"\" /> : <FileTextIcon />}\n </div>\n {isImage ? (\n <VisuallyHidden>\n {attachment.name}, {sizeLabel}\n {statusLabel ? `, ${statusLabel}` : ''}\n </VisuallyHidden>\n ) : (\n <Flex direction=\"column\" gap=\"0\" minWidth=\"0\">\n <Text size={ctx.size} weight=\"medium\" truncate>\n {attachment.name}\n </Text>\n <Text\n size=\"1\"\n color={attachment.status === 'error' ? 'red' : undefined}\n emphasis={attachment.status === 'error' ? undefined : 'medium'}\n >\n {sizeLabel}\n {statusLabel ? ` \u00B7 ${statusLabel}` : ''}\n </Text>\n </Flex>\n )}\n {!locked && (\n <IconButton\n className=\"rt-ChatbarAttachmentRemove\"\n aria-label={`Remove ${attachment.name}`}\n size=\"1\"\n variant=\"classic\"\n color=\"gray\"\n onClick={handleRemove}\n >\n <CloseIcon />\n </IconButton>\n )}\n </Flex>\n )}\n </Comp>\n );\n});\nAttachment.displayName = 'Chatbar.Attachment';\n\ninterface AttachTriggerProps extends React.ComponentPropsWithoutRef<'button'> {\n asChild?: boolean;\n /** Overrides Root `accept` for files chosen through this trigger */\n accept?: string | string[];\n multiple?: boolean;\n}\n\nconst AttachTrigger = React.forwardRef<HTMLButtonElement, AttachTriggerProps>((props, forwardedRef) => {\n const { asChild, accept, multiple, disabled: disabledProp, onPointerDown, onClick, ...buttonProps } = props;\n const ctx = useChatbarContext();\n const disabled = disabledProp || ctx.disabled || ctx.readOnly;\n const Comp = asChild ? Slot : 'button';\n return (\n <Comp\n {...buttonProps}\n ref={forwardedRef}\n className={classNames('rt-ChatbarAttachTrigger', buttonProps.className)}\n type={buttonProps.type ?? 'button'}\n aria-label={buttonProps['aria-label'] ?? 'Add attachments'}\n disabled={disabled}\n onPointerDown={(event: React.PointerEvent<HTMLButtonElement>) => {\n onPointerDown?.(event);\n if (!disabled && !event.defaultPrevented) ctx.beginFilePickerPress();\n }}\n onClick={(event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (disabled || event.defaultPrevented) return;\n ctx.openFilePicker({ accept, multiple });\n }}\n />\n );\n});\nAttachTrigger.displayName = 'Chatbar.AttachTrigger';\n\ninterface RowProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {\n asChild?: boolean;\n children?: React.ReactNode;\n}\n\nconst Row = React.forwardRef<HTMLDivElement, RowProps>((props, forwardedRef) => {\n const { asChild, children, className, ...divProps } = props;\n const ctx = useChatbarContext();\n if (!ctx.open) return null;\n const Comp = asChild ? Slot : 'div';\n return (\n <m.div layout=\"position\" transition={LAYOUT_TRANSITION}>\n <Comp {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarRow', className)}>\n <Flex align=\"center\" justify=\"between\" width=\"100%\">\n {children}\n </Flex>\n </Comp>\n </m.div>\n );\n});\nRow.displayName = 'Chatbar.Row';\n\ntype RowSlotProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst RowStart = React.forwardRef<HTMLDivElement, RowSlotProps>((props, forwardedRef) => {\n const { className, ...divProps } = props;\n return <div {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarRowStart', className)} />;\n});\nRowStart.displayName = 'Chatbar.RowStart';\n\nconst RowEnd = React.forwardRef<HTMLDivElement, RowSlotProps>((props, forwardedRef) => {\n const { className, ...divProps } = props;\n return <div {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarRowEnd', className)} />;\n});\nRowEnd.displayName = 'Chatbar.RowEnd';\n\ntype SendStatus = 'ready' | 'submitted' | 'streaming' | 'error';\n\ntype SendProps = Omit<IconButtonProps, 'aria-label' | 'aria-labelledby'> & {\n /** Optional override for accessible name. Defaults to \"Send\". */\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n asChild?: boolean;\n /** Clear message and attachments after sending. Defaults to Root `clearOnSubmit`. */\n clearOnSend?: boolean;\n /**\n * What the button means. `ready` sends. While a reply is `submitted` or `streaming` and the\n * box is empty, the button STOPS the reply (`onStop`); with a draft in the box it still sends,\n * and the app decides whether sending interrupts the reply. After an `error`, an empty box\n * makes it RETRY (`onRetry`). Default `ready`.\n */\n status?: SendStatus;\n /** Called when the button is pressed to stop a reply. */\n onStop?: () => void;\n /** Called when the button is pressed to retry after an error. */\n onRetry?: () => void;\n /** Accessible name while it stops. Default \"Stop\". */\n stopLabel?: string;\n /** Accessible name while it retries. Default \"Retry\". */\n retryLabel?: string;\n /** Glyph while it stops. Defaults to a square, or a spinner while `submitted`. */\n stopIcon?: React.ReactNode;\n /** Glyph while it retries. */\n retryIcon?: React.ReactNode;\n};\n\nconst Send = React.forwardRef<HTMLButtonElement, SendProps>((props, forwardedRef) => {\n const {\n asChild,\n clearOnSend,\n disabled,\n children,\n style,\n className,\n size: sizeProp,\n variant: variantProp,\n tabIndex,\n onClick,\n status = 'ready',\n onStop,\n onRetry,\n stopLabel = 'Stop',\n retryLabel = 'Retry',\n stopIcon,\n retryIcon,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...buttonProps\n } = props;\n const ctx = useChatbarContext();\n const value = React.useContext(ChatbarValueContext);\n\n const hasContent = hasText(value) || ctx.attachments.length > 0;\n const running = status === 'submitted' || status === 'streaming';\n const mode: 'send' | 'stop' | 'retry' = hasContent ? 'send' : running ? 'stop' : status === 'error' ? 'retry' : 'send';\n\n if (ctx.sendMode === 'never' && mode === 'send') return null;\n\n const visible = mode !== 'send' || ctx.sendMode === 'always' || hasContent;\n const inactive = mode === 'send' ? disabled || ctx.disabled || ctx.readOnly || !hasContent : disabled || ctx.disabled;\n\n const sendName = ariaLabel ?? 'Send';\n const labelProps: { 'aria-label': string } | { 'aria-labelledby': string } =\n mode === 'stop' ? { 'aria-label': stopLabel } : mode === 'retry' ? { 'aria-label': retryLabel } : ariaLabelledby ? { 'aria-labelledby': ariaLabelledby } : { 'aria-label': sendName };\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (event.defaultPrevented || inactive) return;\n if (mode === 'stop') {\n onStop?.();\n return;\n }\n if (mode === 'retry') {\n onRetry?.();\n return;\n }\n const clear = clearOnSend ?? ctx.clearOnSubmit;\n // Clearing hides and disables this button; keep keyboard focus in the composer\n if (ctx.submit(clear) && clear) ctx.textareaRef.current?.focus({ preventScroll: true });\n };\n\n const glyph =\n mode === 'stop' ? (\n stopIcon ?? (status === 'submitted' ? <Spinner size={ctx.size} /> : (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden>\n <rect x=\"7\" y=\"7\" width=\"10\" height=\"10\" rx=\"2\" />\n </svg>\n ))\n ) : mode === 'retry' ? (\n retryIcon ?? (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <path d=\"M3 12a9 9 0 1 0 3-6.7L3 8\" />\n <path d=\"M3 3v5h5\" />\n </svg>\n )\n ) : (\n children ?? (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <path d=\"M5 12h14\" />\n <path d=\"m12 5 7 7-7 7\" />\n </svg>\n )\n );\n\n return (\n <IconButton\n {...buttonProps}\n ref={forwardedRef}\n size={sizeProp ?? ctx.size}\n variant={variantProp ?? (ctx.open || mode !== 'send' ? 'solid' : 'ghost')}\n disabled={inactive}\n className={classNames('rt-ChatbarSend', className)}\n style={{ opacity: visible ? 1 : 0, pointerEvents: visible ? undefined : 'none', ...style }}\n // Hidden Send must not be reachable by keyboard or announced\n aria-hidden={visible ? undefined : true}\n tabIndex={visible ? tabIndex : -1}\n asChild={asChild}\n onClick={handleClick}\n data-status={status}\n data-mode={mode}\n {...labelProps}\n >\n {glyph}\n </IconButton>\n );\n});\nSend.displayName = 'Chatbar.Send';\n\nexport { Root, Textarea, InlineStart, InlineEnd, AttachmentsRow, Attachment, AttachTrigger, Row, RowStart, RowEnd, Send };\nexport type {\n RootProps as ChatbarRootProps,\n TextareaProps as ChatbarTextareaProps,\n InlineSlotProps as ChatbarInlineSlotProps,\n AttachmentsRowProps as ChatbarAttachmentsRowProps,\n AttachmentProps as ChatbarAttachmentProps,\n AttachTriggerProps as ChatbarAttachTriggerProps,\n RowProps as ChatbarRowProps,\n RowSlotProps as ChatbarRowSlotProps,\n SendProps as ChatbarSendProps,\n ChatbarAttachment,\n ChatbarAttachmentRejection,\n ChatbarRejectReason,\n ChatbarSubmitPayload,\n AttachmentStatus as ChatbarAttachmentStatus,\n ExpandOn as ChatbarExpandOn,\n SendMode as ChatbarSendMode,\n SendStatus as ChatbarSendStatus,\n};\n"],
|
|
5
|
+
"mappings": "iaAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,mBAAAE,GAAA,eAAAC,GAAA,mBAAAC,GAAA,cAAAC,GAAA,gBAAAC,GAAA,SAAAC,GAAA,QAAAC,GAAA,WAAAC,GA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ASmO,IAAgBnO,EAAI,MAAQ+O,IAAS,OAAS,QAAU,SACjE,SAAUE,EACV,UAAW9F,EAAW,iBAAkB1H,CAAS,EACjD,MAAO,CAAE,QAASuN,EAAU,EAAI,EAAG,cAAeA,EAAU,OAAY,OAAQ,GAAGtN,CAAM,EAEzF,cAAasN,EAAU,OAAY,GACnC,SAAUA,EAAUZ,EAAW,GAC/B,QAAS3E,EACT,QAAS0F,EACT,cAAad,EACb,YAAWU,EACV,GAAGG,GAEHE,CACH,CAEJ,CAAC,EACDpB,GAAK,YAAc",
|
|
6
|
+
"names": ["chatbar_exports", "__export", "AttachTrigger", "Attachment", "AttachmentsRow", "InlineEnd", "InlineStart", "Root", "Row", "RowEnd", "RowStart", "Send", "Textarea", "React", "classNames", "LazyMotion", "MotionConfig", "domAnimation", "m", "useComposedRefs", "useDropzone", "useIsomorphicLayoutEffect", "withoutPlaceholder", "el", "measure", "placeholder", "LAYOUT_TRANSITION", "ChatbarContext", "ChatbarValueContext", "useChatbarContext", "ctx", "toArray", "val", "matchesAccept", "file", "patterns", "mime", "name", "patRaw", "pat", "type", "subtype", "fmType", "fmSubtype", "IMAGE_EXT_RE", "isImageLike", "hasText", "value", "plural", "word", "attachmentCounter", "createAttachmentId", "Root", "props", "forwardedRef", "className", "style", "children", "valueProp", "defaultValue", "onValueChange", "openProp", "defaultOpen", "onOpenChange", "expandOn", "minLines", "maxLines", "sendMode", "disabled", "readOnly", "onSubmit", "size", "variant", "color", "radius", "panelBackground", "material", "width", "maxWidth", "attachmentsProp", "defaultAttachments", "onAttachmentsChange", "accept", "multiple", "maxAttachments", "maxFileSize", "paste", "pasteAccept", "clearOnSubmit", "onAttachmentReject", "dropzone", "apiRef", "onBlurCapture", "notices", "context", "divProps", "effectiveMaterial", "isValueControlled", "valueUncontrolled", "setValueUncontrolled", "isOpenControlled", "openUncontrolled", "setOpenUncontrolled", "open", "isAttachmentsControlled", "attachmentsUncontrolled", "setAttachmentsUncontrolled", "attachments", "announcement", "setAnnouncementState", "announce", "text", "prev", "rootRef", "composedRootRef", "useComposedRefs", "textareaRef", "fileInputRef", "pickerOpenRef", "pressGuardRef", "pressGuardTimerRef", "pickerRef", "acceptKey", "pasteAcceptKey", "accepts", "pasteAccepts", "snapshot", "latest", "pendingAttachmentsRef", "getAttachments", "setOpen", "next", "setValue", "setAttachments", "ownedUrlsRef", "addFiles", "files", "cfg", "current", "rejected", "remainingSlots", "perActionLimit", "url", "messages", "appendFiles", "appendFilesFromPaste", "removeAttachment", "id", "removed", "a", "submit", "clear", "payload", "att", "owned", "openFilePicker", "options", "input", "beginFilePickerPress", "reset", "handleFileInputChange", "event", "picker", "handleBlurCapture", "rootEl", "nextTarget", "handleDrop", "getRootProps", "isDragActive", "useDropzone", "dragActive", "handleContainerPointerDown", "target", "contextValue", "LazyMotion", "domAnimation", "MotionConfig", "classNames", "NoticeSizeContext", "m", "Text", "VisuallyHidden", "Textarea", "asChild", "onFocus", "onChange", "onPaste", "onKeyDown", "onCompositionStart", "onCompositionEnd", "submitOnEnter", "textareaProps", "composedRef", "lineHeightRef", "paddingRef", "composingRef", "sizingRef", "recomputeMetrics", "computedStyle", "applyHeight", "isOpen", "min", "max", "lineHeight", "padding", "minHeight", "maxHeight", "contentHeight", "overflowing", "compactHeight", "prevWidth", "ro", "entries", "first", "handleFocus", "handleChange", "handlePaste", "item", "f", "handleCompositionStart", "handleCompositionEnd", "handleKeyDown", "Comp", "Slot", "InlineStart", "InlineEnd", "AttachmentsRow", "forceMount", "renderAttachment", "ScrollArea", "Flex", "Attachment", "STATUS_LABEL", "attachment", "isImage", "sizeLabel", "statusLabel", "locked", "handleRemove", "tile", "tiles", "index", "nextButton", "FileTextIcon", "IconButton", "CloseIcon", "AttachTrigger", "disabledProp", "onPointerDown", "onClick", "buttonProps", "Row", "RowStart", "RowEnd", "Send", "clearOnSend", "sizeProp", "variantProp", "tabIndex", "status", "onStop", "onRetry", "stopLabel", "retryLabel", "stopIcon", "retryIcon", "ariaLabel", "ariaLabelledby", "hasContent", "mode", "visible", "inactive", "labelProps", "handleClick", "glyph", "Spinner"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as E,d as L}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as E,d as L}from"./chunk-7RQNB63F.js";import{b as N}from"./chunk-SEY4NA45.js";import*as e from"react";import S from"classnames";import{useVirtualizer as J}from"@tanstack/react-virtual";var Q=e.memo(function({label:r,isHighlighted:o,id:u,style:x,tabIndex:y,"data-highlighted":m,"data-index":p,onMouseEnter:f,onMouseLeave:v,onClick:h,onKeyDown:g}){return e.createElement("div",{id:u,role:"menuitem",className:S("rt-reset","rt-BaseMenuItem","rt-VirtualMenuItem"),style:x,tabIndex:y,"data-highlighted":m,"data-index":p,onMouseEnter:f,onMouseLeave:v,onClick:h,onKeyDown:g},r)},(n,r)=>!(n.label!==r.label||n["data-highlighted"]!==r["data-highlighted"]||n.style.height!==r.style.height||n.style.transform!==r.style.transform||n.tabIndex!==r.tabIndex||n.id!==r.id));function w({items:n,itemLabel:r,renderItem:o,size:u,estimatedItemSize:x,overscan:y=5,onSelect:m,className:p,style:f,"aria-label":v}){let h=e.useId(),g=e.useRef(null),[T,l]=e.useState(-1),{isInsideMenu:K,size:P,itemHeight:$}=L(),{scaling:k}=N(),I=x??(u?E(u,k):$??E(P??"2",k));if(!r&&!o)throw new Error("VirtualMenu requires either itemLabel or renderItem prop");let A=e.useMemo(()=>r?typeof r=="function"?r:t=>t[r]:null,[r]),c=e.useMemo(()=>n.length===0||T<0?-1:Math.min(T,n.length-1),[T,n.length]),B=e.useMemo(()=>typeof I=="function"?I:()=>I,[I]),M=J({count:n.length,getScrollElement:()=>g.current,estimateSize:B,overscan:y}),j=M.getVirtualItems(),R=e.useRef(n),b=e.useRef(m);R.current=n,b.current=m;let d=e.useRef(M.scrollToIndex);d.current=M.scrollToIndex;let H=e.useRef(c);H.current=c;let q=e.useCallback(t=>{let s=t.currentTarget.dataset.index;s!=null&&l(Number(s))},[]),O=e.useCallback(t=>{let s=t.currentTarget.dataset.index;if(s!=null){let a=Number(s),i=R.current;a>=0&&a<i.length&&b.current?.(i[a],a)}},[]),U=e.useCallback(()=>{},[]),W=e.useCallback(t=>{if(t.key==="Enter"||t.key===" "){t.preventDefault();let s=t.currentTarget.dataset.index;if(s!=null){let a=Number(s),i=R.current;a>=0&&a<i.length&&b.current?.(i[a],a)}}},[]),Y=e.useCallback(t=>{let s=R.current,a=H.current;switch(t.key){case"ArrowDown":{t.preventDefault();let i=a<s.length-1?a+1:0;l(i),d.current(i,{align:"auto"});break}case"ArrowUp":{t.preventDefault();let i=a>0?a-1:s.length-1;l(i),d.current(i,{align:"auto"});break}case"Home":{t.preventDefault(),l(0),d.current(0,{align:"start"});break}case"End":{t.preventDefault();let i=s.length-1;l(i),d.current(i,{align:"end"});break}case"Enter":case" ":{t.preventDefault(),a>=0&&a<s.length&&b.current?.(s[a],a);break}case"Tab":{t.preventDefault();break}case"Escape":{t.currentTarget.blur();break}}},[]),V=e.useCallback(t=>`${h}-item-${t}`,[h]),_=e.useMemo(()=>({overflow:"auto",position:"relative",...f}),[f]),C=M.getTotalSize(),F=e.useMemo(()=>({height:`${C}px`,width:"100%",position:"relative"}),[C]);return e.createElement("div",{ref:g,role:K?"group":"menu","aria-label":v,"aria-activedescendant":c>=0?V(c):void 0,tabIndex:0,onKeyDown:Y,className:S("rt-VirtualMenuRoot",p),style:_},e.createElement("div",{className:"rt-VirtualMenuViewport",style:F},j.map(t=>{let s=n[t.index],a=t.index,i=c===a,G={height:t.size,transform:`translateY(${t.start}px)`},D={id:V(a),isHighlighted:i,style:G,tabIndex:i?0:-1,"data-highlighted":i?!0:void 0,"data-index":a,onMouseEnter:q,onMouseLeave:U,onClick:O,onKeyDown:W};return o?e.createElement(o,{key:t.key,item:s,index:a,...D}):e.createElement(Q,{key:t.key,label:A(s),...D})})))}w.displayName="VirtualMenu";var z=e.forwardRef(({className:n,children:r,...o},u)=>e.createElement("div",{ref:u,role:"menuitem",className:S("rt-reset","rt-BaseMenuItem","rt-VirtualMenuItem",n),...o},r));z.displayName="VirtualMenu.Item";var X=e.memo(z,(n,r)=>{let o=n.style,u=r.style;return!(o?.height!==u?.height||o?.transform!==u?.transform||n["data-highlighted"]!==r["data-highlighted"]||n.tabIndex!==r.tabIndex||n.id!==r.id||n.className!==r.className||n.children!==r.children)}),re=Object.assign(w,{Item:X});export{re as a};
|
|
2
|
+
//# sourceMappingURL=chunk-YWENWZOU.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-E67CIG6A.js";import{b as u}from"./chunk-3XSB7YIM.js";import*as a from"react";import f from"classnames";var s=["xl","lg","md","sm","xs","initial"];function m(e,t,n){if(e==null)return n;if(typeof e!="object")return e;let o=e;for(let i=s.indexOf(t);i<s.length;i++){let r=o[s[i]];if(r!==void 0)return r}return n}function h(e,t){let n=typeof e=="object"&&e!==null,{breakpoint:o}=u(n);return m(e,o,t)}function B(e,t,n){return e??t??n.material??n.panelBackground}var d={1:8,2:12,3:12};function A(e,t){let n=t?parseFloat(t)/100:1,o=d[e]??d[2];return-Math.round(o*(Number.isFinite(n)?n:1))}var p={"\u2318":"Meta",cmd:"Meta",command:"Meta",meta:"Meta","\u2325":"Alt",option:"Alt",opt:"Alt",alt:"Alt","\u21E7":"Shift",shift:"Shift","\u2303":"Control",ctrl:"Control",control:"Control","\u232B":"Backspace","\u2326":"Delete","\u23CE":"Enter","\u21B5":"Enter","\u238B":"Escape",esc:"Escape","\u21E5":"Tab","\u2191":"ArrowUp","\u2193":"ArrowDown","\u2190":"ArrowLeft","\u2192":"ArrowRight"},l=new Map;function k(e){let t=l.get(e);if(t!==void 0)return t||void 0;let i=(e.match(/[⌘⌥⇧⌃]|[^\s+⌘⌥⇧⌃]+/gu)??[]).map(r=>p[r]??p[r.toLowerCase()]??(r.length===1?r.toUpperCase():r)).join("+");return l.set(e,i),i||void 0}function N({shortcut:e,className:t}){return a.createElement("div",{"aria-hidden":!0,className:f("rt-BaseMenuShortcut",t)},a.createElement(c,{size:"1"},e))}export{m as a,h as b,B as c,A as d,k as e,N as f};
|
|
2
|
+
//# sourceMappingURL=chunk-ZOY43B55.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as f}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as f}from"./chunk-HF5WY5YE.js";import{a as c}from"./chunk-FHOCUZDR.js";import{a as B}from"./chunk-AGAQC4HH.js";import{a as b,c as P}from"./chunk-5T6K7VPP.js";import{a as y}from"./chunk-5TXQLK4G.js";import{a as i}from"./chunk-JFWMAYEH.js";import{a as m}from"./chunk-GSTOGDAJ.js";import{a as u}from"./chunk-6FLLFCBU.js";import*as e from"react";import S from"classnames";import{Slot as j}from"radix-ui";var I=e.forwardRef((o,g)=>{let{size:h=i.size.default}=o,{className:R,children:t,asChild:n,as:a,color:x,radius:C,material:k,panelBackground:w,flush:D,disabled:p=o.loading,...d}=u(o,i,m);y(o.panelBackground);let l=k??w,E=n?j.Root:a||"button",T=n||!a||["button","input","textarea","select"].includes(a),v=!n&&(!a||a==="button"),M="type"in d,z=e.useId(),s=o.loading?`${z}-loading`:void 0,r=e.useMemo(()=>typeof t=="string"?t:e.isValidElement(t)&&typeof t.props?.children=="string"?t.props.children:"button",[t]),N=e.useMemo(()=>o.loading?{"aria-busy":!0,"aria-disabled":!0,"aria-describedby":s,"aria-label":`${r} (loading)`}:{},[o.loading,s,r]);return e.createElement(E,{"data-disabled":p||void 0,"data-accent-color":x,"data-radius":C,"data-material":l,"data-panel-background":l,"data-flush":D?"true":void 0,...d,...N,ref:g,className:S("rt-reset","rt-BaseButton",R),...T&&{disabled:p},...v&&!M?{type:"button"}:{}},o.loading?e.createElement(e.Fragment,null,e.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},t),e.createElement(B,null,e.createElement("span",{id:s},r," is loading, please wait..."),t),e.createElement(c,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},e.createElement("span",null,e.createElement(f,{size:b(h,P),"aria-hidden":"true"})))):t)});I.displayName="BaseButton";export{I as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ZZLZGHZQ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-ZZLZGHZQ.js";import"../../chunk-HF5WY5YE.js";import"../../chunk-3KB2XWBE.js";import"../../chunk-FHOCUZDR.js";import"../../chunk-SMGDH54W.js";import"../../chunk-AGAQC4HH.js";import"../../chunk-5T6K7VPP.js";import"../../chunk-SNR5VFWG.js";import"../../chunk-FWB47YCH.js";import"../../chunk-K53W3ELO.js";import"../../chunk-TTFUM47A.js";import"../../chunk-VX44UTQ5.js";import"../../chunk-ERGJN7FJ.js";import"../../chunk-5TXQLK4G.js";import"../../chunk-JFWMAYEH.js";import"../../chunk-KRJTW535.js";import"../../chunk-GSTOGDAJ.js";import"../../chunk-6FLLFCBU.js";import"../../chunk-AX5S56DS.js";import"../../chunk-E23RKOQJ.js";import"../../chunk-JUY7CBSL.js";import"../../chunk-WRWNN2NW.js";import"../../chunk-QM3RCK5P.js";import"../../chunk-RZCX6IBE.js";import"../../chunk-NZJGC6ZW.js";import"../../chunk-ZNK6AH2G.js";import"../../chunk-OS3FCYZY.js";export{a as BaseButton};
|
|
2
2
|
//# sourceMappingURL=base-button.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a,b,c,d,e,f}from"../../chunk-
|
|
1
|
+
"use client";import{a,b,c,d,e,f}from"../../chunk-ZOY43B55.js";import"../../chunk-E67CIG6A.js";import"../../chunk-ARIV4AT5.js";import"../../chunk-3XSB7YIM.js";import"../../chunk-YA5DF67M.js";import"../../chunk-GSTOGDAJ.js";import"../../chunk-6FLLFCBU.js";import"../../chunk-AX5S56DS.js";import"../../chunk-E23RKOQJ.js";import"../../chunk-JUY7CBSL.js";import"../../chunk-WRWNN2NW.js";import"../../chunk-QM3RCK5P.js";import"../../chunk-RZCX6IBE.js";import"../../chunk-NZJGC6ZW.js";import"../../chunk-OS3FCYZY.js";export{f as MenuShortcut,d as getMenuAlignOffset,c as resolveMenuMaterial,a as resolveResponsiveValue,e as toAriaKeyShortcuts,b as useResolvedResponsiveValue};
|
|
2
2
|
//# sourceMappingURL=base-menu.utils.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a,b,c,d}from"../../chunk-
|
|
1
|
+
"use client";import{a,b,c,d}from"../../chunk-7RQNB63F.js";import"../../chunk-SEY4NA45.js";import"../../chunk-WAURCNAS.js";import"../../chunk-F22ZRNWL.js";import"../../chunk-XYVLQDGR.js";import"../../chunk-5TXQLK4G.js";import"../../chunk-KRJTW535.js";import"../../chunk-ZOY43B55.js";import"../../chunk-E67CIG6A.js";import"../../chunk-ARIV4AT5.js";import"../../chunk-3XSB7YIM.js";import"../../chunk-YA5DF67M.js";import"../../chunk-GSTOGDAJ.js";import"../../chunk-6FLLFCBU.js";import"../../chunk-AX5S56DS.js";import"../../chunk-E23RKOQJ.js";import"../../chunk-JUY7CBSL.js";import"../../chunk-WRWNN2NW.js";import"../../chunk-QM3RCK5P.js";import"../../chunk-RZCX6IBE.js";import"../../chunk-NZJGC6ZW.js";import"../../chunk-ZNK6AH2G.js";import"../../chunk-OS3FCYZY.js";export{c as MenuProvider,b as getMenuItemHeight,a as menuSizeToItemHeight,d as useMenuContext};
|
|
2
2
|
//# sourceMappingURL=menu-context.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e}from"../chunk-Y5RCH23Z.js";import"../chunk-EDKQURDU.js";import"../chunk-5TXQLK4G.js";import"../chunk-KRJTW535.js";import"../chunk-6FLLFCBU.js";import"../chunk-AX5S56DS.js";import"../chunk-E23RKOQJ.js";import"../chunk-JUY7CBSL.js";import"../chunk-WRWNN2NW.js";import"../chunk-QM3RCK5P.js";import"../chunk-RZCX6IBE.js";import"../chunk-NZJGC6ZW.js";import"../chunk-ZNK6AH2G.js";import"../chunk-OS3FCYZY.js";export{e as Content,c as Header,b as Item,a as Root,d as Trigger};
|
|
2
2
|
//# sourceMappingURL=accordion.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g}from"../chunk-LXWPEDPZ.js";import"../chunk-GO7OHBHW.js";import"../chunk-PZ7OYATT.js";import"../chunk-MJJ7XDIP.js";import"../chunk-5WRCK4R7.js";import"../chunk-4XKK32M4.js";import"../chunk-G2CKYO2I.js";import"../chunk-AXUDFYLY.js";import"../chunk-KNQBAOMV.js";import"../chunk-FD2TR343.js";import"../chunk-WYADYDPN.js";import"../chunk-ZE2KAVXW.js";import"../chunk-ZWZGUBL4.js";import"../chunk-XKBLNVOD.js";import"../chunk-GCUGJXI2.js";import"../chunk-SEY4NA45.js";import"../chunk-WAURCNAS.js";import"../chunk-F22ZRNWL.js";import"../chunk-XYVLQDGR.js";import"../chunk-VX44UTQ5.js";import"../chunk-ERGJN7FJ.js";import"../chunk-5TXQLK4G.js";import"../chunk-KRJTW535.js";import"../chunk-GSTOGDAJ.js";import"../chunk-6FLLFCBU.js";import"../chunk-AX5S56DS.js";import"../chunk-E23RKOQJ.js";import"../chunk-JUY7CBSL.js";import"../chunk-WRWNN2NW.js";import"../chunk-QM3RCK5P.js";import"../chunk-RZCX6IBE.js";import"../chunk-NZJGC6ZW.js";import"../chunk-ZNK6AH2G.js";import"../chunk-OS3FCYZY.js";export{f as Action,g as Cancel,c as Content,e as Description,a as Root,d as Title,b as Trigger};
|
|
2
2
|
//# sourceMappingURL=alert-dialog.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a}from"../chunk-
|
|
1
|
+
"use client";import{a}from"../chunk-HJU4I34X.js";import"../chunk-PS6NEG5A.js";import"../chunk-QFPHEY77.js";import"../chunk-KRJTW535.js";import"../chunk-GSTOGDAJ.js";import"../chunk-6FLLFCBU.js";import"../chunk-AX5S56DS.js";import"../chunk-E23RKOQJ.js";import"../chunk-JUY7CBSL.js";import"../chunk-WRWNN2NW.js";import"../chunk-QM3RCK5P.js";import"../chunk-RZCX6IBE.js";import"../chunk-NZJGC6ZW.js";import"../chunk-ZNK6AH2G.js";import"../chunk-OS3FCYZY.js";export{a as Avatar};
|
|
2
2
|
//# sourceMappingURL=avatar.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-KMPE7TJ6.js";import"../chunk-OLAWVEAI.js";import"../chunk-BPVVFHYD.js";import"../chunk-QQ62LO3X.js";import"../chunk-5WRCK4R7.js";import"../chunk-4XKK32M4.js";import"../chunk-G2CKYO2I.js";import"../chunk-AXUDFYLY.js";import"../chunk-KNQBAOMV.js";import"../chunk-FD2TR343.js";import"../chunk-WYADYDPN.js";import"../chunk-ZE2KAVXW.js";import"../chunk-ZWZGUBL4.js";import"../chunk-SEY4NA45.js";import"../chunk-WAURCNAS.js";import"../chunk-F22ZRNWL.js";import"../chunk-XYVLQDGR.js";import"../chunk-ERGJN7FJ.js";import"../chunk-5TXQLK4G.js";import"../chunk-KRJTW535.js";import"../chunk-GSTOGDAJ.js";import"../chunk-6FLLFCBU.js";import"../chunk-AX5S56DS.js";import"../chunk-E23RKOQJ.js";import"../chunk-JUY7CBSL.js";import"../chunk-WRWNN2NW.js";import"../chunk-QM3RCK5P.js";import"../chunk-RZCX6IBE.js";import"../chunk-NZJGC6ZW.js";import"../chunk-ZNK6AH2G.js";import"../chunk-OS3FCYZY.js";export{a as Badge};
|
|
2
2
|
//# sourceMappingURL=badge.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-MS5J4MF6.js";import"../chunk-5WRCK4R7.js";import"../chunk-4XKK32M4.js";import"../chunk-G2CKYO2I.js";import"../chunk-AXUDFYLY.js";import"../chunk-KNQBAOMV.js";import"../chunk-FD2TR343.js";import"../chunk-WYADYDPN.js";import"../chunk-ZE2KAVXW.js";import"../chunk-ZWZGUBL4.js";import"../chunk-GSTOGDAJ.js";import"../chunk-6FLLFCBU.js";import"../chunk-AX5S56DS.js";import"../chunk-E23RKOQJ.js";import"../chunk-JUY7CBSL.js";import"../chunk-WRWNN2NW.js";import"../chunk-QM3RCK5P.js";import"../chunk-RZCX6IBE.js";import"../chunk-NZJGC6ZW.js";import"../chunk-ZNK6AH2G.js";import"../chunk-OS3FCYZY.js";export{a as Blockquote};
|
|
2
2
|
//# sourceMappingURL=blockquote.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-WGYUWEQV.js";import"../chunk-FD2TR343.js";import"../chunk-WYADYDPN.js";import"../chunk-ZE2KAVXW.js";import"../chunk-ZWZGUBL4.js";import"../chunk-NZJGC6ZW.js";import"../chunk-ZNK6AH2G.js";import"../chunk-OS3FCYZY.js";export{a as blockquotePropDefs};
|
|
2
2
|
//# sourceMappingURL=blockquote.props.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-4YFJWXL2.js";import"../chunk-FGORMEAO.js";import"../chunk-FWB47YCH.js";import"../chunk-K53W3ELO.js";import"../chunk-TTFUM47A.js";import"../chunk-VX44UTQ5.js";import"../chunk-ERGJN7FJ.js";import"../chunk-GSTOGDAJ.js";import"../chunk-6FLLFCBU.js";import"../chunk-AX5S56DS.js";import"../chunk-E23RKOQJ.js";import"../chunk-JUY7CBSL.js";import"../chunk-WRWNN2NW.js";import"../chunk-QM3RCK5P.js";import"../chunk-RZCX6IBE.js";import"../chunk-NZJGC6ZW.js";import"../chunk-OS3FCYZY.js";export{a as Box};
|
|
2
2
|
//# sourceMappingURL=box.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-73QGEY2I.js";import"../chunk-2N2AQNJH.js";import"../chunk-OLAWVEAI.js";import"../chunk-BPVVFHYD.js";import"../chunk-5WRCK4R7.js";import"../chunk-4XKK32M4.js";import"../chunk-G2CKYO2I.js";import"../chunk-AXUDFYLY.js";import"../chunk-KNQBAOMV.js";import"../chunk-FD2TR343.js";import"../chunk-WYADYDPN.js";import"../chunk-ZE2KAVXW.js";import"../chunk-ZWZGUBL4.js";import"../chunk-SEY4NA45.js";import"../chunk-WAURCNAS.js";import"../chunk-F22ZRNWL.js";import"../chunk-XYVLQDGR.js";import"../chunk-ZZLZGHZQ.js";import"../chunk-HF5WY5YE.js";import"../chunk-3KB2XWBE.js";import"../chunk-FHOCUZDR.js";import"../chunk-SMGDH54W.js";import"../chunk-AGAQC4HH.js";import"../chunk-5T6K7VPP.js";import"../chunk-SNR5VFWG.js";import"../chunk-FWB47YCH.js";import"../chunk-K53W3ELO.js";import"../chunk-TTFUM47A.js";import"../chunk-VX44UTQ5.js";import"../chunk-ERGJN7FJ.js";import"../chunk-5TXQLK4G.js";import"../chunk-JFWMAYEH.js";import"../chunk-KRJTW535.js";import"../chunk-GSTOGDAJ.js";import"../chunk-6FLLFCBU.js";import"../chunk-AX5S56DS.js";import"../chunk-E23RKOQJ.js";import"../chunk-JUY7CBSL.js";import"../chunk-WRWNN2NW.js";import"../chunk-QM3RCK5P.js";import"../chunk-RZCX6IBE.js";import"../chunk-NZJGC6ZW.js";import"../chunk-ZNK6AH2G.js";import"../chunk-OS3FCYZY.js";export{a as Button};
|
|
2
2
|
//# sourceMappingURL=button.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a,b,c}from"../chunk-
|
|
1
|
+
"use client";import{a,b,c}from"../chunk-CKMMUHKE.js";import"../chunk-OGVKSYLL.js";import"../chunk-5WRCK4R7.js";import"../chunk-4XKK32M4.js";import"../chunk-G2CKYO2I.js";import"../chunk-AXUDFYLY.js";import"../chunk-KNQBAOMV.js";import"../chunk-FD2TR343.js";import"../chunk-WYADYDPN.js";import"../chunk-ZE2KAVXW.js";import"../chunk-ZWZGUBL4.js";import"../chunk-5T6K7VPP.js";import"../chunk-GSTOGDAJ.js";import"../chunk-6FLLFCBU.js";import"../chunk-AX5S56DS.js";import"../chunk-E23RKOQJ.js";import"../chunk-JUY7CBSL.js";import"../chunk-WRWNN2NW.js";import"../chunk-QM3RCK5P.js";import"../chunk-RZCX6IBE.js";import"../chunk-NZJGC6ZW.js";import"../chunk-ZNK6AH2G.js";import"../chunk-OS3FCYZY.js";export{b as Icon,a as Root,c as Text};
|
|
2
2
|
//# sourceMappingURL=callout.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-JDGJSNWT.js";import"../chunk-OO652UQW.js";import"../chunk-GSTOGDAJ.js";import"../chunk-6FLLFCBU.js";import"../chunk-AX5S56DS.js";import"../chunk-E23RKOQJ.js";import"../chunk-JUY7CBSL.js";import"../chunk-WRWNN2NW.js";import"../chunk-QM3RCK5P.js";import"../chunk-RZCX6IBE.js";import"../chunk-NZJGC6ZW.js";import"../chunk-OS3FCYZY.js";export{a as Card};
|
|
2
2
|
//# sourceMappingURL=card.js.map
|