@womp/kookie-ui 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components.css +538 -493
- package/dist/cjs/components/_internal/base-menu.utils.js +1 -1
- package/dist/cjs/components/_internal/base-menu.utils.js.map +3 -3
- package/dist/cjs/components/_internal/menu-context.js +1 -1
- package/dist/cjs/components/_internal/menu-context.js.map +3 -3
- package/dist/cjs/components/_internal/shell-bottom.d.ts +6 -7
- package/dist/cjs/components/_internal/shell-bottom.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-bottom.js +1 -1
- package/dist/cjs/components/_internal/shell-bottom.js.map +4 -4
- package/dist/cjs/components/_internal/shell-handles.d.ts +9 -0
- package/dist/cjs/components/_internal/shell-handles.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-handles.js +1 -1
- package/dist/cjs/components/_internal/shell-handles.js.map +3 -3
- package/dist/cjs/components/_internal/shell-inspector.d.ts +4 -6
- package/dist/cjs/components/_internal/shell-inspector.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-inspector.js +1 -1
- package/dist/cjs/components/_internal/shell-inspector.js.map +4 -4
- package/dist/cjs/components/_internal/shell-pane.d.ts +70 -0
- package/dist/cjs/components/_internal/shell-pane.d.ts.map +1 -0
- package/dist/cjs/components/_internal/shell-pane.js +2 -0
- package/dist/cjs/components/_internal/shell-pane.js.map +7 -0
- package/dist/cjs/components/_internal/shell-resizable.d.ts +48 -0
- package/dist/cjs/components/_internal/shell-resizable.d.ts.map +1 -0
- package/dist/cjs/components/_internal/shell-resizable.js +2 -0
- package/dist/cjs/components/_internal/shell-resizable.js.map +7 -0
- package/dist/cjs/components/_internal/shell-resize.d.ts +11 -3
- package/dist/cjs/components/_internal/shell-resize.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-resize.js +1 -1
- package/dist/cjs/components/_internal/shell-resize.js.map +2 -2
- package/dist/cjs/components/_internal/shell-rest.d.ts +27 -0
- package/dist/cjs/components/_internal/shell-rest.d.ts.map +1 -0
- package/dist/cjs/components/_internal/shell-rest.js +2 -0
- package/dist/cjs/components/_internal/shell-rest.js.map +7 -0
- package/dist/cjs/components/_internal/shell-sidebar.d.ts +7 -12
- package/dist/cjs/components/_internal/shell-sidebar.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
- package/dist/cjs/components/_internal/shell-sidebar.js.map +4 -4
- package/dist/cjs/components/_internal/shell-store.d.ts +99 -0
- package/dist/cjs/components/_internal/shell-store.d.ts.map +1 -0
- package/dist/cjs/components/_internal/shell-store.js +2 -0
- package/dist/cjs/components/_internal/shell-store.js.map +7 -0
- package/dist/cjs/components/context-menu.js +1 -1
- package/dist/cjs/components/context-menu.js.map +3 -3
- package/dist/cjs/components/dropdown-menu.js +1 -1
- package/dist/cjs/components/dropdown-menu.js.map +3 -3
- package/dist/cjs/components/index.js +5 -5
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/components/schemas/index.js +1 -1
- package/dist/cjs/components/schemas/index.js.map +3 -3
- package/dist/cjs/components/schemas/shell.schema.d.ts +277 -229
- package/dist/cjs/components/schemas/shell.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/shell.schema.js +1 -1
- package/dist/cjs/components/schemas/shell.schema.js.map +3 -3
- package/dist/cjs/components/shell.context.d.ts +25 -114
- package/dist/cjs/components/shell.context.d.ts.map +1 -1
- package/dist/cjs/components/shell.context.js +1 -1
- package/dist/cjs/components/shell.context.js.map +4 -4
- package/dist/cjs/components/shell.d.ts +42 -21
- package/dist/cjs/components/shell.d.ts.map +1 -1
- package/dist/cjs/components/shell.hooks.d.ts +7 -23
- package/dist/cjs/components/shell.hooks.d.ts.map +1 -1
- package/dist/cjs/components/shell.hooks.js +1 -1
- package/dist/cjs/components/shell.hooks.js.map +4 -4
- package/dist/cjs/components/shell.js +1 -1
- package/dist/cjs/components/shell.js.map +4 -4
- package/dist/cjs/components/shell.types.d.ts +19 -2
- package/dist/cjs/components/shell.types.d.ts.map +1 -1
- package/dist/cjs/components/shell.types.js +1 -1
- package/dist/cjs/components/shell.types.js.map +3 -3
- package/dist/cjs/components/sidebar.js.map +3 -3
- package/dist/cjs/hooks/use-breakpoint.d.ts +5 -0
- package/dist/cjs/hooks/use-breakpoint.d.ts.map +1 -1
- package/dist/cjs/hooks/use-breakpoint.js +1 -1
- package/dist/cjs/hooks/use-breakpoint.js.map +3 -3
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/{chunk-HJU4I34X.js → chunk-25X75TI7.js} +2 -2
- package/dist/esm/{chunk-4XKK32M4.js → chunk-26I257HE.js} +2 -2
- package/dist/esm/chunk-2EQWBT2S.js +2 -0
- package/dist/esm/chunk-2EQWBT2S.js.map +7 -0
- package/dist/esm/{chunk-GLERJXVS.js → chunk-2Q7BJ7YG.js} +2 -2
- package/dist/esm/{chunk-CJ27XP5Z.js → chunk-3AOFY2B4.js} +2 -2
- package/dist/esm/chunk-3J6AUDID.js +2 -0
- package/dist/esm/chunk-3J6AUDID.js.map +7 -0
- package/dist/esm/{chunk-7EWFBWBS.js → chunk-3PTSRBVY.js} +2 -2
- package/dist/esm/chunk-3XSB7YIM.js +2 -0
- package/dist/esm/{chunk-FMBECDL4.js.map → chunk-3XSB7YIM.js.map} +3 -3
- package/dist/esm/{chunk-O2U6RJTB.js → chunk-44JZYS7A.js} +2 -2
- package/dist/esm/{chunk-CTA5ODAO.js → chunk-4WU2WKUJ.js} +2 -2
- package/dist/esm/{chunk-KZWNGWIM.js → chunk-5M7STAH3.js} +2 -2
- package/dist/esm/{chunk-5WRCK4R7.js → chunk-5TAHT6VC.js} +2 -2
- package/dist/esm/{chunk-RNTCHVFI.js → chunk-6J6YX2VX.js} +2 -2
- package/dist/esm/{chunk-AGSSWWFI.js → chunk-7FKKGUHK.js} +2 -2
- package/dist/esm/{chunk-WHFJ4JUN.js → chunk-7NYODT3Z.js} +2 -2
- package/dist/esm/{chunk-NVDXXGVW.js → chunk-7PMMYHZV.js} +2 -2
- package/dist/esm/chunk-A2XVR7GL.js +2 -0
- package/dist/esm/chunk-A2XVR7GL.js.map +7 -0
- package/dist/esm/chunk-ADXZNG4F.js +2 -0
- package/dist/esm/chunk-ADXZNG4F.js.map +7 -0
- package/dist/esm/chunk-AGNIFHOE.js +2 -0
- package/dist/esm/chunk-AGNIFHOE.js.map +7 -0
- package/dist/esm/{chunk-KJUDZCYK.js → chunk-AIHQ3MVK.js} +2 -2
- package/dist/esm/{chunk-UBOOUDS4.js → chunk-AO32NT75.js} +2 -2
- package/dist/esm/chunk-BZZXXZ3O.js +2 -0
- package/dist/esm/chunk-BZZXXZ3O.js.map +7 -0
- package/dist/esm/{chunk-JDGJSNWT.js → chunk-C5RVO3C3.js} +2 -2
- package/dist/esm/{chunk-IHK3H2OM.js → chunk-CBNTPHYK.js} +2 -2
- package/dist/esm/{chunk-BBJUB52V.js → chunk-CRBOJ7N7.js} +2 -2
- package/dist/esm/{chunk-VHECAEUP.js → chunk-DCIQHXAR.js} +2 -2
- package/dist/esm/{chunk-43A5GUSI.js → chunk-EHBAK3LQ.js} +2 -2
- package/dist/esm/{chunk-K3UAS7RW.js → chunk-F3AXE27Q.js} +2 -2
- package/dist/esm/{chunk-KFR3CK24.js → chunk-FB3PD4Z3.js} +2 -2
- package/dist/esm/{chunk-MCPRXVKZ.js → chunk-FEAOFF77.js} +2 -2
- package/dist/esm/{chunk-VZSQATP6.js → chunk-G4YKBAZT.js} +2 -2
- package/dist/esm/{chunk-ECXGQQJB.js → chunk-GDAKJS64.js} +2 -2
- package/dist/esm/{chunk-VR7ZAFYN.js → chunk-GGSJXOKR.js} +2 -2
- package/dist/esm/chunk-GM7KMQDI.js +2 -0
- package/dist/esm/chunk-GMHA5CFH.js +2 -0
- package/dist/esm/chunk-GMHA5CFH.js.map +7 -0
- package/dist/esm/{chunk-CESYMTJQ.js → chunk-H4GR4262.js} +2 -2
- package/dist/esm/{chunk-WXQIIKWV.js → chunk-HBIF43PT.js} +2 -2
- package/dist/esm/chunk-HCNO7PX6.js +2 -0
- package/dist/esm/chunk-HCNO7PX6.js.map +7 -0
- package/dist/esm/{chunk-2264DHUW.js → chunk-HMSSFU6I.js} +2 -2
- package/dist/esm/chunk-HWQ3NTJP.js +2 -0
- package/dist/esm/chunk-HWQ3NTJP.js.map +7 -0
- package/dist/esm/{chunk-S5C5YRBS.js → chunk-IDUVJJYG.js} +2 -2
- package/dist/esm/{chunk-CIYF56YS.js → chunk-IK3MQHA5.js} +2 -2
- package/dist/esm/{chunk-CKMMUHKE.js → chunk-JDEBKA56.js} +2 -2
- package/dist/esm/{chunk-E67CIG6A.js → chunk-JDWCQ2XP.js} +2 -2
- package/dist/esm/{chunk-L3BWTV7I.js → chunk-JQSZF3E2.js} +2 -2
- package/dist/esm/{chunk-MEO7MJMQ.js → chunk-JQW4XYBS.js} +2 -2
- package/dist/esm/{chunk-KMPE7TJ6.js → chunk-JRFZ535T.js} +2 -2
- package/dist/esm/{chunk-CDG5WH4U.js → chunk-KEEPKI2X.js} +2 -2
- package/dist/esm/{chunk-GAV3NHYL.js → chunk-KV4SZP3F.js} +2 -2
- package/dist/esm/{chunk-FG7XM7KJ.js → chunk-LJCUPAOI.js} +2 -2
- package/dist/esm/{chunk-N4GTDLRD.js → chunk-MBCQA7UZ.js} +2 -2
- package/dist/esm/chunk-MM5IHQFM.js +2 -0
- package/dist/esm/{chunk-Y5RCH23Z.js → chunk-NQXRWBQM.js} +2 -2
- package/dist/esm/{chunk-CSKZZOI2.js → chunk-NTNMJX5M.js} +2 -2
- package/dist/esm/{chunk-V27ZAN3E.js → chunk-NV3P2CKH.js} +2 -2
- package/dist/esm/{chunk-4ME6O27S.js → chunk-O4CSXNST.js} +2 -2
- package/dist/esm/chunk-ODCVOXEV.js +2 -0
- package/dist/esm/{chunk-W2FOBR5Q.js → chunk-OEEF6KJG.js} +2 -2
- package/dist/esm/{chunk-ABSKRHVM.js → chunk-OJSOX3AX.js} +2 -2
- package/dist/esm/{chunk-JGLAE5G7.js → chunk-OQU2SKLN.js} +2 -2
- package/dist/esm/{chunk-PZ7OYATT.js → chunk-OTKQN2KY.js} +2 -2
- package/dist/esm/{chunk-QWVU2TW4.js → chunk-P27KV2LS.js} +2 -2
- package/dist/esm/{chunk-JUY7CBSL.js → chunk-PBFSBHBS.js} +2 -2
- package/dist/esm/{chunk-DSJY5RI3.js → chunk-PDUHBDFC.js} +2 -2
- package/dist/esm/{chunk-MTOLKA6S.js → chunk-POG3YABW.js} +2 -2
- package/dist/esm/chunk-PYHEBG5I.js +2 -0
- package/dist/esm/chunk-PYHEBG5I.js.map +7 -0
- package/dist/esm/{chunk-GO7OHBHW.js → chunk-PYXMGEO7.js} +2 -2
- package/dist/esm/{chunk-VNH7BJOA.js → chunk-QEGEUD4D.js} +2 -2
- package/dist/esm/chunk-QEL55MLF.js +2 -0
- package/dist/esm/{chunk-MS5J4MF6.js → chunk-QJVAS7AK.js} +2 -2
- package/dist/esm/chunk-ROSWI2CL.js +2 -0
- package/dist/esm/chunk-ROSWI2CL.js.map +7 -0
- package/dist/esm/{chunk-KCWESYMR.js → chunk-RY67WG3O.js} +2 -2
- package/dist/esm/{chunk-IFM4EMZB.js → chunk-TLGXIWAS.js} +2 -2
- package/dist/esm/{chunk-6FLLFCBU.js → chunk-UBSLEGQZ.js} +2 -2
- package/dist/esm/{chunk-VBI3AWPT.js → chunk-UNWPH3SO.js} +2 -2
- package/dist/esm/chunk-V5ZSDDVZ.js +2 -0
- package/dist/esm/chunk-V5ZSDDVZ.js.map +7 -0
- package/dist/esm/{chunk-X7V3V3W4.js → chunk-VTIL55SR.js} +2 -2
- package/dist/esm/{chunk-ALWNS44Q.js → chunk-W2LD2YE6.js} +2 -2
- package/dist/esm/{chunk-2I7QRVJ5.js → chunk-WGWUEU4K.js} +2 -2
- package/dist/esm/{chunk-EPTYNVCU.js → chunk-WIDJYVZF.js} +2 -2
- package/dist/esm/{chunk-OLAWVEAI.js → chunk-WJBOOAIO.js} +2 -2
- package/dist/esm/{chunk-7FC7HF76.js → chunk-WQCB7KSH.js} +2 -2
- package/dist/esm/{chunk-YBSRX63K.js → chunk-WZFVTC7P.js} +2 -2
- package/dist/esm/chunk-XDDKT4NF.js +2 -0
- package/dist/esm/{chunk-KFA53SVQ.js → chunk-YA5DF67M.js} +2 -2
- package/dist/esm/chunk-YA5DF67M.js.map +7 -0
- package/dist/esm/chunk-YAQBIO2B.js +2 -0
- package/dist/esm/chunk-YAQBIO2B.js.map +7 -0
- package/dist/esm/{chunk-OFUNVHZ5.js → chunk-YG66IRW4.js} +2 -2
- package/dist/esm/{chunk-WGYUWEQV.js → chunk-YVSM2LGS.js} +2 -2
- package/dist/esm/{chunk-4NTGF22C.js → chunk-Z7AZNMNX.js} +2 -2
- package/dist/esm/chunk-ZJ33QP5N.js +2 -0
- package/dist/esm/{chunk-OGXZHAQL.js → chunk-ZW26J2SA.js} +2 -2
- package/dist/esm/components/_internal/base-button.js +1 -1
- package/dist/esm/components/_internal/base-menu.utils.js +1 -1
- package/dist/esm/components/_internal/menu-context.js +1 -1
- package/dist/esm/components/_internal/shell-bottom.d.ts +6 -7
- package/dist/esm/components/_internal/shell-bottom.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-bottom.js +1 -1
- package/dist/esm/components/_internal/shell-handles.d.ts +9 -0
- package/dist/esm/components/_internal/shell-handles.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-handles.js +1 -1
- package/dist/esm/components/_internal/shell-inspector.d.ts +4 -6
- package/dist/esm/components/_internal/shell-inspector.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-inspector.js +1 -1
- package/dist/esm/components/_internal/shell-pane.d.ts +70 -0
- package/dist/esm/components/_internal/shell-pane.d.ts.map +1 -0
- package/dist/esm/components/_internal/shell-pane.js +2 -0
- package/dist/esm/components/_internal/shell-resizable.d.ts +48 -0
- package/dist/esm/components/_internal/shell-resizable.d.ts.map +1 -0
- package/dist/esm/components/_internal/shell-resizable.js +2 -0
- package/dist/esm/components/_internal/shell-resizable.js.map +7 -0
- package/dist/esm/components/_internal/shell-resize.d.ts +11 -3
- package/dist/esm/components/_internal/shell-resize.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-resize.js +1 -1
- package/dist/esm/components/_internal/shell-rest.d.ts +27 -0
- package/dist/esm/components/_internal/shell-rest.d.ts.map +1 -0
- package/dist/esm/components/_internal/shell-rest.js +2 -0
- package/dist/esm/components/_internal/shell-rest.js.map +7 -0
- package/dist/esm/components/_internal/shell-sidebar.d.ts +7 -12
- package/dist/esm/components/_internal/shell-sidebar.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-sidebar.js +1 -1
- package/dist/esm/components/_internal/shell-store.d.ts +99 -0
- package/dist/esm/components/_internal/shell-store.d.ts.map +1 -0
- package/dist/esm/components/_internal/shell-store.js +2 -0
- package/dist/esm/components/_internal/shell-store.js.map +7 -0
- package/dist/esm/components/accordion.js +1 -1
- package/dist/esm/components/alert-dialog.js +1 -1
- package/dist/esm/components/avatar.js +1 -1
- package/dist/esm/components/badge.js +1 -1
- package/dist/esm/components/blockquote.js +1 -1
- package/dist/esm/components/blockquote.props.js +1 -1
- package/dist/esm/components/box.js +1 -1
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/callout.js +1 -1
- package/dist/esm/components/card.js +1 -1
- package/dist/esm/components/chatbar.js +1 -1
- package/dist/esm/components/checkbox-cards.js +1 -1
- package/dist/esm/components/checkbox-group.js +1 -1
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/code.js +1 -1
- package/dist/esm/components/code.props.js +1 -1
- package/dist/esm/components/combobox.js +1 -1
- package/dist/esm/components/container.js +1 -1
- package/dist/esm/components/context-menu.js +1 -1
- package/dist/esm/components/data-list.js +1 -1
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dropdown-menu.js +1 -1
- package/dist/esm/components/em.js +1 -1
- package/dist/esm/components/em.props.js +1 -1
- package/dist/esm/components/flex.js +1 -1
- package/dist/esm/components/grid.js +1 -1
- package/dist/esm/components/heading.js +1 -1
- package/dist/esm/components/heading.props.js +1 -1
- package/dist/esm/components/hover-card.js +1 -1
- package/dist/esm/components/icon-button.js +1 -1
- package/dist/esm/components/image.js +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/inset.js +1 -1
- package/dist/esm/components/kbd.js +1 -1
- package/dist/esm/components/link.js +1 -1
- package/dist/esm/components/link.props.js +1 -1
- package/dist/esm/components/navbar.js +1 -1
- package/dist/esm/components/popover.js +1 -1
- package/dist/esm/components/progress.js +1 -1
- package/dist/esm/components/quote.js +1 -1
- package/dist/esm/components/quote.props.js +1 -1
- package/dist/esm/components/radio-cards.js +1 -1
- package/dist/esm/components/radio-group.js +1 -1
- package/dist/esm/components/radio.js +1 -1
- package/dist/esm/components/schemas/index.js +1 -1
- package/dist/esm/components/schemas/shell.schema.d.ts +277 -229
- package/dist/esm/components/schemas/shell.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/shell.schema.js +1 -1
- package/dist/esm/components/scroll-area.js +1 -1
- package/dist/esm/components/section.js +1 -1
- package/dist/esm/components/segmented-control.js +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/separator.js +1 -1
- package/dist/esm/components/sheet.js +1 -1
- package/dist/esm/components/shell.context.d.ts +25 -114
- package/dist/esm/components/shell.context.d.ts.map +1 -1
- package/dist/esm/components/shell.context.js +1 -1
- package/dist/esm/components/shell.d.ts +42 -21
- package/dist/esm/components/shell.d.ts.map +1 -1
- package/dist/esm/components/shell.hooks.d.ts +7 -23
- package/dist/esm/components/shell.hooks.d.ts.map +1 -1
- package/dist/esm/components/shell.hooks.js +1 -1
- package/dist/esm/components/shell.js +1 -1
- package/dist/esm/components/shell.types.d.ts +19 -2
- package/dist/esm/components/shell.types.d.ts.map +1 -1
- package/dist/esm/components/shell.types.js +1 -1
- package/dist/esm/components/sidebar.js +1 -1
- package/dist/esm/components/skeleton.js +1 -1
- package/dist/esm/components/slider.js +1 -1
- package/dist/esm/components/spinner.js +1 -1
- package/dist/esm/components/strong.js +1 -1
- package/dist/esm/components/strong.props.js +1 -1
- package/dist/esm/components/switch.js +1 -1
- package/dist/esm/components/tab-nav.js +1 -1
- package/dist/esm/components/table.js +1 -1
- package/dist/esm/components/tabs.js +1 -1
- package/dist/esm/components/text-area.js +1 -1
- package/dist/esm/components/text-field.js +1 -1
- package/dist/esm/components/text.js +1 -1
- package/dist/esm/components/text.props.js +1 -1
- package/dist/esm/components/theme-panel.js +1 -1
- package/dist/esm/components/toggle-button.js +1 -1
- package/dist/esm/components/toggle-icon-button.js +1 -1
- package/dist/esm/components/toolbar.js +1 -1
- package/dist/esm/components/tooltip.js +1 -1
- package/dist/esm/components/user-card.js +1 -1
- package/dist/esm/components/virtual-menu.js +1 -1
- package/dist/esm/helpers/extract-props.js +1 -1
- package/dist/esm/helpers/get-margin-styles.js +1 -1
- package/dist/esm/helpers/get-responsive-styles.js +1 -1
- package/dist/esm/helpers/index.js +1 -1
- package/dist/esm/hooks/index.js +1 -1
- package/dist/esm/hooks/use-breakpoint.d.ts +5 -0
- package/dist/esm/hooks/use-breakpoint.d.ts.map +1 -1
- package/dist/esm/hooks/use-breakpoint.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/props/index.js +1 -1
- package/package.json +7 -2
- package/schemas/index.json +1655 -0
- package/schemas/shell-bottom.d.ts +2 -0
- package/schemas/shell-bottom.json +180 -76
- package/schemas/shell-content.d.ts +2 -0
- package/schemas/shell-content.json +11 -5
- package/schemas/shell-handle.d.ts +2 -0
- package/schemas/shell-handle.json +7 -5
- package/schemas/shell-header.d.ts +2 -0
- package/schemas/shell-header.json +9 -10
- package/schemas/shell-inspector.d.ts +2 -0
- package/schemas/shell-inspector.json +183 -79
- package/schemas/shell-panel.d.ts +2 -0
- package/schemas/shell-panel.json +180 -76
- package/schemas/shell-rail.d.ts +2 -0
- package/schemas/shell-rail.json +137 -64
- package/schemas/shell-root.d.ts +2 -0
- package/schemas/shell-root.json +11 -9
- package/schemas/shell-sidebar.d.ts +2 -0
- package/schemas/shell-sidebar.json +274 -85
- package/schemas/shell-trigger.d.ts +2 -0
- package/schemas/shell-trigger.json +29 -17
- package/src/components/_internal/shell-bottom.tsx +92 -361
- package/src/components/_internal/shell-handles.tsx +193 -108
- package/src/components/_internal/shell-inspector.tsx +93 -360
- package/src/components/_internal/shell-pane.tsx +283 -0
- package/src/components/_internal/shell-resizable.tsx +263 -0
- package/src/components/_internal/shell-resize.tsx +11 -3
- package/src/components/_internal/shell-rest.ts +45 -0
- package/src/components/_internal/shell-sidebar.tsx +130 -441
- package/src/components/_internal/shell-store.tsx +204 -0
- package/src/components/schemas/shell.schema.ts +162 -153
- package/src/components/shell.context.tsx +112 -124
- package/src/components/shell.css +637 -496
- package/src/components/shell.hooks.ts +12 -170
- package/src/components/shell.tsx +566 -1497
- package/src/components/shell.types.ts +22 -2
- package/src/hooks/use-breakpoint.ts +9 -0
- package/styles.css +538 -493
- package/dist/cjs/components/_internal/shell-prop-helpers.d.ts +0 -7
- package/dist/cjs/components/_internal/shell-prop-helpers.d.ts.map +0 -1
- package/dist/cjs/components/_internal/shell-prop-helpers.js +0 -2
- package/dist/cjs/components/_internal/shell-prop-helpers.js.map +0 -7
- package/dist/esm/chunk-2SZZ75RJ.js +0 -2
- package/dist/esm/chunk-2SZZ75RJ.js.map +0 -7
- package/dist/esm/chunk-4JQZUQY7.js +0 -2
- package/dist/esm/chunk-5LXFJMFB.js +0 -2
- package/dist/esm/chunk-5LXFJMFB.js.map +0 -7
- package/dist/esm/chunk-CECQNGUL.js +0 -2
- package/dist/esm/chunk-CECQNGUL.js.map +0 -7
- package/dist/esm/chunk-CEIK5U6C.js +0 -2
- package/dist/esm/chunk-CEIK5U6C.js.map +0 -7
- package/dist/esm/chunk-EE2IH2GL.js +0 -2
- package/dist/esm/chunk-EE2IH2GL.js.map +0 -7
- package/dist/esm/chunk-FMBECDL4.js +0 -2
- package/dist/esm/chunk-HSAG7C53.js +0 -2
- package/dist/esm/chunk-JJKQ7CGI.js +0 -2
- package/dist/esm/chunk-KFA53SVQ.js.map +0 -7
- package/dist/esm/chunk-KRDP5SQ7.js +0 -2
- package/dist/esm/chunk-KRDP5SQ7.js.map +0 -7
- package/dist/esm/chunk-M6DJRFJZ.js +0 -2
- package/dist/esm/chunk-M6DJRFJZ.js.map +0 -7
- package/dist/esm/chunk-MCQCG6AS.js +0 -2
- package/dist/esm/chunk-NIQT45PJ.js +0 -2
- package/dist/esm/chunk-NNO7M466.js +0 -2
- package/dist/esm/chunk-NNO7M466.js.map +0 -7
- package/dist/esm/chunk-SNHEJU2S.js +0 -2
- package/dist/esm/chunk-SNHEJU2S.js.map +0 -7
- package/dist/esm/chunk-TLWTUKKL.js +0 -2
- package/dist/esm/chunk-TLWTUKKL.js.map +0 -7
- package/dist/esm/chunk-XI5YXUCK.js +0 -2
- package/dist/esm/components/_internal/shell-prop-helpers.d.ts +0 -7
- package/dist/esm/components/_internal/shell-prop-helpers.d.ts.map +0 -1
- package/dist/esm/components/_internal/shell-prop-helpers.js +0 -2
- package/src/components/_internal/shell-prop-helpers.ts +0 -54
- /package/dist/esm/{chunk-HJU4I34X.js.map → chunk-25X75TI7.js.map} +0 -0
- /package/dist/esm/{chunk-4XKK32M4.js.map → chunk-26I257HE.js.map} +0 -0
- /package/dist/esm/{chunk-GLERJXVS.js.map → chunk-2Q7BJ7YG.js.map} +0 -0
- /package/dist/esm/{chunk-CJ27XP5Z.js.map → chunk-3AOFY2B4.js.map} +0 -0
- /package/dist/esm/{chunk-7EWFBWBS.js.map → chunk-3PTSRBVY.js.map} +0 -0
- /package/dist/esm/{chunk-O2U6RJTB.js.map → chunk-44JZYS7A.js.map} +0 -0
- /package/dist/esm/{chunk-CTA5ODAO.js.map → chunk-4WU2WKUJ.js.map} +0 -0
- /package/dist/esm/{chunk-KZWNGWIM.js.map → chunk-5M7STAH3.js.map} +0 -0
- /package/dist/esm/{chunk-5WRCK4R7.js.map → chunk-5TAHT6VC.js.map} +0 -0
- /package/dist/esm/{chunk-RNTCHVFI.js.map → chunk-6J6YX2VX.js.map} +0 -0
- /package/dist/esm/{chunk-AGSSWWFI.js.map → chunk-7FKKGUHK.js.map} +0 -0
- /package/dist/esm/{chunk-WHFJ4JUN.js.map → chunk-7NYODT3Z.js.map} +0 -0
- /package/dist/esm/{chunk-NVDXXGVW.js.map → chunk-7PMMYHZV.js.map} +0 -0
- /package/dist/esm/{chunk-KJUDZCYK.js.map → chunk-AIHQ3MVK.js.map} +0 -0
- /package/dist/esm/{chunk-UBOOUDS4.js.map → chunk-AO32NT75.js.map} +0 -0
- /package/dist/esm/{chunk-JDGJSNWT.js.map → chunk-C5RVO3C3.js.map} +0 -0
- /package/dist/esm/{chunk-IHK3H2OM.js.map → chunk-CBNTPHYK.js.map} +0 -0
- /package/dist/esm/{chunk-BBJUB52V.js.map → chunk-CRBOJ7N7.js.map} +0 -0
- /package/dist/esm/{chunk-VHECAEUP.js.map → chunk-DCIQHXAR.js.map} +0 -0
- /package/dist/esm/{chunk-43A5GUSI.js.map → chunk-EHBAK3LQ.js.map} +0 -0
- /package/dist/esm/{chunk-K3UAS7RW.js.map → chunk-F3AXE27Q.js.map} +0 -0
- /package/dist/esm/{chunk-KFR3CK24.js.map → chunk-FB3PD4Z3.js.map} +0 -0
- /package/dist/esm/{chunk-MCPRXVKZ.js.map → chunk-FEAOFF77.js.map} +0 -0
- /package/dist/esm/{chunk-VZSQATP6.js.map → chunk-G4YKBAZT.js.map} +0 -0
- /package/dist/esm/{chunk-ECXGQQJB.js.map → chunk-GDAKJS64.js.map} +0 -0
- /package/dist/esm/{chunk-VR7ZAFYN.js.map → chunk-GGSJXOKR.js.map} +0 -0
- /package/dist/esm/{chunk-4JQZUQY7.js.map → chunk-GM7KMQDI.js.map} +0 -0
- /package/dist/esm/{chunk-CESYMTJQ.js.map → chunk-H4GR4262.js.map} +0 -0
- /package/dist/esm/{chunk-WXQIIKWV.js.map → chunk-HBIF43PT.js.map} +0 -0
- /package/dist/esm/{chunk-2264DHUW.js.map → chunk-HMSSFU6I.js.map} +0 -0
- /package/dist/esm/{chunk-S5C5YRBS.js.map → chunk-IDUVJJYG.js.map} +0 -0
- /package/dist/esm/{chunk-CIYF56YS.js.map → chunk-IK3MQHA5.js.map} +0 -0
- /package/dist/esm/{chunk-CKMMUHKE.js.map → chunk-JDEBKA56.js.map} +0 -0
- /package/dist/esm/{chunk-E67CIG6A.js.map → chunk-JDWCQ2XP.js.map} +0 -0
- /package/dist/esm/{chunk-L3BWTV7I.js.map → chunk-JQSZF3E2.js.map} +0 -0
- /package/dist/esm/{chunk-MEO7MJMQ.js.map → chunk-JQW4XYBS.js.map} +0 -0
- /package/dist/esm/{chunk-KMPE7TJ6.js.map → chunk-JRFZ535T.js.map} +0 -0
- /package/dist/esm/{chunk-CDG5WH4U.js.map → chunk-KEEPKI2X.js.map} +0 -0
- /package/dist/esm/{chunk-GAV3NHYL.js.map → chunk-KV4SZP3F.js.map} +0 -0
- /package/dist/esm/{chunk-FG7XM7KJ.js.map → chunk-LJCUPAOI.js.map} +0 -0
- /package/dist/esm/{chunk-N4GTDLRD.js.map → chunk-MBCQA7UZ.js.map} +0 -0
- /package/dist/esm/{chunk-JJKQ7CGI.js.map → chunk-MM5IHQFM.js.map} +0 -0
- /package/dist/esm/{chunk-Y5RCH23Z.js.map → chunk-NQXRWBQM.js.map} +0 -0
- /package/dist/esm/{chunk-CSKZZOI2.js.map → chunk-NTNMJX5M.js.map} +0 -0
- /package/dist/esm/{chunk-V27ZAN3E.js.map → chunk-NV3P2CKH.js.map} +0 -0
- /package/dist/esm/{chunk-4ME6O27S.js.map → chunk-O4CSXNST.js.map} +0 -0
- /package/dist/esm/{chunk-HSAG7C53.js.map → chunk-ODCVOXEV.js.map} +0 -0
- /package/dist/esm/{chunk-W2FOBR5Q.js.map → chunk-OEEF6KJG.js.map} +0 -0
- /package/dist/esm/{chunk-ABSKRHVM.js.map → chunk-OJSOX3AX.js.map} +0 -0
- /package/dist/esm/{chunk-JGLAE5G7.js.map → chunk-OQU2SKLN.js.map} +0 -0
- /package/dist/esm/{chunk-PZ7OYATT.js.map → chunk-OTKQN2KY.js.map} +0 -0
- /package/dist/esm/{chunk-QWVU2TW4.js.map → chunk-P27KV2LS.js.map} +0 -0
- /package/dist/esm/{chunk-JUY7CBSL.js.map → chunk-PBFSBHBS.js.map} +0 -0
- /package/dist/esm/{chunk-DSJY5RI3.js.map → chunk-PDUHBDFC.js.map} +0 -0
- /package/dist/esm/{chunk-MTOLKA6S.js.map → chunk-POG3YABW.js.map} +0 -0
- /package/dist/esm/{chunk-GO7OHBHW.js.map → chunk-PYXMGEO7.js.map} +0 -0
- /package/dist/esm/{chunk-VNH7BJOA.js.map → chunk-QEGEUD4D.js.map} +0 -0
- /package/dist/esm/{chunk-MCQCG6AS.js.map → chunk-QEL55MLF.js.map} +0 -0
- /package/dist/esm/{chunk-MS5J4MF6.js.map → chunk-QJVAS7AK.js.map} +0 -0
- /package/dist/esm/{chunk-KCWESYMR.js.map → chunk-RY67WG3O.js.map} +0 -0
- /package/dist/esm/{chunk-IFM4EMZB.js.map → chunk-TLGXIWAS.js.map} +0 -0
- /package/dist/esm/{chunk-6FLLFCBU.js.map → chunk-UBSLEGQZ.js.map} +0 -0
- /package/dist/esm/{chunk-VBI3AWPT.js.map → chunk-UNWPH3SO.js.map} +0 -0
- /package/dist/esm/{chunk-X7V3V3W4.js.map → chunk-VTIL55SR.js.map} +0 -0
- /package/dist/esm/{chunk-ALWNS44Q.js.map → chunk-W2LD2YE6.js.map} +0 -0
- /package/dist/esm/{chunk-2I7QRVJ5.js.map → chunk-WGWUEU4K.js.map} +0 -0
- /package/dist/esm/{chunk-EPTYNVCU.js.map → chunk-WIDJYVZF.js.map} +0 -0
- /package/dist/esm/{chunk-OLAWVEAI.js.map → chunk-WJBOOAIO.js.map} +0 -0
- /package/dist/esm/{chunk-7FC7HF76.js.map → chunk-WQCB7KSH.js.map} +0 -0
- /package/dist/esm/{chunk-YBSRX63K.js.map → chunk-WZFVTC7P.js.map} +0 -0
- /package/dist/esm/{chunk-XI5YXUCK.js.map → chunk-XDDKT4NF.js.map} +0 -0
- /package/dist/esm/{chunk-OFUNVHZ5.js.map → chunk-YG66IRW4.js.map} +0 -0
- /package/dist/esm/{chunk-WGYUWEQV.js.map → chunk-YVSM2LGS.js.map} +0 -0
- /package/dist/esm/{chunk-4NTGF22C.js.map → chunk-Z7AZNMNX.js.map} +0 -0
- /package/dist/esm/{chunk-NIQT45PJ.js.map → chunk-ZJ33QP5N.js.map} +0 -0
- /package/dist/esm/{chunk-OGXZHAQL.js.map → chunk-ZW26J2SA.js.map} +0 -0
- /package/dist/esm/components/_internal/{shell-prop-helpers.js.map → shell-pane.js.map} +0 -0
|
@@ -1,59 +1,65 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useResponsivePresentation } from './shell.hooks.js';
|
|
3
2
|
import { Sidebar } from './_internal/shell-sidebar.js';
|
|
4
3
|
import { Bottom } from './_internal/shell-bottom.js';
|
|
5
4
|
import { Inspector } from './_internal/shell-inspector.js';
|
|
6
|
-
import type { ResponsivePresentation, PaneMode, SidebarMode, Breakpoint, PaneTarget, PaneBaseProps } from './shell.types.js';
|
|
7
5
|
import { useShell, useSidebarMode } from './shell.context.js';
|
|
8
|
-
|
|
6
|
+
import { useResponsivePresentation } from './shell.hooks.js';
|
|
7
|
+
import type { Breakpoint, PaneBaseProps, PaneMode, PaneTarget, ResponsivePresentation, SidebarMode } from './shell.types.js';
|
|
8
|
+
export interface ShellRootProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
height?: 'full' | 'auto' | string | number;
|
|
11
|
+
}
|
|
12
|
+
declare const Root: React.ForwardRefExoticComponent<ShellRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
13
|
interface ShellHeaderProps extends React.ComponentPropsWithoutRef<'header'> {
|
|
10
14
|
height?: number;
|
|
11
15
|
}
|
|
12
16
|
declare const Header: React.ForwardRefExoticComponent<ShellHeaderProps & React.RefAttributes<HTMLElement>>;
|
|
13
|
-
type PaneProps = PaneBaseProps;
|
|
14
17
|
interface LeftProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
15
18
|
presentation?: ResponsivePresentation;
|
|
16
19
|
open?: boolean;
|
|
17
20
|
defaultOpen?: boolean;
|
|
18
21
|
onOpenChange?: (open: boolean, meta: {
|
|
19
|
-
reason: 'init' | 'toggle' | 'panel' | 'responsive';
|
|
22
|
+
reason: 'init' | 'toggle' | 'panel' | 'responsive' | 'dismiss';
|
|
20
23
|
}) => void;
|
|
21
24
|
collapsible?: boolean;
|
|
22
25
|
onExpand?: () => void;
|
|
23
26
|
onCollapse?: () => void;
|
|
24
|
-
mode?: never;
|
|
25
|
-
defaultMode?: never;
|
|
26
|
-
onModeChange?: never;
|
|
27
|
-
/** When true, adds margin and triggers gray backdrop on Shell. */
|
|
28
27
|
inset?: boolean;
|
|
29
28
|
}
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated The Root no longer wraps the Rail and Panel in a Left
|
|
31
|
+
* container: each is its own pane. `Shell.Left` renders its children and
|
|
32
|
+
* ignores its own props. Removed in 1.0.
|
|
33
|
+
*/
|
|
34
|
+
declare const Left: React.ForwardRefExoticComponent<LeftProps & React.RefAttributes<HTMLDivElement>>;
|
|
35
|
+
type RailOpenChangeMeta = {
|
|
36
|
+
reason: 'init' | 'toggle' | 'responsive' | 'panel' | 'dismiss';
|
|
32
37
|
};
|
|
33
38
|
type RailControlledProps = {
|
|
34
39
|
open: boolean | Partial<Record<Breakpoint, boolean>>;
|
|
35
|
-
onOpenChange?: (open: boolean, meta:
|
|
40
|
+
onOpenChange?: (open: boolean, meta: RailOpenChangeMeta) => void;
|
|
36
41
|
defaultOpen?: never;
|
|
37
42
|
};
|
|
38
43
|
type RailUncontrolledProps = {
|
|
39
44
|
defaultOpen?: boolean | Partial<Record<Breakpoint, boolean>>;
|
|
40
|
-
onOpenChange?: (open: boolean, meta:
|
|
45
|
+
onOpenChange?: (open: boolean, meta: RailOpenChangeMeta) => void;
|
|
41
46
|
open?: never;
|
|
42
47
|
};
|
|
43
48
|
type RailProps = React.ComponentPropsWithoutRef<'div'> & {
|
|
44
49
|
presentation?: ResponsivePresentation;
|
|
45
50
|
expandedSize?: number;
|
|
46
51
|
collapsible?: boolean;
|
|
52
|
+
/** @deprecated Use `onOpenChange`. */
|
|
47
53
|
onExpand?: () => void;
|
|
54
|
+
/** @deprecated Use `onOpenChange`. */
|
|
48
55
|
onCollapse?: () => void;
|
|
49
|
-
/** When true, adds margin
|
|
56
|
+
/** When true, adds margin and triggers the gray backdrop on the Shell. */
|
|
50
57
|
inset?: boolean;
|
|
51
58
|
} & (RailControlledProps | RailUncontrolledProps);
|
|
52
|
-
declare const Left: React.ForwardRefExoticComponent<LeftProps & React.RefAttributes<HTMLDivElement>>;
|
|
53
59
|
declare const Rail: React.ForwardRefExoticComponent<RailProps & React.RefAttributes<HTMLDivElement>>;
|
|
54
60
|
type HandleComponent = React.ForwardRefExoticComponent<React.ComponentPropsWithoutRef<'div'> & React.RefAttributes<HTMLDivElement>>;
|
|
55
61
|
type PanelOpenChangeMeta = {
|
|
56
|
-
reason: 'toggle' | 'left' | 'init' | 'responsive';
|
|
62
|
+
reason: 'toggle' | 'left' | 'init' | 'responsive' | 'dismiss';
|
|
57
63
|
};
|
|
58
64
|
type PanelControlledProps = {
|
|
59
65
|
open: boolean | Partial<Record<Breakpoint, boolean>>;
|
|
@@ -76,19 +82,25 @@ type PanelSizeUncontrolledProps = {
|
|
|
76
82
|
type PanelSizeChangeMeta = {
|
|
77
83
|
reason: 'init' | 'resize' | 'controlled';
|
|
78
84
|
};
|
|
79
|
-
type PanelPublicProps =
|
|
85
|
+
type PanelPublicProps = PaneBaseProps & (PanelControlledProps | PanelUncontrolledProps) & (PanelSizeControlledProps | PanelSizeUncontrolledProps) & {
|
|
80
86
|
onSizeChange?: (size: number, meta: PanelSizeChangeMeta) => void;
|
|
81
87
|
sizeUpdate?: 'throttle' | 'debounce';
|
|
82
88
|
sizeUpdateMs?: number;
|
|
83
|
-
/** When true, adds margin
|
|
89
|
+
/** When true, adds margin and triggers the gray backdrop on the Shell. */
|
|
84
90
|
inset?: boolean;
|
|
85
91
|
};
|
|
86
92
|
type PanelComponent = React.ForwardRefExoticComponent<PanelPublicProps & React.RefAttributes<HTMLDivElement>> & {
|
|
87
93
|
Handle: HandleComponent;
|
|
88
94
|
};
|
|
95
|
+
/**
|
|
96
|
+
* A Panel with a `presentation` of its own uses it. One without follows the
|
|
97
|
+
* Rail rendered before it, which is how 0.7 placed a Panel; the stylesheet
|
|
98
|
+
* reads the Rail's attributes for the first paint and the registry carries
|
|
99
|
+
* the Rail's table for the JS mirror.
|
|
100
|
+
*/
|
|
89
101
|
declare const Panel: PanelComponent;
|
|
90
102
|
interface ShellContentProps extends React.ComponentPropsWithoutRef<'main'> {
|
|
91
|
-
/** When true, adds margin and triggers gray backdrop on Shell. */
|
|
103
|
+
/** When true, adds margin and triggers the gray backdrop on the Shell. */
|
|
92
104
|
inset?: boolean;
|
|
93
105
|
}
|
|
94
106
|
declare const Content: React.ForwardRefExoticComponent<ShellContentProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -97,11 +109,20 @@ interface TriggerProps extends React.ComponentPropsWithoutRef<'button'> {
|
|
|
97
109
|
target: PaneTarget;
|
|
98
110
|
action?: TriggerAction;
|
|
99
111
|
/**
|
|
100
|
-
* Whether to show
|
|
101
|
-
* Defaults to false.
|
|
112
|
+
* Whether to show a preview of the target pane on hover while it is closed
|
|
113
|
+
* and not an overlay. Defaults to false.
|
|
114
|
+
*
|
|
115
|
+
* @deprecated Removed in 1.0. A preview reachable only by mouse hover has no
|
|
116
|
+
* keyboard or touch equivalent; open the pane instead.
|
|
102
117
|
*/
|
|
103
118
|
peekOnHover?: boolean;
|
|
104
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* A button that drives a pane by name, through the registry. It sets
|
|
122
|
+
* `aria-controls` and `aria-expanded` (left off while an untouched pane
|
|
123
|
+
* cannot know its state yet), renders `type="button"`, and runs the
|
|
124
|
+
* consumer's `onClick` first: calling `preventDefault()` there cancels it.
|
|
125
|
+
*/
|
|
105
126
|
declare const Trigger: React.ForwardRefExoticComponent<TriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
106
127
|
export { Root, Header, Left, Rail, Panel, Sidebar, Content, Inspector, Bottom, Trigger, useShell, useSidebarMode, useResponsivePresentation, type PaneMode, type SidebarMode, type ResponsivePresentation, type PaneTarget, type TriggerAction, };
|
|
107
128
|
//# sourceMappingURL=shell.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../../src/components/shell.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../../src/components/shell.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,26 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare function useResponsivePresentation(presentation: ResponsivePresentation): PresentationValue;
|
|
1
|
+
import type { PresentationValue, ResponsivePresentation } from './shell.types.js';
|
|
3
2
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* @deprecated Since 0.8.0 the Shell resolves a responsive `presentation` in
|
|
4
|
+
* its stylesheet, so the pane is placed before any script runs. This hook
|
|
5
|
+
* resolves it in JS after mount, which is the behaviour the Shell left
|
|
6
|
+
* behind. It keeps working until 1.0.
|
|
7
7
|
*/
|
|
8
|
-
declare function
|
|
9
|
-
|
|
10
|
-
interface UseResponsiveInitialStateOptions<T> {
|
|
11
|
-
controlledValue?: ResponsiveStateValue<T>;
|
|
12
|
-
defaultValue?: ResponsiveStateValue<T>;
|
|
13
|
-
currentValue: T;
|
|
14
|
-
setValue: (value: T) => void;
|
|
15
|
-
breakpointReady: boolean;
|
|
16
|
-
onInit?: (value: T) => void;
|
|
17
|
-
onResponsiveChange?: (value: T) => void;
|
|
18
|
-
controlledIsResponsive?: boolean;
|
|
19
|
-
}
|
|
20
|
-
interface UseResponsiveInitialStateResult<T> {
|
|
21
|
-
resolvedControlled?: T;
|
|
22
|
-
resolvedDefault?: T;
|
|
23
|
-
}
|
|
24
|
-
declare function useResponsiveInitialState<T>({ controlledValue, defaultValue, currentValue, setValue, breakpointReady, onInit, onResponsiveChange, controlledIsResponsive, }: UseResponsiveInitialStateOptions<T>): UseResponsiveInitialStateResult<T>;
|
|
25
|
-
export { useResponsivePresentation, useResponsiveValue, useResponsiveInitialState };
|
|
8
|
+
declare function useResponsivePresentation(presentation: ResponsivePresentation): PresentationValue;
|
|
9
|
+
export { useResponsivePresentation };
|
|
26
10
|
//# sourceMappingURL=shell.hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell.hooks.d.ts","sourceRoot":"","sources":["../../../src/components/shell.hooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shell.hooks.d.ts","sourceRoot":"","sources":["../../../src/components/shell.hooks.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAGlF;;;;;GAKG;AACH,iBAAS,yBAAyB,CAAC,YAAY,EAAE,sBAAsB,GAAG,iBAAiB,CAM1F;AAED,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var T=Object.create;var p=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var C=(e,t)=>{for(var n in t)p(e,n,{get:t[n],enumerable:!0})},y=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of B(t))!I.call(e,r)&&r!==n&&p(e,r,{get:()=>t[r],enumerable:!(a=E(t,r))||a.enumerable});return e};var d=(e,t,n)=>(n=e!=null?T(w(e)):{},y(t||!e||!e.__esModule?p(n,"default",{value:e,enumerable:!0}):n,e)),L=e=>y(p({},"__esModule",{value:!0}),e);var K={};C(K,{useResponsivePresentation:()=>_});module.exports=L(K);var k=d(require("react"));var l=d(require("react"));var P={xs:"(min-width: 520px)",sm:"(min-width: 768px)",md:"(min-width: 1024px)",lg:"(min-width: 1280px)",xl:"(min-width: 1640px)"},b=["initial","xs","sm","md","lg","xl"];var M=Object.entries(P),c=null,s=new Set,o=null;function f(){return c??(c=M.map(([e,t])=>[e,window.matchMedia(t)])),c}function S(){let e="initial";for(let[t,n]of f())n.matches&&(e=t);return e}function u(){let e=S();e!==o&&(o=e,s.forEach(t=>t()))}function R(e){if(typeof window>"u")return()=>{};if(s.size===0){o=S();for(let[,t]of f())typeof t.addEventListener=="function"?t.addEventListener("change",u):t.addListener?.(u)}return s.add(e),()=>{if(s.delete(e),!(s.size>0)){for(let[,t]of f())try{typeof t.removeEventListener=="function"?t.removeEventListener("change",u):t.removeListener?.(u)}catch{}o=null}}}function N(){return typeof window>"u"?"initial":(o??(o=S()),o)}function O(){return"initial"}var V=()=>!0,z=()=>!1,h=()=>()=>{},A=()=>"initial";function g(e=!0){let t=l.useSyncExternalStore(e?R:h,e?N:A,O),n=l.useSyncExternalStore(e?R:h,V,z);return l.useMemo(()=>({breakpoint:t,ready:n}),[t,n])}var i=d(require("react"));function v(e){return typeof e=="object"&&e!==null}function m(e,t){let n={},a=null;for(let r of b){if(e!==void 0&&!v(e)){n[r]=e;continue}let x=v(e)?e[r]:void 0;x!==void 0&&(a={value:x}),n[r]=a?a.value:t(r)}return n}var H=m("fixed",()=>"fixed");var W=i.createContext(null);var F=i.createContext(null);function _(e){k.useEffect(()=>{},[]);let{breakpoint:t}=g(typeof e!="string");return m(e,()=>"fixed")[t]}
|
|
2
2
|
//# sourceMappingURL=shell.hooks.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/shell.hooks.ts", "../../../src/components/shell.types.ts", "../../../src/components/shell.
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport type { Breakpoint, PresentationValue, ResponsivePresentation } from './shell.types.js';\nimport { _BREAKPOINTS } from './shell.types.js';\nimport { useShell } from './shell.context.js';\n\nfunction useResponsivePresentation(presentation: ResponsivePresentation): PresentationValue {\n const { currentBreakpoint } = useShell();\n\n return React.useMemo(() => {\n if (typeof presentation === 'string') {\n return presentation;\n }\n\n if (presentation[currentBreakpoint]) {\n return presentation[currentBreakpoint]!;\n }\n\n const bpKeys = Object.keys(_BREAKPOINTS) as Array<keyof typeof _BREAKPOINTS>;\n const order: Breakpoint[] = ([...bpKeys].reverse() as Breakpoint[]).concat('initial' as Breakpoint);\n const startIdx = order.indexOf(currentBreakpoint as Breakpoint);\n\n for (let i = startIdx + 1; i < order.length; i++) {\n const bp = order[i];\n if (presentation[bp]) {\n return presentation[bp]!;\n }\n }\n\n return 'fixed';\n }, [presentation, currentBreakpoint]);\n}\n\n/**\n * Resolve a responsive value (T or responsive map keyed by breakpoints) against the current Shell breakpoint.\n * If no value is defined for the current breakpoint, search smaller breakpoints down to 'initial'.\n * Returns undefined when passed a responsive map with no matching key across the chain.\n */\nfunction useResponsiveValue<T>(value: T | Partial<Record<Breakpoint, T>> | undefined): T | undefined {\n const { currentBreakpoint } = useShell();\n\n return React.useMemo(() => {\n if (value == null) return undefined;\n // Primitive value\n if (typeof value !== 'object') {\n return value as T;\n }\n\n const map = value as Partial<Record<Breakpoint, T>>;\n if (map[currentBreakpoint as Breakpoint] !== undefined) {\n return map[currentBreakpoint as Breakpoint] as T;\n }\n\n const bpKeys = Object.keys(_BREAKPOINTS) as Array<keyof typeof _BREAKPOINTS>;\n const order: Breakpoint[] = ([...bpKeys].reverse() as Breakpoint[]).concat('initial' as Breakpoint);\n const startIdx = order.indexOf(currentBreakpoint as Breakpoint);\n\n for (let i = startIdx + 1; i < order.length; i++) {\n const bp = order[i];\n if (map[bp] !== undefined) {\n return map[bp] as T;\n }\n }\n\n return undefined;\n }, [value, currentBreakpoint]);\n}\n\ntype ResponsiveStateValue<T> = T | Partial<Record<Breakpoint, T>>;\n\ninterface UseResponsiveInitialStateOptions<T> {\n controlledValue?: ResponsiveStateValue<T>;\n defaultValue?: ResponsiveStateValue<T>;\n currentValue: T;\n setValue: (value: T) => void;\n breakpointReady: boolean;\n onInit?: (value: T) => void;\n onResponsiveChange?: (value: T) => void;\n controlledIsResponsive?: boolean;\n}\n\ninterface UseResponsiveInitialStateResult<T> {\n resolvedControlled?: T;\n resolvedDefault?: T;\n}\n\nfunction useResponsiveInitialState<T>({\n controlledValue,\n defaultValue,\n currentValue,\n setValue,\n breakpointReady,\n onInit,\n onResponsiveChange,\n controlledIsResponsive = false,\n}: UseResponsiveInitialStateOptions<T>): UseResponsiveInitialStateResult<T> {\n const resolvedControlled = useResponsiveValue(controlledValue);\n const resolvedDefault = useResponsiveValue(defaultValue);\n\n const lastControlledRef = React.useRef<T | undefined>(undefined);\n const pendingSyncRef = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n const latestControlledRef = React.useRef<T | undefined>(resolvedControlled);\n const latestValueRef = React.useRef(currentValue);\n const setValueRef = React.useRef(setValue);\n\n React.useLayoutEffect(() => {\n latestControlledRef.current = resolvedControlled;\n latestValueRef.current = currentValue;\n setValueRef.current = setValue;\n });\n\n React.useEffect(() => {\n if (resolvedControlled === undefined) return;\n\n const prevControlled = lastControlledRef.current;\n const controlledChanged = prevControlled !== resolvedControlled;\n lastControlledRef.current = resolvedControlled;\n\n if (currentValue === resolvedControlled) {\n if (pendingSyncRef.current) {\n clearTimeout(pendingSyncRef.current);\n pendingSyncRef.current = null;\n }\n if (controlledIsResponsive) {\n onResponsiveChange?.(resolvedControlled);\n }\n return;\n }\n\n if (controlledChanged) {\n if (pendingSyncRef.current) {\n clearTimeout(pendingSyncRef.current);\n pendingSyncRef.current = null;\n }\n setValue(resolvedControlled);\n if (controlledIsResponsive) {\n onResponsiveChange?.(resolvedControlled);\n }\n return;\n }\n\n if (!pendingSyncRef.current) {\n pendingSyncRef.current = setTimeout(() => {\n pendingSyncRef.current = null;\n const latestControlled = latestControlledRef.current;\n const latestValue = latestValueRef.current;\n if (latestControlled === undefined) return;\n if (latestValue === latestControlled) return;\n setValueRef.current(latestControlled);\n }, 0);\n }\n }, [resolvedControlled, currentValue, setValue, onResponsiveChange, controlledIsResponsive]);\n\n React.useEffect(() => {\n return () => {\n if (pendingSyncRef.current) {\n clearTimeout(pendingSyncRef.current);\n pendingSyncRef.current = null;\n }\n };\n }, []);\n\n const didInitRef = React.useRef(false);\n React.useEffect(() => {\n if (didInitRef.current) return;\n if (!breakpointReady) return;\n if (typeof controlledValue !== 'undefined') return;\n if (resolvedDefault === undefined) return;\n didInitRef.current = true;\n if (currentValue !== resolvedDefault) {\n setValue(resolvedDefault);\n }\n onInit?.(resolvedDefault);\n }, [breakpointReady, controlledValue, resolvedDefault, currentValue, setValue, onInit]);\n\n return { resolvedControlled, resolvedDefault };\n}\n\nexport { useResponsivePresentation, useResponsiveValue, useResponsiveInitialState };\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' | 'thin' | '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\nexport interface PaneBaseProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n expandedSize?: number;\n minSize?: number;\n maxSize?: number;\n height?: string | number;\n resizable?: boolean;\n collapsible?: boolean;\n onExpand?: () => void;\n onCollapse?: () => void;\n onResize?: (size: number) => void;\n resizer?: React.ReactNode;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n snapPoints?: number[];\n snapTolerance?: number;\n collapseThreshold?: number;\n paneId?: string;\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\nexport type PaneTarget = 'left' | 'rail' | 'panel' | 'sidebar' | 'inspector' | 'bottom';\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", "import * as React from 'react';\nimport type { Breakpoint, PresentationValue, SidebarMode, PaneMode, PaneTarget } from './shell.types.js';\n\nexport interface ShellContextValue {\n // Pane states\n leftMode: PaneMode;\n setLeftMode: (mode: PaneMode) => void;\n /** When Rail is controlled, this reflects the resolved open state for the current breakpoint. */\n leftControlledOpen?: boolean;\n panelMode: PaneMode; // Panel state within left container\n setPanelMode: (mode: PaneMode) => void;\n sidebarMode: SidebarMode;\n setSidebarMode: (mode: SidebarMode) => void;\n inspectorMode: PaneMode;\n setInspectorMode: (mode: PaneMode) => void;\n bottomMode: PaneMode;\n setBottomMode: (mode: PaneMode) => void;\n\n // Peek state (layout-only, ephemeral)\n peekTarget: PaneTarget | null;\n setPeekTarget: (target: PaneTarget | null) => void;\n peekPane: (target: PaneTarget) => void;\n clearPeek: () => void;\n\n // Composition detection\n hasLeft: boolean;\n setHasLeft: (has: boolean) => void;\n hasSidebar: boolean;\n setHasSidebar: (has: boolean) => void;\n\n // Presentation resolution\n currentBreakpoint: Breakpoint;\n currentBreakpointReady: boolean;\n leftResolvedPresentation?: PresentationValue;\n\n // Actions\n togglePane: (target: PaneTarget) => void;\n expandPane: (target: PaneTarget) => void;\n collapsePane: (target: PaneTarget) => void;\n // Toggle customization\n setSidebarToggleComputer?: (fn: (current: SidebarMode) => SidebarMode) => void;\n // Dev-only hooks for presentation warnings\n onLeftPres?: (p: PresentationValue) => void;\n // Sizing info for overlay grouping\n onLeftDefaults?: (size: number) => void;\n onRailDefaults?: (size: number) => void;\n onPanelDefaults?: (size: number) => void;\n}\n\nconst ShellContext = React.createContext<ShellContextValue | null>(null);\n\n/** @internal Shell root context. Prefer slice hooks (useSidebarMode, useShellActions, etc.). */\nexport function useShell() {\n const ctx = React.useContext(ShellContext);\n if (!ctx) throw new Error('Shell components must be used within <Shell.Root>');\n return ctx;\n}\n\nexport function ShellProvider({ value, children }: { value: ShellContextValue; children: React.ReactNode }) {\n return <ShellContext.Provider value={value}>{children}</ShellContext.Provider>;\n}\n\n// Phase 7: Split contexts for render isolation\n\n// Pane mode slice contexts\ntype ModeSetter<T> = (mode: T) => void;\n\nexport const LeftModeContext = React.createContext<{ leftMode: PaneMode; setLeftMode: ModeSetter<PaneMode> } | null>(null);\nexport function useLeftMode() {\n const ctx = React.useContext(LeftModeContext);\n if (!ctx) throw new Error('useLeftMode must be used within Shell.Root');\n return ctx;\n}\n\nexport const PanelModeContext = React.createContext<{ panelMode: PaneMode; setPanelMode: ModeSetter<PaneMode> } | null>(null);\nexport function usePanelMode() {\n const ctx = React.useContext(PanelModeContext);\n if (!ctx) throw new Error('usePanelMode must be used within Shell.Root');\n return ctx;\n}\n\nexport const SidebarModeContext = React.createContext<{ sidebarMode: SidebarMode; setSidebarMode: ModeSetter<SidebarMode> } | null>(null);\nexport function useSidebarMode() {\n const ctx = React.useContext(SidebarModeContext);\n if (!ctx) throw new Error('useSidebarMode must be used within Shell.Root');\n return ctx;\n}\n\nexport const InspectorModeContext = React.createContext<{ inspectorMode: PaneMode; setInspectorMode: ModeSetter<PaneMode> } | null>(null);\nexport function useInspectorMode() {\n const ctx = React.useContext(InspectorModeContext);\n if (!ctx) throw new Error('useInspectorMode must be used within Shell.Root');\n return ctx;\n}\n\nexport const BottomModeContext = React.createContext<{ bottomMode: PaneMode; setBottomMode: ModeSetter<PaneMode> } | null>(null);\nexport function useBottomMode() {\n const ctx = React.useContext(BottomModeContext);\n if (!ctx) throw new Error('useBottomMode must be used within Shell.Root');\n return ctx;\n}\n\n// Presentation slice\nexport const PresentationContext = React.createContext<{ currentBreakpoint: Breakpoint; currentBreakpointReady: boolean; leftResolvedPresentation?: PresentationValue } | null>(null);\nexport function usePresentation() {\n const ctx = React.useContext(PresentationContext);\n if (!ctx) throw new Error('usePresentation must be used within Shell.Root');\n return ctx;\n}\n\n// Peek slice\nexport const PeekContext = React.createContext<{ peekTarget: PaneTarget | null; setPeekTarget: (t: PaneTarget | null) => void; peekPane: (t: PaneTarget) => void; clearPeek: () => void } | null>(\n null,\n);\nexport function usePeek() {\n const ctx = React.useContext(PeekContext);\n if (!ctx) throw new Error('usePeek must be used within Shell.Root');\n return ctx;\n}\n\n// Actions slice (stable callbacks)\nexport const ActionsContext = React.createContext<{\n togglePane: (t: PaneTarget) => void;\n expandPane: (t: PaneTarget) => void;\n collapsePane: (t: PaneTarget) => void;\n setSidebarToggleComputer?: (fn: (current: SidebarMode) => SidebarMode) => void;\n} | null>(null);\nexport function useShellActions() {\n const ctx = React.useContext(ActionsContext);\n if (!ctx) throw new Error('useShellActions must be used within Shell.Root');\n return ctx;\n}\n\n// Composition slice\nexport const CompositionContext = React.createContext<{ hasLeft: boolean; setHasLeft: (v: boolean) => void; hasSidebar: boolean; setHasSidebar: (v: boolean) => void } | null>(null);\nexport function useComposition() {\n const ctx = React.useContext(CompositionContext);\n if (!ctx) throw new Error('useComposition must be used within Shell.Root');\n return ctx;\n}\n\n// Inset slice - tracks which panes have inset for gray backdrop\nexport type InsetPaneId = 'left' | 'sidebar' | 'content' | 'inspector' | 'bottom';\nexport const InsetContext = React.createContext<{\n insetPanes: Set<InsetPaneId>;\n registerInset: (id: InsetPaneId) => void;\n unregisterInset: (id: InsetPaneId) => void;\n hasAnyInset: boolean;\n} | null>(null);\nexport function useInset() {\n const ctx = React.useContext(InsetContext);\n if (!ctx) throw new Error('useInset must be used within Shell.Root');\n return ctx;\n}\n"],
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,+BAAAE,
|
|
6
|
-
"names": ["shell_hooks_exports", "__export", "
|
|
3
|
+
"sources": ["../../../src/components/shell.hooks.ts", "../../../src/hooks/use-breakpoint.ts", "../../../src/components/shell.types.ts", "../../../src/components/_internal/shell-store.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport { useBreakpoint } from '../hooks/use-breakpoint.js';\nimport type { PresentationValue, ResponsivePresentation } from './shell.types.js';\nimport { tableOf, warnOnce } from './_internal/shell-store.js';\n\n/**\n * @deprecated Since 0.8.0 the Shell resolves a responsive `presentation` in\n * its stylesheet, so the pane is placed before any script runs. This hook\n * resolves it in JS after mount, which is the behaviour the Shell left\n * behind. It keeps working until 1.0.\n */\nfunction useResponsivePresentation(presentation: ResponsivePresentation): PresentationValue {\n React.useEffect(() => {\n warnOnce('Shell.useResponsivePresentation is deprecated and is removed in 1.0. The Shell resolves presentation in CSS.');\n }, []);\n const { breakpoint } = useBreakpoint(typeof presentation !== 'string');\n return tableOf<PresentationValue>(presentation, () => 'fixed')[breakpoint];\n}\n\nexport { useResponsivePresentation };\n", "'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' | 'thin' | '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` (the\n * Sidebar adds `thin`). `auto` means untouched: the stylesheet decides what\n * it shows at each breakpoint, so first paint is right with no script, the\n * server and the client render the same markup, and no open-state callback\n * can fire on mount or on a resize.\n * - The one thing that crosses the Shell is a registry keyed by pane name.\n * Each pane registers what it is and how to drive it; a Trigger looks its\n * pane up, and the Root reads the set of live overlays. Nothing scans\n * children and nothing checks `displayName`.\n * - The responsive props are resolved into a table with one value per\n * breakpoint, from the props alone, with no window. The table is written to\n * the DOM as data attributes for the stylesheet, and read again in JS by the\n * mirror that sets `aria-expanded`. One table, two readers, so they agree by\n * construction.\n */\nimport * as React from 'react';\nimport { SHELL_BREAKPOINTS } from '../shell.types.js';\nimport type { Breakpoint, PaneName, PresentationValue } from '../shell.types.js';\n\n/* \u2500\u2500 Breakpoint tables \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport type Table<T> = Record<Breakpoint, T>;\n\n/** What a pane shows: open, open at its thin width (Sidebar only), or closed. */\nexport type PaneValue = 'open' | 'thin' | 'closed';\n\ntype ResponsiveInput<T> = T | Partial<Record<Breakpoint, T>> | undefined;\n\nfunction isMap<T>(value: ResponsiveInput<T>): value is Partial<Record<Breakpoint, T>> {\n return typeof value === 'object' && value !== null;\n}\n\n/**\n * A responsive value at every breakpoint. A breakpoint takes the largest key\n * at or below it, the same fallback `useResponsiveValue` used; a breakpoint\n * below every key takes `fallback`.\n */\nexport function tableOf<T>(value: ResponsiveInput<T>, fallback: (bp: Breakpoint) => T): Table<T> {\n const table = {} as Table<T>;\n let carried: { value: T } | null = null;\n for (const bp of SHELL_BREAKPOINTS) {\n if (value !== undefined && !isMap(value)) {\n table[bp] = value;\n continue;\n }\n const entry = isMap(value) ? value[bp] : undefined;\n if (entry !== undefined) carried = { value: entry };\n table[bp] = carried ? carried.value : fallback(bp);\n }\n return table;\n}\n\n/** The table's one value, when it has only one. */\nexport function constantOf<T>(table: Table<T>): T | undefined {\n const first = table.initial;\n return SHELL_BREAKPOINTS.every((bp) => table[bp] === first) ? first : undefined;\n}\n\n/**\n * The table as data attributes: `data-<name>` when it holds one value, one\n * `data-<name>-<bp>` per breakpoint when it holds several. The stylesheet has\n * a rule for each spelling.\n */\nexport function tableAttributes(name: string, table: Table<string>): Record<string, string> {\n const constant = constantOf(table);\n if (constant !== undefined) return { [`data-${name}`]: constant };\n const attributes: Record<string, string> = {};\n for (const bp of SHELL_BREAKPOINTS) attributes[`data-${name}-${bp}`] = table[bp];\n return attributes;\n}\n\n/**\n * A responsive prop object is usually an inline literal, a new identity every\n * render. Keying memoisation on its contents keeps the tables, and so the\n * registry entries, stable across renders that change nothing.\n */\nexport function useStableKey(value: unknown): string {\n return typeof value === 'object' && value !== null ? JSON.stringify(value) : String(value);\n}\n\nexport const FIXED_TABLE: Table<PresentationValue> = tableOf<PresentationValue>('fixed', () => 'fixed');\n\n/* \u2500\u2500 The registry \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport type OpenChangeReason = 'toggle' | 'dismiss';\n\nexport type PaneEntry = {\n name: PaneName;\n id: string;\n el: HTMLElement | null;\n /** What the pane shows now; `undefined` while an untouched pane cannot know (before the breakpoint is known). */\n value: PaneValue | undefined;\n /** How the pane is presented now, when known. */\n presentation: PresentationValue | undefined;\n /** The pane's own presentation at every breakpoint. A Panel with none of its own follows the Rail's. */\n presentationTable: Table<PresentationValue>;\n /** Open and presented as an overlay: what the scrim and Escape close, and what containment exempts. */\n overlayLive: boolean;\n /** The pane's designed open width, for panes that sit beside it when floating. */\n size: number;\n setValue: (value: PaneValue, reason: OpenChangeReason) => void;\n toggle: (reason: OpenChangeReason) => void;\n};\n\nexport type ShellStore = {\n entries: Map<PaneName, PaneEntry>;\n listeners: Set<() => void>;\n /**\n * What a subscriber reads. useSyncExternalStore needs a value that is stable\n * between notifications, and a number is; the Map, or anything derived from\n * it, would be a new identity on every read.\n */\n version: number;\n /** The pane a hovered Trigger is previewing, if any. Layout only. */\n peek: PaneName | null;\n};\n\nexport function createShellStore(): ShellStore {\n return { entries: new Map(), listeners: new Set(), version: 0, peek: null };\n}\n\nexport function notifyShellStore(store: ShellStore) {\n store.version += 1;\n for (const listener of store.listeners) listener();\n}\n\nexport function subscribeShellStore(store: ShellStore, listener: () => void) {\n store.listeners.add(listener);\n return () => {\n store.listeners.delete(listener);\n };\n}\n\nexport function setShellPeek(store: ShellStore, peek: PaneName | null) {\n if (store.peek === peek) return;\n store.peek = peek;\n notifyShellStore(store);\n}\n\nexport const ShellStoreContext = React.createContext<ShellStore | null>(null);\n\nexport function useShellStore(part: string): ShellStore {\n const store = React.useContext(ShellStoreContext);\n if (!store) throw new Error(`${part} must be used within <Shell.Root>`);\n return store;\n}\n\n/** One pane's registry entry. Re-renders only when that entry is replaced. */\nexport function usePaneEntry(store: ShellStore, name: PaneName): PaneEntry | undefined {\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n const getSnapshot = React.useCallback(() => store.entries.get(name), [store, name]);\n return React.useSyncExternalStore(subscribe, getSnapshot, () => undefined);\n}\n\n/**\n * Whether this pane is the one being previewed. A boolean per pane rather than\n * the peek target itself, so hovering one Trigger re-renders one pane, not all.\n */\nexport function usePeeking(store: ShellStore, name: PaneName): boolean {\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n return React.useSyncExternalStore(\n subscribe,\n () => store.peek === name,\n () => false,\n );\n}\n\n/* \u2500\u2500 Inset \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport type InsetPaneId = 'rail' | 'panel' | 'sidebar' | 'content' | 'inspector' | 'bottom';\n\nexport const ShellInsetContext = React.createContext<{\n registerInset: (id: InsetPaneId) => void;\n unregisterInset: (id: InsetPaneId) => void;\n} | null>(null);\n\n/** Registers a pane's `inset` with the Root, which paints the backdrop while any pane is inset. */\nexport function useInsetRegistration(id: InsetPaneId, inset: boolean | undefined) {\n const ctx = React.useContext(ShellInsetContext);\n if (!ctx) throw new Error('Shell panes must be used within <Shell.Root>');\n const { registerInset, unregisterInset } = ctx;\n React.useLayoutEffect(() => {\n if (!inset) return;\n registerInset(id);\n return () => unregisterInset(id);\n }, [id, inset, registerInset, unregisterInset]);\n}\n\n/* \u2500\u2500 Development warnings \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nconst warned = new Set<string>();\n\n/** A deprecation warning, once per message per page load. Development only. */\nexport function warnOnce(message: string) {\n if (process.env.NODE_ENV === 'production') return;\n if (warned.has(message)) return;\n warned.add(message);\n console.warn(`[kookie-ui] ${message}`);\n}\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,+BAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,oBCEvB,IAAAC,EAAuB,oBCqDhB,IAAMC,EAAe,CAC1B,GAAI,qBACJ,GAAI,qBACJ,GAAI,sBACJ,GAAI,sBACJ,GAAI,qBACN,EAKaC,EAA2C,CAAC,UAAW,KAAM,KAAM,KAAM,KAAM,IAAI,ED7DhG,IAAMC,EAAU,OAAO,QAAQC,CAAY,EASvCC,EAA8D,KAC5DC,EAAY,IAAI,IAClBC,EAAsC,KAE1C,SAASC,GAAqB,CAC5B,OAAAH,MAAoBF,EAAQ,IAAI,CAAC,CAACM,EAAMC,CAAK,IAAM,CAACD,EAAM,OAAO,WAAWC,CAAK,CAAC,CAAiC,GAC5GL,CACT,CAEA,SAASM,GAAgC,CAEvC,IAAIC,EAAsB,UAC1B,OAAW,CAACH,EAAMI,CAAG,IAAKL,EAAmB,EACvCK,EAAI,UAASD,EAAUH,GAE7B,OAAOG,CACT,CAEA,SAASE,GAAe,CACtB,IAAMC,EAAOJ,EAAkB,EAC3BI,IAASR,IACbA,EAAmBQ,EACnBT,EAAU,QAASU,GAAaA,EAAS,CAAC,EAC5C,CAEA,SAASC,EAAUD,EAAoB,CACrC,GAAI,OAAO,OAAW,IAAa,MAAO,IAAM,CAAC,EAEjD,GAAIV,EAAU,OAAS,EAAG,CACxBC,EAAmBI,EAAkB,EACrC,OAAW,CAAC,CAAEE,CAAG,IAAKL,EAAmB,EAEnC,OAAOK,EAAI,kBAAqB,WAAYA,EAAI,iBAAiB,SAAUC,CAAY,EACtFD,EAAI,cAAcC,CAAY,CAEvC,CAEA,OAAAR,EAAU,IAAIU,CAAQ,EAEf,IAAM,CAEX,GADAV,EAAU,OAAOU,CAAQ,EACrB,EAAAV,EAAU,KAAO,GAErB,QAAW,CAAC,CAAEO,CAAG,IAAKL,EAAmB,EACvC,GAAI,CACE,OAAOK,EAAI,qBAAwB,WAAYA,EAAI,oBAAoB,SAAUC,CAAY,EAC5FD,EAAI,iBAAiBC,CAAY,CACxC,MAAgB,CAKhB,CAEFP,EAAmB,KACrB,CACF,CAMA,SAASW,GAA0B,CACjC,OAAI,OAAO,OAAW,IAAoB,WAC1CX,MAAqBI,EAAkB,GAChCJ,EACT,CAEA,SAASY,GAAgC,CACvC,MAAO,SACT,CAWA,IAAMC,EAAmB,IAAM,GACzBC,EAAyB,IAAM,GAE/BC,EAAgB,IAAM,IAAM,CAAC,EAC7BC,EAAqB,IAAkB,UActC,SAASC,EAAcC,EAAU,GAAkD,CAGxF,IAAMC,EAAmB,uBACvBD,EAAUE,EAAYL,EACtBG,EAAUG,EAAcL,EACxBM,CACF,EACMC,EAAc,uBAClBL,EAAUE,EAAYL,EACtBF,EACAC,CACF,EAEA,OAAa,UAAQ,KAAO,CAAE,WAAAK,EAAY,MAAAI,CAAM,GAAI,CAACJ,EAAYI,CAAK,CAAC,CACzE,CE5GA,IAAAC,EAAuB,oBAavB,SAASC,EAASC,EAAoE,CACpF,OAAO,OAAOA,GAAU,UAAYA,IAAU,IAChD,CAOO,SAASC,EAAWD,EAA2BE,EAA2C,CAC/F,IAAMC,EAAQ,CAAC,EACXC,EAA+B,KACnC,QAAWC,KAAMC,EAAmB,CAClC,GAAIN,IAAU,QAAa,CAACD,EAAMC,CAAK,EAAG,CACxCG,EAAME,CAAE,EAAIL,EACZ,QACF,CACA,IAAMO,EAAQR,EAAMC,CAAK,EAAIA,EAAMK,CAAE,EAAI,OACrCE,IAAU,SAAWH,EAAU,CAAE,MAAOG,CAAM,GAClDJ,EAAME,CAAE,EAAID,EAAUA,EAAQ,MAAQF,EAASG,CAAE,CACnD,CACA,OAAOF,CACT,CA8BO,IAAMK,EAAwCC,EAA2B,QAAS,IAAM,OAAO,EA2D/F,IAAMC,EAA0B,gBAAiC,IAAI,EAgCrE,IAAMC,EAA0B,gBAG7B,IAAI,EHxKd,SAASC,EAA0BC,EAAyD,CACpF,YAAU,IAAM,CAEtB,EAAG,CAAC,CAAC,EACL,GAAM,CAAE,WAAAC,CAAW,EAAIC,EAAc,OAAOF,GAAiB,QAAQ,EACrE,OAAOG,EAA2BH,EAAc,IAAM,OAAO,EAAEC,CAAU,CAC3E",
|
|
6
|
+
"names": ["shell_hooks_exports", "__export", "useResponsivePresentation", "__toCommonJS", "React", "React", "_BREAKPOINTS", "SHELL_BREAKPOINTS", "QUERIES", "_BREAKPOINTS", "mediaQueryLists", "listeners", "cachedBreakpoint", "getMediaQueryLists", "name", "query", "computeBreakpoint", "matched", "mql", "handleChange", "next", "listener", "subscribe", "getSnapshot", "getServerSnapshot", "getReadySnapshot", "getReadyServerSnapshot", "noopSubscribe", "getInitialSnapshot", "useBreakpoint", "enabled", "breakpoint", "subscribe", "getSnapshot", "getServerSnapshot", "ready", "React", "isMap", "value", "tableOf", "fallback", "table", "carried", "bp", "SHELL_BREAKPOINTS", "entry", "FIXED_TABLE", "tableOf", "ShellStoreContext", "ShellInsetContext", "useResponsivePresentation", "presentation", "breakpoint", "useBreakpoint", "tableOf"]
|
|
7
7
|
}
|