@lobehub/ui
Version:
Lobe UI is an open-source UI component library for building AIGC web apps
1 lines • 641 B
Source Map (JSON)
{"version":3,"file":"utils.mjs","names":[],"sources":["../../src/Toc/utils.ts"],"sourcesContent":["import { TocItemType } from '@/Toc/type';\n\nexport const mapItems = (items: TocItemType[]) =>\n items.map((item) => ({\n children: item.children?.map((child) => ({\n href: `#${child.id}`,\n key: child.id,\n title: child?.title,\n })),\n href: `#${item.id}`,\n key: item.id,\n title: item.title,\n }));\n"],"mappings":";AAEA,MAAa,YAAY,UACvB,MAAM,KAAK,UAAU;CACnB,UAAU,KAAK,UAAU,KAAK,WAAW;EACvC,MAAM,IAAI,MAAM;EAChB,KAAK,MAAM;EACX,OAAO,OAAO;EACf,EAAE;CACH,MAAM,IAAI,KAAK;CACf,KAAK,KAAK;CACV,OAAO,KAAK;CACb,EAAE"}