@gentleduck/docs 0.0.13 → 0.0.14
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/dist/alert-DXO4N8gL.js +2 -0
- package/dist/alert-DXO4N8gL.js.map +1 -0
- package/dist/arrow-CU5T6t_D-Cs2Ykttv.js +2 -0
- package/dist/arrow-CU5T6t_D-Cs2Ykttv.js.map +1 -0
- package/dist/badge-BaSJ_om8.js +2 -0
- package/dist/badge-BaSJ_om8.js.map +1 -0
- package/dist/button-BPQ9zanb.js +2 -0
- package/dist/button-BPQ9zanb.js.map +1 -0
- package/dist/callout-C_FrO3-r.d.ts +21 -0
- package/dist/callout-C_FrO3-r.d.ts.map +1 -0
- package/dist/callout-WZt8I4Tj.js +2 -0
- package/dist/callout-WZt8I4Tj.js.map +1 -0
- package/dist/{charts-CvYC8d1e.js → charts-B7Xy2hnG.js} +1 -1
- package/dist/{charts-CvYC8d1e.js.map → charts-B7Xy2hnG.js.map} +1 -1
- package/dist/{charts-Cyick3Tp.d.ts → charts-D4Uj_gtE.d.ts} +1 -1
- package/dist/charts-D4Uj_gtE.d.ts.map +1 -0
- package/dist/client.d.ts +53 -54
- package/dist/client.js +1 -1
- package/dist/{code-block-BNW0BxR6.d.ts → code-block-B-PLa30f.d.ts} +3 -3
- package/dist/code-block-B-PLa30f.d.ts.map +1 -0
- package/dist/{code-block-uesBcZgM.js → code-block-DzuzMGMr.js} +1 -1
- package/dist/{code-block-uesBcZgM.js.map → code-block-DzuzMGMr.js.map} +1 -1
- package/dist/{code-block-wrapper-B0GrI7hb.d.ts → code-block-wrapper-BM4jRJHq.d.ts} +3 -3
- package/dist/{code-block-wrapper-B0GrI7hb.d.ts.map → code-block-wrapper-BM4jRJHq.d.ts.map} +1 -1
- package/dist/{code-block-wrapper-XLG-BrIs.js → code-block-wrapper-BNMwGoo7.js} +1 -1
- package/dist/{code-block-wrapper-XLG-BrIs.js.map → code-block-wrapper-BNMwGoo7.js.map} +1 -1
- package/dist/code-preview--lq9QGa0.js +2 -0
- package/dist/code-preview--lq9QGa0.js.map +1 -0
- package/dist/{code-preview-D5Og4Jk3.d.ts → code-preview-DST_xvt7.d.ts} +3 -3
- package/dist/{code-preview-D5Og4Jk3.d.ts.map → code-preview-DST_xvt7.d.ts.map} +1 -1
- package/dist/{colors-BDTM1-gZ.d.ts → colors-Cx-Rmxum.d.ts} +1 -1
- package/dist/{colors-BDTM1-gZ.d.ts.map → colors-Cx-Rmxum.d.ts.map} +1 -1
- package/dist/{colors-BUDdXvJ2.js → colors-IvpyMpg7.js} +2 -2
- package/dist/{colors-BUDdXvJ2.js.map → colors-IvpyMpg7.js.map} +1 -1
- package/dist/command-menu-BY4dKRHx.js +2 -0
- package/dist/command-menu-BY4dKRHx.js.map +1 -0
- package/dist/command-menu-D4LwSLnr.d.ts +7 -0
- package/dist/command-menu-D4LwSLnr.d.ts.map +1 -0
- package/dist/{component-preview-D2UaIsBZ.d.ts → component-preview-K8cndl5t.d.ts} +4 -4
- package/dist/component-preview-K8cndl5t.d.ts.map +1 -0
- package/dist/component-preview-g-CoGwuu.js +2 -0
- package/dist/component-preview-g-CoGwuu.js.map +1 -0
- package/dist/component-source-BhZijwev.js +3 -0
- package/dist/component-source-BhZijwev.js.map +1 -0
- package/dist/component-source-Ch59vA1U.d.ts +16 -0
- package/dist/component-source-Ch59vA1U.d.ts.map +1 -0
- package/dist/components/copy-button.d.ts +4 -0
- package/dist/components/copy-button.js +1 -0
- package/dist/components/docs/docs-copy-page.d.ts +1 -1
- package/dist/components/docs/docs-copy-page.js +1 -1
- package/dist/components/docs/docs-pager.d.ts +3 -3
- package/dist/components/docs/docs-pager.js +1 -1
- package/dist/components/docs/docs-sidebar.d.ts +3 -3
- package/dist/components/docs/docs-sidebar.js +1 -1
- package/dist/components/docs/docs-toc.d.ts +3 -3
- package/dist/components/docs/docs-toc.js +1 -1
- package/dist/components/docs/index.d.ts +7 -7
- package/dist/components/docs/index.js +1 -1
- package/dist/components/icons.d.ts +1 -1
- package/dist/components/icons.js +1 -1
- package/dist/components/index.d.ts +45 -46
- package/dist/components/index.js +1 -1
- package/dist/components/layouts/command-menu.d.ts +2 -0
- package/dist/components/layouts/command-menu.js +1 -0
- package/dist/components/layouts/{site-header/header-shell.d.ts → header-shell.d.ts} +1 -1
- package/dist/components/layouts/header-shell.js +1 -0
- package/dist/components/layouts/index.d.ts +6 -7
- package/dist/components/layouts/index.js +1 -1
- package/dist/components/layouts/site-footer.d.ts +2 -0
- package/dist/components/layouts/site-footer.js +1 -0
- package/dist/components/layouts/site-header.d.ts +3 -0
- package/dist/components/layouts/site-header.js +1 -0
- package/dist/components/layouts/tailwind-indicator.d.ts +2 -0
- package/dist/components/layouts/tailwind-indicator.js +1 -0
- package/dist/components/main-nav.d.ts +1 -1
- package/dist/components/main-nav.js +1 -1
- package/dist/components/mdx/mdx-component-registry.types.d.ts +8 -0
- package/dist/components/mdx/mdx-component-registry.types.d.ts.map +1 -0
- package/dist/components/mdx/mdx-components/callout.d.ts +1 -1
- package/dist/components/mdx/mdx-components/callout.js +1 -1
- package/dist/components/mdx/mdx-components/code/code-block-wrapper.d.ts +1 -1
- package/dist/components/mdx/mdx-components/code/code-block-wrapper.js +1 -1
- package/dist/components/mdx/mdx-components/code/code-block.d.ts +1 -1
- package/dist/components/mdx/mdx-components/code/code-block.js +1 -1
- package/dist/components/mdx/mdx-components/code/code-preview.d.ts +1 -1
- package/dist/components/mdx/mdx-components/code/code-preview.js +1 -1
- package/dist/components/mdx/mdx-components/code/component-preview.d.ts +1 -1
- package/dist/components/mdx/mdx-components/code/component-preview.js +1 -1
- package/dist/components/mdx/mdx-components/code/component-source.d.ts +1 -1
- package/dist/components/mdx/mdx-components/code/component-source.js +1 -1
- package/dist/components/mdx/mdx-components/code/figcaption-block.d.ts +1 -1
- package/dist/components/mdx/mdx-components/code/figcaption-block.js +1 -1
- package/dist/components/mdx/mdx-components/code/index.d.ts +15 -12
- package/dist/components/mdx/mdx-components/code/index.js +1 -1
- package/dist/components/mdx/mdx-components/code/mermaid-block.d.ts +1 -1
- package/dist/components/mdx/mdx-components/code/mermaid-block.js +1 -1
- package/dist/components/mdx/mdx-components/code/pre-block/index.d.ts +7 -0
- package/dist/components/mdx/mdx-components/code/pre-block/index.js +1 -0
- package/dist/components/mdx/mdx-components/code/pre-block/pre-block.d.ts +6 -0
- package/dist/components/mdx/mdx-components/code/pre-block/pre-block.js +1 -0
- package/dist/components/mdx/mdx-components/code/pre-block/shell-command.d.ts +14 -0
- package/dist/components/mdx/mdx-components/code/pre-block/shell-command.d.ts.map +1 -0
- package/dist/components/mdx/mdx-components/code/pre-block/shell-command.js +1 -0
- package/dist/components/mdx/mdx-components/code/pre-block/types.d.ts +5 -0
- package/dist/components/mdx/mdx-components/code/span-block.d.ts +2 -2
- package/dist/components/mdx/mdx-components/code/span-block.d.ts.map +1 -1
- package/dist/components/mdx/mdx-components/components-list.d.ts +3 -3
- package/dist/components/mdx/mdx-components/components-list.js +1 -1
- package/dist/components/mdx/mdx-components/exalidraw.d.ts +2 -2
- package/dist/components/mdx/mdx-components/index.d.ts +24 -21
- package/dist/components/mdx/mdx-components/index.js +1 -1
- package/dist/components/mdx/mdx-components/table.d.ts +1 -1
- package/dist/components/mdx/mdx-components/table.js +1 -1
- package/dist/components/mdx/mdx-components/tabs.d.ts +1 -1
- package/dist/components/mdx/mdx-components/tabs.js +1 -1
- package/dist/components/mdx/mdx-components/typepography.d.ts +1 -1
- package/dist/components/mdx/mdx-components/typepography.js +1 -1
- package/dist/components/mdx/mdx-components/typography.d.ts +3 -0
- package/dist/components/mdx/mdx-components/typography.js +1 -0
- package/dist/components/mdx/mdx-components-base.d.ts +119 -0
- package/dist/components/mdx/mdx-components-base.d.ts.map +1 -0
- package/dist/components/mdx/mdx-components-base.js +1 -0
- package/dist/components/mdx/mdx-components-registry.d.ts +171 -0
- package/dist/components/mdx/mdx-components-registry.d.ts.map +1 -0
- package/dist/components/mdx/mdx-components-registry.js +1 -0
- package/dist/components/mdx/mdx-components-ui.d.ts +50 -0
- package/dist/components/mdx/mdx-components-ui.d.ts.map +1 -0
- package/dist/components/mdx/mdx-components-ui.js +1 -0
- package/dist/components/mdx/mdx-icons.js +1 -1
- package/dist/components/mdx/mdx-runtime.d.ts +11 -0
- package/dist/components/mdx/mdx-runtime.d.ts.map +1 -0
- package/dist/components/mdx/mdx-runtime.js +1 -0
- package/dist/components/mdx/mdx.d.ts +1 -1
- package/dist/components/mdx/mdx.js +1 -1
- package/dist/components/mobile-nav.d.ts +1 -1
- package/dist/components/mobile-nav.js +1 -1
- package/dist/components/mode-toggle.d.ts +1 -1
- package/dist/components/mode-toggle.js +1 -1
- package/dist/components/page-header.d.ts +1 -1
- package/dist/components/page-header.js +1 -1
- package/dist/components/providers.d.ts +1 -1
- package/dist/components/providers.js +1 -1
- package/dist/components/style-switcher.d.ts +2 -0
- package/dist/components/style-switcher.js +1 -0
- package/dist/components-list-COrPlZeD.d.ts +12 -0
- package/dist/{components-list-VYl4HAYt.d.ts.map → components-list-COrPlZeD.d.ts.map} +1 -1
- package/dist/{components-list-DiOUxZd_.js → components-list-Cg9ggVyv.js} +2 -2
- package/dist/{components-list-DiOUxZd_.js.map → components-list-Cg9ggVyv.js.map} +1 -1
- package/dist/context/context.d.ts +1 -1
- package/dist/context/context.js +1 -1
- package/dist/context/context.types.d.ts +1 -1
- package/dist/context/index.d.ts +3 -3
- package/dist/context/index.js +1 -1
- package/dist/{context-CibrcgaK.js → context-Bu-bPlyW.js} +1 -1
- package/dist/{context-CibrcgaK.js.map → context-Bu-bPlyW.js.map} +1 -1
- package/dist/{context-C656KJNk.d.ts → context-jLJ1ef7m.d.ts} +4 -4
- package/dist/{context-C656KJNk.d.ts.map → context-jLJ1ef7m.d.ts.map} +1 -1
- package/dist/{context.types-KUK2rNdz.d.ts → context.types-pTQ85uw2.d.ts} +6 -2
- package/dist/context.types-pTQ85uw2.d.ts.map +1 -0
- package/dist/copy-button-CCqEsELt.d.ts +20 -0
- package/dist/copy-button-CCqEsELt.d.ts.map +1 -0
- package/dist/copy-button-Ccbj3Omt.js +2 -0
- package/dist/copy-button-Ccbj3Omt.js.map +1 -0
- package/dist/create-collection-S3CvffX1-DA20ZU15.js +2 -0
- package/dist/create-collection-S3CvffX1-DA20ZU15.js.map +1 -0
- package/dist/dialog-68QLl2rI.js +4 -0
- package/dist/dialog-68QLl2rI.js.map +1 -0
- package/dist/direction-B-anGbxM-BdqxtlGV.js +2 -0
- package/dist/direction-B-anGbxM-BdqxtlGV.js.map +1 -0
- package/dist/{dist-DfVBUGvk.js → dist-BEBzXlAF.js} +1 -1
- package/dist/{dist-DfVBUGvk.js.map → dist-BEBzXlAF.js.map} +1 -1
- package/dist/docs-copy-page-CPk7TsfY.js +2 -0
- package/dist/docs-copy-page-CPk7TsfY.js.map +1 -0
- package/dist/{docs-copy-page-BEtbT7qX.d.ts → docs-copy-page-Dr_nxgGI.d.ts} +3 -3
- package/dist/docs-copy-page-Dr_nxgGI.d.ts.map +1 -0
- package/dist/{docs-pager-BFx4yEm-.d.ts → docs-pager-B8tRIKlg.d.ts} +6 -6
- package/dist/{docs-pager-BFx4yEm-.d.ts.map → docs-pager-B8tRIKlg.d.ts.map} +1 -1
- package/dist/docs-pager-mprD1O3r.js +2 -0
- package/dist/docs-pager-mprD1O3r.js.map +1 -0
- package/dist/docs-sidebar-DY2ybOuM.js +2 -0
- package/dist/docs-sidebar-DY2ybOuM.js.map +1 -0
- package/dist/docs-sidebar-DfybXB8i.d.ts +43 -0
- package/dist/docs-sidebar-DfybXB8i.d.ts.map +1 -0
- package/dist/docs-toc-D-y66YCw.d.ts +13 -0
- package/dist/docs-toc-D-y66YCw.d.ts.map +1 -0
- package/dist/docs-toc-hcordVHk.js +2 -0
- package/dist/docs-toc-hcordVHk.js.map +1 -0
- package/dist/drawer-kwSiurIF.js +8 -0
- package/dist/drawer-kwSiurIF.js.map +1 -0
- package/dist/{events-CFVHB4m8.d.ts → events-CQ5HMYtp.d.ts} +1 -1
- package/dist/{events-CFVHB4m8.d.ts.map → events-CQ5HMYtp.d.ts.map} +1 -1
- package/dist/{events-DHlTM_S_.js → events-Tn9hD65k.js} +1 -1
- package/dist/{events-DHlTM_S_.js.map → events-Tn9hD65k.js.map} +1 -1
- package/dist/{figcaption-block-DfyvzBoz.d.ts → figcaption-block-BywypQCe.d.ts} +3 -3
- package/dist/figcaption-block-BywypQCe.d.ts.map +1 -0
- package/dist/figcaption-block-RFNt1OSv.js +2 -0
- package/dist/figcaption-block-RFNt1OSv.js.map +1 -0
- package/dist/hast-properties-C103K0PZ.js +2 -0
- package/dist/hast-properties-C103K0PZ.js.map +1 -0
- package/dist/{header-shell-DG6EtZSb.d.ts → header-shell-DkmS4hnL.d.ts} +7 -7
- package/dist/header-shell-DkmS4hnL.d.ts.map +1 -0
- package/dist/{header-shell-BnhiboVH.js → header-shell-PLI5ZAwI.js} +2 -2
- package/dist/header-shell-PLI5ZAwI.js.map +1 -0
- package/dist/hooks/index.d.ts +7 -7
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-colors.d.ts +2 -2
- package/dist/hooks/use-colors.js +1 -1
- package/dist/hooks/use-config.d.ts +1 -1
- package/dist/hooks/use-config.js +1 -1
- package/dist/hooks/use-lift-mode.d.ts +1 -1
- package/dist/hooks/use-lift-mode.js +1 -1
- package/dist/hooks/use-meta-colors.d.ts +1 -1
- package/dist/hooks/use-meta-colors.js +1 -1
- package/dist/hooks/use-mounted.d.ts +1 -1
- package/dist/hooks/use-mounted.js +1 -1
- package/dist/hooks/use-themes-config.d.ts +1 -1
- package/dist/hooks/use-themes-config.js +1 -1
- package/dist/icons-DyZHG9BC.d.ts +33 -0
- package/dist/icons-DyZHG9BC.d.ts.map +1 -0
- package/dist/icons-dASZ3daW.js +2 -0
- package/dist/icons-dASZ3daW.js.map +1 -0
- package/dist/index-B94w2qPS.d.ts +17 -0
- package/dist/index-B94w2qPS.d.ts.map +1 -0
- package/dist/{index-C2_c9Mqo.d.ts → index-CdFFVx85.d.ts} +5 -13
- package/dist/index-CdFFVx85.d.ts.map +1 -0
- package/dist/index.d.ts +12 -11
- package/dist/index.js +1 -1
- package/dist/lib/charts.d.ts +1 -1
- package/dist/lib/charts.js +1 -1
- package/dist/lib/colors.d.ts +1 -1
- package/dist/lib/colors.js +1 -1
- package/dist/lib/events.d.ts +1 -1
- package/dist/lib/events.js +1 -1
- package/dist/lib/index.d.ts +6 -5
- package/dist/lib/index.js +1 -1
- package/dist/lib/registry-colors-data.js +1 -1
- package/dist/lib/registry-styles.d.ts +1 -1
- package/dist/lib/registry-styles.js +1 -1
- package/dist/lib/themes.d.ts +1 -1
- package/dist/lib/themes.js +1 -1
- package/dist/lib/utils.d.ts +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/list-navigation-LJg-1TD2-DsfZPowW.js +2 -0
- package/dist/list-navigation-LJg-1TD2-DsfZPowW.js.map +1 -0
- package/dist/main-nav-vyEIJEhN.d.ts +7 -0
- package/dist/main-nav-vyEIJEhN.d.ts.map +1 -0
- package/dist/mdx-Cjg68fQA.d.ts +12 -0
- package/dist/mdx-Cjg68fQA.d.ts.map +1 -0
- package/dist/mdx-D0Kp6lsv.js +2 -0
- package/dist/mdx-D0Kp6lsv.js.map +1 -0
- package/dist/mdx-components-base-CXqWNN8M.js +2 -0
- package/dist/mdx-components-base-CXqWNN8M.js.map +1 -0
- package/dist/mdx-components-registry-C12f6wSV.js +2 -0
- package/dist/mdx-components-registry-C12f6wSV.js.map +1 -0
- package/dist/mdx-components-ui-Cp73cCYd.js +2 -0
- package/dist/mdx-components-ui-Cp73cCYd.js.map +1 -0
- package/dist/{mdx-icons-BH4zLUw0.js → mdx-icons-Duo8BbOA.js} +1 -1
- package/dist/{mdx-icons-BH4zLUw0.js.map → mdx-icons-Duo8BbOA.js.map} +1 -1
- package/dist/mdx-runtime-BeG80qPS.js +2 -0
- package/dist/mdx-runtime-BeG80qPS.js.map +1 -0
- package/dist/mdx-runtime-DjYaVtmv.d.ts +23 -0
- package/dist/mdx-runtime-DjYaVtmv.d.ts.map +1 -0
- package/dist/{mermaid-block-DOJ68HFE.d.ts → mermaid-block--sl7UWp2.d.ts} +3 -3
- package/dist/{mermaid-block-DOJ68HFE.d.ts.map → mermaid-block--sl7UWp2.d.ts.map} +1 -1
- package/dist/mermaid-block-zasLfGio.js +12 -0
- package/dist/mermaid-block-zasLfGio.js.map +1 -0
- package/dist/metadata-plugin-BL84sQM5.d.ts +8 -0
- package/dist/metadata-plugin-BL84sQM5.d.ts.map +1 -0
- package/dist/metadata-plugin-DA7OesoA.js +2 -0
- package/dist/metadata-plugin-DA7OesoA.js.map +1 -0
- package/dist/metadata-utils-C_8CcvsG.js +2 -0
- package/dist/metadata-utils-C_8CcvsG.js.map +1 -0
- package/dist/mobile-nav-CRH545YU.d.ts +7 -0
- package/dist/mobile-nav-CRH545YU.d.ts.map +1 -0
- package/dist/mobile-nav-rBOCLILt.js +2 -0
- package/dist/mobile-nav-rBOCLILt.js.map +1 -0
- package/dist/mode-toggle-CNBqTwkg.d.ts +7 -0
- package/dist/mode-toggle-CNBqTwkg.d.ts.map +1 -0
- package/dist/mode-toggle-DhgB9p1I.js +2 -0
- package/dist/mode-toggle-DhgB9p1I.js.map +1 -0
- package/dist/mount-CoAqNcc6.js +2 -0
- package/dist/mount-CoAqNcc6.js.map +1 -0
- package/dist/{nav-B2NAfb21.d.ts → nav-B0m_RJfC.d.ts} +3 -1
- package/dist/nav-B0m_RJfC.d.ts.map +1 -0
- package/dist/{page-header-h4wXUkUH.d.ts → page-header-BNqr7gpZ.d.ts} +6 -6
- package/dist/{page-header-h4wXUkUH.d.ts.map → page-header-BNqr7gpZ.d.ts.map} +1 -1
- package/dist/{page-header-D8n3yXQF.js → page-header-TUu9iNwc.js} +1 -1
- package/dist/{page-header-D8n3yXQF.js.map → page-header-TUu9iNwc.js.map} +1 -1
- package/dist/portal-BNuCvTAR-DDrsnIMA.js +2 -0
- package/dist/portal-BNuCvTAR-DDrsnIMA.js.map +1 -0
- package/dist/pre-block-Bt_9UuCv.js +2 -0
- package/dist/pre-block-Bt_9UuCv.js.map +1 -0
- package/dist/pre-block-DvvPHwIA.d.ts +19 -0
- package/dist/pre-block-DvvPHwIA.d.ts.map +1 -0
- package/dist/{providers-Do13WJMr.d.ts → providers-BI7hm1su.d.ts} +3 -3
- package/dist/providers-BI7hm1su.d.ts.map +1 -0
- package/dist/providers-BlEJC-ZF.js +2 -0
- package/dist/providers-BlEJC-ZF.js.map +1 -0
- package/dist/{registry-colors-data-tROJGGvk.js → registry-colors-data-C5Xv_bOz.js} +1 -1
- package/dist/{registry-colors-data-tROJGGvk.js.map → registry-colors-data-C5Xv_bOz.js.map} +1 -1
- package/dist/{registry-styles-DACce7ra.d.ts → registry-styles-Boe9P1LO.d.ts} +1 -1
- package/dist/{registry-styles-DACce7ra.d.ts.map → registry-styles-Boe9P1LO.d.ts.map} +1 -1
- package/dist/{registry-styles-Bby12FIz.js → registry-styles-DwoJ9Qa9.js} +1 -1
- package/dist/{registry-styles-Bby12FIz.js.map → registry-styles-DwoJ9Qa9.js.map} +1 -1
- package/dist/{rehype-mermaid-gkaeJtqn.js → rehype-mermaid-Ctag2Ywx.js} +1 -1
- package/dist/{rehype-mermaid-gkaeJtqn.js.map → rehype-mermaid-Ctag2Ywx.js.map} +1 -1
- package/dist/{rehype-mermaid-kjf2DmAC.d.ts → rehype-mermaid-DPZ6UzOu.d.ts} +2 -2
- package/dist/rehype-mermaid-DPZ6UzOu.d.ts.map +1 -0
- package/dist/rehype-npm-command-0W5WqcQY.js +2 -0
- package/dist/rehype-npm-command-0W5WqcQY.js.map +1 -0
- package/dist/{rehype-npm-command-C7BP6nqi.d.ts → rehype-npm-command-khRZrj_X.d.ts} +2 -2
- package/dist/rehype-npm-command-khRZrj_X.d.ts.map +1 -0
- package/dist/{rehype-pre-block-source-zKoXg4aL.d.ts → rehype-pre-block-source-0UyWe2hh.d.ts} +2 -2
- package/dist/rehype-pre-block-source-0UyWe2hh.d.ts.map +1 -0
- package/dist/rehype-pre-block-source-paX7yPQ4.js +2 -0
- package/dist/rehype-pre-block-source-paX7yPQ4.js.map +1 -0
- package/dist/{rehype-title-TRUGszot.js → rehype-title-CB9V-h9I.js} +1 -1
- package/dist/{rehype-title-TRUGszot.js.map → rehype-title-CB9V-h9I.js.map} +1 -1
- package/dist/{rehype-title-umwuNb2D.d.ts → rehype-title-CTj31zR2.d.ts} +2 -2
- package/dist/rehype-title-CTj31zR2.d.ts.map +1 -0
- package/dist/scroll-area-DwfrxxQ_.js +2 -0
- package/dist/scroll-area-DwfrxxQ_.js.map +1 -0
- package/dist/separator-BL4VUMvX.js +2 -0
- package/dist/separator-BL4VUMvX.js.map +1 -0
- package/dist/shared-utils-DqLwMUcj-Cs7um3C7.js +2 -0
- package/dist/shared-utils-DqLwMUcj-Cs7um3C7.js.map +1 -0
- package/dist/shell-command-BQkaAnLc.js +2 -0
- package/dist/shell-command-BQkaAnLc.js.map +1 -0
- package/dist/site-footer-By5G_jLv.d.ts +8 -0
- package/dist/site-footer-By5G_jLv.d.ts.map +1 -0
- package/dist/site-footer-DoVwgNqf.js +2 -0
- package/dist/site-footer-DoVwgNqf.js.map +1 -0
- package/dist/site-header-BiFOBrXI.js +2 -0
- package/dist/site-header-BiFOBrXI.js.map +1 -0
- package/dist/site-header-lVtvm8N5.d.ts +8 -0
- package/dist/site-header-lVtvm8N5.d.ts.map +1 -0
- package/dist/slot-B-X2-pKU-DOhFF3E_.js +2 -0
- package/dist/slot-B-X2-pKU-DOhFF3E_.js.map +1 -0
- package/dist/style-switcher-B0i_slue.d.ts +15 -0
- package/dist/style-switcher-B0i_slue.d.ts.map +1 -0
- package/dist/style-switcher-BFkgsXlx.js +2 -0
- package/dist/style-switcher-BFkgsXlx.js.map +1 -0
- package/dist/styles/base.css +12 -12
- package/dist/styles/docs.css +14 -1
- package/dist/styles/mdx-base.css +27 -0
- package/dist/styles/mdx-code.css +142 -0
- package/dist/styles/mdx-extensions.css +3 -0
- package/dist/styles/mdx-typography.css +27 -0
- package/dist/styles/mdx.css +4 -197
- package/dist/table-5xep6A9Y.d.ts +22 -0
- package/dist/table-5xep6A9Y.d.ts.map +1 -0
- package/dist/table-E1lSNeuD.js +2 -0
- package/dist/table-E1lSNeuD.js.map +1 -0
- package/dist/tabs-BJcH-Dvh.d.ts +43 -0
- package/dist/tabs-BJcH-Dvh.d.ts.map +1 -0
- package/dist/{tabs-Cvy3-KIA.js → tabs-BonSZ_0a.js} +2 -2
- package/dist/tabs-BonSZ_0a.js.map +1 -0
- package/dist/tabs-CrZf6_5d.js +2 -0
- package/dist/tabs-CrZf6_5d.js.map +1 -0
- package/dist/tailwind-indicator-DoT2AWBN.d.ts +7 -0
- package/dist/tailwind-indicator-DoT2AWBN.d.ts.map +1 -0
- package/dist/{tailwind-indicator-Dt4Bfpta.js → tailwind-indicator-z53_j-ZR.js} +1 -1
- package/dist/tailwind-indicator-z53_j-ZR.js.map +1 -0
- package/dist/{themes-BzMklu0h.js → themes-DSmnGG_O.js} +2 -2
- package/dist/{themes-BzMklu0h.js.map → themes-DSmnGG_O.js.map} +1 -1
- package/dist/{themes-Ba683LGu.d.ts → themes-M1nDuQoV.d.ts} +1 -1
- package/dist/{themes-Ba683LGu.d.ts.map → themes-M1nDuQoV.d.ts.map} +1 -1
- package/dist/{typepography-CLdrb7_b.js → typepography-Bn-ZmO71.js} +1 -1
- package/dist/{typepography-CLdrb7_b.js.map → typepography-Bn-ZmO71.js.map} +1 -1
- package/dist/{typepography-BdIMY3Y2.d.ts → typepography-D0UONiAu.d.ts} +13 -13
- package/dist/{typepography-BdIMY3Y2.d.ts.map → typepography-D0UONiAu.d.ts.map} +1 -1
- package/dist/types/index.d.ts +5 -4
- package/dist/types/mdx-runtime.d.ts +2 -0
- package/dist/types/nav.d.ts +1 -1
- package/dist/types/unist.d.ts +2 -1
- package/dist/types-DsWNixhq.d.ts +14 -0
- package/dist/types-DsWNixhq.d.ts.map +1 -0
- package/dist/typography-BcEByhvR.js +0 -0
- package/dist/unist-Dtu3x3-k.js +0 -0
- package/dist/unist-q3NIH9ya.d.ts +29 -0
- package/dist/unist-q3NIH9ya.d.ts.map +1 -0
- package/dist/{use-colors-tvFBbu3S.d.ts → use-colors-BF9FOADD.d.ts} +3 -3
- package/dist/use-colors-BF9FOADD.d.ts.map +1 -0
- package/dist/{use-colors-BSOymnQG.js → use-colors-BiVXxR31.js} +2 -2
- package/dist/{use-colors-BSOymnQG.js.map → use-colors-BiVXxR31.js.map} +1 -1
- package/dist/{use-config-DViAkW1f.js → use-config-CkoOe8Fw.js} +1 -1
- package/dist/{use-config-DViAkW1f.js.map → use-config-CkoOe8Fw.js.map} +1 -1
- package/dist/{use-config-DlgXRPaN.d.ts → use-config-DKOEW76q.d.ts} +4 -4
- package/dist/{use-config-DlgXRPaN.d.ts.map → use-config-DKOEW76q.d.ts.map} +1 -1
- package/dist/{use-lift-mode-CqcC0vis.js → use-lift-mode-CRK6jO9I.js} +1 -1
- package/dist/{use-lift-mode-CqcC0vis.js.map → use-lift-mode-CRK6jO9I.js.map} +1 -1
- package/dist/{use-lift-mode-DEELjsRA.d.ts → use-lift-mode-DAQuqoIt.d.ts} +1 -1
- package/dist/use-lift-mode-DAQuqoIt.d.ts.map +1 -0
- package/dist/{use-meta-colors-CkNbJTgD.d.ts → use-meta-colors-Dlzg21A8.d.ts} +1 -1
- package/dist/use-meta-colors-Dlzg21A8.d.ts.map +1 -0
- package/dist/{use-meta-colors-B7HIXaHI.js → use-meta-colors-ye3z03RL.js} +2 -2
- package/dist/{use-meta-colors-B7HIXaHI.js.map → use-meta-colors-ye3z03RL.js.map} +1 -1
- package/dist/{use-mounted-gdBJPRp0.js → use-mounted-Bi7J0dBb.js} +1 -1
- package/dist/{use-mounted-gdBJPRp0.js.map → use-mounted-Bi7J0dBb.js.map} +1 -1
- package/dist/{use-mounted-BtOuPtMk.d.ts → use-mounted-CqC1Le-n.d.ts} +1 -1
- package/dist/use-mounted-CqC1Le-n.d.ts.map +1 -0
- package/dist/use-themes-config-I8d5A3YB.d.ts +14 -0
- package/dist/use-themes-config-I8d5A3YB.d.ts.map +1 -0
- package/dist/{use-themes-config-BRcxOF-M.js → use-themes-config-t4NBMHl1.js} +2 -2
- package/dist/{use-themes-config-BRcxOF-M.js.map → use-themes-config-t4NBMHl1.js.map} +1 -1
- package/dist/{utils-gls3XPIE.d.ts → utils-BGWVtLBe.d.ts} +1 -1
- package/dist/utils-BGWVtLBe.d.ts.map +1 -0
- package/dist/utils-CN0aIGfJ.js +2 -0
- package/dist/utils-CN0aIGfJ.js.map +1 -0
- package/dist/velite/browser.d.ts +2 -1
- package/dist/velite/browser.d.ts.map +1 -1
- package/dist/velite/browser.js +1 -1
- package/dist/velite/browser.js.map +1 -1
- package/dist/velite/config.d.ts.map +1 -1
- package/dist/velite/config.js +1 -1
- package/dist/velite/config.js.map +1 -1
- package/dist/velite/index.d.ts +8 -8
- package/dist/velite/index.js +1 -1
- package/dist/velite/plugins/hast-properties.d.ts +9 -0
- package/dist/velite/plugins/hast-properties.d.ts.map +1 -0
- package/dist/velite/plugins/hast-properties.js +1 -0
- package/dist/velite/plugins/index.d.ts +8 -8
- package/dist/velite/plugins/index.js +1 -1
- package/dist/velite/plugins/metadata-plugin.d.ts +4 -4
- package/dist/velite/plugins/metadata-plugin.js +1 -1
- package/dist/velite/plugins/metadata-utils.d.ts +9 -0
- package/dist/velite/plugins/metadata-utils.d.ts.map +1 -0
- package/dist/velite/plugins/metadata-utils.js +1 -0
- package/dist/velite/plugins/rehype-mermaid.d.ts +3 -3
- package/dist/velite/plugins/rehype-mermaid.js +1 -1
- package/dist/velite/plugins/rehype-npm-command.d.ts +3 -3
- package/dist/velite/plugins/rehype-npm-command.js +1 -1
- package/dist/velite/plugins/rehype-pre-block-source.d.ts +3 -3
- package/dist/velite/plugins/rehype-pre-block-source.js +1 -1
- package/dist/velite/plugins/rehype-title.d.ts +3 -3
- package/dist/velite/plugins/rehype-title.js +1 -1
- package/dist/visibility-hidden-CAHx9RLp-CN32k1Im.js +2 -0
- package/dist/visibility-hidden-CAHx9RLp-CN32k1Im.js.map +1 -0
- package/package.json +14 -16
- package/src/client.ts +0 -0
- package/src/components/copy-button.tsx +54 -0
- package/src/components/docs/docs-copy-page.tsx +161 -46
- package/src/components/docs/docs-pager.tsx +22 -12
- package/src/components/docs/docs-sidebar.tsx +194 -29
- package/src/components/docs/docs-toc.tsx +229 -54
- package/src/components/docs/index.ts +0 -0
- package/src/components/icons.tsx +13 -25
- package/src/components/index.ts +1 -1
- package/src/components/layouts/command-menu.tsx +491 -0
- package/src/components/layouts/{site-header/header-shell.tsx → header-shell.tsx} +2 -2
- package/src/components/layouts/{site-footer/index.tsx → site-footer.tsx} +10 -7
- package/src/components/layouts/site-header.tsx +178 -0
- package/src/components/main-nav.tsx +3 -2
- package/src/components/mdx/ARCHITECTURE.md +61 -0
- package/src/components/mdx/mdx-component-registry.types.ts +5 -0
- package/src/components/mdx/mdx-components/callout.tsx +10 -10
- package/src/components/mdx/mdx-components/code/code-preview.tsx +7 -4
- package/src/components/mdx/mdx-components/code/component-preview.tsx +59 -27
- package/src/components/mdx/mdx-components/code/component-source.tsx +49 -21
- package/src/components/mdx/mdx-components/code/figcaption-block.tsx +2 -8
- package/src/components/mdx/mdx-components/code/mermaid-block.tsx +5 -3
- package/src/components/mdx/mdx-components/code/pre-block/index.ts +1 -0
- package/src/components/mdx/mdx-components/code/pre-block/pre-block.tsx +52 -0
- package/src/components/mdx/mdx-components/code/{pre-block.tsx → pre-block/shell-command.tsx} +4 -58
- package/src/components/mdx/mdx-components/code/pre-block/types.ts +10 -0
- package/src/components/mdx/mdx-components/components-list.tsx +0 -0
- package/src/components/mdx/mdx-components/index.ts +1 -2
- package/src/components/mdx/mdx-components/table.tsx +36 -27
- package/src/components/mdx/mdx-components/tabs.tsx +5 -2
- package/src/components/mdx/mdx-components/typography.tsx +1 -0
- package/src/components/mdx/mdx-components-base.tsx +81 -0
- package/src/components/mdx/mdx-components-registry.ts +8 -0
- package/src/components/mdx/mdx-components-ui.tsx +21 -0
- package/src/components/mdx/mdx-icons.ts +0 -0
- package/src/components/mdx/mdx-runtime.ts +10 -0
- package/src/components/mdx/mdx.tsx +3 -103
- package/src/components/mobile-nav.tsx +57 -22
- package/src/components/mode-toggle.tsx +4 -4
- package/src/components/providers.tsx +0 -1
- package/src/components/{themes/style-switcher.tsx → style-switcher.tsx} +5 -2
- package/src/context/context.tsx +0 -0
- package/src/context/context.types.ts +4 -0
- package/src/context/index.ts +0 -0
- package/src/hooks/index.ts +0 -0
- package/src/lib/index.ts +0 -0
- package/src/lib/registry-styles.ts +0 -0
- package/src/lib/utils.ts +7 -1
- package/src/styles/base.css +12 -12
- package/src/styles/docs.css +14 -1
- package/src/styles/mdx-base.css +27 -0
- package/src/styles/mdx-code.css +142 -0
- package/src/styles/mdx-extensions.css +3 -0
- package/src/styles/mdx-typography.css +27 -0
- package/src/styles/mdx.css +4 -197
- package/src/types/index.ts +1 -0
- package/src/types/mdx-runtime.ts +21 -0
- package/src/types/nav.ts +2 -0
- package/src/types/unist.ts +5 -19
- package/src/velite/browser.ts +1 -0
- package/src/velite/config.ts +56 -38
- package/src/velite/index.ts +0 -0
- package/src/velite/plugins/hast-properties.ts +12 -0
- package/src/velite/plugins/index.ts +0 -0
- package/src/velite/plugins/metadata-plugin.ts +14 -11
- package/src/velite/plugins/metadata-utils.ts +14 -0
- package/src/velite/plugins/rehype-mermaid.ts +0 -0
- package/src/velite/plugins/rehype-npm-command.ts +24 -22
- package/src/velite/plugins/rehype-pre-block-source.ts +6 -4
- package/src/velite/plugins/rehype-title.ts +0 -0
- package/src/velite/utils.ts +0 -0
- package/dist/button-Ao0Egplu.js +0 -2
- package/dist/button-Ao0Egplu.js.map +0 -1
- package/dist/callout-C1MveMtC.d.ts +0 -20
- package/dist/callout-C1MveMtC.d.ts.map +0 -1
- package/dist/callout-ChU_uu_5.js +0 -2
- package/dist/callout-ChU_uu_5.js.map +0 -1
- package/dist/charts-Cyick3Tp.d.ts.map +0 -1
- package/dist/chunk-BPpoHddQ-DLGSIJHp.js +0 -2
- package/dist/chunk-BPpoHddQ-DLGSIJHp.js.map +0 -1
- package/dist/code-block-BNW0BxR6.d.ts.map +0 -1
- package/dist/code-preview-DTVYDNkK.js +0 -2
- package/dist/code-preview-DTVYDNkK.js.map +0 -1
- package/dist/command-2PGkRCUM.js +0 -2
- package/dist/command-2PGkRCUM.js.map +0 -1
- package/dist/command-menu-Db8sDulu.js +0 -2
- package/dist/command-menu-Db8sDulu.js.map +0 -1
- package/dist/command-menu-DtpwoKe8.d.ts +0 -7
- package/dist/command-menu-DtpwoKe8.d.ts.map +0 -1
- package/dist/component-preview-D2UaIsBZ.d.ts.map +0 -1
- package/dist/component-preview-InhzN4h1.js +0 -2
- package/dist/component-preview-InhzN4h1.js.map +0 -1
- package/dist/component-source-CLa1Z_vJ.d.ts +0 -17
- package/dist/component-source-CLa1Z_vJ.d.ts.map +0 -1
- package/dist/component-source-DtSz1ZSB.js +0 -5
- package/dist/component-source-DtSz1ZSB.js.map +0 -1
- package/dist/components/copy-button/copy-button.d.ts +0 -5
- package/dist/components/copy-button/copy-button.js +0 -1
- package/dist/components/copy-button/copy-button.types.d.ts +0 -4
- package/dist/components/copy-button/index.d.ts +0 -6
- package/dist/components/copy-button/index.js +0 -1
- package/dist/components/layouts/command-menu/command-menu.d.ts +0 -2
- package/dist/components/layouts/command-menu/command-menu.js +0 -1
- package/dist/components/layouts/command-menu/index.d.ts +0 -3
- package/dist/components/layouts/command-menu/index.js +0 -1
- package/dist/components/layouts/site-footer/index.d.ts +0 -2
- package/dist/components/layouts/site-footer/index.js +0 -1
- package/dist/components/layouts/site-header/header-shell.js +0 -1
- package/dist/components/layouts/site-header/index.d.ts +0 -3
- package/dist/components/layouts/site-header/index.js +0 -1
- package/dist/components/layouts/tailwind-indicator/index.d.ts +0 -2
- package/dist/components/layouts/tailwind-indicator/index.js +0 -1
- package/dist/components/mdx/mdx-components/code/pre-block.d.ts +0 -4
- package/dist/components/mdx/mdx-components/code/pre-block.js +0 -1
- package/dist/components/mdx/mdx-components/framework-docs.d.ts +0 -2
- package/dist/components/mdx/mdx-components/framework-docs.js +0 -1
- package/dist/components/themes/index.d.ts +0 -4
- package/dist/components/themes/index.js +0 -1
- package/dist/components/themes/style-switcher.d.ts +0 -3
- package/dist/components/themes/style-switcher.js +0 -1
- package/dist/components-list-VYl4HAYt.d.ts +0 -12
- package/dist/context.types-KUK2rNdz.d.ts.map +0 -1
- package/dist/copy-button-DSpL6XPh.d.ts +0 -21
- package/dist/copy-button-DSpL6XPh.d.ts.map +0 -1
- package/dist/copy-button-DZizVQ8G.js +0 -2
- package/dist/copy-button-DZizVQ8G.js.map +0 -1
- package/dist/copy-button.types-CGEbiMXO.d.ts +0 -29
- package/dist/copy-button.types-CGEbiMXO.d.ts.map +0 -1
- package/dist/dialog-BJXRFGlQ.js +0 -31
- package/dist/dialog-BJXRFGlQ.js.map +0 -1
- package/dist/docs-copy-page-BEtbT7qX.d.ts.map +0 -1
- package/dist/docs-copy-page-DZDkcR09.js +0 -3
- package/dist/docs-copy-page-DZDkcR09.js.map +0 -1
- package/dist/docs-pager-Dr6dooWP.js +0 -2
- package/dist/docs-pager-Dr6dooWP.js.map +0 -1
- package/dist/docs-sidebar-CWDyV0Rj.d.ts +0 -30
- package/dist/docs-sidebar-CWDyV0Rj.d.ts.map +0 -1
- package/dist/docs-sidebar-MtBCNnEG.js +0 -2
- package/dist/docs-sidebar-MtBCNnEG.js.map +0 -1
- package/dist/docs-toc-B7RS1k0Z.d.ts +0 -13
- package/dist/docs-toc-B7RS1k0Z.d.ts.map +0 -1
- package/dist/docs-toc-Czi8gMJf.js +0 -2
- package/dist/docs-toc-Czi8gMJf.js.map +0 -1
- package/dist/drawer-DVVyDJ2D.js +0 -8
- package/dist/drawer-DVVyDJ2D.js.map +0 -1
- package/dist/dropdown-menu-Cf4PnvE4.js +0 -2
- package/dist/dropdown-menu-Cf4PnvE4.js.map +0 -1
- package/dist/figcaption-block-7FWvsSXj.js +0 -2
- package/dist/figcaption-block-7FWvsSXj.js.map +0 -1
- package/dist/figcaption-block-DfyvzBoz.d.ts.map +0 -1
- package/dist/framework-docs-BQx_CG7u.js +0 -2
- package/dist/framework-docs-BQx_CG7u.js.map +0 -1
- package/dist/framework-docs-BuqO4yKf.d.ts +0 -13
- package/dist/framework-docs-BuqO4yKf.d.ts.map +0 -1
- package/dist/header-shell-BnhiboVH.js.map +0 -1
- package/dist/header-shell-DG6EtZSb.d.ts.map +0 -1
- package/dist/icons-Bp6-jojO.d.ts +0 -30
- package/dist/icons-Bp6-jojO.d.ts.map +0 -1
- package/dist/icons-CiCgiCYy.js +0 -2
- package/dist/icons-CiCgiCYy.js.map +0 -1
- package/dist/index-BgMLDj-T.d.ts +0 -8
- package/dist/index-BgMLDj-T.d.ts.map +0 -1
- package/dist/index-Bler93Rv.d.ts +0 -7
- package/dist/index-Bler93Rv.d.ts.map +0 -1
- package/dist/index-C2_c9Mqo.d.ts.map +0 -1
- package/dist/index-DWZV2KV9.d.ts +0 -8
- package/dist/index-DWZV2KV9.d.ts.map +0 -1
- package/dist/main-nav-Ci0i9b05.js +0 -2
- package/dist/main-nav-Ci0i9b05.js.map +0 -1
- package/dist/main-nav-DdJSFX9R.d.ts +0 -7
- package/dist/main-nav-DdJSFX9R.d.ts.map +0 -1
- package/dist/mdx-Bc39yJEk.js +0 -2
- package/dist/mdx-Bc39yJEk.js.map +0 -1
- package/dist/mdx-CKRU84WS.d.ts +0 -12
- package/dist/mdx-CKRU84WS.d.ts.map +0 -1
- package/dist/mermaid-block-BlCALvQ4.js +0 -13
- package/dist/mermaid-block-BlCALvQ4.js.map +0 -1
- package/dist/metadata-plugin-OKcE6Xsj.d.ts +0 -7
- package/dist/metadata-plugin-OKcE6Xsj.d.ts.map +0 -1
- package/dist/metadata-plugin-tEixstEj.js +0 -2
- package/dist/metadata-plugin-tEixstEj.js.map +0 -1
- package/dist/mobile-nav-BAkYO55-.js +0 -2
- package/dist/mobile-nav-BAkYO55-.js.map +0 -1
- package/dist/mobile-nav-wLU7upp-.d.ts +0 -7
- package/dist/mobile-nav-wLU7upp-.d.ts.map +0 -1
- package/dist/mode-toggle-B4gU5bK6.d.ts +0 -7
- package/dist/mode-toggle-B4gU5bK6.d.ts.map +0 -1
- package/dist/mode-toggle-BFNnk0Th.js +0 -2
- package/dist/mode-toggle-BFNnk0Th.js.map +0 -1
- package/dist/mount-CNbhMJe--D9ALOndF.js +0 -2
- package/dist/mount-CNbhMJe--D9ALOndF.js.map +0 -1
- package/dist/nav-B2NAfb21.d.ts.map +0 -1
- package/dist/popover-DBuHxfGT.js +0 -2
- package/dist/popover-DBuHxfGT.js.map +0 -1
- package/dist/pre-block-C2YQ_YU_.js +0 -2
- package/dist/pre-block-C2YQ_YU_.js.map +0 -1
- package/dist/pre-block-DMxLF2Tm.d.ts +0 -33
- package/dist/pre-block-DMxLF2Tm.d.ts.map +0 -1
- package/dist/presence-DKRzzG6_-DV_YtF92.js +0 -2
- package/dist/presence-DKRzzG6_-DV_YtF92.js.map +0 -1
- package/dist/providers-CFfgRc3G.js +0 -2
- package/dist/providers-CFfgRc3G.js.map +0 -1
- package/dist/providers-Do13WJMr.d.ts.map +0 -1
- package/dist/rehype-mermaid-kjf2DmAC.d.ts.map +0 -1
- package/dist/rehype-npm-command-C7BP6nqi.d.ts.map +0 -1
- package/dist/rehype-npm-command-O7ik2lKv.js +0 -2
- package/dist/rehype-npm-command-O7ik2lKv.js.map +0 -1
- package/dist/rehype-pre-block-source-D8t3NCnT.js +0 -2
- package/dist/rehype-pre-block-source-D8t3NCnT.js.map +0 -1
- package/dist/rehype-pre-block-source-zKoXg4aL.d.ts.map +0 -1
- package/dist/rehype-title-umwuNb2D.d.ts.map +0 -1
- package/dist/scroll-area-Bj8-58Fz.js +0 -2
- package/dist/scroll-area-Bj8-58Fz.js.map +0 -1
- package/dist/separator-t0JrmyLj.js +0 -2
- package/dist/separator-t0JrmyLj.js.map +0 -1
- package/dist/site-footer-BZQcOAVy.js +0 -2
- package/dist/site-footer-BZQcOAVy.js.map +0 -1
- package/dist/site-header-DH4ChrKl.js +0 -2
- package/dist/site-header-DH4ChrKl.js.map +0 -1
- package/dist/style-switcher-BvF4n8f4.js +0 -2
- package/dist/style-switcher-BvF4n8f4.js.map +0 -1
- package/dist/style-switcher-gHkRCCrl.d.ts +0 -25
- package/dist/style-switcher-gHkRCCrl.d.ts.map +0 -1
- package/dist/table-Cu1wFi9V.js +0 -2
- package/dist/table-Cu1wFi9V.js.map +0 -1
- package/dist/table-DAVFXCAf.d.ts +0 -10
- package/dist/table-DAVFXCAf.d.ts.map +0 -1
- package/dist/tabs-33zMuIHi.d.ts +0 -68
- package/dist/tabs-33zMuIHi.d.ts.map +0 -1
- package/dist/tabs-Cvy3-KIA.js.map +0 -1
- package/dist/tabs-jsmxQQW0.js +0 -2
- package/dist/tabs-jsmxQQW0.js.map +0 -1
- package/dist/tailwind-indicator-Dt4Bfpta.js.map +0 -1
- package/dist/unist-DN6buKAy.d.ts +0 -44
- package/dist/unist-DN6buKAy.d.ts.map +0 -1
- package/dist/use-colors-tvFBbu3S.d.ts.map +0 -1
- package/dist/use-lift-mode-DEELjsRA.d.ts.map +0 -1
- package/dist/use-meta-colors-CkNbJTgD.d.ts.map +0 -1
- package/dist/use-mounted-BtOuPtMk.d.ts.map +0 -1
- package/dist/use-themes-config-Dtk_egkh.d.ts +0 -14
- package/dist/use-themes-config-Dtk_egkh.d.ts.map +0 -1
- package/dist/utils-Ck5VSddf.js +0 -2
- package/dist/utils-Ck5VSddf.js.map +0 -1
- package/dist/utils-gls3XPIE.d.ts.map +0 -1
- package/src/components/copy-button/copy-button.tsx +0 -88
- package/src/components/copy-button/copy-button.types.ts +0 -17
- package/src/components/copy-button/index.ts +0 -2
- package/src/components/layouts/command-menu/command-menu.tsx +0 -166
- package/src/components/layouts/command-menu/index.ts +0 -1
- package/src/components/layouts/site-header/index.tsx +0 -127
- package/src/components/mdx/mdx-components/framework-docs.tsx +0 -20
- package/src/components/themes/index.ts +0 -1
- /package/dist/{code-CRijMbf8.js → code-B8oMaOlf.js} +0 -0
- /package/dist/{command-menu-DJNwkpf0.js → components/mdx/mdx-component-registry.types.js} +0 -0
- /package/dist/components/{copy-button/copy-button.types.js → mdx/mdx-components/code/pre-block/types.js} +0 -0
- /package/dist/{context-DAoDXLlH.js → context-BC4O8IkN.js} +0 -0
- /package/dist/{context.types-XX-41b7E.js → context.types-xqn674mu.js} +0 -0
- /package/dist/{copy-button-BKOhlef4.js → direction-BgdQqJSh.js} +0 -0
- /package/dist/{copy-button.types-B9s047di.js → docs-BxKlMynn.js} +0 -0
- /package/dist/{index-2DqdDmQN.d.ts → index-2ODhJ4PF.d.ts} +0 -0
- /package/dist/{index-CGglgRYd.d.ts → index-BCvK1fdV.d.ts} +0 -0
- /package/dist/{index-CX84Uo3j.d.ts → index-BOXZdgrl.d.ts} +0 -0
- /package/dist/{index-DOo6j0yP.d.ts → index-CDXWDYLH.d.ts} +0 -0
- /package/dist/{index-DUfvqU8v.d.ts → index-CEmd2iJF.d.ts} +0 -0
- /package/dist/{index-DlpwrdjG.d.ts → index-CMgWXPTi.d.ts} +0 -0
- /package/dist/{index-DxmiBoAj.d.ts → index-J4eIjbSW.d.ts} +0 -0
- /package/dist/{index-DzZbxTJ5.d.ts → index-PiDlmF8F.d.ts} +0 -0
- /package/dist/{docs-BXWvl6Zg.js → layouts-CZzkzPUj.js} +0 -0
- /package/dist/{layouts-MJSz-Ia5.js → mdx-components-DVXN21iW.js} +0 -0
- /package/dist/{mdx-components-Bvz2OZPf.js → mdx-runtime-8ZPauNCe.js} +0 -0
- /package/dist/{nav-CVNxjtXM.js → nav-n66GykpT.js} +0 -0
- /package/dist/{themes-k-j3m6gv.js → pre-block-B4y5yM69.js} +0 -0
- /package/dist/{unist-C_C48flD.js → types/mdx-runtime.js} +0 -0
- /package/dist/{index-MPFNOj9E.d.ts → typography-BjwZeImL.d.ts} +0 -0
- /package/src/components/layouts/{tailwind-indicator/index.tsx → tailwind-indicator.tsx} +0 -0
package/src/velite/config.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { codeImport } from 'remark-code-import'
|
|
|
8
8
|
import remarkGfm from 'remark-gfm'
|
|
9
9
|
import type { Pluggable } from 'unified'
|
|
10
10
|
import { defineConfig, s, type ZodMeta } from 'velite'
|
|
11
|
-
import { rehypeMermaid, rehypeNpmCommand, rehypePreBlockSource, rehypeTitle
|
|
11
|
+
import { rehypeMermaid, rehypeMetadataPlugin, rehypeNpmCommand, rehypePreBlockSource, rehypeTitle } from './plugins'
|
|
12
12
|
import { cleanTocItems } from './utils'
|
|
13
13
|
|
|
14
14
|
export type DocsVeliteConfigOptions = {
|
|
@@ -19,6 +19,59 @@ export type DocsVeliteConfigOptions = {
|
|
|
19
19
|
remarkPluginsBefore?: Pluggable[]
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
function buildDefaultRehypePlugins({
|
|
23
|
+
rehypePlugins = [],
|
|
24
|
+
rehypePluginsBefore = [],
|
|
25
|
+
}: Pick<DocsVeliteConfigOptions, 'rehypePlugins' | 'rehypePluginsBefore'>): Pluggable[] {
|
|
26
|
+
return [
|
|
27
|
+
...rehypePluginsBefore,
|
|
28
|
+
// 1) Structural transforms.
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
rehypeSlug,
|
|
31
|
+
rehypeMetadataPlugin,
|
|
32
|
+
// 2) Syntax highlighting.
|
|
33
|
+
[
|
|
34
|
+
rehypePrettyCode,
|
|
35
|
+
{
|
|
36
|
+
getHighlighter,
|
|
37
|
+
onVisitHighlightedLine(node: UnistNode) {
|
|
38
|
+
// @ts-ignore
|
|
39
|
+
node.properties.className.push('line--highlighted')
|
|
40
|
+
},
|
|
41
|
+
onVisitHighlightedWord(node: UnistNode) {
|
|
42
|
+
// @ts-ignore
|
|
43
|
+
node.properties.className = ['word--highlighted']
|
|
44
|
+
},
|
|
45
|
+
onVisitLine(node: UnistNode) {
|
|
46
|
+
if (node.children?.length === 0) {
|
|
47
|
+
node.children = [{ type: 'text', value: ' ' }]
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
theme: {
|
|
51
|
+
dark: 'catppuccin-mocha',
|
|
52
|
+
light: 'github-light',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
// 3) Post-highlight enrichments and specialized transforms.
|
|
57
|
+
rehypeTitle,
|
|
58
|
+
rehypePreBlockSource,
|
|
59
|
+
rehypeMermaid,
|
|
60
|
+
rehypeNpmCommand,
|
|
61
|
+
// 4) Heading links for docs navigation.
|
|
62
|
+
// @ts-ignore
|
|
63
|
+
[rehypeAutolinkHeadings, { properties: { ariaLabel: 'Link to section', className: ['subheading-anchor'] } }],
|
|
64
|
+
...rehypePlugins,
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function buildDefaultRemarkPlugins({
|
|
69
|
+
remarkPlugins = [],
|
|
70
|
+
remarkPluginsBefore = [],
|
|
71
|
+
}: Pick<DocsVeliteConfigOptions, 'remarkPlugins' | 'remarkPluginsBefore'>): Pluggable[] {
|
|
72
|
+
return [...remarkPluginsBefore, remarkGfm, codeImport, ...remarkPlugins]
|
|
73
|
+
}
|
|
74
|
+
|
|
22
75
|
export function createDocsVeliteConfig({
|
|
23
76
|
docsPattern = 'docs/**/*.mdx',
|
|
24
77
|
rehypePlugins = [],
|
|
@@ -74,43 +127,8 @@ export function createDocsVeliteConfig({
|
|
|
74
127
|
},
|
|
75
128
|
},
|
|
76
129
|
mdx: {
|
|
77
|
-
rehypePlugins:
|
|
78
|
-
|
|
79
|
-
// @ts-ignore
|
|
80
|
-
rehypeSlug,
|
|
81
|
-
rhypeMetadataPlugin,
|
|
82
|
-
[
|
|
83
|
-
rehypePrettyCode,
|
|
84
|
-
{
|
|
85
|
-
getHighlighter,
|
|
86
|
-
onVisitHighlightedLine(node: UnistNode) {
|
|
87
|
-
// @ts-ignore
|
|
88
|
-
node.properties.className.push('line--highlighted')
|
|
89
|
-
},
|
|
90
|
-
onVisitHighlightedWord(node: UnistNode) {
|
|
91
|
-
// @ts-ignore
|
|
92
|
-
node.properties.className = ['word--highlighted']
|
|
93
|
-
},
|
|
94
|
-
onVisitLine(node: UnistNode) {
|
|
95
|
-
if (node.children?.length === 0) {
|
|
96
|
-
node.children = [{ type: 'text', value: ' ' }]
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
theme: {
|
|
100
|
-
dark: 'catppuccin-mocha',
|
|
101
|
-
light: 'github-light',
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
],
|
|
105
|
-
rehypeTitle,
|
|
106
|
-
rehypePreBlockSource,
|
|
107
|
-
rehypeMermaid,
|
|
108
|
-
rehypeNpmCommand,
|
|
109
|
-
// @ts-ignore
|
|
110
|
-
[rehypeAutolinkHeadings, { properties: { ariaLabel: 'Link to section', className: ['subheading-anchor'] } }],
|
|
111
|
-
...rehypePlugins,
|
|
112
|
-
],
|
|
113
|
-
remarkPlugins: [...remarkPluginsBefore, remarkGfm, codeImport, ...remarkPlugins],
|
|
130
|
+
rehypePlugins: buildDefaultRehypePlugins({ rehypePlugins, rehypePluginsBefore }),
|
|
131
|
+
remarkPlugins: buildDefaultRemarkPlugins({ remarkPlugins, remarkPluginsBefore }),
|
|
114
132
|
},
|
|
115
133
|
}) as any
|
|
116
134
|
}
|
package/src/velite/index.ts
CHANGED
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { UnistNode } from '@duck-docs/types'
|
|
2
|
+
|
|
3
|
+
export function readNodeProperties<T extends object>(node: UnistNode): T {
|
|
4
|
+
return (node.properties ?? {}) as T
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function assignNodeProperties<T extends object>(node: UnistNode, nextProperties: T) {
|
|
8
|
+
node.properties = {
|
|
9
|
+
...(node.properties ?? {}),
|
|
10
|
+
...nextProperties,
|
|
11
|
+
}
|
|
12
|
+
}
|
|
File without changes
|
|
@@ -1,26 +1,29 @@
|
|
|
1
|
-
import type { UnistNode, UnistTree } from '@duck-docs/types'
|
|
1
|
+
import type { MdxCodeNodeProperties, UnistNode, UnistTree } from '@duck-docs/types'
|
|
2
2
|
import { visit } from 'unist-util-visit'
|
|
3
|
+
import { assignNodeProperties } from './hast-properties'
|
|
4
|
+
import { parseCodeFenceMeta } from './metadata-utils'
|
|
3
5
|
|
|
4
|
-
export function
|
|
6
|
+
export function rehypeMetadataPlugin() {
|
|
5
7
|
return (tree: UnistTree): UnistTree => {
|
|
6
8
|
visit(tree, 'element', (node: UnistNode) => {
|
|
7
9
|
if (node.tagName === 'code' && node.children) {
|
|
8
|
-
|
|
10
|
+
const nextProperties: Partial<MdxCodeNodeProperties> = {
|
|
11
|
+
__rawString__: node.children?.[0]?.value,
|
|
12
|
+
}
|
|
9
13
|
|
|
10
14
|
if (node.data?.meta) {
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
const parsed = parseCodeFenceMeta(node.data.meta as string)
|
|
16
|
+
nextProperties.__title__ = parsed.title
|
|
17
|
+
nextProperties.__marks__ = parsed.marks
|
|
14
18
|
}
|
|
15
19
|
|
|
16
|
-
node
|
|
17
|
-
...node.properties,
|
|
18
|
-
__rawString__: node.children?.[0]?.value,
|
|
19
|
-
...match,
|
|
20
|
-
}
|
|
20
|
+
assignNodeProperties(node, nextProperties)
|
|
21
21
|
}
|
|
22
22
|
})
|
|
23
23
|
|
|
24
24
|
return tree
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
+
|
|
28
|
+
// Backward-compatible alias kept for downstream consumers.
|
|
29
|
+
export const rhypeMetadataPlugin = rehypeMetadataPlugin
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type ParsedCodeFenceMeta = {
|
|
2
|
+
marks?: string[]
|
|
3
|
+
title?: string
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export function parseCodeFenceMeta(meta: string): ParsedCodeFenceMeta {
|
|
7
|
+
const title = (meta.match(/title="([^"]*)"/) ?? [])[1]
|
|
8
|
+
const marks = [...meta.matchAll(/\/([^/]+)\//g)].map((match) => match[1]).filter(Boolean) as string[]
|
|
9
|
+
|
|
10
|
+
return {
|
|
11
|
+
marks: marks.length ? marks : undefined,
|
|
12
|
+
title,
|
|
13
|
+
}
|
|
14
|
+
}
|
|
File without changes
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { UnistNode, UnistTree } from '@duck-docs/types'
|
|
1
|
+
import type { MdxCodeNodeProperties, UnistNode, UnistTree } from '@duck-docs/types'
|
|
2
2
|
import { visit } from 'unist-util-visit'
|
|
3
|
+
import { readNodeProperties } from './hast-properties'
|
|
3
4
|
|
|
4
5
|
export function rehypeNpmCommand() {
|
|
5
6
|
return (tree: UnistTree) => {
|
|
@@ -8,34 +9,35 @@ export function rehypeNpmCommand() {
|
|
|
8
9
|
return
|
|
9
10
|
}
|
|
10
11
|
|
|
12
|
+
const props = readNodeProperties<MdxCodeNodeProperties>(node)
|
|
13
|
+
const raw = props.__rawString__
|
|
14
|
+
|
|
15
|
+
if (!raw) {
|
|
16
|
+
return
|
|
17
|
+
}
|
|
18
|
+
|
|
11
19
|
// npm install.
|
|
12
|
-
if (
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
node.properties['__bunCommand__'] = npmCommand.replace('npm install', 'bun add')
|
|
20
|
+
if (raw.startsWith('npm install')) {
|
|
21
|
+
props.__npmCommand__ = raw
|
|
22
|
+
props.__yarnCommand__ = raw.replace('npm install', 'yarn add')
|
|
23
|
+
props.__pnpmCommand__ = raw.replace('npm install', 'pnpm add')
|
|
24
|
+
props.__bunCommand__ = raw.replace('npm install', 'bun add')
|
|
18
25
|
}
|
|
19
26
|
|
|
20
27
|
// npx create.
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
node.properties['__bunCommand__'] = npmCommand.replace('npx', 'bunx --bun')
|
|
28
|
+
if (raw.startsWith('npx create-')) {
|
|
29
|
+
props.__npmCommand__ = raw
|
|
30
|
+
props.__yarnCommand__ = raw.replace('npx create-', 'yarn create ')
|
|
31
|
+
props.__pnpmCommand__ = raw.replace('npx create-', 'pnpm create ')
|
|
32
|
+
props.__bunCommand__ = raw.replace('npx', 'bunx --bun')
|
|
27
33
|
}
|
|
28
34
|
|
|
29
35
|
// npx.
|
|
30
|
-
if (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
node.properties['__npmCommand__'] = npmCommand
|
|
36
|
-
node.properties['__yarnCommand__'] = npmCommand.replace('npx', 'yarn dlx')
|
|
37
|
-
node.properties['__pnpmCommand__'] = npmCommand.replace('npx', 'pnpm dlx')
|
|
38
|
-
node.properties['__bunCommand__'] = npmCommand.replace('npx', 'bunx --bun')
|
|
36
|
+
if (raw.startsWith('npx') && !raw.startsWith('npx create-')) {
|
|
37
|
+
props.__npmCommand__ = raw
|
|
38
|
+
props.__yarnCommand__ = raw.replace('npx', 'yarn dlx')
|
|
39
|
+
props.__pnpmCommand__ = raw.replace('npx', 'pnpm dlx')
|
|
40
|
+
props.__bunCommand__ = raw.replace('npx', 'bunx --bun')
|
|
39
41
|
}
|
|
40
42
|
})
|
|
41
43
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { UnistNode, UnistTree } from '@duck-docs/types'
|
|
1
|
+
import type { MdxCodeNodeProperties, UnistNode, UnistTree } from '@duck-docs/types'
|
|
2
2
|
import type { Nodes } from 'hast'
|
|
3
3
|
import { toString } from 'hast-util-to-string'
|
|
4
4
|
import { visit } from 'unist-util-visit'
|
|
5
|
+
import { assignNodeProperties, readNodeProperties } from './hast-properties'
|
|
5
6
|
|
|
6
7
|
export function rehypePreBlockSource() {
|
|
7
8
|
return (tree: UnistTree) => {
|
|
@@ -13,10 +14,11 @@ export function rehypePreBlockSource() {
|
|
|
13
14
|
|
|
14
15
|
node.children?.forEach((child: UnistNode) => {
|
|
15
16
|
if (child?.type === 'element' && child?.tagName === 'pre') {
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
const currentProperties = readNodeProperties<MdxCodeNodeProperties>(child)
|
|
18
|
+
assignNodeProperties(child, {
|
|
19
|
+
...currentProperties,
|
|
18
20
|
__rawString__: toString(child as Nodes),
|
|
19
|
-
}
|
|
21
|
+
})
|
|
20
22
|
}
|
|
21
23
|
})
|
|
22
24
|
}
|
|
File without changes
|
package/src/velite/utils.ts
CHANGED
|
File without changes
|
package/dist/button-Ao0Egplu.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./chunk-BPpoHddQ-DLGSIJHp.js";import{t}from"./dist-DfVBUGvk.js";import{cn as n}from"@gentleduck/libs/cn";import*as r from"react";import i from"react";import{Fragment as a,jsx as o,jsxs as s}from"react/jsx-runtime";import{Loader as c}from"lucide-react";function l(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function u(...e){return t=>e.forEach(e=>{l(e,t)})}function d(...e){return r.useCallback(u(...e),e)}e({Slot:()=>p,Slottable:()=>_,createSlot:()=>f,createSlottable:()=>g});function f(e){let t=m(e),n=i.forwardRef((e,n)=>{let{children:r,...a}=e,s=i.Children.toArray(r),c=s.find(v);if(c){let e=c.props.children,r=s.map(t=>t===c?e:t);return o(t,{...a,ref:n,children:r})}return o(t,{...a,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}const p=f(`Slot`);function m(e){let t=i.forwardRef((e,t)=>{let{children:n,...r}=e,s=i.Children.toArray(n);if(s.length===0)return null;let c=s.findIndex(e=>i.isValidElement(e));if(c===-1)return o(a,{children:n});let l=s[c],d=b(l),f=y(r,l.props||{});l.type!==i.Fragment&&(f.ref=t?u(t,d):d);let p=i.cloneElement(l,f),m=s.map((e,t)=>t===c?p:e);return m.length===1?m[0]:m});return t.displayName=`${e}.SlotClone`,t}const h=Symbol(`radix.slottable`);function g(e){let t=({children:e})=>o(a,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=h,t}const _=g(`Slottable`);function v(e){return i.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===h}function y(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function b(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const x=t(`relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium text-sm outline-none transition-all focus-visible:border-ring focus-visible:outline-hidden focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,{defaultVariants:{border:`default`,size:`default`,variant:`default`},variants:{border:{default:``,destructive:`border border-destructive/40 bg-destructive/40 hover:border-destructive hover:bg-destructive/65`,primary:`border border-border/40 hover:border-border/80`,secondary:`border border-secondary/40 bg-secondary/40 hover:border-secondary hover:bg-secondary/65`,warning:`border border-warning/40 bg-warning/40 hover:border-warning hover:bg-warning/65`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,icon:`size-9`,"icon-lg":`size-10`,"icon-sm":`size-8`,lg:`h-10 px-6 has-[>svg]:px-4`,sm:`h-8 gap-1.5 px-3 has-[>svg]:px-2.5`},variant:{dashed:`border border-input border-dashed bg-background text-accent-foreground shadow-xs hover:bg-accent/50 hover:text-accent-foreground`,default:`bg-primary text-primary-foreground shadow-sm hover:bg-primary/90`,destructive:`bg-destructive/90 text-destructive-foreground shadow-xs hover:bg-destructive/70`,expand_icon:`group relative bg-primary text-primary-foreground hover:bg-primary/90`,ghost:`text-accent-foreground hover:bg-accent hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`,nothing:``,outline:`border border-input bg-background text-accent-foreground shadow-xs hover:bg-accent hover:text-accent-foreground`,secondary:`bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80`,warning:`bg-warning/90 text-warning-foreground shadow-xs hover:bg-warning/70`}}});function S({children:e,variant:t=`default`,size:r=`default`,border:i=`default`,asChild:a,className:l,loading:u,isCollapsed:d,icon:f,secondIcon:m,type:h=`button`,disabled:g,ref:_,...v}){return s(a?p:`button`,{"data-slot":`button`,...v,className:n(x({border:i,className:l,size:d?`icon`:r,variant:t})),disabled:u??g,ref:_,type:h,children:[u?o(c,{className:`animate-spin`}):f,!d&&e,!d&&m&&m]})}export{d as i,x as n,p as r,S as t};
|
|
2
|
-
//# sourceMappingURL=button-Ao0Egplu.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button-Ao0Egplu.js","names":["e","t","n","e","t","r","n","a","o","s","c","i","l","u","d","f","cva","Slot"],"sources":["../../duck-primitives/dist/use-composed-refs-BDlr_-as.js","../../duck-primitives/dist/slot-BvvoEYgZ.js","../../registry-ui-duckui/src/button/button.constants.ts","../../registry-ui-duckui/src/button/button.tsx"],"sourcesContent":["import*as e from\"react\";function t(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function n(...e){return n=>e.forEach(e=>{t(e,n)})}function r(...t){return e.useCallback(n(...t),t)}export{r as n,n as t};","import{n as e}from\"./chunk-BPpoHddQ.js\";import{t}from\"./use-composed-refs-BDlr_-as.js\";import n from\"react\";import{Fragment as r,jsx as i}from\"react/jsx-runtime\";var a=e({Slot:()=>s,Slottable:()=>d,createSlot:()=>o,createSlottable:()=>u});function o(e){let t=c(e),r=n.forwardRef((e,r)=>{let{children:a,...o}=e,s=n.Children.toArray(a),c=s.find(f);if(c){let e=c.props.children,n=s.map(t=>t===c?e:t);return i(t,{...o,ref:r,children:n})}return i(t,{...o,ref:r,children:a})});return r.displayName=`${e}.Slot`,r}const s=o(`Slot`);function c(e){let a=n.forwardRef((e,a)=>{let{children:o,...s}=e,c=n.Children.toArray(o);if(c.length===0)return null;let l=c.findIndex(e=>n.isValidElement(e));if(l===-1)return i(r,{children:o});let u=c[l],d=m(u),f=p(s,u.props||{});u.type!==n.Fragment&&(f.ref=a?t(a,d):d);let h=n.cloneElement(u,f),g=c.map((e,t)=>t===l?h:e);return g.length===1?g[0]:g});return a.displayName=`${e}.SlotClone`,a}const l=Symbol(`radix.slottable`);function u(e){let t=({children:e})=>i(r,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=l,t}const d=u(`Slottable`);function f(e){return n.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===l}function p(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function m(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}export{a,u as i,d as n,o as r,s as t};","import { cva } from '@gentleduck/variants'\n\nexport const buttonVariants = cva(\n \"relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium text-sm outline-none transition-all focus-visible:border-ring focus-visible:outline-hidden focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n\n {\n defaultVariants: {\n border: 'default',\n size: 'default',\n variant: 'default',\n },\n variants: {\n border: {\n default: '',\n destructive: 'border border-destructive/40 bg-destructive/40 hover:border-destructive hover:bg-destructive/65',\n primary: 'border border-border/40 hover:border-border/80',\n secondary: 'border border-secondary/40 bg-secondary/40 hover:border-secondary hover:bg-secondary/65',\n warning: 'border border-warning/40 bg-warning/40 hover:border-warning hover:bg-warning/65',\n },\n size: {\n default: 'h-9 px-4 py-2 has-[>svg]:px-3',\n icon: 'size-9',\n 'icon-lg': 'size-10',\n 'icon-sm': 'size-8',\n lg: 'h-10 px-6 has-[>svg]:px-4',\n sm: 'h-8 gap-1.5 px-3 has-[>svg]:px-2.5',\n },\n variant: {\n dashed:\n 'border border-input border-dashed bg-background text-accent-foreground shadow-xs hover:bg-accent/50 hover:text-accent-foreground',\n default: 'bg-primary text-primary-foreground shadow-sm hover:bg-primary/90',\n destructive: 'bg-destructive/90 text-destructive-foreground shadow-xs hover:bg-destructive/70',\n expand_icon: 'group relative bg-primary text-primary-foreground hover:bg-primary/90',\n ghost: 'text-accent-foreground hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n nothing: '',\n outline:\n 'border border-input bg-background text-accent-foreground shadow-xs hover:bg-accent hover:text-accent-foreground',\n secondary: 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',\n warning: 'bg-warning/90 text-warning-foreground shadow-xs hover:bg-warning/70',\n },\n },\n },\n)\n","import { cn } from '@gentleduck/libs/cn'\nimport { Slot } from '@gentleduck/primitives/slot'\nimport { Loader } from 'lucide-react'\nimport type * as React from 'react'\nimport { buttonVariants } from './button.constants'\nimport type { AnimationIconProps, ButtonProps } from './button.types'\n\n/**\n * Renders a customizable button component, supporting various styles and behaviors.\n */\nfunction Button({\n children,\n variant = 'default',\n size = 'default',\n border = 'default',\n asChild,\n className,\n loading,\n isCollapsed,\n icon,\n secondIcon,\n type = 'button',\n disabled,\n ref,\n ...props\n}: ButtonProps): React.JSX.Element {\n const Component = (asChild ? Slot : 'button') as React.ElementType\n\n return (\n <Component\n data-slot=\"button\"\n {...props}\n className={cn(\n buttonVariants({\n border,\n className,\n size: isCollapsed ? 'icon' : size,\n variant,\n }),\n )}\n disabled={loading ?? disabled}\n ref={ref}\n type={type}>\n {loading ? <Loader className=\"animate-spin\" /> : icon}\n {!isCollapsed && children}\n {!isCollapsed && secondIcon && secondIcon}\n </Component>\n )\n}\n\n/**\n * Renders an animation icon component.\n */\nfunction AnimationIcon({ children, animationIcon }: AnimationIconProps): React.JSX.Element {\n return (\n <>\n {animationIcon?.icon && animationIcon.iconPlacement === 'left' && (\n <div className=\"w-0 translate-x-[-1.3em] pr-0 opacity-0 transition-all duration-200 group-hover:w-5 group-hover:-translate-x-1 group-hover:pr-2 group-hover:opacity-100\">\n {animationIcon?.icon}\n </div>\n )}\n {children}\n {animationIcon?.icon && animationIcon.iconPlacement === 'right' && (\n <div className=\"w-0 translate-x-[1.3em] pl-0 opacity-0 transition-all duration-200 group-hover:w-5 group-hover:translate-x-0 group-hover:pl-2 group-hover:opacity-100\">\n {animationIcon?.icon}\n </div>\n )}\n </>\n )\n}\n\nexport { Button, AnimationIcon }\n"],"mappings":"+QAAwB,SAAS,EAAE,EAAE,EAAE,CAAC,OAAOA,GAAG,WAAWA,EAAEC,EAAE,CAACD,GAAG,OAAO,EAAE,QAAQC,GAAG,SAAS,EAAE,GAAGD,EAAE,CAAC,MAAO,IAAGA,EAAE,QAAQ,GAAG,CAAC,EAAEA,EAAEE,EAAE,EAAE,CAAC,SAAS,EAAE,GAAGD,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,GAAGA,EAAE,CAACA,EAAE,CCAnBE,EAAE,CAAC,SAAS,EAAE,cAAc,EAAE,eAAe,EAAE,oBAAoB,EAAE,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC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,OAAQ,UACR,KAAM,UACN,QAAS,UACV,CACD,SAAU,CACR,OAAQ,CACN,QAAS,GACT,YAAa,kGACb,QAAS,iDACT,UAAW,0FACX,QAAS,kFACV,CACD,KAAM,CACJ,QAAS,gCACT,KAAM,SACN,UAAW,UACX,UAAW,SACX,GAAI,4BACJ,GAAI,qCACL,CACD,QAAS,CACP,OACE,mIACF,QAAS,mEACT,YAAa,kFACb,YAAa,wEACb,MAAO,sEACP,KAAM,kDACN,QAAS,GACT,QACE,kHACF,UAAW,yEACX,QAAS,sEACV,CACF,CACF,CACF,CCjCD,SAAS,EAAO,CACd,WACA,UAAU,UACV,OAAO,UACP,SAAS,UACT,UACA,YACA,UACA,cACA,OACA,aACA,OAAO,SACP,WACA,MACA,GAAG,GAC8B,CAGjC,OACE,EAHiB,EAAUC,EAAO,SAAA,CAIhC,YAAU,SACV,GAAI,EACJ,UAAW,EACT,EAAe,CACb,SACA,YACA,KAAM,EAAc,OAAS,EAC7B,UACD,CAAC,CACH,CACD,SAAU,GAAW,EAChB,MACC,iBACL,EAAU,EAAC,EAAA,CAAO,UAAU,eAAA,CAAiB,CAAG,EAChD,CAAC,GAAe,EAChB,CAAC,GAAe,GAAc,IACrB"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime40 from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
//#region src/components/mdx/mdx-components/callout.d.ts
|
|
4
|
-
interface CalloutProps {
|
|
5
|
-
icon?: React.ReactNode;
|
|
6
|
-
title?: string;
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
className?: string;
|
|
9
|
-
[key: string]: unknown;
|
|
10
|
-
}
|
|
11
|
-
declare function Callout({
|
|
12
|
-
title,
|
|
13
|
-
children,
|
|
14
|
-
icon,
|
|
15
|
-
className,
|
|
16
|
-
...props
|
|
17
|
-
}: CalloutProps): react_jsx_runtime40.JSX.Element;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { Callout as t };
|
|
20
|
-
//# sourceMappingURL=callout-C1MveMtC.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"callout-C1MveMtC.d.ts","names":[],"sources":["../src/components/mdx/mdx-components/callout.tsx"],"sourcesContent":[],"mappings":";;;UAGU,YAAA;SACD,KAAA,CAAM;;EADL,QAAA,CAAA,EAGG,KAAA,CAAM,SAHG;EAQN,SAAA,CAAO,EAAA,MAAA;EAAG,CAAA,GAAA,EAAA,MAAA,CAAA,EAAA,OAAA;;AAAiB,iBAA3B,OAAA,CAA2B;EAAA,KAAA;EAAA,QAAA;EAAA,IAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAA6B,YAA7B,CAAA,EAAyC,mBAAA,CAAA,GAAA,CAAA,OAAzC"}
|
package/dist/callout-ChU_uu_5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./dist-DfVBUGvk.js";import{cn as t}from"@gentleduck/libs/cn";import{jsx as n,jsxs as r}from"react/jsx-runtime";const i=e(`relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current`,{defaultVariants:{variant:`default`},variants:{variant:{default:`bg-card text-card-foreground`,destructive:`bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current`}}});function a({className:e,variant:r,...a}){return n(`div`,{className:t(i({variant:r}),e),"data-slot":`alert`,role:`alert`,...a})}function o({className:e,...r}){return n(`div`,{className:t(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,e),"data-slot":`alert-title`,...r})}function s({className:e,...r}){return n(`div`,{className:t(`col-start-2 grid justify-items-start gap-1 text-muted-foreground text-sm [&_p]:leading-relaxed`,e),"data-slot":`alert-description`,...r})}function c({title:e,children:i,icon:c,className:l,...u}){return r(a,{className:t(`my-6`,c&&`grid-cols-[calc(var(--spacing)*4)_1fr] gap-x-3`,l),children:[c&&n(`span`,{className:`row-span-2 [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:translate-y-0.5 [&_svg]:text-current`,children:c}),e&&n(o,{children:e}),n(s,{children:i})]})}export{o as i,a as n,s as r,c as t};
|
|
2
|
-
//# sourceMappingURL=callout-ChU_uu_5.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"callout-ChU_uu_5.js","names":["cva"],"sources":["../../registry-ui-duckui/src/alert/alert.constants.ts","../../registry-ui-duckui/src/alert/alert.tsx","../src/components/mdx/mdx-components/callout.tsx"],"sourcesContent":["import { cva } from '@gentleduck/variants'\n\nexport const alertVariants = cva(\n 'relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current',\n {\n defaultVariants: {\n variant: 'default',\n },\n variants: {\n variant: {\n default: 'bg-card text-card-foreground',\n destructive:\n 'bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current',\n },\n },\n },\n)\n","import { cn } from '@gentleduck/libs/cn'\nimport type { VariantProps } from '@gentleduck/variants'\nimport type React from 'react'\nimport { alertVariants } from './alert.constants'\n\nfunction Alert({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>) {\n return <div className={cn(alertVariants({ variant }), className)} data-slot=\"alert\" role=\"alert\" {...props} />\n}\nfunction AlertTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n className={cn('col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight', className)}\n data-slot=\"alert-title\"\n {...props}\n />\n )\n}\nfunction AlertDescription({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n className={cn(\n 'col-start-2 grid justify-items-start gap-1 text-muted-foreground text-sm [&_p]:leading-relaxed',\n className,\n )}\n data-slot=\"alert-description\"\n {...props}\n />\n )\n}\nexport { Alert, AlertTitle, AlertDescription }\n","import { cn } from '@gentleduck/libs/cn'\nimport { Alert, AlertDescription, AlertTitle } from '@gentleduck/registry-ui-duckui/alert'\n\ninterface CalloutProps {\n icon?: React.ReactNode\n title?: string\n children?: React.ReactNode\n className?: string\n [key: string]: unknown\n}\n\nexport function Callout({ title, children, icon, className, ...props }: CalloutProps) {\n return (\n <Alert className={cn('my-6', icon && 'grid-cols-[calc(var(--spacing)*4)_1fr] gap-x-3', className)}>\n {icon && (\n <span className=\"row-span-2 [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:translate-y-0.5 [&_svg]:text-current\">\n {icon}\n </span>\n )}\n {title && <AlertTitle>{title}</AlertTitle>}\n <AlertDescription>{children}</AlertDescription>\n </Alert>\n )\n}\n"],"mappings":"kIAEA,MAAa,EAAgBA,EAC3B,oOACA,CACE,gBAAiB,CACf,QAAS,UACV,CACD,SAAU,CACR,QAAS,CACP,QAAS,+BACT,YACE,oGACH,CACF,CACF,CACF,CCXD,SAAS,EAAM,CAAE,YAAW,UAAS,GAAG,GAA2E,CACjH,OAAO,EAAC,MAAA,CAAI,UAAW,EAAG,EAAc,CAAE,UAAS,CAAC,CAAE,EAAU,CAAE,YAAU,QAAQ,KAAK,QAAQ,GAAI,GAAS,CAEhH,SAAS,EAAW,CAAE,YAAW,GAAG,GAAsC,CACxE,OACE,EAAC,MAAA,CACC,UAAW,EAAG,8DAA+D,EAAU,CACvF,YAAU,cACV,GAAI,GACJ,CAGN,SAAS,EAAiB,CAAE,YAAW,GAAG,GAAsC,CAC9E,OACE,EAAC,MAAA,CACC,UAAW,EACT,iGACA,EACD,CACD,YAAU,oBACV,GAAI,GACJ,CCfN,SAAgB,EAAQ,CAAE,QAAO,WAAU,OAAM,YAAW,GAAG,GAAuB,CACpF,OACE,EAAC,EAAA,CAAM,UAAW,EAAG,OAAQ,GAAQ,iDAAkD,EAAU,WAC9F,GACC,EAAC,OAAA,CAAK,UAAU,mGACb,GACI,CAER,GAAS,EAAC,EAAA,CAAA,SAAY,EAAA,CAAmB,CAC1C,EAAC,EAAA,CAAkB,WAAA,CAA4B,GACzC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"charts-Cyick3Tp.d.ts","names":[],"sources":["../src/lib/charts.ts"],"sourcesContent":[],"mappings":";iBAAgB,yBAAA,SAAkC,yBAAyB;AAA3D,iBAoBA,2BAAA,CApB2D,IAAA,EAAA,MAAM,CAAA,EAAA,MAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n&&t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));export{o as n,s as r,l as t};
|
|
2
|
-
//# sourceMappingURL=chunk-BPpoHddQ-DLGSIJHp.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chunk-BPpoHddQ-DLGSIJHp.js","names":["t","e","r","i","n","c","l","o","s","a"],"sources":["../../duck-primitives/dist/chunk-BPpoHddQ.js"],"sourcesContent":["var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n&&t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));export{s as n,l as r,o as t};"],"mappings":"AAAA,IAAI,EAAE,OAAO,OAAO,EAAE,OAAO,eAAe,EAAE,OAAO,yBAAyB,EAAE,OAAO,oBAAoB,EAAE,OAAO,eAAe,EAAE,OAAO,UAAU,eAAe,GAAG,EAAE,SAASA,GAAGC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,QAAQD,EAAE,CAACA,EAAE,SAAS,GAAG,EAAE,IAAI,CAAC,IAAIE,EAAE,EAAE,CAAC,IAAI,IAAIC,KAAKF,EAAE,EAAEC,EAAEC,EAAE,CAAC,IAAIF,EAAEE,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC,OAAOC,GAAG,EAAEF,EAAE,OAAO,YAAY,CAAC,MAAM,SAAS,CAAC,CAACA,GAAG,GAAG,EAAE,EAAE,EAAE,IAAI,CAAC,GAAGC,GAAG,OAAOA,GAAG,UAAU,OAAOA,GAAG,WAAW,IAAI,IAAIE,EAAE,EAAEF,EAAE,CAACG,EAAE,EAAE,EAAED,EAAE,OAAO,EAAEC,EAAE,EAAE,IAAI,EAAED,EAAEC,GAAG,CAAC,EAAE,KAAKL,EAAE,EAAE,EAAE,IAAIM,GAAG,EAAEN,EAAE,EAAE,CAAC,KAAK,GAAGE,EAAEF,IAAI,KAAK,KAAK,EAAE,CAAC,WAAW,EAAE,EAAE,EAAEE,EAAE,EAAE,GAAGK,EAAE,WAAW,CAAC,CAAC,OAAOP,GAAG,GAAG,EAAE,EAAE,KAAK,EAAEG,GAAG,KAAK,EAAE,CAAC,EAAE,EAAEA,EAAE,CAAC,CAAC,EAAEF,GAAG,CAACE,GAAG,CAACA,EAAE,WAAW,EAAEK,EAAE,UAAU,CAAC,MAAML,EAAE,WAAW,CAAC,EAAE,CAAC,CAACK,EAAEL,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"code-block-BNW0BxR6.d.ts","names":[],"sources":["../src/components/mdx/mdx-components/code/code-block.tsx"],"sourcesContent":[],"mappings":";;;UAEU,SAAA,SAAkB,KAAA,CAAM,eAAe;;;AAAvC,iBAIM,SAAA,CAJiC;EAAA,SAArB;EAAA,aAAM;EAAA,GAAc;AAAA,CAAA,EAIkB,SAJlB,CAAA,EAI2B,mBAAA,CAAA,GAAA,CAAA,OAJ3B"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./icons-CiCgiCYy.js";import{n as t,t as n}from"./tabs-jsmxQQW0.js";import{t as r}from"./use-lift-mode-CqcC0vis.js";import{cn as i}from"@gentleduck/libs/cn";import a from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{GripVertical as c}from"lucide-react";import*as l from"react-resizable-panels";const u=({className:e,...t})=>o(l.PanelGroup,{className:i(`flex h-full w-full data-[panel-group-direction=vertical]:flex-col`,e),"data-slot":`panel-group`,...t}),d=l.Panel,f=({withHandle:e,className:t,...n})=>o(l.PanelResizeHandle,{className:i(`relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90`,t),"data-slot":`panel-resize-handle`,...n,children:e&&o(`div`,{className:`z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border`,"data-slot":`panel-handle`,children:o(c,{className:`h-2.5 w-2.5`})})});function p({block:c}){let{isLiftMode:l}=r(c.name),[p,m]=a.useState(!0),h=a.useRef(null);return s(n,{className:`relative grid w-full scroll-m-20 gap-4`,defaultValue:`preview`,id:c.name,style:{"--container-height":c.container?.height},children:[o(t,{className:`relative after:absolute after:inset-0 after:right-3 after:z-0 after:rounded-lg after:bg-muted`,value:`preview`,children:s(u,{className:`relative z-10`,direction:`horizontal`,children:[s(d,{className:i(`relative rounded-lg border bg-background`,l?`border-border/50`:`border-border`),defaultSize:100,minSize:30,ref:h,children:[p?s(`div`,{className:`absolute inset-0 z-10 flex h-[--container-height] w-full items-center justify-center gap-2 bg-background text-muted-foreground text-sm`,children:[o(e.spinner,{className:`h-4 w-4 animate-spin`}),`Loading...`]}):null,o(`iframe`,{allowTransparency:!0,className:`chunk-mode relative z-20 w-full bg-background`,height:c.container?.height??450,onLoad:()=>{m(!1)},src:`/blocks/${c.name}`})]}),o(f,{className:i(`relative hidden w-3 bg-transparent p-0 after:absolute after:top-1/2 after:right-0 after:h-8 after:w-[6px] after:translate-x-[-1px] after:-translate-y-1/2 after:rounded-full after:bg-border after:transition-all after:hover:h-10 sm:block`,l&&`invisible`)}),o(d,{defaultSize:0,minSize:0})]})}),o(t,{value:`code`,children:o(`div`,{className:`w-full overflow-hidden rounded-md [&_pre]:my-0 [&_pre]:h-[--container-height] [&_pre]:overflow-auto [&_pre]:whitespace-break-spaces [&_pre]:p-6 [&_pre]:font-mono [&_pre]:text-sm [&_pre]:leading-relaxed`,dangerouslySetInnerHTML:{__html:c.highlightedCode},"data-rehype-pretty-code-fragment":!0})})]})}export{p as t};
|
|
2
|
-
//# sourceMappingURL=code-preview-DTVYDNkK.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"code-preview-DTVYDNkK.js","names":[],"sources":["../../registry-ui-duckui/src/resizable/resizable.tsx","../src/components/mdx/mdx-components/code/code-preview.tsx"],"sourcesContent":["'use client'\n\nimport { cn } from '@gentleduck/libs/cn'\nimport { GripVertical } from 'lucide-react'\nimport type * as React from 'react'\nimport * as ResizablePrimitive from 'react-resizable-panels'\n\nconst ResizablePanelGroup = ({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => (\n <ResizablePrimitive.PanelGroup\n className={cn('flex h-full w-full data-[panel-group-direction=vertical]:flex-col', className)}\n data-slot=\"panel-group\"\n {...props}\n />\n)\n\nconst ResizablePanel = ResizablePrimitive.Panel\n\nconst ResizableHandle = ({\n withHandle,\n className,\n ...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n withHandle?: boolean\n}) => (\n <ResizablePrimitive.PanelResizeHandle\n className={cn(\n 'relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90',\n className,\n )}\n data-slot=\"panel-resize-handle\"\n {...props}>\n {withHandle && (\n <div\n className=\"z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border\"\n data-slot=\"panel-handle\">\n <GripVertical className=\"h-2.5 w-2.5\" />\n </div>\n )}\n </ResizablePrimitive.PanelResizeHandle>\n)\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle }\n","'use client'\n\nimport { Icons } from '@duck-docs/components/icons'\nimport { useLiftMode } from '@duck-docs/hooks/use-lift-mode'\nimport { cn } from '@gentleduck/libs/cn'\nimport { ResizableHandle, ResizablePanel, ResizablePanelGroup } from '@gentleduck/registry-ui-duckui/resizable'\nimport { Tabs, TabsContent } from '@gentleduck/registry-ui-duckui/tabs'\nimport React from 'react'\nimport type { ImperativePanelHandle } from 'react-resizable-panels'\n\ntype Block = {\n name: string\n container?: {\n height?: number\n }\n highlightedCode: string\n}\n\nexport function CodePreview({ block }: { block: Block & { hasLiftMode: boolean } }) {\n const { isLiftMode } = useLiftMode(block.name)\n const [isLoading, setIsLoading] = React.useState(true)\n const ref = React.useRef<ImperativePanelHandle>(null)\n\n return (\n <Tabs\n className=\"relative grid w-full scroll-m-20 gap-4\"\n defaultValue=\"preview\"\n id={block.name}\n style={\n {\n '--container-height': block.container?.height,\n } as React.CSSProperties\n }>\n <TabsContent\n className=\"relative after:absolute after:inset-0 after:right-3 after:z-0 after:rounded-lg after:bg-muted\"\n value=\"preview\">\n <ResizablePanelGroup className=\"relative z-10\" direction=\"horizontal\">\n <ResizablePanel\n className={cn(\n 'relative rounded-lg border bg-background',\n isLiftMode ? 'border-border/50' : 'border-border',\n )}\n defaultSize={100}\n minSize={30}\n ref={ref}>\n {isLoading ? (\n <div className=\"absolute inset-0 z-10 flex h-[--container-height] w-full items-center justify-center gap-2 bg-background text-muted-foreground text-sm\">\n <Icons.spinner className=\"h-4 w-4 animate-spin\" />\n Loading...\n </div>\n ) : null}\n <iframe\n allowTransparency\n className=\"chunk-mode relative z-20 w-full bg-background\"\n height={block.container?.height ?? 450}\n onLoad={() => {\n setIsLoading(false)\n }}\n src={`/blocks/${block.name}`}\n />\n </ResizablePanel>\n <ResizableHandle\n className={cn(\n 'relative hidden w-3 bg-transparent p-0 after:absolute after:top-1/2 after:right-0 after:h-8 after:w-[6px] after:translate-x-[-1px] after:-translate-y-1/2 after:rounded-full after:bg-border after:transition-all after:hover:h-10 sm:block',\n isLiftMode && 'invisible',\n )}\n />\n <ResizablePanel defaultSize={0} minSize={0} />\n </ResizablePanelGroup>\n </TabsContent>\n <TabsContent value=\"code\">\n <div\n className=\"w-full overflow-hidden rounded-md [&_pre]:my-0 [&_pre]:h-[--container-height] [&_pre]:overflow-auto [&_pre]:whitespace-break-spaces [&_pre]:p-6 [&_pre]:font-mono [&_pre]:text-sm [&_pre]:leading-relaxed\"\n dangerouslySetInnerHTML={{ __html: block.highlightedCode }}\n data-rehype-pretty-code-fragment\n />\n </TabsContent>\n </Tabs>\n )\n}\n"],"mappings":"2UAOA,MAAM,GAAuB,CAAE,YAAW,GAAG,KAC3C,EAAC,EAAmB,WAAA,CAClB,UAAW,EAAG,oEAAqE,EAAU,CAC7F,YAAU,cACV,GAAI,GACJ,CAGE,EAAiB,EAAmB,MAEpC,GAAmB,CACvB,aACA,YACA,GAAG,KAIH,EAAC,EAAmB,kBAAA,CAClB,UAAW,EACT,4oBACA,EACD,CACD,YAAU,sBACV,GAAI,WACH,GACC,EAAC,MAAA,CACC,UAAU,4EACV,YAAU,wBACV,EAAC,EAAA,CAAa,UAAU,cAAA,CAAgB,EACpC,EAE6B,CCpBzC,SAAgB,EAAY,CAAE,SAAsD,CAClF,GAAM,CAAE,cAAe,EAAY,EAAM,KAAK,CACxC,CAAC,EAAW,GAAgB,EAAM,SAAS,GAAK,CAChD,EAAM,EAAM,OAA8B,KAAK,CAErD,OACE,EAAC,EAAA,CACC,UAAU,yCACV,aAAa,UACb,GAAI,EAAM,KACV,MACE,CACE,qBAAsB,EAAM,WAAW,OACxC,WAEH,EAAC,EAAA,CACC,UAAU,gGACV,MAAM,mBACN,EAAC,EAAA,CAAoB,UAAU,gBAAgB,UAAU,uBACvD,EAAC,EAAA,CACC,UAAW,EACT,2CACA,EAAa,mBAAqB,gBACnC,CACD,YAAa,IACb,QAAS,GACJ,gBACJ,EACC,EAAC,MAAA,CAAI,UAAU,mJACb,EAAC,EAAM,QAAA,CAAQ,UAAU,uBAAA,CAAyB,CAAA,aAAA,EAE9C,CACJ,KACJ,EAAC,SAAA,CACC,kBAAA,GACA,UAAU,gDACV,OAAQ,EAAM,WAAW,QAAU,IACnC,WAAc,CACZ,EAAa,GAAM,EAErB,IAAK,WAAW,EAAM,QACtB,CAAA,EACa,CACjB,EAAC,EAAA,CACC,UAAW,EACT,8OACA,GAAc,YACf,CAAA,CACD,CACF,EAAC,EAAA,CAAe,YAAa,EAAG,QAAS,GAAK,GAC1B,EACV,CACd,EAAC,EAAA,CAAY,MAAM,gBACjB,EAAC,MAAA,CACC,UAAU,4MACV,wBAAyB,CAAE,OAAQ,EAAM,gBAAiB,CAC1D,mCAAA,IACA,EACU,CAAA,EACT"}
|
package/dist/command-2PGkRCUM.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./dialog-BJXRFGlQ.js";import{t as n}from"./scroll-area-Bj8-58Fz.js";import{cn as r}from"@gentleduck/libs/cn";import i from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{Search as s}from"lucide-react";import{useKeyCommands as c}from"@gentleduck/vim/react";function l(e){e&&((e.hasAttribute(`duck-select-item`)||e.hasAttribute(`duck-command-item`))&&e.scrollIntoView({behavior:`smooth`,block:`nearest`}),e.setAttribute(`aria-selected`,``),e.focus())}function u(e){e&&(e.removeAttribute(`aria-selected`),e.blur())}function d(e,t,n){for(let r=0;r<t.current.length;r++){let i=t.current[r];u(i),r===e&&(l(i),n(i))}}function f(){let e=i.useContext(_);if(!e)throw Error(`useCommandContext must be used within a CommandProvider`);return e}function p(){let e=i.useContext(v);if(!e)throw Error(`useCommandContext must be used within a CommandProvider`);return e}function m(e){let t=i.useRef([]),n=i.useRef([]),r=i.useRef([]),a=i.useRef(null);return i.useEffect(()=>{if(!e.current)return;let i=e.current.querySelectorAll(`li[duck-command-item]`),o=e.current.querySelectorAll(`div[duck-command-group]`);t.current=Array.from(i),r.current=Array.from(o),n.current=t.current;for(let e=0;e<t.current.length;e++){let n=t.current[e];n.addEventListener(`mouseenter`,()=>{for(let e=0;e<t.current?.length;e++){let n=t.current[e];u(n)}l(n),a.current=n})}l(t.current[0]??null)},[]),{filteredItemsRef:n,groupsRef:r,itemsRef:t,selectedItemRef:a}}function h(e,t,n,r,a,o,s){i.useEffect(()=>{if(!a.current||e.current.length===0)return;let i=new Map;for(let n=0;n<e.current.length;n++){let r=e.current[n];r.textContent?.toLowerCase().includes(t.toLowerCase())?r.classList.remove(`hidden`):(r.classList.add(`hidden`),u(r),i.set(n.toString(),r))}i.size===e.current.length?(r.current?.classList.remove(`hidden`),n(null)):(r.current?.classList.add(`hidden`),n(e.current[0])),s.current=Array.from(a.current.querySelectorAll(`li[duck-command-item]:not(.hidden)`)),s.current.map(e=>u(e));for(let e=0;e<o.current.length;e++){let t=o.current[e],n=t.querySelectorAll(`li[duck-command-item]:not(.hidden)`),r=t.nextElementSibling,i=r?.hasAttribute(`duck-command-separator`);n.length===0?(t.classList.add(`hidden`),i&&r&&r.classList.add(`hidden`)):(t.classList.remove(`hidden`),i&&r&&r.classList.remove(`hidden`))}let c=s.current?.[0];l(c??null),n(c??null)},[t])}function g(e){let{open:t=!1,itemsRef:n,setSelectedItem:r,allowAxisArrowKeys:a=!1}=e,o=i.useRef(-1),s=i.useRef(-1),c=i.useRef(!1);i.useEffect(()=>{t||(o.current=-1,s.current=-1,c.current=!1)},[t]),i.useEffect(()=>{if(!t)return;function e(e){let t=n.current.length;if(t!==0){if(e.key===`ArrowDown`){if(e.preventDefault(),c.current)return;let i=o.current,a=i===-1||i===t-1?0:i+1;o.current=a,s.current=a,d(a,n,r);return}if(e.key===`ArrowUp`){if(e.preventDefault(),c.current)return;let i=o.current,a=i===-1||i===0?t-1:i-1;o.current=a,s.current=a,d(a,n,r);return}if(e.key===`Enter`){let t=o.current<0?0:o.current,i=n.current[t];if(!i)return;(i.hasAttribute(`duck-select-item`)||i.hasAttribute(`duck-command-item`))&&(e.preventDefault(),e.stopPropagation(),r(i),i.click());return}if(e.key===`Enter`||e.key===`Escape`){let e=o.current;if(e<0)return;n.current[e]?.hasAttribute(`duck-dropdown-menu-sub-trigger`)&&(c.current=!c.current)}if(a&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)){let t=s.current;if(t<0)return;let r=n.current[t];r?.hasAttribute(`duck-dropdown-menu-sub-trigger`)&&(e.preventDefault(),c.current=!c.current,r.click())}}}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t,n,r,a])}const _=i.createContext(null),v=i.createContext(null);function y({children:e}){let t=i.useRef(null),n=i.useRef(null),r=i.useRef(null),o=i.useRef(null),[s,c]=i.useState(null),{itemsRef:l,groupsRef:u,filteredItemsRef:d}=m(t);return a(v.Provider,{value:{commandRef:t,emptyRef:r,filteredItems:d,groups:u,inputRef:o,items:l,listRef:n,selectedItem:s,setSelectedItem:c},children:e})}function b({className:e,ref:t,...n}){let[o,s]=i.useState(``),{filteredItems:c,items:l,setSelectedItem:u,commandRef:d,groups:f,emptyRef:m,selectedItem:v}=p();return h(l,o,u,m,d,f,c),g({containerRef:d,allowAxisArrowKeys:!1,itemsRef:c,open:!0,originalItemsRef:l,selectedItem:v,setSelectedItem:e=>{u(e)}}),a(_.Provider,{value:{search:o,setSearch:s},children:a(`div`,{className:r(`flex h-full w-full max-w-96 flex-col overflow-hidden rounded-md bg-popover p-2 text-popover-foreground shadow-sm`,e),"data-slot":`command`,"duck-command-wrapper":``,ref:d,...n})})}function x({children:e,...t}){return a(y,{children:a(b,{...t,children:e})})}function S({className:e,placeholder:t=`Search...`,onChange:n,autoFocus:i=!0,...c}){let{setSearch:l}=f(),u=p();return o(`div`,{className:r(`mb-2 flex items-center gap-2 border-b px-1`,e),"data-slot":`command-input`,"duck-command-input":``,children:[a(s,{className:`size-[20px] shrink-0 opacity-50`}),a(`input`,{autoFocus:i,className:r(`flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`),onChange:e=>{l(()=>e.target.value),n?.(e)},placeholder:t,ref:u.inputRef,tabIndex:0,...c})]})}function C({className:e,...t}){return a(`h6`,{className:`hidden py-6 text-center text-sm`,ref:p().emptyRef,...t,"data-slot":`command-empty`,"duck-command-empty":``})}function w({className:e,...t}){let i=p();return a(n,{className:`overflow-y-auto overflow-x-hidden`,"data-slot":`command-list`,"duck-command-list":``,viewportClassName:`overflow-x-hidden`,children:a(`ul`,{className:r(`max-h-[300px] focus:outline-none`,e),ref:i.listRef,...t})})}function T({className:e,children:t,heading:n,ref:i,...s}){return o(`div`,{className:r(`overflow-hidden text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:text-sm`,e),ref:i,...s,"data-slot":`command-group`,"duck-command-group":``,children:[n&&a(`h3`,{className:`pb-1 pl-1 text-muted-foreground text-sm`,children:n}),t]})}function E({className:e,ref:t,value:n,onClick:i,onSelect:o,onKeyDown:s,...c}){return a(`li`,{className:r(`data-[selected= data-[disabled=true]:pointer-events-none'true']:bg-accent relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden transition-color duration-300 will-change-300 hover:bg-muted hover:text-accent-foreground data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&[aria-selected]]:bg-secondary [&_svg]:size-4`,e),"data-slot":`command-item`,"duck-command-item":``,onClick:e=>{o?.(n),i?.(e)},onKeyDown:s,ref:t,...c})}function D({className:e,keys:t,onKeysPressed:n,variant:i=`default`,ref:o,...s}){return t&&n&&c({[t]:{description:t,execute:()=>{n()},name:t}}),a(`kbd`,{className:r(`focus:offset-2 [&_svg]:!size-3 !font-sans pointer-events-none inline-flex cursor-none select-none items-center gap-[2px] rounded-[4px] px-2 py-[.12rem] text-secondary-foreground text-sm tracking-widest transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring ltr:ml-auto rtl:mr-auto`,i===`secondary`&&`bg-secondary`,e),"data-slot":`command-badge`,"duck-command-badge":``,ref:o,...s})}function O({className:e,ref:t,...n}){return a(`div`,{className:r(`-mx-1 my-2 h-px bg-secondary`,e),ref:t,...n,"data-slot":`command-separator`,"duck-command-separator":``})}function k({children:n,...r}){return a(t,{...r,children:a(e,{className:`h-[500px] p-0 lg:w-[650px] [&>div]:max-w-full`,children:a(x,{children:n})})})}export{E as a,D as c,u as d,l as f,S as i,p as l,C as n,w as o,T as r,O as s,k as t,g as u};
|
|
2
|
-
//# sourceMappingURL=command-2PGkRCUM.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command-2PGkRCUM.js","names":["i","item","CommandContext: React.Context<CommandContextType | null>","CommandRefsContext: React.Context<CommandRefsContextType | null>","Command"],"sources":["../../registry-ui-duckui/src/command/command.libs.ts","../../registry-ui-duckui/src/command/command.hooks.ts","../../registry-ui-duckui/src/command/command.tsx"],"sourcesContent":["/**\n * Function to style the selected item\n * @function styleItem\n * @param {HTMLLIElement} item\n * @returns {void}\n */\nexport function styleItem(item: HTMLLIElement | null): void {\n if (!item) return\n if (item.hasAttribute('duck-select-item') || item.hasAttribute('duck-command-item')) {\n item.scrollIntoView({ behavior: 'smooth', block: 'nearest' })\n }\n item.setAttribute('aria-selected', '')\n item.focus()\n}\n\n/**\n * Function to unstyle the selected item\n * @function dstyleItem\n * @param {HTMLLIElement} item\n * @returns {void}\n */\nexport function dstyleItem(item: HTMLLIElement | null): void {\n if (!item) return\n item.removeAttribute('aria-selected')\n item.blur()\n}\n\nexport function handleItemsSelection(\n currentItem: number,\n itemsRef: React.RefObject<HTMLLIElement[]>,\n setSelectedItem: (item: HTMLLIElement) => void,\n) {\n // This will remove the class from all filteredItems.and add it to the right one.\n for (let i = 0; i < itemsRef.current.length; i++) {\n const item = itemsRef.current[i] as HTMLLIElement\n dstyleItem(item)\n\n if (i === currentItem) {\n styleItem(item)\n setSelectedItem(item)\n }\n }\n}\n","import React from 'react'\nimport { CommandContext, CommandRefsContext } from './command'\nimport { dstyleItem, handleItemsSelection, styleItem } from './command.libs'\nimport type { CommandContextType, CommandRefsContextType } from './command.types'\n\n/**\n * Custom hook to access the CommandContext.\n *\n * @function useCommandContext\n * @returns {CommandContextType} The command context value.\n * @throws Will throw an error if the hook is used outside of a CommandProvider.\n */\nexport function useCommandContext(): CommandContextType {\n const context = React.useContext(CommandContext)\n if (!context) {\n throw new Error('useCommandContext must be used within a CommandProvider')\n }\n return context\n}\n\n/**\n * Custom hook to access the CommandRefsContext.\n *\n * @function useCommandRefsContext\n * @returns {CommandRefsContextType} The command refs context value.\n * @throws Will throw an error if the hook is used outside of a CommandProvider.\n */\nexport function useCommandRefsContext(): CommandRefsContextType {\n const context = React.useContext(CommandRefsContext)\n if (!context) {\n throw new Error('useCommandContext must be used within a CommandProvider')\n }\n return context\n}\n\nexport function useCommandElements(commandRef: React.RefObject<HTMLDivElement | null>) {\n const itemsRef = React.useRef<HTMLLIElement[]>([])\n const filteredItemsRef = React.useRef<HTMLLIElement[]>([])\n const groupsRef = React.useRef<HTMLDivElement[]>([])\n const selectedItemRef = React.useRef<HTMLLIElement | null>(null)\n\n React.useEffect(() => {\n if (!commandRef.current) return\n const _items = commandRef.current.querySelectorAll('li[duck-command-item]')\n const _groups = commandRef.current.querySelectorAll('div[duck-command-group]')\n itemsRef.current = Array.from(_items) as HTMLLIElement[]\n groupsRef.current = Array.from(_groups) as HTMLDivElement[]\n filteredItemsRef.current = itemsRef.current\n\n for (let i = 0; i < itemsRef.current.length; i++) {\n const item = itemsRef.current[i] as HTMLLIElement\n item.addEventListener('mouseenter', () => {\n for (let i = 0; i < itemsRef.current?.length; i++) {\n const item = itemsRef.current[i] as HTMLLIElement\n dstyleItem(item)\n }\n\n styleItem(item)\n selectedItemRef.current = item\n })\n }\n\n styleItem(itemsRef.current[0] ?? null)\n }, [])\n\n return { filteredItemsRef, groupsRef, itemsRef, selectedItemRef }\n}\n\nexport function useCommandSearch(\n itemsRef: React.RefObject<HTMLLIElement[]>,\n search: string,\n setSelectedItem: React.Dispatch<React.SetStateAction<HTMLLIElement | null>>,\n emptyRef: React.RefObject<HTMLHeadingElement | null>,\n commandRef: React.RefObject<HTMLDivElement | null>,\n groups: React.RefObject<HTMLDivElement[]>,\n filteredItems: React.RefObject<HTMLLIElement[]>,\n): void {\n React.useEffect(() => {\n if (!commandRef.current || itemsRef.current.length === 0) return\n const itemsHidden = new Map<string, HTMLLIElement>()\n\n // Hiding the items that don't match the search query\n for (let i = 0; i < itemsRef.current.length; i++) {\n const item = itemsRef.current[i] as HTMLLIElement\n\n if (item.textContent?.toLowerCase().includes(search.toLowerCase())) {\n item.classList.remove('hidden')\n } else {\n item.classList.add('hidden')\n dstyleItem(item)\n itemsHidden.set(i.toString(), item)\n }\n }\n\n // Toggling the empty message if all items are hidden\n if (itemsHidden.size === itemsRef.current.length) {\n emptyRef.current?.classList.remove('hidden')\n setSelectedItem(null)\n } else {\n emptyRef.current?.classList.add('hidden')\n setSelectedItem(itemsRef.current[0] as HTMLLIElement)\n }\n\n // Setting filteredItems to the items that are not hidden\n filteredItems.current = Array.from(commandRef.current.querySelectorAll('li[duck-command-item]:not(.hidden)'))\n // Clearing all the classes from the items\n filteredItems.current.map((item) => dstyleItem(item))\n\n // Toggling the groups if they have no items\n for (let i = 0; i < groups.current.length; i++) {\n const group = groups.current[i] as HTMLDivElement\n const groupItems = group.querySelectorAll('li[duck-command-item]:not(.hidden)') as NodeListOf<HTMLLIElement>\n const nextSeparator = group.nextElementSibling\n const hasSeparator = nextSeparator?.hasAttribute('duck-command-separator')\n\n if (groupItems.length === 0) {\n group.classList.add('hidden')\n // Hiding the separator if the group has no items\n if (hasSeparator && nextSeparator) nextSeparator.classList.add('hidden')\n } else {\n group.classList.remove('hidden')\n // Showing the separator if the group has items\n if (hasSeparator && nextSeparator) nextSeparator.classList.remove('hidden')\n }\n }\n\n // Styling the first item after search\n const item = filteredItems.current?.[0] as HTMLLIElement\n styleItem(item ?? null)\n setSelectedItem(item ?? null)\n }, [search])\n}\n\nexport function useHandleKeyDown(props: {\n containerRef: React.RefObject<HTMLDivElement | null>\n open?: boolean\n itemsRef: React.RefObject<HTMLLIElement[]>\n selectedItem: HTMLLIElement | null\n setSelectedItem: (item: HTMLLIElement) => void\n originalItemsRef: React.RefObject<HTMLLIElement[]>\n allowAxisArrowKeys?: boolean\n}) {\n const { open = false, itemsRef, setSelectedItem, allowAxisArrowKeys = false } = props\n\n const currentRef = React.useRef(-1)\n const originalRef = React.useRef(-1)\n const inSubMenuRef = React.useRef(false)\n\n // Always reset when closed\n React.useEffect(() => {\n if (!open) {\n currentRef.current = -1\n originalRef.current = -1\n inSubMenuRef.current = false\n }\n }, [open])\n\n React.useEffect(() => {\n if (!open) return\n\n function handleKeyDown(e: KeyboardEvent) {\n const n = itemsRef.current.length\n if (n === 0) return\n\n if (e.key === 'ArrowDown') {\n e.preventDefault()\n if (inSubMenuRef.current) return\n\n const cur = currentRef.current\n const next = cur === -1 ? 0 : cur === n - 1 ? 0 : cur + 1\n\n currentRef.current = next\n originalRef.current = next\n handleItemsSelection(next, itemsRef, setSelectedItem)\n return\n }\n\n if (e.key === 'ArrowUp') {\n e.preventDefault()\n if (inSubMenuRef.current) return\n\n const cur = currentRef.current\n const next = cur === -1 ? n - 1 : cur === 0 ? n - 1 : cur - 1\n\n currentRef.current = next\n originalRef.current = next\n handleItemsSelection(next, itemsRef, setSelectedItem)\n return\n }\n\n if (e.key === 'Enter') {\n const cur = currentRef.current < 0 ? 0 : currentRef.current\n\n const item = itemsRef.current[cur]\n if (!item) return\n\n if (item.hasAttribute('duck-select-item') || item.hasAttribute('duck-command-item')) {\n e.preventDefault()\n e.stopPropagation()\n setSelectedItem(item)\n item.click()\n }\n return\n }\n\n if (e.key === 'Enter' || e.key === 'Escape') {\n const cur = currentRef.current\n if (cur < 0) return\n const item = itemsRef.current[cur]\n if (item?.hasAttribute('duck-dropdown-menu-sub-trigger')) {\n inSubMenuRef.current = !inSubMenuRef.current\n }\n }\n\n if (allowAxisArrowKeys && (e.key === 'ArrowLeft' || e.key === 'ArrowRight')) {\n const cur = originalRef.current\n if (cur < 0) return\n const item = itemsRef.current[cur]\n if (item?.hasAttribute('duck-dropdown-menu-sub-trigger')) {\n e.preventDefault()\n inSubMenuRef.current = !inSubMenuRef.current\n item.click()\n }\n }\n }\n\n document.addEventListener('keydown', handleKeyDown)\n return () => document.removeEventListener('keydown', handleKeyDown)\n }, [open, itemsRef, setSelectedItem, allowAxisArrowKeys])\n}\n","'use client'\n\nimport { cn } from '@gentleduck/libs/cn'\nimport { useKeyCommands } from '@gentleduck/vim/react'\nimport { Search } from 'lucide-react'\nimport React from 'react'\nimport { Dialog, DialogContent } from '../dialog'\nimport { ScrollArea } from '../scroll-area'\nimport {\n useCommandContext,\n useCommandElements,\n useCommandRefsContext,\n useCommandSearch,\n useHandleKeyDown,\n} from './command.hooks'\nimport type { CommandBadgeProps, CommandContextType, CommandRefsContextType } from './command.types'\n\nexport const CommandContext: React.Context<CommandContextType | null> = React.createContext<CommandContextType | null>(\n null,\n)\n\nexport const CommandRefsContext: React.Context<CommandRefsContextType | null> =\n React.createContext<CommandRefsContextType | null>(null)\n\nfunction CommandRefs({ children }: { children: React.ReactNode }): React.JSX.Element {\n const commandRef = React.useRef<HTMLDivElement | null>(null)\n const listRef = React.useRef<HTMLUListElement | null>(null)\n const emptyRef = React.useRef<HTMLHeadingElement | null>(null)\n const inputRef = React.useRef<HTMLInputElement | null>(null)\n\n const [selectedItem, setSelectedItem] = React.useState<HTMLLIElement | null>(null)\n const { itemsRef, groupsRef, filteredItemsRef } = useCommandElements(commandRef)\n\n return (\n <CommandRefsContext.Provider\n value={{\n commandRef,\n emptyRef,\n filteredItems: filteredItemsRef,\n groups: groupsRef,\n inputRef,\n items: itemsRef,\n listRef,\n selectedItem,\n setSelectedItem,\n }}>\n {children}\n </CommandRefsContext.Provider>\n )\n}\n\nfunction CommandWrapper({ className, ref, ...props }: React.HTMLProps<HTMLDivElement>): React.JSX.Element {\n const [search, setSearch] = React.useState<string>('')\n const { filteredItems, items, setSelectedItem, commandRef, groups, emptyRef, selectedItem } = useCommandRefsContext()\n\n useCommandSearch(items, search, setSelectedItem, emptyRef, commandRef, groups, filteredItems)\n useHandleKeyDown({\n containerRef: commandRef,\n allowAxisArrowKeys: false,\n itemsRef: filteredItems,\n open: true,\n originalItemsRef: items,\n selectedItem: selectedItem,\n setSelectedItem: (item) => {\n setSelectedItem(item)\n },\n })\n\n return (\n <CommandContext.Provider\n value={{\n search,\n setSearch,\n }}>\n <div\n className={cn(\n 'flex h-full w-full max-w-96 flex-col overflow-hidden rounded-md bg-popover p-2 text-popover-foreground shadow-sm',\n className,\n )}\n data-slot=\"command\"\n duck-command-wrapper=\"\"\n ref={commandRef}\n {...props}\n />\n </CommandContext.Provider>\n )\n}\n\nfunction Command({ children, ...props }: React.ComponentPropsWithRef<typeof CommandWrapper>): React.JSX.Element {\n return (\n <CommandRefs>\n <CommandWrapper {...props}>{children}</CommandWrapper>\n </CommandRefs>\n )\n}\n\nfunction CommandInput({\n className,\n placeholder = 'Search...',\n onChange,\n autoFocus = true,\n ...props\n}: React.HTMLProps<HTMLInputElement>): React.JSX.Element {\n const { setSearch } = useCommandContext()\n const context = useCommandRefsContext()\n\n return (\n <div\n className={cn('mb-2 flex items-center gap-2 border-b px-1', className)}\n data-slot=\"command-input\"\n duck-command-input=\"\">\n <Search className=\"size-[20px] shrink-0 opacity-50\" />\n <input\n autoFocus={autoFocus}\n className={cn(\n 'flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',\n )}\n onChange={(e) => {\n setSearch(() => e.target.value)\n onChange?.(e)\n }}\n placeholder={placeholder}\n ref={context.inputRef}\n tabIndex={0}\n {...props}\n />\n </div>\n )\n}\n\nfunction CommandEmpty({ className, ...props }: React.HTMLAttributes<HTMLHeadingElement>): React.JSX.Element {\n const context = useCommandRefsContext()\n return (\n <h6\n className=\"hidden py-6 text-center text-sm\"\n ref={context.emptyRef}\n {...props}\n data-slot=\"command-empty\"\n duck-command-empty=\"\"\n />\n )\n}\n\nfunction CommandList({ className, ...props }: React.HTMLAttributes<HTMLUListElement>): React.JSX.Element {\n const context = useCommandRefsContext()\n return (\n <ScrollArea\n className=\"overflow-y-auto overflow-x-hidden\"\n data-slot=\"command-list\"\n duck-command-list=\"\"\n viewportClassName=\"overflow-x-hidden\">\n <ul className={cn('max-h-[300px] focus:outline-none', className)} ref={context.listRef} {...props} />\n </ScrollArea>\n )\n}\n\nfunction CommandGroup({\n className,\n children,\n heading,\n ref,\n ...props\n}: React.HTMLProps<HTMLDivElement> & {\n /** The title for the command group. */\n heading?: string\n}): React.JSX.Element {\n return (\n <div\n className={cn(\n 'overflow-hidden text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:text-sm',\n className,\n )}\n ref={ref}\n {...props}\n data-slot=\"command-group\"\n duck-command-group=\"\">\n {heading && <h3 className=\"pb-1 pl-1 text-muted-foreground text-sm\">{heading}</h3>}\n {children}\n </div>\n )\n}\n\nfunction CommandItem({\n className,\n ref,\n value,\n onClick,\n onSelect,\n onKeyDown,\n ...props\n}: Omit<React.HTMLProps<HTMLLIElement>, 'onSelect'> & {\n value?: string\n onSelect?: (value: string) => void\n}): React.JSX.Element {\n return (\n <li\n className={cn(\n \"data-[selected= data-[disabled=true]:pointer-events-none'true']:bg-accent relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden transition-color duration-300 will-change-300 hover:bg-muted hover:text-accent-foreground data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&[aria-selected]]:bg-secondary [&_svg]:size-4\",\n className,\n )}\n data-slot=\"command-item\"\n duck-command-item=\"\"\n onClick={(e) => {\n onSelect?.(value as string)\n onClick?.(e)\n }}\n onKeyDown={onKeyDown}\n ref={ref}\n {...props}\n />\n )\n}\n\nfunction CommandShortcut({\n className,\n keys,\n onKeysPressed,\n variant = 'default',\n ref,\n ...props\n}: CommandBadgeProps): React.JSX.Element {\n if (keys && onKeysPressed) {\n useKeyCommands({\n [keys]: {\n description: keys,\n execute: () => {\n onKeysPressed()\n },\n name: keys,\n },\n })\n }\n\n return (\n <kbd\n className={cn(\n 'focus:offset-2 [&_svg]:!size-3 !font-sans pointer-events-none inline-flex cursor-none select-none items-center gap-[2px] rounded-[4px] px-2 py-[.12rem] text-secondary-foreground text-sm tracking-widest transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring ltr:ml-auto rtl:mr-auto',\n variant === 'secondary' && 'bg-secondary',\n className,\n )}\n data-slot=\"command-badge\"\n duck-command-badge=\"\"\n ref={ref}\n {...props}\n />\n )\n}\n\nfunction CommandSeparator({ className, ref, ...props }: React.HTMLProps<HTMLDivElement>): React.JSX.Element {\n return (\n <div\n className={cn('-mx-1 my-2 h-px bg-secondary', className)}\n ref={ref}\n {...props}\n data-slot=\"command-separator\"\n duck-command-separator=\"\"\n />\n )\n}\n\nfunction CommandDialog({ children, ...props }: React.ComponentPropsWithRef<typeof Dialog>): React.JSX.Element {\n return (\n <Dialog {...props}>\n <DialogContent className=\"h-[500px] p-0 lg:w-[650px] [&>div]:max-w-full\">\n <Command>{children}</Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nexport {\n Command,\n CommandInput,\n CommandList,\n CommandGroup,\n CommandItem,\n CommandEmpty,\n CommandShortcut,\n CommandSeparator,\n CommandDialog,\n}\n"],"mappings":"sSAMA,SAAgB,EAAU,EAAkC,CACrD,KACD,EAAK,aAAa,mBAAmB,EAAI,EAAK,aAAa,oBAAoB,GACjF,EAAK,eAAe,CAAE,SAAU,SAAU,MAAO,UAAW,CAAC,CAE/D,EAAK,aAAa,gBAAiB,GAAG,CACtC,EAAK,OAAO,EASd,SAAgB,EAAW,EAAkC,CACtD,IACL,EAAK,gBAAgB,gBAA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CAAG,UAAU,mDAA2C,GAAa,CACjF,EAAA,EACG,CAIV,SAAS,EAAY,CACnB,YACA,MACA,QACA,UACA,WACA,YACA,GAAG,GAIiB,CACpB,OACE,EAAC,KAAA,CACC,UAAW,EACT,2YACA,EACD,CACD,YAAU,eACV,oBAAkB,GAClB,QAAU,GAAM,CACd,IAAW,EAAgB,CAC3B,IAAU,EAAE,EAEH,YACN,MACL,GAAI,GACJ,CAIN,SAAS,EAAgB,CACvB,YACA,OACA,gBACA,UAAU,UACV,MACA,GAAG,GACoC,CAavC,OAZI,GAAQ,GACV,EAAe,EACZ,GAAO,CACN,YAAa,EACb,YAAe,CACb,GAAe,EAEjB,KAAM,EACP,CACF,CAAC,CAIF,EAAC,MAAA,CACC,UAAW,EACT,wSACA,IAAY,aAAe,eAC3B,EACD,CACD,YAAU,gBACV,qBAAmB,GACd,MACL,GAAI,GACJ,CAIN,SAAS,EAAiB,CAAE,YAAW,MAAK,GAAG,GAA6D,CAC1G,OACE,EAAC,MAAA,CACC,UAAW,EAAG,+BAAgC,EAAU,CACnD,MACL,GAAI,EACJ,YAAU,oBACV,yBAAuB,IACvB,CAIN,SAAS,EAAc,CAAE,WAAU,GAAG,GAAwE,CAC5G,OACE,EAAC,EAAA,CAAO,GAAI,WACV,EAAC,EAAA,CAAc,UAAU,yDACvB,EAACA,EAAAA,CAAS,WAAA,CAAmB,EACf,EACT"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./button-Ao0Egplu.js";import{a as t,c as n,i as r,l as i,n as a,o,r as s,s as c,t as l}from"./command-2PGkRCUM.js";import{t as u}from"./separator-t0JrmyLj.js";import{n as d}from"./context-CibrcgaK.js";import{cn as f}from"@gentleduck/libs/cn";import*as p from"react";import{Fragment as m,jsx as h,jsxs as g}from"react/jsx-runtime";import{Circle as _,Command as v,CornerDownLeft as y,FileIcon as b,Moon as x,Sun as S}from"lucide-react";import{useKeyCommands as C}from"@gentleduck/vim/react";import{useRouter as w}from"next/navigation";import{useTheme as T}from"next-themes";function E(){let i=w(),[u,y]=p.useState(!1),{setTheme:C}=T(),E=d(),O=p.useRef(null),k=[...E.sidebarNav.map(e=>({items:e.items?.map(e=>({action:()=>i.push(e.href),icon:h(_,{className:`mr-2 h-3 w-3`}),name:e.title})),title:e.title})),{items:[{action:()=>C(`light`),icon:h(S,{className:`mr-2 h-4 w-4`}),name:`Light`},{action:()=>C(`dark`),icon:h(x,{className:`mr-2 h-4 w-4`}),name:`Dark`},{action:()=>C(`system`),icon:h(b,{className:`mr-2 h-4 w-4`}),name:`System`}],title:`Theme`}];return g(m,{children:[g(e,{className:f(`relative h-8 w-full bg-muted/50 text-muted-foreground text-sm shadow-none md:w-40 lg:w-64 ltr:pr-2 rtl:pl-2 [&>div]:w-full [&>div]:justify-between`),onClick:()=>y(!0),size:`sm`,variant:`outline`,children:[h(`span`,{className:`hidden lg:inline-flex`,children:`Search documentation...`}),h(`span`,{className:`inline-flex lg:hidden`,children:`Search...`}),g(n,{className:`bg-secondary`,keys:`ctrl+k`,onKeysPressed:()=>{y(!u),window.event?.preventDefault()},children:[h(v,{className:`!size-3`}),h(`span`,{className:`text-md`,children:`K`})]})]}),g(l,{onOpenChange:y,open:u,children:[h(r,{autoFocus:!0,placeholder:`Search...`}),h(a,{children:`No results found.`}),h(o,{className:`h-[550px] max-h-full w-90 md:w-full`,children:k.map((e,n)=>g(p.Fragment,{children:[h(s,{heading:e.title,children:e.items?.map(e=>g(t,{id:e.name,onClick:()=>{y(!1),e.action(),O.current?.scrollTo(0,0),O.current?.scrollIntoView({behavior:`smooth`,block:`start`,inline:`start`})},children:[e.icon,h(`span`,{children:e.name})]},e.name))}),n!==k.length-1&&h(c,{})]},e.title))}),h(D,{})]})]})}function D(){let{selectedItem:t}=i(),n=d().sidebarNav.flatMap(e=>e.items??[]).find(e=>e.title===t?.innerText);return C({"ctrl+shift+c":{description:`Copy command`,execute:()=>navigator.clipboard.writeText(`bunx @gentleduck/cli add `+t?.innerText.toLowerCase().replace(/ /g,`-`)),name:`ctrl+shift+c`}}),h(`div`,{className:`hidden w-full items-center justify-between gap-4 border-t px-2 pt-2 lg:flex`,children:g(`div`,{className:`flex w-full items-center justify-between gap-4`,children:[t?.innerText&&g(e,{className:f(`px-2`),size:`sm`,variant:`outline`,children:[h(y,{}),h(u,{className:`m-0 h-4 p-0`,orientation:`vertical`}),t?.innerText]}),t?.innerText&&n?.title?g(e,{className:f(`px-2`),size:`sm`,variant:`outline`,children:[g(`div`,{className:`flex items-center gap-1`,children:[h(v,{className:`!size-3`}),h(`p`,{className:`text-md`,children:`C`})]}),h(u,{className:`m-0 h-4 p-0`,orientation:`vertical`}),g(`div`,{className:`flex items-center gap-1`,children:[h(`span`,{children:`bunx @gentleduck/cli add`}),h(`span`,{className:`text-blue-400`,children:n.title.toLowerCase()})]})]}):g(`p`,{className:`my-auto h-fit w-full whitespace-nowrap text-right text-muted-foreground text-sm`,children:[h(`span`,{className:`whitespace-nowrap font-medium text-sm`,children:`Command palette`}),` for the documentation content.`]})]})})}export{E as t};
|
|
2
|
-
//# sourceMappingURL=command-menu-Db8sDulu.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command-menu-Db8sDulu.js","names":["React"],"sources":["../src/components/layouts/command-menu/command-menu.tsx"],"sourcesContent":["'use client'\n\nimport { useDocsConfig } from '@duck-docs/context'\nimport { cn } from '@gentleduck/libs/cn'\nimport { Button } from '@gentleduck/registry-ui-duckui/button'\nimport {\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n useCommandRefsContext,\n} from '@gentleduck/registry-ui-duckui/command'\nimport { Separator } from '@gentleduck/registry-ui-duckui/separator'\nimport { useKeyCommands } from '@gentleduck/vim/react'\nimport { Circle, Command, CornerDownLeft, FileIcon, Moon, Sun } from 'lucide-react'\nimport { useRouter } from 'next/navigation'\nimport { useTheme } from 'next-themes'\nimport * as React from 'react'\n\nexport function CommandMenu() {\n const router = useRouter()\n const [open, setOpen] = React.useState(false)\n const { setTheme } = useTheme()\n const docsConfig = useDocsConfig()\n\n const groupRef = React.useRef<HTMLUListElement>(null)\n const items = [\n ...docsConfig.sidebarNav.map((group) => ({\n items: group.items?.map((navItem) => ({\n action: () => router.push(navItem.href as string),\n icon: <Circle className=\"mr-2 h-3 w-3\" />,\n name: navItem.title,\n })),\n title: group.title,\n })),\n {\n items: [\n {\n action: () => setTheme('light'),\n icon: <Sun className=\"mr-2 h-4 w-4\" />,\n name: 'Light',\n },\n {\n action: () => setTheme('dark'),\n icon: <Moon className=\"mr-2 h-4 w-4\" />,\n name: 'Dark',\n },\n {\n action: () => setTheme('system'),\n icon: <FileIcon className=\"mr-2 h-4 w-4\" />,\n name: 'System',\n },\n ],\n title: 'Theme',\n },\n ]\n\n return (\n <>\n <Button\n className={cn(\n 'relative h-8 w-full bg-muted/50 text-muted-foreground text-sm shadow-none md:w-40 lg:w-64 ltr:pr-2 rtl:pl-2 [&>div]:w-full [&>div]:justify-between',\n )}\n onClick={() => setOpen(true)}\n size={'sm'}\n variant=\"outline\">\n <span className=\"hidden lg:inline-flex\">Search documentation...</span>\n <span className=\"inline-flex lg:hidden\">Search...</span>\n <CommandShortcut\n className=\"bg-secondary\"\n keys={'ctrl+k'}\n onKeysPressed={() => {\n setOpen(!open)\n window.event?.preventDefault()\n }}>\n <Command className=\"!size-3\" />\n <span className=\"text-md\">K</span>\n </CommandShortcut>\n </Button>\n <CommandDialog onOpenChange={setOpen} open={open}>\n <CommandInput autoFocus placeholder=\"Search...\" />\n <CommandEmpty>No results found.</CommandEmpty>\n <CommandList className=\"h-[550px] max-h-full w-90 md:w-full\">\n {items.map((group, idx) => (\n <React.Fragment key={group.title}>\n <CommandGroup heading={group.title}>\n {group.items?.map((item) => (\n <CommandItem\n id={item.name}\n key={item.name}\n onClick={() => {\n setOpen(false)\n item.action()\n groupRef.current?.scrollTo(0, 0)\n groupRef.current?.scrollIntoView({\n behavior: 'smooth',\n block: 'start',\n inline: 'start',\n })\n }}>\n {item.icon}\n <span>{item.name}</span>\n </CommandItem>\n ))}\n </CommandGroup>\n {idx !== items.length - 1 && <CommandSeparator />}\n </React.Fragment>\n ))}\n </CommandList>\n <CommandFooter />\n </CommandDialog>\n </>\n )\n}\n\nfunction CommandFooter() {\n const { selectedItem } = useCommandRefsContext()\n const docsConfig = useDocsConfig()\n const sidebarItems = docsConfig.sidebarNav.flatMap((group) => group.items ?? [])\n const selectedNavItem = sidebarItems.find((item) => item.title === selectedItem?.innerText)\n useKeyCommands({\n 'ctrl+shift+c': {\n description: 'Copy command',\n execute: () =>\n navigator.clipboard.writeText(\n ('bunx @gentleduck/cli add ' + selectedItem?.innerText.toLowerCase().replace(/ /g, '-')) as string,\n ),\n name: 'ctrl+shift+c',\n },\n })\n return (\n <div className=\"hidden w-full items-center justify-between gap-4 border-t px-2 pt-2 lg:flex\">\n <div className=\"flex w-full items-center justify-between gap-4\">\n {selectedItem?.innerText && (\n <Button className={cn('px-2')} size={'sm'} variant={'outline'}>\n <CornerDownLeft />\n <Separator className=\"m-0 h-4 p-0\" orientation=\"vertical\" />\n {selectedItem?.innerText}\n </Button>\n )}\n {selectedItem?.innerText && selectedNavItem?.title ? (\n <Button className={cn('px-2')} size={'sm'} variant={'outline'}>\n <div className=\"flex items-center gap-1\">\n <Command className=\"!size-3\" />\n <p className=\"text-md\">C</p>\n </div>\n <Separator className=\"m-0 h-4 p-0\" orientation=\"vertical\" />\n <div className=\"flex items-center gap-1\">\n <span>bunx @gentleduck/cli add</span>\n <span className=\"text-blue-400\">{selectedNavItem.title.toLowerCase()}</span>\n </div>\n </Button>\n ) : (\n <p className=\"my-auto h-fit w-full whitespace-nowrap text-right text-muted-foreground text-sm\">\n <span className=\"whitespace-nowrap font-medium text-sm\">Command palette</span> for the documentation\n content.\n </p>\n )}\n </div>\n </div>\n )\n}\n"],"mappings":"+kBAuBA,SAAgB,GAAc,CAC5B,IAAM,EAAS,GA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S,oBAClD,EAAC,MAAA,CAAI,UAAU,oCACb,EAAC,EAAA,CAAQ,UAAU,UAAA,CAAY,CAC/B,EAAC,IAAA,CAAE,UAAU,mBAAU,KAAK,CAAA,EACxB,CACN,EAAC,EAAA,CAAU,UAAU,cAAc,YAAY,YAAa,CAC5D,EAAC,MAAA,CAAI,UAAU,oCACb,EAAC,OAAA,CAAA,SAAK,2BAAA,CAA+B,CACrC,EAAC,OAAA,CAAK,UAAU,yBAAiB,EAAgB,MAAM,aAAa,EAAQ,CAAA,EACxE,GACC,CAET,EAAC,IAAA,CAAE,UAAU,4FACX,EAAC,OAAA,CAAK,UAAU,iDAAwC,mBAAsB,CAAA,kCAAA,EAE5E,CAAA,EAEF,EACF"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime50 from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
//#region src/components/layouts/command-menu/command-menu.d.ts
|
|
4
|
-
declare function CommandMenu(): react_jsx_runtime50.JSX.Element;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { CommandMenu as t };
|
|
7
|
-
//# sourceMappingURL=command-menu-DtpwoKe8.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command-menu-DtpwoKe8.d.ts","names":[],"sources":["../src/components/layouts/command-menu/command-menu.tsx"],"sourcesContent":[],"mappings":";;;iBAuBgB,WAAA,CAAA,GAAW,mBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component-preview-D2UaIsBZ.d.ts","names":[],"sources":["../src/components/mdx/mdx-components/code/component-preview.tsx"],"sourcesContent":[],"mappings":";;;;UAUU,qBAAA,SAA8B,OAAA,CAAM,eAAe;;;EAAnD,mBAAA,CAAA,EAAA,MAAsB;EAUhB,KAAA,CAAA,EAAA,QAAA,GAAgB,OAAA,GAAA,KAAA;EAC9B,WAAA,CAAA,EAAA,MAAA;EACA,QAAA,CAAA,EAAA,OAAA;EACA,YAAA,CAAA,EAAA,OAAA;;AAEA,iBALc,gBAAA,CAKd;EAAA,IAAA;EAAA,QAAA;EAAA,SAAA;EAAA,gBAAA;EAAA,mBAAA;EAAA,KAAA;EAAA,WAAA;EAAA,QAAA;EAAA,YAAA;EAAA,GAAA;AAAA,CAAA,EAMC,qBAND,CAAA,EAMsB,mBAAA,CAAA,GAAA,CAAA,OANtB;AACA,cA6FW,QA7FX,EAAA,GAAA,GA6FmB,mBAAA,CAAA,GAAA,CAAA,OA7FnB;AACA,cA+GW,IA/GX,EAAA;EACA,IAAA,EAAA,MAAA;EACA,KAAA,EAAA,MAAA;CAEC,EAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./button-Ao0Egplu.js";import{t}from"./copy-button-DZizVQ8G.js";import{a as n}from"./context-CibrcgaK.js";import{i as r,n as i,r as a,t as o}from"./tabs-jsmxQQW0.js";import{cn as s}from"@gentleduck/libs/cn";import*as c from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{Crown as d}from"lucide-react";function f({name:e,children:d,className:f,extractClassname:h,extractedClassNames:g,align:_=`center`,description:v,hideCode:y=!1,showSettings:b=!1,...x}){let S=c.Children.toArray(d)[0],C=n(),w=c.useMemo(()=>{if(!C)return l(`p`,{className:`text-muted-foreground text-sm`,children:`Registry index is not configured for this docs app.`});let t=C[e]?.component;return t?l(t,{}):u(`p`,{className:`text-muted-foreground text-sm`,children:[`Component `,l(`code`,{className:`relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm`,children:e}),` `,`not found in registry.`]})},[e,C]),T=c.useMemo(()=>{if(S?.props[`data-rehype-pretty-code-fragment`]!==void 0){let e=c.Children.toArray(S.props.children);return e[1]?.props?.value||e[1]?.props?.__rawString__||null}},[S]);return l(`div`,{className:s(`group relative my-4 flex flex-col [&_div[data-slot="placeholder"]]:h-[512px]`,f),...x,children:u(o,{className:`relative mr-auto w-full`,defaultValue:`preview`,children:[l(`div`,{className:`flex items-center justify-between`,children:!y&&l(a,{className:`w-full justify-start overflow-x-auto rounded-none border-b bg-transparent p-0 [&_button]:shadow-none`,children:m.map((e,t)=>l(r,{className:`cursor-pointer rounded-none border-b-[2px] border-b-transparent px-12 py-2 [&[aria-selected='true']]:border-b-primary [&[aria-selected='true']]:shadow-none [&_input]:focus-visible:shadow-none [&_input]:focus-visible:ring-transparent [&_input]:focus-visible:ring-offset-0`,value:e.value,children:e.name},t))})}),u(i,{className:`relative min-w-2/5 rounded-md border`,value:`preview`,children:[u(`div`,{className:`absolute flex w-full items-center justify-between p-4`,children:[l(`span`,{className:`text-muted-foreground text-sm`}),l(`div`,{className:`flex items-center gap-2`,children:l(t,{value:T,variant:`outline`})})]}),l(`div`,{className:s(`preview flex h-[500px] w-full justify-center overflow-auto p-10`,{"items-center":_===`center`,"items-end":_===`end`,"items-start":_===`start`}),"duck-preview":``,children:w})]}),l(i,{className:`[&_[data-rehype-pretty-code-fragment]]:!m-0 relative mt-2 [&>div>div>button]:top-3 [&>div>div>button]:right-3 [&>div>div]:mb-0 [&>div]:rounded-lg [&>div]:border [&>div]:bg-muted/40 [&_pre]:h-[502px]`,value:`code`,children:S}),l(p,{})]})})}const p=()=>u(i,{className:`relative overflow-hidden`,value:`build`,children:[l(`div`,{className:`h-[500px] overflow-hidden rounded-lg`,children:l(`img`,{alt:`build`,className:`object-cover`,src:`/builder.png`})}),l(`div`,{className:`absolute inset-0 top-0 left-0 flex h-[500px] flex-col items-center justify-center gap-4 rounded-md bg-zinc-700/10 px-4 py-2 backdrop-blur-sm dark:bg-zinc-700/50`,children:l(`div`,{className:`flex items-center gap-4`,children:u(e,{className:`rounded-sm font-bold`,size:`sm`,children:[l(d,{}),l(`span`,{children:`Coming soon`})]})})})]}),m=[{name:`Preview`,value:`preview`},{name:`Code`,value:`code`}];export{f as n,m as r,p as t};
|
|
2
|
-
//# sourceMappingURL=component-preview-InhzN4h1.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component-preview-InhzN4h1.js","names":["React","Button"],"sources":["../src/components/mdx/mdx-components/code/component-preview.tsx"],"sourcesContent":["'use client'\n\nimport { CopyButton } from '@duck-docs/components/copy-button'\nimport { useRegistryIndex } from '@duck-docs/context'\nimport { cn } from '@gentleduck/libs/cn'\nimport { Button } from '@gentleduck/registry-ui-duckui/button'\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from '@gentleduck/registry-ui-duckui/tabs'\nimport { Crown } from 'lucide-react'\nimport * as React from 'react'\n\ninterface ComponentPreviewProps extends React.HTMLAttributes<HTMLDivElement> {\n name: string\n extractClassname?: boolean\n extractedClassNames?: string\n align?: 'center' | 'start' | 'end'\n description?: string\n hideCode?: boolean\n showSettings?: boolean\n}\n\nexport function ComponentPreview({\n name,\n children,\n className,\n extractClassname,\n extractedClassNames,\n align = 'center',\n description,\n hideCode = false,\n showSettings = false,\n ...props\n}: ComponentPreviewProps) {\n const Codes = React.Children.toArray(children) as React.ReactElement[]\n const Code = Codes[0]\n const registryIndex = useRegistryIndex()\n\n const Preview = React.useMemo(() => {\n if (!registryIndex) {\n return <p className=\"text-muted-foreground text-sm\">Registry index is not configured for this docs app.</p>\n }\n\n const Component = registryIndex[name]?.component\n\n if (!Component) {\n return (\n <p className=\"text-muted-foreground text-sm\">\n Component <code className=\"relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm\">{name}</code>{' '}\n not found in registry.\n </p>\n )\n }\n\n return <Component />\n }, [name, registryIndex])\n\n const codeString = React.useMemo(() => {\n if (\n // ! FIX:\n // @ts-ignore 'Code.props' is of type 'unknown'.ts(18046)\n typeof Code?.props['data-rehype-pretty-code-fragment'] !== 'undefined'\n ) {\n const Button = React.Children.toArray(\n // ! FIX:\n // @ts-expect-error Property 'children' does not exist on type '{}'.ts(2339)\n Code.props.children,\n ) as React.ReactElement[]\n // ! FIX:\n // @ts-expect-error Property '__rawString__' does not exist on type '{}'.ts(2339)\n return Button[1]?.props?.value || Button[1]?.props?.__rawString__ || null\n }\n }, [Code])\n\n return (\n <div\n className={cn('group relative my-4 flex flex-col [&_div[data-slot=\"placeholder\"]]:h-[512px]', className)}\n {...props}>\n <Tabs className=\"relative mr-auto w-full\" defaultValue=\"preview\">\n <div className=\"flex items-center justify-between\">\n {!hideCode && (\n <TabsList className=\"w-full justify-start overflow-x-auto rounded-none border-b bg-transparent p-0 [&_button]:shadow-none\">\n {TABS.map((tab, idx) => (\n <TabsTrigger\n className=\"cursor-pointer rounded-none border-b-[2px] border-b-transparent px-12 py-2 [&[aria-selected='true']]:border-b-primary [&[aria-selected='true']]:shadow-none [&_input]:focus-visible:shadow-none [&_input]:focus-visible:ring-transparent [&_input]:focus-visible:ring-offset-0\"\n key={idx}\n value={tab.value}>\n {tab.name}\n </TabsTrigger>\n ))}\n </TabsList>\n )}\n </div>\n <TabsContent className=\"relative min-w-2/5 rounded-md border\" value=\"preview\">\n <div className=\"absolute flex w-full items-center justify-between p-4\">\n <span className=\"text-muted-foreground text-sm\">{}</span>\n <div className=\"flex items-center gap-2\">\n <CopyButton value={codeString} variant=\"outline\" />\n </div>\n </div>\n <div\n className={cn('preview flex h-[500px] w-full justify-center overflow-auto p-10', {\n 'items-center': align === 'center',\n 'items-end': align === 'end',\n 'items-start': align === 'start',\n })}\n duck-preview=\"\">\n {Preview}\n </div>\n </TabsContent>\n <TabsContent\n className=\"[&_[data-rehype-pretty-code-fragment]]:!m-0 relative mt-2 [&>div>div>button]:top-3 [&>div>div>button]:right-3 [&>div>div]:mb-0 [&>div]:rounded-lg [&>div]:border [&>div]:bg-muted/40 [&_pre]:h-[502px]\"\n value=\"code\">\n {Code}\n </TabsContent>\n <BuildTab />\n </Tabs>\n </div>\n )\n}\n\nexport const BuildTab = () => {\n return (\n <TabsContent className=\"relative overflow-hidden\" value=\"build\">\n <div className=\"h-[500px] overflow-hidden rounded-lg\">\n <img alt=\"build\" className=\"object-cover\" src=\"/builder.png\" />\n </div>\n\n <div className=\"absolute inset-0 top-0 left-0 flex h-[500px] flex-col items-center justify-center gap-4 rounded-md bg-zinc-700/10 px-4 py-2 backdrop-blur-sm dark:bg-zinc-700/50\">\n <div className=\"flex items-center gap-4\">\n <Button className=\"rounded-sm font-bold\" size={'sm'}>\n <Crown />\n <span>Coming soon</span>\n </Button>\n </div>\n </div>\n </TabsContent>\n )\n}\n\nexport const TABS = [\n {\n name: 'Preview',\n value: 'preview',\n },\n {\n name: 'Code',\n value: 'code',\n },\n // {\n // name: 'Benchmark',\n // value: 'benchmark',\n // },\n]\n"],"mappings":"gVAoBA,SAAgB,EAAiB,CAC/B,OACA,WACA,YACA,mBACA,sBACA,QAAQ,SACR,cACA,WAAW,GACX,eAAe,GACf,GAAG,GACqB,CAExB,IAAM,EADQA,EAAM,SAAS,QAAQ,EAAS,CAC3B,GACb,EAAgB,GAAkB,CAElC,EAAUA,EAAM,YAAc,CAClC,GAAI,CAAC,EACH,OAAO,EAAC,IAAA,CAAE,UAAU,yCAAgC,uDAAuD,CAG7G,IAAM,EAAY,EAAc,IAAO,UAWvC,OATK,EASE,EAAC,EAAA,EAAA,CAAY,CAPhB,EAAC,IAAA,CAAE,UAAU,0CAAgC,aACjC,EAAC,OAAA,CAAK,UAAU,+EAAuE,GAAY,CAAC,IAAI,2BAEhH,EAKP,CAAC,EAAM,EAAc,CAAC,CAEnB,EAAaA,EAAM,YAAc,CACrC,GAGS,GAAM,MAAM,sCAAwC,OAC3D,CACA,IAAMC,EAASD,EAAM,SAAS,QAG5B,EAAK,MAAM,SACZ,CAGD,OAAOC,EAAO,IAAI,OAAO,OAASA,EAAO,IAAI,OAAO,eAAiB,OAEtE,CAAC,EAAK,CAAC,CAEV,OACE,EAAC,MAAA,CACC,UAAW,EAAG,+EAAgF,EAAU,CACxG,GAAI,WACJ,EAAC,EAAA,CAAK,UAAU,0BAA0B,aAAa,oBACrD,EAAC,MAAA,CAAI,UAAU,6CACZ,CAAC,GACA,EAAC,EAAA,CAAS,UAAU,gHACjB,EAAK,KAAK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