@womp/kookie-ui 0.7.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/components.css +539 -494
- package/dist/cjs/components/_internal/base-menu.utils.js +1 -1
- package/dist/cjs/components/_internal/base-menu.utils.js.map +3 -3
- package/dist/cjs/components/_internal/menu-context.js +1 -1
- package/dist/cjs/components/_internal/menu-context.js.map +3 -3
- package/dist/cjs/components/_internal/shell-bottom.d.ts +6 -7
- package/dist/cjs/components/_internal/shell-bottom.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-bottom.js +1 -1
- package/dist/cjs/components/_internal/shell-bottom.js.map +4 -4
- package/dist/cjs/components/_internal/shell-handles.d.ts +9 -0
- package/dist/cjs/components/_internal/shell-handles.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-handles.js +1 -1
- package/dist/cjs/components/_internal/shell-handles.js.map +3 -3
- package/dist/cjs/components/_internal/shell-inspector.d.ts +4 -6
- package/dist/cjs/components/_internal/shell-inspector.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-inspector.js +1 -1
- package/dist/cjs/components/_internal/shell-inspector.js.map +4 -4
- package/dist/cjs/components/_internal/shell-pane.d.ts +70 -0
- package/dist/cjs/components/_internal/shell-pane.d.ts.map +1 -0
- package/dist/cjs/components/_internal/shell-pane.js +2 -0
- package/dist/cjs/components/_internal/shell-pane.js.map +7 -0
- package/dist/cjs/components/_internal/shell-resizable.d.ts +48 -0
- package/dist/cjs/components/_internal/shell-resizable.d.ts.map +1 -0
- package/dist/cjs/components/_internal/shell-resizable.js +2 -0
- package/dist/cjs/components/_internal/shell-resizable.js.map +7 -0
- package/dist/cjs/components/_internal/shell-resize.d.ts +11 -3
- package/dist/cjs/components/_internal/shell-resize.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-resize.js +1 -1
- package/dist/cjs/components/_internal/shell-resize.js.map +2 -2
- package/dist/cjs/components/_internal/shell-rest.d.ts +27 -0
- package/dist/cjs/components/_internal/shell-rest.d.ts.map +1 -0
- package/dist/cjs/components/_internal/shell-rest.js +2 -0
- package/dist/cjs/components/_internal/shell-rest.js.map +7 -0
- package/dist/cjs/components/_internal/shell-sidebar.d.ts +7 -12
- package/dist/cjs/components/_internal/shell-sidebar.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
- package/dist/cjs/components/_internal/shell-sidebar.js.map +4 -4
- package/dist/cjs/components/_internal/shell-store.d.ts +99 -0
- package/dist/cjs/components/_internal/shell-store.d.ts.map +1 -0
- package/dist/cjs/components/_internal/shell-store.js +2 -0
- package/dist/cjs/components/_internal/shell-store.js.map +7 -0
- package/dist/cjs/components/context-menu.js +1 -1
- package/dist/cjs/components/context-menu.js.map +3 -3
- package/dist/cjs/components/dropdown-menu.js +1 -1
- package/dist/cjs/components/dropdown-menu.js.map +3 -3
- package/dist/cjs/components/index.js +5 -5
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/components/schemas/index.js +1 -1
- package/dist/cjs/components/schemas/index.js.map +3 -3
- package/dist/cjs/components/schemas/shell.schema.d.ts +277 -229
- package/dist/cjs/components/schemas/shell.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/shell.schema.js +1 -1
- package/dist/cjs/components/schemas/shell.schema.js.map +3 -3
- package/dist/cjs/components/shell.context.d.ts +25 -114
- package/dist/cjs/components/shell.context.d.ts.map +1 -1
- package/dist/cjs/components/shell.context.js +1 -1
- package/dist/cjs/components/shell.context.js.map +4 -4
- package/dist/cjs/components/shell.d.ts +42 -21
- package/dist/cjs/components/shell.d.ts.map +1 -1
- package/dist/cjs/components/shell.hooks.d.ts +7 -23
- package/dist/cjs/components/shell.hooks.d.ts.map +1 -1
- package/dist/cjs/components/shell.hooks.js +1 -1
- package/dist/cjs/components/shell.hooks.js.map +4 -4
- package/dist/cjs/components/shell.js +1 -1
- package/dist/cjs/components/shell.js.map +4 -4
- package/dist/cjs/components/shell.types.d.ts +19 -2
- package/dist/cjs/components/shell.types.d.ts.map +1 -1
- package/dist/cjs/components/shell.types.js +1 -1
- package/dist/cjs/components/shell.types.js.map +3 -3
- package/dist/cjs/components/sidebar.d.ts.map +1 -1
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +3 -3
- package/dist/cjs/hooks/use-breakpoint.d.ts +5 -0
- package/dist/cjs/hooks/use-breakpoint.d.ts.map +1 -1
- package/dist/cjs/hooks/use-breakpoint.js +1 -1
- package/dist/cjs/hooks/use-breakpoint.js.map +3 -3
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/{chunk-HJU4I34X.js → chunk-25X75TI7.js} +2 -2
- package/dist/esm/{chunk-4XKK32M4.js → chunk-26I257HE.js} +2 -2
- package/dist/esm/chunk-2EQWBT2S.js +2 -0
- package/dist/esm/chunk-2EQWBT2S.js.map +7 -0
- package/dist/esm/{chunk-GLERJXVS.js → chunk-2Q7BJ7YG.js} +2 -2
- package/dist/esm/chunk-3J6AUDID.js +2 -0
- package/dist/esm/chunk-3J6AUDID.js.map +7 -0
- package/dist/esm/{chunk-7EWFBWBS.js → chunk-3PTSRBVY.js} +2 -2
- package/dist/esm/chunk-3XSB7YIM.js +2 -0
- package/dist/esm/{chunk-FMBECDL4.js.map → chunk-3XSB7YIM.js.map} +3 -3
- package/dist/esm/{chunk-O2U6RJTB.js → chunk-44JZYS7A.js} +2 -2
- package/dist/esm/{chunk-CTA5ODAO.js → chunk-4WU2WKUJ.js} +2 -2
- package/dist/esm/{chunk-KZWNGWIM.js → chunk-5M7STAH3.js} +2 -2
- package/dist/esm/{chunk-5WRCK4R7.js → chunk-5TAHT6VC.js} +2 -2
- package/dist/esm/{chunk-RNTCHVFI.js → chunk-6J6YX2VX.js} +2 -2
- package/dist/esm/{chunk-AGSSWWFI.js → chunk-7FKKGUHK.js} +2 -2
- package/dist/esm/{chunk-WHFJ4JUN.js → chunk-7NYODT3Z.js} +2 -2
- package/dist/esm/{chunk-NVDXXGVW.js → chunk-7PMMYHZV.js} +2 -2
- package/dist/esm/chunk-A2XVR7GL.js +2 -0
- package/dist/esm/chunk-A2XVR7GL.js.map +7 -0
- package/dist/esm/chunk-ADXZNG4F.js +2 -0
- package/dist/esm/chunk-ADXZNG4F.js.map +7 -0
- package/dist/esm/chunk-AGNIFHOE.js +2 -0
- package/dist/esm/chunk-AGNIFHOE.js.map +7 -0
- package/dist/esm/{chunk-KJUDZCYK.js → chunk-AIHQ3MVK.js} +2 -2
- package/dist/esm/{chunk-UBOOUDS4.js → chunk-AO32NT75.js} +2 -2
- package/dist/esm/chunk-BZZXXZ3O.js +2 -0
- package/dist/esm/chunk-BZZXXZ3O.js.map +7 -0
- package/dist/esm/{chunk-JDGJSNWT.js → chunk-C5RVO3C3.js} +2 -2
- package/dist/esm/{chunk-IHK3H2OM.js → chunk-CBNTPHYK.js} +2 -2
- package/dist/esm/{chunk-BBJUB52V.js → chunk-CRBOJ7N7.js} +2 -2
- package/dist/esm/{chunk-VHECAEUP.js → chunk-DCIQHXAR.js} +2 -2
- package/dist/esm/{chunk-43A5GUSI.js → chunk-EHBAK3LQ.js} +2 -2
- package/dist/esm/{chunk-K3UAS7RW.js → chunk-F3AXE27Q.js} +2 -2
- package/dist/esm/{chunk-KFR3CK24.js → chunk-FB3PD4Z3.js} +2 -2
- package/dist/esm/{chunk-MCPRXVKZ.js → chunk-FEAOFF77.js} +2 -2
- package/dist/esm/{chunk-VZSQATP6.js → chunk-G4YKBAZT.js} +2 -2
- package/dist/esm/{chunk-ECXGQQJB.js → chunk-GDAKJS64.js} +2 -2
- package/dist/esm/{chunk-VR7ZAFYN.js → chunk-GGSJXOKR.js} +2 -2
- package/dist/esm/chunk-GM7KMQDI.js +2 -0
- package/dist/esm/chunk-GMHA5CFH.js +2 -0
- package/dist/esm/chunk-GMHA5CFH.js.map +7 -0
- package/dist/esm/{chunk-CESYMTJQ.js → chunk-H4GR4262.js} +2 -2
- package/dist/esm/{chunk-WXQIIKWV.js → chunk-HBIF43PT.js} +2 -2
- package/dist/esm/chunk-HCNO7PX6.js +2 -0
- package/dist/esm/chunk-HCNO7PX6.js.map +7 -0
- package/dist/esm/{chunk-2264DHUW.js → chunk-HMSSFU6I.js} +2 -2
- package/dist/esm/chunk-HWQ3NTJP.js +2 -0
- package/dist/esm/chunk-HWQ3NTJP.js.map +7 -0
- package/dist/esm/{chunk-S5C5YRBS.js → chunk-IDUVJJYG.js} +2 -2
- package/dist/esm/{chunk-CIYF56YS.js → chunk-IK3MQHA5.js} +2 -2
- package/dist/esm/{chunk-CKMMUHKE.js → chunk-JDEBKA56.js} +2 -2
- package/dist/esm/{chunk-E67CIG6A.js → chunk-JDWCQ2XP.js} +2 -2
- package/dist/esm/{chunk-L3BWTV7I.js → chunk-JQSZF3E2.js} +2 -2
- package/dist/esm/{chunk-MEO7MJMQ.js → chunk-JQW4XYBS.js} +2 -2
- package/dist/esm/{chunk-KMPE7TJ6.js → chunk-JRFZ535T.js} +2 -2
- package/dist/esm/{chunk-CDG5WH4U.js → chunk-KEEPKI2X.js} +2 -2
- package/dist/esm/{chunk-GAV3NHYL.js → chunk-KV4SZP3F.js} +2 -2
- package/dist/esm/{chunk-FG7XM7KJ.js → chunk-LJCUPAOI.js} +2 -2
- package/dist/esm/{chunk-N4GTDLRD.js → chunk-MBCQA7UZ.js} +2 -2
- package/dist/esm/chunk-MM5IHQFM.js +2 -0
- package/dist/esm/{chunk-Y5RCH23Z.js → chunk-NQXRWBQM.js} +2 -2
- package/dist/esm/{chunk-CSKZZOI2.js → chunk-NTNMJX5M.js} +2 -2
- package/dist/esm/{chunk-V27ZAN3E.js → chunk-NV3P2CKH.js} +2 -2
- package/dist/esm/{chunk-4ME6O27S.js → chunk-O4CSXNST.js} +2 -2
- package/dist/esm/chunk-ODCVOXEV.js +2 -0
- package/dist/esm/{chunk-W2FOBR5Q.js → chunk-OEEF6KJG.js} +2 -2
- package/dist/esm/{chunk-ABSKRHVM.js → chunk-OJSOX3AX.js} +2 -2
- package/dist/esm/{chunk-JGLAE5G7.js → chunk-OQU2SKLN.js} +2 -2
- package/dist/esm/{chunk-PZ7OYATT.js → chunk-OTKQN2KY.js} +2 -2
- package/dist/esm/{chunk-QWVU2TW4.js → chunk-P27KV2LS.js} +2 -2
- package/dist/esm/{chunk-JUY7CBSL.js → chunk-PBFSBHBS.js} +2 -2
- package/dist/esm/{chunk-DSJY5RI3.js → chunk-PDUHBDFC.js} +2 -2
- package/dist/esm/{chunk-MTOLKA6S.js → chunk-POG3YABW.js} +2 -2
- package/dist/esm/chunk-PYHEBG5I.js +2 -0
- package/dist/esm/chunk-PYHEBG5I.js.map +7 -0
- package/dist/esm/{chunk-GO7OHBHW.js → chunk-PYXMGEO7.js} +2 -2
- package/dist/esm/{chunk-VNH7BJOA.js → chunk-QEGEUD4D.js} +2 -2
- package/dist/esm/chunk-QEL55MLF.js +2 -0
- package/dist/esm/{chunk-MS5J4MF6.js → chunk-QJVAS7AK.js} +2 -2
- package/dist/esm/chunk-ROSWI2CL.js +2 -0
- package/dist/esm/chunk-ROSWI2CL.js.map +7 -0
- package/dist/esm/{chunk-KCWESYMR.js → chunk-RY67WG3O.js} +2 -2
- package/dist/esm/{chunk-IFM4EMZB.js → chunk-TLGXIWAS.js} +2 -2
- package/dist/esm/{chunk-6FLLFCBU.js → chunk-UBSLEGQZ.js} +2 -2
- package/dist/esm/{chunk-VBI3AWPT.js → chunk-UNWPH3SO.js} +2 -2
- package/dist/esm/chunk-V5ZSDDVZ.js +2 -0
- package/dist/esm/chunk-V5ZSDDVZ.js.map +7 -0
- package/dist/esm/{chunk-X7V3V3W4.js → chunk-VTIL55SR.js} +2 -2
- package/dist/esm/chunk-VUNNS3ZU.js +2 -0
- package/dist/esm/chunk-VUNNS3ZU.js.map +7 -0
- package/dist/esm/{chunk-ALWNS44Q.js → chunk-W2LD2YE6.js} +2 -2
- package/dist/esm/{chunk-2I7QRVJ5.js → chunk-WGWUEU4K.js} +2 -2
- package/dist/esm/{chunk-EPTYNVCU.js → chunk-WIDJYVZF.js} +2 -2
- package/dist/esm/{chunk-OLAWVEAI.js → chunk-WJBOOAIO.js} +2 -2
- package/dist/esm/{chunk-7FC7HF76.js → chunk-WQCB7KSH.js} +2 -2
- package/dist/esm/{chunk-YBSRX63K.js → chunk-WZFVTC7P.js} +2 -2
- package/dist/esm/chunk-XDDKT4NF.js +2 -0
- package/dist/esm/{chunk-KFA53SVQ.js → chunk-YA5DF67M.js} +2 -2
- package/dist/esm/chunk-YA5DF67M.js.map +7 -0
- package/dist/esm/chunk-YAQBIO2B.js +2 -0
- package/dist/esm/chunk-YAQBIO2B.js.map +7 -0
- package/dist/esm/{chunk-OFUNVHZ5.js → chunk-YG66IRW4.js} +2 -2
- package/dist/esm/{chunk-WGYUWEQV.js → chunk-YVSM2LGS.js} +2 -2
- package/dist/esm/{chunk-4NTGF22C.js → chunk-Z7AZNMNX.js} +2 -2
- package/dist/esm/chunk-ZJ33QP5N.js +2 -0
- package/dist/esm/{chunk-OGXZHAQL.js → chunk-ZW26J2SA.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/_internal/shell-bottom.d.ts +6 -7
- package/dist/esm/components/_internal/shell-bottom.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-bottom.js +1 -1
- package/dist/esm/components/_internal/shell-handles.d.ts +9 -0
- package/dist/esm/components/_internal/shell-handles.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-handles.js +1 -1
- package/dist/esm/components/_internal/shell-inspector.d.ts +4 -6
- package/dist/esm/components/_internal/shell-inspector.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-inspector.js +1 -1
- package/dist/esm/components/_internal/shell-pane.d.ts +70 -0
- package/dist/esm/components/_internal/shell-pane.d.ts.map +1 -0
- package/dist/esm/components/_internal/shell-pane.js +2 -0
- package/dist/esm/components/_internal/shell-resizable.d.ts +48 -0
- package/dist/esm/components/_internal/shell-resizable.d.ts.map +1 -0
- package/dist/esm/components/_internal/shell-resizable.js +2 -0
- package/dist/esm/components/_internal/shell-resizable.js.map +7 -0
- package/dist/esm/components/_internal/shell-resize.d.ts +11 -3
- package/dist/esm/components/_internal/shell-resize.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-resize.js +1 -1
- package/dist/esm/components/_internal/shell-rest.d.ts +27 -0
- package/dist/esm/components/_internal/shell-rest.d.ts.map +1 -0
- package/dist/esm/components/_internal/shell-rest.js +2 -0
- package/dist/esm/components/_internal/shell-rest.js.map +7 -0
- package/dist/esm/components/_internal/shell-sidebar.d.ts +7 -12
- package/dist/esm/components/_internal/shell-sidebar.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-sidebar.js +1 -1
- package/dist/esm/components/_internal/shell-store.d.ts +99 -0
- package/dist/esm/components/_internal/shell-store.d.ts.map +1 -0
- package/dist/esm/components/_internal/shell-store.js +2 -0
- package/dist/esm/components/_internal/shell-store.js.map +7 -0
- 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.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.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/navbar.js +1 -1
- 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/schemas/shell.schema.d.ts +277 -229
- package/dist/esm/components/schemas/shell.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/shell.schema.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/shell.context.d.ts +25 -114
- package/dist/esm/components/shell.context.d.ts.map +1 -1
- package/dist/esm/components/shell.context.js +1 -1
- package/dist/esm/components/shell.d.ts +42 -21
- package/dist/esm/components/shell.d.ts.map +1 -1
- package/dist/esm/components/shell.hooks.d.ts +7 -23
- package/dist/esm/components/shell.hooks.d.ts.map +1 -1
- package/dist/esm/components/shell.hooks.js +1 -1
- package/dist/esm/components/shell.js +1 -1
- package/dist/esm/components/shell.types.d.ts +19 -2
- package/dist/esm/components/shell.types.d.ts.map +1 -1
- package/dist/esm/components/shell.types.js +1 -1
- package/dist/esm/components/sidebar.d.ts.map +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/hooks/index.js +1 -1
- package/dist/esm/hooks/use-breakpoint.d.ts +5 -0
- package/dist/esm/hooks/use-breakpoint.d.ts.map +1 -1
- package/dist/esm/hooks/use-breakpoint.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/props/index.js +1 -1
- package/package.json +7 -2
- package/schemas/index.json +1655 -0
- package/schemas/shell-bottom.d.ts +2 -0
- package/schemas/shell-bottom.json +180 -76
- package/schemas/shell-content.d.ts +2 -0
- package/schemas/shell-content.json +11 -5
- package/schemas/shell-handle.d.ts +2 -0
- package/schemas/shell-handle.json +7 -5
- package/schemas/shell-header.d.ts +2 -0
- package/schemas/shell-header.json +9 -10
- package/schemas/shell-inspector.d.ts +2 -0
- package/schemas/shell-inspector.json +183 -79
- package/schemas/shell-panel.d.ts +2 -0
- package/schemas/shell-panel.json +180 -76
- package/schemas/shell-rail.d.ts +2 -0
- package/schemas/shell-rail.json +137 -64
- package/schemas/shell-root.d.ts +2 -0
- package/schemas/shell-root.json +11 -9
- package/schemas/shell-sidebar.d.ts +2 -0
- package/schemas/shell-sidebar.json +274 -85
- package/schemas/shell-trigger.d.ts +2 -0
- package/schemas/shell-trigger.json +29 -17
- package/src/components/_internal/base-sidebar-menu.css +2 -1
- package/src/components/_internal/shell-bottom.tsx +92 -361
- package/src/components/_internal/shell-handles.tsx +193 -108
- package/src/components/_internal/shell-inspector.tsx +93 -360
- package/src/components/_internal/shell-pane.tsx +283 -0
- package/src/components/_internal/shell-resizable.tsx +263 -0
- package/src/components/_internal/shell-resize.tsx +11 -3
- package/src/components/_internal/shell-rest.ts +45 -0
- package/src/components/_internal/shell-sidebar.tsx +130 -441
- package/src/components/_internal/shell-store.tsx +204 -0
- package/src/components/schemas/shell.schema.ts +162 -153
- package/src/components/shell.context.tsx +112 -124
- package/src/components/shell.css +637 -496
- package/src/components/shell.hooks.ts +12 -170
- package/src/components/shell.tsx +566 -1497
- package/src/components/shell.types.ts +22 -2
- package/src/components/sidebar.tsx +17 -28
- package/src/hooks/use-breakpoint.ts +9 -0
- package/styles.css +539 -494
- package/dist/cjs/components/_internal/shell-prop-helpers.d.ts +0 -7
- package/dist/cjs/components/_internal/shell-prop-helpers.d.ts.map +0 -1
- package/dist/cjs/components/_internal/shell-prop-helpers.js +0 -2
- package/dist/cjs/components/_internal/shell-prop-helpers.js.map +0 -7
- package/dist/esm/chunk-2SZZ75RJ.js +0 -2
- package/dist/esm/chunk-2SZZ75RJ.js.map +0 -7
- package/dist/esm/chunk-4JQZUQY7.js +0 -2
- package/dist/esm/chunk-5LXFJMFB.js +0 -2
- package/dist/esm/chunk-5LXFJMFB.js.map +0 -7
- package/dist/esm/chunk-CECQNGUL.js +0 -2
- package/dist/esm/chunk-CECQNGUL.js.map +0 -7
- package/dist/esm/chunk-CEIK5U6C.js +0 -2
- package/dist/esm/chunk-CEIK5U6C.js.map +0 -7
- package/dist/esm/chunk-CJ27XP5Z.js +0 -2
- package/dist/esm/chunk-CJ27XP5Z.js.map +0 -7
- package/dist/esm/chunk-EE2IH2GL.js +0 -2
- package/dist/esm/chunk-EE2IH2GL.js.map +0 -7
- package/dist/esm/chunk-FMBECDL4.js +0 -2
- package/dist/esm/chunk-HSAG7C53.js +0 -2
- package/dist/esm/chunk-JJKQ7CGI.js +0 -2
- package/dist/esm/chunk-KFA53SVQ.js.map +0 -7
- package/dist/esm/chunk-KRDP5SQ7.js +0 -2
- package/dist/esm/chunk-KRDP5SQ7.js.map +0 -7
- package/dist/esm/chunk-M6DJRFJZ.js +0 -2
- package/dist/esm/chunk-M6DJRFJZ.js.map +0 -7
- package/dist/esm/chunk-MCQCG6AS.js +0 -2
- package/dist/esm/chunk-NIQT45PJ.js +0 -2
- package/dist/esm/chunk-NNO7M466.js +0 -2
- package/dist/esm/chunk-NNO7M466.js.map +0 -7
- package/dist/esm/chunk-SNHEJU2S.js +0 -2
- package/dist/esm/chunk-SNHEJU2S.js.map +0 -7
- package/dist/esm/chunk-TLWTUKKL.js +0 -2
- package/dist/esm/chunk-TLWTUKKL.js.map +0 -7
- package/dist/esm/chunk-XI5YXUCK.js +0 -2
- package/dist/esm/components/_internal/shell-prop-helpers.d.ts +0 -7
- package/dist/esm/components/_internal/shell-prop-helpers.d.ts.map +0 -1
- package/dist/esm/components/_internal/shell-prop-helpers.js +0 -2
- package/src/components/_internal/shell-prop-helpers.ts +0 -54
- /package/dist/esm/{chunk-HJU4I34X.js.map → chunk-25X75TI7.js.map} +0 -0
- /package/dist/esm/{chunk-4XKK32M4.js.map → chunk-26I257HE.js.map} +0 -0
- /package/dist/esm/{chunk-GLERJXVS.js.map → chunk-2Q7BJ7YG.js.map} +0 -0
- /package/dist/esm/{chunk-7EWFBWBS.js.map → chunk-3PTSRBVY.js.map} +0 -0
- /package/dist/esm/{chunk-O2U6RJTB.js.map → chunk-44JZYS7A.js.map} +0 -0
- /package/dist/esm/{chunk-CTA5ODAO.js.map → chunk-4WU2WKUJ.js.map} +0 -0
- /package/dist/esm/{chunk-KZWNGWIM.js.map → chunk-5M7STAH3.js.map} +0 -0
- /package/dist/esm/{chunk-5WRCK4R7.js.map → chunk-5TAHT6VC.js.map} +0 -0
- /package/dist/esm/{chunk-RNTCHVFI.js.map → chunk-6J6YX2VX.js.map} +0 -0
- /package/dist/esm/{chunk-AGSSWWFI.js.map → chunk-7FKKGUHK.js.map} +0 -0
- /package/dist/esm/{chunk-WHFJ4JUN.js.map → chunk-7NYODT3Z.js.map} +0 -0
- /package/dist/esm/{chunk-NVDXXGVW.js.map → chunk-7PMMYHZV.js.map} +0 -0
- /package/dist/esm/{chunk-KJUDZCYK.js.map → chunk-AIHQ3MVK.js.map} +0 -0
- /package/dist/esm/{chunk-UBOOUDS4.js.map → chunk-AO32NT75.js.map} +0 -0
- /package/dist/esm/{chunk-JDGJSNWT.js.map → chunk-C5RVO3C3.js.map} +0 -0
- /package/dist/esm/{chunk-IHK3H2OM.js.map → chunk-CBNTPHYK.js.map} +0 -0
- /package/dist/esm/{chunk-BBJUB52V.js.map → chunk-CRBOJ7N7.js.map} +0 -0
- /package/dist/esm/{chunk-VHECAEUP.js.map → chunk-DCIQHXAR.js.map} +0 -0
- /package/dist/esm/{chunk-43A5GUSI.js.map → chunk-EHBAK3LQ.js.map} +0 -0
- /package/dist/esm/{chunk-K3UAS7RW.js.map → chunk-F3AXE27Q.js.map} +0 -0
- /package/dist/esm/{chunk-KFR3CK24.js.map → chunk-FB3PD4Z3.js.map} +0 -0
- /package/dist/esm/{chunk-MCPRXVKZ.js.map → chunk-FEAOFF77.js.map} +0 -0
- /package/dist/esm/{chunk-VZSQATP6.js.map → chunk-G4YKBAZT.js.map} +0 -0
- /package/dist/esm/{chunk-ECXGQQJB.js.map → chunk-GDAKJS64.js.map} +0 -0
- /package/dist/esm/{chunk-VR7ZAFYN.js.map → chunk-GGSJXOKR.js.map} +0 -0
- /package/dist/esm/{chunk-4JQZUQY7.js.map → chunk-GM7KMQDI.js.map} +0 -0
- /package/dist/esm/{chunk-CESYMTJQ.js.map → chunk-H4GR4262.js.map} +0 -0
- /package/dist/esm/{chunk-WXQIIKWV.js.map → chunk-HBIF43PT.js.map} +0 -0
- /package/dist/esm/{chunk-2264DHUW.js.map → chunk-HMSSFU6I.js.map} +0 -0
- /package/dist/esm/{chunk-S5C5YRBS.js.map → chunk-IDUVJJYG.js.map} +0 -0
- /package/dist/esm/{chunk-CIYF56YS.js.map → chunk-IK3MQHA5.js.map} +0 -0
- /package/dist/esm/{chunk-CKMMUHKE.js.map → chunk-JDEBKA56.js.map} +0 -0
- /package/dist/esm/{chunk-E67CIG6A.js.map → chunk-JDWCQ2XP.js.map} +0 -0
- /package/dist/esm/{chunk-L3BWTV7I.js.map → chunk-JQSZF3E2.js.map} +0 -0
- /package/dist/esm/{chunk-MEO7MJMQ.js.map → chunk-JQW4XYBS.js.map} +0 -0
- /package/dist/esm/{chunk-KMPE7TJ6.js.map → chunk-JRFZ535T.js.map} +0 -0
- /package/dist/esm/{chunk-CDG5WH4U.js.map → chunk-KEEPKI2X.js.map} +0 -0
- /package/dist/esm/{chunk-GAV3NHYL.js.map → chunk-KV4SZP3F.js.map} +0 -0
- /package/dist/esm/{chunk-FG7XM7KJ.js.map → chunk-LJCUPAOI.js.map} +0 -0
- /package/dist/esm/{chunk-N4GTDLRD.js.map → chunk-MBCQA7UZ.js.map} +0 -0
- /package/dist/esm/{chunk-JJKQ7CGI.js.map → chunk-MM5IHQFM.js.map} +0 -0
- /package/dist/esm/{chunk-Y5RCH23Z.js.map → chunk-NQXRWBQM.js.map} +0 -0
- /package/dist/esm/{chunk-CSKZZOI2.js.map → chunk-NTNMJX5M.js.map} +0 -0
- /package/dist/esm/{chunk-V27ZAN3E.js.map → chunk-NV3P2CKH.js.map} +0 -0
- /package/dist/esm/{chunk-4ME6O27S.js.map → chunk-O4CSXNST.js.map} +0 -0
- /package/dist/esm/{chunk-HSAG7C53.js.map → chunk-ODCVOXEV.js.map} +0 -0
- /package/dist/esm/{chunk-W2FOBR5Q.js.map → chunk-OEEF6KJG.js.map} +0 -0
- /package/dist/esm/{chunk-ABSKRHVM.js.map → chunk-OJSOX3AX.js.map} +0 -0
- /package/dist/esm/{chunk-JGLAE5G7.js.map → chunk-OQU2SKLN.js.map} +0 -0
- /package/dist/esm/{chunk-PZ7OYATT.js.map → chunk-OTKQN2KY.js.map} +0 -0
- /package/dist/esm/{chunk-QWVU2TW4.js.map → chunk-P27KV2LS.js.map} +0 -0
- /package/dist/esm/{chunk-JUY7CBSL.js.map → chunk-PBFSBHBS.js.map} +0 -0
- /package/dist/esm/{chunk-DSJY5RI3.js.map → chunk-PDUHBDFC.js.map} +0 -0
- /package/dist/esm/{chunk-MTOLKA6S.js.map → chunk-POG3YABW.js.map} +0 -0
- /package/dist/esm/{chunk-GO7OHBHW.js.map → chunk-PYXMGEO7.js.map} +0 -0
- /package/dist/esm/{chunk-VNH7BJOA.js.map → chunk-QEGEUD4D.js.map} +0 -0
- /package/dist/esm/{chunk-MCQCG6AS.js.map → chunk-QEL55MLF.js.map} +0 -0
- /package/dist/esm/{chunk-MS5J4MF6.js.map → chunk-QJVAS7AK.js.map} +0 -0
- /package/dist/esm/{chunk-KCWESYMR.js.map → chunk-RY67WG3O.js.map} +0 -0
- /package/dist/esm/{chunk-IFM4EMZB.js.map → chunk-TLGXIWAS.js.map} +0 -0
- /package/dist/esm/{chunk-6FLLFCBU.js.map → chunk-UBSLEGQZ.js.map} +0 -0
- /package/dist/esm/{chunk-VBI3AWPT.js.map → chunk-UNWPH3SO.js.map} +0 -0
- /package/dist/esm/{chunk-X7V3V3W4.js.map → chunk-VTIL55SR.js.map} +0 -0
- /package/dist/esm/{chunk-ALWNS44Q.js.map → chunk-W2LD2YE6.js.map} +0 -0
- /package/dist/esm/{chunk-2I7QRVJ5.js.map → chunk-WGWUEU4K.js.map} +0 -0
- /package/dist/esm/{chunk-EPTYNVCU.js.map → chunk-WIDJYVZF.js.map} +0 -0
- /package/dist/esm/{chunk-OLAWVEAI.js.map → chunk-WJBOOAIO.js.map} +0 -0
- /package/dist/esm/{chunk-7FC7HF76.js.map → chunk-WQCB7KSH.js.map} +0 -0
- /package/dist/esm/{chunk-YBSRX63K.js.map → chunk-WZFVTC7P.js.map} +0 -0
- /package/dist/esm/{chunk-XI5YXUCK.js.map → chunk-XDDKT4NF.js.map} +0 -0
- /package/dist/esm/{chunk-OFUNVHZ5.js.map → chunk-YG66IRW4.js.map} +0 -0
- /package/dist/esm/{chunk-WGYUWEQV.js.map → chunk-YVSM2LGS.js.map} +0 -0
- /package/dist/esm/{chunk-4NTGF22C.js.map → chunk-Z7AZNMNX.js.map} +0 -0
- /package/dist/esm/{chunk-NIQT45PJ.js.map → chunk-ZJ33QP5N.js.map} +0 -0
- /package/dist/esm/{chunk-OGXZHAQL.js.map → chunk-ZW26J2SA.js.map} +0 -0
- /package/dist/esm/components/_internal/{shell-prop-helpers.js.map → shell-pane.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-PS6NEG5A.js";import{a as f}from"./chunk-QFPHEY77.js";import{a as v}from"./chunk-GSTOGDAJ.js";import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-PS6NEG5A.js";import{a as f}from"./chunk-QFPHEY77.js";import{a as v}from"./chunk-GSTOGDAJ.js";import{a as c}from"./chunk-UBSLEGQZ.js";import*as a from"react";import A from"classnames";import{Avatar as m}from"radix-ui";var N=a.forwardRef((e,s)=>{let{asChild:r,children:t,className:o,style:p,color:l,radius:n,material:P,panelBackground:y,status:i,badge:d,...b}=c(e,f,v),R=r&&t!=null&&a.isValidElement(t)&&(t.props.disabled===!0||t.props["data-disabled"]===!0),h=d!==void 0||i!==void 0;return a.createElement(m.Root,{"data-accent-color":l,"data-radius":n,"data-material":P,"data-panel-background":y,"data-disabled":R||void 0,"data-has-indicator":h||void 0,className:A("rt-reset","rt-AvatarRoot",o),style:p,asChild:r},u({asChild:r,children:t},a.createElement(g,{ref:s,...b})),d!==void 0?a.createElement("span",{className:"rt-AvatarBadge"},d):i!==void 0?a.createElement("span",{className:"rt-AvatarStatus","data-accent-color":i}):null)});N.displayName="Avatar";var g=a.memo(a.forwardRef(({fallback:e,onLoadingStatusChange:s,...r},t)=>{let[o,p]=a.useState("idle"),l=a.useCallback(n=>{s?.(n),p(n)},[s]);return a.createElement(a.Fragment,null,o==="idle"||o==="loading"?a.createElement("span",{className:"rt-AvatarFallback"}):null,o==="error"?a.createElement(m.Fallback,{className:A("rt-AvatarFallback",{"rt-one-letter":typeof e=="string"&&e.length===1,"rt-two-letters":typeof e=="string"&&e.length===2}),delayMs:0},e):null,a.createElement(m.Image,{ref:t,className:"rt-AvatarImage",...r,onLoadingStatusChange:l}))}));g.displayName="AvatarImpl";export{N as a};
|
|
2
|
+
//# sourceMappingURL=chunk-25X75TI7.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-G2CKYO2I.js";import{a as m}from"./chunk-AXUDFYLY.js";import{a as p}from"./chunk-KNQBAOMV.js";import{a as i}from"./chunk-FD2TR343.js";import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-G2CKYO2I.js";import{a as m}from"./chunk-AXUDFYLY.js";import{a as p}from"./chunk-KNQBAOMV.js";import{a as i}from"./chunk-FD2TR343.js";import{a as f}from"./chunk-ZE2KAVXW.js";import{a as t}from"./chunk-WYADYDPN.js";import{b as e}from"./chunk-ZWZGUBL4.js";import{a as o}from"./chunk-NZJGC6ZW.js";import{c as r}from"./chunk-ZNK6AH2G.js";var a=["span","div","label","p"],n=["0","1","2","3","4","5","6","7","8","9","10","11","12"],x={as:{type:"enum",values:a,default:"span"},...o,size:{type:"enum",className:"rt-r-size",values:n,responsive:!0},...m,...i,...s,...p,...f,...t,...r,...e};export{x as a};
|
|
2
|
+
//# sourceMappingURL=chunk-26I257HE.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/shell.hooks.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport { useBreakpoint } from '../hooks/use-breakpoint.js';\nimport type { PresentationValue, ResponsivePresentation } from './shell.types.js';\nimport { tableOf, warnOnce } from './_internal/shell-store.js';\n\n/**\n * @deprecated Since 0.8.0 the Shell resolves a responsive `presentation` in\n * its stylesheet, so the pane is placed before any script runs. This hook\n * resolves it in JS after mount, which is the behaviour the Shell left\n * behind. It keeps working until 1.0.\n */\nfunction useResponsivePresentation(presentation: ResponsivePresentation): PresentationValue {\n React.useEffect(() => {\n warnOnce('Shell.useResponsivePresentation is deprecated and is removed in 1.0. The Shell resolves presentation in CSS.');\n }, []);\n const { breakpoint } = useBreakpoint(typeof presentation !== 'string');\n return tableOf<PresentationValue>(presentation, () => 'fixed')[breakpoint];\n}\n\nexport { useResponsivePresentation };\n"],
|
|
5
|
+
"mappings": "gFAAA,UAAYA,MAAW,QAWvB,SAASC,EAA0BC,EAAyD,CACpF,YAAU,IAAM,CAEtB,EAAG,CAAC,CAAC,EACL,GAAM,CAAE,WAAAC,CAAW,EAAIC,EAAc,OAAOF,GAAiB,QAAQ,EACrE,OAAOG,EAA2BH,EAAc,IAAM,OAAO,EAAEC,CAAU,CAC3E",
|
|
6
|
+
"names": ["React", "useResponsivePresentation", "presentation", "breakpoint", "useBreakpoint", "tableOf"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-QEL55MLF.js";import{a as e}from"./chunk-UBSLEGQZ.js";import*as o from"react";import a from"classnames";import{Slot as u}from"radix-ui";var P=o.forwardRef((p,r)=>{let{asChild:s,className:m,...f}=e(p,t),n=s?u.Root:"q";return o.createElement(n,{...f,ref:r,className:a("rt-Quote",m)})});P.displayName="Quote";export{P as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2Q7BJ7YG.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function r(e){if(e===void 0)return;if(typeof e=="boolean")return e?"open":"closed";let n={};for(let[t,o]of Object.entries(e))typeof o=="boolean"&&(n[t]=o?"open":"closed");return n}var a=e=>e==="overlay"?"closed":"open",i=()=>"closed",s=e=>e?-1:1,l=e=>e?1:-1,d=()=>-1;function p(e){if(!("height"in e)&&!("resizer"in e))return e;let{height:n,resizer:t,...o}=e;return o}export{r as a,a as b,i as c,s as d,l as e,d as f,p as g};
|
|
2
|
+
//# sourceMappingURL=chunk-3J6AUDID.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/_internal/shell-rest.ts"],
|
|
4
|
+
"sourcesContent": ["import type { Breakpoint, PresentationValue } from '../shell.types.js';\nimport type { PaneValue } from './shell-store.js';\n\ntype ResponsiveBoolean = boolean | Partial<Record<Breakpoint, boolean>>;\n\n/** `open`/`defaultOpen` as the pane's own value type. */\nexport function toPaneValue(value: ResponsiveBoolean | undefined): PaneValue | Partial<Record<Breakpoint, PaneValue>> | undefined {\n if (value === undefined) return undefined;\n if (typeof value === 'boolean') return value ? 'open' : 'closed';\n const map: Partial<Record<Breakpoint, PaneValue>> = {};\n for (const [bp, open] of Object.entries(value) as Array<[Breakpoint, boolean | undefined]>) {\n if (typeof open === 'boolean') map[bp] = open ? 'open' : 'closed';\n }\n return map;\n}\n\n/**\n * Where an untouched navigation column rests: open in the frame or stacked\n * over it, closed where it would be an overlay. An overlay is summoned,\n * never ambient.\n */\nexport const navigationRest = (presentation: PresentationValue): PaneValue => (presentation === 'overlay' ? 'closed' : 'open');\n\n/** Where an untouched detail pane rests: closed. Detail is asked for. */\nexport const detailRest = (): PaneValue => 'closed';\n\n/** A pane anchored at the inline start grows as its end edge moves toward the inline end. */\nexport const startAnchoredGrowth = (isRtl: boolean): 1 | -1 => (isRtl ? -1 : 1);\n\n/** A pane anchored at the inline end grows as its start edge moves toward the inline start. */\nexport const endAnchoredGrowth = (isRtl: boolean): 1 | -1 => (isRtl ? 1 : -1);\n\n/** A pane anchored at the block end grows as its top edge moves up. */\nexport const bottomAnchoredGrowth = (): 1 | -1 => -1;\n\n/**\n * `height` and `resizer` left PaneBaseProps in 0.8.0: no pane ever read them.\n * A call site written against 0.7 can still pass them, so they are dropped\n * here rather than reaching the DOM as invalid attributes.\n */\nexport function withoutRemovedPaneProps<T extends object>(props: T): T {\n if (!('height' in props) && !('resizer' in props)) return props;\n const { height: _height, resizer: _resizer, ...rest } = props as T & { height?: unknown; resizer?: unknown };\n return rest as T;\n}\n"],
|
|
5
|
+
"mappings": "AAMO,SAASA,EAAYC,EAAsG,CAChI,GAAIA,IAAU,OAAW,OACzB,GAAI,OAAOA,GAAU,UAAW,OAAOA,EAAQ,OAAS,SACxD,IAAMC,EAA8C,CAAC,EACrD,OAAW,CAACC,EAAIC,CAAI,IAAK,OAAO,QAAQH,CAAK,EACvC,OAAOG,GAAS,YAAWF,EAAIC,CAAE,EAAIC,EAAO,OAAS,UAE3D,OAAOF,CACT,CAOO,IAAMG,EAAkBC,GAAgDA,IAAiB,UAAY,SAAW,OAG1GC,EAAa,IAAiB,SAG9BC,EAAuBC,GAA4BA,EAAQ,GAAK,EAGhEC,EAAqBD,GAA4BA,EAAQ,EAAI,GAG7DE,EAAuB,IAAc,GAO3C,SAASC,EAA0CC,EAAa,CACrE,GAAI,EAAE,WAAYA,IAAU,EAAE,YAAaA,GAAQ,OAAOA,EAC1D,GAAM,CAAE,OAAQC,EAAS,QAASC,EAAU,GAAGC,CAAK,EAAIH,EACxD,OAAOG,CACT",
|
|
6
|
+
"names": ["toPaneValue", "value", "map", "bp", "open", "navigationRest", "presentation", "detailRest", "startAnchoredGrowth", "isRtl", "endAnchoredGrowth", "bottomAnchoredGrowth", "withoutRemovedPaneProps", "props", "_height", "_resizer", "rest"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as Be}from"./chunk-W2FOBR5Q.js";import{a as tt}from"./chunk-CTA5ODAO.js";import{g as Ze,j as et}from"./chunk-IX5HIHVI.js";import{a as Ee}from"./chunk-5WRCK4R7.js";import{a as ie}from"./chunk-NIQT45PJ.js";import{b as D}from"./chunk-FWB47YCH.js";import{a as je}from"./chunk-AGAQC4HH.js";import{a as kt}from"./chunk-OS3FCYZY.js";var jt={};kt(jt,{AttachTrigger:()=>mt,Attachment:()=>Ue,AttachmentsRow:()=>dt,InlineEnd:()=>ut,InlineStart:()=>lt,Root:()=>ct,Row:()=>pt,RowEnd:()=>ft,RowStart:()=>ht,Send:()=>bt,Textarea:()=>it});import*as e from"react";import k from"classnames";import{LazyMotion as Lt,MotionConfig as Mt,domAnimation as Ot,m as ue}from"motion/react";import{useComposedRefs as rt}from"radix-ui/internal";import{useDropzone as Ft}from"react-dropzone";var Ve=typeof window<"u"?e.useLayoutEffect:e.useEffect;function at(n,s){let{placeholder:r}=n;if(!r){s();return}n.placeholder="";try{s()}finally{n.placeholder=r}}var de={layout:{type:"spring",visualDuration:.15,bounce:.1}},ot=e.createContext(null),$e=e.createContext(""),j=()=>{let n=e.useContext(ot);if(!n)throw new Error("Chatbar context not found. Wrap parts in <Chatbar.Root>.");return n},le=n=>Array.isArray(n)?n:typeof n=="string"?n.split(",").map(s=>s.trim()).filter(Boolean):[],Ht=(n,s)=>{if(s.length===0)return!0;let r=n.type.toLowerCase(),d=n.name.toLowerCase();for(let h of s){let i=h.toLowerCase();if(i.includes("/")){let[f,l]=i.split("/"),[b,p]=r.split("/");if(f==="*"||f===b&&(l==="*"||l===p))return!0}else if(i.startsWith(".")&&d.endsWith(i))return!0}return!1},Nt=/\.(png|jpe?g|gif|webp|bmp|svg|avif)$/i,st=(n,s)=>(s||"").toLowerCase().startsWith("image/")||Nt.test(n),We=n=>n.trim().length>0,nt=(n,s)=>`${n} ${s}${n===1?"":"s"}`,zt=0,It=()=>`chatbar-attachment-${Date.now()}-${++zt}`,ct=e.forwardRef((n,s)=>{let{className:r,style:d,children:h,value:i,defaultValue:f="",onValueChange:l,open:b,defaultOpen:p=!1,onOpenChange:A,expandOn:P="both",minLines:R=3,maxLines:M=6,sendMode:O="whenDirty",disabled:c,readOnly:g,onSubmit:E,size:v="2",variant:w,color:L,radius:F,panelBackground:B,material:S,width:me,maxWidth:pe,attachments:Z,defaultAttachments:he,onAttachmentsChange:fe,accept:Se,multiple:H=!0,maxAttachments:ee,maxFileSize:te,paste:K=!0,pasteAccept:N,clearOnSubmit:V=!0,onAttachmentReject:Te,dropzone:ae=!0,apiRef:ke,onBlurCapture:be,...Le}=n,_=S||B,Re=i!=null,[a,C]=e.useState(f),x=Re?i:a,G=b!=null,[W,q]=e.useState(p),ne=G?b:W,$="attachments"in n,[re,Ce]=e.useState(()=>he??[]),oe=e.useMemo(()=>$?Z??[]:re,[$,Z,re]),[Ke,Rt]=e.useState({text:"",id:0}),se=e.useCallback(t=>Rt(o=>({text:t,id:o.id+1})),[]),_e=e.useRef(null),Ct=rt(s,_e),Me=e.useRef(null),Oe=e.useRef(null),ce=e.useRef(!1),ge=e.useRef(!1),ve=e.useRef(void 0),Fe=e.useRef(null),Ge=le(Se).join(","),He=le(N).join(","),Ne=e.useMemo(()=>le(Ge),[Ge]),gt=e.useMemo(()=>He?le(He):Ne,[He,Ne]),qe={value:x,attachments:oe,accepts:Ne,pasteAccepts:gt,multiple:H,maxAttachments:ee,maxFileSize:te,disabled:c,readOnly:g,expandOn:P,isValueControlled:Re,isOpenControlled:G,isAttachmentsControlled:$,onValueChange:l,onOpenChange:A,onAttachmentsChange:fe,onAttachmentReject:Te,onSubmit:E},y=e.useRef(qe);y.current=qe;let ze=e.useRef(null),z=e.useCallback(()=>ze.current??y.current.attachments,[]),Y=e.useCallback(t=>{y.current.isOpenControlled||q(t),y.current.onOpenChange?.(t)},[]),ye=e.useCallback(t=>{y.current.isValueControlled||C(t),y.current.onValueChange?.(t)},[]),X=e.useCallback(t=>{ze.current=t,queueMicrotask(()=>{ze.current=null}),y.current.isAttachmentsControlled||Ce(t),y.current.onAttachmentsChange?.(t)},[]),xe=e.useRef(new Set),J=e.useCallback((t,o,u=y.current.multiple)=>{let m=y.current;if(m.disabled||m.readOnly||t.length===0)return 0;let I=z(),U=[],Q=[],St=typeof m.maxAttachments=="number"?Math.max(m.maxAttachments-I.length,0):1/0,Tt=u?1/0:1;for(let T of t){if(U.length>=St||U.length>=Tt){Q.push({file:T,reason:"count"});continue}if(typeof m.maxFileSize=="number"&&T.size>m.maxFileSize){Q.push({file:T,reason:"size"});continue}if(!Ht(T,o)){Q.push({file:T,reason:"type"});continue}let De=st(T.name,T.type)?URL.createObjectURL(T):void 0;De&&xe.current.add(De),U.push({id:It(),name:T.name,size:T.size,type:T.type,file:T,url:De,status:"idle"})}let we=[];return U.length>0&&(X(I.concat(U)),m.expandOn!=="none"&&Y(!0),we.push(`${nt(U.length,"file")} attached.`)),Q.length>0&&(m.onAttachmentReject?.(Q),we.push(`${nt(Q.length,"file")} could not be attached.`)),we.length>0&&se(we.join(" ")),U.length},[z,X,Y,se]),Pe=e.useCallback(t=>J(t,y.current.accepts),[J]),Ye=e.useCallback(t=>J(t,y.current.pasteAccepts),[J]),Xe=e.useCallback(t=>{let o=z(),u=o.find(m=>m.id===t);u&&(X(o.filter(m=>m.id!==t)),se(`Removed ${u.name}.`))},[z,X,se]),Je=e.useCallback(t=>{let o=y.current;if(o.disabled||o.readOnly)return!1;let u=z();if(!We(o.value)&&u.length===0)return!1;let m={value:o.value,attachments:u};if(t&&o.onSubmit)for(let I of u)I.url&&xe.current.delete(I.url);return o.onSubmit?.(m),t&&(ye(""),X([])),!0},[z,ye,X]);e.useEffect(()=>{let t=xe.current;if(t.size===0)return;let o=new Set(oe.map(u=>u.url));for(let u of Array.from(t))o.has(u)||(URL.revokeObjectURL(u),t.delete(u))},[oe]),e.useEffect(()=>{let t=xe.current;return()=>{if(!y.current.isAttachmentsControlled){for(let o of Array.from(t))URL.revokeObjectURL(o);t.clear()}}},[]);let Ae=e.useCallback(t=>{let o=y.current,u=Oe.current;if(clearTimeout(ve.current),ge.current=!1,!u||o.disabled||o.readOnly)return;let m=t?.accept!=null?le(t.accept):o.accepts,I=t?.multiple??o.multiple;Fe.current={patterns:m,multiple:I},u.accept=m.join(","),u.multiple=I,ce.current=!0,u.click(),setTimeout(()=>{document.hasFocus()&&(ce.current=!1)},1e3)},[]),Qe=e.useCallback(()=>{ge.current=!0,clearTimeout(ve.current),ve.current=setTimeout(()=>{ge.current=!1},800)},[]);e.useEffect(()=>()=>clearTimeout(ve.current),[]),e.useEffect(()=>{let t=Oe.current,o=()=>{ce.current=!1};return window.addEventListener("focus",o),t?.addEventListener("cancel",o),()=>{window.removeEventListener("focus",o),t?.removeEventListener("cancel",o)}},[]);let vt=e.useCallback(t=>{let o=t.currentTarget,u=Array.from(o.files??[]),m=Fe.current;J(u,m?.patterns??y.current.accepts,m?.multiple),ce.current=!1,Fe.current=null,o.value=""},[J]),yt=e.useCallback(t=>{be?.(t);let o=y.current,u=_e.current;if(!u||o.expandOn==="none")return;let m=t.relatedTarget;m&&u.contains(m)||ce.current||ge.current||!We(o.value)&&z().length===0&&Y(!1)},[be,Y,z]),xt=e.useCallback(t=>{Pe(t)},[Pe]),{getRootProps:Pt,isDragActive:At}=Ft({onDrop:xt,onDragEnter:()=>se(""),noClick:!0,noKeyboard:!0,noPaste:!0,disabled:!ae||c||g}),Ie=ae&&At;e.useImperativeHandle(ke,()=>({focusTextarea:()=>Me.current?.focus({preventScroll:!0}),openFilePicker:()=>Ae()}),[Ae]);let wt=e.useCallback(t=>{if(c||t.pointerType==="mouse"&&t.button!==0)return;let o=t.target;o instanceof Element&&o.closest('button, [role="button"], a[href], input, textarea, select, [contenteditable], [tabindex]:not([tabindex="-1"])')||(t.preventDefault(),Me.current?.focus({preventScroll:!0}))},[c]),Et=e.useMemo(()=>({open:ne,setOpen:Y,setValue:ye,size:v,expandOn:P,minLines:R,maxLines:M,sendMode:O,disabled:c,readOnly:g,paste:K,clearOnSubmit:V,multiple:H,textareaRef:Me,attachments:oe,removeAttachment:Xe,submit:Je,appendFiles:Pe,appendFilesFromPaste:Ye,openFilePicker:Ae,beginFilePickerPress:Qe}),[ne,Y,ye,v,P,R,M,O,c,g,K,V,H,oe,Xe,Je,Pe,Ye,Ae,Qe]);return e.createElement(ot.Provider,{value:Et},e.createElement($e.Provider,{value:x},e.createElement(Lt,{features:Ot},e.createElement(Mt,{reducedMotion:"user"},e.createElement("div",{...Le,ref:Ct,className:k("rt-ChatbarRoot",`rt-r-size-${v}`,r),style:{position:"relative",width:me,maxWidth:pe,...d},"data-state":ne?"open":"closed","data-disabled":c?"":void 0,"data-readonly":g?"":void 0,"data-drop-active":Ie?"":void 0,"data-accent-color":L,"data-radius":F,"data-panel-background":_,"data-material":_,onBlurCapture:yt},e.createElement("input",{ref:Oe,type:"file",tabIndex:-1,"aria-hidden":!0,style:{display:"none"},onChange:vt}),e.createElement("div",{...ae?Pt():{},style:{width:"100%",height:"100%"},onPointerDown:wt},e.createElement(ue.div,{className:k("rt-ChatbarBox",`rt-variant-${w??"surface"}`),style:{position:"relative"},"data-accent-color":L,"data-radius":F,"data-panel-background":_,"data-material":_,layout:!0,transition:de},e.createElement(ue.div,{className:"rt-ChatbarGrid",layout:"position",transition:de},h),Ie&&e.createElement("div",{className:"rt-ChatbarDropOverlay","aria-hidden":!0},e.createElement("div",{className:"rt-ChatbarDropContent"},e.createElement(Ee,{emphasis:"medium",size:v,weight:"medium"},"Drop files here to attach"))))),e.createElement(je,{role:"status","aria-live":"polite"},Ie?"Drop files here to attach.":e.createElement("span",{key:Ke.id},Ke.text)))))))});ct.displayName="Chatbar.Root";var it=e.forwardRef((n,s)=>{let{className:r,style:d,asChild:h,onFocus:i,onChange:f,onPaste:l,onKeyDown:b,onCompositionStart:p,onCompositionEnd:A,submitOnEnter:P=!1,...R}=n,M=j(),O=e.useContext($e),{open:c,minLines:g,maxLines:E,expandOn:v,disabled:w,readOnly:L,setOpen:F,setValue:B,textareaRef:S,paste:me,appendFilesFromPaste:pe,size:Z,submit:he,clearOnSubmit:fe}=M,Se=rt(s,S),H=e.useRef(0),ee=e.useRef(0),te=e.useRef(!1),K=e.useRef({open:c,minLines:g,maxLines:E});Ve(()=>{K.current={open:c,minLines:g,maxLines:E}},[c,g,E]);let N=e.useCallback(()=>{let a=S.current;if(!a)return;let C=window.getComputedStyle(a);H.current=parseFloat(C.lineHeight)||20,ee.current=(parseFloat(C.paddingTop)||0)+(parseFloat(C.paddingBottom)||0)},[S]),V=e.useCallback((a,C)=>{let{minLines:x,maxLines:G}=K.current,W=H.current,q=ee.current,ne=Math.ceil((C?x:1)*W)+q,$=Math.ceil((C?G:1)*W)+q,re=Math.max(a.scrollHeight,ne);a.style.height=`${Math.min(re,$)}px`;let Ce=re>$;a.style.overflowY=Ce?"auto":"hidden",a.style.maxHeight=Ce?`${$}px`:"none"},[]);Ve(()=>{N()},[N,Z]),Ve(()=>{let a=S.current;a&&(H.current===0&&N(),at(a,()=>{a.style.height="auto";let C=c;if(!c&&(v==="overflow"||v==="both")){let x=Math.ceil(H.current)+ee.current;a.scrollHeight>x+1&&(C=!0,F(!0))}V(a,C)}))},[O,c,v,g,E,Z,F,S,N,V]),e.useEffect(()=>{let a=S.current;if(!a||typeof ResizeObserver>"u")return;let C=-1,x=new ResizeObserver(G=>{let W=G[0]?.contentRect.width??0;if(W===C)return;let q=C===-1;C=W,!q&&(N(),at(a,()=>{a.style.height="auto",V(a,K.current.open)}))});return x.observe(a),()=>x.disconnect()},[S,N,V]),e.useEffect(()=>{},[]);let Te=e.useCallback(a=>{i?.(a),!(w||L)&&(v==="focus"||v==="both")&&!c&&F(!0)},[w,L,v,c,F,i]),ae=e.useCallback(a=>{B(a.currentTarget.value),f?.(a)},[B,f]),ke=e.useCallback(a=>{if(l?.(a),a.defaultPrevented||!me||w||L)return;let C=Array.from(a.clipboardData?.items??[]).filter(x=>x.kind==="file").map(x=>x.getAsFile()).filter(x=>!!x);C.length!==0&&pe(C)>0&&a.preventDefault()},[me,w,L,l,pe]),be=e.useCallback(a=>{te.current=!0,p?.(a)},[p]),Le=e.useCallback(a=>{te.current=!1,A?.(a)},[A]),_=e.useCallback(a=>{b?.(a),!(a.defaultPrevented||!P)&&(a.key!=="Enter"||a.shiftKey||a.altKey||a.ctrlKey||a.metaKey||te.current||a.nativeEvent.isComposing||a.nativeEvent.keyCode===229||(a.preventDefault(),he(fe)))},[P,b,he,fe]),Re=h?D:"textarea";return e.createElement(ue.div,{className:k("rt-ChatbarField","rt-ChatbarTextarea",r),layout:"position",transition:de},e.createElement(Re,{...R,ref:Se,className:"rt-ChatbarInput",value:O,onChange:ae,onFocus:Te,onPaste:ke,onKeyDown:_,onCompositionStart:be,onCompositionEnd:Le,disabled:w,readOnly:L,rows:c?g:1,spellCheck:R.spellCheck??!0,autoCorrect:R.autoCorrect??"on",style:d}))});it.displayName="Chatbar.Textarea";var lt=e.forwardRef((n,s)=>{let{children:r,asChild:d,className:h,...i}=n;return j().open?null:e.createElement(d?D:"div",{...i,ref:s,className:k("rt-ChatbarInlineStart",h)},r)});lt.displayName="Chatbar.InlineStart";var ut=e.forwardRef((n,s)=>{let{children:r,asChild:d,className:h,...i}=n;return j().open?null:e.createElement(d?D:"div",{...i,ref:s,className:k("rt-ChatbarInlineEnd",h)},r)});ut.displayName="Chatbar.InlineEnd";var dt=e.forwardRef((n,s)=>{let{asChild:r,forceMount:d,renderAttachment:h,className:i,...f}=n,l=j();if(l.attachments.length===0&&!d)return null;let b=r?D:"div";return e.createElement(ue.div,{layout:"position",transition:de},e.createElement(b,{...f,ref:s,className:k("rt-ChatbarAttachmentsRow",i),role:"list","aria-label":f["aria-label"]??"Attachments"},e.createElement(tt,{className:"rt-ChatbarScrollArea",scrollbars:"horizontal",size:"1"},e.createElement(ie,{align:"center",gap:"2",minWidth:"fit-content"},l.attachments.map(p=>e.createElement(Ue,{key:p.id,attachment:p,asChild:!!h},h?.(p)))))))});dt.displayName="Chatbar.AttachmentsRow";var Dt={uploading:"uploading",error:"failed to upload"},Ue=e.forwardRef((n,s)=>{let{attachment:r,asChild:d,className:h,children:i,...f}=n,l=j(),b=d?D:"div",p=!!r.url&&st(r.name,r.type),A=`${Math.ceil(r.size/1024)} KB`,P=r.status?Dt[r.status]:void 0,R=l.disabled||l.readOnly,M=O=>{let c=O.currentTarget.closest('[role="listitem"]'),g=c?.parentElement?Array.from(c.parentElement.children):[],E=c?g.indexOf(c):-1,w=(g[E+1]??g[E-1])?.querySelector(".rt-ChatbarAttachmentRemove");w?w.focus():l.textareaRef.current?.focus({preventScroll:!0}),l.removeAttachment(r.id)};return e.createElement(b,{...f,ref:s,className:k("rt-ChatbarAttachment",h),role:"listitem","data-kind":p?"image":"file","data-status":r.status,title:r.name},i??e.createElement(ie,{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(et,null)),p?e.createElement(je,null,r.name,", ",A,P?`, ${P}`:""):e.createElement(ie,{direction:"column",gap:"0",minWidth:"0"},e.createElement(Ee,{size:l.size,weight:"medium",truncate:!0},r.name),e.createElement(Ee,{size:"1",color:r.status==="error"?"red":void 0,emphasis:r.status==="error"?void 0:"medium"},A,P?` \xB7 ${P}`:"")),!R&&e.createElement(Be,{className:"rt-ChatbarAttachmentRemove","aria-label":`Remove ${r.name}`,size:"1",variant:"classic",color:"gray",onClick:M},e.createElement(Ze,null))))});Ue.displayName="Chatbar.Attachment";var mt=e.forwardRef((n,s)=>{let{asChild:r,accept:d,multiple:h,disabled:i,onPointerDown:f,onClick:l,...b}=n,p=j(),A=i||p.disabled||p.readOnly;return e.createElement(r?D:"button",{...b,ref:s,className:k("rt-ChatbarAttachTrigger",b.className),type:b.type??"button","aria-label":b["aria-label"]??"Add attachments",disabled:A,onPointerDown:R=>{f?.(R),!A&&!R.defaultPrevented&&p.beginFilePickerPress()},onClick:R=>{l?.(R),!(A||R.defaultPrevented)&&p.openFilePicker({accept:d,multiple:h})}})});mt.displayName="Chatbar.AttachTrigger";var pt=e.forwardRef((n,s)=>{let{asChild:r,children:d,className:h,...i}=n;if(!j().open)return null;let l=r?D:"div";return e.createElement(ue.div,{layout:"position",transition:de},e.createElement(l,{...i,ref:s,className:k("rt-ChatbarRow",h)},e.createElement(ie,{align:"center",justify:"between",width:"100%"},d)))});pt.displayName="Chatbar.Row";var ht=e.forwardRef((n,s)=>{let{className:r,...d}=n;return e.createElement("div",{...d,ref:s,className:k("rt-ChatbarRowStart",r)})});ht.displayName="Chatbar.RowStart";var ft=e.forwardRef((n,s)=>{let{className:r,...d}=n;return e.createElement("div",{...d,ref:s,className:k("rt-ChatbarRowEnd",r)})});ft.displayName="Chatbar.RowEnd";var bt=e.forwardRef((n,s)=>{let{asChild:r,clearOnSend:d,disabled:h,children:i,style:f,className:l,size:b,variant:p,tabIndex:A,onClick:P,"aria-label":R,"aria-labelledby":M,...O}=n,c=j(),g=e.useContext($e);if(c.sendMode==="never")return null;let E=We(g)||c.attachments.length>0,v=c.sendMode==="always"||E,w=h||c.disabled||c.readOnly||!E,L=M?{"aria-labelledby":M}:{"aria-label":R??"Send"},F=B=>{if(P?.(B),B.defaultPrevented||w)return;let S=d??c.clearOnSubmit;c.submit(S)&&S&&c.textareaRef.current?.focus({preventScroll:!0})};return e.createElement(Be,{...O,ref:s,size:b??c.size,variant:p??(c.open?"solid":"ghost"),disabled:w,className:k("rt-ChatbarSend",l),style:{opacity:v?1:0,pointerEvents:v?void 0:"none",...f},"aria-hidden":v?void 0:!0,tabIndex:v?A:-1,asChild:r,onClick:F,...L},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"})))});bt.displayName="Chatbar.Send";export{ct as a,it as b,lt as c,ut as d,dt as e,Ue as f,mt as g,pt as h,ht as i,ft as j,bt as k,jt as l};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as Be}from"./chunk-OEEF6KJG.js";import{a as tt}from"./chunk-4WU2WKUJ.js";import{g as Ze,j as et}from"./chunk-IX5HIHVI.js";import{a as Ee}from"./chunk-5TAHT6VC.js";import{a as ie}from"./chunk-ZJ33QP5N.js";import{a as je}from"./chunk-AGAQC4HH.js";import{b as D}from"./chunk-FWB47YCH.js";import{a as kt}from"./chunk-OS3FCYZY.js";var jt={};kt(jt,{AttachTrigger:()=>mt,Attachment:()=>Ue,AttachmentsRow:()=>dt,InlineEnd:()=>ut,InlineStart:()=>lt,Root:()=>ct,Row:()=>pt,RowEnd:()=>ft,RowStart:()=>ht,Send:()=>bt,Textarea:()=>it});import*as e from"react";import k from"classnames";import{LazyMotion as Lt,MotionConfig as Mt,domAnimation as Ot,m as ue}from"motion/react";import{useComposedRefs as rt}from"radix-ui/internal";import{useDropzone as Ft}from"react-dropzone";var Ve=typeof window<"u"?e.useLayoutEffect:e.useEffect;function at(n,s){let{placeholder:r}=n;if(!r){s();return}n.placeholder="";try{s()}finally{n.placeholder=r}}var de={layout:{type:"spring",visualDuration:.15,bounce:.1}},ot=e.createContext(null),$e=e.createContext(""),j=()=>{let n=e.useContext(ot);if(!n)throw new Error("Chatbar context not found. Wrap parts in <Chatbar.Root>.");return n},le=n=>Array.isArray(n)?n:typeof n=="string"?n.split(",").map(s=>s.trim()).filter(Boolean):[],Ht=(n,s)=>{if(s.length===0)return!0;let r=n.type.toLowerCase(),d=n.name.toLowerCase();for(let h of s){let i=h.toLowerCase();if(i.includes("/")){let[f,l]=i.split("/"),[b,p]=r.split("/");if(f==="*"||f===b&&(l==="*"||l===p))return!0}else if(i.startsWith(".")&&d.endsWith(i))return!0}return!1},Nt=/\.(png|jpe?g|gif|webp|bmp|svg|avif)$/i,st=(n,s)=>(s||"").toLowerCase().startsWith("image/")||Nt.test(n),We=n=>n.trim().length>0,nt=(n,s)=>`${n} ${s}${n===1?"":"s"}`,zt=0,It=()=>`chatbar-attachment-${Date.now()}-${++zt}`,ct=e.forwardRef((n,s)=>{let{className:r,style:d,children:h,value:i,defaultValue:f="",onValueChange:l,open:b,defaultOpen:p=!1,onOpenChange:A,expandOn:P="both",minLines:R=3,maxLines:M=6,sendMode:O="whenDirty",disabled:c,readOnly:g,onSubmit:E,size:v="2",variant:w,color:L,radius:F,panelBackground:B,material:S,width:me,maxWidth:pe,attachments:Z,defaultAttachments:he,onAttachmentsChange:fe,accept:Se,multiple:H=!0,maxAttachments:ee,maxFileSize:te,paste:K=!0,pasteAccept:N,clearOnSubmit:V=!0,onAttachmentReject:Te,dropzone:ae=!0,apiRef:ke,onBlurCapture:be,...Le}=n,_=S||B,Re=i!=null,[a,C]=e.useState(f),x=Re?i:a,G=b!=null,[W,q]=e.useState(p),ne=G?b:W,$="attachments"in n,[re,Ce]=e.useState(()=>he??[]),oe=e.useMemo(()=>$?Z??[]:re,[$,Z,re]),[Ke,Rt]=e.useState({text:"",id:0}),se=e.useCallback(t=>Rt(o=>({text:t,id:o.id+1})),[]),_e=e.useRef(null),Ct=rt(s,_e),Me=e.useRef(null),Oe=e.useRef(null),ce=e.useRef(!1),ge=e.useRef(!1),ve=e.useRef(void 0),Fe=e.useRef(null),Ge=le(Se).join(","),He=le(N).join(","),Ne=e.useMemo(()=>le(Ge),[Ge]),gt=e.useMemo(()=>He?le(He):Ne,[He,Ne]),qe={value:x,attachments:oe,accepts:Ne,pasteAccepts:gt,multiple:H,maxAttachments:ee,maxFileSize:te,disabled:c,readOnly:g,expandOn:P,isValueControlled:Re,isOpenControlled:G,isAttachmentsControlled:$,onValueChange:l,onOpenChange:A,onAttachmentsChange:fe,onAttachmentReject:Te,onSubmit:E},y=e.useRef(qe);y.current=qe;let ze=e.useRef(null),z=e.useCallback(()=>ze.current??y.current.attachments,[]),Y=e.useCallback(t=>{y.current.isOpenControlled||q(t),y.current.onOpenChange?.(t)},[]),ye=e.useCallback(t=>{y.current.isValueControlled||C(t),y.current.onValueChange?.(t)},[]),X=e.useCallback(t=>{ze.current=t,queueMicrotask(()=>{ze.current=null}),y.current.isAttachmentsControlled||Ce(t),y.current.onAttachmentsChange?.(t)},[]),xe=e.useRef(new Set),J=e.useCallback((t,o,u=y.current.multiple)=>{let m=y.current;if(m.disabled||m.readOnly||t.length===0)return 0;let I=z(),U=[],Q=[],St=typeof m.maxAttachments=="number"?Math.max(m.maxAttachments-I.length,0):1/0,Tt=u?1/0:1;for(let T of t){if(U.length>=St||U.length>=Tt){Q.push({file:T,reason:"count"});continue}if(typeof m.maxFileSize=="number"&&T.size>m.maxFileSize){Q.push({file:T,reason:"size"});continue}if(!Ht(T,o)){Q.push({file:T,reason:"type"});continue}let De=st(T.name,T.type)?URL.createObjectURL(T):void 0;De&&xe.current.add(De),U.push({id:It(),name:T.name,size:T.size,type:T.type,file:T,url:De,status:"idle"})}let we=[];return U.length>0&&(X(I.concat(U)),m.expandOn!=="none"&&Y(!0),we.push(`${nt(U.length,"file")} attached.`)),Q.length>0&&(m.onAttachmentReject?.(Q),we.push(`${nt(Q.length,"file")} could not be attached.`)),we.length>0&&se(we.join(" ")),U.length},[z,X,Y,se]),Pe=e.useCallback(t=>J(t,y.current.accepts),[J]),Ye=e.useCallback(t=>J(t,y.current.pasteAccepts),[J]),Xe=e.useCallback(t=>{let o=z(),u=o.find(m=>m.id===t);u&&(X(o.filter(m=>m.id!==t)),se(`Removed ${u.name}.`))},[z,X,se]),Je=e.useCallback(t=>{let o=y.current;if(o.disabled||o.readOnly)return!1;let u=z();if(!We(o.value)&&u.length===0)return!1;let m={value:o.value,attachments:u};if(t&&o.onSubmit)for(let I of u)I.url&&xe.current.delete(I.url);return o.onSubmit?.(m),t&&(ye(""),X([])),!0},[z,ye,X]);e.useEffect(()=>{let t=xe.current;if(t.size===0)return;let o=new Set(oe.map(u=>u.url));for(let u of Array.from(t))o.has(u)||(URL.revokeObjectURL(u),t.delete(u))},[oe]),e.useEffect(()=>{let t=xe.current;return()=>{if(!y.current.isAttachmentsControlled){for(let o of Array.from(t))URL.revokeObjectURL(o);t.clear()}}},[]);let Ae=e.useCallback(t=>{let o=y.current,u=Oe.current;if(clearTimeout(ve.current),ge.current=!1,!u||o.disabled||o.readOnly)return;let m=t?.accept!=null?le(t.accept):o.accepts,I=t?.multiple??o.multiple;Fe.current={patterns:m,multiple:I},u.accept=m.join(","),u.multiple=I,ce.current=!0,u.click(),setTimeout(()=>{document.hasFocus()&&(ce.current=!1)},1e3)},[]),Qe=e.useCallback(()=>{ge.current=!0,clearTimeout(ve.current),ve.current=setTimeout(()=>{ge.current=!1},800)},[]);e.useEffect(()=>()=>clearTimeout(ve.current),[]),e.useEffect(()=>{let t=Oe.current,o=()=>{ce.current=!1};return window.addEventListener("focus",o),t?.addEventListener("cancel",o),()=>{window.removeEventListener("focus",o),t?.removeEventListener("cancel",o)}},[]);let vt=e.useCallback(t=>{let o=t.currentTarget,u=Array.from(o.files??[]),m=Fe.current;J(u,m?.patterns??y.current.accepts,m?.multiple),ce.current=!1,Fe.current=null,o.value=""},[J]),yt=e.useCallback(t=>{be?.(t);let o=y.current,u=_e.current;if(!u||o.expandOn==="none")return;let m=t.relatedTarget;m&&u.contains(m)||ce.current||ge.current||!We(o.value)&&z().length===0&&Y(!1)},[be,Y,z]),xt=e.useCallback(t=>{Pe(t)},[Pe]),{getRootProps:Pt,isDragActive:At}=Ft({onDrop:xt,onDragEnter:()=>se(""),noClick:!0,noKeyboard:!0,noPaste:!0,disabled:!ae||c||g}),Ie=ae&&At;e.useImperativeHandle(ke,()=>({focusTextarea:()=>Me.current?.focus({preventScroll:!0}),openFilePicker:()=>Ae()}),[Ae]);let wt=e.useCallback(t=>{if(c||t.pointerType==="mouse"&&t.button!==0)return;let o=t.target;o instanceof Element&&o.closest('button, [role="button"], a[href], input, textarea, select, [contenteditable], [tabindex]:not([tabindex="-1"])')||(t.preventDefault(),Me.current?.focus({preventScroll:!0}))},[c]),Et=e.useMemo(()=>({open:ne,setOpen:Y,setValue:ye,size:v,expandOn:P,minLines:R,maxLines:M,sendMode:O,disabled:c,readOnly:g,paste:K,clearOnSubmit:V,multiple:H,textareaRef:Me,attachments:oe,removeAttachment:Xe,submit:Je,appendFiles:Pe,appendFilesFromPaste:Ye,openFilePicker:Ae,beginFilePickerPress:Qe}),[ne,Y,ye,v,P,R,M,O,c,g,K,V,H,oe,Xe,Je,Pe,Ye,Ae,Qe]);return e.createElement(ot.Provider,{value:Et},e.createElement($e.Provider,{value:x},e.createElement(Lt,{features:Ot},e.createElement(Mt,{reducedMotion:"user"},e.createElement("div",{...Le,ref:Ct,className:k("rt-ChatbarRoot",`rt-r-size-${v}`,r),style:{position:"relative",width:me,maxWidth:pe,...d},"data-state":ne?"open":"closed","data-disabled":c?"":void 0,"data-readonly":g?"":void 0,"data-drop-active":Ie?"":void 0,"data-accent-color":L,"data-radius":F,"data-panel-background":_,"data-material":_,onBlurCapture:yt},e.createElement("input",{ref:Oe,type:"file",tabIndex:-1,"aria-hidden":!0,style:{display:"none"},onChange:vt}),e.createElement("div",{...ae?Pt():{},style:{width:"100%",height:"100%"},onPointerDown:wt},e.createElement(ue.div,{className:k("rt-ChatbarBox",`rt-variant-${w??"surface"}`),style:{position:"relative"},"data-accent-color":L,"data-radius":F,"data-panel-background":_,"data-material":_,layout:!0,transition:de},e.createElement(ue.div,{className:"rt-ChatbarGrid",layout:"position",transition:de},h),Ie&&e.createElement("div",{className:"rt-ChatbarDropOverlay","aria-hidden":!0},e.createElement("div",{className:"rt-ChatbarDropContent"},e.createElement(Ee,{emphasis:"medium",size:v,weight:"medium"},"Drop files here to attach"))))),e.createElement(je,{role:"status","aria-live":"polite"},Ie?"Drop files here to attach.":e.createElement("span",{key:Ke.id},Ke.text)))))))});ct.displayName="Chatbar.Root";var it=e.forwardRef((n,s)=>{let{className:r,style:d,asChild:h,onFocus:i,onChange:f,onPaste:l,onKeyDown:b,onCompositionStart:p,onCompositionEnd:A,submitOnEnter:P=!1,...R}=n,M=j(),O=e.useContext($e),{open:c,minLines:g,maxLines:E,expandOn:v,disabled:w,readOnly:L,setOpen:F,setValue:B,textareaRef:S,paste:me,appendFilesFromPaste:pe,size:Z,submit:he,clearOnSubmit:fe}=M,Se=rt(s,S),H=e.useRef(0),ee=e.useRef(0),te=e.useRef(!1),K=e.useRef({open:c,minLines:g,maxLines:E});Ve(()=>{K.current={open:c,minLines:g,maxLines:E}},[c,g,E]);let N=e.useCallback(()=>{let a=S.current;if(!a)return;let C=window.getComputedStyle(a);H.current=parseFloat(C.lineHeight)||20,ee.current=(parseFloat(C.paddingTop)||0)+(parseFloat(C.paddingBottom)||0)},[S]),V=e.useCallback((a,C)=>{let{minLines:x,maxLines:G}=K.current,W=H.current,q=ee.current,ne=Math.ceil((C?x:1)*W)+q,$=Math.ceil((C?G:1)*W)+q,re=Math.max(a.scrollHeight,ne);a.style.height=`${Math.min(re,$)}px`;let Ce=re>$;a.style.overflowY=Ce?"auto":"hidden",a.style.maxHeight=Ce?`${$}px`:"none"},[]);Ve(()=>{N()},[N,Z]),Ve(()=>{let a=S.current;a&&(H.current===0&&N(),at(a,()=>{a.style.height="auto";let C=c;if(!c&&(v==="overflow"||v==="both")){let x=Math.ceil(H.current)+ee.current;a.scrollHeight>x+1&&(C=!0,F(!0))}V(a,C)}))},[O,c,v,g,E,Z,F,S,N,V]),e.useEffect(()=>{let a=S.current;if(!a||typeof ResizeObserver>"u")return;let C=-1,x=new ResizeObserver(G=>{let W=G[0]?.contentRect.width??0;if(W===C)return;let q=C===-1;C=W,!q&&(N(),at(a,()=>{a.style.height="auto",V(a,K.current.open)}))});return x.observe(a),()=>x.disconnect()},[S,N,V]),e.useEffect(()=>{},[]);let Te=e.useCallback(a=>{i?.(a),!(w||L)&&(v==="focus"||v==="both")&&!c&&F(!0)},[w,L,v,c,F,i]),ae=e.useCallback(a=>{B(a.currentTarget.value),f?.(a)},[B,f]),ke=e.useCallback(a=>{if(l?.(a),a.defaultPrevented||!me||w||L)return;let C=Array.from(a.clipboardData?.items??[]).filter(x=>x.kind==="file").map(x=>x.getAsFile()).filter(x=>!!x);C.length!==0&&pe(C)>0&&a.preventDefault()},[me,w,L,l,pe]),be=e.useCallback(a=>{te.current=!0,p?.(a)},[p]),Le=e.useCallback(a=>{te.current=!1,A?.(a)},[A]),_=e.useCallback(a=>{b?.(a),!(a.defaultPrevented||!P)&&(a.key!=="Enter"||a.shiftKey||a.altKey||a.ctrlKey||a.metaKey||te.current||a.nativeEvent.isComposing||a.nativeEvent.keyCode===229||(a.preventDefault(),he(fe)))},[P,b,he,fe]),Re=h?D:"textarea";return e.createElement(ue.div,{className:k("rt-ChatbarField","rt-ChatbarTextarea",r),layout:"position",transition:de},e.createElement(Re,{...R,ref:Se,className:"rt-ChatbarInput",value:O,onChange:ae,onFocus:Te,onPaste:ke,onKeyDown:_,onCompositionStart:be,onCompositionEnd:Le,disabled:w,readOnly:L,rows:c?g:1,spellCheck:R.spellCheck??!0,autoCorrect:R.autoCorrect??"on",style:d}))});it.displayName="Chatbar.Textarea";var lt=e.forwardRef((n,s)=>{let{children:r,asChild:d,className:h,...i}=n;return j().open?null:e.createElement(d?D:"div",{...i,ref:s,className:k("rt-ChatbarInlineStart",h)},r)});lt.displayName="Chatbar.InlineStart";var ut=e.forwardRef((n,s)=>{let{children:r,asChild:d,className:h,...i}=n;return j().open?null:e.createElement(d?D:"div",{...i,ref:s,className:k("rt-ChatbarInlineEnd",h)},r)});ut.displayName="Chatbar.InlineEnd";var dt=e.forwardRef((n,s)=>{let{asChild:r,forceMount:d,renderAttachment:h,className:i,...f}=n,l=j();if(l.attachments.length===0&&!d)return null;let b=r?D:"div";return e.createElement(ue.div,{layout:"position",transition:de},e.createElement(b,{...f,ref:s,className:k("rt-ChatbarAttachmentsRow",i),role:"list","aria-label":f["aria-label"]??"Attachments"},e.createElement(tt,{className:"rt-ChatbarScrollArea",scrollbars:"horizontal",size:"1"},e.createElement(ie,{align:"center",gap:"2",minWidth:"fit-content"},l.attachments.map(p=>e.createElement(Ue,{key:p.id,attachment:p,asChild:!!h},h?.(p)))))))});dt.displayName="Chatbar.AttachmentsRow";var Dt={uploading:"uploading",error:"failed to upload"},Ue=e.forwardRef((n,s)=>{let{attachment:r,asChild:d,className:h,children:i,...f}=n,l=j(),b=d?D:"div",p=!!r.url&&st(r.name,r.type),A=`${Math.ceil(r.size/1024)} KB`,P=r.status?Dt[r.status]:void 0,R=l.disabled||l.readOnly,M=O=>{let c=O.currentTarget.closest('[role="listitem"]'),g=c?.parentElement?Array.from(c.parentElement.children):[],E=c?g.indexOf(c):-1,w=(g[E+1]??g[E-1])?.querySelector(".rt-ChatbarAttachmentRemove");w?w.focus():l.textareaRef.current?.focus({preventScroll:!0}),l.removeAttachment(r.id)};return e.createElement(b,{...f,ref:s,className:k("rt-ChatbarAttachment",h),role:"listitem","data-kind":p?"image":"file","data-status":r.status,title:r.name},i??e.createElement(ie,{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(et,null)),p?e.createElement(je,null,r.name,", ",A,P?`, ${P}`:""):e.createElement(ie,{direction:"column",gap:"0",minWidth:"0"},e.createElement(Ee,{size:l.size,weight:"medium",truncate:!0},r.name),e.createElement(Ee,{size:"1",color:r.status==="error"?"red":void 0,emphasis:r.status==="error"?void 0:"medium"},A,P?` \xB7 ${P}`:"")),!R&&e.createElement(Be,{className:"rt-ChatbarAttachmentRemove","aria-label":`Remove ${r.name}`,size:"1",variant:"classic",color:"gray",onClick:M},e.createElement(Ze,null))))});Ue.displayName="Chatbar.Attachment";var mt=e.forwardRef((n,s)=>{let{asChild:r,accept:d,multiple:h,disabled:i,onPointerDown:f,onClick:l,...b}=n,p=j(),A=i||p.disabled||p.readOnly;return e.createElement(r?D:"button",{...b,ref:s,className:k("rt-ChatbarAttachTrigger",b.className),type:b.type??"button","aria-label":b["aria-label"]??"Add attachments",disabled:A,onPointerDown:R=>{f?.(R),!A&&!R.defaultPrevented&&p.beginFilePickerPress()},onClick:R=>{l?.(R),!(A||R.defaultPrevented)&&p.openFilePicker({accept:d,multiple:h})}})});mt.displayName="Chatbar.AttachTrigger";var pt=e.forwardRef((n,s)=>{let{asChild:r,children:d,className:h,...i}=n;if(!j().open)return null;let l=r?D:"div";return e.createElement(ue.div,{layout:"position",transition:de},e.createElement(l,{...i,ref:s,className:k("rt-ChatbarRow",h)},e.createElement(ie,{align:"center",justify:"between",width:"100%"},d)))});pt.displayName="Chatbar.Row";var ht=e.forwardRef((n,s)=>{let{className:r,...d}=n;return e.createElement("div",{...d,ref:s,className:k("rt-ChatbarRowStart",r)})});ht.displayName="Chatbar.RowStart";var ft=e.forwardRef((n,s)=>{let{className:r,...d}=n;return e.createElement("div",{...d,ref:s,className:k("rt-ChatbarRowEnd",r)})});ft.displayName="Chatbar.RowEnd";var bt=e.forwardRef((n,s)=>{let{asChild:r,clearOnSend:d,disabled:h,children:i,style:f,className:l,size:b,variant:p,tabIndex:A,onClick:P,"aria-label":R,"aria-labelledby":M,...O}=n,c=j(),g=e.useContext($e);if(c.sendMode==="never")return null;let E=We(g)||c.attachments.length>0,v=c.sendMode==="always"||E,w=h||c.disabled||c.readOnly||!E,L=M?{"aria-labelledby":M}:{"aria-label":R??"Send"},F=B=>{if(P?.(B),B.defaultPrevented||w)return;let S=d??c.clearOnSubmit;c.submit(S)&&S&&c.textareaRef.current?.focus({preventScroll:!0})};return e.createElement(Be,{...O,ref:s,size:b??c.size,variant:p??(c.open?"solid":"ghost"),disabled:w,className:k("rt-ChatbarSend",l),style:{opacity:v?1:0,pointerEvents:v?void 0:"none",...f},"aria-hidden":v?void 0:!0,tabIndex:v?A:-1,asChild:r,onClick:F,...L},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"})))});bt.displayName="Chatbar.Send";export{ct as a,it as b,lt as c,ut as d,dt as e,Ue as f,mt as g,pt as h,ht as i,ft as j,bt as k,jt as l};
|
|
2
|
+
//# sourceMappingURL=chunk-3PTSRBVY.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as p}from"./chunk-YA5DF67M.js";import*as o from"react";var l=Object.entries(p),u=null,i=new Set,n=null;function c(){return u??(u=l.map(([t,e])=>[t,window.matchMedia(e)])),u}function s(){let t="initial";for(let[e,r]of c())r.matches&&(t=e);return t}function a(){let t=s();t!==n&&(n=t,i.forEach(e=>e()))}function f(t){if(typeof window>"u")return()=>{};if(i.size===0){n=s();for(let[,e]of c())typeof e.addEventListener=="function"?e.addEventListener("change",a):e.addListener?.(a)}return i.add(t),()=>{if(i.delete(t),!(i.size>0)){for(let[,e]of c())try{typeof e.removeEventListener=="function"?e.removeEventListener("change",a):e.removeListener?.(a)}catch{}n=null}}}function y(){return typeof window>"u"?"initial":(n??(n=s()),n)}function k(){return"initial"}function L(){return typeof window>"u"?"initial":s()}var m=()=>!0,B=()=>!1,d=()=>()=>{},S=()=>"initial";function E(t=!0){let e=o.useSyncExternalStore(t?f:d,t?y:S,k),r=o.useSyncExternalStore(t?f:d,m,B);return o.useMemo(()=>({breakpoint:e,ready:r}),[e,r])}export{L as a,E as b};
|
|
2
|
+
//# sourceMappingURL=chunk-3XSB7YIM.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/hooks/use-breakpoint.ts"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport { _BREAKPOINTS, type Breakpoint } from '../components/shell.types.js';\n\nconst QUERIES = Object.entries(_BREAKPOINTS) as Array<[Breakpoint, string]>;\n\ntype Listener = () => void;\n\n/**\n * One set of `MediaQueryList`s and one set of listeners for the whole\n * application. Every component that asks for the breakpoint used to create and\n * subscribe to its own copy of all five queries.\n */\nlet mediaQueryLists: Array<[Breakpoint, MediaQueryList]> | null = null;\nconst listeners = new Set<Listener>();\nlet cachedBreakpoint: Breakpoint | null = null;\n\nfunction getMediaQueryLists() {\n mediaQueryLists ??= QUERIES.map(([name, query]) => [name, window.matchMedia(query)] as [Breakpoint, MediaQueryList]);\n return mediaQueryLists;\n}\n\nfunction computeBreakpoint(): Breakpoint {\n // The largest matching query wins; `_BREAKPOINTS` is ordered smallest first.\n let matched: Breakpoint = 'initial';\n for (const [name, mql] of getMediaQueryLists()) {\n if (mql.matches) matched = name;\n }\n return matched;\n}\n\nfunction handleChange() {\n const next = computeBreakpoint();\n if (next === cachedBreakpoint) return;\n cachedBreakpoint = next;\n listeners.forEach((listener) => listener());\n}\n\nfunction subscribe(listener: Listener) {\n if (typeof window === 'undefined') return () => {};\n\n if (listeners.size === 0) {\n cachedBreakpoint = computeBreakpoint();\n for (const [, mql] of getMediaQueryLists()) {\n // Safari below 14 only has the deprecated listener API.\n if (typeof mql.addEventListener === 'function') mql.addEventListener('change', handleChange);\n else mql.addListener?.(handleChange);\n }\n }\n\n listeners.add(listener);\n\n return () => {\n listeners.delete(listener);\n if (listeners.size > 0) return;\n\n for (const [, mql] of getMediaQueryLists()) {\n try {\n if (typeof mql.removeEventListener === 'function') mql.removeEventListener('change', handleChange);\n else mql.removeListener?.(handleChange);\n } catch (error) {\n // Removal can throw in edge cases, e.g. the list was already torn down.\n if (process.env.NODE_ENV !== 'production') {\n console.warn('[useBreakpoint] MediaQueryList cleanup warning:', error);\n }\n }\n }\n cachedBreakpoint = null;\n };\n}\n\n/**\n * `getSnapshot` must return a referentially stable value between changes, so it\n * reads the cache that `handleChange` maintains rather than recomputing.\n */\nfunction getSnapshot(): Breakpoint {\n if (typeof window === 'undefined') return 'initial';\n cachedBreakpoint ??= computeBreakpoint();\n return cachedBreakpoint;\n}\n\nfunction getServerSnapshot(): Breakpoint {\n return 'initial';\n}\n\nconst getReadySnapshot = () => true;\nconst getReadyServerSnapshot = () => false;\n\nconst noopSubscribe = () => () => {};\nconst getInitialSnapshot = (): Breakpoint => 'initial';\n\n/**\n * The current breakpoint, and whether it has been resolved against a real\n * viewport yet (`false` on the server and during hydration).\n *\n * Reads through `useSyncExternalStore` rather than settling into state from an\n * effect. On a client render the very first pass already has the real\n * breakpoint, instead of rendering the whole shell at `initial` and correcting\n * it after the browser has painted.\n *\n * Pass `enabled = false` to skip the subscription (the breakpoint then reads as\n * `initial`).\n */\nexport function useBreakpoint(enabled = true): { breakpoint: Breakpoint; ready: boolean } {\n // Callers with a non-responsive value pass `enabled = false` so they neither\n // subscribe to the media queries nor re-render when the viewport crosses one.\n const breakpoint = React.useSyncExternalStore(\n enabled ? subscribe : noopSubscribe,\n enabled ? getSnapshot : getInitialSnapshot,\n getServerSnapshot,\n );\n const ready = React.useSyncExternalStore(\n enabled ? subscribe : noopSubscribe,\n getReadySnapshot,\n getReadyServerSnapshot,\n );\n\n return React.useMemo(() => ({ breakpoint, ready }), [breakpoint, ready]);\n}\n"],
|
|
5
|
-
"mappings": "wCAEA,UAAYA,MAAW,QAGvB,IAAMC,EAAU,OAAO,QAAQC,CAAY,EASvCC,EAA8D,KAC5DC,EAAY,IAAI,IAClBC,EAAsC,KAE1C,SAASC,GAAqB,CAC5B,OAAAH,MAAoBF,EAAQ,IAAI,CAAC,CAACM,EAAMC,CAAK,IAAM,CAACD,EAAM,OAAO,WAAWC,CAAK,CAAC,CAAiC,GAC5GL,CACT,CAEA,SAASM,GAAgC,CAEvC,IAAIC,EAAsB,UAC1B,OAAW,CAACH,EAAMI,CAAG,IAAKL,EAAmB,EACvCK,EAAI,UAASD,EAAUH,GAE7B,OAAOG,CACT,CAEA,SAASE,GAAe,CACtB,IAAMC,EAAOJ,EAAkB,EAC3BI,IAASR,IACbA,EAAmBQ,EACnBT,EAAU,QAASU,GAAaA,EAAS,CAAC,EAC5C,CAEA,SAASC,EAAUD,EAAoB,CACrC,GAAI,OAAO,OAAW,IAAa,MAAO,IAAM,CAAC,EAEjD,GAAIV,EAAU,OAAS,EAAG,CACxBC,EAAmBI,EAAkB,EACrC,OAAW,CAAC,CAAEE,CAAG,IAAKL,EAAmB,EAEnC,OAAOK,EAAI,kBAAqB,WAAYA,EAAI,iBAAiB,SAAUC,CAAY,EACtFD,EAAI,cAAcC,CAAY,CAEvC,CAEA,OAAAR,EAAU,IAAIU,CAAQ,EAEf,IAAM,CAEX,GADAV,EAAU,OAAOU,CAAQ,EACrB,EAAAV,EAAU,KAAO,GAErB,QAAW,CAAC,CAAEO,CAAG,IAAKL,EAAmB,EACvC,GAAI,CACE,OAAOK,EAAI,qBAAwB,WAAYA,EAAI,oBAAoB,SAAUC,CAAY,EAC5FD,EAAI,iBAAiBC,CAAY,CACxC,MAAgB,CAKhB,CAEFP,EAAmB,KACrB,CACF,CAMA,SAASW,GAA0B,CACjC,OAAI,OAAO,OAAW,IAAoB,WAC1CX,MAAqBI,EAAkB,GAChCJ,EACT,CAEA,SAASY,GAAgC,CACvC,MAAO,SACT,CAEA,
|
|
6
|
-
"names": ["React", "QUERIES", "_BREAKPOINTS", "mediaQueryLists", "listeners", "cachedBreakpoint", "getMediaQueryLists", "name", "query", "computeBreakpoint", "matched", "mql", "handleChange", "next", "listener", "subscribe", "getSnapshot", "getServerSnapshot", "getReadySnapshot", "getReadyServerSnapshot", "noopSubscribe", "getInitialSnapshot", "useBreakpoint", "enabled", "breakpoint", "ready"]
|
|
4
|
+
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport { _BREAKPOINTS, type Breakpoint } from '../components/shell.types.js';\n\nconst QUERIES = Object.entries(_BREAKPOINTS) as Array<[Breakpoint, string]>;\n\ntype Listener = () => void;\n\n/**\n * One set of `MediaQueryList`s and one set of listeners for the whole\n * application. Every component that asks for the breakpoint used to create and\n * subscribe to its own copy of all five queries.\n */\nlet mediaQueryLists: Array<[Breakpoint, MediaQueryList]> | null = null;\nconst listeners = new Set<Listener>();\nlet cachedBreakpoint: Breakpoint | null = null;\n\nfunction getMediaQueryLists() {\n mediaQueryLists ??= QUERIES.map(([name, query]) => [name, window.matchMedia(query)] as [Breakpoint, MediaQueryList]);\n return mediaQueryLists;\n}\n\nfunction computeBreakpoint(): Breakpoint {\n // The largest matching query wins; `_BREAKPOINTS` is ordered smallest first.\n let matched: Breakpoint = 'initial';\n for (const [name, mql] of getMediaQueryLists()) {\n if (mql.matches) matched = name;\n }\n return matched;\n}\n\nfunction handleChange() {\n const next = computeBreakpoint();\n if (next === cachedBreakpoint) return;\n cachedBreakpoint = next;\n listeners.forEach((listener) => listener());\n}\n\nfunction subscribe(listener: Listener) {\n if (typeof window === 'undefined') return () => {};\n\n if (listeners.size === 0) {\n cachedBreakpoint = computeBreakpoint();\n for (const [, mql] of getMediaQueryLists()) {\n // Safari below 14 only has the deprecated listener API.\n if (typeof mql.addEventListener === 'function') mql.addEventListener('change', handleChange);\n else mql.addListener?.(handleChange);\n }\n }\n\n listeners.add(listener);\n\n return () => {\n listeners.delete(listener);\n if (listeners.size > 0) return;\n\n for (const [, mql] of getMediaQueryLists()) {\n try {\n if (typeof mql.removeEventListener === 'function') mql.removeEventListener('change', handleChange);\n else mql.removeListener?.(handleChange);\n } catch (error) {\n // Removal can throw in edge cases, e.g. the list was already torn down.\n if (process.env.NODE_ENV !== 'production') {\n console.warn('[useBreakpoint] MediaQueryList cleanup warning:', error);\n }\n }\n }\n cachedBreakpoint = null;\n };\n}\n\n/**\n * `getSnapshot` must return a referentially stable value between changes, so it\n * reads the cache that `handleChange` maintains rather than recomputing.\n */\nfunction getSnapshot(): Breakpoint {\n if (typeof window === 'undefined') return 'initial';\n cachedBreakpoint ??= computeBreakpoint();\n return cachedBreakpoint;\n}\n\nfunction getServerSnapshot(): Breakpoint {\n return 'initial';\n}\n\n/**\n * The breakpoint right now, outside React's render. For an effect that needs\n * the answer at the moment it runs rather than the one its render saw.\n */\nexport function readBreakpoint(): Breakpoint {\n if (typeof window === 'undefined') return 'initial';\n return computeBreakpoint();\n}\n\nconst getReadySnapshot = () => true;\nconst getReadyServerSnapshot = () => false;\n\nconst noopSubscribe = () => () => {};\nconst getInitialSnapshot = (): Breakpoint => 'initial';\n\n/**\n * The current breakpoint, and whether it has been resolved against a real\n * viewport yet (`false` on the server and during hydration).\n *\n * Reads through `useSyncExternalStore` rather than settling into state from an\n * effect. On a client render the very first pass already has the real\n * breakpoint, instead of rendering the whole shell at `initial` and correcting\n * it after the browser has painted.\n *\n * Pass `enabled = false` to skip the subscription (the breakpoint then reads as\n * `initial`).\n */\nexport function useBreakpoint(enabled = true): { breakpoint: Breakpoint; ready: boolean } {\n // Callers with a non-responsive value pass `enabled = false` so they neither\n // subscribe to the media queries nor re-render when the viewport crosses one.\n const breakpoint = React.useSyncExternalStore(\n enabled ? subscribe : noopSubscribe,\n enabled ? getSnapshot : getInitialSnapshot,\n getServerSnapshot,\n );\n const ready = React.useSyncExternalStore(\n enabled ? subscribe : noopSubscribe,\n getReadySnapshot,\n getReadyServerSnapshot,\n );\n\n return React.useMemo(() => ({ breakpoint, ready }), [breakpoint, ready]);\n}\n"],
|
|
5
|
+
"mappings": "wCAEA,UAAYA,MAAW,QAGvB,IAAMC,EAAU,OAAO,QAAQC,CAAY,EASvCC,EAA8D,KAC5DC,EAAY,IAAI,IAClBC,EAAsC,KAE1C,SAASC,GAAqB,CAC5B,OAAAH,MAAoBF,EAAQ,IAAI,CAAC,CAACM,EAAMC,CAAK,IAAM,CAACD,EAAM,OAAO,WAAWC,CAAK,CAAC,CAAiC,GAC5GL,CACT,CAEA,SAASM,GAAgC,CAEvC,IAAIC,EAAsB,UAC1B,OAAW,CAACH,EAAMI,CAAG,IAAKL,EAAmB,EACvCK,EAAI,UAASD,EAAUH,GAE7B,OAAOG,CACT,CAEA,SAASE,GAAe,CACtB,IAAMC,EAAOJ,EAAkB,EAC3BI,IAASR,IACbA,EAAmBQ,EACnBT,EAAU,QAASU,GAAaA,EAAS,CAAC,EAC5C,CAEA,SAASC,EAAUD,EAAoB,CACrC,GAAI,OAAO,OAAW,IAAa,MAAO,IAAM,CAAC,EAEjD,GAAIV,EAAU,OAAS,EAAG,CACxBC,EAAmBI,EAAkB,EACrC,OAAW,CAAC,CAAEE,CAAG,IAAKL,EAAmB,EAEnC,OAAOK,EAAI,kBAAqB,WAAYA,EAAI,iBAAiB,SAAUC,CAAY,EACtFD,EAAI,cAAcC,CAAY,CAEvC,CAEA,OAAAR,EAAU,IAAIU,CAAQ,EAEf,IAAM,CAEX,GADAV,EAAU,OAAOU,CAAQ,EACrB,EAAAV,EAAU,KAAO,GAErB,QAAW,CAAC,CAAEO,CAAG,IAAKL,EAAmB,EACvC,GAAI,CACE,OAAOK,EAAI,qBAAwB,WAAYA,EAAI,oBAAoB,SAAUC,CAAY,EAC5FD,EAAI,iBAAiBC,CAAY,CACxC,MAAgB,CAKhB,CAEFP,EAAmB,KACrB,CACF,CAMA,SAASW,GAA0B,CACjC,OAAI,OAAO,OAAW,IAAoB,WAC1CX,MAAqBI,EAAkB,GAChCJ,EACT,CAEA,SAASY,GAAgC,CACvC,MAAO,SACT,CAMO,SAASC,GAA6B,CAC3C,OAAI,OAAO,OAAW,IAAoB,UACnCT,EAAkB,CAC3B,CAEA,IAAMU,EAAmB,IAAM,GACzBC,EAAyB,IAAM,GAE/BC,EAAgB,IAAM,IAAM,CAAC,EAC7BC,EAAqB,IAAkB,UActC,SAASC,EAAcC,EAAU,GAAkD,CAGxF,IAAMC,EAAmB,uBACvBD,EAAUT,EAAYM,EACtBG,EAAUR,EAAcM,EACxBL,CACF,EACMS,EAAc,uBAClBF,EAAUT,EAAYM,EACtBF,EACAC,CACF,EAEA,OAAa,UAAQ,KAAO,CAAE,WAAAK,EAAY,MAAAC,CAAM,GAAI,CAACD,EAAYC,CAAK,CAAC,CACzE",
|
|
6
|
+
"names": ["React", "QUERIES", "_BREAKPOINTS", "mediaQueryLists", "listeners", "cachedBreakpoint", "getMediaQueryLists", "name", "query", "computeBreakpoint", "matched", "mql", "handleChange", "next", "listener", "subscribe", "getSnapshot", "getServerSnapshot", "readBreakpoint", "getReadySnapshot", "getReadyServerSnapshot", "noopSubscribe", "getInitialSnapshot", "useBreakpoint", "enabled", "breakpoint", "ready"]
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Q}from"./chunk-IBF5U4QW.js";import{a as X,b as q,c as J}from"./chunk-
|
|
1
|
+
import{a as Q}from"./chunk-IBF5U4QW.js";import{a as X,b as q,c as J}from"./chunk-7NYODT3Z.js";import{a as w}from"./chunk-ODCVOXEV.js";import{a as j}from"./chunk-KV4SZP3F.js";import{a as W}from"./chunk-OEEF6KJG.js";import{a as U}from"./chunk-4WU2WKUJ.js";import{a as R}from"./chunk-WJBOOAIO.js";import{a as T}from"./chunk-MM5IHQFM.js";import{a as D}from"./chunk-ERNM3KVF.js";import{a as F}from"./chunk-PYXMGEO7.js";import{a as v}from"./chunk-5TAHT6VC.js";import{b as V,c as x}from"./chunk-SEY4NA45.js";import{a as O}from"./chunk-F22ZRNWL.js";import{a as s}from"./chunk-XYVLQDGR.js";import{a as i}from"./chunk-ZJ33QP5N.js";import{a as G}from"./chunk-JDWCQ2XP.js";import*as e from"react";import{useCallbackRef as ie}from"radix-ui/internal";import{flushSync as re}from"react-dom";var Y=`
|
|
2
2
|
[contenteditable],
|
|
3
3
|
[role="combobox"],
|
|
4
4
|
[role="listbox"],
|
|
@@ -7,4 +7,4 @@ import{a as Q}from"./chunk-IBF5U4QW.js";import{a as X,b as q,c as J}from"./chunk
|
|
|
7
7
|
select,
|
|
8
8
|
textarea
|
|
9
9
|
`,se=e.forwardRef(({defaultOpen:n=!0,...o},r)=>{let[u,d]=e.useState(n),h=e.useRef(null),l=e.useRef(null);return e.useEffect(()=>{function C(c){let k=c.altKey||c.ctrlKey||c.shiftKey||c.metaKey,g=document.activeElement?.closest(Y);if(c.key?.toUpperCase()==="T"&&!k&&!g){let f=!1;re(()=>{d(H=>(f=!H,f))}),f?(l.current=document.activeElement,h.current?.focus()):l.current?.focus()}}return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[]),e.createElement(_,{...o,ref:r,triggerRef:h,open:u,shortcut:e.createElement(R,{content:"Press T to show/hide the Theme Panel",side:"bottom",sideOffset:6},e.createElement(G,{asChild:!0,size:"3",tabIndex:0,className:"rt-ThemePanelShortcut"},e.createElement("button",{type:"button",onClick:()=>d(C=>!C),ref:h,"aria-label":"Toggle the Theme Panel"},"T")))})});se.displayName="ThemePanel";var _=e.forwardRef((n,o)=>{let{open:r,onAppearanceChange:u,shortcut:d,triggerRef:h,...l}=n,C=V();return e.createElement(x,{asChild:!0,radius:"medium",scaling:"100%"},e.createElement(i,{direction:"column",position:"fixed",top:"0",right:"0",mr:{initial:"2",sm:"4"},mt:{initial:"2",sm:"4"},width:{initial:"360px"},maxHeight:{initial:"calc(100svh - var(--space-2) - var(--space-2))",sm:"calc(100svh - var(--space-4) - var(--space-4))"},maxWidth:{initial:"calc(100svw - var(--space-2) - var(--space-2))",sm:"calc(100svw - var(--space-4) - var(--space-4))"},inert:r?void 0:Q,...l,ref:o,style:{zIndex:999999999,overflow:"hidden",borderRadius:"var(--radius-4)",backgroundColor:"var(--color-panel-solid)",transformOrigin:"top center",transitionProperty:"transform, box-shadow",transitionDuration:"200ms",transitionTimingFunction:r?"ease-out":"ease-in",transform:r?"none":"translateX(105%)",boxShadow:r?"var(--shadow-5)":"var(--shadow-2)",...n.style}},e.createElement(U,null,e.createElement(T,{flexGrow:"1",p:{initial:"4",xs:"5"},position:"relative"},!!d&&e.createElement(T,{position:"absolute",top:"0",right:"0",m:"2"},d),e.createElement(ee,{onAppearanceChange:u,context:C})))))});_.displayName="ThemePanelImpl";var ee=e.forwardRef((n,o)=>{let{onAppearanceChange:r,context:u,...d}=n,h=V(),{appearance:l,onAppearanceChange:C,accentColor:c,onAccentColorChange:k,grayColor:g,onGrayColorChange:K,panelBackground:f,onPanelBackgroundChange:H,radius:M,onRadiusChange:te,scaling:Z,onScalingChange:ae}=u??h,[E,S]=e.useState(l==="inherit"?null:l),N=r!==void 0,$=ie(r),A=e.useCallback(t=>{let a=ce();if(l!=="inherit"){C(t);return}N?$(t):(S(t),de(t)),a()},[l,C,N,$]),I=O(c),z=g==="auto"?I:g,[ne,B]=e.useState("idle");async function oe(){let t={appearance:l===s.appearance.default?void 0:l,accentColor:c===s.accentColor.default?void 0:c,grayColor:g===s.grayColor.default?void 0:g,panelBackground:f===s.panelBackground.default?void 0:f,radius:M===s.radius.default?void 0:M,scaling:Z===s.scaling.default?void 0:Z},a=Object.keys(t).filter(p=>t[p]!==void 0).map(p=>`${p}="${t[p]}"`).join(" "),y=a?`<Theme ${a}>`:"<Theme>";B("copying"),await navigator.clipboard.writeText(y),B("copied"),setTimeout(()=>B("idle"),2e3)}return e.useEffect(()=>{function t(a){let y=a.altKey||a.ctrlKey||a.shiftKey||a.metaKey,p=document.activeElement?.closest(Y);a.key?.toUpperCase()==="D"&&!y&&!p&&A(E==="light"?"dark":"light")}return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[A,E]),e.useEffect(()=>{let t=document.documentElement,a=document.body;function y(){let L=t.classList.contains("dark")||t.classList.contains("dark-theme")||a.classList.contains("dark")||a.classList.contains("dark-theme");S(l==="inherit"?L?"dark":"light":l)}let p=new MutationObserver(function(L){L.forEach(function(le){le.attributeName==="class"&&y()})});return y(),l==="inherit"&&(p.observe(t,{attributes:!0}),p.observe(a,{attributes:!0})),()=>p.disconnect()},[l]),e.createElement(i,{direction:"column",gap:"5",...d,ref:o},e.createElement(F,{size:{initial:"3",sm:"5"},trim:"both",as:"h2"},"Theme"),e.createElement(i,{direction:"column",gap:"5"},e.createElement(P,null,e.createElement(b,{id:"accent-color-title"},"Accent color"),e.createElement(i,{wrap:"wrap",gap:"2",role:"group","aria-labelledby":"accent-color-title"},s.accentColor.values.map(t=>e.createElement(T,{asChild:!0,key:t},e.createElement("label",{className:"rt-ThemePanelSwatch","aria-label":m(t),style:{backgroundColor:`var(--${t}-9)`}},e.createElement(R,{content:`${m(t)}${c==="gray"&&z!=="gray"?` (${m(z)})`:""}`},e.createElement("input",{className:"rt-ThemePanelSwatchInput",type:"radio",name:"accentColor",value:t,checked:c===t,onChange:a=>k(a.target.value)}))))))),e.createElement(P,null,e.createElement(b,{id:"gray-color-title"},"Gray color"),e.createElement(i,{wrap:"wrap",gap:"2",role:"group","aria-labelledby":"gray-color-title"},s.grayColor.values.map(t=>e.createElement(i,{key:t,asChild:!0,align:"center",justify:"center"},e.createElement("label",{className:"rt-ThemePanelSwatch","aria-label":m(t),style:{backgroundColor:t==="auto"?`var(--${I}-9)`:t==="gray"?"var(--gray-9)":`var(--${t}-9)`,filter:t==="gray"?"saturate(0)":void 0}},e.createElement(R,{content:`${m(t)}${t==="auto"?` (${m(I)})`:""}`},e.createElement("input",{className:"rt-ThemePanelSwatchInput",type:"radio",name:"grayColor",value:t,checked:g===t,onChange:a=>K(a.target.value)}))))))),e.createElement(P,null,e.createElement(b,{id:"appearance-title"},"Appearance"),e.createElement(w,{columns:"2",gap:"2",role:"group","aria-labelledby":"appearance-title"},["light","dark"].map(t=>e.createElement("label",{key:t,className:"rt-ThemePanelRadioCard"},e.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"appearance",value:t,checked:E===t,onChange:a=>A(a.target.value)}),e.createElement(i,{align:"center",justify:"center",height:"32px",gap:"2"},t==="light"?e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -1px"}},e.createElement("path",{d:"M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})):e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -1px"}},e.createElement("path",{d:"M2.89998 0.499976C2.89998 0.279062 2.72089 0.0999756 2.49998 0.0999756C2.27906 0.0999756 2.09998 0.279062 2.09998 0.499976V1.09998H1.49998C1.27906 1.09998 1.09998 1.27906 1.09998 1.49998C1.09998 1.72089 1.27906 1.89998 1.49998 1.89998H2.09998V2.49998C2.09998 2.72089 2.27906 2.89998 2.49998 2.89998C2.72089 2.89998 2.89998 2.72089 2.89998 2.49998V1.89998H3.49998C3.72089 1.89998 3.89998 1.72089 3.89998 1.49998C3.89998 1.27906 3.72089 1.09998 3.49998 1.09998H2.89998V0.499976ZM5.89998 3.49998C5.89998 3.27906 5.72089 3.09998 5.49998 3.09998C5.27906 3.09998 5.09998 3.27906 5.09998 3.49998V4.09998H4.49998C4.27906 4.09998 4.09998 4.27906 4.09998 4.49998C4.09998 4.72089 4.27906 4.89998 4.49998 4.89998H5.09998V5.49998C5.09998 5.72089 5.27906 5.89998 5.49998 5.89998C5.72089 5.89998 5.89998 5.72089 5.89998 5.49998V4.89998H6.49998C6.72089 4.89998 6.89998 4.72089 6.89998 4.49998C6.89998 4.27906 6.72089 4.09998 6.49998 4.09998H5.89998V3.49998ZM1.89998 6.49998C1.89998 6.27906 1.72089 6.09998 1.49998 6.09998C1.27906 6.09998 1.09998 6.27906 1.09998 6.49998V7.09998H0.499976C0.279062 7.09998 0.0999756 7.27906 0.0999756 7.49998C0.0999756 7.72089 0.279062 7.89998 0.499976 7.89998H1.09998V8.49998C1.09998 8.72089 1.27906 8.89997 1.49998 8.89997C1.72089 8.89997 1.89998 8.72089 1.89998 8.49998V7.89998H2.49998C2.72089 7.89998 2.89998 7.72089 2.89998 7.49998C2.89998 7.27906 2.72089 7.09998 2.49998 7.09998H1.89998V6.49998ZM8.54406 0.98184L8.24618 0.941586C8.03275 0.917676 7.90692 1.1655 8.02936 1.34194C8.17013 1.54479 8.29981 1.75592 8.41754 1.97445C8.91878 2.90485 9.20322 3.96932 9.20322 5.10022C9.20322 8.37201 6.82247 11.0878 3.69887 11.6097C3.45736 11.65 3.20988 11.6772 2.96008 11.6906C2.74563 11.702 2.62729 11.9535 2.77721 12.1072C2.84551 12.1773 2.91535 12.2458 2.98667 12.3128L3.05883 12.3795L3.31883 12.6045L3.50684 12.7532L3.62796 12.8433L3.81491 12.9742L3.99079 13.089C4.11175 13.1651 4.23536 13.2375 4.36157 13.3059L4.62496 13.4412L4.88553 13.5607L5.18837 13.6828L5.43169 13.7686C5.56564 13.8128 5.70149 13.8529 5.83857 13.8885C5.94262 13.9155 6.04767 13.9401 6.15405 13.9622C6.27993 13.9883 6.40713 14.0109 6.53544 14.0298L6.85241 14.0685L7.11934 14.0892C7.24637 14.0965 7.37436 14.1002 7.50322 14.1002C11.1483 14.1002 14.1032 11.1453 14.1032 7.50023C14.1032 7.25044 14.0893 7.00389 14.0623 6.76131L14.0255 6.48407C13.991 6.26083 13.9453 6.04129 13.8891 5.82642C13.8213 5.56709 13.7382 5.31398 13.6409 5.06881L13.5279 4.80132L13.4507 4.63542L13.3766 4.48666C13.2178 4.17773 13.0353 3.88295 12.8312 3.60423L12.6782 3.40352L12.4793 3.16432L12.3157 2.98361L12.1961 2.85951L12.0355 2.70246L11.8134 2.50184L11.4925 2.24191L11.2483 2.06498L10.9562 1.87446L10.6346 1.68894L10.3073 1.52378L10.1938 1.47176L9.95488 1.3706L9.67791 1.2669L9.42566 1.1846L9.10075 1.09489L8.83599 1.03486L8.54406 0.98184ZM10.4032 5.30023C10.4032 4.27588 10.2002 3.29829 9.83244 2.40604C11.7623 3.28995 13.1032 5.23862 13.1032 7.50023C13.1032 10.593 10.596 13.1002 7.50322 13.1002C6.63646 13.1002 5.81597 12.9036 5.08355 12.5522C6.5419 12.0941 7.81081 11.2082 8.74322 10.0416C8.87963 10.2284 9.10028 10.3497 9.34928 10.3497C9.76349 10.3497 10.0993 10.0139 10.0993 9.59971C10.0993 9.24256 9.84965 8.94373 9.51535 8.86816C9.57741 8.75165 9.63653 8.63334 9.6926 8.51332C9.88358 8.63163 10.1088 8.69993 10.35 8.69993C11.0403 8.69993 11.6 8.14028 11.6 7.44993C11.6 6.75976 11.0406 6.20024 10.3505 6.19993C10.3853 5.90487 10.4032 5.60464 10.4032 5.30023Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})),e.createElement(v,{size:"1",weight:"medium"},m(t))))))),e.createElement(P,null,e.createElement(b,{id:"radius-title"},"Radius"),e.createElement(i,{gap:"2",role:"group","aria-labelledby":"radius-title",wrap:"wrap"},s.radius.values.map(t=>e.createElement(i,{key:t,direction:"column",align:"center"},e.createElement("label",{className:"rt-ThemePanelRadioCard"},e.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"radius",id:`theme-panel-radius-${t}`,value:t,checked:M===t,onChange:a=>te(a.target.value)}),e.createElement(x,{asChild:!0,radius:t},e.createElement(T,{m:"3",width:{initial:"24px",sm:"32px"},height:{initial:"24px",sm:"32px"},style:{borderTopLeftRadius:t==="full"?"80%":"var(--radius-5)",backgroundImage:"linear-gradient(to bottom right, var(--accent-3), var(--accent-4))",borderTop:"2px solid var(--accent-a8)",borderLeft:"2px solid var(--accent-a8)"}}))),e.createElement(T,{asChild:!0,pt:"2"},e.createElement(v,{asChild:!0,size:"1",emphasis:"medium"},e.createElement("label",{htmlFor:`theme-panel-radius-${t}`},m(t)))))))),e.createElement(P,null,e.createElement(b,{id:"scaling-title"},"Scaling"),e.createElement(w,{columns:{initial:"repeat(3, 1fr)",sm:"5"},gap:"2",role:"group","aria-labelledby":"scaling-title"},s.scaling.values.map(t=>e.createElement("label",{key:t,className:"rt-ThemePanelRadioCard","aria-label":`Scaling ${t}`},e.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"scaling",value:t,checked:Z===t,onChange:a=>ae(a.target.value)}),e.createElement(i,{align:"center",justify:"center",height:"32px"},e.createElement(x,{asChild:!0,scaling:t},e.createElement(i,{align:"center",justify:"center"},e.createElement(v,{size:"1",weight:"medium"},m(t))))))))),e.createElement(P,null,e.createElement(i,{align:"center",gap:"2"},e.createElement(b,{id:"panel-background-title"},"Panel background"),e.createElement(X,null,e.createElement(q,null,e.createElement(W,{size:"1",variant:"ghost",color:"gray"},e.createElement(D,{label:"Learn more about panel background options"},e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z",fillRule:"evenodd",clipRule:"evenodd"}))))),e.createElement(J,{size:"1",width:"220px",maxWidth:"90svw",minWidth:"0",side:"top",align:"center"},e.createElement(v,{as:"p",size:"1"},"Whether Card and Table panels are translucent, showing some of the background behind them.")))),e.createElement(w,{columns:{initial:"1",sm:"2"},rows:{initial:"2",sm:"1"},gap:"2",role:"group","aria-labelledby":"panel-background-title"},s.panelBackground.values.map(t=>e.createElement("label",{key:t,className:"rt-ThemePanelRadioCard"},e.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"panelBackground",value:t,checked:f===t,onChange:a=>H(a.target.value)}),e.createElement(i,{align:"center",justify:"center",height:"32px",gap:"2"},t==="solid"?e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -2px"}},e.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})):e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -2px"}},e.createElement("path",{opacity:".05",d:"M6.78296 13.376C8.73904 9.95284 8.73904 5.04719 6.78296 1.62405L7.21708 1.37598C9.261 4.95283 9.261 10.0472 7.21708 13.624L6.78296 13.376Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".1",d:"M7.28204 13.4775C9.23929 9.99523 9.23929 5.00475 7.28204 1.52248L7.71791 1.2775C9.76067 4.9119 9.76067 10.0881 7.71791 13.7225L7.28204 13.4775Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".15",d:"M7.82098 13.5064C9.72502 9.99523 9.72636 5.01411 7.82492 1.50084L8.26465 1.26285C10.2465 4.92466 10.2451 10.085 8.26052 13.7448L7.82098 13.5064Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".2",d:"M8.41284 13.429C10.1952 9.92842 10.1957 5.07537 8.41435 1.57402L8.85999 1.34729C10.7139 4.99113 10.7133 10.0128 8.85841 13.6559L8.41284 13.429Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".25",d:"M9.02441 13.2956C10.6567 9.8379 10.6586 5.17715 9.03005 1.71656L9.48245 1.50366C11.1745 5.09919 11.1726 9.91629 9.47657 13.5091L9.02441 13.2956Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".3",d:"M9.66809 13.0655C11.1097 9.69572 11.1107 5.3121 9.67088 1.94095L10.1307 1.74457C11.6241 5.24121 11.6231 9.76683 10.1278 13.2622L9.66809 13.0655Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".35",d:"M10.331 12.7456C11.5551 9.52073 11.5564 5.49103 10.3347 2.26444L10.8024 2.0874C12.0672 5.42815 12.0659 9.58394 10.7985 12.9231L10.331 12.7456Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".4",d:"M11.0155 12.2986C11.9938 9.29744 11.9948 5.71296 11.0184 2.71067L11.4939 2.55603C12.503 5.6589 12.502 9.35178 11.4909 12.4535L11.0155 12.2986Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".45",d:"M11.7214 11.668C12.4254 9.01303 12.4262 5.99691 11.7237 3.34116L12.2071 3.21329C12.9318 5.95292 12.931 9.05728 12.2047 11.7961L11.7214 11.668Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".5",d:"M12.4432 10.752C12.8524 8.63762 12.8523 6.36089 12.4429 4.2466L12.9338 4.15155C13.3553 6.32861 13.3554 8.66985 12.9341 10.847L12.4432 10.752Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})),e.createElement(v,{size:"1",weight:"medium"},m(t)))))))),e.createElement(j,{style:{width:"100%"},onClick:oe},ne==="copied"?"Copied":"Copy Theme"))});ee.displayName="ThemePanelContent";function P(n){return e.createElement(i,{direction:"column",gap:"3",asChild:!0,...n},e.createElement("section",null,n.children))}function b(n){return e.createElement(F,{as:"h3",size:{initial:"1",sm:"2"},...n})}function ce(){let n=document.createElement("style");return n.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(n),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(n)},1)}}function m(n){return n.charAt(0).toUpperCase()+n.slice(1)}function de(n){let o=document.documentElement,r=o.classList.contains("light-theme"),u=o.classList.contains("dark-theme"),d=o.classList.contains("light"),h=o.classList.contains("dark");(r||u)&&(o.classList.remove("light-theme","dark-theme"),o.style.colorScheme=n,o.classList.add(`${n}-theme`)),(d||h)&&(o.classList.remove("light","dark"),o.style.colorScheme=n,o.classList.add(n)),!r&&!u&&!d&&!h&&(o.style.colorScheme=n,o.classList.add(n))}export{se as a,ee as b};
|
|
10
|
-
//# sourceMappingURL=chunk-
|
|
10
|
+
//# sourceMappingURL=chunk-44JZYS7A.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as f}from"./chunk-AO32NT75.js";import{a as S}from"./chunk-5GXFBLBJ.js";import{a as o}from"./chunk-5KICSAT7.js";import{a as n}from"./chunk-PS6NEG5A.js";import{a as c}from"./chunk-E23RKOQJ.js";import{b as a}from"./chunk-PBFSBHBS.js";import*as r from"react";import t from"classnames";import{ScrollArea as e}from"radix-ui";var C=r.forwardRef((P,u)=>{let{rest:A,...d}=S(P),[y,v]=f(d),{asChild:s,children:N,className:R,style:b,type:i,scrollHideDelay:g=i!=="scroll"?0:void 0,dir:z,size:p=o.size.default,radius:m=o.radius.default,scrollbars:l=o.scrollbars.default,...h}=A;return r.createElement(e.Root,{type:i,scrollHideDelay:g,className:t("rt-ScrollAreaRoot",y,R),style:c(v,b),asChild:s},n({asChild:s,children:N},w=>r.createElement(r.Fragment,null,r.createElement(e.Viewport,{...h,ref:u,className:"rt-ScrollAreaViewport"},w),r.createElement("div",{className:"rt-ScrollAreaViewportFocusRing"}),l!=="vertical"?r.createElement(e.Scrollbar,{"data-radius":m,orientation:"horizontal",className:t("rt-ScrollAreaScrollbar",a({className:"rt-r-size",value:p,propValues:o.size.values}))},r.createElement(e.Thumb,{className:"rt-ScrollAreaThumb"})):null,l!=="horizontal"?r.createElement(e.Scrollbar,{"data-radius":m,orientation:"vertical",className:t("rt-ScrollAreaScrollbar",a({className:"rt-r-size",value:p,propValues:o.size.values}))},r.createElement(e.Thumb,{className:"rt-ScrollAreaThumb"})):null,l==="both"?r.createElement(e.Corner,{className:"rt-ScrollAreaCorner"}):null)))});C.displayName="ScrollArea";export{C as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4WU2WKUJ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as p}from"./chunk-FD2TR343.js";import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as p}from"./chunk-FD2TR343.js";import{a as s}from"./chunk-ZE2KAVXW.js";import{a as t}from"./chunk-WYADYDPN.js";import{b as r}from"./chunk-ZWZGUBL4.js";import{a as o}from"./chunk-NZJGC6ZW.js";import{d as e}from"./chunk-ZNK6AH2G.js";var a=["1","2","3","4","5","6","7","8","9"],i=["solid","soft","outline","ghost"],P={...o,size:{type:"enum",className:"rt-r-size",values:a,responsive:!0},variant:{type:"enum",className:"rt-variant",values:i,default:"soft"},...p,...e,...r,...s,...t};export{P as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5M7STAH3.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as P}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as P}from"./chunk-26I257HE.js";import{a as n}from"./chunk-GSTOGDAJ.js";import{a as m}from"./chunk-UBSLEGQZ.js";import*as e from"react";import{Slot as c}from"radix-ui";var l={...P,...n},f=e.memo(e.forwardRef((i,o)=>{let{children:t,className:p,asChild:x,as:T="span",color:r,...s}=m(i,l),a=p?`rt-Text ${p}`:"rt-Text";return x?e.createElement(c.Root,{"data-accent-color":r,...s,ref:o,className:a},t):e.createElement(T,{"data-accent-color":r,...s,ref:o,className:a},t)}));f.displayName="Text";export{f as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5TAHT6VC.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as L,b as l,c as n}from"./chunk-NIIEIZKQ.js";import{a as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as L,b as l,c as n}from"./chunk-NIIEIZKQ.js";import{a as m}from"./chunk-5TAHT6VC.js";import{a as i}from"./chunk-GSTOGDAJ.js";import{a as r}from"./chunk-UBSLEGQZ.js";import{a as R}from"./chunk-OS3FCYZY.js";var y={};R(y,{Item:()=>P,Label:()=>d,Root:()=>D,Value:()=>f});import p from"classnames";import*as t from"react";var D=t.forwardRef((a,e)=>{let{className:s,...o}=r(a,L,i);return t.createElement(m,{asChild:!0},t.createElement("dl",{...o,ref:e,className:p("rt-DataListRoot",s)}))});D.displayName="DataList.Root";var P=t.forwardRef((a,e)=>{let{className:s,...o}=r(a,l);return t.createElement("div",{...o,ref:e,className:p("rt-DataListItem",s)})});P.displayName="DataList.Item";var d=t.forwardRef((a,e)=>{let{className:s,color:o,...c}=r(a,n);return t.createElement("dt",{...c,"data-accent-color":o,ref:e,className:p("rt-DataListLabel",s)})});d.displayName="DataList.Label";var f=t.forwardRef(({children:a,className:e,...s},o)=>t.createElement("dd",{...s,ref:o,className:p(e,"rt-DataListValue")},a));f.displayName="DataList.Value";export{D as a,P as b,d as c,f as d,y as e};
|
|
2
|
+
//# sourceMappingURL=chunk-6J6YX2VX.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-KNQBAOMV.js";import{a as p}from"./chunk-FD2TR343.js";import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-KNQBAOMV.js";import{a as p}from"./chunk-FD2TR343.js";import{a as s}from"./chunk-ZE2KAVXW.js";import{a as t}from"./chunk-WYADYDPN.js";import{a as e}from"./chunk-NZJGC6ZW.js";import{d as r}from"./chunk-ZNK6AH2G.js";var n=["1","2","3","4","5","6","7","8","9"],i=["auto","always","hover","none"],D={...e,size:{type:"enum",className:"rt-r-size",values:n,responsive:!0},...p,...o,...s,...t,underline:{type:"enum",className:"rt-underline",values:i,default:"auto"},...r};export{D as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7FKKGUHK.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-72AHPGPN.js";import{a as u}from"./chunk-MJJ7XDIP.js";import{b,c as d}from"./chunk-SEY4NA45.js";import{a as C}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-72AHPGPN.js";import{a as u}from"./chunk-MJJ7XDIP.js";import{b,c as d}from"./chunk-SEY4NA45.js";import{a as C}from"./chunk-UBSLEGQZ.js";import{a as w}from"./chunk-OS3FCYZY.js";var j={};w(j,{Anchor:()=>M,Close:()=>N,Content:()=>x,Root:()=>E,Toolbar:()=>I,Trigger:()=>L});import*as e from"react";import v from"classnames";import{Popover as c}from"radix-ui";var h=e.createContext(null),y=t=>{let o=e.useContext(h);return o},E=t=>e.createElement(c.Root,{...t});E.displayName="Popover.Root";var L=e.forwardRef(({children:t,...o},r)=>e.createElement(c.Trigger,{...o,ref:r,asChild:!0},u(t)));L.displayName="Popover.Trigger";var x=e.forwardRef((t,o)=>{let r=b(),p=t.panelBackground??r.panelBackground,{className:n,forceMount:s,container:a,panelBackground:i,...f}=C(t,g),l=e.useRef(null),R=e.useCallback(P=>{l.current=P,typeof o=="function"?o(P):o&&(o.current=P)},[o]),[S,k]=e.useState(void 0),T=e.useCallback(P=>{let m=l.current;m&&(P>0?(m.style.setProperty("--popover-toolbar-offset",`${P}px`),m.setAttribute("data-has-toolbar","true")):(m.style.removeProperty("--popover-toolbar-offset"),m.removeAttribute("data-has-toolbar")))},[]);return e.createElement(c.Portal,{container:a,forceMount:s},e.createElement(d,{asChild:!0},e.createElement(c.Content,{align:"start",sideOffset:8,collisionPadding:10,...f,ref:R,"aria-labelledby":S,"data-panel-background":p,className:v("rt-PopperContent","rt-PopoverContent",n)},e.createElement(h.Provider,{value:e.useMemo(()=>({contentRef:l,setToolbarOffset:T,setLabelId:k}),[T])},t.children))))});x.displayName="Popover.Content";var N=e.forwardRef(({children:t,...o},r)=>e.createElement(c.Close,{...o,ref:r,asChild:!0},u(t)));N.displayName="Popover.Close";var M=e.forwardRef(({children:t,...o},r)=>e.createElement(c.Anchor,{...o,ref:r}));M.displayName="Popover.Anchor";var A=e.forwardRef(({className:t,children:o,...r},p)=>{let n=y("Popover.Toolbar"),s=e.useRef(null),a=e.useCallback(i=>{s.current=i,typeof p=="function"?p(i):p&&(p.current=i)},[p]);return e.useEffect(()=>{if(!n||!s.current)return;let i=s.current,f=()=>{let R=i.getBoundingClientRect().height;n.setToolbarOffset(R)};f();let l=new ResizeObserver(f);return l.observe(i),()=>{l.disconnect(),n.setToolbarOffset(0)}},[n]),e.createElement("div",{...r,ref:a,className:v("rt-PopoverToolbar",t)},o)});A.displayName="Popover.Toolbar";var D=e.forwardRef(({className:t,...o},r)=>e.createElement("div",{...o,ref:r,className:v("rt-PopoverToolbarSection","rt-PopoverToolbarLeft",t)}));D.displayName="Popover.Toolbar.Left";var H=e.forwardRef(({className:t,...o},r)=>e.createElement("div",{...o,ref:r,className:v("rt-PopoverToolbarSection","rt-PopoverToolbarCenter",t)}));H.displayName="Popover.Toolbar.Center";var O=e.forwardRef(({className:t,...o},r)=>e.createElement("div",{...o,ref:r,className:v("rt-PopoverToolbarSection","rt-PopoverToolbarRight",t)}));O.displayName="Popover.Toolbar.Right";var W=e.forwardRef(({className:t,id:o,...r},p)=>{let n=y("Popover.Toolbar.Title"),s=e.useId(),a=o??`rt-popover-toolbar-title-${s}`;return e.useEffect(()=>(n?.setLabelId(a),()=>n?.setLabelId(void 0)),[n,a]),e.createElement("span",{...r,id:a,ref:p,className:v("rt-PopoverToolbarTitle",t)})});W.displayName="Popover.Toolbar.Title";var I=Object.assign(A,{Left:D,Center:H,Right:O,Title:W});export{E as a,L as b,x as c,N as d,M as e,I as f,j as g};
|
|
2
|
+
//# sourceMappingURL=chunk-7NYODT3Z.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-JDWCQ2XP.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-7PMMYHZV.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as s}from"./chunk-YA5DF67M.js";import*as r from"react";function l(e){return typeof e=="object"&&e!==null}function p(e,n){let t={},o=null;for(let i of s){if(e!==void 0&&!l(e)){t[i]=e;continue}let a=l(e)?e[i]:void 0;a!==void 0&&(o={value:a}),t[i]=o?o.value:n(i)}return t}function d(e){let n=e.initial;return s.every(t=>e[t]===n)?n:void 0}function h(e,n){let t=d(n);if(t!==void 0)return{[`data-${e}`]:t};let o={};for(let i of s)o[`data-${e}-${i}`]=n[i];return o}function P(e){return typeof e=="object"&&e!==null?JSON.stringify(e):String(e)}var T=p("fixed",()=>"fixed");function g(){return{entries:new Map,listeners:new Set,version:0,peek:null}}function f(e){e.version+=1;for(let n of e.listeners)n()}function c(e,n){return e.listeners.add(n),()=>{e.listeners.delete(n)}}function R(e,n){e.peek!==n&&(e.peek=n,f(e))}var S=r.createContext(null);function y(e){let n=r.useContext(S);if(!n)throw new Error(`${e} must be used within <Shell.Root>`);return n}function I(e,n){let t=r.useCallback(i=>c(e,i),[e]),o=r.useCallback(()=>e.entries.get(n),[e,n]);return r.useSyncExternalStore(t,o,()=>{})}function k(e,n){let t=r.useCallback(o=>c(e,o),[e]);return r.useSyncExternalStore(t,()=>e.peek===n,()=>!1)}var b=r.createContext(null);function m(e,n){let t=r.useContext(b);if(!t)throw new Error("Shell panes must be used within <Shell.Root>");let{registerInset:o,unregisterInset:i}=t;r.useLayoutEffect(()=>{if(n)return o(e),()=>i(e)},[e,n,o,i])}var u=new Set;function v(e){}export{p as a,d as b,h as c,P as d,T as e,g as f,f as g,c as h,R as i,S as j,y as k,I as l,k as m,b as n,m as o,v as p};
|
|
2
|
+
//# sourceMappingURL=chunk-A2XVR7GL.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/_internal/shell-store.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client';\n\n/**\n * The Shell's state model (0.8.0), ported from kookie-ui-v2's Shell.\n *\n * - State lives on the pane. Each pane holds `auto | open | closed` (the\n * Sidebar adds `thin`). `auto` means untouched: the stylesheet decides what\n * it shows at each breakpoint, so first paint is right with no script, the\n * server and the client render the same markup, and no open-state callback\n * can fire on mount or on a resize.\n * - The one thing that crosses the Shell is a registry keyed by pane name.\n * Each pane registers what it is and how to drive it; a Trigger looks its\n * pane up, and the Root reads the set of live overlays. Nothing scans\n * children and nothing checks `displayName`.\n * - The responsive props are resolved into a table with one value per\n * breakpoint, from the props alone, with no window. The table is written to\n * the DOM as data attributes for the stylesheet, and read again in JS by the\n * mirror that sets `aria-expanded`. One table, two readers, so they agree by\n * construction.\n */\nimport * as React from 'react';\nimport { SHELL_BREAKPOINTS } from '../shell.types.js';\nimport type { Breakpoint, PaneName, PresentationValue } from '../shell.types.js';\n\n/* \u2500\u2500 Breakpoint tables \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport type Table<T> = Record<Breakpoint, T>;\n\n/** What a pane shows: open, open at its thin width (Sidebar only), or closed. */\nexport type PaneValue = 'open' | 'thin' | 'closed';\n\ntype ResponsiveInput<T> = T | Partial<Record<Breakpoint, T>> | undefined;\n\nfunction isMap<T>(value: ResponsiveInput<T>): value is Partial<Record<Breakpoint, T>> {\n return typeof value === 'object' && value !== null;\n}\n\n/**\n * A responsive value at every breakpoint. A breakpoint takes the largest key\n * at or below it, the same fallback `useResponsiveValue` used; a breakpoint\n * below every key takes `fallback`.\n */\nexport function tableOf<T>(value: ResponsiveInput<T>, fallback: (bp: Breakpoint) => T): Table<T> {\n const table = {} as Table<T>;\n let carried: { value: T } | null = null;\n for (const bp of SHELL_BREAKPOINTS) {\n if (value !== undefined && !isMap(value)) {\n table[bp] = value;\n continue;\n }\n const entry = isMap(value) ? value[bp] : undefined;\n if (entry !== undefined) carried = { value: entry };\n table[bp] = carried ? carried.value : fallback(bp);\n }\n return table;\n}\n\n/** The table's one value, when it has only one. */\nexport function constantOf<T>(table: Table<T>): T | undefined {\n const first = table.initial;\n return SHELL_BREAKPOINTS.every((bp) => table[bp] === first) ? first : undefined;\n}\n\n/**\n * The table as data attributes: `data-<name>` when it holds one value, one\n * `data-<name>-<bp>` per breakpoint when it holds several. The stylesheet has\n * a rule for each spelling.\n */\nexport function tableAttributes(name: string, table: Table<string>): Record<string, string> {\n const constant = constantOf(table);\n if (constant !== undefined) return { [`data-${name}`]: constant };\n const attributes: Record<string, string> = {};\n for (const bp of SHELL_BREAKPOINTS) attributes[`data-${name}-${bp}`] = table[bp];\n return attributes;\n}\n\n/**\n * A responsive prop object is usually an inline literal, a new identity every\n * render. Keying memoisation on its contents keeps the tables, and so the\n * registry entries, stable across renders that change nothing.\n */\nexport function useStableKey(value: unknown): string {\n return typeof value === 'object' && value !== null ? JSON.stringify(value) : String(value);\n}\n\nexport const FIXED_TABLE: Table<PresentationValue> = tableOf<PresentationValue>('fixed', () => 'fixed');\n\n/* \u2500\u2500 The registry \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport type OpenChangeReason = 'toggle' | 'dismiss';\n\nexport type PaneEntry = {\n name: PaneName;\n id: string;\n el: HTMLElement | null;\n /** What the pane shows now; `undefined` while an untouched pane cannot know (before the breakpoint is known). */\n value: PaneValue | undefined;\n /** How the pane is presented now, when known. */\n presentation: PresentationValue | undefined;\n /** The pane's own presentation at every breakpoint. A Panel with none of its own follows the Rail's. */\n presentationTable: Table<PresentationValue>;\n /** Open and presented as an overlay: what the scrim and Escape close, and what containment exempts. */\n overlayLive: boolean;\n /** The pane's designed open width, for panes that sit beside it when floating. */\n size: number;\n setValue: (value: PaneValue, reason: OpenChangeReason) => void;\n toggle: (reason: OpenChangeReason) => void;\n};\n\nexport type ShellStore = {\n entries: Map<PaneName, PaneEntry>;\n listeners: Set<() => void>;\n /**\n * What a subscriber reads. useSyncExternalStore needs a value that is stable\n * between notifications, and a number is; the Map, or anything derived from\n * it, would be a new identity on every read.\n */\n version: number;\n /** The pane a hovered Trigger is previewing, if any. Layout only. */\n peek: PaneName | null;\n};\n\nexport function createShellStore(): ShellStore {\n return { entries: new Map(), listeners: new Set(), version: 0, peek: null };\n}\n\nexport function notifyShellStore(store: ShellStore) {\n store.version += 1;\n for (const listener of store.listeners) listener();\n}\n\nexport function subscribeShellStore(store: ShellStore, listener: () => void) {\n store.listeners.add(listener);\n return () => {\n store.listeners.delete(listener);\n };\n}\n\nexport function setShellPeek(store: ShellStore, peek: PaneName | null) {\n if (store.peek === peek) return;\n store.peek = peek;\n notifyShellStore(store);\n}\n\nexport const ShellStoreContext = React.createContext<ShellStore | null>(null);\n\nexport function useShellStore(part: string): ShellStore {\n const store = React.useContext(ShellStoreContext);\n if (!store) throw new Error(`${part} must be used within <Shell.Root>`);\n return store;\n}\n\n/** One pane's registry entry. Re-renders only when that entry is replaced. */\nexport function usePaneEntry(store: ShellStore, name: PaneName): PaneEntry | undefined {\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n const getSnapshot = React.useCallback(() => store.entries.get(name), [store, name]);\n return React.useSyncExternalStore(subscribe, getSnapshot, () => undefined);\n}\n\n/**\n * Whether this pane is the one being previewed. A boolean per pane rather than\n * the peek target itself, so hovering one Trigger re-renders one pane, not all.\n */\nexport function usePeeking(store: ShellStore, name: PaneName): boolean {\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n return React.useSyncExternalStore(\n subscribe,\n () => store.peek === name,\n () => false,\n );\n}\n\n/* \u2500\u2500 Inset \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport type InsetPaneId = 'rail' | 'panel' | 'sidebar' | 'content' | 'inspector' | 'bottom';\n\nexport const ShellInsetContext = React.createContext<{\n registerInset: (id: InsetPaneId) => void;\n unregisterInset: (id: InsetPaneId) => void;\n} | null>(null);\n\n/** Registers a pane's `inset` with the Root, which paints the backdrop while any pane is inset. */\nexport function useInsetRegistration(id: InsetPaneId, inset: boolean | undefined) {\n const ctx = React.useContext(ShellInsetContext);\n if (!ctx) throw new Error('Shell panes must be used within <Shell.Root>');\n const { registerInset, unregisterInset } = ctx;\n React.useLayoutEffect(() => {\n if (!inset) return;\n registerInset(id);\n return () => unregisterInset(id);\n }, [id, inset, registerInset, unregisterInset]);\n}\n\n/* \u2500\u2500 Development warnings \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nconst warned = new Set<string>();\n\n/** A deprecation warning, once per message per page load. Development only. */\nexport function warnOnce(message: string) {\n if (process.env.NODE_ENV === 'production') return;\n if (warned.has(message)) return;\n warned.add(message);\n console.warn(`[kookie-ui] ${message}`);\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["React", "isMap", "value", "tableOf", "fallback", "table", "carried", "bp", "SHELL_BREAKPOINTS", "entry", "constantOf", "first", "tableAttributes", "name", "constant", "attributes", "useStableKey", "FIXED_TABLE", "createShellStore", "notifyShellStore", "store", "listener", "subscribeShellStore", "setShellPeek", "peek", "ShellStoreContext", "useShellStore", "part", "usePaneEntry", "subscribe", "getSnapshot", "usePeeking", "ShellInsetContext", "useInsetRegistration", "id", "inset", "ctx", "registerInset", "unregisterInset", "warned", "warnOnce", "message"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{h as p,i as b,k as M}from"./chunk-A2XVR7GL.js";import{b as P}from"./chunk-3XSB7YIM.js";import*as o from"react";var S=e=>e===void 0?void 0:e==="closed"?"collapsed":e==="thin"?"thin":"expanded",f=e=>e==="collapsed"?"closed":e==="thin"?"thin":"open",s=e=>e===void 0||e==="closed"?"collapsed":"expanded",l=e=>e==="left"?"rail":e;function m(e){let d=o.useCallback(r=>p(e,r),[e]);return o.useSyncExternalStore(d,()=>e.version,()=>0)}function V(){let e=M("useSidebarMode"),d=o.useCallback(t=>p(e,t),[e]),r=o.useSyncExternalStore(d,()=>e.entries.get("sidebar")?.value,()=>{}),i=o.useCallback(t=>{e.entries.get("sidebar")?.setValue(f(t),"toggle")},[e]);return{sidebarMode:S(r)??"expanded",setSidebarMode:i}}var g=()=>{};function x(){let e=M("useShell");o.useEffect(()=>{},[]),m(e);let{breakpoint:d,ready:r}=P(),i=o.useMemo(()=>{let n=a=>h=>e.entries.get(a)?.setValue(h==="collapsed"?"closed":"open","toggle"),u=a=>b(e,a===null?null:l(a));return{setLeftMode:n("rail"),setPanelMode:n("panel"),setInspectorMode:n("inspector"),setBottomMode:n("bottom"),setSidebarMode:a=>e.entries.get("sidebar")?.setValue(f(a),"toggle"),setPeekTarget:u,peekPane:a=>u(a),clearPeek:()=>u(null),setHasLeft:g,setHasSidebar:g,togglePane:a=>e.entries.get(l(a))?.toggle("toggle"),expandPane:a=>e.entries.get(l(a))?.setValue("open","toggle"),collapsePane:a=>e.entries.get(l(a))?.setValue("closed","toggle")}},[e]),t=n=>e.entries.get(n)?.value,c=e.entries.get("rail");return{leftMode:s(t("rail")),leftControlledOpen:c?.value===void 0?void 0:c.value!=="closed",panelMode:s(t("panel")),sidebarMode:S(t("sidebar"))??"expanded",inspectorMode:s(t("inspector")),bottomMode:s(t("bottom")),peekTarget:e.peek,hasLeft:e.entries.has("rail"),hasSidebar:e.entries.has("sidebar"),currentBreakpoint:d,currentBreakpointReady:r,leftResolvedPresentation:c?.presentation,...i}}export{V as a,x as b};
|
|
2
|
+
//# sourceMappingURL=chunk-ADXZNG4F.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/shell.context.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client';\n\n/**\n * Since 0.8.0 the Shell has two contexts: the pane registry (the store) and\n * the inset set. They live in `_internal/shell-store.tsx`. This module keeps\n * the two hooks consumers can reach: `useSidebarMode`, and the deprecated\n * `useShell`.\n */\nimport * as React from 'react';\nimport { useBreakpoint } from '../hooks/use-breakpoint.js';\nimport type { Breakpoint, PaneMode, PaneName, PaneTarget, PresentationValue, SidebarMode } from './shell.types.js';\nimport { setShellPeek, subscribeShellStore, useShellStore, warnOnce, type PaneValue, type ShellStore } from './_internal/shell-store.js';\n\nconst toSidebarMode = (value: PaneValue | undefined): SidebarMode | undefined => (value === undefined ? undefined : value === 'closed' ? 'collapsed' : value === 'thin' ? 'thin' : 'expanded');\n\nconst fromSidebarMode = (mode: SidebarMode): PaneValue => (mode === 'collapsed' ? 'closed' : mode === 'thin' ? 'thin' : 'open');\n\nconst toPaneMode = (value: PaneValue | undefined): PaneMode => (value === undefined || value === 'closed' ? 'collapsed' : 'expanded');\n\nconst paneName = (target: PaneTarget): PaneName => (target === 'left' ? 'rail' : target);\n\n/** Re-renders on every change to the registry. For the deprecated whole-shell reader only. */\nfunction useStoreVersion(store: ShellStore) {\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n return React.useSyncExternalStore(\n subscribe,\n () => store.version,\n () => 0,\n );\n}\n\n/**\n * The Sidebar's mode, and a setter. The setter is a user action: it reports\n * through the Sidebar's `onStateChange` the way a Trigger does.\n */\nexport function useSidebarMode(): { sidebarMode: SidebarMode; setSidebarMode: (mode: SidebarMode) => void } {\n const store = useShellStore('useSidebarMode');\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n const value = React.useSyncExternalStore(\n subscribe,\n () => store.entries.get('sidebar')?.value,\n () => undefined,\n );\n const setSidebarMode = React.useCallback(\n (mode: SidebarMode) => {\n store.entries.get('sidebar')?.setValue(fromSidebarMode(mode), 'toggle');\n },\n [store],\n );\n return { sidebarMode: toSidebarMode(value) ?? 'expanded', setSidebarMode };\n}\n\nexport interface ShellContextValue {\n leftMode: PaneMode;\n setLeftMode: (mode: PaneMode) => void;\n /** The Rail's open state, resolved, when it is controlled. */\n leftControlledOpen?: boolean;\n panelMode: PaneMode;\n setPanelMode: (mode: PaneMode) => void;\n sidebarMode: SidebarMode;\n setSidebarMode: (mode: SidebarMode) => void;\n inspectorMode: PaneMode;\n setInspectorMode: (mode: PaneMode) => void;\n bottomMode: PaneMode;\n setBottomMode: (mode: PaneMode) => void;\n peekTarget: PaneTarget | null;\n setPeekTarget: (target: PaneTarget | null) => void;\n peekPane: (target: PaneTarget) => void;\n clearPeek: () => void;\n /** Whether a Rail is mounted. */\n hasLeft: boolean;\n /** No effect since 0.8.0: the registry knows which panes are mounted. */\n setHasLeft: (has: boolean) => void;\n /** Whether a Sidebar is mounted. */\n hasSidebar: boolean;\n /** No effect since 0.8.0: the registry knows which panes are mounted. */\n setHasSidebar: (has: boolean) => void;\n currentBreakpoint: Breakpoint;\n currentBreakpointReady: boolean;\n /** The Rail's presentation at the current breakpoint, when known. */\n leftResolvedPresentation?: PresentationValue;\n togglePane: (target: PaneTarget) => void;\n expandPane: (target: PaneTarget) => void;\n collapsePane: (target: PaneTarget) => void;\n}\n\nconst noop = () => {};\n\n/**\n * @deprecated The whole-shell reader re-renders its consumer on every change\n * to any pane. Use `Shell.Trigger` to drive a pane, `Shell.useSidebarMode`\n * for the Sidebar, and each pane's `open`/`onOpenChange` for its state.\n * Removed in 1.0.\n *\n * Keeps 0.7's shape. The setters act as a user would: they report through\n * the pane's own callback with `reason: 'toggle'`, and a controlled pane\n * changes only when the app passes the new value.\n */\nexport function useShell(): ShellContextValue {\n const store = useShellStore('useShell');\n React.useEffect(() => {\n warnOnce(\"Shell.useShell is deprecated and is removed in 1.0. Use Shell.Trigger, Shell.useSidebarMode, or a pane's own open/onOpenChange.\");\n }, []);\n useStoreVersion(store);\n const { breakpoint, ready } = useBreakpoint();\n const actions = React.useMemo(() => {\n const setMode = (name: PaneName) => (mode: PaneMode) => store.entries.get(name)?.setValue(mode === 'collapsed' ? 'closed' : 'open', 'toggle');\n const setPeekTarget = (target: PaneTarget | null) => setShellPeek(store, target === null ? null : paneName(target));\n return {\n setLeftMode: setMode('rail'),\n setPanelMode: setMode('panel'),\n setInspectorMode: setMode('inspector'),\n setBottomMode: setMode('bottom'),\n setSidebarMode: (mode: SidebarMode) => store.entries.get('sidebar')?.setValue(fromSidebarMode(mode), 'toggle'),\n setPeekTarget,\n peekPane: (target: PaneTarget) => setPeekTarget(target),\n clearPeek: () => setPeekTarget(null),\n setHasLeft: noop,\n setHasSidebar: noop,\n togglePane: (target: PaneTarget) => store.entries.get(paneName(target))?.toggle('toggle'),\n expandPane: (target: PaneTarget) => store.entries.get(paneName(target))?.setValue('open', 'toggle'),\n collapsePane: (target: PaneTarget) => store.entries.get(paneName(target))?.setValue('closed', 'toggle'),\n };\n }, [store]);\n const value = (name: PaneName) => store.entries.get(name)?.value;\n const rail = store.entries.get('rail');\n return {\n leftMode: toPaneMode(value('rail')),\n leftControlledOpen: rail?.value === undefined ? undefined : rail.value !== 'closed',\n panelMode: toPaneMode(value('panel')),\n sidebarMode: toSidebarMode(value('sidebar')) ?? 'expanded',\n inspectorMode: toPaneMode(value('inspector')),\n bottomMode: toPaneMode(value('bottom')),\n peekTarget: store.peek,\n hasLeft: store.entries.has('rail'),\n hasSidebar: store.entries.has('sidebar'),\n currentBreakpoint: breakpoint,\n currentBreakpointReady: ready,\n leftResolvedPresentation: rail?.presentation,\n ...actions,\n };\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["React", "toSidebarMode", "value", "fromSidebarMode", "mode", "toPaneMode", "paneName", "target", "useStoreVersion", "store", "subscribe", "listener", "subscribeShellStore", "useSidebarMode", "useShellStore", "setSidebarMode", "noop", "useShell", "breakpoint", "ready", "useBreakpoint", "actions", "setMode", "name", "setPeekTarget", "setShellPeek", "rail"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as g,d as i}from"./chunk-HCNO7PX6.js";import{a as S,b,c as R}from"./chunk-GMHA5CFH.js";import{o as C}from"./chunk-A2XVR7GL.js";import{a as v,b as y}from"./chunk-BZZXXZ3O.js";import{a as I}from"./chunk-HWQ3NTJP.js";import{a as l,c as x,e as O,g as E}from"./chunk-3J6AUDID.js";import{a as h}from"./chunk-3XSB7YIM.js";import*as e from"react";import re from"classnames";import{useComposedRefs as ae}from"radix-ui/internal";var ie={controlled:"open",default:"defaultOpen"},le={initial:"overlay",sm:"fixed"},T=e.forwardRef((N,M)=>{let{className:w,presentation:H=le,defaultOpen:U,open:A,onOpenChange:B,expandedSize:o=320,minSize:p=200,maxSize:d=500,resizable:c=!1,collapsible:V=!0,onExpand:k,onCollapse:L,onResize:_,onResizeStart:D,onResizeEnd:$,snapPoints:t,snapTolerance:q,collapseThreshold:s,paneId:r,persistence:a,children:F,style:W,onSizeChange:j,sizeUpdate:G,sizeUpdateMs:K=50,size:J,defaultSize:Q,inset:m,id:X,...u}=N,{table:f,attributes:Y}=R(H,"fixed"),n=S({name:"inspector",label:"Inspector",propNames:ie,id:X,controlled:l(A),defaultValue:l(U),presentationTable:f,builtIn:x,onChange:(te,se)=>B?.(te!=="closed",{reason:se}),onExpand:k,onCollapse:L,size:o});C("inspector",m),e.useEffect(()=>{(t!==void 0||s!==void 0||r!==void 0||a!==void 0)&&void 0},[t,s,r,a]);let P=e.useRef(null),Z=ae(M,n.setElement,P),ee=v({name:"inspector",elementId:n.id,elementRef:P,cssVarName:"--inspector-size",orientation:"vertical",edge:"start",growth:O,expandedSize:o,minSize:p,maxSize:d,resizable:c,collapsible:V,size:J,defaultSize:Q,onSizeChange:j,sizeUpdate:G,sizeUpdateMs:K,onResize:_,onResizeStart:D,onResizeEnd:$,snapPoints:t,snapTolerance:q,collapseThreshold:s,paneId:r,persistence:a,overlaying:n.overlaying,overlayingNow:()=>f[h()]==="overlay",requestCollapse:()=>n.setValue("closed","toggle"),requestToggle:()=>n.toggle("toggle")}),{handles:z,content:ne}=y(F,i),oe=c&&n.shown!==!1&&!n.overlaying?e.createElement(I.Provider,{value:ee},z.length>0?z:e.createElement(g,null)):null;return e.createElement("div",{...E(u),id:n.id,ref:Z,className:re("rt-ShellPane","rt-ShellInspector",w),...b(n,Y),"data-inset":m||void 0,tabIndex:n.overlaying?-1:u.tabIndex,style:{...W,"--inspector-expanded-size":`${o}px`,"--inspector-min-size":`${p}px`,"--inspector-max-size":`${d}px`}},e.createElement("div",{className:"rt-ShellInspectorContent"},ne),oe)});T.displayName="Shell.Inspector";T.Handle=i;export{T as a};
|
|
2
|
+
//# sourceMappingURL=chunk-AGNIFHOE.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/_internal/shell-inspector.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useComposedRefs } from 'radix-ui/internal';\nimport { PaneResizeContext } from './shell-resize.js';\nimport { InspectorHandle, PaneHandle } from './shell-handles.js';\nimport { usePane, paneAttributes, usePresentationTable } from './shell-pane.js';\nimport { splitHandles, useResizablePane, type SizeChangeMeta } from './shell-resizable.js';\nimport { useInsetRegistration, warnOnce } from './shell-store.js';\nimport { detailRest, endAnchoredGrowth, toPaneValue, withoutRemovedPaneProps } from './shell-rest.js';\nimport { readBreakpoint } from '../../hooks/use-breakpoint.js';\nimport type { Breakpoint, CSSPropertiesWithVars, PaneBaseProps } from '../shell.types.js';\n\ntype InspectorOpenChangeMeta = { reason: 'init' | 'toggle' | 'responsive' | 'dismiss' };\ntype InspectorControlledProps = { open: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: InspectorOpenChangeMeta) => void; defaultOpen?: never };\ntype InspectorUncontrolledProps = { defaultOpen?: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: InspectorOpenChangeMeta) => void; open?: never };\ntype InspectorSizeControlledProps = { size: number | string; defaultSize?: never };\ntype InspectorSizeUncontrolledProps = { defaultSize?: number | string; size?: never };\ntype InspectorPublicProps = PaneBaseProps &\n (InspectorControlledProps | InspectorUncontrolledProps) &\n (InspectorSizeControlledProps | InspectorSizeUncontrolledProps) & {\n onSizeChange?: (size: number, meta: SizeChangeMeta) => void;\n sizeUpdate?: 'throttle' | 'debounce';\n sizeUpdateMs?: number;\n /** When true, adds margin and triggers the gray backdrop on the Shell. */\n inset?: boolean;\n };\n\ntype InspectorComponent = React.ForwardRefExoticComponent<InspectorPublicProps & React.RefAttributes<HTMLDivElement>> & { Handle: typeof InspectorHandle };\n\nconst INSPECTOR_PROP_NAMES = { controlled: 'open', default: 'defaultOpen' };\n\n/** Since 0.8.0 the Inspector is in the frame from 768px up, the boundary kookie-ui-v2 uses everywhere. It was 1280px. */\nconst INSPECTOR_DEFAULT_PRESENTATION = { initial: 'overlay', sm: 'fixed' } as const;\n\nexport const Inspector = React.forwardRef<HTMLDivElement, InspectorPublicProps>((props, ref) => {\n const {\n className,\n presentation = INSPECTOR_DEFAULT_PRESENTATION,\n defaultOpen,\n open,\n onOpenChange,\n expandedSize = 320,\n minSize = 200,\n maxSize = 500,\n resizable = false,\n collapsible = true,\n onExpand,\n onCollapse,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n children,\n style,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs = 50,\n size,\n defaultSize,\n inset,\n id,\n ...domProps\n } = props;\n\n const { table, attributes } = usePresentationTable(presentation, 'fixed');\n const pane = usePane({\n name: 'inspector',\n label: 'Inspector',\n propNames: INSPECTOR_PROP_NAMES,\n id,\n controlled: toPaneValue(open),\n defaultValue: toPaneValue(defaultOpen),\n presentationTable: table,\n builtIn: detailRest,\n onChange: (value, reason) => onOpenChange?.(value !== 'closed', { reason }),\n onExpand,\n onCollapse,\n size: expandedSize,\n });\n useInsetRegistration('inspector', inset);\n\n React.useEffect(() => {\n if (snapPoints !== undefined || collapseThreshold !== undefined || paneId !== undefined || persistence !== undefined) {\n warnOnce('Shell.Inspector: `snapPoints`, `collapseThreshold`, `paneId` and `persistence` are deprecated and are removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`.');\n }\n }, [snapPoints, collapseThreshold, paneId, persistence]);\n\n const elementRef = React.useRef<HTMLElement | null>(null);\n const composedRef = useComposedRefs(ref, pane.setElement, elementRef);\n\n const resize = useResizablePane({\n name: 'inspector',\n elementId: pane.id,\n elementRef,\n cssVarName: '--inspector-size',\n orientation: 'vertical',\n edge: 'start',\n growth: endAnchoredGrowth,\n expandedSize,\n minSize,\n maxSize,\n resizable,\n collapsible,\n size,\n defaultSize,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n overlaying: pane.overlaying,\n overlayingNow: () => table[readBreakpoint()] === 'overlay',\n requestCollapse: () => pane.setValue('closed', 'toggle'),\n requestToggle: () => pane.toggle('toggle'),\n });\n\n const { handles, content } = splitHandles(children, InspectorHandle);\n const handle = resizable && pane.shown !== false && !pane.overlaying ? <PaneResizeContext.Provider value={resize}>{handles.length > 0 ? handles : <PaneHandle />}</PaneResizeContext.Provider> : null;\n\n return (\n <div\n {...withoutRemovedPaneProps(domProps)}\n id={pane.id}\n ref={composedRef}\n className={classNames('rt-ShellPane', 'rt-ShellInspector', className)}\n {...paneAttributes(pane, attributes)}\n data-inset={inset || undefined}\n tabIndex={pane.overlaying ? -1 : domProps.tabIndex}\n style={\n {\n ...style,\n '--inspector-expanded-size': `${expandedSize}px`,\n '--inspector-min-size': `${minSize}px`,\n '--inspector-max-size': `${maxSize}px`,\n } as CSSPropertiesWithVars\n }\n >\n <div className=\"rt-ShellInspectorContent\">{content}</div>\n {handle}\n </div>\n );\n}) as InspectorComponent;\n\nInspector.displayName = 'Shell.Inspector';\nInspector.Handle = InspectorHandle;\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["React", "classNames", "useComposedRefs", "INSPECTOR_PROP_NAMES", "INSPECTOR_DEFAULT_PRESENTATION", "Inspector", "props", "ref", "className", "presentation", "defaultOpen", "open", "onOpenChange", "expandedSize", "minSize", "maxSize", "resizable", "collapsible", "onExpand", "onCollapse", "onResize", "onResizeStart", "onResizeEnd", "snapPoints", "snapTolerance", "collapseThreshold", "paneId", "persistence", "children", "style", "onSizeChange", "sizeUpdate", "sizeUpdateMs", "size", "defaultSize", "inset", "id", "domProps", "table", "attributes", "usePresentationTable", "pane", "usePane", "toPaneValue", "detailRest", "value", "reason", "useInsetRegistration", "elementRef", "composedRef", "useComposedRefs", "resize", "useResizablePane", "endAnchoredGrowth", "readBreakpoint", "handles", "content", "splitHandles", "InspectorHandle", "handle", "PaneResizeContext", "PaneHandle", "withoutRemovedPaneProps", "classNames", "paneAttributes"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-AF6XKU3W.js";import{a as e}from"./chunk-GSTOGDAJ.js";import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-AF6XKU3W.js";import{a as e}from"./chunk-GSTOGDAJ.js";import{a as r}from"./chunk-UBSLEGQZ.js";import*as t from"react";import l from"classnames";import{Switch as p}from"radix-ui";var w=t.forwardRef((s,a)=>{let{className:c,color:m,panelBackground:f,material:h,...n}=r(s,i,e),o=h||f;return t.createElement(p.Root,{"data-accent-color":m,"data-panel-background":o,"data-material":o,...n,asChild:!1,ref:a,className:l("rt-reset","rt-SwitchRoot",c)},t.createElement(p.Thumb,{className:"rt-SwitchThumb"}))});w.displayName="Switch";export{w as a};
|
|
2
|
+
//# sourceMappingURL=chunk-AIHQ3MVK.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-GSTOGDAJ.js";import{a}from"./chunk-E23RKOQJ.js";import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-GSTOGDAJ.js";import{a}from"./chunk-E23RKOQJ.js";import{a as i}from"./chunk-PBFSBHBS.js";var l=n.m.values,f=new Set(l),p=[{key:"m",className:"rt-r-m",customProperties:["--margin"]},{key:"mx",className:"rt-r-mx",customProperties:["--margin-left","--margin-right"]},{key:"my",className:"rt-r-my",customProperties:["--margin-top","--margin-bottom"]},{key:"mt",className:"rt-r-mt",customProperties:["--margin-top"]},{key:"mr",className:"rt-r-mr",customProperties:["--margin-right"]},{key:"mb",className:"rt-r-mb",customProperties:["--margin-bottom"]},{key:"ml",className:"rt-r-ml",customProperties:["--margin-left"]}];function S(g){let e,r;for(let t=0;t<p.length;t++){let{key:c,className:u,customProperties:y}=p[t],s=g[c];if(s===void 0)continue;let[o,m]=i({className:u,customProperties:y,propValues:l,propValueSet:f,value:s});o&&(e??(e=[])).push(o),m&&(r=a(r,m))}return[e!==void 0?e.join(" "):"",r]}export{S as a};
|
|
2
|
+
//# sourceMappingURL=chunk-AO32NT75.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as q}from"./chunk-2LYX5S7H.js";import*as e from"react";var C=(n,o,c)=>Math.max(o??n,Math.min(c??n,n));function L(n){let{name:o,elementRef:c,cssVarName:f,orientation:m,minSize:a,maxSize:u,resizable:E,size:h,defaultSize:x,paneId:g,persistence:S}=n,i=e.useRef(n);e.useLayoutEffect(()=>{i.current=n});let z=e.useRef(null),P=e.useRef(0);e.useEffect(()=>()=>{z.current&&clearTimeout(z.current)},[]);let b=e.useCallback((t,r)=>{let{onSizeChange:s,sizeUpdate:l,sizeUpdateMs:p}=i.current;if(s){if(l==="debounce"){z.current&&clearTimeout(z.current),z.current=setTimeout(()=>{z.current=null,i.current.onSizeChange?.(t,r)},p);return}if(l==="throttle"){let V=Date.now();if(V-P.current<p)return;P.current=V}s(t,r)}},[]),y=e.useCallback(t=>q(t,m==="vertical"?"horizontal":"vertical"),[m]),w=e.useRef(!1),d=e.useCallback((t,r)=>{let s=c.current;if(s){s.style.setProperty(f,`${t}px`);for(let l of s.querySelectorAll(":scope > .rt-ShellResizer"))l.setAttribute("aria-valuenow",String(Math.round(t)));r&&(w.current=!0)}},[c,f]);e.useLayoutEffect(()=>{w.current||d(n.expandedSize,!1)},[n.expandedSize,d]),e.useLayoutEffect(()=>{if(h!==void 0||x===void 0)return;let t=y(x);if(typeof t!="number"||!Number.isFinite(t))return;let r=C(t,a,u);d(r,!0),b(r,{reason:"init"})},[]),e.useLayoutEffect(()=>{if(h===void 0||i.current.overlayingNow())return;let t=y(h);if(typeof t!="number"||!Number.isFinite(t))return;let r=C(t,a,u);d(r,!0),b(r,{reason:"controlled"})},[h,a,u,n.overlaying,y,d,b]);let R=e.useMemo(()=>{if(!g||S)return S;let t=`kookie-ui:shell:${o}:${g}`;return{load:()=>{if(!(typeof window>"u"))try{let r=window.localStorage.getItem(t);return r?Number(r):void 0}catch{return}},save:r=>{if(!(typeof window>"u"))try{window.localStorage.setItem(t,String(r))}catch{}}}},[o,g,S]);e.useLayoutEffect(()=>{if(!E||!R?.load||i.current.overlayingNow())return;let t=!0,r=l=>{if(!t||typeof l!="number"||!Number.isFinite(l))return;let p=C(l,a,u);d(p,!0),i.current.onResize?.(p)},s=R.load();return s instanceof Promise?s.then(r).catch(l=>{}):r(s),()=>{t=!1}},[E,R,n.overlaying,d,a,u,o]);let T=e.useCallback(t=>i.current.onResize?.(t),[]),N=e.useCallback(t=>{w.current=!0,i.current.onResizeStart?.(t)},[]),v=e.useCallback(t=>{i.current.onResizeEnd?.(t),b(t,{reason:"resize"}),R?.save?.(t)},[b,R]),k=e.useCallback(()=>i.current.requestCollapse(),[]),M=e.useCallback(()=>i.current.requestToggle(),[]);return e.useMemo(()=>({containerRef:c,controls:n.elementId,cssVarName:f,minSize:a,maxSize:u,defaultSize:n.expandedSize,orientation:m,edge:n.edge,growth:n.growth,onResize:T,onResizeStart:N,onResizeEnd:v,target:o,collapsible:n.collapsible,snapPoints:n.snapPoints,snapTolerance:n.snapTolerance??8,collapseThreshold:n.collapseThreshold,requestCollapse:k,requestToggle:M}),[c,n.elementId,f,a,u,n.expandedSize,m,n.edge,n.growth,T,N,v,o,n.collapsible,n.snapPoints,n.snapTolerance,n.collapseThreshold,k,M])}function O(n,o){let c=e.Children.toArray(n),f=c.filter(a=>e.isValidElement(a)&&a.type===o),m=c.filter(a=>!(e.isValidElement(a)&&a.type===o));return{handles:f,content:m}}export{L as a,O as b};
|
|
2
|
+
//# sourceMappingURL=chunk-BZZXXZ3O.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/_internal/shell-resizable.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport { normalizeToPx } from '../../helpers/normalize-to-px.js';\nimport type { PaneName, PaneSizePersistence } from '../shell.types.js';\nimport type { PaneResizeContextValue } from './shell-resize.js';\n\nexport type SizeChangeMeta = { reason: 'init' | 'resize' | 'controlled' };\n\nexport type ResizableOptions = {\n name: PaneName;\n /** The pane's element id, which the handle names in `aria-controls`. */\n elementId: string;\n elementRef: React.RefObject<HTMLElement | null>;\n cssVarName: string;\n orientation: 'vertical' | 'horizontal';\n edge: 'start' | 'end';\n growth: (isRtl: boolean) => 1 | -1;\n expandedSize: number;\n minSize: number;\n maxSize: number;\n resizable: boolean;\n collapsible: boolean;\n size: number | string | undefined;\n defaultSize: number | string | undefined;\n onSizeChange: ((size: number, meta: SizeChangeMeta) => void) | undefined;\n sizeUpdate: 'throttle' | 'debounce' | undefined;\n sizeUpdateMs: number;\n onResize: ((size: number) => void) | undefined;\n onResizeStart: ((size: number) => void) | undefined;\n onResizeEnd: ((size: number) => void) | undefined;\n snapPoints: number[] | undefined;\n snapTolerance: number | undefined;\n collapseThreshold: number | undefined;\n paneId: string | undefined;\n persistence: PaneSizePersistence | undefined;\n /** Whether the pane is presented as an overlay right now. An overlay keeps its designed size and persists nothing. */\n overlaying: boolean;\n /** The same question asked at effect time, for a pane whose presentation is learnt after its first render. */\n overlayingNow: () => boolean;\n requestCollapse: () => void;\n requestToggle: () => void;\n};\n\n/**\n * Clamps to [min, max]. When the two cross (an app passing a maximum computed\n * from a narrow window below its fixed minimum), the minimum wins, as it did\n * in 0.7.\n */\nconst clampTo = (value: number, min: number | undefined, max: number | undefined) => Math.max(min ?? value, Math.min(max ?? value, value));\n\n/** Everything a resizable pane shares: size props, persistence, and the handle's context. */\nexport function useResizablePane(options: ResizableOptions): PaneResizeContextValue {\n const { name, elementRef, cssVarName, orientation, minSize, maxSize, resizable, size, defaultSize, paneId, persistence } = options;\n\n // The latest callbacks, so the size emitter does not change identity when a\n // consumer passes an inline function. A controlled `size` is reported again\n // only when the size, the minimum or the maximum changes.\n const latest = React.useRef(options);\n React.useLayoutEffect(() => {\n latest.current = options;\n });\n\n const debounceRef = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n const throttleRef = React.useRef(0);\n React.useEffect(\n () => () => {\n if (debounceRef.current) clearTimeout(debounceRef.current);\n },\n [],\n );\n const emitSizeChange = React.useCallback((value: number, meta: SizeChangeMeta) => {\n const { onSizeChange, sizeUpdate, sizeUpdateMs } = latest.current;\n if (!onSizeChange) return;\n if (sizeUpdate === 'debounce') {\n if (debounceRef.current) clearTimeout(debounceRef.current);\n debounceRef.current = setTimeout(() => {\n debounceRef.current = null;\n latest.current.onSizeChange?.(value, meta);\n }, sizeUpdateMs);\n return;\n }\n if (sizeUpdate === 'throttle') {\n const now = Date.now();\n if (now - throttleRef.current < sizeUpdateMs) return;\n throttleRef.current = now;\n }\n onSizeChange(value, meta);\n }, []);\n\n const toPx = React.useCallback((value: number | string | undefined) => normalizeToPx(value, orientation === 'vertical' ? 'horizontal' : 'vertical'), [orientation]);\n\n /**\n * The one way a size reaches the pane: the size variable, and the value\n * every handle of this pane announces. Once anything but `expandedSize` has\n * written a size (a default, a controlled value, a persisted value or a\n * resize), the pane owns that size and a new `expandedSize` leaves it alone.\n */\n const ownedRef = React.useRef(false);\n const writeSize = React.useCallback(\n (value: number, own: boolean) => {\n const el = elementRef.current;\n if (!el) return;\n el.style.setProperty(cssVarName, `${value}px`);\n for (const handle of el.querySelectorAll(':scope > .rt-ShellResizer')) handle.setAttribute('aria-valuenow', String(Math.round(value)));\n if (own) ownedRef.current = true;\n },\n [elementRef, cssVarName],\n );\n\n // expandedSize: the size until something else sets one. Declared first, so\n // the effects below win on mount.\n React.useLayoutEffect(() => {\n if (!ownedRef.current) writeSize(options.expandedSize, false);\n }, [options.expandedSize, writeSize]);\n\n // defaultSize: applied once, on mount.\n React.useLayoutEffect(() => {\n if (size !== undefined || defaultSize === undefined) return;\n const px = toPx(defaultSize);\n if (typeof px !== 'number' || !Number.isFinite(px)) return;\n const clamped = clampTo(px, minSize, maxSize);\n writeSize(clamped, true);\n emitSizeChange(clamped, { reason: 'init' });\n // An uncontrolled initial value: applied on mount and never re-applied.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // Controlled size. A drag stands until the app passes a different value.\n // Not while the pane is an overlay: an overlay keeps its designed size, and\n // an app's frame-sized limits (a maximum taken from the window) would\n // otherwise squeeze the drawer and report the squeezed size back. The size\n // is applied again when the pane returns to the frame.\n React.useLayoutEffect(() => {\n if (size === undefined || latest.current.overlayingNow()) return;\n const px = toPx(size);\n if (typeof px !== 'number' || !Number.isFinite(px)) return;\n const clamped = clampTo(px, minSize, maxSize);\n writeSize(clamped, true);\n emitSizeChange(clamped, { reason: 'controlled' });\n }, [size, minSize, maxSize, options.overlaying, toPx, writeSize, emitSizeChange]);\n\n // A persistence adapter from `paneId` when none is given.\n const adapter = React.useMemo<PaneSizePersistence | undefined>(() => {\n if (!paneId || persistence) return persistence;\n const key = `kookie-ui:shell:${name}:${paneId}`;\n return {\n load: () => {\n if (typeof window === 'undefined') return undefined;\n try {\n const stored = window.localStorage.getItem(key);\n return stored ? Number(stored) : undefined;\n } catch (err) {\n if (process.env.NODE_ENV !== 'production') console.warn(`Shell.${name}: failed to load persisted size`, err);\n return undefined;\n }\n },\n save: (value: number) => {\n if (typeof window === 'undefined') return;\n try {\n window.localStorage.setItem(key, String(value));\n } catch (err) {\n if (process.env.NODE_ENV !== 'production') console.warn(`Shell.${name}: failed to save persisted size`, err);\n }\n },\n };\n }, [name, paneId, persistence]);\n\n // Persisted size, loaded in a layout effect and clamped, so a reload does\n // not paint the default and then jump. Only where the pane is in the frame:\n // an overlay keeps its designed size.\n React.useLayoutEffect(() => {\n if (!resizable || !adapter?.load || latest.current.overlayingNow()) return undefined;\n let mounted = true;\n const apply = (value: number | undefined) => {\n if (!mounted || typeof value !== 'number' || !Number.isFinite(value)) return;\n const clamped = clampTo(value, minSize, maxSize);\n writeSize(clamped, true);\n latest.current.onResize?.(clamped);\n };\n const loaded = adapter.load();\n if (loaded instanceof Promise) {\n loaded.then(apply).catch((err) => {\n if (process.env.NODE_ENV !== 'production') console.warn(`Shell.${name}: failed to load persisted size`, err);\n });\n } else {\n apply(loaded);\n }\n return () => {\n mounted = false;\n };\n }, [resizable, adapter, options.overlaying, writeSize, minSize, maxSize, name]);\n\n const onResize = React.useCallback((value: number) => latest.current.onResize?.(value), []);\n const onResizeStart = React.useCallback((value: number) => {\n // A resize makes the size the user's: a new expandedSize no longer moves it.\n ownedRef.current = true;\n latest.current.onResizeStart?.(value);\n }, []);\n const onResizeEnd = React.useCallback(\n (value: number) => {\n latest.current.onResizeEnd?.(value);\n emitSizeChange(value, { reason: 'resize' });\n adapter?.save?.(value);\n },\n [emitSizeChange, adapter],\n );\n const requestCollapse = React.useCallback(() => latest.current.requestCollapse(), []);\n const requestToggle = React.useCallback(() => latest.current.requestToggle(), []);\n\n return React.useMemo(\n () => ({\n containerRef: elementRef,\n controls: options.elementId,\n cssVarName,\n minSize,\n maxSize,\n defaultSize: options.expandedSize,\n orientation,\n edge: options.edge,\n growth: options.growth,\n onResize,\n onResizeStart,\n onResizeEnd,\n target: name,\n collapsible: options.collapsible,\n snapPoints: options.snapPoints,\n snapTolerance: options.snapTolerance ?? 8,\n collapseThreshold: options.collapseThreshold,\n requestCollapse,\n requestToggle,\n }),\n [\n elementRef,\n options.elementId,\n cssVarName,\n minSize,\n maxSize,\n options.expandedSize,\n orientation,\n options.edge,\n options.growth,\n onResize,\n onResizeStart,\n onResizeEnd,\n name,\n options.collapsible,\n options.snapPoints,\n options.snapTolerance,\n options.collapseThreshold,\n requestCollapse,\n requestToggle,\n ],\n );\n}\n\n/** Splits a pane's children into its handles and the rest. */\nexport function splitHandles(children: React.ReactNode, handleType: React.ElementType) {\n const all = React.Children.toArray(children);\n const handles = all.filter((el) => React.isValidElement(el) && el.type === handleType) as React.ReactElement[];\n const content = all.filter((el) => !(React.isValidElement(el) && el.type === handleType));\n return { handles, content };\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["React", "clampTo", "value", "min", "max", "useResizablePane", "options", "name", "elementRef", "cssVarName", "orientation", "minSize", "maxSize", "resizable", "size", "defaultSize", "paneId", "persistence", "latest", "debounceRef", "throttleRef", "emitSizeChange", "meta", "onSizeChange", "sizeUpdate", "sizeUpdateMs", "now", "toPx", "normalizeToPx", "ownedRef", "writeSize", "own", "el", "handle", "px", "clamped", "adapter", "key", "stored", "mounted", "apply", "loaded", "err", "onResize", "onResizeStart", "onResizeEnd", "requestCollapse", "requestToggle", "splitHandles", "children", "handleType", "all", "handles", "content"]
|
|
7
|
+
}
|