@womp/kookie-ui 0.26.1 → 0.26.3
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/components.css +50 -2
- package/dist/cjs/components/_internal/base-button.d.ts.map +1 -1
- package/dist/cjs/components/_internal/base-button.js +1 -1
- package/dist/cjs/components/_internal/base-button.js.map +3 -3
- package/dist/cjs/components/_internal/base-button.props.js +0 -1
- package/dist/cjs/components/_internal/base-button.props.js.map +1 -1
- package/dist/cjs/components/_internal/base-checkbox.props.js +0 -1
- package/dist/cjs/components/_internal/base-checkbox.props.js.map +1 -1
- package/dist/cjs/components/_internal/base-menu.props.js +0 -1
- package/dist/cjs/components/_internal/base-menu.props.js.map +1 -1
- package/dist/cjs/components/_internal/base-radio.props.js +0 -1
- package/dist/cjs/components/_internal/base-radio.props.js.map +1 -1
- package/dist/cjs/components/_internal/base-tab-list.props.js +0 -1
- package/dist/cjs/components/_internal/base-tab-list.props.js.map +1 -1
- package/dist/cjs/components/_internal/pane-band-context.d.ts +15 -0
- package/dist/cjs/components/_internal/pane-band-context.d.ts.map +1 -0
- package/dist/cjs/components/_internal/pane-band-context.js +3 -0
- package/dist/cjs/components/_internal/pane-band-context.js.map +7 -0
- package/dist/cjs/components/_internal/pane-chrome.d.ts +1 -1
- package/dist/cjs/components/_internal/pane-chrome.d.ts.map +1 -1
- package/dist/cjs/components/_internal/pane-chrome.js +1 -1
- package/dist/cjs/components/_internal/pane-chrome.js.map +4 -4
- package/dist/cjs/components/_internal/portal-theme.d.ts +9 -0
- package/dist/cjs/components/_internal/portal-theme.d.ts.map +1 -0
- package/dist/cjs/components/_internal/portal-theme.js +3 -0
- package/dist/cjs/components/_internal/portal-theme.js.map +7 -0
- 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 +3 -3
- 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/accordion.props.js +0 -1
- package/dist/cjs/components/accordion.props.js.map +1 -1
- package/dist/cjs/components/alert-dialog.js +1 -1
- package/dist/cjs/components/alert-dialog.js.map +4 -4
- package/dist/cjs/components/alert-dialog.props.js +0 -1
- package/dist/cjs/components/alert-dialog.props.js.map +1 -1
- package/dist/cjs/components/avatar.props.js +0 -1
- package/dist/cjs/components/avatar.props.js.map +1 -1
- package/dist/cjs/components/blockquote.props.js +0 -1
- package/dist/cjs/components/blockquote.props.js.map +1 -1
- package/dist/cjs/components/box.props.js +0 -1
- package/dist/cjs/components/box.props.js.map +1 -1
- package/dist/cjs/components/button.js +1 -1
- package/dist/cjs/components/button.js.map +4 -4
- package/dist/cjs/components/button.props.js +0 -1
- package/dist/cjs/components/button.props.js.map +1 -1
- package/dist/cjs/components/card.props.js +0 -1
- package/dist/cjs/components/card.props.js.map +1 -1
- package/dist/cjs/components/chatbar.js +1 -1
- package/dist/cjs/components/chatbar.js.map +4 -4
- package/dist/cjs/components/checkbox-group.props.js +0 -1
- package/dist/cjs/components/checkbox-group.props.js.map +1 -1
- package/dist/cjs/components/checkbox.props.js +0 -1
- package/dist/cjs/components/checkbox.props.js.map +1 -1
- package/dist/cjs/components/chip.js +1 -1
- package/dist/cjs/components/chip.js.map +4 -4
- package/dist/cjs/components/chip.props.js +0 -1
- package/dist/cjs/components/chip.props.js.map +1 -1
- package/dist/cjs/components/code.props.js +0 -1
- package/dist/cjs/components/code.props.js.map +1 -1
- package/dist/cjs/components/combobox.d.ts.map +1 -1
- package/dist/cjs/components/combobox.js +1 -1
- package/dist/cjs/components/combobox.js.map +4 -4
- package/dist/cjs/components/combobox.props.js +0 -1
- package/dist/cjs/components/combobox.props.js.map +1 -1
- package/dist/cjs/components/context-menu.d.ts.map +1 -1
- package/dist/cjs/components/context-menu.js +1 -1
- package/dist/cjs/components/context-menu.js.map +4 -4
- package/dist/cjs/components/context-menu.props.js +0 -1
- package/dist/cjs/components/context-menu.props.js.map +1 -1
- package/dist/cjs/components/dialog.js +1 -1
- package/dist/cjs/components/dialog.js.map +4 -4
- package/dist/cjs/components/dialog.props.js +0 -1
- package/dist/cjs/components/dialog.props.js.map +1 -1
- package/dist/cjs/components/dropdown-menu.d.ts.map +1 -1
- package/dist/cjs/components/dropdown-menu.js +1 -1
- package/dist/cjs/components/dropdown-menu.js.map +4 -4
- package/dist/cjs/components/dropdown-menu.props.js +0 -1
- package/dist/cjs/components/dropdown-menu.props.js.map +1 -1
- package/dist/cjs/components/flex.props.js +0 -1
- package/dist/cjs/components/flex.props.js.map +1 -1
- package/dist/cjs/components/grid.props.js +0 -1
- package/dist/cjs/components/grid.props.js.map +1 -1
- package/dist/cjs/components/heading.props.js +0 -1
- package/dist/cjs/components/heading.props.js.map +1 -1
- package/dist/cjs/components/image.props.js +0 -1
- package/dist/cjs/components/image.props.js.map +1 -1
- package/dist/cjs/components/index.js +2 -2
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/components/kbd.props.js +0 -1
- package/dist/cjs/components/kbd.props.js.map +1 -1
- package/dist/cjs/components/link.props.js +0 -1
- package/dist/cjs/components/link.props.js.map +1 -1
- package/dist/cjs/components/message-scroller.js +1 -1
- package/dist/cjs/components/message-scroller.js.map +4 -4
- package/dist/cjs/components/navbar.props.js +0 -1
- package/dist/cjs/components/navbar.props.js.map +1 -1
- package/dist/cjs/components/notice.js +1 -1
- package/dist/cjs/components/notice.js.map +4 -4
- package/dist/cjs/components/popover.d.ts.map +1 -1
- package/dist/cjs/components/popover.js +1 -1
- package/dist/cjs/components/popover.js.map +4 -4
- package/dist/cjs/components/popover.props.js +0 -1
- package/dist/cjs/components/popover.props.js.map +1 -1
- package/dist/cjs/components/progress.props.js +0 -1
- package/dist/cjs/components/progress.props.js.map +1 -1
- package/dist/cjs/components/radio-group.props.js +0 -1
- package/dist/cjs/components/radio-group.props.js.map +1 -1
- package/dist/cjs/components/radio.props.js +0 -1
- package/dist/cjs/components/radio.props.js.map +1 -1
- package/dist/cjs/components/scroll-area.d.ts.map +1 -1
- package/dist/cjs/components/scroll-area.js +1 -1
- package/dist/cjs/components/scroll-area.js.map +3 -3
- package/dist/cjs/components/scroll-area.props.js +0 -1
- package/dist/cjs/components/scroll-area.props.js.map +1 -1
- package/dist/cjs/components/segmented-control.props.js +0 -1
- package/dist/cjs/components/segmented-control.props.js.map +1 -1
- package/dist/cjs/components/select.d.ts.map +1 -1
- package/dist/cjs/components/select.js +1 -1
- package/dist/cjs/components/select.js.map +4 -4
- package/dist/cjs/components/select.props.js +0 -1
- package/dist/cjs/components/select.props.js.map +1 -1
- package/dist/cjs/components/separator.props.js +0 -1
- package/dist/cjs/components/separator.props.js.map +1 -1
- package/dist/cjs/components/sheet.js +1 -1
- package/dist/cjs/components/sheet.js.map +4 -4
- package/dist/cjs/components/shell.d.ts.map +1 -1
- package/dist/cjs/components/shell.js +1 -1
- package/dist/cjs/components/shell.js.map +4 -4
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +4 -4
- package/dist/cjs/components/slider.d.ts.map +1 -1
- package/dist/cjs/components/slider.js +1 -1
- package/dist/cjs/components/slider.js.map +3 -3
- package/dist/cjs/components/slider.props.js +0 -1
- package/dist/cjs/components/slider.props.js.map +1 -1
- package/dist/cjs/components/spinner.d.ts.map +1 -1
- package/dist/cjs/components/spinner.js +1 -1
- package/dist/cjs/components/spinner.js.map +2 -2
- package/dist/cjs/components/spinner.props.js +0 -1
- package/dist/cjs/components/spinner.props.js.map +1 -1
- package/dist/cjs/components/switch.props.js +0 -1
- package/dist/cjs/components/switch.props.js.map +1 -1
- package/dist/cjs/components/table.js +1 -1
- package/dist/cjs/components/table.js.map +3 -3
- package/dist/cjs/components/table.props.js +0 -1
- package/dist/cjs/components/table.props.js.map +1 -1
- package/dist/cjs/components/tabs.props.js +0 -1
- package/dist/cjs/components/tabs.props.js.map +1 -1
- package/dist/cjs/components/text-area.d.ts.map +1 -1
- package/dist/cjs/components/text-area.js +1 -1
- package/dist/cjs/components/text-area.js.map +3 -3
- package/dist/cjs/components/text-area.props.js +0 -1
- package/dist/cjs/components/text-area.props.js.map +1 -1
- package/dist/cjs/components/text-field.d.ts.map +1 -1
- package/dist/cjs/components/text-field.js +2 -2
- package/dist/cjs/components/text-field.js.map +3 -3
- package/dist/cjs/components/text-field.props.js +0 -1
- package/dist/cjs/components/text-field.props.js.map +1 -1
- package/dist/cjs/components/text.props.js +0 -1
- package/dist/cjs/components/text.props.js.map +1 -1
- package/dist/cjs/components/theme.props.js +0 -1
- package/dist/cjs/components/theme.props.js.map +1 -1
- package/dist/cjs/components/toggle.js +1 -1
- package/dist/cjs/components/toggle.js.map +4 -4
- package/dist/cjs/components/toolbar.js +1 -1
- package/dist/cjs/components/toolbar.js.map +4 -4
- package/dist/cjs/components/toolbar.props.d.ts +3 -2
- package/dist/cjs/components/toolbar.props.d.ts.map +1 -1
- package/dist/cjs/components/toolbar.props.js +0 -1
- package/dist/cjs/components/toolbar.props.js.map +2 -2
- package/dist/cjs/components/tooltip.js +1 -1
- package/dist/cjs/components/tooltip.js.map +4 -4
- package/dist/cjs/components/tooltip.props.js +0 -1
- package/dist/cjs/components/tooltip.props.js.map +1 -1
- package/dist/cjs/hooks/use-scroll-edges.d.ts +9 -0
- package/dist/cjs/hooks/use-scroll-edges.d.ts.map +1 -1
- package/dist/cjs/hooks/use-scroll-edges.js +1 -1
- package/dist/cjs/hooks/use-scroll-edges.js.map +3 -3
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/props/index.js +1 -1
- package/dist/cjs/props/index.js.map +4 -4
- package/dist/esm/chunk-27XQ5PN5.js +3 -0
- package/dist/esm/chunk-27XQ5PN5.js.map +7 -0
- package/dist/esm/chunk-2ACVWLFA.js +3 -0
- package/dist/esm/chunk-2NWHEGKZ.js +3 -0
- package/dist/esm/chunk-2NWHEGKZ.js.map +7 -0
- package/dist/esm/{chunk-W4MQ6TEK.js → chunk-2R7WQPXX.js} +2 -2
- package/dist/esm/chunk-2R7WQPXX.js.map +7 -0
- package/dist/esm/{chunk-I3SRUPUP.js → chunk-2ZLMWYJ6.js} +2 -3
- package/dist/esm/{chunk-I3SRUPUP.js.map → chunk-2ZLMWYJ6.js.map} +1 -1
- package/dist/esm/chunk-324VC67W.js +3 -0
- package/dist/esm/chunk-324VC67W.js.map +7 -0
- package/dist/esm/chunk-3UIODOPE.js +3 -0
- package/dist/esm/chunk-3UIODOPE.js.map +7 -0
- package/dist/esm/chunk-3W34KH33.js +2 -0
- package/dist/esm/{chunk-4S5L25RO.js.map → chunk-3W34KH33.js.map} +1 -1
- package/dist/esm/chunk-4CIQRUYW.js +6 -0
- package/dist/esm/chunk-4CIQRUYW.js.map +7 -0
- package/dist/esm/chunk-4E5XBM5Q.js +2 -0
- package/dist/esm/{chunk-IE5ACUZS.js.map → chunk-4E5XBM5Q.js.map} +1 -1
- package/dist/esm/{chunk-QH64BDXO.js → chunk-4G3FJUER.js} +2 -2
- package/dist/esm/{chunk-R7THBMND.js → chunk-4KIZRO52.js} +1 -1
- package/dist/esm/chunk-4MNRLB57.js +3 -0
- package/dist/esm/chunk-4MNRLB57.js.map +7 -0
- package/dist/esm/chunk-5KJIPH2N.js +3 -0
- package/dist/esm/chunk-5KJIPH2N.js.map +7 -0
- package/dist/esm/chunk-5XA2N2WR.js +2 -0
- package/dist/esm/{chunk-R7THBMND.js.map → chunk-5XA2N2WR.js.map} +1 -1
- package/dist/esm/{chunk-7B3XDZXZ.js → chunk-6C6EK2B5.js} +2 -2
- package/dist/esm/chunk-6DWDNKLS.js +1 -0
- package/dist/esm/chunk-6JGF6PQH.js +3 -0
- package/dist/esm/{chunk-JS23YQ4M.js.map → chunk-6JGF6PQH.js.map} +4 -4
- package/dist/esm/{chunk-CYTPMHSJ.js → chunk-7QBNXNEN.js} +2 -2
- package/dist/esm/{chunk-YOSCUA6Z.js → chunk-ACMANOVD.js} +2 -2
- package/dist/esm/{chunk-I6SMGWS5.js → chunk-AJWCSQIE.js} +2 -3
- package/dist/esm/chunk-AJWCSQIE.js.map +7 -0
- package/dist/esm/chunk-AKXBXLCP.js +2 -0
- package/dist/esm/chunk-AKXBXLCP.js.map +7 -0
- package/dist/esm/chunk-ANQLWGFN.js +3 -0
- package/dist/esm/chunk-ANQLWGFN.js.map +7 -0
- package/dist/esm/chunk-BF4WRYUX.js +2 -0
- package/dist/esm/{chunk-M3NI3D6R.js.map → chunk-BF4WRYUX.js.map} +1 -1
- package/dist/esm/{chunk-5WTSKXAE.js → chunk-BIITGC3Z.js} +2 -3
- package/dist/esm/{chunk-5WTSKXAE.js.map → chunk-BIITGC3Z.js.map} +1 -1
- package/dist/esm/{chunk-NBVCQQSY.js → chunk-BP64M73W.js} +2 -3
- package/dist/esm/{chunk-NBVCQQSY.js.map → chunk-BP64M73W.js.map} +1 -1
- package/dist/esm/chunk-BQC2P3SN.js +3 -0
- package/dist/esm/chunk-BQC2P3SN.js.map +7 -0
- package/dist/esm/chunk-BUXK5VGR.js +3 -0
- package/dist/esm/chunk-BUXK5VGR.js.map +7 -0
- package/dist/esm/chunk-C67MM24U.js +3 -0
- package/dist/esm/chunk-C67MM24U.js.map +7 -0
- package/dist/esm/{chunk-5TJH35TF.js → chunk-CGFLZ3DC.js} +2 -2
- package/dist/esm/chunk-CT543Q2V.js +2 -0
- package/dist/esm/{chunk-YZZMQ457.js.map → chunk-CT543Q2V.js.map} +1 -1
- package/dist/esm/chunk-D2C2A2ZK.js +3 -0
- package/dist/esm/{chunk-ZPWKWESI.js.map → chunk-D2C2A2ZK.js.map} +4 -4
- package/dist/esm/chunk-DFGY2NZB.js +2 -0
- package/dist/esm/{chunk-SGJKXIWG.js.map → chunk-DFGY2NZB.js.map} +1 -1
- package/dist/esm/{chunk-4J7QDLKI.js → chunk-DFLWZOQO.js} +2 -3
- package/dist/esm/{chunk-4J7QDLKI.js.map → chunk-DFLWZOQO.js.map} +1 -1
- package/dist/esm/chunk-DSM5SUH3.js +3 -0
- package/dist/esm/{chunk-FCKJD2PW.js.map → chunk-DSM5SUH3.js.map} +4 -4
- package/dist/esm/chunk-E2LSWNWZ.js +3 -0
- package/dist/esm/{chunk-CBWERXF4.js.map → chunk-E2LSWNWZ.js.map} +4 -4
- package/dist/esm/{chunk-XL5OHW6Z.js → chunk-EB4AG3OL.js} +2 -2
- package/dist/esm/chunk-EFXHBH3A.js +2 -0
- package/dist/esm/{chunk-XMHNOIPB.js.map → chunk-EFXHBH3A.js.map} +1 -1
- package/dist/esm/{chunk-6FLLFCBU.js → chunk-ELAW7ZUG.js} +2 -2
- package/dist/esm/chunk-ENQV6SEA.js +3 -0
- package/dist/esm/{chunk-YD2D73LF.js.map → chunk-ENQV6SEA.js.map} +4 -4
- package/dist/esm/chunk-EPGIYTFK.js +3 -0
- package/dist/esm/chunk-EPGIYTFK.js.map +7 -0
- package/dist/esm/{chunk-WT2SYGTU.js → chunk-ETQNRMHU.js} +2 -3
- package/dist/esm/{chunk-WT2SYGTU.js.map → chunk-ETQNRMHU.js.map} +1 -1
- package/dist/esm/{chunk-PT45Q47V.js → chunk-FATCGZZE.js} +1 -1
- package/dist/esm/{chunk-IZIDRDQW.js → chunk-FH6RT6XH.js} +2 -3
- package/dist/esm/{chunk-IZIDRDQW.js.map → chunk-FH6RT6XH.js.map} +1 -1
- package/dist/esm/chunk-FK434VPA.js +3 -0
- package/dist/esm/{chunk-PCLO3ZZY.js.map → chunk-FK434VPA.js.map} +4 -4
- package/dist/esm/chunk-FNAE6HUI.js +2 -0
- package/dist/esm/chunk-FNAE6HUI.js.map +7 -0
- package/dist/esm/chunk-FYTLUDL3.js +3 -0
- package/dist/esm/{chunk-37GC4A2O.js.map → chunk-FYTLUDL3.js.map} +4 -4
- package/dist/esm/chunk-GMWCTK5G.js +3 -0
- package/dist/esm/chunk-GMWCTK5G.js.map +7 -0
- package/dist/esm/chunk-H3IAGAEL.js +2 -0
- package/dist/esm/{chunk-WCGQ4IDE.js.map → chunk-H3IAGAEL.js.map} +1 -1
- package/dist/esm/{chunk-PT4KBXXP.js → chunk-HCBR74BW.js} +2 -3
- package/dist/esm/{chunk-PT4KBXXP.js.map → chunk-HCBR74BW.js.map} +1 -1
- package/dist/esm/{chunk-TGUWRU7N.js → chunk-HIEGLLY7.js} +1 -2
- package/dist/esm/{chunk-TGUWRU7N.js.map → chunk-HIEGLLY7.js.map} +1 -1
- package/dist/esm/chunk-HLIOHDEX.js +3 -0
- package/dist/esm/chunk-HLIOHDEX.js.map +7 -0
- package/dist/esm/chunk-HSWMHW37.js +2 -0
- package/dist/esm/{chunk-SV3CYQY5.js.map → chunk-HSWMHW37.js.map} +1 -1
- package/dist/esm/chunk-IDEDEPBM.js +3 -0
- package/dist/esm/chunk-IDEDEPBM.js.map +7 -0
- package/dist/esm/{chunk-CV7QQTI3.js → chunk-ISCZ57VL.js} +2 -2
- package/dist/esm/chunk-JD4KR6VZ.js +3 -0
- package/dist/esm/chunk-JP36JSNP.js +3 -0
- package/dist/esm/chunk-JP36JSNP.js.map +7 -0
- package/dist/esm/{chunk-IZXML75Y.js → chunk-JQVW4WNN.js} +2 -2
- package/dist/esm/{chunk-Z563IAE3.js → chunk-KLYI5E6F.js} +2 -2
- package/dist/esm/chunk-KVOWI6SN.js +2 -0
- package/dist/esm/{chunk-HV7USGHD.js.map → chunk-KVOWI6SN.js.map} +1 -1
- package/dist/esm/{chunk-WZKSLTBH.js → chunk-KVVRFWGQ.js} +2 -2
- package/dist/esm/{chunk-VVBSYWUA.js → chunk-LTUW36HM.js} +2 -2
- package/dist/esm/{chunk-QQY4WFJL.js → chunk-LUNWI377.js} +2 -3
- package/dist/esm/{chunk-QQY4WFJL.js.map → chunk-LUNWI377.js.map} +1 -1
- package/dist/esm/chunk-MCHK36NI.js +3 -0
- package/dist/esm/chunk-MCHK36NI.js.map +7 -0
- package/dist/esm/chunk-MGWGD6KI.js +3 -0
- package/dist/esm/chunk-MGWGD6KI.js.map +7 -0
- package/dist/esm/chunk-MPCCYR7L.js +3 -0
- package/dist/esm/chunk-MPCCYR7L.js.map +7 -0
- package/dist/esm/{chunk-PZ6Z7WTR.js → chunk-NNE3KNH4.js} +2 -3
- package/dist/esm/{chunk-PZ6Z7WTR.js.map → chunk-NNE3KNH4.js.map} +1 -1
- package/dist/esm/{chunk-CKJXTEVO.js → chunk-NR5FQCMU.js} +2 -3
- package/dist/esm/{chunk-CKJXTEVO.js.map → chunk-NR5FQCMU.js.map} +1 -1
- package/dist/esm/chunk-NWXODCTD.js +3 -0
- package/dist/esm/{chunk-BXZSJKWA.js.map → chunk-NWXODCTD.js.map} +4 -4
- package/dist/esm/chunk-OA7C34MJ.js +1 -0
- package/dist/esm/{chunk-65KD6WS6.js → chunk-OEPVYHSS.js} +2 -3
- package/dist/esm/{chunk-65KD6WS6.js.map → chunk-OEPVYHSS.js.map} +1 -1
- package/dist/esm/chunk-OLTRWCQK.js +3 -0
- package/dist/esm/chunk-OLTRWCQK.js.map +7 -0
- package/dist/esm/chunk-OLWUS7PC.js +3 -0
- package/dist/esm/chunk-OLWUS7PC.js.map +7 -0
- package/dist/esm/{chunk-647DRBXQ.js → chunk-OSSNMF5U.js} +2 -3
- package/dist/esm/{chunk-647DRBXQ.js.map → chunk-OSSNMF5U.js.map} +1 -1
- package/dist/esm/chunk-OUOP6Q3Z.js +3 -0
- package/dist/esm/chunk-OUOP6Q3Z.js.map +7 -0
- package/dist/esm/{chunk-TDT2CNES.js → chunk-P6UX6FFY.js} +2 -2
- package/dist/esm/{chunk-JUY7CBSL.js → chunk-PBFSBHBS.js} +2 -2
- package/dist/esm/chunk-PEMFIU3B.js +2 -0
- package/dist/esm/{chunk-BOLSK63X.js.map → chunk-PEMFIU3B.js.map} +1 -1
- package/dist/esm/{chunk-3B25RLWX.js → chunk-Q2TLWILH.js} +2 -2
- package/dist/esm/chunk-Q5SANVIW.js +3 -0
- package/dist/esm/chunk-Q5SANVIW.js.map +7 -0
- package/dist/esm/chunk-QPRUTOLI.js +3 -0
- package/dist/esm/chunk-QPRUTOLI.js.map +7 -0
- package/dist/esm/chunk-QRV32INS.js +3 -0
- package/dist/esm/chunk-QRV32INS.js.map +7 -0
- package/dist/esm/chunk-R7YHDIFM.js +3 -0
- package/dist/esm/chunk-R7YHDIFM.js.map +7 -0
- package/dist/esm/{chunk-EY6TCYGG.js → chunk-RAVZ7F5L.js} +2 -3
- package/dist/esm/{chunk-EY6TCYGG.js.map → chunk-RAVZ7F5L.js.map} +1 -1
- package/dist/esm/chunk-RP5ORPPH.js +3 -0
- package/dist/esm/{chunk-BVFHJP5E.js.map → chunk-RP5ORPPH.js.map} +4 -4
- package/dist/esm/chunk-SKOYHBIE.js +2 -0
- package/dist/esm/{chunk-5RFDCAKC.js.map → chunk-SKOYHBIE.js.map} +1 -1
- package/dist/esm/chunk-STPMPY3X.js +1 -0
- package/dist/esm/chunk-T2DZDW5Y.js +3 -0
- package/dist/esm/chunk-T2DZDW5Y.js.map +7 -0
- package/dist/esm/chunk-TZTUPQYK.js +2 -0
- package/dist/esm/{chunk-XVDT6DQZ.js.map → chunk-TZTUPQYK.js.map} +1 -1
- package/dist/esm/chunk-UICSVJ3B.js +1 -0
- package/dist/esm/chunk-UJ7JERJ5.js +3 -0
- package/dist/esm/chunk-UJ7JERJ5.js.map +7 -0
- package/dist/esm/{chunk-6RJQ5LLP.js → chunk-UMR4AF35.js} +2 -2
- package/dist/esm/chunk-UMYPLUG3.js +2 -0
- package/dist/esm/chunk-UMYPLUG3.js.map +7 -0
- package/dist/esm/chunk-UONSKZQT.js +2 -0
- package/dist/esm/{chunk-M37GE2TE.js.map → chunk-UONSKZQT.js.map} +1 -1
- package/dist/esm/{chunk-CAAEEHGQ.js → chunk-UUXZ4W6H.js} +2 -3
- package/dist/esm/{chunk-CAAEEHGQ.js.map → chunk-UUXZ4W6H.js.map} +1 -1
- package/dist/esm/chunk-VCV7RACK.js +2 -0
- package/dist/esm/chunk-VCV7RACK.js.map +7 -0
- package/dist/esm/chunk-VPP5IDW7.js +3 -0
- package/dist/esm/chunk-VPP5IDW7.js.map +7 -0
- package/dist/esm/{chunk-L4NF3Q2T.js → chunk-VW46DG7H.js} +2 -3
- package/dist/esm/{chunk-L4NF3Q2T.js.map → chunk-VW46DG7H.js.map} +1 -1
- package/dist/esm/chunk-W3ES2XSB.js +3 -0
- package/dist/esm/chunk-W3ES2XSB.js.map +7 -0
- package/dist/esm/chunk-W4Z6ORYO.js +3 -0
- package/dist/esm/{chunk-MQEWEAH5.js.map → chunk-W4Z6ORYO.js.map} +4 -4
- package/dist/esm/chunk-WD66RYF6.js +3 -0
- package/dist/esm/chunk-WD66RYF6.js.map +7 -0
- package/dist/esm/chunk-WOR3JCLX.js +1 -0
- package/dist/esm/chunk-WOR3JCLX.js.map +7 -0
- package/dist/esm/{chunk-HHSFAOIO.js → chunk-WYKNBNM5.js} +2 -2
- package/dist/esm/chunk-WYKNBNM5.js.map +7 -0
- package/dist/esm/chunk-X7JHZ3HA.js +3 -0
- package/dist/esm/{chunk-OQWD63AI.js.map → chunk-X7JHZ3HA.js.map} +4 -4
- package/dist/esm/chunk-XD3C3GVF.js +3 -0
- package/dist/esm/chunk-XD3C3GVF.js.map +7 -0
- package/dist/esm/{chunk-FI32HA4X.js → chunk-XDVTHL3S.js} +2 -3
- package/dist/esm/{chunk-FI32HA4X.js.map → chunk-XDVTHL3S.js.map} +1 -1
- package/dist/esm/chunk-XGES2VBG.js +3 -0
- package/dist/esm/chunk-XGES2VBG.js.map +7 -0
- package/dist/esm/{chunk-64EFWPHI.js → chunk-YCLPURTD.js} +1 -1
- package/dist/esm/chunk-YHQTFDGN.js +2 -0
- package/dist/esm/{chunk-PHWT772P.js.map → chunk-YHQTFDGN.js.map} +1 -1
- package/dist/esm/{chunk-AQ7VUGQQ.js → chunk-YMUERC2J.js} +2 -2
- package/dist/esm/chunk-YOZXIUZY.js +3 -0
- package/dist/esm/{chunk-N3QLHFHB.js.map → chunk-YOZXIUZY.js.map} +4 -4
- package/dist/esm/{chunk-R4PGFURL.js → chunk-Z5W4ACO2.js} +2 -2
- package/dist/esm/chunk-ZG2XQUOH.js +3 -0
- package/dist/esm/chunk-ZIAA2C4H.js +3 -0
- package/dist/esm/{chunk-5EBJOOXE.js.map → chunk-ZIAA2C4H.js.map} +4 -4
- package/dist/esm/components/_internal/base-button.d.ts.map +1 -1
- package/dist/esm/components/_internal/base-button.js +1 -1
- package/dist/esm/components/_internal/base-button.props.js +1 -2
- package/dist/esm/components/_internal/base-checkbox.props.js +1 -2
- package/dist/esm/components/_internal/base-menu.props.js +1 -2
- package/dist/esm/components/_internal/base-menu.utils.js +1 -1
- package/dist/esm/components/_internal/base-radio.props.js +1 -2
- package/dist/esm/components/_internal/base-tab-list.props.js +1 -2
- package/dist/esm/components/_internal/menu-context.js +1 -1
- package/dist/esm/components/_internal/pane-band-context.d.ts +15 -0
- package/dist/esm/components/_internal/pane-band-context.d.ts.map +1 -0
- package/dist/esm/components/_internal/pane-band-context.js +3 -0
- package/dist/esm/components/_internal/pane-band-context.js.map +7 -0
- package/dist/esm/components/_internal/pane-chrome.d.ts +1 -1
- package/dist/esm/components/_internal/pane-chrome.d.ts.map +1 -1
- package/dist/esm/components/_internal/pane-chrome.js +1 -1
- package/dist/esm/components/_internal/portal-theme.d.ts +9 -0
- package/dist/esm/components/_internal/portal-theme.d.ts.map +1 -0
- package/dist/esm/components/_internal/portal-theme.js +3 -0
- package/dist/esm/components/_internal/portal-theme.js.map +7 -0
- 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-inspector.js +1 -1
- package/dist/esm/components/_internal/shell-pane.js +1 -1
- package/dist/esm/components/_internal/shell-sidebar.js +1 -1
- package/dist/esm/components/accordion.js +1 -1
- package/dist/esm/components/accordion.props.js +1 -2
- package/dist/esm/components/accordion.props.js.map +4 -4
- package/dist/esm/components/alert-dialog.js +1 -1
- package/dist/esm/components/alert-dialog.props.js +1 -2
- package/dist/esm/components/avatar.js +1 -1
- package/dist/esm/components/avatar.props.js +1 -2
- package/dist/esm/components/blockquote.js +1 -1
- package/dist/esm/components/blockquote.props.js +1 -2
- package/dist/esm/components/box.js +1 -1
- package/dist/esm/components/box.props.js +1 -2
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/button.props.js +1 -2
- package/dist/esm/components/card.js +1 -1
- package/dist/esm/components/card.props.js +1 -2
- package/dist/esm/components/chatbar.js +1 -1
- package/dist/esm/components/checkbox-group.js +1 -1
- package/dist/esm/components/checkbox-group.props.js +1 -2
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/checkbox.props.js +1 -2
- package/dist/esm/components/chip.js +1 -1
- package/dist/esm/components/chip.props.js +1 -2
- package/dist/esm/components/code.js +1 -1
- package/dist/esm/components/code.props.js +1 -2
- package/dist/esm/components/combobox.d.ts.map +1 -1
- package/dist/esm/components/combobox.js +1 -1
- package/dist/esm/components/combobox.props.js +1 -2
- package/dist/esm/components/combobox.props.js.map +4 -4
- package/dist/esm/components/context-menu.d.ts.map +1 -1
- package/dist/esm/components/context-menu.js +1 -1
- package/dist/esm/components/context-menu.props.js +1 -2
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dialog.props.js +1 -2
- package/dist/esm/components/dropdown-menu.d.ts.map +1 -1
- package/dist/esm/components/dropdown-menu.js +1 -1
- package/dist/esm/components/dropdown-menu.props.js +1 -2
- package/dist/esm/components/flex.js +1 -1
- package/dist/esm/components/flex.props.js +1 -2
- package/dist/esm/components/grid.js +1 -1
- package/dist/esm/components/grid.props.js +1 -2
- package/dist/esm/components/heading.js +1 -1
- package/dist/esm/components/heading.props.js +1 -2
- package/dist/esm/components/image.js +1 -1
- package/dist/esm/components/image.props.js +1 -2
- package/dist/esm/components/image.props.js.map +4 -4
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/kbd.js +1 -1
- package/dist/esm/components/kbd.props.js +1 -2
- package/dist/esm/components/link.js +1 -1
- package/dist/esm/components/link.props.js +1 -2
- package/dist/esm/components/message-scroller.js +1 -1
- package/dist/esm/components/navbar.js +1 -1
- package/dist/esm/components/navbar.props.js +1 -2
- package/dist/esm/components/navbar.props.js.map +4 -4
- package/dist/esm/components/notice.js +1 -1
- package/dist/esm/components/popover.d.ts.map +1 -1
- package/dist/esm/components/popover.js +1 -1
- package/dist/esm/components/popover.props.js +1 -2
- package/dist/esm/components/progress.js +1 -1
- package/dist/esm/components/progress.props.js +1 -2
- package/dist/esm/components/radio-group.js +1 -1
- package/dist/esm/components/radio-group.props.js +1 -2
- package/dist/esm/components/radio.js +1 -1
- package/dist/esm/components/radio.props.js +1 -2
- package/dist/esm/components/scroll-area.d.ts.map +1 -1
- package/dist/esm/components/scroll-area.js +1 -1
- package/dist/esm/components/scroll-area.props.js +1 -2
- package/dist/esm/components/segmented-control.js +1 -1
- package/dist/esm/components/segmented-control.props.js +1 -2
- package/dist/esm/components/select.d.ts.map +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/select.props.js +1 -2
- package/dist/esm/components/separator.js +1 -1
- package/dist/esm/components/separator.props.js +1 -2
- package/dist/esm/components/sheet.js +1 -1
- package/dist/esm/components/shell.context.js +1 -1
- package/dist/esm/components/shell.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/sidebar.js +1 -1
- package/dist/esm/components/slider.d.ts.map +1 -1
- package/dist/esm/components/slider.js +1 -1
- package/dist/esm/components/slider.props.js +1 -2
- package/dist/esm/components/spinner.d.ts.map +1 -1
- package/dist/esm/components/spinner.js +1 -1
- package/dist/esm/components/spinner.props.js +1 -2
- package/dist/esm/components/switch.js +1 -1
- package/dist/esm/components/switch.props.js +1 -2
- package/dist/esm/components/table.js +1 -1
- package/dist/esm/components/table.props.js +1 -2
- package/dist/esm/components/tabs.js +1 -1
- package/dist/esm/components/tabs.props.js +1 -2
- package/dist/esm/components/text-area.d.ts.map +1 -1
- package/dist/esm/components/text-area.js +1 -1
- package/dist/esm/components/text-area.props.js +1 -2
- package/dist/esm/components/text-field.d.ts.map +1 -1
- package/dist/esm/components/text-field.js +1 -1
- package/dist/esm/components/text-field.props.js +1 -2
- package/dist/esm/components/text.js +1 -1
- package/dist/esm/components/text.props.js +1 -2
- package/dist/esm/components/theme.js +1 -1
- package/dist/esm/components/theme.props.js +1 -2
- package/dist/esm/components/toggle.js +1 -1
- package/dist/esm/components/toolbar.js +1 -1
- package/dist/esm/components/toolbar.props.d.ts +3 -2
- package/dist/esm/components/toolbar.props.d.ts.map +1 -1
- package/dist/esm/components/toolbar.props.js +1 -2
- package/dist/esm/components/toolbar.props.js.map +4 -4
- package/dist/esm/components/tooltip.js +1 -1
- package/dist/esm/components/tooltip.props.js +1 -2
- 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-scroll-edges.d.ts +9 -0
- package/dist/esm/hooks/use-scroll-edges.d.ts.map +1 -1
- package/dist/esm/hooks/use-scroll-edges.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/props/font-family.prop.js +1 -1
- package/dist/esm/props/font-family.prop.js.map +4 -4
- package/dist/esm/props/index.js +1 -1
- package/dist/esm/props/index.js.map +3 -3
- package/dist/esm/props/layout.props.js +1 -1
- package/package.json +1 -1
- package/src/components/_internal/base-button.tsx +8 -2
- package/src/components/_internal/pane-band-context.ts +17 -0
- package/src/components/_internal/pane-chrome.tsx +1 -8
- package/src/components/_internal/portal-theme.tsx +18 -0
- package/src/components/_internal/shell-bottom.tsx +4 -1
- package/src/components/alert-dialog.tsx +3 -3
- package/src/components/combobox.tsx +4 -3
- package/src/components/context-menu.tsx +6 -5
- package/src/components/dialog.tsx +3 -3
- package/src/components/dropdown-menu.tsx +6 -5
- package/src/components/popover.tsx +10 -64
- package/src/components/scroll-area.tsx +3 -2
- package/src/components/select.css +1 -1
- package/src/components/select.tsx +4 -3
- package/src/components/sheet.tsx +3 -3
- package/src/components/shell.css +11 -3
- package/src/components/shell.tsx +8 -1
- package/src/components/slider.tsx +19 -1
- package/src/components/spinner.css +16 -1
- package/src/components/spinner.tsx +14 -13
- package/src/components/text-area.css +19 -2
- package/src/components/text-area.tsx +34 -24
- package/src/components/text-field.css +14 -2
- package/src/components/text-field.tsx +44 -26
- package/src/components/toolbar.props.tsx +3 -2
- package/src/components/tooltip.tsx +3 -3
- package/src/hooks/use-scroll-edges.ts +16 -2
- package/src/styles/tokens/color.css +6 -5
- package/src/styles/tokens/shadow.css +2 -2
- package/styles.css +51 -4
- package/tokens/base.css +1 -2
- package/tokens.css +1 -2
- package/dist/esm/chunk-2IU5XPR2.js +0 -3
- package/dist/esm/chunk-2IU5XPR2.js.map +0 -7
- package/dist/esm/chunk-37GC4A2O.js +0 -3
- package/dist/esm/chunk-3H23GRNQ.js +0 -3
- package/dist/esm/chunk-3H23GRNQ.js.map +0 -7
- package/dist/esm/chunk-3L2MDOYC.js +0 -3
- package/dist/esm/chunk-3L2MDOYC.js.map +0 -7
- package/dist/esm/chunk-4S5L25RO.js +0 -3
- package/dist/esm/chunk-5CFSNNYS.js +0 -3
- package/dist/esm/chunk-5CFSNNYS.js.map +0 -7
- package/dist/esm/chunk-5EBJOOXE.js +0 -3
- package/dist/esm/chunk-5EP3UTM7.js +0 -3
- package/dist/esm/chunk-5EP3UTM7.js.map +0 -7
- package/dist/esm/chunk-5L4DZ2D3.js +0 -3
- package/dist/esm/chunk-5L4DZ2D3.js.map +0 -7
- package/dist/esm/chunk-5RFDCAKC.js +0 -3
- package/dist/esm/chunk-5XR5PTDR.js +0 -3
- package/dist/esm/chunk-5XR5PTDR.js.map +0 -7
- package/dist/esm/chunk-63MUJFVF.js +0 -3
- package/dist/esm/chunk-63MUJFVF.js.map +0 -7
- package/dist/esm/chunk-6AMWYEM7.js +0 -3
- package/dist/esm/chunk-6AMWYEM7.js.map +0 -7
- package/dist/esm/chunk-6BB2A6VU.js +0 -3
- package/dist/esm/chunk-6UZT3ZLO.js +0 -3
- package/dist/esm/chunk-6UZT3ZLO.js.map +0 -7
- package/dist/esm/chunk-7ROKZHH2.js +0 -3
- package/dist/esm/chunk-7ROKZHH2.js.map +0 -7
- package/dist/esm/chunk-7X7VWR3F.js +0 -3
- package/dist/esm/chunk-7X7VWR3F.js.map +0 -7
- package/dist/esm/chunk-7XHE6TOA.js +0 -6
- package/dist/esm/chunk-7XHE6TOA.js.map +0 -7
- package/dist/esm/chunk-A2OMWZI7.js +0 -2
- package/dist/esm/chunk-BOLSK63X.js +0 -3
- package/dist/esm/chunk-BVFHJP5E.js +0 -3
- package/dist/esm/chunk-BXZSJKWA.js +0 -3
- package/dist/esm/chunk-CBWERXF4.js +0 -3
- package/dist/esm/chunk-CQG4U5BR.js +0 -3
- package/dist/esm/chunk-CQG4U5BR.js.map +0 -7
- package/dist/esm/chunk-D4P7332M.js +0 -3
- package/dist/esm/chunk-D4P7332M.js.map +0 -7
- package/dist/esm/chunk-DVXDFCCV.js +0 -3
- package/dist/esm/chunk-DVXDFCCV.js.map +0 -7
- package/dist/esm/chunk-EAIQIW23.js +0 -3
- package/dist/esm/chunk-EAIQIW23.js.map +0 -7
- package/dist/esm/chunk-FCKJD2PW.js +0 -3
- package/dist/esm/chunk-FPGBCCML.js +0 -3
- package/dist/esm/chunk-FPGBCCML.js.map +0 -7
- package/dist/esm/chunk-GNPTPIL7.js +0 -3
- package/dist/esm/chunk-GNPTPIL7.js.map +0 -7
- package/dist/esm/chunk-HHSFAOIO.js.map +0 -7
- package/dist/esm/chunk-HV7USGHD.js +0 -3
- package/dist/esm/chunk-IE5ACUZS.js +0 -3
- package/dist/esm/chunk-ILWS2JUE.js +0 -3
- package/dist/esm/chunk-ILWS2JUE.js.map +0 -7
- package/dist/esm/chunk-IO43RGNR.js +0 -3
- package/dist/esm/chunk-IO43RGNR.js.map +0 -7
- package/dist/esm/chunk-J3QIUJ6F.js +0 -2
- package/dist/esm/chunk-JS23YQ4M.js +0 -3
- package/dist/esm/chunk-JZ5Z53MN.js +0 -2
- package/dist/esm/chunk-KRFXTPEW.js +0 -3
- package/dist/esm/chunk-KRFXTPEW.js.map +0 -7
- package/dist/esm/chunk-KSYHZCLD.js +0 -3
- package/dist/esm/chunk-KSYHZCLD.js.map +0 -7
- package/dist/esm/chunk-M37GE2TE.js +0 -3
- package/dist/esm/chunk-M3NI3D6R.js +0 -3
- package/dist/esm/chunk-MQEWEAH5.js +0 -3
- package/dist/esm/chunk-MXIVYALY.js +0 -3
- package/dist/esm/chunk-MXIVYALY.js.map +0 -7
- package/dist/esm/chunk-N3QLHFHB.js +0 -3
- package/dist/esm/chunk-NZCAGHCL.js +0 -3
- package/dist/esm/chunk-OQWD63AI.js +0 -3
- package/dist/esm/chunk-PCLO3ZZY.js +0 -3
- package/dist/esm/chunk-PHWT772P.js +0 -3
- package/dist/esm/chunk-PZCQDZVJ.js +0 -3
- package/dist/esm/chunk-PZCQDZVJ.js.map +0 -7
- package/dist/esm/chunk-RVPLXLRA.js +0 -3
- package/dist/esm/chunk-RVPLXLRA.js.map +0 -7
- package/dist/esm/chunk-SGJKXIWG.js +0 -3
- package/dist/esm/chunk-SHLERRO3.js +0 -3
- package/dist/esm/chunk-SHLERRO3.js.map +0 -7
- package/dist/esm/chunk-SV3CYQY5.js +0 -3
- package/dist/esm/chunk-U5GQ3IFS.js +0 -3
- package/dist/esm/chunk-U5GQ3IFS.js.map +0 -7
- package/dist/esm/chunk-VPRAXHLL.js +0 -3
- package/dist/esm/chunk-VPRAXHLL.js.map +0 -7
- package/dist/esm/chunk-VRQEWMC6.js +0 -3
- package/dist/esm/chunk-VRQEWMC6.js.map +0 -7
- package/dist/esm/chunk-W4MQ6TEK.js.map +0 -7
- package/dist/esm/chunk-WCGQ4IDE.js +0 -3
- package/dist/esm/chunk-WH7PQSSG.js +0 -2
- package/dist/esm/chunk-WJ4H2O2G.js +0 -3
- package/dist/esm/chunk-WJ4H2O2G.js.map +0 -7
- package/dist/esm/chunk-WMODMXEU.js +0 -3
- package/dist/esm/chunk-WMODMXEU.js.map +0 -7
- package/dist/esm/chunk-WMZLMZHB.js +0 -3
- package/dist/esm/chunk-WMZLMZHB.js.map +0 -7
- package/dist/esm/chunk-XH2CRCXR.js +0 -3
- package/dist/esm/chunk-XH2CRCXR.js.map +0 -7
- package/dist/esm/chunk-XMHNOIPB.js +0 -3
- package/dist/esm/chunk-XVDT6DQZ.js +0 -3
- package/dist/esm/chunk-Y2BTPKK6.js +0 -3
- package/dist/esm/chunk-Y2BTPKK6.js.map +0 -7
- package/dist/esm/chunk-YD2D73LF.js +0 -3
- package/dist/esm/chunk-YDBFIJHB.js +0 -3
- package/dist/esm/chunk-YDBFIJHB.js.map +0 -7
- package/dist/esm/chunk-YWG476GC.js +0 -3
- package/dist/esm/chunk-YZZMQ457.js +0 -3
- package/dist/esm/chunk-Z27REN6T.js +0 -3
- package/dist/esm/chunk-Z27REN6T.js.map +0 -7
- package/dist/esm/chunk-ZPWKWESI.js +0 -3
- package/dist/esm/chunk-ZYKJTNAT.js +0 -3
- package/dist/esm/chunk-ZYKJTNAT.js.map +0 -7
- /package/dist/esm/{chunk-I6SMGWS5.js.map → chunk-2ACVWLFA.js.map} +0 -0
- /package/dist/esm/{chunk-QH64BDXO.js.map → chunk-4G3FJUER.js.map} +0 -0
- /package/dist/esm/{chunk-6BB2A6VU.js.map → chunk-4KIZRO52.js.map} +0 -0
- /package/dist/esm/{chunk-7B3XDZXZ.js.map → chunk-6C6EK2B5.js.map} +0 -0
- /package/dist/esm/{chunk-A2OMWZI7.js.map → chunk-6DWDNKLS.js.map} +0 -0
- /package/dist/esm/{chunk-CYTPMHSJ.js.map → chunk-7QBNXNEN.js.map} +0 -0
- /package/dist/esm/{chunk-YOSCUA6Z.js.map → chunk-ACMANOVD.js.map} +0 -0
- /package/dist/esm/{chunk-5TJH35TF.js.map → chunk-CGFLZ3DC.js.map} +0 -0
- /package/dist/esm/{chunk-XL5OHW6Z.js.map → chunk-EB4AG3OL.js.map} +0 -0
- /package/dist/esm/{chunk-6FLLFCBU.js.map → chunk-ELAW7ZUG.js.map} +0 -0
- /package/dist/esm/{chunk-PT45Q47V.js.map → chunk-FATCGZZE.js.map} +0 -0
- /package/dist/esm/{chunk-CV7QQTI3.js.map → chunk-ISCZ57VL.js.map} +0 -0
- /package/dist/esm/{chunk-NZCAGHCL.js.map → chunk-JD4KR6VZ.js.map} +0 -0
- /package/dist/esm/{chunk-IZXML75Y.js.map → chunk-JQVW4WNN.js.map} +0 -0
- /package/dist/esm/{chunk-Z563IAE3.js.map → chunk-KLYI5E6F.js.map} +0 -0
- /package/dist/esm/{chunk-WZKSLTBH.js.map → chunk-KVVRFWGQ.js.map} +0 -0
- /package/dist/esm/{chunk-VVBSYWUA.js.map → chunk-LTUW36HM.js.map} +0 -0
- /package/dist/esm/{chunk-J3QIUJ6F.js.map → chunk-OA7C34MJ.js.map} +0 -0
- /package/dist/esm/{chunk-TDT2CNES.js.map → chunk-P6UX6FFY.js.map} +0 -0
- /package/dist/esm/{chunk-JUY7CBSL.js.map → chunk-PBFSBHBS.js.map} +0 -0
- /package/dist/esm/{chunk-3B25RLWX.js.map → chunk-Q2TLWILH.js.map} +0 -0
- /package/dist/esm/{chunk-JZ5Z53MN.js.map → chunk-STPMPY3X.js.map} +0 -0
- /package/dist/esm/{chunk-WH7PQSSG.js.map → chunk-UICSVJ3B.js.map} +0 -0
- /package/dist/esm/{chunk-6RJQ5LLP.js.map → chunk-UMR4AF35.js.map} +0 -0
- /package/dist/esm/{chunk-64EFWPHI.js.map → chunk-YCLPURTD.js.map} +0 -0
- /package/dist/esm/{chunk-AQ7VUGQQ.js.map → chunk-YMUERC2J.js.map} +0 -0
- /package/dist/esm/{chunk-R4PGFURL.js.map → chunk-Z5W4ACO2.js.map} +0 -0
- /package/dist/esm/{chunk-YWG476GC.js.map → chunk-ZG2XQUOH.js.map} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";"use client";var ut=Object.create;var pe=Object.defineProperty;var dt=Object.getOwnPropertyDescriptor;var ct=Object.getOwnPropertyNames;var pt=Object.getPrototypeOf,ft=Object.prototype.hasOwnProperty;var mt=(e,t)=>{for(var n in t)pe(e,n,{get:t[n],enumerable:!0})},Oe=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of ct(t))!ft.call(e,a)&&a!==n&&pe(e,a,{get:()=>t[a],enumerable:!(r=dt(t,a))||r.enumerable});return e};var J=(e,t,n)=>(n=e!=null?ut(pt(e)):{},Oe(t||!e||!e.__esModule?pe(n,"default",{value:e,enumerable:!0}):n,e)),bt=e=>Oe(pe({},"__esModule",{value:!0}),e);var Vt={};mt(Vt,{Bottom:()=>ke});module.exports=bt(Vt);var q=J(require("react")),ot=J(require("classnames")),at=require("radix-ui/internal");var fe=J(require("react")),Pe=fe.createContext(null);function He(){let e=fe.useContext(Pe);if(!e)throw new Error("Shell.Handle must be used within a resizable pane");return e}var y=J(require("react")),Ae=require("radix-ui/internal"),De=J(require("classnames"));var ee=y.forwardRef(({className:e,children:t,...n},r)=>{let{containerRef:a,controls:d,cssVarName:m,minSize:N,maxSize:w,defaultSize:z,orientation:S,edge:F,growth:b,onResize:T,onResizeStart:Y,onResizeEnd:I,snapPoints:k,snapTolerance:g,collapseThreshold:O,collapsible:A,target:B,requestCollapse:j,requestToggle:L}=He(),M=y.useRef(null),_=y.useCallback(o=>{M.current=o,typeof r=="function"?r(o):r&&(r.current=o)},[r]),x=y.useRef(null);y.useEffect(()=>()=>{x.current?.(),x.current=null},[]);let i=y.useCallback(()=>{let o=a.current;if(!o)return z;let u=Number.parseFloat(getComputedStyle(o).getPropertyValue(m));return Number.isFinite(u)?u:z},[a,m,z]),l=y.useCallback(()=>{let o=a.current,u=M.current,c=o?.closest(".kui-ShellRoot")?.getBoundingClientRect();if(!o||!c||!u)return w;let R=o.getBoundingClientRect(),V=u.getBoundingClientRect(),C=b(getComputedStyle(o).direction==="rtl"),p;S==="vertical"?p=C>0?c.right-R.left:R.right-c.left:p=C>0?c.bottom-R.top:R.bottom-c.top;let K=S==="vertical"?V.width:V.height;return!(c.width>0&&c.height>0)||!Number.isFinite(p)?w:Math.max(N,Math.min(w,Math.round(p-K)))},[a,b,w,N,S]),P=()=>{M.current?.setAttribute("aria-valuemax",String(l()))};(0,Ae.useLayoutEffect)(()=>{M.current?.setAttribute("aria-valuenow",String(Math.round(i())))},[i]);let h=(o,u)=>{o.style.setProperty(m,`${u}px`),M.current?.setAttribute("aria-valuenow",String(Math.round(u)))},D=B.charAt(0).toUpperCase()+B.slice(1);return y.createElement("div",{ref:_,className:(0,De.default)("kui-ShellResizer",e),"data-orientation":S,"data-edge":F,role:"separator",tabIndex:0,"aria-label":`Resize ${D} pane`,"aria-controls":d,"aria-orientation":S,"aria-valuemin":N,"aria-valuemax":w,...n,onPointerDown:o=>{n.onPointerDown?.(o);let u=a.current;if(!u||o.defaultPrevented||o.button!==0)return;o.preventDefault();let c=o.currentTarget,R=o.pointerId;x.current?.();try{c.setPointerCapture(R)}catch{}let V=getComputedStyle(u),C=Number.parseFloat(V.getPropertyValue(m)),p=Number.isFinite(C)?C:z,K=S==="vertical"?o.clientX:o.clientY,s=b(V.direction==="rtl"),$=l();c.setAttribute("aria-valuemax",String($));let W=E=>Math.min(Math.max(E,N),$);u.setAttribute("data-resizing",""),c.setAttribute("data-dragging","");let Q=document.body,it=Q.style.cursor,st=Q.style.userSelect;Q.style.cursor=S==="vertical"?"col-resize":"row-resize",Q.style.userSelect="none",Y?.(p);let Z=p,ve=p,U=0,ae=null,Le=()=>{if(U=0,ae===null)return;let E=ae;ae=null,T?.(E)},Ve=null,Ne=!1,lt=(E,ne)=>{if(E.type===ne)Ne=!0;else if(Ne)return!1;return!0},G=E=>{if(!lt(E,"pointermove")||E===Ve)return;Ve=E;let ne=S==="vertical"?E.clientX:E.clientY;ve=p+(ne-K)*s,Z=W(ve),h(u,Z),ae=Z,U||(U=requestAnimationFrame(Le))},ce=()=>{U&&cancelAnimationFrame(U),U=0;try{c.releasePointerCapture(R)}catch{}window.removeEventListener("pointermove",G),document.removeEventListener("pointermove",G),window.removeEventListener("mousemove",G),document.removeEventListener("mousemove",G),c.removeEventListener("pointermove",G),window.removeEventListener("pointerup",H),document.removeEventListener("pointerup",H),window.removeEventListener("mouseup",H),document.removeEventListener("mouseup",H),window.removeEventListener("pointercancel",H),document.removeEventListener("pointercancel",H),window.removeEventListener("keydown",Be),c.removeEventListener("lostpointercapture",H),u.removeAttribute("data-resizing"),c.removeAttribute("data-dragging"),Q.style.cursor=it,Q.style.userSelect=st,x.current=null},ge=!1,H=()=>{if(ge)return;if(ge=!0,U&&cancelAnimationFrame(U),Le(),A&&typeof O=="number"&&ve<=O){h(u,p),T?.(p),ce(),j?.(),I?.(p);return}let E=Z;if(k&&k.length){let ne=k.reduce((Me,Ie)=>Math.abs(Ie-Z)<Math.abs(Me-Z)?Ie:Me,k[0]);Math.abs(ne-Z)<=g&&(E=W(ne),h(u,E),T?.(E))}I?.(E),ce()},Be=E=>{E.key==="Escape"&&(U&&cancelAnimationFrame(U),U=0,ae=null,h(u,p),T?.(p),ge=!0,I?.(p),ce())};window.addEventListener("pointermove",G),document.addEventListener("pointermove",G),window.addEventListener("mousemove",G),document.addEventListener("mousemove",G),c.addEventListener("pointermove",G),window.addEventListener("pointerup",H),document.addEventListener("pointerup",H),window.addEventListener("mouseup",H),document.addEventListener("mouseup",H),window.addEventListener("pointercancel",H),document.addEventListener("pointercancel",H),window.addEventListener("keydown",Be),c.addEventListener("lostpointercapture",H),x.current=ce},onDoubleClick:o=>{n.onDoubleClick?.(o),!o.defaultPrevented&&A&&L?.()},onFocus:o=>{n.onFocus?.(o),P()},onKeyDown:o=>{n.onKeyDown?.(o);let u=a.current;if(!u||o.defaultPrevented)return;if(o.key==="Enter"){A&&L&&(o.preventDefault(),L());return}let c=i(),R=l(),V=p=>Math.min(Math.max(p,N),R),C;if(o.key==="Home")C=V(N);else if(o.key==="End")C=V(R);else{let p=S==="vertical"?o.key==="ArrowRight"?1:o.key==="ArrowLeft"?-1:0:o.key==="ArrowDown"?1:o.key==="ArrowUp"?-1:0;if(p===0)return;let K=o.shiftKey?32:8;C=V(c+p*K*b(getComputedStyle(u).direction==="rtl"))}o.preventDefault(),Y?.(c),h(u,C),T?.(C),I?.(C)}},t)});ee.displayName="Shell.Handle";var ht=y.forwardRef((e,t)=>y.createElement(ee,{...e,ref:t}));ht.displayName="Shell.Panel.Handle";var Rt=y.forwardRef((e,t)=>y.createElement(ee,{...e,ref:t}));Rt.displayName="Shell.Sidebar.Handle";var vt=y.forwardRef((e,t)=>y.createElement(ee,{...e,ref:t}));vt.displayName="Shell.Inspector.Handle";var me=y.forwardRef((e,t)=>y.createElement(ee,{...e,ref:t}));me.displayName="Shell.Bottom.Handle";var v=J(require("react")),de=require("radix-ui/internal");var se=J(require("react"));var $e={xs:"(min-width: 520px)",sm:"(min-width: 768px)",md:"(min-width: 1024px)",lg:"(min-width: 1280px)",xl:"(min-width: 1640px)"},be=["initial","xs","sm","md","lg","xl"];var gt=Object.entries($e),ye=null,ie=new Set,te=null;function Se(){return ye??(ye=gt.map(([e,t])=>[e,window.matchMedia(t)])),ye}function Re(){let e="initial";for(let[t,n]of Se())n.matches&&(e=t);return e}function he(){let e=Re();e!==te&&(te=e,ie.forEach(t=>t()))}function Fe(e){if(typeof window>"u")return()=>{};if(ie.size===0){te=Re();for(let[,t]of Se())typeof t.addEventListener=="function"?t.addEventListener("change",he):t.addListener?.(he)}return ie.add(e),()=>{if(ie.delete(e),!(ie.size>0)){for(let[,t]of Se())try{typeof t.removeEventListener=="function"?t.removeEventListener("change",he):t.removeListener?.(he)}catch{}te=null}}}function Pt(){return typeof window>"u"?"initial":(te??(te=Re()),te)}function yt(){return"initial"}function le(){return typeof window>"u"?"initial":Re()}var St=()=>!0,xt=()=>!1,je=()=>()=>{},zt=()=>"initial";function Ue(e=!0){let t=se.useSyncExternalStore(e?Fe:je,e?Pt:zt,yt),n=se.useSyncExternalStore(e?Fe:je,St,xt);return se.useMemo(()=>({breakpoint:t,ready:n}),[t,n])}var X=J(require("react")),_e=require("radix-ui/internal");function qe(e){return typeof e=="object"&&e!==null}function ue(e,t){let n={},r=null;for(let a of be){if(e!==void 0&&!qe(e)){n[a]=e;continue}let d=qe(e)?e[a]:void 0;d!==void 0&&(r={value:d}),n[a]=r?r.value:t(a)}return n}function re(e){let t=e.initial;return be.every(n=>e[n]===t)?t:void 0}function xe(e,t){let n=re(t);if(n!==void 0)return{[`data-${e}`]:n};let r={};for(let a of be)r[`data-${e}-${a}`]=t[a];return r}function ze(e){return typeof e=="object"&&e!==null?JSON.stringify(e):String(e)}var $t=ue("fixed",()=>"fixed");function Ee(e){e.version+=1;for(let t of e.listeners)t()}function Et(e,t){return e.listeners.add(t),()=>{e.listeners.delete(t)}}var wt=X.createContext(null);function Ke(e){let t=X.useContext(wt);if(!t)throw new Error(`${e} must be used within <Shell.Root>`);return t}function We(e,t){let n=X.useCallback(r=>Et(e,r),[e]);return X.useSyncExternalStore(n,()=>e.peek===t,()=>!1)}var Ct=X.createContext(null);function Qe(e,t){let n=X.useContext(Ct);if(!n)throw new Error("Shell panes must be used within <Shell.Root>");let{registerInset:r,unregisterInset:a}=n;(0,_e.useLayoutEffect)(()=>{if(t)return r(e),()=>a(e)},[e,t,r,a])}var we=e=>typeof e=="object"&&e!==null;function kt(e){for(let t of["initial","xs","sm","md","lg","xl"]){let n=e[t];if(n!==void 0)return n}return"closed"}function Ge(e){let{name:t,label:n,propNames:r,presentationTable:a,builtIn:d}=e,m=Ke(`Shell.${n}`),N=v.useId(),w=e.id??`shell-${t}${N}`,z=e.controlled!==void 0,S=we(e.controlled);S&&(`${n}${r.controlled}${r.default}`,void 0);let F=S?e.controlled:void 0,b=F??(we(e.defaultValue)?e.defaultValue:void 0),T=ze(b),[Y,I]=v.useState(()=>typeof e.defaultValue=="string"?e.defaultValue:"auto"),k=v.useMemo(()=>F?ue(F,()=>kt(F)):ue(b,s=>d(a[s])),[T,S,a,d]),g=Y;z&&(g=F?"auto":e.controlled);let O=re(a)===void 0||g==="auto"&&re(k)===void 0,{breakpoint:A,ready:B}=Ue(O),j=s=>{let $=re(s);return $!==void 0?$:B?s[A]:void 0},L=g==="auto"?j(k):g,M=j(a),_=M==="overlay",x=L===void 0?void 0:L!=="closed",i=x===!0&&_,l=e.defaultValue,P=v.useRef({state:g,value:L,autoTable:k,defaultValue:l,controlled:z,onChange:e.onChange,toggleNext:e.toggleNext});(0,de.useLayoutEffect)(()=>{P.current={state:g,value:L,autoTable:k,defaultValue:l,controlled:z,onChange:e.onChange,toggleNext:e.toggleNext}});let h=v.useCallback(()=>{let s=P.current;return s.value!==void 0?s.value:s.state==="auto"?s.autoTable[le()]:void 0},[]),D=v.useCallback(()=>{let s=P.current;return typeof s.defaultValue=="string"?s.defaultValue:we(s.defaultValue)?s.autoTable[le()]:void 0},[]),o=v.useCallback((s,$)=>{let W=P.current;h()!==s&&(W.onChange?.(s,$),W.controlled||I(s))},[h]),u=v.useCallback(s=>{let $=P.current,W=h()??"closed",Q=$.toggleNext?$.toggleNext(W,D()):W==="closed"?"open":"closed";o(Q,s)},[o,h,D]),c=v.useRef(null),R=v.useCallback(s=>{c.current=s},[]);(0,de.useLayoutEffect)(()=>{let s={name:t,id:w,el:c.current,value:L,presentation:M,presentationTable:a,overlayLive:i,size:e.size,setValue:o,toggle:u};return m.entries.set(t,s),Ee(m),()=>{m.entries.get(t)===s&&(m.entries.delete(t),Ee(m))}},[m,t,w,L,M,a,i,e.size,o,u]);let V=v.useRef({onExpand:e.onExpand,onCollapse:e.onCollapse});(0,de.useLayoutEffect)(()=>{V.current={onExpand:e.onExpand,onCollapse:e.onCollapse}});let C=v.useRef({state:g,shown:x});v.useEffect(()=>{let s=C.current;s.state!==g&&s.shown!==void 0&&x!==void 0&&s.shown!==x&&(x?V.current.onExpand?.():V.current.onCollapse?.()),C.current={state:g,shown:x}},[g,x]),(0,de.useLayoutEffect)(()=>{},[]);let p=v.useRef(z);v.useEffect(()=>{},[z,n,r.controlled]);let K=We(m,t)&&x===!1&&!_;return{store:m,id:w,state:g,value:L,shown:x,presentation:M,overlaying:_,overlayLive:i,peeking:K,ready:B,breakpoint:A,autoTable:k,setValue:o,toggle:u,defaultHereNow:D,setElement:R}}function Xe(e,t){let{state:n,value:r,presentation:a,shown:d}=e;return{...t,"data-state":n,...n==="auto"?xe("auto",e.autoTable):{},"data-presentation":a,"data-mode":r===void 0?void 0:r==="closed"?"collapsed":"expanded","data-open":a==="stacked"&&d?"":void 0,"data-peek":e.peeking?"":void 0}}function Ye(e,t){let n=ze(e),r=v.useMemo(()=>ue(e,()=>t),[n,t]),a=v.useMemo(()=>re(r)===void 0?xe("presentation",r):{},[r]);return{table:r,attributes:a}}var f=J(require("react")),oe=require("radix-ui/internal");function Je(e,t="horizontal"){if(e==null)return;if(typeof e=="number"&&Number.isFinite(e))return e;let n=String(e).trim();if(!n)return;if(n.endsWith("px"))return Number.parseFloat(n);if(n.endsWith("rem")){let a=Number.parseFloat(getComputedStyle(document.documentElement).fontSize||"16")||16;return Number.parseFloat(n)*a}if(n.endsWith("%")){let a=Number.parseFloat(n),d=t==="horizontal"?document.documentElement.clientWidth||window.innerWidth||0:document.documentElement.clientHeight||window.innerHeight||0;return a/100*d}let r=Number.parseFloat(n);return Number.isFinite(r)?r:void 0}var Ce=(e,t,n)=>Math.max(t??e,Math.min(n??e,e));function Ze(e){let{name:t,elementRef:n,cssVarName:r,orientation:a,minSize:d,maxSize:m,resizable:N,size:w,defaultSize:z,paneId:S,persistence:F}=e,b=f.useRef(e);(0,oe.useLayoutEffect)(()=>{b.current=e});let T=f.useRef(null),Y=f.useRef(0);f.useEffect(()=>()=>{T.current&&clearTimeout(T.current)},[]);let I=f.useCallback((i,l)=>{let{onSizeChange:P,sizeUpdate:h,sizeUpdateMs:D}=b.current;if(P){if(h==="debounce"){T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{T.current=null,b.current.onSizeChange?.(i,l)},D);return}if(h==="throttle"){let o=Date.now();if(o-Y.current<D)return;Y.current=o}P(i,l)}},[]),k=f.useCallback(i=>Je(i,a==="vertical"?"horizontal":"vertical"),[a]),g=f.useRef(!1),O=f.useCallback((i,l)=>{let P=n.current;if(P){P.style.setProperty(r,`${i}px`);for(let h of P.querySelectorAll(":scope > .kui-ShellResizer"))h.setAttribute("aria-valuenow",String(Math.round(i)));l&&(g.current=!0)}},[n,r]);(0,oe.useLayoutEffect)(()=>{g.current||O(e.expandedSize,!1)},[e.expandedSize,O]),(0,oe.useLayoutEffect)(()=>{if(w!==void 0||z===void 0)return;let i=k(z);if(typeof i!="number"||!Number.isFinite(i))return;let l=Ce(i,d,m);O(l,!0),I(l,{reason:"init"})},[]),(0,oe.useLayoutEffect)(()=>{if(w===void 0||b.current.overlayingNow())return;let i=k(w);if(typeof i!="number"||!Number.isFinite(i))return;let l=Ce(i,d,m);O(l,!0),I(l,{reason:"controlled"})},[w,d,m,e.overlaying,k,O,I]);let A=F!==void 0,B=f.useMemo(()=>{if(A)return{load:()=>b.current.persistence?.load?.(),save:l=>b.current.persistence?.save?.(l)};if(!S)return;let i=`kookie-ui:shell:${t}:${S}`;return{load:()=>{if(!(typeof window>"u"))try{let l=window.localStorage.getItem(i);return l?Number(l):void 0}catch{return}},save:l=>{if(!(typeof window>"u"))try{window.localStorage.setItem(i,String(l))}catch{}}}},[t,S,A]);(0,oe.useLayoutEffect)(()=>{if(!N||!B?.load||b.current.overlayingNow())return;let i=!0,l=h=>{if(!i||typeof h!="number"||!Number.isFinite(h))return;let D=Ce(h,d,m);O(D,!0),b.current.onResize?.(D)},P=B.load();return P instanceof Promise?P.then(l).catch(h=>{}):l(P),()=>{i=!1}},[N,B,e.overlaying,O,d,m,t]);let j=f.useCallback(i=>b.current.onResize?.(i),[]),L=f.useCallback(i=>{g.current=!0,b.current.onResizeStart?.(i)},[]),M=f.useCallback(i=>{b.current.onResizeEnd?.(i),I(i,{reason:"resize"}),B?.save?.(i)},[I,B]),_=f.useCallback(()=>b.current.requestCollapse(),[]),x=f.useCallback(()=>b.current.requestToggle(),[]);return f.useMemo(()=>({containerRef:n,controls:e.elementId,cssVarName:r,minSize:d,maxSize:m,defaultSize:e.expandedSize,orientation:a,edge:e.edge,growth:e.growth,onResize:j,onResizeStart:L,onResizeEnd:M,target:t,collapsible:e.collapsible,snapPoints:e.snapPoints,snapTolerance:e.snapTolerance??8,collapseThreshold:e.collapseThreshold,requestCollapse:_,requestToggle:x}),[n,e.elementId,r,d,m,e.expandedSize,a,e.edge,e.growth,j,L,M,t,e.collapsible,e.snapPoints,e.snapTolerance,e.collapseThreshold,_,x])}function et(e,t){let n=f.Children.toArray(e),r=n.filter(d=>f.isValidElement(d)&&d.type===t),a=n.filter(d=>!(f.isValidElement(d)&&d.type===t));return{handles:r,content:a}}function Te(e){if(e===void 0)return;if(typeof e=="boolean")return e?"open":"closed";let t={};for(let[n,r]of Object.entries(e))typeof r=="boolean"&&(t[n]=r?"open":"closed");return t}var tt=()=>"closed";var nt=()=>-1;function rt(e){if(!("height"in e)&&!("resizer"in e))return e;let{height:t,resizer:n,...r}=e;return r}var Lt={controlled:"open",default:"defaultOpen"},ke=q.forwardRef((e,t)=>{let{className:n,presentation:r="fixed",defaultOpen:a,open:d,onOpenChange:m,expandedSize:N=200,minSize:w=100,maxSize:z=400,resizable:S=!1,collapsible:F=!0,onExpand:b,onCollapse:T,onResize:Y,onResizeStart:I,onResizeEnd:k,snapPoints:g,snapTolerance:O,collapseThreshold:A,paneId:B,persistence:j,children:L,style:M,size:_,defaultSize:x,onSizeChange:i,sizeUpdate:l,sizeUpdateMs:P=50,inset:h,id:D,...o}=e,{table:u,attributes:c}=Ye(r,"fixed"),R=Ge({name:"bottom",label:"Bottom",propNames:Lt,id:D,controlled:Te(d),defaultValue:Te(a),presentationTable:u,builtIn:tt,onChange:(W,Q)=>m?.(W!=="closed",{reason:Q}),onExpand:b,onCollapse:T,size:N});Qe("bottom",h),q.useEffect(()=>{(g!==void 0||A!==void 0||B!==void 0||j!==void 0)&&void 0},[g,A,B,j]);let V=q.useRef(null),C=(0,at.useComposedRefs)(t,R.setElement,V),p=Ze({name:"bottom",elementId:R.id,elementRef:V,cssVarName:"--bottom-size",orientation:"horizontal",edge:"start",growth:nt,expandedSize:N,minSize:w,maxSize:z,resizable:S,collapsible:F,size:_,defaultSize:x,onSizeChange:i,sizeUpdate:l,sizeUpdateMs:P,onResize:Y,onResizeStart:I,onResizeEnd:k,snapPoints:g,snapTolerance:O,collapseThreshold:A,paneId:B,persistence:j,overlaying:R.overlaying,overlayingNow:()=>u[le()]==="overlay",requestCollapse:()=>R.setValue("closed","toggle"),requestToggle:()=>R.toggle("toggle")}),{handles:K,content:s}=et(L,me),$=S&&R.shown!==!1&&!R.overlaying?q.createElement(Pe.Provider,{value:p},K.length>0?K:q.createElement(ee,null)):null;return q.createElement("div",{...rt(o),id:R.id,ref:C,className:(0,ot.default)("kui-ShellPane","kui-ShellBottom",n),...Xe(R,c),"data-inset":h||void 0,tabIndex:R.overlaying?-1:o.tabIndex,style:{...M,"--bottom-expanded-size":`${N}px`,"--bottom-min-size":`${w}px`,"--bottom-max-size":`${z}px`}},q.createElement("div",{className:"kui-ShellBottomContent"},s),$)});ke.displayName="Shell.Bottom";ke.Handle=me;
|
|
2
|
+
"use strict";"use client";var dt=Object.create;var pe=Object.defineProperty;var ct=Object.getOwnPropertyDescriptor;var pt=Object.getOwnPropertyNames;var ft=Object.getPrototypeOf,mt=Object.prototype.hasOwnProperty;var bt=(e,t)=>{for(var n in t)pe(e,n,{get:t[n],enumerable:!0})},He=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of pt(t))!mt.call(e,a)&&a!==n&&pe(e,a,{get:()=>t[a],enumerable:!(r=ct(t,a))||r.enumerable});return e};var J=(e,t,n)=>(n=e!=null?dt(ft(e)):{},He(t||!e||!e.__esModule?pe(n,"default",{value:e,enumerable:!0}):n,e)),ht=e=>He(pe({},"__esModule",{value:!0}),e);var Nt={};bt(Nt,{Bottom:()=>Le});module.exports=ht(Nt);var _=J(require("react")),it=J(require("classnames")),st=require("radix-ui/internal");var fe=J(require("react")),Se=fe.createContext(null);function Ae(){let e=fe.useContext(Se);if(!e)throw new Error("Shell.Handle must be used within a resizable pane");return e}var S=J(require("react")),De=require("radix-ui/internal"),$e=J(require("classnames"));var ee=S.forwardRef(({className:e,children:t,...n},r)=>{let{containerRef:a,controls:l,cssVarName:m,minSize:N,maxSize:E,defaultSize:z,orientation:x,edge:F,growth:b,onResize:T,onResizeStart:Y,onResizeEnd:I,snapPoints:k,snapTolerance:g,collapseThreshold:O,collapsible:A,target:B,requestCollapse:j,requestToggle:L}=Ae(),M=S.useRef(null),U=S.useCallback(o=>{M.current=o,typeof r=="function"?r(o):r&&(r.current=o)},[r]),P=S.useRef(null);S.useEffect(()=>()=>{P.current?.(),P.current=null},[]);let i=S.useCallback(()=>{let o=a.current;if(!o)return z;let d=Number.parseFloat(getComputedStyle(o).getPropertyValue(m));return Number.isFinite(d)?d:z},[a,m,z]),u=S.useCallback(()=>{let o=a.current,d=M.current,p=o?.closest(".kui-ShellRoot")?.getBoundingClientRect();if(!o||!p||!d)return E;let R=o.getBoundingClientRect(),V=d.getBoundingClientRect(),C=b(getComputedStyle(o).direction==="rtl"),f;x==="vertical"?f=C>0?p.right-R.left:R.right-p.left:f=C>0?p.bottom-R.top:R.bottom-p.top;let K=x==="vertical"?V.width:V.height;return!(p.width>0&&p.height>0)||!Number.isFinite(f)?E:Math.max(N,Math.min(E,Math.round(f-K)))},[a,b,E,N,x]),y=()=>{M.current?.setAttribute("aria-valuemax",String(u()))};(0,De.useLayoutEffect)(()=>{M.current?.setAttribute("aria-valuenow",String(Math.round(i())))},[i]);let h=(o,d)=>{o.style.setProperty(m,`${d}px`),M.current?.setAttribute("aria-valuenow",String(Math.round(d)))},D=B.charAt(0).toUpperCase()+B.slice(1);return S.createElement("div",{ref:U,className:(0,$e.default)("kui-ShellResizer",e),"data-orientation":x,"data-edge":F,role:"separator",tabIndex:0,"aria-label":`Resize ${D} pane`,"aria-controls":l,"aria-orientation":x,"aria-valuemin":N,"aria-valuemax":E,...n,onPointerDown:o=>{n.onPointerDown?.(o);let d=a.current;if(!d||o.defaultPrevented||o.button!==0)return;o.preventDefault();let p=o.currentTarget,R=o.pointerId;P.current?.();try{p.setPointerCapture(R)}catch{}let V=getComputedStyle(d),C=Number.parseFloat(V.getPropertyValue(m)),f=Number.isFinite(C)?C:z,K=x==="vertical"?o.clientX:o.clientY,s=b(V.direction==="rtl"),$=u();p.setAttribute("aria-valuemax",String($));let W=w=>Math.min(Math.max(w,N),$);d.setAttribute("data-resizing",""),p.setAttribute("data-dragging","");let Q=document.body,ge=Q.style.cursor,lt=Q.style.userSelect;Q.style.cursor=x==="vertical"?"col-resize":"row-resize",Q.style.userSelect="none",Y?.(f);let Z=f,Pe=f,q=0,ae=null,Ve=()=>{if(q=0,ae===null)return;let w=ae;ae=null,T?.(w)},Ne=null,Be=!1,ut=(w,ne)=>{if(w.type===ne)Be=!0;else if(Be)return!1;return!0},G=w=>{if(!ut(w,"pointermove")||w===Ne)return;Ne=w;let ne=x==="vertical"?w.clientX:w.clientY;Pe=f+(ne-K)*s,Z=W(Pe),h(d,Z),ae=Z,q||(q=requestAnimationFrame(Ve))},ce=()=>{q&&cancelAnimationFrame(q),q=0;try{p.releasePointerCapture(R)}catch{}window.removeEventListener("pointermove",G),document.removeEventListener("pointermove",G),window.removeEventListener("mousemove",G),document.removeEventListener("mousemove",G),p.removeEventListener("pointermove",G),window.removeEventListener("pointerup",H),document.removeEventListener("pointerup",H),window.removeEventListener("mouseup",H),document.removeEventListener("mouseup",H),window.removeEventListener("pointercancel",H),document.removeEventListener("pointercancel",H),window.removeEventListener("keydown",Me),p.removeEventListener("lostpointercapture",H),d.removeAttribute("data-resizing"),p.removeAttribute("data-dragging"),Q.style.cursor=ge,Q.style.userSelect=lt,P.current=null},ye=!1,H=()=>{if(ye)return;if(ye=!0,q&&cancelAnimationFrame(q),Ve(),A&&typeof O=="number"&&Pe<=O){h(d,f),T?.(f),ce(),j?.(),I?.(f);return}let w=Z;if(k&&k.length){let ne=k.reduce((Ie,Oe)=>Math.abs(Oe-Z)<Math.abs(Ie-Z)?Oe:Ie,k[0]);Math.abs(ne-Z)<=g&&(w=W(ne),h(d,w),T?.(w))}I?.(w),ce()},Me=w=>{w.key==="Escape"&&(q&&cancelAnimationFrame(q),q=0,ae=null,h(d,f),T?.(f),ye=!0,I?.(f),ce())};window.addEventListener("pointermove",G),document.addEventListener("pointermove",G),window.addEventListener("mousemove",G),document.addEventListener("mousemove",G),p.addEventListener("pointermove",G),window.addEventListener("pointerup",H),document.addEventListener("pointerup",H),window.addEventListener("mouseup",H),document.addEventListener("mouseup",H),window.addEventListener("pointercancel",H),document.addEventListener("pointercancel",H),window.addEventListener("keydown",Me),p.addEventListener("lostpointercapture",H),P.current=ce},onDoubleClick:o=>{n.onDoubleClick?.(o),!o.defaultPrevented&&A&&L?.()},onFocus:o=>{n.onFocus?.(o),y()},onKeyDown:o=>{n.onKeyDown?.(o);let d=a.current;if(!d||o.defaultPrevented)return;if(o.key==="Enter"){A&&L&&(o.preventDefault(),L());return}let p=i(),R=u(),V=f=>Math.min(Math.max(f,N),R),C;if(o.key==="Home")C=V(N);else if(o.key==="End")C=V(R);else{let f=x==="vertical"?o.key==="ArrowRight"?1:o.key==="ArrowLeft"?-1:0:o.key==="ArrowDown"?1:o.key==="ArrowUp"?-1:0;if(f===0)return;let K=o.shiftKey?32:8;C=V(p+f*K*b(getComputedStyle(d).direction==="rtl"))}o.preventDefault(),Y?.(p),h(d,C),T?.(C),I?.(C)}},t)});ee.displayName="Shell.Handle";var Rt=S.forwardRef((e,t)=>S.createElement(ee,{...e,ref:t}));Rt.displayName="Shell.Panel.Handle";var vt=S.forwardRef((e,t)=>S.createElement(ee,{...e,ref:t}));vt.displayName="Shell.Sidebar.Handle";var gt=S.forwardRef((e,t)=>S.createElement(ee,{...e,ref:t}));gt.displayName="Shell.Inspector.Handle";var me=S.forwardRef((e,t)=>S.createElement(ee,{...e,ref:t}));me.displayName="Shell.Bottom.Handle";var v=J(require("react")),de=require("radix-ui/internal");var se=J(require("react"));var Fe={xs:"(min-width: 520px)",sm:"(min-width: 768px)",md:"(min-width: 1024px)",lg:"(min-width: 1280px)",xl:"(min-width: 1640px)"},be=["initial","xs","sm","md","lg","xl"];var Pt=Object.entries(Fe),xe=null,ie=new Set,te=null;function ze(){return xe??(xe=Pt.map(([e,t])=>[e,window.matchMedia(t)])),xe}function Re(){let e="initial";for(let[t,n]of ze())n.matches&&(e=t);return e}function he(){let e=Re();e!==te&&(te=e,ie.forEach(t=>t()))}function je(e){if(typeof window>"u")return()=>{};if(ie.size===0){te=Re();for(let[,t]of ze())typeof t.addEventListener=="function"?t.addEventListener("change",he):t.addListener?.(he)}return ie.add(e),()=>{if(ie.delete(e),!(ie.size>0)){for(let[,t]of ze())try{typeof t.removeEventListener=="function"?t.removeEventListener("change",he):t.removeListener?.(he)}catch{}te=null}}}function yt(){return typeof window>"u"?"initial":(te??(te=Re()),te)}function St(){return"initial"}function le(){return typeof window>"u"?"initial":Re()}var xt=()=>!0,zt=()=>!1,Ue=()=>()=>{},Et=()=>"initial";function qe(e=!0){let t=se.useSyncExternalStore(e?je:Ue,e?yt:Et,St),n=se.useSyncExternalStore(e?je:Ue,xt,zt);return se.useMemo(()=>({breakpoint:t,ready:n}),[t,n])}var X=J(require("react")),Ke=require("radix-ui/internal");function _e(e){return typeof e=="object"&&e!==null}function ue(e,t){let n={},r=null;for(let a of be){if(e!==void 0&&!_e(e)){n[a]=e;continue}let l=_e(e)?e[a]:void 0;l!==void 0&&(r={value:l}),n[a]=r?r.value:t(a)}return n}function re(e){let t=e.initial;return be.every(n=>e[n]===t)?t:void 0}function Ee(e,t){let n=re(t);if(n!==void 0)return{[`data-${e}`]:n};let r={};for(let a of be)r[`data-${e}-${a}`]=t[a];return r}function we(e){return typeof e=="object"&&e!==null?JSON.stringify(e):String(e)}var Ft=ue("fixed",()=>"fixed");function Ce(e){e.version+=1;for(let t of e.listeners)t()}function wt(e,t){return e.listeners.add(t),()=>{e.listeners.delete(t)}}var Ct=X.createContext(null);function We(e){let t=X.useContext(Ct);if(!t)throw new Error(`${e} must be used within <Shell.Root>`);return t}function Qe(e,t){let n=X.useCallback(r=>wt(e,r),[e]);return X.useSyncExternalStore(n,()=>e.peek===t,()=>!1)}var Tt=X.createContext(null);function Ge(e,t){let n=X.useContext(Tt);if(!n)throw new Error("Shell panes must be used within <Shell.Root>");let{registerInset:r,unregisterInset:a}=n;(0,Ke.useLayoutEffect)(()=>{if(t)return r(e),()=>a(e)},[e,t,r,a])}var Te=e=>typeof e=="object"&&e!==null;function Lt(e){for(let t of["initial","xs","sm","md","lg","xl"]){let n=e[t];if(n!==void 0)return n}return"closed"}function Xe(e){let{name:t,label:n,propNames:r,presentationTable:a,builtIn:l}=e,m=We(`Shell.${n}`),N=v.useId(),E=e.id??`shell-${t}${N}`,z=e.controlled!==void 0,x=Te(e.controlled);x&&(`${n}${r.controlled}${r.default}`,void 0);let F=x?e.controlled:void 0,b=F??(Te(e.defaultValue)?e.defaultValue:void 0),T=we(b),[Y,I]=v.useState(()=>typeof e.defaultValue=="string"?e.defaultValue:"auto"),k=v.useMemo(()=>F?ue(F,()=>Lt(F)):ue(b,s=>l(a[s])),[T,x,a,l]),g=Y;z&&(g=F?"auto":e.controlled);let O=re(a)===void 0||g==="auto"&&re(k)===void 0,{breakpoint:A,ready:B}=qe(O),j=s=>{let $=re(s);return $!==void 0?$:B?s[A]:void 0},L=g==="auto"?j(k):g,M=j(a),U=M==="overlay",P=L===void 0?void 0:L!=="closed",i=P===!0&&U,u=e.defaultValue,y=v.useRef({state:g,value:L,autoTable:k,defaultValue:u,controlled:z,onChange:e.onChange,toggleNext:e.toggleNext});(0,de.useLayoutEffect)(()=>{y.current={state:g,value:L,autoTable:k,defaultValue:u,controlled:z,onChange:e.onChange,toggleNext:e.toggleNext}});let h=v.useCallback(()=>{let s=y.current;return s.value!==void 0?s.value:s.state==="auto"?s.autoTable[le()]:void 0},[]),D=v.useCallback(()=>{let s=y.current;return typeof s.defaultValue=="string"?s.defaultValue:Te(s.defaultValue)?s.autoTable[le()]:void 0},[]),o=v.useCallback((s,$)=>{let W=y.current;h()!==s&&(W.onChange?.(s,$),W.controlled||I(s))},[h]),d=v.useCallback(s=>{let $=y.current,W=h()??"closed",Q=$.toggleNext?$.toggleNext(W,D()):W==="closed"?"open":"closed";o(Q,s)},[o,h,D]),p=v.useRef(null),R=v.useCallback(s=>{p.current=s},[]);(0,de.useLayoutEffect)(()=>{let s={name:t,id:E,el:p.current,value:L,presentation:M,presentationTable:a,overlayLive:i,size:e.size,setValue:o,toggle:d};return m.entries.set(t,s),Ce(m),()=>{m.entries.get(t)===s&&(m.entries.delete(t),Ce(m))}},[m,t,E,L,M,a,i,e.size,o,d]);let V=v.useRef({onExpand:e.onExpand,onCollapse:e.onCollapse});(0,de.useLayoutEffect)(()=>{V.current={onExpand:e.onExpand,onCollapse:e.onCollapse}});let C=v.useRef({state:g,shown:P});v.useEffect(()=>{let s=C.current;s.state!==g&&s.shown!==void 0&&P!==void 0&&s.shown!==P&&(P?V.current.onExpand?.():V.current.onCollapse?.()),C.current={state:g,shown:P}},[g,P]),(0,de.useLayoutEffect)(()=>{},[]);let f=v.useRef(z);v.useEffect(()=>{},[z,n,r.controlled]);let K=Qe(m,t)&&P===!1&&!U;return{store:m,id:E,state:g,value:L,shown:P,presentation:M,overlaying:U,overlayLive:i,peeking:K,ready:B,breakpoint:A,autoTable:k,setValue:o,toggle:d,defaultHereNow:D,setElement:R}}function Ye(e,t){let{state:n,value:r,presentation:a,shown:l}=e;return{...t,"data-state":n,...n==="auto"?Ee("auto",e.autoTable):{},"data-presentation":a,"data-mode":r===void 0?void 0:r==="closed"?"collapsed":"expanded","data-open":a==="stacked"&&l?"":void 0,"data-peek":e.peeking?"":void 0}}function Je(e,t){let n=we(e),r=v.useMemo(()=>ue(e,()=>t),[n,t]),a=v.useMemo(()=>re(r)===void 0?Ee("presentation",r):{},[r]);return{table:r,attributes:a}}var c=J(require("react")),oe=require("radix-ui/internal");function Ze(e,t="horizontal"){if(e==null)return;if(typeof e=="number"&&Number.isFinite(e))return e;let n=String(e).trim();if(!n)return;if(n.endsWith("px"))return Number.parseFloat(n);if(n.endsWith("rem")){let a=Number.parseFloat(getComputedStyle(document.documentElement).fontSize||"16")||16;return Number.parseFloat(n)*a}if(n.endsWith("%")){let a=Number.parseFloat(n),l=t==="horizontal"?document.documentElement.clientWidth||window.innerWidth||0:document.documentElement.clientHeight||window.innerHeight||0;return a/100*l}let r=Number.parseFloat(n);return Number.isFinite(r)?r:void 0}var ve=(e,t,n)=>Math.max(t??e,Math.min(n??e,e));function et(e,t,n,r){let[a]=c.useState(()=>{let l=e??t;return typeof l=="number"&&Number.isFinite(l)?`${ve(l,n,r)}px`:void 0});return a}function tt(e){let{name:t,elementRef:n,cssVarName:r,orientation:a,minSize:l,maxSize:m,resizable:N,size:E,defaultSize:z,paneId:x,persistence:F}=e,b=c.useRef(e);(0,oe.useLayoutEffect)(()=>{b.current=e});let T=c.useRef(null),Y=c.useRef(0);c.useEffect(()=>()=>{T.current&&clearTimeout(T.current)},[]);let I=c.useCallback((i,u)=>{let{onSizeChange:y,sizeUpdate:h,sizeUpdateMs:D}=b.current;if(y){if(h==="debounce"){T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{T.current=null,b.current.onSizeChange?.(i,u)},D);return}if(h==="throttle"){let o=Date.now();if(o-Y.current<D)return;Y.current=o}y(i,u)}},[]),k=c.useCallback(i=>Ze(i,a==="vertical"?"horizontal":"vertical"),[a]),g=c.useRef(!1),O=c.useCallback((i,u)=>{let y=n.current;if(y){y.style.setProperty(r,`${i}px`);for(let h of y.querySelectorAll(":scope > .kui-ShellResizer"))h.setAttribute("aria-valuenow",String(Math.round(i)));u&&(g.current=!0)}},[n,r]);(0,oe.useLayoutEffect)(()=>{g.current||O(e.expandedSize,!1)},[e.expandedSize,O]),(0,oe.useLayoutEffect)(()=>{if(E!==void 0||z===void 0)return;let i=k(z);if(typeof i!="number"||!Number.isFinite(i))return;let u=ve(i,l,m);O(u,!0),I(u,{reason:"init"})},[]),(0,oe.useLayoutEffect)(()=>{if(E===void 0||b.current.overlayingNow())return;let i=k(E);if(typeof i!="number"||!Number.isFinite(i))return;let u=ve(i,l,m);O(u,!0),I(u,{reason:"controlled"})},[E,l,m,e.overlaying,k,O,I]);let A=F!==void 0,B=c.useMemo(()=>{if(A)return{load:()=>b.current.persistence?.load?.(),save:u=>b.current.persistence?.save?.(u)};if(!x)return;let i=`kookie-ui:shell:${t}:${x}`;return{load:()=>{if(!(typeof window>"u"))try{let u=window.localStorage.getItem(i);return u?Number(u):void 0}catch{return}},save:u=>{if(!(typeof window>"u"))try{window.localStorage.setItem(i,String(u))}catch{}}}},[t,x,A]);(0,oe.useLayoutEffect)(()=>{if(!N||!B?.load||b.current.overlayingNow())return;let i=!0,u=h=>{if(!i||typeof h!="number"||!Number.isFinite(h))return;let D=ve(h,l,m);O(D,!0),b.current.onResize?.(D)},y=B.load();return y instanceof Promise?y.then(u).catch(h=>{}):u(y),()=>{i=!1}},[N,B,e.overlaying,O,l,m,t]);let j=c.useCallback(i=>b.current.onResize?.(i),[]),L=c.useCallback(i=>{g.current=!0,b.current.onResizeStart?.(i)},[]),M=c.useCallback(i=>{b.current.onResizeEnd?.(i),I(i,{reason:"resize"}),B?.save?.(i)},[I,B]),U=c.useCallback(()=>b.current.requestCollapse(),[]),P=c.useCallback(()=>b.current.requestToggle(),[]);return c.useMemo(()=>({containerRef:n,controls:e.elementId,cssVarName:r,minSize:l,maxSize:m,defaultSize:e.expandedSize,orientation:a,edge:e.edge,growth:e.growth,onResize:j,onResizeStart:L,onResizeEnd:M,target:t,collapsible:e.collapsible,snapPoints:e.snapPoints,snapTolerance:e.snapTolerance??8,collapseThreshold:e.collapseThreshold,requestCollapse:U,requestToggle:P}),[n,e.elementId,r,l,m,e.expandedSize,a,e.edge,e.growth,j,L,M,t,e.collapsible,e.snapPoints,e.snapTolerance,e.collapseThreshold,U,P])}function nt(e,t){let n=c.Children.toArray(e),r=n.filter(l=>c.isValidElement(l)&&l.type===t),a=n.filter(l=>!(c.isValidElement(l)&&l.type===t));return{handles:r,content:a}}function ke(e){if(e===void 0)return;if(typeof e=="boolean")return e?"open":"closed";let t={};for(let[n,r]of Object.entries(e))typeof r=="boolean"&&(t[n]=r?"open":"closed");return t}var rt=()=>"closed";var ot=()=>-1;function at(e){if(!("height"in e)&&!("resizer"in e))return e;let{height:t,resizer:n,...r}=e;return r}var Vt={controlled:"open",default:"defaultOpen"},Le=_.forwardRef((e,t)=>{let{className:n,presentation:r="fixed",defaultOpen:a,open:l,onOpenChange:m,expandedSize:N=200,minSize:E=100,maxSize:z=400,resizable:x=!1,collapsible:F=!0,onExpand:b,onCollapse:T,onResize:Y,onResizeStart:I,onResizeEnd:k,snapPoints:g,snapTolerance:O,collapseThreshold:A,paneId:B,persistence:j,children:L,style:M,size:U,defaultSize:P,onSizeChange:i,sizeUpdate:u,sizeUpdateMs:y=50,inset:h,id:D,...o}=e,{table:d,attributes:p}=Je(r,"fixed"),R=Xe({name:"bottom",label:"Bottom",propNames:Vt,id:D,controlled:ke(l),defaultValue:ke(a),presentationTable:d,builtIn:rt,onChange:(Q,ge)=>m?.(Q!=="closed",{reason:ge}),onExpand:b,onCollapse:T,size:N});Ge("bottom",h),_.useEffect(()=>{(g!==void 0||A!==void 0||B!==void 0||j!==void 0)&&void 0},[g,A,B,j]);let V=_.useRef(null),C=(0,st.useComposedRefs)(t,R.setElement,V),f=tt({name:"bottom",elementId:R.id,elementRef:V,cssVarName:"--bottom-size",orientation:"horizontal",edge:"start",growth:ot,expandedSize:N,minSize:E,maxSize:z,resizable:x,collapsible:F,size:U,defaultSize:P,onSizeChange:i,sizeUpdate:u,sizeUpdateMs:y,onResize:Y,onResizeStart:I,onResizeEnd:k,snapPoints:g,snapTolerance:O,collapseThreshold:A,paneId:B,persistence:j,overlaying:R.overlaying,overlayingNow:()=>d[le()]==="overlay",requestCollapse:()=>R.setValue("closed","toggle"),requestToggle:()=>R.toggle("toggle")}),K=et(U,P,E,z),{handles:s,content:$}=nt(L,me),W=x&&R.shown!==!1&&!R.overlaying?_.createElement(Se.Provider,{value:f},s.length>0?s:_.createElement(ee,null)):null;return _.createElement("div",{...at(o),id:R.id,ref:C,className:(0,it.default)("kui-ShellPane","kui-ShellBottom",n),...Ye(R,p),"data-inset":h||void 0,tabIndex:R.overlaying?-1:o.tabIndex,style:{...M,"--bottom-expanded-size":`${N}px`,...K?{"--bottom-size":K}:{},"--bottom-min-size":`${E}px`,"--bottom-max-size":`${z}px`}},_.createElement("div",{className:"kui-ShellBottomContent"},$),W)});Le.displayName="Shell.Bottom";Le.Handle=me;
|
|
3
3
|
//# sourceMappingURL=shell-bottom.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/_internal/shell-bottom.tsx", "../../../../src/components/_internal/shell-resize.tsx", "../../../../src/components/_internal/shell-handles.tsx", "../../../../src/components/_internal/shell-pane.tsx", "../../../../src/hooks/use-breakpoint.ts", "../../../../src/components/shell.types.ts", "../../../../src/components/_internal/shell-store.tsx", "../../../../src/components/_internal/shell-resizable.tsx", "../../../../src/helpers/normalize-to-px.ts", "../../../../src/components/_internal/shell-rest.ts"],
|
|
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 { BottomHandle, 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 { bottomAnchoredGrowth, detailRest, toPaneValue, withoutRemovedPaneProps } from './shell-rest.js';\nimport { readBreakpoint } from '../../hooks/use-breakpoint.js';\nimport type { Breakpoint, CSSPropertiesWithVars, PaneBaseProps } from '../shell.types.js';\n\ntype BottomOpenChangeMeta = { reason: 'init' | 'toggle' | 'responsive' | 'dismiss' };\ntype BottomControlledProps = { open: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: BottomOpenChangeMeta) => void; defaultOpen?: never };\n/** Since 0.8.0 `defaultOpen` takes a responsive object here too, as the docs already said it did. */\ntype BottomUncontrolledProps = { defaultOpen?: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: BottomOpenChangeMeta) => void; open?: never };\ntype BottomSizeControlledProps = { size: number | string; defaultSize?: never };\ntype BottomSizeUncontrolledProps = { defaultSize?: number | string; size?: never };\ntype BottomPublicProps = PaneBaseProps &\n (BottomControlledProps | BottomUncontrolledProps) &\n (BottomSizeControlledProps | BottomSizeUncontrolledProps) & {\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 BottomComponent = React.ForwardRefExoticComponent<BottomPublicProps & React.RefAttributes<HTMLDivElement>> & { Handle: typeof BottomHandle };\n\nconst BOTTOM_PROP_NAMES = { controlled: 'open', default: 'defaultOpen' };\n\nexport const Bottom = React.forwardRef<HTMLDivElement, BottomPublicProps>((props, ref) => {\n const {\n className,\n presentation = 'fixed',\n defaultOpen,\n open,\n onOpenChange,\n expandedSize = 200,\n minSize = 100,\n maxSize = 400,\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 size,\n defaultSize,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs = 50,\n inset,\n id,\n ...domProps\n } = props;\n\n const { table, attributes } = usePresentationTable(presentation, 'fixed');\n const pane = usePane({\n name: 'bottom',\n label: 'Bottom',\n propNames: BOTTOM_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('bottom', inset);\n\n React.useEffect(() => {\n if (snapPoints !== undefined || collapseThreshold !== undefined || paneId !== undefined || persistence !== undefined) {\n warnOnce('Shell.Bottom: `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: 'bottom',\n elementId: pane.id,\n elementRef,\n cssVarName: '--bottom-size',\n orientation: 'horizontal',\n edge: 'start',\n growth: bottomAnchoredGrowth,\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, BottomHandle);\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('kui-ShellPane', 'kui-ShellBottom', className)}\n {...paneAttributes(pane, attributes)}\n data-inset={inset || undefined}\n tabIndex={pane.overlaying ? -1 : domProps.tabIndex}\n style={\n {\n ...style,\n '--bottom-expanded-size': `${expandedSize}px`,\n '--bottom-min-size': `${minSize}px`,\n '--bottom-max-size': `${maxSize}px`,\n } as CSSPropertiesWithVars\n }\n >\n <div className=\"kui-ShellBottomContent\">{content}</div>\n {handle}\n </div>\n );\n}) as BottomComponent;\n\nBottom.displayName = 'Shell.Bottom';\nBottom.Handle = BottomHandle;\n\nexport type { BottomPublicProps };\n", "import * as React from 'react';\nimport type { PaneName } from '../shell.types.js';\n\nexport interface PaneResizeContextValue {\n containerRef: React.RefObject<HTMLElement | null>;\n /** The pane the handle resizes, for `aria-controls`. */\n controls: string;\n cssVarName: string;\n minSize: number;\n maxSize: number;\n defaultSize: number;\n orientation: 'vertical' | 'horizontal';\n edge: 'start' | 'end';\n /**\n * +1 when moving the pointer toward the end of its axis grows the pane, -1\n * when it shrinks it. Read once when a drag starts, with the pane's\n * resolved direction, so no move pays for a style read.\n */\n growth: (isRtl: boolean) => 1 | -1;\n onResize?: (size: number) => void;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n target: PaneName;\n collapsible: boolean;\n snapPoints?: number[];\n snapTolerance: number;\n collapseThreshold?: number;\n requestCollapse?: () => void;\n requestToggle?: () => void;\n}\n\nexport const PaneResizeContext = React.createContext<PaneResizeContextValue | null>(null);\n\nexport function usePaneResize() {\n const ctx = React.useContext(PaneResizeContext);\n if (!ctx) throw new Error('Shell.Handle must be used within a resizable pane');\n return ctx;\n}\n", "import * as React from 'react';\nimport { useLayoutEffect } from 'radix-ui/internal';\nimport classNames from 'classnames';\nimport { usePaneResize } from './shell-resize.js';\n\n/**\n * The resize handle: the WAI-ARIA window splitter. `role=\"separator\"` with a\n * value, focusable because it is operable, `aria-controls` naming its pane.\n *\n * A drag writes the size variable directly on the pane and sets no React\n * state, so nothing re-renders per move. `onResize` is called at most once per\n * animation frame, and once more with the final size when the drag ends. The\n * direction and the ceiling are read once, when the drag starts.\n */\nexport const PaneHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>(({ className, children, ...props }, ref) => {\n const {\n containerRef,\n controls,\n cssVarName,\n minSize,\n maxSize,\n defaultSize,\n orientation,\n edge,\n growth,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n collapsible,\n target,\n requestCollapse,\n requestToggle,\n } = usePaneResize();\n\n const handleRef = React.useRef<HTMLDivElement | null>(null);\n const setRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n handleRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n },\n [ref],\n );\n\n const activeCleanupRef = React.useRef<(() => void) | null>(null);\n React.useEffect(\n () => () => {\n activeCleanupRef.current?.();\n activeCleanupRef.current = null;\n },\n [],\n );\n\n /** The pane's size as the stylesheet sees it. Read at the edges of a gesture, never during one. */\n const readSize = React.useCallback(() => {\n const container = containerRef.current;\n if (!container) return defaultSize;\n const parsed = Number.parseFloat(getComputedStyle(container).getPropertyValue(cssVarName));\n return Number.isFinite(parsed) ? parsed : defaultSize;\n }, [containerRef, cssVarName, defaultSize]);\n\n /**\n * The largest size a resize may reach: the stated maximum, and never so\n * large that the handle leaves the frame. The room is measured from the\n * pane's anchored edge, which does not move, to the far edge of the frame,\n * so a pane that starts after a Rail has less room than the frame's width.\n * Without the cap a pane with a generous `maxSize` could be resized until\n * its own handle was off screen.\n */\n const ceiling = React.useCallback(() => {\n const container = containerRef.current;\n const handle = handleRef.current;\n const frame = container?.closest('.kui-ShellRoot')?.getBoundingClientRect();\n if (!container || !frame || !handle) return maxSize;\n const pane = container.getBoundingClientRect();\n const hitBox = handle.getBoundingClientRect();\n const sign = growth(getComputedStyle(container).direction === 'rtl');\n let room: number;\n if (orientation === 'vertical') room = sign > 0 ? frame.right - pane.left : pane.right - frame.left;\n else room = sign > 0 ? frame.bottom - pane.top : pane.bottom - frame.top;\n const hit = orientation === 'vertical' ? hitBox.width : hitBox.height;\n if (!(frame.width > 0 && frame.height > 0) || !Number.isFinite(room)) return maxSize;\n return Math.max(minSize, Math.min(maxSize, Math.round(room - hit)));\n }, [containerRef, growth, maxSize, minSize, orientation]);\n\n // The announced maximum is what a resize can reach now, not only the prop.\n const announceCeiling = () => {\n handleRef.current?.setAttribute('aria-valuemax', String(ceiling()));\n };\n\n // The announced value is seeded from the real size once the pane has a box.\n useLayoutEffect(() => {\n handleRef.current?.setAttribute('aria-valuenow', String(Math.round(readSize())));\n }, [readSize]);\n\n const write = (container: HTMLElement, size: number) => {\n container.style.setProperty(cssVarName, `${size}px`);\n handleRef.current?.setAttribute('aria-valuenow', String(Math.round(size)));\n };\n\n const targetLabel = target.charAt(0).toUpperCase() + target.slice(1);\n\n return (\n // A focusable separator with a value is the WAI-ARIA window splitter, an\n // interactive widget; jsx-a11y classes every separator as static.\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n <div\n ref={setRef}\n className={classNames('kui-ShellResizer', className)}\n data-orientation={orientation}\n data-edge={edge}\n role=\"separator\"\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={0}\n aria-label={`Resize ${targetLabel} pane`}\n aria-controls={controls}\n aria-orientation={orientation}\n aria-valuemin={minSize}\n aria-valuemax={maxSize}\n {...props}\n onPointerDown={(e) => {\n props.onPointerDown?.(e);\n const container = containerRef.current;\n if (!container || e.defaultPrevented || e.button !== 0) return;\n e.preventDefault();\n const handleEl = e.currentTarget as HTMLElement;\n const pointerId = e.pointerId;\n activeCleanupRef.current?.();\n try {\n handleEl.setPointerCapture(pointerId);\n } catch {\n // Capture can fail for a pointer that is already gone; the window listeners below still carry the drag.\n }\n\n // Everything a move needs is read here, once.\n const startStyle = getComputedStyle(container);\n const parsedStart = Number.parseFloat(startStyle.getPropertyValue(cssVarName));\n const startSize = Number.isFinite(parsedStart) ? parsedStart : defaultSize;\n const startClient = orientation === 'vertical' ? e.clientX : e.clientY;\n const sign = growth(startStyle.direction === 'rtl');\n const cap = ceiling();\n handleEl.setAttribute('aria-valuemax', String(cap));\n const clamp = (v: number) => Math.min(Math.max(v, minSize), cap);\n\n container.setAttribute('data-resizing', '');\n handleEl.setAttribute('data-dragging', '');\n const body = document.body;\n const prevCursor = body.style.cursor;\n const prevUserSelect = body.style.userSelect;\n body.style.cursor = orientation === 'vertical' ? 'col-resize' : 'row-resize';\n body.style.userSelect = 'none';\n onResizeStart?.(startSize);\n\n let current = startSize;\n // The unclamped size, so `collapseThreshold` is compared before the\n // clamp: a threshold below `minSize` can then still collapse the pane.\n let raw = startSize;\n let frame = 0;\n let pending: number | null = null;\n const flush = () => {\n frame = 0;\n if (pending === null) return;\n const size = pending;\n pending = null;\n onResize?.(size);\n };\n\n // The move handler listens on the handle, the document and the window,\n // so a drag survives environments where pointer events do not reach\n // all three. One movement can therefore arrive several times: once per\n // node it propagates through, and again as the compatibility mouse\n // event. Only the first copy does any work.\n let lastHandledMove: Event | null = null;\n let seenPointerEvent = false;\n const shouldHandle = (ev: Event, pointerType: string) => {\n if (ev.type === pointerType) seenPointerEvent = true;\n else if (seenPointerEvent) return false;\n return true;\n };\n\n const handleMove = (ev: PointerEvent) => {\n if (!shouldHandle(ev, 'pointermove')) return;\n if (ev === lastHandledMove) return;\n lastHandledMove = ev;\n const client = orientation === 'vertical' ? ev.clientX : ev.clientY;\n raw = startSize + (client - startClient) * sign;\n current = clamp(raw);\n write(container, current);\n pending = current;\n if (!frame) frame = requestAnimationFrame(flush);\n };\n\n const cleanup = () => {\n if (frame) cancelAnimationFrame(frame);\n frame = 0;\n try {\n handleEl.releasePointerCapture(pointerId);\n } catch {\n // Already released.\n }\n window.removeEventListener('pointermove', handleMove as EventListener);\n document.removeEventListener('pointermove', handleMove as EventListener);\n window.removeEventListener('mousemove', handleMove as EventListener);\n document.removeEventListener('mousemove', handleMove as EventListener);\n handleEl.removeEventListener('pointermove', handleMove as EventListener);\n window.removeEventListener('pointerup', handleUp as EventListener);\n document.removeEventListener('pointerup', handleUp as EventListener);\n window.removeEventListener('mouseup', handleUp as EventListener);\n document.removeEventListener('mouseup', handleUp as EventListener);\n window.removeEventListener('pointercancel', handleUp as EventListener);\n document.removeEventListener('pointercancel', handleUp as EventListener);\n window.removeEventListener('keydown', handleKey as EventListener);\n handleEl.removeEventListener('lostpointercapture', handleUp as EventListener);\n container.removeAttribute('data-resizing');\n handleEl.removeAttribute('data-dragging');\n body.style.cursor = prevCursor;\n body.style.userSelect = prevUserSelect;\n activeCleanupRef.current = null;\n };\n\n let finished = false;\n const handleUp = () => {\n if (finished) return;\n finished = true;\n // The last move's size is delivered now rather than on the next frame.\n if (frame) cancelAnimationFrame(frame);\n flush();\n\n if (collapsible && typeof collapseThreshold === 'number' && raw <= collapseThreshold) {\n // A drag past the threshold closes the pane and keeps no size: the\n // pane opens again at the size it had before the drag. The drag\n // still ends, at that size, so a consumer that started something\n // in onResizeStart can stop it.\n write(container, startSize);\n onResize?.(startSize);\n cleanup();\n requestCollapse?.();\n onResizeEnd?.(startSize);\n return;\n }\n\n let settled = current;\n if (snapPoints && snapPoints.length) {\n const nearest = snapPoints.reduce((acc, p) => (Math.abs(p - current) < Math.abs(acc - current) ? p : acc), snapPoints[0]);\n if (Math.abs(nearest - current) <= snapTolerance) {\n settled = clamp(nearest);\n write(container, settled);\n onResize?.(settled);\n }\n }\n onResizeEnd?.(settled);\n cleanup();\n };\n\n const handleKey = (kev: KeyboardEvent) => {\n if (kev.key !== 'Escape') return;\n if (frame) cancelAnimationFrame(frame);\n frame = 0;\n pending = null;\n write(container, startSize);\n onResize?.(startSize);\n finished = true;\n onResizeEnd?.(startSize);\n cleanup();\n };\n\n window.addEventListener('pointermove', handleMove as EventListener);\n document.addEventListener('pointermove', handleMove as EventListener);\n window.addEventListener('mousemove', handleMove as EventListener);\n document.addEventListener('mousemove', handleMove as EventListener);\n handleEl.addEventListener('pointermove', handleMove as EventListener);\n window.addEventListener('pointerup', handleUp as EventListener);\n document.addEventListener('pointerup', handleUp as EventListener);\n window.addEventListener('mouseup', handleUp as EventListener);\n document.addEventListener('mouseup', handleUp as EventListener);\n window.addEventListener('pointercancel', handleUp as EventListener);\n document.addEventListener('pointercancel', handleUp as EventListener);\n window.addEventListener('keydown', handleKey as EventListener);\n handleEl.addEventListener('lostpointercapture', handleUp as EventListener);\n activeCleanupRef.current = cleanup;\n }}\n onDoubleClick={(e) => {\n props.onDoubleClick?.(e);\n if (!e.defaultPrevented && collapsible) requestToggle?.();\n }}\n onFocus={(e) => {\n props.onFocus?.(e);\n announceCeiling();\n }}\n onKeyDown={(e) => {\n props.onKeyDown?.(e);\n const container = containerRef.current;\n if (!container || e.defaultPrevented) return;\n // Enter collapses and restores the pane, as a double-click does (WAI-ARIA window splitter).\n if (e.key === 'Enter') {\n if (collapsible && requestToggle) {\n e.preventDefault();\n requestToggle();\n }\n return;\n }\n const current = readSize();\n // The keys reach as far as a drag does: the frame caps both.\n const cap = ceiling();\n const clamp = (v: number) => Math.min(Math.max(v, minSize), cap);\n let next: number | undefined;\n if (e.key === 'Home') next = clamp(minSize);\n else if (e.key === 'End') next = clamp(cap);\n else {\n // The key moves the boundary along its axis; the pane grows or\n // shrinks the way a drag in that direction would, so Bottom's\n // ArrowUp grows it and an end-anchored pane mirrors in RTL.\n const along = orientation === 'vertical' ? (e.key === 'ArrowRight' ? 1 : e.key === 'ArrowLeft' ? -1 : 0) : e.key === 'ArrowDown' ? 1 : e.key === 'ArrowUp' ? -1 : 0;\n if (along === 0) return;\n const step = e.shiftKey ? 32 : 8;\n next = clamp(current + along * step * growth(getComputedStyle(container).direction === 'rtl'));\n }\n e.preventDefault();\n onResizeStart?.(current);\n write(container, next);\n onResize?.(next);\n onResizeEnd?.(next);\n }}\n >\n {children}\n </div>\n );\n});\nPaneHandle.displayName = 'Shell.Handle';\n\nexport const PanelHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nPanelHandle.displayName = 'Shell.Panel.Handle';\n\nexport const SidebarHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nSidebarHandle.displayName = 'Shell.Sidebar.Handle';\n\nexport const InspectorHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nInspectorHandle.displayName = 'Shell.Inspector.Handle';\n\nexport const BottomHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nBottomHandle.displayName = 'Shell.Bottom.Handle';\n", "'use client';\n\nimport * as React from 'react';\nimport { useLayoutEffect } from 'radix-ui/internal';\nimport { readBreakpoint, useBreakpoint } from '../../hooks/use-breakpoint.js';\nimport type { Breakpoint, PaneName, PresentationValue } from '../shell.types.js';\nimport {\n constantOf,\n notifyShellStore,\n tableAttributes,\n tableOf,\n usePeeking,\n useShellStore,\n useStableKey,\n warnOnce,\n type OpenChangeReason,\n type PaneEntry,\n type PaneValue,\n type Table,\n} from './shell-store.js';\n\ntype ResponsiveValue = PaneValue | Partial<Record<Breakpoint, PaneValue>>;\n\nexport type UsePaneOptions = {\n name: PaneName;\n /** The component's display name, for warnings: `Inspector`, `Sidebar`, \u2026 */\n label: string;\n /** The prop names a warning should use: `open`/`defaultOpen`, or `state`/`defaultState`. */\n propNames: { controlled: string; default: string };\n id: string | undefined;\n /** The controlled value. A responsive object is deprecated: it is resolved against the current breakpoint. */\n controlled: ResponsiveValue | undefined;\n /**\n * The uncontrolled default. A single value fixes where the pane starts. A\n * responsive object leaves the pane untouched (`auto`), with that object as\n * what it shows at each breakpoint.\n */\n defaultValue: ResponsiveValue | undefined;\n /** The pane's presentation at every breakpoint. Pass a memoised table. */\n presentationTable: Table<PresentationValue>;\n /** What an untouched pane shows where no default says otherwise. Pass a module-level function. */\n builtIn: (presentation: PresentationValue) => PaneValue;\n /** Reports a change a user made. Never called on mount or on a resize. */\n onChange: ((value: PaneValue, reason: OpenChangeReason) => void) | undefined;\n /** The value a toggle moves to. Defaults to open and closed in turn. */\n toggleNext?: (current: PaneValue, defaultHere: PaneValue | undefined) => PaneValue;\n onExpand: (() => void) | undefined;\n onCollapse: (() => void) | undefined;\n /** The pane's designed open width, published for the panes beside it. */\n size: number;\n};\n\nexport type PaneController = ReturnType<typeof usePane>;\n\nconst isMap = (value: ResponsiveValue | undefined): value is Partial<Record<Breakpoint, PaneValue>> => typeof value === 'object' && value !== null;\n\n/** The first value a responsive object states, smallest breakpoint first. */\nfunction firstStated(map: Partial<Record<Breakpoint, PaneValue>>): PaneValue {\n for (const bp of ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as const) {\n const value = map[bp];\n if (value !== undefined) return value;\n }\n return 'closed';\n}\n\n/** Everything the togglable panes share: their state, their registry entry and their callbacks. */\nexport function usePane(options: UsePaneOptions) {\n const { name, label, propNames, presentationTable, builtIn } = options;\n const store = useShellStore(`Shell.${label}`);\n const generatedId = React.useId();\n const id = options.id ?? `shell-${name}${generatedId}`;\n\n const controlled = options.controlled !== undefined;\n const controlledIsMap = isMap(options.controlled);\n if (controlledIsMap) {\n warnOnce(\n `Shell.${label}: a responsive \\`${propNames.controlled}\\` is deprecated and is removed in 1.0. ` +\n `Pass a boolean and decide it from your own state, or use \\`${propNames.default}\\` with a responsive object.`,\n );\n }\n\n // A responsive controlled value is resolved the way a responsive default\n // is: it becomes the table an untouched pane follows, so the stylesheet\n // answers it at each breakpoint (right in the server HTML, with no\n // callback on a crossing) and the app's prop is still the only writer.\n const controlledMap = controlledIsMap ? (options.controlled as Partial<Record<Breakpoint, PaneValue>>) : undefined;\n const autoSource = controlledMap ?? (isMap(options.defaultValue) ? options.defaultValue : undefined);\n const autoKey = useStableKey(autoSource);\n const [inner, setInner] = React.useState<'auto' | PaneValue>(() => (typeof options.defaultValue === 'string' ? options.defaultValue : 'auto'));\n\n // What an untouched pane shows at each breakpoint: a responsive default\n // where it states one, the pane's own default where it does not.\n const autoTable = React.useMemo(\n () => (controlledMap ? tableOf<PaneValue>(controlledMap, () => firstStated(controlledMap)) : tableOf<PaneValue>(autoSource, (bp) => builtIn(presentationTable[bp]))),\n // `autoKey` stands for the responsive object, which is usually a new literal each render.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [autoKey, controlledIsMap, presentationTable, builtIn],\n );\n\n let state: 'auto' | PaneValue = inner;\n if (controlled) state = controlledMap ? 'auto' : (options.controlled as PaneValue);\n\n // Only a pane whose answer depends on the window subscribes to it, so a\n // pane with one presentation and one default never re-renders on a resize.\n const needsBreakpoint = constantOf(presentationTable) === undefined || (state === 'auto' && constantOf(autoTable) === undefined);\n const { breakpoint, ready } = useBreakpoint(needsBreakpoint);\n\n /** A table's value now: known without the window when it holds one value, else once the breakpoint is known. */\n const now = <T,>(table: Table<T>): T | undefined => {\n const constant = constantOf(table);\n if (constant !== undefined) return constant;\n return ready ? table[breakpoint] : undefined;\n };\n\n const value: PaneValue | undefined = state === 'auto' ? now(autoTable) : state;\n const presentation = now(presentationTable);\n const overlaying = presentation === 'overlay';\n const shown = value === undefined ? undefined : value !== 'closed';\n const overlayLive = shown === true && overlaying;\n\n // Stable actions over the latest values, so the registry entry changes only\n // when a fact it carries changes.\n const defaultValue = options.defaultValue;\n const latest = React.useRef({ state, value, autoTable, defaultValue, controlled, onChange: options.onChange, toggleNext: options.toggleNext });\n useLayoutEffect(() => {\n latest.current = { state, value, autoTable, defaultValue, controlled, onChange: options.onChange, toggleNext: options.toggleNext };\n });\n\n /**\n * What the pane shows, and its default, at the window's breakpoint right\n * now. Asked at the moment of an action rather than taken from the last\n * render: a touched pane no longer follows the window, and a click can land\n * before the mirror has resolved after hydration.\n */\n const valueNow = React.useCallback((): PaneValue | undefined => {\n const current = latest.current;\n if (current.value !== undefined) return current.value;\n return current.state === 'auto' ? current.autoTable[readBreakpoint()] : undefined;\n }, []);\n const defaultHereNow = React.useCallback((): PaneValue | undefined => {\n const current = latest.current;\n if (typeof current.defaultValue === 'string') return current.defaultValue;\n return isMap(current.defaultValue) ? current.autoTable[readBreakpoint()] : undefined;\n }, []);\n\n const setValue = React.useCallback(\n (next: PaneValue, reason: OpenChangeReason) => {\n const current = latest.current;\n if (valueNow() === next) return;\n current.onChange?.(next, reason);\n if (!current.controlled) setInner(next);\n },\n [valueNow],\n );\n\n const toggle = React.useCallback(\n (reason: OpenChangeReason) => {\n const current = latest.current;\n const from = valueNow() ?? 'closed';\n const next = current.toggleNext ? current.toggleNext(from, defaultHereNow()) : from === 'closed' ? 'open' : 'closed';\n setValue(next, reason);\n },\n [setValue, valueNow, defaultHereNow],\n );\n\n // The pane's element, for the Root's containment and focus.\n const elementRef = React.useRef<HTMLElement | null>(null);\n const setElement = React.useCallback((node: HTMLElement | null) => {\n elementRef.current = node;\n }, []);\n\n // Registration. A layout effect so a Trigger's aria attributes and the\n // Root's containment are right before the browser paints.\n useLayoutEffect(() => {\n const entry: PaneEntry = {\n name,\n id,\n el: elementRef.current,\n value,\n presentation,\n presentationTable,\n overlayLive,\n size: options.size,\n setValue,\n toggle,\n };\n store.entries.set(name, entry);\n notifyShellStore(store);\n return () => {\n if (store.entries.get(name) === entry) {\n store.entries.delete(name);\n notifyShellStore(store);\n }\n };\n }, [store, name, id, value, presentation, presentationTable, overlayLive, options.size, setValue, toggle]);\n\n // onExpand/onCollapse fire when the pane's state changes and that changes\n // whether it is shown: a user's toggle, or a controlled prop. Never on\n // mount, and never because the window crossed a breakpoint.\n const callbacks = React.useRef({ onExpand: options.onExpand, onCollapse: options.onCollapse });\n useLayoutEffect(() => {\n callbacks.current = { onExpand: options.onExpand, onCollapse: options.onCollapse };\n });\n const previous = React.useRef({ state, shown });\n React.useEffect(() => {\n const before = previous.current;\n if (before.state !== state && before.shown !== undefined && shown !== undefined && before.shown !== shown) {\n if (shown) callbacks.current.onExpand?.();\n else callbacks.current.onCollapse?.();\n }\n previous.current = { state, shown };\n }, [state, shown]);\n\n // Development guards. Once per mount, not once per render.\n useLayoutEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n if (options.controlled !== undefined && options.defaultValue !== undefined) {\n console.error(`Shell.${label}: Do not pass both \\`${propNames.controlled}\\` and \\`${propNames.default}\\`. Choose one.`);\n }\n // Mount only: this is the once-per-mount guard.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n const wasControlled = React.useRef(controlled);\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n if (wasControlled.current !== controlled) {\n console.warn(`Shell.${label}: Switching between controlled and uncontrolled \\`${propNames.controlled}\\` is not supported.`);\n wasControlled.current = controlled;\n }\n }, [controlled, label, propNames.controlled]);\n\n const peeking = usePeeking(store, name) && shown === false && !overlaying;\n\n return {\n store,\n id,\n state,\n value,\n shown,\n presentation,\n overlaying,\n overlayLive,\n peeking,\n ready,\n breakpoint,\n autoTable,\n setValue,\n toggle,\n defaultHereNow,\n setElement,\n };\n}\n\n/** The data attributes every togglable pane renders. */\nexport function paneAttributes(pane: PaneController, presentationAttributes: Record<string, string>) {\n const { state, value, presentation, shown } = pane;\n return {\n ...presentationAttributes,\n 'data-state': state,\n ...(state === 'auto' ? tableAttributes('auto', pane.autoTable) : {}),\n 'data-presentation': presentation,\n 'data-mode': value === undefined ? undefined : value === 'closed' ? 'collapsed' : 'expanded',\n // Kept for stylesheets written against 0.7: set while a stacked pane is open.\n 'data-open': presentation === 'stacked' && shown ? '' : undefined,\n 'data-peek': pane.peeking ? '' : undefined,\n } as const;\n}\n\n/** A pane's own presentation, as a table and as the attributes the stylesheet reads. */\nexport function usePresentationTable(presentation: Parameters<typeof tableOf<PresentationValue>>[0], fallback: PresentationValue) {\n const key = useStableKey(presentation);\n const table = React.useMemo(\n () => tableOf<PresentationValue>(presentation, () => fallback),\n // `key` stands for `presentation`, which is usually a new literal each render.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [key, fallback],\n );\n // One value is the plain `data-presentation` the pane renders anyway; several\n // are written per breakpoint, so the stylesheet can place the pane before\n // any script runs.\n const attributes = React.useMemo(() => (constantOf(table) === undefined ? tableAttributes('presentation', table) : ({} as Record<string, string>)), [table]);\n return { table, attributes };\n}\n", "'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", "import type * as React from 'react';\n\nexport type PresentationValue = 'fixed' | 'overlay' | 'stacked';\n\nexport type ResponsivePresentation = PresentationValue | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PresentationValue>>;\n\nexport type PaneMode = 'expanded' | 'collapsed';\nexport type SidebarMode = 'collapsed' | 'expanded';\n\nexport type ResponsiveMode = PaneMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PaneMode>>;\n\nexport type ResponsiveSidebarMode = SidebarMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', SidebarMode>>;\n\nexport type Responsive<T> = T | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', T>>;\n\nexport type PaneSizePersistence = {\n load?: () => number | Promise<number | undefined> | undefined;\n save?: (size: number) => void | Promise<void>;\n};\n\n/**\n * Why a pane's open state changed. Since 0.8.0 only a user action is reported:\n * `toggle` for a Trigger, a handle double-click or a drag past\n * `collapseThreshold`, and `dismiss` for Escape or a press on the scrim.\n * `init`, `responsive`, `panel` and `left` are kept in the types for\n * compatibility and are never sent.\n */\nexport type PaneOpenChangeReason = 'toggle' | 'dismiss' | 'init' | 'responsive';\n\nexport interface PaneBaseProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n expandedSize?: number;\n minSize?: number;\n maxSize?: number;\n resizable?: boolean;\n collapsible?: boolean;\n /** @deprecated Use `onOpenChange`. Still called when a user's toggle or a controlled prop changes whether the pane is shown; never on mount or when the window crosses a breakpoint. */\n onExpand?: () => void;\n /** @deprecated Use `onOpenChange`. Still called when a user's toggle or a controlled prop changes whether the pane is shown; never on mount or when the window crosses a breakpoint. */\n onCollapse?: () => void;\n onResize?: (size: number) => void;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n /** @deprecated Removed in 1.0. Snap in your own `onSizeChange` and pass `size`. */\n snapPoints?: number[];\n /** @deprecated Removed in 1.0, with `snapPoints`. */\n snapTolerance?: number;\n /** @deprecated Removed in 1.0. Close the pane from your own `onResizeEnd`. */\n collapseThreshold?: number;\n /** @deprecated Removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`. */\n paneId?: string;\n /** @deprecated Removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`. */\n persistence?: PaneSizePersistence;\n}\n\nexport const _BREAKPOINTS = {\n xs: '(min-width: 520px)',\n sm: '(min-width: 768px)',\n md: '(min-width: 1024px)',\n lg: '(min-width: 1280px)',\n xl: '(min-width: 1640px)',\n} as const;\n\nexport type Breakpoint = 'initial' | keyof typeof _BREAKPOINTS;\n\n/** Every breakpoint, smallest first. The stylesheet's @media blocks follow this order. */\nexport const SHELL_BREAKPOINTS: readonly Breakpoint[] = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'];\n\nexport type PaneTarget = 'left' | 'rail' | 'panel' | 'sidebar' | 'inspector' | 'bottom';\n\n/** The panes a Trigger can drive. `left` is the deprecated name for `rail`. */\nexport type PaneName = Exclude<PaneTarget, 'left'>;\n\n/**\n * CSS custom property key type for type-safe style objects.\n * Allows any string prefixed with '--'.\n */\nexport type CSSCustomProperty = `--${string}`;\n\n/**\n * Style object that supports CSS custom properties.\n */\nexport type CSSPropertiesWithVars = React.CSSProperties & {\n [key: CSSCustomProperty]: string | number | undefined;\n};\n", "'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`.\n * `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 { useLayoutEffect } from 'radix-ui/internal';\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 or closed. */\nexport type PaneValue = 'open' | '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 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", "'use client';\n\nimport * as React from 'react';\nimport { useLayoutEffect } from 'radix-ui/internal';\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/**\n * The pane's starting size for the first render, so the server HTML already has it and the first\n * paint is right. Only a number can be known before the pane exists (a percentage needs the\n * Shell's width); the effects below still own the size after mount.\n */\nexport function useInitialPaneSize(size: number | string | undefined, defaultSize: number | string | undefined, minSize: number, maxSize: number) {\n const [initial] = React.useState(() => {\n const value = size ?? defaultSize;\n return typeof value === 'number' && Number.isFinite(value) ? `${clampTo(value, minSize, maxSize)}px` : undefined;\n });\n return initial;\n}\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 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 > .kui-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 useLayoutEffect(() => {\n if (!ownedRef.current) writeSize(options.expandedSize, false);\n }, [options.expandedSize, writeSize]);\n\n // defaultSize: applied once, on mount.\n 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 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. A given one is read through\n // `latest`, so an inline object (the documented shape) does not reload the size every render.\n const hasPersistence = persistence !== undefined;\n const adapter = React.useMemo<PaneSizePersistence | undefined>(() => {\n if (hasPersistence) {\n return {\n load: () => latest.current.persistence?.load?.(),\n save: (value: number) => latest.current.persistence?.save?.(value),\n };\n }\n if (!paneId) return undefined;\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, hasPersistence]);\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 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", "/**\n * Normalize CSS length values to pixels.\n * Supports: px, rem, %, and bare numbers.\n *\n * @param value - The value to normalize (number, string, or undefined)\n * @param orientation - 'horizontal' for width-based % or 'vertical' for height-based %\n * @returns The value in pixels, or undefined if invalid\n */\nexport function normalizeToPx(\n value: number | string | undefined,\n orientation: 'horizontal' | 'vertical' = 'horizontal',\n): number | undefined {\n if (value == null) return undefined;\n if (typeof value === 'number' && Number.isFinite(value)) return value;\n\n const str = String(value).trim();\n if (!str) return undefined;\n\n // px: direct parse\n if (str.endsWith('px')) return Number.parseFloat(str);\n\n // rem: multiply by root font size\n if (str.endsWith('rem')) {\n const rem = Number.parseFloat(getComputedStyle(document.documentElement).fontSize || '16') || 16;\n return Number.parseFloat(str) * rem;\n }\n\n // %: calculate based on viewport dimension\n if (str.endsWith('%')) {\n const pct = Number.parseFloat(str);\n const base =\n orientation === 'horizontal'\n ? document.documentElement.clientWidth || window.innerWidth || 0\n : document.documentElement.clientHeight || window.innerHeight || 0;\n return (pct / 100) * base;\n }\n\n // Bare number-like string\n const n = Number.parseFloat(str);\n return Number.isFinite(n) ? n : undefined;\n}\n\n", "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": ";2lBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,YAAAE,KAAA,eAAAC,GAAAH,IAEA,IAAAI,EAAuB,oBACvBC,GAAuB,yBACvBC,GAAgC,6BCJhC,IAAAC,GAAuB,oBA+BVC,GAA0B,iBAA6C,IAAI,EAEjF,SAASC,IAAgB,CAC9B,IAAMC,EAAY,cAAWF,EAAiB,EAC9C,GAAI,CAACE,EAAK,MAAM,IAAI,MAAM,mDAAmD,EAC7E,OAAOA,CACT,CCrCA,IAAAC,EAAuB,oBACvBC,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WAAa,GAAKJ,EAAS,SAC1C,MACE,CACE,GAAGR,EACH,yBAA0B,GAAGhB,CAAY,KACzC,oBAAqB,GAAGC,CAAO,KAC/B,oBAAqB,GAAGC,CAAO,IACjC,GAGF,gBAAC,OAAI,UAAU,0BAA0BwC,CAAQ,EAChDG,CACH,CAEJ,CAAC,EAEDrD,GAAO,YAAc,eACrBA,GAAO,OAASoD",
|
|
6
|
-
"names": ["shell_bottom_exports", "__export", "Bottom", "__toCommonJS", "React", "import_classnames", "import_internal", "React", "PaneResizeContext", "usePaneResize", "ctx", "React", "import_internal", "import_classnames", "PaneHandle", "className", "children", "props", "ref", "containerRef", "controls", "cssVarName", "minSize", "maxSize", "defaultSize", "orientation", "edge", "growth", "onResize", "onResizeStart", "onResizeEnd", "snapPoints", "snapTolerance", "collapseThreshold", "collapsible", "target", "requestCollapse", "requestToggle", "usePaneResize", "handleRef", "setRef", "node", "activeCleanupRef", "readSize", "container", "parsed", "ceiling", "handle", "frame", "pane", "hitBox", "sign", "room", "hit", "announceCeiling", "write", "size", "targetLabel", "classNames", "e", "handleEl", "pointerId", "startStyle", "parsedStart", "startSize", "startClient", "cap", "clamp", "v", "body", "prevCursor", "prevUserSelect", "current", "raw", "pending", "flush", "lastHandledMove", "seenPointerEvent", "shouldHandle", "ev", "pointerType", "handleMove", "client", "cleanup", "handleUp", "handleKey", "finished", "settled", "nearest", "acc", "p", "kev", "next", "along", "step", "PanelHandle", "SidebarHandle", "InspectorHandle", "BottomHandle", "React", "import_internal", "React", "_BREAKPOINTS", "SHELL_BREAKPOINTS", "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", "React", "import_internal", "isMap", "value", "tableOf", "fallback", "table", "carried", "bp", "SHELL_BREAKPOINTS", "entry", "constantOf", "first", "tableAttributes", "name", "constant", "attributes", "useStableKey", "FIXED_TABLE", "notifyShellStore", "store", "listener", "subscribeShellStore", "ShellStoreContext", "useShellStore", "part", "store", "usePeeking", "store", "name", "subscribe", "listener", "subscribeShellStore", "ShellInsetContext", "useInsetRegistration", "id", "inset", "ctx", "registerInset", "unregisterInset", "isMap", "value", "firstStated", "map", "bp", "usePane", "options", "name", "label", "propNames", "presentationTable", "builtIn", "store", "useShellStore", "generatedId", "id", "controlled", "controlledIsMap", "controlledMap", "autoSource", "autoKey", "useStableKey", "inner", "setInner", "autoTable", "tableOf", "state", "needsBreakpoint", "constantOf", "breakpoint", "ready", "useBreakpoint", "now", "table", "constant", "presentation", "overlaying", "shown", "overlayLive", "defaultValue", "latest", "valueNow", "current", "readBreakpoint", "defaultHereNow", "setValue", "next", "reason", "toggle", "from", "elementRef", "setElement", "node", "entry", "notifyShellStore", "callbacks", "previous", "before", "wasControlled", "peeking", "usePeeking", "paneAttributes", "pane", "presentationAttributes", "tableAttributes", "usePresentationTable", "fallback", "key", "attributes", "React", "import_internal", "normalizeToPx", "value", "orientation", "str", "rem", "pct", "base", "n", "clampTo", "value", "min", "max", "
|
|
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 { BottomHandle, PaneHandle } from './shell-handles.js';\nimport { usePane, paneAttributes, usePresentationTable } from './shell-pane.js';\nimport { splitHandles, useInitialPaneSize, useResizablePane, type SizeChangeMeta } from './shell-resizable.js';\nimport { useInsetRegistration, warnOnce } from './shell-store.js';\nimport { bottomAnchoredGrowth, detailRest, toPaneValue, withoutRemovedPaneProps } from './shell-rest.js';\nimport { readBreakpoint } from '../../hooks/use-breakpoint.js';\nimport type { Breakpoint, CSSPropertiesWithVars, PaneBaseProps } from '../shell.types.js';\n\ntype BottomOpenChangeMeta = { reason: 'init' | 'toggle' | 'responsive' | 'dismiss' };\ntype BottomControlledProps = { open: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: BottomOpenChangeMeta) => void; defaultOpen?: never };\n/** Since 0.8.0 `defaultOpen` takes a responsive object here too, as the docs already said it did. */\ntype BottomUncontrolledProps = { defaultOpen?: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: BottomOpenChangeMeta) => void; open?: never };\ntype BottomSizeControlledProps = { size: number | string; defaultSize?: never };\ntype BottomSizeUncontrolledProps = { defaultSize?: number | string; size?: never };\ntype BottomPublicProps = PaneBaseProps &\n (BottomControlledProps | BottomUncontrolledProps) &\n (BottomSizeControlledProps | BottomSizeUncontrolledProps) & {\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 BottomComponent = React.ForwardRefExoticComponent<BottomPublicProps & React.RefAttributes<HTMLDivElement>> & { Handle: typeof BottomHandle };\n\nconst BOTTOM_PROP_NAMES = { controlled: 'open', default: 'defaultOpen' };\n\nexport const Bottom = React.forwardRef<HTMLDivElement, BottomPublicProps>((props, ref) => {\n const {\n className,\n presentation = 'fixed',\n defaultOpen,\n open,\n onOpenChange,\n expandedSize = 200,\n minSize = 100,\n maxSize = 400,\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 size,\n defaultSize,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs = 50,\n inset,\n id,\n ...domProps\n } = props;\n\n const { table, attributes } = usePresentationTable(presentation, 'fixed');\n const pane = usePane({\n name: 'bottom',\n label: 'Bottom',\n propNames: BOTTOM_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('bottom', inset);\n\n React.useEffect(() => {\n if (snapPoints !== undefined || collapseThreshold !== undefined || paneId !== undefined || persistence !== undefined) {\n warnOnce('Shell.Bottom: `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: 'bottom',\n elementId: pane.id,\n elementRef,\n cssVarName: '--bottom-size',\n orientation: 'horizontal',\n edge: 'start',\n growth: bottomAnchoredGrowth,\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 // The starting size is in the server HTML, so the pane does not jump on hydration.\n const initialSize = useInitialPaneSize(size, defaultSize, minSize, maxSize);\n const { handles, content } = splitHandles(children, BottomHandle);\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('kui-ShellPane', 'kui-ShellBottom', className)}\n {...paneAttributes(pane, attributes)}\n data-inset={inset || undefined}\n tabIndex={pane.overlaying ? -1 : domProps.tabIndex}\n style={\n {\n ...style,\n '--bottom-expanded-size': `${expandedSize}px`,\n ...(initialSize ? { '--bottom-size': initialSize } : {}),\n '--bottom-min-size': `${minSize}px`,\n '--bottom-max-size': `${maxSize}px`,\n } as CSSPropertiesWithVars\n }\n >\n <div className=\"kui-ShellBottomContent\">{content}</div>\n {handle}\n </div>\n );\n}) as BottomComponent;\n\nBottom.displayName = 'Shell.Bottom';\nBottom.Handle = BottomHandle;\n\nexport type { BottomPublicProps };\n", "import * as React from 'react';\nimport type { PaneName } from '../shell.types.js';\n\nexport interface PaneResizeContextValue {\n containerRef: React.RefObject<HTMLElement | null>;\n /** The pane the handle resizes, for `aria-controls`. */\n controls: string;\n cssVarName: string;\n minSize: number;\n maxSize: number;\n defaultSize: number;\n orientation: 'vertical' | 'horizontal';\n edge: 'start' | 'end';\n /**\n * +1 when moving the pointer toward the end of its axis grows the pane, -1\n * when it shrinks it. Read once when a drag starts, with the pane's\n * resolved direction, so no move pays for a style read.\n */\n growth: (isRtl: boolean) => 1 | -1;\n onResize?: (size: number) => void;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n target: PaneName;\n collapsible: boolean;\n snapPoints?: number[];\n snapTolerance: number;\n collapseThreshold?: number;\n requestCollapse?: () => void;\n requestToggle?: () => void;\n}\n\nexport const PaneResizeContext = React.createContext<PaneResizeContextValue | null>(null);\n\nexport function usePaneResize() {\n const ctx = React.useContext(PaneResizeContext);\n if (!ctx) throw new Error('Shell.Handle must be used within a resizable pane');\n return ctx;\n}\n", "import * as React from 'react';\nimport { useLayoutEffect } from 'radix-ui/internal';\nimport classNames from 'classnames';\nimport { usePaneResize } from './shell-resize.js';\n\n/**\n * The resize handle: the WAI-ARIA window splitter. `role=\"separator\"` with a\n * value, focusable because it is operable, `aria-controls` naming its pane.\n *\n * A drag writes the size variable directly on the pane and sets no React\n * state, so nothing re-renders per move. `onResize` is called at most once per\n * animation frame, and once more with the final size when the drag ends. The\n * direction and the ceiling are read once, when the drag starts.\n */\nexport const PaneHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>(({ className, children, ...props }, ref) => {\n const {\n containerRef,\n controls,\n cssVarName,\n minSize,\n maxSize,\n defaultSize,\n orientation,\n edge,\n growth,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n collapsible,\n target,\n requestCollapse,\n requestToggle,\n } = usePaneResize();\n\n const handleRef = React.useRef<HTMLDivElement | null>(null);\n const setRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n handleRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n },\n [ref],\n );\n\n const activeCleanupRef = React.useRef<(() => void) | null>(null);\n React.useEffect(\n () => () => {\n activeCleanupRef.current?.();\n activeCleanupRef.current = null;\n },\n [],\n );\n\n /** The pane's size as the stylesheet sees it. Read at the edges of a gesture, never during one. */\n const readSize = React.useCallback(() => {\n const container = containerRef.current;\n if (!container) return defaultSize;\n const parsed = Number.parseFloat(getComputedStyle(container).getPropertyValue(cssVarName));\n return Number.isFinite(parsed) ? parsed : defaultSize;\n }, [containerRef, cssVarName, defaultSize]);\n\n /**\n * The largest size a resize may reach: the stated maximum, and never so\n * large that the handle leaves the frame. The room is measured from the\n * pane's anchored edge, which does not move, to the far edge of the frame,\n * so a pane that starts after a Rail has less room than the frame's width.\n * Without the cap a pane with a generous `maxSize` could be resized until\n * its own handle was off screen.\n */\n const ceiling = React.useCallback(() => {\n const container = containerRef.current;\n const handle = handleRef.current;\n const frame = container?.closest('.kui-ShellRoot')?.getBoundingClientRect();\n if (!container || !frame || !handle) return maxSize;\n const pane = container.getBoundingClientRect();\n const hitBox = handle.getBoundingClientRect();\n const sign = growth(getComputedStyle(container).direction === 'rtl');\n let room: number;\n if (orientation === 'vertical') room = sign > 0 ? frame.right - pane.left : pane.right - frame.left;\n else room = sign > 0 ? frame.bottom - pane.top : pane.bottom - frame.top;\n const hit = orientation === 'vertical' ? hitBox.width : hitBox.height;\n if (!(frame.width > 0 && frame.height > 0) || !Number.isFinite(room)) return maxSize;\n return Math.max(minSize, Math.min(maxSize, Math.round(room - hit)));\n }, [containerRef, growth, maxSize, minSize, orientation]);\n\n // The announced maximum is what a resize can reach now, not only the prop.\n const announceCeiling = () => {\n handleRef.current?.setAttribute('aria-valuemax', String(ceiling()));\n };\n\n // The announced value is seeded from the real size once the pane has a box.\n useLayoutEffect(() => {\n handleRef.current?.setAttribute('aria-valuenow', String(Math.round(readSize())));\n }, [readSize]);\n\n const write = (container: HTMLElement, size: number) => {\n container.style.setProperty(cssVarName, `${size}px`);\n handleRef.current?.setAttribute('aria-valuenow', String(Math.round(size)));\n };\n\n const targetLabel = target.charAt(0).toUpperCase() + target.slice(1);\n\n return (\n // A focusable separator with a value is the WAI-ARIA window splitter, an\n // interactive widget; jsx-a11y classes every separator as static.\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n <div\n ref={setRef}\n className={classNames('kui-ShellResizer', className)}\n data-orientation={orientation}\n data-edge={edge}\n role=\"separator\"\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={0}\n aria-label={`Resize ${targetLabel} pane`}\n aria-controls={controls}\n aria-orientation={orientation}\n aria-valuemin={minSize}\n aria-valuemax={maxSize}\n {...props}\n onPointerDown={(e) => {\n props.onPointerDown?.(e);\n const container = containerRef.current;\n if (!container || e.defaultPrevented || e.button !== 0) return;\n e.preventDefault();\n const handleEl = e.currentTarget as HTMLElement;\n const pointerId = e.pointerId;\n activeCleanupRef.current?.();\n try {\n handleEl.setPointerCapture(pointerId);\n } catch {\n // Capture can fail for a pointer that is already gone; the window listeners below still carry the drag.\n }\n\n // Everything a move needs is read here, once.\n const startStyle = getComputedStyle(container);\n const parsedStart = Number.parseFloat(startStyle.getPropertyValue(cssVarName));\n const startSize = Number.isFinite(parsedStart) ? parsedStart : defaultSize;\n const startClient = orientation === 'vertical' ? e.clientX : e.clientY;\n const sign = growth(startStyle.direction === 'rtl');\n const cap = ceiling();\n handleEl.setAttribute('aria-valuemax', String(cap));\n const clamp = (v: number) => Math.min(Math.max(v, minSize), cap);\n\n container.setAttribute('data-resizing', '');\n handleEl.setAttribute('data-dragging', '');\n const body = document.body;\n const prevCursor = body.style.cursor;\n const prevUserSelect = body.style.userSelect;\n body.style.cursor = orientation === 'vertical' ? 'col-resize' : 'row-resize';\n body.style.userSelect = 'none';\n onResizeStart?.(startSize);\n\n let current = startSize;\n // The unclamped size, so `collapseThreshold` is compared before the\n // clamp: a threshold below `minSize` can then still collapse the pane.\n let raw = startSize;\n let frame = 0;\n let pending: number | null = null;\n const flush = () => {\n frame = 0;\n if (pending === null) return;\n const size = pending;\n pending = null;\n onResize?.(size);\n };\n\n // The move handler listens on the handle, the document and the window,\n // so a drag survives environments where pointer events do not reach\n // all three. One movement can therefore arrive several times: once per\n // node it propagates through, and again as the compatibility mouse\n // event. Only the first copy does any work.\n let lastHandledMove: Event | null = null;\n let seenPointerEvent = false;\n const shouldHandle = (ev: Event, pointerType: string) => {\n if (ev.type === pointerType) seenPointerEvent = true;\n else if (seenPointerEvent) return false;\n return true;\n };\n\n const handleMove = (ev: PointerEvent) => {\n if (!shouldHandle(ev, 'pointermove')) return;\n if (ev === lastHandledMove) return;\n lastHandledMove = ev;\n const client = orientation === 'vertical' ? ev.clientX : ev.clientY;\n raw = startSize + (client - startClient) * sign;\n current = clamp(raw);\n write(container, current);\n pending = current;\n if (!frame) frame = requestAnimationFrame(flush);\n };\n\n const cleanup = () => {\n if (frame) cancelAnimationFrame(frame);\n frame = 0;\n try {\n handleEl.releasePointerCapture(pointerId);\n } catch {\n // Already released.\n }\n window.removeEventListener('pointermove', handleMove as EventListener);\n document.removeEventListener('pointermove', handleMove as EventListener);\n window.removeEventListener('mousemove', handleMove as EventListener);\n document.removeEventListener('mousemove', handleMove as EventListener);\n handleEl.removeEventListener('pointermove', handleMove as EventListener);\n window.removeEventListener('pointerup', handleUp as EventListener);\n document.removeEventListener('pointerup', handleUp as EventListener);\n window.removeEventListener('mouseup', handleUp as EventListener);\n document.removeEventListener('mouseup', handleUp as EventListener);\n window.removeEventListener('pointercancel', handleUp as EventListener);\n document.removeEventListener('pointercancel', handleUp as EventListener);\n window.removeEventListener('keydown', handleKey as EventListener);\n handleEl.removeEventListener('lostpointercapture', handleUp as EventListener);\n container.removeAttribute('data-resizing');\n handleEl.removeAttribute('data-dragging');\n body.style.cursor = prevCursor;\n body.style.userSelect = prevUserSelect;\n activeCleanupRef.current = null;\n };\n\n let finished = false;\n const handleUp = () => {\n if (finished) return;\n finished = true;\n // The last move's size is delivered now rather than on the next frame.\n if (frame) cancelAnimationFrame(frame);\n flush();\n\n if (collapsible && typeof collapseThreshold === 'number' && raw <= collapseThreshold) {\n // A drag past the threshold closes the pane and keeps no size: the\n // pane opens again at the size it had before the drag. The drag\n // still ends, at that size, so a consumer that started something\n // in onResizeStart can stop it.\n write(container, startSize);\n onResize?.(startSize);\n cleanup();\n requestCollapse?.();\n onResizeEnd?.(startSize);\n return;\n }\n\n let settled = current;\n if (snapPoints && snapPoints.length) {\n const nearest = snapPoints.reduce((acc, p) => (Math.abs(p - current) < Math.abs(acc - current) ? p : acc), snapPoints[0]);\n if (Math.abs(nearest - current) <= snapTolerance) {\n settled = clamp(nearest);\n write(container, settled);\n onResize?.(settled);\n }\n }\n onResizeEnd?.(settled);\n cleanup();\n };\n\n const handleKey = (kev: KeyboardEvent) => {\n if (kev.key !== 'Escape') return;\n if (frame) cancelAnimationFrame(frame);\n frame = 0;\n pending = null;\n write(container, startSize);\n onResize?.(startSize);\n finished = true;\n onResizeEnd?.(startSize);\n cleanup();\n };\n\n window.addEventListener('pointermove', handleMove as EventListener);\n document.addEventListener('pointermove', handleMove as EventListener);\n window.addEventListener('mousemove', handleMove as EventListener);\n document.addEventListener('mousemove', handleMove as EventListener);\n handleEl.addEventListener('pointermove', handleMove as EventListener);\n window.addEventListener('pointerup', handleUp as EventListener);\n document.addEventListener('pointerup', handleUp as EventListener);\n window.addEventListener('mouseup', handleUp as EventListener);\n document.addEventListener('mouseup', handleUp as EventListener);\n window.addEventListener('pointercancel', handleUp as EventListener);\n document.addEventListener('pointercancel', handleUp as EventListener);\n window.addEventListener('keydown', handleKey as EventListener);\n handleEl.addEventListener('lostpointercapture', handleUp as EventListener);\n activeCleanupRef.current = cleanup;\n }}\n onDoubleClick={(e) => {\n props.onDoubleClick?.(e);\n if (!e.defaultPrevented && collapsible) requestToggle?.();\n }}\n onFocus={(e) => {\n props.onFocus?.(e);\n announceCeiling();\n }}\n onKeyDown={(e) => {\n props.onKeyDown?.(e);\n const container = containerRef.current;\n if (!container || e.defaultPrevented) return;\n // Enter collapses and restores the pane, as a double-click does (WAI-ARIA window splitter).\n if (e.key === 'Enter') {\n if (collapsible && requestToggle) {\n e.preventDefault();\n requestToggle();\n }\n return;\n }\n const current = readSize();\n // The keys reach as far as a drag does: the frame caps both.\n const cap = ceiling();\n const clamp = (v: number) => Math.min(Math.max(v, minSize), cap);\n let next: number | undefined;\n if (e.key === 'Home') next = clamp(minSize);\n else if (e.key === 'End') next = clamp(cap);\n else {\n // The key moves the boundary along its axis; the pane grows or\n // shrinks the way a drag in that direction would, so Bottom's\n // ArrowUp grows it and an end-anchored pane mirrors in RTL.\n const along = orientation === 'vertical' ? (e.key === 'ArrowRight' ? 1 : e.key === 'ArrowLeft' ? -1 : 0) : e.key === 'ArrowDown' ? 1 : e.key === 'ArrowUp' ? -1 : 0;\n if (along === 0) return;\n const step = e.shiftKey ? 32 : 8;\n next = clamp(current + along * step * growth(getComputedStyle(container).direction === 'rtl'));\n }\n e.preventDefault();\n onResizeStart?.(current);\n write(container, next);\n onResize?.(next);\n onResizeEnd?.(next);\n }}\n >\n {children}\n </div>\n );\n});\nPaneHandle.displayName = 'Shell.Handle';\n\nexport const PanelHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nPanelHandle.displayName = 'Shell.Panel.Handle';\n\nexport const SidebarHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nSidebarHandle.displayName = 'Shell.Sidebar.Handle';\n\nexport const InspectorHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nInspectorHandle.displayName = 'Shell.Inspector.Handle';\n\nexport const BottomHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nBottomHandle.displayName = 'Shell.Bottom.Handle';\n", "'use client';\n\nimport * as React from 'react';\nimport { useLayoutEffect } from 'radix-ui/internal';\nimport { readBreakpoint, useBreakpoint } from '../../hooks/use-breakpoint.js';\nimport type { Breakpoint, PaneName, PresentationValue } from '../shell.types.js';\nimport {\n constantOf,\n notifyShellStore,\n tableAttributes,\n tableOf,\n usePeeking,\n useShellStore,\n useStableKey,\n warnOnce,\n type OpenChangeReason,\n type PaneEntry,\n type PaneValue,\n type Table,\n} from './shell-store.js';\n\ntype ResponsiveValue = PaneValue | Partial<Record<Breakpoint, PaneValue>>;\n\nexport type UsePaneOptions = {\n name: PaneName;\n /** The component's display name, for warnings: `Inspector`, `Sidebar`, \u2026 */\n label: string;\n /** The prop names a warning should use: `open`/`defaultOpen`, or `state`/`defaultState`. */\n propNames: { controlled: string; default: string };\n id: string | undefined;\n /** The controlled value. A responsive object is deprecated: it is resolved against the current breakpoint. */\n controlled: ResponsiveValue | undefined;\n /**\n * The uncontrolled default. A single value fixes where the pane starts. A\n * responsive object leaves the pane untouched (`auto`), with that object as\n * what it shows at each breakpoint.\n */\n defaultValue: ResponsiveValue | undefined;\n /** The pane's presentation at every breakpoint. Pass a memoised table. */\n presentationTable: Table<PresentationValue>;\n /** What an untouched pane shows where no default says otherwise. Pass a module-level function. */\n builtIn: (presentation: PresentationValue) => PaneValue;\n /** Reports a change a user made. Never called on mount or on a resize. */\n onChange: ((value: PaneValue, reason: OpenChangeReason) => void) | undefined;\n /** The value a toggle moves to. Defaults to open and closed in turn. */\n toggleNext?: (current: PaneValue, defaultHere: PaneValue | undefined) => PaneValue;\n onExpand: (() => void) | undefined;\n onCollapse: (() => void) | undefined;\n /** The pane's designed open width, published for the panes beside it. */\n size: number;\n};\n\nexport type PaneController = ReturnType<typeof usePane>;\n\nconst isMap = (value: ResponsiveValue | undefined): value is Partial<Record<Breakpoint, PaneValue>> => typeof value === 'object' && value !== null;\n\n/** The first value a responsive object states, smallest breakpoint first. */\nfunction firstStated(map: Partial<Record<Breakpoint, PaneValue>>): PaneValue {\n for (const bp of ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as const) {\n const value = map[bp];\n if (value !== undefined) return value;\n }\n return 'closed';\n}\n\n/** Everything the togglable panes share: their state, their registry entry and their callbacks. */\nexport function usePane(options: UsePaneOptions) {\n const { name, label, propNames, presentationTable, builtIn } = options;\n const store = useShellStore(`Shell.${label}`);\n const generatedId = React.useId();\n const id = options.id ?? `shell-${name}${generatedId}`;\n\n const controlled = options.controlled !== undefined;\n const controlledIsMap = isMap(options.controlled);\n if (controlledIsMap) {\n warnOnce(\n `Shell.${label}: a responsive \\`${propNames.controlled}\\` is deprecated and is removed in 1.0. ` +\n `Pass a boolean and decide it from your own state, or use \\`${propNames.default}\\` with a responsive object.`,\n );\n }\n\n // A responsive controlled value is resolved the way a responsive default\n // is: it becomes the table an untouched pane follows, so the stylesheet\n // answers it at each breakpoint (right in the server HTML, with no\n // callback on a crossing) and the app's prop is still the only writer.\n const controlledMap = controlledIsMap ? (options.controlled as Partial<Record<Breakpoint, PaneValue>>) : undefined;\n const autoSource = controlledMap ?? (isMap(options.defaultValue) ? options.defaultValue : undefined);\n const autoKey = useStableKey(autoSource);\n const [inner, setInner] = React.useState<'auto' | PaneValue>(() => (typeof options.defaultValue === 'string' ? options.defaultValue : 'auto'));\n\n // What an untouched pane shows at each breakpoint: a responsive default\n // where it states one, the pane's own default where it does not.\n const autoTable = React.useMemo(\n () => (controlledMap ? tableOf<PaneValue>(controlledMap, () => firstStated(controlledMap)) : tableOf<PaneValue>(autoSource, (bp) => builtIn(presentationTable[bp]))),\n // `autoKey` stands for the responsive object, which is usually a new literal each render.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [autoKey, controlledIsMap, presentationTable, builtIn],\n );\n\n let state: 'auto' | PaneValue = inner;\n if (controlled) state = controlledMap ? 'auto' : (options.controlled as PaneValue);\n\n // Only a pane whose answer depends on the window subscribes to it, so a\n // pane with one presentation and one default never re-renders on a resize.\n const needsBreakpoint = constantOf(presentationTable) === undefined || (state === 'auto' && constantOf(autoTable) === undefined);\n const { breakpoint, ready } = useBreakpoint(needsBreakpoint);\n\n /** A table's value now: known without the window when it holds one value, else once the breakpoint is known. */\n const now = <T,>(table: Table<T>): T | undefined => {\n const constant = constantOf(table);\n if (constant !== undefined) return constant;\n return ready ? table[breakpoint] : undefined;\n };\n\n const value: PaneValue | undefined = state === 'auto' ? now(autoTable) : state;\n const presentation = now(presentationTable);\n const overlaying = presentation === 'overlay';\n const shown = value === undefined ? undefined : value !== 'closed';\n const overlayLive = shown === true && overlaying;\n\n // Stable actions over the latest values, so the registry entry changes only\n // when a fact it carries changes.\n const defaultValue = options.defaultValue;\n const latest = React.useRef({ state, value, autoTable, defaultValue, controlled, onChange: options.onChange, toggleNext: options.toggleNext });\n useLayoutEffect(() => {\n latest.current = { state, value, autoTable, defaultValue, controlled, onChange: options.onChange, toggleNext: options.toggleNext };\n });\n\n /**\n * What the pane shows, and its default, at the window's breakpoint right\n * now. Asked at the moment of an action rather than taken from the last\n * render: a touched pane no longer follows the window, and a click can land\n * before the mirror has resolved after hydration.\n */\n const valueNow = React.useCallback((): PaneValue | undefined => {\n const current = latest.current;\n if (current.value !== undefined) return current.value;\n return current.state === 'auto' ? current.autoTable[readBreakpoint()] : undefined;\n }, []);\n const defaultHereNow = React.useCallback((): PaneValue | undefined => {\n const current = latest.current;\n if (typeof current.defaultValue === 'string') return current.defaultValue;\n return isMap(current.defaultValue) ? current.autoTable[readBreakpoint()] : undefined;\n }, []);\n\n const setValue = React.useCallback(\n (next: PaneValue, reason: OpenChangeReason) => {\n const current = latest.current;\n if (valueNow() === next) return;\n current.onChange?.(next, reason);\n if (!current.controlled) setInner(next);\n },\n [valueNow],\n );\n\n const toggle = React.useCallback(\n (reason: OpenChangeReason) => {\n const current = latest.current;\n const from = valueNow() ?? 'closed';\n const next = current.toggleNext ? current.toggleNext(from, defaultHereNow()) : from === 'closed' ? 'open' : 'closed';\n setValue(next, reason);\n },\n [setValue, valueNow, defaultHereNow],\n );\n\n // The pane's element, for the Root's containment and focus.\n const elementRef = React.useRef<HTMLElement | null>(null);\n const setElement = React.useCallback((node: HTMLElement | null) => {\n elementRef.current = node;\n }, []);\n\n // Registration. A layout effect so a Trigger's aria attributes and the\n // Root's containment are right before the browser paints.\n useLayoutEffect(() => {\n const entry: PaneEntry = {\n name,\n id,\n el: elementRef.current,\n value,\n presentation,\n presentationTable,\n overlayLive,\n size: options.size,\n setValue,\n toggle,\n };\n store.entries.set(name, entry);\n notifyShellStore(store);\n return () => {\n if (store.entries.get(name) === entry) {\n store.entries.delete(name);\n notifyShellStore(store);\n }\n };\n }, [store, name, id, value, presentation, presentationTable, overlayLive, options.size, setValue, toggle]);\n\n // onExpand/onCollapse fire when the pane's state changes and that changes\n // whether it is shown: a user's toggle, or a controlled prop. Never on\n // mount, and never because the window crossed a breakpoint.\n const callbacks = React.useRef({ onExpand: options.onExpand, onCollapse: options.onCollapse });\n useLayoutEffect(() => {\n callbacks.current = { onExpand: options.onExpand, onCollapse: options.onCollapse };\n });\n const previous = React.useRef({ state, shown });\n React.useEffect(() => {\n const before = previous.current;\n if (before.state !== state && before.shown !== undefined && shown !== undefined && before.shown !== shown) {\n if (shown) callbacks.current.onExpand?.();\n else callbacks.current.onCollapse?.();\n }\n previous.current = { state, shown };\n }, [state, shown]);\n\n // Development guards. Once per mount, not once per render.\n useLayoutEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n if (options.controlled !== undefined && options.defaultValue !== undefined) {\n console.error(`Shell.${label}: Do not pass both \\`${propNames.controlled}\\` and \\`${propNames.default}\\`. Choose one.`);\n }\n // Mount only: this is the once-per-mount guard.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n const wasControlled = React.useRef(controlled);\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n if (wasControlled.current !== controlled) {\n console.warn(`Shell.${label}: Switching between controlled and uncontrolled \\`${propNames.controlled}\\` is not supported.`);\n wasControlled.current = controlled;\n }\n }, [controlled, label, propNames.controlled]);\n\n const peeking = usePeeking(store, name) && shown === false && !overlaying;\n\n return {\n store,\n id,\n state,\n value,\n shown,\n presentation,\n overlaying,\n overlayLive,\n peeking,\n ready,\n breakpoint,\n autoTable,\n setValue,\n toggle,\n defaultHereNow,\n setElement,\n };\n}\n\n/** The data attributes every togglable pane renders. */\nexport function paneAttributes(pane: PaneController, presentationAttributes: Record<string, string>) {\n const { state, value, presentation, shown } = pane;\n return {\n ...presentationAttributes,\n 'data-state': state,\n ...(state === 'auto' ? tableAttributes('auto', pane.autoTable) : {}),\n 'data-presentation': presentation,\n 'data-mode': value === undefined ? undefined : value === 'closed' ? 'collapsed' : 'expanded',\n // Kept for stylesheets written against 0.7: set while a stacked pane is open.\n 'data-open': presentation === 'stacked' && shown ? '' : undefined,\n 'data-peek': pane.peeking ? '' : undefined,\n } as const;\n}\n\n/** A pane's own presentation, as a table and as the attributes the stylesheet reads. */\nexport function usePresentationTable(presentation: Parameters<typeof tableOf<PresentationValue>>[0], fallback: PresentationValue) {\n const key = useStableKey(presentation);\n const table = React.useMemo(\n () => tableOf<PresentationValue>(presentation, () => fallback),\n // `key` stands for `presentation`, which is usually a new literal each render.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [key, fallback],\n );\n // One value is the plain `data-presentation` the pane renders anyway; several\n // are written per breakpoint, so the stylesheet can place the pane before\n // any script runs.\n const attributes = React.useMemo(() => (constantOf(table) === undefined ? tableAttributes('presentation', table) : ({} as Record<string, string>)), [table]);\n return { table, attributes };\n}\n", "'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", "import type * as React from 'react';\n\nexport type PresentationValue = 'fixed' | 'overlay' | 'stacked';\n\nexport type ResponsivePresentation = PresentationValue | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PresentationValue>>;\n\nexport type PaneMode = 'expanded' | 'collapsed';\nexport type SidebarMode = 'collapsed' | 'expanded';\n\nexport type ResponsiveMode = PaneMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PaneMode>>;\n\nexport type ResponsiveSidebarMode = SidebarMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', SidebarMode>>;\n\nexport type Responsive<T> = T | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', T>>;\n\nexport type PaneSizePersistence = {\n load?: () => number | Promise<number | undefined> | undefined;\n save?: (size: number) => void | Promise<void>;\n};\n\n/**\n * Why a pane's open state changed. Since 0.8.0 only a user action is reported:\n * `toggle` for a Trigger, a handle double-click or a drag past\n * `collapseThreshold`, and `dismiss` for Escape or a press on the scrim.\n * `init`, `responsive`, `panel` and `left` are kept in the types for\n * compatibility and are never sent.\n */\nexport type PaneOpenChangeReason = 'toggle' | 'dismiss' | 'init' | 'responsive';\n\nexport interface PaneBaseProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n expandedSize?: number;\n minSize?: number;\n maxSize?: number;\n resizable?: boolean;\n collapsible?: boolean;\n /** @deprecated Use `onOpenChange`. Still called when a user's toggle or a controlled prop changes whether the pane is shown; never on mount or when the window crosses a breakpoint. */\n onExpand?: () => void;\n /** @deprecated Use `onOpenChange`. Still called when a user's toggle or a controlled prop changes whether the pane is shown; never on mount or when the window crosses a breakpoint. */\n onCollapse?: () => void;\n onResize?: (size: number) => void;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n /** @deprecated Removed in 1.0. Snap in your own `onSizeChange` and pass `size`. */\n snapPoints?: number[];\n /** @deprecated Removed in 1.0, with `snapPoints`. */\n snapTolerance?: number;\n /** @deprecated Removed in 1.0. Close the pane from your own `onResizeEnd`. */\n collapseThreshold?: number;\n /** @deprecated Removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`. */\n paneId?: string;\n /** @deprecated Removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`. */\n persistence?: PaneSizePersistence;\n}\n\nexport const _BREAKPOINTS = {\n xs: '(min-width: 520px)',\n sm: '(min-width: 768px)',\n md: '(min-width: 1024px)',\n lg: '(min-width: 1280px)',\n xl: '(min-width: 1640px)',\n} as const;\n\nexport type Breakpoint = 'initial' | keyof typeof _BREAKPOINTS;\n\n/** Every breakpoint, smallest first. The stylesheet's @media blocks follow this order. */\nexport const SHELL_BREAKPOINTS: readonly Breakpoint[] = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'];\n\nexport type PaneTarget = 'left' | 'rail' | 'panel' | 'sidebar' | 'inspector' | 'bottom';\n\n/** The panes a Trigger can drive. `left` is the deprecated name for `rail`. */\nexport type PaneName = Exclude<PaneTarget, 'left'>;\n\n/**\n * CSS custom property key type for type-safe style objects.\n * Allows any string prefixed with '--'.\n */\nexport type CSSCustomProperty = `--${string}`;\n\n/**\n * Style object that supports CSS custom properties.\n */\nexport type CSSPropertiesWithVars = React.CSSProperties & {\n [key: CSSCustomProperty]: string | number | undefined;\n};\n", "'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`.\n * `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 { useLayoutEffect } from 'radix-ui/internal';\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 or closed. */\nexport type PaneValue = 'open' | '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 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", "'use client';\n\nimport * as React from 'react';\nimport { useLayoutEffect } from 'radix-ui/internal';\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/**\n * The pane's starting size for the first render, so the server HTML already has it and the first\n * paint is right. Only a number can be known before the pane exists (a percentage needs the\n * Shell's width); the effects below still own the size after mount.\n */\nexport function useInitialPaneSize(size: number | string | undefined, defaultSize: number | string | undefined, minSize: number, maxSize: number) {\n const [initial] = React.useState(() => {\n const value = size ?? defaultSize;\n return typeof value === 'number' && Number.isFinite(value) ? `${clampTo(value, minSize, maxSize)}px` : undefined;\n });\n return initial;\n}\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 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 > .kui-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 useLayoutEffect(() => {\n if (!ownedRef.current) writeSize(options.expandedSize, false);\n }, [options.expandedSize, writeSize]);\n\n // defaultSize: applied once, on mount.\n 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 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. A given one is read through\n // `latest`, so an inline object (the documented shape) does not reload the size every render.\n const hasPersistence = persistence !== undefined;\n const adapter = React.useMemo<PaneSizePersistence | undefined>(() => {\n if (hasPersistence) {\n return {\n load: () => latest.current.persistence?.load?.(),\n save: (value: number) => latest.current.persistence?.save?.(value),\n };\n }\n if (!paneId) return undefined;\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, hasPersistence]);\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 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", "/**\n * Normalize CSS length values to pixels.\n * Supports: px, rem, %, and bare numbers.\n *\n * @param value - The value to normalize (number, string, or undefined)\n * @param orientation - 'horizontal' for width-based % or 'vertical' for height-based %\n * @returns The value in pixels, or undefined if invalid\n */\nexport function normalizeToPx(\n value: number | string | undefined,\n orientation: 'horizontal' | 'vertical' = 'horizontal',\n): number | undefined {\n if (value == null) return undefined;\n if (typeof value === 'number' && Number.isFinite(value)) return value;\n\n const str = String(value).trim();\n if (!str) return undefined;\n\n // px: direct parse\n if (str.endsWith('px')) return Number.parseFloat(str);\n\n // rem: multiply by root font size\n if (str.endsWith('rem')) {\n const rem = Number.parseFloat(getComputedStyle(document.documentElement).fontSize || '16') || 16;\n return Number.parseFloat(str) * rem;\n }\n\n // %: calculate based on viewport dimension\n if (str.endsWith('%')) {\n const pct = Number.parseFloat(str);\n const base =\n orientation === 'horizontal'\n ? document.documentElement.clientWidth || window.innerWidth || 0\n : document.documentElement.clientHeight || window.innerHeight || 0;\n return (pct / 100) * base;\n }\n\n // Bare number-like string\n const n = Number.parseFloat(str);\n return Number.isFinite(n) ? n : undefined;\n}\n\n", "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": ";2lBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,YAAAE,KAAA,eAAAC,GAAAH,IAEA,IAAAI,EAAuB,oBACvBC,GAAuB,yBACvBC,GAAgC,6BCJhC,IAAAC,GAAuB,oBA+BVC,GAA0B,iBAA6C,IAAI,EAEjF,SAASC,IAAgB,CAC9B,IAAMC,EAAY,cAAWF,EAAiB,EAC9C,GAAI,CAACE,EAAK,MAAM,IAAI,MAAM,mDAAmD,EAC7E,OAAOA,CACT,CCrCA,IAAAC,EAAuB,oBACvBC,GAAgC,6BAChCC,GAAuB,yBAYhB,IAAMC,GAAmB,aAAkE,CAAC,CAAE,UAAAC,EAAW,SAAAC,EAAU,GAAGC,CAAM,EAAGC,IAAQ,CAC5I,GAAM,CACJ,aAAAC,EACA,SAAAC,EACA,WAAAC,EACA,Q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EACpC,GAAII,EAAK,GACT,IAAKQ,EACL,aAAW,GAAAe,SAAW,gBAAiB,kBAAmBxD,CAAS,EAClE,GAAGyD,GAAexB,EAAMF,CAAU,EACnC,aAAYJ,GAAS,OACrB,SAAUM,EAAK,WAAa,GAAKJ,EAAS,SAC1C,MACE,CACE,GAAGR,EACH,yBAA0B,GAAGhB,CAAY,KACzC,GAAIyC,EAAc,CAAE,gBAAiBA,CAAY,EAAI,CAAC,EACtD,oBAAqB,GAAGxC,CAAO,KAC/B,oBAAqB,GAAGC,CAAO,IACjC,GAGF,gBAAC,OAAI,UAAU,0BAA0B0C,CAAQ,EAChDG,CACH,CAEJ,CAAC,EAEDvD,GAAO,YAAc,eACrBA,GAAO,OAASsD",
|
|
6
|
+
"names": ["shell_bottom_exports", "__export", "Bottom", "__toCommonJS", "React", "import_classnames", "import_internal", "React", "PaneResizeContext", "usePaneResize", "ctx", "React", "import_internal", "import_classnames", "PaneHandle", "className", "children", "props", "ref", "containerRef", "controls", "cssVarName", "minSize", "maxSize", "defaultSize", "orientation", "edge", "growth", "onResize", "onResizeStart", "onResizeEnd", "snapPoints", "snapTolerance", "collapseThreshold", "collapsible", "target", "requestCollapse", "requestToggle", "usePaneResize", "handleRef", "setRef", "node", "activeCleanupRef", "readSize", "container", "parsed", "ceiling", "handle", "frame", "pane", "hitBox", "sign", "room", "hit", "announceCeiling", "write", "size", "targetLabel", "classNames", "e", "handleEl", "pointerId", "startStyle", "parsedStart", "startSize", "startClient", "cap", "clamp", "v", "body", "prevCursor", "prevUserSelect", "current", "raw", "pending", "flush", "lastHandledMove", "seenPointerEvent", "shouldHandle", "ev", "pointerType", "handleMove", "client", "cleanup", "handleUp", "handleKey", "finished", "settled", "nearest", "acc", "p", "kev", "next", "along", "step", "PanelHandle", "SidebarHandle", "InspectorHandle", "BottomHandle", "React", "import_internal", "React", "_BREAKPOINTS", "SHELL_BREAKPOINTS", "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", "React", "import_internal", "isMap", "value", "tableOf", "fallback", "table", "carried", "bp", "SHELL_BREAKPOINTS", "entry", "constantOf", "first", "tableAttributes", "name", "constant", "attributes", "useStableKey", "FIXED_TABLE", "notifyShellStore", "store", "listener", "subscribeShellStore", "ShellStoreContext", "useShellStore", "part", "store", "usePeeking", "store", "name", "subscribe", "listener", "subscribeShellStore", "ShellInsetContext", "useInsetRegistration", "id", "inset", "ctx", "registerInset", "unregisterInset", "isMap", "value", "firstStated", "map", "bp", "usePane", "options", "name", "label", "propNames", "presentationTable", "builtIn", "store", "useShellStore", "generatedId", "id", "controlled", "controlledIsMap", "controlledMap", "autoSource", "autoKey", "useStableKey", "inner", "setInner", "autoTable", "tableOf", "state", "needsBreakpoint", "constantOf", "breakpoint", "ready", "useBreakpoint", "now", "table", "constant", "presentation", "overlaying", "shown", "overlayLive", "defaultValue", "latest", "valueNow", "current", "readBreakpoint", "defaultHereNow", "setValue", "next", "reason", "toggle", "from", "elementRef", "setElement", "node", "entry", "notifyShellStore", "callbacks", "previous", "before", "wasControlled", "peeking", "usePeeking", "paneAttributes", "pane", "presentationAttributes", "tableAttributes", "usePresentationTable", "fallback", "key", "attributes", "React", "import_internal", "normalizeToPx", "value", "orientation", "str", "rem", "pct", "base", "n", "clampTo", "value", "min", "max", "useInitialPaneSize", "size", "defaultSize", "minSize", "maxSize", "initial", "useResizablePane", "options", "name", "elementRef", "cssVarName", "orientation", "resizable", "paneId", "persistence", "latest", "debounceRef", "throttleRef", "emitSizeChange", "meta", "onSizeChange", "sizeUpdate", "sizeUpdateMs", "now", "toPx", "normalizeToPx", "ownedRef", "writeSize", "own", "el", "handle", "px", "clamped", "hasPersistence", "adapter", "key", "stored", "mounted", "apply", "loaded", "err", "onResize", "onResizeStart", "onResizeEnd", "requestCollapse", "requestToggle", "splitHandles", "children", "handleType", "all", "handles", "content", "toPaneValue", "value", "map", "bp", "open", "detailRest", "bottomAnchoredGrowth", "withoutRemovedPaneProps", "props", "_height", "_resizer", "rest", "BOTTOM_PROP_NAMES", "Bottom", "props", "ref", "className", "presentation", "defaultOpen", "open", "onOpenChange", "expandedSize", "minSize", "maxSize", "resizable", "collapsible", "onExpand", "onCollapse", "onResize", "onResizeStart", "onResizeEnd", "snapPoints", "snapTolerance", "collapseThreshold", "paneId", "persistence", "children", "style", "size", "defaultSize", "onSizeChange", "sizeUpdate", "sizeUpdateMs", "inset", "id", "domProps", "table", "attributes", "usePresentationTable", "pane", "usePane", "toPaneValue", "detailRest", "value", "reason", "useInsetRegistration", "elementRef", "composedRef", "resize", "useResizablePane", "bottomAnchoredGrowth", "readBreakpoint", "initialSize", "useInitialPaneSize", "handles", "content", "splitHandles", "BottomHandle", "handle", "PaneResizeContext", "PaneHandle", "withoutRemovedPaneProps", "classNames", "paneAttributes"]
|
|
7
7
|
}
|