@womp/kookie-ui 0.7.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/components.css +539 -494
- package/dist/cjs/components/_internal/base-menu.utils.js +1 -1
- package/dist/cjs/components/_internal/base-menu.utils.js.map +3 -3
- package/dist/cjs/components/_internal/menu-context.js +1 -1
- package/dist/cjs/components/_internal/menu-context.js.map +3 -3
- package/dist/cjs/components/_internal/shell-bottom.d.ts +6 -7
- package/dist/cjs/components/_internal/shell-bottom.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-bottom.js +1 -1
- package/dist/cjs/components/_internal/shell-bottom.js.map +4 -4
- package/dist/cjs/components/_internal/shell-handles.d.ts +9 -0
- package/dist/cjs/components/_internal/shell-handles.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-handles.js +1 -1
- package/dist/cjs/components/_internal/shell-handles.js.map +3 -3
- package/dist/cjs/components/_internal/shell-inspector.d.ts +4 -6
- package/dist/cjs/components/_internal/shell-inspector.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-inspector.js +1 -1
- package/dist/cjs/components/_internal/shell-inspector.js.map +4 -4
- package/dist/cjs/components/_internal/shell-pane.d.ts +70 -0
- package/dist/cjs/components/_internal/shell-pane.d.ts.map +1 -0
- package/dist/cjs/components/_internal/shell-pane.js +2 -0
- package/dist/cjs/components/_internal/shell-pane.js.map +7 -0
- package/dist/cjs/components/_internal/shell-resizable.d.ts +48 -0
- package/dist/cjs/components/_internal/shell-resizable.d.ts.map +1 -0
- package/dist/cjs/components/_internal/shell-resizable.js +2 -0
- package/dist/cjs/components/_internal/shell-resizable.js.map +7 -0
- package/dist/cjs/components/_internal/shell-resize.d.ts +11 -3
- package/dist/cjs/components/_internal/shell-resize.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-resize.js +1 -1
- package/dist/cjs/components/_internal/shell-resize.js.map +2 -2
- package/dist/cjs/components/_internal/shell-rest.d.ts +27 -0
- package/dist/cjs/components/_internal/shell-rest.d.ts.map +1 -0
- package/dist/cjs/components/_internal/shell-rest.js +2 -0
- package/dist/cjs/components/_internal/shell-rest.js.map +7 -0
- package/dist/cjs/components/_internal/shell-sidebar.d.ts +7 -12
- package/dist/cjs/components/_internal/shell-sidebar.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
- package/dist/cjs/components/_internal/shell-sidebar.js.map +4 -4
- package/dist/cjs/components/_internal/shell-store.d.ts +99 -0
- package/dist/cjs/components/_internal/shell-store.d.ts.map +1 -0
- package/dist/cjs/components/_internal/shell-store.js +2 -0
- package/dist/cjs/components/_internal/shell-store.js.map +7 -0
- package/dist/cjs/components/context-menu.js +1 -1
- package/dist/cjs/components/context-menu.js.map +3 -3
- package/dist/cjs/components/dropdown-menu.js +1 -1
- package/dist/cjs/components/dropdown-menu.js.map +3 -3
- package/dist/cjs/components/index.js +5 -5
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/components/schemas/index.js +1 -1
- package/dist/cjs/components/schemas/index.js.map +3 -3
- package/dist/cjs/components/schemas/shell.schema.d.ts +277 -229
- package/dist/cjs/components/schemas/shell.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/shell.schema.js +1 -1
- package/dist/cjs/components/schemas/shell.schema.js.map +3 -3
- package/dist/cjs/components/shell.context.d.ts +25 -114
- package/dist/cjs/components/shell.context.d.ts.map +1 -1
- package/dist/cjs/components/shell.context.js +1 -1
- package/dist/cjs/components/shell.context.js.map +4 -4
- package/dist/cjs/components/shell.d.ts +42 -21
- package/dist/cjs/components/shell.d.ts.map +1 -1
- package/dist/cjs/components/shell.hooks.d.ts +7 -23
- package/dist/cjs/components/shell.hooks.d.ts.map +1 -1
- package/dist/cjs/components/shell.hooks.js +1 -1
- package/dist/cjs/components/shell.hooks.js.map +4 -4
- package/dist/cjs/components/shell.js +1 -1
- package/dist/cjs/components/shell.js.map +4 -4
- package/dist/cjs/components/shell.types.d.ts +19 -2
- package/dist/cjs/components/shell.types.d.ts.map +1 -1
- package/dist/cjs/components/shell.types.js +1 -1
- package/dist/cjs/components/shell.types.js.map +3 -3
- package/dist/cjs/components/sidebar.d.ts.map +1 -1
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +3 -3
- package/dist/cjs/hooks/use-breakpoint.d.ts +5 -0
- package/dist/cjs/hooks/use-breakpoint.d.ts.map +1 -1
- package/dist/cjs/hooks/use-breakpoint.js +1 -1
- package/dist/cjs/hooks/use-breakpoint.js.map +3 -3
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/{chunk-HJU4I34X.js → chunk-25X75TI7.js} +2 -2
- package/dist/esm/{chunk-4XKK32M4.js → chunk-26I257HE.js} +2 -2
- package/dist/esm/chunk-2EQWBT2S.js +2 -0
- package/dist/esm/chunk-2EQWBT2S.js.map +7 -0
- package/dist/esm/{chunk-GLERJXVS.js → chunk-2Q7BJ7YG.js} +2 -2
- package/dist/esm/chunk-3J6AUDID.js +2 -0
- package/dist/esm/chunk-3J6AUDID.js.map +7 -0
- package/dist/esm/{chunk-7EWFBWBS.js → chunk-3PTSRBVY.js} +2 -2
- package/dist/esm/chunk-3XSB7YIM.js +2 -0
- package/dist/esm/{chunk-FMBECDL4.js.map → chunk-3XSB7YIM.js.map} +3 -3
- package/dist/esm/{chunk-O2U6RJTB.js → chunk-44JZYS7A.js} +2 -2
- package/dist/esm/{chunk-CTA5ODAO.js → chunk-4WU2WKUJ.js} +2 -2
- package/dist/esm/{chunk-KZWNGWIM.js → chunk-5M7STAH3.js} +2 -2
- package/dist/esm/{chunk-5WRCK4R7.js → chunk-5TAHT6VC.js} +2 -2
- package/dist/esm/{chunk-RNTCHVFI.js → chunk-6J6YX2VX.js} +2 -2
- package/dist/esm/{chunk-AGSSWWFI.js → chunk-7FKKGUHK.js} +2 -2
- package/dist/esm/{chunk-WHFJ4JUN.js → chunk-7NYODT3Z.js} +2 -2
- package/dist/esm/{chunk-NVDXXGVW.js → chunk-7PMMYHZV.js} +2 -2
- package/dist/esm/chunk-A2XVR7GL.js +2 -0
- package/dist/esm/chunk-A2XVR7GL.js.map +7 -0
- package/dist/esm/chunk-ADXZNG4F.js +2 -0
- package/dist/esm/chunk-ADXZNG4F.js.map +7 -0
- package/dist/esm/chunk-AGNIFHOE.js +2 -0
- package/dist/esm/chunk-AGNIFHOE.js.map +7 -0
- package/dist/esm/{chunk-KJUDZCYK.js → chunk-AIHQ3MVK.js} +2 -2
- package/dist/esm/{chunk-UBOOUDS4.js → chunk-AO32NT75.js} +2 -2
- package/dist/esm/chunk-BZZXXZ3O.js +2 -0
- package/dist/esm/chunk-BZZXXZ3O.js.map +7 -0
- package/dist/esm/{chunk-JDGJSNWT.js → chunk-C5RVO3C3.js} +2 -2
- package/dist/esm/{chunk-IHK3H2OM.js → chunk-CBNTPHYK.js} +2 -2
- package/dist/esm/{chunk-BBJUB52V.js → chunk-CRBOJ7N7.js} +2 -2
- package/dist/esm/{chunk-VHECAEUP.js → chunk-DCIQHXAR.js} +2 -2
- package/dist/esm/{chunk-43A5GUSI.js → chunk-EHBAK3LQ.js} +2 -2
- package/dist/esm/{chunk-K3UAS7RW.js → chunk-F3AXE27Q.js} +2 -2
- package/dist/esm/{chunk-KFR3CK24.js → chunk-FB3PD4Z3.js} +2 -2
- package/dist/esm/{chunk-MCPRXVKZ.js → chunk-FEAOFF77.js} +2 -2
- package/dist/esm/{chunk-VZSQATP6.js → chunk-G4YKBAZT.js} +2 -2
- package/dist/esm/{chunk-ECXGQQJB.js → chunk-GDAKJS64.js} +2 -2
- package/dist/esm/{chunk-VR7ZAFYN.js → chunk-GGSJXOKR.js} +2 -2
- package/dist/esm/chunk-GM7KMQDI.js +2 -0
- package/dist/esm/chunk-GMHA5CFH.js +2 -0
- package/dist/esm/chunk-GMHA5CFH.js.map +7 -0
- package/dist/esm/{chunk-CESYMTJQ.js → chunk-H4GR4262.js} +2 -2
- package/dist/esm/{chunk-WXQIIKWV.js → chunk-HBIF43PT.js} +2 -2
- package/dist/esm/chunk-HCNO7PX6.js +2 -0
- package/dist/esm/chunk-HCNO7PX6.js.map +7 -0
- package/dist/esm/{chunk-2264DHUW.js → chunk-HMSSFU6I.js} +2 -2
- package/dist/esm/chunk-HWQ3NTJP.js +2 -0
- package/dist/esm/chunk-HWQ3NTJP.js.map +7 -0
- package/dist/esm/{chunk-S5C5YRBS.js → chunk-IDUVJJYG.js} +2 -2
- package/dist/esm/{chunk-CIYF56YS.js → chunk-IK3MQHA5.js} +2 -2
- package/dist/esm/{chunk-CKMMUHKE.js → chunk-JDEBKA56.js} +2 -2
- package/dist/esm/{chunk-E67CIG6A.js → chunk-JDWCQ2XP.js} +2 -2
- package/dist/esm/{chunk-L3BWTV7I.js → chunk-JQSZF3E2.js} +2 -2
- package/dist/esm/{chunk-MEO7MJMQ.js → chunk-JQW4XYBS.js} +2 -2
- package/dist/esm/{chunk-KMPE7TJ6.js → chunk-JRFZ535T.js} +2 -2
- package/dist/esm/{chunk-CDG5WH4U.js → chunk-KEEPKI2X.js} +2 -2
- package/dist/esm/{chunk-GAV3NHYL.js → chunk-KV4SZP3F.js} +2 -2
- package/dist/esm/{chunk-FG7XM7KJ.js → chunk-LJCUPAOI.js} +2 -2
- package/dist/esm/{chunk-N4GTDLRD.js → chunk-MBCQA7UZ.js} +2 -2
- package/dist/esm/chunk-MM5IHQFM.js +2 -0
- package/dist/esm/{chunk-Y5RCH23Z.js → chunk-NQXRWBQM.js} +2 -2
- package/dist/esm/{chunk-CSKZZOI2.js → chunk-NTNMJX5M.js} +2 -2
- package/dist/esm/{chunk-V27ZAN3E.js → chunk-NV3P2CKH.js} +2 -2
- package/dist/esm/{chunk-4ME6O27S.js → chunk-O4CSXNST.js} +2 -2
- package/dist/esm/chunk-ODCVOXEV.js +2 -0
- package/dist/esm/{chunk-W2FOBR5Q.js → chunk-OEEF6KJG.js} +2 -2
- package/dist/esm/{chunk-ABSKRHVM.js → chunk-OJSOX3AX.js} +2 -2
- package/dist/esm/{chunk-JGLAE5G7.js → chunk-OQU2SKLN.js} +2 -2
- package/dist/esm/{chunk-PZ7OYATT.js → chunk-OTKQN2KY.js} +2 -2
- package/dist/esm/{chunk-QWVU2TW4.js → chunk-P27KV2LS.js} +2 -2
- package/dist/esm/{chunk-JUY7CBSL.js → chunk-PBFSBHBS.js} +2 -2
- package/dist/esm/{chunk-DSJY5RI3.js → chunk-PDUHBDFC.js} +2 -2
- package/dist/esm/{chunk-MTOLKA6S.js → chunk-POG3YABW.js} +2 -2
- package/dist/esm/chunk-PYHEBG5I.js +2 -0
- package/dist/esm/chunk-PYHEBG5I.js.map +7 -0
- package/dist/esm/{chunk-GO7OHBHW.js → chunk-PYXMGEO7.js} +2 -2
- package/dist/esm/{chunk-VNH7BJOA.js → chunk-QEGEUD4D.js} +2 -2
- package/dist/esm/chunk-QEL55MLF.js +2 -0
- package/dist/esm/{chunk-MS5J4MF6.js → chunk-QJVAS7AK.js} +2 -2
- package/dist/esm/chunk-ROSWI2CL.js +2 -0
- package/dist/esm/chunk-ROSWI2CL.js.map +7 -0
- package/dist/esm/{chunk-KCWESYMR.js → chunk-RY67WG3O.js} +2 -2
- package/dist/esm/{chunk-IFM4EMZB.js → chunk-TLGXIWAS.js} +2 -2
- package/dist/esm/{chunk-6FLLFCBU.js → chunk-UBSLEGQZ.js} +2 -2
- package/dist/esm/{chunk-VBI3AWPT.js → chunk-UNWPH3SO.js} +2 -2
- package/dist/esm/chunk-V5ZSDDVZ.js +2 -0
- package/dist/esm/chunk-V5ZSDDVZ.js.map +7 -0
- package/dist/esm/{chunk-X7V3V3W4.js → chunk-VTIL55SR.js} +2 -2
- package/dist/esm/chunk-VUNNS3ZU.js +2 -0
- package/dist/esm/chunk-VUNNS3ZU.js.map +7 -0
- package/dist/esm/{chunk-ALWNS44Q.js → chunk-W2LD2YE6.js} +2 -2
- package/dist/esm/{chunk-2I7QRVJ5.js → chunk-WGWUEU4K.js} +2 -2
- package/dist/esm/{chunk-EPTYNVCU.js → chunk-WIDJYVZF.js} +2 -2
- package/dist/esm/{chunk-OLAWVEAI.js → chunk-WJBOOAIO.js} +2 -2
- package/dist/esm/{chunk-7FC7HF76.js → chunk-WQCB7KSH.js} +2 -2
- package/dist/esm/{chunk-YBSRX63K.js → chunk-WZFVTC7P.js} +2 -2
- package/dist/esm/chunk-XDDKT4NF.js +2 -0
- package/dist/esm/{chunk-KFA53SVQ.js → chunk-YA5DF67M.js} +2 -2
- package/dist/esm/chunk-YA5DF67M.js.map +7 -0
- package/dist/esm/chunk-YAQBIO2B.js +2 -0
- package/dist/esm/chunk-YAQBIO2B.js.map +7 -0
- package/dist/esm/{chunk-OFUNVHZ5.js → chunk-YG66IRW4.js} +2 -2
- package/dist/esm/{chunk-WGYUWEQV.js → chunk-YVSM2LGS.js} +2 -2
- package/dist/esm/{chunk-4NTGF22C.js → chunk-Z7AZNMNX.js} +2 -2
- package/dist/esm/chunk-ZJ33QP5N.js +2 -0
- package/dist/esm/{chunk-OGXZHAQL.js → chunk-ZW26J2SA.js} +2 -2
- package/dist/esm/components/_internal/base-button.js +1 -1
- package/dist/esm/components/_internal/base-menu.utils.js +1 -1
- package/dist/esm/components/_internal/menu-context.js +1 -1
- package/dist/esm/components/_internal/shell-bottom.d.ts +6 -7
- package/dist/esm/components/_internal/shell-bottom.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-bottom.js +1 -1
- package/dist/esm/components/_internal/shell-handles.d.ts +9 -0
- package/dist/esm/components/_internal/shell-handles.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-handles.js +1 -1
- package/dist/esm/components/_internal/shell-inspector.d.ts +4 -6
- package/dist/esm/components/_internal/shell-inspector.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-inspector.js +1 -1
- package/dist/esm/components/_internal/shell-pane.d.ts +70 -0
- package/dist/esm/components/_internal/shell-pane.d.ts.map +1 -0
- package/dist/esm/components/_internal/shell-pane.js +2 -0
- package/dist/esm/components/_internal/shell-resizable.d.ts +48 -0
- package/dist/esm/components/_internal/shell-resizable.d.ts.map +1 -0
- package/dist/esm/components/_internal/shell-resizable.js +2 -0
- package/dist/esm/components/_internal/shell-resizable.js.map +7 -0
- package/dist/esm/components/_internal/shell-resize.d.ts +11 -3
- package/dist/esm/components/_internal/shell-resize.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-resize.js +1 -1
- package/dist/esm/components/_internal/shell-rest.d.ts +27 -0
- package/dist/esm/components/_internal/shell-rest.d.ts.map +1 -0
- package/dist/esm/components/_internal/shell-rest.js +2 -0
- package/dist/esm/components/_internal/shell-rest.js.map +7 -0
- package/dist/esm/components/_internal/shell-sidebar.d.ts +7 -12
- package/dist/esm/components/_internal/shell-sidebar.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-sidebar.js +1 -1
- package/dist/esm/components/_internal/shell-store.d.ts +99 -0
- package/dist/esm/components/_internal/shell-store.d.ts.map +1 -0
- package/dist/esm/components/_internal/shell-store.js +2 -0
- package/dist/esm/components/_internal/shell-store.js.map +7 -0
- package/dist/esm/components/accordion.js +1 -1
- package/dist/esm/components/alert-dialog.js +1 -1
- package/dist/esm/components/avatar.js +1 -1
- package/dist/esm/components/badge.js +1 -1
- package/dist/esm/components/blockquote.js +1 -1
- package/dist/esm/components/blockquote.props.js +1 -1
- package/dist/esm/components/box.js +1 -1
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/callout.js +1 -1
- package/dist/esm/components/card.js +1 -1
- package/dist/esm/components/chatbar.js +1 -1
- package/dist/esm/components/checkbox-cards.js +1 -1
- package/dist/esm/components/checkbox-group.js +1 -1
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/code.js +1 -1
- package/dist/esm/components/code.props.js +1 -1
- package/dist/esm/components/combobox.js +1 -1
- package/dist/esm/components/container.js +1 -1
- package/dist/esm/components/context-menu.js +1 -1
- package/dist/esm/components/data-list.js +1 -1
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dropdown-menu.js +1 -1
- package/dist/esm/components/em.js +1 -1
- package/dist/esm/components/em.props.js +1 -1
- package/dist/esm/components/flex.js +1 -1
- package/dist/esm/components/grid.js +1 -1
- package/dist/esm/components/heading.js +1 -1
- package/dist/esm/components/heading.props.js +1 -1
- package/dist/esm/components/hover-card.js +1 -1
- package/dist/esm/components/icon-button.js +1 -1
- package/dist/esm/components/image.js +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/inset.js +1 -1
- package/dist/esm/components/kbd.js +1 -1
- package/dist/esm/components/link.js +1 -1
- package/dist/esm/components/link.props.js +1 -1
- package/dist/esm/components/navbar.js +1 -1
- package/dist/esm/components/popover.js +1 -1
- package/dist/esm/components/progress.js +1 -1
- package/dist/esm/components/quote.js +1 -1
- package/dist/esm/components/quote.props.js +1 -1
- package/dist/esm/components/radio-cards.js +1 -1
- package/dist/esm/components/radio-group.js +1 -1
- package/dist/esm/components/radio.js +1 -1
- package/dist/esm/components/schemas/index.js +1 -1
- package/dist/esm/components/schemas/shell.schema.d.ts +277 -229
- package/dist/esm/components/schemas/shell.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/shell.schema.js +1 -1
- package/dist/esm/components/scroll-area.js +1 -1
- package/dist/esm/components/section.js +1 -1
- package/dist/esm/components/segmented-control.js +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/separator.js +1 -1
- package/dist/esm/components/sheet.js +1 -1
- package/dist/esm/components/shell.context.d.ts +25 -114
- package/dist/esm/components/shell.context.d.ts.map +1 -1
- package/dist/esm/components/shell.context.js +1 -1
- package/dist/esm/components/shell.d.ts +42 -21
- package/dist/esm/components/shell.d.ts.map +1 -1
- package/dist/esm/components/shell.hooks.d.ts +7 -23
- package/dist/esm/components/shell.hooks.d.ts.map +1 -1
- package/dist/esm/components/shell.hooks.js +1 -1
- package/dist/esm/components/shell.js +1 -1
- package/dist/esm/components/shell.types.d.ts +19 -2
- package/dist/esm/components/shell.types.d.ts.map +1 -1
- package/dist/esm/components/shell.types.js +1 -1
- package/dist/esm/components/sidebar.d.ts.map +1 -1
- package/dist/esm/components/sidebar.js +1 -1
- package/dist/esm/components/skeleton.js +1 -1
- package/dist/esm/components/slider.js +1 -1
- package/dist/esm/components/spinner.js +1 -1
- package/dist/esm/components/strong.js +1 -1
- package/dist/esm/components/strong.props.js +1 -1
- package/dist/esm/components/switch.js +1 -1
- package/dist/esm/components/tab-nav.js +1 -1
- package/dist/esm/components/table.js +1 -1
- package/dist/esm/components/tabs.js +1 -1
- package/dist/esm/components/text-area.js +1 -1
- package/dist/esm/components/text-field.js +1 -1
- package/dist/esm/components/text.js +1 -1
- package/dist/esm/components/text.props.js +1 -1
- package/dist/esm/components/theme-panel.js +1 -1
- package/dist/esm/components/toggle-button.js +1 -1
- package/dist/esm/components/toggle-icon-button.js +1 -1
- package/dist/esm/components/toolbar.js +1 -1
- package/dist/esm/components/tooltip.js +1 -1
- package/dist/esm/components/user-card.js +1 -1
- package/dist/esm/components/virtual-menu.js +1 -1
- package/dist/esm/helpers/extract-props.js +1 -1
- package/dist/esm/helpers/get-margin-styles.js +1 -1
- package/dist/esm/helpers/get-responsive-styles.js +1 -1
- package/dist/esm/helpers/index.js +1 -1
- package/dist/esm/hooks/index.js +1 -1
- package/dist/esm/hooks/use-breakpoint.d.ts +5 -0
- package/dist/esm/hooks/use-breakpoint.d.ts.map +1 -1
- package/dist/esm/hooks/use-breakpoint.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/props/index.js +1 -1
- package/package.json +7 -2
- package/schemas/index.json +1655 -0
- package/schemas/shell-bottom.d.ts +2 -0
- package/schemas/shell-bottom.json +180 -76
- package/schemas/shell-content.d.ts +2 -0
- package/schemas/shell-content.json +11 -5
- package/schemas/shell-handle.d.ts +2 -0
- package/schemas/shell-handle.json +7 -5
- package/schemas/shell-header.d.ts +2 -0
- package/schemas/shell-header.json +9 -10
- package/schemas/shell-inspector.d.ts +2 -0
- package/schemas/shell-inspector.json +183 -79
- package/schemas/shell-panel.d.ts +2 -0
- package/schemas/shell-panel.json +180 -76
- package/schemas/shell-rail.d.ts +2 -0
- package/schemas/shell-rail.json +137 -64
- package/schemas/shell-root.d.ts +2 -0
- package/schemas/shell-root.json +11 -9
- package/schemas/shell-sidebar.d.ts +2 -0
- package/schemas/shell-sidebar.json +274 -85
- package/schemas/shell-trigger.d.ts +2 -0
- package/schemas/shell-trigger.json +29 -17
- package/src/components/_internal/base-sidebar-menu.css +2 -1
- package/src/components/_internal/shell-bottom.tsx +92 -361
- package/src/components/_internal/shell-handles.tsx +193 -108
- package/src/components/_internal/shell-inspector.tsx +93 -360
- package/src/components/_internal/shell-pane.tsx +283 -0
- package/src/components/_internal/shell-resizable.tsx +263 -0
- package/src/components/_internal/shell-resize.tsx +11 -3
- package/src/components/_internal/shell-rest.ts +45 -0
- package/src/components/_internal/shell-sidebar.tsx +130 -441
- package/src/components/_internal/shell-store.tsx +204 -0
- package/src/components/schemas/shell.schema.ts +162 -153
- package/src/components/shell.context.tsx +112 -124
- package/src/components/shell.css +637 -496
- package/src/components/shell.hooks.ts +12 -170
- package/src/components/shell.tsx +566 -1497
- package/src/components/shell.types.ts +22 -2
- package/src/components/sidebar.tsx +17 -28
- package/src/hooks/use-breakpoint.ts +9 -0
- package/styles.css +539 -494
- package/dist/cjs/components/_internal/shell-prop-helpers.d.ts +0 -7
- package/dist/cjs/components/_internal/shell-prop-helpers.d.ts.map +0 -1
- package/dist/cjs/components/_internal/shell-prop-helpers.js +0 -2
- package/dist/cjs/components/_internal/shell-prop-helpers.js.map +0 -7
- package/dist/esm/chunk-2SZZ75RJ.js +0 -2
- package/dist/esm/chunk-2SZZ75RJ.js.map +0 -7
- package/dist/esm/chunk-4JQZUQY7.js +0 -2
- package/dist/esm/chunk-5LXFJMFB.js +0 -2
- package/dist/esm/chunk-5LXFJMFB.js.map +0 -7
- package/dist/esm/chunk-CECQNGUL.js +0 -2
- package/dist/esm/chunk-CECQNGUL.js.map +0 -7
- package/dist/esm/chunk-CEIK5U6C.js +0 -2
- package/dist/esm/chunk-CEIK5U6C.js.map +0 -7
- package/dist/esm/chunk-CJ27XP5Z.js +0 -2
- package/dist/esm/chunk-CJ27XP5Z.js.map +0 -7
- package/dist/esm/chunk-EE2IH2GL.js +0 -2
- package/dist/esm/chunk-EE2IH2GL.js.map +0 -7
- package/dist/esm/chunk-FMBECDL4.js +0 -2
- package/dist/esm/chunk-HSAG7C53.js +0 -2
- package/dist/esm/chunk-JJKQ7CGI.js +0 -2
- package/dist/esm/chunk-KFA53SVQ.js.map +0 -7
- package/dist/esm/chunk-KRDP5SQ7.js +0 -2
- package/dist/esm/chunk-KRDP5SQ7.js.map +0 -7
- package/dist/esm/chunk-M6DJRFJZ.js +0 -2
- package/dist/esm/chunk-M6DJRFJZ.js.map +0 -7
- package/dist/esm/chunk-MCQCG6AS.js +0 -2
- package/dist/esm/chunk-NIQT45PJ.js +0 -2
- package/dist/esm/chunk-NNO7M466.js +0 -2
- package/dist/esm/chunk-NNO7M466.js.map +0 -7
- package/dist/esm/chunk-SNHEJU2S.js +0 -2
- package/dist/esm/chunk-SNHEJU2S.js.map +0 -7
- package/dist/esm/chunk-TLWTUKKL.js +0 -2
- package/dist/esm/chunk-TLWTUKKL.js.map +0 -7
- package/dist/esm/chunk-XI5YXUCK.js +0 -2
- package/dist/esm/components/_internal/shell-prop-helpers.d.ts +0 -7
- package/dist/esm/components/_internal/shell-prop-helpers.d.ts.map +0 -1
- package/dist/esm/components/_internal/shell-prop-helpers.js +0 -2
- package/src/components/_internal/shell-prop-helpers.ts +0 -54
- /package/dist/esm/{chunk-HJU4I34X.js.map → chunk-25X75TI7.js.map} +0 -0
- /package/dist/esm/{chunk-4XKK32M4.js.map → chunk-26I257HE.js.map} +0 -0
- /package/dist/esm/{chunk-GLERJXVS.js.map → chunk-2Q7BJ7YG.js.map} +0 -0
- /package/dist/esm/{chunk-7EWFBWBS.js.map → chunk-3PTSRBVY.js.map} +0 -0
- /package/dist/esm/{chunk-O2U6RJTB.js.map → chunk-44JZYS7A.js.map} +0 -0
- /package/dist/esm/{chunk-CTA5ODAO.js.map → chunk-4WU2WKUJ.js.map} +0 -0
- /package/dist/esm/{chunk-KZWNGWIM.js.map → chunk-5M7STAH3.js.map} +0 -0
- /package/dist/esm/{chunk-5WRCK4R7.js.map → chunk-5TAHT6VC.js.map} +0 -0
- /package/dist/esm/{chunk-RNTCHVFI.js.map → chunk-6J6YX2VX.js.map} +0 -0
- /package/dist/esm/{chunk-AGSSWWFI.js.map → chunk-7FKKGUHK.js.map} +0 -0
- /package/dist/esm/{chunk-WHFJ4JUN.js.map → chunk-7NYODT3Z.js.map} +0 -0
- /package/dist/esm/{chunk-NVDXXGVW.js.map → chunk-7PMMYHZV.js.map} +0 -0
- /package/dist/esm/{chunk-KJUDZCYK.js.map → chunk-AIHQ3MVK.js.map} +0 -0
- /package/dist/esm/{chunk-UBOOUDS4.js.map → chunk-AO32NT75.js.map} +0 -0
- /package/dist/esm/{chunk-JDGJSNWT.js.map → chunk-C5RVO3C3.js.map} +0 -0
- /package/dist/esm/{chunk-IHK3H2OM.js.map → chunk-CBNTPHYK.js.map} +0 -0
- /package/dist/esm/{chunk-BBJUB52V.js.map → chunk-CRBOJ7N7.js.map} +0 -0
- /package/dist/esm/{chunk-VHECAEUP.js.map → chunk-DCIQHXAR.js.map} +0 -0
- /package/dist/esm/{chunk-43A5GUSI.js.map → chunk-EHBAK3LQ.js.map} +0 -0
- /package/dist/esm/{chunk-K3UAS7RW.js.map → chunk-F3AXE27Q.js.map} +0 -0
- /package/dist/esm/{chunk-KFR3CK24.js.map → chunk-FB3PD4Z3.js.map} +0 -0
- /package/dist/esm/{chunk-MCPRXVKZ.js.map → chunk-FEAOFF77.js.map} +0 -0
- /package/dist/esm/{chunk-VZSQATP6.js.map → chunk-G4YKBAZT.js.map} +0 -0
- /package/dist/esm/{chunk-ECXGQQJB.js.map → chunk-GDAKJS64.js.map} +0 -0
- /package/dist/esm/{chunk-VR7ZAFYN.js.map → chunk-GGSJXOKR.js.map} +0 -0
- /package/dist/esm/{chunk-4JQZUQY7.js.map → chunk-GM7KMQDI.js.map} +0 -0
- /package/dist/esm/{chunk-CESYMTJQ.js.map → chunk-H4GR4262.js.map} +0 -0
- /package/dist/esm/{chunk-WXQIIKWV.js.map → chunk-HBIF43PT.js.map} +0 -0
- /package/dist/esm/{chunk-2264DHUW.js.map → chunk-HMSSFU6I.js.map} +0 -0
- /package/dist/esm/{chunk-S5C5YRBS.js.map → chunk-IDUVJJYG.js.map} +0 -0
- /package/dist/esm/{chunk-CIYF56YS.js.map → chunk-IK3MQHA5.js.map} +0 -0
- /package/dist/esm/{chunk-CKMMUHKE.js.map → chunk-JDEBKA56.js.map} +0 -0
- /package/dist/esm/{chunk-E67CIG6A.js.map → chunk-JDWCQ2XP.js.map} +0 -0
- /package/dist/esm/{chunk-L3BWTV7I.js.map → chunk-JQSZF3E2.js.map} +0 -0
- /package/dist/esm/{chunk-MEO7MJMQ.js.map → chunk-JQW4XYBS.js.map} +0 -0
- /package/dist/esm/{chunk-KMPE7TJ6.js.map → chunk-JRFZ535T.js.map} +0 -0
- /package/dist/esm/{chunk-CDG5WH4U.js.map → chunk-KEEPKI2X.js.map} +0 -0
- /package/dist/esm/{chunk-GAV3NHYL.js.map → chunk-KV4SZP3F.js.map} +0 -0
- /package/dist/esm/{chunk-FG7XM7KJ.js.map → chunk-LJCUPAOI.js.map} +0 -0
- /package/dist/esm/{chunk-N4GTDLRD.js.map → chunk-MBCQA7UZ.js.map} +0 -0
- /package/dist/esm/{chunk-JJKQ7CGI.js.map → chunk-MM5IHQFM.js.map} +0 -0
- /package/dist/esm/{chunk-Y5RCH23Z.js.map → chunk-NQXRWBQM.js.map} +0 -0
- /package/dist/esm/{chunk-CSKZZOI2.js.map → chunk-NTNMJX5M.js.map} +0 -0
- /package/dist/esm/{chunk-V27ZAN3E.js.map → chunk-NV3P2CKH.js.map} +0 -0
- /package/dist/esm/{chunk-4ME6O27S.js.map → chunk-O4CSXNST.js.map} +0 -0
- /package/dist/esm/{chunk-HSAG7C53.js.map → chunk-ODCVOXEV.js.map} +0 -0
- /package/dist/esm/{chunk-W2FOBR5Q.js.map → chunk-OEEF6KJG.js.map} +0 -0
- /package/dist/esm/{chunk-ABSKRHVM.js.map → chunk-OJSOX3AX.js.map} +0 -0
- /package/dist/esm/{chunk-JGLAE5G7.js.map → chunk-OQU2SKLN.js.map} +0 -0
- /package/dist/esm/{chunk-PZ7OYATT.js.map → chunk-OTKQN2KY.js.map} +0 -0
- /package/dist/esm/{chunk-QWVU2TW4.js.map → chunk-P27KV2LS.js.map} +0 -0
- /package/dist/esm/{chunk-JUY7CBSL.js.map → chunk-PBFSBHBS.js.map} +0 -0
- /package/dist/esm/{chunk-DSJY5RI3.js.map → chunk-PDUHBDFC.js.map} +0 -0
- /package/dist/esm/{chunk-MTOLKA6S.js.map → chunk-POG3YABW.js.map} +0 -0
- /package/dist/esm/{chunk-GO7OHBHW.js.map → chunk-PYXMGEO7.js.map} +0 -0
- /package/dist/esm/{chunk-VNH7BJOA.js.map → chunk-QEGEUD4D.js.map} +0 -0
- /package/dist/esm/{chunk-MCQCG6AS.js.map → chunk-QEL55MLF.js.map} +0 -0
- /package/dist/esm/{chunk-MS5J4MF6.js.map → chunk-QJVAS7AK.js.map} +0 -0
- /package/dist/esm/{chunk-KCWESYMR.js.map → chunk-RY67WG3O.js.map} +0 -0
- /package/dist/esm/{chunk-IFM4EMZB.js.map → chunk-TLGXIWAS.js.map} +0 -0
- /package/dist/esm/{chunk-6FLLFCBU.js.map → chunk-UBSLEGQZ.js.map} +0 -0
- /package/dist/esm/{chunk-VBI3AWPT.js.map → chunk-UNWPH3SO.js.map} +0 -0
- /package/dist/esm/{chunk-X7V3V3W4.js.map → chunk-VTIL55SR.js.map} +0 -0
- /package/dist/esm/{chunk-ALWNS44Q.js.map → chunk-W2LD2YE6.js.map} +0 -0
- /package/dist/esm/{chunk-2I7QRVJ5.js.map → chunk-WGWUEU4K.js.map} +0 -0
- /package/dist/esm/{chunk-EPTYNVCU.js.map → chunk-WIDJYVZF.js.map} +0 -0
- /package/dist/esm/{chunk-OLAWVEAI.js.map → chunk-WJBOOAIO.js.map} +0 -0
- /package/dist/esm/{chunk-7FC7HF76.js.map → chunk-WQCB7KSH.js.map} +0 -0
- /package/dist/esm/{chunk-YBSRX63K.js.map → chunk-WZFVTC7P.js.map} +0 -0
- /package/dist/esm/{chunk-XI5YXUCK.js.map → chunk-XDDKT4NF.js.map} +0 -0
- /package/dist/esm/{chunk-OFUNVHZ5.js.map → chunk-YG66IRW4.js.map} +0 -0
- /package/dist/esm/{chunk-WGYUWEQV.js.map → chunk-YVSM2LGS.js.map} +0 -0
- /package/dist/esm/{chunk-4NTGF22C.js.map → chunk-Z7AZNMNX.js.map} +0 -0
- /package/dist/esm/{chunk-NIQT45PJ.js.map → chunk-ZJ33QP5N.js.map} +0 -0
- /package/dist/esm/{chunk-OGXZHAQL.js.map → chunk-ZW26J2SA.js.map} +0 -0
- /package/dist/esm/components/_internal/{shell-prop-helpers.js.map → shell-pane.js.map} +0 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The Shell's state model (0.8.0), ported from kookie-ui-v2's Shell.
|
|
5
|
+
*
|
|
6
|
+
* - State lives on the pane. Each pane holds `auto | open | closed` (the
|
|
7
|
+
* Sidebar adds `thin`). `auto` means untouched: the stylesheet decides what
|
|
8
|
+
* it shows at each breakpoint, so first paint is right with no script, the
|
|
9
|
+
* server and the client render the same markup, and no open-state callback
|
|
10
|
+
* can fire on mount or on a resize.
|
|
11
|
+
* - The one thing that crosses the Shell is a registry keyed by pane name.
|
|
12
|
+
* Each pane registers what it is and how to drive it; a Trigger looks its
|
|
13
|
+
* pane up, and the Root reads the set of live overlays. Nothing scans
|
|
14
|
+
* children and nothing checks `displayName`.
|
|
15
|
+
* - The responsive props are resolved into a table with one value per
|
|
16
|
+
* breakpoint, from the props alone, with no window. The table is written to
|
|
17
|
+
* the DOM as data attributes for the stylesheet, and read again in JS by the
|
|
18
|
+
* mirror that sets `aria-expanded`. One table, two readers, so they agree by
|
|
19
|
+
* construction.
|
|
20
|
+
*/
|
|
21
|
+
import * as React from 'react';
|
|
22
|
+
import { SHELL_BREAKPOINTS } from '../shell.types.js';
|
|
23
|
+
import type { Breakpoint, PaneName, PresentationValue } from '../shell.types.js';
|
|
24
|
+
|
|
25
|
+
/* ── Breakpoint tables ─────────────────────────────────────────────────────── */
|
|
26
|
+
|
|
27
|
+
export type Table<T> = Record<Breakpoint, T>;
|
|
28
|
+
|
|
29
|
+
/** What a pane shows: open, open at its thin width (Sidebar only), or closed. */
|
|
30
|
+
export type PaneValue = 'open' | 'thin' | 'closed';
|
|
31
|
+
|
|
32
|
+
type ResponsiveInput<T> = T | Partial<Record<Breakpoint, T>> | undefined;
|
|
33
|
+
|
|
34
|
+
function isMap<T>(value: ResponsiveInput<T>): value is Partial<Record<Breakpoint, T>> {
|
|
35
|
+
return typeof value === 'object' && value !== null;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* A responsive value at every breakpoint. A breakpoint takes the largest key
|
|
40
|
+
* at or below it, the same fallback `useResponsiveValue` used; a breakpoint
|
|
41
|
+
* below every key takes `fallback`.
|
|
42
|
+
*/
|
|
43
|
+
export function tableOf<T>(value: ResponsiveInput<T>, fallback: (bp: Breakpoint) => T): Table<T> {
|
|
44
|
+
const table = {} as Table<T>;
|
|
45
|
+
let carried: { value: T } | null = null;
|
|
46
|
+
for (const bp of SHELL_BREAKPOINTS) {
|
|
47
|
+
if (value !== undefined && !isMap(value)) {
|
|
48
|
+
table[bp] = value;
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
const entry = isMap(value) ? value[bp] : undefined;
|
|
52
|
+
if (entry !== undefined) carried = { value: entry };
|
|
53
|
+
table[bp] = carried ? carried.value : fallback(bp);
|
|
54
|
+
}
|
|
55
|
+
return table;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** The table's one value, when it has only one. */
|
|
59
|
+
export function constantOf<T>(table: Table<T>): T | undefined {
|
|
60
|
+
const first = table.initial;
|
|
61
|
+
return SHELL_BREAKPOINTS.every((bp) => table[bp] === first) ? first : undefined;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The table as data attributes: `data-<name>` when it holds one value, one
|
|
66
|
+
* `data-<name>-<bp>` per breakpoint when it holds several. The stylesheet has
|
|
67
|
+
* a rule for each spelling.
|
|
68
|
+
*/
|
|
69
|
+
export function tableAttributes(name: string, table: Table<string>): Record<string, string> {
|
|
70
|
+
const constant = constantOf(table);
|
|
71
|
+
if (constant !== undefined) return { [`data-${name}`]: constant };
|
|
72
|
+
const attributes: Record<string, string> = {};
|
|
73
|
+
for (const bp of SHELL_BREAKPOINTS) attributes[`data-${name}-${bp}`] = table[bp];
|
|
74
|
+
return attributes;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* A responsive prop object is usually an inline literal, a new identity every
|
|
79
|
+
* render. Keying memoisation on its contents keeps the tables, and so the
|
|
80
|
+
* registry entries, stable across renders that change nothing.
|
|
81
|
+
*/
|
|
82
|
+
export function useStableKey(value: unknown): string {
|
|
83
|
+
return typeof value === 'object' && value !== null ? JSON.stringify(value) : String(value);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export const FIXED_TABLE: Table<PresentationValue> = tableOf<PresentationValue>('fixed', () => 'fixed');
|
|
87
|
+
|
|
88
|
+
/* ── The registry ──────────────────────────────────────────────────────────── */
|
|
89
|
+
|
|
90
|
+
export type OpenChangeReason = 'toggle' | 'dismiss';
|
|
91
|
+
|
|
92
|
+
export type PaneEntry = {
|
|
93
|
+
name: PaneName;
|
|
94
|
+
id: string;
|
|
95
|
+
el: HTMLElement | null;
|
|
96
|
+
/** What the pane shows now; `undefined` while an untouched pane cannot know (before the breakpoint is known). */
|
|
97
|
+
value: PaneValue | undefined;
|
|
98
|
+
/** How the pane is presented now, when known. */
|
|
99
|
+
presentation: PresentationValue | undefined;
|
|
100
|
+
/** The pane's own presentation at every breakpoint. A Panel with none of its own follows the Rail's. */
|
|
101
|
+
presentationTable: Table<PresentationValue>;
|
|
102
|
+
/** Open and presented as an overlay: what the scrim and Escape close, and what containment exempts. */
|
|
103
|
+
overlayLive: boolean;
|
|
104
|
+
/** The pane's designed open width, for panes that sit beside it when floating. */
|
|
105
|
+
size: number;
|
|
106
|
+
setValue: (value: PaneValue, reason: OpenChangeReason) => void;
|
|
107
|
+
toggle: (reason: OpenChangeReason) => void;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export type ShellStore = {
|
|
111
|
+
entries: Map<PaneName, PaneEntry>;
|
|
112
|
+
listeners: Set<() => void>;
|
|
113
|
+
/**
|
|
114
|
+
* What a subscriber reads. useSyncExternalStore needs a value that is stable
|
|
115
|
+
* between notifications, and a number is; the Map, or anything derived from
|
|
116
|
+
* it, would be a new identity on every read.
|
|
117
|
+
*/
|
|
118
|
+
version: number;
|
|
119
|
+
/** The pane a hovered Trigger is previewing, if any. Layout only. */
|
|
120
|
+
peek: PaneName | null;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
export function createShellStore(): ShellStore {
|
|
124
|
+
return { entries: new Map(), listeners: new Set(), version: 0, peek: null };
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function notifyShellStore(store: ShellStore) {
|
|
128
|
+
store.version += 1;
|
|
129
|
+
for (const listener of store.listeners) listener();
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function subscribeShellStore(store: ShellStore, listener: () => void) {
|
|
133
|
+
store.listeners.add(listener);
|
|
134
|
+
return () => {
|
|
135
|
+
store.listeners.delete(listener);
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function setShellPeek(store: ShellStore, peek: PaneName | null) {
|
|
140
|
+
if (store.peek === peek) return;
|
|
141
|
+
store.peek = peek;
|
|
142
|
+
notifyShellStore(store);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export const ShellStoreContext = React.createContext<ShellStore | null>(null);
|
|
146
|
+
|
|
147
|
+
export function useShellStore(part: string): ShellStore {
|
|
148
|
+
const store = React.useContext(ShellStoreContext);
|
|
149
|
+
if (!store) throw new Error(`${part} must be used within <Shell.Root>`);
|
|
150
|
+
return store;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/** One pane's registry entry. Re-renders only when that entry is replaced. */
|
|
154
|
+
export function usePaneEntry(store: ShellStore, name: PaneName): PaneEntry | undefined {
|
|
155
|
+
const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);
|
|
156
|
+
const getSnapshot = React.useCallback(() => store.entries.get(name), [store, name]);
|
|
157
|
+
return React.useSyncExternalStore(subscribe, getSnapshot, () => undefined);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Whether this pane is the one being previewed. A boolean per pane rather than
|
|
162
|
+
* the peek target itself, so hovering one Trigger re-renders one pane, not all.
|
|
163
|
+
*/
|
|
164
|
+
export function usePeeking(store: ShellStore, name: PaneName): boolean {
|
|
165
|
+
const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);
|
|
166
|
+
return React.useSyncExternalStore(
|
|
167
|
+
subscribe,
|
|
168
|
+
() => store.peek === name,
|
|
169
|
+
() => false,
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* ── Inset ─────────────────────────────────────────────────────────────────── */
|
|
174
|
+
|
|
175
|
+
export type InsetPaneId = 'rail' | 'panel' | 'sidebar' | 'content' | 'inspector' | 'bottom';
|
|
176
|
+
|
|
177
|
+
export const ShellInsetContext = React.createContext<{
|
|
178
|
+
registerInset: (id: InsetPaneId) => void;
|
|
179
|
+
unregisterInset: (id: InsetPaneId) => void;
|
|
180
|
+
} | null>(null);
|
|
181
|
+
|
|
182
|
+
/** Registers a pane's `inset` with the Root, which paints the backdrop while any pane is inset. */
|
|
183
|
+
export function useInsetRegistration(id: InsetPaneId, inset: boolean | undefined) {
|
|
184
|
+
const ctx = React.useContext(ShellInsetContext);
|
|
185
|
+
if (!ctx) throw new Error('Shell panes must be used within <Shell.Root>');
|
|
186
|
+
const { registerInset, unregisterInset } = ctx;
|
|
187
|
+
React.useLayoutEffect(() => {
|
|
188
|
+
if (!inset) return;
|
|
189
|
+
registerInset(id);
|
|
190
|
+
return () => unregisterInset(id);
|
|
191
|
+
}, [id, inset, registerInset, unregisterInset]);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* ── Development warnings ──────────────────────────────────────────────────── */
|
|
195
|
+
|
|
196
|
+
const warned = new Set<string>();
|
|
197
|
+
|
|
198
|
+
/** A deprecation warning, once per message per page load. Development only. */
|
|
199
|
+
export function warnOnce(message: string) {
|
|
200
|
+
if (process.env.NODE_ENV === 'production') return;
|
|
201
|
+
if (warned.has(message)) return;
|
|
202
|
+
warned.add(message);
|
|
203
|
+
console.warn(`[kookie-ui] ${message}`);
|
|
204
|
+
}
|
|
@@ -1,112 +1,118 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Shell Zod schema
|
|
4
|
+
* Shell Zod schema: the Shell's props, for tools that read a schema
|
|
5
|
+
* (editors, assistants, documentation).
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* Shell is the frame of an application. Each pane holds its own open state;
|
|
8
|
+
* a pane nobody has touched follows the window, and the stylesheet resolves
|
|
9
|
+
* it at each breakpoint. Callbacks report user actions only.
|
|
9
10
|
*
|
|
10
11
|
* @example
|
|
11
12
|
* ```tsx
|
|
12
|
-
* // Basic shell validation
|
|
13
13
|
* const props = ShellRootSchema.parse({ height: 'full' });
|
|
14
14
|
*
|
|
15
|
-
* // Shell with responsive sidebar
|
|
16
15
|
* const sidebarProps = ShellSidebarSchema.parse({
|
|
17
|
-
*
|
|
18
|
-
* presentation: { initial: 'overlay',
|
|
16
|
+
* defaultState: { initial: 'collapsed', md: 'expanded' },
|
|
17
|
+
* presentation: { initial: 'overlay', sm: 'fixed' },
|
|
19
18
|
* });
|
|
20
19
|
* ```
|
|
21
20
|
*/
|
|
22
21
|
|
|
23
22
|
// Common types
|
|
24
23
|
const PaneModeSchema = z.enum(['expanded', 'collapsed']).describe('Pane state mode');
|
|
25
|
-
const SidebarModeSchema = z.enum(['collapsed', 'thin', 'expanded']).describe('Sidebar state
|
|
24
|
+
const SidebarModeSchema = z.enum(['collapsed', 'thin', 'expanded']).describe('Sidebar state');
|
|
26
25
|
const PresentationValueSchema = z.enum(['fixed', 'overlay', 'stacked']).describe('Presentation mode');
|
|
27
26
|
const _BreakpointSchema = z.enum(['initial', 'xs', 'sm', 'md', 'lg', 'xl']).describe('Responsive breakpoint');
|
|
28
|
-
const PaneTargetSchema = z.enum(['left', 'rail', 'panel', 'sidebar', 'inspector', 'bottom']).describe('Pane target');
|
|
27
|
+
const PaneTargetSchema = z.enum(['left', 'rail', 'panel', 'sidebar', 'inspector', 'bottom']).describe('Pane target. `left` is deprecated: use `rail`.');
|
|
29
28
|
const TriggerActionSchema = z.enum(['toggle', 'expand', 'collapse']).describe('Trigger action');
|
|
29
|
+
const OpenChangeReasonSchema = z.enum(['toggle', 'dismiss']).describe('Why the state changed: `toggle` for a trigger or the resize handle, `dismiss` for Escape or the scrim');
|
|
30
|
+
const SizeChangeReasonSchema = z.enum(['init', 'resize', 'controlled']).describe('Why the size changed');
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
PaneModeSchema,
|
|
32
|
+
function responsive<T extends z.ZodTypeAny>(value: T) {
|
|
33
|
+
return z.union([
|
|
34
|
+
value,
|
|
35
35
|
z.object({
|
|
36
|
-
initial:
|
|
37
|
-
xs:
|
|
38
|
-
sm:
|
|
39
|
-
md:
|
|
40
|
-
lg:
|
|
41
|
-
xl:
|
|
36
|
+
initial: value.optional(),
|
|
37
|
+
xs: value.optional(),
|
|
38
|
+
sm: value.optional(),
|
|
39
|
+
md: value.optional(),
|
|
40
|
+
lg: value.optional(),
|
|
41
|
+
xl: value.optional(),
|
|
42
42
|
}),
|
|
43
|
-
])
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const ResponsiveSidebarModeSchema = z
|
|
47
|
-
.union([
|
|
48
|
-
SidebarModeSchema,
|
|
49
|
-
z.object({
|
|
50
|
-
initial: SidebarModeSchema.optional(),
|
|
51
|
-
xs: SidebarModeSchema.optional(),
|
|
52
|
-
sm: SidebarModeSchema.optional(),
|
|
53
|
-
md: SidebarModeSchema.optional(),
|
|
54
|
-
lg: SidebarModeSchema.optional(),
|
|
55
|
-
xl: SidebarModeSchema.optional(),
|
|
56
|
-
}),
|
|
57
|
-
])
|
|
58
|
-
.describe('Responsive sidebar mode configuration');
|
|
43
|
+
]);
|
|
44
|
+
}
|
|
59
45
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
xs: PresentationValueSchema.optional(),
|
|
66
|
-
sm: PresentationValueSchema.optional(),
|
|
67
|
-
md: PresentationValueSchema.optional(),
|
|
68
|
-
lg: PresentationValueSchema.optional(),
|
|
69
|
-
xl: PresentationValueSchema.optional(),
|
|
70
|
-
}),
|
|
71
|
-
])
|
|
72
|
-
.describe('Responsive presentation configuration');
|
|
46
|
+
// Responsive schemas
|
|
47
|
+
const _ResponsiveModeSchema = responsive(PaneModeSchema).describe('Responsive pane mode configuration');
|
|
48
|
+
const ResponsiveSidebarModeSchema = responsive(SidebarModeSchema).describe('Responsive sidebar state');
|
|
49
|
+
const ResponsivePresentationSchema = responsive(PresentationValueSchema).describe('Responsive presentation configuration');
|
|
50
|
+
const ResponsiveOpenSchema = responsive(z.boolean()).describe('Responsive open state');
|
|
73
51
|
|
|
74
|
-
// Size persistence adapter
|
|
52
|
+
// Size persistence adapter (deprecated)
|
|
75
53
|
const PaneSizePersistenceSchema = z
|
|
76
54
|
.object({
|
|
77
55
|
load: z.function({ output: z.union([z.number(), z.promise(z.number()), z.undefined()]) }).optional(),
|
|
78
56
|
save: z.function({ input: [z.number()], output: z.union([z.void(), z.promise(z.void())]) }).optional(),
|
|
79
57
|
})
|
|
80
|
-
.describe('
|
|
58
|
+
.describe('Deprecated, removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`.');
|
|
81
59
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
.
|
|
60
|
+
const StyleSchema = z
|
|
61
|
+
.record(z.string(), z.union([z.string(), z.number()]))
|
|
62
|
+
.optional()
|
|
63
|
+
.describe('Inline styles');
|
|
64
|
+
|
|
65
|
+
const OpenPropsSchema = {
|
|
66
|
+
open: z.union([z.boolean(), ResponsiveOpenSchema]).optional().describe('The open state, when controlled. A responsive object is deprecated.'),
|
|
67
|
+
defaultOpen: z
|
|
68
|
+
.union([z.boolean(), ResponsiveOpenSchema])
|
|
69
|
+
.optional()
|
|
70
|
+
.describe('The starting state. A responsive object leaves the pane untouched, with that object as the answer at each breakpoint.'),
|
|
71
|
+
onOpenChange: z
|
|
72
|
+
.function({ input: [z.boolean(), z.object({ reason: OpenChangeReasonSchema })], output: z.void() })
|
|
73
|
+
.optional()
|
|
74
|
+
.describe('Called when a user opens or closes the pane. Never called on mount or on a resize.'),
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
// Props shared by every pane
|
|
78
|
+
const PaneBaseShape = {
|
|
79
|
+
id: z.string().optional().describe('The pane id. A Trigger points `aria-controls` at it.'),
|
|
80
|
+
presentation: ResponsivePresentationSchema.optional(),
|
|
81
|
+
expandedSize: z.number().optional(),
|
|
82
|
+
inset: z.boolean().optional().describe('Lifts the pane off the frame and paints the backdrop behind it'),
|
|
83
|
+
onExpand: z.function({ output: z.void() }).optional().describe('Deprecated: use `onOpenChange`'),
|
|
84
|
+
onCollapse: z.function({ output: z.void() }).optional().describe('Deprecated: use `onOpenChange`'),
|
|
85
|
+
className: z.string().optional().describe('Additional CSS class name'),
|
|
86
|
+
style: StyleSchema,
|
|
87
|
+
children: z.any().optional(),
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
// Props of a pane that resizes
|
|
91
|
+
const ResizeShape = {
|
|
92
|
+
minSize: z.number().optional(),
|
|
93
|
+
maxSize: z.number().optional().describe('The largest size. A drag also stops before the handle leaves the frame.'),
|
|
94
|
+
resizable: z.boolean().optional(),
|
|
95
|
+
collapsible: z.boolean().optional().describe('A double-click on the handle closes the pane'),
|
|
96
|
+
size: z.union([z.number(), z.string()]).optional().describe('The size, when controlled'),
|
|
97
|
+
defaultSize: z.union([z.number(), z.string()]).optional().describe('The starting size'),
|
|
98
|
+
onSizeChange: z.function({ input: [z.number(), z.object({ reason: SizeChangeReasonSchema })], output: z.void() }).optional(),
|
|
99
|
+
sizeUpdate: z
|
|
100
|
+
.enum(['throttle', 'debounce'])
|
|
101
|
+
.optional()
|
|
102
|
+
.describe('Rate-limits onSizeChange across repeated resize ends, such as key presses on the handle. A drag calls it once, when the drag ends; use onResize for live sizes.'),
|
|
103
|
+
sizeUpdateMs: z.number().optional(),
|
|
104
|
+
onResize: z
|
|
105
|
+
.function({ input: [z.number()], output: z.void() })
|
|
106
|
+
.optional()
|
|
107
|
+
.describe('Called during a drag, at most once per animation frame'),
|
|
108
|
+
onResizeStart: z.function({ input: [z.number()], output: z.void() }).optional(),
|
|
109
|
+
onResizeEnd: z.function({ input: [z.number()], output: z.void() }).optional(),
|
|
110
|
+
snapPoints: z.array(z.number()).optional().describe('Deprecated, removed in 1.0'),
|
|
111
|
+
snapTolerance: z.number().optional().describe('Deprecated, removed in 1.0'),
|
|
112
|
+
collapseThreshold: z.number().optional().describe('Deprecated, removed in 1.0'),
|
|
113
|
+
paneId: z.string().optional().describe('Deprecated, removed in 1.0'),
|
|
114
|
+
persistence: PaneSizePersistenceSchema.optional(),
|
|
115
|
+
};
|
|
110
116
|
|
|
111
117
|
/**
|
|
112
118
|
* Shell.Root component schema
|
|
@@ -116,13 +122,10 @@ export const ShellRootSchema = z
|
|
|
116
122
|
height: z
|
|
117
123
|
.union([z.literal('full'), z.literal('auto'), z.string(), z.number()])
|
|
118
124
|
.default('full')
|
|
119
|
-
.describe('Height of the
|
|
125
|
+
.describe('Height of the frame. `full` is 100dvh, with 100vh where dvh is not supported.'),
|
|
120
126
|
className: z.string().optional().describe('Additional CSS class name'),
|
|
121
|
-
style:
|
|
122
|
-
|
|
123
|
-
.optional()
|
|
124
|
-
.describe('Inline styles'),
|
|
125
|
-
children: z.any().optional().describe('Shell components'),
|
|
127
|
+
style: StyleSchema,
|
|
128
|
+
children: z.any().optional().describe('The Shell parts, and anything else, rendered in order'),
|
|
126
129
|
})
|
|
127
130
|
.strict();
|
|
128
131
|
|
|
@@ -131,12 +134,9 @@ export const ShellRootSchema = z
|
|
|
131
134
|
*/
|
|
132
135
|
export const ShellHeaderSchema = z
|
|
133
136
|
.object({
|
|
134
|
-
height: z.
|
|
137
|
+
height: z.number().default(64).describe('Height of the header, in pixels'),
|
|
135
138
|
className: z.string().optional().describe('Additional CSS class name'),
|
|
136
|
-
style:
|
|
137
|
-
.record(z.string(), z.union([z.string(), z.number()]))
|
|
138
|
-
.optional()
|
|
139
|
-
.describe('Inline styles'),
|
|
139
|
+
style: StyleSchema,
|
|
140
140
|
children: z.any().optional().describe('Header content'),
|
|
141
141
|
})
|
|
142
142
|
.strict();
|
|
@@ -146,59 +146,63 @@ export const ShellHeaderSchema = z
|
|
|
146
146
|
*/
|
|
147
147
|
export const ShellRailSchema = z
|
|
148
148
|
.object({
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
expandedSize: z.number().default(64).describe('Default width in pixels'),
|
|
149
|
+
...PaneBaseShape,
|
|
150
|
+
...OpenPropsSchema,
|
|
151
|
+
presentation: ResponsivePresentationSchema.default('fixed').describe('Presentation mode'),
|
|
152
|
+
expandedSize: z.number().default(64).describe('Width in pixels'),
|
|
154
153
|
collapsible: z.boolean().optional(),
|
|
155
|
-
onExpand: z.function({ output: z.void() }).optional(),
|
|
156
|
-
onCollapse: z.function({ output: z.void() }).optional(),
|
|
157
|
-
className: z.string().optional().describe('Additional CSS class name'),
|
|
158
|
-
style: z
|
|
159
|
-
.record(z.string(), z.union([z.string(), z.number()]))
|
|
160
|
-
.optional()
|
|
161
|
-
.describe('Inline styles'),
|
|
162
|
-
children: z.any().optional().describe('Rail content'),
|
|
163
154
|
})
|
|
164
155
|
.strict();
|
|
165
156
|
|
|
166
157
|
/**
|
|
167
158
|
* Shell.Panel component schema
|
|
168
159
|
*/
|
|
169
|
-
export const ShellPanelSchema =
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
160
|
+
export const ShellPanelSchema = z
|
|
161
|
+
.object({
|
|
162
|
+
...PaneBaseShape,
|
|
163
|
+
...OpenPropsSchema,
|
|
164
|
+
...ResizeShape,
|
|
165
|
+
presentation: ResponsivePresentationSchema.optional().describe("Presentation mode. With no value the panel follows the Rail's."),
|
|
166
|
+
expandedSize: z.number().default(288).describe('Open width in pixels'),
|
|
167
|
+
minSize: z.number().default(100).describe('Minimum width when resizing'),
|
|
168
|
+
maxSize: z.number().default(800).describe('Maximum width when resizing'),
|
|
169
|
+
resizable: z.boolean().default(false).describe('Whether the panel can be resized'),
|
|
170
|
+
collapsible: z.boolean().default(true).describe('Whether a double-click on the handle closes the panel'),
|
|
171
|
+
})
|
|
172
|
+
.strict();
|
|
176
173
|
|
|
177
174
|
/**
|
|
178
175
|
* Shell.Sidebar component schema
|
|
179
176
|
*/
|
|
180
|
-
export const ShellSidebarSchema =
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}).
|
|
177
|
+
export const ShellSidebarSchema = z
|
|
178
|
+
.object({
|
|
179
|
+
...PaneBaseShape,
|
|
180
|
+
...ResizeShape,
|
|
181
|
+
state: z.union([SidebarModeSchema, ResponsiveSidebarModeSchema]).optional().describe('The state, when controlled. A responsive object is deprecated.'),
|
|
182
|
+
defaultState: ResponsiveSidebarModeSchema.optional().describe('The starting state. With no value the sidebar is open where it is in the frame and closed where it is an overlay.'),
|
|
183
|
+
onStateChange: z
|
|
184
|
+
.function({ input: [SidebarModeSchema, z.object({ reason: OpenChangeReasonSchema })], output: z.void() })
|
|
185
|
+
.optional()
|
|
186
|
+
.describe('Called when a user changes the state. Never called on mount or on a resize.'),
|
|
187
|
+
presentation: ResponsivePresentationSchema.default({ initial: 'overlay', sm: 'fixed' }).describe('Presentation mode'),
|
|
188
|
+
expandedSize: z.number().default(288).describe('Open width in pixels'),
|
|
189
|
+
minSize: z.number().default(200).describe('Minimum width when resizing'),
|
|
190
|
+
maxSize: z.number().default(400).describe('Maximum width when resizing'),
|
|
191
|
+
thinSize: z.number().default(64).describe('Width in the thin state'),
|
|
192
|
+
toggleModes: z.enum(['both', 'single']).default('both').describe('`both` goes collapsed, thin, expanded; `single` goes between collapsed and one open state'),
|
|
193
|
+
resizable: z.boolean().default(false).describe('Whether the sidebar can be resized'),
|
|
194
|
+
collapsible: z.boolean().default(true).describe('Whether a double-click on the handle closes the sidebar'),
|
|
195
|
+
})
|
|
196
|
+
.strict();
|
|
191
197
|
|
|
192
198
|
/**
|
|
193
199
|
* Shell.Content component schema
|
|
194
200
|
*/
|
|
195
201
|
export const ShellContentSchema = z
|
|
196
202
|
.object({
|
|
203
|
+
inset: z.boolean().optional().describe('Lifts the pane off the frame and paints the backdrop behind it'),
|
|
197
204
|
className: z.string().optional().describe('Additional CSS class name'),
|
|
198
|
-
style:
|
|
199
|
-
.record(z.string(), z.union([z.string(), z.number()]))
|
|
200
|
-
.optional()
|
|
201
|
-
.describe('Inline styles'),
|
|
205
|
+
style: StyleSchema,
|
|
202
206
|
children: z.any().optional().describe('Main content'),
|
|
203
207
|
})
|
|
204
208
|
.strict();
|
|
@@ -206,42 +210,50 @@ export const ShellContentSchema = z
|
|
|
206
210
|
/**
|
|
207
211
|
* Shell.Inspector component schema
|
|
208
212
|
*/
|
|
209
|
-
export const ShellInspectorSchema =
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
213
|
+
export const ShellInspectorSchema = z
|
|
214
|
+
.object({
|
|
215
|
+
...PaneBaseShape,
|
|
216
|
+
...OpenPropsSchema,
|
|
217
|
+
...ResizeShape,
|
|
218
|
+
presentation: ResponsivePresentationSchema.default({ initial: 'overlay', sm: 'fixed' }).describe('Presentation mode'),
|
|
219
|
+
expandedSize: z.number().default(320).describe('Open width in pixels'),
|
|
220
|
+
minSize: z.number().default(200).describe('Minimum width when resizing'),
|
|
221
|
+
maxSize: z.number().default(500).describe('Maximum width when resizing'),
|
|
222
|
+
resizable: z.boolean().default(false).describe('Whether the inspector can be resized'),
|
|
223
|
+
collapsible: z.boolean().default(true).describe('Whether a double-click on the handle closes the inspector'),
|
|
224
|
+
})
|
|
225
|
+
.strict();
|
|
217
226
|
|
|
218
227
|
/**
|
|
219
228
|
* Shell.Bottom component schema
|
|
220
229
|
*/
|
|
221
|
-
export const ShellBottomSchema =
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
230
|
+
export const ShellBottomSchema = z
|
|
231
|
+
.object({
|
|
232
|
+
...PaneBaseShape,
|
|
233
|
+
...OpenPropsSchema,
|
|
234
|
+
...ResizeShape,
|
|
235
|
+
presentation: ResponsivePresentationSchema.default('fixed').describe('Presentation mode'),
|
|
236
|
+
expandedSize: z.number().default(200).describe('Open height in pixels'),
|
|
237
|
+
minSize: z.number().default(100).describe('Minimum height when resizing'),
|
|
238
|
+
maxSize: z.number().default(400).describe('Maximum height when resizing'),
|
|
239
|
+
resizable: z.boolean().default(false).describe('Whether the bottom panel can be resized'),
|
|
240
|
+
collapsible: z.boolean().default(true).describe('Whether a double-click on the handle closes the panel'),
|
|
241
|
+
})
|
|
242
|
+
.strict();
|
|
229
243
|
|
|
230
244
|
/**
|
|
231
245
|
* Shell.Trigger component schema
|
|
232
246
|
*/
|
|
233
247
|
export const ShellTriggerSchema = z
|
|
234
248
|
.object({
|
|
235
|
-
target: PaneTargetSchema.describe('Which pane to
|
|
249
|
+
target: PaneTargetSchema.describe('Which pane to drive'),
|
|
236
250
|
action: TriggerActionSchema.default('toggle').describe('Action to perform'),
|
|
237
|
-
peekOnHover: z.boolean().default(false).describe('
|
|
251
|
+
peekOnHover: z.boolean().default(false).describe('Deprecated, removed in 1.0. Shows a preview of a closed pane on hover.'),
|
|
252
|
+
type: z.enum(['button', 'submit', 'reset']).default('button').describe('The button type'),
|
|
238
253
|
className: z.string().optional().describe('Additional CSS class name'),
|
|
239
|
-
style:
|
|
240
|
-
.record(z.string(), z.union([z.string(), z.number()]))
|
|
241
|
-
.optional()
|
|
242
|
-
.describe('Inline styles'),
|
|
254
|
+
style: StyleSchema,
|
|
243
255
|
children: z.any().optional().describe('Trigger content'),
|
|
244
|
-
onClick: z.function().optional().describe('
|
|
256
|
+
onClick: z.function().optional().describe('Runs before the trigger acts. Call `event.preventDefault()` to cancel it.'),
|
|
245
257
|
onMouseEnter: z.function().optional().describe('Mouse enter handler'),
|
|
246
258
|
onMouseLeave: z.function().optional().describe('Mouse leave handler'),
|
|
247
259
|
'aria-label': z.string().optional().describe('ARIA label for accessibility'),
|
|
@@ -256,10 +268,7 @@ export const ShellTriggerSchema = z
|
|
|
256
268
|
export const ShellHandleSchema = z
|
|
257
269
|
.object({
|
|
258
270
|
className: z.string().optional().describe('Additional CSS class name'),
|
|
259
|
-
style:
|
|
260
|
-
.record(z.string(), z.union([z.string(), z.number()]))
|
|
261
|
-
.optional()
|
|
262
|
-
.describe('Inline styles'),
|
|
271
|
+
style: StyleSchema,
|
|
263
272
|
children: z.any().optional().describe('Handle content'),
|
|
264
273
|
})
|
|
265
274
|
.strict();
|
|
@@ -283,7 +292,7 @@ export type PresentationValue = z.infer<typeof PresentationValueSchema>;
|
|
|
283
292
|
export type Breakpoint = z.infer<typeof _BreakpointSchema>;
|
|
284
293
|
export type PaneTarget = z.infer<typeof PaneTargetSchema>;
|
|
285
294
|
export type TriggerAction = z.infer<typeof TriggerActionSchema>;
|
|
286
|
-
export type ResponsiveMode = z.infer<typeof
|
|
295
|
+
export type ResponsiveMode = z.infer<typeof _ResponsiveModeSchema>;
|
|
287
296
|
export type ResponsiveSidebarMode = z.infer<typeof ResponsiveSidebarModeSchema>;
|
|
288
297
|
export type ResponsivePresentation = z.infer<typeof ResponsivePresentationSchema>;
|
|
289
298
|
export type PaneSizePersistence = z.infer<typeof PaneSizePersistenceSchema>;
|