@kittlekit/sidebar-core
v0.1.1
Published
Core menu logic and types for Kittlekit sidebar
Readme
@kittlekit/sidebar-core
Core menu types, search helpers, active-path logic, and hotkey utilities for the Kittlekit sidebar package family.
What This Package Is
Use this package when you want:
- reusable menu tree types
- permission-aware menu filtering
- active route helpers
- sidebar constants and density helpers
- hotkey formatting and normalization
This package has no framework-specific runtime dependency on Next routing or app shell behavior.
Install
npm install @kittlekit/sidebar-coreMain Exports
Types
MenuItemMenuSectionSidebarBasePropsSecondarySidebarConfigNavStackItemAbility
Helpers
isDeepActivematchItemmatchDeepfilterItemsBySearchfilterMenuSectionsshouldUseSecondarygetMenuItemAria
Hotkeys
detectMacgetKeyboardGlyphformatHotkeynormaliseHotkeybuildCombo
Constants
ITEM_PADSEARCH_HPILL_WRADIUS- responsive sidebar constants
Typical Usage
Use sidebar-core with:
@kittlekit/next-sidebar- your own navigation shell
- internal menu manifest generation tools
Relationship to Other Packages
sidebar-core -> next-sidebarPublish
npm run build --workspace @kittlekit/sidebar-core
npm publish --workspace @kittlekit/sidebar-core --access publicExamples
- smoke app:
sandbox/sidebar-smoke - app wrapper reference:
web/src/components/sidebar/Sidebar.tsx
Release Notes
0.1.0
- first public extraction of menu tree, filtering, constants, and hotkey helpers
